diff --git a/pitfall/pdfkit/LICENSE b/pitfall/pdfkit/LICENSE new file mode 100644 index 00000000..5f5982ee --- /dev/null +++ b/pitfall/pdfkit/LICENSE @@ -0,0 +1,8 @@ +MIT LICENSE +Copyright (c) 2014 Devon Govett + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. \ No newline at end of file diff --git a/pitfall/pdfkit/Makefile b/pitfall/pdfkit/Makefile new file mode 100644 index 00000000..30150673 --- /dev/null +++ b/pitfall/pdfkit/Makefile @@ -0,0 +1,30 @@ +.PHONY: js + +js: + ./node_modules/.bin/coffee -o js -c lib/ + cp -r lib/font/data js/font/data + +browser: lib/**/*.coffee + mkdir -p build/ + ./node_modules/.bin/browserify \ + --standalone PDFDocument \ + --debug \ + --transform coffeeify \ + --extension .coffee \ + lib/document.coffee \ + | ./node_modules/.bin/exorcist build/pdfkit.js.map > build/pdfkit.js + +browser-demo: js demo/browser.js + ./node_modules/.bin/browserify demo/browser.js > demo/bundle.js + +docs: pdf-guide website browser-demo + +pdf-guide: + ./node_modules/.bin/coffee docs/generate.coffee + +website: + mkdir -p docs/img + ./node_modules/.bin/coffee docs/generate_website.coffee + +clean: + rm -rf js build demo/bundle.js diff --git a/pitfall/pdfkit/README.md b/pitfall/pdfkit/README.md new file mode 100644 index 00000000..ec05c72d --- /dev/null +++ b/pitfall/pdfkit/README.md @@ -0,0 +1,171 @@ +# PDFKit + +A JavaScript PDF generation library for Node and the browser. + +[![](https://img.shields.io/gratipay/devongovett.svg)](https://gratipay.com/devongovett) + +## Description + +PDFKit is a PDF document generation library for Node and the browser that makes creating complex, multi-page, printable documents easy. +It's written in CoffeeScript, but you can choose to use the API in plain 'ol JavaScript if you like. The API embraces +chainability, and includes both low level functions as well as abstractions for higher level functionality. The PDFKit API +is designed to be simple, so generating complex documents is often as simple as a few function calls. + +Check out some of the [documentation and examples](http://pdfkit.org/docs/getting_started.html) to see for yourself! +You can also read the guide as a [self-generated PDF](http://pdfkit.org/docs/guide.pdf) with example output displayed inline. +If you'd like to see how it was generated, check out the README in the [docs](https://github.com/devongovett/pdfkit/tree/master/docs) +folder. + +You can also try out an interactive in-browser demo of PDFKit [here](http://pdfkit.org/demo/browser.html). + +## Installation + +Installation uses the [npm](http://npmjs.org/) package manager. Just type the following command after installing npm. + + npm install pdfkit + +## Features + +* Vector graphics + * HTML5 canvas-like API + * Path operations + * SVG path parser for easy path creation + * Transformations + * Linear and radial gradients +* Text + * Line wrapping + * Text alignments + * Bulleted lists +* Font embedding + * Supports TrueType (.ttf), OpenType (.otf), WOFF, WOFF2, TrueType Collections (.ttc), and Datafork TrueType (.dfont) fonts + * Font subsetting + * See [fontkit](http://github.com/devongovett/fontkit) for more details on advanced glyph layout support. +* Image embedding + * Supports JPEG and PNG files (including indexed PNGs, and PNGs with transparency) +* Annotations + * Links + * Notes + * Highlights + * Underlines + * etc. + +## Coming soon! + +* Patterns fills +* Outlines +* PDF Security +* Higher level APIs for creating tables and laying out content +* More performance optimizations +* Even more awesomeness, perhaps written by you! Please fork this repository and send me pull requests. + +## Example + +```coffeescript +PDFDocument = require 'pdfkit' + +# Create a document +doc = new PDFDocument + +# Pipe its output somewhere, like to a file or HTTP response +# See below for browser usage +doc.pipe fs.createWriteStream('output.pdf') + +# Embed a font, set the font size, and render some text +doc.font('fonts/PalatinoBold.ttf') + .fontSize(25) + .text('Some text with an embedded font!', 100, 100) + +# Add an image, constrain it to a given size, and center it vertically and horizontally +doc.image('path/to/image.png', { + fit: [250, 300], + align: 'center', + valign: 'center' +}); + +# Add another page +doc.addPage() + .fontSize(25) + .text('Here is some vector graphics...', 100, 100) + +# Draw a triangle +doc.save() + .moveTo(100, 150) + .lineTo(100, 250) + .lineTo(200, 250) + .fill("#FF3300") + +# Apply some transforms and render an SVG path with the 'even-odd' fill rule +doc.scale(0.6) + .translate(470, -380) + .path('M 250,75 L 323,301 131,161 369,161 177,301 z') + .fill('red', 'even-odd') + .restore() + +# Add some text with annotations +doc.addPage() + .fillColor("blue") + .text('Here is a link!', 100, 100) + .underline(100, 100, 160, 27, color: "#0000FF") + .link(100, 100, 160, 27, 'http://google.com/') + +# Finalize PDF file +doc.end() +``` + +[The PDF output from this example](http://pdfkit.org/demo/out.pdf) (with a few additions) shows the power of PDFKit — producing +complex documents with a very small amount of code. For more, see the `demo` folder and the +[PDFKit programming guide](http://pdfkit.org/docs/getting_started.html). + +## Browser Usage + +There are two ways to use PDFKit in the browser. The first is to use [Browserify](http://browserify.org/), +which is a Node module packager for the browser with the familiar `require` syntax. The second is to use +a prebuilt version of PDFKit, which you can [download from Github](https://github.com/devongovett/pdfkit/releases). + +In addition to PDFKit, you'll need somewhere to stream the output to. HTML5 has a +[Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob) object which can be used to store binary data, and +get URLs to this data in order to display PDF output inside an iframe, or upload to a server, etc. In order to +get a Blob from the output of PDFKit, you can use the [blob-stream](https://github.com/devongovett/blob-stream) +module. + +The following example uses Browserify to load `PDFKit` and `blob-stream`, but if you're not using Browserify, +you can load them in whatever way you'd like (e.g. script tags). + +```coffeescript +# require dependencies +PDFDocument = require 'pdfkit' +blobStream = require 'blob-stream' + +# create a document the same way as above +doc = new PDFDocument + +# pipe the document to a blob +stream = doc.pipe(blobStream()) + +# add your content to the document here, as usual + +# get a blob when you're done +doc.end() +stream.on 'finish', -> + # get a blob you can do whatever you like with + blob = stream.toBlob('application/pdf') + + # or get a blob URL for display in the browser + url = stream.toBlobURL('application/pdf') + iframe.src = url +``` + +You can see an interactive in-browser demo of PDFKit [here](http://pdfkit.org/demo/browser.html). + +Note that in order to Browserify a project using PDFKit, you need to install the `brfs` module with npm, +which is used to load built-in font data into the package. It is listed as a `devDependency` in +PDFKit's `package.json`, so it isn't installed by default for Node users. +If you forget to install it, Browserify will print an error message. + +## Documentation + +For complete API documentation and more examples, see the [PDFKit website](http://pdfkit.org/). + +## License + +PDFKit is available under the MIT license. diff --git a/pitfall/pdfkit/demo/browser.html b/pitfall/pdfkit/demo/browser.html new file mode 100644 index 00000000..21a44be1 --- /dev/null +++ b/pitfall/pdfkit/demo/browser.html @@ -0,0 +1,47 @@ + + + + + + + +

PDFKit Browser Demo

+

Website | Github

+
+ + + + + \ No newline at end of file diff --git a/pitfall/pdfkit/demo/browser.js b/pitfall/pdfkit/demo/browser.js new file mode 100644 index 00000000..7c78ae0e --- /dev/null +++ b/pitfall/pdfkit/demo/browser.js @@ -0,0 +1,76 @@ +var PDFDocument = require('../'); +var blobStream = require('blob-stream'); +var ace = require('brace'); +require('brace/mode/javascript'); +require('brace/theme/monokai'); + +var lorem = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam in suscipit purus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Vivamus nec hendrerit felis. Morbi aliquam facilisis risus eu lacinia. Sed eu leo in turpis fringilla hendrerit. Ut nec accumsan nisl. Suspendisse rhoncus nisl posuere tortor tempus et dapibus elit porta. Cras leo neque, elementum a rhoncus ut, vestibulum non nibh. Phasellus pretium justo turpis. Etiam vulputate, odio vitae tincidunt ultricies, eros odio dapibus nisi, ut tincidunt lacus arcu eu elit. Aenean velit erat, vehicula eget lacinia ut, dignissim non tellus. Aliquam nec lacus mi, sed vestibulum nunc. Suspendisse potenti. Curabitur vitae sem turpis. Vestibulum sed neque eget dolor dapibus porttitor at sit amet sem. Fusce a turpis lorem. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae;\nMauris at ante tellus. Vestibulum a metus lectus. Praesent tempor purus a lacus blandit eget gravida ante hendrerit. Cras et eros metus. Sed commodo malesuada eros, vitae interdum augue semper quis. Fusce id magna nunc. Curabitur sollicitudin placerat semper. Cras et mi neque, a dignissim risus. Nulla venenatis porta lacus, vel rhoncus lectus tempor vitae. Duis sagittis venenatis rutrum. Curabitur tempor massa tortor.'; + +function makePDF(PDFDocument, blobStream, lorem, iframe) { + // create a document and pipe to a blob + var doc = new PDFDocument(); + var stream = doc.pipe(blobStream()); + + // draw some text + doc.fontSize(25) + .text('Here is some vector graphics...', 100, 80); + + // some vector graphics + doc.save() + .moveTo(100, 150) + .lineTo(100, 250) + .lineTo(200, 250) + .fill("#FF3300"); + + doc.circle(280, 200, 50) + .fill("#6600FF"); + + // an SVG path + doc.scale(0.6) + .translate(470, 130) + .path('M 250,75 L 323,301 131,161 369,161 177,301 z') + .fill('red', 'even-odd') + .restore(); + + // and some justified text wrapped into columns + doc.text('And here is some wrapped text...', 100, 300) + .font('Times-Roman', 13) + .moveDown() + .text(lorem, { + width: 412, + align: 'justify', + indent: 30, + columns: 2, + height: 300, + ellipsis: true + }); + + // end and display the document in the iframe to the right + doc.end(); + stream.on('finish', function() { + iframe.src = stream.toBlobURL('application/pdf'); + }); +} + +var editor = ace.edit('editor'); +editor.setTheme('ace/theme/monokai'); +editor.getSession().setMode('ace/mode/javascript'); +editor.setValue( + makePDF + .toString() + .split('\n').slice(1, -1).join('\n') + .replace(/^ /mg, '') +); +editor.getSession().getSelection().clearSelection(); + +var iframe = document.querySelector('iframe'); +makePDF(PDFDocument, blobStream, lorem, iframe); + +editor.getSession().on('change', function() { + try { + var fn = new Function("PDFDocument", "blobStream", "lorem", "iframe", editor.getValue()); + fn(PDFDocument, blobStream, lorem, iframe); + } catch (e) { + console.log(e) + }; +}); diff --git a/pitfall/pdfkit/demo/fonts/Chalkboard.ttc b/pitfall/pdfkit/demo/fonts/Chalkboard.ttc new file mode 100644 index 00000000..5ae65eef Binary files /dev/null and b/pitfall/pdfkit/demo/fonts/Chalkboard.ttc differ diff --git a/pitfall/pdfkit/demo/fonts/DejaVuSans.ttf b/pitfall/pdfkit/demo/fonts/DejaVuSans.ttf new file mode 100644 index 00000000..27cff476 Binary files /dev/null and b/pitfall/pdfkit/demo/fonts/DejaVuSans.ttf differ diff --git a/pitfall/pdfkit/demo/fonts/GoodDog.ttf b/pitfall/pdfkit/demo/fonts/GoodDog.ttf new file mode 100755 index 00000000..da5af27b Binary files /dev/null and b/pitfall/pdfkit/demo/fonts/GoodDog.ttf differ diff --git a/pitfall/pdfkit/demo/fonts/Helvetica.dfont b/pitfall/pdfkit/demo/fonts/Helvetica.dfont new file mode 100644 index 00000000..73559d59 Binary files /dev/null and b/pitfall/pdfkit/demo/fonts/Helvetica.dfont differ diff --git a/pitfall/pdfkit/demo/fonts/PalatinoBold.ttf b/pitfall/pdfkit/demo/fonts/PalatinoBold.ttf new file mode 100644 index 00000000..87bb3d82 Binary files /dev/null and b/pitfall/pdfkit/demo/fonts/PalatinoBold.ttf differ diff --git a/pitfall/pdfkit/demo/images/test.jpeg b/pitfall/pdfkit/demo/images/test.jpeg new file mode 100644 index 00000000..20d4f332 Binary files /dev/null and b/pitfall/pdfkit/demo/images/test.jpeg differ diff --git a/pitfall/pdfkit/demo/images/test.png b/pitfall/pdfkit/demo/images/test.png new file mode 100644 index 00000000..86b0f947 Binary files /dev/null and b/pitfall/pdfkit/demo/images/test.png differ diff --git a/pitfall/pdfkit/demo/images/test2.png b/pitfall/pdfkit/demo/images/test2.png new file mode 100644 index 00000000..e7466159 Binary files /dev/null and b/pitfall/pdfkit/demo/images/test2.png differ diff --git a/pitfall/pdfkit/demo/images/test3.png b/pitfall/pdfkit/demo/images/test3.png new file mode 100644 index 00000000..5181a6f5 Binary files /dev/null and b/pitfall/pdfkit/demo/images/test3.png differ diff --git a/pitfall/pdfkit/demo/out.pdf b/pitfall/pdfkit/demo/out.pdf new file mode 100644 index 00000000..bf066c1b Binary files /dev/null and b/pitfall/pdfkit/demo/out.pdf differ diff --git a/pitfall/pdfkit/demo/test.coffee b/pitfall/pdfkit/demo/test.coffee new file mode 100644 index 00000000..0d802427 --- /dev/null +++ b/pitfall/pdfkit/demo/test.coffee @@ -0,0 +1,92 @@ +PDFDocument = require '../' +tiger = require './tiger' +fs = require 'fs' + +# Create a new PDFDocument +doc = new PDFDocument +doc.pipe fs.createWriteStream('out.pdf') + +# Set some meta data +doc.info['Title'] = 'Test Document' +doc.info['Author'] = 'Devon Govett' + +# Register a font name for use later +doc.registerFont('Palatino', 'fonts/PalatinoBold.ttf') + +# Set the font, draw some text, and embed an image +doc.font('Palatino') + .fontSize(25) + .text('Some text with an embedded font!', 100, 100) + .fontSize(18) + .text('PNG and JPEG images:') + .image('images/test.png', 100, 160, width: 412) + .image('images/test.jpeg', 190, 400, height: 300) + +# Add another page +doc.addPage() + .fontSize(25) + .text 'Here is some vector graphics...', 100, 100 + +# Draw a triangle and a circle +doc.save() + .moveTo(100, 150) + .lineTo(100, 250) + .lineTo(200, 250) + .fill("#FF3300") + +doc.circle(280, 200, 50) + .fill("#6600FF") + +doc.scale(0.6) + .translate(470, -380) + .path('M 250,75 L 323,301 131,161 369,161 177,301 z') # render an SVG path + .fill('red', 'even-odd') # fill using the even-odd winding rule + .restore() + +loremIpsum = ''' +Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam in suscipit purus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Vivamus nec hendrerit felis. Morbi aliquam facilisis risus eu lacinia. Sed eu leo in turpis fringilla hendrerit. Ut nec accumsan nisl. Suspendisse rhoncus nisl posuere tortor tempus et dapibus elit porta. Cras leo neque, elementum a rhoncus ut, vestibulum non nibh. Phasellus pretium justo turpis. Etiam vulputate, odio vitae tincidunt ultricies, eros odio dapibus nisi, ut tincidunt lacus arcu eu elit. Aenean velit erat, vehicula eget lacinia ut, dignissim non tellus. Aliquam nec lacus mi, sed vestibulum nunc. Suspendisse potenti. Curabitur vitae sem turpis. Vestibulum sed neque eget dolor dapibus porttitor at sit amet sem. Fusce a turpis lorem. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; +Mauris at ante tellus. Vestibulum a metus lectus. Praesent tempor purus a lacus blandit eget gravida ante hendrerit. Cras et eros metus. Sed commodo malesuada eros, vitae interdum augue semper quis. Fusce id magna nunc. Curabitur sollicitudin placerat semper. Cras et mi neque, a dignissim risus. Nulla venenatis porta lacus, vel rhoncus lectus tempor vitae. Duis sagittis venenatis rutrum. Curabitur tempor massa tortor. +''' + +# Draw some text wrapped to 412 points wide +doc.text('And here is some wrapped text...', 100, 300) + .font('Helvetica', 13) + .moveDown() # move down 1 line + .text(loremIpsum, width: 412, align: 'justify', indent: 30, paragraphGap: 5) + +# Add another page, and set the font back +doc.addPage() + .font('Palatino', 25) + .text('Rendering some SVG paths...', 100, 100) + .translate(220, 300) + +# Render each path that makes up the tiger image +for part in tiger + doc.save() + doc.path(part.path) # render an SVG path + + if part['stroke-width'] + doc.lineWidth part['stroke-width'] + + if part.fill isnt 'none' and part.stroke isnt 'none' + doc.fillAndStroke(part.fill, part.stroke) + else + unless part.fill is 'none' + doc.fill(part.fill) + + unless part.stroke is 'none' + doc.stroke(part.stroke) + + doc.restore() + +# Add some text with annotations +doc.addPage() + .fillColor("blue") + .text('Here is a link!', 100, 100, { link: 'http://google.com/', underline: true }) + +# Add a list with a font loaded from a TrueType collection file +doc.fillColor('#000') + .font('fonts/Chalkboard.ttc', 'Chalkboard', 16) + .list(['One', 'Two', 'Three'], 100, 150) + +doc.end() \ No newline at end of file diff --git a/pitfall/pdfkit/demo/tiger.js b/pitfall/pdfkit/demo/tiger.js new file mode 100644 index 00000000..c76a5463 --- /dev/null +++ b/pitfall/pdfkit/demo/tiger.js @@ -0,0 +1,5 @@ +/* + * From Raphael.js demos - http://raphaeljs.com/tiger.js +*/ + +module.exports = [{type:"path",path:"M-122.304 84.285C-122.304 84.285 -122.203 86.179 -123.027 86.16C-123.851 86.141 -140.305 38.066 -160.833 40.309C-160.833 40.309 -143.05 32.956 -122.304 84.285z","stroke-width":"0.172",stroke:"#000",fill:"#fff"},{type:"path",path:"M-118.774 81.262C-118.774 81.262 -119.323 83.078 -120.092 82.779C-120.86 82.481 -119.977 31.675 -140.043 26.801C-140.043 26.801 -120.82 25.937 -118.774 81.262z","stroke-width":"0.172",stroke:"#000",fill:"#fff"},{type:"path",path:"M-91.284 123.59C-91.284 123.59 -89.648 124.55 -90.118 125.227C-90.589 125.904 -139.763 113.102 -149.218 131.459C-149.218 131.459 -145.539 112.572 -91.284 123.59z","stroke-width":"0.172",stroke:"#000",fill:"#fff"},{type:"path",path:"M-94.093 133.801C-94.093 133.801 -92.237 134.197 -92.471 134.988C-92.704 135.779 -143.407 139.121 -146.597 159.522C-146.597 159.522 -149.055 140.437 -94.093 133.801z","stroke-width":"0.172",stroke:"#000",fill:"#fff"},{type:"path",path:"M-98.304 128.276C-98.304 128.276 -96.526 128.939 -96.872 129.687C-97.218 130.435 -147.866 126.346 -153.998 146.064C-153.998 146.064 -153.646 126.825 -98.304 128.276z","stroke-width":"0.172",stroke:"#000",fill:"#fff"},{type:"path",path:"M-109.009 110.072C-109.009 110.072 -107.701 111.446 -108.34 111.967C-108.979 112.488 -152.722 86.634 -166.869 101.676C-166.869 101.676 -158.128 84.533 -109.009 110.072z","stroke-width":"0.172",stroke:"#000",fill:"#fff"},{type:"path",path:"M-116.554 114.263C-116.554 114.263 -115.098 115.48 -115.674 116.071C-116.25 116.661 -162.638 95.922 -174.992 112.469C-174.992 112.469 -168.247 94.447 -116.554 114.263z","stroke-width":"0.172",stroke:"#000",fill:"#fff"},{type:"path",path:"M-119.154 118.335C-119.154 118.335 -117.546 119.343 -118.036 120.006C-118.526 120.669 -167.308 106.446 -177.291 124.522C-177.291 124.522 -173.066 105.749 -119.154 118.335z","stroke-width":"0.172",stroke:"#000",fill:"#fff"},{type:"path",path:"M-108.42 118.949C-108.42 118.949 -107.298 120.48 -107.999 120.915C-108.7 121.35 -148.769 90.102 -164.727 103.207C-164.727 103.207 -153.862 87.326 -108.42 118.949z","stroke-width":"0.172",stroke:"#000",fill:"#fff"},{type:"path",path:"M-128.2 90C-128.2 90 -127.6 91.8 -128.4 92C-129.2 92.2 -157.8 50.2 -177.001 57.8C-177.001 57.8 -161.8 46 -128.2 90z","stroke-width":"0.172",stroke:"#000",fill:"#fff"},{type:"path",path:"M-127.505 96.979C-127.505 96.979 -126.53 98.608 -127.269 98.975C-128.007 99.343 -164.992 64.499 -182.101 76.061C-182.101 76.061 -169.804 61.261 -127.505 96.979z","stroke-width":"0.172",stroke:"#000",fill:"#fff"},{type:"path",path:"M-127.62 101.349C-127.62 101.349 -126.498 102.88 -127.199 103.315C-127.9 103.749 -167.969 72.502 -183.927 85.607C-183.927 85.607 -173.062 69.726 -127.62 101.349z","stroke-width":"0.172",stroke:"#000",fill:"#fff"},{type:"path",path:"M-129.83 103.065C-129.327 109.113 -128.339 115.682 -126.6 118.801C-126.6 118.801 -130.2 131.201 -121.4 144.401C-121.4 144.401 -121.8 151.601 -120.2 154.801C-120.2 154.801 -116.2 163.201 -111.4 164.001C-107.516 164.648 -98.793 167.717 -88.932 169.121C-88.932 169.121 -71.8 183.201 -75 196.001C-75 196.001 -75.4 212.401 -79 214.001C-79 214.001 -67.4 202.801 -77 219.601L-81.4 238.401C-81.4 238.401 -55.8 216.801 -71.4 235.201L-81.4 261.201C-81.4 261.201 -61.8 242.801 -69 251.201L-72.2 260.001C-72.2 260.001 -29 232.801 -59.8 262.401C-59.8 262.401 -51.8 258.801 -47.4 261.601C-47.4 261.601 -40.6 260.401 -41.4 262.001C-41.4 262.001 -62.2 272.401 -65.8 290.801C-65.8 290.801 -57.4 280.801 -60.6 291.601L-60.2 303.201C-60.2 303.201 -56.2 281.601 -56.6 319.201C-56.6 319.201 -37.4 301.201 -49 322.001L-49 338.801C-49 338.801 -33.8 322.401 -40.2 335.201C-40.2 335.201 -30.2 326.401 -34.2 341.601C-34.2 341.601 -35 352.001 -30.6 340.801C-30.6 340.801 -14.6 310.201 -20.6 336.401C-20.6 336.401 -21.4 355.601 -16.6 340.801C-16.6 340.801 -16.2 351.201 -7 358.401C-7 358.401 -8.2 307.601 4.6 343.601L8.6 360.001C8.6 360.001 11.4 350.801 11 345.601C11 345.601 25.8 329.201 19 353.601C19 353.601 34.2 330.801 31 344.001C31 344.001 23.4 360.001 25 364.801C25 364.801 41.8 330.001 43 328.401C43 328.401 41 370.802 51.8 334.801C51.8 334.801 57.4 346.801 54.6 351.201C54.6 351.201 62.6 343.201 61.8 340.001C61.8 340.001 66.4 331.801 69.2 345.401C69.2 345.401 71 354.801 72.6 351.601C72.6 351.601 76.6 375.602 77.8 352.801C77.8 352.801 79.4 339.201 72.2 327.601C72.2 327.601 73 324.401 70.2 320.401C70.2 320.401 83.8 342.001 76.6 313.201C76.6 313.201 87.801 321.201 89.001 321.201C89.001 321.201 75.4 298.001 84.2 302.801C84.2 302.801 79 292.401 97.001 304.401C97.001 304.401 81 288.401 98.601 298.001C98.601 298.001 106.601 304.401 99.001 294.401C99.001 294.401 84.6 278.401 106.601 296.401C106.601 296.401 118.201 312.801 119.001 315.601C119.001 315.601 109.001 286.401 104.601 283.601C104.601 283.601 113.001 247.201 154.201 262.801C154.201 262.801 161.001 280.001 165.401 261.601C165.401 261.601 178.201 255.201 189.401 282.801C189.401 282.801 193.401 269.201 192.601 266.401C192.601 266.401 199.401 267.601 198.601 266.401C198.601 266.401 211.801 270.801 213.001 270.001C213.001 270.001 219.801 276.801 220.201 273.201C220.201 273.201 229.401 276.001 227.401 272.401C227.401 272.401 236.201 288.001 236.601 291.601L239.001 277.601L241.001 280.401C241.001 280.401 242.601 272.801 241.801 271.601C241.001 270.401 261.801 278.401 266.601 299.201L268.601 307.601C268.601 307.601 274.601 292.801 273.001 288.801C273.001 288.801 278.201 289.601 278.601 294.001C278.601 294.001 282.601 270.801 277.801 264.801C277.801 264.801 282.201 264.001 283.401 267.601L283.401 260.401C283.401 260.401 290.601 261.201 290.601 258.801C290.601 258.801 295.001 254.801 297.001 259.601C297.001 259.601 284.601 224.401 303.001 243.601C303.001 243.601 310.201 254.401 306.601 235.601C303.001 216.801 299.001 215.201 303.801 214.801C303.801 214.801 304.601 211.201 302.601 209.601C300.601 208.001 303.801 209.601 303.801 209.601C303.801 209.601 308.601 213.601 303.401 191.601C303.401 191.601 309.801 193.201 297.801 164.001C297.801 164.001 300.601 161.601 296.601 153.201C296.601 153.201 304.601 157.601 307.401 156.001C307.401 156.001 307.001 154.401 303.801 150.401C303.801 150.401 282.201 95.6 302.601 117.601C302.601 117.601 314.451 131.151 308.051 108.351C308.051 108.351 298.94 84.341 299.717 80.045L-129.83 103.065z",stroke:"#000",fill:"#fff"},{type:"path",path:"M299.717 80.245C300.345 80.426 302.551 81.55 303.801 83.2C303.801 83.2 310.601 94 305.401 75.6C305.401 75.6 296.201 46.8 305.001 58C305.001 58 311.001 65.2 307.801 51.6C303.936 35.173 301.401 28.8 301.401 28.8C301.401 28.8 313.001 33.6 286.201 -6L295.001 -2.4C295.001 -2.4 275.401 -42 253.801 -47.2L245.801 -53.2C245.801 -53.2 284.201 -91.2 271.401 -128C271.401 -128 264.601 -133.2 255.001 -124C255.001 -124 248.601 -119.2 242.601 -120.8C242.601 -120.8 211.801 -119.6 209.801 -119.6C207.801 -119.6 173.001 -156.8 107.401 -139.2C107.401 -139.2 102.201 -137.2 97.801 -138.4C97.801 -138.4 79.4 -154.4 30.6 -131.6C30.6 -131.6 20.6 -129.6 19 -129.6C17.4 -129.6 14.6 -129.6 6.6 -123.2C-1.4 -116.8 -1.8 -116 -3.8 -114.4C-3.8 -114.4 -20.2 -103.2 -25 -102.4C-25 -102.4 -36.6 -96 -41 -86L-44.6 -84.8C-44.6 -84.8 -46.2 -77.6 -46.6 -76.4C-46.6 -76.4 -51.4 -72.8 -52.2 -67.2C-52.2 -67.2 -61 -61.2 -60.6 -56.8C-60.6 -56.8 -62.2 -51.6 -63 -46.8C-63 -46.8 -70.2 -42 -69.4 -39.2C-69.4 -39.2 -77 -25.2 -75.8 -18.4C-75.8 -18.4 -82.2 -18.8 -85 -16.4C-85 -16.4 -85.8 -11.6 -87.4 -11.2C-87.4 -11.2 -90.2 -10 -87.8 -6C-87.8 -6 -89.4 -3.2 -89.8 -1.6C-89.8 -1.6 -89 1.2 -93.4 6.8C-93.4 6.8 -99.8 25.6 -97.8 30.8C-97.8 30.8 -97.4 35.6 -100.2 37.2C-100.2 37.2 -103.8 36.8 -95.4 48.8C-95.4 48.8 -94.6 50 -97.8 52.4C-97.8 52.4 -115 56 -117.4 72.4C-117.4 72.4 -131 87.2 -131 92.4C-131 94.705 -130.729 97.852 -130.03 102.465C-130.03 102.465 -130.6 110.801 -103 111.601C-75.4 112.401 299.717 80.245 299.717 80.245z",stroke:"#000",fill:"#cc7226"},{type:"path",path:"M-115.6 102.6C-140.6 63.2 -126.2 119.601 -126.2 119.601C-117.4 154.001 12.2 116.401 12.2 116.401C12.2 116.401 181.001 86 192.201 82C203.401 78 298.601 84.4 298.601 84.4L293.001 67.6C228.201 21.2 209.001 44.4 195.401 40.4C181.801 36.4 184.201 46 181.001 46.8C177.801 47.6 138.601 22.8 132.201 23.6C125.801 24.4 100.459 0.649 115.401 32.4C131.401 66.4 57 71.6 40.2 60.4C23.4 49.2 47.4 78.8 47.4 78.8C65.8 98.8 31.4 82 31.4 82C-3 69.2 -27 94.8 -30.2 95.6C-33.4 96.4 -38.2 99.6 -39 93.2C-39.8 86.8 -47.31 70.099 -79 96.4C-99 113.001 -112.8 91 -112.8 91L-115.6 102.6z",stroke:"none",fill:"#cc7226"},{type:"path",path:"M133.51 25.346C127.11 26.146 101.743 2.407 116.71 34.146C133.31 69.346 58.31 73.346 41.51 62.146C24.709 50.946 48.71 80.546 48.71 80.546C67.11 100.546 32.709 83.746 32.709 83.746C-1.691 70.946 -25.691 96.546 -28.891 97.346C-32.091 98.146 -36.891 101.346 -37.691 94.946C-38.491 88.546 -45.87 72.012 -77.691 98.146C-98.927 115.492 -112.418 94.037 -112.418 94.037L-115.618 104.146C-140.618 64.346 -125.546 122.655 -125.546 122.655C-116.745 157.056 13.509 118.146 13.509 118.146C13.509 118.146 182.31 87.746 193.51 83.746C204.71 79.746 299.038 86.073 299.038 86.073L293.51 68.764C228.71 22.364 210.31 46.146 196.71 42.146C183.11 38.146 185.51 47.746 182.31 48.546C179.11 49.346 139.91 24.546 133.51 25.346z",stroke:"none",fill:"#e87f3a"},{type:"path",path:"M134.819 27.091C128.419 27.891 103.685 3.862 118.019 35.891C134.219 72.092 59.619 75.092 42.819 63.892C26.019 52.692 50.019 82.292 50.019 82.292C68.419 102.292 34.019 85.492 34.019 85.492C-0.381 72.692 -24.382 98.292 -27.582 99.092C-30.782 99.892 -35.582 103.092 -36.382 96.692C-37.182 90.292 -44.43 73.925 -76.382 99.892C-98.855 117.983 -112.036 97.074 -112.036 97.074L-115.636 105.692C-139.436 66.692 -124.891 125.71 -124.891 125.71C-116.091 160.11 14.819 119.892 14.819 119.892C14.819 119.892 183.619 89.492 194.819 85.492C206.019 81.492 299.474 87.746 299.474 87.746L294.02 69.928C229.219 23.528 211.619 47.891 198.019 43.891C184.419 39.891 186.819 49.491 183.619 50.292C180.419 51.092 141.219 26.291 134.819 27.091z",stroke:"none",fill:"#ea8c4d"},{type:"path",path:"M136.128 28.837C129.728 29.637 104.999 5.605 119.328 37.637C136.128 75.193 60.394 76.482 44.128 65.637C27.328 54.437 51.328 84.037 51.328 84.037C69.728 104.037 35.328 87.237 35.328 87.237C0.928 74.437 -23.072 100.037 -26.272 100.837C-29.472 101.637 -34.272 104.837 -35.072 98.437C-35.872 92.037 -42.989 75.839 -75.073 101.637C-98.782 120.474 -111.655 100.11 -111.655 100.11L-115.655 107.237C-137.455 70.437 -124.236 128.765 -124.236 128.765C-115.436 163.165 16.128 121.637 16.128 121.637C16.128 121.637 184.928 91.237 196.129 87.237C207.329 83.237 299.911 89.419 299.911 89.419L294.529 71.092C229.729 24.691 212.929 49.637 199.329 45.637C185.728 41.637 188.128 51.237 184.928 52.037C181.728 52.837 142.528 28.037 136.128 28.837z",stroke:"none",fill:"#ec9961"},{type:"path",path:"M137.438 30.583C131.037 31.383 106.814 7.129 120.637 39.383C137.438 78.583 62.237 78.583 45.437 67.383C28.637 56.183 52.637 85.783 52.637 85.783C71.037 105.783 36.637 88.983 36.637 88.983C2.237 76.183 -21.763 101.783 -24.963 102.583C-28.163 103.383 -32.963 106.583 -33.763 100.183C-34.563 93.783 -41.548 77.752 -73.763 103.383C-98.709 122.965 -111.273 103.146 -111.273 103.146L-115.673 108.783C-135.473 73.982 -123.582 131.819 -123.582 131.819C-114.782 166.22 17.437 123.383 17.437 123.383C17.437 123.383 186.238 92.983 197.438 88.983C208.638 84.983 300.347 91.092 300.347 91.092L295.038 72.255C230.238 25.855 214.238 51.383 200.638 47.383C187.038 43.383 189.438 52.983 186.238 53.783C183.038 54.583 143.838 29.783 137.438 30.583z",stroke:"none",fill:"#eea575"},{type:"path",path:"M138.747 32.328C132.347 33.128 106.383 9.677 121.947 41.128C141.147 79.928 63.546 80.328 46.746 69.128C29.946 57.928 53.946 87.528 53.946 87.528C72.346 107.528 37.946 90.728 37.946 90.728C3.546 77.928 -20.454 103.528 -23.654 104.328C-26.854 105.128 -31.654 108.328 -32.454 101.928C-33.254 95.528 -40.108 79.665 -72.454 105.128C-98.636 125.456 -110.891 106.183 -110.891 106.183L-115.691 110.328C-133.691 77.128 -122.927 134.874 -122.927 134.874C-114.127 169.274 18.746 125.128 18.746 125.128C18.746 125.128 187.547 94.728 198.747 90.728C209.947 86.728 300.783 92.764 300.783 92.764L295.547 73.419C230.747 27.019 215.547 53.128 201.947 49.128C188.347 45.128 190.747 54.728 187.547 55.528C184.347 56.328 145.147 31.528 138.747 32.328z",stroke:"none",fill:"#f1b288"},{type:"path",path:"M140.056 34.073C133.655 34.873 107.313 11.613 123.255 42.873C143.656 82.874 64.855 82.074 48.055 70.874C31.255 59.674 55.255 89.274 55.255 89.274C73.655 109.274 39.255 92.474 39.255 92.474C4.855 79.674 -19.145 105.274 -22.345 106.074C-25.545 106.874 -30.345 110.074 -31.145 103.674C-31.945 97.274 -38.668 81.578 -71.145 106.874C-98.564 127.947 -110.509 109.219 -110.509 109.219L-115.709 111.874C-131.709 81.674 -122.273 137.929 -122.273 137.929C-113.473 172.329 20.055 126.874 20.055 126.874C20.055 126.874 188.856 96.474 200.056 92.474C211.256 88.474 301.22 94.437 301.22 94.437L296.056 74.583C231.256 28.183 216.856 54.874 203.256 50.874C189.656 46.873 192.056 56.474 188.856 57.274C185.656 58.074 146.456 33.273 140.056 34.073z",stroke:"none",fill:"#f3bf9c"},{type:"path",path:"M141.365 35.819C134.965 36.619 107.523 13.944 124.565 44.619C146.565 84.219 66.164 83.819 49.364 72.619C32.564 61.419 56.564 91.019 56.564 91.019C74.964 111.019 40.564 94.219 40.564 94.219C6.164 81.419 -17.836 107.019 -21.036 107.819C-24.236 108.619 -29.036 111.819 -29.836 105.419C-30.636 99.019 -37.227 83.492 -69.836 108.619C-98.491 130.438 -110.127 112.256 -110.127 112.256L-115.727 113.419C-130.128 85.019 -121.618 140.983 -121.618 140.983C-112.818 175.384 21.364 128.619 21.364 128.619C21.364 128.619 190.165 98.219 201.365 94.219C212.565 90.219 301.656 96.11 301.656 96.11L296.565 75.746C231.765 29.346 218.165 56.619 204.565 52.619C190.965 48.619 193.365 58.219 190.165 59.019C186.965 59.819 147.765 35.019 141.365 35.819z",stroke:"none",fill:"#f5ccb0"},{type:"path",path:"M142.674 37.565C136.274 38.365 108.832 15.689 125.874 46.365C147.874 85.965 67.474 85.565 50.674 74.365C33.874 63.165 57.874 92.765 57.874 92.765C76.274 112.765 41.874 95.965 41.874 95.965C7.473 83.165 -16.527 108.765 -19.727 109.565C-22.927 110.365 -27.727 113.565 -28.527 107.165C-29.327 100.765 -35.786 85.405 -68.527 110.365C-98.418 132.929 -109.745 115.293 -109.745 115.293L-115.745 114.965C-129.346 88.564 -120.963 144.038 -120.963 144.038C-112.163 178.438 22.673 130.365 22.673 130.365C22.673 130.365 191.474 99.965 202.674 95.965C213.874 91.965 302.093 97.783 302.093 97.783L297.075 76.91C232.274 30.51 219.474 58.365 205.874 54.365C192.274 50.365 194.674 59.965 191.474 60.765C188.274 61.565 149.074 36.765 142.674 37.565z",stroke:"none",fill:"#f8d8c4"},{type:"path",path:"M143.983 39.31C137.583 40.11 110.529 17.223 127.183 48.11C149.183 88.91 68.783 87.31 51.983 76.11C35.183 64.91 59.183 94.51 59.183 94.51C77.583 114.51 43.183 97.71 43.183 97.71C8.783 84.91 -15.217 110.51 -18.417 111.31C-21.618 112.11 -26.418 115.31 -27.218 108.91C-28.018 102.51 -34.346 87.318 -67.218 112.11C-98.345 135.42 -109.363 118.329 -109.363 118.329L-115.764 116.51C-128.764 92.51 -120.309 147.093 -120.309 147.093C-111.509 181.493 23.983 132.11 23.983 132.11C23.983 132.11 192.783 101.71 203.983 97.71C215.183 93.71 302.529 99.456 302.529 99.456L297.583 78.074C232.783 31.673 220.783 60.11 207.183 56.11C193.583 52.11 195.983 61.71 192.783 62.51C189.583 63.31 150.383 38.51 143.983 39.31z",stroke:"none",fill:"#fae5d7"},{type:"path",path:"M145.292 41.055C138.892 41.855 112.917 18.411 128.492 49.855C149.692 92.656 70.092 89.056 53.292 77.856C36.492 66.656 60.492 96.256 60.492 96.256C78.892 116.256 44.492 99.456 44.492 99.456C10.092 86.656 -13.908 112.256 -17.108 113.056C-20.308 113.856 -25.108 117.056 -25.908 110.656C-26.708 104.256 -32.905 89.232 -65.908 113.856C-98.273 137.911 -108.982 121.365 -108.982 121.365L-115.782 118.056C-128.582 94.856 -119.654 150.147 -119.654 150.147C-110.854 184.547 25.292 133.856 25.292 133.856C25.292 133.856 194.093 103.456 205.293 99.456C216.493 95.456 302.965 101.128 302.965 101.128L298.093 79.237C233.292 32.837 222.093 61.856 208.493 57.856C194.893 53.855 197.293 63.456 194.093 64.256C190.892 65.056 151.692 40.255 145.292 41.055z",stroke:"none",fill:"#fcf2eb"},{type:"path",path:"M-115.8 119.601C-128.6 97.6 -119 153.201 -119 153.201C-110.2 187.601 26.6 135.601 26.6 135.601C26.6 135.601 195.401 105.2 206.601 101.2C217.801 97.2 303.401 102.8 303.401 102.8L298.601 80.4C233.801 34 223.401 63.6 209.801 59.6C196.201 55.6 198.601 65.2 195.401 66C192.201 66.8 153.001 42 146.601 42.8C140.201 43.6 114.981 19.793 129.801 51.6C152.028 99.307 69.041 89.227 54.6 79.6C37.8 68.4 61.8 98 61.8 98C80.2 118.001 45.8 101.2 45.8 101.2C11.4 88.4 -12.6 114.001 -15.8 114.801C-19 115.601 -23.8 118.801 -24.6 112.401C-25.4 106 -31.465 91.144 -64.6 115.601C-98.2 140.401 -108.6 124.401 -108.6 124.401L-115.8 119.601z",stroke:"none",fill:"#fff"},{type:"path",path:"M-74.2 149.601C-74.2 149.601 -81.4 161.201 -60.6 174.401C-60.6 174.401 -59.2 175.801 -77.2 171.601C-77.2 171.601 -83.4 169.601 -85 159.201C-85 159.201 -89.8 154.801 -94.6 149.201C-99.4 143.601 -74.2 149.601 -74.2 149.601z",stroke:"none",fill:"#000"},{type:"path",path:"M65.8 102C65.8 102 83.498 128.821 82.9 133.601C81.6 144.001 81.4 153.601 84.6 157.601C87.801 161.601 96.601 194.801 96.601 194.801C96.601 194.801 96.201 196.001 108.601 158.001C108.601 158.001 120.201 142.001 100.201 123.601C100.201 123.601 65 94.8 65.8 102z",stroke:"none",fill:"#ccc"},{type:"path",path:"M-54.2 176.401C-54.2 176.401 -43 183.601 -57.4 214.801L-51 212.401C-51 212.401 -51.8 223.601 -55 226.001L-47.8 222.801C-47.8 222.801 -43 230.801 -47 235.601C-47 235.601 -30.2 243.601 -31 250.001C-31 250.001 -24.6 242.001 -28.6 235.601C-32.6 229.201 -39.8 233.201 -39 214.801L-47.8 218.001C-47.8 218.001 -42.2 209.201 -42.2 202.801L-50.2 205.201C-50.2 205.201 -34.731 178.623 -45.4 177.201C-51.4 176.401 -54.2 176.401 -54.2 176.401z",stroke:"none",fill:"#000"},{type:"path",path:"M-21.8 193.201C-21.8 193.201 -19 188.801 -21.8 189.601C-24.6 190.401 -55.8 205.201 -61.8 214.801C-61.8 214.801 -27.4 190.401 -21.8 193.201z",stroke:"none",fill:"#ccc"},{type:"path",path:"M-11.4 201.201C-11.4 201.201 -8.6 196.801 -11.4 197.601C-14.2 198.401 -45.4 213.201 -51.4 222.801C-51.4 222.801 -17 198.401 -11.4 201.201z",stroke:"none",fill:"#ccc"},{type:"path",path:"M1.8 186.001C1.8 186.001 4.6 181.601 1.8 182.401C-1 183.201 -32.2 198.001 -38.2 207.601C-38.2 207.601 -3.8 183.201 1.8 186.001z",stroke:"none",fill:"#ccc"},{type:"path",path:"M-21.4 229.601C-21.4 229.601 -21.4 223.601 -24.2 224.401C-27 225.201 -63 242.801 -69 252.401C-69 252.401 -27 226.801 -21.4 229.601z",stroke:"none",fill:"#ccc"},{type:"path",path:"M-20.2 218.801C-20.2 218.801 -19 214.001 -21.8 214.801C-23.8 214.801 -50.2 226.401 -56.2 236.001C-56.2 236.001 -26.6 214.401 -20.2 218.801z",stroke:"none",fill:"#ccc"},{type:"path",path:"M-34.6 266.401L-44.6 274.001C-44.6 274.001 -34.2 266.401 -30.6 267.601C-30.6 267.601 -37.4 278.801 -38.2 284.001C-38.2 284.001 -27.8 271.201 -22.2 271.601C-22.2 271.601 -14.6 272.001 -14.6 282.801C-14.6 282.801 -9 272.401 -5.8 272.801C-5.8 272.801 -4.6 279.201 -5.8 286.001C-5.8 286.001 -1.8 278.401 2.2 280.001C2.2 280.001 8.6 278.001 7.8 289.601C7.8 289.601 7.8 300.001 7 302.801C7 302.801 12.6 276.401 15 276.001C15 276.001 23 274.801 27.8 283.601C27.8 283.601 23.8 276.001 28.6 278.001C28.6 278.001 39.4 279.601 42.6 286.401C42.6 286.401 35.8 274.401 41.4 277.601C41.4 277.601 48.2 277.601 49.4 284.001C49.4 284.001 57.8 305.201 59.8 306.801C59.8 306.801 52.2 285.201 53.8 285.201C53.8 285.201 51.8 273.201 57 288.001C57 288.001 53.8 274.001 59.4 274.801C65 275.601 69.4 285.601 77.8 283.201C77.8 283.201 87.401 288.801 89.401 219.601L-34.6 266.401z",stroke:"none",fill:"#ccc"},{type:"path",path:"M-29.8 173.601C-29.8 173.601 -15 167.601 25 173.601C25 173.601 32.2 174.001 39 165.201C45.8 156.401 72.6 149.201 79 151.201L88.601 157.601L89.401 158.801C89.401 158.801 101.801 169.201 102.201 176.801C102.601 184.401 87.801 232.401 78.2 248.401C68.6 264.401 59 276.801 39.8 274.401C39.8 274.401 19 270.401 -6.6 274.401C-6.6 274.401 -35.8 272.801 -38.6 264.801C-41.4 256.801 -27.4 241.601 -27.4 241.601C-27.4 241.601 -23 233.201 -24.2 218.801C-25.4 204.401 -25 176.401 -29.8 173.601z",stroke:"none",fill:"#000"},{type:"path",path:"M-7.8 175.601C0.6 194.001 -29 259.201 -29 259.201C-31 260.801 -16.34 266.846 -6.2 264.401C4.746 261.763 45 266.001 45 266.001C68.6 250.401 81.4 206.001 81.4 206.001C81.4 206.001 91.801 182.001 74.2 178.801C56.6 175.601 -7.8 175.601 -7.8 175.601z",stroke:"none",fill:"#e5668c"},{type:"path",path:"M-9.831 206.497C-6.505 193.707 -4.921 181.906 -7.8 175.601C-7.8 175.601 54.6 182.001 65.8 161.201C70.041 153.326 84.801 184.001 84.4 193.601C84.4 193.601 21.4 208.001 6.6 196.801L-9.831 206.497z",stroke:"none",fill:"#b23259"},{type:"path",path:"M-5.4 222.801C-5.4 222.801 -3.4 230.001 -5.8 234.001C-5.8 234.001 -7.4 234.801 -8.6 235.201C-8.6 235.201 -7.4 238.801 -1.4 240.401C-1.4 240.401 0.6 244.801 3 245.201C5.4 245.601 10.2 251.201 14.2 250.001C18.2 248.801 29.4 244.801 29.4 244.801C29.4 244.801 35 241.601 43.8 245.201C43.8 245.201 46.175 244.399 46.6 240.401C47.1 235.701 50.2 232.001 52.2 230.001C54.2 228.001 63.8 215.201 62.6 214.801C61.4 214.401 -5.4 222.801 -5.4 222.801z",stroke:"none",fill:"#a5264c"},{type:"path",path:"M-9.8 174.401C-9.8 174.401 -12.6 196.801 -9.4 205.201C-6.2 213.601 -7 215.601 -7.8 219.601C-8.6 223.601 -4.2 233.601 1.4 239.601L13.4 241.201C13.4 241.201 28.6 237.601 37.8 240.401C37.8 240.401 46.794 241.744 50.2 226.801C50.2 226.801 55 220.401 62.2 217.601C69.4 214.801 76.6 173.201 72.6 165.201C68.6 157.201 54.2 152.801 38.2 168.401C22.2 184.001 20.2 167.201 -9.8 174.401z",stroke:"#000",fill:"#ff727f"},{type:"path",path:"M-8.2 249.201C-8.2 249.201 -9 247.201 -13.4 246.801C-13.4 246.801 -35.8 243.201 -44.2 230.801C-44.2 230.801 -51 225.201 -46.6 236.801C-46.6 236.801 -36.2 257.201 -29.4 260.001C-29.4 260.001 -13 264.001 -8.2 249.201z","stroke-width":"0.5",stroke:"#000",fill:"#ffffcc"},{type:"path",path:"M71.742 185.229C72.401 177.323 74.354 168.709 72.6 165.201C66.154 152.307 49.181 157.695 38.2 168.401C22.2 184.001 20.2 167.201 -9.8 174.401C-9.8 174.401 -11.545 188.364 -10.705 198.376C-10.705 198.376 26.6 186.801 27.4 192.401C27.4 192.401 29 189.201 38.2 189.201C47.4 189.201 70.142 188.029 71.742 185.229z",stroke:"none",fill:"#cc3f4c"},{type:"path",path:"M28.6 175.201C28.6 175.201 33.4 180.001 29.8 189.601C29.8 189.601 15.4 205.601 17.4 219.601","stroke-width":"2",stroke:"#a51926",fill:"#000"},{type:"path",path:"M-19.4 260.001C-19.4 260.001 -23.8 247.201 -15 254.001C-15 254.001 -10.2 256.001 -11.4 257.601C-12.6 259.201 -18.2 263.201 -19.4 260.001z","stroke-width":"0.5",stroke:"#000",fill:"#ffffcc"},{type:"path",path:"M-14.36 261.201C-14.36 261.201 -17.88 250.961 -10.84 256.401C-10.84 256.401 -6.419 258.849 -7.96 259.281C-12.52 260.561 -7.96 263.121 -14.36 261.201z","stroke-width":"0.5",stroke:"#000",fill:"#ffffcc"},{type:"path",path:"M-9.56 261.201C-9.56 261.201 -13.08 250.961 -6.04 256.401C-6.04 256.401 -1.665 258.711 -3.16 259.281C-6.52 260.561 -3.16 263.121 -9.56 261.201z","stroke-width":"0.5",stroke:"#000",fill:"#ffffcc"},{type:"path",path:"M-2.96 261.401C-2.96 261.401 -6.48 251.161 0.56 256.601C0.56 256.601 4.943 258.933 3.441 259.481C0.48 260.561 3.441 263.321 -2.96 261.401z","stroke-width":"0.5",stroke:"#000",fill:"#ffffcc"},{type:"path",path:"M3.52 261.321C3.52 261.321 0 251.081 7.041 256.521C7.041 256.521 10.881 258.121 9.921 259.401C8.961 260.681 9.921 263.241 3.52 261.321z","stroke-width":"0.5",stroke:"#000",fill:"#ffffcc"},{type:"path",path:"M10.2 262.001C10.2 262.001 5.4 249.601 14.6 256.001C14.6 256.001 19.4 258.001 18.2 259.601C17 261.201 18.2 264.401 10.2 262.001z","stroke-width":"0.5",stroke:"#000",fill:"#ffffcc"},{type:"path",path:"M-18.2 244.801C-18.2 244.801 -5 242.001 1 245.201C1 245.201 7 246.401 8.2 246.001C9.4 245.601 12.6 245.201 12.6 245.201","stroke-width":"2",stroke:"#a5264c",fill:"#000"},{type:"path",path:"M15.8 253.601C15.8 253.601 27.8 240.001 39.8 244.401C46.816 246.974 45.8 243.601 46.6 240.801C47.4 238.001 47.6 233.801 52.6 230.801","stroke-width":"2",stroke:"#a5264c",fill:"#000"},{type:"path",path:"M33 237.601C33 237.601 29 226.801 26.2 239.601C23.4 252.401 20.2 256.001 18.6 258.801C18.6 258.801 18.6 264.001 27 263.601C27 263.601 37.8 263.201 38.2 260.401C38.6 257.601 37 246.001 33 237.601z","stroke-width":"0.5",stroke:"#000",fill:"#ffffcc"},{type:"path",path:"M47 244.801C47 244.801 50.6 242.401 53 243.601","stroke-width":"2",stroke:"#a5264c",fill:"#000"},{type:"path",path:"M53.5 228.401C53.5 228.401 56.4 223.501 61.2 222.701","stroke-width":"2",stroke:"#a5264c",fill:"#000"},{type:"path",path:"M-25.8 265.201C-25.8 265.201 -7.8 268.401 -3.4 266.801C-3.4 266.801 5.4 266.801 -3 268.801C-3 268.801 -15.8 268.801 -23.8 267.601C-23.8 267.601 -35.4 262.001 -25.8 265.201z",stroke:"none",fill:"#b2b2b2"},{type:"path",path:"M-11.8 172.001C-11.8 172.001 5.8 172.001 7.8 172.801C7.8 172.801 15 203.601 11.4 211.201C11.4 211.201 10.2 214.001 7.4 208.401C7.4 208.401 -11 175.601 -14.2 173.601C-17.4 171.601 -13 172.001 -11.8 172.001z","stroke-width":"0.5",stroke:"#000",fill:"#ffffcc"},{type:"path",path:"M-88.9 169.301C-88.9 169.301 -80 171.001 -67.4 173.601C-67.4 173.601 -62.6 196.001 -59.4 200.801C-56.2 205.601 -59.8 205.601 -63.4 202.801C-67 200.001 -81.8 186.001 -83.8 181.601C-85.8 177.201 -88.9 169.301 -88.9 169.301z","stroke-width":"0.5",stroke:"#000",fill:"#ffffcc"},{type:"path",path:"M-67.039 173.818C-67.039 173.818 -61.239 175.366 -60.23 177.581C-59.222 179.795 -61.432 183.092 -61.432 183.092C-61.432 183.092 -62.432 186.397 -63.634 184.235C-64.836 182.072 -67.708 174.412 -67.039 173.818z","stroke-width":"0.5",stroke:"#000",fill:"#ffffcc"},{type:"path",path:"M-67 173.601C-67 173.601 -63.4 178.801 -59.8 178.801C-56.2 178.801 -55.818 178.388 -53 179.001C-48.4 180.001 -48.8 178.001 -42.2 179.201C-39.56 179.681 -37 178.801 -34.2 180.001C-31.4 181.201 -28.2 180.401 -27 178.401C-25.8 176.401 -21 172.201 -21 172.201C-21 172.201 -33.8 174.001 -36.6 174.801C-36.6 174.801 -59 176.001 -67 173.601z",stroke:"none",fill:"#000"},{type:"path",path:"M-22.4 173.801C-22.4 173.801 -28.85 177.301 -29.25 179.701C-29.65 182.101 -24 185.801 -24 185.801C-24 185.801 -21.25 190.401 -20.65 188.001C-20.05 185.601 -21.6 174.201 -22.4 173.801z","stroke-width":"0.5",stroke:"#000",fill:"#ffffcc"},{type:"path",path:"M-59.885 179.265C-59.885 179.265 -52.878 190.453 -52.661 179.242C-52.661 179.242 -52.104 177.984 -53.864 177.962C-59.939 177.886 -58.418 173.784 -59.885 179.265z","stroke-width":"0.5",stroke:"#000",fill:"#ffffcc"},{type:"path",path:"M-52.707 179.514C-52.707 179.514 -44.786 190.701 -45.422 179.421C-45.422 179.421 -45.415 179.089 -47.168 178.936C-51.915 178.522 -51.57 174.004 -52.707 179.514z","stroke-width":"0.5",stroke:"#000",fill:"#ffffcc"},{type:"path",path:"M-45.494 179.522C-45.494 179.522 -37.534 190.15 -38.203 180.484C-38.203 180.484 -38.084 179.251 -39.738 178.95C-43.63 178.244 -43.841 174.995 -45.494 179.522z","stroke-width":"0.5",stroke:"#000",fill:"#ffffcc"},{type:"path",path:"M-38.618 179.602C-38.618 179.602 -30.718 191.163 -30.37 181.382C-30.37 181.382 -28.726 180.004 -30.472 179.782C-36.29 179.042 -35.492 174.588 -38.618 179.602z","stroke-width":"0.5",stroke:"#000",fill:"#ffffcc"},{type:"path",path:"M-74.792 183.132L-82.45 181.601C-85.05 176.601 -87.15 170.451 -87.15 170.451C-87.15 170.451 -80.8 171.451 -68.3 174.251C-68.3 174.251 -67.424 177.569 -65.952 183.364L-74.792 183.132z",stroke:"none",fill:"#e5e5b2"},{type:"path",path:"M-9.724 178.47C-11.39 175.964 -12.707 174.206 -13.357 173.8C-16.37 171.917 -12.227 172.294 -11.098 172.294C-11.098 172.294 5.473 172.294 7.356 173.047C7.356 173.047 7.88 175.289 8.564 178.68C8.564 178.68 -1.524 176.67 -9.724 178.47z",stroke:"none",fill:"#e5e5b2"},{type:"path",path:"M43.88 40.321C71.601 44.281 97.121 8.641 98.881 -1.04C100.641 -10.72 90.521 -22.6 90.521 -22.6C91.841 -25.68 87.001 -39.76 81.721 -49C76.441 -58.24 60.54 -57.266 43 -58.24C27.16 -59.12 8.68 -35.8 7.36 -34.04C6.04 -32.28 12.2 6.001 13.52 11.721C14.84 17.441 12.2 43.841 12.2 43.841C46.44 34.741 16.16 36.361 43.88 40.321z",stroke:"none",fill:"#cc7226"},{type:"path",path:"M8.088 -33.392C6.792 -31.664 12.84 5.921 14.136 11.537C15.432 17.153 12.84 43.073 12.84 43.073C45.512 34.193 16.728 35.729 43.944 39.617C71.161 43.505 96.217 8.513 97.945 -0.992C99.673 -10.496 89.737 -22.16 89.737 -22.16C91.033 -25.184 86.281 -39.008 81.097 -48.08C75.913 -57.152 60.302 -56.195 43.08 -57.152C27.528 -58.016 9.384 -35.12 8.088 -33.392z",stroke:"none",fill:"#ea8e51"},{type:"path",path:"M8.816 -32.744C7.544 -31.048 13.48 5.841 14.752 11.353C16.024 16.865 13.48 42.305 13.48 42.305C44.884 33.145 17.296 35.097 44.008 38.913C70.721 42.729 95.313 8.385 97.009 -0.944C98.705 -10.272 88.953 -21.72 88.953 -21.72C90.225 -24.688 85.561 -38.256 80.473 -47.16C75.385 -56.064 60.063 -55.125 43.16 -56.064C27.896 -56.912 10.088 -34.44 8.816 -32.744z",stroke:"none",fill:"#efaa7c"},{type:"path",path:"M9.544 -32.096C8.296 -30.432 14.12 5.761 15.368 11.169C16.616 16.577 14.12 41.537 14.12 41.537C43.556 32.497 17.864 34.465 44.072 38.209C70.281 41.953 94.409 8.257 96.073 -0.895C97.737 -10.048 88.169 -21.28 88.169 -21.28C89.417 -24.192 84.841 -37.504 79.849 -46.24C74.857 -54.976 59.824 -54.055 43.24 -54.976C28.264 -55.808 10.792 -33.76 9.544 -32.096z",stroke:"none",fill:"#f4c6a8"},{type:"path",path:"M10.272 -31.448C9.048 -29.816 14.76 5.681 15.984 10.985C17.208 16.289 14.76 40.769 14.76 40.769C42.628 31.849 18.432 33.833 44.136 37.505C69.841 41.177 93.505 8.129 95.137 -0.848C96.769 -9.824 87.385 -20.84 87.385 -20.84C88.609 -23.696 84.121 -36.752 79.225 -45.32C74.329 -53.888 59.585 -52.985 43.32 -53.888C28.632 -54.704 11.496 -33.08 10.272 -31.448z",stroke:"none",fill:"#f9e2d3"},{type:"path",path:"M44.2 36.8C69.4 40.4 92.601 8 94.201 -0.8C95.801 -9.6 86.601 -20.4 86.601 -20.4C87.801 -23.2 83.4 -36 78.6 -44.4C73.8 -52.8 59.346 -51.914 43.4 -52.8C29 -53.6 12.2 -32.4 11 -30.8C9.8 -29.2 15.4 5.6 16.6 10.8C17.8 16 15.4 40 15.4 40C40.9 31.4 19 33.2 44.2 36.8z",stroke:"none",fill:"#fff"},{type:"path",path:"M90.601 2.8C90.601 2.8 62.8 10.4 51.2 8.8C51.2 8.8 35.4 2.2 26.6 24C26.6 24 23 31.2 21 33.2C19 35.2 90.601 2.8 90.601 2.8z",stroke:"none",fill:"#ccc"},{type:"path",path:"M94.401 0.6C94.401 0.6 65.4 12.8 55.4 12.4C55.4 12.4 39 7.8 30.6 22.4C30.6 22.4 22.2 31.6 19 33.2C19 33.2 18.6 34.8 25 30.8L35.4 36C35.4 36 50.2 45.6 59.8 29.6C59.8 29.6 63.8 18.4 63.8 16.4C63.8 14.4 85 8.8 86.601 8.4C88.201 8 94.801 3.8 94.401 0.6z",stroke:"none",fill:"#000"},{type:"path",path:"M47 36.514C40.128 36.514 31.755 32.649 31.755 26.4C31.755 20.152 40.128 13.887 47 13.887C53.874 13.887 59.446 18.952 59.446 25.2C59.446 31.449 53.874 36.514 47 36.514z",stroke:"none",fill:"#99cc32"},{type:"path",path:"M43.377 19.83C38.531 20.552 33.442 22.055 33.514 21.839C35.054 17.22 41.415 13.887 47 13.887C51.296 13.887 55.084 15.865 57.32 18.875C57.32 18.875 52.004 18.545 43.377 19.83z",stroke:"none",fill:"#659900"},{type:"path",path:"M55.4 19.6C55.4 19.6 51 16.4 51 18.6C51 18.6 54.6 23 55.4 19.6z",stroke:"none",fill:"#fff"},{type:"path",path:"M45.4 27.726C42.901 27.726 40.875 25.7 40.875 23.2C40.875 20.701 42.901 18.675 45.4 18.675C47.9 18.675 49.926 20.701 49.926 23.2C49.926 25.7 47.9 27.726 45.4 27.726z",stroke:"none",fill:"#000"},{type:"path",path:"M-58.6 14.4C-58.6 14.4 -61.8 -6.8 -59.4 -11.2C-59.4 -11.2 -48.6 -21.2 -49 -24.8C-49 -24.8 -49.4 -42.8 -50.6 -43.6C-51.8 -44.4 -59.4 -50.4 -65.4 -44C-65.4 -44 -75.8 -26 -75 -19.6L-75 -17.6C-75 -17.6 -82.6 -18 -84.2 -16C-84.2 -16 -85.4 -10.8 -86.6 -10.4C-86.6 -10.4 -89.4 -8 -87.4 -5.2C-87.4 -5.2 -89.4 -2.8 -89 1.2L-81.4 5.2C-81.4 5.2 -79.4 19.6 -68.6 24.8C-63.764 27.129 -60.6 20.4 -58.6 14.4z",stroke:"none",fill:"#cc7226"},{type:"path",path:"M-59.6 12.56C-59.6 12.56 -62.48 -6.52 -60.32 -10.48C-60.32 -10.48 -50.6 -19.48 -50.96 -22.72C-50.96 -22.72 -51.32 -38.92 -52.4 -39.64C-53.48 -40.36 -60.32 -45.76 -65.72 -40C-65.72 -40 -75.08 -23.8 -74.36 -18.04L-74.36 -16.24C-74.36 -16.24 -81.2 -16.6 -82.64 -14.8C-82.64 -14.8 -83.72 -10.12 -84.8 -9.76C-84.8 -9.76 -87.32 -7.6 -85.52 -5.08C-85.52 -5.08 -87.32 -2.92 -86.96 0.68L-80.12 4.28C-80.12 4.28 -78.32 17.24 -68.6 21.92C-64.248 24.015 -61.4 17.96 -59.6 12.56z",stroke:"none",fill:"#fff"},{type:"path",path:"M-51.05 -42.61C-52.14 -43.47 -59.63 -49.24 -65.48 -43C-65.48 -43 -75.62 -25.45 -74.84 -19.21L-74.84 -17.26C-74.84 -17.26 -82.25 -17.65 -83.81 -15.7C-83.81 -15.7 -84.98 -10.63 -86.15 -10.24C-86.15 -10.24 -88.88 -7.9 -86.93 -5.17C-86.93 -5.17 -88.88 -2.83 -88.49 1.07L-81.08 4.97C-81.08 4.97 -79.13 19.01 -68.6 24.08C-63.886 26.35 -60.8 19.79 -58.85 13.94C-58.85 13.94 -61.97 -6.73 -59.63 -11.02C-59.63 -11.02 -49.1 -20.77 -49.49 -24.28C-49.49 -24.28 -49.88 -41.83 -51.05 -42.61z",stroke:"none",fill:"#eb955c"},{type:"path",path:"M-51.5 -41.62C-52.48 -42.54 -59.86 -48.08 -65.56 -42C-65.56 -42 -75.44 -24.9 -74.68 -18.82L-74.68 -16.92C-74.68 -16.92 -81.9 -17.3 -83.42 -15.4C-83.42 -15.4 -84.56 -10.46 -85.7 -10.08C-85.7 -10.08 -88.36 -7.8 -86.46 -5.14C-86.46 -5.14 -88.36 -2.86 -87.98 0.94L-80.76 4.74C-80.76 4.74 -78.86 18.42 -68.6 23.36C-64.006 25.572 -61 19.18 -59.1 13.48C-59.1 13.48 -62.14 -6.66 -59.86 -10.84C-59.86 -10.84 -49.6 -20.34 -49.98 -23.76C-49.98 -23.76 -50.36 -40.86 -51.5 -41.62z",stroke:"none",fill:"#f2b892"},{type:"path",path:"M-51.95 -40.63C-52.82 -41.61 -60.09 -46.92 -65.64 -41C-65.64 -41 -75.26 -24.35 -74.52 -18.43L-74.52 -16.58C-74.52 -16.58 -81.55 -16.95 -83.03 -15.1C-83.03 -15.1 -84.14 -10.29 -85.25 -9.92C-85.25 -9.92 -87.84 -7.7 -85.99 -5.11C-85.99 -5.11 -87.84 -2.89 -87.47 0.81L-80.44 4.51C-80.44 4.51 -78.59 17.83 -68.6 22.64C-64.127 24.794 -61.2 18.57 -59.35 13.02C-59.35 13.02 -62.31 -6.59 -60.09 -10.66C-60.09 -10.66 -50.1 -19.91 -50.47 -23.24C-50.47 -23.24 -50.84 -39.89 -51.95 -40.63z",stroke:"none",fill:"#f8dcc8"},{type:"path",path:"M-59.6 12.46C-59.6 12.46 -62.48 -6.52 -60.32 -10.48C-60.32 -10.48 -50.6 -19.48 -50.96 -22.72C-50.96 -22.72 -51.32 -38.92 -52.4 -39.64C-53.16 -40.68 -60.32 -45.76 -65.72 -40C-65.72 -40 -75.08 -23.8 -74.36 -18.04L-74.36 -16.24C-74.36 -16.24 -81.2 -16.6 -82.64 -14.8C-82.64 -14.8 -83.72 -10.12 -84.8 -9.76C-84.8 -9.76 -87.32 -7.6 -85.52 -5.08C-85.52 -5.08 -87.32 -2.92 -86.96 0.68L-80.12 4.28C-80.12 4.28 -78.32 17.24 -68.6 21.92C-64.248 24.015 -61.4 17.86 -59.6 12.46z",stroke:"none",fill:"#fff"},{type:"path",path:"M-62.7 6.2C-62.7 6.2 -84.3 -4 -85.2 -4.8C-85.2 -4.8 -76.1 3.4 -75.3 3.4C-74.5 3.4 -62.7 6.2 -62.7 6.2z",stroke:"none",fill:"#ccc"},{type:"path",path:"M-79.8 0C-79.8 0 -61.4 3.6 -61.4 8C-61.4 10.912 -61.643 24.331 -67 22.8C-75.4 20.4 -71.8 6 -79.8 0z",stroke:"none",fill:"#000"},{type:"path",path:"M-71.4 3.8C-71.4 3.8 -62.422 5.274 -61.4 8C-60.8 9.6 -60.137 17.908 -65.6 19C-70.152 19.911 -72.382 9.69 -71.4 3.8z",stroke:"none",fill:"#99cc32"},{type:"path",path:"M14.595 46.349C14.098 44.607 15.409 44.738 17.2 44.2C19.2 43.6 31.4 39.8 32.2 37.2C33 34.6 46.2 39 46.2 39C48 39.8 52.4 42.4 52.4 42.4C57.2 43.6 63.8 44 63.8 44C66.2 45 69.6 47.8 69.6 47.8C84.2 58 96.601 50.8 96.601 50.8C116.601 44.2 110.601 27 110.601 27C107.601 18 110.801 14.6 110.801 14.6C111.001 10.8 118.201 17.2 118.201 17.2C120.801 21.4 121.601 26.4 121.601 26.4C129.601 37.6 126.201 19.8 126.201 19.8C126.401 18.8 123.601 15.2 123.601 14C123.601 12.8 121.801 9.4 121.801 9.4C118.801 6 121.201 -1 121.201 -1C123.001 -14.8 120.801 -13 120.801 -13C119.601 -14.8 110.401 -4.8 110.401 -4.8C108.201 -1.4 102.201 0.2 102.201 0.2C99.401 2 96.001 0.6 96.001 0.6C93.401 0.2 87.801 7.2 87.801 7.2C90.601 7 93.001 11.4 95.401 11.6C97.801 11.8 99.601 9.2 101.201 8.6C102.801 8 105.601 13.8 105.601 13.8C106.001 16.4 100.401 21.2 100.401 21.2C100.001 25.8 98.401 24.2 98.401 24.2C95.401 23.6 94.201 27.4 93.201 32C92.201 36.6 88.001 37 88.001 37C86.401 44.4 85.2 41.4 85.2 41.4C85 35.8 79 41.6 79 41.6C77.8 43.6 73.2 41.4 73.2 41.4C66.4 39.4 68.8 37.4 68.8 37.4C70.6 35.2 81.8 37.4 81.8 37.4C84 35.8 76 31.8 76 31.8C75.4 30 76.4 25.6 76.4 25.6C77.6 22.4 84.4 16.8 84.4 16.8C93.801 15.6 91.001 14 91.001 14C84.801 8.8 79 16.4 79 16.4C76.8 22.6 59.4 37.6 59.4 37.6C54.6 41 57.2 34.2 53.2 37.6C49.2 41 28.6 32 28.6 32C17.038 30.807 14.306 46.549 10.777 43.429C10.777 43.429 16.195 51.949 14.595 46.349z",stroke:"none",fill:"#000"},{type:"path",path:"M209.401 -120C209.401 -120 183.801 -112 181.001 -93.2C181.001 -93.2 178.601 -70.4 199.001 -52.8C199.001 -52.8 199.401 -46.4 201.401 -43.2C201.401 -43.2 199.801 -38.4 218.601 -46L245.801 -54.4C245.801 -54.4 252.201 -56.8 257.401 -65.6C262.601 -74.4 277.801 -93.2 274.201 -118.4C274.201 -118.4 275.401 -129.6 269.401 -130C269.401 -130 261.001 -131.6 253.801 -124C253.801 -124 247.001 -120.8 244.601 -121.2L209.401 -120z",stroke:"none",fill:"#000"},{type:"path",path:"M264.022 -120.99C264.022 -120.99 266.122 -129.92 261.282 -125.08C261.282 -125.08 254.242 -119.36 246.761 -119.36C246.761 -119.36 232.241 -117.16 227.841 -103.96C227.841 -103.96 223.881 -77.12 231.801 -71.4C231.801 -71.4 236.641 -63.92 243.681 -70.52C250.722 -77.12 266.222 -107.35 264.022 -120.99z",stroke:"none",fill:"#000"},{type:"path",path:"M263.648 -120.632C263.648 -120.632 265.738 -129.376 260.986 -124.624C260.986 -124.624 254.074 -119.008 246.729 -119.008C246.729 -119.008 232.473 -116.848 228.153 -103.888C228.153 -103.888 224.265 -77.536 232.041 -71.92C232.041 -71.92 236.793 -64.576 243.705 -71.056C250.618 -77.536 265.808 -107.24 263.648 -120.632z",stroke:"none",fill:"#323232"},{type:"path",path:"M263.274 -120.274C263.274 -120.274 265.354 -128.832 260.69 -124.168C260.69 -124.168 253.906 -118.656 246.697 -118.656C246.697 -118.656 232.705 -116.536 228.465 -103.816C228.465 -103.816 224.649 -77.952 232.281 -72.44C232.281 -72.44 236.945 -65.232 243.729 -71.592C250.514 -77.952 265.394 -107.13 263.274 -120.274z",stroke:"none",fill:"#666666"},{type:"path",path:"M262.9 -119.916C262.9 -119.916 264.97 -128.288 260.394 -123.712C260.394 -123.712 253.738 -118.304 246.665 -118.304C246.665 -118.304 232.937 -116.224 228.777 -103.744C228.777 -103.744 225.033 -78.368 232.521 -72.96C232.521 -72.96 237.097 -65.888 243.753 -72.128C250.41 -78.368 264.98 -107.02 262.9 -119.916z",stroke:"none",fill:"#999999"},{type:"path",path:"M262.526 -119.558C262.526 -119.558 264.586 -127.744 260.098 -123.256C260.098 -123.256 253.569 -117.952 246.633 -117.952C246.633 -117.952 233.169 -115.912 229.089 -103.672C229.089 -103.672 225.417 -78.784 232.761 -73.48C232.761 -73.48 237.249 -66.544 243.777 -72.664C250.305 -78.784 264.566 -106.91 262.526 -119.558z",stroke:"none",fill:"#ccc"},{type:"path",path:"M262.151 -119.2C262.151 -119.2 264.201 -127.2 259.801 -122.8C259.801 -122.8 253.401 -117.6 246.601 -117.6C246.601 -117.6 233.401 -115.6 229.401 -103.6C229.401 -103.6 225.801 -79.2 233.001 -74C233.001 -74 237.401 -67.2 243.801 -73.2C250.201 -79.2 264.151 -106.8 262.151 -119.2z",stroke:"none",fill:"#fff"},{type:"path",path:"M50.6 84C50.6 84 30.2 64.8 22.2 64C22.2 64 -12.2 60 -27 78C-27 78 -9.4 57.6 18.2 63.2C18.2 63.2 -3.4 58.8 -15.8 62C-15.8 62 -32.6 62 -42.2 76L-45 80.8C-45 80.8 -41 66 -22.6 60C-22.6 60 0.2 55.2 11 60C11 60 -10.6 53.2 -20.6 55.2C-20.6 55.2 -51 52.8 -63.8 79.2C-63.8 79.2 -59.8 64.8 -45 57.6C-45 57.6 -31.4 48.8 -11 51.6C-11 51.6 3.4 54.8 8.6 57.2C13.8 59.6 12.6 56.8 4.2 52C4.2 52 -1.4 42 -15.4 42.4C-15.4 42.4 -58.2 46 -68.6 58C-68.6 58 -55 46.8 -44.6 44C-44.6 44 -22.2 36 -13.8 36.8C-13.8 36.8 11 37.8 18.6 33.8C18.6 33.8 7.4 38.8 10.6 42C13.8 45.2 20.6 52.8 20.6 54C20.6 55.2 44.8 77.3 48.4 81.7L50.6 84z",stroke:"none",fill:"#992600"},{type:"path",path:"M189 278C189 278 173.5 241.5 161 232C161 232 187 248 190.5 266C190.5 266 190.5 276 189 278z",stroke:"none",fill:"#ccc"},{type:"path",path:"M236 285.5C236 285.5 209.5 230.5 191 206.5C191 206.5 234.5 244 239.5 270.5L240 276L237 273.5C237 273.5 236.5 282.5 236 285.5z",stroke:"none",fill:"#ccc"},{type:"path",path:"M292.5 237C292.5 237 230 177.5 228.5 175C228.5 175 289 241 292 248.5C292 248.5 290 239.5 292.5 237z",stroke:"none",fill:"#ccc"},{type:"path",path:"M104 280.5C104 280.5 123.5 228.5 142.5 251C142.5 251 157.5 261 157 264C157 264 153 257.5 135 258C135 258 116 255 104 280.5z",stroke:"none",fill:"#ccc"},{type:"path",path:"M294.5 153C294.5 153 249.5 124.5 242 123C230.193 120.639 291.5 152 296.5 162.5C296.5 162.5 298.5 160 294.5 153z",stroke:"none",fill:"#ccc"},{type:"path",path:"M143.801 259.601C143.801 259.601 164.201 257.601 171.001 250.801L175.401 254.401L193.001 216.001L196.601 221.201C196.601 221.201 211.001 206.401 210.201 198.401C209.401 190.401 223.001 204.401 223.001 204.401C223.001 204.401 222.201 192.801 229.401 199.601C229.401 199.601 227.001 184.001 235.401 192.001C235.401 192.001 224.864 161.844 247.401 187.601C253.001 194.001 248.601 187.201 248.601 187.201C248.601 187.201 222.601 139.201 244.201 153.601C244.201 153.601 246.201 130.801 245.001 126.401C243.801 122.001 241.801 99.6 237.001 94.4C232.201 89.2 237.401 87.6 243.001 92.8C243.001 92.8 231.801 68.8 245.001 80.8C245.001 80.8 241.401 65.6 237.001 62.8C237.001 62.8 231.401 45.6 246.601 56.4C246.601 56.4 242.201 44 239.001 40.8C239.001 40.8 227.401 13.2 234.601 18L239.001 21.6C239.001 21.6 232.201 7.6 238.601 12C245.001 16.4 245.001 16 245.001 16C245.001 16 223.801 -17.2 244.201 0.4C244.201 0.4 236.042 -13.518 232.601 -20.4C232.601 -20.4 213.801 -40.8 228.201 -34.4L233.001 -32.8C233.001 -32.8 224.201 -42.8 216.201 -44.4C208.201 -46 218.601 -52.4 225.001 -50.4C231.401 -48.4 247.001 -40.8 247.001 -40.8C247.001 -40.8 259.801 -22 263.801 -21.6C263.801 -21.6 243.801 -29.2 249.801 -21.2C249.801 -21.2 264.201 -7.2 257.001 -7.6C257.001 -7.6 251.001 -0.4 255.801 8.4C255.801 8.4 237.342 -9.991 252.201 15.6L259.001 32C259.001 32 234.601 7.2 245.801 29.2C245.801 29.2 263.001 52.8 265.001 53.2C267.001 53.6 271.401 62.4 271.401 62.4L267.001 60.4L272.201 69.2C272.201 69.2 261.001 57.2 267.001 70.4L272.601 84.8C272.601 84.8 252.201 62.8 265.801 92.4C265.801 92.4 249.401 87.2 258.201 104.4C258.201 104.4 256.601 120.401 257.001 125.601C257.401 130.801 258.601 159.201 254.201 167.201C249.801 175.201 260.201 194.401 262.201 198.401C264.201 202.401 267.801 213.201 259.001 204.001C250.201 194.801 254.601 200.401 256.601 209.201C258.601 218.001 264.601 233.601 263.801 239.201C263.801 239.201 262.601 240.401 259.401 236.801C259.401 236.801 244.601 214.001 246.201 228.401C246.201 228.401 245.001 236.401 241.801 245.201C241.801 245.201 238.601 256.001 238.601 247.201C238.601 247.201 235.401 230.401 232.601 238.001C229.801 245.601 226.201 251.601 223.401 254.001C220.601 256.401 215.401 233.601 214.201 244.001C214.201 244.001 202.201 231.601 197.401 248.001L185.801 264.401C185.801 264.401 185.401 252.001 184.201 258.001C184.201 258.001 154.201 264.001 143.801 259.601z",stroke:"none",fill:"#000"},{type:"path",path:"M109.401 -97.2C109.401 -97.2 97.801 -105.2 93.801 -104.8C89.801 -104.4 121.401 -113.6 162.601 -86C162.601 -86 167.401 -83.2 171.001 -83.6C171.001 -83.6 174.201 -81.2 171.401 -77.6C171.401 -77.6 162.601 -68 173.801 -56.8C173.801 -56.8 192.201 -50 186.601 -58.8C186.601 -58.8 197.401 -54.8 199.801 -50.8C202.201 -46.8 201.001 -50.8 201.001 -50.8C201.001 -50.8 194.601 -58 188.601 -63.2C188.601 -63.2 183.401 -65.2 180.601 -73.6C177.801 -82 175.401 -92 179.801 -95.2C179.801 -95.2 175.801 -90.8 176.601 -94.8C177.401 -98.8 181.001 -102.4 182.601 -102.8C184.201 -103.2 200.601 -119 207.401 -119.4C207.401 -119.4 198.201 -118 195.201 -119C192.201 -120 165.601 -131.4 159.601 -132.6C159.601 -132.6 142.801 -139.2 154.801 -137.2C154.801 -137.2 190.601 -133.4 208.801 -120.2C208.801 -120.2 201.601 -128.6 183.201 -135.6C183.201 -135.6 161.001 -148.2 125.801 -143.2C125.801 -143.2 108.001 -140 100.201 -138.2C100.201 -138.2 97.601 -138.8 97.001 -139.2C96.401 -139.6 84.6 -148.6 57 -141.6C57 -141.6 40 -137 31.4 -132.2C31.4 -132.2 16.2 -131 12.6 -127.8C12.6 -127.8 -6 -113.2 -8 -112.4C-10 -111.6 -21.4 -104 -22.2 -103.6C-22.2 -103.6 2.4 -110.2 4.8 -112.6C7.2 -115 24.6 -117.6 27 -116.2C29.4 -114.8 37.8 -115.4 28.2 -114.8C28.2 -114.8 103.801 -100 104.601 -98C105.401 -96 109.401 -97.2 109.401 -97.2z",stroke:"none",fill:"#000"},{type:"path",path:"M180.801 -106.4C180.801 -106.4 170.601 -113.8 168.601 -113.8C166.601 -113.8 154.201 -124 150.001 -123.6C145.801 -123.2 133.601 -133.2 106.201 -125C106.201 -125 105.601 -127 109.201 -127.8C109.201 -127.8 115.601 -130 116.001 -130.6C116.001 -130.6 136.201 -134.8 143.401 -131.2C143.401 -131.2 152.601 -128.6 158.801 -122.4C158.801 -122.4 170.001 -119.2 173.201 -120.2C173.201 -120.2 182.001 -118 182.401 -116.2C182.401 -116.2 188.201 -113.2 186.401 -110.6C186.401 -110.6 186.801 -109 180.801 -106.4z",stroke:"none",fill:"#cc7226"},{type:"path",path:"M168.33 -108.509C169.137 -107.877 170.156 -107.779 170.761 -106.97C170.995 -106.656 170.706 -106.33 170.391 -106.233C169.348 -105.916 168.292 -106.486 167.15 -105.898C166.748 -105.691 166.106 -105.873 165.553 -106.022C163.921 -106.463 162.092 -106.488 160.401 -105.8C158.416 -106.929 156.056 -106.345 153.975 -107.346C153.917 -107.373 153.695 -107.027 153.621 -107.054C150.575 -108.199 146.832 -107.916 144.401 -110.2C141.973 -110.612 139.616 -111.074 137.188 -111.754C135.37 -112.263 133.961 -113.252 132.341 -114.084C130.964 -114.792 129.507 -115.314 127.973 -115.686C126.11 -116.138 124.279 -116.026 122.386 -116.546C122.293 -116.571 122.101 -116.227 122.019 -116.254C121.695 -116.362 121.405 -116.945 121.234 -116.892C119.553 -116.37 118.065 -117.342 116.401 -117C115.223 -118.224 113.495 -117.979 111.949 -118.421C108.985 -119.269 105.831 -117.999 102.801 -119C106.914 -120.842 111.601 -119.61 115.663 -121.679C117.991 -122.865 120.653 -121.763 123.223 -122.523C123.71 -122.667 124.401 -122.869 124.801 -122.2C124.935 -122.335 125.117 -122.574 125.175 -122.546C127.625 -121.389 129.94 -120.115 132.422 -119.049C132.763 -118.903 133.295 -119.135 133.547 -118.933C135.067 -117.717 137.01 -117.82 138.401 -116.6C140.099 -117.102 141.892 -116.722 143.621 -117.346C143.698 -117.373 143.932 -117.032 143.965 -117.054C145.095 -117.802 146.25 -117.531 147.142 -117.227C147.48 -117.112 148.143 -116.865 148.448 -116.791C149.574 -116.515 150.43 -116.035 151.609 -115.852C151.723 -115.834 151.908 -116.174 151.98 -116.146C153.103 -115.708 154.145 -115.764 154.801 -114.6C154.936 -114.735 155.101 -114.973 155.183 -114.946C156.21 -114.608 156.859 -113.853 157.96 -113.612C158.445 -113.506 159.057 -112.88 159.633 -112.704C162.025 -111.973 163.868 -110.444 166.062 -109.549C166.821 -109.239 167.697 -109.005 168.33 -108.509z",stroke:"none",fill:"#cc7226"},{type:"path",path:"M91.696 -122.739C89.178 -124.464 86.81 -125.57 84.368 -127.356C84.187 -127.489 83.827 -127.319 83.625 -127.441C82.618 -128.05 81.73 -128.631 80.748 -129.327C80.209 -129.709 79.388 -129.698 78.88 -129.956C76.336 -131.248 73.707 -131.806 71.2 -133C71.882 -133.638 73.004 -133.394 73.6 -134.2C73.795 -133.92 74.033 -133.636 74.386 -133.827C76.064 -134.731 77.914 -134.884 79.59 -134.794C81.294 -134.702 83.014 -134.397 84.789 -134.125C85.096 -134.078 85.295 -133.555 85.618 -133.458C87.846 -132.795 90.235 -133.32 92.354 -132.482C93.945 -131.853 95.515 -131.03 96.754 -129.755C97.006 -129.495 96.681 -129.194 96.401 -129C96.789 -129.109 97.062 -128.903 97.173 -128.59C97.257 -128.351 97.257 -128.049 97.173 -127.81C97.061 -127.498 96.782 -127.397 96.408 -127.346C95.001 -127.156 96.773 -128.536 96.073 -128.088C94.8 -127.274 95.546 -125.868 94.801 -124.6C94.521 -124.794 94.291 -125.012 94.401 -125.4C94.635 -124.878 94.033 -124.588 93.865 -124.272C93.48 -123.547 92.581 -122.132 91.696 -122.739z",stroke:"none",fill:"#cc7226"},{type:"path",path:"M59.198 -115.391C56.044 -116.185 52.994 -116.07 49.978 -117.346C49.911 -117.374 49.688 -117.027 49.624 -117.054C48.258 -117.648 47.34 -118.614 46.264 -119.66C45.351 -120.548 43.693 -120.161 42.419 -120.648C42.095 -120.772 41.892 -121.284 41.591 -121.323C40.372 -121.48 39.445 -122.429 38.4 -123C40.736 -123.795 43.147 -123.764 45.609 -124.148C45.722 -124.166 45.867 -123.845 46 -123.845C46.136 -123.845 46.266 -124.066 46.4 -124.2C46.595 -123.92 46.897 -123.594 47.154 -123.848C47.702 -124.388 48.258 -124.198 48.798 -124.158C48.942 -124.148 49.067 -123.845 49.2 -123.845C49.336 -123.845 49.467 -124.156 49.6 -124.156C49.736 -124.155 49.867 -123.845 50 -123.845C50.136 -123.845 50.266 -124.066 50.4 -124.2C51.092 -123.418 51.977 -123.972 52.799 -123.793C53.837 -123.566 54.104 -122.418 55.178 -122.12C59.893 -120.816 64.03 -118.671 68.393 -116.584C68.7 -116.437 68.91 -116.189 68.8 -115.8C69.067 -115.8 69.38 -115.888 69.57 -115.756C70.628 -115.024 71.669 -114.476 72.366 -113.378C72.582 -113.039 72.253 -112.632 72.02 -112.684C67.591 -113.679 63.585 -114.287 59.198 -115.391z",stroke:"none",fill:"#cc7226"},{type:"path",path:"M45.338 -71.179C43.746 -72.398 43.162 -74.429 42.034 -76.221C41.82 -76.561 42.094 -76.875 42.411 -76.964C42.971 -77.123 43.514 -76.645 43.923 -76.443C45.668 -75.581 47.203 -74.339 49.2 -74.2C51.19 -71.966 55.45 -71.581 55.457 -68.2C55.458 -67.341 54.03 -68.259 53.6 -67.4C51.149 -68.403 48.76 -68.3 46.38 -69.767C45.763 -70.148 46.093 -70.601 45.338 -71.179z",stroke:"none",fill:"#cc7226"},{type:"path",path:"M17.8 -123.756C17.935 -123.755 24.966 -123.522 24.949 -123.408C24.904 -123.099 17.174 -122.05 16.81 -122.22C16.646 -122.296 9.134 -119.866 9 -120C9.268 -120.135 17.534 -123.756 17.8 -123.756z",stroke:"none",fill:"#cc7226"},{type:"path",path:"M33.2 -114C33.2 -114 18.4 -112.2 14 -111C9.6 -109.8 -9 -102.2 -12 -100.2C-12 -100.2 -25.4 -94.8 -42.4 -74.8C-42.4 -74.8 -34.8 -78.2 -32.6 -81C-32.6 -81 -19 -93.6 -19.2 -91C-19.2 -91 -7 -99.6 -7.6 -97.4C-7.6 -97.4 16.8 -108.6 14.8 -105.4C14.8 -105.4 36.4 -110 35.4 -108C35.4 -108 54.2 -103.6 51.4 -103.4C51.4 -103.4 45.6 -102.2 52 -98.6C52 -98.6 48.6 -94.2 43.2 -98.2C37.8 -102.2 40.8 -100 35.8 -99C35.8 -99 33.2 -98.2 28.6 -102.2C28.6 -102.2 23 -106.8 14.2 -103.2C14.2 -103.2 -16.4 -90.6 -18.4 -90C-18.4 -90 -22 -87.2 -24.4 -83.6C-24.4 -83.6 -30.2 -79.2 -33.2 -77.8C-33.2 -77.8 -46 -66.2 -47.2 -64.8C-47.2 -64.8 -50.6 -59.6 -51.4 -59.2C-51.4 -59.2 -45 -63 -43 -65C-43 -65 -29 -75 -23.6 -75.8C-23.6 -75.8 -19.2 -78.8 -18.4 -80.2C-18.4 -80.2 -4 -89.4 0.2 -89.4C0.2 -89.4 9.4 -84.2 11.8 -91.2C11.8 -91.2 17.6 -93 23.2 -91.8C23.2 -91.8 26.4 -94.4 25.6 -96.6C25.6 -96.6 27.2 -98.4 28.2 -94.6C28.2 -94.6 31.6 -91 36.4 -93C36.4 -93 40.4 -93.2 38.4 -90.8C38.4 -90.8 34 -87 22.2 -86.8C22.2 -86.8 9.8 -86.2 -6.6 -78.6C-6.6 -78.6 -36.4 -68.2 -45.6 -57.8C-45.6 -57.8 -52 -49 -57.4 -47.8C-57.4 -47.8 -63.2 -47 -69.2 -39.6C-69.2 -39.6 -59.4 -45.4 -50.4 -45.4C-50.4 -45.4 -46.4 -47.8 -50.2 -44.2C-50.2 -44.2 -53.8 -36.6 -52.2 -31.2C-52.2 -31.2 -52.8 -26 -53.6 -24.4C-53.6 -24.4 -61.4 -11.6 -61.4 -9.2C-61.4 -6.8 -60.2 3 -59.8 3.6C-59.4 4.2 -60.8 2 -57 4.4C-53.2 6.8 -50.4 8.4 -49.6 11.2C-48.8 14 -51.6 5.8 -51.8 4C-52 2.2 -56.2 -5 -55.4 -7.4C-55.4 -7.4 -54.4 -6.4 -53.6 -5C-53.6 -5 -54.2 -5.6 -53.6 -9.2C-53.6 -9.2 -52.8 -14.4 -51.4 -17.6C-50 -20.8 -48 -24.6 -47.6 -25.4C-47.2 -26.2 -47.2 -32 -45.8 -29.4L-42.4 -26.8C-42.4 -26.8 -45.2 -29.4 -43 -31.6C-43 -31.6 -44 -37.2 -42.2 -39.8C-42.2 -39.8 -35.2 -48.2 -33.6 -49.2C-32 -50.2 -33.4 -49.8 -33.4 -49.8C-33.4 -49.8 -27.4 -54 -33.2 -52.4C-33.2 -52.4 -37.2 -50.8 -40.2 -50.8C-40.2 -50.8 -47.8 -48.8 -43.8 -53C-39.8 -57.2 -29.8 -62.6 -26 -62.4L-25.2 -60.8L-14 -63.2L-15.2 -62.4C-15.2 -62.4 -15.4 -62.6 -11.2 -63C-7 -63.4 -1.2 -62 0.2 -63.8C1.6 -65.6 5 -66.6 4.6 -65.2C4.2 -63.8 4 -61.8 4 -61.8C4 -61.8 9 -67.6 8.4 -65.4C7.8 -63.2 -0.4 -58 -1.8 -51.8L8.6 -60L12.2 -63C12.2 -63 15.8 -60.8 16 -62.4C16.2 -64 20.8 -69.8 22 -69.6C23.2 -69.4 25.2 -72.2 25 -69.6C24.8 -67 32.4 -61.6 32.4 -61.6C32.4 -61.6 35.6 -63.4 37 -62C38.4 -60.6 42.6 -81.8 42.6 -81.8L67.6 -92.4L111.201 -95.8L94.201 -102.6L33.2 -114z",stroke:"none",fill:"#000"},{type:"path",path:"M51.4 85C51.4 85 36.4 68.2 28 65.6C28 65.6 14.6 58.8 -10 66.6","stroke-width":"2",stroke:"#4c0000",fill:"#000"},{type:"path",path:"M24.8 64.2C24.8 64.2 -0.4 56.2 -15.8 60.4C-15.8 60.4 -34.2 62.4 -42.6 76.2","stroke-width":"2",stroke:"#4c0000",fill:"#000"},{type:"path",path:"M21.2 63C21.2 63 4.2 55.8 -10.6 53.6C-10.6 53.6 -27.2 51 -43.8 58.2C-43.8 58.2 -56 64.2 -61.4 74.4","stroke-width":"2",stroke:"#4c0000",fill:"#000"},{type:"path",path:"M22.2 63.4C22.2 63.4 6.8 52.4 5.8 51C5.8 51 -1.2 40 -14.2 39.6C-14.2 39.6 -35.6 40.4 -52.8 48.4","stroke-width":"2",stroke:"#4c0000",fill:"#000"},{type:"path",path:"M20.895 54.407C22.437 55.87 49.4 84.8 49.4 84.8C84.6 121.401 56.6 87.2 56.6 87.2C49 82.4 39.8 63.6 39.8 63.6C38.6 60.8 53.8 70.8 53.8 70.8C57.8 71.6 71.4 90.8 71.4 90.8C64.6 88.4 69.4 95.6 69.4 95.6C72.2 97.6 92.601 113.201 92.601 113.201C96.201 117.201 100.201 118.801 100.201 118.801C114.201 113.601 107.801 126.801 107.801 126.801C110.201 133.601 115.801 122.001 115.801 122.001C127.001 105.2 110.601 107.601 110.601 107.601C80.6 110.401 73.8 94.4 73.8 94.4C71.4 92 80.2 94.4 80.2 94.4C88.601 96.4 73 82 73 82C75.4 82 84.6 88.8 84.6 88.8C95.001 98 97.001 96 97.001 96C115.001 87.2 125.401 94.8 125.401 94.8C127.401 96.4 121.801 103.2 123.401 108.401C125.001 113.601 129.801 126.001 129.801 126.001C127.401 127.601 127.801 138.401 127.801 138.401C144.601 161.601 135.001 159.601 135.001 159.601C119.401 159.201 134.201 166.801 134.201 166.801C137.401 168.801 146.201 176.001 146.201 176.001C143.401 174.801 141.801 180.001 141.801 180.001C146.601 184.001 143.801 188.801 143.801 188.801C137.801 190.001 136.601 194.001 136.601 194.001C143.401 202.001 133.401 202.401 133.401 202.401C137.001 206.801 132.201 218.801 132.201 218.801C127.401 218.801 121.001 224.401 121.001 224.401C123.401 229.201 113.001 234.801 113.001 234.801C104.601 236.401 107.401 243.201 107.401 243.201C99.401 249.201 97.001 265.201 97.001 265.201C96.201 275.601 93.801 278.801 99.001 276.801C104.201 274.801 103.401 262.401 103.401 262.401C98.601 246.801 141.401 230.801 141.401 230.801C145.401 229.201 146.201 224.001 146.201 224.001C148.201 224.401 157.001 232.001 157.001 232.001C164.601 243.201 165.001 234.001 165.001 234.001C166.201 230.401 164.601 224.401 164.601 224.401C170.601 202.801 156.601 196.401 156.601 196.401C146.601 162.801 160.601 171.201 160.601 171.201C163.401 176.801 174.201 182.001 174.201 182.001L177.801 179.601C176.201 174.801 184.601 168.801 184.601 168.801C187.401 175.201 193.401 167.201 193.401 167.201C197.001 142.801 209.401 157.201 209.401 157.201C213.401 158.401 214.601 151.601 214.601 151.601C218.201 141.201 214.601 127.601 214.601 127.601C218.201 127.201 227.801 133.201 227.801 133.201C230.601 129.601 221.401 112.801 225.401 115.201C229.401 117.601 233.801 119.201 233.801 119.201C234.601 117.201 224.601 104.801 224.601 104.801C220.201 102 215.001 81.6 215.001 81.6C222.201 85.2 212.201 70 212.201 70C212.201 66.8 218.201 55.6 218.201 55.6C217.401 48.8 218.201 49.2 218.201 49.2C221.001 50.4 229.001 52 222.201 45.6C215.401 39.2 223.001 34.4 223.001 34.4C227.401 31.6 213.801 32 213.801 32C208.601 27.6 209.001 23.6 209.001 23.6C217.001 25.6 202.601 11.2 200.201 7.6C197.801 4 207.401 -1.2 207.401 -1.2C220.601 -4.8 209.001 -8 209.001 -8C189.401 -7.6 200.201 -18.4 200.201 -18.4C206.201 -18 204.601 -20.4 204.601 -20.4C199.401 -21.6 189.801 -28 189.801 -28C185.801 -31.6 189.401 -30.8 189.401 -30.8C206.201 -29.6 177.401 -40.8 177.401 -40.8C185.401 -40.8 167.401 -51.2 167.401 -51.2C165.401 -52.8 162.201 -60.4 162.201 -60.4C156.201 -65.6 151.401 -72.4 151.401 -72.4C151.001 -76.8 146.201 -81.6 146.201 -81.6C134.601 -95.2 129.001 -94.8 129.001 -94.8C114.201 -98.4 109.001 -97.6 109.001 -97.6L56.2 -93.2C29.8 -80.4 37.6 -59.4 37.6 -59.4C44 -51 53.2 -54.8 53.2 -54.8C57.8 -61 69.4 -58.8 69.4 -58.8C89.801 -55.6 87.201 -59.2 87.201 -59.2C84.801 -63.8 68.6 -70 68.4 -70.6C68.2 -71.2 59.4 -74.6 59.4 -74.6C56.4 -75.8 52 -85 52 -85C48.8 -88.4 64.6 -82.6 64.6 -82.6C63.4 -81.6 70.8 -77.6 70.8 -77.6C88.201 -78.6 98.801 -67.8 98.801 -67.8C109.601 -51.2 109.801 -59.4 109.801 -59.4C112.601 -68.8 100.801 -90 100.801 -90C101.201 -92 109.401 -85.4 109.401 -85.4C110.801 -87.4 111.601 -81.6 111.601 -81.6C111.801 -79.2 115.601 -71.2 115.601 -71.2C118.401 -58.2 122.001 -65.6 122.001 -65.6L126.601 -56.2C128.001 -53.6 122.001 -46 122.001 -46C121.801 -43.2 122.601 -43.4 117.001 -35.8C111.401 -28.2 114.801 -23.8 114.801 -23.8C113.401 -17.2 122.201 -17.6 122.201 -17.6C124.801 -15.4 128.201 -15.4 128.201 -15.4C130.001 -13.4 132.401 -14 132.401 -14C134.001 -17.8 140.201 -15.8 140.201 -15.8C141.601 -18.2 149.801 -18.6 149.801 -18.6C150.801 -21.2 151.201 -22.8 154.601 -23.4C158.001 -24 133.401 -67 133.401 -67C139.801 -67.8 131.601 -80.2 131.601 -80.2C129.401 -86.8 140.801 -72.2 143.001 -70.8C145.201 -69.4 146.201 -67.2 144.601 -67.4C143.001 -67.6 141.201 -65.4 142.601 -65.2C144.001 -65 157.001 -50 160.401 -39.8C163.801 -29.6 169.801 -25.6 176.001 -19.6C182.201 -13.6 181.401 10.6 181.401 10.6C181.001 19.4 187.001 30 187.001 30C189.001 33.8 184.801 52 184.801 52C182.801 54.2 184.201 55 184.201 55C185.201 56.2 192.001 69.4 192.001 69.4C190.201 69.2 193.801 72.8 193.801 72.8C199.001 78.8 192.601 75.8 192.601 75.8C186.601 74.2 193.601 84 193.601 84C194.801 85.8 185.801 81.2 185.801 81.2C176.601 80.6 188.201 87.8 188.201 87.8C196.801 95 185.401 90.6 185.401 90.6C180.801 88.8 184.001 95.6 184.001 95.6C187.201 97.2 204.401 104.2 204.401 104.2C204.801 108.001 201.801 113.001 201.801 113.001C202.201 117.001 200.001 120.401 200.001 120.401C198.801 128.601 198.201 129.401 198.201 129.401C194.001 129.601 186.601 143.401 186.601 143.401C184.801 146.001 174.601 158.001 174.601 158.001C172.601 165.001 154.601 157.801 154.601 157.801C148.001 161.201 150.001 157.801 150.001 157.801C149.601 155.601 154.401 149.601 154.401 149.601C161.401 147.001 158.801 136.201 158.801 136.201C162.801 134.801 151.601 132.001 151.801 130.801C152.001 129.601 157.801 128.201 157.801 128.201C165.801 126.201 161.401 123.801 161.401 123.801C160.801 119.801 163.801 114.201 163.801 114.201C175.401 113.401 163.801 97.2 163.801 97.2C153.001 89.6 152.001 83.8 152.001 83.8C164.601 75.6 156.401 63.2 156.601 59.6C156.801 56 158.001 34.4 158.001 34.4C156.001 28.2 153.001 14.6 153.001 14.6C155.201 9.4 162.601 -3.2 162.601 -3.2C165.401 -7.4 174.201 -12.2 172.001 -15.2C169.801 -18.2 162.001 -16.4 162.001 -16.4C154.201 -17.8 154.801 -12.6 154.801 -12.6C153.201 -11.6 152.401 -6.6 152.401 -6.6C151.68 1.333 142.801 7.6 142.801 7.6C131.601 13.8 140.801 17.8 140.801 17.8C146.801 24.4 137.001 24.6 137.001 24.6C126.001 22.8 134.201 33 134.201 33C145.001 45.8 142.001 48.6 142.001 48.6C131.801 49.6 144.401 58.8 144.401 58.8C144.401 58.8 143.601 56.8 143.801 58.6C144.001 60.4 147.001 64.6 147.801 66.6C148.601 68.6 144.601 68.8 144.601 68.8C145.201 78.4 129.801 74.2 129.801 74.2C129.801 74.2 129.801 74.2 128.201 74.4C126.601 74.6 115.401 73.8 109.601 71.6C103.801 69.4 97.001 69.4 97.001 69.4C97.001 69.4 93.001 71.2 85.4 71C77.8 70.8 69.8 73.6 69.8 73.6C65.4 73.2 74 68.8 74.2 69C74.4 69.2 80 63.6 72 64.2C50.203 65.835 39.4 55.6 39.4 55.6C37.4 54.2 34.8 51.4 34.8 51.4C24.8 49.4 36.2 63.8 36.2 63.8C37.4 65.2 36 66.2 36 66.2C35.2 64.6 27.4 59.2 27.4 59.2C24.589 58.227 23.226 56.893 20.895 54.407z",stroke:"none",fill:"#000"},{type:"path",path:"M-3 42.8C-3 42.8 8.6 48.4 11.2 51.2C13.8 54 27.8 65.4 27.8 65.4C27.8 65.4 22.4 63.4 19.8 61.6C17.2 59.8 6.4 51.6 6.4 51.6C6.4 51.6 2.6 45.6 -3 42.8z",stroke:"none",fill:"#4c0000"},{type:"path",path:"M-61.009 11.603C-60.672 11.455 -61.196 8.743 -61.4 8.2C-62.422 5.474 -71.4 4 -71.4 4C-71.627 5.365 -71.682 6.961 -71.576 8.599C-71.576 8.599 -66.708 14.118 -61.009 11.603z",stroke:"none",fill:"#99cc32"},{type:"path",path:"M-61.009 11.403C-61.458 11.561 -61.024 8.669 -61.2 8.2C-62.222 5.474 -71.4 3.9 -71.4 3.9C-71.627 5.265 -71.682 6.861 -71.576 8.499C-71.576 8.499 -67.308 13.618 -61.009 11.403z",stroke:"none",fill:"#659900"},{type:"path",path:"M-65.4 11.546C-66.025 11.546 -66.531 10.406 -66.531 9C-66.531 7.595 -66.025 6.455 -65.4 6.455C-64.775 6.455 -64.268 7.595 -64.268 9C-64.268 10.406 -64.775 11.546 -65.4 11.546z",stroke:"none",fill:"#000"},{type:"path",path:"M-65.4 9z",stroke:"none",fill:"#000"},{type:"path",path:"M-111 109.601C-111 109.601 -116.6 119.601 -91.8 113.601C-91.8 113.601 -77.8 112.401 -75.4 110.001C-74.2 110.801 -65.834 113.734 -63 114.401C-56.2 116.001 -47.8 106 -47.8 106C-47.8 106 -43.2 95.5 -40.4 95.5C-37.6 95.5 -40.8 97.1 -40.8 97.1C-40.8 97.1 -47.4 107.201 -47 108.801C-47 108.801 -52.2 128.801 -68.2 129.601C-68.2 129.601 -84.35 130.551 -83 136.401C-83 136.401 -74.2 134.001 -71.8 136.401C-71.8 136.401 -61 136.001 -69 142.401L-75.8 154.001C-75.8 154.001 -75.66 157.919 -85.8 154.401C-95.6 151.001 -105.9 138.101 -105.9 138.101C-105.9 138.101 -121.85 123.551 -111 109.601z",stroke:"none",fill:"#000"},{type:"path",path:"M-112.2 113.601C-112.2 113.601 -114.2 123.201 -77.4 112.801C-77.4 112.801 -73 112.801 -70.6 113.601C-68.2 114.401 -56.2 117.201 -54.2 116.001C-54.2 116.001 -61.4 129.601 -73 128.001C-73 128.001 -86.2 129.601 -85.8 134.401C-85.8 134.401 -81.8 141.601 -77 144.001C-77 144.001 -74.2 146.401 -74.6 149.601C-75 152.801 -77.8 154.401 -79.8 155.201C-81.8 156.001 -85 152.801 -86.6 152.801C-88.2 152.801 -96.6 146.401 -101 141.601C-105.4 136.801 -113.8 124.801 -113.4 122.001C-113 119.201 -112.2 113.601 -112.2 113.601z",stroke:"none",fill:"#e59999"},{type:"path",path:"M-109 131.051C-106.4 135.001 -103.2 139.201 -101 141.601C-96.6 146.401 -88.2 152.801 -86.6 152.801C-85 152.801 -81.8 156.001 -79.8 155.201C-77.8 154.401 -75 152.801 -74.6 149.601C-74.2 146.401 -77 144.001 -77 144.001C-80.066 142.468 -82.806 138.976 -84.385 136.653C-84.385 136.653 -84.2 139.201 -89.4 138.401C-94.6 137.601 -99.8 134.801 -101.4 131.601C-103 128.401 -105.4 126.001 -103.8 129.601C-102.2 133.201 -99.8 136.801 -98.2 137.201C-96.6 137.601 -97 138.801 -99.4 138.401C-101.8 138.001 -104.6 137.601 -109 132.401z",stroke:"none",fill:"#b26565"},{type:"path",path:"M-111.6 110.001C-111.6 110.001 -109.8 96.4 -108.6 92.4C-108.6 92.4 -109.4 85.6 -107 81.4C-104.6 77.2 -102.6 71 -99.6 65.6C-96.6 60.2 -96.4 56.2 -92.4 54.6C-88.4 53 -82.4 44.4 -79.6 43.4C-76.8 42.4 -77 43.2 -77 43.2C-77 43.2 -70.2 28.4 -56.6 32.4C-56.6 32.4 -72.8 29.6 -57 20.2C-57 20.2 -61.8 21.3 -58.5 14.3C-56.299 9.632 -56.8 16.4 -67.8 28.2C-67.8 28.2 -72.8 36.8 -78 39.8C-83.2 42.8 -95.2 49.8 -96.4 53.6C-97.6 57.4 -100.8 63.2 -102.8 64.8C-104.8 66.4 -107.6 70.6 -108 74C-108 74 -109.2 78 -110.6 79.2C-112 80.4 -112.2 83.6 -112.2 85.6C-112.2 87.6 -114.2 90.4 -114 92.8C-114 92.8 -113.2 111.801 -113.6 113.801L-111.6 110.001z",stroke:"none",fill:"#992600"},{type:"path",path:"M-120.2 114.601C-120.2 114.601 -122.2 113.201 -126.6 119.201C-126.6 119.201 -119.3 152.201 -119.3 153.601C-119.3 153.601 -118.2 151.501 -119.5 144.301C-120.8 137.101 -121.7 124.401 -121.7 124.401L-120.2 114.601z",stroke:"none",fill:"#fff"},{type:"path",path:"M-98.6 54C-98.6 54 -116.2 57.2 -115.8 86.4L-116.6 111.201C-116.6 111.201 -117.8 85.6 -119 84C-120.2 82.4 -116.2 71.2 -119.4 77.2C-119.4 77.2 -133.4 91.2 -125.4 112.401C-125.4 112.401 -123.9 115.701 -126.9 111.101C-126.9 111.101 -131.5 98.5 -130.4 92.1C-130.4 92.1 -130.2 89.9 -128.3 87.1C-128.3 87.1 -119.7 75.4 -117 73.1C-117 73.1 -115.2 58.7 -99.8 53.5C-99.8 53.5 -94.1 51.2 -98.6 54z",stroke:"none",fill:"#992600"},{type:"path",path:"M40.8 -12.2C41.46 -12.554 41.451 -13.524 42.031 -13.697C43.18 -14.041 43.344 -15.108 43.862 -15.892C44.735 -17.211 44.928 -18.744 45.51 -20.235C45.782 -20.935 45.809 -21.89 45.496 -22.55C44.322 -25.031 43.62 -27.48 42.178 -29.906C41.91 -30.356 41.648 -31.15 41.447 -31.748C40.984 -33.132 39.727 -34.123 38.867 -35.443C38.579 -35.884 39.104 -36.809 38.388 -36.893C37.491 -36.998 36.042 -37.578 35.809 -36.552C35.221 -33.965 36.232 -31.442 37.2 -29C36.418 -28.308 36.752 -27.387 36.904 -26.62C37.614 -23.014 36.416 -19.662 35.655 -16.188C35.632 -16.084 35.974 -15.886 35.946 -15.824C34.724 -13.138 33.272 -10.693 31.453 -8.312C30.695 -7.32 29.823 -6.404 29.326 -5.341C28.958 -4.554 28.55 -3.588 28.8 -2.6C25.365 0.18 23.115 4.025 20.504 7.871C20.042 8.551 20.333 9.76 20.884 10.029C21.697 10.427 22.653 9.403 23.123 8.557C23.512 7.859 23.865 7.209 24.356 6.566C24.489 6.391 24.31 5.972 24.445 5.851C27.078 3.504 28.747 0.568 31.2 -1.8C33.15 -2.129 34.687 -3.127 36.435 -4.14C36.743 -4.319 37.267 -4.07 37.557 -4.265C39.31 -5.442 39.308 -7.478 39.414 -9.388C39.464 -10.272 39.66 -11.589 40.8 -12.2z",stroke:"none",fill:"#000"},{type:"path",path:"M31.959 -16.666C32.083 -16.743 31.928 -17.166 32.037 -17.382C32.199 -17.706 32.602 -17.894 32.764 -18.218C32.873 -18.434 32.71 -18.814 32.846 -18.956C35.179 -21.403 35.436 -24.427 34.4 -27.4C35.424 -28.02 35.485 -29.282 35.06 -30.129C34.207 -31.829 34.014 -33.755 33.039 -35.298C32.237 -36.567 30.659 -37.811 29.288 -36.508C28.867 -36.108 28.546 -35.321 28.824 -34.609C28.888 -34.446 29.173 -34.3 29.146 -34.218C29.039 -33.894 28.493 -33.67 28.487 -33.398C28.457 -31.902 27.503 -30.391 28.133 -29.062C28.905 -27.433 29.724 -25.576 30.4 -23.8C29.166 -21.684 30.199 -19.235 28.446 -17.358C28.31 -17.212 28.319 -16.826 28.441 -16.624C28.733 -16.138 29.139 -15.732 29.625 -15.44C29.827 -15.319 30.175 -15.317 30.375 -15.441C30.953 -15.803 31.351 -16.29 31.959 -16.666z",stroke:"none",fill:"#000"},{type:"path",path:"M94.771 -26.977C96.16 -25.185 96.45 -22.39 94.401 -21C94.951 -17.691 98.302 -19.67 100.401 -20.2C100.292 -20.588 100.519 -20.932 100.802 -20.937C101.859 -20.952 102.539 -21.984 103.601 -21.8C104.035 -23.357 105.673 -24.059 106.317 -25.439C108.043 -29.134 107.452 -33.407 104.868 -36.653C104.666 -36.907 104.883 -37.424 104.759 -37.786C104.003 -39.997 101.935 -40.312 100.001 -41C98.824 -44.875 98.163 -48.906 96.401 -52.6C94.787 -52.85 94.089 -54.589 92.752 -55.309C91.419 -56.028 90.851 -54.449 90.892 -53.403C90.899 -53.198 91.351 -52.974 91.181 -52.609C91.105 -52.445 90.845 -52.334 90.845 -52.2C90.846 -52.065 91.067 -51.934 91.201 -51.8C90.283 -50.98 88.86 -50.503 88.565 -49.358C87.611 -45.648 90.184 -42.523 91.852 -39.322C92.443 -38.187 91.707 -36.916 90.947 -35.708C90.509 -35.013 90.617 -33.886 90.893 -33.03C91.645 -30.699 93.236 -28.96 94.771 -26.977z",stroke:"none",fill:"#000"},{type:"path",path:"M57.611 -8.591C56.124 -6.74 52.712 -4.171 55.629 -2.243C55.823 -2.114 56.193 -2.11 56.366 -2.244C58.387 -3.809 60.39 -4.712 62.826 -5.294C62.95 -5.323 63.224 -4.856 63.593 -5.017C65.206 -5.72 67.216 -5.662 68.4 -7C72.167 -6.776 75.732 -7.892 79.123 -9.2C80.284 -9.648 81.554 -10.207 82.755 -10.709C84.131 -11.285 85.335 -12.213 86.447 -13.354C86.58 -13.49 86.934 -13.4 87.201 -13.4C87.161 -14.263 88.123 -14.39 88.37 -15.012C88.462 -15.244 88.312 -15.64 88.445 -15.742C90.583 -17.372 91.503 -19.39 90.334 -21.767C90.049 -22.345 89.8 -22.963 89.234 -23.439C88.149 -24.35 87.047 -23.496 86 -23.8C85.841 -23.172 85.112 -23.344 84.726 -23.146C83.867 -22.707 82.534 -23.292 81.675 -22.854C80.313 -22.159 79.072 -21.99 77.65 -21.613C77.338 -21.531 76.56 -21.627 76.4 -21C76.266 -21.134 76.118 -21.368 76.012 -21.346C74.104 -20.95 72.844 -20.736 71.543 -19.044C71.44 -18.911 70.998 -19.09 70.839 -18.955C69.882 -18.147 69.477 -16.913 68.376 -16.241C68.175 -16.118 67.823 -16.286 67.629 -16.157C66.983 -15.726 66.616 -15.085 65.974 -14.638C65.645 -14.409 65.245 -14.734 65.277 -14.99C65.522 -16.937 66.175 -18.724 65.6 -20.6C67.677 -23.12 70.194 -25.069 72 -27.8C72.015 -29.966 72.707 -32.112 72.594 -34.189C72.584 -34.382 72.296 -35.115 72.17 -35.462C71.858 -36.316 72.764 -37.382 71.92 -38.106C70.516 -39.309 69.224 -38.433 68.4 -37C66.562 -36.61 64.496 -35.917 62.918 -37.151C61.911 -37.938 61.333 -38.844 60.534 -39.9C59.549 -41.202 59.884 -42.638 59.954 -44.202C59.96 -44.33 59.645 -44.466 59.645 -44.6C59.646 -44.735 59.866 -44.866 60 -45C59.294 -45.626 59.019 -46.684 58 -47C58.305 -48.092 57.629 -48.976 56.758 -49.278C54.763 -49.969 53.086 -48.057 51.194 -47.984C50.68 -47.965 50.213 -49.003 49.564 -49.328C49.132 -49.544 48.428 -49.577 48.066 -49.311C47.378 -48.807 46.789 -48.693 46.031 -48.488C44.414 -48.052 43.136 -46.958 41.656 -46.103C40.171 -45.246 39.216 -43.809 38.136 -42.489C37.195 -41.337 37.059 -38.923 38.479 -38.423C40.322 -37.773 41.626 -40.476 43.592 -40.15C43.904 -40.099 44.11 -39.788 44 -39.4C44.389 -39.291 44.607 -39.52 44.8 -39.8C45.658 -38.781 46.822 -38.444 47.76 -37.571C48.73 -36.667 50.476 -37.085 51.491 -36.088C53.02 -34.586 52.461 -31.905 54.4 -30.6C53.814 -29.287 53.207 -28.01 52.872 -26.583C52.59 -25.377 53.584 -24.18 54.795 -24.271C56.053 -24.365 56.315 -25.124 56.8 -26.2C57.067 -25.933 57.536 -25.636 57.495 -25.42C57.038 -23.033 56.011 -21.04 55.553 -18.609C55.494 -18.292 55.189 -18.09 54.8 -18.2C54.332 -14.051 50.28 -11.657 47.735 -8.492C47.332 -7.99 47.328 -6.741 47.737 -6.338C49.14 -4.951 51.1 -6.497 52.8 -7C53.013 -8.206 53.872 -9.148 55.204 -9.092C55.46 -9.082 55.695 -9.624 56.019 -9.754C56.367 -9.892 56.869 -9.668 57.155 -9.866C58.884 -11.061 60.292 -12.167 62.03 -13.356C62.222 -13.487 62.566 -13.328 62.782 -13.436C63.107 -13.598 63.294 -13.985 63.617 -14.17C63.965 -14.37 64.207 -14.08 64.4 -13.8C63.754 -13.451 63.75 -12.494 63.168 -12.292C62.393 -12.024 61.832 -11.511 61.158 -11.064C60.866 -10.871 60.207 -11.119 60.103 -10.94C59.505 -9.912 58.321 -9.474 57.611 -8.591z",stroke:"none",fill:"#000"},{type:"path",path:"M2.2 -58C2.2 -58 -7.038 -60.872 -18.2 -35.2C-18.2 -35.2 -20.6 -30 -23 -28C-25.4 -26 -36.6 -22.4 -38.6 -18.4L-49 -2.4C-49 -2.4 -34.2 -18.4 -31 -20.8C-31 -20.8 -23 -29.2 -26.2 -22.4C-26.2 -22.4 -40.2 -11.6 -39 -2.4C-39 -2.4 -44.6 12 -45.4 14C-45.4 14 -29.4 -18 -27 -19.2C-24.6 -20.4 -23.4 -20.4 -24.6 -16.8C-25.8 -13.2 -26.2 3.2 -29 5.2C-29 5.2 -21 -15.2 -21.8 -18.4C-21.8 -18.4 -18.6 -22 -16.2 -16.8L-17.4 -0.8L-13 11.2C-13 11.2 -15.4 0 -13.8 -15.6C-13.8 -15.6 -15.8 -26 -11.8 -20.4C-7.8 -14.8 1.8 -8.8 1.8 -4C1.8 -4 -3.4 -21.6 -12.6 -26.4L-16.6 -20.4L-17.8 -22.4C-17.8 -22.4 -21.4 -23.2 -17 -30C-12.6 -36.8 -13 -37.6 -13 -37.6C-13 -37.6 -6.6 -30.4 -5 -30.4C-5 -30.4 8.2 -38 9.4 -13.6C9.4 -13.6 16.2 -28 7 -34.8C7 -34.8 -7.8 -36.8 -6.6 -42L0.6 -54.4C4.2 -59.6 2.6 -56.8 2.6 -56.8z",stroke:"none",fill:"#000"},{type:"path",path:"M-17.8 -41.6C-17.8 -41.6 -30.6 -41.6 -33.8 -36.4L-41 -26.8C-41 -26.8 -23.8 -36.8 -19.8 -38C-15.8 -39.2 -17.8 -41.6 -17.8 -41.6z",stroke:"none",fill:"#000"},{type:"path",path:"M-57.8 -35.2C-57.8 -35.2 -59.8 -34 -60.2 -31.2C-60.6 -28.4 -63 -28 -62.2 -25.2C-61.4 -22.4 -59.4 -20 -59.4 -24C-59.4 -28 -57.8 -30 -57 -31.2C-56.2 -32.4 -54.6 -36.8 -57.8 -35.2z",stroke:"none",fill:"#000"},{type:"path",path:"M-66.6 26C-66.6 26 -75 22 -78.2 18.4C-81.4 14.8 -80.948 19.966 -85.8 19.6C-91.647 19.159 -90.6 3.2 -90.6 3.2L-94.6 10.8C-94.6 10.8 -95.8 25.2 -87.8 22.8C-83.893 21.628 -82.6 23.2 -84.2 24C-85.8 24.8 -78.6 25.2 -81.4 26.8C-84.2 28.4 -69.8 23.2 -72.2 33.6L-66.6 26z",stroke:"none",fill:"#000"},{type:"path",path:"M-79.2 40.4C-79.2 40.4 -94.6 44.8 -98.2 35.2C-98.2 35.2 -103 37.6 -100.8 40.6C-98.6 43.6 -97.4 44 -97.4 44C-97.4 44 -92 45.2 -92.6 46C-93.2 46.8 -95.6 50.2 -95.6 50.2C-95.6 50.2 -85.4 44.2 -79.2 40.4z",stroke:"none",fill:"#000"},{type:"path",path:"M149.201 118.601C148.774 120.735 147.103 121.536 145.201 122.201C143.284 121.243 140.686 118.137 138.801 120.201C138.327 119.721 137.548 119.661 137.204 118.999C136.739 118.101 137.011 117.055 136.669 116.257C136.124 114.985 135.415 113.619 135.601 112.201C137.407 111.489 138.002 109.583 137.528 107.82C137.459 107.563 137.03 107.366 137.23 107.017C137.416 106.694 137.734 106.467 138.001 106.2C137.866 106.335 137.721 106.568 137.61 106.548C137 106.442 137.124 105.805 137.254 105.418C137.839 103.672 139.853 103.408 141.201 104.6C141.457 104.035 141.966 104.229 142.401 104.2C142.351 103.621 142.759 103.094 142.957 102.674C143.475 101.576 145.104 102.682 145.901 102.07C146.977 101.245 148.04 100.546 149.118 101.149C150.927 102.162 152.636 103.374 153.835 105.115C154.41 105.949 154.65 107.23 154.592 108.188C154.554 108.835 153.173 108.483 152.83 109.412C152.185 111.16 154.016 111.679 154.772 113.017C154.97 113.366 154.706 113.67 154.391 113.768C153.98 113.896 153.196 113.707 153.334 114.16C154.306 117.353 151.55 118.031 149.201 118.601z",stroke:"none",fill:"#fff"},{type:"path",path:"M139.6 138.201C139.593 136.463 137.992 134.707 139.201 133.001C139.336 133.135 139.467 133.356 139.601 133.356C139.736 133.356 139.867 133.135 140.001 133.001C141.496 135.217 145.148 136.145 145.006 138.991C144.984 139.438 143.897 140.356 144.801 141.001C142.988 142.349 142.933 144.719 142.001 146.601C140.763 146.315 139.551 145.952 138.401 145.401C138.753 143.915 138.636 142.231 139.456 140.911C139.89 140.213 139.603 139.134 139.6 138.201z",stroke:"none",fill:"#fff"},{type:"path",path:"M-26.6 129.201C-26.6 129.201 -43.458 139.337 -29.4 124.001C-20.6 114.401 -10.6 108.801 -10.6 108.801C-10.6 108.801 -0.2 104.4 3.4 103.2C7 102 22.2 96.8 25.4 96.4C28.6 96 38.2 92 45 96C51.8 100 59.8 104.4 59.8 104.4C59.8 104.4 43.4 96 39.8 98.4C36.2 100.8 29 100.4 23 103.6C23 103.6 8.2 108.001 5 110.001C1.8 112.001 -8.6 123.601 -10.2 122.801C-11.8 122.001 -9.8 121.601 -8.6 118.801C-7.4 116.001 -9.4 114.401 -17.4 120.801C-25.4 127.201 -26.6 129.201 -26.6 129.201z",stroke:"none",fill:"#ccc"},{type:"path",path:"M-19.195 123.234C-19.195 123.234 -17.785 110.194 -9.307 111.859C-9.307 111.859 -1.081 107.689 1.641 105.721C1.641 105.721 9.78 104.019 11.09 103.402C29.569 94.702 44.288 99.221 44.835 98.101C45.381 96.982 65.006 104.099 68.615 108.185C69.006 108.628 58.384 102.588 48.686 100.697C40.413 99.083 18.811 100.944 7.905 106.48C4.932 107.989 -4.013 113.773 -6.544 113.662C-9.075 113.55 -19.195 123.234 -19.195 123.234z",stroke:"none",fill:"#000"},{type:"path",path:"M-23 148.801C-23 148.801 -38.2 146.401 -21.4 144.801C-21.4 144.801 -3.4 142.801 0.6 137.601C0.6 137.601 14.2 128.401 17 128.001C19.8 127.601 49.8 120.401 50.2 118.001C50.6 115.601 56.2 115.601 57.8 116.401C59.4 117.201 58.6 118.401 55.8 119.201C53 120.001 21.8 136.401 15.4 137.601C9 138.801 -2.6 146.401 -7.4 147.601C-12.2 148.801 -23 148.801 -23 148.801z",stroke:"none",fill:"#ccc"},{type:"path",path:"M-3.48 141.403C-3.48 141.403 -12.062 140.574 -3.461 139.755C-3.461 139.755 5.355 136.331 7.403 133.668C7.403 133.668 14.367 128.957 15.8 128.753C17.234 128.548 31.194 124.861 31.399 123.633C31.604 122.404 65.67 109.823 70.09 113.013C73.001 115.114 63.1 113.437 53.466 117.847C52.111 118.467 18.258 133.054 14.981 133.668C11.704 134.283 5.765 138.174 3.307 138.788C0.85 139.403 -3.48 141.403 -3.48 141.403z",stroke:"none",fill:"#000"},{type:"path",path:"M-11.4 143.601C-11.4 143.601 -6.2 143.201 -7.4 144.801C-8.6 146.401 -11 145.601 -11 145.601L-11.4 143.601z",stroke:"none",fill:"#000"},{type:"path",path:"M-18.6 145.201C-18.6 145.201 -13.4 144.801 -14.6 146.401C-15.8 148.001 -18.2 147.201 -18.2 147.201L-18.6 145.201z",stroke:"none",fill:"#000"},{type:"path",path:"M-29 146.801C-29 146.801 -23.8 146.401 -25 148.001C-26.2 149.601 -28.6 148.801 -28.6 148.801L-29 146.801z",stroke:"none",fill:"#000"},{type:"path",path:"M-36.6 147.601C-36.6 147.601 -31.4 147.201 -32.6 148.801C-33.8 150.401 -36.2 149.601 -36.2 149.601L-36.6 147.601z",stroke:"none",fill:"#000"},{type:"path",path:"M1.8 108.001C1.8 108.001 6.2 108.001 5 109.601C3.8 111.201 0.6 110.801 0.6 110.801L1.8 108.001z",stroke:"none",fill:"#000"},{type:"path",path:"M-8.2 113.601C-8.2 113.601 -1.694 111.46 -4.2 114.801C-5.4 116.401 -7.8 115.601 -7.8 115.601L-8.2 113.601z",stroke:"none",fill:"#000"},{type:"path",path:"M-19.4 118.401C-19.4 118.401 -14.2 118.001 -15.4 119.601C-16.6 121.201 -19 120.401 -19 120.401L-19.4 118.401z",stroke:"none",fill:"#000"},{type:"path",path:"M-27 124.401C-27 124.401 -21.8 124.001 -23 125.601C-24.2 127.201 -26.6 126.401 -26.6 126.401L-27 124.401z",stroke:"none",fill:"#000"},{type:"path",path:"M-33.8 129.201C-33.8 129.201 -28.6 128.801 -29.8 130.401C-31 132.001 -33.4 131.201 -33.4 131.201L-33.8 129.201z",stroke:"none",fill:"#000"},{type:"path",path:"M5.282 135.598C5.282 135.598 12.203 135.066 10.606 137.195C9.009 139.325 5.814 138.26 5.814 138.26L5.282 135.598z",stroke:"none",fill:"#000"},{type:"path",path:"M15.682 130.798C15.682 130.798 22.603 130.266 21.006 132.395C19.409 134.525 16.214 133.46 16.214 133.46L15.682 130.798z",stroke:"none",fill:"#000"},{type:"path",path:"M26.482 126.398C26.482 126.398 33.403 125.866 31.806 127.995C30.209 130.125 27.014 129.06 27.014 129.06L26.482 126.398z",stroke:"none",fill:"#000"},{type:"path",path:"M36.882 121.598C36.882 121.598 43.803 121.066 42.206 123.195C40.609 125.325 37.414 124.26 37.414 124.26L36.882 121.598z",stroke:"none",fill:"#000"},{type:"path",path:"M9.282 103.598C9.282 103.598 16.203 103.066 14.606 105.195C13.009 107.325 9.014 107.06 9.014 107.06L9.282 103.598z",stroke:"none",fill:"#000"},{type:"path",path:"M19.282 100.398C19.282 100.398 26.203 99.866 24.606 101.995C23.009 104.125 18.614 103.86 18.614 103.86L19.282 100.398z",stroke:"none",fill:"#000"},{type:"path",path:"M-3.4 140.401C-3.4 140.401 1.8 140.001 0.6 141.601C-0.6 143.201 -3 142.401 -3 142.401L-3.4 140.401z",stroke:"none",fill:"#000"},{type:"path",path:"M-76.6 41.2C-76.6 41.2 -81 50 -81.4 53.2C-81.4 53.2 -80.6 44.4 -79.4 42.4C-78.2 40.4 -76.6 41.2 -76.6 41.2z",stroke:"none",fill:"#992600"},{type:"path",path:"M-95 55.2C-95 55.2 -98.2 69.6 -97.8 72.4C-97.8 72.4 -99 60.8 -98.6 59.6C-98.2 58.4 -95 55.2 -95 55.2z",stroke:"none",fill:"#992600"},{type:"path",path:"M-74.2 -19.4L-74.4 -16.2L-76.6 -16C-76.6 -16 -62.4 -3.4 -61.8 4.2C-61.8 4.2 -61 -4 -74.2 -19.4z",stroke:"none",fill:"#ccc"},{type:"path",path:"M-70.216 -18.135C-70.647 -18.551 -70.428 -19.296 -70.836 -19.556C-71.645 -20.072 -69.538 -20.129 -69.766 -20.845C-70.149 -22.051 -69.962 -22.072 -70.084 -23.348C-70.141 -23.946 -69.553 -25.486 -69.168 -25.926C-67.722 -27.578 -69.046 -30.51 -67.406 -32.061C-67.102 -32.35 -66.726 -32.902 -66.441 -33.32C-65.782 -34.283 -64.598 -34.771 -63.648 -35.599C-63.33 -35.875 -63.531 -36.702 -62.962 -36.61C-62.248 -36.495 -61.007 -36.625 -61.052 -35.784C-61.165 -33.664 -62.494 -31.944 -63.774 -30.276C-63.323 -29.572 -63.781 -28.937 -64.065 -28.38C-65.4 -25.76 -65.211 -22.919 -65.385 -20.079C-65.39 -19.994 -65.697 -19.916 -65.689 -19.863C-65.336 -17.528 -64.752 -15.329 -63.873 -13.1C-63.507 -12.17 -63.036 -11.275 -62.886 -10.348C-62.775 -9.662 -62.672 -8.829 -63.08 -8.124C-61.045 -5.234 -62.354 -2.583 -61.185 0.948C-60.978 1.573 -59.286 3.487 -59.749 3.326C-62.262 2.455 -62.374 2.057 -62.551 1.304C-62.697 0.681 -63.027 -0.696 -63.264 -1.298C-63.328 -1.462 -63.499 -3.346 -63.577 -3.468C-65.09 -5.85 -63.732 -5.674 -65.102 -8.032C-66.53 -8.712 -67.496 -9.816 -68.619 -10.978C-68.817 -11.182 -67.674 -11.906 -67.855 -12.119C-68.947 -13.408 -70.1 -14.175 -69.764 -15.668C-69.609 -16.358 -69.472 -17.415 -70.216 -18.135z",stroke:"none",fill:"#000"},{type:"path",path:"M-73.8 -16.4C-73.8 -16.4 -73.4 -9.6 -71 -8C-68.6 -6.4 -69.8 -7.2 -73 -8.4C-76.2 -9.6 -75 -10.4 -75 -10.4C-75 -10.4 -77.8 -10 -75.4 -8C-73 -6 -69.4 -3.6 -71 -3.6C-72.6 -3.6 -80.2 -7.6 -80.2 -10.4C-80.2 -13.2 -81.2 -17.3 -81.2 -17.3C-81.2 -17.3 -80.1 -18.1 -75.3 -18C-75.3 -18 -73.9 -17.3 -73.8 -16.4z",stroke:"none",fill:"#000"},{type:"path",path:"M-74.6 2.2C-74.6 2.2 -83.12 -0.591 -101.6 2.8C-101.6 2.8 -92.569 0.722 -73.8 3C-63.5 4.25 -74.6 2.2 -74.6 2.2z","stroke-width":"0.1",stroke:"#000",fill:"#fff"},{type:"path",path:"M-72.502 2.129C-72.502 2.129 -80.748 -1.389 -99.453 0.392C-99.453 0.392 -90.275 -0.897 -71.774 2.995C-61.62 5.131 -72.502 2.129 -72.502 2.129z","stroke-width":"0.1",stroke:"#000",fill:"#fff"},{type:"path",path:"M-70.714 2.222C-70.714 2.222 -78.676 -1.899 -97.461 -1.514C-97.461 -1.514 -88.213 -2.118 -70.052 3.14C-60.086 6.025 -70.714 2.222 -70.714 2.222z","stroke-width":"0.1",stroke:"#000",fill:"#fff"},{type:"path",path:"M-69.444 2.445C-69.444 2.445 -76.268 -1.862 -93.142 -2.96C-93.142 -2.96 -84.803 -2.79 -68.922 3.319C-60.206 6.672 -69.444 2.445 -69.444 2.445z","stroke-width":"0.1",stroke:"#000",fill:"#fff"},{type:"path",path:"M45.84 12.961C45.84 12.961 44.91 13.605 45.124 12.424C45.339 11.243 73.547 -1.927 77.161 -1.677C77.161 -1.677 46.913 11.529 45.84 12.961z","stroke-width":"0.1",stroke:"#000",fill:"#fff"},{type:"path",path:"M42.446 13.6C42.446 13.6 41.57 14.315 41.691 13.121C41.812 11.927 68.899 -3.418 72.521 -3.452C72.521 -3.452 43.404 12.089 42.446 13.6z","stroke-width":"0.1",stroke:"#000",fill:"#fff"},{type:"path",path:"M39.16 14.975C39.16 14.975 38.332 15.747 38.374 14.547C38.416 13.348 58.233 -2.149 68.045 -4.023C68.045 -4.023 50.015 4.104 39.16 14.975z","stroke-width":"0.1",stroke:"#000",fill:"#fff"},{type:"path",path:"M36.284 16.838C36.284 16.838 35.539 17.532 35.577 16.453C35.615 15.373 53.449 1.426 62.28 -0.26C62.28 -0.26 46.054 7.054 36.284 16.838z","stroke-width":"0.1",stroke:"#000",fill:"#fff"},{type:"path",path:"M4.6 164.801C4.6 164.801 -10.6 162.401 6.2 160.801C6.2 160.801 24.2 158.801 28.2 153.601C28.2 153.601 41.8 144.401 44.6 144.001C47.4 143.601 63.8 140.001 64.2 137.601C64.6 135.201 70.6 132.801 72.2 133.601C73.8 134.401 73.8 143.601 71 144.401C68.2 145.201 49.4 152.401 43 153.601C36.6 154.801 25 162.401 20.2 163.601C15.4 164.801 4.6 164.801 4.6 164.801z",stroke:"none",fill:"#ccc"},{type:"path",path:"M77.6 127.401C77.6 127.401 74.6 129.001 73.4 131.601C73.4 131.601 67 142.201 52.8 145.401C52.8 145.401 29.8 154.401 22 156.401C22 156.401 8.6 161.401 1.2 160.601C1.2 160.601 -5.8 160.801 0.4 162.401C0.4 162.401 20.6 160.401 24 158.601C24 158.601 39.6 153.401 42.6 150.801C45.6 148.201 63.8 143.201 66 141.201C68.2 139.201 78 130.801 77.6 127.401z",stroke:"none",fill:"#000"},{type:"path",path:"M18.882 158.911C18.882 158.911 24.111 158.685 22.958 160.234C21.805 161.784 19.357 160.91 19.357 160.91L18.882 158.911z",stroke:"none",fill:"#000"},{type:"path",path:"M11.68 160.263C11.68 160.263 16.908 160.037 15.756 161.586C14.603 163.136 12.155 162.263 12.155 162.263L11.68 160.263z",stroke:"none",fill:"#000"},{type:"path",path:"M1.251 161.511C1.251 161.511 6.48 161.284 5.327 162.834C4.174 164.383 1.726 163.51 1.726 163.51L1.251 161.511z",stroke:"none",fill:"#000"},{type:"path",path:"M-6.383 162.055C-6.383 162.055 -1.154 161.829 -2.307 163.378C-3.46 164.928 -5.908 164.054 -5.908 164.054L-6.383 162.055z",stroke:"none",fill:"#000"},{type:"path",path:"M35.415 151.513C35.415 151.513 42.375 151.212 40.84 153.274C39.306 155.336 36.047 154.174 36.047 154.174L35.415 151.513z",stroke:"none",fill:"#000"},{type:"path",path:"M45.73 147.088C45.73 147.088 51.689 143.787 51.155 148.849C50.885 151.405 46.362 149.749 46.362 149.749L45.73 147.088z",stroke:"none",fill:"#000"},{type:"path",path:"M54.862 144.274C54.862 144.274 62.021 140.573 60.287 146.035C59.509 148.485 55.493 146.935 55.493 146.935L54.862 144.274z",stroke:"none",fill:"#000"},{type:"path",path:"M64.376 139.449C64.376 139.449 68.735 134.548 69.801 141.21C70.207 143.748 65.008 142.11 65.008 142.11L64.376 139.449z",stroke:"none",fill:"#000"},{type:"path",path:"M26.834 155.997C26.834 155.997 32.062 155.77 30.91 157.32C29.757 158.869 27.308 157.996 27.308 157.996L26.834 155.997z",stroke:"none",fill:"#000"},{type:"path",path:"M62.434 34.603C62.434 34.603 61.708 35.268 61.707 34.197C61.707 33.127 79.191 19.863 88.034 18.479C88.034 18.479 71.935 25.208 62.434 34.603z","stroke-width":"0.1",stroke:"#000",fill:"#fff"},{type:"path",path:"M65.4 98.4C65.4 98.4 87.401 120.801 96.601 124.401C96.601 124.401 105.801 135.601 101.801 161.601C101.801 161.601 98.601 169.201 95.401 148.401C95.401 148.401 98.601 123.201 87.401 139.201C87.401 139.201 79 129.301 85.4 129.601C85.4 129.601 88.601 131.601 89.001 130.001C89.401 128.401 81.4 114.801 64.2 100.4C47 86 65.4 98.4 65.4 98.4z",stroke:"none",fill:"#000"},{type:"path",path:"M7 137.201C7 137.201 6.8 135.401 8.6 136.201C10.4 137.001 104.601 143.201 136.201 167.201C136.201 167.201 91.001 144.001 7 137.201z","stroke-width":"0.1",stroke:"#000",fill:"#fff"},{type:"path",path:"M17.4 132.801C17.4 132.801 17.2 131.001 19 131.801C20.8 132.601 157.401 131.601 181.001 164.001C181.001 164.001 159.001 138.801 17.4 132.801z","stroke-width":"0.1",stroke:"#000",fill:"#fff"},{type:"path",path:"M29 128.801C29 128.801 28.8 127.001 30.6 127.801C32.4 128.601 205.801 115.601 229.401 148.001C229.401 148.001 219.801 122.401 29 128.801z","stroke-width":"0.1",stroke:"#000",fill:"#fff"},{type:"path",path:"M39 124.001C39 124.001 38.8 122.201 40.6 123.001C42.4 123.801 164.601 85.2 188.201 117.601C188.201 117.601 174.801 93 39 124.001z","stroke-width":"0.1",stroke:"#000",fill:"#fff"},{type:"path",path:"M-19 146.801C-19 146.801 -19.2 145.001 -17.4 145.801C-15.6 146.601 2.2 148.801 4.2 187.601C4.2 187.601 -3 145.601 -19 146.801z","stroke-width":"0.1",stroke:"#000",fill:"#fff"},{type:"path",path:"M-27.8 148.401C-27.8 148.401 -28 146.601 -26.2 147.401C-24.4 148.201 -10.2 143.601 -13 182.401C-13 182.401 -11.8 147.201 -27.8 148.401z","stroke-width":"0.1",stroke:"#000",fill:"#fff"},{type:"path",path:"M-35.8 148.801C-35.8 148.801 -36 147.001 -34.2 147.801C-32.4 148.601 -17 149.201 -29.4 171.601C-29.4 171.601 -19.8 147.601 -35.8 148.801z","stroke-width":"0.1",stroke:"#000",fill:"#fff"},{type:"path",path:"M11.526 104.465C11.526 104.465 11.082 106.464 12.631 105.247C28.699 92.622 61.141 33.72 116.826 28.086C116.826 28.086 78.518 15.976 11.526 104.465z","stroke-width":"0.1",stroke:"#000",fill:"#fff"},{type:"path",path:"M22.726 102.665C22.726 102.665 21.363 101.472 23.231 100.847C25.099 100.222 137.541 27.72 176.826 35.686C176.826 35.686 149.719 28.176 22.726 102.665z","stroke-width":"0.1",stroke:"#000",fill:"#fff"},{type:"path",path:"M1.885 108.767C1.885 108.767 1.376 110.366 3.087 109.39C12.062 104.27 15.677 47.059 59.254 45.804C59.254 45.804 26.843 31.09 1.885 108.767z","stroke-width":"0.1",stroke:"#000",fill:"#fff"},{type:"path",path:"M-18.038 119.793C-18.038 119.793 -19.115 121.079 -17.162 120.825C-6.916 119.493 14.489 78.222 58.928 83.301C58.928 83.301 26.962 68.955 -18.038 119.793z","stroke-width":"0.1",stroke:"#000",fill:"#fff"},{type:"path",path:"M-6.8 113.667C-6.8 113.667 -7.611 115.136 -5.742 114.511C4.057 111.237 17.141 66.625 61.729 63.078C61.729 63.078 27.603 55.135 -6.8 113.667z","stroke-width":"0.1",stroke:"#000",fill:"#fff"},{type:"path",path:"M-25.078 124.912C-25.078 124.912 -25.951 125.954 -24.369 125.748C-16.07 124.669 1.268 91.24 37.264 95.354C37.264 95.354 11.371 83.734 -25.078 124.912z","stroke-width":"0.1",stroke:"#000",fill:"#fff"},{type:"path",path:"M-32.677 130.821C-32.677 130.821 -33.682 131.866 -32.091 131.748C-27.923 131.439 2.715 98.36 21.183 113.862C21.183 113.862 9.168 95.139 -32.677 130.821z","stroke-width":"0.1",stroke:"#000",fill:"#fff"},{type:"path",path:"M36.855 98.898C36.855 98.898 35.654 97.543 37.586 97.158C39.518 96.774 160.221 39.061 198.184 51.927C198.184 51.927 172.243 41.053 36.855 98.898z","stroke-width":"0.1",stroke:"#000",fill:"#fff"},{type:"path",path:"M3.4 163.201C3.4 163.201 3.2 161.401 5 162.201C6.8 163.001 22.2 163.601 9.8 186.001C9.8 186.001 19.4 162.001 3.4 163.201z","stroke-width":"0.1",stroke:"#000",fill:"#fff"},{type:"path",path:"M13.8 161.601C13.8 161.601 13.6 159.801 15.4 160.601C17.2 161.401 35 163.601 37 202.401C37 202.401 29.8 160.401 13.8 161.601z","stroke-width":"0.1",stroke:"#000",fill:"#fff"},{type:"path",path:"M20.6 160.001C20.6 160.001 20.4 158.201 22.2 159.001C24 159.801 48.6 163.201 72.2 195.601C72.2 195.601 36.6 158.801 20.6 160.001z","stroke-width":"0.1",stroke:"#000",fill:"#fff"},{type:"path",path:"M28.225 157.972C28.225 157.972 27.788 156.214 29.678 156.768C31.568 157.322 52.002 155.423 90.099 189.599C90.099 189.599 43.924 154.656 28.225 157.972z","stroke-width":"0.1",stroke:"#000",fill:"#fff"},{type:"path",path:"M38.625 153.572C38.625 153.572 38.188 151.814 40.078 152.368C41.968 152.922 76.802 157.423 128.499 192.399C128.499 192.399 54.324 150.256 38.625 153.572z","stroke-width":"0.1",stroke:"#000",fill:"#fff"},{type:"path",path:"M-1.8 142.001C-1.8 142.001 -2 140.201 -0.2 141.001C1.6 141.801 55 144.401 85.4 171.201C85.4 171.201 50.499 146.426 -1.8 142.001z","stroke-width":"0.1",stroke:"#000",fill:"#fff"},{type:"path",path:"M-11.8 146.001C-11.8 146.001 -12 144.201 -10.2 145.001C-8.4 145.801 16.2 149.201 39.8 181.601C39.8 181.601 4.2 144.801 -11.8 146.001z","stroke-width":"0.1",stroke:"#000",fill:"#fff"},{type:"path",path:"M49.503 148.962C49.503 148.962 48.938 147.241 50.864 147.655C52.79 148.068 87.86 150.004 141.981 181.098C141.981 181.098 64.317 146.704 49.503 148.962z","stroke-width":"0.1",stroke:"#000",fill:"#fff"},{type:"path",path:"M57.903 146.562C57.903 146.562 57.338 144.841 59.264 145.255C61.19 145.668 96.26 147.604 150.381 178.698C150.381 178.698 73.317 143.904 57.903 146.562z","stroke-width":"0.1",stroke:"#000",fill:"#fff"},{type:"path",path:"M67.503 141.562C67.503 141.562 66.938 139.841 68.864 140.255C70.79 140.668 113.86 145.004 203.582 179.298C203.582 179.298 82.917 138.904 67.503 141.562z","stroke-width":"0.1",stroke:"#000",fill:"#fff"},{type:"path",path:"M-43.8 148.401C-43.8 148.401 -38.6 148.001 -39.8 149.601C-41 151.201 -43.4 150.401 -43.4 150.401L-43.8 148.401z",stroke:"none",fill:"#000"},{type:"path",path:"M-13 162.401C-13 162.401 -7.8 162.001 -9 163.601C-10.2 165.201 -12.6 164.401 -12.6 164.401L-13 162.401z",stroke:"none",fill:"#000"},{type:"path",path:"M-21.8 162.001C-21.8 162.001 -16.6 161.601 -17.8 163.201C-19 164.801 -21.4 164.001 -21.4 164.001L-21.8 162.001z",stroke:"none",fill:"#000"},{type:"path",path:"M-117.169 150.182C-117.169 150.182 -112.124 151.505 -113.782 152.624C-115.439 153.744 -117.446 152.202 -117.446 152.202L-117.169 150.182z",stroke:"none",fill:"#000"},{type:"path",path:"M-115.169 140.582C-115.169 140.582 -110.124 141.905 -111.782 143.024C-113.439 144.144 -115.446 142.602 -115.446 142.602L-115.169 140.582z",stroke:"none",fill:"#000"},{type:"path",path:"M-122.369 136.182C-122.369 136.182 -117.324 137.505 -118.982 138.624C-120.639 139.744 -122.646 138.202 -122.646 138.202L-122.369 136.182z",stroke:"none",fill:"#000"},{type:"path",path:"M-42.6 211.201C-42.6 211.201 -44.2 211.201 -48.2 213.201C-50.2 213.201 -61.4 216.801 -67 226.801C-67 226.801 -54.6 217.201 -42.6 211.201z",stroke:"none",fill:"#ccc"},{type:"path",path:"M45.116 303.847C45.257 304.105 45.312 304.525 45.604 304.542C46.262 304.582 47.495 304.883 47.37 304.247C46.522 299.941 45.648 295.004 41.515 293.197C40.876 292.918 39.434 293.331 39.36 294.215C39.233 295.739 39.116 297.088 39.425 298.554C39.725 299.975 41.883 299.985 42.8 298.601C43.736 300.273 44.168 302.116 45.116 303.847z",stroke:"none",fill:"#ccc"},{type:"path",path:"M34.038 308.581C34.786 309.994 34.659 311.853 36.074 312.416C36.814 312.71 38.664 311.735 38.246 310.661C37.444 308.6 37.056 306.361 35.667 304.55C35.467 304.288 35.707 303.755 35.547 303.427C34.953 302.207 33.808 301.472 32.4 301.801C31.285 304.004 32.433 306.133 33.955 307.842C34.091 307.994 33.925 308.37 34.038 308.581z",stroke:"none",fill:"#ccc"},{type:"path",path:"M-5.564 303.391C-5.672 303.014 -5.71 302.551 -5.545 302.23C-5.014 301.197 -4.221 300.075 -4.558 299.053C-4.906 297.997 -6.022 298.179 -6.672 298.748C-7.807 299.742 -7.856 301.568 -8.547 302.927C-8.743 303.313 -8.692 303.886 -9.133 304.277C-9.607 304.698 -10.047 306.222 -9.951 306.793C-9.898 307.106 -10.081 317.014 -9.859 316.751C-9.24 316.018 -6.19 306.284 -6.121 305.392C-6.064 304.661 -5.332 304.196 -5.564 303.391z",stroke:"none",fill:"#ccc"},{type:"path",path:"M-31.202 296.599C-28.568 294.1 -25.778 291.139 -26.22 287.427C-26.336 286.451 -28.111 286.978 -28.298 287.824C-29.1 291.449 -31.139 294.11 -33.707 296.502C-35.903 298.549 -37.765 304.893 -38 305.401C-34.303 300.145 -32.046 297.399 -31.202 296.599z",stroke:"none",fill:"#ccc"},{type:"path",path:"M-44.776 290.635C-44.253 290.265 -44.555 289.774 -44.338 289.442C-43.385 287.984 -42.084 286.738 -42.066 285C-42.063 284.723 -42.441 284.414 -42.776 284.638C-43.053 284.822 -43.395 284.952 -43.503 285.082C-45.533 287.531 -46.933 290.202 -48.376 293.014C-48.559 293.371 -49.703 297.862 -49.39 297.973C-49.151 298.058 -47.431 293.877 -47.221 293.763C-45.958 293.077 -45.946 291.462 -44.776 290.635z",stroke:"none",fill:"#ccc"},{type:"path",path:"M-28.043 310.179C-27.599 309.31 -26.023 308.108 -26.136 307.219C-26.254 306.291 -25.786 304.848 -26.698 305.536C-27.955 306.484 -31.404 307.833 -31.674 313.641C-31.7 314.212 -28.726 311.519 -28.043 310.179z",stroke:"none",fill:"#ccc"},{type:"path",path:"M-13.6 293.001C-13.2 292.333 -12.492 292.806 -12.033 292.543C-11.385 292.171 -10.774 291.613 -10.482 290.964C-9.512 288.815 -7.743 286.995 -7.6 284.601C-9.091 283.196 -9.77 285.236 -10.4 286.201C-11.723 284.554 -12.722 286.428 -14.022 286.947C-14.092 286.975 -14.305 286.628 -14.38 286.655C-15.557 287.095 -16.237 288.176 -17.235 288.957C-17.406 289.091 -17.811 288.911 -17.958 289.047C-18.61 289.65 -19.583 289.975 -19.863 290.657C-20.973 293.364 -24.113 295.459 -26 303.001C-25.619 303.91 -21.488 296.359 -21.001 295.661C-20.165 294.465 -20.047 297.322 -18.771 296.656C-18.72 296.629 -18.534 296.867 -18.4 297.001C-18.206 296.721 -17.988 296.492 -17.6 296.601C-17.6 296.201 -17.734 295.645 -17.533 295.486C-16.296 294.509 -16.38 293.441 -15.6 292.201C-15.142 292.99 -14.081 292.271 -13.6 293.001z",stroke:"none",fill:"#ccc"},{type:"path",path:"M46.2 347.401C46.2 347.401 53.6 327.001 49.2 315.801C49.2 315.801 60.6 337.401 56 348.601C56 348.601 55.6 338.201 51.6 333.201C51.6 333.201 47.6 346.001 46.2 347.401z",stroke:"none",fill:"#ccc"},{type:"path",path:"M31.4 344.801C31.4 344.801 36.8 336.001 28.8 317.601C28.8 317.601 28 338.001 21.2 349.001C21.2 349.001 35.4 328.801 31.4 344.801z",stroke:"none",fill:"#ccc"},{type:"path",path:"M21.4 342.801C21.4 342.801 21.2 322.801 21.6 319.801C21.6 319.801 17.8 336.401 7.6 346.001C7.6 346.001 22 334.001 21.4 342.801z",stroke:"none",fill:"#ccc"},{type:"path",path:"M11.8 310.801C11.8 310.801 17.8 324.401 7.8 342.801C7.8 342.801 14.2 330.601 9.4 323.601C9.4 323.601 12 320.201 11.8 310.801z",stroke:"none",fill:"#ccc"},{type:"path",path:"M-7.4 342.401C-7.4 342.401 -8.4 326.801 -6.6 324.601C-6.6 324.601 -6.4 318.201 -6.8 317.201C-6.8 317.201 -2.8 311.001 -2.6 318.401C-2.6 318.401 -1.2 326.201 1.6 330.801C1.6 330.801 5.2 336.201 5 342.601C5 342.601 -5 312.401 -7.4 342.401z",stroke:"none",fill:"#ccc"},{type:"path",path:"M-11 314.801C-11 314.801 -17.6 325.601 -19.4 344.601C-19.4 344.601 -20.8 338.401 -17 324.001C-17 324.001 -12.8 308.601 -11 314.801z",stroke:"none",fill:"#ccc"},{type:"path",path:"M-32.8 334.601C-32.8 334.601 -27.8 329.201 -26.4 324.201C-26.4 324.201 -22.8 308.401 -29.2 317.001C-29.2 317.001 -29 325.001 -37.2 332.401C-37.2 332.401 -32.4 330.001 -32.8 334.601z",stroke:"none",fill:"#ccc"},{type:"path",path:"M-38.6 329.601C-38.6 329.601 -35.2 312.201 -34.4 311.401C-34.4 311.401 -32.6 308.001 -35.4 311.201C-35.4 311.201 -44.2 330.401 -48.2 337.001C-48.2 337.001 -40.2 327.801 -38.6 329.601z",stroke:"none",fill:"#ccc"},{type:"path",path:"M-44.4 313.001C-44.4 313.001 -32.8 290.601 -54.6 316.401C-54.6 316.401 -43.6 306.601 -44.4 313.001z",stroke:"none",fill:"#ccc"},{type:"path",path:"M-59.8 298.401C-59.8 298.401 -55 279.601 -52.4 279.801C-52.4 279.801 -44.2 270.801 -50.8 281.401C-50.8 281.401 -56.8 291.001 -56.2 300.801C-56.2 300.801 -56.8 291.201 -59.8 298.401z",stroke:"none",fill:"#ccc"},{type:"path",path:"M270.5 287C270.5 287 258.5 277 256 273.5C256 273.5 269.5 292 269.5 299C269.5 299 272 291.5 270.5 287z",stroke:"none",fill:"#ccc"},{type:"path",path:"M276 265C276 265 255 250 251.5 242.5C251.5 242.5 278 272 278 276.5C278 276.5 278.5 267.5 276 265z",stroke:"none",fill:"#ccc"},{type:"path",path:"M293 111C293 111 281 103 279.5 105C279.5 105 290 111.5 292.5 120C292.5 120 291 111 293 111z",stroke:"none",fill:"#ccc"},{type:"path",path:"M301.5 191.5L284 179.5C284 179.5 303 196.5 303.5 200.5L301.5 191.5z",stroke:"none",fill:"#ccc"},{type:"path",path:"M-89.25 169L-67.25 173.75",stroke:"#000",fill:"#000"},{type:"path",path:"M-39 331C-39 331 -39.5 327.5 -48.5 338",stroke:"#000",fill:"#000"},{type:"path",path:"M-33.5 336C-33.5 336 -31.5 329.5 -38 334",stroke:"#000",fill:"#000"},{type:"path",path:"M20.5 344.5C20.5 344.5 22 333.5 10.5 346.5",stroke:"#000",fill:"#000"}]; \ No newline at end of file diff --git a/pitfall/pdfkit/docs/.gitignore b/pitfall/pdfkit/docs/.gitignore new file mode 100644 index 00000000..12cd1a37 --- /dev/null +++ b/pitfall/pdfkit/docs/.gitignore @@ -0,0 +1,4 @@ +*.html +css/ +img/ +js/ \ No newline at end of file diff --git a/pitfall/pdfkit/docs/README.md b/pitfall/pdfkit/docs/README.md new file mode 100644 index 00000000..e96e17a9 --- /dev/null +++ b/pitfall/pdfkit/docs/README.md @@ -0,0 +1,22 @@ +# PDFKit Guide + +The PDFKit guide can be read a number of ways. The first is online at [pdfkit.org](http://pdfkit.org/). +You can also read the guide in PDF form, in this directory or [online](http://pdfkit.org/docs/guide.pdf). + +Both the website and the PDF guide are generated from the Literate CoffeeScript (runnable Markdown) files +in this directory. The examples are actually run when generating the PDF in order to show the results inline. +The `generate.coffee` file in this directory is actually quite short. It parses the markdown files into a +tree structure using [markdown-js](https://github.com/evilstreak/markdown-js), syntax highlights the code +examples using [codemirror](https://github.com/marijnh/codemirror), compiles and runs the code examples and puts the results +inline, and generates the PDF using PDFKit. You can read the generator script source code to get a feeling for +how you might do something slightly more complex than the guide itself shows. + +The markdown syntax used is pretty much standard, with a couple tweaks. + +1. Code example output is references using the image notation, using the alt text as the example number starting from + zero in the current file, and the title as the example output height. E.g. `![x](name "height")`. + +2. Page breaks are added before `h1` and `h2`s, unless there are two in a row. `h3` is treated the same as `h2` but + can be used to avoid this in the case you need multiple `h2`s on the same page. + +3. The horizontal rule syntax (`* * *`) denotes an explicit page break diff --git a/pitfall/pdfkit/docs/annotations.coffee.md b/pitfall/pdfkit/docs/annotations.coffee.md new file mode 100644 index 00000000..0a4540e5 --- /dev/null +++ b/pitfall/pdfkit/docs/annotations.coffee.md @@ -0,0 +1,97 @@ +# Annotations in PDFKit + +Annotations are interactive features of the PDF format, and they make it +possible to include things like links and attached notes, or to highlight, +underline or strikeout portions of text. Annotations are added using the +various helper methods, and each type of annotation is defined by a rectangle +and some other properties. Here is a list of the available annotation methods: + +* `note(x, y, width, height, contents, options)` +* `link(x, y, width, height, url, options)` +* `highlight(x, y, width, height, options)` +* `underline(x, y, width, height, options)` +* `strike(x, y, width, height, options)` +* `lineAnnotation(x1, y1, x2, y2, options)` +* `rectAnnotation(x, y, width, height, options)` +* `ellipseAnnotation(x, y, width, height, options)` +* `textAnnotation(x, y, width, height, text, options)` + +Many of the annotations have a `color` option that you can specify. You can +use an array of RGB values, a hex color, or a named CSS color value for that +option. + +If you are adding an annotation to a piece of text, such as a link or +underline, you will need to know the width and height of the text in order to +create the required rectangle for the annotation. There are two methods that +you can use to do that. To get the width of any piece of text in the current +font, just call the `widthOfString` method with the string you want to +measure. To get the line height in the current font, just call the +`currentLineHeight` method. + +You must remember that annotations have a stacking order. If you are putting +more than one annotation on a single area and one of those annotations is a +link, make sure that the link is the last one you add, otherwise it will be +covered by another annotation and the user won't be able to click it. + +* * * + +Here is an example that uses a few of the annotation types. + + # Add the link text + doc.fontSize(25) + .fillColor('blue') + .text('This is a link!', 20, 0) + + # Measure the text + width = doc.widthOfString('This is a link!') + height = doc.currentLineHeight() + + # Add the underline and link annotations + doc.underline(20, 0, width, height, color: 'blue') + .link(20, 0, width, height, 'http://google.com/') + + # Create the highlighted text + doc.moveDown() + .fillColor('black') + .highlight(20, doc.y, doc.widthOfString('This text is highlighted!'), height) + .text('This text is highlighted!') + + # Create the crossed out text + doc.moveDown() + .strike(20, doc.y, doc.widthOfString('STRIKE!'), height) + .text('STRIKE!') + +The output of this example looks like this. + +![0](images/annotations.png) + +Annotations are currently not the easiest things to add to PDF documents, but +that is the fault of the PDF spec itself. Calculating a rectangle manually isn't +fun, but PDFKit makes it easier for a few common annotations applied to text, including +links, underlines, and strikes. Here's an example showing two of them: + + doc.fontSize 20 + .fillColor 'red' + .text 'Another link!', 20, 0, + link: 'http://apple.com/', + underline: true + +The output is as you'd expect: + +![1]() + +# You made it! + +That's all there is to creating PDF documents in PDFKit. It's really quite +simple to create beautiful multi-page printable documents using Node.js! + +This guide was generated from Markdown/Literate CoffeeScript files using a +PDFKit generation script. The examples are actually run to generate the output shown +inline. The script generates both the website and the PDF guide, and +can be found [on Github](http://github.com/devongovett/pdfkit/tree/master/docs/generate.coffee). +Check it out if you want to see an example of a slightly more complicated renderer using +a parser for Markdown and a syntax highlighter. + +If you have any questions about what you've learned in this guide, please don't +hesitate to [ask the author](http://twitter.com/devongovett) or post an issue +on [Github](http://github.com/devongovett/pdfkit/issues). Enjoy! diff --git a/pitfall/pdfkit/docs/fonts/Alegreya-Bold.ttf b/pitfall/pdfkit/docs/fonts/Alegreya-Bold.ttf new file mode 100755 index 00000000..e843cea0 Binary files /dev/null and b/pitfall/pdfkit/docs/fonts/Alegreya-Bold.ttf differ diff --git a/pitfall/pdfkit/docs/fonts/AlegreyaSans-Light.ttf b/pitfall/pdfkit/docs/fonts/AlegreyaSans-Light.ttf new file mode 100755 index 00000000..b43efc9b Binary files /dev/null and b/pitfall/pdfkit/docs/fonts/AlegreyaSans-Light.ttf differ diff --git a/pitfall/pdfkit/docs/fonts/Chalkboard.ttc b/pitfall/pdfkit/docs/fonts/Chalkboard.ttc new file mode 100644 index 00000000..5ae65eef Binary files /dev/null and b/pitfall/pdfkit/docs/fonts/Chalkboard.ttc differ diff --git a/pitfall/pdfkit/docs/fonts/GoodDog.ttf b/pitfall/pdfkit/docs/fonts/GoodDog.ttf new file mode 100755 index 00000000..da5af27b Binary files /dev/null and b/pitfall/pdfkit/docs/fonts/GoodDog.ttf differ diff --git a/pitfall/pdfkit/docs/fonts/Merriweather-Regular.ttf b/pitfall/pdfkit/docs/fonts/Merriweather-Regular.ttf new file mode 100755 index 00000000..28a80e48 Binary files /dev/null and b/pitfall/pdfkit/docs/fonts/Merriweather-Regular.ttf differ diff --git a/pitfall/pdfkit/docs/fonts/SourceCodePro-Bold.ttf b/pitfall/pdfkit/docs/fonts/SourceCodePro-Bold.ttf new file mode 100755 index 00000000..a56f1fa5 Binary files /dev/null and b/pitfall/pdfkit/docs/fonts/SourceCodePro-Bold.ttf differ diff --git a/pitfall/pdfkit/docs/fonts/SourceCodePro-Regular.ttf b/pitfall/pdfkit/docs/fonts/SourceCodePro-Regular.ttf new file mode 100755 index 00000000..b2cff928 Binary files /dev/null and b/pitfall/pdfkit/docs/fonts/SourceCodePro-Regular.ttf differ diff --git a/pitfall/pdfkit/docs/generate.coffee b/pitfall/pdfkit/docs/generate.coffee new file mode 100644 index 00000000..7dae10d8 --- /dev/null +++ b/pitfall/pdfkit/docs/generate.coffee @@ -0,0 +1,254 @@ +fs = require 'fs' +vm = require 'vm' +md = require('markdown').markdown +coffee = require 'coffee-script' +CodeMirror = require 'codemirror/addon/runmode/runmode.node' +PDFDocument = require '../' + +process.chdir(__dirname) + +# setup code mirror coffeescript mode +filename = require.resolve('codemirror/mode/coffeescript/coffeescript') +coffeeMode = fs.readFileSync filename, 'utf8' +vm.runInNewContext coffeeMode, CodeMirror: CodeMirror + +# style definitions for markdown +styles = + h1: + font: 'fonts/Alegreya-Bold.ttf' + fontSize: 25 + padding: 15 + h2: + font: 'fonts/Alegreya-Bold.ttf' + fontSize: 18 + padding: 10 + h3: + font: 'fonts/Alegreya-Bold.ttf' + fontSize: 18 + padding: 10 + para: + font: 'fonts/Merriweather-Regular.ttf' + fontSize: 10 + padding: 10 + code: + font: 'fonts/SourceCodePro-Regular.ttf' + fontSize: 9 + code_block: + padding: 10 + background: '#2c2c2c' + inlinecode: + font: 'fonts/SourceCodePro-Bold.ttf' + fontSize: 10 + listitem: + font: 'fonts/Merriweather-Regular.ttf' + fontSize: 10 + padding: 6 + link: + font: 'fonts/Merriweather-Regular.ttf' + fontSize: 10 + color: 'blue' + underline: true + example: + font: 'Helvetica' + fontSize: 9 + color: 'black' + padding: 10 + +# syntax highlighting colors +# based on Github's theme +colors = + keyword: '#cb4b16' + atom: '#d33682' + number: '#009999' + def: '#2aa198' + variable: '#108888' + 'variable-2': '#b58900' + 'variable-3': '#6c71c4' + property: '#2aa198' + operator: '#6c71c4' + comment: '#999988' + string: '#dd1144' + 'string-2': '#009926' + meta: '#768E04' + qualifier: '#b58900' + builtin: '#d33682' + bracket: '#cb4b16' + tag: '#93a1a1' + attribute: '#2aa198' + header: '#586e75' + quote: '#93a1a1' + link: '#93a1a1' + special: '#6c71c4' + default: '#002b36' + +# shared lorem ipsum text so we don't need to copy it into every example +lorem = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam in suscipit purus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Vivamus nec hendrerit felis. Morbi aliquam facilisis risus eu lacinia. Sed eu leo in turpis fringilla hendrerit. Ut nec accumsan nisl. Suspendisse rhoncus nisl posuere tortor tempus et dapibus elit porta. Cras leo neque, elementum a rhoncus ut, vestibulum non nibh. Phasellus pretium justo turpis. Etiam vulputate, odio vitae tincidunt ultricies, eros odio dapibus nisi, ut tincidunt lacus arcu eu elit. Aenean velit erat, vehicula eget lacinia ut, dignissim non tellus. Aliquam nec lacus mi, sed vestibulum nunc. Suspendisse potenti. Curabitur vitae sem turpis. Vestibulum sed neque eget dolor dapibus porttitor at sit amet sem. Fusce a turpis lorem. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae;' + +codeBlocks = [] +lastType = null + +# This class represents a node in the markdown tree, and can render it to pdf +class Node + constructor: (tree) -> + # special case for text nodes + if typeof tree is 'string' + @type = 'text' + @text = tree + return + + @type = tree.shift() + @attrs = {} + + if typeof tree[0] is 'object' and not Array.isArray tree[0] + @attrs = tree.shift() + + # parse sub nodes + @content = while tree.length + new Node tree.shift() + + switch @type + when 'header' + @type = 'h' + @attrs.level + + when 'code_block' + # use code mirror to syntax highlight the code block + code = @content[0].text + @content = [] + CodeMirror.runMode code, 'coffeescript', (text, style) => + color = colors[style] or colors.default + opts = + color: color + continued: text isnt '\n' + + @content.push new Node ['code', opts, text] + + @content[@content.length - 1]?.attrs.continued = false + codeBlocks.push code + + when 'img' + # images are used to generate inline example output + # compiles the coffeescript to JS so it can be run + # in the render method + @type = 'example' + code = codeBlocks[@attrs.alt] + @code = coffee.compile code if code + @height = +@attrs.title or 0 + + @style = styles[@type] or styles.para + + # sets the styles on the document for this node + setStyle: (doc) -> + if @style.font + doc.font @style.font + + if @style.fontSize + doc.fontSize @style.fontSize + + if @style.color or @attrs.color + doc.fillColor @style.color or @attrs.color + else + doc.fillColor 'black' + + options = {} + options.align = @style.align + options.link = @attrs.href or false # override continued link + options.continued = @attrs.continued if @attrs.continued? + return options + + # renders this node and its subnodes to the document + render: (doc, continued = false) -> + switch @type + when 'example' + @setStyle doc + + # translate all points in the example code to + # the current point in the document + doc.moveDown() + doc.save() + doc.translate(doc.x, doc.y) + x = doc.x + y = doc.y + doc.x = doc.y = 0 + + # run the example code with the document + vm.runInNewContext @code, + doc: doc + lorem: lorem + + # restore points and styles + y += doc.y + doc.restore() + doc.x = x + doc.y = y + @height + when 'hr' + doc.addPage() + else + # loop through subnodes and render them + for fragment, index in @content + if fragment.type is 'text' + # add a new page for each heading, unless it follows another heading + if @type in ['h1', 'h2'] and lastType? and lastType isnt 'h1' + doc.addPage() + + # set styles and whether this fragment is continued (for rich text wrapping) + options = @setStyle doc + options.continued ?= continued or index < @content.length - 1 + + # remove newlines unless this is code + unless @type is 'code' + fragment.text = fragment.text.replace(/[\r\n]\s*/g, ' ') + + doc.text fragment.text, options + else + fragment.render doc, index < @content.length - 1 and @type isnt 'bulletlist' + + lastType = @type + + if @style.padding + doc.y += @style.padding + +# reads and renders a markdown/literate coffeescript file to the document +render = (doc, filename) -> + codeBlocks = [] + tree = md.parse fs.readFileSync(filename, 'utf8') + tree.shift() + + while tree.length + node = new Node tree.shift() + node.render(doc) + +# renders the title page of the guide +renderTitlePage = (doc) -> + title = 'PDFKit Guide' + author = 'By Devon Govett' + version = 'Version ' + require('../package.json').version + + doc.font 'fonts/AlegreyaSans-Light.ttf', 60 + doc.y = doc.page.height / 2 - doc.currentLineHeight() + doc.text title, align: 'center' + w = doc.widthOfString(title) + + doc.fontSize 20 + doc.y -= 10 + doc.text author, + align: 'center' + indent: w - doc.widthOfString(author) + + doc.font styles.para.font, 10 + doc.text version, + align: 'center' + indent: w - doc.widthOfString(version) + + doc.addPage() + +# render all sections of the guide and write the pdf file +do -> + doc = new PDFDocument + doc.pipe fs.createWriteStream('guide.pdf') + renderTitlePage doc + render doc, 'getting_started.coffee.md' + render doc, 'vector.coffee.md' + render doc, 'text.coffee.md' + render doc, 'images.coffee.md' + render doc, 'annotations.coffee.md' + doc.end() diff --git a/pitfall/pdfkit/docs/generate_website.coffee b/pitfall/pdfkit/docs/generate_website.coffee new file mode 100644 index 00000000..89c007c4 --- /dev/null +++ b/pitfall/pdfkit/docs/generate_website.coffee @@ -0,0 +1,108 @@ +jade = require 'jade' +markdown = require('markdown').markdown +fs = require 'fs' +vm = require 'vm' +coffee = require 'coffee-script' +{exec} = require 'child_process' +PDFDocument = require '../' + +process.chdir(__dirname) + +files = [ + '../README.md' + 'getting_started.coffee.md' + 'vector.coffee.md' + 'text.coffee.md' + 'images.coffee.md' + 'annotations.coffee.md' +] + +# shared lorem ipsum text so we don't need to copy it into every example +lorem = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam in suscipit purus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Vivamus nec hendrerit felis. Morbi aliquam facilisis risus eu lacinia. Sed eu leo in turpis fringilla hendrerit. Ut nec accumsan nisl. Suspendisse rhoncus nisl posuere tortor tempus et dapibus elit porta. Cras leo neque, elementum a rhoncus ut, vestibulum non nibh. Phasellus pretium justo turpis. Etiam vulputate, odio vitae tincidunt ultricies, eros odio dapibus nisi, ut tincidunt lacus arcu eu elit. Aenean velit erat, vehicula eget lacinia ut, dignissim non tellus. Aliquam nec lacus mi, sed vestibulum nunc. Suspendisse potenti. Curabitur vitae sem turpis. Vestibulum sed neque eget dolor dapibus porttitor at sit amet sem. Fusce a turpis lorem. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae;' + +extractHeaders = (tree) -> + headers = [] + + for node, index in tree + if node[0] is 'header' and (headers.length is 0 or node[1].level > 1) + node[1].level = 2 if node[1].level > 2 + hash = node[2].toLowerCase().replace(/\s+/g, '_') + node[1].id = hash + headers.push + hash: hash + title: node[2] + + return headers + +imageIndex = 0 +generateImages = (tree) -> + # find code blocks + codeBlocks = [] + for node in tree + if node[0] is 'code_block' + codeBlocks.push node[1] + + for node in tree + if node[0] is 'para' and Array.isArray(node[1]) and node[1][0] is 'img' + # compile the code + attrs = node[1][1] + code = codeBlocks[attrs.alt] + code = coffee.compile code if code + delete attrs.height # used for pdf generation + + # create a PDF and run the example + doc = new PDFDocument + f = "img/#{imageIndex++}" + file = fs.createWriteStream "#{f}.pdf" + doc.pipe file + + doc.translate doc.x, doc.y + doc.scale 0.8 + doc.x = doc.y = 0 + + vm.runInNewContext code, + doc: doc + lorem: lorem + + delete attrs.title + delete attrs.alt + attrs.href = "#{f}.png" + + # write the PDF, convert to PNG using the mac `sips` + # command line tool, and trim with graphicsmagick + do (f) -> + file.on 'finish', -> + exec "sips -s format png #{f}.pdf --out #{f}.png", -> + fs.unlink "#{f}.pdf" + exec "gm convert #{f}.png -trim #{f}.png" + + doc.end() + +pages = [] +for file in files + content = fs.readFileSync file, 'utf8' + + # turn github highlighted code blocks into normal markdown code blocks + content = content.replace /^```coffeescript\n((:?.|\n)*?)\n```/mg, (m, $1) -> + ' ' + $1.split('\n').join('\n ') + + tree = markdown.parse(content) + headers = extractHeaders(tree) + generateImages(tree) + + file = file + .replace(/\.coffee\.md$/, '') + .replace(/README\.md/, 'index') + + pages.push + file: file + url: '/docs/' + file + '.html' + title: headers[0].title + headers: headers.slice(1) + content: markdown.toHTML(tree) + +for page, index in pages + page.pages = pages + page.index = index + html = jade.renderFile 'template.jade', page + fs.writeFileSync page.file + '.html', html, 'utf8' diff --git a/pitfall/pdfkit/docs/getting_started.coffee.md b/pitfall/pdfkit/docs/getting_started.coffee.md new file mode 100644 index 00000000..6184e690 --- /dev/null +++ b/pitfall/pdfkit/docs/getting_started.coffee.md @@ -0,0 +1,193 @@ +# Getting Started with PDFKit + +### Installation + +Installation uses the [npm](http://npmjs.org/) package manager. Just type the +following command after installing npm. + + npm install pdfkit + +### Creating a document + +Creating a PDFKit document is quite simple. Just require the `pdfkit` module +in your CoffeeScript or JavaScript source file and create an instance of the +`PDFDocument` class. + + PDFDocument = require 'pdfkit' + doc = new PDFDocument + +`PDFDocument` instances are readable Node streams. They don't get saved anywhere automatically, +but you can call the `pipe` method to send the output of the PDF document to another +writable Node stream as it is being written. When you're done with your document, call +the `end` method to finalize it. Here is an example showing how to pipe to a file or an HTTP response. + + doc.pipe fs.createWriteStream('/path/to/file.pdf') # write to PDF + doc.pipe res # HTTP response + + # add stuff to PDF here using methods described below... + + # finalize the PDF and end the stream + doc.end() + +The `write` and `output` methods found in PDFKit before version 0.5 are now deprecated. + +## Using PDFKit in the browser + +As of version 0.6, PDFKit can be used in the browser as well as in Node! +There are two ways to use PDFKit in the browser. The first is to use [Browserify](http://browserify.org/), +which is a Node module packager for the browser with the familiar `require` syntax. The second is to use +a prebuilt version of PDFKit, which you can [download from Github](https://github.com/devongovett/pdfkit/releases). + +Using PDFKit in the browser is exactly the same as using it in Node, except you'll want to pipe the +output to a destination supported in the browser, such as a +[Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob). Blobs can be used +to generate a URL to allow display of generated PDFs directly in the browser via an `iframe`, or they can +be used to upload the PDF to a server, or trigger a download in the user's browser. + +To get a Blob from a `PDFDocument`, you should pipe it to a [blob-stream](https://github.com/devongovett/blob-stream), +which is a module that generates a Blob from any Node-style stream. The following example uses Browserify to load +`PDFKit` and `blob-stream`, but if you're not using Browserify, you can load them in whatever way you'd like (e.g. script tags). + + # require dependencies + PDFDocument = require 'pdfkit' + blobStream = require 'blob-stream' + + # create a document the same way as above + doc = new PDFDocument + + # pipe the document to a blob + stream = doc.pipe(blobStream()) + + # add your content to the document here, as usual + + # get a blob when you're done + doc.end() + stream.on 'finish', -> + # get a blob you can do whatever you like with + blob = stream.toBlob('application/pdf') + + # or get a blob URL for display in the browser + url = stream.toBlobURL('application/pdf') + iframe.src = url + +You can see an interactive in-browser demo of PDFKit [here](http://pdfkit.org/demo/browser.html). + +Note that in order to Browserify a project using PDFKit, you need to install the `brfs` module with npm, +which is used to load built-in font data into the package. It is listed as a `devDependency` in +PDFKit's `package.json`, so it isn't installed by default for Node users. +If you forget to install it, Browserify will print an error message. + +## Adding pages + +The first page of a PDFKit document is added for you automatically when you +create the document unless you provide `autoFirstPage: false`. Subsequent pages must be added by you. Luckily, it is +quite simple! + + doc.addPage() + +To add some content every time a page is created, either by calling `addPage()` or automatically, you can use the `pageAdded` event. + + doc.on 'pageAdded', -> + doc.text "Page Title" + +You can also set some options for the page, such as it's size and orientation. + +The `layout` property can be either `portrait` (the default) or `landscape`. +The `size` property can be either an array specifying `[width, height]` in PDF +points (72 per inch), or a string specifying a predefined size. A +list of the predefined paper sizes can be seen [here](https://github.com/devongovett/pdfkit/blob/b13423bf0a391ed1c33a2e277bc06c00cabd6bf9/lib/page.coffee#L72-L122). The +default is `letter`. + +Passing a page options object to the `PDFDocument` constructor will +set the default paper size and layout for every page in the document, which is +then overridden by individual options passed to the `addPage` method. + +You can set the page margins in two ways. The first is by setting the `margin` +property (singular) to a number, which applies that margin to all edges. The +other way is to set the `margins` property (plural) to an object with `top`, +`bottom`, `left`, and `right` values. The default is a 1 inch (72 point) margin +on all sides. + +For example: + + # Add a 50 point margin on all sides + doc.addPage + margin: 50 + + + # Add different margins on each side + doc.addPage + margins: + top: 50 + bottom: 50 + left: 72 + right: 72 + +## Switching to previous pages + +PDFKit normally flushes pages to the output file immediately when a new page is created, making +it impossible to jump back and add content to previous pages. This is normally not an issue, but +in some circumstances it can be useful to add content to pages after the whole document, or a part +of the document, has been created already. Examples include adding page numbers, or filling in other +parts of information you don't have until the rest of the document has been created. + +PDFKit has a `bufferPages` option in versions v0.7.0 and later that allows you to control when +pages are flushed to the output file yourself rather than letting PDFKit handle that for you. To use +it, just pass `bufferPages: true` as an option to the `PDFDocument` constructor. Then, you can call +`doc.switchToPage(pageNumber)` to switch to a previous page (page numbers start at 0). + +When you're ready to flush the buffered pages to the output file, call `flushPages`. +This method is automatically called by `doc.end()`, so if you just want to buffer all pages in the document, you +never need to call it. Finally, there is a `bufferedPageRange` method, which returns the range +of pages that are currently buffered. Here is a small example that shows how you might add page +numbers to a document. + + # create a document, and enable bufferPages mode + doc = new PDFDocument + bufferPages: true + + # add some content... + doc.addPage() + # ... + doc.addPage() + + # see the range of buffered pages + range = doc.bufferedPageRange() # => { start: 0, count: 2 } + + for i in [range.start...range.start + range.count] + doc.switchToPage(i) + doc.text "Page #{i + 1} of #{range.count}" + + # manually flush pages that have been buffered + doc.flushPages() + + # or, if you are at the end of the document anyway, + # doc.end() will call it for you automatically. + doc.end() + +## Setting document metadata + +PDF documents can have various metadata associated with them, such as the +title, or author of the document. You can add that information by adding it to +the `doc.info` object, or by passing an info object into the document at +creation time. + +Here is a list of all of the properties you can add to the document metadata. +According to the PDF spec, each property must have it's first letter +capitalized. + + * `Title` - the title of the document + * `Author` - the name of the author + * `Subject` - the subject of the document + * `Keywords` - keywords associated with the document + * `CreationDate` - the date the document was created (added automatically by PDFKit) + * `ModDate` - the date the document was last modified + +### Adding content + +Once you've created a `PDFDocument` instance, you can add content to the +document. Check out the other sections described in this document to +learn about each type of content you can add. + +That's the basics! Now let's move on to PDFKit's powerful vector graphics +abilities. diff --git a/pitfall/pdfkit/docs/guide.pdf b/pitfall/pdfkit/docs/guide.pdf new file mode 100644 index 00000000..b4b0bff2 --- /dev/null +++ b/pitfall/pdfkit/docs/guide.pdf @@ -0,0 +1,2512 @@ +%PDF-1.3 +% +5 0 obj +<< +/Type /Page +/Parent 1 0 R +/MediaBox [0 0 612 792] +/Contents 3 0 R +/Resources 4 0 R +>> +endobj +4 0 obj +<< +/ProcSet [/PDF /Text /ImageB /ImageC /ImageI] +/Font << +/F2 6 0 R +/F3 7 0 R +>> +>> +endobj +11 0 obj +<< +/Type /ExtGState +/ca 1 +>> +endobj +13 0 obj +<< +/S /URI +/URI (http://npmjs.org/) +>> +endobj +14 0 obj +<< +/Subtype /Link +/A 13 0 R +/Type /Annot +/Rect [176.6875 623.977 200.076171875 636.477] +/Border [0 0 0] +>> +endobj +10 0 obj +<< +/Type /Page +/Parent 1 0 R +/MediaBox [0 0 612 792] +/Contents 8 0 R +/Resources 9 0 R +/Annots [14 0 R] +>> +endobj +9 0 obj +<< +/ProcSet [/PDF /Text /ImageB /ImageC /ImageI] +/ExtGState << +/Gs1 11 0 R +>> +/Font << +/F4 12 0 R +/F3 7 0 R +/F5 15 0 R +/F6 16 0 R +>> +>> +endobj +20 0 obj +<< +/S /URI +/URI (http://browserify.org/) +>> +endobj +21 0 obj +<< +/Subtype /Link +/A 20 0 R +/Type /Annot +/Rect [310.515625 660.502 364.4755859375 673.002] +/Border [0 0 0] +>> +endobj +22 0 obj +<< +/S /URI +/URI (https://github.com/devongovett/pdfkit/releases) +>> +endobj +23 0 obj +<< +/Subtype /Link +/A 22 0 R +/Type /Annot +/Rect [186.0380859375 635.502 298.728515625 648.002] +/Border [0 0 0] +>> +endobj +24 0 obj +<< +/S /URI +/URI (https://developer.mozilla.org/en-US/docs/Web/API/Blob) +>> +endobj +25 0 obj +<< +/Subtype /Link +/A 24 0 R +/Type /Annot +/Rect [416.2333984375 600.502 438.7529296875 613.002] +/Border [0 0 0] +>> +endobj +26 0 obj +<< +/S /URI +/URI (https://github.com/devongovett/blob-stream) +>> +endobj +27 0 obj +<< +/Subtype /Link +/A 26 0 R +/Type /Annot +/Rect [357.4140625 553.002 420.3583984375 565.502] +/Border [0 0 0] +>> +endobj +28 0 obj +<< +/S /URI +/URI (http://pdfkit.org/demo/browser.html) +>> +endobj +29 0 obj +<< +/Subtype /Link +/A 28 0 R +/Type /Annot +/Rect [343.2109375 245.4290000000002 365.7548828125 257.9290000000002] +/Border [0 0 0] +>> +endobj +19 0 obj +<< +/Type /Page +/Parent 1 0 R +/MediaBox [0 0 612 792] +/Contents 17 0 R +/Resources 18 0 R +/Annots [21 0 R 23 0 R 25 0 R 27 0 R 29 0 R] +>> +endobj +18 0 obj +<< +/ProcSet [/PDF /Text /ImageB /ImageC /ImageI] +/ExtGState << +/Gs1 11 0 R +>> +/Font << +/F4 12 0 R +/F3 7 0 R +/F6 16 0 R +/F5 15 0 R +>> +>> +endobj +33 0 obj +<< +/S /URI +/URI (http://pdfkit.org/docs/paper_sizes.html) +>> +endobj +34 0 obj +<< +/Subtype /Link +/A 33 0 R +/Type /Annot +/Rect [451.7265625 489.06300000000005 474.2705078125 501.56300000000005] +/Border [0 0 0] +>> +endobj +32 0 obj +<< +/Type /Page +/Parent 1 0 R +/MediaBox [0 0 612 792] +/Contents 30 0 R +/Resources 31 0 R +/Annots [34 0 R] +>> +endobj +31 0 obj +<< +/ProcSet [/PDF /Text /ImageB /ImageC /ImageI] +/ExtGState << +/Gs1 11 0 R +>> +/Font << +/F4 12 0 R +/F3 7 0 R +/F6 16 0 R +/F5 15 0 R +>> +>> +endobj +37 0 obj +<< +/Type /Page +/Parent 1 0 R +/MediaBox [0 0 612 792] +/Contents 35 0 R +/Resources 36 0 R +>> +endobj +36 0 obj +<< +/ProcSet [/PDF /Text /ImageB /ImageC /ImageI] +/ExtGState << +/Gs1 11 0 R +>> +/Font << +/F4 12 0 R +/F3 7 0 R +/F6 16 0 R +/F5 15 0 R +>> +>> +endobj +40 0 obj +<< +/Type /Page +/Parent 1 0 R +/MediaBox [0 0 612 792] +/Contents 38 0 R +/Resources 39 0 R +>> +endobj +39 0 obj +<< +/ProcSet [/PDF /Text /ImageB /ImageC /ImageI] +/ExtGState << +/Gs1 11 0 R +>> +/Font << +/F4 12 0 R +/F3 7 0 R +/F6 16 0 R +>> +>> +endobj +43 0 obj +<< +/Type /Page +/Parent 1 0 R +/MediaBox [0 0 612 792] +/Contents 41 0 R +/Resources 42 0 R +>> +endobj +42 0 obj +<< +/ProcSet [/PDF /Text /ImageB /ImageC /ImageI] +/ExtGState << +/Gs1 11 0 R +>> +/Font << +/F4 12 0 R +/F3 7 0 R +/F6 16 0 R +/F5 15 0 R +>> +>> +endobj +46 0 obj +<< +/Type /Page +/Parent 1 0 R +/MediaBox [0 0 612 792] +/Contents 44 0 R +/Resources 45 0 R +>> +endobj +45 0 obj +<< +/ProcSet [/PDF /Text /ImageB /ImageC /ImageI] +/ExtGState << +/Gs1 11 0 R +>> +/Font << +/F4 12 0 R +/F3 7 0 R +/F5 15 0 R +>> +>> +endobj +49 0 obj +<< +/Type /Page +/Parent 1 0 R +/MediaBox [0 0 612 792] +/Contents 47 0 R +/Resources 48 0 R +>> +endobj +48 0 obj +<< +/ProcSet [/PDF /Text /ImageB /ImageC /ImageI] +/ExtGState << +/Gs1 11 0 R +>> +/Font << +/F4 12 0 R +/F3 7 0 R +/F6 16 0 R +/F5 15 0 R +>> +>> +endobj +52 0 obj +<< +/Type /Page +/Parent 1 0 R +/MediaBox [0 0 612 792] +/Contents 50 0 R +/Resources 51 0 R +>> +endobj +51 0 obj +<< +/ProcSet [/PDF /Text /ImageB /ImageC /ImageI] +/ExtGState << +/Gs1 11 0 R +>> +/Font << +/F4 12 0 R +/F3 7 0 R +/F6 16 0 R +>> +>> +endobj +55 0 obj +<< +/Type /Page +/Parent 1 0 R +/MediaBox [0 0 612 792] +/Contents 53 0 R +/Resources 54 0 R +>> +endobj +54 0 obj +<< +/ProcSet [/PDF /Text /ImageB /ImageC /ImageI] +/ExtGState << +/Gs1 11 0 R +>> +/Font << +/F4 12 0 R +/F3 7 0 R +/F6 16 0 R +/F5 15 0 R +>> +>> +endobj +58 0 obj +<< +/Type /Page +/Parent 1 0 R +/MediaBox [0 0 612 792] +/Contents 56 0 R +/Resources 57 0 R +>> +endobj +57 0 obj +<< +/ProcSet [/PDF /Text /ImageB /ImageC /ImageI] +/ExtGState << +/Gs1 11 0 R +>> +/Font << +/F4 12 0 R +/F3 7 0 R +/F6 16 0 R +/F5 15 0 R +>> +>> +endobj +62 0 obj +<< +/Type /ExtGState +/ca 0.8 +>> +endobj +63 0 obj +<< +/Type /ExtGState +/CA 1 +>> +endobj +61 0 obj +<< +/Type /Page +/Parent 1 0 R +/MediaBox [0 0 612 792] +/Contents 59 0 R +/Resources 60 0 R +>> +endobj +60 0 obj +<< +/ProcSet [/PDF /Text /ImageB /ImageC /ImageI] +/ExtGState << +/Gs1 11 0 R +/Gs2 62 0 R +/Gs3 63 0 R +>> +/Font << +/F4 12 0 R +/F3 7 0 R +/F6 16 0 R +/F5 15 0 R +>> +>> +endobj +67 0 obj +<< +/FunctionType 2 +/Domain [0 1] +/C0 [0 0.5019607843137255 0] +/C1 [1 0 0] +/N 1 +>> +endobj +68 0 obj +<< +/ShadingType 2 +/ColorSpace /DeviceRGB +/Coords [50 0 150 100] +/Function 67 0 R +/Extend [true true] +>> +endobj +69 0 obj +<< +/Type /Pattern +/PatternType 2 +/Shading 68 0 R +/Matrix [1 0 0 -1 72 273.403] +>> +endobj +70 0 obj +<< +/FunctionType 2 +/Domain [0 1] +/C0 [1 0.6470588235294118 0] +/C1 [1 0.6470588235294118 0] +/N 1 +>> +endobj +71 0 obj +<< +/ShadingType 3 +/ColorSpace /DeviceRGB +/Coords [300 50 0 300 50 50] +/Function 70 0 R +/Extend [true true] +>> +endobj +72 0 obj +<< +/Type /Pattern +/PatternType 2 +/Shading 71 0 R +/Matrix [1 0 0 -1 72 273.403] +>> +endobj +73 0 obj +<< +/FunctionType 2 +/Domain [0 1] +/C0 [0] +/C1 [1] +/N 1 +>> +endobj +74 0 obj +<< +/ShadingType 3 +/ColorSpace /DeviceGray +/Coords [300 50 0 300 50 50] +/Function 73 0 R +/Extend [true true] +>> +endobj +75 0 obj +<< +/Type /Pattern +/PatternType 2 +/Shading 74 0 R +/Matrix [1 0 0 -1 72 273.403] +>> +endobj +76 0 obj +<< +/Type /Group +/S /Transparency +/CS /DeviceGray +>> +endobj +77 0 obj +<< +/ProcSet [/PDF /Text /ImageB /ImageC /ImageI] +/Shading << +/Sh1 74 0 R +>> +>> +endobj +79 0 obj +<< +/Type /Mask +/S /Luminosity +/G 78 0 R +>> +endobj +80 0 obj +<< +/Type /ExtGState +/SMask 79 0 R +>> +endobj +66 0 obj +<< +/Type /Page +/Parent 1 0 R +/MediaBox [0 0 612 792] +/Contents 64 0 R +/Resources 65 0 R +>> +endobj +65 0 obj +<< +/ProcSet [/PDF /Text /ImageB /ImageC /ImageI] +/ExtGState << +/Gs1 11 0 R +/Gs4 80 0 R +>> +/Font << +/F4 12 0 R +/F3 7 0 R +/F6 16 0 R +/F5 15 0 R +>> +/Pattern << +/Sh1 69 0 R +/Sh2 72 0 R +/Sh3 75 0 R +>> +>> +endobj +84 0 obj +<< +/Type /ExtGState +/SMask /None +>> +endobj +83 0 obj +<< +/Type /Page +/Parent 1 0 R +/MediaBox [0 0 612 792] +/Contents 81 0 R +/Resources 82 0 R +>> +endobj +82 0 obj +<< +/ProcSet [/PDF /Text /ImageB /ImageC /ImageI] +/ExtGState << +/Gs5 84 0 R +/Gs1 11 0 R +>> +/Font << +/F4 12 0 R +/F3 7 0 R +/F6 16 0 R +/F5 15 0 R +>> +>> +endobj +87 0 obj +<< +/Type /Page +/Parent 1 0 R +/MediaBox [0 0 612 792] +/Contents 85 0 R +/Resources 86 0 R +>> +endobj +86 0 obj +<< +/ProcSet [/PDF /Text /ImageB /ImageC /ImageI] +/ExtGState << +/Gs1 11 0 R +>> +/Font << +/F4 12 0 R +/F3 7 0 R +/F6 16 0 R +/F5 15 0 R +>> +>> +endobj +90 0 obj +<< +/Type /Page +/Parent 1 0 R +/MediaBox [0 0 612 792] +/Contents 88 0 R +/Resources 89 0 R +>> +endobj +89 0 obj +<< +/ProcSet [/PDF /Text /ImageB /ImageC /ImageI] +/ExtGState << +/Gs1 11 0 R +>> +/Font << +/F4 12 0 R +/F3 7 0 R +/F5 15 0 R +>> +>> +endobj +93 0 obj +<< +/Type /Page +/Parent 1 0 R +/MediaBox [0 0 612 792] +/Contents 91 0 R +/Resources 92 0 R +>> +endobj +92 0 obj +<< +/ProcSet [/PDF /Text /ImageB /ImageC /ImageI] +/ExtGState << +/Gs1 11 0 R +>> +/Font << +/F4 12 0 R +/F3 7 0 R +/F6 16 0 R +/F5 15 0 R +>> +>> +endobj +96 0 obj +<< +/Type /Page +/Parent 1 0 R +/MediaBox [0 0 612 792] +/Contents 94 0 R +/Resources 95 0 R +>> +endobj +95 0 obj +<< +/ProcSet [/PDF /Text /ImageB /ImageC /ImageI] +/ExtGState << +/Gs1 11 0 R +>> +/Font << +/F4 12 0 R +/F3 7 0 R +/F6 16 0 R +/F5 15 0 R +/F1 97 0 R +>> +>> +endobj +101 0 obj +<< +/S /URI +/URI (https://www.microsoft.com/typography/otspec/featuretags.htm) +>> +endobj +102 0 obj +<< +/Subtype /Link +/A 101 0 R +/Type /Annot +/Rect [187.1435546875 286.002 298.73046875 298.502] +/Border [0 0 0] +>> +endobj +103 0 obj +<< +/S /URI +/URI (vector.html) +>> +endobj +104 0 obj +<< +/Subtype /Link +/A 103 0 R +/Type /Annot +/Rect [447.224609375 245.00199999999995 526.3994140625 257.50199999999995] +/Border [0 0 0] +>> +endobj +105 0 obj +<< +/S /URI +/URI (vector.html) +>> +endobj +106 0 obj +<< +/Subtype /Link +/A 105 0 R +/Type /Annot +/Rect [72 232.50199999999995 108.181640625 245.00199999999995] +/Border [0 0 0] +>> +endobj +100 0 obj +<< +/Type /Page +/Parent 1 0 R +/MediaBox [0 0 612 792] +/Contents 98 0 R +/Resources 99 0 R +/Annots [102 0 R 104 0 R 106 0 R] +>> +endobj +99 0 obj +<< +/ProcSet [/PDF /Text /ImageB /ImageC /ImageI] +/ExtGState << +/Gs1 11 0 R +>> +/Font << +/F4 12 0 R +/F3 7 0 R +/F6 16 0 R +>> +>> +endobj +109 0 obj +<< +/Type /Page +/Parent 1 0 R +/MediaBox [0 0 612 792] +/Contents 107 0 R +/Resources 108 0 R +>> +endobj +108 0 obj +<< +/ProcSet [/PDF /Text /ImageB /ImageC /ImageI] +/ExtGState << +/Gs1 11 0 R +>> +/Font << +/F3 7 0 R +/F5 15 0 R +/F1 97 0 R +>> +>> +endobj +112 0 obj +<< +/Type /Page +/Parent 1 0 R +/MediaBox [0 0 612 792] +/Contents 110 0 R +/Resources 111 0 R +>> +endobj +111 0 obj +<< +/ProcSet [/PDF /Text /ImageB /ImageC /ImageI] +/ExtGState << +/Gs1 11 0 R +>> +/Font << +/F4 12 0 R +/F3 7 0 R +/F6 16 0 R +/F5 15 0 R +/F1 97 0 R +>> +>> +endobj +115 0 obj +<< +/Type /Page +/Parent 1 0 R +/MediaBox [0 0 612 792] +/Contents 113 0 R +/Resources 114 0 R +>> +endobj +114 0 obj +<< +/ProcSet [/PDF /Text /ImageB /ImageC /ImageI] +/ExtGState << +/Gs1 11 0 R +>> +/Font << +/F4 12 0 R +/F3 7 0 R +/F6 16 0 R +/F5 15 0 R +/F7 116 0 R +/F8 117 0 R +/F9 118 0 R +>> +>> +endobj +121 0 obj +<< +/Type /Page +/Parent 1 0 R +/MediaBox [0 0 612 792] +/Contents 119 0 R +/Resources 120 0 R +>> +endobj +120 0 obj +<< +/ProcSet [/PDF /Text /ImageB /ImageC /ImageI] +/ExtGState << +/Gs1 11 0 R +>> +/Font << +/F4 12 0 R +/F3 7 0 R +/F6 16 0 R +/F5 15 0 R +>> +>> +endobj +125 0 obj +<< +/Type /XObject +/Subtype /Image +/BitsPerComponent 8 +/Width 400 +/Height 533 +/ColorSpace /DeviceRGB +/Filter /DCTDecode +/Length 61494 +>> +stream +JFIFHH AppleMark + XICC_PROFILE HLinomntrRGB XYZ  1acspMSFTIEC sRGB-HP cprtP3desclwtptbkptrXYZgXYZ,bXYZ@dmndTpdmddvuedLview$lumimeas $tech0 rTRC< gTRC< bTRC< textCopyright (c) 1998 Hewlett-Packard CompanydescsRGB IEC61966-2.1sRGB IEC61966-2.1XYZ QXYZ XYZ o8XYZ bXYZ $descIEC http://www.iec.chIEC http://www.iec.chdesc.IEC 61966-2.1 Default RGB colour space - sRGB.IEC 61966-2.1 Default RGB colour space - sRGBdesc,Reference Viewing Condition in IEC61966-2.1,Reference Viewing Condition in IEC61966-2.1view_. \XYZ L VPWmeassig CRT curv +#(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y + +' += +T +j + + + + + + " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# +#8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G +k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 +uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! +zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)KmC  +   $.' ",#(7),01444'9=82<.342C  2!!22222222222222222222222222222222222222222222222222"O !1A"Qaq2#BR$3brCSs%5Dc46Ed1!1A"Qa2q#Bb ?b<7WP !LP1?JJJv)(RP14Jn))]KI@ ]Kh4򍴣3L''4Wb IN%%u-u&+qkQLTwmm8>kNӍVa7 PcDP#jh|\[%$bWR""bؠBbLWbPq]v+@ !&)1@ +RjJv+Lc+ؤ HiؤRP18PqINu6m%: JJu%7ƝLPiTw4dҞ(ɤv(v)(1]ZPkخ)Q͸>ÚeMFclyW'k_.LDAq|t86 qsNI`cڝPI+TE^ydbU~=Gzѡ&80AW1{_U 'Pn[~ϑPXdJ$W![ Gڦfo|tWp;A%MRm29{cњ"`-*(G=uM5H 2*:MZtئ!)qKPWbPq]v+@ 4P &)E-Ju&(RbLR?))RP1RbSIn+Ԙ*\9>ԘWSImu;ؠ )q]jJ@9ڬI˴ c#>p:~4cl QBЈ QA;{r*0HBpW*FGZ' ̇O-Es&1xAugwt|u PWo99-Jŋ*yyKoYq5+cDmVko^;z`h|~KLRÍ,{71#VuI콪iVaRII F h-+o#dp^O֊|j&KXC$HE>w9S)k]/Q 3ӑXN{ruCu6]|42JPd?ڪC(cE e,:Vh5t{Sd7zgJȔ@VMOk2eĠcQFlrO5YuUfF +߄~6fO_s_ң[QͅOpZ,0_I+WuIjLcAU6nkD%*UE6 +\WbDLRؠ5اbWbP"ҝD]ӁN$66))S&)LS(>RS]f+ԘJ7اb E\Y0hԘؙڢ<.+v)1@ LS7"T+;ckg)I3)$E5弊vӥ*:pqJ$=:⁥cUpBҋ[rT9$mxdҍQ|?3u8=1ҨqZ)f} %힚map +*{/ךe:W% |mi;[#+n|FpO\c"'vW=`2>JY1S7 > EG3H #7/FeS ,vRqht6l6oLap3랕D[ׄ]$aA.PB*đ?䞕LJ&fBC3n5ח +'ئ"#'댞{OӢq=WW9>qNJvg}Q O'_ [Z@ 'N<Еd]I-7,I3p#"{vmH($}z+gN5,jNk>OiVb&\;(Q3ztZLrNXۻJ}̲LWb]LWbBb7.(߇X}M; +I>F^D&)ئ!;Wb]v)(;ؠcqIu&(bTJT:Baj,dRLb7اbLRb]@ &)خ$Q͖U#1,ilߙx` >N0ps֟"+v=꜉WܷJv0BoOOjbR4 +2s׷ZumѣV&}8C_J s"I˽uǵtncKG)Ֆ9-6L\"_ Bnlg ciU$hlFv&w)SAx뚳]CCةd1- }p:dPDŧnXA,TrЎr=zTYtMˡ،0g,s.giXV(8ܤ>>Z`v& x'82*Ċr>d&9w=qO&)RbLSRbLP1]v+@bBcMDG +I<94BsM< `b!;ؠbWbLSIn+Nv( +Yv+@b?Nnki\DEy$sRYH2^=WI-'Âcz~{{I4'kJĽisi.!IK9+uZ=1/Yzn=g5_`U%Ν"% *ݞ9TfrJ>;|3 H(cj0$j|^gWW~H蓼ؠO9/`Ef$|>쫱i%Sy;91 ACߑ9Zoj7rB $ X<#㎼J:ۈ]0{7 L{j!h +*Ö dǵK4(.t*jb\ (v s3H9jxp/$(IPQp0$9 TOMGQ77(@MK}Xr[=1+m͢0$@,n;Rx$acev(aZq6v>RȘ{FjN;粁E᳢116)]Xrur1ZhķlHay:dV7ƣ&fߺ),dF!gfl\(q)d 0EWš#S1+lO~1]{KZI&eN·rz,($9B|?>>J_6@'vG[ sQFQ#ϗve9ތ%8T*~OӭQ6^1IOM" fvZ2X=1]P#طA늅, % +Vu>S= -,yS d;.Q(GŇsԆSUWS2d@*x!1]C壊Bŋi Oϵ[qo 9 +Śi^ٍwZ(#@R(\6?1R,^X]]C\rSHsS-hPqޝXOuO|b1aj2{eyNK+R22bp~C$vrD[]# CIJʕ>6#=핚|I>d$PsFsۥS^Hbl߆>3ßj5< :ʱDW*O^Xp{^{`b opd+q8W)[-Qn!;Wǵ]5IEj1Mwt9Cdc|J7Hr7S^zj*PLHdk-㏮>Ž.}9Yf dOߨV~ Yl5x䍏 +?zfgI%nE,ҁĒA,8<QkH810~B/%+?/G @A +s뚧I,TO9 I=InүoLp VeOJNm[eF1Y` 'S$rLBĥd+v8v#pp}s+܇@~~y" +uP b{ի[ȠxI0YAu)ynN88,8=j̍!lor##qI$JG-ͼx2YA>;ZIQ\XƱxp!;} {fJ˶+V'cYq QzZx\32 +9F?jqis,$CvLGkgxx4d#h'zvIq,i b,U<߮Oqrj.U.+ + |I6odpA=1_Z+Oouxs; d1o,h08ȴբ*#[HeKVL+'cO4&nkhUV7o= }yVQ"62Xzr +S"%wGܔAi=vu"5%Ϡrok8uiu,tIKso;~)!e9B=ANxvZ7u,4+;U'T-n}nKS^]o+r;IBfXᶸKF$!?<^:mfܤ/ O sI/YjIÈ08h<v*K:3=>U|3s,|Z4pU\ȨY].oӗC1Z+{y3p7!<|ގDϊ%i&D`@/9ӊka c0=2i[̏᳃f'j =1RCvW2P|zսhIJ=pVH^!(UJyیsu Fi%PpQ Z#%M$˰ q=ƭ>^i…q +ObbF6)_DGLhL1 ~\FDI P]r1A'1ցO=BG\F=~~nS{i#C,H6v($NG{U DKuKne2+fb~^h YB 2pq׃t湽^)ZFjQ-t{9S[;umxL]: t'qa|E[>!28)Y!`@Qߎ繇PNi$#C<{2 R>zڃՖށolULLHIc֏\KnH>V$ +crs45t[[<m HPA*ǂ +ncdfI 7ӯJRբ,!Y`*A>YT@K F$OMmb݆ypy֯}nQ)]CPM mBs#+?E8()@ҝ°NJf\Glة6m5qPG$겳$|e\vwMKmao3\"eqjIU6;nٶ%d`I`8ֲu٧E[$`;32g#ڛ ysq]sp4kH c/%.8F#8j>Y)zr5?똄r +\c݂FrOhEʛu} =sZUE$FI$|30p9P3\X2?mG\ z{{Y] +2;;֖VDټUX#rX53@dh+˰$6⢼EfV]ZEăF߄p:2\~>L$ԓ5ޛ\I\(,x8NN3UuMVy}̗ IcBÌwsӃj +O:Dipʒf9r+]Z8Hp )Q(eėK5̲\I$J&8D +C!iCC:B|?{_*/&. @(ngU%xݐ! J~oОDFǍR?v8\Uƶ?>nwc!WڠJ*Ԝ@v\KjbFpO VИx7;H35 {[xg8ul^|(MF[zU()͕ltPd +xq<9<ֺgnc)Ԉr +*sqשJ%}KCwI09Pch.6PAq"%I'W? e4=%ӖQs6kqm\[,?2PrRPWnI6rxE4jR+u<# (zz.,My2,-NI"6>FA #tælfy<dbBONrKdn>ܞ+6i&+T R 7aFH@䓞;py7Qݵۉvm#yz) e< +8}, qZʹ le  (S͎_*c(OTPXv;zskD;{ !#trGrGKxCH-(l0rA=8K^>&(1qk< +*X=\.sZlv m80Y@?PI', )bRs.y$ryﶠ%MM )&Kg7垕Ĵ{6赪x#Զ5׃d:&`/μ]\n, YB ˜WVLc~J hL".FѤ];DkK3n:4N>jz;IGaY56Aഷf[#ns9^EolQ|opTB.'I-#x8ٞ"^_zQt s8EeNy%6N{3 c 'tZvN^$]U&N=ϵoǚQm&,TOJyeB"X;NNY5b|zt:y{6aν3mv)W da%෺ı̧$+?: V )F>w,rF*rrv,xa#8n'/cӁE?ª,7Cz8惴SM&ۈh =*!cuG1cU=6])^py[ S]*)G"bBn9{WVnIlnc?Lщr= w3}V6QrOP W5ު^-# Ӝj[տ Hϔ2N2Gn7,VZ*' +0I=1gK$T}ƛ*P:>ۆzO /D:dĺ(5'=3Я ~jLH'msŜerq87:LKfc>1 ;2]>a˥%2Hwy cU/X&8˰,qӒ+LF~)X7MnP{d0 X!ASAӊ ,H7_K9;MrYxnd]6VL$t}',ogʺKe&4lLkOeO^(jr[D%ֻ#MnI6k,,wI#e%OL~XDVWz)HeހxayG *0GߥBxkdLjsjQXncF4`k"')F\_ᧈi\0" ѣ3ɐ2à=~64ShCo,)FanM]A +'`mU]rzsaG-QEQλD 0us3r7[!m' &˻ ScPm5Gy;vPNH #z,I 7nLOڛdĥ`3ƓNo˭|5Rp *Wཷ&Ig0|N9Ռncy^)Z(+Nё8N[ ȸX +Xrz^֩n +ɨ˧ot t]HX<#..-tƾQ*8㓃JQ}ݲ_c> ͽvlHo8\@eOkqXŒ̻T:`Ѭt].-*h q8<ϨIo5Λ"A K;#:>XdQ?'tD"8%ڼ?>{)P7d[GeA nϦZu`5$_7QHJ6<1Dp@$L d椔ޖREŸz1fFM̌'ϧn, [`HFv6\`t $r3@%!YAb0NO'5&ʲ71 s}ߔ\HQ L#Zӯ,Rew.,#LF[M%Y O,Ǒt'9V伺6u46ƀ"ߞl$# 68I6#EnI..yovF<\t'/Yo/y+qQ[KlP|HUNA\cAYil+F8L֩풔} e$B9%+9pYʡ$<0H{`9*ʟKM*JH# 9l=zԚlsK REl.rzZ`GRErjI,=L]p3Hϭ%f/PX}==j{$#o)~-\|UJk`H]Qy$Mg{AG]#|`>C=z;i&!HӶ(n‘]4o81uesʶrs(Io6uyaW< +NM-B^k;x q$Dži+f)3 Pӂ{v247UI.;nR^xJtwgy2rc? +ޤFH`^{sVm=-]2`W~\fY E cX\H@Fx.v' +LBj0y+%<5tT !yÐ}֯ifXusᜳnzv8*)]B431XvO|?%X] zbh%K dGAxU5g9UR c޿~)L+7sJm5qKۃPSK|q+H'~v FpM c;᱀ǐ:j<t8rMhtKTtaP22qlOtot +)򇢜y7.ַKlƬa ltRޜW aAV6-Q\|c&ӬnUF 0I!a:YXc #:-Ȉc$d'9ǶߥmKO;[G,}61 w֡Nn<c`ĠxMڔSC`wtH\Y$2!2FU=H-iDž5PL[eNs;9$މZ6Bڃ$Q:0ܕ o/a۵ 6 x3W֢O["6',snASBx& (Rɽx$qډ׃k.Ym[,ÑЌڢrܝgTE,2ycq^/|-uFR[\cO.['IWv8J=VTĖ1[ +aF+:s:Ӵ_[%v$ T^ >_,[o"Im'X110B4RKRFPȻco2 $?Joh,!$; uw.cupPF85i )^~'JjĐ>!$随MfR"7r%A$yC-(#XmEFqFFv L WXH3YK>3z{R#)98Uv,6mNpzSqmc+&X )xsL*ܹNjnL0x`g}pa&OҢfeO=${cҨwkxbcMaR72Ndyzs|F+!>5xc 0 TK;]lX)d I\ႎI5Kigf"xGq.H< J|{j\AO%97WVfkuŔLvhP-'=/w4LGS#a8 㩬h޽ċ7Lmt4x^kHbHwAW;OslTf]k bh` [ Nsׁ5;1 w# ޛ[II2ns!†{v +b̓t=Xd|(ApԂs#:Tڻx7*vC5àePHR@ϦG^mB1lX|A +tl ǧJ_\-i~fXUVbI"p;sɡBYrm4>]xP#uD{ U)XĨ0ܝLMKWeS;p<~8'~^H(*䒛uH,7Һ3(F=:E,D.6q +U<-F$hJ!VQ' ܓOzv4%E*eDA-5;+yVXVKџo 9AVvMSOHw̏N*` sִw:Fngl3;}H>(^dװܩZlAUʃsZ}KNCmFhQ啡*p2[,x9Vrf..*VLaAEa:i%ҕTXC+dsr3LTr=Ł3x',?Ìa}hw+w_ +Z;(#D,0O Ӧ~kOûu e߹E ڢ2 |gў@$ce }jΞq*$@:Pe[trWGd$dKXG2 sz{sBnW%2KܮNI=&NK1bOkcntFBD]tVYA9꭬^Fm0Y1sӱVVKne&S6I<*6Tk֓;PHURHPϷw %[ +X0pѴ Hq3Gi+Hyzg'QӢbi_f7];{:ǖgԸl8[#omD.-RD #!LCRgE0 ex^8?΢:rabC!Q ۃWʓG+픰 +wQǿ^՗}ͪjvlD4K$&#c<{ hgiL͈9 p=%i,WNa987CW%XDQޣB ]8 )8'icwH5@JI+EOym2+#xsDZwTgisLZΘkhc]qb={|Pu V&9Q185T%.E>%MV\E=i]K@A9~@$DX>#[>qdi&e juo69[χxfǝV@XДtSҴ&tirŀ7-[!@-$q֩jsT[f,9'QfC#C!E, ڄ^-Q\4iQб +''ﶪˍ(T,r| vy-ޢlw/m8O&<9s۵h #)L7L?>Ms֗K$mf`PRdp*{߈a&(v1 PO烟JK'/@2~}[e+3F5Z4+%y]و0sZBn.ުXB ͤix#8Ïz*0@ B*%vfBT8\ǐ*|UKfp +sy7* z^p1QǧWC涊.{su4 Aqk4x|IROo+GӵYe1A87)Lg}ϧaɛsM!粃zC8yI)VVw乸 QrZX;BW@aY=6Sn.O #{6BbJ "v3}:U-:eJڰTmݒj;VB"}s/<{oOI/53"m`D(f\n}w>Rs5LhtqD7m-mN왧3qp@QUtƒ/c[VgBp(όu ݡHYe4[A09 W9y5WR&mcTfv,p@{]?7:k$$Vmq5V74[kon#i~RcRљcsN'<߻0i68[B`G.ď+0A''$~+q *)fKA# (dqu"dmb3[i ̨:3\q rx4_V}Gp'~ʃf^Ge_\ռ1}mHq +&Ol1L6z-#.3o`cJ1$a/ ze[rxC9q7֗^:Qxn| 0FG'cVdȧcRM%꼶EeDٵFOԜc}[]NKK[e@1]|s0y"am}wӶ+r(nhڞw%;\If J88UJ87)}iI5 ucB]Pv;I$ҧ_sB0Q6ߚWPfNpL{[K}T4ͥ$Hs ܏J&T1bӜ!>jVbl&Ko b1ˎ(y]0 + q,N9kV6:ޜq N3sa)4 vR0V1 ߙԜ.Oѱiw:ZlhaXCW'c >"HH#+K@g{g4Y_ cq88Jw"]Adϰ\"ePAT@98ŪJwPK[7X#?*qӾ*:|=R,RBn08zezKh&cƥ%s)>UwkWgN0Xʉ0 UL絡Fek8[H@,T2/ -571KJQ190iwźe?.‘G~5,팩i<:Gn0Nֿ5~ cr(+Ϩ^v$[yaWF:~UCO:qs")e:}]~rNp88Ž19$VlnM ʖZ$_|uc랕dMv%Ȏ![$y'kqڲ]&"ͮeLʐ=S ڱ2H6pc#Fy>>QHœ[&Y)ZDl,sNO#y{x;F!pbX.VyF#$(U +1^Fy$/D3sMinfi'NTdX=SViu$U!K6RU*Qn6K]x$Ni ;x;hWUpLl8Hϩ4Jo.2r1`Hh^zl.2Ȳx Œ: ǟj)6R,d"}]0hGw 08qbCؕ\gr9_ .5EeXͶ(FXԮ2zZ Բi[4$|@[qfqUC[%+zFY)G N1(+K%ɿK@ERBqyo#]F([动A ,9wF=΅5"6]P0$ +=x=55LMhnSEnd/!;N1Ӯ #II"T ]Nb{o͕߄NɐJpA=_]\jz kz+0$}]G 7r_x|]u-#ۥkk)ZDO .?5ٞLy&xw2>%#u"VgQ;@ ==l#l,.R'o[˛rm5Hc8l|o<˾A!F >Gz[Mg5YG$r1 A9-Ul"ha#Dd *Wp;O8/tdM!#JXq#i>Ֆ0j%Sit<ZJ]IJ" IG^: +XŷaKv¾@ Qs5uƅ|k$BYE, 85-ntUTx;lzזhk +1}~-d(Ȣ +#%OMNM|iJ*@R1@Q-I+px9'E};Bi/s,%SktmEǸ9ּ-~ .#񢻄m;vr=kqI sUXz`ڼOM7L߫"4,F̑(/ 1ϧzvJ^>6>q-s$qVtm揶I-a3[iSsӭm4ܶEf~,ݴ9d&B@`*u5%ۛÊY2G?nեuy%J= (r63Qxɻ_ÿJ|;7Lpq؏cVK%r$&_Oqg=9I_̓j;;{[,In{vy]"94-D#%|9 ṅZS\vi%x#?΢$-v#,r@YG8k;vuugЙt)⑉VQgӱ#1Ri_LPѺ:xRID%˧|r*Nw }-V+*Où䷿Snoz_k4r-@;9{q-?-7FS0p瑎br-'٧ydu@G>]Fb[Ų5` .s'ܚT ٓOF0!xyo0R11.5[l-ʹ7LpSm?^eup;rr:0yf힥.,Tilo1(q^y3׺u $c&K;tھێvyn4ݖtqN>7i5'fK7=όՃ0qY=?;ey;(3.C6cN=x:[ib QHH5l{~ +܊ST$m_>_BF:w0TwE2׌>%wϵm^k[[bebr,KfEuՙ]an +N7 @5,2¶ _f ԒowM4I=ܖi<[6䡣̵{?6IdL1;:`uۤXn4r8 ugo}erE$w)pHxB:bQD qu# +ѕ8=}TWŶkKHċlAz}Iz 3[xDd"ےB=kb?hCFl.Wppͻ$FqO5sSצW7&yKIqѾp*xc4r-5KFYxBXz-։/M_jI$Hqz9=*kZ}ؿbr2s@5 ocu0]a3Ўzml| N-dG`K/AǠ8 n.B'W;JxdGKi I>6@x=Iϰ*mL¡]CO^ ws_bK{i?{*18 XZ*ç\B e5)Im0Y+`#ӊtܬƥ)P+Hޙ* -fi* hkN-坑$cxB/&hH\@'5T5r}ڭvG"8ܻqzQ? r,mbz8cYkxond"НpIϧֲBeBXw0Iު9=0ژ[,PyOy4/PW[=mUoGTT[ty$a* n`;n;wuT)i"ޯp)%vaVAEl|K/R1Q~h=>GS(*Eapt鶶Ho08?ޥ[Gƙ%1=IJ)}pb'_P{FtυLYnv4(8B28GCϸ :+Eumۢdcw=LW\  ׏_L(VT[xw&uId^#fNH +9j5W>"Fi6zTcKxKQ0+,u=|m.dž;ǨF_,,2#SH tsisAf.QI>=bhߑ r$CYx8=ډ3D[ df )Q~?xzWOD |)ۜ#uE9Knm,&<ep88뺍 @hAy8:cT!CbW!<\ݪAIc{ +q&VtO>$a|N.5 ˛eFp3K}6H&Ukmݸ #KqjeL|&T +XSkj̩Dhm#z܈ndjEki%`S < g#he0drNZ FH!^zsߵ_OtmgΊu﹁,~cڨǮ\Giko4FYrzxE4w6 +G;?+։ѱ,Xӳ<xw^X#@ݞ@+{ ckxCĘAlx8ZUBIuE kXlm!}Dٱ)=8ܷbe’lX-:ǽX:rGڠmfՙm*+.ь(@qI~mwndOINwQ6wzc]o`]E)ZQ!@9jRC}[|T<<BN)Yܱ\qqӎ݈5>y&h%͐OӧJ|:c.% #YbQ?BsSX+lV+[ :ON~z}:74ᙉP9.18^TI)!7= % +p8Yy=CPk7g90Ѹvr}y0jkˍ5v_B|Ee`=䴽BX5"bXoP'9 qy}vD0 [D"Wc"6bOr>=9kW ᢌTQGz?I]EH$7Uo`I 420..#]r#=8޽*\.)%R8NI@>M"k%wǔnWoV;X˦E3Yv1秡WǰO V]?\ +$N4%of>++hL i lwqʎhɪi]˰A6sܞQ~$U-+0VQ׌s2G(}vq>,H.s/sJc~K2.衊&!T #<\)-DK"t^!B.X܋8ⷵ$,.s'$dxsnX X FxH=^AvXob,#yِPr:Jfck&u3qmn-̐YGR:d9gH>4٬˴(ÌKEgO -d$M P `2vt/<jT´g,,M)X2'3Nヒ1֩a5ӱHu12 OiXDRkFg@u5ֵj\9ڠ``3n*W",1AEŒ7Z*K~ոs9捶s3ž xfW {V+RDqpZ&\֔Nm76#l WѬMNi$˧ +GSҁE"ʜjk(gmؙ"ڤ;՜TP>ǩ6qO-rcq< yr_l)/bˌV._g e!;N[ Ӓ'}3CBQGhrj9mavÀX1VR}nxb.((23^:&EvJ9=rH'?fI{yU7KHI +zF jԭU}%^ VE7qB~j7iK|N2F2G棰{u{O6:i.O wW@*8}e|wx1Dd20rNr?M2VS[jF3OO1OYٺ]'wxkڭƫ-ǁ#adᶎ9;o]~=E,1`H M]Šo ЏŲin v$o'qT~/Gՠ 7 G /n8Ӛݶͥ68 8" bK^YfH +Oة3܏o~(ǰ졥5Pi6"oQw|Jߴ&idhYw<`=隍q4 ECQzdu CI 5#d_2bY8)'RR^3ܲqnD|HnvӕmAo @^IA:M5"B81Vj-n 7++@z{Ed c*:{<(8g?AMQޣj#X[11 ^KE+ʠBp'On:i{}VċnTKr\Z;DWY$4 nyZ{J!"}۠0rxԼ [}v\}jPw[{-@Oy;Zj7$ca|?NO﷯#5 +,f|9X +VL 1x846E Ospͻ=}uԗ~'31={}UivW 98mh2ɏz8vUhEm?MC5gk dȧ vatC2@9_sqVn +C#=I.+ :--\[_1lgzw{ hjxQ DE$ zjݭjnFm5ŽWRۆan֣,eJ$>txf%r!@ +їK~|hgTZ5?k[Qη)C~1oMJ#p8"s1ӵP ݉ݐU9dg|T}Ln[DB Fx1'yǯz!UrXGNVJOKYLrneQ=3[->G8'; $jom-lQ4e`C.]Nj=k1[DNpO55I[43(+4Gݸ8;vqGodVݣ|,vFqcڟa㮱o6CBAoQjρΥyeq1m1a8?JZ5\$_p vT!){ZK(#nr 1+S-qed u6rOJiK +(#u^y9=IءN2VDҭ0_i > BF6y7zQ !tTnoE+;PUG#ʒp9g](1[ RGX˶79oRT%Z %* I%GLͯˉ%Cw==*YʊIOaXi7,*O.Rd]4eJ6+G8[Z Y ԓܓv4WViL҂Asaӭ%nhSdW I_1SQ|[JVQt7rN:p=+a:\,Q\‡ŹC&ذ9 'L4\KLhc[$?J9Ssshpy‘?Q@ vG70[chRyykY]Gu> .FHP3GNƛRm|EZFf&23 0~G@ +ep&wcuu!Mpxs.w134QTE' +r~MUYj^mmi%2FAcwѻBDR +nr[ F<~- +^f>^rI<_i4{[:Y|efC”Ǩ=NhI!7HawNֱ\["0Q]} OO œVAkGbUKpMQLqV b>Ra'IVz#<=y3ac?X +?[ | )OM-τBn#,3j3|$ pp}=JQƈ~bKdT2Ld+ z]-@ڱ#4B{ |XszK<3v6>g->-,ծ)8Nx>RH,)&sz=*(5-:)3YGpV{)7^!HUm~WȨF+1zϩ=sH0 +8ւ yذ[G)G5ؙ8;Iݻ8zfXi?4֎Fg`9?J)M@4GHp 9>֥]6}vIYHG^>N7FMv$:6zPKd ͅ׬4z,nO"uM:зV!٘!Uy>\p{u<ת}:<C&v$wM[UBf|Es|L,=G@.S.q24. sqYK6Dfʹc?{ϯ\5IdUyWĺ֋lu. R 4WLȮw 9$yOp k~ +Me>6v#+c=)<13^ qׁSt$~.[:z9Q_].؁HO`]B?{BY"Blj**0_H Ô.I;22͖c>i O +?/Ldmf|]c[ldE`E3;Glw *ih ӈ^ZIQ 0y3|3niEцKUTWcMJш[WS]mث<[pr;±D;gyq(هgi66qԚ|7tzo=t)$;|Z"NLxp9pȫ'Q9wO צhfgĘ{{/?k4E-NbēOOPdxr-ޠ^?4р]n5ZIKrR#[8<o!pX8@ܫ-Z/~MlxK, OްڝX]8$U^ 0vr4ݰ;QuF|7ʀ >c߅EHZMR\H?[g6bȻGiγ +#.4Aac׽R&Eb.mb8ҽ#Uz-^;"eY5.gYjkt%JHR:ԣ1^ZMfҬ€T6>=rZmh|RrPtc]+gpũMyZ?j w=۸x>+ǑQvŧZ$ˁsW[͚=JhԩF<Zĩ)'Þ)=6'q g\qĉW;3zzT1Q q:UğC :tEOm`/qP'.$QXPXv9u#H/Kx`ڣrR{5F~1J(JۃSz~SƑ_»p?|˙M&@Co@o$z@qK29DKCb`qMS$C܃ESVS6HQFpzm/ 9׍Oqs} W,IG]b +I'sɯu/³Ii"Kd=txzGlvLo֝+=gP4č\-|ǭ@iM,n #|c~0_Õ 'su>(EPXsY2?Hfm_SPX'$eҼF>"5-.Bc-y^M1ˎ1dY?+/59ehw j)Bt 3,JFd*2:hg6&ֺ+t 3Fxs Qm9b1Uc#8 V`e!2\2>V7a4Qރ+)#oEu723]-Λ }]*$e_*/NX7G惙?Q??5VeSEZk0i a&C=A+/Y?gPMn?k,Iʹ,ǷWDxmh=F@6){O,[t`pCסKuw\3$X?jх*Oͷvt0Fm,({n瑟J^ġ6Y$sYHI,e>W`F4tWr3ꇢÿM@vRitO!69w,+zTͫLQ xoÎk JIKZVeV`y=8<ӌ?ãZZ=OE76<fGˑg |t3VTҚFaZB=y/;CK"$lLgLN7HOs )5O$}:p9kYa%ΘԔ.ٖT@rqfI0Hε_[ igJ@X~$`Q ަ;iJ$1c_ˁD澱KI|y؁Lsy|_RJ?ggq/+2z亐+‘HfW?Z|6Ė<FҠl"1j/. +}EQW- =iatLq7;4Oa$-\Jp.oA|8龳d| >wfړۓk6?hU6;~Td2φlu"sE~ԍw*gAN\n?4x1+0x۶% c={SXP_Ɠ!f{U9//I|v4* GvߜcIworH==:{}kϓIR%kck֫޵23F#rSڅ^N6ѣG9|3<`7~ZcLڶ@+QFr2jޗZL\eud8t[cL4@ {U]Y6I̬:*` wrAJV ZfZ@^zp:vI7yPsJRPVv X|GDIlR S=(bs2zTZBi)I_XU\ū(TyČ}X3uoE$Z鱈 ,<;(^qAޫ]E4m=E[Ȼ]c;[׶qzCy$2f3nnsZOǗ0B +?h*uDxya^cGlץ|l1F?l)(DZ](eԛVյ7? rng/ƭcjlWjOum8]Q"i>[ǓI@}dDޟ&*0zԖZw2rDbW俸u9ǵr):k]&"c`ȼvVM 5J,~\n>L֯ho+m;ӧlDe> i̜gtUYHj)  O<|+l dK#:2D Z)cYU]=}{TUCoEc ʭA"x՞t.H'qֽ6KZ3fmHێ3C%Kq?8gF=?dyB<=: +h"WXdY1?"g$` }G1D-ȱI8߯F*"[ 9a|b*k H읦hU7 +AqIpo3w?A /_ZHMWf.4*3X~S_ao +N1Q_-dv+r1svL>f ۻ}4)K}W2Ōw?DrFuO(mgdA+^:kk18䙶p:`-2rR?Ʒ<ݨyfx}psʷ|a9LӃEZ2XãLg`},?N.bͩnQK~aٲVIDI,IHǮ*Ö!ҳ Np5[BӒ(NIP_'KE21GHUA==qP:6i$~bI9LiZ 6 OcpA0XFf4J$3ʮxg9(ݢ)&Ǻ=>*\\Ʀ@ [{߅tďI&# `rsߚk^<1\ΙEqQ5E)׎(l-sb ,C\ uw):,P$緭@?y&.ʰ?x3Gt w7H$,pN;ҚAb2rXs۵69cef@6V!=3=_0m (#,9#=qq +? TUX/9O }EV`5SH,c5Ե?ho{v1h"`sprn+?|Es5@e3>q#9t@6nI=M@zҺLq[V9fSx, ?g>wYce"c?5 w!q+`5 RC;kg&|ʃ#ӿ 27r'*ßZ=Zm22i ?9$-dⴖnD1zpl/zu[Ac| #xVWra`r=rj(|r@矾3VbW<`Kz=jKyOp\aW'OS;q1D$|C9n{9$)98 Wj4Z\yllp?ט9iWp$ ]ѻd$c5 dOS[](&('L-ZmήdOڻMZ(Og%ų2忕Y6ݠSc)-5g߯0 Y.EfS([<̜DJkIF~c\7z 5KoBgh@_t~QtYO2D.[39<U +«z}(T1ueiYq3[\ ꮭs/)ܣ1TzNzqt.SnALgsjAp\ȞWG_OLvs._P?< aY#gn #k +m$!wi"3eo9־AТbH?af8d2$w&I>J,'lSVzCh1@'HTGUk""^}gs24RK&Z*Õ=qZ|Ff;kkk +u=Zܵcь[$٥) aTln3^zMR^+s$C;3k9S?҂6f|)ն66 '\N$)DxεBH=]ڍS!\r@}3{{wg'XAl4xJ y3\~ɺKX{oMR0GGօ}>M!=?SǏjrOw$I#2 XX=j[TV?p$ޥե W,ɩ]菕cA9h 7y8M\i/vS$$tQ[_H+/DagzѬo1L*qgv-*s\CI<(u={qE%He lΉ**)98s{{5ψfPBJUϪս@ :H5y>=M+6dxH 9+㷧?k: P}>$|/$i'A&ՒppWGO'_$-(ꮇ8b=~3GrrcpT?I# Ծ =ˈE tϙC3={}\Gs"& +LVXNyU]BI#dP瞸$0q q>Sz+Ȯx8sH#Pqzڴ4q&'ls }D4?dH2;#S5H&mJݧgpNIp89\i_EvaXw$t?Nָt8\u$!"H7p]$~tdMi)#ZعU?٪I[vaNxv7zpu8_~;BDCQ9?t0[@ɧ3Y1z9𮔗 Ԋ1/}*;Aw6ؚ#vRJA둃)]jMfoo,ǭiȑh8ba(ޟ,/s[;GLK=ȫ +.v#T*`\c"6c + +S. rlz=yq5Hdv9[)P}#Bx_2Gq~{槹_{\01` t{ 檎5ݫ4& +<V 㞝yFP798#CI^2Eʗtw4v(r{TWڪK<{hrJ/_Gxbu(η?>_Yc,lc:MhI³;VSn$sMӥ"[EFI1Am.T,u UJsM/]N>juSK$~"#\HPY |K6 O:M(c*HϖX\J> cDS6. (#d7թXJiZr? =q +v j Sp>yĥ-ѢK7 O^-こ(dt{Q Vg9v|ʒv!A]Fy/gY2r@ I(¢Gd~^-r0p;`ΞE]wDBp[weq֡,ԗЍ[LH[DHx)#A85Ȟ&6n4#)A`c#Z:k9,h. ~S]%f8EdT\-3o>WO-V m[ t\ołA?JDz/9 9z3vVWs (<#Z . ggq ŗR r89P'45Su.ۏ +-ˏ0`2N;n#{Tz [BFF7iu7le#i+̑ԓT|iew$N0Pc0:z446<.D B'3Um#h 'zLP !b̾Uk$ tRn6si%`qV$Nb*hڱhI I)(=P"' '2rK7XQYeKľ#%Wem3oN)P]$\ɻ=,{[X2rI=8,MAZw6qE2@w-NmB Rs{߁Ҭj)OV'&vWw7eB8'ɢ ELn|O}āVC)608Uhc>h܌`jRii|`2%: E1UJ/muac<~ 8k}f;UsR'I2oFGF1)U|6ѰFJ0Oh!Gs^o]ܭ G`@Nv(G1jFS̄֡f畫n +=FzNMGÂZ0 ÌGTOc T^nv ,KC!ʑч7H[QҤ, D"-n- 9gKbE# xc\qjo;*;dd0:Nh jwB<̾78}(־,@%o.72y6[5v)'l&KnNd䃝#hziWXe>bX`;}*IjrtR ze+8Y¹&6Rgw'lqT\dTچ-E;СȸG9KCKswjعhTx-)s`GOznZ4۱dbhH&d.&+#Oh5׈`qߧZ$߹*E=Sn1Q?"ːA]8s^Ӏ78` K 7_i.T {M`MK_Cɏ|\H$t͖e$r_C&ݬM{Q%oIl&Ǒ mF>g3ȩc`Z91}Ml\gm+VvͭgKb? +xQ2{z׿AS r. -S*>].[ff;d݀TlU r .KEU~#2vuO{'dBHxA] +&|σtTzhnV*C[|+oo/JhPK6<4XH 7|S|qCQm/Ҧ39U<9+IW֫4%[IA#?SPp51q +P1ʭ0NH9W +`!m֨MhUF$}9 =l/{Chj綅B ;qӦ$W|O?\|zފ& 4.K_QwˉM:I2ԶMw8;cҀ_u)Tb gSR3ZoؚջVK-<y?SsI Yͬ& xlem;\Oa.<;pA#wW\jSQBB 'սKo53資+n} o>%ݩ],}=%oc]йXBY򫓟/^{$趍 #gt=G@qKš2: 4lKg4{ČaG_04 5̫=AvGqR*#CPW91j>Y]@T\ ϛ[K>$G<ԠfHTl'g4B[7K,(^alO]_*_4{'>ƭikᥗG]qc8O\oey]|3zH|$NtF#jz J\Kzz,Z674x-NEۓ4q/Ju vʹ(u|FeZ\zr. <$i#}(YYPрw9ڹfX|I$GMzr SW9-.8)O|)J1Aj{֣<hD[wgSzϯϠ4 Ux\۞zEL +x8+G_[0|qn%8#?\qxJQ~rw. OcSIHrzH.<H. gr/ր(4jwF*| nrPQqq'>?h]^tx;)Yf^wE+i?Um.Ăb 8#SjDy:)F$ FB@#'75cTW=14Z$̤߃@"ԋӆƧhGɸrc 2O\tc} [x, hem>4׆ICܩVGPg#3@5?V@, sYKUO(5y-U_`cwrA +8f?S%*6Sz +]Dʞl)x e4$8A +Io7 $c8ֻȬo8pIAp#">nzgz2H8p=<O׵WZC=O:+geAX7AR_4&<,p"Isy$sWttBBUOڇK5Pp~' &&%IqN~$BOD$jO=#xkd!y#œd$ӳހS֚Ы.dZRXS 7 !@ryA> 2oL+wgD +SʒȪO$`(2g?4i=HC^% mNzM8A?@12~Nkyew +۵>GWMPAO&Bq}YV5;rFW*a*HOVvFsឍ"SUPrY;aO=1F:c + 3T06HTOi:y !_!cCj2r}G(HPI/ʁPf,N[/{ +TUgv2@TwL[1i؏i8ӜxǞLAiL8m& +@S(#;~}?KǗG+P3ҡ->2'on1--J{Pn'1}VsslF 1MXaP)GGs@3֛zҕOg"B1 SUdg4 I=2E;rۑ׭;c>Kp°Gs\ KS_*:a|bYe!s=ǵ)V'L`g t1xPz`zkT>GbiSYW9^GZkFG;bsgQ ǞZqظ*\'Rsǘu0F0 v'M92 1?LF$0ڤ&=8Ͻ"a$$X +;ɁMVCKI1o>uCEWY gN $WqNsJdDg<Ԫ0zc5jAtƅ }iNzTʼT')1s^w > +endobj +123 0 obj +<< +/ProcSet [/PDF /Text /ImageB /ImageC /ImageI] +/ExtGState << +/Gs1 11 0 R +>> +/Font << +/F3 7 0 R +/F1 97 0 R +>> +/XObject << +/I1 125 0 R +>> +>> +endobj +128 0 obj +<< +/Type /Page +/Parent 1 0 R +/MediaBox [0 0 612 792] +/Contents 126 0 R +/Resources 127 0 R +>> +endobj +127 0 obj +<< +/ProcSet [/PDF /Text /ImageB /ImageC /ImageI] +/ExtGState << +/Gs1 11 0 R +>> +/Font << +/F4 12 0 R +/F3 7 0 R +/F6 16 0 R +>> +>> +endobj +132 0 obj +<< +/Subtype /Underline +/QuadPoints [92 384.3970000000002 236.475 384.3970000000002 92 361.2720000000002 236.475 361.2720000000002] +/Contents () +/Type /Annot +/Rect [92 361.2720000000002 236.475 384.3970000000002] +/Border [0 0 0] +/C [0 0 1] +>> +endobj +133 0 obj +<< +/S /URI +/URI (http://google.com/) +>> +endobj +134 0 obj +<< +/Subtype /Link +/A 133 0 R +/Type /Annot +/Rect [92 361.2720000000002 236.475 384.3970000000002] +/Border [0 0 0] +>> +endobj +135 0 obj +<< +/Subtype /Highlight +/QuadPoints [92 326.5970000000002 345.525 326.5970000000002 92 303.4720000000002 345.525 303.4720000000002] +/Contents () +/Type /Annot +/Rect [92 303.4720000000002 345.525 326.5970000000002] +/Border [0 0 0] +/C [0.9450980392156862 0.9333333333333333 0.5803921568627451] +>> +endobj +136 0 obj +<< +/Subtype /StrikeOut +/QuadPoints [92 268.79700000000025 189.25 268.79700000000025 92 245.67200000000022 189.25 245.67200000000022] +/Contents () +/Type /Annot +/Rect [92 245.67200000000022 189.25 268.79700000000025] +/Border [0 0 0] +/C [0 0 0] +>> +endobj +137 0 obj +<< +/S /URI +/URI (http://apple.com/) +>> +endobj +138 0 obj +<< +/Subtype /Link +/A 137 0 R +/Type /Annot +/Rect [92 41.928000000000225 203.16000000000003 60.428000000000225] +/Border [0 0 0] +>> +endobj +131 0 obj +<< +/Type /Page +/Parent 1 0 R +/MediaBox [0 0 612 792] +/Contents 129 0 R +/Resources 130 0 R +/Annots [132 0 R 134 0 R 135 0 R 136 0 R 138 0 R] +>> +endobj +130 0 obj +<< +/ProcSet [/PDF /Text /ImageB /ImageC /ImageI] +/ExtGState << +/Gs1 11 0 R +/Gs3 63 0 R +>> +/Font << +/F3 7 0 R +/F5 15 0 R +/F1 97 0 R +>> +>> +endobj +142 0 obj +<< +/S /URI +/URI (http://github.com/devongovett/pdfkit/tree/master/docs/generate.coffee) +>> +endobj +143 0 obj +<< +/Subtype /Link +/A 142 0 R +/Type /Annot +/Rect [424.353515625 598.475 474.1142578125 610.975] +/Border [0 0 0] +>> +endobj +144 0 obj +<< +/S /URI +/URI (http://twitter.com/devongovett) +>> +endobj +145 0 obj +<< +/Subtype /Link +/A 144 0 R +/Type /Annot +/Rect [72 538.475 144.1728515625 550.975] +/Border [0 0 0] +>> +endobj +146 0 obj +<< +/S /URI +/URI (http://github.com/devongovett/pdfkit/issues) +>> +endobj +147 0 obj +<< +/Subtype /Link +/A 146 0 R +/Type /Annot +/Rect [242.517578125 538.475 276.8974609375 550.975] +/Border [0 0 0] +>> +endobj +141 0 obj +<< +/Type /Page +/Parent 1 0 R +/MediaBox [0 0 612 792] +/Contents 139 0 R +/Resources 140 0 R +/Annots [143 0 R 145 0 R 147 0 R] +>> +endobj +140 0 obj +<< +/ProcSet [/PDF /Text /ImageB /ImageC /ImageI] +/ExtGState << +/Gs1 11 0 R +>> +/Font << +/F4 12 0 R +/F3 7 0 R +>> +>> +endobj +148 0 obj +<< +/Producer (PDFKit) +/Creator (PDFKit) +/CreationDate (D:20160826171314Z) +>> +endobj +97 0 obj +<< +/Type /Font +/BaseFont /Helvetica +/Subtype /Type1 +/Encoding /WinAnsiEncoding +>> +endobj +150 0 obj +<< +/Type /FontDescriptor +/FontName /GEMBQK+AlegreyaSans-Light +/Flags 4 +/FontBBox [-240 -264 1137 967] +/ItalicAngle 0 +/Ascent 900 +/Descent -300 +/CapHeight 639 +/XHeight 495 +/StemV 0 +/FontFile2 149 0 R +>> +endobj +151 0 obj +<< +/Type /Font +/Subtype /CIDFontType2 +/BaseFont /GEMBQK+AlegreyaSans-Light +/CIDSystemInfo << +/Registry (Adobe) +/Ordering (Identity) +/Supplement 0 +>> +/FontDescriptor 150 0 R +/W [0 [172 503 642 423 528 231 309 172 602 508 512 443 516 416 415 489 509]] +>> +endobj +6 0 obj +<< +/Type /Font +/Subtype /Type0 +/BaseFont /GEMBQK+AlegreyaSans-Light +/Encoding /Identity-H +/DescendantFonts [151 0 R] +/ToUnicode 152 0 R +>> +endobj +154 0 obj +<< +/Type /FontDescriptor +/FontName /KWGMXL+Merriweather +/Flags 6 +/FontBBox [-41.9921875 -312.5 1199.70703125 937.5] +/ItalicAngle 0 +/Ascent 937.5 +/Descent -312.5 +/CapHeight 758.30078125 +/XHeight 546.38671875 +/StemV 0 +/FontFile2 153 0 R +>> +endobj +155 0 obj +<< +/Type /Font +/Subtype /CIDFontType2 +/BaseFont /KWGMXL+Merriweather +/CIDSystemInfo << +/Registry (Adobe) +/Ordering (Identity) +/Supplement 0 +>> +/FontDescriptor 154 0 R +/W [0 [1770 695.80078125 559.08203125 450.68359375 511.71875 333.49609375 601.07421875 681.640625 255.37109375 647.94921875 344.7265625 605.95703125 372.55859375 420.8984375 559.08203125 340.8203125 630.859375 685.546875 646.484375 1010.7421875 510.25390625 622.0703125 587.40234375 351.5625 561.5234375 408.69140625 826.171875 619.62890625 688.4765625 632.8125 777.83203125 604.4921875 692.87109375 606.4453125 600.09765625 580.078125 617.1875 811.5234375 620.1171875 400.390625 334.47265625 1025.87890625 526.3671875 833.0078125 570.3125 526.85546875 729.00390625 610.83984375 344.7265625 692.87109375 750 769.53125 692.87109375 607.421875 605.95703125 396.97265625 396.97265625 660.15625 317.3828125 603.515625 596.19140625 455.56640625 344.7265625 644.04296875 758.7890625 965.33203125 494.140625 693.359375 398.4375 611.81640625 660.15625]] +>> +endobj +7 0 obj +<< +/Type /Font +/Subtype /Type0 +/BaseFont /KWGMXL+Merriweather +/Encoding /Identity-H +/DescendantFonts [155 0 R] +/ToUnicode 156 0 R +>> +endobj +158 0 obj +<< +/Type /FontDescriptor +/FontName /GKCFBS+Alegreya-Bold +/Flags 6 +/FontBBox [-205 -318 1042 977] +/ItalicAngle 0 +/Ascent 1016 +/Descent -345 +/CapHeight 642 +/XHeight 462 +/StemV 0 +/FontFile2 157 0 R +>> +endobj +159 0 obj +<< +/Type /Font +/Subtype /CIDFontType2 +/BaseFont /GKCFBS+Alegreya-Bold +/CIDSystemInfo << +/Registry (Adobe) +/Ordering (Identity) +/Supplement 0 +>> +/FontDescriptor 158 0 R +/W [0 [174 654 463 332 293 570 512 174 540 479 413 537 740 544 577 693 532 659 365 409 265 503 617 432 547 839 655 514 625 538 468 625 519 465 531 274 964 569 342 497 623 643 598 285]] +>> +endobj +12 0 obj +<< +/Type /Font +/Subtype /Type0 +/BaseFont /GKCFBS+Alegreya-Bold +/Encoding /Identity-H +/DescendantFonts [159 0 R] +/ToUnicode 160 0 R +>> +endobj +162 0 obj +<< +/Type /FontDescriptor +/FontName /ONVRIN+SourceCodePro-Regular +/Flags 5 +/FontBBox [-39 -400 706 1000] +/ItalicAngle 0 +/Ascent 984 +/Descent -273 +/CapHeight 660 +/XHeight 480 +/StemV 0 +/FontFile2 161 0 R +>> +endobj +163 0 obj +<< +/Type /Font +/Subtype /CIDFontType2 +/BaseFont /ONVRIN+SourceCodePro-Regular +/CIDSystemInfo << +/Registry (Adobe) +/Ordering (Identity) +/Supplement 0 +>> +/FontDescriptor 162 0 R +/W [0 [600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600]] +>> +endobj +15 0 obj +<< +/Type /Font +/Subtype /Type0 +/BaseFont /ONVRIN+SourceCodePro-Regular +/Encoding /Identity-H +/DescendantFonts [163 0 R] +/ToUnicode 164 0 R +>> +endobj +166 0 obj +<< +/Type /FontDescriptor +/FontName /ANUMUM+SourceCodePro-Bold +/Flags 5 +/FontBBox [-69 -400 705 1000] +/ItalicAngle 0 +/Ascent 984 +/Descent -273 +/CapHeight 660 +/XHeight 480 +/StemV 0 +/FontFile2 165 0 R +>> +endobj +167 0 obj +<< +/Type /Font +/Subtype /CIDFontType2 +/BaseFont /ANUMUM+SourceCodePro-Bold +/CIDSystemInfo << +/Registry (Adobe) +/Ordering (Identity) +/Supplement 0 +>> +/FontDescriptor 166 0 R +/W [0 [600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600 600]] +>> +endobj +16 0 obj +<< +/Type /Font +/Subtype /Type0 +/BaseFont /ANUMUM+SourceCodePro-Bold +/Encoding /Identity-H +/DescendantFonts [167 0 R] +/ToUnicode 168 0 R +>> +endobj +116 0 obj +<< +/Type /Font +/BaseFont /Times-Roman +/Subtype /Type1 +/Encoding /WinAnsiEncoding +>> +endobj +170 0 obj +<< +/Type /FontDescriptor +/FontName /VQTLWU+GoodDog +/Flags 4 +/FontBBox [-107.421875 -174.8046875 1034.66796875 641.6015625] +/ItalicAngle 0 +/Ascent 836.9140625 +/Descent -174.8046875 +/CapHeight 591.30859375 +/XHeight 442.3828125 +/StemV 0 +/FontFile2 169 0 R +>> +endobj +171 0 obj +<< +/Type /Font +/Subtype /CIDFontType2 +/BaseFont /VQTLWU+GoodDog +/CIDSystemInfo << +/Registry (Adobe) +/Ordering (Identity) +/Supplement 0 +>> +/FontDescriptor 170 0 R +/W [0 [378 431.640625 337.890625 184.5703125 344.7265625 184.5703125 393.5546875 281.73828125 369.62890625 379.8828125 326.66015625 230.95703125]] +>> +endobj +117 0 obj +<< +/Type /Font +/Subtype /Type0 +/BaseFont /VQTLWU+GoodDog +/Encoding /Identity-H +/DescendantFonts [171 0 R] +/ToUnicode 172 0 R +>> +endobj +174 0 obj +<< +/Type /FontDescriptor +/FontName /EDDCKX+Chalkboard-Bold +/Flags 4 +/FontBBox [-163.53591160220995 -615.4696132596686 2017.67955801105 1358.011049723757] +/ItalicAngle 0 +/Ascent 980.1104972375691 +/Descent -282.8729281767956 +/CapHeight 712.707182320442 +/XHeight 525.9668508287293 +/StemV 0 +/FontFile2 173 0 R +>> +endobj +175 0 obj +<< +/Type /Font +/Subtype /CIDFontType2 +/BaseFont /EDDCKX+Chalkboard-Bold +/CIDSystemInfo << +/Registry (Adobe) +/Ordering (Identity) +/Supplement 0 +>> +/FontDescriptor 174 0 R +/W [0 [540 591.1602209944751 565.7458563535912 271.8232044198895 453.0386740331492 414.3646408839779 608.8397790055249 558.011049723757 322.65193370165747 550.2762430939226 581.2154696132598 509.3922651933702 459.66850828729287 600 299.44751381215474 532.5966850828729 479.5580110497238 759.1160220994476 514.9171270718232 609.9447513812155 339.2265193370166]] +>> +endobj +118 0 obj +<< +/Type /Font +/Subtype /Type0 +/BaseFont /EDDCKX+Chalkboard-Bold +/Encoding /Identity-H +/DescendantFonts [175 0 R] +/ToUnicode 176 0 R +>> +endobj +2 0 obj +<< +/Type /Catalog +/Pages 1 0 R +>> +endobj +1 0 obj +<< +/Type /Pages +/Count 28 +/Kids [5 0 R 10 0 R 19 0 R 32 0 R 37 0 R 40 0 R 43 0 R 46 0 R 49 0 R 52 0 R 55 0 R 58 0 R 61 0 R 66 0 R 83 0 R 87 0 R 90 0 R 93 0 R 96 0 R 100 0 R 109 0 R 112 0 R 115 0 R 121 0 R 124 0 R 128 0 R 131 0 R 141 0 R] +>> +endobj +78 0 obj +<< +/Type /XObject +/Subtype /Form +/FormType 1 +/BBox [0 0 612 792] +/Group 76 0 R +/Resources 77 0 R +/Length 16 +/Filter /FlateDecode +>> +stream +x0T( ! +endstream +endobj +152 0 obj +<< +/Length 265 +/Filter /FlateDecode +>> +stream +x]Qj0 +t%MHS!0KƲ-b9g[Y;&{Orvn[ڋaqR[ k(CKo%W~]Z"9č]Gd!DS C-ћi yOeIP 'My$UqU8Dq:\DxMJ +endstream +endobj +156 0 obj +<< +/Length 382 +/Filter /FlateDecode +>> +stream +x]SMk0+rD(ۋ~PSAqjyni@3fzlՍu54NM^/1 +o=4Szr FV c雿݃[r/ΐ>uind:/L@, }e}{ϺV1Fңyj4ƞ()n)Ο2!k]GRfdVk +s@(O8 @#*s3Z@q̙.C ˂@, +ykJ W!1SVd]R$9O5O.Q%vWTD$jʯ!^̲bD}v{0?o]oL㴱3 +endstream +endobj +160 0 obj +<< +/Length 326 +/Filter /FlateDecode +>> +stream +x]RMk0+=,VM "C?ɸ5yn73o8I|k=,I6P?heyV2u|trlM;q '*ˈ(~sy+{O86>ҜBHq=b/e;յ}5L FٴmOTe*bVJ3= &`Љt8LzB 0Y30fa 8FFYphQ9貀69XT_ۦw-} gkY[q;A墙l*ı +endstream +endobj +164 0 obj +<< +/Length 397 +/Filter /FlateDecode +>> +stream +x]Sn0>6R^8=U=DH C}gTE"7Kz+"}9,YOpDC%;)lgffL3kQ[HO_ ݬow$6cM=Y&e),S=>=4n+ݼlC2` 6kw OY)r_i y{3${@#"@#9YP% +2H2twn %h3= 8|[ؕFA 9#bbu +z&y*Vq#]ρfx j<%< k&d,Zw֕[?:a7Wx]3qU +endstream +endobj +168 0 obj +<< +/Length 361 +/Filter /FlateDecode +>> +stream +x]Rn0>lH$T}*ː_q`ٝzt?͎uVj%. SCrhLzf*ݍ("wfͣ[zX^" |jS_vQY2Ekܘf m\3>C,h2$ Eέ*#_:_6s}q@hGP`rD<0;@ +@!"r@#ALzH%Rf Zg NH39P!"^@O@O󡵀%<@prx5A=JEY +w&P'}ɼMZȏunzM 7Y<˼ +endstream +endobj +172 0 obj +<< +/Length 255 +/Filter /FlateDecode +>> +stream +x]QMO +6lku5iHzX=/uH/3o{@_=PH]@pԆT5H-SL::,-o_a W)%zmF}qB@*^3h;y}T]*WP*- +qv\fDb4 >/M}u4©ElJM>I;{fpi?p%U? +endstream +endobj +176 0 obj +<< +/Length 275 +/Filter /FlateDecode +>> +stream +x]=o w!r:i+YHUxv2pXH5 LGH=(Sޣp#NJU BqUZ<آ ~]<Νڶ(Cxnͣ0#ĽW')=اl7Ψ= +@ 2en;ʯf|N+q#pG7 vke@-i!j|]I8njJiH*' ɗլs&R,$TsBvom|NlU\RԞJHU@ +endstream +endobj +3 0 obj +<< +/Length 186 +/Filter /FlateDecode +>> +stream +x=0 v~% 6l-t&PK{1B|$GuSD@ˍ`@zO4A6ZkH`VpBbbB@!.7mfnЦEOKUn/]jQ CX$W[l3#j/.vLYm +endstream +endobj +122 0 obj +<< +/Length 489 +/Filter /FlateDecode +>> +stream +xTn0+avÇ iVTC>H'W!, #D-_>9/wr8 +*[>Y8M Z"嵓=}0I!Ҟ:;g`g<'lʱoyXח> +stream +xWK0WH=zC4E@B1N\iQʛ֙}3!;|yz?1_^pndz~5Oogt^ +:sbhbj>KJ)}xv!, K!þe2-@N`;ǰ; W'YmLϸoN.$}'xfxx~ԍW{7N}FMlC7n|ti^ ѻ5,wt;\Nvb\c=K;vh9@rJq=ft{uE}#gY-yn0jc,r$c(᷎2jgcYp7:q~9)"vqJg +endstream +endobj +44 0 obj +<< +/Length 894 +/Filter /FlateDecode +>> +stream +xWn0 +qDj5 [۹=LWﺗmAJ}}܃~WXAP;@ };)مo^u/7XT:[D $r.\ "LNo“̄hLۈY"$!|1E{`n%Zqi)fuGkf6e|vG{ylĪgXͪڮYD8j^ڛF9#HB?p?&BiiKZSY"03O(=G~MG &{y^rq<geLU9قtD3f`MF__ $$(5`i~ŮoYS)4- $[e*=<7dhHtnuO]Z8cq+"RSQd}}0< +^\{2^e>lh@kUy~`u8MG9 8;~iO +Оhz\ +j}^}J YxD*(a(OTfF*my\S^ղqL/E +v;ʶIډc +˅L+ ѐ֩YT39Lεt#oRNB8esjY}> +stream +xX͎0)t=c;? +X7ġmR$T?3$u;=37C+pÛ:7*?oP}9o~l⛧ B`(6-TVkT׬kkk= ͷ4coj~vP@MDWX]\;EG$ת'M^ 4~Xnj@[Ցny V" 0oF)Z<;ޞ$]+1-FFw)jґ:\rN`˦}-YYMZswx6:XUZ[­tcݡ.Dj%GD8JfT<#zO\7b9HI 1g:TrkΛ+\,C/scizkbj<'8X5&'1Z0МS܂_Mg?ZJ=s0Ep?y +]C㧷H:IJ1GVlsɣy/xk&>^k\,\ȺքPRPQPK!V{6mci(ze:Alޯ!VLJ֫l=D=)^Ԭ`0x<7{S{QM)]ht,S"-y>,Эzq.N>Es4^6+&)\&^A+NKiLL&.^.J9o [WlЗဏjplJ1lU..B{6ƥڧ!qJJkw+c +`ɯL<.[E I =dn⃖nB*&9n*'U ⹷vL;̼ڒF8߅#9밶}^ D3Jtq?aT'"'$ftv4/|+CRΙ:TΒ53^@/p[t-; jr*+9 )j r%a7 #g>օ4a}ۀeuW⸸~,7ry-o +endstream +endobj +50 0 obj +<< +/Length 1002 +/Filter /FlateDecode +>> +stream +xXn@}+nvfHQoU>Ree #;"63s\j>@ݿ_s}8W?T/g\yEA +.-ݩ5ѤåcߟIhjub +kOQTv l+`23 +v;›[Bgcd*8-heSkHe\v]| ?v*Ƅ׀ + PPWX9a-:4t=ނIz㽐b8qo6N-9> Yw(M4(>P Fŝͼ8?eeټEU4. +1Q&b̡oQ%S e72WTT`e_I::\ Ƨ]Ai K}֩`!1wD!RezD5nr]P%=%nBӒ8*̘Ys$pms,A>{2^KA&*]cf[Ԟ>ӝ޹/:赫ُe}\9U'VGzYE-s3+5TIۭ3,pH9Zʙ, +:!kp boqžDAx/jg.G=^OJ竅j&Li/ +%2۔'\o0,P픙⩨a{l[iE6Bֱkex,< 9=G_sLx F`k,(n!k[@b\*=2KvB1QmF{eJ^OXFbS-ГR[FA{-1 nʀ"f?*)֤H6}3Rh{N@YQmR5e/{#-9Z6T(ĺHٖ; .qߣ =JPpO &pH0Rr@oM;VX +endstream +endobj +126 0 obj +<< +/Length 1502 +/Filter /FlateDecode +>> +stream +xZKFWvU?i5UrK[qC"E#(xá ob݈ Z1X9mŜwJXZ̯#;w?r6pm>^뉟 `Bchߒߠ8c8(^'SڑoR`_Ŧ{*x 8xQf2fFh{pu]G)W#*f c,86^Y/ī ލ,Rl.FO^Bދ_񯀆& yLxO +endstream +endobj +91 0 obj +<< +/Length 1126 +/Filter /FlateDecode +>> +stream +xYn8+ax/@E13f»,)h"|\R%Ӷ؉(D<<ȀPsG۟?v},/+_V_^@|Y^7GᢑN@+ϫ>)Vttg.ܦW^^}6_A=;#N= 8&xk@zvqL%(0i`B +<2S ]`DYl~șYp3Or{ +zd"c r_fpP3Fl3yJ?>\cM9MZv`F{FFamF-Nad7I?^mX7(]xQz@{Y]|vo)ֱFn`QKRUfގuC! cU JGP{t_6HV +|SG A}'?&==CW690(MLg8{BRA6=DeSa l7`kIp_6q*S)XPs4,LR2N!>+\Sh>gh͌Xk2^^ocv3y\ qzJSd* jبMkWfeىA@Er"yD!t: +aؓRZi7Za_>Rlآ"JS5(vWFx~B詵r 1}?6}ﹿڪ_ߨTCT1QU]\(]umK3psmm\o߯6)IC 3QM3noB_}BkJ>ܭ d-[)p| + +:Dd074"[Hz5I 7oV6 &6NƜcϗp+x2bk7a`MQ$fݶ(ԛٖfoAtղHk'-d#j TZS z0S;%/B fI.44d=G˖!rSHKY,mop0Hs +Դuml].{[Wshc +endstream +endobj +153 0 obj +<< +/Length 6874 +/Filter /FlateDecode +>> +stream +xmyxW;l˲]e˲$7ɲpn˽ 6cF3%5BK( mB !l*%||1Gi<it=W=KclbMu1&)m먝?W/ﴝϻsIZ0wy]iZܳv.Ay`2yڭJ_8O)v)z>~vjVdúΣ$ ұ[-* +0gx>ކOw ):t!S:ۍ]>ƾqps˴;`=ajE[*t7{wG?|my6ޏNNcNۜ;}m0 ["=㏳`v )I #Yc9aPΗ+0 Ir0.(ҧ" vBC?zK֛fchEQ.f^(֯g@ޢ(xGmcu`~򫫝30dWBBbJLV1DCI-2\ޑp*MZV><Ȯ˙_4^N@;ԎꂜEbgy׆mhTnaya4|kO)mjc|IoOҎ/Z<_}cy P6@/!1 3jR*FIb-2dYby,̨jʍ>v-,b\%5ю¬}x~zT 7GA+}$:b*|Tj}"b*$Uh@YT -ωZyr\PYo4w/[Zr:Y!9(N< !r>"7ǛNB/VI0-(_(&lLTʊ ń1/AV!v0/p 015S3Jˤ&xW1OAQq[<"<15L4Dm?"[.4 @Som I";қP/k?ڒ @}k>]Xwzw4,j>њƊ a1@̸d4$;:065>UmK僙>ќcEzIZnL zB\}fzWd!tCIfm8/L?/񤿫`3i>=-W:+w,7@I 2kd0WO|@ԿWow*x`:&o|{ͧs!X8Foۻ? ~C3Ʉ`rY0i(qlކ?Wa3Voߴ3 @OuЂey1䆘DQI+"w֤(_Uu:Cq7}MW2gh7.ߖYKúZ>[CK3T{7/H[QJSI\U&TE+蠤 +3s\Ggو%k0 Dr OL]xߦoʬXDjaP ˆGz\,n#6Aj7Xȃ >Ah]^byMsp仹-p9=<>UȴF5 E%2xb[IDpJ $`VWys &hgw0ZᙜP*[ZUYOaEAJcrc2,x/(2ˢCH2naVmA/id@k{.u, Q!EX!ցa҇Mnv[Pݑ:VFtiwsBev^GQ/pGƍs@$A $BrEuc{ aA]##'f'1>Mf|C"ƈJ+Va˷Pj)l;?mk9@ ww iF_ GUTw +8tKЁ#hiQWOom[ ۷4$n^)F[0)pid 3eL^iEX^u\+~KMj\eMq<}ນ G;n@ٸIs؛]O+'n>dEL&lip$EbmB5EjzW[/4&oqq蚿/dG}:ItNfD>INT%a-kzf%LsLsg\?)=\A +, Ž`6KFzaV=E0.yG,00͡=W ڶ~5y)_bMZ/O%=Z[|oVx}׷4R6 bS4qzrwLN@=|D(vF|lDC }6: !7Kvush S+ Wkt7C5˛ Sr6-)hppGyxJS$d;r2# E=&B"@=$!PJ$Hj PbJ(&?;8Wšu .mc{زMѡRdR/w_ v4a'c$`%A [ N#.[$d|%z +tDi:zi3_M\y1 l;zZTi[!uUW?Ԛ@mPYB֣ђj@!~:5>=/7=6~Q(%-9+?)O +\um޵SieiM_!}qaZ7|ݘsT #Fr^\|˪S4?ZX7F;ɏo |E[|ƚry8erT4-WVA6sQD,}iiKKlq9р073?V+ЌY#,,2/.4E7ILړR_$d +1I}C5M߼]equM%ꀲk;-jOHřY^,Z_Թ!Uh;쓸sW[ 0xn^#lnSw鯁Z%3Ѭ +4t{AJݣ =.*"@zIkZS/:ƭ]axE_LPڂg9B_>uVUJ#Wm .m熗O9tjDB*?F8 fRb֔4YlPmГ 0@o,*,: +fwN8u_+R3 +u0htRLl[md(JgdAV$"7.S6xpJ-lwrFdWT*|nϋCz=H3֍B I}=y(88'}ksm-3̼C,BxG,/htϥ%Qx+rĺ3OVjUǣ#r[vy-,k#2{r;F}{Ǩ;6vSa' l3/DbSi 2'Y,5j% dփ_6^u\~>V 0&\3-HiW)@"-t(mtHl~@a1HZdr-M&k f4ZuCo>(}2YPB+Rnk +)Z4kMjp~ M +;?vĉb=aj"Ȋ_sU\ pa^ޡ6p ~}%;"5(2OGm//C,3t3iO5[¡.*pI[Ӝޞ䣊/1Gk}Q+eQ]sz_]#߽;5Z(7%M@3K喚P{g 7K-؝zEkbu+YȟQd\?seqo?OJӵ OS07昛+P@>Ts[*}_U$nnz%n5&.5}EkJFEcdrw7^W$Ź#k]ґEu|`h?6,wpNOlNTfOq'}s +S'5#-L͋.ڙDG_ПzikgDqLO0_޻D鳳+BI,!w,uWKVri4>~򮷁ʵۤªM`]5?@fD^(>`M*ΛSoeD™|ƌ8A)/fӐV=@l"6=&}֭㇍=S̐4=+('5!ҭB1D%e)Q'07=R⓽.Dek=#c|FNR9O=Pl HIG$kX$xZ54M0ZsMw_v^esw2{.;ȇٯXI'&lHlqD +BM&j$i + +K5}':^?g;]/v7f6Z0n wI_L]?ǻ?4~PeVF3f=fdSVd8# U*5Hcu5ФՂ"p䵮crz 9OM# GD4/Ņ%{9r驙4f~Kdb!̄Pp01#($"ֆrYÄ,!)mj5<ڰ@2]T{K?8]Avuc@HN74g\vTÚq0_To)b?kb^6> +stream +xYݮ4SΌ% +X;w4mEBGq6$͑Oܱ=㱃5o0s_>}۷ +R[OUVx5ぉX[-H!0QCW-PNxo +2-Q&w5^~~8T?X#lLYϡtUDЁaGı \q遆8.1'sO#6]ЏXL[g<3ocABGĊ d0sVJ[#sV2RKެc +1臧Ôޖ-|q'H7)-{D2 tC-[%IxSRr{0}{C; $$WdD=HOQXDS .vDRlښN 4wd{c_GV!ݜz4՛u4.=Jb;J'Dߤ"v׿_4rJZZ! +-9fَ ;n޿`ܿrΛg D:=e>˙1k>2aS۲2ٔ]y_%-SvΥ^dP@RrDZWGr%M<-[˜ʺ)3q +Ƭxf3B9Ff}sQfzXKThJc9q[4&qA˧Q[Wrt LysP!V 5-鱸< +-?7X>|q v A|;;@&@#DkIM^=a2-ҺaiRyefaS2U&{Zg8S?nһI_hMiUe [9-ԋ1b (eO{x=%Ti$8`AJ z¾ۇ8 J=ai O,$yG[<8}Q? CނoR pZmիq˰yB>a%Ϲŵ_?:Yk ~r_/SIz +i]TP+B +ڟկ  +endstream +endobj +98 0 obj +<< +/Length 1757 +/Filter /FlateDecode +>> +stream +xZɎ6W"w +0|0-܂zQ9$@0@?$UE N=vϨ>ja¿D:\>}kۗӇ/I̮;Ed@N%g߼O¯߅*|_m)¶ϳy +n@J§{7<=T#*h{D}`ök=tOwιxOR1_:吾_o||zwpe Έ+ D4fUk4&($yҐ^kږ0dg3 ?x'@kp~dQvي%EҎVޣ%L,6CZn8o }(8Nu=<i(L:Q,LSꘚmU8ֵZWTgK[2*! M]PH-ɸ="f8 #FI=`t;K2+oGЈKڀ*ghDkP-6ZdҌ`7T wx E{a\xdN9/Fnq93$4 &1 u*{~ FbJj{v>2sr7:sd3pg%!RiFTAܡGuPF^,}.s"RMO]0ESϣ1ӻSU@!r94M.w-kr#CN߾jZaH6fE2dg:F:lf=mam^ͅ`nː̜s}gl + t0-Wp<߄~u*EQĉ9k 'LI=rĚI/bI1p/ShVY?T.(Yk^ʢ噊6f=(,v&n.C_OL?GM:p-I´*gW.RrQ &"0q; ߜn>YKmB+B;q7OE hΏOU_(;PQX1dY;C}rZӘ*h89B]mmlCƴΓ +8C}Td[`fQCЊӕ9ϒѤ$bمRI0IbdV|t?ZH>Kk|Eլ -TFW8a b5l'M#S2YnƀmIZVJm!y!}Q%YD8ub9 @x*'jŹ> +stream +xZK6 WTKRoâm{dɑˏL3P` toR|>t[sy m>|~ +o|:I5i"j4R}.kY } 7^nNO?d;c _ïχ )n!A#aDcj9#GZL)ݫE2$saܥуRjރd~fZaS=ks|*?s\ŵ{X'@F?|Uuo&N8 ٺE *KTLJݣ>Q2l23t&IT$e$Uz$Z:d2i$#d Zk-i2i|0 QȈk N#xV$¹Eș'P]5 <զZ[&-iZœ OI) +BxލxJR9nȌG<iHC8wMeȻ䛀r~Fc R;'W'K]{n;vR3-h%{郹ֆ,XI@BJPD`1',/?j)Ǩ9_<0PBHT)H>KOKvtYfKGZ*,Oc[Cpos1C]6ڼXv/O@1I LKh]g_Jn .)c܂Ej[6=.Y- +ࡳ+ vAn%`Yl t> qhYxk)m)(뽼ҹgAE%C e >B5=%¹LJ͗ku7sFwic(ꞏCAp>ȘVۖ,?Ma20HeIi>]fDZHƹ8Bl LkljMsPVB{ V}ס>}k6=͑+ !.Ɋu*lfШ0V%aDw>s?.YYdG򲉋͵"͔V)Qv:Z:\^9 +ȹE83ZmD c2; {R]hs闰/)}lT +F{qI2# H,<7R+`r9[:qi*$W uբU%-ǽm#<48U}nWTHԦU +endstream +endobj +59 0 obj +<< +/Length 1465 +/Filter /FlateDecode +>> +stream +xZK6+a]'jCdtorHHOٔiCc=ˈ6P^lR@lex_OeRpx//?\=čPZ,O$'U+P.]Gqx(ŏOů7T/KQ?֤HgS{#e|zl{fyQog>,|?5kQoWrOhe{Lr&EGrϼ[̶0 LeE9=*ʳGhduu)*-XJ$UEE.딲Iz UyuptStKmH|(+s4Zh(4&kITVJ+onEU8 2jsh7GL=?wUOxkE9ɏ$HW`Ĺqc,9"Y ڣ2ۏ:mu,%u~"mnT|B YW}9I85v.}a\]o+u{1Y$[ޗm f_7M2 X&pG4/5w΂L[Lo󸄹nAۺly 6Fy˙=8y۳pUidV)n!F#8P֕Z}ԗk_)*iEx[LJw\;U|ex7eUh in*p$*pĎ$ҭ MiUM 6_z۫F$y%qok}TVg!|z+$?|.~wH#l +endstream +endobj +110 0 obj +<< +/Length 2046 +/Filter /FlateDecode +>> +stream +xZɎ6+Ѱhad&[[ h ߟ")Ѳ[{c )^- ??ガ_~~j>?_}@\rrjz~tEZp?OMVOoW@bADU z$]D"}zڄt_fui-}w rajk!h[EǴopuʫߌZzBmХUe(l +M~ikUp,x=kt߉ }LkTql4dxY] + Vhd{U(ʏLꁹՉl/Ulb sHvY{i`h:!A;Fh'֥yyPXaUȸstՃآ)]Ĉ# +|9bg+ZIYK)13^n;^;#\F#۬dYfxfːRE4jj텶 绛Ud!Mzl7Ls9ʚ8槸/-sqo!BU-JA>Zi1 %J6@g2>v2DxL A/{d nwCUwq+rzJtlnП|wY NA"7vVMX"C30Y.ځL!o5`Y\Tsh.1_Q! {.x3.ߦfbCy +]ZϮ{,j,|D_K!Ƒjmq%ZN`18T[-v9)j[kd%R +q2nwwזvZsQP2y#_=([Mkk̈hYGau\*lDŽMzOdƵ*Qxnw? + _B؇SmTJLٞ׽W?idhW<`? gqUyGU֑> 6iZr`vک^H )W.cOuR&9PռH'lX3LXHВ 1DQdq\ēY[-*p4mCG_Iѵv)Bb"U#g +0)PbyP61IfMP"}ɊKa|lh\ aC\CwGc#=裋3vSUBz>VDNgy#]Ϩ:l#Xޥ{+h_f둡)ȼqEs is1@A>eZ7rE²f`fWE82b0̘a} qQ*4)BD#SVMr/|BVXe;ŧvqc<@eT)3$cr*>nkי!jZ֣Hɱ&oe9w1ݦRʤ8v5䚋dOSO}? +endstream +endobj +107 0 obj +<< +/Length 2741 +/Filter /FlateDecode +>> +stream +xZIϯ?;)|1 ^l x@~E%ؒ&1vVZZTju&}:߯ˏߟߞ$ҿ{ooO}R5?)H)vgsR|{)moo[>_gs_%ۼN5>Ӵ-eLߧUG:˾DF]eOL/EkJElbP{ԡ{}=z;cZt~:-Y,R5oR ]i+U_\^5!hh|K.['+,4+:9Ei&NR8|qa{/z4UɩÙ{‚DžiAqzGp(iʣ>@I7GDx%a__5H@儚kl=}V2WOaZ3fz*z5gY0b&YS2,qy]d,*g QI6<#Ѩ5D`; +ZJW+!.:G"|5=Ur5qRdgٚ#)?IU) G `p*)Uz\mvV2TX*tu*f!Cφo2W~UNN+[MAdr<^ثUΣ1ZhΩxA/Mz eʨNgU`U9MVG""2Nu^kZsZmg8EC*munj1VAsz0eqv*u9UϝZ"FzGLW_fo=9|$ɯuuIQ(4||TLrk3 (FmZM/oqSp{nڛڷV\6`G:m6|!:z/!m\0:q W:Jn%!'6nO{Zw#Ѣ^ϹeG]ó7|*rQ\ǡg ,DzSGֶвuޮdPz|@/a9Z9O]ѶmO>| gY#J[ +=x{Jw >("<)4Jwr׏ʶKLZs3׭`Dq?Ohm K~|PhmJ9Bk?7l97EM?`"c}==uJLEZd<7^x|FMS[֣=U?-|f tC571鷡3\xQQUmowjӡ9}S; <1[X敿x>sݏKZHvy]AMPL+ +] V0t.<9^Ÿ7G9"N,;j&> M߂;dr|=O SI`P-XeZU5Qӥǔ*EUAxM^U +QΞ`(Ij+8P{05 Gb1c +ᆞ"g)8f z$ۺx9'ٹ +kJZJX ڳk h1ЈJB!Xs ~_4.pS bPnS܀r.]J.+#z+-ݟ2{st*]eXFĜ8RɎT64ࠔ.k#vZJ#f;9[ -@Rr']@>VSQ`zTi0Ob.2&L `vJluVb#ԧa7RXb&ץ%w8#9RkcZ(#X3yM8cVt%=|w$X /}͚Oq׏4+iF6=-!qr 4GX4ɫhsQ[)XSZK^0UvrVӐN7&J +tGxNi(eYih-VT¯+cjpN~d+ j~yNv@u|n8sŸFR@WcvS\8 8J7pT7VnUWj6eR@~x +&%azys= 2r-:U~{WwQS /2隡aohk=~^+'6pE;.?3> +stream +x[n6Waw` %-ȡݖ 0IUIE"i^Az*ZHAw~ݧ8t|w?w/tusGӠmv~VJAjfR|j=_BtO>JǺS~kyXl]<"<"~G`VFAe +ڵ~!X$Zy!~/lcb~ӱk'B~Lf'76I#D }$h4oʷruRGn@!)ݎ>(`'iF"I9WAϪRڛVHzt)|ڶ,2aK C䌶zi I +MSeNotu?̀K$P1T@h5`/bΏ ;$!gJ2X׵\MQI'-W:jj̶I$J>/c_%؍UDf.ׁڰ& +^ߺոD `3]܃>rpr̭s$Esan>C&D?+pϔyt ›SP> =9q0)њly EyZC~՜T&%Po&.ߡZp- F8GeãC眝I;U"a)LN8k +L_'sfKi:1q)(dl(CEX&fS:kK'{& #\T,m2͂ԉZ2MEu7cC=qo^1⴯릃hReL"הk[1aON Pc95ypY`]T W O؀m=lOn'xE2KfQ :QYQEd~|Fk5~aʳgl<-z4Nfy808f崆X#ݱ5һr q^Tl?S;ړuс߸Xl) +#޵6 QIUJ0)җP1V'[yղ҂WHW W9?@꒳Hc;eQ,ޚ;4Vp&.onOr~Pwm\POGh-|!UERO{VP[vsjk 'Xa('g%TupIkg?y#]ks,݄1?H[G +`A Eջk3&칅(3=:l3y9E6f\&$w|}^ (zSCMyشg+U=DkA62*dX}ٯ +drVkggnq0$e'A)>|2}W.y1ɻU|L̽VN6zE9$m8S"U#qxxwEo|83'1 T&m-*7piV85r^v^=: +\mu*Wy57((,6kj' +endstream +endobj +81 0 obj +<< +/Length 1505 +/Filter /FlateDecode +>> +stream +x[͏4i<8<O qM@!IM۬DV٤vl<_q&i>}yﯻO=sӾx|=BcEc90 هNT f~s8xp&6Ϝ 'p5fk '$, 2܇ ѳh8R=m3qrv[c +U;}S_qN81B9^ψ6ydz9e<_뀻3sܛpgD, !?dHJ{jSnL H0OG1#1(<0!2oH`R!ⅤHQjkƏR 6 + BRs^a !>eZ0c;U3E'i*kLWƽ5ڈ͙YgeY&)YU.Psi/muijcOH-XUw)Q"Giҩ}AIƟ4VU~W'i'h4:uۋdvfp ,nebTfjU@EeФ(%DiwkuP= b9S("Dc]Orx3E|Q]LàK WޟR9_1_dxK Պinլ- 8ڶz[&P+ЮoD͸hאRA٦N( V0=r@DZ㖢-\M9L 2|Oڡ{A}g16\<ݔقmX+ .ڡ@M]&,=UW$1Qzuu~XaH>^zcˀ/WF[t#wf:\l"/*Y3ka<.؁5ͥtr,O.f {3n2ڰwr(/`n:*o2Q.5 +k/(lsmڴv1 ,_e MLk\ (p3.[,k\f@.FJ4s?e +\i_hg'jʨPC0Kqz1LZAF3N(9muJVE2&˯bc.y_֜Wco^)O>PWU30aC(w0ɂI3i1D&y&g'eepL#.՝>03x&3 ?I)Lyۄ2k( +cN +A5ޡZc7an7 +endstream +endobj +165 0 obj +<< +/Length 5838 +/Filter /FlateDecode +>> +stream +xZ pW~9{ͭhk4:-뾂%Em;PZ'EN!dq+%8PIcˤ6 zY6k ^^Z3{cQ G=h8C@߀8zpl%> ӳ^8OyBS6kg_9tuj$ҡېTĄk\)DdZC*|Nw¸Z@1̚¬1,cX~xp"G“Qg<1Qmyx?(yj#Tۧ VKD "I:w Vr |_D8.IY!Du3#4Et, >Qv463lV^Ϟ74-X}8g!vァmJ))ަ4K?r5`M[7`B JR2>MdO[a3kdB0'.ᆝ:2\4Z&q}C8jVӦxV)?ѭ;[^~o'v͗0])j+;l<L7jڕ9Բ۝FNGkr` JA\;JqW $M`  +AJ*?#lg4m:"\bs}'8PVyzQU} λ1Pn)

ny곃vhMf^AWBB)Q&GJh(F|YDyfL$d ԋ+C? T">}~gd}ƧLBbo=[;_;rxf:<uHc͋{J"q`#9 +N$']7 d'r^ipb,>U;bCwǚqX瘋˳T&~ҧ]DgL^HAYC-ߋooǪbd'O t__9o2ŰkXMFVc9u~Oo/+7oNA{2E,= ٻ ^=6k~DlEkx1=^m=}@@21 4כֿB$#UZՔj¬?ghҸ4bM~ 3cfs4qslY) 2]Jk doC Œ)D @̫rTc/<ݮi*yyƦlvx8ŗ98sGd˿6nHbÛ*hfo<ѩqk:7. }Go R/^ziJ +0*Sy [Aի+EfFtPkQ9f#f`(OLcjG>ߋ/MFsyC>.~SBz--z A> +Ya ?eVͻ[n8^K!tD# 7/yjV4W9jo +m.V*5u[k*u߷BkS"T PxLM#Fnk]j%o*Cds; +,[ؑ+mJgo,慡Mc"cldgpxTye#d,Ȝ!\Ti'6)Y6~X<5vsw̜ {CFr/}Gۏ%q۫CBql<4 yݞTATΝI6!Gސg,9=c/6]g{̙3Z}q4@h(7>(DztBk+|PTRY`h1jwӹ`fL:ɦaLj=dWɺ:ř4\NTY_#}3CY㽚^ "* kzj'=ns:⟕->Fzv'Nf\Ue~.;B`T!N#Uu0O:s4ҙ|?Y_=I< B7}0TU@uS*B焐 +s텠6 u;p\Ԇ)K<䖉 g:NYqQ]DJQHR|h™9b$0<1Huś{ I5ZSQBEbb F +8A#00at8*|###'ƬynNFEQ:/¸K_qXN᳌\) S#hqFq'FFƤp@£Sa"^ouK=5Ľޞ x.8>Qw|yz= 3|ppn:]@S89[(L;ӃͰ#M + +FW&I| +NM-\v.>gѩWiKZF必cfi&r~b.9zZBA $Ȋ`"0J?Xg&zo:: +endstream +endobj +169 0 obj +<< +/Length 3077 +/Filter /FlateDecode +>> +stream +x]{lǝgvr\R\rERԒ"E(zEK]G[6zl98Nq^EӦj }!M)B; +8 EP#%@Rrofgg7ytQ-{o>o¯y:ڿo 4hb +̕^ +EGzn5=ЧtŽv!fa:Ϳ7P^׷o=[ж1{Eu!ߊ;{?[>mf=ܖK7ݱzy#fI]EE=~vg_Ы^CCBϢ_o?N:qYnHc)ۧaELITb/{RfQOyd;{5MF똌UHj׉p7 +HJVHt:aj4j˰`XB1C>^zŨn,\>*#a3ذDJZ*dE԰ Kfn=8'Opi)̤56qe\@G2-$Nv.Pcp6I8xSfMO#pÉojt >E؉d'5ڭVNuAqj He`S68>hN·^ӣQm7}@ʰ0Ǝ1[ ^̪D8iM*'O HlxlnJǗ<Gtmuv ryq/)*Ki4 ^+~EInG94 +Irд*vmT`|ˉiP\IQcPW"FTH5\TG-WB(Z]>V"J21՜yde^~ 13 %KrXL6wTB<1kZ&1 +nLED_ Z"BU MҬ8Y&&+$K3$Ӓ`??fל#e:)+NP&:z+x}fl4EYy'yz-+'#\iJuJ ̙Gƍd}h\ٱlP +K1q$+My  .۷"EG4,s|4i`h}ix7Uem`9Z(2 }P*sl.6?~0T7oQyƖfԯ_ʲ.L|,cϏŴR q +OyQjptdjN4b qsGxZ%'иJ+Y_J)-+j,bIt=1)| Rj/]scbߣG[J} K7W,UH|ZKINP:.@c M=h"2 BRIE<2Mx?ey=0i^PƳon=6h +_,M_CѶ.ǢptWe}G\~{# EⱂYfIyA=D-qKмdQ:nv?P!hw?jt3"Ԭ@h4]%hZNFצAGl)ÆF4aLb-)$cm9<"WϪ:䧬 Ԡ19 &kAj7pb>PtÙUJ-`ۘ_V և0~鑧y[Z<8;'>j,_)er+.~ +h +=rZu qimj«9R*MoKCd? ,$ ]UѺ_dr ļn_ 3ʼRloc,JEd&Al Jt;nߵMGbeK.thdmfʄ-}$sG/fp%zk|GMu5gӰ2cwM&)N(dĩSA0 ]sw|%E6[2kt_4&asIAG;;MjL̦6-``t!e``P2+ LsZ>}5n BteXsegE]΢9 2Mpٍe2Ux{ϖqKev32ovwUk2wVw-*[PCy;N{=FJ4|b[;kxy{Wu4$t%|KˍOo-Pakmt{DwYaCE3$_K+.Ph +endstream +endobj +161 0 obj +<< +/Length 7615 +/Filter /FlateDecode +>> +stream +x{ ty,b_ b8XHIIIIDR%,/}^(^7S'}q9vaH>Y8=N^TӤ1;FqRP D^9~%{Ff07ݲ\-9rתp.YEzMwik+gnKN?zᚇm?0ǒ&>`~_ YGmJD +&(ʯan~~<43ȅ?g3ͼ*qHn|C4$O#{@MM4hz_!Q\k5P+QHOuL]-\Sgԏ/hd횯h>.j_DGXݜUCIm6|0jmzs33?aEoqYn|7 :CDIA6T(&Oлøy/S5*L=F"ݗ TSF:|<#(t⾵ÓskȾFͯORR*aBYCE#noϋhϿ.QJOWI[6tnGz׆j)Ifd_ 7W:k?{Ϣ;\Ć^eWeƏ``3fP$(1A qeApLÙ΀oa68]yԴ\-\d*gyIT0|:JJ\y{=¯Xc^ L EK1R8 O5P +»8 pf#g +83)<Er&<@t*W2&r3MmޞgMsekaZNyay6)rnWoBb́F>h,& *hńU+B "uA5ob3la{®-͌P?>ګ7|v,m +Y03hrATQ+r^Oy BKCfG Κ58: Q7<. 7q&%HC_m~BԷ*o斳,ஈF ja~E2S33Lj/f+><>@׮<>\j,00s3 _~sܲ:DGt&ZKtiX/X&=h!tUUe#]!8~~҄=f18gxjۺ +堢wk6yRg|Xu_[0E3yPCQy8#/LJ؉] \[x{|F׀C%*0/kʹ"6kzqSjU7&wo2x[*f2fop!lV,k.Cx]MrT"W7usM&\)=GjTΣA|>8d~˕|l1>Ą{σ6Z6sD`%xx q?zMQ1r rA*b'^!"m:wW#(@pSiZ0JSs0)%L1v>P #S5  k'=q 28sNKOP|K: LHlybo2h[jG۪mT˞;|G3z6l]vmlX<5H2W6CCtn@)_;aFeўⶨ7tVUhW@wXq*`ݰKc]ѵ~ͼ|/τ375OX8? j篋wo%\4[L-v KoA=AO-DOr8b=Am,.Qe{# +Yl>QX퀵Nc}pwOByRbph5^Q傣n]^Q/#+M\'a0  3[Ӗ0&f 7,foq]<U$}q +~z5ZN'BRıTmn@ |rcH?=]4}KdXE+0/8#yRa}^9&ҵZ^ .Ƶ ߤ%oN{o@ mtr*A~l~=1@apܡBUP*LB9P;@IIñ(, w:v+H +jw +91B#,G ؽj dFkCGZ2 lɧrXT)~:/ a?8x_>?}[~+h]„?sx \+#5NDo$ Co/jUSl (Ӟ{1GΧ!N +YyJ'q$P'un+eBIQ֐ +3Z l3&(^L8W |af &Tml,B!-zڹEk܊PT"1)CQ_׷W,J7vgAm5F*o'+ϣ +AwD* 1Z;0:-]+&X\q%Zk՟?dH ɐfy d-JOygNuFbW}CzIwԋ~V ݨe75cy\-Tl"x5Ԫ"ijVǾ0/|7C +x +0zܑ*~7 +)KSB>/Pꞻ4@?W@q88xI8{wFuv I>V>;Ptc+c`^,̵[ o&\u`g~TFڎZrFvrvw~K#oX9t`v>crJd37*ww$AlyZ qbZy-HM|.W43HLv*'_UV:GI|:A T Բ]iDk8l"g-B̋uWpdxW;{<Ϣ޾בyC̏U&~ >TxW]e]Axp*'Y$G|nXRiMR˵zƂ1 oПXD~ޙ/x)etuxY%2X:\8U e9>M [ T(H䖆B_=8HԎ.ѸK3>6ƈ俽ja*: k|UkMV}3f9LZkN,H+k89*N?nmg1:pD YOw:3鉘Ou/6 fbR63ݨ23^oԭ}x֩imAYtԾm[={j=1JF(Dyܐ6DUF,b4|"4Πyf``t[}>+ s򗟺=_.=я>RZwUɱmY"4C@:|[8?4#&^,jFν-ud+kf憃yA~#uQ zlwDv"CE4# x@ZnxndrO;)FGbb$ q^M~d=[Hڞ,%ǻ6WoP]_N" O9SUefRɁS"jJ >*!Z 3hD1 b".V0?ioRٞz`ObVݬNvMb!]-f>O +OӱVԜhq][K%o!gNdP1 *Uȍ +I$r拉:Z[bH7YQfX[-Tx. Zĥj7Z) OQ-^ׅ Bs[Э6Pk*A?Y ^9FDd8S_dT,6xP +X쎾#57ۗqGn9L bH O7QބC& +*rq[_(ÙGl"p7r$'ش+/~vfu2_GQ";u+\߃kD-q>LE%v㶆-ǙZ;nC°X;z:,q6~"b`ZӉU+s편G߫g#xLqQs0س(ۃwf9kϨkkե%(@|Fj*kun˛, \nQȇ6_RCi&x+wѴT>=aDBN!*#dٌ)t(/fm~XRX~; 8a^"R^)ӳZ=~_OGfk=cd]¡8n/*оc౞WZxG47Дؽ}g;Len;O&PV"ĒނF|j|E x߃2GCNM8[ފRGe]uOZIk|EJxW~ ޶gRFU]:9_f~/"}r?6R]XG ÷샋ٱeYLs50h>(yhs.B֗pQ%?.{}"~|HAVtAX!0!ר{dFYVO:KQ}UY-U5fWk{n 1S{eC/f +XZI[{3=v[ch3_(kUlO9wYwܩPJb}p5닎9$-.?c6[Jtaq溼[GBUע{+хvQۇpۓqN}LS[ N;? [gW '?W[S&WK_BkR|/g^!(z50 Oz ZU}j?E#&qxn%OT @SAQ}gY*,oZy@~/jU$jxS讻˱7/9XwOw0j{ !*gr7l"=N7wF.Woq/q ?'z=|i4m6my݆>SHS7r>_~mWx05Gk|FZ]ZJstDhNά4'qBuA[j Uet||]ǝ~G;`Vxq#7qGd\?[[E4Sh>j[EASD'S;Qpe*,lE0!-@G-Qgt6caFG:rt:#At^% ; B"YE1Wh>Qy 0``Lw#S0NH1"_i>&oh1cƲ8=0fasb$ wa FNwaeĹGE^DxxQ$? L~ +6>}r%$oS,-F!DXtB gL-17Ϟc ;ǖٕ#$>r/kIsks$9sSN'6&id&(v-8>bd5NYxϲ4 O[ǹs^{99CD>Od|Kqێ sE[75WN31 +endstream +endobj +85 0 obj +<< +/Length 2552 +/Filter /FlateDecode +>> +stream +x\K#5WVq Fc]Ge'z~U@;D?ڲ.yKwz;pữoρN|yiY 5e݋{O{~b>wTv%^_ҽ{zݛn6񳩌w~yG<n&1?sG~^~>re(z)<[Hq@;%0S}A{XǾ)?SqqL k8\{4gq,a +=X3SG{ovJy:_O'o++9eAϟ(}x UM%XgtPxeW'|D.K9ڋ&r,(kjz\7X$`~gMU֭v-;JWDj#G);KqF&m;qC3 |xWNa%9;cXNh4ɲX/㚣o7u +NI>*֙)qܝ_+E/+2GM30{u)'y)꾦3y%'-ђ4;$O)}DGK"썴\H";?X΢۪x@!&t3tiG47$RUo95=Fqfrҫ~$}uXD[8uAX㬐f1[uL$5Dw`82n""@|+WZM, +@ -hѷȑpH.H2Z;/%k׸wä.7奯Y*!38 `ad o+ȑeObcf)$ +ϰs{Tq</8 mTKcMo)u+LJP-jWOtߛhǒvJ)~#X MqՐڠ.l{B?6s$#؟ZfvRv%š^3#'uݝD87V^sU{q^¯OU.[%`%" 1@$>F 3ȃ?҆~ʁn\H(AAQ`z5b )fhtU#k\}QٓgB +#'T5NÛ+LRayY/ƈnw?8Q~ĭGϜ4=wNSq#*1xN)V +J'k]P [[~̾uW.hj*Bd(vO ' [a p lTw%zjc6!De .?v +"'=LSsW ,mጄLy oDʜ%׷I5=[@!T_=Tf1WLe9=-y0@Y 4trep<uֹB.{ψm۳)VVc k]BgM#Vh64-Rܘqu.5n^L!JqpڔY ^@PZk.<fqOh\"'d ' $sQH +kS {kٞ0.왂gВvu~;ޢ&Σ}w ss"Q& 좕 +%Ԍ,xq){@0[{eSS#7;hd4mw,ΐ)7jY%$&P"H8!i'IZ༱Z- +TSfuq/ևEZHbJe;Kj3wt;>^v6WgU&Qn"Nz:0a]hwQDødVl,jTxo +k1<_['J݃4ݯ϶**"$vfщYc _X*e]贤כWЩ֙R-csaҼji_rcp07Hކ&. +]̬|]^N*} mH{<,N-&* + g.S`!`]?gSS*GOXtp)+oc$>!:Jk.ET7$/M/0V`:œdlc򃛫C߄|/~GJAOPeg鴈7QSF+݂Zn?kx=- +w=>_ñϲ[iCO{ٓinaCL!6X/Onp[D>9,F ~G2iVD)Ln%Lm +endstream +endobj +41 0 obj +<< +/Length 2278 +/Filter /FlateDecode +>> +stream +x\K6WD9mvoE. +4KR3H"-iW@MIpyRxzQ>xۗ󿇏_^x yeEeMYUBWO?0Ư1>m*Ϊتïc8b+ 9|C5q WLK8͜ù?z5EmYqL(A$G)|:;G;3LrLskm.[s&.82pA".fN@=s[68q9ǏYFwʮ~nx3P ӵFk3%n}Hӆ4/-XIN`p4п!:1t1Xgz(Op0c '4ZT,yAgD]ad z8wD JPt s0)&%8PFjaVdgzS*]Asc}v wN+ τ{ Ձ>8d\QO3IFuՀizvsftl? - Tc"|ϙdvDJ2J *5ق_*,>ܣ03 |b̂Xˀcz5!q"4ik Io(&1g"EG]N!h[1اJN{iu +%1Gm(&35'2K1rCӰK\J(A(9bdf.K K#w)97.x)~%oeT!g$9|G:m3n\ SLbI$ +E2f_ +ҞbB9sL{>u]Qt5ZF-JA"xWpQ@Y<]9Q{]%iwŃsukY1µicˈy臊ެ?Z#xIn 54;,Hx6Z`ht^ ZW +|w cU1}}|NZ|׻W2|w[sOR +'2R}eL\yǫ\=M=AcOݤ;>Ҟ&qs4Ngv,^xǧVV34i-tyŃqYt$1fPVX[x.^v J3^ pi"|c#6/ӱ ++mEj_N/iܫc}#iT}c5'EV1J:BhedB!`?@gh +t8¹o0jZ!Ȩ|UVюIɣ-R5T"p{I7.PTnUB뜱)W>eO"RЊk qj1ਘ<7/Ntg\U^k곷̵ +-АzB+ +fۆ7Y +n !P戥Yf @ZqyM]{]8n2uXxZcݶ!}nE49^Z2eʢU_9Tt ZIRX+I!OZymkƱdwJ!M?BCXL;lx׎ +endstream +endobj +30 0 obj +<< +/Length 2445 +/Filter /FlateDecode +>> +stream +x\Ka%[CCRU%K"5-?v=д-SzWduߟT8ӟ/|?_d/?]/ꚟ_:989SpzE?~㋔,F߽ǿ>C_O׿PYg7“ +*}|w:Ŀv~.U1 s8oBˍcx=Ιe0όEVI}. ϟ?#_yh2n^rYvC=Tze@+"QRpF{^+TVj&oiȵZ"2xwAܛsi|+y[я4f2hԲ c!%m_ifJ"y03-^ +Y ^bel8IapZ:ӆBJہ:jgBG^,(l~sI B%0T/|pVNpG{jf/3ԒzVxgN_&έ{?zEj Gg,xȠ5p;-(skPߥ%`-`e^X0RLQ؍ʸ)p6Ps?0A ߘb-bluc%eӑA 15 M8̜gنCQ0G\Y횒49qy=ipYJZ~%=$՛vJ>sv |1ݨ@<|dӒۆ.qpwdN y1ÝIR(QChlĩJYQ1+?1ɻӊjx$"3R8II, X5h;e$PCY-(.DSԏa/ş-;Z.2;|s l nMc.iLBT }$#GK'P5\YyVKU:H۔ D& Cr1+ . q uo|ôȒƼB$Kq%xּePXVL\F>Qn-:ZOYXxPim⹉IgT^W-^,׋ݴRy'2Tהߗ]膸}VEjMn=\CE ղDhm{"q$E<87cN0j(rqi`f9:-I{M)w۷RF]F|êq ,!f- FqoRɤ goW{CИ}d54j;ҁ]{1Ѻ1"1.0ybevuSc@MFeˎ@3+~m[|?;GݾR;"cJqyׯ)Le, +F4 ՇPp쾂Բp"^Yl+[ԤV.6P~6!_V7'W~x׎fU֐)cQw2Ah栚ֻG0'Tl+Dj9}Aܓ,=z]׭ [ɪN#W?ϱPςZS'{-..J|ZDZA`$,J~=AYJMUɬȻD̡c#nZFDSܱ|hq׶a}L?w~0콘0Ƕc9$J8rJa8at춃c#6Q +vR=X<,Vޯ| Rb:{l&:«Yՙ"/whG;Q\̥y|&̟4LDꂲoDp^׍ SnѨ:VL`99(9fTswNT5g1dU|G֝ZPQE +c -gO {P;at^K-Y:.j;ؔ~%t@Mߦ. h du |tAUǹ==}6?S<6e\Ý?3aK!ČVk;.[?A'o$<脪0+,B0qX: > >hIq#H O[mԥUzv.в@MW,tPwXJ #"X߁bu'rrC.!ECK.Q sϥ\MKC9׻> +stream +x\ˎW"0$nYH!*HQe2%T2?0_upO^r8}cw~?_ ?Xqwûԁ?~fu/_1ngW8&8;30_¿ g︿"dq*쟇2t\a^2 y;To< HҀ:0;`f|AK^ q0t^?;t? 8pEay|$p T0xL 23UM]mriTBrD 8H:0x_)?G7-Gr$Y DIo4|4J*C`vc2qn|DN0#5j-= )r|BouOk.xϥ1"}d?k u*]2 8x<ͤ^(1ŖQxD Oɐ N=2&2>M#WjIZl7jZɵDr_4j4Y!zFBb%{A|j +9Dg\=l4Zsk[uڊobǍٔv3MŖȸN f. p @pH/8cLf0'ڟ{dXE[qN~ 2GtA95IhLxҋ XfKlVe7sm!29f}҆~Էz,i9KPXhQ-ӭ4s-"zJ@@9f"lIFW0V"axio2Qf>بKitf|g#&Gp<[Sd g xhZ+ib . Cl71f4s=Np ߌLZ8 >4yH݅J|+[,?wl:< +5[gP?rNaSBW%m?t~m^##4"P#^AKyew?Pk=qe¢U\Ȑ0j{ЅM(VN:5 +gȘbc#ףk ~>&]uJyB+Q!p+>'7~ d9=Gu1 8 }>U맥KӀئI`!kOD!Nӹڦdnǹ}]" K,w533.aR1x1dGZ!s#Yb|v%|ӂi(. ]!!~Zj/T2}6b;P)Qg|V[j&[#{-`5M,on6 =-Ưh45UlH50-ȕ9'_k^wjmGJǎ&x2g$uqnv}nt8l l.yjq],7v!VyBb%^M2|壆@fR"^:}0 +7FyZO(}|b{L@13=&cEUGdiYzBbO0Yg[w,`Htue25~=Q"؜]AV}IA6>Tʧ ݀8F͚>ٶe +Ѳ kG3WQ +|< B nWntdT]{X>1CAїOeiO)岌?"rb&}r,=7 u>c|9f=~> +stream +xI^CwQfoU>؀\"$ژ,Vg!dH <}a8?]N_xz_~.~Xr[jnv}Wǯ uo/& 8&&¬.\W +gs&BnqN|žb['^'˹4V c_[=nj}C%>"^_x".n.*q& +8i/mHD~ƑHI:(" >~]>Ȕ$N]12 r[Aap p- IRR+b{W[ˎrU +d6ɪEjE2a!ۣ.R'4&O}!̨5.FL܂Lr&LM žAؒ~?~2L-ҫ]ajˆRxAO[Uu+t_XͼL8h`#} :ȃ+}y*쏲G6 0ګ x`ށrHa*PT-iuRy73 &ҁ7IMvW!ڤ:voVl%hO(+proyi|^z{.)_ʷbڻ-|wU,%$U裕q&5l!83Tx*P5.|ߌl|:r"h +g0uL 80g2e-RS4#(V1ma8RI{tXetmAm { k$z{2iԝG^ur'>ۤ~$=Mc?L꽨~!LyvI;$xh/8R5߰$hղ +>oI8˸ncPf-ؗ=[􏿩`7*CBjԁ]n= &{x;xyf?NG7( +/ +))ޟrX.wߤz~c^ir NP'ԾO\цj ٵzeu`o],ZJY_i&JJ7-d,!*l5Qqj:R&9g-r!Vp^οS6efZ9Hлʣ?1$>qrg#ӮξAD"{;iIEj1Xn]ZԸX| 6K[RȌj)U>WZUYtm³4:ul#\6l̥kt~'O&}Z]nt݁-~ +-nDOk٠\3n IgR w-w7 +kԘ/l+l*OԀ󽷘d4bœsŶӘz+\(f< Yfe3%*|Ƃ*w=3)X[{5 /|zOfwF- +endstream +endobj +17 0 obj +<< +/Length 2869 +/Filter /FlateDecode +>> +stream +x\ˎ+WB&`xa$6]Yh4EdOGlH<,.8/^.yzOoo<vw?/k~|;dr`='uwz{69Waa3aa?\}Mt#=p~wg]Dwcvk۵KƧvk6 D2xn[wi3SYVz]';'8"7#Vke{M\~NnS:.>J8}mLDw;& {,^g~!Ϗ2qA6\,>H_yA.k&Bg:lu iFeIXiZ5T,PŔi/ +bI,_YN>u^kߗd}#DHNnmP %i!vю>MGz5XjbKϓiΌ_> dx%whڷ+,g|˺u߬x?]^[{j)qj%YG@4D=8øt=bK>=,W ]5)_1+:O}`H^6;Gϱlv߲Bܛ+I!Ase 8h#.@T֭7)_4Jgw.~;0tbO7u@qJ\&J(ybt5*RzYD{U^x`"!ViбQK_ +4 "}d@$V™hn+nt5,%<W$gg7 Md`^i_ownӂV ң_.E\Wؗ#WtqD=&ڂwxFB 0Ό6|+4iMVxt}ovRbpREOP@l`ZkU 7J8[SK2G 8ow#vP6]%2=RfrH{Zp&CRr~dSU+9]##{$!٠~lSB2|A$AaΉ*jn+=%l0Gu +BlȮbZM)݁3-&$9G]MLo{i7! +a+Y.2 /|<{uZZ-f)8^SVKՙ}IfZ#h^2S;KT=zS36 4b<ƾD9Si9ldvfĤOUփ2\ѷR%}@b0Bq˔q*6(˵sBѺ4p,>^?'4W6`W^k1]dwDqW* xxgy:p-b|E ߗvwYAv8b",8#.Ny/rIOaHXpt(i>'^w%"dH:;E{=)$+`jEG; Xã o-/f) +P*:!rm79UⰭ4O>_.~f p>oʁ,SZ ^ĐqLiCxDWal,:;WTG{P8"{ +4#s qz^)O#m"< ucuJنt?TafHZЯ 1\pd? $Ч` .< RLZ̋K) +x=  +GO븰p>:p|`9"P41!$HJgPH:ATik{&)Ҁ8-s(a-0d3TQ.>S+vBҨqΆ_E.|hf㲡{" z6 n=*خ33NMPNJQwJsr@YZ$$?:< {KƏT+#XaɗVJ,qsbdoY;x`X3t=ilDžt88TEXJ7[y˴X39wPS< $K$yZ`B  +endstream +endobj +157 0 obj +<< +/Length 11952 +/Filter /FlateDecode +>> +stream +x| $uuWWg}3=s=s}py,.)XவKK(R}6)D>`e Bd07v !q slǴ!o$1˰CIYmt^dz_Uߗ~&d{G?H߯1 Q3߃< xRQ\#y\&D ~;ԞȥCϕ'.<q&ؕ'ﹷlh$ ivX7qw& +<7-!ZroboFqZAww?X CYE~%m /xJ}9o2Od˽BPW64žՂ3+DOx5 +1B6 rM$)0!ä +\!o Fh0+d%F11Y&R=S2F0Fa;$oi6a*ϝOk7;8x~ ϗvHQ\?#(KIyp}Ю-O38-8xgyqq8?#ί8+ά%I$_/DKeY,_Ȋqbܬϋ$ڝe|~^|O^ϋ -uEv-q~Ϭ]l~ee1/e1/x>MOm^+ +nvﺲB`(Q+* @-ޔ3 & \ GAGkkFE^ Fyhoo ++>׷IԽ +]6W>b-F_&v*S~@$3;dd82MVa9^߁2GVH2hTIx@ @Qx$.|A 0RHbf nFGjݙe6:q@,*cVUU{{KR4tR>@)}{@ g& j.Bkvkm[\>|ϋZnj0m+ U>tE0N]ӯl.ȾsIK`OJNQbI \Fy,|ļ1/G˧ + f}zZ869e +I$BD3X OP:0($F}4 bJZсUUlQ+<4A&0rY]V|9d"pNJqjjh, 8MU+%"2k4C0Xk2  +ПIIچaFkЪ@PJIEY).^߄? [o!` |6w0.o)|| t1`nanl0@]T6ͣ0 kE@QhFEPɹYR#Y0TkUgIݧiFe5[ۺmhf뺡pݍ6#X/W[x==yTv]M(Ֆ@8i@Lf&A>u)u|.$'o*  &=o]" 1_&uUŴJLxQ{a06%5ŧoeq> +HsL߲x }."N!*Hx [b9 *y= aÌ!!4ѱ"]L݅ :]P%kޢʘ)@9zsSu95PTU UK ՉEPl(Y9/ hFy5]Z)Z+0 #[VP#wTOgʔ/TGRe5JJ>ljf5_.Y[ -\T[dPa^J{ApEV8K_܁<(HdћYeƁn]&kAI[,Xv@#ňNz/0hD@Hm2 #")HW1&801.-I^j"c4X'0qDˎux`?Qw P MЙiM nE؋׮)j.%Ba$>v8 @\oU%ǦFhFg>n]+ +pݼ~tsuHbtBnQwtt8~'Jcx\k yCSq,}^Sኪ3Buuptşr4I:3v`:)>ôc +1Y7>:ѹ X:%*ʿ*lGvȚ +*ZZE  `*c.h9r_d6YcZm5<GLƍp>}F1kX^= p^^Wa]G' C}׾ƍH*t*8 dlѵYԀ+LTgzzxg`tLwPPӌ[Fl(JVyEp流e/4M}Nj8/54 g6/zi5Vڴ554Ӆ'e9t6P0JMtuh +ԩ|6ӧVQIܜ1% ЕdsnYBk w2`q!I|mSf#;0bBOք>Y3>5@D#BL rBCǺ,c!beZ@d3TPV0jbZyg1s9‰o}&|Q$0rSwf 21Wf?7Rm*%Dkߎ4*Hki0jX\e!7Xp@s3Kc[n@K%ȨV8Fd|ihy3i}8#޾ɏO#LH;FD#Nuy5I]4ˤBk?1qw{;\wTկ2HӍʡ|dꖥ+NQuxr0o~(ZG#sUH{u3jL~/./1j̦@ $XkB4F2*X-0W6b+Eó϶YZ&U"C~[M]463Ɯ(4n3Zy$<\٠ e2t,Ms%$&5c H(3Z*FAςlUjnp,+olO離/2C`j b`tTZ9N:?q,hRMS+l9jEXU]3CSX.74. `ЩEh`\QF J$2Ro@&r]:_vQBjMR~n  IL4$R` 4z:#\LЛ魖 !홗Z7b^l29aX@V(<~/;`̚bjUUTEU֬$^J̩Vҋ h31mY?RnlXdn'31js%j%7>1+s e*WB`U,*aufH=rh-c_O@dtb"wbnNͱ9&1a~1 Q< hz%v5{72}5գaOO yxn0Nwl(P'uWl Fm/3)>zӉq?X+8 c+% &p{˾uQoėX. +sqg#ς( +`(MHɘ(y~HD9 O=c;|Ch. fޤ7qjP]93m.FMeeqo*xY{daS}Et`un\`ԙ~]a;]Xe.Aw%e4 efe`A9-12T(^p3ME5o8YfvYO'o+-N*Mz1":2 +ML" + GaBd!` }!#J1Kۗ(H3X5yv>udaQq%=3lK[L4cVq5S1\DHyȱα/7lݓ a.J, +}#_8>|O"Vm-/Y?I?9˧]El:n B_RdX>>.B(kp/ Gac< ,t<ƭykH̵-bgl "pij6@\t]^8 rJO#D,Zl_J;FW.XAVhxQ4΃՛|徢&[R[kT_.ϗDo-lb.i7nv$2OuP-kq(7^`UIR98(\l`.feK6L4ߧEʷBĐ h,Q*º~R{4 LS0EPV8fThp65ryE<ަXDd0m7Qϯ@-;N%BD,&;rEtzqp?ks7 tӝ5e߀=_O~*5QU**'VQE٪]nk,ee홙o"ithmqǬ< H: O'i+DH3\ 03C#B3Z[Ta^$q91nu3^=c(_LRmΗ_U 3&fέAk{`lw =3ܫ|`f\.T<KcZ:G-Fd9V:(9͆-EeKwa= +DD5]sh ]<.UK1@Rri_^G}a0(hb+SE)N.qlx&>W_m9T=)@oMe& &b:v(Օ#q_8`.jRJW\\'dwɷXh2N1Pse.a\]xSWa<{ڏh~j ,xWc\l!1 CME ̈Z>pꮰ bnoNu7kfXtwF- P/ZFtԶzehNFMe5iNJS#WH %@ jK4Ӥ>N8̩sk5 *$B޷5gp P؄|/"| ,KVX]qJnʰ9FNXQVjC&OF}+#܇4Ѷ;hcrDEAGyH)<)LǂьfE#ݐzXr GS1/Xn@ĉXU` +ޯ@ `%eB;( +WEsOL:H3fF\] 5.OMo5_ce(}7A2H94i…s}k("FsaiX1`1Ǯ 1 bGG(RoU-hj,l`pЮ@z`fSڱtLfs^(k&X>Xf2Hd*Ŭb g6N||~-{ܼԽ@ۤ;TI?&jwbyԦ > 3"bͯ\dWZp m6%*,:"wܷ ] .ZIa+_X۸_"N&r L k0\R&-lbe lHB]8h ?~G=緽j!vrՌݗif(gkܸktvA;sh^VkKfF羹2!q 9X +֧ZKWE deh0co0؇:0 U&R}N`&lqKyuA=ֺM o⵻_V|2tdCbvX@Pm` #lGk:~EעmYBqvvdSkR֨bOuZ9E ;`/5N79=_~xH.Ԟ8YQUS|~#[o&&зQ~,QgK%!mmA]]pB"m'XPoa$n?  +IW+ur`d{MBuOX*F&38KTB24`B!5}@8<t.SUSH*ِ~ih٣Cڢa2'>ȹН v1k;%[@8!#ܳ0/%e RAy1E^E^.` :oC2'wDq}K!,_ +\4Y۬se>&-1K\Dn07o4x5]t̯JEq8D֪wf(ljFG7̰zuu\nY{VE }d`.D]e0m&~/bu#N\IJ#d #0`uyhV<e}P`."-٬,, 2Ş8[4~ӳq>Nx{x"ܿώ?=#6C|\zx[BRB:=O,NE SdB._Xl8xձWgia96)Ƹ2^=yI]qoy's*逝-襊npڤMޕmd& [[T|܋6@a J(| Sr YͅCΧ6xjSzg/6ީYwm+%l̺ .|t,ʟ(<5 {\ `h\or/O\&x{YIcʉz,ݫ ++KxtE󂁎<|_WB3u/GR>>*u'ľ%uK坨e])egcthqSvfik512iKh]KkKԋ,?_'_YѲ"pC+lVK] XA(|-^2#wF"D`ҫRڎ]3Ϭ|q1%]nah+t{ GvKi4P(@ {MJ3p,9hx8 : g^+\ZIOM50RD٦}#H1*t;ꫂtZ&M/h"-'ˤ"!fp&QDK9$5wkrLEO0| |LziW1"ѓp8U78CqE0 :q,+ 8l=(ScQcL♣z ݊öcHc224܃fL{O>U.)5]e#tw-K\d/H-w-` z _)\Vzi e%3I>ʲajGv:P<`|ۓ-RhEaPv| E#z +(!VZdƌxJmZ2ssfk$ 5TU{ E"Y+[Iqm`^1 r!x=M9ˍG\X.VS +=._}^^tfer0 M&P ÁYlMI `(5grJУl7hg)g7OpVpn2go,EW:-IGdI'-qļ4`/G*9*H "M?u Ua"=э 7*?)xA=-߃./7NcӄV/0+ᙬe 6\^/CH7ߩvKemO"db1?*C8d`XWL86z1Q>6tkAw6dQ)W^WDg2|'ɌbZ="f {4UJcY+lٖj +}T23sը?S%O1át:_rZ/ecOg)wKX7oSŁL-5~QkNʧ7dHחEўU KV"4O9טk3Fqo3_pˉ5؜3 +cgAPƧjfZo> wq9 #ڈp"rc  z_!Y6IѣD5RfIl%Uud+()+RWb|G/J߃va+pz{Derqﺒ& `^bB?%C4BL!:}$ Ug<=#0#0G'7٦{?MrR>2 U,_BP Uܸ6NmV_.|/7O=+Z/i{7ÿm,tϜq4Gc|FxZ4!4[GW{6v&S*ׯur[kҙ3i'gܻyeUt兗_μ ![ (,08Z[ߦ/d^2*%x3kluuxҙ \a +endstream +endobj +173 0 obj +<< +/Length 3636 +/Filter /FlateDecode +>> +stream +xX}]~wgvvgvvfgvvvi;glj` 31qHĎC*$ (  @BpT]J QRhcڨ|(T +HTjY~3\P(ww~{y\Dc£|M~>1|nL/CT~ Z?xpzh:> +]nh\}t|'}등p<>"d<7֩O8=7Ͽ2op1uRL&cr܇Wǹ8 q}wWS_e2/,9p+/#}qӹ^0֑. D4 ߦ(4]d@|~"C }hehyhh)HBU;?츺'y^8˘+c!? $:y %S{G&L4yt]3/@|!5oB;!G8 +3v Sj mM1fmm07'ODX%Yl/ 1~oǯwΔkX-Mƽ=#|R-1Cф2Æ4EVh~SAZ;nyR`9]xWPsk;OSͰ9dM_]grq;: +ؽBH7 B4RuwdKE%O1F0X  B-B1 +DYLOș:g M8Vf5$zjf3jNu :jNAڠSmЩ6Tt :ש6TVt a6l6^wOfÞ{'^XI+L} t)w}pPvdZ˜ +By"`~&NJ1ZҪw:.&'SJ, +uH18ۧXyɐ\3kDyOXKٖ?{ƞU*>!*]|R)EgK8{v1@7'a bϪ_3 ԧs>Cvm5=Ԇ aƣ4[N2l;g[D +/Иvư$S24Kr}0 +oxUoĝ5mokJ Pp?r#K2&]3]IXP0!o~.,;b,;b,޷ v[dz􎧢v =;(r h3ۜ36vW) #޳c! =Zpndj `M Obdw5˜a|)R8.G|Gb-${a3BM`>fd-">~IeV[ +kQl ^$z$@<+M&Hh*|!Tsm[?\ΤgLI+e1iV)\R\bNz3LwN3vQݴ"Q^`ioGNl6wH~M"~Ɠ;x03˩.n6S1P,U+v@Ҍ:wjQR882O +s96x&Ϲj.EޢwΝ;[Zt݄hF+DRnPs67( +h,.,4+j7RpItZ2رm5KudU +FrrA\lL^nikrULJzƲZjո͚PYyY$r{VT% f$EwNv+%UWs%۟:5~#}_}w`ܾ;p;p;pܾ;pLGΑɑpJҬFjTҦ ^DE4Ahi_G! +ZV!zhJ˨Lh.孓`ŧ7vwFD!ꁟl"܊c7vhG;T7h;ھxլ.noE;e޻Y9^Zyt:g{ f2J6L#xiv3;m;7r9:͝6<g/9s3ۄ?,SlmoOFIym1boހPcG%e?2Z'nib{#,D8Jr;됳"l|p@zo;!Oom!;>?8w \zoÃGm!\~o;Uȹ"\@ \i +endstream +endobj +64 0 obj +<< +/Length 2331 +/Filter /FlateDecode +>> +stream +x]I6WN !enEnzhf)S+i-2MlZ"?=Q7`~HM_7ߞt/o~x?]B'I'1 {2}:P[1OAAI]~<|t!"{<Ԯ9398xt~ @ÍS ρ0fܠ%Z0%9Zg(zn;1 {D{\MTD/y]}9^.=8QAXErxxAnx4qrJ@ %! A^^EWG]9'"yf.w%QD&\*rEP>ŲH%&iX\MOMGjkfzsFrX#ӆƏ$\Csԡs(=.Rɮcm,x q,Z.Qsb]G=DYy ә;,xa%O03xV/F ++õ#{_3Q9QƑ48Lr,4N쿃d)j0J3gVɕ57A ֎RHPjB G)'@6cȦtQ,,l:Ãrc^8Rܡ ,z֙ ј\X (I?Dν/u=Dz\66FMsv (# +dʑ(=óJA ׂH Vp:!()fK0Ʃ r#fx*95Kdj9dfl{fB污)dl +()A8CI<8S\R"1dG9t,mX6Y,2]D$@н |eLr(frsj+\ Mx#mnt^S}Ħw1imMifj*ULmJ1*\@.h`傧Rbu9t.z\Nav'ak7i^G&8+l<ͫjI8zV*<_ZYMVڢ|cB0_(?wǯH!MY,HDe*ԛB@-.f^O +QZN) JJVln 8?[^7+udA.M\\cO_u<陘6vd94;K9&$kUl_v mEM6*D[Z-5bm)04JTZC]$vK*f_K w_ح"u+]9PUpwr$[s8:ftZyrqqKcsCkY&gr]X/1u3>3c|fz&:3p3s4!t&bgV.^3[Tq33$MY)wf%ym37+C] +endstream +endobj +88 0 obj +<< +/Length 2324 +/Filter /FlateDecode +>> +stream +x]K4 k7H~V;qINOf&]]Ĵ!7P4O˧__N>}_O=_A(hм~ ۷Pi6N1a6]C~o^~:r9Rɖ` % jqrS7ˉ911{ wvc;OC}xѹm$8kص];'_^5@nx{yl(X2RrRQ[k6raq'k(=^Ksk{+pfh؞.FOXn#8y]Q6c.}e5j䃬el>hؽ>b=X4qڰBV6&j o)=[Mz]ksN}>ӗ^gO@x˿wh &1TIOkL[ڛ):h5CiS)jMV`W6ahgʲ,09W3{2d= WmnΙ`)A6mx+II  M2 +?Se8A6.F"i +Xtu\6]-*1l+k<$ )ڐZ$XLxtݾ4u}۞9fј$Q3i12%#^^-yueQg1(gt BV]9AMAM71[p22zJeJ,`YSMmeln%Iu>DYKR{}NIWћɱ^k,a89zUoGc3%+>!p1}ߩLo56;o 7_g9HYOÄ`w,U!b]Cǀ鼪pO-\6\ =dXS ި}aTmVG''Z@[lS"$<|QDnwP J +GҢ]~A H44 s⌔X}Pt"m5>گ_PE19ޯ]yef']33I/E8J1ŗfnEm&~M;洯?xW*RJ>ʭk>,}7}fOBʪFdlG +KO֘=nVdAt\Cf*~xC|$5ҿNcϢ_a4H_fXz7i+QOVl騴;`kgi+ZR5Mu4NDLQo hd8 '+q$A=$O4töm~nW?sC8OI؎mmJ\.[$'od9VN +؄o$vW~7foaׇcUh :2Gi7>RT6"‘jҜOTt˸fDuxIc_ mݻqᐿ}m.Iyb׻{}sҡ<֣|$O94'K!KKѻLY1sɱe\rl<[6"lx.MAK&0%fd3гIRo(oH.$ )evd)c|ۥl4ʛ>R&IyGw$^>YgX /,sv/򦏔IRB^6I*`}O?V'Kc^&l\,-'f@'n.@(wK K Zxߥ-Cu[*h \epG۟Wu ƙ8ji8ф;_~5KD6:o;@M}@7ۼǶ8;Sܷ 1'_nS#i2&G~q~CƆXN67qmqJJ 5%)$laA֐%}-oS2k"MҊӱCnCjB'3!c&XΎ獖G4QY){!V! .-d7V aW]/4$H&˳?iiQȓ䤁6j1c4ijO5$C/|js. F i"K(DzPϊn]u΋gb'k +ebG5M \h#EInxkqYv֜c8+p5Y/|SbI]o;F"Qh)?VWo뚝?R[C5\wf$GF0~7WῲM̄Zipe˫ƎǡfPEYH.o`d} Q W&,!*C3 M@l4$|.$~<3#5X5TV$M+X>7{iy3 +gn)wጶG|f\]䲯MEƮ_mH5+Ӥ)䙅KpCqLMt|+V^HЎ:Cn)%PhR0or)x,j#IUb]]AZ1.ל%-Q_ba[G,K$IbP4W磎Z'mmJ,0H$s$;R4$`g'($gaU1YÂmą}H,-g\wbUCT\cy +36:#|5Ƅ=2k?Y8/J1, +-ZԼN4F5tt~Vq0FA[1!REi#i|8d!SphVկM/(Jq+ +I!Վ22^h Kpt2dˌy[",nl0Ljh̒YD%,Iys.l3/+^ +Q1RGH#[ nj"tD/,a!-22G1Rd 33<*zi7rk;cN3ۖdYT/>xN(_db2!^eR蕶'IGj$P Ջu-yy8e 2o8iWx;QbqW יm;rAY#=ex[CbB0 ?1nXOENK=L^ܦ)>)r6 WI +qFre-k"K})F2E1]$pg-?ysXqQ( Pb4ޗ%Zo@e:$ޙqUV>WLcn=2*ҐEqJݻDqe=iZp(xVJLљP ^|KY; +3V|\Mw.%^].Rq:BWi4raI/ '.4H$nSiisr}BEiZ @zkby56GxzO.X&މ\x˝|_fUYx|zF V#JS'g|>t3J=PRe{H83g2\4l +_8tlT8zK(LHZAL_mSP̓tp0x_ש~ۄ䢶&aϟ}R[O3gSpIP~fo{'7>BA9V@A46&tN=d^{/j 2CA7&* +iGp̓ 0w%2$8%<?Ӓ[k[J$l{Kp]ۓMo{>ެoG`{UqlmMl5qtGDž#`ǵL#Ǥa<@}>P L v>ⷩXߌ}>x*u ( +v%7mV`!Į;k7 ޲ܬuc4U`j5[\gn$4Zٴ&*0K vi`k(Ij9DE-L⧇HGZC $k9](Gy8 ossS EFSD @p"IV6TSJm0--\V,<8Fo l.H8BJE2!(KfJ+>pYCV`;UK0Eϳ(uĊ~1ƭC &"p*]WE!QkiNH'c:IP\@ǧS-yH.хH1@%/" 3LhXzXMtϼ}q*z;zɫZ8’إjWxں8S',DfPj5;UyjjG2SKn-ێy+v,#7yr~hʞ3> +stream +x]ێ6}W~<m[}+m@@%)RmY3XuYùrF$z|%?.~{_w߿w/߿~޼/8qcl; ?\Jι?&cǹpo{-Ci:g},gRrSp1XgnJlUdl L0kE?;C"l!#],2⚨2G.DVkFςd\j5InG$I@l9d>,?vFv]ʋqi#롴먡YAsY~j—2] A-3WNzl'EiiR$WW +PNS$pNr Up(=c<"0}i*鰠:QEGjl*th#N>8I3֫/XFօK?rVg$xSmkQ>6LiIbo{,¹ -qw{_ճU%o.80xy*.|-厹1Rui˜SdnMLZ3F% +SǛ.z*{1o> eut,sH)軱xmX3TpAobmeQ#gMA- nfZ"RFd +l۬`t2YZa\3 +/D_1;[t93Kː|w V,w?v--\ X-qE>54b?w[V2mHɒ<3t,e&\Xm0OcѴFaS@h!`3rI QI w437^hw `b +Vx缞oya=)6Z:kڇmnyP8&tL,݊jȃ Fm,GO7Ks=|ugKi!|*u-cf| bv:P‚tqGy/ fhG>&B d ]/1iN׵qbP~ui-n`]yp&vAMqm<y[[ԁ)yGaMxƻ=g2MnxxD؈N:;4AreIh,a}W{vR Qҽ[ `ZIFI2VUrRt)VWkf +/iwK7wqSKw5|{i*B@'K'! 5Ǟ M&?.anb:0,oM?SK@:(q$a6 ؾ YJ)S E#&#hZv](۞Ej:1f^G6<0M@,1ӢR9f Uwv`4x"Gu OR |.Iv!oۅhnyDuM$ic‹1hv`yF<U_:-N6B̮w!õz<~W^5mWrlK;z>)9{. +gxL $Mw<3> +stream +x][4~ EZV 4oNx vNt&]Ij>߹32/w׿\|y;!w7| ϾɟgIBNLS?3ab0LͿܿf0gO(pH_#?;Wxlګy{lv^>oG{+ﵿUw8g}l1{9!oơ=>:^w2د^p +93Tg}>w120xHei )C?d6,#kM2Lu^"0ZnBMPdq +$"F) wR,, +LVa߶_cm/Z{Xzx*bO4[9GM{Rm4 c=89.34z#?G6xe+CXV'<[i# ¹Dw_s8Wxs}wX[žc*#k6ohѹ#9Aը_u=lN,ⲨNI GPgķu2iYLohyKtxqE.E2w\#wWa "Wc;qfeֿa4cL:Ʌxp.; G团`39KrM窣 +x!bS$f:3A R|sym6xp+pBwMdV'0q\yl>ClHE""R$KIWM,%q!2[ʔiYav_cfHu\lxUqH9 >UP,NmsE{JP3ţ-;֪3I`+`Dsx&39I̋ۦĨ✉UQ/"Yye5:6Z[.bRW sx~VĿ!imQ(K i"KOA @Ft|7} d1>ǵ,Յ)j= + +:\%Ca50KC҅Yѿ>W1h´h׭Ɍ~FdU[in\ , +*JT&։sp$5)LA"/u&~/A ET-bg4.ԆYƺuX(A$H+D͌@sc)D\)B9,T(>:Gǹ!`ԜϸcW6݂ -mX1Y{YBb~LΉʜ`yAGc`|_M!7DMtW5evC<]u]`G b.&OjwD#wRG/r)%Z7-8)bq:vMx$.pΔ^VΖ͎I8&3ώˈ]v5w <= BRzV%(u2W*ɳIyWW6?iE\fbMgbUdVMr',Cx6cNEj+/XYL6*F=^hylǝ +±/,@H:'{-eCr19nM'[qE7\BoyIIγRn;=,b5NǠT6(J-U6`J'qP +endstream +endobj +129 0 obj +<< +/Length 2663 +/Filter /FlateDecode +>> +stream +x]Ɏ6)a !@ۏ뇤H,̝AY F:N򵮦'2ydace5$otJM,|HNl_z$;ZP="V'<(E FE]{ vz.hh xt2?b#͹bM5a*Ǻo;{$0!],F&PUd74H u'S|FݳLYU():Co&ޓ)[y  rנrDHR6s[)'ڄokƪ.og9Ti%g8Fù"rV*#o" kߢ0QD]TR|4tVp5Zyc /+%eX'ͼ$>{e Q=>\ܮp۪<+u-3Q;MϵNa;w -?[Xok.l?$esKbI4ge0&vj\bۼ65LU^X!sk"E_> +jGL C}m"SC8Oiw0O|k Ǚ5“,*C<91E h؀xt33Xڀҟzυ@m#`+O).sH,PE_?3aTAY'yf^AyPUB_z)R#~MB;Bر =6.d,h:-sZX+PBD@8Kng6V3p^h~Y&WX?10XĐMPG@U+Cw*ؖFQNp!^7bD$=.nă@BMCvlk9EA㪷CLDZ30x̏'W " +>Pڪ,"p63N\5Jw+z mS<ʧ0$/3'@٭[01aqpƵՖDr*ěQhs0 s6xJeF7+FΊ5dt`,Ҭ +m*X)n3QZ]$y2ƒ vA5m{x{3> >/nKoSD{>t nuۚE dP{̿Ǯs";IkzBJj4v}W{eQA!v[=@Bɏm JJ Õ+McK!AX2 i8'옺 =}}XH$1r-zjN1Z0g]ڷ sRu&4m/zXYD&:)-EmALV#e!rLdZ`b4i`&KC'biP~q--X8/m╄%vLp5Dh_K̊eږ PXfR &W3%m(ܡ p#Z j,TN仜}- O% +Ӱv8}GH8NٹtH> +stream +xW}p\Unn&Y>mimH$mCg&iKvv@G0"*Ta?t9o7--0nwϽ9w>mn_`5YBqU>O\_ÿҭsPqHe +mMηcȱ;Kw.Vk>pʼ!|?T:/2vx톏3/>}\k(?ጉ0<_WZi#k`a8^\ +.Vjd{c +dQv E˔ ?}/BWkkkY߿_Y{k-Ng+ӹh.HIn))*1[bX7 vW$fIj=ԠPXN;P]RyS9?+JIۏ3P'vϳvT>],n, cǙ5p ]C< gTܙe.gn@X;ٚܤg !`l d>8#K|@onV~+?~S?SWT^~CH 2/;ٯ>Љ(Ɉob],v"J@`/S ID8wvۭ7䳅lD[o_Tׁ8=tuqu <ͯKen+L-$0qAؼ(^M:C1bB? .4V_ixI?oe'1+,;8c5i bl +nn2cQ%L{b@'FsvE`Z,xaOip9OQ.Y Tu=la>wɆ,wp }KS9*ʨ)E9%]>5#Rn,koq?ZY*# &Y`R 3x9ЖTisАͧ; xna\=?{SO>OhۻK_}oS˟.Ep!nĪyP`2.r_ ?n ZyW8 d3Y/4/.6 x,dZ[--JO g3V oKٳV~76ZaT׋>u/ƛ)FsMSiqθ4Ζli VK+V={o]DpG|)f>Sk=Ӏ/+DlV-cCa"0;q,/MlmSR=«]/UVLdj3ZvՇ6 L{/u.1wpxv]߽О[{ë:kՆBDD:xDVO5 p*kϮ@Ky+Bk5ZFg8^76+[;ڣTlc7` 8 f!߹>~#_>O <C+J~m!ɽGp>'*0S3[4P'7@z4%7WZP3Nn3:CC~F˖UçnП:05XNį{ cYxYa fuP:K &îJlo:V<熳 VXL/qvǯHe6g\:;o9zOh~wa#~|٫fm grx`_Z:#dU*Um01|t 4G14" SJC%Ű-˰} 5-{Ke-^{ dNG+E]N +^-I$ r &s |D +Ss"&'sR5R3hx^B!"@/? i)W<ԫvL +t>gq/#~4"USڒUŇS#a F(E sZi3u69t),檭%Ӊ5VN0wQ$-\R3-dmw "fIb*"MuYNo`$Ai9pN|rJGPO.tYT>(l0'r;*{FĜ]әD tK/r):&&V0<;`k벿OPJ=ɢY\=KĘX@RQnRwt =-k)g ʗ^@sճDbPjhߎwY\]ɖuʵm۸+QXVbPnOǥ@7qi=DYH MXu[7']9}Qզ_QS+2}7c#:^Rf=X!)?3%ȫkjqrQfQf2Ga; +@„ +ʵ(X+' " !a0W0Mv!aaP0$aH&,aHMEFpaH()7hG9KڊҼO8ɂ)6Ћ4-,7rxz&K"%)7o@ĂjI=bI=j}A2r +endstream +endobj +xref +0 177 +0000000000 65535 f +0000081188 00000 n +0000081139 00000 n +0000084405 00000 n +0000000119 00000 n +0000000015 00000 n +0000075202 00000 n +0000076644 00000 n +0000110099 00000 n +0000000563 00000 n +0000000441 00000 n +0000000218 00000 n +0000077380 00000 n +0000000263 00000 n +0000000318 00000 n +0000078280 00000 n +0000079106 00000 n +0000143373 00000 n +0000001913 00000 n +0000001761 00000 n +0000000714 00000 n +0000000774 00000 n +0000000900 00000 n +0000000984 00000 n +0000001113 00000 n +0000001204 00000 n +0000001334 00000 n +0000001414 00000 n +0000001541 00000 n +0000001614 00000 n +0000135336 00000 n +0000002415 00000 n +0000002291 00000 n +0000002065 00000 n +0000002142 00000 n +0000137855 00000 n +0000002674 00000 n +0000002567 00000 n +0000087143 00000 n +0000002933 00000 n +0000002826 00000 n +0000132984 00000 n +0000003181 00000 n +0000003074 00000 n +0000086176 00000 n +0000003440 00000 n +0000003333 00000 n +0000099162 00000 n +0000003688 00000 n +0000003581 00000 n +0000088360 00000 n +0000003947 00000 n +0000003840 00000 n +0000170416 00000 n +0000004195 00000 n +0000004088 00000 n +0000102207 00000 n +0000004454 00000 n +0000004347 00000 n +0000103623 00000 n +0000004805 00000 n +0000004698 00000 n +0000004606 00000 n +0000004653 00000 n +0000162055 00000 n +0000006316 00000 n +0000006209 00000 n +0000004981 00000 n +0000005079 00000 n +0000005199 00000 n +0000005297 00000 n +0000005412 00000 n +0000005538 00000 n +0000005636 00000 n +0000005709 00000 n +0000005836 00000 n +0000005934 00000 n +0000006002 00000 n +0000081444 00000 n +0000006097 00000 n +0000006156 00000 n +0000112024 00000 n +0000006690 00000 n +0000006583 00000 n +0000006531 00000 n +0000130358 00000 n +0000006961 00000 n +0000006854 00000 n +0000164460 00000 n +0000007220 00000 n +0000007113 00000 n +0000091013 00000 n +0000007468 00000 n +0000007361 00000 n +0000166858 00000 n +0000007727 00000 n +0000007620 00000 n +0000074615 00000 n +0000100376 00000 n +0000008654 00000 n +0000008512 00000 n +0000007890 00000 n +0000007988 00000 n +0000008118 00000 n +0000008168 00000 n +0000008321 00000 n +0000008371 00000 n +0000107283 00000 n +0000008905 00000 n +0000008795 00000 n +0000105162 00000 n +0000009157 00000 n +0000009047 00000 n +0000140577 00000 n +0000009431 00000 n +0000009321 00000 n +0000079261 00000 n +0000079964 00000 n +0000080986 00000 n +0000172525 00000 n +0000009730 00000 n +0000009620 00000 n +0000084663 00000 n +0000071658 00000 n +0000071548 00000 n +0000009883 00000 n +0000089436 00000 n +0000071926 00000 n +0000071816 00000 n +0000175132 00000 n +0000073451 00000 n +0000073291 00000 n +0000072068 00000 n +0000072327 00000 n +0000072384 00000 n +0000072517 00000 n +0000072827 00000 n +0000073089 00000 n +0000073145 00000 n +0000085226 00000 n +0000074390 00000 n +0000074246 00000 n +0000073605 00000 n +0000073713 00000 n +0000073844 00000 n +0000073913 00000 n +0000074033 00000 n +0000074115 00000 n +0000074521 00000 n +0000177870 00000 n +0000074713 00000 n +0000074932 00000 n +0000081626 00000 n +0000092213 00000 n +0000075356 00000 n +0000075611 00000 n +0000081965 00000 n +0000146316 00000 n +0000076792 00000 n +0000077007 00000 n +0000082421 00000 n +0000122668 00000 n +0000077530 00000 n +0000077751 00000 n +0000082821 00000 n +0000113603 00000 n +0000078438 00000 n +0000078656 00000 n +0000083292 00000 n +0000119516 00000 n +0000079362 00000 n +0000079635 00000 n +0000083727 00000 n +0000158344 00000 n +0000080109 00000 n +0000080435 00000 n +0000084056 00000 n +trailer +<< +/Size 177 +/Root 2 0 R +/Info 148 0 R +>> +startxref +181345 +%%EOF diff --git a/pitfall/pdfkit/docs/images.coffee.md b/pitfall/pdfkit/docs/images.coffee.md new file mode 100644 index 00000000..ebd05c53 --- /dev/null +++ b/pitfall/pdfkit/docs/images.coffee.md @@ -0,0 +1,55 @@ +# Images in PDFKit + +Adding images to PDFKit documents is an easy task. Just pass an image path, buffer, or data uri with base64 encoded data to +the `image` method along with some optional arguments. PDFKit supports the +JPEG and PNG formats. If an X and Y position are not provided, the image is +rendered at the current point in the text flow (below the last line of text). +Otherwise, it is positioned absolutely at the specified point. The image will +be scaled according to the following options. + +* Neither `width` or `height` provided - image is rendered at full size +* `width` provided but not `height` - image is scaled proportionally to fit in the provided `width` +* `height` provided but not `width` - image is scaled proportionally to fit in the provided `height` +* Both `width` and `height` provided - image is stretched to the dimensions provided +* `scale` factor provided - image is scaled proportionally by the provided scale factor +* `fit` array provided - image is scaled proportionally to fit within the passed width and height +* `cover` array provided - image is scaled proportionally to completely cover the rectangle defined by the passed width and height + +When a `fit` or `cover` array is provided, PDFKit accepts these additional options: +* `align` - horizontally align the image, the possible values are `'left'`, `'center'` and `'right'` +* `valign` - vertically align the image, the possible values are `'top'`, `'center'` and `'bottom'` + +Here is an example showing some of these options. + + # Scale proprotionally to the specified width + doc.image('images/test.jpeg', 0, 15, width: 300) + .text('Proportional to width', 0, 0) + + # Fit the image within the dimensions + doc.image('images/test.jpeg', 320, 15, fit: [100, 100]) + .rect(320, 15, 100, 100) + .stroke() + .text('Fit', 320, 0) + + # Stretch the image + doc.image('images/test.jpeg', 320, 145, width: 200, height: 100) + .text('Stretch', 320, 130) + + # Scale the image + doc.image('images/test.jpeg', 320, 280, scale: 0.25) + .text('Scale', 320, 265) + + # Fit the image in the dimensions, and center it both horizontally and vertically + doc.image('images/test.jpeg', 430, 15, fit: [100, 100], align: 'center', valign: 'center') + .rect(430, 15, 100, 100) + .stroke() + .text('Centered', 430, 0) + +* * * + +This example produces the following output: + +![0](images/images.png "150") + +That is all there is to adding images to your PDF documents with PDFKit. Now +let's look at adding annotations. diff --git a/pitfall/pdfkit/docs/images/test.jpeg b/pitfall/pdfkit/docs/images/test.jpeg new file mode 100644 index 00000000..20d4f332 Binary files /dev/null and b/pitfall/pdfkit/docs/images/test.jpeg differ diff --git a/pitfall/pdfkit/docs/template.jade b/pitfall/pdfkit/docs/template.jade new file mode 100644 index 00000000..d239d99f --- /dev/null +++ b/pitfall/pdfkit/docs/template.jade @@ -0,0 +1,55 @@ +doctype html +html + head + meta(charset='utf-8') + title= title + link(rel='stylesheet', href='http://fonts.googleapis.com/css?family=Source+Code+Pro:400,700|Alegreya:700|Merriweather') + link(rel='stylesheet', href='/docs/css/index.css') + link(rel='stylesheet', href='/docs/css/github.css') + body + nav(class='sidebar') + ul + li + a(href='/', class=(/index/.test(url) ? 'selected' : '')) Home + li + a(href=pages[0].url) Documentation + ul + each page in pages.slice(1) + li + a(href=page.url, class=page.title == title ? 'selected' : '') + = page.title.replace(/(with|in) PDFKit/, '') + + - if (page.title == title && headers.length) + ul + each header in headers + li + a(href='#' + header.hash)= header.title + + li + a(href='/docs/guide.pdf') PDF Guide + li + a(href='/demo/out.pdf') Example PDF + li + a(href='/demo/browser.html') Interactive Browser Demo + li + a(href='http://github.com/devongovett/pdfkit') Source Code + + .main + != content + nav + - if (index > 0) + a(href=pages[index - 1].url, class='previous') Previous + + - if (index < pages.length - 1) + a(href=pages[index + 1].url, class='next') Next + + script(src='https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js') + script(src='/docs/js/scroll.js') + script(src='/docs/js/highlight.pack.js') + script. + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) + })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); + ga('create', 'UA-48340245-1', 'pdfkit.org'); + ga('send', 'pageview'); \ No newline at end of file diff --git a/pitfall/pdfkit/docs/text.coffee.md b/pitfall/pdfkit/docs/text.coffee.md new file mode 100644 index 00000000..f9cecd75 --- /dev/null +++ b/pitfall/pdfkit/docs/text.coffee.md @@ -0,0 +1,221 @@ +# Text in PDFKit + +## The basics + +PDFKit makes adding text to documents quite simple, and includes many options +to customize the display of the output. Adding text to a document is as simple +as calling the `text` method. + + doc.text 'Hello world!' + +Internally, PDFKit keeps track of the current X and Y position of text as it +is added to the document. This way, subsequent calls to the `text` method will +automatically appear as new lines below the previous line. However, you can +modify the position of text by passing X and Y coordinates to the `text` +method after the text itself. + + doc.text 'Hello world!', 100, 100 + +If you want to move down or up by lines, just call the `moveDown` or `moveUp` +method with the number of lines you'd like to move (1 by default). + +## Line wrapping and justification + +PDFKit includes support for line wrapping out of the box! If no options are +given, text is automatically wrapped within the page margins and placed in the +document flow below any previous text, or at the top of the page. PDFKit +automatically inserts new pages as necessary so you don't have to worry about +doing that for long pieces of text. PDFKit can also automatically wrap text +into multiple columns. + +The text will automatically wrap unless you set the `lineBreak` option to `false`. +By default it will wrap to the page margin, but the `width` option allows +you to set a different width the text should be wrapped to. +If you set the `height` option, the text will be clipped to the number of +lines that can fit in that height. + +When line wrapping is enabled, you can choose a text justification. There are +four options: `left` (the default), `center`, `right`, and `justify`. They +work just as they do in your favorite word processor, but here is an example +showing their use in a text box. + + lorem = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam in suscipit purus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Vivamus nec hendrerit felis. Morbi aliquam facilisis risus eu lacinia. Sed eu leo in turpis fringilla hendrerit. Ut nec accumsan nisl.' + + doc.fontSize 8 + doc.text 'This text is left aligned. ' + lorem, + width: 410 + align: 'left' + + doc.moveDown() + doc.text 'This text is centered. ' + lorem, + width: 410 + align: 'center' + + doc.moveDown() + doc.text 'This text is right aligned. ' + lorem, + width: 410 + align: 'right' + + doc.moveDown() + doc.text 'This text is justified. ' + lorem, + width: 410 + align: 'justify' + + # draw bounding rectangle + doc.rect(doc.x, 0, 410, doc.y).stroke() + + +The output of this example, looks like this: + +![2](images/alignments.png) + +## Text styling + +PDFKit has many options for controlling the look of text added to PDF +documents, which can be passed to the `text` method. They are enumerated +below. + +* `lineBreak` - set to `false` to disable line wrapping all together +* `width` - the width that text should be wrapped to (by default, the page width minus the left and right margin) +* `height` - the maximum height that text should be clipped to +* `ellipsis` - the character to display at the end of the text when it is too long. Set to `true` to use the default character. +* `columns` - the number of columns to flow the text into +* `columnGap` - the amount of space between each column (1/4 inch by default) +* `indent` - the amount in PDF points (72 per inch) to indent each paragraph of text +* `paragraphGap` - the amount of space between each paragraph of text +* `lineGap` - the amount of space between each line of text +* `wordSpacing` - the amount of space between each word in the text +* `characterSpacing` - the amount of space between each character in the text +* `fill` - whether to fill the text (`true` by default) +* `stroke` - whether to stroke the text +* `link` - a URL to link this text to (shortcut to create an annotation) +* `underline` - whether to underline the text +* `strike` - whether to strike out the text +* `continued` - whether the text segment will be followed immediately by another segment. Useful for changing styling in the middle of a paragraph. +* `features` - an array of [OpenType feature tags](https://www.microsoft.com/typography/otspec/featuretags.htm) to apply. If not provided, a set of defaults is used. + +Additionally, the fill and stroke color and opacity methods described in the +[vector graphics section](vector.html) are applied to text content as well. + +* * * + +Here is an example combining some of the options above, wrapping a piece of text into three columns, in a specified width and height. + + lorem = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam in suscipit purus. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Vivamus nec hendrerit felis. Morbi aliquam facilisis risus eu lacinia. Sed eu leo in turpis fringilla hendrerit. Ut nec accumsan nisl. Suspendisse rhoncus nisl posuere tortor tempus et dapibus elit porta. Cras leo neque, elementum a rhoncus ut, vestibulum non nibh. Phasellus pretium justo turpis. Etiam vulputate, odio vitae tincidunt ultricies, eros odio dapibus nisi, ut tincidunt lacus arcu eu elit. Aenean velit erat, vehicula eget lacinia ut, dignissim non tellus. Aliquam nec lacus mi, sed vestibulum nunc. Suspendisse potenti. Curabitur vitae sem turpis. Vestibulum sed neque eget dolor dapibus porttitor at sit amet sem. Fusce a turpis lorem. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae;' + + doc.text lorem, + columns: 3 + columnGap: 15 + height: 100 + width: 465 + align: 'justify' + +The output looks like this: + +![3]() + +## Text measurements + +If you're working with documents that require precise layout, you may need to know the +size of a piece of text. PDFKit has two methods to achieve this: `widthOfString(text, options)` +and `heightOfString(text, options)`. Both methods use the same options described in the +Text styling section, and take into account the eventual line wrapping. + +## Lists + +The `list` method creates a bulleted list. It accepts as arguments an array of strings, +and the optional `x`, `y` position. You can create complex multilevel lists by using nested arrays. +Lists use the following additional options: +* `bulletRadius` +* `textIndent` +* `bulletIndent` + +## Rich Text + +As mentioned above, PDFKit supports a simple form of rich text via the `continued` option. +When set to true, PDFKit will retain the text wrapping state between `text` calls. This way, +when you call text again after changing the text styles, the wrapping will continue right +where it left off. + +The options given to the first `text` call are also retained for subsequent calls after a +`continued` one, but of course you can override them. In the following example, the `width` +option from the first `text` call is retained by the second call. + + doc.fillColor 'green' + .text lorem.slice(0, 500), + width: 465 + continued: yes + .fillColor 'red' + .text lorem.slice(500) + +Here is the output: + +![4]() + +## Fonts + +The PDF format defines 14 standard fonts that can be used in PDF documents. PDFKit supports each of them out of the box. +Besides Symbol and Zapf Dingbats this includes 4 styles (regular, bold, italic/oblique, bold+italic) of Helvetica, +Courier, and Times. To switch between standard fonts, call the `font` method with the corresponding Label: +* `'Courier'` +* `'Courier-Bold'` +* `'Courier-Oblique'` +* `'Courier-BoldOblique'` +* `'Helvetica'` +* `'Helvetica-Bold'` +* `'Helvetica-Oblique'` +* `'Helvetica-BoldOblique'` +* `'Symbol'` +* `'Times-Roman'` +* `'Times-Bold'` +* `'Times-Italic'` +* `'Times-BoldItalic'` +* `'ZapfDingbats'` + +The PDF format also allows fonts to be embedded right in the document. PDFKit supports +embedding TrueType (`.ttf`), OpenType (`.otf`), WOFF, WOFF2, TrueType Collection (`.ttc`), +and Datafork TrueType (`.dfont`) fonts. + +To change the font used to render text, just call the `font` method. If you +are using a standard PDF font, just pass the name to the `font` method. +Otherwise, pass the path to the font file, or a `Buffer` containing the font data. +If the font is a collection font (`.ttc` and `.dfont` files), meaning that it +contains multiple styles in the same file, you should pass the name of the style +to be extracted from the collection. + +Here is an example showing how to set the font in each case. + + # Set the font size + doc.fontSize(18) + + # Using a standard PDF font + doc.font('Times-Roman') + .text('Hello from Times Roman!') + .moveDown(0.5) + + # Using a TrueType font (.ttf) + doc.font('fonts/GoodDog.ttf') + .text('This is Good Dog!') + .moveDown(0.5) + + # Using a collection font (.ttc or .dfont) + doc.font('fonts/Chalkboard.ttc', 'Chalkboard-Bold') + .text('This is Chalkboard, not Comic Sans.') + +The output of this example looks like this: + +![5](images/fonts.png) + +Another nice feature of the PDFKit font support, is the ability to register a +font file under a name for use later rather than entering the path to the font +every time you want to use it. + + # Register a font + doc.registerFont('Heading Font', 'fonts/Chalkboard.ttc', 'Chalkboard-Bold') + + # Use the font later + doc.font('Heading Font') + .text('This is a heading.') + +That's about all there is too it for text in PDFKit. Let's move on now to +images. diff --git a/pitfall/pdfkit/docs/vector.coffee.md b/pitfall/pdfkit/docs/vector.coffee.md new file mode 100644 index 00000000..cc2b6e8e --- /dev/null +++ b/pitfall/pdfkit/docs/vector.coffee.md @@ -0,0 +1,326 @@ +# Vector Graphics in PDFKit + +## An introduction to vector graphics + +Unlike images which are defined by pixels, vector graphics are defined through +a series of drawing commands. This makes vector graphics scalable to any size +without a reduction in quality (pixelization). The PDF format was designed +with vector graphics in mind, so creating vector drawings is very easy. The +PDFKit vector graphics APIs are very similar to that of the HTML5 canvas +element, so if you are familiar at all with that API, you will find PDFKit +easy to pick up. + +### Creating basic shapes + +Shapes are defined by a series of lines and curves. `lineTo`, `bezierCurveTo` +and `quadraticCurveTo` all draw from the current point (which you can set with +`moveTo`) to the specified point (always the last two arguments). Bezier +curves use two control points and quadratic curves use just one. Here is an +example that illustrates defining a path. + + doc.moveTo(0, 20) # set the current point + .lineTo(100, 160) # draw a line + .quadraticCurveTo(130, 200, 150, 120) # draw a quadratic curve + .bezierCurveTo(190, -40, 200, 200, 300, 150) # draw a bezier curve + .lineTo(400, 90) # draw another line + .stroke() # stroke the path + +The output of this example looks like this: + +![0](images/path.png "170") + +One thing to notice about this example is the use of method chaining. All +methods in PDFKit are chainable, meaning that you can call one method right +after the other without referencing the `doc` variable again. Of course, this +is an option, so if you don't like how the code looks when chained, you don't +have to write it that way. + +## SVG paths + +PDFKit includes an SVG path parser, so you can include paths written in the +SVG path syntax in your PDF documents. This makes it simple to include vector +graphics elements produced in many popular editors such as Inkscape or Adobe +Illustrator. The previous example could also be written using the SVG path +syntax like this. + + doc.path('M 0,20 L 100,160 Q 130,200 150,120 C 190,-40 200,200 300,150 L 400,90') + .stroke() + +![1](images/path.png "170") + +The PDFKit SVG parser supports all of the command types supported by SVG, so +any valid SVG path you throw at it should work as expected. + +## Shape helpers + +PDFKit also includes some helpers that make defining common shapes much +easier. Here is a list of the helpers. + +* `rect(x, y, width, height)` +* `roundedRect(x, y, width, height, cornerRadius)` +* `ellipse(centerX, centerY, radiusX, radiusY = radiusX)` +* `circle(centerX, centerY, radius)` +* `polygon(points...)` + +The last one, `polygon`, allows you to pass in a list of points (arrays of x,y +pairs), and it will create the shape by moving to the first point, and then +drawing lines to each consecutive point. Here is how you'd draw a triangle +with the polygon helper. + + doc.polygon [100, 0], [50, 100], [150, 100] + doc.stroke() + +The output of this example looks like this: + +![2](images/triangle.png "100") + +## Fill and stroke styles + +So far we have only been stroking our paths, but you can also fill them with +the `fill` method, and both fill and stroke the same path with the +`fillAndStroke` method. Note that calling `fill` and then `stroke` +consecutively will not work because of a limitation in the PDF spec. Use the +`fillAndStroke` method if you want to accomplish both operations on the same +path. + +In order to make our drawings interesting, we really need to give them some +style. PDFKit has many methods designed to do just that. + + * `lineWidth` + * `lineCap` + * `lineJoin` + * `miterLimit` + * `dash` + * `fillColor` + * `strokeColor` + * `opacity` + * `fillOpacity` + * `strokeOpacity` + +Some of these are pretty self explanatory, but let's go through a few of them. + +## Line cap and line join + +The `lineCap` and `lineJoin` properties accept constants describing what they +should do. This is best illustrated by an example. + + # these examples are easier to see with a large line width + doc.lineWidth(25) + + # line cap settings + doc.lineCap('butt') + .moveTo(50, 20) + .lineTo(100, 20) + .stroke() + + doc.lineCap('round') + .moveTo(150, 20) + .lineTo(200, 20) + .stroke() + + # square line cap shown with a circle instead of a line so you can see it + doc.lineCap('square') + .moveTo(250, 20) + .circle(275, 30, 15) + .stroke() + + # line join settings + doc.lineJoin('miter') + .rect(50, 100, 50, 50) + .stroke() + + doc.lineJoin('round') + .rect(150, 100, 50, 50) + .stroke() + + doc.lineJoin('bevel') + .rect(250, 100, 50, 50) + .stroke() + +The output of this example looks like this. + +![3](images/line_styles.png "220") + +## Dashed lines + +The `dash` method allows you to create non-continuous dashed lines. It takes a +length specifying how long each dash should be, as well as an optional hash +describing the additional properties `space` and `phase`. + +The `space` option defines the length of the space between each dash, and the `phase` option +defines the starting point of the sequence of dashes. By default the `space` +attribute is equal to the `length` and the `phase` attribute is set to `0`. +You can use the `undash` method to make the line solid again. + +The following example draws a circle with a dashed line where the space +between the dashes is double the length of each dash. + + doc.circle(100, 50, 50) + .dash(5, space: 10) + .stroke() + +The output of this example looks like this: + +![4](images/dash.png "100") + +## Color + +What is a drawing without color? PDFKit makes it simple to set the fill and +stroke color and opacity. You can pass an array specifying an RGB or CMYK +color, a hex color string, or use any of the named CSS colors. + +The `fillColor` and `strokeColor` methods accept an optional second argument as a shortcut for +setting the `fillOpacity` and `strokeOpacity`. Finally, the `opacity` method +is a convenience method that sets both the fill and stroke opacity to the same +value. + +The `fill` and `stroke` methods also accept a color as an argument so +that you don't have to call `fillColor` or `strokeColor` beforehand. The +`fillAndStroke` method accepts both fill and stroke colors as arguments. + + doc.circle(100, 50, 50) + .lineWidth(3) + .fillOpacity(0.8) + .fillAndStroke("red", "#900") + +This example produces the following output: + +![5](images/color.png "100") + +## Gradients + +PDFKit also supports gradient fills. Gradients can be used just like color fills, +and are applied with the same methods (e.g. `fillColor`, or just `fill`). Before +you can apply a gradient with these methods, however, you must create a gradient object. + +There are two types of gradients: linear and radial. They are created by the `linearGradient` +and `radialGradient` methods. Their function signatures are listed below: + +* `linearGradient(x1, y1, x2, y2)` - `x1,y1` is the start point, `x2,y2` is the end point +* `radialGradient(x1, y1, r1, x2, y2, r2)` - `r1` is the inner radius, `r2` is the outer radius + +Once you have a gradient object, you need to create color stops at points along that gradient. +Stops are defined at percentage values (0 to 1), and take a color value (any usable by the +fillColor method), and an optional opacity. + +You can see both linear and radial gradients in the following example: + + # Create a linear gradient + grad = doc.linearGradient(50, 0, 150, 100) + grad.stop(0, 'green') + .stop(1, 'red') + + doc.rect 50, 0, 100, 100 + doc.fill grad + + # Create a radial gradient + grad = doc.radialGradient(300, 50, 0, 300, 50, 50) + grad.stop(0, 'orange', 0) + .stop(1, 'orange', 1) + + doc.circle 300, 50, 50 + doc.fill grad + +Here is the output from the this example: + +![6]() + +## Winding rules + +Winding rules define how a path is filled and are best illustrated by an +example. The winding rule is an optional attribute to the `fill` and +`fillAndStroke` methods, and there are two values to choose from: `non-zero` +and `even-odd`. + + # Initial setup + doc.fillColor('red') + .translate(-100, -50) + .scale(0.8) + + # Draw the path with the non-zero winding rule + doc.path('M 250,75 L 323,301 131,161 369,161 177,301 z') + .fill('non-zero') + + # Draw the path with the even-odd winding rule + doc.translate(280, 0) + .path('M 250,75 L 323,301 131,161 369,161 177,301 z') + .fill('even-odd') + +You'll notice that I used the `scale` and `translate` transformations in this +example. We'll cover those in a minute. The output of this example, with some +added labels, is below. + +![7](images/winding_rules.png "200") + +## Saving and restoring the graphics stack + +Once you start producing more complex vector drawings, you will want to be +able to save and restore the state of the graphics context. The graphics state +is basically a snapshot of all the styles and transformations (see below) that +have been applied, and many states can be created and stored on a stack. Every +time the `save` method is called, the current graphics state is pushed onto +the stack, and when you call `restore`, the last state on the stack is applied +to the context again. This way, you can save the state, change some styles, +and then restore it to how it was before you made those changes. + +### Transformations + +Transformations allow you to modify the look of a drawing without modifying +the drawing itself. There are three types of transformations available, as +well as a method for setting the transformation matrix yourself. They are +`translate`, `rotate` and `scale`. + +The `translate` transformation takes two arguments, x and y, and effectively +moves the origin of the document which is (0, 0) by default, to the left and +right x and y units. + +The `rotate` transformation takes an angle and optionally, an object with an +`origin` property. It rotates the document `angle` degrees around the passed +`origin` or by default, the center of the page. + +The `scale` transformation takes a scale factor and an optional `origin` +passed in an options hash as with the `rotate` transformation. It is used to +increase or decrease the size of the units in the drawing, or change it's +size. For example, applying a scale of `0.5` would make the drawing appear at +half size, and a scale of `2` would make it appear twice as large. + +If you are feeling particularly smart, you can modify the transformation +matrix yourself using the `transform` method. + +We used the `scale` and `translate` transformations above, so here is an +example of using the `rotate` transformation. We'll set the origin of the +rotation to the center of the rectangle. + + doc.rotate(20, origin: [150, 70]) + .rect(100, 20, 100, 100) + .fill('gray') + +This example produces the following effect. + +![8](images/rotate.png "200") + +## Clipping + +A clipping path is a path defined using the normal path creation methods, but +instead of being filled or stroked, it becomes a mask that hides unwanted +parts of the drawing. Everything falling inside the clipping path after it is +created is visible, and everything outside the path is invisible. Here is an +example that clips a checkerboard pattern to the shape of a circle. + + # Create a clipping path + doc.circle(100, 100, 100) + .clip() + + # Draw a checkerboard pattern + for row in [0...10] + for col in [0...10] + color = if (col % 2) - (row % 2) then '#eee' else '#4183C4' + doc.rect(row * 20, col * 20, 20, 20) + .fill(color) + +The result of this example is the following: + +![9](images/clipping.png "200") + +That's it for vector graphics in PDFKit. Now let's move on to learning about +PDFKit's text support! diff --git a/pitfall/pdfkit/index.js b/pitfall/pdfkit/index.js new file mode 100644 index 00000000..85814fc7 --- /dev/null +++ b/pitfall/pdfkit/index.js @@ -0,0 +1,3 @@ +// Load CoffeeScript, and the main PDFKit files +require('coffee-script/register'); +module.exports = require('./lib/document'); \ No newline at end of file diff --git a/pitfall/pdfkit/lib/data.coffee b/pitfall/pdfkit/lib/data.coffee new file mode 100644 index 00000000..38db1849 --- /dev/null +++ b/pitfall/pdfkit/lib/data.coffee @@ -0,0 +1,140 @@ +class Data + constructor: (@data = []) -> + @pos = 0 + @length = @data.length + + readByte: -> + @data[@pos++] + + writeByte: (byte) -> + @data[@pos++] = byte + + byteAt: (index) -> + @data[index] + + readBool: -> + return !!@readByte() + + writeBool: (val) -> + @writeByte if val then 1 else 0 + + readUInt32: -> + b1 = @readByte() * 0x1000000 + b2 = @readByte() << 16 + b3 = @readByte() << 8 + b4 = @readByte() + b1 + b2 + b3 + b4 + + writeUInt32: (val) -> + @writeByte (val >>> 24) & 0xff + @writeByte (val >> 16) & 0xff + @writeByte (val >> 8) & 0xff + @writeByte val & 0xff + + readInt32: -> + int = @readUInt32() + if int >= 0x80000000 then int - 0x100000000 else int + + writeInt32: (val) -> + val += 0x100000000 if val < 0 + @writeUInt32 val + + readUInt16: -> + b1 = @readByte() << 8 + b2 = @readByte() + b1 | b2 + + writeUInt16: (val) -> + @writeByte (val >> 8) & 0xff + @writeByte val & 0xff + + readInt16: -> + int = @readUInt16() + if int >= 0x8000 then int - 0x10000 else int + + writeInt16: (val) -> + val += 0x10000 if val < 0 + @writeUInt16 val + + readString: (length) -> + ret = [] + for i in [0...length] + ret[i] = String.fromCharCode @readByte() + + return ret.join '' + + writeString: (val) -> + for i in [0...val.length] + @writeByte val.charCodeAt(i) + + stringAt: (@pos, length) -> + @readString length + + readShort: -> + @readInt16() + + writeShort: (val) -> + @writeInt16 val + + readLongLong: -> + b1 = @readByte() + b2 = @readByte() + b3 = @readByte() + b4 = @readByte() + b5 = @readByte() + b6 = @readByte() + b7 = @readByte() + b8 = @readByte() + + if b1 & 0x80 # sign -> avoid overflow + return ((b1 ^ 0xff) * 0x100000000000000 + + (b2 ^ 0xff) * 0x1000000000000 + + (b3 ^ 0xff) * 0x10000000000 + + (b4 ^ 0xff) * 0x100000000 + + (b5 ^ 0xff) * 0x1000000 + + (b6 ^ 0xff) * 0x10000 + + (b7 ^ 0xff) * 0x100 + + (b8 ^ 0xff) + 1) * -1 + + return b1 * 0x100000000000000 + + b2 * 0x1000000000000 + + b3 * 0x10000000000 + + b4 * 0x100000000 + + b5 * 0x1000000 + + b6 * 0x10000 + + b7 * 0x100 + + b8 + + writeLongLong: (val) -> + high = Math.floor(val / 0x100000000) + low = val & 0xffffffff + @writeByte (high >> 24) & 0xff + @writeByte (high >> 16) & 0xff + @writeByte (high >> 8) & 0xff + @writeByte high & 0xff + @writeByte (low >> 24) & 0xff + @writeByte (low >> 16) & 0xff + @writeByte (low >> 8) & 0xff + @writeByte low & 0xff + + readInt: -> + @readInt32() + + writeInt: (val) -> + @writeInt32 val + + slice: (start, end) -> + @data.slice start, end + + read: (bytes) -> + buf = [] + for i in [0...bytes] + buf.push @readByte() + + return buf + + write: (bytes) -> + for byte in bytes + @writeByte byte + +module.exports = Data diff --git a/pitfall/pdfkit/lib/data.js b/pitfall/pdfkit/lib/data.js new file mode 100644 index 00000000..b02dbbdd --- /dev/null +++ b/pitfall/pdfkit/lib/data.js @@ -0,0 +1,192 @@ +// Generated by CoffeeScript 1.12.5 +(function() { + var Data; + + Data = (function() { + function Data(data) { + this.data = data != null ? data : []; + this.pos = 0; + this.length = this.data.length; + } + + Data.prototype.readByte = function() { + return this.data[this.pos++]; + }; + + Data.prototype.writeByte = function(byte) { + return this.data[this.pos++] = byte; + }; + + Data.prototype.byteAt = function(index) { + return this.data[index]; + }; + + Data.prototype.readBool = function() { + return !!this.readByte(); + }; + + Data.prototype.writeBool = function(val) { + return this.writeByte(val ? 1 : 0); + }; + + Data.prototype.readUInt32 = function() { + var b1, b2, b3, b4; + b1 = this.readByte() * 0x1000000; + b2 = this.readByte() << 16; + b3 = this.readByte() << 8; + b4 = this.readByte(); + return b1 + b2 + b3 + b4; + }; + + Data.prototype.writeUInt32 = function(val) { + this.writeByte((val >>> 24) & 0xff); + this.writeByte((val >> 16) & 0xff); + this.writeByte((val >> 8) & 0xff); + return this.writeByte(val & 0xff); + }; + + Data.prototype.readInt32 = function() { + var int; + int = this.readUInt32(); + if (int >= 0x80000000) { + return int - 0x100000000; + } else { + return int; + } + }; + + Data.prototype.writeInt32 = function(val) { + if (val < 0) { + val += 0x100000000; + } + return this.writeUInt32(val); + }; + + Data.prototype.readUInt16 = function() { + var b1, b2; + b1 = this.readByte() << 8; + b2 = this.readByte(); + return b1 | b2; + }; + + Data.prototype.writeUInt16 = function(val) { + this.writeByte((val >> 8) & 0xff); + return this.writeByte(val & 0xff); + }; + + Data.prototype.readInt16 = function() { + var int; + int = this.readUInt16(); + if (int >= 0x8000) { + return int - 0x10000; + } else { + return int; + } + }; + + Data.prototype.writeInt16 = function(val) { + if (val < 0) { + val += 0x10000; + } + return this.writeUInt16(val); + }; + + Data.prototype.readString = function(length) { + var i, j, ref, ret; + ret = []; + for (i = j = 0, ref = length; 0 <= ref ? j < ref : j > ref; i = 0 <= ref ? ++j : --j) { + ret[i] = String.fromCharCode(this.readByte()); + } + return ret.join(''); + }; + + Data.prototype.writeString = function(val) { + var i, j, ref, results; + results = []; + for (i = j = 0, ref = val.length; 0 <= ref ? j < ref : j > ref; i = 0 <= ref ? ++j : --j) { + results.push(this.writeByte(val.charCodeAt(i))); + } + return results; + }; + + Data.prototype.stringAt = function(pos, length) { + this.pos = pos; + return this.readString(length); + }; + + Data.prototype.readShort = function() { + return this.readInt16(); + }; + + Data.prototype.writeShort = function(val) { + return this.writeInt16(val); + }; + + Data.prototype.readLongLong = function() { + var b1, b2, b3, b4, b5, b6, b7, b8; + b1 = this.readByte(); + b2 = this.readByte(); + b3 = this.readByte(); + b4 = this.readByte(); + b5 = this.readByte(); + b6 = this.readByte(); + b7 = this.readByte(); + b8 = this.readByte(); + if (b1 & 0x80) { + return ((b1 ^ 0xff) * 0x100000000000000 + (b2 ^ 0xff) * 0x1000000000000 + (b3 ^ 0xff) * 0x10000000000 + (b4 ^ 0xff) * 0x100000000 + (b5 ^ 0xff) * 0x1000000 + (b6 ^ 0xff) * 0x10000 + (b7 ^ 0xff) * 0x100 + (b8 ^ 0xff) + 1) * -1; + } + return b1 * 0x100000000000000 + b2 * 0x1000000000000 + b3 * 0x10000000000 + b4 * 0x100000000 + b5 * 0x1000000 + b6 * 0x10000 + b7 * 0x100 + b8; + }; + + Data.prototype.writeLongLong = function(val) { + var high, low; + high = Math.floor(val / 0x100000000); + low = val & 0xffffffff; + this.writeByte((high >> 24) & 0xff); + this.writeByte((high >> 16) & 0xff); + this.writeByte((high >> 8) & 0xff); + this.writeByte(high & 0xff); + this.writeByte((low >> 24) & 0xff); + this.writeByte((low >> 16) & 0xff); + this.writeByte((low >> 8) & 0xff); + return this.writeByte(low & 0xff); + }; + + Data.prototype.readInt = function() { + return this.readInt32(); + }; + + Data.prototype.writeInt = function(val) { + return this.writeInt32(val); + }; + + Data.prototype.slice = function(start, end) { + return this.data.slice(start, end); + }; + + Data.prototype.read = function(bytes) { + var buf, i, j, ref; + buf = []; + for (i = j = 0, ref = bytes; 0 <= ref ? j < ref : j > ref; i = 0 <= ref ? ++j : --j) { + buf.push(this.readByte()); + } + return buf; + }; + + Data.prototype.write = function(bytes) { + var byte, j, len, results; + results = []; + for (j = 0, len = bytes.length; j < len; j++) { + byte = bytes[j]; + results.push(this.writeByte(byte)); + } + return results; + }; + + return Data; + + })(); + + module.exports = Data; + +}).call(this); diff --git a/pitfall/pdfkit/lib/document.coffee b/pitfall/pdfkit/lib/document.coffee new file mode 100644 index 00000000..c0db7268 --- /dev/null +++ b/pitfall/pdfkit/lib/document.coffee @@ -0,0 +1,223 @@ +### +PDFDocument - represents an entire PDF document +By Devon Govett +### + +stream = require 'stream' +fs = require 'fs' +PDFObject = require './object' +PDFReference = require './reference' +PDFPage = require './page' + +class PDFDocument extends stream.Readable + constructor: (@options = {}) -> + super + + # PDF version + @version = 1.3 + + # Whether streams should be compressed + @compress = @options.compress ? yes + + @_pageBuffer = [] + @_pageBufferStart = 0 + + # The PDF object store + @_offsets = [] + @_waiting = 0 + @_ended = false + @_offset = 0 + + @_root = @ref + Type: 'Catalog' + Pages: @ref + Type: 'Pages' + Count: 0 + Kids: [] + + # The current page + @page = null + + # Initialize mixins + @initColor() + @initVector() + @initFonts() + @initText() + @initImages() + + # Initialize the metadata + @info = + Producer: 'PDFKit' + Creator: 'PDFKit' + CreationDate: new Date() + + if @options.info + for key, val of @options.info + @info[key] = val + + # Write the header + # PDF version + @_write "%PDF-#{@version}" + + # 4 binary chars, as recommended by the spec + @_write "%\xFF\xFF\xFF\xFF" + + # Add the first page + if @options.autoFirstPage isnt false + @addPage() + + mixin = (methods) => + for name, method of methods + this::[name] = method + + # Load mixins + mixin require './mixins/color' + mixin require './mixins/vector' + mixin require './mixins/fonts' + mixin require './mixins/text' + mixin require './mixins/images' + mixin require './mixins/annotations' + + addPage: (options = @options) -> + # end the current page if needed + @flushPages() unless @options.bufferPages + + # create a page object + @page = new PDFPage(this, options) + @_pageBuffer.push(@page) + + # add the page to the object store + pages = @_root.data.Pages.data + pages.Kids.push @page.dictionary + pages.Count++ + + # reset x and y coordinates + @x = @page.margins.left + @y = @page.margins.top + + # flip PDF coordinate system so that the origin is in + # the top left rather than the bottom left + @_ctm = [1, 0, 0, 1, 0, 0] + @transform 1, 0, 0, -1, 0, @page.height + + @emit('pageAdded') + + return this + + bufferedPageRange: -> + return { start: @_pageBufferStart, count: @_pageBuffer.length } + + switchToPage: (n) -> + unless page = @_pageBuffer[n - @_pageBufferStart] + throw new Error "switchToPage(#{n}) out of bounds, current buffer covers pages #{@_pageBufferStart} to #{@_pageBufferStart + @_pageBuffer.length - 1}" + + @page = page + + flushPages: -> + # this local variable exists so we're future-proof against + # reentrant calls to flushPages. + pages = @_pageBuffer + @_pageBuffer = [] + @_pageBufferStart += pages.length + for page in pages + page.end() + + return + + ref: (data) -> + ref = new PDFReference(this, @_offsets.length + 1, data) + @_offsets.push null # placeholder for this object's offset once it is finalized + @_waiting++ + return ref + + _read: -> + # do nothing, but this method is required by node + + _write: (data) -> + unless Buffer.isBuffer(data) + data = new Buffer(data + '\n', 'binary') + + @push data + @_offset += data.length + + addContent: (data) -> + @page.write data + return this + + _refEnd: (ref) -> + @_offsets[ref.id - 1] = ref.offset + if --@_waiting is 0 and @_ended + @_finalize() + @_ended = false + + write: (filename, fn) -> + # print a deprecation warning with a stacktrace + err = new Error ' + PDFDocument#write is deprecated, and will be removed in a future version of PDFKit. + Please pipe the document into a Node stream. + ' + + console.warn err.stack + + @pipe fs.createWriteStream(filename) + @end() + @once 'end', fn + + output: (fn) -> + # more difficult to support this. It would involve concatenating all the buffers together + throw new Error ' + PDFDocument#output is deprecated, and has been removed from PDFKit. + Please pipe the document into a Node stream. + ' + + end: -> + @flushPages() + @_info = @ref() + for key, val of @info + if typeof val is 'string' + val = new String val + + @_info.data[key] = val + + @_info.end() + + for name, font of @_fontFamilies + font.finalize() + + @_root.end() + @_root.data.Pages.end() + + if @_waiting is 0 + @_finalize() + else + @_ended = true + + _finalize: (fn) -> + # generate xref + xRefOffset = @_offset + @_write "xref" + @_write "0 #{@_offsets.length + 1}" + @_write "0000000000 65535 f " + + for offset in @_offsets + offset = ('0000000000' + offset).slice(-10) + @_write offset + ' 00000 n ' + + # trailer + @_write 'trailer' + @_write PDFObject.convert + Size: @_offsets.length + 1 + Root: @_root + Info: @_info + + @_write 'startxref' + @_write "#{xRefOffset}" + @_write '%%EOF' + + # end the stream + @push null + + toString: -> + "[object PDFDocument]" + +module.exports = PDFDocument diff --git a/pitfall/pdfkit/lib/document.js b/pitfall/pdfkit/lib/document.js new file mode 100644 index 00000000..691a56f7 --- /dev/null +++ b/pitfall/pdfkit/lib/document.js @@ -0,0 +1,247 @@ +// Generated by CoffeeScript 1.12.5 + +/* +PDFDocument - represents an entire PDF document +By Devon Govett + */ + +(function() { + var PDFDocument, PDFObject, PDFPage, PDFReference, fs, stream, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + stream = require('stream'); + + fs = require('fs'); + + PDFObject = require('./object'); + + PDFReference = require('./reference'); + + PDFPage = require('./page'); + + PDFDocument = (function(superClass) { + var mixin; + + extend(PDFDocument, superClass); + + function PDFDocument(options1) { + var key, ref1, ref2, val; + this.options = options1 != null ? options1 : {}; + PDFDocument.__super__.constructor.apply(this, arguments); + this.version = 1.3; + this.compress = (ref1 = this.options.compress) != null ? ref1 : true; + this._pageBuffer = []; + this._pageBufferStart = 0; + this._offsets = []; + this._waiting = 0; + this._ended = false; + this._offset = 0; + this._root = this.ref({ + Type: 'Catalog', + Pages: this.ref({ + Type: 'Pages', + Count: 0, + Kids: [] + }) + }); + this.page = null; + this.initColor(); + this.initVector(); + this.initFonts(); + this.initText(); + this.initImages(); + this.info = { + Producer: 'PDFKit', + Creator: 'PDFKit', + CreationDate: new Date() + }; + if (this.options.info) { + ref2 = this.options.info; + for (key in ref2) { + val = ref2[key]; + this.info[key] = val; + } + } + this._write("%PDF-" + this.version); + this._write("%\xFF\xFF\xFF\xFF"); + if (this.options.autoFirstPage !== false) { + this.addPage(); + } + } + + mixin = function(methods) { + var method, name, results; + results = []; + for (name in methods) { + method = methods[name]; + results.push(PDFDocument.prototype[name] = method); + } + return results; + }; + + mixin(require('./mixins/color')); + + mixin(require('./mixins/vector')); + + mixin(require('./mixins/fonts')); + + mixin(require('./mixins/text')); + + mixin(require('./mixins/images')); + + mixin(require('./mixins/annotations')); + + PDFDocument.prototype.addPage = function(options) { + var pages; + if (options == null) { + options = this.options; + } + if (!this.options.bufferPages) { + this.flushPages(); + } + this.page = new PDFPage(this, options); + this._pageBuffer.push(this.page); + pages = this._root.data.Pages.data; + pages.Kids.push(this.page.dictionary); + pages.Count++; + this.x = this.page.margins.left; + this.y = this.page.margins.top; + this._ctm = [1, 0, 0, 1, 0, 0]; + this.transform(1, 0, 0, -1, 0, this.page.height); + this.emit('pageAdded'); + return this; + }; + + PDFDocument.prototype.bufferedPageRange = function() { + return { + start: this._pageBufferStart, + count: this._pageBuffer.length + }; + }; + + PDFDocument.prototype.switchToPage = function(n) { + var page; + if (!(page = this._pageBuffer[n - this._pageBufferStart])) { + throw new Error("switchToPage(" + n + ") out of bounds, current buffer covers pages " + this._pageBufferStart + " to " + (this._pageBufferStart + this._pageBuffer.length - 1)); + } + return this.page = page; + }; + + PDFDocument.prototype.flushPages = function() { + var i, len, page, pages; + pages = this._pageBuffer; + this._pageBuffer = []; + this._pageBufferStart += pages.length; + for (i = 0, len = pages.length; i < len; i++) { + page = pages[i]; + page.end(); + } + }; + + PDFDocument.prototype.ref = function(data) { + var ref; + ref = new PDFReference(this, this._offsets.length + 1, data); + this._offsets.push(null); + this._waiting++; + return ref; + }; + + PDFDocument.prototype._read = function() {}; + + PDFDocument.prototype._write = function(data) { + if (!Buffer.isBuffer(data)) { + data = new Buffer(data + '\n', 'binary'); + } + this.push(data); + return this._offset += data.length; + }; + + PDFDocument.prototype.addContent = function(data) { + this.page.write(data); + return this; + }; + + PDFDocument.prototype._refEnd = function(ref) { + this._offsets[ref.id - 1] = ref.offset; + if (--this._waiting === 0 && this._ended) { + this._finalize(); + return this._ended = false; + } + }; + + PDFDocument.prototype.write = function(filename, fn) { + var err; + err = new Error('PDFDocument#write is deprecated, and will be removed in a future version of PDFKit. Please pipe the document into a Node stream.'); + console.warn(err.stack); + this.pipe(fs.createWriteStream(filename)); + this.end(); + return this.once('end', fn); + }; + + PDFDocument.prototype.output = function(fn) { + throw new Error('PDFDocument#output is deprecated, and has been removed from PDFKit. Please pipe the document into a Node stream.'); + }; + + PDFDocument.prototype.end = function() { + var font, key, name, ref1, ref2, val; + this.flushPages(); + this._info = this.ref(); + ref1 = this.info; + for (key in ref1) { + val = ref1[key]; + if (typeof val === 'string') { + val = new String(val); + } + this._info.data[key] = val; + } + this._info.end(); + ref2 = this._fontFamilies; + for (name in ref2) { + font = ref2[name]; + font.finalize(); + } + this._root.end(); + this._root.data.Pages.end(); + if (this._waiting === 0) { + return this._finalize(); + } else { + return this._ended = true; + } + }; + + PDFDocument.prototype._finalize = function(fn) { + var i, len, offset, ref1, xRefOffset; + xRefOffset = this._offset; + this._write("xref"); + this._write("0 " + (this._offsets.length + 1)); + this._write("0000000000 65535 f "); + ref1 = this._offsets; + for (i = 0, len = ref1.length; i < len; i++) { + offset = ref1[i]; + offset = ('0000000000' + offset).slice(-10); + this._write(offset + ' 00000 n '); + } + this._write('trailer'); + this._write(PDFObject.convert({ + Size: this._offsets.length + 1, + Root: this._root, + Info: this._info + })); + this._write('startxref'); + this._write("" + xRefOffset); + this._write('%%EOF'); + return this.push(null); + }; + + PDFDocument.prototype.toString = function() { + return "[object PDFDocument]"; + }; + + return PDFDocument; + + })(stream.Readable); + + module.exports = PDFDocument; + +}).call(this); diff --git a/pitfall/pdfkit/lib/font.coffee b/pitfall/pdfkit/lib/font.coffee new file mode 100644 index 00000000..c8c58c3a --- /dev/null +++ b/pitfall/pdfkit/lib/font.coffee @@ -0,0 +1,53 @@ +fontkit = require 'fontkit' + +class PDFFont + @open: (document, src, family, id) -> + if typeof src is 'string' + if StandardFont.isStandardFont src + return new StandardFont document, src, id + + font = fontkit.openSync src, family + + else if Buffer.isBuffer(src) + font = fontkit.create src, family + + else if src instanceof Uint8Array + font = fontkit.create new Buffer(src), family + + else if src instanceof ArrayBuffer + font = fontkit.create new Buffer(new Uint8Array(src)), family + + if not font? + throw new Error 'Not a supported font format or standard PDF font.' + + return new EmbeddedFont document, font, id + + constructor: -> + throw new Error 'Cannot construct a PDFFont directly.' + + encode: (text) -> + throw new Error 'Must be implemented by subclasses' + + widthOfString: (text) -> + throw new Error 'Must be implemented by subclasses' + + ref: -> + @dictionary ?= @document.ref() + + finalize: -> + return if @embedded or not @dictionary? + + @embed() + @embedded = true + + embed: -> + throw new Error 'Must be implemented by subclasses' + + lineHeight: (size, includeGap = false) -> + gap = if includeGap then @lineGap else 0 + (@ascender + gap - @descender) / 1000 * size + +module.exports = PDFFont + +StandardFont = require './font/standard' +EmbeddedFont = require './font/embedded' diff --git a/pitfall/pdfkit/lib/font.js b/pitfall/pdfkit/lib/font.js new file mode 100644 index 00000000..ac48b465 --- /dev/null +++ b/pitfall/pdfkit/lib/font.js @@ -0,0 +1,75 @@ +// Generated by CoffeeScript 1.12.5 +(function() { + var EmbeddedFont, PDFFont, StandardFont, fontkit; + + fontkit = require('fontkit'); + + PDFFont = (function() { + PDFFont.open = function(document, src, family, id) { + var font; + if (typeof src === 'string') { + if (StandardFont.isStandardFont(src)) { + return new StandardFont(document, src, id); + } + font = fontkit.openSync(src, family); + } else if (Buffer.isBuffer(src)) { + font = fontkit.create(src, family); + } else if (src instanceof Uint8Array) { + font = fontkit.create(new Buffer(src), family); + } else if (src instanceof ArrayBuffer) { + font = fontkit.create(new Buffer(new Uint8Array(src)), family); + } + if (font == null) { + throw new Error('Not a supported font format or standard PDF font.'); + } + return new EmbeddedFont(document, font, id); + }; + + function PDFFont() { + throw new Error('Cannot construct a PDFFont directly.'); + } + + PDFFont.prototype.encode = function(text) { + throw new Error('Must be implemented by subclasses'); + }; + + PDFFont.prototype.widthOfString = function(text) { + throw new Error('Must be implemented by subclasses'); + }; + + PDFFont.prototype.ref = function() { + return this.dictionary != null ? this.dictionary : this.dictionary = this.document.ref(); + }; + + PDFFont.prototype.finalize = function() { + if (this.embedded || (this.dictionary == null)) { + return; + } + this.embed(); + return this.embedded = true; + }; + + PDFFont.prototype.embed = function() { + throw new Error('Must be implemented by subclasses'); + }; + + PDFFont.prototype.lineHeight = function(size, includeGap) { + var gap; + if (includeGap == null) { + includeGap = false; + } + gap = includeGap ? this.lineGap : 0; + return (this.ascender + gap - this.descender) / 1000 * size; + }; + + return PDFFont; + + })(); + + module.exports = PDFFont; + + StandardFont = require('./font/standard'); + + EmbeddedFont = require('./font/embedded'); + +}).call(this); diff --git a/pitfall/pdfkit/lib/font/afm.coffee b/pitfall/pdfkit/lib/font/afm.coffee new file mode 100644 index 00000000..4e6c0748 --- /dev/null +++ b/pitfall/pdfkit/lib/font/afm.coffee @@ -0,0 +1,195 @@ +fs = require 'fs' + +class AFMFont + @open: (filename) -> + new AFMFont fs.readFileSync filename, 'utf8' + + constructor: (@contents) -> + @attributes = {} + @glyphWidths = {} + @boundingBoxes = {} + @kernPairs = {} + + @parse() + @charWidths = (@glyphWidths[characters[i]] for i in [0..255]) + + @bbox = (+e for e in @attributes['FontBBox'].split /\s+/) + @ascender = +(@attributes['Ascender'] or 0) + @descender = +(@attributes['Descender'] or 0) + @lineGap = (@bbox[3] - @bbox[1]) - (@ascender - @descender) + + parse: -> + section = '' + for line in @contents.split '\n' + if match = line.match /^Start(\w+)/ + section = match[1] + continue + + else if match = line.match /^End(\w+)/ + section = '' + continue + + switch section + when 'FontMetrics' + match = line.match /(^\w+)\s+(.*)/ + key = match[1] + value = match[2] + + if a = @attributes[key] + a = @attributes[key] = [a] if !Array.isArray(a) + a.push(value) + else + @attributes[key] = value + + when 'CharMetrics' + continue unless /^CH?\s/.test(line) + name = line.match(/\bN\s+(\.?\w+)\s*;/)[1] + @glyphWidths[name] = +line.match(/\bWX\s+(\d+)\s*;/)[1] + + when 'KernPairs' + match = line.match /^KPX\s+(\.?\w+)\s+(\.?\w+)\s+(-?\d+)/ + if match + @kernPairs[match[1] + '\0' + match[2]] = parseInt match[3] + + return + + WIN_ANSI_MAP = + 402: 131 + 8211: 150 + 8212: 151 + 8216: 145 + 8217: 146 + 8218: 130 + 8220: 147 + 8221: 148 + 8222: 132 + 8224: 134 + 8225: 135 + 8226: 149 + 8230: 133 + 8364: 128 + 8240: 137 + 8249: 139 + 8250: 155 + 710: 136 + 8482: 153 + 338: 140 + 339: 156 + 732: 152 + 352: 138 + 353: 154 + 376: 159 + 381: 142 + 382: 158 + + encodeText: (text) -> + res = [] + for i in [0...text.length] + char = text.charCodeAt(i) + char = WIN_ANSI_MAP[char] or char + res.push char.toString(16) + + return res + + glyphsForString: (string) -> + glyphs = [] + + for i in [0...string.length] + charCode = string.charCodeAt(i) + glyphs.push @characterToGlyph charCode + + return glyphs + + characterToGlyph: (character) -> + return characters[WIN_ANSI_MAP[character] or character] or '.notdef' + + widthOfGlyph: (glyph) -> + return @glyphWidths[glyph] or 0 + + getKernPair: (left, right) -> + return @kernPairs[left + '\0' + right] or 0 + + advancesForGlyphs: (glyphs) -> + advances = [] + + for left, index in glyphs + right = glyphs[index + 1] + advances.push @widthOfGlyph(left) + @getKernPair(left, right) + + return advances + + characters = ''' + .notdef .notdef .notdef .notdef + .notdef .notdef .notdef .notdef + .notdef .notdef .notdef .notdef + .notdef .notdef .notdef .notdef + .notdef .notdef .notdef .notdef + .notdef .notdef .notdef .notdef + .notdef .notdef .notdef .notdef + .notdef .notdef .notdef .notdef + + space exclam quotedbl numbersign + dollar percent ampersand quotesingle + parenleft parenright asterisk plus + comma hyphen period slash + zero one two three + four five six seven + eight nine colon semicolon + less equal greater question + + at A B C + D E F G + H I J K + L M N O + P Q R S + T U V W + X Y Z bracketleft + backslash bracketright asciicircum underscore + + grave a b c + d e f g + h i j k + l m n o + p q r s + t u v w + x y z braceleft + bar braceright asciitilde .notdef + + Euro .notdef quotesinglbase florin + quotedblbase ellipsis dagger daggerdbl + circumflex perthousand Scaron guilsinglleft + OE .notdef Zcaron .notdef + .notdef quoteleft quoteright quotedblleft + quotedblright bullet endash emdash + tilde trademark scaron guilsinglright + oe .notdef zcaron ydieresis + + space exclamdown cent sterling + currency yen brokenbar section + dieresis copyright ordfeminine guillemotleft + logicalnot hyphen registered macron + degree plusminus twosuperior threesuperior + acute mu paragraph periodcentered + cedilla onesuperior ordmasculine guillemotright + onequarter onehalf threequarters questiondown + + Agrave Aacute Acircumflex Atilde + Adieresis Aring AE Ccedilla + Egrave Eacute Ecircumflex Edieresis + Igrave Iacute Icircumflex Idieresis + Eth Ntilde Ograve Oacute + Ocircumflex Otilde Odieresis multiply + Oslash Ugrave Uacute Ucircumflex + Udieresis Yacute Thorn germandbls + + agrave aacute acircumflex atilde + adieresis aring ae ccedilla + egrave eacute ecircumflex edieresis + igrave iacute icircumflex idieresis + eth ntilde ograve oacute + ocircumflex otilde odieresis divide + oslash ugrave uacute ucircumflex + udieresis yacute thorn ydieresis + '''.split(/\s+/) + +module.exports = AFMFont \ No newline at end of file diff --git a/pitfall/pdfkit/lib/font/data/Courier-Bold.afm b/pitfall/pdfkit/lib/font/data/Courier-Bold.afm new file mode 100755 index 00000000..eb80542b --- /dev/null +++ b/pitfall/pdfkit/lib/font/data/Courier-Bold.afm @@ -0,0 +1,342 @@ +StartFontMetrics 4.1 +Comment Copyright (c) 1989, 1990, 1991, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. +Comment Creation Date: Mon Jun 23 16:28:00 1997 +Comment UniqueID 43048 +Comment VMusage 41139 52164 +FontName Courier-Bold +FullName Courier Bold +FamilyName Courier +Weight Bold +ItalicAngle 0 +IsFixedPitch true +CharacterSet ExtendedRoman +FontBBox -113 -250 749 801 +UnderlinePosition -100 +UnderlineThickness 50 +Version 003.000 +Notice Copyright (c) 1989, 1990, 1991, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. +EncodingScheme AdobeStandardEncoding +CapHeight 562 +XHeight 439 +Ascender 629 +Descender -157 +StdHW 84 +StdVW 106 +StartCharMetrics 315 +C 32 ; WX 600 ; N space ; B 0 0 0 0 ; +C 33 ; WX 600 ; N exclam ; B 202 -15 398 572 ; +C 34 ; WX 600 ; N quotedbl ; B 135 277 465 562 ; +C 35 ; WX 600 ; N numbersign ; B 56 -45 544 651 ; +C 36 ; WX 600 ; N dollar ; B 82 -126 519 666 ; +C 37 ; WX 600 ; N percent ; B 5 -15 595 616 ; +C 38 ; WX 600 ; N ampersand ; B 36 -15 546 543 ; +C 39 ; WX 600 ; N quoteright ; B 171 277 423 562 ; +C 40 ; WX 600 ; N parenleft ; B 219 -102 461 616 ; +C 41 ; WX 600 ; N parenright ; B 139 -102 381 616 ; +C 42 ; WX 600 ; N asterisk ; B 91 219 509 601 ; +C 43 ; WX 600 ; N plus ; B 71 39 529 478 ; +C 44 ; WX 600 ; N comma ; B 123 -111 393 174 ; +C 45 ; WX 600 ; N hyphen ; B 100 203 500 313 ; +C 46 ; WX 600 ; N period ; B 192 -15 408 171 ; +C 47 ; WX 600 ; N slash ; B 98 -77 502 626 ; +C 48 ; WX 600 ; N zero ; B 87 -15 513 616 ; +C 49 ; WX 600 ; N one ; B 81 0 539 616 ; +C 50 ; WX 600 ; N two ; B 61 0 499 616 ; +C 51 ; WX 600 ; N three ; B 63 -15 501 616 ; +C 52 ; WX 600 ; N four ; B 53 0 507 616 ; +C 53 ; WX 600 ; N five ; B 70 -15 521 601 ; +C 54 ; WX 600 ; N six ; B 90 -15 521 616 ; +C 55 ; WX 600 ; N seven ; B 55 0 494 601 ; +C 56 ; WX 600 ; N eight ; B 83 -15 517 616 ; +C 57 ; WX 600 ; N nine ; B 79 -15 510 616 ; +C 58 ; WX 600 ; N colon ; B 191 -15 407 425 ; +C 59 ; WX 600 ; N semicolon ; B 123 -111 408 425 ; +C 60 ; WX 600 ; N less ; B 66 15 523 501 ; +C 61 ; WX 600 ; N equal ; B 71 118 529 398 ; +C 62 ; WX 600 ; N greater ; B 77 15 534 501 ; +C 63 ; WX 600 ; N question ; B 98 -14 501 580 ; +C 64 ; WX 600 ; N at ; B 16 -15 584 616 ; +C 65 ; WX 600 ; N A ; B -9 0 609 562 ; +C 66 ; WX 600 ; N B ; B 30 0 573 562 ; +C 67 ; WX 600 ; N C ; B 22 -18 560 580 ; +C 68 ; WX 600 ; N D ; B 30 0 594 562 ; +C 69 ; WX 600 ; N E ; B 25 0 560 562 ; +C 70 ; WX 600 ; N F ; B 39 0 570 562 ; +C 71 ; WX 600 ; N G ; B 22 -18 594 580 ; +C 72 ; WX 600 ; N H ; B 20 0 580 562 ; +C 73 ; WX 600 ; N I ; B 77 0 523 562 ; +C 74 ; WX 600 ; N J ; B 37 -18 601 562 ; +C 75 ; WX 600 ; N K ; B 21 0 599 562 ; +C 76 ; WX 600 ; N L ; B 39 0 578 562 ; +C 77 ; WX 600 ; N M ; B -2 0 602 562 ; +C 78 ; WX 600 ; N N ; B 8 -12 610 562 ; +C 79 ; WX 600 ; N O ; B 22 -18 578 580 ; +C 80 ; WX 600 ; N P ; B 48 0 559 562 ; +C 81 ; WX 600 ; N Q ; B 32 -138 578 580 ; +C 82 ; WX 600 ; N R ; B 24 0 599 562 ; +C 83 ; WX 600 ; N S ; B 47 -22 553 582 ; +C 84 ; WX 600 ; N T ; B 21 0 579 562 ; +C 85 ; WX 600 ; N U ; B 4 -18 596 562 ; +C 86 ; WX 600 ; N V ; B -13 0 613 562 ; +C 87 ; WX 600 ; N W ; B -18 0 618 562 ; +C 88 ; WX 600 ; N X ; B 12 0 588 562 ; +C 89 ; WX 600 ; N Y ; B 12 0 589 562 ; +C 90 ; WX 600 ; N Z ; B 62 0 539 562 ; +C 91 ; WX 600 ; N bracketleft ; B 245 -102 475 616 ; +C 92 ; WX 600 ; N backslash ; B 99 -77 503 626 ; +C 93 ; WX 600 ; N bracketright ; B 125 -102 355 616 ; +C 94 ; WX 600 ; N asciicircum ; B 108 250 492 616 ; +C 95 ; WX 600 ; N underscore ; B 0 -125 600 -75 ; +C 96 ; WX 600 ; N quoteleft ; B 178 277 428 562 ; +C 97 ; WX 600 ; N a ; B 35 -15 570 454 ; +C 98 ; WX 600 ; N b ; B 0 -15 584 626 ; +C 99 ; WX 600 ; N c ; B 40 -15 545 459 ; +C 100 ; WX 600 ; N d ; B 20 -15 591 626 ; +C 101 ; WX 600 ; N e ; B 40 -15 563 454 ; +C 102 ; WX 600 ; N f ; B 83 0 547 626 ; L i fi ; L l fl ; +C 103 ; WX 600 ; N g ; B 30 -146 580 454 ; +C 104 ; WX 600 ; N h ; B 5 0 592 626 ; +C 105 ; WX 600 ; N i ; B 77 0 523 658 ; +C 106 ; WX 600 ; N j ; B 63 -146 440 658 ; +C 107 ; WX 600 ; N k ; B 20 0 585 626 ; +C 108 ; WX 600 ; N l ; B 77 0 523 626 ; +C 109 ; WX 600 ; N m ; B -22 0 626 454 ; +C 110 ; WX 600 ; N n ; B 18 0 592 454 ; +C 111 ; WX 600 ; N o ; B 30 -15 570 454 ; +C 112 ; WX 600 ; N p ; B -1 -142 570 454 ; +C 113 ; WX 600 ; N q ; B 20 -142 591 454 ; +C 114 ; WX 600 ; N r ; B 47 0 580 454 ; +C 115 ; WX 600 ; N s ; B 68 -17 535 459 ; +C 116 ; WX 600 ; N t ; B 47 -15 532 562 ; +C 117 ; WX 600 ; N u ; B -1 -15 569 439 ; +C 118 ; WX 600 ; N v ; B -1 0 601 439 ; +C 119 ; WX 600 ; N w ; B -18 0 618 439 ; +C 120 ; WX 600 ; N x ; B 6 0 594 439 ; +C 121 ; WX 600 ; N y ; B -4 -142 601 439 ; +C 122 ; WX 600 ; N z ; B 81 0 520 439 ; +C 123 ; WX 600 ; N braceleft ; B 160 -102 464 616 ; +C 124 ; WX 600 ; N bar ; B 255 -250 345 750 ; +C 125 ; WX 600 ; N braceright ; B 136 -102 440 616 ; +C 126 ; WX 600 ; N asciitilde ; B 71 153 530 356 ; +C 161 ; WX 600 ; N exclamdown ; B 202 -146 398 449 ; +C 162 ; WX 600 ; N cent ; B 66 -49 518 614 ; +C 163 ; WX 600 ; N sterling ; B 72 -28 558 611 ; +C 164 ; WX 600 ; N fraction ; B 25 -60 576 661 ; +C 165 ; WX 600 ; N yen ; B 10 0 590 562 ; +C 166 ; WX 600 ; N florin ; B -30 -131 572 616 ; +C 167 ; WX 600 ; N section ; B 83 -70 517 580 ; +C 168 ; WX 600 ; N currency ; B 54 49 546 517 ; +C 169 ; WX 600 ; N quotesingle ; B 227 277 373 562 ; +C 170 ; WX 600 ; N quotedblleft ; B 71 277 535 562 ; +C 171 ; WX 600 ; N guillemotleft ; B 8 70 553 446 ; +C 172 ; WX 600 ; N guilsinglleft ; B 141 70 459 446 ; +C 173 ; WX 600 ; N guilsinglright ; B 141 70 459 446 ; +C 174 ; WX 600 ; N fi ; B 12 0 593 626 ; +C 175 ; WX 600 ; N fl ; B 12 0 593 626 ; +C 177 ; WX 600 ; N endash ; B 65 203 535 313 ; +C 178 ; WX 600 ; N dagger ; B 106 -70 494 580 ; +C 179 ; WX 600 ; N daggerdbl ; B 106 -70 494 580 ; +C 180 ; WX 600 ; N periodcentered ; B 196 165 404 351 ; +C 182 ; WX 600 ; N paragraph ; B 6 -70 576 580 ; +C 183 ; WX 600 ; N bullet ; B 140 132 460 430 ; +C 184 ; WX 600 ; N quotesinglbase ; B 175 -142 427 143 ; +C 185 ; WX 600 ; N quotedblbase ; B 65 -142 529 143 ; +C 186 ; WX 600 ; N quotedblright ; B 61 277 525 562 ; +C 187 ; WX 600 ; N guillemotright ; B 47 70 592 446 ; +C 188 ; WX 600 ; N ellipsis ; B 26 -15 574 116 ; +C 189 ; WX 600 ; N perthousand ; B -113 -15 713 616 ; +C 191 ; WX 600 ; N questiondown ; B 99 -146 502 449 ; +C 193 ; WX 600 ; N grave ; B 132 508 395 661 ; +C 194 ; WX 600 ; N acute ; B 205 508 468 661 ; +C 195 ; WX 600 ; N circumflex ; B 103 483 497 657 ; +C 196 ; WX 600 ; N tilde ; B 89 493 512 636 ; +C 197 ; WX 600 ; N macron ; B 88 505 512 585 ; +C 198 ; WX 600 ; N breve ; B 83 468 517 631 ; +C 199 ; WX 600 ; N dotaccent ; B 230 498 370 638 ; +C 200 ; WX 600 ; N dieresis ; B 128 498 472 638 ; +C 202 ; WX 600 ; N ring ; B 198 481 402 678 ; +C 203 ; WX 600 ; N cedilla ; B 205 -206 387 0 ; +C 205 ; WX 600 ; N hungarumlaut ; B 68 488 588 661 ; +C 206 ; WX 600 ; N ogonek ; B 169 -199 400 0 ; +C 207 ; WX 600 ; N caron ; B 103 493 497 667 ; +C 208 ; WX 600 ; N emdash ; B -10 203 610 313 ; +C 225 ; WX 600 ; N AE ; B -29 0 602 562 ; +C 227 ; WX 600 ; N ordfeminine ; B 147 196 453 580 ; +C 232 ; WX 600 ; N Lslash ; B 39 0 578 562 ; +C 233 ; WX 600 ; N Oslash ; B 22 -22 578 584 ; +C 234 ; WX 600 ; N OE ; B -25 0 595 562 ; +C 235 ; WX 600 ; N ordmasculine ; B 147 196 453 580 ; +C 241 ; WX 600 ; N ae ; B -4 -15 601 454 ; +C 245 ; WX 600 ; N dotlessi ; B 77 0 523 439 ; +C 248 ; WX 600 ; N lslash ; B 77 0 523 626 ; +C 249 ; WX 600 ; N oslash ; B 30 -24 570 463 ; +C 250 ; WX 600 ; N oe ; B -18 -15 611 454 ; +C 251 ; WX 600 ; N germandbls ; B 22 -15 596 626 ; +C -1 ; WX 600 ; N Idieresis ; B 77 0 523 761 ; +C -1 ; WX 600 ; N eacute ; B 40 -15 563 661 ; +C -1 ; WX 600 ; N abreve ; B 35 -15 570 661 ; +C -1 ; WX 600 ; N uhungarumlaut ; B -1 -15 628 661 ; +C -1 ; WX 600 ; N ecaron ; B 40 -15 563 667 ; +C -1 ; WX 600 ; N Ydieresis ; B 12 0 589 761 ; +C -1 ; WX 600 ; N divide ; B 71 16 529 500 ; +C -1 ; WX 600 ; N Yacute ; B 12 0 589 784 ; +C -1 ; WX 600 ; N Acircumflex ; B -9 0 609 780 ; +C -1 ; WX 600 ; N aacute ; B 35 -15 570 661 ; +C -1 ; WX 600 ; N Ucircumflex ; B 4 -18 596 780 ; +C -1 ; WX 600 ; N yacute ; B -4 -142 601 661 ; +C -1 ; WX 600 ; N scommaaccent ; B 68 -250 535 459 ; +C -1 ; WX 600 ; N ecircumflex ; B 40 -15 563 657 ; +C -1 ; WX 600 ; N Uring ; B 4 -18 596 801 ; +C -1 ; WX 600 ; N Udieresis ; B 4 -18 596 761 ; +C -1 ; WX 600 ; N aogonek ; B 35 -199 586 454 ; +C -1 ; WX 600 ; N Uacute ; B 4 -18 596 784 ; +C -1 ; WX 600 ; N uogonek ; B -1 -199 585 439 ; +C -1 ; WX 600 ; N Edieresis ; B 25 0 560 761 ; +C -1 ; WX 600 ; N Dcroat ; B 30 0 594 562 ; +C -1 ; WX 600 ; N commaaccent ; B 205 -250 397 -57 ; +C -1 ; WX 600 ; N copyright ; B 0 -18 600 580 ; +C -1 ; WX 600 ; N Emacron ; B 25 0 560 708 ; +C -1 ; WX 600 ; N ccaron ; B 40 -15 545 667 ; +C -1 ; WX 600 ; N aring ; B 35 -15 570 678 ; +C -1 ; WX 600 ; N Ncommaaccent ; B 8 -250 610 562 ; +C -1 ; WX 600 ; N lacute ; B 77 0 523 801 ; +C -1 ; WX 600 ; N agrave ; B 35 -15 570 661 ; +C -1 ; WX 600 ; N Tcommaaccent ; B 21 -250 579 562 ; +C -1 ; WX 600 ; N Cacute ; B 22 -18 560 784 ; +C -1 ; WX 600 ; N atilde ; B 35 -15 570 636 ; +C -1 ; WX 600 ; N Edotaccent ; B 25 0 560 761 ; +C -1 ; WX 600 ; N scaron ; B 68 -17 535 667 ; +C -1 ; WX 600 ; N scedilla ; B 68 -206 535 459 ; +C -1 ; WX 600 ; N iacute ; B 77 0 523 661 ; +C -1 ; WX 600 ; N lozenge ; B 66 0 534 740 ; +C -1 ; WX 600 ; N Rcaron ; B 24 0 599 790 ; +C -1 ; WX 600 ; N Gcommaaccent ; B 22 -250 594 580 ; +C -1 ; WX 600 ; N ucircumflex ; B -1 -15 569 657 ; +C -1 ; WX 600 ; N acircumflex ; B 35 -15 570 657 ; +C -1 ; WX 600 ; N Amacron ; B -9 0 609 708 ; +C -1 ; WX 600 ; N rcaron ; B 47 0 580 667 ; +C -1 ; WX 600 ; N ccedilla ; B 40 -206 545 459 ; +C -1 ; WX 600 ; N Zdotaccent ; B 62 0 539 761 ; +C -1 ; WX 600 ; N Thorn ; B 48 0 557 562 ; +C -1 ; WX 600 ; N Omacron ; B 22 -18 578 708 ; +C -1 ; WX 600 ; N Racute ; B 24 0 599 784 ; +C -1 ; WX 600 ; N Sacute ; B 47 -22 553 784 ; +C -1 ; WX 600 ; N dcaron ; B 20 -15 727 626 ; +C -1 ; WX 600 ; N Umacron ; B 4 -18 596 708 ; +C -1 ; WX 600 ; N uring ; B -1 -15 569 678 ; +C -1 ; WX 600 ; N threesuperior ; B 138 222 433 616 ; +C -1 ; WX 600 ; N Ograve ; B 22 -18 578 784 ; +C -1 ; WX 600 ; N Agrave ; B -9 0 609 784 ; +C -1 ; WX 600 ; N Abreve ; B -9 0 609 784 ; +C -1 ; WX 600 ; N multiply ; B 81 39 520 478 ; +C -1 ; WX 600 ; N uacute ; B -1 -15 569 661 ; +C -1 ; WX 600 ; N Tcaron ; B 21 0 579 790 ; +C -1 ; WX 600 ; N partialdiff ; B 63 -38 537 728 ; +C -1 ; WX 600 ; N ydieresis ; B -4 -142 601 638 ; +C -1 ; WX 600 ; N Nacute ; B 8 -12 610 784 ; +C -1 ; WX 600 ; N icircumflex ; B 73 0 523 657 ; +C -1 ; WX 600 ; N Ecircumflex ; B 25 0 560 780 ; +C -1 ; WX 600 ; N adieresis ; B 35 -15 570 638 ; +C -1 ; WX 600 ; N edieresis ; B 40 -15 563 638 ; +C -1 ; WX 600 ; N cacute ; B 40 -15 545 661 ; +C -1 ; WX 600 ; N nacute ; B 18 0 592 661 ; +C -1 ; WX 600 ; N umacron ; B -1 -15 569 585 ; +C -1 ; WX 600 ; N Ncaron ; B 8 -12 610 790 ; +C -1 ; WX 600 ; N Iacute ; B 77 0 523 784 ; +C -1 ; WX 600 ; N plusminus ; B 71 24 529 515 ; +C -1 ; WX 600 ; N brokenbar ; B 255 -175 345 675 ; +C -1 ; WX 600 ; N registered ; B 0 -18 600 580 ; +C -1 ; WX 600 ; N Gbreve ; B 22 -18 594 784 ; +C -1 ; WX 600 ; N Idotaccent ; B 77 0 523 761 ; +C -1 ; WX 600 ; N summation ; B 15 -10 586 706 ; +C -1 ; WX 600 ; N Egrave ; B 25 0 560 784 ; +C -1 ; WX 600 ; N racute ; B 47 0 580 661 ; +C -1 ; WX 600 ; N omacron ; B 30 -15 570 585 ; +C -1 ; WX 600 ; N Zacute ; B 62 0 539 784 ; +C -1 ; WX 600 ; N Zcaron ; B 62 0 539 790 ; +C -1 ; WX 600 ; N greaterequal ; B 26 0 523 696 ; +C -1 ; WX 600 ; N Eth ; B 30 0 594 562 ; +C -1 ; WX 600 ; N Ccedilla ; B 22 -206 560 580 ; +C -1 ; WX 600 ; N lcommaaccent ; B 77 -250 523 626 ; +C -1 ; WX 600 ; N tcaron ; B 47 -15 532 703 ; +C -1 ; WX 600 ; N eogonek ; B 40 -199 563 454 ; +C -1 ; WX 600 ; N Uogonek ; B 4 -199 596 562 ; +C -1 ; WX 600 ; N Aacute ; B -9 0 609 784 ; +C -1 ; WX 600 ; N Adieresis ; B -9 0 609 761 ; +C -1 ; WX 600 ; N egrave ; B 40 -15 563 661 ; +C -1 ; WX 600 ; N zacute ; B 81 0 520 661 ; +C -1 ; WX 600 ; N iogonek ; B 77 -199 523 658 ; +C -1 ; WX 600 ; N Oacute ; B 22 -18 578 784 ; +C -1 ; WX 600 ; N oacute ; B 30 -15 570 661 ; +C -1 ; WX 600 ; N amacron ; B 35 -15 570 585 ; +C -1 ; WX 600 ; N sacute ; B 68 -17 535 661 ; +C -1 ; WX 600 ; N idieresis ; B 77 0 523 618 ; +C -1 ; WX 600 ; N Ocircumflex ; B 22 -18 578 780 ; +C -1 ; WX 600 ; N Ugrave ; B 4 -18 596 784 ; +C -1 ; WX 600 ; N Delta ; B 6 0 594 688 ; +C -1 ; WX 600 ; N thorn ; B -14 -142 570 626 ; +C -1 ; WX 600 ; N twosuperior ; B 143 230 436 616 ; +C -1 ; WX 600 ; N Odieresis ; B 22 -18 578 761 ; +C -1 ; WX 600 ; N mu ; B -1 -142 569 439 ; +C -1 ; WX 600 ; N igrave ; B 77 0 523 661 ; +C -1 ; WX 600 ; N ohungarumlaut ; B 30 -15 668 661 ; +C -1 ; WX 600 ; N Eogonek ; B 25 -199 576 562 ; +C -1 ; WX 600 ; N dcroat ; B 20 -15 591 626 ; +C -1 ; WX 600 ; N threequarters ; B -47 -60 648 661 ; +C -1 ; WX 600 ; N Scedilla ; B 47 -206 553 582 ; +C -1 ; WX 600 ; N lcaron ; B 77 0 597 626 ; +C -1 ; WX 600 ; N Kcommaaccent ; B 21 -250 599 562 ; +C -1 ; WX 600 ; N Lacute ; B 39 0 578 784 ; +C -1 ; WX 600 ; N trademark ; B -9 230 749 562 ; +C -1 ; WX 600 ; N edotaccent ; B 40 -15 563 638 ; +C -1 ; WX 600 ; N Igrave ; B 77 0 523 784 ; +C -1 ; WX 600 ; N Imacron ; B 77 0 523 708 ; +C -1 ; WX 600 ; N Lcaron ; B 39 0 637 562 ; +C -1 ; WX 600 ; N onehalf ; B -47 -60 648 661 ; +C -1 ; WX 600 ; N lessequal ; B 26 0 523 696 ; +C -1 ; WX 600 ; N ocircumflex ; B 30 -15 570 657 ; +C -1 ; WX 600 ; N ntilde ; B 18 0 592 636 ; +C -1 ; WX 600 ; N Uhungarumlaut ; B 4 -18 638 784 ; +C -1 ; WX 600 ; N Eacute ; B 25 0 560 784 ; +C -1 ; WX 600 ; N emacron ; B 40 -15 563 585 ; +C -1 ; WX 600 ; N gbreve ; B 30 -146 580 661 ; +C -1 ; WX 600 ; N onequarter ; B -56 -60 656 661 ; +C -1 ; WX 600 ; N Scaron ; B 47 -22 553 790 ; +C -1 ; WX 600 ; N Scommaaccent ; B 47 -250 553 582 ; +C -1 ; WX 600 ; N Ohungarumlaut ; B 22 -18 628 784 ; +C -1 ; WX 600 ; N degree ; B 86 243 474 616 ; +C -1 ; WX 600 ; N ograve ; B 30 -15 570 661 ; +C -1 ; WX 600 ; N Ccaron ; B 22 -18 560 790 ; +C -1 ; WX 600 ; N ugrave ; B -1 -15 569 661 ; +C -1 ; WX 600 ; N radical ; B -19 -104 473 778 ; +C -1 ; WX 600 ; N Dcaron ; B 30 0 594 790 ; +C -1 ; WX 600 ; N rcommaaccent ; B 47 -250 580 454 ; +C -1 ; WX 600 ; N Ntilde ; B 8 -12 610 759 ; +C -1 ; WX 600 ; N otilde ; B 30 -15 570 636 ; +C -1 ; WX 600 ; N Rcommaaccent ; B 24 -250 599 562 ; +C -1 ; WX 600 ; N Lcommaaccent ; B 39 -250 578 562 ; +C -1 ; WX 600 ; N Atilde ; B -9 0 609 759 ; +C -1 ; WX 600 ; N Aogonek ; B -9 -199 625 562 ; +C -1 ; WX 600 ; N Aring ; B -9 0 609 801 ; +C -1 ; WX 600 ; N Otilde ; B 22 -18 578 759 ; +C -1 ; WX 600 ; N zdotaccent ; B 81 0 520 638 ; +C -1 ; WX 600 ; N Ecaron ; B 25 0 560 790 ; +C -1 ; WX 600 ; N Iogonek ; B 77 -199 523 562 ; +C -1 ; WX 600 ; N kcommaaccent ; B 20 -250 585 626 ; +C -1 ; WX 600 ; N minus ; B 71 203 529 313 ; +C -1 ; WX 600 ; N Icircumflex ; B 77 0 523 780 ; +C -1 ; WX 600 ; N ncaron ; B 18 0 592 667 ; +C -1 ; WX 600 ; N tcommaaccent ; B 47 -250 532 562 ; +C -1 ; WX 600 ; N logicalnot ; B 71 103 529 413 ; +C -1 ; WX 600 ; N odieresis ; B 30 -15 570 638 ; +C -1 ; WX 600 ; N udieresis ; B -1 -15 569 638 ; +C -1 ; WX 600 ; N notequal ; B 12 -47 537 563 ; +C -1 ; WX 600 ; N gcommaaccent ; B 30 -146 580 714 ; +C -1 ; WX 600 ; N eth ; B 58 -27 543 626 ; +C -1 ; WX 600 ; N zcaron ; B 81 0 520 667 ; +C -1 ; WX 600 ; N ncommaaccent ; B 18 -250 592 454 ; +C -1 ; WX 600 ; N onesuperior ; B 153 230 447 616 ; +C -1 ; WX 600 ; N imacron ; B 77 0 523 585 ; +C -1 ; WX 600 ; N Euro ; B 0 0 0 0 ; +EndCharMetrics +EndFontMetrics diff --git a/pitfall/pdfkit/lib/font/data/Courier-BoldOblique.afm b/pitfall/pdfkit/lib/font/data/Courier-BoldOblique.afm new file mode 100755 index 00000000..29d3b8b1 --- /dev/null +++ b/pitfall/pdfkit/lib/font/data/Courier-BoldOblique.afm @@ -0,0 +1,342 @@ +StartFontMetrics 4.1 +Comment Copyright (c) 1989, 1990, 1991, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. +Comment Creation Date: Mon Jun 23 16:28:46 1997 +Comment UniqueID 43049 +Comment VMusage 17529 79244 +FontName Courier-BoldOblique +FullName Courier Bold Oblique +FamilyName Courier +Weight Bold +ItalicAngle -12 +IsFixedPitch true +CharacterSet ExtendedRoman +FontBBox -57 -250 869 801 +UnderlinePosition -100 +UnderlineThickness 50 +Version 003.000 +Notice Copyright (c) 1989, 1990, 1991, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. +EncodingScheme AdobeStandardEncoding +CapHeight 562 +XHeight 439 +Ascender 629 +Descender -157 +StdHW 84 +StdVW 106 +StartCharMetrics 315 +C 32 ; WX 600 ; N space ; B 0 0 0 0 ; +C 33 ; WX 600 ; N exclam ; B 215 -15 495 572 ; +C 34 ; WX 600 ; N quotedbl ; B 211 277 585 562 ; +C 35 ; WX 600 ; N numbersign ; B 88 -45 641 651 ; +C 36 ; WX 600 ; N dollar ; B 87 -126 630 666 ; +C 37 ; WX 600 ; N percent ; B 101 -15 625 616 ; +C 38 ; WX 600 ; N ampersand ; B 61 -15 595 543 ; +C 39 ; WX 600 ; N quoteright ; B 229 277 543 562 ; +C 40 ; WX 600 ; N parenleft ; B 265 -102 592 616 ; +C 41 ; WX 600 ; N parenright ; B 117 -102 444 616 ; +C 42 ; WX 600 ; N asterisk ; B 179 219 598 601 ; +C 43 ; WX 600 ; N plus ; B 114 39 596 478 ; +C 44 ; WX 600 ; N comma ; B 99 -111 430 174 ; +C 45 ; WX 600 ; N hyphen ; B 143 203 567 313 ; +C 46 ; WX 600 ; N period ; B 206 -15 427 171 ; +C 47 ; WX 600 ; N slash ; B 90 -77 626 626 ; +C 48 ; WX 600 ; N zero ; B 135 -15 593 616 ; +C 49 ; WX 600 ; N one ; B 93 0 562 616 ; +C 50 ; WX 600 ; N two ; B 61 0 594 616 ; +C 51 ; WX 600 ; N three ; B 71 -15 571 616 ; +C 52 ; WX 600 ; N four ; B 81 0 559 616 ; +C 53 ; WX 600 ; N five ; B 77 -15 621 601 ; +C 54 ; WX 600 ; N six ; B 135 -15 652 616 ; +C 55 ; WX 600 ; N seven ; B 147 0 622 601 ; +C 56 ; WX 600 ; N eight ; B 115 -15 604 616 ; +C 57 ; WX 600 ; N nine ; B 75 -15 592 616 ; +C 58 ; WX 600 ; N colon ; B 205 -15 480 425 ; +C 59 ; WX 600 ; N semicolon ; B 99 -111 481 425 ; +C 60 ; WX 600 ; N less ; B 120 15 613 501 ; +C 61 ; WX 600 ; N equal ; B 96 118 614 398 ; +C 62 ; WX 600 ; N greater ; B 97 15 589 501 ; +C 63 ; WX 600 ; N question ; B 183 -14 592 580 ; +C 64 ; WX 600 ; N at ; B 65 -15 642 616 ; +C 65 ; WX 600 ; N A ; B -9 0 632 562 ; +C 66 ; WX 600 ; N B ; B 30 0 630 562 ; +C 67 ; WX 600 ; N C ; B 74 -18 675 580 ; +C 68 ; WX 600 ; N D ; B 30 0 664 562 ; +C 69 ; WX 600 ; N E ; B 25 0 670 562 ; +C 70 ; WX 600 ; N F ; B 39 0 684 562 ; +C 71 ; WX 600 ; N G ; B 74 -18 675 580 ; +C 72 ; WX 600 ; N H ; B 20 0 700 562 ; +C 73 ; WX 600 ; N I ; B 77 0 643 562 ; +C 74 ; WX 600 ; N J ; B 58 -18 721 562 ; +C 75 ; WX 600 ; N K ; B 21 0 692 562 ; +C 76 ; WX 600 ; N L ; B 39 0 636 562 ; +C 77 ; WX 600 ; N M ; B -2 0 722 562 ; +C 78 ; WX 600 ; N N ; B 8 -12 730 562 ; +C 79 ; WX 600 ; N O ; B 74 -18 645 580 ; +C 80 ; WX 600 ; N P ; B 48 0 643 562 ; +C 81 ; WX 600 ; N Q ; B 83 -138 636 580 ; +C 82 ; WX 600 ; N R ; B 24 0 617 562 ; +C 83 ; WX 600 ; N S ; B 54 -22 673 582 ; +C 84 ; WX 600 ; N T ; B 86 0 679 562 ; +C 85 ; WX 600 ; N U ; B 101 -18 716 562 ; +C 86 ; WX 600 ; N V ; B 84 0 733 562 ; +C 87 ; WX 600 ; N W ; B 79 0 738 562 ; +C 88 ; WX 600 ; N X ; B 12 0 690 562 ; +C 89 ; WX 600 ; N Y ; B 109 0 709 562 ; +C 90 ; WX 600 ; N Z ; B 62 0 637 562 ; +C 91 ; WX 600 ; N bracketleft ; B 223 -102 606 616 ; +C 92 ; WX 600 ; N backslash ; B 222 -77 496 626 ; +C 93 ; WX 600 ; N bracketright ; B 103 -102 486 616 ; +C 94 ; WX 600 ; N asciicircum ; B 171 250 556 616 ; +C 95 ; WX 600 ; N underscore ; B -27 -125 585 -75 ; +C 96 ; WX 600 ; N quoteleft ; B 297 277 487 562 ; +C 97 ; WX 600 ; N a ; B 61 -15 593 454 ; +C 98 ; WX 600 ; N b ; B 13 -15 636 626 ; +C 99 ; WX 600 ; N c ; B 81 -15 631 459 ; +C 100 ; WX 600 ; N d ; B 60 -15 645 626 ; +C 101 ; WX 600 ; N e ; B 81 -15 605 454 ; +C 102 ; WX 600 ; N f ; B 83 0 677 626 ; L i fi ; L l fl ; +C 103 ; WX 600 ; N g ; B 40 -146 674 454 ; +C 104 ; WX 600 ; N h ; B 18 0 615 626 ; +C 105 ; WX 600 ; N i ; B 77 0 546 658 ; +C 106 ; WX 600 ; N j ; B 36 -146 580 658 ; +C 107 ; WX 600 ; N k ; B 33 0 643 626 ; +C 108 ; WX 600 ; N l ; B 77 0 546 626 ; +C 109 ; WX 600 ; N m ; B -22 0 649 454 ; +C 110 ; WX 600 ; N n ; B 18 0 615 454 ; +C 111 ; WX 600 ; N o ; B 71 -15 622 454 ; +C 112 ; WX 600 ; N p ; B -32 -142 622 454 ; +C 113 ; WX 600 ; N q ; B 60 -142 685 454 ; +C 114 ; WX 600 ; N r ; B 47 0 655 454 ; +C 115 ; WX 600 ; N s ; B 66 -17 608 459 ; +C 116 ; WX 600 ; N t ; B 118 -15 567 562 ; +C 117 ; WX 600 ; N u ; B 70 -15 592 439 ; +C 118 ; WX 600 ; N v ; B 70 0 695 439 ; +C 119 ; WX 600 ; N w ; B 53 0 712 439 ; +C 120 ; WX 600 ; N x ; B 6 0 671 439 ; +C 121 ; WX 600 ; N y ; B -21 -142 695 439 ; +C 122 ; WX 600 ; N z ; B 81 0 614 439 ; +C 123 ; WX 600 ; N braceleft ; B 203 -102 595 616 ; +C 124 ; WX 600 ; N bar ; B 201 -250 505 750 ; +C 125 ; WX 600 ; N braceright ; B 114 -102 506 616 ; +C 126 ; WX 600 ; N asciitilde ; B 120 153 590 356 ; +C 161 ; WX 600 ; N exclamdown ; B 196 -146 477 449 ; +C 162 ; WX 600 ; N cent ; B 121 -49 605 614 ; +C 163 ; WX 600 ; N sterling ; B 106 -28 650 611 ; +C 164 ; WX 600 ; N fraction ; B 22 -60 708 661 ; +C 165 ; WX 600 ; N yen ; B 98 0 710 562 ; +C 166 ; WX 600 ; N florin ; B -57 -131 702 616 ; +C 167 ; WX 600 ; N section ; B 74 -70 620 580 ; +C 168 ; WX 600 ; N currency ; B 77 49 644 517 ; +C 169 ; WX 600 ; N quotesingle ; B 303 277 493 562 ; +C 170 ; WX 600 ; N quotedblleft ; B 190 277 594 562 ; +C 171 ; WX 600 ; N guillemotleft ; B 62 70 639 446 ; +C 172 ; WX 600 ; N guilsinglleft ; B 195 70 545 446 ; +C 173 ; WX 600 ; N guilsinglright ; B 165 70 514 446 ; +C 174 ; WX 600 ; N fi ; B 12 0 644 626 ; +C 175 ; WX 600 ; N fl ; B 12 0 644 626 ; +C 177 ; WX 600 ; N endash ; B 108 203 602 313 ; +C 178 ; WX 600 ; N dagger ; B 175 -70 586 580 ; +C 179 ; WX 600 ; N daggerdbl ; B 121 -70 587 580 ; +C 180 ; WX 600 ; N periodcentered ; B 248 165 461 351 ; +C 182 ; WX 600 ; N paragraph ; B 61 -70 700 580 ; +C 183 ; WX 600 ; N bullet ; B 196 132 523 430 ; +C 184 ; WX 600 ; N quotesinglbase ; B 144 -142 458 143 ; +C 185 ; WX 600 ; N quotedblbase ; B 34 -142 560 143 ; +C 186 ; WX 600 ; N quotedblright ; B 119 277 645 562 ; +C 187 ; WX 600 ; N guillemotright ; B 71 70 647 446 ; +C 188 ; WX 600 ; N ellipsis ; B 35 -15 587 116 ; +C 189 ; WX 600 ; N perthousand ; B -45 -15 743 616 ; +C 191 ; WX 600 ; N questiondown ; B 100 -146 509 449 ; +C 193 ; WX 600 ; N grave ; B 272 508 503 661 ; +C 194 ; WX 600 ; N acute ; B 312 508 609 661 ; +C 195 ; WX 600 ; N circumflex ; B 212 483 607 657 ; +C 196 ; WX 600 ; N tilde ; B 199 493 643 636 ; +C 197 ; WX 600 ; N macron ; B 195 505 637 585 ; +C 198 ; WX 600 ; N breve ; B 217 468 652 631 ; +C 199 ; WX 600 ; N dotaccent ; B 348 498 493 638 ; +C 200 ; WX 600 ; N dieresis ; B 246 498 595 638 ; +C 202 ; WX 600 ; N ring ; B 319 481 528 678 ; +C 203 ; WX 600 ; N cedilla ; B 168 -206 368 0 ; +C 205 ; WX 600 ; N hungarumlaut ; B 171 488 729 661 ; +C 206 ; WX 600 ; N ogonek ; B 143 -199 367 0 ; +C 207 ; WX 600 ; N caron ; B 238 493 633 667 ; +C 208 ; WX 600 ; N emdash ; B 33 203 677 313 ; +C 225 ; WX 600 ; N AE ; B -29 0 708 562 ; +C 227 ; WX 600 ; N ordfeminine ; B 188 196 526 580 ; +C 232 ; WX 600 ; N Lslash ; B 39 0 636 562 ; +C 233 ; WX 600 ; N Oslash ; B 48 -22 673 584 ; +C 234 ; WX 600 ; N OE ; B 26 0 701 562 ; +C 235 ; WX 600 ; N ordmasculine ; B 188 196 543 580 ; +C 241 ; WX 600 ; N ae ; B 21 -15 652 454 ; +C 245 ; WX 600 ; N dotlessi ; B 77 0 546 439 ; +C 248 ; WX 600 ; N lslash ; B 77 0 587 626 ; +C 249 ; WX 600 ; N oslash ; B 54 -24 638 463 ; +C 250 ; WX 600 ; N oe ; B 18 -15 662 454 ; +C 251 ; WX 600 ; N germandbls ; B 22 -15 629 626 ; +C -1 ; WX 600 ; N Idieresis ; B 77 0 643 761 ; +C -1 ; WX 600 ; N eacute ; B 81 -15 609 661 ; +C -1 ; WX 600 ; N abreve ; B 61 -15 658 661 ; +C -1 ; WX 600 ; N uhungarumlaut ; B 70 -15 769 661 ; +C -1 ; WX 600 ; N ecaron ; B 81 -15 633 667 ; +C -1 ; WX 600 ; N Ydieresis ; B 109 0 709 761 ; +C -1 ; WX 600 ; N divide ; B 114 16 596 500 ; +C -1 ; WX 600 ; N Yacute ; B 109 0 709 784 ; +C -1 ; WX 600 ; N Acircumflex ; B -9 0 632 780 ; +C -1 ; WX 600 ; N aacute ; B 61 -15 609 661 ; +C -1 ; WX 600 ; N Ucircumflex ; B 101 -18 716 780 ; +C -1 ; WX 600 ; N yacute ; B -21 -142 695 661 ; +C -1 ; WX 600 ; N scommaaccent ; B 66 -250 608 459 ; +C -1 ; WX 600 ; N ecircumflex ; B 81 -15 607 657 ; +C -1 ; WX 600 ; N Uring ; B 101 -18 716 801 ; +C -1 ; WX 600 ; N Udieresis ; B 101 -18 716 761 ; +C -1 ; WX 600 ; N aogonek ; B 61 -199 593 454 ; +C -1 ; WX 600 ; N Uacute ; B 101 -18 716 784 ; +C -1 ; WX 600 ; N uogonek ; B 70 -199 592 439 ; +C -1 ; WX 600 ; N Edieresis ; B 25 0 670 761 ; +C -1 ; WX 600 ; N Dcroat ; B 30 0 664 562 ; +C -1 ; WX 600 ; N commaaccent ; B 151 -250 385 -57 ; +C -1 ; WX 600 ; N copyright ; B 53 -18 667 580 ; +C -1 ; WX 600 ; N Emacron ; B 25 0 670 708 ; +C -1 ; WX 600 ; N ccaron ; B 81 -15 633 667 ; +C -1 ; WX 600 ; N aring ; B 61 -15 593 678 ; +C -1 ; WX 600 ; N Ncommaaccent ; B 8 -250 730 562 ; +C -1 ; WX 600 ; N lacute ; B 77 0 639 801 ; +C -1 ; WX 600 ; N agrave ; B 61 -15 593 661 ; +C -1 ; WX 600 ; N Tcommaaccent ; B 86 -250 679 562 ; +C -1 ; WX 600 ; N Cacute ; B 74 -18 675 784 ; +C -1 ; WX 600 ; N atilde ; B 61 -15 643 636 ; +C -1 ; WX 600 ; N Edotaccent ; B 25 0 670 761 ; +C -1 ; WX 600 ; N scaron ; B 66 -17 633 667 ; +C -1 ; WX 600 ; N scedilla ; B 66 -206 608 459 ; +C -1 ; WX 600 ; N iacute ; B 77 0 609 661 ; +C -1 ; WX 600 ; N lozenge ; B 145 0 614 740 ; +C -1 ; WX 600 ; N Rcaron ; B 24 0 659 790 ; +C -1 ; WX 600 ; N Gcommaaccent ; B 74 -250 675 580 ; +C -1 ; WX 600 ; N ucircumflex ; B 70 -15 597 657 ; +C -1 ; WX 600 ; N acircumflex ; B 61 -15 607 657 ; +C -1 ; WX 600 ; N Amacron ; B -9 0 633 708 ; +C -1 ; WX 600 ; N rcaron ; B 47 0 655 667 ; +C -1 ; WX 600 ; N ccedilla ; B 81 -206 631 459 ; +C -1 ; WX 600 ; N Zdotaccent ; B 62 0 637 761 ; +C -1 ; WX 600 ; N Thorn ; B 48 0 620 562 ; +C -1 ; WX 600 ; N Omacron ; B 74 -18 663 708 ; +C -1 ; WX 600 ; N Racute ; B 24 0 665 784 ; +C -1 ; WX 600 ; N Sacute ; B 54 -22 673 784 ; +C -1 ; WX 600 ; N dcaron ; B 60 -15 861 626 ; +C -1 ; WX 600 ; N Umacron ; B 101 -18 716 708 ; +C -1 ; WX 600 ; N uring ; B 70 -15 592 678 ; +C -1 ; WX 600 ; N threesuperior ; B 193 222 526 616 ; +C -1 ; WX 600 ; N Ograve ; B 74 -18 645 784 ; +C -1 ; WX 600 ; N Agrave ; B -9 0 632 784 ; +C -1 ; WX 600 ; N Abreve ; B -9 0 684 784 ; +C -1 ; WX 600 ; N multiply ; B 104 39 606 478 ; +C -1 ; WX 600 ; N uacute ; B 70 -15 599 661 ; +C -1 ; WX 600 ; N Tcaron ; B 86 0 679 790 ; +C -1 ; WX 600 ; N partialdiff ; B 91 -38 627 728 ; +C -1 ; WX 600 ; N ydieresis ; B -21 -142 695 638 ; +C -1 ; WX 600 ; N Nacute ; B 8 -12 730 784 ; +C -1 ; WX 600 ; N icircumflex ; B 77 0 577 657 ; +C -1 ; WX 600 ; N Ecircumflex ; B 25 0 670 780 ; +C -1 ; WX 600 ; N adieresis ; B 61 -15 595 638 ; +C -1 ; WX 600 ; N edieresis ; B 81 -15 605 638 ; +C -1 ; WX 600 ; N cacute ; B 81 -15 649 661 ; +C -1 ; WX 600 ; N nacute ; B 18 0 639 661 ; +C -1 ; WX 600 ; N umacron ; B 70 -15 637 585 ; +C -1 ; WX 600 ; N Ncaron ; B 8 -12 730 790 ; +C -1 ; WX 600 ; N Iacute ; B 77 0 643 784 ; +C -1 ; WX 600 ; N plusminus ; B 76 24 614 515 ; +C -1 ; WX 600 ; N brokenbar ; B 217 -175 489 675 ; +C -1 ; WX 600 ; N registered ; B 53 -18 667 580 ; +C -1 ; WX 600 ; N Gbreve ; B 74 -18 684 784 ; +C -1 ; WX 600 ; N Idotaccent ; B 77 0 643 761 ; +C -1 ; WX 600 ; N summation ; B 15 -10 672 706 ; +C -1 ; WX 600 ; N Egrave ; B 25 0 670 784 ; +C -1 ; WX 600 ; N racute ; B 47 0 655 661 ; +C -1 ; WX 600 ; N omacron ; B 71 -15 637 585 ; +C -1 ; WX 600 ; N Zacute ; B 62 0 665 784 ; +C -1 ; WX 600 ; N Zcaron ; B 62 0 659 790 ; +C -1 ; WX 600 ; N greaterequal ; B 26 0 627 696 ; +C -1 ; WX 600 ; N Eth ; B 30 0 664 562 ; +C -1 ; WX 600 ; N Ccedilla ; B 74 -206 675 580 ; +C -1 ; WX 600 ; N lcommaaccent ; B 77 -250 546 626 ; +C -1 ; WX 600 ; N tcaron ; B 118 -15 627 703 ; +C -1 ; WX 600 ; N eogonek ; B 81 -199 605 454 ; +C -1 ; WX 600 ; N Uogonek ; B 101 -199 716 562 ; +C -1 ; WX 600 ; N Aacute ; B -9 0 655 784 ; +C -1 ; WX 600 ; N Adieresis ; B -9 0 632 761 ; +C -1 ; WX 600 ; N egrave ; B 81 -15 605 661 ; +C -1 ; WX 600 ; N zacute ; B 81 0 614 661 ; +C -1 ; WX 600 ; N iogonek ; B 77 -199 546 658 ; +C -1 ; WX 600 ; N Oacute ; B 74 -18 645 784 ; +C -1 ; WX 600 ; N oacute ; B 71 -15 649 661 ; +C -1 ; WX 600 ; N amacron ; B 61 -15 637 585 ; +C -1 ; WX 600 ; N sacute ; B 66 -17 609 661 ; +C -1 ; WX 600 ; N idieresis ; B 77 0 561 618 ; +C -1 ; WX 600 ; N Ocircumflex ; B 74 -18 645 780 ; +C -1 ; WX 600 ; N Ugrave ; B 101 -18 716 784 ; +C -1 ; WX 600 ; N Delta ; B 6 0 594 688 ; +C -1 ; WX 600 ; N thorn ; B -32 -142 622 626 ; +C -1 ; WX 600 ; N twosuperior ; B 191 230 542 616 ; +C -1 ; WX 600 ; N Odieresis ; B 74 -18 645 761 ; +C -1 ; WX 600 ; N mu ; B 49 -142 592 439 ; +C -1 ; WX 600 ; N igrave ; B 77 0 546 661 ; +C -1 ; WX 600 ; N ohungarumlaut ; B 71 -15 809 661 ; +C -1 ; WX 600 ; N Eogonek ; B 25 -199 670 562 ; +C -1 ; WX 600 ; N dcroat ; B 60 -15 712 626 ; +C -1 ; WX 600 ; N threequarters ; B 8 -60 699 661 ; +C -1 ; WX 600 ; N Scedilla ; B 54 -206 673 582 ; +C -1 ; WX 600 ; N lcaron ; B 77 0 731 626 ; +C -1 ; WX 600 ; N Kcommaaccent ; B 21 -250 692 562 ; +C -1 ; WX 600 ; N Lacute ; B 39 0 636 784 ; +C -1 ; WX 600 ; N trademark ; B 86 230 869 562 ; +C -1 ; WX 600 ; N edotaccent ; B 81 -15 605 638 ; +C -1 ; WX 600 ; N Igrave ; B 77 0 643 784 ; +C -1 ; WX 600 ; N Imacron ; B 77 0 663 708 ; +C -1 ; WX 600 ; N Lcaron ; B 39 0 757 562 ; +C -1 ; WX 600 ; N onehalf ; B 22 -60 716 661 ; +C -1 ; WX 600 ; N lessequal ; B 26 0 671 696 ; +C -1 ; WX 600 ; N ocircumflex ; B 71 -15 622 657 ; +C -1 ; WX 600 ; N ntilde ; B 18 0 643 636 ; +C -1 ; WX 600 ; N Uhungarumlaut ; B 101 -18 805 784 ; +C -1 ; WX 600 ; N Eacute ; B 25 0 670 784 ; +C -1 ; WX 600 ; N emacron ; B 81 -15 637 585 ; +C -1 ; WX 600 ; N gbreve ; B 40 -146 674 661 ; +C -1 ; WX 600 ; N onequarter ; B 13 -60 707 661 ; +C -1 ; WX 600 ; N Scaron ; B 54 -22 689 790 ; +C -1 ; WX 600 ; N Scommaaccent ; B 54 -250 673 582 ; +C -1 ; WX 600 ; N Ohungarumlaut ; B 74 -18 795 784 ; +C -1 ; WX 600 ; N degree ; B 173 243 570 616 ; +C -1 ; WX 600 ; N ograve ; B 71 -15 622 661 ; +C -1 ; WX 600 ; N Ccaron ; B 74 -18 689 790 ; +C -1 ; WX 600 ; N ugrave ; B 70 -15 592 661 ; +C -1 ; WX 600 ; N radical ; B 67 -104 635 778 ; +C -1 ; WX 600 ; N Dcaron ; B 30 0 664 790 ; +C -1 ; WX 600 ; N rcommaaccent ; B 47 -250 655 454 ; +C -1 ; WX 600 ; N Ntilde ; B 8 -12 730 759 ; +C -1 ; WX 600 ; N otilde ; B 71 -15 643 636 ; +C -1 ; WX 600 ; N Rcommaaccent ; B 24 -250 617 562 ; +C -1 ; WX 600 ; N Lcommaaccent ; B 39 -250 636 562 ; +C -1 ; WX 600 ; N Atilde ; B -9 0 669 759 ; +C -1 ; WX 600 ; N Aogonek ; B -9 -199 632 562 ; +C -1 ; WX 600 ; N Aring ; B -9 0 632 801 ; +C -1 ; WX 600 ; N Otilde ; B 74 -18 669 759 ; +C -1 ; WX 600 ; N zdotaccent ; B 81 0 614 638 ; +C -1 ; WX 600 ; N Ecaron ; B 25 0 670 790 ; +C -1 ; WX 600 ; N Iogonek ; B 77 -199 643 562 ; +C -1 ; WX 600 ; N kcommaaccent ; B 33 -250 643 626 ; +C -1 ; WX 600 ; N minus ; B 114 203 596 313 ; +C -1 ; WX 600 ; N Icircumflex ; B 77 0 643 780 ; +C -1 ; WX 600 ; N ncaron ; B 18 0 633 667 ; +C -1 ; WX 600 ; N tcommaaccent ; B 118 -250 567 562 ; +C -1 ; WX 600 ; N logicalnot ; B 135 103 617 413 ; +C -1 ; WX 600 ; N odieresis ; B 71 -15 622 638 ; +C -1 ; WX 600 ; N udieresis ; B 70 -15 595 638 ; +C -1 ; WX 600 ; N notequal ; B 30 -47 626 563 ; +C -1 ; WX 600 ; N gcommaaccent ; B 40 -146 674 714 ; +C -1 ; WX 600 ; N eth ; B 93 -27 661 626 ; +C -1 ; WX 600 ; N zcaron ; B 81 0 643 667 ; +C -1 ; WX 600 ; N ncommaaccent ; B 18 -250 615 454 ; +C -1 ; WX 600 ; N onesuperior ; B 212 230 514 616 ; +C -1 ; WX 600 ; N imacron ; B 77 0 575 585 ; +C -1 ; WX 600 ; N Euro ; B 0 0 0 0 ; +EndCharMetrics +EndFontMetrics diff --git a/pitfall/pdfkit/lib/font/data/Courier-Oblique.afm b/pitfall/pdfkit/lib/font/data/Courier-Oblique.afm new file mode 100755 index 00000000..3dc163f7 --- /dev/null +++ b/pitfall/pdfkit/lib/font/data/Courier-Oblique.afm @@ -0,0 +1,342 @@ +StartFontMetrics 4.1 +Comment Copyright (c) 1989, 1990, 1991, 1992, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. +Comment Creation Date: Thu May 1 17:37:52 1997 +Comment UniqueID 43051 +Comment VMusage 16248 75829 +FontName Courier-Oblique +FullName Courier Oblique +FamilyName Courier +Weight Medium +ItalicAngle -12 +IsFixedPitch true +CharacterSet ExtendedRoman +FontBBox -27 -250 849 805 +UnderlinePosition -100 +UnderlineThickness 50 +Version 003.000 +Notice Copyright (c) 1989, 1990, 1991, 1992, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. +EncodingScheme AdobeStandardEncoding +CapHeight 562 +XHeight 426 +Ascender 629 +Descender -157 +StdHW 51 +StdVW 51 +StartCharMetrics 315 +C 32 ; WX 600 ; N space ; B 0 0 0 0 ; +C 33 ; WX 600 ; N exclam ; B 243 -15 464 572 ; +C 34 ; WX 600 ; N quotedbl ; B 273 328 532 562 ; +C 35 ; WX 600 ; N numbersign ; B 133 -32 596 639 ; +C 36 ; WX 600 ; N dollar ; B 108 -126 596 662 ; +C 37 ; WX 600 ; N percent ; B 134 -15 599 622 ; +C 38 ; WX 600 ; N ampersand ; B 87 -15 580 543 ; +C 39 ; WX 600 ; N quoteright ; B 283 328 495 562 ; +C 40 ; WX 600 ; N parenleft ; B 313 -108 572 622 ; +C 41 ; WX 600 ; N parenright ; B 137 -108 396 622 ; +C 42 ; WX 600 ; N asterisk ; B 212 257 580 607 ; +C 43 ; WX 600 ; N plus ; B 129 44 580 470 ; +C 44 ; WX 600 ; N comma ; B 157 -112 370 122 ; +C 45 ; WX 600 ; N hyphen ; B 152 231 558 285 ; +C 46 ; WX 600 ; N period ; B 238 -15 382 109 ; +C 47 ; WX 600 ; N slash ; B 112 -80 604 629 ; +C 48 ; WX 600 ; N zero ; B 154 -15 575 622 ; +C 49 ; WX 600 ; N one ; B 98 0 515 622 ; +C 50 ; WX 600 ; N two ; B 70 0 568 622 ; +C 51 ; WX 600 ; N three ; B 82 -15 538 622 ; +C 52 ; WX 600 ; N four ; B 108 0 541 622 ; +C 53 ; WX 600 ; N five ; B 99 -15 589 607 ; +C 54 ; WX 600 ; N six ; B 155 -15 629 622 ; +C 55 ; WX 600 ; N seven ; B 182 0 612 607 ; +C 56 ; WX 600 ; N eight ; B 132 -15 588 622 ; +C 57 ; WX 600 ; N nine ; B 93 -15 574 622 ; +C 58 ; WX 600 ; N colon ; B 238 -15 441 385 ; +C 59 ; WX 600 ; N semicolon ; B 157 -112 441 385 ; +C 60 ; WX 600 ; N less ; B 96 42 610 472 ; +C 61 ; WX 600 ; N equal ; B 109 138 600 376 ; +C 62 ; WX 600 ; N greater ; B 85 42 599 472 ; +C 63 ; WX 600 ; N question ; B 222 -15 583 572 ; +C 64 ; WX 600 ; N at ; B 127 -15 582 622 ; +C 65 ; WX 600 ; N A ; B 3 0 607 562 ; +C 66 ; WX 600 ; N B ; B 43 0 616 562 ; +C 67 ; WX 600 ; N C ; B 93 -18 655 580 ; +C 68 ; WX 600 ; N D ; B 43 0 645 562 ; +C 69 ; WX 600 ; N E ; B 53 0 660 562 ; +C 70 ; WX 600 ; N F ; B 53 0 660 562 ; +C 71 ; WX 600 ; N G ; B 83 -18 645 580 ; +C 72 ; WX 600 ; N H ; B 32 0 687 562 ; +C 73 ; WX 600 ; N I ; B 96 0 623 562 ; +C 74 ; WX 600 ; N J ; B 52 -18 685 562 ; +C 75 ; WX 600 ; N K ; B 38 0 671 562 ; +C 76 ; WX 600 ; N L ; B 47 0 607 562 ; +C 77 ; WX 600 ; N M ; B 4 0 715 562 ; +C 78 ; WX 600 ; N N ; B 7 -13 712 562 ; +C 79 ; WX 600 ; N O ; B 94 -18 625 580 ; +C 80 ; WX 600 ; N P ; B 79 0 644 562 ; +C 81 ; WX 600 ; N Q ; B 95 -138 625 580 ; +C 82 ; WX 600 ; N R ; B 38 0 598 562 ; +C 83 ; WX 600 ; N S ; B 76 -20 650 580 ; +C 84 ; WX 600 ; N T ; B 108 0 665 562 ; +C 85 ; WX 600 ; N U ; B 125 -18 702 562 ; +C 86 ; WX 600 ; N V ; B 105 -13 723 562 ; +C 87 ; WX 600 ; N W ; B 106 -13 722 562 ; +C 88 ; WX 600 ; N X ; B 23 0 675 562 ; +C 89 ; WX 600 ; N Y ; B 133 0 695 562 ; +C 90 ; WX 600 ; N Z ; B 86 0 610 562 ; +C 91 ; WX 600 ; N bracketleft ; B 246 -108 574 622 ; +C 92 ; WX 600 ; N backslash ; B 249 -80 468 629 ; +C 93 ; WX 600 ; N bracketright ; B 135 -108 463 622 ; +C 94 ; WX 600 ; N asciicircum ; B 175 354 587 622 ; +C 95 ; WX 600 ; N underscore ; B -27 -125 584 -75 ; +C 96 ; WX 600 ; N quoteleft ; B 343 328 457 562 ; +C 97 ; WX 600 ; N a ; B 76 -15 569 441 ; +C 98 ; WX 600 ; N b ; B 29 -15 625 629 ; +C 99 ; WX 600 ; N c ; B 106 -15 608 441 ; +C 100 ; WX 600 ; N d ; B 85 -15 640 629 ; +C 101 ; WX 600 ; N e ; B 106 -15 598 441 ; +C 102 ; WX 600 ; N f ; B 114 0 662 629 ; L i fi ; L l fl ; +C 103 ; WX 600 ; N g ; B 61 -157 657 441 ; +C 104 ; WX 600 ; N h ; B 33 0 592 629 ; +C 105 ; WX 600 ; N i ; B 95 0 515 657 ; +C 106 ; WX 600 ; N j ; B 52 -157 550 657 ; +C 107 ; WX 600 ; N k ; B 58 0 633 629 ; +C 108 ; WX 600 ; N l ; B 95 0 515 629 ; +C 109 ; WX 600 ; N m ; B -5 0 615 441 ; +C 110 ; WX 600 ; N n ; B 26 0 585 441 ; +C 111 ; WX 600 ; N o ; B 102 -15 588 441 ; +C 112 ; WX 600 ; N p ; B -24 -157 605 441 ; +C 113 ; WX 600 ; N q ; B 85 -157 682 441 ; +C 114 ; WX 600 ; N r ; B 60 0 636 441 ; +C 115 ; WX 600 ; N s ; B 78 -15 584 441 ; +C 116 ; WX 600 ; N t ; B 167 -15 561 561 ; +C 117 ; WX 600 ; N u ; B 101 -15 572 426 ; +C 118 ; WX 600 ; N v ; B 90 -10 681 426 ; +C 119 ; WX 600 ; N w ; B 76 -10 695 426 ; +C 120 ; WX 600 ; N x ; B 20 0 655 426 ; +C 121 ; WX 600 ; N y ; B -4 -157 683 426 ; +C 122 ; WX 600 ; N z ; B 99 0 593 426 ; +C 123 ; WX 600 ; N braceleft ; B 233 -108 569 622 ; +C 124 ; WX 600 ; N bar ; B 222 -250 485 750 ; +C 125 ; WX 600 ; N braceright ; B 140 -108 477 622 ; +C 126 ; WX 600 ; N asciitilde ; B 116 197 600 320 ; +C 161 ; WX 600 ; N exclamdown ; B 225 -157 445 430 ; +C 162 ; WX 600 ; N cent ; B 151 -49 588 614 ; +C 163 ; WX 600 ; N sterling ; B 124 -21 621 611 ; +C 164 ; WX 600 ; N fraction ; B 84 -57 646 665 ; +C 165 ; WX 600 ; N yen ; B 120 0 693 562 ; +C 166 ; WX 600 ; N florin ; B -26 -143 671 622 ; +C 167 ; WX 600 ; N section ; B 104 -78 590 580 ; +C 168 ; WX 600 ; N currency ; B 94 58 628 506 ; +C 169 ; WX 600 ; N quotesingle ; B 345 328 460 562 ; +C 170 ; WX 600 ; N quotedblleft ; B 262 328 541 562 ; +C 171 ; WX 600 ; N guillemotleft ; B 92 70 652 446 ; +C 172 ; WX 600 ; N guilsinglleft ; B 204 70 540 446 ; +C 173 ; WX 600 ; N guilsinglright ; B 170 70 506 446 ; +C 174 ; WX 600 ; N fi ; B 3 0 619 629 ; +C 175 ; WX 600 ; N fl ; B 3 0 619 629 ; +C 177 ; WX 600 ; N endash ; B 124 231 586 285 ; +C 178 ; WX 600 ; N dagger ; B 217 -78 546 580 ; +C 179 ; WX 600 ; N daggerdbl ; B 163 -78 546 580 ; +C 180 ; WX 600 ; N periodcentered ; B 275 189 434 327 ; +C 182 ; WX 600 ; N paragraph ; B 100 -78 630 562 ; +C 183 ; WX 600 ; N bullet ; B 224 130 485 383 ; +C 184 ; WX 600 ; N quotesinglbase ; B 185 -134 397 100 ; +C 185 ; WX 600 ; N quotedblbase ; B 115 -134 478 100 ; +C 186 ; WX 600 ; N quotedblright ; B 213 328 576 562 ; +C 187 ; WX 600 ; N guillemotright ; B 58 70 618 446 ; +C 188 ; WX 600 ; N ellipsis ; B 46 -15 575 111 ; +C 189 ; WX 600 ; N perthousand ; B 59 -15 627 622 ; +C 191 ; WX 600 ; N questiondown ; B 105 -157 466 430 ; +C 193 ; WX 600 ; N grave ; B 294 497 484 672 ; +C 194 ; WX 600 ; N acute ; B 348 497 612 672 ; +C 195 ; WX 600 ; N circumflex ; B 229 477 581 654 ; +C 196 ; WX 600 ; N tilde ; B 212 489 629 606 ; +C 197 ; WX 600 ; N macron ; B 232 525 600 565 ; +C 198 ; WX 600 ; N breve ; B 279 501 576 609 ; +C 199 ; WX 600 ; N dotaccent ; B 373 537 478 640 ; +C 200 ; WX 600 ; N dieresis ; B 272 537 579 640 ; +C 202 ; WX 600 ; N ring ; B 332 463 500 627 ; +C 203 ; WX 600 ; N cedilla ; B 197 -151 344 10 ; +C 205 ; WX 600 ; N hungarumlaut ; B 239 497 683 672 ; +C 206 ; WX 600 ; N ogonek ; B 189 -172 377 4 ; +C 207 ; WX 600 ; N caron ; B 262 492 614 669 ; +C 208 ; WX 600 ; N emdash ; B 49 231 661 285 ; +C 225 ; WX 600 ; N AE ; B 3 0 655 562 ; +C 227 ; WX 600 ; N ordfeminine ; B 209 249 512 580 ; +C 232 ; WX 600 ; N Lslash ; B 47 0 607 562 ; +C 233 ; WX 600 ; N Oslash ; B 94 -80 625 629 ; +C 234 ; WX 600 ; N OE ; B 59 0 672 562 ; +C 235 ; WX 600 ; N ordmasculine ; B 210 249 535 580 ; +C 241 ; WX 600 ; N ae ; B 41 -15 626 441 ; +C 245 ; WX 600 ; N dotlessi ; B 95 0 515 426 ; +C 248 ; WX 600 ; N lslash ; B 95 0 587 629 ; +C 249 ; WX 600 ; N oslash ; B 102 -80 588 506 ; +C 250 ; WX 600 ; N oe ; B 54 -15 615 441 ; +C 251 ; WX 600 ; N germandbls ; B 48 -15 617 629 ; +C -1 ; WX 600 ; N Idieresis ; B 96 0 623 753 ; +C -1 ; WX 600 ; N eacute ; B 106 -15 612 672 ; +C -1 ; WX 600 ; N abreve ; B 76 -15 576 609 ; +C -1 ; WX 600 ; N uhungarumlaut ; B 101 -15 723 672 ; +C -1 ; WX 600 ; N ecaron ; B 106 -15 614 669 ; +C -1 ; WX 600 ; N Ydieresis ; B 133 0 695 753 ; +C -1 ; WX 600 ; N divide ; B 136 48 573 467 ; +C -1 ; WX 600 ; N Yacute ; B 133 0 695 805 ; +C -1 ; WX 600 ; N Acircumflex ; B 3 0 607 787 ; +C -1 ; WX 600 ; N aacute ; B 76 -15 612 672 ; +C -1 ; WX 600 ; N Ucircumflex ; B 125 -18 702 787 ; +C -1 ; WX 600 ; N yacute ; B -4 -157 683 672 ; +C -1 ; WX 600 ; N scommaaccent ; B 78 -250 584 441 ; +C -1 ; WX 600 ; N ecircumflex ; B 106 -15 598 654 ; +C -1 ; WX 600 ; N Uring ; B 125 -18 702 760 ; +C -1 ; WX 600 ; N Udieresis ; B 125 -18 702 753 ; +C -1 ; WX 600 ; N aogonek ; B 76 -172 569 441 ; +C -1 ; WX 600 ; N Uacute ; B 125 -18 702 805 ; +C -1 ; WX 600 ; N uogonek ; B 101 -172 572 426 ; +C -1 ; WX 600 ; N Edieresis ; B 53 0 660 753 ; +C -1 ; WX 600 ; N Dcroat ; B 43 0 645 562 ; +C -1 ; WX 600 ; N commaaccent ; B 145 -250 323 -58 ; +C -1 ; WX 600 ; N copyright ; B 53 -18 667 580 ; +C -1 ; WX 600 ; N Emacron ; B 53 0 660 698 ; +C -1 ; WX 600 ; N ccaron ; B 106 -15 614 669 ; +C -1 ; WX 600 ; N aring ; B 76 -15 569 627 ; +C -1 ; WX 600 ; N Ncommaaccent ; B 7 -250 712 562 ; +C -1 ; WX 600 ; N lacute ; B 95 0 640 805 ; +C -1 ; WX 600 ; N agrave ; B 76 -15 569 672 ; +C -1 ; WX 600 ; N Tcommaaccent ; B 108 -250 665 562 ; +C -1 ; WX 600 ; N Cacute ; B 93 -18 655 805 ; +C -1 ; WX 600 ; N atilde ; B 76 -15 629 606 ; +C -1 ; WX 600 ; N Edotaccent ; B 53 0 660 753 ; +C -1 ; WX 600 ; N scaron ; B 78 -15 614 669 ; +C -1 ; WX 600 ; N scedilla ; B 78 -151 584 441 ; +C -1 ; WX 600 ; N iacute ; B 95 0 612 672 ; +C -1 ; WX 600 ; N lozenge ; B 94 0 519 706 ; +C -1 ; WX 600 ; N Rcaron ; B 38 0 642 802 ; +C -1 ; WX 600 ; N Gcommaaccent ; B 83 -250 645 580 ; +C -1 ; WX 600 ; N ucircumflex ; B 101 -15 572 654 ; +C -1 ; WX 600 ; N acircumflex ; B 76 -15 581 654 ; +C -1 ; WX 600 ; N Amacron ; B 3 0 607 698 ; +C -1 ; WX 600 ; N rcaron ; B 60 0 636 669 ; +C -1 ; WX 600 ; N ccedilla ; B 106 -151 614 441 ; +C -1 ; WX 600 ; N Zdotaccent ; B 86 0 610 753 ; +C -1 ; WX 600 ; N Thorn ; B 79 0 606 562 ; +C -1 ; WX 600 ; N Omacron ; B 94 -18 628 698 ; +C -1 ; WX 600 ; N Racute ; B 38 0 670 805 ; +C -1 ; WX 600 ; N Sacute ; B 76 -20 650 805 ; +C -1 ; WX 600 ; N dcaron ; B 85 -15 849 629 ; +C -1 ; WX 600 ; N Umacron ; B 125 -18 702 698 ; +C -1 ; WX 600 ; N uring ; B 101 -15 572 627 ; +C -1 ; WX 600 ; N threesuperior ; B 213 240 501 622 ; +C -1 ; WX 600 ; N Ograve ; B 94 -18 625 805 ; +C -1 ; WX 600 ; N Agrave ; B 3 0 607 805 ; +C -1 ; WX 600 ; N Abreve ; B 3 0 607 732 ; +C -1 ; WX 600 ; N multiply ; B 103 43 607 470 ; +C -1 ; WX 600 ; N uacute ; B 101 -15 602 672 ; +C -1 ; WX 600 ; N Tcaron ; B 108 0 665 802 ; +C -1 ; WX 600 ; N partialdiff ; B 45 -38 546 710 ; +C -1 ; WX 600 ; N ydieresis ; B -4 -157 683 620 ; +C -1 ; WX 600 ; N Nacute ; B 7 -13 712 805 ; +C -1 ; WX 600 ; N icircumflex ; B 95 0 551 654 ; +C -1 ; WX 600 ; N Ecircumflex ; B 53 0 660 787 ; +C -1 ; WX 600 ; N adieresis ; B 76 -15 575 620 ; +C -1 ; WX 600 ; N edieresis ; B 106 -15 598 620 ; +C -1 ; WX 600 ; N cacute ; B 106 -15 612 672 ; +C -1 ; WX 600 ; N nacute ; B 26 0 602 672 ; +C -1 ; WX 600 ; N umacron ; B 101 -15 600 565 ; +C -1 ; WX 600 ; N Ncaron ; B 7 -13 712 802 ; +C -1 ; WX 600 ; N Iacute ; B 96 0 640 805 ; +C -1 ; WX 600 ; N plusminus ; B 96 44 594 558 ; +C -1 ; WX 600 ; N brokenbar ; B 238 -175 469 675 ; +C -1 ; WX 600 ; N registered ; B 53 -18 667 580 ; +C -1 ; WX 600 ; N Gbreve ; B 83 -18 645 732 ; +C -1 ; WX 600 ; N Idotaccent ; B 96 0 623 753 ; +C -1 ; WX 600 ; N summation ; B 15 -10 670 706 ; +C -1 ; WX 600 ; N Egrave ; B 53 0 660 805 ; +C -1 ; WX 600 ; N racute ; B 60 0 636 672 ; +C -1 ; WX 600 ; N omacron ; B 102 -15 600 565 ; +C -1 ; WX 600 ; N Zacute ; B 86 0 670 805 ; +C -1 ; WX 600 ; N Zcaron ; B 86 0 642 802 ; +C -1 ; WX 600 ; N greaterequal ; B 98 0 594 710 ; +C -1 ; WX 600 ; N Eth ; B 43 0 645 562 ; +C -1 ; WX 600 ; N Ccedilla ; B 93 -151 658 580 ; +C -1 ; WX 600 ; N lcommaaccent ; B 95 -250 515 629 ; +C -1 ; WX 600 ; N tcaron ; B 167 -15 587 717 ; +C -1 ; WX 600 ; N eogonek ; B 106 -172 598 441 ; +C -1 ; WX 600 ; N Uogonek ; B 124 -172 702 562 ; +C -1 ; WX 600 ; N Aacute ; B 3 0 660 805 ; +C -1 ; WX 600 ; N Adieresis ; B 3 0 607 753 ; +C -1 ; WX 600 ; N egrave ; B 106 -15 598 672 ; +C -1 ; WX 600 ; N zacute ; B 99 0 612 672 ; +C -1 ; WX 600 ; N iogonek ; B 95 -172 515 657 ; +C -1 ; WX 600 ; N Oacute ; B 94 -18 640 805 ; +C -1 ; WX 600 ; N oacute ; B 102 -15 612 672 ; +C -1 ; WX 600 ; N amacron ; B 76 -15 600 565 ; +C -1 ; WX 600 ; N sacute ; B 78 -15 612 672 ; +C -1 ; WX 600 ; N idieresis ; B 95 0 545 620 ; +C -1 ; WX 600 ; N Ocircumflex ; B 94 -18 625 787 ; +C -1 ; WX 600 ; N Ugrave ; B 125 -18 702 805 ; +C -1 ; WX 600 ; N Delta ; B 6 0 598 688 ; +C -1 ; WX 600 ; N thorn ; B -24 -157 605 629 ; +C -1 ; WX 600 ; N twosuperior ; B 230 249 535 622 ; +C -1 ; WX 600 ; N Odieresis ; B 94 -18 625 753 ; +C -1 ; WX 600 ; N mu ; B 72 -157 572 426 ; +C -1 ; WX 600 ; N igrave ; B 95 0 515 672 ; +C -1 ; WX 600 ; N ohungarumlaut ; B 102 -15 723 672 ; +C -1 ; WX 600 ; N Eogonek ; B 53 -172 660 562 ; +C -1 ; WX 600 ; N dcroat ; B 85 -15 704 629 ; +C -1 ; WX 600 ; N threequarters ; B 73 -56 659 666 ; +C -1 ; WX 600 ; N Scedilla ; B 76 -151 650 580 ; +C -1 ; WX 600 ; N lcaron ; B 95 0 667 629 ; +C -1 ; WX 600 ; N Kcommaaccent ; B 38 -250 671 562 ; +C -1 ; WX 600 ; N Lacute ; B 47 0 607 805 ; +C -1 ; WX 600 ; N trademark ; B 75 263 742 562 ; +C -1 ; WX 600 ; N edotaccent ; B 106 -15 598 620 ; +C -1 ; WX 600 ; N Igrave ; B 96 0 623 805 ; +C -1 ; WX 600 ; N Imacron ; B 96 0 628 698 ; +C -1 ; WX 600 ; N Lcaron ; B 47 0 632 562 ; +C -1 ; WX 600 ; N onehalf ; B 65 -57 669 665 ; +C -1 ; WX 600 ; N lessequal ; B 98 0 645 710 ; +C -1 ; WX 600 ; N ocircumflex ; B 102 -15 588 654 ; +C -1 ; WX 600 ; N ntilde ; B 26 0 629 606 ; +C -1 ; WX 600 ; N Uhungarumlaut ; B 125 -18 761 805 ; +C -1 ; WX 600 ; N Eacute ; B 53 0 670 805 ; +C -1 ; WX 600 ; N emacron ; B 106 -15 600 565 ; +C -1 ; WX 600 ; N gbreve ; B 61 -157 657 609 ; +C -1 ; WX 600 ; N onequarter ; B 65 -57 674 665 ; +C -1 ; WX 600 ; N Scaron ; B 76 -20 672 802 ; +C -1 ; WX 600 ; N Scommaaccent ; B 76 -250 650 580 ; +C -1 ; WX 600 ; N Ohungarumlaut ; B 94 -18 751 805 ; +C -1 ; WX 600 ; N degree ; B 214 269 576 622 ; +C -1 ; WX 600 ; N ograve ; B 102 -15 588 672 ; +C -1 ; WX 600 ; N Ccaron ; B 93 -18 672 802 ; +C -1 ; WX 600 ; N ugrave ; B 101 -15 572 672 ; +C -1 ; WX 600 ; N radical ; B 85 -15 765 792 ; +C -1 ; WX 600 ; N Dcaron ; B 43 0 645 802 ; +C -1 ; WX 600 ; N rcommaaccent ; B 60 -250 636 441 ; +C -1 ; WX 600 ; N Ntilde ; B 7 -13 712 729 ; +C -1 ; WX 600 ; N otilde ; B 102 -15 629 606 ; +C -1 ; WX 600 ; N Rcommaaccent ; B 38 -250 598 562 ; +C -1 ; WX 600 ; N Lcommaaccent ; B 47 -250 607 562 ; +C -1 ; WX 600 ; N Atilde ; B 3 0 655 729 ; +C -1 ; WX 600 ; N Aogonek ; B 3 -172 607 562 ; +C -1 ; WX 600 ; N Aring ; B 3 0 607 750 ; +C -1 ; WX 600 ; N Otilde ; B 94 -18 655 729 ; +C -1 ; WX 600 ; N zdotaccent ; B 99 0 593 620 ; +C -1 ; WX 600 ; N Ecaron ; B 53 0 660 802 ; +C -1 ; WX 600 ; N Iogonek ; B 96 -172 623 562 ; +C -1 ; WX 600 ; N kcommaaccent ; B 58 -250 633 629 ; +C -1 ; WX 600 ; N minus ; B 129 232 580 283 ; +C -1 ; WX 600 ; N Icircumflex ; B 96 0 623 787 ; +C -1 ; WX 600 ; N ncaron ; B 26 0 614 669 ; +C -1 ; WX 600 ; N tcommaaccent ; B 165 -250 561 561 ; +C -1 ; WX 600 ; N logicalnot ; B 155 108 591 369 ; +C -1 ; WX 600 ; N odieresis ; B 102 -15 588 620 ; +C -1 ; WX 600 ; N udieresis ; B 101 -15 575 620 ; +C -1 ; WX 600 ; N notequal ; B 43 -16 621 529 ; +C -1 ; WX 600 ; N gcommaaccent ; B 61 -157 657 708 ; +C -1 ; WX 600 ; N eth ; B 102 -15 639 629 ; +C -1 ; WX 600 ; N zcaron ; B 99 0 624 669 ; +C -1 ; WX 600 ; N ncommaaccent ; B 26 -250 585 441 ; +C -1 ; WX 600 ; N onesuperior ; B 231 249 491 622 ; +C -1 ; WX 600 ; N imacron ; B 95 0 543 565 ; +C -1 ; WX 600 ; N Euro ; B 0 0 0 0 ; +EndCharMetrics +EndFontMetrics diff --git a/pitfall/pdfkit/lib/font/data/Courier.afm b/pitfall/pdfkit/lib/font/data/Courier.afm new file mode 100755 index 00000000..2f7be81d --- /dev/null +++ b/pitfall/pdfkit/lib/font/data/Courier.afm @@ -0,0 +1,342 @@ +StartFontMetrics 4.1 +Comment Copyright (c) 1989, 1990, 1991, 1992, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. +Comment Creation Date: Thu May 1 17:27:09 1997 +Comment UniqueID 43050 +Comment VMusage 39754 50779 +FontName Courier +FullName Courier +FamilyName Courier +Weight Medium +ItalicAngle 0 +IsFixedPitch true +CharacterSet ExtendedRoman +FontBBox -23 -250 715 805 +UnderlinePosition -100 +UnderlineThickness 50 +Version 003.000 +Notice Copyright (c) 1989, 1990, 1991, 1992, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. +EncodingScheme AdobeStandardEncoding +CapHeight 562 +XHeight 426 +Ascender 629 +Descender -157 +StdHW 51 +StdVW 51 +StartCharMetrics 315 +C 32 ; WX 600 ; N space ; B 0 0 0 0 ; +C 33 ; WX 600 ; N exclam ; B 236 -15 364 572 ; +C 34 ; WX 600 ; N quotedbl ; B 187 328 413 562 ; +C 35 ; WX 600 ; N numbersign ; B 93 -32 507 639 ; +C 36 ; WX 600 ; N dollar ; B 105 -126 496 662 ; +C 37 ; WX 600 ; N percent ; B 81 -15 518 622 ; +C 38 ; WX 600 ; N ampersand ; B 63 -15 538 543 ; +C 39 ; WX 600 ; N quoteright ; B 213 328 376 562 ; +C 40 ; WX 600 ; N parenleft ; B 269 -108 440 622 ; +C 41 ; WX 600 ; N parenright ; B 160 -108 331 622 ; +C 42 ; WX 600 ; N asterisk ; B 116 257 484 607 ; +C 43 ; WX 600 ; N plus ; B 80 44 520 470 ; +C 44 ; WX 600 ; N comma ; B 181 -112 344 122 ; +C 45 ; WX 600 ; N hyphen ; B 103 231 497 285 ; +C 46 ; WX 600 ; N period ; B 229 -15 371 109 ; +C 47 ; WX 600 ; N slash ; B 125 -80 475 629 ; +C 48 ; WX 600 ; N zero ; B 106 -15 494 622 ; +C 49 ; WX 600 ; N one ; B 96 0 505 622 ; +C 50 ; WX 600 ; N two ; B 70 0 471 622 ; +C 51 ; WX 600 ; N three ; B 75 -15 466 622 ; +C 52 ; WX 600 ; N four ; B 78 0 500 622 ; +C 53 ; WX 600 ; N five ; B 92 -15 497 607 ; +C 54 ; WX 600 ; N six ; B 111 -15 497 622 ; +C 55 ; WX 600 ; N seven ; B 82 0 483 607 ; +C 56 ; WX 600 ; N eight ; B 102 -15 498 622 ; +C 57 ; WX 600 ; N nine ; B 96 -15 489 622 ; +C 58 ; WX 600 ; N colon ; B 229 -15 371 385 ; +C 59 ; WX 600 ; N semicolon ; B 181 -112 371 385 ; +C 60 ; WX 600 ; N less ; B 41 42 519 472 ; +C 61 ; WX 600 ; N equal ; B 80 138 520 376 ; +C 62 ; WX 600 ; N greater ; B 66 42 544 472 ; +C 63 ; WX 600 ; N question ; B 129 -15 492 572 ; +C 64 ; WX 600 ; N at ; B 77 -15 533 622 ; +C 65 ; WX 600 ; N A ; B 3 0 597 562 ; +C 66 ; WX 600 ; N B ; B 43 0 559 562 ; +C 67 ; WX 600 ; N C ; B 41 -18 540 580 ; +C 68 ; WX 600 ; N D ; B 43 0 574 562 ; +C 69 ; WX 600 ; N E ; B 53 0 550 562 ; +C 70 ; WX 600 ; N F ; B 53 0 545 562 ; +C 71 ; WX 600 ; N G ; B 31 -18 575 580 ; +C 72 ; WX 600 ; N H ; B 32 0 568 562 ; +C 73 ; WX 600 ; N I ; B 96 0 504 562 ; +C 74 ; WX 600 ; N J ; B 34 -18 566 562 ; +C 75 ; WX 600 ; N K ; B 38 0 582 562 ; +C 76 ; WX 600 ; N L ; B 47 0 554 562 ; +C 77 ; WX 600 ; N M ; B 4 0 596 562 ; +C 78 ; WX 600 ; N N ; B 7 -13 593 562 ; +C 79 ; WX 600 ; N O ; B 43 -18 557 580 ; +C 80 ; WX 600 ; N P ; B 79 0 558 562 ; +C 81 ; WX 600 ; N Q ; B 43 -138 557 580 ; +C 82 ; WX 600 ; N R ; B 38 0 588 562 ; +C 83 ; WX 600 ; N S ; B 72 -20 529 580 ; +C 84 ; WX 600 ; N T ; B 38 0 563 562 ; +C 85 ; WX 600 ; N U ; B 17 -18 583 562 ; +C 86 ; WX 600 ; N V ; B -4 -13 604 562 ; +C 87 ; WX 600 ; N W ; B -3 -13 603 562 ; +C 88 ; WX 600 ; N X ; B 23 0 577 562 ; +C 89 ; WX 600 ; N Y ; B 24 0 576 562 ; +C 90 ; WX 600 ; N Z ; B 86 0 514 562 ; +C 91 ; WX 600 ; N bracketleft ; B 269 -108 442 622 ; +C 92 ; WX 600 ; N backslash ; B 118 -80 482 629 ; +C 93 ; WX 600 ; N bracketright ; B 158 -108 331 622 ; +C 94 ; WX 600 ; N asciicircum ; B 94 354 506 622 ; +C 95 ; WX 600 ; N underscore ; B 0 -125 600 -75 ; +C 96 ; WX 600 ; N quoteleft ; B 224 328 387 562 ; +C 97 ; WX 600 ; N a ; B 53 -15 559 441 ; +C 98 ; WX 600 ; N b ; B 14 -15 575 629 ; +C 99 ; WX 600 ; N c ; B 66 -15 529 441 ; +C 100 ; WX 600 ; N d ; B 45 -15 591 629 ; +C 101 ; WX 600 ; N e ; B 66 -15 548 441 ; +C 102 ; WX 600 ; N f ; B 114 0 531 629 ; L i fi ; L l fl ; +C 103 ; WX 600 ; N g ; B 45 -157 566 441 ; +C 104 ; WX 600 ; N h ; B 18 0 582 629 ; +C 105 ; WX 600 ; N i ; B 95 0 505 657 ; +C 106 ; WX 600 ; N j ; B 82 -157 410 657 ; +C 107 ; WX 600 ; N k ; B 43 0 580 629 ; +C 108 ; WX 600 ; N l ; B 95 0 505 629 ; +C 109 ; WX 600 ; N m ; B -5 0 605 441 ; +C 110 ; WX 600 ; N n ; B 26 0 575 441 ; +C 111 ; WX 600 ; N o ; B 62 -15 538 441 ; +C 112 ; WX 600 ; N p ; B 9 -157 555 441 ; +C 113 ; WX 600 ; N q ; B 45 -157 591 441 ; +C 114 ; WX 600 ; N r ; B 60 0 559 441 ; +C 115 ; WX 600 ; N s ; B 80 -15 513 441 ; +C 116 ; WX 600 ; N t ; B 87 -15 530 561 ; +C 117 ; WX 600 ; N u ; B 21 -15 562 426 ; +C 118 ; WX 600 ; N v ; B 10 -10 590 426 ; +C 119 ; WX 600 ; N w ; B -4 -10 604 426 ; +C 120 ; WX 600 ; N x ; B 20 0 580 426 ; +C 121 ; WX 600 ; N y ; B 7 -157 592 426 ; +C 122 ; WX 600 ; N z ; B 99 0 502 426 ; +C 123 ; WX 600 ; N braceleft ; B 182 -108 437 622 ; +C 124 ; WX 600 ; N bar ; B 275 -250 326 750 ; +C 125 ; WX 600 ; N braceright ; B 163 -108 418 622 ; +C 126 ; WX 600 ; N asciitilde ; B 63 197 540 320 ; +C 161 ; WX 600 ; N exclamdown ; B 236 -157 364 430 ; +C 162 ; WX 600 ; N cent ; B 96 -49 500 614 ; +C 163 ; WX 600 ; N sterling ; B 84 -21 521 611 ; +C 164 ; WX 600 ; N fraction ; B 92 -57 509 665 ; +C 165 ; WX 600 ; N yen ; B 26 0 574 562 ; +C 166 ; WX 600 ; N florin ; B 4 -143 539 622 ; +C 167 ; WX 600 ; N section ; B 113 -78 488 580 ; +C 168 ; WX 600 ; N currency ; B 73 58 527 506 ; +C 169 ; WX 600 ; N quotesingle ; B 259 328 341 562 ; +C 170 ; WX 600 ; N quotedblleft ; B 143 328 471 562 ; +C 171 ; WX 600 ; N guillemotleft ; B 37 70 563 446 ; +C 172 ; WX 600 ; N guilsinglleft ; B 149 70 451 446 ; +C 173 ; WX 600 ; N guilsinglright ; B 149 70 451 446 ; +C 174 ; WX 600 ; N fi ; B 3 0 597 629 ; +C 175 ; WX 600 ; N fl ; B 3 0 597 629 ; +C 177 ; WX 600 ; N endash ; B 75 231 525 285 ; +C 178 ; WX 600 ; N dagger ; B 141 -78 459 580 ; +C 179 ; WX 600 ; N daggerdbl ; B 141 -78 459 580 ; +C 180 ; WX 600 ; N periodcentered ; B 222 189 378 327 ; +C 182 ; WX 600 ; N paragraph ; B 50 -78 511 562 ; +C 183 ; WX 600 ; N bullet ; B 172 130 428 383 ; +C 184 ; WX 600 ; N quotesinglbase ; B 213 -134 376 100 ; +C 185 ; WX 600 ; N quotedblbase ; B 143 -134 457 100 ; +C 186 ; WX 600 ; N quotedblright ; B 143 328 457 562 ; +C 187 ; WX 600 ; N guillemotright ; B 37 70 563 446 ; +C 188 ; WX 600 ; N ellipsis ; B 37 -15 563 111 ; +C 189 ; WX 600 ; N perthousand ; B 3 -15 600 622 ; +C 191 ; WX 600 ; N questiondown ; B 108 -157 471 430 ; +C 193 ; WX 600 ; N grave ; B 151 497 378 672 ; +C 194 ; WX 600 ; N acute ; B 242 497 469 672 ; +C 195 ; WX 600 ; N circumflex ; B 124 477 476 654 ; +C 196 ; WX 600 ; N tilde ; B 105 489 503 606 ; +C 197 ; WX 600 ; N macron ; B 120 525 480 565 ; +C 198 ; WX 600 ; N breve ; B 153 501 447 609 ; +C 199 ; WX 600 ; N dotaccent ; B 249 537 352 640 ; +C 200 ; WX 600 ; N dieresis ; B 148 537 453 640 ; +C 202 ; WX 600 ; N ring ; B 218 463 382 627 ; +C 203 ; WX 600 ; N cedilla ; B 224 -151 362 10 ; +C 205 ; WX 600 ; N hungarumlaut ; B 133 497 540 672 ; +C 206 ; WX 600 ; N ogonek ; B 211 -172 407 4 ; +C 207 ; WX 600 ; N caron ; B 124 492 476 669 ; +C 208 ; WX 600 ; N emdash ; B 0 231 600 285 ; +C 225 ; WX 600 ; N AE ; B 3 0 550 562 ; +C 227 ; WX 600 ; N ordfeminine ; B 156 249 442 580 ; +C 232 ; WX 600 ; N Lslash ; B 47 0 554 562 ; +C 233 ; WX 600 ; N Oslash ; B 43 -80 557 629 ; +C 234 ; WX 600 ; N OE ; B 7 0 567 562 ; +C 235 ; WX 600 ; N ordmasculine ; B 157 249 443 580 ; +C 241 ; WX 600 ; N ae ; B 19 -15 570 441 ; +C 245 ; WX 600 ; N dotlessi ; B 95 0 505 426 ; +C 248 ; WX 600 ; N lslash ; B 95 0 505 629 ; +C 249 ; WX 600 ; N oslash ; B 62 -80 538 506 ; +C 250 ; WX 600 ; N oe ; B 19 -15 559 441 ; +C 251 ; WX 600 ; N germandbls ; B 48 -15 588 629 ; +C -1 ; WX 600 ; N Idieresis ; B 96 0 504 753 ; +C -1 ; WX 600 ; N eacute ; B 66 -15 548 672 ; +C -1 ; WX 600 ; N abreve ; B 53 -15 559 609 ; +C -1 ; WX 600 ; N uhungarumlaut ; B 21 -15 580 672 ; +C -1 ; WX 600 ; N ecaron ; B 66 -15 548 669 ; +C -1 ; WX 600 ; N Ydieresis ; B 24 0 576 753 ; +C -1 ; WX 600 ; N divide ; B 87 48 513 467 ; +C -1 ; WX 600 ; N Yacute ; B 24 0 576 805 ; +C -1 ; WX 600 ; N Acircumflex ; B 3 0 597 787 ; +C -1 ; WX 600 ; N aacute ; B 53 -15 559 672 ; +C -1 ; WX 600 ; N Ucircumflex ; B 17 -18 583 787 ; +C -1 ; WX 600 ; N yacute ; B 7 -157 592 672 ; +C -1 ; WX 600 ; N scommaaccent ; B 80 -250 513 441 ; +C -1 ; WX 600 ; N ecircumflex ; B 66 -15 548 654 ; +C -1 ; WX 600 ; N Uring ; B 17 -18 583 760 ; +C -1 ; WX 600 ; N Udieresis ; B 17 -18 583 753 ; +C -1 ; WX 600 ; N aogonek ; B 53 -172 587 441 ; +C -1 ; WX 600 ; N Uacute ; B 17 -18 583 805 ; +C -1 ; WX 600 ; N uogonek ; B 21 -172 590 426 ; +C -1 ; WX 600 ; N Edieresis ; B 53 0 550 753 ; +C -1 ; WX 600 ; N Dcroat ; B 30 0 574 562 ; +C -1 ; WX 600 ; N commaaccent ; B 198 -250 335 -58 ; +C -1 ; WX 600 ; N copyright ; B 0 -18 600 580 ; +C -1 ; WX 600 ; N Emacron ; B 53 0 550 698 ; +C -1 ; WX 600 ; N ccaron ; B 66 -15 529 669 ; +C -1 ; WX 600 ; N aring ; B 53 -15 559 627 ; +C -1 ; WX 600 ; N Ncommaaccent ; B 7 -250 593 562 ; +C -1 ; WX 600 ; N lacute ; B 95 0 505 805 ; +C -1 ; WX 600 ; N agrave ; B 53 -15 559 672 ; +C -1 ; WX 600 ; N Tcommaaccent ; B 38 -250 563 562 ; +C -1 ; WX 600 ; N Cacute ; B 41 -18 540 805 ; +C -1 ; WX 600 ; N atilde ; B 53 -15 559 606 ; +C -1 ; WX 600 ; N Edotaccent ; B 53 0 550 753 ; +C -1 ; WX 600 ; N scaron ; B 80 -15 513 669 ; +C -1 ; WX 600 ; N scedilla ; B 80 -151 513 441 ; +C -1 ; WX 600 ; N iacute ; B 95 0 505 672 ; +C -1 ; WX 600 ; N lozenge ; B 18 0 443 706 ; +C -1 ; WX 600 ; N Rcaron ; B 38 0 588 802 ; +C -1 ; WX 600 ; N Gcommaaccent ; B 31 -250 575 580 ; +C -1 ; WX 600 ; N ucircumflex ; B 21 -15 562 654 ; +C -1 ; WX 600 ; N acircumflex ; B 53 -15 559 654 ; +C -1 ; WX 600 ; N Amacron ; B 3 0 597 698 ; +C -1 ; WX 600 ; N rcaron ; B 60 0 559 669 ; +C -1 ; WX 600 ; N ccedilla ; B 66 -151 529 441 ; +C -1 ; WX 600 ; N Zdotaccent ; B 86 0 514 753 ; +C -1 ; WX 600 ; N Thorn ; B 79 0 538 562 ; +C -1 ; WX 600 ; N Omacron ; B 43 -18 557 698 ; +C -1 ; WX 600 ; N Racute ; B 38 0 588 805 ; +C -1 ; WX 600 ; N Sacute ; B 72 -20 529 805 ; +C -1 ; WX 600 ; N dcaron ; B 45 -15 715 629 ; +C -1 ; WX 600 ; N Umacron ; B 17 -18 583 698 ; +C -1 ; WX 600 ; N uring ; B 21 -15 562 627 ; +C -1 ; WX 600 ; N threesuperior ; B 155 240 406 622 ; +C -1 ; WX 600 ; N Ograve ; B 43 -18 557 805 ; +C -1 ; WX 600 ; N Agrave ; B 3 0 597 805 ; +C -1 ; WX 600 ; N Abreve ; B 3 0 597 732 ; +C -1 ; WX 600 ; N multiply ; B 87 43 515 470 ; +C -1 ; WX 600 ; N uacute ; B 21 -15 562 672 ; +C -1 ; WX 600 ; N Tcaron ; B 38 0 563 802 ; +C -1 ; WX 600 ; N partialdiff ; B 17 -38 459 710 ; +C -1 ; WX 600 ; N ydieresis ; B 7 -157 592 620 ; +C -1 ; WX 600 ; N Nacute ; B 7 -13 593 805 ; +C -1 ; WX 600 ; N icircumflex ; B 94 0 505 654 ; +C -1 ; WX 600 ; N Ecircumflex ; B 53 0 550 787 ; +C -1 ; WX 600 ; N adieresis ; B 53 -15 559 620 ; +C -1 ; WX 600 ; N edieresis ; B 66 -15 548 620 ; +C -1 ; WX 600 ; N cacute ; B 66 -15 529 672 ; +C -1 ; WX 600 ; N nacute ; B 26 0 575 672 ; +C -1 ; WX 600 ; N umacron ; B 21 -15 562 565 ; +C -1 ; WX 600 ; N Ncaron ; B 7 -13 593 802 ; +C -1 ; WX 600 ; N Iacute ; B 96 0 504 805 ; +C -1 ; WX 600 ; N plusminus ; B 87 44 513 558 ; +C -1 ; WX 600 ; N brokenbar ; B 275 -175 326 675 ; +C -1 ; WX 600 ; N registered ; B 0 -18 600 580 ; +C -1 ; WX 600 ; N Gbreve ; B 31 -18 575 732 ; +C -1 ; WX 600 ; N Idotaccent ; B 96 0 504 753 ; +C -1 ; WX 600 ; N summation ; B 15 -10 585 706 ; +C -1 ; WX 600 ; N Egrave ; B 53 0 550 805 ; +C -1 ; WX 600 ; N racute ; B 60 0 559 672 ; +C -1 ; WX 600 ; N omacron ; B 62 -15 538 565 ; +C -1 ; WX 600 ; N Zacute ; B 86 0 514 805 ; +C -1 ; WX 600 ; N Zcaron ; B 86 0 514 802 ; +C -1 ; WX 600 ; N greaterequal ; B 98 0 502 710 ; +C -1 ; WX 600 ; N Eth ; B 30 0 574 562 ; +C -1 ; WX 600 ; N Ccedilla ; B 41 -151 540 580 ; +C -1 ; WX 600 ; N lcommaaccent ; B 95 -250 505 629 ; +C -1 ; WX 600 ; N tcaron ; B 87 -15 530 717 ; +C -1 ; WX 600 ; N eogonek ; B 66 -172 548 441 ; +C -1 ; WX 600 ; N Uogonek ; B 17 -172 583 562 ; +C -1 ; WX 600 ; N Aacute ; B 3 0 597 805 ; +C -1 ; WX 600 ; N Adieresis ; B 3 0 597 753 ; +C -1 ; WX 600 ; N egrave ; B 66 -15 548 672 ; +C -1 ; WX 600 ; N zacute ; B 99 0 502 672 ; +C -1 ; WX 600 ; N iogonek ; B 95 -172 505 657 ; +C -1 ; WX 600 ; N Oacute ; B 43 -18 557 805 ; +C -1 ; WX 600 ; N oacute ; B 62 -15 538 672 ; +C -1 ; WX 600 ; N amacron ; B 53 -15 559 565 ; +C -1 ; WX 600 ; N sacute ; B 80 -15 513 672 ; +C -1 ; WX 600 ; N idieresis ; B 95 0 505 620 ; +C -1 ; WX 600 ; N Ocircumflex ; B 43 -18 557 787 ; +C -1 ; WX 600 ; N Ugrave ; B 17 -18 583 805 ; +C -1 ; WX 600 ; N Delta ; B 6 0 598 688 ; +C -1 ; WX 600 ; N thorn ; B -6 -157 555 629 ; +C -1 ; WX 600 ; N twosuperior ; B 177 249 424 622 ; +C -1 ; WX 600 ; N Odieresis ; B 43 -18 557 753 ; +C -1 ; WX 600 ; N mu ; B 21 -157 562 426 ; +C -1 ; WX 600 ; N igrave ; B 95 0 505 672 ; +C -1 ; WX 600 ; N ohungarumlaut ; B 62 -15 580 672 ; +C -1 ; WX 600 ; N Eogonek ; B 53 -172 561 562 ; +C -1 ; WX 600 ; N dcroat ; B 45 -15 591 629 ; +C -1 ; WX 600 ; N threequarters ; B 8 -56 593 666 ; +C -1 ; WX 600 ; N Scedilla ; B 72 -151 529 580 ; +C -1 ; WX 600 ; N lcaron ; B 95 0 533 629 ; +C -1 ; WX 600 ; N Kcommaaccent ; B 38 -250 582 562 ; +C -1 ; WX 600 ; N Lacute ; B 47 0 554 805 ; +C -1 ; WX 600 ; N trademark ; B -23 263 623 562 ; +C -1 ; WX 600 ; N edotaccent ; B 66 -15 548 620 ; +C -1 ; WX 600 ; N Igrave ; B 96 0 504 805 ; +C -1 ; WX 600 ; N Imacron ; B 96 0 504 698 ; +C -1 ; WX 600 ; N Lcaron ; B 47 0 554 562 ; +C -1 ; WX 600 ; N onehalf ; B 0 -57 611 665 ; +C -1 ; WX 600 ; N lessequal ; B 98 0 502 710 ; +C -1 ; WX 600 ; N ocircumflex ; B 62 -15 538 654 ; +C -1 ; WX 600 ; N ntilde ; B 26 0 575 606 ; +C -1 ; WX 600 ; N Uhungarumlaut ; B 17 -18 590 805 ; +C -1 ; WX 600 ; N Eacute ; B 53 0 550 805 ; +C -1 ; WX 600 ; N emacron ; B 66 -15 548 565 ; +C -1 ; WX 600 ; N gbreve ; B 45 -157 566 609 ; +C -1 ; WX 600 ; N onequarter ; B 0 -57 600 665 ; +C -1 ; WX 600 ; N Scaron ; B 72 -20 529 802 ; +C -1 ; WX 600 ; N Scommaaccent ; B 72 -250 529 580 ; +C -1 ; WX 600 ; N Ohungarumlaut ; B 43 -18 580 805 ; +C -1 ; WX 600 ; N degree ; B 123 269 477 622 ; +C -1 ; WX 600 ; N ograve ; B 62 -15 538 672 ; +C -1 ; WX 600 ; N Ccaron ; B 41 -18 540 802 ; +C -1 ; WX 600 ; N ugrave ; B 21 -15 562 672 ; +C -1 ; WX 600 ; N radical ; B 3 -15 597 792 ; +C -1 ; WX 600 ; N Dcaron ; B 43 0 574 802 ; +C -1 ; WX 600 ; N rcommaaccent ; B 60 -250 559 441 ; +C -1 ; WX 600 ; N Ntilde ; B 7 -13 593 729 ; +C -1 ; WX 600 ; N otilde ; B 62 -15 538 606 ; +C -1 ; WX 600 ; N Rcommaaccent ; B 38 -250 588 562 ; +C -1 ; WX 600 ; N Lcommaaccent ; B 47 -250 554 562 ; +C -1 ; WX 600 ; N Atilde ; B 3 0 597 729 ; +C -1 ; WX 600 ; N Aogonek ; B 3 -172 608 562 ; +C -1 ; WX 600 ; N Aring ; B 3 0 597 750 ; +C -1 ; WX 600 ; N Otilde ; B 43 -18 557 729 ; +C -1 ; WX 600 ; N zdotaccent ; B 99 0 502 620 ; +C -1 ; WX 600 ; N Ecaron ; B 53 0 550 802 ; +C -1 ; WX 600 ; N Iogonek ; B 96 -172 504 562 ; +C -1 ; WX 600 ; N kcommaaccent ; B 43 -250 580 629 ; +C -1 ; WX 600 ; N minus ; B 80 232 520 283 ; +C -1 ; WX 600 ; N Icircumflex ; B 96 0 504 787 ; +C -1 ; WX 600 ; N ncaron ; B 26 0 575 669 ; +C -1 ; WX 600 ; N tcommaaccent ; B 87 -250 530 561 ; +C -1 ; WX 600 ; N logicalnot ; B 87 108 513 369 ; +C -1 ; WX 600 ; N odieresis ; B 62 -15 538 620 ; +C -1 ; WX 600 ; N udieresis ; B 21 -15 562 620 ; +C -1 ; WX 600 ; N notequal ; B 15 -16 540 529 ; +C -1 ; WX 600 ; N gcommaaccent ; B 45 -157 566 708 ; +C -1 ; WX 600 ; N eth ; B 62 -15 538 629 ; +C -1 ; WX 600 ; N zcaron ; B 99 0 502 669 ; +C -1 ; WX 600 ; N ncommaaccent ; B 26 -250 575 441 ; +C -1 ; WX 600 ; N onesuperior ; B 172 249 428 622 ; +C -1 ; WX 600 ; N imacron ; B 95 0 505 565 ; +C -1 ; WX 600 ; N Euro ; B 0 0 0 0 ; +EndCharMetrics +EndFontMetrics diff --git a/pitfall/pdfkit/lib/font/data/Helvetica-Bold.afm b/pitfall/pdfkit/lib/font/data/Helvetica-Bold.afm new file mode 100755 index 00000000..837c594e --- /dev/null +++ b/pitfall/pdfkit/lib/font/data/Helvetica-Bold.afm @@ -0,0 +1,2827 @@ +StartFontMetrics 4.1 +Comment Copyright (c) 1985, 1987, 1989, 1990, 1997 Adobe Systems Incorporated. All Rights Reserved. +Comment Creation Date: Thu May 1 12:43:52 1997 +Comment UniqueID 43052 +Comment VMusage 37169 48194 +FontName Helvetica-Bold +FullName Helvetica Bold +FamilyName Helvetica +Weight Bold +ItalicAngle 0 +IsFixedPitch false +CharacterSet ExtendedRoman +FontBBox -170 -228 1003 962 +UnderlinePosition -100 +UnderlineThickness 50 +Version 002.000 +Notice Copyright (c) 1985, 1987, 1989, 1990, 1997 Adobe Systems Incorporated. All Rights Reserved.Helvetica is a trademark of Linotype-Hell AG and/or its subsidiaries. +EncodingScheme AdobeStandardEncoding +CapHeight 718 +XHeight 532 +Ascender 718 +Descender -207 +StdHW 118 +StdVW 140 +StartCharMetrics 315 +C 32 ; WX 278 ; N space ; B 0 0 0 0 ; +C 33 ; WX 333 ; N exclam ; B 90 0 244 718 ; +C 34 ; WX 474 ; N quotedbl ; B 98 447 376 718 ; +C 35 ; WX 556 ; N numbersign ; B 18 0 538 698 ; +C 36 ; WX 556 ; N dollar ; B 30 -115 523 775 ; +C 37 ; WX 889 ; N percent ; B 28 -19 861 710 ; +C 38 ; WX 722 ; N ampersand ; B 54 -19 701 718 ; +C 39 ; WX 278 ; N quoteright ; B 69 445 209 718 ; +C 40 ; WX 333 ; N parenleft ; B 35 -208 314 734 ; +C 41 ; WX 333 ; N parenright ; B 19 -208 298 734 ; +C 42 ; WX 389 ; N asterisk ; B 27 387 362 718 ; +C 43 ; WX 584 ; N plus ; B 40 0 544 506 ; +C 44 ; WX 278 ; N comma ; B 64 -168 214 146 ; +C 45 ; WX 333 ; N hyphen ; B 27 215 306 345 ; +C 46 ; WX 278 ; N period ; B 64 0 214 146 ; +C 47 ; WX 278 ; N slash ; B -33 -19 311 737 ; +C 48 ; WX 556 ; N zero ; B 32 -19 524 710 ; +C 49 ; WX 556 ; N one ; B 69 0 378 710 ; +C 50 ; WX 556 ; N two ; B 26 0 511 710 ; +C 51 ; WX 556 ; N three ; B 27 -19 516 710 ; +C 52 ; WX 556 ; N four ; B 27 0 526 710 ; +C 53 ; WX 556 ; N five ; B 27 -19 516 698 ; +C 54 ; WX 556 ; N six ; B 31 -19 520 710 ; +C 55 ; WX 556 ; N seven ; B 25 0 528 698 ; +C 56 ; WX 556 ; N eight ; B 32 -19 524 710 ; +C 57 ; WX 556 ; N nine ; B 30 -19 522 710 ; +C 58 ; WX 333 ; N colon ; B 92 0 242 512 ; +C 59 ; WX 333 ; N semicolon ; B 92 -168 242 512 ; +C 60 ; WX 584 ; N less ; B 38 -8 546 514 ; +C 61 ; WX 584 ; N equal ; B 40 87 544 419 ; +C 62 ; WX 584 ; N greater ; B 38 -8 546 514 ; +C 63 ; WX 611 ; N question ; B 60 0 556 727 ; +C 64 ; WX 975 ; N at ; B 118 -19 856 737 ; +C 65 ; WX 722 ; N A ; B 20 0 702 718 ; +C 66 ; WX 722 ; N B ; B 76 0 669 718 ; +C 67 ; WX 722 ; N C ; B 44 -19 684 737 ; +C 68 ; WX 722 ; N D ; B 76 0 685 718 ; +C 69 ; WX 667 ; N E ; B 76 0 621 718 ; +C 70 ; WX 611 ; N F ; B 76 0 587 718 ; +C 71 ; WX 778 ; N G ; B 44 -19 713 737 ; +C 72 ; WX 722 ; N H ; B 71 0 651 718 ; +C 73 ; WX 278 ; N I ; B 64 0 214 718 ; +C 74 ; WX 556 ; N J ; B 22 -18 484 718 ; +C 75 ; WX 722 ; N K ; B 87 0 722 718 ; +C 76 ; WX 611 ; N L ; B 76 0 583 718 ; +C 77 ; WX 833 ; N M ; B 69 0 765 718 ; +C 78 ; WX 722 ; N N ; B 69 0 654 718 ; +C 79 ; WX 778 ; N O ; B 44 -19 734 737 ; +C 80 ; WX 667 ; N P ; B 76 0 627 718 ; +C 81 ; WX 778 ; N Q ; B 44 -52 737 737 ; +C 82 ; WX 722 ; N R ; B 76 0 677 718 ; +C 83 ; WX 667 ; N S ; B 39 -19 629 737 ; +C 84 ; WX 611 ; N T ; B 14 0 598 718 ; +C 85 ; WX 722 ; N U ; B 72 -19 651 718 ; +C 86 ; WX 667 ; N V ; B 19 0 648 718 ; +C 87 ; WX 944 ; N W ; B 16 0 929 718 ; +C 88 ; WX 667 ; N X ; B 14 0 653 718 ; +C 89 ; WX 667 ; N Y ; B 15 0 653 718 ; +C 90 ; WX 611 ; N Z ; B 25 0 586 718 ; +C 91 ; WX 333 ; N bracketleft ; B 63 -196 309 722 ; +C 92 ; WX 278 ; N backslash ; B -33 -19 311 737 ; +C 93 ; WX 333 ; N bracketright ; B 24 -196 270 722 ; +C 94 ; WX 584 ; N asciicircum ; B 62 323 522 698 ; +C 95 ; WX 556 ; N underscore ; B 0 -125 556 -75 ; +C 96 ; WX 278 ; N quoteleft ; B 69 454 209 727 ; +C 97 ; WX 556 ; N a ; B 29 -14 527 546 ; +C 98 ; WX 611 ; N b ; B 61 -14 578 718 ; +C 99 ; WX 556 ; N c ; B 34 -14 524 546 ; +C 100 ; WX 611 ; N d ; B 34 -14 551 718 ; +C 101 ; WX 556 ; N e ; B 23 -14 528 546 ; +C 102 ; WX 333 ; N f ; B 10 0 318 727 ; L i fi ; L l fl ; +C 103 ; WX 611 ; N g ; B 40 -217 553 546 ; +C 104 ; WX 611 ; N h ; B 65 0 546 718 ; +C 105 ; WX 278 ; N i ; B 69 0 209 725 ; +C 106 ; WX 278 ; N j ; B 3 -214 209 725 ; +C 107 ; WX 556 ; N k ; B 69 0 562 718 ; +C 108 ; WX 278 ; N l ; B 69 0 209 718 ; +C 109 ; WX 889 ; N m ; B 64 0 826 546 ; +C 110 ; WX 611 ; N n ; B 65 0 546 546 ; +C 111 ; WX 611 ; N o ; B 34 -14 578 546 ; +C 112 ; WX 611 ; N p ; B 62 -207 578 546 ; +C 113 ; WX 611 ; N q ; B 34 -207 552 546 ; +C 114 ; WX 389 ; N r ; B 64 0 373 546 ; +C 115 ; WX 556 ; N s ; B 30 -14 519 546 ; +C 116 ; WX 333 ; N t ; B 10 -6 309 676 ; +C 117 ; WX 611 ; N u ; B 66 -14 545 532 ; +C 118 ; WX 556 ; N v ; B 13 0 543 532 ; +C 119 ; WX 778 ; N w ; B 10 0 769 532 ; +C 120 ; WX 556 ; N x ; B 15 0 541 532 ; +C 121 ; WX 556 ; N y ; B 10 -214 539 532 ; +C 122 ; WX 500 ; N z ; B 20 0 480 532 ; +C 123 ; WX 389 ; N braceleft ; B 48 -196 365 722 ; +C 124 ; WX 280 ; N bar ; B 84 -225 196 775 ; +C 125 ; WX 389 ; N braceright ; B 24 -196 341 722 ; +C 126 ; WX 584 ; N asciitilde ; B 61 163 523 343 ; +C 161 ; WX 333 ; N exclamdown ; B 90 -186 244 532 ; +C 162 ; WX 556 ; N cent ; B 34 -118 524 628 ; +C 163 ; WX 556 ; N sterling ; B 28 -16 541 718 ; +C 164 ; WX 167 ; N fraction ; B -170 -19 336 710 ; +C 165 ; WX 556 ; N yen ; B -9 0 565 698 ; +C 166 ; WX 556 ; N florin ; B -10 -210 516 737 ; +C 167 ; WX 556 ; N section ; B 34 -184 522 727 ; +C 168 ; WX 556 ; N currency ; B -3 76 559 636 ; +C 169 ; WX 238 ; N quotesingle ; B 70 447 168 718 ; +C 170 ; WX 500 ; N quotedblleft ; B 64 454 436 727 ; +C 171 ; WX 556 ; N guillemotleft ; B 88 76 468 484 ; +C 172 ; WX 333 ; N guilsinglleft ; B 83 76 250 484 ; +C 173 ; WX 333 ; N guilsinglright ; B 83 76 250 484 ; +C 174 ; WX 611 ; N fi ; B 10 0 542 727 ; +C 175 ; WX 611 ; N fl ; B 10 0 542 727 ; +C 177 ; WX 556 ; N endash ; B 0 227 556 333 ; +C 178 ; WX 556 ; N dagger ; B 36 -171 520 718 ; +C 179 ; WX 556 ; N daggerdbl ; B 36 -171 520 718 ; +C 180 ; WX 278 ; N periodcentered ; B 58 172 220 334 ; +C 182 ; WX 556 ; N paragraph ; B -8 -191 539 700 ; +C 183 ; WX 350 ; N bullet ; B 10 194 340 524 ; +C 184 ; WX 278 ; N quotesinglbase ; B 69 -146 209 127 ; +C 185 ; WX 500 ; N quotedblbase ; B 64 -146 436 127 ; +C 186 ; WX 500 ; N quotedblright ; B 64 445 436 718 ; +C 187 ; WX 556 ; N guillemotright ; B 88 76 468 484 ; +C 188 ; WX 1000 ; N ellipsis ; B 92 0 908 146 ; +C 189 ; WX 1000 ; N perthousand ; B -3 -19 1003 710 ; +C 191 ; WX 611 ; N questiondown ; B 55 -195 551 532 ; +C 193 ; WX 333 ; N grave ; B -23 604 225 750 ; +C 194 ; WX 333 ; N acute ; B 108 604 356 750 ; +C 195 ; WX 333 ; N circumflex ; B -10 604 343 750 ; +C 196 ; WX 333 ; N tilde ; B -17 610 350 737 ; +C 197 ; WX 333 ; N macron ; B -6 604 339 678 ; +C 198 ; WX 333 ; N breve ; B -2 604 335 750 ; +C 199 ; WX 333 ; N dotaccent ; B 104 614 230 729 ; +C 200 ; WX 333 ; N dieresis ; B 6 614 327 729 ; +C 202 ; WX 333 ; N ring ; B 59 568 275 776 ; +C 203 ; WX 333 ; N cedilla ; B 6 -228 245 0 ; +C 205 ; WX 333 ; N hungarumlaut ; B 9 604 486 750 ; +C 206 ; WX 333 ; N ogonek ; B 71 -228 304 0 ; +C 207 ; WX 333 ; N caron ; B -10 604 343 750 ; +C 208 ; WX 1000 ; N emdash ; B 0 227 1000 333 ; +C 225 ; WX 1000 ; N AE ; B 5 0 954 718 ; +C 227 ; WX 370 ; N ordfeminine ; B 22 401 347 737 ; +C 232 ; WX 611 ; N Lslash ; B -20 0 583 718 ; +C 233 ; WX 778 ; N Oslash ; B 33 -27 744 745 ; +C 234 ; WX 1000 ; N OE ; B 37 -19 961 737 ; +C 235 ; WX 365 ; N ordmasculine ; B 6 401 360 737 ; +C 241 ; WX 889 ; N ae ; B 29 -14 858 546 ; +C 245 ; WX 278 ; N dotlessi ; B 69 0 209 532 ; +C 248 ; WX 278 ; N lslash ; B -18 0 296 718 ; +C 249 ; WX 611 ; N oslash ; B 22 -29 589 560 ; +C 250 ; WX 944 ; N oe ; B 34 -14 912 546 ; +C 251 ; WX 611 ; N germandbls ; B 69 -14 579 731 ; +C -1 ; WX 278 ; N Idieresis ; B -21 0 300 915 ; +C -1 ; WX 556 ; N eacute ; B 23 -14 528 750 ; +C -1 ; WX 556 ; N abreve ; B 29 -14 527 750 ; +C -1 ; WX 611 ; N uhungarumlaut ; B 66 -14 625 750 ; +C -1 ; WX 556 ; N ecaron ; B 23 -14 528 750 ; +C -1 ; WX 667 ; N Ydieresis ; B 15 0 653 915 ; +C -1 ; WX 584 ; N divide ; B 40 -42 544 548 ; +C -1 ; WX 667 ; N Yacute ; B 15 0 653 936 ; +C -1 ; WX 722 ; N Acircumflex ; B 20 0 702 936 ; +C -1 ; WX 556 ; N aacute ; B 29 -14 527 750 ; +C -1 ; WX 722 ; N Ucircumflex ; B 72 -19 651 936 ; +C -1 ; WX 556 ; N yacute ; B 10 -214 539 750 ; +C -1 ; WX 556 ; N scommaaccent ; B 30 -228 519 546 ; +C -1 ; WX 556 ; N ecircumflex ; B 23 -14 528 750 ; +C -1 ; WX 722 ; N Uring ; B 72 -19 651 962 ; +C -1 ; WX 722 ; N Udieresis ; B 72 -19 651 915 ; +C -1 ; WX 556 ; N aogonek ; B 29 -224 545 546 ; +C -1 ; WX 722 ; N Uacute ; B 72 -19 651 936 ; +C -1 ; WX 611 ; N uogonek ; B 66 -228 545 532 ; +C -1 ; WX 667 ; N Edieresis ; B 76 0 621 915 ; +C -1 ; WX 722 ; N Dcroat ; B -5 0 685 718 ; +C -1 ; WX 250 ; N commaaccent ; B 64 -228 199 -50 ; +C -1 ; WX 737 ; N copyright ; B -11 -19 749 737 ; +C -1 ; WX 667 ; N Emacron ; B 76 0 621 864 ; +C -1 ; WX 556 ; N ccaron ; B 34 -14 524 750 ; +C -1 ; WX 556 ; N aring ; B 29 -14 527 776 ; +C -1 ; WX 722 ; N Ncommaaccent ; B 69 -228 654 718 ; +C -1 ; WX 278 ; N lacute ; B 69 0 329 936 ; +C -1 ; WX 556 ; N agrave ; B 29 -14 527 750 ; +C -1 ; WX 611 ; N Tcommaaccent ; B 14 -228 598 718 ; +C -1 ; WX 722 ; N Cacute ; B 44 -19 684 936 ; +C -1 ; WX 556 ; N atilde ; B 29 -14 527 737 ; +C -1 ; WX 667 ; N Edotaccent ; B 76 0 621 915 ; +C -1 ; WX 556 ; N scaron ; B 30 -14 519 750 ; +C -1 ; WX 556 ; N scedilla ; B 30 -228 519 546 ; +C -1 ; WX 278 ; N iacute ; B 69 0 329 750 ; +C -1 ; WX 494 ; N lozenge ; B 10 0 484 745 ; +C -1 ; WX 722 ; N Rcaron ; B 76 0 677 936 ; +C -1 ; WX 778 ; N Gcommaaccent ; B 44 -228 713 737 ; +C -1 ; WX 611 ; N ucircumflex ; B 66 -14 545 750 ; +C -1 ; WX 556 ; N acircumflex ; B 29 -14 527 750 ; +C -1 ; WX 722 ; N Amacron ; B 20 0 702 864 ; +C -1 ; WX 389 ; N rcaron ; B 18 0 373 750 ; +C -1 ; WX 556 ; N ccedilla ; B 34 -228 524 546 ; +C -1 ; WX 611 ; N Zdotaccent ; B 25 0 586 915 ; +C -1 ; WX 667 ; N Thorn ; B 76 0 627 718 ; +C -1 ; WX 778 ; N Omacron ; B 44 -19 734 864 ; +C -1 ; WX 722 ; N Racute ; B 76 0 677 936 ; +C -1 ; WX 667 ; N Sacute ; B 39 -19 629 936 ; +C -1 ; WX 743 ; N dcaron ; B 34 -14 750 718 ; +C -1 ; WX 722 ; N Umacron ; B 72 -19 651 864 ; +C -1 ; WX 611 ; N uring ; B 66 -14 545 776 ; +C -1 ; WX 333 ; N threesuperior ; B 8 271 326 710 ; +C -1 ; WX 778 ; N Ograve ; B 44 -19 734 936 ; +C -1 ; WX 722 ; N Agrave ; B 20 0 702 936 ; +C -1 ; WX 722 ; N Abreve ; B 20 0 702 936 ; +C -1 ; WX 584 ; N multiply ; B 40 1 545 505 ; +C -1 ; WX 611 ; N uacute ; B 66 -14 545 750 ; +C -1 ; WX 611 ; N Tcaron ; B 14 0 598 936 ; +C -1 ; WX 494 ; N partialdiff ; B 11 -21 494 750 ; +C -1 ; WX 556 ; N ydieresis ; B 10 -214 539 729 ; +C -1 ; WX 722 ; N Nacute ; B 69 0 654 936 ; +C -1 ; WX 278 ; N icircumflex ; B -37 0 316 750 ; +C -1 ; WX 667 ; N Ecircumflex ; B 76 0 621 936 ; +C -1 ; WX 556 ; N adieresis ; B 29 -14 527 729 ; +C -1 ; WX 556 ; N edieresis ; B 23 -14 528 729 ; +C -1 ; WX 556 ; N cacute ; B 34 -14 524 750 ; +C -1 ; WX 611 ; N nacute ; B 65 0 546 750 ; +C -1 ; WX 611 ; N umacron ; B 66 -14 545 678 ; +C -1 ; WX 722 ; N Ncaron ; B 69 0 654 936 ; +C -1 ; WX 278 ; N Iacute ; B 64 0 329 936 ; +C -1 ; WX 584 ; N plusminus ; B 40 0 544 506 ; +C -1 ; WX 280 ; N brokenbar ; B 84 -150 196 700 ; +C -1 ; WX 737 ; N registered ; B -11 -19 748 737 ; +C -1 ; WX 778 ; N Gbreve ; B 44 -19 713 936 ; +C -1 ; WX 278 ; N Idotaccent ; B 64 0 214 915 ; +C -1 ; WX 600 ; N summation ; B 14 -10 585 706 ; +C -1 ; WX 667 ; N Egrave ; B 76 0 621 936 ; +C -1 ; WX 389 ; N racute ; B 64 0 384 750 ; +C -1 ; WX 611 ; N omacron ; B 34 -14 578 678 ; +C -1 ; WX 611 ; N Zacute ; B 25 0 586 936 ; +C -1 ; WX 611 ; N Zcaron ; B 25 0 586 936 ; +C -1 ; WX 549 ; N greaterequal ; B 26 0 523 704 ; +C -1 ; WX 722 ; N Eth ; B -5 0 685 718 ; +C -1 ; WX 722 ; N Ccedilla ; B 44 -228 684 737 ; +C -1 ; WX 278 ; N lcommaaccent ; B 69 -228 213 718 ; +C -1 ; WX 389 ; N tcaron ; B 10 -6 421 878 ; +C -1 ; WX 556 ; N eogonek ; B 23 -228 528 546 ; +C -1 ; WX 722 ; N Uogonek ; B 72 -228 651 718 ; +C -1 ; WX 722 ; N Aacute ; B 20 0 702 936 ; +C -1 ; WX 722 ; N Adieresis ; B 20 0 702 915 ; +C -1 ; WX 556 ; N egrave ; B 23 -14 528 750 ; +C -1 ; WX 500 ; N zacute ; B 20 0 480 750 ; +C -1 ; WX 278 ; N iogonek ; B 16 -224 249 725 ; +C -1 ; WX 778 ; N Oacute ; B 44 -19 734 936 ; +C -1 ; WX 611 ; N oacute ; B 34 -14 578 750 ; +C -1 ; WX 556 ; N amacron ; B 29 -14 527 678 ; +C -1 ; WX 556 ; N sacute ; B 30 -14 519 750 ; +C -1 ; WX 278 ; N idieresis ; B -21 0 300 729 ; +C -1 ; WX 778 ; N Ocircumflex ; B 44 -19 734 936 ; +C -1 ; WX 722 ; N Ugrave ; B 72 -19 651 936 ; +C -1 ; WX 612 ; N Delta ; B 6 0 608 688 ; +C -1 ; WX 611 ; N thorn ; B 62 -208 578 718 ; +C -1 ; WX 333 ; N twosuperior ; B 9 283 324 710 ; +C -1 ; WX 778 ; N Odieresis ; B 44 -19 734 915 ; +C -1 ; WX 611 ; N mu ; B 66 -207 545 532 ; +C -1 ; WX 278 ; N igrave ; B -50 0 209 750 ; +C -1 ; WX 611 ; N ohungarumlaut ; B 34 -14 625 750 ; +C -1 ; WX 667 ; N Eogonek ; B 76 -224 639 718 ; +C -1 ; WX 611 ; N dcroat ; B 34 -14 650 718 ; +C -1 ; WX 834 ; N threequarters ; B 16 -19 799 710 ; +C -1 ; WX 667 ; N Scedilla ; B 39 -228 629 737 ; +C -1 ; WX 400 ; N lcaron ; B 69 0 408 718 ; +C -1 ; WX 722 ; N Kcommaaccent ; B 87 -228 722 718 ; +C -1 ; WX 611 ; N Lacute ; B 76 0 583 936 ; +C -1 ; WX 1000 ; N trademark ; B 44 306 956 718 ; +C -1 ; WX 556 ; N edotaccent ; B 23 -14 528 729 ; +C -1 ; WX 278 ; N Igrave ; B -50 0 214 936 ; +C -1 ; WX 278 ; N Imacron ; B -33 0 312 864 ; +C -1 ; WX 611 ; N Lcaron ; B 76 0 583 718 ; +C -1 ; WX 834 ; N onehalf ; B 26 -19 794 710 ; +C -1 ; WX 549 ; N lessequal ; B 29 0 526 704 ; +C -1 ; WX 611 ; N ocircumflex ; B 34 -14 578 750 ; +C -1 ; WX 611 ; N ntilde ; B 65 0 546 737 ; +C -1 ; WX 722 ; N Uhungarumlaut ; B 72 -19 681 936 ; +C -1 ; WX 667 ; N Eacute ; B 76 0 621 936 ; +C -1 ; WX 556 ; N emacron ; B 23 -14 528 678 ; +C -1 ; WX 611 ; N gbreve ; B 40 -217 553 750 ; +C -1 ; WX 834 ; N onequarter ; B 26 -19 766 710 ; +C -1 ; WX 667 ; N Scaron ; B 39 -19 629 936 ; +C -1 ; WX 667 ; N Scommaaccent ; B 39 -228 629 737 ; +C -1 ; WX 778 ; N Ohungarumlaut ; B 44 -19 734 936 ; +C -1 ; WX 400 ; N degree ; B 57 426 343 712 ; +C -1 ; WX 611 ; N ograve ; B 34 -14 578 750 ; +C -1 ; WX 722 ; N Ccaron ; B 44 -19 684 936 ; +C -1 ; WX 611 ; N ugrave ; B 66 -14 545 750 ; +C -1 ; WX 549 ; N radical ; B 10 -46 512 850 ; +C -1 ; WX 722 ; N Dcaron ; B 76 0 685 936 ; +C -1 ; WX 389 ; N rcommaaccent ; B 64 -228 373 546 ; +C -1 ; WX 722 ; N Ntilde ; B 69 0 654 923 ; +C -1 ; WX 611 ; N otilde ; B 34 -14 578 737 ; +C -1 ; WX 722 ; N Rcommaaccent ; B 76 -228 677 718 ; +C -1 ; WX 611 ; N Lcommaaccent ; B 76 -228 583 718 ; +C -1 ; WX 722 ; N Atilde ; B 20 0 702 923 ; +C -1 ; WX 722 ; N Aogonek ; B 20 -224 742 718 ; +C -1 ; WX 722 ; N Aring ; B 20 0 702 962 ; +C -1 ; WX 778 ; N Otilde ; B 44 -19 734 923 ; +C -1 ; WX 500 ; N zdotaccent ; B 20 0 480 729 ; +C -1 ; WX 667 ; N Ecaron ; B 76 0 621 936 ; +C -1 ; WX 278 ; N Iogonek ; B -11 -228 222 718 ; +C -1 ; WX 556 ; N kcommaaccent ; B 69 -228 562 718 ; +C -1 ; WX 584 ; N minus ; B 40 197 544 309 ; +C -1 ; WX 278 ; N Icircumflex ; B -37 0 316 936 ; +C -1 ; WX 611 ; N ncaron ; B 65 0 546 750 ; +C -1 ; WX 333 ; N tcommaaccent ; B 10 -228 309 676 ; +C -1 ; WX 584 ; N logicalnot ; B 40 108 544 419 ; +C -1 ; WX 611 ; N odieresis ; B 34 -14 578 729 ; +C -1 ; WX 611 ; N udieresis ; B 66 -14 545 729 ; +C -1 ; WX 549 ; N notequal ; B 15 -49 540 570 ; +C -1 ; WX 611 ; N gcommaaccent ; B 40 -217 553 850 ; +C -1 ; WX 611 ; N eth ; B 34 -14 578 737 ; +C -1 ; WX 500 ; N zcaron ; B 20 0 480 750 ; +C -1 ; WX 611 ; N ncommaaccent ; B 65 -228 546 546 ; +C -1 ; WX 333 ; N onesuperior ; B 26 283 237 710 ; +C -1 ; WX 278 ; N imacron ; B -8 0 285 678 ; +C -1 ; WX 556 ; N Euro ; B 0 0 0 0 ; +EndCharMetrics +StartKernData +StartKernPairs 2481 +KPX A C -40 +KPX A Cacute -40 +KPX A Ccaron -40 +KPX A Ccedilla -40 +KPX A G -50 +KPX A Gbreve -50 +KPX A Gcommaaccent -50 +KPX A O -40 +KPX A Oacute -40 +KPX A Ocircumflex -40 +KPX A Odieresis -40 +KPX A Ograve -40 +KPX A Ohungarumlaut -40 +KPX A Omacron -40 +KPX A Oslash -40 +KPX A Otilde -40 +KPX A Q -40 +KPX A T -90 +KPX A Tcaron -90 +KPX A Tcommaaccent -90 +KPX A U -50 +KPX A Uacute -50 +KPX A Ucircumflex -50 +KPX A Udieresis -50 +KPX A Ugrave -50 +KPX A Uhungarumlaut -50 +KPX A Umacron -50 +KPX A Uogonek -50 +KPX A Uring -50 +KPX A V -80 +KPX A W -60 +KPX A Y -110 +KPX A Yacute -110 +KPX A Ydieresis -110 +KPX A u -30 +KPX A uacute -30 +KPX A ucircumflex -30 +KPX A udieresis -30 +KPX A ugrave -30 +KPX A uhungarumlaut -30 +KPX A umacron -30 +KPX A uogonek -30 +KPX A uring -30 +KPX A v -40 +KPX A w -30 +KPX A y -30 +KPX A yacute -30 +KPX A ydieresis -30 +KPX Aacute C -40 +KPX Aacute Cacute -40 +KPX Aacute Ccaron -40 +KPX Aacute Ccedilla -40 +KPX Aacute G -50 +KPX Aacute Gbreve -50 +KPX Aacute Gcommaaccent -50 +KPX Aacute O -40 +KPX Aacute Oacute -40 +KPX Aacute Ocircumflex -40 +KPX Aacute Odieresis -40 +KPX Aacute Ograve -40 +KPX Aacute Ohungarumlaut -40 +KPX Aacute Omacron -40 +KPX Aacute Oslash -40 +KPX Aacute Otilde -40 +KPX Aacute Q -40 +KPX Aacute T -90 +KPX Aacute Tcaron -90 +KPX Aacute Tcommaaccent -90 +KPX Aacute U -50 +KPX Aacute Uacute -50 +KPX Aacute Ucircumflex -50 +KPX Aacute Udieresis -50 +KPX Aacute Ugrave -50 +KPX Aacute Uhungarumlaut -50 +KPX Aacute Umacron -50 +KPX Aacute Uogonek -50 +KPX Aacute Uring -50 +KPX Aacute V -80 +KPX Aacute W -60 +KPX Aacute Y -110 +KPX Aacute Yacute -110 +KPX Aacute Ydieresis -110 +KPX Aacute u -30 +KPX Aacute uacute -30 +KPX Aacute ucircumflex -30 +KPX Aacute udieresis -30 +KPX Aacute ugrave -30 +KPX Aacute uhungarumlaut -30 +KPX Aacute umacron -30 +KPX Aacute uogonek -30 +KPX Aacute uring -30 +KPX Aacute v -40 +KPX Aacute w -30 +KPX Aacute y -30 +KPX Aacute yacute -30 +KPX Aacute ydieresis -30 +KPX Abreve C -40 +KPX Abreve Cacute -40 +KPX Abreve Ccaron -40 +KPX Abreve Ccedilla -40 +KPX Abreve G -50 +KPX Abreve Gbreve -50 +KPX Abreve Gcommaaccent -50 +KPX Abreve O -40 +KPX Abreve Oacute -40 +KPX Abreve Ocircumflex -40 +KPX Abreve Odieresis -40 +KPX Abreve Ograve -40 +KPX Abreve Ohungarumlaut -40 +KPX Abreve Omacron -40 +KPX Abreve Oslash -40 +KPX Abreve Otilde -40 +KPX Abreve Q -40 +KPX Abreve T -90 +KPX Abreve Tcaron -90 +KPX Abreve Tcommaaccent -90 +KPX Abreve U -50 +KPX Abreve Uacute -50 +KPX Abreve Ucircumflex -50 +KPX Abreve Udieresis -50 +KPX Abreve Ugrave -50 +KPX Abreve Uhungarumlaut -50 +KPX Abreve Umacron -50 +KPX Abreve Uogonek -50 +KPX Abreve Uring -50 +KPX Abreve V -80 +KPX Abreve W -60 +KPX Abreve Y -110 +KPX Abreve Yacute -110 +KPX Abreve Ydieresis -110 +KPX Abreve u -30 +KPX Abreve uacute -30 +KPX Abreve ucircumflex -30 +KPX Abreve udieresis -30 +KPX Abreve ugrave -30 +KPX Abreve uhungarumlaut -30 +KPX Abreve umacron -30 +KPX Abreve uogonek -30 +KPX Abreve uring -30 +KPX Abreve v -40 +KPX Abreve w -30 +KPX Abreve y -30 +KPX Abreve yacute -30 +KPX Abreve ydieresis -30 +KPX Acircumflex C -40 +KPX Acircumflex Cacute -40 +KPX Acircumflex Ccaron -40 +KPX Acircumflex Ccedilla -40 +KPX Acircumflex G -50 +KPX Acircumflex Gbreve -50 +KPX Acircumflex Gcommaaccent -50 +KPX Acircumflex O -40 +KPX Acircumflex Oacute -40 +KPX Acircumflex Ocircumflex -40 +KPX Acircumflex Odieresis -40 +KPX Acircumflex Ograve -40 +KPX Acircumflex Ohungarumlaut -40 +KPX Acircumflex Omacron -40 +KPX Acircumflex Oslash -40 +KPX Acircumflex Otilde -40 +KPX Acircumflex Q -40 +KPX Acircumflex T -90 +KPX Acircumflex Tcaron -90 +KPX Acircumflex Tcommaaccent -90 +KPX Acircumflex U -50 +KPX Acircumflex Uacute -50 +KPX Acircumflex Ucircumflex -50 +KPX Acircumflex Udieresis -50 +KPX Acircumflex Ugrave -50 +KPX Acircumflex Uhungarumlaut -50 +KPX Acircumflex Umacron -50 +KPX Acircumflex Uogonek -50 +KPX Acircumflex Uring -50 +KPX Acircumflex V -80 +KPX Acircumflex W -60 +KPX Acircumflex Y -110 +KPX Acircumflex Yacute -110 +KPX Acircumflex Ydieresis -110 +KPX Acircumflex u -30 +KPX Acircumflex uacute -30 +KPX Acircumflex ucircumflex -30 +KPX Acircumflex udieresis -30 +KPX Acircumflex ugrave -30 +KPX Acircumflex uhungarumlaut -30 +KPX Acircumflex umacron -30 +KPX Acircumflex uogonek -30 +KPX Acircumflex uring -30 +KPX Acircumflex v -40 +KPX Acircumflex w -30 +KPX Acircumflex y -30 +KPX Acircumflex yacute -30 +KPX Acircumflex ydieresis -30 +KPX Adieresis C -40 +KPX Adieresis Cacute -40 +KPX Adieresis Ccaron -40 +KPX Adieresis Ccedilla -40 +KPX Adieresis G -50 +KPX Adieresis Gbreve -50 +KPX Adieresis Gcommaaccent -50 +KPX Adieresis O -40 +KPX Adieresis Oacute -40 +KPX Adieresis Ocircumflex -40 +KPX Adieresis Odieresis -40 +KPX Adieresis Ograve -40 +KPX Adieresis Ohungarumlaut -40 +KPX Adieresis Omacron -40 +KPX Adieresis Oslash -40 +KPX Adieresis Otilde -40 +KPX Adieresis Q -40 +KPX Adieresis T -90 +KPX Adieresis Tcaron -90 +KPX Adieresis Tcommaaccent -90 +KPX Adieresis U -50 +KPX Adieresis Uacute -50 +KPX Adieresis Ucircumflex -50 +KPX Adieresis Udieresis -50 +KPX Adieresis Ugrave -50 +KPX Adieresis Uhungarumlaut -50 +KPX Adieresis Umacron -50 +KPX Adieresis Uogonek -50 +KPX Adieresis Uring -50 +KPX Adieresis V -80 +KPX Adieresis W -60 +KPX Adieresis Y -110 +KPX Adieresis Yacute -110 +KPX Adieresis Ydieresis -110 +KPX Adieresis u -30 +KPX Adieresis uacute -30 +KPX Adieresis ucircumflex -30 +KPX Adieresis udieresis -30 +KPX Adieresis ugrave -30 +KPX Adieresis uhungarumlaut -30 +KPX Adieresis umacron -30 +KPX Adieresis uogonek -30 +KPX Adieresis uring -30 +KPX Adieresis v -40 +KPX Adieresis w -30 +KPX Adieresis y -30 +KPX Adieresis yacute -30 +KPX Adieresis ydieresis -30 +KPX Agrave C -40 +KPX Agrave Cacute -40 +KPX Agrave Ccaron -40 +KPX Agrave Ccedilla -40 +KPX Agrave G -50 +KPX Agrave Gbreve -50 +KPX Agrave Gcommaaccent -50 +KPX Agrave O -40 +KPX Agrave Oacute -40 +KPX Agrave Ocircumflex -40 +KPX Agrave Odieresis -40 +KPX Agrave Ograve -40 +KPX Agrave Ohungarumlaut -40 +KPX Agrave Omacron -40 +KPX Agrave Oslash -40 +KPX Agrave Otilde -40 +KPX Agrave Q -40 +KPX Agrave T -90 +KPX Agrave Tcaron -90 +KPX Agrave Tcommaaccent -90 +KPX Agrave U -50 +KPX Agrave Uacute -50 +KPX Agrave Ucircumflex -50 +KPX Agrave Udieresis -50 +KPX Agrave Ugrave -50 +KPX Agrave Uhungarumlaut -50 +KPX Agrave Umacron -50 +KPX Agrave Uogonek -50 +KPX Agrave Uring -50 +KPX Agrave V -80 +KPX Agrave W -60 +KPX Agrave Y -110 +KPX Agrave Yacute -110 +KPX Agrave Ydieresis -110 +KPX Agrave u -30 +KPX Agrave uacute -30 +KPX Agrave ucircumflex -30 +KPX Agrave udieresis -30 +KPX Agrave ugrave -30 +KPX Agrave uhungarumlaut -30 +KPX Agrave umacron -30 +KPX Agrave uogonek -30 +KPX Agrave uring -30 +KPX Agrave v -40 +KPX Agrave w -30 +KPX Agrave y -30 +KPX Agrave yacute -30 +KPX Agrave ydieresis -30 +KPX Amacron C -40 +KPX Amacron Cacute -40 +KPX Amacron Ccaron -40 +KPX Amacron Ccedilla -40 +KPX Amacron G -50 +KPX Amacron Gbreve -50 +KPX Amacron Gcommaaccent -50 +KPX Amacron O -40 +KPX Amacron Oacute -40 +KPX Amacron Ocircumflex -40 +KPX Amacron Odieresis -40 +KPX Amacron Ograve -40 +KPX Amacron Ohungarumlaut -40 +KPX Amacron Omacron -40 +KPX Amacron Oslash -40 +KPX Amacron Otilde -40 +KPX Amacron Q -40 +KPX Amacron T -90 +KPX Amacron Tcaron -90 +KPX Amacron Tcommaaccent -90 +KPX Amacron U -50 +KPX Amacron Uacute -50 +KPX Amacron Ucircumflex -50 +KPX Amacron Udieresis -50 +KPX Amacron Ugrave -50 +KPX Amacron Uhungarumlaut -50 +KPX Amacron Umacron -50 +KPX Amacron Uogonek -50 +KPX Amacron Uring -50 +KPX Amacron V -80 +KPX Amacron W -60 +KPX Amacron Y -110 +KPX Amacron Yacute -110 +KPX Amacron Ydieresis -110 +KPX Amacron u -30 +KPX Amacron uacute -30 +KPX Amacron ucircumflex -30 +KPX Amacron udieresis -30 +KPX Amacron ugrave -30 +KPX Amacron uhungarumlaut -30 +KPX Amacron umacron -30 +KPX Amacron uogonek -30 +KPX Amacron uring -30 +KPX Amacron v -40 +KPX Amacron w -30 +KPX Amacron y -30 +KPX Amacron yacute -30 +KPX Amacron ydieresis -30 +KPX Aogonek C -40 +KPX Aogonek Cacute -40 +KPX Aogonek Ccaron -40 +KPX Aogonek Ccedilla -40 +KPX Aogonek G -50 +KPX Aogonek Gbreve -50 +KPX Aogonek Gcommaaccent -50 +KPX Aogonek O -40 +KPX Aogonek Oacute -40 +KPX Aogonek Ocircumflex -40 +KPX Aogonek Odieresis -40 +KPX Aogonek Ograve -40 +KPX Aogonek Ohungarumlaut -40 +KPX Aogonek Omacron -40 +KPX Aogonek Oslash -40 +KPX Aogonek Otilde -40 +KPX Aogonek Q -40 +KPX Aogonek T -90 +KPX Aogonek Tcaron -90 +KPX Aogonek Tcommaaccent -90 +KPX Aogonek U -50 +KPX Aogonek Uacute -50 +KPX Aogonek Ucircumflex -50 +KPX Aogonek Udieresis -50 +KPX Aogonek Ugrave -50 +KPX Aogonek Uhungarumlaut -50 +KPX Aogonek Umacron -50 +KPX Aogonek Uogonek -50 +KPX Aogonek Uring -50 +KPX Aogonek V -80 +KPX Aogonek W -60 +KPX Aogonek Y -110 +KPX Aogonek Yacute -110 +KPX Aogonek Ydieresis -110 +KPX Aogonek u -30 +KPX Aogonek uacute -30 +KPX Aogonek ucircumflex -30 +KPX Aogonek udieresis -30 +KPX Aogonek ugrave -30 +KPX Aogonek uhungarumlaut -30 +KPX Aogonek umacron -30 +KPX Aogonek uogonek -30 +KPX Aogonek uring -30 +KPX Aogonek v -40 +KPX Aogonek w -30 +KPX Aogonek y -30 +KPX Aogonek yacute -30 +KPX Aogonek ydieresis -30 +KPX Aring C -40 +KPX Aring Cacute -40 +KPX Aring Ccaron -40 +KPX Aring Ccedilla -40 +KPX Aring G -50 +KPX Aring Gbreve -50 +KPX Aring Gcommaaccent -50 +KPX Aring O -40 +KPX Aring Oacute -40 +KPX Aring Ocircumflex -40 +KPX Aring Odieresis -40 +KPX Aring Ograve -40 +KPX Aring Ohungarumlaut -40 +KPX Aring Omacron -40 +KPX Aring Oslash -40 +KPX Aring Otilde -40 +KPX Aring Q -40 +KPX Aring T -90 +KPX Aring Tcaron -90 +KPX Aring Tcommaaccent -90 +KPX Aring U -50 +KPX Aring Uacute -50 +KPX Aring Ucircumflex -50 +KPX Aring Udieresis -50 +KPX Aring Ugrave -50 +KPX Aring Uhungarumlaut -50 +KPX Aring Umacron -50 +KPX Aring Uogonek -50 +KPX Aring Uring -50 +KPX Aring V -80 +KPX Aring W -60 +KPX Aring Y -110 +KPX Aring Yacute -110 +KPX Aring Ydieresis -110 +KPX Aring u -30 +KPX Aring uacute -30 +KPX Aring ucircumflex -30 +KPX Aring udieresis -30 +KPX Aring ugrave -30 +KPX Aring uhungarumlaut -30 +KPX Aring umacron -30 +KPX Aring uogonek -30 +KPX Aring uring -30 +KPX Aring v -40 +KPX Aring w -30 +KPX Aring y -30 +KPX Aring yacute -30 +KPX Aring ydieresis -30 +KPX Atilde C -40 +KPX Atilde Cacute -40 +KPX Atilde Ccaron -40 +KPX Atilde Ccedilla -40 +KPX Atilde G -50 +KPX Atilde Gbreve -50 +KPX Atilde Gcommaaccent -50 +KPX Atilde O -40 +KPX Atilde Oacute -40 +KPX Atilde Ocircumflex -40 +KPX Atilde Odieresis -40 +KPX Atilde Ograve -40 +KPX Atilde Ohungarumlaut -40 +KPX Atilde Omacron -40 +KPX Atilde Oslash -40 +KPX Atilde Otilde -40 +KPX Atilde Q -40 +KPX Atilde T -90 +KPX Atilde Tcaron -90 +KPX Atilde Tcommaaccent -90 +KPX Atilde U -50 +KPX Atilde Uacute -50 +KPX Atilde Ucircumflex -50 +KPX Atilde Udieresis -50 +KPX Atilde Ugrave -50 +KPX Atilde Uhungarumlaut -50 +KPX Atilde Umacron -50 +KPX Atilde Uogonek -50 +KPX Atilde Uring -50 +KPX Atilde V -80 +KPX Atilde W -60 +KPX Atilde Y -110 +KPX Atilde Yacute -110 +KPX Atilde Ydieresis -110 +KPX Atilde u -30 +KPX Atilde uacute -30 +KPX Atilde ucircumflex -30 +KPX Atilde udieresis -30 +KPX Atilde ugrave -30 +KPX Atilde uhungarumlaut -30 +KPX Atilde umacron -30 +KPX Atilde uogonek -30 +KPX Atilde uring -30 +KPX Atilde v -40 +KPX Atilde w -30 +KPX Atilde y -30 +KPX Atilde yacute -30 +KPX Atilde ydieresis -30 +KPX B A -30 +KPX B Aacute -30 +KPX B Abreve -30 +KPX B Acircumflex -30 +KPX B Adieresis -30 +KPX B Agrave -30 +KPX B Amacron -30 +KPX B Aogonek -30 +KPX B Aring -30 +KPX B Atilde -30 +KPX B U -10 +KPX B Uacute -10 +KPX B Ucircumflex -10 +KPX B Udieresis -10 +KPX B Ugrave -10 +KPX B Uhungarumlaut -10 +KPX B Umacron -10 +KPX B Uogonek -10 +KPX B Uring -10 +KPX D A -40 +KPX D Aacute -40 +KPX D Abreve -40 +KPX D Acircumflex -40 +KPX D Adieresis -40 +KPX D Agrave -40 +KPX D Amacron -40 +KPX D Aogonek -40 +KPX D Aring -40 +KPX D Atilde -40 +KPX D V -40 +KPX D W -40 +KPX D Y -70 +KPX D Yacute -70 +KPX D Ydieresis -70 +KPX D comma -30 +KPX D period -30 +KPX Dcaron A -40 +KPX Dcaron Aacute -40 +KPX Dcaron Abreve -40 +KPX Dcaron Acircumflex -40 +KPX Dcaron Adieresis -40 +KPX Dcaron Agrave -40 +KPX Dcaron Amacron -40 +KPX Dcaron Aogonek -40 +KPX Dcaron Aring -40 +KPX Dcaron Atilde -40 +KPX Dcaron V -40 +KPX Dcaron W -40 +KPX Dcaron Y -70 +KPX Dcaron Yacute -70 +KPX Dcaron Ydieresis -70 +KPX Dcaron comma -30 +KPX Dcaron period -30 +KPX Dcroat A -40 +KPX Dcroat Aacute -40 +KPX Dcroat Abreve -40 +KPX Dcroat Acircumflex -40 +KPX Dcroat Adieresis -40 +KPX Dcroat Agrave -40 +KPX Dcroat Amacron -40 +KPX Dcroat Aogonek -40 +KPX Dcroat Aring -40 +KPX Dcroat Atilde -40 +KPX Dcroat V -40 +KPX Dcroat W -40 +KPX Dcroat Y -70 +KPX Dcroat Yacute -70 +KPX Dcroat Ydieresis -70 +KPX Dcroat comma -30 +KPX Dcroat period -30 +KPX F A -80 +KPX F Aacute -80 +KPX F Abreve -80 +KPX F Acircumflex -80 +KPX F Adieresis -80 +KPX F Agrave -80 +KPX F Amacron -80 +KPX F Aogonek -80 +KPX F Aring -80 +KPX F Atilde -80 +KPX F a -20 +KPX F aacute -20 +KPX F abreve -20 +KPX F acircumflex -20 +KPX F adieresis -20 +KPX F agrave -20 +KPX F amacron -20 +KPX F aogonek -20 +KPX F aring -20 +KPX F atilde -20 +KPX F comma -100 +KPX F period -100 +KPX J A -20 +KPX J Aacute -20 +KPX J Abreve -20 +KPX J Acircumflex -20 +KPX J Adieresis -20 +KPX J Agrave -20 +KPX J Amacron -20 +KPX J Aogonek -20 +KPX J Aring -20 +KPX J Atilde -20 +KPX J comma -20 +KPX J period -20 +KPX J u -20 +KPX J uacute -20 +KPX J ucircumflex -20 +KPX J udieresis -20 +KPX J ugrave -20 +KPX J uhungarumlaut -20 +KPX J umacron -20 +KPX J uogonek -20 +KPX J uring -20 +KPX K O -30 +KPX K Oacute -30 +KPX K Ocircumflex -30 +KPX K Odieresis -30 +KPX K Ograve -30 +KPX K Ohungarumlaut -30 +KPX K Omacron -30 +KPX K Oslash -30 +KPX K Otilde -30 +KPX K e -15 +KPX K eacute -15 +KPX K ecaron -15 +KPX K ecircumflex -15 +KPX K edieresis -15 +KPX K edotaccent -15 +KPX K egrave -15 +KPX K emacron -15 +KPX K eogonek -15 +KPX K o -35 +KPX K oacute -35 +KPX K ocircumflex -35 +KPX K odieresis -35 +KPX K ograve -35 +KPX K ohungarumlaut -35 +KPX K omacron -35 +KPX K oslash -35 +KPX K otilde -35 +KPX K u -30 +KPX K uacute -30 +KPX K ucircumflex -30 +KPX K udieresis -30 +KPX K ugrave -30 +KPX K uhungarumlaut -30 +KPX K umacron -30 +KPX K uogonek -30 +KPX K uring -30 +KPX K y -40 +KPX K yacute -40 +KPX K ydieresis -40 +KPX Kcommaaccent O -30 +KPX Kcommaaccent Oacute -30 +KPX Kcommaaccent Ocircumflex -30 +KPX Kcommaaccent Odieresis -30 +KPX Kcommaaccent Ograve -30 +KPX Kcommaaccent Ohungarumlaut -30 +KPX Kcommaaccent Omacron -30 +KPX Kcommaaccent Oslash -30 +KPX Kcommaaccent Otilde -30 +KPX Kcommaaccent e -15 +KPX Kcommaaccent eacute -15 +KPX Kcommaaccent ecaron -15 +KPX Kcommaaccent ecircumflex -15 +KPX Kcommaaccent edieresis -15 +KPX Kcommaaccent edotaccent -15 +KPX Kcommaaccent egrave -15 +KPX Kcommaaccent emacron -15 +KPX Kcommaaccent eogonek -15 +KPX Kcommaaccent o -35 +KPX Kcommaaccent oacute -35 +KPX Kcommaaccent ocircumflex -35 +KPX Kcommaaccent odieresis -35 +KPX Kcommaaccent ograve -35 +KPX Kcommaaccent ohungarumlaut -35 +KPX Kcommaaccent omacron -35 +KPX Kcommaaccent oslash -35 +KPX Kcommaaccent otilde -35 +KPX Kcommaaccent u -30 +KPX Kcommaaccent uacute -30 +KPX Kcommaaccent ucircumflex -30 +KPX Kcommaaccent udieresis -30 +KPX Kcommaaccent ugrave -30 +KPX Kcommaaccent uhungarumlaut -30 +KPX Kcommaaccent umacron -30 +KPX Kcommaaccent uogonek -30 +KPX Kcommaaccent uring -30 +KPX Kcommaaccent y -40 +KPX Kcommaaccent yacute -40 +KPX Kcommaaccent ydieresis -40 +KPX L T -90 +KPX L Tcaron -90 +KPX L Tcommaaccent -90 +KPX L V -110 +KPX L W -80 +KPX L Y -120 +KPX L Yacute -120 +KPX L Ydieresis -120 +KPX L quotedblright -140 +KPX L quoteright -140 +KPX L y -30 +KPX L yacute -30 +KPX L ydieresis -30 +KPX Lacute T -90 +KPX Lacute Tcaron -90 +KPX Lacute Tcommaaccent -90 +KPX Lacute V -110 +KPX Lacute W -80 +KPX Lacute Y -120 +KPX Lacute Yacute -120 +KPX Lacute Ydieresis -120 +KPX Lacute quotedblright -140 +KPX Lacute quoteright -140 +KPX Lacute y -30 +KPX Lacute yacute -30 +KPX Lacute ydieresis -30 +KPX Lcommaaccent T -90 +KPX Lcommaaccent Tcaron -90 +KPX Lcommaaccent Tcommaaccent -90 +KPX Lcommaaccent V -110 +KPX Lcommaaccent W -80 +KPX Lcommaaccent Y -120 +KPX Lcommaaccent Yacute -120 +KPX Lcommaaccent Ydieresis -120 +KPX Lcommaaccent quotedblright -140 +KPX Lcommaaccent quoteright -140 +KPX Lcommaaccent y -30 +KPX Lcommaaccent yacute -30 +KPX Lcommaaccent ydieresis -30 +KPX Lslash T -90 +KPX Lslash Tcaron -90 +KPX Lslash Tcommaaccent -90 +KPX Lslash V -110 +KPX Lslash W -80 +KPX Lslash Y -120 +KPX Lslash Yacute -120 +KPX Lslash Ydieresis -120 +KPX Lslash quotedblright -140 +KPX Lslash quoteright -140 +KPX Lslash y -30 +KPX Lslash yacute -30 +KPX Lslash ydieresis -30 +KPX O A -50 +KPX O Aacute -50 +KPX O Abreve -50 +KPX O Acircumflex -50 +KPX O Adieresis -50 +KPX O Agrave -50 +KPX O Amacron -50 +KPX O Aogonek -50 +KPX O Aring -50 +KPX O Atilde -50 +KPX O T -40 +KPX O Tcaron -40 +KPX O Tcommaaccent -40 +KPX O V -50 +KPX O W -50 +KPX O X -50 +KPX O Y -70 +KPX O Yacute -70 +KPX O Ydieresis -70 +KPX O comma -40 +KPX O period -40 +KPX Oacute A -50 +KPX Oacute Aacute -50 +KPX Oacute Abreve -50 +KPX Oacute Acircumflex -50 +KPX Oacute Adieresis -50 +KPX Oacute Agrave -50 +KPX Oacute Amacron -50 +KPX Oacute Aogonek -50 +KPX Oacute Aring -50 +KPX Oacute Atilde -50 +KPX Oacute T -40 +KPX Oacute Tcaron -40 +KPX Oacute Tcommaaccent -40 +KPX Oacute V -50 +KPX Oacute W -50 +KPX Oacute X -50 +KPX Oacute Y -70 +KPX Oacute Yacute -70 +KPX Oacute Ydieresis -70 +KPX Oacute comma -40 +KPX Oacute period -40 +KPX Ocircumflex A -50 +KPX Ocircumflex Aacute -50 +KPX Ocircumflex Abreve -50 +KPX Ocircumflex Acircumflex -50 +KPX Ocircumflex Adieresis -50 +KPX Ocircumflex Agrave -50 +KPX Ocircumflex Amacron -50 +KPX Ocircumflex Aogonek -50 +KPX Ocircumflex Aring -50 +KPX Ocircumflex Atilde -50 +KPX Ocircumflex T -40 +KPX Ocircumflex Tcaron -40 +KPX Ocircumflex Tcommaaccent -40 +KPX Ocircumflex V -50 +KPX Ocircumflex W -50 +KPX Ocircumflex X -50 +KPX Ocircumflex Y -70 +KPX Ocircumflex Yacute -70 +KPX Ocircumflex Ydieresis -70 +KPX Ocircumflex comma -40 +KPX Ocircumflex period -40 +KPX Odieresis A -50 +KPX Odieresis Aacute -50 +KPX Odieresis Abreve -50 +KPX Odieresis Acircumflex -50 +KPX Odieresis Adieresis -50 +KPX Odieresis Agrave -50 +KPX Odieresis Amacron -50 +KPX Odieresis Aogonek -50 +KPX Odieresis Aring -50 +KPX Odieresis Atilde -50 +KPX Odieresis T -40 +KPX Odieresis Tcaron -40 +KPX Odieresis Tcommaaccent -40 +KPX Odieresis V -50 +KPX Odieresis W -50 +KPX Odieresis X -50 +KPX Odieresis Y -70 +KPX Odieresis Yacute -70 +KPX Odieresis Ydieresis -70 +KPX Odieresis comma -40 +KPX Odieresis period -40 +KPX Ograve A -50 +KPX Ograve Aacute -50 +KPX Ograve Abreve -50 +KPX Ograve Acircumflex -50 +KPX Ograve Adieresis -50 +KPX Ograve Agrave -50 +KPX Ograve Amacron -50 +KPX Ograve Aogonek -50 +KPX Ograve Aring -50 +KPX Ograve Atilde -50 +KPX Ograve T -40 +KPX Ograve Tcaron -40 +KPX Ograve Tcommaaccent -40 +KPX Ograve V -50 +KPX Ograve W -50 +KPX Ograve X -50 +KPX Ograve Y -70 +KPX Ograve Yacute -70 +KPX Ograve Ydieresis -70 +KPX Ograve comma -40 +KPX Ograve period -40 +KPX Ohungarumlaut A -50 +KPX Ohungarumlaut Aacute -50 +KPX Ohungarumlaut Abreve -50 +KPX Ohungarumlaut Acircumflex -50 +KPX Ohungarumlaut Adieresis -50 +KPX Ohungarumlaut Agrave -50 +KPX Ohungarumlaut Amacron -50 +KPX Ohungarumlaut Aogonek -50 +KPX Ohungarumlaut Aring -50 +KPX Ohungarumlaut Atilde -50 +KPX Ohungarumlaut T -40 +KPX Ohungarumlaut Tcaron -40 +KPX Ohungarumlaut Tcommaaccent -40 +KPX Ohungarumlaut V -50 +KPX Ohungarumlaut W -50 +KPX Ohungarumlaut X -50 +KPX Ohungarumlaut Y -70 +KPX Ohungarumlaut Yacute -70 +KPX Ohungarumlaut Ydieresis -70 +KPX Ohungarumlaut comma -40 +KPX Ohungarumlaut period -40 +KPX Omacron A -50 +KPX Omacron Aacute -50 +KPX Omacron Abreve -50 +KPX Omacron Acircumflex -50 +KPX Omacron Adieresis -50 +KPX Omacron Agrave -50 +KPX Omacron Amacron -50 +KPX Omacron Aogonek -50 +KPX Omacron Aring -50 +KPX Omacron Atilde -50 +KPX Omacron T -40 +KPX Omacron Tcaron -40 +KPX Omacron Tcommaaccent -40 +KPX Omacron V -50 +KPX Omacron W -50 +KPX Omacron X -50 +KPX Omacron Y -70 +KPX Omacron Yacute -70 +KPX Omacron Ydieresis -70 +KPX Omacron comma -40 +KPX Omacron period -40 +KPX Oslash A -50 +KPX Oslash Aacute -50 +KPX Oslash Abreve -50 +KPX Oslash Acircumflex -50 +KPX Oslash Adieresis -50 +KPX Oslash Agrave -50 +KPX Oslash Amacron -50 +KPX Oslash Aogonek -50 +KPX Oslash Aring -50 +KPX Oslash Atilde -50 +KPX Oslash T -40 +KPX Oslash Tcaron -40 +KPX Oslash Tcommaaccent -40 +KPX Oslash V -50 +KPX Oslash W -50 +KPX Oslash X -50 +KPX Oslash Y -70 +KPX Oslash Yacute -70 +KPX Oslash Ydieresis -70 +KPX Oslash comma -40 +KPX Oslash period -40 +KPX Otilde A -50 +KPX Otilde Aacute -50 +KPX Otilde Abreve -50 +KPX Otilde Acircumflex -50 +KPX Otilde Adieresis -50 +KPX Otilde Agrave -50 +KPX Otilde Amacron -50 +KPX Otilde Aogonek -50 +KPX Otilde Aring -50 +KPX Otilde Atilde -50 +KPX Otilde T -40 +KPX Otilde Tcaron -40 +KPX Otilde Tcommaaccent -40 +KPX Otilde V -50 +KPX Otilde W -50 +KPX Otilde X -50 +KPX Otilde Y -70 +KPX Otilde Yacute -70 +KPX Otilde Ydieresis -70 +KPX Otilde comma -40 +KPX Otilde period -40 +KPX P A -100 +KPX P Aacute -100 +KPX P Abreve -100 +KPX P Acircumflex -100 +KPX P Adieresis -100 +KPX P Agrave -100 +KPX P Amacron -100 +KPX P Aogonek -100 +KPX P Aring -100 +KPX P Atilde -100 +KPX P a -30 +KPX P aacute -30 +KPX P abreve -30 +KPX P acircumflex -30 +KPX P adieresis -30 +KPX P agrave -30 +KPX P amacron -30 +KPX P aogonek -30 +KPX P aring -30 +KPX P atilde -30 +KPX P comma -120 +KPX P e -30 +KPX P eacute -30 +KPX P ecaron -30 +KPX P ecircumflex -30 +KPX P edieresis -30 +KPX P edotaccent -30 +KPX P egrave -30 +KPX P emacron -30 +KPX P eogonek -30 +KPX P o -40 +KPX P oacute -40 +KPX P ocircumflex -40 +KPX P odieresis -40 +KPX P ograve -40 +KPX P ohungarumlaut -40 +KPX P omacron -40 +KPX P oslash -40 +KPX P otilde -40 +KPX P period -120 +KPX Q U -10 +KPX Q Uacute -10 +KPX Q Ucircumflex -10 +KPX Q Udieresis -10 +KPX Q Ugrave -10 +KPX Q Uhungarumlaut -10 +KPX Q Umacron -10 +KPX Q Uogonek -10 +KPX Q Uring -10 +KPX Q comma 20 +KPX Q period 20 +KPX R O -20 +KPX R Oacute -20 +KPX R Ocircumflex -20 +KPX R Odieresis -20 +KPX R Ograve -20 +KPX R Ohungarumlaut -20 +KPX R Omacron -20 +KPX R Oslash -20 +KPX R Otilde -20 +KPX R T -20 +KPX R Tcaron -20 +KPX R Tcommaaccent -20 +KPX R U -20 +KPX R Uacute -20 +KPX R Ucircumflex -20 +KPX R Udieresis -20 +KPX R Ugrave -20 +KPX R Uhungarumlaut -20 +KPX R Umacron -20 +KPX R Uogonek -20 +KPX R Uring -20 +KPX R V -50 +KPX R W -40 +KPX R Y -50 +KPX R Yacute -50 +KPX R Ydieresis -50 +KPX Racute O -20 +KPX Racute Oacute -20 +KPX Racute Ocircumflex -20 +KPX Racute Odieresis -20 +KPX Racute Ograve -20 +KPX Racute Ohungarumlaut -20 +KPX Racute Omacron -20 +KPX Racute Oslash -20 +KPX Racute Otilde -20 +KPX Racute T -20 +KPX Racute Tcaron -20 +KPX Racute Tcommaaccent -20 +KPX Racute U -20 +KPX Racute Uacute -20 +KPX Racute Ucircumflex -20 +KPX Racute Udieresis -20 +KPX Racute Ugrave -20 +KPX Racute Uhungarumlaut -20 +KPX Racute Umacron -20 +KPX Racute Uogonek -20 +KPX Racute Uring -20 +KPX Racute V -50 +KPX Racute W -40 +KPX Racute Y -50 +KPX Racute Yacute -50 +KPX Racute Ydieresis -50 +KPX Rcaron O -20 +KPX Rcaron Oacute -20 +KPX Rcaron Ocircumflex -20 +KPX Rcaron Odieresis -20 +KPX Rcaron Ograve -20 +KPX Rcaron Ohungarumlaut -20 +KPX Rcaron Omacron -20 +KPX Rcaron Oslash -20 +KPX Rcaron Otilde -20 +KPX Rcaron T -20 +KPX Rcaron Tcaron -20 +KPX Rcaron Tcommaaccent -20 +KPX Rcaron U -20 +KPX Rcaron Uacute -20 +KPX Rcaron Ucircumflex -20 +KPX Rcaron Udieresis -20 +KPX Rcaron Ugrave -20 +KPX Rcaron Uhungarumlaut -20 +KPX Rcaron Umacron -20 +KPX Rcaron Uogonek -20 +KPX Rcaron Uring -20 +KPX Rcaron V -50 +KPX Rcaron W -40 +KPX Rcaron Y -50 +KPX Rcaron Yacute -50 +KPX Rcaron Ydieresis -50 +KPX Rcommaaccent O -20 +KPX Rcommaaccent Oacute -20 +KPX Rcommaaccent Ocircumflex -20 +KPX Rcommaaccent Odieresis -20 +KPX Rcommaaccent Ograve -20 +KPX Rcommaaccent Ohungarumlaut -20 +KPX Rcommaaccent Omacron -20 +KPX Rcommaaccent Oslash -20 +KPX Rcommaaccent Otilde -20 +KPX Rcommaaccent T -20 +KPX Rcommaaccent Tcaron -20 +KPX Rcommaaccent Tcommaaccent -20 +KPX Rcommaaccent U -20 +KPX Rcommaaccent Uacute -20 +KPX Rcommaaccent Ucircumflex -20 +KPX Rcommaaccent Udieresis -20 +KPX Rcommaaccent Ugrave -20 +KPX Rcommaaccent Uhungarumlaut -20 +KPX Rcommaaccent Umacron -20 +KPX Rcommaaccent Uogonek -20 +KPX Rcommaaccent Uring -20 +KPX Rcommaaccent V -50 +KPX Rcommaaccent W -40 +KPX Rcommaaccent Y -50 +KPX Rcommaaccent Yacute -50 +KPX Rcommaaccent Ydieresis -50 +KPX T A -90 +KPX T Aacute -90 +KPX T Abreve -90 +KPX T Acircumflex -90 +KPX T Adieresis -90 +KPX T Agrave -90 +KPX T Amacron -90 +KPX T Aogonek -90 +KPX T Aring -90 +KPX T Atilde -90 +KPX T O -40 +KPX T Oacute -40 +KPX T Ocircumflex -40 +KPX T Odieresis -40 +KPX T Ograve -40 +KPX T Ohungarumlaut -40 +KPX T Omacron -40 +KPX T Oslash -40 +KPX T Otilde -40 +KPX T a -80 +KPX T aacute -80 +KPX T abreve -80 +KPX T acircumflex -80 +KPX T adieresis -80 +KPX T agrave -80 +KPX T amacron -80 +KPX T aogonek -80 +KPX T aring -80 +KPX T atilde -80 +KPX T colon -40 +KPX T comma -80 +KPX T e -60 +KPX T eacute -60 +KPX T ecaron -60 +KPX T ecircumflex -60 +KPX T edieresis -60 +KPX T edotaccent -60 +KPX T egrave -60 +KPX T emacron -60 +KPX T eogonek -60 +KPX T hyphen -120 +KPX T o -80 +KPX T oacute -80 +KPX T ocircumflex -80 +KPX T odieresis -80 +KPX T ograve -80 +KPX T ohungarumlaut -80 +KPX T omacron -80 +KPX T oslash -80 +KPX T otilde -80 +KPX T period -80 +KPX T r -80 +KPX T racute -80 +KPX T rcommaaccent -80 +KPX T semicolon -40 +KPX T u -90 +KPX T uacute -90 +KPX T ucircumflex -90 +KPX T udieresis -90 +KPX T ugrave -90 +KPX T uhungarumlaut -90 +KPX T umacron -90 +KPX T uogonek -90 +KPX T uring -90 +KPX T w -60 +KPX T y -60 +KPX T yacute -60 +KPX T ydieresis -60 +KPX Tcaron A -90 +KPX Tcaron Aacute -90 +KPX Tcaron Abreve -90 +KPX Tcaron Acircumflex -90 +KPX Tcaron Adieresis -90 +KPX Tcaron Agrave -90 +KPX Tcaron Amacron -90 +KPX Tcaron Aogonek -90 +KPX Tcaron Aring -90 +KPX Tcaron Atilde -90 +KPX Tcaron O -40 +KPX Tcaron Oacute -40 +KPX Tcaron Ocircumflex -40 +KPX Tcaron Odieresis -40 +KPX Tcaron Ograve -40 +KPX Tcaron Ohungarumlaut -40 +KPX Tcaron Omacron -40 +KPX Tcaron Oslash -40 +KPX Tcaron Otilde -40 +KPX Tcaron a -80 +KPX Tcaron aacute -80 +KPX Tcaron abreve -80 +KPX Tcaron acircumflex -80 +KPX Tcaron adieresis -80 +KPX Tcaron agrave -80 +KPX Tcaron amacron -80 +KPX Tcaron aogonek -80 +KPX Tcaron aring -80 +KPX Tcaron atilde -80 +KPX Tcaron colon -40 +KPX Tcaron comma -80 +KPX Tcaron e -60 +KPX Tcaron eacute -60 +KPX Tcaron ecaron -60 +KPX Tcaron ecircumflex -60 +KPX Tcaron edieresis -60 +KPX Tcaron edotaccent -60 +KPX Tcaron egrave -60 +KPX Tcaron emacron -60 +KPX Tcaron eogonek -60 +KPX Tcaron hyphen -120 +KPX Tcaron o -80 +KPX Tcaron oacute -80 +KPX Tcaron ocircumflex -80 +KPX Tcaron odieresis -80 +KPX Tcaron ograve -80 +KPX Tcaron ohungarumlaut -80 +KPX Tcaron omacron -80 +KPX Tcaron oslash -80 +KPX Tcaron otilde -80 +KPX Tcaron period -80 +KPX Tcaron r -80 +KPX Tcaron racute -80 +KPX Tcaron rcommaaccent -80 +KPX Tcaron semicolon -40 +KPX Tcaron u -90 +KPX Tcaron uacute -90 +KPX Tcaron ucircumflex -90 +KPX Tcaron udieresis -90 +KPX Tcaron ugrave -90 +KPX Tcaron uhungarumlaut -90 +KPX Tcaron umacron -90 +KPX Tcaron uogonek -90 +KPX Tcaron uring -90 +KPX Tcaron w -60 +KPX Tcaron y -60 +KPX Tcaron yacute -60 +KPX Tcaron ydieresis -60 +KPX Tcommaaccent A -90 +KPX Tcommaaccent Aacute -90 +KPX Tcommaaccent Abreve -90 +KPX Tcommaaccent Acircumflex -90 +KPX Tcommaaccent Adieresis -90 +KPX Tcommaaccent Agrave -90 +KPX Tcommaaccent Amacron -90 +KPX Tcommaaccent Aogonek -90 +KPX Tcommaaccent Aring -90 +KPX Tcommaaccent Atilde -90 +KPX Tcommaaccent O -40 +KPX Tcommaaccent Oacute -40 +KPX Tcommaaccent Ocircumflex -40 +KPX Tcommaaccent Odieresis -40 +KPX Tcommaaccent Ograve -40 +KPX Tcommaaccent Ohungarumlaut -40 +KPX Tcommaaccent Omacron -40 +KPX Tcommaaccent Oslash -40 +KPX Tcommaaccent Otilde -40 +KPX Tcommaaccent a -80 +KPX Tcommaaccent aacute -80 +KPX Tcommaaccent abreve -80 +KPX Tcommaaccent acircumflex -80 +KPX Tcommaaccent adieresis -80 +KPX Tcommaaccent agrave -80 +KPX Tcommaaccent amacron -80 +KPX Tcommaaccent aogonek -80 +KPX Tcommaaccent aring -80 +KPX Tcommaaccent atilde -80 +KPX Tcommaaccent colon -40 +KPX Tcommaaccent comma -80 +KPX Tcommaaccent e -60 +KPX Tcommaaccent eacute -60 +KPX Tcommaaccent ecaron -60 +KPX Tcommaaccent ecircumflex -60 +KPX Tcommaaccent edieresis -60 +KPX Tcommaaccent edotaccent -60 +KPX Tcommaaccent egrave -60 +KPX Tcommaaccent emacron -60 +KPX Tcommaaccent eogonek -60 +KPX Tcommaaccent hyphen -120 +KPX Tcommaaccent o -80 +KPX Tcommaaccent oacute -80 +KPX Tcommaaccent ocircumflex -80 +KPX Tcommaaccent odieresis -80 +KPX Tcommaaccent ograve -80 +KPX Tcommaaccent ohungarumlaut -80 +KPX Tcommaaccent omacron -80 +KPX Tcommaaccent oslash -80 +KPX Tcommaaccent otilde -80 +KPX Tcommaaccent period -80 +KPX Tcommaaccent r -80 +KPX Tcommaaccent racute -80 +KPX Tcommaaccent rcommaaccent -80 +KPX Tcommaaccent semicolon -40 +KPX Tcommaaccent u -90 +KPX Tcommaaccent uacute -90 +KPX Tcommaaccent ucircumflex -90 +KPX Tcommaaccent udieresis -90 +KPX Tcommaaccent ugrave -90 +KPX Tcommaaccent uhungarumlaut -90 +KPX Tcommaaccent umacron -90 +KPX Tcommaaccent uogonek -90 +KPX Tcommaaccent uring -90 +KPX Tcommaaccent w -60 +KPX Tcommaaccent y -60 +KPX Tcommaaccent yacute -60 +KPX Tcommaaccent ydieresis -60 +KPX U A -50 +KPX U Aacute -50 +KPX U Abreve -50 +KPX U Acircumflex -50 +KPX U Adieresis -50 +KPX U Agrave -50 +KPX U Amacron -50 +KPX U Aogonek -50 +KPX U Aring -50 +KPX U Atilde -50 +KPX U comma -30 +KPX U period -30 +KPX Uacute A -50 +KPX Uacute Aacute -50 +KPX Uacute Abreve -50 +KPX Uacute Acircumflex -50 +KPX Uacute Adieresis -50 +KPX Uacute Agrave -50 +KPX Uacute Amacron -50 +KPX Uacute Aogonek -50 +KPX Uacute Aring -50 +KPX Uacute Atilde -50 +KPX Uacute comma -30 +KPX Uacute period -30 +KPX Ucircumflex A -50 +KPX Ucircumflex Aacute -50 +KPX Ucircumflex Abreve -50 +KPX Ucircumflex Acircumflex -50 +KPX Ucircumflex Adieresis -50 +KPX Ucircumflex Agrave -50 +KPX Ucircumflex Amacron -50 +KPX Ucircumflex Aogonek -50 +KPX Ucircumflex Aring -50 +KPX Ucircumflex Atilde -50 +KPX Ucircumflex comma -30 +KPX Ucircumflex period -30 +KPX Udieresis A -50 +KPX Udieresis Aacute -50 +KPX Udieresis Abreve -50 +KPX Udieresis Acircumflex -50 +KPX Udieresis Adieresis -50 +KPX Udieresis Agrave -50 +KPX Udieresis Amacron -50 +KPX Udieresis Aogonek -50 +KPX Udieresis Aring -50 +KPX Udieresis Atilde -50 +KPX Udieresis comma -30 +KPX Udieresis period -30 +KPX Ugrave A -50 +KPX Ugrave Aacute -50 +KPX Ugrave Abreve -50 +KPX Ugrave Acircumflex -50 +KPX Ugrave Adieresis -50 +KPX Ugrave Agrave -50 +KPX Ugrave Amacron -50 +KPX Ugrave Aogonek -50 +KPX Ugrave Aring -50 +KPX Ugrave Atilde -50 +KPX Ugrave comma -30 +KPX Ugrave period -30 +KPX Uhungarumlaut A -50 +KPX Uhungarumlaut Aacute -50 +KPX Uhungarumlaut Abreve -50 +KPX Uhungarumlaut Acircumflex -50 +KPX Uhungarumlaut Adieresis -50 +KPX Uhungarumlaut Agrave -50 +KPX Uhungarumlaut Amacron -50 +KPX Uhungarumlaut Aogonek -50 +KPX Uhungarumlaut Aring -50 +KPX Uhungarumlaut Atilde -50 +KPX Uhungarumlaut comma -30 +KPX Uhungarumlaut period -30 +KPX Umacron A -50 +KPX Umacron Aacute -50 +KPX Umacron Abreve -50 +KPX Umacron Acircumflex -50 +KPX Umacron Adieresis -50 +KPX Umacron Agrave -50 +KPX Umacron Amacron -50 +KPX Umacron Aogonek -50 +KPX Umacron Aring -50 +KPX Umacron Atilde -50 +KPX Umacron comma -30 +KPX Umacron period -30 +KPX Uogonek A -50 +KPX Uogonek Aacute -50 +KPX Uogonek Abreve -50 +KPX Uogonek Acircumflex -50 +KPX Uogonek Adieresis -50 +KPX Uogonek Agrave -50 +KPX Uogonek Amacron -50 +KPX Uogonek Aogonek -50 +KPX Uogonek Aring -50 +KPX Uogonek Atilde -50 +KPX Uogonek comma -30 +KPX Uogonek period -30 +KPX Uring A -50 +KPX Uring Aacute -50 +KPX Uring Abreve -50 +KPX Uring Acircumflex -50 +KPX Uring Adieresis -50 +KPX Uring Agrave -50 +KPX Uring Amacron -50 +KPX Uring Aogonek -50 +KPX Uring Aring -50 +KPX Uring Atilde -50 +KPX Uring comma -30 +KPX Uring period -30 +KPX V A -80 +KPX V Aacute -80 +KPX V Abreve -80 +KPX V Acircumflex -80 +KPX V Adieresis -80 +KPX V Agrave -80 +KPX V Amacron -80 +KPX V Aogonek -80 +KPX V Aring -80 +KPX V Atilde -80 +KPX V G -50 +KPX V Gbreve -50 +KPX V Gcommaaccent -50 +KPX V O -50 +KPX V Oacute -50 +KPX V Ocircumflex -50 +KPX V Odieresis -50 +KPX V Ograve -50 +KPX V Ohungarumlaut -50 +KPX V Omacron -50 +KPX V Oslash -50 +KPX V Otilde -50 +KPX V a -60 +KPX V aacute -60 +KPX V abreve -60 +KPX V acircumflex -60 +KPX V adieresis -60 +KPX V agrave -60 +KPX V amacron -60 +KPX V aogonek -60 +KPX V aring -60 +KPX V atilde -60 +KPX V colon -40 +KPX V comma -120 +KPX V e -50 +KPX V eacute -50 +KPX V ecaron -50 +KPX V ecircumflex -50 +KPX V edieresis -50 +KPX V edotaccent -50 +KPX V egrave -50 +KPX V emacron -50 +KPX V eogonek -50 +KPX V hyphen -80 +KPX V o -90 +KPX V oacute -90 +KPX V ocircumflex -90 +KPX V odieresis -90 +KPX V ograve -90 +KPX V ohungarumlaut -90 +KPX V omacron -90 +KPX V oslash -90 +KPX V otilde -90 +KPX V period -120 +KPX V semicolon -40 +KPX V u -60 +KPX V uacute -60 +KPX V ucircumflex -60 +KPX V udieresis -60 +KPX V ugrave -60 +KPX V uhungarumlaut -60 +KPX V umacron -60 +KPX V uogonek -60 +KPX V uring -60 +KPX W A -60 +KPX W Aacute -60 +KPX W Abreve -60 +KPX W Acircumflex -60 +KPX W Adieresis -60 +KPX W Agrave -60 +KPX W Amacron -60 +KPX W Aogonek -60 +KPX W Aring -60 +KPX W Atilde -60 +KPX W O -20 +KPX W Oacute -20 +KPX W Ocircumflex -20 +KPX W Odieresis -20 +KPX W Ograve -20 +KPX W Ohungarumlaut -20 +KPX W Omacron -20 +KPX W Oslash -20 +KPX W Otilde -20 +KPX W a -40 +KPX W aacute -40 +KPX W abreve -40 +KPX W acircumflex -40 +KPX W adieresis -40 +KPX W agrave -40 +KPX W amacron -40 +KPX W aogonek -40 +KPX W aring -40 +KPX W atilde -40 +KPX W colon -10 +KPX W comma -80 +KPX W e -35 +KPX W eacute -35 +KPX W ecaron -35 +KPX W ecircumflex -35 +KPX W edieresis -35 +KPX W edotaccent -35 +KPX W egrave -35 +KPX W emacron -35 +KPX W eogonek -35 +KPX W hyphen -40 +KPX W o -60 +KPX W oacute -60 +KPX W ocircumflex -60 +KPX W odieresis -60 +KPX W ograve -60 +KPX W ohungarumlaut -60 +KPX W omacron -60 +KPX W oslash -60 +KPX W otilde -60 +KPX W period -80 +KPX W semicolon -10 +KPX W u -45 +KPX W uacute -45 +KPX W ucircumflex -45 +KPX W udieresis -45 +KPX W ugrave -45 +KPX W uhungarumlaut -45 +KPX W umacron -45 +KPX W uogonek -45 +KPX W uring -45 +KPX W y -20 +KPX W yacute -20 +KPX W ydieresis -20 +KPX Y A -110 +KPX Y Aacute -110 +KPX Y Abreve -110 +KPX Y Acircumflex -110 +KPX Y Adieresis -110 +KPX Y Agrave -110 +KPX Y Amacron -110 +KPX Y Aogonek -110 +KPX Y Aring -110 +KPX Y Atilde -110 +KPX Y O -70 +KPX Y Oacute -70 +KPX Y Ocircumflex -70 +KPX Y Odieresis -70 +KPX Y Ograve -70 +KPX Y Ohungarumlaut -70 +KPX Y Omacron -70 +KPX Y Oslash -70 +KPX Y Otilde -70 +KPX Y a -90 +KPX Y aacute -90 +KPX Y abreve -90 +KPX Y acircumflex -90 +KPX Y adieresis -90 +KPX Y agrave -90 +KPX Y amacron -90 +KPX Y aogonek -90 +KPX Y aring -90 +KPX Y atilde -90 +KPX Y colon -50 +KPX Y comma -100 +KPX Y e -80 +KPX Y eacute -80 +KPX Y ecaron -80 +KPX Y ecircumflex -80 +KPX Y edieresis -80 +KPX Y edotaccent -80 +KPX Y egrave -80 +KPX Y emacron -80 +KPX Y eogonek -80 +KPX Y o -100 +KPX Y oacute -100 +KPX Y ocircumflex -100 +KPX Y odieresis -100 +KPX Y ograve -100 +KPX Y ohungarumlaut -100 +KPX Y omacron -100 +KPX Y oslash -100 +KPX Y otilde -100 +KPX Y period -100 +KPX Y semicolon -50 +KPX Y u -100 +KPX Y uacute -100 +KPX Y ucircumflex -100 +KPX Y udieresis -100 +KPX Y ugrave -100 +KPX Y uhungarumlaut -100 +KPX Y umacron -100 +KPX Y uogonek -100 +KPX Y uring -100 +KPX Yacute A -110 +KPX Yacute Aacute -110 +KPX Yacute Abreve -110 +KPX Yacute Acircumflex -110 +KPX Yacute Adieresis -110 +KPX Yacute Agrave -110 +KPX Yacute Amacron -110 +KPX Yacute Aogonek -110 +KPX Yacute Aring -110 +KPX Yacute Atilde -110 +KPX Yacute O -70 +KPX Yacute Oacute -70 +KPX Yacute Ocircumflex -70 +KPX Yacute Odieresis -70 +KPX Yacute Ograve -70 +KPX Yacute Ohungarumlaut -70 +KPX Yacute Omacron -70 +KPX Yacute Oslash -70 +KPX Yacute Otilde -70 +KPX Yacute a -90 +KPX Yacute aacute -90 +KPX Yacute abreve -90 +KPX Yacute acircumflex -90 +KPX Yacute adieresis -90 +KPX Yacute agrave -90 +KPX Yacute amacron -90 +KPX Yacute aogonek -90 +KPX Yacute aring -90 +KPX Yacute atilde -90 +KPX Yacute colon -50 +KPX Yacute comma -100 +KPX Yacute e -80 +KPX Yacute eacute -80 +KPX Yacute ecaron -80 +KPX Yacute ecircumflex -80 +KPX Yacute edieresis -80 +KPX Yacute edotaccent -80 +KPX Yacute egrave -80 +KPX Yacute emacron -80 +KPX Yacute eogonek -80 +KPX Yacute o -100 +KPX Yacute oacute -100 +KPX Yacute ocircumflex -100 +KPX Yacute odieresis -100 +KPX Yacute ograve -100 +KPX Yacute ohungarumlaut -100 +KPX Yacute omacron -100 +KPX Yacute oslash -100 +KPX Yacute otilde -100 +KPX Yacute period -100 +KPX Yacute semicolon -50 +KPX Yacute u -100 +KPX Yacute uacute -100 +KPX Yacute ucircumflex -100 +KPX Yacute udieresis -100 +KPX Yacute ugrave -100 +KPX Yacute uhungarumlaut -100 +KPX Yacute umacron -100 +KPX Yacute uogonek -100 +KPX Yacute uring -100 +KPX Ydieresis A -110 +KPX Ydieresis Aacute -110 +KPX Ydieresis Abreve -110 +KPX Ydieresis Acircumflex -110 +KPX Ydieresis Adieresis -110 +KPX Ydieresis Agrave -110 +KPX Ydieresis Amacron -110 +KPX Ydieresis Aogonek -110 +KPX Ydieresis Aring -110 +KPX Ydieresis Atilde -110 +KPX Ydieresis O -70 +KPX Ydieresis Oacute -70 +KPX Ydieresis Ocircumflex -70 +KPX Ydieresis Odieresis -70 +KPX Ydieresis Ograve -70 +KPX Ydieresis Ohungarumlaut -70 +KPX Ydieresis Omacron -70 +KPX Ydieresis Oslash -70 +KPX Ydieresis Otilde -70 +KPX Ydieresis a -90 +KPX Ydieresis aacute -90 +KPX Ydieresis abreve -90 +KPX Ydieresis acircumflex -90 +KPX Ydieresis adieresis -90 +KPX Ydieresis agrave -90 +KPX Ydieresis amacron -90 +KPX Ydieresis aogonek -90 +KPX Ydieresis aring -90 +KPX Ydieresis atilde -90 +KPX Ydieresis colon -50 +KPX Ydieresis comma -100 +KPX Ydieresis e -80 +KPX Ydieresis eacute -80 +KPX Ydieresis ecaron -80 +KPX Ydieresis ecircumflex -80 +KPX Ydieresis edieresis -80 +KPX Ydieresis edotaccent -80 +KPX Ydieresis egrave -80 +KPX Ydieresis emacron -80 +KPX Ydieresis eogonek -80 +KPX Ydieresis o -100 +KPX Ydieresis oacute -100 +KPX Ydieresis ocircumflex -100 +KPX Ydieresis odieresis -100 +KPX Ydieresis ograve -100 +KPX Ydieresis ohungarumlaut -100 +KPX Ydieresis omacron -100 +KPX Ydieresis oslash -100 +KPX Ydieresis otilde -100 +KPX Ydieresis period -100 +KPX Ydieresis semicolon -50 +KPX Ydieresis u -100 +KPX Ydieresis uacute -100 +KPX Ydieresis ucircumflex -100 +KPX Ydieresis udieresis -100 +KPX Ydieresis ugrave -100 +KPX Ydieresis uhungarumlaut -100 +KPX Ydieresis umacron -100 +KPX Ydieresis uogonek -100 +KPX Ydieresis uring -100 +KPX a g -10 +KPX a gbreve -10 +KPX a gcommaaccent -10 +KPX a v -15 +KPX a w -15 +KPX a y -20 +KPX a yacute -20 +KPX a ydieresis -20 +KPX aacute g -10 +KPX aacute gbreve -10 +KPX aacute gcommaaccent -10 +KPX aacute v -15 +KPX aacute w -15 +KPX aacute y -20 +KPX aacute yacute -20 +KPX aacute ydieresis -20 +KPX abreve g -10 +KPX abreve gbreve -10 +KPX abreve gcommaaccent -10 +KPX abreve v -15 +KPX abreve w -15 +KPX abreve y -20 +KPX abreve yacute -20 +KPX abreve ydieresis -20 +KPX acircumflex g -10 +KPX acircumflex gbreve -10 +KPX acircumflex gcommaaccent -10 +KPX acircumflex v -15 +KPX acircumflex w -15 +KPX acircumflex y -20 +KPX acircumflex yacute -20 +KPX acircumflex ydieresis -20 +KPX adieresis g -10 +KPX adieresis gbreve -10 +KPX adieresis gcommaaccent -10 +KPX adieresis v -15 +KPX adieresis w -15 +KPX adieresis y -20 +KPX adieresis yacute -20 +KPX adieresis ydieresis -20 +KPX agrave g -10 +KPX agrave gbreve -10 +KPX agrave gcommaaccent -10 +KPX agrave v -15 +KPX agrave w -15 +KPX agrave y -20 +KPX agrave yacute -20 +KPX agrave ydieresis -20 +KPX amacron g -10 +KPX amacron gbreve -10 +KPX amacron gcommaaccent -10 +KPX amacron v -15 +KPX amacron w -15 +KPX amacron y -20 +KPX amacron yacute -20 +KPX amacron ydieresis -20 +KPX aogonek g -10 +KPX aogonek gbreve -10 +KPX aogonek gcommaaccent -10 +KPX aogonek v -15 +KPX aogonek w -15 +KPX aogonek y -20 +KPX aogonek yacute -20 +KPX aogonek ydieresis -20 +KPX aring g -10 +KPX aring gbreve -10 +KPX aring gcommaaccent -10 +KPX aring v -15 +KPX aring w -15 +KPX aring y -20 +KPX aring yacute -20 +KPX aring ydieresis -20 +KPX atilde g -10 +KPX atilde gbreve -10 +KPX atilde gcommaaccent -10 +KPX atilde v -15 +KPX atilde w -15 +KPX atilde y -20 +KPX atilde yacute -20 +KPX atilde ydieresis -20 +KPX b l -10 +KPX b lacute -10 +KPX b lcommaaccent -10 +KPX b lslash -10 +KPX b u -20 +KPX b uacute -20 +KPX b ucircumflex -20 +KPX b udieresis -20 +KPX b ugrave -20 +KPX b uhungarumlaut -20 +KPX b umacron -20 +KPX b uogonek -20 +KPX b uring -20 +KPX b v -20 +KPX b y -20 +KPX b yacute -20 +KPX b ydieresis -20 +KPX c h -10 +KPX c k -20 +KPX c kcommaaccent -20 +KPX c l -20 +KPX c lacute -20 +KPX c lcommaaccent -20 +KPX c lslash -20 +KPX c y -10 +KPX c yacute -10 +KPX c ydieresis -10 +KPX cacute h -10 +KPX cacute k -20 +KPX cacute kcommaaccent -20 +KPX cacute l -20 +KPX cacute lacute -20 +KPX cacute lcommaaccent -20 +KPX cacute lslash -20 +KPX cacute y -10 +KPX cacute yacute -10 +KPX cacute ydieresis -10 +KPX ccaron h -10 +KPX ccaron k -20 +KPX ccaron kcommaaccent -20 +KPX ccaron l -20 +KPX ccaron lacute -20 +KPX ccaron lcommaaccent -20 +KPX ccaron lslash -20 +KPX ccaron y -10 +KPX ccaron yacute -10 +KPX ccaron ydieresis -10 +KPX ccedilla h -10 +KPX ccedilla k -20 +KPX ccedilla kcommaaccent -20 +KPX ccedilla l -20 +KPX ccedilla lacute -20 +KPX ccedilla lcommaaccent -20 +KPX ccedilla lslash -20 +KPX ccedilla y -10 +KPX ccedilla yacute -10 +KPX ccedilla ydieresis -10 +KPX colon space -40 +KPX comma quotedblright -120 +KPX comma quoteright -120 +KPX comma space -40 +KPX d d -10 +KPX d dcroat -10 +KPX d v -15 +KPX d w -15 +KPX d y -15 +KPX d yacute -15 +KPX d ydieresis -15 +KPX dcroat d -10 +KPX dcroat dcroat -10 +KPX dcroat v -15 +KPX dcroat w -15 +KPX dcroat y -15 +KPX dcroat yacute -15 +KPX dcroat ydieresis -15 +KPX e comma 10 +KPX e period 20 +KPX e v -15 +KPX e w -15 +KPX e x -15 +KPX e y -15 +KPX e yacute -15 +KPX e ydieresis -15 +KPX eacute comma 10 +KPX eacute period 20 +KPX eacute v -15 +KPX eacute w -15 +KPX eacute x -15 +KPX eacute y -15 +KPX eacute yacute -15 +KPX eacute ydieresis -15 +KPX ecaron comma 10 +KPX ecaron period 20 +KPX ecaron v -15 +KPX ecaron w -15 +KPX ecaron x -15 +KPX ecaron y -15 +KPX ecaron yacute -15 +KPX ecaron ydieresis -15 +KPX ecircumflex comma 10 +KPX ecircumflex period 20 +KPX ecircumflex v -15 +KPX ecircumflex w -15 +KPX ecircumflex x -15 +KPX ecircumflex y -15 +KPX ecircumflex yacute -15 +KPX ecircumflex ydieresis -15 +KPX edieresis comma 10 +KPX edieresis period 20 +KPX edieresis v -15 +KPX edieresis w -15 +KPX edieresis x -15 +KPX edieresis y -15 +KPX edieresis yacute -15 +KPX edieresis ydieresis -15 +KPX edotaccent comma 10 +KPX edotaccent period 20 +KPX edotaccent v -15 +KPX edotaccent w -15 +KPX edotaccent x -15 +KPX edotaccent y -15 +KPX edotaccent yacute -15 +KPX edotaccent ydieresis -15 +KPX egrave comma 10 +KPX egrave period 20 +KPX egrave v -15 +KPX egrave w -15 +KPX egrave x -15 +KPX egrave y -15 +KPX egrave yacute -15 +KPX egrave ydieresis -15 +KPX emacron comma 10 +KPX emacron period 20 +KPX emacron v -15 +KPX emacron w -15 +KPX emacron x -15 +KPX emacron y -15 +KPX emacron yacute -15 +KPX emacron ydieresis -15 +KPX eogonek comma 10 +KPX eogonek period 20 +KPX eogonek v -15 +KPX eogonek w -15 +KPX eogonek x -15 +KPX eogonek y -15 +KPX eogonek yacute -15 +KPX eogonek ydieresis -15 +KPX f comma -10 +KPX f e -10 +KPX f eacute -10 +KPX f ecaron -10 +KPX f ecircumflex -10 +KPX f edieresis -10 +KPX f edotaccent -10 +KPX f egrave -10 +KPX f emacron -10 +KPX f eogonek -10 +KPX f o -20 +KPX f oacute -20 +KPX f ocircumflex -20 +KPX f odieresis -20 +KPX f ograve -20 +KPX f ohungarumlaut -20 +KPX f omacron -20 +KPX f oslash -20 +KPX f otilde -20 +KPX f period -10 +KPX f quotedblright 30 +KPX f quoteright 30 +KPX g e 10 +KPX g eacute 10 +KPX g ecaron 10 +KPX g ecircumflex 10 +KPX g edieresis 10 +KPX g edotaccent 10 +KPX g egrave 10 +KPX g emacron 10 +KPX g eogonek 10 +KPX g g -10 +KPX g gbreve -10 +KPX g gcommaaccent -10 +KPX gbreve e 10 +KPX gbreve eacute 10 +KPX gbreve ecaron 10 +KPX gbreve ecircumflex 10 +KPX gbreve edieresis 10 +KPX gbreve edotaccent 10 +KPX gbreve egrave 10 +KPX gbreve emacron 10 +KPX gbreve eogonek 10 +KPX gbreve g -10 +KPX gbreve gbreve -10 +KPX gbreve gcommaaccent -10 +KPX gcommaaccent e 10 +KPX gcommaaccent eacute 10 +KPX gcommaaccent ecaron 10 +KPX gcommaaccent ecircumflex 10 +KPX gcommaaccent edieresis 10 +KPX gcommaaccent edotaccent 10 +KPX gcommaaccent egrave 10 +KPX gcommaaccent emacron 10 +KPX gcommaaccent eogonek 10 +KPX gcommaaccent g -10 +KPX gcommaaccent gbreve -10 +KPX gcommaaccent gcommaaccent -10 +KPX h y -20 +KPX h yacute -20 +KPX h ydieresis -20 +KPX k o -15 +KPX k oacute -15 +KPX k ocircumflex -15 +KPX k odieresis -15 +KPX k ograve -15 +KPX k ohungarumlaut -15 +KPX k omacron -15 +KPX k oslash -15 +KPX k otilde -15 +KPX kcommaaccent o -15 +KPX kcommaaccent oacute -15 +KPX kcommaaccent ocircumflex -15 +KPX kcommaaccent odieresis -15 +KPX kcommaaccent ograve -15 +KPX kcommaaccent ohungarumlaut -15 +KPX kcommaaccent omacron -15 +KPX kcommaaccent oslash -15 +KPX kcommaaccent otilde -15 +KPX l w -15 +KPX l y -15 +KPX l yacute -15 +KPX l ydieresis -15 +KPX lacute w -15 +KPX lacute y -15 +KPX lacute yacute -15 +KPX lacute ydieresis -15 +KPX lcommaaccent w -15 +KPX lcommaaccent y -15 +KPX lcommaaccent yacute -15 +KPX lcommaaccent ydieresis -15 +KPX lslash w -15 +KPX lslash y -15 +KPX lslash yacute -15 +KPX lslash ydieresis -15 +KPX m u -20 +KPX m uacute -20 +KPX m ucircumflex -20 +KPX m udieresis -20 +KPX m ugrave -20 +KPX m uhungarumlaut -20 +KPX m umacron -20 +KPX m uogonek -20 +KPX m uring -20 +KPX m y -30 +KPX m yacute -30 +KPX m ydieresis -30 +KPX n u -10 +KPX n uacute -10 +KPX n ucircumflex -10 +KPX n udieresis -10 +KPX n ugrave -10 +KPX n uhungarumlaut -10 +KPX n umacron -10 +KPX n uogonek -10 +KPX n uring -10 +KPX n v -40 +KPX n y -20 +KPX n yacute -20 +KPX n ydieresis -20 +KPX nacute u -10 +KPX nacute uacute -10 +KPX nacute ucircumflex -10 +KPX nacute udieresis -10 +KPX nacute ugrave -10 +KPX nacute uhungarumlaut -10 +KPX nacute umacron -10 +KPX nacute uogonek -10 +KPX nacute uring -10 +KPX nacute v -40 +KPX nacute y -20 +KPX nacute yacute -20 +KPX nacute ydieresis -20 +KPX ncaron u -10 +KPX ncaron uacute -10 +KPX ncaron ucircumflex -10 +KPX ncaron udieresis -10 +KPX ncaron ugrave -10 +KPX ncaron uhungarumlaut -10 +KPX ncaron umacron -10 +KPX ncaron uogonek -10 +KPX ncaron uring -10 +KPX ncaron v -40 +KPX ncaron y -20 +KPX ncaron yacute -20 +KPX ncaron ydieresis -20 +KPX ncommaaccent u -10 +KPX ncommaaccent uacute -10 +KPX ncommaaccent ucircumflex -10 +KPX ncommaaccent udieresis -10 +KPX ncommaaccent ugrave -10 +KPX ncommaaccent uhungarumlaut -10 +KPX ncommaaccent umacron -10 +KPX ncommaaccent uogonek -10 +KPX ncommaaccent uring -10 +KPX ncommaaccent v -40 +KPX ncommaaccent y -20 +KPX ncommaaccent yacute -20 +KPX ncommaaccent ydieresis -20 +KPX ntilde u -10 +KPX ntilde uacute -10 +KPX ntilde ucircumflex -10 +KPX ntilde udieresis -10 +KPX ntilde ugrave -10 +KPX ntilde uhungarumlaut -10 +KPX ntilde umacron -10 +KPX ntilde uogonek -10 +KPX ntilde uring -10 +KPX ntilde v -40 +KPX ntilde y -20 +KPX ntilde yacute -20 +KPX ntilde ydieresis -20 +KPX o v -20 +KPX o w -15 +KPX o x -30 +KPX o y -20 +KPX o yacute -20 +KPX o ydieresis -20 +KPX oacute v -20 +KPX oacute w -15 +KPX oacute x -30 +KPX oacute y -20 +KPX oacute yacute -20 +KPX oacute ydieresis -20 +KPX ocircumflex v -20 +KPX ocircumflex w -15 +KPX ocircumflex x -30 +KPX ocircumflex y -20 +KPX ocircumflex yacute -20 +KPX ocircumflex ydieresis -20 +KPX odieresis v -20 +KPX odieresis w -15 +KPX odieresis x -30 +KPX odieresis y -20 +KPX odieresis yacute -20 +KPX odieresis ydieresis -20 +KPX ograve v -20 +KPX ograve w -15 +KPX ograve x -30 +KPX ograve y -20 +KPX ograve yacute -20 +KPX ograve ydieresis -20 +KPX ohungarumlaut v -20 +KPX ohungarumlaut w -15 +KPX ohungarumlaut x -30 +KPX ohungarumlaut y -20 +KPX ohungarumlaut yacute -20 +KPX ohungarumlaut ydieresis -20 +KPX omacron v -20 +KPX omacron w -15 +KPX omacron x -30 +KPX omacron y -20 +KPX omacron yacute -20 +KPX omacron ydieresis -20 +KPX oslash v -20 +KPX oslash w -15 +KPX oslash x -30 +KPX oslash y -20 +KPX oslash yacute -20 +KPX oslash ydieresis -20 +KPX otilde v -20 +KPX otilde w -15 +KPX otilde x -30 +KPX otilde y -20 +KPX otilde yacute -20 +KPX otilde ydieresis -20 +KPX p y -15 +KPX p yacute -15 +KPX p ydieresis -15 +KPX period quotedblright -120 +KPX period quoteright -120 +KPX period space -40 +KPX quotedblright space -80 +KPX quoteleft quoteleft -46 +KPX quoteright d -80 +KPX quoteright dcroat -80 +KPX quoteright l -20 +KPX quoteright lacute -20 +KPX quoteright lcommaaccent -20 +KPX quoteright lslash -20 +KPX quoteright quoteright -46 +KPX quoteright r -40 +KPX quoteright racute -40 +KPX quoteright rcaron -40 +KPX quoteright rcommaaccent -40 +KPX quoteright s -60 +KPX quoteright sacute -60 +KPX quoteright scaron -60 +KPX quoteright scedilla -60 +KPX quoteright scommaaccent -60 +KPX quoteright space -80 +KPX quoteright v -20 +KPX r c -20 +KPX r cacute -20 +KPX r ccaron -20 +KPX r ccedilla -20 +KPX r comma -60 +KPX r d -20 +KPX r dcroat -20 +KPX r g -15 +KPX r gbreve -15 +KPX r gcommaaccent -15 +KPX r hyphen -20 +KPX r o -20 +KPX r oacute -20 +KPX r ocircumflex -20 +KPX r odieresis -20 +KPX r ograve -20 +KPX r ohungarumlaut -20 +KPX r omacron -20 +KPX r oslash -20 +KPX r otilde -20 +KPX r period -60 +KPX r q -20 +KPX r s -15 +KPX r sacute -15 +KPX r scaron -15 +KPX r scedilla -15 +KPX r scommaaccent -15 +KPX r t 20 +KPX r tcommaaccent 20 +KPX r v 10 +KPX r y 10 +KPX r yacute 10 +KPX r ydieresis 10 +KPX racute c -20 +KPX racute cacute -20 +KPX racute ccaron -20 +KPX racute ccedilla -20 +KPX racute comma -60 +KPX racute d -20 +KPX racute dcroat -20 +KPX racute g -15 +KPX racute gbreve -15 +KPX racute gcommaaccent -15 +KPX racute hyphen -20 +KPX racute o -20 +KPX racute oacute -20 +KPX racute ocircumflex -20 +KPX racute odieresis -20 +KPX racute ograve -20 +KPX racute ohungarumlaut -20 +KPX racute omacron -20 +KPX racute oslash -20 +KPX racute otilde -20 +KPX racute period -60 +KPX racute q -20 +KPX racute s -15 +KPX racute sacute -15 +KPX racute scaron -15 +KPX racute scedilla -15 +KPX racute scommaaccent -15 +KPX racute t 20 +KPX racute tcommaaccent 20 +KPX racute v 10 +KPX racute y 10 +KPX racute yacute 10 +KPX racute ydieresis 10 +KPX rcaron c -20 +KPX rcaron cacute -20 +KPX rcaron ccaron -20 +KPX rcaron ccedilla -20 +KPX rcaron comma -60 +KPX rcaron d -20 +KPX rcaron dcroat -20 +KPX rcaron g -15 +KPX rcaron gbreve -15 +KPX rcaron gcommaaccent -15 +KPX rcaron hyphen -20 +KPX rcaron o -20 +KPX rcaron oacute -20 +KPX rcaron ocircumflex -20 +KPX rcaron odieresis -20 +KPX rcaron ograve -20 +KPX rcaron ohungarumlaut -20 +KPX rcaron omacron -20 +KPX rcaron oslash -20 +KPX rcaron otilde -20 +KPX rcaron period -60 +KPX rcaron q -20 +KPX rcaron s -15 +KPX rcaron sacute -15 +KPX rcaron scaron -15 +KPX rcaron scedilla -15 +KPX rcaron scommaaccent -15 +KPX rcaron t 20 +KPX rcaron tcommaaccent 20 +KPX rcaron v 10 +KPX rcaron y 10 +KPX rcaron yacute 10 +KPX rcaron ydieresis 10 +KPX rcommaaccent c -20 +KPX rcommaaccent cacute -20 +KPX rcommaaccent ccaron -20 +KPX rcommaaccent ccedilla -20 +KPX rcommaaccent comma -60 +KPX rcommaaccent d -20 +KPX rcommaaccent dcroat -20 +KPX rcommaaccent g -15 +KPX rcommaaccent gbreve -15 +KPX rcommaaccent gcommaaccent -15 +KPX rcommaaccent hyphen -20 +KPX rcommaaccent o -20 +KPX rcommaaccent oacute -20 +KPX rcommaaccent ocircumflex -20 +KPX rcommaaccent odieresis -20 +KPX rcommaaccent ograve -20 +KPX rcommaaccent ohungarumlaut -20 +KPX rcommaaccent omacron -20 +KPX rcommaaccent oslash -20 +KPX rcommaaccent otilde -20 +KPX rcommaaccent period -60 +KPX rcommaaccent q -20 +KPX rcommaaccent s -15 +KPX rcommaaccent sacute -15 +KPX rcommaaccent scaron -15 +KPX rcommaaccent scedilla -15 +KPX rcommaaccent scommaaccent -15 +KPX rcommaaccent t 20 +KPX rcommaaccent tcommaaccent 20 +KPX rcommaaccent v 10 +KPX rcommaaccent y 10 +KPX rcommaaccent yacute 10 +KPX rcommaaccent ydieresis 10 +KPX s w -15 +KPX sacute w -15 +KPX scaron w -15 +KPX scedilla w -15 +KPX scommaaccent w -15 +KPX semicolon space -40 +KPX space T -100 +KPX space Tcaron -100 +KPX space Tcommaaccent -100 +KPX space V -80 +KPX space W -80 +KPX space Y -120 +KPX space Yacute -120 +KPX space Ydieresis -120 +KPX space quotedblleft -80 +KPX space quoteleft -60 +KPX v a -20 +KPX v aacute -20 +KPX v abreve -20 +KPX v acircumflex -20 +KPX v adieresis -20 +KPX v agrave -20 +KPX v amacron -20 +KPX v aogonek -20 +KPX v aring -20 +KPX v atilde -20 +KPX v comma -80 +KPX v o -30 +KPX v oacute -30 +KPX v ocircumflex -30 +KPX v odieresis -30 +KPX v ograve -30 +KPX v ohungarumlaut -30 +KPX v omacron -30 +KPX v oslash -30 +KPX v otilde -30 +KPX v period -80 +KPX w comma -40 +KPX w o -20 +KPX w oacute -20 +KPX w ocircumflex -20 +KPX w odieresis -20 +KPX w ograve -20 +KPX w ohungarumlaut -20 +KPX w omacron -20 +KPX w oslash -20 +KPX w otilde -20 +KPX w period -40 +KPX x e -10 +KPX x eacute -10 +KPX x ecaron -10 +KPX x ecircumflex -10 +KPX x edieresis -10 +KPX x edotaccent -10 +KPX x egrave -10 +KPX x emacron -10 +KPX x eogonek -10 +KPX y a -30 +KPX y aacute -30 +KPX y abreve -30 +KPX y acircumflex -30 +KPX y adieresis -30 +KPX y agrave -30 +KPX y amacron -30 +KPX y aogonek -30 +KPX y aring -30 +KPX y atilde -30 +KPX y comma -80 +KPX y e -10 +KPX y eacute -10 +KPX y ecaron -10 +KPX y ecircumflex -10 +KPX y edieresis -10 +KPX y edotaccent -10 +KPX y egrave -10 +KPX y emacron -10 +KPX y eogonek -10 +KPX y o -25 +KPX y oacute -25 +KPX y ocircumflex -25 +KPX y odieresis -25 +KPX y ograve -25 +KPX y ohungarumlaut -25 +KPX y omacron -25 +KPX y oslash -25 +KPX y otilde -25 +KPX y period -80 +KPX yacute a -30 +KPX yacute aacute -30 +KPX yacute abreve -30 +KPX yacute acircumflex -30 +KPX yacute adieresis -30 +KPX yacute agrave -30 +KPX yacute amacron -30 +KPX yacute aogonek -30 +KPX yacute aring -30 +KPX yacute atilde -30 +KPX yacute comma -80 +KPX yacute e -10 +KPX yacute eacute -10 +KPX yacute ecaron -10 +KPX yacute ecircumflex -10 +KPX yacute edieresis -10 +KPX yacute edotaccent -10 +KPX yacute egrave -10 +KPX yacute emacron -10 +KPX yacute eogonek -10 +KPX yacute o -25 +KPX yacute oacute -25 +KPX yacute ocircumflex -25 +KPX yacute odieresis -25 +KPX yacute ograve -25 +KPX yacute ohungarumlaut -25 +KPX yacute omacron -25 +KPX yacute oslash -25 +KPX yacute otilde -25 +KPX yacute period -80 +KPX ydieresis a -30 +KPX ydieresis aacute -30 +KPX ydieresis abreve -30 +KPX ydieresis acircumflex -30 +KPX ydieresis adieresis -30 +KPX ydieresis agrave -30 +KPX ydieresis amacron -30 +KPX ydieresis aogonek -30 +KPX ydieresis aring -30 +KPX ydieresis atilde -30 +KPX ydieresis comma -80 +KPX ydieresis e -10 +KPX ydieresis eacute -10 +KPX ydieresis ecaron -10 +KPX ydieresis ecircumflex -10 +KPX ydieresis edieresis -10 +KPX ydieresis edotaccent -10 +KPX ydieresis egrave -10 +KPX ydieresis emacron -10 +KPX ydieresis eogonek -10 +KPX ydieresis o -25 +KPX ydieresis oacute -25 +KPX ydieresis ocircumflex -25 +KPX ydieresis odieresis -25 +KPX ydieresis ograve -25 +KPX ydieresis ohungarumlaut -25 +KPX ydieresis omacron -25 +KPX ydieresis oslash -25 +KPX ydieresis otilde -25 +KPX ydieresis period -80 +KPX z e 10 +KPX z eacute 10 +KPX z ecaron 10 +KPX z ecircumflex 10 +KPX z edieresis 10 +KPX z edotaccent 10 +KPX z egrave 10 +KPX z emacron 10 +KPX z eogonek 10 +KPX zacute e 10 +KPX zacute eacute 10 +KPX zacute ecaron 10 +KPX zacute ecircumflex 10 +KPX zacute edieresis 10 +KPX zacute edotaccent 10 +KPX zacute egrave 10 +KPX zacute emacron 10 +KPX zacute eogonek 10 +KPX zcaron e 10 +KPX zcaron eacute 10 +KPX zcaron ecaron 10 +KPX zcaron ecircumflex 10 +KPX zcaron edieresis 10 +KPX zcaron edotaccent 10 +KPX zcaron egrave 10 +KPX zcaron emacron 10 +KPX zcaron eogonek 10 +KPX zdotaccent e 10 +KPX zdotaccent eacute 10 +KPX zdotaccent ecaron 10 +KPX zdotaccent ecircumflex 10 +KPX zdotaccent edieresis 10 +KPX zdotaccent edotaccent 10 +KPX zdotaccent egrave 10 +KPX zdotaccent emacron 10 +KPX zdotaccent eogonek 10 +EndKernPairs +EndKernData +EndFontMetrics diff --git a/pitfall/pdfkit/lib/font/data/Helvetica-BoldOblique.afm b/pitfall/pdfkit/lib/font/data/Helvetica-BoldOblique.afm new file mode 100755 index 00000000..1715b210 --- /dev/null +++ b/pitfall/pdfkit/lib/font/data/Helvetica-BoldOblique.afm @@ -0,0 +1,2827 @@ +StartFontMetrics 4.1 +Comment Copyright (c) 1985, 1987, 1989, 1990, 1997 Adobe Systems Incorporated. All Rights Reserved. +Comment Creation Date: Thu May 1 12:45:12 1997 +Comment UniqueID 43053 +Comment VMusage 14482 68586 +FontName Helvetica-BoldOblique +FullName Helvetica Bold Oblique +FamilyName Helvetica +Weight Bold +ItalicAngle -12 +IsFixedPitch false +CharacterSet ExtendedRoman +FontBBox -174 -228 1114 962 +UnderlinePosition -100 +UnderlineThickness 50 +Version 002.000 +Notice Copyright (c) 1985, 1987, 1989, 1990, 1997 Adobe Systems Incorporated. All Rights Reserved.Helvetica is a trademark of Linotype-Hell AG and/or its subsidiaries. +EncodingScheme AdobeStandardEncoding +CapHeight 718 +XHeight 532 +Ascender 718 +Descender -207 +StdHW 118 +StdVW 140 +StartCharMetrics 315 +C 32 ; WX 278 ; N space ; B 0 0 0 0 ; +C 33 ; WX 333 ; N exclam ; B 94 0 397 718 ; +C 34 ; WX 474 ; N quotedbl ; B 193 447 529 718 ; +C 35 ; WX 556 ; N numbersign ; B 60 0 644 698 ; +C 36 ; WX 556 ; N dollar ; B 67 -115 622 775 ; +C 37 ; WX 889 ; N percent ; B 136 -19 901 710 ; +C 38 ; WX 722 ; N ampersand ; B 89 -19 732 718 ; +C 39 ; WX 278 ; N quoteright ; B 167 445 362 718 ; +C 40 ; WX 333 ; N parenleft ; B 76 -208 470 734 ; +C 41 ; WX 333 ; N parenright ; B -25 -208 369 734 ; +C 42 ; WX 389 ; N asterisk ; B 146 387 481 718 ; +C 43 ; WX 584 ; N plus ; B 82 0 610 506 ; +C 44 ; WX 278 ; N comma ; B 28 -168 245 146 ; +C 45 ; WX 333 ; N hyphen ; B 73 215 379 345 ; +C 46 ; WX 278 ; N period ; B 64 0 245 146 ; +C 47 ; WX 278 ; N slash ; B -37 -19 468 737 ; +C 48 ; WX 556 ; N zero ; B 86 -19 617 710 ; +C 49 ; WX 556 ; N one ; B 173 0 529 710 ; +C 50 ; WX 556 ; N two ; B 26 0 619 710 ; +C 51 ; WX 556 ; N three ; B 65 -19 608 710 ; +C 52 ; WX 556 ; N four ; B 60 0 598 710 ; +C 53 ; WX 556 ; N five ; B 64 -19 636 698 ; +C 54 ; WX 556 ; N six ; B 85 -19 619 710 ; +C 55 ; WX 556 ; N seven ; B 125 0 676 698 ; +C 56 ; WX 556 ; N eight ; B 69 -19 616 710 ; +C 57 ; WX 556 ; N nine ; B 78 -19 615 710 ; +C 58 ; WX 333 ; N colon ; B 92 0 351 512 ; +C 59 ; WX 333 ; N semicolon ; B 56 -168 351 512 ; +C 60 ; WX 584 ; N less ; B 82 -8 655 514 ; +C 61 ; WX 584 ; N equal ; B 58 87 633 419 ; +C 62 ; WX 584 ; N greater ; B 36 -8 609 514 ; +C 63 ; WX 611 ; N question ; B 165 0 671 727 ; +C 64 ; WX 975 ; N at ; B 186 -19 954 737 ; +C 65 ; WX 722 ; N A ; B 20 0 702 718 ; +C 66 ; WX 722 ; N B ; B 76 0 764 718 ; +C 67 ; WX 722 ; N C ; B 107 -19 789 737 ; +C 68 ; WX 722 ; N D ; B 76 0 777 718 ; +C 69 ; WX 667 ; N E ; B 76 0 757 718 ; +C 70 ; WX 611 ; N F ; B 76 0 740 718 ; +C 71 ; WX 778 ; N G ; B 108 -19 817 737 ; +C 72 ; WX 722 ; N H ; B 71 0 804 718 ; +C 73 ; WX 278 ; N I ; B 64 0 367 718 ; +C 74 ; WX 556 ; N J ; B 60 -18 637 718 ; +C 75 ; WX 722 ; N K ; B 87 0 858 718 ; +C 76 ; WX 611 ; N L ; B 76 0 611 718 ; +C 77 ; WX 833 ; N M ; B 69 0 918 718 ; +C 78 ; WX 722 ; N N ; B 69 0 807 718 ; +C 79 ; WX 778 ; N O ; B 107 -19 823 737 ; +C 80 ; WX 667 ; N P ; B 76 0 738 718 ; +C 81 ; WX 778 ; N Q ; B 107 -52 823 737 ; +C 82 ; WX 722 ; N R ; B 76 0 778 718 ; +C 83 ; WX 667 ; N S ; B 81 -19 718 737 ; +C 84 ; WX 611 ; N T ; B 140 0 751 718 ; +C 85 ; WX 722 ; N U ; B 116 -19 804 718 ; +C 86 ; WX 667 ; N V ; B 172 0 801 718 ; +C 87 ; WX 944 ; N W ; B 169 0 1082 718 ; +C 88 ; WX 667 ; N X ; B 14 0 791 718 ; +C 89 ; WX 667 ; N Y ; B 168 0 806 718 ; +C 90 ; WX 611 ; N Z ; B 25 0 737 718 ; +C 91 ; WX 333 ; N bracketleft ; B 21 -196 462 722 ; +C 92 ; WX 278 ; N backslash ; B 124 -19 307 737 ; +C 93 ; WX 333 ; N bracketright ; B -18 -196 423 722 ; +C 94 ; WX 584 ; N asciicircum ; B 131 323 591 698 ; +C 95 ; WX 556 ; N underscore ; B -27 -125 540 -75 ; +C 96 ; WX 278 ; N quoteleft ; B 165 454 361 727 ; +C 97 ; WX 556 ; N a ; B 55 -14 583 546 ; +C 98 ; WX 611 ; N b ; B 61 -14 645 718 ; +C 99 ; WX 556 ; N c ; B 79 -14 599 546 ; +C 100 ; WX 611 ; N d ; B 82 -14 704 718 ; +C 101 ; WX 556 ; N e ; B 70 -14 593 546 ; +C 102 ; WX 333 ; N f ; B 87 0 469 727 ; L i fi ; L l fl ; +C 103 ; WX 611 ; N g ; B 38 -217 666 546 ; +C 104 ; WX 611 ; N h ; B 65 0 629 718 ; +C 105 ; WX 278 ; N i ; B 69 0 363 725 ; +C 106 ; WX 278 ; N j ; B -42 -214 363 725 ; +C 107 ; WX 556 ; N k ; B 69 0 670 718 ; +C 108 ; WX 278 ; N l ; B 69 0 362 718 ; +C 109 ; WX 889 ; N m ; B 64 0 909 546 ; +C 110 ; WX 611 ; N n ; B 65 0 629 546 ; +C 111 ; WX 611 ; N o ; B 82 -14 643 546 ; +C 112 ; WX 611 ; N p ; B 18 -207 645 546 ; +C 113 ; WX 611 ; N q ; B 80 -207 665 546 ; +C 114 ; WX 389 ; N r ; B 64 0 489 546 ; +C 115 ; WX 556 ; N s ; B 63 -14 584 546 ; +C 116 ; WX 333 ; N t ; B 100 -6 422 676 ; +C 117 ; WX 611 ; N u ; B 98 -14 658 532 ; +C 118 ; WX 556 ; N v ; B 126 0 656 532 ; +C 119 ; WX 778 ; N w ; B 123 0 882 532 ; +C 120 ; WX 556 ; N x ; B 15 0 648 532 ; +C 121 ; WX 556 ; N y ; B 42 -214 652 532 ; +C 122 ; WX 500 ; N z ; B 20 0 583 532 ; +C 123 ; WX 389 ; N braceleft ; B 94 -196 518 722 ; +C 124 ; WX 280 ; N bar ; B 36 -225 361 775 ; +C 125 ; WX 389 ; N braceright ; B -18 -196 407 722 ; +C 126 ; WX 584 ; N asciitilde ; B 115 163 577 343 ; +C 161 ; WX 333 ; N exclamdown ; B 50 -186 353 532 ; +C 162 ; WX 556 ; N cent ; B 79 -118 599 628 ; +C 163 ; WX 556 ; N sterling ; B 50 -16 635 718 ; +C 164 ; WX 167 ; N fraction ; B -174 -19 487 710 ; +C 165 ; WX 556 ; N yen ; B 60 0 713 698 ; +C 166 ; WX 556 ; N florin ; B -50 -210 669 737 ; +C 167 ; WX 556 ; N section ; B 61 -184 598 727 ; +C 168 ; WX 556 ; N currency ; B 27 76 680 636 ; +C 169 ; WX 238 ; N quotesingle ; B 165 447 321 718 ; +C 170 ; WX 500 ; N quotedblleft ; B 160 454 588 727 ; +C 171 ; WX 556 ; N guillemotleft ; B 135 76 571 484 ; +C 172 ; WX 333 ; N guilsinglleft ; B 130 76 353 484 ; +C 173 ; WX 333 ; N guilsinglright ; B 99 76 322 484 ; +C 174 ; WX 611 ; N fi ; B 87 0 696 727 ; +C 175 ; WX 611 ; N fl ; B 87 0 695 727 ; +C 177 ; WX 556 ; N endash ; B 48 227 627 333 ; +C 178 ; WX 556 ; N dagger ; B 118 -171 626 718 ; +C 179 ; WX 556 ; N daggerdbl ; B 46 -171 628 718 ; +C 180 ; WX 278 ; N periodcentered ; B 110 172 276 334 ; +C 182 ; WX 556 ; N paragraph ; B 98 -191 688 700 ; +C 183 ; WX 350 ; N bullet ; B 83 194 420 524 ; +C 184 ; WX 278 ; N quotesinglbase ; B 41 -146 236 127 ; +C 185 ; WX 500 ; N quotedblbase ; B 36 -146 463 127 ; +C 186 ; WX 500 ; N quotedblright ; B 162 445 589 718 ; +C 187 ; WX 556 ; N guillemotright ; B 104 76 540 484 ; +C 188 ; WX 1000 ; N ellipsis ; B 92 0 939 146 ; +C 189 ; WX 1000 ; N perthousand ; B 76 -19 1038 710 ; +C 191 ; WX 611 ; N questiondown ; B 53 -195 559 532 ; +C 193 ; WX 333 ; N grave ; B 136 604 353 750 ; +C 194 ; WX 333 ; N acute ; B 236 604 515 750 ; +C 195 ; WX 333 ; N circumflex ; B 118 604 471 750 ; +C 196 ; WX 333 ; N tilde ; B 113 610 507 737 ; +C 197 ; WX 333 ; N macron ; B 122 604 483 678 ; +C 198 ; WX 333 ; N breve ; B 156 604 494 750 ; +C 199 ; WX 333 ; N dotaccent ; B 235 614 385 729 ; +C 200 ; WX 333 ; N dieresis ; B 137 614 482 729 ; +C 202 ; WX 333 ; N ring ; B 200 568 420 776 ; +C 203 ; WX 333 ; N cedilla ; B -37 -228 220 0 ; +C 205 ; WX 333 ; N hungarumlaut ; B 137 604 645 750 ; +C 206 ; WX 333 ; N ogonek ; B 41 -228 264 0 ; +C 207 ; WX 333 ; N caron ; B 149 604 502 750 ; +C 208 ; WX 1000 ; N emdash ; B 48 227 1071 333 ; +C 225 ; WX 1000 ; N AE ; B 5 0 1100 718 ; +C 227 ; WX 370 ; N ordfeminine ; B 125 401 465 737 ; +C 232 ; WX 611 ; N Lslash ; B 34 0 611 718 ; +C 233 ; WX 778 ; N Oslash ; B 35 -27 894 745 ; +C 234 ; WX 1000 ; N OE ; B 99 -19 1114 737 ; +C 235 ; WX 365 ; N ordmasculine ; B 123 401 485 737 ; +C 241 ; WX 889 ; N ae ; B 56 -14 923 546 ; +C 245 ; WX 278 ; N dotlessi ; B 69 0 322 532 ; +C 248 ; WX 278 ; N lslash ; B 40 0 407 718 ; +C 249 ; WX 611 ; N oslash ; B 22 -29 701 560 ; +C 250 ; WX 944 ; N oe ; B 82 -14 977 546 ; +C 251 ; WX 611 ; N germandbls ; B 69 -14 657 731 ; +C -1 ; WX 278 ; N Idieresis ; B 64 0 494 915 ; +C -1 ; WX 556 ; N eacute ; B 70 -14 627 750 ; +C -1 ; WX 556 ; N abreve ; B 55 -14 606 750 ; +C -1 ; WX 611 ; N uhungarumlaut ; B 98 -14 784 750 ; +C -1 ; WX 556 ; N ecaron ; B 70 -14 614 750 ; +C -1 ; WX 667 ; N Ydieresis ; B 168 0 806 915 ; +C -1 ; WX 584 ; N divide ; B 82 -42 610 548 ; +C -1 ; WX 667 ; N Yacute ; B 168 0 806 936 ; +C -1 ; WX 722 ; N Acircumflex ; B 20 0 706 936 ; +C -1 ; WX 556 ; N aacute ; B 55 -14 627 750 ; +C -1 ; WX 722 ; N Ucircumflex ; B 116 -19 804 936 ; +C -1 ; WX 556 ; N yacute ; B 42 -214 652 750 ; +C -1 ; WX 556 ; N scommaaccent ; B 63 -228 584 546 ; +C -1 ; WX 556 ; N ecircumflex ; B 70 -14 593 750 ; +C -1 ; WX 722 ; N Uring ; B 116 -19 804 962 ; +C -1 ; WX 722 ; N Udieresis ; B 116 -19 804 915 ; +C -1 ; WX 556 ; N aogonek ; B 55 -224 583 546 ; +C -1 ; WX 722 ; N Uacute ; B 116 -19 804 936 ; +C -1 ; WX 611 ; N uogonek ; B 98 -228 658 532 ; +C -1 ; WX 667 ; N Edieresis ; B 76 0 757 915 ; +C -1 ; WX 722 ; N Dcroat ; B 62 0 777 718 ; +C -1 ; WX 250 ; N commaaccent ; B 16 -228 188 -50 ; +C -1 ; WX 737 ; N copyright ; B 56 -19 835 737 ; +C -1 ; WX 667 ; N Emacron ; B 76 0 757 864 ; +C -1 ; WX 556 ; N ccaron ; B 79 -14 614 750 ; +C -1 ; WX 556 ; N aring ; B 55 -14 583 776 ; +C -1 ; WX 722 ; N Ncommaaccent ; B 69 -228 807 718 ; +C -1 ; WX 278 ; N lacute ; B 69 0 528 936 ; +C -1 ; WX 556 ; N agrave ; B 55 -14 583 750 ; +C -1 ; WX 611 ; N Tcommaaccent ; B 140 -228 751 718 ; +C -1 ; WX 722 ; N Cacute ; B 107 -19 789 936 ; +C -1 ; WX 556 ; N atilde ; B 55 -14 619 737 ; +C -1 ; WX 667 ; N Edotaccent ; B 76 0 757 915 ; +C -1 ; WX 556 ; N scaron ; B 63 -14 614 750 ; +C -1 ; WX 556 ; N scedilla ; B 63 -228 584 546 ; +C -1 ; WX 278 ; N iacute ; B 69 0 488 750 ; +C -1 ; WX 494 ; N lozenge ; B 90 0 564 745 ; +C -1 ; WX 722 ; N Rcaron ; B 76 0 778 936 ; +C -1 ; WX 778 ; N Gcommaaccent ; B 108 -228 817 737 ; +C -1 ; WX 611 ; N ucircumflex ; B 98 -14 658 750 ; +C -1 ; WX 556 ; N acircumflex ; B 55 -14 583 750 ; +C -1 ; WX 722 ; N Amacron ; B 20 0 718 864 ; +C -1 ; WX 389 ; N rcaron ; B 64 0 530 750 ; +C -1 ; WX 556 ; N ccedilla ; B 79 -228 599 546 ; +C -1 ; WX 611 ; N Zdotaccent ; B 25 0 737 915 ; +C -1 ; WX 667 ; N Thorn ; B 76 0 716 718 ; +C -1 ; WX 778 ; N Omacron ; B 107 -19 823 864 ; +C -1 ; WX 722 ; N Racute ; B 76 0 778 936 ; +C -1 ; WX 667 ; N Sacute ; B 81 -19 722 936 ; +C -1 ; WX 743 ; N dcaron ; B 82 -14 903 718 ; +C -1 ; WX 722 ; N Umacron ; B 116 -19 804 864 ; +C -1 ; WX 611 ; N uring ; B 98 -14 658 776 ; +C -1 ; WX 333 ; N threesuperior ; B 91 271 441 710 ; +C -1 ; WX 778 ; N Ograve ; B 107 -19 823 936 ; +C -1 ; WX 722 ; N Agrave ; B 20 0 702 936 ; +C -1 ; WX 722 ; N Abreve ; B 20 0 729 936 ; +C -1 ; WX 584 ; N multiply ; B 57 1 635 505 ; +C -1 ; WX 611 ; N uacute ; B 98 -14 658 750 ; +C -1 ; WX 611 ; N Tcaron ; B 140 0 751 936 ; +C -1 ; WX 494 ; N partialdiff ; B 43 -21 585 750 ; +C -1 ; WX 556 ; N ydieresis ; B 42 -214 652 729 ; +C -1 ; WX 722 ; N Nacute ; B 69 0 807 936 ; +C -1 ; WX 278 ; N icircumflex ; B 69 0 444 750 ; +C -1 ; WX 667 ; N Ecircumflex ; B 76 0 757 936 ; +C -1 ; WX 556 ; N adieresis ; B 55 -14 594 729 ; +C -1 ; WX 556 ; N edieresis ; B 70 -14 594 729 ; +C -1 ; WX 556 ; N cacute ; B 79 -14 627 750 ; +C -1 ; WX 611 ; N nacute ; B 65 0 654 750 ; +C -1 ; WX 611 ; N umacron ; B 98 -14 658 678 ; +C -1 ; WX 722 ; N Ncaron ; B 69 0 807 936 ; +C -1 ; WX 278 ; N Iacute ; B 64 0 528 936 ; +C -1 ; WX 584 ; N plusminus ; B 40 0 625 506 ; +C -1 ; WX 280 ; N brokenbar ; B 52 -150 345 700 ; +C -1 ; WX 737 ; N registered ; B 55 -19 834 737 ; +C -1 ; WX 778 ; N Gbreve ; B 108 -19 817 936 ; +C -1 ; WX 278 ; N Idotaccent ; B 64 0 397 915 ; +C -1 ; WX 600 ; N summation ; B 14 -10 670 706 ; +C -1 ; WX 667 ; N Egrave ; B 76 0 757 936 ; +C -1 ; WX 389 ; N racute ; B 64 0 543 750 ; +C -1 ; WX 611 ; N omacron ; B 82 -14 643 678 ; +C -1 ; WX 611 ; N Zacute ; B 25 0 737 936 ; +C -1 ; WX 611 ; N Zcaron ; B 25 0 737 936 ; +C -1 ; WX 549 ; N greaterequal ; B 26 0 629 704 ; +C -1 ; WX 722 ; N Eth ; B 62 0 777 718 ; +C -1 ; WX 722 ; N Ccedilla ; B 107 -228 789 737 ; +C -1 ; WX 278 ; N lcommaaccent ; B 30 -228 362 718 ; +C -1 ; WX 389 ; N tcaron ; B 100 -6 608 878 ; +C -1 ; WX 556 ; N eogonek ; B 70 -228 593 546 ; +C -1 ; WX 722 ; N Uogonek ; B 116 -228 804 718 ; +C -1 ; WX 722 ; N Aacute ; B 20 0 750 936 ; +C -1 ; WX 722 ; N Adieresis ; B 20 0 716 915 ; +C -1 ; WX 556 ; N egrave ; B 70 -14 593 750 ; +C -1 ; WX 500 ; N zacute ; B 20 0 599 750 ; +C -1 ; WX 278 ; N iogonek ; B -14 -224 363 725 ; +C -1 ; WX 778 ; N Oacute ; B 107 -19 823 936 ; +C -1 ; WX 611 ; N oacute ; B 82 -14 654 750 ; +C -1 ; WX 556 ; N amacron ; B 55 -14 595 678 ; +C -1 ; WX 556 ; N sacute ; B 63 -14 627 750 ; +C -1 ; WX 278 ; N idieresis ; B 69 0 455 729 ; +C -1 ; WX 778 ; N Ocircumflex ; B 107 -19 823 936 ; +C -1 ; WX 722 ; N Ugrave ; B 116 -19 804 936 ; +C -1 ; WX 612 ; N Delta ; B 6 0 608 688 ; +C -1 ; WX 611 ; N thorn ; B 18 -208 645 718 ; +C -1 ; WX 333 ; N twosuperior ; B 69 283 449 710 ; +C -1 ; WX 778 ; N Odieresis ; B 107 -19 823 915 ; +C -1 ; WX 611 ; N mu ; B 22 -207 658 532 ; +C -1 ; WX 278 ; N igrave ; B 69 0 326 750 ; +C -1 ; WX 611 ; N ohungarumlaut ; B 82 -14 784 750 ; +C -1 ; WX 667 ; N Eogonek ; B 76 -224 757 718 ; +C -1 ; WX 611 ; N dcroat ; B 82 -14 789 718 ; +C -1 ; WX 834 ; N threequarters ; B 99 -19 839 710 ; +C -1 ; WX 667 ; N Scedilla ; B 81 -228 718 737 ; +C -1 ; WX 400 ; N lcaron ; B 69 0 561 718 ; +C -1 ; WX 722 ; N Kcommaaccent ; B 87 -228 858 718 ; +C -1 ; WX 611 ; N Lacute ; B 76 0 611 936 ; +C -1 ; WX 1000 ; N trademark ; B 179 306 1109 718 ; +C -1 ; WX 556 ; N edotaccent ; B 70 -14 593 729 ; +C -1 ; WX 278 ; N Igrave ; B 64 0 367 936 ; +C -1 ; WX 278 ; N Imacron ; B 64 0 496 864 ; +C -1 ; WX 611 ; N Lcaron ; B 76 0 643 718 ; +C -1 ; WX 834 ; N onehalf ; B 132 -19 858 710 ; +C -1 ; WX 549 ; N lessequal ; B 29 0 676 704 ; +C -1 ; WX 611 ; N ocircumflex ; B 82 -14 643 750 ; +C -1 ; WX 611 ; N ntilde ; B 65 0 646 737 ; +C -1 ; WX 722 ; N Uhungarumlaut ; B 116 -19 880 936 ; +C -1 ; WX 667 ; N Eacute ; B 76 0 757 936 ; +C -1 ; WX 556 ; N emacron ; B 70 -14 595 678 ; +C -1 ; WX 611 ; N gbreve ; B 38 -217 666 750 ; +C -1 ; WX 834 ; N onequarter ; B 132 -19 806 710 ; +C -1 ; WX 667 ; N Scaron ; B 81 -19 718 936 ; +C -1 ; WX 667 ; N Scommaaccent ; B 81 -228 718 737 ; +C -1 ; WX 778 ; N Ohungarumlaut ; B 107 -19 908 936 ; +C -1 ; WX 400 ; N degree ; B 175 426 467 712 ; +C -1 ; WX 611 ; N ograve ; B 82 -14 643 750 ; +C -1 ; WX 722 ; N Ccaron ; B 107 -19 789 936 ; +C -1 ; WX 611 ; N ugrave ; B 98 -14 658 750 ; +C -1 ; WX 549 ; N radical ; B 112 -46 689 850 ; +C -1 ; WX 722 ; N Dcaron ; B 76 0 777 936 ; +C -1 ; WX 389 ; N rcommaaccent ; B 26 -228 489 546 ; +C -1 ; WX 722 ; N Ntilde ; B 69 0 807 923 ; +C -1 ; WX 611 ; N otilde ; B 82 -14 646 737 ; +C -1 ; WX 722 ; N Rcommaaccent ; B 76 -228 778 718 ; +C -1 ; WX 611 ; N Lcommaaccent ; B 76 -228 611 718 ; +C -1 ; WX 722 ; N Atilde ; B 20 0 741 923 ; +C -1 ; WX 722 ; N Aogonek ; B 20 -224 702 718 ; +C -1 ; WX 722 ; N Aring ; B 20 0 702 962 ; +C -1 ; WX 778 ; N Otilde ; B 107 -19 823 923 ; +C -1 ; WX 500 ; N zdotaccent ; B 20 0 583 729 ; +C -1 ; WX 667 ; N Ecaron ; B 76 0 757 936 ; +C -1 ; WX 278 ; N Iogonek ; B -41 -228 367 718 ; +C -1 ; WX 556 ; N kcommaaccent ; B 69 -228 670 718 ; +C -1 ; WX 584 ; N minus ; B 82 197 610 309 ; +C -1 ; WX 278 ; N Icircumflex ; B 64 0 484 936 ; +C -1 ; WX 611 ; N ncaron ; B 65 0 641 750 ; +C -1 ; WX 333 ; N tcommaaccent ; B 58 -228 422 676 ; +C -1 ; WX 584 ; N logicalnot ; B 105 108 633 419 ; +C -1 ; WX 611 ; N odieresis ; B 82 -14 643 729 ; +C -1 ; WX 611 ; N udieresis ; B 98 -14 658 729 ; +C -1 ; WX 549 ; N notequal ; B 32 -49 630 570 ; +C -1 ; WX 611 ; N gcommaaccent ; B 38 -217 666 850 ; +C -1 ; WX 611 ; N eth ; B 82 -14 670 737 ; +C -1 ; WX 500 ; N zcaron ; B 20 0 586 750 ; +C -1 ; WX 611 ; N ncommaaccent ; B 65 -228 629 546 ; +C -1 ; WX 333 ; N onesuperior ; B 148 283 388 710 ; +C -1 ; WX 278 ; N imacron ; B 69 0 429 678 ; +C -1 ; WX 556 ; N Euro ; B 0 0 0 0 ; +EndCharMetrics +StartKernData +StartKernPairs 2481 +KPX A C -40 +KPX A Cacute -40 +KPX A Ccaron -40 +KPX A Ccedilla -40 +KPX A G -50 +KPX A Gbreve -50 +KPX A Gcommaaccent -50 +KPX A O -40 +KPX A Oacute -40 +KPX A Ocircumflex -40 +KPX A Odieresis -40 +KPX A Ograve -40 +KPX A Ohungarumlaut -40 +KPX A Omacron -40 +KPX A Oslash -40 +KPX A Otilde -40 +KPX A Q -40 +KPX A T -90 +KPX A Tcaron -90 +KPX A Tcommaaccent -90 +KPX A U -50 +KPX A Uacute -50 +KPX A Ucircumflex -50 +KPX A Udieresis -50 +KPX A Ugrave -50 +KPX A Uhungarumlaut -50 +KPX A Umacron -50 +KPX A Uogonek -50 +KPX A Uring -50 +KPX A V -80 +KPX A W -60 +KPX A Y -110 +KPX A Yacute -110 +KPX A Ydieresis -110 +KPX A u -30 +KPX A uacute -30 +KPX A ucircumflex -30 +KPX A udieresis -30 +KPX A ugrave -30 +KPX A uhungarumlaut -30 +KPX A umacron -30 +KPX A uogonek -30 +KPX A uring -30 +KPX A v -40 +KPX A w -30 +KPX A y -30 +KPX A yacute -30 +KPX A ydieresis -30 +KPX Aacute C -40 +KPX Aacute Cacute -40 +KPX Aacute Ccaron -40 +KPX Aacute Ccedilla -40 +KPX Aacute G -50 +KPX Aacute Gbreve -50 +KPX Aacute Gcommaaccent -50 +KPX Aacute O -40 +KPX Aacute Oacute -40 +KPX Aacute Ocircumflex -40 +KPX Aacute Odieresis -40 +KPX Aacute Ograve -40 +KPX Aacute Ohungarumlaut -40 +KPX Aacute Omacron -40 +KPX Aacute Oslash -40 +KPX Aacute Otilde -40 +KPX Aacute Q -40 +KPX Aacute T -90 +KPX Aacute Tcaron -90 +KPX Aacute Tcommaaccent -90 +KPX Aacute U -50 +KPX Aacute Uacute -50 +KPX Aacute Ucircumflex -50 +KPX Aacute Udieresis -50 +KPX Aacute Ugrave -50 +KPX Aacute Uhungarumlaut -50 +KPX Aacute Umacron -50 +KPX Aacute Uogonek -50 +KPX Aacute Uring -50 +KPX Aacute V -80 +KPX Aacute W -60 +KPX Aacute Y -110 +KPX Aacute Yacute -110 +KPX Aacute Ydieresis -110 +KPX Aacute u -30 +KPX Aacute uacute -30 +KPX Aacute ucircumflex -30 +KPX Aacute udieresis -30 +KPX Aacute ugrave -30 +KPX Aacute uhungarumlaut -30 +KPX Aacute umacron -30 +KPX Aacute uogonek -30 +KPX Aacute uring -30 +KPX Aacute v -40 +KPX Aacute w -30 +KPX Aacute y -30 +KPX Aacute yacute -30 +KPX Aacute ydieresis -30 +KPX Abreve C -40 +KPX Abreve Cacute -40 +KPX Abreve Ccaron -40 +KPX Abreve Ccedilla -40 +KPX Abreve G -50 +KPX Abreve Gbreve -50 +KPX Abreve Gcommaaccent -50 +KPX Abreve O -40 +KPX Abreve Oacute -40 +KPX Abreve Ocircumflex -40 +KPX Abreve Odieresis -40 +KPX Abreve Ograve -40 +KPX Abreve Ohungarumlaut -40 +KPX Abreve Omacron -40 +KPX Abreve Oslash -40 +KPX Abreve Otilde -40 +KPX Abreve Q -40 +KPX Abreve T -90 +KPX Abreve Tcaron -90 +KPX Abreve Tcommaaccent -90 +KPX Abreve U -50 +KPX Abreve Uacute -50 +KPX Abreve Ucircumflex -50 +KPX Abreve Udieresis -50 +KPX Abreve Ugrave -50 +KPX Abreve Uhungarumlaut -50 +KPX Abreve Umacron -50 +KPX Abreve Uogonek -50 +KPX Abreve Uring -50 +KPX Abreve V -80 +KPX Abreve W -60 +KPX Abreve Y -110 +KPX Abreve Yacute -110 +KPX Abreve Ydieresis -110 +KPX Abreve u -30 +KPX Abreve uacute -30 +KPX Abreve ucircumflex -30 +KPX Abreve udieresis -30 +KPX Abreve ugrave -30 +KPX Abreve uhungarumlaut -30 +KPX Abreve umacron -30 +KPX Abreve uogonek -30 +KPX Abreve uring -30 +KPX Abreve v -40 +KPX Abreve w -30 +KPX Abreve y -30 +KPX Abreve yacute -30 +KPX Abreve ydieresis -30 +KPX Acircumflex C -40 +KPX Acircumflex Cacute -40 +KPX Acircumflex Ccaron -40 +KPX Acircumflex Ccedilla -40 +KPX Acircumflex G -50 +KPX Acircumflex Gbreve -50 +KPX Acircumflex Gcommaaccent -50 +KPX Acircumflex O -40 +KPX Acircumflex Oacute -40 +KPX Acircumflex Ocircumflex -40 +KPX Acircumflex Odieresis -40 +KPX Acircumflex Ograve -40 +KPX Acircumflex Ohungarumlaut -40 +KPX Acircumflex Omacron -40 +KPX Acircumflex Oslash -40 +KPX Acircumflex Otilde -40 +KPX Acircumflex Q -40 +KPX Acircumflex T -90 +KPX Acircumflex Tcaron -90 +KPX Acircumflex Tcommaaccent -90 +KPX Acircumflex U -50 +KPX Acircumflex Uacute -50 +KPX Acircumflex Ucircumflex -50 +KPX Acircumflex Udieresis -50 +KPX Acircumflex Ugrave -50 +KPX Acircumflex Uhungarumlaut -50 +KPX Acircumflex Umacron -50 +KPX Acircumflex Uogonek -50 +KPX Acircumflex Uring -50 +KPX Acircumflex V -80 +KPX Acircumflex W -60 +KPX Acircumflex Y -110 +KPX Acircumflex Yacute -110 +KPX Acircumflex Ydieresis -110 +KPX Acircumflex u -30 +KPX Acircumflex uacute -30 +KPX Acircumflex ucircumflex -30 +KPX Acircumflex udieresis -30 +KPX Acircumflex ugrave -30 +KPX Acircumflex uhungarumlaut -30 +KPX Acircumflex umacron -30 +KPX Acircumflex uogonek -30 +KPX Acircumflex uring -30 +KPX Acircumflex v -40 +KPX Acircumflex w -30 +KPX Acircumflex y -30 +KPX Acircumflex yacute -30 +KPX Acircumflex ydieresis -30 +KPX Adieresis C -40 +KPX Adieresis Cacute -40 +KPX Adieresis Ccaron -40 +KPX Adieresis Ccedilla -40 +KPX Adieresis G -50 +KPX Adieresis Gbreve -50 +KPX Adieresis Gcommaaccent -50 +KPX Adieresis O -40 +KPX Adieresis Oacute -40 +KPX Adieresis Ocircumflex -40 +KPX Adieresis Odieresis -40 +KPX Adieresis Ograve -40 +KPX Adieresis Ohungarumlaut -40 +KPX Adieresis Omacron -40 +KPX Adieresis Oslash -40 +KPX Adieresis Otilde -40 +KPX Adieresis Q -40 +KPX Adieresis T -90 +KPX Adieresis Tcaron -90 +KPX Adieresis Tcommaaccent -90 +KPX Adieresis U -50 +KPX Adieresis Uacute -50 +KPX Adieresis Ucircumflex -50 +KPX Adieresis Udieresis -50 +KPX Adieresis Ugrave -50 +KPX Adieresis Uhungarumlaut -50 +KPX Adieresis Umacron -50 +KPX Adieresis Uogonek -50 +KPX Adieresis Uring -50 +KPX Adieresis V -80 +KPX Adieresis W -60 +KPX Adieresis Y -110 +KPX Adieresis Yacute -110 +KPX Adieresis Ydieresis -110 +KPX Adieresis u -30 +KPX Adieresis uacute -30 +KPX Adieresis ucircumflex -30 +KPX Adieresis udieresis -30 +KPX Adieresis ugrave -30 +KPX Adieresis uhungarumlaut -30 +KPX Adieresis umacron -30 +KPX Adieresis uogonek -30 +KPX Adieresis uring -30 +KPX Adieresis v -40 +KPX Adieresis w -30 +KPX Adieresis y -30 +KPX Adieresis yacute -30 +KPX Adieresis ydieresis -30 +KPX Agrave C -40 +KPX Agrave Cacute -40 +KPX Agrave Ccaron -40 +KPX Agrave Ccedilla -40 +KPX Agrave G -50 +KPX Agrave Gbreve -50 +KPX Agrave Gcommaaccent -50 +KPX Agrave O -40 +KPX Agrave Oacute -40 +KPX Agrave Ocircumflex -40 +KPX Agrave Odieresis -40 +KPX Agrave Ograve -40 +KPX Agrave Ohungarumlaut -40 +KPX Agrave Omacron -40 +KPX Agrave Oslash -40 +KPX Agrave Otilde -40 +KPX Agrave Q -40 +KPX Agrave T -90 +KPX Agrave Tcaron -90 +KPX Agrave Tcommaaccent -90 +KPX Agrave U -50 +KPX Agrave Uacute -50 +KPX Agrave Ucircumflex -50 +KPX Agrave Udieresis -50 +KPX Agrave Ugrave -50 +KPX Agrave Uhungarumlaut -50 +KPX Agrave Umacron -50 +KPX Agrave Uogonek -50 +KPX Agrave Uring -50 +KPX Agrave V -80 +KPX Agrave W -60 +KPX Agrave Y -110 +KPX Agrave Yacute -110 +KPX Agrave Ydieresis -110 +KPX Agrave u -30 +KPX Agrave uacute -30 +KPX Agrave ucircumflex -30 +KPX Agrave udieresis -30 +KPX Agrave ugrave -30 +KPX Agrave uhungarumlaut -30 +KPX Agrave umacron -30 +KPX Agrave uogonek -30 +KPX Agrave uring -30 +KPX Agrave v -40 +KPX Agrave w -30 +KPX Agrave y -30 +KPX Agrave yacute -30 +KPX Agrave ydieresis -30 +KPX Amacron C -40 +KPX Amacron Cacute -40 +KPX Amacron Ccaron -40 +KPX Amacron Ccedilla -40 +KPX Amacron G -50 +KPX Amacron Gbreve -50 +KPX Amacron Gcommaaccent -50 +KPX Amacron O -40 +KPX Amacron Oacute -40 +KPX Amacron Ocircumflex -40 +KPX Amacron Odieresis -40 +KPX Amacron Ograve -40 +KPX Amacron Ohungarumlaut -40 +KPX Amacron Omacron -40 +KPX Amacron Oslash -40 +KPX Amacron Otilde -40 +KPX Amacron Q -40 +KPX Amacron T -90 +KPX Amacron Tcaron -90 +KPX Amacron Tcommaaccent -90 +KPX Amacron U -50 +KPX Amacron Uacute -50 +KPX Amacron Ucircumflex -50 +KPX Amacron Udieresis -50 +KPX Amacron Ugrave -50 +KPX Amacron Uhungarumlaut -50 +KPX Amacron Umacron -50 +KPX Amacron Uogonek -50 +KPX Amacron Uring -50 +KPX Amacron V -80 +KPX Amacron W -60 +KPX Amacron Y -110 +KPX Amacron Yacute -110 +KPX Amacron Ydieresis -110 +KPX Amacron u -30 +KPX Amacron uacute -30 +KPX Amacron ucircumflex -30 +KPX Amacron udieresis -30 +KPX Amacron ugrave -30 +KPX Amacron uhungarumlaut -30 +KPX Amacron umacron -30 +KPX Amacron uogonek -30 +KPX Amacron uring -30 +KPX Amacron v -40 +KPX Amacron w -30 +KPX Amacron y -30 +KPX Amacron yacute -30 +KPX Amacron ydieresis -30 +KPX Aogonek C -40 +KPX Aogonek Cacute -40 +KPX Aogonek Ccaron -40 +KPX Aogonek Ccedilla -40 +KPX Aogonek G -50 +KPX Aogonek Gbreve -50 +KPX Aogonek Gcommaaccent -50 +KPX Aogonek O -40 +KPX Aogonek Oacute -40 +KPX Aogonek Ocircumflex -40 +KPX Aogonek Odieresis -40 +KPX Aogonek Ograve -40 +KPX Aogonek Ohungarumlaut -40 +KPX Aogonek Omacron -40 +KPX Aogonek Oslash -40 +KPX Aogonek Otilde -40 +KPX Aogonek Q -40 +KPX Aogonek T -90 +KPX Aogonek Tcaron -90 +KPX Aogonek Tcommaaccent -90 +KPX Aogonek U -50 +KPX Aogonek Uacute -50 +KPX Aogonek Ucircumflex -50 +KPX Aogonek Udieresis -50 +KPX Aogonek Ugrave -50 +KPX Aogonek Uhungarumlaut -50 +KPX Aogonek Umacron -50 +KPX Aogonek Uogonek -50 +KPX Aogonek Uring -50 +KPX Aogonek V -80 +KPX Aogonek W -60 +KPX Aogonek Y -110 +KPX Aogonek Yacute -110 +KPX Aogonek Ydieresis -110 +KPX Aogonek u -30 +KPX Aogonek uacute -30 +KPX Aogonek ucircumflex -30 +KPX Aogonek udieresis -30 +KPX Aogonek ugrave -30 +KPX Aogonek uhungarumlaut -30 +KPX Aogonek umacron -30 +KPX Aogonek uogonek -30 +KPX Aogonek uring -30 +KPX Aogonek v -40 +KPX Aogonek w -30 +KPX Aogonek y -30 +KPX Aogonek yacute -30 +KPX Aogonek ydieresis -30 +KPX Aring C -40 +KPX Aring Cacute -40 +KPX Aring Ccaron -40 +KPX Aring Ccedilla -40 +KPX Aring G -50 +KPX Aring Gbreve -50 +KPX Aring Gcommaaccent -50 +KPX Aring O -40 +KPX Aring Oacute -40 +KPX Aring Ocircumflex -40 +KPX Aring Odieresis -40 +KPX Aring Ograve -40 +KPX Aring Ohungarumlaut -40 +KPX Aring Omacron -40 +KPX Aring Oslash -40 +KPX Aring Otilde -40 +KPX Aring Q -40 +KPX Aring T -90 +KPX Aring Tcaron -90 +KPX Aring Tcommaaccent -90 +KPX Aring U -50 +KPX Aring Uacute -50 +KPX Aring Ucircumflex -50 +KPX Aring Udieresis -50 +KPX Aring Ugrave -50 +KPX Aring Uhungarumlaut -50 +KPX Aring Umacron -50 +KPX Aring Uogonek -50 +KPX Aring Uring -50 +KPX Aring V -80 +KPX Aring W -60 +KPX Aring Y -110 +KPX Aring Yacute -110 +KPX Aring Ydieresis -110 +KPX Aring u -30 +KPX Aring uacute -30 +KPX Aring ucircumflex -30 +KPX Aring udieresis -30 +KPX Aring ugrave -30 +KPX Aring uhungarumlaut -30 +KPX Aring umacron -30 +KPX Aring uogonek -30 +KPX Aring uring -30 +KPX Aring v -40 +KPX Aring w -30 +KPX Aring y -30 +KPX Aring yacute -30 +KPX Aring ydieresis -30 +KPX Atilde C -40 +KPX Atilde Cacute -40 +KPX Atilde Ccaron -40 +KPX Atilde Ccedilla -40 +KPX Atilde G -50 +KPX Atilde Gbreve -50 +KPX Atilde Gcommaaccent -50 +KPX Atilde O -40 +KPX Atilde Oacute -40 +KPX Atilde Ocircumflex -40 +KPX Atilde Odieresis -40 +KPX Atilde Ograve -40 +KPX Atilde Ohungarumlaut -40 +KPX Atilde Omacron -40 +KPX Atilde Oslash -40 +KPX Atilde Otilde -40 +KPX Atilde Q -40 +KPX Atilde T -90 +KPX Atilde Tcaron -90 +KPX Atilde Tcommaaccent -90 +KPX Atilde U -50 +KPX Atilde Uacute -50 +KPX Atilde Ucircumflex -50 +KPX Atilde Udieresis -50 +KPX Atilde Ugrave -50 +KPX Atilde Uhungarumlaut -50 +KPX Atilde Umacron -50 +KPX Atilde Uogonek -50 +KPX Atilde Uring -50 +KPX Atilde V -80 +KPX Atilde W -60 +KPX Atilde Y -110 +KPX Atilde Yacute -110 +KPX Atilde Ydieresis -110 +KPX Atilde u -30 +KPX Atilde uacute -30 +KPX Atilde ucircumflex -30 +KPX Atilde udieresis -30 +KPX Atilde ugrave -30 +KPX Atilde uhungarumlaut -30 +KPX Atilde umacron -30 +KPX Atilde uogonek -30 +KPX Atilde uring -30 +KPX Atilde v -40 +KPX Atilde w -30 +KPX Atilde y -30 +KPX Atilde yacute -30 +KPX Atilde ydieresis -30 +KPX B A -30 +KPX B Aacute -30 +KPX B Abreve -30 +KPX B Acircumflex -30 +KPX B Adieresis -30 +KPX B Agrave -30 +KPX B Amacron -30 +KPX B Aogonek -30 +KPX B Aring -30 +KPX B Atilde -30 +KPX B U -10 +KPX B Uacute -10 +KPX B Ucircumflex -10 +KPX B Udieresis -10 +KPX B Ugrave -10 +KPX B Uhungarumlaut -10 +KPX B Umacron -10 +KPX B Uogonek -10 +KPX B Uring -10 +KPX D A -40 +KPX D Aacute -40 +KPX D Abreve -40 +KPX D Acircumflex -40 +KPX D Adieresis -40 +KPX D Agrave -40 +KPX D Amacron -40 +KPX D Aogonek -40 +KPX D Aring -40 +KPX D Atilde -40 +KPX D V -40 +KPX D W -40 +KPX D Y -70 +KPX D Yacute -70 +KPX D Ydieresis -70 +KPX D comma -30 +KPX D period -30 +KPX Dcaron A -40 +KPX Dcaron Aacute -40 +KPX Dcaron Abreve -40 +KPX Dcaron Acircumflex -40 +KPX Dcaron Adieresis -40 +KPX Dcaron Agrave -40 +KPX Dcaron Amacron -40 +KPX Dcaron Aogonek -40 +KPX Dcaron Aring -40 +KPX Dcaron Atilde -40 +KPX Dcaron V -40 +KPX Dcaron W -40 +KPX Dcaron Y -70 +KPX Dcaron Yacute -70 +KPX Dcaron Ydieresis -70 +KPX Dcaron comma -30 +KPX Dcaron period -30 +KPX Dcroat A -40 +KPX Dcroat Aacute -40 +KPX Dcroat Abreve -40 +KPX Dcroat Acircumflex -40 +KPX Dcroat Adieresis -40 +KPX Dcroat Agrave -40 +KPX Dcroat Amacron -40 +KPX Dcroat Aogonek -40 +KPX Dcroat Aring -40 +KPX Dcroat Atilde -40 +KPX Dcroat V -40 +KPX Dcroat W -40 +KPX Dcroat Y -70 +KPX Dcroat Yacute -70 +KPX Dcroat Ydieresis -70 +KPX Dcroat comma -30 +KPX Dcroat period -30 +KPX F A -80 +KPX F Aacute -80 +KPX F Abreve -80 +KPX F Acircumflex -80 +KPX F Adieresis -80 +KPX F Agrave -80 +KPX F Amacron -80 +KPX F Aogonek -80 +KPX F Aring -80 +KPX F Atilde -80 +KPX F a -20 +KPX F aacute -20 +KPX F abreve -20 +KPX F acircumflex -20 +KPX F adieresis -20 +KPX F agrave -20 +KPX F amacron -20 +KPX F aogonek -20 +KPX F aring -20 +KPX F atilde -20 +KPX F comma -100 +KPX F period -100 +KPX J A -20 +KPX J Aacute -20 +KPX J Abreve -20 +KPX J Acircumflex -20 +KPX J Adieresis -20 +KPX J Agrave -20 +KPX J Amacron -20 +KPX J Aogonek -20 +KPX J Aring -20 +KPX J Atilde -20 +KPX J comma -20 +KPX J period -20 +KPX J u -20 +KPX J uacute -20 +KPX J ucircumflex -20 +KPX J udieresis -20 +KPX J ugrave -20 +KPX J uhungarumlaut -20 +KPX J umacron -20 +KPX J uogonek -20 +KPX J uring -20 +KPX K O -30 +KPX K Oacute -30 +KPX K Ocircumflex -30 +KPX K Odieresis -30 +KPX K Ograve -30 +KPX K Ohungarumlaut -30 +KPX K Omacron -30 +KPX K Oslash -30 +KPX K Otilde -30 +KPX K e -15 +KPX K eacute -15 +KPX K ecaron -15 +KPX K ecircumflex -15 +KPX K edieresis -15 +KPX K edotaccent -15 +KPX K egrave -15 +KPX K emacron -15 +KPX K eogonek -15 +KPX K o -35 +KPX K oacute -35 +KPX K ocircumflex -35 +KPX K odieresis -35 +KPX K ograve -35 +KPX K ohungarumlaut -35 +KPX K omacron -35 +KPX K oslash -35 +KPX K otilde -35 +KPX K u -30 +KPX K uacute -30 +KPX K ucircumflex -30 +KPX K udieresis -30 +KPX K ugrave -30 +KPX K uhungarumlaut -30 +KPX K umacron -30 +KPX K uogonek -30 +KPX K uring -30 +KPX K y -40 +KPX K yacute -40 +KPX K ydieresis -40 +KPX Kcommaaccent O -30 +KPX Kcommaaccent Oacute -30 +KPX Kcommaaccent Ocircumflex -30 +KPX Kcommaaccent Odieresis -30 +KPX Kcommaaccent Ograve -30 +KPX Kcommaaccent Ohungarumlaut -30 +KPX Kcommaaccent Omacron -30 +KPX Kcommaaccent Oslash -30 +KPX Kcommaaccent Otilde -30 +KPX Kcommaaccent e -15 +KPX Kcommaaccent eacute -15 +KPX Kcommaaccent ecaron -15 +KPX Kcommaaccent ecircumflex -15 +KPX Kcommaaccent edieresis -15 +KPX Kcommaaccent edotaccent -15 +KPX Kcommaaccent egrave -15 +KPX Kcommaaccent emacron -15 +KPX Kcommaaccent eogonek -15 +KPX Kcommaaccent o -35 +KPX Kcommaaccent oacute -35 +KPX Kcommaaccent ocircumflex -35 +KPX Kcommaaccent odieresis -35 +KPX Kcommaaccent ograve -35 +KPX Kcommaaccent ohungarumlaut -35 +KPX Kcommaaccent omacron -35 +KPX Kcommaaccent oslash -35 +KPX Kcommaaccent otilde -35 +KPX Kcommaaccent u -30 +KPX Kcommaaccent uacute -30 +KPX Kcommaaccent ucircumflex -30 +KPX Kcommaaccent udieresis -30 +KPX Kcommaaccent ugrave -30 +KPX Kcommaaccent uhungarumlaut -30 +KPX Kcommaaccent umacron -30 +KPX Kcommaaccent uogonek -30 +KPX Kcommaaccent uring -30 +KPX Kcommaaccent y -40 +KPX Kcommaaccent yacute -40 +KPX Kcommaaccent ydieresis -40 +KPX L T -90 +KPX L Tcaron -90 +KPX L Tcommaaccent -90 +KPX L V -110 +KPX L W -80 +KPX L Y -120 +KPX L Yacute -120 +KPX L Ydieresis -120 +KPX L quotedblright -140 +KPX L quoteright -140 +KPX L y -30 +KPX L yacute -30 +KPX L ydieresis -30 +KPX Lacute T -90 +KPX Lacute Tcaron -90 +KPX Lacute Tcommaaccent -90 +KPX Lacute V -110 +KPX Lacute W -80 +KPX Lacute Y -120 +KPX Lacute Yacute -120 +KPX Lacute Ydieresis -120 +KPX Lacute quotedblright -140 +KPX Lacute quoteright -140 +KPX Lacute y -30 +KPX Lacute yacute -30 +KPX Lacute ydieresis -30 +KPX Lcommaaccent T -90 +KPX Lcommaaccent Tcaron -90 +KPX Lcommaaccent Tcommaaccent -90 +KPX Lcommaaccent V -110 +KPX Lcommaaccent W -80 +KPX Lcommaaccent Y -120 +KPX Lcommaaccent Yacute -120 +KPX Lcommaaccent Ydieresis -120 +KPX Lcommaaccent quotedblright -140 +KPX Lcommaaccent quoteright -140 +KPX Lcommaaccent y -30 +KPX Lcommaaccent yacute -30 +KPX Lcommaaccent ydieresis -30 +KPX Lslash T -90 +KPX Lslash Tcaron -90 +KPX Lslash Tcommaaccent -90 +KPX Lslash V -110 +KPX Lslash W -80 +KPX Lslash Y -120 +KPX Lslash Yacute -120 +KPX Lslash Ydieresis -120 +KPX Lslash quotedblright -140 +KPX Lslash quoteright -140 +KPX Lslash y -30 +KPX Lslash yacute -30 +KPX Lslash ydieresis -30 +KPX O A -50 +KPX O Aacute -50 +KPX O Abreve -50 +KPX O Acircumflex -50 +KPX O Adieresis -50 +KPX O Agrave -50 +KPX O Amacron -50 +KPX O Aogonek -50 +KPX O Aring -50 +KPX O Atilde -50 +KPX O T -40 +KPX O Tcaron -40 +KPX O Tcommaaccent -40 +KPX O V -50 +KPX O W -50 +KPX O X -50 +KPX O Y -70 +KPX O Yacute -70 +KPX O Ydieresis -70 +KPX O comma -40 +KPX O period -40 +KPX Oacute A -50 +KPX Oacute Aacute -50 +KPX Oacute Abreve -50 +KPX Oacute Acircumflex -50 +KPX Oacute Adieresis -50 +KPX Oacute Agrave -50 +KPX Oacute Amacron -50 +KPX Oacute Aogonek -50 +KPX Oacute Aring -50 +KPX Oacute Atilde -50 +KPX Oacute T -40 +KPX Oacute Tcaron -40 +KPX Oacute Tcommaaccent -40 +KPX Oacute V -50 +KPX Oacute W -50 +KPX Oacute X -50 +KPX Oacute Y -70 +KPX Oacute Yacute -70 +KPX Oacute Ydieresis -70 +KPX Oacute comma -40 +KPX Oacute period -40 +KPX Ocircumflex A -50 +KPX Ocircumflex Aacute -50 +KPX Ocircumflex Abreve -50 +KPX Ocircumflex Acircumflex -50 +KPX Ocircumflex Adieresis -50 +KPX Ocircumflex Agrave -50 +KPX Ocircumflex Amacron -50 +KPX Ocircumflex Aogonek -50 +KPX Ocircumflex Aring -50 +KPX Ocircumflex Atilde -50 +KPX Ocircumflex T -40 +KPX Ocircumflex Tcaron -40 +KPX Ocircumflex Tcommaaccent -40 +KPX Ocircumflex V -50 +KPX Ocircumflex W -50 +KPX Ocircumflex X -50 +KPX Ocircumflex Y -70 +KPX Ocircumflex Yacute -70 +KPX Ocircumflex Ydieresis -70 +KPX Ocircumflex comma -40 +KPX Ocircumflex period -40 +KPX Odieresis A -50 +KPX Odieresis Aacute -50 +KPX Odieresis Abreve -50 +KPX Odieresis Acircumflex -50 +KPX Odieresis Adieresis -50 +KPX Odieresis Agrave -50 +KPX Odieresis Amacron -50 +KPX Odieresis Aogonek -50 +KPX Odieresis Aring -50 +KPX Odieresis Atilde -50 +KPX Odieresis T -40 +KPX Odieresis Tcaron -40 +KPX Odieresis Tcommaaccent -40 +KPX Odieresis V -50 +KPX Odieresis W -50 +KPX Odieresis X -50 +KPX Odieresis Y -70 +KPX Odieresis Yacute -70 +KPX Odieresis Ydieresis -70 +KPX Odieresis comma -40 +KPX Odieresis period -40 +KPX Ograve A -50 +KPX Ograve Aacute -50 +KPX Ograve Abreve -50 +KPX Ograve Acircumflex -50 +KPX Ograve Adieresis -50 +KPX Ograve Agrave -50 +KPX Ograve Amacron -50 +KPX Ograve Aogonek -50 +KPX Ograve Aring -50 +KPX Ograve Atilde -50 +KPX Ograve T -40 +KPX Ograve Tcaron -40 +KPX Ograve Tcommaaccent -40 +KPX Ograve V -50 +KPX Ograve W -50 +KPX Ograve X -50 +KPX Ograve Y -70 +KPX Ograve Yacute -70 +KPX Ograve Ydieresis -70 +KPX Ograve comma -40 +KPX Ograve period -40 +KPX Ohungarumlaut A -50 +KPX Ohungarumlaut Aacute -50 +KPX Ohungarumlaut Abreve -50 +KPX Ohungarumlaut Acircumflex -50 +KPX Ohungarumlaut Adieresis -50 +KPX Ohungarumlaut Agrave -50 +KPX Ohungarumlaut Amacron -50 +KPX Ohungarumlaut Aogonek -50 +KPX Ohungarumlaut Aring -50 +KPX Ohungarumlaut Atilde -50 +KPX Ohungarumlaut T -40 +KPX Ohungarumlaut Tcaron -40 +KPX Ohungarumlaut Tcommaaccent -40 +KPX Ohungarumlaut V -50 +KPX Ohungarumlaut W -50 +KPX Ohungarumlaut X -50 +KPX Ohungarumlaut Y -70 +KPX Ohungarumlaut Yacute -70 +KPX Ohungarumlaut Ydieresis -70 +KPX Ohungarumlaut comma -40 +KPX Ohungarumlaut period -40 +KPX Omacron A -50 +KPX Omacron Aacute -50 +KPX Omacron Abreve -50 +KPX Omacron Acircumflex -50 +KPX Omacron Adieresis -50 +KPX Omacron Agrave -50 +KPX Omacron Amacron -50 +KPX Omacron Aogonek -50 +KPX Omacron Aring -50 +KPX Omacron Atilde -50 +KPX Omacron T -40 +KPX Omacron Tcaron -40 +KPX Omacron Tcommaaccent -40 +KPX Omacron V -50 +KPX Omacron W -50 +KPX Omacron X -50 +KPX Omacron Y -70 +KPX Omacron Yacute -70 +KPX Omacron Ydieresis -70 +KPX Omacron comma -40 +KPX Omacron period -40 +KPX Oslash A -50 +KPX Oslash Aacute -50 +KPX Oslash Abreve -50 +KPX Oslash Acircumflex -50 +KPX Oslash Adieresis -50 +KPX Oslash Agrave -50 +KPX Oslash Amacron -50 +KPX Oslash Aogonek -50 +KPX Oslash Aring -50 +KPX Oslash Atilde -50 +KPX Oslash T -40 +KPX Oslash Tcaron -40 +KPX Oslash Tcommaaccent -40 +KPX Oslash V -50 +KPX Oslash W -50 +KPX Oslash X -50 +KPX Oslash Y -70 +KPX Oslash Yacute -70 +KPX Oslash Ydieresis -70 +KPX Oslash comma -40 +KPX Oslash period -40 +KPX Otilde A -50 +KPX Otilde Aacute -50 +KPX Otilde Abreve -50 +KPX Otilde Acircumflex -50 +KPX Otilde Adieresis -50 +KPX Otilde Agrave -50 +KPX Otilde Amacron -50 +KPX Otilde Aogonek -50 +KPX Otilde Aring -50 +KPX Otilde Atilde -50 +KPX Otilde T -40 +KPX Otilde Tcaron -40 +KPX Otilde Tcommaaccent -40 +KPX Otilde V -50 +KPX Otilde W -50 +KPX Otilde X -50 +KPX Otilde Y -70 +KPX Otilde Yacute -70 +KPX Otilde Ydieresis -70 +KPX Otilde comma -40 +KPX Otilde period -40 +KPX P A -100 +KPX P Aacute -100 +KPX P Abreve -100 +KPX P Acircumflex -100 +KPX P Adieresis -100 +KPX P Agrave -100 +KPX P Amacron -100 +KPX P Aogonek -100 +KPX P Aring -100 +KPX P Atilde -100 +KPX P a -30 +KPX P aacute -30 +KPX P abreve -30 +KPX P acircumflex -30 +KPX P adieresis -30 +KPX P agrave -30 +KPX P amacron -30 +KPX P aogonek -30 +KPX P aring -30 +KPX P atilde -30 +KPX P comma -120 +KPX P e -30 +KPX P eacute -30 +KPX P ecaron -30 +KPX P ecircumflex -30 +KPX P edieresis -30 +KPX P edotaccent -30 +KPX P egrave -30 +KPX P emacron -30 +KPX P eogonek -30 +KPX P o -40 +KPX P oacute -40 +KPX P ocircumflex -40 +KPX P odieresis -40 +KPX P ograve -40 +KPX P ohungarumlaut -40 +KPX P omacron -40 +KPX P oslash -40 +KPX P otilde -40 +KPX P period -120 +KPX Q U -10 +KPX Q Uacute -10 +KPX Q Ucircumflex -10 +KPX Q Udieresis -10 +KPX Q Ugrave -10 +KPX Q Uhungarumlaut -10 +KPX Q Umacron -10 +KPX Q Uogonek -10 +KPX Q Uring -10 +KPX Q comma 20 +KPX Q period 20 +KPX R O -20 +KPX R Oacute -20 +KPX R Ocircumflex -20 +KPX R Odieresis -20 +KPX R Ograve -20 +KPX R Ohungarumlaut -20 +KPX R Omacron -20 +KPX R Oslash -20 +KPX R Otilde -20 +KPX R T -20 +KPX R Tcaron -20 +KPX R Tcommaaccent -20 +KPX R U -20 +KPX R Uacute -20 +KPX R Ucircumflex -20 +KPX R Udieresis -20 +KPX R Ugrave -20 +KPX R Uhungarumlaut -20 +KPX R Umacron -20 +KPX R Uogonek -20 +KPX R Uring -20 +KPX R V -50 +KPX R W -40 +KPX R Y -50 +KPX R Yacute -50 +KPX R Ydieresis -50 +KPX Racute O -20 +KPX Racute Oacute -20 +KPX Racute Ocircumflex -20 +KPX Racute Odieresis -20 +KPX Racute Ograve -20 +KPX Racute Ohungarumlaut -20 +KPX Racute Omacron -20 +KPX Racute Oslash -20 +KPX Racute Otilde -20 +KPX Racute T -20 +KPX Racute Tcaron -20 +KPX Racute Tcommaaccent -20 +KPX Racute U -20 +KPX Racute Uacute -20 +KPX Racute Ucircumflex -20 +KPX Racute Udieresis -20 +KPX Racute Ugrave -20 +KPX Racute Uhungarumlaut -20 +KPX Racute Umacron -20 +KPX Racute Uogonek -20 +KPX Racute Uring -20 +KPX Racute V -50 +KPX Racute W -40 +KPX Racute Y -50 +KPX Racute Yacute -50 +KPX Racute Ydieresis -50 +KPX Rcaron O -20 +KPX Rcaron Oacute -20 +KPX Rcaron Ocircumflex -20 +KPX Rcaron Odieresis -20 +KPX Rcaron Ograve -20 +KPX Rcaron Ohungarumlaut -20 +KPX Rcaron Omacron -20 +KPX Rcaron Oslash -20 +KPX Rcaron Otilde -20 +KPX Rcaron T -20 +KPX Rcaron Tcaron -20 +KPX Rcaron Tcommaaccent -20 +KPX Rcaron U -20 +KPX Rcaron Uacute -20 +KPX Rcaron Ucircumflex -20 +KPX Rcaron Udieresis -20 +KPX Rcaron Ugrave -20 +KPX Rcaron Uhungarumlaut -20 +KPX Rcaron Umacron -20 +KPX Rcaron Uogonek -20 +KPX Rcaron Uring -20 +KPX Rcaron V -50 +KPX Rcaron W -40 +KPX Rcaron Y -50 +KPX Rcaron Yacute -50 +KPX Rcaron Ydieresis -50 +KPX Rcommaaccent O -20 +KPX Rcommaaccent Oacute -20 +KPX Rcommaaccent Ocircumflex -20 +KPX Rcommaaccent Odieresis -20 +KPX Rcommaaccent Ograve -20 +KPX Rcommaaccent Ohungarumlaut -20 +KPX Rcommaaccent Omacron -20 +KPX Rcommaaccent Oslash -20 +KPX Rcommaaccent Otilde -20 +KPX Rcommaaccent T -20 +KPX Rcommaaccent Tcaron -20 +KPX Rcommaaccent Tcommaaccent -20 +KPX Rcommaaccent U -20 +KPX Rcommaaccent Uacute -20 +KPX Rcommaaccent Ucircumflex -20 +KPX Rcommaaccent Udieresis -20 +KPX Rcommaaccent Ugrave -20 +KPX Rcommaaccent Uhungarumlaut -20 +KPX Rcommaaccent Umacron -20 +KPX Rcommaaccent Uogonek -20 +KPX Rcommaaccent Uring -20 +KPX Rcommaaccent V -50 +KPX Rcommaaccent W -40 +KPX Rcommaaccent Y -50 +KPX Rcommaaccent Yacute -50 +KPX Rcommaaccent Ydieresis -50 +KPX T A -90 +KPX T Aacute -90 +KPX T Abreve -90 +KPX T Acircumflex -90 +KPX T Adieresis -90 +KPX T Agrave -90 +KPX T Amacron -90 +KPX T Aogonek -90 +KPX T Aring -90 +KPX T Atilde -90 +KPX T O -40 +KPX T Oacute -40 +KPX T Ocircumflex -40 +KPX T Odieresis -40 +KPX T Ograve -40 +KPX T Ohungarumlaut -40 +KPX T Omacron -40 +KPX T Oslash -40 +KPX T Otilde -40 +KPX T a -80 +KPX T aacute -80 +KPX T abreve -80 +KPX T acircumflex -80 +KPX T adieresis -80 +KPX T agrave -80 +KPX T amacron -80 +KPX T aogonek -80 +KPX T aring -80 +KPX T atilde -80 +KPX T colon -40 +KPX T comma -80 +KPX T e -60 +KPX T eacute -60 +KPX T ecaron -60 +KPX T ecircumflex -60 +KPX T edieresis -60 +KPX T edotaccent -60 +KPX T egrave -60 +KPX T emacron -60 +KPX T eogonek -60 +KPX T hyphen -120 +KPX T o -80 +KPX T oacute -80 +KPX T ocircumflex -80 +KPX T odieresis -80 +KPX T ograve -80 +KPX T ohungarumlaut -80 +KPX T omacron -80 +KPX T oslash -80 +KPX T otilde -80 +KPX T period -80 +KPX T r -80 +KPX T racute -80 +KPX T rcommaaccent -80 +KPX T semicolon -40 +KPX T u -90 +KPX T uacute -90 +KPX T ucircumflex -90 +KPX T udieresis -90 +KPX T ugrave -90 +KPX T uhungarumlaut -90 +KPX T umacron -90 +KPX T uogonek -90 +KPX T uring -90 +KPX T w -60 +KPX T y -60 +KPX T yacute -60 +KPX T ydieresis -60 +KPX Tcaron A -90 +KPX Tcaron Aacute -90 +KPX Tcaron Abreve -90 +KPX Tcaron Acircumflex -90 +KPX Tcaron Adieresis -90 +KPX Tcaron Agrave -90 +KPX Tcaron Amacron -90 +KPX Tcaron Aogonek -90 +KPX Tcaron Aring -90 +KPX Tcaron Atilde -90 +KPX Tcaron O -40 +KPX Tcaron Oacute -40 +KPX Tcaron Ocircumflex -40 +KPX Tcaron Odieresis -40 +KPX Tcaron Ograve -40 +KPX Tcaron Ohungarumlaut -40 +KPX Tcaron Omacron -40 +KPX Tcaron Oslash -40 +KPX Tcaron Otilde -40 +KPX Tcaron a -80 +KPX Tcaron aacute -80 +KPX Tcaron abreve -80 +KPX Tcaron acircumflex -80 +KPX Tcaron adieresis -80 +KPX Tcaron agrave -80 +KPX Tcaron amacron -80 +KPX Tcaron aogonek -80 +KPX Tcaron aring -80 +KPX Tcaron atilde -80 +KPX Tcaron colon -40 +KPX Tcaron comma -80 +KPX Tcaron e -60 +KPX Tcaron eacute -60 +KPX Tcaron ecaron -60 +KPX Tcaron ecircumflex -60 +KPX Tcaron edieresis -60 +KPX Tcaron edotaccent -60 +KPX Tcaron egrave -60 +KPX Tcaron emacron -60 +KPX Tcaron eogonek -60 +KPX Tcaron hyphen -120 +KPX Tcaron o -80 +KPX Tcaron oacute -80 +KPX Tcaron ocircumflex -80 +KPX Tcaron odieresis -80 +KPX Tcaron ograve -80 +KPX Tcaron ohungarumlaut -80 +KPX Tcaron omacron -80 +KPX Tcaron oslash -80 +KPX Tcaron otilde -80 +KPX Tcaron period -80 +KPX Tcaron r -80 +KPX Tcaron racute -80 +KPX Tcaron rcommaaccent -80 +KPX Tcaron semicolon -40 +KPX Tcaron u -90 +KPX Tcaron uacute -90 +KPX Tcaron ucircumflex -90 +KPX Tcaron udieresis -90 +KPX Tcaron ugrave -90 +KPX Tcaron uhungarumlaut -90 +KPX Tcaron umacron -90 +KPX Tcaron uogonek -90 +KPX Tcaron uring -90 +KPX Tcaron w -60 +KPX Tcaron y -60 +KPX Tcaron yacute -60 +KPX Tcaron ydieresis -60 +KPX Tcommaaccent A -90 +KPX Tcommaaccent Aacute -90 +KPX Tcommaaccent Abreve -90 +KPX Tcommaaccent Acircumflex -90 +KPX Tcommaaccent Adieresis -90 +KPX Tcommaaccent Agrave -90 +KPX Tcommaaccent Amacron -90 +KPX Tcommaaccent Aogonek -90 +KPX Tcommaaccent Aring -90 +KPX Tcommaaccent Atilde -90 +KPX Tcommaaccent O -40 +KPX Tcommaaccent Oacute -40 +KPX Tcommaaccent Ocircumflex -40 +KPX Tcommaaccent Odieresis -40 +KPX Tcommaaccent Ograve -40 +KPX Tcommaaccent Ohungarumlaut -40 +KPX Tcommaaccent Omacron -40 +KPX Tcommaaccent Oslash -40 +KPX Tcommaaccent Otilde -40 +KPX Tcommaaccent a -80 +KPX Tcommaaccent aacute -80 +KPX Tcommaaccent abreve -80 +KPX Tcommaaccent acircumflex -80 +KPX Tcommaaccent adieresis -80 +KPX Tcommaaccent agrave -80 +KPX Tcommaaccent amacron -80 +KPX Tcommaaccent aogonek -80 +KPX Tcommaaccent aring -80 +KPX Tcommaaccent atilde -80 +KPX Tcommaaccent colon -40 +KPX Tcommaaccent comma -80 +KPX Tcommaaccent e -60 +KPX Tcommaaccent eacute -60 +KPX Tcommaaccent ecaron -60 +KPX Tcommaaccent ecircumflex -60 +KPX Tcommaaccent edieresis -60 +KPX Tcommaaccent edotaccent -60 +KPX Tcommaaccent egrave -60 +KPX Tcommaaccent emacron -60 +KPX Tcommaaccent eogonek -60 +KPX Tcommaaccent hyphen -120 +KPX Tcommaaccent o -80 +KPX Tcommaaccent oacute -80 +KPX Tcommaaccent ocircumflex -80 +KPX Tcommaaccent odieresis -80 +KPX Tcommaaccent ograve -80 +KPX Tcommaaccent ohungarumlaut -80 +KPX Tcommaaccent omacron -80 +KPX Tcommaaccent oslash -80 +KPX Tcommaaccent otilde -80 +KPX Tcommaaccent period -80 +KPX Tcommaaccent r -80 +KPX Tcommaaccent racute -80 +KPX Tcommaaccent rcommaaccent -80 +KPX Tcommaaccent semicolon -40 +KPX Tcommaaccent u -90 +KPX Tcommaaccent uacute -90 +KPX Tcommaaccent ucircumflex -90 +KPX Tcommaaccent udieresis -90 +KPX Tcommaaccent ugrave -90 +KPX Tcommaaccent uhungarumlaut -90 +KPX Tcommaaccent umacron -90 +KPX Tcommaaccent uogonek -90 +KPX Tcommaaccent uring -90 +KPX Tcommaaccent w -60 +KPX Tcommaaccent y -60 +KPX Tcommaaccent yacute -60 +KPX Tcommaaccent ydieresis -60 +KPX U A -50 +KPX U Aacute -50 +KPX U Abreve -50 +KPX U Acircumflex -50 +KPX U Adieresis -50 +KPX U Agrave -50 +KPX U Amacron -50 +KPX U Aogonek -50 +KPX U Aring -50 +KPX U Atilde -50 +KPX U comma -30 +KPX U period -30 +KPX Uacute A -50 +KPX Uacute Aacute -50 +KPX Uacute Abreve -50 +KPX Uacute Acircumflex -50 +KPX Uacute Adieresis -50 +KPX Uacute Agrave -50 +KPX Uacute Amacron -50 +KPX Uacute Aogonek -50 +KPX Uacute Aring -50 +KPX Uacute Atilde -50 +KPX Uacute comma -30 +KPX Uacute period -30 +KPX Ucircumflex A -50 +KPX Ucircumflex Aacute -50 +KPX Ucircumflex Abreve -50 +KPX Ucircumflex Acircumflex -50 +KPX Ucircumflex Adieresis -50 +KPX Ucircumflex Agrave -50 +KPX Ucircumflex Amacron -50 +KPX Ucircumflex Aogonek -50 +KPX Ucircumflex Aring -50 +KPX Ucircumflex Atilde -50 +KPX Ucircumflex comma -30 +KPX Ucircumflex period -30 +KPX Udieresis A -50 +KPX Udieresis Aacute -50 +KPX Udieresis Abreve -50 +KPX Udieresis Acircumflex -50 +KPX Udieresis Adieresis -50 +KPX Udieresis Agrave -50 +KPX Udieresis Amacron -50 +KPX Udieresis Aogonek -50 +KPX Udieresis Aring -50 +KPX Udieresis Atilde -50 +KPX Udieresis comma -30 +KPX Udieresis period -30 +KPX Ugrave A -50 +KPX Ugrave Aacute -50 +KPX Ugrave Abreve -50 +KPX Ugrave Acircumflex -50 +KPX Ugrave Adieresis -50 +KPX Ugrave Agrave -50 +KPX Ugrave Amacron -50 +KPX Ugrave Aogonek -50 +KPX Ugrave Aring -50 +KPX Ugrave Atilde -50 +KPX Ugrave comma -30 +KPX Ugrave period -30 +KPX Uhungarumlaut A -50 +KPX Uhungarumlaut Aacute -50 +KPX Uhungarumlaut Abreve -50 +KPX Uhungarumlaut Acircumflex -50 +KPX Uhungarumlaut Adieresis -50 +KPX Uhungarumlaut Agrave -50 +KPX Uhungarumlaut Amacron -50 +KPX Uhungarumlaut Aogonek -50 +KPX Uhungarumlaut Aring -50 +KPX Uhungarumlaut Atilde -50 +KPX Uhungarumlaut comma -30 +KPX Uhungarumlaut period -30 +KPX Umacron A -50 +KPX Umacron Aacute -50 +KPX Umacron Abreve -50 +KPX Umacron Acircumflex -50 +KPX Umacron Adieresis -50 +KPX Umacron Agrave -50 +KPX Umacron Amacron -50 +KPX Umacron Aogonek -50 +KPX Umacron Aring -50 +KPX Umacron Atilde -50 +KPX Umacron comma -30 +KPX Umacron period -30 +KPX Uogonek A -50 +KPX Uogonek Aacute -50 +KPX Uogonek Abreve -50 +KPX Uogonek Acircumflex -50 +KPX Uogonek Adieresis -50 +KPX Uogonek Agrave -50 +KPX Uogonek Amacron -50 +KPX Uogonek Aogonek -50 +KPX Uogonek Aring -50 +KPX Uogonek Atilde -50 +KPX Uogonek comma -30 +KPX Uogonek period -30 +KPX Uring A -50 +KPX Uring Aacute -50 +KPX Uring Abreve -50 +KPX Uring Acircumflex -50 +KPX Uring Adieresis -50 +KPX Uring Agrave -50 +KPX Uring Amacron -50 +KPX Uring Aogonek -50 +KPX Uring Aring -50 +KPX Uring Atilde -50 +KPX Uring comma -30 +KPX Uring period -30 +KPX V A -80 +KPX V Aacute -80 +KPX V Abreve -80 +KPX V Acircumflex -80 +KPX V Adieresis -80 +KPX V Agrave -80 +KPX V Amacron -80 +KPX V Aogonek -80 +KPX V Aring -80 +KPX V Atilde -80 +KPX V G -50 +KPX V Gbreve -50 +KPX V Gcommaaccent -50 +KPX V O -50 +KPX V Oacute -50 +KPX V Ocircumflex -50 +KPX V Odieresis -50 +KPX V Ograve -50 +KPX V Ohungarumlaut -50 +KPX V Omacron -50 +KPX V Oslash -50 +KPX V Otilde -50 +KPX V a -60 +KPX V aacute -60 +KPX V abreve -60 +KPX V acircumflex -60 +KPX V adieresis -60 +KPX V agrave -60 +KPX V amacron -60 +KPX V aogonek -60 +KPX V aring -60 +KPX V atilde -60 +KPX V colon -40 +KPX V comma -120 +KPX V e -50 +KPX V eacute -50 +KPX V ecaron -50 +KPX V ecircumflex -50 +KPX V edieresis -50 +KPX V edotaccent -50 +KPX V egrave -50 +KPX V emacron -50 +KPX V eogonek -50 +KPX V hyphen -80 +KPX V o -90 +KPX V oacute -90 +KPX V ocircumflex -90 +KPX V odieresis -90 +KPX V ograve -90 +KPX V ohungarumlaut -90 +KPX V omacron -90 +KPX V oslash -90 +KPX V otilde -90 +KPX V period -120 +KPX V semicolon -40 +KPX V u -60 +KPX V uacute -60 +KPX V ucircumflex -60 +KPX V udieresis -60 +KPX V ugrave -60 +KPX V uhungarumlaut -60 +KPX V umacron -60 +KPX V uogonek -60 +KPX V uring -60 +KPX W A -60 +KPX W Aacute -60 +KPX W Abreve -60 +KPX W Acircumflex -60 +KPX W Adieresis -60 +KPX W Agrave -60 +KPX W Amacron -60 +KPX W Aogonek -60 +KPX W Aring -60 +KPX W Atilde -60 +KPX W O -20 +KPX W Oacute -20 +KPX W Ocircumflex -20 +KPX W Odieresis -20 +KPX W Ograve -20 +KPX W Ohungarumlaut -20 +KPX W Omacron -20 +KPX W Oslash -20 +KPX W Otilde -20 +KPX W a -40 +KPX W aacute -40 +KPX W abreve -40 +KPX W acircumflex -40 +KPX W adieresis -40 +KPX W agrave -40 +KPX W amacron -40 +KPX W aogonek -40 +KPX W aring -40 +KPX W atilde -40 +KPX W colon -10 +KPX W comma -80 +KPX W e -35 +KPX W eacute -35 +KPX W ecaron -35 +KPX W ecircumflex -35 +KPX W edieresis -35 +KPX W edotaccent -35 +KPX W egrave -35 +KPX W emacron -35 +KPX W eogonek -35 +KPX W hyphen -40 +KPX W o -60 +KPX W oacute -60 +KPX W ocircumflex -60 +KPX W odieresis -60 +KPX W ograve -60 +KPX W ohungarumlaut -60 +KPX W omacron -60 +KPX W oslash -60 +KPX W otilde -60 +KPX W period -80 +KPX W semicolon -10 +KPX W u -45 +KPX W uacute -45 +KPX W ucircumflex -45 +KPX W udieresis -45 +KPX W ugrave -45 +KPX W uhungarumlaut -45 +KPX W umacron -45 +KPX W uogonek -45 +KPX W uring -45 +KPX W y -20 +KPX W yacute -20 +KPX W ydieresis -20 +KPX Y A -110 +KPX Y Aacute -110 +KPX Y Abreve -110 +KPX Y Acircumflex -110 +KPX Y Adieresis -110 +KPX Y Agrave -110 +KPX Y Amacron -110 +KPX Y Aogonek -110 +KPX Y Aring -110 +KPX Y Atilde -110 +KPX Y O -70 +KPX Y Oacute -70 +KPX Y Ocircumflex -70 +KPX Y Odieresis -70 +KPX Y Ograve -70 +KPX Y Ohungarumlaut -70 +KPX Y Omacron -70 +KPX Y Oslash -70 +KPX Y Otilde -70 +KPX Y a -90 +KPX Y aacute -90 +KPX Y abreve -90 +KPX Y acircumflex -90 +KPX Y adieresis -90 +KPX Y agrave -90 +KPX Y amacron -90 +KPX Y aogonek -90 +KPX Y aring -90 +KPX Y atilde -90 +KPX Y colon -50 +KPX Y comma -100 +KPX Y e -80 +KPX Y eacute -80 +KPX Y ecaron -80 +KPX Y ecircumflex -80 +KPX Y edieresis -80 +KPX Y edotaccent -80 +KPX Y egrave -80 +KPX Y emacron -80 +KPX Y eogonek -80 +KPX Y o -100 +KPX Y oacute -100 +KPX Y ocircumflex -100 +KPX Y odieresis -100 +KPX Y ograve -100 +KPX Y ohungarumlaut -100 +KPX Y omacron -100 +KPX Y oslash -100 +KPX Y otilde -100 +KPX Y period -100 +KPX Y semicolon -50 +KPX Y u -100 +KPX Y uacute -100 +KPX Y ucircumflex -100 +KPX Y udieresis -100 +KPX Y ugrave -100 +KPX Y uhungarumlaut -100 +KPX Y umacron -100 +KPX Y uogonek -100 +KPX Y uring -100 +KPX Yacute A -110 +KPX Yacute Aacute -110 +KPX Yacute Abreve -110 +KPX Yacute Acircumflex -110 +KPX Yacute Adieresis -110 +KPX Yacute Agrave -110 +KPX Yacute Amacron -110 +KPX Yacute Aogonek -110 +KPX Yacute Aring -110 +KPX Yacute Atilde -110 +KPX Yacute O -70 +KPX Yacute Oacute -70 +KPX Yacute Ocircumflex -70 +KPX Yacute Odieresis -70 +KPX Yacute Ograve -70 +KPX Yacute Ohungarumlaut -70 +KPX Yacute Omacron -70 +KPX Yacute Oslash -70 +KPX Yacute Otilde -70 +KPX Yacute a -90 +KPX Yacute aacute -90 +KPX Yacute abreve -90 +KPX Yacute acircumflex -90 +KPX Yacute adieresis -90 +KPX Yacute agrave -90 +KPX Yacute amacron -90 +KPX Yacute aogonek -90 +KPX Yacute aring -90 +KPX Yacute atilde -90 +KPX Yacute colon -50 +KPX Yacute comma -100 +KPX Yacute e -80 +KPX Yacute eacute -80 +KPX Yacute ecaron -80 +KPX Yacute ecircumflex -80 +KPX Yacute edieresis -80 +KPX Yacute edotaccent -80 +KPX Yacute egrave -80 +KPX Yacute emacron -80 +KPX Yacute eogonek -80 +KPX Yacute o -100 +KPX Yacute oacute -100 +KPX Yacute ocircumflex -100 +KPX Yacute odieresis -100 +KPX Yacute ograve -100 +KPX Yacute ohungarumlaut -100 +KPX Yacute omacron -100 +KPX Yacute oslash -100 +KPX Yacute otilde -100 +KPX Yacute period -100 +KPX Yacute semicolon -50 +KPX Yacute u -100 +KPX Yacute uacute -100 +KPX Yacute ucircumflex -100 +KPX Yacute udieresis -100 +KPX Yacute ugrave -100 +KPX Yacute uhungarumlaut -100 +KPX Yacute umacron -100 +KPX Yacute uogonek -100 +KPX Yacute uring -100 +KPX Ydieresis A -110 +KPX Ydieresis Aacute -110 +KPX Ydieresis Abreve -110 +KPX Ydieresis Acircumflex -110 +KPX Ydieresis Adieresis -110 +KPX Ydieresis Agrave -110 +KPX Ydieresis Amacron -110 +KPX Ydieresis Aogonek -110 +KPX Ydieresis Aring -110 +KPX Ydieresis Atilde -110 +KPX Ydieresis O -70 +KPX Ydieresis Oacute -70 +KPX Ydieresis Ocircumflex -70 +KPX Ydieresis Odieresis -70 +KPX Ydieresis Ograve -70 +KPX Ydieresis Ohungarumlaut -70 +KPX Ydieresis Omacron -70 +KPX Ydieresis Oslash -70 +KPX Ydieresis Otilde -70 +KPX Ydieresis a -90 +KPX Ydieresis aacute -90 +KPX Ydieresis abreve -90 +KPX Ydieresis acircumflex -90 +KPX Ydieresis adieresis -90 +KPX Ydieresis agrave -90 +KPX Ydieresis amacron -90 +KPX Ydieresis aogonek -90 +KPX Ydieresis aring -90 +KPX Ydieresis atilde -90 +KPX Ydieresis colon -50 +KPX Ydieresis comma -100 +KPX Ydieresis e -80 +KPX Ydieresis eacute -80 +KPX Ydieresis ecaron -80 +KPX Ydieresis ecircumflex -80 +KPX Ydieresis edieresis -80 +KPX Ydieresis edotaccent -80 +KPX Ydieresis egrave -80 +KPX Ydieresis emacron -80 +KPX Ydieresis eogonek -80 +KPX Ydieresis o -100 +KPX Ydieresis oacute -100 +KPX Ydieresis ocircumflex -100 +KPX Ydieresis odieresis -100 +KPX Ydieresis ograve -100 +KPX Ydieresis ohungarumlaut -100 +KPX Ydieresis omacron -100 +KPX Ydieresis oslash -100 +KPX Ydieresis otilde -100 +KPX Ydieresis period -100 +KPX Ydieresis semicolon -50 +KPX Ydieresis u -100 +KPX Ydieresis uacute -100 +KPX Ydieresis ucircumflex -100 +KPX Ydieresis udieresis -100 +KPX Ydieresis ugrave -100 +KPX Ydieresis uhungarumlaut -100 +KPX Ydieresis umacron -100 +KPX Ydieresis uogonek -100 +KPX Ydieresis uring -100 +KPX a g -10 +KPX a gbreve -10 +KPX a gcommaaccent -10 +KPX a v -15 +KPX a w -15 +KPX a y -20 +KPX a yacute -20 +KPX a ydieresis -20 +KPX aacute g -10 +KPX aacute gbreve -10 +KPX aacute gcommaaccent -10 +KPX aacute v -15 +KPX aacute w -15 +KPX aacute y -20 +KPX aacute yacute -20 +KPX aacute ydieresis -20 +KPX abreve g -10 +KPX abreve gbreve -10 +KPX abreve gcommaaccent -10 +KPX abreve v -15 +KPX abreve w -15 +KPX abreve y -20 +KPX abreve yacute -20 +KPX abreve ydieresis -20 +KPX acircumflex g -10 +KPX acircumflex gbreve -10 +KPX acircumflex gcommaaccent -10 +KPX acircumflex v -15 +KPX acircumflex w -15 +KPX acircumflex y -20 +KPX acircumflex yacute -20 +KPX acircumflex ydieresis -20 +KPX adieresis g -10 +KPX adieresis gbreve -10 +KPX adieresis gcommaaccent -10 +KPX adieresis v -15 +KPX adieresis w -15 +KPX adieresis y -20 +KPX adieresis yacute -20 +KPX adieresis ydieresis -20 +KPX agrave g -10 +KPX agrave gbreve -10 +KPX agrave gcommaaccent -10 +KPX agrave v -15 +KPX agrave w -15 +KPX agrave y -20 +KPX agrave yacute -20 +KPX agrave ydieresis -20 +KPX amacron g -10 +KPX amacron gbreve -10 +KPX amacron gcommaaccent -10 +KPX amacron v -15 +KPX amacron w -15 +KPX amacron y -20 +KPX amacron yacute -20 +KPX amacron ydieresis -20 +KPX aogonek g -10 +KPX aogonek gbreve -10 +KPX aogonek gcommaaccent -10 +KPX aogonek v -15 +KPX aogonek w -15 +KPX aogonek y -20 +KPX aogonek yacute -20 +KPX aogonek ydieresis -20 +KPX aring g -10 +KPX aring gbreve -10 +KPX aring gcommaaccent -10 +KPX aring v -15 +KPX aring w -15 +KPX aring y -20 +KPX aring yacute -20 +KPX aring ydieresis -20 +KPX atilde g -10 +KPX atilde gbreve -10 +KPX atilde gcommaaccent -10 +KPX atilde v -15 +KPX atilde w -15 +KPX atilde y -20 +KPX atilde yacute -20 +KPX atilde ydieresis -20 +KPX b l -10 +KPX b lacute -10 +KPX b lcommaaccent -10 +KPX b lslash -10 +KPX b u -20 +KPX b uacute -20 +KPX b ucircumflex -20 +KPX b udieresis -20 +KPX b ugrave -20 +KPX b uhungarumlaut -20 +KPX b umacron -20 +KPX b uogonek -20 +KPX b uring -20 +KPX b v -20 +KPX b y -20 +KPX b yacute -20 +KPX b ydieresis -20 +KPX c h -10 +KPX c k -20 +KPX c kcommaaccent -20 +KPX c l -20 +KPX c lacute -20 +KPX c lcommaaccent -20 +KPX c lslash -20 +KPX c y -10 +KPX c yacute -10 +KPX c ydieresis -10 +KPX cacute h -10 +KPX cacute k -20 +KPX cacute kcommaaccent -20 +KPX cacute l -20 +KPX cacute lacute -20 +KPX cacute lcommaaccent -20 +KPX cacute lslash -20 +KPX cacute y -10 +KPX cacute yacute -10 +KPX cacute ydieresis -10 +KPX ccaron h -10 +KPX ccaron k -20 +KPX ccaron kcommaaccent -20 +KPX ccaron l -20 +KPX ccaron lacute -20 +KPX ccaron lcommaaccent -20 +KPX ccaron lslash -20 +KPX ccaron y -10 +KPX ccaron yacute -10 +KPX ccaron ydieresis -10 +KPX ccedilla h -10 +KPX ccedilla k -20 +KPX ccedilla kcommaaccent -20 +KPX ccedilla l -20 +KPX ccedilla lacute -20 +KPX ccedilla lcommaaccent -20 +KPX ccedilla lslash -20 +KPX ccedilla y -10 +KPX ccedilla yacute -10 +KPX ccedilla ydieresis -10 +KPX colon space -40 +KPX comma quotedblright -120 +KPX comma quoteright -120 +KPX comma space -40 +KPX d d -10 +KPX d dcroat -10 +KPX d v -15 +KPX d w -15 +KPX d y -15 +KPX d yacute -15 +KPX d ydieresis -15 +KPX dcroat d -10 +KPX dcroat dcroat -10 +KPX dcroat v -15 +KPX dcroat w -15 +KPX dcroat y -15 +KPX dcroat yacute -15 +KPX dcroat ydieresis -15 +KPX e comma 10 +KPX e period 20 +KPX e v -15 +KPX e w -15 +KPX e x -15 +KPX e y -15 +KPX e yacute -15 +KPX e ydieresis -15 +KPX eacute comma 10 +KPX eacute period 20 +KPX eacute v -15 +KPX eacute w -15 +KPX eacute x -15 +KPX eacute y -15 +KPX eacute yacute -15 +KPX eacute ydieresis -15 +KPX ecaron comma 10 +KPX ecaron period 20 +KPX ecaron v -15 +KPX ecaron w -15 +KPX ecaron x -15 +KPX ecaron y -15 +KPX ecaron yacute -15 +KPX ecaron ydieresis -15 +KPX ecircumflex comma 10 +KPX ecircumflex period 20 +KPX ecircumflex v -15 +KPX ecircumflex w -15 +KPX ecircumflex x -15 +KPX ecircumflex y -15 +KPX ecircumflex yacute -15 +KPX ecircumflex ydieresis -15 +KPX edieresis comma 10 +KPX edieresis period 20 +KPX edieresis v -15 +KPX edieresis w -15 +KPX edieresis x -15 +KPX edieresis y -15 +KPX edieresis yacute -15 +KPX edieresis ydieresis -15 +KPX edotaccent comma 10 +KPX edotaccent period 20 +KPX edotaccent v -15 +KPX edotaccent w -15 +KPX edotaccent x -15 +KPX edotaccent y -15 +KPX edotaccent yacute -15 +KPX edotaccent ydieresis -15 +KPX egrave comma 10 +KPX egrave period 20 +KPX egrave v -15 +KPX egrave w -15 +KPX egrave x -15 +KPX egrave y -15 +KPX egrave yacute -15 +KPX egrave ydieresis -15 +KPX emacron comma 10 +KPX emacron period 20 +KPX emacron v -15 +KPX emacron w -15 +KPX emacron x -15 +KPX emacron y -15 +KPX emacron yacute -15 +KPX emacron ydieresis -15 +KPX eogonek comma 10 +KPX eogonek period 20 +KPX eogonek v -15 +KPX eogonek w -15 +KPX eogonek x -15 +KPX eogonek y -15 +KPX eogonek yacute -15 +KPX eogonek ydieresis -15 +KPX f comma -10 +KPX f e -10 +KPX f eacute -10 +KPX f ecaron -10 +KPX f ecircumflex -10 +KPX f edieresis -10 +KPX f edotaccent -10 +KPX f egrave -10 +KPX f emacron -10 +KPX f eogonek -10 +KPX f o -20 +KPX f oacute -20 +KPX f ocircumflex -20 +KPX f odieresis -20 +KPX f ograve -20 +KPX f ohungarumlaut -20 +KPX f omacron -20 +KPX f oslash -20 +KPX f otilde -20 +KPX f period -10 +KPX f quotedblright 30 +KPX f quoteright 30 +KPX g e 10 +KPX g eacute 10 +KPX g ecaron 10 +KPX g ecircumflex 10 +KPX g edieresis 10 +KPX g edotaccent 10 +KPX g egrave 10 +KPX g emacron 10 +KPX g eogonek 10 +KPX g g -10 +KPX g gbreve -10 +KPX g gcommaaccent -10 +KPX gbreve e 10 +KPX gbreve eacute 10 +KPX gbreve ecaron 10 +KPX gbreve ecircumflex 10 +KPX gbreve edieresis 10 +KPX gbreve edotaccent 10 +KPX gbreve egrave 10 +KPX gbreve emacron 10 +KPX gbreve eogonek 10 +KPX gbreve g -10 +KPX gbreve gbreve -10 +KPX gbreve gcommaaccent -10 +KPX gcommaaccent e 10 +KPX gcommaaccent eacute 10 +KPX gcommaaccent ecaron 10 +KPX gcommaaccent ecircumflex 10 +KPX gcommaaccent edieresis 10 +KPX gcommaaccent edotaccent 10 +KPX gcommaaccent egrave 10 +KPX gcommaaccent emacron 10 +KPX gcommaaccent eogonek 10 +KPX gcommaaccent g -10 +KPX gcommaaccent gbreve -10 +KPX gcommaaccent gcommaaccent -10 +KPX h y -20 +KPX h yacute -20 +KPX h ydieresis -20 +KPX k o -15 +KPX k oacute -15 +KPX k ocircumflex -15 +KPX k odieresis -15 +KPX k ograve -15 +KPX k ohungarumlaut -15 +KPX k omacron -15 +KPX k oslash -15 +KPX k otilde -15 +KPX kcommaaccent o -15 +KPX kcommaaccent oacute -15 +KPX kcommaaccent ocircumflex -15 +KPX kcommaaccent odieresis -15 +KPX kcommaaccent ograve -15 +KPX kcommaaccent ohungarumlaut -15 +KPX kcommaaccent omacron -15 +KPX kcommaaccent oslash -15 +KPX kcommaaccent otilde -15 +KPX l w -15 +KPX l y -15 +KPX l yacute -15 +KPX l ydieresis -15 +KPX lacute w -15 +KPX lacute y -15 +KPX lacute yacute -15 +KPX lacute ydieresis -15 +KPX lcommaaccent w -15 +KPX lcommaaccent y -15 +KPX lcommaaccent yacute -15 +KPX lcommaaccent ydieresis -15 +KPX lslash w -15 +KPX lslash y -15 +KPX lslash yacute -15 +KPX lslash ydieresis -15 +KPX m u -20 +KPX m uacute -20 +KPX m ucircumflex -20 +KPX m udieresis -20 +KPX m ugrave -20 +KPX m uhungarumlaut -20 +KPX m umacron -20 +KPX m uogonek -20 +KPX m uring -20 +KPX m y -30 +KPX m yacute -30 +KPX m ydieresis -30 +KPX n u -10 +KPX n uacute -10 +KPX n ucircumflex -10 +KPX n udieresis -10 +KPX n ugrave -10 +KPX n uhungarumlaut -10 +KPX n umacron -10 +KPX n uogonek -10 +KPX n uring -10 +KPX n v -40 +KPX n y -20 +KPX n yacute -20 +KPX n ydieresis -20 +KPX nacute u -10 +KPX nacute uacute -10 +KPX nacute ucircumflex -10 +KPX nacute udieresis -10 +KPX nacute ugrave -10 +KPX nacute uhungarumlaut -10 +KPX nacute umacron -10 +KPX nacute uogonek -10 +KPX nacute uring -10 +KPX nacute v -40 +KPX nacute y -20 +KPX nacute yacute -20 +KPX nacute ydieresis -20 +KPX ncaron u -10 +KPX ncaron uacute -10 +KPX ncaron ucircumflex -10 +KPX ncaron udieresis -10 +KPX ncaron ugrave -10 +KPX ncaron uhungarumlaut -10 +KPX ncaron umacron -10 +KPX ncaron uogonek -10 +KPX ncaron uring -10 +KPX ncaron v -40 +KPX ncaron y -20 +KPX ncaron yacute -20 +KPX ncaron ydieresis -20 +KPX ncommaaccent u -10 +KPX ncommaaccent uacute -10 +KPX ncommaaccent ucircumflex -10 +KPX ncommaaccent udieresis -10 +KPX ncommaaccent ugrave -10 +KPX ncommaaccent uhungarumlaut -10 +KPX ncommaaccent umacron -10 +KPX ncommaaccent uogonek -10 +KPX ncommaaccent uring -10 +KPX ncommaaccent v -40 +KPX ncommaaccent y -20 +KPX ncommaaccent yacute -20 +KPX ncommaaccent ydieresis -20 +KPX ntilde u -10 +KPX ntilde uacute -10 +KPX ntilde ucircumflex -10 +KPX ntilde udieresis -10 +KPX ntilde ugrave -10 +KPX ntilde uhungarumlaut -10 +KPX ntilde umacron -10 +KPX ntilde uogonek -10 +KPX ntilde uring -10 +KPX ntilde v -40 +KPX ntilde y -20 +KPX ntilde yacute -20 +KPX ntilde ydieresis -20 +KPX o v -20 +KPX o w -15 +KPX o x -30 +KPX o y -20 +KPX o yacute -20 +KPX o ydieresis -20 +KPX oacute v -20 +KPX oacute w -15 +KPX oacute x -30 +KPX oacute y -20 +KPX oacute yacute -20 +KPX oacute ydieresis -20 +KPX ocircumflex v -20 +KPX ocircumflex w -15 +KPX ocircumflex x -30 +KPX ocircumflex y -20 +KPX ocircumflex yacute -20 +KPX ocircumflex ydieresis -20 +KPX odieresis v -20 +KPX odieresis w -15 +KPX odieresis x -30 +KPX odieresis y -20 +KPX odieresis yacute -20 +KPX odieresis ydieresis -20 +KPX ograve v -20 +KPX ograve w -15 +KPX ograve x -30 +KPX ograve y -20 +KPX ograve yacute -20 +KPX ograve ydieresis -20 +KPX ohungarumlaut v -20 +KPX ohungarumlaut w -15 +KPX ohungarumlaut x -30 +KPX ohungarumlaut y -20 +KPX ohungarumlaut yacute -20 +KPX ohungarumlaut ydieresis -20 +KPX omacron v -20 +KPX omacron w -15 +KPX omacron x -30 +KPX omacron y -20 +KPX omacron yacute -20 +KPX omacron ydieresis -20 +KPX oslash v -20 +KPX oslash w -15 +KPX oslash x -30 +KPX oslash y -20 +KPX oslash yacute -20 +KPX oslash ydieresis -20 +KPX otilde v -20 +KPX otilde w -15 +KPX otilde x -30 +KPX otilde y -20 +KPX otilde yacute -20 +KPX otilde ydieresis -20 +KPX p y -15 +KPX p yacute -15 +KPX p ydieresis -15 +KPX period quotedblright -120 +KPX period quoteright -120 +KPX period space -40 +KPX quotedblright space -80 +KPX quoteleft quoteleft -46 +KPX quoteright d -80 +KPX quoteright dcroat -80 +KPX quoteright l -20 +KPX quoteright lacute -20 +KPX quoteright lcommaaccent -20 +KPX quoteright lslash -20 +KPX quoteright quoteright -46 +KPX quoteright r -40 +KPX quoteright racute -40 +KPX quoteright rcaron -40 +KPX quoteright rcommaaccent -40 +KPX quoteright s -60 +KPX quoteright sacute -60 +KPX quoteright scaron -60 +KPX quoteright scedilla -60 +KPX quoteright scommaaccent -60 +KPX quoteright space -80 +KPX quoteright v -20 +KPX r c -20 +KPX r cacute -20 +KPX r ccaron -20 +KPX r ccedilla -20 +KPX r comma -60 +KPX r d -20 +KPX r dcroat -20 +KPX r g -15 +KPX r gbreve -15 +KPX r gcommaaccent -15 +KPX r hyphen -20 +KPX r o -20 +KPX r oacute -20 +KPX r ocircumflex -20 +KPX r odieresis -20 +KPX r ograve -20 +KPX r ohungarumlaut -20 +KPX r omacron -20 +KPX r oslash -20 +KPX r otilde -20 +KPX r period -60 +KPX r q -20 +KPX r s -15 +KPX r sacute -15 +KPX r scaron -15 +KPX r scedilla -15 +KPX r scommaaccent -15 +KPX r t 20 +KPX r tcommaaccent 20 +KPX r v 10 +KPX r y 10 +KPX r yacute 10 +KPX r ydieresis 10 +KPX racute c -20 +KPX racute cacute -20 +KPX racute ccaron -20 +KPX racute ccedilla -20 +KPX racute comma -60 +KPX racute d -20 +KPX racute dcroat -20 +KPX racute g -15 +KPX racute gbreve -15 +KPX racute gcommaaccent -15 +KPX racute hyphen -20 +KPX racute o -20 +KPX racute oacute -20 +KPX racute ocircumflex -20 +KPX racute odieresis -20 +KPX racute ograve -20 +KPX racute ohungarumlaut -20 +KPX racute omacron -20 +KPX racute oslash -20 +KPX racute otilde -20 +KPX racute period -60 +KPX racute q -20 +KPX racute s -15 +KPX racute sacute -15 +KPX racute scaron -15 +KPX racute scedilla -15 +KPX racute scommaaccent -15 +KPX racute t 20 +KPX racute tcommaaccent 20 +KPX racute v 10 +KPX racute y 10 +KPX racute yacute 10 +KPX racute ydieresis 10 +KPX rcaron c -20 +KPX rcaron cacute -20 +KPX rcaron ccaron -20 +KPX rcaron ccedilla -20 +KPX rcaron comma -60 +KPX rcaron d -20 +KPX rcaron dcroat -20 +KPX rcaron g -15 +KPX rcaron gbreve -15 +KPX rcaron gcommaaccent -15 +KPX rcaron hyphen -20 +KPX rcaron o -20 +KPX rcaron oacute -20 +KPX rcaron ocircumflex -20 +KPX rcaron odieresis -20 +KPX rcaron ograve -20 +KPX rcaron ohungarumlaut -20 +KPX rcaron omacron -20 +KPX rcaron oslash -20 +KPX rcaron otilde -20 +KPX rcaron period -60 +KPX rcaron q -20 +KPX rcaron s -15 +KPX rcaron sacute -15 +KPX rcaron scaron -15 +KPX rcaron scedilla -15 +KPX rcaron scommaaccent -15 +KPX rcaron t 20 +KPX rcaron tcommaaccent 20 +KPX rcaron v 10 +KPX rcaron y 10 +KPX rcaron yacute 10 +KPX rcaron ydieresis 10 +KPX rcommaaccent c -20 +KPX rcommaaccent cacute -20 +KPX rcommaaccent ccaron -20 +KPX rcommaaccent ccedilla -20 +KPX rcommaaccent comma -60 +KPX rcommaaccent d -20 +KPX rcommaaccent dcroat -20 +KPX rcommaaccent g -15 +KPX rcommaaccent gbreve -15 +KPX rcommaaccent gcommaaccent -15 +KPX rcommaaccent hyphen -20 +KPX rcommaaccent o -20 +KPX rcommaaccent oacute -20 +KPX rcommaaccent ocircumflex -20 +KPX rcommaaccent odieresis -20 +KPX rcommaaccent ograve -20 +KPX rcommaaccent ohungarumlaut -20 +KPX rcommaaccent omacron -20 +KPX rcommaaccent oslash -20 +KPX rcommaaccent otilde -20 +KPX rcommaaccent period -60 +KPX rcommaaccent q -20 +KPX rcommaaccent s -15 +KPX rcommaaccent sacute -15 +KPX rcommaaccent scaron -15 +KPX rcommaaccent scedilla -15 +KPX rcommaaccent scommaaccent -15 +KPX rcommaaccent t 20 +KPX rcommaaccent tcommaaccent 20 +KPX rcommaaccent v 10 +KPX rcommaaccent y 10 +KPX rcommaaccent yacute 10 +KPX rcommaaccent ydieresis 10 +KPX s w -15 +KPX sacute w -15 +KPX scaron w -15 +KPX scedilla w -15 +KPX scommaaccent w -15 +KPX semicolon space -40 +KPX space T -100 +KPX space Tcaron -100 +KPX space Tcommaaccent -100 +KPX space V -80 +KPX space W -80 +KPX space Y -120 +KPX space Yacute -120 +KPX space Ydieresis -120 +KPX space quotedblleft -80 +KPX space quoteleft -60 +KPX v a -20 +KPX v aacute -20 +KPX v abreve -20 +KPX v acircumflex -20 +KPX v adieresis -20 +KPX v agrave -20 +KPX v amacron -20 +KPX v aogonek -20 +KPX v aring -20 +KPX v atilde -20 +KPX v comma -80 +KPX v o -30 +KPX v oacute -30 +KPX v ocircumflex -30 +KPX v odieresis -30 +KPX v ograve -30 +KPX v ohungarumlaut -30 +KPX v omacron -30 +KPX v oslash -30 +KPX v otilde -30 +KPX v period -80 +KPX w comma -40 +KPX w o -20 +KPX w oacute -20 +KPX w ocircumflex -20 +KPX w odieresis -20 +KPX w ograve -20 +KPX w ohungarumlaut -20 +KPX w omacron -20 +KPX w oslash -20 +KPX w otilde -20 +KPX w period -40 +KPX x e -10 +KPX x eacute -10 +KPX x ecaron -10 +KPX x ecircumflex -10 +KPX x edieresis -10 +KPX x edotaccent -10 +KPX x egrave -10 +KPX x emacron -10 +KPX x eogonek -10 +KPX y a -30 +KPX y aacute -30 +KPX y abreve -30 +KPX y acircumflex -30 +KPX y adieresis -30 +KPX y agrave -30 +KPX y amacron -30 +KPX y aogonek -30 +KPX y aring -30 +KPX y atilde -30 +KPX y comma -80 +KPX y e -10 +KPX y eacute -10 +KPX y ecaron -10 +KPX y ecircumflex -10 +KPX y edieresis -10 +KPX y edotaccent -10 +KPX y egrave -10 +KPX y emacron -10 +KPX y eogonek -10 +KPX y o -25 +KPX y oacute -25 +KPX y ocircumflex -25 +KPX y odieresis -25 +KPX y ograve -25 +KPX y ohungarumlaut -25 +KPX y omacron -25 +KPX y oslash -25 +KPX y otilde -25 +KPX y period -80 +KPX yacute a -30 +KPX yacute aacute -30 +KPX yacute abreve -30 +KPX yacute acircumflex -30 +KPX yacute adieresis -30 +KPX yacute agrave -30 +KPX yacute amacron -30 +KPX yacute aogonek -30 +KPX yacute aring -30 +KPX yacute atilde -30 +KPX yacute comma -80 +KPX yacute e -10 +KPX yacute eacute -10 +KPX yacute ecaron -10 +KPX yacute ecircumflex -10 +KPX yacute edieresis -10 +KPX yacute edotaccent -10 +KPX yacute egrave -10 +KPX yacute emacron -10 +KPX yacute eogonek -10 +KPX yacute o -25 +KPX yacute oacute -25 +KPX yacute ocircumflex -25 +KPX yacute odieresis -25 +KPX yacute ograve -25 +KPX yacute ohungarumlaut -25 +KPX yacute omacron -25 +KPX yacute oslash -25 +KPX yacute otilde -25 +KPX yacute period -80 +KPX ydieresis a -30 +KPX ydieresis aacute -30 +KPX ydieresis abreve -30 +KPX ydieresis acircumflex -30 +KPX ydieresis adieresis -30 +KPX ydieresis agrave -30 +KPX ydieresis amacron -30 +KPX ydieresis aogonek -30 +KPX ydieresis aring -30 +KPX ydieresis atilde -30 +KPX ydieresis comma -80 +KPX ydieresis e -10 +KPX ydieresis eacute -10 +KPX ydieresis ecaron -10 +KPX ydieresis ecircumflex -10 +KPX ydieresis edieresis -10 +KPX ydieresis edotaccent -10 +KPX ydieresis egrave -10 +KPX ydieresis emacron -10 +KPX ydieresis eogonek -10 +KPX ydieresis o -25 +KPX ydieresis oacute -25 +KPX ydieresis ocircumflex -25 +KPX ydieresis odieresis -25 +KPX ydieresis ograve -25 +KPX ydieresis ohungarumlaut -25 +KPX ydieresis omacron -25 +KPX ydieresis oslash -25 +KPX ydieresis otilde -25 +KPX ydieresis period -80 +KPX z e 10 +KPX z eacute 10 +KPX z ecaron 10 +KPX z ecircumflex 10 +KPX z edieresis 10 +KPX z edotaccent 10 +KPX z egrave 10 +KPX z emacron 10 +KPX z eogonek 10 +KPX zacute e 10 +KPX zacute eacute 10 +KPX zacute ecaron 10 +KPX zacute ecircumflex 10 +KPX zacute edieresis 10 +KPX zacute edotaccent 10 +KPX zacute egrave 10 +KPX zacute emacron 10 +KPX zacute eogonek 10 +KPX zcaron e 10 +KPX zcaron eacute 10 +KPX zcaron ecaron 10 +KPX zcaron ecircumflex 10 +KPX zcaron edieresis 10 +KPX zcaron edotaccent 10 +KPX zcaron egrave 10 +KPX zcaron emacron 10 +KPX zcaron eogonek 10 +KPX zdotaccent e 10 +KPX zdotaccent eacute 10 +KPX zdotaccent ecaron 10 +KPX zdotaccent ecircumflex 10 +KPX zdotaccent edieresis 10 +KPX zdotaccent edotaccent 10 +KPX zdotaccent egrave 10 +KPX zdotaccent emacron 10 +KPX zdotaccent eogonek 10 +EndKernPairs +EndKernData +EndFontMetrics diff --git a/pitfall/pdfkit/lib/font/data/Helvetica-Oblique.afm b/pitfall/pdfkit/lib/font/data/Helvetica-Oblique.afm new file mode 100755 index 00000000..7a7af001 --- /dev/null +++ b/pitfall/pdfkit/lib/font/data/Helvetica-Oblique.afm @@ -0,0 +1,3051 @@ +StartFontMetrics 4.1 +Comment Copyright (c) 1985, 1987, 1989, 1990, 1997 Adobe Systems Incorporated. All Rights Reserved. +Comment Creation Date: Thu May 1 12:44:31 1997 +Comment UniqueID 43055 +Comment VMusage 14960 69346 +FontName Helvetica-Oblique +FullName Helvetica Oblique +FamilyName Helvetica +Weight Medium +ItalicAngle -12 +IsFixedPitch false +CharacterSet ExtendedRoman +FontBBox -170 -225 1116 931 +UnderlinePosition -100 +UnderlineThickness 50 +Version 002.000 +Notice Copyright (c) 1985, 1987, 1989, 1990, 1997 Adobe Systems Incorporated. All Rights Reserved.Helvetica is a trademark of Linotype-Hell AG and/or its subsidiaries. +EncodingScheme AdobeStandardEncoding +CapHeight 718 +XHeight 523 +Ascender 718 +Descender -207 +StdHW 76 +StdVW 88 +StartCharMetrics 315 +C 32 ; WX 278 ; N space ; B 0 0 0 0 ; +C 33 ; WX 278 ; N exclam ; B 90 0 340 718 ; +C 34 ; WX 355 ; N quotedbl ; B 168 463 438 718 ; +C 35 ; WX 556 ; N numbersign ; B 73 0 631 688 ; +C 36 ; WX 556 ; N dollar ; B 69 -115 617 775 ; +C 37 ; WX 889 ; N percent ; B 147 -19 889 703 ; +C 38 ; WX 667 ; N ampersand ; B 77 -15 647 718 ; +C 39 ; WX 222 ; N quoteright ; B 151 463 310 718 ; +C 40 ; WX 333 ; N parenleft ; B 108 -207 454 733 ; +C 41 ; WX 333 ; N parenright ; B -9 -207 337 733 ; +C 42 ; WX 389 ; N asterisk ; B 165 431 475 718 ; +C 43 ; WX 584 ; N plus ; B 85 0 606 505 ; +C 44 ; WX 278 ; N comma ; B 56 -147 214 106 ; +C 45 ; WX 333 ; N hyphen ; B 93 232 357 322 ; +C 46 ; WX 278 ; N period ; B 87 0 214 106 ; +C 47 ; WX 278 ; N slash ; B -21 -19 452 737 ; +C 48 ; WX 556 ; N zero ; B 93 -19 608 703 ; +C 49 ; WX 556 ; N one ; B 207 0 508 703 ; +C 50 ; WX 556 ; N two ; B 26 0 617 703 ; +C 51 ; WX 556 ; N three ; B 75 -19 610 703 ; +C 52 ; WX 556 ; N four ; B 61 0 576 703 ; +C 53 ; WX 556 ; N five ; B 68 -19 621 688 ; +C 54 ; WX 556 ; N six ; B 91 -19 615 703 ; +C 55 ; WX 556 ; N seven ; B 137 0 669 688 ; +C 56 ; WX 556 ; N eight ; B 74 -19 607 703 ; +C 57 ; WX 556 ; N nine ; B 82 -19 609 703 ; +C 58 ; WX 278 ; N colon ; B 87 0 301 516 ; +C 59 ; WX 278 ; N semicolon ; B 56 -147 301 516 ; +C 60 ; WX 584 ; N less ; B 94 11 641 495 ; +C 61 ; WX 584 ; N equal ; B 63 115 628 390 ; +C 62 ; WX 584 ; N greater ; B 50 11 597 495 ; +C 63 ; WX 556 ; N question ; B 161 0 610 727 ; +C 64 ; WX 1015 ; N at ; B 215 -19 965 737 ; +C 65 ; WX 667 ; N A ; B 14 0 654 718 ; +C 66 ; WX 667 ; N B ; B 74 0 712 718 ; +C 67 ; WX 722 ; N C ; B 108 -19 782 737 ; +C 68 ; WX 722 ; N D ; B 81 0 764 718 ; +C 69 ; WX 667 ; N E ; B 86 0 762 718 ; +C 70 ; WX 611 ; N F ; B 86 0 736 718 ; +C 71 ; WX 778 ; N G ; B 111 -19 799 737 ; +C 72 ; WX 722 ; N H ; B 77 0 799 718 ; +C 73 ; WX 278 ; N I ; B 91 0 341 718 ; +C 74 ; WX 500 ; N J ; B 47 -19 581 718 ; +C 75 ; WX 667 ; N K ; B 76 0 808 718 ; +C 76 ; WX 556 ; N L ; B 76 0 555 718 ; +C 77 ; WX 833 ; N M ; B 73 0 914 718 ; +C 78 ; WX 722 ; N N ; B 76 0 799 718 ; +C 79 ; WX 778 ; N O ; B 105 -19 826 737 ; +C 80 ; WX 667 ; N P ; B 86 0 737 718 ; +C 81 ; WX 778 ; N Q ; B 105 -56 826 737 ; +C 82 ; WX 722 ; N R ; B 88 0 773 718 ; +C 83 ; WX 667 ; N S ; B 90 -19 713 737 ; +C 84 ; WX 611 ; N T ; B 148 0 750 718 ; +C 85 ; WX 722 ; N U ; B 123 -19 797 718 ; +C 86 ; WX 667 ; N V ; B 173 0 800 718 ; +C 87 ; WX 944 ; N W ; B 169 0 1081 718 ; +C 88 ; WX 667 ; N X ; B 19 0 790 718 ; +C 89 ; WX 667 ; N Y ; B 167 0 806 718 ; +C 90 ; WX 611 ; N Z ; B 23 0 741 718 ; +C 91 ; WX 278 ; N bracketleft ; B 21 -196 403 722 ; +C 92 ; WX 278 ; N backslash ; B 140 -19 291 737 ; +C 93 ; WX 278 ; N bracketright ; B -14 -196 368 722 ; +C 94 ; WX 469 ; N asciicircum ; B 42 264 539 688 ; +C 95 ; WX 556 ; N underscore ; B -27 -125 540 -75 ; +C 96 ; WX 222 ; N quoteleft ; B 165 470 323 725 ; +C 97 ; WX 556 ; N a ; B 61 -15 559 538 ; +C 98 ; WX 556 ; N b ; B 58 -15 584 718 ; +C 99 ; WX 500 ; N c ; B 74 -15 553 538 ; +C 100 ; WX 556 ; N d ; B 84 -15 652 718 ; +C 101 ; WX 556 ; N e ; B 84 -15 578 538 ; +C 102 ; WX 278 ; N f ; B 86 0 416 728 ; L i fi ; L l fl ; +C 103 ; WX 556 ; N g ; B 42 -220 610 538 ; +C 104 ; WX 556 ; N h ; B 65 0 573 718 ; +C 105 ; WX 222 ; N i ; B 67 0 308 718 ; +C 106 ; WX 222 ; N j ; B -60 -210 308 718 ; +C 107 ; WX 500 ; N k ; B 67 0 600 718 ; +C 108 ; WX 222 ; N l ; B 67 0 308 718 ; +C 109 ; WX 833 ; N m ; B 65 0 852 538 ; +C 110 ; WX 556 ; N n ; B 65 0 573 538 ; +C 111 ; WX 556 ; N o ; B 83 -14 585 538 ; +C 112 ; WX 556 ; N p ; B 14 -207 584 538 ; +C 113 ; WX 556 ; N q ; B 84 -207 605 538 ; +C 114 ; WX 333 ; N r ; B 77 0 446 538 ; +C 115 ; WX 500 ; N s ; B 63 -15 529 538 ; +C 116 ; WX 278 ; N t ; B 102 -7 368 669 ; +C 117 ; WX 556 ; N u ; B 94 -15 600 523 ; +C 118 ; WX 500 ; N v ; B 119 0 603 523 ; +C 119 ; WX 722 ; N w ; B 125 0 820 523 ; +C 120 ; WX 500 ; N x ; B 11 0 594 523 ; +C 121 ; WX 500 ; N y ; B 15 -214 600 523 ; +C 122 ; WX 500 ; N z ; B 31 0 571 523 ; +C 123 ; WX 334 ; N braceleft ; B 92 -196 445 722 ; +C 124 ; WX 260 ; N bar ; B 46 -225 332 775 ; +C 125 ; WX 334 ; N braceright ; B 0 -196 354 722 ; +C 126 ; WX 584 ; N asciitilde ; B 111 180 580 326 ; +C 161 ; WX 333 ; N exclamdown ; B 77 -195 326 523 ; +C 162 ; WX 556 ; N cent ; B 95 -115 584 623 ; +C 163 ; WX 556 ; N sterling ; B 49 -16 634 718 ; +C 164 ; WX 167 ; N fraction ; B -170 -19 482 703 ; +C 165 ; WX 556 ; N yen ; B 81 0 699 688 ; +C 166 ; WX 556 ; N florin ; B -52 -207 654 737 ; +C 167 ; WX 556 ; N section ; B 76 -191 584 737 ; +C 168 ; WX 556 ; N currency ; B 60 99 646 603 ; +C 169 ; WX 191 ; N quotesingle ; B 157 463 285 718 ; +C 170 ; WX 333 ; N quotedblleft ; B 138 470 461 725 ; +C 171 ; WX 556 ; N guillemotleft ; B 146 108 554 446 ; +C 172 ; WX 333 ; N guilsinglleft ; B 137 108 340 446 ; +C 173 ; WX 333 ; N guilsinglright ; B 111 108 314 446 ; +C 174 ; WX 500 ; N fi ; B 86 0 587 728 ; +C 175 ; WX 500 ; N fl ; B 86 0 585 728 ; +C 177 ; WX 556 ; N endash ; B 51 240 623 313 ; +C 178 ; WX 556 ; N dagger ; B 135 -159 622 718 ; +C 179 ; WX 556 ; N daggerdbl ; B 52 -159 623 718 ; +C 180 ; WX 278 ; N periodcentered ; B 129 190 257 315 ; +C 182 ; WX 537 ; N paragraph ; B 126 -173 650 718 ; +C 183 ; WX 350 ; N bullet ; B 91 202 413 517 ; +C 184 ; WX 222 ; N quotesinglbase ; B 21 -149 180 106 ; +C 185 ; WX 333 ; N quotedblbase ; B -6 -149 318 106 ; +C 186 ; WX 333 ; N quotedblright ; B 124 463 448 718 ; +C 187 ; WX 556 ; N guillemotright ; B 120 108 528 446 ; +C 188 ; WX 1000 ; N ellipsis ; B 115 0 908 106 ; +C 189 ; WX 1000 ; N perthousand ; B 88 -19 1029 703 ; +C 191 ; WX 611 ; N questiondown ; B 85 -201 534 525 ; +C 193 ; WX 333 ; N grave ; B 170 593 337 734 ; +C 194 ; WX 333 ; N acute ; B 248 593 475 734 ; +C 195 ; WX 333 ; N circumflex ; B 147 593 438 734 ; +C 196 ; WX 333 ; N tilde ; B 125 606 490 722 ; +C 197 ; WX 333 ; N macron ; B 143 627 468 684 ; +C 198 ; WX 333 ; N breve ; B 167 595 476 731 ; +C 199 ; WX 333 ; N dotaccent ; B 249 604 362 706 ; +C 200 ; WX 333 ; N dieresis ; B 168 604 443 706 ; +C 202 ; WX 333 ; N ring ; B 214 572 402 756 ; +C 203 ; WX 333 ; N cedilla ; B 2 -225 232 0 ; +C 205 ; WX 333 ; N hungarumlaut ; B 157 593 565 734 ; +C 206 ; WX 333 ; N ogonek ; B 43 -225 249 0 ; +C 207 ; WX 333 ; N caron ; B 177 593 468 734 ; +C 208 ; WX 1000 ; N emdash ; B 51 240 1067 313 ; +C 225 ; WX 1000 ; N AE ; B 8 0 1097 718 ; +C 227 ; WX 370 ; N ordfeminine ; B 127 405 449 737 ; +C 232 ; WX 556 ; N Lslash ; B 41 0 555 718 ; +C 233 ; WX 778 ; N Oslash ; B 43 -19 890 737 ; +C 234 ; WX 1000 ; N OE ; B 98 -19 1116 737 ; +C 235 ; WX 365 ; N ordmasculine ; B 141 405 468 737 ; +C 241 ; WX 889 ; N ae ; B 61 -15 909 538 ; +C 245 ; WX 278 ; N dotlessi ; B 95 0 294 523 ; +C 248 ; WX 222 ; N lslash ; B 41 0 347 718 ; +C 249 ; WX 611 ; N oslash ; B 29 -22 647 545 ; +C 250 ; WX 944 ; N oe ; B 83 -15 964 538 ; +C 251 ; WX 611 ; N germandbls ; B 67 -15 658 728 ; +C -1 ; WX 278 ; N Idieresis ; B 91 0 458 901 ; +C -1 ; WX 556 ; N eacute ; B 84 -15 587 734 ; +C -1 ; WX 556 ; N abreve ; B 61 -15 578 731 ; +C -1 ; WX 556 ; N uhungarumlaut ; B 94 -15 677 734 ; +C -1 ; WX 556 ; N ecaron ; B 84 -15 580 734 ; +C -1 ; WX 667 ; N Ydieresis ; B 167 0 806 901 ; +C -1 ; WX 584 ; N divide ; B 85 -19 606 524 ; +C -1 ; WX 667 ; N Yacute ; B 167 0 806 929 ; +C -1 ; WX 667 ; N Acircumflex ; B 14 0 654 929 ; +C -1 ; WX 556 ; N aacute ; B 61 -15 587 734 ; +C -1 ; WX 722 ; N Ucircumflex ; B 123 -19 797 929 ; +C -1 ; WX 500 ; N yacute ; B 15 -214 600 734 ; +C -1 ; WX 500 ; N scommaaccent ; B 63 -225 529 538 ; +C -1 ; WX 556 ; N ecircumflex ; B 84 -15 578 734 ; +C -1 ; WX 722 ; N Uring ; B 123 -19 797 931 ; +C -1 ; WX 722 ; N Udieresis ; B 123 -19 797 901 ; +C -1 ; WX 556 ; N aogonek ; B 61 -220 559 538 ; +C -1 ; WX 722 ; N Uacute ; B 123 -19 797 929 ; +C -1 ; WX 556 ; N uogonek ; B 94 -225 600 523 ; +C -1 ; WX 667 ; N Edieresis ; B 86 0 762 901 ; +C -1 ; WX 722 ; N Dcroat ; B 69 0 764 718 ; +C -1 ; WX 250 ; N commaaccent ; B 39 -225 172 -40 ; +C -1 ; WX 737 ; N copyright ; B 54 -19 837 737 ; +C -1 ; WX 667 ; N Emacron ; B 86 0 762 879 ; +C -1 ; WX 500 ; N ccaron ; B 74 -15 553 734 ; +C -1 ; WX 556 ; N aring ; B 61 -15 559 756 ; +C -1 ; WX 722 ; N Ncommaaccent ; B 76 -225 799 718 ; +C -1 ; WX 222 ; N lacute ; B 67 0 461 929 ; +C -1 ; WX 556 ; N agrave ; B 61 -15 559 734 ; +C -1 ; WX 611 ; N Tcommaaccent ; B 148 -225 750 718 ; +C -1 ; WX 722 ; N Cacute ; B 108 -19 782 929 ; +C -1 ; WX 556 ; N atilde ; B 61 -15 592 722 ; +C -1 ; WX 667 ; N Edotaccent ; B 86 0 762 901 ; +C -1 ; WX 500 ; N scaron ; B 63 -15 552 734 ; +C -1 ; WX 500 ; N scedilla ; B 63 -225 529 538 ; +C -1 ; WX 278 ; N iacute ; B 95 0 448 734 ; +C -1 ; WX 471 ; N lozenge ; B 88 0 540 728 ; +C -1 ; WX 722 ; N Rcaron ; B 88 0 773 929 ; +C -1 ; WX 778 ; N Gcommaaccent ; B 111 -225 799 737 ; +C -1 ; WX 556 ; N ucircumflex ; B 94 -15 600 734 ; +C -1 ; WX 556 ; N acircumflex ; B 61 -15 559 734 ; +C -1 ; WX 667 ; N Amacron ; B 14 0 677 879 ; +C -1 ; WX 333 ; N rcaron ; B 77 0 508 734 ; +C -1 ; WX 500 ; N ccedilla ; B 74 -225 553 538 ; +C -1 ; WX 611 ; N Zdotaccent ; B 23 0 741 901 ; +C -1 ; WX 667 ; N Thorn ; B 86 0 712 718 ; +C -1 ; WX 778 ; N Omacron ; B 105 -19 826 879 ; +C -1 ; WX 722 ; N Racute ; B 88 0 773 929 ; +C -1 ; WX 667 ; N Sacute ; B 90 -19 713 929 ; +C -1 ; WX 643 ; N dcaron ; B 84 -15 808 718 ; +C -1 ; WX 722 ; N Umacron ; B 123 -19 797 879 ; +C -1 ; WX 556 ; N uring ; B 94 -15 600 756 ; +C -1 ; WX 333 ; N threesuperior ; B 90 270 436 703 ; +C -1 ; WX 778 ; N Ograve ; B 105 -19 826 929 ; +C -1 ; WX 667 ; N Agrave ; B 14 0 654 929 ; +C -1 ; WX 667 ; N Abreve ; B 14 0 685 926 ; +C -1 ; WX 584 ; N multiply ; B 50 0 642 506 ; +C -1 ; WX 556 ; N uacute ; B 94 -15 600 734 ; +C -1 ; WX 611 ; N Tcaron ; B 148 0 750 929 ; +C -1 ; WX 476 ; N partialdiff ; B 41 -38 550 714 ; +C -1 ; WX 500 ; N ydieresis ; B 15 -214 600 706 ; +C -1 ; WX 722 ; N Nacute ; B 76 0 799 929 ; +C -1 ; WX 278 ; N icircumflex ; B 95 0 411 734 ; +C -1 ; WX 667 ; N Ecircumflex ; B 86 0 762 929 ; +C -1 ; WX 556 ; N adieresis ; B 61 -15 559 706 ; +C -1 ; WX 556 ; N edieresis ; B 84 -15 578 706 ; +C -1 ; WX 500 ; N cacute ; B 74 -15 559 734 ; +C -1 ; WX 556 ; N nacute ; B 65 0 587 734 ; +C -1 ; WX 556 ; N umacron ; B 94 -15 600 684 ; +C -1 ; WX 722 ; N Ncaron ; B 76 0 799 929 ; +C -1 ; WX 278 ; N Iacute ; B 91 0 489 929 ; +C -1 ; WX 584 ; N plusminus ; B 39 0 618 506 ; +C -1 ; WX 260 ; N brokenbar ; B 62 -150 316 700 ; +C -1 ; WX 737 ; N registered ; B 54 -19 837 737 ; +C -1 ; WX 778 ; N Gbreve ; B 111 -19 799 926 ; +C -1 ; WX 278 ; N Idotaccent ; B 91 0 377 901 ; +C -1 ; WX 600 ; N summation ; B 15 -10 671 706 ; +C -1 ; WX 667 ; N Egrave ; B 86 0 762 929 ; +C -1 ; WX 333 ; N racute ; B 77 0 475 734 ; +C -1 ; WX 556 ; N omacron ; B 83 -14 585 684 ; +C -1 ; WX 611 ; N Zacute ; B 23 0 741 929 ; +C -1 ; WX 611 ; N Zcaron ; B 23 0 741 929 ; +C -1 ; WX 549 ; N greaterequal ; B 26 0 620 674 ; +C -1 ; WX 722 ; N Eth ; B 69 0 764 718 ; +C -1 ; WX 722 ; N Ccedilla ; B 108 -225 782 737 ; +C -1 ; WX 222 ; N lcommaaccent ; B 25 -225 308 718 ; +C -1 ; WX 317 ; N tcaron ; B 102 -7 501 808 ; +C -1 ; WX 556 ; N eogonek ; B 84 -225 578 538 ; +C -1 ; WX 722 ; N Uogonek ; B 123 -225 797 718 ; +C -1 ; WX 667 ; N Aacute ; B 14 0 683 929 ; +C -1 ; WX 667 ; N Adieresis ; B 14 0 654 901 ; +C -1 ; WX 556 ; N egrave ; B 84 -15 578 734 ; +C -1 ; WX 500 ; N zacute ; B 31 0 571 734 ; +C -1 ; WX 222 ; N iogonek ; B -61 -225 308 718 ; +C -1 ; WX 778 ; N Oacute ; B 105 -19 826 929 ; +C -1 ; WX 556 ; N oacute ; B 83 -14 587 734 ; +C -1 ; WX 556 ; N amacron ; B 61 -15 580 684 ; +C -1 ; WX 500 ; N sacute ; B 63 -15 559 734 ; +C -1 ; WX 278 ; N idieresis ; B 95 0 416 706 ; +C -1 ; WX 778 ; N Ocircumflex ; B 105 -19 826 929 ; +C -1 ; WX 722 ; N Ugrave ; B 123 -19 797 929 ; +C -1 ; WX 612 ; N Delta ; B 6 0 608 688 ; +C -1 ; WX 556 ; N thorn ; B 14 -207 584 718 ; +C -1 ; WX 333 ; N twosuperior ; B 64 281 449 703 ; +C -1 ; WX 778 ; N Odieresis ; B 105 -19 826 901 ; +C -1 ; WX 556 ; N mu ; B 24 -207 600 523 ; +C -1 ; WX 278 ; N igrave ; B 95 0 310 734 ; +C -1 ; WX 556 ; N ohungarumlaut ; B 83 -14 677 734 ; +C -1 ; WX 667 ; N Eogonek ; B 86 -220 762 718 ; +C -1 ; WX 556 ; N dcroat ; B 84 -15 689 718 ; +C -1 ; WX 834 ; N threequarters ; B 130 -19 861 703 ; +C -1 ; WX 667 ; N Scedilla ; B 90 -225 713 737 ; +C -1 ; WX 299 ; N lcaron ; B 67 0 464 718 ; +C -1 ; WX 667 ; N Kcommaaccent ; B 76 -225 808 718 ; +C -1 ; WX 556 ; N Lacute ; B 76 0 555 929 ; +C -1 ; WX 1000 ; N trademark ; B 186 306 1056 718 ; +C -1 ; WX 556 ; N edotaccent ; B 84 -15 578 706 ; +C -1 ; WX 278 ; N Igrave ; B 91 0 351 929 ; +C -1 ; WX 278 ; N Imacron ; B 91 0 483 879 ; +C -1 ; WX 556 ; N Lcaron ; B 76 0 570 718 ; +C -1 ; WX 834 ; N onehalf ; B 114 -19 839 703 ; +C -1 ; WX 549 ; N lessequal ; B 26 0 666 674 ; +C -1 ; WX 556 ; N ocircumflex ; B 83 -14 585 734 ; +C -1 ; WX 556 ; N ntilde ; B 65 0 592 722 ; +C -1 ; WX 722 ; N Uhungarumlaut ; B 123 -19 801 929 ; +C -1 ; WX 667 ; N Eacute ; B 86 0 762 929 ; +C -1 ; WX 556 ; N emacron ; B 84 -15 580 684 ; +C -1 ; WX 556 ; N gbreve ; B 42 -220 610 731 ; +C -1 ; WX 834 ; N onequarter ; B 150 -19 802 703 ; +C -1 ; WX 667 ; N Scaron ; B 90 -19 713 929 ; +C -1 ; WX 667 ; N Scommaaccent ; B 90 -225 713 737 ; +C -1 ; WX 778 ; N Ohungarumlaut ; B 105 -19 829 929 ; +C -1 ; WX 400 ; N degree ; B 169 411 468 703 ; +C -1 ; WX 556 ; N ograve ; B 83 -14 585 734 ; +C -1 ; WX 722 ; N Ccaron ; B 108 -19 782 929 ; +C -1 ; WX 556 ; N ugrave ; B 94 -15 600 734 ; +C -1 ; WX 453 ; N radical ; B 79 -80 617 762 ; +C -1 ; WX 722 ; N Dcaron ; B 81 0 764 929 ; +C -1 ; WX 333 ; N rcommaaccent ; B 30 -225 446 538 ; +C -1 ; WX 722 ; N Ntilde ; B 76 0 799 917 ; +C -1 ; WX 556 ; N otilde ; B 83 -14 602 722 ; +C -1 ; WX 722 ; N Rcommaaccent ; B 88 -225 773 718 ; +C -1 ; WX 556 ; N Lcommaaccent ; B 76 -225 555 718 ; +C -1 ; WX 667 ; N Atilde ; B 14 0 699 917 ; +C -1 ; WX 667 ; N Aogonek ; B 14 -225 654 718 ; +C -1 ; WX 667 ; N Aring ; B 14 0 654 931 ; +C -1 ; WX 778 ; N Otilde ; B 105 -19 826 917 ; +C -1 ; WX 500 ; N zdotaccent ; B 31 0 571 706 ; +C -1 ; WX 667 ; N Ecaron ; B 86 0 762 929 ; +C -1 ; WX 278 ; N Iogonek ; B -33 -225 341 718 ; +C -1 ; WX 500 ; N kcommaaccent ; B 67 -225 600 718 ; +C -1 ; WX 584 ; N minus ; B 85 216 606 289 ; +C -1 ; WX 278 ; N Icircumflex ; B 91 0 452 929 ; +C -1 ; WX 556 ; N ncaron ; B 65 0 580 734 ; +C -1 ; WX 278 ; N tcommaaccent ; B 63 -225 368 669 ; +C -1 ; WX 584 ; N logicalnot ; B 106 108 628 390 ; +C -1 ; WX 556 ; N odieresis ; B 83 -14 585 706 ; +C -1 ; WX 556 ; N udieresis ; B 94 -15 600 706 ; +C -1 ; WX 549 ; N notequal ; B 34 -35 623 551 ; +C -1 ; WX 556 ; N gcommaaccent ; B 42 -220 610 822 ; +C -1 ; WX 556 ; N eth ; B 81 -15 617 737 ; +C -1 ; WX 500 ; N zcaron ; B 31 0 571 734 ; +C -1 ; WX 556 ; N ncommaaccent ; B 65 -225 573 538 ; +C -1 ; WX 333 ; N onesuperior ; B 166 281 371 703 ; +C -1 ; WX 278 ; N imacron ; B 95 0 417 684 ; +C -1 ; WX 556 ; N Euro ; B 0 0 0 0 ; +EndCharMetrics +StartKernData +StartKernPairs 2705 +KPX A C -30 +KPX A Cacute -30 +KPX A Ccaron -30 +KPX A Ccedilla -30 +KPX A G -30 +KPX A Gbreve -30 +KPX A Gcommaaccent -30 +KPX A O -30 +KPX A Oacute -30 +KPX A Ocircumflex -30 +KPX A Odieresis -30 +KPX A Ograve -30 +KPX A Ohungarumlaut -30 +KPX A Omacron -30 +KPX A Oslash -30 +KPX A Otilde -30 +KPX A Q -30 +KPX A T -120 +KPX A Tcaron -120 +KPX A Tcommaaccent -120 +KPX A U -50 +KPX A Uacute -50 +KPX A Ucircumflex -50 +KPX A Udieresis -50 +KPX A Ugrave -50 +KPX A Uhungarumlaut -50 +KPX A Umacron -50 +KPX A Uogonek -50 +KPX A Uring -50 +KPX A V -70 +KPX A W -50 +KPX A Y -100 +KPX A Yacute -100 +KPX A Ydieresis -100 +KPX A u -30 +KPX A uacute -30 +KPX A ucircumflex -30 +KPX A udieresis -30 +KPX A ugrave -30 +KPX A uhungarumlaut -30 +KPX A umacron -30 +KPX A uogonek -30 +KPX A uring -30 +KPX A v -40 +KPX A w -40 +KPX A y -40 +KPX A yacute -40 +KPX A ydieresis -40 +KPX Aacute C -30 +KPX Aacute Cacute -30 +KPX Aacute Ccaron -30 +KPX Aacute Ccedilla -30 +KPX Aacute G -30 +KPX Aacute Gbreve -30 +KPX Aacute Gcommaaccent -30 +KPX Aacute O -30 +KPX Aacute Oacute -30 +KPX Aacute Ocircumflex -30 +KPX Aacute Odieresis -30 +KPX Aacute Ograve -30 +KPX Aacute Ohungarumlaut -30 +KPX Aacute Omacron -30 +KPX Aacute Oslash -30 +KPX Aacute Otilde -30 +KPX Aacute Q -30 +KPX Aacute T -120 +KPX Aacute Tcaron -120 +KPX Aacute Tcommaaccent -120 +KPX Aacute U -50 +KPX Aacute Uacute -50 +KPX Aacute Ucircumflex -50 +KPX Aacute Udieresis -50 +KPX Aacute Ugrave -50 +KPX Aacute Uhungarumlaut -50 +KPX Aacute Umacron -50 +KPX Aacute Uogonek -50 +KPX Aacute Uring -50 +KPX Aacute V -70 +KPX Aacute W -50 +KPX Aacute Y -100 +KPX Aacute Yacute -100 +KPX Aacute Ydieresis -100 +KPX Aacute u -30 +KPX Aacute uacute -30 +KPX Aacute ucircumflex -30 +KPX Aacute udieresis -30 +KPX Aacute ugrave -30 +KPX Aacute uhungarumlaut -30 +KPX Aacute umacron -30 +KPX Aacute uogonek -30 +KPX Aacute uring -30 +KPX Aacute v -40 +KPX Aacute w -40 +KPX Aacute y -40 +KPX Aacute yacute -40 +KPX Aacute ydieresis -40 +KPX Abreve C -30 +KPX Abreve Cacute -30 +KPX Abreve Ccaron -30 +KPX Abreve Ccedilla -30 +KPX Abreve G -30 +KPX Abreve Gbreve -30 +KPX Abreve Gcommaaccent -30 +KPX Abreve O -30 +KPX Abreve Oacute -30 +KPX Abreve Ocircumflex -30 +KPX Abreve Odieresis -30 +KPX Abreve Ograve -30 +KPX Abreve Ohungarumlaut -30 +KPX Abreve Omacron -30 +KPX Abreve Oslash -30 +KPX Abreve Otilde -30 +KPX Abreve Q -30 +KPX Abreve T -120 +KPX Abreve Tcaron -120 +KPX Abreve Tcommaaccent -120 +KPX Abreve U -50 +KPX Abreve Uacute -50 +KPX Abreve Ucircumflex -50 +KPX Abreve Udieresis -50 +KPX Abreve Ugrave -50 +KPX Abreve Uhungarumlaut -50 +KPX Abreve Umacron -50 +KPX Abreve Uogonek -50 +KPX Abreve Uring -50 +KPX Abreve V -70 +KPX Abreve W -50 +KPX Abreve Y -100 +KPX Abreve Yacute -100 +KPX Abreve Ydieresis -100 +KPX Abreve u -30 +KPX Abreve uacute -30 +KPX Abreve ucircumflex -30 +KPX Abreve udieresis -30 +KPX Abreve ugrave -30 +KPX Abreve uhungarumlaut -30 +KPX Abreve umacron -30 +KPX Abreve uogonek -30 +KPX Abreve uring -30 +KPX Abreve v -40 +KPX Abreve w -40 +KPX Abreve y -40 +KPX Abreve yacute -40 +KPX Abreve ydieresis -40 +KPX Acircumflex C -30 +KPX Acircumflex Cacute -30 +KPX Acircumflex Ccaron -30 +KPX Acircumflex Ccedilla -30 +KPX Acircumflex G -30 +KPX Acircumflex Gbreve -30 +KPX Acircumflex Gcommaaccent -30 +KPX Acircumflex O -30 +KPX Acircumflex Oacute -30 +KPX Acircumflex Ocircumflex -30 +KPX Acircumflex Odieresis -30 +KPX Acircumflex Ograve -30 +KPX Acircumflex Ohungarumlaut -30 +KPX Acircumflex Omacron -30 +KPX Acircumflex Oslash -30 +KPX Acircumflex Otilde -30 +KPX Acircumflex Q -30 +KPX Acircumflex T -120 +KPX Acircumflex Tcaron -120 +KPX Acircumflex Tcommaaccent -120 +KPX Acircumflex U -50 +KPX Acircumflex Uacute -50 +KPX Acircumflex Ucircumflex -50 +KPX Acircumflex Udieresis -50 +KPX Acircumflex Ugrave -50 +KPX Acircumflex Uhungarumlaut -50 +KPX Acircumflex Umacron -50 +KPX Acircumflex Uogonek -50 +KPX Acircumflex Uring -50 +KPX Acircumflex V -70 +KPX Acircumflex W -50 +KPX Acircumflex Y -100 +KPX Acircumflex Yacute -100 +KPX Acircumflex Ydieresis -100 +KPX Acircumflex u -30 +KPX Acircumflex uacute -30 +KPX Acircumflex ucircumflex -30 +KPX Acircumflex udieresis -30 +KPX Acircumflex ugrave -30 +KPX Acircumflex uhungarumlaut -30 +KPX Acircumflex umacron -30 +KPX Acircumflex uogonek -30 +KPX Acircumflex uring -30 +KPX Acircumflex v -40 +KPX Acircumflex w -40 +KPX Acircumflex y -40 +KPX Acircumflex yacute -40 +KPX Acircumflex ydieresis -40 +KPX Adieresis C -30 +KPX Adieresis Cacute -30 +KPX Adieresis Ccaron -30 +KPX Adieresis Ccedilla -30 +KPX Adieresis G -30 +KPX Adieresis Gbreve -30 +KPX Adieresis Gcommaaccent -30 +KPX Adieresis O -30 +KPX Adieresis Oacute -30 +KPX Adieresis Ocircumflex -30 +KPX Adieresis Odieresis -30 +KPX Adieresis Ograve -30 +KPX Adieresis Ohungarumlaut -30 +KPX Adieresis Omacron -30 +KPX Adieresis Oslash -30 +KPX Adieresis Otilde -30 +KPX Adieresis Q -30 +KPX Adieresis T -120 +KPX Adieresis Tcaron -120 +KPX Adieresis Tcommaaccent -120 +KPX Adieresis U -50 +KPX Adieresis Uacute -50 +KPX Adieresis Ucircumflex -50 +KPX Adieresis Udieresis -50 +KPX Adieresis Ugrave -50 +KPX Adieresis Uhungarumlaut -50 +KPX Adieresis Umacron -50 +KPX Adieresis Uogonek -50 +KPX Adieresis Uring -50 +KPX Adieresis V -70 +KPX Adieresis W -50 +KPX Adieresis Y -100 +KPX Adieresis Yacute -100 +KPX Adieresis Ydieresis -100 +KPX Adieresis u -30 +KPX Adieresis uacute -30 +KPX Adieresis ucircumflex -30 +KPX Adieresis udieresis -30 +KPX Adieresis ugrave -30 +KPX Adieresis uhungarumlaut -30 +KPX Adieresis umacron -30 +KPX Adieresis uogonek -30 +KPX Adieresis uring -30 +KPX Adieresis v -40 +KPX Adieresis w -40 +KPX Adieresis y -40 +KPX Adieresis yacute -40 +KPX Adieresis ydieresis -40 +KPX Agrave C -30 +KPX Agrave Cacute -30 +KPX Agrave Ccaron -30 +KPX Agrave Ccedilla -30 +KPX Agrave G -30 +KPX Agrave Gbreve -30 +KPX Agrave Gcommaaccent -30 +KPX Agrave O -30 +KPX Agrave Oacute -30 +KPX Agrave Ocircumflex -30 +KPX Agrave Odieresis -30 +KPX Agrave Ograve -30 +KPX Agrave Ohungarumlaut -30 +KPX Agrave Omacron -30 +KPX Agrave Oslash -30 +KPX Agrave Otilde -30 +KPX Agrave Q -30 +KPX Agrave T -120 +KPX Agrave Tcaron -120 +KPX Agrave Tcommaaccent -120 +KPX Agrave U -50 +KPX Agrave Uacute -50 +KPX Agrave Ucircumflex -50 +KPX Agrave Udieresis -50 +KPX Agrave Ugrave -50 +KPX Agrave Uhungarumlaut -50 +KPX Agrave Umacron -50 +KPX Agrave Uogonek -50 +KPX Agrave Uring -50 +KPX Agrave V -70 +KPX Agrave W -50 +KPX Agrave Y -100 +KPX Agrave Yacute -100 +KPX Agrave Ydieresis -100 +KPX Agrave u -30 +KPX Agrave uacute -30 +KPX Agrave ucircumflex -30 +KPX Agrave udieresis -30 +KPX Agrave ugrave -30 +KPX Agrave uhungarumlaut -30 +KPX Agrave umacron -30 +KPX Agrave uogonek -30 +KPX Agrave uring -30 +KPX Agrave v -40 +KPX Agrave w -40 +KPX Agrave y -40 +KPX Agrave yacute -40 +KPX Agrave ydieresis -40 +KPX Amacron C -30 +KPX Amacron Cacute -30 +KPX Amacron Ccaron -30 +KPX Amacron Ccedilla -30 +KPX Amacron G -30 +KPX Amacron Gbreve -30 +KPX Amacron Gcommaaccent -30 +KPX Amacron O -30 +KPX Amacron Oacute -30 +KPX Amacron Ocircumflex -30 +KPX Amacron Odieresis -30 +KPX Amacron Ograve -30 +KPX Amacron Ohungarumlaut -30 +KPX Amacron Omacron -30 +KPX Amacron Oslash -30 +KPX Amacron Otilde -30 +KPX Amacron Q -30 +KPX Amacron T -120 +KPX Amacron Tcaron -120 +KPX Amacron Tcommaaccent -120 +KPX Amacron U -50 +KPX Amacron Uacute -50 +KPX Amacron Ucircumflex -50 +KPX Amacron Udieresis -50 +KPX Amacron Ugrave -50 +KPX Amacron Uhungarumlaut -50 +KPX Amacron Umacron -50 +KPX Amacron Uogonek -50 +KPX Amacron Uring -50 +KPX Amacron V -70 +KPX Amacron W -50 +KPX Amacron Y -100 +KPX Amacron Yacute -100 +KPX Amacron Ydieresis -100 +KPX Amacron u -30 +KPX Amacron uacute -30 +KPX Amacron ucircumflex -30 +KPX Amacron udieresis -30 +KPX Amacron ugrave -30 +KPX Amacron uhungarumlaut -30 +KPX Amacron umacron -30 +KPX Amacron uogonek -30 +KPX Amacron uring -30 +KPX Amacron v -40 +KPX Amacron w -40 +KPX Amacron y -40 +KPX Amacron yacute -40 +KPX Amacron ydieresis -40 +KPX Aogonek C -30 +KPX Aogonek Cacute -30 +KPX Aogonek Ccaron -30 +KPX Aogonek Ccedilla -30 +KPX Aogonek G -30 +KPX Aogonek Gbreve -30 +KPX Aogonek Gcommaaccent -30 +KPX Aogonek O -30 +KPX Aogonek Oacute -30 +KPX Aogonek Ocircumflex -30 +KPX Aogonek Odieresis -30 +KPX Aogonek Ograve -30 +KPX Aogonek Ohungarumlaut -30 +KPX Aogonek Omacron -30 +KPX Aogonek Oslash -30 +KPX Aogonek Otilde -30 +KPX Aogonek Q -30 +KPX Aogonek T -120 +KPX Aogonek Tcaron -120 +KPX Aogonek Tcommaaccent -120 +KPX Aogonek U -50 +KPX Aogonek Uacute -50 +KPX Aogonek Ucircumflex -50 +KPX Aogonek Udieresis -50 +KPX Aogonek Ugrave -50 +KPX Aogonek Uhungarumlaut -50 +KPX Aogonek Umacron -50 +KPX Aogonek Uogonek -50 +KPX Aogonek Uring -50 +KPX Aogonek V -70 +KPX Aogonek W -50 +KPX Aogonek Y -100 +KPX Aogonek Yacute -100 +KPX Aogonek Ydieresis -100 +KPX Aogonek u -30 +KPX Aogonek uacute -30 +KPX Aogonek ucircumflex -30 +KPX Aogonek udieresis -30 +KPX Aogonek ugrave -30 +KPX Aogonek uhungarumlaut -30 +KPX Aogonek umacron -30 +KPX Aogonek uogonek -30 +KPX Aogonek uring -30 +KPX Aogonek v -40 +KPX Aogonek w -40 +KPX Aogonek y -40 +KPX Aogonek yacute -40 +KPX Aogonek ydieresis -40 +KPX Aring C -30 +KPX Aring Cacute -30 +KPX Aring Ccaron -30 +KPX Aring Ccedilla -30 +KPX Aring G -30 +KPX Aring Gbreve -30 +KPX Aring Gcommaaccent -30 +KPX Aring O -30 +KPX Aring Oacute -30 +KPX Aring Ocircumflex -30 +KPX Aring Odieresis -30 +KPX Aring Ograve -30 +KPX Aring Ohungarumlaut -30 +KPX Aring Omacron -30 +KPX Aring Oslash -30 +KPX Aring Otilde -30 +KPX Aring Q -30 +KPX Aring T -120 +KPX Aring Tcaron -120 +KPX Aring Tcommaaccent -120 +KPX Aring U -50 +KPX Aring Uacute -50 +KPX Aring Ucircumflex -50 +KPX Aring Udieresis -50 +KPX Aring Ugrave -50 +KPX Aring Uhungarumlaut -50 +KPX Aring Umacron -50 +KPX Aring Uogonek -50 +KPX Aring Uring -50 +KPX Aring V -70 +KPX Aring W -50 +KPX Aring Y -100 +KPX Aring Yacute -100 +KPX Aring Ydieresis -100 +KPX Aring u -30 +KPX Aring uacute -30 +KPX Aring ucircumflex -30 +KPX Aring udieresis -30 +KPX Aring ugrave -30 +KPX Aring uhungarumlaut -30 +KPX Aring umacron -30 +KPX Aring uogonek -30 +KPX Aring uring -30 +KPX Aring v -40 +KPX Aring w -40 +KPX Aring y -40 +KPX Aring yacute -40 +KPX Aring ydieresis -40 +KPX Atilde C -30 +KPX Atilde Cacute -30 +KPX Atilde Ccaron -30 +KPX Atilde Ccedilla -30 +KPX Atilde G -30 +KPX Atilde Gbreve -30 +KPX Atilde Gcommaaccent -30 +KPX Atilde O -30 +KPX Atilde Oacute -30 +KPX Atilde Ocircumflex -30 +KPX Atilde Odieresis -30 +KPX Atilde Ograve -30 +KPX Atilde Ohungarumlaut -30 +KPX Atilde Omacron -30 +KPX Atilde Oslash -30 +KPX Atilde Otilde -30 +KPX Atilde Q -30 +KPX Atilde T -120 +KPX Atilde Tcaron -120 +KPX Atilde Tcommaaccent -120 +KPX Atilde U -50 +KPX Atilde Uacute -50 +KPX Atilde Ucircumflex -50 +KPX Atilde Udieresis -50 +KPX Atilde Ugrave -50 +KPX Atilde Uhungarumlaut -50 +KPX Atilde Umacron -50 +KPX Atilde Uogonek -50 +KPX Atilde Uring -50 +KPX Atilde V -70 +KPX Atilde W -50 +KPX Atilde Y -100 +KPX Atilde Yacute -100 +KPX Atilde Ydieresis -100 +KPX Atilde u -30 +KPX Atilde uacute -30 +KPX Atilde ucircumflex -30 +KPX Atilde udieresis -30 +KPX Atilde ugrave -30 +KPX Atilde uhungarumlaut -30 +KPX Atilde umacron -30 +KPX Atilde uogonek -30 +KPX Atilde uring -30 +KPX Atilde v -40 +KPX Atilde w -40 +KPX Atilde y -40 +KPX Atilde yacute -40 +KPX Atilde ydieresis -40 +KPX B U -10 +KPX B Uacute -10 +KPX B Ucircumflex -10 +KPX B Udieresis -10 +KPX B Ugrave -10 +KPX B Uhungarumlaut -10 +KPX B Umacron -10 +KPX B Uogonek -10 +KPX B Uring -10 +KPX B comma -20 +KPX B period -20 +KPX C comma -30 +KPX C period -30 +KPX Cacute comma -30 +KPX Cacute period -30 +KPX Ccaron comma -30 +KPX Ccaron period -30 +KPX Ccedilla comma -30 +KPX Ccedilla period -30 +KPX D A -40 +KPX D Aacute -40 +KPX D Abreve -40 +KPX D Acircumflex -40 +KPX D Adieresis -40 +KPX D Agrave -40 +KPX D Amacron -40 +KPX D Aogonek -40 +KPX D Aring -40 +KPX D Atilde -40 +KPX D V -70 +KPX D W -40 +KPX D Y -90 +KPX D Yacute -90 +KPX D Ydieresis -90 +KPX D comma -70 +KPX D period -70 +KPX Dcaron A -40 +KPX Dcaron Aacute -40 +KPX Dcaron Abreve -40 +KPX Dcaron Acircumflex -40 +KPX Dcaron Adieresis -40 +KPX Dcaron Agrave -40 +KPX Dcaron Amacron -40 +KPX Dcaron Aogonek -40 +KPX Dcaron Aring -40 +KPX Dcaron Atilde -40 +KPX Dcaron V -70 +KPX Dcaron W -40 +KPX Dcaron Y -90 +KPX Dcaron Yacute -90 +KPX Dcaron Ydieresis -90 +KPX Dcaron comma -70 +KPX Dcaron period -70 +KPX Dcroat A -40 +KPX Dcroat Aacute -40 +KPX Dcroat Abreve -40 +KPX Dcroat Acircumflex -40 +KPX Dcroat Adieresis -40 +KPX Dcroat Agrave -40 +KPX Dcroat Amacron -40 +KPX Dcroat Aogonek -40 +KPX Dcroat Aring -40 +KPX Dcroat Atilde -40 +KPX Dcroat V -70 +KPX Dcroat W -40 +KPX Dcroat Y -90 +KPX Dcroat Yacute -90 +KPX Dcroat Ydieresis -90 +KPX Dcroat comma -70 +KPX Dcroat period -70 +KPX F A -80 +KPX F Aacute -80 +KPX F Abreve -80 +KPX F Acircumflex -80 +KPX F Adieresis -80 +KPX F Agrave -80 +KPX F Amacron -80 +KPX F Aogonek -80 +KPX F Aring -80 +KPX F Atilde -80 +KPX F a -50 +KPX F aacute -50 +KPX F abreve -50 +KPX F acircumflex -50 +KPX F adieresis -50 +KPX F agrave -50 +KPX F amacron -50 +KPX F aogonek -50 +KPX F aring -50 +KPX F atilde -50 +KPX F comma -150 +KPX F e -30 +KPX F eacute -30 +KPX F ecaron -30 +KPX F ecircumflex -30 +KPX F edieresis -30 +KPX F edotaccent -30 +KPX F egrave -30 +KPX F emacron -30 +KPX F eogonek -30 +KPX F o -30 +KPX F oacute -30 +KPX F ocircumflex -30 +KPX F odieresis -30 +KPX F ograve -30 +KPX F ohungarumlaut -30 +KPX F omacron -30 +KPX F oslash -30 +KPX F otilde -30 +KPX F period -150 +KPX F r -45 +KPX F racute -45 +KPX F rcaron -45 +KPX F rcommaaccent -45 +KPX J A -20 +KPX J Aacute -20 +KPX J Abreve -20 +KPX J Acircumflex -20 +KPX J Adieresis -20 +KPX J Agrave -20 +KPX J Amacron -20 +KPX J Aogonek -20 +KPX J Aring -20 +KPX J Atilde -20 +KPX J a -20 +KPX J aacute -20 +KPX J abreve -20 +KPX J acircumflex -20 +KPX J adieresis -20 +KPX J agrave -20 +KPX J amacron -20 +KPX J aogonek -20 +KPX J aring -20 +KPX J atilde -20 +KPX J comma -30 +KPX J period -30 +KPX J u -20 +KPX J uacute -20 +KPX J ucircumflex -20 +KPX J udieresis -20 +KPX J ugrave -20 +KPX J uhungarumlaut -20 +KPX J umacron -20 +KPX J uogonek -20 +KPX J uring -20 +KPX K O -50 +KPX K Oacute -50 +KPX K Ocircumflex -50 +KPX K Odieresis -50 +KPX K Ograve -50 +KPX K Ohungarumlaut -50 +KPX K Omacron -50 +KPX K Oslash -50 +KPX K Otilde -50 +KPX K e -40 +KPX K eacute -40 +KPX K ecaron -40 +KPX K ecircumflex -40 +KPX K edieresis -40 +KPX K edotaccent -40 +KPX K egrave -40 +KPX K emacron -40 +KPX K eogonek -40 +KPX K o -40 +KPX K oacute -40 +KPX K ocircumflex -40 +KPX K odieresis -40 +KPX K ograve -40 +KPX K ohungarumlaut -40 +KPX K omacron -40 +KPX K oslash -40 +KPX K otilde -40 +KPX K u -30 +KPX K uacute -30 +KPX K ucircumflex -30 +KPX K udieresis -30 +KPX K ugrave -30 +KPX K uhungarumlaut -30 +KPX K umacron -30 +KPX K uogonek -30 +KPX K uring -30 +KPX K y -50 +KPX K yacute -50 +KPX K ydieresis -50 +KPX Kcommaaccent O -50 +KPX Kcommaaccent Oacute -50 +KPX Kcommaaccent Ocircumflex -50 +KPX Kcommaaccent Odieresis -50 +KPX Kcommaaccent Ograve -50 +KPX Kcommaaccent Ohungarumlaut -50 +KPX Kcommaaccent Omacron -50 +KPX Kcommaaccent Oslash -50 +KPX Kcommaaccent Otilde -50 +KPX Kcommaaccent e -40 +KPX Kcommaaccent eacute -40 +KPX Kcommaaccent ecaron -40 +KPX Kcommaaccent ecircumflex -40 +KPX Kcommaaccent edieresis -40 +KPX Kcommaaccent edotaccent -40 +KPX Kcommaaccent egrave -40 +KPX Kcommaaccent emacron -40 +KPX Kcommaaccent eogonek -40 +KPX Kcommaaccent o -40 +KPX Kcommaaccent oacute -40 +KPX Kcommaaccent ocircumflex -40 +KPX Kcommaaccent odieresis -40 +KPX Kcommaaccent ograve -40 +KPX Kcommaaccent ohungarumlaut -40 +KPX Kcommaaccent omacron -40 +KPX Kcommaaccent oslash -40 +KPX Kcommaaccent otilde -40 +KPX Kcommaaccent u -30 +KPX Kcommaaccent uacute -30 +KPX Kcommaaccent ucircumflex -30 +KPX Kcommaaccent udieresis -30 +KPX Kcommaaccent ugrave -30 +KPX Kcommaaccent uhungarumlaut -30 +KPX Kcommaaccent umacron -30 +KPX Kcommaaccent uogonek -30 +KPX Kcommaaccent uring -30 +KPX Kcommaaccent y -50 +KPX Kcommaaccent yacute -50 +KPX Kcommaaccent ydieresis -50 +KPX L T -110 +KPX L Tcaron -110 +KPX L Tcommaaccent -110 +KPX L V -110 +KPX L W -70 +KPX L Y -140 +KPX L Yacute -140 +KPX L Ydieresis -140 +KPX L quotedblright -140 +KPX L quoteright -160 +KPX L y -30 +KPX L yacute -30 +KPX L ydieresis -30 +KPX Lacute T -110 +KPX Lacute Tcaron -110 +KPX Lacute Tcommaaccent -110 +KPX Lacute V -110 +KPX Lacute W -70 +KPX Lacute Y -140 +KPX Lacute Yacute -140 +KPX Lacute Ydieresis -140 +KPX Lacute quotedblright -140 +KPX Lacute quoteright -160 +KPX Lacute y -30 +KPX Lacute yacute -30 +KPX Lacute ydieresis -30 +KPX Lcaron T -110 +KPX Lcaron Tcaron -110 +KPX Lcaron Tcommaaccent -110 +KPX Lcaron V -110 +KPX Lcaron W -70 +KPX Lcaron Y -140 +KPX Lcaron Yacute -140 +KPX Lcaron Ydieresis -140 +KPX Lcaron quotedblright -140 +KPX Lcaron quoteright -160 +KPX Lcaron y -30 +KPX Lcaron yacute -30 +KPX Lcaron ydieresis -30 +KPX Lcommaaccent T -110 +KPX Lcommaaccent Tcaron -110 +KPX Lcommaaccent Tcommaaccent -110 +KPX Lcommaaccent V -110 +KPX Lcommaaccent W -70 +KPX Lcommaaccent Y -140 +KPX Lcommaaccent Yacute -140 +KPX Lcommaaccent Ydieresis -140 +KPX Lcommaaccent quotedblright -140 +KPX Lcommaaccent quoteright -160 +KPX Lcommaaccent y -30 +KPX Lcommaaccent yacute -30 +KPX Lcommaaccent ydieresis -30 +KPX Lslash T -110 +KPX Lslash Tcaron -110 +KPX Lslash Tcommaaccent -110 +KPX Lslash V -110 +KPX Lslash W -70 +KPX Lslash Y -140 +KPX Lslash Yacute -140 +KPX Lslash Ydieresis -140 +KPX Lslash quotedblright -140 +KPX Lslash quoteright -160 +KPX Lslash y -30 +KPX Lslash yacute -30 +KPX Lslash ydieresis -30 +KPX O A -20 +KPX O Aacute -20 +KPX O Abreve -20 +KPX O Acircumflex -20 +KPX O Adieresis -20 +KPX O Agrave -20 +KPX O Amacron -20 +KPX O Aogonek -20 +KPX O Aring -20 +KPX O Atilde -20 +KPX O T -40 +KPX O Tcaron -40 +KPX O Tcommaaccent -40 +KPX O V -50 +KPX O W -30 +KPX O X -60 +KPX O Y -70 +KPX O Yacute -70 +KPX O Ydieresis -70 +KPX O comma -40 +KPX O period -40 +KPX Oacute A -20 +KPX Oacute Aacute -20 +KPX Oacute Abreve -20 +KPX Oacute Acircumflex -20 +KPX Oacute Adieresis -20 +KPX Oacute Agrave -20 +KPX Oacute Amacron -20 +KPX Oacute Aogonek -20 +KPX Oacute Aring -20 +KPX Oacute Atilde -20 +KPX Oacute T -40 +KPX Oacute Tcaron -40 +KPX Oacute Tcommaaccent -40 +KPX Oacute V -50 +KPX Oacute W -30 +KPX Oacute X -60 +KPX Oacute Y -70 +KPX Oacute Yacute -70 +KPX Oacute Ydieresis -70 +KPX Oacute comma -40 +KPX Oacute period -40 +KPX Ocircumflex A -20 +KPX Ocircumflex Aacute -20 +KPX Ocircumflex Abreve -20 +KPX Ocircumflex Acircumflex -20 +KPX Ocircumflex Adieresis -20 +KPX Ocircumflex Agrave -20 +KPX Ocircumflex Amacron -20 +KPX Ocircumflex Aogonek -20 +KPX Ocircumflex Aring -20 +KPX Ocircumflex Atilde -20 +KPX Ocircumflex T -40 +KPX Ocircumflex Tcaron -40 +KPX Ocircumflex Tcommaaccent -40 +KPX Ocircumflex V -50 +KPX Ocircumflex W -30 +KPX Ocircumflex X -60 +KPX Ocircumflex Y -70 +KPX Ocircumflex Yacute -70 +KPX Ocircumflex Ydieresis -70 +KPX Ocircumflex comma -40 +KPX Ocircumflex period -40 +KPX Odieresis A -20 +KPX Odieresis Aacute -20 +KPX Odieresis Abreve -20 +KPX Odieresis Acircumflex -20 +KPX Odieresis Adieresis -20 +KPX Odieresis Agrave -20 +KPX Odieresis Amacron -20 +KPX Odieresis Aogonek -20 +KPX Odieresis Aring -20 +KPX Odieresis Atilde -20 +KPX Odieresis T -40 +KPX Odieresis Tcaron -40 +KPX Odieresis Tcommaaccent -40 +KPX Odieresis V -50 +KPX Odieresis W -30 +KPX Odieresis X -60 +KPX Odieresis Y -70 +KPX Odieresis Yacute -70 +KPX Odieresis Ydieresis -70 +KPX Odieresis comma -40 +KPX Odieresis period -40 +KPX Ograve A -20 +KPX Ograve Aacute -20 +KPX Ograve Abreve -20 +KPX Ograve Acircumflex -20 +KPX Ograve Adieresis -20 +KPX Ograve Agrave -20 +KPX Ograve Amacron -20 +KPX Ograve Aogonek -20 +KPX Ograve Aring -20 +KPX Ograve Atilde -20 +KPX Ograve T -40 +KPX Ograve Tcaron -40 +KPX Ograve Tcommaaccent -40 +KPX Ograve V -50 +KPX Ograve W -30 +KPX Ograve X -60 +KPX Ograve Y -70 +KPX Ograve Yacute -70 +KPX Ograve Ydieresis -70 +KPX Ograve comma -40 +KPX Ograve period -40 +KPX Ohungarumlaut A -20 +KPX Ohungarumlaut Aacute -20 +KPX Ohungarumlaut Abreve -20 +KPX Ohungarumlaut Acircumflex -20 +KPX Ohungarumlaut Adieresis -20 +KPX Ohungarumlaut Agrave -20 +KPX Ohungarumlaut Amacron -20 +KPX Ohungarumlaut Aogonek -20 +KPX Ohungarumlaut Aring -20 +KPX Ohungarumlaut Atilde -20 +KPX Ohungarumlaut T -40 +KPX Ohungarumlaut Tcaron -40 +KPX Ohungarumlaut Tcommaaccent -40 +KPX Ohungarumlaut V -50 +KPX Ohungarumlaut W -30 +KPX Ohungarumlaut X -60 +KPX Ohungarumlaut Y -70 +KPX Ohungarumlaut Yacute -70 +KPX Ohungarumlaut Ydieresis -70 +KPX Ohungarumlaut comma -40 +KPX Ohungarumlaut period -40 +KPX Omacron A -20 +KPX Omacron Aacute -20 +KPX Omacron Abreve -20 +KPX Omacron Acircumflex -20 +KPX Omacron Adieresis -20 +KPX Omacron Agrave -20 +KPX Omacron Amacron -20 +KPX Omacron Aogonek -20 +KPX Omacron Aring -20 +KPX Omacron Atilde -20 +KPX Omacron T -40 +KPX Omacron Tcaron -40 +KPX Omacron Tcommaaccent -40 +KPX Omacron V -50 +KPX Omacron W -30 +KPX Omacron X -60 +KPX Omacron Y -70 +KPX Omacron Yacute -70 +KPX Omacron Ydieresis -70 +KPX Omacron comma -40 +KPX Omacron period -40 +KPX Oslash A -20 +KPX Oslash Aacute -20 +KPX Oslash Abreve -20 +KPX Oslash Acircumflex -20 +KPX Oslash Adieresis -20 +KPX Oslash Agrave -20 +KPX Oslash Amacron -20 +KPX Oslash Aogonek -20 +KPX Oslash Aring -20 +KPX Oslash Atilde -20 +KPX Oslash T -40 +KPX Oslash Tcaron -40 +KPX Oslash Tcommaaccent -40 +KPX Oslash V -50 +KPX Oslash W -30 +KPX Oslash X -60 +KPX Oslash Y -70 +KPX Oslash Yacute -70 +KPX Oslash Ydieresis -70 +KPX Oslash comma -40 +KPX Oslash period -40 +KPX Otilde A -20 +KPX Otilde Aacute -20 +KPX Otilde Abreve -20 +KPX Otilde Acircumflex -20 +KPX Otilde Adieresis -20 +KPX Otilde Agrave -20 +KPX Otilde Amacron -20 +KPX Otilde Aogonek -20 +KPX Otilde Aring -20 +KPX Otilde Atilde -20 +KPX Otilde T -40 +KPX Otilde Tcaron -40 +KPX Otilde Tcommaaccent -40 +KPX Otilde V -50 +KPX Otilde W -30 +KPX Otilde X -60 +KPX Otilde Y -70 +KPX Otilde Yacute -70 +KPX Otilde Ydieresis -70 +KPX Otilde comma -40 +KPX Otilde period -40 +KPX P A -120 +KPX P Aacute -120 +KPX P Abreve -120 +KPX P Acircumflex -120 +KPX P Adieresis -120 +KPX P Agrave -120 +KPX P Amacron -120 +KPX P Aogonek -120 +KPX P Aring -120 +KPX P Atilde -120 +KPX P a -40 +KPX P aacute -40 +KPX P abreve -40 +KPX P acircumflex -40 +KPX P adieresis -40 +KPX P agrave -40 +KPX P amacron -40 +KPX P aogonek -40 +KPX P aring -40 +KPX P atilde -40 +KPX P comma -180 +KPX P e -50 +KPX P eacute -50 +KPX P ecaron -50 +KPX P ecircumflex -50 +KPX P edieresis -50 +KPX P edotaccent -50 +KPX P egrave -50 +KPX P emacron -50 +KPX P eogonek -50 +KPX P o -50 +KPX P oacute -50 +KPX P ocircumflex -50 +KPX P odieresis -50 +KPX P ograve -50 +KPX P ohungarumlaut -50 +KPX P omacron -50 +KPX P oslash -50 +KPX P otilde -50 +KPX P period -180 +KPX Q U -10 +KPX Q Uacute -10 +KPX Q Ucircumflex -10 +KPX Q Udieresis -10 +KPX Q Ugrave -10 +KPX Q Uhungarumlaut -10 +KPX Q Umacron -10 +KPX Q Uogonek -10 +KPX Q Uring -10 +KPX R O -20 +KPX R Oacute -20 +KPX R Ocircumflex -20 +KPX R Odieresis -20 +KPX R Ograve -20 +KPX R Ohungarumlaut -20 +KPX R Omacron -20 +KPX R Oslash -20 +KPX R Otilde -20 +KPX R T -30 +KPX R Tcaron -30 +KPX R Tcommaaccent -30 +KPX R U -40 +KPX R Uacute -40 +KPX R Ucircumflex -40 +KPX R Udieresis -40 +KPX R Ugrave -40 +KPX R Uhungarumlaut -40 +KPX R Umacron -40 +KPX R Uogonek -40 +KPX R Uring -40 +KPX R V -50 +KPX R W -30 +KPX R Y -50 +KPX R Yacute -50 +KPX R Ydieresis -50 +KPX Racute O -20 +KPX Racute Oacute -20 +KPX Racute Ocircumflex -20 +KPX Racute Odieresis -20 +KPX Racute Ograve -20 +KPX Racute Ohungarumlaut -20 +KPX Racute Omacron -20 +KPX Racute Oslash -20 +KPX Racute Otilde -20 +KPX Racute T -30 +KPX Racute Tcaron -30 +KPX Racute Tcommaaccent -30 +KPX Racute U -40 +KPX Racute Uacute -40 +KPX Racute Ucircumflex -40 +KPX Racute Udieresis -40 +KPX Racute Ugrave -40 +KPX Racute Uhungarumlaut -40 +KPX Racute Umacron -40 +KPX Racute Uogonek -40 +KPX Racute Uring -40 +KPX Racute V -50 +KPX Racute W -30 +KPX Racute Y -50 +KPX Racute Yacute -50 +KPX Racute Ydieresis -50 +KPX Rcaron O -20 +KPX Rcaron Oacute -20 +KPX Rcaron Ocircumflex -20 +KPX Rcaron Odieresis -20 +KPX Rcaron Ograve -20 +KPX Rcaron Ohungarumlaut -20 +KPX Rcaron Omacron -20 +KPX Rcaron Oslash -20 +KPX Rcaron Otilde -20 +KPX Rcaron T -30 +KPX Rcaron Tcaron -30 +KPX Rcaron Tcommaaccent -30 +KPX Rcaron U -40 +KPX Rcaron Uacute -40 +KPX Rcaron Ucircumflex -40 +KPX Rcaron Udieresis -40 +KPX Rcaron Ugrave -40 +KPX Rcaron Uhungarumlaut -40 +KPX Rcaron Umacron -40 +KPX Rcaron Uogonek -40 +KPX Rcaron Uring -40 +KPX Rcaron V -50 +KPX Rcaron W -30 +KPX Rcaron Y -50 +KPX Rcaron Yacute -50 +KPX Rcaron Ydieresis -50 +KPX Rcommaaccent O -20 +KPX Rcommaaccent Oacute -20 +KPX Rcommaaccent Ocircumflex -20 +KPX Rcommaaccent Odieresis -20 +KPX Rcommaaccent Ograve -20 +KPX Rcommaaccent Ohungarumlaut -20 +KPX Rcommaaccent Omacron -20 +KPX Rcommaaccent Oslash -20 +KPX Rcommaaccent Otilde -20 +KPX Rcommaaccent T -30 +KPX Rcommaaccent Tcaron -30 +KPX Rcommaaccent Tcommaaccent -30 +KPX Rcommaaccent U -40 +KPX Rcommaaccent Uacute -40 +KPX Rcommaaccent Ucircumflex -40 +KPX Rcommaaccent Udieresis -40 +KPX Rcommaaccent Ugrave -40 +KPX Rcommaaccent Uhungarumlaut -40 +KPX Rcommaaccent Umacron -40 +KPX Rcommaaccent Uogonek -40 +KPX Rcommaaccent Uring -40 +KPX Rcommaaccent V -50 +KPX Rcommaaccent W -30 +KPX Rcommaaccent Y -50 +KPX Rcommaaccent Yacute -50 +KPX Rcommaaccent Ydieresis -50 +KPX S comma -20 +KPX S period -20 +KPX Sacute comma -20 +KPX Sacute period -20 +KPX Scaron comma -20 +KPX Scaron period -20 +KPX Scedilla comma -20 +KPX Scedilla period -20 +KPX Scommaaccent comma -20 +KPX Scommaaccent period -20 +KPX T A -120 +KPX T Aacute -120 +KPX T Abreve -120 +KPX T Acircumflex -120 +KPX T Adieresis -120 +KPX T Agrave -120 +KPX T Amacron -120 +KPX T Aogonek -120 +KPX T Aring -120 +KPX T Atilde -120 +KPX T O -40 +KPX T Oacute -40 +KPX T Ocircumflex -40 +KPX T Odieresis -40 +KPX T Ograve -40 +KPX T Ohungarumlaut -40 +KPX T Omacron -40 +KPX T Oslash -40 +KPX T Otilde -40 +KPX T a -120 +KPX T aacute -120 +KPX T abreve -60 +KPX T acircumflex -120 +KPX T adieresis -120 +KPX T agrave -120 +KPX T amacron -60 +KPX T aogonek -120 +KPX T aring -120 +KPX T atilde -60 +KPX T colon -20 +KPX T comma -120 +KPX T e -120 +KPX T eacute -120 +KPX T ecaron -120 +KPX T ecircumflex -120 +KPX T edieresis -120 +KPX T edotaccent -120 +KPX T egrave -60 +KPX T emacron -60 +KPX T eogonek -120 +KPX T hyphen -140 +KPX T o -120 +KPX T oacute -120 +KPX T ocircumflex -120 +KPX T odieresis -120 +KPX T ograve -120 +KPX T ohungarumlaut -120 +KPX T omacron -60 +KPX T oslash -120 +KPX T otilde -60 +KPX T period -120 +KPX T r -120 +KPX T racute -120 +KPX T rcaron -120 +KPX T rcommaaccent -120 +KPX T semicolon -20 +KPX T u -120 +KPX T uacute -120 +KPX T ucircumflex -120 +KPX T udieresis -120 +KPX T ugrave -120 +KPX T uhungarumlaut -120 +KPX T umacron -60 +KPX T uogonek -120 +KPX T uring -120 +KPX T w -120 +KPX T y -120 +KPX T yacute -120 +KPX T ydieresis -60 +KPX Tcaron A -120 +KPX Tcaron Aacute -120 +KPX Tcaron Abreve -120 +KPX Tcaron Acircumflex -120 +KPX Tcaron Adieresis -120 +KPX Tcaron Agrave -120 +KPX Tcaron Amacron -120 +KPX Tcaron Aogonek -120 +KPX Tcaron Aring -120 +KPX Tcaron Atilde -120 +KPX Tcaron O -40 +KPX Tcaron Oacute -40 +KPX Tcaron Ocircumflex -40 +KPX Tcaron Odieresis -40 +KPX Tcaron Ograve -40 +KPX Tcaron Ohungarumlaut -40 +KPX Tcaron Omacron -40 +KPX Tcaron Oslash -40 +KPX Tcaron Otilde -40 +KPX Tcaron a -120 +KPX Tcaron aacute -120 +KPX Tcaron abreve -60 +KPX Tcaron acircumflex -120 +KPX Tcaron adieresis -120 +KPX Tcaron agrave -120 +KPX Tcaron amacron -60 +KPX Tcaron aogonek -120 +KPX Tcaron aring -120 +KPX Tcaron atilde -60 +KPX Tcaron colon -20 +KPX Tcaron comma -120 +KPX Tcaron e -120 +KPX Tcaron eacute -120 +KPX Tcaron ecaron -120 +KPX Tcaron ecircumflex -120 +KPX Tcaron edieresis -120 +KPX Tcaron edotaccent -120 +KPX Tcaron egrave -60 +KPX Tcaron emacron -60 +KPX Tcaron eogonek -120 +KPX Tcaron hyphen -140 +KPX Tcaron o -120 +KPX Tcaron oacute -120 +KPX Tcaron ocircumflex -120 +KPX Tcaron odieresis -120 +KPX Tcaron ograve -120 +KPX Tcaron ohungarumlaut -120 +KPX Tcaron omacron -60 +KPX Tcaron oslash -120 +KPX Tcaron otilde -60 +KPX Tcaron period -120 +KPX Tcaron r -120 +KPX Tcaron racute -120 +KPX Tcaron rcaron -120 +KPX Tcaron rcommaaccent -120 +KPX Tcaron semicolon -20 +KPX Tcaron u -120 +KPX Tcaron uacute -120 +KPX Tcaron ucircumflex -120 +KPX Tcaron udieresis -120 +KPX Tcaron ugrave -120 +KPX Tcaron uhungarumlaut -120 +KPX Tcaron umacron -60 +KPX Tcaron uogonek -120 +KPX Tcaron uring -120 +KPX Tcaron w -120 +KPX Tcaron y -120 +KPX Tcaron yacute -120 +KPX Tcaron ydieresis -60 +KPX Tcommaaccent A -120 +KPX Tcommaaccent Aacute -120 +KPX Tcommaaccent Abreve -120 +KPX Tcommaaccent Acircumflex -120 +KPX Tcommaaccent Adieresis -120 +KPX Tcommaaccent Agrave -120 +KPX Tcommaaccent Amacron -120 +KPX Tcommaaccent Aogonek -120 +KPX Tcommaaccent Aring -120 +KPX Tcommaaccent Atilde -120 +KPX Tcommaaccent O -40 +KPX Tcommaaccent Oacute -40 +KPX Tcommaaccent Ocircumflex -40 +KPX Tcommaaccent Odieresis -40 +KPX Tcommaaccent Ograve -40 +KPX Tcommaaccent Ohungarumlaut -40 +KPX Tcommaaccent Omacron -40 +KPX Tcommaaccent Oslash -40 +KPX Tcommaaccent Otilde -40 +KPX Tcommaaccent a -120 +KPX Tcommaaccent aacute -120 +KPX Tcommaaccent abreve -60 +KPX Tcommaaccent acircumflex -120 +KPX Tcommaaccent adieresis -120 +KPX Tcommaaccent agrave -120 +KPX Tcommaaccent amacron -60 +KPX Tcommaaccent aogonek -120 +KPX Tcommaaccent aring -120 +KPX Tcommaaccent atilde -60 +KPX Tcommaaccent colon -20 +KPX Tcommaaccent comma -120 +KPX Tcommaaccent e -120 +KPX Tcommaaccent eacute -120 +KPX Tcommaaccent ecaron -120 +KPX Tcommaaccent ecircumflex -120 +KPX Tcommaaccent edieresis -120 +KPX Tcommaaccent edotaccent -120 +KPX Tcommaaccent egrave -60 +KPX Tcommaaccent emacron -60 +KPX Tcommaaccent eogonek -120 +KPX Tcommaaccent hyphen -140 +KPX Tcommaaccent o -120 +KPX Tcommaaccent oacute -120 +KPX Tcommaaccent ocircumflex -120 +KPX Tcommaaccent odieresis -120 +KPX Tcommaaccent ograve -120 +KPX Tcommaaccent ohungarumlaut -120 +KPX Tcommaaccent omacron -60 +KPX Tcommaaccent oslash -120 +KPX Tcommaaccent otilde -60 +KPX Tcommaaccent period -120 +KPX Tcommaaccent r -120 +KPX Tcommaaccent racute -120 +KPX Tcommaaccent rcaron -120 +KPX Tcommaaccent rcommaaccent -120 +KPX Tcommaaccent semicolon -20 +KPX Tcommaaccent u -120 +KPX Tcommaaccent uacute -120 +KPX Tcommaaccent ucircumflex -120 +KPX Tcommaaccent udieresis -120 +KPX Tcommaaccent ugrave -120 +KPX Tcommaaccent uhungarumlaut -120 +KPX Tcommaaccent umacron -60 +KPX Tcommaaccent uogonek -120 +KPX Tcommaaccent uring -120 +KPX Tcommaaccent w -120 +KPX Tcommaaccent y -120 +KPX Tcommaaccent yacute -120 +KPX Tcommaaccent ydieresis -60 +KPX U A -40 +KPX U Aacute -40 +KPX U Abreve -40 +KPX U Acircumflex -40 +KPX U Adieresis -40 +KPX U Agrave -40 +KPX U Amacron -40 +KPX U Aogonek -40 +KPX U Aring -40 +KPX U Atilde -40 +KPX U comma -40 +KPX U period -40 +KPX Uacute A -40 +KPX Uacute Aacute -40 +KPX Uacute Abreve -40 +KPX Uacute Acircumflex -40 +KPX Uacute Adieresis -40 +KPX Uacute Agrave -40 +KPX Uacute Amacron -40 +KPX Uacute Aogonek -40 +KPX Uacute Aring -40 +KPX Uacute Atilde -40 +KPX Uacute comma -40 +KPX Uacute period -40 +KPX Ucircumflex A -40 +KPX Ucircumflex Aacute -40 +KPX Ucircumflex Abreve -40 +KPX Ucircumflex Acircumflex -40 +KPX Ucircumflex Adieresis -40 +KPX Ucircumflex Agrave -40 +KPX Ucircumflex Amacron -40 +KPX Ucircumflex Aogonek -40 +KPX Ucircumflex Aring -40 +KPX Ucircumflex Atilde -40 +KPX Ucircumflex comma -40 +KPX Ucircumflex period -40 +KPX Udieresis A -40 +KPX Udieresis Aacute -40 +KPX Udieresis Abreve -40 +KPX Udieresis Acircumflex -40 +KPX Udieresis Adieresis -40 +KPX Udieresis Agrave -40 +KPX Udieresis Amacron -40 +KPX Udieresis Aogonek -40 +KPX Udieresis Aring -40 +KPX Udieresis Atilde -40 +KPX Udieresis comma -40 +KPX Udieresis period -40 +KPX Ugrave A -40 +KPX Ugrave Aacute -40 +KPX Ugrave Abreve -40 +KPX Ugrave Acircumflex -40 +KPX Ugrave Adieresis -40 +KPX Ugrave Agrave -40 +KPX Ugrave Amacron -40 +KPX Ugrave Aogonek -40 +KPX Ugrave Aring -40 +KPX Ugrave Atilde -40 +KPX Ugrave comma -40 +KPX Ugrave period -40 +KPX Uhungarumlaut A -40 +KPX Uhungarumlaut Aacute -40 +KPX Uhungarumlaut Abreve -40 +KPX Uhungarumlaut Acircumflex -40 +KPX Uhungarumlaut Adieresis -40 +KPX Uhungarumlaut Agrave -40 +KPX Uhungarumlaut Amacron -40 +KPX Uhungarumlaut Aogonek -40 +KPX Uhungarumlaut Aring -40 +KPX Uhungarumlaut Atilde -40 +KPX Uhungarumlaut comma -40 +KPX Uhungarumlaut period -40 +KPX Umacron A -40 +KPX Umacron Aacute -40 +KPX Umacron Abreve -40 +KPX Umacron Acircumflex -40 +KPX Umacron Adieresis -40 +KPX Umacron Agrave -40 +KPX Umacron Amacron -40 +KPX Umacron Aogonek -40 +KPX Umacron Aring -40 +KPX Umacron Atilde -40 +KPX Umacron comma -40 +KPX Umacron period -40 +KPX Uogonek A -40 +KPX Uogonek Aacute -40 +KPX Uogonek Abreve -40 +KPX Uogonek Acircumflex -40 +KPX Uogonek Adieresis -40 +KPX Uogonek Agrave -40 +KPX Uogonek Amacron -40 +KPX Uogonek Aogonek -40 +KPX Uogonek Aring -40 +KPX Uogonek Atilde -40 +KPX Uogonek comma -40 +KPX Uogonek period -40 +KPX Uring A -40 +KPX Uring Aacute -40 +KPX Uring Abreve -40 +KPX Uring Acircumflex -40 +KPX Uring Adieresis -40 +KPX Uring Agrave -40 +KPX Uring Amacron -40 +KPX Uring Aogonek -40 +KPX Uring Aring -40 +KPX Uring Atilde -40 +KPX Uring comma -40 +KPX Uring period -40 +KPX V A -80 +KPX V Aacute -80 +KPX V Abreve -80 +KPX V Acircumflex -80 +KPX V Adieresis -80 +KPX V Agrave -80 +KPX V Amacron -80 +KPX V Aogonek -80 +KPX V Aring -80 +KPX V Atilde -80 +KPX V G -40 +KPX V Gbreve -40 +KPX V Gcommaaccent -40 +KPX V O -40 +KPX V Oacute -40 +KPX V Ocircumflex -40 +KPX V Odieresis -40 +KPX V Ograve -40 +KPX V Ohungarumlaut -40 +KPX V Omacron -40 +KPX V Oslash -40 +KPX V Otilde -40 +KPX V a -70 +KPX V aacute -70 +KPX V abreve -70 +KPX V acircumflex -70 +KPX V adieresis -70 +KPX V agrave -70 +KPX V amacron -70 +KPX V aogonek -70 +KPX V aring -70 +KPX V atilde -70 +KPX V colon -40 +KPX V comma -125 +KPX V e -80 +KPX V eacute -80 +KPX V ecaron -80 +KPX V ecircumflex -80 +KPX V edieresis -80 +KPX V edotaccent -80 +KPX V egrave -80 +KPX V emacron -80 +KPX V eogonek -80 +KPX V hyphen -80 +KPX V o -80 +KPX V oacute -80 +KPX V ocircumflex -80 +KPX V odieresis -80 +KPX V ograve -80 +KPX V ohungarumlaut -80 +KPX V omacron -80 +KPX V oslash -80 +KPX V otilde -80 +KPX V period -125 +KPX V semicolon -40 +KPX V u -70 +KPX V uacute -70 +KPX V ucircumflex -70 +KPX V udieresis -70 +KPX V ugrave -70 +KPX V uhungarumlaut -70 +KPX V umacron -70 +KPX V uogonek -70 +KPX V uring -70 +KPX W A -50 +KPX W Aacute -50 +KPX W Abreve -50 +KPX W Acircumflex -50 +KPX W Adieresis -50 +KPX W Agrave -50 +KPX W Amacron -50 +KPX W Aogonek -50 +KPX W Aring -50 +KPX W Atilde -50 +KPX W O -20 +KPX W Oacute -20 +KPX W Ocircumflex -20 +KPX W Odieresis -20 +KPX W Ograve -20 +KPX W Ohungarumlaut -20 +KPX W Omacron -20 +KPX W Oslash -20 +KPX W Otilde -20 +KPX W a -40 +KPX W aacute -40 +KPX W abreve -40 +KPX W acircumflex -40 +KPX W adieresis -40 +KPX W agrave -40 +KPX W amacron -40 +KPX W aogonek -40 +KPX W aring -40 +KPX W atilde -40 +KPX W comma -80 +KPX W e -30 +KPX W eacute -30 +KPX W ecaron -30 +KPX W ecircumflex -30 +KPX W edieresis -30 +KPX W edotaccent -30 +KPX W egrave -30 +KPX W emacron -30 +KPX W eogonek -30 +KPX W hyphen -40 +KPX W o -30 +KPX W oacute -30 +KPX W ocircumflex -30 +KPX W odieresis -30 +KPX W ograve -30 +KPX W ohungarumlaut -30 +KPX W omacron -30 +KPX W oslash -30 +KPX W otilde -30 +KPX W period -80 +KPX W u -30 +KPX W uacute -30 +KPX W ucircumflex -30 +KPX W udieresis -30 +KPX W ugrave -30 +KPX W uhungarumlaut -30 +KPX W umacron -30 +KPX W uogonek -30 +KPX W uring -30 +KPX W y -20 +KPX W yacute -20 +KPX W ydieresis -20 +KPX Y A -110 +KPX Y Aacute -110 +KPX Y Abreve -110 +KPX Y Acircumflex -110 +KPX Y Adieresis -110 +KPX Y Agrave -110 +KPX Y Amacron -110 +KPX Y Aogonek -110 +KPX Y Aring -110 +KPX Y Atilde -110 +KPX Y O -85 +KPX Y Oacute -85 +KPX Y Ocircumflex -85 +KPX Y Odieresis -85 +KPX Y Ograve -85 +KPX Y Ohungarumlaut -85 +KPX Y Omacron -85 +KPX Y Oslash -85 +KPX Y Otilde -85 +KPX Y a -140 +KPX Y aacute -140 +KPX Y abreve -70 +KPX Y acircumflex -140 +KPX Y adieresis -140 +KPX Y agrave -140 +KPX Y amacron -70 +KPX Y aogonek -140 +KPX Y aring -140 +KPX Y atilde -140 +KPX Y colon -60 +KPX Y comma -140 +KPX Y e -140 +KPX Y eacute -140 +KPX Y ecaron -140 +KPX Y ecircumflex -140 +KPX Y edieresis -140 +KPX Y edotaccent -140 +KPX Y egrave -140 +KPX Y emacron -70 +KPX Y eogonek -140 +KPX Y hyphen -140 +KPX Y i -20 +KPX Y iacute -20 +KPX Y iogonek -20 +KPX Y o -140 +KPX Y oacute -140 +KPX Y ocircumflex -140 +KPX Y odieresis -140 +KPX Y ograve -140 +KPX Y ohungarumlaut -140 +KPX Y omacron -140 +KPX Y oslash -140 +KPX Y otilde -140 +KPX Y period -140 +KPX Y semicolon -60 +KPX Y u -110 +KPX Y uacute -110 +KPX Y ucircumflex -110 +KPX Y udieresis -110 +KPX Y ugrave -110 +KPX Y uhungarumlaut -110 +KPX Y umacron -110 +KPX Y uogonek -110 +KPX Y uring -110 +KPX Yacute A -110 +KPX Yacute Aacute -110 +KPX Yacute Abreve -110 +KPX Yacute Acircumflex -110 +KPX Yacute Adieresis -110 +KPX Yacute Agrave -110 +KPX Yacute Amacron -110 +KPX Yacute Aogonek -110 +KPX Yacute Aring -110 +KPX Yacute Atilde -110 +KPX Yacute O -85 +KPX Yacute Oacute -85 +KPX Yacute Ocircumflex -85 +KPX Yacute Odieresis -85 +KPX Yacute Ograve -85 +KPX Yacute Ohungarumlaut -85 +KPX Yacute Omacron -85 +KPX Yacute Oslash -85 +KPX Yacute Otilde -85 +KPX Yacute a -140 +KPX Yacute aacute -140 +KPX Yacute abreve -70 +KPX Yacute acircumflex -140 +KPX Yacute adieresis -140 +KPX Yacute agrave -140 +KPX Yacute amacron -70 +KPX Yacute aogonek -140 +KPX Yacute aring -140 +KPX Yacute atilde -70 +KPX Yacute colon -60 +KPX Yacute comma -140 +KPX Yacute e -140 +KPX Yacute eacute -140 +KPX Yacute ecaron -140 +KPX Yacute ecircumflex -140 +KPX Yacute edieresis -140 +KPX Yacute edotaccent -140 +KPX Yacute egrave -140 +KPX Yacute emacron -70 +KPX Yacute eogonek -140 +KPX Yacute hyphen -140 +KPX Yacute i -20 +KPX Yacute iacute -20 +KPX Yacute iogonek -20 +KPX Yacute o -140 +KPX Yacute oacute -140 +KPX Yacute ocircumflex -140 +KPX Yacute odieresis -140 +KPX Yacute ograve -140 +KPX Yacute ohungarumlaut -140 +KPX Yacute omacron -70 +KPX Yacute oslash -140 +KPX Yacute otilde -140 +KPX Yacute period -140 +KPX Yacute semicolon -60 +KPX Yacute u -110 +KPX Yacute uacute -110 +KPX Yacute ucircumflex -110 +KPX Yacute udieresis -110 +KPX Yacute ugrave -110 +KPX Yacute uhungarumlaut -110 +KPX Yacute umacron -110 +KPX Yacute uogonek -110 +KPX Yacute uring -110 +KPX Ydieresis A -110 +KPX Ydieresis Aacute -110 +KPX Ydieresis Abreve -110 +KPX Ydieresis Acircumflex -110 +KPX Ydieresis Adieresis -110 +KPX Ydieresis Agrave -110 +KPX Ydieresis Amacron -110 +KPX Ydieresis Aogonek -110 +KPX Ydieresis Aring -110 +KPX Ydieresis Atilde -110 +KPX Ydieresis O -85 +KPX Ydieresis Oacute -85 +KPX Ydieresis Ocircumflex -85 +KPX Ydieresis Odieresis -85 +KPX Ydieresis Ograve -85 +KPX Ydieresis Ohungarumlaut -85 +KPX Ydieresis Omacron -85 +KPX Ydieresis Oslash -85 +KPX Ydieresis Otilde -85 +KPX Ydieresis a -140 +KPX Ydieresis aacute -140 +KPX Ydieresis abreve -70 +KPX Ydieresis acircumflex -140 +KPX Ydieresis adieresis -140 +KPX Ydieresis agrave -140 +KPX Ydieresis amacron -70 +KPX Ydieresis aogonek -140 +KPX Ydieresis aring -140 +KPX Ydieresis atilde -70 +KPX Ydieresis colon -60 +KPX Ydieresis comma -140 +KPX Ydieresis e -140 +KPX Ydieresis eacute -140 +KPX Ydieresis ecaron -140 +KPX Ydieresis ecircumflex -140 +KPX Ydieresis edieresis -140 +KPX Ydieresis edotaccent -140 +KPX Ydieresis egrave -140 +KPX Ydieresis emacron -70 +KPX Ydieresis eogonek -140 +KPX Ydieresis hyphen -140 +KPX Ydieresis i -20 +KPX Ydieresis iacute -20 +KPX Ydieresis iogonek -20 +KPX Ydieresis o -140 +KPX Ydieresis oacute -140 +KPX Ydieresis ocircumflex -140 +KPX Ydieresis odieresis -140 +KPX Ydieresis ograve -140 +KPX Ydieresis ohungarumlaut -140 +KPX Ydieresis omacron -140 +KPX Ydieresis oslash -140 +KPX Ydieresis otilde -140 +KPX Ydieresis period -140 +KPX Ydieresis semicolon -60 +KPX Ydieresis u -110 +KPX Ydieresis uacute -110 +KPX Ydieresis ucircumflex -110 +KPX Ydieresis udieresis -110 +KPX Ydieresis ugrave -110 +KPX Ydieresis uhungarumlaut -110 +KPX Ydieresis umacron -110 +KPX Ydieresis uogonek -110 +KPX Ydieresis uring -110 +KPX a v -20 +KPX a w -20 +KPX a y -30 +KPX a yacute -30 +KPX a ydieresis -30 +KPX aacute v -20 +KPX aacute w -20 +KPX aacute y -30 +KPX aacute yacute -30 +KPX aacute ydieresis -30 +KPX abreve v -20 +KPX abreve w -20 +KPX abreve y -30 +KPX abreve yacute -30 +KPX abreve ydieresis -30 +KPX acircumflex v -20 +KPX acircumflex w -20 +KPX acircumflex y -30 +KPX acircumflex yacute -30 +KPX acircumflex ydieresis -30 +KPX adieresis v -20 +KPX adieresis w -20 +KPX adieresis y -30 +KPX adieresis yacute -30 +KPX adieresis ydieresis -30 +KPX agrave v -20 +KPX agrave w -20 +KPX agrave y -30 +KPX agrave yacute -30 +KPX agrave ydieresis -30 +KPX amacron v -20 +KPX amacron w -20 +KPX amacron y -30 +KPX amacron yacute -30 +KPX amacron ydieresis -30 +KPX aogonek v -20 +KPX aogonek w -20 +KPX aogonek y -30 +KPX aogonek yacute -30 +KPX aogonek ydieresis -30 +KPX aring v -20 +KPX aring w -20 +KPX aring y -30 +KPX aring yacute -30 +KPX aring ydieresis -30 +KPX atilde v -20 +KPX atilde w -20 +KPX atilde y -30 +KPX atilde yacute -30 +KPX atilde ydieresis -30 +KPX b b -10 +KPX b comma -40 +KPX b l -20 +KPX b lacute -20 +KPX b lcommaaccent -20 +KPX b lslash -20 +KPX b period -40 +KPX b u -20 +KPX b uacute -20 +KPX b ucircumflex -20 +KPX b udieresis -20 +KPX b ugrave -20 +KPX b uhungarumlaut -20 +KPX b umacron -20 +KPX b uogonek -20 +KPX b uring -20 +KPX b v -20 +KPX b y -20 +KPX b yacute -20 +KPX b ydieresis -20 +KPX c comma -15 +KPX c k -20 +KPX c kcommaaccent -20 +KPX cacute comma -15 +KPX cacute k -20 +KPX cacute kcommaaccent -20 +KPX ccaron comma -15 +KPX ccaron k -20 +KPX ccaron kcommaaccent -20 +KPX ccedilla comma -15 +KPX ccedilla k -20 +KPX ccedilla kcommaaccent -20 +KPX colon space -50 +KPX comma quotedblright -100 +KPX comma quoteright -100 +KPX e comma -15 +KPX e period -15 +KPX e v -30 +KPX e w -20 +KPX e x -30 +KPX e y -20 +KPX e yacute -20 +KPX e ydieresis -20 +KPX eacute comma -15 +KPX eacute period -15 +KPX eacute v -30 +KPX eacute w -20 +KPX eacute x -30 +KPX eacute y -20 +KPX eacute yacute -20 +KPX eacute ydieresis -20 +KPX ecaron comma -15 +KPX ecaron period -15 +KPX ecaron v -30 +KPX ecaron w -20 +KPX ecaron x -30 +KPX ecaron y -20 +KPX ecaron yacute -20 +KPX ecaron ydieresis -20 +KPX ecircumflex comma -15 +KPX ecircumflex period -15 +KPX ecircumflex v -30 +KPX ecircumflex w -20 +KPX ecircumflex x -30 +KPX ecircumflex y -20 +KPX ecircumflex yacute -20 +KPX ecircumflex ydieresis -20 +KPX edieresis comma -15 +KPX edieresis period -15 +KPX edieresis v -30 +KPX edieresis w -20 +KPX edieresis x -30 +KPX edieresis y -20 +KPX edieresis yacute -20 +KPX edieresis ydieresis -20 +KPX edotaccent comma -15 +KPX edotaccent period -15 +KPX edotaccent v -30 +KPX edotaccent w -20 +KPX edotaccent x -30 +KPX edotaccent y -20 +KPX edotaccent yacute -20 +KPX edotaccent ydieresis -20 +KPX egrave comma -15 +KPX egrave period -15 +KPX egrave v -30 +KPX egrave w -20 +KPX egrave x -30 +KPX egrave y -20 +KPX egrave yacute -20 +KPX egrave ydieresis -20 +KPX emacron comma -15 +KPX emacron period -15 +KPX emacron v -30 +KPX emacron w -20 +KPX emacron x -30 +KPX emacron y -20 +KPX emacron yacute -20 +KPX emacron ydieresis -20 +KPX eogonek comma -15 +KPX eogonek period -15 +KPX eogonek v -30 +KPX eogonek w -20 +KPX eogonek x -30 +KPX eogonek y -20 +KPX eogonek yacute -20 +KPX eogonek ydieresis -20 +KPX f a -30 +KPX f aacute -30 +KPX f abreve -30 +KPX f acircumflex -30 +KPX f adieresis -30 +KPX f agrave -30 +KPX f amacron -30 +KPX f aogonek -30 +KPX f aring -30 +KPX f atilde -30 +KPX f comma -30 +KPX f dotlessi -28 +KPX f e -30 +KPX f eacute -30 +KPX f ecaron -30 +KPX f ecircumflex -30 +KPX f edieresis -30 +KPX f edotaccent -30 +KPX f egrave -30 +KPX f emacron -30 +KPX f eogonek -30 +KPX f o -30 +KPX f oacute -30 +KPX f ocircumflex -30 +KPX f odieresis -30 +KPX f ograve -30 +KPX f ohungarumlaut -30 +KPX f omacron -30 +KPX f oslash -30 +KPX f otilde -30 +KPX f period -30 +KPX f quotedblright 60 +KPX f quoteright 50 +KPX g r -10 +KPX g racute -10 +KPX g rcaron -10 +KPX g rcommaaccent -10 +KPX gbreve r -10 +KPX gbreve racute -10 +KPX gbreve rcaron -10 +KPX gbreve rcommaaccent -10 +KPX gcommaaccent r -10 +KPX gcommaaccent racute -10 +KPX gcommaaccent rcaron -10 +KPX gcommaaccent rcommaaccent -10 +KPX h y -30 +KPX h yacute -30 +KPX h ydieresis -30 +KPX k e -20 +KPX k eacute -20 +KPX k ecaron -20 +KPX k ecircumflex -20 +KPX k edieresis -20 +KPX k edotaccent -20 +KPX k egrave -20 +KPX k emacron -20 +KPX k eogonek -20 +KPX k o -20 +KPX k oacute -20 +KPX k ocircumflex -20 +KPX k odieresis -20 +KPX k ograve -20 +KPX k ohungarumlaut -20 +KPX k omacron -20 +KPX k oslash -20 +KPX k otilde -20 +KPX kcommaaccent e -20 +KPX kcommaaccent eacute -20 +KPX kcommaaccent ecaron -20 +KPX kcommaaccent ecircumflex -20 +KPX kcommaaccent edieresis -20 +KPX kcommaaccent edotaccent -20 +KPX kcommaaccent egrave -20 +KPX kcommaaccent emacron -20 +KPX kcommaaccent eogonek -20 +KPX kcommaaccent o -20 +KPX kcommaaccent oacute -20 +KPX kcommaaccent ocircumflex -20 +KPX kcommaaccent odieresis -20 +KPX kcommaaccent ograve -20 +KPX kcommaaccent ohungarumlaut -20 +KPX kcommaaccent omacron -20 +KPX kcommaaccent oslash -20 +KPX kcommaaccent otilde -20 +KPX m u -10 +KPX m uacute -10 +KPX m ucircumflex -10 +KPX m udieresis -10 +KPX m ugrave -10 +KPX m uhungarumlaut -10 +KPX m umacron -10 +KPX m uogonek -10 +KPX m uring -10 +KPX m y -15 +KPX m yacute -15 +KPX m ydieresis -15 +KPX n u -10 +KPX n uacute -10 +KPX n ucircumflex -10 +KPX n udieresis -10 +KPX n ugrave -10 +KPX n uhungarumlaut -10 +KPX n umacron -10 +KPX n uogonek -10 +KPX n uring -10 +KPX n v -20 +KPX n y -15 +KPX n yacute -15 +KPX n ydieresis -15 +KPX nacute u -10 +KPX nacute uacute -10 +KPX nacute ucircumflex -10 +KPX nacute udieresis -10 +KPX nacute ugrave -10 +KPX nacute uhungarumlaut -10 +KPX nacute umacron -10 +KPX nacute uogonek -10 +KPX nacute uring -10 +KPX nacute v -20 +KPX nacute y -15 +KPX nacute yacute -15 +KPX nacute ydieresis -15 +KPX ncaron u -10 +KPX ncaron uacute -10 +KPX ncaron ucircumflex -10 +KPX ncaron udieresis -10 +KPX ncaron ugrave -10 +KPX ncaron uhungarumlaut -10 +KPX ncaron umacron -10 +KPX ncaron uogonek -10 +KPX ncaron uring -10 +KPX ncaron v -20 +KPX ncaron y -15 +KPX ncaron yacute -15 +KPX ncaron ydieresis -15 +KPX ncommaaccent u -10 +KPX ncommaaccent uacute -10 +KPX ncommaaccent ucircumflex -10 +KPX ncommaaccent udieresis -10 +KPX ncommaaccent ugrave -10 +KPX ncommaaccent uhungarumlaut -10 +KPX ncommaaccent umacron -10 +KPX ncommaaccent uogonek -10 +KPX ncommaaccent uring -10 +KPX ncommaaccent v -20 +KPX ncommaaccent y -15 +KPX ncommaaccent yacute -15 +KPX ncommaaccent ydieresis -15 +KPX ntilde u -10 +KPX ntilde uacute -10 +KPX ntilde ucircumflex -10 +KPX ntilde udieresis -10 +KPX ntilde ugrave -10 +KPX ntilde uhungarumlaut -10 +KPX ntilde umacron -10 +KPX ntilde uogonek -10 +KPX ntilde uring -10 +KPX ntilde v -20 +KPX ntilde y -15 +KPX ntilde yacute -15 +KPX ntilde ydieresis -15 +KPX o comma -40 +KPX o period -40 +KPX o v -15 +KPX o w -15 +KPX o x -30 +KPX o y -30 +KPX o yacute -30 +KPX o ydieresis -30 +KPX oacute comma -40 +KPX oacute period -40 +KPX oacute v -15 +KPX oacute w -15 +KPX oacute x -30 +KPX oacute y -30 +KPX oacute yacute -30 +KPX oacute ydieresis -30 +KPX ocircumflex comma -40 +KPX ocircumflex period -40 +KPX ocircumflex v -15 +KPX ocircumflex w -15 +KPX ocircumflex x -30 +KPX ocircumflex y -30 +KPX ocircumflex yacute -30 +KPX ocircumflex ydieresis -30 +KPX odieresis comma -40 +KPX odieresis period -40 +KPX odieresis v -15 +KPX odieresis w -15 +KPX odieresis x -30 +KPX odieresis y -30 +KPX odieresis yacute -30 +KPX odieresis ydieresis -30 +KPX ograve comma -40 +KPX ograve period -40 +KPX ograve v -15 +KPX ograve w -15 +KPX ograve x -30 +KPX ograve y -30 +KPX ograve yacute -30 +KPX ograve ydieresis -30 +KPX ohungarumlaut comma -40 +KPX ohungarumlaut period -40 +KPX ohungarumlaut v -15 +KPX ohungarumlaut w -15 +KPX ohungarumlaut x -30 +KPX ohungarumlaut y -30 +KPX ohungarumlaut yacute -30 +KPX ohungarumlaut ydieresis -30 +KPX omacron comma -40 +KPX omacron period -40 +KPX omacron v -15 +KPX omacron w -15 +KPX omacron x -30 +KPX omacron y -30 +KPX omacron yacute -30 +KPX omacron ydieresis -30 +KPX oslash a -55 +KPX oslash aacute -55 +KPX oslash abreve -55 +KPX oslash acircumflex -55 +KPX oslash adieresis -55 +KPX oslash agrave -55 +KPX oslash amacron -55 +KPX oslash aogonek -55 +KPX oslash aring -55 +KPX oslash atilde -55 +KPX oslash b -55 +KPX oslash c -55 +KPX oslash cacute -55 +KPX oslash ccaron -55 +KPX oslash ccedilla -55 +KPX oslash comma -95 +KPX oslash d -55 +KPX oslash dcroat -55 +KPX oslash e -55 +KPX oslash eacute -55 +KPX oslash ecaron -55 +KPX oslash ecircumflex -55 +KPX oslash edieresis -55 +KPX oslash edotaccent -55 +KPX oslash egrave -55 +KPX oslash emacron -55 +KPX oslash eogonek -55 +KPX oslash f -55 +KPX oslash g -55 +KPX oslash gbreve -55 +KPX oslash gcommaaccent -55 +KPX oslash h -55 +KPX oslash i -55 +KPX oslash iacute -55 +KPX oslash icircumflex -55 +KPX oslash idieresis -55 +KPX oslash igrave -55 +KPX oslash imacron -55 +KPX oslash iogonek -55 +KPX oslash j -55 +KPX oslash k -55 +KPX oslash kcommaaccent -55 +KPX oslash l -55 +KPX oslash lacute -55 +KPX oslash lcommaaccent -55 +KPX oslash lslash -55 +KPX oslash m -55 +KPX oslash n -55 +KPX oslash nacute -55 +KPX oslash ncaron -55 +KPX oslash ncommaaccent -55 +KPX oslash ntilde -55 +KPX oslash o -55 +KPX oslash oacute -55 +KPX oslash ocircumflex -55 +KPX oslash odieresis -55 +KPX oslash ograve -55 +KPX oslash ohungarumlaut -55 +KPX oslash omacron -55 +KPX oslash oslash -55 +KPX oslash otilde -55 +KPX oslash p -55 +KPX oslash period -95 +KPX oslash q -55 +KPX oslash r -55 +KPX oslash racute -55 +KPX oslash rcaron -55 +KPX oslash rcommaaccent -55 +KPX oslash s -55 +KPX oslash sacute -55 +KPX oslash scaron -55 +KPX oslash scedilla -55 +KPX oslash scommaaccent -55 +KPX oslash t -55 +KPX oslash tcommaaccent -55 +KPX oslash u -55 +KPX oslash uacute -55 +KPX oslash ucircumflex -55 +KPX oslash udieresis -55 +KPX oslash ugrave -55 +KPX oslash uhungarumlaut -55 +KPX oslash umacron -55 +KPX oslash uogonek -55 +KPX oslash uring -55 +KPX oslash v -70 +KPX oslash w -70 +KPX oslash x -85 +KPX oslash y -70 +KPX oslash yacute -70 +KPX oslash ydieresis -70 +KPX oslash z -55 +KPX oslash zacute -55 +KPX oslash zcaron -55 +KPX oslash zdotaccent -55 +KPX otilde comma -40 +KPX otilde period -40 +KPX otilde v -15 +KPX otilde w -15 +KPX otilde x -30 +KPX otilde y -30 +KPX otilde yacute -30 +KPX otilde ydieresis -30 +KPX p comma -35 +KPX p period -35 +KPX p y -30 +KPX p yacute -30 +KPX p ydieresis -30 +KPX period quotedblright -100 +KPX period quoteright -100 +KPX period space -60 +KPX quotedblright space -40 +KPX quoteleft quoteleft -57 +KPX quoteright d -50 +KPX quoteright dcroat -50 +KPX quoteright quoteright -57 +KPX quoteright r -50 +KPX quoteright racute -50 +KPX quoteright rcaron -50 +KPX quoteright rcommaaccent -50 +KPX quoteright s -50 +KPX quoteright sacute -50 +KPX quoteright scaron -50 +KPX quoteright scedilla -50 +KPX quoteright scommaaccent -50 +KPX quoteright space -70 +KPX r a -10 +KPX r aacute -10 +KPX r abreve -10 +KPX r acircumflex -10 +KPX r adieresis -10 +KPX r agrave -10 +KPX r amacron -10 +KPX r aogonek -10 +KPX r aring -10 +KPX r atilde -10 +KPX r colon 30 +KPX r comma -50 +KPX r i 15 +KPX r iacute 15 +KPX r icircumflex 15 +KPX r idieresis 15 +KPX r igrave 15 +KPX r imacron 15 +KPX r iogonek 15 +KPX r k 15 +KPX r kcommaaccent 15 +KPX r l 15 +KPX r lacute 15 +KPX r lcommaaccent 15 +KPX r lslash 15 +KPX r m 25 +KPX r n 25 +KPX r nacute 25 +KPX r ncaron 25 +KPX r ncommaaccent 25 +KPX r ntilde 25 +KPX r p 30 +KPX r period -50 +KPX r semicolon 30 +KPX r t 40 +KPX r tcommaaccent 40 +KPX r u 15 +KPX r uacute 15 +KPX r ucircumflex 15 +KPX r udieresis 15 +KPX r ugrave 15 +KPX r uhungarumlaut 15 +KPX r umacron 15 +KPX r uogonek 15 +KPX r uring 15 +KPX r v 30 +KPX r y 30 +KPX r yacute 30 +KPX r ydieresis 30 +KPX racute a -10 +KPX racute aacute -10 +KPX racute abreve -10 +KPX racute acircumflex -10 +KPX racute adieresis -10 +KPX racute agrave -10 +KPX racute amacron -10 +KPX racute aogonek -10 +KPX racute aring -10 +KPX racute atilde -10 +KPX racute colon 30 +KPX racute comma -50 +KPX racute i 15 +KPX racute iacute 15 +KPX racute icircumflex 15 +KPX racute idieresis 15 +KPX racute igrave 15 +KPX racute imacron 15 +KPX racute iogonek 15 +KPX racute k 15 +KPX racute kcommaaccent 15 +KPX racute l 15 +KPX racute lacute 15 +KPX racute lcommaaccent 15 +KPX racute lslash 15 +KPX racute m 25 +KPX racute n 25 +KPX racute nacute 25 +KPX racute ncaron 25 +KPX racute ncommaaccent 25 +KPX racute ntilde 25 +KPX racute p 30 +KPX racute period -50 +KPX racute semicolon 30 +KPX racute t 40 +KPX racute tcommaaccent 40 +KPX racute u 15 +KPX racute uacute 15 +KPX racute ucircumflex 15 +KPX racute udieresis 15 +KPX racute ugrave 15 +KPX racute uhungarumlaut 15 +KPX racute umacron 15 +KPX racute uogonek 15 +KPX racute uring 15 +KPX racute v 30 +KPX racute y 30 +KPX racute yacute 30 +KPX racute ydieresis 30 +KPX rcaron a -10 +KPX rcaron aacute -10 +KPX rcaron abreve -10 +KPX rcaron acircumflex -10 +KPX rcaron adieresis -10 +KPX rcaron agrave -10 +KPX rcaron amacron -10 +KPX rcaron aogonek -10 +KPX rcaron aring -10 +KPX rcaron atilde -10 +KPX rcaron colon 30 +KPX rcaron comma -50 +KPX rcaron i 15 +KPX rcaron iacute 15 +KPX rcaron icircumflex 15 +KPX rcaron idieresis 15 +KPX rcaron igrave 15 +KPX rcaron imacron 15 +KPX rcaron iogonek 15 +KPX rcaron k 15 +KPX rcaron kcommaaccent 15 +KPX rcaron l 15 +KPX rcaron lacute 15 +KPX rcaron lcommaaccent 15 +KPX rcaron lslash 15 +KPX rcaron m 25 +KPX rcaron n 25 +KPX rcaron nacute 25 +KPX rcaron ncaron 25 +KPX rcaron ncommaaccent 25 +KPX rcaron ntilde 25 +KPX rcaron p 30 +KPX rcaron period -50 +KPX rcaron semicolon 30 +KPX rcaron t 40 +KPX rcaron tcommaaccent 40 +KPX rcaron u 15 +KPX rcaron uacute 15 +KPX rcaron ucircumflex 15 +KPX rcaron udieresis 15 +KPX rcaron ugrave 15 +KPX rcaron uhungarumlaut 15 +KPX rcaron umacron 15 +KPX rcaron uogonek 15 +KPX rcaron uring 15 +KPX rcaron v 30 +KPX rcaron y 30 +KPX rcaron yacute 30 +KPX rcaron ydieresis 30 +KPX rcommaaccent a -10 +KPX rcommaaccent aacute -10 +KPX rcommaaccent abreve -10 +KPX rcommaaccent acircumflex -10 +KPX rcommaaccent adieresis -10 +KPX rcommaaccent agrave -10 +KPX rcommaaccent amacron -10 +KPX rcommaaccent aogonek -10 +KPX rcommaaccent aring -10 +KPX rcommaaccent atilde -10 +KPX rcommaaccent colon 30 +KPX rcommaaccent comma -50 +KPX rcommaaccent i 15 +KPX rcommaaccent iacute 15 +KPX rcommaaccent icircumflex 15 +KPX rcommaaccent idieresis 15 +KPX rcommaaccent igrave 15 +KPX rcommaaccent imacron 15 +KPX rcommaaccent iogonek 15 +KPX rcommaaccent k 15 +KPX rcommaaccent kcommaaccent 15 +KPX rcommaaccent l 15 +KPX rcommaaccent lacute 15 +KPX rcommaaccent lcommaaccent 15 +KPX rcommaaccent lslash 15 +KPX rcommaaccent m 25 +KPX rcommaaccent n 25 +KPX rcommaaccent nacute 25 +KPX rcommaaccent ncaron 25 +KPX rcommaaccent ncommaaccent 25 +KPX rcommaaccent ntilde 25 +KPX rcommaaccent p 30 +KPX rcommaaccent period -50 +KPX rcommaaccent semicolon 30 +KPX rcommaaccent t 40 +KPX rcommaaccent tcommaaccent 40 +KPX rcommaaccent u 15 +KPX rcommaaccent uacute 15 +KPX rcommaaccent ucircumflex 15 +KPX rcommaaccent udieresis 15 +KPX rcommaaccent ugrave 15 +KPX rcommaaccent uhungarumlaut 15 +KPX rcommaaccent umacron 15 +KPX rcommaaccent uogonek 15 +KPX rcommaaccent uring 15 +KPX rcommaaccent v 30 +KPX rcommaaccent y 30 +KPX rcommaaccent yacute 30 +KPX rcommaaccent ydieresis 30 +KPX s comma -15 +KPX s period -15 +KPX s w -30 +KPX sacute comma -15 +KPX sacute period -15 +KPX sacute w -30 +KPX scaron comma -15 +KPX scaron period -15 +KPX scaron w -30 +KPX scedilla comma -15 +KPX scedilla period -15 +KPX scedilla w -30 +KPX scommaaccent comma -15 +KPX scommaaccent period -15 +KPX scommaaccent w -30 +KPX semicolon space -50 +KPX space T -50 +KPX space Tcaron -50 +KPX space Tcommaaccent -50 +KPX space V -50 +KPX space W -40 +KPX space Y -90 +KPX space Yacute -90 +KPX space Ydieresis -90 +KPX space quotedblleft -30 +KPX space quoteleft -60 +KPX v a -25 +KPX v aacute -25 +KPX v abreve -25 +KPX v acircumflex -25 +KPX v adieresis -25 +KPX v agrave -25 +KPX v amacron -25 +KPX v aogonek -25 +KPX v aring -25 +KPX v atilde -25 +KPX v comma -80 +KPX v e -25 +KPX v eacute -25 +KPX v ecaron -25 +KPX v ecircumflex -25 +KPX v edieresis -25 +KPX v edotaccent -25 +KPX v egrave -25 +KPX v emacron -25 +KPX v eogonek -25 +KPX v o -25 +KPX v oacute -25 +KPX v ocircumflex -25 +KPX v odieresis -25 +KPX v ograve -25 +KPX v ohungarumlaut -25 +KPX v omacron -25 +KPX v oslash -25 +KPX v otilde -25 +KPX v period -80 +KPX w a -15 +KPX w aacute -15 +KPX w abreve -15 +KPX w acircumflex -15 +KPX w adieresis -15 +KPX w agrave -15 +KPX w amacron -15 +KPX w aogonek -15 +KPX w aring -15 +KPX w atilde -15 +KPX w comma -60 +KPX w e -10 +KPX w eacute -10 +KPX w ecaron -10 +KPX w ecircumflex -10 +KPX w edieresis -10 +KPX w edotaccent -10 +KPX w egrave -10 +KPX w emacron -10 +KPX w eogonek -10 +KPX w o -10 +KPX w oacute -10 +KPX w ocircumflex -10 +KPX w odieresis -10 +KPX w ograve -10 +KPX w ohungarumlaut -10 +KPX w omacron -10 +KPX w oslash -10 +KPX w otilde -10 +KPX w period -60 +KPX x e -30 +KPX x eacute -30 +KPX x ecaron -30 +KPX x ecircumflex -30 +KPX x edieresis -30 +KPX x edotaccent -30 +KPX x egrave -30 +KPX x emacron -30 +KPX x eogonek -30 +KPX y a -20 +KPX y aacute -20 +KPX y abreve -20 +KPX y acircumflex -20 +KPX y adieresis -20 +KPX y agrave -20 +KPX y amacron -20 +KPX y aogonek -20 +KPX y aring -20 +KPX y atilde -20 +KPX y comma -100 +KPX y e -20 +KPX y eacute -20 +KPX y ecaron -20 +KPX y ecircumflex -20 +KPX y edieresis -20 +KPX y edotaccent -20 +KPX y egrave -20 +KPX y emacron -20 +KPX y eogonek -20 +KPX y o -20 +KPX y oacute -20 +KPX y ocircumflex -20 +KPX y odieresis -20 +KPX y ograve -20 +KPX y ohungarumlaut -20 +KPX y omacron -20 +KPX y oslash -20 +KPX y otilde -20 +KPX y period -100 +KPX yacute a -20 +KPX yacute aacute -20 +KPX yacute abreve -20 +KPX yacute acircumflex -20 +KPX yacute adieresis -20 +KPX yacute agrave -20 +KPX yacute amacron -20 +KPX yacute aogonek -20 +KPX yacute aring -20 +KPX yacute atilde -20 +KPX yacute comma -100 +KPX yacute e -20 +KPX yacute eacute -20 +KPX yacute ecaron -20 +KPX yacute ecircumflex -20 +KPX yacute edieresis -20 +KPX yacute edotaccent -20 +KPX yacute egrave -20 +KPX yacute emacron -20 +KPX yacute eogonek -20 +KPX yacute o -20 +KPX yacute oacute -20 +KPX yacute ocircumflex -20 +KPX yacute odieresis -20 +KPX yacute ograve -20 +KPX yacute ohungarumlaut -20 +KPX yacute omacron -20 +KPX yacute oslash -20 +KPX yacute otilde -20 +KPX yacute period -100 +KPX ydieresis a -20 +KPX ydieresis aacute -20 +KPX ydieresis abreve -20 +KPX ydieresis acircumflex -20 +KPX ydieresis adieresis -20 +KPX ydieresis agrave -20 +KPX ydieresis amacron -20 +KPX ydieresis aogonek -20 +KPX ydieresis aring -20 +KPX ydieresis atilde -20 +KPX ydieresis comma -100 +KPX ydieresis e -20 +KPX ydieresis eacute -20 +KPX ydieresis ecaron -20 +KPX ydieresis ecircumflex -20 +KPX ydieresis edieresis -20 +KPX ydieresis edotaccent -20 +KPX ydieresis egrave -20 +KPX ydieresis emacron -20 +KPX ydieresis eogonek -20 +KPX ydieresis o -20 +KPX ydieresis oacute -20 +KPX ydieresis ocircumflex -20 +KPX ydieresis odieresis -20 +KPX ydieresis ograve -20 +KPX ydieresis ohungarumlaut -20 +KPX ydieresis omacron -20 +KPX ydieresis oslash -20 +KPX ydieresis otilde -20 +KPX ydieresis period -100 +KPX z e -15 +KPX z eacute -15 +KPX z ecaron -15 +KPX z ecircumflex -15 +KPX z edieresis -15 +KPX z edotaccent -15 +KPX z egrave -15 +KPX z emacron -15 +KPX z eogonek -15 +KPX z o -15 +KPX z oacute -15 +KPX z ocircumflex -15 +KPX z odieresis -15 +KPX z ograve -15 +KPX z ohungarumlaut -15 +KPX z omacron -15 +KPX z oslash -15 +KPX z otilde -15 +KPX zacute e -15 +KPX zacute eacute -15 +KPX zacute ecaron -15 +KPX zacute ecircumflex -15 +KPX zacute edieresis -15 +KPX zacute edotaccent -15 +KPX zacute egrave -15 +KPX zacute emacron -15 +KPX zacute eogonek -15 +KPX zacute o -15 +KPX zacute oacute -15 +KPX zacute ocircumflex -15 +KPX zacute odieresis -15 +KPX zacute ograve -15 +KPX zacute ohungarumlaut -15 +KPX zacute omacron -15 +KPX zacute oslash -15 +KPX zacute otilde -15 +KPX zcaron e -15 +KPX zcaron eacute -15 +KPX zcaron ecaron -15 +KPX zcaron ecircumflex -15 +KPX zcaron edieresis -15 +KPX zcaron edotaccent -15 +KPX zcaron egrave -15 +KPX zcaron emacron -15 +KPX zcaron eogonek -15 +KPX zcaron o -15 +KPX zcaron oacute -15 +KPX zcaron ocircumflex -15 +KPX zcaron odieresis -15 +KPX zcaron ograve -15 +KPX zcaron ohungarumlaut -15 +KPX zcaron omacron -15 +KPX zcaron oslash -15 +KPX zcaron otilde -15 +KPX zdotaccent e -15 +KPX zdotaccent eacute -15 +KPX zdotaccent ecaron -15 +KPX zdotaccent ecircumflex -15 +KPX zdotaccent edieresis -15 +KPX zdotaccent edotaccent -15 +KPX zdotaccent egrave -15 +KPX zdotaccent emacron -15 +KPX zdotaccent eogonek -15 +KPX zdotaccent o -15 +KPX zdotaccent oacute -15 +KPX zdotaccent ocircumflex -15 +KPX zdotaccent odieresis -15 +KPX zdotaccent ograve -15 +KPX zdotaccent ohungarumlaut -15 +KPX zdotaccent omacron -15 +KPX zdotaccent oslash -15 +KPX zdotaccent otilde -15 +EndKernPairs +EndKernData +EndFontMetrics diff --git a/pitfall/pdfkit/lib/font/data/Helvetica.afm b/pitfall/pdfkit/lib/font/data/Helvetica.afm new file mode 100755 index 00000000..bd32af54 --- /dev/null +++ b/pitfall/pdfkit/lib/font/data/Helvetica.afm @@ -0,0 +1,3051 @@ +StartFontMetrics 4.1 +Comment Copyright (c) 1985, 1987, 1989, 1990, 1997 Adobe Systems Incorporated. All Rights Reserved. +Comment Creation Date: Thu May 1 12:38:23 1997 +Comment UniqueID 43054 +Comment VMusage 37069 48094 +FontName Helvetica +FullName Helvetica +FamilyName Helvetica +Weight Medium +ItalicAngle 0 +IsFixedPitch false +CharacterSet ExtendedRoman +FontBBox -166 -225 1000 931 +UnderlinePosition -100 +UnderlineThickness 50 +Version 002.000 +Notice Copyright (c) 1985, 1987, 1989, 1990, 1997 Adobe Systems Incorporated. All Rights Reserved.Helvetica is a trademark of Linotype-Hell AG and/or its subsidiaries. +EncodingScheme AdobeStandardEncoding +CapHeight 718 +XHeight 523 +Ascender 718 +Descender -207 +StdHW 76 +StdVW 88 +StartCharMetrics 315 +C 32 ; WX 278 ; N space ; B 0 0 0 0 ; +C 33 ; WX 278 ; N exclam ; B 90 0 187 718 ; +C 34 ; WX 355 ; N quotedbl ; B 70 463 285 718 ; +C 35 ; WX 556 ; N numbersign ; B 28 0 529 688 ; +C 36 ; WX 556 ; N dollar ; B 32 -115 520 775 ; +C 37 ; WX 889 ; N percent ; B 39 -19 850 703 ; +C 38 ; WX 667 ; N ampersand ; B 44 -15 645 718 ; +C 39 ; WX 222 ; N quoteright ; B 53 463 157 718 ; +C 40 ; WX 333 ; N parenleft ; B 68 -207 299 733 ; +C 41 ; WX 333 ; N parenright ; B 34 -207 265 733 ; +C 42 ; WX 389 ; N asterisk ; B 39 431 349 718 ; +C 43 ; WX 584 ; N plus ; B 39 0 545 505 ; +C 44 ; WX 278 ; N comma ; B 87 -147 191 106 ; +C 45 ; WX 333 ; N hyphen ; B 44 232 289 322 ; +C 46 ; WX 278 ; N period ; B 87 0 191 106 ; +C 47 ; WX 278 ; N slash ; B -17 -19 295 737 ; +C 48 ; WX 556 ; N zero ; B 37 -19 519 703 ; +C 49 ; WX 556 ; N one ; B 101 0 359 703 ; +C 50 ; WX 556 ; N two ; B 26 0 507 703 ; +C 51 ; WX 556 ; N three ; B 34 -19 522 703 ; +C 52 ; WX 556 ; N four ; B 25 0 523 703 ; +C 53 ; WX 556 ; N five ; B 32 -19 514 688 ; +C 54 ; WX 556 ; N six ; B 38 -19 518 703 ; +C 55 ; WX 556 ; N seven ; B 37 0 523 688 ; +C 56 ; WX 556 ; N eight ; B 38 -19 517 703 ; +C 57 ; WX 556 ; N nine ; B 42 -19 514 703 ; +C 58 ; WX 278 ; N colon ; B 87 0 191 516 ; +C 59 ; WX 278 ; N semicolon ; B 87 -147 191 516 ; +C 60 ; WX 584 ; N less ; B 48 11 536 495 ; +C 61 ; WX 584 ; N equal ; B 39 115 545 390 ; +C 62 ; WX 584 ; N greater ; B 48 11 536 495 ; +C 63 ; WX 556 ; N question ; B 56 0 492 727 ; +C 64 ; WX 1015 ; N at ; B 147 -19 868 737 ; +C 65 ; WX 667 ; N A ; B 14 0 654 718 ; +C 66 ; WX 667 ; N B ; B 74 0 627 718 ; +C 67 ; WX 722 ; N C ; B 44 -19 681 737 ; +C 68 ; WX 722 ; N D ; B 81 0 674 718 ; +C 69 ; WX 667 ; N E ; B 86 0 616 718 ; +C 70 ; WX 611 ; N F ; B 86 0 583 718 ; +C 71 ; WX 778 ; N G ; B 48 -19 704 737 ; +C 72 ; WX 722 ; N H ; B 77 0 646 718 ; +C 73 ; WX 278 ; N I ; B 91 0 188 718 ; +C 74 ; WX 500 ; N J ; B 17 -19 428 718 ; +C 75 ; WX 667 ; N K ; B 76 0 663 718 ; +C 76 ; WX 556 ; N L ; B 76 0 537 718 ; +C 77 ; WX 833 ; N M ; B 73 0 761 718 ; +C 78 ; WX 722 ; N N ; B 76 0 646 718 ; +C 79 ; WX 778 ; N O ; B 39 -19 739 737 ; +C 80 ; WX 667 ; N P ; B 86 0 622 718 ; +C 81 ; WX 778 ; N Q ; B 39 -56 739 737 ; +C 82 ; WX 722 ; N R ; B 88 0 684 718 ; +C 83 ; WX 667 ; N S ; B 49 -19 620 737 ; +C 84 ; WX 611 ; N T ; B 14 0 597 718 ; +C 85 ; WX 722 ; N U ; B 79 -19 644 718 ; +C 86 ; WX 667 ; N V ; B 20 0 647 718 ; +C 87 ; WX 944 ; N W ; B 16 0 928 718 ; +C 88 ; WX 667 ; N X ; B 19 0 648 718 ; +C 89 ; WX 667 ; N Y ; B 14 0 653 718 ; +C 90 ; WX 611 ; N Z ; B 23 0 588 718 ; +C 91 ; WX 278 ; N bracketleft ; B 63 -196 250 722 ; +C 92 ; WX 278 ; N backslash ; B -17 -19 295 737 ; +C 93 ; WX 278 ; N bracketright ; B 28 -196 215 722 ; +C 94 ; WX 469 ; N asciicircum ; B -14 264 483 688 ; +C 95 ; WX 556 ; N underscore ; B 0 -125 556 -75 ; +C 96 ; WX 222 ; N quoteleft ; B 65 470 169 725 ; +C 97 ; WX 556 ; N a ; B 36 -15 530 538 ; +C 98 ; WX 556 ; N b ; B 58 -15 517 718 ; +C 99 ; WX 500 ; N c ; B 30 -15 477 538 ; +C 100 ; WX 556 ; N d ; B 35 -15 499 718 ; +C 101 ; WX 556 ; N e ; B 40 -15 516 538 ; +C 102 ; WX 278 ; N f ; B 14 0 262 728 ; L i fi ; L l fl ; +C 103 ; WX 556 ; N g ; B 40 -220 499 538 ; +C 104 ; WX 556 ; N h ; B 65 0 491 718 ; +C 105 ; WX 222 ; N i ; B 67 0 155 718 ; +C 106 ; WX 222 ; N j ; B -16 -210 155 718 ; +C 107 ; WX 500 ; N k ; B 67 0 501 718 ; +C 108 ; WX 222 ; N l ; B 67 0 155 718 ; +C 109 ; WX 833 ; N m ; B 65 0 769 538 ; +C 110 ; WX 556 ; N n ; B 65 0 491 538 ; +C 111 ; WX 556 ; N o ; B 35 -14 521 538 ; +C 112 ; WX 556 ; N p ; B 58 -207 517 538 ; +C 113 ; WX 556 ; N q ; B 35 -207 494 538 ; +C 114 ; WX 333 ; N r ; B 77 0 332 538 ; +C 115 ; WX 500 ; N s ; B 32 -15 464 538 ; +C 116 ; WX 278 ; N t ; B 14 -7 257 669 ; +C 117 ; WX 556 ; N u ; B 68 -15 489 523 ; +C 118 ; WX 500 ; N v ; B 8 0 492 523 ; +C 119 ; WX 722 ; N w ; B 14 0 709 523 ; +C 120 ; WX 500 ; N x ; B 11 0 490 523 ; +C 121 ; WX 500 ; N y ; B 11 -214 489 523 ; +C 122 ; WX 500 ; N z ; B 31 0 469 523 ; +C 123 ; WX 334 ; N braceleft ; B 42 -196 292 722 ; +C 124 ; WX 260 ; N bar ; B 94 -225 167 775 ; +C 125 ; WX 334 ; N braceright ; B 42 -196 292 722 ; +C 126 ; WX 584 ; N asciitilde ; B 61 180 523 326 ; +C 161 ; WX 333 ; N exclamdown ; B 118 -195 215 523 ; +C 162 ; WX 556 ; N cent ; B 51 -115 513 623 ; +C 163 ; WX 556 ; N sterling ; B 33 -16 539 718 ; +C 164 ; WX 167 ; N fraction ; B -166 -19 333 703 ; +C 165 ; WX 556 ; N yen ; B 3 0 553 688 ; +C 166 ; WX 556 ; N florin ; B -11 -207 501 737 ; +C 167 ; WX 556 ; N section ; B 43 -191 512 737 ; +C 168 ; WX 556 ; N currency ; B 28 99 528 603 ; +C 169 ; WX 191 ; N quotesingle ; B 59 463 132 718 ; +C 170 ; WX 333 ; N quotedblleft ; B 38 470 307 725 ; +C 171 ; WX 556 ; N guillemotleft ; B 97 108 459 446 ; +C 172 ; WX 333 ; N guilsinglleft ; B 88 108 245 446 ; +C 173 ; WX 333 ; N guilsinglright ; B 88 108 245 446 ; +C 174 ; WX 500 ; N fi ; B 14 0 434 728 ; +C 175 ; WX 500 ; N fl ; B 14 0 432 728 ; +C 177 ; WX 556 ; N endash ; B 0 240 556 313 ; +C 178 ; WX 556 ; N dagger ; B 43 -159 514 718 ; +C 179 ; WX 556 ; N daggerdbl ; B 43 -159 514 718 ; +C 180 ; WX 278 ; N periodcentered ; B 77 190 202 315 ; +C 182 ; WX 537 ; N paragraph ; B 18 -173 497 718 ; +C 183 ; WX 350 ; N bullet ; B 18 202 333 517 ; +C 184 ; WX 222 ; N quotesinglbase ; B 53 -149 157 106 ; +C 185 ; WX 333 ; N quotedblbase ; B 26 -149 295 106 ; +C 186 ; WX 333 ; N quotedblright ; B 26 463 295 718 ; +C 187 ; WX 556 ; N guillemotright ; B 97 108 459 446 ; +C 188 ; WX 1000 ; N ellipsis ; B 115 0 885 106 ; +C 189 ; WX 1000 ; N perthousand ; B 7 -19 994 703 ; +C 191 ; WX 611 ; N questiondown ; B 91 -201 527 525 ; +C 193 ; WX 333 ; N grave ; B 14 593 211 734 ; +C 194 ; WX 333 ; N acute ; B 122 593 319 734 ; +C 195 ; WX 333 ; N circumflex ; B 21 593 312 734 ; +C 196 ; WX 333 ; N tilde ; B -4 606 337 722 ; +C 197 ; WX 333 ; N macron ; B 10 627 323 684 ; +C 198 ; WX 333 ; N breve ; B 13 595 321 731 ; +C 199 ; WX 333 ; N dotaccent ; B 121 604 212 706 ; +C 200 ; WX 333 ; N dieresis ; B 40 604 293 706 ; +C 202 ; WX 333 ; N ring ; B 75 572 259 756 ; +C 203 ; WX 333 ; N cedilla ; B 45 -225 259 0 ; +C 205 ; WX 333 ; N hungarumlaut ; B 31 593 409 734 ; +C 206 ; WX 333 ; N ogonek ; B 73 -225 287 0 ; +C 207 ; WX 333 ; N caron ; B 21 593 312 734 ; +C 208 ; WX 1000 ; N emdash ; B 0 240 1000 313 ; +C 225 ; WX 1000 ; N AE ; B 8 0 951 718 ; +C 227 ; WX 370 ; N ordfeminine ; B 24 405 346 737 ; +C 232 ; WX 556 ; N Lslash ; B -20 0 537 718 ; +C 233 ; WX 778 ; N Oslash ; B 39 -19 740 737 ; +C 234 ; WX 1000 ; N OE ; B 36 -19 965 737 ; +C 235 ; WX 365 ; N ordmasculine ; B 25 405 341 737 ; +C 241 ; WX 889 ; N ae ; B 36 -15 847 538 ; +C 245 ; WX 278 ; N dotlessi ; B 95 0 183 523 ; +C 248 ; WX 222 ; N lslash ; B -20 0 242 718 ; +C 249 ; WX 611 ; N oslash ; B 28 -22 537 545 ; +C 250 ; WX 944 ; N oe ; B 35 -15 902 538 ; +C 251 ; WX 611 ; N germandbls ; B 67 -15 571 728 ; +C -1 ; WX 278 ; N Idieresis ; B 13 0 266 901 ; +C -1 ; WX 556 ; N eacute ; B 40 -15 516 734 ; +C -1 ; WX 556 ; N abreve ; B 36 -15 530 731 ; +C -1 ; WX 556 ; N uhungarumlaut ; B 68 -15 521 734 ; +C -1 ; WX 556 ; N ecaron ; B 40 -15 516 734 ; +C -1 ; WX 667 ; N Ydieresis ; B 14 0 653 901 ; +C -1 ; WX 584 ; N divide ; B 39 -19 545 524 ; +C -1 ; WX 667 ; N Yacute ; B 14 0 653 929 ; +C -1 ; WX 667 ; N Acircumflex ; B 14 0 654 929 ; +C -1 ; WX 556 ; N aacute ; B 36 -15 530 734 ; +C -1 ; WX 722 ; N Ucircumflex ; B 79 -19 644 929 ; +C -1 ; WX 500 ; N yacute ; B 11 -214 489 734 ; +C -1 ; WX 500 ; N scommaaccent ; B 32 -225 464 538 ; +C -1 ; WX 556 ; N ecircumflex ; B 40 -15 516 734 ; +C -1 ; WX 722 ; N Uring ; B 79 -19 644 931 ; +C -1 ; WX 722 ; N Udieresis ; B 79 -19 644 901 ; +C -1 ; WX 556 ; N aogonek ; B 36 -220 547 538 ; +C -1 ; WX 722 ; N Uacute ; B 79 -19 644 929 ; +C -1 ; WX 556 ; N uogonek ; B 68 -225 519 523 ; +C -1 ; WX 667 ; N Edieresis ; B 86 0 616 901 ; +C -1 ; WX 722 ; N Dcroat ; B 0 0 674 718 ; +C -1 ; WX 250 ; N commaaccent ; B 87 -225 181 -40 ; +C -1 ; WX 737 ; N copyright ; B -14 -19 752 737 ; +C -1 ; WX 667 ; N Emacron ; B 86 0 616 879 ; +C -1 ; WX 500 ; N ccaron ; B 30 -15 477 734 ; +C -1 ; WX 556 ; N aring ; B 36 -15 530 756 ; +C -1 ; WX 722 ; N Ncommaaccent ; B 76 -225 646 718 ; +C -1 ; WX 222 ; N lacute ; B 67 0 264 929 ; +C -1 ; WX 556 ; N agrave ; B 36 -15 530 734 ; +C -1 ; WX 611 ; N Tcommaaccent ; B 14 -225 597 718 ; +C -1 ; WX 722 ; N Cacute ; B 44 -19 681 929 ; +C -1 ; WX 556 ; N atilde ; B 36 -15 530 722 ; +C -1 ; WX 667 ; N Edotaccent ; B 86 0 616 901 ; +C -1 ; WX 500 ; N scaron ; B 32 -15 464 734 ; +C -1 ; WX 500 ; N scedilla ; B 32 -225 464 538 ; +C -1 ; WX 278 ; N iacute ; B 95 0 292 734 ; +C -1 ; WX 471 ; N lozenge ; B 10 0 462 728 ; +C -1 ; WX 722 ; N Rcaron ; B 88 0 684 929 ; +C -1 ; WX 778 ; N Gcommaaccent ; B 48 -225 704 737 ; +C -1 ; WX 556 ; N ucircumflex ; B 68 -15 489 734 ; +C -1 ; WX 556 ; N acircumflex ; B 36 -15 530 734 ; +C -1 ; WX 667 ; N Amacron ; B 14 0 654 879 ; +C -1 ; WX 333 ; N rcaron ; B 61 0 352 734 ; +C -1 ; WX 500 ; N ccedilla ; B 30 -225 477 538 ; +C -1 ; WX 611 ; N Zdotaccent ; B 23 0 588 901 ; +C -1 ; WX 667 ; N Thorn ; B 86 0 622 718 ; +C -1 ; WX 778 ; N Omacron ; B 39 -19 739 879 ; +C -1 ; WX 722 ; N Racute ; B 88 0 684 929 ; +C -1 ; WX 667 ; N Sacute ; B 49 -19 620 929 ; +C -1 ; WX 643 ; N dcaron ; B 35 -15 655 718 ; +C -1 ; WX 722 ; N Umacron ; B 79 -19 644 879 ; +C -1 ; WX 556 ; N uring ; B 68 -15 489 756 ; +C -1 ; WX 333 ; N threesuperior ; B 5 270 325 703 ; +C -1 ; WX 778 ; N Ograve ; B 39 -19 739 929 ; +C -1 ; WX 667 ; N Agrave ; B 14 0 654 929 ; +C -1 ; WX 667 ; N Abreve ; B 14 0 654 926 ; +C -1 ; WX 584 ; N multiply ; B 39 0 545 506 ; +C -1 ; WX 556 ; N uacute ; B 68 -15 489 734 ; +C -1 ; WX 611 ; N Tcaron ; B 14 0 597 929 ; +C -1 ; WX 476 ; N partialdiff ; B 13 -38 463 714 ; +C -1 ; WX 500 ; N ydieresis ; B 11 -214 489 706 ; +C -1 ; WX 722 ; N Nacute ; B 76 0 646 929 ; +C -1 ; WX 278 ; N icircumflex ; B -6 0 285 734 ; +C -1 ; WX 667 ; N Ecircumflex ; B 86 0 616 929 ; +C -1 ; WX 556 ; N adieresis ; B 36 -15 530 706 ; +C -1 ; WX 556 ; N edieresis ; B 40 -15 516 706 ; +C -1 ; WX 500 ; N cacute ; B 30 -15 477 734 ; +C -1 ; WX 556 ; N nacute ; B 65 0 491 734 ; +C -1 ; WX 556 ; N umacron ; B 68 -15 489 684 ; +C -1 ; WX 722 ; N Ncaron ; B 76 0 646 929 ; +C -1 ; WX 278 ; N Iacute ; B 91 0 292 929 ; +C -1 ; WX 584 ; N plusminus ; B 39 0 545 506 ; +C -1 ; WX 260 ; N brokenbar ; B 94 -150 167 700 ; +C -1 ; WX 737 ; N registered ; B -14 -19 752 737 ; +C -1 ; WX 778 ; N Gbreve ; B 48 -19 704 926 ; +C -1 ; WX 278 ; N Idotaccent ; B 91 0 188 901 ; +C -1 ; WX 600 ; N summation ; B 15 -10 586 706 ; +C -1 ; WX 667 ; N Egrave ; B 86 0 616 929 ; +C -1 ; WX 333 ; N racute ; B 77 0 332 734 ; +C -1 ; WX 556 ; N omacron ; B 35 -14 521 684 ; +C -1 ; WX 611 ; N Zacute ; B 23 0 588 929 ; +C -1 ; WX 611 ; N Zcaron ; B 23 0 588 929 ; +C -1 ; WX 549 ; N greaterequal ; B 26 0 523 674 ; +C -1 ; WX 722 ; N Eth ; B 0 0 674 718 ; +C -1 ; WX 722 ; N Ccedilla ; B 44 -225 681 737 ; +C -1 ; WX 222 ; N lcommaaccent ; B 67 -225 167 718 ; +C -1 ; WX 317 ; N tcaron ; B 14 -7 329 808 ; +C -1 ; WX 556 ; N eogonek ; B 40 -225 516 538 ; +C -1 ; WX 722 ; N Uogonek ; B 79 -225 644 718 ; +C -1 ; WX 667 ; N Aacute ; B 14 0 654 929 ; +C -1 ; WX 667 ; N Adieresis ; B 14 0 654 901 ; +C -1 ; WX 556 ; N egrave ; B 40 -15 516 734 ; +C -1 ; WX 500 ; N zacute ; B 31 0 469 734 ; +C -1 ; WX 222 ; N iogonek ; B -31 -225 183 718 ; +C -1 ; WX 778 ; N Oacute ; B 39 -19 739 929 ; +C -1 ; WX 556 ; N oacute ; B 35 -14 521 734 ; +C -1 ; WX 556 ; N amacron ; B 36 -15 530 684 ; +C -1 ; WX 500 ; N sacute ; B 32 -15 464 734 ; +C -1 ; WX 278 ; N idieresis ; B 13 0 266 706 ; +C -1 ; WX 778 ; N Ocircumflex ; B 39 -19 739 929 ; +C -1 ; WX 722 ; N Ugrave ; B 79 -19 644 929 ; +C -1 ; WX 612 ; N Delta ; B 6 0 608 688 ; +C -1 ; WX 556 ; N thorn ; B 58 -207 517 718 ; +C -1 ; WX 333 ; N twosuperior ; B 4 281 323 703 ; +C -1 ; WX 778 ; N Odieresis ; B 39 -19 739 901 ; +C -1 ; WX 556 ; N mu ; B 68 -207 489 523 ; +C -1 ; WX 278 ; N igrave ; B -13 0 184 734 ; +C -1 ; WX 556 ; N ohungarumlaut ; B 35 -14 521 734 ; +C -1 ; WX 667 ; N Eogonek ; B 86 -220 633 718 ; +C -1 ; WX 556 ; N dcroat ; B 35 -15 550 718 ; +C -1 ; WX 834 ; N threequarters ; B 45 -19 810 703 ; +C -1 ; WX 667 ; N Scedilla ; B 49 -225 620 737 ; +C -1 ; WX 299 ; N lcaron ; B 67 0 311 718 ; +C -1 ; WX 667 ; N Kcommaaccent ; B 76 -225 663 718 ; +C -1 ; WX 556 ; N Lacute ; B 76 0 537 929 ; +C -1 ; WX 1000 ; N trademark ; B 46 306 903 718 ; +C -1 ; WX 556 ; N edotaccent ; B 40 -15 516 706 ; +C -1 ; WX 278 ; N Igrave ; B -13 0 188 929 ; +C -1 ; WX 278 ; N Imacron ; B -17 0 296 879 ; +C -1 ; WX 556 ; N Lcaron ; B 76 0 537 718 ; +C -1 ; WX 834 ; N onehalf ; B 43 -19 773 703 ; +C -1 ; WX 549 ; N lessequal ; B 26 0 523 674 ; +C -1 ; WX 556 ; N ocircumflex ; B 35 -14 521 734 ; +C -1 ; WX 556 ; N ntilde ; B 65 0 491 722 ; +C -1 ; WX 722 ; N Uhungarumlaut ; B 79 -19 644 929 ; +C -1 ; WX 667 ; N Eacute ; B 86 0 616 929 ; +C -1 ; WX 556 ; N emacron ; B 40 -15 516 684 ; +C -1 ; WX 556 ; N gbreve ; B 40 -220 499 731 ; +C -1 ; WX 834 ; N onequarter ; B 73 -19 756 703 ; +C -1 ; WX 667 ; N Scaron ; B 49 -19 620 929 ; +C -1 ; WX 667 ; N Scommaaccent ; B 49 -225 620 737 ; +C -1 ; WX 778 ; N Ohungarumlaut ; B 39 -19 739 929 ; +C -1 ; WX 400 ; N degree ; B 54 411 346 703 ; +C -1 ; WX 556 ; N ograve ; B 35 -14 521 734 ; +C -1 ; WX 722 ; N Ccaron ; B 44 -19 681 929 ; +C -1 ; WX 556 ; N ugrave ; B 68 -15 489 734 ; +C -1 ; WX 453 ; N radical ; B -4 -80 458 762 ; +C -1 ; WX 722 ; N Dcaron ; B 81 0 674 929 ; +C -1 ; WX 333 ; N rcommaaccent ; B 77 -225 332 538 ; +C -1 ; WX 722 ; N Ntilde ; B 76 0 646 917 ; +C -1 ; WX 556 ; N otilde ; B 35 -14 521 722 ; +C -1 ; WX 722 ; N Rcommaaccent ; B 88 -225 684 718 ; +C -1 ; WX 556 ; N Lcommaaccent ; B 76 -225 537 718 ; +C -1 ; WX 667 ; N Atilde ; B 14 0 654 917 ; +C -1 ; WX 667 ; N Aogonek ; B 14 -225 654 718 ; +C -1 ; WX 667 ; N Aring ; B 14 0 654 931 ; +C -1 ; WX 778 ; N Otilde ; B 39 -19 739 917 ; +C -1 ; WX 500 ; N zdotaccent ; B 31 0 469 706 ; +C -1 ; WX 667 ; N Ecaron ; B 86 0 616 929 ; +C -1 ; WX 278 ; N Iogonek ; B -3 -225 211 718 ; +C -1 ; WX 500 ; N kcommaaccent ; B 67 -225 501 718 ; +C -1 ; WX 584 ; N minus ; B 39 216 545 289 ; +C -1 ; WX 278 ; N Icircumflex ; B -6 0 285 929 ; +C -1 ; WX 556 ; N ncaron ; B 65 0 491 734 ; +C -1 ; WX 278 ; N tcommaaccent ; B 14 -225 257 669 ; +C -1 ; WX 584 ; N logicalnot ; B 39 108 545 390 ; +C -1 ; WX 556 ; N odieresis ; B 35 -14 521 706 ; +C -1 ; WX 556 ; N udieresis ; B 68 -15 489 706 ; +C -1 ; WX 549 ; N notequal ; B 12 -35 537 551 ; +C -1 ; WX 556 ; N gcommaaccent ; B 40 -220 499 822 ; +C -1 ; WX 556 ; N eth ; B 35 -15 522 737 ; +C -1 ; WX 500 ; N zcaron ; B 31 0 469 734 ; +C -1 ; WX 556 ; N ncommaaccent ; B 65 -225 491 538 ; +C -1 ; WX 333 ; N onesuperior ; B 43 281 222 703 ; +C -1 ; WX 278 ; N imacron ; B 5 0 272 684 ; +C -1 ; WX 556 ; N Euro ; B 0 0 0 0 ; +EndCharMetrics +StartKernData +StartKernPairs 2705 +KPX A C -30 +KPX A Cacute -30 +KPX A Ccaron -30 +KPX A Ccedilla -30 +KPX A G -30 +KPX A Gbreve -30 +KPX A Gcommaaccent -30 +KPX A O -30 +KPX A Oacute -30 +KPX A Ocircumflex -30 +KPX A Odieresis -30 +KPX A Ograve -30 +KPX A Ohungarumlaut -30 +KPX A Omacron -30 +KPX A Oslash -30 +KPX A Otilde -30 +KPX A Q -30 +KPX A T -120 +KPX A Tcaron -120 +KPX A Tcommaaccent -120 +KPX A U -50 +KPX A Uacute -50 +KPX A Ucircumflex -50 +KPX A Udieresis -50 +KPX A Ugrave -50 +KPX A Uhungarumlaut -50 +KPX A Umacron -50 +KPX A Uogonek -50 +KPX A Uring -50 +KPX A V -70 +KPX A W -50 +KPX A Y -100 +KPX A Yacute -100 +KPX A Ydieresis -100 +KPX A u -30 +KPX A uacute -30 +KPX A ucircumflex -30 +KPX A udieresis -30 +KPX A ugrave -30 +KPX A uhungarumlaut -30 +KPX A umacron -30 +KPX A uogonek -30 +KPX A uring -30 +KPX A v -40 +KPX A w -40 +KPX A y -40 +KPX A yacute -40 +KPX A ydieresis -40 +KPX Aacute C -30 +KPX Aacute Cacute -30 +KPX Aacute Ccaron -30 +KPX Aacute Ccedilla -30 +KPX Aacute G -30 +KPX Aacute Gbreve -30 +KPX Aacute Gcommaaccent -30 +KPX Aacute O -30 +KPX Aacute Oacute -30 +KPX Aacute Ocircumflex -30 +KPX Aacute Odieresis -30 +KPX Aacute Ograve -30 +KPX Aacute Ohungarumlaut -30 +KPX Aacute Omacron -30 +KPX Aacute Oslash -30 +KPX Aacute Otilde -30 +KPX Aacute Q -30 +KPX Aacute T -120 +KPX Aacute Tcaron -120 +KPX Aacute Tcommaaccent -120 +KPX Aacute U -50 +KPX Aacute Uacute -50 +KPX Aacute Ucircumflex -50 +KPX Aacute Udieresis -50 +KPX Aacute Ugrave -50 +KPX Aacute Uhungarumlaut -50 +KPX Aacute Umacron -50 +KPX Aacute Uogonek -50 +KPX Aacute Uring -50 +KPX Aacute V -70 +KPX Aacute W -50 +KPX Aacute Y -100 +KPX Aacute Yacute -100 +KPX Aacute Ydieresis -100 +KPX Aacute u -30 +KPX Aacute uacute -30 +KPX Aacute ucircumflex -30 +KPX Aacute udieresis -30 +KPX Aacute ugrave -30 +KPX Aacute uhungarumlaut -30 +KPX Aacute umacron -30 +KPX Aacute uogonek -30 +KPX Aacute uring -30 +KPX Aacute v -40 +KPX Aacute w -40 +KPX Aacute y -40 +KPX Aacute yacute -40 +KPX Aacute ydieresis -40 +KPX Abreve C -30 +KPX Abreve Cacute -30 +KPX Abreve Ccaron -30 +KPX Abreve Ccedilla -30 +KPX Abreve G -30 +KPX Abreve Gbreve -30 +KPX Abreve Gcommaaccent -30 +KPX Abreve O -30 +KPX Abreve Oacute -30 +KPX Abreve Ocircumflex -30 +KPX Abreve Odieresis -30 +KPX Abreve Ograve -30 +KPX Abreve Ohungarumlaut -30 +KPX Abreve Omacron -30 +KPX Abreve Oslash -30 +KPX Abreve Otilde -30 +KPX Abreve Q -30 +KPX Abreve T -120 +KPX Abreve Tcaron -120 +KPX Abreve Tcommaaccent -120 +KPX Abreve U -50 +KPX Abreve Uacute -50 +KPX Abreve Ucircumflex -50 +KPX Abreve Udieresis -50 +KPX Abreve Ugrave -50 +KPX Abreve Uhungarumlaut -50 +KPX Abreve Umacron -50 +KPX Abreve Uogonek -50 +KPX Abreve Uring -50 +KPX Abreve V -70 +KPX Abreve W -50 +KPX Abreve Y -100 +KPX Abreve Yacute -100 +KPX Abreve Ydieresis -100 +KPX Abreve u -30 +KPX Abreve uacute -30 +KPX Abreve ucircumflex -30 +KPX Abreve udieresis -30 +KPX Abreve ugrave -30 +KPX Abreve uhungarumlaut -30 +KPX Abreve umacron -30 +KPX Abreve uogonek -30 +KPX Abreve uring -30 +KPX Abreve v -40 +KPX Abreve w -40 +KPX Abreve y -40 +KPX Abreve yacute -40 +KPX Abreve ydieresis -40 +KPX Acircumflex C -30 +KPX Acircumflex Cacute -30 +KPX Acircumflex Ccaron -30 +KPX Acircumflex Ccedilla -30 +KPX Acircumflex G -30 +KPX Acircumflex Gbreve -30 +KPX Acircumflex Gcommaaccent -30 +KPX Acircumflex O -30 +KPX Acircumflex Oacute -30 +KPX Acircumflex Ocircumflex -30 +KPX Acircumflex Odieresis -30 +KPX Acircumflex Ograve -30 +KPX Acircumflex Ohungarumlaut -30 +KPX Acircumflex Omacron -30 +KPX Acircumflex Oslash -30 +KPX Acircumflex Otilde -30 +KPX Acircumflex Q -30 +KPX Acircumflex T -120 +KPX Acircumflex Tcaron -120 +KPX Acircumflex Tcommaaccent -120 +KPX Acircumflex U -50 +KPX Acircumflex Uacute -50 +KPX Acircumflex Ucircumflex -50 +KPX Acircumflex Udieresis -50 +KPX Acircumflex Ugrave -50 +KPX Acircumflex Uhungarumlaut -50 +KPX Acircumflex Umacron -50 +KPX Acircumflex Uogonek -50 +KPX Acircumflex Uring -50 +KPX Acircumflex V -70 +KPX Acircumflex W -50 +KPX Acircumflex Y -100 +KPX Acircumflex Yacute -100 +KPX Acircumflex Ydieresis -100 +KPX Acircumflex u -30 +KPX Acircumflex uacute -30 +KPX Acircumflex ucircumflex -30 +KPX Acircumflex udieresis -30 +KPX Acircumflex ugrave -30 +KPX Acircumflex uhungarumlaut -30 +KPX Acircumflex umacron -30 +KPX Acircumflex uogonek -30 +KPX Acircumflex uring -30 +KPX Acircumflex v -40 +KPX Acircumflex w -40 +KPX Acircumflex y -40 +KPX Acircumflex yacute -40 +KPX Acircumflex ydieresis -40 +KPX Adieresis C -30 +KPX Adieresis Cacute -30 +KPX Adieresis Ccaron -30 +KPX Adieresis Ccedilla -30 +KPX Adieresis G -30 +KPX Adieresis Gbreve -30 +KPX Adieresis Gcommaaccent -30 +KPX Adieresis O -30 +KPX Adieresis Oacute -30 +KPX Adieresis Ocircumflex -30 +KPX Adieresis Odieresis -30 +KPX Adieresis Ograve -30 +KPX Adieresis Ohungarumlaut -30 +KPX Adieresis Omacron -30 +KPX Adieresis Oslash -30 +KPX Adieresis Otilde -30 +KPX Adieresis Q -30 +KPX Adieresis T -120 +KPX Adieresis Tcaron -120 +KPX Adieresis Tcommaaccent -120 +KPX Adieresis U -50 +KPX Adieresis Uacute -50 +KPX Adieresis Ucircumflex -50 +KPX Adieresis Udieresis -50 +KPX Adieresis Ugrave -50 +KPX Adieresis Uhungarumlaut -50 +KPX Adieresis Umacron -50 +KPX Adieresis Uogonek -50 +KPX Adieresis Uring -50 +KPX Adieresis V -70 +KPX Adieresis W -50 +KPX Adieresis Y -100 +KPX Adieresis Yacute -100 +KPX Adieresis Ydieresis -100 +KPX Adieresis u -30 +KPX Adieresis uacute -30 +KPX Adieresis ucircumflex -30 +KPX Adieresis udieresis -30 +KPX Adieresis ugrave -30 +KPX Adieresis uhungarumlaut -30 +KPX Adieresis umacron -30 +KPX Adieresis uogonek -30 +KPX Adieresis uring -30 +KPX Adieresis v -40 +KPX Adieresis w -40 +KPX Adieresis y -40 +KPX Adieresis yacute -40 +KPX Adieresis ydieresis -40 +KPX Agrave C -30 +KPX Agrave Cacute -30 +KPX Agrave Ccaron -30 +KPX Agrave Ccedilla -30 +KPX Agrave G -30 +KPX Agrave Gbreve -30 +KPX Agrave Gcommaaccent -30 +KPX Agrave O -30 +KPX Agrave Oacute -30 +KPX Agrave Ocircumflex -30 +KPX Agrave Odieresis -30 +KPX Agrave Ograve -30 +KPX Agrave Ohungarumlaut -30 +KPX Agrave Omacron -30 +KPX Agrave Oslash -30 +KPX Agrave Otilde -30 +KPX Agrave Q -30 +KPX Agrave T -120 +KPX Agrave Tcaron -120 +KPX Agrave Tcommaaccent -120 +KPX Agrave U -50 +KPX Agrave Uacute -50 +KPX Agrave Ucircumflex -50 +KPX Agrave Udieresis -50 +KPX Agrave Ugrave -50 +KPX Agrave Uhungarumlaut -50 +KPX Agrave Umacron -50 +KPX Agrave Uogonek -50 +KPX Agrave Uring -50 +KPX Agrave V -70 +KPX Agrave W -50 +KPX Agrave Y -100 +KPX Agrave Yacute -100 +KPX Agrave Ydieresis -100 +KPX Agrave u -30 +KPX Agrave uacute -30 +KPX Agrave ucircumflex -30 +KPX Agrave udieresis -30 +KPX Agrave ugrave -30 +KPX Agrave uhungarumlaut -30 +KPX Agrave umacron -30 +KPX Agrave uogonek -30 +KPX Agrave uring -30 +KPX Agrave v -40 +KPX Agrave w -40 +KPX Agrave y -40 +KPX Agrave yacute -40 +KPX Agrave ydieresis -40 +KPX Amacron C -30 +KPX Amacron Cacute -30 +KPX Amacron Ccaron -30 +KPX Amacron Ccedilla -30 +KPX Amacron G -30 +KPX Amacron Gbreve -30 +KPX Amacron Gcommaaccent -30 +KPX Amacron O -30 +KPX Amacron Oacute -30 +KPX Amacron Ocircumflex -30 +KPX Amacron Odieresis -30 +KPX Amacron Ograve -30 +KPX Amacron Ohungarumlaut -30 +KPX Amacron Omacron -30 +KPX Amacron Oslash -30 +KPX Amacron Otilde -30 +KPX Amacron Q -30 +KPX Amacron T -120 +KPX Amacron Tcaron -120 +KPX Amacron Tcommaaccent -120 +KPX Amacron U -50 +KPX Amacron Uacute -50 +KPX Amacron Ucircumflex -50 +KPX Amacron Udieresis -50 +KPX Amacron Ugrave -50 +KPX Amacron Uhungarumlaut -50 +KPX Amacron Umacron -50 +KPX Amacron Uogonek -50 +KPX Amacron Uring -50 +KPX Amacron V -70 +KPX Amacron W -50 +KPX Amacron Y -100 +KPX Amacron Yacute -100 +KPX Amacron Ydieresis -100 +KPX Amacron u -30 +KPX Amacron uacute -30 +KPX Amacron ucircumflex -30 +KPX Amacron udieresis -30 +KPX Amacron ugrave -30 +KPX Amacron uhungarumlaut -30 +KPX Amacron umacron -30 +KPX Amacron uogonek -30 +KPX Amacron uring -30 +KPX Amacron v -40 +KPX Amacron w -40 +KPX Amacron y -40 +KPX Amacron yacute -40 +KPX Amacron ydieresis -40 +KPX Aogonek C -30 +KPX Aogonek Cacute -30 +KPX Aogonek Ccaron -30 +KPX Aogonek Ccedilla -30 +KPX Aogonek G -30 +KPX Aogonek Gbreve -30 +KPX Aogonek Gcommaaccent -30 +KPX Aogonek O -30 +KPX Aogonek Oacute -30 +KPX Aogonek Ocircumflex -30 +KPX Aogonek Odieresis -30 +KPX Aogonek Ograve -30 +KPX Aogonek Ohungarumlaut -30 +KPX Aogonek Omacron -30 +KPX Aogonek Oslash -30 +KPX Aogonek Otilde -30 +KPX Aogonek Q -30 +KPX Aogonek T -120 +KPX Aogonek Tcaron -120 +KPX Aogonek Tcommaaccent -120 +KPX Aogonek U -50 +KPX Aogonek Uacute -50 +KPX Aogonek Ucircumflex -50 +KPX Aogonek Udieresis -50 +KPX Aogonek Ugrave -50 +KPX Aogonek Uhungarumlaut -50 +KPX Aogonek Umacron -50 +KPX Aogonek Uogonek -50 +KPX Aogonek Uring -50 +KPX Aogonek V -70 +KPX Aogonek W -50 +KPX Aogonek Y -100 +KPX Aogonek Yacute -100 +KPX Aogonek Ydieresis -100 +KPX Aogonek u -30 +KPX Aogonek uacute -30 +KPX Aogonek ucircumflex -30 +KPX Aogonek udieresis -30 +KPX Aogonek ugrave -30 +KPX Aogonek uhungarumlaut -30 +KPX Aogonek umacron -30 +KPX Aogonek uogonek -30 +KPX Aogonek uring -30 +KPX Aogonek v -40 +KPX Aogonek w -40 +KPX Aogonek y -40 +KPX Aogonek yacute -40 +KPX Aogonek ydieresis -40 +KPX Aring C -30 +KPX Aring Cacute -30 +KPX Aring Ccaron -30 +KPX Aring Ccedilla -30 +KPX Aring G -30 +KPX Aring Gbreve -30 +KPX Aring Gcommaaccent -30 +KPX Aring O -30 +KPX Aring Oacute -30 +KPX Aring Ocircumflex -30 +KPX Aring Odieresis -30 +KPX Aring Ograve -30 +KPX Aring Ohungarumlaut -30 +KPX Aring Omacron -30 +KPX Aring Oslash -30 +KPX Aring Otilde -30 +KPX Aring Q -30 +KPX Aring T -120 +KPX Aring Tcaron -120 +KPX Aring Tcommaaccent -120 +KPX Aring U -50 +KPX Aring Uacute -50 +KPX Aring Ucircumflex -50 +KPX Aring Udieresis -50 +KPX Aring Ugrave -50 +KPX Aring Uhungarumlaut -50 +KPX Aring Umacron -50 +KPX Aring Uogonek -50 +KPX Aring Uring -50 +KPX Aring V -70 +KPX Aring W -50 +KPX Aring Y -100 +KPX Aring Yacute -100 +KPX Aring Ydieresis -100 +KPX Aring u -30 +KPX Aring uacute -30 +KPX Aring ucircumflex -30 +KPX Aring udieresis -30 +KPX Aring ugrave -30 +KPX Aring uhungarumlaut -30 +KPX Aring umacron -30 +KPX Aring uogonek -30 +KPX Aring uring -30 +KPX Aring v -40 +KPX Aring w -40 +KPX Aring y -40 +KPX Aring yacute -40 +KPX Aring ydieresis -40 +KPX Atilde C -30 +KPX Atilde Cacute -30 +KPX Atilde Ccaron -30 +KPX Atilde Ccedilla -30 +KPX Atilde G -30 +KPX Atilde Gbreve -30 +KPX Atilde Gcommaaccent -30 +KPX Atilde O -30 +KPX Atilde Oacute -30 +KPX Atilde Ocircumflex -30 +KPX Atilde Odieresis -30 +KPX Atilde Ograve -30 +KPX Atilde Ohungarumlaut -30 +KPX Atilde Omacron -30 +KPX Atilde Oslash -30 +KPX Atilde Otilde -30 +KPX Atilde Q -30 +KPX Atilde T -120 +KPX Atilde Tcaron -120 +KPX Atilde Tcommaaccent -120 +KPX Atilde U -50 +KPX Atilde Uacute -50 +KPX Atilde Ucircumflex -50 +KPX Atilde Udieresis -50 +KPX Atilde Ugrave -50 +KPX Atilde Uhungarumlaut -50 +KPX Atilde Umacron -50 +KPX Atilde Uogonek -50 +KPX Atilde Uring -50 +KPX Atilde V -70 +KPX Atilde W -50 +KPX Atilde Y -100 +KPX Atilde Yacute -100 +KPX Atilde Ydieresis -100 +KPX Atilde u -30 +KPX Atilde uacute -30 +KPX Atilde ucircumflex -30 +KPX Atilde udieresis -30 +KPX Atilde ugrave -30 +KPX Atilde uhungarumlaut -30 +KPX Atilde umacron -30 +KPX Atilde uogonek -30 +KPX Atilde uring -30 +KPX Atilde v -40 +KPX Atilde w -40 +KPX Atilde y -40 +KPX Atilde yacute -40 +KPX Atilde ydieresis -40 +KPX B U -10 +KPX B Uacute -10 +KPX B Ucircumflex -10 +KPX B Udieresis -10 +KPX B Ugrave -10 +KPX B Uhungarumlaut -10 +KPX B Umacron -10 +KPX B Uogonek -10 +KPX B Uring -10 +KPX B comma -20 +KPX B period -20 +KPX C comma -30 +KPX C period -30 +KPX Cacute comma -30 +KPX Cacute period -30 +KPX Ccaron comma -30 +KPX Ccaron period -30 +KPX Ccedilla comma -30 +KPX Ccedilla period -30 +KPX D A -40 +KPX D Aacute -40 +KPX D Abreve -40 +KPX D Acircumflex -40 +KPX D Adieresis -40 +KPX D Agrave -40 +KPX D Amacron -40 +KPX D Aogonek -40 +KPX D Aring -40 +KPX D Atilde -40 +KPX D V -70 +KPX D W -40 +KPX D Y -90 +KPX D Yacute -90 +KPX D Ydieresis -90 +KPX D comma -70 +KPX D period -70 +KPX Dcaron A -40 +KPX Dcaron Aacute -40 +KPX Dcaron Abreve -40 +KPX Dcaron Acircumflex -40 +KPX Dcaron Adieresis -40 +KPX Dcaron Agrave -40 +KPX Dcaron Amacron -40 +KPX Dcaron Aogonek -40 +KPX Dcaron Aring -40 +KPX Dcaron Atilde -40 +KPX Dcaron V -70 +KPX Dcaron W -40 +KPX Dcaron Y -90 +KPX Dcaron Yacute -90 +KPX Dcaron Ydieresis -90 +KPX Dcaron comma -70 +KPX Dcaron period -70 +KPX Dcroat A -40 +KPX Dcroat Aacute -40 +KPX Dcroat Abreve -40 +KPX Dcroat Acircumflex -40 +KPX Dcroat Adieresis -40 +KPX Dcroat Agrave -40 +KPX Dcroat Amacron -40 +KPX Dcroat Aogonek -40 +KPX Dcroat Aring -40 +KPX Dcroat Atilde -40 +KPX Dcroat V -70 +KPX Dcroat W -40 +KPX Dcroat Y -90 +KPX Dcroat Yacute -90 +KPX Dcroat Ydieresis -90 +KPX Dcroat comma -70 +KPX Dcroat period -70 +KPX F A -80 +KPX F Aacute -80 +KPX F Abreve -80 +KPX F Acircumflex -80 +KPX F Adieresis -80 +KPX F Agrave -80 +KPX F Amacron -80 +KPX F Aogonek -80 +KPX F Aring -80 +KPX F Atilde -80 +KPX F a -50 +KPX F aacute -50 +KPX F abreve -50 +KPX F acircumflex -50 +KPX F adieresis -50 +KPX F agrave -50 +KPX F amacron -50 +KPX F aogonek -50 +KPX F aring -50 +KPX F atilde -50 +KPX F comma -150 +KPX F e -30 +KPX F eacute -30 +KPX F ecaron -30 +KPX F ecircumflex -30 +KPX F edieresis -30 +KPX F edotaccent -30 +KPX F egrave -30 +KPX F emacron -30 +KPX F eogonek -30 +KPX F o -30 +KPX F oacute -30 +KPX F ocircumflex -30 +KPX F odieresis -30 +KPX F ograve -30 +KPX F ohungarumlaut -30 +KPX F omacron -30 +KPX F oslash -30 +KPX F otilde -30 +KPX F period -150 +KPX F r -45 +KPX F racute -45 +KPX F rcaron -45 +KPX F rcommaaccent -45 +KPX J A -20 +KPX J Aacute -20 +KPX J Abreve -20 +KPX J Acircumflex -20 +KPX J Adieresis -20 +KPX J Agrave -20 +KPX J Amacron -20 +KPX J Aogonek -20 +KPX J Aring -20 +KPX J Atilde -20 +KPX J a -20 +KPX J aacute -20 +KPX J abreve -20 +KPX J acircumflex -20 +KPX J adieresis -20 +KPX J agrave -20 +KPX J amacron -20 +KPX J aogonek -20 +KPX J aring -20 +KPX J atilde -20 +KPX J comma -30 +KPX J period -30 +KPX J u -20 +KPX J uacute -20 +KPX J ucircumflex -20 +KPX J udieresis -20 +KPX J ugrave -20 +KPX J uhungarumlaut -20 +KPX J umacron -20 +KPX J uogonek -20 +KPX J uring -20 +KPX K O -50 +KPX K Oacute -50 +KPX K Ocircumflex -50 +KPX K Odieresis -50 +KPX K Ograve -50 +KPX K Ohungarumlaut -50 +KPX K Omacron -50 +KPX K Oslash -50 +KPX K Otilde -50 +KPX K e -40 +KPX K eacute -40 +KPX K ecaron -40 +KPX K ecircumflex -40 +KPX K edieresis -40 +KPX K edotaccent -40 +KPX K egrave -40 +KPX K emacron -40 +KPX K eogonek -40 +KPX K o -40 +KPX K oacute -40 +KPX K ocircumflex -40 +KPX K odieresis -40 +KPX K ograve -40 +KPX K ohungarumlaut -40 +KPX K omacron -40 +KPX K oslash -40 +KPX K otilde -40 +KPX K u -30 +KPX K uacute -30 +KPX K ucircumflex -30 +KPX K udieresis -30 +KPX K ugrave -30 +KPX K uhungarumlaut -30 +KPX K umacron -30 +KPX K uogonek -30 +KPX K uring -30 +KPX K y -50 +KPX K yacute -50 +KPX K ydieresis -50 +KPX Kcommaaccent O -50 +KPX Kcommaaccent Oacute -50 +KPX Kcommaaccent Ocircumflex -50 +KPX Kcommaaccent Odieresis -50 +KPX Kcommaaccent Ograve -50 +KPX Kcommaaccent Ohungarumlaut -50 +KPX Kcommaaccent Omacron -50 +KPX Kcommaaccent Oslash -50 +KPX Kcommaaccent Otilde -50 +KPX Kcommaaccent e -40 +KPX Kcommaaccent eacute -40 +KPX Kcommaaccent ecaron -40 +KPX Kcommaaccent ecircumflex -40 +KPX Kcommaaccent edieresis -40 +KPX Kcommaaccent edotaccent -40 +KPX Kcommaaccent egrave -40 +KPX Kcommaaccent emacron -40 +KPX Kcommaaccent eogonek -40 +KPX Kcommaaccent o -40 +KPX Kcommaaccent oacute -40 +KPX Kcommaaccent ocircumflex -40 +KPX Kcommaaccent odieresis -40 +KPX Kcommaaccent ograve -40 +KPX Kcommaaccent ohungarumlaut -40 +KPX Kcommaaccent omacron -40 +KPX Kcommaaccent oslash -40 +KPX Kcommaaccent otilde -40 +KPX Kcommaaccent u -30 +KPX Kcommaaccent uacute -30 +KPX Kcommaaccent ucircumflex -30 +KPX Kcommaaccent udieresis -30 +KPX Kcommaaccent ugrave -30 +KPX Kcommaaccent uhungarumlaut -30 +KPX Kcommaaccent umacron -30 +KPX Kcommaaccent uogonek -30 +KPX Kcommaaccent uring -30 +KPX Kcommaaccent y -50 +KPX Kcommaaccent yacute -50 +KPX Kcommaaccent ydieresis -50 +KPX L T -110 +KPX L Tcaron -110 +KPX L Tcommaaccent -110 +KPX L V -110 +KPX L W -70 +KPX L Y -140 +KPX L Yacute -140 +KPX L Ydieresis -140 +KPX L quotedblright -140 +KPX L quoteright -160 +KPX L y -30 +KPX L yacute -30 +KPX L ydieresis -30 +KPX Lacute T -110 +KPX Lacute Tcaron -110 +KPX Lacute Tcommaaccent -110 +KPX Lacute V -110 +KPX Lacute W -70 +KPX Lacute Y -140 +KPX Lacute Yacute -140 +KPX Lacute Ydieresis -140 +KPX Lacute quotedblright -140 +KPX Lacute quoteright -160 +KPX Lacute y -30 +KPX Lacute yacute -30 +KPX Lacute ydieresis -30 +KPX Lcaron T -110 +KPX Lcaron Tcaron -110 +KPX Lcaron Tcommaaccent -110 +KPX Lcaron V -110 +KPX Lcaron W -70 +KPX Lcaron Y -140 +KPX Lcaron Yacute -140 +KPX Lcaron Ydieresis -140 +KPX Lcaron quotedblright -140 +KPX Lcaron quoteright -160 +KPX Lcaron y -30 +KPX Lcaron yacute -30 +KPX Lcaron ydieresis -30 +KPX Lcommaaccent T -110 +KPX Lcommaaccent Tcaron -110 +KPX Lcommaaccent Tcommaaccent -110 +KPX Lcommaaccent V -110 +KPX Lcommaaccent W -70 +KPX Lcommaaccent Y -140 +KPX Lcommaaccent Yacute -140 +KPX Lcommaaccent Ydieresis -140 +KPX Lcommaaccent quotedblright -140 +KPX Lcommaaccent quoteright -160 +KPX Lcommaaccent y -30 +KPX Lcommaaccent yacute -30 +KPX Lcommaaccent ydieresis -30 +KPX Lslash T -110 +KPX Lslash Tcaron -110 +KPX Lslash Tcommaaccent -110 +KPX Lslash V -110 +KPX Lslash W -70 +KPX Lslash Y -140 +KPX Lslash Yacute -140 +KPX Lslash Ydieresis -140 +KPX Lslash quotedblright -140 +KPX Lslash quoteright -160 +KPX Lslash y -30 +KPX Lslash yacute -30 +KPX Lslash ydieresis -30 +KPX O A -20 +KPX O Aacute -20 +KPX O Abreve -20 +KPX O Acircumflex -20 +KPX O Adieresis -20 +KPX O Agrave -20 +KPX O Amacron -20 +KPX O Aogonek -20 +KPX O Aring -20 +KPX O Atilde -20 +KPX O T -40 +KPX O Tcaron -40 +KPX O Tcommaaccent -40 +KPX O V -50 +KPX O W -30 +KPX O X -60 +KPX O Y -70 +KPX O Yacute -70 +KPX O Ydieresis -70 +KPX O comma -40 +KPX O period -40 +KPX Oacute A -20 +KPX Oacute Aacute -20 +KPX Oacute Abreve -20 +KPX Oacute Acircumflex -20 +KPX Oacute Adieresis -20 +KPX Oacute Agrave -20 +KPX Oacute Amacron -20 +KPX Oacute Aogonek -20 +KPX Oacute Aring -20 +KPX Oacute Atilde -20 +KPX Oacute T -40 +KPX Oacute Tcaron -40 +KPX Oacute Tcommaaccent -40 +KPX Oacute V -50 +KPX Oacute W -30 +KPX Oacute X -60 +KPX Oacute Y -70 +KPX Oacute Yacute -70 +KPX Oacute Ydieresis -70 +KPX Oacute comma -40 +KPX Oacute period -40 +KPX Ocircumflex A -20 +KPX Ocircumflex Aacute -20 +KPX Ocircumflex Abreve -20 +KPX Ocircumflex Acircumflex -20 +KPX Ocircumflex Adieresis -20 +KPX Ocircumflex Agrave -20 +KPX Ocircumflex Amacron -20 +KPX Ocircumflex Aogonek -20 +KPX Ocircumflex Aring -20 +KPX Ocircumflex Atilde -20 +KPX Ocircumflex T -40 +KPX Ocircumflex Tcaron -40 +KPX Ocircumflex Tcommaaccent -40 +KPX Ocircumflex V -50 +KPX Ocircumflex W -30 +KPX Ocircumflex X -60 +KPX Ocircumflex Y -70 +KPX Ocircumflex Yacute -70 +KPX Ocircumflex Ydieresis -70 +KPX Ocircumflex comma -40 +KPX Ocircumflex period -40 +KPX Odieresis A -20 +KPX Odieresis Aacute -20 +KPX Odieresis Abreve -20 +KPX Odieresis Acircumflex -20 +KPX Odieresis Adieresis -20 +KPX Odieresis Agrave -20 +KPX Odieresis Amacron -20 +KPX Odieresis Aogonek -20 +KPX Odieresis Aring -20 +KPX Odieresis Atilde -20 +KPX Odieresis T -40 +KPX Odieresis Tcaron -40 +KPX Odieresis Tcommaaccent -40 +KPX Odieresis V -50 +KPX Odieresis W -30 +KPX Odieresis X -60 +KPX Odieresis Y -70 +KPX Odieresis Yacute -70 +KPX Odieresis Ydieresis -70 +KPX Odieresis comma -40 +KPX Odieresis period -40 +KPX Ograve A -20 +KPX Ograve Aacute -20 +KPX Ograve Abreve -20 +KPX Ograve Acircumflex -20 +KPX Ograve Adieresis -20 +KPX Ograve Agrave -20 +KPX Ograve Amacron -20 +KPX Ograve Aogonek -20 +KPX Ograve Aring -20 +KPX Ograve Atilde -20 +KPX Ograve T -40 +KPX Ograve Tcaron -40 +KPX Ograve Tcommaaccent -40 +KPX Ograve V -50 +KPX Ograve W -30 +KPX Ograve X -60 +KPX Ograve Y -70 +KPX Ograve Yacute -70 +KPX Ograve Ydieresis -70 +KPX Ograve comma -40 +KPX Ograve period -40 +KPX Ohungarumlaut A -20 +KPX Ohungarumlaut Aacute -20 +KPX Ohungarumlaut Abreve -20 +KPX Ohungarumlaut Acircumflex -20 +KPX Ohungarumlaut Adieresis -20 +KPX Ohungarumlaut Agrave -20 +KPX Ohungarumlaut Amacron -20 +KPX Ohungarumlaut Aogonek -20 +KPX Ohungarumlaut Aring -20 +KPX Ohungarumlaut Atilde -20 +KPX Ohungarumlaut T -40 +KPX Ohungarumlaut Tcaron -40 +KPX Ohungarumlaut Tcommaaccent -40 +KPX Ohungarumlaut V -50 +KPX Ohungarumlaut W -30 +KPX Ohungarumlaut X -60 +KPX Ohungarumlaut Y -70 +KPX Ohungarumlaut Yacute -70 +KPX Ohungarumlaut Ydieresis -70 +KPX Ohungarumlaut comma -40 +KPX Ohungarumlaut period -40 +KPX Omacron A -20 +KPX Omacron Aacute -20 +KPX Omacron Abreve -20 +KPX Omacron Acircumflex -20 +KPX Omacron Adieresis -20 +KPX Omacron Agrave -20 +KPX Omacron Amacron -20 +KPX Omacron Aogonek -20 +KPX Omacron Aring -20 +KPX Omacron Atilde -20 +KPX Omacron T -40 +KPX Omacron Tcaron -40 +KPX Omacron Tcommaaccent -40 +KPX Omacron V -50 +KPX Omacron W -30 +KPX Omacron X -60 +KPX Omacron Y -70 +KPX Omacron Yacute -70 +KPX Omacron Ydieresis -70 +KPX Omacron comma -40 +KPX Omacron period -40 +KPX Oslash A -20 +KPX Oslash Aacute -20 +KPX Oslash Abreve -20 +KPX Oslash Acircumflex -20 +KPX Oslash Adieresis -20 +KPX Oslash Agrave -20 +KPX Oslash Amacron -20 +KPX Oslash Aogonek -20 +KPX Oslash Aring -20 +KPX Oslash Atilde -20 +KPX Oslash T -40 +KPX Oslash Tcaron -40 +KPX Oslash Tcommaaccent -40 +KPX Oslash V -50 +KPX Oslash W -30 +KPX Oslash X -60 +KPX Oslash Y -70 +KPX Oslash Yacute -70 +KPX Oslash Ydieresis -70 +KPX Oslash comma -40 +KPX Oslash period -40 +KPX Otilde A -20 +KPX Otilde Aacute -20 +KPX Otilde Abreve -20 +KPX Otilde Acircumflex -20 +KPX Otilde Adieresis -20 +KPX Otilde Agrave -20 +KPX Otilde Amacron -20 +KPX Otilde Aogonek -20 +KPX Otilde Aring -20 +KPX Otilde Atilde -20 +KPX Otilde T -40 +KPX Otilde Tcaron -40 +KPX Otilde Tcommaaccent -40 +KPX Otilde V -50 +KPX Otilde W -30 +KPX Otilde X -60 +KPX Otilde Y -70 +KPX Otilde Yacute -70 +KPX Otilde Ydieresis -70 +KPX Otilde comma -40 +KPX Otilde period -40 +KPX P A -120 +KPX P Aacute -120 +KPX P Abreve -120 +KPX P Acircumflex -120 +KPX P Adieresis -120 +KPX P Agrave -120 +KPX P Amacron -120 +KPX P Aogonek -120 +KPX P Aring -120 +KPX P Atilde -120 +KPX P a -40 +KPX P aacute -40 +KPX P abreve -40 +KPX P acircumflex -40 +KPX P adieresis -40 +KPX P agrave -40 +KPX P amacron -40 +KPX P aogonek -40 +KPX P aring -40 +KPX P atilde -40 +KPX P comma -180 +KPX P e -50 +KPX P eacute -50 +KPX P ecaron -50 +KPX P ecircumflex -50 +KPX P edieresis -50 +KPX P edotaccent -50 +KPX P egrave -50 +KPX P emacron -50 +KPX P eogonek -50 +KPX P o -50 +KPX P oacute -50 +KPX P ocircumflex -50 +KPX P odieresis -50 +KPX P ograve -50 +KPX P ohungarumlaut -50 +KPX P omacron -50 +KPX P oslash -50 +KPX P otilde -50 +KPX P period -180 +KPX Q U -10 +KPX Q Uacute -10 +KPX Q Ucircumflex -10 +KPX Q Udieresis -10 +KPX Q Ugrave -10 +KPX Q Uhungarumlaut -10 +KPX Q Umacron -10 +KPX Q Uogonek -10 +KPX Q Uring -10 +KPX R O -20 +KPX R Oacute -20 +KPX R Ocircumflex -20 +KPX R Odieresis -20 +KPX R Ograve -20 +KPX R Ohungarumlaut -20 +KPX R Omacron -20 +KPX R Oslash -20 +KPX R Otilde -20 +KPX R T -30 +KPX R Tcaron -30 +KPX R Tcommaaccent -30 +KPX R U -40 +KPX R Uacute -40 +KPX R Ucircumflex -40 +KPX R Udieresis -40 +KPX R Ugrave -40 +KPX R Uhungarumlaut -40 +KPX R Umacron -40 +KPX R Uogonek -40 +KPX R Uring -40 +KPX R V -50 +KPX R W -30 +KPX R Y -50 +KPX R Yacute -50 +KPX R Ydieresis -50 +KPX Racute O -20 +KPX Racute Oacute -20 +KPX Racute Ocircumflex -20 +KPX Racute Odieresis -20 +KPX Racute Ograve -20 +KPX Racute Ohungarumlaut -20 +KPX Racute Omacron -20 +KPX Racute Oslash -20 +KPX Racute Otilde -20 +KPX Racute T -30 +KPX Racute Tcaron -30 +KPX Racute Tcommaaccent -30 +KPX Racute U -40 +KPX Racute Uacute -40 +KPX Racute Ucircumflex -40 +KPX Racute Udieresis -40 +KPX Racute Ugrave -40 +KPX Racute Uhungarumlaut -40 +KPX Racute Umacron -40 +KPX Racute Uogonek -40 +KPX Racute Uring -40 +KPX Racute V -50 +KPX Racute W -30 +KPX Racute Y -50 +KPX Racute Yacute -50 +KPX Racute Ydieresis -50 +KPX Rcaron O -20 +KPX Rcaron Oacute -20 +KPX Rcaron Ocircumflex -20 +KPX Rcaron Odieresis -20 +KPX Rcaron Ograve -20 +KPX Rcaron Ohungarumlaut -20 +KPX Rcaron Omacron -20 +KPX Rcaron Oslash -20 +KPX Rcaron Otilde -20 +KPX Rcaron T -30 +KPX Rcaron Tcaron -30 +KPX Rcaron Tcommaaccent -30 +KPX Rcaron U -40 +KPX Rcaron Uacute -40 +KPX Rcaron Ucircumflex -40 +KPX Rcaron Udieresis -40 +KPX Rcaron Ugrave -40 +KPX Rcaron Uhungarumlaut -40 +KPX Rcaron Umacron -40 +KPX Rcaron Uogonek -40 +KPX Rcaron Uring -40 +KPX Rcaron V -50 +KPX Rcaron W -30 +KPX Rcaron Y -50 +KPX Rcaron Yacute -50 +KPX Rcaron Ydieresis -50 +KPX Rcommaaccent O -20 +KPX Rcommaaccent Oacute -20 +KPX Rcommaaccent Ocircumflex -20 +KPX Rcommaaccent Odieresis -20 +KPX Rcommaaccent Ograve -20 +KPX Rcommaaccent Ohungarumlaut -20 +KPX Rcommaaccent Omacron -20 +KPX Rcommaaccent Oslash -20 +KPX Rcommaaccent Otilde -20 +KPX Rcommaaccent T -30 +KPX Rcommaaccent Tcaron -30 +KPX Rcommaaccent Tcommaaccent -30 +KPX Rcommaaccent U -40 +KPX Rcommaaccent Uacute -40 +KPX Rcommaaccent Ucircumflex -40 +KPX Rcommaaccent Udieresis -40 +KPX Rcommaaccent Ugrave -40 +KPX Rcommaaccent Uhungarumlaut -40 +KPX Rcommaaccent Umacron -40 +KPX Rcommaaccent Uogonek -40 +KPX Rcommaaccent Uring -40 +KPX Rcommaaccent V -50 +KPX Rcommaaccent W -30 +KPX Rcommaaccent Y -50 +KPX Rcommaaccent Yacute -50 +KPX Rcommaaccent Ydieresis -50 +KPX S comma -20 +KPX S period -20 +KPX Sacute comma -20 +KPX Sacute period -20 +KPX Scaron comma -20 +KPX Scaron period -20 +KPX Scedilla comma -20 +KPX Scedilla period -20 +KPX Scommaaccent comma -20 +KPX Scommaaccent period -20 +KPX T A -120 +KPX T Aacute -120 +KPX T Abreve -120 +KPX T Acircumflex -120 +KPX T Adieresis -120 +KPX T Agrave -120 +KPX T Amacron -120 +KPX T Aogonek -120 +KPX T Aring -120 +KPX T Atilde -120 +KPX T O -40 +KPX T Oacute -40 +KPX T Ocircumflex -40 +KPX T Odieresis -40 +KPX T Ograve -40 +KPX T Ohungarumlaut -40 +KPX T Omacron -40 +KPX T Oslash -40 +KPX T Otilde -40 +KPX T a -120 +KPX T aacute -120 +KPX T abreve -60 +KPX T acircumflex -120 +KPX T adieresis -120 +KPX T agrave -120 +KPX T amacron -60 +KPX T aogonek -120 +KPX T aring -120 +KPX T atilde -60 +KPX T colon -20 +KPX T comma -120 +KPX T e -120 +KPX T eacute -120 +KPX T ecaron -120 +KPX T ecircumflex -120 +KPX T edieresis -120 +KPX T edotaccent -120 +KPX T egrave -60 +KPX T emacron -60 +KPX T eogonek -120 +KPX T hyphen -140 +KPX T o -120 +KPX T oacute -120 +KPX T ocircumflex -120 +KPX T odieresis -120 +KPX T ograve -120 +KPX T ohungarumlaut -120 +KPX T omacron -60 +KPX T oslash -120 +KPX T otilde -60 +KPX T period -120 +KPX T r -120 +KPX T racute -120 +KPX T rcaron -120 +KPX T rcommaaccent -120 +KPX T semicolon -20 +KPX T u -120 +KPX T uacute -120 +KPX T ucircumflex -120 +KPX T udieresis -120 +KPX T ugrave -120 +KPX T uhungarumlaut -120 +KPX T umacron -60 +KPX T uogonek -120 +KPX T uring -120 +KPX T w -120 +KPX T y -120 +KPX T yacute -120 +KPX T ydieresis -60 +KPX Tcaron A -120 +KPX Tcaron Aacute -120 +KPX Tcaron Abreve -120 +KPX Tcaron Acircumflex -120 +KPX Tcaron Adieresis -120 +KPX Tcaron Agrave -120 +KPX Tcaron Amacron -120 +KPX Tcaron Aogonek -120 +KPX Tcaron Aring -120 +KPX Tcaron Atilde -120 +KPX Tcaron O -40 +KPX Tcaron Oacute -40 +KPX Tcaron Ocircumflex -40 +KPX Tcaron Odieresis -40 +KPX Tcaron Ograve -40 +KPX Tcaron Ohungarumlaut -40 +KPX Tcaron Omacron -40 +KPX Tcaron Oslash -40 +KPX Tcaron Otilde -40 +KPX Tcaron a -120 +KPX Tcaron aacute -120 +KPX Tcaron abreve -60 +KPX Tcaron acircumflex -120 +KPX Tcaron adieresis -120 +KPX Tcaron agrave -120 +KPX Tcaron amacron -60 +KPX Tcaron aogonek -120 +KPX Tcaron aring -120 +KPX Tcaron atilde -60 +KPX Tcaron colon -20 +KPX Tcaron comma -120 +KPX Tcaron e -120 +KPX Tcaron eacute -120 +KPX Tcaron ecaron -120 +KPX Tcaron ecircumflex -120 +KPX Tcaron edieresis -120 +KPX Tcaron edotaccent -120 +KPX Tcaron egrave -60 +KPX Tcaron emacron -60 +KPX Tcaron eogonek -120 +KPX Tcaron hyphen -140 +KPX Tcaron o -120 +KPX Tcaron oacute -120 +KPX Tcaron ocircumflex -120 +KPX Tcaron odieresis -120 +KPX Tcaron ograve -120 +KPX Tcaron ohungarumlaut -120 +KPX Tcaron omacron -60 +KPX Tcaron oslash -120 +KPX Tcaron otilde -60 +KPX Tcaron period -120 +KPX Tcaron r -120 +KPX Tcaron racute -120 +KPX Tcaron rcaron -120 +KPX Tcaron rcommaaccent -120 +KPX Tcaron semicolon -20 +KPX Tcaron u -120 +KPX Tcaron uacute -120 +KPX Tcaron ucircumflex -120 +KPX Tcaron udieresis -120 +KPX Tcaron ugrave -120 +KPX Tcaron uhungarumlaut -120 +KPX Tcaron umacron -60 +KPX Tcaron uogonek -120 +KPX Tcaron uring -120 +KPX Tcaron w -120 +KPX Tcaron y -120 +KPX Tcaron yacute -120 +KPX Tcaron ydieresis -60 +KPX Tcommaaccent A -120 +KPX Tcommaaccent Aacute -120 +KPX Tcommaaccent Abreve -120 +KPX Tcommaaccent Acircumflex -120 +KPX Tcommaaccent Adieresis -120 +KPX Tcommaaccent Agrave -120 +KPX Tcommaaccent Amacron -120 +KPX Tcommaaccent Aogonek -120 +KPX Tcommaaccent Aring -120 +KPX Tcommaaccent Atilde -120 +KPX Tcommaaccent O -40 +KPX Tcommaaccent Oacute -40 +KPX Tcommaaccent Ocircumflex -40 +KPX Tcommaaccent Odieresis -40 +KPX Tcommaaccent Ograve -40 +KPX Tcommaaccent Ohungarumlaut -40 +KPX Tcommaaccent Omacron -40 +KPX Tcommaaccent Oslash -40 +KPX Tcommaaccent Otilde -40 +KPX Tcommaaccent a -120 +KPX Tcommaaccent aacute -120 +KPX Tcommaaccent abreve -60 +KPX Tcommaaccent acircumflex -120 +KPX Tcommaaccent adieresis -120 +KPX Tcommaaccent agrave -120 +KPX Tcommaaccent amacron -60 +KPX Tcommaaccent aogonek -120 +KPX Tcommaaccent aring -120 +KPX Tcommaaccent atilde -60 +KPX Tcommaaccent colon -20 +KPX Tcommaaccent comma -120 +KPX Tcommaaccent e -120 +KPX Tcommaaccent eacute -120 +KPX Tcommaaccent ecaron -120 +KPX Tcommaaccent ecircumflex -120 +KPX Tcommaaccent edieresis -120 +KPX Tcommaaccent edotaccent -120 +KPX Tcommaaccent egrave -60 +KPX Tcommaaccent emacron -60 +KPX Tcommaaccent eogonek -120 +KPX Tcommaaccent hyphen -140 +KPX Tcommaaccent o -120 +KPX Tcommaaccent oacute -120 +KPX Tcommaaccent ocircumflex -120 +KPX Tcommaaccent odieresis -120 +KPX Tcommaaccent ograve -120 +KPX Tcommaaccent ohungarumlaut -120 +KPX Tcommaaccent omacron -60 +KPX Tcommaaccent oslash -120 +KPX Tcommaaccent otilde -60 +KPX Tcommaaccent period -120 +KPX Tcommaaccent r -120 +KPX Tcommaaccent racute -120 +KPX Tcommaaccent rcaron -120 +KPX Tcommaaccent rcommaaccent -120 +KPX Tcommaaccent semicolon -20 +KPX Tcommaaccent u -120 +KPX Tcommaaccent uacute -120 +KPX Tcommaaccent ucircumflex -120 +KPX Tcommaaccent udieresis -120 +KPX Tcommaaccent ugrave -120 +KPX Tcommaaccent uhungarumlaut -120 +KPX Tcommaaccent umacron -60 +KPX Tcommaaccent uogonek -120 +KPX Tcommaaccent uring -120 +KPX Tcommaaccent w -120 +KPX Tcommaaccent y -120 +KPX Tcommaaccent yacute -120 +KPX Tcommaaccent ydieresis -60 +KPX U A -40 +KPX U Aacute -40 +KPX U Abreve -40 +KPX U Acircumflex -40 +KPX U Adieresis -40 +KPX U Agrave -40 +KPX U Amacron -40 +KPX U Aogonek -40 +KPX U Aring -40 +KPX U Atilde -40 +KPX U comma -40 +KPX U period -40 +KPX Uacute A -40 +KPX Uacute Aacute -40 +KPX Uacute Abreve -40 +KPX Uacute Acircumflex -40 +KPX Uacute Adieresis -40 +KPX Uacute Agrave -40 +KPX Uacute Amacron -40 +KPX Uacute Aogonek -40 +KPX Uacute Aring -40 +KPX Uacute Atilde -40 +KPX Uacute comma -40 +KPX Uacute period -40 +KPX Ucircumflex A -40 +KPX Ucircumflex Aacute -40 +KPX Ucircumflex Abreve -40 +KPX Ucircumflex Acircumflex -40 +KPX Ucircumflex Adieresis -40 +KPX Ucircumflex Agrave -40 +KPX Ucircumflex Amacron -40 +KPX Ucircumflex Aogonek -40 +KPX Ucircumflex Aring -40 +KPX Ucircumflex Atilde -40 +KPX Ucircumflex comma -40 +KPX Ucircumflex period -40 +KPX Udieresis A -40 +KPX Udieresis Aacute -40 +KPX Udieresis Abreve -40 +KPX Udieresis Acircumflex -40 +KPX Udieresis Adieresis -40 +KPX Udieresis Agrave -40 +KPX Udieresis Amacron -40 +KPX Udieresis Aogonek -40 +KPX Udieresis Aring -40 +KPX Udieresis Atilde -40 +KPX Udieresis comma -40 +KPX Udieresis period -40 +KPX Ugrave A -40 +KPX Ugrave Aacute -40 +KPX Ugrave Abreve -40 +KPX Ugrave Acircumflex -40 +KPX Ugrave Adieresis -40 +KPX Ugrave Agrave -40 +KPX Ugrave Amacron -40 +KPX Ugrave Aogonek -40 +KPX Ugrave Aring -40 +KPX Ugrave Atilde -40 +KPX Ugrave comma -40 +KPX Ugrave period -40 +KPX Uhungarumlaut A -40 +KPX Uhungarumlaut Aacute -40 +KPX Uhungarumlaut Abreve -40 +KPX Uhungarumlaut Acircumflex -40 +KPX Uhungarumlaut Adieresis -40 +KPX Uhungarumlaut Agrave -40 +KPX Uhungarumlaut Amacron -40 +KPX Uhungarumlaut Aogonek -40 +KPX Uhungarumlaut Aring -40 +KPX Uhungarumlaut Atilde -40 +KPX Uhungarumlaut comma -40 +KPX Uhungarumlaut period -40 +KPX Umacron A -40 +KPX Umacron Aacute -40 +KPX Umacron Abreve -40 +KPX Umacron Acircumflex -40 +KPX Umacron Adieresis -40 +KPX Umacron Agrave -40 +KPX Umacron Amacron -40 +KPX Umacron Aogonek -40 +KPX Umacron Aring -40 +KPX Umacron Atilde -40 +KPX Umacron comma -40 +KPX Umacron period -40 +KPX Uogonek A -40 +KPX Uogonek Aacute -40 +KPX Uogonek Abreve -40 +KPX Uogonek Acircumflex -40 +KPX Uogonek Adieresis -40 +KPX Uogonek Agrave -40 +KPX Uogonek Amacron -40 +KPX Uogonek Aogonek -40 +KPX Uogonek Aring -40 +KPX Uogonek Atilde -40 +KPX Uogonek comma -40 +KPX Uogonek period -40 +KPX Uring A -40 +KPX Uring Aacute -40 +KPX Uring Abreve -40 +KPX Uring Acircumflex -40 +KPX Uring Adieresis -40 +KPX Uring Agrave -40 +KPX Uring Amacron -40 +KPX Uring Aogonek -40 +KPX Uring Aring -40 +KPX Uring Atilde -40 +KPX Uring comma -40 +KPX Uring period -40 +KPX V A -80 +KPX V Aacute -80 +KPX V Abreve -80 +KPX V Acircumflex -80 +KPX V Adieresis -80 +KPX V Agrave -80 +KPX V Amacron -80 +KPX V Aogonek -80 +KPX V Aring -80 +KPX V Atilde -80 +KPX V G -40 +KPX V Gbreve -40 +KPX V Gcommaaccent -40 +KPX V O -40 +KPX V Oacute -40 +KPX V Ocircumflex -40 +KPX V Odieresis -40 +KPX V Ograve -40 +KPX V Ohungarumlaut -40 +KPX V Omacron -40 +KPX V Oslash -40 +KPX V Otilde -40 +KPX V a -70 +KPX V aacute -70 +KPX V abreve -70 +KPX V acircumflex -70 +KPX V adieresis -70 +KPX V agrave -70 +KPX V amacron -70 +KPX V aogonek -70 +KPX V aring -70 +KPX V atilde -70 +KPX V colon -40 +KPX V comma -125 +KPX V e -80 +KPX V eacute -80 +KPX V ecaron -80 +KPX V ecircumflex -80 +KPX V edieresis -80 +KPX V edotaccent -80 +KPX V egrave -80 +KPX V emacron -80 +KPX V eogonek -80 +KPX V hyphen -80 +KPX V o -80 +KPX V oacute -80 +KPX V ocircumflex -80 +KPX V odieresis -80 +KPX V ograve -80 +KPX V ohungarumlaut -80 +KPX V omacron -80 +KPX V oslash -80 +KPX V otilde -80 +KPX V period -125 +KPX V semicolon -40 +KPX V u -70 +KPX V uacute -70 +KPX V ucircumflex -70 +KPX V udieresis -70 +KPX V ugrave -70 +KPX V uhungarumlaut -70 +KPX V umacron -70 +KPX V uogonek -70 +KPX V uring -70 +KPX W A -50 +KPX W Aacute -50 +KPX W Abreve -50 +KPX W Acircumflex -50 +KPX W Adieresis -50 +KPX W Agrave -50 +KPX W Amacron -50 +KPX W Aogonek -50 +KPX W Aring -50 +KPX W Atilde -50 +KPX W O -20 +KPX W Oacute -20 +KPX W Ocircumflex -20 +KPX W Odieresis -20 +KPX W Ograve -20 +KPX W Ohungarumlaut -20 +KPX W Omacron -20 +KPX W Oslash -20 +KPX W Otilde -20 +KPX W a -40 +KPX W aacute -40 +KPX W abreve -40 +KPX W acircumflex -40 +KPX W adieresis -40 +KPX W agrave -40 +KPX W amacron -40 +KPX W aogonek -40 +KPX W aring -40 +KPX W atilde -40 +KPX W comma -80 +KPX W e -30 +KPX W eacute -30 +KPX W ecaron -30 +KPX W ecircumflex -30 +KPX W edieresis -30 +KPX W edotaccent -30 +KPX W egrave -30 +KPX W emacron -30 +KPX W eogonek -30 +KPX W hyphen -40 +KPX W o -30 +KPX W oacute -30 +KPX W ocircumflex -30 +KPX W odieresis -30 +KPX W ograve -30 +KPX W ohungarumlaut -30 +KPX W omacron -30 +KPX W oslash -30 +KPX W otilde -30 +KPX W period -80 +KPX W u -30 +KPX W uacute -30 +KPX W ucircumflex -30 +KPX W udieresis -30 +KPX W ugrave -30 +KPX W uhungarumlaut -30 +KPX W umacron -30 +KPX W uogonek -30 +KPX W uring -30 +KPX W y -20 +KPX W yacute -20 +KPX W ydieresis -20 +KPX Y A -110 +KPX Y Aacute -110 +KPX Y Abreve -110 +KPX Y Acircumflex -110 +KPX Y Adieresis -110 +KPX Y Agrave -110 +KPX Y Amacron -110 +KPX Y Aogonek -110 +KPX Y Aring -110 +KPX Y Atilde -110 +KPX Y O -85 +KPX Y Oacute -85 +KPX Y Ocircumflex -85 +KPX Y Odieresis -85 +KPX Y Ograve -85 +KPX Y Ohungarumlaut -85 +KPX Y Omacron -85 +KPX Y Oslash -85 +KPX Y Otilde -85 +KPX Y a -140 +KPX Y aacute -140 +KPX Y abreve -70 +KPX Y acircumflex -140 +KPX Y adieresis -140 +KPX Y agrave -140 +KPX Y amacron -70 +KPX Y aogonek -140 +KPX Y aring -140 +KPX Y atilde -140 +KPX Y colon -60 +KPX Y comma -140 +KPX Y e -140 +KPX Y eacute -140 +KPX Y ecaron -140 +KPX Y ecircumflex -140 +KPX Y edieresis -140 +KPX Y edotaccent -140 +KPX Y egrave -140 +KPX Y emacron -70 +KPX Y eogonek -140 +KPX Y hyphen -140 +KPX Y i -20 +KPX Y iacute -20 +KPX Y iogonek -20 +KPX Y o -140 +KPX Y oacute -140 +KPX Y ocircumflex -140 +KPX Y odieresis -140 +KPX Y ograve -140 +KPX Y ohungarumlaut -140 +KPX Y omacron -140 +KPX Y oslash -140 +KPX Y otilde -140 +KPX Y period -140 +KPX Y semicolon -60 +KPX Y u -110 +KPX Y uacute -110 +KPX Y ucircumflex -110 +KPX Y udieresis -110 +KPX Y ugrave -110 +KPX Y uhungarumlaut -110 +KPX Y umacron -110 +KPX Y uogonek -110 +KPX Y uring -110 +KPX Yacute A -110 +KPX Yacute Aacute -110 +KPX Yacute Abreve -110 +KPX Yacute Acircumflex -110 +KPX Yacute Adieresis -110 +KPX Yacute Agrave -110 +KPX Yacute Amacron -110 +KPX Yacute Aogonek -110 +KPX Yacute Aring -110 +KPX Yacute Atilde -110 +KPX Yacute O -85 +KPX Yacute Oacute -85 +KPX Yacute Ocircumflex -85 +KPX Yacute Odieresis -85 +KPX Yacute Ograve -85 +KPX Yacute Ohungarumlaut -85 +KPX Yacute Omacron -85 +KPX Yacute Oslash -85 +KPX Yacute Otilde -85 +KPX Yacute a -140 +KPX Yacute aacute -140 +KPX Yacute abreve -70 +KPX Yacute acircumflex -140 +KPX Yacute adieresis -140 +KPX Yacute agrave -140 +KPX Yacute amacron -70 +KPX Yacute aogonek -140 +KPX Yacute aring -140 +KPX Yacute atilde -70 +KPX Yacute colon -60 +KPX Yacute comma -140 +KPX Yacute e -140 +KPX Yacute eacute -140 +KPX Yacute ecaron -140 +KPX Yacute ecircumflex -140 +KPX Yacute edieresis -140 +KPX Yacute edotaccent -140 +KPX Yacute egrave -140 +KPX Yacute emacron -70 +KPX Yacute eogonek -140 +KPX Yacute hyphen -140 +KPX Yacute i -20 +KPX Yacute iacute -20 +KPX Yacute iogonek -20 +KPX Yacute o -140 +KPX Yacute oacute -140 +KPX Yacute ocircumflex -140 +KPX Yacute odieresis -140 +KPX Yacute ograve -140 +KPX Yacute ohungarumlaut -140 +KPX Yacute omacron -70 +KPX Yacute oslash -140 +KPX Yacute otilde -140 +KPX Yacute period -140 +KPX Yacute semicolon -60 +KPX Yacute u -110 +KPX Yacute uacute -110 +KPX Yacute ucircumflex -110 +KPX Yacute udieresis -110 +KPX Yacute ugrave -110 +KPX Yacute uhungarumlaut -110 +KPX Yacute umacron -110 +KPX Yacute uogonek -110 +KPX Yacute uring -110 +KPX Ydieresis A -110 +KPX Ydieresis Aacute -110 +KPX Ydieresis Abreve -110 +KPX Ydieresis Acircumflex -110 +KPX Ydieresis Adieresis -110 +KPX Ydieresis Agrave -110 +KPX Ydieresis Amacron -110 +KPX Ydieresis Aogonek -110 +KPX Ydieresis Aring -110 +KPX Ydieresis Atilde -110 +KPX Ydieresis O -85 +KPX Ydieresis Oacute -85 +KPX Ydieresis Ocircumflex -85 +KPX Ydieresis Odieresis -85 +KPX Ydieresis Ograve -85 +KPX Ydieresis Ohungarumlaut -85 +KPX Ydieresis Omacron -85 +KPX Ydieresis Oslash -85 +KPX Ydieresis Otilde -85 +KPX Ydieresis a -140 +KPX Ydieresis aacute -140 +KPX Ydieresis abreve -70 +KPX Ydieresis acircumflex -140 +KPX Ydieresis adieresis -140 +KPX Ydieresis agrave -140 +KPX Ydieresis amacron -70 +KPX Ydieresis aogonek -140 +KPX Ydieresis aring -140 +KPX Ydieresis atilde -70 +KPX Ydieresis colon -60 +KPX Ydieresis comma -140 +KPX Ydieresis e -140 +KPX Ydieresis eacute -140 +KPX Ydieresis ecaron -140 +KPX Ydieresis ecircumflex -140 +KPX Ydieresis edieresis -140 +KPX Ydieresis edotaccent -140 +KPX Ydieresis egrave -140 +KPX Ydieresis emacron -70 +KPX Ydieresis eogonek -140 +KPX Ydieresis hyphen -140 +KPX Ydieresis i -20 +KPX Ydieresis iacute -20 +KPX Ydieresis iogonek -20 +KPX Ydieresis o -140 +KPX Ydieresis oacute -140 +KPX Ydieresis ocircumflex -140 +KPX Ydieresis odieresis -140 +KPX Ydieresis ograve -140 +KPX Ydieresis ohungarumlaut -140 +KPX Ydieresis omacron -140 +KPX Ydieresis oslash -140 +KPX Ydieresis otilde -140 +KPX Ydieresis period -140 +KPX Ydieresis semicolon -60 +KPX Ydieresis u -110 +KPX Ydieresis uacute -110 +KPX Ydieresis ucircumflex -110 +KPX Ydieresis udieresis -110 +KPX Ydieresis ugrave -110 +KPX Ydieresis uhungarumlaut -110 +KPX Ydieresis umacron -110 +KPX Ydieresis uogonek -110 +KPX Ydieresis uring -110 +KPX a v -20 +KPX a w -20 +KPX a y -30 +KPX a yacute -30 +KPX a ydieresis -30 +KPX aacute v -20 +KPX aacute w -20 +KPX aacute y -30 +KPX aacute yacute -30 +KPX aacute ydieresis -30 +KPX abreve v -20 +KPX abreve w -20 +KPX abreve y -30 +KPX abreve yacute -30 +KPX abreve ydieresis -30 +KPX acircumflex v -20 +KPX acircumflex w -20 +KPX acircumflex y -30 +KPX acircumflex yacute -30 +KPX acircumflex ydieresis -30 +KPX adieresis v -20 +KPX adieresis w -20 +KPX adieresis y -30 +KPX adieresis yacute -30 +KPX adieresis ydieresis -30 +KPX agrave v -20 +KPX agrave w -20 +KPX agrave y -30 +KPX agrave yacute -30 +KPX agrave ydieresis -30 +KPX amacron v -20 +KPX amacron w -20 +KPX amacron y -30 +KPX amacron yacute -30 +KPX amacron ydieresis -30 +KPX aogonek v -20 +KPX aogonek w -20 +KPX aogonek y -30 +KPX aogonek yacute -30 +KPX aogonek ydieresis -30 +KPX aring v -20 +KPX aring w -20 +KPX aring y -30 +KPX aring yacute -30 +KPX aring ydieresis -30 +KPX atilde v -20 +KPX atilde w -20 +KPX atilde y -30 +KPX atilde yacute -30 +KPX atilde ydieresis -30 +KPX b b -10 +KPX b comma -40 +KPX b l -20 +KPX b lacute -20 +KPX b lcommaaccent -20 +KPX b lslash -20 +KPX b period -40 +KPX b u -20 +KPX b uacute -20 +KPX b ucircumflex -20 +KPX b udieresis -20 +KPX b ugrave -20 +KPX b uhungarumlaut -20 +KPX b umacron -20 +KPX b uogonek -20 +KPX b uring -20 +KPX b v -20 +KPX b y -20 +KPX b yacute -20 +KPX b ydieresis -20 +KPX c comma -15 +KPX c k -20 +KPX c kcommaaccent -20 +KPX cacute comma -15 +KPX cacute k -20 +KPX cacute kcommaaccent -20 +KPX ccaron comma -15 +KPX ccaron k -20 +KPX ccaron kcommaaccent -20 +KPX ccedilla comma -15 +KPX ccedilla k -20 +KPX ccedilla kcommaaccent -20 +KPX colon space -50 +KPX comma quotedblright -100 +KPX comma quoteright -100 +KPX e comma -15 +KPX e period -15 +KPX e v -30 +KPX e w -20 +KPX e x -30 +KPX e y -20 +KPX e yacute -20 +KPX e ydieresis -20 +KPX eacute comma -15 +KPX eacute period -15 +KPX eacute v -30 +KPX eacute w -20 +KPX eacute x -30 +KPX eacute y -20 +KPX eacute yacute -20 +KPX eacute ydieresis -20 +KPX ecaron comma -15 +KPX ecaron period -15 +KPX ecaron v -30 +KPX ecaron w -20 +KPX ecaron x -30 +KPX ecaron y -20 +KPX ecaron yacute -20 +KPX ecaron ydieresis -20 +KPX ecircumflex comma -15 +KPX ecircumflex period -15 +KPX ecircumflex v -30 +KPX ecircumflex w -20 +KPX ecircumflex x -30 +KPX ecircumflex y -20 +KPX ecircumflex yacute -20 +KPX ecircumflex ydieresis -20 +KPX edieresis comma -15 +KPX edieresis period -15 +KPX edieresis v -30 +KPX edieresis w -20 +KPX edieresis x -30 +KPX edieresis y -20 +KPX edieresis yacute -20 +KPX edieresis ydieresis -20 +KPX edotaccent comma -15 +KPX edotaccent period -15 +KPX edotaccent v -30 +KPX edotaccent w -20 +KPX edotaccent x -30 +KPX edotaccent y -20 +KPX edotaccent yacute -20 +KPX edotaccent ydieresis -20 +KPX egrave comma -15 +KPX egrave period -15 +KPX egrave v -30 +KPX egrave w -20 +KPX egrave x -30 +KPX egrave y -20 +KPX egrave yacute -20 +KPX egrave ydieresis -20 +KPX emacron comma -15 +KPX emacron period -15 +KPX emacron v -30 +KPX emacron w -20 +KPX emacron x -30 +KPX emacron y -20 +KPX emacron yacute -20 +KPX emacron ydieresis -20 +KPX eogonek comma -15 +KPX eogonek period -15 +KPX eogonek v -30 +KPX eogonek w -20 +KPX eogonek x -30 +KPX eogonek y -20 +KPX eogonek yacute -20 +KPX eogonek ydieresis -20 +KPX f a -30 +KPX f aacute -30 +KPX f abreve -30 +KPX f acircumflex -30 +KPX f adieresis -30 +KPX f agrave -30 +KPX f amacron -30 +KPX f aogonek -30 +KPX f aring -30 +KPX f atilde -30 +KPX f comma -30 +KPX f dotlessi -28 +KPX f e -30 +KPX f eacute -30 +KPX f ecaron -30 +KPX f ecircumflex -30 +KPX f edieresis -30 +KPX f edotaccent -30 +KPX f egrave -30 +KPX f emacron -30 +KPX f eogonek -30 +KPX f o -30 +KPX f oacute -30 +KPX f ocircumflex -30 +KPX f odieresis -30 +KPX f ograve -30 +KPX f ohungarumlaut -30 +KPX f omacron -30 +KPX f oslash -30 +KPX f otilde -30 +KPX f period -30 +KPX f quotedblright 60 +KPX f quoteright 50 +KPX g r -10 +KPX g racute -10 +KPX g rcaron -10 +KPX g rcommaaccent -10 +KPX gbreve r -10 +KPX gbreve racute -10 +KPX gbreve rcaron -10 +KPX gbreve rcommaaccent -10 +KPX gcommaaccent r -10 +KPX gcommaaccent racute -10 +KPX gcommaaccent rcaron -10 +KPX gcommaaccent rcommaaccent -10 +KPX h y -30 +KPX h yacute -30 +KPX h ydieresis -30 +KPX k e -20 +KPX k eacute -20 +KPX k ecaron -20 +KPX k ecircumflex -20 +KPX k edieresis -20 +KPX k edotaccent -20 +KPX k egrave -20 +KPX k emacron -20 +KPX k eogonek -20 +KPX k o -20 +KPX k oacute -20 +KPX k ocircumflex -20 +KPX k odieresis -20 +KPX k ograve -20 +KPX k ohungarumlaut -20 +KPX k omacron -20 +KPX k oslash -20 +KPX k otilde -20 +KPX kcommaaccent e -20 +KPX kcommaaccent eacute -20 +KPX kcommaaccent ecaron -20 +KPX kcommaaccent ecircumflex -20 +KPX kcommaaccent edieresis -20 +KPX kcommaaccent edotaccent -20 +KPX kcommaaccent egrave -20 +KPX kcommaaccent emacron -20 +KPX kcommaaccent eogonek -20 +KPX kcommaaccent o -20 +KPX kcommaaccent oacute -20 +KPX kcommaaccent ocircumflex -20 +KPX kcommaaccent odieresis -20 +KPX kcommaaccent ograve -20 +KPX kcommaaccent ohungarumlaut -20 +KPX kcommaaccent omacron -20 +KPX kcommaaccent oslash -20 +KPX kcommaaccent otilde -20 +KPX m u -10 +KPX m uacute -10 +KPX m ucircumflex -10 +KPX m udieresis -10 +KPX m ugrave -10 +KPX m uhungarumlaut -10 +KPX m umacron -10 +KPX m uogonek -10 +KPX m uring -10 +KPX m y -15 +KPX m yacute -15 +KPX m ydieresis -15 +KPX n u -10 +KPX n uacute -10 +KPX n ucircumflex -10 +KPX n udieresis -10 +KPX n ugrave -10 +KPX n uhungarumlaut -10 +KPX n umacron -10 +KPX n uogonek -10 +KPX n uring -10 +KPX n v -20 +KPX n y -15 +KPX n yacute -15 +KPX n ydieresis -15 +KPX nacute u -10 +KPX nacute uacute -10 +KPX nacute ucircumflex -10 +KPX nacute udieresis -10 +KPX nacute ugrave -10 +KPX nacute uhungarumlaut -10 +KPX nacute umacron -10 +KPX nacute uogonek -10 +KPX nacute uring -10 +KPX nacute v -20 +KPX nacute y -15 +KPX nacute yacute -15 +KPX nacute ydieresis -15 +KPX ncaron u -10 +KPX ncaron uacute -10 +KPX ncaron ucircumflex -10 +KPX ncaron udieresis -10 +KPX ncaron ugrave -10 +KPX ncaron uhungarumlaut -10 +KPX ncaron umacron -10 +KPX ncaron uogonek -10 +KPX ncaron uring -10 +KPX ncaron v -20 +KPX ncaron y -15 +KPX ncaron yacute -15 +KPX ncaron ydieresis -15 +KPX ncommaaccent u -10 +KPX ncommaaccent uacute -10 +KPX ncommaaccent ucircumflex -10 +KPX ncommaaccent udieresis -10 +KPX ncommaaccent ugrave -10 +KPX ncommaaccent uhungarumlaut -10 +KPX ncommaaccent umacron -10 +KPX ncommaaccent uogonek -10 +KPX ncommaaccent uring -10 +KPX ncommaaccent v -20 +KPX ncommaaccent y -15 +KPX ncommaaccent yacute -15 +KPX ncommaaccent ydieresis -15 +KPX ntilde u -10 +KPX ntilde uacute -10 +KPX ntilde ucircumflex -10 +KPX ntilde udieresis -10 +KPX ntilde ugrave -10 +KPX ntilde uhungarumlaut -10 +KPX ntilde umacron -10 +KPX ntilde uogonek -10 +KPX ntilde uring -10 +KPX ntilde v -20 +KPX ntilde y -15 +KPX ntilde yacute -15 +KPX ntilde ydieresis -15 +KPX o comma -40 +KPX o period -40 +KPX o v -15 +KPX o w -15 +KPX o x -30 +KPX o y -30 +KPX o yacute -30 +KPX o ydieresis -30 +KPX oacute comma -40 +KPX oacute period -40 +KPX oacute v -15 +KPX oacute w -15 +KPX oacute x -30 +KPX oacute y -30 +KPX oacute yacute -30 +KPX oacute ydieresis -30 +KPX ocircumflex comma -40 +KPX ocircumflex period -40 +KPX ocircumflex v -15 +KPX ocircumflex w -15 +KPX ocircumflex x -30 +KPX ocircumflex y -30 +KPX ocircumflex yacute -30 +KPX ocircumflex ydieresis -30 +KPX odieresis comma -40 +KPX odieresis period -40 +KPX odieresis v -15 +KPX odieresis w -15 +KPX odieresis x -30 +KPX odieresis y -30 +KPX odieresis yacute -30 +KPX odieresis ydieresis -30 +KPX ograve comma -40 +KPX ograve period -40 +KPX ograve v -15 +KPX ograve w -15 +KPX ograve x -30 +KPX ograve y -30 +KPX ograve yacute -30 +KPX ograve ydieresis -30 +KPX ohungarumlaut comma -40 +KPX ohungarumlaut period -40 +KPX ohungarumlaut v -15 +KPX ohungarumlaut w -15 +KPX ohungarumlaut x -30 +KPX ohungarumlaut y -30 +KPX ohungarumlaut yacute -30 +KPX ohungarumlaut ydieresis -30 +KPX omacron comma -40 +KPX omacron period -40 +KPX omacron v -15 +KPX omacron w -15 +KPX omacron x -30 +KPX omacron y -30 +KPX omacron yacute -30 +KPX omacron ydieresis -30 +KPX oslash a -55 +KPX oslash aacute -55 +KPX oslash abreve -55 +KPX oslash acircumflex -55 +KPX oslash adieresis -55 +KPX oslash agrave -55 +KPX oslash amacron -55 +KPX oslash aogonek -55 +KPX oslash aring -55 +KPX oslash atilde -55 +KPX oslash b -55 +KPX oslash c -55 +KPX oslash cacute -55 +KPX oslash ccaron -55 +KPX oslash ccedilla -55 +KPX oslash comma -95 +KPX oslash d -55 +KPX oslash dcroat -55 +KPX oslash e -55 +KPX oslash eacute -55 +KPX oslash ecaron -55 +KPX oslash ecircumflex -55 +KPX oslash edieresis -55 +KPX oslash edotaccent -55 +KPX oslash egrave -55 +KPX oslash emacron -55 +KPX oslash eogonek -55 +KPX oslash f -55 +KPX oslash g -55 +KPX oslash gbreve -55 +KPX oslash gcommaaccent -55 +KPX oslash h -55 +KPX oslash i -55 +KPX oslash iacute -55 +KPX oslash icircumflex -55 +KPX oslash idieresis -55 +KPX oslash igrave -55 +KPX oslash imacron -55 +KPX oslash iogonek -55 +KPX oslash j -55 +KPX oslash k -55 +KPX oslash kcommaaccent -55 +KPX oslash l -55 +KPX oslash lacute -55 +KPX oslash lcommaaccent -55 +KPX oslash lslash -55 +KPX oslash m -55 +KPX oslash n -55 +KPX oslash nacute -55 +KPX oslash ncaron -55 +KPX oslash ncommaaccent -55 +KPX oslash ntilde -55 +KPX oslash o -55 +KPX oslash oacute -55 +KPX oslash ocircumflex -55 +KPX oslash odieresis -55 +KPX oslash ograve -55 +KPX oslash ohungarumlaut -55 +KPX oslash omacron -55 +KPX oslash oslash -55 +KPX oslash otilde -55 +KPX oslash p -55 +KPX oslash period -95 +KPX oslash q -55 +KPX oslash r -55 +KPX oslash racute -55 +KPX oslash rcaron -55 +KPX oslash rcommaaccent -55 +KPX oslash s -55 +KPX oslash sacute -55 +KPX oslash scaron -55 +KPX oslash scedilla -55 +KPX oslash scommaaccent -55 +KPX oslash t -55 +KPX oslash tcommaaccent -55 +KPX oslash u -55 +KPX oslash uacute -55 +KPX oslash ucircumflex -55 +KPX oslash udieresis -55 +KPX oslash ugrave -55 +KPX oslash uhungarumlaut -55 +KPX oslash umacron -55 +KPX oslash uogonek -55 +KPX oslash uring -55 +KPX oslash v -70 +KPX oslash w -70 +KPX oslash x -85 +KPX oslash y -70 +KPX oslash yacute -70 +KPX oslash ydieresis -70 +KPX oslash z -55 +KPX oslash zacute -55 +KPX oslash zcaron -55 +KPX oslash zdotaccent -55 +KPX otilde comma -40 +KPX otilde period -40 +KPX otilde v -15 +KPX otilde w -15 +KPX otilde x -30 +KPX otilde y -30 +KPX otilde yacute -30 +KPX otilde ydieresis -30 +KPX p comma -35 +KPX p period -35 +KPX p y -30 +KPX p yacute -30 +KPX p ydieresis -30 +KPX period quotedblright -100 +KPX period quoteright -100 +KPX period space -60 +KPX quotedblright space -40 +KPX quoteleft quoteleft -57 +KPX quoteright d -50 +KPX quoteright dcroat -50 +KPX quoteright quoteright -57 +KPX quoteright r -50 +KPX quoteright racute -50 +KPX quoteright rcaron -50 +KPX quoteright rcommaaccent -50 +KPX quoteright s -50 +KPX quoteright sacute -50 +KPX quoteright scaron -50 +KPX quoteright scedilla -50 +KPX quoteright scommaaccent -50 +KPX quoteright space -70 +KPX r a -10 +KPX r aacute -10 +KPX r abreve -10 +KPX r acircumflex -10 +KPX r adieresis -10 +KPX r agrave -10 +KPX r amacron -10 +KPX r aogonek -10 +KPX r aring -10 +KPX r atilde -10 +KPX r colon 30 +KPX r comma -50 +KPX r i 15 +KPX r iacute 15 +KPX r icircumflex 15 +KPX r idieresis 15 +KPX r igrave 15 +KPX r imacron 15 +KPX r iogonek 15 +KPX r k 15 +KPX r kcommaaccent 15 +KPX r l 15 +KPX r lacute 15 +KPX r lcommaaccent 15 +KPX r lslash 15 +KPX r m 25 +KPX r n 25 +KPX r nacute 25 +KPX r ncaron 25 +KPX r ncommaaccent 25 +KPX r ntilde 25 +KPX r p 30 +KPX r period -50 +KPX r semicolon 30 +KPX r t 40 +KPX r tcommaaccent 40 +KPX r u 15 +KPX r uacute 15 +KPX r ucircumflex 15 +KPX r udieresis 15 +KPX r ugrave 15 +KPX r uhungarumlaut 15 +KPX r umacron 15 +KPX r uogonek 15 +KPX r uring 15 +KPX r v 30 +KPX r y 30 +KPX r yacute 30 +KPX r ydieresis 30 +KPX racute a -10 +KPX racute aacute -10 +KPX racute abreve -10 +KPX racute acircumflex -10 +KPX racute adieresis -10 +KPX racute agrave -10 +KPX racute amacron -10 +KPX racute aogonek -10 +KPX racute aring -10 +KPX racute atilde -10 +KPX racute colon 30 +KPX racute comma -50 +KPX racute i 15 +KPX racute iacute 15 +KPX racute icircumflex 15 +KPX racute idieresis 15 +KPX racute igrave 15 +KPX racute imacron 15 +KPX racute iogonek 15 +KPX racute k 15 +KPX racute kcommaaccent 15 +KPX racute l 15 +KPX racute lacute 15 +KPX racute lcommaaccent 15 +KPX racute lslash 15 +KPX racute m 25 +KPX racute n 25 +KPX racute nacute 25 +KPX racute ncaron 25 +KPX racute ncommaaccent 25 +KPX racute ntilde 25 +KPX racute p 30 +KPX racute period -50 +KPX racute semicolon 30 +KPX racute t 40 +KPX racute tcommaaccent 40 +KPX racute u 15 +KPX racute uacute 15 +KPX racute ucircumflex 15 +KPX racute udieresis 15 +KPX racute ugrave 15 +KPX racute uhungarumlaut 15 +KPX racute umacron 15 +KPX racute uogonek 15 +KPX racute uring 15 +KPX racute v 30 +KPX racute y 30 +KPX racute yacute 30 +KPX racute ydieresis 30 +KPX rcaron a -10 +KPX rcaron aacute -10 +KPX rcaron abreve -10 +KPX rcaron acircumflex -10 +KPX rcaron adieresis -10 +KPX rcaron agrave -10 +KPX rcaron amacron -10 +KPX rcaron aogonek -10 +KPX rcaron aring -10 +KPX rcaron atilde -10 +KPX rcaron colon 30 +KPX rcaron comma -50 +KPX rcaron i 15 +KPX rcaron iacute 15 +KPX rcaron icircumflex 15 +KPX rcaron idieresis 15 +KPX rcaron igrave 15 +KPX rcaron imacron 15 +KPX rcaron iogonek 15 +KPX rcaron k 15 +KPX rcaron kcommaaccent 15 +KPX rcaron l 15 +KPX rcaron lacute 15 +KPX rcaron lcommaaccent 15 +KPX rcaron lslash 15 +KPX rcaron m 25 +KPX rcaron n 25 +KPX rcaron nacute 25 +KPX rcaron ncaron 25 +KPX rcaron ncommaaccent 25 +KPX rcaron ntilde 25 +KPX rcaron p 30 +KPX rcaron period -50 +KPX rcaron semicolon 30 +KPX rcaron t 40 +KPX rcaron tcommaaccent 40 +KPX rcaron u 15 +KPX rcaron uacute 15 +KPX rcaron ucircumflex 15 +KPX rcaron udieresis 15 +KPX rcaron ugrave 15 +KPX rcaron uhungarumlaut 15 +KPX rcaron umacron 15 +KPX rcaron uogonek 15 +KPX rcaron uring 15 +KPX rcaron v 30 +KPX rcaron y 30 +KPX rcaron yacute 30 +KPX rcaron ydieresis 30 +KPX rcommaaccent a -10 +KPX rcommaaccent aacute -10 +KPX rcommaaccent abreve -10 +KPX rcommaaccent acircumflex -10 +KPX rcommaaccent adieresis -10 +KPX rcommaaccent agrave -10 +KPX rcommaaccent amacron -10 +KPX rcommaaccent aogonek -10 +KPX rcommaaccent aring -10 +KPX rcommaaccent atilde -10 +KPX rcommaaccent colon 30 +KPX rcommaaccent comma -50 +KPX rcommaaccent i 15 +KPX rcommaaccent iacute 15 +KPX rcommaaccent icircumflex 15 +KPX rcommaaccent idieresis 15 +KPX rcommaaccent igrave 15 +KPX rcommaaccent imacron 15 +KPX rcommaaccent iogonek 15 +KPX rcommaaccent k 15 +KPX rcommaaccent kcommaaccent 15 +KPX rcommaaccent l 15 +KPX rcommaaccent lacute 15 +KPX rcommaaccent lcommaaccent 15 +KPX rcommaaccent lslash 15 +KPX rcommaaccent m 25 +KPX rcommaaccent n 25 +KPX rcommaaccent nacute 25 +KPX rcommaaccent ncaron 25 +KPX rcommaaccent ncommaaccent 25 +KPX rcommaaccent ntilde 25 +KPX rcommaaccent p 30 +KPX rcommaaccent period -50 +KPX rcommaaccent semicolon 30 +KPX rcommaaccent t 40 +KPX rcommaaccent tcommaaccent 40 +KPX rcommaaccent u 15 +KPX rcommaaccent uacute 15 +KPX rcommaaccent ucircumflex 15 +KPX rcommaaccent udieresis 15 +KPX rcommaaccent ugrave 15 +KPX rcommaaccent uhungarumlaut 15 +KPX rcommaaccent umacron 15 +KPX rcommaaccent uogonek 15 +KPX rcommaaccent uring 15 +KPX rcommaaccent v 30 +KPX rcommaaccent y 30 +KPX rcommaaccent yacute 30 +KPX rcommaaccent ydieresis 30 +KPX s comma -15 +KPX s period -15 +KPX s w -30 +KPX sacute comma -15 +KPX sacute period -15 +KPX sacute w -30 +KPX scaron comma -15 +KPX scaron period -15 +KPX scaron w -30 +KPX scedilla comma -15 +KPX scedilla period -15 +KPX scedilla w -30 +KPX scommaaccent comma -15 +KPX scommaaccent period -15 +KPX scommaaccent w -30 +KPX semicolon space -50 +KPX space T -50 +KPX space Tcaron -50 +KPX space Tcommaaccent -50 +KPX space V -50 +KPX space W -40 +KPX space Y -90 +KPX space Yacute -90 +KPX space Ydieresis -90 +KPX space quotedblleft -30 +KPX space quoteleft -60 +KPX v a -25 +KPX v aacute -25 +KPX v abreve -25 +KPX v acircumflex -25 +KPX v adieresis -25 +KPX v agrave -25 +KPX v amacron -25 +KPX v aogonek -25 +KPX v aring -25 +KPX v atilde -25 +KPX v comma -80 +KPX v e -25 +KPX v eacute -25 +KPX v ecaron -25 +KPX v ecircumflex -25 +KPX v edieresis -25 +KPX v edotaccent -25 +KPX v egrave -25 +KPX v emacron -25 +KPX v eogonek -25 +KPX v o -25 +KPX v oacute -25 +KPX v ocircumflex -25 +KPX v odieresis -25 +KPX v ograve -25 +KPX v ohungarumlaut -25 +KPX v omacron -25 +KPX v oslash -25 +KPX v otilde -25 +KPX v period -80 +KPX w a -15 +KPX w aacute -15 +KPX w abreve -15 +KPX w acircumflex -15 +KPX w adieresis -15 +KPX w agrave -15 +KPX w amacron -15 +KPX w aogonek -15 +KPX w aring -15 +KPX w atilde -15 +KPX w comma -60 +KPX w e -10 +KPX w eacute -10 +KPX w ecaron -10 +KPX w ecircumflex -10 +KPX w edieresis -10 +KPX w edotaccent -10 +KPX w egrave -10 +KPX w emacron -10 +KPX w eogonek -10 +KPX w o -10 +KPX w oacute -10 +KPX w ocircumflex -10 +KPX w odieresis -10 +KPX w ograve -10 +KPX w ohungarumlaut -10 +KPX w omacron -10 +KPX w oslash -10 +KPX w otilde -10 +KPX w period -60 +KPX x e -30 +KPX x eacute -30 +KPX x ecaron -30 +KPX x ecircumflex -30 +KPX x edieresis -30 +KPX x edotaccent -30 +KPX x egrave -30 +KPX x emacron -30 +KPX x eogonek -30 +KPX y a -20 +KPX y aacute -20 +KPX y abreve -20 +KPX y acircumflex -20 +KPX y adieresis -20 +KPX y agrave -20 +KPX y amacron -20 +KPX y aogonek -20 +KPX y aring -20 +KPX y atilde -20 +KPX y comma -100 +KPX y e -20 +KPX y eacute -20 +KPX y ecaron -20 +KPX y ecircumflex -20 +KPX y edieresis -20 +KPX y edotaccent -20 +KPX y egrave -20 +KPX y emacron -20 +KPX y eogonek -20 +KPX y o -20 +KPX y oacute -20 +KPX y ocircumflex -20 +KPX y odieresis -20 +KPX y ograve -20 +KPX y ohungarumlaut -20 +KPX y omacron -20 +KPX y oslash -20 +KPX y otilde -20 +KPX y period -100 +KPX yacute a -20 +KPX yacute aacute -20 +KPX yacute abreve -20 +KPX yacute acircumflex -20 +KPX yacute adieresis -20 +KPX yacute agrave -20 +KPX yacute amacron -20 +KPX yacute aogonek -20 +KPX yacute aring -20 +KPX yacute atilde -20 +KPX yacute comma -100 +KPX yacute e -20 +KPX yacute eacute -20 +KPX yacute ecaron -20 +KPX yacute ecircumflex -20 +KPX yacute edieresis -20 +KPX yacute edotaccent -20 +KPX yacute egrave -20 +KPX yacute emacron -20 +KPX yacute eogonek -20 +KPX yacute o -20 +KPX yacute oacute -20 +KPX yacute ocircumflex -20 +KPX yacute odieresis -20 +KPX yacute ograve -20 +KPX yacute ohungarumlaut -20 +KPX yacute omacron -20 +KPX yacute oslash -20 +KPX yacute otilde -20 +KPX yacute period -100 +KPX ydieresis a -20 +KPX ydieresis aacute -20 +KPX ydieresis abreve -20 +KPX ydieresis acircumflex -20 +KPX ydieresis adieresis -20 +KPX ydieresis agrave -20 +KPX ydieresis amacron -20 +KPX ydieresis aogonek -20 +KPX ydieresis aring -20 +KPX ydieresis atilde -20 +KPX ydieresis comma -100 +KPX ydieresis e -20 +KPX ydieresis eacute -20 +KPX ydieresis ecaron -20 +KPX ydieresis ecircumflex -20 +KPX ydieresis edieresis -20 +KPX ydieresis edotaccent -20 +KPX ydieresis egrave -20 +KPX ydieresis emacron -20 +KPX ydieresis eogonek -20 +KPX ydieresis o -20 +KPX ydieresis oacute -20 +KPX ydieresis ocircumflex -20 +KPX ydieresis odieresis -20 +KPX ydieresis ograve -20 +KPX ydieresis ohungarumlaut -20 +KPX ydieresis omacron -20 +KPX ydieresis oslash -20 +KPX ydieresis otilde -20 +KPX ydieresis period -100 +KPX z e -15 +KPX z eacute -15 +KPX z ecaron -15 +KPX z ecircumflex -15 +KPX z edieresis -15 +KPX z edotaccent -15 +KPX z egrave -15 +KPX z emacron -15 +KPX z eogonek -15 +KPX z o -15 +KPX z oacute -15 +KPX z ocircumflex -15 +KPX z odieresis -15 +KPX z ograve -15 +KPX z ohungarumlaut -15 +KPX z omacron -15 +KPX z oslash -15 +KPX z otilde -15 +KPX zacute e -15 +KPX zacute eacute -15 +KPX zacute ecaron -15 +KPX zacute ecircumflex -15 +KPX zacute edieresis -15 +KPX zacute edotaccent -15 +KPX zacute egrave -15 +KPX zacute emacron -15 +KPX zacute eogonek -15 +KPX zacute o -15 +KPX zacute oacute -15 +KPX zacute ocircumflex -15 +KPX zacute odieresis -15 +KPX zacute ograve -15 +KPX zacute ohungarumlaut -15 +KPX zacute omacron -15 +KPX zacute oslash -15 +KPX zacute otilde -15 +KPX zcaron e -15 +KPX zcaron eacute -15 +KPX zcaron ecaron -15 +KPX zcaron ecircumflex -15 +KPX zcaron edieresis -15 +KPX zcaron edotaccent -15 +KPX zcaron egrave -15 +KPX zcaron emacron -15 +KPX zcaron eogonek -15 +KPX zcaron o -15 +KPX zcaron oacute -15 +KPX zcaron ocircumflex -15 +KPX zcaron odieresis -15 +KPX zcaron ograve -15 +KPX zcaron ohungarumlaut -15 +KPX zcaron omacron -15 +KPX zcaron oslash -15 +KPX zcaron otilde -15 +KPX zdotaccent e -15 +KPX zdotaccent eacute -15 +KPX zdotaccent ecaron -15 +KPX zdotaccent ecircumflex -15 +KPX zdotaccent edieresis -15 +KPX zdotaccent edotaccent -15 +KPX zdotaccent egrave -15 +KPX zdotaccent emacron -15 +KPX zdotaccent eogonek -15 +KPX zdotaccent o -15 +KPX zdotaccent oacute -15 +KPX zdotaccent ocircumflex -15 +KPX zdotaccent odieresis -15 +KPX zdotaccent ograve -15 +KPX zdotaccent ohungarumlaut -15 +KPX zdotaccent omacron -15 +KPX zdotaccent oslash -15 +KPX zdotaccent otilde -15 +EndKernPairs +EndKernData +EndFontMetrics diff --git a/pitfall/pdfkit/lib/font/data/MustRead.html b/pitfall/pdfkit/lib/font/data/MustRead.html new file mode 100755 index 00000000..6dada97b --- /dev/null +++ b/pitfall/pdfkit/lib/font/data/MustRead.html @@ -0,0 +1,19 @@ + + + + + + Core 14 AFM Files - ReadMe + + + + or + + + + + +
This file and the 14 PostScript(R) AFM files it accompanies may be used, copied, and distributed for any purpose and without charge, with or without modification, provided that all copyright notices are retained; that the AFM files are not distributed without this file; that all modifications to this file or any of the AFM files are prominently noted in the modified file(s); and that this paragraph is not modified. Adobe Systems has no responsibility or obligation to support the use of the AFM files. Col
+ + + diff --git a/pitfall/pdfkit/lib/font/data/Symbol.afm b/pitfall/pdfkit/lib/font/data/Symbol.afm new file mode 100755 index 00000000..6a5386a9 --- /dev/null +++ b/pitfall/pdfkit/lib/font/data/Symbol.afm @@ -0,0 +1,213 @@ +StartFontMetrics 4.1 +Comment Copyright (c) 1985, 1987, 1989, 1990, 1997 Adobe Systems Incorporated. All rights reserved. +Comment Creation Date: Thu May 1 15:12:25 1997 +Comment UniqueID 43064 +Comment VMusage 30820 39997 +FontName Symbol +FullName Symbol +FamilyName Symbol +Weight Medium +ItalicAngle 0 +IsFixedPitch false +CharacterSet Special +FontBBox -180 -293 1090 1010 +UnderlinePosition -100 +UnderlineThickness 50 +Version 001.008 +Notice Copyright (c) 1985, 1987, 1989, 1990, 1997 Adobe Systems Incorporated. All rights reserved. +EncodingScheme FontSpecific +StdHW 92 +StdVW 85 +StartCharMetrics 190 +C 32 ; WX 250 ; N space ; B 0 0 0 0 ; +C 33 ; WX 333 ; N exclam ; B 128 -17 240 672 ; +C 34 ; WX 713 ; N universal ; B 31 0 681 705 ; +C 35 ; WX 500 ; N numbersign ; B 20 -16 481 673 ; +C 36 ; WX 549 ; N existential ; B 25 0 478 707 ; +C 37 ; WX 833 ; N percent ; B 63 -36 771 655 ; +C 38 ; WX 778 ; N ampersand ; B 41 -18 750 661 ; +C 39 ; WX 439 ; N suchthat ; B 48 -17 414 500 ; +C 40 ; WX 333 ; N parenleft ; B 53 -191 300 673 ; +C 41 ; WX 333 ; N parenright ; B 30 -191 277 673 ; +C 42 ; WX 500 ; N asteriskmath ; B 65 134 427 551 ; +C 43 ; WX 549 ; N plus ; B 10 0 539 533 ; +C 44 ; WX 250 ; N comma ; B 56 -152 194 104 ; +C 45 ; WX 549 ; N minus ; B 11 233 535 288 ; +C 46 ; WX 250 ; N period ; B 69 -17 181 95 ; +C 47 ; WX 278 ; N slash ; B 0 -18 254 646 ; +C 48 ; WX 500 ; N zero ; B 24 -14 476 685 ; +C 49 ; WX 500 ; N one ; B 117 0 390 673 ; +C 50 ; WX 500 ; N two ; B 25 0 475 685 ; +C 51 ; WX 500 ; N three ; B 43 -14 435 685 ; +C 52 ; WX 500 ; N four ; B 15 0 469 685 ; +C 53 ; WX 500 ; N five ; B 32 -14 445 690 ; +C 54 ; WX 500 ; N six ; B 34 -14 468 685 ; +C 55 ; WX 500 ; N seven ; B 24 -16 448 673 ; +C 56 ; WX 500 ; N eight ; B 56 -14 445 685 ; +C 57 ; WX 500 ; N nine ; B 30 -18 459 685 ; +C 58 ; WX 278 ; N colon ; B 81 -17 193 460 ; +C 59 ; WX 278 ; N semicolon ; B 83 -152 221 460 ; +C 60 ; WX 549 ; N less ; B 26 0 523 522 ; +C 61 ; WX 549 ; N equal ; B 11 141 537 390 ; +C 62 ; WX 549 ; N greater ; B 26 0 523 522 ; +C 63 ; WX 444 ; N question ; B 70 -17 412 686 ; +C 64 ; WX 549 ; N congruent ; B 11 0 537 475 ; +C 65 ; WX 722 ; N Alpha ; B 4 0 684 673 ; +C 66 ; WX 667 ; N Beta ; B 29 0 592 673 ; +C 67 ; WX 722 ; N Chi ; B -9 0 704 673 ; +C 68 ; WX 612 ; N Delta ; B 6 0 608 688 ; +C 69 ; WX 611 ; N Epsilon ; B 32 0 617 673 ; +C 70 ; WX 763 ; N Phi ; B 26 0 741 673 ; +C 71 ; WX 603 ; N Gamma ; B 24 0 609 673 ; +C 72 ; WX 722 ; N Eta ; B 39 0 729 673 ; +C 73 ; WX 333 ; N Iota ; B 32 0 316 673 ; +C 74 ; WX 631 ; N theta1 ; B 18 -18 623 689 ; +C 75 ; WX 722 ; N Kappa ; B 35 0 722 673 ; +C 76 ; WX 686 ; N Lambda ; B 6 0 680 688 ; +C 77 ; WX 889 ; N Mu ; B 28 0 887 673 ; +C 78 ; WX 722 ; N Nu ; B 29 -8 720 673 ; +C 79 ; WX 722 ; N Omicron ; B 41 -17 715 685 ; +C 80 ; WX 768 ; N Pi ; B 25 0 745 673 ; +C 81 ; WX 741 ; N Theta ; B 41 -17 715 685 ; +C 82 ; WX 556 ; N Rho ; B 28 0 563 673 ; +C 83 ; WX 592 ; N Sigma ; B 5 0 589 673 ; +C 84 ; WX 611 ; N Tau ; B 33 0 607 673 ; +C 85 ; WX 690 ; N Upsilon ; B -8 0 694 673 ; +C 86 ; WX 439 ; N sigma1 ; B 40 -233 436 500 ; +C 87 ; WX 768 ; N Omega ; B 34 0 736 688 ; +C 88 ; WX 645 ; N Xi ; B 40 0 599 673 ; +C 89 ; WX 795 ; N Psi ; B 15 0 781 684 ; +C 90 ; WX 611 ; N Zeta ; B 44 0 636 673 ; +C 91 ; WX 333 ; N bracketleft ; B 86 -155 299 674 ; +C 92 ; WX 863 ; N therefore ; B 163 0 701 487 ; +C 93 ; WX 333 ; N bracketright ; B 33 -155 246 674 ; +C 94 ; WX 658 ; N perpendicular ; B 15 0 652 674 ; +C 95 ; WX 500 ; N underscore ; B -2 -125 502 -75 ; +C 96 ; WX 500 ; N radicalex ; B 480 881 1090 917 ; +C 97 ; WX 631 ; N alpha ; B 41 -18 622 500 ; +C 98 ; WX 549 ; N beta ; B 61 -223 515 741 ; +C 99 ; WX 549 ; N chi ; B 12 -231 522 499 ; +C 100 ; WX 494 ; N delta ; B 40 -19 481 740 ; +C 101 ; WX 439 ; N epsilon ; B 22 -19 427 502 ; +C 102 ; WX 521 ; N phi ; B 28 -224 492 673 ; +C 103 ; WX 411 ; N gamma ; B 5 -225 484 499 ; +C 104 ; WX 603 ; N eta ; B 0 -202 527 514 ; +C 105 ; WX 329 ; N iota ; B 0 -17 301 503 ; +C 106 ; WX 603 ; N phi1 ; B 36 -224 587 499 ; +C 107 ; WX 549 ; N kappa ; B 33 0 558 501 ; +C 108 ; WX 549 ; N lambda ; B 24 -17 548 739 ; +C 109 ; WX 576 ; N mu ; B 33 -223 567 500 ; +C 110 ; WX 521 ; N nu ; B -9 -16 475 507 ; +C 111 ; WX 549 ; N omicron ; B 35 -19 501 499 ; +C 112 ; WX 549 ; N pi ; B 10 -19 530 487 ; +C 113 ; WX 521 ; N theta ; B 43 -17 485 690 ; +C 114 ; WX 549 ; N rho ; B 50 -230 490 499 ; +C 115 ; WX 603 ; N sigma ; B 30 -21 588 500 ; +C 116 ; WX 439 ; N tau ; B 10 -19 418 500 ; +C 117 ; WX 576 ; N upsilon ; B 7 -18 535 507 ; +C 118 ; WX 713 ; N omega1 ; B 12 -18 671 583 ; +C 119 ; WX 686 ; N omega ; B 42 -17 684 500 ; +C 120 ; WX 493 ; N xi ; B 27 -224 469 766 ; +C 121 ; WX 686 ; N psi ; B 12 -228 701 500 ; +C 122 ; WX 494 ; N zeta ; B 60 -225 467 756 ; +C 123 ; WX 480 ; N braceleft ; B 58 -183 397 673 ; +C 124 ; WX 200 ; N bar ; B 65 -293 135 707 ; +C 125 ; WX 480 ; N braceright ; B 79 -183 418 673 ; +C 126 ; WX 549 ; N similar ; B 17 203 529 307 ; +C 160 ; WX 750 ; N Euro ; B 20 -12 714 685 ; +C 161 ; WX 620 ; N Upsilon1 ; B -2 0 610 685 ; +C 162 ; WX 247 ; N minute ; B 27 459 228 735 ; +C 163 ; WX 549 ; N lessequal ; B 29 0 526 639 ; +C 164 ; WX 167 ; N fraction ; B -180 -12 340 677 ; +C 165 ; WX 713 ; N infinity ; B 26 124 688 404 ; +C 166 ; WX 500 ; N florin ; B 2 -193 494 686 ; +C 167 ; WX 753 ; N club ; B 86 -26 660 533 ; +C 168 ; WX 753 ; N diamond ; B 142 -36 600 550 ; +C 169 ; WX 753 ; N heart ; B 117 -33 631 532 ; +C 170 ; WX 753 ; N spade ; B 113 -36 629 548 ; +C 171 ; WX 1042 ; N arrowboth ; B 24 -15 1024 511 ; +C 172 ; WX 987 ; N arrowleft ; B 32 -15 942 511 ; +C 173 ; WX 603 ; N arrowup ; B 45 0 571 910 ; +C 174 ; WX 987 ; N arrowright ; B 49 -15 959 511 ; +C 175 ; WX 603 ; N arrowdown ; B 45 -22 571 888 ; +C 176 ; WX 400 ; N degree ; B 50 385 350 685 ; +C 177 ; WX 549 ; N plusminus ; B 10 0 539 645 ; +C 178 ; WX 411 ; N second ; B 20 459 413 737 ; +C 179 ; WX 549 ; N greaterequal ; B 29 0 526 639 ; +C 180 ; WX 549 ; N multiply ; B 17 8 533 524 ; +C 181 ; WX 713 ; N proportional ; B 27 123 639 404 ; +C 182 ; WX 494 ; N partialdiff ; B 26 -20 462 746 ; +C 183 ; WX 460 ; N bullet ; B 50 113 410 473 ; +C 184 ; WX 549 ; N divide ; B 10 71 536 456 ; +C 185 ; WX 549 ; N notequal ; B 15 -25 540 549 ; +C 186 ; WX 549 ; N equivalence ; B 14 82 538 443 ; +C 187 ; WX 549 ; N approxequal ; B 14 135 527 394 ; +C 188 ; WX 1000 ; N ellipsis ; B 111 -17 889 95 ; +C 189 ; WX 603 ; N arrowvertex ; B 280 -120 336 1010 ; +C 190 ; WX 1000 ; N arrowhorizex ; B -60 220 1050 276 ; +C 191 ; WX 658 ; N carriagereturn ; B 15 -16 602 629 ; +C 192 ; WX 823 ; N aleph ; B 175 -18 661 658 ; +C 193 ; WX 686 ; N Ifraktur ; B 10 -53 578 740 ; +C 194 ; WX 795 ; N Rfraktur ; B 26 -15 759 734 ; +C 195 ; WX 987 ; N weierstrass ; B 159 -211 870 573 ; +C 196 ; WX 768 ; N circlemultiply ; B 43 -17 733 673 ; +C 197 ; WX 768 ; N circleplus ; B 43 -15 733 675 ; +C 198 ; WX 823 ; N emptyset ; B 39 -24 781 719 ; +C 199 ; WX 768 ; N intersection ; B 40 0 732 509 ; +C 200 ; WX 768 ; N union ; B 40 -17 732 492 ; +C 201 ; WX 713 ; N propersuperset ; B 20 0 673 470 ; +C 202 ; WX 713 ; N reflexsuperset ; B 20 -125 673 470 ; +C 203 ; WX 713 ; N notsubset ; B 36 -70 690 540 ; +C 204 ; WX 713 ; N propersubset ; B 37 0 690 470 ; +C 205 ; WX 713 ; N reflexsubset ; B 37 -125 690 470 ; +C 206 ; WX 713 ; N element ; B 45 0 505 468 ; +C 207 ; WX 713 ; N notelement ; B 45 -58 505 555 ; +C 208 ; WX 768 ; N angle ; B 26 0 738 673 ; +C 209 ; WX 713 ; N gradient ; B 36 -19 681 718 ; +C 210 ; WX 790 ; N registerserif ; B 50 -17 740 673 ; +C 211 ; WX 790 ; N copyrightserif ; B 51 -15 741 675 ; +C 212 ; WX 890 ; N trademarkserif ; B 18 293 855 673 ; +C 213 ; WX 823 ; N product ; B 25 -101 803 751 ; +C 214 ; WX 549 ; N radical ; B 10 -38 515 917 ; +C 215 ; WX 250 ; N dotmath ; B 69 210 169 310 ; +C 216 ; WX 713 ; N logicalnot ; B 15 0 680 288 ; +C 217 ; WX 603 ; N logicaland ; B 23 0 583 454 ; +C 218 ; WX 603 ; N logicalor ; B 30 0 578 477 ; +C 219 ; WX 1042 ; N arrowdblboth ; B 27 -20 1023 510 ; +C 220 ; WX 987 ; N arrowdblleft ; B 30 -15 939 513 ; +C 221 ; WX 603 ; N arrowdblup ; B 39 2 567 911 ; +C 222 ; WX 987 ; N arrowdblright ; B 45 -20 954 508 ; +C 223 ; WX 603 ; N arrowdbldown ; B 44 -19 572 890 ; +C 224 ; WX 494 ; N lozenge ; B 18 0 466 745 ; +C 225 ; WX 329 ; N angleleft ; B 25 -198 306 746 ; +C 226 ; WX 790 ; N registersans ; B 50 -20 740 670 ; +C 227 ; WX 790 ; N copyrightsans ; B 49 -15 739 675 ; +C 228 ; WX 786 ; N trademarksans ; B 5 293 725 673 ; +C 229 ; WX 713 ; N summation ; B 14 -108 695 752 ; +C 230 ; WX 384 ; N parenlefttp ; B 24 -293 436 926 ; +C 231 ; WX 384 ; N parenleftex ; B 24 -85 108 925 ; +C 232 ; WX 384 ; N parenleftbt ; B 24 -293 436 926 ; +C 233 ; WX 384 ; N bracketlefttp ; B 0 -80 349 926 ; +C 234 ; WX 384 ; N bracketleftex ; B 0 -79 77 925 ; +C 235 ; WX 384 ; N bracketleftbt ; B 0 -80 349 926 ; +C 236 ; WX 494 ; N bracelefttp ; B 209 -85 445 925 ; +C 237 ; WX 494 ; N braceleftmid ; B 20 -85 284 935 ; +C 238 ; WX 494 ; N braceleftbt ; B 209 -75 445 935 ; +C 239 ; WX 494 ; N braceex ; B 209 -85 284 935 ; +C 241 ; WX 329 ; N angleright ; B 21 -198 302 746 ; +C 242 ; WX 274 ; N integral ; B 2 -107 291 916 ; +C 243 ; WX 686 ; N integraltp ; B 308 -88 675 920 ; +C 244 ; WX 686 ; N integralex ; B 308 -88 378 975 ; +C 245 ; WX 686 ; N integralbt ; B 11 -87 378 921 ; +C 246 ; WX 384 ; N parenrighttp ; B 54 -293 466 926 ; +C 247 ; WX 384 ; N parenrightex ; B 382 -85 466 925 ; +C 248 ; WX 384 ; N parenrightbt ; B 54 -293 466 926 ; +C 249 ; WX 384 ; N bracketrighttp ; B 22 -80 371 926 ; +C 250 ; WX 384 ; N bracketrightex ; B 294 -79 371 925 ; +C 251 ; WX 384 ; N bracketrightbt ; B 22 -80 371 926 ; +C 252 ; WX 494 ; N bracerighttp ; B 48 -85 284 925 ; +C 253 ; WX 494 ; N bracerightmid ; B 209 -85 473 935 ; +C 254 ; WX 494 ; N bracerightbt ; B 48 -75 284 935 ; +C -1 ; WX 790 ; N apple ; B 56 -3 733 808 ; +EndCharMetrics +EndFontMetrics diff --git a/pitfall/pdfkit/lib/font/data/Times-Bold.afm b/pitfall/pdfkit/lib/font/data/Times-Bold.afm new file mode 100755 index 00000000..559ebaeb --- /dev/null +++ b/pitfall/pdfkit/lib/font/data/Times-Bold.afm @@ -0,0 +1,2588 @@ +StartFontMetrics 4.1 +Comment Copyright (c) 1985, 1987, 1989, 1990, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. +Comment Creation Date: Thu May 1 12:52:56 1997 +Comment UniqueID 43065 +Comment VMusage 41636 52661 +FontName Times-Bold +FullName Times Bold +FamilyName Times +Weight Bold +ItalicAngle 0 +IsFixedPitch false +CharacterSet ExtendedRoman +FontBBox -168 -218 1000 935 +UnderlinePosition -100 +UnderlineThickness 50 +Version 002.000 +Notice Copyright (c) 1985, 1987, 1989, 1990, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved.Times is a trademark of Linotype-Hell AG and/or its subsidiaries. +EncodingScheme AdobeStandardEncoding +CapHeight 676 +XHeight 461 +Ascender 683 +Descender -217 +StdHW 44 +StdVW 139 +StartCharMetrics 315 +C 32 ; WX 250 ; N space ; B 0 0 0 0 ; +C 33 ; WX 333 ; N exclam ; B 81 -13 251 691 ; +C 34 ; WX 555 ; N quotedbl ; B 83 404 472 691 ; +C 35 ; WX 500 ; N numbersign ; B 4 0 496 700 ; +C 36 ; WX 500 ; N dollar ; B 29 -99 472 750 ; +C 37 ; WX 1000 ; N percent ; B 124 -14 877 692 ; +C 38 ; WX 833 ; N ampersand ; B 62 -16 787 691 ; +C 39 ; WX 333 ; N quoteright ; B 79 356 263 691 ; +C 40 ; WX 333 ; N parenleft ; B 46 -168 306 694 ; +C 41 ; WX 333 ; N parenright ; B 27 -168 287 694 ; +C 42 ; WX 500 ; N asterisk ; B 56 255 447 691 ; +C 43 ; WX 570 ; N plus ; B 33 0 537 506 ; +C 44 ; WX 250 ; N comma ; B 39 -180 223 155 ; +C 45 ; WX 333 ; N hyphen ; B 44 171 287 287 ; +C 46 ; WX 250 ; N period ; B 41 -13 210 156 ; +C 47 ; WX 278 ; N slash ; B -24 -19 302 691 ; +C 48 ; WX 500 ; N zero ; B 24 -13 476 688 ; +C 49 ; WX 500 ; N one ; B 65 0 442 688 ; +C 50 ; WX 500 ; N two ; B 17 0 478 688 ; +C 51 ; WX 500 ; N three ; B 16 -14 468 688 ; +C 52 ; WX 500 ; N four ; B 19 0 475 688 ; +C 53 ; WX 500 ; N five ; B 22 -8 470 676 ; +C 54 ; WX 500 ; N six ; B 28 -13 475 688 ; +C 55 ; WX 500 ; N seven ; B 17 0 477 676 ; +C 56 ; WX 500 ; N eight ; B 28 -13 472 688 ; +C 57 ; WX 500 ; N nine ; B 26 -13 473 688 ; +C 58 ; WX 333 ; N colon ; B 82 -13 251 472 ; +C 59 ; WX 333 ; N semicolon ; B 82 -180 266 472 ; +C 60 ; WX 570 ; N less ; B 31 -8 539 514 ; +C 61 ; WX 570 ; N equal ; B 33 107 537 399 ; +C 62 ; WX 570 ; N greater ; B 31 -8 539 514 ; +C 63 ; WX 500 ; N question ; B 57 -13 445 689 ; +C 64 ; WX 930 ; N at ; B 108 -19 822 691 ; +C 65 ; WX 722 ; N A ; B 9 0 689 690 ; +C 66 ; WX 667 ; N B ; B 16 0 619 676 ; +C 67 ; WX 722 ; N C ; B 49 -19 687 691 ; +C 68 ; WX 722 ; N D ; B 14 0 690 676 ; +C 69 ; WX 667 ; N E ; B 16 0 641 676 ; +C 70 ; WX 611 ; N F ; B 16 0 583 676 ; +C 71 ; WX 778 ; N G ; B 37 -19 755 691 ; +C 72 ; WX 778 ; N H ; B 21 0 759 676 ; +C 73 ; WX 389 ; N I ; B 20 0 370 676 ; +C 74 ; WX 500 ; N J ; B 3 -96 479 676 ; +C 75 ; WX 778 ; N K ; B 30 0 769 676 ; +C 76 ; WX 667 ; N L ; B 19 0 638 676 ; +C 77 ; WX 944 ; N M ; B 14 0 921 676 ; +C 78 ; WX 722 ; N N ; B 16 -18 701 676 ; +C 79 ; WX 778 ; N O ; B 35 -19 743 691 ; +C 80 ; WX 611 ; N P ; B 16 0 600 676 ; +C 81 ; WX 778 ; N Q ; B 35 -176 743 691 ; +C 82 ; WX 722 ; N R ; B 26 0 715 676 ; +C 83 ; WX 556 ; N S ; B 35 -19 513 692 ; +C 84 ; WX 667 ; N T ; B 31 0 636 676 ; +C 85 ; WX 722 ; N U ; B 16 -19 701 676 ; +C 86 ; WX 722 ; N V ; B 16 -18 701 676 ; +C 87 ; WX 1000 ; N W ; B 19 -15 981 676 ; +C 88 ; WX 722 ; N X ; B 16 0 699 676 ; +C 89 ; WX 722 ; N Y ; B 15 0 699 676 ; +C 90 ; WX 667 ; N Z ; B 28 0 634 676 ; +C 91 ; WX 333 ; N bracketleft ; B 67 -149 301 678 ; +C 92 ; WX 278 ; N backslash ; B -25 -19 303 691 ; +C 93 ; WX 333 ; N bracketright ; B 32 -149 266 678 ; +C 94 ; WX 581 ; N asciicircum ; B 73 311 509 676 ; +C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; +C 96 ; WX 333 ; N quoteleft ; B 70 356 254 691 ; +C 97 ; WX 500 ; N a ; B 25 -14 488 473 ; +C 98 ; WX 556 ; N b ; B 17 -14 521 676 ; +C 99 ; WX 444 ; N c ; B 25 -14 430 473 ; +C 100 ; WX 556 ; N d ; B 25 -14 534 676 ; +C 101 ; WX 444 ; N e ; B 25 -14 426 473 ; +C 102 ; WX 333 ; N f ; B 14 0 389 691 ; L i fi ; L l fl ; +C 103 ; WX 500 ; N g ; B 28 -206 483 473 ; +C 104 ; WX 556 ; N h ; B 16 0 534 676 ; +C 105 ; WX 278 ; N i ; B 16 0 255 691 ; +C 106 ; WX 333 ; N j ; B -57 -203 263 691 ; +C 107 ; WX 556 ; N k ; B 22 0 543 676 ; +C 108 ; WX 278 ; N l ; B 16 0 255 676 ; +C 109 ; WX 833 ; N m ; B 16 0 814 473 ; +C 110 ; WX 556 ; N n ; B 21 0 539 473 ; +C 111 ; WX 500 ; N o ; B 25 -14 476 473 ; +C 112 ; WX 556 ; N p ; B 19 -205 524 473 ; +C 113 ; WX 556 ; N q ; B 34 -205 536 473 ; +C 114 ; WX 444 ; N r ; B 29 0 434 473 ; +C 115 ; WX 389 ; N s ; B 25 -14 361 473 ; +C 116 ; WX 333 ; N t ; B 20 -12 332 630 ; +C 117 ; WX 556 ; N u ; B 16 -14 537 461 ; +C 118 ; WX 500 ; N v ; B 21 -14 485 461 ; +C 119 ; WX 722 ; N w ; B 23 -14 707 461 ; +C 120 ; WX 500 ; N x ; B 12 0 484 461 ; +C 121 ; WX 500 ; N y ; B 16 -205 480 461 ; +C 122 ; WX 444 ; N z ; B 21 0 420 461 ; +C 123 ; WX 394 ; N braceleft ; B 22 -175 340 698 ; +C 124 ; WX 220 ; N bar ; B 66 -218 154 782 ; +C 125 ; WX 394 ; N braceright ; B 54 -175 372 698 ; +C 126 ; WX 520 ; N asciitilde ; B 29 173 491 333 ; +C 161 ; WX 333 ; N exclamdown ; B 82 -203 252 501 ; +C 162 ; WX 500 ; N cent ; B 53 -140 458 588 ; +C 163 ; WX 500 ; N sterling ; B 21 -14 477 684 ; +C 164 ; WX 167 ; N fraction ; B -168 -12 329 688 ; +C 165 ; WX 500 ; N yen ; B -64 0 547 676 ; +C 166 ; WX 500 ; N florin ; B 0 -155 498 706 ; +C 167 ; WX 500 ; N section ; B 57 -132 443 691 ; +C 168 ; WX 500 ; N currency ; B -26 61 526 613 ; +C 169 ; WX 278 ; N quotesingle ; B 75 404 204 691 ; +C 170 ; WX 500 ; N quotedblleft ; B 32 356 486 691 ; +C 171 ; WX 500 ; N guillemotleft ; B 23 36 473 415 ; +C 172 ; WX 333 ; N guilsinglleft ; B 51 36 305 415 ; +C 173 ; WX 333 ; N guilsinglright ; B 28 36 282 415 ; +C 174 ; WX 556 ; N fi ; B 14 0 536 691 ; +C 175 ; WX 556 ; N fl ; B 14 0 536 691 ; +C 177 ; WX 500 ; N endash ; B 0 181 500 271 ; +C 178 ; WX 500 ; N dagger ; B 47 -134 453 691 ; +C 179 ; WX 500 ; N daggerdbl ; B 45 -132 456 691 ; +C 180 ; WX 250 ; N periodcentered ; B 41 248 210 417 ; +C 182 ; WX 540 ; N paragraph ; B 0 -186 519 676 ; +C 183 ; WX 350 ; N bullet ; B 35 198 315 478 ; +C 184 ; WX 333 ; N quotesinglbase ; B 79 -180 263 155 ; +C 185 ; WX 500 ; N quotedblbase ; B 14 -180 468 155 ; +C 186 ; WX 500 ; N quotedblright ; B 14 356 468 691 ; +C 187 ; WX 500 ; N guillemotright ; B 27 36 477 415 ; +C 188 ; WX 1000 ; N ellipsis ; B 82 -13 917 156 ; +C 189 ; WX 1000 ; N perthousand ; B 7 -29 995 706 ; +C 191 ; WX 500 ; N questiondown ; B 55 -201 443 501 ; +C 193 ; WX 333 ; N grave ; B 8 528 246 713 ; +C 194 ; WX 333 ; N acute ; B 86 528 324 713 ; +C 195 ; WX 333 ; N circumflex ; B -2 528 335 704 ; +C 196 ; WX 333 ; N tilde ; B -16 547 349 674 ; +C 197 ; WX 333 ; N macron ; B 1 565 331 637 ; +C 198 ; WX 333 ; N breve ; B 15 528 318 691 ; +C 199 ; WX 333 ; N dotaccent ; B 103 536 258 691 ; +C 200 ; WX 333 ; N dieresis ; B -2 537 335 667 ; +C 202 ; WX 333 ; N ring ; B 60 527 273 740 ; +C 203 ; WX 333 ; N cedilla ; B 68 -218 294 0 ; +C 205 ; WX 333 ; N hungarumlaut ; B -13 528 425 713 ; +C 206 ; WX 333 ; N ogonek ; B 90 -193 319 24 ; +C 207 ; WX 333 ; N caron ; B -2 528 335 704 ; +C 208 ; WX 1000 ; N emdash ; B 0 181 1000 271 ; +C 225 ; WX 1000 ; N AE ; B 4 0 951 676 ; +C 227 ; WX 300 ; N ordfeminine ; B -1 397 301 688 ; +C 232 ; WX 667 ; N Lslash ; B 19 0 638 676 ; +C 233 ; WX 778 ; N Oslash ; B 35 -74 743 737 ; +C 234 ; WX 1000 ; N OE ; B 22 -5 981 684 ; +C 235 ; WX 330 ; N ordmasculine ; B 18 397 312 688 ; +C 241 ; WX 722 ; N ae ; B 33 -14 693 473 ; +C 245 ; WX 278 ; N dotlessi ; B 16 0 255 461 ; +C 248 ; WX 278 ; N lslash ; B -22 0 303 676 ; +C 249 ; WX 500 ; N oslash ; B 25 -92 476 549 ; +C 250 ; WX 722 ; N oe ; B 22 -14 696 473 ; +C 251 ; WX 556 ; N germandbls ; B 19 -12 517 691 ; +C -1 ; WX 389 ; N Idieresis ; B 20 0 370 877 ; +C -1 ; WX 444 ; N eacute ; B 25 -14 426 713 ; +C -1 ; WX 500 ; N abreve ; B 25 -14 488 691 ; +C -1 ; WX 556 ; N uhungarumlaut ; B 16 -14 557 713 ; +C -1 ; WX 444 ; N ecaron ; B 25 -14 426 704 ; +C -1 ; WX 722 ; N Ydieresis ; B 15 0 699 877 ; +C -1 ; WX 570 ; N divide ; B 33 -31 537 537 ; +C -1 ; WX 722 ; N Yacute ; B 15 0 699 923 ; +C -1 ; WX 722 ; N Acircumflex ; B 9 0 689 914 ; +C -1 ; WX 500 ; N aacute ; B 25 -14 488 713 ; +C -1 ; WX 722 ; N Ucircumflex ; B 16 -19 701 914 ; +C -1 ; WX 500 ; N yacute ; B 16 -205 480 713 ; +C -1 ; WX 389 ; N scommaaccent ; B 25 -218 361 473 ; +C -1 ; WX 444 ; N ecircumflex ; B 25 -14 426 704 ; +C -1 ; WX 722 ; N Uring ; B 16 -19 701 935 ; +C -1 ; WX 722 ; N Udieresis ; B 16 -19 701 877 ; +C -1 ; WX 500 ; N aogonek ; B 25 -193 504 473 ; +C -1 ; WX 722 ; N Uacute ; B 16 -19 701 923 ; +C -1 ; WX 556 ; N uogonek ; B 16 -193 539 461 ; +C -1 ; WX 667 ; N Edieresis ; B 16 0 641 877 ; +C -1 ; WX 722 ; N Dcroat ; B 6 0 690 676 ; +C -1 ; WX 250 ; N commaaccent ; B 47 -218 203 -50 ; +C -1 ; WX 747 ; N copyright ; B 26 -19 721 691 ; +C -1 ; WX 667 ; N Emacron ; B 16 0 641 847 ; +C -1 ; WX 444 ; N ccaron ; B 25 -14 430 704 ; +C -1 ; WX 500 ; N aring ; B 25 -14 488 740 ; +C -1 ; WX 722 ; N Ncommaaccent ; B 16 -188 701 676 ; +C -1 ; WX 278 ; N lacute ; B 16 0 297 923 ; +C -1 ; WX 500 ; N agrave ; B 25 -14 488 713 ; +C -1 ; WX 667 ; N Tcommaaccent ; B 31 -218 636 676 ; +C -1 ; WX 722 ; N Cacute ; B 49 -19 687 923 ; +C -1 ; WX 500 ; N atilde ; B 25 -14 488 674 ; +C -1 ; WX 667 ; N Edotaccent ; B 16 0 641 901 ; +C -1 ; WX 389 ; N scaron ; B 25 -14 363 704 ; +C -1 ; WX 389 ; N scedilla ; B 25 -218 361 473 ; +C -1 ; WX 278 ; N iacute ; B 16 0 289 713 ; +C -1 ; WX 494 ; N lozenge ; B 10 0 484 745 ; +C -1 ; WX 722 ; N Rcaron ; B 26 0 715 914 ; +C -1 ; WX 778 ; N Gcommaaccent ; B 37 -218 755 691 ; +C -1 ; WX 556 ; N ucircumflex ; B 16 -14 537 704 ; +C -1 ; WX 500 ; N acircumflex ; B 25 -14 488 704 ; +C -1 ; WX 722 ; N Amacron ; B 9 0 689 847 ; +C -1 ; WX 444 ; N rcaron ; B 29 0 434 704 ; +C -1 ; WX 444 ; N ccedilla ; B 25 -218 430 473 ; +C -1 ; WX 667 ; N Zdotaccent ; B 28 0 634 901 ; +C -1 ; WX 611 ; N Thorn ; B 16 0 600 676 ; +C -1 ; WX 778 ; N Omacron ; B 35 -19 743 847 ; +C -1 ; WX 722 ; N Racute ; B 26 0 715 923 ; +C -1 ; WX 556 ; N Sacute ; B 35 -19 513 923 ; +C -1 ; WX 672 ; N dcaron ; B 25 -14 681 682 ; +C -1 ; WX 722 ; N Umacron ; B 16 -19 701 847 ; +C -1 ; WX 556 ; N uring ; B 16 -14 537 740 ; +C -1 ; WX 300 ; N threesuperior ; B 3 268 297 688 ; +C -1 ; WX 778 ; N Ograve ; B 35 -19 743 923 ; +C -1 ; WX 722 ; N Agrave ; B 9 0 689 923 ; +C -1 ; WX 722 ; N Abreve ; B 9 0 689 901 ; +C -1 ; WX 570 ; N multiply ; B 48 16 522 490 ; +C -1 ; WX 556 ; N uacute ; B 16 -14 537 713 ; +C -1 ; WX 667 ; N Tcaron ; B 31 0 636 914 ; +C -1 ; WX 494 ; N partialdiff ; B 11 -21 494 750 ; +C -1 ; WX 500 ; N ydieresis ; B 16 -205 480 667 ; +C -1 ; WX 722 ; N Nacute ; B 16 -18 701 923 ; +C -1 ; WX 278 ; N icircumflex ; B -37 0 300 704 ; +C -1 ; WX 667 ; N Ecircumflex ; B 16 0 641 914 ; +C -1 ; WX 500 ; N adieresis ; B 25 -14 488 667 ; +C -1 ; WX 444 ; N edieresis ; B 25 -14 426 667 ; +C -1 ; WX 444 ; N cacute ; B 25 -14 430 713 ; +C -1 ; WX 556 ; N nacute ; B 21 0 539 713 ; +C -1 ; WX 556 ; N umacron ; B 16 -14 537 637 ; +C -1 ; WX 722 ; N Ncaron ; B 16 -18 701 914 ; +C -1 ; WX 389 ; N Iacute ; B 20 0 370 923 ; +C -1 ; WX 570 ; N plusminus ; B 33 0 537 506 ; +C -1 ; WX 220 ; N brokenbar ; B 66 -143 154 707 ; +C -1 ; WX 747 ; N registered ; B 26 -19 721 691 ; +C -1 ; WX 778 ; N Gbreve ; B 37 -19 755 901 ; +C -1 ; WX 389 ; N Idotaccent ; B 20 0 370 901 ; +C -1 ; WX 600 ; N summation ; B 14 -10 585 706 ; +C -1 ; WX 667 ; N Egrave ; B 16 0 641 923 ; +C -1 ; WX 444 ; N racute ; B 29 0 434 713 ; +C -1 ; WX 500 ; N omacron ; B 25 -14 476 637 ; +C -1 ; WX 667 ; N Zacute ; B 28 0 634 923 ; +C -1 ; WX 667 ; N Zcaron ; B 28 0 634 914 ; +C -1 ; WX 549 ; N greaterequal ; B 26 0 523 704 ; +C -1 ; WX 722 ; N Eth ; B 6 0 690 676 ; +C -1 ; WX 722 ; N Ccedilla ; B 49 -218 687 691 ; +C -1 ; WX 278 ; N lcommaaccent ; B 16 -218 255 676 ; +C -1 ; WX 416 ; N tcaron ; B 20 -12 425 815 ; +C -1 ; WX 444 ; N eogonek ; B 25 -193 426 473 ; +C -1 ; WX 722 ; N Uogonek ; B 16 -193 701 676 ; +C -1 ; WX 722 ; N Aacute ; B 9 0 689 923 ; +C -1 ; WX 722 ; N Adieresis ; B 9 0 689 877 ; +C -1 ; WX 444 ; N egrave ; B 25 -14 426 713 ; +C -1 ; WX 444 ; N zacute ; B 21 0 420 713 ; +C -1 ; WX 278 ; N iogonek ; B 16 -193 274 691 ; +C -1 ; WX 778 ; N Oacute ; B 35 -19 743 923 ; +C -1 ; WX 500 ; N oacute ; B 25 -14 476 713 ; +C -1 ; WX 500 ; N amacron ; B 25 -14 488 637 ; +C -1 ; WX 389 ; N sacute ; B 25 -14 361 713 ; +C -1 ; WX 278 ; N idieresis ; B -37 0 300 667 ; +C -1 ; WX 778 ; N Ocircumflex ; B 35 -19 743 914 ; +C -1 ; WX 722 ; N Ugrave ; B 16 -19 701 923 ; +C -1 ; WX 612 ; N Delta ; B 6 0 608 688 ; +C -1 ; WX 556 ; N thorn ; B 19 -205 524 676 ; +C -1 ; WX 300 ; N twosuperior ; B 0 275 300 688 ; +C -1 ; WX 778 ; N Odieresis ; B 35 -19 743 877 ; +C -1 ; WX 556 ; N mu ; B 33 -206 536 461 ; +C -1 ; WX 278 ; N igrave ; B -27 0 255 713 ; +C -1 ; WX 500 ; N ohungarumlaut ; B 25 -14 529 713 ; +C -1 ; WX 667 ; N Eogonek ; B 16 -193 644 676 ; +C -1 ; WX 556 ; N dcroat ; B 25 -14 534 676 ; +C -1 ; WX 750 ; N threequarters ; B 23 -12 733 688 ; +C -1 ; WX 556 ; N Scedilla ; B 35 -218 513 692 ; +C -1 ; WX 394 ; N lcaron ; B 16 0 412 682 ; +C -1 ; WX 778 ; N Kcommaaccent ; B 30 -218 769 676 ; +C -1 ; WX 667 ; N Lacute ; B 19 0 638 923 ; +C -1 ; WX 1000 ; N trademark ; B 24 271 977 676 ; +C -1 ; WX 444 ; N edotaccent ; B 25 -14 426 691 ; +C -1 ; WX 389 ; N Igrave ; B 20 0 370 923 ; +C -1 ; WX 389 ; N Imacron ; B 20 0 370 847 ; +C -1 ; WX 667 ; N Lcaron ; B 19 0 652 682 ; +C -1 ; WX 750 ; N onehalf ; B -7 -12 775 688 ; +C -1 ; WX 549 ; N lessequal ; B 29 0 526 704 ; +C -1 ; WX 500 ; N ocircumflex ; B 25 -14 476 704 ; +C -1 ; WX 556 ; N ntilde ; B 21 0 539 674 ; +C -1 ; WX 722 ; N Uhungarumlaut ; B 16 -19 701 923 ; +C -1 ; WX 667 ; N Eacute ; B 16 0 641 923 ; +C -1 ; WX 444 ; N emacron ; B 25 -14 426 637 ; +C -1 ; WX 500 ; N gbreve ; B 28 -206 483 691 ; +C -1 ; WX 750 ; N onequarter ; B 28 -12 743 688 ; +C -1 ; WX 556 ; N Scaron ; B 35 -19 513 914 ; +C -1 ; WX 556 ; N Scommaaccent ; B 35 -218 513 692 ; +C -1 ; WX 778 ; N Ohungarumlaut ; B 35 -19 743 923 ; +C -1 ; WX 400 ; N degree ; B 57 402 343 688 ; +C -1 ; WX 500 ; N ograve ; B 25 -14 476 713 ; +C -1 ; WX 722 ; N Ccaron ; B 49 -19 687 914 ; +C -1 ; WX 556 ; N ugrave ; B 16 -14 537 713 ; +C -1 ; WX 549 ; N radical ; B 10 -46 512 850 ; +C -1 ; WX 722 ; N Dcaron ; B 14 0 690 914 ; +C -1 ; WX 444 ; N rcommaaccent ; B 29 -218 434 473 ; +C -1 ; WX 722 ; N Ntilde ; B 16 -18 701 884 ; +C -1 ; WX 500 ; N otilde ; B 25 -14 476 674 ; +C -1 ; WX 722 ; N Rcommaaccent ; B 26 -218 715 676 ; +C -1 ; WX 667 ; N Lcommaaccent ; B 19 -218 638 676 ; +C -1 ; WX 722 ; N Atilde ; B 9 0 689 884 ; +C -1 ; WX 722 ; N Aogonek ; B 9 -193 699 690 ; +C -1 ; WX 722 ; N Aring ; B 9 0 689 935 ; +C -1 ; WX 778 ; N Otilde ; B 35 -19 743 884 ; +C -1 ; WX 444 ; N zdotaccent ; B 21 0 420 691 ; +C -1 ; WX 667 ; N Ecaron ; B 16 0 641 914 ; +C -1 ; WX 389 ; N Iogonek ; B 20 -193 370 676 ; +C -1 ; WX 556 ; N kcommaaccent ; B 22 -218 543 676 ; +C -1 ; WX 570 ; N minus ; B 33 209 537 297 ; +C -1 ; WX 389 ; N Icircumflex ; B 20 0 370 914 ; +C -1 ; WX 556 ; N ncaron ; B 21 0 539 704 ; +C -1 ; WX 333 ; N tcommaaccent ; B 20 -218 332 630 ; +C -1 ; WX 570 ; N logicalnot ; B 33 108 537 399 ; +C -1 ; WX 500 ; N odieresis ; B 25 -14 476 667 ; +C -1 ; WX 556 ; N udieresis ; B 16 -14 537 667 ; +C -1 ; WX 549 ; N notequal ; B 15 -49 540 570 ; +C -1 ; WX 500 ; N gcommaaccent ; B 28 -206 483 829 ; +C -1 ; WX 500 ; N eth ; B 25 -14 476 691 ; +C -1 ; WX 444 ; N zcaron ; B 21 0 420 704 ; +C -1 ; WX 556 ; N ncommaaccent ; B 21 -218 539 473 ; +C -1 ; WX 300 ; N onesuperior ; B 28 275 273 688 ; +C -1 ; WX 278 ; N imacron ; B -8 0 272 637 ; +C -1 ; WX 500 ; N Euro ; B 0 0 0 0 ; +EndCharMetrics +StartKernData +StartKernPairs 2242 +KPX A C -55 +KPX A Cacute -55 +KPX A Ccaron -55 +KPX A Ccedilla -55 +KPX A G -55 +KPX A Gbreve -55 +KPX A Gcommaaccent -55 +KPX A O -45 +KPX A Oacute -45 +KPX A Ocircumflex -45 +KPX A Odieresis -45 +KPX A Ograve -45 +KPX A Ohungarumlaut -45 +KPX A Omacron -45 +KPX A Oslash -45 +KPX A Otilde -45 +KPX A Q -45 +KPX A T -95 +KPX A Tcaron -95 +KPX A Tcommaaccent -95 +KPX A U -50 +KPX A Uacute -50 +KPX A Ucircumflex -50 +KPX A Udieresis -50 +KPX A Ugrave -50 +KPX A Uhungarumlaut -50 +KPX A Umacron -50 +KPX A Uogonek -50 +KPX A Uring -50 +KPX A V -145 +KPX A W -130 +KPX A Y -100 +KPX A Yacute -100 +KPX A Ydieresis -100 +KPX A p -25 +KPX A quoteright -74 +KPX A u -50 +KPX A uacute -50 +KPX A ucircumflex -50 +KPX A udieresis -50 +KPX A ugrave -50 +KPX A uhungarumlaut -50 +KPX A umacron -50 +KPX A uogonek -50 +KPX A uring -50 +KPX A v -100 +KPX A w -90 +KPX A y -74 +KPX A yacute -74 +KPX A ydieresis -74 +KPX Aacute C -55 +KPX Aacute Cacute -55 +KPX Aacute Ccaron -55 +KPX Aacute Ccedilla -55 +KPX Aacute G -55 +KPX Aacute Gbreve -55 +KPX Aacute Gcommaaccent -55 +KPX Aacute O -45 +KPX Aacute Oacute -45 +KPX Aacute Ocircumflex -45 +KPX Aacute Odieresis -45 +KPX Aacute Ograve -45 +KPX Aacute Ohungarumlaut -45 +KPX Aacute Omacron -45 +KPX Aacute Oslash -45 +KPX Aacute Otilde -45 +KPX Aacute Q -45 +KPX Aacute T -95 +KPX Aacute Tcaron -95 +KPX Aacute Tcommaaccent -95 +KPX Aacute U -50 +KPX Aacute Uacute -50 +KPX Aacute Ucircumflex -50 +KPX Aacute Udieresis -50 +KPX Aacute Ugrave -50 +KPX Aacute Uhungarumlaut -50 +KPX Aacute Umacron -50 +KPX Aacute Uogonek -50 +KPX Aacute Uring -50 +KPX Aacute V -145 +KPX Aacute W -130 +KPX Aacute Y -100 +KPX Aacute Yacute -100 +KPX Aacute Ydieresis -100 +KPX Aacute p -25 +KPX Aacute quoteright -74 +KPX Aacute u -50 +KPX Aacute uacute -50 +KPX Aacute ucircumflex -50 +KPX Aacute udieresis -50 +KPX Aacute ugrave -50 +KPX Aacute uhungarumlaut -50 +KPX Aacute umacron -50 +KPX Aacute uogonek -50 +KPX Aacute uring -50 +KPX Aacute v -100 +KPX Aacute w -90 +KPX Aacute y -74 +KPX Aacute yacute -74 +KPX Aacute ydieresis -74 +KPX Abreve C -55 +KPX Abreve Cacute -55 +KPX Abreve Ccaron -55 +KPX Abreve Ccedilla -55 +KPX Abreve G -55 +KPX Abreve Gbreve -55 +KPX Abreve Gcommaaccent -55 +KPX Abreve O -45 +KPX Abreve Oacute -45 +KPX Abreve Ocircumflex -45 +KPX Abreve Odieresis -45 +KPX Abreve Ograve -45 +KPX Abreve Ohungarumlaut -45 +KPX Abreve Omacron -45 +KPX Abreve Oslash -45 +KPX Abreve Otilde -45 +KPX Abreve Q -45 +KPX Abreve T -95 +KPX Abreve Tcaron -95 +KPX Abreve Tcommaaccent -95 +KPX Abreve U -50 +KPX Abreve Uacute -50 +KPX Abreve Ucircumflex -50 +KPX Abreve Udieresis -50 +KPX Abreve Ugrave -50 +KPX Abreve Uhungarumlaut -50 +KPX Abreve Umacron -50 +KPX Abreve Uogonek -50 +KPX Abreve Uring -50 +KPX Abreve V -145 +KPX Abreve W -130 +KPX Abreve Y -100 +KPX Abreve Yacute -100 +KPX Abreve Ydieresis -100 +KPX Abreve p -25 +KPX Abreve quoteright -74 +KPX Abreve u -50 +KPX Abreve uacute -50 +KPX Abreve ucircumflex -50 +KPX Abreve udieresis -50 +KPX Abreve ugrave -50 +KPX Abreve uhungarumlaut -50 +KPX Abreve umacron -50 +KPX Abreve uogonek -50 +KPX Abreve uring -50 +KPX Abreve v -100 +KPX Abreve w -90 +KPX Abreve y -74 +KPX Abreve yacute -74 +KPX Abreve ydieresis -74 +KPX Acircumflex C -55 +KPX Acircumflex Cacute -55 +KPX Acircumflex Ccaron -55 +KPX Acircumflex Ccedilla -55 +KPX Acircumflex G -55 +KPX Acircumflex Gbreve -55 +KPX Acircumflex Gcommaaccent -55 +KPX Acircumflex O -45 +KPX Acircumflex Oacute -45 +KPX Acircumflex Ocircumflex -45 +KPX Acircumflex Odieresis -45 +KPX Acircumflex Ograve -45 +KPX Acircumflex Ohungarumlaut -45 +KPX Acircumflex Omacron -45 +KPX Acircumflex Oslash -45 +KPX Acircumflex Otilde -45 +KPX Acircumflex Q -45 +KPX Acircumflex T -95 +KPX Acircumflex Tcaron -95 +KPX Acircumflex Tcommaaccent -95 +KPX Acircumflex U -50 +KPX Acircumflex Uacute -50 +KPX Acircumflex Ucircumflex -50 +KPX Acircumflex Udieresis -50 +KPX Acircumflex Ugrave -50 +KPX Acircumflex Uhungarumlaut -50 +KPX Acircumflex Umacron -50 +KPX Acircumflex Uogonek -50 +KPX Acircumflex Uring -50 +KPX Acircumflex V -145 +KPX Acircumflex W -130 +KPX Acircumflex Y -100 +KPX Acircumflex Yacute -100 +KPX Acircumflex Ydieresis -100 +KPX Acircumflex p -25 +KPX Acircumflex quoteright -74 +KPX Acircumflex u -50 +KPX Acircumflex uacute -50 +KPX Acircumflex ucircumflex -50 +KPX Acircumflex udieresis -50 +KPX Acircumflex ugrave -50 +KPX Acircumflex uhungarumlaut -50 +KPX Acircumflex umacron -50 +KPX Acircumflex uogonek -50 +KPX Acircumflex uring -50 +KPX Acircumflex v -100 +KPX Acircumflex w -90 +KPX Acircumflex y -74 +KPX Acircumflex yacute -74 +KPX Acircumflex ydieresis -74 +KPX Adieresis C -55 +KPX Adieresis Cacute -55 +KPX Adieresis Ccaron -55 +KPX Adieresis Ccedilla -55 +KPX Adieresis G -55 +KPX Adieresis Gbreve -55 +KPX Adieresis Gcommaaccent -55 +KPX Adieresis O -45 +KPX Adieresis Oacute -45 +KPX Adieresis Ocircumflex -45 +KPX Adieresis Odieresis -45 +KPX Adieresis Ograve -45 +KPX Adieresis Ohungarumlaut -45 +KPX Adieresis Omacron -45 +KPX Adieresis Oslash -45 +KPX Adieresis Otilde -45 +KPX Adieresis Q -45 +KPX Adieresis T -95 +KPX Adieresis Tcaron -95 +KPX Adieresis Tcommaaccent -95 +KPX Adieresis U -50 +KPX Adieresis Uacute -50 +KPX Adieresis Ucircumflex -50 +KPX Adieresis Udieresis -50 +KPX Adieresis Ugrave -50 +KPX Adieresis Uhungarumlaut -50 +KPX Adieresis Umacron -50 +KPX Adieresis Uogonek -50 +KPX Adieresis Uring -50 +KPX Adieresis V -145 +KPX Adieresis W -130 +KPX Adieresis Y -100 +KPX Adieresis Yacute -100 +KPX Adieresis Ydieresis -100 +KPX Adieresis p -25 +KPX Adieresis quoteright -74 +KPX Adieresis u -50 +KPX Adieresis uacute -50 +KPX Adieresis ucircumflex -50 +KPX Adieresis udieresis -50 +KPX Adieresis ugrave -50 +KPX Adieresis uhungarumlaut -50 +KPX Adieresis umacron -50 +KPX Adieresis uogonek -50 +KPX Adieresis uring -50 +KPX Adieresis v -100 +KPX Adieresis w -90 +KPX Adieresis y -74 +KPX Adieresis yacute -74 +KPX Adieresis ydieresis -74 +KPX Agrave C -55 +KPX Agrave Cacute -55 +KPX Agrave Ccaron -55 +KPX Agrave Ccedilla -55 +KPX Agrave G -55 +KPX Agrave Gbreve -55 +KPX Agrave Gcommaaccent -55 +KPX Agrave O -45 +KPX Agrave Oacute -45 +KPX Agrave Ocircumflex -45 +KPX Agrave Odieresis -45 +KPX Agrave Ograve -45 +KPX Agrave Ohungarumlaut -45 +KPX Agrave Omacron -45 +KPX Agrave Oslash -45 +KPX Agrave Otilde -45 +KPX Agrave Q -45 +KPX Agrave T -95 +KPX Agrave Tcaron -95 +KPX Agrave Tcommaaccent -95 +KPX Agrave U -50 +KPX Agrave Uacute -50 +KPX Agrave Ucircumflex -50 +KPX Agrave Udieresis -50 +KPX Agrave Ugrave -50 +KPX Agrave Uhungarumlaut -50 +KPX Agrave Umacron -50 +KPX Agrave Uogonek -50 +KPX Agrave Uring -50 +KPX Agrave V -145 +KPX Agrave W -130 +KPX Agrave Y -100 +KPX Agrave Yacute -100 +KPX Agrave Ydieresis -100 +KPX Agrave p -25 +KPX Agrave quoteright -74 +KPX Agrave u -50 +KPX Agrave uacute -50 +KPX Agrave ucircumflex -50 +KPX Agrave udieresis -50 +KPX Agrave ugrave -50 +KPX Agrave uhungarumlaut -50 +KPX Agrave umacron -50 +KPX Agrave uogonek -50 +KPX Agrave uring -50 +KPX Agrave v -100 +KPX Agrave w -90 +KPX Agrave y -74 +KPX Agrave yacute -74 +KPX Agrave ydieresis -74 +KPX Amacron C -55 +KPX Amacron Cacute -55 +KPX Amacron Ccaron -55 +KPX Amacron Ccedilla -55 +KPX Amacron G -55 +KPX Amacron Gbreve -55 +KPX Amacron Gcommaaccent -55 +KPX Amacron O -45 +KPX Amacron Oacute -45 +KPX Amacron Ocircumflex -45 +KPX Amacron Odieresis -45 +KPX Amacron Ograve -45 +KPX Amacron Ohungarumlaut -45 +KPX Amacron Omacron -45 +KPX Amacron Oslash -45 +KPX Amacron Otilde -45 +KPX Amacron Q -45 +KPX Amacron T -95 +KPX Amacron Tcaron -95 +KPX Amacron Tcommaaccent -95 +KPX Amacron U -50 +KPX Amacron Uacute -50 +KPX Amacron Ucircumflex -50 +KPX Amacron Udieresis -50 +KPX Amacron Ugrave -50 +KPX Amacron Uhungarumlaut -50 +KPX Amacron Umacron -50 +KPX Amacron Uogonek -50 +KPX Amacron Uring -50 +KPX Amacron V -145 +KPX Amacron W -130 +KPX Amacron Y -100 +KPX Amacron Yacute -100 +KPX Amacron Ydieresis -100 +KPX Amacron p -25 +KPX Amacron quoteright -74 +KPX Amacron u -50 +KPX Amacron uacute -50 +KPX Amacron ucircumflex -50 +KPX Amacron udieresis -50 +KPX Amacron ugrave -50 +KPX Amacron uhungarumlaut -50 +KPX Amacron umacron -50 +KPX Amacron uogonek -50 +KPX Amacron uring -50 +KPX Amacron v -100 +KPX Amacron w -90 +KPX Amacron y -74 +KPX Amacron yacute -74 +KPX Amacron ydieresis -74 +KPX Aogonek C -55 +KPX Aogonek Cacute -55 +KPX Aogonek Ccaron -55 +KPX Aogonek Ccedilla -55 +KPX Aogonek G -55 +KPX Aogonek Gbreve -55 +KPX Aogonek Gcommaaccent -55 +KPX Aogonek O -45 +KPX Aogonek Oacute -45 +KPX Aogonek Ocircumflex -45 +KPX Aogonek Odieresis -45 +KPX Aogonek Ograve -45 +KPX Aogonek Ohungarumlaut -45 +KPX Aogonek Omacron -45 +KPX Aogonek Oslash -45 +KPX Aogonek Otilde -45 +KPX Aogonek Q -45 +KPX Aogonek T -95 +KPX Aogonek Tcaron -95 +KPX Aogonek Tcommaaccent -95 +KPX Aogonek U -50 +KPX Aogonek Uacute -50 +KPX Aogonek Ucircumflex -50 +KPX Aogonek Udieresis -50 +KPX Aogonek Ugrave -50 +KPX Aogonek Uhungarumlaut -50 +KPX Aogonek Umacron -50 +KPX Aogonek Uogonek -50 +KPX Aogonek Uring -50 +KPX Aogonek V -145 +KPX Aogonek W -130 +KPX Aogonek Y -100 +KPX Aogonek Yacute -100 +KPX Aogonek Ydieresis -100 +KPX Aogonek p -25 +KPX Aogonek quoteright -74 +KPX Aogonek u -50 +KPX Aogonek uacute -50 +KPX Aogonek ucircumflex -50 +KPX Aogonek udieresis -50 +KPX Aogonek ugrave -50 +KPX Aogonek uhungarumlaut -50 +KPX Aogonek umacron -50 +KPX Aogonek uogonek -50 +KPX Aogonek uring -50 +KPX Aogonek v -100 +KPX Aogonek w -90 +KPX Aogonek y -34 +KPX Aogonek yacute -34 +KPX Aogonek ydieresis -34 +KPX Aring C -55 +KPX Aring Cacute -55 +KPX Aring Ccaron -55 +KPX Aring Ccedilla -55 +KPX Aring G -55 +KPX Aring Gbreve -55 +KPX Aring Gcommaaccent -55 +KPX Aring O -45 +KPX Aring Oacute -45 +KPX Aring Ocircumflex -45 +KPX Aring Odieresis -45 +KPX Aring Ograve -45 +KPX Aring Ohungarumlaut -45 +KPX Aring Omacron -45 +KPX Aring Oslash -45 +KPX Aring Otilde -45 +KPX Aring Q -45 +KPX Aring T -95 +KPX Aring Tcaron -95 +KPX Aring Tcommaaccent -95 +KPX Aring U -50 +KPX Aring Uacute -50 +KPX Aring Ucircumflex -50 +KPX Aring Udieresis -50 +KPX Aring Ugrave -50 +KPX Aring Uhungarumlaut -50 +KPX Aring Umacron -50 +KPX Aring Uogonek -50 +KPX Aring Uring -50 +KPX Aring V -145 +KPX Aring W -130 +KPX Aring Y -100 +KPX Aring Yacute -100 +KPX Aring Ydieresis -100 +KPX Aring p -25 +KPX Aring quoteright -74 +KPX Aring u -50 +KPX Aring uacute -50 +KPX Aring ucircumflex -50 +KPX Aring udieresis -50 +KPX Aring ugrave -50 +KPX Aring uhungarumlaut -50 +KPX Aring umacron -50 +KPX Aring uogonek -50 +KPX Aring uring -50 +KPX Aring v -100 +KPX Aring w -90 +KPX Aring y -74 +KPX Aring yacute -74 +KPX Aring ydieresis -74 +KPX Atilde C -55 +KPX Atilde Cacute -55 +KPX Atilde Ccaron -55 +KPX Atilde Ccedilla -55 +KPX Atilde G -55 +KPX Atilde Gbreve -55 +KPX Atilde Gcommaaccent -55 +KPX Atilde O -45 +KPX Atilde Oacute -45 +KPX Atilde Ocircumflex -45 +KPX Atilde Odieresis -45 +KPX Atilde Ograve -45 +KPX Atilde Ohungarumlaut -45 +KPX Atilde Omacron -45 +KPX Atilde Oslash -45 +KPX Atilde Otilde -45 +KPX Atilde Q -45 +KPX Atilde T -95 +KPX Atilde Tcaron -95 +KPX Atilde Tcommaaccent -95 +KPX Atilde U -50 +KPX Atilde Uacute -50 +KPX Atilde Ucircumflex -50 +KPX Atilde Udieresis -50 +KPX Atilde Ugrave -50 +KPX Atilde Uhungarumlaut -50 +KPX Atilde Umacron -50 +KPX Atilde Uogonek -50 +KPX Atilde Uring -50 +KPX Atilde V -145 +KPX Atilde W -130 +KPX Atilde Y -100 +KPX Atilde Yacute -100 +KPX Atilde Ydieresis -100 +KPX Atilde p -25 +KPX Atilde quoteright -74 +KPX Atilde u -50 +KPX Atilde uacute -50 +KPX Atilde ucircumflex -50 +KPX Atilde udieresis -50 +KPX Atilde ugrave -50 +KPX Atilde uhungarumlaut -50 +KPX Atilde umacron -50 +KPX Atilde uogonek -50 +KPX Atilde uring -50 +KPX Atilde v -100 +KPX Atilde w -90 +KPX Atilde y -74 +KPX Atilde yacute -74 +KPX Atilde ydieresis -74 +KPX B A -30 +KPX B Aacute -30 +KPX B Abreve -30 +KPX B Acircumflex -30 +KPX B Adieresis -30 +KPX B Agrave -30 +KPX B Amacron -30 +KPX B Aogonek -30 +KPX B Aring -30 +KPX B Atilde -30 +KPX B U -10 +KPX B Uacute -10 +KPX B Ucircumflex -10 +KPX B Udieresis -10 +KPX B Ugrave -10 +KPX B Uhungarumlaut -10 +KPX B Umacron -10 +KPX B Uogonek -10 +KPX B Uring -10 +KPX D A -35 +KPX D Aacute -35 +KPX D Abreve -35 +KPX D Acircumflex -35 +KPX D Adieresis -35 +KPX D Agrave -35 +KPX D Amacron -35 +KPX D Aogonek -35 +KPX D Aring -35 +KPX D Atilde -35 +KPX D V -40 +KPX D W -40 +KPX D Y -40 +KPX D Yacute -40 +KPX D Ydieresis -40 +KPX D period -20 +KPX Dcaron A -35 +KPX Dcaron Aacute -35 +KPX Dcaron Abreve -35 +KPX Dcaron Acircumflex -35 +KPX Dcaron Adieresis -35 +KPX Dcaron Agrave -35 +KPX Dcaron Amacron -35 +KPX Dcaron Aogonek -35 +KPX Dcaron Aring -35 +KPX Dcaron Atilde -35 +KPX Dcaron V -40 +KPX Dcaron W -40 +KPX Dcaron Y -40 +KPX Dcaron Yacute -40 +KPX Dcaron Ydieresis -40 +KPX Dcaron period -20 +KPX Dcroat A -35 +KPX Dcroat Aacute -35 +KPX Dcroat Abreve -35 +KPX Dcroat Acircumflex -35 +KPX Dcroat Adieresis -35 +KPX Dcroat Agrave -35 +KPX Dcroat Amacron -35 +KPX Dcroat Aogonek -35 +KPX Dcroat Aring -35 +KPX Dcroat Atilde -35 +KPX Dcroat V -40 +KPX Dcroat W -40 +KPX Dcroat Y -40 +KPX Dcroat Yacute -40 +KPX Dcroat Ydieresis -40 +KPX Dcroat period -20 +KPX F A -90 +KPX F Aacute -90 +KPX F Abreve -90 +KPX F Acircumflex -90 +KPX F Adieresis -90 +KPX F Agrave -90 +KPX F Amacron -90 +KPX F Aogonek -90 +KPX F Aring -90 +KPX F Atilde -90 +KPX F a -25 +KPX F aacute -25 +KPX F abreve -25 +KPX F acircumflex -25 +KPX F adieresis -25 +KPX F agrave -25 +KPX F amacron -25 +KPX F aogonek -25 +KPX F aring -25 +KPX F atilde -25 +KPX F comma -92 +KPX F e -25 +KPX F eacute -25 +KPX F ecaron -25 +KPX F ecircumflex -25 +KPX F edieresis -25 +KPX F edotaccent -25 +KPX F egrave -25 +KPX F emacron -25 +KPX F eogonek -25 +KPX F o -25 +KPX F oacute -25 +KPX F ocircumflex -25 +KPX F odieresis -25 +KPX F ograve -25 +KPX F ohungarumlaut -25 +KPX F omacron -25 +KPX F oslash -25 +KPX F otilde -25 +KPX F period -110 +KPX J A -30 +KPX J Aacute -30 +KPX J Abreve -30 +KPX J Acircumflex -30 +KPX J Adieresis -30 +KPX J Agrave -30 +KPX J Amacron -30 +KPX J Aogonek -30 +KPX J Aring -30 +KPX J Atilde -30 +KPX J a -15 +KPX J aacute -15 +KPX J abreve -15 +KPX J acircumflex -15 +KPX J adieresis -15 +KPX J agrave -15 +KPX J amacron -15 +KPX J aogonek -15 +KPX J aring -15 +KPX J atilde -15 +KPX J e -15 +KPX J eacute -15 +KPX J ecaron -15 +KPX J ecircumflex -15 +KPX J edieresis -15 +KPX J edotaccent -15 +KPX J egrave -15 +KPX J emacron -15 +KPX J eogonek -15 +KPX J o -15 +KPX J oacute -15 +KPX J ocircumflex -15 +KPX J odieresis -15 +KPX J ograve -15 +KPX J ohungarumlaut -15 +KPX J omacron -15 +KPX J oslash -15 +KPX J otilde -15 +KPX J period -20 +KPX J u -15 +KPX J uacute -15 +KPX J ucircumflex -15 +KPX J udieresis -15 +KPX J ugrave -15 +KPX J uhungarumlaut -15 +KPX J umacron -15 +KPX J uogonek -15 +KPX J uring -15 +KPX K O -30 +KPX K Oacute -30 +KPX K Ocircumflex -30 +KPX K Odieresis -30 +KPX K Ograve -30 +KPX K Ohungarumlaut -30 +KPX K Omacron -30 +KPX K Oslash -30 +KPX K Otilde -30 +KPX K e -25 +KPX K eacute -25 +KPX K ecaron -25 +KPX K ecircumflex -25 +KPX K edieresis -25 +KPX K edotaccent -25 +KPX K egrave -25 +KPX K emacron -25 +KPX K eogonek -25 +KPX K o -25 +KPX K oacute -25 +KPX K ocircumflex -25 +KPX K odieresis -25 +KPX K ograve -25 +KPX K ohungarumlaut -25 +KPX K omacron -25 +KPX K oslash -25 +KPX K otilde -25 +KPX K u -15 +KPX K uacute -15 +KPX K ucircumflex -15 +KPX K udieresis -15 +KPX K ugrave -15 +KPX K uhungarumlaut -15 +KPX K umacron -15 +KPX K uogonek -15 +KPX K uring -15 +KPX K y -45 +KPX K yacute -45 +KPX K ydieresis -45 +KPX Kcommaaccent O -30 +KPX Kcommaaccent Oacute -30 +KPX Kcommaaccent Ocircumflex -30 +KPX Kcommaaccent Odieresis -30 +KPX Kcommaaccent Ograve -30 +KPX Kcommaaccent Ohungarumlaut -30 +KPX Kcommaaccent Omacron -30 +KPX Kcommaaccent Oslash -30 +KPX Kcommaaccent Otilde -30 +KPX Kcommaaccent e -25 +KPX Kcommaaccent eacute -25 +KPX Kcommaaccent ecaron -25 +KPX Kcommaaccent ecircumflex -25 +KPX Kcommaaccent edieresis -25 +KPX Kcommaaccent edotaccent -25 +KPX Kcommaaccent egrave -25 +KPX Kcommaaccent emacron -25 +KPX Kcommaaccent eogonek -25 +KPX Kcommaaccent o -25 +KPX Kcommaaccent oacute -25 +KPX Kcommaaccent ocircumflex -25 +KPX Kcommaaccent odieresis -25 +KPX Kcommaaccent ograve -25 +KPX Kcommaaccent ohungarumlaut -25 +KPX Kcommaaccent omacron -25 +KPX Kcommaaccent oslash -25 +KPX Kcommaaccent otilde -25 +KPX Kcommaaccent u -15 +KPX Kcommaaccent uacute -15 +KPX Kcommaaccent ucircumflex -15 +KPX Kcommaaccent udieresis -15 +KPX Kcommaaccent ugrave -15 +KPX Kcommaaccent uhungarumlaut -15 +KPX Kcommaaccent umacron -15 +KPX Kcommaaccent uogonek -15 +KPX Kcommaaccent uring -15 +KPX Kcommaaccent y -45 +KPX Kcommaaccent yacute -45 +KPX Kcommaaccent ydieresis -45 +KPX L T -92 +KPX L Tcaron -92 +KPX L Tcommaaccent -92 +KPX L V -92 +KPX L W -92 +KPX L Y -92 +KPX L Yacute -92 +KPX L Ydieresis -92 +KPX L quotedblright -20 +KPX L quoteright -110 +KPX L y -55 +KPX L yacute -55 +KPX L ydieresis -55 +KPX Lacute T -92 +KPX Lacute Tcaron -92 +KPX Lacute Tcommaaccent -92 +KPX Lacute V -92 +KPX Lacute W -92 +KPX Lacute Y -92 +KPX Lacute Yacute -92 +KPX Lacute Ydieresis -92 +KPX Lacute quotedblright -20 +KPX Lacute quoteright -110 +KPX Lacute y -55 +KPX Lacute yacute -55 +KPX Lacute ydieresis -55 +KPX Lcommaaccent T -92 +KPX Lcommaaccent Tcaron -92 +KPX Lcommaaccent Tcommaaccent -92 +KPX Lcommaaccent V -92 +KPX Lcommaaccent W -92 +KPX Lcommaaccent Y -92 +KPX Lcommaaccent Yacute -92 +KPX Lcommaaccent Ydieresis -92 +KPX Lcommaaccent quotedblright -20 +KPX Lcommaaccent quoteright -110 +KPX Lcommaaccent y -55 +KPX Lcommaaccent yacute -55 +KPX Lcommaaccent ydieresis -55 +KPX Lslash T -92 +KPX Lslash Tcaron -92 +KPX Lslash Tcommaaccent -92 +KPX Lslash V -92 +KPX Lslash W -92 +KPX Lslash Y -92 +KPX Lslash Yacute -92 +KPX Lslash Ydieresis -92 +KPX Lslash quotedblright -20 +KPX Lslash quoteright -110 +KPX Lslash y -55 +KPX Lslash yacute -55 +KPX Lslash ydieresis -55 +KPX N A -20 +KPX N Aacute -20 +KPX N Abreve -20 +KPX N Acircumflex -20 +KPX N Adieresis -20 +KPX N Agrave -20 +KPX N Amacron -20 +KPX N Aogonek -20 +KPX N Aring -20 +KPX N Atilde -20 +KPX Nacute A -20 +KPX Nacute Aacute -20 +KPX Nacute Abreve -20 +KPX Nacute Acircumflex -20 +KPX Nacute Adieresis -20 +KPX Nacute Agrave -20 +KPX Nacute Amacron -20 +KPX Nacute Aogonek -20 +KPX Nacute Aring -20 +KPX Nacute Atilde -20 +KPX Ncaron A -20 +KPX Ncaron Aacute -20 +KPX Ncaron Abreve -20 +KPX Ncaron Acircumflex -20 +KPX Ncaron Adieresis -20 +KPX Ncaron Agrave -20 +KPX Ncaron Amacron -20 +KPX Ncaron Aogonek -20 +KPX Ncaron Aring -20 +KPX Ncaron Atilde -20 +KPX Ncommaaccent A -20 +KPX Ncommaaccent Aacute -20 +KPX Ncommaaccent Abreve -20 +KPX Ncommaaccent Acircumflex -20 +KPX Ncommaaccent Adieresis -20 +KPX Ncommaaccent Agrave -20 +KPX Ncommaaccent Amacron -20 +KPX Ncommaaccent Aogonek -20 +KPX Ncommaaccent Aring -20 +KPX Ncommaaccent Atilde -20 +KPX Ntilde A -20 +KPX Ntilde Aacute -20 +KPX Ntilde Abreve -20 +KPX Ntilde Acircumflex -20 +KPX Ntilde Adieresis -20 +KPX Ntilde Agrave -20 +KPX Ntilde Amacron -20 +KPX Ntilde Aogonek -20 +KPX Ntilde Aring -20 +KPX Ntilde Atilde -20 +KPX O A -40 +KPX O Aacute -40 +KPX O Abreve -40 +KPX O Acircumflex -40 +KPX O Adieresis -40 +KPX O Agrave -40 +KPX O Amacron -40 +KPX O Aogonek -40 +KPX O Aring -40 +KPX O Atilde -40 +KPX O T -40 +KPX O Tcaron -40 +KPX O Tcommaaccent -40 +KPX O V -50 +KPX O W -50 +KPX O X -40 +KPX O Y -50 +KPX O Yacute -50 +KPX O Ydieresis -50 +KPX Oacute A -40 +KPX Oacute Aacute -40 +KPX Oacute Abreve -40 +KPX Oacute Acircumflex -40 +KPX Oacute Adieresis -40 +KPX Oacute Agrave -40 +KPX Oacute Amacron -40 +KPX Oacute Aogonek -40 +KPX Oacute Aring -40 +KPX Oacute Atilde -40 +KPX Oacute T -40 +KPX Oacute Tcaron -40 +KPX Oacute Tcommaaccent -40 +KPX Oacute V -50 +KPX Oacute W -50 +KPX Oacute X -40 +KPX Oacute Y -50 +KPX Oacute Yacute -50 +KPX Oacute Ydieresis -50 +KPX Ocircumflex A -40 +KPX Ocircumflex Aacute -40 +KPX Ocircumflex Abreve -40 +KPX Ocircumflex Acircumflex -40 +KPX Ocircumflex Adieresis -40 +KPX Ocircumflex Agrave -40 +KPX Ocircumflex Amacron -40 +KPX Ocircumflex Aogonek -40 +KPX Ocircumflex Aring -40 +KPX Ocircumflex Atilde -40 +KPX Ocircumflex T -40 +KPX Ocircumflex Tcaron -40 +KPX Ocircumflex Tcommaaccent -40 +KPX Ocircumflex V -50 +KPX Ocircumflex W -50 +KPX Ocircumflex X -40 +KPX Ocircumflex Y -50 +KPX Ocircumflex Yacute -50 +KPX Ocircumflex Ydieresis -50 +KPX Odieresis A -40 +KPX Odieresis Aacute -40 +KPX Odieresis Abreve -40 +KPX Odieresis Acircumflex -40 +KPX Odieresis Adieresis -40 +KPX Odieresis Agrave -40 +KPX Odieresis Amacron -40 +KPX Odieresis Aogonek -40 +KPX Odieresis Aring -40 +KPX Odieresis Atilde -40 +KPX Odieresis T -40 +KPX Odieresis Tcaron -40 +KPX Odieresis Tcommaaccent -40 +KPX Odieresis V -50 +KPX Odieresis W -50 +KPX Odieresis X -40 +KPX Odieresis Y -50 +KPX Odieresis Yacute -50 +KPX Odieresis Ydieresis -50 +KPX Ograve A -40 +KPX Ograve Aacute -40 +KPX Ograve Abreve -40 +KPX Ograve Acircumflex -40 +KPX Ograve Adieresis -40 +KPX Ograve Agrave -40 +KPX Ograve Amacron -40 +KPX Ograve Aogonek -40 +KPX Ograve Aring -40 +KPX Ograve Atilde -40 +KPX Ograve T -40 +KPX Ograve Tcaron -40 +KPX Ograve Tcommaaccent -40 +KPX Ograve V -50 +KPX Ograve W -50 +KPX Ograve X -40 +KPX Ograve Y -50 +KPX Ograve Yacute -50 +KPX Ograve Ydieresis -50 +KPX Ohungarumlaut A -40 +KPX Ohungarumlaut Aacute -40 +KPX Ohungarumlaut Abreve -40 +KPX Ohungarumlaut Acircumflex -40 +KPX Ohungarumlaut Adieresis -40 +KPX Ohungarumlaut Agrave -40 +KPX Ohungarumlaut Amacron -40 +KPX Ohungarumlaut Aogonek -40 +KPX Ohungarumlaut Aring -40 +KPX Ohungarumlaut Atilde -40 +KPX Ohungarumlaut T -40 +KPX Ohungarumlaut Tcaron -40 +KPX Ohungarumlaut Tcommaaccent -40 +KPX Ohungarumlaut V -50 +KPX Ohungarumlaut W -50 +KPX Ohungarumlaut X -40 +KPX Ohungarumlaut Y -50 +KPX Ohungarumlaut Yacute -50 +KPX Ohungarumlaut Ydieresis -50 +KPX Omacron A -40 +KPX Omacron Aacute -40 +KPX Omacron Abreve -40 +KPX Omacron Acircumflex -40 +KPX Omacron Adieresis -40 +KPX Omacron Agrave -40 +KPX Omacron Amacron -40 +KPX Omacron Aogonek -40 +KPX Omacron Aring -40 +KPX Omacron Atilde -40 +KPX Omacron T -40 +KPX Omacron Tcaron -40 +KPX Omacron Tcommaaccent -40 +KPX Omacron V -50 +KPX Omacron W -50 +KPX Omacron X -40 +KPX Omacron Y -50 +KPX Omacron Yacute -50 +KPX Omacron Ydieresis -50 +KPX Oslash A -40 +KPX Oslash Aacute -40 +KPX Oslash Abreve -40 +KPX Oslash Acircumflex -40 +KPX Oslash Adieresis -40 +KPX Oslash Agrave -40 +KPX Oslash Amacron -40 +KPX Oslash Aogonek -40 +KPX Oslash Aring -40 +KPX Oslash Atilde -40 +KPX Oslash T -40 +KPX Oslash Tcaron -40 +KPX Oslash Tcommaaccent -40 +KPX Oslash V -50 +KPX Oslash W -50 +KPX Oslash X -40 +KPX Oslash Y -50 +KPX Oslash Yacute -50 +KPX Oslash Ydieresis -50 +KPX Otilde A -40 +KPX Otilde Aacute -40 +KPX Otilde Abreve -40 +KPX Otilde Acircumflex -40 +KPX Otilde Adieresis -40 +KPX Otilde Agrave -40 +KPX Otilde Amacron -40 +KPX Otilde Aogonek -40 +KPX Otilde Aring -40 +KPX Otilde Atilde -40 +KPX Otilde T -40 +KPX Otilde Tcaron -40 +KPX Otilde Tcommaaccent -40 +KPX Otilde V -50 +KPX Otilde W -50 +KPX Otilde X -40 +KPX Otilde Y -50 +KPX Otilde Yacute -50 +KPX Otilde Ydieresis -50 +KPX P A -74 +KPX P Aacute -74 +KPX P Abreve -74 +KPX P Acircumflex -74 +KPX P Adieresis -74 +KPX P Agrave -74 +KPX P Amacron -74 +KPX P Aogonek -74 +KPX P Aring -74 +KPX P Atilde -74 +KPX P a -10 +KPX P aacute -10 +KPX P abreve -10 +KPX P acircumflex -10 +KPX P adieresis -10 +KPX P agrave -10 +KPX P amacron -10 +KPX P aogonek -10 +KPX P aring -10 +KPX P atilde -10 +KPX P comma -92 +KPX P e -20 +KPX P eacute -20 +KPX P ecaron -20 +KPX P ecircumflex -20 +KPX P edieresis -20 +KPX P edotaccent -20 +KPX P egrave -20 +KPX P emacron -20 +KPX P eogonek -20 +KPX P o -20 +KPX P oacute -20 +KPX P ocircumflex -20 +KPX P odieresis -20 +KPX P ograve -20 +KPX P ohungarumlaut -20 +KPX P omacron -20 +KPX P oslash -20 +KPX P otilde -20 +KPX P period -110 +KPX Q U -10 +KPX Q Uacute -10 +KPX Q Ucircumflex -10 +KPX Q Udieresis -10 +KPX Q Ugrave -10 +KPX Q Uhungarumlaut -10 +KPX Q Umacron -10 +KPX Q Uogonek -10 +KPX Q Uring -10 +KPX Q period -20 +KPX R O -30 +KPX R Oacute -30 +KPX R Ocircumflex -30 +KPX R Odieresis -30 +KPX R Ograve -30 +KPX R Ohungarumlaut -30 +KPX R Omacron -30 +KPX R Oslash -30 +KPX R Otilde -30 +KPX R T -40 +KPX R Tcaron -40 +KPX R Tcommaaccent -40 +KPX R U -30 +KPX R Uacute -30 +KPX R Ucircumflex -30 +KPX R Udieresis -30 +KPX R Ugrave -30 +KPX R Uhungarumlaut -30 +KPX R Umacron -30 +KPX R Uogonek -30 +KPX R Uring -30 +KPX R V -55 +KPX R W -35 +KPX R Y -35 +KPX R Yacute -35 +KPX R Ydieresis -35 +KPX Racute O -30 +KPX Racute Oacute -30 +KPX Racute Ocircumflex -30 +KPX Racute Odieresis -30 +KPX Racute Ograve -30 +KPX Racute Ohungarumlaut -30 +KPX Racute Omacron -30 +KPX Racute Oslash -30 +KPX Racute Otilde -30 +KPX Racute T -40 +KPX Racute Tcaron -40 +KPX Racute Tcommaaccent -40 +KPX Racute U -30 +KPX Racute Uacute -30 +KPX Racute Ucircumflex -30 +KPX Racute Udieresis -30 +KPX Racute Ugrave -30 +KPX Racute Uhungarumlaut -30 +KPX Racute Umacron -30 +KPX Racute Uogonek -30 +KPX Racute Uring -30 +KPX Racute V -55 +KPX Racute W -35 +KPX Racute Y -35 +KPX Racute Yacute -35 +KPX Racute Ydieresis -35 +KPX Rcaron O -30 +KPX Rcaron Oacute -30 +KPX Rcaron Ocircumflex -30 +KPX Rcaron Odieresis -30 +KPX Rcaron Ograve -30 +KPX Rcaron Ohungarumlaut -30 +KPX Rcaron Omacron -30 +KPX Rcaron Oslash -30 +KPX Rcaron Otilde -30 +KPX Rcaron T -40 +KPX Rcaron Tcaron -40 +KPX Rcaron Tcommaaccent -40 +KPX Rcaron U -30 +KPX Rcaron Uacute -30 +KPX Rcaron Ucircumflex -30 +KPX Rcaron Udieresis -30 +KPX Rcaron Ugrave -30 +KPX Rcaron Uhungarumlaut -30 +KPX Rcaron Umacron -30 +KPX Rcaron Uogonek -30 +KPX Rcaron Uring -30 +KPX Rcaron V -55 +KPX Rcaron W -35 +KPX Rcaron Y -35 +KPX Rcaron Yacute -35 +KPX Rcaron Ydieresis -35 +KPX Rcommaaccent O -30 +KPX Rcommaaccent Oacute -30 +KPX Rcommaaccent Ocircumflex -30 +KPX Rcommaaccent Odieresis -30 +KPX Rcommaaccent Ograve -30 +KPX Rcommaaccent Ohungarumlaut -30 +KPX Rcommaaccent Omacron -30 +KPX Rcommaaccent Oslash -30 +KPX Rcommaaccent Otilde -30 +KPX Rcommaaccent T -40 +KPX Rcommaaccent Tcaron -40 +KPX Rcommaaccent Tcommaaccent -40 +KPX Rcommaaccent U -30 +KPX Rcommaaccent Uacute -30 +KPX Rcommaaccent Ucircumflex -30 +KPX Rcommaaccent Udieresis -30 +KPX Rcommaaccent Ugrave -30 +KPX Rcommaaccent Uhungarumlaut -30 +KPX Rcommaaccent Umacron -30 +KPX Rcommaaccent Uogonek -30 +KPX Rcommaaccent Uring -30 +KPX Rcommaaccent V -55 +KPX Rcommaaccent W -35 +KPX Rcommaaccent Y -35 +KPX Rcommaaccent Yacute -35 +KPX Rcommaaccent Ydieresis -35 +KPX T A -90 +KPX T Aacute -90 +KPX T Abreve -90 +KPX T Acircumflex -90 +KPX T Adieresis -90 +KPX T Agrave -90 +KPX T Amacron -90 +KPX T Aogonek -90 +KPX T Aring -90 +KPX T Atilde -90 +KPX T O -18 +KPX T Oacute -18 +KPX T Ocircumflex -18 +KPX T Odieresis -18 +KPX T Ograve -18 +KPX T Ohungarumlaut -18 +KPX T Omacron -18 +KPX T Oslash -18 +KPX T Otilde -18 +KPX T a -92 +KPX T aacute -92 +KPX T abreve -52 +KPX T acircumflex -52 +KPX T adieresis -52 +KPX T agrave -52 +KPX T amacron -52 +KPX T aogonek -92 +KPX T aring -92 +KPX T atilde -52 +KPX T colon -74 +KPX T comma -74 +KPX T e -92 +KPX T eacute -92 +KPX T ecaron -92 +KPX T ecircumflex -92 +KPX T edieresis -52 +KPX T edotaccent -92 +KPX T egrave -52 +KPX T emacron -52 +KPX T eogonek -92 +KPX T hyphen -92 +KPX T i -18 +KPX T iacute -18 +KPX T iogonek -18 +KPX T o -92 +KPX T oacute -92 +KPX T ocircumflex -92 +KPX T odieresis -92 +KPX T ograve -92 +KPX T ohungarumlaut -92 +KPX T omacron -92 +KPX T oslash -92 +KPX T otilde -92 +KPX T period -90 +KPX T r -74 +KPX T racute -74 +KPX T rcaron -74 +KPX T rcommaaccent -74 +KPX T semicolon -74 +KPX T u -92 +KPX T uacute -92 +KPX T ucircumflex -92 +KPX T udieresis -92 +KPX T ugrave -92 +KPX T uhungarumlaut -92 +KPX T umacron -92 +KPX T uogonek -92 +KPX T uring -92 +KPX T w -74 +KPX T y -34 +KPX T yacute -34 +KPX T ydieresis -34 +KPX Tcaron A -90 +KPX Tcaron Aacute -90 +KPX Tcaron Abreve -90 +KPX Tcaron Acircumflex -90 +KPX Tcaron Adieresis -90 +KPX Tcaron Agrave -90 +KPX Tcaron Amacron -90 +KPX Tcaron Aogonek -90 +KPX Tcaron Aring -90 +KPX Tcaron Atilde -90 +KPX Tcaron O -18 +KPX Tcaron Oacute -18 +KPX Tcaron Ocircumflex -18 +KPX Tcaron Odieresis -18 +KPX Tcaron Ograve -18 +KPX Tcaron Ohungarumlaut -18 +KPX Tcaron Omacron -18 +KPX Tcaron Oslash -18 +KPX Tcaron Otilde -18 +KPX Tcaron a -92 +KPX Tcaron aacute -92 +KPX Tcaron abreve -52 +KPX Tcaron acircumflex -52 +KPX Tcaron adieresis -52 +KPX Tcaron agrave -52 +KPX Tcaron amacron -52 +KPX Tcaron aogonek -92 +KPX Tcaron aring -92 +KPX Tcaron atilde -52 +KPX Tcaron colon -74 +KPX Tcaron comma -74 +KPX Tcaron e -92 +KPX Tcaron eacute -92 +KPX Tcaron ecaron -92 +KPX Tcaron ecircumflex -92 +KPX Tcaron edieresis -52 +KPX Tcaron edotaccent -92 +KPX Tcaron egrave -52 +KPX Tcaron emacron -52 +KPX Tcaron eogonek -92 +KPX Tcaron hyphen -92 +KPX Tcaron i -18 +KPX Tcaron iacute -18 +KPX Tcaron iogonek -18 +KPX Tcaron o -92 +KPX Tcaron oacute -92 +KPX Tcaron ocircumflex -92 +KPX Tcaron odieresis -92 +KPX Tcaron ograve -92 +KPX Tcaron ohungarumlaut -92 +KPX Tcaron omacron -92 +KPX Tcaron oslash -92 +KPX Tcaron otilde -92 +KPX Tcaron period -90 +KPX Tcaron r -74 +KPX Tcaron racute -74 +KPX Tcaron rcaron -74 +KPX Tcaron rcommaaccent -74 +KPX Tcaron semicolon -74 +KPX Tcaron u -92 +KPX Tcaron uacute -92 +KPX Tcaron ucircumflex -92 +KPX Tcaron udieresis -92 +KPX Tcaron ugrave -92 +KPX Tcaron uhungarumlaut -92 +KPX Tcaron umacron -92 +KPX Tcaron uogonek -92 +KPX Tcaron uring -92 +KPX Tcaron w -74 +KPX Tcaron y -34 +KPX Tcaron yacute -34 +KPX Tcaron ydieresis -34 +KPX Tcommaaccent A -90 +KPX Tcommaaccent Aacute -90 +KPX Tcommaaccent Abreve -90 +KPX Tcommaaccent Acircumflex -90 +KPX Tcommaaccent Adieresis -90 +KPX Tcommaaccent Agrave -90 +KPX Tcommaaccent Amacron -90 +KPX Tcommaaccent Aogonek -90 +KPX Tcommaaccent Aring -90 +KPX Tcommaaccent Atilde -90 +KPX Tcommaaccent O -18 +KPX Tcommaaccent Oacute -18 +KPX Tcommaaccent Ocircumflex -18 +KPX Tcommaaccent Odieresis -18 +KPX Tcommaaccent Ograve -18 +KPX Tcommaaccent Ohungarumlaut -18 +KPX Tcommaaccent Omacron -18 +KPX Tcommaaccent Oslash -18 +KPX Tcommaaccent Otilde -18 +KPX Tcommaaccent a -92 +KPX Tcommaaccent aacute -92 +KPX Tcommaaccent abreve -52 +KPX Tcommaaccent acircumflex -52 +KPX Tcommaaccent adieresis -52 +KPX Tcommaaccent agrave -52 +KPX Tcommaaccent amacron -52 +KPX Tcommaaccent aogonek -92 +KPX Tcommaaccent aring -92 +KPX Tcommaaccent atilde -52 +KPX Tcommaaccent colon -74 +KPX Tcommaaccent comma -74 +KPX Tcommaaccent e -92 +KPX Tcommaaccent eacute -92 +KPX Tcommaaccent ecaron -92 +KPX Tcommaaccent ecircumflex -92 +KPX Tcommaaccent edieresis -52 +KPX Tcommaaccent edotaccent -92 +KPX Tcommaaccent egrave -52 +KPX Tcommaaccent emacron -52 +KPX Tcommaaccent eogonek -92 +KPX Tcommaaccent hyphen -92 +KPX Tcommaaccent i -18 +KPX Tcommaaccent iacute -18 +KPX Tcommaaccent iogonek -18 +KPX Tcommaaccent o -92 +KPX Tcommaaccent oacute -92 +KPX Tcommaaccent ocircumflex -92 +KPX Tcommaaccent odieresis -92 +KPX Tcommaaccent ograve -92 +KPX Tcommaaccent ohungarumlaut -92 +KPX Tcommaaccent omacron -92 +KPX Tcommaaccent oslash -92 +KPX Tcommaaccent otilde -92 +KPX Tcommaaccent period -90 +KPX Tcommaaccent r -74 +KPX Tcommaaccent racute -74 +KPX Tcommaaccent rcaron -74 +KPX Tcommaaccent rcommaaccent -74 +KPX Tcommaaccent semicolon -74 +KPX Tcommaaccent u -92 +KPX Tcommaaccent uacute -92 +KPX Tcommaaccent ucircumflex -92 +KPX Tcommaaccent udieresis -92 +KPX Tcommaaccent ugrave -92 +KPX Tcommaaccent uhungarumlaut -92 +KPX Tcommaaccent umacron -92 +KPX Tcommaaccent uogonek -92 +KPX Tcommaaccent uring -92 +KPX Tcommaaccent w -74 +KPX Tcommaaccent y -34 +KPX Tcommaaccent yacute -34 +KPX Tcommaaccent ydieresis -34 +KPX U A -60 +KPX U Aacute -60 +KPX U Abreve -60 +KPX U Acircumflex -60 +KPX U Adieresis -60 +KPX U Agrave -60 +KPX U Amacron -60 +KPX U Aogonek -60 +KPX U Aring -60 +KPX U Atilde -60 +KPX U comma -50 +KPX U period -50 +KPX Uacute A -60 +KPX Uacute Aacute -60 +KPX Uacute Abreve -60 +KPX Uacute Acircumflex -60 +KPX Uacute Adieresis -60 +KPX Uacute Agrave -60 +KPX Uacute Amacron -60 +KPX Uacute Aogonek -60 +KPX Uacute Aring -60 +KPX Uacute Atilde -60 +KPX Uacute comma -50 +KPX Uacute period -50 +KPX Ucircumflex A -60 +KPX Ucircumflex Aacute -60 +KPX Ucircumflex Abreve -60 +KPX Ucircumflex Acircumflex -60 +KPX Ucircumflex Adieresis -60 +KPX Ucircumflex Agrave -60 +KPX Ucircumflex Amacron -60 +KPX Ucircumflex Aogonek -60 +KPX Ucircumflex Aring -60 +KPX Ucircumflex Atilde -60 +KPX Ucircumflex comma -50 +KPX Ucircumflex period -50 +KPX Udieresis A -60 +KPX Udieresis Aacute -60 +KPX Udieresis Abreve -60 +KPX Udieresis Acircumflex -60 +KPX Udieresis Adieresis -60 +KPX Udieresis Agrave -60 +KPX Udieresis Amacron -60 +KPX Udieresis Aogonek -60 +KPX Udieresis Aring -60 +KPX Udieresis Atilde -60 +KPX Udieresis comma -50 +KPX Udieresis period -50 +KPX Ugrave A -60 +KPX Ugrave Aacute -60 +KPX Ugrave Abreve -60 +KPX Ugrave Acircumflex -60 +KPX Ugrave Adieresis -60 +KPX Ugrave Agrave -60 +KPX Ugrave Amacron -60 +KPX Ugrave Aogonek -60 +KPX Ugrave Aring -60 +KPX Ugrave Atilde -60 +KPX Ugrave comma -50 +KPX Ugrave period -50 +KPX Uhungarumlaut A -60 +KPX Uhungarumlaut Aacute -60 +KPX Uhungarumlaut Abreve -60 +KPX Uhungarumlaut Acircumflex -60 +KPX Uhungarumlaut Adieresis -60 +KPX Uhungarumlaut Agrave -60 +KPX Uhungarumlaut Amacron -60 +KPX Uhungarumlaut Aogonek -60 +KPX Uhungarumlaut Aring -60 +KPX Uhungarumlaut Atilde -60 +KPX Uhungarumlaut comma -50 +KPX Uhungarumlaut period -50 +KPX Umacron A -60 +KPX Umacron Aacute -60 +KPX Umacron Abreve -60 +KPX Umacron Acircumflex -60 +KPX Umacron Adieresis -60 +KPX Umacron Agrave -60 +KPX Umacron Amacron -60 +KPX Umacron Aogonek -60 +KPX Umacron Aring -60 +KPX Umacron Atilde -60 +KPX Umacron comma -50 +KPX Umacron period -50 +KPX Uogonek A -60 +KPX Uogonek Aacute -60 +KPX Uogonek Abreve -60 +KPX Uogonek Acircumflex -60 +KPX Uogonek Adieresis -60 +KPX Uogonek Agrave -60 +KPX Uogonek Amacron -60 +KPX Uogonek Aogonek -60 +KPX Uogonek Aring -60 +KPX Uogonek Atilde -60 +KPX Uogonek comma -50 +KPX Uogonek period -50 +KPX Uring A -60 +KPX Uring Aacute -60 +KPX Uring Abreve -60 +KPX Uring Acircumflex -60 +KPX Uring Adieresis -60 +KPX Uring Agrave -60 +KPX Uring Amacron -60 +KPX Uring Aogonek -60 +KPX Uring Aring -60 +KPX Uring Atilde -60 +KPX Uring comma -50 +KPX Uring period -50 +KPX V A -135 +KPX V Aacute -135 +KPX V Abreve -135 +KPX V Acircumflex -135 +KPX V Adieresis -135 +KPX V Agrave -135 +KPX V Amacron -135 +KPX V Aogonek -135 +KPX V Aring -135 +KPX V Atilde -135 +KPX V G -30 +KPX V Gbreve -30 +KPX V Gcommaaccent -30 +KPX V O -45 +KPX V Oacute -45 +KPX V Ocircumflex -45 +KPX V Odieresis -45 +KPX V Ograve -45 +KPX V Ohungarumlaut -45 +KPX V Omacron -45 +KPX V Oslash -45 +KPX V Otilde -45 +KPX V a -92 +KPX V aacute -92 +KPX V abreve -92 +KPX V acircumflex -92 +KPX V adieresis -92 +KPX V agrave -92 +KPX V amacron -92 +KPX V aogonek -92 +KPX V aring -92 +KPX V atilde -92 +KPX V colon -92 +KPX V comma -129 +KPX V e -100 +KPX V eacute -100 +KPX V ecaron -100 +KPX V ecircumflex -100 +KPX V edieresis -100 +KPX V edotaccent -100 +KPX V egrave -100 +KPX V emacron -100 +KPX V eogonek -100 +KPX V hyphen -74 +KPX V i -37 +KPX V iacute -37 +KPX V icircumflex -37 +KPX V idieresis -37 +KPX V igrave -37 +KPX V imacron -37 +KPX V iogonek -37 +KPX V o -100 +KPX V oacute -100 +KPX V ocircumflex -100 +KPX V odieresis -100 +KPX V ograve -100 +KPX V ohungarumlaut -100 +KPX V omacron -100 +KPX V oslash -100 +KPX V otilde -100 +KPX V period -145 +KPX V semicolon -92 +KPX V u -92 +KPX V uacute -92 +KPX V ucircumflex -92 +KPX V udieresis -92 +KPX V ugrave -92 +KPX V uhungarumlaut -92 +KPX V umacron -92 +KPX V uogonek -92 +KPX V uring -92 +KPX W A -120 +KPX W Aacute -120 +KPX W Abreve -120 +KPX W Acircumflex -120 +KPX W Adieresis -120 +KPX W Agrave -120 +KPX W Amacron -120 +KPX W Aogonek -120 +KPX W Aring -120 +KPX W Atilde -120 +KPX W O -10 +KPX W Oacute -10 +KPX W Ocircumflex -10 +KPX W Odieresis -10 +KPX W Ograve -10 +KPX W Ohungarumlaut -10 +KPX W Omacron -10 +KPX W Oslash -10 +KPX W Otilde -10 +KPX W a -65 +KPX W aacute -65 +KPX W abreve -65 +KPX W acircumflex -65 +KPX W adieresis -65 +KPX W agrave -65 +KPX W amacron -65 +KPX W aogonek -65 +KPX W aring -65 +KPX W atilde -65 +KPX W colon -55 +KPX W comma -92 +KPX W e -65 +KPX W eacute -65 +KPX W ecaron -65 +KPX W ecircumflex -65 +KPX W edieresis -65 +KPX W edotaccent -65 +KPX W egrave -65 +KPX W emacron -65 +KPX W eogonek -65 +KPX W hyphen -37 +KPX W i -18 +KPX W iacute -18 +KPX W iogonek -18 +KPX W o -75 +KPX W oacute -75 +KPX W ocircumflex -75 +KPX W odieresis -75 +KPX W ograve -75 +KPX W ohungarumlaut -75 +KPX W omacron -75 +KPX W oslash -75 +KPX W otilde -75 +KPX W period -92 +KPX W semicolon -55 +KPX W u -50 +KPX W uacute -50 +KPX W ucircumflex -50 +KPX W udieresis -50 +KPX W ugrave -50 +KPX W uhungarumlaut -50 +KPX W umacron -50 +KPX W uogonek -50 +KPX W uring -50 +KPX W y -60 +KPX W yacute -60 +KPX W ydieresis -60 +KPX Y A -110 +KPX Y Aacute -110 +KPX Y Abreve -110 +KPX Y Acircumflex -110 +KPX Y Adieresis -110 +KPX Y Agrave -110 +KPX Y Amacron -110 +KPX Y Aogonek -110 +KPX Y Aring -110 +KPX Y Atilde -110 +KPX Y O -35 +KPX Y Oacute -35 +KPX Y Ocircumflex -35 +KPX Y Odieresis -35 +KPX Y Ograve -35 +KPX Y Ohungarumlaut -35 +KPX Y Omacron -35 +KPX Y Oslash -35 +KPX Y Otilde -35 +KPX Y a -85 +KPX Y aacute -85 +KPX Y abreve -85 +KPX Y acircumflex -85 +KPX Y adieresis -85 +KPX Y agrave -85 +KPX Y amacron -85 +KPX Y aogonek -85 +KPX Y aring -85 +KPX Y atilde -85 +KPX Y colon -92 +KPX Y comma -92 +KPX Y e -111 +KPX Y eacute -111 +KPX Y ecaron -111 +KPX Y ecircumflex -111 +KPX Y edieresis -71 +KPX Y edotaccent -111 +KPX Y egrave -71 +KPX Y emacron -71 +KPX Y eogonek -111 +KPX Y hyphen -92 +KPX Y i -37 +KPX Y iacute -37 +KPX Y iogonek -37 +KPX Y o -111 +KPX Y oacute -111 +KPX Y ocircumflex -111 +KPX Y odieresis -111 +KPX Y ograve -111 +KPX Y ohungarumlaut -111 +KPX Y omacron -111 +KPX Y oslash -111 +KPX Y otilde -111 +KPX Y period -92 +KPX Y semicolon -92 +KPX Y u -92 +KPX Y uacute -92 +KPX Y ucircumflex -92 +KPX Y udieresis -92 +KPX Y ugrave -92 +KPX Y uhungarumlaut -92 +KPX Y umacron -92 +KPX Y uogonek -92 +KPX Y uring -92 +KPX Yacute A -110 +KPX Yacute Aacute -110 +KPX Yacute Abreve -110 +KPX Yacute Acircumflex -110 +KPX Yacute Adieresis -110 +KPX Yacute Agrave -110 +KPX Yacute Amacron -110 +KPX Yacute Aogonek -110 +KPX Yacute Aring -110 +KPX Yacute Atilde -110 +KPX Yacute O -35 +KPX Yacute Oacute -35 +KPX Yacute Ocircumflex -35 +KPX Yacute Odieresis -35 +KPX Yacute Ograve -35 +KPX Yacute Ohungarumlaut -35 +KPX Yacute Omacron -35 +KPX Yacute Oslash -35 +KPX Yacute Otilde -35 +KPX Yacute a -85 +KPX Yacute aacute -85 +KPX Yacute abreve -85 +KPX Yacute acircumflex -85 +KPX Yacute adieresis -85 +KPX Yacute agrave -85 +KPX Yacute amacron -85 +KPX Yacute aogonek -85 +KPX Yacute aring -85 +KPX Yacute atilde -85 +KPX Yacute colon -92 +KPX Yacute comma -92 +KPX Yacute e -111 +KPX Yacute eacute -111 +KPX Yacute ecaron -111 +KPX Yacute ecircumflex -111 +KPX Yacute edieresis -71 +KPX Yacute edotaccent -111 +KPX Yacute egrave -71 +KPX Yacute emacron -71 +KPX Yacute eogonek -111 +KPX Yacute hyphen -92 +KPX Yacute i -37 +KPX Yacute iacute -37 +KPX Yacute iogonek -37 +KPX Yacute o -111 +KPX Yacute oacute -111 +KPX Yacute ocircumflex -111 +KPX Yacute odieresis -111 +KPX Yacute ograve -111 +KPX Yacute ohungarumlaut -111 +KPX Yacute omacron -111 +KPX Yacute oslash -111 +KPX Yacute otilde -111 +KPX Yacute period -92 +KPX Yacute semicolon -92 +KPX Yacute u -92 +KPX Yacute uacute -92 +KPX Yacute ucircumflex -92 +KPX Yacute udieresis -92 +KPX Yacute ugrave -92 +KPX Yacute uhungarumlaut -92 +KPX Yacute umacron -92 +KPX Yacute uogonek -92 +KPX Yacute uring -92 +KPX Ydieresis A -110 +KPX Ydieresis Aacute -110 +KPX Ydieresis Abreve -110 +KPX Ydieresis Acircumflex -110 +KPX Ydieresis Adieresis -110 +KPX Ydieresis Agrave -110 +KPX Ydieresis Amacron -110 +KPX Ydieresis Aogonek -110 +KPX Ydieresis Aring -110 +KPX Ydieresis Atilde -110 +KPX Ydieresis O -35 +KPX Ydieresis Oacute -35 +KPX Ydieresis Ocircumflex -35 +KPX Ydieresis Odieresis -35 +KPX Ydieresis Ograve -35 +KPX Ydieresis Ohungarumlaut -35 +KPX Ydieresis Omacron -35 +KPX Ydieresis Oslash -35 +KPX Ydieresis Otilde -35 +KPX Ydieresis a -85 +KPX Ydieresis aacute -85 +KPX Ydieresis abreve -85 +KPX Ydieresis acircumflex -85 +KPX Ydieresis adieresis -85 +KPX Ydieresis agrave -85 +KPX Ydieresis amacron -85 +KPX Ydieresis aogonek -85 +KPX Ydieresis aring -85 +KPX Ydieresis atilde -85 +KPX Ydieresis colon -92 +KPX Ydieresis comma -92 +KPX Ydieresis e -111 +KPX Ydieresis eacute -111 +KPX Ydieresis ecaron -111 +KPX Ydieresis ecircumflex -111 +KPX Ydieresis edieresis -71 +KPX Ydieresis edotaccent -111 +KPX Ydieresis egrave -71 +KPX Ydieresis emacron -71 +KPX Ydieresis eogonek -111 +KPX Ydieresis hyphen -92 +KPX Ydieresis i -37 +KPX Ydieresis iacute -37 +KPX Ydieresis iogonek -37 +KPX Ydieresis o -111 +KPX Ydieresis oacute -111 +KPX Ydieresis ocircumflex -111 +KPX Ydieresis odieresis -111 +KPX Ydieresis ograve -111 +KPX Ydieresis ohungarumlaut -111 +KPX Ydieresis omacron -111 +KPX Ydieresis oslash -111 +KPX Ydieresis otilde -111 +KPX Ydieresis period -92 +KPX Ydieresis semicolon -92 +KPX Ydieresis u -92 +KPX Ydieresis uacute -92 +KPX Ydieresis ucircumflex -92 +KPX Ydieresis udieresis -92 +KPX Ydieresis ugrave -92 +KPX Ydieresis uhungarumlaut -92 +KPX Ydieresis umacron -92 +KPX Ydieresis uogonek -92 +KPX Ydieresis uring -92 +KPX a v -25 +KPX aacute v -25 +KPX abreve v -25 +KPX acircumflex v -25 +KPX adieresis v -25 +KPX agrave v -25 +KPX amacron v -25 +KPX aogonek v -25 +KPX aring v -25 +KPX atilde v -25 +KPX b b -10 +KPX b period -40 +KPX b u -20 +KPX b uacute -20 +KPX b ucircumflex -20 +KPX b udieresis -20 +KPX b ugrave -20 +KPX b uhungarumlaut -20 +KPX b umacron -20 +KPX b uogonek -20 +KPX b uring -20 +KPX b v -15 +KPX comma quotedblright -45 +KPX comma quoteright -55 +KPX d w -15 +KPX dcroat w -15 +KPX e v -15 +KPX eacute v -15 +KPX ecaron v -15 +KPX ecircumflex v -15 +KPX edieresis v -15 +KPX edotaccent v -15 +KPX egrave v -15 +KPX emacron v -15 +KPX eogonek v -15 +KPX f comma -15 +KPX f dotlessi -35 +KPX f i -25 +KPX f o -25 +KPX f oacute -25 +KPX f ocircumflex -25 +KPX f odieresis -25 +KPX f ograve -25 +KPX f ohungarumlaut -25 +KPX f omacron -25 +KPX f oslash -25 +KPX f otilde -25 +KPX f period -15 +KPX f quotedblright 50 +KPX f quoteright 55 +KPX g period -15 +KPX gbreve period -15 +KPX gcommaaccent period -15 +KPX h y -15 +KPX h yacute -15 +KPX h ydieresis -15 +KPX i v -10 +KPX iacute v -10 +KPX icircumflex v -10 +KPX idieresis v -10 +KPX igrave v -10 +KPX imacron v -10 +KPX iogonek v -10 +KPX k e -10 +KPX k eacute -10 +KPX k ecaron -10 +KPX k ecircumflex -10 +KPX k edieresis -10 +KPX k edotaccent -10 +KPX k egrave -10 +KPX k emacron -10 +KPX k eogonek -10 +KPX k o -15 +KPX k oacute -15 +KPX k ocircumflex -15 +KPX k odieresis -15 +KPX k ograve -15 +KPX k ohungarumlaut -15 +KPX k omacron -15 +KPX k oslash -15 +KPX k otilde -15 +KPX k y -15 +KPX k yacute -15 +KPX k ydieresis -15 +KPX kcommaaccent e -10 +KPX kcommaaccent eacute -10 +KPX kcommaaccent ecaron -10 +KPX kcommaaccent ecircumflex -10 +KPX kcommaaccent edieresis -10 +KPX kcommaaccent edotaccent -10 +KPX kcommaaccent egrave -10 +KPX kcommaaccent emacron -10 +KPX kcommaaccent eogonek -10 +KPX kcommaaccent o -15 +KPX kcommaaccent oacute -15 +KPX kcommaaccent ocircumflex -15 +KPX kcommaaccent odieresis -15 +KPX kcommaaccent ograve -15 +KPX kcommaaccent ohungarumlaut -15 +KPX kcommaaccent omacron -15 +KPX kcommaaccent oslash -15 +KPX kcommaaccent otilde -15 +KPX kcommaaccent y -15 +KPX kcommaaccent yacute -15 +KPX kcommaaccent ydieresis -15 +KPX n v -40 +KPX nacute v -40 +KPX ncaron v -40 +KPX ncommaaccent v -40 +KPX ntilde v -40 +KPX o v -10 +KPX o w -10 +KPX oacute v -10 +KPX oacute w -10 +KPX ocircumflex v -10 +KPX ocircumflex w -10 +KPX odieresis v -10 +KPX odieresis w -10 +KPX ograve v -10 +KPX ograve w -10 +KPX ohungarumlaut v -10 +KPX ohungarumlaut w -10 +KPX omacron v -10 +KPX omacron w -10 +KPX oslash v -10 +KPX oslash w -10 +KPX otilde v -10 +KPX otilde w -10 +KPX period quotedblright -55 +KPX period quoteright -55 +KPX quotedblleft A -10 +KPX quotedblleft Aacute -10 +KPX quotedblleft Abreve -10 +KPX quotedblleft Acircumflex -10 +KPX quotedblleft Adieresis -10 +KPX quotedblleft Agrave -10 +KPX quotedblleft Amacron -10 +KPX quotedblleft Aogonek -10 +KPX quotedblleft Aring -10 +KPX quotedblleft Atilde -10 +KPX quoteleft A -10 +KPX quoteleft Aacute -10 +KPX quoteleft Abreve -10 +KPX quoteleft Acircumflex -10 +KPX quoteleft Adieresis -10 +KPX quoteleft Agrave -10 +KPX quoteleft Amacron -10 +KPX quoteleft Aogonek -10 +KPX quoteleft Aring -10 +KPX quoteleft Atilde -10 +KPX quoteleft quoteleft -63 +KPX quoteright d -20 +KPX quoteright dcroat -20 +KPX quoteright quoteright -63 +KPX quoteright r -20 +KPX quoteright racute -20 +KPX quoteright rcaron -20 +KPX quoteright rcommaaccent -20 +KPX quoteright s -37 +KPX quoteright sacute -37 +KPX quoteright scaron -37 +KPX quoteright scedilla -37 +KPX quoteright scommaaccent -37 +KPX quoteright space -74 +KPX quoteright v -20 +KPX r c -18 +KPX r cacute -18 +KPX r ccaron -18 +KPX r ccedilla -18 +KPX r comma -92 +KPX r e -18 +KPX r eacute -18 +KPX r ecaron -18 +KPX r ecircumflex -18 +KPX r edieresis -18 +KPX r edotaccent -18 +KPX r egrave -18 +KPX r emacron -18 +KPX r eogonek -18 +KPX r g -10 +KPX r gbreve -10 +KPX r gcommaaccent -10 +KPX r hyphen -37 +KPX r n -15 +KPX r nacute -15 +KPX r ncaron -15 +KPX r ncommaaccent -15 +KPX r ntilde -15 +KPX r o -18 +KPX r oacute -18 +KPX r ocircumflex -18 +KPX r odieresis -18 +KPX r ograve -18 +KPX r ohungarumlaut -18 +KPX r omacron -18 +KPX r oslash -18 +KPX r otilde -18 +KPX r p -10 +KPX r period -100 +KPX r q -18 +KPX r v -10 +KPX racute c -18 +KPX racute cacute -18 +KPX racute ccaron -18 +KPX racute ccedilla -18 +KPX racute comma -92 +KPX racute e -18 +KPX racute eacute -18 +KPX racute ecaron -18 +KPX racute ecircumflex -18 +KPX racute edieresis -18 +KPX racute edotaccent -18 +KPX racute egrave -18 +KPX racute emacron -18 +KPX racute eogonek -18 +KPX racute g -10 +KPX racute gbreve -10 +KPX racute gcommaaccent -10 +KPX racute hyphen -37 +KPX racute n -15 +KPX racute nacute -15 +KPX racute ncaron -15 +KPX racute ncommaaccent -15 +KPX racute ntilde -15 +KPX racute o -18 +KPX racute oacute -18 +KPX racute ocircumflex -18 +KPX racute odieresis -18 +KPX racute ograve -18 +KPX racute ohungarumlaut -18 +KPX racute omacron -18 +KPX racute oslash -18 +KPX racute otilde -18 +KPX racute p -10 +KPX racute period -100 +KPX racute q -18 +KPX racute v -10 +KPX rcaron c -18 +KPX rcaron cacute -18 +KPX rcaron ccaron -18 +KPX rcaron ccedilla -18 +KPX rcaron comma -92 +KPX rcaron e -18 +KPX rcaron eacute -18 +KPX rcaron ecaron -18 +KPX rcaron ecircumflex -18 +KPX rcaron edieresis -18 +KPX rcaron edotaccent -18 +KPX rcaron egrave -18 +KPX rcaron emacron -18 +KPX rcaron eogonek -18 +KPX rcaron g -10 +KPX rcaron gbreve -10 +KPX rcaron gcommaaccent -10 +KPX rcaron hyphen -37 +KPX rcaron n -15 +KPX rcaron nacute -15 +KPX rcaron ncaron -15 +KPX rcaron ncommaaccent -15 +KPX rcaron ntilde -15 +KPX rcaron o -18 +KPX rcaron oacute -18 +KPX rcaron ocircumflex -18 +KPX rcaron odieresis -18 +KPX rcaron ograve -18 +KPX rcaron ohungarumlaut -18 +KPX rcaron omacron -18 +KPX rcaron oslash -18 +KPX rcaron otilde -18 +KPX rcaron p -10 +KPX rcaron period -100 +KPX rcaron q -18 +KPX rcaron v -10 +KPX rcommaaccent c -18 +KPX rcommaaccent cacute -18 +KPX rcommaaccent ccaron -18 +KPX rcommaaccent ccedilla -18 +KPX rcommaaccent comma -92 +KPX rcommaaccent e -18 +KPX rcommaaccent eacute -18 +KPX rcommaaccent ecaron -18 +KPX rcommaaccent ecircumflex -18 +KPX rcommaaccent edieresis -18 +KPX rcommaaccent edotaccent -18 +KPX rcommaaccent egrave -18 +KPX rcommaaccent emacron -18 +KPX rcommaaccent eogonek -18 +KPX rcommaaccent g -10 +KPX rcommaaccent gbreve -10 +KPX rcommaaccent gcommaaccent -10 +KPX rcommaaccent hyphen -37 +KPX rcommaaccent n -15 +KPX rcommaaccent nacute -15 +KPX rcommaaccent ncaron -15 +KPX rcommaaccent ncommaaccent -15 +KPX rcommaaccent ntilde -15 +KPX rcommaaccent o -18 +KPX rcommaaccent oacute -18 +KPX rcommaaccent ocircumflex -18 +KPX rcommaaccent odieresis -18 +KPX rcommaaccent ograve -18 +KPX rcommaaccent ohungarumlaut -18 +KPX rcommaaccent omacron -18 +KPX rcommaaccent oslash -18 +KPX rcommaaccent otilde -18 +KPX rcommaaccent p -10 +KPX rcommaaccent period -100 +KPX rcommaaccent q -18 +KPX rcommaaccent v -10 +KPX space A -55 +KPX space Aacute -55 +KPX space Abreve -55 +KPX space Acircumflex -55 +KPX space Adieresis -55 +KPX space Agrave -55 +KPX space Amacron -55 +KPX space Aogonek -55 +KPX space Aring -55 +KPX space Atilde -55 +KPX space T -30 +KPX space Tcaron -30 +KPX space Tcommaaccent -30 +KPX space V -45 +KPX space W -30 +KPX space Y -55 +KPX space Yacute -55 +KPX space Ydieresis -55 +KPX v a -10 +KPX v aacute -10 +KPX v abreve -10 +KPX v acircumflex -10 +KPX v adieresis -10 +KPX v agrave -10 +KPX v amacron -10 +KPX v aogonek -10 +KPX v aring -10 +KPX v atilde -10 +KPX v comma -55 +KPX v e -10 +KPX v eacute -10 +KPX v ecaron -10 +KPX v ecircumflex -10 +KPX v edieresis -10 +KPX v edotaccent -10 +KPX v egrave -10 +KPX v emacron -10 +KPX v eogonek -10 +KPX v o -10 +KPX v oacute -10 +KPX v ocircumflex -10 +KPX v odieresis -10 +KPX v ograve -10 +KPX v ohungarumlaut -10 +KPX v omacron -10 +KPX v oslash -10 +KPX v otilde -10 +KPX v period -70 +KPX w comma -55 +KPX w o -10 +KPX w oacute -10 +KPX w ocircumflex -10 +KPX w odieresis -10 +KPX w ograve -10 +KPX w ohungarumlaut -10 +KPX w omacron -10 +KPX w oslash -10 +KPX w otilde -10 +KPX w period -70 +KPX y comma -55 +KPX y e -10 +KPX y eacute -10 +KPX y ecaron -10 +KPX y ecircumflex -10 +KPX y edieresis -10 +KPX y edotaccent -10 +KPX y egrave -10 +KPX y emacron -10 +KPX y eogonek -10 +KPX y o -25 +KPX y oacute -25 +KPX y ocircumflex -25 +KPX y odieresis -25 +KPX y ograve -25 +KPX y ohungarumlaut -25 +KPX y omacron -25 +KPX y oslash -25 +KPX y otilde -25 +KPX y period -70 +KPX yacute comma -55 +KPX yacute e -10 +KPX yacute eacute -10 +KPX yacute ecaron -10 +KPX yacute ecircumflex -10 +KPX yacute edieresis -10 +KPX yacute edotaccent -10 +KPX yacute egrave -10 +KPX yacute emacron -10 +KPX yacute eogonek -10 +KPX yacute o -25 +KPX yacute oacute -25 +KPX yacute ocircumflex -25 +KPX yacute odieresis -25 +KPX yacute ograve -25 +KPX yacute ohungarumlaut -25 +KPX yacute omacron -25 +KPX yacute oslash -25 +KPX yacute otilde -25 +KPX yacute period -70 +KPX ydieresis comma -55 +KPX ydieresis e -10 +KPX ydieresis eacute -10 +KPX ydieresis ecaron -10 +KPX ydieresis ecircumflex -10 +KPX ydieresis edieresis -10 +KPX ydieresis edotaccent -10 +KPX ydieresis egrave -10 +KPX ydieresis emacron -10 +KPX ydieresis eogonek -10 +KPX ydieresis o -25 +KPX ydieresis oacute -25 +KPX ydieresis ocircumflex -25 +KPX ydieresis odieresis -25 +KPX ydieresis ograve -25 +KPX ydieresis ohungarumlaut -25 +KPX ydieresis omacron -25 +KPX ydieresis oslash -25 +KPX ydieresis otilde -25 +KPX ydieresis period -70 +EndKernPairs +EndKernData +EndFontMetrics diff --git a/pitfall/pdfkit/lib/font/data/Times-BoldItalic.afm b/pitfall/pdfkit/lib/font/data/Times-BoldItalic.afm new file mode 100755 index 00000000..2301dfd2 --- /dev/null +++ b/pitfall/pdfkit/lib/font/data/Times-BoldItalic.afm @@ -0,0 +1,2384 @@ +StartFontMetrics 4.1 +Comment Copyright (c) 1985, 1987, 1989, 1990, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. +Comment Creation Date: Thu May 1 13:04:06 1997 +Comment UniqueID 43066 +Comment VMusage 45874 56899 +FontName Times-BoldItalic +FullName Times Bold Italic +FamilyName Times +Weight Bold +ItalicAngle -15 +IsFixedPitch false +CharacterSet ExtendedRoman +FontBBox -200 -218 996 921 +UnderlinePosition -100 +UnderlineThickness 50 +Version 002.000 +Notice Copyright (c) 1985, 1987, 1989, 1990, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved.Times is a trademark of Linotype-Hell AG and/or its subsidiaries. +EncodingScheme AdobeStandardEncoding +CapHeight 669 +XHeight 462 +Ascender 683 +Descender -217 +StdHW 42 +StdVW 121 +StartCharMetrics 315 +C 32 ; WX 250 ; N space ; B 0 0 0 0 ; +C 33 ; WX 389 ; N exclam ; B 67 -13 370 684 ; +C 34 ; WX 555 ; N quotedbl ; B 136 398 536 685 ; +C 35 ; WX 500 ; N numbersign ; B -33 0 533 700 ; +C 36 ; WX 500 ; N dollar ; B -20 -100 497 733 ; +C 37 ; WX 833 ; N percent ; B 39 -10 793 692 ; +C 38 ; WX 778 ; N ampersand ; B 5 -19 699 682 ; +C 39 ; WX 333 ; N quoteright ; B 98 369 302 685 ; +C 40 ; WX 333 ; N parenleft ; B 28 -179 344 685 ; +C 41 ; WX 333 ; N parenright ; B -44 -179 271 685 ; +C 42 ; WX 500 ; N asterisk ; B 65 249 456 685 ; +C 43 ; WX 570 ; N plus ; B 33 0 537 506 ; +C 44 ; WX 250 ; N comma ; B -60 -182 144 134 ; +C 45 ; WX 333 ; N hyphen ; B 2 166 271 282 ; +C 46 ; WX 250 ; N period ; B -9 -13 139 135 ; +C 47 ; WX 278 ; N slash ; B -64 -18 342 685 ; +C 48 ; WX 500 ; N zero ; B 17 -14 477 683 ; +C 49 ; WX 500 ; N one ; B 5 0 419 683 ; +C 50 ; WX 500 ; N two ; B -27 0 446 683 ; +C 51 ; WX 500 ; N three ; B -15 -13 450 683 ; +C 52 ; WX 500 ; N four ; B -15 0 503 683 ; +C 53 ; WX 500 ; N five ; B -11 -13 487 669 ; +C 54 ; WX 500 ; N six ; B 23 -15 509 679 ; +C 55 ; WX 500 ; N seven ; B 52 0 525 669 ; +C 56 ; WX 500 ; N eight ; B 3 -13 476 683 ; +C 57 ; WX 500 ; N nine ; B -12 -10 475 683 ; +C 58 ; WX 333 ; N colon ; B 23 -13 264 459 ; +C 59 ; WX 333 ; N semicolon ; B -25 -183 264 459 ; +C 60 ; WX 570 ; N less ; B 31 -8 539 514 ; +C 61 ; WX 570 ; N equal ; B 33 107 537 399 ; +C 62 ; WX 570 ; N greater ; B 31 -8 539 514 ; +C 63 ; WX 500 ; N question ; B 79 -13 470 684 ; +C 64 ; WX 832 ; N at ; B 63 -18 770 685 ; +C 65 ; WX 667 ; N A ; B -67 0 593 683 ; +C 66 ; WX 667 ; N B ; B -24 0 624 669 ; +C 67 ; WX 667 ; N C ; B 32 -18 677 685 ; +C 68 ; WX 722 ; N D ; B -46 0 685 669 ; +C 69 ; WX 667 ; N E ; B -27 0 653 669 ; +C 70 ; WX 667 ; N F ; B -13 0 660 669 ; +C 71 ; WX 722 ; N G ; B 21 -18 706 685 ; +C 72 ; WX 778 ; N H ; B -24 0 799 669 ; +C 73 ; WX 389 ; N I ; B -32 0 406 669 ; +C 74 ; WX 500 ; N J ; B -46 -99 524 669 ; +C 75 ; WX 667 ; N K ; B -21 0 702 669 ; +C 76 ; WX 611 ; N L ; B -22 0 590 669 ; +C 77 ; WX 889 ; N M ; B -29 -12 917 669 ; +C 78 ; WX 722 ; N N ; B -27 -15 748 669 ; +C 79 ; WX 722 ; N O ; B 27 -18 691 685 ; +C 80 ; WX 611 ; N P ; B -27 0 613 669 ; +C 81 ; WX 722 ; N Q ; B 27 -208 691 685 ; +C 82 ; WX 667 ; N R ; B -29 0 623 669 ; +C 83 ; WX 556 ; N S ; B 2 -18 526 685 ; +C 84 ; WX 611 ; N T ; B 50 0 650 669 ; +C 85 ; WX 722 ; N U ; B 67 -18 744 669 ; +C 86 ; WX 667 ; N V ; B 65 -18 715 669 ; +C 87 ; WX 889 ; N W ; B 65 -18 940 669 ; +C 88 ; WX 667 ; N X ; B -24 0 694 669 ; +C 89 ; WX 611 ; N Y ; B 73 0 659 669 ; +C 90 ; WX 611 ; N Z ; B -11 0 590 669 ; +C 91 ; WX 333 ; N bracketleft ; B -37 -159 362 674 ; +C 92 ; WX 278 ; N backslash ; B -1 -18 279 685 ; +C 93 ; WX 333 ; N bracketright ; B -56 -157 343 674 ; +C 94 ; WX 570 ; N asciicircum ; B 67 304 503 669 ; +C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; +C 96 ; WX 333 ; N quoteleft ; B 128 369 332 685 ; +C 97 ; WX 500 ; N a ; B -21 -14 455 462 ; +C 98 ; WX 500 ; N b ; B -14 -13 444 699 ; +C 99 ; WX 444 ; N c ; B -5 -13 392 462 ; +C 100 ; WX 500 ; N d ; B -21 -13 517 699 ; +C 101 ; WX 444 ; N e ; B 5 -13 398 462 ; +C 102 ; WX 333 ; N f ; B -169 -205 446 698 ; L i fi ; L l fl ; +C 103 ; WX 500 ; N g ; B -52 -203 478 462 ; +C 104 ; WX 556 ; N h ; B -13 -9 498 699 ; +C 105 ; WX 278 ; N i ; B 2 -9 263 684 ; +C 106 ; WX 278 ; N j ; B -189 -207 279 684 ; +C 107 ; WX 500 ; N k ; B -23 -8 483 699 ; +C 108 ; WX 278 ; N l ; B 2 -9 290 699 ; +C 109 ; WX 778 ; N m ; B -14 -9 722 462 ; +C 110 ; WX 556 ; N n ; B -6 -9 493 462 ; +C 111 ; WX 500 ; N o ; B -3 -13 441 462 ; +C 112 ; WX 500 ; N p ; B -120 -205 446 462 ; +C 113 ; WX 500 ; N q ; B 1 -205 471 462 ; +C 114 ; WX 389 ; N r ; B -21 0 389 462 ; +C 115 ; WX 389 ; N s ; B -19 -13 333 462 ; +C 116 ; WX 278 ; N t ; B -11 -9 281 594 ; +C 117 ; WX 556 ; N u ; B 15 -9 492 462 ; +C 118 ; WX 444 ; N v ; B 16 -13 401 462 ; +C 119 ; WX 667 ; N w ; B 16 -13 614 462 ; +C 120 ; WX 500 ; N x ; B -46 -13 469 462 ; +C 121 ; WX 444 ; N y ; B -94 -205 392 462 ; +C 122 ; WX 389 ; N z ; B -43 -78 368 449 ; +C 123 ; WX 348 ; N braceleft ; B 5 -187 436 686 ; +C 124 ; WX 220 ; N bar ; B 66 -218 154 782 ; +C 125 ; WX 348 ; N braceright ; B -129 -187 302 686 ; +C 126 ; WX 570 ; N asciitilde ; B 54 173 516 333 ; +C 161 ; WX 389 ; N exclamdown ; B 19 -205 322 492 ; +C 162 ; WX 500 ; N cent ; B 42 -143 439 576 ; +C 163 ; WX 500 ; N sterling ; B -32 -12 510 683 ; +C 164 ; WX 167 ; N fraction ; B -169 -14 324 683 ; +C 165 ; WX 500 ; N yen ; B 33 0 628 669 ; +C 166 ; WX 500 ; N florin ; B -87 -156 537 707 ; +C 167 ; WX 500 ; N section ; B 36 -143 459 685 ; +C 168 ; WX 500 ; N currency ; B -26 34 526 586 ; +C 169 ; WX 278 ; N quotesingle ; B 128 398 268 685 ; +C 170 ; WX 500 ; N quotedblleft ; B 53 369 513 685 ; +C 171 ; WX 500 ; N guillemotleft ; B 12 32 468 415 ; +C 172 ; WX 333 ; N guilsinglleft ; B 32 32 303 415 ; +C 173 ; WX 333 ; N guilsinglright ; B 10 32 281 415 ; +C 174 ; WX 556 ; N fi ; B -188 -205 514 703 ; +C 175 ; WX 556 ; N fl ; B -186 -205 553 704 ; +C 177 ; WX 500 ; N endash ; B -40 178 477 269 ; +C 178 ; WX 500 ; N dagger ; B 91 -145 494 685 ; +C 179 ; WX 500 ; N daggerdbl ; B 10 -139 493 685 ; +C 180 ; WX 250 ; N periodcentered ; B 51 257 199 405 ; +C 182 ; WX 500 ; N paragraph ; B -57 -193 562 669 ; +C 183 ; WX 350 ; N bullet ; B 0 175 350 525 ; +C 184 ; WX 333 ; N quotesinglbase ; B -5 -182 199 134 ; +C 185 ; WX 500 ; N quotedblbase ; B -57 -182 403 134 ; +C 186 ; WX 500 ; N quotedblright ; B 53 369 513 685 ; +C 187 ; WX 500 ; N guillemotright ; B 12 32 468 415 ; +C 188 ; WX 1000 ; N ellipsis ; B 40 -13 852 135 ; +C 189 ; WX 1000 ; N perthousand ; B 7 -29 996 706 ; +C 191 ; WX 500 ; N questiondown ; B 30 -205 421 492 ; +C 193 ; WX 333 ; N grave ; B 85 516 297 697 ; +C 194 ; WX 333 ; N acute ; B 139 516 379 697 ; +C 195 ; WX 333 ; N circumflex ; B 40 516 367 690 ; +C 196 ; WX 333 ; N tilde ; B 48 536 407 655 ; +C 197 ; WX 333 ; N macron ; B 51 553 393 623 ; +C 198 ; WX 333 ; N breve ; B 71 516 387 678 ; +C 199 ; WX 333 ; N dotaccent ; B 163 550 298 684 ; +C 200 ; WX 333 ; N dieresis ; B 55 550 402 684 ; +C 202 ; WX 333 ; N ring ; B 127 516 340 729 ; +C 203 ; WX 333 ; N cedilla ; B -80 -218 156 5 ; +C 205 ; WX 333 ; N hungarumlaut ; B 69 516 498 697 ; +C 206 ; WX 333 ; N ogonek ; B 15 -183 244 34 ; +C 207 ; WX 333 ; N caron ; B 79 516 411 690 ; +C 208 ; WX 1000 ; N emdash ; B -40 178 977 269 ; +C 225 ; WX 944 ; N AE ; B -64 0 918 669 ; +C 227 ; WX 266 ; N ordfeminine ; B 16 399 330 685 ; +C 232 ; WX 611 ; N Lslash ; B -22 0 590 669 ; +C 233 ; WX 722 ; N Oslash ; B 27 -125 691 764 ; +C 234 ; WX 944 ; N OE ; B 23 -8 946 677 ; +C 235 ; WX 300 ; N ordmasculine ; B 56 400 347 685 ; +C 241 ; WX 722 ; N ae ; B -5 -13 673 462 ; +C 245 ; WX 278 ; N dotlessi ; B 2 -9 238 462 ; +C 248 ; WX 278 ; N lslash ; B -7 -9 307 699 ; +C 249 ; WX 500 ; N oslash ; B -3 -119 441 560 ; +C 250 ; WX 722 ; N oe ; B 6 -13 674 462 ; +C 251 ; WX 500 ; N germandbls ; B -200 -200 473 705 ; +C -1 ; WX 389 ; N Idieresis ; B -32 0 450 862 ; +C -1 ; WX 444 ; N eacute ; B 5 -13 435 697 ; +C -1 ; WX 500 ; N abreve ; B -21 -14 471 678 ; +C -1 ; WX 556 ; N uhungarumlaut ; B 15 -9 610 697 ; +C -1 ; WX 444 ; N ecaron ; B 5 -13 467 690 ; +C -1 ; WX 611 ; N Ydieresis ; B 73 0 659 862 ; +C -1 ; WX 570 ; N divide ; B 33 -29 537 535 ; +C -1 ; WX 611 ; N Yacute ; B 73 0 659 904 ; +C -1 ; WX 667 ; N Acircumflex ; B -67 0 593 897 ; +C -1 ; WX 500 ; N aacute ; B -21 -14 463 697 ; +C -1 ; WX 722 ; N Ucircumflex ; B 67 -18 744 897 ; +C -1 ; WX 444 ; N yacute ; B -94 -205 435 697 ; +C -1 ; WX 389 ; N scommaaccent ; B -19 -218 333 462 ; +C -1 ; WX 444 ; N ecircumflex ; B 5 -13 423 690 ; +C -1 ; WX 722 ; N Uring ; B 67 -18 744 921 ; +C -1 ; WX 722 ; N Udieresis ; B 67 -18 744 862 ; +C -1 ; WX 500 ; N aogonek ; B -21 -183 455 462 ; +C -1 ; WX 722 ; N Uacute ; B 67 -18 744 904 ; +C -1 ; WX 556 ; N uogonek ; B 15 -183 492 462 ; +C -1 ; WX 667 ; N Edieresis ; B -27 0 653 862 ; +C -1 ; WX 722 ; N Dcroat ; B -31 0 700 669 ; +C -1 ; WX 250 ; N commaaccent ; B -36 -218 131 -50 ; +C -1 ; WX 747 ; N copyright ; B 30 -18 718 685 ; +C -1 ; WX 667 ; N Emacron ; B -27 0 653 830 ; +C -1 ; WX 444 ; N ccaron ; B -5 -13 467 690 ; +C -1 ; WX 500 ; N aring ; B -21 -14 455 729 ; +C -1 ; WX 722 ; N Ncommaaccent ; B -27 -218 748 669 ; +C -1 ; WX 278 ; N lacute ; B 2 -9 392 904 ; +C -1 ; WX 500 ; N agrave ; B -21 -14 455 697 ; +C -1 ; WX 611 ; N Tcommaaccent ; B 50 -218 650 669 ; +C -1 ; WX 667 ; N Cacute ; B 32 -18 677 904 ; +C -1 ; WX 500 ; N atilde ; B -21 -14 491 655 ; +C -1 ; WX 667 ; N Edotaccent ; B -27 0 653 862 ; +C -1 ; WX 389 ; N scaron ; B -19 -13 424 690 ; +C -1 ; WX 389 ; N scedilla ; B -19 -218 333 462 ; +C -1 ; WX 278 ; N iacute ; B 2 -9 352 697 ; +C -1 ; WX 494 ; N lozenge ; B 10 0 484 745 ; +C -1 ; WX 667 ; N Rcaron ; B -29 0 623 897 ; +C -1 ; WX 722 ; N Gcommaaccent ; B 21 -218 706 685 ; +C -1 ; WX 556 ; N ucircumflex ; B 15 -9 492 690 ; +C -1 ; WX 500 ; N acircumflex ; B -21 -14 455 690 ; +C -1 ; WX 667 ; N Amacron ; B -67 0 593 830 ; +C -1 ; WX 389 ; N rcaron ; B -21 0 424 690 ; +C -1 ; WX 444 ; N ccedilla ; B -5 -218 392 462 ; +C -1 ; WX 611 ; N Zdotaccent ; B -11 0 590 862 ; +C -1 ; WX 611 ; N Thorn ; B -27 0 573 669 ; +C -1 ; WX 722 ; N Omacron ; B 27 -18 691 830 ; +C -1 ; WX 667 ; N Racute ; B -29 0 623 904 ; +C -1 ; WX 556 ; N Sacute ; B 2 -18 531 904 ; +C -1 ; WX 608 ; N dcaron ; B -21 -13 675 708 ; +C -1 ; WX 722 ; N Umacron ; B 67 -18 744 830 ; +C -1 ; WX 556 ; N uring ; B 15 -9 492 729 ; +C -1 ; WX 300 ; N threesuperior ; B 17 265 321 683 ; +C -1 ; WX 722 ; N Ograve ; B 27 -18 691 904 ; +C -1 ; WX 667 ; N Agrave ; B -67 0 593 904 ; +C -1 ; WX 667 ; N Abreve ; B -67 0 593 885 ; +C -1 ; WX 570 ; N multiply ; B 48 16 522 490 ; +C -1 ; WX 556 ; N uacute ; B 15 -9 492 697 ; +C -1 ; WX 611 ; N Tcaron ; B 50 0 650 897 ; +C -1 ; WX 494 ; N partialdiff ; B 11 -21 494 750 ; +C -1 ; WX 444 ; N ydieresis ; B -94 -205 443 655 ; +C -1 ; WX 722 ; N Nacute ; B -27 -15 748 904 ; +C -1 ; WX 278 ; N icircumflex ; B -3 -9 324 690 ; +C -1 ; WX 667 ; N Ecircumflex ; B -27 0 653 897 ; +C -1 ; WX 500 ; N adieresis ; B -21 -14 476 655 ; +C -1 ; WX 444 ; N edieresis ; B 5 -13 448 655 ; +C -1 ; WX 444 ; N cacute ; B -5 -13 435 697 ; +C -1 ; WX 556 ; N nacute ; B -6 -9 493 697 ; +C -1 ; WX 556 ; N umacron ; B 15 -9 492 623 ; +C -1 ; WX 722 ; N Ncaron ; B -27 -15 748 897 ; +C -1 ; WX 389 ; N Iacute ; B -32 0 432 904 ; +C -1 ; WX 570 ; N plusminus ; B 33 0 537 506 ; +C -1 ; WX 220 ; N brokenbar ; B 66 -143 154 707 ; +C -1 ; WX 747 ; N registered ; B 30 -18 718 685 ; +C -1 ; WX 722 ; N Gbreve ; B 21 -18 706 885 ; +C -1 ; WX 389 ; N Idotaccent ; B -32 0 406 862 ; +C -1 ; WX 600 ; N summation ; B 14 -10 585 706 ; +C -1 ; WX 667 ; N Egrave ; B -27 0 653 904 ; +C -1 ; WX 389 ; N racute ; B -21 0 407 697 ; +C -1 ; WX 500 ; N omacron ; B -3 -13 462 623 ; +C -1 ; WX 611 ; N Zacute ; B -11 0 590 904 ; +C -1 ; WX 611 ; N Zcaron ; B -11 0 590 897 ; +C -1 ; WX 549 ; N greaterequal ; B 26 0 523 704 ; +C -1 ; WX 722 ; N Eth ; B -31 0 700 669 ; +C -1 ; WX 667 ; N Ccedilla ; B 32 -218 677 685 ; +C -1 ; WX 278 ; N lcommaaccent ; B -42 -218 290 699 ; +C -1 ; WX 366 ; N tcaron ; B -11 -9 434 754 ; +C -1 ; WX 444 ; N eogonek ; B 5 -183 398 462 ; +C -1 ; WX 722 ; N Uogonek ; B 67 -183 744 669 ; +C -1 ; WX 667 ; N Aacute ; B -67 0 593 904 ; +C -1 ; WX 667 ; N Adieresis ; B -67 0 593 862 ; +C -1 ; WX 444 ; N egrave ; B 5 -13 398 697 ; +C -1 ; WX 389 ; N zacute ; B -43 -78 407 697 ; +C -1 ; WX 278 ; N iogonek ; B -20 -183 263 684 ; +C -1 ; WX 722 ; N Oacute ; B 27 -18 691 904 ; +C -1 ; WX 500 ; N oacute ; B -3 -13 463 697 ; +C -1 ; WX 500 ; N amacron ; B -21 -14 467 623 ; +C -1 ; WX 389 ; N sacute ; B -19 -13 407 697 ; +C -1 ; WX 278 ; N idieresis ; B 2 -9 364 655 ; +C -1 ; WX 722 ; N Ocircumflex ; B 27 -18 691 897 ; +C -1 ; WX 722 ; N Ugrave ; B 67 -18 744 904 ; +C -1 ; WX 612 ; N Delta ; B 6 0 608 688 ; +C -1 ; WX 500 ; N thorn ; B -120 -205 446 699 ; +C -1 ; WX 300 ; N twosuperior ; B 2 274 313 683 ; +C -1 ; WX 722 ; N Odieresis ; B 27 -18 691 862 ; +C -1 ; WX 576 ; N mu ; B -60 -207 516 449 ; +C -1 ; WX 278 ; N igrave ; B 2 -9 259 697 ; +C -1 ; WX 500 ; N ohungarumlaut ; B -3 -13 582 697 ; +C -1 ; WX 667 ; N Eogonek ; B -27 -183 653 669 ; +C -1 ; WX 500 ; N dcroat ; B -21 -13 552 699 ; +C -1 ; WX 750 ; N threequarters ; B 7 -14 726 683 ; +C -1 ; WX 556 ; N Scedilla ; B 2 -218 526 685 ; +C -1 ; WX 382 ; N lcaron ; B 2 -9 448 708 ; +C -1 ; WX 667 ; N Kcommaaccent ; B -21 -218 702 669 ; +C -1 ; WX 611 ; N Lacute ; B -22 0 590 904 ; +C -1 ; WX 1000 ; N trademark ; B 32 263 968 669 ; +C -1 ; WX 444 ; N edotaccent ; B 5 -13 398 655 ; +C -1 ; WX 389 ; N Igrave ; B -32 0 406 904 ; +C -1 ; WX 389 ; N Imacron ; B -32 0 461 830 ; +C -1 ; WX 611 ; N Lcaron ; B -22 0 671 718 ; +C -1 ; WX 750 ; N onehalf ; B -9 -14 723 683 ; +C -1 ; WX 549 ; N lessequal ; B 29 0 526 704 ; +C -1 ; WX 500 ; N ocircumflex ; B -3 -13 451 690 ; +C -1 ; WX 556 ; N ntilde ; B -6 -9 504 655 ; +C -1 ; WX 722 ; N Uhungarumlaut ; B 67 -18 744 904 ; +C -1 ; WX 667 ; N Eacute ; B -27 0 653 904 ; +C -1 ; WX 444 ; N emacron ; B 5 -13 439 623 ; +C -1 ; WX 500 ; N gbreve ; B -52 -203 478 678 ; +C -1 ; WX 750 ; N onequarter ; B 7 -14 721 683 ; +C -1 ; WX 556 ; N Scaron ; B 2 -18 553 897 ; +C -1 ; WX 556 ; N Scommaaccent ; B 2 -218 526 685 ; +C -1 ; WX 722 ; N Ohungarumlaut ; B 27 -18 723 904 ; +C -1 ; WX 400 ; N degree ; B 83 397 369 683 ; +C -1 ; WX 500 ; N ograve ; B -3 -13 441 697 ; +C -1 ; WX 667 ; N Ccaron ; B 32 -18 677 897 ; +C -1 ; WX 556 ; N ugrave ; B 15 -9 492 697 ; +C -1 ; WX 549 ; N radical ; B 10 -46 512 850 ; +C -1 ; WX 722 ; N Dcaron ; B -46 0 685 897 ; +C -1 ; WX 389 ; N rcommaaccent ; B -67 -218 389 462 ; +C -1 ; WX 722 ; N Ntilde ; B -27 -15 748 862 ; +C -1 ; WX 500 ; N otilde ; B -3 -13 491 655 ; +C -1 ; WX 667 ; N Rcommaaccent ; B -29 -218 623 669 ; +C -1 ; WX 611 ; N Lcommaaccent ; B -22 -218 590 669 ; +C -1 ; WX 667 ; N Atilde ; B -67 0 593 862 ; +C -1 ; WX 667 ; N Aogonek ; B -67 -183 604 683 ; +C -1 ; WX 667 ; N Aring ; B -67 0 593 921 ; +C -1 ; WX 722 ; N Otilde ; B 27 -18 691 862 ; +C -1 ; WX 389 ; N zdotaccent ; B -43 -78 368 655 ; +C -1 ; WX 667 ; N Ecaron ; B -27 0 653 897 ; +C -1 ; WX 389 ; N Iogonek ; B -32 -183 406 669 ; +C -1 ; WX 500 ; N kcommaaccent ; B -23 -218 483 699 ; +C -1 ; WX 606 ; N minus ; B 51 209 555 297 ; +C -1 ; WX 389 ; N Icircumflex ; B -32 0 450 897 ; +C -1 ; WX 556 ; N ncaron ; B -6 -9 523 690 ; +C -1 ; WX 278 ; N tcommaaccent ; B -62 -218 281 594 ; +C -1 ; WX 606 ; N logicalnot ; B 51 108 555 399 ; +C -1 ; WX 500 ; N odieresis ; B -3 -13 471 655 ; +C -1 ; WX 556 ; N udieresis ; B 15 -9 499 655 ; +C -1 ; WX 549 ; N notequal ; B 15 -49 540 570 ; +C -1 ; WX 500 ; N gcommaaccent ; B -52 -203 478 767 ; +C -1 ; WX 500 ; N eth ; B -3 -13 454 699 ; +C -1 ; WX 389 ; N zcaron ; B -43 -78 424 690 ; +C -1 ; WX 556 ; N ncommaaccent ; B -6 -218 493 462 ; +C -1 ; WX 300 ; N onesuperior ; B 30 274 301 683 ; +C -1 ; WX 278 ; N imacron ; B 2 -9 294 623 ; +C -1 ; WX 500 ; N Euro ; B 0 0 0 0 ; +EndCharMetrics +StartKernData +StartKernPairs 2038 +KPX A C -65 +KPX A Cacute -65 +KPX A Ccaron -65 +KPX A Ccedilla -65 +KPX A G -60 +KPX A Gbreve -60 +KPX A Gcommaaccent -60 +KPX A O -50 +KPX A Oacute -50 +KPX A Ocircumflex -50 +KPX A Odieresis -50 +KPX A Ograve -50 +KPX A Ohungarumlaut -50 +KPX A Omacron -50 +KPX A Oslash -50 +KPX A Otilde -50 +KPX A Q -55 +KPX A T -55 +KPX A Tcaron -55 +KPX A Tcommaaccent -55 +KPX A U -50 +KPX A Uacute -50 +KPX A Ucircumflex -50 +KPX A Udieresis -50 +KPX A Ugrave -50 +KPX A Uhungarumlaut -50 +KPX A Umacron -50 +KPX A Uogonek -50 +KPX A Uring -50 +KPX A V -95 +KPX A W -100 +KPX A Y -70 +KPX A Yacute -70 +KPX A Ydieresis -70 +KPX A quoteright -74 +KPX A u -30 +KPX A uacute -30 +KPX A ucircumflex -30 +KPX A udieresis -30 +KPX A ugrave -30 +KPX A uhungarumlaut -30 +KPX A umacron -30 +KPX A uogonek -30 +KPX A uring -30 +KPX A v -74 +KPX A w -74 +KPX A y -74 +KPX A yacute -74 +KPX A ydieresis -74 +KPX Aacute C -65 +KPX Aacute Cacute -65 +KPX Aacute Ccaron -65 +KPX Aacute Ccedilla -65 +KPX Aacute G -60 +KPX Aacute Gbreve -60 +KPX Aacute Gcommaaccent -60 +KPX Aacute O -50 +KPX Aacute Oacute -50 +KPX Aacute Ocircumflex -50 +KPX Aacute Odieresis -50 +KPX Aacute Ograve -50 +KPX Aacute Ohungarumlaut -50 +KPX Aacute Omacron -50 +KPX Aacute Oslash -50 +KPX Aacute Otilde -50 +KPX Aacute Q -55 +KPX Aacute T -55 +KPX Aacute Tcaron -55 +KPX Aacute Tcommaaccent -55 +KPX Aacute U -50 +KPX Aacute Uacute -50 +KPX Aacute Ucircumflex -50 +KPX Aacute Udieresis -50 +KPX Aacute Ugrave -50 +KPX Aacute Uhungarumlaut -50 +KPX Aacute Umacron -50 +KPX Aacute Uogonek -50 +KPX Aacute Uring -50 +KPX Aacute V -95 +KPX Aacute W -100 +KPX Aacute Y -70 +KPX Aacute Yacute -70 +KPX Aacute Ydieresis -70 +KPX Aacute quoteright -74 +KPX Aacute u -30 +KPX Aacute uacute -30 +KPX Aacute ucircumflex -30 +KPX Aacute udieresis -30 +KPX Aacute ugrave -30 +KPX Aacute uhungarumlaut -30 +KPX Aacute umacron -30 +KPX Aacute uogonek -30 +KPX Aacute uring -30 +KPX Aacute v -74 +KPX Aacute w -74 +KPX Aacute y -74 +KPX Aacute yacute -74 +KPX Aacute ydieresis -74 +KPX Abreve C -65 +KPX Abreve Cacute -65 +KPX Abreve Ccaron -65 +KPX Abreve Ccedilla -65 +KPX Abreve G -60 +KPX Abreve Gbreve -60 +KPX Abreve Gcommaaccent -60 +KPX Abreve O -50 +KPX Abreve Oacute -50 +KPX Abreve Ocircumflex -50 +KPX Abreve Odieresis -50 +KPX Abreve Ograve -50 +KPX Abreve Ohungarumlaut -50 +KPX Abreve Omacron -50 +KPX Abreve Oslash -50 +KPX Abreve Otilde -50 +KPX Abreve Q -55 +KPX Abreve T -55 +KPX Abreve Tcaron -55 +KPX Abreve Tcommaaccent -55 +KPX Abreve U -50 +KPX Abreve Uacute -50 +KPX Abreve Ucircumflex -50 +KPX Abreve Udieresis -50 +KPX Abreve Ugrave -50 +KPX Abreve Uhungarumlaut -50 +KPX Abreve Umacron -50 +KPX Abreve Uogonek -50 +KPX Abreve Uring -50 +KPX Abreve V -95 +KPX Abreve W -100 +KPX Abreve Y -70 +KPX Abreve Yacute -70 +KPX Abreve Ydieresis -70 +KPX Abreve quoteright -74 +KPX Abreve u -30 +KPX Abreve uacute -30 +KPX Abreve ucircumflex -30 +KPX Abreve udieresis -30 +KPX Abreve ugrave -30 +KPX Abreve uhungarumlaut -30 +KPX Abreve umacron -30 +KPX Abreve uogonek -30 +KPX Abreve uring -30 +KPX Abreve v -74 +KPX Abreve w -74 +KPX Abreve y -74 +KPX Abreve yacute -74 +KPX Abreve ydieresis -74 +KPX Acircumflex C -65 +KPX Acircumflex Cacute -65 +KPX Acircumflex Ccaron -65 +KPX Acircumflex Ccedilla -65 +KPX Acircumflex G -60 +KPX Acircumflex Gbreve -60 +KPX Acircumflex Gcommaaccent -60 +KPX Acircumflex O -50 +KPX Acircumflex Oacute -50 +KPX Acircumflex Ocircumflex -50 +KPX Acircumflex Odieresis -50 +KPX Acircumflex Ograve -50 +KPX Acircumflex Ohungarumlaut -50 +KPX Acircumflex Omacron -50 +KPX Acircumflex Oslash -50 +KPX Acircumflex Otilde -50 +KPX Acircumflex Q -55 +KPX Acircumflex T -55 +KPX Acircumflex Tcaron -55 +KPX Acircumflex Tcommaaccent -55 +KPX Acircumflex U -50 +KPX Acircumflex Uacute -50 +KPX Acircumflex Ucircumflex -50 +KPX Acircumflex Udieresis -50 +KPX Acircumflex Ugrave -50 +KPX Acircumflex Uhungarumlaut -50 +KPX Acircumflex Umacron -50 +KPX Acircumflex Uogonek -50 +KPX Acircumflex Uring -50 +KPX Acircumflex V -95 +KPX Acircumflex W -100 +KPX Acircumflex Y -70 +KPX Acircumflex Yacute -70 +KPX Acircumflex Ydieresis -70 +KPX Acircumflex quoteright -74 +KPX Acircumflex u -30 +KPX Acircumflex uacute -30 +KPX Acircumflex ucircumflex -30 +KPX Acircumflex udieresis -30 +KPX Acircumflex ugrave -30 +KPX Acircumflex uhungarumlaut -30 +KPX Acircumflex umacron -30 +KPX Acircumflex uogonek -30 +KPX Acircumflex uring -30 +KPX Acircumflex v -74 +KPX Acircumflex w -74 +KPX Acircumflex y -74 +KPX Acircumflex yacute -74 +KPX Acircumflex ydieresis -74 +KPX Adieresis C -65 +KPX Adieresis Cacute -65 +KPX Adieresis Ccaron -65 +KPX Adieresis Ccedilla -65 +KPX Adieresis G -60 +KPX Adieresis Gbreve -60 +KPX Adieresis Gcommaaccent -60 +KPX Adieresis O -50 +KPX Adieresis Oacute -50 +KPX Adieresis Ocircumflex -50 +KPX Adieresis Odieresis -50 +KPX Adieresis Ograve -50 +KPX Adieresis Ohungarumlaut -50 +KPX Adieresis Omacron -50 +KPX Adieresis Oslash -50 +KPX Adieresis Otilde -50 +KPX Adieresis Q -55 +KPX Adieresis T -55 +KPX Adieresis Tcaron -55 +KPX Adieresis Tcommaaccent -55 +KPX Adieresis U -50 +KPX Adieresis Uacute -50 +KPX Adieresis Ucircumflex -50 +KPX Adieresis Udieresis -50 +KPX Adieresis Ugrave -50 +KPX Adieresis Uhungarumlaut -50 +KPX Adieresis Umacron -50 +KPX Adieresis Uogonek -50 +KPX Adieresis Uring -50 +KPX Adieresis V -95 +KPX Adieresis W -100 +KPX Adieresis Y -70 +KPX Adieresis Yacute -70 +KPX Adieresis Ydieresis -70 +KPX Adieresis quoteright -74 +KPX Adieresis u -30 +KPX Adieresis uacute -30 +KPX Adieresis ucircumflex -30 +KPX Adieresis udieresis -30 +KPX Adieresis ugrave -30 +KPX Adieresis uhungarumlaut -30 +KPX Adieresis umacron -30 +KPX Adieresis uogonek -30 +KPX Adieresis uring -30 +KPX Adieresis v -74 +KPX Adieresis w -74 +KPX Adieresis y -74 +KPX Adieresis yacute -74 +KPX Adieresis ydieresis -74 +KPX Agrave C -65 +KPX Agrave Cacute -65 +KPX Agrave Ccaron -65 +KPX Agrave Ccedilla -65 +KPX Agrave G -60 +KPX Agrave Gbreve -60 +KPX Agrave Gcommaaccent -60 +KPX Agrave O -50 +KPX Agrave Oacute -50 +KPX Agrave Ocircumflex -50 +KPX Agrave Odieresis -50 +KPX Agrave Ograve -50 +KPX Agrave Ohungarumlaut -50 +KPX Agrave Omacron -50 +KPX Agrave Oslash -50 +KPX Agrave Otilde -50 +KPX Agrave Q -55 +KPX Agrave T -55 +KPX Agrave Tcaron -55 +KPX Agrave Tcommaaccent -55 +KPX Agrave U -50 +KPX Agrave Uacute -50 +KPX Agrave Ucircumflex -50 +KPX Agrave Udieresis -50 +KPX Agrave Ugrave -50 +KPX Agrave Uhungarumlaut -50 +KPX Agrave Umacron -50 +KPX Agrave Uogonek -50 +KPX Agrave Uring -50 +KPX Agrave V -95 +KPX Agrave W -100 +KPX Agrave Y -70 +KPX Agrave Yacute -70 +KPX Agrave Ydieresis -70 +KPX Agrave quoteright -74 +KPX Agrave u -30 +KPX Agrave uacute -30 +KPX Agrave ucircumflex -30 +KPX Agrave udieresis -30 +KPX Agrave ugrave -30 +KPX Agrave uhungarumlaut -30 +KPX Agrave umacron -30 +KPX Agrave uogonek -30 +KPX Agrave uring -30 +KPX Agrave v -74 +KPX Agrave w -74 +KPX Agrave y -74 +KPX Agrave yacute -74 +KPX Agrave ydieresis -74 +KPX Amacron C -65 +KPX Amacron Cacute -65 +KPX Amacron Ccaron -65 +KPX Amacron Ccedilla -65 +KPX Amacron G -60 +KPX Amacron Gbreve -60 +KPX Amacron Gcommaaccent -60 +KPX Amacron O -50 +KPX Amacron Oacute -50 +KPX Amacron Ocircumflex -50 +KPX Amacron Odieresis -50 +KPX Amacron Ograve -50 +KPX Amacron Ohungarumlaut -50 +KPX Amacron Omacron -50 +KPX Amacron Oslash -50 +KPX Amacron Otilde -50 +KPX Amacron Q -55 +KPX Amacron T -55 +KPX Amacron Tcaron -55 +KPX Amacron Tcommaaccent -55 +KPX Amacron U -50 +KPX Amacron Uacute -50 +KPX Amacron Ucircumflex -50 +KPX Amacron Udieresis -50 +KPX Amacron Ugrave -50 +KPX Amacron Uhungarumlaut -50 +KPX Amacron Umacron -50 +KPX Amacron Uogonek -50 +KPX Amacron Uring -50 +KPX Amacron V -95 +KPX Amacron W -100 +KPX Amacron Y -70 +KPX Amacron Yacute -70 +KPX Amacron Ydieresis -70 +KPX Amacron quoteright -74 +KPX Amacron u -30 +KPX Amacron uacute -30 +KPX Amacron ucircumflex -30 +KPX Amacron udieresis -30 +KPX Amacron ugrave -30 +KPX Amacron uhungarumlaut -30 +KPX Amacron umacron -30 +KPX Amacron uogonek -30 +KPX Amacron uring -30 +KPX Amacron v -74 +KPX Amacron w -74 +KPX Amacron y -74 +KPX Amacron yacute -74 +KPX Amacron ydieresis -74 +KPX Aogonek C -65 +KPX Aogonek Cacute -65 +KPX Aogonek Ccaron -65 +KPX Aogonek Ccedilla -65 +KPX Aogonek G -60 +KPX Aogonek Gbreve -60 +KPX Aogonek Gcommaaccent -60 +KPX Aogonek O -50 +KPX Aogonek Oacute -50 +KPX Aogonek Ocircumflex -50 +KPX Aogonek Odieresis -50 +KPX Aogonek Ograve -50 +KPX Aogonek Ohungarumlaut -50 +KPX Aogonek Omacron -50 +KPX Aogonek Oslash -50 +KPX Aogonek Otilde -50 +KPX Aogonek Q -55 +KPX Aogonek T -55 +KPX Aogonek Tcaron -55 +KPX Aogonek Tcommaaccent -55 +KPX Aogonek U -50 +KPX Aogonek Uacute -50 +KPX Aogonek Ucircumflex -50 +KPX Aogonek Udieresis -50 +KPX Aogonek Ugrave -50 +KPX Aogonek Uhungarumlaut -50 +KPX Aogonek Umacron -50 +KPX Aogonek Uogonek -50 +KPX Aogonek Uring -50 +KPX Aogonek V -95 +KPX Aogonek W -100 +KPX Aogonek Y -70 +KPX Aogonek Yacute -70 +KPX Aogonek Ydieresis -70 +KPX Aogonek quoteright -74 +KPX Aogonek u -30 +KPX Aogonek uacute -30 +KPX Aogonek ucircumflex -30 +KPX Aogonek udieresis -30 +KPX Aogonek ugrave -30 +KPX Aogonek uhungarumlaut -30 +KPX Aogonek umacron -30 +KPX Aogonek uogonek -30 +KPX Aogonek uring -30 +KPX Aogonek v -74 +KPX Aogonek w -74 +KPX Aogonek y -34 +KPX Aogonek yacute -34 +KPX Aogonek ydieresis -34 +KPX Aring C -65 +KPX Aring Cacute -65 +KPX Aring Ccaron -65 +KPX Aring Ccedilla -65 +KPX Aring G -60 +KPX Aring Gbreve -60 +KPX Aring Gcommaaccent -60 +KPX Aring O -50 +KPX Aring Oacute -50 +KPX Aring Ocircumflex -50 +KPX Aring Odieresis -50 +KPX Aring Ograve -50 +KPX Aring Ohungarumlaut -50 +KPX Aring Omacron -50 +KPX Aring Oslash -50 +KPX Aring Otilde -50 +KPX Aring Q -55 +KPX Aring T -55 +KPX Aring Tcaron -55 +KPX Aring Tcommaaccent -55 +KPX Aring U -50 +KPX Aring Uacute -50 +KPX Aring Ucircumflex -50 +KPX Aring Udieresis -50 +KPX Aring Ugrave -50 +KPX Aring Uhungarumlaut -50 +KPX Aring Umacron -50 +KPX Aring Uogonek -50 +KPX Aring Uring -50 +KPX Aring V -95 +KPX Aring W -100 +KPX Aring Y -70 +KPX Aring Yacute -70 +KPX Aring Ydieresis -70 +KPX Aring quoteright -74 +KPX Aring u -30 +KPX Aring uacute -30 +KPX Aring ucircumflex -30 +KPX Aring udieresis -30 +KPX Aring ugrave -30 +KPX Aring uhungarumlaut -30 +KPX Aring umacron -30 +KPX Aring uogonek -30 +KPX Aring uring -30 +KPX Aring v -74 +KPX Aring w -74 +KPX Aring y -74 +KPX Aring yacute -74 +KPX Aring ydieresis -74 +KPX Atilde C -65 +KPX Atilde Cacute -65 +KPX Atilde Ccaron -65 +KPX Atilde Ccedilla -65 +KPX Atilde G -60 +KPX Atilde Gbreve -60 +KPX Atilde Gcommaaccent -60 +KPX Atilde O -50 +KPX Atilde Oacute -50 +KPX Atilde Ocircumflex -50 +KPX Atilde Odieresis -50 +KPX Atilde Ograve -50 +KPX Atilde Ohungarumlaut -50 +KPX Atilde Omacron -50 +KPX Atilde Oslash -50 +KPX Atilde Otilde -50 +KPX Atilde Q -55 +KPX Atilde T -55 +KPX Atilde Tcaron -55 +KPX Atilde Tcommaaccent -55 +KPX Atilde U -50 +KPX Atilde Uacute -50 +KPX Atilde Ucircumflex -50 +KPX Atilde Udieresis -50 +KPX Atilde Ugrave -50 +KPX Atilde Uhungarumlaut -50 +KPX Atilde Umacron -50 +KPX Atilde Uogonek -50 +KPX Atilde Uring -50 +KPX Atilde V -95 +KPX Atilde W -100 +KPX Atilde Y -70 +KPX Atilde Yacute -70 +KPX Atilde Ydieresis -70 +KPX Atilde quoteright -74 +KPX Atilde u -30 +KPX Atilde uacute -30 +KPX Atilde ucircumflex -30 +KPX Atilde udieresis -30 +KPX Atilde ugrave -30 +KPX Atilde uhungarumlaut -30 +KPX Atilde umacron -30 +KPX Atilde uogonek -30 +KPX Atilde uring -30 +KPX Atilde v -74 +KPX Atilde w -74 +KPX Atilde y -74 +KPX Atilde yacute -74 +KPX Atilde ydieresis -74 +KPX B A -25 +KPX B Aacute -25 +KPX B Abreve -25 +KPX B Acircumflex -25 +KPX B Adieresis -25 +KPX B Agrave -25 +KPX B Amacron -25 +KPX B Aogonek -25 +KPX B Aring -25 +KPX B Atilde -25 +KPX B U -10 +KPX B Uacute -10 +KPX B Ucircumflex -10 +KPX B Udieresis -10 +KPX B Ugrave -10 +KPX B Uhungarumlaut -10 +KPX B Umacron -10 +KPX B Uogonek -10 +KPX B Uring -10 +KPX D A -25 +KPX D Aacute -25 +KPX D Abreve -25 +KPX D Acircumflex -25 +KPX D Adieresis -25 +KPX D Agrave -25 +KPX D Amacron -25 +KPX D Aogonek -25 +KPX D Aring -25 +KPX D Atilde -25 +KPX D V -50 +KPX D W -40 +KPX D Y -50 +KPX D Yacute -50 +KPX D Ydieresis -50 +KPX Dcaron A -25 +KPX Dcaron Aacute -25 +KPX Dcaron Abreve -25 +KPX Dcaron Acircumflex -25 +KPX Dcaron Adieresis -25 +KPX Dcaron Agrave -25 +KPX Dcaron Amacron -25 +KPX Dcaron Aogonek -25 +KPX Dcaron Aring -25 +KPX Dcaron Atilde -25 +KPX Dcaron V -50 +KPX Dcaron W -40 +KPX Dcaron Y -50 +KPX Dcaron Yacute -50 +KPX Dcaron Ydieresis -50 +KPX Dcroat A -25 +KPX Dcroat Aacute -25 +KPX Dcroat Abreve -25 +KPX Dcroat Acircumflex -25 +KPX Dcroat Adieresis -25 +KPX Dcroat Agrave -25 +KPX Dcroat Amacron -25 +KPX Dcroat Aogonek -25 +KPX Dcroat Aring -25 +KPX Dcroat Atilde -25 +KPX Dcroat V -50 +KPX Dcroat W -40 +KPX Dcroat Y -50 +KPX Dcroat Yacute -50 +KPX Dcroat Ydieresis -50 +KPX F A -100 +KPX F Aacute -100 +KPX F Abreve -100 +KPX F Acircumflex -100 +KPX F Adieresis -100 +KPX F Agrave -100 +KPX F Amacron -100 +KPX F Aogonek -100 +KPX F Aring -100 +KPX F Atilde -100 +KPX F a -95 +KPX F aacute -95 +KPX F abreve -95 +KPX F acircumflex -95 +KPX F adieresis -95 +KPX F agrave -95 +KPX F amacron -95 +KPX F aogonek -95 +KPX F aring -95 +KPX F atilde -95 +KPX F comma -129 +KPX F e -100 +KPX F eacute -100 +KPX F ecaron -100 +KPX F ecircumflex -100 +KPX F edieresis -100 +KPX F edotaccent -100 +KPX F egrave -100 +KPX F emacron -100 +KPX F eogonek -100 +KPX F i -40 +KPX F iacute -40 +KPX F icircumflex -40 +KPX F idieresis -40 +KPX F igrave -40 +KPX F imacron -40 +KPX F iogonek -40 +KPX F o -70 +KPX F oacute -70 +KPX F ocircumflex -70 +KPX F odieresis -70 +KPX F ograve -70 +KPX F ohungarumlaut -70 +KPX F omacron -70 +KPX F oslash -70 +KPX F otilde -70 +KPX F period -129 +KPX F r -50 +KPX F racute -50 +KPX F rcaron -50 +KPX F rcommaaccent -50 +KPX J A -25 +KPX J Aacute -25 +KPX J Abreve -25 +KPX J Acircumflex -25 +KPX J Adieresis -25 +KPX J Agrave -25 +KPX J Amacron -25 +KPX J Aogonek -25 +KPX J Aring -25 +KPX J Atilde -25 +KPX J a -40 +KPX J aacute -40 +KPX J abreve -40 +KPX J acircumflex -40 +KPX J adieresis -40 +KPX J agrave -40 +KPX J amacron -40 +KPX J aogonek -40 +KPX J aring -40 +KPX J atilde -40 +KPX J comma -10 +KPX J e -40 +KPX J eacute -40 +KPX J ecaron -40 +KPX J ecircumflex -40 +KPX J edieresis -40 +KPX J edotaccent -40 +KPX J egrave -40 +KPX J emacron -40 +KPX J eogonek -40 +KPX J o -40 +KPX J oacute -40 +KPX J ocircumflex -40 +KPX J odieresis -40 +KPX J ograve -40 +KPX J ohungarumlaut -40 +KPX J omacron -40 +KPX J oslash -40 +KPX J otilde -40 +KPX J period -10 +KPX J u -40 +KPX J uacute -40 +KPX J ucircumflex -40 +KPX J udieresis -40 +KPX J ugrave -40 +KPX J uhungarumlaut -40 +KPX J umacron -40 +KPX J uogonek -40 +KPX J uring -40 +KPX K O -30 +KPX K Oacute -30 +KPX K Ocircumflex -30 +KPX K Odieresis -30 +KPX K Ograve -30 +KPX K Ohungarumlaut -30 +KPX K Omacron -30 +KPX K Oslash -30 +KPX K Otilde -30 +KPX K e -25 +KPX K eacute -25 +KPX K ecaron -25 +KPX K ecircumflex -25 +KPX K edieresis -25 +KPX K edotaccent -25 +KPX K egrave -25 +KPX K emacron -25 +KPX K eogonek -25 +KPX K o -25 +KPX K oacute -25 +KPX K ocircumflex -25 +KPX K odieresis -25 +KPX K ograve -25 +KPX K ohungarumlaut -25 +KPX K omacron -25 +KPX K oslash -25 +KPX K otilde -25 +KPX K u -20 +KPX K uacute -20 +KPX K ucircumflex -20 +KPX K udieresis -20 +KPX K ugrave -20 +KPX K uhungarumlaut -20 +KPX K umacron -20 +KPX K uogonek -20 +KPX K uring -20 +KPX K y -20 +KPX K yacute -20 +KPX K ydieresis -20 +KPX Kcommaaccent O -30 +KPX Kcommaaccent Oacute -30 +KPX Kcommaaccent Ocircumflex -30 +KPX Kcommaaccent Odieresis -30 +KPX Kcommaaccent Ograve -30 +KPX Kcommaaccent Ohungarumlaut -30 +KPX Kcommaaccent Omacron -30 +KPX Kcommaaccent Oslash -30 +KPX Kcommaaccent Otilde -30 +KPX Kcommaaccent e -25 +KPX Kcommaaccent eacute -25 +KPX Kcommaaccent ecaron -25 +KPX Kcommaaccent ecircumflex -25 +KPX Kcommaaccent edieresis -25 +KPX Kcommaaccent edotaccent -25 +KPX Kcommaaccent egrave -25 +KPX Kcommaaccent emacron -25 +KPX Kcommaaccent eogonek -25 +KPX Kcommaaccent o -25 +KPX Kcommaaccent oacute -25 +KPX Kcommaaccent ocircumflex -25 +KPX Kcommaaccent odieresis -25 +KPX Kcommaaccent ograve -25 +KPX Kcommaaccent ohungarumlaut -25 +KPX Kcommaaccent omacron -25 +KPX Kcommaaccent oslash -25 +KPX Kcommaaccent otilde -25 +KPX Kcommaaccent u -20 +KPX Kcommaaccent uacute -20 +KPX Kcommaaccent ucircumflex -20 +KPX Kcommaaccent udieresis -20 +KPX Kcommaaccent ugrave -20 +KPX Kcommaaccent uhungarumlaut -20 +KPX Kcommaaccent umacron -20 +KPX Kcommaaccent uogonek -20 +KPX Kcommaaccent uring -20 +KPX Kcommaaccent y -20 +KPX Kcommaaccent yacute -20 +KPX Kcommaaccent ydieresis -20 +KPX L T -18 +KPX L Tcaron -18 +KPX L Tcommaaccent -18 +KPX L V -37 +KPX L W -37 +KPX L Y -37 +KPX L Yacute -37 +KPX L Ydieresis -37 +KPX L quoteright -55 +KPX L y -37 +KPX L yacute -37 +KPX L ydieresis -37 +KPX Lacute T -18 +KPX Lacute Tcaron -18 +KPX Lacute Tcommaaccent -18 +KPX Lacute V -37 +KPX Lacute W -37 +KPX Lacute Y -37 +KPX Lacute Yacute -37 +KPX Lacute Ydieresis -37 +KPX Lacute quoteright -55 +KPX Lacute y -37 +KPX Lacute yacute -37 +KPX Lacute ydieresis -37 +KPX Lcommaaccent T -18 +KPX Lcommaaccent Tcaron -18 +KPX Lcommaaccent Tcommaaccent -18 +KPX Lcommaaccent V -37 +KPX Lcommaaccent W -37 +KPX Lcommaaccent Y -37 +KPX Lcommaaccent Yacute -37 +KPX Lcommaaccent Ydieresis -37 +KPX Lcommaaccent quoteright -55 +KPX Lcommaaccent y -37 +KPX Lcommaaccent yacute -37 +KPX Lcommaaccent ydieresis -37 +KPX Lslash T -18 +KPX Lslash Tcaron -18 +KPX Lslash Tcommaaccent -18 +KPX Lslash V -37 +KPX Lslash W -37 +KPX Lslash Y -37 +KPX Lslash Yacute -37 +KPX Lslash Ydieresis -37 +KPX Lslash quoteright -55 +KPX Lslash y -37 +KPX Lslash yacute -37 +KPX Lslash ydieresis -37 +KPX N A -30 +KPX N Aacute -30 +KPX N Abreve -30 +KPX N Acircumflex -30 +KPX N Adieresis -30 +KPX N Agrave -30 +KPX N Amacron -30 +KPX N Aogonek -30 +KPX N Aring -30 +KPX N Atilde -30 +KPX Nacute A -30 +KPX Nacute Aacute -30 +KPX Nacute Abreve -30 +KPX Nacute Acircumflex -30 +KPX Nacute Adieresis -30 +KPX Nacute Agrave -30 +KPX Nacute Amacron -30 +KPX Nacute Aogonek -30 +KPX Nacute Aring -30 +KPX Nacute Atilde -30 +KPX Ncaron A -30 +KPX Ncaron Aacute -30 +KPX Ncaron Abreve -30 +KPX Ncaron Acircumflex -30 +KPX Ncaron Adieresis -30 +KPX Ncaron Agrave -30 +KPX Ncaron Amacron -30 +KPX Ncaron Aogonek -30 +KPX Ncaron Aring -30 +KPX Ncaron Atilde -30 +KPX Ncommaaccent A -30 +KPX Ncommaaccent Aacute -30 +KPX Ncommaaccent Abreve -30 +KPX Ncommaaccent Acircumflex -30 +KPX Ncommaaccent Adieresis -30 +KPX Ncommaaccent Agrave -30 +KPX Ncommaaccent Amacron -30 +KPX Ncommaaccent Aogonek -30 +KPX Ncommaaccent Aring -30 +KPX Ncommaaccent Atilde -30 +KPX Ntilde A -30 +KPX Ntilde Aacute -30 +KPX Ntilde Abreve -30 +KPX Ntilde Acircumflex -30 +KPX Ntilde Adieresis -30 +KPX Ntilde Agrave -30 +KPX Ntilde Amacron -30 +KPX Ntilde Aogonek -30 +KPX Ntilde Aring -30 +KPX Ntilde Atilde -30 +KPX O A -40 +KPX O Aacute -40 +KPX O Abreve -40 +KPX O Acircumflex -40 +KPX O Adieresis -40 +KPX O Agrave -40 +KPX O Amacron -40 +KPX O Aogonek -40 +KPX O Aring -40 +KPX O Atilde -40 +KPX O T -40 +KPX O Tcaron -40 +KPX O Tcommaaccent -40 +KPX O V -50 +KPX O W -50 +KPX O X -40 +KPX O Y -50 +KPX O Yacute -50 +KPX O Ydieresis -50 +KPX Oacute A -40 +KPX Oacute Aacute -40 +KPX Oacute Abreve -40 +KPX Oacute Acircumflex -40 +KPX Oacute Adieresis -40 +KPX Oacute Agrave -40 +KPX Oacute Amacron -40 +KPX Oacute Aogonek -40 +KPX Oacute Aring -40 +KPX Oacute Atilde -40 +KPX Oacute T -40 +KPX Oacute Tcaron -40 +KPX Oacute Tcommaaccent -40 +KPX Oacute V -50 +KPX Oacute W -50 +KPX Oacute X -40 +KPX Oacute Y -50 +KPX Oacute Yacute -50 +KPX Oacute Ydieresis -50 +KPX Ocircumflex A -40 +KPX Ocircumflex Aacute -40 +KPX Ocircumflex Abreve -40 +KPX Ocircumflex Acircumflex -40 +KPX Ocircumflex Adieresis -40 +KPX Ocircumflex Agrave -40 +KPX Ocircumflex Amacron -40 +KPX Ocircumflex Aogonek -40 +KPX Ocircumflex Aring -40 +KPX Ocircumflex Atilde -40 +KPX Ocircumflex T -40 +KPX Ocircumflex Tcaron -40 +KPX Ocircumflex Tcommaaccent -40 +KPX Ocircumflex V -50 +KPX Ocircumflex W -50 +KPX Ocircumflex X -40 +KPX Ocircumflex Y -50 +KPX Ocircumflex Yacute -50 +KPX Ocircumflex Ydieresis -50 +KPX Odieresis A -40 +KPX Odieresis Aacute -40 +KPX Odieresis Abreve -40 +KPX Odieresis Acircumflex -40 +KPX Odieresis Adieresis -40 +KPX Odieresis Agrave -40 +KPX Odieresis Amacron -40 +KPX Odieresis Aogonek -40 +KPX Odieresis Aring -40 +KPX Odieresis Atilde -40 +KPX Odieresis T -40 +KPX Odieresis Tcaron -40 +KPX Odieresis Tcommaaccent -40 +KPX Odieresis V -50 +KPX Odieresis W -50 +KPX Odieresis X -40 +KPX Odieresis Y -50 +KPX Odieresis Yacute -50 +KPX Odieresis Ydieresis -50 +KPX Ograve A -40 +KPX Ograve Aacute -40 +KPX Ograve Abreve -40 +KPX Ograve Acircumflex -40 +KPX Ograve Adieresis -40 +KPX Ograve Agrave -40 +KPX Ograve Amacron -40 +KPX Ograve Aogonek -40 +KPX Ograve Aring -40 +KPX Ograve Atilde -40 +KPX Ograve T -40 +KPX Ograve Tcaron -40 +KPX Ograve Tcommaaccent -40 +KPX Ograve V -50 +KPX Ograve W -50 +KPX Ograve X -40 +KPX Ograve Y -50 +KPX Ograve Yacute -50 +KPX Ograve Ydieresis -50 +KPX Ohungarumlaut A -40 +KPX Ohungarumlaut Aacute -40 +KPX Ohungarumlaut Abreve -40 +KPX Ohungarumlaut Acircumflex -40 +KPX Ohungarumlaut Adieresis -40 +KPX Ohungarumlaut Agrave -40 +KPX Ohungarumlaut Amacron -40 +KPX Ohungarumlaut Aogonek -40 +KPX Ohungarumlaut Aring -40 +KPX Ohungarumlaut Atilde -40 +KPX Ohungarumlaut T -40 +KPX Ohungarumlaut Tcaron -40 +KPX Ohungarumlaut Tcommaaccent -40 +KPX Ohungarumlaut V -50 +KPX Ohungarumlaut W -50 +KPX Ohungarumlaut X -40 +KPX Ohungarumlaut Y -50 +KPX Ohungarumlaut Yacute -50 +KPX Ohungarumlaut Ydieresis -50 +KPX Omacron A -40 +KPX Omacron Aacute -40 +KPX Omacron Abreve -40 +KPX Omacron Acircumflex -40 +KPX Omacron Adieresis -40 +KPX Omacron Agrave -40 +KPX Omacron Amacron -40 +KPX Omacron Aogonek -40 +KPX Omacron Aring -40 +KPX Omacron Atilde -40 +KPX Omacron T -40 +KPX Omacron Tcaron -40 +KPX Omacron Tcommaaccent -40 +KPX Omacron V -50 +KPX Omacron W -50 +KPX Omacron X -40 +KPX Omacron Y -50 +KPX Omacron Yacute -50 +KPX Omacron Ydieresis -50 +KPX Oslash A -40 +KPX Oslash Aacute -40 +KPX Oslash Abreve -40 +KPX Oslash Acircumflex -40 +KPX Oslash Adieresis -40 +KPX Oslash Agrave -40 +KPX Oslash Amacron -40 +KPX Oslash Aogonek -40 +KPX Oslash Aring -40 +KPX Oslash Atilde -40 +KPX Oslash T -40 +KPX Oslash Tcaron -40 +KPX Oslash Tcommaaccent -40 +KPX Oslash V -50 +KPX Oslash W -50 +KPX Oslash X -40 +KPX Oslash Y -50 +KPX Oslash Yacute -50 +KPX Oslash Ydieresis -50 +KPX Otilde A -40 +KPX Otilde Aacute -40 +KPX Otilde Abreve -40 +KPX Otilde Acircumflex -40 +KPX Otilde Adieresis -40 +KPX Otilde Agrave -40 +KPX Otilde Amacron -40 +KPX Otilde Aogonek -40 +KPX Otilde Aring -40 +KPX Otilde Atilde -40 +KPX Otilde T -40 +KPX Otilde Tcaron -40 +KPX Otilde Tcommaaccent -40 +KPX Otilde V -50 +KPX Otilde W -50 +KPX Otilde X -40 +KPX Otilde Y -50 +KPX Otilde Yacute -50 +KPX Otilde Ydieresis -50 +KPX P A -85 +KPX P Aacute -85 +KPX P Abreve -85 +KPX P Acircumflex -85 +KPX P Adieresis -85 +KPX P Agrave -85 +KPX P Amacron -85 +KPX P Aogonek -85 +KPX P Aring -85 +KPX P Atilde -85 +KPX P a -40 +KPX P aacute -40 +KPX P abreve -40 +KPX P acircumflex -40 +KPX P adieresis -40 +KPX P agrave -40 +KPX P amacron -40 +KPX P aogonek -40 +KPX P aring -40 +KPX P atilde -40 +KPX P comma -129 +KPX P e -50 +KPX P eacute -50 +KPX P ecaron -50 +KPX P ecircumflex -50 +KPX P edieresis -50 +KPX P edotaccent -50 +KPX P egrave -50 +KPX P emacron -50 +KPX P eogonek -50 +KPX P o -55 +KPX P oacute -55 +KPX P ocircumflex -55 +KPX P odieresis -55 +KPX P ograve -55 +KPX P ohungarumlaut -55 +KPX P omacron -55 +KPX P oslash -55 +KPX P otilde -55 +KPX P period -129 +KPX Q U -10 +KPX Q Uacute -10 +KPX Q Ucircumflex -10 +KPX Q Udieresis -10 +KPX Q Ugrave -10 +KPX Q Uhungarumlaut -10 +KPX Q Umacron -10 +KPX Q Uogonek -10 +KPX Q Uring -10 +KPX R O -40 +KPX R Oacute -40 +KPX R Ocircumflex -40 +KPX R Odieresis -40 +KPX R Ograve -40 +KPX R Ohungarumlaut -40 +KPX R Omacron -40 +KPX R Oslash -40 +KPX R Otilde -40 +KPX R T -30 +KPX R Tcaron -30 +KPX R Tcommaaccent -30 +KPX R U -40 +KPX R Uacute -40 +KPX R Ucircumflex -40 +KPX R Udieresis -40 +KPX R Ugrave -40 +KPX R Uhungarumlaut -40 +KPX R Umacron -40 +KPX R Uogonek -40 +KPX R Uring -40 +KPX R V -18 +KPX R W -18 +KPX R Y -18 +KPX R Yacute -18 +KPX R Ydieresis -18 +KPX Racute O -40 +KPX Racute Oacute -40 +KPX Racute Ocircumflex -40 +KPX Racute Odieresis -40 +KPX Racute Ograve -40 +KPX Racute Ohungarumlaut -40 +KPX Racute Omacron -40 +KPX Racute Oslash -40 +KPX Racute Otilde -40 +KPX Racute T -30 +KPX Racute Tcaron -30 +KPX Racute Tcommaaccent -30 +KPX Racute U -40 +KPX Racute Uacute -40 +KPX Racute Ucircumflex -40 +KPX Racute Udieresis -40 +KPX Racute Ugrave -40 +KPX Racute Uhungarumlaut -40 +KPX Racute Umacron -40 +KPX Racute Uogonek -40 +KPX Racute Uring -40 +KPX Racute V -18 +KPX Racute W -18 +KPX Racute Y -18 +KPX Racute Yacute -18 +KPX Racute Ydieresis -18 +KPX Rcaron O -40 +KPX Rcaron Oacute -40 +KPX Rcaron Ocircumflex -40 +KPX Rcaron Odieresis -40 +KPX Rcaron Ograve -40 +KPX Rcaron Ohungarumlaut -40 +KPX Rcaron Omacron -40 +KPX Rcaron Oslash -40 +KPX Rcaron Otilde -40 +KPX Rcaron T -30 +KPX Rcaron Tcaron -30 +KPX Rcaron Tcommaaccent -30 +KPX Rcaron U -40 +KPX Rcaron Uacute -40 +KPX Rcaron Ucircumflex -40 +KPX Rcaron Udieresis -40 +KPX Rcaron Ugrave -40 +KPX Rcaron Uhungarumlaut -40 +KPX Rcaron Umacron -40 +KPX Rcaron Uogonek -40 +KPX Rcaron Uring -40 +KPX Rcaron V -18 +KPX Rcaron W -18 +KPX Rcaron Y -18 +KPX Rcaron Yacute -18 +KPX Rcaron Ydieresis -18 +KPX Rcommaaccent O -40 +KPX Rcommaaccent Oacute -40 +KPX Rcommaaccent Ocircumflex -40 +KPX Rcommaaccent Odieresis -40 +KPX Rcommaaccent Ograve -40 +KPX Rcommaaccent Ohungarumlaut -40 +KPX Rcommaaccent Omacron -40 +KPX Rcommaaccent Oslash -40 +KPX Rcommaaccent Otilde -40 +KPX Rcommaaccent T -30 +KPX Rcommaaccent Tcaron -30 +KPX Rcommaaccent Tcommaaccent -30 +KPX Rcommaaccent U -40 +KPX Rcommaaccent Uacute -40 +KPX Rcommaaccent Ucircumflex -40 +KPX Rcommaaccent Udieresis -40 +KPX Rcommaaccent Ugrave -40 +KPX Rcommaaccent Uhungarumlaut -40 +KPX Rcommaaccent Umacron -40 +KPX Rcommaaccent Uogonek -40 +KPX Rcommaaccent Uring -40 +KPX Rcommaaccent V -18 +KPX Rcommaaccent W -18 +KPX Rcommaaccent Y -18 +KPX Rcommaaccent Yacute -18 +KPX Rcommaaccent Ydieresis -18 +KPX T A -55 +KPX T Aacute -55 +KPX T Abreve -55 +KPX T Acircumflex -55 +KPX T Adieresis -55 +KPX T Agrave -55 +KPX T Amacron -55 +KPX T Aogonek -55 +KPX T Aring -55 +KPX T Atilde -55 +KPX T O -18 +KPX T Oacute -18 +KPX T Ocircumflex -18 +KPX T Odieresis -18 +KPX T Ograve -18 +KPX T Ohungarumlaut -18 +KPX T Omacron -18 +KPX T Oslash -18 +KPX T Otilde -18 +KPX T a -92 +KPX T aacute -92 +KPX T abreve -92 +KPX T acircumflex -92 +KPX T adieresis -92 +KPX T agrave -92 +KPX T amacron -92 +KPX T aogonek -92 +KPX T aring -92 +KPX T atilde -92 +KPX T colon -74 +KPX T comma -92 +KPX T e -92 +KPX T eacute -92 +KPX T ecaron -92 +KPX T ecircumflex -92 +KPX T edieresis -52 +KPX T edotaccent -92 +KPX T egrave -52 +KPX T emacron -52 +KPX T eogonek -92 +KPX T hyphen -92 +KPX T i -37 +KPX T iacute -37 +KPX T iogonek -37 +KPX T o -95 +KPX T oacute -95 +KPX T ocircumflex -95 +KPX T odieresis -95 +KPX T ograve -95 +KPX T ohungarumlaut -95 +KPX T omacron -95 +KPX T oslash -95 +KPX T otilde -95 +KPX T period -92 +KPX T r -37 +KPX T racute -37 +KPX T rcaron -37 +KPX T rcommaaccent -37 +KPX T semicolon -74 +KPX T u -37 +KPX T uacute -37 +KPX T ucircumflex -37 +KPX T udieresis -37 +KPX T ugrave -37 +KPX T uhungarumlaut -37 +KPX T umacron -37 +KPX T uogonek -37 +KPX T uring -37 +KPX T w -37 +KPX T y -37 +KPX T yacute -37 +KPX T ydieresis -37 +KPX Tcaron A -55 +KPX Tcaron Aacute -55 +KPX Tcaron Abreve -55 +KPX Tcaron Acircumflex -55 +KPX Tcaron Adieresis -55 +KPX Tcaron Agrave -55 +KPX Tcaron Amacron -55 +KPX Tcaron Aogonek -55 +KPX Tcaron Aring -55 +KPX Tcaron Atilde -55 +KPX Tcaron O -18 +KPX Tcaron Oacute -18 +KPX Tcaron Ocircumflex -18 +KPX Tcaron Odieresis -18 +KPX Tcaron Ograve -18 +KPX Tcaron Ohungarumlaut -18 +KPX Tcaron Omacron -18 +KPX Tcaron Oslash -18 +KPX Tcaron Otilde -18 +KPX Tcaron a -92 +KPX Tcaron aacute -92 +KPX Tcaron abreve -92 +KPX Tcaron acircumflex -92 +KPX Tcaron adieresis -92 +KPX Tcaron agrave -92 +KPX Tcaron amacron -92 +KPX Tcaron aogonek -92 +KPX Tcaron aring -92 +KPX Tcaron atilde -92 +KPX Tcaron colon -74 +KPX Tcaron comma -92 +KPX Tcaron e -92 +KPX Tcaron eacute -92 +KPX Tcaron ecaron -92 +KPX Tcaron ecircumflex -92 +KPX Tcaron edieresis -52 +KPX Tcaron edotaccent -92 +KPX Tcaron egrave -52 +KPX Tcaron emacron -52 +KPX Tcaron eogonek -92 +KPX Tcaron hyphen -92 +KPX Tcaron i -37 +KPX Tcaron iacute -37 +KPX Tcaron iogonek -37 +KPX Tcaron o -95 +KPX Tcaron oacute -95 +KPX Tcaron ocircumflex -95 +KPX Tcaron odieresis -95 +KPX Tcaron ograve -95 +KPX Tcaron ohungarumlaut -95 +KPX Tcaron omacron -95 +KPX Tcaron oslash -95 +KPX Tcaron otilde -95 +KPX Tcaron period -92 +KPX Tcaron r -37 +KPX Tcaron racute -37 +KPX Tcaron rcaron -37 +KPX Tcaron rcommaaccent -37 +KPX Tcaron semicolon -74 +KPX Tcaron u -37 +KPX Tcaron uacute -37 +KPX Tcaron ucircumflex -37 +KPX Tcaron udieresis -37 +KPX Tcaron ugrave -37 +KPX Tcaron uhungarumlaut -37 +KPX Tcaron umacron -37 +KPX Tcaron uogonek -37 +KPX Tcaron uring -37 +KPX Tcaron w -37 +KPX Tcaron y -37 +KPX Tcaron yacute -37 +KPX Tcaron ydieresis -37 +KPX Tcommaaccent A -55 +KPX Tcommaaccent Aacute -55 +KPX Tcommaaccent Abreve -55 +KPX Tcommaaccent Acircumflex -55 +KPX Tcommaaccent Adieresis -55 +KPX Tcommaaccent Agrave -55 +KPX Tcommaaccent Amacron -55 +KPX Tcommaaccent Aogonek -55 +KPX Tcommaaccent Aring -55 +KPX Tcommaaccent Atilde -55 +KPX Tcommaaccent O -18 +KPX Tcommaaccent Oacute -18 +KPX Tcommaaccent Ocircumflex -18 +KPX Tcommaaccent Odieresis -18 +KPX Tcommaaccent Ograve -18 +KPX Tcommaaccent Ohungarumlaut -18 +KPX Tcommaaccent Omacron -18 +KPX Tcommaaccent Oslash -18 +KPX Tcommaaccent Otilde -18 +KPX Tcommaaccent a -92 +KPX Tcommaaccent aacute -92 +KPX Tcommaaccent abreve -92 +KPX Tcommaaccent acircumflex -92 +KPX Tcommaaccent adieresis -92 +KPX Tcommaaccent agrave -92 +KPX Tcommaaccent amacron -92 +KPX Tcommaaccent aogonek -92 +KPX Tcommaaccent aring -92 +KPX Tcommaaccent atilde -92 +KPX Tcommaaccent colon -74 +KPX Tcommaaccent comma -92 +KPX Tcommaaccent e -92 +KPX Tcommaaccent eacute -92 +KPX Tcommaaccent ecaron -92 +KPX Tcommaaccent ecircumflex -92 +KPX Tcommaaccent edieresis -52 +KPX Tcommaaccent edotaccent -92 +KPX Tcommaaccent egrave -52 +KPX Tcommaaccent emacron -52 +KPX Tcommaaccent eogonek -92 +KPX Tcommaaccent hyphen -92 +KPX Tcommaaccent i -37 +KPX Tcommaaccent iacute -37 +KPX Tcommaaccent iogonek -37 +KPX Tcommaaccent o -95 +KPX Tcommaaccent oacute -95 +KPX Tcommaaccent ocircumflex -95 +KPX Tcommaaccent odieresis -95 +KPX Tcommaaccent ograve -95 +KPX Tcommaaccent ohungarumlaut -95 +KPX Tcommaaccent omacron -95 +KPX Tcommaaccent oslash -95 +KPX Tcommaaccent otilde -95 +KPX Tcommaaccent period -92 +KPX Tcommaaccent r -37 +KPX Tcommaaccent racute -37 +KPX Tcommaaccent rcaron -37 +KPX Tcommaaccent rcommaaccent -37 +KPX Tcommaaccent semicolon -74 +KPX Tcommaaccent u -37 +KPX Tcommaaccent uacute -37 +KPX Tcommaaccent ucircumflex -37 +KPX Tcommaaccent udieresis -37 +KPX Tcommaaccent ugrave -37 +KPX Tcommaaccent uhungarumlaut -37 +KPX Tcommaaccent umacron -37 +KPX Tcommaaccent uogonek -37 +KPX Tcommaaccent uring -37 +KPX Tcommaaccent w -37 +KPX Tcommaaccent y -37 +KPX Tcommaaccent yacute -37 +KPX Tcommaaccent ydieresis -37 +KPX U A -45 +KPX U Aacute -45 +KPX U Abreve -45 +KPX U Acircumflex -45 +KPX U Adieresis -45 +KPX U Agrave -45 +KPX U Amacron -45 +KPX U Aogonek -45 +KPX U Aring -45 +KPX U Atilde -45 +KPX Uacute A -45 +KPX Uacute Aacute -45 +KPX Uacute Abreve -45 +KPX Uacute Acircumflex -45 +KPX Uacute Adieresis -45 +KPX Uacute Agrave -45 +KPX Uacute Amacron -45 +KPX Uacute Aogonek -45 +KPX Uacute Aring -45 +KPX Uacute Atilde -45 +KPX Ucircumflex A -45 +KPX Ucircumflex Aacute -45 +KPX Ucircumflex Abreve -45 +KPX Ucircumflex Acircumflex -45 +KPX Ucircumflex Adieresis -45 +KPX Ucircumflex Agrave -45 +KPX Ucircumflex Amacron -45 +KPX Ucircumflex Aogonek -45 +KPX Ucircumflex Aring -45 +KPX Ucircumflex Atilde -45 +KPX Udieresis A -45 +KPX Udieresis Aacute -45 +KPX Udieresis Abreve -45 +KPX Udieresis Acircumflex -45 +KPX Udieresis Adieresis -45 +KPX Udieresis Agrave -45 +KPX Udieresis Amacron -45 +KPX Udieresis Aogonek -45 +KPX Udieresis Aring -45 +KPX Udieresis Atilde -45 +KPX Ugrave A -45 +KPX Ugrave Aacute -45 +KPX Ugrave Abreve -45 +KPX Ugrave Acircumflex -45 +KPX Ugrave Adieresis -45 +KPX Ugrave Agrave -45 +KPX Ugrave Amacron -45 +KPX Ugrave Aogonek -45 +KPX Ugrave Aring -45 +KPX Ugrave Atilde -45 +KPX Uhungarumlaut A -45 +KPX Uhungarumlaut Aacute -45 +KPX Uhungarumlaut Abreve -45 +KPX Uhungarumlaut Acircumflex -45 +KPX Uhungarumlaut Adieresis -45 +KPX Uhungarumlaut Agrave -45 +KPX Uhungarumlaut Amacron -45 +KPX Uhungarumlaut Aogonek -45 +KPX Uhungarumlaut Aring -45 +KPX Uhungarumlaut Atilde -45 +KPX Umacron A -45 +KPX Umacron Aacute -45 +KPX Umacron Abreve -45 +KPX Umacron Acircumflex -45 +KPX Umacron Adieresis -45 +KPX Umacron Agrave -45 +KPX Umacron Amacron -45 +KPX Umacron Aogonek -45 +KPX Umacron Aring -45 +KPX Umacron Atilde -45 +KPX Uogonek A -45 +KPX Uogonek Aacute -45 +KPX Uogonek Abreve -45 +KPX Uogonek Acircumflex -45 +KPX Uogonek Adieresis -45 +KPX Uogonek Agrave -45 +KPX Uogonek Amacron -45 +KPX Uogonek Aogonek -45 +KPX Uogonek Aring -45 +KPX Uogonek Atilde -45 +KPX Uring A -45 +KPX Uring Aacute -45 +KPX Uring Abreve -45 +KPX Uring Acircumflex -45 +KPX Uring Adieresis -45 +KPX Uring Agrave -45 +KPX Uring Amacron -45 +KPX Uring Aogonek -45 +KPX Uring Aring -45 +KPX Uring Atilde -45 +KPX V A -85 +KPX V Aacute -85 +KPX V Abreve -85 +KPX V Acircumflex -85 +KPX V Adieresis -85 +KPX V Agrave -85 +KPX V Amacron -85 +KPX V Aogonek -85 +KPX V Aring -85 +KPX V Atilde -85 +KPX V G -10 +KPX V Gbreve -10 +KPX V Gcommaaccent -10 +KPX V O -30 +KPX V Oacute -30 +KPX V Ocircumflex -30 +KPX V Odieresis -30 +KPX V Ograve -30 +KPX V Ohungarumlaut -30 +KPX V Omacron -30 +KPX V Oslash -30 +KPX V Otilde -30 +KPX V a -111 +KPX V aacute -111 +KPX V abreve -111 +KPX V acircumflex -111 +KPX V adieresis -111 +KPX V agrave -111 +KPX V amacron -111 +KPX V aogonek -111 +KPX V aring -111 +KPX V atilde -111 +KPX V colon -74 +KPX V comma -129 +KPX V e -111 +KPX V eacute -111 +KPX V ecaron -111 +KPX V ecircumflex -111 +KPX V edieresis -71 +KPX V edotaccent -111 +KPX V egrave -71 +KPX V emacron -71 +KPX V eogonek -111 +KPX V hyphen -70 +KPX V i -55 +KPX V iacute -55 +KPX V iogonek -55 +KPX V o -111 +KPX V oacute -111 +KPX V ocircumflex -111 +KPX V odieresis -111 +KPX V ograve -111 +KPX V ohungarumlaut -111 +KPX V omacron -111 +KPX V oslash -111 +KPX V otilde -111 +KPX V period -129 +KPX V semicolon -74 +KPX V u -55 +KPX V uacute -55 +KPX V ucircumflex -55 +KPX V udieresis -55 +KPX V ugrave -55 +KPX V uhungarumlaut -55 +KPX V umacron -55 +KPX V uogonek -55 +KPX V uring -55 +KPX W A -74 +KPX W Aacute -74 +KPX W Abreve -74 +KPX W Acircumflex -74 +KPX W Adieresis -74 +KPX W Agrave -74 +KPX W Amacron -74 +KPX W Aogonek -74 +KPX W Aring -74 +KPX W Atilde -74 +KPX W O -15 +KPX W Oacute -15 +KPX W Ocircumflex -15 +KPX W Odieresis -15 +KPX W Ograve -15 +KPX W Ohungarumlaut -15 +KPX W Omacron -15 +KPX W Oslash -15 +KPX W Otilde -15 +KPX W a -85 +KPX W aacute -85 +KPX W abreve -85 +KPX W acircumflex -85 +KPX W adieresis -85 +KPX W agrave -85 +KPX W amacron -85 +KPX W aogonek -85 +KPX W aring -85 +KPX W atilde -85 +KPX W colon -55 +KPX W comma -74 +KPX W e -90 +KPX W eacute -90 +KPX W ecaron -90 +KPX W ecircumflex -90 +KPX W edieresis -50 +KPX W edotaccent -90 +KPX W egrave -50 +KPX W emacron -50 +KPX W eogonek -90 +KPX W hyphen -50 +KPX W i -37 +KPX W iacute -37 +KPX W iogonek -37 +KPX W o -80 +KPX W oacute -80 +KPX W ocircumflex -80 +KPX W odieresis -80 +KPX W ograve -80 +KPX W ohungarumlaut -80 +KPX W omacron -80 +KPX W oslash -80 +KPX W otilde -80 +KPX W period -74 +KPX W semicolon -55 +KPX W u -55 +KPX W uacute -55 +KPX W ucircumflex -55 +KPX W udieresis -55 +KPX W ugrave -55 +KPX W uhungarumlaut -55 +KPX W umacron -55 +KPX W uogonek -55 +KPX W uring -55 +KPX W y -55 +KPX W yacute -55 +KPX W ydieresis -55 +KPX Y A -74 +KPX Y Aacute -74 +KPX Y Abreve -74 +KPX Y Acircumflex -74 +KPX Y Adieresis -74 +KPX Y Agrave -74 +KPX Y Amacron -74 +KPX Y Aogonek -74 +KPX Y Aring -74 +KPX Y Atilde -74 +KPX Y O -25 +KPX Y Oacute -25 +KPX Y Ocircumflex -25 +KPX Y Odieresis -25 +KPX Y Ograve -25 +KPX Y Ohungarumlaut -25 +KPX Y Omacron -25 +KPX Y Oslash -25 +KPX Y Otilde -25 +KPX Y a -92 +KPX Y aacute -92 +KPX Y abreve -92 +KPX Y acircumflex -92 +KPX Y adieresis -92 +KPX Y agrave -92 +KPX Y amacron -92 +KPX Y aogonek -92 +KPX Y aring -92 +KPX Y atilde -92 +KPX Y colon -92 +KPX Y comma -92 +KPX Y e -111 +KPX Y eacute -111 +KPX Y ecaron -111 +KPX Y ecircumflex -71 +KPX Y edieresis -71 +KPX Y edotaccent -111 +KPX Y egrave -71 +KPX Y emacron -71 +KPX Y eogonek -111 +KPX Y hyphen -92 +KPX Y i -55 +KPX Y iacute -55 +KPX Y iogonek -55 +KPX Y o -111 +KPX Y oacute -111 +KPX Y ocircumflex -111 +KPX Y odieresis -111 +KPX Y ograve -111 +KPX Y ohungarumlaut -111 +KPX Y omacron -111 +KPX Y oslash -111 +KPX Y otilde -111 +KPX Y period -74 +KPX Y semicolon -92 +KPX Y u -92 +KPX Y uacute -92 +KPX Y ucircumflex -92 +KPX Y udieresis -92 +KPX Y ugrave -92 +KPX Y uhungarumlaut -92 +KPX Y umacron -92 +KPX Y uogonek -92 +KPX Y uring -92 +KPX Yacute A -74 +KPX Yacute Aacute -74 +KPX Yacute Abreve -74 +KPX Yacute Acircumflex -74 +KPX Yacute Adieresis -74 +KPX Yacute Agrave -74 +KPX Yacute Amacron -74 +KPX Yacute Aogonek -74 +KPX Yacute Aring -74 +KPX Yacute Atilde -74 +KPX Yacute O -25 +KPX Yacute Oacute -25 +KPX Yacute Ocircumflex -25 +KPX Yacute Odieresis -25 +KPX Yacute Ograve -25 +KPX Yacute Ohungarumlaut -25 +KPX Yacute Omacron -25 +KPX Yacute Oslash -25 +KPX Yacute Otilde -25 +KPX Yacute a -92 +KPX Yacute aacute -92 +KPX Yacute abreve -92 +KPX Yacute acircumflex -92 +KPX Yacute adieresis -92 +KPX Yacute agrave -92 +KPX Yacute amacron -92 +KPX Yacute aogonek -92 +KPX Yacute aring -92 +KPX Yacute atilde -92 +KPX Yacute colon -92 +KPX Yacute comma -92 +KPX Yacute e -111 +KPX Yacute eacute -111 +KPX Yacute ecaron -111 +KPX Yacute ecircumflex -71 +KPX Yacute edieresis -71 +KPX Yacute edotaccent -111 +KPX Yacute egrave -71 +KPX Yacute emacron -71 +KPX Yacute eogonek -111 +KPX Yacute hyphen -92 +KPX Yacute i -55 +KPX Yacute iacute -55 +KPX Yacute iogonek -55 +KPX Yacute o -111 +KPX Yacute oacute -111 +KPX Yacute ocircumflex -111 +KPX Yacute odieresis -111 +KPX Yacute ograve -111 +KPX Yacute ohungarumlaut -111 +KPX Yacute omacron -111 +KPX Yacute oslash -111 +KPX Yacute otilde -111 +KPX Yacute period -74 +KPX Yacute semicolon -92 +KPX Yacute u -92 +KPX Yacute uacute -92 +KPX Yacute ucircumflex -92 +KPX Yacute udieresis -92 +KPX Yacute ugrave -92 +KPX Yacute uhungarumlaut -92 +KPX Yacute umacron -92 +KPX Yacute uogonek -92 +KPX Yacute uring -92 +KPX Ydieresis A -74 +KPX Ydieresis Aacute -74 +KPX Ydieresis Abreve -74 +KPX Ydieresis Acircumflex -74 +KPX Ydieresis Adieresis -74 +KPX Ydieresis Agrave -74 +KPX Ydieresis Amacron -74 +KPX Ydieresis Aogonek -74 +KPX Ydieresis Aring -74 +KPX Ydieresis Atilde -74 +KPX Ydieresis O -25 +KPX Ydieresis Oacute -25 +KPX Ydieresis Ocircumflex -25 +KPX Ydieresis Odieresis -25 +KPX Ydieresis Ograve -25 +KPX Ydieresis Ohungarumlaut -25 +KPX Ydieresis Omacron -25 +KPX Ydieresis Oslash -25 +KPX Ydieresis Otilde -25 +KPX Ydieresis a -92 +KPX Ydieresis aacute -92 +KPX Ydieresis abreve -92 +KPX Ydieresis acircumflex -92 +KPX Ydieresis adieresis -92 +KPX Ydieresis agrave -92 +KPX Ydieresis amacron -92 +KPX Ydieresis aogonek -92 +KPX Ydieresis aring -92 +KPX Ydieresis atilde -92 +KPX Ydieresis colon -92 +KPX Ydieresis comma -92 +KPX Ydieresis e -111 +KPX Ydieresis eacute -111 +KPX Ydieresis ecaron -111 +KPX Ydieresis ecircumflex -71 +KPX Ydieresis edieresis -71 +KPX Ydieresis edotaccent -111 +KPX Ydieresis egrave -71 +KPX Ydieresis emacron -71 +KPX Ydieresis eogonek -111 +KPX Ydieresis hyphen -92 +KPX Ydieresis i -55 +KPX Ydieresis iacute -55 +KPX Ydieresis iogonek -55 +KPX Ydieresis o -111 +KPX Ydieresis oacute -111 +KPX Ydieresis ocircumflex -111 +KPX Ydieresis odieresis -111 +KPX Ydieresis ograve -111 +KPX Ydieresis ohungarumlaut -111 +KPX Ydieresis omacron -111 +KPX Ydieresis oslash -111 +KPX Ydieresis otilde -111 +KPX Ydieresis period -74 +KPX Ydieresis semicolon -92 +KPX Ydieresis u -92 +KPX Ydieresis uacute -92 +KPX Ydieresis ucircumflex -92 +KPX Ydieresis udieresis -92 +KPX Ydieresis ugrave -92 +KPX Ydieresis uhungarumlaut -92 +KPX Ydieresis umacron -92 +KPX Ydieresis uogonek -92 +KPX Ydieresis uring -92 +KPX b b -10 +KPX b period -40 +KPX b u -20 +KPX b uacute -20 +KPX b ucircumflex -20 +KPX b udieresis -20 +KPX b ugrave -20 +KPX b uhungarumlaut -20 +KPX b umacron -20 +KPX b uogonek -20 +KPX b uring -20 +KPX c h -10 +KPX c k -10 +KPX c kcommaaccent -10 +KPX cacute h -10 +KPX cacute k -10 +KPX cacute kcommaaccent -10 +KPX ccaron h -10 +KPX ccaron k -10 +KPX ccaron kcommaaccent -10 +KPX ccedilla h -10 +KPX ccedilla k -10 +KPX ccedilla kcommaaccent -10 +KPX comma quotedblright -95 +KPX comma quoteright -95 +KPX e b -10 +KPX eacute b -10 +KPX ecaron b -10 +KPX ecircumflex b -10 +KPX edieresis b -10 +KPX edotaccent b -10 +KPX egrave b -10 +KPX emacron b -10 +KPX eogonek b -10 +KPX f comma -10 +KPX f dotlessi -30 +KPX f e -10 +KPX f eacute -10 +KPX f edotaccent -10 +KPX f eogonek -10 +KPX f f -18 +KPX f o -10 +KPX f oacute -10 +KPX f ocircumflex -10 +KPX f ograve -10 +KPX f ohungarumlaut -10 +KPX f oslash -10 +KPX f otilde -10 +KPX f period -10 +KPX f quoteright 55 +KPX k e -30 +KPX k eacute -30 +KPX k ecaron -30 +KPX k ecircumflex -30 +KPX k edieresis -30 +KPX k edotaccent -30 +KPX k egrave -30 +KPX k emacron -30 +KPX k eogonek -30 +KPX k o -10 +KPX k oacute -10 +KPX k ocircumflex -10 +KPX k odieresis -10 +KPX k ograve -10 +KPX k ohungarumlaut -10 +KPX k omacron -10 +KPX k oslash -10 +KPX k otilde -10 +KPX kcommaaccent e -30 +KPX kcommaaccent eacute -30 +KPX kcommaaccent ecaron -30 +KPX kcommaaccent ecircumflex -30 +KPX kcommaaccent edieresis -30 +KPX kcommaaccent edotaccent -30 +KPX kcommaaccent egrave -30 +KPX kcommaaccent emacron -30 +KPX kcommaaccent eogonek -30 +KPX kcommaaccent o -10 +KPX kcommaaccent oacute -10 +KPX kcommaaccent ocircumflex -10 +KPX kcommaaccent odieresis -10 +KPX kcommaaccent ograve -10 +KPX kcommaaccent ohungarumlaut -10 +KPX kcommaaccent omacron -10 +KPX kcommaaccent oslash -10 +KPX kcommaaccent otilde -10 +KPX n v -40 +KPX nacute v -40 +KPX ncaron v -40 +KPX ncommaaccent v -40 +KPX ntilde v -40 +KPX o v -15 +KPX o w -25 +KPX o x -10 +KPX o y -10 +KPX o yacute -10 +KPX o ydieresis -10 +KPX oacute v -15 +KPX oacute w -25 +KPX oacute x -10 +KPX oacute y -10 +KPX oacute yacute -10 +KPX oacute ydieresis -10 +KPX ocircumflex v -15 +KPX ocircumflex w -25 +KPX ocircumflex x -10 +KPX ocircumflex y -10 +KPX ocircumflex yacute -10 +KPX ocircumflex ydieresis -10 +KPX odieresis v -15 +KPX odieresis w -25 +KPX odieresis x -10 +KPX odieresis y -10 +KPX odieresis yacute -10 +KPX odieresis ydieresis -10 +KPX ograve v -15 +KPX ograve w -25 +KPX ograve x -10 +KPX ograve y -10 +KPX ograve yacute -10 +KPX ograve ydieresis -10 +KPX ohungarumlaut v -15 +KPX ohungarumlaut w -25 +KPX ohungarumlaut x -10 +KPX ohungarumlaut y -10 +KPX ohungarumlaut yacute -10 +KPX ohungarumlaut ydieresis -10 +KPX omacron v -15 +KPX omacron w -25 +KPX omacron x -10 +KPX omacron y -10 +KPX omacron yacute -10 +KPX omacron ydieresis -10 +KPX oslash v -15 +KPX oslash w -25 +KPX oslash x -10 +KPX oslash y -10 +KPX oslash yacute -10 +KPX oslash ydieresis -10 +KPX otilde v -15 +KPX otilde w -25 +KPX otilde x -10 +KPX otilde y -10 +KPX otilde yacute -10 +KPX otilde ydieresis -10 +KPX period quotedblright -95 +KPX period quoteright -95 +KPX quoteleft quoteleft -74 +KPX quoteright d -15 +KPX quoteright dcroat -15 +KPX quoteright quoteright -74 +KPX quoteright r -15 +KPX quoteright racute -15 +KPX quoteright rcaron -15 +KPX quoteright rcommaaccent -15 +KPX quoteright s -74 +KPX quoteright sacute -74 +KPX quoteright scaron -74 +KPX quoteright scedilla -74 +KPX quoteright scommaaccent -74 +KPX quoteright space -74 +KPX quoteright t -37 +KPX quoteright tcommaaccent -37 +KPX quoteright v -15 +KPX r comma -65 +KPX r period -65 +KPX racute comma -65 +KPX racute period -65 +KPX rcaron comma -65 +KPX rcaron period -65 +KPX rcommaaccent comma -65 +KPX rcommaaccent period -65 +KPX space A -37 +KPX space Aacute -37 +KPX space Abreve -37 +KPX space Acircumflex -37 +KPX space Adieresis -37 +KPX space Agrave -37 +KPX space Amacron -37 +KPX space Aogonek -37 +KPX space Aring -37 +KPX space Atilde -37 +KPX space V -70 +KPX space W -70 +KPX space Y -70 +KPX space Yacute -70 +KPX space Ydieresis -70 +KPX v comma -37 +KPX v e -15 +KPX v eacute -15 +KPX v ecaron -15 +KPX v ecircumflex -15 +KPX v edieresis -15 +KPX v edotaccent -15 +KPX v egrave -15 +KPX v emacron -15 +KPX v eogonek -15 +KPX v o -15 +KPX v oacute -15 +KPX v ocircumflex -15 +KPX v odieresis -15 +KPX v ograve -15 +KPX v ohungarumlaut -15 +KPX v omacron -15 +KPX v oslash -15 +KPX v otilde -15 +KPX v period -37 +KPX w a -10 +KPX w aacute -10 +KPX w abreve -10 +KPX w acircumflex -10 +KPX w adieresis -10 +KPX w agrave -10 +KPX w amacron -10 +KPX w aogonek -10 +KPX w aring -10 +KPX w atilde -10 +KPX w comma -37 +KPX w e -10 +KPX w eacute -10 +KPX w ecaron -10 +KPX w ecircumflex -10 +KPX w edieresis -10 +KPX w edotaccent -10 +KPX w egrave -10 +KPX w emacron -10 +KPX w eogonek -10 +KPX w o -15 +KPX w oacute -15 +KPX w ocircumflex -15 +KPX w odieresis -15 +KPX w ograve -15 +KPX w ohungarumlaut -15 +KPX w omacron -15 +KPX w oslash -15 +KPX w otilde -15 +KPX w period -37 +KPX x e -10 +KPX x eacute -10 +KPX x ecaron -10 +KPX x ecircumflex -10 +KPX x edieresis -10 +KPX x edotaccent -10 +KPX x egrave -10 +KPX x emacron -10 +KPX x eogonek -10 +KPX y comma -37 +KPX y period -37 +KPX yacute comma -37 +KPX yacute period -37 +KPX ydieresis comma -37 +KPX ydieresis period -37 +EndKernPairs +EndKernData +EndFontMetrics diff --git a/pitfall/pdfkit/lib/font/data/Times-Italic.afm b/pitfall/pdfkit/lib/font/data/Times-Italic.afm new file mode 100755 index 00000000..b0eaee40 --- /dev/null +++ b/pitfall/pdfkit/lib/font/data/Times-Italic.afm @@ -0,0 +1,2667 @@ +StartFontMetrics 4.1 +Comment Copyright (c) 1985, 1987, 1989, 1990, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. +Comment Creation Date: Thu May 1 12:56:55 1997 +Comment UniqueID 43067 +Comment VMusage 47727 58752 +FontName Times-Italic +FullName Times Italic +FamilyName Times +Weight Medium +ItalicAngle -15.5 +IsFixedPitch false +CharacterSet ExtendedRoman +FontBBox -169 -217 1010 883 +UnderlinePosition -100 +UnderlineThickness 50 +Version 002.000 +Notice Copyright (c) 1985, 1987, 1989, 1990, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved.Times is a trademark of Linotype-Hell AG and/or its subsidiaries. +EncodingScheme AdobeStandardEncoding +CapHeight 653 +XHeight 441 +Ascender 683 +Descender -217 +StdHW 32 +StdVW 76 +StartCharMetrics 315 +C 32 ; WX 250 ; N space ; B 0 0 0 0 ; +C 33 ; WX 333 ; N exclam ; B 39 -11 302 667 ; +C 34 ; WX 420 ; N quotedbl ; B 144 421 432 666 ; +C 35 ; WX 500 ; N numbersign ; B 2 0 540 676 ; +C 36 ; WX 500 ; N dollar ; B 31 -89 497 731 ; +C 37 ; WX 833 ; N percent ; B 79 -13 790 676 ; +C 38 ; WX 778 ; N ampersand ; B 76 -18 723 666 ; +C 39 ; WX 333 ; N quoteright ; B 151 436 290 666 ; +C 40 ; WX 333 ; N parenleft ; B 42 -181 315 669 ; +C 41 ; WX 333 ; N parenright ; B 16 -180 289 669 ; +C 42 ; WX 500 ; N asterisk ; B 128 255 492 666 ; +C 43 ; WX 675 ; N plus ; B 86 0 590 506 ; +C 44 ; WX 250 ; N comma ; B -4 -129 135 101 ; +C 45 ; WX 333 ; N hyphen ; B 49 192 282 255 ; +C 46 ; WX 250 ; N period ; B 27 -11 138 100 ; +C 47 ; WX 278 ; N slash ; B -65 -18 386 666 ; +C 48 ; WX 500 ; N zero ; B 32 -7 497 676 ; +C 49 ; WX 500 ; N one ; B 49 0 409 676 ; +C 50 ; WX 500 ; N two ; B 12 0 452 676 ; +C 51 ; WX 500 ; N three ; B 15 -7 465 676 ; +C 52 ; WX 500 ; N four ; B 1 0 479 676 ; +C 53 ; WX 500 ; N five ; B 15 -7 491 666 ; +C 54 ; WX 500 ; N six ; B 30 -7 521 686 ; +C 55 ; WX 500 ; N seven ; B 75 -8 537 666 ; +C 56 ; WX 500 ; N eight ; B 30 -7 493 676 ; +C 57 ; WX 500 ; N nine ; B 23 -17 492 676 ; +C 58 ; WX 333 ; N colon ; B 50 -11 261 441 ; +C 59 ; WX 333 ; N semicolon ; B 27 -129 261 441 ; +C 60 ; WX 675 ; N less ; B 84 -8 592 514 ; +C 61 ; WX 675 ; N equal ; B 86 120 590 386 ; +C 62 ; WX 675 ; N greater ; B 84 -8 592 514 ; +C 63 ; WX 500 ; N question ; B 132 -12 472 664 ; +C 64 ; WX 920 ; N at ; B 118 -18 806 666 ; +C 65 ; WX 611 ; N A ; B -51 0 564 668 ; +C 66 ; WX 611 ; N B ; B -8 0 588 653 ; +C 67 ; WX 667 ; N C ; B 66 -18 689 666 ; +C 68 ; WX 722 ; N D ; B -8 0 700 653 ; +C 69 ; WX 611 ; N E ; B -1 0 634 653 ; +C 70 ; WX 611 ; N F ; B 8 0 645 653 ; +C 71 ; WX 722 ; N G ; B 52 -18 722 666 ; +C 72 ; WX 722 ; N H ; B -8 0 767 653 ; +C 73 ; WX 333 ; N I ; B -8 0 384 653 ; +C 74 ; WX 444 ; N J ; B -6 -18 491 653 ; +C 75 ; WX 667 ; N K ; B 7 0 722 653 ; +C 76 ; WX 556 ; N L ; B -8 0 559 653 ; +C 77 ; WX 833 ; N M ; B -18 0 873 653 ; +C 78 ; WX 667 ; N N ; B -20 -15 727 653 ; +C 79 ; WX 722 ; N O ; B 60 -18 699 666 ; +C 80 ; WX 611 ; N P ; B 0 0 605 653 ; +C 81 ; WX 722 ; N Q ; B 59 -182 699 666 ; +C 82 ; WX 611 ; N R ; B -13 0 588 653 ; +C 83 ; WX 500 ; N S ; B 17 -18 508 667 ; +C 84 ; WX 556 ; N T ; B 59 0 633 653 ; +C 85 ; WX 722 ; N U ; B 102 -18 765 653 ; +C 86 ; WX 611 ; N V ; B 76 -18 688 653 ; +C 87 ; WX 833 ; N W ; B 71 -18 906 653 ; +C 88 ; WX 611 ; N X ; B -29 0 655 653 ; +C 89 ; WX 556 ; N Y ; B 78 0 633 653 ; +C 90 ; WX 556 ; N Z ; B -6 0 606 653 ; +C 91 ; WX 389 ; N bracketleft ; B 21 -153 391 663 ; +C 92 ; WX 278 ; N backslash ; B -41 -18 319 666 ; +C 93 ; WX 389 ; N bracketright ; B 12 -153 382 663 ; +C 94 ; WX 422 ; N asciicircum ; B 0 301 422 666 ; +C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; +C 96 ; WX 333 ; N quoteleft ; B 171 436 310 666 ; +C 97 ; WX 500 ; N a ; B 17 -11 476 441 ; +C 98 ; WX 500 ; N b ; B 23 -11 473 683 ; +C 99 ; WX 444 ; N c ; B 30 -11 425 441 ; +C 100 ; WX 500 ; N d ; B 15 -13 527 683 ; +C 101 ; WX 444 ; N e ; B 31 -11 412 441 ; +C 102 ; WX 278 ; N f ; B -147 -207 424 678 ; L i fi ; L l fl ; +C 103 ; WX 500 ; N g ; B 8 -206 472 441 ; +C 104 ; WX 500 ; N h ; B 19 -9 478 683 ; +C 105 ; WX 278 ; N i ; B 49 -11 264 654 ; +C 106 ; WX 278 ; N j ; B -124 -207 276 654 ; +C 107 ; WX 444 ; N k ; B 14 -11 461 683 ; +C 108 ; WX 278 ; N l ; B 41 -11 279 683 ; +C 109 ; WX 722 ; N m ; B 12 -9 704 441 ; +C 110 ; WX 500 ; N n ; B 14 -9 474 441 ; +C 111 ; WX 500 ; N o ; B 27 -11 468 441 ; +C 112 ; WX 500 ; N p ; B -75 -205 469 441 ; +C 113 ; WX 500 ; N q ; B 25 -209 483 441 ; +C 114 ; WX 389 ; N r ; B 45 0 412 441 ; +C 115 ; WX 389 ; N s ; B 16 -13 366 442 ; +C 116 ; WX 278 ; N t ; B 37 -11 296 546 ; +C 117 ; WX 500 ; N u ; B 42 -11 475 441 ; +C 118 ; WX 444 ; N v ; B 21 -18 426 441 ; +C 119 ; WX 667 ; N w ; B 16 -18 648 441 ; +C 120 ; WX 444 ; N x ; B -27 -11 447 441 ; +C 121 ; WX 444 ; N y ; B -24 -206 426 441 ; +C 122 ; WX 389 ; N z ; B -2 -81 380 428 ; +C 123 ; WX 400 ; N braceleft ; B 51 -177 407 687 ; +C 124 ; WX 275 ; N bar ; B 105 -217 171 783 ; +C 125 ; WX 400 ; N braceright ; B -7 -177 349 687 ; +C 126 ; WX 541 ; N asciitilde ; B 40 183 502 323 ; +C 161 ; WX 389 ; N exclamdown ; B 59 -205 322 473 ; +C 162 ; WX 500 ; N cent ; B 77 -143 472 560 ; +C 163 ; WX 500 ; N sterling ; B 10 -6 517 670 ; +C 164 ; WX 167 ; N fraction ; B -169 -10 337 676 ; +C 165 ; WX 500 ; N yen ; B 27 0 603 653 ; +C 166 ; WX 500 ; N florin ; B 25 -182 507 682 ; +C 167 ; WX 500 ; N section ; B 53 -162 461 666 ; +C 168 ; WX 500 ; N currency ; B -22 53 522 597 ; +C 169 ; WX 214 ; N quotesingle ; B 132 421 241 666 ; +C 170 ; WX 556 ; N quotedblleft ; B 166 436 514 666 ; +C 171 ; WX 500 ; N guillemotleft ; B 53 37 445 403 ; +C 172 ; WX 333 ; N guilsinglleft ; B 51 37 281 403 ; +C 173 ; WX 333 ; N guilsinglright ; B 52 37 282 403 ; +C 174 ; WX 500 ; N fi ; B -141 -207 481 681 ; +C 175 ; WX 500 ; N fl ; B -141 -204 518 682 ; +C 177 ; WX 500 ; N endash ; B -6 197 505 243 ; +C 178 ; WX 500 ; N dagger ; B 101 -159 488 666 ; +C 179 ; WX 500 ; N daggerdbl ; B 22 -143 491 666 ; +C 180 ; WX 250 ; N periodcentered ; B 70 199 181 310 ; +C 182 ; WX 523 ; N paragraph ; B 55 -123 616 653 ; +C 183 ; WX 350 ; N bullet ; B 40 191 310 461 ; +C 184 ; WX 333 ; N quotesinglbase ; B 44 -129 183 101 ; +C 185 ; WX 556 ; N quotedblbase ; B 57 -129 405 101 ; +C 186 ; WX 556 ; N quotedblright ; B 151 436 499 666 ; +C 187 ; WX 500 ; N guillemotright ; B 55 37 447 403 ; +C 188 ; WX 889 ; N ellipsis ; B 57 -11 762 100 ; +C 189 ; WX 1000 ; N perthousand ; B 25 -19 1010 706 ; +C 191 ; WX 500 ; N questiondown ; B 28 -205 368 471 ; +C 193 ; WX 333 ; N grave ; B 121 492 311 664 ; +C 194 ; WX 333 ; N acute ; B 180 494 403 664 ; +C 195 ; WX 333 ; N circumflex ; B 91 492 385 661 ; +C 196 ; WX 333 ; N tilde ; B 100 517 427 624 ; +C 197 ; WX 333 ; N macron ; B 99 532 411 583 ; +C 198 ; WX 333 ; N breve ; B 117 492 418 650 ; +C 199 ; WX 333 ; N dotaccent ; B 207 548 305 646 ; +C 200 ; WX 333 ; N dieresis ; B 107 548 405 646 ; +C 202 ; WX 333 ; N ring ; B 155 492 355 691 ; +C 203 ; WX 333 ; N cedilla ; B -30 -217 182 0 ; +C 205 ; WX 333 ; N hungarumlaut ; B 93 494 486 664 ; +C 206 ; WX 333 ; N ogonek ; B 20 -169 203 40 ; +C 207 ; WX 333 ; N caron ; B 121 492 426 661 ; +C 208 ; WX 889 ; N emdash ; B -6 197 894 243 ; +C 225 ; WX 889 ; N AE ; B -27 0 911 653 ; +C 227 ; WX 276 ; N ordfeminine ; B 42 406 352 676 ; +C 232 ; WX 556 ; N Lslash ; B -8 0 559 653 ; +C 233 ; WX 722 ; N Oslash ; B 60 -105 699 722 ; +C 234 ; WX 944 ; N OE ; B 49 -8 964 666 ; +C 235 ; WX 310 ; N ordmasculine ; B 67 406 362 676 ; +C 241 ; WX 667 ; N ae ; B 23 -11 640 441 ; +C 245 ; WX 278 ; N dotlessi ; B 49 -11 235 441 ; +C 248 ; WX 278 ; N lslash ; B 41 -11 312 683 ; +C 249 ; WX 500 ; N oslash ; B 28 -135 469 554 ; +C 250 ; WX 667 ; N oe ; B 20 -12 646 441 ; +C 251 ; WX 500 ; N germandbls ; B -168 -207 493 679 ; +C -1 ; WX 333 ; N Idieresis ; B -8 0 435 818 ; +C -1 ; WX 444 ; N eacute ; B 31 -11 459 664 ; +C -1 ; WX 500 ; N abreve ; B 17 -11 502 650 ; +C -1 ; WX 500 ; N uhungarumlaut ; B 42 -11 580 664 ; +C -1 ; WX 444 ; N ecaron ; B 31 -11 482 661 ; +C -1 ; WX 556 ; N Ydieresis ; B 78 0 633 818 ; +C -1 ; WX 675 ; N divide ; B 86 -11 590 517 ; +C -1 ; WX 556 ; N Yacute ; B 78 0 633 876 ; +C -1 ; WX 611 ; N Acircumflex ; B -51 0 564 873 ; +C -1 ; WX 500 ; N aacute ; B 17 -11 487 664 ; +C -1 ; WX 722 ; N Ucircumflex ; B 102 -18 765 873 ; +C -1 ; WX 444 ; N yacute ; B -24 -206 459 664 ; +C -1 ; WX 389 ; N scommaaccent ; B 16 -217 366 442 ; +C -1 ; WX 444 ; N ecircumflex ; B 31 -11 441 661 ; +C -1 ; WX 722 ; N Uring ; B 102 -18 765 883 ; +C -1 ; WX 722 ; N Udieresis ; B 102 -18 765 818 ; +C -1 ; WX 500 ; N aogonek ; B 17 -169 476 441 ; +C -1 ; WX 722 ; N Uacute ; B 102 -18 765 876 ; +C -1 ; WX 500 ; N uogonek ; B 42 -169 477 441 ; +C -1 ; WX 611 ; N Edieresis ; B -1 0 634 818 ; +C -1 ; WX 722 ; N Dcroat ; B -8 0 700 653 ; +C -1 ; WX 250 ; N commaaccent ; B 8 -217 133 -50 ; +C -1 ; WX 760 ; N copyright ; B 41 -18 719 666 ; +C -1 ; WX 611 ; N Emacron ; B -1 0 634 795 ; +C -1 ; WX 444 ; N ccaron ; B 30 -11 482 661 ; +C -1 ; WX 500 ; N aring ; B 17 -11 476 691 ; +C -1 ; WX 667 ; N Ncommaaccent ; B -20 -187 727 653 ; +C -1 ; WX 278 ; N lacute ; B 41 -11 395 876 ; +C -1 ; WX 500 ; N agrave ; B 17 -11 476 664 ; +C -1 ; WX 556 ; N Tcommaaccent ; B 59 -217 633 653 ; +C -1 ; WX 667 ; N Cacute ; B 66 -18 690 876 ; +C -1 ; WX 500 ; N atilde ; B 17 -11 511 624 ; +C -1 ; WX 611 ; N Edotaccent ; B -1 0 634 818 ; +C -1 ; WX 389 ; N scaron ; B 16 -13 454 661 ; +C -1 ; WX 389 ; N scedilla ; B 16 -217 366 442 ; +C -1 ; WX 278 ; N iacute ; B 49 -11 355 664 ; +C -1 ; WX 471 ; N lozenge ; B 13 0 459 724 ; +C -1 ; WX 611 ; N Rcaron ; B -13 0 588 873 ; +C -1 ; WX 722 ; N Gcommaaccent ; B 52 -217 722 666 ; +C -1 ; WX 500 ; N ucircumflex ; B 42 -11 475 661 ; +C -1 ; WX 500 ; N acircumflex ; B 17 -11 476 661 ; +C -1 ; WX 611 ; N Amacron ; B -51 0 564 795 ; +C -1 ; WX 389 ; N rcaron ; B 45 0 434 661 ; +C -1 ; WX 444 ; N ccedilla ; B 30 -217 425 441 ; +C -1 ; WX 556 ; N Zdotaccent ; B -6 0 606 818 ; +C -1 ; WX 611 ; N Thorn ; B 0 0 569 653 ; +C -1 ; WX 722 ; N Omacron ; B 60 -18 699 795 ; +C -1 ; WX 611 ; N Racute ; B -13 0 588 876 ; +C -1 ; WX 500 ; N Sacute ; B 17 -18 508 876 ; +C -1 ; WX 544 ; N dcaron ; B 15 -13 658 683 ; +C -1 ; WX 722 ; N Umacron ; B 102 -18 765 795 ; +C -1 ; WX 500 ; N uring ; B 42 -11 475 691 ; +C -1 ; WX 300 ; N threesuperior ; B 43 268 339 676 ; +C -1 ; WX 722 ; N Ograve ; B 60 -18 699 876 ; +C -1 ; WX 611 ; N Agrave ; B -51 0 564 876 ; +C -1 ; WX 611 ; N Abreve ; B -51 0 564 862 ; +C -1 ; WX 675 ; N multiply ; B 93 8 582 497 ; +C -1 ; WX 500 ; N uacute ; B 42 -11 477 664 ; +C -1 ; WX 556 ; N Tcaron ; B 59 0 633 873 ; +C -1 ; WX 476 ; N partialdiff ; B 17 -38 459 710 ; +C -1 ; WX 444 ; N ydieresis ; B -24 -206 441 606 ; +C -1 ; WX 667 ; N Nacute ; B -20 -15 727 876 ; +C -1 ; WX 278 ; N icircumflex ; B 33 -11 327 661 ; +C -1 ; WX 611 ; N Ecircumflex ; B -1 0 634 873 ; +C -1 ; WX 500 ; N adieresis ; B 17 -11 489 606 ; +C -1 ; WX 444 ; N edieresis ; B 31 -11 451 606 ; +C -1 ; WX 444 ; N cacute ; B 30 -11 459 664 ; +C -1 ; WX 500 ; N nacute ; B 14 -9 477 664 ; +C -1 ; WX 500 ; N umacron ; B 42 -11 485 583 ; +C -1 ; WX 667 ; N Ncaron ; B -20 -15 727 873 ; +C -1 ; WX 333 ; N Iacute ; B -8 0 433 876 ; +C -1 ; WX 675 ; N plusminus ; B 86 0 590 506 ; +C -1 ; WX 275 ; N brokenbar ; B 105 -142 171 708 ; +C -1 ; WX 760 ; N registered ; B 41 -18 719 666 ; +C -1 ; WX 722 ; N Gbreve ; B 52 -18 722 862 ; +C -1 ; WX 333 ; N Idotaccent ; B -8 0 384 818 ; +C -1 ; WX 600 ; N summation ; B 15 -10 585 706 ; +C -1 ; WX 611 ; N Egrave ; B -1 0 634 876 ; +C -1 ; WX 389 ; N racute ; B 45 0 431 664 ; +C -1 ; WX 500 ; N omacron ; B 27 -11 495 583 ; +C -1 ; WX 556 ; N Zacute ; B -6 0 606 876 ; +C -1 ; WX 556 ; N Zcaron ; B -6 0 606 873 ; +C -1 ; WX 549 ; N greaterequal ; B 26 0 523 658 ; +C -1 ; WX 722 ; N Eth ; B -8 0 700 653 ; +C -1 ; WX 667 ; N Ccedilla ; B 66 -217 689 666 ; +C -1 ; WX 278 ; N lcommaaccent ; B 22 -217 279 683 ; +C -1 ; WX 300 ; N tcaron ; B 37 -11 407 681 ; +C -1 ; WX 444 ; N eogonek ; B 31 -169 412 441 ; +C -1 ; WX 722 ; N Uogonek ; B 102 -184 765 653 ; +C -1 ; WX 611 ; N Aacute ; B -51 0 564 876 ; +C -1 ; WX 611 ; N Adieresis ; B -51 0 564 818 ; +C -1 ; WX 444 ; N egrave ; B 31 -11 412 664 ; +C -1 ; WX 389 ; N zacute ; B -2 -81 431 664 ; +C -1 ; WX 278 ; N iogonek ; B 49 -169 264 654 ; +C -1 ; WX 722 ; N Oacute ; B 60 -18 699 876 ; +C -1 ; WX 500 ; N oacute ; B 27 -11 487 664 ; +C -1 ; WX 500 ; N amacron ; B 17 -11 495 583 ; +C -1 ; WX 389 ; N sacute ; B 16 -13 431 664 ; +C -1 ; WX 278 ; N idieresis ; B 49 -11 352 606 ; +C -1 ; WX 722 ; N Ocircumflex ; B 60 -18 699 873 ; +C -1 ; WX 722 ; N Ugrave ; B 102 -18 765 876 ; +C -1 ; WX 612 ; N Delta ; B 6 0 608 688 ; +C -1 ; WX 500 ; N thorn ; B -75 -205 469 683 ; +C -1 ; WX 300 ; N twosuperior ; B 33 271 324 676 ; +C -1 ; WX 722 ; N Odieresis ; B 60 -18 699 818 ; +C -1 ; WX 500 ; N mu ; B -30 -209 497 428 ; +C -1 ; WX 278 ; N igrave ; B 49 -11 284 664 ; +C -1 ; WX 500 ; N ohungarumlaut ; B 27 -11 590 664 ; +C -1 ; WX 611 ; N Eogonek ; B -1 -169 634 653 ; +C -1 ; WX 500 ; N dcroat ; B 15 -13 572 683 ; +C -1 ; WX 750 ; N threequarters ; B 23 -10 736 676 ; +C -1 ; WX 500 ; N Scedilla ; B 17 -217 508 667 ; +C -1 ; WX 300 ; N lcaron ; B 41 -11 407 683 ; +C -1 ; WX 667 ; N Kcommaaccent ; B 7 -217 722 653 ; +C -1 ; WX 556 ; N Lacute ; B -8 0 559 876 ; +C -1 ; WX 980 ; N trademark ; B 30 247 957 653 ; +C -1 ; WX 444 ; N edotaccent ; B 31 -11 412 606 ; +C -1 ; WX 333 ; N Igrave ; B -8 0 384 876 ; +C -1 ; WX 333 ; N Imacron ; B -8 0 441 795 ; +C -1 ; WX 611 ; N Lcaron ; B -8 0 586 653 ; +C -1 ; WX 750 ; N onehalf ; B 34 -10 749 676 ; +C -1 ; WX 549 ; N lessequal ; B 26 0 523 658 ; +C -1 ; WX 500 ; N ocircumflex ; B 27 -11 468 661 ; +C -1 ; WX 500 ; N ntilde ; B 14 -9 476 624 ; +C -1 ; WX 722 ; N Uhungarumlaut ; B 102 -18 765 876 ; +C -1 ; WX 611 ; N Eacute ; B -1 0 634 876 ; +C -1 ; WX 444 ; N emacron ; B 31 -11 457 583 ; +C -1 ; WX 500 ; N gbreve ; B 8 -206 487 650 ; +C -1 ; WX 750 ; N onequarter ; B 33 -10 736 676 ; +C -1 ; WX 500 ; N Scaron ; B 17 -18 520 873 ; +C -1 ; WX 500 ; N Scommaaccent ; B 17 -217 508 667 ; +C -1 ; WX 722 ; N Ohungarumlaut ; B 60 -18 699 876 ; +C -1 ; WX 400 ; N degree ; B 101 390 387 676 ; +C -1 ; WX 500 ; N ograve ; B 27 -11 468 664 ; +C -1 ; WX 667 ; N Ccaron ; B 66 -18 689 873 ; +C -1 ; WX 500 ; N ugrave ; B 42 -11 475 664 ; +C -1 ; WX 453 ; N radical ; B 2 -60 452 768 ; +C -1 ; WX 722 ; N Dcaron ; B -8 0 700 873 ; +C -1 ; WX 389 ; N rcommaaccent ; B -3 -217 412 441 ; +C -1 ; WX 667 ; N Ntilde ; B -20 -15 727 836 ; +C -1 ; WX 500 ; N otilde ; B 27 -11 496 624 ; +C -1 ; WX 611 ; N Rcommaaccent ; B -13 -187 588 653 ; +C -1 ; WX 556 ; N Lcommaaccent ; B -8 -217 559 653 ; +C -1 ; WX 611 ; N Atilde ; B -51 0 566 836 ; +C -1 ; WX 611 ; N Aogonek ; B -51 -169 566 668 ; +C -1 ; WX 611 ; N Aring ; B -51 0 564 883 ; +C -1 ; WX 722 ; N Otilde ; B 60 -18 699 836 ; +C -1 ; WX 389 ; N zdotaccent ; B -2 -81 380 606 ; +C -1 ; WX 611 ; N Ecaron ; B -1 0 634 873 ; +C -1 ; WX 333 ; N Iogonek ; B -8 -169 384 653 ; +C -1 ; WX 444 ; N kcommaaccent ; B 14 -187 461 683 ; +C -1 ; WX 675 ; N minus ; B 86 220 590 286 ; +C -1 ; WX 333 ; N Icircumflex ; B -8 0 425 873 ; +C -1 ; WX 500 ; N ncaron ; B 14 -9 510 661 ; +C -1 ; WX 278 ; N tcommaaccent ; B 2 -217 296 546 ; +C -1 ; WX 675 ; N logicalnot ; B 86 108 590 386 ; +C -1 ; WX 500 ; N odieresis ; B 27 -11 489 606 ; +C -1 ; WX 500 ; N udieresis ; B 42 -11 479 606 ; +C -1 ; WX 549 ; N notequal ; B 12 -29 537 541 ; +C -1 ; WX 500 ; N gcommaaccent ; B 8 -206 472 706 ; +C -1 ; WX 500 ; N eth ; B 27 -11 482 683 ; +C -1 ; WX 389 ; N zcaron ; B -2 -81 434 661 ; +C -1 ; WX 500 ; N ncommaaccent ; B 14 -187 474 441 ; +C -1 ; WX 300 ; N onesuperior ; B 43 271 284 676 ; +C -1 ; WX 278 ; N imacron ; B 46 -11 311 583 ; +C -1 ; WX 500 ; N Euro ; B 0 0 0 0 ; +EndCharMetrics +StartKernData +StartKernPairs 2321 +KPX A C -30 +KPX A Cacute -30 +KPX A Ccaron -30 +KPX A Ccedilla -30 +KPX A G -35 +KPX A Gbreve -35 +KPX A Gcommaaccent -35 +KPX A O -40 +KPX A Oacute -40 +KPX A Ocircumflex -40 +KPX A Odieresis -40 +KPX A Ograve -40 +KPX A Ohungarumlaut -40 +KPX A Omacron -40 +KPX A Oslash -40 +KPX A Otilde -40 +KPX A Q -40 +KPX A T -37 +KPX A Tcaron -37 +KPX A Tcommaaccent -37 +KPX A U -50 +KPX A Uacute -50 +KPX A Ucircumflex -50 +KPX A Udieresis -50 +KPX A Ugrave -50 +KPX A Uhungarumlaut -50 +KPX A Umacron -50 +KPX A Uogonek -50 +KPX A Uring -50 +KPX A V -105 +KPX A W -95 +KPX A Y -55 +KPX A Yacute -55 +KPX A Ydieresis -55 +KPX A quoteright -37 +KPX A u -20 +KPX A uacute -20 +KPX A ucircumflex -20 +KPX A udieresis -20 +KPX A ugrave -20 +KPX A uhungarumlaut -20 +KPX A umacron -20 +KPX A uogonek -20 +KPX A uring -20 +KPX A v -55 +KPX A w -55 +KPX A y -55 +KPX A yacute -55 +KPX A ydieresis -55 +KPX Aacute C -30 +KPX Aacute Cacute -30 +KPX Aacute Ccaron -30 +KPX Aacute Ccedilla -30 +KPX Aacute G -35 +KPX Aacute Gbreve -35 +KPX Aacute Gcommaaccent -35 +KPX Aacute O -40 +KPX Aacute Oacute -40 +KPX Aacute Ocircumflex -40 +KPX Aacute Odieresis -40 +KPX Aacute Ograve -40 +KPX Aacute Ohungarumlaut -40 +KPX Aacute Omacron -40 +KPX Aacute Oslash -40 +KPX Aacute Otilde -40 +KPX Aacute Q -40 +KPX Aacute T -37 +KPX Aacute Tcaron -37 +KPX Aacute Tcommaaccent -37 +KPX Aacute U -50 +KPX Aacute Uacute -50 +KPX Aacute Ucircumflex -50 +KPX Aacute Udieresis -50 +KPX Aacute Ugrave -50 +KPX Aacute Uhungarumlaut -50 +KPX Aacute Umacron -50 +KPX Aacute Uogonek -50 +KPX Aacute Uring -50 +KPX Aacute V -105 +KPX Aacute W -95 +KPX Aacute Y -55 +KPX Aacute Yacute -55 +KPX Aacute Ydieresis -55 +KPX Aacute quoteright -37 +KPX Aacute u -20 +KPX Aacute uacute -20 +KPX Aacute ucircumflex -20 +KPX Aacute udieresis -20 +KPX Aacute ugrave -20 +KPX Aacute uhungarumlaut -20 +KPX Aacute umacron -20 +KPX Aacute uogonek -20 +KPX Aacute uring -20 +KPX Aacute v -55 +KPX Aacute w -55 +KPX Aacute y -55 +KPX Aacute yacute -55 +KPX Aacute ydieresis -55 +KPX Abreve C -30 +KPX Abreve Cacute -30 +KPX Abreve Ccaron -30 +KPX Abreve Ccedilla -30 +KPX Abreve G -35 +KPX Abreve Gbreve -35 +KPX Abreve Gcommaaccent -35 +KPX Abreve O -40 +KPX Abreve Oacute -40 +KPX Abreve Ocircumflex -40 +KPX Abreve Odieresis -40 +KPX Abreve Ograve -40 +KPX Abreve Ohungarumlaut -40 +KPX Abreve Omacron -40 +KPX Abreve Oslash -40 +KPX Abreve Otilde -40 +KPX Abreve Q -40 +KPX Abreve T -37 +KPX Abreve Tcaron -37 +KPX Abreve Tcommaaccent -37 +KPX Abreve U -50 +KPX Abreve Uacute -50 +KPX Abreve Ucircumflex -50 +KPX Abreve Udieresis -50 +KPX Abreve Ugrave -50 +KPX Abreve Uhungarumlaut -50 +KPX Abreve Umacron -50 +KPX Abreve Uogonek -50 +KPX Abreve Uring -50 +KPX Abreve V -105 +KPX Abreve W -95 +KPX Abreve Y -55 +KPX Abreve Yacute -55 +KPX Abreve Ydieresis -55 +KPX Abreve quoteright -37 +KPX Abreve u -20 +KPX Abreve uacute -20 +KPX Abreve ucircumflex -20 +KPX Abreve udieresis -20 +KPX Abreve ugrave -20 +KPX Abreve uhungarumlaut -20 +KPX Abreve umacron -20 +KPX Abreve uogonek -20 +KPX Abreve uring -20 +KPX Abreve v -55 +KPX Abreve w -55 +KPX Abreve y -55 +KPX Abreve yacute -55 +KPX Abreve ydieresis -55 +KPX Acircumflex C -30 +KPX Acircumflex Cacute -30 +KPX Acircumflex Ccaron -30 +KPX Acircumflex Ccedilla -30 +KPX Acircumflex G -35 +KPX Acircumflex Gbreve -35 +KPX Acircumflex Gcommaaccent -35 +KPX Acircumflex O -40 +KPX Acircumflex Oacute -40 +KPX Acircumflex Ocircumflex -40 +KPX Acircumflex Odieresis -40 +KPX Acircumflex Ograve -40 +KPX Acircumflex Ohungarumlaut -40 +KPX Acircumflex Omacron -40 +KPX Acircumflex Oslash -40 +KPX Acircumflex Otilde -40 +KPX Acircumflex Q -40 +KPX Acircumflex T -37 +KPX Acircumflex Tcaron -37 +KPX Acircumflex Tcommaaccent -37 +KPX Acircumflex U -50 +KPX Acircumflex Uacute -50 +KPX Acircumflex Ucircumflex -50 +KPX Acircumflex Udieresis -50 +KPX Acircumflex Ugrave -50 +KPX Acircumflex Uhungarumlaut -50 +KPX Acircumflex Umacron -50 +KPX Acircumflex Uogonek -50 +KPX Acircumflex Uring -50 +KPX Acircumflex V -105 +KPX Acircumflex W -95 +KPX Acircumflex Y -55 +KPX Acircumflex Yacute -55 +KPX Acircumflex Ydieresis -55 +KPX Acircumflex quoteright -37 +KPX Acircumflex u -20 +KPX Acircumflex uacute -20 +KPX Acircumflex ucircumflex -20 +KPX Acircumflex udieresis -20 +KPX Acircumflex ugrave -20 +KPX Acircumflex uhungarumlaut -20 +KPX Acircumflex umacron -20 +KPX Acircumflex uogonek -20 +KPX Acircumflex uring -20 +KPX Acircumflex v -55 +KPX Acircumflex w -55 +KPX Acircumflex y -55 +KPX Acircumflex yacute -55 +KPX Acircumflex ydieresis -55 +KPX Adieresis C -30 +KPX Adieresis Cacute -30 +KPX Adieresis Ccaron -30 +KPX Adieresis Ccedilla -30 +KPX Adieresis G -35 +KPX Adieresis Gbreve -35 +KPX Adieresis Gcommaaccent -35 +KPX Adieresis O -40 +KPX Adieresis Oacute -40 +KPX Adieresis Ocircumflex -40 +KPX Adieresis Odieresis -40 +KPX Adieresis Ograve -40 +KPX Adieresis Ohungarumlaut -40 +KPX Adieresis Omacron -40 +KPX Adieresis Oslash -40 +KPX Adieresis Otilde -40 +KPX Adieresis Q -40 +KPX Adieresis T -37 +KPX Adieresis Tcaron -37 +KPX Adieresis Tcommaaccent -37 +KPX Adieresis U -50 +KPX Adieresis Uacute -50 +KPX Adieresis Ucircumflex -50 +KPX Adieresis Udieresis -50 +KPX Adieresis Ugrave -50 +KPX Adieresis Uhungarumlaut -50 +KPX Adieresis Umacron -50 +KPX Adieresis Uogonek -50 +KPX Adieresis Uring -50 +KPX Adieresis V -105 +KPX Adieresis W -95 +KPX Adieresis Y -55 +KPX Adieresis Yacute -55 +KPX Adieresis Ydieresis -55 +KPX Adieresis quoteright -37 +KPX Adieresis u -20 +KPX Adieresis uacute -20 +KPX Adieresis ucircumflex -20 +KPX Adieresis udieresis -20 +KPX Adieresis ugrave -20 +KPX Adieresis uhungarumlaut -20 +KPX Adieresis umacron -20 +KPX Adieresis uogonek -20 +KPX Adieresis uring -20 +KPX Adieresis v -55 +KPX Adieresis w -55 +KPX Adieresis y -55 +KPX Adieresis yacute -55 +KPX Adieresis ydieresis -55 +KPX Agrave C -30 +KPX Agrave Cacute -30 +KPX Agrave Ccaron -30 +KPX Agrave Ccedilla -30 +KPX Agrave G -35 +KPX Agrave Gbreve -35 +KPX Agrave Gcommaaccent -35 +KPX Agrave O -40 +KPX Agrave Oacute -40 +KPX Agrave Ocircumflex -40 +KPX Agrave Odieresis -40 +KPX Agrave Ograve -40 +KPX Agrave Ohungarumlaut -40 +KPX Agrave Omacron -40 +KPX Agrave Oslash -40 +KPX Agrave Otilde -40 +KPX Agrave Q -40 +KPX Agrave T -37 +KPX Agrave Tcaron -37 +KPX Agrave Tcommaaccent -37 +KPX Agrave U -50 +KPX Agrave Uacute -50 +KPX Agrave Ucircumflex -50 +KPX Agrave Udieresis -50 +KPX Agrave Ugrave -50 +KPX Agrave Uhungarumlaut -50 +KPX Agrave Umacron -50 +KPX Agrave Uogonek -50 +KPX Agrave Uring -50 +KPX Agrave V -105 +KPX Agrave W -95 +KPX Agrave Y -55 +KPX Agrave Yacute -55 +KPX Agrave Ydieresis -55 +KPX Agrave quoteright -37 +KPX Agrave u -20 +KPX Agrave uacute -20 +KPX Agrave ucircumflex -20 +KPX Agrave udieresis -20 +KPX Agrave ugrave -20 +KPX Agrave uhungarumlaut -20 +KPX Agrave umacron -20 +KPX Agrave uogonek -20 +KPX Agrave uring -20 +KPX Agrave v -55 +KPX Agrave w -55 +KPX Agrave y -55 +KPX Agrave yacute -55 +KPX Agrave ydieresis -55 +KPX Amacron C -30 +KPX Amacron Cacute -30 +KPX Amacron Ccaron -30 +KPX Amacron Ccedilla -30 +KPX Amacron G -35 +KPX Amacron Gbreve -35 +KPX Amacron Gcommaaccent -35 +KPX Amacron O -40 +KPX Amacron Oacute -40 +KPX Amacron Ocircumflex -40 +KPX Amacron Odieresis -40 +KPX Amacron Ograve -40 +KPX Amacron Ohungarumlaut -40 +KPX Amacron Omacron -40 +KPX Amacron Oslash -40 +KPX Amacron Otilde -40 +KPX Amacron Q -40 +KPX Amacron T -37 +KPX Amacron Tcaron -37 +KPX Amacron Tcommaaccent -37 +KPX Amacron U -50 +KPX Amacron Uacute -50 +KPX Amacron Ucircumflex -50 +KPX Amacron Udieresis -50 +KPX Amacron Ugrave -50 +KPX Amacron Uhungarumlaut -50 +KPX Amacron Umacron -50 +KPX Amacron Uogonek -50 +KPX Amacron Uring -50 +KPX Amacron V -105 +KPX Amacron W -95 +KPX Amacron Y -55 +KPX Amacron Yacute -55 +KPX Amacron Ydieresis -55 +KPX Amacron quoteright -37 +KPX Amacron u -20 +KPX Amacron uacute -20 +KPX Amacron ucircumflex -20 +KPX Amacron udieresis -20 +KPX Amacron ugrave -20 +KPX Amacron uhungarumlaut -20 +KPX Amacron umacron -20 +KPX Amacron uogonek -20 +KPX Amacron uring -20 +KPX Amacron v -55 +KPX Amacron w -55 +KPX Amacron y -55 +KPX Amacron yacute -55 +KPX Amacron ydieresis -55 +KPX Aogonek C -30 +KPX Aogonek Cacute -30 +KPX Aogonek Ccaron -30 +KPX Aogonek Ccedilla -30 +KPX Aogonek G -35 +KPX Aogonek Gbreve -35 +KPX Aogonek Gcommaaccent -35 +KPX Aogonek O -40 +KPX Aogonek Oacute -40 +KPX Aogonek Ocircumflex -40 +KPX Aogonek Odieresis -40 +KPX Aogonek Ograve -40 +KPX Aogonek Ohungarumlaut -40 +KPX Aogonek Omacron -40 +KPX Aogonek Oslash -40 +KPX Aogonek Otilde -40 +KPX Aogonek Q -40 +KPX Aogonek T -37 +KPX Aogonek Tcaron -37 +KPX Aogonek Tcommaaccent -37 +KPX Aogonek U -50 +KPX Aogonek Uacute -50 +KPX Aogonek Ucircumflex -50 +KPX Aogonek Udieresis -50 +KPX Aogonek Ugrave -50 +KPX Aogonek Uhungarumlaut -50 +KPX Aogonek Umacron -50 +KPX Aogonek Uogonek -50 +KPX Aogonek Uring -50 +KPX Aogonek V -105 +KPX Aogonek W -95 +KPX Aogonek Y -55 +KPX Aogonek Yacute -55 +KPX Aogonek Ydieresis -55 +KPX Aogonek quoteright -37 +KPX Aogonek u -20 +KPX Aogonek uacute -20 +KPX Aogonek ucircumflex -20 +KPX Aogonek udieresis -20 +KPX Aogonek ugrave -20 +KPX Aogonek uhungarumlaut -20 +KPX Aogonek umacron -20 +KPX Aogonek uogonek -20 +KPX Aogonek uring -20 +KPX Aogonek v -55 +KPX Aogonek w -55 +KPX Aogonek y -55 +KPX Aogonek yacute -55 +KPX Aogonek ydieresis -55 +KPX Aring C -30 +KPX Aring Cacute -30 +KPX Aring Ccaron -30 +KPX Aring Ccedilla -30 +KPX Aring G -35 +KPX Aring Gbreve -35 +KPX Aring Gcommaaccent -35 +KPX Aring O -40 +KPX Aring Oacute -40 +KPX Aring Ocircumflex -40 +KPX Aring Odieresis -40 +KPX Aring Ograve -40 +KPX Aring Ohungarumlaut -40 +KPX Aring Omacron -40 +KPX Aring Oslash -40 +KPX Aring Otilde -40 +KPX Aring Q -40 +KPX Aring T -37 +KPX Aring Tcaron -37 +KPX Aring Tcommaaccent -37 +KPX Aring U -50 +KPX Aring Uacute -50 +KPX Aring Ucircumflex -50 +KPX Aring Udieresis -50 +KPX Aring Ugrave -50 +KPX Aring Uhungarumlaut -50 +KPX Aring Umacron -50 +KPX Aring Uogonek -50 +KPX Aring Uring -50 +KPX Aring V -105 +KPX Aring W -95 +KPX Aring Y -55 +KPX Aring Yacute -55 +KPX Aring Ydieresis -55 +KPX Aring quoteright -37 +KPX Aring u -20 +KPX Aring uacute -20 +KPX Aring ucircumflex -20 +KPX Aring udieresis -20 +KPX Aring ugrave -20 +KPX Aring uhungarumlaut -20 +KPX Aring umacron -20 +KPX Aring uogonek -20 +KPX Aring uring -20 +KPX Aring v -55 +KPX Aring w -55 +KPX Aring y -55 +KPX Aring yacute -55 +KPX Aring ydieresis -55 +KPX Atilde C -30 +KPX Atilde Cacute -30 +KPX Atilde Ccaron -30 +KPX Atilde Ccedilla -30 +KPX Atilde G -35 +KPX Atilde Gbreve -35 +KPX Atilde Gcommaaccent -35 +KPX Atilde O -40 +KPX Atilde Oacute -40 +KPX Atilde Ocircumflex -40 +KPX Atilde Odieresis -40 +KPX Atilde Ograve -40 +KPX Atilde Ohungarumlaut -40 +KPX Atilde Omacron -40 +KPX Atilde Oslash -40 +KPX Atilde Otilde -40 +KPX Atilde Q -40 +KPX Atilde T -37 +KPX Atilde Tcaron -37 +KPX Atilde Tcommaaccent -37 +KPX Atilde U -50 +KPX Atilde Uacute -50 +KPX Atilde Ucircumflex -50 +KPX Atilde Udieresis -50 +KPX Atilde Ugrave -50 +KPX Atilde Uhungarumlaut -50 +KPX Atilde Umacron -50 +KPX Atilde Uogonek -50 +KPX Atilde Uring -50 +KPX Atilde V -105 +KPX Atilde W -95 +KPX Atilde Y -55 +KPX Atilde Yacute -55 +KPX Atilde Ydieresis -55 +KPX Atilde quoteright -37 +KPX Atilde u -20 +KPX Atilde uacute -20 +KPX Atilde ucircumflex -20 +KPX Atilde udieresis -20 +KPX Atilde ugrave -20 +KPX Atilde uhungarumlaut -20 +KPX Atilde umacron -20 +KPX Atilde uogonek -20 +KPX Atilde uring -20 +KPX Atilde v -55 +KPX Atilde w -55 +KPX Atilde y -55 +KPX Atilde yacute -55 +KPX Atilde ydieresis -55 +KPX B A -25 +KPX B Aacute -25 +KPX B Abreve -25 +KPX B Acircumflex -25 +KPX B Adieresis -25 +KPX B Agrave -25 +KPX B Amacron -25 +KPX B Aogonek -25 +KPX B Aring -25 +KPX B Atilde -25 +KPX B U -10 +KPX B Uacute -10 +KPX B Ucircumflex -10 +KPX B Udieresis -10 +KPX B Ugrave -10 +KPX B Uhungarumlaut -10 +KPX B Umacron -10 +KPX B Uogonek -10 +KPX B Uring -10 +KPX D A -35 +KPX D Aacute -35 +KPX D Abreve -35 +KPX D Acircumflex -35 +KPX D Adieresis -35 +KPX D Agrave -35 +KPX D Amacron -35 +KPX D Aogonek -35 +KPX D Aring -35 +KPX D Atilde -35 +KPX D V -40 +KPX D W -40 +KPX D Y -40 +KPX D Yacute -40 +KPX D Ydieresis -40 +KPX Dcaron A -35 +KPX Dcaron Aacute -35 +KPX Dcaron Abreve -35 +KPX Dcaron Acircumflex -35 +KPX Dcaron Adieresis -35 +KPX Dcaron Agrave -35 +KPX Dcaron Amacron -35 +KPX Dcaron Aogonek -35 +KPX Dcaron Aring -35 +KPX Dcaron Atilde -35 +KPX Dcaron V -40 +KPX Dcaron W -40 +KPX Dcaron Y -40 +KPX Dcaron Yacute -40 +KPX Dcaron Ydieresis -40 +KPX Dcroat A -35 +KPX Dcroat Aacute -35 +KPX Dcroat Abreve -35 +KPX Dcroat Acircumflex -35 +KPX Dcroat Adieresis -35 +KPX Dcroat Agrave -35 +KPX Dcroat Amacron -35 +KPX Dcroat Aogonek -35 +KPX Dcroat Aring -35 +KPX Dcroat Atilde -35 +KPX Dcroat V -40 +KPX Dcroat W -40 +KPX Dcroat Y -40 +KPX Dcroat Yacute -40 +KPX Dcroat Ydieresis -40 +KPX F A -115 +KPX F Aacute -115 +KPX F Abreve -115 +KPX F Acircumflex -115 +KPX F Adieresis -115 +KPX F Agrave -115 +KPX F Amacron -115 +KPX F Aogonek -115 +KPX F Aring -115 +KPX F Atilde -115 +KPX F a -75 +KPX F aacute -75 +KPX F abreve -75 +KPX F acircumflex -75 +KPX F adieresis -75 +KPX F agrave -75 +KPX F amacron -75 +KPX F aogonek -75 +KPX F aring -75 +KPX F atilde -75 +KPX F comma -135 +KPX F e -75 +KPX F eacute -75 +KPX F ecaron -75 +KPX F ecircumflex -75 +KPX F edieresis -75 +KPX F edotaccent -75 +KPX F egrave -75 +KPX F emacron -75 +KPX F eogonek -75 +KPX F i -45 +KPX F iacute -45 +KPX F icircumflex -45 +KPX F idieresis -45 +KPX F igrave -45 +KPX F imacron -45 +KPX F iogonek -45 +KPX F o -105 +KPX F oacute -105 +KPX F ocircumflex -105 +KPX F odieresis -105 +KPX F ograve -105 +KPX F ohungarumlaut -105 +KPX F omacron -105 +KPX F oslash -105 +KPX F otilde -105 +KPX F period -135 +KPX F r -55 +KPX F racute -55 +KPX F rcaron -55 +KPX F rcommaaccent -55 +KPX J A -40 +KPX J Aacute -40 +KPX J Abreve -40 +KPX J Acircumflex -40 +KPX J Adieresis -40 +KPX J Agrave -40 +KPX J Amacron -40 +KPX J Aogonek -40 +KPX J Aring -40 +KPX J Atilde -40 +KPX J a -35 +KPX J aacute -35 +KPX J abreve -35 +KPX J acircumflex -35 +KPX J adieresis -35 +KPX J agrave -35 +KPX J amacron -35 +KPX J aogonek -35 +KPX J aring -35 +KPX J atilde -35 +KPX J comma -25 +KPX J e -25 +KPX J eacute -25 +KPX J ecaron -25 +KPX J ecircumflex -25 +KPX J edieresis -25 +KPX J edotaccent -25 +KPX J egrave -25 +KPX J emacron -25 +KPX J eogonek -25 +KPX J o -25 +KPX J oacute -25 +KPX J ocircumflex -25 +KPX J odieresis -25 +KPX J ograve -25 +KPX J ohungarumlaut -25 +KPX J omacron -25 +KPX J oslash -25 +KPX J otilde -25 +KPX J period -25 +KPX J u -35 +KPX J uacute -35 +KPX J ucircumflex -35 +KPX J udieresis -35 +KPX J ugrave -35 +KPX J uhungarumlaut -35 +KPX J umacron -35 +KPX J uogonek -35 +KPX J uring -35 +KPX K O -50 +KPX K Oacute -50 +KPX K Ocircumflex -50 +KPX K Odieresis -50 +KPX K Ograve -50 +KPX K Ohungarumlaut -50 +KPX K Omacron -50 +KPX K Oslash -50 +KPX K Otilde -50 +KPX K e -35 +KPX K eacute -35 +KPX K ecaron -35 +KPX K ecircumflex -35 +KPX K edieresis -35 +KPX K edotaccent -35 +KPX K egrave -35 +KPX K emacron -35 +KPX K eogonek -35 +KPX K o -40 +KPX K oacute -40 +KPX K ocircumflex -40 +KPX K odieresis -40 +KPX K ograve -40 +KPX K ohungarumlaut -40 +KPX K omacron -40 +KPX K oslash -40 +KPX K otilde -40 +KPX K u -40 +KPX K uacute -40 +KPX K ucircumflex -40 +KPX K udieresis -40 +KPX K ugrave -40 +KPX K uhungarumlaut -40 +KPX K umacron -40 +KPX K uogonek -40 +KPX K uring -40 +KPX K y -40 +KPX K yacute -40 +KPX K ydieresis -40 +KPX Kcommaaccent O -50 +KPX Kcommaaccent Oacute -50 +KPX Kcommaaccent Ocircumflex -50 +KPX Kcommaaccent Odieresis -50 +KPX Kcommaaccent Ograve -50 +KPX Kcommaaccent Ohungarumlaut -50 +KPX Kcommaaccent Omacron -50 +KPX Kcommaaccent Oslash -50 +KPX Kcommaaccent Otilde -50 +KPX Kcommaaccent e -35 +KPX Kcommaaccent eacute -35 +KPX Kcommaaccent ecaron -35 +KPX Kcommaaccent ecircumflex -35 +KPX Kcommaaccent edieresis -35 +KPX Kcommaaccent edotaccent -35 +KPX Kcommaaccent egrave -35 +KPX Kcommaaccent emacron -35 +KPX Kcommaaccent eogonek -35 +KPX Kcommaaccent o -40 +KPX Kcommaaccent oacute -40 +KPX Kcommaaccent ocircumflex -40 +KPX Kcommaaccent odieresis -40 +KPX Kcommaaccent ograve -40 +KPX Kcommaaccent ohungarumlaut -40 +KPX Kcommaaccent omacron -40 +KPX Kcommaaccent oslash -40 +KPX Kcommaaccent otilde -40 +KPX Kcommaaccent u -40 +KPX Kcommaaccent uacute -40 +KPX Kcommaaccent ucircumflex -40 +KPX Kcommaaccent udieresis -40 +KPX Kcommaaccent ugrave -40 +KPX Kcommaaccent uhungarumlaut -40 +KPX Kcommaaccent umacron -40 +KPX Kcommaaccent uogonek -40 +KPX Kcommaaccent uring -40 +KPX Kcommaaccent y -40 +KPX Kcommaaccent yacute -40 +KPX Kcommaaccent ydieresis -40 +KPX L T -20 +KPX L Tcaron -20 +KPX L Tcommaaccent -20 +KPX L V -55 +KPX L W -55 +KPX L Y -20 +KPX L Yacute -20 +KPX L Ydieresis -20 +KPX L quoteright -37 +KPX L y -30 +KPX L yacute -30 +KPX L ydieresis -30 +KPX Lacute T -20 +KPX Lacute Tcaron -20 +KPX Lacute Tcommaaccent -20 +KPX Lacute V -55 +KPX Lacute W -55 +KPX Lacute Y -20 +KPX Lacute Yacute -20 +KPX Lacute Ydieresis -20 +KPX Lacute quoteright -37 +KPX Lacute y -30 +KPX Lacute yacute -30 +KPX Lacute ydieresis -30 +KPX Lcommaaccent T -20 +KPX Lcommaaccent Tcaron -20 +KPX Lcommaaccent Tcommaaccent -20 +KPX Lcommaaccent V -55 +KPX Lcommaaccent W -55 +KPX Lcommaaccent Y -20 +KPX Lcommaaccent Yacute -20 +KPX Lcommaaccent Ydieresis -20 +KPX Lcommaaccent quoteright -37 +KPX Lcommaaccent y -30 +KPX Lcommaaccent yacute -30 +KPX Lcommaaccent ydieresis -30 +KPX Lslash T -20 +KPX Lslash Tcaron -20 +KPX Lslash Tcommaaccent -20 +KPX Lslash V -55 +KPX Lslash W -55 +KPX Lslash Y -20 +KPX Lslash Yacute -20 +KPX Lslash Ydieresis -20 +KPX Lslash quoteright -37 +KPX Lslash y -30 +KPX Lslash yacute -30 +KPX Lslash ydieresis -30 +KPX N A -27 +KPX N Aacute -27 +KPX N Abreve -27 +KPX N Acircumflex -27 +KPX N Adieresis -27 +KPX N Agrave -27 +KPX N Amacron -27 +KPX N Aogonek -27 +KPX N Aring -27 +KPX N Atilde -27 +KPX Nacute A -27 +KPX Nacute Aacute -27 +KPX Nacute Abreve -27 +KPX Nacute Acircumflex -27 +KPX Nacute Adieresis -27 +KPX Nacute Agrave -27 +KPX Nacute Amacron -27 +KPX Nacute Aogonek -27 +KPX Nacute Aring -27 +KPX Nacute Atilde -27 +KPX Ncaron A -27 +KPX Ncaron Aacute -27 +KPX Ncaron Abreve -27 +KPX Ncaron Acircumflex -27 +KPX Ncaron Adieresis -27 +KPX Ncaron Agrave -27 +KPX Ncaron Amacron -27 +KPX Ncaron Aogonek -27 +KPX Ncaron Aring -27 +KPX Ncaron Atilde -27 +KPX Ncommaaccent A -27 +KPX Ncommaaccent Aacute -27 +KPX Ncommaaccent Abreve -27 +KPX Ncommaaccent Acircumflex -27 +KPX Ncommaaccent Adieresis -27 +KPX Ncommaaccent Agrave -27 +KPX Ncommaaccent Amacron -27 +KPX Ncommaaccent Aogonek -27 +KPX Ncommaaccent Aring -27 +KPX Ncommaaccent Atilde -27 +KPX Ntilde A -27 +KPX Ntilde Aacute -27 +KPX Ntilde Abreve -27 +KPX Ntilde Acircumflex -27 +KPX Ntilde Adieresis -27 +KPX Ntilde Agrave -27 +KPX Ntilde Amacron -27 +KPX Ntilde Aogonek -27 +KPX Ntilde Aring -27 +KPX Ntilde Atilde -27 +KPX O A -55 +KPX O Aacute -55 +KPX O Abreve -55 +KPX O Acircumflex -55 +KPX O Adieresis -55 +KPX O Agrave -55 +KPX O Amacron -55 +KPX O Aogonek -55 +KPX O Aring -55 +KPX O Atilde -55 +KPX O T -40 +KPX O Tcaron -40 +KPX O Tcommaaccent -40 +KPX O V -50 +KPX O W -50 +KPX O X -40 +KPX O Y -50 +KPX O Yacute -50 +KPX O Ydieresis -50 +KPX Oacute A -55 +KPX Oacute Aacute -55 +KPX Oacute Abreve -55 +KPX Oacute Acircumflex -55 +KPX Oacute Adieresis -55 +KPX Oacute Agrave -55 +KPX Oacute Amacron -55 +KPX Oacute Aogonek -55 +KPX Oacute Aring -55 +KPX Oacute Atilde -55 +KPX Oacute T -40 +KPX Oacute Tcaron -40 +KPX Oacute Tcommaaccent -40 +KPX Oacute V -50 +KPX Oacute W -50 +KPX Oacute X -40 +KPX Oacute Y -50 +KPX Oacute Yacute -50 +KPX Oacute Ydieresis -50 +KPX Ocircumflex A -55 +KPX Ocircumflex Aacute -55 +KPX Ocircumflex Abreve -55 +KPX Ocircumflex Acircumflex -55 +KPX Ocircumflex Adieresis -55 +KPX Ocircumflex Agrave -55 +KPX Ocircumflex Amacron -55 +KPX Ocircumflex Aogonek -55 +KPX Ocircumflex Aring -55 +KPX Ocircumflex Atilde -55 +KPX Ocircumflex T -40 +KPX Ocircumflex Tcaron -40 +KPX Ocircumflex Tcommaaccent -40 +KPX Ocircumflex V -50 +KPX Ocircumflex W -50 +KPX Ocircumflex X -40 +KPX Ocircumflex Y -50 +KPX Ocircumflex Yacute -50 +KPX Ocircumflex Ydieresis -50 +KPX Odieresis A -55 +KPX Odieresis Aacute -55 +KPX Odieresis Abreve -55 +KPX Odieresis Acircumflex -55 +KPX Odieresis Adieresis -55 +KPX Odieresis Agrave -55 +KPX Odieresis Amacron -55 +KPX Odieresis Aogonek -55 +KPX Odieresis Aring -55 +KPX Odieresis Atilde -55 +KPX Odieresis T -40 +KPX Odieresis Tcaron -40 +KPX Odieresis Tcommaaccent -40 +KPX Odieresis V -50 +KPX Odieresis W -50 +KPX Odieresis X -40 +KPX Odieresis Y -50 +KPX Odieresis Yacute -50 +KPX Odieresis Ydieresis -50 +KPX Ograve A -55 +KPX Ograve Aacute -55 +KPX Ograve Abreve -55 +KPX Ograve Acircumflex -55 +KPX Ograve Adieresis -55 +KPX Ograve Agrave -55 +KPX Ograve Amacron -55 +KPX Ograve Aogonek -55 +KPX Ograve Aring -55 +KPX Ograve Atilde -55 +KPX Ograve T -40 +KPX Ograve Tcaron -40 +KPX Ograve Tcommaaccent -40 +KPX Ograve V -50 +KPX Ograve W -50 +KPX Ograve X -40 +KPX Ograve Y -50 +KPX Ograve Yacute -50 +KPX Ograve Ydieresis -50 +KPX Ohungarumlaut A -55 +KPX Ohungarumlaut Aacute -55 +KPX Ohungarumlaut Abreve -55 +KPX Ohungarumlaut Acircumflex -55 +KPX Ohungarumlaut Adieresis -55 +KPX Ohungarumlaut Agrave -55 +KPX Ohungarumlaut Amacron -55 +KPX Ohungarumlaut Aogonek -55 +KPX Ohungarumlaut Aring -55 +KPX Ohungarumlaut Atilde -55 +KPX Ohungarumlaut T -40 +KPX Ohungarumlaut Tcaron -40 +KPX Ohungarumlaut Tcommaaccent -40 +KPX Ohungarumlaut V -50 +KPX Ohungarumlaut W -50 +KPX Ohungarumlaut X -40 +KPX Ohungarumlaut Y -50 +KPX Ohungarumlaut Yacute -50 +KPX Ohungarumlaut Ydieresis -50 +KPX Omacron A -55 +KPX Omacron Aacute -55 +KPX Omacron Abreve -55 +KPX Omacron Acircumflex -55 +KPX Omacron Adieresis -55 +KPX Omacron Agrave -55 +KPX Omacron Amacron -55 +KPX Omacron Aogonek -55 +KPX Omacron Aring -55 +KPX Omacron Atilde -55 +KPX Omacron T -40 +KPX Omacron Tcaron -40 +KPX Omacron Tcommaaccent -40 +KPX Omacron V -50 +KPX Omacron W -50 +KPX Omacron X -40 +KPX Omacron Y -50 +KPX Omacron Yacute -50 +KPX Omacron Ydieresis -50 +KPX Oslash A -55 +KPX Oslash Aacute -55 +KPX Oslash Abreve -55 +KPX Oslash Acircumflex -55 +KPX Oslash Adieresis -55 +KPX Oslash Agrave -55 +KPX Oslash Amacron -55 +KPX Oslash Aogonek -55 +KPX Oslash Aring -55 +KPX Oslash Atilde -55 +KPX Oslash T -40 +KPX Oslash Tcaron -40 +KPX Oslash Tcommaaccent -40 +KPX Oslash V -50 +KPX Oslash W -50 +KPX Oslash X -40 +KPX Oslash Y -50 +KPX Oslash Yacute -50 +KPX Oslash Ydieresis -50 +KPX Otilde A -55 +KPX Otilde Aacute -55 +KPX Otilde Abreve -55 +KPX Otilde Acircumflex -55 +KPX Otilde Adieresis -55 +KPX Otilde Agrave -55 +KPX Otilde Amacron -55 +KPX Otilde Aogonek -55 +KPX Otilde Aring -55 +KPX Otilde Atilde -55 +KPX Otilde T -40 +KPX Otilde Tcaron -40 +KPX Otilde Tcommaaccent -40 +KPX Otilde V -50 +KPX Otilde W -50 +KPX Otilde X -40 +KPX Otilde Y -50 +KPX Otilde Yacute -50 +KPX Otilde Ydieresis -50 +KPX P A -90 +KPX P Aacute -90 +KPX P Abreve -90 +KPX P Acircumflex -90 +KPX P Adieresis -90 +KPX P Agrave -90 +KPX P Amacron -90 +KPX P Aogonek -90 +KPX P Aring -90 +KPX P Atilde -90 +KPX P a -80 +KPX P aacute -80 +KPX P abreve -80 +KPX P acircumflex -80 +KPX P adieresis -80 +KPX P agrave -80 +KPX P amacron -80 +KPX P aogonek -80 +KPX P aring -80 +KPX P atilde -80 +KPX P comma -135 +KPX P e -80 +KPX P eacute -80 +KPX P ecaron -80 +KPX P ecircumflex -80 +KPX P edieresis -80 +KPX P edotaccent -80 +KPX P egrave -80 +KPX P emacron -80 +KPX P eogonek -80 +KPX P o -80 +KPX P oacute -80 +KPX P ocircumflex -80 +KPX P odieresis -80 +KPX P ograve -80 +KPX P ohungarumlaut -80 +KPX P omacron -80 +KPX P oslash -80 +KPX P otilde -80 +KPX P period -135 +KPX Q U -10 +KPX Q Uacute -10 +KPX Q Ucircumflex -10 +KPX Q Udieresis -10 +KPX Q Ugrave -10 +KPX Q Uhungarumlaut -10 +KPX Q Umacron -10 +KPX Q Uogonek -10 +KPX Q Uring -10 +KPX R O -40 +KPX R Oacute -40 +KPX R Ocircumflex -40 +KPX R Odieresis -40 +KPX R Ograve -40 +KPX R Ohungarumlaut -40 +KPX R Omacron -40 +KPX R Oslash -40 +KPX R Otilde -40 +KPX R U -40 +KPX R Uacute -40 +KPX R Ucircumflex -40 +KPX R Udieresis -40 +KPX R Ugrave -40 +KPX R Uhungarumlaut -40 +KPX R Umacron -40 +KPX R Uogonek -40 +KPX R Uring -40 +KPX R V -18 +KPX R W -18 +KPX R Y -18 +KPX R Yacute -18 +KPX R Ydieresis -18 +KPX Racute O -40 +KPX Racute Oacute -40 +KPX Racute Ocircumflex -40 +KPX Racute Odieresis -40 +KPX Racute Ograve -40 +KPX Racute Ohungarumlaut -40 +KPX Racute Omacron -40 +KPX Racute Oslash -40 +KPX Racute Otilde -40 +KPX Racute U -40 +KPX Racute Uacute -40 +KPX Racute Ucircumflex -40 +KPX Racute Udieresis -40 +KPX Racute Ugrave -40 +KPX Racute Uhungarumlaut -40 +KPX Racute Umacron -40 +KPX Racute Uogonek -40 +KPX Racute Uring -40 +KPX Racute V -18 +KPX Racute W -18 +KPX Racute Y -18 +KPX Racute Yacute -18 +KPX Racute Ydieresis -18 +KPX Rcaron O -40 +KPX Rcaron Oacute -40 +KPX Rcaron Ocircumflex -40 +KPX Rcaron Odieresis -40 +KPX Rcaron Ograve -40 +KPX Rcaron Ohungarumlaut -40 +KPX Rcaron Omacron -40 +KPX Rcaron Oslash -40 +KPX Rcaron Otilde -40 +KPX Rcaron U -40 +KPX Rcaron Uacute -40 +KPX Rcaron Ucircumflex -40 +KPX Rcaron Udieresis -40 +KPX Rcaron Ugrave -40 +KPX Rcaron Uhungarumlaut -40 +KPX Rcaron Umacron -40 +KPX Rcaron Uogonek -40 +KPX Rcaron Uring -40 +KPX Rcaron V -18 +KPX Rcaron W -18 +KPX Rcaron Y -18 +KPX Rcaron Yacute -18 +KPX Rcaron Ydieresis -18 +KPX Rcommaaccent O -40 +KPX Rcommaaccent Oacute -40 +KPX Rcommaaccent Ocircumflex -40 +KPX Rcommaaccent Odieresis -40 +KPX Rcommaaccent Ograve -40 +KPX Rcommaaccent Ohungarumlaut -40 +KPX Rcommaaccent Omacron -40 +KPX Rcommaaccent Oslash -40 +KPX Rcommaaccent Otilde -40 +KPX Rcommaaccent U -40 +KPX Rcommaaccent Uacute -40 +KPX Rcommaaccent Ucircumflex -40 +KPX Rcommaaccent Udieresis -40 +KPX Rcommaaccent Ugrave -40 +KPX Rcommaaccent Uhungarumlaut -40 +KPX Rcommaaccent Umacron -40 +KPX Rcommaaccent Uogonek -40 +KPX Rcommaaccent Uring -40 +KPX Rcommaaccent V -18 +KPX Rcommaaccent W -18 +KPX Rcommaaccent Y -18 +KPX Rcommaaccent Yacute -18 +KPX Rcommaaccent Ydieresis -18 +KPX T A -50 +KPX T Aacute -50 +KPX T Abreve -50 +KPX T Acircumflex -50 +KPX T Adieresis -50 +KPX T Agrave -50 +KPX T Amacron -50 +KPX T Aogonek -50 +KPX T Aring -50 +KPX T Atilde -50 +KPX T O -18 +KPX T Oacute -18 +KPX T Ocircumflex -18 +KPX T Odieresis -18 +KPX T Ograve -18 +KPX T Ohungarumlaut -18 +KPX T Omacron -18 +KPX T Oslash -18 +KPX T Otilde -18 +KPX T a -92 +KPX T aacute -92 +KPX T abreve -92 +KPX T acircumflex -92 +KPX T adieresis -92 +KPX T agrave -92 +KPX T amacron -92 +KPX T aogonek -92 +KPX T aring -92 +KPX T atilde -92 +KPX T colon -55 +KPX T comma -74 +KPX T e -92 +KPX T eacute -92 +KPX T ecaron -92 +KPX T ecircumflex -52 +KPX T edieresis -52 +KPX T edotaccent -92 +KPX T egrave -52 +KPX T emacron -52 +KPX T eogonek -92 +KPX T hyphen -74 +KPX T i -55 +KPX T iacute -55 +KPX T iogonek -55 +KPX T o -92 +KPX T oacute -92 +KPX T ocircumflex -92 +KPX T odieresis -92 +KPX T ograve -92 +KPX T ohungarumlaut -92 +KPX T omacron -92 +KPX T oslash -92 +KPX T otilde -92 +KPX T period -74 +KPX T r -55 +KPX T racute -55 +KPX T rcaron -55 +KPX T rcommaaccent -55 +KPX T semicolon -65 +KPX T u -55 +KPX T uacute -55 +KPX T ucircumflex -55 +KPX T udieresis -55 +KPX T ugrave -55 +KPX T uhungarumlaut -55 +KPX T umacron -55 +KPX T uogonek -55 +KPX T uring -55 +KPX T w -74 +KPX T y -74 +KPX T yacute -74 +KPX T ydieresis -34 +KPX Tcaron A -50 +KPX Tcaron Aacute -50 +KPX Tcaron Abreve -50 +KPX Tcaron Acircumflex -50 +KPX Tcaron Adieresis -50 +KPX Tcaron Agrave -50 +KPX Tcaron Amacron -50 +KPX Tcaron Aogonek -50 +KPX Tcaron Aring -50 +KPX Tcaron Atilde -50 +KPX Tcaron O -18 +KPX Tcaron Oacute -18 +KPX Tcaron Ocircumflex -18 +KPX Tcaron Odieresis -18 +KPX Tcaron Ograve -18 +KPX Tcaron Ohungarumlaut -18 +KPX Tcaron Omacron -18 +KPX Tcaron Oslash -18 +KPX Tcaron Otilde -18 +KPX Tcaron a -92 +KPX Tcaron aacute -92 +KPX Tcaron abreve -92 +KPX Tcaron acircumflex -92 +KPX Tcaron adieresis -92 +KPX Tcaron agrave -92 +KPX Tcaron amacron -92 +KPX Tcaron aogonek -92 +KPX Tcaron aring -92 +KPX Tcaron atilde -92 +KPX Tcaron colon -55 +KPX Tcaron comma -74 +KPX Tcaron e -92 +KPX Tcaron eacute -92 +KPX Tcaron ecaron -92 +KPX Tcaron ecircumflex -52 +KPX Tcaron edieresis -52 +KPX Tcaron edotaccent -92 +KPX Tcaron egrave -52 +KPX Tcaron emacron -52 +KPX Tcaron eogonek -92 +KPX Tcaron hyphen -74 +KPX Tcaron i -55 +KPX Tcaron iacute -55 +KPX Tcaron iogonek -55 +KPX Tcaron o -92 +KPX Tcaron oacute -92 +KPX Tcaron ocircumflex -92 +KPX Tcaron odieresis -92 +KPX Tcaron ograve -92 +KPX Tcaron ohungarumlaut -92 +KPX Tcaron omacron -92 +KPX Tcaron oslash -92 +KPX Tcaron otilde -92 +KPX Tcaron period -74 +KPX Tcaron r -55 +KPX Tcaron racute -55 +KPX Tcaron rcaron -55 +KPX Tcaron rcommaaccent -55 +KPX Tcaron semicolon -65 +KPX Tcaron u -55 +KPX Tcaron uacute -55 +KPX Tcaron ucircumflex -55 +KPX Tcaron udieresis -55 +KPX Tcaron ugrave -55 +KPX Tcaron uhungarumlaut -55 +KPX Tcaron umacron -55 +KPX Tcaron uogonek -55 +KPX Tcaron uring -55 +KPX Tcaron w -74 +KPX Tcaron y -74 +KPX Tcaron yacute -74 +KPX Tcaron ydieresis -34 +KPX Tcommaaccent A -50 +KPX Tcommaaccent Aacute -50 +KPX Tcommaaccent Abreve -50 +KPX Tcommaaccent Acircumflex -50 +KPX Tcommaaccent Adieresis -50 +KPX Tcommaaccent Agrave -50 +KPX Tcommaaccent Amacron -50 +KPX Tcommaaccent Aogonek -50 +KPX Tcommaaccent Aring -50 +KPX Tcommaaccent Atilde -50 +KPX Tcommaaccent O -18 +KPX Tcommaaccent Oacute -18 +KPX Tcommaaccent Ocircumflex -18 +KPX Tcommaaccent Odieresis -18 +KPX Tcommaaccent Ograve -18 +KPX Tcommaaccent Ohungarumlaut -18 +KPX Tcommaaccent Omacron -18 +KPX Tcommaaccent Oslash -18 +KPX Tcommaaccent Otilde -18 +KPX Tcommaaccent a -92 +KPX Tcommaaccent aacute -92 +KPX Tcommaaccent abreve -92 +KPX Tcommaaccent acircumflex -92 +KPX Tcommaaccent adieresis -92 +KPX Tcommaaccent agrave -92 +KPX Tcommaaccent amacron -92 +KPX Tcommaaccent aogonek -92 +KPX Tcommaaccent aring -92 +KPX Tcommaaccent atilde -92 +KPX Tcommaaccent colon -55 +KPX Tcommaaccent comma -74 +KPX Tcommaaccent e -92 +KPX Tcommaaccent eacute -92 +KPX Tcommaaccent ecaron -92 +KPX Tcommaaccent ecircumflex -52 +KPX Tcommaaccent edieresis -52 +KPX Tcommaaccent edotaccent -92 +KPX Tcommaaccent egrave -52 +KPX Tcommaaccent emacron -52 +KPX Tcommaaccent eogonek -92 +KPX Tcommaaccent hyphen -74 +KPX Tcommaaccent i -55 +KPX Tcommaaccent iacute -55 +KPX Tcommaaccent iogonek -55 +KPX Tcommaaccent o -92 +KPX Tcommaaccent oacute -92 +KPX Tcommaaccent ocircumflex -92 +KPX Tcommaaccent odieresis -92 +KPX Tcommaaccent ograve -92 +KPX Tcommaaccent ohungarumlaut -92 +KPX Tcommaaccent omacron -92 +KPX Tcommaaccent oslash -92 +KPX Tcommaaccent otilde -92 +KPX Tcommaaccent period -74 +KPX Tcommaaccent r -55 +KPX Tcommaaccent racute -55 +KPX Tcommaaccent rcaron -55 +KPX Tcommaaccent rcommaaccent -55 +KPX Tcommaaccent semicolon -65 +KPX Tcommaaccent u -55 +KPX Tcommaaccent uacute -55 +KPX Tcommaaccent ucircumflex -55 +KPX Tcommaaccent udieresis -55 +KPX Tcommaaccent ugrave -55 +KPX Tcommaaccent uhungarumlaut -55 +KPX Tcommaaccent umacron -55 +KPX Tcommaaccent uogonek -55 +KPX Tcommaaccent uring -55 +KPX Tcommaaccent w -74 +KPX Tcommaaccent y -74 +KPX Tcommaaccent yacute -74 +KPX Tcommaaccent ydieresis -34 +KPX U A -40 +KPX U Aacute -40 +KPX U Abreve -40 +KPX U Acircumflex -40 +KPX U Adieresis -40 +KPX U Agrave -40 +KPX U Amacron -40 +KPX U Aogonek -40 +KPX U Aring -40 +KPX U Atilde -40 +KPX U comma -25 +KPX U period -25 +KPX Uacute A -40 +KPX Uacute Aacute -40 +KPX Uacute Abreve -40 +KPX Uacute Acircumflex -40 +KPX Uacute Adieresis -40 +KPX Uacute Agrave -40 +KPX Uacute Amacron -40 +KPX Uacute Aogonek -40 +KPX Uacute Aring -40 +KPX Uacute Atilde -40 +KPX Uacute comma -25 +KPX Uacute period -25 +KPX Ucircumflex A -40 +KPX Ucircumflex Aacute -40 +KPX Ucircumflex Abreve -40 +KPX Ucircumflex Acircumflex -40 +KPX Ucircumflex Adieresis -40 +KPX Ucircumflex Agrave -40 +KPX Ucircumflex Amacron -40 +KPX Ucircumflex Aogonek -40 +KPX Ucircumflex Aring -40 +KPX Ucircumflex Atilde -40 +KPX Ucircumflex comma -25 +KPX Ucircumflex period -25 +KPX Udieresis A -40 +KPX Udieresis Aacute -40 +KPX Udieresis Abreve -40 +KPX Udieresis Acircumflex -40 +KPX Udieresis Adieresis -40 +KPX Udieresis Agrave -40 +KPX Udieresis Amacron -40 +KPX Udieresis Aogonek -40 +KPX Udieresis Aring -40 +KPX Udieresis Atilde -40 +KPX Udieresis comma -25 +KPX Udieresis period -25 +KPX Ugrave A -40 +KPX Ugrave Aacute -40 +KPX Ugrave Abreve -40 +KPX Ugrave Acircumflex -40 +KPX Ugrave Adieresis -40 +KPX Ugrave Agrave -40 +KPX Ugrave Amacron -40 +KPX Ugrave Aogonek -40 +KPX Ugrave Aring -40 +KPX Ugrave Atilde -40 +KPX Ugrave comma -25 +KPX Ugrave period -25 +KPX Uhungarumlaut A -40 +KPX Uhungarumlaut Aacute -40 +KPX Uhungarumlaut Abreve -40 +KPX Uhungarumlaut Acircumflex -40 +KPX Uhungarumlaut Adieresis -40 +KPX Uhungarumlaut Agrave -40 +KPX Uhungarumlaut Amacron -40 +KPX Uhungarumlaut Aogonek -40 +KPX Uhungarumlaut Aring -40 +KPX Uhungarumlaut Atilde -40 +KPX Uhungarumlaut comma -25 +KPX Uhungarumlaut period -25 +KPX Umacron A -40 +KPX Umacron Aacute -40 +KPX Umacron Abreve -40 +KPX Umacron Acircumflex -40 +KPX Umacron Adieresis -40 +KPX Umacron Agrave -40 +KPX Umacron Amacron -40 +KPX Umacron Aogonek -40 +KPX Umacron Aring -40 +KPX Umacron Atilde -40 +KPX Umacron comma -25 +KPX Umacron period -25 +KPX Uogonek A -40 +KPX Uogonek Aacute -40 +KPX Uogonek Abreve -40 +KPX Uogonek Acircumflex -40 +KPX Uogonek Adieresis -40 +KPX Uogonek Agrave -40 +KPX Uogonek Amacron -40 +KPX Uogonek Aogonek -40 +KPX Uogonek Aring -40 +KPX Uogonek Atilde -40 +KPX Uogonek comma -25 +KPX Uogonek period -25 +KPX Uring A -40 +KPX Uring Aacute -40 +KPX Uring Abreve -40 +KPX Uring Acircumflex -40 +KPX Uring Adieresis -40 +KPX Uring Agrave -40 +KPX Uring Amacron -40 +KPX Uring Aogonek -40 +KPX Uring Aring -40 +KPX Uring Atilde -40 +KPX Uring comma -25 +KPX Uring period -25 +KPX V A -60 +KPX V Aacute -60 +KPX V Abreve -60 +KPX V Acircumflex -60 +KPX V Adieresis -60 +KPX V Agrave -60 +KPX V Amacron -60 +KPX V Aogonek -60 +KPX V Aring -60 +KPX V Atilde -60 +KPX V O -30 +KPX V Oacute -30 +KPX V Ocircumflex -30 +KPX V Odieresis -30 +KPX V Ograve -30 +KPX V Ohungarumlaut -30 +KPX V Omacron -30 +KPX V Oslash -30 +KPX V Otilde -30 +KPX V a -111 +KPX V aacute -111 +KPX V abreve -111 +KPX V acircumflex -111 +KPX V adieresis -111 +KPX V agrave -111 +KPX V amacron -111 +KPX V aogonek -111 +KPX V aring -111 +KPX V atilde -111 +KPX V colon -65 +KPX V comma -129 +KPX V e -111 +KPX V eacute -111 +KPX V ecaron -111 +KPX V ecircumflex -111 +KPX V edieresis -71 +KPX V edotaccent -111 +KPX V egrave -71 +KPX V emacron -71 +KPX V eogonek -111 +KPX V hyphen -55 +KPX V i -74 +KPX V iacute -74 +KPX V icircumflex -34 +KPX V idieresis -34 +KPX V igrave -34 +KPX V imacron -34 +KPX V iogonek -74 +KPX V o -111 +KPX V oacute -111 +KPX V ocircumflex -111 +KPX V odieresis -111 +KPX V ograve -111 +KPX V ohungarumlaut -111 +KPX V omacron -111 +KPX V oslash -111 +KPX V otilde -111 +KPX V period -129 +KPX V semicolon -74 +KPX V u -74 +KPX V uacute -74 +KPX V ucircumflex -74 +KPX V udieresis -74 +KPX V ugrave -74 +KPX V uhungarumlaut -74 +KPX V umacron -74 +KPX V uogonek -74 +KPX V uring -74 +KPX W A -60 +KPX W Aacute -60 +KPX W Abreve -60 +KPX W Acircumflex -60 +KPX W Adieresis -60 +KPX W Agrave -60 +KPX W Amacron -60 +KPX W Aogonek -60 +KPX W Aring -60 +KPX W Atilde -60 +KPX W O -25 +KPX W Oacute -25 +KPX W Ocircumflex -25 +KPX W Odieresis -25 +KPX W Ograve -25 +KPX W Ohungarumlaut -25 +KPX W Omacron -25 +KPX W Oslash -25 +KPX W Otilde -25 +KPX W a -92 +KPX W aacute -92 +KPX W abreve -92 +KPX W acircumflex -92 +KPX W adieresis -92 +KPX W agrave -92 +KPX W amacron -92 +KPX W aogonek -92 +KPX W aring -92 +KPX W atilde -92 +KPX W colon -65 +KPX W comma -92 +KPX W e -92 +KPX W eacute -92 +KPX W ecaron -92 +KPX W ecircumflex -92 +KPX W edieresis -52 +KPX W edotaccent -92 +KPX W egrave -52 +KPX W emacron -52 +KPX W eogonek -92 +KPX W hyphen -37 +KPX W i -55 +KPX W iacute -55 +KPX W iogonek -55 +KPX W o -92 +KPX W oacute -92 +KPX W ocircumflex -92 +KPX W odieresis -92 +KPX W ograve -92 +KPX W ohungarumlaut -92 +KPX W omacron -92 +KPX W oslash -92 +KPX W otilde -92 +KPX W period -92 +KPX W semicolon -65 +KPX W u -55 +KPX W uacute -55 +KPX W ucircumflex -55 +KPX W udieresis -55 +KPX W ugrave -55 +KPX W uhungarumlaut -55 +KPX W umacron -55 +KPX W uogonek -55 +KPX W uring -55 +KPX W y -70 +KPX W yacute -70 +KPX W ydieresis -70 +KPX Y A -50 +KPX Y Aacute -50 +KPX Y Abreve -50 +KPX Y Acircumflex -50 +KPX Y Adieresis -50 +KPX Y Agrave -50 +KPX Y Amacron -50 +KPX Y Aogonek -50 +KPX Y Aring -50 +KPX Y Atilde -50 +KPX Y O -15 +KPX Y Oacute -15 +KPX Y Ocircumflex -15 +KPX Y Odieresis -15 +KPX Y Ograve -15 +KPX Y Ohungarumlaut -15 +KPX Y Omacron -15 +KPX Y Oslash -15 +KPX Y Otilde -15 +KPX Y a -92 +KPX Y aacute -92 +KPX Y abreve -92 +KPX Y acircumflex -92 +KPX Y adieresis -92 +KPX Y agrave -92 +KPX Y amacron -92 +KPX Y aogonek -92 +KPX Y aring -92 +KPX Y atilde -92 +KPX Y colon -65 +KPX Y comma -92 +KPX Y e -92 +KPX Y eacute -92 +KPX Y ecaron -92 +KPX Y ecircumflex -92 +KPX Y edieresis -52 +KPX Y edotaccent -92 +KPX Y egrave -52 +KPX Y emacron -52 +KPX Y eogonek -92 +KPX Y hyphen -74 +KPX Y i -74 +KPX Y iacute -74 +KPX Y icircumflex -34 +KPX Y idieresis -34 +KPX Y igrave -34 +KPX Y imacron -34 +KPX Y iogonek -74 +KPX Y o -92 +KPX Y oacute -92 +KPX Y ocircumflex -92 +KPX Y odieresis -92 +KPX Y ograve -92 +KPX Y ohungarumlaut -92 +KPX Y omacron -92 +KPX Y oslash -92 +KPX Y otilde -92 +KPX Y period -92 +KPX Y semicolon -65 +KPX Y u -92 +KPX Y uacute -92 +KPX Y ucircumflex -92 +KPX Y udieresis -92 +KPX Y ugrave -92 +KPX Y uhungarumlaut -92 +KPX Y umacron -92 +KPX Y uogonek -92 +KPX Y uring -92 +KPX Yacute A -50 +KPX Yacute Aacute -50 +KPX Yacute Abreve -50 +KPX Yacute Acircumflex -50 +KPX Yacute Adieresis -50 +KPX Yacute Agrave -50 +KPX Yacute Amacron -50 +KPX Yacute Aogonek -50 +KPX Yacute Aring -50 +KPX Yacute Atilde -50 +KPX Yacute O -15 +KPX Yacute Oacute -15 +KPX Yacute Ocircumflex -15 +KPX Yacute Odieresis -15 +KPX Yacute Ograve -15 +KPX Yacute Ohungarumlaut -15 +KPX Yacute Omacron -15 +KPX Yacute Oslash -15 +KPX Yacute Otilde -15 +KPX Yacute a -92 +KPX Yacute aacute -92 +KPX Yacute abreve -92 +KPX Yacute acircumflex -92 +KPX Yacute adieresis -92 +KPX Yacute agrave -92 +KPX Yacute amacron -92 +KPX Yacute aogonek -92 +KPX Yacute aring -92 +KPX Yacute atilde -92 +KPX Yacute colon -65 +KPX Yacute comma -92 +KPX Yacute e -92 +KPX Yacute eacute -92 +KPX Yacute ecaron -92 +KPX Yacute ecircumflex -92 +KPX Yacute edieresis -52 +KPX Yacute edotaccent -92 +KPX Yacute egrave -52 +KPX Yacute emacron -52 +KPX Yacute eogonek -92 +KPX Yacute hyphen -74 +KPX Yacute i -74 +KPX Yacute iacute -74 +KPX Yacute icircumflex -34 +KPX Yacute idieresis -34 +KPX Yacute igrave -34 +KPX Yacute imacron -34 +KPX Yacute iogonek -74 +KPX Yacute o -92 +KPX Yacute oacute -92 +KPX Yacute ocircumflex -92 +KPX Yacute odieresis -92 +KPX Yacute ograve -92 +KPX Yacute ohungarumlaut -92 +KPX Yacute omacron -92 +KPX Yacute oslash -92 +KPX Yacute otilde -92 +KPX Yacute period -92 +KPX Yacute semicolon -65 +KPX Yacute u -92 +KPX Yacute uacute -92 +KPX Yacute ucircumflex -92 +KPX Yacute udieresis -92 +KPX Yacute ugrave -92 +KPX Yacute uhungarumlaut -92 +KPX Yacute umacron -92 +KPX Yacute uogonek -92 +KPX Yacute uring -92 +KPX Ydieresis A -50 +KPX Ydieresis Aacute -50 +KPX Ydieresis Abreve -50 +KPX Ydieresis Acircumflex -50 +KPX Ydieresis Adieresis -50 +KPX Ydieresis Agrave -50 +KPX Ydieresis Amacron -50 +KPX Ydieresis Aogonek -50 +KPX Ydieresis Aring -50 +KPX Ydieresis Atilde -50 +KPX Ydieresis O -15 +KPX Ydieresis Oacute -15 +KPX Ydieresis Ocircumflex -15 +KPX Ydieresis Odieresis -15 +KPX Ydieresis Ograve -15 +KPX Ydieresis Ohungarumlaut -15 +KPX Ydieresis Omacron -15 +KPX Ydieresis Oslash -15 +KPX Ydieresis Otilde -15 +KPX Ydieresis a -92 +KPX Ydieresis aacute -92 +KPX Ydieresis abreve -92 +KPX Ydieresis acircumflex -92 +KPX Ydieresis adieresis -92 +KPX Ydieresis agrave -92 +KPX Ydieresis amacron -92 +KPX Ydieresis aogonek -92 +KPX Ydieresis aring -92 +KPX Ydieresis atilde -92 +KPX Ydieresis colon -65 +KPX Ydieresis comma -92 +KPX Ydieresis e -92 +KPX Ydieresis eacute -92 +KPX Ydieresis ecaron -92 +KPX Ydieresis ecircumflex -92 +KPX Ydieresis edieresis -52 +KPX Ydieresis edotaccent -92 +KPX Ydieresis egrave -52 +KPX Ydieresis emacron -52 +KPX Ydieresis eogonek -92 +KPX Ydieresis hyphen -74 +KPX Ydieresis i -74 +KPX Ydieresis iacute -74 +KPX Ydieresis icircumflex -34 +KPX Ydieresis idieresis -34 +KPX Ydieresis igrave -34 +KPX Ydieresis imacron -34 +KPX Ydieresis iogonek -74 +KPX Ydieresis o -92 +KPX Ydieresis oacute -92 +KPX Ydieresis ocircumflex -92 +KPX Ydieresis odieresis -92 +KPX Ydieresis ograve -92 +KPX Ydieresis ohungarumlaut -92 +KPX Ydieresis omacron -92 +KPX Ydieresis oslash -92 +KPX Ydieresis otilde -92 +KPX Ydieresis period -92 +KPX Ydieresis semicolon -65 +KPX Ydieresis u -92 +KPX Ydieresis uacute -92 +KPX Ydieresis ucircumflex -92 +KPX Ydieresis udieresis -92 +KPX Ydieresis ugrave -92 +KPX Ydieresis uhungarumlaut -92 +KPX Ydieresis umacron -92 +KPX Ydieresis uogonek -92 +KPX Ydieresis uring -92 +KPX a g -10 +KPX a gbreve -10 +KPX a gcommaaccent -10 +KPX aacute g -10 +KPX aacute gbreve -10 +KPX aacute gcommaaccent -10 +KPX abreve g -10 +KPX abreve gbreve -10 +KPX abreve gcommaaccent -10 +KPX acircumflex g -10 +KPX acircumflex gbreve -10 +KPX acircumflex gcommaaccent -10 +KPX adieresis g -10 +KPX adieresis gbreve -10 +KPX adieresis gcommaaccent -10 +KPX agrave g -10 +KPX agrave gbreve -10 +KPX agrave gcommaaccent -10 +KPX amacron g -10 +KPX amacron gbreve -10 +KPX amacron gcommaaccent -10 +KPX aogonek g -10 +KPX aogonek gbreve -10 +KPX aogonek gcommaaccent -10 +KPX aring g -10 +KPX aring gbreve -10 +KPX aring gcommaaccent -10 +KPX atilde g -10 +KPX atilde gbreve -10 +KPX atilde gcommaaccent -10 +KPX b period -40 +KPX b u -20 +KPX b uacute -20 +KPX b ucircumflex -20 +KPX b udieresis -20 +KPX b ugrave -20 +KPX b uhungarumlaut -20 +KPX b umacron -20 +KPX b uogonek -20 +KPX b uring -20 +KPX c h -15 +KPX c k -20 +KPX c kcommaaccent -20 +KPX cacute h -15 +KPX cacute k -20 +KPX cacute kcommaaccent -20 +KPX ccaron h -15 +KPX ccaron k -20 +KPX ccaron kcommaaccent -20 +KPX ccedilla h -15 +KPX ccedilla k -20 +KPX ccedilla kcommaaccent -20 +KPX comma quotedblright -140 +KPX comma quoteright -140 +KPX e comma -10 +KPX e g -40 +KPX e gbreve -40 +KPX e gcommaaccent -40 +KPX e period -15 +KPX e v -15 +KPX e w -15 +KPX e x -20 +KPX e y -30 +KPX e yacute -30 +KPX e ydieresis -30 +KPX eacute comma -10 +KPX eacute g -40 +KPX eacute gbreve -40 +KPX eacute gcommaaccent -40 +KPX eacute period -15 +KPX eacute v -15 +KPX eacute w -15 +KPX eacute x -20 +KPX eacute y -30 +KPX eacute yacute -30 +KPX eacute ydieresis -30 +KPX ecaron comma -10 +KPX ecaron g -40 +KPX ecaron gbreve -40 +KPX ecaron gcommaaccent -40 +KPX ecaron period -15 +KPX ecaron v -15 +KPX ecaron w -15 +KPX ecaron x -20 +KPX ecaron y -30 +KPX ecaron yacute -30 +KPX ecaron ydieresis -30 +KPX ecircumflex comma -10 +KPX ecircumflex g -40 +KPX ecircumflex gbreve -40 +KPX ecircumflex gcommaaccent -40 +KPX ecircumflex period -15 +KPX ecircumflex v -15 +KPX ecircumflex w -15 +KPX ecircumflex x -20 +KPX ecircumflex y -30 +KPX ecircumflex yacute -30 +KPX ecircumflex ydieresis -30 +KPX edieresis comma -10 +KPX edieresis g -40 +KPX edieresis gbreve -40 +KPX edieresis gcommaaccent -40 +KPX edieresis period -15 +KPX edieresis v -15 +KPX edieresis w -15 +KPX edieresis x -20 +KPX edieresis y -30 +KPX edieresis yacute -30 +KPX edieresis ydieresis -30 +KPX edotaccent comma -10 +KPX edotaccent g -40 +KPX edotaccent gbreve -40 +KPX edotaccent gcommaaccent -40 +KPX edotaccent period -15 +KPX edotaccent v -15 +KPX edotaccent w -15 +KPX edotaccent x -20 +KPX edotaccent y -30 +KPX edotaccent yacute -30 +KPX edotaccent ydieresis -30 +KPX egrave comma -10 +KPX egrave g -40 +KPX egrave gbreve -40 +KPX egrave gcommaaccent -40 +KPX egrave period -15 +KPX egrave v -15 +KPX egrave w -15 +KPX egrave x -20 +KPX egrave y -30 +KPX egrave yacute -30 +KPX egrave ydieresis -30 +KPX emacron comma -10 +KPX emacron g -40 +KPX emacron gbreve -40 +KPX emacron gcommaaccent -40 +KPX emacron period -15 +KPX emacron v -15 +KPX emacron w -15 +KPX emacron x -20 +KPX emacron y -30 +KPX emacron yacute -30 +KPX emacron ydieresis -30 +KPX eogonek comma -10 +KPX eogonek g -40 +KPX eogonek gbreve -40 +KPX eogonek gcommaaccent -40 +KPX eogonek period -15 +KPX eogonek v -15 +KPX eogonek w -15 +KPX eogonek x -20 +KPX eogonek y -30 +KPX eogonek yacute -30 +KPX eogonek ydieresis -30 +KPX f comma -10 +KPX f dotlessi -60 +KPX f f -18 +KPX f i -20 +KPX f iogonek -20 +KPX f period -15 +KPX f quoteright 92 +KPX g comma -10 +KPX g e -10 +KPX g eacute -10 +KPX g ecaron -10 +KPX g ecircumflex -10 +KPX g edieresis -10 +KPX g edotaccent -10 +KPX g egrave -10 +KPX g emacron -10 +KPX g eogonek -10 +KPX g g -10 +KPX g gbreve -10 +KPX g gcommaaccent -10 +KPX g period -15 +KPX gbreve comma -10 +KPX gbreve e -10 +KPX gbreve eacute -10 +KPX gbreve ecaron -10 +KPX gbreve ecircumflex -10 +KPX gbreve edieresis -10 +KPX gbreve edotaccent -10 +KPX gbreve egrave -10 +KPX gbreve emacron -10 +KPX gbreve eogonek -10 +KPX gbreve g -10 +KPX gbreve gbreve -10 +KPX gbreve gcommaaccent -10 +KPX gbreve period -15 +KPX gcommaaccent comma -10 +KPX gcommaaccent e -10 +KPX gcommaaccent eacute -10 +KPX gcommaaccent ecaron -10 +KPX gcommaaccent ecircumflex -10 +KPX gcommaaccent edieresis -10 +KPX gcommaaccent edotaccent -10 +KPX gcommaaccent egrave -10 +KPX gcommaaccent emacron -10 +KPX gcommaaccent eogonek -10 +KPX gcommaaccent g -10 +KPX gcommaaccent gbreve -10 +KPX gcommaaccent gcommaaccent -10 +KPX gcommaaccent period -15 +KPX k e -10 +KPX k eacute -10 +KPX k ecaron -10 +KPX k ecircumflex -10 +KPX k edieresis -10 +KPX k edotaccent -10 +KPX k egrave -10 +KPX k emacron -10 +KPX k eogonek -10 +KPX k o -10 +KPX k oacute -10 +KPX k ocircumflex -10 +KPX k odieresis -10 +KPX k ograve -10 +KPX k ohungarumlaut -10 +KPX k omacron -10 +KPX k oslash -10 +KPX k otilde -10 +KPX k y -10 +KPX k yacute -10 +KPX k ydieresis -10 +KPX kcommaaccent e -10 +KPX kcommaaccent eacute -10 +KPX kcommaaccent ecaron -10 +KPX kcommaaccent ecircumflex -10 +KPX kcommaaccent edieresis -10 +KPX kcommaaccent edotaccent -10 +KPX kcommaaccent egrave -10 +KPX kcommaaccent emacron -10 +KPX kcommaaccent eogonek -10 +KPX kcommaaccent o -10 +KPX kcommaaccent oacute -10 +KPX kcommaaccent ocircumflex -10 +KPX kcommaaccent odieresis -10 +KPX kcommaaccent ograve -10 +KPX kcommaaccent ohungarumlaut -10 +KPX kcommaaccent omacron -10 +KPX kcommaaccent oslash -10 +KPX kcommaaccent otilde -10 +KPX kcommaaccent y -10 +KPX kcommaaccent yacute -10 +KPX kcommaaccent ydieresis -10 +KPX n v -40 +KPX nacute v -40 +KPX ncaron v -40 +KPX ncommaaccent v -40 +KPX ntilde v -40 +KPX o g -10 +KPX o gbreve -10 +KPX o gcommaaccent -10 +KPX o v -10 +KPX oacute g -10 +KPX oacute gbreve -10 +KPX oacute gcommaaccent -10 +KPX oacute v -10 +KPX ocircumflex g -10 +KPX ocircumflex gbreve -10 +KPX ocircumflex gcommaaccent -10 +KPX ocircumflex v -10 +KPX odieresis g -10 +KPX odieresis gbreve -10 +KPX odieresis gcommaaccent -10 +KPX odieresis v -10 +KPX ograve g -10 +KPX ograve gbreve -10 +KPX ograve gcommaaccent -10 +KPX ograve v -10 +KPX ohungarumlaut g -10 +KPX ohungarumlaut gbreve -10 +KPX ohungarumlaut gcommaaccent -10 +KPX ohungarumlaut v -10 +KPX omacron g -10 +KPX omacron gbreve -10 +KPX omacron gcommaaccent -10 +KPX omacron v -10 +KPX oslash g -10 +KPX oslash gbreve -10 +KPX oslash gcommaaccent -10 +KPX oslash v -10 +KPX otilde g -10 +KPX otilde gbreve -10 +KPX otilde gcommaaccent -10 +KPX otilde v -10 +KPX period quotedblright -140 +KPX period quoteright -140 +KPX quoteleft quoteleft -111 +KPX quoteright d -25 +KPX quoteright dcroat -25 +KPX quoteright quoteright -111 +KPX quoteright r -25 +KPX quoteright racute -25 +KPX quoteright rcaron -25 +KPX quoteright rcommaaccent -25 +KPX quoteright s -40 +KPX quoteright sacute -40 +KPX quoteright scaron -40 +KPX quoteright scedilla -40 +KPX quoteright scommaaccent -40 +KPX quoteright space -111 +KPX quoteright t -30 +KPX quoteright tcommaaccent -30 +KPX quoteright v -10 +KPX r a -15 +KPX r aacute -15 +KPX r abreve -15 +KPX r acircumflex -15 +KPX r adieresis -15 +KPX r agrave -15 +KPX r amacron -15 +KPX r aogonek -15 +KPX r aring -15 +KPX r atilde -15 +KPX r c -37 +KPX r cacute -37 +KPX r ccaron -37 +KPX r ccedilla -37 +KPX r comma -111 +KPX r d -37 +KPX r dcroat -37 +KPX r e -37 +KPX r eacute -37 +KPX r ecaron -37 +KPX r ecircumflex -37 +KPX r edieresis -37 +KPX r edotaccent -37 +KPX r egrave -37 +KPX r emacron -37 +KPX r eogonek -37 +KPX r g -37 +KPX r gbreve -37 +KPX r gcommaaccent -37 +KPX r hyphen -20 +KPX r o -45 +KPX r oacute -45 +KPX r ocircumflex -45 +KPX r odieresis -45 +KPX r ograve -45 +KPX r ohungarumlaut -45 +KPX r omacron -45 +KPX r oslash -45 +KPX r otilde -45 +KPX r period -111 +KPX r q -37 +KPX r s -10 +KPX r sacute -10 +KPX r scaron -10 +KPX r scedilla -10 +KPX r scommaaccent -10 +KPX racute a -15 +KPX racute aacute -15 +KPX racute abreve -15 +KPX racute acircumflex -15 +KPX racute adieresis -15 +KPX racute agrave -15 +KPX racute amacron -15 +KPX racute aogonek -15 +KPX racute aring -15 +KPX racute atilde -15 +KPX racute c -37 +KPX racute cacute -37 +KPX racute ccaron -37 +KPX racute ccedilla -37 +KPX racute comma -111 +KPX racute d -37 +KPX racute dcroat -37 +KPX racute e -37 +KPX racute eacute -37 +KPX racute ecaron -37 +KPX racute ecircumflex -37 +KPX racute edieresis -37 +KPX racute edotaccent -37 +KPX racute egrave -37 +KPX racute emacron -37 +KPX racute eogonek -37 +KPX racute g -37 +KPX racute gbreve -37 +KPX racute gcommaaccent -37 +KPX racute hyphen -20 +KPX racute o -45 +KPX racute oacute -45 +KPX racute ocircumflex -45 +KPX racute odieresis -45 +KPX racute ograve -45 +KPX racute ohungarumlaut -45 +KPX racute omacron -45 +KPX racute oslash -45 +KPX racute otilde -45 +KPX racute period -111 +KPX racute q -37 +KPX racute s -10 +KPX racute sacute -10 +KPX racute scaron -10 +KPX racute scedilla -10 +KPX racute scommaaccent -10 +KPX rcaron a -15 +KPX rcaron aacute -15 +KPX rcaron abreve -15 +KPX rcaron acircumflex -15 +KPX rcaron adieresis -15 +KPX rcaron agrave -15 +KPX rcaron amacron -15 +KPX rcaron aogonek -15 +KPX rcaron aring -15 +KPX rcaron atilde -15 +KPX rcaron c -37 +KPX rcaron cacute -37 +KPX rcaron ccaron -37 +KPX rcaron ccedilla -37 +KPX rcaron comma -111 +KPX rcaron d -37 +KPX rcaron dcroat -37 +KPX rcaron e -37 +KPX rcaron eacute -37 +KPX rcaron ecaron -37 +KPX rcaron ecircumflex -37 +KPX rcaron edieresis -37 +KPX rcaron edotaccent -37 +KPX rcaron egrave -37 +KPX rcaron emacron -37 +KPX rcaron eogonek -37 +KPX rcaron g -37 +KPX rcaron gbreve -37 +KPX rcaron gcommaaccent -37 +KPX rcaron hyphen -20 +KPX rcaron o -45 +KPX rcaron oacute -45 +KPX rcaron ocircumflex -45 +KPX rcaron odieresis -45 +KPX rcaron ograve -45 +KPX rcaron ohungarumlaut -45 +KPX rcaron omacron -45 +KPX rcaron oslash -45 +KPX rcaron otilde -45 +KPX rcaron period -111 +KPX rcaron q -37 +KPX rcaron s -10 +KPX rcaron sacute -10 +KPX rcaron scaron -10 +KPX rcaron scedilla -10 +KPX rcaron scommaaccent -10 +KPX rcommaaccent a -15 +KPX rcommaaccent aacute -15 +KPX rcommaaccent abreve -15 +KPX rcommaaccent acircumflex -15 +KPX rcommaaccent adieresis -15 +KPX rcommaaccent agrave -15 +KPX rcommaaccent amacron -15 +KPX rcommaaccent aogonek -15 +KPX rcommaaccent aring -15 +KPX rcommaaccent atilde -15 +KPX rcommaaccent c -37 +KPX rcommaaccent cacute -37 +KPX rcommaaccent ccaron -37 +KPX rcommaaccent ccedilla -37 +KPX rcommaaccent comma -111 +KPX rcommaaccent d -37 +KPX rcommaaccent dcroat -37 +KPX rcommaaccent e -37 +KPX rcommaaccent eacute -37 +KPX rcommaaccent ecaron -37 +KPX rcommaaccent ecircumflex -37 +KPX rcommaaccent edieresis -37 +KPX rcommaaccent edotaccent -37 +KPX rcommaaccent egrave -37 +KPX rcommaaccent emacron -37 +KPX rcommaaccent eogonek -37 +KPX rcommaaccent g -37 +KPX rcommaaccent gbreve -37 +KPX rcommaaccent gcommaaccent -37 +KPX rcommaaccent hyphen -20 +KPX rcommaaccent o -45 +KPX rcommaaccent oacute -45 +KPX rcommaaccent ocircumflex -45 +KPX rcommaaccent odieresis -45 +KPX rcommaaccent ograve -45 +KPX rcommaaccent ohungarumlaut -45 +KPX rcommaaccent omacron -45 +KPX rcommaaccent oslash -45 +KPX rcommaaccent otilde -45 +KPX rcommaaccent period -111 +KPX rcommaaccent q -37 +KPX rcommaaccent s -10 +KPX rcommaaccent sacute -10 +KPX rcommaaccent scaron -10 +KPX rcommaaccent scedilla -10 +KPX rcommaaccent scommaaccent -10 +KPX space A -18 +KPX space Aacute -18 +KPX space Abreve -18 +KPX space Acircumflex -18 +KPX space Adieresis -18 +KPX space Agrave -18 +KPX space Amacron -18 +KPX space Aogonek -18 +KPX space Aring -18 +KPX space Atilde -18 +KPX space T -18 +KPX space Tcaron -18 +KPX space Tcommaaccent -18 +KPX space V -35 +KPX space W -40 +KPX space Y -75 +KPX space Yacute -75 +KPX space Ydieresis -75 +KPX v comma -74 +KPX v period -74 +KPX w comma -74 +KPX w period -74 +KPX y comma -55 +KPX y period -55 +KPX yacute comma -55 +KPX yacute period -55 +KPX ydieresis comma -55 +KPX ydieresis period -55 +EndKernPairs +EndKernData +EndFontMetrics diff --git a/pitfall/pdfkit/lib/font/data/Times-Roman.afm b/pitfall/pdfkit/lib/font/data/Times-Roman.afm new file mode 100755 index 00000000..a0953f28 --- /dev/null +++ b/pitfall/pdfkit/lib/font/data/Times-Roman.afm @@ -0,0 +1,2419 @@ +StartFontMetrics 4.1 +Comment Copyright (c) 1985, 1987, 1989, 1990, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved. +Comment Creation Date: Thu May 1 12:49:17 1997 +Comment UniqueID 43068 +Comment VMusage 43909 54934 +FontName Times-Roman +FullName Times Roman +FamilyName Times +Weight Roman +ItalicAngle 0 +IsFixedPitch false +CharacterSet ExtendedRoman +FontBBox -168 -218 1000 898 +UnderlinePosition -100 +UnderlineThickness 50 +Version 002.000 +Notice Copyright (c) 1985, 1987, 1989, 1990, 1993, 1997 Adobe Systems Incorporated. All Rights Reserved.Times is a trademark of Linotype-Hell AG and/or its subsidiaries. +EncodingScheme AdobeStandardEncoding +CapHeight 662 +XHeight 450 +Ascender 683 +Descender -217 +StdHW 28 +StdVW 84 +StartCharMetrics 315 +C 32 ; WX 250 ; N space ; B 0 0 0 0 ; +C 33 ; WX 333 ; N exclam ; B 130 -9 238 676 ; +C 34 ; WX 408 ; N quotedbl ; B 77 431 331 676 ; +C 35 ; WX 500 ; N numbersign ; B 5 0 496 662 ; +C 36 ; WX 500 ; N dollar ; B 44 -87 457 727 ; +C 37 ; WX 833 ; N percent ; B 61 -13 772 676 ; +C 38 ; WX 778 ; N ampersand ; B 42 -13 750 676 ; +C 39 ; WX 333 ; N quoteright ; B 79 433 218 676 ; +C 40 ; WX 333 ; N parenleft ; B 48 -177 304 676 ; +C 41 ; WX 333 ; N parenright ; B 29 -177 285 676 ; +C 42 ; WX 500 ; N asterisk ; B 69 265 432 676 ; +C 43 ; WX 564 ; N plus ; B 30 0 534 506 ; +C 44 ; WX 250 ; N comma ; B 56 -141 195 102 ; +C 45 ; WX 333 ; N hyphen ; B 39 194 285 257 ; +C 46 ; WX 250 ; N period ; B 70 -11 181 100 ; +C 47 ; WX 278 ; N slash ; B -9 -14 287 676 ; +C 48 ; WX 500 ; N zero ; B 24 -14 476 676 ; +C 49 ; WX 500 ; N one ; B 111 0 394 676 ; +C 50 ; WX 500 ; N two ; B 30 0 475 676 ; +C 51 ; WX 500 ; N three ; B 43 -14 431 676 ; +C 52 ; WX 500 ; N four ; B 12 0 472 676 ; +C 53 ; WX 500 ; N five ; B 32 -14 438 688 ; +C 54 ; WX 500 ; N six ; B 34 -14 468 684 ; +C 55 ; WX 500 ; N seven ; B 20 -8 449 662 ; +C 56 ; WX 500 ; N eight ; B 56 -14 445 676 ; +C 57 ; WX 500 ; N nine ; B 30 -22 459 676 ; +C 58 ; WX 278 ; N colon ; B 81 -11 192 459 ; +C 59 ; WX 278 ; N semicolon ; B 80 -141 219 459 ; +C 60 ; WX 564 ; N less ; B 28 -8 536 514 ; +C 61 ; WX 564 ; N equal ; B 30 120 534 386 ; +C 62 ; WX 564 ; N greater ; B 28 -8 536 514 ; +C 63 ; WX 444 ; N question ; B 68 -8 414 676 ; +C 64 ; WX 921 ; N at ; B 116 -14 809 676 ; +C 65 ; WX 722 ; N A ; B 15 0 706 674 ; +C 66 ; WX 667 ; N B ; B 17 0 593 662 ; +C 67 ; WX 667 ; N C ; B 28 -14 633 676 ; +C 68 ; WX 722 ; N D ; B 16 0 685 662 ; +C 69 ; WX 611 ; N E ; B 12 0 597 662 ; +C 70 ; WX 556 ; N F ; B 12 0 546 662 ; +C 71 ; WX 722 ; N G ; B 32 -14 709 676 ; +C 72 ; WX 722 ; N H ; B 19 0 702 662 ; +C 73 ; WX 333 ; N I ; B 18 0 315 662 ; +C 74 ; WX 389 ; N J ; B 10 -14 370 662 ; +C 75 ; WX 722 ; N K ; B 34 0 723 662 ; +C 76 ; WX 611 ; N L ; B 12 0 598 662 ; +C 77 ; WX 889 ; N M ; B 12 0 863 662 ; +C 78 ; WX 722 ; N N ; B 12 -11 707 662 ; +C 79 ; WX 722 ; N O ; B 34 -14 688 676 ; +C 80 ; WX 556 ; N P ; B 16 0 542 662 ; +C 81 ; WX 722 ; N Q ; B 34 -178 701 676 ; +C 82 ; WX 667 ; N R ; B 17 0 659 662 ; +C 83 ; WX 556 ; N S ; B 42 -14 491 676 ; +C 84 ; WX 611 ; N T ; B 17 0 593 662 ; +C 85 ; WX 722 ; N U ; B 14 -14 705 662 ; +C 86 ; WX 722 ; N V ; B 16 -11 697 662 ; +C 87 ; WX 944 ; N W ; B 5 -11 932 662 ; +C 88 ; WX 722 ; N X ; B 10 0 704 662 ; +C 89 ; WX 722 ; N Y ; B 22 0 703 662 ; +C 90 ; WX 611 ; N Z ; B 9 0 597 662 ; +C 91 ; WX 333 ; N bracketleft ; B 88 -156 299 662 ; +C 92 ; WX 278 ; N backslash ; B -9 -14 287 676 ; +C 93 ; WX 333 ; N bracketright ; B 34 -156 245 662 ; +C 94 ; WX 469 ; N asciicircum ; B 24 297 446 662 ; +C 95 ; WX 500 ; N underscore ; B 0 -125 500 -75 ; +C 96 ; WX 333 ; N quoteleft ; B 115 433 254 676 ; +C 97 ; WX 444 ; N a ; B 37 -10 442 460 ; +C 98 ; WX 500 ; N b ; B 3 -10 468 683 ; +C 99 ; WX 444 ; N c ; B 25 -10 412 460 ; +C 100 ; WX 500 ; N d ; B 27 -10 491 683 ; +C 101 ; WX 444 ; N e ; B 25 -10 424 460 ; +C 102 ; WX 333 ; N f ; B 20 0 383 683 ; L i fi ; L l fl ; +C 103 ; WX 500 ; N g ; B 28 -218 470 460 ; +C 104 ; WX 500 ; N h ; B 9 0 487 683 ; +C 105 ; WX 278 ; N i ; B 16 0 253 683 ; +C 106 ; WX 278 ; N j ; B -70 -218 194 683 ; +C 107 ; WX 500 ; N k ; B 7 0 505 683 ; +C 108 ; WX 278 ; N l ; B 19 0 257 683 ; +C 109 ; WX 778 ; N m ; B 16 0 775 460 ; +C 110 ; WX 500 ; N n ; B 16 0 485 460 ; +C 111 ; WX 500 ; N o ; B 29 -10 470 460 ; +C 112 ; WX 500 ; N p ; B 5 -217 470 460 ; +C 113 ; WX 500 ; N q ; B 24 -217 488 460 ; +C 114 ; WX 333 ; N r ; B 5 0 335 460 ; +C 115 ; WX 389 ; N s ; B 51 -10 348 460 ; +C 116 ; WX 278 ; N t ; B 13 -10 279 579 ; +C 117 ; WX 500 ; N u ; B 9 -10 479 450 ; +C 118 ; WX 500 ; N v ; B 19 -14 477 450 ; +C 119 ; WX 722 ; N w ; B 21 -14 694 450 ; +C 120 ; WX 500 ; N x ; B 17 0 479 450 ; +C 121 ; WX 500 ; N y ; B 14 -218 475 450 ; +C 122 ; WX 444 ; N z ; B 27 0 418 450 ; +C 123 ; WX 480 ; N braceleft ; B 100 -181 350 680 ; +C 124 ; WX 200 ; N bar ; B 67 -218 133 782 ; +C 125 ; WX 480 ; N braceright ; B 130 -181 380 680 ; +C 126 ; WX 541 ; N asciitilde ; B 40 183 502 323 ; +C 161 ; WX 333 ; N exclamdown ; B 97 -218 205 467 ; +C 162 ; WX 500 ; N cent ; B 53 -138 448 579 ; +C 163 ; WX 500 ; N sterling ; B 12 -8 490 676 ; +C 164 ; WX 167 ; N fraction ; B -168 -14 331 676 ; +C 165 ; WX 500 ; N yen ; B -53 0 512 662 ; +C 166 ; WX 500 ; N florin ; B 7 -189 490 676 ; +C 167 ; WX 500 ; N section ; B 70 -148 426 676 ; +C 168 ; WX 500 ; N currency ; B -22 58 522 602 ; +C 169 ; WX 180 ; N quotesingle ; B 48 431 133 676 ; +C 170 ; WX 444 ; N quotedblleft ; B 43 433 414 676 ; +C 171 ; WX 500 ; N guillemotleft ; B 42 33 456 416 ; +C 172 ; WX 333 ; N guilsinglleft ; B 63 33 285 416 ; +C 173 ; WX 333 ; N guilsinglright ; B 48 33 270 416 ; +C 174 ; WX 556 ; N fi ; B 31 0 521 683 ; +C 175 ; WX 556 ; N fl ; B 32 0 521 683 ; +C 177 ; WX 500 ; N endash ; B 0 201 500 250 ; +C 178 ; WX 500 ; N dagger ; B 59 -149 442 676 ; +C 179 ; WX 500 ; N daggerdbl ; B 58 -153 442 676 ; +C 180 ; WX 250 ; N periodcentered ; B 70 199 181 310 ; +C 182 ; WX 453 ; N paragraph ; B -22 -154 450 662 ; +C 183 ; WX 350 ; N bullet ; B 40 196 310 466 ; +C 184 ; WX 333 ; N quotesinglbase ; B 79 -141 218 102 ; +C 185 ; WX 444 ; N quotedblbase ; B 45 -141 416 102 ; +C 186 ; WX 444 ; N quotedblright ; B 30 433 401 676 ; +C 187 ; WX 500 ; N guillemotright ; B 44 33 458 416 ; +C 188 ; WX 1000 ; N ellipsis ; B 111 -11 888 100 ; +C 189 ; WX 1000 ; N perthousand ; B 7 -19 994 706 ; +C 191 ; WX 444 ; N questiondown ; B 30 -218 376 466 ; +C 193 ; WX 333 ; N grave ; B 19 507 242 678 ; +C 194 ; WX 333 ; N acute ; B 93 507 317 678 ; +C 195 ; WX 333 ; N circumflex ; B 11 507 322 674 ; +C 196 ; WX 333 ; N tilde ; B 1 532 331 638 ; +C 197 ; WX 333 ; N macron ; B 11 547 322 601 ; +C 198 ; WX 333 ; N breve ; B 26 507 307 664 ; +C 199 ; WX 333 ; N dotaccent ; B 118 581 216 681 ; +C 200 ; WX 333 ; N dieresis ; B 18 581 315 681 ; +C 202 ; WX 333 ; N ring ; B 67 512 266 711 ; +C 203 ; WX 333 ; N cedilla ; B 52 -215 261 0 ; +C 205 ; WX 333 ; N hungarumlaut ; B -3 507 377 678 ; +C 206 ; WX 333 ; N ogonek ; B 62 -165 243 0 ; +C 207 ; WX 333 ; N caron ; B 11 507 322 674 ; +C 208 ; WX 1000 ; N emdash ; B 0 201 1000 250 ; +C 225 ; WX 889 ; N AE ; B 0 0 863 662 ; +C 227 ; WX 276 ; N ordfeminine ; B 4 394 270 676 ; +C 232 ; WX 611 ; N Lslash ; B 12 0 598 662 ; +C 233 ; WX 722 ; N Oslash ; B 34 -80 688 734 ; +C 234 ; WX 889 ; N OE ; B 30 -6 885 668 ; +C 235 ; WX 310 ; N ordmasculine ; B 6 394 304 676 ; +C 241 ; WX 667 ; N ae ; B 38 -10 632 460 ; +C 245 ; WX 278 ; N dotlessi ; B 16 0 253 460 ; +C 248 ; WX 278 ; N lslash ; B 19 0 259 683 ; +C 249 ; WX 500 ; N oslash ; B 29 -112 470 551 ; +C 250 ; WX 722 ; N oe ; B 30 -10 690 460 ; +C 251 ; WX 500 ; N germandbls ; B 12 -9 468 683 ; +C -1 ; WX 333 ; N Idieresis ; B 18 0 315 835 ; +C -1 ; WX 444 ; N eacute ; B 25 -10 424 678 ; +C -1 ; WX 444 ; N abreve ; B 37 -10 442 664 ; +C -1 ; WX 500 ; N uhungarumlaut ; B 9 -10 501 678 ; +C -1 ; WX 444 ; N ecaron ; B 25 -10 424 674 ; +C -1 ; WX 722 ; N Ydieresis ; B 22 0 703 835 ; +C -1 ; WX 564 ; N divide ; B 30 -10 534 516 ; +C -1 ; WX 722 ; N Yacute ; B 22 0 703 890 ; +C -1 ; WX 722 ; N Acircumflex ; B 15 0 706 886 ; +C -1 ; WX 444 ; N aacute ; B 37 -10 442 678 ; +C -1 ; WX 722 ; N Ucircumflex ; B 14 -14 705 886 ; +C -1 ; WX 500 ; N yacute ; B 14 -218 475 678 ; +C -1 ; WX 389 ; N scommaaccent ; B 51 -218 348 460 ; +C -1 ; WX 444 ; N ecircumflex ; B 25 -10 424 674 ; +C -1 ; WX 722 ; N Uring ; B 14 -14 705 898 ; +C -1 ; WX 722 ; N Udieresis ; B 14 -14 705 835 ; +C -1 ; WX 444 ; N aogonek ; B 37 -165 469 460 ; +C -1 ; WX 722 ; N Uacute ; B 14 -14 705 890 ; +C -1 ; WX 500 ; N uogonek ; B 9 -155 487 450 ; +C -1 ; WX 611 ; N Edieresis ; B 12 0 597 835 ; +C -1 ; WX 722 ; N Dcroat ; B 16 0 685 662 ; +C -1 ; WX 250 ; N commaaccent ; B 59 -218 184 -50 ; +C -1 ; WX 760 ; N copyright ; B 38 -14 722 676 ; +C -1 ; WX 611 ; N Emacron ; B 12 0 597 813 ; +C -1 ; WX 444 ; N ccaron ; B 25 -10 412 674 ; +C -1 ; WX 444 ; N aring ; B 37 -10 442 711 ; +C -1 ; WX 722 ; N Ncommaaccent ; B 12 -198 707 662 ; +C -1 ; WX 278 ; N lacute ; B 19 0 290 890 ; +C -1 ; WX 444 ; N agrave ; B 37 -10 442 678 ; +C -1 ; WX 611 ; N Tcommaaccent ; B 17 -218 593 662 ; +C -1 ; WX 667 ; N Cacute ; B 28 -14 633 890 ; +C -1 ; WX 444 ; N atilde ; B 37 -10 442 638 ; +C -1 ; WX 611 ; N Edotaccent ; B 12 0 597 835 ; +C -1 ; WX 389 ; N scaron ; B 39 -10 350 674 ; +C -1 ; WX 389 ; N scedilla ; B 51 -215 348 460 ; +C -1 ; WX 278 ; N iacute ; B 16 0 290 678 ; +C -1 ; WX 471 ; N lozenge ; B 13 0 459 724 ; +C -1 ; WX 667 ; N Rcaron ; B 17 0 659 886 ; +C -1 ; WX 722 ; N Gcommaaccent ; B 32 -218 709 676 ; +C -1 ; WX 500 ; N ucircumflex ; B 9 -10 479 674 ; +C -1 ; WX 444 ; N acircumflex ; B 37 -10 442 674 ; +C -1 ; WX 722 ; N Amacron ; B 15 0 706 813 ; +C -1 ; WX 333 ; N rcaron ; B 5 0 335 674 ; +C -1 ; WX 444 ; N ccedilla ; B 25 -215 412 460 ; +C -1 ; WX 611 ; N Zdotaccent ; B 9 0 597 835 ; +C -1 ; WX 556 ; N Thorn ; B 16 0 542 662 ; +C -1 ; WX 722 ; N Omacron ; B 34 -14 688 813 ; +C -1 ; WX 667 ; N Racute ; B 17 0 659 890 ; +C -1 ; WX 556 ; N Sacute ; B 42 -14 491 890 ; +C -1 ; WX 588 ; N dcaron ; B 27 -10 589 695 ; +C -1 ; WX 722 ; N Umacron ; B 14 -14 705 813 ; +C -1 ; WX 500 ; N uring ; B 9 -10 479 711 ; +C -1 ; WX 300 ; N threesuperior ; B 15 262 291 676 ; +C -1 ; WX 722 ; N Ograve ; B 34 -14 688 890 ; +C -1 ; WX 722 ; N Agrave ; B 15 0 706 890 ; +C -1 ; WX 722 ; N Abreve ; B 15 0 706 876 ; +C -1 ; WX 564 ; N multiply ; B 38 8 527 497 ; +C -1 ; WX 500 ; N uacute ; B 9 -10 479 678 ; +C -1 ; WX 611 ; N Tcaron ; B 17 0 593 886 ; +C -1 ; WX 476 ; N partialdiff ; B 17 -38 459 710 ; +C -1 ; WX 500 ; N ydieresis ; B 14 -218 475 623 ; +C -1 ; WX 722 ; N Nacute ; B 12 -11 707 890 ; +C -1 ; WX 278 ; N icircumflex ; B -16 0 295 674 ; +C -1 ; WX 611 ; N Ecircumflex ; B 12 0 597 886 ; +C -1 ; WX 444 ; N adieresis ; B 37 -10 442 623 ; +C -1 ; WX 444 ; N edieresis ; B 25 -10 424 623 ; +C -1 ; WX 444 ; N cacute ; B 25 -10 413 678 ; +C -1 ; WX 500 ; N nacute ; B 16 0 485 678 ; +C -1 ; WX 500 ; N umacron ; B 9 -10 479 601 ; +C -1 ; WX 722 ; N Ncaron ; B 12 -11 707 886 ; +C -1 ; WX 333 ; N Iacute ; B 18 0 317 890 ; +C -1 ; WX 564 ; N plusminus ; B 30 0 534 506 ; +C -1 ; WX 200 ; N brokenbar ; B 67 -143 133 707 ; +C -1 ; WX 760 ; N registered ; B 38 -14 722 676 ; +C -1 ; WX 722 ; N Gbreve ; B 32 -14 709 876 ; +C -1 ; WX 333 ; N Idotaccent ; B 18 0 315 835 ; +C -1 ; WX 600 ; N summation ; B 15 -10 585 706 ; +C -1 ; WX 611 ; N Egrave ; B 12 0 597 890 ; +C -1 ; WX 333 ; N racute ; B 5 0 335 678 ; +C -1 ; WX 500 ; N omacron ; B 29 -10 470 601 ; +C -1 ; WX 611 ; N Zacute ; B 9 0 597 890 ; +C -1 ; WX 611 ; N Zcaron ; B 9 0 597 886 ; +C -1 ; WX 549 ; N greaterequal ; B 26 0 523 666 ; +C -1 ; WX 722 ; N Eth ; B 16 0 685 662 ; +C -1 ; WX 667 ; N Ccedilla ; B 28 -215 633 676 ; +C -1 ; WX 278 ; N lcommaaccent ; B 19 -218 257 683 ; +C -1 ; WX 326 ; N tcaron ; B 13 -10 318 722 ; +C -1 ; WX 444 ; N eogonek ; B 25 -165 424 460 ; +C -1 ; WX 722 ; N Uogonek ; B 14 -165 705 662 ; +C -1 ; WX 722 ; N Aacute ; B 15 0 706 890 ; +C -1 ; WX 722 ; N Adieresis ; B 15 0 706 835 ; +C -1 ; WX 444 ; N egrave ; B 25 -10 424 678 ; +C -1 ; WX 444 ; N zacute ; B 27 0 418 678 ; +C -1 ; WX 278 ; N iogonek ; B 16 -165 265 683 ; +C -1 ; WX 722 ; N Oacute ; B 34 -14 688 890 ; +C -1 ; WX 500 ; N oacute ; B 29 -10 470 678 ; +C -1 ; WX 444 ; N amacron ; B 37 -10 442 601 ; +C -1 ; WX 389 ; N sacute ; B 51 -10 348 678 ; +C -1 ; WX 278 ; N idieresis ; B -9 0 288 623 ; +C -1 ; WX 722 ; N Ocircumflex ; B 34 -14 688 886 ; +C -1 ; WX 722 ; N Ugrave ; B 14 -14 705 890 ; +C -1 ; WX 612 ; N Delta ; B 6 0 608 688 ; +C -1 ; WX 500 ; N thorn ; B 5 -217 470 683 ; +C -1 ; WX 300 ; N twosuperior ; B 1 270 296 676 ; +C -1 ; WX 722 ; N Odieresis ; B 34 -14 688 835 ; +C -1 ; WX 500 ; N mu ; B 36 -218 512 450 ; +C -1 ; WX 278 ; N igrave ; B -8 0 253 678 ; +C -1 ; WX 500 ; N ohungarumlaut ; B 29 -10 491 678 ; +C -1 ; WX 611 ; N Eogonek ; B 12 -165 597 662 ; +C -1 ; WX 500 ; N dcroat ; B 27 -10 500 683 ; +C -1 ; WX 750 ; N threequarters ; B 15 -14 718 676 ; +C -1 ; WX 556 ; N Scedilla ; B 42 -215 491 676 ; +C -1 ; WX 344 ; N lcaron ; B 19 0 347 695 ; +C -1 ; WX 722 ; N Kcommaaccent ; B 34 -198 723 662 ; +C -1 ; WX 611 ; N Lacute ; B 12 0 598 890 ; +C -1 ; WX 980 ; N trademark ; B 30 256 957 662 ; +C -1 ; WX 444 ; N edotaccent ; B 25 -10 424 623 ; +C -1 ; WX 333 ; N Igrave ; B 18 0 315 890 ; +C -1 ; WX 333 ; N Imacron ; B 11 0 322 813 ; +C -1 ; WX 611 ; N Lcaron ; B 12 0 598 676 ; +C -1 ; WX 750 ; N onehalf ; B 31 -14 746 676 ; +C -1 ; WX 549 ; N lessequal ; B 26 0 523 666 ; +C -1 ; WX 500 ; N ocircumflex ; B 29 -10 470 674 ; +C -1 ; WX 500 ; N ntilde ; B 16 0 485 638 ; +C -1 ; WX 722 ; N Uhungarumlaut ; B 14 -14 705 890 ; +C -1 ; WX 611 ; N Eacute ; B 12 0 597 890 ; +C -1 ; WX 444 ; N emacron ; B 25 -10 424 601 ; +C -1 ; WX 500 ; N gbreve ; B 28 -218 470 664 ; +C -1 ; WX 750 ; N onequarter ; B 37 -14 718 676 ; +C -1 ; WX 556 ; N Scaron ; B 42 -14 491 886 ; +C -1 ; WX 556 ; N Scommaaccent ; B 42 -218 491 676 ; +C -1 ; WX 722 ; N Ohungarumlaut ; B 34 -14 688 890 ; +C -1 ; WX 400 ; N degree ; B 57 390 343 676 ; +C -1 ; WX 500 ; N ograve ; B 29 -10 470 678 ; +C -1 ; WX 667 ; N Ccaron ; B 28 -14 633 886 ; +C -1 ; WX 500 ; N ugrave ; B 9 -10 479 678 ; +C -1 ; WX 453 ; N radical ; B 2 -60 452 768 ; +C -1 ; WX 722 ; N Dcaron ; B 16 0 685 886 ; +C -1 ; WX 333 ; N rcommaaccent ; B 5 -218 335 460 ; +C -1 ; WX 722 ; N Ntilde ; B 12 -11 707 850 ; +C -1 ; WX 500 ; N otilde ; B 29 -10 470 638 ; +C -1 ; WX 667 ; N Rcommaaccent ; B 17 -198 659 662 ; +C -1 ; WX 611 ; N Lcommaaccent ; B 12 -218 598 662 ; +C -1 ; WX 722 ; N Atilde ; B 15 0 706 850 ; +C -1 ; WX 722 ; N Aogonek ; B 15 -165 738 674 ; +C -1 ; WX 722 ; N Aring ; B 15 0 706 898 ; +C -1 ; WX 722 ; N Otilde ; B 34 -14 688 850 ; +C -1 ; WX 444 ; N zdotaccent ; B 27 0 418 623 ; +C -1 ; WX 611 ; N Ecaron ; B 12 0 597 886 ; +C -1 ; WX 333 ; N Iogonek ; B 18 -165 315 662 ; +C -1 ; WX 500 ; N kcommaaccent ; B 7 -218 505 683 ; +C -1 ; WX 564 ; N minus ; B 30 220 534 286 ; +C -1 ; WX 333 ; N Icircumflex ; B 11 0 322 886 ; +C -1 ; WX 500 ; N ncaron ; B 16 0 485 674 ; +C -1 ; WX 278 ; N tcommaaccent ; B 13 -218 279 579 ; +C -1 ; WX 564 ; N logicalnot ; B 30 108 534 386 ; +C -1 ; WX 500 ; N odieresis ; B 29 -10 470 623 ; +C -1 ; WX 500 ; N udieresis ; B 9 -10 479 623 ; +C -1 ; WX 549 ; N notequal ; B 12 -31 537 547 ; +C -1 ; WX 500 ; N gcommaaccent ; B 28 -218 470 749 ; +C -1 ; WX 500 ; N eth ; B 29 -10 471 686 ; +C -1 ; WX 444 ; N zcaron ; B 27 0 418 674 ; +C -1 ; WX 500 ; N ncommaaccent ; B 16 -218 485 460 ; +C -1 ; WX 300 ; N onesuperior ; B 57 270 248 676 ; +C -1 ; WX 278 ; N imacron ; B 6 0 271 601 ; +C -1 ; WX 500 ; N Euro ; B 0 0 0 0 ; +EndCharMetrics +StartKernData +StartKernPairs 2073 +KPX A C -40 +KPX A Cacute -40 +KPX A Ccaron -40 +KPX A Ccedilla -40 +KPX A G -40 +KPX A Gbreve -40 +KPX A Gcommaaccent -40 +KPX A O -55 +KPX A Oacute -55 +KPX A Ocircumflex -55 +KPX A Odieresis -55 +KPX A Ograve -55 +KPX A Ohungarumlaut -55 +KPX A Omacron -55 +KPX A Oslash -55 +KPX A Otilde -55 +KPX A Q -55 +KPX A T -111 +KPX A Tcaron -111 +KPX A Tcommaaccent -111 +KPX A U -55 +KPX A Uacute -55 +KPX A Ucircumflex -55 +KPX A Udieresis -55 +KPX A Ugrave -55 +KPX A Uhungarumlaut -55 +KPX A Umacron -55 +KPX A Uogonek -55 +KPX A Uring -55 +KPX A V -135 +KPX A W -90 +KPX A Y -105 +KPX A Yacute -105 +KPX A Ydieresis -105 +KPX A quoteright -111 +KPX A v -74 +KPX A w -92 +KPX A y -92 +KPX A yacute -92 +KPX A ydieresis -92 +KPX Aacute C -40 +KPX Aacute Cacute -40 +KPX Aacute Ccaron -40 +KPX Aacute Ccedilla -40 +KPX Aacute G -40 +KPX Aacute Gbreve -40 +KPX Aacute Gcommaaccent -40 +KPX Aacute O -55 +KPX Aacute Oacute -55 +KPX Aacute Ocircumflex -55 +KPX Aacute Odieresis -55 +KPX Aacute Ograve -55 +KPX Aacute Ohungarumlaut -55 +KPX Aacute Omacron -55 +KPX Aacute Oslash -55 +KPX Aacute Otilde -55 +KPX Aacute Q -55 +KPX Aacute T -111 +KPX Aacute Tcaron -111 +KPX Aacute Tcommaaccent -111 +KPX Aacute U -55 +KPX Aacute Uacute -55 +KPX Aacute Ucircumflex -55 +KPX Aacute Udieresis -55 +KPX Aacute Ugrave -55 +KPX Aacute Uhungarumlaut -55 +KPX Aacute Umacron -55 +KPX Aacute Uogonek -55 +KPX Aacute Uring -55 +KPX Aacute V -135 +KPX Aacute W -90 +KPX Aacute Y -105 +KPX Aacute Yacute -105 +KPX Aacute Ydieresis -105 +KPX Aacute quoteright -111 +KPX Aacute v -74 +KPX Aacute w -92 +KPX Aacute y -92 +KPX Aacute yacute -92 +KPX Aacute ydieresis -92 +KPX Abreve C -40 +KPX Abreve Cacute -40 +KPX Abreve Ccaron -40 +KPX Abreve Ccedilla -40 +KPX Abreve G -40 +KPX Abreve Gbreve -40 +KPX Abreve Gcommaaccent -40 +KPX Abreve O -55 +KPX Abreve Oacute -55 +KPX Abreve Ocircumflex -55 +KPX Abreve Odieresis -55 +KPX Abreve Ograve -55 +KPX Abreve Ohungarumlaut -55 +KPX Abreve Omacron -55 +KPX Abreve Oslash -55 +KPX Abreve Otilde -55 +KPX Abreve Q -55 +KPX Abreve T -111 +KPX Abreve Tcaron -111 +KPX Abreve Tcommaaccent -111 +KPX Abreve U -55 +KPX Abreve Uacute -55 +KPX Abreve Ucircumflex -55 +KPX Abreve Udieresis -55 +KPX Abreve Ugrave -55 +KPX Abreve Uhungarumlaut -55 +KPX Abreve Umacron -55 +KPX Abreve Uogonek -55 +KPX Abreve Uring -55 +KPX Abreve V -135 +KPX Abreve W -90 +KPX Abreve Y -105 +KPX Abreve Yacute -105 +KPX Abreve Ydieresis -105 +KPX Abreve quoteright -111 +KPX Abreve v -74 +KPX Abreve w -92 +KPX Abreve y -92 +KPX Abreve yacute -92 +KPX Abreve ydieresis -92 +KPX Acircumflex C -40 +KPX Acircumflex Cacute -40 +KPX Acircumflex Ccaron -40 +KPX Acircumflex Ccedilla -40 +KPX Acircumflex G -40 +KPX Acircumflex Gbreve -40 +KPX Acircumflex Gcommaaccent -40 +KPX Acircumflex O -55 +KPX Acircumflex Oacute -55 +KPX Acircumflex Ocircumflex -55 +KPX Acircumflex Odieresis -55 +KPX Acircumflex Ograve -55 +KPX Acircumflex Ohungarumlaut -55 +KPX Acircumflex Omacron -55 +KPX Acircumflex Oslash -55 +KPX Acircumflex Otilde -55 +KPX Acircumflex Q -55 +KPX Acircumflex T -111 +KPX Acircumflex Tcaron -111 +KPX Acircumflex Tcommaaccent -111 +KPX Acircumflex U -55 +KPX Acircumflex Uacute -55 +KPX Acircumflex Ucircumflex -55 +KPX Acircumflex Udieresis -55 +KPX Acircumflex Ugrave -55 +KPX Acircumflex Uhungarumlaut -55 +KPX Acircumflex Umacron -55 +KPX Acircumflex Uogonek -55 +KPX Acircumflex Uring -55 +KPX Acircumflex V -135 +KPX Acircumflex W -90 +KPX Acircumflex Y -105 +KPX Acircumflex Yacute -105 +KPX Acircumflex Ydieresis -105 +KPX Acircumflex quoteright -111 +KPX Acircumflex v -74 +KPX Acircumflex w -92 +KPX Acircumflex y -92 +KPX Acircumflex yacute -92 +KPX Acircumflex ydieresis -92 +KPX Adieresis C -40 +KPX Adieresis Cacute -40 +KPX Adieresis Ccaron -40 +KPX Adieresis Ccedilla -40 +KPX Adieresis G -40 +KPX Adieresis Gbreve -40 +KPX Adieresis Gcommaaccent -40 +KPX Adieresis O -55 +KPX Adieresis Oacute -55 +KPX Adieresis Ocircumflex -55 +KPX Adieresis Odieresis -55 +KPX Adieresis Ograve -55 +KPX Adieresis Ohungarumlaut -55 +KPX Adieresis Omacron -55 +KPX Adieresis Oslash -55 +KPX Adieresis Otilde -55 +KPX Adieresis Q -55 +KPX Adieresis T -111 +KPX Adieresis Tcaron -111 +KPX Adieresis Tcommaaccent -111 +KPX Adieresis U -55 +KPX Adieresis Uacute -55 +KPX Adieresis Ucircumflex -55 +KPX Adieresis Udieresis -55 +KPX Adieresis Ugrave -55 +KPX Adieresis Uhungarumlaut -55 +KPX Adieresis Umacron -55 +KPX Adieresis Uogonek -55 +KPX Adieresis Uring -55 +KPX Adieresis V -135 +KPX Adieresis W -90 +KPX Adieresis Y -105 +KPX Adieresis Yacute -105 +KPX Adieresis Ydieresis -105 +KPX Adieresis quoteright -111 +KPX Adieresis v -74 +KPX Adieresis w -92 +KPX Adieresis y -92 +KPX Adieresis yacute -92 +KPX Adieresis ydieresis -92 +KPX Agrave C -40 +KPX Agrave Cacute -40 +KPX Agrave Ccaron -40 +KPX Agrave Ccedilla -40 +KPX Agrave G -40 +KPX Agrave Gbreve -40 +KPX Agrave Gcommaaccent -40 +KPX Agrave O -55 +KPX Agrave Oacute -55 +KPX Agrave Ocircumflex -55 +KPX Agrave Odieresis -55 +KPX Agrave Ograve -55 +KPX Agrave Ohungarumlaut -55 +KPX Agrave Omacron -55 +KPX Agrave Oslash -55 +KPX Agrave Otilde -55 +KPX Agrave Q -55 +KPX Agrave T -111 +KPX Agrave Tcaron -111 +KPX Agrave Tcommaaccent -111 +KPX Agrave U -55 +KPX Agrave Uacute -55 +KPX Agrave Ucircumflex -55 +KPX Agrave Udieresis -55 +KPX Agrave Ugrave -55 +KPX Agrave Uhungarumlaut -55 +KPX Agrave Umacron -55 +KPX Agrave Uogonek -55 +KPX Agrave Uring -55 +KPX Agrave V -135 +KPX Agrave W -90 +KPX Agrave Y -105 +KPX Agrave Yacute -105 +KPX Agrave Ydieresis -105 +KPX Agrave quoteright -111 +KPX Agrave v -74 +KPX Agrave w -92 +KPX Agrave y -92 +KPX Agrave yacute -92 +KPX Agrave ydieresis -92 +KPX Amacron C -40 +KPX Amacron Cacute -40 +KPX Amacron Ccaron -40 +KPX Amacron Ccedilla -40 +KPX Amacron G -40 +KPX Amacron Gbreve -40 +KPX Amacron Gcommaaccent -40 +KPX Amacron O -55 +KPX Amacron Oacute -55 +KPX Amacron Ocircumflex -55 +KPX Amacron Odieresis -55 +KPX Amacron Ograve -55 +KPX Amacron Ohungarumlaut -55 +KPX Amacron Omacron -55 +KPX Amacron Oslash -55 +KPX Amacron Otilde -55 +KPX Amacron Q -55 +KPX Amacron T -111 +KPX Amacron Tcaron -111 +KPX Amacron Tcommaaccent -111 +KPX Amacron U -55 +KPX Amacron Uacute -55 +KPX Amacron Ucircumflex -55 +KPX Amacron Udieresis -55 +KPX Amacron Ugrave -55 +KPX Amacron Uhungarumlaut -55 +KPX Amacron Umacron -55 +KPX Amacron Uogonek -55 +KPX Amacron Uring -55 +KPX Amacron V -135 +KPX Amacron W -90 +KPX Amacron Y -105 +KPX Amacron Yacute -105 +KPX Amacron Ydieresis -105 +KPX Amacron quoteright -111 +KPX Amacron v -74 +KPX Amacron w -92 +KPX Amacron y -92 +KPX Amacron yacute -92 +KPX Amacron ydieresis -92 +KPX Aogonek C -40 +KPX Aogonek Cacute -40 +KPX Aogonek Ccaron -40 +KPX Aogonek Ccedilla -40 +KPX Aogonek G -40 +KPX Aogonek Gbreve -40 +KPX Aogonek Gcommaaccent -40 +KPX Aogonek O -55 +KPX Aogonek Oacute -55 +KPX Aogonek Ocircumflex -55 +KPX Aogonek Odieresis -55 +KPX Aogonek Ograve -55 +KPX Aogonek Ohungarumlaut -55 +KPX Aogonek Omacron -55 +KPX Aogonek Oslash -55 +KPX Aogonek Otilde -55 +KPX Aogonek Q -55 +KPX Aogonek T -111 +KPX Aogonek Tcaron -111 +KPX Aogonek Tcommaaccent -111 +KPX Aogonek U -55 +KPX Aogonek Uacute -55 +KPX Aogonek Ucircumflex -55 +KPX Aogonek Udieresis -55 +KPX Aogonek Ugrave -55 +KPX Aogonek Uhungarumlaut -55 +KPX Aogonek Umacron -55 +KPX Aogonek Uogonek -55 +KPX Aogonek Uring -55 +KPX Aogonek V -135 +KPX Aogonek W -90 +KPX Aogonek Y -105 +KPX Aogonek Yacute -105 +KPX Aogonek Ydieresis -105 +KPX Aogonek quoteright -111 +KPX Aogonek v -74 +KPX Aogonek w -52 +KPX Aogonek y -52 +KPX Aogonek yacute -52 +KPX Aogonek ydieresis -52 +KPX Aring C -40 +KPX Aring Cacute -40 +KPX Aring Ccaron -40 +KPX Aring Ccedilla -40 +KPX Aring G -40 +KPX Aring Gbreve -40 +KPX Aring Gcommaaccent -40 +KPX Aring O -55 +KPX Aring Oacute -55 +KPX Aring Ocircumflex -55 +KPX Aring Odieresis -55 +KPX Aring Ograve -55 +KPX Aring Ohungarumlaut -55 +KPX Aring Omacron -55 +KPX Aring Oslash -55 +KPX Aring Otilde -55 +KPX Aring Q -55 +KPX Aring T -111 +KPX Aring Tcaron -111 +KPX Aring Tcommaaccent -111 +KPX Aring U -55 +KPX Aring Uacute -55 +KPX Aring Ucircumflex -55 +KPX Aring Udieresis -55 +KPX Aring Ugrave -55 +KPX Aring Uhungarumlaut -55 +KPX Aring Umacron -55 +KPX Aring Uogonek -55 +KPX Aring Uring -55 +KPX Aring V -135 +KPX Aring W -90 +KPX Aring Y -105 +KPX Aring Yacute -105 +KPX Aring Ydieresis -105 +KPX Aring quoteright -111 +KPX Aring v -74 +KPX Aring w -92 +KPX Aring y -92 +KPX Aring yacute -92 +KPX Aring ydieresis -92 +KPX Atilde C -40 +KPX Atilde Cacute -40 +KPX Atilde Ccaron -40 +KPX Atilde Ccedilla -40 +KPX Atilde G -40 +KPX Atilde Gbreve -40 +KPX Atilde Gcommaaccent -40 +KPX Atilde O -55 +KPX Atilde Oacute -55 +KPX Atilde Ocircumflex -55 +KPX Atilde Odieresis -55 +KPX Atilde Ograve -55 +KPX Atilde Ohungarumlaut -55 +KPX Atilde Omacron -55 +KPX Atilde Oslash -55 +KPX Atilde Otilde -55 +KPX Atilde Q -55 +KPX Atilde T -111 +KPX Atilde Tcaron -111 +KPX Atilde Tcommaaccent -111 +KPX Atilde U -55 +KPX Atilde Uacute -55 +KPX Atilde Ucircumflex -55 +KPX Atilde Udieresis -55 +KPX Atilde Ugrave -55 +KPX Atilde Uhungarumlaut -55 +KPX Atilde Umacron -55 +KPX Atilde Uogonek -55 +KPX Atilde Uring -55 +KPX Atilde V -135 +KPX Atilde W -90 +KPX Atilde Y -105 +KPX Atilde Yacute -105 +KPX Atilde Ydieresis -105 +KPX Atilde quoteright -111 +KPX Atilde v -74 +KPX Atilde w -92 +KPX Atilde y -92 +KPX Atilde yacute -92 +KPX Atilde ydieresis -92 +KPX B A -35 +KPX B Aacute -35 +KPX B Abreve -35 +KPX B Acircumflex -35 +KPX B Adieresis -35 +KPX B Agrave -35 +KPX B Amacron -35 +KPX B Aogonek -35 +KPX B Aring -35 +KPX B Atilde -35 +KPX B U -10 +KPX B Uacute -10 +KPX B Ucircumflex -10 +KPX B Udieresis -10 +KPX B Ugrave -10 +KPX B Uhungarumlaut -10 +KPX B Umacron -10 +KPX B Uogonek -10 +KPX B Uring -10 +KPX D A -40 +KPX D Aacute -40 +KPX D Abreve -40 +KPX D Acircumflex -40 +KPX D Adieresis -40 +KPX D Agrave -40 +KPX D Amacron -40 +KPX D Aogonek -40 +KPX D Aring -40 +KPX D Atilde -40 +KPX D V -40 +KPX D W -30 +KPX D Y -55 +KPX D Yacute -55 +KPX D Ydieresis -55 +KPX Dcaron A -40 +KPX Dcaron Aacute -40 +KPX Dcaron Abreve -40 +KPX Dcaron Acircumflex -40 +KPX Dcaron Adieresis -40 +KPX Dcaron Agrave -40 +KPX Dcaron Amacron -40 +KPX Dcaron Aogonek -40 +KPX Dcaron Aring -40 +KPX Dcaron Atilde -40 +KPX Dcaron V -40 +KPX Dcaron W -30 +KPX Dcaron Y -55 +KPX Dcaron Yacute -55 +KPX Dcaron Ydieresis -55 +KPX Dcroat A -40 +KPX Dcroat Aacute -40 +KPX Dcroat Abreve -40 +KPX Dcroat Acircumflex -40 +KPX Dcroat Adieresis -40 +KPX Dcroat Agrave -40 +KPX Dcroat Amacron -40 +KPX Dcroat Aogonek -40 +KPX Dcroat Aring -40 +KPX Dcroat Atilde -40 +KPX Dcroat V -40 +KPX Dcroat W -30 +KPX Dcroat Y -55 +KPX Dcroat Yacute -55 +KPX Dcroat Ydieresis -55 +KPX F A -74 +KPX F Aacute -74 +KPX F Abreve -74 +KPX F Acircumflex -74 +KPX F Adieresis -74 +KPX F Agrave -74 +KPX F Amacron -74 +KPX F Aogonek -74 +KPX F Aring -74 +KPX F Atilde -74 +KPX F a -15 +KPX F aacute -15 +KPX F abreve -15 +KPX F acircumflex -15 +KPX F adieresis -15 +KPX F agrave -15 +KPX F amacron -15 +KPX F aogonek -15 +KPX F aring -15 +KPX F atilde -15 +KPX F comma -80 +KPX F o -15 +KPX F oacute -15 +KPX F ocircumflex -15 +KPX F odieresis -15 +KPX F ograve -15 +KPX F ohungarumlaut -15 +KPX F omacron -15 +KPX F oslash -15 +KPX F otilde -15 +KPX F period -80 +KPX J A -60 +KPX J Aacute -60 +KPX J Abreve -60 +KPX J Acircumflex -60 +KPX J Adieresis -60 +KPX J Agrave -60 +KPX J Amacron -60 +KPX J Aogonek -60 +KPX J Aring -60 +KPX J Atilde -60 +KPX K O -30 +KPX K Oacute -30 +KPX K Ocircumflex -30 +KPX K Odieresis -30 +KPX K Ograve -30 +KPX K Ohungarumlaut -30 +KPX K Omacron -30 +KPX K Oslash -30 +KPX K Otilde -30 +KPX K e -25 +KPX K eacute -25 +KPX K ecaron -25 +KPX K ecircumflex -25 +KPX K edieresis -25 +KPX K edotaccent -25 +KPX K egrave -25 +KPX K emacron -25 +KPX K eogonek -25 +KPX K o -35 +KPX K oacute -35 +KPX K ocircumflex -35 +KPX K odieresis -35 +KPX K ograve -35 +KPX K ohungarumlaut -35 +KPX K omacron -35 +KPX K oslash -35 +KPX K otilde -35 +KPX K u -15 +KPX K uacute -15 +KPX K ucircumflex -15 +KPX K udieresis -15 +KPX K ugrave -15 +KPX K uhungarumlaut -15 +KPX K umacron -15 +KPX K uogonek -15 +KPX K uring -15 +KPX K y -25 +KPX K yacute -25 +KPX K ydieresis -25 +KPX Kcommaaccent O -30 +KPX Kcommaaccent Oacute -30 +KPX Kcommaaccent Ocircumflex -30 +KPX Kcommaaccent Odieresis -30 +KPX Kcommaaccent Ograve -30 +KPX Kcommaaccent Ohungarumlaut -30 +KPX Kcommaaccent Omacron -30 +KPX Kcommaaccent Oslash -30 +KPX Kcommaaccent Otilde -30 +KPX Kcommaaccent e -25 +KPX Kcommaaccent eacute -25 +KPX Kcommaaccent ecaron -25 +KPX Kcommaaccent ecircumflex -25 +KPX Kcommaaccent edieresis -25 +KPX Kcommaaccent edotaccent -25 +KPX Kcommaaccent egrave -25 +KPX Kcommaaccent emacron -25 +KPX Kcommaaccent eogonek -25 +KPX Kcommaaccent o -35 +KPX Kcommaaccent oacute -35 +KPX Kcommaaccent ocircumflex -35 +KPX Kcommaaccent odieresis -35 +KPX Kcommaaccent ograve -35 +KPX Kcommaaccent ohungarumlaut -35 +KPX Kcommaaccent omacron -35 +KPX Kcommaaccent oslash -35 +KPX Kcommaaccent otilde -35 +KPX Kcommaaccent u -15 +KPX Kcommaaccent uacute -15 +KPX Kcommaaccent ucircumflex -15 +KPX Kcommaaccent udieresis -15 +KPX Kcommaaccent ugrave -15 +KPX Kcommaaccent uhungarumlaut -15 +KPX Kcommaaccent umacron -15 +KPX Kcommaaccent uogonek -15 +KPX Kcommaaccent uring -15 +KPX Kcommaaccent y -25 +KPX Kcommaaccent yacute -25 +KPX Kcommaaccent ydieresis -25 +KPX L T -92 +KPX L Tcaron -92 +KPX L Tcommaaccent -92 +KPX L V -100 +KPX L W -74 +KPX L Y -100 +KPX L Yacute -100 +KPX L Ydieresis -100 +KPX L quoteright -92 +KPX L y -55 +KPX L yacute -55 +KPX L ydieresis -55 +KPX Lacute T -92 +KPX Lacute Tcaron -92 +KPX Lacute Tcommaaccent -92 +KPX Lacute V -100 +KPX Lacute W -74 +KPX Lacute Y -100 +KPX Lacute Yacute -100 +KPX Lacute Ydieresis -100 +KPX Lacute quoteright -92 +KPX Lacute y -55 +KPX Lacute yacute -55 +KPX Lacute ydieresis -55 +KPX Lcaron quoteright -92 +KPX Lcaron y -55 +KPX Lcaron yacute -55 +KPX Lcaron ydieresis -55 +KPX Lcommaaccent T -92 +KPX Lcommaaccent Tcaron -92 +KPX Lcommaaccent Tcommaaccent -92 +KPX Lcommaaccent V -100 +KPX Lcommaaccent W -74 +KPX Lcommaaccent Y -100 +KPX Lcommaaccent Yacute -100 +KPX Lcommaaccent Ydieresis -100 +KPX Lcommaaccent quoteright -92 +KPX Lcommaaccent y -55 +KPX Lcommaaccent yacute -55 +KPX Lcommaaccent ydieresis -55 +KPX Lslash T -92 +KPX Lslash Tcaron -92 +KPX Lslash Tcommaaccent -92 +KPX Lslash V -100 +KPX Lslash W -74 +KPX Lslash Y -100 +KPX Lslash Yacute -100 +KPX Lslash Ydieresis -100 +KPX Lslash quoteright -92 +KPX Lslash y -55 +KPX Lslash yacute -55 +KPX Lslash ydieresis -55 +KPX N A -35 +KPX N Aacute -35 +KPX N Abreve -35 +KPX N Acircumflex -35 +KPX N Adieresis -35 +KPX N Agrave -35 +KPX N Amacron -35 +KPX N Aogonek -35 +KPX N Aring -35 +KPX N Atilde -35 +KPX Nacute A -35 +KPX Nacute Aacute -35 +KPX Nacute Abreve -35 +KPX Nacute Acircumflex -35 +KPX Nacute Adieresis -35 +KPX Nacute Agrave -35 +KPX Nacute Amacron -35 +KPX Nacute Aogonek -35 +KPX Nacute Aring -35 +KPX Nacute Atilde -35 +KPX Ncaron A -35 +KPX Ncaron Aacute -35 +KPX Ncaron Abreve -35 +KPX Ncaron Acircumflex -35 +KPX Ncaron Adieresis -35 +KPX Ncaron Agrave -35 +KPX Ncaron Amacron -35 +KPX Ncaron Aogonek -35 +KPX Ncaron Aring -35 +KPX Ncaron Atilde -35 +KPX Ncommaaccent A -35 +KPX Ncommaaccent Aacute -35 +KPX Ncommaaccent Abreve -35 +KPX Ncommaaccent Acircumflex -35 +KPX Ncommaaccent Adieresis -35 +KPX Ncommaaccent Agrave -35 +KPX Ncommaaccent Amacron -35 +KPX Ncommaaccent Aogonek -35 +KPX Ncommaaccent Aring -35 +KPX Ncommaaccent Atilde -35 +KPX Ntilde A -35 +KPX Ntilde Aacute -35 +KPX Ntilde Abreve -35 +KPX Ntilde Acircumflex -35 +KPX Ntilde Adieresis -35 +KPX Ntilde Agrave -35 +KPX Ntilde Amacron -35 +KPX Ntilde Aogonek -35 +KPX Ntilde Aring -35 +KPX Ntilde Atilde -35 +KPX O A -35 +KPX O Aacute -35 +KPX O Abreve -35 +KPX O Acircumflex -35 +KPX O Adieresis -35 +KPX O Agrave -35 +KPX O Amacron -35 +KPX O Aogonek -35 +KPX O Aring -35 +KPX O Atilde -35 +KPX O T -40 +KPX O Tcaron -40 +KPX O Tcommaaccent -40 +KPX O V -50 +KPX O W -35 +KPX O X -40 +KPX O Y -50 +KPX O Yacute -50 +KPX O Ydieresis -50 +KPX Oacute A -35 +KPX Oacute Aacute -35 +KPX Oacute Abreve -35 +KPX Oacute Acircumflex -35 +KPX Oacute Adieresis -35 +KPX Oacute Agrave -35 +KPX Oacute Amacron -35 +KPX Oacute Aogonek -35 +KPX Oacute Aring -35 +KPX Oacute Atilde -35 +KPX Oacute T -40 +KPX Oacute Tcaron -40 +KPX Oacute Tcommaaccent -40 +KPX Oacute V -50 +KPX Oacute W -35 +KPX Oacute X -40 +KPX Oacute Y -50 +KPX Oacute Yacute -50 +KPX Oacute Ydieresis -50 +KPX Ocircumflex A -35 +KPX Ocircumflex Aacute -35 +KPX Ocircumflex Abreve -35 +KPX Ocircumflex Acircumflex -35 +KPX Ocircumflex Adieresis -35 +KPX Ocircumflex Agrave -35 +KPX Ocircumflex Amacron -35 +KPX Ocircumflex Aogonek -35 +KPX Ocircumflex Aring -35 +KPX Ocircumflex Atilde -35 +KPX Ocircumflex T -40 +KPX Ocircumflex Tcaron -40 +KPX Ocircumflex Tcommaaccent -40 +KPX Ocircumflex V -50 +KPX Ocircumflex W -35 +KPX Ocircumflex X -40 +KPX Ocircumflex Y -50 +KPX Ocircumflex Yacute -50 +KPX Ocircumflex Ydieresis -50 +KPX Odieresis A -35 +KPX Odieresis Aacute -35 +KPX Odieresis Abreve -35 +KPX Odieresis Acircumflex -35 +KPX Odieresis Adieresis -35 +KPX Odieresis Agrave -35 +KPX Odieresis Amacron -35 +KPX Odieresis Aogonek -35 +KPX Odieresis Aring -35 +KPX Odieresis Atilde -35 +KPX Odieresis T -40 +KPX Odieresis Tcaron -40 +KPX Odieresis Tcommaaccent -40 +KPX Odieresis V -50 +KPX Odieresis W -35 +KPX Odieresis X -40 +KPX Odieresis Y -50 +KPX Odieresis Yacute -50 +KPX Odieresis Ydieresis -50 +KPX Ograve A -35 +KPX Ograve Aacute -35 +KPX Ograve Abreve -35 +KPX Ograve Acircumflex -35 +KPX Ograve Adieresis -35 +KPX Ograve Agrave -35 +KPX Ograve Amacron -35 +KPX Ograve Aogonek -35 +KPX Ograve Aring -35 +KPX Ograve Atilde -35 +KPX Ograve T -40 +KPX Ograve Tcaron -40 +KPX Ograve Tcommaaccent -40 +KPX Ograve V -50 +KPX Ograve W -35 +KPX Ograve X -40 +KPX Ograve Y -50 +KPX Ograve Yacute -50 +KPX Ograve Ydieresis -50 +KPX Ohungarumlaut A -35 +KPX Ohungarumlaut Aacute -35 +KPX Ohungarumlaut Abreve -35 +KPX Ohungarumlaut Acircumflex -35 +KPX Ohungarumlaut Adieresis -35 +KPX Ohungarumlaut Agrave -35 +KPX Ohungarumlaut Amacron -35 +KPX Ohungarumlaut Aogonek -35 +KPX Ohungarumlaut Aring -35 +KPX Ohungarumlaut Atilde -35 +KPX Ohungarumlaut T -40 +KPX Ohungarumlaut Tcaron -40 +KPX Ohungarumlaut Tcommaaccent -40 +KPX Ohungarumlaut V -50 +KPX Ohungarumlaut W -35 +KPX Ohungarumlaut X -40 +KPX Ohungarumlaut Y -50 +KPX Ohungarumlaut Yacute -50 +KPX Ohungarumlaut Ydieresis -50 +KPX Omacron A -35 +KPX Omacron Aacute -35 +KPX Omacron Abreve -35 +KPX Omacron Acircumflex -35 +KPX Omacron Adieresis -35 +KPX Omacron Agrave -35 +KPX Omacron Amacron -35 +KPX Omacron Aogonek -35 +KPX Omacron Aring -35 +KPX Omacron Atilde -35 +KPX Omacron T -40 +KPX Omacron Tcaron -40 +KPX Omacron Tcommaaccent -40 +KPX Omacron V -50 +KPX Omacron W -35 +KPX Omacron X -40 +KPX Omacron Y -50 +KPX Omacron Yacute -50 +KPX Omacron Ydieresis -50 +KPX Oslash A -35 +KPX Oslash Aacute -35 +KPX Oslash Abreve -35 +KPX Oslash Acircumflex -35 +KPX Oslash Adieresis -35 +KPX Oslash Agrave -35 +KPX Oslash Amacron -35 +KPX Oslash Aogonek -35 +KPX Oslash Aring -35 +KPX Oslash Atilde -35 +KPX Oslash T -40 +KPX Oslash Tcaron -40 +KPX Oslash Tcommaaccent -40 +KPX Oslash V -50 +KPX Oslash W -35 +KPX Oslash X -40 +KPX Oslash Y -50 +KPX Oslash Yacute -50 +KPX Oslash Ydieresis -50 +KPX Otilde A -35 +KPX Otilde Aacute -35 +KPX Otilde Abreve -35 +KPX Otilde Acircumflex -35 +KPX Otilde Adieresis -35 +KPX Otilde Agrave -35 +KPX Otilde Amacron -35 +KPX Otilde Aogonek -35 +KPX Otilde Aring -35 +KPX Otilde Atilde -35 +KPX Otilde T -40 +KPX Otilde Tcaron -40 +KPX Otilde Tcommaaccent -40 +KPX Otilde V -50 +KPX Otilde W -35 +KPX Otilde X -40 +KPX Otilde Y -50 +KPX Otilde Yacute -50 +KPX Otilde Ydieresis -50 +KPX P A -92 +KPX P Aacute -92 +KPX P Abreve -92 +KPX P Acircumflex -92 +KPX P Adieresis -92 +KPX P Agrave -92 +KPX P Amacron -92 +KPX P Aogonek -92 +KPX P Aring -92 +KPX P Atilde -92 +KPX P a -15 +KPX P aacute -15 +KPX P abreve -15 +KPX P acircumflex -15 +KPX P adieresis -15 +KPX P agrave -15 +KPX P amacron -15 +KPX P aogonek -15 +KPX P aring -15 +KPX P atilde -15 +KPX P comma -111 +KPX P period -111 +KPX Q U -10 +KPX Q Uacute -10 +KPX Q Ucircumflex -10 +KPX Q Udieresis -10 +KPX Q Ugrave -10 +KPX Q Uhungarumlaut -10 +KPX Q Umacron -10 +KPX Q Uogonek -10 +KPX Q Uring -10 +KPX R O -40 +KPX R Oacute -40 +KPX R Ocircumflex -40 +KPX R Odieresis -40 +KPX R Ograve -40 +KPX R Ohungarumlaut -40 +KPX R Omacron -40 +KPX R Oslash -40 +KPX R Otilde -40 +KPX R T -60 +KPX R Tcaron -60 +KPX R Tcommaaccent -60 +KPX R U -40 +KPX R Uacute -40 +KPX R Ucircumflex -40 +KPX R Udieresis -40 +KPX R Ugrave -40 +KPX R Uhungarumlaut -40 +KPX R Umacron -40 +KPX R Uogonek -40 +KPX R Uring -40 +KPX R V -80 +KPX R W -55 +KPX R Y -65 +KPX R Yacute -65 +KPX R Ydieresis -65 +KPX Racute O -40 +KPX Racute Oacute -40 +KPX Racute Ocircumflex -40 +KPX Racute Odieresis -40 +KPX Racute Ograve -40 +KPX Racute Ohungarumlaut -40 +KPX Racute Omacron -40 +KPX Racute Oslash -40 +KPX Racute Otilde -40 +KPX Racute T -60 +KPX Racute Tcaron -60 +KPX Racute Tcommaaccent -60 +KPX Racute U -40 +KPX Racute Uacute -40 +KPX Racute Ucircumflex -40 +KPX Racute Udieresis -40 +KPX Racute Ugrave -40 +KPX Racute Uhungarumlaut -40 +KPX Racute Umacron -40 +KPX Racute Uogonek -40 +KPX Racute Uring -40 +KPX Racute V -80 +KPX Racute W -55 +KPX Racute Y -65 +KPX Racute Yacute -65 +KPX Racute Ydieresis -65 +KPX Rcaron O -40 +KPX Rcaron Oacute -40 +KPX Rcaron Ocircumflex -40 +KPX Rcaron Odieresis -40 +KPX Rcaron Ograve -40 +KPX Rcaron Ohungarumlaut -40 +KPX Rcaron Omacron -40 +KPX Rcaron Oslash -40 +KPX Rcaron Otilde -40 +KPX Rcaron T -60 +KPX Rcaron Tcaron -60 +KPX Rcaron Tcommaaccent -60 +KPX Rcaron U -40 +KPX Rcaron Uacute -40 +KPX Rcaron Ucircumflex -40 +KPX Rcaron Udieresis -40 +KPX Rcaron Ugrave -40 +KPX Rcaron Uhungarumlaut -40 +KPX Rcaron Umacron -40 +KPX Rcaron Uogonek -40 +KPX Rcaron Uring -40 +KPX Rcaron V -80 +KPX Rcaron W -55 +KPX Rcaron Y -65 +KPX Rcaron Yacute -65 +KPX Rcaron Ydieresis -65 +KPX Rcommaaccent O -40 +KPX Rcommaaccent Oacute -40 +KPX Rcommaaccent Ocircumflex -40 +KPX Rcommaaccent Odieresis -40 +KPX Rcommaaccent Ograve -40 +KPX Rcommaaccent Ohungarumlaut -40 +KPX Rcommaaccent Omacron -40 +KPX Rcommaaccent Oslash -40 +KPX Rcommaaccent Otilde -40 +KPX Rcommaaccent T -60 +KPX Rcommaaccent Tcaron -60 +KPX Rcommaaccent Tcommaaccent -60 +KPX Rcommaaccent U -40 +KPX Rcommaaccent Uacute -40 +KPX Rcommaaccent Ucircumflex -40 +KPX Rcommaaccent Udieresis -40 +KPX Rcommaaccent Ugrave -40 +KPX Rcommaaccent Uhungarumlaut -40 +KPX Rcommaaccent Umacron -40 +KPX Rcommaaccent Uogonek -40 +KPX Rcommaaccent Uring -40 +KPX Rcommaaccent V -80 +KPX Rcommaaccent W -55 +KPX Rcommaaccent Y -65 +KPX Rcommaaccent Yacute -65 +KPX Rcommaaccent Ydieresis -65 +KPX T A -93 +KPX T Aacute -93 +KPX T Abreve -93 +KPX T Acircumflex -93 +KPX T Adieresis -93 +KPX T Agrave -93 +KPX T Amacron -93 +KPX T Aogonek -93 +KPX T Aring -93 +KPX T Atilde -93 +KPX T O -18 +KPX T Oacute -18 +KPX T Ocircumflex -18 +KPX T Odieresis -18 +KPX T Ograve -18 +KPX T Ohungarumlaut -18 +KPX T Omacron -18 +KPX T Oslash -18 +KPX T Otilde -18 +KPX T a -80 +KPX T aacute -80 +KPX T abreve -80 +KPX T acircumflex -80 +KPX T adieresis -40 +KPX T agrave -40 +KPX T amacron -40 +KPX T aogonek -80 +KPX T aring -80 +KPX T atilde -40 +KPX T colon -50 +KPX T comma -74 +KPX T e -70 +KPX T eacute -70 +KPX T ecaron -70 +KPX T ecircumflex -70 +KPX T edieresis -30 +KPX T edotaccent -70 +KPX T egrave -70 +KPX T emacron -30 +KPX T eogonek -70 +KPX T hyphen -92 +KPX T i -35 +KPX T iacute -35 +KPX T iogonek -35 +KPX T o -80 +KPX T oacute -80 +KPX T ocircumflex -80 +KPX T odieresis -80 +KPX T ograve -80 +KPX T ohungarumlaut -80 +KPX T omacron -80 +KPX T oslash -80 +KPX T otilde -80 +KPX T period -74 +KPX T r -35 +KPX T racute -35 +KPX T rcaron -35 +KPX T rcommaaccent -35 +KPX T semicolon -55 +KPX T u -45 +KPX T uacute -45 +KPX T ucircumflex -45 +KPX T udieresis -45 +KPX T ugrave -45 +KPX T uhungarumlaut -45 +KPX T umacron -45 +KPX T uogonek -45 +KPX T uring -45 +KPX T w -80 +KPX T y -80 +KPX T yacute -80 +KPX T ydieresis -80 +KPX Tcaron A -93 +KPX Tcaron Aacute -93 +KPX Tcaron Abreve -93 +KPX Tcaron Acircumflex -93 +KPX Tcaron Adieresis -93 +KPX Tcaron Agrave -93 +KPX Tcaron Amacron -93 +KPX Tcaron Aogonek -93 +KPX Tcaron Aring -93 +KPX Tcaron Atilde -93 +KPX Tcaron O -18 +KPX Tcaron Oacute -18 +KPX Tcaron Ocircumflex -18 +KPX Tcaron Odieresis -18 +KPX Tcaron Ograve -18 +KPX Tcaron Ohungarumlaut -18 +KPX Tcaron Omacron -18 +KPX Tcaron Oslash -18 +KPX Tcaron Otilde -18 +KPX Tcaron a -80 +KPX Tcaron aacute -80 +KPX Tcaron abreve -80 +KPX Tcaron acircumflex -80 +KPX Tcaron adieresis -40 +KPX Tcaron agrave -40 +KPX Tcaron amacron -40 +KPX Tcaron aogonek -80 +KPX Tcaron aring -80 +KPX Tcaron atilde -40 +KPX Tcaron colon -50 +KPX Tcaron comma -74 +KPX Tcaron e -70 +KPX Tcaron eacute -70 +KPX Tcaron ecaron -70 +KPX Tcaron ecircumflex -30 +KPX Tcaron edieresis -30 +KPX Tcaron edotaccent -70 +KPX Tcaron egrave -70 +KPX Tcaron emacron -30 +KPX Tcaron eogonek -70 +KPX Tcaron hyphen -92 +KPX Tcaron i -35 +KPX Tcaron iacute -35 +KPX Tcaron iogonek -35 +KPX Tcaron o -80 +KPX Tcaron oacute -80 +KPX Tcaron ocircumflex -80 +KPX Tcaron odieresis -80 +KPX Tcaron ograve -80 +KPX Tcaron ohungarumlaut -80 +KPX Tcaron omacron -80 +KPX Tcaron oslash -80 +KPX Tcaron otilde -80 +KPX Tcaron period -74 +KPX Tcaron r -35 +KPX Tcaron racute -35 +KPX Tcaron rcaron -35 +KPX Tcaron rcommaaccent -35 +KPX Tcaron semicolon -55 +KPX Tcaron u -45 +KPX Tcaron uacute -45 +KPX Tcaron ucircumflex -45 +KPX Tcaron udieresis -45 +KPX Tcaron ugrave -45 +KPX Tcaron uhungarumlaut -45 +KPX Tcaron umacron -45 +KPX Tcaron uogonek -45 +KPX Tcaron uring -45 +KPX Tcaron w -80 +KPX Tcaron y -80 +KPX Tcaron yacute -80 +KPX Tcaron ydieresis -80 +KPX Tcommaaccent A -93 +KPX Tcommaaccent Aacute -93 +KPX Tcommaaccent Abreve -93 +KPX Tcommaaccent Acircumflex -93 +KPX Tcommaaccent Adieresis -93 +KPX Tcommaaccent Agrave -93 +KPX Tcommaaccent Amacron -93 +KPX Tcommaaccent Aogonek -93 +KPX Tcommaaccent Aring -93 +KPX Tcommaaccent Atilde -93 +KPX Tcommaaccent O -18 +KPX Tcommaaccent Oacute -18 +KPX Tcommaaccent Ocircumflex -18 +KPX Tcommaaccent Odieresis -18 +KPX Tcommaaccent Ograve -18 +KPX Tcommaaccent Ohungarumlaut -18 +KPX Tcommaaccent Omacron -18 +KPX Tcommaaccent Oslash -18 +KPX Tcommaaccent Otilde -18 +KPX Tcommaaccent a -80 +KPX Tcommaaccent aacute -80 +KPX Tcommaaccent abreve -80 +KPX Tcommaaccent acircumflex -80 +KPX Tcommaaccent adieresis -40 +KPX Tcommaaccent agrave -40 +KPX Tcommaaccent amacron -40 +KPX Tcommaaccent aogonek -80 +KPX Tcommaaccent aring -80 +KPX Tcommaaccent atilde -40 +KPX Tcommaaccent colon -50 +KPX Tcommaaccent comma -74 +KPX Tcommaaccent e -70 +KPX Tcommaaccent eacute -70 +KPX Tcommaaccent ecaron -70 +KPX Tcommaaccent ecircumflex -30 +KPX Tcommaaccent edieresis -30 +KPX Tcommaaccent edotaccent -70 +KPX Tcommaaccent egrave -30 +KPX Tcommaaccent emacron -70 +KPX Tcommaaccent eogonek -70 +KPX Tcommaaccent hyphen -92 +KPX Tcommaaccent i -35 +KPX Tcommaaccent iacute -35 +KPX Tcommaaccent iogonek -35 +KPX Tcommaaccent o -80 +KPX Tcommaaccent oacute -80 +KPX Tcommaaccent ocircumflex -80 +KPX Tcommaaccent odieresis -80 +KPX Tcommaaccent ograve -80 +KPX Tcommaaccent ohungarumlaut -80 +KPX Tcommaaccent omacron -80 +KPX Tcommaaccent oslash -80 +KPX Tcommaaccent otilde -80 +KPX Tcommaaccent period -74 +KPX Tcommaaccent r -35 +KPX Tcommaaccent racute -35 +KPX Tcommaaccent rcaron -35 +KPX Tcommaaccent rcommaaccent -35 +KPX Tcommaaccent semicolon -55 +KPX Tcommaaccent u -45 +KPX Tcommaaccent uacute -45 +KPX Tcommaaccent ucircumflex -45 +KPX Tcommaaccent udieresis -45 +KPX Tcommaaccent ugrave -45 +KPX Tcommaaccent uhungarumlaut -45 +KPX Tcommaaccent umacron -45 +KPX Tcommaaccent uogonek -45 +KPX Tcommaaccent uring -45 +KPX Tcommaaccent w -80 +KPX Tcommaaccent y -80 +KPX Tcommaaccent yacute -80 +KPX Tcommaaccent ydieresis -80 +KPX U A -40 +KPX U Aacute -40 +KPX U Abreve -40 +KPX U Acircumflex -40 +KPX U Adieresis -40 +KPX U Agrave -40 +KPX U Amacron -40 +KPX U Aogonek -40 +KPX U Aring -40 +KPX U Atilde -40 +KPX Uacute A -40 +KPX Uacute Aacute -40 +KPX Uacute Abreve -40 +KPX Uacute Acircumflex -40 +KPX Uacute Adieresis -40 +KPX Uacute Agrave -40 +KPX Uacute Amacron -40 +KPX Uacute Aogonek -40 +KPX Uacute Aring -40 +KPX Uacute Atilde -40 +KPX Ucircumflex A -40 +KPX Ucircumflex Aacute -40 +KPX Ucircumflex Abreve -40 +KPX Ucircumflex Acircumflex -40 +KPX Ucircumflex Adieresis -40 +KPX Ucircumflex Agrave -40 +KPX Ucircumflex Amacron -40 +KPX Ucircumflex Aogonek -40 +KPX Ucircumflex Aring -40 +KPX Ucircumflex Atilde -40 +KPX Udieresis A -40 +KPX Udieresis Aacute -40 +KPX Udieresis Abreve -40 +KPX Udieresis Acircumflex -40 +KPX Udieresis Adieresis -40 +KPX Udieresis Agrave -40 +KPX Udieresis Amacron -40 +KPX Udieresis Aogonek -40 +KPX Udieresis Aring -40 +KPX Udieresis Atilde -40 +KPX Ugrave A -40 +KPX Ugrave Aacute -40 +KPX Ugrave Abreve -40 +KPX Ugrave Acircumflex -40 +KPX Ugrave Adieresis -40 +KPX Ugrave Agrave -40 +KPX Ugrave Amacron -40 +KPX Ugrave Aogonek -40 +KPX Ugrave Aring -40 +KPX Ugrave Atilde -40 +KPX Uhungarumlaut A -40 +KPX Uhungarumlaut Aacute -40 +KPX Uhungarumlaut Abreve -40 +KPX Uhungarumlaut Acircumflex -40 +KPX Uhungarumlaut Adieresis -40 +KPX Uhungarumlaut Agrave -40 +KPX Uhungarumlaut Amacron -40 +KPX Uhungarumlaut Aogonek -40 +KPX Uhungarumlaut Aring -40 +KPX Uhungarumlaut Atilde -40 +KPX Umacron A -40 +KPX Umacron Aacute -40 +KPX Umacron Abreve -40 +KPX Umacron Acircumflex -40 +KPX Umacron Adieresis -40 +KPX Umacron Agrave -40 +KPX Umacron Amacron -40 +KPX Umacron Aogonek -40 +KPX Umacron Aring -40 +KPX Umacron Atilde -40 +KPX Uogonek A -40 +KPX Uogonek Aacute -40 +KPX Uogonek Abreve -40 +KPX Uogonek Acircumflex -40 +KPX Uogonek Adieresis -40 +KPX Uogonek Agrave -40 +KPX Uogonek Amacron -40 +KPX Uogonek Aogonek -40 +KPX Uogonek Aring -40 +KPX Uogonek Atilde -40 +KPX Uring A -40 +KPX Uring Aacute -40 +KPX Uring Abreve -40 +KPX Uring Acircumflex -40 +KPX Uring Adieresis -40 +KPX Uring Agrave -40 +KPX Uring Amacron -40 +KPX Uring Aogonek -40 +KPX Uring Aring -40 +KPX Uring Atilde -40 +KPX V A -135 +KPX V Aacute -135 +KPX V Abreve -135 +KPX V Acircumflex -135 +KPX V Adieresis -135 +KPX V Agrave -135 +KPX V Amacron -135 +KPX V Aogonek -135 +KPX V Aring -135 +KPX V Atilde -135 +KPX V G -15 +KPX V Gbreve -15 +KPX V Gcommaaccent -15 +KPX V O -40 +KPX V Oacute -40 +KPX V Ocircumflex -40 +KPX V Odieresis -40 +KPX V Ograve -40 +KPX V Ohungarumlaut -40 +KPX V Omacron -40 +KPX V Oslash -40 +KPX V Otilde -40 +KPX V a -111 +KPX V aacute -111 +KPX V abreve -111 +KPX V acircumflex -71 +KPX V adieresis -71 +KPX V agrave -71 +KPX V amacron -71 +KPX V aogonek -111 +KPX V aring -111 +KPX V atilde -71 +KPX V colon -74 +KPX V comma -129 +KPX V e -111 +KPX V eacute -111 +KPX V ecaron -71 +KPX V ecircumflex -71 +KPX V edieresis -71 +KPX V edotaccent -111 +KPX V egrave -71 +KPX V emacron -71 +KPX V eogonek -111 +KPX V hyphen -100 +KPX V i -60 +KPX V iacute -60 +KPX V icircumflex -20 +KPX V idieresis -20 +KPX V igrave -20 +KPX V imacron -20 +KPX V iogonek -60 +KPX V o -129 +KPX V oacute -129 +KPX V ocircumflex -129 +KPX V odieresis -89 +KPX V ograve -89 +KPX V ohungarumlaut -129 +KPX V omacron -89 +KPX V oslash -129 +KPX V otilde -89 +KPX V period -129 +KPX V semicolon -74 +KPX V u -75 +KPX V uacute -75 +KPX V ucircumflex -75 +KPX V udieresis -75 +KPX V ugrave -75 +KPX V uhungarumlaut -75 +KPX V umacron -75 +KPX V uogonek -75 +KPX V uring -75 +KPX W A -120 +KPX W Aacute -120 +KPX W Abreve -120 +KPX W Acircumflex -120 +KPX W Adieresis -120 +KPX W Agrave -120 +KPX W Amacron -120 +KPX W Aogonek -120 +KPX W Aring -120 +KPX W Atilde -120 +KPX W O -10 +KPX W Oacute -10 +KPX W Ocircumflex -10 +KPX W Odieresis -10 +KPX W Ograve -10 +KPX W Ohungarumlaut -10 +KPX W Omacron -10 +KPX W Oslash -10 +KPX W Otilde -10 +KPX W a -80 +KPX W aacute -80 +KPX W abreve -80 +KPX W acircumflex -80 +KPX W adieresis -80 +KPX W agrave -80 +KPX W amacron -80 +KPX W aogonek -80 +KPX W aring -80 +KPX W atilde -80 +KPX W colon -37 +KPX W comma -92 +KPX W e -80 +KPX W eacute -80 +KPX W ecaron -80 +KPX W ecircumflex -80 +KPX W edieresis -40 +KPX W edotaccent -80 +KPX W egrave -40 +KPX W emacron -40 +KPX W eogonek -80 +KPX W hyphen -65 +KPX W i -40 +KPX W iacute -40 +KPX W iogonek -40 +KPX W o -80 +KPX W oacute -80 +KPX W ocircumflex -80 +KPX W odieresis -80 +KPX W ograve -80 +KPX W ohungarumlaut -80 +KPX W omacron -80 +KPX W oslash -80 +KPX W otilde -80 +KPX W period -92 +KPX W semicolon -37 +KPX W u -50 +KPX W uacute -50 +KPX W ucircumflex -50 +KPX W udieresis -50 +KPX W ugrave -50 +KPX W uhungarumlaut -50 +KPX W umacron -50 +KPX W uogonek -50 +KPX W uring -50 +KPX W y -73 +KPX W yacute -73 +KPX W ydieresis -73 +KPX Y A -120 +KPX Y Aacute -120 +KPX Y Abreve -120 +KPX Y Acircumflex -120 +KPX Y Adieresis -120 +KPX Y Agrave -120 +KPX Y Amacron -120 +KPX Y Aogonek -120 +KPX Y Aring -120 +KPX Y Atilde -120 +KPX Y O -30 +KPX Y Oacute -30 +KPX Y Ocircumflex -30 +KPX Y Odieresis -30 +KPX Y Ograve -30 +KPX Y Ohungarumlaut -30 +KPX Y Omacron -30 +KPX Y Oslash -30 +KPX Y Otilde -30 +KPX Y a -100 +KPX Y aacute -100 +KPX Y abreve -100 +KPX Y acircumflex -100 +KPX Y adieresis -60 +KPX Y agrave -60 +KPX Y amacron -60 +KPX Y aogonek -100 +KPX Y aring -100 +KPX Y atilde -60 +KPX Y colon -92 +KPX Y comma -129 +KPX Y e -100 +KPX Y eacute -100 +KPX Y ecaron -100 +KPX Y ecircumflex -100 +KPX Y edieresis -60 +KPX Y edotaccent -100 +KPX Y egrave -60 +KPX Y emacron -60 +KPX Y eogonek -100 +KPX Y hyphen -111 +KPX Y i -55 +KPX Y iacute -55 +KPX Y iogonek -55 +KPX Y o -110 +KPX Y oacute -110 +KPX Y ocircumflex -110 +KPX Y odieresis -70 +KPX Y ograve -70 +KPX Y ohungarumlaut -110 +KPX Y omacron -70 +KPX Y oslash -110 +KPX Y otilde -70 +KPX Y period -129 +KPX Y semicolon -92 +KPX Y u -111 +KPX Y uacute -111 +KPX Y ucircumflex -111 +KPX Y udieresis -71 +KPX Y ugrave -71 +KPX Y uhungarumlaut -111 +KPX Y umacron -71 +KPX Y uogonek -111 +KPX Y uring -111 +KPX Yacute A -120 +KPX Yacute Aacute -120 +KPX Yacute Abreve -120 +KPX Yacute Acircumflex -120 +KPX Yacute Adieresis -120 +KPX Yacute Agrave -120 +KPX Yacute Amacron -120 +KPX Yacute Aogonek -120 +KPX Yacute Aring -120 +KPX Yacute Atilde -120 +KPX Yacute O -30 +KPX Yacute Oacute -30 +KPX Yacute Ocircumflex -30 +KPX Yacute Odieresis -30 +KPX Yacute Ograve -30 +KPX Yacute Ohungarumlaut -30 +KPX Yacute Omacron -30 +KPX Yacute Oslash -30 +KPX Yacute Otilde -30 +KPX Yacute a -100 +KPX Yacute aacute -100 +KPX Yacute abreve -100 +KPX Yacute acircumflex -100 +KPX Yacute adieresis -60 +KPX Yacute agrave -60 +KPX Yacute amacron -60 +KPX Yacute aogonek -100 +KPX Yacute aring -100 +KPX Yacute atilde -60 +KPX Yacute colon -92 +KPX Yacute comma -129 +KPX Yacute e -100 +KPX Yacute eacute -100 +KPX Yacute ecaron -100 +KPX Yacute ecircumflex -100 +KPX Yacute edieresis -60 +KPX Yacute edotaccent -100 +KPX Yacute egrave -60 +KPX Yacute emacron -60 +KPX Yacute eogonek -100 +KPX Yacute hyphen -111 +KPX Yacute i -55 +KPX Yacute iacute -55 +KPX Yacute iogonek -55 +KPX Yacute o -110 +KPX Yacute oacute -110 +KPX Yacute ocircumflex -110 +KPX Yacute odieresis -70 +KPX Yacute ograve -70 +KPX Yacute ohungarumlaut -110 +KPX Yacute omacron -70 +KPX Yacute oslash -110 +KPX Yacute otilde -70 +KPX Yacute period -129 +KPX Yacute semicolon -92 +KPX Yacute u -111 +KPX Yacute uacute -111 +KPX Yacute ucircumflex -111 +KPX Yacute udieresis -71 +KPX Yacute ugrave -71 +KPX Yacute uhungarumlaut -111 +KPX Yacute umacron -71 +KPX Yacute uogonek -111 +KPX Yacute uring -111 +KPX Ydieresis A -120 +KPX Ydieresis Aacute -120 +KPX Ydieresis Abreve -120 +KPX Ydieresis Acircumflex -120 +KPX Ydieresis Adieresis -120 +KPX Ydieresis Agrave -120 +KPX Ydieresis Amacron -120 +KPX Ydieresis Aogonek -120 +KPX Ydieresis Aring -120 +KPX Ydieresis Atilde -120 +KPX Ydieresis O -30 +KPX Ydieresis Oacute -30 +KPX Ydieresis Ocircumflex -30 +KPX Ydieresis Odieresis -30 +KPX Ydieresis Ograve -30 +KPX Ydieresis Ohungarumlaut -30 +KPX Ydieresis Omacron -30 +KPX Ydieresis Oslash -30 +KPX Ydieresis Otilde -30 +KPX Ydieresis a -100 +KPX Ydieresis aacute -100 +KPX Ydieresis abreve -100 +KPX Ydieresis acircumflex -100 +KPX Ydieresis adieresis -60 +KPX Ydieresis agrave -60 +KPX Ydieresis amacron -60 +KPX Ydieresis aogonek -100 +KPX Ydieresis aring -100 +KPX Ydieresis atilde -100 +KPX Ydieresis colon -92 +KPX Ydieresis comma -129 +KPX Ydieresis e -100 +KPX Ydieresis eacute -100 +KPX Ydieresis ecaron -100 +KPX Ydieresis ecircumflex -100 +KPX Ydieresis edieresis -60 +KPX Ydieresis edotaccent -100 +KPX Ydieresis egrave -60 +KPX Ydieresis emacron -60 +KPX Ydieresis eogonek -100 +KPX Ydieresis hyphen -111 +KPX Ydieresis i -55 +KPX Ydieresis iacute -55 +KPX Ydieresis iogonek -55 +KPX Ydieresis o -110 +KPX Ydieresis oacute -110 +KPX Ydieresis ocircumflex -110 +KPX Ydieresis odieresis -70 +KPX Ydieresis ograve -70 +KPX Ydieresis ohungarumlaut -110 +KPX Ydieresis omacron -70 +KPX Ydieresis oslash -110 +KPX Ydieresis otilde -70 +KPX Ydieresis period -129 +KPX Ydieresis semicolon -92 +KPX Ydieresis u -111 +KPX Ydieresis uacute -111 +KPX Ydieresis ucircumflex -111 +KPX Ydieresis udieresis -71 +KPX Ydieresis ugrave -71 +KPX Ydieresis uhungarumlaut -111 +KPX Ydieresis umacron -71 +KPX Ydieresis uogonek -111 +KPX Ydieresis uring -111 +KPX a v -20 +KPX a w -15 +KPX aacute v -20 +KPX aacute w -15 +KPX abreve v -20 +KPX abreve w -15 +KPX acircumflex v -20 +KPX acircumflex w -15 +KPX adieresis v -20 +KPX adieresis w -15 +KPX agrave v -20 +KPX agrave w -15 +KPX amacron v -20 +KPX amacron w -15 +KPX aogonek v -20 +KPX aogonek w -15 +KPX aring v -20 +KPX aring w -15 +KPX atilde v -20 +KPX atilde w -15 +KPX b period -40 +KPX b u -20 +KPX b uacute -20 +KPX b ucircumflex -20 +KPX b udieresis -20 +KPX b ugrave -20 +KPX b uhungarumlaut -20 +KPX b umacron -20 +KPX b uogonek -20 +KPX b uring -20 +KPX b v -15 +KPX c y -15 +KPX c yacute -15 +KPX c ydieresis -15 +KPX cacute y -15 +KPX cacute yacute -15 +KPX cacute ydieresis -15 +KPX ccaron y -15 +KPX ccaron yacute -15 +KPX ccaron ydieresis -15 +KPX ccedilla y -15 +KPX ccedilla yacute -15 +KPX ccedilla ydieresis -15 +KPX comma quotedblright -70 +KPX comma quoteright -70 +KPX e g -15 +KPX e gbreve -15 +KPX e gcommaaccent -15 +KPX e v -25 +KPX e w -25 +KPX e x -15 +KPX e y -15 +KPX e yacute -15 +KPX e ydieresis -15 +KPX eacute g -15 +KPX eacute gbreve -15 +KPX eacute gcommaaccent -15 +KPX eacute v -25 +KPX eacute w -25 +KPX eacute x -15 +KPX eacute y -15 +KPX eacute yacute -15 +KPX eacute ydieresis -15 +KPX ecaron g -15 +KPX ecaron gbreve -15 +KPX ecaron gcommaaccent -15 +KPX ecaron v -25 +KPX ecaron w -25 +KPX ecaron x -15 +KPX ecaron y -15 +KPX ecaron yacute -15 +KPX ecaron ydieresis -15 +KPX ecircumflex g -15 +KPX ecircumflex gbreve -15 +KPX ecircumflex gcommaaccent -15 +KPX ecircumflex v -25 +KPX ecircumflex w -25 +KPX ecircumflex x -15 +KPX ecircumflex y -15 +KPX ecircumflex yacute -15 +KPX ecircumflex ydieresis -15 +KPX edieresis g -15 +KPX edieresis gbreve -15 +KPX edieresis gcommaaccent -15 +KPX edieresis v -25 +KPX edieresis w -25 +KPX edieresis x -15 +KPX edieresis y -15 +KPX edieresis yacute -15 +KPX edieresis ydieresis -15 +KPX edotaccent g -15 +KPX edotaccent gbreve -15 +KPX edotaccent gcommaaccent -15 +KPX edotaccent v -25 +KPX edotaccent w -25 +KPX edotaccent x -15 +KPX edotaccent y -15 +KPX edotaccent yacute -15 +KPX edotaccent ydieresis -15 +KPX egrave g -15 +KPX egrave gbreve -15 +KPX egrave gcommaaccent -15 +KPX egrave v -25 +KPX egrave w -25 +KPX egrave x -15 +KPX egrave y -15 +KPX egrave yacute -15 +KPX egrave ydieresis -15 +KPX emacron g -15 +KPX emacron gbreve -15 +KPX emacron gcommaaccent -15 +KPX emacron v -25 +KPX emacron w -25 +KPX emacron x -15 +KPX emacron y -15 +KPX emacron yacute -15 +KPX emacron ydieresis -15 +KPX eogonek g -15 +KPX eogonek gbreve -15 +KPX eogonek gcommaaccent -15 +KPX eogonek v -25 +KPX eogonek w -25 +KPX eogonek x -15 +KPX eogonek y -15 +KPX eogonek yacute -15 +KPX eogonek ydieresis -15 +KPX f a -10 +KPX f aacute -10 +KPX f abreve -10 +KPX f acircumflex -10 +KPX f adieresis -10 +KPX f agrave -10 +KPX f amacron -10 +KPX f aogonek -10 +KPX f aring -10 +KPX f atilde -10 +KPX f dotlessi -50 +KPX f f -25 +KPX f i -20 +KPX f iacute -20 +KPX f quoteright 55 +KPX g a -5 +KPX g aacute -5 +KPX g abreve -5 +KPX g acircumflex -5 +KPX g adieresis -5 +KPX g agrave -5 +KPX g amacron -5 +KPX g aogonek -5 +KPX g aring -5 +KPX g atilde -5 +KPX gbreve a -5 +KPX gbreve aacute -5 +KPX gbreve abreve -5 +KPX gbreve acircumflex -5 +KPX gbreve adieresis -5 +KPX gbreve agrave -5 +KPX gbreve amacron -5 +KPX gbreve aogonek -5 +KPX gbreve aring -5 +KPX gbreve atilde -5 +KPX gcommaaccent a -5 +KPX gcommaaccent aacute -5 +KPX gcommaaccent abreve -5 +KPX gcommaaccent acircumflex -5 +KPX gcommaaccent adieresis -5 +KPX gcommaaccent agrave -5 +KPX gcommaaccent amacron -5 +KPX gcommaaccent aogonek -5 +KPX gcommaaccent aring -5 +KPX gcommaaccent atilde -5 +KPX h y -5 +KPX h yacute -5 +KPX h ydieresis -5 +KPX i v -25 +KPX iacute v -25 +KPX icircumflex v -25 +KPX idieresis v -25 +KPX igrave v -25 +KPX imacron v -25 +KPX iogonek v -25 +KPX k e -10 +KPX k eacute -10 +KPX k ecaron -10 +KPX k ecircumflex -10 +KPX k edieresis -10 +KPX k edotaccent -10 +KPX k egrave -10 +KPX k emacron -10 +KPX k eogonek -10 +KPX k o -10 +KPX k oacute -10 +KPX k ocircumflex -10 +KPX k odieresis -10 +KPX k ograve -10 +KPX k ohungarumlaut -10 +KPX k omacron -10 +KPX k oslash -10 +KPX k otilde -10 +KPX k y -15 +KPX k yacute -15 +KPX k ydieresis -15 +KPX kcommaaccent e -10 +KPX kcommaaccent eacute -10 +KPX kcommaaccent ecaron -10 +KPX kcommaaccent ecircumflex -10 +KPX kcommaaccent edieresis -10 +KPX kcommaaccent edotaccent -10 +KPX kcommaaccent egrave -10 +KPX kcommaaccent emacron -10 +KPX kcommaaccent eogonek -10 +KPX kcommaaccent o -10 +KPX kcommaaccent oacute -10 +KPX kcommaaccent ocircumflex -10 +KPX kcommaaccent odieresis -10 +KPX kcommaaccent ograve -10 +KPX kcommaaccent ohungarumlaut -10 +KPX kcommaaccent omacron -10 +KPX kcommaaccent oslash -10 +KPX kcommaaccent otilde -10 +KPX kcommaaccent y -15 +KPX kcommaaccent yacute -15 +KPX kcommaaccent ydieresis -15 +KPX l w -10 +KPX lacute w -10 +KPX lcommaaccent w -10 +KPX lslash w -10 +KPX n v -40 +KPX n y -15 +KPX n yacute -15 +KPX n ydieresis -15 +KPX nacute v -40 +KPX nacute y -15 +KPX nacute yacute -15 +KPX nacute ydieresis -15 +KPX ncaron v -40 +KPX ncaron y -15 +KPX ncaron yacute -15 +KPX ncaron ydieresis -15 +KPX ncommaaccent v -40 +KPX ncommaaccent y -15 +KPX ncommaaccent yacute -15 +KPX ncommaaccent ydieresis -15 +KPX ntilde v -40 +KPX ntilde y -15 +KPX ntilde yacute -15 +KPX ntilde ydieresis -15 +KPX o v -15 +KPX o w -25 +KPX o y -10 +KPX o yacute -10 +KPX o ydieresis -10 +KPX oacute v -15 +KPX oacute w -25 +KPX oacute y -10 +KPX oacute yacute -10 +KPX oacute ydieresis -10 +KPX ocircumflex v -15 +KPX ocircumflex w -25 +KPX ocircumflex y -10 +KPX ocircumflex yacute -10 +KPX ocircumflex ydieresis -10 +KPX odieresis v -15 +KPX odieresis w -25 +KPX odieresis y -10 +KPX odieresis yacute -10 +KPX odieresis ydieresis -10 +KPX ograve v -15 +KPX ograve w -25 +KPX ograve y -10 +KPX ograve yacute -10 +KPX ograve ydieresis -10 +KPX ohungarumlaut v -15 +KPX ohungarumlaut w -25 +KPX ohungarumlaut y -10 +KPX ohungarumlaut yacute -10 +KPX ohungarumlaut ydieresis -10 +KPX omacron v -15 +KPX omacron w -25 +KPX omacron y -10 +KPX omacron yacute -10 +KPX omacron ydieresis -10 +KPX oslash v -15 +KPX oslash w -25 +KPX oslash y -10 +KPX oslash yacute -10 +KPX oslash ydieresis -10 +KPX otilde v -15 +KPX otilde w -25 +KPX otilde y -10 +KPX otilde yacute -10 +KPX otilde ydieresis -10 +KPX p y -10 +KPX p yacute -10 +KPX p ydieresis -10 +KPX period quotedblright -70 +KPX period quoteright -70 +KPX quotedblleft A -80 +KPX quotedblleft Aacute -80 +KPX quotedblleft Abreve -80 +KPX quotedblleft Acircumflex -80 +KPX quotedblleft Adieresis -80 +KPX quotedblleft Agrave -80 +KPX quotedblleft Amacron -80 +KPX quotedblleft Aogonek -80 +KPX quotedblleft Aring -80 +KPX quotedblleft Atilde -80 +KPX quoteleft A -80 +KPX quoteleft Aacute -80 +KPX quoteleft Abreve -80 +KPX quoteleft Acircumflex -80 +KPX quoteleft Adieresis -80 +KPX quoteleft Agrave -80 +KPX quoteleft Amacron -80 +KPX quoteleft Aogonek -80 +KPX quoteleft Aring -80 +KPX quoteleft Atilde -80 +KPX quoteleft quoteleft -74 +KPX quoteright d -50 +KPX quoteright dcroat -50 +KPX quoteright l -10 +KPX quoteright lacute -10 +KPX quoteright lcommaaccent -10 +KPX quoteright lslash -10 +KPX quoteright quoteright -74 +KPX quoteright r -50 +KPX quoteright racute -50 +KPX quoteright rcaron -50 +KPX quoteright rcommaaccent -50 +KPX quoteright s -55 +KPX quoteright sacute -55 +KPX quoteright scaron -55 +KPX quoteright scedilla -55 +KPX quoteright scommaaccent -55 +KPX quoteright space -74 +KPX quoteright t -18 +KPX quoteright tcommaaccent -18 +KPX quoteright v -50 +KPX r comma -40 +KPX r g -18 +KPX r gbreve -18 +KPX r gcommaaccent -18 +KPX r hyphen -20 +KPX r period -55 +KPX racute comma -40 +KPX racute g -18 +KPX racute gbreve -18 +KPX racute gcommaaccent -18 +KPX racute hyphen -20 +KPX racute period -55 +KPX rcaron comma -40 +KPX rcaron g -18 +KPX rcaron gbreve -18 +KPX rcaron gcommaaccent -18 +KPX rcaron hyphen -20 +KPX rcaron period -55 +KPX rcommaaccent comma -40 +KPX rcommaaccent g -18 +KPX rcommaaccent gbreve -18 +KPX rcommaaccent gcommaaccent -18 +KPX rcommaaccent hyphen -20 +KPX rcommaaccent period -55 +KPX space A -55 +KPX space Aacute -55 +KPX space Abreve -55 +KPX space Acircumflex -55 +KPX space Adieresis -55 +KPX space Agrave -55 +KPX space Amacron -55 +KPX space Aogonek -55 +KPX space Aring -55 +KPX space Atilde -55 +KPX space T -18 +KPX space Tcaron -18 +KPX space Tcommaaccent -18 +KPX space V -50 +KPX space W -30 +KPX space Y -90 +KPX space Yacute -90 +KPX space Ydieresis -90 +KPX v a -25 +KPX v aacute -25 +KPX v abreve -25 +KPX v acircumflex -25 +KPX v adieresis -25 +KPX v agrave -25 +KPX v amacron -25 +KPX v aogonek -25 +KPX v aring -25 +KPX v atilde -25 +KPX v comma -65 +KPX v e -15 +KPX v eacute -15 +KPX v ecaron -15 +KPX v ecircumflex -15 +KPX v edieresis -15 +KPX v edotaccent -15 +KPX v egrave -15 +KPX v emacron -15 +KPX v eogonek -15 +KPX v o -20 +KPX v oacute -20 +KPX v ocircumflex -20 +KPX v odieresis -20 +KPX v ograve -20 +KPX v ohungarumlaut -20 +KPX v omacron -20 +KPX v oslash -20 +KPX v otilde -20 +KPX v period -65 +KPX w a -10 +KPX w aacute -10 +KPX w abreve -10 +KPX w acircumflex -10 +KPX w adieresis -10 +KPX w agrave -10 +KPX w amacron -10 +KPX w aogonek -10 +KPX w aring -10 +KPX w atilde -10 +KPX w comma -65 +KPX w o -10 +KPX w oacute -10 +KPX w ocircumflex -10 +KPX w odieresis -10 +KPX w ograve -10 +KPX w ohungarumlaut -10 +KPX w omacron -10 +KPX w oslash -10 +KPX w otilde -10 +KPX w period -65 +KPX x e -15 +KPX x eacute -15 +KPX x ecaron -15 +KPX x ecircumflex -15 +KPX x edieresis -15 +KPX x edotaccent -15 +KPX x egrave -15 +KPX x emacron -15 +KPX x eogonek -15 +KPX y comma -65 +KPX y period -65 +KPX yacute comma -65 +KPX yacute period -65 +KPX ydieresis comma -65 +KPX ydieresis period -65 +EndKernPairs +EndKernData +EndFontMetrics diff --git a/pitfall/pdfkit/lib/font/data/ZapfDingbats.afm b/pitfall/pdfkit/lib/font/data/ZapfDingbats.afm new file mode 100755 index 00000000..b2745053 --- /dev/null +++ b/pitfall/pdfkit/lib/font/data/ZapfDingbats.afm @@ -0,0 +1,225 @@ +StartFontMetrics 4.1 +Comment Copyright (c) 1985, 1987, 1988, 1989, 1997 Adobe Systems Incorporated. All Rights Reserved. +Comment Creation Date: Thu May 1 15:14:13 1997 +Comment UniqueID 43082 +Comment VMusage 45775 55535 +FontName ZapfDingbats +FullName ITC Zapf Dingbats +FamilyName ZapfDingbats +Weight Medium +ItalicAngle 0 +IsFixedPitch false +CharacterSet Special +FontBBox -1 -143 981 820 +UnderlinePosition -100 +UnderlineThickness 50 +Version 002.000 +Notice Copyright (c) 1985, 1987, 1988, 1989, 1997 Adobe Systems Incorporated. All Rights Reserved.ITC Zapf Dingbats is a registered trademark of International Typeface Corporation. +EncodingScheme FontSpecific +StdHW 28 +StdVW 90 +StartCharMetrics 202 +C 32 ; WX 278 ; N space ; B 0 0 0 0 ; +C 33 ; WX 974 ; N a1 ; B 35 72 939 621 ; +C 34 ; WX 961 ; N a2 ; B 35 81 927 611 ; +C 35 ; WX 974 ; N a202 ; B 35 72 939 621 ; +C 36 ; WX 980 ; N a3 ; B 35 0 945 692 ; +C 37 ; WX 719 ; N a4 ; B 34 139 685 566 ; +C 38 ; WX 789 ; N a5 ; B 35 -14 755 705 ; +C 39 ; WX 790 ; N a119 ; B 35 -14 755 705 ; +C 40 ; WX 791 ; N a118 ; B 35 -13 761 705 ; +C 41 ; WX 690 ; N a117 ; B 34 138 655 553 ; +C 42 ; WX 960 ; N a11 ; B 35 123 925 568 ; +C 43 ; WX 939 ; N a12 ; B 35 134 904 559 ; +C 44 ; WX 549 ; N a13 ; B 29 -11 516 705 ; +C 45 ; WX 855 ; N a14 ; B 34 59 820 632 ; +C 46 ; WX 911 ; N a15 ; B 35 50 876 642 ; +C 47 ; WX 933 ; N a16 ; B 35 139 899 550 ; +C 48 ; WX 911 ; N a105 ; B 35 50 876 642 ; +C 49 ; WX 945 ; N a17 ; B 35 139 909 553 ; +C 50 ; WX 974 ; N a18 ; B 35 104 938 587 ; +C 51 ; WX 755 ; N a19 ; B 34 -13 721 705 ; +C 52 ; WX 846 ; N a20 ; B 36 -14 811 705 ; +C 53 ; WX 762 ; N a21 ; B 35 0 727 692 ; +C 54 ; WX 761 ; N a22 ; B 35 0 727 692 ; +C 55 ; WX 571 ; N a23 ; B -1 -68 571 661 ; +C 56 ; WX 677 ; N a24 ; B 36 -13 642 705 ; +C 57 ; WX 763 ; N a25 ; B 35 0 728 692 ; +C 58 ; WX 760 ; N a26 ; B 35 0 726 692 ; +C 59 ; WX 759 ; N a27 ; B 35 0 725 692 ; +C 60 ; WX 754 ; N a28 ; B 35 0 720 692 ; +C 61 ; WX 494 ; N a6 ; B 35 0 460 692 ; +C 62 ; WX 552 ; N a7 ; B 35 0 517 692 ; +C 63 ; WX 537 ; N a8 ; B 35 0 503 692 ; +C 64 ; WX 577 ; N a9 ; B 35 96 542 596 ; +C 65 ; WX 692 ; N a10 ; B 35 -14 657 705 ; +C 66 ; WX 786 ; N a29 ; B 35 -14 751 705 ; +C 67 ; WX 788 ; N a30 ; B 35 -14 752 705 ; +C 68 ; WX 788 ; N a31 ; B 35 -14 753 705 ; +C 69 ; WX 790 ; N a32 ; B 35 -14 756 705 ; +C 70 ; WX 793 ; N a33 ; B 35 -13 759 705 ; +C 71 ; WX 794 ; N a34 ; B 35 -13 759 705 ; +C 72 ; WX 816 ; N a35 ; B 35 -14 782 705 ; +C 73 ; WX 823 ; N a36 ; B 35 -14 787 705 ; +C 74 ; WX 789 ; N a37 ; B 35 -14 754 705 ; +C 75 ; WX 841 ; N a38 ; B 35 -14 807 705 ; +C 76 ; WX 823 ; N a39 ; B 35 -14 789 705 ; +C 77 ; WX 833 ; N a40 ; B 35 -14 798 705 ; +C 78 ; WX 816 ; N a41 ; B 35 -13 782 705 ; +C 79 ; WX 831 ; N a42 ; B 35 -14 796 705 ; +C 80 ; WX 923 ; N a43 ; B 35 -14 888 705 ; +C 81 ; WX 744 ; N a44 ; B 35 0 710 692 ; +C 82 ; WX 723 ; N a45 ; B 35 0 688 692 ; +C 83 ; WX 749 ; N a46 ; B 35 0 714 692 ; +C 84 ; WX 790 ; N a47 ; B 34 -14 756 705 ; +C 85 ; WX 792 ; N a48 ; B 35 -14 758 705 ; +C 86 ; WX 695 ; N a49 ; B 35 -14 661 706 ; +C 87 ; WX 776 ; N a50 ; B 35 -6 741 699 ; +C 88 ; WX 768 ; N a51 ; B 35 -7 734 699 ; +C 89 ; WX 792 ; N a52 ; B 35 -14 757 705 ; +C 90 ; WX 759 ; N a53 ; B 35 0 725 692 ; +C 91 ; WX 707 ; N a54 ; B 35 -13 672 704 ; +C 92 ; WX 708 ; N a55 ; B 35 -14 672 705 ; +C 93 ; WX 682 ; N a56 ; B 35 -14 647 705 ; +C 94 ; WX 701 ; N a57 ; B 35 -14 666 705 ; +C 95 ; WX 826 ; N a58 ; B 35 -14 791 705 ; +C 96 ; WX 815 ; N a59 ; B 35 -14 780 705 ; +C 97 ; WX 789 ; N a60 ; B 35 -14 754 705 ; +C 98 ; WX 789 ; N a61 ; B 35 -14 754 705 ; +C 99 ; WX 707 ; N a62 ; B 34 -14 673 705 ; +C 100 ; WX 687 ; N a63 ; B 36 0 651 692 ; +C 101 ; WX 696 ; N a64 ; B 35 0 661 691 ; +C 102 ; WX 689 ; N a65 ; B 35 0 655 692 ; +C 103 ; WX 786 ; N a66 ; B 34 -14 751 705 ; +C 104 ; WX 787 ; N a67 ; B 35 -14 752 705 ; +C 105 ; WX 713 ; N a68 ; B 35 -14 678 705 ; +C 106 ; WX 791 ; N a69 ; B 35 -14 756 705 ; +C 107 ; WX 785 ; N a70 ; B 36 -14 751 705 ; +C 108 ; WX 791 ; N a71 ; B 35 -14 757 705 ; +C 109 ; WX 873 ; N a72 ; B 35 -14 838 705 ; +C 110 ; WX 761 ; N a73 ; B 35 0 726 692 ; +C 111 ; WX 762 ; N a74 ; B 35 0 727 692 ; +C 112 ; WX 762 ; N a203 ; B 35 0 727 692 ; +C 113 ; WX 759 ; N a75 ; B 35 0 725 692 ; +C 114 ; WX 759 ; N a204 ; B 35 0 725 692 ; +C 115 ; WX 892 ; N a76 ; B 35 0 858 705 ; +C 116 ; WX 892 ; N a77 ; B 35 -14 858 692 ; +C 117 ; WX 788 ; N a78 ; B 35 -14 754 705 ; +C 118 ; WX 784 ; N a79 ; B 35 -14 749 705 ; +C 119 ; WX 438 ; N a81 ; B 35 -14 403 705 ; +C 120 ; WX 138 ; N a82 ; B 35 0 104 692 ; +C 121 ; WX 277 ; N a83 ; B 35 0 242 692 ; +C 122 ; WX 415 ; N a84 ; B 35 0 380 692 ; +C 123 ; WX 392 ; N a97 ; B 35 263 357 705 ; +C 124 ; WX 392 ; N a98 ; B 34 263 357 705 ; +C 125 ; WX 668 ; N a99 ; B 35 263 633 705 ; +C 126 ; WX 668 ; N a100 ; B 36 263 634 705 ; +C 128 ; WX 390 ; N a89 ; B 35 -14 356 705 ; +C 129 ; WX 390 ; N a90 ; B 35 -14 355 705 ; +C 130 ; WX 317 ; N a93 ; B 35 0 283 692 ; +C 131 ; WX 317 ; N a94 ; B 35 0 283 692 ; +C 132 ; WX 276 ; N a91 ; B 35 0 242 692 ; +C 133 ; WX 276 ; N a92 ; B 35 0 242 692 ; +C 134 ; WX 509 ; N a205 ; B 35 0 475 692 ; +C 135 ; WX 509 ; N a85 ; B 35 0 475 692 ; +C 136 ; WX 410 ; N a206 ; B 35 0 375 692 ; +C 137 ; WX 410 ; N a86 ; B 35 0 375 692 ; +C 138 ; WX 234 ; N a87 ; B 35 -14 199 705 ; +C 139 ; WX 234 ; N a88 ; B 35 -14 199 705 ; +C 140 ; WX 334 ; N a95 ; B 35 0 299 692 ; +C 141 ; WX 334 ; N a96 ; B 35 0 299 692 ; +C 161 ; WX 732 ; N a101 ; B 35 -143 697 806 ; +C 162 ; WX 544 ; N a102 ; B 56 -14 488 706 ; +C 163 ; WX 544 ; N a103 ; B 34 -14 508 705 ; +C 164 ; WX 910 ; N a104 ; B 35 40 875 651 ; +C 165 ; WX 667 ; N a106 ; B 35 -14 633 705 ; +C 166 ; WX 760 ; N a107 ; B 35 -14 726 705 ; +C 167 ; WX 760 ; N a108 ; B 0 121 758 569 ; +C 168 ; WX 776 ; N a112 ; B 35 0 741 705 ; +C 169 ; WX 595 ; N a111 ; B 34 -14 560 705 ; +C 170 ; WX 694 ; N a110 ; B 35 -14 659 705 ; +C 171 ; WX 626 ; N a109 ; B 34 0 591 705 ; +C 172 ; WX 788 ; N a120 ; B 35 -14 754 705 ; +C 173 ; WX 788 ; N a121 ; B 35 -14 754 705 ; +C 174 ; WX 788 ; N a122 ; B 35 -14 754 705 ; +C 175 ; WX 788 ; N a123 ; B 35 -14 754 705 ; +C 176 ; WX 788 ; N a124 ; B 35 -14 754 705 ; +C 177 ; WX 788 ; N a125 ; B 35 -14 754 705 ; +C 178 ; WX 788 ; N a126 ; B 35 -14 754 705 ; +C 179 ; WX 788 ; N a127 ; B 35 -14 754 705 ; +C 180 ; WX 788 ; N a128 ; B 35 -14 754 705 ; +C 181 ; WX 788 ; N a129 ; B 35 -14 754 705 ; +C 182 ; WX 788 ; N a130 ; B 35 -14 754 705 ; +C 183 ; WX 788 ; N a131 ; B 35 -14 754 705 ; +C 184 ; WX 788 ; N a132 ; B 35 -14 754 705 ; +C 185 ; WX 788 ; N a133 ; B 35 -14 754 705 ; +C 186 ; WX 788 ; N a134 ; B 35 -14 754 705 ; +C 187 ; WX 788 ; N a135 ; B 35 -14 754 705 ; +C 188 ; WX 788 ; N a136 ; B 35 -14 754 705 ; +C 189 ; WX 788 ; N a137 ; B 35 -14 754 705 ; +C 190 ; WX 788 ; N a138 ; B 35 -14 754 705 ; +C 191 ; WX 788 ; N a139 ; B 35 -14 754 705 ; +C 192 ; WX 788 ; N a140 ; B 35 -14 754 705 ; +C 193 ; WX 788 ; N a141 ; B 35 -14 754 705 ; +C 194 ; WX 788 ; N a142 ; B 35 -14 754 705 ; +C 195 ; WX 788 ; N a143 ; B 35 -14 754 705 ; +C 196 ; WX 788 ; N a144 ; B 35 -14 754 705 ; +C 197 ; WX 788 ; N a145 ; B 35 -14 754 705 ; +C 198 ; WX 788 ; N a146 ; B 35 -14 754 705 ; +C 199 ; WX 788 ; N a147 ; B 35 -14 754 705 ; +C 200 ; WX 788 ; N a148 ; B 35 -14 754 705 ; +C 201 ; WX 788 ; N a149 ; B 35 -14 754 705 ; +C 202 ; WX 788 ; N a150 ; B 35 -14 754 705 ; +C 203 ; WX 788 ; N a151 ; B 35 -14 754 705 ; +C 204 ; WX 788 ; N a152 ; B 35 -14 754 705 ; +C 205 ; WX 788 ; N a153 ; B 35 -14 754 705 ; +C 206 ; WX 788 ; N a154 ; B 35 -14 754 705 ; +C 207 ; WX 788 ; N a155 ; B 35 -14 754 705 ; +C 208 ; WX 788 ; N a156 ; B 35 -14 754 705 ; +C 209 ; WX 788 ; N a157 ; B 35 -14 754 705 ; +C 210 ; WX 788 ; N a158 ; B 35 -14 754 705 ; +C 211 ; WX 788 ; N a159 ; B 35 -14 754 705 ; +C 212 ; WX 894 ; N a160 ; B 35 58 860 634 ; +C 213 ; WX 838 ; N a161 ; B 35 152 803 540 ; +C 214 ; WX 1016 ; N a163 ; B 34 152 981 540 ; +C 215 ; WX 458 ; N a164 ; B 35 -127 422 820 ; +C 216 ; WX 748 ; N a196 ; B 35 94 698 597 ; +C 217 ; WX 924 ; N a165 ; B 35 140 890 552 ; +C 218 ; WX 748 ; N a192 ; B 35 94 698 597 ; +C 219 ; WX 918 ; N a166 ; B 35 166 884 526 ; +C 220 ; WX 927 ; N a167 ; B 35 32 892 660 ; +C 221 ; WX 928 ; N a168 ; B 35 129 891 562 ; +C 222 ; WX 928 ; N a169 ; B 35 128 893 563 ; +C 223 ; WX 834 ; N a170 ; B 35 155 799 537 ; +C 224 ; WX 873 ; N a171 ; B 35 93 838 599 ; +C 225 ; WX 828 ; N a172 ; B 35 104 791 588 ; +C 226 ; WX 924 ; N a173 ; B 35 98 889 594 ; +C 227 ; WX 924 ; N a162 ; B 35 98 889 594 ; +C 228 ; WX 917 ; N a174 ; B 35 0 882 692 ; +C 229 ; WX 930 ; N a175 ; B 35 84 896 608 ; +C 230 ; WX 931 ; N a176 ; B 35 84 896 608 ; +C 231 ; WX 463 ; N a177 ; B 35 -99 429 791 ; +C 232 ; WX 883 ; N a178 ; B 35 71 848 623 ; +C 233 ; WX 836 ; N a179 ; B 35 44 802 648 ; +C 234 ; WX 836 ; N a193 ; B 35 44 802 648 ; +C 235 ; WX 867 ; N a180 ; B 35 101 832 591 ; +C 236 ; WX 867 ; N a199 ; B 35 101 832 591 ; +C 237 ; WX 696 ; N a181 ; B 35 44 661 648 ; +C 238 ; WX 696 ; N a200 ; B 35 44 661 648 ; +C 239 ; WX 874 ; N a182 ; B 35 77 840 619 ; +C 241 ; WX 874 ; N a201 ; B 35 73 840 615 ; +C 242 ; WX 760 ; N a183 ; B 35 0 725 692 ; +C 243 ; WX 946 ; N a184 ; B 35 160 911 533 ; +C 244 ; WX 771 ; N a197 ; B 34 37 736 655 ; +C 245 ; WX 865 ; N a185 ; B 35 207 830 481 ; +C 246 ; WX 771 ; N a194 ; B 34 37 736 655 ; +C 247 ; WX 888 ; N a198 ; B 34 -19 853 712 ; +C 248 ; WX 967 ; N a186 ; B 35 124 932 568 ; +C 249 ; WX 888 ; N a195 ; B 34 -19 853 712 ; +C 250 ; WX 831 ; N a187 ; B 35 113 796 579 ; +C 251 ; WX 873 ; N a188 ; B 36 118 838 578 ; +C 252 ; WX 927 ; N a189 ; B 35 150 891 542 ; +C 253 ; WX 970 ; N a190 ; B 35 76 931 616 ; +C 254 ; WX 918 ; N a191 ; B 34 99 884 593 ; +EndCharMetrics +EndFontMetrics diff --git a/pitfall/pdfkit/lib/font/embedded.coffee b/pitfall/pdfkit/lib/font/embedded.coffee new file mode 100644 index 00000000..83203f34 --- /dev/null +++ b/pitfall/pdfkit/lib/font/embedded.coffee @@ -0,0 +1,156 @@ +PDFFont = require '../font' +PDFObject = require '../object' + +class EmbeddedFont extends PDFFont + constructor: (@document, @font, @id) -> + @subset = @font.createSubset() + @unicode = [[0]] + @widths = [@font.getGlyph(0).advanceWidth] + + @name = @font.postscriptName + @scale = 1000 / @font.unitsPerEm + @ascender = @font.ascent * @scale + @descender = @font.descent * @scale + @lineGap = @font.lineGap * @scale + @bbox = @font.bbox + + encode: (text, features) -> + {glyphs, positions} = @font.layout text, features + + res = [] + for glyph, i in glyphs + gid = @subset.includeGlyph glyph.id + res.push ('0000' + gid.toString(16)).slice(-4) + + @widths[gid] ?= glyph.advanceWidth * @scale + @unicode[gid] ?= glyph.codePoints + + for key of positions[i] + positions[i][key] *= @scale + + positions[i].advanceWidth = glyph.advanceWidth * @scale + + return [res, positions] + + widthOfString: (string, size, features) -> + width = @font.layout(string, features).advanceWidth + scale = size / @font.unitsPerEm + return width * scale + + embed: -> + isCFF = @subset.cff? + fontFile = @document.ref() + + if isCFF + fontFile.data.Subtype = 'CIDFontType0C' + + @subset.encodeStream().pipe(fontFile) + + familyClass = (@font['OS/2']?.sFamilyClass or 0) >> 8 + flags = 0 + flags |= 1 << 0 if @font.post.isFixedPitch + flags |= 1 << 1 if 1 <= familyClass <= 7 + flags |= 1 << 2 # assume the font uses non-latin characters + flags |= 1 << 3 if familyClass is 10 + flags |= 1 << 6 if @font.head.macStyle.italic + + # generate a random tag (6 uppercase letters. 65 is the char code for 'A') + tag = (String.fromCharCode Math.random() * 26 + 65 for i in [0...6]).join '' + name = tag + '+' + @font.postscriptName + + bbox = @font.bbox + descriptor = @document.ref + Type: 'FontDescriptor' + FontName: name + Flags: flags + FontBBox: [bbox.minX * @scale, bbox.minY * @scale, bbox.maxX * @scale, bbox.maxY * @scale] + ItalicAngle: @font.italicAngle + Ascent: @ascender + Descent: @descender + CapHeight: (@font.capHeight or @font.ascent) * @scale + XHeight: (@font.xHeight or 0) * @scale + StemV: 0 # not sure how to calculate this + + if isCFF + descriptor.data.FontFile3 = fontFile + else + descriptor.data.FontFile2 = fontFile + + descriptor.end() + + descendantFont = @document.ref + Type: 'Font' + Subtype: if isCFF then 'CIDFontType0' else 'CIDFontType2' + BaseFont: name + CIDSystemInfo: + Registry: new String 'Adobe' + Ordering: new String 'Identity' + Supplement: 0 + FontDescriptor: descriptor + W: [0, @widths] + + descendantFont.end() + + @dictionary.data = + Type: 'Font' + Subtype: 'Type0' + BaseFont: name + Encoding: 'Identity-H' + DescendantFonts: [descendantFont] + ToUnicode: @toUnicodeCmap() + + @dictionary.end() + + toHex = (codePoints...) -> + codes = for code in codePoints + ('0000' + code.toString(16)).slice(-4) + + return codes.join '' + + # Maps the glyph ids encoded in the PDF back to unicode strings + # Because of ligature substitutions and the like, there may be one or more + # unicode characters represented by each glyph. + toUnicodeCmap: -> + cmap = @document.ref() + + entries = [] + for codePoints in @unicode + encoded = [] + + # encode codePoints to utf16 + for value in codePoints + if value > 0xffff + value -= 0x10000 + encoded.push toHex value >>> 10 & 0x3ff | 0xd800 + value = 0xdc00 | value & 0x3ff + + encoded.push toHex value + + entries.push "<#{encoded.join ' '}>" + + cmap.end """ + /CIDInit /ProcSet findresource begin + 12 dict begin + begincmap + /CIDSystemInfo << + /Registry (Adobe) + /Ordering (UCS) + /Supplement 0 + >> def + /CMapName /Adobe-Identity-UCS def + /CMapType 2 def + 1 begincodespacerange + <0000> + endcodespacerange + 1 beginbfrange + <0000> <#{toHex entries.length - 1}> [#{entries.join ' '}] + endbfrange + endcmap + CMapName currentdict /CMap defineresource pop + end + end + """ + + return cmap + +module.exports = EmbeddedFont diff --git a/pitfall/pdfkit/lib/font/standard.coffee b/pitfall/pdfkit/lib/font/standard.coffee new file mode 100644 index 00000000..95983ce2 --- /dev/null +++ b/pitfall/pdfkit/lib/font/standard.coffee @@ -0,0 +1,65 @@ +AFMFont = require './afm' +PDFFont = require '../font' +fs = require 'fs' + +class StandardFont extends PDFFont + constructor: (@document, @name, @id) -> + @font = new AFMFont STANDARD_FONTS[@name]() + {@ascender,@descender,@bbox,@lineGap} = @font + + embed: -> + @dictionary.data = + Type: 'Font' + BaseFont: @name + Subtype: 'Type1' + Encoding: 'WinAnsiEncoding' + + @dictionary.end() + + encode: (text) -> + encoded = @font.encodeText text + glyphs = @font.glyphsForString '' + text + advances = @font.advancesForGlyphs glyphs + positions = [] + for glyph, i in glyphs + positions.push + xAdvance: advances[i] + yAdvance: 0 + xOffset: 0 + yOffset: 0 + advanceWidth: @font.widthOfGlyph glyph + + return [encoded, positions] + + widthOfString: (string, size) -> + glyphs = @font.glyphsForString '' + string + advances = @font.advancesForGlyphs glyphs + + width = 0 + for advance in advances + width += advance + + scale = size / 1000 + return width * scale + + @isStandardFont: (name) -> + return name of STANDARD_FONTS + + # This insanity is so browserify can inline the font files + STANDARD_FONTS = + "Courier": -> fs.readFileSync __dirname + "/../font/data/Courier.afm", 'utf8' + "Courier-Bold": -> fs.readFileSync __dirname + "/../font/data/Courier-Bold.afm", 'utf8' + "Courier-Oblique": -> fs.readFileSync __dirname + "/../font/data/Courier-Oblique.afm", 'utf8' + "Courier-BoldOblique": -> fs.readFileSync __dirname + "/../font/data/Courier-BoldOblique.afm", 'utf8' + "Helvetica": -> fs.readFileSync __dirname + "/../font/data/Helvetica.afm", 'utf8' + "Helvetica-Bold": -> fs.readFileSync __dirname + "/../font/data/Helvetica-Bold.afm", 'utf8' + "Helvetica-Oblique": -> fs.readFileSync __dirname + "/../font/data/Helvetica-Oblique.afm", 'utf8' + "Helvetica-BoldOblique": -> fs.readFileSync __dirname + "/../font/data/Helvetica-BoldOblique.afm", 'utf8' + "Times-Roman": -> fs.readFileSync __dirname + "/../font/data/Times-Roman.afm", 'utf8' + "Times-Bold": -> fs.readFileSync __dirname + "/../font/data/Times-Bold.afm", 'utf8' + "Times-Italic": -> fs.readFileSync __dirname + "/../font/data/Times-Italic.afm", 'utf8' + "Times-BoldItalic": -> fs.readFileSync __dirname + "/../font/data/Times-BoldItalic.afm", 'utf8' + "Symbol": -> fs.readFileSync __dirname + "/../font/data/Symbol.afm", 'utf8' + "ZapfDingbats": -> fs.readFileSync __dirname + "/../font/data/ZapfDingbats.afm", 'utf8' + +module.exports = StandardFont diff --git a/pitfall/pdfkit/lib/gradient.coffee b/pitfall/pdfkit/lib/gradient.coffee new file mode 100644 index 00000000..599d729c --- /dev/null +++ b/pitfall/pdfkit/lib/gradient.coffee @@ -0,0 +1,178 @@ +class PDFGradient + constructor: (@doc) -> + @stops = [] + @embedded = no + @transform = [1, 0, 0, 1, 0, 0] + @_colorSpace = 'DeviceRGB' + + stop: (pos, color, opacity = 1) -> + opacity = Math.max(0, Math.min(1, opacity)) + @stops.push [pos, @doc._normalizeColor(color), opacity] + return this + + setTransform: (m11, m12, m21, m22, dx, dy) -> + @transform = [m11, m12, m21, m22, dx, dy] + return this + + embed: (m) -> + return if @stops.length is 0 + @embedded = yes + @matrix = m + + # if the last stop comes before 100%, add a copy at 100% + last = @stops[@stops.length - 1] + if last[0] < 1 + @stops.push [1, last[1], last[2]] + + bounds = [] + encode = [] + stops = [] + + for i in [0...@stops.length - 1] + encode.push 0, 1 + unless i + 2 is @stops.length + bounds.push @stops[i + 1][0] + + fn = @doc.ref + FunctionType: 2 + Domain: [0, 1] + C0: @stops[i + 0][1] + C1: @stops[i + 1][1] + N: 1 + + stops.push fn + fn.end() + + # if there are only two stops, we don't need a stitching function + if stops.length is 1 + fn = stops[0] + else + fn = @doc.ref + FunctionType: 3 # stitching function + Domain: [0, 1] + Functions: stops + Bounds: bounds + Encode: encode + + fn.end() + + @id = 'Sh' + (++@doc._gradCount) + + shader = @shader fn + shader.end() + + pattern = @doc.ref + Type: 'Pattern' + PatternType: 2 + Shading: shader + Matrix: (+v.toFixed(5) for v in @matrix) + + pattern.end() + + if (@stops.some (stop) -> stop[2] < 1) + grad = @opacityGradient() + grad._colorSpace = 'DeviceGray' + + for stop in @stops + grad.stop stop[0], [stop[2]] + + grad = grad.embed(@matrix) + + pageBBox = [0, 0, @doc.page.width, @doc.page.height] + + form = @doc.ref + Type: 'XObject' + Subtype: 'Form' + FormType: 1 + BBox: pageBBox + Group: + Type: 'Group' + S: 'Transparency' + CS: 'DeviceGray' + Resources: + ProcSet: ['PDF', 'Text', 'ImageB', 'ImageC', 'ImageI'] + Pattern: + Sh1: grad + + form.write "/Pattern cs /Sh1 scn" + form.end "#{pageBBox.join(" ")} re f" + + gstate = @doc.ref + Type: 'ExtGState' + SMask: + Type: 'Mask' + S: 'Luminosity' + G: form + + gstate.end() + + opacityPattern = @doc.ref + Type: 'Pattern' + PatternType: 1 + PaintType: 1 + TilingType: 2 + BBox: pageBBox + XStep: pageBBox[2] + YStep: pageBBox[3] + Resources: + ProcSet: ['PDF', 'Text', 'ImageB', 'ImageC', 'ImageI'] + Pattern: + Sh1: pattern + ExtGState: + Gs1: gstate + + opacityPattern.write "/Gs1 gs /Pattern cs /Sh1 scn" + opacityPattern.end "#{pageBBox.join(" ")} re f" + + @doc.page.patterns[@id] = opacityPattern + + else + @doc.page.patterns[@id] = pattern + + return pattern + + apply: (op) -> + # apply gradient transform to existing document ctm + [m0, m1, m2, m3, m4, m5] = @doc._ctm.slice() + [m11, m12, m21, m22, dx, dy] = @transform + m = [m0 * m11 + m2 * m12, + m1 * m11 + m3 * m12, + m0 * m21 + m2 * m22, + m1 * m21 + m3 * m22, + m0 * dx + m2 * dy + m4, + m1 * dx + m3 * dy + m5] + + @embed(m) unless @embedded and m.join(" ") is @matrix.join(" ") + @doc.addContent "/#{@id} #{op}" + +class PDFLinearGradient extends PDFGradient + constructor: (@doc, @x1, @y1, @x2, @y2) -> + super + + shader: (fn) -> + @doc.ref + ShadingType: 2 + ColorSpace: @_colorSpace + Coords: [@x1, @y1, @x2, @y2] + Function: fn + Extend: [true, true] + + opacityGradient: -> + return new PDFLinearGradient(@doc, @x1, @y1, @x2, @y2) + +class PDFRadialGradient extends PDFGradient + constructor: (@doc, @x1, @y1, @r1, @x2, @y2, @r2) -> + super + + shader: (fn) -> + @doc.ref + ShadingType: 3 + ColorSpace: @_colorSpace + Coords: [@x1, @y1, @r1, @x2, @y2, @r2] + Function: fn + Extend: [true, true] + + opacityGradient: -> + return new PDFRadialGradient(@doc, @x1, @y1, @r1, @x2, @y2, @r2) + +module.exports = {PDFGradient, PDFLinearGradient, PDFRadialGradient} diff --git a/pitfall/pdfkit/lib/gradient.js b/pitfall/pdfkit/lib/gradient.js new file mode 100644 index 00000000..06a04606 --- /dev/null +++ b/pitfall/pdfkit/lib/gradient.js @@ -0,0 +1,240 @@ +// Generated by CoffeeScript 1.12.5 +(function() { + var PDFGradient, PDFLinearGradient, PDFRadialGradient, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + PDFGradient = (function() { + function PDFGradient(doc) { + this.doc = doc; + this.stops = []; + this.embedded = false; + this.transform = [1, 0, 0, 1, 0, 0]; + this._colorSpace = 'DeviceRGB'; + } + + PDFGradient.prototype.stop = function(pos, color, opacity) { + if (opacity == null) { + opacity = 1; + } + opacity = Math.max(0, Math.min(1, opacity)); + this.stops.push([pos, this.doc._normalizeColor(color), opacity]); + return this; + }; + + PDFGradient.prototype.setTransform = function(m11, m12, m21, m22, dx, dy) { + this.transform = [m11, m12, m21, m22, dx, dy]; + return this; + }; + + PDFGradient.prototype.embed = function(m) { + var bounds, encode, fn, form, grad, gstate, i, j, k, last, len, opacityPattern, pageBBox, pattern, ref, ref1, shader, stop, stops, v; + if (this.stops.length === 0) { + return; + } + this.embedded = true; + this.matrix = m; + last = this.stops[this.stops.length - 1]; + if (last[0] < 1) { + this.stops.push([1, last[1], last[2]]); + } + bounds = []; + encode = []; + stops = []; + for (i = j = 0, ref = this.stops.length - 1; 0 <= ref ? j < ref : j > ref; i = 0 <= ref ? ++j : --j) { + encode.push(0, 1); + if (i + 2 !== this.stops.length) { + bounds.push(this.stops[i + 1][0]); + } + fn = this.doc.ref({ + FunctionType: 2, + Domain: [0, 1], + C0: this.stops[i + 0][1], + C1: this.stops[i + 1][1], + N: 1 + }); + stops.push(fn); + fn.end(); + } + if (stops.length === 1) { + fn = stops[0]; + } else { + fn = this.doc.ref({ + FunctionType: 3, + Domain: [0, 1], + Functions: stops, + Bounds: bounds, + Encode: encode + }); + fn.end(); + } + this.id = 'Sh' + (++this.doc._gradCount); + shader = this.shader(fn); + shader.end(); + pattern = this.doc.ref({ + Type: 'Pattern', + PatternType: 2, + Shading: shader, + Matrix: (function() { + var k, len, ref1, results; + ref1 = this.matrix; + results = []; + for (k = 0, len = ref1.length; k < len; k++) { + v = ref1[k]; + results.push(+v.toFixed(5)); + } + return results; + }).call(this) + }); + pattern.end(); + if (this.stops.some(function(stop) { + return stop[2] < 1; + })) { + grad = this.opacityGradient(); + grad._colorSpace = 'DeviceGray'; + ref1 = this.stops; + for (k = 0, len = ref1.length; k < len; k++) { + stop = ref1[k]; + grad.stop(stop[0], [stop[2]]); + } + grad = grad.embed(this.matrix); + pageBBox = [0, 0, this.doc.page.width, this.doc.page.height]; + form = this.doc.ref({ + Type: 'XObject', + Subtype: 'Form', + FormType: 1, + BBox: pageBBox, + Group: { + Type: 'Group', + S: 'Transparency', + CS: 'DeviceGray' + }, + Resources: { + ProcSet: ['PDF', 'Text', 'ImageB', 'ImageC', 'ImageI'], + Pattern: { + Sh1: grad + } + } + }); + form.write("/Pattern cs /Sh1 scn"); + form.end((pageBBox.join(" ")) + " re f"); + gstate = this.doc.ref({ + Type: 'ExtGState', + SMask: { + Type: 'Mask', + S: 'Luminosity', + G: form + } + }); + gstate.end(); + opacityPattern = this.doc.ref({ + Type: 'Pattern', + PatternType: 1, + PaintType: 1, + TilingType: 2, + BBox: pageBBox, + XStep: pageBBox[2], + YStep: pageBBox[3], + Resources: { + ProcSet: ['PDF', 'Text', 'ImageB', 'ImageC', 'ImageI'], + Pattern: { + Sh1: pattern + }, + ExtGState: { + Gs1: gstate + } + } + }); + opacityPattern.write("/Gs1 gs /Pattern cs /Sh1 scn"); + opacityPattern.end((pageBBox.join(" ")) + " re f"); + this.doc.page.patterns[this.id] = opacityPattern; + } else { + this.doc.page.patterns[this.id] = pattern; + } + return pattern; + }; + + PDFGradient.prototype.apply = function(op) { + var dx, dy, m, m0, m1, m11, m12, m2, m21, m22, m3, m4, m5, ref, ref1; + ref = this.doc._ctm.slice(), m0 = ref[0], m1 = ref[1], m2 = ref[2], m3 = ref[3], m4 = ref[4], m5 = ref[5]; + ref1 = this.transform, m11 = ref1[0], m12 = ref1[1], m21 = ref1[2], m22 = ref1[3], dx = ref1[4], dy = ref1[5]; + m = [m0 * m11 + m2 * m12, m1 * m11 + m3 * m12, m0 * m21 + m2 * m22, m1 * m21 + m3 * m22, m0 * dx + m2 * dy + m4, m1 * dx + m3 * dy + m5]; + if (!(this.embedded && m.join(" ") === this.matrix.join(" "))) { + this.embed(m); + } + return this.doc.addContent("/" + this.id + " " + op); + }; + + return PDFGradient; + + })(); + + PDFLinearGradient = (function(superClass) { + extend(PDFLinearGradient, superClass); + + function PDFLinearGradient(doc, x1, y1, x2, y2) { + this.doc = doc; + this.x1 = x1; + this.y1 = y1; + this.x2 = x2; + this.y2 = y2; + PDFLinearGradient.__super__.constructor.apply(this, arguments); + } + + PDFLinearGradient.prototype.shader = function(fn) { + return this.doc.ref({ + ShadingType: 2, + ColorSpace: this._colorSpace, + Coords: [this.x1, this.y1, this.x2, this.y2], + Function: fn, + Extend: [true, true] + }); + }; + + PDFLinearGradient.prototype.opacityGradient = function() { + return new PDFLinearGradient(this.doc, this.x1, this.y1, this.x2, this.y2); + }; + + return PDFLinearGradient; + + })(PDFGradient); + + PDFRadialGradient = (function(superClass) { + extend(PDFRadialGradient, superClass); + + function PDFRadialGradient(doc, x1, y1, r1, x2, y2, r2) { + this.doc = doc; + this.x1 = x1; + this.y1 = y1; + this.r1 = r1; + this.x2 = x2; + this.y2 = y2; + this.r2 = r2; + PDFRadialGradient.__super__.constructor.apply(this, arguments); + } + + PDFRadialGradient.prototype.shader = function(fn) { + return this.doc.ref({ + ShadingType: 3, + ColorSpace: this._colorSpace, + Coords: [this.x1, this.y1, this.r1, this.x2, this.y2, this.r2], + Function: fn, + Extend: [true, true] + }); + }; + + PDFRadialGradient.prototype.opacityGradient = function() { + return new PDFRadialGradient(this.doc, this.x1, this.y1, this.r1, this.x2, this.y2, this.r2); + }; + + return PDFRadialGradient; + + })(PDFGradient); + + module.exports = { + PDFGradient: PDFGradient, + PDFLinearGradient: PDFLinearGradient, + PDFRadialGradient: PDFRadialGradient + }; + +}).call(this); diff --git a/pitfall/pdfkit/lib/image.coffee b/pitfall/pdfkit/lib/image.coffee new file mode 100644 index 00000000..5078c4ab --- /dev/null +++ b/pitfall/pdfkit/lib/image.coffee @@ -0,0 +1,34 @@ +### +PDFImage - embeds images in PDF documents +By Devon Govett +### + +fs = require 'fs' +Data = require './data' +JPEG = require './image/jpeg' +PNG = require './image/png' + +class PDFImage + @open: (src, label) -> + if Buffer.isBuffer(src) + data = src + else if src instanceof ArrayBuffer + data = new Buffer(new Uint8Array(src)) + else + if match = /^data:.+;base64,(.*)$/.exec(src) + data = new Buffer(match[1], 'base64') + + else + data = fs.readFileSync src + return unless data + + if data[0] is 0xff and data[1] is 0xd8 + return new JPEG(data, label) + + else if data[0] is 0x89 and data.toString('ascii', 1, 4) is 'PNG' + return new PNG(data, label) + + else + throw new Error 'Unknown image format.' + +module.exports = PDFImage \ No newline at end of file diff --git a/pitfall/pdfkit/lib/image.js b/pitfall/pdfkit/lib/image.js new file mode 100644 index 00000000..04281434 --- /dev/null +++ b/pitfall/pdfkit/lib/image.js @@ -0,0 +1,53 @@ +// Generated by CoffeeScript 1.12.5 + +/* +PDFImage - embeds images in PDF documents +By Devon Govett + */ + +(function() { + var Data, JPEG, PDFImage, PNG, fs; + + fs = require('fs'); + + Data = require('./data'); + + JPEG = require('./image/jpeg'); + + PNG = require('./image/png'); + + PDFImage = (function() { + function PDFImage() {} + + PDFImage.open = function(src, label) { + var data, match; + if (Buffer.isBuffer(src)) { + data = src; + } else if (src instanceof ArrayBuffer) { + data = new Buffer(new Uint8Array(src)); + } else { + if (match = /^data:.+;base64,(.*)$/.exec(src)) { + data = new Buffer(match[1], 'base64'); + } else { + data = fs.readFileSync(src); + if (!data) { + return; + } + } + } + if (data[0] === 0xff && data[1] === 0xd8) { + return new JPEG(data, label); + } else if (data[0] === 0x89 && data.toString('ascii', 1, 4) === 'PNG') { + return new PNG(data, label); + } else { + throw new Error('Unknown image format.'); + } + }; + + return PDFImage; + + })(); + + module.exports = PDFImage; + +}).call(this); diff --git a/pitfall/pdfkit/lib/image/jpeg.coffee b/pitfall/pdfkit/lib/image/jpeg.coffee new file mode 100644 index 00000000..c7cebf8c --- /dev/null +++ b/pitfall/pdfkit/lib/image/jpeg.coffee @@ -0,0 +1,59 @@ +fs = require 'fs' + +class JPEG + MARKERS = [0xFFC0, 0xFFC1, 0xFFC2, 0xFFC3, 0xFFC5, 0xFFC6, 0xFFC7, + 0xFFC8, 0xFFC9, 0xFFCA, 0xFFCB, 0xFFCC, 0xFFCD, 0xFFCE, 0xFFCF] + + constructor: (@data, @label) -> + if @data.readUInt16BE(0) isnt 0xFFD8 + throw "SOI not found in JPEG" + + pos = 2 + while pos < @data.length + marker = @data.readUInt16BE(pos) + pos += 2 + break if marker in MARKERS + pos += @data.readUInt16BE(pos) + + throw "Invalid JPEG." unless marker in MARKERS + pos += 2 + + @bits = @data[pos++] + @height = @data.readUInt16BE(pos) + pos += 2 + + @width = @data.readUInt16BE(pos) + pos += 2 + + channels = @data[pos++] + @colorSpace = switch channels + when 1 then 'DeviceGray' + when 3 then 'DeviceRGB' + when 4 then 'DeviceCMYK' + + @obj = null + + embed: (document) -> + return if @obj + + @obj = document.ref + Type: 'XObject' + Subtype: 'Image' + BitsPerComponent: @bits + Width: @width + Height: @height + ColorSpace: @colorSpace + Filter: 'DCTDecode' + + # add extra decode params for CMYK images. By swapping the + # min and max values from the default, we invert the colors. See + # section 4.8.4 of the spec. + if @colorSpace is 'DeviceCMYK' + @obj.data['Decode'] = [1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0] + + @obj.end @data + + # free memory + @data = null + +module.exports = JPEG diff --git a/pitfall/pdfkit/lib/image/png.coffee b/pitfall/pdfkit/lib/image/png.coffee new file mode 100644 index 00000000..11090ed5 --- /dev/null +++ b/pitfall/pdfkit/lib/image/png.coffee @@ -0,0 +1,134 @@ +zlib = require 'zlib' +PNG = require 'png-js' + +class PNGImage + constructor: (data, @label) -> + @image = new PNG(data) + @width = @image.width + @height = @image.height + @imgData = @image.imgData + @obj = null + + embed: (@document) -> + return if @obj + + @obj = @document.ref + Type: 'XObject' + Subtype: 'Image' + BitsPerComponent: @image.bits + Width: @width + Height: @height + Filter: 'FlateDecode' + + unless @image.hasAlphaChannel + params = @document.ref + Predictor: 15 + Colors: @image.colors + BitsPerComponent: @image.bits + Columns: @width + + @obj.data['DecodeParms'] = params + params.end() + + if @image.palette.length is 0 + @obj.data['ColorSpace'] = @image.colorSpace + else + # embed the color palette in the PDF as an object stream + palette = @document.ref() + palette.end new Buffer @image.palette + + # build the color space array for the image + @obj.data['ColorSpace'] = ['Indexed', 'DeviceRGB', (@image.palette.length / 3) - 1, palette] + + # For PNG color types 0, 2 and 3, the transparency data is stored in + # a dedicated PNG chunk. + if @image.transparency.grayscale + # Use Color Key Masking (spec section 4.8.5) + # An array with N elements, where N is two times the number of color components. + val = @image.transparency.greyscale + @obj.data['Mask'] = [val, val] + + else if @image.transparency.rgb + # Use Color Key Masking (spec section 4.8.5) + # An array with N elements, where N is two times the number of color components. + rgb = @image.transparency.rgb + mask = [] + for x in rgb + mask.push x, x + + @obj.data['Mask'] = mask + + else if @image.transparency.indexed + # Create a transparency SMask for the image based on the data + # in the PLTE and tRNS sections. See below for details on SMasks. + @loadIndexedAlphaChannel() + + else if @image.hasAlphaChannel + # For PNG color types 4 and 6, the transparency data is stored as a alpha + # channel mixed in with the main image data. Separate this data out into an + # SMask object and store it separately in the PDF. + @splitAlphaChannel() + + else + @finalize() + + finalize: -> + if @alphaChannel + sMask = @document.ref + Type: 'XObject' + Subtype: 'Image' + Height: @height + Width: @width + BitsPerComponent: 8 + Filter: 'FlateDecode' + ColorSpace: 'DeviceGray' + Decode: [0, 1] + + sMask.end @alphaChannel + @obj.data['SMask'] = sMask + + # add the actual image data + @obj.end @imgData + + # free memory + @image = null + @imgData = null + + splitAlphaChannel: -> + @image.decodePixels (pixels) => + colorByteSize = @image.colors * @image.bits / 8 + pixelCount = @width * @height + imgData = new Buffer(pixelCount * colorByteSize) + alphaChannel = new Buffer(pixelCount) + + i = p = a = 0 + len = pixels.length + while i < len + imgData[p++] = pixels[i++] + imgData[p++] = pixels[i++] + imgData[p++] = pixels[i++] + alphaChannel[a++] = pixels[i++] + + done = 0 + zlib.deflate imgData, (err, @imgData) => + throw err if err + @finalize() if ++done is 2 + + zlib.deflate alphaChannel, (err, @alphaChannel) => + throw err if err + @finalize() if ++done is 2 + + loadIndexedAlphaChannel: (fn) -> + transparency = @image.transparency.indexed + @image.decodePixels (pixels) => + alphaChannel = new Buffer(@width * @height) + + i = 0 + for j in [0...pixels.length] by 1 + alphaChannel[i++] = transparency[pixels[j]] + + zlib.deflate alphaChannel, (err, @alphaChannel) => + throw err if err + @finalize() + +module.exports = PNGImage diff --git a/pitfall/pdfkit/lib/line_wrapper.coffee b/pitfall/pdfkit/lib/line_wrapper.coffee new file mode 100644 index 00000000..a64aa028 --- /dev/null +++ b/pitfall/pdfkit/lib/line_wrapper.coffee @@ -0,0 +1,230 @@ +{EventEmitter} = require 'events' +LineBreaker = require 'linebreak' + +class LineWrapper extends EventEmitter + constructor: (@document, options) -> + @indent = options.indent or 0 + @characterSpacing = options.characterSpacing or 0 + @wordSpacing = options.wordSpacing is 0 + @columns = options.columns or 1 + @columnGap = options.columnGap ? 18 # 1/4 inch + @lineWidth = (options.width - (@columnGap * (@columns - 1))) / @columns + @spaceLeft = @lineWidth + @startX = @document.x + @startY = @document.y + @column = 1 + @ellipsis = options.ellipsis + @continuedX = 0 + @features = options.features + + # calculate the maximum Y position the text can appear at + if options.height? + @height = options.height + @maxY = @startY + options.height + else + @maxY = @document.page.maxY() + + # handle paragraph indents + @on 'firstLine', (options) => + # if this is the first line of the text segment, and + # we're continuing where we left off, indent that much + # otherwise use the user specified indent option + indent = @continuedX or @indent + @document.x += indent + @lineWidth -= indent + + @once 'line', => + @document.x -= indent + @lineWidth += indent + if options.continued and not @continuedX + @continuedX = @indent + @continuedX = 0 unless options.continued + + # handle left aligning last lines of paragraphs + @on 'lastLine', (options) => + align = options.align + options.align = 'left' if align is 'justify' + @lastLine = true + + @once 'line', => + @document.y += options.paragraphGap or 0 + options.align = align + @lastLine = false + + wordWidth: (word) -> + return @document.widthOfString(word, this) + @characterSpacing + @wordSpacing + + eachWord: (text, fn) -> + # setup a unicode line breaker + breaker = new LineBreaker(text) + last = null + wordWidths = Object.create(null) + + while bk = breaker.nextBreak() + word = text.slice(last?.position or 0, bk.position) + w = wordWidths[word] ?= @wordWidth word + + # if the word is longer than the whole line, chop it up + # TODO: break by grapheme clusters, not JS string characters + if w > @lineWidth + @continuedX + # make some fake break objects + lbk = last + fbk = {} + + while word.length + # fit as much of the word as possible into the space we have + l = word.length + while w > @spaceLeft + w = @wordWidth word.slice(0, --l) + + # send a required break unless this is the last piece + fbk.required = l < word.length + shouldContinue = fn word.slice(0, l), w, fbk, lbk + lbk = required: false + + # get the remaining piece of the word + word = word.slice(l) + w = @wordWidth word + + break if shouldContinue is no + else + # otherwise just emit the break as it was given to us + shouldContinue = fn word, w, bk, last + + break if shouldContinue is no + last = bk + + return + + wrap: (text, options) -> + # override options from previous continued fragments + @indent = options.indent if options.indent? + @characterSpacing = options.characterSpacing if options.characterSpacing? + @wordSpacing = options.wordSpacing if options.wordSpacing? + @ellipsis = options.ellipsis if options.ellipsis? + + # make sure we're actually on the page + # and that the first line of is never by + # itself at the bottom of a page (orphans) + nextY = @document.y + @document.currentLineHeight(true) + if @document.y > @maxY or nextY > @maxY + @nextSection() + + buffer = '' + textWidth = 0 + wc = 0 + lc = 0 + + y = @document.y # used to reset Y pos if options.continued (below) + emitLine = => + options.textWidth = textWidth + @wordSpacing * (wc - 1) + options.wordCount = wc + options.lineWidth = @lineWidth + y = @document.y + @emit 'line', buffer, options, this + lc++ + + @emit 'sectionStart', options, this + + @eachWord text, (word, w, bk, last) => + if not last? or last.required + @emit 'firstLine', options, this + @spaceLeft = @lineWidth + + if w <= @spaceLeft + buffer += word + textWidth += w + wc++ + + if bk.required or w > @spaceLeft + if bk.required + @emit 'lastLine', options, this + + # if the user specified a max height and an ellipsis, and is about to pass the + # max height and max columns after the next line, append the ellipsis + lh = @document.currentLineHeight(true) + if @height? and @ellipsis and @document.y + lh * 2 > @maxY and @column >= @columns + @ellipsis = '…' if @ellipsis is true # map default ellipsis character + buffer = buffer.replace(/\s+$/, '') + textWidth = @wordWidth buffer + @ellipsis + + # remove characters from the buffer until the ellipsis fits + while textWidth > @lineWidth + buffer = buffer.slice(0, -1).replace(/\s+$/, '') + textWidth = @wordWidth buffer + @ellipsis + + buffer = buffer + @ellipsis + + if bk.required and w > @spaceLeft + buffer = word + textWidth = w + wc = 1 + + emitLine() + + # if we've reached the edge of the page, + # continue on a new page or column + if @document.y + lh > @maxY + shouldContinue = @nextSection() + + # stop if we reached the maximum height + unless shouldContinue + wc = 0 + buffer = '' + return no + + # reset the space left and buffer + if bk.required + @spaceLeft = @lineWidth + buffer = '' + textWidth = 0 + wc = 0 + else + # reset the space left and buffer + @spaceLeft = @lineWidth - w + buffer = word + textWidth = w + wc = 1 + else + @spaceLeft -= w + + if wc > 0 + @emit 'lastLine', options, this + emitLine() + + @emit 'sectionEnd', options, this + + # if the wrap is set to be continued, save the X position + # to start the first line of the next segment at, and reset + # the y position + if options.continued is yes + @continuedX = 0 if lc > 1 + @continuedX += options.textWidth + @document.y = y + else + @document.x = @startX + + nextSection: (options) -> + @emit 'sectionEnd', options, this + + if ++@column > @columns + # if a max height was specified by the user, we're done. + # otherwise, the default is to make a new page at the bottom. + return false if @height? + + @document.addPage() + @column = 1 + @startY = @document.page.margins.top + @maxY = @document.page.maxY() + @document.x = @startX + @document.fillColor @document._fillColor... if @document._fillColor + @emit 'pageBreak', options, this + else + @document.x += @lineWidth + @columnGap + @document.y = @startY + @emit 'columnBreak', options, this + + @emit 'sectionStart', options, this + return true + +module.exports = LineWrapper diff --git a/pitfall/pdfkit/lib/line_wrapper.js b/pitfall/pdfkit/lib/line_wrapper.js new file mode 100644 index 00000000..d0209174 --- /dev/null +++ b/pitfall/pdfkit/lib/line_wrapper.js @@ -0,0 +1,252 @@ +// Generated by CoffeeScript 1.12.5 +(function() { + var EventEmitter, LineBreaker, LineWrapper, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + EventEmitter = require('events').EventEmitter; + + LineBreaker = require('linebreak'); + + LineWrapper = (function(superClass) { + extend(LineWrapper, superClass); + + function LineWrapper(document, options) { + var ref; + this.document = document; + this.indent = options.indent || 0; + this.characterSpacing = options.characterSpacing || 0; + this.wordSpacing = options.wordSpacing === 0; + this.columns = options.columns || 1; + this.columnGap = (ref = options.columnGap) != null ? ref : 18; + this.lineWidth = (options.width - (this.columnGap * (this.columns - 1))) / this.columns; + this.spaceLeft = this.lineWidth; + this.startX = this.document.x; + this.startY = this.document.y; + this.column = 1; + this.ellipsis = options.ellipsis; + this.continuedX = 0; + this.features = options.features; + if (options.height != null) { + this.height = options.height; + this.maxY = this.startY + options.height; + } else { + this.maxY = this.document.page.maxY(); + } + this.on('firstLine', (function(_this) { + return function(options) { + var indent; + indent = _this.continuedX || _this.indent; + _this.document.x += indent; + _this.lineWidth -= indent; + return _this.once('line', function() { + _this.document.x -= indent; + _this.lineWidth += indent; + if (options.continued && !_this.continuedX) { + _this.continuedX = _this.indent; + } + if (!options.continued) { + return _this.continuedX = 0; + } + }); + }; + })(this)); + this.on('lastLine', (function(_this) { + return function(options) { + var align; + align = options.align; + if (align === 'justify') { + options.align = 'left'; + } + _this.lastLine = true; + return _this.once('line', function() { + _this.document.y += options.paragraphGap || 0; + options.align = align; + return _this.lastLine = false; + }); + }; + })(this)); + } + + LineWrapper.prototype.wordWidth = function(word) { + return this.document.widthOfString(word, this) + this.characterSpacing + this.wordSpacing; + }; + + LineWrapper.prototype.eachWord = function(text, fn) { + var bk, breaker, fbk, l, last, lbk, shouldContinue, w, word, wordWidths; + breaker = new LineBreaker(text); + last = null; + wordWidths = Object.create(null); + while (bk = breaker.nextBreak()) { + word = text.slice((last != null ? last.position : void 0) || 0, bk.position); + w = wordWidths[word] != null ? wordWidths[word] : wordWidths[word] = this.wordWidth(word); + if (w > this.lineWidth + this.continuedX) { + lbk = last; + fbk = {}; + while (word.length) { + l = word.length; + while (w > this.spaceLeft) { + w = this.wordWidth(word.slice(0, --l)); + } + fbk.required = l < word.length; + shouldContinue = fn(word.slice(0, l), w, fbk, lbk); + lbk = { + required: false + }; + word = word.slice(l); + w = this.wordWidth(word); + if (shouldContinue === false) { + break; + } + } + } else { + shouldContinue = fn(word, w, bk, last); + } + if (shouldContinue === false) { + break; + } + last = bk; + } + }; + + LineWrapper.prototype.wrap = function(text, options) { + var buffer, emitLine, lc, nextY, textWidth, wc, y; + if (options.indent != null) { + this.indent = options.indent; + } + if (options.characterSpacing != null) { + this.characterSpacing = options.characterSpacing; + } + if (options.wordSpacing != null) { + this.wordSpacing = options.wordSpacing; + } + if (options.ellipsis != null) { + this.ellipsis = options.ellipsis; + } + nextY = this.document.y + this.document.currentLineHeight(true); + if (this.document.y > this.maxY || nextY > this.maxY) { + this.nextSection(); + } + buffer = ''; + textWidth = 0; + wc = 0; + lc = 0; + y = this.document.y; + emitLine = (function(_this) { + return function() { + options.textWidth = textWidth + _this.wordSpacing * (wc - 1); + options.wordCount = wc; + options.lineWidth = _this.lineWidth; + y = _this.document.y; + _this.emit('line', buffer, options, _this); + return lc++; + }; + })(this); + this.emit('sectionStart', options, this); + this.eachWord(text, (function(_this) { + return function(word, w, bk, last) { + var lh, shouldContinue; + if ((last == null) || last.required) { + _this.emit('firstLine', options, _this); + _this.spaceLeft = _this.lineWidth; + } + if (w <= _this.spaceLeft) { + buffer += word; + textWidth += w; + wc++; + } + if (bk.required || w > _this.spaceLeft) { + if (bk.required) { + _this.emit('lastLine', options, _this); + } + lh = _this.document.currentLineHeight(true); + if ((_this.height != null) && _this.ellipsis && _this.document.y + lh * 2 > _this.maxY && _this.column >= _this.columns) { + if (_this.ellipsis === true) { + _this.ellipsis = '…'; + } + buffer = buffer.replace(/\s+$/, ''); + textWidth = _this.wordWidth(buffer + _this.ellipsis); + while (textWidth > _this.lineWidth) { + buffer = buffer.slice(0, -1).replace(/\s+$/, ''); + textWidth = _this.wordWidth(buffer + _this.ellipsis); + } + buffer = buffer + _this.ellipsis; + } + if (bk.required && w > _this.spaceLeft) { + buffer = word; + textWidth = w; + wc = 1; + } + emitLine(); + if (_this.document.y + lh > _this.maxY) { + shouldContinue = _this.nextSection(); + if (!shouldContinue) { + wc = 0; + buffer = ''; + return false; + } + } + if (bk.required) { + _this.spaceLeft = _this.lineWidth; + buffer = ''; + textWidth = 0; + return wc = 0; + } else { + _this.spaceLeft = _this.lineWidth - w; + buffer = word; + textWidth = w; + return wc = 1; + } + } else { + return _this.spaceLeft -= w; + } + }; + })(this)); + if (wc > 0) { + this.emit('lastLine', options, this); + emitLine(); + } + this.emit('sectionEnd', options, this); + if (options.continued === true) { + if (lc > 1) { + this.continuedX = 0; + } + this.continuedX += options.textWidth; + return this.document.y = y; + } else { + return this.document.x = this.startX; + } + }; + + LineWrapper.prototype.nextSection = function(options) { + var ref; + this.emit('sectionEnd', options, this); + if (++this.column > this.columns) { + if (this.height != null) { + return false; + } + this.document.addPage(); + this.column = 1; + this.startY = this.document.page.margins.top; + this.maxY = this.document.page.maxY(); + this.document.x = this.startX; + if (this.document._fillColor) { + (ref = this.document).fillColor.apply(ref, this.document._fillColor); + } + this.emit('pageBreak', options, this); + } else { + this.document.x += this.lineWidth + this.columnGap; + this.document.y = this.startY; + this.emit('columnBreak', options, this); + } + this.emit('sectionStart', options, this); + return true; + }; + + return LineWrapper; + + })(EventEmitter); + + module.exports = LineWrapper; + +}).call(this); diff --git a/pitfall/pdfkit/lib/mixins/annotations.coffee b/pitfall/pdfkit/lib/mixins/annotations.coffee new file mode 100644 index 00000000..482f15d6 --- /dev/null +++ b/pitfall/pdfkit/lib/mixins/annotations.coffee @@ -0,0 +1,93 @@ +module.exports = + annotate: (x, y, w, h, options) -> + options.Type = 'Annot' + options.Rect = @_convertRect x, y, w, h + options.Border = [0, 0, 0] + options.C ?= @_normalizeColor(options.color or [0, 0, 0]) unless options.Subtype is 'Link' # convert colors + delete options.color + + if typeof options.Dest is 'string' + options.Dest = new String options.Dest + + # Capitalize keys + for key, val of options + options[key[0].toUpperCase() + key.slice(1)] = val + + ref = @ref options + @page.annotations.push ref + ref.end() + return this + + note: (x, y, w, h, contents, options = {}) -> + options.Subtype = 'Text' + options.Contents = new String contents + options.Name = 'Comment' + options.color ?= [243, 223, 92] + @annotate x, y, w, h, options + + link: (x, y, w, h, url, options = {}) -> + options.Subtype = 'Link' + options.A = @ref + S: 'URI' + URI: new String url + + options.A.end() + @annotate x, y, w, h, options + + _markup: (x, y, w, h, options = {}) -> + [x1, y1, x2, y2] = @_convertRect x, y, w, h + options.QuadPoints = [x1, y2, x2, y2, x1, y1, x2, y1] + options.Contents = new String + @annotate x, y, w, h, options + + highlight: (x, y, w, h, options = {}) -> + options.Subtype = 'Highlight' + options.color ?= [241, 238, 148] + @_markup x, y, w, h, options + + underline: (x, y, w, h, options = {}) -> + options.Subtype = 'Underline' + @_markup x, y, w, h, options + + strike: (x, y, w, h, options = {}) -> + options.Subtype = 'StrikeOut' + @_markup x, y, w, h, options + + lineAnnotation: (x1, y1, x2, y2, options = {}) -> + options.Subtype = 'Line' + options.Contents = new String + options.L = [x1, @page.height - y1, x2, @page.height - y2] + @annotate x1, y1, x2, y2, options + + rectAnnotation: (x, y, w, h, options = {}) -> + options.Subtype = 'Square' + options.Contents = new String + @annotate x, y, w, h, options + + ellipseAnnotation: (x, y, w, h, options = {}) -> + options.Subtype = 'Circle' + options.Contents = new String + @annotate x, y, w, h, options + + textAnnotation: (x, y, w, h, text, options = {}) -> + options.Subtype = 'FreeText' + options.Contents = new String text + options.DA = new String + @annotate x, y, w, h, options + + _convertRect: (x1, y1, w, h) -> + # flip y1 and y2 + y2 = y1 + y1 += h + + # make x2 + x2 = x1 + w + + # apply current transformation matrix to points + [m0, m1, m2, m3, m4, m5] = @_ctm + x1 = m0 * x1 + m2 * y1 + m4 + y1 = m1 * x1 + m3 * y1 + m5 + x2 = m0 * x2 + m2 * y2 + m4 + y2 = m1 * x2 + m3 * y2 + m5 + + return [x1, y1, x2, y2] \ No newline at end of file diff --git a/pitfall/pdfkit/lib/mixins/color.coffee b/pitfall/pdfkit/lib/mixins/color.coffee new file mode 100644 index 00000000..ed72d9f3 --- /dev/null +++ b/pitfall/pdfkit/lib/mixins/color.coffee @@ -0,0 +1,262 @@ +{PDFGradient, PDFLinearGradient, PDFRadialGradient} = require '../gradient' + +module.exports = + initColor: -> + # The opacity dictionaries + @_opacityRegistry = {} + @_opacityCount = 0 + @_gradCount = 0 + + _normalizeColor: (color) -> + if color instanceof PDFGradient + return color + + if typeof color is 'string' + if color.charAt(0) is '#' + color = color.replace(/#([0-9A-F])([0-9A-F])([0-9A-F])/i, "#$1$1$2$2$3$3") if color.length is 4 + hex = parseInt(color.slice(1), 16) + color = [hex >> 16, hex >> 8 & 0xff, hex & 0xff] + + else if namedColors[color] + color = namedColors[color] + + if Array.isArray color + # RGB + if color.length is 3 + color = (part / 255 for part in color) + + # CMYK + else if color.length is 4 + color = (part / 100 for part in color) + + return color + + return null + + _setColor: (color, stroke) -> + color = @_normalizeColor color + return no unless color + + op = if stroke then 'SCN' else 'scn' + + if color instanceof PDFGradient + @_setColorSpace 'Pattern', stroke + color.apply(op) + else + space = if color.length is 4 then 'DeviceCMYK' else 'DeviceRGB' + @_setColorSpace space, stroke + + color = color.join ' ' + @addContent "#{color} #{op}" + + return yes + + _setColorSpace: (space, stroke) -> + op = if stroke then 'CS' else 'cs' + @addContent "/#{space} #{op}" + + fillColor: (color, opacity = 1) -> + set = @_setColor color, no + @fillOpacity opacity if set + + # save this for text wrapper, which needs to reset + # the fill color on new pages + @_fillColor = [color, opacity] + return this + + strokeColor: (color, opacity = 1) -> + set = @_setColor color, yes + @strokeOpacity opacity if set + return this + + opacity: (opacity) -> + @_doOpacity opacity, opacity + return this + + fillOpacity: (opacity) -> + @_doOpacity opacity, null + return this + + strokeOpacity: (opacity) -> + @_doOpacity null, opacity + return this + + _doOpacity: (fillOpacity, strokeOpacity) -> + return unless fillOpacity? or strokeOpacity? + + fillOpacity = Math.max 0, Math.min 1, fillOpacity if fillOpacity? + strokeOpacity = Math.max 0, Math.min 1, strokeOpacity if strokeOpacity? + key = "#{fillOpacity}_#{strokeOpacity}" + + if @_opacityRegistry[key] + [dictionary, name] = @_opacityRegistry[key] + else + dictionary = + Type: 'ExtGState' + + dictionary.ca = fillOpacity if fillOpacity? + dictionary.CA = strokeOpacity if strokeOpacity? + + dictionary = @ref dictionary + dictionary.end() + id = ++@_opacityCount + name = "Gs#{id}" + @_opacityRegistry[key] = [dictionary, name] + + @page.ext_gstates[name] = dictionary + @addContent "/#{name} gs" + + linearGradient: (x1, y1, x2, y2) -> + return new PDFLinearGradient(this, x1, y1, x2, y2) + + radialGradient: (x1, y1, r1, x2, y2, r2) -> + return new PDFRadialGradient(this, x1, y1, r1, x2, y2, r2) + +namedColors = + aliceblue: [240, 248, 255] + antiquewhite: [250, 235, 215] + aqua: [0, 255, 255] + aquamarine: [127, 255, 212] + azure: [240, 255, 255] + beige: [245, 245, 220] + bisque: [255, 228, 196] + black: [0, 0, 0] + blanchedalmond: [255, 235, 205] + blue: [0, 0, 255] + blueviolet: [138, 43, 226] + brown: [165, 42, 42] + burlywood: [222, 184, 135] + cadetblue: [95, 158, 160] + chartreuse: [127, 255, 0] + chocolate: [210, 105, 30] + coral: [255, 127, 80] + cornflowerblue: [100, 149, 237] + cornsilk: [255, 248, 220] + crimson: [220, 20, 60] + cyan: [0, 255, 255] + darkblue: [0, 0, 139] + darkcyan: [0, 139, 139] + darkgoldenrod: [184, 134, 11] + darkgray: [169, 169, 169] + darkgreen: [0, 100, 0] + darkgrey: [169, 169, 169] + darkkhaki: [189, 183, 107] + darkmagenta: [139, 0, 139] + darkolivegreen: [85, 107, 47] + darkorange: [255, 140, 0] + darkorchid: [153, 50, 204] + darkred: [139, 0, 0] + darksalmon: [233, 150, 122] + darkseagreen: [143, 188, 143] + darkslateblue: [72, 61, 139] + darkslategray: [47, 79, 79] + darkslategrey: [47, 79, 79] + darkturquoise: [0, 206, 209] + darkviolet: [148, 0, 211] + deeppink: [255, 20, 147] + deepskyblue: [0, 191, 255] + dimgray: [105, 105, 105] + dimgrey: [105, 105, 105] + dodgerblue: [30, 144, 255] + firebrick: [178, 34, 34] + floralwhite: [255, 250, 240] + forestgreen: [34, 139, 34] + fuchsia: [255, 0, 255] + gainsboro: [220, 220, 220] + ghostwhite: [248, 248, 255] + gold: [255, 215, 0] + goldenrod: [218, 165, 32] + gray: [128, 128, 128] + grey: [128, 128, 128] + green: [0, 128, 0] + greenyellow: [173, 255, 47] + honeydew: [240, 255, 240] + hotpink: [255, 105, 180] + indianred: [205, 92, 92] + indigo: [75, 0, 130] + ivory: [255, 255, 240] + khaki: [240, 230, 140] + lavender: [230, 230, 250] + lavenderblush: [255, 240, 245] + lawngreen: [124, 252, 0] + lemonchiffon: [255, 250, 205] + lightblue: [173, 216, 230] + lightcoral: [240, 128, 128] + lightcyan: [224, 255, 255] + lightgoldenrodyellow: [250, 250, 210] + lightgray: [211, 211, 211] + lightgreen: [144, 238, 144] + lightgrey: [211, 211, 211] + lightpink: [255, 182, 193] + lightsalmon: [255, 160, 122] + lightseagreen: [32, 178, 170] + lightskyblue: [135, 206, 250] + lightslategray: [119, 136, 153] + lightslategrey: [119, 136, 153] + lightsteelblue: [176, 196, 222] + lightyellow: [255, 255, 224] + lime: [0, 255, 0] + limegreen: [50, 205, 50] + linen: [250, 240, 230] + magenta: [255, 0, 255] + maroon: [128, 0, 0] + mediumaquamarine: [102, 205, 170] + mediumblue: [0, 0, 205] + mediumorchid: [186, 85, 211] + mediumpurple: [147, 112, 219] + mediumseagreen: [60, 179, 113] + mediumslateblue: [123, 104, 238] + mediumspringgreen: [0, 250, 154] + mediumturquoise: [72, 209, 204] + mediumvioletred: [199, 21, 133] + midnightblue: [25, 25, 112] + mintcream: [245, 255, 250] + mistyrose: [255, 228, 225] + moccasin: [255, 228, 181] + navajowhite: [255, 222, 173] + navy: [0, 0, 128] + oldlace: [253, 245, 230] + olive: [128, 128, 0] + olivedrab: [107, 142, 35] + orange: [255, 165, 0] + orangered: [255, 69, 0] + orchid: [218, 112, 214] + palegoldenrod: [238, 232, 170] + palegreen: [152, 251, 152] + paleturquoise: [175, 238, 238] + palevioletred: [219, 112, 147] + papayawhip: [255, 239, 213] + peachpuff: [255, 218, 185] + peru: [205, 133, 63] + pink: [255, 192, 203] + plum: [221, 160, 221] + powderblue: [176, 224, 230] + purple: [128, 0, 128] + red: [255, 0, 0] + rosybrown: [188, 143, 143] + royalblue: [65, 105, 225] + saddlebrown: [139, 69, 19] + salmon: [250, 128, 114] + sandybrown: [244, 164, 96] + seagreen: [46, 139, 87] + seashell: [255, 245, 238] + sienna: [160, 82, 45] + silver: [192, 192, 192] + skyblue: [135, 206, 235] + slateblue: [106, 90, 205] + slategray: [112, 128, 144] + slategrey: [112, 128, 144] + snow: [255, 250, 250] + springgreen: [0, 255, 127] + steelblue: [70, 130, 180] + tan: [210, 180, 140] + teal: [0, 128, 128] + thistle: [216, 191, 216] + tomato: [255, 99, 71] + turquoise: [64, 224, 208] + violet: [238, 130, 238] + wheat: [245, 222, 179] + white: [255, 255, 255] + whitesmoke: [245, 245, 245] + yellow: [255, 255, 0] + yellowgreen: [154, 205, 50] diff --git a/pitfall/pdfkit/lib/mixins/fonts.coffee b/pitfall/pdfkit/lib/mixins/fonts.coffee new file mode 100644 index 00000000..6d86d821 --- /dev/null +++ b/pitfall/pdfkit/lib/mixins/fonts.coffee @@ -0,0 +1,66 @@ +PDFFont = require '../font' + +module.exports = + initFonts: -> + # Lookup table for embedded fonts + @_fontFamilies = {} + @_fontCount = 0 + + # Font state + @_fontSize = 12 + @_font = null + + @_registeredFonts = {} + + # Set the default font + @font 'Helvetica' + + font: (src, family, size) -> + if typeof family is 'number' + size = family + family = null + + # check registered fonts if src is a string + if typeof src is 'string' and @_registeredFonts[src] + cacheKey = src + {src, family} = @_registeredFonts[src] + else + cacheKey = family or src + cacheKey = null unless typeof cacheKey is 'string' + + @fontSize size if size? + + # fast path: check if the font is already in the PDF + if font = @_fontFamilies[cacheKey] + @_font = font + return this + + # load the font + id = 'F' + (++@_fontCount) + @_font = PDFFont.open(this, src, family, id) + + # check for existing font familes with the same name already in the PDF + # useful if the font was passed as a buffer + if font = @_fontFamilies[@_font.name] + @_font = font + return this + + # save the font for reuse later + if cacheKey + @_fontFamilies[cacheKey] = @_font + + @_fontFamilies[@_font.name] = @_font + return this + + fontSize: (@_fontSize) -> + return this + + currentLineHeight: (includeGap = false) -> + @_font.lineHeight @_fontSize, includeGap + + registerFont: (name, src, family) -> + @_registeredFonts[name] = + src: src + family: family + + return this diff --git a/pitfall/pdfkit/lib/mixins/images.coffee b/pitfall/pdfkit/lib/mixins/images.coffee new file mode 100644 index 00000000..e532194f --- /dev/null +++ b/pitfall/pdfkit/lib/mixins/images.coffee @@ -0,0 +1,99 @@ +PDFImage = require '../image' + +module.exports = + initImages: -> + @_imageRegistry = {} + @_imageCount = 0 + + image: (src, x, y, options = {}) -> + if typeof x is 'object' + options = x + x = null + + x = x ? options.x ? @x + y = y ? options.y ? @y + + if typeof src is 'string' + image = @_imageRegistry[src] + + if not image + if src.width and src.height + image = src + else + image = @openImage src + + unless image.obj + image.embed this + + @page.xobjects[image.label] ?= image.obj + + w = options.width or image.width + h = options.height or image.height + + if options.width and not options.height + wp = w / image.width + w = image.width * wp + h = image.height * wp + + else if options.height and not options.width + hp = h / image.height + w = image.width * hp + h = image.height * hp + + else if options.scale + w = image.width * options.scale + h = image.height * options.scale + + else if options.fit + [bw, bh] = options.fit + bp = bw / bh + ip = image.width / image.height + if ip > bp + w = bw + h = bw / ip + else + h = bh + w = bh * ip + + else if options.cover + [bw, bh] = options.cover + bp = bw / bh + ip = image.width / image.height + if ip > bp + h = bh + w = bh * ip + else + w = bw + h = bw / ip + + if options.fit or options.cover + if options.align is 'center' + x = x + bw / 2 - w / 2 + else if options.align is 'right' + x = x + bw - w + + if options.valign is 'center' + y = y + bh / 2 - h / 2 + else if options.valign is 'bottom' + y = y + bh - h + + # Set the current y position to below the image if it is in the document flow + @y += h if @y is y + + @save() + @transform w, 0, 0, -h, x, y + h + @addContent "/#{image.label} Do" + @restore() + + return this + + openImage: (src) -> + if typeof src is 'string' + image = @_imageRegistry[src] + + if not image + image = PDFImage.open src, 'I' + (++@_imageCount) + if typeof src is 'string' + @_imageRegistry[src] = image + + return image diff --git a/pitfall/pdfkit/lib/mixins/text.coffee b/pitfall/pdfkit/lib/mixins/text.coffee new file mode 100644 index 00000000..a371ac6f --- /dev/null +++ b/pitfall/pdfkit/lib/mixins/text.coffee @@ -0,0 +1,313 @@ +LineWrapper = require '../line_wrapper' +{number} = require '../object' + +module.exports = + initText: -> + # Current coordinates + @x = 0 + @y = 0 + @_lineGap = 0 + + lineGap: (@_lineGap) -> + return this + + moveDown: (lines = 1) -> + @y += @currentLineHeight(true) * lines + @_lineGap + return this + + moveUp: (lines = 1) -> + @y -= @currentLineHeight(true) * lines + @_lineGap + return this + + _text: (text, x, y, options, lineCallback) -> + options = @_initOptions(x, y, options) + + # Convert text to a string + text = '' + text + + # if the wordSpacing option is specified, remove multiple consecutive spaces + if options.wordSpacing + text = text.replace(/\s{2,}/g, ' ') + + # word wrapping + if options.width + wrapper = @_wrapper + unless wrapper + wrapper = new LineWrapper(this, options) + wrapper.on 'line', lineCallback + + @_wrapper = if options.continued then wrapper else null + @_textOptions = if options.continued then options else null + wrapper.wrap text, options + + # render paragraphs as single lines + else + lineCallback line, options for line in text.split '\n' + + return this + + text: (text, x, y, options) -> + @_text text, x, y, options, @_line.bind(this) + + widthOfString: (string, options = {}) -> + @_font.widthOfString(string, @_fontSize, options.features) + (options.characterSpacing or 0) * (string.length - 1) + + heightOfString: (text, options = {}) -> + {x,y} = this + + options = @_initOptions(options) + options.height = Infinity # don't break pages + + lineGap = options.lineGap or @_lineGap or 0 + @_text text, @x, @y, options, (line, options) => + @y += @currentLineHeight(true) + lineGap + + height = @y - y + @x = x + @y = y + + return height + + list: (list, x, y, options, wrapper) -> + options = @_initOptions(x, y, options) + + midLine = Math.round (@_font.ascender / 1000 * @_fontSize) / 2 + r = options.bulletRadius or Math.round (@_font.ascender / 1000 * @_fontSize) / 3 + indent = options.textIndent or r * 5 + itemIndent = options.bulletIndent or r * 8 + + level = 1 + items = [] + levels = [] + + flatten = (list) -> + for item, i in list + if Array.isArray(item) + level++ + flatten(item) + level-- + else + items.push(item) + levels.push(level) + + flatten(list) + + wrapper = new LineWrapper(this, options) + wrapper.on 'line', @_line.bind(this) + + level = 1 + i = 0 + wrapper.on 'firstLine', => + if (l = levels[i++]) isnt level + diff = itemIndent * (l - level) + @x += diff + wrapper.lineWidth -= diff + level = l + + @circle @x - indent + r, @y + midLine, r + @fill() + + wrapper.on 'sectionStart', => + pos = indent + itemIndent * (level - 1) + @x += pos + wrapper.lineWidth -= pos + + wrapper.on 'sectionEnd', => + pos = indent + itemIndent * (level - 1) + @x -= pos + wrapper.lineWidth += pos + + wrapper.wrap items.join('\n'), options + + return this + + _initOptions: (x = {}, y, options = {}) -> + if typeof x is 'object' + options = x + x = null + + # clone options object + options = do -> + opts = {} + opts[k] = v for k, v of options + return opts + + # extend options with previous values for continued text + if @_textOptions + for key, val of @_textOptions when key isnt 'continued' + options[key] ?= val + + # Update the current position + if x? + @x = x + if y? + @y = y + + # wrap to margins if no x or y position passed + unless options.lineBreak is false + margins = @page.margins + options.width ?= @page.width - @x - margins.right + + options.columns ||= 0 + options.columnGap ?= 18 # 1/4 inch + + return options + + _line: (text, options = {}, wrapper) -> + @_fragment text, @x, @y, options + lineGap = options.lineGap or @_lineGap or 0 + + if not wrapper + @x += @widthOfString text + else + @y += @currentLineHeight(true) + lineGap + + _fragment: (text, x, y, options) -> + text = ('' + text).replace(/\n/g, '') + return if text.length is 0 + + # handle options + align = options.align or 'left' + wordSpacing = options.wordSpacing or 0 + characterSpacing = options.characterSpacing or 0 + + # text alignments + if options.width + switch align + when 'right' + textWidth = @widthOfString text.replace(/\s+$/, ''), options + x += options.lineWidth - textWidth + + when 'center' + x += options.lineWidth / 2 - options.textWidth / 2 + + when 'justify' + # calculate the word spacing value + words = text.trim().split(/\s+/) + textWidth = @widthOfString(text.replace(/\s+/g, ''), options) + spaceWidth = @widthOfString(' ') + characterSpacing + wordSpacing = Math.max 0, (options.lineWidth - textWidth) / Math.max(1, words.length - 1) - spaceWidth + + # calculate the actual rendered width of the string after word and character spacing + renderedWidth = options.textWidth + (wordSpacing * (options.wordCount - 1)) + (characterSpacing * (text.length - 1)) + + # create link annotations if the link option is given + if options.link + @link x, y, renderedWidth, @currentLineHeight(), options.link + + # create underline or strikethrough line + if options.underline or options.strike + @save() + @strokeColor @_fillColor... unless options.stroke + + lineWidth = if @_fontSize < 10 then 0.5 else Math.floor(@_fontSize / 10) + @lineWidth lineWidth + + d = if options.underline then 1 else 2 + lineY = y + @currentLineHeight() / d + lineY -= lineWidth if options.underline + + @moveTo x, lineY + @lineTo x + renderedWidth, lineY + @stroke() + @restore() + + # flip coordinate system + @save() + @transform 1, 0, 0, -1, 0, @page.height + y = @page.height - y - (@_font.ascender / 1000 * @_fontSize) + + # add current font to page if necessary + @page.fonts[@_font.id] ?= @_font.ref() + + # begin the text object + @addContent "BT" + + # text position + @addContent "1 0 0 1 #{number(x)} #{number(y)} Tm" + + # font and font size + @addContent "/#{@_font.id} #{number(@_fontSize)} Tf" + + # rendering mode + mode = if options.fill and options.stroke then 2 else if options.stroke then 1 else 0 + @addContent "#{mode} Tr" if mode + + # Character spacing + @addContent "#{number(characterSpacing)} Tc" if characterSpacing + + # Add the actual text + # If we have a word spacing value, we need to encode each word separately + # since the normal Tw operator only works on character code 32, which isn't + # used for embedded fonts. + if wordSpacing + words = text.trim().split(/\s+/) + wordSpacing += @widthOfString(' ') + characterSpacing + wordSpacing *= 1000 / @_fontSize + + encoded = [] + positions = [] + for word in words + [encodedWord, positionsWord] = @_font.encode(word, options.features) + encoded.push encodedWord... + positions.push positionsWord... + + # add the word spacing to the end of the word + positions[positions.length - 1].xAdvance += wordSpacing + else + [encoded, positions] = @_font.encode(text, options.features) + + scale = @_fontSize / 1000 + commands = [] + last = 0 + hadOffset = no + + # Adds a segment of text to the TJ command buffer + addSegment = (cur) => + if last < cur + hex = encoded.slice(last, cur).join '' + advance = positions[cur - 1].xAdvance - positions[cur - 1].advanceWidth + commands.push "<#{hex}> #{number(-advance)}" + + last = cur + + # Flushes the current TJ commands to the output stream + flush = (i) => + addSegment i + + if commands.length > 0 + @addContent "[#{commands.join ' '}] TJ" + commands.length = 0 + + for pos, i in positions + # If we have an x or y offset, we have to break out of the current TJ command + # so we can move the text position. + if pos.xOffset or pos.yOffset + # Flush the current buffer + flush i + + # Move the text position and flush just the current character + @addContent "1 0 0 1 #{number(x + pos.xOffset * scale)} #{number(y + pos.yOffset * scale)} Tm" + flush i + 1 + + hadOffset = yes + else + # If the last character had an offset, reset the text position + if hadOffset + @addContent "1 0 0 1 #{number(x)} #{number(y)} Tm" + hadOffset = no + + # Group segments that don't have any advance adjustments + unless pos.xAdvance - pos.advanceWidth is 0 + addSegment i + 1 + + x += pos.xAdvance * scale + + # Flush any remaining commands + flush i + + # end the text object + @addContent "ET" + + # restore flipped coordinate system + @restore() diff --git a/pitfall/pdfkit/lib/mixins/vector.coffee b/pitfall/pdfkit/lib/mixins/vector.coffee new file mode 100644 index 00000000..612ad77c --- /dev/null +++ b/pitfall/pdfkit/lib/mixins/vector.coffee @@ -0,0 +1,204 @@ +SVGPath = require '../path' +{number} = require '../object' + +# This constant is used to approximate a symmetrical arc using a cubic +# Bezier curve. +KAPPA = 4.0 * ((Math.sqrt(2) - 1.0) / 3.0) +module.exports = + initVector: -> + @_ctm = [1, 0, 0, 1, 0, 0] # current transformation matrix + @_ctmStack = [] + + save: -> + @_ctmStack.push @_ctm.slice() + # TODO: save/restore colorspace and styles so not setting it unnessesarily all the time? + @addContent 'q' + + restore: -> + @_ctm = @_ctmStack.pop() or [1, 0, 0, 1, 0, 0] + @addContent 'Q' + + closePath: -> + @addContent 'h' + + lineWidth: (w) -> + @addContent "#{number(w)} w" + + _CAP_STYLES: + BUTT: 0 + ROUND: 1 + SQUARE: 2 + + lineCap: (c) -> + c = @_CAP_STYLES[c.toUpperCase()] if typeof c is 'string' + @addContent "#{c} J" + + _JOIN_STYLES: + MITER: 0 + ROUND: 1 + BEVEL: 2 + + lineJoin: (j) -> + j = @_JOIN_STYLES[j.toUpperCase()] if typeof j is 'string' + @addContent "#{j} j" + + miterLimit: (m) -> + @addContent "#{number(m)} M" + + dash: (length, options = {}) -> + return this unless length? + if Array.isArray length + length = (number(v) for v in length).join(' ') + phase = options.phase or 0 + @addContent "[#{length}] #{number(phase)} d" + else + space = options.space ? length + phase = options.phase or 0 + @addContent "[#{number(length)} #{number(space)}] #{number(phase)} d" + + undash: -> + @addContent "[] 0 d" + + moveTo: (x, y) -> + @addContent "#{number(x)} #{number(y)} m" + + lineTo: (x, y) -> + @addContent "#{number(x)} #{number(y)} l" + + bezierCurveTo: (cp1x, cp1y, cp2x, cp2y, x, y) -> + @addContent "#{number(cp1x)} #{number(cp1y)} #{number(cp2x)} #{number(cp2y)} #{number(x)} #{number(y)} c" + + quadraticCurveTo: (cpx, cpy, x, y) -> + @addContent "#{number(cpx)} #{number(cpy)} #{number(x)} #{number(y)} v" + + rect: (x, y, w, h) -> + @addContent "#{number(x)} #{number(y)} #{number(w)} #{number(h)} re" + + roundedRect: (x, y, w, h, r = 0) -> + r = Math.min(r, 0.5 * w, 0.5 * h) + + # amount to inset control points from corners (see `ellipse`) + c = r * (1.0 - KAPPA) + + @moveTo x + r, y + @lineTo x + w - r, y + @bezierCurveTo x + w - c, y, x + w, y + c, x + w, y + r + @lineTo x + w, y + h - r + @bezierCurveTo x + w, y + h - c, x + w - c, y + h, x + w - r, y + h + @lineTo x + r, y + h + @bezierCurveTo x + c, y + h, x, y + h - c, x, y + h - r + @lineTo x, y + r + @bezierCurveTo x, y + c, x + c, y, x + r, y + @closePath() + + ellipse: (x, y, r1, r2 = r1) -> + # based on http://stackoverflow.com/questions/2172798/how-to-draw-an-oval-in-html5-canvas/2173084#2173084 + x -= r1 + y -= r2 + ox = r1 * KAPPA + oy = r2 * KAPPA + xe = x + r1 * 2 + ye = y + r2 * 2 + xm = x + r1 + ym = y + r2 + + @moveTo(x, ym) + @bezierCurveTo(x, ym - oy, xm - ox, y, xm, y) + @bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym) + @bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye) + @bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym) + @closePath() + + circle: (x, y, radius) -> + @ellipse x, y, radius + + polygon: (points...) -> + @moveTo points.shift()... + @lineTo point... for point in points + @closePath() + + path: (path) -> + SVGPath.apply this, path + return this + + _windingRule: (rule) -> + if /even-?odd/.test(rule) + return '*' + + return '' + + fill: (color, rule) -> + if /(even-?odd)|(non-?zero)/.test(color) + rule = color + color = null + + @fillColor color if color + @addContent 'f' + @_windingRule(rule) + + stroke: (color) -> + @strokeColor color if color + @addContent 'S' + + fillAndStroke: (fillColor, strokeColor = fillColor, rule) -> + isFillRule = /(even-?odd)|(non-?zero)/ + if isFillRule.test(fillColor) + rule = fillColor + fillColor = null + + if isFillRule.test(strokeColor) + rule = strokeColor + strokeColor = fillColor + + if fillColor + @fillColor fillColor + @strokeColor strokeColor + + @addContent 'B' + @_windingRule(rule) + + clip: (rule) -> + @addContent 'W' + @_windingRule(rule) + ' n' + + transform: (m11, m12, m21, m22, dx, dy) -> + # keep track of the current transformation matrix + m = @_ctm + [m0, m1, m2, m3, m4, m5] = m + m[0] = m0 * m11 + m2 * m12 + m[1] = m1 * m11 + m3 * m12 + m[2] = m0 * m21 + m2 * m22 + m[3] = m1 * m21 + m3 * m22 + m[4] = m0 * dx + m2 * dy + m4 + m[5] = m1 * dx + m3 * dy + m5 + + values = (number(v) for v in [m11, m12, m21, m22, dx, dy]).join(' ') + @addContent "#{values} cm" + + translate: (x, y) -> + @transform 1, 0, 0, 1, x, y + + rotate: (angle, options = {}) -> + rad = angle * Math.PI / 180 + cos = Math.cos(rad) + sin = Math.sin(rad) + x = y = 0 + + if options.origin? + [x, y] = options.origin + x1 = x * cos - y * sin + y1 = x * sin + y * cos + x -= x1 + y -= y1 + + @transform cos, sin, -sin, cos, x, y + + scale: (xFactor, yFactor = xFactor, options = {}) -> + if arguments.length is 2 + yFactor = xFactor + options = yFactor + + x = y = 0 + if options.origin? + [x, y] = options.origin + x -= xFactor * x + y -= yFactor * y + + @transform xFactor, 0, 0, yFactor, x, y diff --git a/pitfall/pdfkit/lib/npm-debug.log b/pitfall/pdfkit/lib/npm-debug.log new file mode 100644 index 00000000..47c0f54f --- /dev/null +++ b/pitfall/pdfkit/lib/npm-debug.log @@ -0,0 +1,421 @@ +0 info it worked if it ends with ok +1 verbose cli [ '/usr/local/bin/node', +1 verbose cli '/usr/local/bin/npm', +1 verbose cli 'unlink', +1 verbose cli 'pdfkit' ] +2 info using npm@3.10.10 +3 info using node@v6.10.3 +4 silly loadCurrentTree Starting +5 silly install loadCurrentTree +6 silly install readLocalPackageData +7 silly install normalizeTree +8 silly loadCurrentTree Finishing +9 silly loadIdealTree Starting +10 silly install loadIdealTree +11 silly cloneCurrentTree Starting +12 silly install cloneCurrentTreeToIdealTree +13 silly cloneCurrentTree Finishing +14 silly loadShrinkwrap Starting +15 silly install loadShrinkwrap +16 silly loadShrinkwrap Finishing +17 silly loadAllDepsIntoIdealTree Starting +18 silly uninstall loadAllDepsIntoIdealtree +19 silly loadAllDepsIntoIdealTree Finishing +20 silly loadIdealTree Finishing +21 silly currentTree pdfkit@0.8.0 +21 silly currentTree ├── abbrev@1.1.0 +21 silly currentTree ├── acorn@4.0.11 +21 silly currentTree ├── amdefine@1.0.1 +21 silly currentTree ├── assert@1.1.2 +21 silly currentTree ├─┬ ast-transform@0.0.0 +21 silly currentTree │ ├── escodegen@1.2.0 +21 silly currentTree │ └── esprima@1.0.4 +21 silly currentTree ├── ast-types@0.7.8 +21 silly currentTree ├── astw@2.2.0 +21 silly currentTree ├── async@0.2.10 +21 silly currentTree ├── babel-runtime@6.23.0 +21 silly currentTree ├── base64-js@1.2.0 +21 silly currentTree ├── Base64@0.2.1 +21 silly currentTree ├── blob-stream@0.1.3 +21 silly currentTree ├── blob@0.0.4 +21 silly currentTree ├── brace@0.2.1 +21 silly currentTree ├─┬ brfs@1.0.2 +21 silly currentTree │ └── through@2.2.7 +21 silly currentTree ├── brotli@1.3.2 +21 silly currentTree ├─┬ browser-pack@2.0.1 +21 silly currentTree │ └─┬ JSONStream@0.6.4 +21 silly currentTree │ └── through@2.2.7 +21 silly currentTree ├─┬ browser-resolve@1.11.2 +21 silly currentTree │ └── resolve@1.1.7 +21 silly currentTree ├── browserify-optional@1.0.0 +21 silly currentTree ├── browserify-zlib@0.1.4 +21 silly currentTree ├─┬ browserify@3.46.1 +21 silly currentTree │ ├── browser-resolve@1.2.4 +21 silly currentTree │ └── deep-equal@0.1.2 +21 silly currentTree ├─┬ buffer@2.1.13 +21 silly currentTree │ └── base64-js@0.0.8 +21 silly currentTree ├── builtins@0.0.7 +21 silly currentTree ├── callsite@1.0.0 +21 silly currentTree ├── camelcase@1.2.1 +21 silly currentTree ├── character-parser@1.2.0 +21 silly currentTree ├── clone@1.0.2 +21 silly currentTree ├── codemirror@3.20.0 +21 silly currentTree ├── coffee-script@1.12.5 +21 silly currentTree ├─┬ coffeeify@0.6.0 +21 silly currentTree │ └── coffee-script@1.7.1 +21 silly currentTree ├── combine-source-map@0.3.0 +21 silly currentTree ├── commander@2.1.0 +21 silly currentTree ├── commondir@0.0.1 +21 silly currentTree ├── concat-stream@1.4.10 +21 silly currentTree ├── console-browserify@1.0.3 +21 silly currentTree ├── constantinople@1.0.2 +21 silly currentTree ├── constants-browserify@0.0.1 +21 silly currentTree ├── convert-source-map@0.3.5 +21 silly currentTree ├── core-js@2.4.1 +21 silly currentTree ├── core-util-is@1.0.2 +21 silly currentTree ├── crypto-browserify@1.0.9 +21 silly currentTree ├── css-parse@1.0.4 +21 silly currentTree ├── css-stringify@1.0.5 +21 silly currentTree ├── css@1.0.8 +21 silly currentTree ├── decamelize@1.2.0 +21 silly currentTree ├── deep-equal@1.0.1 +21 silly currentTree ├── defined@0.0.0 +21 silly currentTree ├─┬ deps-sort@0.1.2 +21 silly currentTree │ └─┬ JSONStream@0.6.4 +21 silly currentTree │ └── through@2.2.7 +21 silly currentTree ├─┬ derequire@0.8.0 +21 silly currentTree │ └── esprima-fb@3001.1.0-dev-harmony-fb +21 silly currentTree ├─┬ detective@3.1.0 +21 silly currentTree │ ├── escodegen@1.1.0 +21 silly currentTree │ └── esprima-fb@3001.1.0-dev-harmony-fb +21 silly currentTree ├── dfa@1.0.0 +21 silly currentTree ├── domain-browser@1.1.7 +21 silly currentTree ├── duplexer@0.1.1 +21 silly currentTree ├── duplexer2@0.0.2 +21 silly currentTree ├─┬ escodegen@0.0.17 +21 silly currentTree │ └── estraverse@0.0.4 +21 silly currentTree ├── escope@0.0.16 +21 silly currentTree ├── esprima@1.0.4 +21 silly currentTree ├─┬ esrefactor@0.1.0 +21 silly currentTree │ └── estraverse@0.0.4 +21 silly currentTree ├── estraverse@1.5.1 +21 silly currentTree ├── esutils@1.0.0 +21 silly currentTree ├── events@1.0.2 +21 silly currentTree ├─┬ exorcist@0.1.6 +21 silly currentTree │ └── minimist@0.0.5 +21 silly currentTree ├── falafel@0.1.6 +21 silly currentTree ├── fontkit@1.6.0 +21 silly currentTree ├── glob@3.2.11 +21 silly currentTree ├── http-browserify@1.3.2 +21 silly currentTree ├── https-browserify@0.0.1 +21 silly currentTree ├── iconv-lite@0.4.17 +21 silly currentTree ├── ieee754@1.1.8 +21 silly currentTree ├── indexof@0.0.1 +21 silly currentTree ├── inherits@2.0.3 +21 silly currentTree ├─┬ inline-source-map@0.3.1 +21 silly currentTree │ └── source-map@0.3.0 +21 silly currentTree ├─┬ insert-module-globals@6.0.0 +21 silly currentTree │ └── process@0.6.0 +21 silly currentTree ├── is-promise@1.0.1 +21 silly currentTree ├── isarray@0.0.1 +21 silly currentTree ├── jade@1.1.5 +21 silly currentTree ├── jsonparse@0.0.5 +21 silly currentTree ├── JSONStream@0.7.4 +21 silly currentTree ├── lexical-scope@1.1.1 +21 silly currentTree ├─┬ linebreak@0.1.2 +21 silly currentTree │ └── unicode-trie@0.1.2 +21 silly currentTree ├── lru-cache@2.7.3 +21 silly currentTree ├── markdown@0.5.0 +21 silly currentTree ├── minimatch@0.3.0 +21 silly currentTree ├── minimist@0.0.10 +21 silly currentTree ├── mkdirp@0.3.5 +21 silly currentTree ├─┬ module-deps@2.0.6 +21 silly currentTree │ ├── browser-resolve@1.2.4 +21 silly currentTree │ ├── parents@0.0.2 +21 silly currentTree │ └── stream-combiner@0.1.0 +21 silly currentTree ├── monocle@1.1.51 +21 silly currentTree ├── nopt@2.1.2 +21 silly currentTree ├── object-keys@0.4.0 +21 silly currentTree ├── optimist@0.3.7 +21 silly currentTree ├── os-browserify@0.1.2 +21 silly currentTree ├── pako@0.2.9 +21 silly currentTree ├── parents@0.0.3 +21 silly currentTree ├── path-browserify@0.0.0 +21 silly currentTree ├── path-platform@0.0.1 +21 silly currentTree ├── png-js@0.1.1 +21 silly currentTree ├── process@0.7.0 +21 silly currentTree ├── promise@2.0.0 +21 silly currentTree ├── punycode@1.2.4 +21 silly currentTree ├── querystring-es3@0.2.0 +21 silly currentTree ├── querystring@0.2.0 +21 silly currentTree ├─┬ readable-stream@1.1.14 +21 silly currentTree │ └── string_decoder@0.10.31 +21 silly currentTree ├── readdirp@0.2.5 +21 silly currentTree ├── regenerator-runtime@0.10.5 +21 silly currentTree ├── resolve@0.6.3 +21 silly currentTree ├── restructure@0.5.4 +21 silly currentTree ├─┬ rfile@1.0.0 +21 silly currentTree │ └── resolve@0.3.1 +21 silly currentTree ├─┬ ruglify@1.0.0 +21 silly currentTree │ └── uglify-js@2.2.5 +21 silly currentTree ├── shallow-copy@0.0.1 +21 silly currentTree ├── shell-quote@0.0.1 +21 silly currentTree ├── sigmund@1.0.1 +21 silly currentTree ├── source-map@0.1.43 +21 silly currentTree ├─┬ stream-browserify@0.1.3 +21 silly currentTree │ └── process@0.5.2 +21 silly currentTree ├── stream-combiner@0.0.4 +21 silly currentTree ├── string_decoder@0.0.1 +21 silly currentTree ├── subarg@0.0.1 +21 silly currentTree ├─┬ syntax-error@1.1.6 +21 silly currentTree │ └── acorn@2.7.0 +21 silly currentTree ├── through@2.3.8 +21 silly currentTree ├─┬ through2@0.4.2 +21 silly currentTree │ ├── readable-stream@1.0.34 +21 silly currentTree │ ├── string_decoder@0.10.31 +21 silly currentTree │ └── xtend@2.1.2 +21 silly currentTree ├─┬ timers-browserify@1.0.3 +21 silly currentTree │ └── process@0.5.2 +21 silly currentTree ├── tiny-inflate@1.0.2 +21 silly currentTree ├─┬ transformers@2.1.0 +21 silly currentTree │ └── uglify-js@2.2.5 +21 silly currentTree ├── tty-browserify@0.0.0 +21 silly currentTree ├── typedarray@0.0.6 +21 silly currentTree ├─┬ uglify-js@2.4.24 +21 silly currentTree │ └── source-map@0.1.34 +21 silly currentTree ├── uglify-to-browserify@1.0.2 +21 silly currentTree ├── umd@2.0.0 +21 silly currentTree ├── unicode-properties@1.1.0 +21 silly currentTree ├── unicode-trie@0.3.1 +21 silly currentTree ├─┬ url@0.10.3 +21 silly currentTree │ └── punycode@1.3.2 +21 silly currentTree ├─┬ util@0.10.3 +21 silly currentTree │ └── inherits@2.0.1 +21 silly currentTree ├── vm-browserify@0.0.4 +21 silly currentTree ├── w3c-blob@0.0.1 +21 silly currentTree ├── window-size@0.1.0 +21 silly currentTree ├─┬ with@2.0.0 +21 silly currentTree │ └── uglify-js@2.4.0 +21 silly currentTree ├── wordwrap@0.0.3 +21 silly currentTree ├── xtend@3.0.0 +21 silly currentTree └─┬ yargs@3.5.4 +21 silly currentTree └── wordwrap@0.0.2 +22 silly idealTree pdfkit@0.8.0 +22 silly idealTree ├── abbrev@1.1.0 +22 silly idealTree ├── acorn@4.0.11 +22 silly idealTree ├── amdefine@1.0.1 +22 silly idealTree ├── assert@1.1.2 +22 silly idealTree ├─┬ ast-transform@0.0.0 +22 silly idealTree │ ├── escodegen@1.2.0 +22 silly idealTree │ └── esprima@1.0.4 +22 silly idealTree ├── ast-types@0.7.8 +22 silly idealTree ├── astw@2.2.0 +22 silly idealTree ├── async@0.2.10 +22 silly idealTree ├── babel-runtime@6.23.0 +22 silly idealTree ├── base64-js@1.2.0 +22 silly idealTree ├── Base64@0.2.1 +22 silly idealTree ├── blob-stream@0.1.3 +22 silly idealTree ├── blob@0.0.4 +22 silly idealTree ├── brace@0.2.1 +22 silly idealTree ├─┬ brfs@1.0.2 +22 silly idealTree │ └── through@2.2.7 +22 silly idealTree ├── brotli@1.3.2 +22 silly idealTree ├─┬ browser-pack@2.0.1 +22 silly idealTree │ └─┬ JSONStream@0.6.4 +22 silly idealTree │ └── through@2.2.7 +22 silly idealTree ├─┬ browser-resolve@1.11.2 +22 silly idealTree │ └── resolve@1.1.7 +22 silly idealTree ├── browserify-optional@1.0.0 +22 silly idealTree ├── browserify-zlib@0.1.4 +22 silly idealTree ├─┬ browserify@3.46.1 +22 silly idealTree │ ├── browser-resolve@1.2.4 +22 silly idealTree │ └── deep-equal@0.1.2 +22 silly idealTree ├─┬ buffer@2.1.13 +22 silly idealTree │ └── base64-js@0.0.8 +22 silly idealTree ├── builtins@0.0.7 +22 silly idealTree ├── callsite@1.0.0 +22 silly idealTree ├── camelcase@1.2.1 +22 silly idealTree ├── character-parser@1.2.0 +22 silly idealTree ├── clone@1.0.2 +22 silly idealTree ├── codemirror@3.20.0 +22 silly idealTree ├── coffee-script@1.12.5 +22 silly idealTree ├─┬ coffeeify@0.6.0 +22 silly idealTree │ └── coffee-script@1.7.1 +22 silly idealTree ├── combine-source-map@0.3.0 +22 silly idealTree ├── commander@2.1.0 +22 silly idealTree ├── commondir@0.0.1 +22 silly idealTree ├── concat-stream@1.4.10 +22 silly idealTree ├── console-browserify@1.0.3 +22 silly idealTree ├── constantinople@1.0.2 +22 silly idealTree ├── constants-browserify@0.0.1 +22 silly idealTree ├── convert-source-map@0.3.5 +22 silly idealTree ├── core-js@2.4.1 +22 silly idealTree ├── core-util-is@1.0.2 +22 silly idealTree ├── crypto-browserify@1.0.9 +22 silly idealTree ├── css-parse@1.0.4 +22 silly idealTree ├── css-stringify@1.0.5 +22 silly idealTree ├── css@1.0.8 +22 silly idealTree ├── decamelize@1.2.0 +22 silly idealTree ├── deep-equal@1.0.1 +22 silly idealTree ├── defined@0.0.0 +22 silly idealTree ├─┬ deps-sort@0.1.2 +22 silly idealTree │ └─┬ JSONStream@0.6.4 +22 silly idealTree │ └── through@2.2.7 +22 silly idealTree ├─┬ derequire@0.8.0 +22 silly idealTree │ └── esprima-fb@3001.1.0-dev-harmony-fb +22 silly idealTree ├─┬ detective@3.1.0 +22 silly idealTree │ ├── escodegen@1.1.0 +22 silly idealTree │ └── esprima-fb@3001.1.0-dev-harmony-fb +22 silly idealTree ├── dfa@1.0.0 +22 silly idealTree ├── domain-browser@1.1.7 +22 silly idealTree ├── duplexer@0.1.1 +22 silly idealTree ├── duplexer2@0.0.2 +22 silly idealTree ├─┬ escodegen@0.0.17 +22 silly idealTree │ └── estraverse@0.0.4 +22 silly idealTree ├── escope@0.0.16 +22 silly idealTree ├── esprima@1.0.4 +22 silly idealTree ├─┬ esrefactor@0.1.0 +22 silly idealTree │ └── estraverse@0.0.4 +22 silly idealTree ├── estraverse@1.5.1 +22 silly idealTree ├── esutils@1.0.0 +22 silly idealTree ├── events@1.0.2 +22 silly idealTree ├─┬ exorcist@0.1.6 +22 silly idealTree │ └── minimist@0.0.5 +22 silly idealTree ├── falafel@0.1.6 +22 silly idealTree ├── fontkit@1.6.0 +22 silly idealTree ├── glob@3.2.11 +22 silly idealTree ├── http-browserify@1.3.2 +22 silly idealTree ├── https-browserify@0.0.1 +22 silly idealTree ├── iconv-lite@0.4.17 +22 silly idealTree ├── ieee754@1.1.8 +22 silly idealTree ├── indexof@0.0.1 +22 silly idealTree ├── inherits@2.0.3 +22 silly idealTree ├─┬ inline-source-map@0.3.1 +22 silly idealTree │ └── source-map@0.3.0 +22 silly idealTree ├─┬ insert-module-globals@6.0.0 +22 silly idealTree │ └── process@0.6.0 +22 silly idealTree ├── is-promise@1.0.1 +22 silly idealTree ├── isarray@0.0.1 +22 silly idealTree ├── jade@1.1.5 +22 silly idealTree ├── jsonparse@0.0.5 +22 silly idealTree ├── JSONStream@0.7.4 +22 silly idealTree ├── lexical-scope@1.1.1 +22 silly idealTree ├─┬ linebreak@0.1.2 +22 silly idealTree │ └── unicode-trie@0.1.2 +22 silly idealTree ├── lru-cache@2.7.3 +22 silly idealTree ├── markdown@0.5.0 +22 silly idealTree ├── minimatch@0.3.0 +22 silly idealTree ├── minimist@0.0.10 +22 silly idealTree ├── mkdirp@0.3.5 +22 silly idealTree ├─┬ module-deps@2.0.6 +22 silly idealTree │ ├── browser-resolve@1.2.4 +22 silly idealTree │ ├── parents@0.0.2 +22 silly idealTree │ └── stream-combiner@0.1.0 +22 silly idealTree ├── monocle@1.1.51 +22 silly idealTree ├── nopt@2.1.2 +22 silly idealTree ├── object-keys@0.4.0 +22 silly idealTree ├── optimist@0.3.7 +22 silly idealTree ├── os-browserify@0.1.2 +22 silly idealTree ├── pako@0.2.9 +22 silly idealTree ├── parents@0.0.3 +22 silly idealTree ├── path-browserify@0.0.0 +22 silly idealTree ├── path-platform@0.0.1 +22 silly idealTree ├── png-js@0.1.1 +22 silly idealTree ├── process@0.7.0 +22 silly idealTree ├── promise@2.0.0 +22 silly idealTree ├── punycode@1.2.4 +22 silly idealTree ├── querystring-es3@0.2.0 +22 silly idealTree ├── querystring@0.2.0 +22 silly idealTree ├─┬ readable-stream@1.1.14 +22 silly idealTree │ └── string_decoder@0.10.31 +22 silly idealTree ├── readdirp@0.2.5 +22 silly idealTree ├── regenerator-runtime@0.10.5 +22 silly idealTree ├── resolve@0.6.3 +22 silly idealTree ├── restructure@0.5.4 +22 silly idealTree ├─┬ rfile@1.0.0 +22 silly idealTree │ └── resolve@0.3.1 +22 silly idealTree ├─┬ ruglify@1.0.0 +22 silly idealTree │ └── uglify-js@2.2.5 +22 silly idealTree ├── shallow-copy@0.0.1 +22 silly idealTree ├── shell-quote@0.0.1 +22 silly idealTree ├── sigmund@1.0.1 +22 silly idealTree ├── source-map@0.1.43 +22 silly idealTree ├─┬ stream-browserify@0.1.3 +22 silly idealTree │ └── process@0.5.2 +22 silly idealTree ├── stream-combiner@0.0.4 +22 silly idealTree ├── string_decoder@0.0.1 +22 silly idealTree ├── subarg@0.0.1 +22 silly idealTree ├─┬ syntax-error@1.1.6 +22 silly idealTree │ └── acorn@2.7.0 +22 silly idealTree ├── through@2.3.8 +22 silly idealTree ├─┬ through2@0.4.2 +22 silly idealTree │ ├── readable-stream@1.0.34 +22 silly idealTree │ ├── string_decoder@0.10.31 +22 silly idealTree │ └── xtend@2.1.2 +22 silly idealTree ├─┬ timers-browserify@1.0.3 +22 silly idealTree │ └── process@0.5.2 +22 silly idealTree ├── tiny-inflate@1.0.2 +22 silly idealTree ├─┬ transformers@2.1.0 +22 silly idealTree │ └── uglify-js@2.2.5 +22 silly idealTree ├── tty-browserify@0.0.0 +22 silly idealTree ├── typedarray@0.0.6 +22 silly idealTree ├─┬ uglify-js@2.4.24 +22 silly idealTree │ └── source-map@0.1.34 +22 silly idealTree ├── uglify-to-browserify@1.0.2 +22 silly idealTree ├── umd@2.0.0 +22 silly idealTree ├── unicode-properties@1.1.0 +22 silly idealTree ├── unicode-trie@0.3.1 +22 silly idealTree ├─┬ url@0.10.3 +22 silly idealTree │ └── punycode@1.3.2 +22 silly idealTree ├─┬ util@0.10.3 +22 silly idealTree │ └── inherits@2.0.1 +22 silly idealTree ├── vm-browserify@0.0.4 +22 silly idealTree ├── w3c-blob@0.0.1 +22 silly idealTree ├── window-size@0.1.0 +22 silly idealTree ├─┬ with@2.0.0 +22 silly idealTree │ └── uglify-js@2.4.0 +22 silly idealTree ├── wordwrap@0.0.3 +22 silly idealTree ├── xtend@3.0.0 +22 silly idealTree └─┬ yargs@3.5.4 +22 silly idealTree └── wordwrap@0.0.2 +23 silly generateActionsToTake Starting +24 silly install generateActionsToTake +25 silly generateActionsToTake Finishing +26 silly diffTrees action count 0 +27 silly decomposeActions action count 0 +28 silly runTopLevelLifecycles Starting +29 silly executeActions Starting +30 silly install executeActions +31 silly doSerial global-install 0 +32 silly doParallel fetch 0 +33 verbose correctMkdir /Users/MB/.npm/_locks correctMkdir not in flight; initializing +34 verbose lock using /Users/MB/.npm/_locks/staging-73efde40ed96aa4a.lock for /Users/MB/git/pitfall/pdfkit/node_modules/.staging +35 verbose unlock done using /Users/MB/.npm/_locks/staging-73efde40ed96aa4a.lock for /Users/MB/git/pitfall/pdfkit/node_modules/.staging +36 silly rollbackFailedOptional Starting +37 silly rollbackFailedOptional Finishing +38 silly runTopLevelLifecycles Finishing +39 silly install printInstalled +40 warn pdfkit@0.8.0 No license field. +41 verbose If you need help, you may report this error at: +41 verbose +42 verbose stack Error: EACCES: permission denied, mkdir '/Users/MB/git/pitfall/pdfkit/node_modules/.staging' +42 verbose stack at Error (native) +43 verbose cwd /Users/MB/git/pitfall/pdfkit/lib +44 error Darwin 16.5.0 +45 error argv "/usr/local/bin/node" "/usr/local/bin/npm" "unlink" "pdfkit" +46 error node v6.10.3 +47 error npm v3.10.10 +48 error path /Users/MB/git/pitfall/pdfkit/node_modules/.staging +49 error code EACCES +50 error errno -13 +51 error syscall mkdir +52 error Error: EACCES: permission denied, mkdir '/Users/MB/git/pitfall/pdfkit/node_modules/.staging' +52 error at Error (native) +52 error { Error: EACCES: permission denied, mkdir '/Users/MB/git/pitfall/pdfkit/node_modules/.staging' +52 error at Error (native) +52 error errno: -13, +52 error code: 'EACCES', +52 error syscall: 'mkdir', +52 error path: '/Users/MB/git/pitfall/pdfkit/node_modules/.staging' } +53 error Please try running this command again as root/Administrator. +54 verbose exit [ -13, true ] diff --git a/pitfall/pdfkit/lib/object.coffee b/pitfall/pdfkit/lib/object.coffee new file mode 100644 index 00000000..c7faaaa0 --- /dev/null +++ b/pitfall/pdfkit/lib/object.coffee @@ -0,0 +1,99 @@ +### +PDFObject - converts JavaScript types into their corrisponding PDF types. +By Devon Govett +### + +class PDFObject + pad = (str, length) -> + (Array(length + 1).join('0') + str).slice(-length) + + escapableRe = /[\n\r\t\b\f\(\)\\]/g + escapable = + '\n': '\\n' + '\r': '\\r' + '\t': '\\t' + '\b': '\\b' + '\f': '\\f' + '\\': '\\\\' + '(': '\\(' + ')': '\\)' + + # Convert little endian UTF-16 to big endian + swapBytes = (buff) -> + l = buff.length + if l & 0x01 + throw new Error("Buffer length must be even") + else + for i in [0...l - 1] by 2 + a = buff[i] + buff[i] = buff[i + 1] + buff[i+1] = a + + return buff + + @convert: (object) -> + # String literals are converted to the PDF name type + if typeof object is 'string' + '/' + object + + # String objects are converted to PDF strings (UTF-16) + else if object instanceof String + # Escape characters as required by the spec + string = object.replace escapableRe, (c) -> + return escapable[c] + + # Detect if this is a unicode string + isUnicode = false + for i in [0...string.length] by 1 + if string.charCodeAt(i) > 0x7f + isUnicode = true + break + + # If so, encode it as big endian UTF-16 + if isUnicode + string = swapBytes(new Buffer('\ufeff' + string, 'utf16le')).toString('binary') + + '(' + string + ')' + + # Buffers are converted to PDF hex strings + else if Buffer.isBuffer(object) + '<' + object.toString('hex') + '>' + + else if object instanceof PDFReference + object.toString() + + else if object instanceof Date + '(D:' + pad(object.getUTCFullYear(), 4) + + pad(object.getUTCMonth() + 1, 2) + + pad(object.getUTCDate(), 2) + + pad(object.getUTCHours(), 2) + + pad(object.getUTCMinutes(), 2) + + pad(object.getUTCSeconds(), 2) + + 'Z)' + + else if Array.isArray object + items = (PDFObject.convert e for e in object).join(' ') + '[' + items + ']' + + else if {}.toString.call(object) is '[object Object]' + out = ['<<'] + for key, val of object + out.push '/' + key + ' ' + PDFObject.convert(val) + + out.push '>>' + out.join '\n' + + else if typeof object is 'number' + PDFObject.number object + + else + '' + object + + @number: (n) -> + if n > -1e21 and n < 1e21 + return Math.round(n * 1e6) / 1e6 + + throw new Error "unsupported number: #{n}" + +module.exports = PDFObject +PDFReference = require './reference' diff --git a/pitfall/pdfkit/lib/object.js b/pitfall/pdfkit/lib/object.js new file mode 100644 index 00000000..df12b63f --- /dev/null +++ b/pitfall/pdfkit/lib/object.js @@ -0,0 +1,114 @@ +// Generated by CoffeeScript 1.12.5 + +/* +PDFObject - converts JavaScript types into their corrisponding PDF types. +By Devon Govett + */ + +(function() { + var PDFObject, PDFReference; + + PDFObject = (function() { + var escapable, escapableRe, pad, swapBytes; + + function PDFObject() {} + + pad = function(str, length) { + return (Array(length + 1).join('0') + str).slice(-length); + }; + + escapableRe = /[\n\r\t\b\f\(\)\\]/g; + + escapable = { + '\n': '\\n', + '\r': '\\r', + '\t': '\\t', + '\b': '\\b', + '\f': '\\f', + '\\': '\\\\', + '(': '\\(', + ')': '\\)' + }; + + swapBytes = function(buff) { + var a, i, j, l, ref; + l = buff.length; + if (l & 0x01) { + throw new Error("Buffer length must be even"); + } else { + for (i = j = 0, ref = l - 1; j < ref; i = j += 2) { + a = buff[i]; + buff[i] = buff[i + 1]; + buff[i + 1] = a; + } + } + return buff; + }; + + PDFObject.convert = function(object) { + var e, i, isUnicode, items, j, key, out, ref, string, val; + if (typeof object === 'string') { + return '/' + object; + } else if (object instanceof String) { + string = object.replace(escapableRe, function(c) { + return escapable[c]; + }); + isUnicode = false; + for (i = j = 0, ref = string.length; j < ref; i = j += 1) { + if (string.charCodeAt(i) > 0x7f) { + isUnicode = true; + break; + } + } + if (isUnicode) { + string = swapBytes(new Buffer('\ufeff' + string, 'utf16le')).toString('binary'); + } + return '(' + string + ')'; + } else if (Buffer.isBuffer(object)) { + return '<' + object.toString('hex') + '>'; + } else if (object instanceof PDFReference) { + return object.toString(); + } else if (object instanceof Date) { + return '(D:' + pad(object.getUTCFullYear(), 4) + pad(object.getUTCMonth() + 1, 2) + pad(object.getUTCDate(), 2) + pad(object.getUTCHours(), 2) + pad(object.getUTCMinutes(), 2) + pad(object.getUTCSeconds(), 2) + 'Z)'; + } else if (Array.isArray(object)) { + items = ((function() { + var k, len, results; + results = []; + for (k = 0, len = object.length; k < len; k++) { + e = object[k]; + results.push(PDFObject.convert(e)); + } + return results; + })()).join(' '); + return '[' + items + ']'; + } else if ({}.toString.call(object) === '[object Object]') { + out = ['<<']; + for (key in object) { + val = object[key]; + out.push('/' + key + ' ' + PDFObject.convert(val)); + } + out.push('>>'); + return out.join('\n'); + } else if (typeof object === 'number') { + return PDFObject.number(object); + } else { + return '' + object; + } + }; + + PDFObject.number = function(n) { + if (n > -1e21 && n < 1e21) { + return Math.round(n * 1e6) / 1e6; + } + throw new Error("unsupported number: " + n); + }; + + return PDFObject; + + })(); + + module.exports = PDFObject; + + PDFReference = require('./reference'); + +}).call(this); diff --git a/pitfall/pdfkit/lib/page.coffee b/pitfall/pdfkit/lib/page.coffee new file mode 100644 index 00000000..2584b3ba --- /dev/null +++ b/pitfall/pdfkit/lib/page.coffee @@ -0,0 +1,124 @@ +### +PDFPage - represents a single page in the PDF document +By Devon Govett +### + +class PDFPage + constructor: (@document, options = {}) -> + @size = options.size or 'letter' + @layout = options.layout or 'portrait' + + # process margins + if typeof options.margin is 'number' + @margins = + top: options.margin + left: options.margin + bottom: options.margin + right: options.margin + + # default to 1 inch margins + else + @margins = options.margins or DEFAULT_MARGINS + + # calculate page dimensions + dimensions = if Array.isArray(@size) then @size else SIZES[@size.toUpperCase()] + @width = dimensions[if @layout is 'portrait' then 0 else 1] + @height = dimensions[if @layout is 'portrait' then 1 else 0] + + @content = @document.ref() + + # Initialize the Font, XObject, and ExtGState dictionaries + @resources = @document.ref + ProcSet: ['PDF', 'Text', 'ImageB', 'ImageC', 'ImageI'] + + # Lazily create these dictionaries + Object.defineProperties this, + fonts: + get: => @resources.data.Font ?= {} + xobjects: + get: => @resources.data.XObject ?= {} + ext_gstates: + get: => @resources.data.ExtGState ?= {} + patterns: + get: => @resources.data.Pattern ?= {} + annotations: + get: => @dictionary.data.Annots ?= [] + + # The page dictionary + @dictionary = @document.ref + Type: 'Page' + Parent: @document._root.data.Pages + MediaBox: [0, 0, @width, @height] + Contents: @content + Resources: @resources + + maxY: -> + @height - @margins.bottom + + write: (chunk) -> + @content.write chunk + + end: -> + @dictionary.end() + @resources.end() + @content.end() + + DEFAULT_MARGINS = + top: 72 + left: 72 + bottom: 72 + right: 72 + + SIZES = + '4A0': [4767.87, 6740.79] + '2A0': [3370.39, 4767.87] + A0: [2383.94, 3370.39] + A1: [1683.78, 2383.94] + A2: [1190.55, 1683.78] + A3: [841.89, 1190.55] + A4: [595.28, 841.89] + A5: [419.53, 595.28] + A6: [297.64, 419.53] + A7: [209.76, 297.64] + A8: [147.40, 209.76] + A9: [104.88, 147.40] + A10: [73.70, 104.88] + B0: [2834.65, 4008.19] + B1: [2004.09, 2834.65] + B2: [1417.32, 2004.09] + B3: [1000.63, 1417.32] + B4: [708.66, 1000.63] + B5: [498.90, 708.66] + B6: [354.33, 498.90] + B7: [249.45, 354.33] + B8: [175.75, 249.45] + B9: [124.72, 175.75] + B10: [87.87, 124.72] + C0: [2599.37, 3676.54] + C1: [1836.85, 2599.37] + C2: [1298.27, 1836.85] + C3: [918.43, 1298.27] + C4: [649.13, 918.43] + C5: [459.21, 649.13] + C6: [323.15, 459.21] + C7: [229.61, 323.15] + C8: [161.57, 229.61] + C9: [113.39, 161.57] + C10: [79.37, 113.39] + RA0: [2437.80, 3458.27] + RA1: [1729.13, 2437.80] + RA2: [1218.90, 1729.13] + RA3: [864.57, 1218.90] + RA4: [609.45, 864.57] + SRA0: [2551.18, 3628.35] + SRA1: [1814.17, 2551.18] + SRA2: [1275.59, 1814.17] + SRA3: [907.09, 1275.59] + SRA4: [637.80, 907.09] + EXECUTIVE: [521.86, 756.00] + FOLIO: [612.00, 936.00] + LEGAL: [612.00, 1008.00] + LETTER: [612.00, 792.00] + TABLOID: [792.00, 1224.00] + +module.exports = PDFPage \ No newline at end of file diff --git a/pitfall/pdfkit/lib/page.js b/pitfall/pdfkit/lib/page.js new file mode 100644 index 00000000..e0a21534 --- /dev/null +++ b/pitfall/pdfkit/lib/page.js @@ -0,0 +1,170 @@ +// Generated by CoffeeScript 1.12.5 + +/* +PDFPage - represents a single page in the PDF document +By Devon Govett + */ + +(function() { + var PDFPage; + + PDFPage = (function() { + var DEFAULT_MARGINS, SIZES; + + function PDFPage(document, options) { + var dimensions; + this.document = document; + if (options == null) { + options = {}; + } + this.size = options.size || 'letter'; + this.layout = options.layout || 'portrait'; + if (typeof options.margin === 'number') { + this.margins = { + top: options.margin, + left: options.margin, + bottom: options.margin, + right: options.margin + }; + } else { + this.margins = options.margins || DEFAULT_MARGINS; + } + dimensions = Array.isArray(this.size) ? this.size : SIZES[this.size.toUpperCase()]; + this.width = dimensions[this.layout === 'portrait' ? 0 : 1]; + this.height = dimensions[this.layout === 'portrait' ? 1 : 0]; + this.content = this.document.ref(); + this.resources = this.document.ref({ + ProcSet: ['PDF', 'Text', 'ImageB', 'ImageC', 'ImageI'] + }); + Object.defineProperties(this, { + fonts: { + get: (function(_this) { + return function() { + var base; + return (base = _this.resources.data).Font != null ? base.Font : base.Font = {}; + }; + })(this) + }, + xobjects: { + get: (function(_this) { + return function() { + var base; + return (base = _this.resources.data).XObject != null ? base.XObject : base.XObject = {}; + }; + })(this) + }, + ext_gstates: { + get: (function(_this) { + return function() { + var base; + return (base = _this.resources.data).ExtGState != null ? base.ExtGState : base.ExtGState = {}; + }; + })(this) + }, + patterns: { + get: (function(_this) { + return function() { + var base; + return (base = _this.resources.data).Pattern != null ? base.Pattern : base.Pattern = {}; + }; + })(this) + }, + annotations: { + get: (function(_this) { + return function() { + var base; + return (base = _this.dictionary.data).Annots != null ? base.Annots : base.Annots = []; + }; + })(this) + } + }); + this.dictionary = this.document.ref({ + Type: 'Page', + Parent: this.document._root.data.Pages, + MediaBox: [0, 0, this.width, this.height], + Contents: this.content, + Resources: this.resources + }); + } + + PDFPage.prototype.maxY = function() { + return this.height - this.margins.bottom; + }; + + PDFPage.prototype.write = function(chunk) { + return this.content.write(chunk); + }; + + PDFPage.prototype.end = function() { + this.dictionary.end(); + this.resources.end(); + return this.content.end(); + }; + + DEFAULT_MARGINS = { + top: 72, + left: 72, + bottom: 72, + right: 72 + }; + + SIZES = { + '4A0': [4767.87, 6740.79], + '2A0': [3370.39, 4767.87], + A0: [2383.94, 3370.39], + A1: [1683.78, 2383.94], + A2: [1190.55, 1683.78], + A3: [841.89, 1190.55], + A4: [595.28, 841.89], + A5: [419.53, 595.28], + A6: [297.64, 419.53], + A7: [209.76, 297.64], + A8: [147.40, 209.76], + A9: [104.88, 147.40], + A10: [73.70, 104.88], + B0: [2834.65, 4008.19], + B1: [2004.09, 2834.65], + B2: [1417.32, 2004.09], + B3: [1000.63, 1417.32], + B4: [708.66, 1000.63], + B5: [498.90, 708.66], + B6: [354.33, 498.90], + B7: [249.45, 354.33], + B8: [175.75, 249.45], + B9: [124.72, 175.75], + B10: [87.87, 124.72], + C0: [2599.37, 3676.54], + C1: [1836.85, 2599.37], + C2: [1298.27, 1836.85], + C3: [918.43, 1298.27], + C4: [649.13, 918.43], + C5: [459.21, 649.13], + C6: [323.15, 459.21], + C7: [229.61, 323.15], + C8: [161.57, 229.61], + C9: [113.39, 161.57], + C10: [79.37, 113.39], + RA0: [2437.80, 3458.27], + RA1: [1729.13, 2437.80], + RA2: [1218.90, 1729.13], + RA3: [864.57, 1218.90], + RA4: [609.45, 864.57], + SRA0: [2551.18, 3628.35], + SRA1: [1814.17, 2551.18], + SRA2: [1275.59, 1814.17], + SRA3: [907.09, 1275.59], + SRA4: [637.80, 907.09], + EXECUTIVE: [521.86, 756.00], + FOLIO: [612.00, 936.00], + LEGAL: [612.00, 1008.00], + LETTER: [612.00, 792.00], + TABLOID: [792.00, 1224.00] + }; + + return PDFPage; + + })(); + + module.exports = PDFPage; + +}).call(this); diff --git a/pitfall/pdfkit/lib/path.coffee b/pitfall/pdfkit/lib/path.coffee new file mode 100644 index 00000000..9bd3ac2e --- /dev/null +++ b/pitfall/pdfkit/lib/path.coffee @@ -0,0 +1,326 @@ +class SVGPath + @apply: (doc, path) -> + commands = parse path + apply commands, doc + + parameters = + A: 7 + a: 7 + C: 6 + c: 6 + H: 1 + h: 1 + L: 2 + l: 2 + M: 2 + m: 2 + Q: 4 + q: 4 + S: 4 + s: 4 + T: 2 + t: 2 + V: 1 + v: 1 + Z: 0 + z: 0 + + parse = (path) -> + ret = [] + args = [] + curArg = "" + foundDecimal = no + params = 0 + + for c in path + if parameters[c]? + params = parameters[c] + if cmd # save existing command + args[args.length] = +curArg if curArg.length > 0 + ret[ret.length] = {cmd,args} + + args = [] + curArg = "" + foundDecimal = no + + cmd = c + + else if c in [" ", ","] or (c is "-" and curArg.length > 0 and curArg[curArg.length - 1] isnt 'e') or (c is "." and foundDecimal) + continue if curArg.length is 0 + + if args.length is params # handle reused commands + ret[ret.length] = {cmd,args} + args = [+curArg] + + # handle assumed commands + cmd = "L" if cmd is "M" + cmd = "l" if cmd is "m" + + else + args[args.length] = +curArg + + foundDecimal = (c is ".") + + # fix for negative numbers or repeated decimals with no delimeter between commands + curArg = if c in ['-', '.'] then c else '' + + else + curArg += c + foundDecimal = true if c is '.' + + # add the last command + if curArg.length > 0 + if args.length is params # handle reused commands + ret[ret.length] = {cmd, args} + args = [+curArg] + + # handle assumed commands + cmd = "L" if cmd is "M" + cmd = "l" if cmd is "m" + else + args[args.length] = +curArg + + ret[ret.length] = {cmd,args} + + return ret + + cx = cy = px = py = sx = sy = 0 + apply = (commands, doc) -> + # current point, control point, and subpath starting point + cx = cy = px = py = sx = sy = 0 + + # run the commands + for c, i in commands + runners[c.cmd]?(doc, c.args) + + cx = cy = px = py = 0 + + runners = + M: (doc, a) -> + cx = a[0] + cy = a[1] + px = py = null + sx = cx + sy = cy + doc.moveTo cx, cy + + m: (doc, a) -> + cx += a[0] + cy += a[1] + px = py = null + sx = cx + sy = cy + doc.moveTo cx, cy + + C: (doc, a) -> + cx = a[4] + cy = a[5] + px = a[2] + py = a[3] + doc.bezierCurveTo a... + + c: (doc, a) -> + doc.bezierCurveTo a[0] + cx, a[1] + cy, a[2] + cx, a[3] + cy, a[4] + cx, a[5] + cy + px = cx + a[2] + py = cy + a[3] + cx += a[4] + cy += a[5] + + S: (doc, a) -> + if px is null + px = cx + py = cy + + doc.bezierCurveTo cx-(px-cx), cy-(py-cy), a[0], a[1], a[2], a[3] + px = a[0] + py = a[1] + cx = a[2] + cy = a[3] + + s: (doc, a) -> + if px is null + px = cx + py = cy + + doc.bezierCurveTo cx-(px-cx), cy-(py-cy), cx + a[0], cy + a[1], cx + a[2], cy + a[3] + px = cx + a[0] + py = cy + a[1] + cx += a[2] + cy += a[3] + + Q: (doc, a) -> + px = a[0] + py = a[1] + cx = a[2] + cy = a[3] + doc.quadraticCurveTo(a[0], a[1], cx, cy) + + q: (doc, a) -> + doc.quadraticCurveTo(a[0] + cx, a[1] + cy, a[2] + cx, a[3] + cy) + px = cx + a[0] + py = cy + a[1] + cx += a[2] + cy += a[3] + + T: (doc, a) -> + if px is null + px = cx + py = cy + else + px = cx-(px-cx) + py = cy-(py-cy) + + doc.quadraticCurveTo(px, py, a[0], a[1]) + px = cx-(px-cx) + py = cy-(py-cy) + cx = a[0] + cy = a[1] + + t: (doc, a) -> + if px is null + px = cx + py = cy + else + px = cx-(px-cx) + py = cy-(py-cy) + + doc.quadraticCurveTo(px, py, cx + a[0], cy + a[1]) + cx += a[0] + cy += a[1] + + A: (doc, a) -> + solveArc(doc, cx, cy, a) + cx = a[5] + cy = a[6] + + a: (doc, a) -> + a[5] += cx + a[6] += cy + solveArc(doc, cx, cy, a) + cx = a[5] + cy = a[6] + + L: (doc, a) -> + cx = a[0] + cy = a[1] + px = py = null + doc.lineTo(cx, cy) + + l: (doc, a) -> + cx += a[0] + cy += a[1] + px = py = null + doc.lineTo(cx, cy) + + H: (doc, a) -> + cx = a[0] + px = py = null + doc.lineTo(cx, cy) + + h: (doc, a) -> + cx += a[0] + px = py = null + doc.lineTo(cx, cy) + + V: (doc, a) -> + cy = a[0] + px = py = null + doc.lineTo(cx, cy) + + v: (doc, a) -> + cy += a[0] + px = py = null + doc.lineTo(cx, cy) + + Z: (doc) -> + doc.closePath() + cx = sx + cy = sy + + z: (doc) -> + doc.closePath() + cx = sx + cy = sy + + solveArc = (doc, x, y, coords) -> + [rx,ry,rot,large,sweep,ex,ey] = coords + segs = arcToSegments(ex, ey, rx, ry, large, sweep, rot, x, y) + + for seg in segs + bez = segmentToBezier seg... + doc.bezierCurveTo bez... + + # from Inkscape svgtopdf, thanks! + arcToSegments = (x, y, rx, ry, large, sweep, rotateX, ox, oy) -> + th = rotateX * (Math.PI/180) + sin_th = Math.sin(th) + cos_th = Math.cos(th) + rx = Math.abs(rx) + ry = Math.abs(ry) + px = cos_th * (ox - x) * 0.5 + sin_th * (oy - y) * 0.5 + py = cos_th * (oy - y) * 0.5 - sin_th * (ox - x) * 0.5 + pl = (px*px) / (rx*rx) + (py*py) / (ry*ry) + if pl > 1 + pl = Math.sqrt(pl) + rx *= pl + ry *= pl + + a00 = cos_th / rx + a01 = sin_th / rx + a10 = (-sin_th) / ry + a11 = (cos_th) / ry + x0 = a00 * ox + a01 * oy + y0 = a10 * ox + a11 * oy + x1 = a00 * x + a01 * y + y1 = a10 * x + a11 * y + + d = (x1-x0) * (x1-x0) + (y1-y0) * (y1-y0) + sfactor_sq = 1 / d - 0.25 + sfactor_sq = 0 if sfactor_sq < 0 + sfactor = Math.sqrt(sfactor_sq) + sfactor = -sfactor if sweep is large + + xc = 0.5 * (x0 + x1) - sfactor * (y1-y0) + yc = 0.5 * (y0 + y1) + sfactor * (x1-x0) + + th0 = Math.atan2(y0-yc, x0-xc) + th1 = Math.atan2(y1-yc, x1-xc) + + th_arc = th1-th0 + if th_arc < 0 && sweep is 1 + th_arc += 2*Math.PI + else if th_arc > 0 && sweep is 0 + th_arc -= 2 * Math.PI + + segments = Math.ceil(Math.abs(th_arc / (Math.PI * 0.5 + 0.001))) + result = [] + + for i in [0...segments] + th2 = th0 + i * th_arc / segments + th3 = th0 + (i+1) * th_arc / segments + result[i] = [xc, yc, th2, th3, rx, ry, sin_th, cos_th] + + return result + + segmentToBezier = (cx, cy, th0, th1, rx, ry, sin_th, cos_th) -> + a00 = cos_th * rx + a01 = -sin_th * ry + a10 = sin_th * rx + a11 = cos_th * ry + + th_half = 0.5 * (th1 - th0) + t = (8 / 3) * Math.sin(th_half * 0.5) * Math.sin(th_half * 0.5) / Math.sin(th_half) + x1 = cx + Math.cos(th0) - t * Math.sin(th0) + y1 = cy + Math.sin(th0) + t * Math.cos(th0) + x3 = cx + Math.cos(th1) + y3 = cy + Math.sin(th1) + x2 = x3 + t * Math.sin(th1) + y2 = y3 - t * Math.cos(th1) + + return [ + a00 * x1 + a01 * y1, a10 * x1 + a11 * y1, + a00 * x2 + a01 * y2, a10 * x2 + a11 * y2, + a00 * x3 + a01 * y3, a10 * x3 + a11 * y3 + ] + +module.exports = SVGPath diff --git a/pitfall/pdfkit/lib/path.js b/pitfall/pdfkit/lib/path.js new file mode 100644 index 00000000..b91648b8 --- /dev/null +++ b/pitfall/pdfkit/lib/path.js @@ -0,0 +1,366 @@ +// Generated by CoffeeScript 1.12.5 +(function() { + var SVGPath; + + SVGPath = (function() { + var apply, arcToSegments, cx, cy, parameters, parse, px, py, runners, segmentToBezier, solveArc, sx, sy; + + function SVGPath() {} + + SVGPath.apply = function(doc, path) { + var commands; + commands = parse(path); + return apply(commands, doc); + }; + + parameters = { + A: 7, + a: 7, + C: 6, + c: 6, + H: 1, + h: 1, + L: 2, + l: 2, + M: 2, + m: 2, + Q: 4, + q: 4, + S: 4, + s: 4, + T: 2, + t: 2, + V: 1, + v: 1, + Z: 0, + z: 0 + }; + + parse = function(path) { + var args, c, cmd, curArg, foundDecimal, j, len, params, ret; + ret = []; + args = []; + curArg = ""; + foundDecimal = false; + params = 0; + for (j = 0, len = path.length; j < len; j++) { + c = path[j]; + if (parameters[c] != null) { + params = parameters[c]; + if (cmd) { + if (curArg.length > 0) { + args[args.length] = +curArg; + } + ret[ret.length] = { + cmd: cmd, + args: args + }; + args = []; + curArg = ""; + foundDecimal = false; + } + cmd = c; + } else if ((c === " " || c === ",") || (c === "-" && curArg.length > 0 && curArg[curArg.length - 1] !== 'e') || (c === "." && foundDecimal)) { + if (curArg.length === 0) { + continue; + } + if (args.length === params) { + ret[ret.length] = { + cmd: cmd, + args: args + }; + args = [+curArg]; + if (cmd === "M") { + cmd = "L"; + } + if (cmd === "m") { + cmd = "l"; + } + } else { + args[args.length] = +curArg; + } + foundDecimal = c === "."; + curArg = c === '-' || c === '.' ? c : ''; + } else { + curArg += c; + if (c === '.') { + foundDecimal = true; + } + } + } + if (curArg.length > 0) { + if (args.length === params) { + ret[ret.length] = { + cmd: cmd, + args: args + }; + args = [+curArg]; + if (cmd === "M") { + cmd = "L"; + } + if (cmd === "m") { + cmd = "l"; + } + } else { + args[args.length] = +curArg; + } + } + ret[ret.length] = { + cmd: cmd, + args: args + }; + return ret; + }; + + cx = cy = px = py = sx = sy = 0; + + apply = function(commands, doc) { + var c, i, j, len, name; + cx = cy = px = py = sx = sy = 0; + for (i = j = 0, len = commands.length; j < len; i = ++j) { + c = commands[i]; + if (typeof runners[name = c.cmd] === "function") { + runners[name](doc, c.args); + } + } + return cx = cy = px = py = 0; + }; + + runners = { + M: function(doc, a) { + cx = a[0]; + cy = a[1]; + px = py = null; + sx = cx; + sy = cy; + return doc.moveTo(cx, cy); + }, + m: function(doc, a) { + cx += a[0]; + cy += a[1]; + px = py = null; + sx = cx; + sy = cy; + return doc.moveTo(cx, cy); + }, + C: function(doc, a) { + cx = a[4]; + cy = a[5]; + px = a[2]; + py = a[3]; + return doc.bezierCurveTo.apply(doc, a); + }, + c: function(doc, a) { + doc.bezierCurveTo(a[0] + cx, a[1] + cy, a[2] + cx, a[3] + cy, a[4] + cx, a[5] + cy); + px = cx + a[2]; + py = cy + a[3]; + cx += a[4]; + return cy += a[5]; + }, + S: function(doc, a) { + if (px === null) { + px = cx; + py = cy; + } + doc.bezierCurveTo(cx - (px - cx), cy - (py - cy), a[0], a[1], a[2], a[3]); + px = a[0]; + py = a[1]; + cx = a[2]; + return cy = a[3]; + }, + s: function(doc, a) { + if (px === null) { + px = cx; + py = cy; + } + doc.bezierCurveTo(cx - (px - cx), cy - (py - cy), cx + a[0], cy + a[1], cx + a[2], cy + a[3]); + px = cx + a[0]; + py = cy + a[1]; + cx += a[2]; + return cy += a[3]; + }, + Q: function(doc, a) { + px = a[0]; + py = a[1]; + cx = a[2]; + cy = a[3]; + return doc.quadraticCurveTo(a[0], a[1], cx, cy); + }, + q: function(doc, a) { + doc.quadraticCurveTo(a[0] + cx, a[1] + cy, a[2] + cx, a[3] + cy); + px = cx + a[0]; + py = cy + a[1]; + cx += a[2]; + return cy += a[3]; + }, + T: function(doc, a) { + if (px === null) { + px = cx; + py = cy; + } else { + px = cx - (px - cx); + py = cy - (py - cy); + } + doc.quadraticCurveTo(px, py, a[0], a[1]); + px = cx - (px - cx); + py = cy - (py - cy); + cx = a[0]; + return cy = a[1]; + }, + t: function(doc, a) { + if (px === null) { + px = cx; + py = cy; + } else { + px = cx - (px - cx); + py = cy - (py - cy); + } + doc.quadraticCurveTo(px, py, cx + a[0], cy + a[1]); + cx += a[0]; + return cy += a[1]; + }, + A: function(doc, a) { + solveArc(doc, cx, cy, a); + cx = a[5]; + return cy = a[6]; + }, + a: function(doc, a) { + a[5] += cx; + a[6] += cy; + solveArc(doc, cx, cy, a); + cx = a[5]; + return cy = a[6]; + }, + L: function(doc, a) { + cx = a[0]; + cy = a[1]; + px = py = null; + return doc.lineTo(cx, cy); + }, + l: function(doc, a) { + cx += a[0]; + cy += a[1]; + px = py = null; + return doc.lineTo(cx, cy); + }, + H: function(doc, a) { + cx = a[0]; + px = py = null; + return doc.lineTo(cx, cy); + }, + h: function(doc, a) { + cx += a[0]; + px = py = null; + return doc.lineTo(cx, cy); + }, + V: function(doc, a) { + cy = a[0]; + px = py = null; + return doc.lineTo(cx, cy); + }, + v: function(doc, a) { + cy += a[0]; + px = py = null; + return doc.lineTo(cx, cy); + }, + Z: function(doc) { + doc.closePath(); + cx = sx; + return cy = sy; + }, + z: function(doc) { + doc.closePath(); + cx = sx; + return cy = sy; + } + }; + + solveArc = function(doc, x, y, coords) { + var bez, ex, ey, j, large, len, results, rot, rx, ry, seg, segs, sweep; + rx = coords[0], ry = coords[1], rot = coords[2], large = coords[3], sweep = coords[4], ex = coords[5], ey = coords[6]; + segs = arcToSegments(ex, ey, rx, ry, large, sweep, rot, x, y); + results = []; + for (j = 0, len = segs.length; j < len; j++) { + seg = segs[j]; + bez = segmentToBezier.apply(null, seg); + results.push(doc.bezierCurveTo.apply(doc, bez)); + } + return results; + }; + + arcToSegments = function(x, y, rx, ry, large, sweep, rotateX, ox, oy) { + var a00, a01, a10, a11, cos_th, d, i, j, pl, ref, result, segments, sfactor, sfactor_sq, sin_th, th, th0, th1, th2, th3, th_arc, x0, x1, xc, y0, y1, yc; + th = rotateX * (Math.PI / 180); + sin_th = Math.sin(th); + cos_th = Math.cos(th); + rx = Math.abs(rx); + ry = Math.abs(ry); + px = cos_th * (ox - x) * 0.5 + sin_th * (oy - y) * 0.5; + py = cos_th * (oy - y) * 0.5 - sin_th * (ox - x) * 0.5; + pl = (px * px) / (rx * rx) + (py * py) / (ry * ry); + if (pl > 1) { + pl = Math.sqrt(pl); + rx *= pl; + ry *= pl; + } + a00 = cos_th / rx; + a01 = sin_th / rx; + a10 = (-sin_th) / ry; + a11 = cos_th / ry; + x0 = a00 * ox + a01 * oy; + y0 = a10 * ox + a11 * oy; + x1 = a00 * x + a01 * y; + y1 = a10 * x + a11 * y; + d = (x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0); + sfactor_sq = 1 / d - 0.25; + if (sfactor_sq < 0) { + sfactor_sq = 0; + } + sfactor = Math.sqrt(sfactor_sq); + if (sweep === large) { + sfactor = -sfactor; + } + xc = 0.5 * (x0 + x1) - sfactor * (y1 - y0); + yc = 0.5 * (y0 + y1) + sfactor * (x1 - x0); + th0 = Math.atan2(y0 - yc, x0 - xc); + th1 = Math.atan2(y1 - yc, x1 - xc); + th_arc = th1 - th0; + if (th_arc < 0 && sweep === 1) { + th_arc += 2 * Math.PI; + } else if (th_arc > 0 && sweep === 0) { + th_arc -= 2 * Math.PI; + } + segments = Math.ceil(Math.abs(th_arc / (Math.PI * 0.5 + 0.001))); + result = []; + for (i = j = 0, ref = segments; 0 <= ref ? j < ref : j > ref; i = 0 <= ref ? ++j : --j) { + th2 = th0 + i * th_arc / segments; + th3 = th0 + (i + 1) * th_arc / segments; + result[i] = [xc, yc, th2, th3, rx, ry, sin_th, cos_th]; + } + return result; + }; + + segmentToBezier = function(cx, cy, th0, th1, rx, ry, sin_th, cos_th) { + var a00, a01, a10, a11, t, th_half, x1, x2, x3, y1, y2, y3; + a00 = cos_th * rx; + a01 = -sin_th * ry; + a10 = sin_th * rx; + a11 = cos_th * ry; + th_half = 0.5 * (th1 - th0); + t = (8 / 3) * Math.sin(th_half * 0.5) * Math.sin(th_half * 0.5) / Math.sin(th_half); + x1 = cx + Math.cos(th0) - t * Math.sin(th0); + y1 = cy + Math.sin(th0) + t * Math.cos(th0); + x3 = cx + Math.cos(th1); + y3 = cy + Math.sin(th1); + x2 = x3 + t * Math.sin(th1); + y2 = y3 - t * Math.cos(th1); + return [a00 * x1 + a01 * y1, a10 * x1 + a11 * y1, a00 * x2 + a01 * y2, a10 * x2 + a11 * y2, a00 * x3 + a01 * y3, a10 * x3 + a11 * y3]; + }; + + return SVGPath; + + })(); + + module.exports = SVGPath; + +}).call(this); diff --git a/pitfall/pdfkit/lib/reference.coffee b/pitfall/pdfkit/lib/reference.coffee new file mode 100644 index 00000000..20b05f43 --- /dev/null +++ b/pitfall/pdfkit/lib/reference.coffee @@ -0,0 +1,73 @@ +### +PDFReference - represents a reference to another object in the PDF object heirarchy +By Devon Govett +### + +zlib = require 'zlib' +stream = require 'stream' + +class PDFReference extends stream.Writable + constructor: (@document, @id, @data = {}) -> + super decodeStrings: no + @gen = 0 + @deflate = null + @compress = @document.compress and not @data.Filter + @uncompressedLength = 0 + @chunks = [] + + initDeflate: -> + @data.Filter = 'FlateDecode' + + @deflate = zlib.createDeflate() + @deflate.on 'data', (chunk) => + @chunks.push chunk + @data.Length += chunk.length + + @deflate.on 'end', @finalize + + _write: (chunk, encoding, callback) -> + unless Buffer.isBuffer(chunk) + chunk = new Buffer(chunk + '\n', 'binary') + + @uncompressedLength += chunk.length + @data.Length ?= 0 + + if @compress + @initDeflate() if not @deflate + @deflate.write chunk + else + @chunks.push chunk + @data.Length += chunk.length + + callback() + + end: (chunk) -> + super + + if @deflate + @deflate.end() + else + @finalize() + + finalize: => + @offset = @document._offset + + @document._write "#{@id} #{@gen} obj" + @document._write PDFObject.convert(@data) + + if @chunks.length + @document._write 'stream' + for chunk in @chunks + @document._write chunk + + @chunks.length = 0 # free up memory + @document._write '\nendstream' + + @document._write 'endobj' + @document._refEnd(this) + + toString: -> + return "#{@id} #{@gen} R" + +module.exports = PDFReference +PDFObject = require './object' diff --git a/pitfall/pdfkit/lib/reference.js b/pitfall/pdfkit/lib/reference.js new file mode 100644 index 00000000..6ba3205f --- /dev/null +++ b/pitfall/pdfkit/lib/reference.js @@ -0,0 +1,109 @@ +// Generated by CoffeeScript 1.12.5 + +/* +PDFReference - represents a reference to another object in the PDF object heirarchy +By Devon Govett + */ + +(function() { + var PDFObject, PDFReference, stream, zlib, + bind = function(fn, me){ return function(){ return fn.apply(me, arguments); }; }, + extend = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty; + + zlib = require('zlib'); + + stream = require('stream'); + + PDFReference = (function(superClass) { + extend(PDFReference, superClass); + + function PDFReference(document, id, data) { + this.document = document; + this.id = id; + this.data = data != null ? data : {}; + this.finalize = bind(this.finalize, this); + PDFReference.__super__.constructor.call(this, { + decodeStrings: false + }); + this.gen = 0; + this.deflate = null; + this.compress = this.document.compress && !this.data.Filter; + this.uncompressedLength = 0; + this.chunks = []; + } + + PDFReference.prototype.initDeflate = function() { + this.data.Filter = 'FlateDecode'; + this.deflate = zlib.createDeflate(); + this.deflate.on('data', (function(_this) { + return function(chunk) { + _this.chunks.push(chunk); + return _this.data.Length += chunk.length; + }; + })(this)); + return this.deflate.on('end', this.finalize); + }; + + PDFReference.prototype._write = function(chunk, encoding, callback) { + var base; + if (!Buffer.isBuffer(chunk)) { + chunk = new Buffer(chunk + '\n', 'binary'); + } + this.uncompressedLength += chunk.length; + if ((base = this.data).Length == null) { + base.Length = 0; + } + if (this.compress) { + if (!this.deflate) { + this.initDeflate(); + } + this.deflate.write(chunk); + } else { + this.chunks.push(chunk); + this.data.Length += chunk.length; + } + return callback(); + }; + + PDFReference.prototype.end = function(chunk) { + PDFReference.__super__.end.apply(this, arguments); + if (this.deflate) { + return this.deflate.end(); + } else { + return this.finalize(); + } + }; + + PDFReference.prototype.finalize = function() { + var chunk, i, len, ref; + this.offset = this.document._offset; + this.document._write(this.id + " " + this.gen + " obj"); + this.document._write(PDFObject.convert(this.data)); + if (this.chunks.length) { + this.document._write('stream'); + ref = this.chunks; + for (i = 0, len = ref.length; i < len; i++) { + chunk = ref[i]; + this.document._write(chunk); + } + this.chunks.length = 0; + this.document._write('\nendstream'); + } + this.document._write('endobj'); + return this.document._refEnd(this); + }; + + PDFReference.prototype.toString = function() { + return this.id + " " + this.gen + " R"; + }; + + return PDFReference; + + })(stream.Writable); + + module.exports = PDFReference; + + PDFObject = require('./object'); + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/.bin/acorn b/pitfall/pdfkit/node_modules/.bin/acorn new file mode 120000 index 00000000..cf767603 --- /dev/null +++ b/pitfall/pdfkit/node_modules/.bin/acorn @@ -0,0 +1 @@ +../acorn/bin/acorn \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/.bin/brfs b/pitfall/pdfkit/node_modules/.bin/brfs new file mode 120000 index 00000000..43f8db9a --- /dev/null +++ b/pitfall/pdfkit/node_modules/.bin/brfs @@ -0,0 +1 @@ +../brfs/bin/cmd.js \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/.bin/browser-pack b/pitfall/pdfkit/node_modules/.bin/browser-pack new file mode 120000 index 00000000..1d047b95 --- /dev/null +++ b/pitfall/pdfkit/node_modules/.bin/browser-pack @@ -0,0 +1 @@ +../browser-pack/bin/cmd.js \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/.bin/browserify b/pitfall/pdfkit/node_modules/.bin/browserify new file mode 120000 index 00000000..ab156b35 --- /dev/null +++ b/pitfall/pdfkit/node_modules/.bin/browserify @@ -0,0 +1 @@ +../browserify/bin/cmd.js \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/.bin/cake b/pitfall/pdfkit/node_modules/.bin/cake new file mode 120000 index 00000000..d95f32af --- /dev/null +++ b/pitfall/pdfkit/node_modules/.bin/cake @@ -0,0 +1 @@ +../coffee-script/bin/cake \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/.bin/coffee b/pitfall/pdfkit/node_modules/.bin/coffee new file mode 120000 index 00000000..b57f275d --- /dev/null +++ b/pitfall/pdfkit/node_modules/.bin/coffee @@ -0,0 +1 @@ +../coffee-script/bin/coffee \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/.bin/deps-sort b/pitfall/pdfkit/node_modules/.bin/deps-sort new file mode 120000 index 00000000..b2dda9ef --- /dev/null +++ b/pitfall/pdfkit/node_modules/.bin/deps-sort @@ -0,0 +1 @@ +../deps-sort/bin/cmd.js \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/.bin/escodegen b/pitfall/pdfkit/node_modules/.bin/escodegen new file mode 120000 index 00000000..01a7c325 --- /dev/null +++ b/pitfall/pdfkit/node_modules/.bin/escodegen @@ -0,0 +1 @@ +../escodegen/bin/escodegen.js \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/.bin/esgenerate b/pitfall/pdfkit/node_modules/.bin/esgenerate new file mode 120000 index 00000000..7d0293e6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/.bin/esgenerate @@ -0,0 +1 @@ +../escodegen/bin/esgenerate.js \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/.bin/esparse b/pitfall/pdfkit/node_modules/.bin/esparse new file mode 120000 index 00000000..7423b18b --- /dev/null +++ b/pitfall/pdfkit/node_modules/.bin/esparse @@ -0,0 +1 @@ +../esprima/bin/esparse.js \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/.bin/esvalidate b/pitfall/pdfkit/node_modules/.bin/esvalidate new file mode 120000 index 00000000..16069eff --- /dev/null +++ b/pitfall/pdfkit/node_modules/.bin/esvalidate @@ -0,0 +1 @@ +../esprima/bin/esvalidate.js \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/.bin/exorcist b/pitfall/pdfkit/node_modules/.bin/exorcist new file mode 120000 index 00000000..f32e183c --- /dev/null +++ b/pitfall/pdfkit/node_modules/.bin/exorcist @@ -0,0 +1 @@ +../exorcist/bin/exorcist.js \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/.bin/insert-module-globals b/pitfall/pdfkit/node_modules/.bin/insert-module-globals new file mode 120000 index 00000000..68af3a91 --- /dev/null +++ b/pitfall/pdfkit/node_modules/.bin/insert-module-globals @@ -0,0 +1 @@ +../insert-module-globals/bin/cmd.js \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/.bin/jade b/pitfall/pdfkit/node_modules/.bin/jade new file mode 120000 index 00000000..65a3bac6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/.bin/jade @@ -0,0 +1 @@ +../jade/bin/jade.js \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/.bin/md2html b/pitfall/pdfkit/node_modules/.bin/md2html new file mode 120000 index 00000000..ebcab9ae --- /dev/null +++ b/pitfall/pdfkit/node_modules/.bin/md2html @@ -0,0 +1 @@ +../markdown/bin/md2html.js \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/.bin/module-deps b/pitfall/pdfkit/node_modules/.bin/module-deps new file mode 120000 index 00000000..db5e4a8d --- /dev/null +++ b/pitfall/pdfkit/node_modules/.bin/module-deps @@ -0,0 +1 @@ +../module-deps/cmd.js \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/.bin/nopt b/pitfall/pdfkit/node_modules/.bin/nopt new file mode 120000 index 00000000..6b6566ea --- /dev/null +++ b/pitfall/pdfkit/node_modules/.bin/nopt @@ -0,0 +1 @@ +../nopt/bin/nopt.js \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/.bin/quote-stream b/pitfall/pdfkit/node_modules/.bin/quote-stream new file mode 120000 index 00000000..1a06761a --- /dev/null +++ b/pitfall/pdfkit/node_modules/.bin/quote-stream @@ -0,0 +1 @@ +../quote-stream/bin/cmd.js \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/.bin/uglifyjs b/pitfall/pdfkit/node_modules/.bin/uglifyjs new file mode 120000 index 00000000..fef3468b --- /dev/null +++ b/pitfall/pdfkit/node_modules/.bin/uglifyjs @@ -0,0 +1 @@ +../uglify-js/bin/uglifyjs \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/.bin/umd b/pitfall/pdfkit/node_modules/.bin/umd new file mode 120000 index 00000000..69767ed8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/.bin/umd @@ -0,0 +1 @@ +../umd/bin/cli.js \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/Base64/.npmignore b/pitfall/pdfkit/node_modules/Base64/.npmignore new file mode 100644 index 00000000..cba87a39 --- /dev/null +++ b/pitfall/pdfkit/node_modules/Base64/.npmignore @@ -0,0 +1,2 @@ +/coverage/ +/node_modules/ diff --git a/pitfall/pdfkit/node_modules/Base64/.travis.yml b/pitfall/pdfkit/node_modules/Base64/.travis.yml new file mode 100644 index 00000000..fbde0513 --- /dev/null +++ b/pitfall/pdfkit/node_modules/Base64/.travis.yml @@ -0,0 +1,7 @@ +language: node_js +node_js: + - "0.8" + - "0.10" + - "0.11" +install: make setup +script: make test diff --git a/pitfall/pdfkit/node_modules/Base64/LICENSE b/pitfall/pdfkit/node_modules/Base64/LICENSE new file mode 100644 index 00000000..48327671 --- /dev/null +++ b/pitfall/pdfkit/node_modules/Base64/LICENSE @@ -0,0 +1,14 @@ + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + Version 2, December 2004 + + Copyright (c) 2011..2012 David Chambers + + Everyone is permitted to copy and distribute verbatim or modified + copies of this license document, and changing it is allowed as long + as the name is changed. + + DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. You just DO WHAT THE FUCK YOU WANT TO. diff --git a/pitfall/pdfkit/node_modules/Base64/Makefile b/pitfall/pdfkit/node_modules/Base64/Makefile new file mode 100644 index 00000000..5c475dfc --- /dev/null +++ b/pitfall/pdfkit/node_modules/Base64/Makefile @@ -0,0 +1,42 @@ +ISTANBUL = node_modules/.bin/istanbul +UGLIFYJS = node_modules/.bin/uglifyjs +XYZ = node_modules/.bin/xyz --message X.Y.Z --tag X.Y.Z + +SRC = base64.js +MIN = $(patsubst %.js,%.min.js,$(SRC)) + + +.PHONY: all +all: $(MIN) + +%.min.js: %.js + $(UGLIFYJS) $< --compress --mangle > $@ + + +.PHONY: bytes +bytes: base64.min.js + gzip --best --stdout $< | wc -c | tr -d ' ' + + +.PHONY: clean +clean: + rm -f -- $(MIN) + + +.PHONY: release-major release-minor release-patch +release-major: + $(XYZ) --increment major +release-minor: + $(XYZ) --increment minor +release-patch: + $(XYZ) --increment patch + + +.PHONY: setup +setup: + npm install + + +.PHONY: test +test: + $(ISTANBUL) cover node_modules/.bin/_mocha -- --compilers coffee:coffee-script/register diff --git a/pitfall/pdfkit/node_modules/Base64/README.md b/pitfall/pdfkit/node_modules/Base64/README.md new file mode 100644 index 00000000..e5dafed4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/Base64/README.md @@ -0,0 +1,34 @@ +# Base64.js + +≈ 500 byte* polyfill for browsers which don't provide [`window.btoa`][1] and +[`window.atob`][2]. + +Although the script does no harm in browsers which do provide these functions, +a conditional script loader such as [yepnope][3] can prevent unnecessary HTTP +requests. + +```javascript +yepnope({ + test: window.btoa && window.atob, + nope: 'base64.js', + callback: function () { + // `btoa` and `atob` are now safe to use + } +}) +``` + +Base64.js stems from a [gist][4] by [yahiko][5]. + +### Running the test suite + + make setup + make test + +\* Minified and gzipped. Run `make bytes` to verify. + + +[1]: https://developer.mozilla.org/en/DOM/window.btoa +[2]: https://developer.mozilla.org/en/DOM/window.atob +[3]: http://yepnopejs.com/ +[4]: https://gist.github.com/229984 +[5]: https://github.com/yahiko diff --git a/pitfall/pdfkit/node_modules/Base64/base64.js b/pitfall/pdfkit/node_modules/Base64/base64.js new file mode 100644 index 00000000..15d3a8af --- /dev/null +++ b/pitfall/pdfkit/node_modules/Base64/base64.js @@ -0,0 +1,60 @@ +;(function () { + + var object = typeof exports != 'undefined' ? exports : this; // #8: web workers + var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; + + function InvalidCharacterError(message) { + this.message = message; + } + InvalidCharacterError.prototype = new Error; + InvalidCharacterError.prototype.name = 'InvalidCharacterError'; + + // encoder + // [https://gist.github.com/999166] by [https://github.com/nignag] + object.btoa || ( + object.btoa = function (input) { + for ( + // initialize result and counter + var block, charCode, idx = 0, map = chars, output = ''; + // if the next input index does not exist: + // change the mapping table to "=" + // check if d has no fractional digits + input.charAt(idx | 0) || (map = '=', idx % 1); + // "8 - idx % 1 * 8" generates the sequence 2, 4, 6, 8 + output += map.charAt(63 & block >> 8 - idx % 1 * 8) + ) { + charCode = input.charCodeAt(idx += 3/4); + if (charCode > 0xFF) { + throw new InvalidCharacterError("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range."); + } + block = block << 8 | charCode; + } + return output; + }); + + // decoder + // [https://gist.github.com/1020396] by [https://github.com/atk] + object.atob || ( + object.atob = function (input) { + input = input.replace(/=+$/, ''); + if (input.length % 4 == 1) { + throw new InvalidCharacterError("'atob' failed: The string to be decoded is not correctly encoded."); + } + for ( + // initialize result and counters + var bc = 0, bs, buffer, idx = 0, output = ''; + // get next character + buffer = input.charAt(idx++); + // character found in table? initialize bit storage and add its ascii value; + ~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer, + // and if not first of each 4 characters, + // convert the first 8 bits to one ascii character + bc++ % 4) ? output += String.fromCharCode(255 & bs >> (-2 * bc & 6)) : 0 + ) { + // try to find character in table (0-63, not found => -1) + buffer = chars.indexOf(buffer); + } + return output; + }); + +}()); diff --git a/pitfall/pdfkit/node_modules/Base64/base64.min.js b/pitfall/pdfkit/node_modules/Base64/base64.min.js new file mode 100644 index 00000000..33c7aa40 --- /dev/null +++ b/pitfall/pdfkit/node_modules/Base64/base64.min.js @@ -0,0 +1 @@ +!function(){function t(t){this.message=t}var e="undefined"!=typeof exports?exports:this,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";t.prototype=new Error,t.prototype.name="InvalidCharacterError",e.btoa||(e.btoa=function(e){for(var o,n,a=0,i=r,c="";e.charAt(0|a)||(i="=",a%1);c+=i.charAt(63&o>>8-a%1*8)){if(n=e.charCodeAt(a+=.75),n>255)throw new t("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range.");o=o<<8|n}return c}),e.atob||(e.atob=function(e){if(e=e.replace(/=+$/,""),e.length%4==1)throw new t("'atob' failed: The string to be decoded is not correctly encoded.");for(var o,n,a=0,i=0,c="";n=e.charAt(i++);~n&&(o=a%4?64*o+n:n,a++%4)?c+=String.fromCharCode(255&o>>(-2*a&6)):0)n=r.indexOf(n);return c})}(); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/Base64/package.json b/pitfall/pdfkit/node_modules/Base64/package.json new file mode 100644 index 00000000..1ef9bc3d --- /dev/null +++ b/pitfall/pdfkit/node_modules/Base64/package.json @@ -0,0 +1,90 @@ +{ + "_args": [ + [ + { + "raw": "Base64@~0.2.0", + "scope": null, + "escapedName": "Base64", + "name": "Base64", + "rawSpec": "~0.2.0", + "spec": ">=0.2.0 <0.3.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/http-browserify" + ] + ], + "_from": "Base64@>=0.2.0 <0.3.0", + "_id": "Base64@0.2.1", + "_inCache": true, + "_location": "/Base64", + "_npmUser": { + "name": "michaelficarra", + "email": "npm@michael.ficarra.me" + }, + "_npmVersion": "1.4.3", + "_phantomChildren": {}, + "_requested": { + "raw": "Base64@~0.2.0", + "scope": null, + "escapedName": "Base64", + "name": "Base64", + "rawSpec": "~0.2.0", + "spec": ">=0.2.0 <0.3.0", + "type": "range" + }, + "_requiredBy": [ + "/http-browserify" + ], + "_resolved": "https://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz", + "_shasum": "ba3a4230708e186705065e66babdd4c35cf60028", + "_shrinkwrap": null, + "_spec": "Base64@~0.2.0", + "_where": "/Users/MB/git/pdfkit/node_modules/http-browserify", + "author": { + "name": "David Chambers", + "email": "dc@davidchambers.me" + }, + "bugs": { + "url": "https://github.com/davidchambers/Base64.js/issues" + }, + "dependencies": {}, + "description": "Base64 encoding and decoding", + "devDependencies": { + "coffee-script": "1.7.x", + "istanbul": "0.2.x", + "mocha": "1.18.x", + "uglify-js": "2.4.x", + "xyz": "0.1.x" + }, + "directories": {}, + "dist": { + "shasum": "ba3a4230708e186705065e66babdd4c35cf60028", + "tarball": "https://registry.npmjs.org/Base64/-/Base64-0.2.1.tgz" + }, + "homepage": "https://github.com/davidchambers/Base64.js", + "licenses": [ + { + "type": "WTFPL", + "url": "https://raw.github.com/davidchambers/Base64.js/master/LICENSE" + } + ], + "main": "./base64.js", + "maintainers": [ + { + "name": "davidchambers", + "email": "dc@hashify.me" + }, + { + "name": "michaelficarra", + "email": "npm@michael.ficarra.me" + } + ], + "name": "Base64", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/davidchambers/Base64.js.git" + }, + "version": "0.2.1" +} diff --git a/pitfall/pdfkit/node_modules/Base64/test/base64.coffee b/pitfall/pdfkit/node_modules/Base64/test/base64.coffee new file mode 100644 index 00000000..e25cf5c6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/Base64/test/base64.coffee @@ -0,0 +1,52 @@ +assert = require 'assert' + +{btoa, atob} = require '..' + + +describe 'Base64.js', -> + + it 'can encode ASCII input', -> + assert.strictEqual btoa(''), '' + assert.strictEqual btoa('f'), 'Zg==' + assert.strictEqual btoa('fo'), 'Zm8=' + assert.strictEqual btoa('foo'), 'Zm9v' + assert.strictEqual btoa('quux'), 'cXV1eA==' + assert.strictEqual btoa('!"#$%'), 'ISIjJCU=' + assert.strictEqual btoa("&'()*+"), 'JicoKSor' + assert.strictEqual btoa(',-./012'), 'LC0uLzAxMg==' + assert.strictEqual btoa('3456789:'), 'MzQ1Njc4OTo=' + assert.strictEqual btoa(';<=>?@ABC'), 'Ozw9Pj9AQUJD' + assert.strictEqual btoa('DEFGHIJKLM'), 'REVGR0hJSktMTQ==' + assert.strictEqual btoa('NOPQRSTUVWX'), 'Tk9QUVJTVFVWV1g=' + assert.strictEqual btoa('YZ[\\]^_`abc'), 'WVpbXF1eX2BhYmM=' + assert.strictEqual btoa('defghijklmnop'), 'ZGVmZ2hpamtsbW5vcA==' + assert.strictEqual btoa('qrstuvwxyz{|}~'), 'cXJzdHV2d3h5ent8fX4=' + + it 'cannot encode non-ASCII input', -> + assert.throws (-> btoa '✈'), (err) -> + err instanceof Error and + err.name is 'InvalidCharacterError' and + err.message is "'btoa' failed: The string to be encoded contains characters outside of the Latin1 range." + + it 'can decode Base64-encoded input', -> + assert.strictEqual atob(''), '' + assert.strictEqual atob('Zg=='), 'f' + assert.strictEqual atob('Zm8='), 'fo' + assert.strictEqual atob('Zm9v'), 'foo' + assert.strictEqual atob('cXV1eA=='), 'quux' + assert.strictEqual atob('ISIjJCU='), '!"#$%' + assert.strictEqual atob('JicoKSor'), "&'()*+" + assert.strictEqual atob('LC0uLzAxMg=='), ',-./012' + assert.strictEqual atob('MzQ1Njc4OTo='), '3456789:' + assert.strictEqual atob('Ozw9Pj9AQUJD'), ';<=>?@ABC' + assert.strictEqual atob('REVGR0hJSktMTQ=='), 'DEFGHIJKLM' + assert.strictEqual atob('Tk9QUVJTVFVWV1g='), 'NOPQRSTUVWX' + assert.strictEqual atob('WVpbXF1eX2BhYmM='), 'YZ[\\]^_`abc' + assert.strictEqual atob('ZGVmZ2hpamtsbW5vcA=='), 'defghijklmnop' + assert.strictEqual atob('cXJzdHV2d3h5ent8fX4='), 'qrstuvwxyz{|}~' + + it 'cannot decode invalid input', -> + assert.throws (-> atob 'a'), (err) -> + err instanceof Error and + err.name is 'InvalidCharacterError' and + err.message is "'atob' failed: The string to be decoded is not correctly encoded." diff --git a/pitfall/pdfkit/node_modules/JSONStream/.npmignore b/pitfall/pdfkit/node_modules/JSONStream/.npmignore new file mode 100644 index 00000000..a9a9d586 --- /dev/null +++ b/pitfall/pdfkit/node_modules/JSONStream/.npmignore @@ -0,0 +1,2 @@ +node_modules/* +node_modules diff --git a/pitfall/pdfkit/node_modules/JSONStream/.travis.yml b/pitfall/pdfkit/node_modules/JSONStream/.travis.yml new file mode 100644 index 00000000..cc4dba29 --- /dev/null +++ b/pitfall/pdfkit/node_modules/JSONStream/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.8" + - "0.10" diff --git a/pitfall/pdfkit/node_modules/JSONStream/LICENSE.APACHE2 b/pitfall/pdfkit/node_modules/JSONStream/LICENSE.APACHE2 new file mode 100644 index 00000000..6366c047 --- /dev/null +++ b/pitfall/pdfkit/node_modules/JSONStream/LICENSE.APACHE2 @@ -0,0 +1,15 @@ +Apache License, Version 2.0 + +Copyright (c) 2011 Dominic Tarr + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/pitfall/pdfkit/node_modules/JSONStream/LICENSE.MIT b/pitfall/pdfkit/node_modules/JSONStream/LICENSE.MIT new file mode 100644 index 00000000..6eafbd73 --- /dev/null +++ b/pitfall/pdfkit/node_modules/JSONStream/LICENSE.MIT @@ -0,0 +1,24 @@ +The MIT License + +Copyright (c) 2011 Dominic Tarr + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/JSONStream/examples/all_docs.js b/pitfall/pdfkit/node_modules/JSONStream/examples/all_docs.js new file mode 100644 index 00000000..fa87fe52 --- /dev/null +++ b/pitfall/pdfkit/node_modules/JSONStream/examples/all_docs.js @@ -0,0 +1,13 @@ +var request = require('request') + , JSONStream = require('JSONStream') + , es = require('event-stream') + +var parser = JSONStream.parse(['rows', true]) //emit parts that match this path (any element of the rows array) + , req = request({url: 'http://isaacs.couchone.com/registry/_all_docs'}) + , logger = es.mapSync(function (data) { //create a stream that logs to stderr, + console.error(data) + return data + }) + +req.pipe(parser) +parser.pipe(logger) diff --git a/pitfall/pdfkit/node_modules/JSONStream/index.js b/pitfall/pdfkit/node_modules/JSONStream/index.js new file mode 100644 index 00000000..5932ab28 --- /dev/null +++ b/pitfall/pdfkit/node_modules/JSONStream/index.js @@ -0,0 +1,188 @@ +var Parser = require('jsonparse') + , Stream = require('stream').Stream + , through = require('through') + +/* + + the value of this.stack that creationix's jsonparse has is weird. + + it makes this code ugly, but his problem is way harder that mine, + so i'll forgive him. + +*/ + +exports.parse = function (path) { + + var parser = new Parser() + var stream = through(function (chunk) { + if('string' === typeof chunk) { + if (process.browser) { + var buf = new Array(chunk.length) + for (var i = 0; i < chunk.length; i++) buf[i] = chunk.charCodeAt(i) + chunk = new Int32Array(buf) + } else { + chunk = new Buffer(chunk) + } + } + parser.write(chunk) + }, + function (data) { + if(data) + stream.write(data) + stream.queue(null) + }) + + if('string' === typeof path) + path = path.split('.').map(function (e) { + if (e === '*') + return true + else if (e === '') // '..'.split('.') returns an empty string + return {recurse: true} + else + return e + }) + + + var count = 0, _key + if(!path || !path.length) + path = null + + parser.onValue = function () { + if (!this.root && this.stack.length == 1) + stream.root = this.value + + if(! path) return + + var i = 0 // iterates on path + var j = 0 // iterates on stack + while (i < path.length) { + var key = path[i] + var c + j++ + + if (key && !key.recurse) { + c = (j === this.stack.length) ? this : this.stack[j] + if (!c) return + if (! check(key, c.key)) return + i++ + } else { + i++ + var nextKey = path[i] + if (! nextKey) return + while (true) { + c = (j === this.stack.length) ? this : this.stack[j] + if (!c) return + if (check(nextKey, c.key)) { i++; break} + j++ + } + } + } + if (j !== this.stack.length) return + + count ++ + if(null != this.value[this.key]) + stream.queue(this.value[this.key]) + delete this.value[this.key] + } + parser._onToken = parser.onToken; + + parser.onToken = function (token, value) { + parser._onToken(token, value); + if (this.stack.length === 0) { + if (stream.root) { + if(!path) + stream.queue(stream.root) + stream.emit('root', stream.root, count) + count = 0; + stream.root = null; + } + } + } + + parser.onError = function (err) { + stream.emit('error', err) + } + + + return stream +} + +function check (x, y) { + if ('string' === typeof x) + return y == x + else if (x && 'function' === typeof x.exec) + return x.exec(y) + else if ('boolean' === typeof x) + return x + else if ('function' === typeof x) + return x(y) + return false +} + +exports.stringify = function (op, sep, cl) { + if (op === false){ + op = '' + sep = '\n' + cl = '' + } else if (op == null) { + + op = '[\n' + sep = '\n,\n' + cl = '\n]\n' + + } + + //else, what ever you like + + var stream + , first = true + , anyData = false + stream = through(function (data) { + anyData = true + var json = JSON.stringify(data) + if(first) { first = false ; stream.queue(op + json)} + else stream.queue(sep + json) + }, + function (data) { + if(!anyData) + stream.queue(op) + stream.queue(cl) + stream.queue(null) + }) + + return stream +} + +exports.stringifyObject = function (op, sep, cl) { + if (op === false){ + op = '' + sep = '\n' + cl = '' + } else if (op == null) { + + op = '{\n' + sep = '\n,\n' + cl = '\n}\n' + + } + + //else, what ever you like + + var stream = new Stream () + , first = true + , anyData = false + stream = through(function (data) { + anyData = true + var json = JSON.stringify(data[0]) + ':' + JSON.stringify(data[1]) + if(first) { first = false ; stream.queue(op + json)} + else stream.queue(sep + json) + }, + function (data) { + if(!anyData) stream.queue(op) + stream.queue(cl) + + stream.queue(null) + }) + + return stream +} diff --git a/pitfall/pdfkit/node_modules/JSONStream/package.json b/pitfall/pdfkit/node_modules/JSONStream/package.json new file mode 100644 index 00000000..b3537a48 --- /dev/null +++ b/pitfall/pdfkit/node_modules/JSONStream/package.json @@ -0,0 +1,100 @@ +{ + "_args": [ + [ + { + "raw": "JSONStream@~0.7.1", + "scope": null, + "escapedName": "JSONStream", + "name": "JSONStream", + "rawSpec": "~0.7.1", + "spec": ">=0.7.1 <0.8.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/browserify" + ] + ], + "_from": "JSONStream@>=0.7.1 <0.8.0", + "_id": "JSONStream@0.7.4", + "_inCache": true, + "_location": "/JSONStream", + "_npmUser": { + "name": "dominictarr", + "email": "dominic.tarr@gmail.com" + }, + "_npmVersion": "1.4.9", + "_phantomChildren": {}, + "_requested": { + "raw": "JSONStream@~0.7.1", + "scope": null, + "escapedName": "JSONStream", + "name": "JSONStream", + "rawSpec": "~0.7.1", + "spec": ">=0.7.1 <0.8.0", + "type": "range" + }, + "_requiredBy": [ + "/browserify", + "/insert-module-globals", + "/module-deps" + ], + "_resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-0.7.4.tgz", + "_shasum": "734290e41511eea7c2cfe151fbf9a563a97b9786", + "_shrinkwrap": null, + "_spec": "JSONStream@~0.7.1", + "_where": "/Users/MB/git/pdfkit/node_modules/browserify", + "author": { + "name": "Dominic Tarr", + "email": "dominic.tarr@gmail.com", + "url": "http://bit.ly/dominictarr" + }, + "bugs": { + "url": "https://github.com/dominictarr/JSONStream/issues" + }, + "dependencies": { + "jsonparse": "0.0.5", + "through": ">=2.2.7 <3" + }, + "description": "rawStream.pipe(JSONStream.parse()).pipe(streamOfObjects)", + "devDependencies": { + "assertions": "~2.2.2", + "event-stream": "~0.7.0", + "it-is": "~1", + "render": "~0.1.1", + "tape": "~2.12.3", + "trees": "~0.0.3" + }, + "directories": {}, + "dist": { + "shasum": "734290e41511eea7c2cfe151fbf9a563a97b9786", + "tarball": "https://registry.npmjs.org/JSONStream/-/JSONStream-0.7.4.tgz" + }, + "engines": { + "node": "*" + }, + "homepage": "http://github.com/dominictarr/JSONStream", + "keywords": [ + "json", + "stream", + "streaming", + "parser", + "async", + "parsing" + ], + "maintainers": [ + { + "name": "dominictarr", + "email": "dominic.tarr@gmail.com" + } + ], + "name": "JSONStream", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/dominictarr/JSONStream.git" + }, + "scripts": { + "test": "set -e; for t in test/*.js; do echo '***' $t '***'; node $t; done" + }, + "version": "0.7.4" +} diff --git a/pitfall/pdfkit/node_modules/JSONStream/readme.markdown b/pitfall/pdfkit/node_modules/JSONStream/readme.markdown new file mode 100644 index 00000000..cf5987cc --- /dev/null +++ b/pitfall/pdfkit/node_modules/JSONStream/readme.markdown @@ -0,0 +1,162 @@ +# JSONStream + +streaming JSON.parse and stringify + + + +## example + +``` js + +var request = require('request') + , JSONStream = require('JSONStream') + , es = require('event-stream') + +request({url: 'http://isaacs.couchone.com/registry/_all_docs'}) + .pipe(JSONStream.parse('rows.*')) + .pipe(es.mapSync(function (data) { + console.error(data) + return data + })) +``` + +## JSONStream.parse(path) + +parse stream of values that match a path + +``` js + JSONStream.parse('rows.*.doc') +``` + +The `..` operator is the recursive descent operator from [JSONPath](http://goessner.net/articles/JsonPath/), which will match a child at any depth (see examples below). + +If your keys have keys that include `.` or `*` etc, use an array instead. +`['row', true, /^doc/]`. + +If you use an array, `RegExp`s, booleans, and/or functions. The `..` operator is also available in array representation, using `{recurse: true}`. +any object that matches the path will be emitted as 'data' (and `pipe`d down stream) + +If `path` is empty or null, no 'data' events are emitted. + +### Examples + +query a couchdb view: + +``` bash +curl -sS localhost:5984/tests/_all_docs&include_docs=true +``` +you will get something like this: + +``` js +{"total_rows":129,"offset":0,"rows":[ + { "id":"change1_0.6995461115147918" + , "key":"change1_0.6995461115147918" + , "value":{"rev":"1-e240bae28c7bb3667f02760f6398d508"} + , "doc":{ + "_id": "change1_0.6995461115147918" + , "_rev": "1-e240bae28c7bb3667f02760f6398d508","hello":1} + }, + { "id":"change2_0.6995461115147918" + , "key":"change2_0.6995461115147918" + , "value":{"rev":"1-13677d36b98c0c075145bb8975105153"} + , "doc":{ + "_id":"change2_0.6995461115147918" + , "_rev":"1-13677d36b98c0c075145bb8975105153" + , "hello":2 + } + }, +]} + +``` + +we are probably most interested in the `rows.*.docs` + +create a `Stream` that parses the documents from the feed like this: + +``` js +var stream = JSONStream.parse(['rows', true, 'doc']) //rows, ANYTHING, doc + +stream.on('data', function(data) { + console.log('received:', data); +}); + +stream.on('root', function(root, count) { + if (!count) { + console.log('no matches found:', root); + } +}); +``` +awesome! + +### recursive patterns (..) + +`JSONStream.parser('docs..value')` +(or `JSONStream.parser(['docs', {recurse: true}, 'value'])` using an array) +will emit every `value` object that is a child, grand-child, etc. of the +`docs` object. In this example, it will match exactly 5 times at various depth +levels, emitting 0, 1, 2, 3 and 4 as results. + +```js +{ + "total": 5, + "docs": [ + { + "key": { + "value": 0, + "some": "property" + } + }, + {"value": 1}, + {"value": 2}, + {"blbl": [{}, {"a":0, "b":1, "value":3}, 10]}, + {"value": 4} + ] +} +``` + +## JSONStream.stringify(open, sep, close) + +Create a writable stream. + +you may pass in custom `open`, `close`, and `seperator` strings. +But, by default, `JSONStream.stringify()` will create an array, +(with default options `open='[\n', sep='\n,\n', close='\n]\n'`) + +If you call `JSONStream.stringify(false)` +the elements will only be seperated by a newline. + +If you only write one item this will be valid JSON. + +If you write many items, +you can use a `RegExp` to split it into valid chunks. + +## JSONStream.stringifyObject(open, sep, close) + +Very much like `JSONStream.stringify`, +but creates a writable stream for objects instead of arrays. + +Accordingly, `open='{\n', sep='\n,\n', close='\n}\n'`. + +When you `.write()` to the stream you must supply an array with `[ key, data ]` +as the first argument. + +## numbers + +There are occasional problems parsing and unparsing very precise numbers. + +I have opened an issue here: + +https://github.com/creationix/jsonparse/issues/2 + ++1 + +## Acknowlegements + +this module depends on https://github.com/creationix/jsonparse +by Tim Caswell +and also thanks to Florent Jaby for teaching me about parsing with: +https://github.com/Floby/node-json-streams + +## license + +MIT / APACHE2 diff --git a/pitfall/pdfkit/node_modules/JSONStream/test/bool.js b/pitfall/pdfkit/node_modules/JSONStream/test/bool.js new file mode 100644 index 00000000..6c386d60 --- /dev/null +++ b/pitfall/pdfkit/node_modules/JSONStream/test/bool.js @@ -0,0 +1,41 @@ + +var fs = require ('fs') + , join = require('path').join + , file = join(__dirname, 'fixtures','all_npm.json') + , JSONStream = require('../') + , it = require('it-is').style('colour') + + function randomObj () { + return ( + Math.random () < 0.4 + ? {hello: 'eonuhckmqjk', + whatever: 236515, + lies: true, + nothing: [null], +// stuff: [Math.random(),Math.random(),Math.random()] + } + : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]] + ) + } + +var expected = [] + , stringify = JSONStream.stringify() + , es = require('event-stream') + , stringified = '' + , called = 0 + , count = 10 + , ended = false + +while (count --) + expected.push(randomObj()) + + es.connect( + es.readArray(expected), + stringify, + JSONStream.parse([true]), + es.writeArray(function (err, lines) { + + it(lines).has(expected) + console.error('PASSED') + }) + ) diff --git a/pitfall/pdfkit/node_modules/JSONStream/test/browser.js b/pitfall/pdfkit/node_modules/JSONStream/test/browser.js new file mode 100644 index 00000000..3c28d491 --- /dev/null +++ b/pitfall/pdfkit/node_modules/JSONStream/test/browser.js @@ -0,0 +1,18 @@ +var test = require('tape') +var JSONStream = require('../') +var testData = '{"rows":[{"hello":"world"}, {"foo": "bar"}]}' + +test('basic parsing', function (t) { + t.plan(2) + var parsed = JSONStream.parse("rows.*") + var parsedKeys = {} + parsed.on('data', function(match) { + parsedKeys[Object.keys(match)[0]] = true + }) + parsed.on('end', function() { + t.equal(!!parsedKeys['hello'], true) + t.equal(!!parsedKeys['foo'], true) + }) + parsed.write(testData) + parsed.end() +}) \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/JSONStream/test/destroy_missing.js b/pitfall/pdfkit/node_modules/JSONStream/test/destroy_missing.js new file mode 100644 index 00000000..315fdc83 --- /dev/null +++ b/pitfall/pdfkit/node_modules/JSONStream/test/destroy_missing.js @@ -0,0 +1,27 @@ +var fs = require ('fs'); +var net = require('net'); +var join = require('path').join; +var file = join(__dirname, 'fixtures','all_npm.json'); +var JSONStream = require('../'); + + +var server = net.createServer(function(client) { + var parser = JSONStream.parse([]); + parser.on('end', function() { + console.log('close') + console.error('PASSED'); + server.close(); + }); + client.pipe(parser); + var n = 4 + client.on('data', function () { + if(--n) return + client.end(); + }) +}); +server.listen(9999); + + +var client = net.connect({ port : 9999 }, function() { + fs.createReadStream(file).pipe(client).on('data', console.log) //.resume(); +}); diff --git a/pitfall/pdfkit/node_modules/JSONStream/test/doubledot1.js b/pitfall/pdfkit/node_modules/JSONStream/test/doubledot1.js new file mode 100644 index 00000000..78149b93 --- /dev/null +++ b/pitfall/pdfkit/node_modules/JSONStream/test/doubledot1.js @@ -0,0 +1,29 @@ +var fs = require ('fs') + , join = require('path').join + , file = join(__dirname, 'fixtures','all_npm.json') + , JSONStream = require('../') + , it = require('it-is') + +var expected = JSON.parse(fs.readFileSync(file)) + , parser = JSONStream.parse('rows..rev') + , called = 0 + , ended = false + , parsed = [] + +fs.createReadStream(file).pipe(parser) + +parser.on('data', function (data) { + called ++ + parsed.push(data) +}) + +parser.on('end', function () { + ended = true +}) + +process.on('exit', function () { + it(called).equal(expected.rows.length) + for (var i = 0 ; i < expected.rows.length ; i++) + it(parsed[i]).deepEqual(expected.rows[i].value.rev) + console.error('PASSED') +}) diff --git a/pitfall/pdfkit/node_modules/JSONStream/test/doubledot2.js b/pitfall/pdfkit/node_modules/JSONStream/test/doubledot2.js new file mode 100644 index 00000000..f99d8819 --- /dev/null +++ b/pitfall/pdfkit/node_modules/JSONStream/test/doubledot2.js @@ -0,0 +1,29 @@ + var fs = require ('fs') + , join = require('path').join + , file = join(__dirname, 'fixtures','depth.json') + , JSONStream = require('../') + , it = require('it-is') + + var expected = JSON.parse(fs.readFileSync(file)) + , parser = JSONStream.parse(['docs', {recurse: true}, 'value']) + , called = 0 + , ended = false + , parsed = [] + + fs.createReadStream(file).pipe(parser) + + parser.on('data', function (data) { + called ++ + parsed.push(data) + }) + + parser.on('end', function () { + ended = true + }) + + process.on('exit', function () { + it(called).equal(5) + for (var i = 0 ; i < 5 ; i++) + it(parsed[i]).deepEqual(i) + console.error('PASSED') + }) diff --git a/pitfall/pdfkit/node_modules/JSONStream/test/empty.js b/pitfall/pdfkit/node_modules/JSONStream/test/empty.js new file mode 100644 index 00000000..19e888c1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/JSONStream/test/empty.js @@ -0,0 +1,44 @@ +var JSONStream = require('../') + , stream = require('stream') + , it = require('it-is') + +var output = [ [], [] ] + +var parser1 = JSONStream.parse(['docs', /./]) +parser1.on('data', function(data) { + output[0].push(data) +}) + +var parser2 = JSONStream.parse(['docs', /./]) +parser2.on('data', function(data) { + output[1].push(data) +}) + +var pending = 2 +function onend () { + if (--pending > 0) return + it(output).deepEqual([ + [], [{hello: 'world'}] + ]) + console.error('PASSED') +} +parser1.on('end', onend) +parser2.on('end', onend) + +function makeReadableStream() { + var readStream = new stream.Stream() + readStream.readable = true + readStream.write = function (data) { this.emit('data', data) } + readStream.end = function (data) { this.emit('end') } + return readStream +} + +var emptyArray = makeReadableStream() +emptyArray.pipe(parser1) +emptyArray.write('{"docs":[]}') +emptyArray.end() + +var objectArray = makeReadableStream() +objectArray.pipe(parser2) +objectArray.write('{"docs":[{"hello":"world"}]}') +objectArray.end() diff --git a/pitfall/pdfkit/node_modules/JSONStream/test/fixtures/all_npm.json b/pitfall/pdfkit/node_modules/JSONStream/test/fixtures/all_npm.json new file mode 100644 index 00000000..6303ea2f --- /dev/null +++ b/pitfall/pdfkit/node_modules/JSONStream/test/fixtures/all_npm.json @@ -0,0 +1,4030 @@ +{"total_rows":4028,"offset":0,"rows":[ +{"id":"","key":"","value":{"rev":"1-2f11e026763c10730d8b19ba5dce7565"}}, +{"id":"3scale","key":"3scale","value":{"rev":"3-db3d574bf0ecdfdf627afeaa21b4bdaa"}}, +{"id":"7digital-api","key":"7digital-api","value":{"rev":"20-21d11832780e2368aabc946598a41dd5"}}, +{"id":"AMD","key":"AMD","value":{"rev":"7-3b4305a9c786ab4c5ce611e7f0de0aca"}}, +{"id":"AriesNode","key":"AriesNode","value":{"rev":"3-9d88392bca6582c5c54784927dbfdee6"}}, +{"id":"Array.prototype.forEachAsync","key":"Array.prototype.forEachAsync","value":{"rev":"3-85696441ba6bef77cc1e7de7b073110e"}}, +{"id":"Babel","key":"Babel","value":{"rev":"5-9d8370c6ac6fd9cd3d530f26a9379814"}}, +{"id":"Blaggie-System","key":"Blaggie-System","value":{"rev":"3-47782b1e5cbfa425170192799510e148"}}, +{"id":"Blob","key":"Blob","value":{"rev":"3-cf5fb5d69da4dd00bc4f2be8870ca698"}}, +{"id":"BlobBuilder","key":"BlobBuilder","value":{"rev":"3-eb977ff1713a915384fac994f9d8fa7c"}}, +{"id":"Buffer","key":"Buffer","value":{"rev":"3-549594b58e83d6d07bb219e73de558e5"}}, +{"id":"CLI-UI","key":"CLI-UI","value":{"rev":"5-5912625f27b4bdfb4d3eed16726c48a8"}}, +{"id":"CLoader","key":"CLoader","value":{"rev":"1-ad3c317ddf3497e73ab41cb1ddbc6ba8"}}, +{"id":"CM1","key":"CM1","value":{"rev":"15-a325a2dc28bc6967a1a14beed86f3b80"}}, +{"id":"CONFIGURATOR","key":"CONFIGURATOR","value":{"rev":"3-c76bf9282a75cc4d3fb349e831ccb8a5"}}, +{"id":"Cashew","key":"Cashew","value":{"rev":"7-6a74dc51dbecc47d2c15bfb7d056a20f"}}, +{"id":"Class","key":"Class","value":{"rev":"5-958c6365f76a60a8b3dafbbd9730ac7e"}}, +{"id":"ClassLoader","key":"ClassLoader","value":{"rev":"3-27fe8faa8a1d60d639f87af52826ed47"}}, +{"id":"ClearSilver","key":"ClearSilver","value":{"rev":"3-f3e54eb9ce64fc6a090186e61f15ed0b"}}, +{"id":"Couch-cleaner","key":"Couch-cleaner","value":{"rev":"3-fc77270917d967a4e2e8637cfa9f0fe0"}}, +{"id":"CouchCover","key":"CouchCover","value":{"rev":"15-3b2d87d314f57272a5c27c42bbb3eaf9"}}, +{"id":"DOM-js","key":"DOM-js","value":{"rev":"8-748cdc96566a7b65bbd0b12be2eeb386"}}, +{"id":"DOMBuilder","key":"DOMBuilder","value":{"rev":"19-41a518f2ce16fabc0241535ccd967300"}}, +{"id":"DateZ","key":"DateZ","value":{"rev":"15-69d8115a9bd521e614eaad3cf2611264"}}, +{"id":"Dateselect","key":"Dateselect","value":{"rev":"3-6511567a876d8fe15724bbc7f247214c"}}, +{"id":"Deferred","key":"Deferred","value":{"rev":"3-c61dfc4a0d1bd3e9f35c7182f161f1f2"}}, +{"id":"DeskSet","key":"DeskSet","value":{"rev":"5-359bf760718898ff3591eb366e336cf9"}}, +{"id":"Estro","key":"Estro","value":{"rev":"11-97192e2d0327469bb30f814963db6dff"}}, +{"id":"EventProxy.js","key":"EventProxy.js","value":{"rev":"5-106696b56c6959cec4bfd37f406ee60a"}}, +{"id":"EventServer","key":"EventServer","value":{"rev":"3-59d174119435e99e2affe0c4ba7caae0"}}, +{"id":"Expressive","key":"Expressive","value":{"rev":"3-7eae0ea010eb9014b28108e814918eac"}}, +{"id":"F","key":"F","value":{"rev":"12-91a3db69527b46cf43e36b7ec64a4336"}}, +{"id":"Faker","key":"Faker","value":{"rev":"9-77951c352cb6f9a0b824be620a8fa40d"}}, +{"id":"FastLegS","key":"FastLegS","value":{"rev":"27-4399791981235021a36c94bb9e9b52b5"}}, +{"id":"Fayer","key":"Fayer","value":{"rev":"7-7e4974ff2716329375f9711bcabef701"}}, +{"id":"File","key":"File","value":{"rev":"3-45e353a984038bc48248dfc32b18f9a8"}}, +{"id":"FileError","key":"FileError","value":{"rev":"3-bb4b03a2548e3c229e2c7e92242946c3"}}, +{"id":"FileList","key":"FileList","value":{"rev":"3-ec4a3fc91794ef7fdd3fe88b19cec7b0"}}, +{"id":"FileReader","key":"FileReader","value":{"rev":"7-e81b58a2d8a765ae4781b41bbfadb4cb"}}, +{"id":"FileSaver","key":"FileSaver","value":{"rev":"3-476dcb3f63f4d10feee08d41a8128cb8"}}, +{"id":"FileWriter","key":"FileWriter","value":{"rev":"3-f2fcdbc4938de480cce2e8e8416a93dd"}}, +{"id":"FileWriterSync","key":"FileWriterSync","value":{"rev":"3-9494c3fe7a1230238f37a724ec10895b"}}, +{"id":"FormData","key":"FormData","value":{"rev":"3-8872d717575f7090107a96d81583f6fe"}}, +{"id":"Frenchpress","key":"Frenchpress","value":{"rev":"3-6d916fc15b9e77535771578f96c47c52"}}, +{"id":"FreshDocs","key":"FreshDocs","value":{"rev":"5-f1f3e76c85267faf21d06d911cc6c203"}}, +{"id":"Google_Plus_API","key":"Google_Plus_API","value":{"rev":"3-3302bc9846726d996a45daee3dc5922c"}}, +{"id":"Gord","key":"Gord","value":{"rev":"11-32fddef1453773ac7270ba0e7c83f727"}}, +{"id":"Graph","key":"Graph","value":{"rev":"7-c346edea4f90e3e18d50a62473868cf4"}}, +{"id":"GridFS","key":"GridFS","value":{"rev":"27-4fc649aaa007fddec4947bdb7111560f"}}, +{"id":"Haraka","key":"Haraka","value":{"rev":"39-ee8f890521c1579b3cc779c8ebe03480"}}, +{"id":"Index","key":"Index","value":{"rev":"29-d8f4881c1544bf51dea1927e87ebb3f3"}}, +{"id":"JS-Entities","key":"JS-Entities","value":{"rev":"7-905636d8b46f273210233b60063d079b"}}, +{"id":"JSLint-commonJS","key":"JSLint-commonJS","value":{"rev":"3-759a81f82af7055e85ee89c9707c9609"}}, +{"id":"JSON","key":"JSON","value":{"rev":"3-7966a79067c34fb5de2e62c796f67341"}}, +{"id":"JSONPath","key":"JSONPath","value":{"rev":"7-58789d57ae366a5b0ae4b36837f15d59"}}, +{"id":"JSONSelect","key":"JSONSelect","value":{"rev":"9-5b0730da91eeb52e8f54da516367dc0f"}}, +{"id":"JSONloops","key":"JSONloops","value":{"rev":"3-3d4a1f8bfcfd778ab7def54155324331"}}, +{"id":"JSPP","key":"JSPP","value":{"rev":"7-af09a2bb193b3ff44775e8fbb7d4f522"}}, +{"id":"JSV","key":"JSV","value":{"rev":"3-41a7af86909046111be8ee9b56b077c8"}}, +{"id":"Jody","key":"Jody","value":{"rev":"43-70c1cf40e93cd8ce53249e5295d6b159"}}, +{"id":"Journaling-Hash","key":"Journaling-Hash","value":{"rev":"3-ac676eecb40a4dff301c671fa4bb6be9"}}, +{"id":"Kahana","key":"Kahana","value":{"rev":"33-1cb7e291ae02cee4e8105509571223f5"}}, +{"id":"LazyBoy","key":"LazyBoy","value":{"rev":"13-20a8894e3a957f184f5ae2a3e709551c"}}, +{"id":"Lingo","key":"Lingo","value":{"rev":"9-1af9a6df616e601f09c8cec07ccad1ae"}}, +{"id":"Loggy","key":"Loggy","value":{"rev":"33-e115c25163ab468314eedbe497d1c51e"}}, +{"id":"MeCab","key":"MeCab","value":{"rev":"4-2687176c7b878930e812a534976a6988"}}, +{"id":"Mercury","key":"Mercury","value":{"rev":"3-09a6bff1332ed829bd2c37bfec244a41"}}, +{"id":"Mu","key":"Mu","value":{"rev":"7-28e6ab82c402c3a75fe0f79dea846b97"}}, +{"id":"N","key":"N","value":{"rev":"7-e265046b5bdd299b2cad1584083ce2d5"}}, +{"id":"NORRIS","key":"NORRIS","value":{"rev":"3-4b5b23b09118582c44414f8d480619e6"}}, +{"id":"NetOS","key":"NetOS","value":{"rev":"3-3f943f87a24c11e6dd8c265469914e80"}}, +{"id":"NewBase60","key":"NewBase60","value":{"rev":"3-fd84758db79870e82917d358c6673f32"}}, +{"id":"NoCR","key":"NoCR","value":{"rev":"3-8f6cddd528f2d6045e3dda6006fb6948"}}, +{"id":"NodObjC","key":"NodObjC","value":{"rev":"15-ea6ab2df532c90fcefe5a428950bfdbb"}}, +{"id":"Node-JavaScript-Preprocessor","key":"Node-JavaScript-Preprocessor","value":{"rev":"13-4662b5ad742caaa467ec5d6c8e77b1e5"}}, +{"id":"NodeInterval","key":"NodeInterval","value":{"rev":"3-dc3446db2e0cd5be29a3c07942dba66d"}}, +{"id":"NodeSSH","key":"NodeSSH","value":{"rev":"3-45530fae5a69c44a6dd92357910f4212"}}, +{"id":"Nonsense","key":"Nonsense","value":{"rev":"3-9d86191475bc76dc3dd496d4dfe5d94e"}}, +{"id":"NormAndVal","key":"NormAndVal","value":{"rev":"9-d3b3d6ffd046292f4733aa5f3eb7be61"}}, +{"id":"Olive","key":"Olive","value":{"rev":"5-67f3057f09cae5104f09472db1d215aa"}}, +{"id":"OnCollect","key":"OnCollect","value":{"rev":"16-6dbe3afd04f123dda87bb1e21cdfd776"}}, +{"id":"PJsonCouch","key":"PJsonCouch","value":{"rev":"3-be9588f49d85094c36288eb63f8236b3"}}, +{"id":"PMInject","key":"PMInject","value":{"rev":"5-da518047d8273dbf3b3c05ea25e77836"}}, +{"id":"PanPG","key":"PanPG","value":{"rev":"13-beb54225a6b1be4c157434c28adca016"}}, +{"id":"PerfDriver","key":"PerfDriver","value":{"rev":"2-b448fb2f407f341b8df7032f29e4920f"}}, +{"id":"PostgresClient","key":"PostgresClient","value":{"rev":"8-2baec6847f8ad7dcf24b7d61a4034163"}}, +{"id":"QuickWeb","key":"QuickWeb","value":{"rev":"13-d388df9c484021ecd75bc9650d659a67"}}, +{"id":"R.js","key":"R.js","value":{"rev":"3-3f154b95ec6fc744f95a29750f16667e"}}, +{"id":"R2","key":"R2","value":{"rev":"11-f5ccff6f108f6b928caafb62b80d1056"}}, +{"id":"Reston","key":"Reston","value":{"rev":"5-9d234010f32f593edafc04620f3cf2bd"}}, +{"id":"Sardines","key":"Sardines","value":{"rev":"5-d7d3d2269420e21c2c62b86ff5a0021e"}}, +{"id":"SessionWebSocket","key":"SessionWebSocket","value":{"rev":"8-d9fc9beaf90057aefeb701addd7fc845"}}, +{"id":"Sheet","key":"Sheet","value":{"rev":"8-c827c713564e4ae5a17988ffea520d0d"}}, +{"id":"Spec_My_Node","key":"Spec_My_Node","value":{"rev":"8-fa58408e9d9736d9c6fa8daf5d632106"}}, +{"id":"Spot","key":"Spot","value":{"rev":"3-6b6c2131451fed28fb57c924c4fa44cc"}}, +{"id":"Sslac","key":"Sslac","value":{"rev":"3-70a2215cc7505729254aa6fa1d9a25d9"}}, +{"id":"StaticServer","key":"StaticServer","value":{"rev":"3-6f5433177ef4d76a52f01c093117a532"}}, +{"id":"StringScanner","key":"StringScanner","value":{"rev":"3-e85d0646c25ec477c1c45538712d3a38"}}, +{"id":"Structr","key":"Structr","value":{"rev":"3-449720001801cff5831c2cc0e0f1fcf8"}}, +{"id":"Templ8","key":"Templ8","value":{"rev":"11-4e6edb250bc250df20b2d557ca7f6589"}}, +{"id":"Template","key":"Template","value":{"rev":"6-1f055c73524d2b7e82eb6c225bd4b8e0"}}, +{"id":"Thimble","key":"Thimble","value":{"rev":"3-8499b261206f2f2e9acf92d8a4e54afb"}}, +{"id":"Toji","key":"Toji","value":{"rev":"96-511e171ad9f32a9264c2cdf01accacfb"}}, +{"id":"TwigJS","key":"TwigJS","value":{"rev":"3-1aaefc6d6895d7d4824174d410a747b9"}}, +{"id":"UkGeoTool","key":"UkGeoTool","value":{"rev":"5-e84291128e12f66cebb972a60c1d710f"}}, +{"id":"Vector","key":"Vector","value":{"rev":"3-bf5dc97abe7cf1057260b70638175a96"}}, +{"id":"_design/app","key":"_design/app","value":{"rev":"421-b1661d854599a58d0904d68aa44d8b63"}}, +{"id":"_design/ui","key":"_design/ui","value":{"rev":"78-db00aeb91a59a326e38e2bef7f1126cf"}}, +{"id":"aaronblohowiak-plugify-js","key":"aaronblohowiak-plugify-js","value":{"rev":"3-0272c269eacd0c86bfc1711566922577"}}, +{"id":"aaronblohowiak-uglify-js","key":"aaronblohowiak-uglify-js","value":{"rev":"3-77844a6def6ec428d75caa0846c95502"}}, +{"id":"aasm-js","key":"aasm-js","value":{"rev":"3-01a48108d55909575440d9e0ef114f37"}}, +{"id":"abbrev","key":"abbrev","value":{"rev":"16-e17a2b6c7360955b950edf2cb2ef1602"}}, +{"id":"abhispeak","key":"abhispeak","value":{"rev":"5-9889431f68ec10212db3be91796608e2"}}, +{"id":"ace","key":"ace","value":{"rev":"3-e8d267de6c17ebaa82c2869aff983c74"}}, +{"id":"acl","key":"acl","value":{"rev":"13-87c131a1801dc50840a177be73ce1c37"}}, +{"id":"active-client","key":"active-client","value":{"rev":"5-0ca16ae2e48a3ba9de2f6830a8c2d3a0"}}, +{"id":"activenode-monitor","key":"activenode-monitor","value":{"rev":"9-2634fa446379c39475d0ce4183fb92f2"}}, +{"id":"activeobject","key":"activeobject","value":{"rev":"43-6d73e28412612aaee37771e3ab292c3d"}}, +{"id":"actor","key":"actor","value":{"rev":"3-f6b84acd7d2e689b860e3142a18cd460"}}, +{"id":"actors","key":"actors","value":{"rev":"3-6df913bbe5b99968a2e71ae4ef07b2d2"}}, +{"id":"addTimeout","key":"addTimeout","value":{"rev":"15-e5170f0597fe8cf5ed0b54b7e6f2cde1"}}, +{"id":"addressable","key":"addressable","value":{"rev":"27-0c74fde458d92e4b93a29317da15bb3c"}}, +{"id":"aejs","key":"aejs","value":{"rev":"7-4928e2ce6151067cd6c585c0ba3e0bc3"}}, +{"id":"aenoa-supervisor","key":"aenoa-supervisor","value":{"rev":"7-6d399675981e76cfdfb9144bc2f7fb6d"}}, +{"id":"after","key":"after","value":{"rev":"9-baee7683ff54182cf7544cc05b0a4ad7"}}, +{"id":"ahr","key":"ahr","value":{"rev":"27-4ed272c516f3f2f9310e4f0ef28254e9"}}, +{"id":"ahr.browser","key":"ahr.browser","value":{"rev":"3-f7226aab4a1a3ab5f77379f92aae87f9"}}, +{"id":"ahr.browser.jsonp","key":"ahr.browser.jsonp","value":{"rev":"3-abed17143cf5e3c451c3d7da457e6f5b"}}, +{"id":"ahr.browser.request","key":"ahr.browser.request","value":{"rev":"7-fafd7b079d0415f388b64a20509a270b"}}, +{"id":"ahr.node","key":"ahr.node","value":{"rev":"17-f487a4a9896bd3876a11f9dfa1c639a7"}}, +{"id":"ahr.options","key":"ahr.options","value":{"rev":"13-904a4cea763a4455f7b2ae0abba18b8d"}}, +{"id":"ahr.utils","key":"ahr.utils","value":{"rev":"3-5f7b4104ea280d1fd36370c8f3356ead"}}, +{"id":"ahr2","key":"ahr2","value":{"rev":"87-ddf57f3ee158dcd23b2df330e2883a1d"}}, +{"id":"ain","key":"ain","value":{"rev":"7-d840736668fb36e9be3c26a68c5cd411"}}, +{"id":"ain-tcp","key":"ain-tcp","value":{"rev":"11-d18a1780bced8981d1d9dbd262ac4045"}}, +{"id":"ain2","key":"ain2","value":{"rev":"5-0b67879174f5f0a06448c7c737d98b5e"}}, +{"id":"airbrake","key":"airbrake","value":{"rev":"33-4bb9f822162e0c930c31b7f961938dc9"}}, +{"id":"ajaxrunner","key":"ajaxrunner","value":{"rev":"2-17e6a5de4f0339f4e6ce0b7681d0ba0c"}}, +{"id":"ajs","key":"ajs","value":{"rev":"13-063a29dec829fdaf4ca63d622137d1c6"}}, +{"id":"ajs-xgettext","key":"ajs-xgettext","value":{"rev":"3-cd4bbcc1c9d87fa7119d3bbbca99b793"}}, +{"id":"akismet","key":"akismet","value":{"rev":"13-a144e15dd6c2b13177572e80a526edd1"}}, +{"id":"alfred","key":"alfred","value":{"rev":"45-9a69041b18d2587c016b1b1deccdb2ce"}}, +{"id":"alfred-bcrypt","key":"alfred-bcrypt","value":{"rev":"11-7ed10ef318e5515d1ef7c040818ddb22"}}, +{"id":"algorithm","key":"algorithm","value":{"rev":"3-9ec0b38298cc15b0f295152de8763358"}}, +{"id":"algorithm-js","key":"algorithm-js","value":{"rev":"9-dd7496b7ec2e3b23cc7bb182ae3aac6d"}}, +{"id":"alists","key":"alists","value":{"rev":"5-22cc13c86d84081a826ac79a0ae5cda3"}}, +{"id":"altshift","key":"altshift","value":{"rev":"53-1c51d8657f271f390503a6fe988d09db"}}, +{"id":"amazon-ses","key":"amazon-ses","value":{"rev":"5-c175d60de2232a5664666a80832269e5"}}, +{"id":"ambrosia","key":"ambrosia","value":{"rev":"3-8c648ec7393cf842838c20e2c5d9bce4"}}, +{"id":"amd","key":"amd","value":{"rev":"3-d78c4df97a577af598a7def2a38379fa"}}, +{"id":"amionline","key":"amionline","value":{"rev":"3-a62887a632523700402b0f4ebb896812"}}, +{"id":"amo-version-reduce","key":"amo-version-reduce","value":{"rev":"3-05f6956269e5e921ca3486d3d6ea74b0"}}, +{"id":"amqp","key":"amqp","value":{"rev":"17-ee62d2b8248f8eb13f3369422d66df26"}}, +{"id":"amqpsnoop","key":"amqpsnoop","value":{"rev":"3-36a1c45647bcfb2f56cf68dbc24b0426"}}, +{"id":"ams","key":"ams","value":{"rev":"40-1c0cc53ad942d2fd23c89618263befc8"}}, +{"id":"amulet","key":"amulet","value":{"rev":"7-d1ed71811e45652799982e4f2e9ffb36"}}, +{"id":"anachronism","key":"anachronism","value":{"rev":"11-468bdb40f9a5aa146bae3c1c6253d0e1"}}, +{"id":"analytics","key":"analytics","value":{"rev":"3-a143ccdd863b5f7dbee4d2f7732390b3"}}, +{"id":"ann","key":"ann","value":{"rev":"9-41f00594d6216c439f05f7116a697cac"}}, +{"id":"ansi-color","key":"ansi-color","value":{"rev":"6-d6f02b32525c1909d5134afa20f470de"}}, +{"id":"ansi-font","key":"ansi-font","value":{"rev":"3-b039661ad9b6aa7baf34741b449c4420"}}, +{"id":"ant","key":"ant","value":{"rev":"3-35a64e0b7f6eb63a90c32971694b0d93"}}, +{"id":"anvil.js","key":"anvil.js","value":{"rev":"19-290c82075f0a9ad764cdf6dc5c558e0f"}}, +{"id":"aop","key":"aop","value":{"rev":"7-5963506c9e7912aa56fda065c56fd472"}}, +{"id":"ap","key":"ap","value":{"rev":"3-f525b5b490a1ada4452f46307bf92d08"}}, +{"id":"apac","key":"apac","value":{"rev":"12-945d0313a84797b4c3df19da4bec14d4"}}, +{"id":"aparser","key":"aparser","value":{"rev":"5-cb35cfc9184ace6642413dad97e49dca"}}, +{"id":"api-easy","key":"api-easy","value":{"rev":"15-2ab5eefef1377ff217cb020e80343d65"}}, +{"id":"api.js","key":"api.js","value":{"rev":"5-a14b8112fbda17022c80356a010de59a"}}, +{"id":"api_request","key":"api_request","value":{"rev":"3-8531e71f5cf2f3f811684269132d72d4"}}, +{"id":"apimaker","key":"apimaker","value":{"rev":"3-bdbd4a2ebf5b67276d89ea73eaa20025"}}, +{"id":"apn","key":"apn","value":{"rev":"30-0513d27341f587b39db54300c380921f"}}, +{"id":"app","key":"app","value":{"rev":"3-d349ddb47167f60c03d259649569e002"}}, +{"id":"app.js","key":"app.js","value":{"rev":"3-bff3646634daccfd964b4bbe510acb25"}}, +{"id":"append","key":"append","value":{"rev":"7-53e2f4ab2a69dc0c5e92f10a154998b6"}}, +{"id":"applescript","key":"applescript","value":{"rev":"10-ef5ab30ccd660dc71fb89e173f30994a"}}, +{"id":"appzone","key":"appzone","value":{"rev":"21-fb27e24d460677fe9c7eda0d9fb1fead"}}, +{"id":"apricot","key":"apricot","value":{"rev":"14-b55361574a0715f78afc76ddf6125845"}}, +{"id":"arcane","key":"arcane","value":{"rev":"3-f846c96e890ed6150d4271c93cc05a24"}}, +{"id":"archetype","key":"archetype","value":{"rev":"3-441336def3b7aade89c8c1c19a84f56d"}}, +{"id":"ardrone","key":"ardrone","value":{"rev":"8-540e95b796da734366a89bb06dc430c5"}}, +{"id":"ardrone-web","key":"ardrone-web","value":{"rev":"3-8a53cc85a95be20cd44921347e82bbe4"}}, +{"id":"arduino","key":"arduino","value":{"rev":"3-22f6359c47412d086d50dc7f1a994139"}}, +{"id":"argon","key":"argon","value":{"rev":"3-ba12426ce67fac01273310cb3909b855"}}, +{"id":"argparse","key":"argparse","value":{"rev":"8-5e841e38cca6cfc3fe1d1f507a7f47ee"}}, +{"id":"argparser","key":"argparser","value":{"rev":"19-b8793bfc005dd84e1213ee53ae56206d"}}, +{"id":"argsparser","key":"argsparser","value":{"rev":"26-d31eca2f41546172763af629fc50631f"}}, +{"id":"argtype","key":"argtype","value":{"rev":"10-96a7d23e571d56cf598472115bcac571"}}, +{"id":"arguments","key":"arguments","value":{"rev":"7-767de2797f41702690bef5928ec7c6e9"}}, +{"id":"armory","key":"armory","value":{"rev":"41-ea0f7bd0868c11fc9986fa708e11e071"}}, +{"id":"armrest","key":"armrest","value":{"rev":"3-bbe40b6320b6328211be33425bed20c8"}}, +{"id":"arnold","key":"arnold","value":{"rev":"3-4896fc8d02b8623f47a024f0dbfa44bf"}}, +{"id":"arouter","key":"arouter","value":{"rev":"7-55cab1f7128df54f27be94039a8d8dc5"}}, +{"id":"array-promise","key":"array-promise","value":{"rev":"3-e2184561ee65de64c2dfeb57955c758f"}}, +{"id":"arrayemitter","key":"arrayemitter","value":{"rev":"3-d64c917ac1095bfcbf173dac88d3d148"}}, +{"id":"asEvented","key":"asEvented","value":{"rev":"3-2ad3693b49d4d9dc9a11c669033a356e"}}, +{"id":"asciimo","key":"asciimo","value":{"rev":"12-50130f5ac2ef4d95df190be2c8ede893"}}, +{"id":"asereje","key":"asereje","value":{"rev":"15-84853499f89a87109ddf47ba692323ba"}}, +{"id":"ash","key":"ash","value":{"rev":"6-3697a3aee708bece8a08c7e0d1010476"}}, +{"id":"ask","key":"ask","value":{"rev":"3-321bbc3837d749b5d97bff251693a825"}}, +{"id":"asn1","key":"asn1","value":{"rev":"13-e681a814a4a1439a22b19e141b45006f"}}, +{"id":"aspsms","key":"aspsms","value":{"rev":"9-7b82d722bdac29a4da8c88b642ad64f2"}}, +{"id":"assert","key":"assert","value":{"rev":"3-85480762f5cb0be2cb85f80918257189"}}, +{"id":"assertions","key":"assertions","value":{"rev":"9-d797d4c09aa994556c7d5fdb4e86fe1b"}}, +{"id":"assertn","key":"assertn","value":{"rev":"6-080a4fb5d2700a6850d56b58c6f6ee9e"}}, +{"id":"assertvanish","key":"assertvanish","value":{"rev":"13-3b0b555ff77c1bfc2fe2642d50879648"}}, +{"id":"asset","key":"asset","value":{"rev":"33-cb70b68e0e05e9c9a18b3d89f1bb43fc"}}, +{"id":"assetgraph","key":"assetgraph","value":{"rev":"82-7853d644e64741b46fdd29a997ec4852"}}, +{"id":"assetgraph-builder","key":"assetgraph-builder","value":{"rev":"61-1ed98d95f3589050037851edde760a01"}}, +{"id":"assetgraph-sprite","key":"assetgraph-sprite","value":{"rev":"15-351b5fd9e50a3dda8580d014383423e0"}}, +{"id":"assets-expander","key":"assets-expander","value":{"rev":"11-f9e1197b773d0031dd015f1d871b87c6"}}, +{"id":"assets-packager","key":"assets-packager","value":{"rev":"13-51f7d2d57ed35be6aff2cc2aa2fa74db"}}, +{"id":"assoc","key":"assoc","value":{"rev":"9-07098388f501da16bf6afe6c9babefd5"}}, +{"id":"ast-inlining","key":"ast-inlining","value":{"rev":"5-02e7e2c3a06ed81ddc61980f778ac413"}}, +{"id":"ast-transformer","key":"ast-transformer","value":{"rev":"5-b4020bb763b8839afa8d3ac0d54a6f26"}}, +{"id":"astar","key":"astar","value":{"rev":"3-3df8c56c64c3863ef0650c0c74e2801b"}}, +{"id":"aster","key":"aster","value":{"rev":"7-b187c1270d3924f5ee04044e579d2df9"}}, +{"id":"asterisk-manager","key":"asterisk-manager","value":{"rev":"3-7fbf4294dafee04cc17cca4692c09c33"}}, +{"id":"astrolin","key":"astrolin","value":{"rev":"3-30ac515a2388e7dc22b25c15346f6d7e"}}, +{"id":"asyn","key":"asyn","value":{"rev":"3-51996b0197c21e85858559045c1481b7"}}, +{"id":"async","key":"async","value":{"rev":"26-73aea795f46345a7e65d89ec75dff2f1"}}, +{"id":"async-array","key":"async-array","value":{"rev":"17-3ef5faff03333aa5b2a733ef36118066"}}, +{"id":"async-chain","key":"async-chain","value":{"rev":"9-10ec3e50b01567390d55973494e36d43"}}, +{"id":"async-ejs","key":"async-ejs","value":{"rev":"19-6f0e6e0eeb3cdb4c816ea427d8288d7d"}}, +{"id":"async-fs","key":"async-fs","value":{"rev":"3-b96906283d345604f784dfcdbeb21a63"}}, +{"id":"async-it","key":"async-it","value":{"rev":"7-6aed4439df25989cfa040fa4b5dd4ff2"}}, +{"id":"async-json","key":"async-json","value":{"rev":"5-589d5b6665d00c5bffb99bb142cac5d0"}}, +{"id":"async-memoizer","key":"async-memoizer","value":{"rev":"9-01d56f4dff95e61a39dab5ebee49d5dc"}}, +{"id":"async-object","key":"async-object","value":{"rev":"21-1bf28b0f8a7d875b54126437f3539f9b"}}, +{"id":"asyncEJS","key":"asyncEJS","value":{"rev":"3-28b1c94255381f23a4d4f52366255937"}}, +{"id":"async_testing","key":"async_testing","value":{"rev":"14-0275d8b608d8644dfe8d68a81fa07e98"}}, +{"id":"asyncevents","key":"asyncevents","value":{"rev":"3-de104847994365dcab5042db2b46fb84"}}, +{"id":"asyncify","key":"asyncify","value":{"rev":"3-3f6deb82ee1c6cb25e83a48fe6379b75"}}, +{"id":"asyncjs","key":"asyncjs","value":{"rev":"27-15903d7351f80ed37cb069aedbfc26cc"}}, +{"id":"asynct","key":"asynct","value":{"rev":"5-6be002b3e005d2d53b80fff32ccbd2ac"}}, +{"id":"at_scheduler","key":"at_scheduler","value":{"rev":"3-5587061c90218d2e99b6e22d5b488b0b"}}, +{"id":"atbar","key":"atbar","value":{"rev":"19-e9e906d4874afd4d8bf2d8349ed46dff"}}, +{"id":"atob","key":"atob","value":{"rev":"3-bc907d10dd2cfc940de586dc090451da"}}, +{"id":"audiolib","key":"audiolib","value":{"rev":"17-cb2f55ff50061081b440f0605cf0450c"}}, +{"id":"audit_couchdb","key":"audit_couchdb","value":{"rev":"24-6e620895b454b345b2aed13db847c237"}}, +{"id":"auditor","key":"auditor","value":{"rev":"11-c4df509d40650c015943dd90315a12c0"}}, +{"id":"authnet_cim","key":"authnet_cim","value":{"rev":"7-f02bbd206ac2b8c05255bcd8171ac1eb"}}, +{"id":"autocomplete","key":"autocomplete","value":{"rev":"3-f2773bca040d5abcd0536dbebe5847bf"}}, +{"id":"autodafe","key":"autodafe","value":{"rev":"7-a75262b53a9dd1a25693adecde7206d7"}}, +{"id":"autolint","key":"autolint","value":{"rev":"7-07f885902d72b52678fcc57aa4b9c592"}}, +{"id":"autoload","key":"autoload","value":{"rev":"5-9247704d9a992a175e3ae49f4af757d0"}}, +{"id":"autoloader","key":"autoloader","value":{"rev":"11-293c20c34d0c81fac5c06b699576b1fe"}}, +{"id":"auton","key":"auton","value":{"rev":"25-4fcb7a62b607b7929b62a9b792afef55"}}, +{"id":"autoreleasepool","key":"autoreleasepool","value":{"rev":"5-5d2798bf74bbec583cc6f19127e3c89e"}}, +{"id":"autorequire","key":"autorequire","value":{"rev":"9-564a46b355532fcec24db0afc99daed5"}}, +{"id":"autotest","key":"autotest","value":{"rev":"7-e319995dd0e1fbd935c14c46b1234f77"}}, +{"id":"awesome","key":"awesome","value":{"rev":"15-4458b746e4722214bd26ea15e453288e"}}, +{"id":"aws","key":"aws","value":{"rev":"14-9a8f0989be29034d3fa5c66c594b649b"}}, +{"id":"aws-js","key":"aws-js","value":{"rev":"6-c61d87b8ad948cd065d2ca222808c209"}}, +{"id":"aws-lib","key":"aws-lib","value":{"rev":"36-9733e215c03d185a860574600a8feb14"}}, +{"id":"aws2js","key":"aws2js","value":{"rev":"35-42498f44a5ae7d4f3c84096b435d0e0b"}}, +{"id":"azure","key":"azure","value":{"rev":"5-2c4e05bd842d3dcfa419f4d2b67121e2"}}, +{"id":"b64","key":"b64","value":{"rev":"3-e5e727a46df4c8aad38acd117d717140"}}, +{"id":"b64url","key":"b64url","value":{"rev":"9-ab3b017f00a53b0078261254704c30ba"}}, +{"id":"ba","key":"ba","value":{"rev":"11-3cec7ec9a566fe95fbeb34271538d60a"}}, +{"id":"babelweb","key":"babelweb","value":{"rev":"11-8e6a2fe00822cec15573cdda48b6d0a0"}}, +{"id":"backbone","key":"backbone","value":{"rev":"37-79b95355f8af59bf9131e14d52b68edc"}}, +{"id":"backbone-browserify","key":"backbone-browserify","value":{"rev":"3-f25dac0b05a7f7aa5dbc0f4a1ad97969"}}, +{"id":"backbone-celtra","key":"backbone-celtra","value":{"rev":"3-775a5ebb25c1cd84723add52774ece84"}}, +{"id":"backbone-couch","key":"backbone-couch","value":{"rev":"8-548327b3cd7ee7a4144c9070377be5f6"}}, +{"id":"backbone-cradle","key":"backbone-cradle","value":{"rev":"3-b9bc220ec48b05eed1d4d77a746b10db"}}, +{"id":"backbone-dirty","key":"backbone-dirty","value":{"rev":"21-fa0f688cc95a85c0fc440733f09243b5"}}, +{"id":"backbone-dnode","key":"backbone-dnode","value":{"rev":"65-3212d3aa3284efb3bc0732bac71b5a2e"}}, +{"id":"backbone-proxy","key":"backbone-proxy","value":{"rev":"3-3602cb984bdd266516a3145663f9a5c6"}}, +{"id":"backbone-redis","key":"backbone-redis","value":{"rev":"9-2e3f6a9e095b00ccec9aa19b3fbc65eb"}}, +{"id":"backbone-rel","key":"backbone-rel","value":{"rev":"5-f9773dc85f1c502e61c163a22d2f74aa"}}, +{"id":"backbone-simpledb","key":"backbone-simpledb","value":{"rev":"5-a815128e1e3593696f666f8b3da36d78"}}, +{"id":"backbone-stash","key":"backbone-stash","value":{"rev":"19-8d3cc5f9ed28f9a56856154e2b4e7f78"}}, +{"id":"backplane","key":"backplane","value":{"rev":"7-f69188dac21e007b09efe1b5b3575087"}}, +{"id":"backport-0.4","key":"backport-0.4","value":{"rev":"11-25e15f01f1ef9e626433a82284bc00d6"}}, +{"id":"backuptweets","key":"backuptweets","value":{"rev":"3-68712682aada41082d3ae36c03c8f899"}}, +{"id":"bake","key":"bake","value":{"rev":"113-ce13508ba2b4f15aa4df06d796aa4573"}}, +{"id":"bal-util","key":"bal-util","value":{"rev":"31-b818725a5af131c89ec66b9fdebf2122"}}, +{"id":"balancer","key":"balancer","value":{"rev":"7-63dcb4327081a8ec4d6c51a21253cb4b"}}, +{"id":"bancroft","key":"bancroft","value":{"rev":"11-8fa3370a4615a0ed4ba411b05c0285f4"}}, +{"id":"bandcamp","key":"bandcamp","value":{"rev":"41-f2fee472d63257fdba9e5fa8ad570ee8"}}, +{"id":"banner","key":"banner","value":{"rev":"19-89a447e2136b2fabddbad84abcd63a27"}}, +{"id":"banzai-docstore-couchdb","key":"banzai-docstore-couchdb","value":{"rev":"5-950c115737d634e2f48ee1c772788321"}}, +{"id":"banzai-redis","key":"banzai-redis","value":{"rev":"3-446f29e0819fd79c810fdfa8ce05bdcf"}}, +{"id":"banzai-statestore-couchdb","key":"banzai-statestore-couchdb","value":{"rev":"5-c965442821741ce6f20e266fe43aea4a"}}, +{"id":"banzai-statestore-mem","key":"banzai-statestore-mem","value":{"rev":"3-a0891a1a2344922d91781c332ed26528"}}, +{"id":"bar","key":"bar","value":{"rev":"7-fbb44a76cb023e6a8941f15576cf190b"}}, +{"id":"barc","key":"barc","value":{"rev":"7-dfe352b410782543d6b1aea292f123eb"}}, +{"id":"barista","key":"barista","value":{"rev":"9-d3f3c776453ba69a81947f34d7cc3cbf"}}, +{"id":"bark","key":"bark","value":{"rev":"20-fc1a94f80cfa199c16aa075e940e06dc"}}, +{"id":"barricane-db","key":"barricane-db","value":{"rev":"3-450947b9a05047fe195f76a69a3144e8"}}, +{"id":"base-converter","key":"base-converter","value":{"rev":"7-1b49b01df111176b89343ad56ac68d5c"}}, +{"id":"base32","key":"base32","value":{"rev":"11-d686c54c9de557681356e74b83d916e8"}}, +{"id":"base64","key":"base64","value":{"rev":"24-bd713c3d7e96fad180263ed7563c595e"}}, +{"id":"bash","key":"bash","value":{"rev":"3-86a1c61babfa47da0ebc14c2f4e59a6a"}}, +{"id":"basic-auth","key":"basic-auth","value":{"rev":"3-472a87af27264ae81bd4394d70792e55"}}, +{"id":"basicFFmpeg","key":"basicFFmpeg","value":{"rev":"15-3e87a41c543bde1e6f7c49d021fda62f"}}, +{"id":"basicauth","key":"basicauth","value":{"rev":"3-15d95a05b6f5e7b6d7261f87c4eb73de"}}, +{"id":"basil-cookie","key":"basil-cookie","value":{"rev":"11-fff96b263f31b9d017e3cf59bf6fb23f"}}, +{"id":"batik","key":"batik","value":{"rev":"7-a19ce28cbbf54649fa225ed5474eff02"}}, +{"id":"batman","key":"batman","value":{"rev":"15-6af5469bf143790cbb4af196824c9e95"}}, +{"id":"batteries","key":"batteries","value":{"rev":"13-656c68fe887f4af3ef1e720e64275f4e"}}, +{"id":"bbcode","key":"bbcode","value":{"rev":"5-e79a8b62125f8a3a1751bf7bd8875f33"}}, +{"id":"bcrypt","key":"bcrypt","value":{"rev":"31-db8496d1239362a97a26f1e5eeb8a733"}}, +{"id":"beaconpush","key":"beaconpush","value":{"rev":"3-956fcd87a6d3f9d5b9775d47e36aa3e5"}}, +{"id":"bean","key":"bean","value":{"rev":"56-151c1558e15016205e65bd515eab9ee0"}}, +{"id":"bean.database.mongo","key":"bean.database.mongo","value":{"rev":"3-ede73166710137cbf570385b7e8f17fe"}}, +{"id":"beandocs","key":"beandocs","value":{"rev":"3-9f7492984c95b69ca1ad30d40223f117"}}, +{"id":"beanpole","key":"beanpole","value":{"rev":"53-565a78a2304405cdc9f4a6b6101160fa"}}, +{"id":"beanprep","key":"beanprep","value":{"rev":"3-bd387f0072514b8e44131671f9aad1b0"}}, +{"id":"beans","key":"beans","value":{"rev":"54-7f6d40a2a5bf228fe3547cce43edaa63"}}, +{"id":"beanstalk_client","key":"beanstalk_client","value":{"rev":"6-13c8c80aa6469b5dcf20d65909289383"}}, +{"id":"beanstalk_worker","key":"beanstalk_worker","value":{"rev":"6-45500991db97ed5a18ea96f3621bf99f"}}, +{"id":"beantest","key":"beantest","value":{"rev":"7-52d8160a0c0420c7d659b2ee10f26644"}}, +{"id":"beatit","key":"beatit","value":{"rev":"7-c0ba5f95b0601dcb628e4820555cc252"}}, +{"id":"beatport","key":"beatport","value":{"rev":"5-3b186b633ceea7f047e1df91e7b683a5"}}, +{"id":"beautifyjs","key":"beautifyjs","value":{"rev":"3-89ce050152aca0727c099060229ddc73"}}, +{"id":"beaver","key":"beaver","value":{"rev":"17-3b56116e8e40205e8efcedefee0319e3"}}, +{"id":"beeline","key":"beeline","value":{"rev":"11-92a4bd9524cc7aec3106efcacff6faed"}}, +{"id":"beet","key":"beet","value":{"rev":"95-3c9d9de63c363319b2201ac83bc0ee7d"}}, +{"id":"begin","key":"begin","value":{"rev":"3-b32a5eb1b9475353b37f90813ed89dce"}}, +{"id":"begin.js","key":"begin.js","value":{"rev":"7-9156869392a448595bf3e5723fcb7b57"}}, +{"id":"bejesus-api","key":"bejesus-api","value":{"rev":"11-6b42f8ffc370c494d01481b64536e91e"}}, +{"id":"bejesus-cli","key":"bejesus-cli","value":{"rev":"31-5fbbfe5ec1f6a0a7a3fafdf69230434a"}}, +{"id":"bem","key":"bem","value":{"rev":"22-c0e0f8d9e92b355246fd15058199b73c"}}, +{"id":"ben","key":"ben","value":{"rev":"3-debe52552a86f1e71895dd5d32add585"}}, +{"id":"bench","key":"bench","value":{"rev":"14-20987e1becf3acd1bd1833b04712c87c"}}, +{"id":"bencher","key":"bencher","value":{"rev":"3-08866a8fdcf180582b43690bbbf21087"}}, +{"id":"benchmark","key":"benchmark","value":{"rev":"219-0669bc24f3f2918d93369bb0d801abf3"}}, +{"id":"bencode","key":"bencode","value":{"rev":"8-7b9eff4c1658fb3a054ebc6f50e6edcd"}}, +{"id":"beseda","key":"beseda","value":{"rev":"49-5cc8c4e9bb3e836de7db58c3adf9a5bb"}}, +{"id":"bf","key":"bf","value":{"rev":"14-d81312e1bf4f7202b801b4343199aa55"}}, +{"id":"biggie-router","key":"biggie-router","value":{"rev":"42-56a546a78d5abd4402183b3d300d563e"}}, +{"id":"bigint","key":"bigint","value":{"rev":"58-02f368567849596219d6a0e87d9bc6b9"}}, +{"id":"bignumber","key":"bignumber","value":{"rev":"3-6e372428992a767e0a991ec3f39b8343"}}, +{"id":"binary","key":"binary","value":{"rev":"47-947aa2f5238a68e34b164ef7e50ece28"}}, +{"id":"binarySearch","key":"binarySearch","value":{"rev":"15-93a3d2f9c2690457023b5ae5f3d00446"}}, +{"id":"bind","key":"bind","value":{"rev":"9-b74d0af83e90a2655e564ab64bf1d27d"}}, +{"id":"binpack","key":"binpack","value":{"rev":"7-3dc67a64e0ef01f3aa59441c5150e04f"}}, +{"id":"bintrees","key":"bintrees","value":{"rev":"12-507fcd92f447f81842cba08cacb425cf"}}, +{"id":"bisection","key":"bisection","value":{"rev":"5-f785ea3bbd8fcc7cd9381d20417b87bb"}}, +{"id":"bison","key":"bison","value":{"rev":"12-e663b2ef96650b3b5a0cc36524e1b94a"}}, +{"id":"bitcoder","key":"bitcoder","value":{"rev":"8-19c957d6b845f4d7ad531951c971e03d"}}, +{"id":"bitcoin","key":"bitcoin","value":{"rev":"13-af88a28c02ab146622743c4c1c32e87b"}}, +{"id":"bitcoin-impl","key":"bitcoin-impl","value":{"rev":"8-99068f1d259e3c75209a6bd08e3e06a2"}}, +{"id":"bitcoin-p2p","key":"bitcoin-p2p","value":{"rev":"25-6df0283eb6e419bc3a1571f17721b100"}}, +{"id":"bitcoinjs-mongoose","key":"bitcoinjs-mongoose","value":{"rev":"3-57e239b31e218693f8cf3cf1cf098437"}}, +{"id":"bitly","key":"bitly","value":{"rev":"8-d6bfac8338e223fe62538954d2e9246a"}}, +{"id":"bitly.node","key":"bitly.node","value":{"rev":"3-15329b7a77633e0dae2c720e592420fb"}}, +{"id":"biwascheme","key":"biwascheme","value":{"rev":"3-37a85eed1bd2d4ee85ef1e100e7ebe8f"}}, +{"id":"black","key":"black","value":{"rev":"3-e07ae2273357da5894f4b7cdf1b20560"}}, +{"id":"black_coffee","key":"black_coffee","value":{"rev":"3-c5c764cf550ad3c831a085509f64cdfb"}}, +{"id":"bleach","key":"bleach","value":{"rev":"5-ef3ab7e761a6903eb70da1550a07e53d"}}, +{"id":"blend","key":"blend","value":{"rev":"16-c5dd075b3ede45f91056b4b768b2bfe8"}}, +{"id":"bless","key":"bless","value":{"rev":"29-1b9bc6f17acd144f51a297e4bdccfe0e"}}, +{"id":"blitz","key":"blitz","value":{"rev":"5-8bf6786f6fd7dbc0570ba21f803f35e6"}}, +{"id":"blo","key":"blo","value":{"rev":"5-9e752ea37438ea026e88a7aa7e7a91ba"}}, +{"id":"blog","key":"blog","value":{"rev":"13-80fc7b11d73e23ca7e518d271d1836ee"}}, +{"id":"blogmate","key":"blogmate","value":{"rev":"11-e503081be9290647c841aa8c04eb6e70"}}, +{"id":"bloodmoney","key":"bloodmoney","value":{"rev":"3-859b0235de3a29bf241323a31f9aa730"}}, +{"id":"bloom","key":"bloom","value":{"rev":"15-c609882b29d61a771d7dbf17f43016ad"}}, +{"id":"blue","key":"blue","value":{"rev":"6-e84221f7286dffbfda6f8abc6306064c"}}, +{"id":"bluemold","key":"bluemold","value":{"rev":"11-f48528b642b5d38d7c02b03622117fa7"}}, +{"id":"bn-lang","key":"bn-lang","value":{"rev":"3-266f186334f69448a940081589e82b04"}}, +{"id":"bn-lang-util","key":"bn-lang-util","value":{"rev":"3-0bc44f1d7d3746120dd835bfb685e229"}}, +{"id":"bn-log","key":"bn-log","value":{"rev":"5-db81a8a978071efd24b45e350e8b8954"}}, +{"id":"bn-template","key":"bn-template","value":{"rev":"3-604e77465ab1dc7e17f3b325089651ec"}}, +{"id":"bn-time","key":"bn-time","value":{"rev":"3-9c33587e783a98e1ccea409cacd5bbfb"}}, +{"id":"bn-unit","key":"bn-unit","value":{"rev":"3-5f35e3fd446241f682231bedcf846c0a"}}, +{"id":"bncode","key":"bncode","value":{"rev":"7-915a1759135a9837954c0ead58bf8e5a"}}, +{"id":"bnf","key":"bnf","value":{"rev":"5-4fe80fcafcc7a263f28b8dc62093bd8d"}}, +{"id":"bob","key":"bob","value":{"rev":"9-9ceeb581263c04793a2231b3726ab22b"}}, +{"id":"bogart","key":"bogart","value":{"rev":"30-70aed6f0827d2bd09963afddcad7a34a"}}, +{"id":"boil","key":"boil","value":{"rev":"3-7ab0fc3b831c591fd15711c27a6f5de0"}}, +{"id":"bolt","key":"bolt","value":{"rev":"3-138dfbdea2ab53ca714ca51494d32610"}}, +{"id":"bones","key":"bones","value":{"rev":"70-c74f0845c167cd755250fc7b4b9b40c2"}}, +{"id":"bones-admin","key":"bones-admin","value":{"rev":"11-2cdfe738d66aacff8569712a279c041d"}}, +{"id":"bones-auth","key":"bones-auth","value":{"rev":"35-2224f95bf3521809ce805ff215d2856c"}}, +{"id":"bones-document","key":"bones-document","value":{"rev":"13-95971fed1f47005c282e0fa60498e31c"}}, +{"id":"bonsai","key":"bonsai","value":{"rev":"3-67eb8935492d4ae9182a7ec74c1f36a6"}}, +{"id":"bonzo","key":"bonzo","value":{"rev":"142-7c5680b0f841c2263f06e96eb5237825"}}, +{"id":"bookbu","key":"bookbu","value":{"rev":"3-d9a104bccc67eae8a5dc6f0f4c3ba5fc"}}, +{"id":"bootstrap","key":"bootstrap","value":{"rev":"17-7a62dbe5e3323beb47165f13265f1a96"}}, +{"id":"borschik","key":"borschik","value":{"rev":"7-2570b5d6555a031394a55ff054797cb9"}}, +{"id":"bots","key":"bots","value":{"rev":"9-df43539c13d2996d9e32dff848615e8a"}}, +{"id":"bounce","key":"bounce","value":{"rev":"8-a3e424b2be1379743e9628c726facaa8"}}, +{"id":"bowser","key":"bowser","value":{"rev":"11-23ecc98edf5fde63fda626bb03da597f"}}, +{"id":"box2d","key":"box2d","value":{"rev":"6-5c920e9829764cbf904b9a59474c1672"}}, +{"id":"box2dnode","key":"box2dnode","value":{"rev":"3-12ffe24dcc1478ea0008c60c4ef7118f"}}, +{"id":"boxcar","key":"boxcar","value":{"rev":"5-a9ba953c547585285559d0e05c16e29e"}}, +{"id":"boxer","key":"boxer","value":{"rev":"8-60c49ff8574d5a47616796ad991463ad"}}, +{"id":"bracket-matcher","key":"bracket-matcher","value":{"rev":"27-a01c946c69665629e212a0f702be1b38"}}, +{"id":"brain","key":"brain","value":{"rev":"24-3aba33914e0f823505c69ef01361681b"}}, +{"id":"brainfuck","key":"brainfuck","value":{"rev":"7-adf33477ffe8640c9fdd6a0f8b349953"}}, +{"id":"brains","key":"brains","value":{"rev":"3-d7e7a95ea742f9b42fefb594c67c726a"}}, +{"id":"braintree","key":"braintree","value":{"rev":"14-eabe1c3e4e7cfd1f521f4bfd337611f7"}}, +{"id":"brazilnut","key":"brazilnut","value":{"rev":"3-4163b5a5598a8905c1283db9d260e5cc"}}, +{"id":"brazln","key":"brazln","value":{"rev":"29-15895bb5b193552826c196efe084caf2"}}, +{"id":"bread","key":"bread","value":{"rev":"9-093c9dd71fffb9a5b1c9eb8ac3e2a9b0"}}, +{"id":"breakfast","key":"breakfast","value":{"rev":"3-231e3046ede5e35e272dfab4a379015d"}}, +{"id":"brequire","key":"brequire","value":{"rev":"18-58b386e08541b222238aa12a13119fd9"}}, +{"id":"bricks","key":"bricks","value":{"rev":"15-f72e6c858c5bceb00cc34a16d52a7b59"}}, +{"id":"bricks-analytics","key":"bricks-analytics","value":{"rev":"3-dc2b6d2157c5039a4c36ceda46761b37"}}, +{"id":"bricks-compress","key":"bricks-compress","value":{"rev":"5-580eeecaa30c210502f42c5e184344a3"}}, +{"id":"bricks-rewrite","key":"bricks-rewrite","value":{"rev":"5-7a141aacaa3fd706b97847c6e8f9830a"}}, +{"id":"brokenbin","key":"brokenbin","value":{"rev":"5-bbc7a1c9628ed9f49b6d23e80c242852"}}, +{"id":"broker","key":"broker","value":{"rev":"9-756a097b948756e4bd7609b6f83a0847"}}, +{"id":"browscap","key":"browscap","value":{"rev":"12-c6fed16796d1ad84913f2617c66f0c7b"}}, +{"id":"browser-require","key":"browser-require","value":{"rev":"27-99f61fb3036ebc643282625649cc674f"}}, +{"id":"browserify","key":"browserify","value":{"rev":"163-c307ee153caf2160e5c32abd58898139"}}, +{"id":"browserjet","key":"browserjet","value":{"rev":"3-a386ab8911c410362eb8fceab5a998fe"}}, +{"id":"brt","key":"brt","value":{"rev":"3-b8452659a92039571ff1f877c8f874c7"}}, +{"id":"brunch","key":"brunch","value":{"rev":"113-64ae44857425c5d860d36f38ab3cf797"}}, +{"id":"brushes.js","key":"brushes.js","value":{"rev":"3-e28bd6597b949d84965a788928738f53"}}, +{"id":"bson","key":"bson","value":{"rev":"50-9d9db515dd9d2a4d873d186f324767a5"}}, +{"id":"btc-ex-api","key":"btc-ex-api","value":{"rev":"3-cabbf284cb01af79ee183d8023106762"}}, +{"id":"btoa","key":"btoa","value":{"rev":"3-b4a124b3650a746b8da9c9f93f386bac"}}, +{"id":"btoa-atob","key":"btoa-atob","value":{"rev":"3-baac60a3f04487333cc0364301220a53"}}, +{"id":"bucket","key":"bucket","value":{"rev":"3-5c2da8f67e29de1c29adbf51ad7d7299"}}, +{"id":"buffalo","key":"buffalo","value":{"rev":"9-6c763d939d775a255c65ba8dcf0d5372"}}, +{"id":"bufferjs","key":"bufferjs","value":{"rev":"13-b6e09e35ec822714d3ec485ac2010272"}}, +{"id":"bufferlib","key":"bufferlib","value":{"rev":"16-d48d96815fc7709d6b7d0a8bfc67f053"}}, +{"id":"bufferlist","key":"bufferlist","value":{"rev":"18-6fcedc10ffbca1afdc866e208d2f906a"}}, +{"id":"buffers","key":"buffers","value":{"rev":"11-3a70ec2da112befdc65b8c02772b8c44"}}, +{"id":"bufferstream","key":"bufferstream","value":{"rev":"82-6f82c5affb3906ebbaa0b116baf73c54"}}, +{"id":"buffertools","key":"buffertools","value":{"rev":"20-68f90e224f81fab81295f9079dc3c0fc"}}, +{"id":"buffoon","key":"buffoon","value":{"rev":"9-1cdc1cbced94691e836d4266eed7c143"}}, +{"id":"builder","key":"builder","value":{"rev":"25-b9679e2aaffec1ac6d59fdd259d9590c"}}, +{"id":"buildr","key":"buildr","value":{"rev":"69-cb3a756903a6322c6f9f4dd1c384a607"}}, +{"id":"bumper","key":"bumper","value":{"rev":"3-1e8d17aa3b29815e4069294cc9ce572c"}}, +{"id":"bundle","key":"bundle","value":{"rev":"39-46fde9cd841bce1fbdd92f6a1235c308"}}, +{"id":"bunker","key":"bunker","value":{"rev":"7-ed993a296fa0b8d3c3a7cd759d6f371e"}}, +{"id":"burari","key":"burari","value":{"rev":"11-08b61073d6ad0ef0c7449a574dc8f54b"}}, +{"id":"burrito","key":"burrito","value":{"rev":"38-3f3b109972720647f5412f3a2478859b"}}, +{"id":"busbuddy","key":"busbuddy","value":{"rev":"5-298ec29f6307351cf7a19bceebe957c7"}}, +{"id":"buster","key":"buster","value":{"rev":"9-870a6e9638806adde2f40105900cd4b3"}}, +{"id":"buster-args","key":"buster-args","value":{"rev":"7-9b189c602e437a505625dbf7fef5dead"}}, +{"id":"buster-assertions","key":"buster-assertions","value":{"rev":"5-fa34a8a5e7cf4dd08c2d02c39de3b563"}}, +{"id":"buster-cli","key":"buster-cli","value":{"rev":"5-b1a85006e41dbf74313253c571e63874"}}, +{"id":"buster-client","key":"buster-client","value":{"rev":"5-340637ec63b54bb01c1313a78db01945"}}, +{"id":"buster-configuration","key":"buster-configuration","value":{"rev":"3-a12e7ff172562b513534fc26be00aaed"}}, +{"id":"buster-core","key":"buster-core","value":{"rev":"5-871df160645e6684111a8fd02ff0eee9"}}, +{"id":"buster-evented-logger","key":"buster-evented-logger","value":{"rev":"5-c46681e6275a76723e3bc834555dbe32"}}, +{"id":"buster-format","key":"buster-format","value":{"rev":"5-e193e90436c7f941739b82adad86bdd8"}}, +{"id":"buster-module-loader","key":"buster-module-loader","value":{"rev":"5-4148b61f8b718e6181aa6054664a7c44"}}, +{"id":"buster-multicast","key":"buster-multicast","value":{"rev":"3-79480b5be761d243b274cb1e77375afc"}}, +{"id":"buster-promise","key":"buster-promise","value":{"rev":"5-b50030957fbd70e65576faa9c541b739"}}, +{"id":"buster-script-loader","key":"buster-script-loader","value":{"rev":"3-85af28b5bc4e647f27514fede19a144e"}}, +{"id":"buster-server","key":"buster-server","value":{"rev":"7-57b8b43047504818322018d2bbfee1f1"}}, +{"id":"buster-static","key":"buster-static","value":{"rev":"3-018c89d1524f7823934087f18dab9047"}}, +{"id":"buster-terminal","key":"buster-terminal","value":{"rev":"5-2c54c30ffa4a2d4b061e4c38e6b9b0e7"}}, +{"id":"buster-test","key":"buster-test","value":{"rev":"5-f7ee9c9f3b379e0ad5aa03d07581ad6f"}}, +{"id":"buster-test-cli","key":"buster-test-cli","value":{"rev":"9-c207974d20e95029cad5fa4c9435d152"}}, +{"id":"buster-user-agent-parser","key":"buster-user-agent-parser","value":{"rev":"5-7883085a203b3047b28ad08361219d1d"}}, +{"id":"buster-util","key":"buster-util","value":{"rev":"3-81977275a9c467ad79bb7e3f2b1caaa8"}}, +{"id":"butler","key":"butler","value":{"rev":"7-c964c4d213da6b0de2492ee57514d0f8"}}, +{"id":"byline","key":"byline","value":{"rev":"9-0b236ed5986c20136c0d581a244d52ac"}}, +{"id":"bz","key":"bz","value":{"rev":"7-d2a463b259c4e09dc9a79ddee9575ca0"}}, +{"id":"c2dm","key":"c2dm","value":{"rev":"11-a1e6a6643506bed3e1443155706aa5fe"}}, +{"id":"cabin","key":"cabin","value":{"rev":"7-df81ef56f0bb085d381c36600496dc57"}}, +{"id":"caboose","key":"caboose","value":{"rev":"49-7226441f91b63fb5c3ac240bd99d142a"}}, +{"id":"caboose-authentication","key":"caboose-authentication","value":{"rev":"3-9c71a9d7315fdea7d5f52fe52ecef118"}}, +{"id":"caboose-model","key":"caboose-model","value":{"rev":"3-967426d5acb8bb70e133f0052075dc1b"}}, +{"id":"cache2file","key":"cache2file","value":{"rev":"17-ac9caec611a38e1752d91f8cc80cfb04"}}, +{"id":"caching","key":"caching","value":{"rev":"11-06041aaaa46b63ed36843685cac63245"}}, +{"id":"calais","key":"calais","value":{"rev":"11-f8ac2064ca45dd5b7db7ea099cd61dfb"}}, +{"id":"calc","key":"calc","value":{"rev":"3-bead9c5b0bee34e44e7c04aa2bf9cd68"}}, +{"id":"calipso","key":"calipso","value":{"rev":"87-b562676045a66a3ec702591c67a9635e"}}, +{"id":"caman","key":"caman","value":{"rev":"15-4b97c73f0ac101c68335de2937483893"}}, +{"id":"camanjs","key":"camanjs","value":{"rev":"3-2856bbdf7a1d454929b4a80b119e3da0"}}, +{"id":"camelot","key":"camelot","value":{"rev":"7-8e257c5213861ecbd229ee737a3a8bb4"}}, +{"id":"campusbooks","key":"campusbooks","value":{"rev":"18-489be33c6ac2d6cbcf93355f2b129389"}}, +{"id":"canvas","key":"canvas","value":{"rev":"78-27dbf5b6e0a25ba5886d485fd897d701"}}, +{"id":"canvasutil","key":"canvasutil","value":{"rev":"7-0b87a370d673886efb7763aaf500b744"}}, +{"id":"capoo","key":"capoo","value":{"rev":"9-136a3ddf489228d5f4b504b1da619447"}}, +{"id":"capsule","key":"capsule","value":{"rev":"19-ad3c9ba0af71a84228e6dd360017f379"}}, +{"id":"capt","key":"capt","value":{"rev":"13-0805d789000fb2e361103a5e62379196"}}, +{"id":"carena","key":"carena","value":{"rev":"10-d38e8c336a0dbb8091514f638b22b96b"}}, +{"id":"carrier","key":"carrier","value":{"rev":"20-b2b4a0560d40eeac617000e9e22a9e9d"}}, +{"id":"cart","key":"cart","value":{"rev":"12-493e79c6fa0b099626e90da79a69f1e5"}}, +{"id":"carto","key":"carto","value":{"rev":"45-8eab07e2fac57396dd62af5805062387"}}, +{"id":"caruso","key":"caruso","value":{"rev":"5-d58e22212b0bcebbab4b42adc68799aa"}}, +{"id":"cas","key":"cas","value":{"rev":"3-82a93160eb9add99bde1599e55d18fd8"}}, +{"id":"cas-auth","key":"cas-auth","value":{"rev":"3-b02f77c198050b99f1df18f637e77c10"}}, +{"id":"cas-client","key":"cas-client","value":{"rev":"3-ca69e32a3053bc680d1dddc57271483b"}}, +{"id":"cashew","key":"cashew","value":{"rev":"7-9e81cde34263adad6949875c4b33ee99"}}, +{"id":"cassandra","key":"cassandra","value":{"rev":"3-8617ef73fdc73d02ecec74d31f98e463"}}, +{"id":"cassandra-client","key":"cassandra-client","value":{"rev":"19-aa1aef5d203be5b0eac678284f1a979f"}}, +{"id":"casset","key":"casset","value":{"rev":"3-2052c7feb5b89c77aaa279c8b50126ce"}}, +{"id":"castaneum","key":"castaneum","value":{"rev":"26-4dc55ba2482cca4230b4bc77ecb5b70d"}}, +{"id":"cat","key":"cat","value":{"rev":"3-75f20119b363b85c1a8433e26b86c943"}}, +{"id":"catchjs","key":"catchjs","value":{"rev":"3-ffda7eff7613de37f629dc7a831ffda1"}}, +{"id":"caterpillar","key":"caterpillar","value":{"rev":"5-bc003e3af33240e67b4c3042f308b7da"}}, +{"id":"causeeffect","key":"causeeffect","value":{"rev":"9-7e4e25bff656170c97cb0cce1b2ab6ca"}}, +{"id":"cayenne","key":"cayenne","value":{"rev":"5-2797f561467b41cc45804e5498917800"}}, +{"id":"ccn4bnode","key":"ccn4bnode","value":{"rev":"17-96f55189e5c98f0fa8200e403a04eb39"}}, +{"id":"ccnq3_config","key":"ccnq3_config","value":{"rev":"21-40345771769a9cadff4af9113b8124c2"}}, +{"id":"ccnq3_logger","key":"ccnq3_logger","value":{"rev":"5-4aa168dc24425938a29cf9ac456158d7"}}, +{"id":"ccnq3_portal","key":"ccnq3_portal","value":{"rev":"17-84e629ec1eaba1722327ccb9dddb05cf"}}, +{"id":"ccnq3_roles","key":"ccnq3_roles","value":{"rev":"43-97de74b08b1af103da8905533a84b749"}}, +{"id":"ccss","key":"ccss","value":{"rev":"11-b9beb506410ea81581ba4c7dfe9b2a7d"}}, +{"id":"cdb","key":"cdb","value":{"rev":"13-d7b6f609f069dc738912b405aac558ab"}}, +{"id":"cdb_changes","key":"cdb_changes","value":{"rev":"13-1dc99b096cb91c276332b651396789e8"}}, +{"id":"celeri","key":"celeri","value":{"rev":"17-b19294619ef6c2056f3bf6641e8945c2"}}, +{"id":"celery","key":"celery","value":{"rev":"5-bdfccd483cf30c4c10c5ec0963de1248"}}, +{"id":"cempl8","key":"cempl8","value":{"rev":"21-bb9547b78a1548fe11dc1d5b816b6da1"}}, +{"id":"cfg","key":"cfg","value":{"rev":"3-85c7651bb8f16b057e60a46946eb95af"}}, +{"id":"cgi","key":"cgi","value":{"rev":"17-7ceac458c7f141d4fbbf05d267a72aa8"}}, +{"id":"chain","key":"chain","value":{"rev":"9-b0f175c5ad0173bcb7e11e58b02a7394"}}, +{"id":"chain-gang","key":"chain-gang","value":{"rev":"22-b0e6841a344b65530ea2a83a038e5aa6"}}, +{"id":"chainer","key":"chainer","value":{"rev":"15-8c6a565035225a1dcca0177e92ccf42d"}}, +{"id":"chainify","key":"chainify","value":{"rev":"3-0926790f18a0016a9943cfb4830e0187"}}, +{"id":"chains","key":"chains","value":{"rev":"5-d9e1ac38056e2638e38d9a7c415929c6"}}, +{"id":"chainsaw","key":"chainsaw","value":{"rev":"24-82e078efbbc59f798d29a0259481012e"}}, +{"id":"changelog","key":"changelog","value":{"rev":"27-317e473de0bf596b273a9dadecea126d"}}, +{"id":"channel-server","key":"channel-server","value":{"rev":"3-3c882f7e61686e8a124b5198c638a18e"}}, +{"id":"channels","key":"channels","value":{"rev":"5-0b532f054886d9094cb98493ee0a7a16"}}, +{"id":"chaos","key":"chaos","value":{"rev":"40-7caa4459d398f5ec30fea91d087f0d71"}}, +{"id":"chard","key":"chard","value":{"rev":"3-f2de35f7a390ea86ac0eb78bf720d0de"}}, +{"id":"charenc","key":"charenc","value":{"rev":"3-092036302311a8f5779b800c98170b5b"}}, +{"id":"chargify","key":"chargify","value":{"rev":"5-e3f29f2816b04c26ca047d345928e2c1"}}, +{"id":"charm","key":"charm","value":{"rev":"13-3e7e7b5babc1efc472e3ce62eec2c0c7"}}, +{"id":"chat-server","key":"chat-server","value":{"rev":"7-c73b785372474e083fb8f3e9690761da"}}, +{"id":"chatroom","key":"chatroom","value":{"rev":"3-f4fa8330b7eb277d11407f968bffb6a2"}}, +{"id":"chatspire","key":"chatspire","value":{"rev":"3-081e167e3f7c1982ab1b7fc3679cb87c"}}, +{"id":"checkip","key":"checkip","value":{"rev":"3-b31d58a160a4a3fe2f14cfbf2217949e"}}, +{"id":"cheddar-getter","key":"cheddar-getter","value":{"rev":"3-d675ec138ea704df127fabab6a52a8dc"}}, +{"id":"chess","key":"chess","value":{"rev":"3-8b15268c8b0fb500dcbc83b259e7fb88"}}, +{"id":"chessathome-worker","key":"chessathome-worker","value":{"rev":"7-cdfd411554c35ba7a52e54f7744bed35"}}, +{"id":"chirkut.js","key":"chirkut.js","value":{"rev":"3-c0e515eee0f719c5261a43e692a3585c"}}, +{"id":"chiron","key":"chiron","value":{"rev":"6-ccb575e432c1c1981fc34b4e27329c85"}}, +{"id":"chopper","key":"chopper","value":{"rev":"5-168681c58c2a50796676dea73dc5398b"}}, +{"id":"choreographer","key":"choreographer","value":{"rev":"14-b0159823becdf0b4552967293968b2a8"}}, +{"id":"chromic","key":"chromic","value":{"rev":"3-c4ca0bb1f951db96c727241092afa9cd"}}, +{"id":"chrono","key":"chrono","value":{"rev":"9-6399d715df1a2f4696f89f2ab5d4d83a"}}, +{"id":"chuck","key":"chuck","value":{"rev":"3-71f2ee071d4b6fb2af3b8b828c51d8ab"}}, +{"id":"chunkedstream","key":"chunkedstream","value":{"rev":"3-b145ed7d1abd94ac44343413e4f823e7"}}, +{"id":"cider","key":"cider","value":{"rev":"10-dc20cd3eac9470e96911dcf75ac6492b"}}, +{"id":"cinch","key":"cinch","value":{"rev":"5-086af7f72caefb57284e4101cbe3c905"}}, +{"id":"cipherpipe","key":"cipherpipe","value":{"rev":"5-0b5590f808415a7297de6d45947d911f"}}, +{"id":"cjson","key":"cjson","value":{"rev":"25-02e3d327b48e77dc0f9e070ce9454ac2"}}, +{"id":"ck","key":"ck","value":{"rev":"3-f482385f5392a49353d8ba5eb9c7afef"}}, +{"id":"ckup","key":"ckup","value":{"rev":"26-90a76ec0cdf951dc2ea6058098407ee2"}}, +{"id":"class","key":"class","value":{"rev":"6-e2805f7d87586a66fb5fd170cf74b3b0"}}, +{"id":"class-42","key":"class-42","value":{"rev":"3-14c988567a2c78a857f15c9661bd6430"}}, +{"id":"class-js","key":"class-js","value":{"rev":"5-792fd04288a651dad87bc47eb91c2042"}}, +{"id":"classify","key":"classify","value":{"rev":"23-35eb336c350446f5ed49069df151dbb7"}}, +{"id":"clean-css","key":"clean-css","value":{"rev":"13-e30ea1007f6c5bb49e07276228b8a960"}}, +{"id":"clearInterval","key":"clearInterval","value":{"rev":"3-a49fa235d3dc14d28a3d15f8db291986"}}, +{"id":"clearTimeout","key":"clearTimeout","value":{"rev":"3-e838bd25adc825112922913c1a35b934"}}, +{"id":"cli","key":"cli","value":{"rev":"65-9e79c37c12d21b9b9114093de0773c54"}}, +{"id":"cli-color","key":"cli-color","value":{"rev":"9-0a8e775e713b1351f6a6648748dd16ec"}}, +{"id":"cli-table","key":"cli-table","value":{"rev":"3-9e447a8bb392fb7d9c534445a650e328"}}, +{"id":"clickatell","key":"clickatell","value":{"rev":"3-31f1a66d08a789976919df0c9280de88"}}, +{"id":"clicktime","key":"clicktime","value":{"rev":"9-697a99f5f704bfebbb454df47c9c472a"}}, +{"id":"clientexpress","key":"clientexpress","value":{"rev":"3-9b07041cd7b0c3967c4625ac74c9b50c"}}, +{"id":"cliff","key":"cliff","value":{"rev":"15-ef9ef25dbad08c0e346388522d94c5c3"}}, +{"id":"clip","key":"clip","value":{"rev":"21-c3936e566feebfe0beddb0bbb686c00d"}}, +{"id":"clock","key":"clock","value":{"rev":"5-19bc51841d41408b4446c0862487dc5e"}}, +{"id":"clog","key":"clog","value":{"rev":"5-1610fe2c0f435d2694a1707ee15cd11e"}}, +{"id":"clone","key":"clone","value":{"rev":"11-099d07f38381b54902c4cf5b93671ed4"}}, +{"id":"closure","key":"closure","value":{"rev":"7-9c2ac6b6ec9f14d12d10bfbfad58ec14"}}, +{"id":"closure-compiler","key":"closure-compiler","value":{"rev":"8-b3d2f9e3287dd33094a35d797d6beaf2"}}, +{"id":"cloud","key":"cloud","value":{"rev":"27-407c7aa77d3d4a6cc903d18b383de8b8"}}, +{"id":"cloud9","key":"cloud9","value":{"rev":"71-4af631e3fa2eb28058cb0d18ef3a6a3e"}}, +{"id":"cloudcontrol","key":"cloudcontrol","value":{"rev":"15-2df57385aa9bd92f7ed81e6892e23696"}}, +{"id":"cloudfiles","key":"cloudfiles","value":{"rev":"30-01f84ebda1d8f151b3e467590329960c"}}, +{"id":"cloudfoundry","key":"cloudfoundry","value":{"rev":"3-66fafd3d6b1353b1699d35e634686ab6"}}, +{"id":"cloudmailin","key":"cloudmailin","value":{"rev":"3-a4e3e4d457f5a18261bb8df145cfb418"}}, +{"id":"cloudnode-cli","key":"cloudnode-cli","value":{"rev":"17-3a80f7855ce618f7aee68bd693ed485b"}}, +{"id":"cloudservers","key":"cloudservers","value":{"rev":"42-6bc34f7e34f84a24078b43a609e96c59"}}, +{"id":"clucene","key":"clucene","value":{"rev":"37-3d613f12a857b8fe22fbf420bcca0dc3"}}, +{"id":"cluster","key":"cluster","value":{"rev":"83-63fb7a468d95502f94ea45208ba0a890"}}, +{"id":"cluster-isolatable","key":"cluster-isolatable","value":{"rev":"5-6af883cea9ab1c90bb126d8b3be2d156"}}, +{"id":"cluster-live","key":"cluster-live","value":{"rev":"7-549d19e9727f460c7de48f93b92e9bb3"}}, +{"id":"cluster-log","key":"cluster-log","value":{"rev":"7-9c47854df8ec911e679743185668a5f7"}}, +{"id":"cluster-loggly","key":"cluster-loggly","value":{"rev":"3-e1f7e331282d7b8317ce55e0fce7f934"}}, +{"id":"cluster-mail","key":"cluster-mail","value":{"rev":"9-dc18c5c1b2b265f3d531b92467b6cc35"}}, +{"id":"cluster-responsetimes","key":"cluster-responsetimes","value":{"rev":"3-c9e16daee15eb84910493264e973275c"}}, +{"id":"cluster-socket.io","key":"cluster-socket.io","value":{"rev":"7-29032f0b42575e9fe183a0af92191132"}}, +{"id":"cluster.exception","key":"cluster.exception","value":{"rev":"3-10856526e2f61e3000d62b12abd750e3"}}, +{"id":"clutch","key":"clutch","value":{"rev":"8-50283f7263c430cdd1d293c033571012"}}, +{"id":"cm1-route","key":"cm1-route","value":{"rev":"13-40e72b5a4277b500c98c966bcd2a8a86"}}, +{"id":"cmd","key":"cmd","value":{"rev":"9-9168fcd96fb1ba9449050162023f3570"}}, +{"id":"cmdopt","key":"cmdopt","value":{"rev":"3-85677533e299bf195e78942929cf9839"}}, +{"id":"cmp","key":"cmp","value":{"rev":"5-b10f873b78eb64e406fe55bd001ae0fa"}}, +{"id":"cmudict","key":"cmudict","value":{"rev":"3-cd028380bba917d5ed2be7a8d3b3b0b7"}}, +{"id":"cnlogger","key":"cnlogger","value":{"rev":"9-dbe7e0e50d25ca5ae939fe999c3c562b"}}, +{"id":"coa","key":"coa","value":{"rev":"11-ff4e634fbebd3f80b9461ebe58b3f64e"}}, +{"id":"cobra","key":"cobra","value":{"rev":"5-a3e0963830d350f4a7e91b438caf9117"}}, +{"id":"cockpit","key":"cockpit","value":{"rev":"3-1757b37245ee990999e4456b9a6b963e"}}, +{"id":"coco","key":"coco","value":{"rev":"104-eabc4d7096295c2156144a7581d89b35"}}, +{"id":"cocos2d","key":"cocos2d","value":{"rev":"19-88a5c75ceb6e7667665c056d174f5f1a"}}, +{"id":"codem-transcode","key":"codem-transcode","value":{"rev":"9-1faa2657d53271ccc44cce27de723e99"}}, +{"id":"codepad","key":"codepad","value":{"rev":"5-094ddce74dc057dc0a4d423d6d2fbc3a"}}, +{"id":"codetube","key":"codetube","value":{"rev":"3-819794145f199330e724864db70da53b"}}, +{"id":"coerce","key":"coerce","value":{"rev":"3-e7d392d497c0b8491b89fcbbd1a5a89f"}}, +{"id":"coffee-conf","key":"coffee-conf","value":{"rev":"3-883bc4767d70810ece2fdf1ccae883de"}}, +{"id":"coffee-css","key":"coffee-css","value":{"rev":"11-66ca197173751389b24945f020f198f9"}}, +{"id":"coffee-echonest","key":"coffee-echonest","value":{"rev":"3-3cd0e2b77103e334eccf6cf4168f39b2"}}, +{"id":"coffee-machine","key":"coffee-machine","value":{"rev":"9-02deb4d27fd5d56002ead122e9bb213e"}}, +{"id":"coffee-new","key":"coffee-new","value":{"rev":"67-0664b0f289030c38d113070fd26f4f71"}}, +{"id":"coffee-resque","key":"coffee-resque","value":{"rev":"22-5b022809317d3a873be900f1a697c5eb"}}, +{"id":"coffee-resque-retry","key":"coffee-resque-retry","value":{"rev":"29-1fb64819a4a21ebb4d774d9d4108e419"}}, +{"id":"coffee-revup","key":"coffee-revup","value":{"rev":"3-23aafa258bcdcf2bb68d143d61383551"}}, +{"id":"coffee-script","key":"coffee-script","value":{"rev":"60-a6c3739655f43953bd86283776586b95"}}, +{"id":"coffee-son","key":"coffee-son","value":{"rev":"3-84a81e7e24c8cb23293940fc1b87adfe"}}, +{"id":"coffee-toaster","key":"coffee-toaster","value":{"rev":"17-d43d7276c08b526c229c78b7d5acd6cc"}}, +{"id":"coffee-watcher","key":"coffee-watcher","value":{"rev":"3-3d861a748f0928c789cbdb8ff62b6091"}}, +{"id":"coffee-world","key":"coffee-world","value":{"rev":"15-46dc320f94fa64c39e183224ec59f47a"}}, +{"id":"coffee4clients","key":"coffee4clients","value":{"rev":"15-58fba7dd10bced0411cfe546b9336145"}}, +{"id":"coffeeapp","key":"coffeeapp","value":{"rev":"48-bece0a26b78afc18cd37d577f90369d9"}}, +{"id":"coffeebot","key":"coffeebot","value":{"rev":"3-a9007053f25a4c13b324f0ac7066803e"}}, +{"id":"coffeedoc","key":"coffeedoc","value":{"rev":"21-a955faafafd10375baf3101ad2c142d0"}}, +{"id":"coffeegrinder","key":"coffeegrinder","value":{"rev":"9-6e725aad7fd39cd38f41c743ef8a7563"}}, +{"id":"coffeekup","key":"coffeekup","value":{"rev":"35-9b1eecdb7b13d3e75cdc7b1045cf910a"}}, +{"id":"coffeemaker","key":"coffeemaker","value":{"rev":"9-4c5e665aa2a5b4efa2b7d077d0a4f9c1"}}, +{"id":"coffeemate","key":"coffeemate","value":{"rev":"71-03d0221fb495f2dc6732009884027b47"}}, +{"id":"coffeepack","key":"coffeepack","value":{"rev":"3-bbf0e27cb4865392164e7ab33f131d58"}}, +{"id":"coffeeq","key":"coffeeq","value":{"rev":"9-4e38e9742a0b9d7b308565729fbfd123"}}, +{"id":"coffeescript-growl","key":"coffeescript-growl","value":{"rev":"7-2bc1f93c4aad5fa8fb4bcfd1b3ecc279"}}, +{"id":"coffeescript-notify","key":"coffeescript-notify","value":{"rev":"3-8aeb31f8e892d3fefa421ff28a1b3de9"}}, +{"id":"collectd","key":"collectd","value":{"rev":"5-3d4c84b0363aa9c078157d82695557a1"}}, +{"id":"collection","key":"collection","value":{"rev":"3-a47e1fe91b9eebb3e75954e350ec2ca3"}}, +{"id":"collection_functions","key":"collection_functions","value":{"rev":"3-7366c721008062373ec924a409415189"}}, +{"id":"collections","key":"collections","value":{"rev":"3-0237a40d08a0da36c2dd01ce73a89bb2"}}, +{"id":"color","key":"color","value":{"rev":"15-4898b2cd9744feb3249ba10828c186f8"}}, +{"id":"color-convert","key":"color-convert","value":{"rev":"7-2ccb47c7f07a47286d9a2f39383d28f0"}}, +{"id":"color-string","key":"color-string","value":{"rev":"5-9a6336f420e001e301a15b88b0103696"}}, +{"id":"colorize","key":"colorize","value":{"rev":"3-ff380385edacc0c46e4c7b5c05302576"}}, +{"id":"colors","key":"colors","value":{"rev":"8-7c7fb9c5af038c978f0868c7706fe145"}}, +{"id":"colour-extractor","key":"colour-extractor","value":{"rev":"3-62e96a84c6adf23f438b5aac76c7b257"}}, +{"id":"coloured","key":"coloured","value":{"rev":"8-c5295f2d5a8fc08e93d180a4e64f8d38"}}, +{"id":"coloured-log","key":"coloured-log","value":{"rev":"14-8627a3625959443acad71e2c23dfc582"}}, +{"id":"comb","key":"comb","value":{"rev":"5-7f201b621ae9a890c7f5a31867eba3e9"}}, +{"id":"combine","key":"combine","value":{"rev":"14-bed33cd4389a2e4bb826a0516c6ae307"}}, +{"id":"combined-stream","key":"combined-stream","value":{"rev":"13-678f560200ac2835b9026e9e2b955cb0"}}, +{"id":"combiner","key":"combiner","value":{"rev":"3-5e7f133c8c14958eaf9e92bd79ae8ee1"}}, +{"id":"combohandler","key":"combohandler","value":{"rev":"7-d7e1a402f0066caa6756a8866de81dd9"}}, +{"id":"combyne","key":"combyne","value":{"rev":"23-05ebee9666a769e32600bc5548d10ce9"}}, +{"id":"comfy","key":"comfy","value":{"rev":"5-8bfe55bc16611dfe51a184b8f3eb31c1"}}, +{"id":"command-parser","key":"command-parser","value":{"rev":"5-8a5c3ed6dfa0fa55cc71b32cf52332fc"}}, +{"id":"commander","key":"commander","value":{"rev":"11-9dd16c00844d464bf66c101a57075401"}}, +{"id":"commando","key":"commando","value":{"rev":"3-e159f1890f3771dfd6e04f4d984f26f3"}}, +{"id":"common","key":"common","value":{"rev":"16-94eafcf104c0c7d1090e668ddcc12a5f"}}, +{"id":"common-exception","key":"common-exception","value":{"rev":"7-bd46358014299da814691c835548ef21"}}, +{"id":"common-node","key":"common-node","value":{"rev":"5-b2c4bef0e7022d5d453661a9c43497a8"}}, +{"id":"common-pool","key":"common-pool","value":{"rev":"5-c495fa945361ba4fdfb2ee8733d791b4"}}, +{"id":"common-utils","key":"common-utils","value":{"rev":"3-e5a047f118fc304281d2bc5e9ab18e62"}}, +{"id":"commondir","key":"commondir","value":{"rev":"3-ea49874d12eeb9adf28ca28989dfb5a9"}}, +{"id":"commonjs","key":"commonjs","value":{"rev":"6-39fcd0de1ec265890cf063effd0672e3"}}, +{"id":"commonjs-utils","key":"commonjs-utils","value":{"rev":"6-c0266a91dbd0a43effb7d30da5d9f35c"}}, +{"id":"commonkv","key":"commonkv","value":{"rev":"3-90b2fe4c79e263b044303706c4d5485a"}}, +{"id":"commons","key":"commons","value":{"rev":"6-0ecb654aa2bd17cf9519f86d354f8a50"}}, +{"id":"complete","key":"complete","value":{"rev":"7-acde8cba7677747d09c3d53ff165754e"}}, +{"id":"complex-search","key":"complex-search","value":{"rev":"5-c80b2c7f049f333bde89435f3de497ca"}}, +{"id":"compose","key":"compose","value":{"rev":"1-cf8a97d6ead3bef056d85daec5d36c70"}}, +{"id":"composer","key":"composer","value":{"rev":"6-1deb43725051f845efd4a7c8e68aa6d6"}}, +{"id":"compress","key":"compress","value":{"rev":"17-f0aacce1356f807b51e083490fb353bd"}}, +{"id":"compress-buffer","key":"compress-buffer","value":{"rev":"12-2886014c7f2541f4ddff9f0f55f4c171"}}, +{"id":"compress-ds","key":"compress-ds","value":{"rev":"5-9e4c6931edf104443353594ef50aa127"}}, +{"id":"compressor","key":"compressor","value":{"rev":"3-ee8ad155a98e1483d899ebcf82d5fb63"}}, +{"id":"concrete","key":"concrete","value":{"rev":"5-bc70bbffb7c6fe9e8c399db578fb3bae"}}, +{"id":"condo","key":"condo","value":{"rev":"9-5f03d58ee7dc29465defa3758f3b138a"}}, +{"id":"conductor","key":"conductor","value":{"rev":"8-1878afadcda7398063de6286c2d2c5c1"}}, +{"id":"conf","key":"conf","value":{"rev":"11-dcf0f6a93827d1b143cb1d0858f2be4a"}}, +{"id":"config","key":"config","value":{"rev":"37-2b741a1e6951a74b7f1de0d0547418a0"}}, +{"id":"config-loader","key":"config-loader","value":{"rev":"3-708cc96d1206de46fb450eb57ca07b0d"}}, +{"id":"configurator","key":"configurator","value":{"rev":"5-b31ad9731741d19f28241f6af5b41fee"}}, +{"id":"confu","key":"confu","value":{"rev":"7-c46f82c4aa9a17db6530b00669461eaf"}}, +{"id":"confy","key":"confy","value":{"rev":"3-893b33743830a0318dc99b1788aa92ee"}}, +{"id":"connect","key":"connect","value":{"rev":"151-8b5617fc6ece6c125b5f628936159bd6"}}, +{"id":"connect-access-control","key":"connect-access-control","value":{"rev":"3-ccf5fb09533d41eb0b564eb1caecf910"}}, +{"id":"connect-airbrake","key":"connect-airbrake","value":{"rev":"5-19db5e5828977540814d09f9eb7f028f"}}, +{"id":"connect-analytics","key":"connect-analytics","value":{"rev":"3-6f71c8b08ed9f5762c1a4425c196fb2a"}}, +{"id":"connect-app-cache","key":"connect-app-cache","value":{"rev":"27-3e69452dfe51cc907f8b188aede1bda8"}}, +{"id":"connect-assetmanager","key":"connect-assetmanager","value":{"rev":"46-f2a8834d2749e0c069cee06244e7501c"}}, +{"id":"connect-assetmanager-handlers","key":"connect-assetmanager-handlers","value":{"rev":"38-8b93821fcf46f20bbad4319fb39302c1"}}, +{"id":"connect-assets","key":"connect-assets","value":{"rev":"33-7ec2940217e29a9514d20cfd49af10f5"}}, +{"id":"connect-auth","key":"connect-auth","value":{"rev":"36-5640e82f3e2773e44ce47b0687436305"}}, +{"id":"connect-cache","key":"connect-cache","value":{"rev":"11-efe1f0ab00c181b1a4dece446ef13a90"}}, +{"id":"connect-coffee","key":"connect-coffee","value":{"rev":"3-3d4ebcfe083c9e5a5d587090f1bb4d65"}}, +{"id":"connect-conneg","key":"connect-conneg","value":{"rev":"3-bc3e04e65cf1f5233a38cc846e9a4a75"}}, +{"id":"connect-cookie-session","key":"connect-cookie-session","value":{"rev":"3-f48ca73aa1ce1111a2c962d219b59c1a"}}, +{"id":"connect-cors","key":"connect-cors","value":{"rev":"10-5bc9e3759671a0157fdc307872d38844"}}, +{"id":"connect-couchdb","key":"connect-couchdb","value":{"rev":"9-9adb6d24c7fb6de58bafe6d06fb4a230"}}, +{"id":"connect-cradle","key":"connect-cradle","value":{"rev":"5-0e5e32e00a9b98eff1ab010173d26ffb"}}, +{"id":"connect-docco","key":"connect-docco","value":{"rev":"9-c8e379f9a89db53f8921895ac4e87ed6"}}, +{"id":"connect-dojo","key":"connect-dojo","value":{"rev":"17-f323c634536b9b948ad9607f4ca0847f"}}, +{"id":"connect-esi","key":"connect-esi","value":{"rev":"45-01de7506d405856586ea77cb14022192"}}, +{"id":"connect-facebook","key":"connect-facebook","value":{"rev":"3-bf77eb01c0476e607b25bc9d93416b7e"}}, +{"id":"connect-force-domain","key":"connect-force-domain","value":{"rev":"5-a65755f93aaea8a21c7ce7dd4734dca0"}}, +{"id":"connect-form","key":"connect-form","value":{"rev":"16-fa786af79f062a05ecdf3e7cf48317e2"}}, +{"id":"connect-geoip","key":"connect-geoip","value":{"rev":"3-d87f93bcac58aa7904886a8fb6c45899"}}, +{"id":"connect-googleapps","key":"connect-googleapps","value":{"rev":"13-49c5c6c6724b21eea9a8eaae2165978d"}}, +{"id":"connect-gzip","key":"connect-gzip","value":{"rev":"7-2e1d4bb887c1ddda278fc8465ee5645b"}}, +{"id":"connect-heroku-redis","key":"connect-heroku-redis","value":{"rev":"13-92da2be67451e5f55f6fbe3672c86dc4"}}, +{"id":"connect-i18n","key":"connect-i18n","value":{"rev":"8-09d47d7c220770fc80d1b6fd87ffcd07"}}, +{"id":"connect-identity","key":"connect-identity","value":{"rev":"8-8eb9e21bbf80045e0243720955d6070f"}}, +{"id":"connect-image-resizer","key":"connect-image-resizer","value":{"rev":"7-5f82563f87145f3cc06086afe3a14a62"}}, +{"id":"connect-index","key":"connect-index","value":{"rev":"3-8b8373334079eb26c8735b39483889a0"}}, +{"id":"connect-jsonp","key":"connect-jsonp","value":{"rev":"16-9e80af455e490710f06039d3c0025840"}}, +{"id":"connect-jsonrpc","key":"connect-jsonrpc","value":{"rev":"6-6556800f0bef6ae5eb10496d751048e7"}}, +{"id":"connect-kyoto","key":"connect-kyoto","value":{"rev":"5-8f6a9e9b24d1a71c786645402f509645"}}, +{"id":"connect-less","key":"connect-less","value":{"rev":"3-461ed9a80b462b978a81d5bcee6f3665"}}, +{"id":"connect-load-balance","key":"connect-load-balance","value":{"rev":"3-e74bff5fb47d1490c05a9cc4339af347"}}, +{"id":"connect-memcached","key":"connect-memcached","value":{"rev":"3-5fc92b7f9fb5bcfb364a27e6f052bcc7"}}, +{"id":"connect-mongo","key":"connect-mongo","value":{"rev":"13-c3869bc7337b2f1ee6b9b3364993f321"}}, +{"id":"connect-mongodb","key":"connect-mongodb","value":{"rev":"30-30cb932839ce16e4e496f5a33fdd720a"}}, +{"id":"connect-mongoose","key":"connect-mongoose","value":{"rev":"3-48a5b329e4cfa885442d43bbd1d0db46"}}, +{"id":"connect-mongoose-session","key":"connect-mongoose-session","value":{"rev":"3-6692b8e1225d5cd6a2daabd61cecb1cd"}}, +{"id":"connect-mysql-session","key":"connect-mysql-session","value":{"rev":"9-930abd0279ef7f447e75c95b3e71be12"}}, +{"id":"connect-no-www","key":"connect-no-www","value":{"rev":"3-33bed7417bc8a5e8efc74ce132c33158"}}, +{"id":"connect-notifo","key":"connect-notifo","value":{"rev":"3-4681f8c5a7dfd35aee9634e809c41804"}}, +{"id":"connect-parameter-router","key":"connect-parameter-router","value":{"rev":"3-f435f06d556c208d43ef05c64bcddceb"}}, +{"id":"connect-pg","key":"connect-pg","value":{"rev":"11-d84c53d8f1c24adfc266e7a031dddf0d"}}, +{"id":"connect-proxy","key":"connect-proxy","value":{"rev":"7-a691ff57a9affeab47c54d17dbe613cb"}}, +{"id":"connect-queryparser","key":"connect-queryparser","value":{"rev":"3-bb35a7f3f75297a63bf942a63b842698"}}, +{"id":"connect-redis","key":"connect-redis","value":{"rev":"40-4faa12962b14da49380de2bb183176f9"}}, +{"id":"connect-restreamer","key":"connect-restreamer","value":{"rev":"3-08e637ca685cc63b2b4f9722c763c105"}}, +{"id":"connect-riak","key":"connect-riak","value":{"rev":"5-3268c29a54e430a3f8adb33570afafdb"}}, +{"id":"connect-rpx","key":"connect-rpx","value":{"rev":"28-acc7bb4200c1d30f359151f0a715162c"}}, +{"id":"connect-security","key":"connect-security","value":{"rev":"16-fecd20f486a8ea4d557119af5b5a2960"}}, +{"id":"connect-select","key":"connect-select","value":{"rev":"5-5ca28ec800419e4cb3e97395a6b96153"}}, +{"id":"connect-session-mongo","key":"connect-session-mongo","value":{"rev":"9-9e6a26dfbb9c13a9d6f4060a1895730a"}}, +{"id":"connect-session-redis-store","key":"connect-session-redis-store","value":{"rev":"8-fecfed6e17476eaada5cfe7740d43893"}}, +{"id":"connect-sessionvoc","key":"connect-sessionvoc","value":{"rev":"13-57b6e6ea2158e3b7136054839662ea3d"}}, +{"id":"connect-spdy","key":"connect-spdy","value":{"rev":"11-f9eefd7303295d77d317cba78d299130"}}, +{"id":"connect-sts","key":"connect-sts","value":{"rev":"9-8e3fd563c04ce14b824fc4da42efb70e"}}, +{"id":"connect-timeout","key":"connect-timeout","value":{"rev":"4-6f5f8d97480c16c7acb05fe82400bbc7"}}, +{"id":"connect-unstable","key":"connect-unstable","value":{"rev":"3-1d3a4edc52f005d8cb4d557485095314"}}, +{"id":"connect-wormhole","key":"connect-wormhole","value":{"rev":"3-f33b15acc686bd9ad0c6df716529009f"}}, +{"id":"connect-xcors","key":"connect-xcors","value":{"rev":"7-f8e1cd6805a8779bbd6bb2c1000649fb"}}, +{"id":"connect_facebook","key":"connect_facebook","value":{"rev":"3-b3001d71f619836a009c53c816ce36ed"}}, +{"id":"connect_json","key":"connect_json","value":{"rev":"3-dd0df74291f80f45b4314d56192c19c5"}}, +{"id":"connectables","key":"connectables","value":{"rev":"3-f6e9f8f13883a523b4ea6035281f541b"}}, +{"id":"conseq","key":"conseq","value":{"rev":"3-890d340704322630e7a724333f394c70"}}, +{"id":"consistent-hashing","key":"consistent-hashing","value":{"rev":"3-fcef5d4479d926560cf1bc900f746f2a"}}, +{"id":"console","key":"console","value":{"rev":"3-1e0449b07c840eeac6b536e2552844f4"}}, +{"id":"console.log","key":"console.log","value":{"rev":"9-d608afe50e732ca453365befcb87bad5"}}, +{"id":"consolemark","key":"consolemark","value":{"rev":"13-320f003fc2c3cec909ab3e9c3bce9743"}}, +{"id":"construct","key":"construct","value":{"rev":"3-75bdc809ee0572172e6acff537af7d9b"}}, +{"id":"context","key":"context","value":{"rev":"3-86b1a6a0f77ef86d4d9ccfff47ceaf6a"}}, +{"id":"contextify","key":"contextify","value":{"rev":"9-547b8019ef66e0d1c84fe00be832e750"}}, +{"id":"contract","key":"contract","value":{"rev":"3-d09e775c2c1e297b6cbbfcd5efbae3c7"}}, +{"id":"contracts","key":"contracts","value":{"rev":"13-3fd75c77e688937734f51cf97f10dd7d"}}, +{"id":"control","key":"control","value":{"rev":"31-7abf0cb81d19761f3ff59917e56ecedf"}}, +{"id":"controljs","key":"controljs","value":{"rev":"3-a8e80f93e389ca07509fa7addd6cb805"}}, +{"id":"convert","key":"convert","value":{"rev":"3-6c962b92274bcbe82b82a30806559d47"}}, +{"id":"conway","key":"conway","value":{"rev":"5-93ce24976e7dd5ba02fe4addb2b44267"}}, +{"id":"cookie","key":"cookie","value":{"rev":"14-946d98bf46e940d13ca485148b1bd609"}}, +{"id":"cookie-sessions","key":"cookie-sessions","value":{"rev":"8-4b399ac8cc4baea15f6c5e7ac94399f0"}}, +{"id":"cookiejar","key":"cookiejar","value":{"rev":"20-220b41a4c2a8f2b7b14aafece7dcc1b5"}}, +{"id":"cookies","key":"cookies","value":{"rev":"15-b3b35c32a99ed79accc724685d131d18"}}, +{"id":"cool","key":"cool","value":{"rev":"3-007d1123eb2dc52cf845d625f7ccf198"}}, +{"id":"coolmonitor","key":"coolmonitor","value":{"rev":"3-69c3779c596527f63e49c5e507dff1e1"}}, +{"id":"coop","key":"coop","value":{"rev":"9-39dee3260858cf8c079f31bdf02cea1d"}}, +{"id":"coordinator","key":"coordinator","value":{"rev":"32-9d92f2033a041d5c40f8e1018d512755"}}, +{"id":"core-utils","key":"core-utils","value":{"rev":"9-98f2412938a67d83e53e76a26b5601e0"}}, +{"id":"cornify","key":"cornify","value":{"rev":"6-6913172d09c52f9e8dc0ea19ec49972c"}}, +{"id":"corpus","key":"corpus","value":{"rev":"3-a357e7779f8d4ec020b755c71dd1e57b"}}, +{"id":"corrector","key":"corrector","value":{"rev":"3-ef3cf99fc59a581aee3590bdb8615269"}}, +{"id":"cosmos","key":"cosmos","value":{"rev":"3-3eb292c59758fb5215f22739fa9531ce"}}, +{"id":"couch-ar","key":"couch-ar","value":{"rev":"25-f106d2965ab74b25b18328ca44ca4a02"}}, +{"id":"couch-cleaner","key":"couch-cleaner","value":{"rev":"15-74e61ef98a770d76be4c7e7571d18381"}}, +{"id":"couch-client","key":"couch-client","value":{"rev":"10-94945ebd3e17f509fcc71fb6c6ef5d35"}}, +{"id":"couch-session","key":"couch-session","value":{"rev":"4-c73dea41ceed26a2a0bde9a9c8ffffc4"}}, +{"id":"couch-sqlite","key":"couch-sqlite","value":{"rev":"3-3e420fe6623542475595aa7e55a4e4bd"}}, +{"id":"couch-stream","key":"couch-stream","value":{"rev":"5-911704fc984bc49acce1e10adefff7ff"}}, +{"id":"couchapp","key":"couchapp","value":{"rev":"16-ded0f4742bb3f5fd42ec8f9c6b21ae8e"}}, +{"id":"couchcmd","key":"couchcmd","value":{"rev":"3-651ea2b435e031481b5d3d968bd3d1eb"}}, +{"id":"couchdb","key":"couchdb","value":{"rev":"12-8abcfd649751226c10edf7cf0508a09f"}}, +{"id":"couchdb-api","key":"couchdb-api","value":{"rev":"23-f2c82f08f52f266df7ac2aa709615244"}}, +{"id":"couchdb-tmp","key":"couchdb-tmp","value":{"rev":"3-9a695fb4ba352f3be2d57c5995718520"}}, +{"id":"couchdev","key":"couchdev","value":{"rev":"3-50a0ca3ed0395dd72de62a1b96619e66"}}, +{"id":"couchlegs","key":"couchlegs","value":{"rev":"5-be78e7922ad4ff86dbe5c17a87fdf4f1"}}, +{"id":"couchtato","key":"couchtato","value":{"rev":"11-15a1ce8de9a8cf1e81d96de6afbb4f45"}}, +{"id":"couchy","key":"couchy","value":{"rev":"13-0a52b2712fb8447f213866612e3ccbf7"}}, +{"id":"courier","key":"courier","value":{"rev":"17-eb94fe01aeaad43805f4bce21d23bcba"}}, +{"id":"coverage","key":"coverage","value":{"rev":"10-a333448996d0b0d420168d1b5748db32"}}, +{"id":"coverage_testing","key":"coverage_testing","value":{"rev":"3-62834678206fae7911401aa86ec1a85e"}}, +{"id":"cqs","key":"cqs","value":{"rev":"6-0dad8b969c70abccc27a146a99399533"}}, +{"id":"crab","key":"crab","value":{"rev":"9-599fc7757f0c9efbe3889f30981ebe93"}}, +{"id":"cradle","key":"cradle","value":{"rev":"60-8fb414b66cb07b4bae59c0316d5c45b4"}}, +{"id":"cradle-fixed","key":"cradle-fixed","value":{"rev":"4-589afffa26fca22244ad2038abb77dc5"}}, +{"id":"cradle-init","key":"cradle-init","value":{"rev":"13-499d63592141f1e200616952bbdea015"}}, +{"id":"crawler","key":"crawler","value":{"rev":"5-ec4a8d77f90d86d17d6d14d631360188"}}, +{"id":"crc","key":"crc","value":{"rev":"3-25ab83f8b1333e6d4e4e5fb286682422"}}, +{"id":"creatary","key":"creatary","value":{"rev":"3-770ad84ecb2e2a3994637d419384740d"}}, +{"id":"createsend","key":"createsend","value":{"rev":"7-19885346e4d7a01ac2e9ad70ea0e822a"}}, +{"id":"creationix","key":"creationix","value":{"rev":"61-7ede1759afbd41e8b4dedc348b72202e"}}, +{"id":"creek","key":"creek","value":{"rev":"33-4f511aa4dd379e04bba7ac333744325e"}}, +{"id":"cron","key":"cron","value":{"rev":"12-8d794edb5f9b7cb6322acaef1c848043"}}, +{"id":"cron2","key":"cron2","value":{"rev":"13-bae2f1b02ffcbb0e77bde6c33b566f80"}}, +{"id":"crontab","key":"crontab","value":{"rev":"36-14d26bf316289fb4841940eee2932f37"}}, +{"id":"crossroads","key":"crossroads","value":{"rev":"7-d73d51cde30f24caad91e6a3c5b420f2"}}, +{"id":"crowdflower","key":"crowdflower","value":{"rev":"3-16c2dfc9fd505f75068f75bd19e3d227"}}, +{"id":"cruvee","key":"cruvee","value":{"rev":"3-979ccf0286b1701e9e7483a10451d975"}}, +{"id":"crypt","key":"crypt","value":{"rev":"3-031b338129bebc3749b42fb3d442fc4b"}}, +{"id":"crypto","key":"crypto","value":{"rev":"3-66a444b64481c85987dd3f22c32e0630"}}, +{"id":"csj","key":"csj","value":{"rev":"3-bc3133c7a0a8827e89aa03897b81d177"}}, +{"id":"cson","key":"cson","value":{"rev":"7-3ac3e1e10572e74e58874cfe3200eb87"}}, +{"id":"csrf-express","key":"csrf-express","value":{"rev":"3-4cc36d88e8ad10b9c2cc8a7318f0abd3"}}, +{"id":"css-crawler","key":"css-crawler","value":{"rev":"13-4739c7bf1decc72d7682b53303f93ec6"}}, +{"id":"css-smasher","key":"css-smasher","value":{"rev":"3-631128f966135c97d648efa3eadf7bfb"}}, +{"id":"css-sourcery","key":"css-sourcery","value":{"rev":"3-571343da3a09af7de473d29ed7dd788b"}}, +{"id":"css2json","key":"css2json","value":{"rev":"5-fb6d84c1da4a9391fa05d782860fe7c4"}}, +{"id":"csskeeper","key":"csskeeper","value":{"rev":"5-ea667a572832ea515b044d4b87ea7d98"}}, +{"id":"csslike","key":"csslike","value":{"rev":"3-6e957cce81f6e790f8562526d907ad94"}}, +{"id":"csslint","key":"csslint","value":{"rev":"19-b1e973274a0a6b8eb81b4d715a249612"}}, +{"id":"cssmin","key":"cssmin","value":{"rev":"10-4bb4280ec56f110c43abe01189f95818"}}, +{"id":"csso","key":"csso","value":{"rev":"17-ccfe2a72d377919b07973bbb1d19b8f2"}}, +{"id":"cssom","key":"cssom","value":{"rev":"3-f96b884b63b4c04bac18b8d9c0a4c4cb"}}, +{"id":"cssp","key":"cssp","value":{"rev":"5-abf69f9ff99b7d0bf2731a5b5da0897c"}}, +{"id":"cssunminifier","key":"cssunminifier","value":{"rev":"3-7bb0c27006af682af92d1969fcb4fa73"}}, +{"id":"cssutils","key":"cssutils","value":{"rev":"3-4759f9db3b8eac0964e36f5229260526"}}, +{"id":"csv","key":"csv","value":{"rev":"21-0420554e9c08e001063cfb0a69a48255"}}, +{"id":"csv2mongo","key":"csv2mongo","value":{"rev":"9-373f11c05e5d1744c3187d9aaeaae0ab"}}, +{"id":"csvutils","key":"csvutils","value":{"rev":"15-84aa82e56b49cd425a059c8f0735a23c"}}, +{"id":"ctrlflow","key":"ctrlflow","value":{"rev":"33-0b817baf6c744dc17b83d5d8ab1ba74e"}}, +{"id":"ctrlflow_tests","key":"ctrlflow_tests","value":{"rev":"3-d9ed35503d27b0736c59669eecb4c4fe"}}, +{"id":"ctype","key":"ctype","value":{"rev":"9-c5cc231475f23a01682d0b1a3b6e49c2"}}, +{"id":"cube","key":"cube","value":{"rev":"5-40320a20d260e082f5c4ca508659b4d1"}}, +{"id":"cucumber","key":"cucumber","value":{"rev":"11-8489af0361b6981cf9001a0403815936"}}, +{"id":"cucumis","key":"cucumis","value":{"rev":"33-6dc38f1161fae3efa2a89c8288b6e040"}}, +{"id":"cucumis-rm","key":"cucumis-rm","value":{"rev":"3-6179249ad15166f8d77eb136b3fa87ca"}}, +{"id":"cupcake","key":"cupcake","value":{"rev":"15-1dd13a85415a366942e7f0a3de06aa2a"}}, +{"id":"curator","key":"curator","value":{"rev":"19-d798ab7fbca11ba0e9c6c40c0a2f9440"}}, +{"id":"curl","key":"curl","value":{"rev":"11-ac7143ac07c64ea169ba7d4e58be232a"}}, +{"id":"curly","key":"curly","value":{"rev":"30-0248a5563b6e96457315ad0cc2fe22c1"}}, +{"id":"curry","key":"curry","value":{"rev":"11-ce13fa80e84eb25d9cf76cf4162a634e"}}, +{"id":"cursory","key":"cursory","value":{"rev":"3-ea2f4b1b47caf38460402d1a565c18b8"}}, +{"id":"d-utils","key":"d-utils","value":{"rev":"37-699ad471caa28183d75c06f0f2aab41c"}}, +{"id":"d3","key":"d3","value":{"rev":"5-4d867844bd7dce21b34cd7283bb9cad4"}}, +{"id":"d3bench","key":"d3bench","value":{"rev":"3-617cc625bfd91c175d037bfcace9c4e9"}}, +{"id":"daemon","key":"daemon","value":{"rev":"11-8654f90bc609ca2c3ec260c7d6b7793e"}}, +{"id":"daemon-tools","key":"daemon-tools","value":{"rev":"18-8197fce2054de67925e6f2c3fa3cd90a"}}, +{"id":"daimyo","key":"daimyo","value":{"rev":"25-531b0b0afdc5ae3d41b4131da40af6cf"}}, +{"id":"daleth","key":"daleth","value":{"rev":"7-4824619205289ba237ef2a4dc1fba1ec"}}, +{"id":"dali","key":"dali","value":{"rev":"9-037c4c76f739ecb537a064c07d3c63e3"}}, +{"id":"damncomma","key":"damncomma","value":{"rev":"3-b1472eada01efb8a12d521e5a248834b"}}, +{"id":"dana","key":"dana","value":{"rev":"3-2a3c0ff58a6d13fedd17e1d192080e59"}}, +{"id":"dandy","key":"dandy","value":{"rev":"9-f4ae43659dd812a010b0333bf8e5a282"}}, +{"id":"dash","key":"dash","value":{"rev":"5-698513f86165f429a5f55320d5a700f0"}}, +{"id":"dash-fu","key":"dash-fu","value":{"rev":"3-848e99a544f9f78f311c7ebfc5a172c4"}}, +{"id":"dashboard","key":"dashboard","value":{"rev":"3-71844d1fc1140b7533f9e57740d2b666"}}, +{"id":"data","key":"data","value":{"rev":"23-b594e2bd1ffef1cda8b7e94dbf15ad5b"}}, +{"id":"data-layer","key":"data-layer","value":{"rev":"9-9205d35cc6eaf1067ee0cec1b421d749"}}, +{"id":"data-page","key":"data-page","value":{"rev":"3-d7a3346a788a0c07132e50585db11c99"}}, +{"id":"data-section","key":"data-section","value":{"rev":"9-d3fff313977667c53cbadb134d993412"}}, +{"id":"data-uuid","key":"data-uuid","value":{"rev":"8-24001fe9f37c4cc7ac01079ee4767363"}}, +{"id":"data-visitor","key":"data-visitor","value":{"rev":"6-7fe5da9d118fab27157dba97050c6487"}}, +{"id":"database-cleaner","key":"database-cleaner","value":{"rev":"19-4bdfc8b324e95e6da9f72e7b7b708b98"}}, +{"id":"datapool","key":"datapool","value":{"rev":"3-f99c93ca812d2f4725bbaea99122832c"}}, +{"id":"datasift","key":"datasift","value":{"rev":"3-6de3ae25c9a99f651101e191595bcf64"}}, +{"id":"date","key":"date","value":{"rev":"9-b334fc6450d093de40a664a4a835cfc4"}}, +{"id":"date-utils","key":"date-utils","value":{"rev":"31-7be8fcf1919564a8fb7223a86a5954ac"}}, +{"id":"dateformat","key":"dateformat","value":{"rev":"11-5b924e1d29056a0ef9b89b9d7984d5c4"}}, +{"id":"dateformatjs","key":"dateformatjs","value":{"rev":"3-4c50a38ecc493535ee2570a838673937"}}, +{"id":"datejs","key":"datejs","value":{"rev":"5-f47e3e6532817f822aa910b59a45717c"}}, +{"id":"dateselect","key":"dateselect","value":{"rev":"3-ce58def02fd8c8feda8c6f2004726f97"}}, +{"id":"datetime","key":"datetime","value":{"rev":"7-14227b0677eb93b8eb519db47f46bf36"}}, +{"id":"db","key":"db","value":{"rev":"3-636e9ea922a85c92bc11aa9691a2e67f"}}, +{"id":"db-drizzle","key":"db-drizzle","value":{"rev":"157-955f74f49ac4236df317e227c08afaa3"}}, +{"id":"db-mysql","key":"db-mysql","value":{"rev":"224-e596a18d9af33ff1fbcf085a9f4f56fd"}}, +{"id":"db-oracle","key":"db-oracle","value":{"rev":"13-a1e2924d87b4badfddeccf6581525b08"}}, +{"id":"dcrypt","key":"dcrypt","value":{"rev":"29-a144a609bef5004781df901440d67b2d"}}, +{"id":"decafscript","key":"decafscript","value":{"rev":"3-f3a239dc7d503c900fc9854603d716e6"}}, +{"id":"decimal","key":"decimal","value":{"rev":"3-614ed56d4d6c5eb7883d8fd215705a12"}}, +{"id":"decimaljson","key":"decimaljson","value":{"rev":"9-7cb23f4b2b1168b1a213f1eefc85fa51"}}, +{"id":"deck","key":"deck","value":{"rev":"7-da422df97f13c7d84e8f3690c1e1ca32"}}, +{"id":"deckard","key":"deckard","value":{"rev":"3-85e0cd76cdd88ff60a617239060d6f46"}}, +{"id":"deckem","key":"deckem","value":{"rev":"9-03ca75ea35960ccd5779b4cfa8cfb9f9"}}, +{"id":"defensio","key":"defensio","value":{"rev":"5-0ad0ae70b4e184626d914cc4005ee34c"}}, +{"id":"defer","key":"defer","value":{"rev":"3-8d003c96f4263a26b7955e251cddbd95"}}, +{"id":"deferrable","key":"deferrable","value":{"rev":"8-3ae57ce4391105962d09ad619d4c4670"}}, +{"id":"deferred","key":"deferred","value":{"rev":"17-9cee7948dbdf7b6dcc00bbdc60041dd0"}}, +{"id":"define","key":"define","value":{"rev":"45-9d422f2ac5ab693f881df85898d68e3a"}}, +{"id":"deflate","key":"deflate","value":{"rev":"10-3ebe2b87e09f4ae51857cae02e1af788"}}, +{"id":"degrees","key":"degrees","value":{"rev":"5-707c57cfa3e589e8059fe9860cc0c10b"}}, +{"id":"deimos","key":"deimos","value":{"rev":"11-6481696be774d14254fe7c427107dc2a"}}, +{"id":"deja","key":"deja","value":{"rev":"47-bde4457402db895aad46198433842668"}}, +{"id":"delayed-stream","key":"delayed-stream","value":{"rev":"13-f6ca393b08582350f78c5c66f183489b"}}, +{"id":"delegator","key":"delegator","value":{"rev":"3-650651749c1df44ef544c919fae74f82"}}, +{"id":"dep-graph","key":"dep-graph","value":{"rev":"3-e404af87822756da52754e2cc5c576b1"}}, +{"id":"dependency-promise","key":"dependency-promise","value":{"rev":"11-1cc2be8465d736ec8f3cc8940ab22823"}}, +{"id":"depends","key":"depends","value":{"rev":"30-adc9604bbd8117592f82eee923d8703e"}}, +{"id":"deploy","key":"deploy","value":{"rev":"3-82020957528bd0bdd675bed9ac4e4cc5"}}, +{"id":"deployjs","key":"deployjs","value":{"rev":"5-a3e99a5ed81d4b1ad44b6477e6a5a985"}}, +{"id":"deputy-client","key":"deputy-client","value":{"rev":"3-31fd224b301ec0f073df7afa790050ec"}}, +{"id":"deputy-server","key":"deputy-server","value":{"rev":"3-0d790cce82aadfd2b8f39a6b056f2792"}}, +{"id":"derby","key":"derby","value":{"rev":"40-b642048a1a639d77ab139160a4da0fd2"}}, +{"id":"des","key":"des","value":{"rev":"24-fcbdc086e657aef356b75433b3e65ab6"}}, +{"id":"descent","key":"descent","value":{"rev":"7-9cc259b25fc688597fc7efaa516d03c6"}}, +{"id":"describe","key":"describe","value":{"rev":"6-788c7f2feaf2e88f4b1179976b273744"}}, +{"id":"deserver","key":"deserver","value":{"rev":"5-da8083694e89b8434123fe7482a3cc7e"}}, +{"id":"detect","key":"detect","value":{"rev":"3-c27f258d39d7905c2b92383809bb5988"}}, +{"id":"detective","key":"detective","value":{"rev":"9-d6cfa0c6389783cdc9c9ffa9e4082c64"}}, +{"id":"dev","key":"dev","value":{"rev":"23-5c2ce4a4f6a4f24d3cff3b7db997d8bc"}}, +{"id":"dev-warnings","key":"dev-warnings","value":{"rev":"5-5a7d7f36d09893df96441be8b09e41d6"}}, +{"id":"dhcpjs","key":"dhcpjs","value":{"rev":"3-1bc01bd612f3ab1fce178c979aa34e43"}}, +{"id":"dht","key":"dht","value":{"rev":"3-40c0b909b6c0e2305e19d10cea1881b0"}}, +{"id":"dht-bencode","key":"dht-bencode","value":{"rev":"5-88a1da8de312a54097507d72a049f0f3"}}, +{"id":"dialect","key":"dialect","value":{"rev":"18-db7928ce4756eea35db1732d4f2ebc88"}}, +{"id":"dialect-http","key":"dialect-http","value":{"rev":"19-23a927d28cb43733dbd05294134a5b8c"}}, +{"id":"dicks","key":"dicks","value":{"rev":"11-ba64897899e336d366ffd4b68cac99f5"}}, +{"id":"diff","key":"diff","value":{"rev":"13-1a88acb0369ab8ae096a2323d65a2811"}}, +{"id":"diff_match_patch","key":"diff_match_patch","value":{"rev":"8-2f6f467e483b23b217a2047e4aded850"}}, +{"id":"diffbot","key":"diffbot","value":{"rev":"3-8cb8e34af89cb477a5da52e3fd9a13f7"}}, +{"id":"digest","key":"digest","value":{"rev":"7-bc6fb9e68c83197381b0d9ac7db16c1c"}}, +{"id":"dir","key":"dir","value":{"rev":"7-574462bb241a39eeffe6c5184d40c57a"}}, +{"id":"dir-watcher","key":"dir-watcher","value":{"rev":"31-1a3ca4d6aa8aa32c619efad5fbfce494"}}, +{"id":"dir2html","key":"dir2html","value":{"rev":"5-b4bfb2916c2d94c85aa75ffa29ad1af4"}}, +{"id":"directive","key":"directive","value":{"rev":"3-3373f02b8762cb1505c8f8cbcc50d3d4"}}, +{"id":"dirsum","key":"dirsum","value":{"rev":"5-8545445faaa41d2225ec7ff226a10750"}}, +{"id":"dirty","key":"dirty","value":{"rev":"13-d636ea0d1ed35560c0bc7272965c1a6f"}}, +{"id":"dirty-uuid","key":"dirty-uuid","value":{"rev":"5-65acdfda886afca65ae52f0ac21ce1b2"}}, +{"id":"discogs","key":"discogs","value":{"rev":"21-839410e6bf3bee1435ff837daaeaf9f8"}}, +{"id":"discount","key":"discount","value":{"rev":"13-a8fb2a8f668ac0a55fffada1ea94a4b7"}}, +{"id":"discovery","key":"discovery","value":{"rev":"3-46f4496224d132e56cbc702df403219d"}}, +{"id":"diskcache","key":"diskcache","value":{"rev":"23-7b14ad41fc199184fb939828e9122099"}}, +{"id":"dispatch","key":"dispatch","value":{"rev":"6-e72cc7b2bcc97faf897ae4e4fa3ec681"}}, +{"id":"distribute.it","key":"distribute.it","value":{"rev":"12-0978757eb25d22117af675806cf6eef2"}}, +{"id":"dive","key":"dive","value":{"rev":"21-9cbd1281c5a3c2dae0cc0407863f3336"}}, +{"id":"diveSync","key":"diveSync","value":{"rev":"3-015ec4803903106bf24cb4f17cedee68"}}, +{"id":"dk-assets","key":"dk-assets","value":{"rev":"3-25d9b6ac727caf1e227e6436af835d03"}}, +{"id":"dk-core","key":"dk-core","value":{"rev":"3-0b6a2f4dfc0484a3908159a897920bae"}}, +{"id":"dk-couchdb","key":"dk-couchdb","value":{"rev":"3-cc9ef511f9ed46be9d7099f10b1ee776"}}, +{"id":"dk-model","key":"dk-model","value":{"rev":"3-3a61006be57d304724c049e4dcf2fc9b"}}, +{"id":"dk-model-couchdb","key":"dk-model-couchdb","value":{"rev":"3-5163def21660db8428e623909bbfcb4d"}}, +{"id":"dk-routes","key":"dk-routes","value":{"rev":"3-4563357f850248d7d0fb37f9bdcb893b"}}, +{"id":"dk-server","key":"dk-server","value":{"rev":"3-9aef13fc5814785c9805b26828e8d114"}}, +{"id":"dk-template","key":"dk-template","value":{"rev":"3-809c94776252441129705fbe1d93e752"}}, +{"id":"dk-transport","key":"dk-transport","value":{"rev":"3-9271da6f86079027535179b743d0d4c3"}}, +{"id":"dk-websockets","key":"dk-websockets","value":{"rev":"3-426b44c04180d6caf7cf765f03fc52c2"}}, +{"id":"dnet-index-proxy","key":"dnet-index-proxy","value":{"rev":"51-1f3cf4f534c154369d5e774a8f599106"}}, +{"id":"dnode","key":"dnode","value":{"rev":"129-68db10c25c23d635dc828aa698d1279e"}}, +{"id":"dnode-ez","key":"dnode-ez","value":{"rev":"17-75877eab5cf3976b8876c49afd2f7e38"}}, +{"id":"dnode-protocol","key":"dnode-protocol","value":{"rev":"23-fb28f8e1180e6aa44fa564e0d55b3d1e"}}, +{"id":"dnode-smoothiecharts","key":"dnode-smoothiecharts","value":{"rev":"3-d1483028e5768527c2786b9ed5d76463"}}, +{"id":"dnode-stack","key":"dnode-stack","value":{"rev":"9-c1ad8ce01282ce4fa72b5993c580e58e"}}, +{"id":"dnode-worker","key":"dnode-worker","value":{"rev":"3-4c73c0d7ed225197fd8fb0555eaf1152"}}, +{"id":"dns-server","key":"dns-server","value":{"rev":"3-4858a1773da514fea68eac6d9d39f69e"}}, +{"id":"dns-srv","key":"dns-srv","value":{"rev":"12-867c769437fa0ad8a83306aa9e2a158e"}}, +{"id":"doc","key":"doc","value":{"rev":"5-2c077b3fd3b6efa4e927b66f1390e4ea"}}, +{"id":"doc.md","key":"doc.md","value":{"rev":"7-8e8e51be4956550388699222b2e039e7"}}, +{"id":"docco","key":"docco","value":{"rev":"18-891bde1584809c3b1f40fef9961b4f28"}}, +{"id":"docdown","key":"docdown","value":{"rev":"5-fcf5be2ab6ceaed76c1980b462359057"}}, +{"id":"docket","key":"docket","value":{"rev":"13-a4969e0fb17af8dba7df178e364161c2"}}, +{"id":"docpad","key":"docpad","value":{"rev":"77-a478ac8c7ac86e304f9213380ea4b550"}}, +{"id":"docs","key":"docs","value":{"rev":"3-6b1fae9738a3327a3a3be826c0981c3a"}}, +{"id":"dojo-node","key":"dojo-node","value":{"rev":"13-e0dc12e9ce8ab3f40b228c2af8c41064"}}, +{"id":"dom","key":"dom","value":{"rev":"3-cecd9285d0d5b1cab0f18350aac1b2b0"}}, +{"id":"dom-js","key":"dom-js","value":{"rev":"8-dd20e8b23028f4541668501650b52a71"}}, +{"id":"dom-js-ns","key":"dom-js-ns","value":{"rev":"3-787567fc1d6f4ca7e853215a4307b593"}}, +{"id":"domjs","key":"domjs","value":{"rev":"3-d2d05a20dccb57fb6db7da08916c6c0f"}}, +{"id":"doml","key":"doml","value":{"rev":"11-c3b49c50906d9875b546413e4acd1b38"}}, +{"id":"domo","key":"domo","value":{"rev":"3-a4321e6c0c688f773068365b44b08b6b"}}, +{"id":"domready","key":"domready","value":{"rev":"46-21c6b137bbed79ddbff31fdf0ef7d61f"}}, +{"id":"donkey","key":"donkey","value":{"rev":"3-1454aa878654886e8495ebb060aa10f7"}}, +{"id":"dot","key":"dot","value":{"rev":"19-b6d2d53cb9ae1a608a0956aeb8092578"}}, +{"id":"dotaccess","key":"dotaccess","value":{"rev":"13-63ddef6740e84f4517f7dd1bb0d68c56"}}, +{"id":"douche","key":"douche","value":{"rev":"3-6a200f908ccfc9ae549e80209e117cbf"}}, +{"id":"dox","key":"dox","value":{"rev":"10-856cc6bf3dc7c44e028173fea8323c24"}}, +{"id":"drag","key":"drag","value":{"rev":"9-00f27e241269c3df1d71e45b698e9b3b"}}, +{"id":"drain","key":"drain","value":{"rev":"3-8827a0ee7ed74b948bf56d5a33455fc8"}}, +{"id":"drawback","key":"drawback","value":{"rev":"74-dd356b3e55175525317e53c24979a431"}}, +{"id":"drev","key":"drev","value":{"rev":"9-43529419a69529dd7af9a83985aab1f2"}}, +{"id":"drews-mixins","key":"drews-mixins","value":{"rev":"17-63373bae6525859bddfc8d6ad19bdb06"}}, +{"id":"drnu","key":"drnu","value":{"rev":"3-b9b14b2241ded1e52a92fc4225b4ddc5"}}, +{"id":"dropbox","key":"dropbox","value":{"rev":"19-2cb7a40d253621fdfa96f23b96e42ecb"}}, +{"id":"drtoms-nodehelpers","key":"drtoms-nodehelpers","value":{"rev":"3-be0a75cdd7c2d49b1ec4ad1d2c3bc911"}}, +{"id":"drty","key":"drty","value":{"rev":"3-56eabd39b9badfa0af601c5cc64cee2c"}}, +{"id":"drty-facebook","key":"drty-facebook","value":{"rev":"3-fd07af7fb87d7f1d35e13f458a02c127"}}, +{"id":"drumkit","key":"drumkit","value":{"rev":"3-f3cdacef51453d3ac630759aff2a8b58"}}, +{"id":"drupal","key":"drupal","value":{"rev":"13-13835b1e1c8a0e8f0b0e8479640a8d7e"}}, +{"id":"dryice","key":"dryice","value":{"rev":"15-9990fdbde5475a8dbdcc055cb08d654d"}}, +{"id":"dryml","key":"dryml","value":{"rev":"33-483ff8cc3ab1431790cc2587c0bce989"}}, +{"id":"ds","key":"ds","value":{"rev":"9-743274a1d0143927851af07ff0f86d8d"}}, +{"id":"dt","key":"dt","value":{"rev":"3-ab59016f28e182c763b78ba49a59191c"}}, +{"id":"dtl","key":"dtl","value":{"rev":"11-415b4aeec93f096523569615e80f1be1"}}, +{"id":"dtrace-provider","key":"dtrace-provider","value":{"rev":"12-7f01510bd2b1d543f11e3dc02d98ab69"}}, +{"id":"dtrejo","key":"dtrejo","value":{"rev":"3-85f5bb2b9faec499e6aa77fe22e6e3ec"}}, +{"id":"dude","key":"dude","value":{"rev":"3-006528c1efd98312991273ba6ee45f7b"}}, +{"id":"dunce","key":"dunce","value":{"rev":"3-fa4fa5cafdfd1d86c650746f60b7bc0e"}}, +{"id":"duostack","key":"duostack","value":{"rev":"15-47824bdf6e32f49f64014e75421dc42e"}}, +{"id":"duplex-stream","key":"duplex-stream","value":{"rev":"3-2d0e12876e7ad4e5d3ea5520dcbad861"}}, +{"id":"durilka","key":"durilka","value":{"rev":"15-54400496515c8625e8bedf19f8a41cad"}}, +{"id":"dust","key":"dust","value":{"rev":"18-9bc9cae2e48c54f4389e9fce5dfc021e"}}, +{"id":"dustfs","key":"dustfs","value":{"rev":"5-944770c24f06989f3fc62427f2ddebc4"}}, +{"id":"dx","key":"dx","value":{"rev":"3-6000afd60be07d9ff91e7231a388f22f"}}, +{"id":"dynamic","key":"dynamic","value":{"rev":"3-33b83464ed56eb33c052a13dfb709c9c"}}, +{"id":"dynobj","key":"dynobj","value":{"rev":"5-3eb168dae1f9c20369fa1d5ae45f9021"}}, +{"id":"each","key":"each","value":{"rev":"3-5063799b0afcbb61378b1d605660a864"}}, +{"id":"ears","key":"ears","value":{"rev":"11-e77cd2b865409be7ba2e072e98b1c8a1"}}, +{"id":"easey","key":"easey","value":{"rev":"3-a380d8d945e03f55732ae8769cd6dbbf"}}, +{"id":"easy","key":"easy","value":{"rev":"3-73b836a34beafa31cdd8129fe158bf6e"}}, +{"id":"easy-oauth","key":"easy-oauth","value":{"rev":"5-2c1db698e61d77f99633042113099528"}}, +{"id":"easyfs","key":"easyfs","value":{"rev":"3-b807671a77c2a8cc27a9f1aa20ff74c0"}}, +{"id":"easyhash","key":"easyhash","value":{"rev":"3-2eeb24098bc4d201766dcc92dc7325f7"}}, +{"id":"easyrss","key":"easyrss","value":{"rev":"9-1687a54348670ef9ca387ea7ec87f0be"}}, +{"id":"ebnf-diagram","key":"ebnf-diagram","value":{"rev":"3-704e4605bf933b281a6821259a531055"}}, +{"id":"ec2","key":"ec2","value":{"rev":"22-25e562ae8898807c7b4c696c809cf387"}}, +{"id":"echo","key":"echo","value":{"rev":"19-75c2421f623ecc9fe2771f3658589ce8"}}, +{"id":"eco","key":"eco","value":{"rev":"14-b4db836928c91cbf22628cc65ca94f56"}}, +{"id":"ed","key":"ed","value":{"rev":"3-bed9b8225e83a02241d48254077a7df4"}}, +{"id":"edate","key":"edate","value":{"rev":"3-5ec1441ffe3b56d5d01561003b9844f2"}}, +{"id":"eden","key":"eden","value":{"rev":"35-9aa2ff880c2d4f45e3da881b15e58d0a"}}, +{"id":"eio","key":"eio","value":{"rev":"5-e6dd895635596d826ccdf4439761d5fa"}}, +{"id":"ejs","key":"ejs","value":{"rev":"30-c7b020b6cb8ee2626f47db21fc5fedb4"}}, +{"id":"ejs-ext","key":"ejs-ext","value":{"rev":"15-820393685191bbed37938acb7af5885e"}}, +{"id":"elastical","key":"elastical","value":{"rev":"3-c652af043bc4256a29a87e3de9b78093"}}, +{"id":"elasticsearchclient","key":"elasticsearchclient","value":{"rev":"33-bcb59deb7d9d56737a6946c56830ae6b"}}, +{"id":"elastiseahclient","key":"elastiseahclient","value":{"rev":"3-c4e525605859e249f04fb07d31739002"}}, +{"id":"elementtree","key":"elementtree","value":{"rev":"3-ef2017fe67ae425253de911c2f219d31"}}, +{"id":"elf-logger","key":"elf-logger","value":{"rev":"6-98d61588cfc171611568cf86004aa2e1"}}, +{"id":"elk","key":"elk","value":{"rev":"25-8b92241d0218c6593a7dc8a8cc69b7ce"}}, +{"id":"elucidata-build-tools","key":"elucidata-build-tools","value":{"rev":"7-0ad3de708aaac2eebfcfce273bfe6edf"}}, +{"id":"email","key":"email","value":{"rev":"16-110ae6a99ab3e37f4edd9357c03d78c2"}}, +{"id":"email-verificationtoken","key":"email-verificationtoken","value":{"rev":"7-ef37672bc6e9ee806ecc22fd5257ae03"}}, +{"id":"emailjs","key":"emailjs","value":{"rev":"31-0dd24f9aba8d96e9493e55e8345f3d21"}}, +{"id":"embedly","key":"embedly","value":{"rev":"21-47838d8015e9b927c56a7bd52c52e4fc"}}, +{"id":"emile","key":"emile","value":{"rev":"11-05d4715964b5bf2e1fd98096cb7ccc83"}}, +{"id":"emit.io","key":"emit.io","value":{"rev":"3-faacb1c30bb92c06a55a44bb027a9475"}}, +{"id":"emre","key":"emre","value":{"rev":"3-5686f4782f1f5171fff83b662ce68802"}}, +{"id":"encrypt","key":"encrypt","value":{"rev":"3-77e2e2007b452f7fcdfa9e8696a188f5"}}, +{"id":"ender","key":"ender","value":{"rev":"95-89b8c6ccfcaf3eb56f5dbe48bf3c2e24"}}, +{"id":"ender-dragdealer","key":"ender-dragdealer","value":{"rev":"9-e12bb3492614f20fe5781f20e3bb17dc"}}, +{"id":"ender-fermata","key":"ender-fermata","value":{"rev":"3-e52d772042852408ae070b361c247068"}}, +{"id":"ender-fittext","key":"ender-fittext","value":{"rev":"5-e46f5a384d790ea6f65a5f8b9e43bac6"}}, +{"id":"ender-flowplayer","key":"ender-flowplayer","value":{"rev":"3-87267072fb566112315254fdf6547500"}}, +{"id":"ender-js","key":"ender-js","value":{"rev":"80-aa18576f782e3aa14c2ba7ba05658a30"}}, +{"id":"ender-json","key":"ender-json","value":{"rev":"3-5606608389aef832e4d4ecaa6c088a94"}}, +{"id":"ender-lettering","key":"ender-lettering","value":{"rev":"3-6fc6ad3869fad6374a1de69ba4e9301d"}}, +{"id":"ender-modules","key":"ender-modules","value":{"rev":"5-2bbb354d6219b5e13e6c897c562b8c83"}}, +{"id":"ender-poke","key":"ender-poke","value":{"rev":"5-3afa2fd690ebc4f2d75125b2c57e2a43"}}, +{"id":"ender-test","key":"ender-test","value":{"rev":"5-f8e90a951e5ad58199e53645067fad0c"}}, +{"id":"ender-tipsy","key":"ender-tipsy","value":{"rev":"5-cefd04c5d89707dfe31023702328d417"}}, +{"id":"ender-tween","key":"ender-tween","value":{"rev":"13-035312bb47bb3d29e7157932d4d29dcb"}}, +{"id":"ender-vows","key":"ender-vows","value":{"rev":"5-d48e088816d71779a80a74c43cd61b80"}}, +{"id":"ender-wallet","key":"ender-wallet","value":{"rev":"21-93723cd24fbf14d0f58f2ee41df9910d"}}, +{"id":"endtable","key":"endtable","value":{"rev":"36-8febf1be0120d867f9ff90e5c5058ef9"}}, +{"id":"enhance-css","key":"enhance-css","value":{"rev":"7-ae1cf6dee7d3116103781edaa7d47ba4"}}, +{"id":"ensure","key":"ensure","value":{"rev":"27-47e0874d1823188965a02a41abb61739"}}, +{"id":"ent","key":"ent","value":{"rev":"9-51924cd76fabcc4a244db66d65d48eff"}}, +{"id":"entropy","key":"entropy","value":{"rev":"17-84bfbbc0689b3b55e4fa3881888f0c12"}}, +{"id":"enumerable","key":"enumerable","value":{"rev":"3-d31bfcaca3b53eacc9ce09983efffe35"}}, +{"id":"envious","key":"envious","value":{"rev":"3-08d1e6d9c25c4e2350a0dd6759a27426"}}, +{"id":"environ","key":"environ","value":{"rev":"5-6f78def4743dfbeb77c1cb62d41eb671"}}, +{"id":"epub","key":"epub","value":{"rev":"3-5c3604eab851bce0a6ac66db6a6ce77a"}}, +{"id":"erlang","key":"erlang","value":{"rev":"3-3bd8e8e8ed416a32567475d984028b65"}}, +{"id":"err","key":"err","value":{"rev":"11-61d11f26b47d29ef819136214830f24c"}}, +{"id":"errbacker","key":"errbacker","value":{"rev":"5-0ad6d62207abb9822118ae69d0b9181d"}}, +{"id":"es5","key":"es5","value":{"rev":"3-5497cb0c821f3e17234c09ab0e67e1de"}}, +{"id":"es5-basic","key":"es5-basic","value":{"rev":"9-2ff708ae54ae223923cb810f799bfb2d"}}, +{"id":"es5-ext","key":"es5-ext","value":{"rev":"21-04537d704412a631596beeba4d534b33"}}, +{"id":"es5-shim","key":"es5-shim","value":{"rev":"34-3c4c40a6dab9ff137d1a7d4349d72c5b"}}, +{"id":"es5-shimify","key":"es5-shimify","value":{"rev":"3-f85700407e9c129d22b45c15700c82f1"}}, +{"id":"esc","key":"esc","value":{"rev":"5-42911775f391330f361105b8a0cefe47"}}, +{"id":"escaperoute","key":"escaperoute","value":{"rev":"18-e1372f35e6dcdb353b8c11e3c7e2f3b4"}}, +{"id":"escort","key":"escort","value":{"rev":"27-bf43341e15d565c9f67dd3300dc57734"}}, +{"id":"escrito","key":"escrito","value":{"rev":"5-c39d5b373486327b2e13670f921a2c7b"}}, +{"id":"esl","key":"esl","value":{"rev":"9-562ff6239a3b9910989bdf04746fa9d1"}}, +{"id":"espresso","key":"espresso","value":{"rev":"75-4c3692f1e92ea841e2d04338f4f2432e"}}, +{"id":"esproxy","key":"esproxy","value":{"rev":"7-be629dc6e1428f0fdb22fdbe7ab2ee99"}}, +{"id":"etch-a-sketch","key":"etch-a-sketch","value":{"rev":"3-a4e23b8e9f298d4844d6bff0a9688e53"}}, +{"id":"etherpad-lite-client","key":"etherpad-lite-client","value":{"rev":"55-58ca439a697db64ee66652da2d327fcb"}}, +{"id":"etsy","key":"etsy","value":{"rev":"5-1b795b360c28261f11c07d849637047c"}}, +{"id":"eve","key":"eve","value":{"rev":"3-16e72b336a1f354f4dfc8fa783fa2e72"}}, +{"id":"event-emitter","key":"event-emitter","value":{"rev":"5-15fe3e2e19b206929b815909737b15ac"}}, +{"id":"event-queue","key":"event-queue","value":{"rev":"12-200cd3bcd8e0b35bc4b15c1d8b6161e2"}}, +{"id":"event-stream","key":"event-stream","value":{"rev":"15-811a6329b5820d998731a604accf83db"}}, +{"id":"eventable","key":"eventable","value":{"rev":"3-08e9cd94a9aae280f406d043039e545e"}}, +{"id":"eventbrite","key":"eventbrite","value":{"rev":"13-cac3c9bda2da1c7b115de04264bb440f"}}, +{"id":"evented","key":"evented","value":{"rev":"6-ade6271c40a19aab6c4e3bb18b0987b6"}}, +{"id":"evented-twitter","key":"evented-twitter","value":{"rev":"6-3ebb7327022d6d6a8c49d684febb236b"}}, +{"id":"eventedsocket","key":"eventedsocket","value":{"rev":"59-cd2158c47b676a58ca3064a42c5274f7"}}, +{"id":"eventemitter","key":"eventemitter","value":{"rev":"5-7766fd7ebc44d52efbd0e7088e2321ec"}}, +{"id":"eventemitter2","key":"eventemitter2","value":{"rev":"41-927ce7996d4056a21f543e1f928f9699"}}, +{"id":"eventful","key":"eventful","value":{"rev":"7-9505f3c621f50addf02a457cfcc8ae78"}}, +{"id":"eventhub","key":"eventhub","value":{"rev":"15-5390d210a4d3ba079dd6e26bda652caa"}}, +{"id":"eventpipe","key":"eventpipe","value":{"rev":"7-41f0f93a9dcea477f08782af28e5b0f1"}}, +{"id":"events","key":"events","value":{"rev":"12-e3ead8eac62799cb299c139687135289"}}, +{"id":"events.io","key":"events.io","value":{"rev":"3-56c6955024cbb1765a1f9f37d8a739a4"}}, +{"id":"events.node","key":"events.node","value":{"rev":"3-e072f9c457fd8a3882ccd41ce52c5d00"}}, +{"id":"eventstream","key":"eventstream","value":{"rev":"5-a578a3a2a62d50631b3fb4d44a058bd1"}}, +{"id":"eventvat","key":"eventvat","value":{"rev":"3-e26d7fe8a226c7bc7f9e55abf1630e9c"}}, +{"id":"everyauth","key":"everyauth","value":{"rev":"107-a621f3028a230f9f3ade6a4e729a9a38"}}, +{"id":"ewdDOM","key":"ewdDOM","value":{"rev":"7-28188ec27fe011bf7fcb330a5fc90b55"}}, +{"id":"ewdGateway","key":"ewdGateway","value":{"rev":"7-81fe5ec1a3e920894b560fbf96160258"}}, +{"id":"exceptional","key":"exceptional","value":{"rev":"5-5842d306b2cf084c4e7c2ecb1d715280"}}, +{"id":"exceptional-node","key":"exceptional-node","value":{"rev":"5-3385b42af0a6ea8a943cb686d5789b0c"}}, +{"id":"executor","key":"executor","value":{"rev":"3-aee4f949a4d140a439965e137200c4fb"}}, +{"id":"exif","key":"exif","value":{"rev":"3-da6fd2bd837633f673b325231c164a0f"}}, +{"id":"expanda","key":"expanda","value":{"rev":"3-dcbc59c5db0017d25748ec8094aeeb0a"}}, +{"id":"express","key":"express","value":{"rev":"157-24ef0cdd4ba6c6697c66f3e78bc777bb"}}, +{"id":"express-aid","key":"express-aid","value":{"rev":"21-6d3831e93b823f800e6a22eb08aa41d6"}}, +{"id":"express-app-bootstrap","key":"express-app-bootstrap","value":{"rev":"3-4b5a256bef5ca3bd41b0958f594907b9"}}, +{"id":"express-asset","key":"express-asset","value":{"rev":"3-7d5e23bc753851c576e429e7901301d9"}}, +{"id":"express-blocks","key":"express-blocks","value":{"rev":"7-305b6e046355c8e7a4bb0f1f225092ef"}}, +{"id":"express-cache","key":"express-cache","value":{"rev":"5-eebbea6c0e5db5fd4c12847933c853e1"}}, +{"id":"express-chromeframe","key":"express-chromeframe","value":{"rev":"5-1bb72d30b7a1f00d3eaf248285942d5e"}}, +{"id":"express-coffee","key":"express-coffee","value":{"rev":"39-14eff195c9352c6c3898befb3d613807"}}, +{"id":"express-config","key":"express-config","value":{"rev":"3-27ea0d27e20afa9ece375878aab846ed"}}, +{"id":"express-configure","key":"express-configure","value":{"rev":"7-46bd636c0b56dfcfa4f1ee46b43d6ca0"}}, +{"id":"express-contrib","key":"express-contrib","value":{"rev":"20-472c93fefe0a9a6440a76b2c843b2e0e"}}, +{"id":"express-controllers","key":"express-controllers","value":{"rev":"3-296d54f3b5bf26bfa057cd8c5f0a11ea"}}, +{"id":"express-controllers-new","key":"express-controllers-new","value":{"rev":"15-11f73e4a8ab935987a3b8f132d80afa5"}}, +{"id":"express-cross-site","key":"express-cross-site","value":{"rev":"11-b76814fdd58a616b3cafe6e97f3c7c98"}}, +{"id":"express-csrf","key":"express-csrf","value":{"rev":"20-2a79f0fdc65ed91120e7417a5cf8ce6c"}}, +{"id":"express-custom-errors","key":"express-custom-errors","value":{"rev":"6-bd131169ccac73fa3766195147e34404"}}, +{"id":"express-dialect","key":"express-dialect","value":{"rev":"34-1fbc5baf7ea464abbadcfaf3c1971660"}}, +{"id":"express-dust","key":"express-dust","value":{"rev":"5-33a1d8dd9c113d6fb8f1818c8a749c1b"}}, +{"id":"express-expose","key":"express-expose","value":{"rev":"7-f8757d8bf8d3fac8395ee8ce5117a895"}}, +{"id":"express-extras","key":"express-extras","value":{"rev":"6-53c7bfc68a41043eb5e11321673a2c48"}}, +{"id":"express-form","key":"express-form","value":{"rev":"27-533598a1bd5a0e9b8d694f5b38228c6c"}}, +{"id":"express-helpers","key":"express-helpers","value":{"rev":"3-7b9123b0ea6b840bb5a6e4da9c28308c"}}, +{"id":"express-livejade","key":"express-livejade","value":{"rev":"9-1320996d4ed3db352a2c853226880a17"}}, +{"id":"express-logger","key":"express-logger","value":{"rev":"5-c485b1020742310a313cac87abdde67b"}}, +{"id":"express-messages","key":"express-messages","value":{"rev":"5-f6225b906d0ac33ba1bfc5409b227edb"}}, +{"id":"express-messages-bootstrap","key":"express-messages-bootstrap","value":{"rev":"5-fb8fc70c1cbd6df0e07b2e0148bdf8bf"}}, +{"id":"express-mongoose","key":"express-mongoose","value":{"rev":"29-2d6907a23c8c3bbfdf9b6f9b6b3c00e3"}}, +{"id":"express-mvc-bootstrap","key":"express-mvc-bootstrap","value":{"rev":"15-c53ecb696af1d34ff94efe5ab5d89287"}}, +{"id":"express-namespace","key":"express-namespace","value":{"rev":"7-d209feb707821b06426aed233295df75"}}, +{"id":"express-on-railway","key":"express-on-railway","value":{"rev":"7-784b533cbf29930d04039bafb2c03cc0"}}, +{"id":"express-params","key":"express-params","value":{"rev":"3-13f0ed9c17d10fd01d1ff869e625c91f"}}, +{"id":"express-resource","key":"express-resource","value":{"rev":"13-cca556327152588a87112c6bf2613bc9"}}, +{"id":"express-rewrite","key":"express-rewrite","value":{"rev":"7-c76ca2616eb6e70209ace6499f5b961a"}}, +{"id":"express-route-util","key":"express-route-util","value":{"rev":"9-4b7bad7e8ab3bf71daf85362b47ec8be"}}, +{"id":"express-rpx","key":"express-rpx","value":{"rev":"9-54d48f5e24174500c73f07d97a7d3f9f"}}, +{"id":"express-session-mongo","key":"express-session-mongo","value":{"rev":"3-850cf5b42f65a6f27af6edf1ad1aa966"}}, +{"id":"express-session-mongo-russp","key":"express-session-mongo-russp","value":{"rev":"7-441e8afcd466a4cbb5e65a1949190f97"}}, +{"id":"express-session-redis","key":"express-session-redis","value":{"rev":"6-5f4f16092a0706d2daef89470d6971e6"}}, +{"id":"express-share","key":"express-share","value":{"rev":"5-f5327a97738e9c8e6e05a51cb7153f82"}}, +{"id":"express-spdy","key":"express-spdy","value":{"rev":"11-2634f388338c45b2d6f020d2a6739ba1"}}, +{"id":"express-template-override","key":"express-template-override","value":{"rev":"5-758cf2eb0c9cbc32f205c4ba2ece24f9"}}, +{"id":"express-trace","key":"express-trace","value":{"rev":"5-ba59571f8881e02e2b297ed9ffb4e48c"}}, +{"id":"express-unstable","key":"express-unstable","value":{"rev":"3-06467336e1610ba9915401df26c936c1"}}, +{"id":"express-validate","key":"express-validate","value":{"rev":"15-b63bd9b18fadfc2345d0a10a7a2fb2e7"}}, +{"id":"express-view-helpers","key":"express-view-helpers","value":{"rev":"7-4d07ba11f81788783c6f9fd48fdf8834"}}, +{"id":"express-with-ease","key":"express-with-ease","value":{"rev":"3-604d9176a4a03f9f7c74679604c7bbf9"}}, +{"id":"express-wormhole","key":"express-wormhole","value":{"rev":"3-7e06cf63b070e0f54b2aa71b48db9a40"}}, +{"id":"expresso","key":"expresso","value":{"rev":"79-a27b6ef2f9e7bb9f85da34f728d124a8"}}, +{"id":"expressobdd","key":"expressobdd","value":{"rev":"5-e8cae7a17a9e8c1779c08abedc674e03"}}, +{"id":"ext","key":"ext","value":{"rev":"6-8790c06324c5f057b1713ba420e8bf27"}}, +{"id":"extend","key":"extend","value":{"rev":"3-934d0de77bbaefb1b52ec18a17f46d7d"}}, +{"id":"extendables","key":"extendables","value":{"rev":"11-e4db9b62a4047e95fb4d7f88e351a14e"}}, +{"id":"extjs-node","key":"extjs-node","value":{"rev":"3-2b2033dbbf0b99d41e876498886b0995"}}, +{"id":"extractcontent","key":"extractcontent","value":{"rev":"6-ad70764c834ecd3414cbc15dbda317c3"}}, +{"id":"extractor","key":"extractor","value":{"rev":"9-f95bde04bb8db37350c9cc95c5578c03"}}, +{"id":"extx-layout","key":"extx-layout","value":{"rev":"3-f6bbc3a923ebce17f62cbf382b096ac7"}}, +{"id":"extx-reference-slot","key":"extx-reference-slot","value":{"rev":"14-b1b92573492f7239144693ee9e1d1aac"}}, +{"id":"extx-shotenjin","key":"extx-shotenjin","value":{"rev":"5-c641121ba57fb960d8db766511ecf6cd"}}, +{"id":"eyes","key":"eyes","value":{"rev":"16-fab6b201646fb12986e396c33a7cd428"}}, +{"id":"f","key":"f","value":{"rev":"3-23b73ffafbe5b56b6a0736db6a7256a6"}}, +{"id":"f-core","key":"f-core","value":{"rev":"3-9a6898e007acf48d956f0a70ff07a273"}}, +{"id":"f7u12rl","key":"f7u12rl","value":{"rev":"3-7b5e15d106db8b7f8784b27f7d2c9bdc"}}, +{"id":"fab","key":"fab","value":{"rev":"10-149dec0b653ce481af013c63fec125e8"}}, +{"id":"fab.accept","key":"fab.accept","value":{"rev":"6-d6b08e7054d823906c6c64c92b008d3a"}}, +{"id":"fab.static","key":"fab.static","value":{"rev":"6-5bdb6db53223bb5203ba91a5b2b87566"}}, +{"id":"fabric","key":"fabric","value":{"rev":"15-30e99e486c58962c049bea54e00b7cb9"}}, +{"id":"face-detect","key":"face-detect","value":{"rev":"3-d4d3f1a894c807f79ba541d2f2ed630d"}}, +{"id":"facebook","key":"facebook","value":{"rev":"17-e241999000e34aed62ee0f9f358bfd06"}}, +{"id":"facebook-api","key":"facebook-api","value":{"rev":"5-cb9d07b2eba18d8fb960768d69f80326"}}, +{"id":"facebook-client","key":"facebook-client","value":{"rev":"17-84c106420b183ca791b0c80fd8c3fe00"}}, +{"id":"facebook-connect","key":"facebook-connect","value":{"rev":"6-471f28bb12928e32610d02c0b03aa972"}}, +{"id":"facebook-express","key":"facebook-express","value":{"rev":"11-6e6d98b8252907b05c41aac7e0418f4e"}}, +{"id":"facebook-graph","key":"facebook-graph","value":{"rev":"9-c92149825fef42ad76bcffdd232cc9a5"}}, +{"id":"facebook-graph-client","key":"facebook-graph-client","value":{"rev":"10-c3136a2b2e5c5d80b78404a4102af7b5"}}, +{"id":"facebook-js","key":"facebook-js","value":{"rev":"22-dd9d916550ebccb71e451acbd7a4b315"}}, +{"id":"facebook-realtime-graph","key":"facebook-realtime-graph","value":{"rev":"6-c4fe01ac036585394cd59f01c6fc7df1"}}, +{"id":"facebook-sdk","key":"facebook-sdk","value":{"rev":"21-77daf7eba51bb913e54381995718e13d"}}, +{"id":"facebook-session-cookie","key":"facebook-session-cookie","value":{"rev":"9-70e14cac759dacadacb0af17387ab230"}}, +{"id":"facebook-signed-request","key":"facebook-signed-request","value":{"rev":"5-11cb36123a94e37fff6a7efd6f7d88b9"}}, +{"id":"facebook.node","key":"facebook.node","value":{"rev":"3-f6760795e71c1d5734ae34f9288d02be"}}, +{"id":"factory-worker","key":"factory-worker","value":{"rev":"7-1c365b3dd92b12573d00c08b090e01ae"}}, +{"id":"fake","key":"fake","value":{"rev":"25-2d1ae2299168d95edb8d115fb7961c8e"}}, +{"id":"fake-queue","key":"fake-queue","value":{"rev":"7-d6970de6141c1345c6ad3cd1586cfe7b"}}, +{"id":"fakedb","key":"fakedb","value":{"rev":"34-889fb5c9fa328b536f9deb138ff125b1"}}, +{"id":"fakeweb","key":"fakeweb","value":{"rev":"3-7fb1394b4bac70f9ab26e60b1864b41f"}}, +{"id":"fanfeedr","key":"fanfeedr","value":{"rev":"22-de3d485ad60c8642eda260afe5620973"}}, +{"id":"fantomex","key":"fantomex","value":{"rev":"3-79b26bcf9aa365485ed8131c474bf6f8"}}, +{"id":"far","key":"far","value":{"rev":"19-c8d9f1e8bc12a31cb27bef3ed44759ce"}}, +{"id":"farm","key":"farm","value":{"rev":"31-ab77f7f48b24bf6f0388b926d2ac370b"}}, +{"id":"fast-detective","key":"fast-detective","value":{"rev":"5-b0b6c8901458f3f07044d4266db0aa52"}}, +{"id":"fast-msgpack-rpc","key":"fast-msgpack-rpc","value":{"rev":"7-b2dfd3d331459382fe1e8166288ffef6"}}, +{"id":"fast-or-slow","key":"fast-or-slow","value":{"rev":"13-4118190cd6a0185af8ea9b381ee2bc98"}}, +{"id":"fast-stats","key":"fast-stats","value":{"rev":"3-15cdd56d9efa38f08ff20ca731867d4d"}}, +{"id":"fastcgi-stream","key":"fastcgi-stream","value":{"rev":"5-99c0c4dfc7a874e1af71e5ef3ac95ba4"}}, +{"id":"faye","key":"faye","value":{"rev":"30-49b7d05534c35527972a4d5e07ac8895"}}, +{"id":"faye-service","key":"faye-service","value":{"rev":"3-bad8bf6722461627eac7d0141e09b3f7"}}, +{"id":"fe-fu","key":"fe-fu","value":{"rev":"21-f3cb04870621ce40da8ffa009686bdeb"}}, +{"id":"feed-tables","key":"feed-tables","value":{"rev":"9-4410bad138f4df570e7be37bb17209b3"}}, +{"id":"feedBum","key":"feedBum","value":{"rev":"3-b4ff9edffb0c5c33c4ed40f60a12611a"}}, +{"id":"feedparser","key":"feedparser","value":{"rev":"5-eb2c32e00832ed7036eb1b87d2eea33e"}}, +{"id":"feral","key":"feral","value":{"rev":"19-0b512b6301a26ca5502710254bd5a9ba"}}, +{"id":"fermata","key":"fermata","value":{"rev":"25-eeafa3e5b769a38b8a1065c0a66e0653"}}, +{"id":"ferret","key":"ferret","value":{"rev":"9-7ab6b29cb0cad9855d927855c2a27bff"}}, +{"id":"ffmpeg-node","key":"ffmpeg-node","value":{"rev":"3-e55011ecb147f599475a12b10724a583"}}, +{"id":"ffmpeg2theora","key":"ffmpeg2theora","value":{"rev":"13-05d2f83dbbb90e832176ebb7fdc2ae2e"}}, +{"id":"fiberize","key":"fiberize","value":{"rev":"5-dfb978d6b88db702f68a13e363fb21af"}}, +{"id":"fibers","key":"fibers","value":{"rev":"71-4b22dbb449839723ed9b0d533339c764"}}, +{"id":"fibers-promise","key":"fibers-promise","value":{"rev":"9-3a9977528f8df079969d4ae48db7a0a7"}}, +{"id":"fidel","key":"fidel","value":{"rev":"37-370838ed9984cfe6807114b5fef789e6"}}, +{"id":"fig","key":"fig","value":{"rev":"7-24acf90e7d06dc8b83adb02b5776de3c"}}, +{"id":"file","key":"file","value":{"rev":"6-1131008db6855f20969413be7cc2e968"}}, +{"id":"file-api","key":"file-api","value":{"rev":"9-a9cc8f3de14eef5bba86a80f6705651c"}}, +{"id":"fileify","key":"fileify","value":{"rev":"17-50603c037d5e3a0a405ff4af3e71211f"}}, +{"id":"filepad","key":"filepad","value":{"rev":"23-8c4b2c04151723033523369c42144cc9"}}, +{"id":"filerepl","key":"filerepl","value":{"rev":"5-94999cc91621e08f96ded7423ed6d6f0"}}, +{"id":"fileset","key":"fileset","value":{"rev":"3-ea6a9f45aaa5e65279463041ee629dbe"}}, +{"id":"filestore","key":"filestore","value":{"rev":"9-6cce7c9cd2b2b11d12905885933ad25a"}}, +{"id":"filesystem-composer","key":"filesystem-composer","value":{"rev":"34-f1d04d711909f3683c1d00cd4ab7ca47"}}, +{"id":"fileutils","key":"fileutils","value":{"rev":"3-88876b61c9d0a915f95ce0f258e5ce51"}}, +{"id":"filter","key":"filter","value":{"rev":"3-4032087a5cf2de3dd164c95454a2ab05"}}, +{"id":"filter-chain","key":"filter-chain","value":{"rev":"5-c522429dc83ccc7dde4eaf5409070332"}}, +{"id":"fin","key":"fin","value":{"rev":"23-77cf12e84eb62958b40aa08fdcbb259d"}}, +{"id":"fin-id","key":"fin-id","value":{"rev":"3-9f85ee1e426d4bdad5904002a6d9342c"}}, +{"id":"finance","key":"finance","value":{"rev":"3-cf97ddb6af3f6601bfb1e49a600f56af"}}, +{"id":"finder","key":"finder","value":{"rev":"13-65767fe51799a397ddd9b348ead12ed2"}}, +{"id":"findit","key":"findit","value":{"rev":"15-435e4168208548a2853f6efcd4529de3"}}, +{"id":"fingerprint","key":"fingerprint","value":{"rev":"3-c40e2169260010cac472e688c392ea3d"}}, +{"id":"finjector","key":"finjector","value":{"rev":"5-646da199b0b336d20e421ef6ad613e90"}}, +{"id":"firebird","key":"firebird","value":{"rev":"5-7e7ec03bc00e562f5f7afc7cad76da77"}}, +{"id":"firmata","key":"firmata","value":{"rev":"20-f3cbde43ce2677a208bcf3599af5b670"}}, +{"id":"first","key":"first","value":{"rev":"3-c647f6fc1353a1c7b49f5e6cd1905b1e"}}, +{"id":"fishback","key":"fishback","value":{"rev":"19-27a0fdc8c3abe4d61fff9c7a098f3fd9"}}, +{"id":"fitbit-js","key":"fitbit-js","value":{"rev":"3-62fe0869ddefd2949d8c1e568f994c93"}}, +{"id":"fix","key":"fix","value":{"rev":"17-4a79db9924922da010df71e5194bcac6"}}, +{"id":"flagpoll","key":"flagpoll","value":{"rev":"3-0eb7b98e2a0061233aa5228eb7348dff"}}, +{"id":"flags","key":"flags","value":{"rev":"3-594f0ec2e903ac74556d1c1f7c6cca3b"}}, +{"id":"flexcache","key":"flexcache","value":{"rev":"11-e1e4eeaa0793d95056a857bec04282ae"}}, +{"id":"flickr-conduit","key":"flickr-conduit","value":{"rev":"7-d3b2b610171589db68809c3ec3bf2bcb"}}, +{"id":"flickr-js","key":"flickr-js","value":{"rev":"5-66c8e8a00ad0a906f632ff99cf490163"}}, +{"id":"flickr-reflection","key":"flickr-reflection","value":{"rev":"6-3c34c3ac904b6d6f26182807fbb95c5e"}}, +{"id":"flo","key":"flo","value":{"rev":"3-ce440035f0ec9a10575b1c8fab0c77da"}}, +{"id":"flow","key":"flow","value":{"rev":"6-95841a07c96f664d49d1af35373b3dbc"}}, +{"id":"flowcontrol","key":"flowcontrol","value":{"rev":"3-093bbbc7496072d9ecb136a826680366"}}, +{"id":"flowjs","key":"flowjs","value":{"rev":"3-403fc9e107ec70fe06236c27e70451c7"}}, +{"id":"fluent-ffmpeg","key":"fluent-ffmpeg","value":{"rev":"33-5982779d5f55a5915f0f8b0353f1fe2a"}}, +{"id":"flume-rpc","key":"flume-rpc","value":{"rev":"7-4214a2db407a3e64f036facbdd34df91"}}, +{"id":"flux","key":"flux","value":{"rev":"3-1ad83106af7ee83547c797246bd2c8b1"}}, +{"id":"fly","key":"fly","value":{"rev":"9-0a45b1b97f56ba0faf4af4777b473fad"}}, +{"id":"fn","key":"fn","value":{"rev":"5-110bab5d623b3628e413d972e040ed26"}}, +{"id":"fnProxy","key":"fnProxy","value":{"rev":"3-db1c90e5a06992ed290c679ac6dbff6a"}}, +{"id":"follow","key":"follow","value":{"rev":"3-44256c802b4576fcbae1264e9b824e6a"}}, +{"id":"fomatto","key":"fomatto","value":{"rev":"7-31ce5c9eba7f084ccab2dc5994796f2d"}}, +{"id":"foounit","key":"foounit","value":{"rev":"20-caf9cd90d6c94d19be0b3a9c9cb33ee0"}}, +{"id":"forEachAsync","key":"forEachAsync","value":{"rev":"3-d9cd8021ea9d5014583327752a9d01c4"}}, +{"id":"forever","key":"forever","value":{"rev":"99-90060d5d1754b1bf749e5278a2a4516b"}}, +{"id":"forge","key":"forge","value":{"rev":"9-0d9d59fd2d47a804e600aaef538ebbbf"}}, +{"id":"fork","key":"fork","value":{"rev":"13-f355105e07608de5ae2f3e7c0817af52"}}, +{"id":"forker","key":"forker","value":{"rev":"11-9717e2e3fa60b46df08261d936d9e5d7"}}, +{"id":"form-data","key":"form-data","value":{"rev":"3-5750e73f7a0902ec2fafee1db6d2e6f6"}}, +{"id":"form-validator","key":"form-validator","value":{"rev":"25-7d016b35895dc58ffd0bbe54fd9be241"}}, +{"id":"form2json","key":"form2json","value":{"rev":"8-7501dd9b43b9fbb7194b94e647816e5e"}}, +{"id":"formaline","key":"formaline","value":{"rev":"3-2d45fbb3e83b7e77bde0456607e6f1e3"}}, +{"id":"format","key":"format","value":{"rev":"7-5dddc67c10de521ef06a7a07bb3f7e2e"}}, +{"id":"formatdate","key":"formatdate","value":{"rev":"3-6d522e3196fe3b438fcc4aed0f7cf690"}}, +{"id":"formidable","key":"formidable","value":{"rev":"87-d27408b00793fee36f6632a895372590"}}, +{"id":"forms","key":"forms","value":{"rev":"6-253e032f07979b79c2e7dfa01be085dc"}}, +{"id":"forrst","key":"forrst","value":{"rev":"3-ef553ff1b6383bab0f81f062cdebac53"}}, +{"id":"fortumo","key":"fortumo","value":{"rev":"6-def3d146b29b6104019c513ce20bb61f"}}, +{"id":"foss-credits","key":"foss-credits","value":{"rev":"3-c824326e289e093406b2de4efef70cb7"}}, +{"id":"foss-credits-collection","key":"foss-credits-collection","value":{"rev":"17-de4ffca51768a36c8fb1b9c2bc66c80f"}}, +{"id":"foursquareonnode","key":"foursquareonnode","value":{"rev":"5-a4f0a1ed5d3be3056f10f0e9517efa83"}}, +{"id":"fraggle","key":"fraggle","value":{"rev":"7-b9383baf96bcdbd4022b4b887e4a3729"}}, +{"id":"framework","key":"framework","value":{"rev":"3-afb19a9598a0d50320b4f1faab1ae2c6"}}, +{"id":"frameworkjs","key":"frameworkjs","value":{"rev":"7-cd418da3272c1e8349126e442ed15dbd"}}, +{"id":"frank","key":"frank","value":{"rev":"12-98031fb56f1c89dfc7888f5d8ca7f0a9"}}, +{"id":"freakset","key":"freakset","value":{"rev":"21-ba60d0840bfa3da2c8713c3c2e6856a0"}}, +{"id":"freckle","key":"freckle","value":{"rev":"3-8e2e9a07b2650fbbd0a598b948ef993b"}}, +{"id":"freebase","key":"freebase","value":{"rev":"7-a1daf1cc2259b886f574f5c902eebcf4"}}, +{"id":"freecontrol","key":"freecontrol","value":{"rev":"6-7a51776b8764f406573d5192bab36adf"}}, +{"id":"freestyle","key":"freestyle","value":{"rev":"9-100f9e9d3504d6e1c6a2d47651c70f51"}}, +{"id":"frenchpress","key":"frenchpress","value":{"rev":"9-306d6ac21837879b8040d7f9aa69fc20"}}, +{"id":"fs-boot","key":"fs-boot","value":{"rev":"20-72b44b403767aa486bf1dc987c750733"}}, +{"id":"fs-ext","key":"fs-ext","value":{"rev":"10-3360831c3852590a762f8f82525c025e"}}, +{"id":"fsevents","key":"fsevents","value":{"rev":"6-bb994f41842e144cf43249fdf6bf51e1"}}, +{"id":"fsext","key":"fsext","value":{"rev":"9-a1507d84e91ddf26ffaa76016253b4fe"}}, +{"id":"fsh","key":"fsh","value":{"rev":"5-1e3784b2df1c1a28b81f27907945f48b"}}, +{"id":"fsm","key":"fsm","value":{"rev":"5-b113be7b30b2a2c9089edcb6fa4c15d3"}}, +{"id":"fswatch","key":"fswatch","value":{"rev":"11-287eea565c9562161eb8969d765bb191"}}, +{"id":"ftp","key":"ftp","value":{"rev":"5-751e312520c29e76f7d79c648248c56c"}}, +{"id":"ftp-get","key":"ftp-get","value":{"rev":"27-1e908bd075a0743dbb1d30eff06485e2"}}, +{"id":"fugue","key":"fugue","value":{"rev":"81-0c08e67e8deb4b5b677fe19f8362dbd8"}}, +{"id":"fullauto","key":"fullauto","value":{"rev":"9-ef915156026dabded5a4a76c5a751916"}}, +{"id":"fun","key":"fun","value":{"rev":"12-8396e3583e206dbf90bbea4316976f66"}}, +{"id":"functional","key":"functional","value":{"rev":"5-955979028270f5d3749bdf86b4d2c925"}}, +{"id":"functools","key":"functools","value":{"rev":"5-42ba84ce365bf8c0aaf3e5e6c369920b"}}, +{"id":"funk","key":"funk","value":{"rev":"14-67440a9b2118d8f44358bf3b17590243"}}, +{"id":"fusion","key":"fusion","value":{"rev":"19-64983fc6e5496c836be26e5fbc8527d1"}}, +{"id":"fusker","key":"fusker","value":{"rev":"48-58f05561c65ad288a78fa7210f146ba1"}}, +{"id":"future","key":"future","value":{"rev":"3-0ca60d8ae330e40ef6cf8c17a421d668"}}, +{"id":"futures","key":"futures","value":{"rev":"44-8a2aaf0f40cf84c9475824d9cec006ad"}}, +{"id":"fuzzy_file_finder","key":"fuzzy_file_finder","value":{"rev":"8-ee555aae1d433e60166d2af1d72ac6b9"}}, +{"id":"fuzzylogic","key":"fuzzylogic","value":{"rev":"8-596a8f4744d1dabcb8eb6466d9980fca"}}, +{"id":"fxs","key":"fxs","value":{"rev":"3-d3cb81151b0ddd9a4a5934fb63ffff75"}}, +{"id":"g","key":"g","value":{"rev":"3-55742a045425a9b4c9fe0e8925fad048"}}, +{"id":"g.raphael","key":"g.raphael","value":{"rev":"4-190d0235dc08f783dda77b3ecb60b11a"}}, +{"id":"ga","key":"ga","value":{"rev":"3-c47d516ac5e6de8ef7ef9d16fabcf6c7"}}, +{"id":"galletita","key":"galletita","value":{"rev":"3-aa7a01c3362a01794f36e7aa9664b850"}}, +{"id":"game","key":"game","value":{"rev":"3-0f1539e4717a2780205d98ef6ec0886d"}}, +{"id":"gamina","key":"gamina","value":{"rev":"15-871f4970f1e87b7c8ad361456001c76f"}}, +{"id":"gang-bang","key":"gang-bang","value":{"rev":"6-f565cb7027a8ca109481df49a6d41114"}}, +{"id":"gapserver","key":"gapserver","value":{"rev":"9-b25eb0eefc21e407cba596a0946cb3a0"}}, +{"id":"garbage","key":"garbage","value":{"rev":"3-80f4097d5f1f2c75f509430a11c8a15e"}}, +{"id":"gaseous","key":"gaseous","value":{"rev":"3-8021582ab9dde42d235193e6067be72d"}}, +{"id":"gaudium","key":"gaudium","value":{"rev":"11-7d612f1c5d921180ccf1c162fe2c7446"}}, +{"id":"gauss","key":"gauss","value":{"rev":"3-8fd18b2d7a223372f190797e4270a535"}}, +{"id":"gcli","key":"gcli","value":{"rev":"3-210404347cc643e924cec678d0195099"}}, +{"id":"gcw2html","key":"gcw2html","value":{"rev":"3-2aff7bff7981f2f9800c5f65812aa0a6"}}, +{"id":"gd","key":"gd","value":{"rev":"4-ac5a662e709a2993ed1fd1cbf7c4d7b4"}}, +{"id":"gdata","key":"gdata","value":{"rev":"3-c6b3a95064a1e1e0bb74f248ab4e73c4"}}, +{"id":"gdata-js","key":"gdata-js","value":{"rev":"17-0959500a4000d7058d8116af1e01b0d9"}}, +{"id":"gearman","key":"gearman","value":{"rev":"8-ac9fb7af75421ca2988d6098dbfd4c7c"}}, +{"id":"gearnode","key":"gearnode","value":{"rev":"7-8e40ec257984e887e2ff5948a6dde04e"}}, +{"id":"geck","key":"geck","value":{"rev":"161-c8117106ef58a6d7d21920df80159eab"}}, +{"id":"geddy","key":"geddy","value":{"rev":"13-da16f903aca1ec1f47086fa250b58abb"}}, +{"id":"gen","key":"gen","value":{"rev":"3-849005c8b8294c2a811ff4eccdedf436"}}, +{"id":"generic-function","key":"generic-function","value":{"rev":"5-dc046f58f96119225efb17ea5334a60f"}}, +{"id":"generic-pool","key":"generic-pool","value":{"rev":"18-65ff988620293fe7ffbd0891745c3ded"}}, +{"id":"genji","key":"genji","value":{"rev":"49-4c72bcaa57572ad0d43a1b7e9e5a963a"}}, +{"id":"genstatic","key":"genstatic","value":{"rev":"19-4278d0766226af4db924bb0f6b127699"}}, +{"id":"gently","key":"gently","value":{"rev":"24-c9a3ba6b6fd183ee1b5dda569122e978"}}, +{"id":"genx","key":"genx","value":{"rev":"7-f0c0ff65e08e045e8dd1bfcb25ca48d4"}}, +{"id":"geo","key":"geo","value":{"rev":"7-fa2a79f7260b849c277735503a8622e9"}}, +{"id":"geo-distance","key":"geo-distance","value":{"rev":"7-819a30e9b4776e4416fe9510ca79cd93"}}, +{"id":"geocoder","key":"geocoder","value":{"rev":"15-736e627571ad8dba3a9d0da1ae019c35"}}, +{"id":"geohash","key":"geohash","value":{"rev":"6-b9e62c804abe565425a8e6a01354407a"}}, +{"id":"geoip","key":"geoip","value":{"rev":"231-e5aa7acd5fb44833a67f96476b4fac49"}}, +{"id":"geoip-lite","key":"geoip-lite","value":{"rev":"9-efd916135c056406ede1ad0fe15534fa"}}, +{"id":"geojs","key":"geojs","value":{"rev":"35-b0f97b7c72397d6eb714602dc1121183"}}, +{"id":"geolib","key":"geolib","value":{"rev":"3-923a8622d1bd97c22f71ed6537ba5062"}}, +{"id":"geonode","key":"geonode","value":{"rev":"35-c2060653af72123f2f9994fca1c86d70"}}, +{"id":"geoutils","key":"geoutils","value":{"rev":"6-2df101fcbb01849533b2fbc80dc0eb7a"}}, +{"id":"gerbil","key":"gerbil","value":{"rev":"3-b5961044bda490a34085ca826aeb3022"}}, +{"id":"gerenuk","key":"gerenuk","value":{"rev":"13-4e45a640bcbadc3112e105ec5b60b907"}}, +{"id":"get","key":"get","value":{"rev":"18-dd215d673f19bbd8b321a7dd63e004e8"}}, +{"id":"getopt","key":"getopt","value":{"rev":"3-454354e4557d5e7205410acc95c9baae"}}, +{"id":"getrusage","key":"getrusage","value":{"rev":"8-d6ef24793b8e4c46f3cdd14937cbabe1"}}, +{"id":"gettext","key":"gettext","value":{"rev":"3-4c12268a4cab64ec4ef3ac8c9ec7912b"}}, +{"id":"getz","key":"getz","value":{"rev":"9-f3f43934139c9af6ddfb8b91e9a121ba"}}, +{"id":"gevorg.me","key":"gevorg.me","value":{"rev":"33-700502b8ca7041bf8d29368069cac365"}}, +{"id":"gex","key":"gex","value":{"rev":"3-105824d7a3f9c2ac7313f284c3f81d22"}}, +{"id":"gexode","key":"gexode","value":{"rev":"3-4a3552eae4ff3ba4443f9371a1ab4b2e"}}, +{"id":"gfx","key":"gfx","value":{"rev":"8-1f6c90bc3819c3b237e8d1f28ad1b136"}}, +{"id":"gherkin","key":"gherkin","value":{"rev":"77-6e835c8107bb4c7c8ad1fa072ac12c20"}}, +{"id":"ghm","key":"ghm","value":{"rev":"3-c440ae39832a575087ff1920b33c275b"}}, +{"id":"gif","key":"gif","value":{"rev":"14-e65638621d05b99ffe71b18097f29134"}}, +{"id":"gimme","key":"gimme","value":{"rev":"7-caab8354fe257fc307f8597e34ede547"}}, +{"id":"gist","key":"gist","value":{"rev":"11-eea7ea1adf3cde3a0804d2e1b0d6f7d6"}}, +{"id":"gista","key":"gista","value":{"rev":"23-48b8c374cfb8fc4e8310f3469cead6d5"}}, +{"id":"gisty","key":"gisty","value":{"rev":"5-1a898d0816f4129ab9a0d3f03ff9feb4"}}, +{"id":"git","key":"git","value":{"rev":"39-1f77df3ebeec9aae47ae8df56de6757f"}}, +{"id":"git-fs","key":"git-fs","value":{"rev":"14-7d365cddff5029a9d11fa8778a7296d2"}}, +{"id":"gitProvider","key":"gitProvider","value":{"rev":"9-c704ae702ef27bb57c0efd279a464e28"}}, +{"id":"github","key":"github","value":{"rev":"16-9345138ca7507c12be4a817b1abfeef6"}}, +{"id":"github-flavored-markdown","key":"github-flavored-markdown","value":{"rev":"3-f12043eb2969aff51db742b13d329446"}}, +{"id":"gitteh","key":"gitteh","value":{"rev":"39-88b00491fd4ce3294b8cdf61b9708383"}}, +{"id":"gitter","key":"gitter","value":{"rev":"16-88d7ef1ab6a7e751ca2cf6b50894deb4"}}, +{"id":"gittyup","key":"gittyup","value":{"rev":"37-ed6030c1acdd8b989ac34cd10d6dfd1e"}}, +{"id":"gitweb","key":"gitweb","value":{"rev":"9-5331e94c6df9ee7724cde3738a0c6230"}}, +{"id":"gitwiki","key":"gitwiki","value":{"rev":"9-0f167a3a87bce7f3e941136a06e91810"}}, +{"id":"gizmo","key":"gizmo","value":{"rev":"5-1da4da8d66690457c0bf743473b755f6"}}, +{"id":"gleak","key":"gleak","value":{"rev":"17-d44a968b32e4fdc7d27bacb146391422"}}, +{"id":"glob","key":"glob","value":{"rev":"203-4a79e232cf6684a48ccb9134a6ce938c"}}, +{"id":"glob-trie.js","key":"glob-trie.js","value":{"rev":"7-bff534e3aba8f6333fa5ea871b070de2"}}, +{"id":"global","key":"global","value":{"rev":"3-f15b0c9ae0ea9508890bff25c8e0f795"}}, +{"id":"globalize","key":"globalize","value":{"rev":"5-33d10c33fb24af273104f66098e246c4"}}, +{"id":"glossary","key":"glossary","value":{"rev":"3-5e143d09d22a01eb2ee742ceb3e18f6e"}}, +{"id":"glossy","key":"glossy","value":{"rev":"9-f31e00844e8be49e5812fe64a6f1e1cc"}}, +{"id":"gm","key":"gm","value":{"rev":"28-669722d34a3dc29c8c0b27abd73493a1"}}, +{"id":"gnarly","key":"gnarly","value":{"rev":"3-796f5df3483f304cb404cc7ac7702512"}}, +{"id":"gnomenotify","key":"gnomenotify","value":{"rev":"9-bc066c0556ad4a20e7a7ae58cdc4cf91"}}, +{"id":"gofer","key":"gofer","value":{"rev":"15-3fc77ce34e95ffecd12d3854a1bb2da9"}}, +{"id":"goo.gl","key":"goo.gl","value":{"rev":"37-eac7c44d33cc42c618372f0bdd4365c2"}}, +{"id":"goodreads","key":"goodreads","value":{"rev":"5-acd9fe24139aa8b81b26431dce9954aa"}}, +{"id":"goog","key":"goog","value":{"rev":"13-c964ecfcef4d20c8c7d7526323257c04"}}, +{"id":"googl","key":"googl","value":{"rev":"8-2d4d80ef0c5f93400ec2ec8ef80de433"}}, +{"id":"google-openid","key":"google-openid","value":{"rev":"19-380884ba97e3d6fc48c8c7db3dc0e91b"}}, +{"id":"google-spreadsheets","key":"google-spreadsheets","value":{"rev":"3-f640ef136c4b5e90210c2d5d43102b38"}}, +{"id":"google-voice","key":"google-voice","value":{"rev":"37-2e1c3cba3455852f26b0ccaf1fed7125"}}, +{"id":"googleanalytics","key":"googleanalytics","value":{"rev":"8-1d3e470ce4aacadb0418dd125887813d"}}, +{"id":"googleclientlogin","key":"googleclientlogin","value":{"rev":"23-5de8ee62c0ddbc63a001a36a6afe730e"}}, +{"id":"googlediff","key":"googlediff","value":{"rev":"3-438a2f0758e9770a157ae4cce9b6f49e"}}, +{"id":"googlemaps","key":"googlemaps","value":{"rev":"18-bc939560c587711f3d96f3caadd65a7f"}}, +{"id":"googleplus-scraper","key":"googleplus-scraper","value":{"rev":"7-598ea99bd64f4ad69cccb74095abae59"}}, +{"id":"googlereaderauth","key":"googlereaderauth","value":{"rev":"5-cd0eb8ca36ea78620af0fce270339a7b"}}, +{"id":"googlesets","key":"googlesets","value":{"rev":"5-1b2e597e903c080182b3306d63278fd9"}}, +{"id":"googleweather","key":"googleweather","value":{"rev":"3-6bfdaaeedb8a712ee3e89a8ed27508eb"}}, +{"id":"gopostal.node","key":"gopostal.node","value":{"rev":"3-14ff3a655dc3680c9e8e2751ebe294bc"}}, +{"id":"gowallan","key":"gowallan","value":{"rev":"3-23adc9c01a6b309eada47602fdc8ed90"}}, +{"id":"gowiththeflow","key":"gowiththeflow","value":{"rev":"3-52bb6cf6294f67ba5a892db4666d3790"}}, +{"id":"gpg","key":"gpg","value":{"rev":"5-0ca2b5af23e108a4f44f367992a75fed"}}, +{"id":"graceful-fs","key":"graceful-fs","value":{"rev":"3-01e9f7d1c0f6e6a611a60ee84de1f5cc"}}, +{"id":"gracie","key":"gracie","value":{"rev":"3-aa0f7c01a33c7c1e9a49b86886ef5255"}}, +{"id":"graff","key":"graff","value":{"rev":"7-5ab558cb24e30abd67f2a1dbf47cd639"}}, +{"id":"graft","key":"graft","value":{"rev":"3-7419de38b249b891bf7998bcdd2bf557"}}, +{"id":"grain","key":"grain","value":{"rev":"3-e57cbf02121970da230964ddbfd31432"}}, +{"id":"grainstore","key":"grainstore","value":{"rev":"19-5f9c5bb13b2c9ac4e6a05aec33aeb7c5"}}, +{"id":"graph","key":"graph","value":{"rev":"7-909d2fefcc84b5dd1512b60d631ea4e5"}}, +{"id":"graphquire","key":"graphquire","value":{"rev":"27-246e798f80b3310419644302405d68ad"}}, +{"id":"graphviz","key":"graphviz","value":{"rev":"8-3b79341eaf3f67f91bce7c88c08b9f0d"}}, +{"id":"grasshopper","key":"grasshopper","value":{"rev":"45-4002406990476b74dac5108bd19c4274"}}, +{"id":"gravatar","key":"gravatar","value":{"rev":"11-0164b7ac97e8a477b4e8791eae2e7fea"}}, +{"id":"grave","key":"grave","value":{"rev":"3-136f6378b956bc5dd9773250f8813038"}}, +{"id":"gravity","key":"gravity","value":{"rev":"5-dd40fcee1a769ce786337e9536d24244"}}, +{"id":"graylog","key":"graylog","value":{"rev":"5-abcff9cd91ff20e36f8a70a3f2de658b"}}, +{"id":"greg","key":"greg","value":{"rev":"5-ececb0a3bb552b6da4f66b8bf6f75cf0"}}, +{"id":"gridcentric","key":"gridcentric","value":{"rev":"4-4378e1c280e18b5aaabd23038b80d76c"}}, +{"id":"gridly","key":"gridly","value":{"rev":"3-86e878756b493da8f66cbd633a15f821"}}, +{"id":"grinder","key":"grinder","value":{"rev":"9-0aaeecf0c81b1c9c93a924c5eb0bff45"}}, +{"id":"grir.am","key":"grir.am","value":{"rev":"3-3ec153c764af1c26b50fefa437318c5a"}}, +{"id":"groundcrew","key":"groundcrew","value":{"rev":"3-9e9ed9b1c70c00c432f36bb853fa21a0"}}, +{"id":"groupie","key":"groupie","value":{"rev":"6-b5e3f0891a7e8811d6112b24bd5a46b4"}}, +{"id":"groupon","key":"groupon","value":{"rev":"21-8b74723c153695f4ed4917575abcca8f"}}, +{"id":"growing-file","key":"growing-file","value":{"rev":"7-995b233a1add5b9ea80aec7ac3f60dc5"}}, +{"id":"growl","key":"growl","value":{"rev":"10-4be41ae10ec96e1334dccdcdced12fe3"}}, +{"id":"gsl","key":"gsl","value":{"rev":"49-3367acfb521b30d3ddb9b80305009553"}}, +{"id":"gss","key":"gss","value":{"rev":"3-e4cffbbbc4536d952d13d46376d899b7"}}, +{"id":"guards","key":"guards","value":{"rev":"8-d7318d3d9dc842ab41e6ef5b88f9d37f"}}, +{"id":"guardtime","key":"guardtime","value":{"rev":"3-5a2942efabab100ffb3dc0fa3b581b7a"}}, +{"id":"guava","key":"guava","value":{"rev":"11-d9390d298b503f0ffb8e3ba92eeb9759"}}, +{"id":"guid","key":"guid","value":{"rev":"16-d99e725bbbf97a326833858767b7ed08"}}, +{"id":"gumbo","key":"gumbo","value":{"rev":"31-727cf5a3b7d8590fff871f27da114d9d"}}, +{"id":"gunther","key":"gunther","value":{"rev":"9-f95c89128412208d16acd3e615844115"}}, +{"id":"gzbz2","key":"gzbz2","value":{"rev":"3-e1844b1b3a7881a0c8dc0dd4edcc11ca"}}, +{"id":"gzip","key":"gzip","value":{"rev":"17-37afa05944f055d6f43ddc87c1b163c2"}}, +{"id":"gzip-stack","key":"gzip-stack","value":{"rev":"8-cf455d60277832c60ee622d198c0c51a"}}, +{"id":"gzippo","key":"gzippo","value":{"rev":"15-6416c13ecbbe1c5cd3e30adf4112ead7"}}, +{"id":"h5eb","key":"h5eb","value":{"rev":"3-11ed2566fa4b8a01ff63a720c94574cd"}}, +{"id":"hack","key":"hack","value":{"rev":"3-70f536dd46719e8201a6ac5cc96231f6"}}, +{"id":"hack.io","key":"hack.io","value":{"rev":"18-128305614e7fd6b461248bf3bfdd7ab7"}}, +{"id":"hacktor","key":"hacktor","value":{"rev":"3-51b438df35ba8a955d434ab25a4dad67"}}, +{"id":"haibu","key":"haibu","value":{"rev":"99-b29b8c37be42f90985c6d433d53c8679"}}, +{"id":"haibu-carapace","key":"haibu-carapace","value":{"rev":"22-9a89b2f495e533d0f93e4ee34121e48c"}}, +{"id":"haibu-nginx","key":"haibu-nginx","value":{"rev":"7-e176128dc6dbb0d7f5f33369edf1f7ee"}}, +{"id":"halfstreamxml","key":"halfstreamxml","value":{"rev":"7-5c0f3defa6ba921f8edb564584553df4"}}, +{"id":"ham","key":"ham","value":{"rev":"3-1500dc495cade7334f6a051f2758f748"}}, +{"id":"haml","key":"haml","value":{"rev":"15-a93e7762c7d43469a06519472497fd93"}}, +{"id":"haml-edge","key":"haml-edge","value":{"rev":"5-c4e44a73263ac9b7e632375de7e43d7c"}}, +{"id":"hamljs","key":"hamljs","value":{"rev":"10-a01c7214b69992352bde44938418ebf4"}}, +{"id":"hamljs-coffee","key":"hamljs-coffee","value":{"rev":"3-c2733c8ff38f5676075b84cd7f3d8684"}}, +{"id":"handlebars","key":"handlebars","value":{"rev":"4-0e21906b78605f7a1d5ec7cb4c7d35d7"}}, +{"id":"hanging-gardens","key":"hanging-gardens","value":{"rev":"27-3244e37f08bea0e31759e9f38983f59a"}}, +{"id":"hanging_gardens_registry","key":"hanging_gardens_registry","value":{"rev":"17-d87aa3a26f91dc314f02c686672a5ec6"}}, +{"id":"hapi","key":"hapi","value":{"rev":"3-ed721fe9aae4a459fe0945dabd7d680a"}}, +{"id":"harmony","key":"harmony","value":{"rev":"3-d6c9d6acc29d29c97c75c77f7c8e1390"}}, +{"id":"hascan","key":"hascan","value":{"rev":"13-a7ab15c72f464b013cbc55dc426543ca"}}, +{"id":"hash_ring","key":"hash_ring","value":{"rev":"12-0f072b1dd1fd93ae2f2b79f5ea72074d"}}, +{"id":"hashbangify","key":"hashbangify","value":{"rev":"5-738e0cf99649d41c19d3449c0e9a1cbf"}}, +{"id":"hashish","key":"hashish","value":{"rev":"9-62c5e74355458e1ead819d87151b7d38"}}, +{"id":"hashkeys","key":"hashkeys","value":{"rev":"3-490809bdb61f930f0d9f370eaadf36ea"}}, +{"id":"hashlib","key":"hashlib","value":{"rev":"7-1f19c9d6062ff22ed2e963204a1bd405"}}, +{"id":"hashring","key":"hashring","value":{"rev":"11-4c9f2b1ba7931c8bab310f4ecaf91419"}}, +{"id":"hashtable","key":"hashtable","value":{"rev":"7-2aaf2667cbdb74eb8da61e2e138059ca"}}, +{"id":"hat","key":"hat","value":{"rev":"9-6f37874d9703eab62dc875e2373837a8"}}, +{"id":"hbase","key":"hbase","value":{"rev":"20-7ca92712de26ffb18d275a21696aa263"}}, +{"id":"hbase-thrift","key":"hbase-thrift","value":{"rev":"7-39afb33a4e61cc2b3dc94f0c7fd32c65"}}, +{"id":"hbs","key":"hbs","value":{"rev":"29-aa2676e6790c5716f84f128dcd03e797"}}, +{"id":"header-stack","key":"header-stack","value":{"rev":"13-7ad1ccf3c454d77029c000ceb18ce5ab"}}, +{"id":"headers","key":"headers","value":{"rev":"13-04f8f5f25e2dd9890f6b2f120adf297a"}}, +{"id":"healthety","key":"healthety","value":{"rev":"60-07c67c22ee2a13d0ad675739d1814a6d"}}, +{"id":"heatmap","key":"heatmap","value":{"rev":"9-c53f4656d9517f184df7aea9226c1765"}}, +{"id":"heavy-flow","key":"heavy-flow","value":{"rev":"5-0b9188334339e7372b364a7fc730c639"}}, +{"id":"heckle","key":"heckle","value":{"rev":"13-b462abef7b9d1471ed8fb8f23af463e0"}}, +{"id":"helium","key":"helium","value":{"rev":"3-4d6ce9618c1be522268944240873f53e"}}, +{"id":"hello-world","key":"hello-world","value":{"rev":"3-e87f287308a209491c011064a87100b7"}}, +{"id":"hello.io","key":"hello.io","value":{"rev":"3-39b78278fa638495522edc7a84f6a52e"}}, +{"id":"helloworld","key":"helloworld","value":{"rev":"3-8f163aebdcf7d8761709bdbb634c3689"}}, +{"id":"helpers","key":"helpers","value":{"rev":"3-67d75b1c8e5ad2a268dd4ea191d4754b"}}, +{"id":"helpful","key":"helpful","value":{"rev":"41-e11bed25d5a0ca7e7ad116d5a339ec2a"}}, +{"id":"hem","key":"hem","value":{"rev":"27-042fc9d4b96f20112cd943e019e54d20"}}, +{"id":"hempwick","key":"hempwick","value":{"rev":"11-de1f6f0f23937d9f33286e12ee877540"}}, +{"id":"heritable","key":"heritable","value":{"rev":"13-1468ff92063251a037bbe80ee987a9c3"}}, +{"id":"hermes-raw-client","key":"hermes-raw-client","value":{"rev":"11-5d143c371cb8353612badc72be1917ff"}}, +{"id":"heru","key":"heru","value":{"rev":"3-d124a20939e30e2a3c08f7104b2a1a5c"}}, +{"id":"hexdump","key":"hexdump","value":{"rev":"3-c455710ca80662969ccbca3acc081cb8"}}, +{"id":"hexy","key":"hexy","value":{"rev":"16-5142b0461622436daa2e476d252770f2"}}, +{"id":"highlight","key":"highlight","value":{"rev":"9-4b172b7aef6f40d768f022b2ba4e6748"}}, +{"id":"highlight.js","key":"highlight.js","value":{"rev":"5-16c1ebd28d5f2e781e666c6ee013c30c"}}, +{"id":"hiker","key":"hiker","value":{"rev":"9-89d1ce978b349f1f0df262655299d83c"}}, +{"id":"hipchat","key":"hipchat","value":{"rev":"3-73118782367d474af0f6410290df5f7f"}}, +{"id":"hipchat-js","key":"hipchat-js","value":{"rev":"3-253b83875d3e18e9c89333bc377183c3"}}, +{"id":"hiredis","key":"hiredis","value":{"rev":"46-29ceb03860efbd4b3b995247f27f78b9"}}, +{"id":"hive","key":"hive","value":{"rev":"15-40a4c6fcfa3b80007a18ef4ede80075b"}}, +{"id":"hive-cache","key":"hive-cache","value":{"rev":"3-36b10607b68586fccbfeb856412bd6bf"}}, +{"id":"hoard","key":"hoard","value":{"rev":"13-75d4c484095e2e38ac63a65bd9fd7f4b"}}, +{"id":"hook","key":"hook","value":{"rev":"7-2f1e375058e2b1fa61d3651f6d57a6f8"}}, +{"id":"hook.io","key":"hook.io","value":{"rev":"63-9fac4fb8337d1953963d47144f806f72"}}, +{"id":"hook.io-browser","key":"hook.io-browser","value":{"rev":"3-7e04347d80adc03eb5637b7e4b8ca58b"}}, +{"id":"hook.io-couch","key":"hook.io-couch","value":{"rev":"3-ce0eb281d1ba21aa1caca3a52553a07b"}}, +{"id":"hook.io-cron","key":"hook.io-cron","value":{"rev":"15-50deedc2051ce65bca8a42048154139c"}}, +{"id":"hook.io-helloworld","key":"hook.io-helloworld","value":{"rev":"23-ef5cf0cec9045d28d846a7b0872874e4"}}, +{"id":"hook.io-irc","key":"hook.io-irc","value":{"rev":"5-39c7ac5e192aef34b87af791fa77ee04"}}, +{"id":"hook.io-logger","key":"hook.io-logger","value":{"rev":"13-9e3208ea8eacfe5378cd791f2377d06d"}}, +{"id":"hook.io-mailer","key":"hook.io-mailer","value":{"rev":"9-d9415d53dc086102024cf7400fdfb7a2"}}, +{"id":"hook.io-pinger","key":"hook.io-pinger","value":{"rev":"17-860ab3a892284b91999f86c3882e2ff5"}}, +{"id":"hook.io-repl","key":"hook.io-repl","value":{"rev":"13-c0d430ccdfd197e4746c46d2814b6d92"}}, +{"id":"hook.io-request","key":"hook.io-request","value":{"rev":"13-f0e8d167d59917d90266f921e3ef7c64"}}, +{"id":"hook.io-sitemonitor","key":"hook.io-sitemonitor","value":{"rev":"8-725ea7deb9cb1031eabdc4fd798308ff"}}, +{"id":"hook.io-twilio","key":"hook.io-twilio","value":{"rev":"11-6b2e231307f6174861aa5dcddad264b3"}}, +{"id":"hook.io-twitter","key":"hook.io-twitter","value":{"rev":"3-59296395b22e661e7e5c141c4c7be46d"}}, +{"id":"hook.io-webhook","key":"hook.io-webhook","value":{"rev":"15-b27e51b63c8ec70616c66061d949f388"}}, +{"id":"hook.io-webserver","key":"hook.io-webserver","value":{"rev":"29-eb6bff70736648427329eba08b5f55c3"}}, +{"id":"hook.io-ws","key":"hook.io-ws","value":{"rev":"4-a85578068b54560ef663a7ecfea2731f"}}, +{"id":"hooks","key":"hooks","value":{"rev":"33-6640fb0c27903af6b6ae7b7c41d79e01"}}, +{"id":"hoptoad-notifier","key":"hoptoad-notifier","value":{"rev":"16-8249cb753a3626f2bf2664024ae7a5ee"}}, +{"id":"horaa","key":"horaa","value":{"rev":"5-099e5d6486d10944e10b584eb3f6e924"}}, +{"id":"hornet","key":"hornet","value":{"rev":"22-8c40d7ba4ca832b951e6d5db165f3305"}}, +{"id":"horseman","key":"horseman","value":{"rev":"11-7228e0f84c2036669a218710c22f72c0"}}, +{"id":"hostify","key":"hostify","value":{"rev":"11-8c1a2e73f8b9474a6c26121688c28dc7"}}, +{"id":"hostinfo","key":"hostinfo","value":{"rev":"5-c8d638f40ccf94f4083430966d25e787"}}, +{"id":"hostip","key":"hostip","value":{"rev":"3-d4fd628b94e1f913d97ec1746d96f2a0"}}, +{"id":"hostname","key":"hostname","value":{"rev":"7-55fefb3c37990bbcad3d98684d17f38f"}}, +{"id":"hotnode","key":"hotnode","value":{"rev":"16-d7dad5de3ffc2ca6a04f74686aeb0e4b"}}, +{"id":"howmuchtime","key":"howmuchtime","value":{"rev":"3-351ce870ae6e2c21a798169d074e2a3f"}}, +{"id":"hstore","key":"hstore","value":{"rev":"3-55ab4d359c2fc8725829038e3adb7571"}}, +{"id":"hsume2-socket.io","key":"hsume2-socket.io","value":{"rev":"5-4b537247ae9999c285c802cc36457598"}}, +{"id":"htdoc","key":"htdoc","value":{"rev":"3-80ef9e3202b0d96b79435a2bc90bc899"}}, +{"id":"html","key":"html","value":{"rev":"3-92c4af7de329c92ff2e0be5c13020e78"}}, +{"id":"html-minifier","key":"html-minifier","value":{"rev":"7-2441ed004e2a6e7f1c42003ec03277ec"}}, +{"id":"html-sourcery","key":"html-sourcery","value":{"rev":"11-7ce1d4aa2e1d319fa108b02fb294d4ce"}}, +{"id":"html2coffeekup","key":"html2coffeekup","value":{"rev":"13-bae4a70411f6f549c281c69835fe3276"}}, +{"id":"html2coffeekup-bal","key":"html2coffeekup-bal","value":{"rev":"5-0663ac1339d72932004130b668c949f0"}}, +{"id":"html2jade","key":"html2jade","value":{"rev":"11-e50f504c5c847d7ffcde7328c2ade4fb"}}, +{"id":"html5","key":"html5","value":{"rev":"46-ca85ea99accaf1dc9ded4e2e3aa429c6"}}, +{"id":"html5edit","key":"html5edit","value":{"rev":"10-0383296c33ada4d356740f29121eeb9f"}}, +{"id":"htmlKompressor","key":"htmlKompressor","value":{"rev":"13-95a3afe7f7cfe02e089e41588b937fb1"}}, +{"id":"htmlkup","key":"htmlkup","value":{"rev":"27-5b0115636f38886ae0a40e5f52e2bfdd"}}, +{"id":"htmlparser","key":"htmlparser","value":{"rev":"14-52b2196c1456d821d47bb1d2779b2433"}}, +{"id":"htmlparser2","key":"htmlparser2","value":{"rev":"3-9bc0b807acd913999dfc949b3160a3db"}}, +{"id":"htracr","key":"htracr","value":{"rev":"27-384d0522328e625978b97d8eae8d942d"}}, +{"id":"http","key":"http","value":{"rev":"3-f197d1b599cb9da720d3dd58d9813ace"}}, +{"id":"http-agent","key":"http-agent","value":{"rev":"10-1715dd3a7adccf55bd6637d78bd345d1"}}, +{"id":"http-auth","key":"http-auth","value":{"rev":"3-21636d4430be18a5c6c42e5cb622c2e0"}}, +{"id":"http-basic-auth","key":"http-basic-auth","value":{"rev":"6-0a77e99ce8e31558d5917bd684fa2c9a"}}, +{"id":"http-browserify","key":"http-browserify","value":{"rev":"3-4f720b4af628ed8b5fb22839c1f91f4d"}}, +{"id":"http-console","key":"http-console","value":{"rev":"43-a20cbefed77bcae7de461922286a1f04"}}, +{"id":"http-digest","key":"http-digest","value":{"rev":"6-e0164885dcad21ab6150d537af0edd92"}}, +{"id":"http-digest-auth","key":"http-digest-auth","value":{"rev":"7-613ac841b808fd04e272e050fd5a45ac"}}, +{"id":"http-get","key":"http-get","value":{"rev":"39-b7cfeb2b572d4ecf695493e0886869f4"}}, +{"id":"http-load","key":"http-load","value":{"rev":"3-8c64f4972ff59e89fee041adde99b8ba"}}, +{"id":"http-proxy","key":"http-proxy","value":{"rev":"97-5b8af88886c8c047a9862bf62f6b9294"}}, +{"id":"http-proxy-backward","key":"http-proxy-backward","value":{"rev":"2-4433b04a41e8adade3f6b6b2b939df4b"}}, +{"id":"http-proxy-glimpse","key":"http-proxy-glimpse","value":{"rev":"3-a3e9791d4d9bfef5929ca55d874df18b"}}, +{"id":"http-proxy-no-line-184-error","key":"http-proxy-no-line-184-error","value":{"rev":"3-7e20a990820976d8c6d27c312cc5a67c"}}, +{"id":"http-proxy-selective","key":"http-proxy-selective","value":{"rev":"12-6e273fcd008afeceb6737345c46e1024"}}, +{"id":"http-recorder","key":"http-recorder","value":{"rev":"3-26dd0bc4f5c0bf922db1875e995d025f"}}, +{"id":"http-request-provider","key":"http-request-provider","value":{"rev":"6-436b69971dd1735ac3e41571375f2d15"}}, +{"id":"http-server","key":"http-server","value":{"rev":"21-1b80b6558692afd08c36629b0ecdc18c"}}, +{"id":"http-signature","key":"http-signature","value":{"rev":"9-49ca63427b535f2d18182d92427bc5b6"}}, +{"id":"http-stack","key":"http-stack","value":{"rev":"9-51614060741d6c85a7fd4c714ed1a9b2"}}, +{"id":"http-status","key":"http-status","value":{"rev":"5-1ec72fecc62a41d6f180d15c95e81270"}}, +{"id":"http_compat","key":"http_compat","value":{"rev":"3-88244d4b0fd08a3140fa1b2e8b1b152c"}}, +{"id":"http_router","key":"http_router","value":{"rev":"23-ad52b58b6bfc96d6d4e8215e0c31b294"}}, +{"id":"http_trace","key":"http_trace","value":{"rev":"7-d8024b5e41540e4240120ffefae523e4"}}, +{"id":"httpd","key":"httpd","value":{"rev":"3-9e2a19f007a6a487cdb752f4b8249657"}}, +{"id":"httpmock","key":"httpmock","value":{"rev":"3-b6966ba8ee2c31b0e7729fc59bb00ccf"}}, +{"id":"https-proxied","key":"https-proxied","value":{"rev":"5-f63a4c663d372502b0dcd4997e759e66"}}, +{"id":"httpu","key":"httpu","value":{"rev":"5-88a5b2bac8391d91673fc83d4cfd32df"}}, +{"id":"hungarian-magic","key":"hungarian-magic","value":{"rev":"4-9eae750ac6f30b6687d9a031353f5217"}}, +{"id":"huntergatherer","key":"huntergatherer","value":{"rev":"9-5c9d833a134cfaa901d89dce93f5b013"}}, +{"id":"hxp","key":"hxp","value":{"rev":"8-1f52ba766491826bdc6517c6cc508b2c"}}, +{"id":"hyde","key":"hyde","value":{"rev":"3-5763db65cab423404752b1a6354a7a6c"}}, +{"id":"hydra","key":"hydra","value":{"rev":"8-8bb4ed249fe0f9cdb8b11e492b646b88"}}, +{"id":"hyperpublic","key":"hyperpublic","value":{"rev":"11-5738162f3dbf95803dcb3fb28efd8740"}}, +{"id":"i18n","key":"i18n","value":{"rev":"7-f0d6b3c72ecd34dde02d805041eca996"}}, +{"id":"ical","key":"ical","value":{"rev":"13-baf448be48ab83ec9b3fb8bf83fbb9a1"}}, +{"id":"icalendar","key":"icalendar","value":{"rev":"5-78dd8fd8ed2c219ec56ad26a0727cf76"}}, +{"id":"icecap","key":"icecap","value":{"rev":"9-88d6865078a5e6e1ff998e2e73e593f3"}}, +{"id":"icecapdjs","key":"icecapdjs","value":{"rev":"11-d8e3c718a230d49caa3b5f76cfff7ce9"}}, +{"id":"icecast-stack","key":"icecast-stack","value":{"rev":"9-13b8da6ae373152ab0c8560e2f442af0"}}, +{"id":"ichabod","key":"ichabod","value":{"rev":"19-d0f02ffba80661398ceb80a7e0cbbfe6"}}, +{"id":"icing","key":"icing","value":{"rev":"11-84815e78828190fbaa52d6b93c75cb4f"}}, +{"id":"ico","key":"ico","value":{"rev":"3-5727a35c1df453bfdfa6a03e49725adf"}}, +{"id":"iconv","key":"iconv","value":{"rev":"18-5f5b3193268f1fa099e0112b3e033ffc"}}, +{"id":"iconv-jp","key":"iconv-jp","value":{"rev":"3-660b8f2def930263d2931cae2dcc401d"}}, +{"id":"id3","key":"id3","value":{"rev":"8-afe68aede872cae7b404aaa01c0108a5"}}, +{"id":"idea","key":"idea","value":{"rev":"9-a126c0e52206c51dcf972cf53af0bc32"}}, +{"id":"idiomatic-console","key":"idiomatic-console","value":{"rev":"25-67696c16bf79d1cc8caf4df62677c3ec"}}, +{"id":"idiomatic-stdio","key":"idiomatic-stdio","value":{"rev":"15-9d74c9a8872b1f7c41d6c671d7a14b7d"}}, +{"id":"iglob","key":"iglob","value":{"rev":"6-b8a3518cb67cad20c89f37892a2346a5"}}, +{"id":"ignite","key":"ignite","value":{"rev":"19-06daa730a70f69dc3a0d6d4984905c61"}}, +{"id":"iles-forked-irc-js","key":"iles-forked-irc-js","value":{"rev":"7-eb446f4e0db856e00351a5da2fa20616"}}, +{"id":"image","key":"image","value":{"rev":"8-5f7811db33c210eb38e1880f7cc433f2"}}, +{"id":"imageable","key":"imageable","value":{"rev":"61-9f7e03d3d990d34802f1e9c8019dbbfa"}}, +{"id":"imageinfo","key":"imageinfo","value":{"rev":"11-9bde1a1f0801d94539a4b70b61614849"}}, +{"id":"imagemagick","key":"imagemagick","value":{"rev":"10-b1a1ea405940fecf487da94b733e8c29"}}, +{"id":"imagick","key":"imagick","value":{"rev":"3-21d51d8a265a705881dadbc0c9f7c016"}}, +{"id":"imap","key":"imap","value":{"rev":"13-6a59045496c80b474652d2584edd4acb"}}, +{"id":"imbot","key":"imbot","value":{"rev":"11-0d8075eff5e5ec354683f396378fd101"}}, +{"id":"imdb","key":"imdb","value":{"rev":"7-2bba884d0e8804f4a7e0883abd47b0a7"}}, +{"id":"imgur","key":"imgur","value":{"rev":"3-30c0e5fddc1be3398ba5f7eee1a251d7"}}, +{"id":"impact","key":"impact","value":{"rev":"7-d3390690f11c6f9dcca9f240a7bedfef"}}, +{"id":"imsi","key":"imsi","value":{"rev":"3-0aa9a01c9c79b17afae3684b7b920ced"}}, +{"id":"index","key":"index","value":{"rev":"13-ad5d8d7dfad64512a12db4d820229c07"}}, +{"id":"indexer","key":"indexer","value":{"rev":"9-b0173ce9ad9fa1b80037fa8e33a8ce12"}}, +{"id":"inflect","key":"inflect","value":{"rev":"17-9e5ea2826fe08bd950cf7e22d73371bd"}}, +{"id":"inflectjs","key":"inflectjs","value":{"rev":"3-c59db027b72be720899b4a280ac2518f"}}, +{"id":"inflector","key":"inflector","value":{"rev":"3-191ff29d3b5ed8ef6877032a1d01d864"}}, +{"id":"inheritance","key":"inheritance","value":{"rev":"3-450a1e68bd2d8f16abe7001491abb6a8"}}, +{"id":"inherits","key":"inherits","value":{"rev":"3-284f97a7ae4f777bfabe721b66de07fa"}}, +{"id":"ini","key":"ini","value":{"rev":"5-142c8f9125fbace57689e2837deb1883"}}, +{"id":"iniparser","key":"iniparser","value":{"rev":"14-1053c59ef3d50a46356be45576885c49"}}, +{"id":"inireader","key":"inireader","value":{"rev":"15-9cdc485b18bff6397f5fec45befda402"}}, +{"id":"init","key":"init","value":{"rev":"5-b81610ad72864417dab49f7a3f29cc9f"}}, +{"id":"inject","key":"inject","value":{"rev":"5-82bddb6b4f21ddaa0137fedc8913d60e"}}, +{"id":"inliner","key":"inliner","value":{"rev":"45-8a1c3e8f78438f06865b3237d6c5339a"}}, +{"id":"inode","key":"inode","value":{"rev":"7-118ffafc62dcef5bbeb14e4328c68ab3"}}, +{"id":"inotify","key":"inotify","value":{"rev":"18-03d7b1a318bd283e0185b414b48dd602"}}, +{"id":"inotify-plusplus","key":"inotify-plusplus","value":{"rev":"10-0e0ce9065a62e5e21ee5bb53fac61a6d"}}, +{"id":"inspect","key":"inspect","value":{"rev":"5-b5f18717e29caec3399abe5e4ce7a269"}}, +{"id":"instagram","key":"instagram","value":{"rev":"5-decddf3737a1764518b6a7ce600d720d"}}, +{"id":"instagram-node-lib","key":"instagram-node-lib","value":{"rev":"13-8be77f1180b6afd9066834b3f5ee8de5"}}, +{"id":"instant-styleguide","key":"instant-styleguide","value":{"rev":"9-66c02118993621376ad0b7396db435b3"}}, +{"id":"intercept","key":"intercept","value":{"rev":"9-f5622744c576405516a427b4636ee864"}}, +{"id":"interface","key":"interface","value":{"rev":"10-13806252722402bd18d88533056a863b"}}, +{"id":"interleave","key":"interleave","value":{"rev":"25-69bc136937604863748a029fb88e3605"}}, +{"id":"interstate","key":"interstate","value":{"rev":"3-3bb4a6c35ca765f88a10b9fab6307c59"}}, +{"id":"intervals","key":"intervals","value":{"rev":"21-89b71bd55b8d5f6b670d69fc5b9f847f"}}, +{"id":"intestine","key":"intestine","value":{"rev":"3-66a5531e06865ed9c966d95437ba1371"}}, +{"id":"ios7crypt","key":"ios7crypt","value":{"rev":"7-a2d309a2c074e5c1c456e2b56cbcfd17"}}, +{"id":"iostat","key":"iostat","value":{"rev":"11-f0849c0072e76701b435aa769a614e82"}}, +{"id":"ip2cc","key":"ip2cc","value":{"rev":"9-2c282606fd08d469184a272a2108639c"}}, +{"id":"ipaddr.js","key":"ipaddr.js","value":{"rev":"5-1017fd5342840745614701476ed7e6c4"}}, +{"id":"iptables","key":"iptables","value":{"rev":"7-23e56ef5d7bf0ee8f5bd0e38bde8aae3"}}, +{"id":"iptrie","key":"iptrie","value":{"rev":"4-10317b0e073befe9601e9dc308dc361a"}}, +{"id":"ipv6","key":"ipv6","value":{"rev":"6-85e937f3d79e44dbb76264c7aaaa140f"}}, +{"id":"iqengines","key":"iqengines","value":{"rev":"3-8bdbd32e9dc35b77d80a31edae235178"}}, +{"id":"irc","key":"irc","value":{"rev":"8-ed30964f57b99b1b2f2104cc5e269618"}}, +{"id":"irc-colors","key":"irc-colors","value":{"rev":"9-7ddb19db9a553567aae86bd97f1dcdfc"}}, +{"id":"irc-js","key":"irc-js","value":{"rev":"58-1c898cea420aee60283edb4fadceb90e"}}, +{"id":"ircat.js","key":"ircat.js","value":{"rev":"6-f25f20953ce96697c033315d250615d0"}}, +{"id":"ircbot","key":"ircbot","value":{"rev":"9-85a4a6f88836fc031855736676b10dec"}}, +{"id":"irccd","key":"irccd","value":{"rev":"3-bf598ae8b6af63be41852ae8199416f4"}}, +{"id":"ircd","key":"ircd","value":{"rev":"7-3ba7fc2183d32ee1e58e63092d7e82bb"}}, +{"id":"ircdjs","key":"ircdjs","value":{"rev":"15-8fcdff2bf29cf24c3bbc4b461e6cbe9f"}}, +{"id":"irclog","key":"irclog","value":{"rev":"3-79a99bd8048dd98a93c747a1426aabde"}}, +{"id":"ircrpc","key":"ircrpc","value":{"rev":"5-278bec6fc5519fdbd152ea4fa35dc58c"}}, +{"id":"irrklang","key":"irrklang","value":{"rev":"3-65936dfabf7777027069343c2e72b32e"}}, +{"id":"isaacs","key":"isaacs","value":{"rev":"7-c55a41054056f502bc580bc6819d9d1f"}}, +{"id":"isbn","key":"isbn","value":{"rev":"3-51e784ded2e3ec9ef9b382fecd1c26a1"}}, +{"id":"iscroll","key":"iscroll","value":{"rev":"4-4f6635793806507665503605e7c180f0"}}, +{"id":"isodate","key":"isodate","value":{"rev":"7-ea4b1f77e9557b153264f68fd18a9f23"}}, +{"id":"it-is","key":"it-is","value":{"rev":"14-7617f5831c308d1c4ef914bc5dc30fa7"}}, +{"id":"iterator","key":"iterator","value":{"rev":"3-e6f70367a55cabbb89589f2a88be9ab0"}}, +{"id":"itunes","key":"itunes","value":{"rev":"7-47d151c372d70d0bc311141749c84d5a"}}, +{"id":"iws","key":"iws","value":{"rev":"3-dc7b4d18565b79d3e14aa691e5e632f4"}}, +{"id":"jQuery","key":"jQuery","value":{"rev":"29-f913933259b4ec5f4c5ea63466a4bb08"}}, +{"id":"jWorkflow","key":"jWorkflow","value":{"rev":"7-582cd7aa62085ec807117138b6439550"}}, +{"id":"jaCodeMap","key":"jaCodeMap","value":{"rev":"7-28efcbf4146977bdf1e594e0982ec097"}}, +{"id":"jaaulde-cookies","key":"jaaulde-cookies","value":{"rev":"3-d5b5a75f9cabbebb2804f0b4ae93d0c5"}}, +{"id":"jacker","key":"jacker","value":{"rev":"3-888174c7e3e2a5d241f2844257cf1b10"}}, +{"id":"jade","key":"jade","value":{"rev":"144-318a9d9f63906dc3da1ef7c1ee6420b5"}}, +{"id":"jade-browser","key":"jade-browser","value":{"rev":"9-0ae6b9e321cf04e3ca8fbfe0e38f4d9e"}}, +{"id":"jade-client-connect","key":"jade-client-connect","value":{"rev":"5-96dbafafa31187dd7f829af54432de8e"}}, +{"id":"jade-ext","key":"jade-ext","value":{"rev":"9-aac9a58a4e07d82bc496bcc4241d1be0"}}, +{"id":"jade-i18n","key":"jade-i18n","value":{"rev":"23-76a21a41b5376e10c083672dccf7fc62"}}, +{"id":"jade-serial","key":"jade-serial","value":{"rev":"3-5ec712e1d8cd8d5af20ae3e62ee92854"}}, +{"id":"jadedown","key":"jadedown","value":{"rev":"11-0d16ce847d6afac2939eebcb24a7216c"}}, +{"id":"jadeify","key":"jadeify","value":{"rev":"17-4322b68bb5a7e81e839edabbc8c405a4"}}, +{"id":"jadevu","key":"jadevu","value":{"rev":"15-1fd8557a6db3c23f267de76835f9ee65"}}, +{"id":"jah","key":"jah","value":{"rev":"3-f29704037a1cffe2b08abb4283bee4a4"}}, +{"id":"jake","key":"jake","value":{"rev":"36-5cb64b1c5a89ac53eb4d09d66a5b10e1"}}, +{"id":"jammit-express","key":"jammit-express","value":{"rev":"6-e3dfa928114a2721fe9b8882d284f759"}}, +{"id":"janrain","key":"janrain","value":{"rev":"5-9554501be76fb3a472076858d1abbcd5"}}, +{"id":"janrain-api","key":"janrain-api","value":{"rev":"3-f45a65c695f4c72fdd1bf3593d8aa796"}}, +{"id":"jaque","key":"jaque","value":{"rev":"32-7f269a70c67beefc53ba1684bff5a57b"}}, +{"id":"jar","key":"jar","value":{"rev":"3-7fe0ab4aa3a2ccc5d50853f118e7aeb5"}}, +{"id":"jarvis","key":"jarvis","value":{"rev":"3-fb203b29b397a0b12c1ae56240624e3d"}}, +{"id":"jarvis-test","key":"jarvis-test","value":{"rev":"5-9537ddae8291e6dad03bc0e6acc9ac80"}}, +{"id":"jasbin","key":"jasbin","value":{"rev":"25-ae22f276406ac8bb4293d78595ce02ad"}}, +{"id":"jasmine-dom","key":"jasmine-dom","value":{"rev":"17-686de4c573f507c30ff72c6671dc3d93"}}, +{"id":"jasmine-jquery","key":"jasmine-jquery","value":{"rev":"7-86c077497a367bcd9ea96d5ab8137394"}}, +{"id":"jasmine-node","key":"jasmine-node","value":{"rev":"27-4c544c41c69d2b3cb60b9953d1c46d54"}}, +{"id":"jasmine-reporters","key":"jasmine-reporters","value":{"rev":"3-21ba522ae38402848d5a66d3d4d9a2b3"}}, +{"id":"jasmine-runner","key":"jasmine-runner","value":{"rev":"23-7458777b7a6785efc878cfd40ccb99d8"}}, +{"id":"jasminy","key":"jasminy","value":{"rev":"3-ce76023bac40c5f690cba59d430fd083"}}, +{"id":"jason","key":"jason","value":{"rev":"15-394a59963c579ed5db37fada4d082b5c"}}, +{"id":"javiary","key":"javiary","value":{"rev":"5-661be61fd0f47c9609b7d148e298e2fc"}}, +{"id":"jazz","key":"jazz","value":{"rev":"12-d11d602c1240b134b0593425911242fc"}}, +{"id":"jdoc","key":"jdoc","value":{"rev":"3-0c61fdd6b367a9acac710e553927b290"}}, +{"id":"jeesh","key":"jeesh","value":{"rev":"13-23b4e1ecf9ca76685bf7f1bfc6c076f1"}}, +{"id":"jellyfish","key":"jellyfish","value":{"rev":"25-7fef81f9b5ef5d4abbcecb030a433a72"}}, +{"id":"jen","key":"jen","value":{"rev":"3-ab1b07453318b7e0254e1dadbee7868f"}}, +{"id":"jerk","key":"jerk","value":{"rev":"34-e31f26d5e3b700d0a3e5f5a5acf0d381"}}, +{"id":"jessie","key":"jessie","value":{"rev":"19-829b932e57204f3b7833b34f75d6bf2a"}}, +{"id":"jezebel","key":"jezebel","value":{"rev":"15-b67c259e160390064da69a512382e06f"}}, +{"id":"jimi","key":"jimi","value":{"rev":"10-cc4a8325d6b847362a422304a0057231"}}, +{"id":"jinjs","key":"jinjs","value":{"rev":"37-38fcf1989f1b251a35e4ff725118f55e"}}, +{"id":"jinkies","key":"jinkies","value":{"rev":"30-73fec0e854aa31bcbf3ae1ca04462b22"}}, +{"id":"jison","key":"jison","value":{"rev":"52-d03c6f5e2bdd7624d39d93ec5e88c383"}}, +{"id":"jitsu","key":"jitsu","value":{"rev":"164-95083f8275f0bf2834f62027569b4da2"}}, +{"id":"jitter","key":"jitter","value":{"rev":"16-3f7b183aa7922615f4b5b2fb46653477"}}, +{"id":"jj","key":"jj","value":{"rev":"21-1b3f97e9725e1241c96a884c85dc4e30"}}, +{"id":"jjw","key":"jjw","value":{"rev":"13-835c632dfc5df7dd37860bd0b2c1cb38"}}, +{"id":"jkwery","key":"jkwery","value":{"rev":"11-212429c9c9e1872d4e278da055b5ae0a"}}, +{"id":"jmen","key":"jmen","value":{"rev":"3-a0b67d5b84a077061d3fed2ddbf2c6a8"}}, +{"id":"jobmanager","key":"jobmanager","value":{"rev":"15-1a589ede5f10d1ea2f33f1bb91f9b3aa"}}, +{"id":"jobs","key":"jobs","value":{"rev":"12-3072b6164c5dca8fa9d24021719048ff"}}, +{"id":"jobvite","key":"jobvite","value":{"rev":"56-3d69b0e6d91722ef4908b4fe26bb5432"}}, +{"id":"jodoc","key":"jodoc","value":{"rev":"3-7b05c6d7b4c9a9fa85d3348948d2d52d"}}, +{"id":"johnny-mnemonic","key":"johnny-mnemonic","value":{"rev":"3-e8749d4be597f002aae720011b7c9273"}}, +{"id":"join","key":"join","value":{"rev":"5-ab92491dc83b5e8ed5f0cc49e306d5d5"}}, +{"id":"jolokia-client","key":"jolokia-client","value":{"rev":"26-1f93cb53f4a870b94540cdbf7627b1c4"}}, +{"id":"joo","key":"joo","value":{"rev":"11-e0d4a97eceacdd13769bc5f56e059aa7"}}, +{"id":"jools","key":"jools","value":{"rev":"3-9da332d524a117c4d72a58bb45fa34fd"}}, +{"id":"joose","key":"joose","value":{"rev":"22-ef8a1895680ad2f9c1cd73cd1afbb58e"}}, +{"id":"joosex-attribute","key":"joosex-attribute","value":{"rev":"18-119df97dba1ba2631c94d49e3142bbd7"}}, +{"id":"joosex-bridge-ext","key":"joosex-bridge-ext","value":{"rev":"20-5ad2168291aad2cf021df0a3eb103538"}}, +{"id":"joosex-class-simpleconstructor","key":"joosex-class-simpleconstructor","value":{"rev":"6-f71e02e44f611550374ad9f5d0c37fdf"}}, +{"id":"joosex-class-singleton","key":"joosex-class-singleton","value":{"rev":"6-3ba6b8644722b29febe384a368c18aab"}}, +{"id":"joosex-cps","key":"joosex-cps","value":{"rev":"20-493c65faf1ec59416bae475529c51cd4"}}, +{"id":"joosex-meta-lazy","key":"joosex-meta-lazy","value":{"rev":"13-ef8bc4e57006cfcecd72a344d8dc9da6"}}, +{"id":"joosex-namespace-depended","key":"joosex-namespace-depended","value":{"rev":"22-8a38a21f8564470b96082177e81f3db6"}}, +{"id":"joosex-observable","key":"joosex-observable","value":{"rev":"7-52e7018931e5465920bb6feab88aa468"}}, +{"id":"joosex-role-parameterized","key":"joosex-role-parameterized","value":{"rev":"6-65aa4fa4967c4fbe06357ccda5e6f810"}}, +{"id":"joosex-simplerequest","key":"joosex-simplerequest","value":{"rev":"10-12d105b60b8b3ca3a3626ca0ec53892d"}}, +{"id":"josp","key":"josp","value":{"rev":"3-c4fa8445a0d96037e00fe96d007bcf0c"}}, +{"id":"jot","key":"jot","value":{"rev":"3-8fab571ce3ad993f3594f3c2e0fc6915"}}, +{"id":"journey","key":"journey","value":{"rev":"40-efe1fa6c8d735592077c9a24b3b56a03"}}, +{"id":"jpeg","key":"jpeg","value":{"rev":"8-ab437fbaf88f32a7fb625a0b27521292"}}, +{"id":"jq","key":"jq","value":{"rev":"3-9d83287aa9e6aab25590fac9adbab968"}}, +{"id":"jqNode","key":"jqNode","value":{"rev":"3-fcaf2c47aba5637a4a23c64b6fc778cf"}}, +{"id":"jqbuild","key":"jqbuild","value":{"rev":"3-960edcea36784aa9ca135cd922e0cb9b"}}, +{"id":"jqserve","key":"jqserve","value":{"rev":"3-39272c5479aabaafe66ffa26a6eb3bb5"}}, +{"id":"jqtpl","key":"jqtpl","value":{"rev":"54-ce2b62ced4644d5fe24c3a8ebcb4d528"}}, +{"id":"jquajax","key":"jquajax","value":{"rev":"3-a079cb8f3a686faaafe420760e77a330"}}, +{"id":"jquery","key":"jquery","value":{"rev":"27-60fd58bba99d044ffe6e140bafd72595"}}, +{"id":"jquery-browserify","key":"jquery-browserify","value":{"rev":"9-a4e9afd657f3c632229afa356382f6a4"}}, +{"id":"jquery-deferred","key":"jquery-deferred","value":{"rev":"5-0fd0cec51f7424a50f0dba3cbe74fd58"}}, +{"id":"jquery-drive","key":"jquery-drive","value":{"rev":"3-8474f192fed5c5094e56bc91f5e8a0f8"}}, +{"id":"jquery-mousewheel","key":"jquery-mousewheel","value":{"rev":"3-cff81086cf651e52377a8d5052b09d64"}}, +{"id":"jquery-placeholdize","key":"jquery-placeholdize","value":{"rev":"3-7acc3fbda1b8daabce18876d2b4675e3"}}, +{"id":"jquery-tmpl-jst","key":"jquery-tmpl-jst","value":{"rev":"13-575031eb2f2b1e4c5562e195fce0bc93"}}, +{"id":"jquery.effects.blind","key":"jquery.effects.blind","value":{"rev":"3-5f3bec5913edf1bfcee267891f6204e2"}}, +{"id":"jquery.effects.bounce","key":"jquery.effects.bounce","value":{"rev":"3-245b2e7d9a1295dd0f7d568b8087190d"}}, +{"id":"jquery.effects.clip","key":"jquery.effects.clip","value":{"rev":"3-7aa63a590b6d90d5ea20e21c8dda675d"}}, +{"id":"jquery.effects.core","key":"jquery.effects.core","value":{"rev":"3-dd2fa270d8aea21104c2c92d6b06500d"}}, +{"id":"jquery.effects.drop","key":"jquery.effects.drop","value":{"rev":"3-8d0e30016e99460063a9a9000ce7b032"}}, +{"id":"jquery.effects.explode","key":"jquery.effects.explode","value":{"rev":"3-3d5e3bb2fb451f7eeaeb72b6743b6e6c"}}, +{"id":"jquery.effects.fade","key":"jquery.effects.fade","value":{"rev":"3-f362c762053eb278b5db5f92e248c3a5"}}, +{"id":"jquery.effects.fold","key":"jquery.effects.fold","value":{"rev":"3-c7d823c2b25c4f1e6a1801f4b1bc7a2c"}}, +{"id":"jquery.effects.highlight","key":"jquery.effects.highlight","value":{"rev":"3-44ef3c62a6b829382bffa6393cd31ed9"}}, +{"id":"jquery.effects.pulsate","key":"jquery.effects.pulsate","value":{"rev":"3-3cad87635cecc2602d40682cf669d2fe"}}, +{"id":"jquery.effects.scale","key":"jquery.effects.scale","value":{"rev":"3-2c8df02eeed343088e2253d84064a219"}}, +{"id":"jquery.effects.shake","key":"jquery.effects.shake","value":{"rev":"3-d63ab567d484311744d848b520a720c7"}}, +{"id":"jquery.effects.slide","key":"jquery.effects.slide","value":{"rev":"3-9eb5d1075d67045a8fa305e596981934"}}, +{"id":"jquery.effects.transfer","key":"jquery.effects.transfer","value":{"rev":"3-371bc87350ede6da53a40468b63200a9"}}, +{"id":"jquery.tmpl","key":"jquery.tmpl","value":{"rev":"5-75efd6c8c0ce030f2da12b984f9dfe6c"}}, +{"id":"jquery.ui.accordion","key":"jquery.ui.accordion","value":{"rev":"3-964ee7d6c50f31e7db6631da28e2261a"}}, +{"id":"jquery.ui.autocomplete","key":"jquery.ui.autocomplete","value":{"rev":"3-950d240629d142eab5e07c2776e39bcc"}}, +{"id":"jquery.ui.button","key":"jquery.ui.button","value":{"rev":"3-a1c7f3eeb9298ac0c116d75a176a6d17"}}, +{"id":"jquery.ui.core","key":"jquery.ui.core","value":{"rev":"3-b7ba340b7304a304f85c4d13438d1195"}}, +{"id":"jquery.ui.datepicker","key":"jquery.ui.datepicker","value":{"rev":"3-5b76579057f1b870959a06ab833f1972"}}, +{"id":"jquery.ui.dialog","key":"jquery.ui.dialog","value":{"rev":"3-0c314cee86bf67298759efcfd47246f6"}}, +{"id":"jquery.ui.draggable","key":"jquery.ui.draggable","value":{"rev":"3-b7a15d2bdbcdc6f0f3cd6e4522f9f1f3"}}, +{"id":"jquery.ui.droppable","key":"jquery.ui.droppable","value":{"rev":"3-86d8a1558f5e9383b271b4d968ba081d"}}, +{"id":"jquery.ui.mouse","key":"jquery.ui.mouse","value":{"rev":"3-ccb88d773c452c778c694f9f551cb816"}}, +{"id":"jquery.ui.position","key":"jquery.ui.position","value":{"rev":"3-c49c13b38592a363585600b7af54d977"}}, +{"id":"jquery.ui.progressbar","key":"jquery.ui.progressbar","value":{"rev":"3-b28dfadab64f9548b828c42bf870fcc9"}}, +{"id":"jquery.ui.resizable","key":"jquery.ui.resizable","value":{"rev":"3-aa356230544cbe8ab8dc5fab08cc0fa7"}}, +{"id":"jquery.ui.selectable","key":"jquery.ui.selectable","value":{"rev":"3-6b11846c104d580556e40eb5194c45f2"}}, +{"id":"jquery.ui.slider","key":"jquery.ui.slider","value":{"rev":"3-e8550b76bf58a9cbeca9ea91eb763257"}}, +{"id":"jquery.ui.sortable","key":"jquery.ui.sortable","value":{"rev":"3-1ddd981bd720f055fbd5bb1d06df55ad"}}, +{"id":"jquery.ui.tabs","key":"jquery.ui.tabs","value":{"rev":"3-e0514383f4d920b9dc23ef7a7ea4d8af"}}, +{"id":"jquery.ui.widget","key":"jquery.ui.widget","value":{"rev":"3-3a0800fa067c12d013168f74acf21e6d"}}, +{"id":"jqueryify","key":"jqueryify","value":{"rev":"3-2655cf6a45795a8bd138a464e6c18f04"}}, +{"id":"jrep","key":"jrep","value":{"rev":"3-edbcf6931b8a2b3f550727d8b839acc3"}}, +{"id":"js-beautify-node","key":"js-beautify-node","value":{"rev":"3-401cd1c130aaec2c090b578fe8db6290"}}, +{"id":"js-class","key":"js-class","value":{"rev":"5-a63fbb0136dcd602feee72e70674d5db"}}, +{"id":"js-jango","key":"js-jango","value":{"rev":"3-af4e4a7844791617e66a40a1c403bb98"}}, +{"id":"js-loader","key":"js-loader","value":{"rev":"13-8d9729495c1692e47d2cd923e839b4c8"}}, +{"id":"js-manager","key":"js-manager","value":{"rev":"5-6d384a2ce4737f13d417f85689c3c372"}}, +{"id":"js-nts","key":"js-nts","value":{"rev":"3-7d921611b567d2d890bc983c343558ef"}}, +{"id":"js-openstack","key":"js-openstack","value":{"rev":"11-d56996be276fbe6162573575932b1cba"}}, +{"id":"js-select","key":"js-select","value":{"rev":"9-9d20f6d86d9e6f8a84191346288b76ed"}}, +{"id":"js.io","key":"js.io","value":{"rev":"3-c5e16e13372ba592ccf2ac86ee007a1f"}}, +{"id":"js2","key":"js2","value":{"rev":"35-2dc694e48b67252d8787f5e889a07430"}}, +{"id":"js2coffee","key":"js2coffee","value":{"rev":"19-8eeafa894dcc0dc306b02e728543511e"}}, +{"id":"jsDAV","key":"jsDAV","value":{"rev":"11-4ab1935d98372503439b054daef2e78e"}}, +{"id":"jsDump","key":"jsDump","value":{"rev":"5-32d6e4032bd114245356970f0b76a58a"}}, +{"id":"jsSourceCodeParser","key":"jsSourceCodeParser","value":{"rev":"3-78c5e8624ab25fca99a7bb6cd9be402b"}}, +{"id":"jsapp","key":"jsapp","value":{"rev":"3-6758eb2743cc22f723a6612b34c8d943"}}, +{"id":"jscc-node","key":"jscc-node","value":{"rev":"3-5f52dc20dc2a188bc32e7219c9d2f225"}}, +{"id":"jscheckstyle","key":"jscheckstyle","value":{"rev":"5-82021f06a1bd824ac195e0ab8a3b598c"}}, +{"id":"jsclass","key":"jsclass","value":{"rev":"9-2a0656b9497c5a8208a0fefa5aae3350"}}, +{"id":"jsconfig","key":"jsconfig","value":{"rev":"3-b1afef99468f81eff319453623135a56"}}, +{"id":"jscssp","key":"jscssp","value":{"rev":"6-413ad0701e6dbb412e8a01aadb6672c4"}}, +{"id":"jsdata","key":"jsdata","value":{"rev":"5-53f8b26f28291dccfdff8f14e7f4c44c"}}, +{"id":"jsdeferred","key":"jsdeferred","value":{"rev":"8-bc238b921a1fa465503722756a98e9b7"}}, +{"id":"jsdoc","key":"jsdoc","value":{"rev":"3-386eb47a2761a1ad025996232751fba9"}}, +{"id":"jsdog","key":"jsdog","value":{"rev":"11-d4a523898a7c474b5c7b8cb8b24bafe8"}}, +{"id":"jsdom","key":"jsdom","value":{"rev":"63-86bc6b9d8bfdb99b793ac959e126f7ff"}}, +{"id":"jsftp","key":"jsftp","value":{"rev":"35-89cd772521d7ac3cead71c602ddeb819"}}, +{"id":"jsgi","key":"jsgi","value":{"rev":"20-dbef9d8dfb5c9bf1a3b6014159bb305a"}}, +{"id":"jsgi-node","key":"jsgi-node","value":{"rev":"1-8ec0892e521754aaf88684714d306af9"}}, +{"id":"jsgrep","key":"jsgrep","value":{"rev":"7-be19445481acdbbb684fdc2425d88d08"}}, +{"id":"jshelpers","key":"jshelpers","value":{"rev":"11-9509dcdd48bc494de76cae66217ebedb"}}, +{"id":"jshint","key":"jshint","value":{"rev":"34-ed2e7ea0e849126bd9821b86f23b7314"}}, +{"id":"jshint-autofix","key":"jshint-autofix","value":{"rev":"9-abbb3622aa8a47a8890dbbaab0009b6d"}}, +{"id":"jshint-mode","key":"jshint-mode","value":{"rev":"5-06ec066819b93c7ae6782c755a0e2125"}}, +{"id":"jshint-runner","key":"jshint-runner","value":{"rev":"7-6fc8a15e387a4e81e300a54a86a3a240"}}, +{"id":"jshtml","key":"jshtml","value":{"rev":"5-d3e96c31cf1cd2fcf7743defc1631c3a"}}, +{"id":"jsinc","key":"jsinc","value":{"rev":"9-0e4dc3ba04b440085a79d6001232abfc"}}, +{"id":"jslint","key":"jslint","value":{"rev":"10-ab451352333b5f3d29c6cdbab49187dd"}}, +{"id":"jslint-core","key":"jslint-core","value":{"rev":"3-1f874d8cca07b6f007bc80c23ba15e2e"}}, +{"id":"jslint-strict","key":"jslint-strict","value":{"rev":"8-3d694a0f3079691da1866de16f290ea2"}}, +{"id":"jslinux","key":"jslinux","value":{"rev":"13-033cb60c7867aae599863323a97f45c0"}}, +{"id":"jslitmus","key":"jslitmus","value":{"rev":"6-d3f3f82ea1a376acc2b24c69da003409"}}, +{"id":"jsmeter","key":"jsmeter","value":{"rev":"5-7838bb9b970cbaa29a48802c508fd091"}}, +{"id":"jsmin","key":"jsmin","value":{"rev":"6-002ad1b385915e60f895b5e52492fb94"}}, +{"id":"json","key":"json","value":{"rev":"39-1d24fb8c3bdf0ac533bfc52e74420adc"}}, +{"id":"json-browser","key":"json-browser","value":{"rev":"6-883f051c1297cf631adba1c855ff2e13"}}, +{"id":"json-builder","key":"json-builder","value":{"rev":"5-e7a996ff1ef89114ce2ab6de9b653af8"}}, +{"id":"json-command","key":"json-command","value":{"rev":"16-8239cb65563720c42da5562d3a031b09"}}, +{"id":"json-fu","key":"json-fu","value":{"rev":"5-7933c35711cb9d7673d7514fe495c56d"}}, +{"id":"json-line-protocol","key":"json-line-protocol","value":{"rev":"7-98de63467d154b40a029391af8a26042"}}, +{"id":"json-object","key":"json-object","value":{"rev":"7-534cd9680c386c5b9800848755698f2b"}}, +{"id":"json-ref","key":"json-ref","value":{"rev":"3-cd09776d166c3f77013e429737c7e1e9"}}, +{"id":"json-san","key":"json-san","value":{"rev":"7-8683abde23232c1d84266e7a2d5c4527"}}, +{"id":"json-schema","key":"json-schema","value":{"rev":"1-2f323062e7ec80d2ff765da43c7aaa7d"}}, +{"id":"json-sockets","key":"json-sockets","value":{"rev":"26-bfef71c0d9fb4d56010b05f47f142748"}}, +{"id":"json-storage","key":"json-storage","value":{"rev":"3-46139e3a54c0a27e67820df2c7e87dbf"}}, +{"id":"json-storage-model","key":"json-storage-model","value":{"rev":"3-8b77044e192791613cf92b2f3317357f"}}, +{"id":"json-streamify","key":"json-streamify","value":{"rev":"5-d98cd72265fba652481eef6baa980f46"}}, +{"id":"json-streams","key":"json-streams","value":{"rev":"3-e07fc5ca24b33145c8aacf9995d46723"}}, +{"id":"json-tables","key":"json-tables","value":{"rev":"3-37a652b54880487e66ffeee6822b945b"}}, +{"id":"json-template","key":"json-template","value":{"rev":"3-9ee3a101c60ea682fb88759b2df837e4"}}, +{"id":"json2","key":"json2","value":{"rev":"12-bc3d411db772e0947ca58a54c2084073"}}, +{"id":"json2ify","key":"json2ify","value":{"rev":"3-c2d6677cc35e4668c97cf6800a4728d8"}}, +{"id":"json2xml","key":"json2xml","value":{"rev":"3-e955b994479362685e2197b39909dea2"}}, +{"id":"json_req","key":"json_req","value":{"rev":"15-14520bc890cbb0ab4c142b59bf21c9f1"}}, +{"id":"jsonapi","key":"jsonapi","value":{"rev":"11-2b27aaca5643d6a5b3ab38721cf6342f"}}, +{"id":"jsonconfig","key":"jsonconfig","value":{"rev":"5-0072bb54cb0ae5b13eee4f1657ba6a29"}}, +{"id":"jsond","key":"jsond","value":{"rev":"13-7c3622aeb147dae4698608ee32d81b45"}}, +{"id":"jsondate","key":"jsondate","value":{"rev":"3-1da5d30ee1cf7c6d9605a446efd91478"}}, +{"id":"jsonds","key":"jsonds","value":{"rev":"9-af2867869a46787e58c337e700dbf0dd"}}, +{"id":"jsonds2","key":"jsonds2","value":{"rev":"3-e7ed9647cc1ba72e59b625840358c7ca"}}, +{"id":"jsonfiles","key":"jsonfiles","value":{"rev":"3-5e643ba75c401f653f505e7938540d83"}}, +{"id":"jsonify","key":"jsonify","value":{"rev":"3-91207fd1bc11668be7906f74992de6bb"}}, +{"id":"jsonize","key":"jsonize","value":{"rev":"3-4881031480a5326d9f5966189170db25"}}, +{"id":"jsonlint","key":"jsonlint","value":{"rev":"11-88d3c1c395846e7687f410e0dc405469"}}, +{"id":"jsonml","key":"jsonml","value":{"rev":"3-9990d9515fa554b5c7ff8bf8c7bb3308"}}, +{"id":"jsonparse","key":"jsonparse","value":{"rev":"3-569962847a5fd9d65fdf91af9e3e87a5"}}, +{"id":"jsonpointer","key":"jsonpointer","value":{"rev":"5-0310a11e82e9e22a4e5239dee2bc2213"}}, +{"id":"jsonprettify","key":"jsonprettify","value":{"rev":"3-173ae677f2110dfff8cb17dd2b4c68de"}}, +{"id":"jsonreq","key":"jsonreq","value":{"rev":"5-84b47d8c528ea7efa9aae113e5ff53cf"}}, +{"id":"jsonrpc","key":"jsonrpc","value":{"rev":"10-e40ff49715537320cbbbde67378f099e"}}, +{"id":"jsonrpc-ws","key":"jsonrpc-ws","value":{"rev":"7-73c385f3d35dadbdc87927f6a751e3ca"}}, +{"id":"jsonrpc2","key":"jsonrpc2","value":{"rev":"13-71efdea4f551d3a2550fcf5355ea8c8c"}}, +{"id":"jsontool","key":"jsontool","value":{"rev":"14-44bc979d3a8dc9295c825def01e533b4"}}, +{"id":"jsontoxml","key":"jsontoxml","value":{"rev":"8-2640fd26237ab4a45450748d392dd2d2"}}, +{"id":"jsontry","key":"jsontry","value":{"rev":"3-adb3f32f86419ac4b589ce41ab253952"}}, +{"id":"jsorm-i18n","key":"jsorm-i18n","value":{"rev":"3-54347174039512616ed76cc9a37605ea"}}, +{"id":"jsorm-utilities","key":"jsorm-utilities","value":{"rev":"3-187fc9f86ed8d32ebcb6c451fa7cc3c4"}}, +{"id":"jspack","key":"jspack","value":{"rev":"3-84955792d8b57fc301968daf674bace7"}}, +{"id":"jspkg","key":"jspkg","value":{"rev":"5-f5471c37554dad3492021490a70a1190"}}, +{"id":"jspp","key":"jspp","value":{"rev":"8-7607018fa48586f685dda17d77d0999b"}}, +{"id":"jss","key":"jss","value":{"rev":"20-4517b1daeda4f878debddc9f23347f00"}}, +{"id":"jst","key":"jst","value":{"rev":"27-8372bf5c052b6bd6e28f5d2c89b47e49"}}, +{"id":"jstestdriver","key":"jstestdriver","value":{"rev":"3-d26b172af33d6c45fc3dc96b96865714"}}, +{"id":"jstoxml","key":"jstoxml","value":{"rev":"15-c26b77ed5228500238c7b21a3dbdbbb7"}}, +{"id":"jsup","key":"jsup","value":{"rev":"3-54eb8598ae1a49bd1540e482a44a6abc"}}, +{"id":"jthon","key":"jthon","value":{"rev":"5-d578940ac32497839ff48d3f6205e9e2"}}, +{"id":"juggernaut","key":"juggernaut","value":{"rev":"20-15d33218943b9ec64b642e2a4a05e4b8"}}, +{"id":"juggernaut-yoomee","key":"juggernaut-yoomee","value":{"rev":"7-a58d429e46aac76260e236c64d20ff02"}}, +{"id":"jump","key":"jump","value":{"rev":"19-d47e23c31dc623b54e60004b08f6f624"}}, +{"id":"jumprope","key":"jumprope","value":{"rev":"5-98d4e2452f14d3b0996f04882b07d674"}}, +{"id":"junction","key":"junction","value":{"rev":"3-2b73ea17d862b1e95039141e98e53268"}}, +{"id":"jus-config","key":"jus-config","value":{"rev":"5-d2da00317dceb712d82dbfc776122dbe"}}, +{"id":"jus-i18n","key":"jus-i18n","value":{"rev":"3-d146cfc5f3c9aee769390ed921836b6e"}}, +{"id":"jus-task","key":"jus-task","value":{"rev":"13-d127de2a102eef2eb0d1b67810ecd558"}}, +{"id":"justtest","key":"justtest","value":{"rev":"17-467ee4ca606f0447a0c458550552fd0a"}}, +{"id":"jute","key":"jute","value":{"rev":"99-158d262e9126de5026bbfeb3168d9277"}}, +{"id":"jwt","key":"jwt","value":{"rev":"3-4cb8a706d1bc3c300bdadeba781c7bc4"}}, +{"id":"kaffeine","key":"kaffeine","value":{"rev":"47-261825b8d8cdf168387c6a275682dd0b"}}, +{"id":"kafka","key":"kafka","value":{"rev":"9-7465d4092e6322d0b744f017be8ffcea"}}, +{"id":"kahan","key":"kahan","value":{"rev":"5-107bb2dcdb51faaa00aef1e37eff91eb"}}, +{"id":"kahve-ansi","key":"kahve-ansi","value":{"rev":"5-a86d9a3ea56362fa81c8ee9f1ef8f2ef"}}, +{"id":"kahve-cake","key":"kahve-cake","value":{"rev":"3-873b4e553c4ba417c888aadce3b800f6"}}, +{"id":"kahve-classmethod","key":"kahve-classmethod","value":{"rev":"3-08e0a5786edc15539cc6746fe6c65bec"}}, +{"id":"kahve-exception","key":"kahve-exception","value":{"rev":"3-fb9d839cfdc069271cbc10fa27a87f3c"}}, +{"id":"kahve-progress","key":"kahve-progress","value":{"rev":"3-d2fcdd99793a0c3c3a314afb067a3701"}}, +{"id":"kanso","key":"kanso","value":{"rev":"41-2b18ab56cc86313daa840b7b3f63b318"}}, +{"id":"kaph","key":"kaph","value":{"rev":"7-c24622e38cf23bac67459bfe5a0edd63"}}, +{"id":"karait","key":"karait","value":{"rev":"9-a4abc4bc11c747448c4884cb714737c9"}}, +{"id":"kasabi","key":"kasabi","value":{"rev":"3-36cb65aef11d181c532f4549d58944e6"}}, +{"id":"kassit","key":"kassit","value":{"rev":"27-6fafe5122a4dda542a34ba18dddfc9ea"}}, +{"id":"kdtree","key":"kdtree","value":{"rev":"9-177bf5018be1f177d302af1d746b0462"}}, +{"id":"keeper","key":"keeper","value":{"rev":"13-43ce24b6e1fb8ac23c58a78e3e92d137"}}, +{"id":"kestrel","key":"kestrel","value":{"rev":"3-1303ae0617ed1076eed022176c78b0c4"}}, +{"id":"kettle","key":"kettle","value":{"rev":"3-385c10c43df484666148e796840e72c7"}}, +{"id":"keyed_list","key":"keyed_list","value":{"rev":"5-c98d8bc8619300da1a09098bb298bf16"}}, +{"id":"keyframely","key":"keyframely","value":{"rev":"5-586380d2258a099d8fa4748f2688b571"}}, +{"id":"keygrip","key":"keygrip","value":{"rev":"18-4178954fb4f0e26407851104876f1a03"}}, +{"id":"keyjson","key":"keyjson","value":{"rev":"5-96ab1d8b6fa77864883b657360070af4"}}, +{"id":"keymaster","key":"keymaster","value":{"rev":"8-e7eb722489b02991943e9934b8155162"}}, +{"id":"keys","key":"keys","value":{"rev":"12-8b34b8f593667f0c23f1841edb5b6fa3"}}, +{"id":"keysym","key":"keysym","value":{"rev":"13-ec57906511f8f2f896a9e81dc206ea77"}}, +{"id":"keyx","key":"keyx","value":{"rev":"3-80dc49b56e3ba1d280298c36afa2a82c"}}, +{"id":"khronos","key":"khronos","value":{"rev":"3-1a3772db2725c4c3098d5cf4ca2189a4"}}, +{"id":"kindred","key":"kindred","value":{"rev":"5-99c7f4f06e4a47e476f9d75737f719d7"}}, +{"id":"kiokujs","key":"kiokujs","value":{"rev":"8-4b96a9bc1866f58bb263b310e64df403"}}, +{"id":"kiokujs-backend-batch","key":"kiokujs-backend-batch","value":{"rev":"3-4739de0f2e0c01581ce0b02638d3df02"}}, +{"id":"kiokujs-backend-couchdb","key":"kiokujs-backend-couchdb","value":{"rev":"8-53e830e0a7e8ea810883c00ce79bfeef"}}, +{"id":"kiss.js","key":"kiss.js","value":{"rev":"11-7c9b1d7e2faee25ade6f1cad1bb261d9"}}, +{"id":"kissy","key":"kissy","value":{"rev":"8-3f8f7c169a3e84df6a7f68315f13b3ba"}}, +{"id":"kitkat","key":"kitkat","value":{"rev":"41-5f2600e4e1c503f63702c74195ff3361"}}, +{"id":"kitkat-express","key":"kitkat-express","value":{"rev":"3-91ef779ed9acdad1ca6f776e10a70246"}}, +{"id":"kizzy","key":"kizzy","value":{"rev":"5-f281b9e4037eda414f918ec9021e28c9"}}, +{"id":"kjs","key":"kjs","value":{"rev":"3-2ee03262f843e497161f1aef500dd229"}}, +{"id":"kju","key":"kju","value":{"rev":"5-0a7de1cd26864c85a22c7727c660d441"}}, +{"id":"klass","key":"klass","value":{"rev":"39-61491ef3824772d5ef33f7ea04219461"}}, +{"id":"klout-js","key":"klout-js","value":{"rev":"8-8d99f6dad9c21cb5da0d64fefef8c6d6"}}, +{"id":"knid","key":"knid","value":{"rev":"7-2cbfae088155da1044b568584cd296df"}}, +{"id":"knox","key":"knox","value":{"rev":"19-3c42553bd201b23a6bc15fdd073dad17"}}, +{"id":"knox-stream","key":"knox-stream","value":{"rev":"17-e40275f926b6ed645e4ef04caf8e5df4"}}, +{"id":"kns","key":"kns","value":{"rev":"9-5da1a89ad8c08f4b10cd715036200da3"}}, +{"id":"ko","key":"ko","value":{"rev":"9-9df2853d0e9ed9f7740f53291d0035dd"}}, +{"id":"koala","key":"koala","value":{"rev":"8-9e3fea91917f6d8cfb5aae22115e132f"}}, +{"id":"kohai","key":"kohai","value":{"rev":"3-1721a193589459fa077fea809fd7c9a9"}}, +{"id":"koku","key":"koku","value":{"rev":"5-414736980e0e70d90cd7f29b175fb18c"}}, +{"id":"komainu","key":"komainu","value":{"rev":"5-0f1a8f132fe58385e989dd4f93aefa26"}}, +{"id":"komodo-scheme","key":"komodo-scheme","value":{"rev":"3-97d1bd27f069684c491012e079fd82c4"}}, +{"id":"konphyg","key":"konphyg","value":{"rev":"7-e5fc03d6ddf39f2e0723291800bf0d43"}}, +{"id":"kranium","key":"kranium","value":{"rev":"3-4a78d2eb28e949a55b0dbd2ab00cecaf"}}, +{"id":"kue","key":"kue","value":{"rev":"21-053b32204d89a3067c5a90ca62ede08c"}}, +{"id":"kyatchi","key":"kyatchi","value":{"rev":"21-8dfbbe498f3740a2869c82e4ab4522d1"}}, +{"id":"kyoto","key":"kyoto","value":{"rev":"15-b9acdad89d56c71b6f427a443c16f85f"}}, +{"id":"kyoto-client","key":"kyoto-client","value":{"rev":"11-7fb392ee23ce64a48ae5638d713f4fbd"}}, +{"id":"kyoto-tycoon","key":"kyoto-tycoon","value":{"rev":"18-81ece8df26dbd9986efe1d97d935bec2"}}, +{"id":"kyuri","key":"kyuri","value":{"rev":"9-bedd4c087bd7bf612bde5e862d8b91bb"}}, +{"id":"labBuilder","key":"labBuilder","value":{"rev":"11-37f85b5325f1ccf25193c8b737823185"}}, +{"id":"laconic","key":"laconic","value":{"rev":"3-f5b7b9ac113fe7d32cbf4cb0d01c3052"}}, +{"id":"languagedetect","key":"languagedetect","value":{"rev":"3-ac487c034a3470ebd47b54614ea848f9"}}, +{"id":"lastfm","key":"lastfm","value":{"rev":"52-5af213489ca6ecdf2afc851c4642b082"}}, +{"id":"layers","key":"layers","value":{"rev":"7-62cd47d9645faa588c635dab2fbd2ef0"}}, +{"id":"lazy","key":"lazy","value":{"rev":"18-9b5ccdc9c3a970ec4c2b63b6f882da6a"}}, +{"id":"lazy-image","key":"lazy-image","value":{"rev":"5-34a6bc95017c50b3cb69981c7343e5da"}}, +{"id":"lazyBum","key":"lazyBum","value":{"rev":"15-03da6d744ba8cce7efca88ccb7e18c4d"}}, +{"id":"lazyprop","key":"lazyprop","value":{"rev":"14-82b4bcf318094a7950390f03e2fec252"}}, +{"id":"ldapjs","key":"ldapjs","value":{"rev":"11-e2b28e11a0aebe37b758d8f1ed61dd57"}}, +{"id":"ldapjs-riak","key":"ldapjs-riak","value":{"rev":"7-005413a1d4e371663626a3cca200c7e0"}}, +{"id":"ldifgrep","key":"ldifgrep","value":{"rev":"3-e4f06821a3444abbcd3c0c26300dcdda"}}, +{"id":"leaf","key":"leaf","value":{"rev":"8-0ccf5cdd1b59717b53375fe4bf044ec3"}}, +{"id":"lean","key":"lean","value":{"rev":"3-32dbbc771a3f1f6697c21c5d6c516967"}}, +{"id":"leche","key":"leche","value":{"rev":"7-0f5e19052ae1e3cb25ff2aa73271ae4f"}}, +{"id":"leche.spice.io","key":"leche.spice.io","value":{"rev":"3-07db415fdb746873f211e8155ecdf232"}}, +{"id":"less","key":"less","value":{"rev":"37-160fe5ea5dba44f02defdb8ec8c647d5"}}, +{"id":"less-bal","key":"less-bal","value":{"rev":"3-d50532c7c46013a62d06a0e54f8846ce"}}, +{"id":"less4clients","key":"less4clients","value":{"rev":"5-343d2973a166801681c856558d975ddf"}}, +{"id":"lessup","key":"lessup","value":{"rev":"9-a2e7627ef1b493fe82308d019ae481ac"}}, +{"id":"lessweb","key":"lessweb","value":{"rev":"9-e21794e578884c228dbed7c5d6128a41"}}, +{"id":"leveldb","key":"leveldb","value":{"rev":"11-3809e846a7a5ff883d17263288664195"}}, +{"id":"levenshtein","key":"levenshtein","value":{"rev":"6-44d27b6a6bc407772cafc29af485854f"}}, +{"id":"lib","key":"lib","value":{"rev":"5-a95272f11e927888c8b711503fce670b"}}, +{"id":"libdtrace","key":"libdtrace","value":{"rev":"8-4d4f72b2349154da514700f576e34564"}}, +{"id":"liberator","key":"liberator","value":{"rev":"15-b702710ccb3b45e41e9e2f3ebb6375ae"}}, +{"id":"libirc","key":"libirc","value":{"rev":"3-05b125de0c179dd311129aac2e1c8047"}}, +{"id":"liblzg","key":"liblzg","value":{"rev":"5-445ed45dc3cd166a299f85f6149aa098"}}, +{"id":"libnotify","key":"libnotify","value":{"rev":"10-c6723206898865e4828e963f5acc005e"}}, +{"id":"libxml-to-js","key":"libxml-to-js","value":{"rev":"33-64d3152875d33d6feffd618152bc41df"}}, +{"id":"libxmlext","key":"libxmlext","value":{"rev":"3-6a896dacba6f25fbca9b79d4143aaa9a"}}, +{"id":"libxmljs","key":"libxmljs","value":{"rev":"17-4b2949b53d9ecde79a99361774c1144b"}}, +{"id":"libxpm","key":"libxpm","value":{"rev":"3-c03efe75832c4416ceee5d72be12a8ef"}}, +{"id":"libyaml","key":"libyaml","value":{"rev":"5-f279bde715345a4e81d43c1d798ee608"}}, +{"id":"lift","key":"lift","value":{"rev":"21-61dcb771e5e0dc03fa327120d440ccda"}}, +{"id":"light-traits","key":"light-traits","value":{"rev":"26-b35c49550f9380fd462d57c64d51540f"}}, +{"id":"lightnode","key":"lightnode","value":{"rev":"3-ce37ccbf6a6546d4fa500e0eff84e882"}}, +{"id":"limestone","key":"limestone","value":{"rev":"3-d6f76ae98e4189db4ddfa8e15b4cdea9"}}, +{"id":"limited-file","key":"limited-file","value":{"rev":"3-c1d78250965b541836a70d3e867c694f"}}, +{"id":"lin","key":"lin","value":{"rev":"17-0a26ea2a603df0d14a9c40aad96bfb5e"}}, +{"id":"line-parser","key":"line-parser","value":{"rev":"7-84047425699f5a8a8836f4f2e63777bc"}}, +{"id":"line-reader","key":"line-reader","value":{"rev":"9-d2a7cb3a9793149e643490dc16a1eb50"}}, +{"id":"linebuffer","key":"linebuffer","value":{"rev":"12-8e79075aa213ceb49b28e0af7b3f3861"}}, +{"id":"lines","key":"lines","value":{"rev":"9-01a0565f47c3816919ca75bf77539df5"}}, +{"id":"lines-adapter","key":"lines-adapter","value":{"rev":"23-f287561e42a841c00bbf94bc8741bebc"}}, +{"id":"linestream","key":"linestream","value":{"rev":"5-18c2be87653ecf20407ed70eeb601ae7"}}, +{"id":"lingo","key":"lingo","value":{"rev":"10-b3d62b203c4af108feeaf0e32b2a4186"}}, +{"id":"link","key":"link","value":{"rev":"15-7570cea23333dbe3df11fd71171e6226"}}, +{"id":"linkedin-js","key":"linkedin-js","value":{"rev":"22-1bb1f392a9838684076b422840cf98eb"}}, +{"id":"linkscape","key":"linkscape","value":{"rev":"5-7272f50a54b1db015ce6d1e79eeedad7"}}, +{"id":"linkshare","key":"linkshare","value":{"rev":"3-634c4a18a217f77ccd6b89a9a2473d2a"}}, +{"id":"linode-api","key":"linode-api","value":{"rev":"13-2b43281ec86206312a2c387c9fc2c49f"}}, +{"id":"lint","key":"lint","value":{"rev":"49-fb76fddeb3ca609e5cac75fb0b0ec216"}}, +{"id":"linter","key":"linter","value":{"rev":"18-0fc884c96350f860cf2695f615572dba"}}, +{"id":"lintnode","key":"lintnode","value":{"rev":"8-b70bca986d7bde759521d0693dbc28b8"}}, +{"id":"linux-util","key":"linux-util","value":{"rev":"9-d049e8375e9c50b7f2b6268172d79734"}}, +{"id":"liquid","key":"liquid","value":{"rev":"3-353fa3c93ddf1951e3a75d60e6e8757b"}}, +{"id":"liquor","key":"liquor","value":{"rev":"3-4ee78e69a4a400a4de3491b0954947e7"}}, +{"id":"listener","key":"listener","value":{"rev":"5-02b5858d36aa99dcc5fc03c9274c94ee"}}, +{"id":"litmus","key":"litmus","value":{"rev":"9-7e403d052483301d025e9d09b4e7a9dd"}}, +{"id":"littering","key":"littering","value":{"rev":"5-9026438311ffc18d369bfa886c120bcd"}}, +{"id":"live-twitter-map","key":"live-twitter-map","value":{"rev":"3-45a40054bbab23374a4f1743c8bd711d"}}, +{"id":"livereload","key":"livereload","value":{"rev":"5-11ff486b4014ec1998705dbd396e96f2"}}, +{"id":"load","key":"load","value":{"rev":"7-2fff87aeb91d74bc57c134ee2cf0d65b"}}, +{"id":"loadbuilder","key":"loadbuilder","value":{"rev":"9-fa9c5cb13b3af03f9d9fbf5064fa0e0f"}}, +{"id":"loadit","key":"loadit","value":{"rev":"3-51bee062ed0d985757c6ae24929fa74e"}}, +{"id":"local-cdn","key":"local-cdn","value":{"rev":"9-9c2931766a559cf036318583455456e6"}}, +{"id":"localStorage","key":"localStorage","value":{"rev":"3-455fbe195db27131789b5d59db4504b0"}}, +{"id":"locales","key":"locales","value":{"rev":"5-bee452772e2070ec07af0dd86d6dbc41"}}, +{"id":"localhose","key":"localhose","value":{"rev":"9-3a2f63ecbed2e31400ca7515fd020a77"}}, +{"id":"localhost","key":"localhost","value":{"rev":"3-c6c4f6b5688cbe62865010099c9f461f"}}, +{"id":"localhostapp","key":"localhostapp","value":{"rev":"3-17884c4847c549e07e0c881fdf60d01f"}}, +{"id":"localize","key":"localize","value":{"rev":"7-1f83adb6d1eefcf7222a05f489b5db10"}}, +{"id":"location","key":"location","value":{"rev":"3-cc6fbf77b4ade80312bd95fde4e00015"}}, +{"id":"lockfile","key":"lockfile","value":{"rev":"3-4b4b79c2b0f09cc516db1a9d581c5038"}}, +{"id":"lode","key":"lode","value":{"rev":"15-5062a9a0863770d172097c5074a2bdae"}}, +{"id":"log","key":"log","value":{"rev":"12-0aa7922459ff8397764956c56a106930"}}, +{"id":"log-buddy","key":"log-buddy","value":{"rev":"3-64c6d4927d1d235d927f09c16c874e06"}}, +{"id":"log-watcher","key":"log-watcher","value":{"rev":"3-70f8727054c8e4104f835930578f4ee1"}}, +{"id":"log4js","key":"log4js","value":{"rev":"38-137b28e6e96515da7a6399cae86795dc"}}, +{"id":"log4js-amqp","key":"log4js-amqp","value":{"rev":"3-90530c28ef63d4598c12dfcf450929c0"}}, +{"id":"log5","key":"log5","value":{"rev":"17-920e3765dcfdc31bddf13de6895122b3"}}, +{"id":"logbot","key":"logbot","value":{"rev":"3-234eedc70b5474c713832e642f4dc3b4"}}, +{"id":"logger","key":"logger","value":{"rev":"3-5eef338fb5e845a81452fbb22e582aa7"}}, +{"id":"logging","key":"logging","value":{"rev":"22-99d320792c5445bd04699c4cf19edd89"}}, +{"id":"logging-system","key":"logging-system","value":{"rev":"5-5eda9d0b1d04256f5f44abe51cd14626"}}, +{"id":"loggly","key":"loggly","value":{"rev":"49-944a404e188327431a404e5713691a8c"}}, +{"id":"login","key":"login","value":{"rev":"44-7c450fe861230a5121ff294bcd6f97c9"}}, +{"id":"logly","key":"logly","value":{"rev":"7-832fe9af1cd8bfed84a065822cec398a"}}, +{"id":"logmagic","key":"logmagic","value":{"rev":"11-5d2c7dd32ba55e5ab85127be09723ef8"}}, +{"id":"logmonger","key":"logmonger","value":{"rev":"3-07a101d795f43f7af668210660274a7b"}}, +{"id":"lokki","key":"lokki","value":{"rev":"3-f6efcce38029ea0b4889707764088540"}}, +{"id":"long-stack-traces","key":"long-stack-traces","value":{"rev":"7-4b2fe23359b29e188cb2b8936b63891a"}}, +{"id":"loom","key":"loom","value":{"rev":"3-6348ab890611154da4881a0b351b0cb5"}}, +{"id":"loop","key":"loop","value":{"rev":"3-a56e9a6144f573092bb441106b370e0c"}}, +{"id":"looseleaf","key":"looseleaf","value":{"rev":"57-46ef6f055a40c34c714e3e9b9fe5d4cd"}}, +{"id":"lovely","key":"lovely","value":{"rev":"21-f577923512458f02f48ef59eebe55176"}}, +{"id":"lpd","key":"lpd","value":{"rev":"3-433711ae25002f67aa339380668fd491"}}, +{"id":"lpd-printers","key":"lpd-printers","value":{"rev":"3-47060e6c05fb4aad227d36f6e7941227"}}, +{"id":"lru-cache","key":"lru-cache","value":{"rev":"10-23c5e7423fe315745ef924f58c36e119"}}, +{"id":"ls-r","key":"ls-r","value":{"rev":"7-a769b11a06fae8ff439fe7eeb0806b5e"}}, +{"id":"lsof","key":"lsof","value":{"rev":"5-82aa3bcf23b8026a95e469b6188938f9"}}, +{"id":"ltx","key":"ltx","value":{"rev":"21-89ca85a9ce0c9fc13b20c0f1131168b0"}}, +{"id":"lucky-server","key":"lucky-server","value":{"rev":"3-a50d87239166f0ffc374368463f96b07"}}, +{"id":"lunapark","key":"lunapark","value":{"rev":"3-841d197f404da2e63d69b0c2132d87db"}}, +{"id":"lunchbot","key":"lunchbot","value":{"rev":"3-5d8984bef249e3d9e271560b5753f4cf"}}, +{"id":"lw-nun","key":"lw-nun","value":{"rev":"3-b686f89361b7b405e4581db6c60145ed"}}, +{"id":"lw-sass","key":"lw-sass","value":{"rev":"3-e46f90e0c8eab0c8c5d5eb8cf2a9a6da"}}, +{"id":"lwes","key":"lwes","value":{"rev":"3-939bb87efcbede1c1a70de881686fbce"}}, +{"id":"lwink","key":"lwink","value":{"rev":"3-1c432fafe4809e8d4a7e6214123ae452"}}, +{"id":"lzma","key":"lzma","value":{"rev":"3-31dc39414531e329b42b3a4ea0292c43"}}, +{"id":"m1node","key":"m1node","value":{"rev":"11-b34d55bdbc6f65b1814e77fab4a7e823"}}, +{"id":"m1test","key":"m1test","value":{"rev":"3-815ce56949e41e120082632629439eac"}}, +{"id":"m2node","key":"m2node","value":{"rev":"7-f50ec5578d995dd6a0a38e1049604bfc"}}, +{"id":"m2pdb","key":"m2pdb","value":{"rev":"3-ee798ac17c8c554484aceae2f77a826b"}}, +{"id":"m3u","key":"m3u","value":{"rev":"5-7ca6d768e0aed5b88dd45c943ca9ffa0"}}, +{"id":"mac","key":"mac","value":{"rev":"21-db5883c390108ff9ba46660c78b18b6c"}}, +{"id":"macchiato","key":"macchiato","value":{"rev":"5-0df1c87029e6005577fd8fd5cdb25947"}}, +{"id":"macgyver","key":"macgyver","value":{"rev":"3-f517699102b7bd696d8197d7ce57afb9"}}, +{"id":"macros","key":"macros","value":{"rev":"3-8356bcc0d1b1bd3879eeb880b2f3330b"}}, +{"id":"macrotest","key":"macrotest","value":{"rev":"10-2c6ceffb38f8ce5b0f382dbb02720d70"}}, +{"id":"maddy","key":"maddy","value":{"rev":"9-93d59c65c3f44aa6ed43dc986dd73ca5"}}, +{"id":"madmimi-node","key":"madmimi-node","value":{"rev":"11-257e1b1bd5ee5194a7052542952b8b7a"}}, +{"id":"maga","key":"maga","value":{"rev":"24-c69734f9fc138788db741b862f889583"}}, +{"id":"magic","key":"magic","value":{"rev":"34-aed787cc30ab86c95f547b9555d6a381"}}, +{"id":"magic-templates","key":"magic-templates","value":{"rev":"3-89546e9a038150cf419b4b15a84fd2aa"}}, +{"id":"magickal","key":"magickal","value":{"rev":"3-e9ed74bb90df0a52564d47aed0451ce7"}}, +{"id":"mai","key":"mai","value":{"rev":"5-f3561fe6de2bd25201250ddb6dcf9f01"}}, +{"id":"mail","key":"mail","value":{"rev":"14-9ae558552e6a7c11017f118a71c072e9"}}, +{"id":"mail-stack","key":"mail-stack","value":{"rev":"5-c82567203540076cf4878ea1ab197b52"}}, +{"id":"mailbox","key":"mailbox","value":{"rev":"12-0b582e127dd7cf669de16ec36f8056a4"}}, +{"id":"mailchimp","key":"mailchimp","value":{"rev":"23-3d9328ee938b7940322351254ea54877"}}, +{"id":"mailer","key":"mailer","value":{"rev":"40-7b251b758f9dba4667a3127195ea0380"}}, +{"id":"mailer-bal","key":"mailer-bal","value":{"rev":"3-fc8265b1905ea37638309d7c10852050"}}, +{"id":"mailer-fixed","key":"mailer-fixed","value":{"rev":"13-3004df43c62eb64ed5fb0306b019fe66"}}, +{"id":"mailgun","key":"mailgun","value":{"rev":"25-29de1adb355636822dc21fef51f37aed"}}, +{"id":"mailparser","key":"mailparser","value":{"rev":"14-7142e4168046418afc4a76d1b330f302"}}, +{"id":"mailto-parser","key":"mailto-parser","value":{"rev":"3-f8dea7b60c0e993211f81a86dcf5b18d"}}, +{"id":"makeerror","key":"makeerror","value":{"rev":"17-ceb9789357d80467c9ae75caa64ca8ac"}}, +{"id":"malt","key":"malt","value":{"rev":"7-e5e76a842eb0764a5ebe57290b629097"}}, +{"id":"mango","key":"mango","value":{"rev":"7-6224e74a3132e54f294f62998ed9127f"}}, +{"id":"map-reduce","key":"map-reduce","value":{"rev":"11-a81d8bdc6dae7e7b76d5df74fff40ae1"}}, +{"id":"mapnik","key":"mapnik","value":{"rev":"64-693f5b957b7faf361c2cc2a22747ebf7"}}, +{"id":"maptail","key":"maptail","value":{"rev":"14-8334618ddc20006a5f77ff35b172c152"}}, +{"id":"marak","key":"marak","value":{"rev":"3-27be187af00fc97501035dfb97a11ecf"}}, +{"id":"markdoc","key":"markdoc","value":{"rev":"13-23becdeda44b26ee54c9aaa31457e4ba"}}, +{"id":"markdom","key":"markdom","value":{"rev":"10-3c0df12e4f4a2e675d0f0fde48aa425f"}}, +{"id":"markdown","key":"markdown","value":{"rev":"19-88e02c28ce0179be900bf9e6aadc070f"}}, +{"id":"markdown-js","key":"markdown-js","value":{"rev":"6-964647c2509850358f70f4e23670fbeb"}}, +{"id":"markdown-wiki","key":"markdown-wiki","value":{"rev":"6-ce35fb0612a463db5852c5d3dcc7fdd3"}}, +{"id":"markdown2html","key":"markdown2html","value":{"rev":"3-549babe5d9497785fa8b9305c81d7214"}}, +{"id":"marked","key":"marked","value":{"rev":"21-9371df65f63131c9f24e8805db99a7d9"}}, +{"id":"markov","key":"markov","value":{"rev":"13-9ab795448c54ef87851f1392d6f3671a"}}, +{"id":"maryjane","key":"maryjane","value":{"rev":"3-e2e6cce443850b5df1554bf851d16760"}}, +{"id":"massagist","key":"massagist","value":{"rev":"11-cac3a103aecb4ff3f0f607aca2b1d3fb"}}, +{"id":"masson","key":"masson","value":{"rev":"10-87a5e6fd05bd4b8697fa3fa636238c20"}}, +{"id":"masstransit","key":"masstransit","value":{"rev":"11-74898c746e541ff1a00438017ee66d4a"}}, +{"id":"matchmaker","key":"matchmaker","value":{"rev":"3-192db6fb162bdf84fa3e858092fd3e20"}}, +{"id":"math","key":"math","value":{"rev":"5-16a74d8639e44a5ccb265ab1a3b7703b"}}, +{"id":"math-lexer","key":"math-lexer","value":{"rev":"19-54b42374b0090eeee50f39cb35f2eb40"}}, +{"id":"matrices","key":"matrices","value":{"rev":"43-06d64271a5148f89d649645712f8971f"}}, +{"id":"matrix","key":"matrix","value":{"rev":"3-77cff57242445cf3d76313b72bbc38f4"}}, +{"id":"matrixlib","key":"matrixlib","value":{"rev":"11-b3c105a5e5be1835183e7965d04825d9"}}, +{"id":"matterhorn","key":"matterhorn","value":{"rev":"9-a310dba2ea054bdce65e6df2f6ae85e5"}}, +{"id":"matterhorn-dust","key":"matterhorn-dust","value":{"rev":"3-2fb311986d62cf9f180aa76038ebf7b3"}}, +{"id":"matterhorn-gui","key":"matterhorn-gui","value":{"rev":"3-7921b46c9bff3ee82e4b32bc0a0a977d"}}, +{"id":"matterhorn-prng","key":"matterhorn-prng","value":{"rev":"3-c33fd59c1f1d24fb423553ec242e444b"}}, +{"id":"matterhorn-standard","key":"matterhorn-standard","value":{"rev":"13-0aaab6ecf55cdad6f773736da968afba"}}, +{"id":"matterhorn-state","key":"matterhorn-state","value":{"rev":"3-0ba8fd8a4c644b18aff34f1aef95db33"}}, +{"id":"matterhorn-user","key":"matterhorn-user","value":{"rev":"17-e42dc37a5cb24710803b3bd8dee7484d"}}, +{"id":"matterhorn-view","key":"matterhorn-view","value":{"rev":"3-b39042d665f5912d02e724d33d129a97"}}, +{"id":"mbtiles","key":"mbtiles","value":{"rev":"41-b92035d0ec8f47850734c4bb995baf7d"}}, +{"id":"mcast","key":"mcast","value":{"rev":"8-559b2b09cfa34cb88c16ae72ec90d28a"}}, +{"id":"md5","key":"md5","value":{"rev":"3-43d600c70f6442d3878c447585bf43bf"}}, +{"id":"mdgram","key":"mdgram","value":{"rev":"15-4d65cf0d5edef976de9a612c0cde0907"}}, +{"id":"mdns","key":"mdns","value":{"rev":"11-8b6789c3779fce7f019f9f10c625147a"}}, +{"id":"mecab-binding","key":"mecab-binding","value":{"rev":"3-3395763d23a3f8e3e00ba75cb988f9b4"}}, +{"id":"mechanize","key":"mechanize","value":{"rev":"5-94b72f43e270aa24c00e283fa52ba398"}}, +{"id":"mediatags","key":"mediatags","value":{"rev":"3-d5ea41e140fbbc821590cfefdbd016a5"}}, +{"id":"mediator","key":"mediator","value":{"rev":"3-42aac2225b47f72f97001107a3d242f5"}}, +{"id":"memcache","key":"memcache","value":{"rev":"5-aebcc4babe11b654afd3cede51e945ec"}}, +{"id":"memcached","key":"memcached","value":{"rev":"9-7c46464425c78681a8e6767ef9993c4c"}}, +{"id":"memcouchd","key":"memcouchd","value":{"rev":"3-b57b9fb4f6c60604f616c2f70456b4d6"}}, +{"id":"meme","key":"meme","value":{"rev":"11-53fcb51e1d8f8908b95f0fa12788e9aa"}}, +{"id":"memo","key":"memo","value":{"rev":"9-3a9ca97227ed19cacdacf10ed193ee8b"}}, +{"id":"memoize","key":"memoize","value":{"rev":"15-44bdd127c49035c8bd781a9299c103c2"}}, +{"id":"memoizer","key":"memoizer","value":{"rev":"9-d9a147e8c8a58fd7e8f139dc902592a6"}}, +{"id":"memorystream","key":"memorystream","value":{"rev":"9-6d0656067790e158f3c4628968ed70d3"}}, +{"id":"memstore","key":"memstore","value":{"rev":"5-03dcac59882c8a434e4c2fe2ac354941"}}, +{"id":"mercury","key":"mercury","value":{"rev":"3-147af865af6f7924f44f14f4b5c14dac"}}, +{"id":"mersenne","key":"mersenne","value":{"rev":"7-d8ae550eb8d0deaa1fd60f86351cb548"}}, +{"id":"meryl","key":"meryl","value":{"rev":"23-2c0e3fad99005109c584530e303bc5bf"}}, +{"id":"mesh","key":"mesh","value":{"rev":"5-f3ea4aef5b3f169eab8b518e5044c950"}}, +{"id":"meta-promise","key":"meta-promise","value":{"rev":"5-0badf85ab432341e6256252463468b89"}}, +{"id":"meta-test","key":"meta-test","value":{"rev":"49-92df2922499960ac750ce96d861ddd7e"}}, +{"id":"meta_code","key":"meta_code","value":{"rev":"7-9b4313c0c52a09c788464f1fea05baf7"}}, +{"id":"metamanager","key":"metamanager","value":{"rev":"5-dbb0312dad15416d540eb3d860fbf205"}}, +{"id":"metaweblog","key":"metaweblog","value":{"rev":"3-d3ab090ec27242e220412d6413e388ee"}}, +{"id":"metric","key":"metric","value":{"rev":"3-8a706db5b518421ad640a75e65cb4be9"}}, +{"id":"metrics","key":"metrics","value":{"rev":"13-62e5627c1ca5e6d3b3bde8d17e675298"}}, +{"id":"metrics-broker","key":"metrics-broker","value":{"rev":"15-0fdf57ea4ec84aa1f905f53b4975e72d"}}, +{"id":"mhash","key":"mhash","value":{"rev":"3-f00d65dc939474a5c508d37a327e5074"}}, +{"id":"micro","key":"micro","value":{"rev":"17-882c0ecf34ddaef5c673c547ae80b80b"}}, +{"id":"microcache","key":"microcache","value":{"rev":"3-ef75e04bc6e86d14f93ad9c429503bd9"}}, +{"id":"microevent","key":"microevent","value":{"rev":"3-9c0369289b62873ef6e8624eef724d15"}}, +{"id":"microtest","key":"microtest","value":{"rev":"11-11afdadfb15c1db030768ce52f34de1a"}}, +{"id":"microtime","key":"microtime","value":{"rev":"20-5f75e87316cbb5f7a4be09142cd755e5"}}, +{"id":"middlefiddle","key":"middlefiddle","value":{"rev":"13-bb94c05d75c24bdeb23a4637c7ecf55e"}}, +{"id":"middleware","key":"middleware","value":{"rev":"5-80937a4c620fcc2a5532bf064ec0837b"}}, +{"id":"midi","key":"midi","value":{"rev":"9-96da6599a84a761430adfd41deb3969a"}}, +{"id":"midi-js","key":"midi-js","value":{"rev":"11-1d174af1352e3d37f6ec0df32d56ce1a"}}, +{"id":"migrate","key":"migrate","value":{"rev":"13-7493879fb60a31b9e2a9ad19e94bfef6"}}, +{"id":"mikronode","key":"mikronode","value":{"rev":"31-1edae4ffbdb74c43ea584a7757dacc9b"}}, +{"id":"milk","key":"milk","value":{"rev":"21-81fb117817ed2e4c19e16dc310c09735"}}, +{"id":"millstone","key":"millstone","value":{"rev":"29-73d54de4b4de313b0fec4edfaec741a4"}}, +{"id":"mime","key":"mime","value":{"rev":"33-de72b641474458cb21006dea6a524ceb"}}, +{"id":"mime-magic","key":"mime-magic","value":{"rev":"13-2df6b966d7f29d5ee2dd2e1028d825b1"}}, +{"id":"mimelib","key":"mimelib","value":{"rev":"9-7994cf0fe3007329b9397f4e08481487"}}, +{"id":"mimelib-noiconv","key":"mimelib-noiconv","value":{"rev":"5-c84995d4b2bbe786080c9b54227b5bb4"}}, +{"id":"mimeograph","key":"mimeograph","value":{"rev":"37-bead083230f48f354f3ccac35e11afc0"}}, +{"id":"mimeparse","key":"mimeparse","value":{"rev":"8-5ca7e6702fe7f1f37ed31b05e82f4a87"}}, +{"id":"mingy","key":"mingy","value":{"rev":"19-09b19690c55abc1e940374e25e9a0d26"}}, +{"id":"mini-lzo-wrapper","key":"mini-lzo-wrapper","value":{"rev":"4-d751d61f481363a2786ac0312893dfca"}}, +{"id":"miniee","key":"miniee","value":{"rev":"5-be0833a9f15382695f861a990f3d6108"}}, +{"id":"minifyjs","key":"minifyjs","value":{"rev":"13-f255df8c7567440bc4c0f8eaf04a18c6"}}, +{"id":"minimal","key":"minimal","value":{"rev":"5-6be6b3454d30c59a30f9ee8af0ee606c"}}, +{"id":"minimal-test","key":"minimal-test","value":{"rev":"15-65dca2c1ee27090264577cc8b93983cb"}}, +{"id":"minimatch","key":"minimatch","value":{"rev":"11-449e570c76f4e6015c3dc90f080f8c47"}}, +{"id":"minirpc","key":"minirpc","value":{"rev":"10-e85b92273a97fa86e20faef7a3b50518"}}, +{"id":"ministore","key":"ministore","value":{"rev":"11-f131868141ccd0851bb91800c86dfff1"}}, +{"id":"minitest","key":"minitest","value":{"rev":"13-c92e32499a25ff2d7e484fbbcabe1081"}}, +{"id":"miniweb","key":"miniweb","value":{"rev":"3-e8c413a77e24891138eaa9e73cb08715"}}, +{"id":"minj","key":"minj","value":{"rev":"9-ccf50caf8e38b0fc2508f01a63f80510"}}, +{"id":"minotaur","key":"minotaur","value":{"rev":"29-6d048956b26e8a213f6ccc96027bacde"}}, +{"id":"mirror","key":"mirror","value":{"rev":"21-01bdd78ff03ca3f8f99fce104baab9f9"}}, +{"id":"misao-chan","key":"misao-chan","value":{"rev":"13-f032690f0897fc4a1dc12f1e03926627"}}, +{"id":"mite.node","key":"mite.node","value":{"rev":"13-0bfb15c4a6f172991756660b29869dd4"}}, +{"id":"mixable","key":"mixable","value":{"rev":"3-bc518ab862a6ceacc48952b9bec7d61a"}}, +{"id":"mixin","key":"mixin","value":{"rev":"3-3a7ae89345d21ceaf545d93b20caf2f2"}}, +{"id":"mixinjs","key":"mixinjs","value":{"rev":"3-064173d86b243316ef1b6c5743a60bf9"}}, +{"id":"mixpanel","key":"mixpanel","value":{"rev":"7-f742248bfbfc480658c4c46f7ab7a74a"}}, +{"id":"mixpanel-api","key":"mixpanel-api","value":{"rev":"5-61a3fa28921887344d1af339917e147a"}}, +{"id":"mixpanel_api","key":"mixpanel_api","value":{"rev":"3-11939b6fd20b80bf9537380875bf3996"}}, +{"id":"mjoe","key":"mjoe","value":{"rev":"3-8b3549cd6edcc03112217370b071b076"}}, +{"id":"mjsunit.runner","key":"mjsunit.runner","value":{"rev":"12-94c779b555069ca5fb0bc9688515673e"}}, +{"id":"mkdir","key":"mkdir","value":{"rev":"3-e8fd61b35638f1f3a65d36f09344ff28"}}, +{"id":"mkdirp","key":"mkdirp","value":{"rev":"15-c8eacf17b336ea98d1d9960f02362cbf"}}, +{"id":"mmap","key":"mmap","value":{"rev":"16-df335eb3257dfbd2fb0de341970d2656"}}, +{"id":"mmikulicic-thrift","key":"mmikulicic-thrift","value":{"rev":"3-f4a9f7a97bf50e966d1184fba423a07f"}}, +{"id":"mmmodel","key":"mmmodel","value":{"rev":"7-00d61723742a325aaaa6955ba52cef60"}}, +{"id":"mmodel","key":"mmodel","value":{"rev":"3-717309af27d6c5d98ed188c9c9438a37"}}, +{"id":"mmseg","key":"mmseg","value":{"rev":"17-794d553e67d6023ca3d58dd99fe1da15"}}, +{"id":"mobilize","key":"mobilize","value":{"rev":"25-8a657ec0accf8db2e8d7b935931ab77b"}}, +{"id":"mock","key":"mock","value":{"rev":"3-d8805bff4796462750071cddd3f75ea7"}}, +{"id":"mock-request","key":"mock-request","value":{"rev":"7-4ac4814c23f0899b1100d5f0617e40f4"}}, +{"id":"mock-request-response","key":"mock-request-response","value":{"rev":"5-fe1566c9881039a92a80e0e82a95f096"}}, +{"id":"mocket","key":"mocket","value":{"rev":"13-9001879cd3cb6f52f3b2d85fb14b8f9b"}}, +{"id":"modbus-stack","key":"modbus-stack","value":{"rev":"7-50c56e74d9cb02c5d936b0b44c54f621"}}, +{"id":"model","key":"model","value":{"rev":"3-174181c2f314f35fc289b7a921ba4d39"}}, +{"id":"models","key":"models","value":{"rev":"8-6cc2748edfd96679f9bb3596864874a9"}}, +{"id":"modestmaps","key":"modestmaps","value":{"rev":"8-79265968137a2327f98bfc6943a84da9"}}, +{"id":"modjewel","key":"modjewel","value":{"rev":"3-73efc7b9dc24d82cab1de249896193fd"}}, +{"id":"modlr","key":"modlr","value":{"rev":"17-ccf16db98ab6ccb95e005b3bb76dba64"}}, +{"id":"module-grapher","key":"module-grapher","value":{"rev":"19-b6ba30b41e29fc01d4b679a643f030e5"}}, +{"id":"modulr","key":"modulr","value":{"rev":"15-8e8ffd75c6c6149206de4ce0c2aefad7"}}, +{"id":"mogile","key":"mogile","value":{"rev":"5-79a8af20dbe6bff166ac2197a3998b0c"}}, +{"id":"mojo","key":"mojo","value":{"rev":"25-1d9c26d6afd6ea77253f220d86d60307"}}, +{"id":"monad","key":"monad","value":{"rev":"10-cf20354900b7e67d94c342feb06a1eb9"}}, +{"id":"mongeese","key":"mongeese","value":{"rev":"3-f4b319d98f9f73fb17cd3ebc7fc86412"}}, +{"id":"mongo-pool","key":"mongo-pool","value":{"rev":"3-215481828e69fd874b5938a79a7e0934"}}, +{"id":"mongodb","key":"mongodb","value":{"rev":"147-3dc09965e762787f34131a8739297383"}}, +{"id":"mongodb-async","key":"mongodb-async","value":{"rev":"7-ba9097bdc86b72885fa5a9ebb49a64d0"}}, +{"id":"mongodb-provider","key":"mongodb-provider","value":{"rev":"5-5523643b403e969e0b80c57db08cb9d3"}}, +{"id":"mongodb-rest","key":"mongodb-rest","value":{"rev":"36-60b4abc4a22f31de09407cc7cdd0834f"}}, +{"id":"mongodb-wrapper","key":"mongodb-wrapper","value":{"rev":"13-7a6c5eaff36ede45211aa80f3a506cfe"}}, +{"id":"mongodb_heroku","key":"mongodb_heroku","value":{"rev":"3-05947c1e06e1f8860c7809b063a8d1a0"}}, +{"id":"mongode","key":"mongode","value":{"rev":"11-faa14f050da4a165e2568d413a6b8bc0"}}, +{"id":"mongojs","key":"mongojs","value":{"rev":"26-a628eb51534ffcdd97c1a940d460a52c"}}, +{"id":"mongolia","key":"mongolia","value":{"rev":"76-711c39de0e152e224d4118c9b0de834f"}}, +{"id":"mongolian","key":"mongolian","value":{"rev":"44-3773671b31c406a18cb9f5a1764ebee4"}}, +{"id":"mongoose","key":"mongoose","value":{"rev":"181-03a8aa7f691cbd987995bf6e3354e0f5"}}, +{"id":"mongoose-admin","key":"mongoose-admin","value":{"rev":"7-59078ad5a345e9e66574346d3e70f9ad"}}, +{"id":"mongoose-auth","key":"mongoose-auth","value":{"rev":"49-87c79f3a6164c438a53b7629be87ae5d"}}, +{"id":"mongoose-autoincr","key":"mongoose-autoincr","value":{"rev":"3-9c4dd7c3fdcd8621166665a68fccb602"}}, +{"id":"mongoose-closures","key":"mongoose-closures","value":{"rev":"3-2ff9cff790f387f2236a2c7382ebb55b"}}, +{"id":"mongoose-crypt","key":"mongoose-crypt","value":{"rev":"3-d77ffbf250e39fcc290ad37824fe2236"}}, +{"id":"mongoose-dbref","key":"mongoose-dbref","value":{"rev":"29-02090b9904fd6f5ce72afcfa729f7c96"}}, +{"id":"mongoose-flatmatcher","key":"mongoose-flatmatcher","value":{"rev":"5-4f0565901e8b588cc562ae457ad975a6"}}, +{"id":"mongoose-helpers","key":"mongoose-helpers","value":{"rev":"3-3a57e9819e24c9b0f5b5eabe41037092"}}, +{"id":"mongoose-joins","key":"mongoose-joins","value":{"rev":"3-9bae444730a329473421f50cba1c86a7"}}, +{"id":"mongoose-misc","key":"mongoose-misc","value":{"rev":"3-bcd7f3f450cf6ed233d042ac574409ce"}}, +{"id":"mongoose-relationships","key":"mongoose-relationships","value":{"rev":"9-6155a276b162ec6593b8542f0f769024"}}, +{"id":"mongoose-rest","key":"mongoose-rest","value":{"rev":"29-054330c035adf842ab34423215995113"}}, +{"id":"mongoose-spatial","key":"mongoose-spatial","value":{"rev":"3-88660dabd485edcaa29a2ea01afb90bd"}}, +{"id":"mongoose-temporal","key":"mongoose-temporal","value":{"rev":"3-1dd736395fe9be95498e588df502b7bb"}}, +{"id":"mongoose-types","key":"mongoose-types","value":{"rev":"13-8126458b91ef1bf46e582042f5dbd015"}}, +{"id":"mongoose-units","key":"mongoose-units","value":{"rev":"3-5fcdb7aedb1d5cff6e18ee1352c3d0f7"}}, +{"id":"mongoq","key":"mongoq","value":{"rev":"11-2060d674d5f8a964e800ed4470b92587"}}, +{"id":"mongoskin","key":"mongoskin","value":{"rev":"13-5a7bfacd9e9b95ec469f389751e7e435"}}, +{"id":"mongous","key":"mongous","value":{"rev":"3-4d98b4a4bfdd6d9f46342002a69d8d3a"}}, +{"id":"mongrel2","key":"mongrel2","value":{"rev":"3-93156356e478f30fc32455054e384b80"}}, +{"id":"monguava","key":"monguava","value":{"rev":"9-69ec50128220aba3e16128a4be2799c0"}}, +{"id":"mongueue","key":"mongueue","value":{"rev":"9-fc8d9df5bf15f5a25f68cf58866f11fe"}}, +{"id":"moniker","key":"moniker","value":{"rev":"5-a139616b725ddfdd1db6a376fb6584f7"}}, +{"id":"monitor","key":"monitor","value":{"rev":"56-44d2b8b7dec04b3f320f7dc4a1704c53"}}, +{"id":"monome","key":"monome","value":{"rev":"3-2776736715cbfc045bf7b42e70ccda9c"}}, +{"id":"monomi","key":"monomi","value":{"rev":"6-b6b745441f157cc40c846d23cd14297a"}}, +{"id":"moof","key":"moof","value":{"rev":"13-822b4ebf873b720bd4c7e16fcbbbbb3d"}}, +{"id":"moonshado","key":"moonshado","value":{"rev":"3-b54de1aef733c8fa118fa7cf6af2fb9b"}}, +{"id":"moose","key":"moose","value":{"rev":"5-e11c8b7c09826e3431ed3408ee874779"}}, +{"id":"mootools","key":"mootools","value":{"rev":"9-39f5535072748ccd3cf0212ef4c3d4fa"}}, +{"id":"mootools-array","key":"mootools-array","value":{"rev":"3-d1354704a9fe922d969c2bf718e0dc53"}}, +{"id":"mootools-browser","key":"mootools-browser","value":{"rev":"3-ce0946b357b6ddecc128febef2c5d720"}}, +{"id":"mootools-class","key":"mootools-class","value":{"rev":"3-0ea815d28b61f3880087e3f4b8668354"}}, +{"id":"mootools-class-extras","key":"mootools-class-extras","value":{"rev":"3-575796745bd169c35f4fc0019bb36b76"}}, +{"id":"mootools-client","key":"mootools-client","value":{"rev":"3-b658c331f629f80bfe17c3e6ed44c525"}}, +{"id":"mootools-cookie","key":"mootools-cookie","value":{"rev":"3-af93588531e5a52c76a8e7a4eac3612a"}}, +{"id":"mootools-core","key":"mootools-core","value":{"rev":"3-01b1678fc56d94d29566b7853ad56059"}}, +{"id":"mootools-domready","key":"mootools-domready","value":{"rev":"3-0fc6620e2c8f7d107816cace9c099633"}}, +{"id":"mootools-element","key":"mootools-element","value":{"rev":"3-bac857c1701c91207d1ec6d1eb002d07"}}, +{"id":"mootools-element-dimensions","key":"mootools-element-dimensions","value":{"rev":"3-d82df62b3e97122ad0a7668efb7ba776"}}, +{"id":"mootools-element-event","key":"mootools-element-event","value":{"rev":"3-a30380151989ca31851cf751fcd55e9a"}}, +{"id":"mootools-element-style","key":"mootools-element-style","value":{"rev":"3-6103fa8551a21dc592e410dc7df647f8"}}, +{"id":"mootools-event","key":"mootools-event","value":{"rev":"3-7327279ec157de8c47f3ee24615ead95"}}, +{"id":"mootools-function","key":"mootools-function","value":{"rev":"3-eb3ee17acf40d6cc05463cb88edc6f5e"}}, +{"id":"mootools-fx","key":"mootools-fx","value":{"rev":"3-757ab6c8423e8c434d1ee783ea28cdb5"}}, +{"id":"mootools-fx-css","key":"mootools-fx-css","value":{"rev":"3-8eb0cf468c826b9c485835fab94837e7"}}, +{"id":"mootools-fx-morph","key":"mootools-fx-morph","value":{"rev":"3-b91310f8a81221592970fe7632bd9f7a"}}, +{"id":"mootools-fx-transitions","key":"mootools-fx-transitions","value":{"rev":"3-a1ecde35dfbb80f3a6062005758bb934"}}, +{"id":"mootools-fx-tween","key":"mootools-fx-tween","value":{"rev":"3-39497defbffdf463932cc9f00cde8d5d"}}, +{"id":"mootools-json","key":"mootools-json","value":{"rev":"3-69deb6679a5d1d49f22e19834ae07c32"}}, +{"id":"mootools-more","key":"mootools-more","value":{"rev":"3-d8f46ce319ca0e3deb5fc04ad5f73cb9"}}, +{"id":"mootools-number","key":"mootools-number","value":{"rev":"3-9f4494883ac39f93734fea9af6ef2fc5"}}, +{"id":"mootools-object","key":"mootools-object","value":{"rev":"3-c9632dfa793ab4d9ad4b68a2e27f09fc"}}, +{"id":"mootools-request","key":"mootools-request","value":{"rev":"3-663e5472f351eea3b7488ee441bc6a61"}}, +{"id":"mootools-request-html","key":"mootools-request-html","value":{"rev":"3-0ab9576c11a564d44b3c3ca3ef3dc240"}}, +{"id":"mootools-request-json","key":"mootools-request-json","value":{"rev":"3-c0359201c94ba1684ea6336e35cd70c2"}}, +{"id":"mootools-server","key":"mootools-server","value":{"rev":"3-98e89499f6eab137bbab053a3932a526"}}, +{"id":"mootools-slick-finder","key":"mootools-slick-finder","value":{"rev":"3-9a5820e90d6ea2d797268f3c60a9f177"}}, +{"id":"mootools-slick-parser","key":"mootools-slick-parser","value":{"rev":"3-d4e6b1673e6e2a6bcc66bf4988b2994d"}}, +{"id":"mootools-string","key":"mootools-string","value":{"rev":"3-2fda1c7915295df62e547018a7f05916"}}, +{"id":"mootools-swiff","key":"mootools-swiff","value":{"rev":"3-f0edeead85f3d48cf2af2ca35a4e67a5"}}, +{"id":"mootools.js","key":"mootools.js","value":{"rev":"3-085e50e3529d19e1d6ad630027ba51dc"}}, +{"id":"morestreams","key":"morestreams","value":{"rev":"7-3d0145c2cfb9429dfdcfa872998c9fe8"}}, +{"id":"morpheus","key":"morpheus","value":{"rev":"45-04335640f709335d1828523425a87909"}}, +{"id":"morton","key":"morton","value":{"rev":"11-abd787350e21bef65c1c6776e40a0753"}}, +{"id":"mothermayi","key":"mothermayi","value":{"rev":"5-2c46f9873efd19f543def5eeda0a05f1"}}, +{"id":"mountable-proxy","key":"mountable-proxy","value":{"rev":"7-3b91bd0707447885676727ad183bb051"}}, +{"id":"move","key":"move","value":{"rev":"69-ce11c235c78de6d6184a86aaa93769eb"}}, +{"id":"moviesearch","key":"moviesearch","value":{"rev":"3-72e77965a44264dfdd5af23e4a36d2ce"}}, +{"id":"mp","key":"mp","value":{"rev":"3-47899fb2bdaf21dda16abd037b325c3b"}}, +{"id":"mpdsocket","key":"mpdsocket","value":{"rev":"3-2dd4c9bb019f3f491c55364be7a56229"}}, +{"id":"mrcolor","key":"mrcolor","value":{"rev":"3-4695b11798a65c61714b8f236a40936c"}}, +{"id":"msgbus","key":"msgbus","value":{"rev":"27-a5d861b55c933842226d4e536820ec99"}}, +{"id":"msgme","key":"msgme","value":{"rev":"3-d1968af1234a2059eb3d84eb76cdaa4e"}}, +{"id":"msgpack","key":"msgpack","value":{"rev":"9-ecf7469392d87460ddebef2dd369b0e5"}}, +{"id":"msgpack-0.4","key":"msgpack-0.4","value":{"rev":"3-5d509ddba6c53ed6b8dfe4afb1d1661d"}}, +{"id":"msgpack2","key":"msgpack2","value":{"rev":"4-63b8f3ccf35498eb5c8bd9b8d683179b"}}, +{"id":"mu","key":"mu","value":{"rev":"7-7a8ce1cba5d6d98e696c4e633aa081fa"}}, +{"id":"mu2","key":"mu2","value":{"rev":"3-4ade1c5b1496c720312beae1822da9de"}}, +{"id":"mud","key":"mud","value":{"rev":"66-56e1b1a1e5af14c3df0520c58358e7cd"}}, +{"id":"muffin","key":"muffin","value":{"rev":"22-210c45a888fe1f095becdcf11876a2bc"}}, +{"id":"multi-node","key":"multi-node","value":{"rev":"1-224161d875f0e1cbf4b1e249603c670a"}}, +{"id":"multicast-eventemitter","key":"multicast-eventemitter","value":{"rev":"13-ede3e677d6e21bbfe42aad1b549a137c"}}, +{"id":"multimeter","key":"multimeter","value":{"rev":"7-847f45a6f592a8410a77d3e5efb5cbf3"}}, +{"id":"multipart-stack","key":"multipart-stack","value":{"rev":"9-85aaa2ed2180d3124d1dcd346955b672"}}, +{"id":"muse","key":"muse","value":{"rev":"3-d6bbc06df2e359d6ef285f9da2bd0efd"}}, +{"id":"musicmetadata","key":"musicmetadata","value":{"rev":"21-957bf986aa9d0db02175ea1d79293909"}}, +{"id":"mustache","key":"mustache","value":{"rev":"6-7f8458f2b52de5b37004b105c0f39e62"}}, +{"id":"mustachio","key":"mustachio","value":{"rev":"9-6ed3f41613f886128acd18b73b55439f"}}, +{"id":"mutex","key":"mutex","value":{"rev":"3-de95bdff3dd00271361067b5d70ea03b"}}, +{"id":"muzak","key":"muzak","value":{"rev":"9-5ff968ffadebe957b72a8b77b538b71c"}}, +{"id":"mvc","key":"mvc","value":{"rev":"52-7c954b6c3b90b1b734d8e8c3d2d34f5e"}}, +{"id":"mvc.coffee","key":"mvc.coffee","value":{"rev":"3-f203564ed70c0284455e7f96ea61fdb7"}}, +{"id":"mypackage","key":"mypackage","value":{"rev":"3-49cc95fb2e5ac8ee3dbbab1de451c0d1"}}, +{"id":"mypakege","key":"mypakege","value":{"rev":"3-e74d7dc2c2518304ff1700cf295eb823"}}, +{"id":"myrtle-parser","key":"myrtle-parser","value":{"rev":"3-9089c1a2f3c3a24f0bce3941bc1d534d"}}, +{"id":"mysql","key":"mysql","value":{"rev":"30-a8dc68eb056cb6f69fae2423c1337474"}}, +{"id":"mysql-activerecord","key":"mysql-activerecord","value":{"rev":"17-9d21d0b10a5c84f6cacfd8d2236f9887"}}, +{"id":"mysql-client","key":"mysql-client","value":{"rev":"5-cc877218864c319d17f179e49bf58c99"}}, +{"id":"mysql-helper","key":"mysql-helper","value":{"rev":"3-c6f3b9f00cd9fee675aa2a9942cc336a"}}, +{"id":"mysql-libmysqlclient","key":"mysql-libmysqlclient","value":{"rev":"38-51c08e24257b99bf5591232016ada8ab"}}, +{"id":"mysql-native","key":"mysql-native","value":{"rev":"12-0592fbf66c55e6e9db6a75c97be088c3"}}, +{"id":"mysql-native-prerelease","key":"mysql-native-prerelease","value":{"rev":"7-b1a6f3fc41f6c152f3b178e13f91b5c4"}}, +{"id":"mysql-oil","key":"mysql-oil","value":{"rev":"9-70c07b9c552ff592be8ca89ea6efa408"}}, +{"id":"mysql-pool","key":"mysql-pool","value":{"rev":"15-41f510c45174b6c887856120ce3d5a3b"}}, +{"id":"mysql-simple","key":"mysql-simple","value":{"rev":"13-7ee13f035e8ebcbc27f6fe910058aee9"}}, +{"id":"n","key":"n","value":{"rev":"31-bfaed5022beae2177a090c4c8fce82a4"}}, +{"id":"n-ext","key":"n-ext","value":{"rev":"3-5ad67a300f8e88ef1dd58983c9061bc1"}}, +{"id":"n-pubsub","key":"n-pubsub","value":{"rev":"3-af990bcbf9f94554365788b81715d3b4"}}, +{"id":"n-rest","key":"n-rest","value":{"rev":"7-42f1d92f9229f126a1b063ca27bfc85b"}}, +{"id":"n-util","key":"n-util","value":{"rev":"6-d0c59c7412408bc94e20de4d22396d79"}}, +{"id":"nMemcached","key":"nMemcached","value":{"rev":"3-be350fd46624a1cac0052231101e0594"}}, +{"id":"nStoreSession","key":"nStoreSession","value":{"rev":"3-a3452cddd2b9ff8edb6d46999fa5b0eb"}}, +{"id":"nTPL","key":"nTPL","value":{"rev":"41-16a54848286364d894906333b0c1bb2c"}}, +{"id":"nTunes","key":"nTunes","value":{"rev":"18-76bc566a504100507056316fe8d3cc35"}}, +{"id":"nabe","key":"nabe","value":{"rev":"13-dc93f35018e84a23ace4d5114fa1bb28"}}, +{"id":"nack","key":"nack","value":{"rev":"118-f629c8c208c76fa0c2ce66d21f927ee4"}}, +{"id":"nagari","key":"nagari","value":{"rev":"11-cb200690c6d606d8597178e492b54cde"}}, +{"id":"nailplate","key":"nailplate","value":{"rev":"11-e1532c42d9d83fc32942dec0b87df587"}}, +{"id":"nails","key":"nails","value":{"rev":"12-f472bf005c4a4c2b49fb0118b109bef1"}}, +{"id":"nake","key":"nake","value":{"rev":"11-250933df55fbe7bb19e34a84ed23ca3e"}}, +{"id":"named-routes","key":"named-routes","value":{"rev":"6-ffbdd4caa74a30e87aa6dbb36f2b967c"}}, +{"id":"namespace","key":"namespace","value":{"rev":"7-89e2850e14206af13f26441e75289878"}}, +{"id":"namespaces","key":"namespaces","value":{"rev":"11-7a9b3d2537438211021a472035109f3c"}}, +{"id":"nami","key":"nami","value":{"rev":"29-3d44b1338222a4d994d4030868a94ea8"}}, +{"id":"nano","key":"nano","value":{"rev":"105-50efc49a8f6424706af554872002c014"}}, +{"id":"nanostate","key":"nanostate","value":{"rev":"9-1664d985e8cdbf16e150ba6ba4d79ae5"}}, +{"id":"narcissus","key":"narcissus","value":{"rev":"3-46581eeceff566bd191a14dec7b337f6"}}, +{"id":"nariya","key":"nariya","value":{"rev":"13-d83b8b6162397b154a4b59553be225e9"}}, +{"id":"narrativ","key":"narrativ","value":{"rev":"9-ef215eff6bf222425f73d23e507f7ff3"}}, +{"id":"narrow","key":"narrow","value":{"rev":"5-c6963048ba02adaf819dc51815fa0015"}}, +{"id":"narwhal","key":"narwhal","value":{"rev":"6-13bf3f87e6cfb1e57662cc3e3be450fc"}}, +{"id":"narwhal-lib","key":"narwhal-lib","value":{"rev":"6-4722d9b35fed59a2e8f7345a1eb6769d"}}, +{"id":"nat","key":"nat","value":{"rev":"3-da0906c08792043546f98ace8ce59a78"}}, +{"id":"native2ascii","key":"native2ascii","value":{"rev":"3-9afd51209d67303a8ee807ff862e31fc"}}, +{"id":"nativeUtil","key":"nativeUtil","value":{"rev":"7-6e3e9757b436ebcee35a20e633c08d60"}}, +{"id":"natives","key":"natives","value":{"rev":"24-6c4269c9c7cfb52571bd2c94fa26efc6"}}, +{"id":"natural","key":"natural","value":{"rev":"110-fc92701ad8525f45fbdb5863959ca03c"}}, +{"id":"naturalsort","key":"naturalsort","value":{"rev":"3-4321f5e432aee224af0fee9e4fb901ff"}}, +{"id":"nave","key":"nave","value":{"rev":"29-79baa66065fa9075764cc3e5da2edaef"}}, +{"id":"navigator","key":"navigator","value":{"rev":"3-f2f4f5376afb10753006f40bd49689c3"}}, +{"id":"nbs-api","key":"nbs-api","value":{"rev":"3-94949b1f0797369abc0752482268ef08"}}, +{"id":"nbt","key":"nbt","value":{"rev":"3-b711b9db76f64449df7f43c659ad8e7f"}}, +{"id":"nclosure","key":"nclosure","value":{"rev":"9-042b39740a39f0556d0dc2c0990b7fa8"}}, +{"id":"nclosureultimate","key":"nclosureultimate","value":{"rev":"3-61ff4bc480239304c459374c9a5f5754"}}, +{"id":"nconf","key":"nconf","value":{"rev":"65-8d8c0d2c6d5d9d526b8a3f325f68eca1"}}, +{"id":"nconf-redis","key":"nconf-redis","value":{"rev":"5-21ae138633b20cb29ed49b9fcd425e10"}}, +{"id":"ncp","key":"ncp","value":{"rev":"23-6441091c6c27ecb5b99f5781299a2192"}}, +{"id":"ncss","key":"ncss","value":{"rev":"9-1d2330e0fdbc40f0810747c2b156ecf2"}}, +{"id":"ncurses","key":"ncurses","value":{"rev":"12-bb059ea6fee12ca77f1fbb7bb6dd9447"}}, +{"id":"ndb","key":"ndb","value":{"rev":"15-b3e826f68a57095413666e9fe74589da"}}, +{"id":"ndistro","key":"ndistro","value":{"rev":"3-fcda3c018d11000b2903ad7104b60b35"}}, +{"id":"ndns","key":"ndns","value":{"rev":"5-1aeaaca119be44af7a83207d76f263fc"}}, +{"id":"nebulog","key":"nebulog","value":{"rev":"3-1863b0ce17cc0f07a50532a830194254"}}, +{"id":"neco","key":"neco","value":{"rev":"43-e830913302b52012ab63177ecf292822"}}, +{"id":"ned","key":"ned","value":{"rev":"15-4230c69fb52dfddfd65526dcfe5c4ec6"}}, +{"id":"nedis","key":"nedis","value":{"rev":"7-d49e329dca586d1a3569266f0595c9ad"}}, +{"id":"neko","key":"neko","value":{"rev":"60-13aa87d2278c3a734733cff2a34a7970"}}, +{"id":"neo4j","key":"neo4j","value":{"rev":"7-dde7066eac32a405df95ccf9c50c8ae7"}}, +{"id":"nerve","key":"nerve","value":{"rev":"3-2c47b79586d7930aabf9325ca88ad7e8"}}, +{"id":"nest","key":"nest","value":{"rev":"23-560d67971e9acddacf087608306def24"}}, +{"id":"nestableflow","key":"nestableflow","value":{"rev":"5-ee8af667a84d333fcc8092c89f4189c3"}}, +{"id":"nestor","key":"nestor","value":{"rev":"3-f1affbc37be3bf4e337365bd172578dc"}}, +{"id":"net","key":"net","value":{"rev":"3-895103ee532ef31396d9c06764df1ed8"}}, +{"id":"netiface","key":"netiface","value":{"rev":"3-885c94284fd3a9601afe291ab68aca84"}}, +{"id":"netpool","key":"netpool","value":{"rev":"3-dadfd09b9eb7ef73e2bff34a381de207"}}, +{"id":"netstring","key":"netstring","value":{"rev":"9-d26e7bf4a3ce5eb91bb1889d362f71e6"}}, +{"id":"neuron","key":"neuron","value":{"rev":"11-edaed50492368ff39eaf7d2004d7f4d8"}}, +{"id":"new","key":"new","value":{"rev":"3-7789b37104d8161b7ccf898a9cda1fc6"}}, +{"id":"newforms","key":"newforms","value":{"rev":"9-2a87cb74477d210fcb1d0c3e3e236f03"}}, +{"id":"nexpect","key":"nexpect","value":{"rev":"15-e7127f41b9f3ec45185ede7bab7b4acd"}}, +{"id":"next","key":"next","value":{"rev":"13-de5e62125b72e48ea142a55a3817589c"}}, +{"id":"nextrip","key":"nextrip","value":{"rev":"5-1ac8103552967af98d3de452ef81a94f"}}, +{"id":"nexttick","key":"nexttick","value":{"rev":"9-c7ec279e713ea8483d33c31871aea0db"}}, +{"id":"ngen","key":"ngen","value":{"rev":"9-972980a439c34851d67e4f61a96c2632"}}, +{"id":"ngen-basicexample","key":"ngen-basicexample","value":{"rev":"3-897763c230081d320586bcadfa84499f"}}, +{"id":"ngeohash","key":"ngeohash","value":{"rev":"5-9ca0c06066bc798e934db35cad99453e"}}, +{"id":"ngist","key":"ngist","value":{"rev":"7-592c24e72708219ed1eb078ddff95ab6"}}, +{"id":"ngram","key":"ngram","value":{"rev":"5-00e6b24dc178bdeb49b1ac8cb09f6e77"}}, +{"id":"ngrep","key":"ngrep","value":{"rev":"3-49c1a3839b12083280475177c1a16e38"}}, +{"id":"nhp-body-restreamer","key":"nhp-body-restreamer","value":{"rev":"1-8a4e5e23ae681a3f8be9afb613648230"}}, +{"id":"nhttpd","key":"nhttpd","value":{"rev":"3-cdc73384e1a1a4666e813ff52f2f5e4f"}}, +{"id":"nib","key":"nib","value":{"rev":"25-d67d5a294ba5b8953472cf936b97e13d"}}, +{"id":"nicetime","key":"nicetime","value":{"rev":"3-39fdba269d712064dc1e02a7ab846821"}}, +{"id":"nicknack","key":"nicknack","value":{"rev":"5-7b5477b63f782d0a510b0c15d2824f20"}}, +{"id":"nide","key":"nide","value":{"rev":"9-74f642fced47c934f9bae29f04d17a46"}}, +{"id":"nih-op","key":"nih-op","value":{"rev":"3-6e649b45964f84cb04340ab7f0a36a1c"}}, +{"id":"nimble","key":"nimble","value":{"rev":"5-867b808dd80eab33e5f22f55bb5a7376"}}, +{"id":"ninjs","key":"ninjs","value":{"rev":"3-f59997cc4bacb2d9d9852f955d15199e"}}, +{"id":"ninotify","key":"ninotify","value":{"rev":"3-a0f3c7cbbe7ccf5d547551aa062cc8b5"}}, +{"id":"nirc","key":"nirc","value":{"rev":"3-28197984656939a5a93a77c0a1605406"}}, +{"id":"nithub","key":"nithub","value":{"rev":"3-eaa85e6ac6668a304e4e4a565c54f57d"}}, +{"id":"nix","key":"nix","value":{"rev":"12-7b338b03c0e110aeb348551b14796ff1"}}, +{"id":"nko","key":"nko","value":{"rev":"39-2bf94b2bc279b8cf847bfc7668029d37"}}, +{"id":"nlog","key":"nlog","value":{"rev":"3-ae469820484ca33f346001dcb7b63a2d"}}, +{"id":"nlog4js","key":"nlog4js","value":{"rev":"3-bc17a61a9023d64e192d249144e69f02"}}, +{"id":"nlogger","key":"nlogger","value":{"rev":"11-1e48fc9a5a4214d9e56db6c6b63f1eeb"}}, +{"id":"nmd","key":"nmd","value":{"rev":"27-2dcb60d0258a9cea838f7cc4e0922f90"}}, +{"id":"nntp","key":"nntp","value":{"rev":"5-c86b189e366b9a6a428f9a2ee88dccf1"}}, +{"id":"no.de","key":"no.de","value":{"rev":"10-0dc855fd6b0b36a710b473b2720b22c0"}}, +{"id":"nobj","key":"nobj","value":{"rev":"3-0b4a46b91b70117306a9888202117223"}}, +{"id":"noblemachine","key":"noblemachine","value":{"rev":"3-06fec410fe0c7328e06eec50b4fa5d9a"}}, +{"id":"noblerecord","key":"noblerecord","value":{"rev":"5-22f24c4285bd405785588480bb2bc324"}}, +{"id":"nock","key":"nock","value":{"rev":"5-f94423d37dbdf41001ec097f20635271"}}, +{"id":"nocr-mongo","key":"nocr-mongo","value":{"rev":"5-ce6335ed276187cc38c30cb5872d3d83"}}, +{"id":"nodast","key":"nodast","value":{"rev":"3-1c563107f2d77b79a8f0d0b8ba7041f5"}}, +{"id":"node-api","key":"node-api","value":{"rev":"3-b69cefec93d9f73256acf9fb9edeebd6"}}, +{"id":"node-apidoc","key":"node-apidoc","value":{"rev":"6-cd26945e959403fcbee8ba542e14e667"}}, +{"id":"node-app-reloader","key":"node-app-reloader","value":{"rev":"5-e08cac7656afd6c124f8e2a9b9d6fdd3"}}, +{"id":"node-arse","key":"node-arse","value":{"rev":"9-b643c828541739a5fa972c801f81b212"}}, +{"id":"node-assert-extras","key":"node-assert-extras","value":{"rev":"3-3498e17b996ffc42a29d46c9699a3b52"}}, +{"id":"node-assert-lint-free","key":"node-assert-lint-free","value":{"rev":"5-852130ba6bafc703657b833343bc5646"}}, +{"id":"node-asset","key":"node-asset","value":{"rev":"18-f7cf59be8e0d015a43d05807a1ed9c0c"}}, +{"id":"node-awesm","key":"node-awesm","value":{"rev":"3-539c10145541ac5efc4dd295767b2abc"}}, +{"id":"node-backbone-couch","key":"node-backbone-couch","value":{"rev":"19-c4d8e93436b60e098c81cc0fe50f960c"}}, +{"id":"node-base64","key":"node-base64","value":{"rev":"11-da10a7157fd9e139b48bc8d9e44a98fa"}}, +{"id":"node-bj","key":"node-bj","value":{"rev":"3-5cd21fa259199870d1917574cd167396"}}, +{"id":"node-bosh-stress-tool","key":"node-bosh-stress-tool","value":{"rev":"3-36afc4b47e570964b7f8d705e1d47732"}}, +{"id":"node-brainfuck","key":"node-brainfuck","value":{"rev":"5-c7a6f703a97a409670005cab52664629"}}, +{"id":"node-build","key":"node-build","value":{"rev":"10-4f2f137fb4ef032f9dca3e3c64c15270"}}, +{"id":"node-casa","key":"node-casa","value":{"rev":"3-3f80a478aa47620bfc0c64cc6f140d98"}}, +{"id":"node-ccl","key":"node-ccl","value":{"rev":"13-00498b820cc4cadce8cc5b7b76e30b0f"}}, +{"id":"node-chain","key":"node-chain","value":{"rev":"6-b543f421ac63eeedc667b3395e7b8971"}}, +{"id":"node-child-process-manager","key":"node-child-process-manager","value":{"rev":"36-befb1a0eeac02ad400e2aaa8a076a053"}}, +{"id":"node-chirpstream","key":"node-chirpstream","value":{"rev":"10-f20e404f9ae5d43dfb6bcee15bd9affe"}}, +{"id":"node-clone","key":"node-clone","value":{"rev":"5-5ace5d51179d0e642bf9085b3bbf999b"}}, +{"id":"node-cloudwatch","key":"node-cloudwatch","value":{"rev":"3-7f9d1e075fcc3bd3e7849acd893371d5"}}, +{"id":"node-combine","key":"node-combine","value":{"rev":"3-51891c3c7769ff11a243c89c7e537907"}}, +{"id":"node-compat","key":"node-compat","value":{"rev":"9-24fce8e15eed3e193832b1c93a482d15"}}, +{"id":"node-config","key":"node-config","value":{"rev":"6-8821f6b46347e57258e62e1be841c186"}}, +{"id":"node-crocodoc","key":"node-crocodoc","value":{"rev":"5-ad4436f633f37fe3248dce93777fc26e"}}, +{"id":"node-csv","key":"node-csv","value":{"rev":"10-cd15d347b595f1d9d1fd30b483c52724"}}, +{"id":"node-date","key":"node-date","value":{"rev":"3-a5b41cab3247e12f2beaf1e0b1ffadfa"}}, +{"id":"node-dbi","key":"node-dbi","value":{"rev":"27-96e1df6fdefbae77bfa02eda64c3e3b9"}}, +{"id":"node-debug-proxy","key":"node-debug-proxy","value":{"rev":"9-c00a14832cdd5ee4d489eb41a3d0d621"}}, +{"id":"node-dep","key":"node-dep","value":{"rev":"15-378dedd3f0b3e54329c00c675b19401c"}}, +{"id":"node-dev","key":"node-dev","value":{"rev":"48-6a98f38078fe5678d6c2fb48aec3c1c3"}}, +{"id":"node-downloader","key":"node-downloader","value":{"rev":"3-a541126c56c48681571e5e998c481343"}}, +{"id":"node-evented","key":"node-evented","value":{"rev":"6-a6ce8ab39e01cc0262c80d4bf08fc333"}}, +{"id":"node-exception-notifier","key":"node-exception-notifier","value":{"rev":"3-cebc02c45dace4852f8032adaa4e3c9c"}}, +{"id":"node-expat","key":"node-expat","value":{"rev":"33-261d85273a0a551e7815f835a933d5eb"}}, +{"id":"node-expect","key":"node-expect","value":{"rev":"7-5ba4539adfd3ba95dab21bb5bc0a5193"}}, +{"id":"node-express-boilerplate","key":"node-express-boilerplate","value":{"rev":"3-972f51d1ff9493e48d7cf508461f1114"}}, +{"id":"node-extjs","key":"node-extjs","value":{"rev":"7-33143616b4590523b4e1549dd8ffa991"}}, +{"id":"node-extjs4","key":"node-extjs4","value":{"rev":"3-8e5033aed477629a6fb9812466a90cfd"}}, +{"id":"node-fakeweb","key":"node-fakeweb","value":{"rev":"5-f01377fa6d03461cbe77f41b73577cf4"}}, +{"id":"node-fb","key":"node-fb","value":{"rev":"3-bc5f301a60e475de7c614837d3f9f35a"}}, +{"id":"node-fb-signed-request","key":"node-fb-signed-request","value":{"rev":"3-33c8f043bb947b63a84089d633d68f8e"}}, +{"id":"node-fects","key":"node-fects","value":{"rev":"3-151b7b895b74b24a87792fac34735814"}}, +{"id":"node-ffi","key":"node-ffi","value":{"rev":"22-25cf229f0ad4102333b2b13e03054ac5"}}, +{"id":"node-filter","key":"node-filter","value":{"rev":"3-0e6a86b4abb65df3594e5c93ab04bd31"}}, +{"id":"node-foursquare","key":"node-foursquare","value":{"rev":"25-549bbb0c2b4f96b2c5e6a5f642e8481d"}}, +{"id":"node-fs","key":"node-fs","value":{"rev":"5-14050cbc3887141f6b0e1e7d62736a63"}}, +{"id":"node-fs-synchronize","key":"node-fs-synchronize","value":{"rev":"11-6341e79f3391a9e1daa651a5932c8795"}}, +{"id":"node-gd","key":"node-gd","value":{"rev":"11-2ede7f4af38f062b86cc32bb0125e1bf"}}, +{"id":"node-geocode","key":"node-geocode","value":{"rev":"6-505af45c7ce679ac6738b495cc6b03c2"}}, +{"id":"node-get","key":"node-get","value":{"rev":"9-906945005a594ea1f05d4ad23170a83f"}}, +{"id":"node-gettext","key":"node-gettext","value":{"rev":"5-532ea4b528108b4c8387ddfc8fa690b2"}}, +{"id":"node-gist","key":"node-gist","value":{"rev":"11-3495a499c9496d01235676f429660424"}}, +{"id":"node-glbse","key":"node-glbse","value":{"rev":"5-69a537189610c69cc549f415431b181a"}}, +{"id":"node-google-sql","key":"node-google-sql","value":{"rev":"7-bfe20d25a4423651ecdff3f5054a6946"}}, +{"id":"node-gravatar","key":"node-gravatar","value":{"rev":"6-8265fc1ad003fd8a7383244c92abb346"}}, +{"id":"node-handlersocket","key":"node-handlersocket","value":{"rev":"16-f1dc0246559748a842dd0e1919c569ae"}}, +{"id":"node-hdfs","key":"node-hdfs","value":{"rev":"3-d460fba8ff515660de34cb216223c569"}}, +{"id":"node-hipchat","key":"node-hipchat","value":{"rev":"3-9d16738bf70f9e37565727e671ffe551"}}, +{"id":"node-hive","key":"node-hive","value":{"rev":"31-5eef1fa77a39e4bdacd8fa85ec2ce698"}}, +{"id":"node-html-encoder","key":"node-html-encoder","value":{"rev":"3-75f92e741a3b15eb56e3c4513feaca6d"}}, +{"id":"node-i3","key":"node-i3","value":{"rev":"3-5c489f43aeb06054b02ad3706183599c"}}, +{"id":"node-indextank","key":"node-indextank","value":{"rev":"5-235a17fce46c73c8b5abc4cf5f964385"}}, +{"id":"node-inherit","key":"node-inherit","value":{"rev":"3-099c0acf9c889eea94faaf64067bfc52"}}, +{"id":"node-inspector","key":"node-inspector","value":{"rev":"34-ca9fa856cf32a737d1ecccb759aaf5e1"}}, +{"id":"node-int64","key":"node-int64","value":{"rev":"11-50b92b5b65adf17e673b4d15df643ed4"}}, +{"id":"node-ip-lib","key":"node-ip-lib","value":{"rev":"3-2fe72f7b78cbc1739c71c7cfaec9fbcd"}}, +{"id":"node-iplookup","key":"node-iplookup","value":{"rev":"10-ba8474624dd852a46303d32ff0556883"}}, +{"id":"node-jdownloader","key":"node-jdownloader","value":{"rev":"3-b015035cfb8540568da5deb55b35248c"}}, +{"id":"node-jslint-all","key":"node-jslint-all","value":{"rev":"5-582f4a31160d3700731fa39771702896"}}, +{"id":"node-jsonengine","key":"node-jsonengine","value":{"rev":"3-6e429c32e42b205f3ed1ea1f48d67cbc"}}, +{"id":"node-khtml","key":"node-khtml","value":{"rev":"39-db8e8eea569657fc7de6300172a6a8a7"}}, +{"id":"node-linkshare","key":"node-linkshare","value":{"rev":"35-acc18a5d584b828bb2bd4f32bbcde98c"}}, +{"id":"node-log","key":"node-log","value":{"rev":"17-79cecc66227b4fb3a2ae04b7dac17cc2"}}, +{"id":"node-logentries","key":"node-logentries","value":{"rev":"3-0f640d5ff489a6904f4a8c18fb5f7e9c"}}, +{"id":"node-logger","key":"node-logger","value":{"rev":"3-75084f98359586bdd254e57ea5915d37"}}, +{"id":"node-logging","key":"node-logging","value":{"rev":"15-af01bc2b6128150787c85c8df1dae642"}}, +{"id":"node-mailer","key":"node-mailer","value":{"rev":"5-5b88675f05efe2836126336c880bd841"}}, +{"id":"node-mailgun","key":"node-mailgun","value":{"rev":"5-4bcfb7bf5163748b87c1b9ed429ed178"}}, +{"id":"node-markdown","key":"node-markdown","value":{"rev":"6-67137da4014f22f656aaefd9dfa2801b"}}, +{"id":"node-mdbm","key":"node-mdbm","value":{"rev":"22-3006800b042cf7d4b0b391c278405143"}}, +{"id":"node-minify","key":"node-minify","value":{"rev":"13-e853813d4b6519b168965979b8ccccdd"}}, +{"id":"node-mug","key":"node-mug","value":{"rev":"3-f7567ffac536bfa7eb5a7e3da7a0efa0"}}, +{"id":"node-mvc","key":"node-mvc","value":{"rev":"3-74f7c07b2991fcddb27afd2889b6db4e"}}, +{"id":"node-mwire","key":"node-mwire","value":{"rev":"26-79d7982748f42b9e07ab293447b167ec"}}, +{"id":"node-mynix-feed","key":"node-mynix-feed","value":{"rev":"3-59d4a624b3831bbab6ee99be2f84e568"}}, +{"id":"node-nether","key":"node-nether","value":{"rev":"3-0fbefe710fe0d74262bfa25f6b4e1baf"}}, +{"id":"node-nude","key":"node-nude","value":{"rev":"3-600abb219646299ac602fa51fa260f37"}}, +{"id":"node-nxt","key":"node-nxt","value":{"rev":"3-8ce48601c2b0164e2b125259a0c97d45"}}, +{"id":"node-oauth","key":"node-oauth","value":{"rev":"3-aa6cd61f44d74118bafa5408900c4984"}}, +{"id":"node-opencalais","key":"node-opencalais","value":{"rev":"13-a3c0b882aca7207ce36f107e40a0ce50"}}, +{"id":"node-props","key":"node-props","value":{"rev":"7-e400cee08cc9abdc1f1ce4f262a04b05"}}, +{"id":"node-proxy","key":"node-proxy","value":{"rev":"20-ce722bf45c84a7d925b8b7433e786ed6"}}, +{"id":"node-pusher","key":"node-pusher","value":{"rev":"3-7cc7cd5bffaf3b11c44438611beeba98"}}, +{"id":"node-putio","key":"node-putio","value":{"rev":"3-8a1fc6362fdcf16217cdb6846e419b4c"}}, +{"id":"node-raphael","key":"node-raphael","value":{"rev":"25-e419d98a12ace18a40d94a9e8e32cdd4"}}, +{"id":"node-rapleaf","key":"node-rapleaf","value":{"rev":"11-c849c8c8635e4eb2f81bd7810b7693fd"}}, +{"id":"node-rats","key":"node-rats","value":{"rev":"3-dca544587f3121148fe02410032cf726"}}, +{"id":"node-rdf2json","key":"node-rdf2json","value":{"rev":"3-bde382dc2fcb40986c5ac41643d44543"}}, +{"id":"node-recurly","key":"node-recurly","value":{"rev":"11-79cab9ccee7c1ddb83791e8de41c72f5"}}, +{"id":"node-redis","key":"node-redis","value":{"rev":"13-12adf3a3e986675637fa47b176f527e3"}}, +{"id":"node-redis-mapper","key":"node-redis-mapper","value":{"rev":"5-53ba8f67cc82dbf1d127fc7359353f32"}}, +{"id":"node-redis-monitor","key":"node-redis-monitor","value":{"rev":"3-79bcba76241d7c7dbc4b18d90a9d59e3"}}, +{"id":"node-restclient","key":"node-restclient","value":{"rev":"6-5844eba19bc465a8f75b6e94c061350f"}}, +{"id":"node-restclient2","key":"node-restclient2","value":{"rev":"5-950de911f7bde7900dfe5b324f49818c"}}, +{"id":"node-runner","key":"node-runner","value":{"rev":"3-e9a9e6bd10d2ab1aed8b401b04fadc7b"}}, +{"id":"node-sc-setup","key":"node-sc-setup","value":{"rev":"3-e89c496e03c48d8574ccaf61c9ed4fca"}}, +{"id":"node-schedule","key":"node-schedule","value":{"rev":"9-ae12fa59226f1c9b7257b8a2d71373b4"}}, +{"id":"node-sdlmixer","key":"node-sdlmixer","value":{"rev":"8-489d85278d6564b6a4e94990edcb0527"}}, +{"id":"node-secure","key":"node-secure","value":{"rev":"3-73673522a4bb5f853d55e535f0934803"}}, +{"id":"node-sendgrid","key":"node-sendgrid","value":{"rev":"9-4662c31304ca4ee4e702bd3a54ea7824"}}, +{"id":"node-sizzle","key":"node-sizzle","value":{"rev":"6-c08c24d9d769d3716e5c4e3441740eb2"}}, +{"id":"node-soap-client","key":"node-soap-client","value":{"rev":"9-35ff34a4a5af569de6a2e89d1b35b69a"}}, +{"id":"node-spec","key":"node-spec","value":{"rev":"9-92e99ca74b9a09a8ae2eb7382ef511ef"}}, +{"id":"node-static","key":"node-static","value":{"rev":"10-11b0480fcd416db3d3d4041f43a55290"}}, +{"id":"node-static-maccman","key":"node-static-maccman","value":{"rev":"3-49e256728b14c85776b74f2bd912eb42"}}, +{"id":"node-statsd","key":"node-statsd","value":{"rev":"5-08d3e6b4b2ed1d0b7916e9952f55573c"}}, +{"id":"node-statsd-instrument","key":"node-statsd-instrument","value":{"rev":"3-c3cd3315e1edcc91096830392f439305"}}, +{"id":"node-std","key":"node-std","value":{"rev":"3-f99be0f03be4175d546823799bb590d3"}}, +{"id":"node-store","key":"node-store","value":{"rev":"3-7cb6bf13de9550b869c768f464fd0f65"}}, +{"id":"node-stringprep","key":"node-stringprep","value":{"rev":"13-9b08baa97042f71c5c8e9e2fdcc2c300"}}, +{"id":"node-synapse","key":"node-synapse","value":{"rev":"3-c46c47099eb2792f4a57fdfd789520ca"}}, +{"id":"node-syslog","key":"node-syslog","value":{"rev":"23-34f7df06ba88d9f897b7e00404db7187"}}, +{"id":"node-t","key":"node-t","value":{"rev":"3-042225eff3208ba9add61a9f79d90871"}}, +{"id":"node-taobao","key":"node-taobao","value":{"rev":"7-c988ace74806b2e2f55e162f54ba1a2c"}}, +{"id":"node-term-ui","key":"node-term-ui","value":{"rev":"5-210310014b19ce26c5e3e840a8a0549e"}}, +{"id":"node-tiny","key":"node-tiny","value":{"rev":"7-df05ab471f25ca4532d80c83106944d7"}}, +{"id":"node-tmpl","key":"node-tmpl","value":{"rev":"3-6fcfa960da8eb72a5e3087559d3fe206"}}, +{"id":"node-twilio","key":"node-twilio","value":{"rev":"11-af69e600109d38c77eadbcec4bee4782"}}, +{"id":"node-twitter-mailer","key":"node-twitter-mailer","value":{"rev":"7-f915b76d834cb162c91816abc30cee5f"}}, +{"id":"node-usb","key":"node-usb","value":{"rev":"3-0c3837307f86a80427800f1b45aa5862"}}, +{"id":"node-uuid","key":"node-uuid","value":{"rev":"6-642efa619ad8a6476a44a5c6158e7a36"}}, +{"id":"node-vapor.js","key":"node-vapor.js","value":{"rev":"3-d293284cc415b2906533e91db13ee748"}}, +{"id":"node-version","key":"node-version","value":{"rev":"3-433b1529a6aa3d619314e461e978d2b6"}}, +{"id":"node-webapp","key":"node-webapp","value":{"rev":"11-65411bfd8eaf19d3539238360d904d43"}}, +{"id":"node-wiki","key":"node-wiki","value":{"rev":"5-22b0177c9a5e4dc1f72d36bb83c746d0"}}, +{"id":"node-wkhtml","key":"node-wkhtml","value":{"rev":"5-a8fa203720442b443d558670c9750548"}}, +{"id":"node-xerces","key":"node-xerces","value":{"rev":"3-de6d82ec712af997b7aae451277667f0"}}, +{"id":"node-xml","key":"node-xml","value":{"rev":"3-e14a52dcd04302aea7dd6943cf6dd886"}}, +{"id":"node-xmpp","key":"node-xmpp","value":{"rev":"36-031eb5e830ed2e2027ee4ee7f861cf81"}}, +{"id":"node-xmpp-bosh","key":"node-xmpp-bosh","value":{"rev":"85-f7f8b699b6fda74fc27c621466915bd1"}}, +{"id":"node-xmpp-via-bosh","key":"node-xmpp-via-bosh","value":{"rev":"3-5f5fee9e42ae8ce8f42d55c31808c969"}}, +{"id":"node.io","key":"node.io","value":{"rev":"224-e99561d454a7676d10875e1b06ba44c7"}}, +{"id":"node.io-min","key":"node.io-min","value":{"rev":"3-e8389bdcfa55c68ae9698794d9089ce4"}}, +{"id":"node.isbn","key":"node.isbn","value":{"rev":"3-76aa84f3c49a54b6c901f440af35192d"}}, +{"id":"node.uptime","key":"node.uptime","value":{"rev":"5-cfc2c1c1460d000eab4e1a28506e6d29"}}, +{"id":"node3p","key":"node3p","value":{"rev":"14-b1931b8aa96227854d78965cc4301168"}}, +{"id":"node3p-web","key":"node3p-web","value":{"rev":"12-bc783ee1e493e80b7e7a3c2fce39f55e"}}, +{"id":"nodeBase","key":"nodeBase","value":{"rev":"39-4d9ae0f18e0bca7192901422d85e85c7"}}, +{"id":"nodeCgi","key":"nodeCgi","value":{"rev":"9-bb65e71ee63551e519f49434f2ae1cd7"}}, +{"id":"nodeDocs","key":"nodeDocs","value":{"rev":"3-0c6e714d3e6d5c2cc9482444680fb3ca"}}, +{"id":"nodePhpSessions","key":"nodePhpSessions","value":{"rev":"3-5063b38582deaca9cacdc029db97c2b1"}}, +{"id":"node_bsdiff","key":"node_bsdiff","value":{"rev":"5-e244ef36755a2b6534ce50fa1ee5ee6e"}}, +{"id":"node_hash","key":"node_hash","value":{"rev":"3-cdce2fcc2c18fcd25e16be8e52add891"}}, +{"id":"node_util","key":"node_util","value":{"rev":"3-cde723ee2311cf48f7cf0a3bc3484f9a"}}, +{"id":"node_xslt","key":"node_xslt","value":{"rev":"3-f12035155aee31d1749204fdca2aee10"}}, +{"id":"nodec","key":"nodec","value":{"rev":"3-dba2af2d5b98a71964abb4328512b9e1"}}, +{"id":"nodefm","key":"nodefm","value":{"rev":"3-c652a95d30318a371736515feab649f9"}}, +{"id":"nodegit","key":"nodegit","value":{"rev":"31-92a2cea0d1c92086c920bc007f5a3f16"}}, +{"id":"nodeib","key":"nodeib","value":{"rev":"3-e67d779007817597ca36e8b821f38e6a"}}, +{"id":"nodeinfo","key":"nodeinfo","value":{"rev":"53-61bf0f48662dc2e04cde38a2b897c211"}}, +{"id":"nodejitsu-client","key":"nodejitsu-client","value":{"rev":"3-4fa613f888ebe249aff7b03aa9b8d7ef"}}, +{"id":"nodejs-intro","key":"nodejs-intro","value":{"rev":"4-c75f03e80b597f734f4466e62ecebfeb"}}, +{"id":"nodejs-tvrage","key":"nodejs-tvrage","value":{"rev":"9-88bb3b5d23652ebdb7186a30bc3be43f"}}, +{"id":"nodejs.be-cli","key":"nodejs.be-cli","value":{"rev":"3-d8f23777f9b18101f2d2dc5aa618a703"}}, +{"id":"nodeler","key":"nodeler","value":{"rev":"9-00760d261ea75164a5709109011afb25"}}, +{"id":"nodelint","key":"nodelint","value":{"rev":"8-31502553d4bb099ba519fb331cccdd63"}}, +{"id":"nodeload","key":"nodeload","value":{"rev":"12-f02626475b59ebe67a864a114c99ff9b"}}, +{"id":"nodemachine","key":"nodemachine","value":{"rev":"8-5342324502e677e35aefef17dc08c8db"}}, +{"id":"nodemailer","key":"nodemailer","value":{"rev":"63-d39a5143b06fa79edcb81252d6329861"}}, +{"id":"nodemock","key":"nodemock","value":{"rev":"33-7095334209b39c8e1482374bee1b712a"}}, +{"id":"nodemon","key":"nodemon","value":{"rev":"42-4f40ba2299ef4ae613a384a48e4045fa"}}, +{"id":"nodepad","key":"nodepad","value":{"rev":"5-93718cc67e97c89f45b753c1caef07e4"}}, +{"id":"nodepal","key":"nodepal","value":{"rev":"5-e53372a5081b3753993ee98299ecd550"}}, +{"id":"nodepie","key":"nodepie","value":{"rev":"21-a44a6d3575758ed591e13831a5420758"}}, +{"id":"nodepress","key":"nodepress","value":{"rev":"3-f17616b9ae61e15d1d219cb87ac5a63a"}}, +{"id":"noderelict","key":"noderelict","value":{"rev":"23-0ca0997e3ef112e9393ae8ccef63f1ee"}}, +{"id":"noderpc","key":"noderpc","value":{"rev":"27-7efb6365916b403c3aa4e1c766de75a2"}}, +{"id":"nodespec","key":"nodespec","value":{"rev":"3-69f357577e52e9fd096ac88a1e7e3445"}}, +{"id":"nodespy","key":"nodespy","value":{"rev":"3-ad33e14db2bcaf61bf99d3e8915da5ee"}}, +{"id":"nodestalker","key":"nodestalker","value":{"rev":"5-080eba88a3625ecf7935ec5e9d2db6e9"}}, +{"id":"nodester-api","key":"nodester-api","value":{"rev":"39-52046dbcdf4447bbb85aecc92086ae1d"}}, +{"id":"nodester-cli","key":"nodester-cli","value":{"rev":"89-6de3d724a974c1dd3b632417f8b01267"}}, +{"id":"nodetk","key":"nodetk","value":{"rev":"11-265d267335e7603249e1af9441700f2f"}}, +{"id":"nodeunit","key":"nodeunit","value":{"rev":"40-d1cc6c06f878fb0b86779186314bc193"}}, +{"id":"nodeunit-coverage","key":"nodeunit-coverage","value":{"rev":"3-29853918351e75e3f6f93acd97e2942f"}}, +{"id":"nodeunit-dsl","key":"nodeunit-dsl","value":{"rev":"6-91be44077bc80c942f86f0ac28a69c5e"}}, +{"id":"nodevlc","key":"nodevlc","value":{"rev":"3-e151577d3e1ba2f58db465d94ebcb1c1"}}, +{"id":"nodevore","key":"nodevore","value":{"rev":"3-ac73b3bc33e2f934776dda359869ddcf"}}, +{"id":"nodewatch","key":"nodewatch","value":{"rev":"9-267bfe1324c51993865dc41b09aee6dc"}}, +{"id":"nodewii","key":"nodewii","value":{"rev":"9-716b3faa8957c1aea337540402ae7f43"}}, +{"id":"nodie","key":"nodie","value":{"rev":"3-cc29702a2e7e295cfe583a05fb77b530"}}, +{"id":"nodify","key":"nodify","value":{"rev":"10-87fadf6bf262882bd71ab7e759b29949"}}, +{"id":"nodrrr","key":"nodrrr","value":{"rev":"3-75937f4ffb722a67d6c5a67663366854"}}, +{"id":"nodules","key":"nodules","value":{"rev":"8-2c6ec430f26ff7ef171e80b7b5e990c2"}}, +{"id":"nodysentary","key":"nodysentary","value":{"rev":"3-7574fc8e12b1271c2eb1c66026f702cb"}}, +{"id":"nohm","key":"nohm","value":{"rev":"45-09dcf4df92734b3c51c8df3c3b374b0b"}}, +{"id":"noid","key":"noid","value":{"rev":"5-ac31e001806789e80a7ffc64f2914eb4"}}, +{"id":"nolife","key":"nolife","value":{"rev":"7-cfd4fe84b1062303cefb83167ea48bba"}}, +{"id":"nolog","key":"nolog","value":{"rev":"9-6e82819b801f5d7ec6773596d5d2efb2"}}, +{"id":"nomnom","key":"nomnom","value":{"rev":"34-bf66753d1d155820cfacfc7fa7a830c9"}}, +{"id":"nomplate","key":"nomplate","value":{"rev":"9-6ea21ee9568421a60cb80637c4c6cb48"}}, +{"id":"nonogo","key":"nonogo","value":{"rev":"5-8307413f9a3da913f9818c4f2d951519"}}, +{"id":"noode","key":"noode","value":{"rev":"7-454df50a7cbd03c46a9951cb1ddbe1c6"}}, +{"id":"noodle","key":"noodle","value":{"rev":"7-163745527770de0de8e7e9d59fc3888c"}}, +{"id":"noop","key":"noop","value":{"rev":"5-ed9fd66573ed1186e66b4c2bc16192cb"}}, +{"id":"nope","key":"nope","value":{"rev":"3-7088ffb62b8e06261527cbfa69cb94c5"}}, +{"id":"nopro","key":"nopro","value":{"rev":"11-6c4aeafe6329821b2259ef11414481dd"}}, +{"id":"nopt","key":"nopt","value":{"rev":"23-cce441940b6f129cab94a359ddb8b3e4"}}, +{"id":"norm","key":"norm","value":{"rev":"9-2bf26c3803fdc3bb6319e490cae3b625"}}, +{"id":"norq","key":"norq","value":{"rev":"3-b1a80ad1aa4ccc493ac25da22b0f0697"}}, +{"id":"norris","key":"norris","value":{"rev":"3-a341286d9e83fa392c1ce6b764d0aace"}}, +{"id":"norris-ioc","key":"norris-ioc","value":{"rev":"15-d022f159229d89ce60fc2a15d71eac59"}}, +{"id":"norris-tester","key":"norris-tester","value":{"rev":"3-fc2f34c9373bbdf5a1cd9cfbaff21f83"}}, +{"id":"northwatcher","key":"northwatcher","value":{"rev":"13-edab28a123f0100e12f96c9828428a8a"}}, +{"id":"nosey","key":"nosey","value":{"rev":"4-10a22f27dd9f2a40acf035a7d250c661"}}, +{"id":"nosql-thin","key":"nosql-thin","value":{"rev":"6-604169cacf303b5278064f68b884090b"}}, +{"id":"notch","key":"notch","value":{"rev":"3-5b720089f0f9cfdbbbea8677216eeee5"}}, +{"id":"notes","key":"notes","value":{"rev":"3-5dfbd6ec33c69c0f1b619dd65d9e7a56"}}, +{"id":"nothing","key":"nothing","value":{"rev":"3-8b44e10efd7d6504755c0c4bd1043814"}}, +{"id":"notifications","key":"notifications","value":{"rev":"3-a68448bca7ea2d3d3ce43e4d03cd76c6"}}, +{"id":"notifo","key":"notifo","value":{"rev":"8-0bc13ea6135adfa80c5fac497a2ddeda"}}, +{"id":"notify","key":"notify","value":{"rev":"3-da00942576bcb5fab594186f80d4575a"}}, +{"id":"notify-send","key":"notify-send","value":{"rev":"7-89f5c6bc656d51577e3997b9f90d0454"}}, +{"id":"nova","key":"nova","value":{"rev":"3-4e136f35b7d5b85816c17496c6c0e382"}}, +{"id":"now","key":"now","value":{"rev":"84-dbfde18b3f6fe79dd3637b6da34b78cf"}}, +{"id":"now-bal","key":"now-bal","value":{"rev":"3-c769bcdd45a93095f68c2de54f35543f"}}, +{"id":"nowpad","key":"nowpad","value":{"rev":"51-8d90c49031f79a9d31eb4ed6f39609b6"}}, +{"id":"nowww","key":"nowww","value":{"rev":"3-541994af2e579b376d2037f4e34f31d8"}}, +{"id":"noxmox","key":"noxmox","value":{"rev":"9-4ac8b1529dced329cac0976b9ca9eed0"}}, +{"id":"nozzle","key":"nozzle","value":{"rev":"23-e60444326d11a5b57c208de548c325e8"}}, +{"id":"npm","key":"npm","value":{"rev":"665-71d13d024c846b2ee85ed054fcfcb242"}}, +{"id":"npm-deploy","key":"npm-deploy","value":{"rev":"23-751e9d3c2edac0fd9916b0e886414ef2"}}, +{"id":"npm-dev-install","key":"npm-dev-install","value":{"rev":"3-7a08e11a59758329ba8dc4e781ea9993"}}, +{"id":"npm-docsite","key":"npm-docsite","value":{"rev":"3-5ed4f1ffea02487ab9ea24cfa0196f76"}}, +{"id":"npm-github-service","key":"npm-github-service","value":{"rev":"8-6891bc055b499e088fc79a7f94b6a4ec"}}, +{"id":"npm-intro-slides","key":"npm-intro-slides","value":{"rev":"8-e95f28475662cb8f70f4cb48baaa9d27"}}, +{"id":"npm-monitor","key":"npm-monitor","value":{"rev":"7-4e3209ea893fe37c0e516fe21de2d8ad"}}, +{"id":"npm-remapper","key":"npm-remapper","value":{"rev":"3-69163475ee93f32faac3f934e772b6c7"}}, +{"id":"npm-tweets","key":"npm-tweets","value":{"rev":"9-86064412a8aa02d813b20d2e49d78d84"}}, +{"id":"npm-wrapper","key":"npm-wrapper","value":{"rev":"3-59c4d372b84f6e91dbe48a220511dfd5"}}, +{"id":"npm2debian","key":"npm2debian","value":{"rev":"3-3cf2f471f3bfbc613176c7c780a6aad6"}}, +{"id":"npmcount","key":"npmcount","value":{"rev":"5-59c55b09d9c2cc7da217cab3b0ea642c"}}, +{"id":"npmdep","key":"npmdep","value":{"rev":"9-78184ad3b841e5c91bbfa29ff722778a"}}, +{"id":"npmtop","key":"npmtop","value":{"rev":"19-2754af894829f22d6edb3a17a64cdf1e"}}, +{"id":"nquery","key":"nquery","value":{"rev":"9-461fb0c9bcc3c15e0696dc2e99807c98"}}, +{"id":"nrecipe","key":"nrecipe","value":{"rev":"15-a96b6b0134a7625eb4eb236b4bf3fbf3"}}, +{"id":"nserver","key":"nserver","value":{"rev":"5-ea895373c340dd8d9119f3f549990048"}}, +{"id":"nserver-util","key":"nserver-util","value":{"rev":"5-5e14eb0bc9f7ab0eac04c5699c6bb328"}}, +{"id":"nssocket","key":"nssocket","value":{"rev":"51-6aac1d5dd0aa7629b3619b3085d63c04"}}, +{"id":"nstore","key":"nstore","value":{"rev":"28-6e2639829539b7315040487dfa5c79af"}}, +{"id":"nstore-cache","key":"nstore-cache","value":{"rev":"3-453ed78dcbe68b31ff675f4d94b47c4a"}}, +{"id":"nstore-query","key":"nstore-query","value":{"rev":"3-39f46992dd278824db641a37ec5546f5"}}, +{"id":"ntodo","key":"ntodo","value":{"rev":"7-e214da8bbed2d3e40bdaec77d7a49831"}}, +{"id":"ntp","key":"ntp","value":{"rev":"5-5ee2b25e8f3bca06d1cc4ce3b25cac42"}}, +{"id":"nts","key":"nts","value":{"rev":"7-ecaf47f8af1f77de791d1d1fa9bab88e"}}, +{"id":"nttpd","key":"nttpd","value":{"rev":"21-cda7aa0f1db126428f6ca01d44b4d209"}}, +{"id":"ntwitter","key":"ntwitter","value":{"rev":"11-732c6f34137c942bc98967170b2f83fc"}}, +{"id":"nub","key":"nub","value":{"rev":"3-932ecf56889fa43584687dbb2cf4aa91"}}, +{"id":"nubnub","key":"nubnub","value":{"rev":"6-93a5267209e1aa869521a5952cbb1828"}}, +{"id":"null","key":"null","value":{"rev":"3-ae8247cfa9553d23a229993cfc8436c5"}}, +{"id":"numb","key":"numb","value":{"rev":"5-594cd9e8e8e4262ddb3ddd80e8084b62"}}, +{"id":"nun","key":"nun","value":{"rev":"8-3bd8b37ed85c1a5da211bd0d5766848e"}}, +{"id":"nunz","key":"nunz","value":{"rev":"3-040f033943158be495f6b0da1a0c0344"}}, +{"id":"nurl","key":"nurl","value":{"rev":"11-6c4ee6fc5c5119c56f2fd8ad8a0cb928"}}, +{"id":"nutil","key":"nutil","value":{"rev":"3-7785a1d4651dcfe78c874848f41d1348"}}, +{"id":"nutils","key":"nutils","value":{"rev":"13-889624db0c155fc2f0b501bba47e55ec"}}, +{"id":"nuvem","key":"nuvem","value":{"rev":"23-054b9b1240f4741f561ef0bb3197bdf8"}}, +{"id":"nvm","key":"nvm","value":{"rev":"28-251b7eb3429a00099b37810d05accd47"}}, +{"id":"nwm","key":"nwm","value":{"rev":"3-fe9274106aac9e67eea734159477acaf"}}, +{"id":"nx","key":"nx","value":{"rev":"55-7ad32fcb34ec25f841ddd0e5857375c7"}}, +{"id":"nx-core","key":"nx-core","value":{"rev":"33-a7bc62348591bae89fff82057bede1ab"}}, +{"id":"nx-daemon","key":"nx-daemon","value":{"rev":"3-7b86a87654c9e32746a4d36d7c527182"}}, +{"id":"nyaatorrents","key":"nyaatorrents","value":{"rev":"5-8600707a1e84f617bd5468b5c9179202"}}, +{"id":"nyala","key":"nyala","value":{"rev":"17-23c908297a37c47f9f09977f4cf101ff"}}, +{"id":"nyam","key":"nyam","value":{"rev":"17-697b5f17fe67630bc9494184146c12f1"}}, +{"id":"nyancat","key":"nyancat","value":{"rev":"13-84c18d007db41b40e9145bdc049b0a00"}}, +{"id":"nymph","key":"nymph","value":{"rev":"5-3a5d7a75d32f7a71bf4ec131f71484d8"}}, +{"id":"o3-xml","key":"o3-xml","value":{"rev":"3-cc4df881333805600467563f80b5216c"}}, +{"id":"oahu","key":"oahu","value":{"rev":"3-e789fc2098292518cb33606c73bfeca4"}}, +{"id":"oauth","key":"oauth","value":{"rev":"38-36b99063db7dc302b70d932e9bbafc24"}}, +{"id":"oauth-client","key":"oauth-client","value":{"rev":"12-ae097c9580ddcd5ca938b169486a63c6"}}, +{"id":"oauth-server","key":"oauth-server","value":{"rev":"7-ea931e31eaffaa843be61ffc89f29da7"}}, +{"id":"oauth2","key":"oauth2","value":{"rev":"3-4fce73fdc95580f397afeaf1bbd596bb"}}, +{"id":"oauth2-client","key":"oauth2-client","value":{"rev":"7-b5bd019159112384abc2087b2f8cb4f7"}}, +{"id":"oauth2-provider","key":"oauth2-provider","value":{"rev":"3-acd8f23b8c1c47b19838424b64618c70"}}, +{"id":"oauth2-server","key":"oauth2-server","value":{"rev":"11-316baa7e754053d0153086d0748b07c5"}}, +{"id":"obj_diff","key":"obj_diff","value":{"rev":"3-9289e14caaec4bb6aa64aa1be547db3b"}}, +{"id":"object-additions","key":"object-additions","value":{"rev":"3-11f03ae5afe00ad2be034fb313ce71a9"}}, +{"id":"object-proxy","key":"object-proxy","value":{"rev":"3-4d531308fc97bac6f6f9acd1e8f5b53a"}}, +{"id":"object-sync","key":"object-sync","value":{"rev":"5-6628fff49d65c96edc9d7a2e13db8d6d"}}, +{"id":"observer","key":"observer","value":{"rev":"3-a48052671a59b1c7874b4462e375664d"}}, +{"id":"octo.io","key":"octo.io","value":{"rev":"7-5692104396299695416ecb8548e53541"}}, +{"id":"octopus","key":"octopus","value":{"rev":"3-0a286abf59ba7232210e24a371902e7b"}}, +{"id":"odbc","key":"odbc","value":{"rev":"3-8550f0b183b229e41f3cb947bad9b059"}}, +{"id":"odot","key":"odot","value":{"rev":"13-3954b69c1a560a71fe58ab0c5c1072ba"}}, +{"id":"offliner","key":"offliner","value":{"rev":"3-9b58041cbd7b0365e04fec61c192c9b2"}}, +{"id":"ofxer","key":"ofxer","value":{"rev":"11-f8a79e1f27c92368ca1198ad37fbe83e"}}, +{"id":"ogre","key":"ogre","value":{"rev":"35-ea9c78c1d5b1761f059bb97ea568b23d"}}, +{"id":"oi.tekcos","key":"oi.tekcos","value":{"rev":"5-fdca9adb54acea3f91567082b107dde9"}}, +{"id":"oktest","key":"oktest","value":{"rev":"3-3b40312743a3eb1d8541ceee3ecfeace"}}, +{"id":"omcc","key":"omcc","value":{"rev":"3-19718e77bf82945c3ca7a3cdfb91188c"}}, +{"id":"omegle","key":"omegle","value":{"rev":"3-507ba8a51afbe2ff078e3e96712b7286"}}, +{"id":"ometa","key":"ometa","value":{"rev":"10-457fa17de89e1012ce812af3a53f4035"}}, +{"id":"ometa-highlighter","key":"ometa-highlighter","value":{"rev":"21-d18470d6d9a93bc7383c7d8ace22ad1d"}}, +{"id":"ometajs","key":"ometajs","value":{"rev":"20-c7e8c32926f2523e40e4a7ba2297192c"}}, +{"id":"onion","key":"onion","value":{"rev":"3-b46c000c8ff0b06f5f0028d268bc5c94"}}, +{"id":"onvalid","key":"onvalid","value":{"rev":"3-090bc1cf1418545b84db0fceb0846293"}}, +{"id":"oo","key":"oo","value":{"rev":"7-2297a18cdbcf29ad4867a2159912c04e"}}, +{"id":"oop","key":"oop","value":{"rev":"7-45fab8bae343e805d0c1863149dc20df"}}, +{"id":"op","key":"op","value":{"rev":"13-4efb059757caaecc18d5110b44266b35"}}, +{"id":"open-uri","key":"open-uri","value":{"rev":"21-023a00f26ecd89e278136fbb417ae9c3"}}, +{"id":"open.core","key":"open.core","value":{"rev":"35-f578db4e41dd4ae9128e3be574cf7b14"}}, +{"id":"open311","key":"open311","value":{"rev":"13-bb023a45d3c3988022d2fef809de8d98"}}, +{"id":"openid","key":"openid","value":{"rev":"29-b3c8a0e76d99ddb80c98d2aad5586771"}}, +{"id":"openlayers","key":"openlayers","value":{"rev":"3-602c34468c9be326e95be327b58d599b"}}, +{"id":"opentok","key":"opentok","value":{"rev":"5-5f4749f1763d45141d0272c1dbe6249a"}}, +{"id":"opentsdb-dashboard","key":"opentsdb-dashboard","value":{"rev":"3-2e0c5ccf3c9cfce17c20370c93283707"}}, +{"id":"opower-jobs","key":"opower-jobs","value":{"rev":"16-1602139f92e58d88178f21f1b3e0939f"}}, +{"id":"optimist","key":"optimist","value":{"rev":"64-ca3e5085acf135169d79949c25d84690"}}, +{"id":"optparse","key":"optparse","value":{"rev":"6-0200c34395f982ae3b80f4d18cb14483"}}, +{"id":"opts","key":"opts","value":{"rev":"8-ce2a0e31de55a1e02d5bbff66c4e8794"}}, +{"id":"orchestra","key":"orchestra","value":{"rev":"9-52ca98cddb51a2a43ec02338192c44fc"}}, +{"id":"orchid","key":"orchid","value":{"rev":"49-af9635443671ed769e4efa691b8ca84a"}}, +{"id":"orderly","key":"orderly","value":{"rev":"3-9ccc42d45b64278c9ffb1e64fc4f0d62"}}, +{"id":"orgsync.live","key":"orgsync.live","value":{"rev":"3-4dffc8ac43931364f59b9cb534acbaef"}}, +{"id":"orm","key":"orm","value":{"rev":"21-f3e7d89239364559d306110580bbb08f"}}, +{"id":"ormnomnom","key":"ormnomnom","value":{"rev":"15-0aacfbb5b7b580d76e9ecf5214a1d5ed"}}, +{"id":"orona","key":"orona","value":{"rev":"8-62d4ba1bf49098a140a2b85f80ebb103"}}, +{"id":"osc4node","key":"osc4node","value":{"rev":"3-0910613e78065f78b61142b35986e8b3"}}, +{"id":"oscar","key":"oscar","value":{"rev":"3-f5d2d39a67c67441bc2135cdaf2b47f8"}}, +{"id":"osrandom","key":"osrandom","value":{"rev":"3-026016691a5ad068543503e5e7ce6a84"}}, +{"id":"ossp-uuid","key":"ossp-uuid","value":{"rev":"10-8b7e1fba847d7cc9aa4f4c8813ebe6aa"}}, +{"id":"ostatus","key":"ostatus","value":{"rev":"3-76e0ec8c61c6df15c964197b722e24e7"}}, +{"id":"ostrich","key":"ostrich","value":{"rev":"3-637e0821e5ccfd0f6b1261b22c168c8d"}}, +{"id":"otk","key":"otk","value":{"rev":"5-2dc24e159cc618f43e573561286c4dcd"}}, +{"id":"ourl","key":"ourl","value":{"rev":"5-a3945e59e33faac96c75b508ef7fa1fb"}}, +{"id":"oursql","key":"oursql","value":{"rev":"21-bc53ab462155fa0aedbe605255fb9988"}}, +{"id":"out","key":"out","value":{"rev":"5-eb261f940b6382e2689210a58bc1b440"}}, +{"id":"overload","key":"overload","value":{"rev":"10-b88919e5654bef4922029afad4f1d519"}}, +{"id":"ox","key":"ox","value":{"rev":"3-0ca445370b4f76a93f2181ad113956d9"}}, +{"id":"pachube","key":"pachube","value":{"rev":"10-386ac6be925bab307b5d545516fb18ef"}}, +{"id":"pachube-stream","key":"pachube-stream","value":{"rev":"13-176dadcc5c516420fb3feb1f964739e0"}}, +{"id":"pack","key":"pack","value":{"rev":"29-8f8c511d95d1fb322c1a6d7965ef8f29"}}, +{"id":"packagebohrer","key":"packagebohrer","value":{"rev":"3-507358253a945a74c49cc169ad0bf5a2"}}, +{"id":"packer","key":"packer","value":{"rev":"9-23410d893d47418731e236cfcfcfbf03"}}, +{"id":"packet","key":"packet","value":{"rev":"8-1b366f97d599c455dcbbe4339da7cf9e"}}, +{"id":"pacote-sam-egenial","key":"pacote-sam-egenial","value":{"rev":"3-b967db1b9fceb9a937f3520efd89f479"}}, +{"id":"pacoteegenial","key":"pacoteegenial","value":{"rev":"3-9cfe8518b885bfd9a44ed38814f7d623"}}, +{"id":"pact","key":"pact","value":{"rev":"7-82996c1a0c8e9a5e9df959d4ad37085e"}}, +{"id":"pad","key":"pad","value":{"rev":"3-eef6147f09b662cff95c946f2b065da5"}}, +{"id":"paddle","key":"paddle","value":{"rev":"3-fedd0156b9a0dadb5e9b0f1cfab508fd"}}, +{"id":"padlock","key":"padlock","value":{"rev":"9-3a9e378fbe8e3817da7999f675af227e"}}, +{"id":"pagen","key":"pagen","value":{"rev":"9-9aac56724039c38dcdf7f6d5cbb4911c"}}, +{"id":"paginate-js","key":"paginate-js","value":{"rev":"5-995269155152db396662c59b67e9e93d"}}, +{"id":"pairtree","key":"pairtree","value":{"rev":"3-0361529e6c91271e2a61f3d7fd44366e"}}, +{"id":"palsu-app","key":"palsu-app","value":{"rev":"3-73f1fd9ae35e3769efc9c1aa25ec6da7"}}, +{"id":"pam","key":"pam","value":{"rev":"3-77b5bd15962e1c8be1980b33fd3b9737"}}, +{"id":"panache","key":"panache","value":{"rev":"25-749d2034f7f9179c2266cf896bb4abb0"}}, +{"id":"panic","key":"panic","value":{"rev":"7-068b22be54ca8ae7b03eb153c2ea849a"}}, +{"id":"pantry","key":"pantry","value":{"rev":"33-3896f0fc165092f6cabb2949be3952c4"}}, +{"id":"paper-keys","key":"paper-keys","value":{"rev":"3-729378943040ae01d59f07bb536309b7"}}, +{"id":"paperboy","key":"paperboy","value":{"rev":"8-db2d51c2793b4ffc82a1ae928c813aae"}}, +{"id":"paperserve","key":"paperserve","value":{"rev":"6-8509fb68217199a3eb74f223b1e2bee5"}}, +{"id":"parall","key":"parall","value":{"rev":"5-279d7105a425e136f6101250e8f81a14"}}, +{"id":"parallel","key":"parallel","value":{"rev":"14-f1294b3b840cfb26095107110b6720ec"}}, +{"id":"paramon","key":"paramon","value":{"rev":"3-37e599e924beb509c894c992cf72791b"}}, +{"id":"parannus","key":"parannus","value":{"rev":"7-7541f1ed13553261330b9e1c4706f112"}}, +{"id":"parasite","key":"parasite","value":{"rev":"13-83c26181bb92cddb8ff76bc154a50210"}}, +{"id":"parrot","key":"parrot","value":{"rev":"3-527d1cb4b5be0e252dc92a087d380f17"}}, +{"id":"parseUri","key":"parseUri","value":{"rev":"3-3b60b1fd6d8109279b5d0cfbdb89b343"}}, +{"id":"parseopt","key":"parseopt","value":{"rev":"10-065f1acaf02c94f0684f75fefc2fd1ec"}}, +{"id":"parser","key":"parser","value":{"rev":"5-f661f0b7ede9b6d3e0de259ed20759b1"}}, +{"id":"parser_email","key":"parser_email","value":{"rev":"12-63333860c62f2a9c9d6b0b7549bf1cdc"}}, +{"id":"parstream","key":"parstream","value":{"rev":"3-ef7e8ffc8ce1e7d951e37f85bfd445ab"}}, +{"id":"parted","key":"parted","value":{"rev":"9-250e4524994036bc92915b6760d62d8a"}}, +{"id":"partial","key":"partial","value":{"rev":"7-208411e6191275a4193755ee86834716"}}, +{"id":"party","key":"party","value":{"rev":"5-9337d8dc5e163f0300394f533ab1ecdf"}}, +{"id":"pashua","key":"pashua","value":{"rev":"3-b752778010f4e20f662a3d8f0f57b18b"}}, +{"id":"pass","key":"pass","value":{"rev":"3-66a2d55d93eae8535451f12965578db8"}}, +{"id":"passthru","key":"passthru","value":{"rev":"9-3c8f0b20f1a16976f3645a6f7411b56a"}}, +{"id":"passwd","key":"passwd","value":{"rev":"19-44ac384382a042faaa1f3b111786c831"}}, +{"id":"password","key":"password","value":{"rev":"9-0793f6a8d09076f25cde7c9e528eddec"}}, +{"id":"password-hash","key":"password-hash","value":{"rev":"9-590c62e275ad577c6f8ddbf5ba4579cc"}}, +{"id":"path","key":"path","value":{"rev":"3-3ec064cf3f3a85cb59528654c5bd938f"}}, +{"id":"pathjs","key":"pathjs","value":{"rev":"5-d5e1b1a63e711cae3ac79a3b1033b609"}}, +{"id":"pathname","key":"pathname","value":{"rev":"9-16f2c1473454900ce18a217b2ea52c57"}}, +{"id":"paths","key":"paths","value":{"rev":"3-fa47b7c1d533a7d9f4bbaffc5fb89905"}}, +{"id":"patr","key":"patr","value":{"rev":"7-7bcd37586389178b9f23d33c1d7a0292"}}, +{"id":"pattern","key":"pattern","value":{"rev":"36-3ded826185c384af535dcd428af3f626"}}, +{"id":"payment-paypal-payflowpro","key":"payment-paypal-payflowpro","value":{"rev":"14-d8814a1d8bba57a6ecf8027064adc7ad"}}, +{"id":"paynode","key":"paynode","value":{"rev":"16-16084e61db66ac18fdbf95a51d31c09a"}}, +{"id":"payos","key":"payos","value":{"rev":"3-373695bd80c454b32b83a5eba6044261"}}, +{"id":"paypal-ipn","key":"paypal-ipn","value":{"rev":"5-ef32291f9f8371b20509db3acee722f6"}}, +{"id":"pcap","key":"pcap","value":{"rev":"46-8ae9e919221102581d6bb848dc67b84b"}}, +{"id":"pd","key":"pd","value":{"rev":"7-82146739c4c0eb4e49e40aa80a29cc0a"}}, +{"id":"pdf","key":"pdf","value":{"rev":"6-5c6b6a133e1b3ce894ebb1a49090216c"}}, +{"id":"pdfcrowd","key":"pdfcrowd","value":{"rev":"5-026b4611b50374487bfd64fd3e0d562c"}}, +{"id":"pdfkit","key":"pdfkit","value":{"rev":"13-2fd34c03225a87dfd8057c85a83f3c50"}}, +{"id":"pdflatex","key":"pdflatex","value":{"rev":"3-bbbf61f09ebe4c49ca0aff8019611660"}}, +{"id":"pdl","key":"pdl","value":{"rev":"3-4c41bf12e901ee15bdca468db8c89102"}}, +{"id":"peanut","key":"peanut","value":{"rev":"55-b797121dbbcba1219934284ef56abb8a"}}, +{"id":"pebble","key":"pebble","value":{"rev":"21-3cd08362123260a2e96d96d80e723805"}}, +{"id":"pecode","key":"pecode","value":{"rev":"3-611f5e8c61bbf4467b84da954ebdd521"}}, +{"id":"pegjs","key":"pegjs","value":{"rev":"11-091040d16433014d1da895e32ac0f6a9"}}, +{"id":"per-second","key":"per-second","value":{"rev":"5-e1593b3f7008ab5e1c3cae86f39ba3f3"}}, +{"id":"permafrost","key":"permafrost","value":{"rev":"9-494cbc9a2f43a60b57f23c5f5b12270d"}}, +{"id":"perry","key":"perry","value":{"rev":"41-15aed7a778fc729ad62fdfb231c50774"}}, +{"id":"persistencejs","key":"persistencejs","value":{"rev":"20-2585af3f15f0a4a7395e937237124596"}}, +{"id":"pg","key":"pg","value":{"rev":"142-48de452fb8a84022ed7cae8ec2ebdaf6"}}, +{"id":"phonetap","key":"phonetap","value":{"rev":"7-2cc7d3c2a09518ad9b0fe816c6a99125"}}, +{"id":"php-autotest","key":"php-autotest","value":{"rev":"3-04470b38b259187729af574dd3dc1f97"}}, +{"id":"phpass","key":"phpass","value":{"rev":"3-66f4bec659bf45b312022bb047b18696"}}, +{"id":"piano","key":"piano","value":{"rev":"3-0bab6b5409e4305c87a775e96a2b7ad3"}}, +{"id":"picard","key":"picard","value":{"rev":"5-7676e6ad6d5154fdc016b001465891f3"}}, +{"id":"picardForTynt","key":"picardForTynt","value":{"rev":"3-09d205b790bd5022b69ec4ad54bad770"}}, +{"id":"pid","key":"pid","value":{"rev":"3-0ba7439d599b9d613461794c3892d479"}}, +{"id":"pieshop","key":"pieshop","value":{"rev":"12-7851afe1bbc20de5d054fe93b071f849"}}, +{"id":"pig","key":"pig","value":{"rev":"3-8e6968a7b64635fed1bad12c39d7a46a"}}, +{"id":"pigeons","key":"pigeons","value":{"rev":"53-8df70420d3c845cf0159b3f25d0aab90"}}, +{"id":"piles","key":"piles","value":{"rev":"3-140cb1e83b5a939ecd429b09886132ef"}}, +{"id":"pillar","key":"pillar","value":{"rev":"6-83c81550187f6d00e11dd9955c1c94b7"}}, +{"id":"pilot","key":"pilot","value":{"rev":"3-073ed1a083cbd4c2aa2561f19e5935ea"}}, +{"id":"pinboard","key":"pinboard","value":{"rev":"3-1020cab02a1183acdf82e1f7620dc1e0"}}, +{"id":"pinf-loader-js","key":"pinf-loader-js","value":{"rev":"5-709ba9c86fb4de906bd7bbca53771f0f"}}, +{"id":"pinf-loader-js-demos-npmpackage","key":"pinf-loader-js-demos-npmpackage","value":{"rev":"3-860569d98c83e59185cff356e56b10a6"}}, +{"id":"pingback","key":"pingback","value":{"rev":"5-5d0a05d65a14f6837b0deae16c550bec"}}, +{"id":"pingdom","key":"pingdom","value":{"rev":"11-f299d6e99122a9fa1497bfd166dadd02"}}, +{"id":"pintpay","key":"pintpay","value":{"rev":"3-eba9c4059283adec6b1ab017284c1f17"}}, +{"id":"pipe","key":"pipe","value":{"rev":"5-d202bf317c10a52ac817b5c1a4ce4c88"}}, +{"id":"pipe_utils","key":"pipe_utils","value":{"rev":"13-521857c99eb76bba849a22240308e584"}}, +{"id":"pipegram","key":"pipegram","value":{"rev":"3-1449333c81dd658d5de9eebf36c07709"}}, +{"id":"pipeline-surveyor","key":"pipeline-surveyor","value":{"rev":"11-464db89b17e7b44800088ec4a263d92e"}}, +{"id":"pipes","key":"pipes","value":{"rev":"99-8320636ff840a61d82d9c257a2e0ed48"}}, +{"id":"pipes-cellar","key":"pipes-cellar","value":{"rev":"27-e035e58a3d82e50842d766bb97ea3ed9"}}, +{"id":"pipes-cohort","key":"pipes-cohort","value":{"rev":"9-88fc0971e01516873396e44974874903"}}, +{"id":"piton-entity","key":"piton-entity","value":{"rev":"31-86254212066019f09d67dfd58524bd75"}}, +{"id":"piton-http-utils","key":"piton-http-utils","value":{"rev":"3-6cf6aa0c655ff6118d53e62e3b970745"}}, +{"id":"piton-mixin","key":"piton-mixin","value":{"rev":"3-7b7737004e53e04f7f95ba5850eb5e70"}}, +{"id":"piton-pipe","key":"piton-pipe","value":{"rev":"3-8d7df4e53f620ef2f24e9fc8b24f0238"}}, +{"id":"piton-simplate","key":"piton-simplate","value":{"rev":"3-9ac00835d3de59d535cdd2347011cdc9"}}, +{"id":"piton-string-utils","key":"piton-string-utils","value":{"rev":"3-ecab73993d764dfb378161ea730dbbd5"}}, +{"id":"piton-validity","key":"piton-validity","value":{"rev":"13-1766651d69e3e075bf2c66b174b66026"}}, +{"id":"pixel-ping","key":"pixel-ping","value":{"rev":"11-38d717c927e13306e8ff9032785b50f2"}}, +{"id":"pixelcloud","key":"pixelcloud","value":{"rev":"7-0897d734157b52dece8f86cde7be19d4"}}, +{"id":"pixiedust","key":"pixiedust","value":{"rev":"3-6b932dee4b6feeed2f797de5d0066f8a"}}, +{"id":"pkginfo","key":"pkginfo","value":{"rev":"13-3ee42503d6672812960a965d4f3a1bc2"}}, +{"id":"pksqlite","key":"pksqlite","value":{"rev":"13-095e7d7d0258b71491c39d0e8c4f19be"}}, +{"id":"plants.js","key":"plants.js","value":{"rev":"3-e3ef3a16f637787e84c100a9b9ec3b08"}}, +{"id":"plate","key":"plate","value":{"rev":"20-92ba0729b2edc931f28870fe7f2ca95a"}}, +{"id":"platform","key":"platform","value":{"rev":"4-be465a1d21be066c96e30a42b8602177"}}, +{"id":"platformjs","key":"platformjs","value":{"rev":"35-5c510fa0c90492fd1d0f0fc078460018"}}, +{"id":"platoon","key":"platoon","value":{"rev":"28-e0e0c5f852eadacac5a652860167aa11"}}, +{"id":"play","key":"play","value":{"rev":"5-17f7cf7cf5d1c21c7392f3c43473098d"}}, +{"id":"plist","key":"plist","value":{"rev":"10-2a23864923aeed93fb8e25c4b5b2e97e"}}, +{"id":"png","key":"png","value":{"rev":"14-9cc7aeaf0c036c9a880bcee5cd46229a"}}, +{"id":"png-guts","key":"png-guts","value":{"rev":"5-a29c7c686f9d08990ce29632bf59ef90"}}, +{"id":"policyfile","key":"policyfile","value":{"rev":"21-4a9229cca4bcac10f730f296f7118548"}}, +{"id":"polla","key":"polla","value":{"rev":"27-9af5a575961a4dddb6bef482c168c756"}}, +{"id":"poly","key":"poly","value":{"rev":"3-7f7fe29d9f0ec4fcbf8481c797b20455"}}, +{"id":"polyglot","key":"polyglot","value":{"rev":"3-9306e246d1f8b954b41bef76e3e81291"}}, +{"id":"pool","key":"pool","value":{"rev":"10-f364b59aa8a9076a17cd94251dd013ab"}}, +{"id":"poolr","key":"poolr","value":{"rev":"5-cacfbeaa7aaca40c1a41218e8ac8b732"}}, +{"id":"pop","key":"pop","value":{"rev":"41-8edd9ef2f34a90bf0ec5e8eb0e51e644"}}, +{"id":"pop-disqus","key":"pop-disqus","value":{"rev":"3-4a8272e6a8453ed2d754397dc8b349bb"}}, +{"id":"pop-ga","key":"pop-ga","value":{"rev":"3-5beaf7b355d46b3872043b97696ee693"}}, +{"id":"pop-gallery","key":"pop-gallery","value":{"rev":"3-1a88920ff930b8ce51cd50fcfe62675e"}}, +{"id":"pop3-client","key":"pop3-client","value":{"rev":"3-be8c314b0479d9d98384e2ff36d7f207"}}, +{"id":"poplib","key":"poplib","value":{"rev":"7-ab64c5c35269aee897b0904b4548096b"}}, +{"id":"porter-stemmer","key":"porter-stemmer","value":{"rev":"5-724a7b1d635b95a14c9ecd9d2f32487d"}}, +{"id":"portfinder","key":"portfinder","value":{"rev":"5-cdf36d1c666bbdae500817fa39b9c2bd"}}, +{"id":"portscanner","key":"portscanner","value":{"rev":"3-773c1923b6f3b914bd801476efcfdf64"}}, +{"id":"pos","key":"pos","value":{"rev":"3-1c1a27020560341ecd1b54d0e3cfaf2a"}}, +{"id":"posix-getopt","key":"posix-getopt","value":{"rev":"3-819b69724575b65fe25cf1c768e1b1c6"}}, +{"id":"postageapp","key":"postageapp","value":{"rev":"9-f5735237f7e6f0b467770e28e84c56db"}}, +{"id":"postal","key":"postal","value":{"rev":"19-dd70aeab4ae98ccf3d9f203dff9ccf37"}}, +{"id":"posterous","key":"posterous","value":{"rev":"3-6f8a9e7cae8a26f021653f2c27b0c67f"}}, +{"id":"postgres","key":"postgres","value":{"rev":"6-e8844a47c83ff3ef0a1ee7038b2046b2"}}, +{"id":"postgres-js","key":"postgres-js","value":{"rev":"3-bbe27a49ee9f8ae8789660e178d6459d"}}, +{"id":"postman","key":"postman","value":{"rev":"5-548538583f2e7ad448adae27f9a801e5"}}, +{"id":"postmark","key":"postmark","value":{"rev":"24-a6c61b346329e499d4a4a37dbfa446a2"}}, +{"id":"postmark-api","key":"postmark-api","value":{"rev":"3-79973af301aa820fc18c2c9d418adcd7"}}, +{"id":"postmessage","key":"postmessage","value":{"rev":"5-854bdb27c2a1af5b629b01f7d69691fe"}}, +{"id":"postpie","key":"postpie","value":{"rev":"10-88527e2731cd07a3b8ddec2608682700"}}, +{"id":"postprocess","key":"postprocess","value":{"rev":"5-513ecd54bf8df0ae73d2a50c717fd939"}}, +{"id":"potato","key":"potato","value":{"rev":"3-0f4cab343859692bf619e79cd9cc5be1"}}, +{"id":"pour","key":"pour","value":{"rev":"7-272bee63c5f19d12102198a23a4af902"}}, +{"id":"pow","key":"pow","value":{"rev":"22-58b557cd71ec0e95eef51dfd900e4736"}}, +{"id":"precious","key":"precious","value":{"rev":"19-b370292b258bcbca02c5d8861ebee0bb"}}, +{"id":"predicate","key":"predicate","value":{"rev":"3-1c6d1871fe71bc61457483793eecf7f9"}}, +{"id":"prefer","key":"prefer","value":{"rev":"11-236b9d16cd019e1d9af41e745bfed754"}}, +{"id":"prenup","key":"prenup","value":{"rev":"3-4c56ddf1ee22cd90c85963209736bc75"}}, +{"id":"pretty-json","key":"pretty-json","value":{"rev":"5-2dbb22fc9573c19e64725ac331a8d59c"}}, +{"id":"prettyfy","key":"prettyfy","value":{"rev":"3-fc7e39aad63a42533d4ac6d6bfa32325"}}, +{"id":"prick","key":"prick","value":{"rev":"10-71a02e1be02df2af0e6a958099be565a"}}, +{"id":"printf","key":"printf","value":{"rev":"5-2896b8bf90df19d4a432153211ca3a7e"}}, +{"id":"pro","key":"pro","value":{"rev":"5-e98adaf2f741e00953bbb942bbeb14d2"}}, +{"id":"probe_couchdb","key":"probe_couchdb","value":{"rev":"28-86f8918a3e64608f8009280fb28a983d"}}, +{"id":"process","key":"process","value":{"rev":"3-6865fc075d8083afd8e2aa266512447c"}}, +{"id":"procfile","key":"procfile","value":{"rev":"3-22dbb2289f5fb3060a8f7833b50116a4"}}, +{"id":"profile","key":"profile","value":{"rev":"29-5afee07fe4c334d9836fda1df51e1f2d"}}, +{"id":"profilejs","key":"profilejs","value":{"rev":"9-128c2b0e09624ee69a915cff20cdf359"}}, +{"id":"profiler","key":"profiler","value":{"rev":"13-4f1582fad93cac11daad5d5a67565e4f"}}, +{"id":"progress","key":"progress","value":{"rev":"7-bba60bc39153fa0fbf5e909b6df213b0"}}, +{"id":"progress-bar","key":"progress-bar","value":{"rev":"5-616721d3856b8e5a374f247404d6ab29"}}, +{"id":"progressify","key":"progressify","value":{"rev":"5-0379cbed5adc2c3f3ac6adf0307ec11d"}}, +{"id":"proj4js","key":"proj4js","value":{"rev":"5-7d209ce230f6a2d5931800acef436a06"}}, +{"id":"projectwatch","key":"projectwatch","value":{"rev":"15-d0eca46ffc3d9e18a51db2d772fa2778"}}, +{"id":"promise","key":"promise","value":{"rev":"3-1409350eb10aa9055ed13a5b59f0abc3"}}, +{"id":"promised-fs","key":"promised-fs","value":{"rev":"28-1d3e0dd1884e1c39a5d5e2d35bb1f911"}}, +{"id":"promised-http","key":"promised-http","value":{"rev":"8-3f8d560c800ddd44a617bf7d7c688392"}}, +{"id":"promised-io","key":"promised-io","value":{"rev":"11-e9a280e85c021cd8b77e524aac50fafb"}}, +{"id":"promised-traits","key":"promised-traits","value":{"rev":"14-62d0ac59d4ac1c6db99c0273020565ea"}}, +{"id":"promised-utils","key":"promised-utils","value":{"rev":"20-0c2488685eb8999c40ee5e7cfa4fd75d"}}, +{"id":"prompt","key":"prompt","value":{"rev":"32-d52a524c147e34c1258facab69660cc2"}}, +{"id":"props","key":"props","value":{"rev":"17-8c4c0bf1b69087510612c8d5ccbfbfeb"}}, +{"id":"proserver","key":"proserver","value":{"rev":"3-4b0a001404171eb0f6f3e5d73a35fcb1"}}, +{"id":"protege","key":"protege","value":{"rev":"150-9790c23d7b7eb5fb94cd5b8048bdbf10"}}, +{"id":"proto","key":"proto","value":{"rev":"6-29fe2869f34e2737b0cc2a0dbba8e397"}}, +{"id":"proto-list","key":"proto-list","value":{"rev":"3-0f64ff29a4a410d5e03a57125374b87b"}}, +{"id":"protobuf-stream","key":"protobuf-stream","value":{"rev":"3-950e621ce7eef306eff5f932a9c4cbae"}}, +{"id":"protodiv","key":"protodiv","value":{"rev":"9-ed8d84033943934eadf5d95dfd4d8eca"}}, +{"id":"proton","key":"proton","value":{"rev":"19-8ad32d57a3e71df786ff41ef8c7281f2"}}, +{"id":"protoparse","key":"protoparse","value":{"rev":"3-9fbcc3b26220f974d4b9c9c883a0260b"}}, +{"id":"prototype","key":"prototype","value":{"rev":"5-2a672703595e65f5d731a967b43655a7"}}, +{"id":"prowl","key":"prowl","value":{"rev":"5-ec480caa5a7db4f1ec2ce22d5eb1dad8"}}, +{"id":"prowler","key":"prowler","value":{"rev":"3-09747704f78c7c123fb1c719c4996924"}}, +{"id":"prox","key":"prox","value":{"rev":"5-0ac5f893b270a819d91f0c6581aca2a8"}}, +{"id":"proxify","key":"proxify","value":{"rev":"3-d24a979b708645328476bd42bd5aaba8"}}, +{"id":"proxino","key":"proxino","value":{"rev":"7-894cc6d453af00e5e39ebc8f0b0abe3a"}}, +{"id":"proxio","key":"proxio","value":{"rev":"55-a1b2744054b3dc3adc2f7f67d2c026a4"}}, +{"id":"proxy","key":"proxy","value":{"rev":"3-c6dd1a8b58e0ed7ac983c89c05ee987d"}}, +{"id":"proxy-by-url","key":"proxy-by-url","value":{"rev":"5-acfcf47f3575cea6594513ff459c5f2c"}}, +{"id":"pseudo","key":"pseudo","value":{"rev":"11-4d894a335036d96cdb9bb19f7b857293"}}, +{"id":"psk","key":"psk","value":{"rev":"17-375055bf6315476a37b5fadcdcb6b149"}}, +{"id":"pty","key":"pty","value":{"rev":"8-0b3ea0287fd23f882da27dabce4e3230"}}, +{"id":"pub-mix","key":"pub-mix","value":{"rev":"3-2c455b249167cbf6b1a6ea761bf119f4"}}, +{"id":"pubjs","key":"pubjs","value":{"rev":"3-a0ceab8bc6ec019dfcf9a8e16756bea0"}}, +{"id":"publicsuffix","key":"publicsuffix","value":{"rev":"8-1592f0714595c0ca0433272c60afc733"}}, +{"id":"publisher","key":"publisher","value":{"rev":"13-f2c8722f14732245d3ca8842fe5b7661"}}, +{"id":"pubnub-client","key":"pubnub-client","value":{"rev":"8-6e511a6dd2b7feb6cefe410facd61f53"}}, +{"id":"pubsub","key":"pubsub","value":{"rev":"11-6c6270bf95af417fb766c05f66b2cc9e"}}, +{"id":"pubsub.io","key":"pubsub.io","value":{"rev":"24-9686fe9ae3356966dffee99f53eaad2c"}}, +{"id":"pubsubd","key":"pubsubd","value":{"rev":"3-b1ff2fa958bd450933735162e9615449"}}, +{"id":"pulley","key":"pulley","value":{"rev":"13-f81ed698175ffd0b5b19357a623b8f15"}}, +{"id":"pulse","key":"pulse","value":{"rev":"9-da4bdabb6d7c189d05c8d6c64713e4ac"}}, +{"id":"pulverizr","key":"pulverizr","value":{"rev":"16-ffd4db4d2b1bfbd0b6ac794dca9e728e"}}, +{"id":"pulverizr-bal","key":"pulverizr-bal","value":{"rev":"5-dba279d07f3ed72990d10f11c5d10792"}}, +{"id":"punycode","key":"punycode","value":{"rev":"3-c0df35bb32d1490a4816161974610682"}}, +{"id":"puppy","key":"puppy","value":{"rev":"3-355fb490dba55efdf8840e2769cb7f41"}}, +{"id":"pure","key":"pure","value":{"rev":"7-b2da0d64ea12cea63bed940222bb36df"}}, +{"id":"purpose","key":"purpose","value":{"rev":"3-ef30ac479535bd603954c27ecb5d564a"}}, +{"id":"push-it","key":"push-it","value":{"rev":"35-2640be8ca8938768836520ce5fc7fff2"}}, +{"id":"pusher","key":"pusher","value":{"rev":"5-eb363d1e0ea2c59fd92a07ea642c5d03"}}, +{"id":"pusher-pipe","key":"pusher-pipe","value":{"rev":"11-11ab87d1288a8c7d11545fdab56616f6"}}, +{"id":"pushinator","key":"pushinator","value":{"rev":"15-6b2c37931bc9438e029a6af0cf97091c"}}, +{"id":"put","key":"put","value":{"rev":"12-4b05a7cdfdb24a980597b38781457cf5"}}, +{"id":"put-selector","key":"put-selector","value":{"rev":"1-1a9b3b8b5a44485b93966503370978aa"}}, +{"id":"putio","key":"putio","value":{"rev":"3-973b65e855e1cd0d3cc685542263cc55"}}, +{"id":"pwilang","key":"pwilang","value":{"rev":"43-49ad04f5abbdd9c5b16ec0271ab17520"}}, +{"id":"py","key":"py","value":{"rev":"3-aade832559d0fab88116aa794e3a9f35"}}, +{"id":"pygments","key":"pygments","value":{"rev":"3-2b2c96f39bdcb9ff38eb7d4bac7c90ba"}}, +{"id":"python","key":"python","value":{"rev":"15-706af811b5544a4aacc6ad1e9863e369"}}, +{"id":"q","key":"q","value":{"rev":"80-fd2397ad465750240d0f22a0abc53de5"}}, +{"id":"q-comm","key":"q-comm","value":{"rev":"17-972994947f097fdcffcfcb2277c966ce"}}, +{"id":"q-fs","key":"q-fs","value":{"rev":"68-958b01dd5bdc4da5ba3c1cd02c85fc0e"}}, +{"id":"q-http","key":"q-http","value":{"rev":"26-42a7db91b650386d920f52afe3e9161f"}}, +{"id":"q-io","key":"q-io","value":{"rev":"20-79f7b3d43bcbd53cc57b6531426738e2"}}, +{"id":"q-io-buffer","key":"q-io-buffer","value":{"rev":"5-05528d9a527da73357991bec449a1b76"}}, +{"id":"q-require","key":"q-require","value":{"rev":"12-e3fc0388e4d3e6d8a15274c3cc239712"}}, +{"id":"q-util","key":"q-util","value":{"rev":"10-94e0c392e70fec942aee0f024e5c090f"}}, +{"id":"qbox","key":"qbox","value":{"rev":"17-88f9148881ede94ae9dcbf4e1980aa69"}}, +{"id":"qfi","key":"qfi","value":{"rev":"3-a6052f02aec10f17085b09e4f9da1ce0"}}, +{"id":"qjscl","key":"qjscl","value":{"rev":"11-def1631b117a53cab5fd38ffec28d727"}}, +{"id":"qooxdoo","key":"qooxdoo","value":{"rev":"5-720d33ec2de3623d6535b3bdc8041d81"}}, +{"id":"qoper8","key":"qoper8","value":{"rev":"11-48fa2ec116bec46d64161e35b0f0cd86"}}, +{"id":"qq","key":"qq","value":{"rev":"23-6f7a5f158364bbf2e90a0c6eb1fbf8a9"}}, +{"id":"qqwry","key":"qqwry","value":{"rev":"10-bf0d6cc2420bdad92a1104c184e7e045"}}, +{"id":"qr","key":"qr","value":{"rev":"11-0a0120b7ec22bbcf76ff1d78fd4a7689"}}, +{"id":"qrcode","key":"qrcode","value":{"rev":"11-b578b6a76bffe996a0390e3d886b79bb"}}, +{"id":"qs","key":"qs","value":{"rev":"23-3da45c8c8a5eb33d45360d92b6072d37"}}, +{"id":"quack-array","key":"quack-array","value":{"rev":"5-6b676aa6273e4515ab5e7bfee1c331e0"}}, +{"id":"quadprog","key":"quadprog","value":{"rev":"7-c0ceeeb12735f334e8c7940ac1f0a896"}}, +{"id":"quadraticon","key":"quadraticon","value":{"rev":"66-1da88ea871e6f90967b9f65c0204309d"}}, +{"id":"quasi","key":"quasi","value":{"rev":"3-6fe0faa91d849938d8c92f91b0828395"}}, +{"id":"query","key":"query","value":{"rev":"13-635ff8d88c6a3f9d92f9ef465b14fb82"}}, +{"id":"query-engine","key":"query-engine","value":{"rev":"21-66feaee07df9fa1f625ac797e8f6b90b"}}, +{"id":"querystring","key":"querystring","value":{"rev":"5-2b509239fafba56319137bfbe1e9eeb7"}}, +{"id":"queue","key":"queue","value":{"rev":"3-5c4af574e5056f7e6ceb9bfefc1c632d"}}, +{"id":"queuelib","key":"queuelib","value":{"rev":"61-87c2abc94a5ad40af8193fac9a1d9f7e"}}, +{"id":"quickcheck","key":"quickcheck","value":{"rev":"7-64e6c1e9efc08a89abe3d01c414d1411"}}, +{"id":"quickserve","key":"quickserve","value":{"rev":"3-9c19f8ad7daf06182f42b8c7063b531f"}}, +{"id":"quip","key":"quip","value":{"rev":"8-0624055f5056f72bc719340c95e5111a"}}, +{"id":"qunit","key":"qunit","value":{"rev":"37-6e7fefdaffab8fc5fb92a391da227c38"}}, +{"id":"qunit-tap","key":"qunit-tap","value":{"rev":"22-0266cd1b5bb7cbab89fa52642f0e8277"}}, +{"id":"qwery","key":"qwery","value":{"rev":"66-29f9b44da544a3a9b4537a85ceace7c8"}}, +{"id":"qwery-mobile","key":"qwery-mobile","value":{"rev":"5-182264ca68c30519bf0d29cf1e15854b"}}, +{"id":"raZerdummy","key":"raZerdummy","value":{"rev":"7-1fa549e0cff60795b49cbd3732f32175"}}, +{"id":"rabbit.js","key":"rabbit.js","value":{"rev":"3-dbcd5cd590576673c65b34c44ff06bec"}}, +{"id":"rabblescay","key":"rabblescay","value":{"rev":"5-3fea196ffd581a842a24ab7bb2118fe2"}}, +{"id":"racer","key":"racer","value":{"rev":"51-41c65689a335d70fa6b55b9706b9c0fe"}}, +{"id":"radcouchdb","key":"radcouchdb","value":{"rev":"3-64ccb4d0acb2b11cbb1d3fcef5f9a68e"}}, +{"id":"radio-stream","key":"radio-stream","value":{"rev":"6-c5f80a0bef7bbaacdd22d92da3d09244"}}, +{"id":"railway","key":"railway","value":{"rev":"74-5ce92a45c7d11540b0e2b5a8455361ce"}}, +{"id":"railway-mailer","key":"railway-mailer","value":{"rev":"3-8df2fbe4af4d3b1f12557d8397bf0548"}}, +{"id":"railway-twitter","key":"railway-twitter","value":{"rev":"3-df984f182bb323052e36876e8e3a066c"}}, +{"id":"rand","key":"rand","value":{"rev":"11-abb69107c390e2a6dcec64cb72f36096"}}, +{"id":"random","key":"random","value":{"rev":"7-32550b221f3549b67f379c1c2dbc5c57"}}, +{"id":"random-data","key":"random-data","value":{"rev":"5-ae651ea36724105b8677ae489082ab4d"}}, +{"id":"range","key":"range","value":{"rev":"3-1d3925f30ffa6b5f3494d507fcef3aa1"}}, +{"id":"ranger","key":"ranger","value":{"rev":"17-6135a9a9d83cbd3945f1ce991f276cb8"}}, +{"id":"rap-battle","key":"rap-battle","value":{"rev":"3-6960516c0d27906bb9343805a5eb0e45"}}, +{"id":"raphael","key":"raphael","value":{"rev":"7-012f159593a82e4587ea024a5d4fbe41"}}, +{"id":"raphael-zoom","key":"raphael-zoom","value":{"rev":"3-aaab74bebbeb4241cade4f4d3c9b130e"}}, +{"id":"rapid","key":"rapid","value":{"rev":"8-ae0b05388c7904fc88c743e3dcde1d9d"}}, +{"id":"rasputin","key":"rasputin","value":{"rev":"3-87cdd9bd591606f4b8439e7a76681c7b"}}, +{"id":"rate-limiter","key":"rate-limiter","value":{"rev":"3-24cd20fef83ce02f17dd383b72f5f125"}}, +{"id":"rats","key":"rats","value":{"rev":"3-1ff1efb311451a17789da910eaf59fb6"}}, +{"id":"raydash","key":"raydash","value":{"rev":"7-96c345beb3564d2789d209d1fe695857"}}, +{"id":"rbytes","key":"rbytes","value":{"rev":"13-cf09d91347a646f590070e516f0c9bc9"}}, +{"id":"rdf","key":"rdf","value":{"rev":"3-9a5012d1fc10da762dbe285d0b317499"}}, +{"id":"rdf-raptor-parser","key":"rdf-raptor-parser","value":{"rev":"11-25c61e4d57cf67ee8a5afb6dfcf193e3"}}, +{"id":"rdfstore","key":"rdfstore","value":{"rev":"41-4499a73efc48ad07234e56fd4e27e4e0"}}, +{"id":"rdio","key":"rdio","value":{"rev":"5-fa20a8ab818a6150e38e9bb7744968f9"}}, +{"id":"rdx","key":"rdx","value":{"rev":"3-e1db5ee3aad06edd9eadcdaa8aaba149"}}, +{"id":"rea","key":"rea","value":{"rev":"3-f17ceeb35337bc9ccf9cb440d5c4dfaf"}}, +{"id":"read-files","key":"read-files","value":{"rev":"3-e08fac4abcdbc7312beb0362ff4427b4"}}, +{"id":"readability","key":"readability","value":{"rev":"3-475601a3d99d696763872c52bce6a155"}}, +{"id":"readabilitySAX","key":"readabilitySAX","value":{"rev":"19-83277777f3f721be26aca28c66227b01"}}, +{"id":"ready.js","key":"ready.js","value":{"rev":"39-8e309b8b274722c051c67f90885571e8"}}, +{"id":"readyjslint","key":"readyjslint","value":{"rev":"3-0a3742129bfbe07d47fcfb9ff67d39b2"}}, +{"id":"recaptcha","key":"recaptcha","value":{"rev":"8-8895926476be014fbe08b301294bf37b"}}, +{"id":"recaptcha-async","key":"recaptcha-async","value":{"rev":"9-3033260389f8afdb5351974119b78ca2"}}, +{"id":"recline","key":"recline","value":{"rev":"189-b56ab8c7791201dccf4aea2532189f1d"}}, +{"id":"recon","key":"recon","value":{"rev":"13-79cbddefb00fec6895342d18609cadb1"}}, +{"id":"reconf","key":"reconf","value":{"rev":"5-0596988db2cf9bf5921502a2aab24ade"}}, +{"id":"redback","key":"redback","value":{"rev":"37-03b390f69cacf42a46e393b7cf297d09"}}, +{"id":"rede","key":"rede","value":{"rev":"3-ee74c2fd990c7780dc823e22a9c3bef2"}}, +{"id":"redecard","key":"redecard","value":{"rev":"13-7dec5a50c34132a2f20f0f143d6b5215"}}, +{"id":"redim","key":"redim","value":{"rev":"15-91c9fd560d1ce87d210b461c52a6d258"}}, +{"id":"redis","key":"redis","value":{"rev":"98-ec237259e8ef5c42a76ff260be50f8fd"}}, +{"id":"redis-channels","key":"redis-channels","value":{"rev":"3-8efc40a25fd18c1c9c41bbaeedb0b22f"}}, +{"id":"redis-client","key":"redis-client","value":{"rev":"3-3376054236e651e7dfcf91be8632fd0e"}}, +{"id":"redis-completer","key":"redis-completer","value":{"rev":"11-9e5bf1f8d37df681e7896252809188d3"}}, +{"id":"redis-keyspace","key":"redis-keyspace","value":{"rev":"25-245f2375741eb3e574dfce9f2da2b687"}}, +{"id":"redis-lua","key":"redis-lua","value":{"rev":"7-81f3dd3a4601271818f15278f495717a"}}, +{"id":"redis-namespace","key":"redis-namespace","value":{"rev":"3-ddf52a172db190fe788aad4116b1cb29"}}, +{"id":"redis-node","key":"redis-node","value":{"rev":"24-7a1e9098d8b5a42a99ca71a01b0d7672"}}, +{"id":"redis-queue","key":"redis-queue","value":{"rev":"3-9896587800c4b98ff291b74210c16b6e"}}, +{"id":"redis-session-store","key":"redis-session-store","value":{"rev":"3-2229501ecf817f9ca60ff2c7721ddd73"}}, +{"id":"redis-tag","key":"redis-tag","value":{"rev":"9-6713e8e91a38613cfef09d7b40f4df71"}}, +{"id":"redis-url","key":"redis-url","value":{"rev":"5-f53545a0039b512a2f7afd4ba2e08773"}}, +{"id":"redis-user","key":"redis-user","value":{"rev":"11-a8c0f6d40cbfbb6183a46e121f31ec06"}}, +{"id":"redis2json","key":"redis2json","value":{"rev":"5-dd96f78f8db0bf695346c95c2ead1307"}}, +{"id":"redis_objects","key":"redis_objects","value":{"rev":"3-499fe6dd07e7a3839111b1892b97f54c"}}, +{"id":"redisev","key":"redisev","value":{"rev":"3-8e857dbe2341292c6e170a7bfe3fa81b"}}, +{"id":"redisfs","key":"redisfs","value":{"rev":"69-d9c90256d32348fdca7a4e646ab4d551"}}, +{"id":"redisify","key":"redisify","value":{"rev":"3-03fce3095b4129e71280d278f11121ba"}}, +{"id":"rediskit","key":"rediskit","value":{"rev":"5-6a0324708f45d884a492cbc408137059"}}, +{"id":"redisql","key":"redisql","value":{"rev":"6-b31802eb37910cb74bd3c9f7b477c025"}}, +{"id":"redmark","key":"redmark","value":{"rev":"5-8724ab00513b6bd7ddfdcd3cc2e0a4e8"}}, +{"id":"redmess","key":"redmess","value":{"rev":"13-14f58666444993ce899cd2260cdc9140"}}, +{"id":"redobj","key":"redobj","value":{"rev":"7-7ebbeffc306f4f7ff9b53ee57e1a250e"}}, +{"id":"redpack","key":"redpack","value":{"rev":"73-58b3fb3bcadf7d80fbe97d9e82d4928b"}}, +{"id":"reds","key":"reds","value":{"rev":"9-baebb36b92887d93fd79785a8c1e6355"}}, +{"id":"reed","key":"reed","value":{"rev":"45-5580f319dc3b5bfb66612ed5c7e17337"}}, +{"id":"reflect","key":"reflect","value":{"rev":"18-b590003cd55332160a5e5327e806e851"}}, +{"id":"reflect-builder","key":"reflect-builder","value":{"rev":"3-453d618b263f9452c0b6bbab0a701f49"}}, +{"id":"reflect-next","key":"reflect-next","value":{"rev":"9-4f2b27a38985d81e906e824321af7713"}}, +{"id":"reflect-tree-builder","key":"reflect-tree-builder","value":{"rev":"5-5f801f53e126dc8a72e13b1417904ce6"}}, +{"id":"reflect-unbuilder","key":"reflect-unbuilder","value":{"rev":"5-f36fd4182fd465a743198b5188697db9"}}, +{"id":"reflectjs","key":"reflectjs","value":{"rev":"3-e03bdb411ffcdd901b896a1cf43eea69"}}, +{"id":"reflex","key":"reflex","value":{"rev":"3-e8bb6b6de906265114b22036832ef650"}}, +{"id":"refmate","key":"refmate","value":{"rev":"3-7d44c45a2eb39236ad2071c84dc0fbba"}}, +{"id":"regext","key":"regext","value":{"rev":"4-97ca5c25fd2f3dc4bd1f3aa821d06f0f"}}, +{"id":"reid-yui3","key":"reid-yui3","value":{"rev":"5-cab8f6e22dfa9b9c508a5dd312bf56b0"}}, +{"id":"rel","key":"rel","value":{"rev":"7-f447870ac7a078f742e4295896646241"}}, +{"id":"relative-date","key":"relative-date","value":{"rev":"5-d0fa11f8100da888cbcce6e96d76b2e4"}}, +{"id":"reloadOnUpdate","key":"reloadOnUpdate","value":{"rev":"9-e7d4c215578b779b2f888381d398bd79"}}, +{"id":"reloaded","key":"reloaded","value":{"rev":"3-dba828b9ab73fc7ce8e47f98068bce8c"}}, +{"id":"remap","key":"remap","value":{"rev":"5-825ac1783df84aba3255c1d39f32ac00"}}, +{"id":"remedial","key":"remedial","value":{"rev":"17-9bb17db015e96db3c833f84d9dbd972a"}}, +{"id":"remote-console","key":"remote-console","value":{"rev":"6-104bae3ba9e4b0a8f772d0b8dc37007e"}}, +{"id":"remote_js","key":"remote_js","value":{"rev":"3-6c0e3058c33113346c037c59206ac0ec"}}, +{"id":"render","key":"render","value":{"rev":"27-fc8be4e9c50e49fb42df83e9446a1f58"}}, +{"id":"renode","key":"renode","value":{"rev":"11-107a3e15a987393157b47125487af296"}}, +{"id":"reparse","key":"reparse","value":{"rev":"10-210ec92e82f5a8515f45d20c7fa2f164"}}, +{"id":"repl","key":"repl","value":{"rev":"3-295279fe20b9ac54b2a235a6bc7013aa"}}, +{"id":"repl-edit","key":"repl-edit","value":{"rev":"18-eb2e604ab8bb65685376459beb417a31"}}, +{"id":"repl-utils","key":"repl-utils","value":{"rev":"7-fc31547ecb53e7e36610cdb68bcec582"}}, +{"id":"replace","key":"replace","value":{"rev":"17-a8976fcdbeb08e27ee2f0fc69ccd7c9d"}}, +{"id":"replica","key":"replica","value":{"rev":"3-f9dae960f91e8dc594f43b004f516d5f"}}, +{"id":"replicate","key":"replicate","value":{"rev":"3-3d6e52af6ff36c02139f619c7e5599c6"}}, +{"id":"replique","key":"replique","value":{"rev":"5-72d990b7d9ce9ff107d96be17490226a"}}, +{"id":"req2","key":"req2","value":{"rev":"3-712151f335b25b5bdef428982d77d0e0"}}, +{"id":"reqhooks","key":"reqhooks","value":{"rev":"17-2f0f0b73545bb1936f449a1ec4a28011"}}, +{"id":"request","key":"request","value":{"rev":"55-0d0b00eecde877ca5cd4ad9e0badc4d1"}}, +{"id":"require","key":"require","value":{"rev":"15-59e9fa05a9de52ee2a818c045736452b"}}, +{"id":"require-analyzer","key":"require-analyzer","value":{"rev":"72-f759f0cdc352df317df29791bfe451f1"}}, +{"id":"require-kiss","key":"require-kiss","value":{"rev":"5-f7ef9d7beda584e9c95635a281a01587"}}, +{"id":"require-like","key":"require-like","value":{"rev":"7-29d5de79e7ff14bb02da954bd9a2ee33"}}, +{"id":"requireincontext","key":"requireincontext","value":{"rev":"5-988ff7c27a21e527ceeb50cbedc8d1b0"}}, +{"id":"requirejs","key":"requirejs","value":{"rev":"3-e609bc91d12d698a17aa51bb50a50509"}}, +{"id":"requirejson","key":"requirejson","value":{"rev":"3-2b8173e58d08034a53a3226c464b1dc8"}}, +{"id":"reqwest","key":"reqwest","value":{"rev":"57-5aa2c1ed17b1e3630859bcad85559e6a"}}, +{"id":"resig-class","key":"resig-class","value":{"rev":"3-16b1a2cdb3224f2043708436dbac4395"}}, +{"id":"resistance","key":"resistance","value":{"rev":"9-9cacbf5fa8318419b4751034a511b8c1"}}, +{"id":"resmin","key":"resmin","value":{"rev":"17-a9c8ded5073118748d765784ca4ea069"}}, +{"id":"resolve","key":"resolve","value":{"rev":"11-bba3470bc93a617ccf9fb6c12097c793"}}, +{"id":"resource-router","key":"resource-router","value":{"rev":"13-7b2991958da4d7701c51537192ca756c"}}, +{"id":"resourcer","key":"resourcer","value":{"rev":"3-4e8b5493d6fcdf147f53d3aaa731a509"}}, +{"id":"response","key":"response","value":{"rev":"3-c5cadf4e5dd90dc1022b92a67853b0f8"}}, +{"id":"resque","key":"resque","value":{"rev":"12-e2f5e1bc3e53ac0a992d1a7da7da0d14"}}, +{"id":"rest-in-node","key":"rest-in-node","value":{"rev":"3-41d1ba925857302211bd0bf9d19975f9"}}, +{"id":"rest-mongo","key":"rest-mongo","value":{"rev":"3-583d2a4b672d6d7e7ad26d0b6df20b45"}}, +{"id":"rest.node","key":"rest.node","value":{"rev":"3-2ed59ba9dcc97123632dfdfaea2559ed"}}, +{"id":"restalytics","key":"restalytics","value":{"rev":"11-5fb3cd8e95b37f1725922fa6fbb146e0"}}, +{"id":"restarter","key":"restarter","value":{"rev":"52-ab0a4fe59128b8848ffd88f9756d0049"}}, +{"id":"restartr","key":"restartr","value":{"rev":"12-d3b86e43e7df7697293db65bb1a1ae65"}}, +{"id":"restify","key":"restify","value":{"rev":"132-054bdc85bebc6221a07dda186238b4c3"}}, +{"id":"restler","key":"restler","value":{"rev":"13-f5392d9dd22e34ce3bcc307c51c889b3"}}, +{"id":"restler-aaronblohowiak","key":"restler-aaronblohowiak","value":{"rev":"8-28b231eceb667153e10effcb1ebeb989"}}, +{"id":"restmvc.js","key":"restmvc.js","value":{"rev":"25-d57b550754437580c447adf612c87d9a"}}, +{"id":"resware","key":"resware","value":{"rev":"9-a5ecbc53fefb280c5d1e3efd822704ff"}}, +{"id":"retrie","key":"retrie","value":{"rev":"7-28ea803ad6b119928ac792cbc8f475c9"}}, +{"id":"retro","key":"retro","value":{"rev":"3-94c3aec940e28869554cbb8449d9369e"}}, +{"id":"retry","key":"retry","value":{"rev":"19-89f3ef664c6fa48ff33a0b9f7e798f15"}}, +{"id":"reut","key":"reut","value":{"rev":"23-d745dd7f8606275848a299ad7c38ceb7"}}, +{"id":"rewrite","key":"rewrite","value":{"rev":"3-5cb91fd831d0913e89354f53b875137d"}}, +{"id":"rex","key":"rex","value":{"rev":"39-59025e6947e5f197f124d24a5393865f"}}, +{"id":"rfb","key":"rfb","value":{"rev":"34-db6e684ac9366a0e3658a508a2187ae1"}}, +{"id":"rhyme","key":"rhyme","value":{"rev":"7-27347762f3f5bfa07307da4e476c2d52"}}, +{"id":"riak-js","key":"riak-js","value":{"rev":"55-11d4ee4beb566946f3968abdf1c4b0ef"}}, +{"id":"riakqp","key":"riakqp","value":{"rev":"7-83f562e6907431fcee56a9408ac6d2c1"}}, +{"id":"rightjs","key":"rightjs","value":{"rev":"9-d53ae4c4f5af3bbbe18d7c879e5bdd1b"}}, +{"id":"rimraf","key":"rimraf","value":{"rev":"17-3ddc3f3f36618712e5f4f27511836e7a"}}, +{"id":"rio","key":"rio","value":{"rev":"11-7c6249c241392b51b9142ca1b228dd4e"}}, +{"id":"ristretto","key":"ristretto","value":{"rev":"3-beb22d7a575e066781f1fd702c4572d7"}}, +{"id":"roast","key":"roast","value":{"rev":"32-17cb066823afab1656196a2fe81246cb"}}, +{"id":"robb","key":"robb","value":{"rev":"5-472ed7ba7928131d86a05fcae89b9f93"}}, +{"id":"robots","key":"robots","value":{"rev":"9-afac82b944045c82acb710cc98c7311d"}}, +{"id":"robotskirt","key":"robotskirt","value":{"rev":"63-29a66420951812d421bf6728f67e710c"}}, +{"id":"robotstxt","key":"robotstxt","value":{"rev":"25-1e01cac90f4570d35ab20232feaeebfa"}}, +{"id":"rocket","key":"rocket","value":{"rev":"27-b0f1ff02e70b237bcf6a5b46aa9b74df"}}, +{"id":"roil","key":"roil","value":{"rev":"48-6b00c09b576fe195546bd031763c0d79"}}, +{"id":"roll","key":"roll","value":{"rev":"5-d3fed9271132eb6c954b3ac6c7ffccf0"}}, +{"id":"rollin","key":"rollin","value":{"rev":"3-bd461bc810c12cfcea94109ba9a2ab39"}}, +{"id":"ron","key":"ron","value":{"rev":"5-913645180d29f377506bcd5292d3cb49"}}, +{"id":"rondo","key":"rondo","value":{"rev":"3-9bed539bbaa0cb978f5c1b711d70cd50"}}, +{"id":"ronn","key":"ronn","value":{"rev":"12-b1b1a1d47376fd11053e2b81fe772c4c"}}, +{"id":"rot13","key":"rot13","value":{"rev":"10-a41e8b581812f02ca1a593f6da0c52dc"}}, +{"id":"router","key":"router","value":{"rev":"26-a7883048759715134710d68f179da18b"}}, +{"id":"routes","key":"routes","value":{"rev":"3-d841826cfd365d8f383a9c4f4288933c"}}, +{"id":"rpc","key":"rpc","value":{"rev":"5-5896f380115a7a606cd7cbbc6d113f05"}}, +{"id":"rpc-socket","key":"rpc-socket","value":{"rev":"17-8743dc1a1f5ba391fc5c7d432cc6eeba"}}, +{"id":"rq","key":"rq","value":{"rev":"7-ba263671c3a3b52851dc7d5e6bd4ef8c"}}, +{"id":"rql","key":"rql","value":{"rev":"1-ac5ec10ed5e41a10a289f26aff4def5a"}}, +{"id":"rqueue","key":"rqueue","value":{"rev":"12-042898704386874c70d0ffaeea6ebc78"}}, +{"id":"rrd","key":"rrd","value":{"rev":"9-488adf135cf29cd4725865a8f25a57ba"}}, +{"id":"rsa","key":"rsa","value":{"rev":"8-7d6f981d72322028c3bebb7141252e98"}}, +{"id":"rss","key":"rss","value":{"rev":"3-0a97b20a0a9051876d779af7663880bd"}}, +{"id":"rssee","key":"rssee","value":{"rev":"9-da2599eae68e50c1695fd7f8fcba2b30"}}, +{"id":"rumba","key":"rumba","value":{"rev":"3-7a3827fa6eca2d02d3189cbad38dd6ca"}}, +{"id":"run","key":"run","value":{"rev":"9-0145abb61e6107a3507624928db461da"}}, +{"id":"runforcover","key":"runforcover","value":{"rev":"3-a36b00ea747c98c7cd7afebf1e1b203c"}}, +{"id":"runlol","key":"runlol","value":{"rev":"3-3c97684baaa3d5b31ca404e8a616fe41"}}, +{"id":"runner","key":"runner","value":{"rev":"11-b7ceeedf7b0dde19c809642f1537723a"}}, +{"id":"runways","key":"runways","value":{"rev":"5-f216f5fa6af7ccc7566cdd06cf424980"}}, +{"id":"rw-translate","key":"rw-translate","value":{"rev":"3-16d2beb17a27713e10459ce368c5d087"}}, +{"id":"rx","key":"rx","value":{"rev":"5-ea2a04ecf38963f8a99b7a408b45af31"}}, +{"id":"rzr","key":"rzr","value":{"rev":"4-6a137fa752709531f2715de5a213b326"}}, +{"id":"s-tpl","key":"s-tpl","value":{"rev":"3-1533cf9657cfe669a25da96b6a655f5c"}}, +{"id":"s3-post","key":"s3-post","value":{"rev":"9-ad3b268bc6754852086b50c2f465c02c"}}, +{"id":"safis","key":"safis","value":{"rev":"3-f1494d0dae2b7dfd60beba5a72412ad2"}}, +{"id":"saiga","key":"saiga","value":{"rev":"22-0c67e8cf8f4b6e8ea30552ffc57d222a"}}, +{"id":"sailthru-client","key":"sailthru-client","value":{"rev":"7-1c9c236050868fb8dec4a34ded2436d3"}}, +{"id":"saimonmoore-cradle","key":"saimonmoore-cradle","value":{"rev":"3-5059616ab0f0f10e1c2d164f686e127e"}}, +{"id":"salesforce","key":"salesforce","value":{"rev":"7-f88cbf517b1fb900358c97b2c049960f"}}, +{"id":"sam","key":"sam","value":{"rev":"7-d7e24d2e94411a17cbedfbd8083fd878"}}, +{"id":"sandbox","key":"sandbox","value":{"rev":"10-0b51bed24e0842f99744dcf5d79346a6"}}, +{"id":"sandboxed-module","key":"sandboxed-module","value":{"rev":"15-bf8fa69d15ae8416d534e3025a16d87d"}}, +{"id":"sanitizer","key":"sanitizer","value":{"rev":"32-6ea8f4c77cd17253c27d0d87e0790678"}}, +{"id":"sapnwrfc","key":"sapnwrfc","value":{"rev":"3-0bc717109ffcd5265ae24f00416a0281"}}, +{"id":"sardines","key":"sardines","value":{"rev":"7-82712731b5af112ca43b9e3fe9975bb0"}}, +{"id":"sargam","key":"sargam","value":{"rev":"3-6b4c70f4b2bcd2add43704bf40c44507"}}, +{"id":"sasl","key":"sasl","value":{"rev":"4-44a6e12b561b112a574ec9e0c4a8843f"}}, +{"id":"sass","key":"sass","value":{"rev":"14-46bcee5423a1efe22f039e116bb7a77c"}}, +{"id":"satisfic","key":"satisfic","value":{"rev":"3-c6e9a2e65a0e55868cea708bcf7b11cf"}}, +{"id":"sax","key":"sax","value":{"rev":"30-58c5dd2c3367522974406bbf29204a40"}}, +{"id":"say","key":"say","value":{"rev":"10-95f31672af6166ea9099d92706c49ed1"}}, +{"id":"sayndo","key":"sayndo","value":{"rev":"51-fd93715c5ff0fcaa68e4e13c2b51ba61"}}, +{"id":"sc-handlebars","key":"sc-handlebars","value":{"rev":"3-b424c3a66fd0e538b068c6046f404084"}}, +{"id":"scgi-server","key":"scgi-server","value":{"rev":"9-3364b5c39985ea8f3468b6abb53d5ea6"}}, +{"id":"scheduler","key":"scheduler","value":{"rev":"25-72bc526bb49b0dd42ad5917d38ea3b18"}}, +{"id":"schema","key":"schema","value":{"rev":"21-166410ae972449965dfa1ce615971168"}}, +{"id":"schema-builder","key":"schema-builder","value":{"rev":"3-bce4612e1e5e6a8a85f16326d3810145"}}, +{"id":"schema-org","key":"schema-org","value":{"rev":"15-59b3b654de0380669d0dcd7573c3b7a1"}}, +{"id":"scone","key":"scone","value":{"rev":"15-85ed2dd4894e896ca1c942322753b76b"}}, +{"id":"scooj","key":"scooj","value":{"rev":"3-1be2074aeba4df60594c03f3e59c7734"}}, +{"id":"scope","key":"scope","value":{"rev":"65-9d7eb8c5fc6c54d8e2c49f4b4b4f5166"}}, +{"id":"scope-provider","key":"scope-provider","value":{"rev":"22-2c25a0b260fd18236d5245c8250d990e"}}, +{"id":"scoped-http-client","key":"scoped-http-client","value":{"rev":"3-afa954fe6d1c8b64a1240b77292d99b5"}}, +{"id":"scottbot","key":"scottbot","value":{"rev":"3-d812ddb4af49976c391f14aeecf93180"}}, +{"id":"scraper","key":"scraper","value":{"rev":"19-e2166b3de2b33d7e6baa04c704887fa6"}}, +{"id":"scrapinode","key":"scrapinode","value":{"rev":"15-ae5bf5085d8c4d5390f7c313b0ad13d2"}}, +{"id":"scrappy-do","key":"scrappy-do","value":{"rev":"3-868f5d299da401112e3ed9976194f1ee"}}, +{"id":"scrapr","key":"scrapr","value":{"rev":"3-d700714a56e8f8b8e9b3bc94274f4a24"}}, +{"id":"scrawl","key":"scrawl","value":{"rev":"3-a70a2905b9a1d2f28eb379c14363955f"}}, +{"id":"scribe","key":"scribe","value":{"rev":"5-4cefaaf869ba8e6ae0257e5705532fbe"}}, +{"id":"scriptTools","key":"scriptTools","value":{"rev":"7-1b66b7f02f2f659ae224057afac60bcf"}}, +{"id":"scriptbroadcast","key":"scriptbroadcast","value":{"rev":"10-3cdc4dae471445b7e08e6fc37c2481e6"}}, +{"id":"scriptjs","key":"scriptjs","value":{"rev":"38-9a522df4f0707d47c904f6781fd97ff6"}}, +{"id":"scrowser","key":"scrowser","value":{"rev":"3-a76938b1f84db0793941dba1f84f4c2f"}}, +{"id":"scss","key":"scss","value":{"rev":"10-49a4ad40eca3c797add57986c74e100b"}}, +{"id":"scylla","key":"scylla","value":{"rev":"10-2c5a1efed63c0ac3a3e75861ee323af4"}}, +{"id":"sdl","key":"sdl","value":{"rev":"40-3df0824da620098c0253b5330c6b0c5c"}}, +{"id":"sdlmixer","key":"sdlmixer","value":{"rev":"4-91455739802a98a5549f6c2b8118758d"}}, +{"id":"search","key":"search","value":{"rev":"9-8f696da412a6ccd07c3b8f22cec315cb"}}, +{"id":"searchjs","key":"searchjs","value":{"rev":"3-59418ce307d41de5649dfc158be51adf"}}, +{"id":"searchparser","key":"searchparser","value":{"rev":"3-a84719692ee33c88f3419f033b839f7a"}}, +{"id":"sechash","key":"sechash","value":{"rev":"11-20db8651628dcf6e8cbbc9bf9b2c4f12"}}, +{"id":"secret","key":"secret","value":{"rev":"7-ac44b38fa32b3f5ebc8fd03b02ec69ec"}}, +{"id":"seedrandom","key":"seedrandom","value":{"rev":"3-becb92de803208672887fc22a1a33694"}}, +{"id":"seek","key":"seek","value":{"rev":"3-d778b8d56582e15d409e2346b86caa53"}}, +{"id":"sel","key":"sel","value":{"rev":"19-94c8bc0872d2da7eab2b35daff7a3b5d"}}, +{"id":"select","key":"select","value":{"rev":"5-43593bfec39caaf1a0bc1fedc96d0dce"}}, +{"id":"selenium","key":"selenium","value":{"rev":"3-8ae8ac7a491b813fd011671e0d494f20"}}, +{"id":"selfish","key":"selfish","value":{"rev":"17-827856c3f3b9a3fdd1758477a24bf706"}}, +{"id":"selleck","key":"selleck","value":{"rev":"13-b8325fcdb383397041e4a408b40d708c"}}, +{"id":"semver","key":"semver","value":{"rev":"25-b2aea0cc920a9981cd429442a3fd62f6"}}, +{"id":"sendgrid","key":"sendgrid","value":{"rev":"3-047e2ad730390bac7cf72b7fc3856c1c"}}, +{"id":"sendgrid-api","key":"sendgrid-api","value":{"rev":"5-6e951b0d60a1b7c778fbf548d4e3aed8"}}, +{"id":"sendgrid-web","key":"sendgrid-web","value":{"rev":"3-dc77d2dbcedfcbe4e497958a2a070cfd"}}, +{"id":"sentry","key":"sentry","value":{"rev":"7-57af332354cbd37ce1c743b424b27dd0"}}, +{"id":"seq","key":"seq","value":{"rev":"77-33a8f54017402835c8542945a5c0a443"}}, +{"id":"sequelize","key":"sequelize","value":{"rev":"63-4c28ad13b73549aad7edc57378b21854"}}, +{"id":"sequence","key":"sequence","value":{"rev":"3-914f8010dc12aec0749ddb719f5ac82d"}}, +{"id":"sequencer","key":"sequencer","value":{"rev":"7-d83e687509678c0f5bcf15e5297677c0"}}, +{"id":"sequent","key":"sequent","value":{"rev":"3-cc6f26ab708c7681fa7d9e3bc15d19c0"}}, +{"id":"serializer","key":"serializer","value":{"rev":"7-a0d13120e2d5cfaa6e453b085280fa08"}}, +{"id":"serialport","key":"serialport","value":{"rev":"32-dc365d057a4f46e9f140dc36d6cc825a"}}, +{"id":"serialportify","key":"serialportify","value":{"rev":"3-1bf4ad9c5ebb5d96ca91fc03a10b5443"}}, +{"id":"serialq","key":"serialq","value":{"rev":"3-5897fcd0fca7d8312e61dbcb93790a71"}}, +{"id":"series","key":"series","value":{"rev":"11-0374191f646c277c51602ebe73033b6a"}}, +{"id":"serve","key":"serve","value":{"rev":"11-560c0c1bdeb3348c7a7d18265d27988e"}}, +{"id":"servedir","key":"servedir","value":{"rev":"18-17cffd8d8326b26e7d9319c79d601dda"}}, +{"id":"server-backbone-redis","key":"server-backbone-redis","value":{"rev":"13-c56419457002aa4fa23b142634882594"}}, +{"id":"server-tracker","key":"server-tracker","value":{"rev":"21-f620e295079a8b0acd29fa1a1469100c"}}, +{"id":"service","key":"service","value":{"rev":"11-07533f9e5e854248c0a1d99e911fa419"}}, +{"id":"sesame","key":"sesame","value":{"rev":"19-1e7ad5d030566f4c67027cc5925a2bdb"}}, +{"id":"sesh","key":"sesh","value":{"rev":"4-1682b3ced38e95f2a11a2f545a820bd5"}}, +{"id":"session","key":"session","value":{"rev":"6-a798bf4cd7d127d0111da7cdc3e058a4"}}, +{"id":"session-mongoose","key":"session-mongoose","value":{"rev":"3-b089c8d365d7de3e659cfa7080697dba"}}, +{"id":"sessionvoc-client","key":"sessionvoc-client","value":{"rev":"23-0f9ed8cd4af55f2aae17cb841247b818"}}, +{"id":"set","key":"set","value":{"rev":"3-a285b30a9c1545b427ebd882bc53d8b2"}}, +{"id":"setInterval","key":"setInterval","value":{"rev":"3-0557f666d05223391466547f52cfff42"}}, +{"id":"setTimeout","key":"setTimeout","value":{"rev":"3-e3c059c93763967ddff5974471f227f8"}}, +{"id":"setochka","key":"setochka","value":{"rev":"3-d559e24618b4fc2d5fc4ef44bccb68be"}}, +{"id":"settings","key":"settings","value":{"rev":"5-4af85bb564a330886c79682d2f1d927c"}}, +{"id":"sexy","key":"sexy","value":{"rev":"7-e57fa6bca5d89be86467786fb9f9b997"}}, +{"id":"sexy-args","key":"sexy-args","value":{"rev":"3-715d7d57234220bd79c78772d2566355"}}, +{"id":"sfaClient","key":"sfaClient","value":{"rev":"3-5d9ddd6ea05d7ef366dbf4f66dd4f642"}}, +{"id":"sfml","key":"sfml","value":{"rev":"10-766c876cd1cc220f776e2fa3c1d9efbb"}}, +{"id":"sh","key":"sh","value":{"rev":"5-3ce779be28550e831cf3c0140477376c"}}, +{"id":"sha1","key":"sha1","value":{"rev":"3-66d4b67ace9c65ae8f03d6dd0647ff6b"}}, +{"id":"sha1_file","key":"sha1_file","value":{"rev":"7-eb25e9c5f470a1b80c1697a952a1c5ed"}}, +{"id":"shadows","key":"shadows","value":{"rev":"5-d6a1a21871c733f34495592307ab7961"}}, +{"id":"share","key":"share","value":{"rev":"15-ef81a004f0e115040dcc1510f6302fa9"}}, +{"id":"shared-views","key":"shared-views","value":{"rev":"11-2c83145e6deb3493e44805c92b58929e"}}, +{"id":"sharedjs","key":"sharedjs","value":{"rev":"9-d43a861b02aa88ae22810f9771d774ec"}}, +{"id":"shell","key":"shell","value":{"rev":"39-7e2042bd6f485b827d53f5f727164d6f"}}, +{"id":"shelld","key":"shelld","value":{"rev":"3-118a62ff31d85e61b78bbd97333a7330"}}, +{"id":"shimify","key":"shimify","value":{"rev":"3-dde4d45bcbd2f6f7faaeb7f8c31d5e8b"}}, +{"id":"ship","key":"ship","value":{"rev":"3-5f294fc3841c901d6cea7f3862625d95"}}, +{"id":"shmakowiki","key":"shmakowiki","value":{"rev":"15-079ae4595d1ddf019d22d3d0ac49a188"}}, +{"id":"shorten","key":"shorten","value":{"rev":"3-ed1395b35faf4639e25dacbb038cf237"}}, +{"id":"shorttag","key":"shorttag","value":{"rev":"5-21d15e4cb8b62aeefe23edc99ff768ec"}}, +{"id":"shorturl","key":"shorturl","value":{"rev":"5-58f78b2a5318ec7da8a5f88739f2796b"}}, +{"id":"shorty","key":"shorty","value":{"rev":"9-17f804ff6e94295549cca6fd534b89de"}}, +{"id":"shotenjin","key":"shotenjin","value":{"rev":"3-91a7864d216a931095e9999133d3c41f"}}, +{"id":"should","key":"should","value":{"rev":"19-ed561071d434f319080fa5d0f647dd93"}}, +{"id":"shovel","key":"shovel","value":{"rev":"5-0168a02a8fa8d7856a5f4a5c18706724"}}, +{"id":"showdown","key":"showdown","value":{"rev":"3-7be5479804451db3faed968fa428af56"}}, +{"id":"shredder","key":"shredder","value":{"rev":"3-93e12ab8822ba5fe86d662f124a8ad1a"}}, +{"id":"shrtn","key":"shrtn","value":{"rev":"19-5883692283903e3166b478b98bcad999"}}, +{"id":"shuffle","key":"shuffle","value":{"rev":"3-71c96da1843abb468649ab0806e6b9d3"}}, +{"id":"sibilant","key":"sibilant","value":{"rev":"18-4dcb400eb9ed9cb1c7826d155807f6d0"}}, +{"id":"sideline","key":"sideline","value":{"rev":"15-84f284a9277718bf90f68dc9351500ae"}}, +{"id":"siesta","key":"siesta","value":{"rev":"5-ff99a009e6e5897c6322237c51d0a142"}}, +{"id":"sign","key":"sign","value":{"rev":"3-2cf70313707c6a046a6ceca61431ea5e"}}, +{"id":"signals","key":"signals","value":{"rev":"7-c756190260cd3ea43e6d44e4722164cb"}}, +{"id":"signature","key":"signature","value":{"rev":"3-fb7552c27ace0f9321ec7438057a37bf"}}, +{"id":"signed-request","key":"signed-request","value":{"rev":"13-9f1563535dcc1a83338a7375d8240f35"}}, +{"id":"signer","key":"signer","value":{"rev":"5-32c9909da2c4dfb284b858164c03cfe0"}}, +{"id":"simple-class","key":"simple-class","value":{"rev":"3-92c6eea4b3a6169db9d62b12f66268cb"}}, +{"id":"simple-ffmpeg","key":"simple-ffmpeg","value":{"rev":"9-b6dd4fe162803e6db434d71035637993"}}, +{"id":"simple-logger","key":"simple-logger","value":{"rev":"5-52b4c957b3671375547d623c6a9444be"}}, +{"id":"simple-mime","key":"simple-mime","value":{"rev":"9-34e4b1dcc26047b64459d924abab65cc"}}, +{"id":"simple-proxy","key":"simple-proxy","value":{"rev":"9-ad6cd76215717527dc6b226e1219e98e"}}, +{"id":"simple-rest-client","key":"simple-rest-client","value":{"rev":"3-8331b3ae49b52720adf2b72d5da0353d"}}, +{"id":"simple-schedule","key":"simple-schedule","value":{"rev":"7-432d3803e1cf9ab5830923a30fd312e0"}}, +{"id":"simple-server","key":"simple-server","value":{"rev":"25-d4d8ba53d3829f4ca51545a3c23a1244"}}, +{"id":"simple-settings","key":"simple-settings","value":{"rev":"3-497d7c5422f764f3738b3ef303ff9737"}}, +{"id":"simple-static","key":"simple-static","value":{"rev":"3-64c9cf84e5140d4285e451357ac83df5"}}, +{"id":"simple-xml-writer","key":"simple-xml-writer","value":{"rev":"3-d1ca18252c341b4430ab6e1240b5f571"}}, +{"id":"simple-xmpp","key":"simple-xmpp","value":{"rev":"11-b4c10de5e4e12a81c4486206d7fb6b40"}}, +{"id":"simple_pubsub","key":"simple_pubsub","value":{"rev":"9-22ae79856ca25b152f104e5d8bc93f12"}}, +{"id":"simpledb","key":"simpledb","value":{"rev":"13-6bf111aa18bffd86e65fd996525a6113"}}, +{"id":"simplegeo","key":"simplegeo","value":{"rev":"8-eb684eea019ae7e5fa0c087a9747367e"}}, +{"id":"simplegeo-client","key":"simplegeo-client","value":{"rev":"7-b2c976bbf8c145c6b0e1744630548084"}}, +{"id":"simplegeo-thrift","key":"simplegeo-thrift","value":{"rev":"3-bf6ddf40c020889fe28630217f38a442"}}, +{"id":"simplelogger","key":"simplelogger","value":{"rev":"3-36634d2543faecdeccc962422d149ffc"}}, +{"id":"simplesets","key":"simplesets","value":{"rev":"26-48fc18f94744c9b288945844b7cc9196"}}, +{"id":"simplesmtp","key":"simplesmtp","value":{"rev":"6-0952f0c5f43a8e94b11355774bbbe9e8"}}, +{"id":"simplydb","key":"simplydb","value":{"rev":"5-34659bf97bbb40f0ec4a3af14107dc31"}}, +{"id":"sin","key":"sin","value":{"rev":"6-0e8bd66b3e2c8c91efef14a3ddc79c53"}}, +{"id":"sink","key":"sink","value":{"rev":"8-4c49709009dfb5719935dba568a3398e"}}, +{"id":"sink-test","key":"sink-test","value":{"rev":"18-411afcb398102f245e92f2ce91897d3e"}}, +{"id":"sinon","key":"sinon","value":{"rev":"19-fa38010bb1bbed437273e1296660d598"}}, +{"id":"sinon-buster","key":"sinon-buster","value":{"rev":"5-a456f0e21b3edb647ad11179cd02354b"}}, +{"id":"sinon-nodeunit","key":"sinon-nodeunit","value":{"rev":"7-d60aa76cc41a6c9d9db4e8ae268b7b3c"}}, +{"id":"sip","key":"sip","value":{"rev":"17-02be6fb014d41fe66ab22ff2ae60a5b8"}}, +{"id":"sitemap","key":"sitemap","value":{"rev":"13-a6d1c830fdc8942c317c1ebe00efbb6d"}}, +{"id":"sizlate","key":"sizlate","value":{"rev":"3-a86c680c681299045f9aabecb99dc161"}}, +{"id":"sizzle","key":"sizzle","value":{"rev":"5-f00e18a80fb8a4f6bdbf11735e265720"}}, +{"id":"sk","key":"sk","value":{"rev":"33-b0b894d02b0211dae08baadfd84b46c2"}}, +{"id":"skeleton","key":"skeleton","value":{"rev":"5-3559721c222b99cd3f56acaaf706992f"}}, +{"id":"skillet","key":"skillet","value":{"rev":"3-0d6bbe21952f85967a5e12425691ee50"}}, +{"id":"skull.io","key":"skull.io","value":{"rev":"3-082e9d58f24ac59144fc130f6b54927e"}}, +{"id":"slang","key":"slang","value":{"rev":"7-3cd6390e3421f677e4e1b00fdf2d3ee1"}}, +{"id":"sleepless","key":"sleepless","value":{"rev":"5-1482568719534caf17f12daf0130ae0d"}}, +{"id":"sleepylib","key":"sleepylib","value":{"rev":"3-60e851f120e34b0726eb50a38b1e27e2"}}, +{"id":"sleight","key":"sleight","value":{"rev":"3-a0f16b17befee698b172074f84daf44c"}}, +{"id":"slick","key":"slick","value":{"rev":"3-596b7b7cf7b8881c55327e8bcf373700"}}, +{"id":"slickback","key":"slickback","value":{"rev":"9-c036e7393d0f9a463a263f287f3bcefd"}}, +{"id":"slide","key":"slide","value":{"rev":"14-83ade7490da699cf0ed99cec818ce3cd"}}, +{"id":"slippers","key":"slippers","value":{"rev":"5-0d657ed5fca4c0ed8b51c6d7f6eac08a"}}, +{"id":"slug","key":"slug","value":{"rev":"3-046a5bd74cc1edce30faa3b6ab239652"}}, +{"id":"slugr","key":"slugr","value":{"rev":"39-ac346964f547433fe34e637de682f81a"}}, +{"id":"smartdc","key":"smartdc","value":{"rev":"31-8c9db85e4548007a0ef87b7286229952"}}, +{"id":"smoosh","key":"smoosh","value":{"rev":"34-ba1c140a173ff8d1f9cdbe5e5addcc43"}}, +{"id":"smores","key":"smores","value":{"rev":"17-1aef1fa2e1675093c5aaf33436d83f5a"}}, +{"id":"smpp","key":"smpp","value":{"rev":"5-9be31b75aee4db09cfe5a2ceef4bea13"}}, +{"id":"smsified","key":"smsified","value":{"rev":"13-bb97eae0bbb6f4d5c4f2f391cd20e891"}}, +{"id":"smtp","key":"smtp","value":{"rev":"20-c3de67c5d0b3c4493293d9f55adb21ad"}}, +{"id":"smtpc","key":"smtpc","value":{"rev":"11-7c4e1207be6eb06350221af0134e8bd7"}}, +{"id":"smtpclient","key":"smtpclient","value":{"rev":"3-ba61ad5f0fd3fdd382e505abcde8c24e"}}, +{"id":"snake","key":"snake","value":{"rev":"15-384892bf8a5ebf222f6fe0ae321aaaa4"}}, +{"id":"snappy","key":"snappy","value":{"rev":"11-94f2d59347c10cc41b6f4a2dd2b0f15e"}}, +{"id":"sng","key":"sng","value":{"rev":"41-a1d3c6253dec5da8b3134ba3505924f5"}}, +{"id":"snip","key":"snip","value":{"rev":"3-cc51d232fff6a7d7b24588bd98e5613b"}}, +{"id":"snipes","key":"snipes","value":{"rev":"3-12af12ca83e15d056969ec76a3cc2ef0"}}, +{"id":"snippets","key":"snippets","value":{"rev":"13-d19c8a99287ec721d56ef9efdf3ce729"}}, +{"id":"snorkel","key":"snorkel","value":{"rev":"11-bc7ba5d1465c7d1ba71479087292615e"}}, +{"id":"snowball","key":"snowball","value":{"rev":"3-76cfbdb9f379ac635874b76d7ee2fd3b"}}, +{"id":"snpp","key":"snpp","value":{"rev":"8-4f10a9f2bff48e348303d8a143afaa6c"}}, +{"id":"snsclient","key":"snsclient","value":{"rev":"3-302ce1c7132a36ef909ce534a509e27f"}}, +{"id":"soap","key":"soap","value":{"rev":"7-10f361a406dfee3074adac0cea127d87"}}, +{"id":"socket-push","key":"socket-push","value":{"rev":"22-196553953d58d92c288678b1dcd49ba7"}}, +{"id":"socket-twitchat","key":"socket-twitchat","value":{"rev":"11-9b159a4610ea444eaae39baa3bf05280"}}, +{"id":"socket.io","key":"socket.io","value":{"rev":"95-c29c929613dd95aa5aea8a5e14f2573f"}}, +{"id":"socket.io-client","key":"socket.io-client","value":{"rev":"33-a3c79d917bb038f0ca72f9cb27180a66"}}, +{"id":"socket.io-cluster","key":"socket.io-cluster","value":{"rev":"5-83bdaf79d2243eaf3a59b45fc604dc1a"}}, +{"id":"socket.io-connect","key":"socket.io-connect","value":{"rev":"17-62f00efc3bff3a1b549cc5e346da996f"}}, +{"id":"socket.io-context","key":"socket.io-context","value":{"rev":"42-a029996765557776d72690db1f14c1fa"}}, +{"id":"socket.io-ender","key":"socket.io-ender","value":{"rev":"9-c4523af5f5cc815ee69c325c1e29ede4"}}, +{"id":"socket.io-juggernaut","key":"socket.io-juggernaut","value":{"rev":"6-b8b97b2df2c186f24487e027278ec975"}}, +{"id":"socket.io-sessions","key":"socket.io-sessions","value":{"rev":"11-2151ee14eb29543811a9e567bcf6811a"}}, +{"id":"socketstream","key":"socketstream","value":{"rev":"29-b198d27ad6a3c4f9b63bc467e85a54a3"}}, +{"id":"sockjs","key":"sockjs","value":{"rev":"21-a8d6534c55e8b3e33cf06516b59aa408"}}, +{"id":"socksified","key":"socksified","value":{"rev":"3-92350ec9889b8db9c3d34bdbc41b1f7b"}}, +{"id":"soda","key":"soda","value":{"rev":"24-04987191e2c4241fbfaf78263c83d121"}}, +{"id":"soda-runner","key":"soda-runner","value":{"rev":"5-da4e8078a7666404d2a5ab3267a5ef75"}}, +{"id":"sodn","key":"sodn","value":{"rev":"3-3ee6350723c54aad792c769947c6b05e"}}, +{"id":"sofa","key":"sofa","value":{"rev":"7-2f8ffd47ce19e6fb7e1ea2e02076955d"}}, +{"id":"solder","key":"solder","value":{"rev":"10-8f7ad0a60c2716ce65658047c4ae5361"}}, +{"id":"solr","key":"solr","value":{"rev":"11-56a295dff56d9f2a4a7293257ca793a4"}}, +{"id":"solr-client","key":"solr-client","value":{"rev":"7-a296273d32224eb241343cb98ded7b82"}}, +{"id":"sones","key":"sones","value":{"rev":"3-9ddbbdc44f3501917e701d3304eb91a5"}}, +{"id":"song","key":"song","value":{"rev":"7-967aa3a58702b3470996cd8e63b1b18d"}}, +{"id":"sorted","key":"sorted","value":{"rev":"3-47b6ec0f744aa04929d48a7d3d10f581"}}, +{"id":"sosumi","key":"sosumi","value":{"rev":"10-8c3980beb3d7c48d4cccf44a8d1d5ff7"}}, +{"id":"soundcloud","key":"soundcloud","value":{"rev":"7-9ee76aecd3d1946731a1173185796864"}}, +{"id":"soupselect","key":"soupselect","value":{"rev":"12-5fea60f4e52117a8212aa7add6c34278"}}, +{"id":"source","key":"source","value":{"rev":"7-57d6cae0530c7cba4a3932f0df129f20"}}, +{"id":"source-map","key":"source-map","value":{"rev":"6-7da8d2ccc104fa30a93ee165975f28e8"}}, +{"id":"spacesocket","key":"spacesocket","value":{"rev":"6-d1679084b0917f86d6c4e3ac89a89809"}}, +{"id":"spark","key":"spark","value":{"rev":"12-64d44ebde2a4b48aed3bc7814c63e773"}}, +{"id":"spark2","key":"spark2","value":{"rev":"28-918548a309f0d18eebd5c64966376959"}}, +{"id":"sparql","key":"sparql","value":{"rev":"3-8eec87fe9fcb4d07aef214858eada777"}}, +{"id":"sparql-orm","key":"sparql-orm","value":{"rev":"3-b2a7efa5622b0b478fdca3f9050800cc"}}, +{"id":"spatial","key":"spatial","value":{"rev":"3-d09d40af02a9c9e5150500cc66d75f8d"}}, +{"id":"spawn","key":"spawn","value":{"rev":"3-f882c01cf1bb538f5f4be78769e1b097"}}, +{"id":"spdy","key":"spdy","value":{"rev":"13-1fbf077bbb8bc87d5058648c0c66288b"}}, +{"id":"spec","key":"spec","value":{"rev":"15-1074d3a8b8332fcc1059fbb5c4f69a7a"}}, +{"id":"speck","key":"speck","value":{"rev":"21-652b0670953ba79e548f4e5d9ce3d923"}}, +{"id":"spectrum","key":"spectrum","value":{"rev":"28-21fb9eeffe2e63a5383371a44a58a1ad"}}, +{"id":"speller","key":"speller","value":{"rev":"6-91e03f89b09338cf8f38d2e64c1778ce"}}, +{"id":"sphericalmercator","key":"sphericalmercator","value":{"rev":"9-3affc61ae0d64854d77829da5414bbc5"}}, +{"id":"spider","key":"spider","value":{"rev":"3-cd04679891875dfb2bf67613514238eb"}}, +{"id":"spider-tdd","key":"spider-tdd","value":{"rev":"3-d95b6d680d053a063e6fab3fdae16261"}}, +{"id":"spine","key":"spine","value":{"rev":"9-2a5cd4733be1d78376814e78966d885a"}}, +{"id":"spine.app","key":"spine.app","value":{"rev":"43-1044b31d4c53ff5c741a16d49291b321"}}, +{"id":"spine.mobile","key":"spine.mobile","value":{"rev":"19-220f64c212a5f22b27d597e299263490"}}, +{"id":"split_er","key":"split_er","value":{"rev":"3-3419662807bf16f7b5b53998a4759246"}}, +{"id":"spludo","key":"spludo","value":{"rev":"14-d41915fcd1b50553f5b9e706b41d2894"}}, +{"id":"spm","key":"spm","value":{"rev":"9-28d6699288d580807091aafdf78dd479"}}, +{"id":"spore","key":"spore","value":{"rev":"44-1c50fb0e6f7c3447f34b1927c976201f"}}, +{"id":"spork","key":"spork","value":{"rev":"3-e90976749b649b88ab83b59785dba101"}}, +{"id":"spotify","key":"spotify","value":{"rev":"3-90c74506a69e08a41feeb23541ac0b4f"}}, +{"id":"spotify-metadata","key":"spotify-metadata","value":{"rev":"3-a546d3e59e40ec0be5d8524f3a1e7a60"}}, +{"id":"spotlight","key":"spotlight","value":{"rev":"3-bead50ac8f53311d539a420c74ea23e2"}}, +{"id":"spread","key":"spread","value":{"rev":"3-ad7bf6d948043fc6dd47a6fcec7da294"}}, +{"id":"spreadsheet","key":"spreadsheet","value":{"rev":"11-94030e23cc9c8e515c1f340656aea031"}}, +{"id":"spreadsheets","key":"spreadsheets","value":{"rev":"3-6563c479735b1b6599bf9602fa65ff38"}}, +{"id":"sprintf","key":"sprintf","value":{"rev":"10-56c5bc7a19ecf8dd92e24d4dca081059"}}, +{"id":"spruce","key":"spruce","value":{"rev":"7-1ea45ef3c5412dd2a6c1fe7b2a083d68"}}, +{"id":"spy","key":"spy","value":{"rev":"3-f5546fdbbec80ba97756d0d1fefa7923"}}, +{"id":"sql","key":"sql","value":{"rev":"5-6c41452f684418ba521666e977f46e54"}}, +{"id":"sqlite","key":"sqlite","value":{"rev":"9-18761259920b497360f581ff8051dcbb"}}, +{"id":"sqlite3","key":"sqlite3","value":{"rev":"51-f9c99537afd9826819c5f40105e50987"}}, +{"id":"sqlmw","key":"sqlmw","value":{"rev":"17-b05b0b089c0f3b1185f96dc19bf61cf5"}}, +{"id":"squeeze","key":"squeeze","value":{"rev":"6-5e517be339d9aa409cedfcc11d1883b1"}}, +{"id":"squish","key":"squish","value":{"rev":"15-2334d8412df59ddd2fce60c1f77954c7"}}, +{"id":"sqwish","key":"sqwish","value":{"rev":"28-cc159dd5fd420432a7724c46456f4958"}}, +{"id":"srand","key":"srand","value":{"rev":"16-22f98b1b1a208c22dfbe95aa889cd08e"}}, +{"id":"srcds","key":"srcds","value":{"rev":"3-bd79da47d36662609c0c75c713874fd1"}}, +{"id":"srs","key":"srs","value":{"rev":"32-c8c961ea10fc60fc428bddff133a8aba"}}, +{"id":"sserve","key":"sserve","value":{"rev":"3-957457395e2c61c20bcb727fc19fc4d4"}}, +{"id":"ssh","key":"ssh","value":{"rev":"3-c7dda694daa7ca1e264b494400edfa18"}}, +{"id":"ssh-agent","key":"ssh-agent","value":{"rev":"3-dbc87102ed1f17b7253a1901976dfa9d"}}, +{"id":"sshmq","key":"sshmq","value":{"rev":"3-052f36ca47cddf069a1700fc79a08930"}}, +{"id":"stache","key":"stache","value":{"rev":"11-9bb0239153147939a25fd20184f20fc6"}}, +{"id":"stack","key":"stack","value":{"rev":"7-e18abdce80008ac9e2feb66f3407fe67"}}, +{"id":"stack-trace","key":"stack-trace","value":{"rev":"13-9fe20c5a3e34a5e4472c6f4fdea86efc"}}, +{"id":"stack.static","key":"stack.static","value":{"rev":"7-ad064faf6255a632cefa71a6ff3c47f3"}}, +{"id":"stack2","key":"stack2","value":{"rev":"3-e5f8ea94c0dd2b4c7f5d3941d689622b"}}, +{"id":"stackedy","key":"stackedy","value":{"rev":"25-f988787b9b5720dece8ae3cb83a2bc12"}}, +{"id":"stage","key":"stage","value":{"rev":"7-d2931fcb473f63320067c3e75638924e"}}, +{"id":"stalker","key":"stalker","value":{"rev":"19-ece35be8695846fc766a71c0022d4ff7"}}, +{"id":"startupify","key":"startupify","value":{"rev":"11-3c87ef5e9ee33122cf3515a63b22c52a"}}, +{"id":"stash","key":"stash","value":{"rev":"10-41239a1df74b69fe7bb3e360f9a35ad1"}}, +{"id":"statechart","key":"statechart","value":{"rev":"6-97e6947b5bbaf14bdb55efa6dfa5e19c"}}, +{"id":"stately","key":"stately","value":{"rev":"6-f8a257cd9fdd84947ff2cf7357afc88b"}}, +{"id":"stathat","key":"stathat","value":{"rev":"3-b79b7bd50bb1e4dcc1301424104a5b36"}}, +{"id":"station","key":"station","value":{"rev":"5-92e6387138b1ee10976bd92dd48ea818"}}, +{"id":"statistics","key":"statistics","value":{"rev":"3-a1c3a03d833c6f02fde403950790e9b4"}}, +{"id":"stats","key":"stats","value":{"rev":"13-fe513ea6b3b5b6b31935fd3464ec5d3b"}}, +{"id":"std","key":"std","value":{"rev":"55-58a4f182c3f51996a0d60a6f575cfefd"}}, +{"id":"steam","key":"steam","value":{"rev":"5-bffdf677d2d1ae3e8236892e68a3dd66"}}, +{"id":"stem","key":"stem","value":{"rev":"36-4f1c38eff671ede0241038017a810132"}}, +{"id":"step","key":"step","value":{"rev":"8-048d7707a45af3a7824a478d296cc467"}}, +{"id":"stepc","key":"stepc","value":{"rev":"3-be85de2c02f4889fdf77fda791feefea"}}, +{"id":"stepper","key":"stepper","value":{"rev":"9-cc54000dc973835c38e139b30cbb10cc"}}, +{"id":"steps","key":"steps","value":{"rev":"5-3561591b425e1fff52dc397f9688feae"}}, +{"id":"stextile","key":"stextile","value":{"rev":"29-9a8b6de917df01d322847f112dcadadf"}}, +{"id":"stitch","key":"stitch","value":{"rev":"13-8a50e4a4f015d1afe346aa6b6c8646bd"}}, +{"id":"stitchup","key":"stitchup","value":{"rev":"7-fe14604e3a8b82f62c38d0cb3ccce61e"}}, +{"id":"stomp","key":"stomp","value":{"rev":"15-e0430c0be74cd20c5204b571999922f7"}}, +{"id":"stopwords","key":"stopwords","value":{"rev":"3-2dd9fade030cfcce85848c5b3b4116fc"}}, +{"id":"store","key":"store","value":{"rev":"9-5537cc0f4827044504e8dae9617c9347"}}, +{"id":"store.js","key":"store.js","value":{"rev":"22-116c9a6194703ea98512d89ec5865e3d"}}, +{"id":"stories","key":"stories","value":{"rev":"11-244ca52d0a41f70bc4dfa0aca0f82a40"}}, +{"id":"storify","key":"storify","value":{"rev":"5-605b197219e916df561dd7722af97e2e"}}, +{"id":"storify-templates","key":"storify-templates","value":{"rev":"3-0960756aa963cee21b679a59cef114a1"}}, +{"id":"storm","key":"storm","value":{"rev":"3-9052e6af8528d1bc0d96021dfa21dd3e"}}, +{"id":"stove","key":"stove","value":{"rev":"17-01c9f0e87398e6bfa03a764e89295e00"}}, +{"id":"str.js","key":"str.js","value":{"rev":"9-301f54edeebde3c5084c3a8071e2aa09"}}, +{"id":"strack","key":"strack","value":{"rev":"10-5acf78ae6a417a82b49c221d606b8fed"}}, +{"id":"strappy","key":"strappy","value":{"rev":"3-fb63a899ff82c0f1142518cc263dd632"}}, +{"id":"strata","key":"strata","value":{"rev":"31-de615eccbda796e2bea405c2806ec792"}}, +{"id":"stream-buffers","key":"stream-buffers","value":{"rev":"7-d8fae628da43d377dd4e982f5bf7b09b"}}, +{"id":"stream-handler","key":"stream-handler","value":{"rev":"7-333eb7dcf2aeb550f948ee2162b21be2"}}, +{"id":"stream-stack","key":"stream-stack","value":{"rev":"22-a70979df042e2ff760b2d900259c84a1"}}, +{"id":"streamer","key":"streamer","value":{"rev":"17-dd16e62ada55311a793fbf7963a920f3"}}, +{"id":"streamlib","key":"streamlib","value":{"rev":"3-5125b1e6a92290f8d7f5fdad71e13fc2"}}, +{"id":"streamline","key":"streamline","value":{"rev":"152-0931f5697340c62e05dcd1a741afd38f"}}, +{"id":"streamline-streams","key":"streamline-streams","value":{"rev":"3-3224030ecfbf5a8ac5d218ab56dee545"}}, +{"id":"streamline-util","key":"streamline-util","value":{"rev":"3-a8047ecf37b985ec836c552fd2bcbf78"}}, +{"id":"streamlogger","key":"streamlogger","value":{"rev":"3-43f93a109774591f1409b0b86c363623"}}, +{"id":"streamlogger-fixed","key":"streamlogger-fixed","value":{"rev":"3-6e48de9e269b4f5bf979c560190b0680"}}, +{"id":"strftime","key":"strftime","value":{"rev":"25-74130d5c9cbf91025ce91f0463a9b1b5"}}, +{"id":"string-color","key":"string-color","value":{"rev":"3-9f336bf06bd80b2d2338c216099421c7"}}, +{"id":"strscan","key":"strscan","value":{"rev":"8-3e0d182a8d0c786754c555c0ac12e9d9"}}, +{"id":"strtok","key":"strtok","value":{"rev":"8-a1a1da7946d62fabb6cca56fc218654b"}}, +{"id":"struct","key":"struct","value":{"rev":"3-ff0f9cb336df73a5a19a38e17633583c"}}, +{"id":"structr","key":"structr","value":{"rev":"21-69b3672dab234d0effec5a72a2b1791c"}}, +{"id":"sty","key":"sty","value":{"rev":"9-ce5691388abc3ccaff23030bff190914"}}, +{"id":"style","key":"style","value":{"rev":"7-342569887fb53caddc60d745706cd66e"}}, +{"id":"style-compile","key":"style-compile","value":{"rev":"5-6f8b86c94c5344ec280a28f025691996"}}, +{"id":"styleless","key":"styleless","value":{"rev":"5-c236b81c38193ad71d7ed7c5b571995d"}}, +{"id":"stylewriter","key":"stylewriter","value":{"rev":"3-25a3f83252b220d8db0aa70c8fc1da4f"}}, +{"id":"stylus","key":"stylus","value":{"rev":"135-8b69084f50a95c297d1044e48b39a6c9"}}, +{"id":"stylus-blueprint","key":"stylus-blueprint","value":{"rev":"5-50ec59a9fa161ca68dac765f2281c13e"}}, +{"id":"stylus-sprite","key":"stylus-sprite","value":{"rev":"27-db597a75467baaad94de287494e9c21e"}}, +{"id":"styout","key":"styout","value":{"rev":"9-9d9460bb9bfa253ed0b5fbeb27f7710a"}}, +{"id":"sugar","key":"sugar","value":{"rev":"5-2722426edc51a7703f5c37306b03a8c4"}}, +{"id":"sugardoll","key":"sugardoll","value":{"rev":"16-cfadf4e7108357297be180a3868130db"}}, +{"id":"suger-pod","key":"suger-pod","value":{"rev":"5-c812b763cf6cdd218c6a18e1a4e2a4ac"}}, +{"id":"sunny","key":"sunny","value":{"rev":"3-c26b62eef1eeeeef58a7ea9373df3b39"}}, +{"id":"superagent","key":"superagent","value":{"rev":"3-1b32cc8372b7713f973bb1e044e6a86f"}}, +{"id":"supermarket","key":"supermarket","value":{"rev":"20-afa8a26ecec3069717c8ca7e5811cc31"}}, +{"id":"supershabam-websocket","key":"supershabam-websocket","value":{"rev":"7-513117fb37b3ab7cdaeeae31589e212e"}}, +{"id":"supervisor","key":"supervisor","value":{"rev":"16-2c6c141d018ef8927acee79f31d466ff"}}, +{"id":"supervisord","key":"supervisord","value":{"rev":"7-359ba115e5e10b5c95ef1a7562ad7a45"}}, +{"id":"svg2jadepartial","key":"svg2jadepartial","value":{"rev":"9-4a6260dd5d7c14801e8012e3ba7510f5"}}, +{"id":"swake","key":"swake","value":{"rev":"5-6f780362f0317427752d87cc5c640021"}}, +{"id":"swarm","key":"swarm","value":{"rev":"43-f1a963a0aeb043bf69529a82798b3afc"}}, +{"id":"sweet","key":"sweet","value":{"rev":"5-333f4d3529f65ce53b037cc282e3671d"}}, +{"id":"swig","key":"swig","value":{"rev":"29-53294b9d4f350192cf65817692092bfa"}}, +{"id":"switchback","key":"switchback","value":{"rev":"3-e117371d415f4a3d4ad30e78f5ec28bf"}}, +{"id":"switchboard","key":"switchboard","value":{"rev":"3-504d6c1e45165c54fbb1d3025d5120d7"}}, +{"id":"swiz","key":"swiz","value":{"rev":"82-cfb7840376b57896fba469e5c6ff3786"}}, +{"id":"swizec-bitly","key":"swizec-bitly","value":{"rev":"3-a705807238b8ef3ff2d008910bc350c3"}}, +{"id":"sws","key":"sws","value":{"rev":"5-bc5e8558bde6c2ae971abdd448a006d2"}}, +{"id":"symbie","key":"symbie","value":{"rev":"5-3184f869ed386341a4cdc35d85efb62a"}}, +{"id":"symbox","key":"symbox","value":{"rev":"5-eed33350cbb763726335ef1df74a6591"}}, +{"id":"synapse","key":"synapse","value":{"rev":"3-a9672d5159c0268babbfb94d7554d4bb"}}, +{"id":"sync","key":"sync","value":{"rev":"65-89fa6b8ab2df135d57e0bba4e921ad3b"}}, +{"id":"synchro","key":"synchro","value":{"rev":"21-6a881704308298f1894509a5b59287ae"}}, +{"id":"synchronous","key":"synchronous","value":{"rev":"7-bf89d61f001d994429e0fd12c26c2676"}}, +{"id":"syncler","key":"syncler","value":{"rev":"2-12870522e069945fc12f7d0f612700ee"}}, +{"id":"syncrepl","key":"syncrepl","value":{"rev":"5-e9234a1d8a529bc0d1b01c3b77c69c30"}}, +{"id":"synct","key":"synct","value":{"rev":"3-3664581b69e6f40dabc90525217f46cd"}}, +{"id":"syndicate","key":"syndicate","value":{"rev":"7-1db2b05d6b3e55fa622c3c26df7f9cad"}}, +{"id":"syslog","key":"syslog","value":{"rev":"5-d52fbc739505a2a194faf9a32da39d23"}}, +{"id":"syslog-node","key":"syslog-node","value":{"rev":"15-039177b9c516fd8d0b31faf92aa73f6f"}}, +{"id":"system","key":"system","value":{"rev":"18-33152371e0696a853ddb8b2234a6dfea"}}, +{"id":"taazr-uglify","key":"taazr-uglify","value":{"rev":"7-5c63dc75aa7c973df102c298291be8a5"}}, +{"id":"table","key":"table","value":{"rev":"9-a8a46ddf3a7cab63a0228303305cc32e"}}, +{"id":"tache.io","key":"tache.io","value":{"rev":"7-5639c70dc56b0a6333b568af377bb216"}}, +{"id":"taco","key":"taco","value":{"rev":"3-97cfbd54b4053c9e01e18af7c3902d1a"}}, +{"id":"tad","key":"tad","value":{"rev":"3-529ebda7291e24ae020d5c2931ba22cd"}}, +{"id":"tafa-misc-util","key":"tafa-misc-util","value":{"rev":"19-52984b66029c7d5cc78d3e2ae88c98d6"}}, +{"id":"tag","key":"tag","value":{"rev":"3-80b0d526b10a26f41fe73978843a07b9"}}, +{"id":"taglib","key":"taglib","value":{"rev":"3-efd2e6bc818bf3b385df40dfae506fa5"}}, +{"id":"tail","key":"tail","value":{"rev":"21-09bce80ad6aa4b01c6a70825fd141fd4"}}, +{"id":"tails","key":"tails","value":{"rev":"14-3ba6976831b1388e14235622ab001681"}}, +{"id":"tamejs","key":"tamejs","value":{"rev":"39-9a3657941df3bd24c43b5473e9f3b4c8"}}, +{"id":"taobao-js-api","key":"taobao-js-api","value":{"rev":"7-d46c8b48364b823dabf808f2b30e1eb8"}}, +{"id":"tap","key":"tap","value":{"rev":"35-1b8e553cf848f5ab27711efa0e74a033"}}, +{"id":"tap-assert","key":"tap-assert","value":{"rev":"19-f2960c64bcfa6ce4ed73e870d8d9e3fa"}}, +{"id":"tap-consumer","key":"tap-consumer","value":{"rev":"3-3e38aafb6d2d840bdb20818efbc75df4"}}, +{"id":"tap-global-harness","key":"tap-global-harness","value":{"rev":"3-f32589814daf8c1816c1f5a24de4ad12"}}, +{"id":"tap-harness","key":"tap-harness","value":{"rev":"7-a5af01384152c452abc11d4e641e6157"}}, +{"id":"tap-producer","key":"tap-producer","value":{"rev":"3-2db67a9541c37c912d4de2576bb3caa0"}}, +{"id":"tap-results","key":"tap-results","value":{"rev":"5-b8800525438965e38dc586e6b5cb142d"}}, +{"id":"tap-runner","key":"tap-runner","value":{"rev":"11-3975c0f5044530b61158a029899f4c03"}}, +{"id":"tap-test","key":"tap-test","value":{"rev":"5-0a3bba26b6b94dae8b7f59712335ee98"}}, +{"id":"tar","key":"tar","value":{"rev":"6-94226dd7add6ae6a1e68088360a466e4"}}, +{"id":"tar-async","key":"tar-async","value":{"rev":"37-d6579d43c1ee2f41205f28b0cde5da23"}}, +{"id":"tar-js","key":"tar-js","value":{"rev":"5-6826f2aad965fb532c7403964ce80d85"}}, +{"id":"task","key":"task","value":{"rev":"3-81f72759a5b64dff88a01a4838cc4a23"}}, +{"id":"task-extjs","key":"task-extjs","value":{"rev":"14-c9ba76374805425c332e0c66725e885c"}}, +{"id":"task-joose-nodejs","key":"task-joose-nodejs","value":{"rev":"20-6b8e4d24323d3240d5ee790d00c0d96a"}}, +{"id":"task-joose-stable","key":"task-joose-stable","value":{"rev":"32-026eada52cd5dd17a680359daec4917a"}}, +{"id":"tasks","key":"tasks","value":{"rev":"5-84e8f83d0c6ec27b4f05057c48063d62"}}, +{"id":"tav","key":"tav","value":{"rev":"3-da9899817edd20f0c73ad09bdf540cc6"}}, +{"id":"taxman","key":"taxman","value":{"rev":"5-9b9c68db8a1c8efedad800026cb23ae4"}}, +{"id":"tbone","key":"tbone","value":{"rev":"3-5789b010d0b1f1c663750c894fb5c570"}}, +{"id":"tcp-proxy","key":"tcp-proxy","value":{"rev":"3-118c6dc26d11537cf157fe2f28b05af5"}}, +{"id":"teamgrowl","key":"teamgrowl","value":{"rev":"8-3d13200b3bfeeace0787f9f9f027216d"}}, +{"id":"teamgrowl-server","key":"teamgrowl-server","value":{"rev":"8-a14dc4a26c2c06a4d9509eaff6e24735"}}, +{"id":"telehash","key":"telehash","value":{"rev":"6-4fae3629c1e7e111ba3e486b39a29913"}}, +{"id":"telemail","key":"telemail","value":{"rev":"3-60928460428265fc8002ca61c7f23abe"}}, +{"id":"telemetry","key":"telemetry","value":{"rev":"5-1be1d37ef62dc786b0a0f0d2d7984eb1"}}, +{"id":"teleport","key":"teleport","value":{"rev":"36-5b55a43ba83f4fe1a547c04e29139c3d"}}, +{"id":"teleport-dashboard","key":"teleport-dashboard","value":{"rev":"7-4cbc728d7a3052848a721fcdd92dda30"}}, +{"id":"teleport-site","key":"teleport-site","value":{"rev":"3-aeb8c0a93b7b0bcd7a30fe33bf23808c"}}, +{"id":"telnet","key":"telnet","value":{"rev":"11-7a587104b94ce135315c7540eb3493f6"}}, +{"id":"telnet-protocol","key":"telnet-protocol","value":{"rev":"3-8fcee2ed02c2e603c48e51e90ae78a00"}}, +{"id":"temp","key":"temp","value":{"rev":"6-91ef505da0a0860a13c0eb1a5d2531e6"}}, +{"id":"tempPath","key":"tempPath","value":{"rev":"3-34f2c1937d97207245986c344136547c"}}, +{"id":"tempis","key":"tempis","value":{"rev":"3-b2c0989068cc8125a519d19b9c79ffb6"}}, +{"id":"template","key":"template","value":{"rev":"6-d0088c6a5a7610570920db0f5c950bf9"}}, +{"id":"template-engine","key":"template-engine","value":{"rev":"3-3746216e1e2e456dbb0fd2f9070c1619"}}, +{"id":"tengwar","key":"tengwar","value":{"rev":"3-645a00f03e1e9546631ac22c37e1f3b4"}}, +{"id":"tenjin","key":"tenjin","value":{"rev":"5-0925c7535455266125b7730296c66356"}}, +{"id":"teriaki","key":"teriaki","value":{"rev":"3-d3c17f70d8697c03f43a7eae75f8c089"}}, +{"id":"terminal","key":"terminal","value":{"rev":"11-0e024d173ee3c28432877c0c5f633f19"}}, +{"id":"termspeak","key":"termspeak","value":{"rev":"7-fdfc93dd7d0d65fe502cabca191d8496"}}, +{"id":"termutil","key":"termutil","value":{"rev":"5-bccf8377ff28bc1f07f8b4b44d1e2335"}}, +{"id":"test","key":"test","value":{"rev":"38-129620013bbd3ec13617c403b02b52f1"}}, +{"id":"test-cmd","key":"test-cmd","value":{"rev":"35-7dd417a80390c2c124c66273ae33bd07"}}, +{"id":"test-helper","key":"test-helper","value":{"rev":"3-7b29af65825fc46d0603a39cdc6c95b4"}}, +{"id":"test-report","key":"test-report","value":{"rev":"5-e51cd1069b6cc442707f0861b35851be"}}, +{"id":"test-report-view","key":"test-report-view","value":{"rev":"3-9ba670940a8235eaef9b957dde6379af"}}, +{"id":"test-run","key":"test-run","value":{"rev":"20-6de89383602e6843d9376a78778bec19"}}, +{"id":"test_it","key":"test_it","value":{"rev":"5-be5cd436b9145398fa88c15c1269b102"}}, +{"id":"testbed","key":"testbed","value":{"rev":"2-db233788f7e516f227fac439d9450ef4"}}, +{"id":"testharness","key":"testharness","value":{"rev":"46-787468cb68ec31b442327639dcc0a4e5"}}, +{"id":"testingey","key":"testingey","value":{"rev":"17-a7ad6a9ff5721ae449876f6448d6f22f"}}, +{"id":"testnode","key":"testnode","value":{"rev":"9-cb63c450b241806e2271cd56fe502395"}}, +{"id":"testosterone","key":"testosterone","value":{"rev":"35-278e8af2b59bb6caf56728c67f720c37"}}, +{"id":"testqueue","key":"testqueue","value":{"rev":"3-59c574aeb345ef2d6e207a342be3f497"}}, +{"id":"testrunner","key":"testrunner","value":{"rev":"7-152e7d4a97f6cf6f00e22140e1969664"}}, +{"id":"testy","key":"testy","value":{"rev":"5-e8f4c9f4a799b6f8ab4effc21c3073a0"}}, +{"id":"text","key":"text","value":{"rev":"6-58a79b0db4968d6ad233898744a75351"}}, +{"id":"textareaserver","key":"textareaserver","value":{"rev":"3-f032b1397eb5e6369e1ac0ad1e78f466"}}, +{"id":"textile","key":"textile","value":{"rev":"6-2a8db66876f0119883449012c9c54c47"}}, +{"id":"textual","key":"textual","value":{"rev":"3-0ad9d5d3403b239185bad403625fed19"}}, +{"id":"tf2logparser","key":"tf2logparser","value":{"rev":"5-ffbc427b95ffeeb013dc13fa2b9621e3"}}, +{"id":"tfe-express","key":"tfe-express","value":{"rev":"3-b68ac01185885bcd22fa430ddb97e757"}}, +{"id":"tfidf","key":"tfidf","value":{"rev":"13-988808af905397dc103a0edf8c7c8a9f"}}, +{"id":"theBasics","key":"theBasics","value":{"rev":"7-9ebef2e59e1bd2fb3544ed16e1dc627b"}}, +{"id":"thefunlanguage.com","key":"thefunlanguage.com","value":{"rev":"3-25d56a3a4f639af23bb058db541bffe0"}}, +{"id":"thelinuxlich-docco","key":"thelinuxlich-docco","value":{"rev":"7-2ac0969da67ead2fa8bc0b21880b1d6b"}}, +{"id":"thelinuxlich-vogue","key":"thelinuxlich-vogue","value":{"rev":"5-ebc0a28cf0ae447b7ebdafc51c460bc0"}}, +{"id":"thepusher","key":"thepusher","value":{"rev":"5-b80cce6f81b1cae7373cd802df34c05c"}}, +{"id":"thetvdb","key":"thetvdb","value":{"rev":"3-a3a017a90b752d8158bf6dfcbcfdf250"}}, +{"id":"thirty-two","key":"thirty-two","value":{"rev":"3-1d4761ba7c4fa475e0c69e9c96d6ac04"}}, +{"id":"thoonk","key":"thoonk","value":{"rev":"15-c62c90d7e9072d96302d3a534ce943bb"}}, +{"id":"thrift","key":"thrift","value":{"rev":"14-447a41c9b655ec06e8e4854d5a55523a"}}, +{"id":"throttle","key":"throttle","value":{"rev":"3-8a3b3c657c49ede67c883806fbfb4df6"}}, +{"id":"thyme","key":"thyme","value":{"rev":"5-f06104f10d43a2b4cbcc7621ed45eacf"}}, +{"id":"tiamat","key":"tiamat","value":{"rev":"44-810633d6cd5edaa0510fe0f38c02ad58"}}, +{"id":"tictoc","key":"tictoc","value":{"rev":"3-0be6cf95d4466595376dadd0fc08bd95"}}, +{"id":"tidy","key":"tidy","value":{"rev":"3-25116d4dcf6765ef2a09711ecc1e03c9"}}, +{"id":"tiers","key":"tiers","value":{"rev":"3-ffaa8ffe472fe703de8f0bbeb8af5621"}}, +{"id":"tilejson","key":"tilejson","value":{"rev":"5-76b990dd945fb412ed00a96edc86b59d"}}, +{"id":"tilelive","key":"tilelive","value":{"rev":"57-9283e846e77263ed6e7299680d6b4b06"}}, +{"id":"tilelive-mapnik","key":"tilelive-mapnik","value":{"rev":"31-30f871ede46789fc6a36f427a1a99fff"}}, +{"id":"tilemill","key":"tilemill","value":{"rev":"19-7b884c9d707dd34f21cb71e88b45fc73"}}, +{"id":"tilestream","key":"tilestream","value":{"rev":"76-3a29ba96ecdb6c860c211ae8f2d909a9"}}, +{"id":"timbits","key":"timbits","value":{"rev":"59-b48dde4a210ec9fb4c33c07a52bce61e"}}, +{"id":"time","key":"time","value":{"rev":"51-907f587206e6a27803a3570e42650adc"}}, +{"id":"timeTraveller","key":"timeTraveller","value":{"rev":"7-389de8c8e86daea495d14aeb2b77df38"}}, +{"id":"timeout","key":"timeout","value":{"rev":"11-8e53dedecfaf6c4f1086eb0f43c71325"}}, +{"id":"timer","key":"timer","value":{"rev":"5-a8bcbb898a807e6662b54ac988fb967b"}}, +{"id":"timerjs","key":"timerjs","value":{"rev":"3-7d24eb268746fdb6b5e9be93bec93f1b"}}, +{"id":"timespan","key":"timespan","value":{"rev":"12-315b2793cbf28a18cea36e97a3c8a55f"}}, +{"id":"timezone","key":"timezone","value":{"rev":"35-2741d5d3b68a953d4cb3a596bc2bc15e"}}, +{"id":"tiny","key":"tiny","value":{"rev":"9-a61d26d02ce39381f7e865ad82494692"}}, +{"id":"tld","key":"tld","value":{"rev":"3-5ce4b4e48a11413ad8a1f3bfd0d0b778"}}, +{"id":"tldextract","key":"tldextract","value":{"rev":"7-620962e27145bd9fc17dc406c38b0c32"}}, +{"id":"tmp","key":"tmp","value":{"rev":"23-20f5c14244d58f35bd3e970f5f65cc32"}}, +{"id":"tmpl","key":"tmpl","value":{"rev":"5-5894c206e15fa58ab9415706b9d53f1f"}}, +{"id":"tmpl-precompile","key":"tmpl-precompile","value":{"rev":"15-3db34b681596b258cae1dae8cc24119d"}}, +{"id":"tmppckg","key":"tmppckg","value":{"rev":"11-b3a13e1280eb9cbef182c1f3f24bd570"}}, +{"id":"tnetstrings","key":"tnetstrings","value":{"rev":"3-d6b8ed2390a3e38138cb01b82d820079"}}, +{"id":"toDataURL","key":"toDataURL","value":{"rev":"3-1ea3cb62666b37343089bb9ef48fbace"}}, +{"id":"toYaml","key":"toYaml","value":{"rev":"11-3c629e3859c70d57b1ae51b2ac459011"}}, +{"id":"tob","key":"tob","value":{"rev":"7-376c174d06a675855406cfcdcacf61f5"}}, +{"id":"tobi","key":"tobi","value":{"rev":"50-d8749ac3739b042afe82657802bc3ba8"}}, +{"id":"toddick","key":"toddick","value":{"rev":"13-db528ef519f57b8c1d752ad7270b4d05"}}, +{"id":"tokenizer","key":"tokenizer","value":{"rev":"5-f6524fafb16059b66074cd04bf248a03"}}, +{"id":"tokyotosho","key":"tokyotosho","value":{"rev":"5-7432e0207165d9c165fd73d2a23410d6"}}, +{"id":"tolang","key":"tolang","value":{"rev":"7-65dbdf56b039f680e61a1e1d7feb9fb1"}}, +{"id":"toolkit","key":"toolkit","value":{"rev":"13-58075a57a6069dc39f98e72d473a0c30"}}, +{"id":"tools","key":"tools","value":{"rev":"3-ba301d25cfc6ad71dd68c811ea97fa01"}}, +{"id":"topcube","key":"topcube","value":{"rev":"29-736b3816d410f626dbc4da663acb05aa"}}, +{"id":"torrent-search","key":"torrent-search","value":{"rev":"7-7dd48fac0c1f99f34fad7da365085b6c"}}, +{"id":"tosource","key":"tosource","value":{"rev":"5-13483e2c11b07611c26b37f2e76a0bf3"}}, +{"id":"tplcpl","key":"tplcpl","value":{"rev":"15-8ba1e6d14ad6b8eb71b703e22054ac0a"}}, +{"id":"tracejs","key":"tracejs","value":{"rev":"23-1ffec83afc19855bcbed8049a009a910"}}, +{"id":"traceur","key":"traceur","value":{"rev":"9-a48f7e4cb1fb452125d81c62c8ab628b"}}, +{"id":"traceurl","key":"traceurl","value":{"rev":"21-e016db44a86b124ea00411f155d884d4"}}, +{"id":"tracey","key":"tracey","value":{"rev":"5-76699aab64e89271cbb7df80a00d3583"}}, +{"id":"tracy","key":"tracy","value":{"rev":"5-412f78082ba6f4c3c7d5328cf66d2e10"}}, +{"id":"traits","key":"traits","value":{"rev":"10-3a37dbec4b78518c00c577f5e286a9b9"}}, +{"id":"tramp","key":"tramp","value":{"rev":"5-3b6d27b8b432b925b7c9fc088e84d8e4"}}, +{"id":"transcode","key":"transcode","value":{"rev":"6-a6494707bd94b5e6d1aa9df3dbcf8d7c"}}, +{"id":"transformer","key":"transformer","value":{"rev":"15-7738ac7c02f03d64f73610fbf7ed92a6"}}, +{"id":"transformjs","key":"transformjs","value":{"rev":"5-f1ab667c430838e1d3238e1f878998e2"}}, +{"id":"transitive","key":"transitive","value":{"rev":"43-841de40a5e3434bd51a1c8f19891f982"}}, +{"id":"translate","key":"translate","value":{"rev":"12-f3ddbbada2f109843c5422d83dd7a203"}}, +{"id":"transliteration.ua","key":"transliteration.ua","value":{"rev":"3-f847c62d8749904fc7de6abe075e619a"}}, +{"id":"transmission","key":"transmission","value":{"rev":"9-587eaa395430036f17b175bc439eabb6"}}, +{"id":"transmogrify","key":"transmogrify","value":{"rev":"5-3e415cd9420c66551cccc0aa91b11d98"}}, +{"id":"transporter","key":"transporter","value":{"rev":"6-698b696890bf01d751e9962bd86cfe7e"}}, +{"id":"traverse","key":"traverse","value":{"rev":"60-9432066ab44fbb0e913227dc62c953d9"}}, +{"id":"traverser","key":"traverser","value":{"rev":"11-1d50662f13134868a1df5019d99bf038"}}, +{"id":"treeeater","key":"treeeater","value":{"rev":"56-2c8a9fd3e842b221ab8da59c6d847327"}}, +{"id":"treelib","key":"treelib","value":{"rev":"13-212ccc836a943c8b2a5342b65ab9edf3"}}, +{"id":"trees","key":"trees","value":{"rev":"3-3ee9e9cf3fd8aa985e32b3d9586a7c0e"}}, +{"id":"trentm-datetime","key":"trentm-datetime","value":{"rev":"3-740a291379ddf97bda2aaf2ff0e1654d"}}, +{"id":"trentm-git","key":"trentm-git","value":{"rev":"3-b81ce3764a45e5d0862488fab9fac486"}}, +{"id":"trentm-hashlib","key":"trentm-hashlib","value":{"rev":"3-4b4175b6a8702bdb9c1fe5ac4786761b"}}, +{"id":"trial","key":"trial","value":{"rev":"3-cf77f189409517495dd8259f86e0620e"}}, +{"id":"trie","key":"trie","value":{"rev":"3-6cc3c209cf4aae5a4f92e1ca38c4c54c"}}, +{"id":"trollop","key":"trollop","value":{"rev":"6-75076593614c9cd51d61a76f73d2c5b5"}}, +{"id":"trollscript","key":"trollscript","value":{"rev":"5-fcf646075c5be575b9174f84d08fbb37"}}, +{"id":"trollscriptjs","key":"trollscriptjs","value":{"rev":"3-1dfd1acd3d15c0bd18ea407e3933b621"}}, +{"id":"tropo-webapi","key":"tropo-webapi","value":{"rev":"11-5106730dbd79167df38812ffaa912ded"}}, +{"id":"tropo-webapi-node","key":"tropo-webapi-node","value":{"rev":"15-483c64bcbf1dcadaea30e78d7bc3ebbc"}}, +{"id":"trundle","key":"trundle","value":{"rev":"3-2af32ed348fdedebd1077891bb22a756"}}, +{"id":"trust-reverse-proxy","key":"trust-reverse-proxy","value":{"rev":"6-ba5bed0849617e0390f0e24750bf5747"}}, +{"id":"trying","key":"trying","value":{"rev":"3-43b417160b178c710e0d85af6b3d56e7"}}, +{"id":"ttapi","key":"ttapi","value":{"rev":"51-727e47d8b383b387a498711c07ce4de6"}}, +{"id":"tubbs","key":"tubbs","value":{"rev":"7-b386e59f2205b22615a376f5ddee3eb0"}}, +{"id":"tuild","key":"tuild","value":{"rev":"13-4a2b92f95a0ee342c060974ce7a0021d"}}, +{"id":"tumbler","key":"tumbler","value":{"rev":"5-ff16653ab92d0af5e70d9caa88f3b7ed"}}, +{"id":"tumbler-sprite","key":"tumbler-sprite","value":{"rev":"3-604d25b7bb9e32b92cadd75aeb23997c"}}, +{"id":"tumblr","key":"tumblr","value":{"rev":"9-14d160f1f2854330fba300b3ea233893"}}, +{"id":"tumblr2","key":"tumblr2","value":{"rev":"7-29bb5d86501cdbcef889289fe7f4b51e"}}, +{"id":"tumblrrr","key":"tumblrrr","value":{"rev":"10-0c50379fbab7b39766e1a61379c39964"}}, +{"id":"tunguska","key":"tunguska","value":{"rev":"1-a6b24d2c2a5a9f091a9b6f13bac66927"}}, +{"id":"tupalocomapi","key":"tupalocomapi","value":{"rev":"3-a1cdf85a08784f62c2ec440a1ed90ad4"}}, +{"id":"turing","key":"turing","value":{"rev":"5-4ba083c8343718acb9450d96551b65c0"}}, +{"id":"tutti","key":"tutti","value":{"rev":"21-929cc205b3d8bc68f86aa63578e0af95"}}, +{"id":"tuttiserver","key":"tuttiserver","value":{"rev":"39-b3fe7cbaf2d43458dae061f37aa5ae18"}}, +{"id":"tuttiterm","key":"tuttiterm","value":{"rev":"7-6c0e9e7f6f137de0ee7c886351fdf373"}}, +{"id":"tvister","key":"tvister","value":{"rev":"7-963eab682ab09922a44fbca50c0ec019"}}, +{"id":"twbot","key":"twbot","value":{"rev":"15-923625f516566c977975b3da3d4bc46b"}}, +{"id":"tweasy","key":"tweasy","value":{"rev":"10-7215063e5729b1c114ef73f07a1368d3"}}, +{"id":"tweeter.js","key":"tweeter.js","value":{"rev":"3-bc8437157c11cf32eec168d7c71037bb"}}, +{"id":"tweetstream","key":"tweetstream","value":{"rev":"6-81a6bf2a3e29208e1c4c65a3958ee5d8"}}, +{"id":"twerk","key":"twerk","value":{"rev":"5-01cbfddf9ad25a67ff1e45ec39acb780"}}, +{"id":"twerp","key":"twerp","value":{"rev":"23-1b4726d1fef030a3dde6fae2cdfbb687"}}, +{"id":"twigjs","key":"twigjs","value":{"rev":"7-07b90e2c35c5c81d394b29086507de04"}}, +{"id":"twilio","key":"twilio","value":{"rev":"20-68d5439ecb1774226025e6f9125bbb86"}}, +{"id":"twilio-node","key":"twilio-node","value":{"rev":"13-84d31c2dc202df3924ed399289cbc1fc"}}, +{"id":"twiliode","key":"twiliode","value":{"rev":"3-6cbe432dd6c6d94d8a4faa6e0ea47dd3"}}, +{"id":"twill","key":"twill","value":{"rev":"5-3a0caf9c0e83ab732ae8ae61f4f17830"}}, +{"id":"twisted-deferred","key":"twisted-deferred","value":{"rev":"9-f35acecb8736d96582e1f9b62dd4ae47"}}, +{"id":"twitpic","key":"twitpic","value":{"rev":"11-55b11432a09edeec1189024f26a48153"}}, +{"id":"twitter","key":"twitter","value":{"rev":"60-9ad6368932c8a74ea5bd10dda993d74d"}}, +{"id":"twitter-client","key":"twitter-client","value":{"rev":"11-dc3da9e1724cf00aa86c1e7823cfd919"}}, +{"id":"twitter-connect","key":"twitter-connect","value":{"rev":"12-969292347a4251d121566169236a3091"}}, +{"id":"twitter-js","key":"twitter-js","value":{"rev":"24-251d0c54749e86bd544a15290e311370"}}, +{"id":"twitter-node","key":"twitter-node","value":{"rev":"12-a7ed6c69f05204de2e258f46230a05b6"}}, +{"id":"twitter-text","key":"twitter-text","value":{"rev":"16-978bda8ec4eaf68213d0ee54242feefa"}}, +{"id":"type","key":"type","value":{"rev":"3-c5b8b87cde9e27277302cb5cb6d00f85"}}, +{"id":"typecheck","key":"typecheck","value":{"rev":"5-79723661620bb0fb254bc7f888d6e937"}}, +{"id":"typed-array","key":"typed-array","value":{"rev":"3-89ac91e2a51a9e5872515d5a83691e83"}}, +{"id":"typhoon","key":"typhoon","value":{"rev":"23-2027c96b8fd971332848594f3b0526cb"}}, +{"id":"typogr","key":"typogr","value":{"rev":"13-2dfe00f08ee13e6b00a99df0a8f96718"}}, +{"id":"ua-parser","key":"ua-parser","value":{"rev":"14-d1a018354a583dba4506bdc0c04a416b"}}, +{"id":"uberblic","key":"uberblic","value":{"rev":"5-500704ed73f255eb5b86ad0a5e158bc9"}}, +{"id":"ucengine","key":"ucengine","value":{"rev":"5-1e8a91c813e39b6f1b9f988431bb65c8"}}, +{"id":"udon","key":"udon","value":{"rev":"3-9a819e835f88fc91272b6366c70d83c0"}}, +{"id":"ueberDB","key":"ueberDB","value":{"rev":"85-fa700e5a64efaf2e71de843d7175606c"}}, +{"id":"uglify-js","key":"uglify-js","value":{"rev":"30-9ac97132a90f94b0a3aadcd96ed51890"}}, +{"id":"uglify-js-middleware","key":"uglify-js-middleware","value":{"rev":"5-47bd98d7f1118f5cab617310d4022eb4"}}, +{"id":"uglifycss","key":"uglifycss","value":{"rev":"3-4eefc4632e6e61ec999e93a1e26e0c83"}}, +{"id":"ui","key":"ui","value":{"rev":"27-b6439c8fcb5feb1d8f722ac5a91727c0"}}, +{"id":"ukijs","key":"ukijs","value":{"rev":"13-a0d7b143104e6cc0760cbe7e61c4f293"}}, +{"id":"umecob","key":"umecob","value":{"rev":"19-960fef8b8b8468ee69096173baa63232"}}, +{"id":"underscore","key":"underscore","value":{"rev":"29-419857a1b0dc08311717d1f6066218b8"}}, +{"id":"underscore-data","key":"underscore-data","value":{"rev":"17-e763dd42ea6e4ab71bc442e9966e50e4"}}, +{"id":"underscore.date","key":"underscore.date","value":{"rev":"11-a1b5870b855d49a3bd37823a736e9f93"}}, +{"id":"underscore.inspector","key":"underscore.inspector","value":{"rev":"7-04d67b5bfe387391d461b11c6ddda231"}}, +{"id":"underscore.string","key":"underscore.string","value":{"rev":"31-4100a9e1f1d7e8dde007cc6736073e88"}}, +{"id":"underscorem","key":"underscorem","value":{"rev":"5-181dd113e62482020122e6a68f80cdc1"}}, +{"id":"underscorex","key":"underscorex","value":{"rev":"8-76b82cffecd4304822fbc346e6cebc1b"}}, +{"id":"underscorify","key":"underscorify","value":{"rev":"3-7bb03dccba21d30c50328e7d4878704e"}}, +{"id":"unicode","key":"unicode","value":{"rev":"45-2fc73b36aad2661e5bb2e703e62a6f71"}}, +{"id":"unicoder","key":"unicoder","value":{"rev":"3-6f6571d361217af7fea7c224ca8a1149"}}, +{"id":"unit","key":"unit","value":{"rev":"5-68847eeb11474765cf73f1e21ca4b839"}}, +{"id":"unite","key":"unite","value":{"rev":"3-a8812f4e77d1d1a9dc67c327d8e75b47"}}, +{"id":"unittest-jslint","key":"unittest-jslint","value":{"rev":"3-c371c63c7b68a32357becb7b6a02d048"}}, +{"id":"unixlib","key":"unixlib","value":{"rev":"3-41f4c2859ca92951cf40556faa4eacdb"}}, +{"id":"unlimit","key":"unlimit","value":{"rev":"3-f42d98066e6ebbc23ef67499845ac020"}}, +{"id":"unrequire","key":"unrequire","value":{"rev":"17-bc75241891ae005eb52844222daf8f97"}}, +{"id":"unshortener","key":"unshortener","value":{"rev":"15-0851cb8bc3c378c37a3df9760067a109"}}, +{"id":"unused","key":"unused","value":{"rev":"3-362e713349c4a5541564fa2de33d01ba"}}, +{"id":"upload","key":"upload","value":{"rev":"3-63aedcfb335754c3bca1675c4add51c4"}}, +{"id":"ups_node","key":"ups_node","value":{"rev":"15-fa6d0be3831ee09420fb703c4d508534"}}, +{"id":"upy","key":"upy","value":{"rev":"5-dab63054d02be71f9c2709659974a5e1"}}, +{"id":"uri","key":"uri","value":{"rev":"3-5baaa12433cff7539b1d39c0c7f62853"}}, +{"id":"uri-parser","key":"uri-parser","value":{"rev":"3-d7e81b08e8b3f6f5ac8c6b4220228529"}}, +{"id":"url","key":"url","value":{"rev":"3-0dfd5ec2904cb1f645fa7449dbb0ce52"}}, +{"id":"url-expander","key":"url-expander","value":{"rev":"21-73bf9fa3c98b15d5ef0ed9815d862953"}}, +{"id":"urllib","key":"urllib","value":{"rev":"5-b015944526c15589a1504d398dcb598a"}}, +{"id":"urn-parser","key":"urn-parser","value":{"rev":"3-08a35a166790ecf88729befd4ebc7bf1"}}, +{"id":"useless","key":"useless","value":{"rev":"3-9d7b7ab9d4811847ed6e99ce2226d687"}}, +{"id":"user-agent","key":"user-agent","value":{"rev":"16-ac00f085795346421242e3d4d75523ad"}}, +{"id":"useragent","key":"useragent","value":{"rev":"7-3184d8aba5540e6596da9e3635ee3c24"}}, +{"id":"useragent_parser","key":"useragent_parser","value":{"rev":"3-730427aba3f0825fd28850e96b1613d4"}}, +{"id":"utf7","key":"utf7","value":{"rev":"3-ad56e4c9ac5a509ff568a3cdf0ed074f"}}, +{"id":"utf8","key":"utf8","value":{"rev":"3-c530cad759dd6e4e471338a71a307434"}}, +{"id":"util","key":"util","value":{"rev":"3-0e55e3466bc3ea6aeda6384639e842c3"}}, +{"id":"utility-belt","key":"utility-belt","value":{"rev":"3-8de401b41ef742b3c0a144b99099771f"}}, +{"id":"utml","key":"utml","value":{"rev":"5-5f0f3de6f787056bd124ca98716fbc19"}}, +{"id":"uubench","key":"uubench","value":{"rev":"6-b6cb0756e35ce998b61bb9a6ea0f5732"}}, +{"id":"uuid","key":"uuid","value":{"rev":"13-3f014b236668ec5eb49d0a17ad54d397"}}, +{"id":"uuid-lib","key":"uuid-lib","value":{"rev":"3-3de40495439e240b5a41875c19c65b1a"}}, +{"id":"uuid-pure","key":"uuid-pure","value":{"rev":"19-b94e9f434901fe0a0bbfdfa06f785874"}}, +{"id":"uuid.js","key":"uuid.js","value":{"rev":"8-3232a97c9f4a2b601d207488350df01b"}}, +{"id":"v8-profiler","key":"v8-profiler","value":{"rev":"12-790c90391bcbec136e316e57b30a845c"}}, +{"id":"valentine","key":"valentine","value":{"rev":"35-dd4b0642aacaf833e1119fc42bb6e9df"}}, +{"id":"validate-json","key":"validate-json","value":{"rev":"5-6a71fb36b102b3a4c5f6cc35012518b3"}}, +{"id":"validations","key":"validations","value":{"rev":"5-7272c97d35e3269813d91f1ea06e7217"}}, +{"id":"validator","key":"validator","value":{"rev":"45-9983ff692c291143ba670b613e07ddab"}}, +{"id":"vanilla","key":"vanilla","value":{"rev":"3-2e1d05af0873386b7cd6d432f1e76217"}}, +{"id":"vapor","key":"vapor","value":{"rev":"1-e1f86f03c94a4b90bca347408dbc56ff"}}, +{"id":"vargs","key":"vargs","value":{"rev":"6-9e389cfd648034dd469348112eedb23b"}}, +{"id":"vash","key":"vash","value":{"rev":"9-85ade8b7249a0e8230e8f0aaf1c34e2a"}}, +{"id":"vbench","key":"vbench","value":{"rev":"3-059528251a566c6ac363e236212448ce"}}, +{"id":"vendor.js","key":"vendor.js","value":{"rev":"5-264b0f8a771cad113be6919b6004ff95"}}, +{"id":"ventstatus","key":"ventstatus","value":{"rev":"3-16aa39e22b149b23b64317991415f92c"}}, +{"id":"version-compare","key":"version-compare","value":{"rev":"3-a8d6eea31572fe973ddd98c0a8097bc6"}}, +{"id":"vertica","key":"vertica","value":{"rev":"37-035d50183c3ad3056db0d7a13c20005d"}}, +{"id":"vhost","key":"vhost","value":{"rev":"9-53bbdba14dae631a49e782d169e4fc5a"}}, +{"id":"vice","key":"vice","value":{"rev":"5-0f74600349f4540b1b104d4ebfec1309"}}, +{"id":"video","key":"video","value":{"rev":"10-65c0b603047188fe2b07cbd2e1c93fe7"}}, +{"id":"vie","key":"vie","value":{"rev":"5-94e23770c5a0510480a0bae07d846ebc"}}, +{"id":"view","key":"view","value":{"rev":"21-a2abdfc54ab732a906347090c68564a5"}}, +{"id":"vigilante","key":"vigilante","value":{"rev":"30-951541a8b2fc2364bb1ccd7cfae56482"}}, +{"id":"villain","key":"villain","value":{"rev":"10-8dbfc5db42230d8813e6cc61af14d575"}}, +{"id":"vine","key":"vine","value":{"rev":"17-e7ac5d190cacf0f2d17d27e37b2b9f5f"}}, +{"id":"vipe","key":"vipe","value":{"rev":"3-78996531221e08292b9ca3de6e19d578"}}, +{"id":"viralheat","key":"viralheat","value":{"rev":"3-b928ce797fd5955c766b6b7e9e9c8f54"}}, +{"id":"viralheat-sentiment","key":"viralheat-sentiment","value":{"rev":"3-5d083e0d141ecf36e06c7c2885b01b5c"}}, +{"id":"virustotal.js","key":"virustotal.js","value":{"rev":"3-074be49f7e877b154a2144ef844f78e9"}}, +{"id":"vk","key":"vk","value":{"rev":"9-48f53ea9ebe68c9d3af45eb601c71006"}}, +{"id":"vmcjs","key":"vmcjs","value":{"rev":"5-44d8dd906fa3530d2bfc2dfee7f498d4"}}, +{"id":"vogue","key":"vogue","value":{"rev":"38-891354d18638a26d5b5ba95933faae0e"}}, +{"id":"vogue-dtrejo","key":"vogue-dtrejo","value":{"rev":"3-3ef8d57d3b5c0aca297fe38c9040954f"}}, +{"id":"votizen-logger","key":"votizen-logger","value":{"rev":"4-ba0837a28693aba346fab885a3a8f315"}}, +{"id":"vows","key":"vows","value":{"rev":"80-43d6a81c184c06d73e692358e913821e"}}, +{"id":"vows-bdd","key":"vows-bdd","value":{"rev":"3-dc2a7013dd94b0b65a3ed3a8b69b680e"}}, +{"id":"vows-ext","key":"vows-ext","value":{"rev":"49-079067a01a681ca7df4dfaae74adb3fb"}}, +{"id":"vows-fluent","key":"vows-fluent","value":{"rev":"23-67625a035cedf90c8fed73722465ecea"}}, +{"id":"vows-is","key":"vows-is","value":{"rev":"68-45a13df422d08ab00cc8f785b6411741"}}, +{"id":"voyeur","key":"voyeur","value":{"rev":"5-56fe23f95df6ff648b67f1a9baf10d41"}}, +{"id":"vws.pubsub","key":"vws.pubsub","value":{"rev":"5-609497d66ab6a76c5201904e41b95715"}}, +{"id":"wabtools","key":"wabtools","value":{"rev":"7-b24cd7262720a29f59da103b7110325d"}}, +{"id":"wadey-ranger","key":"wadey-ranger","value":{"rev":"17-a0541bad0880ffc199e8b2ef4c80ddb8"}}, +{"id":"wagner","key":"wagner","value":{"rev":"3-4b76219928f409b7124e02c0518d6cb6"}}, +{"id":"wait","key":"wait","value":{"rev":"3-7f8a5f9c8e86da4f219353ae778868a9"}}, +{"id":"waiter","key":"waiter","value":{"rev":"5-680176b06719c9a8499725b0a617cdc9"}}, +{"id":"waitlist","key":"waitlist","value":{"rev":"17-f3b2a4cf58b940c3839debda23c12b8e"}}, +{"id":"wake_on_lan","key":"wake_on_lan","value":{"rev":"6-1295bb5c618495b74626aaaa1c644d32"}}, +{"id":"walk","key":"walk","value":{"rev":"22-c05e1e1252a59b1048a0b6464631d08b"}}, +{"id":"walker","key":"walker","value":{"rev":"18-e8a20efc286234fb20789dc68cd04cd1"}}, +{"id":"warp","key":"warp","value":{"rev":"19-c7f17d40291984cd27f1d57fe764a5d2"}}, +{"id":"watch","key":"watch","value":{"rev":"18-3bc43d36ea1dbf69b93d4ea3d9534d44"}}, +{"id":"watch-less","key":"watch-less","value":{"rev":"5-f69a778ee58c681ad3b24a766576c016"}}, +{"id":"watch-tree","key":"watch-tree","value":{"rev":"5-316b60e474c3ae6e97f7cdb06b65af78"}}, +{"id":"watch.js","key":"watch.js","value":{"rev":"11-8c02c7429f90ca5e756a131d85bd5a32"}}, +{"id":"watch_dir","key":"watch_dir","value":{"rev":"5-df0a592508e1e13f5d24c2863733a8b9"}}, +{"id":"watchable","key":"watchable","value":{"rev":"3-f8694ff0c3add9a1310f0980e24ea23b"}}, +{"id":"watchersto","key":"watchersto","value":{"rev":"5-06665e682f58f61831d41d08b4ea12e7"}}, +{"id":"watchman","key":"watchman","value":{"rev":"11-956ad2175d0c5b52e82988a697474244"}}, +{"id":"watchn","key":"watchn","value":{"rev":"15-9685afa8b501f8cd7e068beed1264cfe"}}, +{"id":"wave","key":"wave","value":{"rev":"7-d13054ac592b3b4f81147b6bc7a91ea1"}}, +{"id":"wax","key":"wax","value":{"rev":"71-2e8877b0b6df27c1375dcd7f6bbdb4b7"}}, +{"id":"waz-storage-js","key":"waz-storage-js","value":{"rev":"15-1aaa07353c3d25f5794fa004a23c4dfa"}}, +{"id":"wd","key":"wd","value":{"rev":"19-20c4ee8b83057ece691f9669e288059e"}}, +{"id":"weak","key":"weak","value":{"rev":"3-b774b8be74f33c843df631aa07854104"}}, +{"id":"web","key":"web","value":{"rev":"3-c571dee306020f6f92c7a3150e8023b1"}}, +{"id":"webapp","key":"webapp","value":{"rev":"5-60525be5734cf1d02a77508e5f46bafa"}}, +{"id":"webfonts","key":"webfonts","value":{"rev":"5-d7be242801702fd1eb728385b8982107"}}, +{"id":"webgenjs","key":"webgenjs","value":{"rev":"3-ac6be47eedcbb2561babdb9495d60f29"}}, +{"id":"webgl","key":"webgl","value":{"rev":"18-21cd40f6c7e4943a2d858ed813d3c45d"}}, +{"id":"webhookit-comment","key":"webhookit-comment","value":{"rev":"5-1fbed3d75bf485433bdcac4fac625eab"}}, +{"id":"webhookit-ejs","key":"webhookit-ejs","value":{"rev":"5-9b76f543e9c0941d0245cb3bfd2cc64e"}}, +{"id":"webhookit-email","key":"webhookit-email","value":{"rev":"5-d472fde4f101d55d029a29777bbdb952"}}, +{"id":"webhookit-http","key":"webhookit-http","value":{"rev":"13-9f6f05cdb03f45a2227b9cd820565e63"}}, +{"id":"webhookit-jsonparse","key":"webhookit-jsonparse","value":{"rev":"3-6d49bf8a9849130d9bbc5b0d6fb0bf67"}}, +{"id":"webhookit-jsonpath","key":"webhookit-jsonpath","value":{"rev":"5-7acaf50267274584dca1cc5c1e77ce2e"}}, +{"id":"webhookit-objectbuilder","key":"webhookit-objectbuilder","value":{"rev":"5-e63fb26621929f3ab8d8519556116b30"}}, +{"id":"webhookit-soupselect","key":"webhookit-soupselect","value":{"rev":"9-726f2f4794437632032058bc81e6ee5d"}}, +{"id":"webhookit-xml2js","key":"webhookit-xml2js","value":{"rev":"3-ec959e474ecb3a163f2991767594a60e"}}, +{"id":"webhookit-yql","key":"webhookit-yql","value":{"rev":"9-c6ae87a8cc55d33901485ee7c3895ef8"}}, +{"id":"webify","key":"webify","value":{"rev":"3-86810874abf2274d1387ee748987b627"}}, +{"id":"webjs","key":"webjs","value":{"rev":"103-593a1e4e69d8db6284ecf4fce01b4668"}}, +{"id":"webmake","key":"webmake","value":{"rev":"13-f6588093a487212a151d1c00c26de7b4"}}, +{"id":"webmetrics","key":"webmetrics","value":{"rev":"3-44a428fd2ecb1b1bf50c33157750dd16"}}, +{"id":"webrepl","key":"webrepl","value":{"rev":"21-d6dcdbb59186092d9a0f1977c69394a5"}}, +{"id":"webservice","key":"webservice","value":{"rev":"18-05038f1cf997cff1ed81e783485680aa"}}, +{"id":"webshell","key":"webshell","value":{"rev":"3-05c431cf961a9dbaee1dfd95237e189a"}}, +{"id":"websocket","key":"websocket","value":{"rev":"33-7c20d55a88f187d7b398525824159f67"}}, +{"id":"websocket-client","key":"websocket-client","value":{"rev":"12-26a3530b9e6d465f472c791db01c9fc3"}}, +{"id":"websocket-protocol","key":"websocket-protocol","value":{"rev":"3-e52a8496f70686c289087149aee8b359"}}, +{"id":"websocket-server","key":"websocket-server","value":{"rev":"46-9f69e2f9408eb196b3a1aa990e5b5ac2"}}, +{"id":"websockets","key":"websockets","value":{"rev":"3-5535fcb4ae144909f021ee067eec7b2a"}}, +{"id":"webworker","key":"webworker","value":{"rev":"16-f7a4c758b176c6e464c93b6a9f79283b"}}, +{"id":"weibo","key":"weibo","value":{"rev":"21-8a50310389b2f43d8a7cb14e138eb122"}}, +{"id":"weld","key":"weld","value":{"rev":"7-16601ac41d79b3a01e4d2615035376ed"}}, +{"id":"whatlang","key":"whatlang","value":{"rev":"5-f7b10a0f8c3b6579c81d1d1222aeccd7"}}, +{"id":"wheat","key":"wheat","value":{"rev":"16-f6a97282f521edb7f2b0e5edc9577ce0"}}, +{"id":"which","key":"which","value":{"rev":"7-e5fdcb208715f2201d3911caf8a67042"}}, +{"id":"whiskers","key":"whiskers","value":{"rev":"9-2cfd73cebeaf8ce3cb1591e825380621"}}, +{"id":"whiskey","key":"whiskey","value":{"rev":"49-55367718b9067ff2bcb7fbb89327587b"}}, +{"id":"whisperjs","key":"whisperjs","value":{"rev":"19-e2182c72ea24b8c40e12b0c1027eb60d"}}, +{"id":"wikimapia","key":"wikimapia","value":{"rev":"11-8d1a314e8c827236e21e0aabc6e5efd9"}}, +{"id":"wikiminute","key":"wikiminute","value":{"rev":"11-d031a2c7d41bcecb52ac9c7bb5e75e8e"}}, +{"id":"wikiwym","key":"wikiwym","value":{"rev":"3-c0fd4c9b6b93b3a8b14021c2ebae5b0c"}}, +{"id":"wiky","key":"wiky","value":{"rev":"6-be49acce152652e9219a32da1dfd01ea"}}, +{"id":"wildfile","key":"wildfile","value":{"rev":"9-16a05032f890f07c72a5f48c3a6ffbc0"}}, +{"id":"willful.js","key":"willful.js","value":{"rev":"3-3bb957b0a5fc1b4b6c15bace7e8f5902"}}, +{"id":"wilson","key":"wilson","value":{"rev":"14-d4bf88484f1b1cf86b07f4b74f26991d"}}, +{"id":"window","key":"window","value":{"rev":"3-ea84e74fd5556ff662ff47f40522cfa2"}}, +{"id":"windshaft","key":"windshaft","value":{"rev":"21-1d31e4eb7482d15b97c919a4b051ea9c"}}, +{"id":"windtunnel","key":"windtunnel","value":{"rev":"5-0d2ef7faed1b221a3eaa581480adad64"}}, +{"id":"wingrr","key":"wingrr","value":{"rev":"9-a599fad3e0c74895aa266c61805b76cb"}}, +{"id":"wings","key":"wings","value":{"rev":"3-cfcfd262d905cd3be1d1bae82fafd9f0"}}, +{"id":"winston","key":"winston","value":{"rev":"111-13acba5a9ba6d4f19469acb4122d72ea"}}, +{"id":"winston-amqp","key":"winston-amqp","value":{"rev":"5-61408e1dde45f974a995dd27905b8831"}}, +{"id":"winston-mongodb","key":"winston-mongodb","value":{"rev":"9-ae755237a8faa8f5a0b92029c236691a"}}, +{"id":"winston-redis","key":"winston-redis","value":{"rev":"3-1fb861edc109ed5cbd735320124ba103"}}, +{"id":"winston-riak","key":"winston-riak","value":{"rev":"15-3f2923a73386524d851244ace1bece98"}}, +{"id":"winston-syslog","key":"winston-syslog","value":{"rev":"9-7f256bd63aebec19edea47f80de21dfd"}}, +{"id":"winstoon","key":"winstoon","value":{"rev":"9-d719ca7abfeeaa468d1b431c24836089"}}, +{"id":"wirez","key":"wirez","value":{"rev":"5-5c5d0768485ed11c2b80a8a6a3699c39"}}, +{"id":"wobot","key":"wobot","value":{"rev":"9-176ed86fd9d94a7e94efb782c7512533"}}, +{"id":"word-generator","key":"word-generator","value":{"rev":"5-a2c67f11474a8925eb67f04369ac068a"}}, +{"id":"wordnik","key":"wordnik","value":{"rev":"3-4e371fbf7063ced50bbe726079fda1ec"}}, +{"id":"wordpress-auth","key":"wordpress-auth","value":{"rev":"5-05eef01542e00a88418d2885efb4c9ad"}}, +{"id":"wordwrap","key":"wordwrap","value":{"rev":"5-a728ce2cdeab69b71d40fe7c1c41d7c1"}}, +{"id":"wordy","key":"wordy","value":{"rev":"3-bc220ca3dbd008aee932c551cfbdcc6b"}}, +{"id":"worker","key":"worker","value":{"rev":"6-3b03aa764c9fac66ec5c1773e9abc43b"}}, +{"id":"worker-pool","key":"worker-pool","value":{"rev":"3-e3550e704b48f5799a4cc02af7d27355"}}, +{"id":"workflow","key":"workflow","value":{"rev":"3-817c6c77cbb2f332ea9bdddf3b565c00"}}, +{"id":"workhorse","key":"workhorse","value":{"rev":"30-c39ae2ddd867a137073a289c1709f229"}}, +{"id":"world-db","key":"world-db","value":{"rev":"6-eaef1beb6abbebd3e903a28a7f46aa81"}}, +{"id":"worm","key":"worm","value":{"rev":"7-00db15dc9cfd48777cce32fb93e1df6b"}}, +{"id":"wormhole","key":"wormhole","value":{"rev":"37-21e2db062666040c477a7042fc2ffc9d"}}, +{"id":"wrap","key":"wrap","value":{"rev":"3-aded14c091b730813bd24d92cae45cd6"}}, +{"id":"wrench","key":"wrench","value":{"rev":"12-57d3da63e34e59e1f5d1b3bde471e31f"}}, +{"id":"wsclient","key":"wsclient","value":{"rev":"17-f962faf4f6c9d4eda9111e90b2d0735d"}}, +{"id":"wscomm","key":"wscomm","value":{"rev":"47-80affda45da523e57c87b8d43ef73ec9"}}, +{"id":"wsscraper","key":"wsscraper","value":{"rev":"3-94a84fe9b3df46b8d6ad4851e389dae1"}}, +{"id":"wu","key":"wu","value":{"rev":"4-f307d3a00e7a1212b7949bcb96161088"}}, +{"id":"wunderapi","key":"wunderapi","value":{"rev":"17-31e3b991e97931022992b97f9441b9af"}}, +{"id":"wurfl-client","key":"wurfl-client","value":{"rev":"3-a8c3e454d6d9c9b23b7290eb64866e80"}}, +{"id":"wwwdude","key":"wwwdude","value":{"rev":"19-eb8192461b8864af59740f9b44e168ca"}}, +{"id":"x","key":"x","value":{"rev":"9-10403358980aba239b7a9af78175589d"}}, +{"id":"x-core","key":"x-core","value":{"rev":"13-f04b063855da231539d1945a35802d9e"}}, +{"id":"x11","key":"x11","value":{"rev":"5-e5b1435c0aa29207c90fdeaa87570bb7"}}, +{"id":"xappy-async_testing","key":"xappy-async_testing","value":{"rev":"3-747c934540267492b0e6d3bb6d65964c"}}, +{"id":"xappy-pg","key":"xappy-pg","value":{"rev":"4-119e8f93af1e4976900441ec5e3bb0b9"}}, +{"id":"xcbjs","key":"xcbjs","value":{"rev":"3-095a693f9ac7b4e2c319f79d95eb3e95"}}, +{"id":"xemplar","key":"xemplar","value":{"rev":"9-2ccde68ffac8e66aa8013b98d82ff20c"}}, +{"id":"xfer","key":"xfer","value":{"rev":"3-c1875506ed132c6a2b5e7d7eaff9df14"}}, +{"id":"xjs","key":"xjs","value":{"rev":"11-05d5cd002298894ed582a9f5bff5a762"}}, +{"id":"xjst","key":"xjst","value":{"rev":"11-68774970fc7f413ff620fb0d50d8a1d9"}}, +{"id":"xkcdbot","key":"xkcdbot","value":{"rev":"3-7cc9affb442c9ae4c7a109a0b72c2600"}}, +{"id":"xml","key":"xml","value":{"rev":"12-0d1a69f11767de47bfc4a0fce566e36e"}}, +{"id":"xml-markup","key":"xml-markup","value":{"rev":"6-100a92d1f7fe9444e285365dce8203de"}}, +{"id":"xml-simple","key":"xml-simple","value":{"rev":"3-d60e388df5b65128a5e000381643dd31"}}, +{"id":"xml-stream","key":"xml-stream","value":{"rev":"13-44d6ee47e00c91735e908e69c5dffc6b"}}, +{"id":"xml2js","key":"xml2js","value":{"rev":"27-434297bcd9db7628c57fcc9bbbe2671e"}}, +{"id":"xml2js-expat","key":"xml2js-expat","value":{"rev":"15-a8c5c0ba64584d07ed94c0a14dc55fe8"}}, +{"id":"xml2json","key":"xml2json","value":{"rev":"17-fa740417285834be1aa4d95e1ed6d9b9"}}, +{"id":"xmlbuilder","key":"xmlbuilder","value":{"rev":"32-63e3be32dda07c6e998866cddd8a879e"}}, +{"id":"xmlhttprequest","key":"xmlhttprequest","value":{"rev":"9-570fba8bfd5b0958c258cee7309c4b54"}}, +{"id":"xmlrpc","key":"xmlrpc","value":{"rev":"15-ae062e34a965e7543d4fd7b6c3f29cb7"}}, +{"id":"xmpp-client","key":"xmpp-client","value":{"rev":"6-2d123b4666b5deda71f071295cfca793"}}, +{"id":"xmpp-muc","key":"xmpp-muc","value":{"rev":"6-d95b8bca67f406a281a27aa4d89f6f46"}}, +{"id":"xmpp-server","key":"xmpp-server","value":{"rev":"9-44374bc3398cc74f2a36ff973fa0d35f"}}, +{"id":"xp","key":"xp","value":{"rev":"7-781a5e1da74332f25c441f627cd0b4ea"}}, +{"id":"xregexp","key":"xregexp","value":{"rev":"3-c34025fdeb13c18389e737a4b3d4ddf7"}}, +{"id":"xsd","key":"xsd","value":{"rev":"5-566590ccb8923453175a3f1f3b6cbf24"}}, +{"id":"ya-csv","key":"ya-csv","value":{"rev":"28-d485b812914b3c3f5d7e9c4bcee0c3ea"}}, +{"id":"yabble","key":"yabble","value":{"rev":"5-5370a53003a122fe40a16ed2b0e5cead"}}, +{"id":"yaconfig","key":"yaconfig","value":{"rev":"3-f82a452260b010cc5128818741c46017"}}, +{"id":"yah","key":"yah","value":{"rev":"3-cfc0c10f85a9e3076247ca350077e90f"}}, +{"id":"yajet","key":"yajet","value":{"rev":"5-6f7f24335436c84081adf0bbb020b151"}}, +{"id":"yajl","key":"yajl","value":{"rev":"3-8ac011e5a00368aad8d58d95a64c7254"}}, +{"id":"yaml","key":"yaml","value":{"rev":"16-732e5cb6dc10eefeb7dae959e677fb5b"}}, +{"id":"yaml-config","key":"yaml-config","value":{"rev":"3-fb817000005d48526a106ecda5ac5435"}}, +{"id":"yamlish","key":"yamlish","value":{"rev":"3-604fb4f1de9d5aa5ed48432c7db4a8a1"}}, +{"id":"yamlparser","key":"yamlparser","value":{"rev":"13-130a82262c7f742c2a1e26fc58983503"}}, +{"id":"yammer-js","key":"yammer-js","value":{"rev":"3-16ec240ab0b26fa9f0513ada8c769c1f"}}, +{"id":"yanc","key":"yanc","value":{"rev":"15-33d713f0dee42efe8306e6b2a43fe336"}}, +{"id":"yanlibs","key":"yanlibs","value":{"rev":"3-e481217d43b9f79b80e22538eabadabc"}}, +{"id":"yanop","key":"yanop","value":{"rev":"5-6c407ce6f1c18b6bac37ad5945ff8fed"}}, +{"id":"yanx","key":"yanx","value":{"rev":"6-f4c4d255526eaa922baa498f37d38fe0"}}, +{"id":"yasession","key":"yasession","value":{"rev":"7-6e2598123d41b33535b88e99eb87828f"}}, +{"id":"yelp","key":"yelp","value":{"rev":"3-5c769f488a65addba313ff3b6256c365"}}, +{"id":"yeti","key":"yeti","value":{"rev":"50-65338f573ed8f799ec9b1c9bd2643e34"}}, +{"id":"youtube","key":"youtube","value":{"rev":"7-5020698499af8946e9578864a21f6ac5"}}, +{"id":"youtube-dl","key":"youtube-dl","value":{"rev":"76-a42f09b7bf87e7e6157d5d9835cca8a7"}}, +{"id":"youtube-js","key":"youtube-js","value":{"rev":"5-e2d798a185490ad98cb57c2641c4658e"}}, +{"id":"yproject","key":"yproject","value":{"rev":"7-70cb1624de9e8321c67f1f348dc80ff4"}}, +{"id":"yql","key":"yql","value":{"rev":"18-d19123b254abfb097648c4a242513fd3"}}, +{"id":"yubico","key":"yubico","value":{"rev":"9-0e2bd84479a68e1f12c89800a4049053"}}, +{"id":"yui-cli","key":"yui-cli","value":{"rev":"7-0186f7278da8734861109799b9123197"}}, +{"id":"yui-compressor","key":"yui-compressor","value":{"rev":"12-5804d78bb24bb2d3555ca2e28ecc6b70"}}, +{"id":"yui-repl","key":"yui-repl","value":{"rev":"25-9b202e835a46a07be931e6529a4ccb61"}}, +{"id":"yui3","key":"yui3","value":{"rev":"93-4decc441f19acf0ab5abd1a81e3cbb40"}}, +{"id":"yui3-2in3","key":"yui3-2in3","value":{"rev":"10-dc0429fe818aceeca80d075613c9547a"}}, +{"id":"yui3-bare","key":"yui3-bare","value":{"rev":"33-60779e2088efe782b437ecc053c01e2f"}}, +{"id":"yui3-base","key":"yui3-base","value":{"rev":"33-89017bb5dfde621fc7d179f2939e3d1b"}}, +{"id":"yui3-core","key":"yui3-core","value":{"rev":"17-3759fa0072e24f4bb29e22144cb3dda3"}}, +{"id":"yui3-gallery","key":"yui3-gallery","value":{"rev":"38-9ce6f7a60b2f815337767249d1827951"}}, +{"id":"yui3-mocha","key":"yui3-mocha","value":{"rev":"3-83ff9c42a37f63de0c132ce6cb1ad282"}}, +{"id":"yuitest","key":"yuitest","value":{"rev":"17-b5dd4ad4e82b6b310d7a6e9103570779"}}, +{"id":"zap","key":"zap","value":{"rev":"15-9b9b7c6badb0a9fd9d469934e9be12c0"}}, +{"id":"zappa","key":"zappa","value":{"rev":"26-d193767b488e778db41455924001b1fb"}}, +{"id":"zen","key":"zen","value":{"rev":"7-23a260d4379816a5c931c2e823bda1ae"}}, +{"id":"zeppelin","key":"zeppelin","value":{"rev":"7-9db2e313fe323749e259be91edcdee8e"}}, +{"id":"zeromq","key":"zeromq","value":{"rev":"24-7cb4cec19fb3a03871900ac3558fcbef"}}, +{"id":"zest","key":"zest","value":{"rev":"5-080a2a69a93d66fcaae0da7ddaa9ceab"}}, +{"id":"zest-js","key":"zest-js","value":{"rev":"5-541454063618fa3a9d6f44e0147ea622"}}, +{"id":"zip","key":"zip","value":{"rev":"11-443da314322b6a1a93b40a38124610f2"}}, +{"id":"zipfile","key":"zipfile","value":{"rev":"32-e846d29fc615e8fbc610f44653a1e085"}}, +{"id":"zipper","key":"zipper","value":{"rev":"5-cde0a4a7f03c139dcd779f3ede55bd0e"}}, +{"id":"zippy","key":"zippy","value":{"rev":"7-3906ca62dd8020e9673a7c229944bd3f"}}, +{"id":"zipwith","key":"zipwith","value":{"rev":"3-58c50c6220d6493047f8333c5db22cc9"}}, +{"id":"zlib","key":"zlib","value":{"rev":"27-e0443f2d9a0c9db31f86a6c5b9ba78ba"}}, +{"id":"zlib-sync","key":"zlib-sync","value":{"rev":"3-b17a39dd23b3455d35ffd862004ed677"}}, +{"id":"zlibcontext","key":"zlibcontext","value":{"rev":"11-1c0c6b34e87adab1b6d5ee60be6a608c"}}, +{"id":"zlibstream","key":"zlibstream","value":{"rev":"5-44e30d87de9aaaa975c64d8dcdcd1a94"}}, +{"id":"zmq","key":"zmq","value":{"rev":"7-eae5d939fcdb7be5edfb328aefeaba4e"}}, +{"id":"zo","key":"zo","value":{"rev":"5-956f084373731805e5871f4716049529"}}, +{"id":"zombie","key":"zombie","value":{"rev":"109-9eec325353a47bfcc32a94719bf147da"}}, +{"id":"zombie-https","key":"zombie-https","value":{"rev":"3-6aff25d319be319343882575acef4890"}}, +{"id":"zoneinfo","key":"zoneinfo","value":{"rev":"15-d95d2041324d961fe26a0217cf485511"}}, +{"id":"zookeeper","key":"zookeeper","value":{"rev":"11-5a5ed278a01e4b508ffa6e9a02059898"}}, +{"id":"zoom","key":"zoom","value":{"rev":"3-9d0277ad580d64c9a4d48a40d22976f0"}}, +{"id":"zsock","key":"zsock","value":{"rev":"16-4f975b91f0f9c2d2a2501e362401c368"}}, +{"id":"zutil","key":"zutil","value":{"rev":"9-3e7bc6520008b4fcd5ee6eb9e8e5adf5"}} +]} diff --git a/pitfall/pdfkit/node_modules/JSONStream/test/fixtures/depth.json b/pitfall/pdfkit/node_modules/JSONStream/test/fixtures/depth.json new file mode 100644 index 00000000..868062f3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/JSONStream/test/fixtures/depth.json @@ -0,0 +1,15 @@ +{ + "total": 5, + "docs": [ + { + "key": { + "value": 0, + "some": "property" + } + }, + {"value": 1}, + {"value": 2}, + {"blbl": [{}, {"a":0, "b":1, "value":3}, 10]}, + {"value": 4} + ] +} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/JSONStream/test/fn.js b/pitfall/pdfkit/node_modules/JSONStream/test/fn.js new file mode 100644 index 00000000..4acc6726 --- /dev/null +++ b/pitfall/pdfkit/node_modules/JSONStream/test/fn.js @@ -0,0 +1,39 @@ + + +var fs = require ('fs') + , join = require('path').join + , file = join(__dirname, 'fixtures','all_npm.json') + , JSONStream = require('../') + , it = require('it-is') + +function fn (s) { + return !isNaN(parseInt(s, 10)) +} + +var expected = JSON.parse(fs.readFileSync(file)) + , parser = JSONStream.parse(['rows', fn]) + , called = 0 + , ended = false + , parsed = [] + +fs.createReadStream(file).pipe(parser) + +parser.on('data', function (data) { + called ++ + it.has({ + id: it.typeof('string'), + value: {rev: it.typeof('string')}, + key:it.typeof('string') + }) + parsed.push(data) +}) + +parser.on('end', function () { + ended = true +}) + +process.on('exit', function () { + it(called).equal(expected.rows.length) + it(parsed).deepEqual(expected.rows) + console.error('PASSED') +}) diff --git a/pitfall/pdfkit/node_modules/JSONStream/test/gen.js b/pitfall/pdfkit/node_modules/JSONStream/test/gen.js new file mode 100644 index 00000000..c233722a --- /dev/null +++ b/pitfall/pdfkit/node_modules/JSONStream/test/gen.js @@ -0,0 +1,135 @@ +return // dont run this test for now since tape is weird and broken on 0.10 + +var fs = require('fs') +var JSONStream = require('../') +var file = process.argv[2] || '/tmp/JSONStream-test-large.json' +var size = Number(process.argv[3] || 100000) +var tape = require('tape') +// if (process.title !== 'browser') { + tape('out of mem', function (t) { + t.plan(1) + ////////////////////////////////////////////////////// + // Produces a random number between arg1 and arg2 + ////////////////////////////////////////////////////// + var randomNumber = function (min, max) { + var number = Math.floor(Math.random() * (max - min + 1) + min); + return number; + }; + + ////////////////////////////////////////////////////// + // Produces a random string of a length between arg1 and arg2 + ////////////////////////////////////////////////////// + var randomString = function (min, max) { + + // add several spaces to increase chanses of creating 'words' + var chars = ' 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; + var result = ''; + + var randomLength = randomNumber(min, max); + + for (var i = randomLength; i > 0; --i) { + result += chars[Math.round(Math.random() * (chars.length - 1))]; + } + return result; + }; + + ////////////////////////////////////////////////////// + // Produces a random JSON document, as a string + ////////////////////////////////////////////////////// + var randomJsonDoc = function () { + + var doc = { + "CrashOccurenceID": randomNumber(10000, 50000), + "CrashID": randomNumber(1000, 10000), + "SiteName": randomString(10, 25), + "MachineName": randomString(10, 25), + "Date": randomString(26, 26), + "ProcessDuration": randomString(18, 18), + "ThreadIdentityName": null, + "WindowsIdentityName": randomString(15, 40), + "OperatingSystemName": randomString(35, 65), + "DetailedExceptionInformation": randomString(100, 800) + }; + + doc = JSON.stringify(doc); + doc = doc.replace(/\,/g, ',\n'); // add new lines after each attribute + return doc; + }; + + ////////////////////////////////////////////////////// + // generates test data + ////////////////////////////////////////////////////// + var generateTestData = function (cb) { + + console.log('generating large data file...'); + + var stream = fs.createWriteStream(file, { + encoding: 'utf8' + }); + + var i = 0; + var max = size; + var writing = false + var split = ',\n'; + var doc = randomJsonDoc(); + stream.write('['); + + function write () { + if(writing) return + writing = true + while(++i < max) { + if(Math.random() < 0.001) + console.log('generate..', i + ' / ' + size) + if(!stream.write(doc + split)) { + writing = false + return stream.once('drain', write) + } + } + stream.write(doc + ']') + stream.end(); + console.log('END') + } + write() + stream.on('close', cb) + }; + + ////////////////////////////////////////////////////// + // Shows that parsing 100000 instances using JSONStream fails + // + // After several seconds, you will get this crash + // FATAL ERROR: JS Allocation failed - process out of memory + ////////////////////////////////////////////////////// + var testJSONStreamParse_causesOutOfMem = function (done) { + var items = 0 + console.log('parsing data files using JSONStream...'); + + var parser = JSONStream.parse([true]); + var stream = fs.createReadStream(file); + stream.pipe(parser); + + parser.on('data', function (data) { + items++ + if(Math.random() < 0.01) console.log(items, '...') + }); + + parser.on('end', function () { + t.equal(items, size) + }); + + }; + + ////////////////////////////////////////////////////// + // main + ////////////////////////////////////////////////////// + + fs.stat(file, function (err, stat) { + console.log(stat) + if(err) + generateTestData(testJSONStreamParse_causesOutOfMem); + else + testJSONStreamParse_causesOutOfMem() + }) + + }) + +// } diff --git a/pitfall/pdfkit/node_modules/JSONStream/test/multiple_objects.js b/pitfall/pdfkit/node_modules/JSONStream/test/multiple_objects.js new file mode 100644 index 00000000..b1c8f91b --- /dev/null +++ b/pitfall/pdfkit/node_modules/JSONStream/test/multiple_objects.js @@ -0,0 +1,42 @@ +var fs = require ('fs'); +var net = require('net'); +var join = require('path').join; +var file = join(__dirname, 'fixtures','all_npm.json'); +var it = require('it-is'); +var JSONStream = require('../'); + +var str = fs.readFileSync(file); + +var datas = {} + +var server = net.createServer(function(client) { + var root_calls = 0; + var data_calls = 0; + var parser = JSONStream.parse(['rows', true, 'key']); + parser.on('root', function(root, count) { + ++ root_calls; + }); + + parser.on('data', function(data) { + ++ data_calls; + datas[data] = (datas[data] || 0) + 1 + it(data).typeof('string') + }); + + parser.on('end', function() { + console.log('END') + var min = Infinity + for (var d in datas) + min = min > datas[d] ? datas[d] : min + it(root_calls).equal(3); + it(min).equal(3); + server.close(); + }); + client.pipe(parser); +}); +server.listen(9999); + +var client = net.connect({ port : 9999 }, function() { + var msgs = str + ' ' + str + '\n\n' + str + client.end(msgs); +}); diff --git a/pitfall/pdfkit/node_modules/JSONStream/test/multiple_objects_error.js b/pitfall/pdfkit/node_modules/JSONStream/test/multiple_objects_error.js new file mode 100644 index 00000000..980423b6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/JSONStream/test/multiple_objects_error.js @@ -0,0 +1,35 @@ +var fs = require ('fs'); +var net = require('net'); +var join = require('path').join; +var file = join(__dirname, 'fixtures','all_npm.json'); +var it = require('it-is'); +var JSONStream = require('../'); + +var str = fs.readFileSync(file); + +var server = net.createServer(function(client) { + var root_calls = 0; + var data_calls = 0; + var parser = JSONStream.parse(); + parser.on('root', function(root, count) { + ++ root_calls; + it(root_calls).notEqual(2); + }); + + parser.on('error', function(err) { + console.log(err); + server.close(); + }); + + parser.on('end', function() { + console.log('END'); + server.close(); + }); + client.pipe(parser); +}); +server.listen(9999); + +var client = net.connect({ port : 9999 }, function() { + var msgs = str + '}'; + client.end(msgs); +}); diff --git a/pitfall/pdfkit/node_modules/JSONStream/test/null.js b/pitfall/pdfkit/node_modules/JSONStream/test/null.js new file mode 100644 index 00000000..95dd60c0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/JSONStream/test/null.js @@ -0,0 +1,28 @@ +var JSONStream = require('../') + +var data = [ + {ID: 1, optional: null}, + {ID: 2, optional: null}, + {ID: 3, optional: 20}, + {ID: 4, optional: null}, + {ID: 5, optional: 'hello'}, + {ID: 6, optional: null} +] + + +var test = require('tape') + +test ('null properties', function (t) { + var actual = [] + var stream = + + JSONStream.parse('*.optional') + .on('data', function (v) { actual.push(v) }) + .on('end', function () { + t.deepEqual(actual, [20, 'hello']) + t.end() + }) + + stream.write(JSON.stringify(data, null, 2)) + stream.end() +}) diff --git a/pitfall/pdfkit/node_modules/JSONStream/test/parsejson.js b/pitfall/pdfkit/node_modules/JSONStream/test/parsejson.js new file mode 100644 index 00000000..02798871 --- /dev/null +++ b/pitfall/pdfkit/node_modules/JSONStream/test/parsejson.js @@ -0,0 +1,28 @@ + + +/* + sometimes jsonparse changes numbers slightly. +*/ + +var r = Math.random() + , Parser = require('jsonparse') + , p = new Parser() + , assert = require('assert') + , times = 20 +while (times --) { + + assert.equal(JSON.parse(JSON.stringify(r)), r, 'core JSON') + + p.onValue = function (v) { + console.error('parsed', v) + assert.equal( + String(v).slice(0,12), + String(r).slice(0,12) + ) + } + console.error('correct', r) + p.write (new Buffer(JSON.stringify([r]))) + + + +} diff --git a/pitfall/pdfkit/node_modules/JSONStream/test/stringify.js b/pitfall/pdfkit/node_modules/JSONStream/test/stringify.js new file mode 100644 index 00000000..b6de85ed --- /dev/null +++ b/pitfall/pdfkit/node_modules/JSONStream/test/stringify.js @@ -0,0 +1,41 @@ + +var fs = require ('fs') + , join = require('path').join + , file = join(__dirname, 'fixtures','all_npm.json') + , JSONStream = require('../') + , it = require('it-is').style('colour') + + function randomObj () { + return ( + Math.random () < 0.4 + ? {hello: 'eonuhckmqjk', + whatever: 236515, + lies: true, + nothing: [null], + stuff: [Math.random(),Math.random(),Math.random()] + } + : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]] + ) + } + +var expected = [] + , stringify = JSONStream.stringify() + , es = require('event-stream') + , stringified = '' + , called = 0 + , count = 10 + , ended = false + +while (count --) + expected.push(randomObj()) + + es.connect( + es.readArray(expected), + stringify, + //JSONStream.parse([/./]), + es.writeArray(function (err, lines) { + + it(JSON.parse(lines.join(''))).deepEqual(expected) + console.error('PASSED') + }) + ) diff --git a/pitfall/pdfkit/node_modules/JSONStream/test/stringify_object.js b/pitfall/pdfkit/node_modules/JSONStream/test/stringify_object.js new file mode 100644 index 00000000..9490115a --- /dev/null +++ b/pitfall/pdfkit/node_modules/JSONStream/test/stringify_object.js @@ -0,0 +1,47 @@ + +var fs = require ('fs') + , join = require('path').join + , file = join(__dirname, 'fixtures','all_npm.json') + , JSONStream = require('../') + , it = require('it-is').style('colour') + , es = require('event-stream') + , pending = 10 + , passed = true + + function randomObj () { + return ( + Math.random () < 0.4 + ? {hello: 'eonuhckmqjk', + whatever: 236515, + lies: true, + nothing: [null], + stuff: [Math.random(),Math.random(),Math.random()] + } + : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]] + ) + } + +for (var ix = 0; ix < pending; ix++) (function (count) { + var expected = {} + , stringify = JSONStream.stringifyObject() + + es.connect( + stringify, + es.writeArray(function (err, lines) { + it(JSON.parse(lines.join(''))).deepEqual(expected) + if (--pending === 0) { + console.error('PASSED') + } + }) + ) + + while (count --) { + var key = Math.random().toString(16).slice(2) + expected[key] = randomObj() + stringify.write([ key, expected[key] ]) + } + + process.nextTick(function () { + stringify.end() + }) +})(ix) diff --git a/pitfall/pdfkit/node_modules/JSONStream/test/test.js b/pitfall/pdfkit/node_modules/JSONStream/test/test.js new file mode 100644 index 00000000..8ea7c2e1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/JSONStream/test/test.js @@ -0,0 +1,35 @@ + + +var fs = require ('fs') + , join = require('path').join + , file = join(__dirname, 'fixtures','all_npm.json') + , JSONStream = require('../') + , it = require('it-is') + +var expected = JSON.parse(fs.readFileSync(file)) + , parser = JSONStream.parse(['rows', /\d+/ /*, 'value'*/]) + , called = 0 + , ended = false + , parsed = [] + +fs.createReadStream(file).pipe(parser) + +parser.on('data', function (data) { + called ++ + it.has({ + id: it.typeof('string'), + value: {rev: it.typeof('string')}, + key:it.typeof('string') + }) + parsed.push(data) +}) + +parser.on('end', function () { + ended = true +}) + +process.on('exit', function () { + it(called).equal(expected.rows.length) + it(parsed).deepEqual(expected.rows) + console.error('PASSED') +}) diff --git a/pitfall/pdfkit/node_modules/JSONStream/test/test2.js b/pitfall/pdfkit/node_modules/JSONStream/test/test2.js new file mode 100644 index 00000000..d09df7be --- /dev/null +++ b/pitfall/pdfkit/node_modules/JSONStream/test/test2.js @@ -0,0 +1,29 @@ + + +var fs = require ('fs') + , join = require('path').join + , file = join(__dirname, '..','package.json') + , JSONStream = require('../') + , it = require('it-is') + +var expected = JSON.parse(fs.readFileSync(file)) + , parser = JSONStream.parse([]) + , called = 0 + , ended = false + , parsed = [] + +fs.createReadStream(file).pipe(parser) + +parser.on('data', function (data) { + called ++ + it(data).deepEqual(expected) +}) + +parser.on('end', function () { + ended = true +}) + +process.on('exit', function () { + it(called).equal(1) + console.error('PASSED') +}) \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/JSONStream/test/two-ways.js b/pitfall/pdfkit/node_modules/JSONStream/test/two-ways.js new file mode 100644 index 00000000..8f3b89c8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/JSONStream/test/two-ways.js @@ -0,0 +1,41 @@ + +var fs = require ('fs') + , join = require('path').join + , file = join(__dirname, 'fixtures','all_npm.json') + , JSONStream = require('../') + , it = require('it-is').style('colour') + + function randomObj () { + return ( + Math.random () < 0.4 + ? {hello: 'eonuhckmqjk', + whatever: 236515, + lies: true, + nothing: [null], +// stuff: [Math.random(),Math.random(),Math.random()] + } + : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]] + ) + } + +var expected = [] + , stringify = JSONStream.stringify() + , es = require('event-stream') + , stringified = '' + , called = 0 + , count = 10 + , ended = false + +while (count --) + expected.push(randomObj()) + + es.connect( + es.readArray(expected), + stringify, + JSONStream.parse([/./]), + es.writeArray(function (err, lines) { + + it(lines).has(expected) + console.error('PASSED') + }) + ) diff --git a/pitfall/pdfkit/node_modules/abbrev/LICENSE b/pitfall/pdfkit/node_modules/abbrev/LICENSE new file mode 100644 index 00000000..19129e31 --- /dev/null +++ b/pitfall/pdfkit/node_modules/abbrev/LICENSE @@ -0,0 +1,15 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter and Contributors + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR +IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/pitfall/pdfkit/node_modules/abbrev/README.md b/pitfall/pdfkit/node_modules/abbrev/README.md new file mode 100644 index 00000000..99746fe6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/abbrev/README.md @@ -0,0 +1,23 @@ +# abbrev-js + +Just like [ruby's Abbrev](http://apidock.com/ruby/Abbrev). + +Usage: + + var abbrev = require("abbrev"); + abbrev("foo", "fool", "folding", "flop"); + + // returns: + { fl: 'flop' + , flo: 'flop' + , flop: 'flop' + , fol: 'folding' + , fold: 'folding' + , foldi: 'folding' + , foldin: 'folding' + , folding: 'folding' + , foo: 'foo' + , fool: 'fool' + } + +This is handy for command-line scripts, or other cases where you want to be able to accept shorthands. diff --git a/pitfall/pdfkit/node_modules/abbrev/abbrev.js b/pitfall/pdfkit/node_modules/abbrev/abbrev.js new file mode 100644 index 00000000..7b1dc5d6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/abbrev/abbrev.js @@ -0,0 +1,61 @@ +module.exports = exports = abbrev.abbrev = abbrev + +abbrev.monkeyPatch = monkeyPatch + +function monkeyPatch () { + Object.defineProperty(Array.prototype, 'abbrev', { + value: function () { return abbrev(this) }, + enumerable: false, configurable: true, writable: true + }) + + Object.defineProperty(Object.prototype, 'abbrev', { + value: function () { return abbrev(Object.keys(this)) }, + enumerable: false, configurable: true, writable: true + }) +} + +function abbrev (list) { + if (arguments.length !== 1 || !Array.isArray(list)) { + list = Array.prototype.slice.call(arguments, 0) + } + for (var i = 0, l = list.length, args = [] ; i < l ; i ++) { + args[i] = typeof list[i] === "string" ? list[i] : String(list[i]) + } + + // sort them lexicographically, so that they're next to their nearest kin + args = args.sort(lexSort) + + // walk through each, seeing how much it has in common with the next and previous + var abbrevs = {} + , prev = "" + for (var i = 0, l = args.length ; i < l ; i ++) { + var current = args[i] + , next = args[i + 1] || "" + , nextMatches = true + , prevMatches = true + if (current === next) continue + for (var j = 0, cl = current.length ; j < cl ; j ++) { + var curChar = current.charAt(j) + nextMatches = nextMatches && curChar === next.charAt(j) + prevMatches = prevMatches && curChar === prev.charAt(j) + if (!nextMatches && !prevMatches) { + j ++ + break + } + } + prev = current + if (j === cl) { + abbrevs[current] = current + continue + } + for (var a = current.substr(0, j) ; j <= cl ; j ++) { + abbrevs[a] = current + a += current.charAt(j) + } + } + return abbrevs +} + +function lexSort (a, b) { + return a === b ? 0 : a > b ? 1 : -1 +} diff --git a/pitfall/pdfkit/node_modules/abbrev/package.json b/pitfall/pdfkit/node_modules/abbrev/package.json new file mode 100644 index 00000000..1fa5edc9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/abbrev/package.json @@ -0,0 +1,92 @@ +{ + "_args": [ + [ + { + "raw": "abbrev@1", + "scope": null, + "escapedName": "abbrev", + "name": "abbrev", + "rawSpec": "1", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/nopt" + ] + ], + "_from": "abbrev@>=1.0.0 <2.0.0", + "_id": "abbrev@1.1.0", + "_inCache": true, + "_location": "/abbrev", + "_nodeVersion": "8.0.0-pre", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/abbrev-1.1.0.tgz_1487054000015_0.9229173036292195" + }, + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "_npmVersion": "4.3.0", + "_phantomChildren": {}, + "_requested": { + "raw": "abbrev@1", + "scope": null, + "escapedName": "abbrev", + "name": "abbrev", + "rawSpec": "1", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/nopt" + ], + "_resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz", + "_shasum": "d0554c2256636e2f56e7c2e5ad183f859428d81f", + "_shrinkwrap": null, + "_spec": "abbrev@1", + "_where": "/Users/MB/git/pdfkit/node_modules/nopt", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me" + }, + "bugs": { + "url": "https://github.com/isaacs/abbrev-js/issues" + }, + "dependencies": {}, + "description": "Like ruby's abbrev module, but in js", + "devDependencies": { + "tap": "^10.1" + }, + "directories": {}, + "dist": { + "shasum": "d0554c2256636e2f56e7c2e5ad183f859428d81f", + "tarball": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.0.tgz" + }, + "files": [ + "abbrev.js" + ], + "gitHead": "7136d4d95449dc44115d4f78b80ec907724f64e0", + "homepage": "https://github.com/isaacs/abbrev-js#readme", + "license": "ISC", + "main": "abbrev.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "abbrev", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/isaacs/abbrev-js.git" + }, + "scripts": { + "postpublish": "git push origin --all; git push origin --tags", + "postversion": "npm publish", + "preversion": "npm test", + "test": "tap test.js --100" + }, + "version": "1.1.0" +} diff --git a/pitfall/pdfkit/node_modules/acorn/.npmignore b/pitfall/pdfkit/node_modules/acorn/.npmignore new file mode 100644 index 00000000..eb3644b3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/acorn/.npmignore @@ -0,0 +1,10 @@ +/.tern-port +/test +/local +/rollup +/bin/generate-identifier-regex.js +/bin/update_authors.sh +.editorconfig +.gitattributes +.tern-project +.travis.yml diff --git a/pitfall/pdfkit/node_modules/acorn/AUTHORS b/pitfall/pdfkit/node_modules/acorn/AUTHORS new file mode 100644 index 00000000..ab64891b --- /dev/null +++ b/pitfall/pdfkit/node_modules/acorn/AUTHORS @@ -0,0 +1,62 @@ +List of Acorn contributors. Updated before every release. + +Adrian Rakovsky +Alistair Braidwood +Amila Welihinda +Andres Suarez +Angelo +Aparajita Fishman +Arian Stolwijk +Artem Govorov +Brandon Mills +Charles Hughes +Conrad Irwin +Daniel Tschinder +David Bonnet +Domenico Matteo +Forbes Lindesay +Gilad Peleg +impinball +Ingvar Stepanyan +Jackson Ray Hamilton +Jesse McCarthy +Jiaxing Wang +Joel Kemp +Johannes Herr +Jordan Klassen +Jürg Lehni +Kai Cataldo +keeyipchan +Keheliya Gallaba +Kevin Irish +Kevin Kwok +krator +Marijn Haverbeke +Martin Carlberg +Mat Garcia +Mathias Bynens +Mathieu 'p01' Henri +Matthew Bastien +Max Schaefer +Max Zerzouri +Mihai Bazon +Mike Rennie +naoh +Nicholas C. Zakas +Nick Fitzgerald +Olivier Thomann +Oskar Schöldström +Paul Harper +Peter Rust +PlNG +Prayag Verma +ReadmeCritic +r-e-d +Richard Gibson +Rich Harris +Sebastian McKenzie +Simen Bekkhus +Timothy Gu +Toru Nagashima +Wexpo Lyu +zsjforcn diff --git a/pitfall/pdfkit/node_modules/acorn/CHANGELOG.md b/pitfall/pdfkit/node_modules/acorn/CHANGELOG.md new file mode 100644 index 00000000..f6d1fa8b --- /dev/null +++ b/pitfall/pdfkit/node_modules/acorn/CHANGELOG.md @@ -0,0 +1,286 @@ +## 4.0.11 (2017-02-07) + +### Bug fixes + +Allow all forms of member expressions to be parenthesized as lvalue. + +## 4.0.10 (2017-02-07) + +### Bug fixes + +Don't expect semicolons after default-exported functions or classes, +even when they are expressions. + +Check for use of `'use strict'` directives in non-simple parameter +functions, even when already in strict mode. + +## 4.0.9 (2017-02-06) + +### Bug fixes + +Fix incorrect error raised for parenthesized simple assignment +targets, so that `(x) = 1` parses again. + +## 4.0.8 (2017-02-03) + +### Bug fixes + +Solve spurious parenthesized pattern errors by temporarily erring on +the side of accepting programs that our delayed errors don't handle +correctly yet. + +## 4.0.7 (2017-02-02) + +### Bug fixes + +Accept invalidly rejected code like `(x).y = 2` again. + +Don't raise an error when a function _inside_ strict code has a +non-simple parameter list. + +## 4.0.6 (2017-02-02) + +### Bug fixes + +Fix exponential behavior (manifesting itself as a complete hang for +even relatively small source files) introduced by the new 'use strict' +check. + +## 4.0.5 (2017-02-02) + +### Bug fixes + +Disallow parenthesized pattern expressions. + +Allow keywords as export names. + +Don't allow the `async` keyword to be parenthesized. + +Properly raise an error when a keyword contains a character escape. + +Allow `"use strict"` to appear after other string literal expressions. + +Disallow labeled declarations. + +## 4.0.4 (2016-12-19) + +### Bug fixes + +Fix issue with loading acorn_loose.js with an AMD loader. + +Fix crash when `export` was followed by a keyword that can't be +exported. + +## 4.0.3 (2016-08-16) + +### Bug fixes + +Allow regular function declarations inside single-statement `if` +branches in loose mode. Forbid them entirely in strict mode. + +Properly parse properties named `async` in ES2017 mode. + +Fix bug where reserved words were broken in ES2017 mode. + +## 4.0.2 (2016-08-11) + +### Bug fixes + +Don't ignore period or 'e' characters after octal numbers. + +Fix broken parsing for call expressions in default parameter values +of arrow functions. + +## 4.0.1 (2016-08-08) + +### Bug fixes + +Fix false positives in duplicated export name errors. + +## 4.0.0 (2016-08-07) + +### Breaking changes + +The default `ecmaVersion` option value is now 7. + +A number of internal method signatures changed, so plugins might need +to be updated. + +### Bug fixes + +The parser now raises errors on duplicated export names. + +`arguments` and `eval` can now be used in shorthand properties. + +Duplicate parameter names in non-simple argument lists now always +produce an error. + +### New features + +The `ecmaVersion` option now also accepts year-style version numbers +(2015, etc). + +Support for `async`/`await` syntax when `ecmaVersion` is >= 8. + +Support for trailing commas in call expressions when `ecmaVersion` +is >= 8. + +## 3.3.0 (2016-07-25) + +### Bug fixes + +Fix bug in tokenizing of regexp operator after a function declaration. + +Fix parser crash when parsing an array pattern with a hole. + +### New features + +Implement check against complex argument lists in functions that +enable strict mode in ES7. + +## 3.2.0 (2016-06-07) + +### Bug fixes + +Improve handling of lack of unicode regexp support in host +environment. + +Properly reject shorthand properties whose name is a keyword. + +Don't crash when the loose parser is called without options object. + +### New features + +Visitors created with `visit.make` now have their base as _prototype_, +rather than copying properties into a fresh object. + +Make it possible to use `visit.ancestor` with a walk state. + +## 3.1.0 (2016-04-18) + +### Bug fixes + +Fix issue where the loose parser created invalid TemplateElement nodes +for unclosed template literals. + +Properly tokenize the division operator directly after a function +expression. + +Allow trailing comma in destructuring arrays. + +### New features + +The walker now allows defining handlers for `CatchClause` nodes. + +## 3.0.4 (2016-02-25) + +### Fixes + +Allow update expressions as left-hand-side of the ES7 exponential +operator. + +## 3.0.2 (2016-02-10) + +### Fixes + +Fix bug that accidentally made `undefined` a reserved word when +parsing ES7. + +## 3.0.0 (2016-02-10) + +### Breaking changes + +The default value of the `ecmaVersion` option is now 6 (used to be 5). + +Support for comprehension syntax (which was dropped from the draft +spec) has been removed. + +### Fixes + +`let` and `yield` are now “contextual keywords”, meaning you can +mostly use them as identifiers in ES5 non-strict code. + +A parenthesized class or function expression after `export default` is +now parsed correctly. + +### New features + +When `ecmaVersion` is set to 7, Acorn will parse the exponentiation +operator (`**`). + +The identifier character ranges are now based on Unicode 8.0.0. + +Plugins can now override the `raiseRecoverable` method to override the +way non-critical errors are handled. + +## 2.7.0 (2016-01-04) + +### Fixes + +Stop allowing rest parameters in setters. + +Make sure the loose parser always attaches a `local` property to +`ImportNamespaceSpecifier` nodes. + +Disallow `y` rexexp flag in ES5. + +Disallow `\00` and `\000` escapes in strict mode. + +Raise an error when an import name is a reserved word. + +## 2.6.4 (2015-11-12) + +### Fixes + +Fix crash in loose parser when parsing invalid object pattern. + +### New features + +Support plugins in the loose parser. + +## 2.6.2 (2015-11-10) + +### Fixes + +Don't crash when no options object is passed. + +## 2.6.0 (2015-11-09) + +### Fixes + +Add `await` as a reserved word in module sources. + +Disallow `yield` in a parameter default value for a generator. + +Forbid using a comma after a rest pattern in an array destructuring. + +### New features + +Support parsing stdin in command-line tool. + +## 2.5.2 (2015-10-27) + +### Fixes + +Fix bug where the walker walked an exported `let` statement as an +expression. + +## 2.5.0 (2015-10-27) + +### Fixes + +Fix tokenizer support in the command-line tool. + +In the loose parser, don't allow non-string-literals as import +sources. + +Stop allowing `new.target` outside of functions. + +Remove legacy `guard` and `guardedHandler` properties from try nodes. + +Stop allowing multiple `__proto__` properties on an object literal in +strict mode. + +Don't allow rest parameters to be non-identifier patterns. + +Check for duplicate paramter names in arrow functions. diff --git a/pitfall/pdfkit/node_modules/acorn/LICENSE b/pitfall/pdfkit/node_modules/acorn/LICENSE new file mode 100644 index 00000000..a35ebf44 --- /dev/null +++ b/pitfall/pdfkit/node_modules/acorn/LICENSE @@ -0,0 +1,19 @@ +Copyright (C) 2012-2016 by various contributors (see AUTHORS) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/acorn/README.md b/pitfall/pdfkit/node_modules/acorn/README.md new file mode 100644 index 00000000..b7efe234 --- /dev/null +++ b/pitfall/pdfkit/node_modules/acorn/README.md @@ -0,0 +1,409 @@ +# Acorn + +[![Build Status](https://travis-ci.org/ternjs/acorn.svg?branch=master)](https://travis-ci.org/ternjs/acorn) +[![NPM version](https://img.shields.io/npm/v/acorn.svg)](https://www.npmjs.com/package/acorn) +[![CDNJS](https://img.shields.io/cdnjs/v/acorn.svg)](https://cdnjs.com/libraries/acorn) +[Author funding status: ![maintainer happiness](https://marijnhaverbeke.nl/fund/status_s.png?force)](https://marijnhaverbeke.nl/fund/) + +A tiny, fast JavaScript parser, written completely in JavaScript. + +## Community + +Acorn is open source software released under an +[MIT license](https://github.com/ternjs/acorn/blob/master/LICENSE). + +You are welcome to +[report bugs](https://github.com/ternjs/acorn/issues) or create pull +requests on [github](https://github.com/ternjs/acorn). For questions +and discussion, please use the +[Tern discussion forum](https://discuss.ternjs.net). + +## Installation + +The easiest way to install acorn is with [`npm`][npm]. + +[npm]: https://www.npmjs.com/ + +```sh +npm install acorn +``` + +Alternately, download the source. + +```sh +git clone https://github.com/ternjs/acorn.git +``` + +## Components + +When run in a CommonJS (node.js) or AMD environment, exported values +appear in the interfaces exposed by the individual files, as usual. +When loaded in the browser (Acorn works in any JS-enabled browser more +recent than IE5) without any kind of module management, a single +global object `acorn` will be defined, and all the exported properties +will be added to that. + +### Main parser + +This is implemented in `dist/acorn.js`, and is what you get when you +`require("acorn")` in node.js. + +**parse**`(input, options)` is used to parse a JavaScript program. +The `input` parameter is a string, `options` can be undefined or an +object setting some of the options listed below. The return value will +be an abstract syntax tree object as specified by the +[ESTree spec][estree]. + +When encountering a syntax error, the parser will raise a +`SyntaxError` object with a meaningful message. The error object will +have a `pos` property that indicates the character offset at which the +error occurred, and a `loc` object that contains a `{line, column}` +object referring to that same position. + +[estree]: https://github.com/estree/estree + +- **ecmaVersion**: Indicates the ECMAScript version to parse. Must be + either 3, 5, 6 (2015), 7 (2016), or 8 (2017). This influences support for strict + mode, the set of reserved words, and support for new syntax features. + Default is 7. + + **NOTE**: Only 'stage 4' (finalized) ECMAScript features are being + implemented by Acorn. + +- **sourceType**: Indicate the mode the code should be parsed in. Can be + either `"script"` or `"module"`. This influences global strict mode + and parsing of `import` and `export` declarations. + +- **onInsertedSemicolon**: If given a callback, that callback will be + called whenever a missing semicolon is inserted by the parser. The + callback will be given the character offset of the point where the + semicolon is inserted as argument, and if `locations` is on, also a + `{line, column}` object representing this position. + +- **onTrailingComma**: Like `onInsertedSemicolon`, but for trailing + commas. + +- **allowReserved**: If `false`, using a reserved word will generate + an error. Defaults to `true` for `ecmaVersion` 3, `false` for higher + versions. When given the value `"never"`, reserved words and + keywords can also not be used as property names (as in Internet + Explorer's old parser). + +- **allowReturnOutsideFunction**: By default, a return statement at + the top level raises an error. Set this to `true` to accept such + code. + +- **allowImportExportEverywhere**: By default, `import` and `export` + declarations can only appear at a program's top level. Setting this + option to `true` allows them anywhere where a statement is allowed. + +- **allowHashBang**: When this is enabled (off by default), if the + code starts with the characters `#!` (as in a shellscript), the + first line will be treated as a comment. + +- **locations**: When `true`, each node has a `loc` object attached + with `start` and `end` subobjects, each of which contains the + one-based line and zero-based column numbers in `{line, column}` + form. Default is `false`. + +- **onToken**: If a function is passed for this option, each found + token will be passed in same format as tokens returned from + `tokenizer().getToken()`. + + If array is passed, each found token is pushed to it. + + Note that you are not allowed to call the parser from the + callback—that will corrupt its internal state. + +- **onComment**: If a function is passed for this option, whenever a + comment is encountered the function will be called with the + following parameters: + + - `block`: `true` if the comment is a block comment, false if it + is a line comment. + - `text`: The content of the comment. + - `start`: Character offset of the start of the comment. + - `end`: Character offset of the end of the comment. + + When the `locations` options is on, the `{line, column}` locations + of the comment’s start and end are passed as two additional + parameters. + + If array is passed for this option, each found comment is pushed + to it as object in Esprima format: + + ```javascript + { + "type": "Line" | "Block", + "value": "comment text", + "start": Number, + "end": Number, + // If `locations` option is on: + "loc": { + "start": {line: Number, column: Number} + "end": {line: Number, column: Number} + }, + // If `ranges` option is on: + "range": [Number, Number] + } + ``` + + Note that you are not allowed to call the parser from the + callback—that will corrupt its internal state. + +- **ranges**: Nodes have their start and end characters offsets + recorded in `start` and `end` properties (directly on the node, + rather than the `loc` object, which holds line/column data. To also + add a [semi-standardized][range] `range` property holding a + `[start, end]` array with the same numbers, set the `ranges` option + to `true`. + +- **program**: It is possible to parse multiple files into a single + AST by passing the tree produced by parsing the first file as the + `program` option in subsequent parses. This will add the toplevel + forms of the parsed file to the "Program" (top) node of an existing + parse tree. + +- **sourceFile**: When the `locations` option is `true`, you can pass + this option to add a `source` attribute in every node’s `loc` + object. Note that the contents of this option are not examined or + processed in any way; you are free to use whatever format you + choose. + +- **directSourceFile**: Like `sourceFile`, but a `sourceFile` property + will be added (regardless of the `location` option) directly to the + nodes, rather than the `loc` object. + +- **preserveParens**: If this option is `true`, parenthesized expressions + are represented by (non-standard) `ParenthesizedExpression` nodes + that have a single `expression` property containing the expression + inside parentheses. + +[range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 + +**parseExpressionAt**`(input, offset, options)` will parse a single +expression in a string, and return its AST. It will not complain if +there is more of the string left after the expression. + +**getLineInfo**`(input, offset)` can be used to get a `{line, +column}` object for a given program string and character offset. + +**tokenizer**`(input, options)` returns an object with a `getToken` +method that can be called repeatedly to get the next token, a `{start, +end, type, value}` object (with added `loc` property when the +`locations` option is enabled and `range` property when the `ranges` +option is enabled). When the token's type is `tokTypes.eof`, you +should stop calling the method, since it will keep returning that same +token forever. + +In ES6 environment, returned result can be used as any other +protocol-compliant iterable: + +```javascript +for (let token of acorn.tokenizer(str)) { + // iterate over the tokens +} + +// transform code to array of tokens: +var tokens = [...acorn.tokenizer(str)]; +``` + +**tokTypes** holds an object mapping names to the token type objects +that end up in the `type` properties of tokens. + +#### Note on using with [Escodegen][escodegen] + +Escodegen supports generating comments from AST, attached in +Esprima-specific format. In order to simulate same format in +Acorn, consider following example: + +```javascript +var comments = [], tokens = []; + +var ast = acorn.parse('var x = 42; // answer', { + // collect ranges for each node + ranges: true, + // collect comments in Esprima's format + onComment: comments, + // collect token ranges + onToken: tokens +}); + +// attach comments using collected information +escodegen.attachComments(ast, comments, tokens); + +// generate code +console.log(escodegen.generate(ast, {comment: true})); +// > 'var x = 42; // answer' +``` + +[escodegen]: https://github.com/estools/escodegen + +### dist/acorn_loose.js ### + +This file implements an error-tolerant parser. It exposes a single +function. The loose parser is accessible in node.js via `require("acorn/dist/acorn_loose")`. + +**parse_dammit**`(input, options)` takes the same arguments and +returns the same syntax tree as the `parse` function in `acorn.js`, +but never raises an error, and will do its best to parse syntactically +invalid code in as meaningful a way as it can. It'll insert identifier +nodes with name `"✖"` as placeholders in places where it can't make +sense of the input. Depends on `acorn.js`, because it uses the same +tokenizer. + +### dist/walk.js ### + +Implements an abstract syntax tree walker. Will store its interface in +`acorn.walk` when loaded without a module system. + +**simple**`(node, visitors, base, state)` does a 'simple' walk over +a tree. `node` should be the AST node to walk, and `visitors` an +object with properties whose names correspond to node types in the +[ESTree spec][estree]. The properties should contain functions +that will be called with the node object and, if applicable the state +at that point. The last two arguments are optional. `base` is a walker +algorithm, and `state` is a start state. The default walker will +simply visit all statements and expressions and not produce a +meaningful state. (An example of a use of state is to track scope at +each point in the tree.) + +**ancestor**`(node, visitors, base, state)` does a 'simple' walk over +a tree, building up an array of ancestor nodes (including the current node) +and passing the array to the callbacks as a third parameter. + +**recursive**`(node, state, functions, base)` does a 'recursive' +walk, where the walker functions are responsible for continuing the +walk on the child nodes of their target node. `state` is the start +state, and `functions` should contain an object that maps node types +to walker functions. Such functions are called with `(node, state, c)` +arguments, and can cause the walk to continue on a sub-node by calling +the `c` argument on it with `(node, state)` arguments. The optional +`base` argument provides the fallback walker functions for node types +that aren't handled in the `functions` object. If not given, the +default walkers will be used. + +**make**`(functions, base)` builds a new walker object by using the +walker functions in `functions` and filling in the missing ones by +taking defaults from `base`. + +**findNodeAt**`(node, start, end, test, base, state)` tries to +locate a node in a tree at the given start and/or end offsets, which +satisfies the predicate `test`. `start` and `end` can be either `null` +(as wildcard) or a number. `test` may be a string (indicating a node +type) or a function that takes `(nodeType, node)` arguments and +returns a boolean indicating whether this node is interesting. `base` +and `state` are optional, and can be used to specify a custom walker. +Nodes are tested from inner to outer, so if two nodes match the +boundaries, the inner one will be preferred. + +**findNodeAround**`(node, pos, test, base, state)` is a lot like +`findNodeAt`, but will match any node that exists 'around' (spanning) +the given position. + +**findNodeAfter**`(node, pos, test, base, state)` is similar to +`findNodeAround`, but will match all nodes *after* the given position +(testing outer nodes before inner nodes). + +## Command line interface + +The `bin/acorn` utility can be used to parse a file from the command +line. It accepts as arguments its input file and the following +options: + +- `--ecma3|--ecma5|--ecma6|--ecma7`: Sets the ECMAScript version to parse. Default is + version 5. + +- `--module`: Sets the parsing mode to `"module"`. Is set to `"script"` otherwise. + +- `--locations`: Attaches a "loc" object to each node with "start" and + "end" subobjects, each of which contains the one-based line and + zero-based column numbers in `{line, column}` form. + +- `--allow-hash-bang`: If the code starts with the characters #! (as in a shellscript), the first line will be treated as a comment. + +- `--compact`: No whitespace is used in the AST output. + +- `--silent`: Do not output the AST, just return the exit status. + +- `--help`: Print the usage information and quit. + +The utility spits out the syntax tree as JSON data. + +## Build system + +Acorn is written in ECMAScript 6, as a set of small modules, in the +project's `src` directory, and compiled down to bigger ECMAScript 3 +files in `dist` using [Browserify](http://browserify.org) and +[Babel](http://babeljs.io/). If you are already using Babel, you can +consider including the modules directly. + +The command-line test runner (`npm test`) uses the ES6 modules. The +browser-based test page (`test/index.html`) uses the compiled modules. +The `bin/build-acorn.js` script builds the latter from the former. + +If you are working on Acorn, you'll probably want to try the code out +directly, without an intermediate build step. In your scripts, you can +register the Babel require shim like this: + + require("babel-core/register") + +That will allow you to directly `require` the ES6 modules. + +## Plugins + +Acorn is designed support allow plugins which, within reasonable +bounds, redefine the way the parser works. Plugins can add new token +types and new tokenizer contexts (if necessary), and extend methods in +the parser object. This is not a clean, elegant API—using it requires +an understanding of Acorn's internals, and plugins are likely to break +whenever those internals are significantly changed. But still, it is +_possible_, in this way, to create parsers for JavaScript dialects +without forking all of Acorn. And in principle it is even possible to +combine such plugins, so that if you have, for example, a plugin for +parsing types and a plugin for parsing JSX-style XML literals, you +could load them both and parse code with both JSX tags and types. + +A plugin should register itself by adding a property to +`acorn.plugins`, which holds a function. Calling `acorn.parse`, a +`plugins` option can be passed, holding an object mapping plugin names +to configuration values (or just `true` for plugins that don't take +options). After the parser object has been created, the initialization +functions for the chosen plugins are called with `(parser, +configValue)` arguments. They are expected to use the `parser.extend` +method to extend parser methods. For example, the `readToken` method +could be extended like this: + +```javascript +parser.extend("readToken", function(nextMethod) { + return function(code) { + console.log("Reading a token!") + return nextMethod.call(this, code) + } +}) +``` + +The `nextMethod` argument passed to `extend`'s second argument is the +previous value of this method, and should usually be called through to +whenever the extended method does not handle the call itself. + +Similarly, the loose parser allows plugins to register themselves via +`acorn.pluginsLoose`. The extension mechanism is the same as for the +normal parser: + +```javascript +looseParser.extend("readToken", function(nextMethod) { + return function() { + console.log("Reading a token in the loose parser!") + return nextMethod.call(this) + } +}) +``` + +### Existing plugins + + - [`acorn-jsx`](https://github.com/RReverser/acorn-jsx): Parse [Facebook JSX syntax extensions](https://github.com/facebook/jsx) + - [`acorn-es7-plugin`](https://github.com/MatAtBread/acorn-es7-plugin/): Parse [async/await syntax proposal](https://github.com/tc39/ecmascript-asyncawait) + - [`acorn-object-spread`](https://github.com/UXtemple/acorn-object-spread): Parse [object spread syntax proposal](https://github.com/sebmarkbage/ecmascript-rest-spread) + - [`acorn-es7`](https://www.npmjs.com/package/acorn-es7): Parse [decorator syntax proposal](https://github.com/wycats/javascript-decorators) + - [`acorn-objj`](https://www.npmjs.com/package/acorn-objj): [Objective-J](http://www.cappuccino-project.org/learn/objective-j.html) language parser built as Acorn plugin diff --git a/pitfall/pdfkit/node_modules/acorn/bin/acorn b/pitfall/pdfkit/node_modules/acorn/bin/acorn new file mode 100755 index 00000000..78ebd4f0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/acorn/bin/acorn @@ -0,0 +1,67 @@ +#!/usr/bin/env node +'use strict'; + +var path = require('path'); +var fs = require('fs'); +var acorn = require('../dist/acorn.js'); + +var infile; +var forceFile; +var silent = false; +var compact = false; +var tokenize = false; +var options = {} + +function help(status) { + var print = (status == 0) ? console.log : console.error + print("usage: " + path.basename(process.argv[1]) + " [--ecma3|--ecma5|--ecma6|--ecma7|...|--ecma2015|--ecma2016|...]") + print(" [--tokenize] [--locations] [---allow-hash-bang] [--compact] [--silent] [--module] [--help] [--] [infile]") + process.exit(status) +} + +for (var i = 2; i < process.argv.length; ++i) { + var arg = process.argv[i] + if ((arg == "-" || arg[0] != "-") && !infile) infile = arg + else if (arg == "--" && !infile && i + 2 == process.argv.length) forceFile = infile = process.argv[++i] + else if (arg == "--locations") options.locations = true + else if (arg == "--allow-hash-bang") options.allowHashBang = true + else if (arg == "--silent") silent = true + else if (arg == "--compact") compact = true + else if (arg == "--help") help(0) + else if (arg == "--tokenize") tokenize = true + else if (arg == "--module") options.sourceType = 'module' + else { + var match = arg.match(/^--ecma(\d+)$/) + if (match) + options.ecmaVersion = +match[1] + else + help(1) + } +} + +function run(code) { + var result + if (!tokenize) { + try { result = acorn.parse(code, options) } + catch(e) { console.error(e.message); process.exit(1) } + } else { + result = [] + var tokenizer = acorn.tokenizer(code, options), token + while (true) { + try { token = tokenizer.getToken() } + catch(e) { console.error(e.message); process.exit(1) } + result.push(token) + if (token.type == acorn.tokTypes.eof) break + } + } + if (!silent) console.log(JSON.stringify(result, null, compact ? null : 2)) +} + +if (forceFile || infile && infile != "-") { + run(fs.readFileSync(infile, "utf8")) +} else { + var code = "" + process.stdin.resume() + process.stdin.on("data", function (chunk) { return code += chunk; }) + process.stdin.on("end", function () { return run(code); }) +} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/acorn/dist/.keep b/pitfall/pdfkit/node_modules/acorn/dist/.keep new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/acorn/dist/acorn.es.js b/pitfall/pdfkit/node_modules/acorn/dist/acorn.es.js new file mode 100644 index 00000000..2b34af03 --- /dev/null +++ b/pitfall/pdfkit/node_modules/acorn/dist/acorn.es.js @@ -0,0 +1,3401 @@ +// Reserved word lists for various dialects of the language + +var reservedWords = { + 3: "abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile", + 5: "class enum extends super const export import", + 6: "enum", + strict: "implements interface let package private protected public static yield", + strictBind: "eval arguments" +} + +// And the keywords + +var ecma5AndLessKeywords = "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this" + +var keywords = { + 5: ecma5AndLessKeywords, + 6: ecma5AndLessKeywords + " const class extends export import super" +} + +// ## Character categories + +// Big ugly regular expressions that match characters in the +// whitespace, identifier, and identifier-start categories. These +// are only applied when a character is found to actually have a +// code point above 128. +// Generated by `bin/generate-identifier-regex.js`. + +var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u037f\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u052f\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0-\u08b4\u08b6-\u08bd\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0af9\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c39\u0c3d\u0c58-\u0c5a\u0c60\u0c61\u0c80\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d54-\u0d56\u0d5f-\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f5\u13f8-\u13fd\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f8\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191e\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1c80-\u1c88\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2118-\u211d\u2124\u2126\u2128\u212a-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309b-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fd5\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua69d\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua7ae\ua7b0-\ua7b7\ua7f7-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua8fd\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\ua9e0-\ua9e4\ua9e6-\ua9ef\ua9fa-\ua9fe\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa7e-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uab30-\uab5a\uab5c-\uab65\uab70-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc" +var nonASCIIidentifierChars = "\u200c\u200d\xb7\u0300-\u036f\u0387\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u0669\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7\u06e8\u06ea-\u06ed\u06f0-\u06f9\u0711\u0730-\u074a\u07a6-\u07b0\u07c0-\u07c9\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08d4-\u08e1\u08e3-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09cb-\u09cd\u09d7\u09e2\u09e3\u09e6-\u09ef\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c00-\u0c03\u0c3e-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0c66-\u0c6f\u0c81-\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0ce6-\u0cef\u0d01-\u0d03\u0d3e-\u0d44\u0d46-\u0d48\u0d4a-\u0d4d\u0d57\u0d62\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0de6-\u0def\u0df2\u0df3\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0e50-\u0e59\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e\u0f3f\u0f71-\u0f84\u0f86\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102b-\u103e\u1040-\u1049\u1056-\u1059\u105e-\u1060\u1062-\u1064\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u1369-\u1371\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b4-\u17d3\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u18a9\u1920-\u192b\u1930-\u193b\u1946-\u194f\u19d0-\u19da\u1a17-\u1a1b\u1a55-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1ab0-\u1abd\u1b00-\u1b04\u1b34-\u1b44\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1b82\u1ba1-\u1bad\u1bb0-\u1bb9\u1be6-\u1bf3\u1c24-\u1c37\u1c40-\u1c49\u1c50-\u1c59\u1cd0-\u1cd2\u1cd4-\u1ce8\u1ced\u1cf2-\u1cf4\u1cf8\u1cf9\u1dc0-\u1df5\u1dfb-\u1dff\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua620-\ua629\ua66f\ua674-\ua67d\ua69e\ua69f\ua6f0\ua6f1\ua802\ua806\ua80b\ua823-\ua827\ua880\ua881\ua8b4-\ua8c5\ua8d0-\ua8d9\ua8e0-\ua8f1\ua900-\ua909\ua926-\ua92d\ua947-\ua953\ua980-\ua983\ua9b3-\ua9c0\ua9d0-\ua9d9\ua9e5\ua9f0-\ua9f9\uaa29-\uaa36\uaa43\uaa4c\uaa4d\uaa50-\uaa59\uaa7b-\uaa7d\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uaaeb-\uaaef\uaaf5\uaaf6\uabe3-\uabea\uabec\uabed\uabf0-\uabf9\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f" + +var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]") +var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]") + +nonASCIIidentifierStartChars = nonASCIIidentifierChars = null + +// These are a run-length and offset encoded representation of the +// >0xffff code points that are a valid part of identifiers. The +// offset starts at 0x10000, and each pair of numbers represents an +// offset to the next range, and then a size of the range. They were +// generated by bin/generate-identifier-regex.js +var astralIdentifierStartCodes = [0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,17,26,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,157,310,10,21,11,7,153,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,26,45,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,785,52,76,44,33,24,27,35,42,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,54,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,86,25,391,63,32,0,449,56,264,8,2,36,18,0,50,29,881,921,103,110,18,195,2749,1070,4050,582,8634,568,8,30,114,29,19,47,17,3,32,20,6,18,881,68,12,0,67,12,65,0,32,6124,20,754,9486,1,3071,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,4149,196,60,67,1213,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42710,42,4148,12,221,3,5761,10591,541] +var astralIdentifierCodes = [509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,1306,2,54,14,32,9,16,3,46,10,54,9,7,2,37,13,2,9,52,0,13,2,49,13,10,2,4,9,83,11,7,0,161,11,6,9,7,3,57,0,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,87,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,423,9,838,7,2,7,17,9,57,21,2,13,19882,9,135,4,60,6,26,9,1016,45,17,3,19723,1,5319,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,2214,6,110,6,6,9,792487,239] + +// This has a complexity linear to the value of the code. The +// assumption is that looking up astral identifier characters is +// rare. +function isInAstralSet(code, set) { + var pos = 0x10000 + for (var i = 0; i < set.length; i += 2) { + pos += set[i] + if (pos > code) return false + pos += set[i + 1] + if (pos >= code) return true + } +} + +// Test whether a given character code starts an identifier. + +function isIdentifierStart(code, astral) { + if (code < 65) return code === 36 + if (code < 91) return true + if (code < 97) return code === 95 + if (code < 123) return true + if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)) + if (astral === false) return false + return isInAstralSet(code, astralIdentifierStartCodes) +} + +// Test whether a given character is part of an identifier. + +function isIdentifierChar(code, astral) { + if (code < 48) return code === 36 + if (code < 58) return true + if (code < 65) return false + if (code < 91) return true + if (code < 97) return code === 95 + if (code < 123) return true + if (code <= 0xffff) return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)) + if (astral === false) return false + return isInAstralSet(code, astralIdentifierStartCodes) || isInAstralSet(code, astralIdentifierCodes) +} + +// ## Token types + +// The assignment of fine-grained, information-carrying type objects +// allows the tokenizer to store the information it has about a +// token in a way that is very cheap for the parser to look up. + +// All token type variables start with an underscore, to make them +// easy to recognize. + +// The `beforeExpr` property is used to disambiguate between regular +// expressions and divisions. It is set on all token types that can +// be followed by an expression (thus, a slash after them would be a +// regular expression). +// +// The `startsExpr` property is used to check if the token ends a +// `yield` expression. It is set on all token types that either can +// directly start an expression (like a quotation mark) or can +// continue an expression (like the body of a string). +// +// `isLoop` marks a keyword as starting a loop, which is important +// to know when parsing a label, in order to allow or disallow +// continue jumps to that label. + +var TokenType = function TokenType(label, conf) { + if ( conf === void 0 ) conf = {}; + + this.label = label + this.keyword = conf.keyword + this.beforeExpr = !!conf.beforeExpr + this.startsExpr = !!conf.startsExpr + this.isLoop = !!conf.isLoop + this.isAssign = !!conf.isAssign + this.prefix = !!conf.prefix + this.postfix = !!conf.postfix + this.binop = conf.binop || null + this.updateContext = null +}; + +function binop(name, prec) { + return new TokenType(name, {beforeExpr: true, binop: prec}) +} +var beforeExpr = {beforeExpr: true}; +var startsExpr = {startsExpr: true}; +// Map keyword names to token types. + +var keywordTypes = {} + +// Succinct definitions of keyword token types +function kw(name, options) { + if ( options === void 0 ) options = {}; + + options.keyword = name + return keywordTypes[name] = new TokenType(name, options) +} + +var tt = { + num: new TokenType("num", startsExpr), + regexp: new TokenType("regexp", startsExpr), + string: new TokenType("string", startsExpr), + name: new TokenType("name", startsExpr), + eof: new TokenType("eof"), + + // Punctuation token types. + bracketL: new TokenType("[", {beforeExpr: true, startsExpr: true}), + bracketR: new TokenType("]"), + braceL: new TokenType("{", {beforeExpr: true, startsExpr: true}), + braceR: new TokenType("}"), + parenL: new TokenType("(", {beforeExpr: true, startsExpr: true}), + parenR: new TokenType(")"), + comma: new TokenType(",", beforeExpr), + semi: new TokenType(";", beforeExpr), + colon: new TokenType(":", beforeExpr), + dot: new TokenType("."), + question: new TokenType("?", beforeExpr), + arrow: new TokenType("=>", beforeExpr), + template: new TokenType("template"), + ellipsis: new TokenType("...", beforeExpr), + backQuote: new TokenType("`", startsExpr), + dollarBraceL: new TokenType("${", {beforeExpr: true, startsExpr: true}), + + // Operators. These carry several kinds of properties to help the + // parser use them properly (the presence of these properties is + // what categorizes them as operators). + // + // `binop`, when present, specifies that this operator is a binary + // operator, and will refer to its precedence. + // + // `prefix` and `postfix` mark the operator as a prefix or postfix + // unary operator. + // + // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as + // binary operators with a very low precedence, that should result + // in AssignmentExpression nodes. + + eq: new TokenType("=", {beforeExpr: true, isAssign: true}), + assign: new TokenType("_=", {beforeExpr: true, isAssign: true}), + incDec: new TokenType("++/--", {prefix: true, postfix: true, startsExpr: true}), + prefix: new TokenType("prefix", {beforeExpr: true, prefix: true, startsExpr: true}), + logicalOR: binop("||", 1), + logicalAND: binop("&&", 2), + bitwiseOR: binop("|", 3), + bitwiseXOR: binop("^", 4), + bitwiseAND: binop("&", 5), + equality: binop("==/!=", 6), + relational: binop("", 7), + bitShift: binop("<>", 8), + plusMin: new TokenType("+/-", {beforeExpr: true, binop: 9, prefix: true, startsExpr: true}), + modulo: binop("%", 10), + star: binop("*", 10), + slash: binop("/", 10), + starstar: new TokenType("**", {beforeExpr: true}), + + // Keyword token types. + _break: kw("break"), + _case: kw("case", beforeExpr), + _catch: kw("catch"), + _continue: kw("continue"), + _debugger: kw("debugger"), + _default: kw("default", beforeExpr), + _do: kw("do", {isLoop: true, beforeExpr: true}), + _else: kw("else", beforeExpr), + _finally: kw("finally"), + _for: kw("for", {isLoop: true}), + _function: kw("function", startsExpr), + _if: kw("if"), + _return: kw("return", beforeExpr), + _switch: kw("switch"), + _throw: kw("throw", beforeExpr), + _try: kw("try"), + _var: kw("var"), + _const: kw("const"), + _while: kw("while", {isLoop: true}), + _with: kw("with"), + _new: kw("new", {beforeExpr: true, startsExpr: true}), + _this: kw("this", startsExpr), + _super: kw("super", startsExpr), + _class: kw("class"), + _extends: kw("extends", beforeExpr), + _export: kw("export"), + _import: kw("import"), + _null: kw("null", startsExpr), + _true: kw("true", startsExpr), + _false: kw("false", startsExpr), + _in: kw("in", {beforeExpr: true, binop: 7}), + _instanceof: kw("instanceof", {beforeExpr: true, binop: 7}), + _typeof: kw("typeof", {beforeExpr: true, prefix: true, startsExpr: true}), + _void: kw("void", {beforeExpr: true, prefix: true, startsExpr: true}), + _delete: kw("delete", {beforeExpr: true, prefix: true, startsExpr: true}) +} + +// Matches a whole line break (where CRLF is considered a single +// line break). Used to count lines. + +var lineBreak = /\r\n?|\n|\u2028|\u2029/ +var lineBreakG = new RegExp(lineBreak.source, "g") + +function isNewLine(code) { + return code === 10 || code === 13 || code === 0x2028 || code === 0x2029 +} + +var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/ + +var skipWhiteSpace = /(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g + +function isArray(obj) { + return Object.prototype.toString.call(obj) === "[object Array]" +} + +// Checks if an object has a property. + +function has(obj, propName) { + return Object.prototype.hasOwnProperty.call(obj, propName) +} + +// These are used when `options.locations` is on, for the +// `startLoc` and `endLoc` properties. + +var Position = function Position(line, col) { + this.line = line + this.column = col +}; + +Position.prototype.offset = function offset (n) { + return new Position(this.line, this.column + n) +}; + +var SourceLocation = function SourceLocation(p, start, end) { + this.start = start + this.end = end + if (p.sourceFile !== null) this.source = p.sourceFile +}; + +// The `getLineInfo` function is mostly useful when the +// `locations` option is off (for performance reasons) and you +// want to find the line/column position for a given character +// offset. `input` should be the code string that the offset refers +// into. + +function getLineInfo(input, offset) { + for (var line = 1, cur = 0;;) { + lineBreakG.lastIndex = cur + var match = lineBreakG.exec(input) + if (match && match.index < offset) { + ++line + cur = match.index + match[0].length + } else { + return new Position(line, offset - cur) + } + } +} + +// A second optional argument can be given to further configure +// the parser process. These options are recognized: + +var defaultOptions = { + // `ecmaVersion` indicates the ECMAScript version to parse. Must + // be either 3, 5, 6 (2015), 7 (2016), or 8 (2017). This influences support + // for strict mode, the set of reserved words, and support for + // new syntax features. The default is 7. + ecmaVersion: 7, + // `sourceType` indicates the mode the code should be parsed in. + // Can be either `"script"` or `"module"`. This influences global + // strict mode and parsing of `import` and `export` declarations. + sourceType: "script", + // `onInsertedSemicolon` can be a callback that will be called + // when a semicolon is automatically inserted. It will be passed + // th position of the comma as an offset, and if `locations` is + // enabled, it is given the location as a `{line, column}` object + // as second argument. + onInsertedSemicolon: null, + // `onTrailingComma` is similar to `onInsertedSemicolon`, but for + // trailing commas. + onTrailingComma: null, + // By default, reserved words are only enforced if ecmaVersion >= 5. + // Set `allowReserved` to a boolean value to explicitly turn this on + // an off. When this option has the value "never", reserved words + // and keywords can also not be used as property names. + allowReserved: null, + // When enabled, a return at the top level is not considered an + // error. + allowReturnOutsideFunction: false, + // When enabled, import/export statements are not constrained to + // appearing at the top of the program. + allowImportExportEverywhere: false, + // When enabled, hashbang directive in the beginning of file + // is allowed and treated as a line comment. + allowHashBang: false, + // When `locations` is on, `loc` properties holding objects with + // `start` and `end` properties in `{line, column}` form (with + // line being 1-based and column 0-based) will be attached to the + // nodes. + locations: false, + // A function can be passed as `onToken` option, which will + // cause Acorn to call that function with object in the same + // format as tokens returned from `tokenizer().getToken()`. Note + // that you are not allowed to call the parser from the + // callback—that will corrupt its internal state. + onToken: null, + // A function can be passed as `onComment` option, which will + // cause Acorn to call that function with `(block, text, start, + // end)` parameters whenever a comment is skipped. `block` is a + // boolean indicating whether this is a block (`/* */`) comment, + // `text` is the content of the comment, and `start` and `end` are + // character offsets that denote the start and end of the comment. + // When the `locations` option is on, two more parameters are + // passed, the full `{line, column}` locations of the start and + // end of the comments. Note that you are not allowed to call the + // parser from the callback—that will corrupt its internal state. + onComment: null, + // Nodes have their start and end characters offsets recorded in + // `start` and `end` properties (directly on the node, rather than + // the `loc` object, which holds line/column data. To also add a + // [semi-standardized][range] `range` property holding a `[start, + // end]` array with the same numbers, set the `ranges` option to + // `true`. + // + // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 + ranges: false, + // It is possible to parse multiple files into a single AST by + // passing the tree produced by parsing the first file as + // `program` option in subsequent parses. This will add the + // toplevel forms of the parsed file to the `Program` (top) node + // of an existing parse tree. + program: null, + // When `locations` is on, you can pass this to record the source + // file in every node's `loc` object. + sourceFile: null, + // This value, if given, is stored in every node, whether + // `locations` is on or off. + directSourceFile: null, + // When enabled, parenthesized expressions are represented by + // (non-standard) ParenthesizedExpression nodes + preserveParens: false, + plugins: {} +} + +// Interpret and default an options object + +function getOptions(opts) { + var options = {} + + for (var opt in defaultOptions) + options[opt] = opts && has(opts, opt) ? opts[opt] : defaultOptions[opt] + + if (options.ecmaVersion >= 2015) + options.ecmaVersion -= 2009 + + if (options.allowReserved == null) + options.allowReserved = options.ecmaVersion < 5 + + if (isArray(options.onToken)) { + var tokens = options.onToken + options.onToken = function (token) { return tokens.push(token); } + } + if (isArray(options.onComment)) + options.onComment = pushComment(options, options.onComment) + + return options +} + +function pushComment(options, array) { + return function (block, text, start, end, startLoc, endLoc) { + var comment = { + type: block ? 'Block' : 'Line', + value: text, + start: start, + end: end + } + if (options.locations) + comment.loc = new SourceLocation(this, startLoc, endLoc) + if (options.ranges) + comment.range = [start, end] + array.push(comment) + } +} + +// Registered plugins +var plugins = {} + +function keywordRegexp(words) { + return new RegExp("^(" + words.replace(/ /g, "|") + ")$") +} + +var Parser = function Parser(options, input, startPos) { + this.options = options = getOptions(options) + this.sourceFile = options.sourceFile + this.keywords = keywordRegexp(keywords[options.ecmaVersion >= 6 ? 6 : 5]) + var reserved = "" + if (!options.allowReserved) { + for (var v = options.ecmaVersion;; v--) + if (reserved = reservedWords[v]) break + if (options.sourceType == "module") reserved += " await" + } + this.reservedWords = keywordRegexp(reserved) + var reservedStrict = (reserved ? reserved + " " : "") + reservedWords.strict + this.reservedWordsStrict = keywordRegexp(reservedStrict) + this.reservedWordsStrictBind = keywordRegexp(reservedStrict + " " + reservedWords.strictBind) + this.input = String(input) + + // Used to signal to callers of `readWord1` whether the word + // contained any escape sequences. This is needed because words with + // escape sequences must not be interpreted as keywords. + this.containsEsc = false + + // Load plugins + this.loadPlugins(options.plugins) + + // Set up token state + + // The current position of the tokenizer in the input. + if (startPos) { + this.pos = startPos + this.lineStart = this.input.lastIndexOf("\n", startPos - 1) + 1 + this.curLine = this.input.slice(0, this.lineStart).split(lineBreak).length + } else { + this.pos = this.lineStart = 0 + this.curLine = 1 + } + + // Properties of the current token: + // Its type + this.type = tt.eof + // For tokens that include more information than their type, the value + this.value = null + // Its start and end offset + this.start = this.end = this.pos + // And, if locations are used, the {line, column} object + // corresponding to those offsets + this.startLoc = this.endLoc = this.curPosition() + + // Position information for the previous token + this.lastTokEndLoc = this.lastTokStartLoc = null + this.lastTokStart = this.lastTokEnd = this.pos + + // The context stack is used to superficially track syntactic + // context to predict whether a regular expression is allowed in a + // given position. + this.context = this.initialContext() + this.exprAllowed = true + + // Figure out if it's a module code. + this.inModule = options.sourceType === "module" + this.strict = this.inModule || this.strictDirective(this.pos) + + // Used to signify the start of a potential arrow function + this.potentialArrowAt = -1 + + // Flags to track whether we are in a function, a generator, an async function. + this.inFunction = this.inGenerator = this.inAsync = false + // Positions to delayed-check that yield/await does not exist in default parameters. + this.yieldPos = this.awaitPos = 0 + // Labels in scope. + this.labels = [] + + // If enabled, skip leading hashbang line. + if (this.pos === 0 && options.allowHashBang && this.input.slice(0, 2) === '#!') + this.skipLineComment(2) +}; + +// DEPRECATED Kept for backwards compatibility until 3.0 in case a plugin uses them +Parser.prototype.isKeyword = function isKeyword (word) { return this.keywords.test(word) }; +Parser.prototype.isReservedWord = function isReservedWord (word) { return this.reservedWords.test(word) }; + +Parser.prototype.extend = function extend (name, f) { + this[name] = f(this[name]) +}; + +Parser.prototype.loadPlugins = function loadPlugins (pluginConfigs) { + var this$1 = this; + + for (var name in pluginConfigs) { + var plugin = plugins[name] + if (!plugin) throw new Error("Plugin '" + name + "' not found") + plugin(this$1, pluginConfigs[name]) + } +}; + +Parser.prototype.parse = function parse () { + var node = this.options.program || this.startNode() + this.nextToken() + return this.parseTopLevel(node) +}; + +var pp = Parser.prototype + +// ## Parser utilities + +var literal = /^(?:'((?:[^\']|\.)*)'|"((?:[^\"]|\.)*)"|;)/ +pp.strictDirective = function(start) { + var this$1 = this; + + for (;;) { + skipWhiteSpace.lastIndex = start + start += skipWhiteSpace.exec(this$1.input)[0].length + var match = literal.exec(this$1.input.slice(start)) + if (!match) return false + if ((match[1] || match[2]) == "use strict") return true + start += match[0].length + } +} + +// Predicate that tests whether the next token is of the given +// type, and if yes, consumes it as a side effect. + +pp.eat = function(type) { + if (this.type === type) { + this.next() + return true + } else { + return false + } +} + +// Tests whether parsed token is a contextual keyword. + +pp.isContextual = function(name) { + return this.type === tt.name && this.value === name +} + +// Consumes contextual keyword if possible. + +pp.eatContextual = function(name) { + return this.value === name && this.eat(tt.name) +} + +// Asserts that following token is given contextual keyword. + +pp.expectContextual = function(name) { + if (!this.eatContextual(name)) this.unexpected() +} + +// Test whether a semicolon can be inserted at the current position. + +pp.canInsertSemicolon = function() { + return this.type === tt.eof || + this.type === tt.braceR || + lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) +} + +pp.insertSemicolon = function() { + if (this.canInsertSemicolon()) { + if (this.options.onInsertedSemicolon) + this.options.onInsertedSemicolon(this.lastTokEnd, this.lastTokEndLoc) + return true + } +} + +// Consume a semicolon, or, failing that, see if we are allowed to +// pretend that there is a semicolon at this position. + +pp.semicolon = function() { + if (!this.eat(tt.semi) && !this.insertSemicolon()) this.unexpected() +} + +pp.afterTrailingComma = function(tokType, notNext) { + if (this.type == tokType) { + if (this.options.onTrailingComma) + this.options.onTrailingComma(this.lastTokStart, this.lastTokStartLoc) + if (!notNext) + this.next() + return true + } +} + +// Expect a token of a given type. If found, consume it, otherwise, +// raise an unexpected token error. + +pp.expect = function(type) { + this.eat(type) || this.unexpected() +} + +// Raise an unexpected token error. + +pp.unexpected = function(pos) { + this.raise(pos != null ? pos : this.start, "Unexpected token") +} + +var DestructuringErrors = function DestructuringErrors() { + this.shorthandAssign = this.trailingComma = this.parenthesizedAssign = this.parenthesizedBind = -1 +}; + +pp.checkPatternErrors = function(refDestructuringErrors, isAssign) { + if (!refDestructuringErrors) return + if (refDestructuringErrors.trailingComma > -1) + this.raiseRecoverable(refDestructuringErrors.trailingComma, "Comma is not permitted after the rest element") + var parens = isAssign ? refDestructuringErrors.parenthesizedAssign : refDestructuringErrors.parenthesizedBind + if (parens > -1) this.raiseRecoverable(parens, "Parenthesized pattern") +} + +pp.checkExpressionErrors = function(refDestructuringErrors, andThrow) { + var pos = refDestructuringErrors ? refDestructuringErrors.shorthandAssign : -1 + if (!andThrow) return pos >= 0 + if (pos > -1) this.raise(pos, "Shorthand property assignments are valid only in destructuring patterns") +} + +pp.checkYieldAwaitInDefaultParams = function() { + if (this.yieldPos && (!this.awaitPos || this.yieldPos < this.awaitPos)) + this.raise(this.yieldPos, "Yield expression cannot be a default value") + if (this.awaitPos) + this.raise(this.awaitPos, "Await expression cannot be a default value") +} + +pp.isSimpleAssignTarget = function(expr) { + if (expr.type === "ParenthesizedExpression") + return this.isSimpleAssignTarget(expr.expression) + return expr.type === "Identifier" || expr.type === "MemberExpression" +} + +var pp$1 = Parser.prototype + +// ### Statement parsing + +// Parse a program. Initializes the parser, reads any number of +// statements, and wraps them in a Program node. Optionally takes a +// `program` argument. If present, the statements will be appended +// to its body instead of creating a new node. + +pp$1.parseTopLevel = function(node) { + var this$1 = this; + + var exports = {} + if (!node.body) node.body = [] + while (this.type !== tt.eof) { + var stmt = this$1.parseStatement(true, true, exports) + node.body.push(stmt) + } + this.next() + if (this.options.ecmaVersion >= 6) { + node.sourceType = this.options.sourceType + } + return this.finishNode(node, "Program") +} + +var loopLabel = {kind: "loop"}; +var switchLabel = {kind: "switch"}; +pp$1.isLet = function() { + if (this.type !== tt.name || this.options.ecmaVersion < 6 || this.value != "let") return false + skipWhiteSpace.lastIndex = this.pos + var skip = skipWhiteSpace.exec(this.input) + var next = this.pos + skip[0].length, nextCh = this.input.charCodeAt(next) + if (nextCh === 91 || nextCh == 123) return true // '{' and '[' + if (isIdentifierStart(nextCh, true)) { + for (var pos = next + 1; isIdentifierChar(this.input.charCodeAt(pos), true); ++pos) {} + var ident = this.input.slice(next, pos) + if (!this.isKeyword(ident)) return true + } + return false +} + +// check 'async [no LineTerminator here] function' +// - 'async /*foo*/ function' is OK. +// - 'async /*\n*/ function' is invalid. +pp$1.isAsyncFunction = function() { + if (this.type !== tt.name || this.options.ecmaVersion < 8 || this.value != "async") + return false + + skipWhiteSpace.lastIndex = this.pos + var skip = skipWhiteSpace.exec(this.input) + var next = this.pos + skip[0].length + return !lineBreak.test(this.input.slice(this.pos, next)) && + this.input.slice(next, next + 8) === "function" && + (next + 8 == this.input.length || !isIdentifierChar(this.input.charAt(next + 8))) +} + +// Parse a single statement. +// +// If expecting a statement and finding a slash operator, parse a +// regular expression literal. This is to handle cases like +// `if (foo) /blah/.exec(foo)`, where looking at the previous token +// does not help. + +pp$1.parseStatement = function(declaration, topLevel, exports) { + var starttype = this.type, node = this.startNode(), kind + + if (this.isLet()) { + starttype = tt._var + kind = "let" + } + + // Most types of statements are recognized by the keyword they + // start with. Many are trivial to parse, some require a bit of + // complexity. + + switch (starttype) { + case tt._break: case tt._continue: return this.parseBreakContinueStatement(node, starttype.keyword) + case tt._debugger: return this.parseDebuggerStatement(node) + case tt._do: return this.parseDoStatement(node) + case tt._for: return this.parseForStatement(node) + case tt._function: + if (!declaration && this.options.ecmaVersion >= 6) this.unexpected() + return this.parseFunctionStatement(node, false) + case tt._class: + if (!declaration) this.unexpected() + return this.parseClass(node, true) + case tt._if: return this.parseIfStatement(node) + case tt._return: return this.parseReturnStatement(node) + case tt._switch: return this.parseSwitchStatement(node) + case tt._throw: return this.parseThrowStatement(node) + case tt._try: return this.parseTryStatement(node) + case tt._const: case tt._var: + kind = kind || this.value + if (!declaration && kind != "var") this.unexpected() + return this.parseVarStatement(node, kind) + case tt._while: return this.parseWhileStatement(node) + case tt._with: return this.parseWithStatement(node) + case tt.braceL: return this.parseBlock() + case tt.semi: return this.parseEmptyStatement(node) + case tt._export: + case tt._import: + if (!this.options.allowImportExportEverywhere) { + if (!topLevel) + this.raise(this.start, "'import' and 'export' may only appear at the top level") + if (!this.inModule) + this.raise(this.start, "'import' and 'export' may appear only with 'sourceType: module'") + } + return starttype === tt._import ? this.parseImport(node) : this.parseExport(node, exports) + + // If the statement does not start with a statement keyword or a + // brace, it's an ExpressionStatement or LabeledStatement. We + // simply start parsing an expression, and afterwards, if the + // next token is a colon and the expression was a simple + // Identifier node, we switch to interpreting it as a label. + default: + if (this.isAsyncFunction() && declaration) { + this.next() + return this.parseFunctionStatement(node, true) + } + + var maybeName = this.value, expr = this.parseExpression() + if (starttype === tt.name && expr.type === "Identifier" && this.eat(tt.colon)) + return this.parseLabeledStatement(node, maybeName, expr) + else return this.parseExpressionStatement(node, expr) + } +} + +pp$1.parseBreakContinueStatement = function(node, keyword) { + var this$1 = this; + + var isBreak = keyword == "break" + this.next() + if (this.eat(tt.semi) || this.insertSemicolon()) node.label = null + else if (this.type !== tt.name) this.unexpected() + else { + node.label = this.parseIdent() + this.semicolon() + } + + // Verify that there is an actual destination to break or + // continue to. + for (var i = 0; i < this.labels.length; ++i) { + var lab = this$1.labels[i] + if (node.label == null || lab.name === node.label.name) { + if (lab.kind != null && (isBreak || lab.kind === "loop")) break + if (node.label && isBreak) break + } + } + if (i === this.labels.length) this.raise(node.start, "Unsyntactic " + keyword) + return this.finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement") +} + +pp$1.parseDebuggerStatement = function(node) { + this.next() + this.semicolon() + return this.finishNode(node, "DebuggerStatement") +} + +pp$1.parseDoStatement = function(node) { + this.next() + this.labels.push(loopLabel) + node.body = this.parseStatement(false) + this.labels.pop() + this.expect(tt._while) + node.test = this.parseParenExpression() + if (this.options.ecmaVersion >= 6) + this.eat(tt.semi) + else + this.semicolon() + return this.finishNode(node, "DoWhileStatement") +} + +// Disambiguating between a `for` and a `for`/`in` or `for`/`of` +// loop is non-trivial. Basically, we have to parse the init `var` +// statement or expression, disallowing the `in` operator (see +// the second parameter to `parseExpression`), and then check +// whether the next token is `in` or `of`. When there is no init +// part (semicolon immediately after the opening parenthesis), it +// is a regular `for` loop. + +pp$1.parseForStatement = function(node) { + this.next() + this.labels.push(loopLabel) + this.expect(tt.parenL) + if (this.type === tt.semi) return this.parseFor(node, null) + var isLet = this.isLet() + if (this.type === tt._var || this.type === tt._const || isLet) { + var init$1 = this.startNode(), kind = isLet ? "let" : this.value + this.next() + this.parseVar(init$1, true, kind) + this.finishNode(init$1, "VariableDeclaration") + if ((this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) && init$1.declarations.length === 1 && + !(kind !== "var" && init$1.declarations[0].init)) + return this.parseForIn(node, init$1) + return this.parseFor(node, init$1) + } + var refDestructuringErrors = new DestructuringErrors + var init = this.parseExpression(true, refDestructuringErrors) + if (this.type === tt._in || (this.options.ecmaVersion >= 6 && this.isContextual("of"))) { + this.toAssignable(init) + this.checkLVal(init) + this.checkPatternErrors(refDestructuringErrors, true) + return this.parseForIn(node, init) + } else { + this.checkExpressionErrors(refDestructuringErrors, true) + } + return this.parseFor(node, init) +} + +pp$1.parseFunctionStatement = function(node, isAsync) { + this.next() + return this.parseFunction(node, true, false, isAsync) +} + +pp$1.isFunction = function() { + return this.type === tt._function || this.isAsyncFunction() +} + +pp$1.parseIfStatement = function(node) { + this.next() + node.test = this.parseParenExpression() + // allow function declarations in branches, but only in non-strict mode + node.consequent = this.parseStatement(!this.strict && this.isFunction()) + node.alternate = this.eat(tt._else) ? this.parseStatement(!this.strict && this.isFunction()) : null + return this.finishNode(node, "IfStatement") +} + +pp$1.parseReturnStatement = function(node) { + if (!this.inFunction && !this.options.allowReturnOutsideFunction) + this.raise(this.start, "'return' outside of function") + this.next() + + // In `return` (and `break`/`continue`), the keywords with + // optional arguments, we eagerly look for a semicolon or the + // possibility to insert one. + + if (this.eat(tt.semi) || this.insertSemicolon()) node.argument = null + else { node.argument = this.parseExpression(); this.semicolon() } + return this.finishNode(node, "ReturnStatement") +} + +pp$1.parseSwitchStatement = function(node) { + var this$1 = this; + + this.next() + node.discriminant = this.parseParenExpression() + node.cases = [] + this.expect(tt.braceL) + this.labels.push(switchLabel) + + // Statements under must be grouped (by label) in SwitchCase + // nodes. `cur` is used to keep the node that we are currently + // adding statements to. + + for (var cur, sawDefault = false; this.type != tt.braceR;) { + if (this$1.type === tt._case || this$1.type === tt._default) { + var isCase = this$1.type === tt._case + if (cur) this$1.finishNode(cur, "SwitchCase") + node.cases.push(cur = this$1.startNode()) + cur.consequent = [] + this$1.next() + if (isCase) { + cur.test = this$1.parseExpression() + } else { + if (sawDefault) this$1.raiseRecoverable(this$1.lastTokStart, "Multiple default clauses") + sawDefault = true + cur.test = null + } + this$1.expect(tt.colon) + } else { + if (!cur) this$1.unexpected() + cur.consequent.push(this$1.parseStatement(true)) + } + } + if (cur) this.finishNode(cur, "SwitchCase") + this.next() // Closing brace + this.labels.pop() + return this.finishNode(node, "SwitchStatement") +} + +pp$1.parseThrowStatement = function(node) { + this.next() + if (lineBreak.test(this.input.slice(this.lastTokEnd, this.start))) + this.raise(this.lastTokEnd, "Illegal newline after throw") + node.argument = this.parseExpression() + this.semicolon() + return this.finishNode(node, "ThrowStatement") +} + +// Reused empty array added for node fields that are always empty. + +var empty = [] + +pp$1.parseTryStatement = function(node) { + this.next() + node.block = this.parseBlock() + node.handler = null + if (this.type === tt._catch) { + var clause = this.startNode() + this.next() + this.expect(tt.parenL) + clause.param = this.parseBindingAtom() + this.checkLVal(clause.param, true) + this.expect(tt.parenR) + clause.body = this.parseBlock() + node.handler = this.finishNode(clause, "CatchClause") + } + node.finalizer = this.eat(tt._finally) ? this.parseBlock() : null + if (!node.handler && !node.finalizer) + this.raise(node.start, "Missing catch or finally clause") + return this.finishNode(node, "TryStatement") +} + +pp$1.parseVarStatement = function(node, kind) { + this.next() + this.parseVar(node, false, kind) + this.semicolon() + return this.finishNode(node, "VariableDeclaration") +} + +pp$1.parseWhileStatement = function(node) { + this.next() + node.test = this.parseParenExpression() + this.labels.push(loopLabel) + node.body = this.parseStatement(false) + this.labels.pop() + return this.finishNode(node, "WhileStatement") +} + +pp$1.parseWithStatement = function(node) { + if (this.strict) this.raise(this.start, "'with' in strict mode") + this.next() + node.object = this.parseParenExpression() + node.body = this.parseStatement(false) + return this.finishNode(node, "WithStatement") +} + +pp$1.parseEmptyStatement = function(node) { + this.next() + return this.finishNode(node, "EmptyStatement") +} + +pp$1.parseLabeledStatement = function(node, maybeName, expr) { + var this$1 = this; + + for (var i = 0; i < this.labels.length; ++i) + if (this$1.labels[i].name === maybeName) this$1.raise(expr.start, "Label '" + maybeName + "' is already declared") + var kind = this.type.isLoop ? "loop" : this.type === tt._switch ? "switch" : null + for (var i$1 = this.labels.length - 1; i$1 >= 0; i$1--) { + var label = this$1.labels[i$1] + if (label.statementStart == node.start) { + label.statementStart = this$1.start + label.kind = kind + } else break + } + this.labels.push({name: maybeName, kind: kind, statementStart: this.start}) + node.body = this.parseStatement(true) + if (node.body.type == "ClassDeclaration" || + node.body.type == "VariableDeclaration" && (this.strict || node.body.kind != "var") || + node.body.type == "FunctionDeclaration" && (this.strict || node.body.generator)) + this.raiseRecoverable(node.body.start, "Invalid labeled declaration") + this.labels.pop() + node.label = expr + return this.finishNode(node, "LabeledStatement") +} + +pp$1.parseExpressionStatement = function(node, expr) { + node.expression = expr + this.semicolon() + return this.finishNode(node, "ExpressionStatement") +} + +// Parse a semicolon-enclosed block of statements, handling `"use +// strict"` declarations when `allowStrict` is true (used for +// function bodies). + +pp$1.parseBlock = function() { + var this$1 = this; + + var node = this.startNode() + node.body = [] + this.expect(tt.braceL) + while (!this.eat(tt.braceR)) { + var stmt = this$1.parseStatement(true) + node.body.push(stmt) + } + return this.finishNode(node, "BlockStatement") +} + +// Parse a regular `for` loop. The disambiguation code in +// `parseStatement` will already have parsed the init statement or +// expression. + +pp$1.parseFor = function(node, init) { + node.init = init + this.expect(tt.semi) + node.test = this.type === tt.semi ? null : this.parseExpression() + this.expect(tt.semi) + node.update = this.type === tt.parenR ? null : this.parseExpression() + this.expect(tt.parenR) + node.body = this.parseStatement(false) + this.labels.pop() + return this.finishNode(node, "ForStatement") +} + +// Parse a `for`/`in` and `for`/`of` loop, which are almost +// same from parser's perspective. + +pp$1.parseForIn = function(node, init) { + var type = this.type === tt._in ? "ForInStatement" : "ForOfStatement" + this.next() + node.left = init + node.right = this.parseExpression() + this.expect(tt.parenR) + node.body = this.parseStatement(false) + this.labels.pop() + return this.finishNode(node, type) +} + +// Parse a list of variable declarations. + +pp$1.parseVar = function(node, isFor, kind) { + var this$1 = this; + + node.declarations = [] + node.kind = kind + for (;;) { + var decl = this$1.startNode() + this$1.parseVarId(decl) + if (this$1.eat(tt.eq)) { + decl.init = this$1.parseMaybeAssign(isFor) + } else if (kind === "const" && !(this$1.type === tt._in || (this$1.options.ecmaVersion >= 6 && this$1.isContextual("of")))) { + this$1.unexpected() + } else if (decl.id.type != "Identifier" && !(isFor && (this$1.type === tt._in || this$1.isContextual("of")))) { + this$1.raise(this$1.lastTokEnd, "Complex binding patterns require an initialization value") + } else { + decl.init = null + } + node.declarations.push(this$1.finishNode(decl, "VariableDeclarator")) + if (!this$1.eat(tt.comma)) break + } + return node +} + +pp$1.parseVarId = function(decl) { + decl.id = this.parseBindingAtom() + this.checkLVal(decl.id, true) +} + +// Parse a function declaration or literal (depending on the +// `isStatement` parameter). + +pp$1.parseFunction = function(node, isStatement, allowExpressionBody, isAsync) { + this.initFunction(node) + if (this.options.ecmaVersion >= 6 && !isAsync) + node.generator = this.eat(tt.star) + if (this.options.ecmaVersion >= 8) + node.async = !!isAsync + + if (isStatement == null) + isStatement = this.type == tt.name + if (isStatement) + node.id = this.parseIdent() + + var oldInGen = this.inGenerator, oldInAsync = this.inAsync, + oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldInFunc = this.inFunction + this.inGenerator = node.generator + this.inAsync = node.async + this.yieldPos = 0 + this.awaitPos = 0 + this.inFunction = true + + if (!isStatement && this.type === tt.name) + node.id = this.parseIdent() + this.parseFunctionParams(node) + this.parseFunctionBody(node, allowExpressionBody) + + this.inGenerator = oldInGen + this.inAsync = oldInAsync + this.yieldPos = oldYieldPos + this.awaitPos = oldAwaitPos + this.inFunction = oldInFunc + return this.finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression") +} + +pp$1.parseFunctionParams = function(node) { + this.expect(tt.parenL) + node.params = this.parseBindingList(tt.parenR, false, this.options.ecmaVersion >= 8, true) + this.checkYieldAwaitInDefaultParams() +} + +// Parse a class declaration or literal (depending on the +// `isStatement` parameter). + +pp$1.parseClass = function(node, isStatement) { + var this$1 = this; + + this.next() + if (isStatement == null) isStatement = this.type === tt.name + this.parseClassId(node, isStatement) + this.parseClassSuper(node) + var classBody = this.startNode() + var hadConstructor = false + classBody.body = [] + this.expect(tt.braceL) + while (!this.eat(tt.braceR)) { + if (this$1.eat(tt.semi)) continue + var method = this$1.startNode() + var isGenerator = this$1.eat(tt.star) + var isAsync = false + var isMaybeStatic = this$1.type === tt.name && this$1.value === "static" + this$1.parsePropertyName(method) + method.static = isMaybeStatic && this$1.type !== tt.parenL + if (method.static) { + if (isGenerator) this$1.unexpected() + isGenerator = this$1.eat(tt.star) + this$1.parsePropertyName(method) + } + if (this$1.options.ecmaVersion >= 8 && !isGenerator && !method.computed && + method.key.type === "Identifier" && method.key.name === "async" && this$1.type !== tt.parenL && + !this$1.canInsertSemicolon()) { + isAsync = true + this$1.parsePropertyName(method) + } + method.kind = "method" + var isGetSet = false + if (!method.computed) { + var key = method.key; + if (!isGenerator && !isAsync && key.type === "Identifier" && this$1.type !== tt.parenL && (key.name === "get" || key.name === "set")) { + isGetSet = true + method.kind = key.name + key = this$1.parsePropertyName(method) + } + if (!method.static && (key.type === "Identifier" && key.name === "constructor" || + key.type === "Literal" && key.value === "constructor")) { + if (hadConstructor) this$1.raise(key.start, "Duplicate constructor in the same class") + if (isGetSet) this$1.raise(key.start, "Constructor can't have get/set modifier") + if (isGenerator) this$1.raise(key.start, "Constructor can't be a generator") + if (isAsync) this$1.raise(key.start, "Constructor can't be an async method") + method.kind = "constructor" + hadConstructor = true + } + } + this$1.parseClassMethod(classBody, method, isGenerator, isAsync) + if (isGetSet) { + var paramCount = method.kind === "get" ? 0 : 1 + if (method.value.params.length !== paramCount) { + var start = method.value.start + if (method.kind === "get") + this$1.raiseRecoverable(start, "getter should have no params") + else + this$1.raiseRecoverable(start, "setter should have exactly one param") + } else { + if (method.kind === "set" && method.value.params[0].type === "RestElement") + this$1.raiseRecoverable(method.value.params[0].start, "Setter cannot use rest params") + } + } + } + node.body = this.finishNode(classBody, "ClassBody") + return this.finishNode(node, isStatement ? "ClassDeclaration" : "ClassExpression") +} + +pp$1.parseClassMethod = function(classBody, method, isGenerator, isAsync) { + method.value = this.parseMethod(isGenerator, isAsync) + classBody.body.push(this.finishNode(method, "MethodDefinition")) +} + +pp$1.parseClassId = function(node, isStatement) { + node.id = this.type === tt.name ? this.parseIdent() : isStatement ? this.unexpected() : null +} + +pp$1.parseClassSuper = function(node) { + node.superClass = this.eat(tt._extends) ? this.parseExprSubscripts() : null +} + +// Parses module export declaration. + +pp$1.parseExport = function(node, exports) { + var this$1 = this; + + this.next() + // export * from '...' + if (this.eat(tt.star)) { + this.expectContextual("from") + node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected() + this.semicolon() + return this.finishNode(node, "ExportAllDeclaration") + } + if (this.eat(tt._default)) { // export default ... + this.checkExport(exports, "default", this.lastTokStart) + var isAsync + if (this.type === tt._function || (isAsync = this.isAsyncFunction())) { + var fNode = this.startNode() + this.next() + if (isAsync) this.next() + node.declaration = this.parseFunction(fNode, null, false, isAsync) + } else if (this.type === tt._class) { + var cNode = this.startNode() + node.declaration = this.parseClass(cNode, null) + } else { + node.declaration = this.parseMaybeAssign() + this.semicolon() + } + return this.finishNode(node, "ExportDefaultDeclaration") + } + // export var|const|let|function|class ... + if (this.shouldParseExportStatement()) { + node.declaration = this.parseStatement(true) + if (node.declaration.type === "VariableDeclaration") + this.checkVariableExport(exports, node.declaration.declarations) + else + this.checkExport(exports, node.declaration.id.name, node.declaration.id.start) + node.specifiers = [] + node.source = null + } else { // export { x, y as z } [from '...'] + node.declaration = null + node.specifiers = this.parseExportSpecifiers(exports) + if (this.eatContextual("from")) { + node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected() + } else { + // check for keywords used as local names + for (var i = 0; i < node.specifiers.length; i++) { + if (this$1.keywords.test(node.specifiers[i].local.name) || this$1.reservedWords.test(node.specifiers[i].local.name)) { + this$1.unexpected(node.specifiers[i].local.start) + } + } + + node.source = null + } + this.semicolon() + } + return this.finishNode(node, "ExportNamedDeclaration") +} + +pp$1.checkExport = function(exports, name, pos) { + if (!exports) return + if (Object.prototype.hasOwnProperty.call(exports, name)) + this.raiseRecoverable(pos, "Duplicate export '" + name + "'") + exports[name] = true +} + +pp$1.checkPatternExport = function(exports, pat) { + var this$1 = this; + + var type = pat.type + if (type == "Identifier") + this.checkExport(exports, pat.name, pat.start) + else if (type == "ObjectPattern") + for (var i = 0; i < pat.properties.length; ++i) + this$1.checkPatternExport(exports, pat.properties[i].value) + else if (type == "ArrayPattern") + for (var i$1 = 0; i$1 < pat.elements.length; ++i$1) { + var elt = pat.elements[i$1] + if (elt) this$1.checkPatternExport(exports, elt) + } + else if (type == "AssignmentPattern") + this.checkPatternExport(exports, pat.left) + else if (type == "ParenthesizedExpression") + this.checkPatternExport(exports, pat.expression) +} + +pp$1.checkVariableExport = function(exports, decls) { + var this$1 = this; + + if (!exports) return + for (var i = 0; i < decls.length; i++) + this$1.checkPatternExport(exports, decls[i].id) +} + +pp$1.shouldParseExportStatement = function() { + return this.type.keyword === "var" + || this.type.keyword === "const" + || this.type.keyword === "class" + || this.type.keyword === "function" + || this.isLet() + || this.isAsyncFunction() +} + +// Parses a comma-separated list of module exports. + +pp$1.parseExportSpecifiers = function(exports) { + var this$1 = this; + + var nodes = [], first = true + // export { x, y as z } [from '...'] + this.expect(tt.braceL) + while (!this.eat(tt.braceR)) { + if (!first) { + this$1.expect(tt.comma) + if (this$1.afterTrailingComma(tt.braceR)) break + } else first = false + + var node = this$1.startNode() + node.local = this$1.parseIdent(true) + node.exported = this$1.eatContextual("as") ? this$1.parseIdent(true) : node.local + this$1.checkExport(exports, node.exported.name, node.exported.start) + nodes.push(this$1.finishNode(node, "ExportSpecifier")) + } + return nodes +} + +// Parses import declaration. + +pp$1.parseImport = function(node) { + this.next() + // import '...' + if (this.type === tt.string) { + node.specifiers = empty + node.source = this.parseExprAtom() + } else { + node.specifiers = this.parseImportSpecifiers() + this.expectContextual("from") + node.source = this.type === tt.string ? this.parseExprAtom() : this.unexpected() + } + this.semicolon() + return this.finishNode(node, "ImportDeclaration") +} + +// Parses a comma-separated list of module imports. + +pp$1.parseImportSpecifiers = function() { + var this$1 = this; + + var nodes = [], first = true + if (this.type === tt.name) { + // import defaultObj, { x, y as z } from '...' + var node = this.startNode() + node.local = this.parseIdent() + this.checkLVal(node.local, true) + nodes.push(this.finishNode(node, "ImportDefaultSpecifier")) + if (!this.eat(tt.comma)) return nodes + } + if (this.type === tt.star) { + var node$1 = this.startNode() + this.next() + this.expectContextual("as") + node$1.local = this.parseIdent() + this.checkLVal(node$1.local, true) + nodes.push(this.finishNode(node$1, "ImportNamespaceSpecifier")) + return nodes + } + this.expect(tt.braceL) + while (!this.eat(tt.braceR)) { + if (!first) { + this$1.expect(tt.comma) + if (this$1.afterTrailingComma(tt.braceR)) break + } else first = false + + var node$2 = this$1.startNode() + node$2.imported = this$1.parseIdent(true) + if (this$1.eatContextual("as")) { + node$2.local = this$1.parseIdent() + } else { + node$2.local = node$2.imported + if (this$1.isKeyword(node$2.local.name)) this$1.unexpected(node$2.local.start) + if (this$1.reservedWordsStrict.test(node$2.local.name)) this$1.raiseRecoverable(node$2.local.start, "The keyword '" + node$2.local.name + "' is reserved") + } + this$1.checkLVal(node$2.local, true) + nodes.push(this$1.finishNode(node$2, "ImportSpecifier")) + } + return nodes +} + +var pp$2 = Parser.prototype + +// Convert existing expression atom to assignable pattern +// if possible. + +pp$2.toAssignable = function(node, isBinding) { + var this$1 = this; + + if (this.options.ecmaVersion >= 6 && node) { + switch (node.type) { + case "Identifier": + if (this.inAsync && node.name === "await") + this.raise(node.start, "Can not use 'await' as identifier inside an async function") + break + + case "ObjectPattern": + case "ArrayPattern": + break + + case "ObjectExpression": + node.type = "ObjectPattern" + for (var i = 0; i < node.properties.length; i++) { + var prop = node.properties[i] + if (prop.kind !== "init") this$1.raise(prop.key.start, "Object pattern can't contain getter or setter") + this$1.toAssignable(prop.value, isBinding) + } + break + + case "ArrayExpression": + node.type = "ArrayPattern" + this.toAssignableList(node.elements, isBinding) + break + + case "AssignmentExpression": + if (node.operator === "=") { + node.type = "AssignmentPattern" + delete node.operator + this.toAssignable(node.left, isBinding) + // falls through to AssignmentPattern + } else { + this.raise(node.left.end, "Only '=' operator can be used for specifying default value.") + break + } + + case "AssignmentPattern": + break + + case "ParenthesizedExpression": + node.expression = this.toAssignable(node.expression, isBinding) + break + + case "MemberExpression": + if (!isBinding) break + + default: + this.raise(node.start, "Assigning to rvalue") + } + } + return node +} + +// Convert list of expression atoms to binding list. + +pp$2.toAssignableList = function(exprList, isBinding) { + var this$1 = this; + + var end = exprList.length + if (end) { + var last = exprList[end - 1] + if (last && last.type == "RestElement") { + --end + } else if (last && last.type == "SpreadElement") { + last.type = "RestElement" + var arg = last.argument + this.toAssignable(arg, isBinding) + if (arg.type !== "Identifier" && arg.type !== "MemberExpression" && arg.type !== "ArrayPattern") + this.unexpected(arg.start) + --end + } + + if (isBinding && last && last.type === "RestElement" && last.argument.type !== "Identifier") + this.unexpected(last.argument.start) + } + for (var i = 0; i < end; i++) { + var elt = exprList[i] + if (elt) this$1.toAssignable(elt, isBinding) + } + return exprList +} + +// Parses spread element. + +pp$2.parseSpread = function(refDestructuringErrors) { + var node = this.startNode() + this.next() + node.argument = this.parseMaybeAssign(false, refDestructuringErrors) + return this.finishNode(node, "SpreadElement") +} + +pp$2.parseRest = function(allowNonIdent) { + var node = this.startNode() + this.next() + + // RestElement inside of a function parameter must be an identifier + if (allowNonIdent) node.argument = this.type === tt.name ? this.parseIdent() : this.unexpected() + else node.argument = this.type === tt.name || this.type === tt.bracketL ? this.parseBindingAtom() : this.unexpected() + + return this.finishNode(node, "RestElement") +} + +// Parses lvalue (assignable) atom. + +pp$2.parseBindingAtom = function() { + if (this.options.ecmaVersion < 6) return this.parseIdent() + switch (this.type) { + case tt.name: + return this.parseIdent() + + case tt.bracketL: + var node = this.startNode() + this.next() + node.elements = this.parseBindingList(tt.bracketR, true, true) + return this.finishNode(node, "ArrayPattern") + + case tt.braceL: + return this.parseObj(true) + + default: + this.unexpected() + } +} + +pp$2.parseBindingList = function(close, allowEmpty, allowTrailingComma, allowNonIdent) { + var this$1 = this; + + var elts = [], first = true + while (!this.eat(close)) { + if (first) first = false + else this$1.expect(tt.comma) + if (allowEmpty && this$1.type === tt.comma) { + elts.push(null) + } else if (allowTrailingComma && this$1.afterTrailingComma(close)) { + break + } else if (this$1.type === tt.ellipsis) { + var rest = this$1.parseRest(allowNonIdent) + this$1.parseBindingListItem(rest) + elts.push(rest) + if (this$1.type === tt.comma) this$1.raise(this$1.start, "Comma is not permitted after the rest element") + this$1.expect(close) + break + } else { + var elem = this$1.parseMaybeDefault(this$1.start, this$1.startLoc) + this$1.parseBindingListItem(elem) + elts.push(elem) + } + } + return elts +} + +pp$2.parseBindingListItem = function(param) { + return param +} + +// Parses assignment pattern around given atom if possible. + +pp$2.parseMaybeDefault = function(startPos, startLoc, left) { + left = left || this.parseBindingAtom() + if (this.options.ecmaVersion < 6 || !this.eat(tt.eq)) return left + var node = this.startNodeAt(startPos, startLoc) + node.left = left + node.right = this.parseMaybeAssign() + return this.finishNode(node, "AssignmentPattern") +} + +// Verify that a node is an lval — something that can be assigned +// to. + +pp$2.checkLVal = function(expr, isBinding, checkClashes) { + var this$1 = this; + + switch (expr.type) { + case "Identifier": + if (this.strict && this.reservedWordsStrictBind.test(expr.name)) + this.raiseRecoverable(expr.start, (isBinding ? "Binding " : "Assigning to ") + expr.name + " in strict mode") + if (checkClashes) { + if (has(checkClashes, expr.name)) + this.raiseRecoverable(expr.start, "Argument name clash") + checkClashes[expr.name] = true + } + break + + case "MemberExpression": + if (isBinding) this.raiseRecoverable(expr.start, (isBinding ? "Binding" : "Assigning to") + " member expression") + break + + case "ObjectPattern": + for (var i = 0; i < expr.properties.length; i++) + this$1.checkLVal(expr.properties[i].value, isBinding, checkClashes) + break + + case "ArrayPattern": + for (var i$1 = 0; i$1 < expr.elements.length; i$1++) { + var elem = expr.elements[i$1] + if (elem) this$1.checkLVal(elem, isBinding, checkClashes) + } + break + + case "AssignmentPattern": + this.checkLVal(expr.left, isBinding, checkClashes) + break + + case "RestElement": + this.checkLVal(expr.argument, isBinding, checkClashes) + break + + case "ParenthesizedExpression": + this.checkLVal(expr.expression, isBinding, checkClashes) + break + + default: + this.raise(expr.start, (isBinding ? "Binding" : "Assigning to") + " rvalue") + } +} + +// A recursive descent parser operates by defining functions for all +// syntactic elements, and recursively calling those, each function +// advancing the input stream and returning an AST node. Precedence +// of constructs (for example, the fact that `!x[1]` means `!(x[1])` +// instead of `(!x)[1]` is handled by the fact that the parser +// function that parses unary prefix operators is called first, and +// in turn calls the function that parses `[]` subscripts — that +// way, it'll receive the node for `x[1]` already parsed, and wraps +// *that* in the unary operator node. +// +// Acorn uses an [operator precedence parser][opp] to handle binary +// operator precedence, because it is much more compact than using +// the technique outlined above, which uses different, nesting +// functions to specify precedence, for all of the ten binary +// precedence levels that JavaScript defines. +// +// [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser + +var pp$3 = Parser.prototype + +// Check if property name clashes with already added. +// Object/class getters and setters are not allowed to clash — +// either with each other or with an init property — and in +// strict mode, init properties are also not allowed to be repeated. + +pp$3.checkPropClash = function(prop, propHash) { + if (this.options.ecmaVersion >= 6 && (prop.computed || prop.method || prop.shorthand)) + return + var key = prop.key; + var name + switch (key.type) { + case "Identifier": name = key.name; break + case "Literal": name = String(key.value); break + default: return + } + var kind = prop.kind; + if (this.options.ecmaVersion >= 6) { + if (name === "__proto__" && kind === "init") { + if (propHash.proto) this.raiseRecoverable(key.start, "Redefinition of __proto__ property") + propHash.proto = true + } + return + } + name = "$" + name + var other = propHash[name] + if (other) { + var isGetSet = kind !== "init" + if ((this.strict || isGetSet) && other[kind] || !(isGetSet ^ other.init)) + this.raiseRecoverable(key.start, "Redefinition of property") + } else { + other = propHash[name] = { + init: false, + get: false, + set: false + } + } + other[kind] = true +} + +// ### Expression parsing + +// These nest, from the most general expression type at the top to +// 'atomic', nondivisible expression types at the bottom. Most of +// the functions will simply let the function(s) below them parse, +// and, *if* the syntactic construct they handle is present, wrap +// the AST node that the inner parser gave them in another node. + +// Parse a full expression. The optional arguments are used to +// forbid the `in` operator (in for loops initalization expressions) +// and provide reference for storing '=' operator inside shorthand +// property assignment in contexts where both object expression +// and object pattern might appear (so it's possible to raise +// delayed syntax error at correct position). + +pp$3.parseExpression = function(noIn, refDestructuringErrors) { + var this$1 = this; + + var startPos = this.start, startLoc = this.startLoc + var expr = this.parseMaybeAssign(noIn, refDestructuringErrors) + if (this.type === tt.comma) { + var node = this.startNodeAt(startPos, startLoc) + node.expressions = [expr] + while (this.eat(tt.comma)) node.expressions.push(this$1.parseMaybeAssign(noIn, refDestructuringErrors)) + return this.finishNode(node, "SequenceExpression") + } + return expr +} + +// Parse an assignment expression. This includes applications of +// operators like `+=`. + +pp$3.parseMaybeAssign = function(noIn, refDestructuringErrors, afterLeftParse) { + if (this.inGenerator && this.isContextual("yield")) return this.parseYield() + + var ownDestructuringErrors = false, oldParenAssign = -1 + if (refDestructuringErrors) { + oldParenAssign = refDestructuringErrors.parenthesizedAssign + refDestructuringErrors.parenthesizedAssign = -1 + } else { + refDestructuringErrors = new DestructuringErrors + ownDestructuringErrors = true + } + + var startPos = this.start, startLoc = this.startLoc + if (this.type == tt.parenL || this.type == tt.name) + this.potentialArrowAt = this.start + var left = this.parseMaybeConditional(noIn, refDestructuringErrors) + if (afterLeftParse) left = afterLeftParse.call(this, left, startPos, startLoc) + if (this.type.isAssign) { + this.checkPatternErrors(refDestructuringErrors, true) + if (!ownDestructuringErrors) DestructuringErrors.call(refDestructuringErrors) + var node = this.startNodeAt(startPos, startLoc) + node.operator = this.value + node.left = this.type === tt.eq ? this.toAssignable(left) : left + refDestructuringErrors.shorthandAssign = -1 // reset because shorthand default was used correctly + this.checkLVal(left) + this.next() + node.right = this.parseMaybeAssign(noIn) + return this.finishNode(node, "AssignmentExpression") + } else { + if (ownDestructuringErrors) this.checkExpressionErrors(refDestructuringErrors, true) + } + if (oldParenAssign > -1) refDestructuringErrors.parenthesizedAssign = oldParenAssign + return left +} + +// Parse a ternary conditional (`?:`) operator. + +pp$3.parseMaybeConditional = function(noIn, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc + var expr = this.parseExprOps(noIn, refDestructuringErrors) + if (this.checkExpressionErrors(refDestructuringErrors)) return expr + if (this.eat(tt.question)) { + var node = this.startNodeAt(startPos, startLoc) + node.test = expr + node.consequent = this.parseMaybeAssign() + this.expect(tt.colon) + node.alternate = this.parseMaybeAssign(noIn) + return this.finishNode(node, "ConditionalExpression") + } + return expr +} + +// Start the precedence parser. + +pp$3.parseExprOps = function(noIn, refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc + var expr = this.parseMaybeUnary(refDestructuringErrors, false) + if (this.checkExpressionErrors(refDestructuringErrors)) return expr + return this.parseExprOp(expr, startPos, startLoc, -1, noIn) +} + +// Parse binary operators with the operator precedence parsing +// algorithm. `left` is the left-hand side of the operator. +// `minPrec` provides context that allows the function to stop and +// defer further parser to one of its callers when it encounters an +// operator that has a lower precedence than the set it is parsing. + +pp$3.parseExprOp = function(left, leftStartPos, leftStartLoc, minPrec, noIn) { + var prec = this.type.binop + if (prec != null && (!noIn || this.type !== tt._in)) { + if (prec > minPrec) { + var logical = this.type === tt.logicalOR || this.type === tt.logicalAND + var op = this.value + this.next() + var startPos = this.start, startLoc = this.startLoc + var right = this.parseExprOp(this.parseMaybeUnary(null, false), startPos, startLoc, prec, noIn) + var node = this.buildBinary(leftStartPos, leftStartLoc, left, right, op, logical) + return this.parseExprOp(node, leftStartPos, leftStartLoc, minPrec, noIn) + } + } + return left +} + +pp$3.buildBinary = function(startPos, startLoc, left, right, op, logical) { + var node = this.startNodeAt(startPos, startLoc) + node.left = left + node.operator = op + node.right = right + return this.finishNode(node, logical ? "LogicalExpression" : "BinaryExpression") +} + +// Parse unary operators, both prefix and postfix. + +pp$3.parseMaybeUnary = function(refDestructuringErrors, sawUnary) { + var this$1 = this; + + var startPos = this.start, startLoc = this.startLoc, expr + if (this.inAsync && this.isContextual("await")) { + expr = this.parseAwait(refDestructuringErrors) + sawUnary = true + } else if (this.type.prefix) { + var node = this.startNode(), update = this.type === tt.incDec + node.operator = this.value + node.prefix = true + this.next() + node.argument = this.parseMaybeUnary(null, true) + this.checkExpressionErrors(refDestructuringErrors, true) + if (update) this.checkLVal(node.argument) + else if (this.strict && node.operator === "delete" && + node.argument.type === "Identifier") + this.raiseRecoverable(node.start, "Deleting local variable in strict mode") + else sawUnary = true + expr = this.finishNode(node, update ? "UpdateExpression" : "UnaryExpression") + } else { + expr = this.parseExprSubscripts(refDestructuringErrors) + if (this.checkExpressionErrors(refDestructuringErrors)) return expr + while (this.type.postfix && !this.canInsertSemicolon()) { + var node$1 = this$1.startNodeAt(startPos, startLoc) + node$1.operator = this$1.value + node$1.prefix = false + node$1.argument = expr + this$1.checkLVal(expr) + this$1.next() + expr = this$1.finishNode(node$1, "UpdateExpression") + } + } + + if (!sawUnary && this.eat(tt.starstar)) + return this.buildBinary(startPos, startLoc, expr, this.parseMaybeUnary(null, false), "**", false) + else + return expr +} + +// Parse call, dot, and `[]`-subscript expressions. + +pp$3.parseExprSubscripts = function(refDestructuringErrors) { + var startPos = this.start, startLoc = this.startLoc + var expr = this.parseExprAtom(refDestructuringErrors) + var skipArrowSubscripts = expr.type === "ArrowFunctionExpression" && this.input.slice(this.lastTokStart, this.lastTokEnd) !== ")" + if (this.checkExpressionErrors(refDestructuringErrors) || skipArrowSubscripts) return expr + var result = this.parseSubscripts(expr, startPos, startLoc) + if (refDestructuringErrors && result.type === "MemberExpression") { + if (refDestructuringErrors.parenthesizedAssign >= result.start) refDestructuringErrors.parenthesizedAssign = -1 + if (refDestructuringErrors.parenthesizedBind >= result.start) refDestructuringErrors.parenthesizedBind = -1 + } + return result +} + +pp$3.parseSubscripts = function(base, startPos, startLoc, noCalls) { + var this$1 = this; + + var maybeAsyncArrow = this.options.ecmaVersion >= 8 && base.type === "Identifier" && base.name === "async" && + this.lastTokEnd == base.end && !this.canInsertSemicolon() + for (var computed;;) { + if ((computed = this$1.eat(tt.bracketL)) || this$1.eat(tt.dot)) { + var node = this$1.startNodeAt(startPos, startLoc) + node.object = base + node.property = computed ? this$1.parseExpression() : this$1.parseIdent(true) + node.computed = !!computed + if (computed) this$1.expect(tt.bracketR) + base = this$1.finishNode(node, "MemberExpression") + } else if (!noCalls && this$1.eat(tt.parenL)) { + var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this$1.yieldPos, oldAwaitPos = this$1.awaitPos + this$1.yieldPos = 0 + this$1.awaitPos = 0 + var exprList = this$1.parseExprList(tt.parenR, this$1.options.ecmaVersion >= 8, false, refDestructuringErrors) + if (maybeAsyncArrow && !this$1.canInsertSemicolon() && this$1.eat(tt.arrow)) { + this$1.checkPatternErrors(refDestructuringErrors, false) + this$1.checkYieldAwaitInDefaultParams() + this$1.yieldPos = oldYieldPos + this$1.awaitPos = oldAwaitPos + return this$1.parseArrowExpression(this$1.startNodeAt(startPos, startLoc), exprList, true) + } + this$1.checkExpressionErrors(refDestructuringErrors, true) + this$1.yieldPos = oldYieldPos || this$1.yieldPos + this$1.awaitPos = oldAwaitPos || this$1.awaitPos + var node$1 = this$1.startNodeAt(startPos, startLoc) + node$1.callee = base + node$1.arguments = exprList + base = this$1.finishNode(node$1, "CallExpression") + } else if (this$1.type === tt.backQuote) { + var node$2 = this$1.startNodeAt(startPos, startLoc) + node$2.tag = base + node$2.quasi = this$1.parseTemplate() + base = this$1.finishNode(node$2, "TaggedTemplateExpression") + } else { + return base + } + } +} + +// Parse an atomic expression — either a single token that is an +// expression, an expression started by a keyword like `function` or +// `new`, or an expression wrapped in punctuation like `()`, `[]`, +// or `{}`. + +pp$3.parseExprAtom = function(refDestructuringErrors) { + var node, canBeArrow = this.potentialArrowAt == this.start + switch (this.type) { + case tt._super: + if (!this.inFunction) + this.raise(this.start, "'super' outside of function or class") + + case tt._this: + var type = this.type === tt._this ? "ThisExpression" : "Super" + node = this.startNode() + this.next() + return this.finishNode(node, type) + + case tt.name: + var startPos = this.start, startLoc = this.startLoc + var id = this.parseIdent(this.type !== tt.name) + if (this.options.ecmaVersion >= 8 && id.name === "async" && !this.canInsertSemicolon() && this.eat(tt._function)) + return this.parseFunction(this.startNodeAt(startPos, startLoc), false, false, true) + if (canBeArrow && !this.canInsertSemicolon()) { + if (this.eat(tt.arrow)) + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], false) + if (this.options.ecmaVersion >= 8 && id.name === "async" && this.type === tt.name) { + id = this.parseIdent() + if (this.canInsertSemicolon() || !this.eat(tt.arrow)) + this.unexpected() + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), [id], true) + } + } + return id + + case tt.regexp: + var value = this.value + node = this.parseLiteral(value.value) + node.regex = {pattern: value.pattern, flags: value.flags} + return node + + case tt.num: case tt.string: + return this.parseLiteral(this.value) + + case tt._null: case tt._true: case tt._false: + node = this.startNode() + node.value = this.type === tt._null ? null : this.type === tt._true + node.raw = this.type.keyword + this.next() + return this.finishNode(node, "Literal") + + case tt.parenL: + var start = this.start, expr = this.parseParenAndDistinguishExpression(canBeArrow) + if (refDestructuringErrors) { + if (refDestructuringErrors.parenthesizedAssign < 0 && !this.isSimpleAssignTarget(expr)) + refDestructuringErrors.parenthesizedAssign = start + if (refDestructuringErrors.parenthesizedBind < 0) + refDestructuringErrors.parenthesizedBind = start + } + return expr + + case tt.bracketL: + node = this.startNode() + this.next() + node.elements = this.parseExprList(tt.bracketR, true, true, refDestructuringErrors) + return this.finishNode(node, "ArrayExpression") + + case tt.braceL: + return this.parseObj(false, refDestructuringErrors) + + case tt._function: + node = this.startNode() + this.next() + return this.parseFunction(node, false) + + case tt._class: + return this.parseClass(this.startNode(), false) + + case tt._new: + return this.parseNew() + + case tt.backQuote: + return this.parseTemplate() + + default: + this.unexpected() + } +} + +pp$3.parseLiteral = function(value) { + var node = this.startNode() + node.value = value + node.raw = this.input.slice(this.start, this.end) + this.next() + return this.finishNode(node, "Literal") +} + +pp$3.parseParenExpression = function() { + this.expect(tt.parenL) + var val = this.parseExpression() + this.expect(tt.parenR) + return val +} + +pp$3.parseParenAndDistinguishExpression = function(canBeArrow) { + var this$1 = this; + + var startPos = this.start, startLoc = this.startLoc, val, allowTrailingComma = this.options.ecmaVersion >= 8 + if (this.options.ecmaVersion >= 6) { + this.next() + + var innerStartPos = this.start, innerStartLoc = this.startLoc + var exprList = [], first = true, lastIsComma = false + var refDestructuringErrors = new DestructuringErrors, oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, spreadStart, innerParenStart + this.yieldPos = 0 + this.awaitPos = 0 + while (this.type !== tt.parenR) { + first ? first = false : this$1.expect(tt.comma) + if (allowTrailingComma && this$1.afterTrailingComma(tt.parenR, true)) { + lastIsComma = true + break + } else if (this$1.type === tt.ellipsis) { + spreadStart = this$1.start + exprList.push(this$1.parseParenItem(this$1.parseRest())) + if (this$1.type === tt.comma) this$1.raise(this$1.start, "Comma is not permitted after the rest element") + break + } else { + if (this$1.type === tt.parenL && !innerParenStart) { + innerParenStart = this$1.start + } + exprList.push(this$1.parseMaybeAssign(false, refDestructuringErrors, this$1.parseParenItem)) + } + } + var innerEndPos = this.start, innerEndLoc = this.startLoc + this.expect(tt.parenR) + + if (canBeArrow && !this.canInsertSemicolon() && this.eat(tt.arrow)) { + this.checkPatternErrors(refDestructuringErrors, false) + this.checkYieldAwaitInDefaultParams() + if (innerParenStart) this.unexpected(innerParenStart) + this.yieldPos = oldYieldPos + this.awaitPos = oldAwaitPos + return this.parseParenArrowList(startPos, startLoc, exprList) + } + + if (!exprList.length || lastIsComma) this.unexpected(this.lastTokStart) + if (spreadStart) this.unexpected(spreadStart) + this.checkExpressionErrors(refDestructuringErrors, true) + this.yieldPos = oldYieldPos || this.yieldPos + this.awaitPos = oldAwaitPos || this.awaitPos + + if (exprList.length > 1) { + val = this.startNodeAt(innerStartPos, innerStartLoc) + val.expressions = exprList + this.finishNodeAt(val, "SequenceExpression", innerEndPos, innerEndLoc) + } else { + val = exprList[0] + } + } else { + val = this.parseParenExpression() + } + + if (this.options.preserveParens) { + var par = this.startNodeAt(startPos, startLoc) + par.expression = val + return this.finishNode(par, "ParenthesizedExpression") + } else { + return val + } +} + +pp$3.parseParenItem = function(item) { + return item +} + +pp$3.parseParenArrowList = function(startPos, startLoc, exprList) { + return this.parseArrowExpression(this.startNodeAt(startPos, startLoc), exprList) +} + +// New's precedence is slightly tricky. It must allow its argument to +// be a `[]` or dot subscript expression, but not a call — at least, +// not without wrapping it in parentheses. Thus, it uses the noCalls +// argument to parseSubscripts to prevent it from consuming the +// argument list. + +var empty$1 = [] + +pp$3.parseNew = function() { + var node = this.startNode() + var meta = this.parseIdent(true) + if (this.options.ecmaVersion >= 6 && this.eat(tt.dot)) { + node.meta = meta + node.property = this.parseIdent(true) + if (node.property.name !== "target") + this.raiseRecoverable(node.property.start, "The only valid meta property for new is new.target") + if (!this.inFunction) + this.raiseRecoverable(node.start, "new.target can only be used in functions") + return this.finishNode(node, "MetaProperty") + } + var startPos = this.start, startLoc = this.startLoc + node.callee = this.parseSubscripts(this.parseExprAtom(), startPos, startLoc, true) + if (this.eat(tt.parenL)) node.arguments = this.parseExprList(tt.parenR, this.options.ecmaVersion >= 8, false) + else node.arguments = empty$1 + return this.finishNode(node, "NewExpression") +} + +// Parse template expression. + +pp$3.parseTemplateElement = function() { + var elem = this.startNode() + elem.value = { + raw: this.input.slice(this.start, this.end).replace(/\r\n?/g, '\n'), + cooked: this.value + } + this.next() + elem.tail = this.type === tt.backQuote + return this.finishNode(elem, "TemplateElement") +} + +pp$3.parseTemplate = function() { + var this$1 = this; + + var node = this.startNode() + this.next() + node.expressions = [] + var curElt = this.parseTemplateElement() + node.quasis = [curElt] + while (!curElt.tail) { + this$1.expect(tt.dollarBraceL) + node.expressions.push(this$1.parseExpression()) + this$1.expect(tt.braceR) + node.quasis.push(curElt = this$1.parseTemplateElement()) + } + this.next() + return this.finishNode(node, "TemplateLiteral") +} + +// Parse an object literal or binding pattern. + +pp$3.parseObj = function(isPattern, refDestructuringErrors) { + var this$1 = this; + + var node = this.startNode(), first = true, propHash = {} + node.properties = [] + this.next() + while (!this.eat(tt.braceR)) { + if (!first) { + this$1.expect(tt.comma) + if (this$1.afterTrailingComma(tt.braceR)) break + } else first = false + + var prop = this$1.startNode(), isGenerator, isAsync, startPos, startLoc + if (this$1.options.ecmaVersion >= 6) { + prop.method = false + prop.shorthand = false + if (isPattern || refDestructuringErrors) { + startPos = this$1.start + startLoc = this$1.startLoc + } + if (!isPattern) + isGenerator = this$1.eat(tt.star) + } + this$1.parsePropertyName(prop) + if (!isPattern && this$1.options.ecmaVersion >= 8 && !isGenerator && !prop.computed && + prop.key.type === "Identifier" && prop.key.name === "async" && this$1.type !== tt.parenL && + this$1.type !== tt.colon && !this$1.canInsertSemicolon()) { + isAsync = true + this$1.parsePropertyName(prop, refDestructuringErrors) + } else { + isAsync = false + } + this$1.parsePropertyValue(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors) + this$1.checkPropClash(prop, propHash) + node.properties.push(this$1.finishNode(prop, "Property")) + } + return this.finishNode(node, isPattern ? "ObjectPattern" : "ObjectExpression") +} + +pp$3.parsePropertyValue = function(prop, isPattern, isGenerator, isAsync, startPos, startLoc, refDestructuringErrors) { + if ((isGenerator || isAsync) && this.type === tt.colon) + this.unexpected() + + if (this.eat(tt.colon)) { + prop.value = isPattern ? this.parseMaybeDefault(this.start, this.startLoc) : this.parseMaybeAssign(false, refDestructuringErrors) + prop.kind = "init" + } else if (this.options.ecmaVersion >= 6 && this.type === tt.parenL) { + if (isPattern) this.unexpected() + prop.kind = "init" + prop.method = true + prop.value = this.parseMethod(isGenerator, isAsync) + } else if (this.options.ecmaVersion >= 5 && !prop.computed && prop.key.type === "Identifier" && + (prop.key.name === "get" || prop.key.name === "set") && + (this.type != tt.comma && this.type != tt.braceR)) { + if (isGenerator || isAsync || isPattern) this.unexpected() + prop.kind = prop.key.name + this.parsePropertyName(prop) + prop.value = this.parseMethod(false) + var paramCount = prop.kind === "get" ? 0 : 1 + if (prop.value.params.length !== paramCount) { + var start = prop.value.start + if (prop.kind === "get") + this.raiseRecoverable(start, "getter should have no params") + else + this.raiseRecoverable(start, "setter should have exactly one param") + } else { + if (prop.kind === "set" && prop.value.params[0].type === "RestElement") + this.raiseRecoverable(prop.value.params[0].start, "Setter cannot use rest params") + } + } else if (this.options.ecmaVersion >= 6 && !prop.computed && prop.key.type === "Identifier") { + if (this.keywords.test(prop.key.name) || + (this.strict ? this.reservedWordsStrict : this.reservedWords).test(prop.key.name) || + (this.inGenerator && prop.key.name == "yield") || + (this.inAsync && prop.key.name == "await")) + this.raiseRecoverable(prop.key.start, "'" + prop.key.name + "' can not be used as shorthand property") + prop.kind = "init" + if (isPattern) { + prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key) + } else if (this.type === tt.eq && refDestructuringErrors) { + if (refDestructuringErrors.shorthandAssign < 0) + refDestructuringErrors.shorthandAssign = this.start + prop.value = this.parseMaybeDefault(startPos, startLoc, prop.key) + } else { + prop.value = prop.key + } + prop.shorthand = true + } else this.unexpected() +} + +pp$3.parsePropertyName = function(prop) { + if (this.options.ecmaVersion >= 6) { + if (this.eat(tt.bracketL)) { + prop.computed = true + prop.key = this.parseMaybeAssign() + this.expect(tt.bracketR) + return prop.key + } else { + prop.computed = false + } + } + return prop.key = this.type === tt.num || this.type === tt.string ? this.parseExprAtom() : this.parseIdent(true) +} + +// Initialize empty function node. + +pp$3.initFunction = function(node) { + node.id = null + if (this.options.ecmaVersion >= 6) { + node.generator = false + node.expression = false + } + if (this.options.ecmaVersion >= 8) + node.async = false +} + +// Parse object or class method. + +pp$3.parseMethod = function(isGenerator, isAsync) { + var node = this.startNode(), oldInGen = this.inGenerator, oldInAsync = this.inAsync, + oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldInFunc = this.inFunction + + this.initFunction(node) + if (this.options.ecmaVersion >= 6) + node.generator = isGenerator + if (this.options.ecmaVersion >= 8) + node.async = !!isAsync + + this.inGenerator = node.generator + this.inAsync = node.async + this.yieldPos = 0 + this.awaitPos = 0 + this.inFunction = true + + this.expect(tt.parenL) + node.params = this.parseBindingList(tt.parenR, false, this.options.ecmaVersion >= 8) + this.checkYieldAwaitInDefaultParams() + this.parseFunctionBody(node, false) + + this.inGenerator = oldInGen + this.inAsync = oldInAsync + this.yieldPos = oldYieldPos + this.awaitPos = oldAwaitPos + this.inFunction = oldInFunc + return this.finishNode(node, "FunctionExpression") +} + +// Parse arrow function expression with given parameters. + +pp$3.parseArrowExpression = function(node, params, isAsync) { + var oldInGen = this.inGenerator, oldInAsync = this.inAsync, + oldYieldPos = this.yieldPos, oldAwaitPos = this.awaitPos, oldInFunc = this.inFunction + + this.initFunction(node) + if (this.options.ecmaVersion >= 8) + node.async = !!isAsync + + this.inGenerator = false + this.inAsync = node.async + this.yieldPos = 0 + this.awaitPos = 0 + this.inFunction = true + + node.params = this.toAssignableList(params, true) + this.parseFunctionBody(node, true) + + this.inGenerator = oldInGen + this.inAsync = oldInAsync + this.yieldPos = oldYieldPos + this.awaitPos = oldAwaitPos + this.inFunction = oldInFunc + return this.finishNode(node, "ArrowFunctionExpression") +} + +// Parse function body and check parameters. + +pp$3.parseFunctionBody = function(node, isArrowFunction) { + var isExpression = isArrowFunction && this.type !== tt.braceL + var oldStrict = this.strict, useStrict = false + + if (isExpression) { + node.body = this.parseMaybeAssign() + node.expression = true + } else { + var nonSimple = this.options.ecmaVersion >= 7 && !this.isSimpleParamList(node.params) + if (!oldStrict || nonSimple) { + useStrict = this.strictDirective(this.end) + // If this is a strict mode function, verify that argument names + // are not repeated, and it does not try to bind the words `eval` + // or `arguments`. + if (useStrict && nonSimple) + this.raiseRecoverable(node.start, "Illegal 'use strict' directive in function with non-simple parameter list") + } + // Start a new scope with regard to labels and the `inFunction` + // flag (restore them to their old value afterwards). + var oldLabels = this.labels + this.labels = [] + if (useStrict) this.strict = true + node.body = this.parseBlock(true) + node.expression = false + this.labels = oldLabels + } + + if (oldStrict || useStrict) { + this.strict = true + if (node.id) + this.checkLVal(node.id, true) + this.checkParams(node) + this.strict = oldStrict + } else if (isArrowFunction || !this.isSimpleParamList(node.params)) { + this.checkParams(node) + } +} + +pp$3.isSimpleParamList = function(params) { + for (var i = 0; i < params.length; i++) + if (params[i].type !== "Identifier") return false + return true +} + +// Checks function params for various disallowed patterns such as using "eval" +// or "arguments" and duplicate parameters. + +pp$3.checkParams = function(node) { + var this$1 = this; + + var nameHash = {} + for (var i = 0; i < node.params.length; i++) this$1.checkLVal(node.params[i], true, nameHash) +} + +// Parses a comma-separated list of expressions, and returns them as +// an array. `close` is the token type that ends the list, and +// `allowEmpty` can be turned on to allow subsequent commas with +// nothing in between them to be parsed as `null` (which is needed +// for array literals). + +pp$3.parseExprList = function(close, allowTrailingComma, allowEmpty, refDestructuringErrors) { + var this$1 = this; + + var elts = [], first = true + while (!this.eat(close)) { + if (!first) { + this$1.expect(tt.comma) + if (allowTrailingComma && this$1.afterTrailingComma(close)) break + } else first = false + + var elt + if (allowEmpty && this$1.type === tt.comma) + elt = null + else if (this$1.type === tt.ellipsis) { + elt = this$1.parseSpread(refDestructuringErrors) + if (refDestructuringErrors && this$1.type === tt.comma && refDestructuringErrors.trailingComma < 0) + refDestructuringErrors.trailingComma = this$1.start + } else { + elt = this$1.parseMaybeAssign(false, refDestructuringErrors) + } + elts.push(elt) + } + return elts +} + +// Parse the next token as an identifier. If `liberal` is true (used +// when parsing properties), it will also convert keywords into +// identifiers. + +pp$3.parseIdent = function(liberal) { + var node = this.startNode() + if (liberal && this.options.allowReserved == "never") liberal = false + if (this.type === tt.name) { + if (!liberal && (this.strict ? this.reservedWordsStrict : this.reservedWords).test(this.value) && + (this.options.ecmaVersion >= 6 || + this.input.slice(this.start, this.end).indexOf("\\") == -1)) + this.raiseRecoverable(this.start, "The keyword '" + this.value + "' is reserved") + if (this.inGenerator && this.value === "yield") + this.raiseRecoverable(this.start, "Can not use 'yield' as identifier inside a generator") + if (this.inAsync && this.value === "await") + this.raiseRecoverable(this.start, "Can not use 'await' as identifier inside an async function") + node.name = this.value + } else if (liberal && this.type.keyword) { + node.name = this.type.keyword + } else { + this.unexpected() + } + this.next() + return this.finishNode(node, "Identifier") +} + +// Parses yield expression inside generator. + +pp$3.parseYield = function() { + if (!this.yieldPos) this.yieldPos = this.start + + var node = this.startNode() + this.next() + if (this.type == tt.semi || this.canInsertSemicolon() || (this.type != tt.star && !this.type.startsExpr)) { + node.delegate = false + node.argument = null + } else { + node.delegate = this.eat(tt.star) + node.argument = this.parseMaybeAssign() + } + return this.finishNode(node, "YieldExpression") +} + +pp$3.parseAwait = function() { + if (!this.awaitPos) this.awaitPos = this.start + + var node = this.startNode() + this.next() + node.argument = this.parseMaybeUnary(null, true) + return this.finishNode(node, "AwaitExpression") +} + +var pp$4 = Parser.prototype + +// This function is used to raise exceptions on parse errors. It +// takes an offset integer (into the current `input`) to indicate +// the location of the error, attaches the position to the end +// of the error message, and then raises a `SyntaxError` with that +// message. + +pp$4.raise = function(pos, message) { + var loc = getLineInfo(this.input, pos) + message += " (" + loc.line + ":" + loc.column + ")" + var err = new SyntaxError(message) + err.pos = pos; err.loc = loc; err.raisedAt = this.pos + throw err +} + +pp$4.raiseRecoverable = pp$4.raise + +pp$4.curPosition = function() { + if (this.options.locations) { + return new Position(this.curLine, this.pos - this.lineStart) + } +} + +var Node = function Node(parser, pos, loc) { + this.type = "" + this.start = pos + this.end = 0 + if (parser.options.locations) + this.loc = new SourceLocation(parser, loc) + if (parser.options.directSourceFile) + this.sourceFile = parser.options.directSourceFile + if (parser.options.ranges) + this.range = [pos, 0] +}; + +// Start an AST node, attaching a start offset. + +var pp$5 = Parser.prototype + +pp$5.startNode = function() { + return new Node(this, this.start, this.startLoc) +} + +pp$5.startNodeAt = function(pos, loc) { + return new Node(this, pos, loc) +} + +// Finish an AST node, adding `type` and `end` properties. + +function finishNodeAt(node, type, pos, loc) { + node.type = type + node.end = pos + if (this.options.locations) + node.loc.end = loc + if (this.options.ranges) + node.range[1] = pos + return node +} + +pp$5.finishNode = function(node, type) { + return finishNodeAt.call(this, node, type, this.lastTokEnd, this.lastTokEndLoc) +} + +// Finish node at given position + +pp$5.finishNodeAt = function(node, type, pos, loc) { + return finishNodeAt.call(this, node, type, pos, loc) +} + +// The algorithm used to determine whether a regexp can appear at a +// given point in the program is loosely based on sweet.js' approach. +// See https://github.com/mozilla/sweet.js/wiki/design + +var TokContext = function TokContext(token, isExpr, preserveSpace, override) { + this.token = token + this.isExpr = !!isExpr + this.preserveSpace = !!preserveSpace + this.override = override +}; + +var types = { + b_stat: new TokContext("{", false), + b_expr: new TokContext("{", true), + b_tmpl: new TokContext("${", true), + p_stat: new TokContext("(", false), + p_expr: new TokContext("(", true), + q_tmpl: new TokContext("`", true, true, function (p) { return p.readTmplToken(); }), + f_expr: new TokContext("function", true) +} + +var pp$6 = Parser.prototype + +pp$6.initialContext = function() { + return [types.b_stat] +} + +pp$6.braceIsBlock = function(prevType) { + if (prevType === tt.colon) { + var parent = this.curContext() + if (parent === types.b_stat || parent === types.b_expr) + return !parent.isExpr + } + if (prevType === tt._return) + return lineBreak.test(this.input.slice(this.lastTokEnd, this.start)) + if (prevType === tt._else || prevType === tt.semi || prevType === tt.eof || prevType === tt.parenR) + return true + if (prevType == tt.braceL) + return this.curContext() === types.b_stat + return !this.exprAllowed +} + +pp$6.updateContext = function(prevType) { + var update, type = this.type + if (type.keyword && prevType == tt.dot) + this.exprAllowed = false + else if (update = type.updateContext) + update.call(this, prevType) + else + this.exprAllowed = type.beforeExpr +} + +// Token-specific context update code + +tt.parenR.updateContext = tt.braceR.updateContext = function() { + if (this.context.length == 1) { + this.exprAllowed = true + return + } + var out = this.context.pop() + if (out === types.b_stat && this.curContext() === types.f_expr) { + this.context.pop() + this.exprAllowed = false + } else if (out === types.b_tmpl) { + this.exprAllowed = true + } else { + this.exprAllowed = !out.isExpr + } +} + +tt.braceL.updateContext = function(prevType) { + this.context.push(this.braceIsBlock(prevType) ? types.b_stat : types.b_expr) + this.exprAllowed = true +} + +tt.dollarBraceL.updateContext = function() { + this.context.push(types.b_tmpl) + this.exprAllowed = true +} + +tt.parenL.updateContext = function(prevType) { + var statementParens = prevType === tt._if || prevType === tt._for || prevType === tt._with || prevType === tt._while + this.context.push(statementParens ? types.p_stat : types.p_expr) + this.exprAllowed = true +} + +tt.incDec.updateContext = function() { + // tokExprAllowed stays unchanged +} + +tt._function.updateContext = function(prevType) { + if (prevType.beforeExpr && prevType !== tt.semi && prevType !== tt._else && + !((prevType === tt.colon || prevType === tt.braceL) && this.curContext() === types.b_stat)) + this.context.push(types.f_expr) + this.exprAllowed = false +} + +tt.backQuote.updateContext = function() { + if (this.curContext() === types.q_tmpl) + this.context.pop() + else + this.context.push(types.q_tmpl) + this.exprAllowed = false +} + +// Object type used to represent tokens. Note that normally, tokens +// simply exist as properties on the parser object. This is only +// used for the onToken callback and the external tokenizer. + +var Token = function Token(p) { + this.type = p.type + this.value = p.value + this.start = p.start + this.end = p.end + if (p.options.locations) + this.loc = new SourceLocation(p, p.startLoc, p.endLoc) + if (p.options.ranges) + this.range = [p.start, p.end] +}; + +// ## Tokenizer + +var pp$7 = Parser.prototype + +// Are we running under Rhino? +var isRhino = typeof Packages == "object" && Object.prototype.toString.call(Packages) == "[object JavaPackage]" + +// Move to the next token + +pp$7.next = function() { + if (this.options.onToken) + this.options.onToken(new Token(this)) + + this.lastTokEnd = this.end + this.lastTokStart = this.start + this.lastTokEndLoc = this.endLoc + this.lastTokStartLoc = this.startLoc + this.nextToken() +} + +pp$7.getToken = function() { + this.next() + return new Token(this) +} + +// If we're in an ES6 environment, make parsers iterable +if (typeof Symbol !== "undefined") + pp$7[Symbol.iterator] = function () { + var self = this + return {next: function () { + var token = self.getToken() + return { + done: token.type === tt.eof, + value: token + } + }} + } + +// Toggle strict mode. Re-reads the next number or string to please +// pedantic tests (`"use strict"; 010;` should fail). + +pp$7.curContext = function() { + return this.context[this.context.length - 1] +} + +// Read a single token, updating the parser object's token-related +// properties. + +pp$7.nextToken = function() { + var curContext = this.curContext() + if (!curContext || !curContext.preserveSpace) this.skipSpace() + + this.start = this.pos + if (this.options.locations) this.startLoc = this.curPosition() + if (this.pos >= this.input.length) return this.finishToken(tt.eof) + + if (curContext.override) return curContext.override(this) + else this.readToken(this.fullCharCodeAtPos()) +} + +pp$7.readToken = function(code) { + // Identifier or keyword. '\uXXXX' sequences are allowed in + // identifiers, so '\' also dispatches to that. + if (isIdentifierStart(code, this.options.ecmaVersion >= 6) || code === 92 /* '\' */) + return this.readWord() + + return this.getTokenFromCode(code) +} + +pp$7.fullCharCodeAtPos = function() { + var code = this.input.charCodeAt(this.pos) + if (code <= 0xd7ff || code >= 0xe000) return code + var next = this.input.charCodeAt(this.pos + 1) + return (code << 10) + next - 0x35fdc00 +} + +pp$7.skipBlockComment = function() { + var this$1 = this; + + var startLoc = this.options.onComment && this.curPosition() + var start = this.pos, end = this.input.indexOf("*/", this.pos += 2) + if (end === -1) this.raise(this.pos - 2, "Unterminated comment") + this.pos = end + 2 + if (this.options.locations) { + lineBreakG.lastIndex = start + var match + while ((match = lineBreakG.exec(this.input)) && match.index < this.pos) { + ++this$1.curLine + this$1.lineStart = match.index + match[0].length + } + } + if (this.options.onComment) + this.options.onComment(true, this.input.slice(start + 2, end), start, this.pos, + startLoc, this.curPosition()) +} + +pp$7.skipLineComment = function(startSkip) { + var this$1 = this; + + var start = this.pos + var startLoc = this.options.onComment && this.curPosition() + var ch = this.input.charCodeAt(this.pos+=startSkip) + while (this.pos < this.input.length && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8233) { + ++this$1.pos + ch = this$1.input.charCodeAt(this$1.pos) + } + if (this.options.onComment) + this.options.onComment(false, this.input.slice(start + startSkip, this.pos), start, this.pos, + startLoc, this.curPosition()) +} + +// Called at the start of the parse and after every token. Skips +// whitespace and comments, and. + +pp$7.skipSpace = function() { + var this$1 = this; + + loop: while (this.pos < this.input.length) { + var ch = this$1.input.charCodeAt(this$1.pos) + switch (ch) { + case 32: case 160: // ' ' + ++this$1.pos + break + case 13: + if (this$1.input.charCodeAt(this$1.pos + 1) === 10) { + ++this$1.pos + } + case 10: case 8232: case 8233: + ++this$1.pos + if (this$1.options.locations) { + ++this$1.curLine + this$1.lineStart = this$1.pos + } + break + case 47: // '/' + switch (this$1.input.charCodeAt(this$1.pos + 1)) { + case 42: // '*' + this$1.skipBlockComment() + break + case 47: + this$1.skipLineComment(2) + break + default: + break loop + } + break + default: + if (ch > 8 && ch < 14 || ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { + ++this$1.pos + } else { + break loop + } + } + } +} + +// Called at the end of every token. Sets `end`, `val`, and +// maintains `context` and `exprAllowed`, and skips the space after +// the token, so that the next one's `start` will point at the +// right position. + +pp$7.finishToken = function(type, val) { + this.end = this.pos + if (this.options.locations) this.endLoc = this.curPosition() + var prevType = this.type + this.type = type + this.value = val + + this.updateContext(prevType) +} + +// ### Token reading + +// This is the function that is called to fetch the next token. It +// is somewhat obscure, because it works in character codes rather +// than characters, and because operator parsing has been inlined +// into it. +// +// All in the name of speed. +// +pp$7.readToken_dot = function() { + var next = this.input.charCodeAt(this.pos + 1) + if (next >= 48 && next <= 57) return this.readNumber(true) + var next2 = this.input.charCodeAt(this.pos + 2) + if (this.options.ecmaVersion >= 6 && next === 46 && next2 === 46) { // 46 = dot '.' + this.pos += 3 + return this.finishToken(tt.ellipsis) + } else { + ++this.pos + return this.finishToken(tt.dot) + } +} + +pp$7.readToken_slash = function() { // '/' + var next = this.input.charCodeAt(this.pos + 1) + if (this.exprAllowed) {++this.pos; return this.readRegexp()} + if (next === 61) return this.finishOp(tt.assign, 2) + return this.finishOp(tt.slash, 1) +} + +pp$7.readToken_mult_modulo_exp = function(code) { // '%*' + var next = this.input.charCodeAt(this.pos + 1) + var size = 1 + var tokentype = code === 42 ? tt.star : tt.modulo + + // exponentiation operator ** and **= + if (this.options.ecmaVersion >= 7 && next === 42) { + ++size + tokentype = tt.starstar + next = this.input.charCodeAt(this.pos + 2) + } + + if (next === 61) return this.finishOp(tt.assign, size + 1) + return this.finishOp(tokentype, size) +} + +pp$7.readToken_pipe_amp = function(code) { // '|&' + var next = this.input.charCodeAt(this.pos + 1) + if (next === code) return this.finishOp(code === 124 ? tt.logicalOR : tt.logicalAND, 2) + if (next === 61) return this.finishOp(tt.assign, 2) + return this.finishOp(code === 124 ? tt.bitwiseOR : tt.bitwiseAND, 1) +} + +pp$7.readToken_caret = function() { // '^' + var next = this.input.charCodeAt(this.pos + 1) + if (next === 61) return this.finishOp(tt.assign, 2) + return this.finishOp(tt.bitwiseXOR, 1) +} + +pp$7.readToken_plus_min = function(code) { // '+-' + var next = this.input.charCodeAt(this.pos + 1) + if (next === code) { + if (next == 45 && this.input.charCodeAt(this.pos + 2) == 62 && + lineBreak.test(this.input.slice(this.lastTokEnd, this.pos))) { + // A `-->` line comment + this.skipLineComment(3) + this.skipSpace() + return this.nextToken() + } + return this.finishOp(tt.incDec, 2) + } + if (next === 61) return this.finishOp(tt.assign, 2) + return this.finishOp(tt.plusMin, 1) +} + +pp$7.readToken_lt_gt = function(code) { // '<>' + var next = this.input.charCodeAt(this.pos + 1) + var size = 1 + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2 + if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1) + return this.finishOp(tt.bitShift, size) + } + if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && + this.input.charCodeAt(this.pos + 3) == 45) { + if (this.inModule) this.unexpected() + // `` line comment + this.skipLineComment(3) + this.skipSpace() + return this.nextToken() + } + return this.finishOp(tt.incDec, 2) + } + if (next === 61) return this.finishOp(tt.assign, 2) + return this.finishOp(tt.plusMin, 1) +} + +pp$7.readToken_lt_gt = function(code) { // '<>' + var next = this.input.charCodeAt(this.pos + 1) + var size = 1 + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2 + if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1) + return this.finishOp(tt.bitShift, size) + } + if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && + this.input.charCodeAt(this.pos + 3) == 45) { + if (this.inModule) this.unexpected() + // `` line comment + this.skipLineComment(3) + this.skipSpace() + return this.nextToken() + } + return this.finishOp(tt.incDec, 2) + } + if (next === 61) return this.finishOp(tt.assign, 2) + return this.finishOp(tt.plusMin, 1) +} + +pp.readToken_lt_gt = function(code) { // '<>' + let next = this.input.charCodeAt(this.pos + 1) + let size = 1 + if (next === code) { + size = code === 62 && this.input.charCodeAt(this.pos + 2) === 62 ? 3 : 2 + if (this.input.charCodeAt(this.pos + size) === 61) return this.finishOp(tt.assign, size + 1) + return this.finishOp(tt.bitShift, size) + } + if (next == 33 && code == 60 && this.input.charCodeAt(this.pos + 2) == 45 && + this.input.charCodeAt(this.pos + 3) == 45) { + if (this.inModule) this.unexpected() + // `"}; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/xml_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var xmlUtil = acequire("./xml_util"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var XmlHighlightRules = function(normalize) { + this.$rules = { + start : [ + {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"}, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration" + }, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction" + }, + {token : "comment", regex : "<\\!--", next : "comment"}, + { + token : ["punctuation.doctype.begin", "meta.tag.doctype"], + regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype" + }, + {include : "tag"}, + {include : "reference"} + ], + + xml_declaration : [ + {include : "attributes"}, + {include : "instruction"} + ], + + instruction : [ + {token : "punctuation.instruction.end", regex : "\\?>", next : "start"} + ], + + doctype : [ + {include : "space"}, + {include : "string"}, + {token : "punctuation.doctype.end", regex : ">", next : "start"}, + {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"}, + {token : "punctuation.begin", regex : "\\[", push : "declarations"} + ], + + declarations : [{ + token : "text", + regex : "\\s+" + }, { + token: "punctuation.end", + regex: "]", + next: "pop" + }, { + token : ["punctuation.begin", "keyword"], + regex : "(<\\!)([-_a-zA-Z0-9]+)", + push : [{ + token : "text", + regex : "\\s+" + }, + { + token : "punctuation.end", + regex : ">", + next : "pop" + }, + {include : "string"}] + }], + + cdata : [ + {token : "string.end", regex : "\\]\\]>", next : "start"}, + {token : "text", regex : "\\s+"}, + {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"} + ], + + comment : [ + {token : "comment", regex : "-->", next : "start"}, + {defaultToken : "comment"} + ], + + tag : [{ + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)", + next: [ + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"} + ] + }, { + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(", next : "start"} + ] + }], + + space : [ + {token : "text", regex : "\\s+"} + ], + + reference : [{ + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, { + token : "invalid.illegal", regex : "&" + }], + + string: [{ + token : "string", + regex : "'", + push : "qstring_inner" + }, { + token : "string", + regex : '"', + push : "qqstring_inner" + }], + + qstring_inner: [ + {token : "string", regex: "'", next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + qqstring_inner: [ + {token : "string", regex: '"', next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + attributes: [{ + token : "entity.other.attribute-name", + regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" + }, { + token : "keyword.operator.separator", + regex : "=" + }, { + include : "space" + }, { + include : "string" + }] + }; + + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; + + +(function() { + + this.embedTagRules = function(HighlightRules, prefix, tag){ + this.$rules.tag.unshift({ + token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(<)(" + tag + ")", + next: [ + {include : "space"}, + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"} + ] + }); + + this.$rules[tag + "-end"] = [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next: "start", + onMatch : function(value, currentState, stack) { + stack.splice(0); + return this.token; + }} + ] + + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(" + }]); + }; + +}).call(TextHighlightRules.prototype); + +oop.inherits(XmlHighlightRules, TextHighlightRules); + +exports.XmlHighlightRules = XmlHighlightRules; +}); + +ace.define('ace/mode/xml_util', ["require", 'exports', 'module' ], function(acequire, exports, module) { + + +function string(state) { + return [{ + token : "string", + regex : '"', + next : state + "_qqstring" + }, { + token : "string", + regex : "'", + next : state + "_qstring" + }]; +} + +function multiLineString(quote, state) { + return [ + {token : "string", regex : quote, next : state}, + { + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, + {defaultToken : "string"} + ]; +} + +exports.tag = function(states, name, nextState, tagMap) { + states[name] = [{ + token : "text", + regex : "\\s+" + }, { + + token : !tagMap ? "meta.tag.tag-name" : function(value) { + if (tagMap[value]) + return "meta.tag.tag-name." + tagMap[value]; + else + return "meta.tag.tag-name"; + }, + regex : "[-_a-zA-Z0-9:]+", + next : name + "_embed_attribute_list" + }, { + token: "empty", + regex: "", + next : name + "_embed_attribute_list" + }]; + + states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list"); + states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list"); + + states[name + "_embed_attribute_list"] = [{ + token : "meta.tag.r", + regex : "/?>", + next : nextState + }, { + token : "keyword.operator", + regex : "=" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "text", + regex : "\\s+" + }].concat(string(name)); +}; + +}); + +ace.define('ace/mode/behaviour/xml', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); + return hasType; +} + +var XmlBehaviour = function () { + + this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour + + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getCursorPosition(); + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken(); + + if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column) + return; + var atCursor = false; + if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text'))); + } else { + atCursor = true; + } + if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) { + return; + } + var tag = token.value; + if (atCursor){ + var tag = tag.substring(0, position.column - token.start); + } + + return { + text: '>' + '', + selection: [1, 1] + } + } + }); + + this.add('autoindent', 'insertion', function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var rightChars = line.substring(cursor.column, cursor.column + 2); + if (rightChars == ' -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/xml', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var lang = acequire("../../lib/lang"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + +var FoldMode = exports.FoldMode = function(voidElements) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.getFoldWidget = function(session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + + if (tag.closing) + return foldStyle == "markbeginend" ? "end" : ""; + + if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()]) + return ""; + + if (tag.selfClosing) + return ""; + + if (tag.value.indexOf("/" + tag.tagName) !== -1) + return ""; + + return "start"; + }; + + this._getFirstTagInLine = function(session, row) { + var tokens = session.getTokens(row); + var value = ""; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + if (token.type.lastIndexOf("meta.tag", 0) === 0) + value += token.value; + else + value += lang.stringRepeat(" ", token.value.length); + } + + return this._parseTag(value); + }; + + this.tagRe = /^(\s*)(?)/; + this._parseTag = function(tag) { + + var match = tag.match(this.tagRe); + var column = 0; + + return { + value: tag, + match: match ? match[2] : "", + closing: match ? !!match[3] : false, + selfClosing: match ? !!match[5] || match[2] == "/>" : false, + tagName: match ? match[4] : "", + column: match[1] ? column + match[1].length : column + }; + }; + this._readTagForward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var value = ""; + var start; + + do { + if (token.type.lastIndexOf("meta.tag", 0) === 0) { + if (!start) { + var start = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + }; + } + value += token.value; + if (value.indexOf(">") !== -1) { + var tag = this._parseTag(value); + tag.start = start; + tag.end = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + token.value.length + }; + iterator.stepForward(); + return tag; + } + } + } while(token = iterator.stepForward()); + + return null; + }; + + this._readTagBackward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var value = ""; + var end; + + do { + if (token.type.lastIndexOf("meta.tag", 0) === 0) { + if (!end) { + end = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + token.value.length + }; + } + value = token.value + value; + if (value.indexOf("<") !== -1) { + var tag = this._parseTag(value); + tag.end = end; + tag.start = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + }; + iterator.stepBackward(); + return tag; + } + } + } while(token = iterator.stepBackward()); + + return null; + }; + + this._pop = function(stack, tag) { + while (stack.length) { + + var top = stack[stack.length-1]; + if (!tag || top.tagName == tag.tagName) { + return stack.pop(); + } + else if (this.voidElements[tag.tagName]) { + return; + } + else if (this.voidElements[top.tagName]) { + stack.pop(); + continue; + } else { + return null; + } + } + }; + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + + if (!firstTag.match) + return null; + + var isBackward = firstTag.closing || firstTag.selfClosing; + var stack = []; + var tag; + + if (!isBackward) { + var iterator = new TokenIterator(session, row, firstTag.column); + var start = { + row: row, + column: firstTag.column + firstTag.tagName.length + 2 + }; + while (tag = this._readTagForward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) + return Range.fromPoints(start, tag.start); + } + else { + stack.push(tag) + } + } + } + else { + var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length); + var end = { + row: row, + column: firstTag.column + }; + + while (tag = this._readTagBackward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (!tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) { + tag.start.column += tag.tagName.length + 2; + return Range.fromPoints(tag.start, end); + } + } + else { + stack.push(tag) + } + } + } + + }; + +}).call(FoldMode.prototype); + +}); + +ace.define('ace/mode/javascript', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = JavaScriptHighlightRules; + + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/javascript"), "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + + worker.on("jslint", function(results) { + session.setAnnotations(results.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/javascript_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var JavaScriptHighlightRules = function() { + var keywordMapper = this.createKeywordMapper({ + "variable.language": + "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document" , // Pseudo + "keyword": + "const|yield|import|get|set|" + + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", + "storage.type": + "const|let|var|function", + "constant.language": + "null|Infinity|NaN|undefined", + "support.function": + "alert", + "constant.language.boolean": "true|false" + }, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; + + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-6][0-7]?|" + // oct + "37[0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + + this.$rules = { + "no_regex" : [ + { + token : "comment", + regex : "\\/\\/", + next : "line_comment" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : /\/\*/, + next : "comment" + }, { + token : "string", + regex : "'(?=.)", + next : "qstring" + }, { + token : "string", + regex : '"(?=.)', + next : "qqstring" + }, { + token : "constant.numeric", // hex + regex : /0[xX][0-9a-fA-F]+\b/ + }, { + token : "constant.numeric", // float + regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ + }, { + token : [ + "storage.type", "punctuation.operator", "support.function", + "punctuation.operator", "entity.name.function", "text","keyword.operator" + ], + regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "paren.lparen" + ], + regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "text", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : "keyword", + regex : "(?:" + kwBeforeRe + ")\\b", + next : "start" + }, { + token : ["punctuation.operator", "support.function"], + regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token : ["punctuation.operator", "support.function.dom"], + regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token : ["punctuation.operator", "support.constant"], + regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token : ["storage.type", "punctuation.operator", "support.function.firebug"], + regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/ + }, { + token : keywordMapper, + regex : identifierRe + }, { + token : "keyword.operator", + regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, + next : "start" + }, { + token : "punctuation.operator", + regex : /\?|\:|\,|\;|\./, + next : "start" + }, { + token : "paren.lparen", + regex : /[\[({]/, + next : "start" + }, { + token : "paren.rparen", + regex : /[\])}]/ + }, { + token : "keyword.operator", + regex : /\/=?/, + next : "start" + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment_regex_allowed" + }, { + token : "comment", + regex : "\\/\\/", + next : "line_comment_regex_allowed" + }, { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token : "text", + regex : "\\s+|^$", + next : "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/\\w*", + next: "no_regex" + }, { + token : "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token : "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/ + }, { + token : "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "function_arguments": [ + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "[, ]+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "comment_regex_allowed" : [ + {token : "comment", regex : "\\*\\/", next : "start"}, + {defaultToken : "comment"} + ], + "comment" : [ + {token : "comment", regex : "\\*\\/", next : "no_regex"}, + {defaultToken : "comment"} + ], + "line_comment_regex_allowed" : [ + {token : "comment", regex : "$|^", next : "start"}, + {defaultToken : "comment"} + ], + "line_comment" : [ + {token : "comment", regex : "$|^", next : "no_regex"}, + {defaultToken : "comment"} + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qqstring" + }, { + token : "string", + regex : '"|$', + next : "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qstring" + }, { + token : "string", + regex : "'|$", + next : "no_regex" + }, { + defaultToken: "string" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("no_regex") ]); +}; + +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); + +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); + +ace.define('ace/mode/css', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/behaviour/css', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var CssHighlightRules = acequire("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var CssBehaviour = acequire("./behaviour/css").CssBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.foldingRules = "cStyle"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/css"), "Worker"); + worker.attachToDocument(session.getDocument()); + + worker.on("csslint", function(e) { + session.setAnnotations(e.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; + +}); + +ace.define('ace/mode/css_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; + +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|acequired|root|target|valid|visited)\\b"; + +var CssHighlightRules = function() { + + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + + this.$rules = { + "start" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "@.*?{", + push: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "media" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "\\}", + next: "pop" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "comment" : [{ + token : "comment", + regex : "\\*\\/", + next : "pop" + }, { + defaultToken : "comment" + }], + + "ruleset" : [ + { + token : "paren.rparen", + regex : "\\}", + next: "pop" + }, { + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : ["constant.numeric", "keyword"], + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + }, { + token : "constant.numeric", + regex : numRe + }, { + token : "constant.numeric", // hex6 color + regex : "#[a-f0-9]{6}" + }, { + token : "constant.numeric", // hex3 color + regex : "#[a-f0-9]{3}" + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex : pseudoElements + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex : pseudoClasses + }, { + token : ["support.function", "string", "support.function"], + regex : "(url\\()(.*)(\\))" + }, { + token : keywordMapper, + regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + caseInsensitive: true + }] + }; + + this.normalizeRules(); +}; + +oop.inherits(CssHighlightRules, TextHighlightRules); + +exports.CssHighlightRules = CssHighlightRules; + +}); + +ace.define('ace/mode/behaviour/css', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + +var CssBehaviour = function () { + + this.inherit(CstyleBehaviour); + + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + } + } + if (!line.substring(cursor.column).match(/^\s*;/)) { + return { + text: ':;', + selection: [1, 1] + } + } + } + } + }); + + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column ++; + return range; + } + } + } + }); + + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + } + } + } + }); + +} +oop.inherits(CssBehaviour, CstyleBehaviour); + +exports.CssBehaviour = CssBehaviour; +}); + +ace.define('ace/mode/coldfusion_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript_highlight_rules', 'ace/mode/html_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var HtmlHighlightRules = acequire("./html_highlight_rules").HtmlHighlightRules; + +var ColdfusionHighlightRules = function() { + HtmlHighlightRules.call(this); + + this.embedTagRules(JavaScriptHighlightRules, "cfjs-", "cfscript"); + + this.normalizeRules(); +}; + +oop.inherits(ColdfusionHighlightRules, HtmlHighlightRules); + +exports.ColdfusionHighlightRules = ColdfusionHighlightRules; +}); + +ace.define('ace/mode/html_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var CssHighlightRules = acequire("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = acequire("./xml_highlight_rules").XmlHighlightRules; + +var tagMap = lang.createMap({ + a : 'anchor', + button : 'form', + form : 'form', + img : 'image', + input : 'form', + label : 'form', + option : 'form', + script : 'script', + select : 'form', + textarea : 'form', + style : 'style', + table : 'table', + tbody : 'table', + td : 'table', + tfoot : 'table', + th : 'table', + tr : 'table' +}); + +var HtmlHighlightRules = function() { + XmlHighlightRules.call(this); + + this.addRules({ + attributes: [{ + include : "space" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "keyword.operator.separator", + regex : "=", + push : [{ + include: "space" + }, { + token : "string", + regex : "[^<>='\"`\\s]+", + next : "pop" + }, { + token : "empty", + regex : "", + next : "pop" + }] + }, { + include : "string" + }], + tag: [{ + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation.begin", + "meta.tag.name" + (group ? "." + group : "")]; + }, + regex : "(<)([-_a-zA-Z0-9:]+)", + next: "start_tag_stuff" + }, { + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation.begin", + "meta.tag.name" + (group ? "." + group : "")]; + }, + regex : "(", next : "start"} + ], + end_tag_stuff: [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next : "start"} + ] + }); + + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); + + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; + +oop.inherits(HtmlHighlightRules, XmlHighlightRules); + +exports.HtmlHighlightRules = HtmlHighlightRules; +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/csharp.js b/pitfall/pdfkit/node_modules/brace/mode/csharp.js new file mode 100644 index 00000000..92f37246 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/csharp.js @@ -0,0 +1,765 @@ +ace.define('ace/mode/csharp', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/csharp_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/csharp'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var CSharpHighlightRules = acequire("./csharp_highlight_rules").CSharpHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/csharp").FoldMode; + +var Mode = function() { + this.HighlightRules = CSharpHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + + this.createWorker = function(session) { + return null; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); +ace.define('ace/mode/csharp_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var CSharpHighlightRules = function() { + var keywordMapper = this.createKeywordMapper({ + "variable.language": "this", + "keyword": "abstract|event|new|struct|as|explicit|null|switch|base|extern|object|this|bool|false|operator|throw|break|finally|out|true|byte|fixed|override|try|case|float|params|typeof|catch|for|private|uint|char|foreach|protected|ulong|checked|goto|public|unchecked|class|if|readonly|unsafe|const|implicit|ref|ushort|continue|in|return|using|decimal|int|sbyte|virtual|default|interface|sealed|volatile|delegate|internal|short|void|do|is|sizeof|while|double|lock|stackalloc|else|long|static|enum|namespace|string|var|dynamic", + "constant.language": "null|true|false" + }, "identifier"); + + this.$rules = { + "start" : [ + { + token : "comment", + regex : "\\/\\/.*$" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment" + }, { + token : "string.regexp", + regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" + }, { + token : "string", // character + regex : /'(?:.|\\(:?u[\da-fA-F]+|x[\da-fA-F]+|[tbrf'"n]))'/ + }, { + token : "string", start : '"', end : '"|$', next: [ + {token: "constant.language.escape", regex: /\\(:?u[\da-fA-F]+|x[\da-fA-F]+|[tbrf'"n])/}, + {token: "invalid", regex: /\\./} + ] + }, { + token : "string", start : '@"', end : '"', next:[ + {token: "constant.language.escape", regex: '""'} + ] + }, { + token : "constant.numeric", // hex + regex : "0[xX][0-9a-fA-F]+\\b" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "constant.language.boolean", + regex : "(?:true|false)\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator", + regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" + }, { + token : "keyword", + regex : "^\\s*#(if|else|elif|endif|define|undef|warning|error|line|region|endregion|pragma)" + }, { + token : "punctuation.operator", + regex : "\\?|\\:|\\,|\\;|\\." + }, { + token : "paren.lparen", + regex : "[[({]" + }, { + token : "paren.rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + } + ], + "comment" : [ + { + token : "comment", // closing comment + regex : ".*?\\*\\/", + next : "start" + }, { + token : "comment", // comment spanning whole line + regex : ".+" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("start") ]); + this.normalizeRules(); +}; + +oop.inherits(CSharpHighlightRules, TextHighlightRules); + +exports.CSharpHighlightRules = CSharpHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/csharp', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var CFoldMode = acequire("./cstyle").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, CFoldMode); + +(function() { + this.usingRe = /^\s*using \S/; + + this.getFoldWidgetRangeBase = this.getFoldWidgetRange; + this.getFoldWidgetBase = this.getFoldWidget; + + this.getFoldWidget = function(session, foldStyle, row) { + var fw = this.getFoldWidgetBase(session, foldStyle, row); + if (!fw) { + var line = session.getLine(row); + if (/^\s*#region\b/.test(line)) + return "start"; + var usingRe = this.usingRe; + if (usingRe.test(line)) { + var prev = session.getLine(row - 1); + var next = session.getLine(row + 1); + if (!usingRe.test(prev) && usingRe.test(next)) + return "start" + } + } + return fw; + }; + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var range = this.getFoldWidgetRangeBase(session, foldStyle, row); + if (range) + return range; + + var line = session.getLine(row); + if (this.usingRe.test(line)) + return this.getUsingStatementBlock(session, line, row); + + if (/^\s*#region\b/.test(line)) + return this.getRegionBlock(session, line, row); + }; + + this.getUsingStatementBlock = function(session, line, row) { + var startColumn = line.match(this.usingRe)[0].length - 1; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + + while (++row < maxRow) { + line = session.getLine(row); + if (/^\s*$/.test(line)) + continue; + if (!this.usingRe.test(line)) + break; + + endRow = row; + } + + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + + this.getRegionBlock = function(session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + + var re = /^\s*#(end)?region\b/ + var depth = 1 + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) + continue; + if (m[1]) + depth--; + else + depth++; + + if (!depth) + break; + } + + var endRow = row; + if (endRow > startRow) { + var endColumn = line.search(/\S/); + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + +}).call(FoldMode.prototype); + +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/css.js b/pitfall/pdfkit/node_modules/brace/mode/css.js new file mode 100644 index 00000000..faba630c --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/css.js @@ -0,0 +1,779 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/css', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/behaviour/css', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var CssHighlightRules = acequire("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var CssBehaviour = acequire("./behaviour/css").CssBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.foldingRules = "cStyle"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/css"), "Worker"); + worker.attachToDocument(session.getDocument()); + + worker.on("csslint", function(e) { + session.setAnnotations(e.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; + +}); + +ace.define('ace/mode/css_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; + +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|acequired|root|target|valid|visited)\\b"; + +var CssHighlightRules = function() { + + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + + this.$rules = { + "start" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "@.*?{", + push: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "media" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "\\}", + next: "pop" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "comment" : [{ + token : "comment", + regex : "\\*\\/", + next : "pop" + }, { + defaultToken : "comment" + }], + + "ruleset" : [ + { + token : "paren.rparen", + regex : "\\}", + next: "pop" + }, { + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : ["constant.numeric", "keyword"], + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + }, { + token : "constant.numeric", + regex : numRe + }, { + token : "constant.numeric", // hex6 color + regex : "#[a-f0-9]{6}" + }, { + token : "constant.numeric", // hex3 color + regex : "#[a-f0-9]{3}" + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex : pseudoElements + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex : pseudoClasses + }, { + token : ["support.function", "string", "support.function"], + regex : "(url\\()(.*)(\\))" + }, { + token : keywordMapper, + regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + caseInsensitive: true + }] + }; + + this.normalizeRules(); +}; + +oop.inherits(CssHighlightRules, TextHighlightRules); + +exports.CssHighlightRules = CssHighlightRules; + +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/behaviour/css', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + +var CssBehaviour = function () { + + this.inherit(CstyleBehaviour); + + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + } + } + if (!line.substring(cursor.column).match(/^\s*;/)) { + return { + text: ':;', + selection: [1, 1] + } + } + } + } + }); + + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column ++; + return range; + } + } + } + }); + + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + } + } + } + }); + +} +oop.inherits(CssBehaviour, CstyleBehaviour); + +exports.CssBehaviour = CssBehaviour; +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/curly.js b/pitfall/pdfkit/node_modules/brace/mode/curly.js new file mode 100644 index 00000000..dc465001 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/curly.js @@ -0,0 +1,2414 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2012, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * Contributor(s): + * + * Libo Cannici + * + * + * + * ***** END LICENSE BLOCK ***** */ +ace.define('ace/mode/curly', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/html', 'ace/tokenizer', 'ace/mode/matching_brace_outdent', 'ace/mode/html_highlight_rules', 'ace/mode/folding/html', 'ace/mode/curly_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var HtmlMode = acequire("./html").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var HtmlHighlightRules = acequire("./html_highlight_rules").HtmlHighlightRules; +var HtmlFoldMode = acequire("./folding/html").FoldMode; +var CurlyHighlightRules = acequire("./curly_highlight_rules").CurlyHighlightRules; + +var Mode = function() { + HtmlMode.call(this); + this.HighlightRules = CurlyHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.foldingRules = new HtmlFoldMode(); +}; +oop.inherits(Mode, HtmlMode); + +(function() { +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/html', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/css', 'ace/tokenizer', 'ace/mode/html_highlight_rules', 'ace/mode/behaviour/html', 'ace/mode/folding/html', 'ace/mode/html_completions'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var JavaScriptMode = acequire("./javascript").Mode; +var CssMode = acequire("./css").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var HtmlHighlightRules = acequire("./html_highlight_rules").HtmlHighlightRules; +var HtmlBehaviour = acequire("./behaviour/html").HtmlBehaviour; +var HtmlFoldMode = acequire("./folding/html").FoldMode; +var HtmlCompletions = acequire("./html_completions").HtmlCompletions; + +var Mode = function() { + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new HtmlBehaviour(); + this.$completer = new HtmlCompletions(); + + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + + this.foldingRules = new HtmlFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.blockComment = {start: ""}; + + this.getNextLineIndent = function(state, line, tab) { + return this.$getIndent(line); + }; + + this.checkOutdent = function(state, line, input) { + return false; + }; + + this.getCompletions = function(state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/javascript', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = JavaScriptHighlightRules; + + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/javascript"), "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + + worker.on("jslint", function(results) { + session.setAnnotations(results.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/javascript_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var JavaScriptHighlightRules = function() { + var keywordMapper = this.createKeywordMapper({ + "variable.language": + "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document" , // Pseudo + "keyword": + "const|yield|import|get|set|" + + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", + "storage.type": + "const|let|var|function", + "constant.language": + "null|Infinity|NaN|undefined", + "support.function": + "alert", + "constant.language.boolean": "true|false" + }, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; + + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-6][0-7]?|" + // oct + "37[0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + + this.$rules = { + "no_regex" : [ + { + token : "comment", + regex : "\\/\\/", + next : "line_comment" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : /\/\*/, + next : "comment" + }, { + token : "string", + regex : "'(?=.)", + next : "qstring" + }, { + token : "string", + regex : '"(?=.)', + next : "qqstring" + }, { + token : "constant.numeric", // hex + regex : /0[xX][0-9a-fA-F]+\b/ + }, { + token : "constant.numeric", // float + regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ + }, { + token : [ + "storage.type", "punctuation.operator", "support.function", + "punctuation.operator", "entity.name.function", "text","keyword.operator" + ], + regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "paren.lparen" + ], + regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "text", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : "keyword", + regex : "(?:" + kwBeforeRe + ")\\b", + next : "start" + }, { + token : ["punctuation.operator", "support.function"], + regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token : ["punctuation.operator", "support.function.dom"], + regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token : ["punctuation.operator", "support.constant"], + regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token : ["storage.type", "punctuation.operator", "support.function.firebug"], + regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/ + }, { + token : keywordMapper, + regex : identifierRe + }, { + token : "keyword.operator", + regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, + next : "start" + }, { + token : "punctuation.operator", + regex : /\?|\:|\,|\;|\./, + next : "start" + }, { + token : "paren.lparen", + regex : /[\[({]/, + next : "start" + }, { + token : "paren.rparen", + regex : /[\])}]/ + }, { + token : "keyword.operator", + regex : /\/=?/, + next : "start" + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment_regex_allowed" + }, { + token : "comment", + regex : "\\/\\/", + next : "line_comment_regex_allowed" + }, { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token : "text", + regex : "\\s+|^$", + next : "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/\\w*", + next: "no_regex" + }, { + token : "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token : "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/ + }, { + token : "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "function_arguments": [ + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "[, ]+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "comment_regex_allowed" : [ + {token : "comment", regex : "\\*\\/", next : "start"}, + {defaultToken : "comment"} + ], + "comment" : [ + {token : "comment", regex : "\\*\\/", next : "no_regex"}, + {defaultToken : "comment"} + ], + "line_comment_regex_allowed" : [ + {token : "comment", regex : "$|^", next : "start"}, + {defaultToken : "comment"} + ], + "line_comment" : [ + {token : "comment", regex : "$|^", next : "no_regex"}, + {defaultToken : "comment"} + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qqstring" + }, { + token : "string", + regex : '"|$', + next : "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qstring" + }, { + token : "string", + regex : "'|$", + next : "no_regex" + }, { + defaultToken: "string" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("no_regex") ]); +}; + +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); + +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); + +ace.define('ace/mode/css', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/behaviour/css', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var CssHighlightRules = acequire("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var CssBehaviour = acequire("./behaviour/css").CssBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.foldingRules = "cStyle"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/css"), "Worker"); + worker.attachToDocument(session.getDocument()); + + worker.on("csslint", function(e) { + session.setAnnotations(e.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; + +}); + +ace.define('ace/mode/css_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; + +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|acequired|root|target|valid|visited)\\b"; + +var CssHighlightRules = function() { + + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + + this.$rules = { + "start" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "@.*?{", + push: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "media" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "\\}", + next: "pop" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "comment" : [{ + token : "comment", + regex : "\\*\\/", + next : "pop" + }, { + defaultToken : "comment" + }], + + "ruleset" : [ + { + token : "paren.rparen", + regex : "\\}", + next: "pop" + }, { + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : ["constant.numeric", "keyword"], + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + }, { + token : "constant.numeric", + regex : numRe + }, { + token : "constant.numeric", // hex6 color + regex : "#[a-f0-9]{6}" + }, { + token : "constant.numeric", // hex3 color + regex : "#[a-f0-9]{3}" + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex : pseudoElements + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex : pseudoClasses + }, { + token : ["support.function", "string", "support.function"], + regex : "(url\\()(.*)(\\))" + }, { + token : keywordMapper, + regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + caseInsensitive: true + }] + }; + + this.normalizeRules(); +}; + +oop.inherits(CssHighlightRules, TextHighlightRules); + +exports.CssHighlightRules = CssHighlightRules; + +}); + +ace.define('ace/mode/behaviour/css', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + +var CssBehaviour = function () { + + this.inherit(CstyleBehaviour); + + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + } + } + if (!line.substring(cursor.column).match(/^\s*;/)) { + return { + text: ':;', + selection: [1, 1] + } + } + } + } + }); + + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column ++; + return range; + } + } + } + }); + + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + } + } + } + }); + +} +oop.inherits(CssBehaviour, CstyleBehaviour); + +exports.CssBehaviour = CssBehaviour; +}); + +ace.define('ace/mode/html_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var CssHighlightRules = acequire("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = acequire("./xml_highlight_rules").XmlHighlightRules; + +var tagMap = lang.createMap({ + a : 'anchor', + button : 'form', + form : 'form', + img : 'image', + input : 'form', + label : 'form', + option : 'form', + script : 'script', + select : 'form', + textarea : 'form', + style : 'style', + table : 'table', + tbody : 'table', + td : 'table', + tfoot : 'table', + th : 'table', + tr : 'table' +}); + +var HtmlHighlightRules = function() { + XmlHighlightRules.call(this); + + this.addRules({ + attributes: [{ + include : "space" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "keyword.operator.separator", + regex : "=", + push : [{ + include: "space" + }, { + token : "string", + regex : "[^<>='\"`\\s]+", + next : "pop" + }, { + token : "empty", + regex : "", + next : "pop" + }] + }, { + include : "string" + }], + tag: [{ + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation.begin", + "meta.tag.name" + (group ? "." + group : "")]; + }, + regex : "(<)([-_a-zA-Z0-9:]+)", + next: "start_tag_stuff" + }, { + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation.begin", + "meta.tag.name" + (group ? "." + group : "")]; + }, + regex : "(", next : "start"} + ], + end_tag_stuff: [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next : "start"} + ] + }); + + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); + + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; + +oop.inherits(HtmlHighlightRules, XmlHighlightRules); + +exports.HtmlHighlightRules = HtmlHighlightRules; +}); + +ace.define('ace/mode/xml_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var xmlUtil = acequire("./xml_util"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var XmlHighlightRules = function(normalize) { + this.$rules = { + start : [ + {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"}, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration" + }, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction" + }, + {token : "comment", regex : "<\\!--", next : "comment"}, + { + token : ["punctuation.doctype.begin", "meta.tag.doctype"], + regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype" + }, + {include : "tag"}, + {include : "reference"} + ], + + xml_declaration : [ + {include : "attributes"}, + {include : "instruction"} + ], + + instruction : [ + {token : "punctuation.instruction.end", regex : "\\?>", next : "start"} + ], + + doctype : [ + {include : "space"}, + {include : "string"}, + {token : "punctuation.doctype.end", regex : ">", next : "start"}, + {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"}, + {token : "punctuation.begin", regex : "\\[", push : "declarations"} + ], + + declarations : [{ + token : "text", + regex : "\\s+" + }, { + token: "punctuation.end", + regex: "]", + next: "pop" + }, { + token : ["punctuation.begin", "keyword"], + regex : "(<\\!)([-_a-zA-Z0-9]+)", + push : [{ + token : "text", + regex : "\\s+" + }, + { + token : "punctuation.end", + regex : ">", + next : "pop" + }, + {include : "string"}] + }], + + cdata : [ + {token : "string.end", regex : "\\]\\]>", next : "start"}, + {token : "text", regex : "\\s+"}, + {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"} + ], + + comment : [ + {token : "comment", regex : "-->", next : "start"}, + {defaultToken : "comment"} + ], + + tag : [{ + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)", + next: [ + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"} + ] + }, { + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(", next : "start"} + ] + }], + + space : [ + {token : "text", regex : "\\s+"} + ], + + reference : [{ + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, { + token : "invalid.illegal", regex : "&" + }], + + string: [{ + token : "string", + regex : "'", + push : "qstring_inner" + }, { + token : "string", + regex : '"', + push : "qqstring_inner" + }], + + qstring_inner: [ + {token : "string", regex: "'", next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + qqstring_inner: [ + {token : "string", regex: '"', next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + attributes: [{ + token : "entity.other.attribute-name", + regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" + }, { + token : "keyword.operator.separator", + regex : "=" + }, { + include : "space" + }, { + include : "string" + }] + }; + + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; + + +(function() { + + this.embedTagRules = function(HighlightRules, prefix, tag){ + this.$rules.tag.unshift({ + token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(<)(" + tag + ")", + next: [ + {include : "space"}, + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"} + ] + }); + + this.$rules[tag + "-end"] = [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next: "start", + onMatch : function(value, currentState, stack) { + stack.splice(0); + return this.token; + }} + ] + + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(" + }]); + }; + +}).call(TextHighlightRules.prototype); + +oop.inherits(XmlHighlightRules, TextHighlightRules); + +exports.XmlHighlightRules = XmlHighlightRules; +}); + +ace.define('ace/mode/xml_util', ["require", 'exports', 'module' ], function(acequire, exports, module) { + + +function string(state) { + return [{ + token : "string", + regex : '"', + next : state + "_qqstring" + }, { + token : "string", + regex : "'", + next : state + "_qstring" + }]; +} + +function multiLineString(quote, state) { + return [ + {token : "string", regex : quote, next : state}, + { + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, + {defaultToken : "string"} + ]; +} + +exports.tag = function(states, name, nextState, tagMap) { + states[name] = [{ + token : "text", + regex : "\\s+" + }, { + + token : !tagMap ? "meta.tag.tag-name" : function(value) { + if (tagMap[value]) + return "meta.tag.tag-name." + tagMap[value]; + else + return "meta.tag.tag-name"; + }, + regex : "[-_a-zA-Z0-9:]+", + next : name + "_embed_attribute_list" + }, { + token: "empty", + regex: "", + next : name + "_embed_attribute_list" + }]; + + states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list"); + states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list"); + + states[name + "_embed_attribute_list"] = [{ + token : "meta.tag.r", + regex : "/?>", + next : nextState + }, { + token : "keyword.operator", + regex : "=" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "text", + regex : "\\s+" + }].concat(string(name)); +}; + +}); + +ace.define('ace/mode/behaviour/html', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour/xml', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var XmlBehaviour = acequire("../behaviour/xml").XmlBehaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var voidElements = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr']; + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); + return hasType; +} + +var HtmlBehaviour = function () { + + this.inherit(XmlBehaviour); // Get xml behaviour + + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getCursorPosition(); + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken(); + + if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column) + return; + var atCursor = false; + if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text'))); + } else { + atCursor = true; + } + if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) { + return; + } + var element = token.value; + if (atCursor){ + var element = element.substring(0, position.column - token.start); + } + if (voidElements.indexOf(element) !== -1){ + return; + } + return { + text: '>' + '', + selection: [1, 1] + } + } + }); +} +oop.inherits(HtmlBehaviour, XmlBehaviour); + +exports.HtmlBehaviour = HtmlBehaviour; +}); + +ace.define('ace/mode/behaviour/xml', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); + return hasType; +} + +var XmlBehaviour = function () { + + this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour + + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getCursorPosition(); + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken(); + + if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column) + return; + var atCursor = false; + if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text'))); + } else { + atCursor = true; + } + if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) { + return; + } + var tag = token.value; + if (atCursor){ + var tag = tag.substring(0, position.column - token.start); + } + + return { + text: '>' + '', + selection: [1, 1] + } + } + }); + + this.add('autoindent', 'insertion', function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var rightChars = line.substring(cursor.column, cursor.column + 2); + if (rightChars == '?)/; + this._parseTag = function(tag) { + + var match = tag.match(this.tagRe); + var column = 0; + + return { + value: tag, + match: match ? match[2] : "", + closing: match ? !!match[3] : false, + selfClosing: match ? !!match[5] || match[2] == "/>" : false, + tagName: match ? match[4] : "", + column: match[1] ? column + match[1].length : column + }; + }; + this._readTagForward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var value = ""; + var start; + + do { + if (token.type.lastIndexOf("meta.tag", 0) === 0) { + if (!start) { + var start = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + }; + } + value += token.value; + if (value.indexOf(">") !== -1) { + var tag = this._parseTag(value); + tag.start = start; + tag.end = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + token.value.length + }; + iterator.stepForward(); + return tag; + } + } + } while(token = iterator.stepForward()); + + return null; + }; + + this._readTagBackward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var value = ""; + var end; + + do { + if (token.type.lastIndexOf("meta.tag", 0) === 0) { + if (!end) { + end = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + token.value.length + }; + } + value = token.value + value; + if (value.indexOf("<") !== -1) { + var tag = this._parseTag(value); + tag.end = end; + tag.start = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + }; + iterator.stepBackward(); + return tag; + } + } + } while(token = iterator.stepBackward()); + + return null; + }; + + this._pop = function(stack, tag) { + while (stack.length) { + + var top = stack[stack.length-1]; + if (!tag || top.tagName == tag.tagName) { + return stack.pop(); + } + else if (this.voidElements[tag.tagName]) { + return; + } + else if (this.voidElements[top.tagName]) { + stack.pop(); + continue; + } else { + return null; + } + } + }; + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + + if (!firstTag.match) + return null; + + var isBackward = firstTag.closing || firstTag.selfClosing; + var stack = []; + var tag; + + if (!isBackward) { + var iterator = new TokenIterator(session, row, firstTag.column); + var start = { + row: row, + column: firstTag.column + firstTag.tagName.length + 2 + }; + while (tag = this._readTagForward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) + return Range.fromPoints(start, tag.start); + } + else { + stack.push(tag) + } + } + } + else { + var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length); + var end = { + row: row, + column: firstTag.column + }; + + while (tag = this._readTagBackward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (!tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) { + tag.start.column += tag.tagName.length + 2; + return Range.fromPoints(tag.start, end); + } + } + else { + stack.push(tag) + } + } + } + + }; + +}).call(FoldMode.prototype); + +}); + +ace.define('ace/mode/html_completions', ["require", 'exports', 'module' , 'ace/token_iterator'], function(acequire, exports, module) { + + +var TokenIterator = acequire("../token_iterator").TokenIterator; + +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; + +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; + +var globalAttributes = commonAttributes.concat(eventAttributes); + +var attributeMap = { + "html": ["manifest"], + "head": [], + "title": [], + "base": ["href", "target"], + "link": ["href", "hreflang", "rel", "media", "type", "sizes"], + "meta": ["http-equiv", "name", "content", "charset"], + "style": ["type", "media", "scoped"], + "script": ["charset", "type", "src", "defer", "async"], + "noscript": ["href"], + "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"], + "section": [], + "nav": [], + "article": ["pubdate"], + "aside": [], + "h1": [], + "h2": [], + "h3": [], + "h4": [], + "h5": [], + "h6": [], + "header": [], + "footer": [], + "address": [], + "main": [], + "p": [], + "hr": [], + "pre": [], + "blockquote": ["cite"], + "ol": ["start", "reversed"], + "ul": [], + "li": ["value"], + "dl": [], + "dt": [], + "dd": [], + "figure": [], + "figcaption": [], + "div": [], + "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"], + "em": [], + "strong": [], + "small": [], + "s": [], + "cite": [], + "q": ["cite"], + "dfn": [], + "abbr": [], + "data": [], + "time": ["datetime"], + "code": [], + "var": [], + "samp": [], + "kbd": [], + "sub": [], + "sup": [], + "i": [], + "b": [], + "u": [], + "mark": [], + "ruby": [], + "rt": [], + "rp": [], + "bdi": [], + "bdo": [], + "span": [], + "br": [], + "wbr": [], + "ins": ["cite", "datetime"], + "del": ["cite", "datetime"], + "img": ["alt", "src", "height", "width", "usemap", "ismap"], + "iframe": ["name", "src", "height", "width", "sandbox", "seamless"], + "embed": ["src", "height", "width", "type"], + "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"], + "param": ["name", "value"], + "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"], + "audio": ["src", "autobuffer", "autoplay", "loop", "controls"], + "source": ["src", "type", "media"], + "track": ["kind", "src", "srclang", "label", "default"], + "canvas": ["width", "height"], + "map": ["name"], + "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"], + "svg": [], + "math": [], + "table": ["summary"], + "caption": [], + "colgroup": ["span"], + "col": ["span"], + "tbody": [], + "thead": [], + "tfoot": [], + "tr": [], + "td": ["headers", "rowspan", "colspan"], + "th": ["headers", "rowspan", "colspan", "scope"], + "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"], + "fieldset": ["disabled", "form", "name"], + "legend": [], + "label": ["form", "for"], + "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "acequired", "size", "src", "step", "width", "files", "value"], + "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"], + "select": ["autofocus", "disabled", "form", "multiple", "name", "size"], + "datalist": [], + "optgroup": ["disabled", "label"], + "option": ["disabled", "selected", "label", "value"], + "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "acequired", "rows", "cols", "wrap"], + "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"], + "output": ["for", "form", "name"], + "progress": ["value", "max"], + "meter": ["value", "min", "max", "low", "high", "optimum"], + "details": ["open"], + "summary": [], + "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"], + "menu": ["type", "label"], + "dialog": ["open"] +}; + +var allElements = Object.keys(attributeMap); + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); +} + +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + if (!token || !hasType(token, 'tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'operator') || hasType(token, 'attribute-name') || hasType(token, 'text'))); + } + if (token && hasType(token, 'tag-name') && !iterator.stepBackward().value.match('/')) + return token.value; +} + +var HtmlCompletions = function() { + +}; + +(function() { + + this.getCompletions = function(state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + + if (!token) + return []; + if (hasType(token, "tag-name") || (token.value == '<' && hasType(token, "text"))) + return this.getTagCompletions(state, session, pos, prefix); + if (hasType(token, 'text') || hasType(token, 'attribute-name')) + return this.getAttributeCompetions(state, session, pos, prefix); + + return []; + }; + + this.getTagCompletions = function(state, session, pos, prefix) { + var elements = allElements; + if (prefix) { + elements = elements.filter(function(element){ + return element.indexOf(prefix) === 0; + }); + } + return elements.map(function(element){ + return { + value: element, + meta: "tag" + }; + }); + }; + + this.getAttributeCompetions = function(state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(attributeMap[tagName]); + } + if (prefix) { + attributes = attributes.filter(function(attribute){ + return attribute.indexOf(prefix) === 0; + }); + } + return attributes.map(function(attribute){ + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute" + }; + }); + }; + +}).call(HtmlCompletions.prototype); + +exports.HtmlCompletions = HtmlCompletions; +}); +ace.define('ace/mode/curly_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/html_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var HtmlHighlightRules = acequire("./html_highlight_rules").HtmlHighlightRules; + + +var CurlyHighlightRules = function() { + HtmlHighlightRules.call(this); + + this.$rules["start"].unshift({ + token: "variable", + regex: "{{", + push: "curly-start" + }); + + this.$rules["curly-start"] = [{ + token: "variable", + regex: "}}", + next: "pop" + }]; + + this.normalizeRules(); +}; + +oop.inherits(CurlyHighlightRules, HtmlHighlightRules); + +exports.CurlyHighlightRules = CurlyHighlightRules; + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/d.js b/pitfall/pdfkit/node_modules/brace/mode/d.js new file mode 100644 index 00000000..c5bfa477 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/d.js @@ -0,0 +1,428 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2012, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/d', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/d_highlight_rules', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var DHighlightRules = acequire("./d_highlight_rules").DHighlightRules; +var FoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = DHighlightRules; + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + this.lineCommentStart = "/\\+"; + this.blockComment = {start: "/*", end: "*/"}; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/d_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DHighlightRules = function() { + + this.$rules = { start: + [ { token: 'punctuation.definition.comment.d', regex: '/\\*\\*/' }, + { include: 'text.html.javadoc' }, + { token: + [ 'meta.definition.class.d', + 'storage.modifier.d', + 'storage.type.structure.d', + 'meta.definition.class.d', + 'entity.name.type.class.d', + 'meta.definition.class.d', + 'meta.definition.class.d', + 'storage.type.template.d', + 'meta.definition.class.d', + 'meta.definition.class.d', + 'meta.definition.class.d', + 'punctuation.separator.inheritance.d', + 'meta.definition.class.d', + 'entity.other.inherited-class.d', + 'meta.definition.class.d', + 'entity.other.inherited-class.d', + 'meta.definition.class.d', + 'entity.other.inherited-class.d', + 'meta.definition.class.d', + 'entity.other.inherited-class.d', + 'meta.definition.class.d', + 'entity.other.inherited-class.d', + 'meta.definition.class.d', + 'entity.other.inherited-class.d', + 'meta.definition.class.d', + 'entity.other.inherited-class.d' ], + regex: '^(\\s*)((?:\\b(?:public|private|protected|static|final|native|synchronized|abstract|export)\\b\\s*)*)(class|interface)(\\s+)(\\w+)(\\s*)(?:(\\(\\s*)([^\\)]+)(\\s*\\))|)(\\s*)(?:(\\s*)(:)(\\s*)(\\w+)(?:(\\s*,\\s*)(\\w+))?(?:(\\s*,\\s*)(\\w+))?(?:(\\s*,\\s*)(\\w+))?(?:(\\s*,\\s*)(\\w+))?(?:(\\s*,\\s*)(\\w+))?(?:(\\s*,\\s*)(\\w+))?)?', + push: + [ { token: 'meta.definition.class.d', regex: '(?={)', next: 'pop' }, + { token: 'storage.modifier.d', + regex: '\\b(?:_|:)\\b', + push: + [ { token: [], regex: '(?={)', next: 'pop' }, + { include: '#all-types' }, + { defaultToken: 'meta.definition.class.extends.d' } ] }, + { defaultToken: 'meta.definition.class.d' } ] }, + { token: + [ 'meta.definition.struct.d', + 'storage.modifier.d', + 'storage.type.structure.d', + 'meta.definition.struct.d', + 'entity.name.type.struct.d', + 'meta.definition.struct.d', + 'meta.definition.struct.d', + 'storage.type.template.d', + 'meta.definition.struct.d', + 'meta.definition.struct.d' ], + regex: '^(\\s*)((?:\\b(?:public|private|protected|static|final|native|synchronized|abstract|export)\\b\\s*)*)(struct)(\\s+)(\\w+)(\\s*)(?:(\\(\\s*)([^\\)]+)(\\s*\\))|)(\\s*)', + push: + [ { token: 'meta.definition.struct.d', + regex: '(?={)', + next: 'pop' }, + { token: 'storage.modifier.d', + regex: '\\b(?:_|:)\\b', + push: + [ { token: [], regex: '(?={)', next: 'pop' }, + { include: '#all-types' }, + { defaultToken: 'meta.definition.class.extends.d' } ] }, + { defaultToken: 'meta.definition.struct.d' } ] }, + { token: + [ 'meta.definition.constructor.d', + 'storage.modifier.d', + 'entity.name.function.constructor.d', + 'meta.definition.constructor.d' ], + regex: '^(\\s*)((?:\\b(?:public|private|protected|static|final|native|synchronized|abstract|threadsafe|transient|export)\\b\\s*)*)(\\bthis)(\\s*)(?!.*;)(?=\\()' }, + { token: + [ 'storage.modifier.d', + 'entity.name.function.destructor.d', + 'meta.definition.destructor.d', + 'meta.definition.destructor.d' ], + regex: '(?:^|)((?:\\b(?:public|private|protected|static|final|native|synchronized|abstract|threadsafe|transient|export)\\b\\s*)*)(~this)(\\s*)(\\()', + TODO: '(?|(?:\\[\\s*\\])*)?)(\\s*)(\\w+)(\\s*)(?!.*;)(?=\\()' }, + { token: 'constant.other.d', regex: '\\b[A-Z][A-Z0-9_]+\\b' }, + { include: '#comments' }, + { include: '#all-types' }, + { token: 'storage.modifier.access-control.d', + regex: '\\b(?:private|protected|public|export)\\b' }, + { token: 'storage.modifier.d', + regex: '\\b(?:auto|static|override|final|const|abstract|volatile|synchronized|lazy)\\b' }, + { token: 'storage.type.structure.d', + regex: '\\b(?:template|interface|class|enum|struct|union)\\b' }, + { token: 'storage.type.d', + regex: '\\b(?:ushort|int|uint|long|ulong|float|void|byte|ubyte|double|bit|char|wchar|ucent|cent|short|bool|dchar|real|ireal|ifloat|idouble|creal|cfloat|cdouble|lazy)\\b' }, + { token: 'keyword.control.exception.d', + regex: '\\b(?:try|catch|finally|throw)\\b' }, + { token: 'keyword.control.d', + regex: '\\b(?:return|break|case|continue|default|do|while|for|switch|if|else)\\b' }, + { token: 'keyword.control.conditional.d', + regex: '\\b(?:if|else|switch|iftype)\\b' }, + { token: 'keyword.control.branch.d', + regex: '\\b(?:goto|break|continue)\\b' }, + { token: 'keyword.control.repeat.d', + regex: '\\b(?:while|for|do|foreach(?:_reverse)?)\\b' }, + { token: 'keyword.control.statement.d', + regex: '\\b(?:version|return|with|invariant|body|scope|in|out|inout|asm|mixin|function|delegate)\\b' }, + { token: 'keyword.control.pragma.d', regex: '\\bpragma\\b' }, + { token: 'keyword.control.alias.d', + regex: '\\b(?:alias|typedef)\\b' }, + { token: 'keyword.control.import.d', regex: '\\bimport\\b' }, + { token: + [ 'meta.module.d', + 'keyword.control.module.d', + 'meta.module.d', + 'entity.name.function.package.d', + 'meta.module.d' ], + regex: '^(\\s*)(module)(\\s+)([^ ;]+?)(;)' }, + { token: 'constant.language.boolean.d', + regex: '\\b(?:true|false)\\b' }, + { token: 'constant.language.d', + regex: '\\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|null)\\b' }, + { token: 'variable.language.d', regex: '\\b(?:this|super)\\b' }, + { token: 'constant.numeric.d', + regex: '\\b(?:0(?:x|X)[0-9a-fA-F]*|(?:[0-9]+\\.?[0-9]*|\\.[0-9]+)(?:(?:e|E)(?:\\+|-)?[0-9]+)?)(?:[LlFfUuDd]|UL|ul)?\\b' }, + { include: '#string_escaped_char' }, + { include: '#strings' }, + { token: 'keyword.operator.comparison.d', + regex: '==|!=|<=|>=|<>|<|>' }, + { token: 'keyword.operator.increment-decrement.d', + regex: '\\-\\-|\\+\\+' }, + { token: 'keyword.operator.arithmetic.d', + regex: '\\-|\\+|\\*|\\/|~|%' }, + { token: 'keyword.operator.logical.d', regex: '!|&&|\\|\\|' }, + { token: 'keyword.operator.overload.d', + regex: '\\b(?:opNeg|opCom|opPostInc|opPostDec|opCast|opAdd|opSub|opSub_r|opMul|opDiv|opDiv_r|opMod|opMod_r|opAnd|opOr|opXor|opShl|opShl_r|opShr|opShr_r|opUShr|opUShr_r|opCat|opCat_r|opEquals|opEquals|opCmp|opCmp|opCmp|opCmp|opAddAssign|opSubAssign|opMulAssign|opDivAssign|opModAssign|opAndAssign|opOrAssign|opXorAssign|opShlAssign|opShrAssign|opUShrAssign|opCatAssign|opIndex|opIndexAssign|opCall|opSlice|opSliceAssign|opPos|opAdd_r|opMul_r|opAnd_r|opOr_r|opXor_r)\\b' }, + { token: 'keyword.operator.d', + regex: '\\b(?:new|delete|typeof|typeid|cast|align|is)\\b' }, + { token: 'keyword.other.class-fns.d', + regex: '\\b(?:new|throws)\\b' }, + { token: 'keyword.other.external.d', + regex: '\\b(?:package|extern)\\b' }, + { token: 'keyword.other.debug.d', + regex: '\\b(?:deprecated|unittest|debug)\\b' }, + { token: 'support.type.sys-types.c', + regex: '\\b(?:u_char|u_short|u_int|u_long|ushort|uint|u_quad_t|quad_t|qaddr_t|caddr_t|daddr_t|dev_t|fixpt_t|blkcnt_t|blksize_t|gid_t|in_addr_t|in_port_t|ino_t|key_t|mode_t|nlink_t|id_t|pid_t|off_t|segsz_t|swblk_t|uid_t|id_t|clock_t|size_t|ssize_t|time_t|useconds_t|suseconds_t)\\b' }, + { token: 'support.type.pthread.c', + regex: '\\b(?:pthread_attr_t|pthread_cond_t|pthread_condattr_t|pthread_mutex_t|pthread_mutexattr_t|pthread_once_t|pthread_rwlock_t|pthread_rwlockattr_t|pthread_t|pthread_key_t)\\b' }, + { token: 'support.type.stdint.c', + regex: '\\b(?:int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|int_least8_t|int_least16_t|int_least32_t|int_least64_t|uint_least8_t|uint_least16_t|uint_least32_t|uint_least64_t|int_fast8_t|int_fast16_t|int_fast32_t|int_fast64_t|uint_fast8_t|uint_fast16_t|uint_fast32_t|uint_fast64_t|intptr_t|uintptr_t|intmax_t|intmax_t|uintmax_t|uintmax_t)\\b' } ], + '#all-types': + [ { include: '#support-type-built-ins-d' }, + { include: '#support-type-d' }, + { include: '#storage-type-d' } ], + '#comments': + [ { token: 'punctuation.definition.comment.d', + regex: '/\\*', + push: + [ { token: 'punctuation.definition.comment.d', + regex: '\\*/', + next: 'pop' }, + { defaultToken: 'comment.block.d' } ] }, + { token: 'punctuation.definition.comment.d', + regex: '/\\+', + push: + [ { token: 'punctuation.definition.comment.d', + regex: '\\+/', + next: 'pop' }, + { defaultToken: 'comment.block.nested.d' } ] }, + { token: + [ 'punctuation.definition.comment.d', + 'comment.line.double-slash.d' ], + regex: '(//)(.*$)' } ], + '#constant_placeholder': + [ { token: 'constant.other.placeholder.d', + regex: '%(?:\\([a-z_]+\\))?#?0?\\-?[ ]?\\+?(?:[0-9]*|\\*)(?:\\.(?:[0-9]*|\\*))?[hL]?[a-z%]', + caseInsensitive: true } ], + '#regular_expressions': [{token: "constant.character.escape", regex: "\\\\."}], //[ { include: 'source.regexp.python' } ], + '#statement-remainder': + [ { token: 'meta.definition.param-list.d', + regex: '\\(', + push: + [ { token: 'meta.definition.param-list.d', + regex: '(?=\\))', + next: 'pop' }, + { include: '#all-types' }, + { defaultToken: 'meta.definition.param-list.d' } ] }, + { token: 'keyword.other.class-fns.d', + regex: 'throws', + push: + [ { token: [], regex: '(?={)', next: 'pop' }, + { include: '#all-types' }, + { defaultToken: 'meta.definition.throws.d' } ] } ], + '#storage-type-d': + [ { token: 'storage.type.d', + regex: '\\b(?:void|byte|short|char|int|long|float|double|boolean|(?:[a-z]\\w+\\.)*[A-Z]\\w+)\\b' } ], + '#string_escaped_char': + [ { token: 'constant.character.escape.d', + regex: '\\\\(?:\\\\|[abefnprtv\'"?]|[0-3]\\d{,2}|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8}|&\\w+;)' }, + { token: 'invalid.illegal.unknown-escape.d', regex: '\\\\.' } ], + '#strings': + [ { token: 'punctuation.definition.string.begin.d', + regex: '"', + push: + [ { include: '#string_escaped_char' }, + { token: 'punctuation.definition.string.end.d', + regex: '"', + next: 'pop' }, + { defaultToken: 'string.quoted.double.d' } ] }, + { token: + [ 'storage.type.string.d', + 'punctuation.definition.string.begin.d' ], + regex: '(r)(")', + push: + [ { token: 'punctuation.definition.string.end.d', + regex: '"', + next: 'pop' }, + { include: '#regular_expressions' }, + { defaultToken: 'string.quoted.double.raw.d' } ] }, + { token: 'punctuation.definition.string.begin.d', + regex: '`', + push: + [ { token: 'punctuation.definition.string.end.d', + regex: '`', + next: 'pop' }, + { defaultToken: 'string.quoted.double.raw.backtick.d' } ] }, + { token: 'punctuation.definition.string.begin.d', + regex: '\'', + push: + [ { include: '#string_escaped_char' }, + { token: 'punctuation.definition.string.end.d', + regex: '\'', + next: 'pop' }, + { defaultToken: 'string.quoted.single.d' } ] } ], + '#support-type-built-ins-classes-d': + [ { token: 'support.type.built-ins.classes.d', + regex: '\\b(?:AbstractServer|ArchiveMember|ArgParser|Barrier|BomSniffer|Buffer|BufferInput|BufferOutput|BufferSlice|BufferedFile|BufferedStream|BzipInput|BzipOutput|CFile|CacheInvalidatee|CacheInvalidator|CacheServer|CacheThread|Certificate|CertificateStore|CertificateStoreCtx|ChunkInput|ChunkOutput|ClassInfo|Cluster|ClusterCache|ClusterQueue|ClusterThread|CmdParser|ComObject|Compress|Condition|Conduit|Cookie|CookieParser|CookieStack|CounterInput|CounterOutput|DataFileInput|DataFileOutput|DataInput|DataOutput|Database|DatagramConduit|DeviceConduit|DigestInput|DigestOutput|DocPrinter|Document|DummyInputStream|DummyOutputStream|EndianInput|EndianOutput|EndianProtocol|EndianStream|EventSeekInputStream|EventSeekOutputStream|FTPConnection|Fiber|Field|File|FileConduit|FileFolder|FileGroup|FileInput|FileOutput|FilePath|FileScan|FilterStream|Foo|FormatOutput|GreedyInput|GreedyOutput|Gregorian|GrowBuffer|HeapCopy|HeapSlice|Hierarchy|HttpClient|HttpCookies|HttpCookiesView|HttpGet|HttpHeaders|HttpHeadersView|HttpParams|HttpPost|HttpStack|HttpTokens|HttpTriplet|IPv4Address|IUnknown|InputFilter|InternetAddress|InternetHost|Layout|LineInput|LineIterator|LinkedFolder|Log|MapInput|MapOutput|MappedBuffer|Md2|Md4|MemoryQueue|MemoryStream|MmFile|MmFileStream|ModuleInfo|MulticastConduit|Mutex|NativeProtocol|NetCall|NetHost|NetworkAlert|NetworkCache|NetworkCall|NetworkClient|NetworkCombo|NetworkMessage|NetworkQueue|NetworkRegistry|NetworkTask|NotImplemented|Object|Observer|OutBuffer|OutputFilter|PersistQueue|Pipe|PipeConduit|Print|PrivateKey|Process|Properties|Protocol|ProtocolReader|ProtocolWriter|PublicKey|PullParser|QueueFile|QueueServer|QueueThread|QueuedCache|QuoteIterator|Random|Range|ReadWriteMutex|Reader|Record|RegExp|RegExpT|RegexIterator|RollCall|SSLCtx|SSLServerSocket|SSLSocketConduit|SaxParser|SelectionKey|Semaphore|ServerSocket|ServerThread|Service|SimpleIterator|SliceInputStream|SliceSeekInputStream|SliceSeekOutputStream|SliceStream|SnoopInput|SnoopOutput|Socket|SocketConduit|SocketListener|SocketSet|SocketStream|Sprint|Stream|StreamIterator|TArrayStream|TaskServer|TaskThread|TcpSocket|Telnet|TempFile|Text|TextFileInput|TextFileOutput|TextView|Thread|ThreadGroup|ThreadLocal|ThreadPool|Token|TypeInfo|TypeInfo_AC|TypeInfo_Aa|TypeInfo_Ab|TypeInfo_Ac|TypeInfo_Ad|TypeInfo_Ae|TypeInfo_Af|TypeInfo_Ag|TypeInfo_Ah|TypeInfo_Ai|TypeInfo_Aj|TypeInfo_Ak|TypeInfo_Al|TypeInfo_Am|TypeInfo_Ao|TypeInfo_Ap|TypeInfo_Aq|TypeInfo_Ar|TypeInfo_Array|TypeInfo_As|TypeInfo_AssociativeArray|TypeInfo_At|TypeInfo_Au|TypeInfo_Av|TypeInfo_Aw|TypeInfo_C|TypeInfo_Class|TypeInfo_D|TypeInfo_Delegate|TypeInfo_Enum|TypeInfo_Function|TypeInfo_Interface|TypeInfo_P|TypeInfo_Pointer|TypeInfo_StaticArray|TypeInfo_Struct|TypeInfo_Tuple|TypeInfo_Typedef|TypeInfo_a|TypeInfo_b|TypeInfo_c|TypeInfo_d|TypeInfo_e|TypeInfo_f|TypeInfo_g|TypeInfo_h|TypeInfo_i|TypeInfo_j|TypeInfo_k|TypeInfo_l|TypeInfo_m|TypeInfo_o|TypeInfo_p|TypeInfo_q|TypeInfo_r|TypeInfo_s|TypeInfo_t|TypeInfo_u|TypeInfo_v|TypeInfo_w|TypedInput|TypedOutput|URIerror|UdpSocket|UnCompress|UniText|UnicodeBom|UnicodeFile|UnknownAddress|Uri|UtfInput|UtfOutput|VirtualFolder|WrapSeekInputStream|WrapSeekOutputStream|Writer|XmlPrinter|ZipArchive|ZipBlockReader|ZipBlockWriter|ZipEntry|ZipEntryVerifier|ZipFile|ZipFileGroup|ZipFolder|ZipSubFolder|ZipSubFolderEntry|ZipSubFolderGroup|ZlibInput|ZlibOutput)\\b' } ], + '#support-type-built-ins-d': + [ { include: '#support-type-built-ins-exceptions-d' }, + { include: '#support-type-built-ins-classes-d' }, + { include: '#support-type-built-ins-interfaces-d' }, + { include: '#support-type-built-ins-structs-d' } ], + '#support-type-built-ins-exceptions-d': + [ { token: 'support.type.built-ins.exceptions.d', + regex: '\\b(?:AddressException|ArrayBoundsError|ArrayBoundsException|AssertError|AssertException|Base64CharException|Base64Exception|BzipClosedException|BzipException|ClusterEmptyException|ClusterFullException|ConvError|ConvOverflowError|ConversionException|CorruptedIteratorException|DatabaseException|DateParseError|Exception|FTPException|FiberException|FileException|FinalizeException|FormatError|HostException|IOException|IllegalArgumentException|IllegalElementException|InvalidKeyException|InvalidTypeException|LocaleException|ModuleCtorError|NoSuchElementException|OpenException|OpenRJException|OutOfMemoryException|PlatformException|ProcessCreateException|ProcessException|ProcessForkException|ProcessKillException|ProcessWaitException|ReadException|RegExpException|RegexException|RegistryException|SeekException|SharedLibException|SocketAcceptException|SocketException|StdioException|StreamException|StreamFileException|StringException|SwitchError|SwitchException|SyncException|TextException|ThreadError|ThreadException|UnboxException|UnicodeException|UtfException|VariantTypeMismatchException|Win32Exception|WriteException|XmlException|ZipChecksumException|ZipException|ZipExhaustedException|ZipNotSupportedException|ZlibClosedException|ZlibException|OurUnwindException|SysError)\\b' } ], + '#support-type-built-ins-interfaces-d': + [ { token: 'support.type.built-ins.interfaces.d', + regex: '\\b(?:Buffered|HttpParamsView|ICache|IChannel|IClassFactory|ICluster|IConduit|IConsumer|IEvent|IHierarchy|ILevel|IListener|IMessage|IMessageLoader|IOStream|IReadable|ISelectable|ISelectionSet|ISelector|IServer|IUnknown|IWritable|IXmlPrinter|InputStream|OutputStream|PathView|VfsFile|VfsFiles|VfsFolder|VfsFolderEntry|VfsFolders|VfsHost|VfsSync|ZipReader|ZipWriter)\\b' } ], + '#support-type-built-ins-structs-d': + [ { token: 'support.type.built-ins.structs.d', + regex: '\\b(?:ABC|ABCFLOAT|ACCEL|ACCESSTIMEOUT|ACCESS_ALLOWED_ACE|ACCESS_DENIED_ACE|ACE_HEADER|ACL|ACL_REVISION_INFORMATION|ACL_SIZE_INFORMATION|ACTION_HEADER|ADAPTER_STATUS|ADDJOB_INFO_1|ANIMATIONINFO|APPBARDATA|Argument|Atomic|Attribute|BITMAP|BITMAPCOREHEADER|BITMAPCOREINFO|BITMAPINFO|BITMAPINFOHEADER|BITMAPV4HEADER|BLOB|BROWSEINFO|BY_HANDLE_FILE_INFORMATION|Bar|Baz|BitArray|Box|BracketResult|ByteSwap|CANDIDATEFORM|CANDIDATELIST|CBTACTIVATESTRUCT|CBT_CREATEWND|CHARFORMAT|CHARRANGE|CHARSET|CHARSETINFO|CHAR_INFO|CIDA|CIEXYZ|CIEXYZTRIPLE|CLIENTCREATESTRUCT|CMINVOKECOMMANDINFO|COLORADJUSTMENT|COLORMAP|COMMCONFIG|COMMPROP|COMMTIMEOUTS|COMPAREITEMSTRUCT|COMPCOLOR|COMPOSITIONFORM|COMSTAT|CONNECTDLGSTRUCT|CONSOLE_CURSOR_INFO|CONTEXT|CONVCONTEXT|CONVINFO|COORD|COPYDATASTRUCT|CPINFO|CPLINFO|CREATESTRUCT|CREATE_PROCESS_DEBUG_INFO|CREATE_THREAD_DEBUG_INFO|CRITICAL_SECTION|CRITICAL_SECTION_DEBUG|CURRENCYFMT|CURSORSHAPE|CWPRETSTRUCT|CWPSTRUCT|CharClass|CharRange|Clock|CodePage|Console|DATATYPES_INFO_1|DCB|DDEACK|DDEADVISE|DDEDATA|DDELN|DDEML_MSG_HOOK_DATA|DDEPOKE|DDEUP|DEBUGHOOKINFO|DEBUG_EVENT|DELETEITEMSTRUCT|DEVMODE|DEVNAMES|DEV_BROADCAST_HDR|DEV_BROADCAST_OEM|DEV_BROADCAST_PORT|DEV_BROADCAST_VOLUME|DIBSECTION|DIR|DISCDLGSTRUCT|DISK_GEOMETRY|DISK_PERFORMANCE|DOCINFO|DOC_INFO_1|DOC_INFO_2|DRAGLISTINFO|DRAWITEMSTRUCT|DRAWTEXTPARAMS|DRIVER_INFO_1|DRIVER_INFO_2|DRIVER_INFO_3|DRIVE_LAYOUT_INFORMATION|Date|DateParse|DateTime|DirEntry|DynArg|EDITSTREAM|EMPTYRECORD|EMR|EMRABORTPATH|EMRANGLEARC|EMRARC|EMRBITBLT|EMRCREATEBRUSHINDIRECT|EMRCREATECOLORSPACE|EMRCREATEDIBPATTERNBRUSHPT|EMRCREATEMONOBRUSH|EMRCREATEPALETTE|EMRCREATEPEN|EMRELLIPSE|EMREOF|EMREXCLUDECLIPRECT|EMREXTCREATEFONTINDIRECTW|EMREXTCREATEPEN|EMREXTFLOODFILL|EMREXTSELECTCLIPRGN|EMREXTTEXTOUTA|EMRFILLPATH|EMRFILLRGN|EMRFORMAT|EMRFRAMERGN|EMRGDICOMMENT|EMRINVERTRGN|EMRLINETO|EMRMASKBLT|EMRMODIFYWORLDTRANSFORM|EMROFFSETCLIPRGN|EMRPLGBLT|EMRPOLYDRAW|EMRPOLYDRAW16|EMRPOLYLINE|EMRPOLYLINE16|EMRPOLYPOLYLINE|EMRPOLYPOLYLINE16|EMRPOLYTEXTOUTA|EMRRESIZEPALETTE|EMRRESTOREDC|EMRROUNDRECT|EMRSCALEVIEWPORTEXTEX|EMRSELECTCLIPPATH|EMRSELECTCOLORSPACE|EMRSELECTOBJECT|EMRSELECTPALETTE|EMRSETARCDIRECTION|EMRSETBKCOLOR|EMRSETCOLORADJUSTMENT|EMRSETDIBITSTODEVICE|EMRSETMAPPERFLAGS|EMRSETMITERLIMIT|EMRSETPALETTEENTRIES|EMRSETPIXELV|EMRSETVIEWPORTEXTEX|EMRSETVIEWPORTORGEX|EMRSETWORLDTRANSFORM|EMRSTRETCHBLT|EMRSTRETCHDIBITS|EMRTEXT|ENCORRECTTEXT|ENDROPFILES|ENHMETAHEADER|ENHMETARECORD|ENOLEOPFAILED|ENPROTECTED|ENSAVECLIPBOARD|ENUMLOGFONT|ENUMLOGFONTEX|ENUM_SERVICE_STATUS|EVENTLOGRECORD|EVENTMSG|EXCEPTION_DEBUG_INFO|EXCEPTION_POINTERS|EXCEPTION_RECORD|EXIT_PROCESS_DEBUG_INFO|EXIT_THREAD_DEBUG_INFO|EXTLOGFONT|EXTLOGPEN|EXT_BUTTON|EmptySlot|EndOfCDRecord|Environment|FILETIME|FILTERKEYS|FINDREPLACE|FINDTEXTEX|FIND_NAME_BUFFER|FIND_NAME_HEADER|FIXED|FLOATING_SAVE_AREA|FMS_GETDRIVEINFO|FMS_GETFILESEL|FMS_LOAD|FMS_TOOLBARLOAD|FOCUS_EVENT_RECORD|FONTSIGNATURE|FORMATRANGE|FORMAT_PARAMETERS|FORM_INFO_1|FileConst|FileHeader|FileRoots|FileSystem|FoldingCaseData|Foo|FtpConnectionDetail|FtpFeature|FtpFileInfo|FtpResponse|GC|GCP_RESULTS|GCStats|GENERIC_MAPPING|GLYPHMETRICS|GLYPHMETRICSFLOAT|GROUP_INFO_2|GUID|HANDLETABLE|HD_HITTESTINFO|HD_ITEM|HD_LAYOUT|HD_NOTIFY|HELPINFO|HELPWININFO|HIGHCONTRAST|HSZPAIR|HeaderElement|HttpConst|HttpHeader|HttpHeaderName|HttpResponses|HttpStatus|HttpToken|ICONINFO|ICONMETRICS|IMAGEINFO|IMAGE_DOS_HEADER|INPUT_RECORD|ITEMIDLIST|IeeeFlags|Interface|JOB_INFO_1|JOB_INFO_2|KERNINGPAIR|LANA_ENUM|LAYERPLANEDESCRIPTOR|LDT_ENTRY|LIST_ENTRY|LOAD_DLL_DEBUG_INFO|LOCALESIGNATURE|LOCALGROUP_INFO_0|LOCALGROUP_MEMBERS_INFO_0|LOCALGROUP_MEMBERS_INFO_3|LOGBRUSH|LOGCOLORSPACE|LOGFONT|LOGFONTA|LOGFONTW|LOGPALETTE|LOGPEN|LUID_AND_ATTRIBUTES|LV_COLUMN|LV_DISPINFO|LV_FINDINFO|LV_HITTESTINFO|LV_ITEM|LV_KEYDOWN|LocalFileHeader|MAT2|MD5_CTX|MDICREATESTRUCT|MEASUREITEMSTRUCT|MEMORYSTATUS|MEMORY_BASIC_INFORMATION|MENUEX_TEMPLATE_HEADER|MENUEX_TEMPLATE_ITEM|MENUITEMINFO|MENUITEMTEMPLATE|MENUITEMTEMPLATEHEADER|MENUTEMPLATE|MENU_EVENT_RECORD|METAFILEPICT|METARECORD|MINIMIZEDMETRICS|MINMAXINFO|MODEMDEVCAPS|MODEMSETTINGS|MONCBSTRUCT|MONCONVSTRUCT|MONERRSTRUCT|MONHSZSTRUCT|MONITOR_INFO_1|MONITOR_INFO_2|MONLINKSTRUCT|MONMSGSTRUCT|MOUSEHOOKSTRUCT|MOUSEKEYS|MOUSE_EVENT_RECORD|MSG|MSGBOXPARAMS|MSGFILTER|MULTIKEYHELP|NAME_BUFFER|NCB|NCCALCSIZE_PARAMS|NDDESHAREINFO|NETCONNECTINFOSTRUCT|NETINFOSTRUCT|NETRESOURCE|NEWCPLINFO|NEWTEXTMETRIC|NEWTEXTMETRICEX|NMHDR|NM_LISTVIEW|NM_TREEVIEW|NM_UPDOWNW|NONCLIENTMETRICS|NS_SERVICE_INFO|NUMBERFMT|OFNOTIFY|OFSTRUCT|OPENFILENAME|OPENFILENAMEA|OPENFILENAMEW|OSVERSIONINFO|OUTLINETEXTMETRIC|OUTPUT_DEBUG_STRING_INFO|OVERLAPPED|OffsetTypeInfo|PAINTSTRUCT|PALETTEENTRY|PANOSE|PARAFORMAT|PARTITION_INFORMATION|PERF_COUNTER_BLOCK|PERF_COUNTER_DEFINITION|PERF_DATA_BLOCK|PERF_INSTANCE_DEFINITION|PERF_OBJECT_TYPE|PIXELFORMATDESCRIPTOR|POINT|POINTFLOAT|POINTFX|POINTL|POINTS|POLYTEXT|PORT_INFO_1|PORT_INFO_2|PREVENT_MEDIA_REMOVAL|PRINTER_DEFAULTS|PRINTER_INFO_1|PRINTER_INFO_2|PRINTER_INFO_3|PRINTER_INFO_4|PRINTER_INFO_5|PRINTER_NOTIFY_INFO|PRINTER_NOTIFY_INFO_DATA|PRINTER_NOTIFY_OPTIONS|PRINTER_NOTIFY_OPTIONS_TYPE|PRINTPROCESSOR_INFO_1|PRIVILEGE_SET|PROCESS_HEAPENTRY|PROCESS_INFORMATION|PROPSHEETHEADER|PROPSHEETHEADER_U1|PROPSHEETHEADER_U2|PROPSHEETHEADER_U3|PROPSHEETPAGE|PROPSHEETPAGE_U1|PROPSHEETPAGE_U2|PROTOCOL_INFO|PROVIDOR_INFO_1|PSHNOTIFY|PUNCTUATION|PassByCopy|PassByRef|Phase1Info|PropertyConfigurator|QUERY_SERVICE_CONFIG|QUERY_SERVICE_LOCK_STATUS|RASAMB|RASCONN|RASCONNSTATUS|RASDIALEXTENSIONS|RASDIALPARAMS|RASENTRYNAME|RASPPPIP|RASPPPIPX|RASPPPNBF|RASTERIZER_STATUS|REASSIGN_BLOCKS|RECT|RECTL|REMOTE_NAME_INFO|REPASTESPECIAL|REQRESIZE|RGBQUAD|RGBTRIPLE|RGNDATA|RGNDATAHEADER|RIP_INFO|Runtime|SCROLLINFO|SECURITY_ATTRIBUTES|SECURITY_DESCRIPTOR|SECURITY_QUALITY_OF_SERVICE|SELCHANGE|SERIALKEYS|SERVICE_ADDRESS|SERVICE_ADDRESSES|SERVICE_INFO|SERVICE_STATUS|SERVICE_TABLE_ENTRY|SERVICE_TYPE_INFO_ABS|SERVICE_TYPE_VALUE_ABS|SESSION_BUFFER|SESSION_HEADER|SET_PARTITION_INFORMATION|SHFILEINFO|SHFILEOPSTRUCT|SHITEMID|SHNAMEMAPPING|SID|SID_AND_ATTRIBUTES|SID_IDENTIFIER_AUTHORITY|SINGLE_LIST_ENTRY|SIZE|SMALL_RECT|SOUNDSENTRY|STARTUPINFO|STICKYKEYS|STRRET|STYLEBUF|STYLESTRUCT|SYSTEMTIME|SYSTEM_AUDIT_ACE|SYSTEM_INFO|SYSTEM_INFO_U|SYSTEM_POWER_STATUS|Signal|SjLj_Function_Context|SpecialCaseData|TAPE_ERASE|TAPE_GET_DRIVE_PARAMETERS|TAPE_GET_MEDIA_PARAMETERS|TAPE_GET_POSITION|TAPE_PREPARE|TAPE_SET_DRIVE_PARAMETERS|TAPE_SET_MEDIA_PARAMETERS|TAPE_SET_POSITION|TAPE_WRITE_MARKS|TBADDBITMAP|TBBUTTON|TBNOTIFY|TBSAVEPARAMS|TCHOOSECOLOR|TCHOOSEFONT|TC_HITTESTINFO|TC_ITEM|TC_ITEMHEADER|TC_KEYDOWN|TEXTMETRIC|TEXTMETRICA|TEXTRANGE|TFINDTEXT|TIME_ZONE_INFORMATION|TOGGLEKEYS|TOKEN_CONTROL|TOKEN_DEFAULT_DACL|TOKEN_GROUPS|TOKEN_OWNER|TOKEN_PRIMARY_GROUP|TOKEN_PRIVILEGES|TOKEN_SOURCE|TOKEN_STATISTICS|TOKEN_USER|TOOLINFO|TOOLTIPTEXT|TPAGESETUPDLG|TPMPARAMS|TRANSMIT_FILE_BUFFERS|TREEITEM|TSMALLPOINT|TTHITTESTINFO|TTPOLYCURVE|TTPOLYGONHEADER|TVARIANT|TV_DISPINFO|TV_HITTESTINFO|TV_INSERTSTRUCT|TV_ITEM|TV_KEYDOWN|TV_SORTCB|Time|TimeOfDay|TimeSpan|Tuple|UDACCEL|ULARGE_INTEGER|UNIVERSAL_NAME_INFO|UNLOAD_DLL_DEBUG_INFO|USEROBJECTFLAGS|USER_INFO_0|USER_INFO_2|USER_INFO_3|UnicodeData|VALENT|VA_LIST|VERIFY_INFORMATION|VS_FIXEDFILEINFO|Variant|VfsFilterInfo|WIN32_FILE_ATTRIBUTE_DATA|WIN32_FIND_DATA|WIN32_FIND_DATAW|WIN32_STREAM_ID|WINDOWINFO|WINDOWPLACEMENT|WINDOWPOS|WINDOW_BUFFER_SIZE_RECORD|WNDCLASS|WNDCLASSA|WNDCLASSEX|WNDCLASSEXA|WSADATA|WallClock|XFORM|ZipEntryInfo)\\b' } ], + '#support-type-d': + [ { token: 'support.type.d', + regex: '\\b(?:tango|std)\\.[\\w\\.]+\\b' } ] } + + this.normalizeRules(); +}; + +DHighlightRules.metaData = { comment: 'D language', + fileTypes: [ 'd', 'di' ], + firstLineMatch: '^#!.*\\bg?dmd\\b.', + foldingStartMarker: '(?x)/\\*\\*(?!\\*)|^(?![^{]*?//|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|//|/\\*(?!.*?\\*/.*\\S))', + foldingStopMarker: '(? indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/dart.js b/pitfall/pdfkit/node_modules/brace/mode/dart.js new file mode 100644 index 00000000..1020eb9e --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/dart.js @@ -0,0 +1,986 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2012, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * Contributor(s): + * + * + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/dart', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/c_cpp', 'ace/tokenizer', 'ace/mode/dart_highlight_rules', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var CMode = acequire("./c_cpp").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var DartHighlightRules = acequire("./dart_highlight_rules").DartHighlightRules; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + CMode.call(this); + this.HighlightRules = DartHighlightRules; + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, CMode); + +(function() { + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/c_cpp', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/c_cpp_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var c_cppHighlightRules = acequire("./c_cpp_highlight_rules").c_cppHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = c_cppHighlightRules; + + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } else if (state == "doc-start") { + if (endState == "start") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); +ace.define('ace/mode/c_cpp_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var cFunctions = exports.cFunctions = "\\s*\\bhypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len)))\\b" + +var c_cppHighlightRules = function() { + + var keywordControls = ( + "break|case|continue|default|do|else|for|goto|if|_Pragma|" + + "return|switch|while|catch|operator|try|throw|using" + ); + + var storageType = ( + "asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" + + "_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|" + + "class|wchar_t|template" + ); + + var storageModifiers = ( + "const|extern|register|restrict|static|volatile|inline|private:|" + + "protected:|public:|friend|explicit|virtual|export|mutable|typename" + ); + + var keywordOperators = ( + "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq" + + "const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace" + ); + + var builtinConstants = ( + "NULL|true|false|TRUE|FALSE" + ); + + var keywordMapper = this.$keywords = this.createKeywordMapper({ + "keyword.control" : keywordControls, + "storage.type" : storageType, + "storage.modifier" : storageModifiers, + "keyword.operator" : keywordOperators, + "variable.language": "this", + "constant.language": builtinConstants + }, "identifier"); + + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\d\\$_\u00a1-\uffff]*\\b"; + + this.$rules = { + "start" : [ + { + token : "comment", + regex : "\\/\\/.*$" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // multi line string start + regex : '["].*\\\\$', + next : "qqstring" + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : "string", // multi line string start + regex : "['].*\\\\$", + next : "qstring" + }, { + token : "constant.numeric", // hex + regex : "0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" + }, { + token : "keyword", // pre-compiler directives + regex : "#\\s*(?:include|import|pragma|line|define|undef|if|ifdef|else|elif|ifndef)\\b", + next : "directive" + }, { + token : "keyword", // special case pre-compiler directive + regex : "(?:#\\s*endif)\\b" + }, { + token : "support.function.C99.c", + regex : cFunctions + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator", + regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)" + }, { + token : "punctuation.operator", + regex : "\\?|\\:|\\,|\\;|\\." + }, { + token : "paren.lparen", + regex : "[[({]" + }, { + token : "paren.rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + } + ], + "comment" : [ + { + token : "comment", // closing comment + regex : ".*?\\*\\/", + next : "start" + }, { + token : "comment", // comment spanning whole line + regex : ".+" + } + ], + "qqstring" : [ + { + token : "string", + regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', + next : "start" + }, { + token : "string", + regex : '.+' + } + ], + "qstring" : [ + { + token : "string", + regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", + next : "start" + }, { + token : "string", + regex : '.+' + } + ], + "directive" : [ + { + token : "constant.other.multiline", + regex : /\\/ + }, + { + token : "constant.other.multiline", + regex : /.*\\/ + }, + { + token : "constant.other", + regex : "\\s*<.+?>", + next : "start" + }, + { + token : "constant.other", // single line + regex : '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]', + next : "start" + }, + { + token : "constant.other", // single line + regex : "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']", + next : "start" + }, + { + token : "constant.other", + regex : /[^\\\/]+/, + next : "start" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("start") ]); +}; + +oop.inherits(c_cppHighlightRules, TextHighlightRules); + +exports.c_cppHighlightRules = c_cppHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); + + +ace.define('ace/mode/dart_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DartHighlightRules = function() { + + var constantLanguage = "true|false|null"; + var variableLanguage = "this|super"; + var keywordControl = "try|catch|finally|throw|break|case|continue|default|do|else|for|if|in|return|switch|while|new"; + var keywordDeclaration = "abstract|class|extends|external|factory|implements|get|native|operator|set|typedef"; + var storageModifier = "static|final|const"; + var storageType = "void|bool|num|int|double|dynamic|var|String"; + + var keywordMapper = this.createKeywordMapper({ + "constant.language.dart": constantLanguage, + "variable.language.dart": variableLanguage, + "keyword.control.dart": keywordControl, + "keyword.declaration.dart": keywordDeclaration, + "storage.modifier.dart": storageModifier, + "storage.type.primitive.dart": storageType + }, "identifier"); + + var stringfill = { + token : "string", + regex : ".+" + }; + + this.$rules = + { + "start": [ + { + token : "comment", + regex : /\/\/.*$/ + }, + { + token : "comment", // multi line comment + regex : /\/\*/, + next : "comment" + }, + { + token: ["meta.preprocessor.script.dart"], + regex: "^(#!.*)$" + }, + { + token: "keyword.other.import.dart", + regex: "(?:\\b)(?:library|import|part|of)(?:\\b)" + }, + { + token : ["keyword.other.import.dart", "text"], + regex : "(?:\\b)(prefix)(\\s*:)" + }, + { + regex: "\\bas\\b", + token: "keyword.cast.dart" + }, + { + regex: "\\?|:", + token: "keyword.control.ternary.dart" + }, + { + regex: "(?:\\b)(is\\!?)(?:\\b)", + token: ["keyword.operator.dart"] + }, + { + regex: "(<<|>>>?|~|\\^|\\||&)", + token: ["keyword.operator.bitwise.dart"] + }, + { + regex: "((?:&|\\^|\\||<<|>>>?)=)", + token: ["keyword.operator.assignment.bitwise.dart"] + }, + { + regex: "(===?|!==?|<=?|>=?)", + token: ["keyword.operator.comparison.dart"] + }, + { + regex: "((?:[+*/%-]|\\~)=)", + token: ["keyword.operator.assignment.arithmetic.dart"] + }, + { + regex: "=", + token: "keyword.operator.assignment.dart" + }, + { + token : "string", + regex : "'''", + next : "qdoc" + }, + { + token : "string", + regex : '"""', + next : "qqdoc" + }, + { + token : "string", + regex : "'", + next : "qstring" + }, + { + token : "string", + regex : '"', + next : "qqstring" + }, + { + regex: "(\\-\\-|\\+\\+)", + token: ["keyword.operator.increment-decrement.dart"] + }, + { + regex: "(\\-|\\+|\\*|\\/|\\~\\/|%)", + token: ["keyword.operator.arithmetic.dart"] + }, + { + regex: "(!|&&|\\|\\|)", + token: ["keyword.operator.logical.dart"] + }, + { + token : "constant.numeric", // hex + regex : "0[xX][0-9a-fA-F]+\\b" + }, + { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, + { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + } + ], + "comment" : [ + { + token : "comment", // closing comment + regex : ".*?\\*\\/", + next : "start" + }, { + token : "comment", // comment spanning whole line + regex : ".+" + } + ], + "qdoc" : [ + { + token : "string", + regex : ".*?'''", + next : "start" + }, stringfill], + + "qqdoc" : [ + { + token : "string", + regex : '.*?"""', + next : "start" + }, stringfill], + + "qstring" : [ + { + token : "string", + regex : "[^\\\\']*(?:\\\\.[^\\\\']*)*'", + next : "start" + }, stringfill], + + "qqstring" : [ + { + token : "string", + regex : '[^\\\\"]*(?:\\\\.[^\\\\"]*)*"', + next : "start" + }, stringfill] +} + +}; + +oop.inherits(DartHighlightRules, TextHighlightRules); + +exports.DartHighlightRules = DartHighlightRules; +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/diff.js b/pitfall/pdfkit/node_modules/brace/mode/diff.js new file mode 100644 index 00000000..5ea6058f --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/diff.js @@ -0,0 +1,169 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/diff', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/diff_highlight_rules', 'ace/mode/folding/diff'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var HighlightRules = acequire("./diff_highlight_rules").DiffHighlightRules; +var FoldMode = acequire("./folding/diff").FoldMode; + +var Mode = function() { + this.HighlightRules = HighlightRules; + this.foldingRules = new FoldMode(["diff", "index", "\\+{3}", "@@|\\*{5}"], "i"); +}; +oop.inherits(Mode, TextMode); + +(function() { + +}).call(Mode.prototype); + +exports.Mode = Mode; + +}); + +ace.define('ace/mode/diff_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DiffHighlightRules = function() { + + this.$rules = { + "start" : [{ + regex: "^(?:\\*{15}|={67}|-{3}|\\+{3})$", + token: "punctuation.definition.separator.diff", + "name": "keyword" + }, { //diff.range.unified + regex: "^(@@)(\\s*.+?\\s*)(@@)(.*)$", + token: [ + "constant", + "constant.numeric", + "constant", + "comment.doc.tag" + ] + }, { //diff.range.normal + regex: "^(\\d+)([,\\d]+)(a|d|c)(\\d+)([,\\d]+)(.*)$", + token: [ + "constant.numeric", + "punctuation.definition.range.diff", + "constant.function", + "constant.numeric", + "punctuation.definition.range.diff", + "invalid" + ], + "name": "meta." + }, { + regex: "^(\\-{3}|\\+{3}|\\*{3})( .+)$", + token: [ + "constant.numeric", + "meta.tag" + ] + }, { // added + regex: "^([!+>])(.*?)(\\s*)$", + token: [ + "support.constant", + "text", + "invalid" + ] + }, { // removed + regex: "^([<\\-])(.*?)(\\s*)$", + token: [ + "support.function", + "string", + "invalid" + ] + }, { + regex: "^(diff)(\\s+--\\w+)?(.+?)( .+)?$", + token: ["variable", "variable", "keyword", "variable"] + }, { + regex: "^Index.+$", + token: "variable" + }, { + regex: "^\\s+$", + token: "text" + }, { + regex: "\\s*$", + token: "invalid" + }, { + defaultToken: "invisible", + caseInsensitive: true + } + ] + }; +}; + +oop.inherits(DiffHighlightRules, TextHighlightRules); + +exports.DiffHighlightRules = DiffHighlightRules; +}); + +ace.define('ace/mode/folding/diff', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var BaseFoldMode = acequire("./fold_mode").FoldMode; +var Range = acequire("../../range").Range; + +var FoldMode = exports.FoldMode = function(levels, flag) { + this.regExpList = levels; + this.flag = flag; + this.foldingStartMarker = RegExp("^(" + levels.join("|") + ")", this.flag); +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + this.getFoldWidgetRange = function(session, foldStyle, row) { + var line = session.getLine(row); + var start = {row: row, column: line.length}; + + var regList = this.regExpList; + for (var i = 1; i <= regList.length; i++) { + var re = RegExp("^(" + regList.slice(0, i).join("|") + ")", this.flag); + if (re.test(line)) + break; + } + + for (var l = session.getLength(); ++row < l; ) { + line = session.getLine(row); + if (re.test(line)) + break; + } + if (row == start.row + 1) + return; + return Range.fromPoints(start, {row: row - 1, column: line.length}); + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/django.js b/pitfall/pdfkit/node_modules/brace/mode/django.js new file mode 100644 index 00000000..96eda818 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/django.js @@ -0,0 +1,2440 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2012, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/django', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/html', 'ace/tokenizer', 'ace/mode/html_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + +var oop = acequire("../lib/oop"); +var HtmlMode = acequire("./html").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var HtmlHighlightRules = acequire("./html_highlight_rules").HtmlHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DjangoHighlightRules = function(){ + this.$rules = { + 'start': [{ + token: "string", + regex: '".*?"' + }, { + token: "string", + regex: "'.*?'" + }, { + token: "constant", + regex: '[0-9]+' + }, { + token: "variable", + regex: "[-_a-zA-Z0-9:]+" + }], + 'comment': [{ + token : "comment.block", + merge: true, + regex : ".+?" + }], + 'tag': [{ + token: "entity.name.function", + regex: "[a-zA-Z][_a-zA-Z0-9]*", + next: "start" + }] + }; +}; + +oop.inherits(DjangoHighlightRules, TextHighlightRules) + +var DjangoHtmlHighlightRules = function() { + this.$rules = new HtmlHighlightRules().getRules(); + + for (var i in this.$rules) { + this.$rules[i].unshift({ + token: "comment.line", + regex: "\\{#.*?#\\}" + }, { + token: "comment.block", + regex: "\\{\\%\\s*comment\\s*\\%\\}", + merge: true, + next: "django-comment" + }, { + token: "constant.language", + regex: "\\{\\{", + next: "django-start" + }, { + token: "constant.language", + regex: "\\{\\%", + next: "django-tag" + }); + this.embedRules(DjangoHighlightRules, "django-", [{ + token: "comment.block", + regex: "\\{\\%\\s*endcomment\\s*\\%\\}", + merge: true, + next: "start" + }, { + token: "constant.language", + regex: "\\%\\}", + next: "start" + }, { + token: "constant.language", + regex: "\\}\\}", + next: "start" + }]); + } +}; + +oop.inherits(DjangoHtmlHighlightRules, HtmlHighlightRules); + +var Mode = function() { + HtmlMode.call(this); + this.HighlightRules = DjangoHtmlHighlightRules; +}; +oop.inherits(Mode, HtmlMode); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/html', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/css', 'ace/tokenizer', 'ace/mode/html_highlight_rules', 'ace/mode/behaviour/html', 'ace/mode/folding/html', 'ace/mode/html_completions'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var JavaScriptMode = acequire("./javascript").Mode; +var CssMode = acequire("./css").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var HtmlHighlightRules = acequire("./html_highlight_rules").HtmlHighlightRules; +var HtmlBehaviour = acequire("./behaviour/html").HtmlBehaviour; +var HtmlFoldMode = acequire("./folding/html").FoldMode; +var HtmlCompletions = acequire("./html_completions").HtmlCompletions; + +var Mode = function() { + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new HtmlBehaviour(); + this.$completer = new HtmlCompletions(); + + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + + this.foldingRules = new HtmlFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.blockComment = {start: ""}; + + this.getNextLineIndent = function(state, line, tab) { + return this.$getIndent(line); + }; + + this.checkOutdent = function(state, line, input) { + return false; + }; + + this.getCompletions = function(state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/javascript', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = JavaScriptHighlightRules; + + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/javascript"), "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + + worker.on("jslint", function(results) { + session.setAnnotations(results.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/javascript_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var JavaScriptHighlightRules = function() { + var keywordMapper = this.createKeywordMapper({ + "variable.language": + "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document" , // Pseudo + "keyword": + "const|yield|import|get|set|" + + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", + "storage.type": + "const|let|var|function", + "constant.language": + "null|Infinity|NaN|undefined", + "support.function": + "alert", + "constant.language.boolean": "true|false" + }, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; + + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-6][0-7]?|" + // oct + "37[0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + + this.$rules = { + "no_regex" : [ + { + token : "comment", + regex : "\\/\\/", + next : "line_comment" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : /\/\*/, + next : "comment" + }, { + token : "string", + regex : "'(?=.)", + next : "qstring" + }, { + token : "string", + regex : '"(?=.)', + next : "qqstring" + }, { + token : "constant.numeric", // hex + regex : /0[xX][0-9a-fA-F]+\b/ + }, { + token : "constant.numeric", // float + regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ + }, { + token : [ + "storage.type", "punctuation.operator", "support.function", + "punctuation.operator", "entity.name.function", "text","keyword.operator" + ], + regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "paren.lparen" + ], + regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "text", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : "keyword", + regex : "(?:" + kwBeforeRe + ")\\b", + next : "start" + }, { + token : ["punctuation.operator", "support.function"], + regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token : ["punctuation.operator", "support.function.dom"], + regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token : ["punctuation.operator", "support.constant"], + regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token : ["storage.type", "punctuation.operator", "support.function.firebug"], + regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/ + }, { + token : keywordMapper, + regex : identifierRe + }, { + token : "keyword.operator", + regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, + next : "start" + }, { + token : "punctuation.operator", + regex : /\?|\:|\,|\;|\./, + next : "start" + }, { + token : "paren.lparen", + regex : /[\[({]/, + next : "start" + }, { + token : "paren.rparen", + regex : /[\])}]/ + }, { + token : "keyword.operator", + regex : /\/=?/, + next : "start" + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment_regex_allowed" + }, { + token : "comment", + regex : "\\/\\/", + next : "line_comment_regex_allowed" + }, { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token : "text", + regex : "\\s+|^$", + next : "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/\\w*", + next: "no_regex" + }, { + token : "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token : "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/ + }, { + token : "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "function_arguments": [ + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "[, ]+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "comment_regex_allowed" : [ + {token : "comment", regex : "\\*\\/", next : "start"}, + {defaultToken : "comment"} + ], + "comment" : [ + {token : "comment", regex : "\\*\\/", next : "no_regex"}, + {defaultToken : "comment"} + ], + "line_comment_regex_allowed" : [ + {token : "comment", regex : "$|^", next : "start"}, + {defaultToken : "comment"} + ], + "line_comment" : [ + {token : "comment", regex : "$|^", next : "no_regex"}, + {defaultToken : "comment"} + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qqstring" + }, { + token : "string", + regex : '"|$', + next : "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qstring" + }, { + token : "string", + regex : "'|$", + next : "no_regex" + }, { + defaultToken: "string" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("no_regex") ]); +}; + +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); + +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); + +ace.define('ace/mode/css', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/behaviour/css', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var CssHighlightRules = acequire("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var CssBehaviour = acequire("./behaviour/css").CssBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.foldingRules = "cStyle"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/css"), "Worker"); + worker.attachToDocument(session.getDocument()); + + worker.on("csslint", function(e) { + session.setAnnotations(e.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; + +}); + +ace.define('ace/mode/css_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; + +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|acequired|root|target|valid|visited)\\b"; + +var CssHighlightRules = function() { + + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + + this.$rules = { + "start" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "@.*?{", + push: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "media" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "\\}", + next: "pop" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "comment" : [{ + token : "comment", + regex : "\\*\\/", + next : "pop" + }, { + defaultToken : "comment" + }], + + "ruleset" : [ + { + token : "paren.rparen", + regex : "\\}", + next: "pop" + }, { + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : ["constant.numeric", "keyword"], + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + }, { + token : "constant.numeric", + regex : numRe + }, { + token : "constant.numeric", // hex6 color + regex : "#[a-f0-9]{6}" + }, { + token : "constant.numeric", // hex3 color + regex : "#[a-f0-9]{3}" + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex : pseudoElements + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex : pseudoClasses + }, { + token : ["support.function", "string", "support.function"], + regex : "(url\\()(.*)(\\))" + }, { + token : keywordMapper, + regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + caseInsensitive: true + }] + }; + + this.normalizeRules(); +}; + +oop.inherits(CssHighlightRules, TextHighlightRules); + +exports.CssHighlightRules = CssHighlightRules; + +}); + +ace.define('ace/mode/behaviour/css', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + +var CssBehaviour = function () { + + this.inherit(CstyleBehaviour); + + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + } + } + if (!line.substring(cursor.column).match(/^\s*;/)) { + return { + text: ':;', + selection: [1, 1] + } + } + } + } + }); + + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column ++; + return range; + } + } + } + }); + + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + } + } + } + }); + +} +oop.inherits(CssBehaviour, CstyleBehaviour); + +exports.CssBehaviour = CssBehaviour; +}); + +ace.define('ace/mode/html_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var CssHighlightRules = acequire("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = acequire("./xml_highlight_rules").XmlHighlightRules; + +var tagMap = lang.createMap({ + a : 'anchor', + button : 'form', + form : 'form', + img : 'image', + input : 'form', + label : 'form', + option : 'form', + script : 'script', + select : 'form', + textarea : 'form', + style : 'style', + table : 'table', + tbody : 'table', + td : 'table', + tfoot : 'table', + th : 'table', + tr : 'table' +}); + +var HtmlHighlightRules = function() { + XmlHighlightRules.call(this); + + this.addRules({ + attributes: [{ + include : "space" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "keyword.operator.separator", + regex : "=", + push : [{ + include: "space" + }, { + token : "string", + regex : "[^<>='\"`\\s]+", + next : "pop" + }, { + token : "empty", + regex : "", + next : "pop" + }] + }, { + include : "string" + }], + tag: [{ + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation.begin", + "meta.tag.name" + (group ? "." + group : "")]; + }, + regex : "(<)([-_a-zA-Z0-9:]+)", + next: "start_tag_stuff" + }, { + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation.begin", + "meta.tag.name" + (group ? "." + group : "")]; + }, + regex : "(", next : "start"} + ], + end_tag_stuff: [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next : "start"} + ] + }); + + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); + + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; + +oop.inherits(HtmlHighlightRules, XmlHighlightRules); + +exports.HtmlHighlightRules = HtmlHighlightRules; +}); + +ace.define('ace/mode/xml_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var xmlUtil = acequire("./xml_util"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var XmlHighlightRules = function(normalize) { + this.$rules = { + start : [ + {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"}, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration" + }, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction" + }, + {token : "comment", regex : "<\\!--", next : "comment"}, + { + token : ["punctuation.doctype.begin", "meta.tag.doctype"], + regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype" + }, + {include : "tag"}, + {include : "reference"} + ], + + xml_declaration : [ + {include : "attributes"}, + {include : "instruction"} + ], + + instruction : [ + {token : "punctuation.instruction.end", regex : "\\?>", next : "start"} + ], + + doctype : [ + {include : "space"}, + {include : "string"}, + {token : "punctuation.doctype.end", regex : ">", next : "start"}, + {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"}, + {token : "punctuation.begin", regex : "\\[", push : "declarations"} + ], + + declarations : [{ + token : "text", + regex : "\\s+" + }, { + token: "punctuation.end", + regex: "]", + next: "pop" + }, { + token : ["punctuation.begin", "keyword"], + regex : "(<\\!)([-_a-zA-Z0-9]+)", + push : [{ + token : "text", + regex : "\\s+" + }, + { + token : "punctuation.end", + regex : ">", + next : "pop" + }, + {include : "string"}] + }], + + cdata : [ + {token : "string.end", regex : "\\]\\]>", next : "start"}, + {token : "text", regex : "\\s+"}, + {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"} + ], + + comment : [ + {token : "comment", regex : "-->", next : "start"}, + {defaultToken : "comment"} + ], + + tag : [{ + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)", + next: [ + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"} + ] + }, { + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(", next : "start"} + ] + }], + + space : [ + {token : "text", regex : "\\s+"} + ], + + reference : [{ + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, { + token : "invalid.illegal", regex : "&" + }], + + string: [{ + token : "string", + regex : "'", + push : "qstring_inner" + }, { + token : "string", + regex : '"', + push : "qqstring_inner" + }], + + qstring_inner: [ + {token : "string", regex: "'", next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + qqstring_inner: [ + {token : "string", regex: '"', next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + attributes: [{ + token : "entity.other.attribute-name", + regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" + }, { + token : "keyword.operator.separator", + regex : "=" + }, { + include : "space" + }, { + include : "string" + }] + }; + + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; + + +(function() { + + this.embedTagRules = function(HighlightRules, prefix, tag){ + this.$rules.tag.unshift({ + token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(<)(" + tag + ")", + next: [ + {include : "space"}, + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"} + ] + }); + + this.$rules[tag + "-end"] = [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next: "start", + onMatch : function(value, currentState, stack) { + stack.splice(0); + return this.token; + }} + ] + + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(" + }]); + }; + +}).call(TextHighlightRules.prototype); + +oop.inherits(XmlHighlightRules, TextHighlightRules); + +exports.XmlHighlightRules = XmlHighlightRules; +}); + +ace.define('ace/mode/xml_util', ["require", 'exports', 'module' ], function(acequire, exports, module) { + + +function string(state) { + return [{ + token : "string", + regex : '"', + next : state + "_qqstring" + }, { + token : "string", + regex : "'", + next : state + "_qstring" + }]; +} + +function multiLineString(quote, state) { + return [ + {token : "string", regex : quote, next : state}, + { + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, + {defaultToken : "string"} + ]; +} + +exports.tag = function(states, name, nextState, tagMap) { + states[name] = [{ + token : "text", + regex : "\\s+" + }, { + + token : !tagMap ? "meta.tag.tag-name" : function(value) { + if (tagMap[value]) + return "meta.tag.tag-name." + tagMap[value]; + else + return "meta.tag.tag-name"; + }, + regex : "[-_a-zA-Z0-9:]+", + next : name + "_embed_attribute_list" + }, { + token: "empty", + regex: "", + next : name + "_embed_attribute_list" + }]; + + states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list"); + states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list"); + + states[name + "_embed_attribute_list"] = [{ + token : "meta.tag.r", + regex : "/?>", + next : nextState + }, { + token : "keyword.operator", + regex : "=" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "text", + regex : "\\s+" + }].concat(string(name)); +}; + +}); + +ace.define('ace/mode/behaviour/html', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour/xml', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var XmlBehaviour = acequire("../behaviour/xml").XmlBehaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var voidElements = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr']; + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); + return hasType; +} + +var HtmlBehaviour = function () { + + this.inherit(XmlBehaviour); // Get xml behaviour + + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getCursorPosition(); + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken(); + + if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column) + return; + var atCursor = false; + if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text'))); + } else { + atCursor = true; + } + if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) { + return; + } + var element = token.value; + if (atCursor){ + var element = element.substring(0, position.column - token.start); + } + if (voidElements.indexOf(element) !== -1){ + return; + } + return { + text: '>' + '', + selection: [1, 1] + } + } + }); +} +oop.inherits(HtmlBehaviour, XmlBehaviour); + +exports.HtmlBehaviour = HtmlBehaviour; +}); + +ace.define('ace/mode/behaviour/xml', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); + return hasType; +} + +var XmlBehaviour = function () { + + this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour + + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getCursorPosition(); + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken(); + + if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column) + return; + var atCursor = false; + if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text'))); + } else { + atCursor = true; + } + if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) { + return; + } + var tag = token.value; + if (atCursor){ + var tag = tag.substring(0, position.column - token.start); + } + + return { + text: '>' + '', + selection: [1, 1] + } + } + }); + + this.add('autoindent', 'insertion', function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var rightChars = line.substring(cursor.column, cursor.column + 2); + if (rightChars == '?)/; + this._parseTag = function(tag) { + + var match = tag.match(this.tagRe); + var column = 0; + + return { + value: tag, + match: match ? match[2] : "", + closing: match ? !!match[3] : false, + selfClosing: match ? !!match[5] || match[2] == "/>" : false, + tagName: match ? match[4] : "", + column: match[1] ? column + match[1].length : column + }; + }; + this._readTagForward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var value = ""; + var start; + + do { + if (token.type.lastIndexOf("meta.tag", 0) === 0) { + if (!start) { + var start = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + }; + } + value += token.value; + if (value.indexOf(">") !== -1) { + var tag = this._parseTag(value); + tag.start = start; + tag.end = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + token.value.length + }; + iterator.stepForward(); + return tag; + } + } + } while(token = iterator.stepForward()); + + return null; + }; + + this._readTagBackward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var value = ""; + var end; + + do { + if (token.type.lastIndexOf("meta.tag", 0) === 0) { + if (!end) { + end = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + token.value.length + }; + } + value = token.value + value; + if (value.indexOf("<") !== -1) { + var tag = this._parseTag(value); + tag.end = end; + tag.start = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + }; + iterator.stepBackward(); + return tag; + } + } + } while(token = iterator.stepBackward()); + + return null; + }; + + this._pop = function(stack, tag) { + while (stack.length) { + + var top = stack[stack.length-1]; + if (!tag || top.tagName == tag.tagName) { + return stack.pop(); + } + else if (this.voidElements[tag.tagName]) { + return; + } + else if (this.voidElements[top.tagName]) { + stack.pop(); + continue; + } else { + return null; + } + } + }; + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + + if (!firstTag.match) + return null; + + var isBackward = firstTag.closing || firstTag.selfClosing; + var stack = []; + var tag; + + if (!isBackward) { + var iterator = new TokenIterator(session, row, firstTag.column); + var start = { + row: row, + column: firstTag.column + firstTag.tagName.length + 2 + }; + while (tag = this._readTagForward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) + return Range.fromPoints(start, tag.start); + } + else { + stack.push(tag) + } + } + } + else { + var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length); + var end = { + row: row, + column: firstTag.column + }; + + while (tag = this._readTagBackward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (!tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) { + tag.start.column += tag.tagName.length + 2; + return Range.fromPoints(tag.start, end); + } + } + else { + stack.push(tag) + } + } + } + + }; + +}).call(FoldMode.prototype); + +}); + +ace.define('ace/mode/html_completions', ["require", 'exports', 'module' , 'ace/token_iterator'], function(acequire, exports, module) { + + +var TokenIterator = acequire("../token_iterator").TokenIterator; + +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; + +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; + +var globalAttributes = commonAttributes.concat(eventAttributes); + +var attributeMap = { + "html": ["manifest"], + "head": [], + "title": [], + "base": ["href", "target"], + "link": ["href", "hreflang", "rel", "media", "type", "sizes"], + "meta": ["http-equiv", "name", "content", "charset"], + "style": ["type", "media", "scoped"], + "script": ["charset", "type", "src", "defer", "async"], + "noscript": ["href"], + "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"], + "section": [], + "nav": [], + "article": ["pubdate"], + "aside": [], + "h1": [], + "h2": [], + "h3": [], + "h4": [], + "h5": [], + "h6": [], + "header": [], + "footer": [], + "address": [], + "main": [], + "p": [], + "hr": [], + "pre": [], + "blockquote": ["cite"], + "ol": ["start", "reversed"], + "ul": [], + "li": ["value"], + "dl": [], + "dt": [], + "dd": [], + "figure": [], + "figcaption": [], + "div": [], + "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"], + "em": [], + "strong": [], + "small": [], + "s": [], + "cite": [], + "q": ["cite"], + "dfn": [], + "abbr": [], + "data": [], + "time": ["datetime"], + "code": [], + "var": [], + "samp": [], + "kbd": [], + "sub": [], + "sup": [], + "i": [], + "b": [], + "u": [], + "mark": [], + "ruby": [], + "rt": [], + "rp": [], + "bdi": [], + "bdo": [], + "span": [], + "br": [], + "wbr": [], + "ins": ["cite", "datetime"], + "del": ["cite", "datetime"], + "img": ["alt", "src", "height", "width", "usemap", "ismap"], + "iframe": ["name", "src", "height", "width", "sandbox", "seamless"], + "embed": ["src", "height", "width", "type"], + "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"], + "param": ["name", "value"], + "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"], + "audio": ["src", "autobuffer", "autoplay", "loop", "controls"], + "source": ["src", "type", "media"], + "track": ["kind", "src", "srclang", "label", "default"], + "canvas": ["width", "height"], + "map": ["name"], + "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"], + "svg": [], + "math": [], + "table": ["summary"], + "caption": [], + "colgroup": ["span"], + "col": ["span"], + "tbody": [], + "thead": [], + "tfoot": [], + "tr": [], + "td": ["headers", "rowspan", "colspan"], + "th": ["headers", "rowspan", "colspan", "scope"], + "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"], + "fieldset": ["disabled", "form", "name"], + "legend": [], + "label": ["form", "for"], + "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "acequired", "size", "src", "step", "width", "files", "value"], + "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"], + "select": ["autofocus", "disabled", "form", "multiple", "name", "size"], + "datalist": [], + "optgroup": ["disabled", "label"], + "option": ["disabled", "selected", "label", "value"], + "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "acequired", "rows", "cols", "wrap"], + "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"], + "output": ["for", "form", "name"], + "progress": ["value", "max"], + "meter": ["value", "min", "max", "low", "high", "optimum"], + "details": ["open"], + "summary": [], + "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"], + "menu": ["type", "label"], + "dialog": ["open"] +}; + +var allElements = Object.keys(attributeMap); + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); +} + +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + if (!token || !hasType(token, 'tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'operator') || hasType(token, 'attribute-name') || hasType(token, 'text'))); + } + if (token && hasType(token, 'tag-name') && !iterator.stepBackward().value.match('/')) + return token.value; +} + +var HtmlCompletions = function() { + +}; + +(function() { + + this.getCompletions = function(state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + + if (!token) + return []; + if (hasType(token, "tag-name") || (token.value == '<' && hasType(token, "text"))) + return this.getTagCompletions(state, session, pos, prefix); + if (hasType(token, 'text') || hasType(token, 'attribute-name')) + return this.getAttributeCompetions(state, session, pos, prefix); + + return []; + }; + + this.getTagCompletions = function(state, session, pos, prefix) { + var elements = allElements; + if (prefix) { + elements = elements.filter(function(element){ + return element.indexOf(prefix) === 0; + }); + } + return elements.map(function(element){ + return { + value: element, + meta: "tag" + }; + }); + }; + + this.getAttributeCompetions = function(state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(attributeMap[tagName]); + } + if (prefix) { + attributes = attributes.filter(function(attribute){ + return attribute.indexOf(prefix) === 0; + }); + } + return attributes.map(function(attribute){ + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute" + }; + }); + }; + +}).call(HtmlCompletions.prototype); + +exports.HtmlCompletions = HtmlCompletions; +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/dot.js b/pitfall/pdfkit/node_modules/brace/mode/dot.js new file mode 100644 index 00000000..38a4ce9b --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/dot.js @@ -0,0 +1,360 @@ +ace.define('ace/mode/dot', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/matching_brace_outdent', 'ace/mode/dot_highlight_rules', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var DotHighlightRules = acequire("./dot_highlight_rules").DotHighlightRules; +var DotFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = DotHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.foldingRules = new DotFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = ["//", "#"]; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start") { + var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); +ace.define('ace/mode/dot_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules', 'ace/mode/doc_comment_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; + +var DotHighlightRules = function() { + + var keywords = lang.arrayToMap( + ("strict|node|edge|graph|digraph|subgraph").split("|") + ); + + var attributes = lang.arrayToMap( + ("damping|k|url|area|arrowhead|arrowsize|arrowtail|aspect|bb|bgcolor|center|charset|clusterrank|color|colorscheme|comment|compound|concentrate|constraint|decorate|defaultdist|dim|dimen|dir|diredgeconstraints|distortion|dpi|edgeurl|edgehref|edgetarget|edgetooltip|epsilon|esep|fillcolor|fixedsize|fontcolor|fontname|fontnames|fontpath|fontsize|forcelabels|gradientangle|group|headurl|head_lp|headclip|headhref|headlabel|headport|headtarget|headtooltip|height|href|id|image|imagepath|imagescale|label|labelurl|label_scheme|labelangle|labeldistance|labelfloat|labelfontcolor|labelfontname|labelfontsize|labelhref|labeljust|labelloc|labeltarget|labeltooltip|landscape|layer|layerlistsep|layers|layerselect|layersep|layout|len|levels|levelsgap|lhead|lheight|lp|ltail|lwidth|margin|maxiter|mclimit|mindist|minlen|mode|model|mosek|nodesep|nojustify|normalize|nslimit|nslimit1|ordering|orientation|outputorder|overlap|overlap_scaling|pack|packmode|pad|page|pagedir|pencolor|penwidth|peripheries|pin|pos|quadtree|quantum|rank|rankdir|ranksep|ratio|rects|regular|remincross|repulsiveforce|resolution|root|rotate|rotation|samehead|sametail|samplepoints|scale|searchsize|sep|shape|shapefile|showboxes|sides|size|skew|smoothing|sortv|splines|start|style|stylesheet|tailurl|tail_lp|tailclip|tailhref|taillabel|tailport|tailtarget|tailtooltip|target|tooltip|truecolor|vertices|viewport|voro_margin|weight|width|xlabel|xlp|z").split("|") + ); + + this.$rules = { + "start" : [ + { + token : "comment", + regex : /\/\/.*$/ + }, { + token : "comment", + regex : /#.*$/ + }, { + token : "comment", // multi line comment + merge : true, + regex : /\/\*/, + next : "comment" + }, { + token : "string", + regex : "'(?=.)", + next : "qstring" + }, { + token : "string", + regex : '"(?=.)', + next : "qqstring" + }, { + token : "constant.numeric", + regex : /[+\-]?\d+(?:(?:\.\d*)?(?:[eE][+\-]?\d+)?)?\b/ + }, { + token : "keyword.operator", + regex : /\+|=|\->/ + }, { + token : "punctuation.operator", + regex : /,|;/ + }, { + token : "paren.lparen", + regex : /[\[{]/ + }, { + token : "paren.rparen", + regex : /[\]}]/ + }, { + token: "comment", + regex: /^#!.*$/ + }, { + token: function(value) { + if (keywords.hasOwnProperty(value.toLowerCase())) { + return "keyword"; + } + else if (attributes.hasOwnProperty(value.toLowerCase())) { + return "variable"; + } + else { + return "text"; + } + }, + regex: "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + } + ], + "comment" : [ + { + token : "comment", // closing comment + regex : ".*?\\*\\/", + merge : true, + next : "start" + }, { + token : "comment", // comment spanning whole line + merge : true, + regex : ".+" + } + ], + "qqstring" : [ + { + token : "string", + regex : '[^"\\\\]+', + merge : true + }, { + token : "string", + regex : "\\\\$", + next : "qqstring", + merge : true + }, { + token : "string", + regex : '"|$', + next : "start", + merge : true + } + ], + "qstring" : [ + { + token : "string", + regex : "[^'\\\\]+", + merge : true + }, { + token : "string", + regex : "\\\\$", + next : "qstring", + merge : true + }, { + token : "string", + regex : "'|$", + next : "start", + merge : true + } + ] + }; +}; + +oop.inherits(DotHighlightRules, TextHighlightRules); + +exports.DotHighlightRules = DotHighlightRules; + +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/ejs.js b/pitfall/pdfkit/node_modules/brace/mode/ejs.js new file mode 100644 index 00000000..4cfa145b --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/ejs.js @@ -0,0 +1,2807 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2012, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + + +ace.define('ace/mode/ejs', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/html_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/tokenizer', 'ace/mode/html', 'ace/mode/javascript', 'ace/mode/css', 'ace/mode/ruby'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var HtmlHighlightRules = acequire("./html_highlight_rules").HtmlHighlightRules; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; + +var EjsHighlightRules = function(start, end) { + HtmlHighlightRules.call(this); + + if (!start) + start = "(?:<%|<\\?|{{)"; + if (!end) + end = "(?:%>|\\?>|}})"; + + for (var i in this.$rules) { + this.$rules[i].unshift({ + token : "markup.list.meta.tag", + regex : start + "(?![>}])[-=]?", + push : "ejs-start" + }); + } + + this.embedRules(JavaScriptHighlightRules, "ejs-"); + + this.$rules["ejs-start"].unshift({ + token : "markup.list.meta.tag", + regex : "-?" + end, + next : "pop" + }, { + token: "comment", + regex: "//.*?" + end, + next: "pop" + }); + + this.$rules["ejs-no_regex"].unshift({ + token : "markup.list.meta.tag", + regex : "-?" + end, + next : "pop" + }, { + token: "comment", + regex: "//.*?" + end, + next: "pop" + }); + + this.normalizeRules(); +}; + + +oop.inherits(EjsHighlightRules, HtmlHighlightRules); + +exports.EjsHighlightRules = EjsHighlightRules; + + +var oop = acequire("../lib/oop"); +var Tokenizer = acequire("../tokenizer").Tokenizer; +var HtmlMode = acequire("./html").Mode; +var JavaScriptMode = acequire("./javascript").Mode; +var CssMode = acequire("./css").Mode; +var RubyMode = acequire("./ruby").Mode; + +var Mode = function() { + HtmlMode.call(this); + this.HighlightRules = EjsHighlightRules; + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode, + "ejs-": JavaScriptMode + }); +}; +oop.inherits(Mode, HtmlMode); + +(function() { + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/html_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var CssHighlightRules = acequire("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = acequire("./xml_highlight_rules").XmlHighlightRules; + +var tagMap = lang.createMap({ + a : 'anchor', + button : 'form', + form : 'form', + img : 'image', + input : 'form', + label : 'form', + option : 'form', + script : 'script', + select : 'form', + textarea : 'form', + style : 'style', + table : 'table', + tbody : 'table', + td : 'table', + tfoot : 'table', + th : 'table', + tr : 'table' +}); + +var HtmlHighlightRules = function() { + XmlHighlightRules.call(this); + + this.addRules({ + attributes: [{ + include : "space" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "keyword.operator.separator", + regex : "=", + push : [{ + include: "space" + }, { + token : "string", + regex : "[^<>='\"`\\s]+", + next : "pop" + }, { + token : "empty", + regex : "", + next : "pop" + }] + }, { + include : "string" + }], + tag: [{ + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation.begin", + "meta.tag.name" + (group ? "." + group : "")]; + }, + regex : "(<)([-_a-zA-Z0-9:]+)", + next: "start_tag_stuff" + }, { + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation.begin", + "meta.tag.name" + (group ? "." + group : "")]; + }, + regex : "(", next : "start"} + ], + end_tag_stuff: [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next : "start"} + ] + }); + + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); + + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; + +oop.inherits(HtmlHighlightRules, XmlHighlightRules); + +exports.HtmlHighlightRules = HtmlHighlightRules; +}); + +ace.define('ace/mode/css_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; + +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|acequired|root|target|valid|visited)\\b"; + +var CssHighlightRules = function() { + + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + + this.$rules = { + "start" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "@.*?{", + push: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "media" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "\\}", + next: "pop" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "comment" : [{ + token : "comment", + regex : "\\*\\/", + next : "pop" + }, { + defaultToken : "comment" + }], + + "ruleset" : [ + { + token : "paren.rparen", + regex : "\\}", + next: "pop" + }, { + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : ["constant.numeric", "keyword"], + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + }, { + token : "constant.numeric", + regex : numRe + }, { + token : "constant.numeric", // hex6 color + regex : "#[a-f0-9]{6}" + }, { + token : "constant.numeric", // hex3 color + regex : "#[a-f0-9]{3}" + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex : pseudoElements + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex : pseudoClasses + }, { + token : ["support.function", "string", "support.function"], + regex : "(url\\()(.*)(\\))" + }, { + token : keywordMapper, + regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + caseInsensitive: true + }] + }; + + this.normalizeRules(); +}; + +oop.inherits(CssHighlightRules, TextHighlightRules); + +exports.CssHighlightRules = CssHighlightRules; + +}); + +ace.define('ace/mode/javascript_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var JavaScriptHighlightRules = function() { + var keywordMapper = this.createKeywordMapper({ + "variable.language": + "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document" , // Pseudo + "keyword": + "const|yield|import|get|set|" + + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", + "storage.type": + "const|let|var|function", + "constant.language": + "null|Infinity|NaN|undefined", + "support.function": + "alert", + "constant.language.boolean": "true|false" + }, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; + + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-6][0-7]?|" + // oct + "37[0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + + this.$rules = { + "no_regex" : [ + { + token : "comment", + regex : "\\/\\/", + next : "line_comment" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : /\/\*/, + next : "comment" + }, { + token : "string", + regex : "'(?=.)", + next : "qstring" + }, { + token : "string", + regex : '"(?=.)', + next : "qqstring" + }, { + token : "constant.numeric", // hex + regex : /0[xX][0-9a-fA-F]+\b/ + }, { + token : "constant.numeric", // float + regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ + }, { + token : [ + "storage.type", "punctuation.operator", "support.function", + "punctuation.operator", "entity.name.function", "text","keyword.operator" + ], + regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "paren.lparen" + ], + regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "text", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : "keyword", + regex : "(?:" + kwBeforeRe + ")\\b", + next : "start" + }, { + token : ["punctuation.operator", "support.function"], + regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token : ["punctuation.operator", "support.function.dom"], + regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token : ["punctuation.operator", "support.constant"], + regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token : ["storage.type", "punctuation.operator", "support.function.firebug"], + regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/ + }, { + token : keywordMapper, + regex : identifierRe + }, { + token : "keyword.operator", + regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, + next : "start" + }, { + token : "punctuation.operator", + regex : /\?|\:|\,|\;|\./, + next : "start" + }, { + token : "paren.lparen", + regex : /[\[({]/, + next : "start" + }, { + token : "paren.rparen", + regex : /[\])}]/ + }, { + token : "keyword.operator", + regex : /\/=?/, + next : "start" + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment_regex_allowed" + }, { + token : "comment", + regex : "\\/\\/", + next : "line_comment_regex_allowed" + }, { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token : "text", + regex : "\\s+|^$", + next : "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/\\w*", + next: "no_regex" + }, { + token : "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token : "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/ + }, { + token : "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "function_arguments": [ + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "[, ]+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "comment_regex_allowed" : [ + {token : "comment", regex : "\\*\\/", next : "start"}, + {defaultToken : "comment"} + ], + "comment" : [ + {token : "comment", regex : "\\*\\/", next : "no_regex"}, + {defaultToken : "comment"} + ], + "line_comment_regex_allowed" : [ + {token : "comment", regex : "$|^", next : "start"}, + {defaultToken : "comment"} + ], + "line_comment" : [ + {token : "comment", regex : "$|^", next : "no_regex"}, + {defaultToken : "comment"} + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qqstring" + }, { + token : "string", + regex : '"|$', + next : "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qstring" + }, { + token : "string", + regex : "'|$", + next : "no_regex" + }, { + defaultToken: "string" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("no_regex") ]); +}; + +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); + +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define('ace/mode/xml_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var xmlUtil = acequire("./xml_util"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var XmlHighlightRules = function(normalize) { + this.$rules = { + start : [ + {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"}, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration" + }, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction" + }, + {token : "comment", regex : "<\\!--", next : "comment"}, + { + token : ["punctuation.doctype.begin", "meta.tag.doctype"], + regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype" + }, + {include : "tag"}, + {include : "reference"} + ], + + xml_declaration : [ + {include : "attributes"}, + {include : "instruction"} + ], + + instruction : [ + {token : "punctuation.instruction.end", regex : "\\?>", next : "start"} + ], + + doctype : [ + {include : "space"}, + {include : "string"}, + {token : "punctuation.doctype.end", regex : ">", next : "start"}, + {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"}, + {token : "punctuation.begin", regex : "\\[", push : "declarations"} + ], + + declarations : [{ + token : "text", + regex : "\\s+" + }, { + token: "punctuation.end", + regex: "]", + next: "pop" + }, { + token : ["punctuation.begin", "keyword"], + regex : "(<\\!)([-_a-zA-Z0-9]+)", + push : [{ + token : "text", + regex : "\\s+" + }, + { + token : "punctuation.end", + regex : ">", + next : "pop" + }, + {include : "string"}] + }], + + cdata : [ + {token : "string.end", regex : "\\]\\]>", next : "start"}, + {token : "text", regex : "\\s+"}, + {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"} + ], + + comment : [ + {token : "comment", regex : "-->", next : "start"}, + {defaultToken : "comment"} + ], + + tag : [{ + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)", + next: [ + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"} + ] + }, { + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(", next : "start"} + ] + }], + + space : [ + {token : "text", regex : "\\s+"} + ], + + reference : [{ + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, { + token : "invalid.illegal", regex : "&" + }], + + string: [{ + token : "string", + regex : "'", + push : "qstring_inner" + }, { + token : "string", + regex : '"', + push : "qqstring_inner" + }], + + qstring_inner: [ + {token : "string", regex: "'", next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + qqstring_inner: [ + {token : "string", regex: '"', next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + attributes: [{ + token : "entity.other.attribute-name", + regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" + }, { + token : "keyword.operator.separator", + regex : "=" + }, { + include : "space" + }, { + include : "string" + }] + }; + + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; + + +(function() { + + this.embedTagRules = function(HighlightRules, prefix, tag){ + this.$rules.tag.unshift({ + token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(<)(" + tag + ")", + next: [ + {include : "space"}, + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"} + ] + }); + + this.$rules[tag + "-end"] = [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next: "start", + onMatch : function(value, currentState, stack) { + stack.splice(0); + return this.token; + }} + ] + + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(" + }]); + }; + +}).call(TextHighlightRules.prototype); + +oop.inherits(XmlHighlightRules, TextHighlightRules); + +exports.XmlHighlightRules = XmlHighlightRules; +}); + +ace.define('ace/mode/xml_util', ["require", 'exports', 'module' ], function(acequire, exports, module) { + + +function string(state) { + return [{ + token : "string", + regex : '"', + next : state + "_qqstring" + }, { + token : "string", + regex : "'", + next : state + "_qstring" + }]; +} + +function multiLineString(quote, state) { + return [ + {token : "string", regex : quote, next : state}, + { + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, + {defaultToken : "string"} + ]; +} + +exports.tag = function(states, name, nextState, tagMap) { + states[name] = [{ + token : "text", + regex : "\\s+" + }, { + + token : !tagMap ? "meta.tag.tag-name" : function(value) { + if (tagMap[value]) + return "meta.tag.tag-name." + tagMap[value]; + else + return "meta.tag.tag-name"; + }, + regex : "[-_a-zA-Z0-9:]+", + next : name + "_embed_attribute_list" + }, { + token: "empty", + regex: "", + next : name + "_embed_attribute_list" + }]; + + states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list"); + states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list"); + + states[name + "_embed_attribute_list"] = [{ + token : "meta.tag.r", + regex : "/?>", + next : nextState + }, { + token : "keyword.operator", + regex : "=" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "text", + regex : "\\s+" + }].concat(string(name)); +}; + +}); + +ace.define('ace/mode/html', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/css', 'ace/tokenizer', 'ace/mode/html_highlight_rules', 'ace/mode/behaviour/html', 'ace/mode/folding/html', 'ace/mode/html_completions'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var JavaScriptMode = acequire("./javascript").Mode; +var CssMode = acequire("./css").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var HtmlHighlightRules = acequire("./html_highlight_rules").HtmlHighlightRules; +var HtmlBehaviour = acequire("./behaviour/html").HtmlBehaviour; +var HtmlFoldMode = acequire("./folding/html").FoldMode; +var HtmlCompletions = acequire("./html_completions").HtmlCompletions; + +var Mode = function() { + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new HtmlBehaviour(); + this.$completer = new HtmlCompletions(); + + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + + this.foldingRules = new HtmlFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.blockComment = {start: ""}; + + this.getNextLineIndent = function(state, line, tab) { + return this.$getIndent(line); + }; + + this.checkOutdent = function(state, line, input) { + return false; + }; + + this.getCompletions = function(state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/javascript', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = JavaScriptHighlightRules; + + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/javascript"), "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + + worker.on("jslint", function(results) { + session.setAnnotations(results.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); + +ace.define('ace/mode/css', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/behaviour/css', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var CssHighlightRules = acequire("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var CssBehaviour = acequire("./behaviour/css").CssBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.foldingRules = "cStyle"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/css"), "Worker"); + worker.attachToDocument(session.getDocument()); + + worker.on("csslint", function(e) { + session.setAnnotations(e.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; + +}); + +ace.define('ace/mode/behaviour/css', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + +var CssBehaviour = function () { + + this.inherit(CstyleBehaviour); + + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + } + } + if (!line.substring(cursor.column).match(/^\s*;/)) { + return { + text: ':;', + selection: [1, 1] + } + } + } + } + }); + + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column ++; + return range; + } + } + } + }); + + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + } + } + } + }); + +} +oop.inherits(CssBehaviour, CstyleBehaviour); + +exports.CssBehaviour = CssBehaviour; +}); + +ace.define('ace/mode/behaviour/html', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour/xml', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var XmlBehaviour = acequire("../behaviour/xml").XmlBehaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var voidElements = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr']; + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); + return hasType; +} + +var HtmlBehaviour = function () { + + this.inherit(XmlBehaviour); // Get xml behaviour + + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getCursorPosition(); + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken(); + + if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column) + return; + var atCursor = false; + if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text'))); + } else { + atCursor = true; + } + if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) { + return; + } + var element = token.value; + if (atCursor){ + var element = element.substring(0, position.column - token.start); + } + if (voidElements.indexOf(element) !== -1){ + return; + } + return { + text: '>' + '', + selection: [1, 1] + } + } + }); +} +oop.inherits(HtmlBehaviour, XmlBehaviour); + +exports.HtmlBehaviour = HtmlBehaviour; +}); + +ace.define('ace/mode/behaviour/xml', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); + return hasType; +} + +var XmlBehaviour = function () { + + this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour + + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getCursorPosition(); + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken(); + + if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column) + return; + var atCursor = false; + if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text'))); + } else { + atCursor = true; + } + if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) { + return; + } + var tag = token.value; + if (atCursor){ + var tag = tag.substring(0, position.column - token.start); + } + + return { + text: '>' + '', + selection: [1, 1] + } + } + }); + + this.add('autoindent', 'insertion', function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var rightChars = line.substring(cursor.column, cursor.column + 2); + if (rightChars == '?)/; + this._parseTag = function(tag) { + + var match = tag.match(this.tagRe); + var column = 0; + + return { + value: tag, + match: match ? match[2] : "", + closing: match ? !!match[3] : false, + selfClosing: match ? !!match[5] || match[2] == "/>" : false, + tagName: match ? match[4] : "", + column: match[1] ? column + match[1].length : column + }; + }; + this._readTagForward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var value = ""; + var start; + + do { + if (token.type.lastIndexOf("meta.tag", 0) === 0) { + if (!start) { + var start = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + }; + } + value += token.value; + if (value.indexOf(">") !== -1) { + var tag = this._parseTag(value); + tag.start = start; + tag.end = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + token.value.length + }; + iterator.stepForward(); + return tag; + } + } + } while(token = iterator.stepForward()); + + return null; + }; + + this._readTagBackward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var value = ""; + var end; + + do { + if (token.type.lastIndexOf("meta.tag", 0) === 0) { + if (!end) { + end = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + token.value.length + }; + } + value = token.value + value; + if (value.indexOf("<") !== -1) { + var tag = this._parseTag(value); + tag.end = end; + tag.start = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + }; + iterator.stepBackward(); + return tag; + } + } + } while(token = iterator.stepBackward()); + + return null; + }; + + this._pop = function(stack, tag) { + while (stack.length) { + + var top = stack[stack.length-1]; + if (!tag || top.tagName == tag.tagName) { + return stack.pop(); + } + else if (this.voidElements[tag.tagName]) { + return; + } + else if (this.voidElements[top.tagName]) { + stack.pop(); + continue; + } else { + return null; + } + } + }; + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + + if (!firstTag.match) + return null; + + var isBackward = firstTag.closing || firstTag.selfClosing; + var stack = []; + var tag; + + if (!isBackward) { + var iterator = new TokenIterator(session, row, firstTag.column); + var start = { + row: row, + column: firstTag.column + firstTag.tagName.length + 2 + }; + while (tag = this._readTagForward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) + return Range.fromPoints(start, tag.start); + } + else { + stack.push(tag) + } + } + } + else { + var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length); + var end = { + row: row, + column: firstTag.column + }; + + while (tag = this._readTagBackward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (!tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) { + tag.start.column += tag.tagName.length + 2; + return Range.fromPoints(tag.start, end); + } + } + else { + stack.push(tag) + } + } + } + + }; + +}).call(FoldMode.prototype); + +}); + +ace.define('ace/mode/html_completions', ["require", 'exports', 'module' , 'ace/token_iterator'], function(acequire, exports, module) { + + +var TokenIterator = acequire("../token_iterator").TokenIterator; + +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; + +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; + +var globalAttributes = commonAttributes.concat(eventAttributes); + +var attributeMap = { + "html": ["manifest"], + "head": [], + "title": [], + "base": ["href", "target"], + "link": ["href", "hreflang", "rel", "media", "type", "sizes"], + "meta": ["http-equiv", "name", "content", "charset"], + "style": ["type", "media", "scoped"], + "script": ["charset", "type", "src", "defer", "async"], + "noscript": ["href"], + "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"], + "section": [], + "nav": [], + "article": ["pubdate"], + "aside": [], + "h1": [], + "h2": [], + "h3": [], + "h4": [], + "h5": [], + "h6": [], + "header": [], + "footer": [], + "address": [], + "main": [], + "p": [], + "hr": [], + "pre": [], + "blockquote": ["cite"], + "ol": ["start", "reversed"], + "ul": [], + "li": ["value"], + "dl": [], + "dt": [], + "dd": [], + "figure": [], + "figcaption": [], + "div": [], + "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"], + "em": [], + "strong": [], + "small": [], + "s": [], + "cite": [], + "q": ["cite"], + "dfn": [], + "abbr": [], + "data": [], + "time": ["datetime"], + "code": [], + "var": [], + "samp": [], + "kbd": [], + "sub": [], + "sup": [], + "i": [], + "b": [], + "u": [], + "mark": [], + "ruby": [], + "rt": [], + "rp": [], + "bdi": [], + "bdo": [], + "span": [], + "br": [], + "wbr": [], + "ins": ["cite", "datetime"], + "del": ["cite", "datetime"], + "img": ["alt", "src", "height", "width", "usemap", "ismap"], + "iframe": ["name", "src", "height", "width", "sandbox", "seamless"], + "embed": ["src", "height", "width", "type"], + "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"], + "param": ["name", "value"], + "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"], + "audio": ["src", "autobuffer", "autoplay", "loop", "controls"], + "source": ["src", "type", "media"], + "track": ["kind", "src", "srclang", "label", "default"], + "canvas": ["width", "height"], + "map": ["name"], + "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"], + "svg": [], + "math": [], + "table": ["summary"], + "caption": [], + "colgroup": ["span"], + "col": ["span"], + "tbody": [], + "thead": [], + "tfoot": [], + "tr": [], + "td": ["headers", "rowspan", "colspan"], + "th": ["headers", "rowspan", "colspan", "scope"], + "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"], + "fieldset": ["disabled", "form", "name"], + "legend": [], + "label": ["form", "for"], + "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "acequired", "size", "src", "step", "width", "files", "value"], + "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"], + "select": ["autofocus", "disabled", "form", "multiple", "name", "size"], + "datalist": [], + "optgroup": ["disabled", "label"], + "option": ["disabled", "selected", "label", "value"], + "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "acequired", "rows", "cols", "wrap"], + "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"], + "output": ["for", "form", "name"], + "progress": ["value", "max"], + "meter": ["value", "min", "max", "low", "high", "optimum"], + "details": ["open"], + "summary": [], + "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"], + "menu": ["type", "label"], + "dialog": ["open"] +}; + +var allElements = Object.keys(attributeMap); + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); +} + +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + if (!token || !hasType(token, 'tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'operator') || hasType(token, 'attribute-name') || hasType(token, 'text'))); + } + if (token && hasType(token, 'tag-name') && !iterator.stepBackward().value.match('/')) + return token.value; +} + +var HtmlCompletions = function() { + +}; + +(function() { + + this.getCompletions = function(state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + + if (!token) + return []; + if (hasType(token, "tag-name") || (token.value == '<' && hasType(token, "text"))) + return this.getTagCompletions(state, session, pos, prefix); + if (hasType(token, 'text') || hasType(token, 'attribute-name')) + return this.getAttributeCompetions(state, session, pos, prefix); + + return []; + }; + + this.getTagCompletions = function(state, session, pos, prefix) { + var elements = allElements; + if (prefix) { + elements = elements.filter(function(element){ + return element.indexOf(prefix) === 0; + }); + } + return elements.map(function(element){ + return { + value: element, + meta: "tag" + }; + }); + }; + + this.getAttributeCompetions = function(state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(attributeMap[tagName]); + } + if (prefix) { + attributes = attributes.filter(function(attribute){ + return attribute.indexOf(prefix) === 0; + }); + } + return attributes.map(function(attribute){ + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute" + }; + }); + }; + +}).call(HtmlCompletions.prototype); + +exports.HtmlCompletions = HtmlCompletions; +}); + +ace.define('ace/mode/ruby', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/ruby_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/folding/coffee'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var RubyHighlightRules = acequire("./ruby_highlight_rules").RubyHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; +var FoldMode = acequire("./folding/coffee").FoldMode; + +var Mode = function() { + this.HighlightRules = RubyHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + + this.lineCommentStart = "#"; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + var startingClassOrMethod = line.match(/^\s*(class|def)\s.*$/); + var startingDoBlock = line.match(/.*do(\s*|\s+\|.*\|\s*)$/); + var startingConditional = line.match(/^\s*(if|else)\s*/) + if (match || startingClassOrMethod || startingDoBlock || startingConditional) { + indent += tab; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return /^\s+end$/.test(line + input) || /^\s+}$/.test(line + input) || /^\s+else$/.test(line + input); + }; + + this.autoOutdent = function(state, doc, row) { + var indent = this.$getIndent(doc.getLine(row)); + var tab = doc.getTabString(); + if (indent.slice(-tab.length) == tab) + doc.remove(new Range(row, indent.length-tab.length, row, indent.length)); + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/ruby_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var constantOtherSymbol = exports.constantOtherSymbol = { + token : "constant.other.symbol.ruby", // symbol + regex : "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?" +}; + +var qString = exports.qString = { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" +}; + +var qqString = exports.qqString = { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' +}; + +var tString = exports.tString = { + token : "string", // backtick string + regex : "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]" +}; + +var constantNumericHex = exports.constantNumericHex = { + token : "constant.numeric", // hex + regex : "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b" +}; + +var constantNumericFloat = exports.constantNumericFloat = { + token : "constant.numeric", // float + regex : "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b" +}; + +var RubyHighlightRules = function() { + + var builtinFunctions = ( + "abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|" + + "assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|" + + "assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|" + + "assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|" + + "assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|" + + "assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|" + + "attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|" + + "caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|" + + "exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|" + + "gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|" + + "link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|" + + "p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|" + + "raw|readline|readlines|redirect?|request_via_redirect|acequire|scan|select|" + + "set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|" + + "throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|" + + "render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|" + + "content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|" + + "fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|" + + "time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|" + + "select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|" + + "file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|" + + "protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|" + + "send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|" + + "validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|" + + "validates_inclusion_of|validates_numericality_of|validates_with|validates_each|" + + "authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|" + + "filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|" + + "translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|" + + "cache|expire_fragment|expire_cache_for|observe|cache_sweeper|" + + "has_many|has_one|belongs_to|has_and_belongs_to_many" + ); + + var keywords = ( + "alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|" + + "__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|" + + "redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield" + ); + + var buildinConstants = ( + "true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|" + + "RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING" + ); + + var builtinVariables = ( + "\$DEBUG|\$defout|\$FILENAME|\$LOAD_PATH|\$SAFE|\$stdin|\$stdout|\$stderr|\$VERBOSE|" + + "$!|root_url|flash|session|cookies|params|request|response|logger|self" + ); + + var keywordMapper = this.$keywords = this.createKeywordMapper({ + "keyword": keywords, + "constant.language": buildinConstants, + "variable.language": builtinVariables, + "support.function": builtinFunctions, + "invalid.deprecated": "debugger" // TODO is this a remnant from js mode? + }, "identifier"); + + this.$rules = { + "start" : [ + { + token : "comment", + regex : "#.*$" + }, { + token : "comment", // multi line comment + regex : "^=begin(?:$|\\s.*$)", + next : "comment" + }, { + token : "string.regexp", + regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" + }, + + qString, + qqString, + tString, + + { + token : "text", // namespaces aren't symbols + regex : "::" + }, { + token : "variable.instance", // instance variable + regex : "@{1,2}[a-zA-Z_\\d]+" + }, { + token : "support.class", // class name + regex : "[A-Z][a-zA-Z_\\d]+" + }, + + constantOtherSymbol, + constantNumericHex, + constantNumericFloat, + + { + token : "constant.language.boolean", + regex : "(?:true|false)\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "punctuation.separator.key-value", + regex : "=>" + }, { + stateName: "heredoc", + onMatch : function(value, currentState, stack) { + var next = value[2] == '-' ? "indentedHeredoc" : "heredoc"; + var tokens = value.split(this.splitRegex); + stack.push(next, tokens[3]); + return [ + {type:"constant", value: tokens[1]}, + {type:"string", value: tokens[2]}, + {type:"support.class", value: tokens[3]}, + {type:"string", value: tokens[4]} + ]; + }, + regex : "(<<-?)(['\"`]?)([\\w]+)(['\"`]?)", + rules: { + heredoc: [{ + onMatch: function(value, currentState, stack) { + if (value === stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack[0] || "start"; + return "support.class"; + } + this.next = ""; + return "string"; + }, + regex: ".*$", + next: "start" + }], + indentedHeredoc: [{ + token: "string", + regex: "^ +" + }, { + onMatch: function(value, currentState, stack) { + if (value === stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack[0] || "start"; + return "support.class"; + } + this.next = ""; + return "string"; + }, + regex: ".*$", + next: "start" + }] + } + }, { + regex : "$", + token : "empty", + next : function(currentState, stack) { + if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc") + return stack[0]; + return currentState; + } + }, { + token : "keyword.operator", + regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" + }, { + token : "paren.lparen", + regex : "[[({]" + }, { + token : "paren.rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + } + ], + "comment" : [ + { + token : "comment", // closing comment + regex : "^=end(?:$|\\s.*$)", + next : "start" + }, { + token : "comment", // comment spanning whole line + regex : ".+" + } + ] + }; + + this.normalizeRules(); +}; + +oop.inherits(RubyHighlightRules, TextHighlightRules); + +exports.RubyHighlightRules = RubyHighlightRules; +}); + +ace.define('ace/mode/folding/coffee', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var BaseFoldMode = acequire("./fold_mode").FoldMode; +var Range = acequire("../../range").Range; + +var FoldMode = exports.FoldMode = function() {}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var range = this.indentationBlock(session, row); + if (range) + return range; + + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1 || line[startLevel] != "#") + return; + + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + + while (++row < maxRow) { + line = session.getLine(row); + var level = line.search(re); + + if (level == -1) + continue; + + if (line[level] != "#") + break; + + endRow = row; + } + + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + + if (prevIndent!= -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + + if (indent < nextIndent) + return "start"; + else + return ""; + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/erlang.js b/pitfall/pdfkit/node_modules/brace/mode/erlang.js new file mode 100644 index 00000000..cd2f64db --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/erlang.js @@ -0,0 +1,986 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2012, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/erlang', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/erlang_highlight_rules', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var ErlangHighlightRules = acequire("./erlang_highlight_rules").ErlangHighlightRules; +var FoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = ErlangHighlightRules; + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + this.lineCommentStart = "%"; + this.blockComment = {start: "/*", end: "*/"}; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/erlang_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var ErlangHighlightRules = function() { + + this.$rules = { start: + [ { include: '#module-directive' }, + { include: '#import-export-directive' }, + { include: '#behaviour-directive' }, + { include: '#record-directive' }, + { include: '#define-directive' }, + { include: '#macro-directive' }, + { include: '#directive' }, + { include: '#function' }, + { include: '#everything-else' } ], + '#atom': + [ { token: 'punctuation.definition.symbol.begin.erlang', + regex: '\'', + push: + [ { token: 'punctuation.definition.symbol.end.erlang', + regex: '\'', + next: 'pop' }, + { token: + [ 'punctuation.definition.escape.erlang', + 'constant.other.symbol.escape.erlang', + 'punctuation.definition.escape.erlang', + 'constant.other.symbol.escape.erlang', + 'constant.other.symbol.escape.erlang' ], + regex: '(\\\\)(?:([bdefnrstv\\\\\'"])|(\\^)([@-_])|([0-7]{1,3}))' }, + { token: 'invalid.illegal.atom.erlang', regex: '\\\\\\^?.?' }, + { defaultToken: 'constant.other.symbol.quoted.single.erlang' } ] }, + { token: 'constant.other.symbol.unquoted.erlang', + regex: '[a-z][a-zA-Z\\d@_]*' } ], + '#behaviour-directive': + [ { token: + [ 'meta.directive.behaviour.erlang', + 'punctuation.section.directive.begin.erlang', + 'meta.directive.behaviour.erlang', + 'keyword.control.directive.behaviour.erlang', + 'meta.directive.behaviour.erlang', + 'punctuation.definition.parameters.begin.erlang', + 'meta.directive.behaviour.erlang', + 'entity.name.type.class.behaviour.definition.erlang', + 'meta.directive.behaviour.erlang', + 'punctuation.definition.parameters.end.erlang', + 'meta.directive.behaviour.erlang', + 'punctuation.section.directive.end.erlang' ], + regex: '^(\\s*)(-)(\\s*)(behaviour)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\))(\\s*)(\\.)' } ], + '#binary': + [ { token: 'punctuation.definition.binary.begin.erlang', + regex: '<<', + push: + [ { token: 'punctuation.definition.binary.end.erlang', + regex: '>>', + next: 'pop' }, + { token: + [ 'punctuation.separator.binary.erlang', + 'punctuation.separator.value-size.erlang' ], + regex: '(,)|(:)' }, + { include: '#internal-type-specifiers' }, + { include: '#everything-else' }, + { defaultToken: 'meta.structure.binary.erlang' } ] } ], + '#character': + [ { token: + [ 'punctuation.definition.character.erlang', + 'punctuation.definition.escape.erlang', + 'constant.character.escape.erlang', + 'punctuation.definition.escape.erlang', + 'constant.character.escape.erlang', + 'constant.character.escape.erlang' ], + regex: '(\\$)(\\\\)(?:([bdefnrstv\\\\\'"])|(\\^)([@-_])|([0-7]{1,3}))' }, + { token: 'invalid.illegal.character.erlang', + regex: '\\$\\\\\\^?.?' }, + { token: + [ 'punctuation.definition.character.erlang', + 'constant.character.erlang' ], + regex: '(\\$)(\\S)' }, + { token: 'invalid.illegal.character.erlang', regex: '\\$.?' } ], + '#comment': + [ { token: 'punctuation.definition.comment.erlang', + regex: '%.*$', + push_: + [ { token: 'comment.line.percentage.erlang', + regex: '$', + next: 'pop' }, + { defaultToken: 'comment.line.percentage.erlang' } ] } ], + '#define-directive': + [ { token: + [ 'meta.directive.define.erlang', + 'punctuation.section.directive.begin.erlang', + 'meta.directive.define.erlang', + 'keyword.control.directive.define.erlang', + 'meta.directive.define.erlang', + 'punctuation.definition.parameters.begin.erlang', + 'meta.directive.define.erlang', + 'entity.name.function.macro.definition.erlang', + 'meta.directive.define.erlang', + 'punctuation.separator.parameters.erlang' ], + regex: '^(\\s*)(-)(\\s*)(define)(\\s*)(\\()(\\s*)([a-zA-Z\\d@_]+)(\\s*)(,)', + push: + [ { token: + [ 'punctuation.definition.parameters.end.erlang', + 'meta.directive.define.erlang', + 'punctuation.section.directive.end.erlang' ], + regex: '(\\))(\\s*)(\\.)', + next: 'pop' }, + { include: '#everything-else' }, + { defaultToken: 'meta.directive.define.erlang' } ] }, + { token: 'meta.directive.define.erlang', + regex: '(?=^\\s*-\\s*define\\s*\\(\\s*[a-zA-Z\\d@_]+\\s*\\()', + push: + [ { token: + [ 'punctuation.definition.parameters.end.erlang', + 'meta.directive.define.erlang', + 'punctuation.section.directive.end.erlang' ], + regex: '(\\))(\\s*)(\\.)', + next: 'pop' }, + { token: + [ 'text', + 'punctuation.section.directive.begin.erlang', + 'text', + 'keyword.control.directive.define.erlang', + 'text', + 'punctuation.definition.parameters.begin.erlang', + 'text', + 'entity.name.function.macro.definition.erlang', + 'text', + 'punctuation.definition.parameters.begin.erlang' ], + regex: '^(\\s*)(-)(\\s*)(define)(\\s*)(\\()(\\s*)([a-zA-Z\\d@_]+)(\\s*)(\\()', + push: + [ { token: + [ 'punctuation.definition.parameters.end.erlang', + 'text', + 'punctuation.separator.parameters.erlang' ], + regex: '(\\))(\\s*)(,)', + next: 'pop' }, + { token: 'punctuation.separator.parameters.erlang', regex: ',' }, + { include: '#everything-else' } ] }, + { token: 'punctuation.separator.define.erlang', + regex: '\\|\\||\\||:|;|,|\\.|->' }, + { include: '#everything-else' }, + { defaultToken: 'meta.directive.define.erlang' } ] } ], + '#directive': + [ { token: + [ 'meta.directive.erlang', + 'punctuation.section.directive.begin.erlang', + 'meta.directive.erlang', + 'keyword.control.directive.erlang', + 'meta.directive.erlang', + 'punctuation.definition.parameters.begin.erlang' ], + regex: '^(\\s*)(-)(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\(?)', + push: + [ { token: + [ 'punctuation.definition.parameters.end.erlang', + 'meta.directive.erlang', + 'punctuation.section.directive.end.erlang' ], + regex: '(\\)?)(\\s*)(\\.)', + next: 'pop' }, + { include: '#everything-else' }, + { defaultToken: 'meta.directive.erlang' } ] }, + { token: + [ 'meta.directive.erlang', + 'punctuation.section.directive.begin.erlang', + 'meta.directive.erlang', + 'keyword.control.directive.erlang', + 'meta.directive.erlang', + 'punctuation.section.directive.end.erlang' ], + regex: '^(\\s*)(-)(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\.)' } ], + '#everything-else': + [ { include: '#comment' }, + { include: '#record-usage' }, + { include: '#macro-usage' }, + { include: '#expression' }, + { include: '#keyword' }, + { include: '#textual-operator' }, + { include: '#function-call' }, + { include: '#tuple' }, + { include: '#list' }, + { include: '#binary' }, + { include: '#parenthesized-expression' }, + { include: '#character' }, + { include: '#number' }, + { include: '#atom' }, + { include: '#string' }, + { include: '#symbolic-operator' }, + { include: '#variable' } ], + '#expression': + [ { token: 'keyword.control.if.erlang', + regex: '\\bif\\b', + push: + [ { token: 'keyword.control.end.erlang', + regex: '\\bend\\b', + next: 'pop' }, + { include: '#internal-expression-punctuation' }, + { include: '#everything-else' }, + { defaultToken: 'meta.expression.if.erlang' } ] }, + { token: 'keyword.control.case.erlang', + regex: '\\bcase\\b', + push: + [ { token: 'keyword.control.end.erlang', + regex: '\\bend\\b', + next: 'pop' }, + { include: '#internal-expression-punctuation' }, + { include: '#everything-else' }, + { defaultToken: 'meta.expression.case.erlang' } ] }, + { token: 'keyword.control.receive.erlang', + regex: '\\breceive\\b', + push: + [ { token: 'keyword.control.end.erlang', + regex: '\\bend\\b', + next: 'pop' }, + { include: '#internal-expression-punctuation' }, + { include: '#everything-else' }, + { defaultToken: 'meta.expression.receive.erlang' } ] }, + { token: + [ 'keyword.control.fun.erlang', + 'text', + 'entity.name.type.class.module.erlang', + 'text', + 'punctuation.separator.module-function.erlang', + 'text', + 'entity.name.function.erlang', + 'text', + 'punctuation.separator.function-arity.erlang' ], + regex: '\\b(fun)(\\s*)(?:([a-z][a-zA-Z\\d@_]*)(\\s*)(:)(\\s*))?([a-z][a-zA-Z\\d@_]*)(\\s*)(/)' }, + { token: 'keyword.control.fun.erlang', + regex: '\\bfun\\b', + push: + [ { token: 'keyword.control.end.erlang', + regex: '\\bend\\b', + next: 'pop' }, + { token: 'text', + regex: '(?=\\()', + push: + [ { token: 'punctuation.separator.clauses.erlang', + regex: ';|(?=\\bend\\b)', + next: 'pop' }, + { include: '#internal-function-parts' } ] }, + { include: '#everything-else' }, + { defaultToken: 'meta.expression.fun.erlang' } ] }, + { token: 'keyword.control.try.erlang', + regex: '\\btry\\b', + push: + [ { token: 'keyword.control.end.erlang', + regex: '\\bend\\b', + next: 'pop' }, + { include: '#internal-expression-punctuation' }, + { include: '#everything-else' }, + { defaultToken: 'meta.expression.try.erlang' } ] }, + { token: 'keyword.control.begin.erlang', + regex: '\\bbegin\\b', + push: + [ { token: 'keyword.control.end.erlang', + regex: '\\bend\\b', + next: 'pop' }, + { include: '#internal-expression-punctuation' }, + { include: '#everything-else' }, + { defaultToken: 'meta.expression.begin.erlang' } ] }, + { token: 'keyword.control.query.erlang', + regex: '\\bquery\\b', + push: + [ { token: 'keyword.control.end.erlang', + regex: '\\bend\\b', + next: 'pop' }, + { include: '#everything-else' }, + { defaultToken: 'meta.expression.query.erlang' } ] } ], + '#function': + [ { token: + [ 'meta.function.erlang', + 'entity.name.function.definition.erlang', + 'meta.function.erlang' ], + regex: '^(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(?=\\()', + push: + [ { token: 'punctuation.terminator.function.erlang', + regex: '\\.', + next: 'pop' }, + { token: [ 'text', 'entity.name.function.erlang', 'text' ], + regex: '^(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(?=\\()' }, + { token: 'text', + regex: '(?=\\()', + push: + [ { token: 'punctuation.separator.clauses.erlang', + regex: ';|(?=\\.)', + next: 'pop' }, + { include: '#parenthesized-expression' }, + { include: '#internal-function-parts' } ] }, + { include: '#everything-else' }, + { defaultToken: 'meta.function.erlang' } ] } ], + '#function-call': + [ { token: 'meta.function-call.erlang', + regex: '(?=(?:[a-z][a-zA-Z\\d@_]*|\'[^\']*\')\\s*(?:\\(|:\\s*(?:[a-z][a-zA-Z\\d@_]*|\'[^\']*\')\\s*\\())', + push: + [ { token: 'punctuation.definition.parameters.end.erlang', + regex: '\\)', + next: 'pop' }, + { token: + [ 'entity.name.type.class.module.erlang', + 'text', + 'punctuation.separator.module-function.erlang', + 'text', + 'entity.name.function.guard.erlang', + 'text', + 'punctuation.definition.parameters.begin.erlang' ], + regex: '(?:(erlang)(\\s*)(:)(\\s*))?(is_atom|is_binary|is_constant|is_float|is_function|is_integer|is_list|is_number|is_pid|is_port|is_reference|is_tuple|is_record|abs|element|hd|length|node|round|self|size|tl|trunc)(\\s*)(\\()', + push: + [ { token: 'text', regex: '(?=\\))', next: 'pop' }, + { token: 'punctuation.separator.parameters.erlang', regex: ',' }, + { include: '#everything-else' } ] }, + { token: + [ 'entity.name.type.class.module.erlang', + 'text', + 'punctuation.separator.module-function.erlang', + 'text', + 'entity.name.function.erlang', + 'text', + 'punctuation.definition.parameters.begin.erlang' ], + regex: '(?:([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(:)(\\s*))?([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(\\()', + push: + [ { token: 'text', regex: '(?=\\))', next: 'pop' }, + { token: 'punctuation.separator.parameters.erlang', regex: ',' }, + { include: '#everything-else' } ] }, + { defaultToken: 'meta.function-call.erlang' } ] } ], + '#import-export-directive': + [ { token: + [ 'meta.directive.import.erlang', + 'punctuation.section.directive.begin.erlang', + 'meta.directive.import.erlang', + 'keyword.control.directive.import.erlang', + 'meta.directive.import.erlang', + 'punctuation.definition.parameters.begin.erlang', + 'meta.directive.import.erlang', + 'entity.name.type.class.module.erlang', + 'meta.directive.import.erlang', + 'punctuation.separator.parameters.erlang' ], + regex: '^(\\s*)(-)(\\s*)(import)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(,)', + push: + [ { token: + [ 'punctuation.definition.parameters.end.erlang', + 'meta.directive.import.erlang', + 'punctuation.section.directive.end.erlang' ], + regex: '(\\))(\\s*)(\\.)', + next: 'pop' }, + { include: '#internal-function-list' }, + { defaultToken: 'meta.directive.import.erlang' } ] }, + { token: + [ 'meta.directive.export.erlang', + 'punctuation.section.directive.begin.erlang', + 'meta.directive.export.erlang', + 'keyword.control.directive.export.erlang', + 'meta.directive.export.erlang', + 'punctuation.definition.parameters.begin.erlang' ], + regex: '^(\\s*)(-)(\\s*)(export)(\\s*)(\\()', + push: + [ { token: + [ 'punctuation.definition.parameters.end.erlang', + 'meta.directive.export.erlang', + 'punctuation.section.directive.end.erlang' ], + regex: '(\\))(\\s*)(\\.)', + next: 'pop' }, + { include: '#internal-function-list' }, + { defaultToken: 'meta.directive.export.erlang' } ] } ], + '#internal-expression-punctuation': + [ { token: + [ 'punctuation.separator.clause-head-body.erlang', + 'punctuation.separator.clauses.erlang', + 'punctuation.separator.expressions.erlang' ], + regex: '(->)|(;)|(,)' } ], + '#internal-function-list': + [ { token: 'punctuation.definition.list.begin.erlang', + regex: '\\[', + push: + [ { token: 'punctuation.definition.list.end.erlang', + regex: '\\]', + next: 'pop' }, + { token: + [ 'entity.name.function.erlang', + 'text', + 'punctuation.separator.function-arity.erlang' ], + regex: '([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(/)', + push: + [ { token: 'punctuation.separator.list.erlang', + regex: ',|(?=\\])', + next: 'pop' }, + { include: '#everything-else' } ] }, + { include: '#everything-else' }, + { defaultToken: 'meta.structure.list.function.erlang' } ] } ], + '#internal-function-parts': + [ { token: 'text', + regex: '(?=\\()', + push: + [ { token: 'punctuation.separator.clause-head-body.erlang', + regex: '->', + next: 'pop' }, + { token: 'punctuation.definition.parameters.begin.erlang', + regex: '\\(', + push: + [ { token: 'punctuation.definition.parameters.end.erlang', + regex: '\\)', + next: 'pop' }, + { token: 'punctuation.separator.parameters.erlang', regex: ',' }, + { include: '#everything-else' } ] }, + { token: 'punctuation.separator.guards.erlang', regex: ',|;' }, + { include: '#everything-else' } ] }, + { token: 'punctuation.separator.expressions.erlang', + regex: ',' }, + { include: '#everything-else' } ], + '#internal-record-body': + [ { token: 'punctuation.definition.class.record.begin.erlang', + regex: '\\{', + push: + [ { token: 'meta.structure.record.erlang', + regex: '(?=\\})', + next: 'pop' }, + { token: + [ 'variable.other.field.erlang', + 'variable.language.omitted.field.erlang', + 'text', + 'keyword.operator.assignment.erlang' ], + regex: '(?:([a-z][a-zA-Z\\d@_]*|\'[^\']*\')|(_))(\\s*)(=|::)', + push: + [ { token: 'punctuation.separator.class.record.erlang', + regex: ',|(?=\\})', + next: 'pop' }, + { include: '#everything-else' } ] }, + { token: + [ 'variable.other.field.erlang', + 'text', + 'punctuation.separator.class.record.erlang' ], + regex: '([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)((?:,)?)' }, + { include: '#everything-else' }, + { defaultToken: 'meta.structure.record.erlang' } ] } ], + '#internal-type-specifiers': + [ { token: 'punctuation.separator.value-type.erlang', + regex: '/', + push: + [ { token: 'text', regex: '(?=,|:|>>)', next: 'pop' }, + { token: + [ 'storage.type.erlang', + 'storage.modifier.signedness.erlang', + 'storage.modifier.endianness.erlang', + 'storage.modifier.unit.erlang', + 'punctuation.separator.type-specifiers.erlang' ], + regex: '(integer|float|binary|bytes|bitstring|bits)|(signed|unsigned)|(big|little|native)|(unit)|(-)' } ] } ], + '#keyword': + [ { token: 'keyword.control.erlang', + regex: '\\b(?:after|begin|case|catch|cond|end|fun|if|let|of|query|try|receive|when)\\b' } ], + '#list': + [ { token: 'punctuation.definition.list.begin.erlang', + regex: '\\[', + push: + [ { token: 'punctuation.definition.list.end.erlang', + regex: '\\]', + next: 'pop' }, + { token: 'punctuation.separator.list.erlang', + regex: '\\||\\|\\||,' }, + { include: '#everything-else' }, + { defaultToken: 'meta.structure.list.erlang' } ] } ], + '#macro-directive': + [ { token: + [ 'meta.directive.ifdef.erlang', + 'punctuation.section.directive.begin.erlang', + 'meta.directive.ifdef.erlang', + 'keyword.control.directive.ifdef.erlang', + 'meta.directive.ifdef.erlang', + 'punctuation.definition.parameters.begin.erlang', + 'meta.directive.ifdef.erlang', + 'entity.name.function.macro.erlang', + 'meta.directive.ifdef.erlang', + 'punctuation.definition.parameters.end.erlang', + 'meta.directive.ifdef.erlang', + 'punctuation.section.directive.end.erlang' ], + regex: '^(\\s*)(-)(\\s*)(ifdef)(\\s*)(\\()(\\s*)([a-zA-z\\d@_]+)(\\s*)(\\))(\\s*)(\\.)' }, + { token: + [ 'meta.directive.ifndef.erlang', + 'punctuation.section.directive.begin.erlang', + 'meta.directive.ifndef.erlang', + 'keyword.control.directive.ifndef.erlang', + 'meta.directive.ifndef.erlang', + 'punctuation.definition.parameters.begin.erlang', + 'meta.directive.ifndef.erlang', + 'entity.name.function.macro.erlang', + 'meta.directive.ifndef.erlang', + 'punctuation.definition.parameters.end.erlang', + 'meta.directive.ifndef.erlang', + 'punctuation.section.directive.end.erlang' ], + regex: '^(\\s*)(-)(\\s*)(ifndef)(\\s*)(\\()(\\s*)([a-zA-z\\d@_]+)(\\s*)(\\))(\\s*)(\\.)' }, + { token: + [ 'meta.directive.undef.erlang', + 'punctuation.section.directive.begin.erlang', + 'meta.directive.undef.erlang', + 'keyword.control.directive.undef.erlang', + 'meta.directive.undef.erlang', + 'punctuation.definition.parameters.begin.erlang', + 'meta.directive.undef.erlang', + 'entity.name.function.macro.erlang', + 'meta.directive.undef.erlang', + 'punctuation.definition.parameters.end.erlang', + 'meta.directive.undef.erlang', + 'punctuation.section.directive.end.erlang' ], + regex: '^(\\s*)(-)(\\s*)(undef)(\\s*)(\\()(\\s*)([a-zA-z\\d@_]+)(\\s*)(\\))(\\s*)(\\.)' } ], + '#macro-usage': + [ { token: + [ 'keyword.operator.macro.erlang', + 'meta.macro-usage.erlang', + 'entity.name.function.macro.erlang' ], + regex: '(\\?\\??)(\\s*)([a-zA-Z\\d@_]+)' } ], + '#module-directive': + [ { token: + [ 'meta.directive.module.erlang', + 'punctuation.section.directive.begin.erlang', + 'meta.directive.module.erlang', + 'keyword.control.directive.module.erlang', + 'meta.directive.module.erlang', + 'punctuation.definition.parameters.begin.erlang', + 'meta.directive.module.erlang', + 'entity.name.type.class.module.definition.erlang', + 'meta.directive.module.erlang', + 'punctuation.definition.parameters.end.erlang', + 'meta.directive.module.erlang', + 'punctuation.section.directive.end.erlang' ], + regex: '^(\\s*)(-)(\\s*)(module)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*)(\\s*)(\\))(\\s*)(\\.)' } ], + '#number': + [ { token: 'text', + regex: '(?=\\d)', + push: + [ { token: 'text', regex: '(?!\\d)', next: 'pop' }, + { token: + [ 'constant.numeric.float.erlang', + 'punctuation.separator.integer-float.erlang', + 'constant.numeric.float.erlang', + 'punctuation.separator.float-exponent.erlang' ], + regex: '(\\d+)(\\.)(\\d+)((?:[eE][\\+\\-]?\\d+)?)' }, + { token: + [ 'constant.numeric.integer.binary.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.binary.erlang' ], + regex: '(2)(#)([0-1]+)' }, + { token: + [ 'constant.numeric.integer.base-3.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-3.erlang' ], + regex: '(3)(#)([0-2]+)' }, + { token: + [ 'constant.numeric.integer.base-4.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-4.erlang' ], + regex: '(4)(#)([0-3]+)' }, + { token: + [ 'constant.numeric.integer.base-5.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-5.erlang' ], + regex: '(5)(#)([0-4]+)' }, + { token: + [ 'constant.numeric.integer.base-6.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-6.erlang' ], + regex: '(6)(#)([0-5]+)' }, + { token: + [ 'constant.numeric.integer.base-7.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-7.erlang' ], + regex: '(7)(#)([0-6]+)' }, + { token: + [ 'constant.numeric.integer.octal.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.octal.erlang' ], + regex: '(8)(#)([0-7]+)' }, + { token: + [ 'constant.numeric.integer.base-9.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-9.erlang' ], + regex: '(9)(#)([0-8]+)' }, + { token: + [ 'constant.numeric.integer.decimal.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.decimal.erlang' ], + regex: '(10)(#)(\\d+)' }, + { token: + [ 'constant.numeric.integer.base-11.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-11.erlang' ], + regex: '(11)(#)([\\daA]+)' }, + { token: + [ 'constant.numeric.integer.base-12.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-12.erlang' ], + regex: '(12)(#)([\\da-bA-B]+)' }, + { token: + [ 'constant.numeric.integer.base-13.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-13.erlang' ], + regex: '(13)(#)([\\da-cA-C]+)' }, + { token: + [ 'constant.numeric.integer.base-14.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-14.erlang' ], + regex: '(14)(#)([\\da-dA-D]+)' }, + { token: + [ 'constant.numeric.integer.base-15.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-15.erlang' ], + regex: '(15)(#)([\\da-eA-E]+)' }, + { token: + [ 'constant.numeric.integer.hexadecimal.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.hexadecimal.erlang' ], + regex: '(16)(#)([\\da-fA-F]+)' }, + { token: + [ 'constant.numeric.integer.base-17.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-17.erlang' ], + regex: '(17)(#)([\\da-gA-G]+)' }, + { token: + [ 'constant.numeric.integer.base-18.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-18.erlang' ], + regex: '(18)(#)([\\da-hA-H]+)' }, + { token: + [ 'constant.numeric.integer.base-19.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-19.erlang' ], + regex: '(19)(#)([\\da-iA-I]+)' }, + { token: + [ 'constant.numeric.integer.base-20.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-20.erlang' ], + regex: '(20)(#)([\\da-jA-J]+)' }, + { token: + [ 'constant.numeric.integer.base-21.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-21.erlang' ], + regex: '(21)(#)([\\da-kA-K]+)' }, + { token: + [ 'constant.numeric.integer.base-22.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-22.erlang' ], + regex: '(22)(#)([\\da-lA-L]+)' }, + { token: + [ 'constant.numeric.integer.base-23.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-23.erlang' ], + regex: '(23)(#)([\\da-mA-M]+)' }, + { token: + [ 'constant.numeric.integer.base-24.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-24.erlang' ], + regex: '(24)(#)([\\da-nA-N]+)' }, + { token: + [ 'constant.numeric.integer.base-25.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-25.erlang' ], + regex: '(25)(#)([\\da-oA-O]+)' }, + { token: + [ 'constant.numeric.integer.base-26.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-26.erlang' ], + regex: '(26)(#)([\\da-pA-P]+)' }, + { token: + [ 'constant.numeric.integer.base-27.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-27.erlang' ], + regex: '(27)(#)([\\da-qA-Q]+)' }, + { token: + [ 'constant.numeric.integer.base-28.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-28.erlang' ], + regex: '(28)(#)([\\da-rA-R]+)' }, + { token: + [ 'constant.numeric.integer.base-29.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-29.erlang' ], + regex: '(29)(#)([\\da-sA-S]+)' }, + { token: + [ 'constant.numeric.integer.base-30.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-30.erlang' ], + regex: '(30)(#)([\\da-tA-T]+)' }, + { token: + [ 'constant.numeric.integer.base-31.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-31.erlang' ], + regex: '(31)(#)([\\da-uA-U]+)' }, + { token: + [ 'constant.numeric.integer.base-32.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-32.erlang' ], + regex: '(32)(#)([\\da-vA-V]+)' }, + { token: + [ 'constant.numeric.integer.base-33.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-33.erlang' ], + regex: '(33)(#)([\\da-wA-W]+)' }, + { token: + [ 'constant.numeric.integer.base-34.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-34.erlang' ], + regex: '(34)(#)([\\da-xA-X]+)' }, + { token: + [ 'constant.numeric.integer.base-35.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-35.erlang' ], + regex: '(35)(#)([\\da-yA-Y]+)' }, + { token: + [ 'constant.numeric.integer.base-36.erlang', + 'punctuation.separator.base-integer.erlang', + 'constant.numeric.integer.base-36.erlang' ], + regex: '(36)(#)([\\da-zA-Z]+)' }, + { token: 'invalid.illegal.integer.erlang', + regex: '\\d+#[\\da-zA-Z]+' }, + { token: 'constant.numeric.integer.decimal.erlang', + regex: '\\d+' } ] } ], + '#parenthesized-expression': + [ { token: 'punctuation.section.expression.begin.erlang', + regex: '\\(', + push: + [ { token: 'punctuation.section.expression.end.erlang', + regex: '\\)', + next: 'pop' }, + { include: '#everything-else' }, + { defaultToken: 'meta.expression.parenthesized' } ] } ], + '#record-directive': + [ { token: + [ 'meta.directive.record.erlang', + 'punctuation.section.directive.begin.erlang', + 'meta.directive.record.erlang', + 'keyword.control.directive.import.erlang', + 'meta.directive.record.erlang', + 'punctuation.definition.parameters.begin.erlang', + 'meta.directive.record.erlang', + 'entity.name.type.class.record.definition.erlang', + 'meta.directive.record.erlang', + 'punctuation.separator.parameters.erlang' ], + regex: '^(\\s*)(-)(\\s*)(record)(\\s*)(\\()(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(,)', + push: + [ { token: + [ 'punctuation.definition.class.record.end.erlang', + 'meta.directive.record.erlang', + 'punctuation.definition.parameters.end.erlang', + 'meta.directive.record.erlang', + 'punctuation.section.directive.end.erlang' ], + regex: '(\\})(\\s*)(\\))(\\s*)(\\.)', + next: 'pop' }, + { include: '#internal-record-body' }, + { defaultToken: 'meta.directive.record.erlang' } ] } ], + '#record-usage': + [ { token: + [ 'keyword.operator.record.erlang', + 'meta.record-usage.erlang', + 'entity.name.type.class.record.erlang', + 'meta.record-usage.erlang', + 'punctuation.separator.record-field.erlang', + 'meta.record-usage.erlang', + 'variable.other.field.erlang' ], + regex: '(#)(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')(\\s*)(\\.)(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')' }, + { token: + [ 'keyword.operator.record.erlang', + 'meta.record-usage.erlang', + 'entity.name.type.class.record.erlang' ], + regex: '(#)(\\s*)([a-z][a-zA-Z\\d@_]*|\'[^\']*\')', + push: + [ { token: 'punctuation.definition.class.record.end.erlang', + regex: '\\}', + next: 'pop' }, + { include: '#internal-record-body' }, + { defaultToken: 'meta.record-usage.erlang' } ] } ], + '#string': + [ { token: 'punctuation.definition.string.begin.erlang', + regex: '"', + push: + [ { token: 'punctuation.definition.string.end.erlang', + regex: '"', + next: 'pop' }, + { token: + [ 'punctuation.definition.escape.erlang', + 'constant.character.escape.erlang', + 'punctuation.definition.escape.erlang', + 'constant.character.escape.erlang', + 'constant.character.escape.erlang' ], + regex: '(\\\\)(?:([bdefnrstv\\\\\'"])|(\\^)([@-_])|([0-7]{1,3}))' }, + { token: 'invalid.illegal.string.erlang', regex: '\\\\\\^?.?' }, + { token: + [ 'punctuation.definition.placeholder.erlang', + 'punctuation.separator.placeholder-parts.erlang', + 'constant.other.placeholder.erlang', + 'punctuation.separator.placeholder-parts.erlang', + 'punctuation.separator.placeholder-parts.erlang', + 'constant.other.placeholder.erlang', + 'punctuation.separator.placeholder-parts.erlang', + 'punctuation.separator.placeholder-parts.erlang', + 'punctuation.separator.placeholder-parts.erlang', + 'constant.other.placeholder.erlang', + 'constant.other.placeholder.erlang' ], + regex: '(~)(?:((?:\\-)?)(\\d+)|(\\*))?(?:(\\.)(?:(\\d+)|(\\*)))?(?:(\\.)(?:(\\*)|(.)))?([~cfegswpWPBX#bx\\+ni])' }, + { token: + [ 'punctuation.definition.placeholder.erlang', + 'punctuation.separator.placeholder-parts.erlang', + 'constant.other.placeholder.erlang', + 'constant.other.placeholder.erlang' ], + regex: '(~)((?:\\*)?)((?:\\d+)?)([~du\\-#fsacl])' }, + { token: 'invalid.illegal.string.erlang', regex: '~.?' }, + { defaultToken: 'string.quoted.double.erlang' } ] } ], + '#symbolic-operator': + [ { token: 'keyword.operator.symbolic.erlang', + regex: '\\+\\+|\\+|--|-|\\*|/=|/|=/=|=:=|==|=<|=|<-|<|>=|>|!|::' } ], + '#textual-operator': + [ { token: 'keyword.operator.textual.erlang', + regex: '\\b(?:andalso|band|and|bxor|xor|bor|orelse|or|bnot|not|bsl|bsr|div|rem)\\b' } ], + '#tuple': + [ { token: 'punctuation.definition.tuple.begin.erlang', + regex: '\\{', + push: + [ { token: 'punctuation.definition.tuple.end.erlang', + regex: '\\}', + next: 'pop' }, + { token: 'punctuation.separator.tuple.erlang', regex: ',' }, + { include: '#everything-else' }, + { defaultToken: 'meta.structure.tuple.erlang' } ] } ], + '#variable': + [ { token: [ 'variable.other.erlang', 'variable.language.omitted.erlang' ], + regex: '(_[a-zA-Z\\d@_]+|[A-Z][a-zA-Z\\d@_]*)|(_)' } ] } + + this.normalizeRules(); +}; + +ErlangHighlightRules.metaData = { comment: 'The recognition of function definitions and compiler directives (such as module, record and macro definitions) acequires that each of the aforementioned constructs must be the first string inside a line (except for whitespace). Also, the function/module/record/macro names must be given unquoted. -- desp', + fileTypes: [ 'erl', 'hrl' ], + keyEquivalent: '^~E', + name: 'Erlang', + scopeName: 'source.erlang' } + + +oop.inherits(ErlangHighlightRules, TextHighlightRules); + +exports.ErlangHighlightRules = ErlangHighlightRules; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/forth.js b/pitfall/pdfkit/node_modules/brace/mode/forth.js new file mode 100644 index 00000000..4144455f --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/forth.js @@ -0,0 +1,279 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2012, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * Contributor(s): + * + * + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/forth', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/forth_highlight_rules', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var ForthHighlightRules = acequire("./forth_highlight_rules").ForthHighlightRules; +var FoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = ForthHighlightRules; + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + this.lineCommentStart = "(?<=^|\\s)\\.?\\( [^)]*\\)"; + this.blockComment = {start: "/*", end: "*/"}; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/forth_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var ForthHighlightRules = function() { + + this.$rules = { start: [ { include: '#forth' } ], + '#comment': + [ { token: 'comment.line.double-dash.forth', + regex: '(?:^|\\s)--\\s.*$', + comment: 'line comments for iForth' }, + { token: 'comment.line.backslash.forth', + regex: '(?:^|\\s)\\\\[\\s\\S]*$', + comment: 'ANSI line comment' }, + { token: 'comment.line.backslash-g.forth', + regex: '(?:^|\\s)\\\\[Gg] .*$', + comment: 'gForth line comment' }, + { token: 'comment.block.forth', + regex: '(?:^|\\s)\\(\\*(?=\\s|$)', + push: + [ { token: 'comment.block.forth', + regex: '(?:^|\\s)\\*\\)(?=\\s|$)', + next: 'pop' }, + { defaultToken: 'comment.block.forth' } ], + comment: 'multiline comments for iForth' }, + { token: 'comment.block.documentation.forth', + regex: '\\bDOC\\b', + caseInsensitive: true, + push: + [ { token: 'comment.block.documentation.forth', + regex: '\\bENDDOC\\b', + caseInsensitive: true, + next: 'pop' }, + { defaultToken: 'comment.block.documentation.forth' } ], + comment: 'documentation comments for iForth' }, + { token: 'comment.line.parentheses.forth', + regex: '(?:^|\\s)\\.?\\( [^)]*\\)', + comment: 'ANSI line comment' } ], + '#constant': + [ { token: 'constant.language.forth', + regex: '(?:^|\\s)(?:TRUE|FALSE|BL|PI|CELL|C/L|R/O|W/O|R/W)(?=\\s|$)', + caseInsensitive: true}, + { token: 'constant.numeric.forth', + regex: '(?:^|\\s)[$#%]?[-+]?[0-9]+(?:\\.[0-9]*e-?[0-9]+|\\.?[0-9a-fA-F]*)(?=\\s|$)'}, + { token: 'constant.character.forth', + regex: '(?:^|\\s)(?:[&^]\\S|(?:"|\')\\S(?:"|\'))(?=\\s|$)'}], + '#forth': + [ { include: '#constant' }, + { include: '#comment' }, + { include: '#string' }, + { include: '#word' }, + { include: '#variable' }, + { include: '#storage' }, + { include: '#word-def' } ], + '#storage': + [ { token: 'storage.type.forth', + regex: '(?:^|\\s)(?:2CONSTANT|2VARIABLE|ALIAS|CONSTANT|CREATE-INTERPRET/COMPILE[:]?|CREATE|DEFER|FCONSTANT|FIELD|FVARIABLE|USER|VALUE|VARIABLE|VOCABULARY)(?=\\s|$)', + caseInsensitive: true}], + '#string': + [ { token: 'string.quoted.double.forth', + regex: '(ABORT" |BREAK" |\\." |C" |0"|S\\\\?" )([^"]+")', + caseInsensitive: true}, + { token: 'string.unquoted.forth', + regex: '(?:INCLUDE|NEEDS|REQUIRE|USE)[ ]\\S+(?=\\s|$)', + caseInsensitive: true}], + '#variable': + [ { token: 'variable.language.forth', + regex: '\\b(?:I|J)\\b', + caseInsensitive: true } ], + '#word': + [ { token: 'keyword.control.immediate.forth', + regex: '(?:^|\\s)\\[(?:\\?DO|\\+LOOP|AGAIN|BEGIN|DEFINED|DO|ELSE|ENDIF|FOR|IF|IFDEF|IFUNDEF|LOOP|NEXT|REPEAT|THEN|UNTIL|WHILE)\\](?=\\s|$)', + caseInsensitive: true}, + { token: 'keyword.other.immediate.forth', + regex: '(?:^|\\s)(?:COMPILE-ONLY|IMMEDIATE|IS|RESTRICT|TO|WHAT\'S|])(?=\\s|$)', + caseInsensitive: true}, + { token: 'keyword.control.compile-only.forth', + regex: '(?:^|\\s)(?:-DO|\\-LOOP|\\?DO|\\?LEAVE|\\+DO|\\+LOOP|ABORT\\"|AGAIN|AHEAD|BEGIN|CASE|DO|ELSE|ENDCASE|ENDIF|ENDOF|ENDTRY\\-IFERROR|ENDTRY|FOR|IF|IFERROR|LEAVE|LOOP|NEXT|RECOVER|REPEAT|RESTORE|THEN|TRY|U\\-DO|U\\+DO|UNTIL|WHILE)(?=\\s|$)', + caseInsensitive: true}, + { token: 'keyword.other.compile-only.forth', + regex: '(?:^|\\s)(?:\\?DUP-0=-IF|\\?DUP-IF|\\)|\\[|\\[\'\\]|\\[CHAR\\]|\\[COMPILE\\]|\\[IS\\]|\\[TO\\]||DEFERS|DOES>|INTERPRETATION>|OF|POSTPONE)(?=\\s|$)', + caseInsensitive: true}, + { token: 'keyword.other.non-immediate.forth', + regex: '(?:^|\\s)(?:\'|||CHAR|END-STRUCT|INCLUDE[D]?|LOAD|NEEDS|REQUIRE[D]?|REVISION|SEE|STRUCT|THRU|USE)(?=\\s|$)', + caseInsensitive: true}, + { token: 'keyword.other.warning.forth', + regex: '(?:^|\\s)(?:~~|BREAK:|BREAK"|DBG)(?=\\s|$)', + caseInsensitive: true}], + '#word-def': + [ { token: + [ 'keyword.other.compile-only.forth', + 'keyword.other.compile-only.forth', + 'meta.block.forth', + 'entity.name.function.forth' ], + regex: '(:NONAME)|(^:|\\s:)(\\s)(\\S+)(?=\\s|$)', + caseInsensitive: true, + push: + [ { token: 'keyword.other.compile-only.forth', + regex: ';(?:CODE)?', + caseInsensitive: true, + next: 'pop' }, + { include: '#constant' }, + { include: '#comment' }, + { include: '#string' }, + { include: '#word' }, + { include: '#variable' }, + { include: '#storage' }, + { defaultToken: 'meta.block.forth' } ] } ] } + + this.normalizeRules(); +}; + +ForthHighlightRules.metaData = { fileTypes: [ 'frt', 'fs', 'ldr' ], + foldingStartMarker: '/\\*\\*|\\{\\s*$', + foldingStopMarker: '\\*\\*/|^\\s*\\}', + keyEquivalent: '^~F', + name: 'Forth', + scopeName: 'source.forth' } + + +oop.inherits(ForthHighlightRules, TextHighlightRules); + +exports.ForthHighlightRules = ForthHighlightRules; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/ftl.js b/pitfall/pdfkit/node_modules/brace/mode/ftl.js new file mode 100644 index 00000000..56600652 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/ftl.js @@ -0,0 +1,1060 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/ftl', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/ftl_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var FtlHighlightRules = acequire("./ftl_highlight_rules").FtlHighlightRules; + +var Mode = function() { + this.HighlightRules = FtlHighlightRules; +}; +oop.inherits(Mode, TextMode); + +(function() { + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/ftl_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/html_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var HtmlHighlightRules = acequire("./html_highlight_rules").HtmlHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var FtlLangHighlightRules = function () { + + var stringBuiltIns = "\\?|substring|cap_first|uncap_first|capitalize|chop_linebreak|date|time|datetime|" + + "ends_with|html|groups|index_of|j_string|js_string|json_string|last_index_of|length|lower_case|" + + "left_pad|right_pad|contains|matches|number|replace|rtf|url|split|starts_with|string|trim|" + + "upper_case|word_list|xhtml|xml"; + var numberBuiltIns = "c|round|floor|ceiling"; + var dateBuiltIns = "iso_[a-z_]+"; + var seqBuiltIns = "first|last|seq_contains|seq_index_of|seq_last_index_of|reverse|size|sort|sort_by|chunk"; + var hashBuiltIns = "keys|values"; + var xmlBuiltIns = "children|parent|root|ancestors|node_name|node_type|node_namespace"; + var expertBuiltIns = "byte|double|float|int|long|short|number_to_date|number_to_time|number_to_datetime|" + + "eval|has_content|interpret|is_[a-z_]+|namespacenew"; + var allBuiltIns = stringBuiltIns + numberBuiltIns + dateBuiltIns + seqBuiltIns + hashBuiltIns + + xmlBuiltIns + expertBuiltIns; + + var deprecatedBuiltIns = "default|exists|if_exists|web_safe"; + + var variables = "data_model|error|globals|lang|locale|locals|main|namespace|node|current_node|" + + "now|output_encoding|template_name|url_escaping_charset|vars|version"; + + var operators = "gt|gte|lt|lte|as|in|using"; + + var reserved = "true|false"; + + var attributes = "encoding|parse|locale|number_format|date_format|time_format|datetime_format|time_zone|" + + "url_escaping_charset|classic_compatible|strip_whitespace|strip_text|strict_syntax|ns_prefixes|" + + "attributes"; + + this.$rules = { + "start" : [{ + token : "constant.character.entity", + regex : /&[^;]+;/ + }, { + token : "support.function", + regex : "\\?("+allBuiltIns+")" + }, { + token : "support.function.deprecated", + regex : "\\?("+deprecatedBuiltIns+")" + }, { + token : "language.variable", + regex : "\\.(?:"+variables+")" + }, { + token : "constant.language", + regex : "\\b("+reserved+")\\b" + }, { + token : "keyword.operator", + regex : "\\b(?:"+operators+")\\b" + }, { + token : "entity.other.attribute-name", + regex : attributes + }, { + token : "string", // + regex : /['"]/, + next : "qstring" + }, { + token : function(value) { + if (value.match("^[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?$")) { + return "constant.numeric"; + } else { + return "variable"; + } + }, + regex : /[\w.+\-]+/ + }, { + token : "keyword.operator", + regex : "!|\\.|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=" + }, { + token : "paren.lparen", + regex : "[[({]" + }, { + token : "paren.rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + }], + + "qstring" : [{ + token : "constant.character.escape", + regex : '\\\\[nrtvef\\\\"$]' + }, { + token : "string", + regex : /['"]/, + next : "start" + }, { + defaultToken : "string" + }] + }; +}; + +oop.inherits(FtlLangHighlightRules, TextHighlightRules); + +var FtlHighlightRules = function() { + HtmlHighlightRules.call(this); + + var directives = "assign|attempt|break|case|compress|default|elseif|else|escape|fallback|function|flush|" + + "ftl|global|if|import|include|list|local|lt|macro|nested|noescape|noparse|nt|recover|recurse|return|rt|" + + "setting|stop|switch|t|visit"; + + var startRules = [ + { + token : "comment", + regex : "<#--", + next : "ftl-dcomment" + }, { + token : "string.interpolated", + regex : "\\${", + push : "ftl-start" + }, { + token : "keyword.function", + regex : "", + next : "pop" + }, { + token : "string.interpolated", + regex : "}", + next : "pop" + } + ]; + + for (var key in this.$rules) + this.$rules[key].unshift.apply(this.$rules[key], startRules); + + this.embedRules(FtlLangHighlightRules, "ftl-", endRules, ["start"]); + + this.addRules({ + "ftl-dcomment" : [{ + token : "comment", + regex : ".*?-->", + next : "pop" + }, { + token : "comment", + regex : ".+" + }] + }); + + this.normalizeRules(); +}; + +oop.inherits(FtlHighlightRules, HtmlHighlightRules); + +exports.FtlHighlightRules = FtlHighlightRules; +}); + +ace.define('ace/mode/html_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var CssHighlightRules = acequire("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = acequire("./xml_highlight_rules").XmlHighlightRules; + +var tagMap = lang.createMap({ + a : 'anchor', + button : 'form', + form : 'form', + img : 'image', + input : 'form', + label : 'form', + option : 'form', + script : 'script', + select : 'form', + textarea : 'form', + style : 'style', + table : 'table', + tbody : 'table', + td : 'table', + tfoot : 'table', + th : 'table', + tr : 'table' +}); + +var HtmlHighlightRules = function() { + XmlHighlightRules.call(this); + + this.addRules({ + attributes: [{ + include : "space" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "keyword.operator.separator", + regex : "=", + push : [{ + include: "space" + }, { + token : "string", + regex : "[^<>='\"`\\s]+", + next : "pop" + }, { + token : "empty", + regex : "", + next : "pop" + }] + }, { + include : "string" + }], + tag: [{ + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation.begin", + "meta.tag.name" + (group ? "." + group : "")]; + }, + regex : "(<)([-_a-zA-Z0-9:]+)", + next: "start_tag_stuff" + }, { + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation.begin", + "meta.tag.name" + (group ? "." + group : "")]; + }, + regex : "(", next : "start"} + ], + end_tag_stuff: [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next : "start"} + ] + }); + + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); + + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; + +oop.inherits(HtmlHighlightRules, XmlHighlightRules); + +exports.HtmlHighlightRules = HtmlHighlightRules; +}); + +ace.define('ace/mode/css_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; + +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|acequired|root|target|valid|visited)\\b"; + +var CssHighlightRules = function() { + + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + + this.$rules = { + "start" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "@.*?{", + push: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "media" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "\\}", + next: "pop" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "comment" : [{ + token : "comment", + regex : "\\*\\/", + next : "pop" + }, { + defaultToken : "comment" + }], + + "ruleset" : [ + { + token : "paren.rparen", + regex : "\\}", + next: "pop" + }, { + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : ["constant.numeric", "keyword"], + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + }, { + token : "constant.numeric", + regex : numRe + }, { + token : "constant.numeric", // hex6 color + regex : "#[a-f0-9]{6}" + }, { + token : "constant.numeric", // hex3 color + regex : "#[a-f0-9]{3}" + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex : pseudoElements + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex : pseudoClasses + }, { + token : ["support.function", "string", "support.function"], + regex : "(url\\()(.*)(\\))" + }, { + token : keywordMapper, + regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + caseInsensitive: true + }] + }; + + this.normalizeRules(); +}; + +oop.inherits(CssHighlightRules, TextHighlightRules); + +exports.CssHighlightRules = CssHighlightRules; + +}); + +ace.define('ace/mode/javascript_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var JavaScriptHighlightRules = function() { + var keywordMapper = this.createKeywordMapper({ + "variable.language": + "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document" , // Pseudo + "keyword": + "const|yield|import|get|set|" + + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", + "storage.type": + "const|let|var|function", + "constant.language": + "null|Infinity|NaN|undefined", + "support.function": + "alert", + "constant.language.boolean": "true|false" + }, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; + + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-6][0-7]?|" + // oct + "37[0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + + this.$rules = { + "no_regex" : [ + { + token : "comment", + regex : "\\/\\/", + next : "line_comment" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : /\/\*/, + next : "comment" + }, { + token : "string", + regex : "'(?=.)", + next : "qstring" + }, { + token : "string", + regex : '"(?=.)', + next : "qqstring" + }, { + token : "constant.numeric", // hex + regex : /0[xX][0-9a-fA-F]+\b/ + }, { + token : "constant.numeric", // float + regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ + }, { + token : [ + "storage.type", "punctuation.operator", "support.function", + "punctuation.operator", "entity.name.function", "text","keyword.operator" + ], + regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "paren.lparen" + ], + regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "text", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : "keyword", + regex : "(?:" + kwBeforeRe + ")\\b", + next : "start" + }, { + token : ["punctuation.operator", "support.function"], + regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token : ["punctuation.operator", "support.function.dom"], + regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token : ["punctuation.operator", "support.constant"], + regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token : ["storage.type", "punctuation.operator", "support.function.firebug"], + regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/ + }, { + token : keywordMapper, + regex : identifierRe + }, { + token : "keyword.operator", + regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, + next : "start" + }, { + token : "punctuation.operator", + regex : /\?|\:|\,|\;|\./, + next : "start" + }, { + token : "paren.lparen", + regex : /[\[({]/, + next : "start" + }, { + token : "paren.rparen", + regex : /[\])}]/ + }, { + token : "keyword.operator", + regex : /\/=?/, + next : "start" + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment_regex_allowed" + }, { + token : "comment", + regex : "\\/\\/", + next : "line_comment_regex_allowed" + }, { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token : "text", + regex : "\\s+|^$", + next : "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/\\w*", + next: "no_regex" + }, { + token : "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token : "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/ + }, { + token : "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "function_arguments": [ + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "[, ]+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "comment_regex_allowed" : [ + {token : "comment", regex : "\\*\\/", next : "start"}, + {defaultToken : "comment"} + ], + "comment" : [ + {token : "comment", regex : "\\*\\/", next : "no_regex"}, + {defaultToken : "comment"} + ], + "line_comment_regex_allowed" : [ + {token : "comment", regex : "$|^", next : "start"}, + {defaultToken : "comment"} + ], + "line_comment" : [ + {token : "comment", regex : "$|^", next : "no_regex"}, + {defaultToken : "comment"} + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qqstring" + }, { + token : "string", + regex : '"|$', + next : "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qstring" + }, { + token : "string", + regex : "'|$", + next : "no_regex" + }, { + defaultToken: "string" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("no_regex") ]); +}; + +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); + +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define('ace/mode/xml_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var xmlUtil = acequire("./xml_util"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var XmlHighlightRules = function(normalize) { + this.$rules = { + start : [ + {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"}, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration" + }, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction" + }, + {token : "comment", regex : "<\\!--", next : "comment"}, + { + token : ["punctuation.doctype.begin", "meta.tag.doctype"], + regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype" + }, + {include : "tag"}, + {include : "reference"} + ], + + xml_declaration : [ + {include : "attributes"}, + {include : "instruction"} + ], + + instruction : [ + {token : "punctuation.instruction.end", regex : "\\?>", next : "start"} + ], + + doctype : [ + {include : "space"}, + {include : "string"}, + {token : "punctuation.doctype.end", regex : ">", next : "start"}, + {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"}, + {token : "punctuation.begin", regex : "\\[", push : "declarations"} + ], + + declarations : [{ + token : "text", + regex : "\\s+" + }, { + token: "punctuation.end", + regex: "]", + next: "pop" + }, { + token : ["punctuation.begin", "keyword"], + regex : "(<\\!)([-_a-zA-Z0-9]+)", + push : [{ + token : "text", + regex : "\\s+" + }, + { + token : "punctuation.end", + regex : ">", + next : "pop" + }, + {include : "string"}] + }], + + cdata : [ + {token : "string.end", regex : "\\]\\]>", next : "start"}, + {token : "text", regex : "\\s+"}, + {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"} + ], + + comment : [ + {token : "comment", regex : "-->", next : "start"}, + {defaultToken : "comment"} + ], + + tag : [{ + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)", + next: [ + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"} + ] + }, { + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(", next : "start"} + ] + }], + + space : [ + {token : "text", regex : "\\s+"} + ], + + reference : [{ + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, { + token : "invalid.illegal", regex : "&" + }], + + string: [{ + token : "string", + regex : "'", + push : "qstring_inner" + }, { + token : "string", + regex : '"', + push : "qqstring_inner" + }], + + qstring_inner: [ + {token : "string", regex: "'", next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + qqstring_inner: [ + {token : "string", regex: '"', next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + attributes: [{ + token : "entity.other.attribute-name", + regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" + }, { + token : "keyword.operator.separator", + regex : "=" + }, { + include : "space" + }, { + include : "string" + }] + }; + + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; + + +(function() { + + this.embedTagRules = function(HighlightRules, prefix, tag){ + this.$rules.tag.unshift({ + token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(<)(" + tag + ")", + next: [ + {include : "space"}, + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"} + ] + }); + + this.$rules[tag + "-end"] = [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next: "start", + onMatch : function(value, currentState, stack) { + stack.splice(0); + return this.token; + }} + ] + + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(" + }]); + }; + +}).call(TextHighlightRules.prototype); + +oop.inherits(XmlHighlightRules, TextHighlightRules); + +exports.XmlHighlightRules = XmlHighlightRules; +}); + +ace.define('ace/mode/xml_util', ["require", 'exports', 'module' ], function(acequire, exports, module) { + + +function string(state) { + return [{ + token : "string", + regex : '"', + next : state + "_qqstring" + }, { + token : "string", + regex : "'", + next : state + "_qstring" + }]; +} + +function multiLineString(quote, state) { + return [ + {token : "string", regex : quote, next : state}, + { + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, + {defaultToken : "string"} + ]; +} + +exports.tag = function(states, name, nextState, tagMap) { + states[name] = [{ + token : "text", + regex : "\\s+" + }, { + + token : !tagMap ? "meta.tag.tag-name" : function(value) { + if (tagMap[value]) + return "meta.tag.tag-name." + tagMap[value]; + else + return "meta.tag.tag-name"; + }, + regex : "[-_a-zA-Z0-9:]+", + next : name + "_embed_attribute_list" + }, { + token: "empty", + regex: "", + next : name + "_embed_attribute_list" + }]; + + states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list"); + states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list"); + + states[name + "_embed_attribute_list"] = [{ + token : "meta.tag.r", + regex : "/?>", + next : nextState + }, { + token : "keyword.operator", + regex : "=" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "text", + regex : "\\s+" + }].concat(string(name)); +}; + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/glsl.js b/pitfall/pdfkit/node_modules/brace/mode/glsl.js new file mode 100644 index 00000000..a6cf2d12 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/glsl.js @@ -0,0 +1,854 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/glsl', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/c_cpp', 'ace/tokenizer', 'ace/mode/glsl_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var CMode = acequire("./c_cpp").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var glslHighlightRules = acequire("./glsl_highlight_rules").glslHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = glslHighlightRules; + + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, CMode); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/c_cpp', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/c_cpp_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var c_cppHighlightRules = acequire("./c_cpp_highlight_rules").c_cppHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = c_cppHighlightRules; + + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } else if (state == "doc-start") { + if (endState == "start") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); +ace.define('ace/mode/c_cpp_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var cFunctions = exports.cFunctions = "\\s*\\bhypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len)))\\b" + +var c_cppHighlightRules = function() { + + var keywordControls = ( + "break|case|continue|default|do|else|for|goto|if|_Pragma|" + + "return|switch|while|catch|operator|try|throw|using" + ); + + var storageType = ( + "asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" + + "_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|" + + "class|wchar_t|template" + ); + + var storageModifiers = ( + "const|extern|register|restrict|static|volatile|inline|private:|" + + "protected:|public:|friend|explicit|virtual|export|mutable|typename" + ); + + var keywordOperators = ( + "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq" + + "const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace" + ); + + var builtinConstants = ( + "NULL|true|false|TRUE|FALSE" + ); + + var keywordMapper = this.$keywords = this.createKeywordMapper({ + "keyword.control" : keywordControls, + "storage.type" : storageType, + "storage.modifier" : storageModifiers, + "keyword.operator" : keywordOperators, + "variable.language": "this", + "constant.language": builtinConstants + }, "identifier"); + + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\d\\$_\u00a1-\uffff]*\\b"; + + this.$rules = { + "start" : [ + { + token : "comment", + regex : "\\/\\/.*$" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // multi line string start + regex : '["].*\\\\$', + next : "qqstring" + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : "string", // multi line string start + regex : "['].*\\\\$", + next : "qstring" + }, { + token : "constant.numeric", // hex + regex : "0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" + }, { + token : "keyword", // pre-compiler directives + regex : "#\\s*(?:include|import|pragma|line|define|undef|if|ifdef|else|elif|ifndef)\\b", + next : "directive" + }, { + token : "keyword", // special case pre-compiler directive + regex : "(?:#\\s*endif)\\b" + }, { + token : "support.function.C99.c", + regex : cFunctions + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator", + regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)" + }, { + token : "punctuation.operator", + regex : "\\?|\\:|\\,|\\;|\\." + }, { + token : "paren.lparen", + regex : "[[({]" + }, { + token : "paren.rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + } + ], + "comment" : [ + { + token : "comment", // closing comment + regex : ".*?\\*\\/", + next : "start" + }, { + token : "comment", // comment spanning whole line + regex : ".+" + } + ], + "qqstring" : [ + { + token : "string", + regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', + next : "start" + }, { + token : "string", + regex : '.+' + } + ], + "qstring" : [ + { + token : "string", + regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", + next : "start" + }, { + token : "string", + regex : '.+' + } + ], + "directive" : [ + { + token : "constant.other.multiline", + regex : /\\/ + }, + { + token : "constant.other.multiline", + regex : /.*\\/ + }, + { + token : "constant.other", + regex : "\\s*<.+?>", + next : "start" + }, + { + token : "constant.other", // single line + regex : '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]', + next : "start" + }, + { + token : "constant.other", // single line + regex : "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']", + next : "start" + }, + { + token : "constant.other", + regex : /[^\\\/]+/, + next : "start" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("start") ]); +}; + +oop.inherits(c_cppHighlightRules, TextHighlightRules); + +exports.c_cppHighlightRules = c_cppHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); + +ace.define('ace/mode/glsl_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/c_cpp_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var c_cppHighlightRules = acequire("./c_cpp_highlight_rules").c_cppHighlightRules; + +var glslHighlightRules = function() { + + var keywords = ( + "attribute|const|uniform|varying|break|continue|do|for|while|" + + "if|else|in|out|inout|float|int|void|bool|true|false|" + + "lowp|mediump|highp|precision|invariant|discard|return|mat2|mat3|" + + "mat4|vec2|vec3|vec4|ivec2|ivec3|ivec4|bvec2|bvec3|bvec4|sampler2D|" + + "samplerCube|struct" + ); + + var buildinConstants = ( + "radians|degrees|sin|cos|tan|asin|acos|atan|pow|" + + "exp|log|exp2|log2|sqrt|inversesqrt|abs|sign|floor|ceil|fract|mod|" + + "min|max|clamp|mix|step|smoothstep|length|distance|dot|cross|" + + "normalize|faceforward|reflect|refract|matrixCompMult|lessThan|" + + "lessThanEqual|greaterThan|greaterThanEqual|equal|notEqual|any|all|" + + "not|dFdx|dFdy|fwidth|texture2D|texture2DProj|texture2DLod|" + + "texture2DProjLod|textureCube|textureCubeLod|" + + "gl_MaxVertexAttribs|gl_MaxVertexUniformVectors|gl_MaxVaryingVectors|" + + "gl_MaxVertexTextureImageUnits|gl_MaxCombinedTextureImageUnits|" + + "gl_MaxTextureImageUnits|gl_MaxFragmentUniformVectors|gl_MaxDrawBuffers|" + + "gl_DepthRangeParameters|gl_DepthRange|" + + "gl_Position|gl_PointSize|" + + "gl_FragCoord|gl_FrontFacing|gl_PointCoord|gl_FragColor|gl_FragData" + ); + + var keywordMapper = this.createKeywordMapper({ + "variable.language": "this", + "keyword": keywords, + "constant.language": buildinConstants + }, "identifier"); + + this.$rules = new c_cppHighlightRules().$rules; + this.$rules.start.forEach(function(rule) { + if (typeof rule.token == "function") + rule.token = keywordMapper; + }) +}; + +oop.inherits(glslHighlightRules, c_cppHighlightRules); + +exports.glslHighlightRules = glslHighlightRules; +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/golang.js b/pitfall/pdfkit/node_modules/brace/mode/golang.js new file mode 100644 index 00000000..6d06b9af --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/golang.js @@ -0,0 +1,668 @@ +ace.define('ace/mode/golang', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/golang_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var GolangHighlightRules = acequire("./golang_highlight_rules").GolangHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = GolangHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } + + return indent; + };//end getNextLineIndent + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); +ace.define('ace/mode/golang_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + var oop = acequire("../lib/oop"); + var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; + var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + + var GolangHighlightRules = function() { + var keywords = ( + "else|break|case|return|goto|if|const|select|" + + "continue|struct|default|switch|for|range|" + + "func|import|package|chan|defer|fallthrough|go|interface|map|range|" + + "select|type|var" + ); + var builtinTypes = ( + "string|uint8|uint16|uint32|uint64|int8|int16|int32|int64|float32|" + + "float64|complex64|complex128|byte|rune|uint|int|uintptr|bool|error" + ); + var builtinFunctions = ( + "make|close|new|panic|recover" + ); + var builtinConstants = ("nil|true|false|iota"); + + var keywordMapper = this.createKeywordMapper({ + "keyword": keywords, + "constant.language": builtinConstants, + "support.function": builtinFunctions, + "support.type": builtinTypes + }, "identifier"); + + this.$rules = { + "start" : [ + { + token : "comment", + regex : "\\/\\/.*$" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // single line + regex : '[`](?:[^`]*)[`]' + }, { + token : "string", // multi line string start + merge : true, + regex : '[`](?:[^`]*)$', + next : "bqstring" + }, { + token : "constant.numeric", // rune + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))[']" + }, { + token : "constant.numeric", // hex + regex : "0[xX][0-9a-fA-F]+\\b" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator", + regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=" + }, { + token : "punctuation.operator", + regex : "\\?|\\:|\\,|\\;|\\." + }, { + token : "paren.lparen", + regex : "[[({]" + }, { + token : "paren.rparen", + regex : "[\\])}]" + }, { + token: "invalid", + regex: "\\s+$" + }, { + token : "text", + regex : "\\s+" + } + ], + "comment" : [ + { + token : "comment", // closing comment + regex : ".*?\\*\\/", + next : "start" + }, { + token : "comment", // comment spanning whole line + regex : ".+" + } + ], + "bqstring" : [ + { + token : "string", + regex : '(?:[^`]*)`', + next : "start" + }, { + token : "string", + regex : '.+' + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("start") ]); + }; + oop.inherits(GolangHighlightRules, TextHighlightRules); + + exports.GolangHighlightRules = GolangHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/groovy.js b/pitfall/pdfkit/node_modules/brace/mode/groovy.js new file mode 100644 index 00000000..d834c9a0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/groovy.js @@ -0,0 +1,1088 @@ +ace.define('ace/mode/groovy', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript', 'ace/tokenizer', 'ace/mode/groovy_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var JavaScriptMode = acequire("./javascript").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var GroovyHighlightRules = acequire("./groovy_highlight_rules").GroovyHighlightRules; + +var Mode = function() { + JavaScriptMode.call(this); + this.HighlightRules = GroovyHighlightRules; +}; +oop.inherits(Mode, JavaScriptMode); + +(function() { + + this.createWorker = function(session) { + return null; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/javascript', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = JavaScriptHighlightRules; + + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/javascript"), "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + + worker.on("jslint", function(results) { + session.setAnnotations(results.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/javascript_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var JavaScriptHighlightRules = function() { + var keywordMapper = this.createKeywordMapper({ + "variable.language": + "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document" , // Pseudo + "keyword": + "const|yield|import|get|set|" + + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", + "storage.type": + "const|let|var|function", + "constant.language": + "null|Infinity|NaN|undefined", + "support.function": + "alert", + "constant.language.boolean": "true|false" + }, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; + + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-6][0-7]?|" + // oct + "37[0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + + this.$rules = { + "no_regex" : [ + { + token : "comment", + regex : "\\/\\/", + next : "line_comment" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : /\/\*/, + next : "comment" + }, { + token : "string", + regex : "'(?=.)", + next : "qstring" + }, { + token : "string", + regex : '"(?=.)', + next : "qqstring" + }, { + token : "constant.numeric", // hex + regex : /0[xX][0-9a-fA-F]+\b/ + }, { + token : "constant.numeric", // float + regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ + }, { + token : [ + "storage.type", "punctuation.operator", "support.function", + "punctuation.operator", "entity.name.function", "text","keyword.operator" + ], + regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "paren.lparen" + ], + regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "text", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : "keyword", + regex : "(?:" + kwBeforeRe + ")\\b", + next : "start" + }, { + token : ["punctuation.operator", "support.function"], + regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token : ["punctuation.operator", "support.function.dom"], + regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token : ["punctuation.operator", "support.constant"], + regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token : ["storage.type", "punctuation.operator", "support.function.firebug"], + regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/ + }, { + token : keywordMapper, + regex : identifierRe + }, { + token : "keyword.operator", + regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, + next : "start" + }, { + token : "punctuation.operator", + regex : /\?|\:|\,|\;|\./, + next : "start" + }, { + token : "paren.lparen", + regex : /[\[({]/, + next : "start" + }, { + token : "paren.rparen", + regex : /[\])}]/ + }, { + token : "keyword.operator", + regex : /\/=?/, + next : "start" + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment_regex_allowed" + }, { + token : "comment", + regex : "\\/\\/", + next : "line_comment_regex_allowed" + }, { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token : "text", + regex : "\\s+|^$", + next : "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/\\w*", + next: "no_regex" + }, { + token : "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token : "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/ + }, { + token : "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "function_arguments": [ + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "[, ]+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "comment_regex_allowed" : [ + {token : "comment", regex : "\\*\\/", next : "start"}, + {defaultToken : "comment"} + ], + "comment" : [ + {token : "comment", regex : "\\*\\/", next : "no_regex"}, + {defaultToken : "comment"} + ], + "line_comment_regex_allowed" : [ + {token : "comment", regex : "$|^", next : "start"}, + {defaultToken : "comment"} + ], + "line_comment" : [ + {token : "comment", regex : "$|^", next : "no_regex"}, + {defaultToken : "comment"} + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qqstring" + }, { + token : "string", + regex : '"|$', + next : "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qstring" + }, { + token : "string", + regex : "'|$", + next : "no_regex" + }, { + defaultToken: "string" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("no_regex") ]); +}; + +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); + +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); +ace.define('ace/mode/groovy_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var GroovyHighlightRules = function() { + + var keywords = ( + "assert|with|abstract|continue|for|new|switch|" + + "assert|default|goto|package|synchronized|" + + "boolean|do|if|private|this|" + + "break|double|implements|protected|throw|" + + "byte|else|import|public|throws|" + + "case|enum|instanceof|return|transient|" + + "catch|extends|int|short|try|" + + "char|final|interface|static|void|" + + "class|finally|long|strictfp|volatile|" + + "def|float|native|super|while" + ); + + var buildinConstants = ( + "null|Infinity|NaN|undefined" + ); + + var langClasses = ( + "AbstractMethodError|AssertionError|ClassCircularityError|"+ + "ClassFormatError|Deprecated|EnumConstantNotPresentException|"+ + "ExceptionInInitializerError|IllegalAccessError|"+ + "IllegalThreadStateException|InstantiationError|InternalError|"+ + "NegativeArraySizeException|NoSuchFieldError|Override|Process|"+ + "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|"+ + "SuppressWarnings|TypeNotPresentException|UnknownError|"+ + "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|"+ + "InstantiationException|IndexOutOfBoundsException|"+ + "ArrayIndexOutOfBoundsException|CloneNotSupportedException|"+ + "NoSuchFieldException|IllegalArgumentException|NumberFormatException|"+ + "SecurityException|Void|InheritableThreadLocal|IllegalStateException|"+ + "InterruptedException|NoSuchMethodException|IllegalAccessException|"+ + "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|"+ + "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|"+ + "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|"+ + "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|"+ + "Character|Boolean|StackTraceElement|Appendable|StringBuffer|"+ + "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|"+ + "StackOverflowError|OutOfMemoryError|VirtualMachineError|"+ + "ArrayStoreException|ClassCastException|LinkageError|"+ + "NoClassDefFoundError|ClassNotFoundException|RuntimeException|"+ + "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|"+ + "Cloneable|Class|CharSequence|Comparable|String|Object" + ); + + var keywordMapper = this.createKeywordMapper({ + "variable.language": "this", + "keyword": keywords, + "support.function": langClasses, + "constant.language": buildinConstants + }, "identifier"); + + this.$rules = { + "start" : [ + { + token : "comment", + regex : "\\/\\/.*$" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment" + }, { + token : "string.regexp", + regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" + }, { + token : "string", + regex : '"""', + next : "qqstring" + }, { + token : "string", + regex : "'''", + next : "qstring" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : "constant.numeric", // hex + regex : "0[xX][0-9a-fA-F]+\\b" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "constant.language.boolean", + regex : "(?:true|false)\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator", + regex : "\\?:|\\?\\.|\\*\\.|<=>|=~|==~|\\.@|\\*\\.@|\\.&|as|in|is|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" + }, { + token : "lparen", + regex : "[[({]" + }, { + token : "rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + } + ], + "comment" : [ + { + token : "comment", // closing comment + regex : ".*?\\*\\/", + next : "start" + }, { + token : "comment", // comment spanning whole line + regex : ".+" + } + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : /\\(?:u[0-9A-Fa-f]{4}|.|$)/ + }, { + token : "constant.language.escape", + regex : /\$[\w\d]+/ + }, { + token : "constant.language.escape", + regex : /\$\{[^"\}]+\}?/ + }, { + token : "string", + regex : '"{3,5}', + next : "start" + }, { + token : "string", + regex : '.+?' + } + ], + "qstring" : [ + { + token : "constant.language.escape", + regex : /\\(?:u[0-9A-Fa-f]{4}|.|$)/ + }, { + token : "string", + regex : "'{3,5}", + next : "start" + }, { + token : "string", + regex : ".+?" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("start") ]); +}; + +oop.inherits(GroovyHighlightRules, TextHighlightRules); + +exports.GroovyHighlightRules = GroovyHighlightRules; +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/haml.js b/pitfall/pdfkit/node_modules/brace/mode/haml.js new file mode 100644 index 00000000..2cb3b181 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/haml.js @@ -0,0 +1,497 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2012, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * Contributor(s): + * + * Garen J. Torikian < gjtorikian AT gmail DOT com > + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/haml', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/haml_highlight_rules', 'ace/mode/folding/coffee'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var HamlHighlightRules = acequire("./haml_highlight_rules").HamlHighlightRules; +var FoldMode = acequire("./folding/coffee").FoldMode; + +var Mode = function() { + this.HighlightRules = HamlHighlightRules; + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + this.lineCommentStart = ["//", "#"]; + +}).call(Mode.prototype); + +exports.Mode = Mode; +});ace.define('ace/mode/haml_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules', 'ace/mode/ruby_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var RubyExports = acequire("./ruby_highlight_rules"); +var RubyHighlightRules = RubyExports.RubyHighlightRules; + +var HamlHighlightRules = function() { + + this.$rules = + { + "start": [ + { + token : "punctuation.section.comment", + regex : /^\s*\/.*/ + }, + { + token : "punctuation.section.comment", + regex : /^\s*#.*/ + }, + { + token: "string.quoted.double", + regex: "==.+?==" + }, + { + token: "keyword.other.doctype", + regex: "^!!!\\s*(?:[a-zA-Z0-9-_]+)?" + }, + RubyExports.qString, + RubyExports.qqString, + RubyExports.tString, + { + token: ["entity.name.tag.haml"], + regex: /^\s*%[\w:]+/, + next: "tag_single" + }, + { + token: [ "meta.escape.haml" ], + regex: "^\\s*\\\\." + }, + RubyExports.constantNumericHex, + RubyExports.constantNumericFloat, + + RubyExports.constantOtherSymbol, + { + token: "text", + regex: "=|-|~", + next: "embedded_ruby" + } + ], + "tag_single": [ + { + token: "entity.other.attribute-name.class.haml", + regex: "\\.[\\w-]+" + }, + { + token: "entity.other.attribute-name.id.haml", + regex: "#[\\w-]+" + }, + { + token: "punctuation.section", + regex: "\\{", + next: "section" + }, + + RubyExports.constantOtherSymbol, + + { + token: "text", + regex: /\s/, + next: "start" + }, + { + token: "empty", + regex: "$|(?!\\.|#|\\{|\\[|=|-|~|\\/)", + next: "start" + } + ], + "section": [ + RubyExports.constantOtherSymbol, + + RubyExports.qString, + RubyExports.qqString, + RubyExports.tString, + + RubyExports.constantNumericHex, + RubyExports.constantNumericFloat, + { + token: "punctuation.section", + regex: "\\}", + next: "start" + } + ], + "embedded_ruby": [ + RubyExports.constantNumericHex, + RubyExports.constantNumericFloat, + { + token : "support.class", // class name + regex : "[A-Z][a-zA-Z_\\d]+" + }, + { + token : new RubyHighlightRules().getKeywords(), + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, + { + token : ["keyword", "text", "text"], + regex : "(?:do|\\{)(?: \\|[^|]+\\|)?$", + next : "start" + }, + { + token : ["text"], + regex : "^$", + next : "start" + }, + { + token : ["text"], + regex : "^(?!.*\\|\\s*$)", + next : "start" + } + ] +} + +}; + +oop.inherits(HamlHighlightRules, TextHighlightRules); + +exports.HamlHighlightRules = HamlHighlightRules; +}); + +ace.define('ace/mode/ruby_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var constantOtherSymbol = exports.constantOtherSymbol = { + token : "constant.other.symbol.ruby", // symbol + regex : "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?" +}; + +var qString = exports.qString = { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" +}; + +var qqString = exports.qqString = { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' +}; + +var tString = exports.tString = { + token : "string", // backtick string + regex : "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]" +}; + +var constantNumericHex = exports.constantNumericHex = { + token : "constant.numeric", // hex + regex : "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b" +}; + +var constantNumericFloat = exports.constantNumericFloat = { + token : "constant.numeric", // float + regex : "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b" +}; + +var RubyHighlightRules = function() { + + var builtinFunctions = ( + "abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|" + + "assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|" + + "assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|" + + "assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|" + + "assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|" + + "assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|" + + "attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|" + + "caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|" + + "exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|" + + "gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|" + + "link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|" + + "p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|" + + "raw|readline|readlines|redirect?|request_via_redirect|acequire|scan|select|" + + "set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|" + + "throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|" + + "render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|" + + "content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|" + + "fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|" + + "time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|" + + "select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|" + + "file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|" + + "protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|" + + "send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|" + + "validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|" + + "validates_inclusion_of|validates_numericality_of|validates_with|validates_each|" + + "authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|" + + "filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|" + + "translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|" + + "cache|expire_fragment|expire_cache_for|observe|cache_sweeper|" + + "has_many|has_one|belongs_to|has_and_belongs_to_many" + ); + + var keywords = ( + "alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|" + + "__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|" + + "redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield" + ); + + var buildinConstants = ( + "true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|" + + "RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING" + ); + + var builtinVariables = ( + "\$DEBUG|\$defout|\$FILENAME|\$LOAD_PATH|\$SAFE|\$stdin|\$stdout|\$stderr|\$VERBOSE|" + + "$!|root_url|flash|session|cookies|params|request|response|logger|self" + ); + + var keywordMapper = this.$keywords = this.createKeywordMapper({ + "keyword": keywords, + "constant.language": buildinConstants, + "variable.language": builtinVariables, + "support.function": builtinFunctions, + "invalid.deprecated": "debugger" // TODO is this a remnant from js mode? + }, "identifier"); + + this.$rules = { + "start" : [ + { + token : "comment", + regex : "#.*$" + }, { + token : "comment", // multi line comment + regex : "^=begin(?:$|\\s.*$)", + next : "comment" + }, { + token : "string.regexp", + regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" + }, + + qString, + qqString, + tString, + + { + token : "text", // namespaces aren't symbols + regex : "::" + }, { + token : "variable.instance", // instance variable + regex : "@{1,2}[a-zA-Z_\\d]+" + }, { + token : "support.class", // class name + regex : "[A-Z][a-zA-Z_\\d]+" + }, + + constantOtherSymbol, + constantNumericHex, + constantNumericFloat, + + { + token : "constant.language.boolean", + regex : "(?:true|false)\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "punctuation.separator.key-value", + regex : "=>" + }, { + stateName: "heredoc", + onMatch : function(value, currentState, stack) { + var next = value[2] == '-' ? "indentedHeredoc" : "heredoc"; + var tokens = value.split(this.splitRegex); + stack.push(next, tokens[3]); + return [ + {type:"constant", value: tokens[1]}, + {type:"string", value: tokens[2]}, + {type:"support.class", value: tokens[3]}, + {type:"string", value: tokens[4]} + ]; + }, + regex : "(<<-?)(['\"`]?)([\\w]+)(['\"`]?)", + rules: { + heredoc: [{ + onMatch: function(value, currentState, stack) { + if (value === stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack[0] || "start"; + return "support.class"; + } + this.next = ""; + return "string"; + }, + regex: ".*$", + next: "start" + }], + indentedHeredoc: [{ + token: "string", + regex: "^ +" + }, { + onMatch: function(value, currentState, stack) { + if (value === stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack[0] || "start"; + return "support.class"; + } + this.next = ""; + return "string"; + }, + regex: ".*$", + next: "start" + }] + } + }, { + regex : "$", + token : "empty", + next : function(currentState, stack) { + if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc") + return stack[0]; + return currentState; + } + }, { + token : "keyword.operator", + regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" + }, { + token : "paren.lparen", + regex : "[[({]" + }, { + token : "paren.rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + } + ], + "comment" : [ + { + token : "comment", // closing comment + regex : "^=end(?:$|\\s.*$)", + next : "start" + }, { + token : "comment", // comment spanning whole line + regex : ".+" + } + ] + }; + + this.normalizeRules(); +}; + +oop.inherits(RubyHighlightRules, TextHighlightRules); + +exports.RubyHighlightRules = RubyHighlightRules; +}); + +ace.define('ace/mode/folding/coffee', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var BaseFoldMode = acequire("./fold_mode").FoldMode; +var Range = acequire("../../range").Range; + +var FoldMode = exports.FoldMode = function() {}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var range = this.indentationBlock(session, row); + if (range) + return range; + + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1 || line[startLevel] != "#") + return; + + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + + while (++row < maxRow) { + line = session.getLine(row); + var level = line.search(re); + + if (level == -1) + continue; + + if (line[level] != "#") + break; + + endRow = row; + } + + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + + if (prevIndent!= -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + + if (indent < nextIndent) + return "start"; + else + return ""; + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/handlebars.js b/pitfall/pdfkit/node_modules/brace/mode/handlebars.js new file mode 100644 index 00000000..d7538357 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/handlebars.js @@ -0,0 +1,2424 @@ +/* global define */ + +ace.define('ace/mode/handlebars', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/html', 'ace/tokenizer', 'ace/mode/handlebars_highlight_rules', 'ace/mode/behaviour/html', 'ace/mode/folding/html'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var HtmlMode = acequire("./html").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var HandlebarsHighlightRules = acequire("./handlebars_highlight_rules").HandlebarsHighlightRules; +var HtmlBehaviour = acequire("./behaviour/html").HtmlBehaviour; +var HtmlFoldMode = acequire("./folding/html").FoldMode; + +var Mode = function() { + HtmlMode.call(this); + this.HighlightRules = HandlebarsHighlightRules; + this.$behaviour = new HtmlBehaviour(); + + + this.foldingRules = new HtmlFoldMode(); +}; + +oop.inherits(Mode, HtmlMode); + +(function() { + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/html', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/css', 'ace/tokenizer', 'ace/mode/html_highlight_rules', 'ace/mode/behaviour/html', 'ace/mode/folding/html', 'ace/mode/html_completions'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var JavaScriptMode = acequire("./javascript").Mode; +var CssMode = acequire("./css").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var HtmlHighlightRules = acequire("./html_highlight_rules").HtmlHighlightRules; +var HtmlBehaviour = acequire("./behaviour/html").HtmlBehaviour; +var HtmlFoldMode = acequire("./folding/html").FoldMode; +var HtmlCompletions = acequire("./html_completions").HtmlCompletions; + +var Mode = function() { + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new HtmlBehaviour(); + this.$completer = new HtmlCompletions(); + + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + + this.foldingRules = new HtmlFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.blockComment = {start: ""}; + + this.getNextLineIndent = function(state, line, tab) { + return this.$getIndent(line); + }; + + this.checkOutdent = function(state, line, input) { + return false; + }; + + this.getCompletions = function(state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/javascript', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = JavaScriptHighlightRules; + + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/javascript"), "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + + worker.on("jslint", function(results) { + session.setAnnotations(results.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/javascript_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var JavaScriptHighlightRules = function() { + var keywordMapper = this.createKeywordMapper({ + "variable.language": + "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document" , // Pseudo + "keyword": + "const|yield|import|get|set|" + + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", + "storage.type": + "const|let|var|function", + "constant.language": + "null|Infinity|NaN|undefined", + "support.function": + "alert", + "constant.language.boolean": "true|false" + }, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; + + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-6][0-7]?|" + // oct + "37[0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + + this.$rules = { + "no_regex" : [ + { + token : "comment", + regex : "\\/\\/", + next : "line_comment" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : /\/\*/, + next : "comment" + }, { + token : "string", + regex : "'(?=.)", + next : "qstring" + }, { + token : "string", + regex : '"(?=.)', + next : "qqstring" + }, { + token : "constant.numeric", // hex + regex : /0[xX][0-9a-fA-F]+\b/ + }, { + token : "constant.numeric", // float + regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ + }, { + token : [ + "storage.type", "punctuation.operator", "support.function", + "punctuation.operator", "entity.name.function", "text","keyword.operator" + ], + regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "paren.lparen" + ], + regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "text", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : "keyword", + regex : "(?:" + kwBeforeRe + ")\\b", + next : "start" + }, { + token : ["punctuation.operator", "support.function"], + regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token : ["punctuation.operator", "support.function.dom"], + regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token : ["punctuation.operator", "support.constant"], + regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token : ["storage.type", "punctuation.operator", "support.function.firebug"], + regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/ + }, { + token : keywordMapper, + regex : identifierRe + }, { + token : "keyword.operator", + regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, + next : "start" + }, { + token : "punctuation.operator", + regex : /\?|\:|\,|\;|\./, + next : "start" + }, { + token : "paren.lparen", + regex : /[\[({]/, + next : "start" + }, { + token : "paren.rparen", + regex : /[\])}]/ + }, { + token : "keyword.operator", + regex : /\/=?/, + next : "start" + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment_regex_allowed" + }, { + token : "comment", + regex : "\\/\\/", + next : "line_comment_regex_allowed" + }, { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token : "text", + regex : "\\s+|^$", + next : "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/\\w*", + next: "no_regex" + }, { + token : "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token : "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/ + }, { + token : "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "function_arguments": [ + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "[, ]+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "comment_regex_allowed" : [ + {token : "comment", regex : "\\*\\/", next : "start"}, + {defaultToken : "comment"} + ], + "comment" : [ + {token : "comment", regex : "\\*\\/", next : "no_regex"}, + {defaultToken : "comment"} + ], + "line_comment_regex_allowed" : [ + {token : "comment", regex : "$|^", next : "start"}, + {defaultToken : "comment"} + ], + "line_comment" : [ + {token : "comment", regex : "$|^", next : "no_regex"}, + {defaultToken : "comment"} + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qqstring" + }, { + token : "string", + regex : '"|$', + next : "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qstring" + }, { + token : "string", + regex : "'|$", + next : "no_regex" + }, { + defaultToken: "string" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("no_regex") ]); +}; + +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); + +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); + +ace.define('ace/mode/css', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/behaviour/css', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var CssHighlightRules = acequire("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var CssBehaviour = acequire("./behaviour/css").CssBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.foldingRules = "cStyle"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/css"), "Worker"); + worker.attachToDocument(session.getDocument()); + + worker.on("csslint", function(e) { + session.setAnnotations(e.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; + +}); + +ace.define('ace/mode/css_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; + +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|acequired|root|target|valid|visited)\\b"; + +var CssHighlightRules = function() { + + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + + this.$rules = { + "start" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "@.*?{", + push: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "media" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "\\}", + next: "pop" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "comment" : [{ + token : "comment", + regex : "\\*\\/", + next : "pop" + }, { + defaultToken : "comment" + }], + + "ruleset" : [ + { + token : "paren.rparen", + regex : "\\}", + next: "pop" + }, { + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : ["constant.numeric", "keyword"], + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + }, { + token : "constant.numeric", + regex : numRe + }, { + token : "constant.numeric", // hex6 color + regex : "#[a-f0-9]{6}" + }, { + token : "constant.numeric", // hex3 color + regex : "#[a-f0-9]{3}" + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex : pseudoElements + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex : pseudoClasses + }, { + token : ["support.function", "string", "support.function"], + regex : "(url\\()(.*)(\\))" + }, { + token : keywordMapper, + regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + caseInsensitive: true + }] + }; + + this.normalizeRules(); +}; + +oop.inherits(CssHighlightRules, TextHighlightRules); + +exports.CssHighlightRules = CssHighlightRules; + +}); + +ace.define('ace/mode/behaviour/css', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + +var CssBehaviour = function () { + + this.inherit(CstyleBehaviour); + + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + } + } + if (!line.substring(cursor.column).match(/^\s*;/)) { + return { + text: ':;', + selection: [1, 1] + } + } + } + } + }); + + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column ++; + return range; + } + } + } + }); + + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + } + } + } + }); + +} +oop.inherits(CssBehaviour, CstyleBehaviour); + +exports.CssBehaviour = CssBehaviour; +}); + +ace.define('ace/mode/html_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var CssHighlightRules = acequire("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = acequire("./xml_highlight_rules").XmlHighlightRules; + +var tagMap = lang.createMap({ + a : 'anchor', + button : 'form', + form : 'form', + img : 'image', + input : 'form', + label : 'form', + option : 'form', + script : 'script', + select : 'form', + textarea : 'form', + style : 'style', + table : 'table', + tbody : 'table', + td : 'table', + tfoot : 'table', + th : 'table', + tr : 'table' +}); + +var HtmlHighlightRules = function() { + XmlHighlightRules.call(this); + + this.addRules({ + attributes: [{ + include : "space" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "keyword.operator.separator", + regex : "=", + push : [{ + include: "space" + }, { + token : "string", + regex : "[^<>='\"`\\s]+", + next : "pop" + }, { + token : "empty", + regex : "", + next : "pop" + }] + }, { + include : "string" + }], + tag: [{ + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation.begin", + "meta.tag.name" + (group ? "." + group : "")]; + }, + regex : "(<)([-_a-zA-Z0-9:]+)", + next: "start_tag_stuff" + }, { + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation.begin", + "meta.tag.name" + (group ? "." + group : "")]; + }, + regex : "(", next : "start"} + ], + end_tag_stuff: [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next : "start"} + ] + }); + + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); + + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; + +oop.inherits(HtmlHighlightRules, XmlHighlightRules); + +exports.HtmlHighlightRules = HtmlHighlightRules; +}); + +ace.define('ace/mode/xml_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var xmlUtil = acequire("./xml_util"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var XmlHighlightRules = function(normalize) { + this.$rules = { + start : [ + {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"}, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration" + }, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction" + }, + {token : "comment", regex : "<\\!--", next : "comment"}, + { + token : ["punctuation.doctype.begin", "meta.tag.doctype"], + regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype" + }, + {include : "tag"}, + {include : "reference"} + ], + + xml_declaration : [ + {include : "attributes"}, + {include : "instruction"} + ], + + instruction : [ + {token : "punctuation.instruction.end", regex : "\\?>", next : "start"} + ], + + doctype : [ + {include : "space"}, + {include : "string"}, + {token : "punctuation.doctype.end", regex : ">", next : "start"}, + {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"}, + {token : "punctuation.begin", regex : "\\[", push : "declarations"} + ], + + declarations : [{ + token : "text", + regex : "\\s+" + }, { + token: "punctuation.end", + regex: "]", + next: "pop" + }, { + token : ["punctuation.begin", "keyword"], + regex : "(<\\!)([-_a-zA-Z0-9]+)", + push : [{ + token : "text", + regex : "\\s+" + }, + { + token : "punctuation.end", + regex : ">", + next : "pop" + }, + {include : "string"}] + }], + + cdata : [ + {token : "string.end", regex : "\\]\\]>", next : "start"}, + {token : "text", regex : "\\s+"}, + {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"} + ], + + comment : [ + {token : "comment", regex : "-->", next : "start"}, + {defaultToken : "comment"} + ], + + tag : [{ + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)", + next: [ + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"} + ] + }, { + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(", next : "start"} + ] + }], + + space : [ + {token : "text", regex : "\\s+"} + ], + + reference : [{ + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, { + token : "invalid.illegal", regex : "&" + }], + + string: [{ + token : "string", + regex : "'", + push : "qstring_inner" + }, { + token : "string", + regex : '"', + push : "qqstring_inner" + }], + + qstring_inner: [ + {token : "string", regex: "'", next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + qqstring_inner: [ + {token : "string", regex: '"', next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + attributes: [{ + token : "entity.other.attribute-name", + regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" + }, { + token : "keyword.operator.separator", + regex : "=" + }, { + include : "space" + }, { + include : "string" + }] + }; + + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; + + +(function() { + + this.embedTagRules = function(HighlightRules, prefix, tag){ + this.$rules.tag.unshift({ + token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(<)(" + tag + ")", + next: [ + {include : "space"}, + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"} + ] + }); + + this.$rules[tag + "-end"] = [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next: "start", + onMatch : function(value, currentState, stack) { + stack.splice(0); + return this.token; + }} + ] + + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(" + }]); + }; + +}).call(TextHighlightRules.prototype); + +oop.inherits(XmlHighlightRules, TextHighlightRules); + +exports.XmlHighlightRules = XmlHighlightRules; +}); + +ace.define('ace/mode/xml_util', ["require", 'exports', 'module' ], function(acequire, exports, module) { + + +function string(state) { + return [{ + token : "string", + regex : '"', + next : state + "_qqstring" + }, { + token : "string", + regex : "'", + next : state + "_qstring" + }]; +} + +function multiLineString(quote, state) { + return [ + {token : "string", regex : quote, next : state}, + { + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, + {defaultToken : "string"} + ]; +} + +exports.tag = function(states, name, nextState, tagMap) { + states[name] = [{ + token : "text", + regex : "\\s+" + }, { + + token : !tagMap ? "meta.tag.tag-name" : function(value) { + if (tagMap[value]) + return "meta.tag.tag-name." + tagMap[value]; + else + return "meta.tag.tag-name"; + }, + regex : "[-_a-zA-Z0-9:]+", + next : name + "_embed_attribute_list" + }, { + token: "empty", + regex: "", + next : name + "_embed_attribute_list" + }]; + + states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list"); + states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list"); + + states[name + "_embed_attribute_list"] = [{ + token : "meta.tag.r", + regex : "/?>", + next : nextState + }, { + token : "keyword.operator", + regex : "=" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "text", + regex : "\\s+" + }].concat(string(name)); +}; + +}); + +ace.define('ace/mode/behaviour/html', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour/xml', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var XmlBehaviour = acequire("../behaviour/xml").XmlBehaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var voidElements = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr']; + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); + return hasType; +} + +var HtmlBehaviour = function () { + + this.inherit(XmlBehaviour); // Get xml behaviour + + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getCursorPosition(); + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken(); + + if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column) + return; + var atCursor = false; + if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text'))); + } else { + atCursor = true; + } + if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) { + return; + } + var element = token.value; + if (atCursor){ + var element = element.substring(0, position.column - token.start); + } + if (voidElements.indexOf(element) !== -1){ + return; + } + return { + text: '>' + '', + selection: [1, 1] + } + } + }); +} +oop.inherits(HtmlBehaviour, XmlBehaviour); + +exports.HtmlBehaviour = HtmlBehaviour; +}); + +ace.define('ace/mode/behaviour/xml', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); + return hasType; +} + +var XmlBehaviour = function () { + + this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour + + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getCursorPosition(); + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken(); + + if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column) + return; + var atCursor = false; + if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text'))); + } else { + atCursor = true; + } + if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) { + return; + } + var tag = token.value; + if (atCursor){ + var tag = tag.substring(0, position.column - token.start); + } + + return { + text: '>' + '', + selection: [1, 1] + } + } + }); + + this.add('autoindent', 'insertion', function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var rightChars = line.substring(cursor.column, cursor.column + 2); + if (rightChars == '?)/; + this._parseTag = function(tag) { + + var match = tag.match(this.tagRe); + var column = 0; + + return { + value: tag, + match: match ? match[2] : "", + closing: match ? !!match[3] : false, + selfClosing: match ? !!match[5] || match[2] == "/>" : false, + tagName: match ? match[4] : "", + column: match[1] ? column + match[1].length : column + }; + }; + this._readTagForward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var value = ""; + var start; + + do { + if (token.type.lastIndexOf("meta.tag", 0) === 0) { + if (!start) { + var start = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + }; + } + value += token.value; + if (value.indexOf(">") !== -1) { + var tag = this._parseTag(value); + tag.start = start; + tag.end = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + token.value.length + }; + iterator.stepForward(); + return tag; + } + } + } while(token = iterator.stepForward()); + + return null; + }; + + this._readTagBackward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var value = ""; + var end; + + do { + if (token.type.lastIndexOf("meta.tag", 0) === 0) { + if (!end) { + end = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + token.value.length + }; + } + value = token.value + value; + if (value.indexOf("<") !== -1) { + var tag = this._parseTag(value); + tag.end = end; + tag.start = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + }; + iterator.stepBackward(); + return tag; + } + } + } while(token = iterator.stepBackward()); + + return null; + }; + + this._pop = function(stack, tag) { + while (stack.length) { + + var top = stack[stack.length-1]; + if (!tag || top.tagName == tag.tagName) { + return stack.pop(); + } + else if (this.voidElements[tag.tagName]) { + return; + } + else if (this.voidElements[top.tagName]) { + stack.pop(); + continue; + } else { + return null; + } + } + }; + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + + if (!firstTag.match) + return null; + + var isBackward = firstTag.closing || firstTag.selfClosing; + var stack = []; + var tag; + + if (!isBackward) { + var iterator = new TokenIterator(session, row, firstTag.column); + var start = { + row: row, + column: firstTag.column + firstTag.tagName.length + 2 + }; + while (tag = this._readTagForward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) + return Range.fromPoints(start, tag.start); + } + else { + stack.push(tag) + } + } + } + else { + var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length); + var end = { + row: row, + column: firstTag.column + }; + + while (tag = this._readTagBackward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (!tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) { + tag.start.column += tag.tagName.length + 2; + return Range.fromPoints(tag.start, end); + } + } + else { + stack.push(tag) + } + } + } + + }; + +}).call(FoldMode.prototype); + +}); + +ace.define('ace/mode/html_completions', ["require", 'exports', 'module' , 'ace/token_iterator'], function(acequire, exports, module) { + + +var TokenIterator = acequire("../token_iterator").TokenIterator; + +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; + +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; + +var globalAttributes = commonAttributes.concat(eventAttributes); + +var attributeMap = { + "html": ["manifest"], + "head": [], + "title": [], + "base": ["href", "target"], + "link": ["href", "hreflang", "rel", "media", "type", "sizes"], + "meta": ["http-equiv", "name", "content", "charset"], + "style": ["type", "media", "scoped"], + "script": ["charset", "type", "src", "defer", "async"], + "noscript": ["href"], + "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"], + "section": [], + "nav": [], + "article": ["pubdate"], + "aside": [], + "h1": [], + "h2": [], + "h3": [], + "h4": [], + "h5": [], + "h6": [], + "header": [], + "footer": [], + "address": [], + "main": [], + "p": [], + "hr": [], + "pre": [], + "blockquote": ["cite"], + "ol": ["start", "reversed"], + "ul": [], + "li": ["value"], + "dl": [], + "dt": [], + "dd": [], + "figure": [], + "figcaption": [], + "div": [], + "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"], + "em": [], + "strong": [], + "small": [], + "s": [], + "cite": [], + "q": ["cite"], + "dfn": [], + "abbr": [], + "data": [], + "time": ["datetime"], + "code": [], + "var": [], + "samp": [], + "kbd": [], + "sub": [], + "sup": [], + "i": [], + "b": [], + "u": [], + "mark": [], + "ruby": [], + "rt": [], + "rp": [], + "bdi": [], + "bdo": [], + "span": [], + "br": [], + "wbr": [], + "ins": ["cite", "datetime"], + "del": ["cite", "datetime"], + "img": ["alt", "src", "height", "width", "usemap", "ismap"], + "iframe": ["name", "src", "height", "width", "sandbox", "seamless"], + "embed": ["src", "height", "width", "type"], + "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"], + "param": ["name", "value"], + "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"], + "audio": ["src", "autobuffer", "autoplay", "loop", "controls"], + "source": ["src", "type", "media"], + "track": ["kind", "src", "srclang", "label", "default"], + "canvas": ["width", "height"], + "map": ["name"], + "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"], + "svg": [], + "math": [], + "table": ["summary"], + "caption": [], + "colgroup": ["span"], + "col": ["span"], + "tbody": [], + "thead": [], + "tfoot": [], + "tr": [], + "td": ["headers", "rowspan", "colspan"], + "th": ["headers", "rowspan", "colspan", "scope"], + "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"], + "fieldset": ["disabled", "form", "name"], + "legend": [], + "label": ["form", "for"], + "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "acequired", "size", "src", "step", "width", "files", "value"], + "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"], + "select": ["autofocus", "disabled", "form", "multiple", "name", "size"], + "datalist": [], + "optgroup": ["disabled", "label"], + "option": ["disabled", "selected", "label", "value"], + "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "acequired", "rows", "cols", "wrap"], + "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"], + "output": ["for", "form", "name"], + "progress": ["value", "max"], + "meter": ["value", "min", "max", "low", "high", "optimum"], + "details": ["open"], + "summary": [], + "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"], + "menu": ["type", "label"], + "dialog": ["open"] +}; + +var allElements = Object.keys(attributeMap); + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); +} + +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + if (!token || !hasType(token, 'tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'operator') || hasType(token, 'attribute-name') || hasType(token, 'text'))); + } + if (token && hasType(token, 'tag-name') && !iterator.stepBackward().value.match('/')) + return token.value; +} + +var HtmlCompletions = function() { + +}; + +(function() { + + this.getCompletions = function(state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + + if (!token) + return []; + if (hasType(token, "tag-name") || (token.value == '<' && hasType(token, "text"))) + return this.getTagCompletions(state, session, pos, prefix); + if (hasType(token, 'text') || hasType(token, 'attribute-name')) + return this.getAttributeCompetions(state, session, pos, prefix); + + return []; + }; + + this.getTagCompletions = function(state, session, pos, prefix) { + var elements = allElements; + if (prefix) { + elements = elements.filter(function(element){ + return element.indexOf(prefix) === 0; + }); + } + return elements.map(function(element){ + return { + value: element, + meta: "tag" + }; + }); + }; + + this.getAttributeCompetions = function(state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(attributeMap[tagName]); + } + if (prefix) { + attributes = attributes.filter(function(attribute){ + return attribute.indexOf(prefix) === 0; + }); + } + return attributes.map(function(attribute){ + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute" + }; + }); + }; + +}).call(HtmlCompletions.prototype); + +exports.HtmlCompletions = HtmlCompletions; +}); + +ace.define('ace/mode/handlebars_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/html_highlight_rules', 'ace/mode/xml_util'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var HtmlHighlightRules = acequire("./html_highlight_rules").HtmlHighlightRules; +var xmlUtil = acequire("./xml_util"); +function pop2(currentState, stack) { + stack.splice(0, 3); + return stack.shift() || "start"; +} +var HandlebarsHighlightRules = function() { + HtmlHighlightRules.call(this); + var hbs = { + regex : "(?={{)", + push : "handlebars" + } + for (var key in this.$rules) { + this.$rules[key].unshift(hbs); + } + this.$rules.handlebars = [{ + token : "comment.start", + regex : "{{!--", + push : [{ + token : "comment.end", + regex : "--}}", + next : pop2 + }, { + defaultToken : "comment" + }] + }, { + token : "comment.start", + regex : "{{!", + push : [{ + token : "comment.end", + regex : "}}", + next : pop2 + }, { + defaultToken : "comment" + }] + }, { + token : "storage.type.start", // begin section + regex : "{{[#\\^/&]?", + push : [{ + token : "storage.type.end", + regex : "}}", + next : pop2 + }, { + token : "variable.parameter", + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*" + }] + }, { + token : "support.function", // unescaped variable + regex : "{{{", + push : [{ + token : "support.function", + regex : "}}}", + next : pop2 + }, { + token : "variable.parameter", + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*" + }] + }]; + + this.normalizeRules(); +}; + +oop.inherits(HandlebarsHighlightRules, HtmlHighlightRules); + +exports.HandlebarsHighlightRules = HandlebarsHighlightRules; +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/haskell.js b/pitfall/pdfkit/node_modules/brace/mode/haskell.js new file mode 100644 index 00000000..da37d23f --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/haskell.js @@ -0,0 +1,361 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2012, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * Contributor(s): + * + * + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/haskell', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/haskell_highlight_rules', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var HaskellHighlightRules = acequire("./haskell_highlight_rules").HaskellHighlightRules; +var FoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = HaskellHighlightRules; + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + this.lineCommentStart = "--"; + this.blockComment = {start: "/*", end: "*/"}; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/haskell_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var HaskellHighlightRules = function() { + + this.$rules = { start: + [ { token: + [ 'punctuation.definition.entity.haskell', + 'keyword.operator.function.infix.haskell', + 'punctuation.definition.entity.haskell' ], + regex: '(`)([a-zA-Z_\']*?)(`)', + comment: 'In case this regex seems unusual for an infix operator, note that Haskell allows any ordinary function application (elem 4 [1..10]) to be rewritten as an infix expression (4 `elem` [1..10]).' }, + { token: 'constant.language.unit.haskell', regex: '\\(\\)' }, + { token: 'constant.language.empty-list.haskell', + regex: '\\[\\]' }, + { token: 'keyword.other.haskell', + regex: 'module', + push: + [ { token: 'keyword.other.haskell', regex: 'where', next: 'pop' }, + { include: '#module_name' }, + { include: '#module_exports' }, + { token: 'invalid', regex: '[a-z]+' }, + { defaultToken: 'meta.declaration.module.haskell' } ] }, + { token: 'keyword.other.haskell', + regex: '\\bclass\\b', + push: + [ { token: 'keyword.other.haskell', + regex: '\\bwhere\\b', + next: 'pop' }, + { token: 'support.class.prelude.haskell', + regex: '\\b(?:Monad|Functor|Eq|Ord|Read|Show|Num|(?:Frac|Ra)tional|Enum|Bounded|Real(?:Frac|Float)?|Integral|Floating)\\b' }, + { token: 'entity.other.inherited-class.haskell', + regex: '[A-Z][A-Za-z_\']*' }, + { token: 'variable.other.generic-type.haskell', + regex: '\\b[a-z][a-zA-Z0-9_\']*\\b' }, + { defaultToken: 'meta.declaration.class.haskell' } ] }, + { token: 'keyword.other.haskell', + regex: '\\binstance\\b', + push: + [ { token: 'keyword.other.haskell', + regex: '\\bwhere\\b|$', + next: 'pop' }, + { include: '#type_signature' }, + { defaultToken: 'meta.declaration.instance.haskell' } ] }, + { token: 'keyword.other.haskell', + regex: 'import', + push: + [ { token: 'meta.import.haskell', regex: '$|;', next: 'pop' }, + { token: 'keyword.other.haskell', regex: 'qualified|as|hiding' }, + { include: '#module_name' }, + { include: '#module_exports' }, + { defaultToken: 'meta.import.haskell' } ] }, + { token: [ 'keyword.other.haskell', 'meta.deriving.haskell' ], + regex: '(deriving)(\\s*\\()', + push: + [ { token: 'meta.deriving.haskell', regex: '\\)', next: 'pop' }, + { token: 'entity.other.inherited-class.haskell', + regex: '\\b[A-Z][a-zA-Z_\']*' }, + { defaultToken: 'meta.deriving.haskell' } ] }, + { token: 'keyword.other.haskell', + regex: '\\b(?:deriving|where|data|type|case|of|let|in|newtype|default)\\b' }, + { token: 'keyword.operator.haskell', regex: '\\binfix[lr]?\\b' }, + { token: 'keyword.control.haskell', + regex: '\\b(?:do|if|then|else)\\b' }, + { token: 'constant.numeric.float.haskell', + regex: '\\b(?:[0-9]+\\.[0-9]+(?:[eE][+-]?[0-9]+)?|[0-9]+[eE][+-]?[0-9]+)\\b', + comment: 'Floats are always decimal' }, + { token: 'constant.numeric.haskell', + regex: '\\b(?:[0-9]+|0(?:[xX][0-9a-fA-F]+|[oO][0-7]+))\\b' }, + { token: + [ 'meta.preprocessor.c', + 'punctuation.definition.preprocessor.c', + 'meta.preprocessor.c' ], + regex: '^(\\s*)(#)(\\s*\\w+)', + comment: 'In addition to Haskell\'s "native" syntax, GHC permits the C preprocessor to be run on a source file.' }, + { include: '#pragma' }, + { token: 'punctuation.definition.string.begin.haskell', + regex: '"', + push: + [ { token: 'punctuation.definition.string.end.haskell', + regex: '"', + next: 'pop' }, + { token: 'constant.character.escape.haskell', + regex: '\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\"\'\\&])' }, + { token: 'constant.character.escape.octal.haskell', + regex: '\\\\o[0-7]+|\\\\x[0-9A-Fa-f]+|\\\\[0-9]+' }, + { token: 'constant.character.escape.control.haskell', + regex: '\\^[A-Z@\\[\\]\\\\\\^_]' }, + { defaultToken: 'string.quoted.double.haskell' } ] }, + { token: + [ 'punctuation.definition.string.begin.haskell', + 'string.quoted.single.haskell', + 'constant.character.escape.haskell', + 'constant.character.escape.octal.haskell', + 'constant.character.escape.hexadecimal.haskell', + 'constant.character.escape.control.haskell', + 'punctuation.definition.string.end.haskell' ], + regex: '(\')(?:([\\ -\\[\\]-~])|(\\\\(?:NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\"\'\\&]))|(\\\\o[0-7]+)|(\\\\x[0-9A-Fa-f]+)|(\\^[A-Z@\\[\\]\\\\\\^_]))(\')' }, + { token: + [ 'meta.function.type-declaration.haskell', + 'entity.name.function.haskell', + 'meta.function.type-declaration.haskell', + 'keyword.other.double-colon.haskell' ], + regex: '^(\\s*)([a-z_][a-zA-Z0-9_\']*|\\([|!%$+\\-.,=]+\\))(\\s*)(::)', + push: + [ { token: 'meta.function.type-declaration.haskell', + regex: '$', + next: 'pop' }, + { include: '#type_signature' }, + { defaultToken: 'meta.function.type-declaration.haskell' } ] }, + { token: 'support.constant.haskell', + regex: '\\b(?:Just|Nothing|Left|Right|True|False|LT|EQ|GT|\\(\\)|\\[\\])\\b' }, + { token: 'constant.other.haskell', regex: '\\b[A-Z]\\w*\\b' }, + { include: '#comments' }, + { token: 'support.function.prelude.haskell', + regex: '\\b(?:abs|acos|acosh|all|and|any|appendFile|applyM|asTypeOf|asin|asinh|atan|atan2|atanh|break|catch|ceiling|compare|concat|concatMap|const|cos|cosh|curry|cycle|decodeFloat|div|divMod|drop|dropWhile|elem|encodeFloat|enumFrom|enumFromThen|enumFromThenTo|enumFromTo|error|even|exp|exponent|fail|filter|flip|floatDigits|floatRadix|floatRange|floor|fmap|foldl|foldl1|foldr|foldr1|fromEnum|fromInteger|fromIntegral|fromRational|fst|gcd|getChar|getContents|getLine|head|id|init|interact|ioError|isDenormalized|isIEEE|isInfinite|isNaN|isNegativeZero|iterate|last|lcm|length|lex|lines|log|logBase|lookup|map|mapM|mapM_|max|maxBound|maximum|maybe|min|minBound|minimum|mod|negate|not|notElem|null|odd|or|otherwise|pi|pred|print|product|properFraction|putChar|putStr|putStrLn|quot|quotRem|read|readFile|readIO|readList|readLn|readParen|reads|readsPrec|realToFrac|recip|rem|repeat|replicate|return|reverse|round|scaleFloat|scanl|scanl1|scanr|scanr1|seq|sequence|sequence_|show|showChar|showList|showParen|showString|shows|showsPrec|significand|signum|sin|sinh|snd|span|splitAt|sqrt|subtract|succ|sum|tail|take|takeWhile|tan|tanh|toEnum|toInteger|toRational|truncate|uncurry|undefined|unlines|until|unwords|unzip|unzip3|userError|words|writeFile|zip|zip3|zipWith|zipWith3)\\b' }, + { include: '#infix_op' }, + { token: 'keyword.operator.haskell', + regex: '[|!%$?~+:\\-.=\\\\]+', + comment: 'In case this regex seems overly general, note that Haskell permits the definition of new operators which can be nearly any string of punctuation characters, such as $%^&*.' }, + { token: 'punctuation.separator.comma.haskell', regex: ',' } ], + '#block_comment': + [ { token: 'punctuation.definition.comment.haskell', + regex: '\\{-(?!#)', + push: + [ { include: '#block_comment' }, + { token: 'punctuation.definition.comment.haskell', + regex: '-\\}', + next: 'pop' }, + { defaultToken: 'comment.block.haskell' } ] } ], + '#comments': + [ { token: 'punctuation.definition.comment.haskell', + regex: '--.*', + push_: + [ { token: 'comment.line.double-dash.haskell', + regex: '$', + next: 'pop' }, + { defaultToken: 'comment.line.double-dash.haskell' } ] }, + { include: '#block_comment' } ], + '#infix_op': + [ { token: 'entity.name.function.infix.haskell', + regex: '\\([|!%$+:\\-.=]+\\)|\\(,+\\)' } ], + '#module_exports': + [ { token: 'meta.declaration.exports.haskell', + regex: '\\(', + push: + [ { token: 'meta.declaration.exports.haskell', + regex: '\\)', + next: 'pop' }, + { token: 'entity.name.function.haskell', + regex: '\\b[a-z][a-zA-Z_\']*' }, + { token: 'storage.type.haskell', regex: '\\b[A-Z][A-Za-z_\']*' }, + { token: 'punctuation.separator.comma.haskell', regex: ',' }, + { include: '#infix_op' }, + { token: 'meta.other.unknown.haskell', + regex: '\\(.*?\\)', + comment: 'So named because I don\'t know what to call this.' }, + { defaultToken: 'meta.declaration.exports.haskell' } ] } ], + '#module_name': + [ { token: 'support.other.module.haskell', + regex: '[A-Z][A-Za-z._\']*' } ], + '#pragma': + [ { token: 'meta.preprocessor.haskell', + regex: '\\{-#', + push: + [ { token: 'meta.preprocessor.haskell', + regex: '#-\\}', + next: 'pop' }, + { token: 'keyword.other.preprocessor.haskell', + regex: '\\b(?:LANGUAGE|UNPACK|INLINE)\\b' }, + { defaultToken: 'meta.preprocessor.haskell' } ] } ], + '#type_signature': + [ { token: + [ 'meta.class-constraint.haskell', + 'entity.other.inherited-class.haskell', + 'meta.class-constraint.haskell', + 'variable.other.generic-type.haskell', + 'meta.class-constraint.haskell', + 'keyword.other.big-arrow.haskell' ], + regex: '(\\(\\s*)([A-Z][A-Za-z]*)(\\s+)([a-z][A-Za-z_\']*)(\\)\\s*)(=>)' }, + { include: '#pragma' }, + { token: 'keyword.other.arrow.haskell', regex: '->' }, + { token: 'keyword.other.big-arrow.haskell', regex: '=>' }, + { token: 'support.type.prelude.haskell', + regex: '\\b(?:Int(?:eger)?|Maybe|Either|Bool|Float|Double|Char|String|Ordering|ShowS|ReadS|FilePath|IO(?:Error)?)\\b' }, + { token: 'variable.other.generic-type.haskell', + regex: '\\b[a-z][a-zA-Z0-9_\']*\\b' }, + { token: 'storage.type.haskell', + regex: '\\b[A-Z][a-zA-Z0-9_\']*\\b' }, + { token: 'support.constant.unit.haskell', regex: '\\(\\)' }, + { include: '#comments' } ] } + + this.normalizeRules(); +}; + +HaskellHighlightRules.metaData = { fileTypes: [ 'hs' ], + keyEquivalent: '^~H', + name: 'Haskell', + scopeName: 'source.haskell' } + + +oop.inherits(HaskellHighlightRules, TextHighlightRules); + +exports.HaskellHighlightRules = HaskellHighlightRules; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/haxe.js b/pitfall/pdfkit/node_modules/brace/mode/haxe.js new file mode 100644 index 00000000..4820bcb5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/haxe.js @@ -0,0 +1,651 @@ +ace.define('ace/mode/haxe', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/haxe_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var HaxeHighlightRules = acequire("./haxe_highlight_rules").HaxeHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = HaxeHighlightRules; + + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); +ace.define('ace/mode/haxe_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); + +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var HaxeHighlightRules = function() { + + var keywords = ( + "break|case|cast|catch|class|continue|default|else|enum|extends|for|function|if|implements|import|in|inline|interface|new|override|package|private|public|return|static|super|switch|this|throw|trace|try|typedef|untyped|var|while|Array|Void|Bool|Int|UInt|Float|Dynamic|String|List|Hash|IntHash|Error|Unknown|Type|Std" + ); + + var buildinConstants = ( + "null|true|false" + ); + + var keywordMapper = this.createKeywordMapper({ + "variable.language": "this", + "keyword": keywords, + "constant.language": buildinConstants + }, "identifier"); + + this.$rules = { + "start" : [ + { + token : "comment", + regex : "\\/\\/.*$" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment" + }, { + token : "string.regexp", + regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : "constant.numeric", // hex + regex : "0[xX][0-9a-fA-F]+\\b" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "constant.language.boolean", + regex : "(?:true|false)\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator", + regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" + }, { + token : "punctuation.operator", + regex : "\\?|\\:|\\,|\\;|\\." + }, { + token : "paren.lparen", + regex : "[[({<]" + }, { + token : "paren.rparen", + regex : "[\\])}>]" + }, { + token : "text", + regex : "\\s+" + } + ], + "comment" : [ + { + token : "comment", // closing comment + regex : ".*?\\*\\/", + next : "start" + }, { + token : "comment", // comment spanning whole line + regex : ".+" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("start") ]); +}; + +oop.inherits(HaxeHighlightRules, TextHighlightRules); + +exports.HaxeHighlightRules = HaxeHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/html.js b/pitfall/pdfkit/node_modules/brace/mode/html.js new file mode 100644 index 00000000..68d268b0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/html.js @@ -0,0 +1,2353 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/html', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/css', 'ace/tokenizer', 'ace/mode/html_highlight_rules', 'ace/mode/behaviour/html', 'ace/mode/folding/html', 'ace/mode/html_completions'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var JavaScriptMode = acequire("./javascript").Mode; +var CssMode = acequire("./css").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var HtmlHighlightRules = acequire("./html_highlight_rules").HtmlHighlightRules; +var HtmlBehaviour = acequire("./behaviour/html").HtmlBehaviour; +var HtmlFoldMode = acequire("./folding/html").FoldMode; +var HtmlCompletions = acequire("./html_completions").HtmlCompletions; + +var Mode = function() { + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new HtmlBehaviour(); + this.$completer = new HtmlCompletions(); + + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + + this.foldingRules = new HtmlFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.blockComment = {start: ""}; + + this.getNextLineIndent = function(state, line, tab) { + return this.$getIndent(line); + }; + + this.checkOutdent = function(state, line, input) { + return false; + }; + + this.getCompletions = function(state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/javascript', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = JavaScriptHighlightRules; + + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/javascript"), "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + + worker.on("jslint", function(results) { + session.setAnnotations(results.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/javascript_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var JavaScriptHighlightRules = function() { + var keywordMapper = this.createKeywordMapper({ + "variable.language": + "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document" , // Pseudo + "keyword": + "const|yield|import|get|set|" + + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", + "storage.type": + "const|let|var|function", + "constant.language": + "null|Infinity|NaN|undefined", + "support.function": + "alert", + "constant.language.boolean": "true|false" + }, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; + + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-6][0-7]?|" + // oct + "37[0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + + this.$rules = { + "no_regex" : [ + { + token : "comment", + regex : "\\/\\/", + next : "line_comment" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : /\/\*/, + next : "comment" + }, { + token : "string", + regex : "'(?=.)", + next : "qstring" + }, { + token : "string", + regex : '"(?=.)', + next : "qqstring" + }, { + token : "constant.numeric", // hex + regex : /0[xX][0-9a-fA-F]+\b/ + }, { + token : "constant.numeric", // float + regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ + }, { + token : [ + "storage.type", "punctuation.operator", "support.function", + "punctuation.operator", "entity.name.function", "text","keyword.operator" + ], + regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "paren.lparen" + ], + regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "text", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : "keyword", + regex : "(?:" + kwBeforeRe + ")\\b", + next : "start" + }, { + token : ["punctuation.operator", "support.function"], + regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token : ["punctuation.operator", "support.function.dom"], + regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token : ["punctuation.operator", "support.constant"], + regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token : ["storage.type", "punctuation.operator", "support.function.firebug"], + regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/ + }, { + token : keywordMapper, + regex : identifierRe + }, { + token : "keyword.operator", + regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, + next : "start" + }, { + token : "punctuation.operator", + regex : /\?|\:|\,|\;|\./, + next : "start" + }, { + token : "paren.lparen", + regex : /[\[({]/, + next : "start" + }, { + token : "paren.rparen", + regex : /[\])}]/ + }, { + token : "keyword.operator", + regex : /\/=?/, + next : "start" + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment_regex_allowed" + }, { + token : "comment", + regex : "\\/\\/", + next : "line_comment_regex_allowed" + }, { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token : "text", + regex : "\\s+|^$", + next : "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/\\w*", + next: "no_regex" + }, { + token : "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token : "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/ + }, { + token : "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "function_arguments": [ + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "[, ]+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "comment_regex_allowed" : [ + {token : "comment", regex : "\\*\\/", next : "start"}, + {defaultToken : "comment"} + ], + "comment" : [ + {token : "comment", regex : "\\*\\/", next : "no_regex"}, + {defaultToken : "comment"} + ], + "line_comment_regex_allowed" : [ + {token : "comment", regex : "$|^", next : "start"}, + {defaultToken : "comment"} + ], + "line_comment" : [ + {token : "comment", regex : "$|^", next : "no_regex"}, + {defaultToken : "comment"} + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qqstring" + }, { + token : "string", + regex : '"|$', + next : "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qstring" + }, { + token : "string", + regex : "'|$", + next : "no_regex" + }, { + defaultToken: "string" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("no_regex") ]); +}; + +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); + +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); + +ace.define('ace/mode/css', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/behaviour/css', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var CssHighlightRules = acequire("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var CssBehaviour = acequire("./behaviour/css").CssBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.foldingRules = "cStyle"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/css"), "Worker"); + worker.attachToDocument(session.getDocument()); + + worker.on("csslint", function(e) { + session.setAnnotations(e.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; + +}); + +ace.define('ace/mode/css_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; + +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|acequired|root|target|valid|visited)\\b"; + +var CssHighlightRules = function() { + + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + + this.$rules = { + "start" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "@.*?{", + push: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "media" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "\\}", + next: "pop" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "comment" : [{ + token : "comment", + regex : "\\*\\/", + next : "pop" + }, { + defaultToken : "comment" + }], + + "ruleset" : [ + { + token : "paren.rparen", + regex : "\\}", + next: "pop" + }, { + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : ["constant.numeric", "keyword"], + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + }, { + token : "constant.numeric", + regex : numRe + }, { + token : "constant.numeric", // hex6 color + regex : "#[a-f0-9]{6}" + }, { + token : "constant.numeric", // hex3 color + regex : "#[a-f0-9]{3}" + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex : pseudoElements + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex : pseudoClasses + }, { + token : ["support.function", "string", "support.function"], + regex : "(url\\()(.*)(\\))" + }, { + token : keywordMapper, + regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + caseInsensitive: true + }] + }; + + this.normalizeRules(); +}; + +oop.inherits(CssHighlightRules, TextHighlightRules); + +exports.CssHighlightRules = CssHighlightRules; + +}); + +ace.define('ace/mode/behaviour/css', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + +var CssBehaviour = function () { + + this.inherit(CstyleBehaviour); + + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + } + } + if (!line.substring(cursor.column).match(/^\s*;/)) { + return { + text: ':;', + selection: [1, 1] + } + } + } + } + }); + + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column ++; + return range; + } + } + } + }); + + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + } + } + } + }); + +} +oop.inherits(CssBehaviour, CstyleBehaviour); + +exports.CssBehaviour = CssBehaviour; +}); + +ace.define('ace/mode/html_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var CssHighlightRules = acequire("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = acequire("./xml_highlight_rules").XmlHighlightRules; + +var tagMap = lang.createMap({ + a : 'anchor', + button : 'form', + form : 'form', + img : 'image', + input : 'form', + label : 'form', + option : 'form', + script : 'script', + select : 'form', + textarea : 'form', + style : 'style', + table : 'table', + tbody : 'table', + td : 'table', + tfoot : 'table', + th : 'table', + tr : 'table' +}); + +var HtmlHighlightRules = function() { + XmlHighlightRules.call(this); + + this.addRules({ + attributes: [{ + include : "space" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "keyword.operator.separator", + regex : "=", + push : [{ + include: "space" + }, { + token : "string", + regex : "[^<>='\"`\\s]+", + next : "pop" + }, { + token : "empty", + regex : "", + next : "pop" + }] + }, { + include : "string" + }], + tag: [{ + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation.begin", + "meta.tag.name" + (group ? "." + group : "")]; + }, + regex : "(<)([-_a-zA-Z0-9:]+)", + next: "start_tag_stuff" + }, { + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation.begin", + "meta.tag.name" + (group ? "." + group : "")]; + }, + regex : "(", next : "start"} + ], + end_tag_stuff: [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next : "start"} + ] + }); + + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); + + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; + +oop.inherits(HtmlHighlightRules, XmlHighlightRules); + +exports.HtmlHighlightRules = HtmlHighlightRules; +}); + +ace.define('ace/mode/xml_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var xmlUtil = acequire("./xml_util"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var XmlHighlightRules = function(normalize) { + this.$rules = { + start : [ + {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"}, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration" + }, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction" + }, + {token : "comment", regex : "<\\!--", next : "comment"}, + { + token : ["punctuation.doctype.begin", "meta.tag.doctype"], + regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype" + }, + {include : "tag"}, + {include : "reference"} + ], + + xml_declaration : [ + {include : "attributes"}, + {include : "instruction"} + ], + + instruction : [ + {token : "punctuation.instruction.end", regex : "\\?>", next : "start"} + ], + + doctype : [ + {include : "space"}, + {include : "string"}, + {token : "punctuation.doctype.end", regex : ">", next : "start"}, + {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"}, + {token : "punctuation.begin", regex : "\\[", push : "declarations"} + ], + + declarations : [{ + token : "text", + regex : "\\s+" + }, { + token: "punctuation.end", + regex: "]", + next: "pop" + }, { + token : ["punctuation.begin", "keyword"], + regex : "(<\\!)([-_a-zA-Z0-9]+)", + push : [{ + token : "text", + regex : "\\s+" + }, + { + token : "punctuation.end", + regex : ">", + next : "pop" + }, + {include : "string"}] + }], + + cdata : [ + {token : "string.end", regex : "\\]\\]>", next : "start"}, + {token : "text", regex : "\\s+"}, + {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"} + ], + + comment : [ + {token : "comment", regex : "-->", next : "start"}, + {defaultToken : "comment"} + ], + + tag : [{ + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)", + next: [ + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"} + ] + }, { + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(", next : "start"} + ] + }], + + space : [ + {token : "text", regex : "\\s+"} + ], + + reference : [{ + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, { + token : "invalid.illegal", regex : "&" + }], + + string: [{ + token : "string", + regex : "'", + push : "qstring_inner" + }, { + token : "string", + regex : '"', + push : "qqstring_inner" + }], + + qstring_inner: [ + {token : "string", regex: "'", next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + qqstring_inner: [ + {token : "string", regex: '"', next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + attributes: [{ + token : "entity.other.attribute-name", + regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" + }, { + token : "keyword.operator.separator", + regex : "=" + }, { + include : "space" + }, { + include : "string" + }] + }; + + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; + + +(function() { + + this.embedTagRules = function(HighlightRules, prefix, tag){ + this.$rules.tag.unshift({ + token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(<)(" + tag + ")", + next: [ + {include : "space"}, + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"} + ] + }); + + this.$rules[tag + "-end"] = [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next: "start", + onMatch : function(value, currentState, stack) { + stack.splice(0); + return this.token; + }} + ] + + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(" + }]); + }; + +}).call(TextHighlightRules.prototype); + +oop.inherits(XmlHighlightRules, TextHighlightRules); + +exports.XmlHighlightRules = XmlHighlightRules; +}); + +ace.define('ace/mode/xml_util', ["require", 'exports', 'module' ], function(acequire, exports, module) { + + +function string(state) { + return [{ + token : "string", + regex : '"', + next : state + "_qqstring" + }, { + token : "string", + regex : "'", + next : state + "_qstring" + }]; +} + +function multiLineString(quote, state) { + return [ + {token : "string", regex : quote, next : state}, + { + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, + {defaultToken : "string"} + ]; +} + +exports.tag = function(states, name, nextState, tagMap) { + states[name] = [{ + token : "text", + regex : "\\s+" + }, { + + token : !tagMap ? "meta.tag.tag-name" : function(value) { + if (tagMap[value]) + return "meta.tag.tag-name." + tagMap[value]; + else + return "meta.tag.tag-name"; + }, + regex : "[-_a-zA-Z0-9:]+", + next : name + "_embed_attribute_list" + }, { + token: "empty", + regex: "", + next : name + "_embed_attribute_list" + }]; + + states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list"); + states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list"); + + states[name + "_embed_attribute_list"] = [{ + token : "meta.tag.r", + regex : "/?>", + next : nextState + }, { + token : "keyword.operator", + regex : "=" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "text", + regex : "\\s+" + }].concat(string(name)); +}; + +}); + +ace.define('ace/mode/behaviour/html', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour/xml', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var XmlBehaviour = acequire("../behaviour/xml").XmlBehaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var voidElements = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr']; + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); + return hasType; +} + +var HtmlBehaviour = function () { + + this.inherit(XmlBehaviour); // Get xml behaviour + + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getCursorPosition(); + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken(); + + if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column) + return; + var atCursor = false; + if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text'))); + } else { + atCursor = true; + } + if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) { + return; + } + var element = token.value; + if (atCursor){ + var element = element.substring(0, position.column - token.start); + } + if (voidElements.indexOf(element) !== -1){ + return; + } + return { + text: '>' + '', + selection: [1, 1] + } + } + }); +} +oop.inherits(HtmlBehaviour, XmlBehaviour); + +exports.HtmlBehaviour = HtmlBehaviour; +}); + +ace.define('ace/mode/behaviour/xml', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); + return hasType; +} + +var XmlBehaviour = function () { + + this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour + + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getCursorPosition(); + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken(); + + if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column) + return; + var atCursor = false; + if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text'))); + } else { + atCursor = true; + } + if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) { + return; + } + var tag = token.value; + if (atCursor){ + var tag = tag.substring(0, position.column - token.start); + } + + return { + text: '>' + '', + selection: [1, 1] + } + } + }); + + this.add('autoindent', 'insertion', function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var rightChars = line.substring(cursor.column, cursor.column + 2); + if (rightChars == '?)/; + this._parseTag = function(tag) { + + var match = tag.match(this.tagRe); + var column = 0; + + return { + value: tag, + match: match ? match[2] : "", + closing: match ? !!match[3] : false, + selfClosing: match ? !!match[5] || match[2] == "/>" : false, + tagName: match ? match[4] : "", + column: match[1] ? column + match[1].length : column + }; + }; + this._readTagForward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var value = ""; + var start; + + do { + if (token.type.lastIndexOf("meta.tag", 0) === 0) { + if (!start) { + var start = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + }; + } + value += token.value; + if (value.indexOf(">") !== -1) { + var tag = this._parseTag(value); + tag.start = start; + tag.end = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + token.value.length + }; + iterator.stepForward(); + return tag; + } + } + } while(token = iterator.stepForward()); + + return null; + }; + + this._readTagBackward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var value = ""; + var end; + + do { + if (token.type.lastIndexOf("meta.tag", 0) === 0) { + if (!end) { + end = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + token.value.length + }; + } + value = token.value + value; + if (value.indexOf("<") !== -1) { + var tag = this._parseTag(value); + tag.end = end; + tag.start = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + }; + iterator.stepBackward(); + return tag; + } + } + } while(token = iterator.stepBackward()); + + return null; + }; + + this._pop = function(stack, tag) { + while (stack.length) { + + var top = stack[stack.length-1]; + if (!tag || top.tagName == tag.tagName) { + return stack.pop(); + } + else if (this.voidElements[tag.tagName]) { + return; + } + else if (this.voidElements[top.tagName]) { + stack.pop(); + continue; + } else { + return null; + } + } + }; + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + + if (!firstTag.match) + return null; + + var isBackward = firstTag.closing || firstTag.selfClosing; + var stack = []; + var tag; + + if (!isBackward) { + var iterator = new TokenIterator(session, row, firstTag.column); + var start = { + row: row, + column: firstTag.column + firstTag.tagName.length + 2 + }; + while (tag = this._readTagForward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) + return Range.fromPoints(start, tag.start); + } + else { + stack.push(tag) + } + } + } + else { + var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length); + var end = { + row: row, + column: firstTag.column + }; + + while (tag = this._readTagBackward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (!tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) { + tag.start.column += tag.tagName.length + 2; + return Range.fromPoints(tag.start, end); + } + } + else { + stack.push(tag) + } + } + } + + }; + +}).call(FoldMode.prototype); + +}); + +ace.define('ace/mode/html_completions', ["require", 'exports', 'module' , 'ace/token_iterator'], function(acequire, exports, module) { + + +var TokenIterator = acequire("../token_iterator").TokenIterator; + +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; + +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; + +var globalAttributes = commonAttributes.concat(eventAttributes); + +var attributeMap = { + "html": ["manifest"], + "head": [], + "title": [], + "base": ["href", "target"], + "link": ["href", "hreflang", "rel", "media", "type", "sizes"], + "meta": ["http-equiv", "name", "content", "charset"], + "style": ["type", "media", "scoped"], + "script": ["charset", "type", "src", "defer", "async"], + "noscript": ["href"], + "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"], + "section": [], + "nav": [], + "article": ["pubdate"], + "aside": [], + "h1": [], + "h2": [], + "h3": [], + "h4": [], + "h5": [], + "h6": [], + "header": [], + "footer": [], + "address": [], + "main": [], + "p": [], + "hr": [], + "pre": [], + "blockquote": ["cite"], + "ol": ["start", "reversed"], + "ul": [], + "li": ["value"], + "dl": [], + "dt": [], + "dd": [], + "figure": [], + "figcaption": [], + "div": [], + "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"], + "em": [], + "strong": [], + "small": [], + "s": [], + "cite": [], + "q": ["cite"], + "dfn": [], + "abbr": [], + "data": [], + "time": ["datetime"], + "code": [], + "var": [], + "samp": [], + "kbd": [], + "sub": [], + "sup": [], + "i": [], + "b": [], + "u": [], + "mark": [], + "ruby": [], + "rt": [], + "rp": [], + "bdi": [], + "bdo": [], + "span": [], + "br": [], + "wbr": [], + "ins": ["cite", "datetime"], + "del": ["cite", "datetime"], + "img": ["alt", "src", "height", "width", "usemap", "ismap"], + "iframe": ["name", "src", "height", "width", "sandbox", "seamless"], + "embed": ["src", "height", "width", "type"], + "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"], + "param": ["name", "value"], + "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"], + "audio": ["src", "autobuffer", "autoplay", "loop", "controls"], + "source": ["src", "type", "media"], + "track": ["kind", "src", "srclang", "label", "default"], + "canvas": ["width", "height"], + "map": ["name"], + "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"], + "svg": [], + "math": [], + "table": ["summary"], + "caption": [], + "colgroup": ["span"], + "col": ["span"], + "tbody": [], + "thead": [], + "tfoot": [], + "tr": [], + "td": ["headers", "rowspan", "colspan"], + "th": ["headers", "rowspan", "colspan", "scope"], + "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"], + "fieldset": ["disabled", "form", "name"], + "legend": [], + "label": ["form", "for"], + "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "acequired", "size", "src", "step", "width", "files", "value"], + "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"], + "select": ["autofocus", "disabled", "form", "multiple", "name", "size"], + "datalist": [], + "optgroup": ["disabled", "label"], + "option": ["disabled", "selected", "label", "value"], + "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "acequired", "rows", "cols", "wrap"], + "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"], + "output": ["for", "form", "name"], + "progress": ["value", "max"], + "meter": ["value", "min", "max", "low", "high", "optimum"], + "details": ["open"], + "summary": [], + "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"], + "menu": ["type", "label"], + "dialog": ["open"] +}; + +var allElements = Object.keys(attributeMap); + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); +} + +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + if (!token || !hasType(token, 'tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'operator') || hasType(token, 'attribute-name') || hasType(token, 'text'))); + } + if (token && hasType(token, 'tag-name') && !iterator.stepBackward().value.match('/')) + return token.value; +} + +var HtmlCompletions = function() { + +}; + +(function() { + + this.getCompletions = function(state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + + if (!token) + return []; + if (hasType(token, "tag-name") || (token.value == '<' && hasType(token, "text"))) + return this.getTagCompletions(state, session, pos, prefix); + if (hasType(token, 'text') || hasType(token, 'attribute-name')) + return this.getAttributeCompetions(state, session, pos, prefix); + + return []; + }; + + this.getTagCompletions = function(state, session, pos, prefix) { + var elements = allElements; + if (prefix) { + elements = elements.filter(function(element){ + return element.indexOf(prefix) === 0; + }); + } + return elements.map(function(element){ + return { + value: element, + meta: "tag" + }; + }); + }; + + this.getAttributeCompetions = function(state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(attributeMap[tagName]); + } + if (prefix) { + attributes = attributes.filter(function(attribute){ + return attribute.indexOf(prefix) === 0; + }); + } + return attributes.map(function(attribute){ + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute" + }; + }); + }; + +}).call(HtmlCompletions.prototype); + +exports.HtmlCompletions = HtmlCompletions; +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/html_completions.js b/pitfall/pdfkit/node_modules/brace/mode/html_completions.js new file mode 100644 index 00000000..4b50fdce --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/html_completions.js @@ -0,0 +1,309 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/html_completions', ["require", 'exports', 'module' , 'ace/token_iterator'], function(acequire, exports, module) { + + +var TokenIterator = acequire("../token_iterator").TokenIterator; + +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; + +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; + +var globalAttributes = commonAttributes.concat(eventAttributes); + +var attributeMap = { + "html": ["manifest"], + "head": [], + "title": [], + "base": ["href", "target"], + "link": ["href", "hreflang", "rel", "media", "type", "sizes"], + "meta": ["http-equiv", "name", "content", "charset"], + "style": ["type", "media", "scoped"], + "script": ["charset", "type", "src", "defer", "async"], + "noscript": ["href"], + "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"], + "section": [], + "nav": [], + "article": ["pubdate"], + "aside": [], + "h1": [], + "h2": [], + "h3": [], + "h4": [], + "h5": [], + "h6": [], + "header": [], + "footer": [], + "address": [], + "main": [], + "p": [], + "hr": [], + "pre": [], + "blockquote": ["cite"], + "ol": ["start", "reversed"], + "ul": [], + "li": ["value"], + "dl": [], + "dt": [], + "dd": [], + "figure": [], + "figcaption": [], + "div": [], + "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"], + "em": [], + "strong": [], + "small": [], + "s": [], + "cite": [], + "q": ["cite"], + "dfn": [], + "abbr": [], + "data": [], + "time": ["datetime"], + "code": [], + "var": [], + "samp": [], + "kbd": [], + "sub": [], + "sup": [], + "i": [], + "b": [], + "u": [], + "mark": [], + "ruby": [], + "rt": [], + "rp": [], + "bdi": [], + "bdo": [], + "span": [], + "br": [], + "wbr": [], + "ins": ["cite", "datetime"], + "del": ["cite", "datetime"], + "img": ["alt", "src", "height", "width", "usemap", "ismap"], + "iframe": ["name", "src", "height", "width", "sandbox", "seamless"], + "embed": ["src", "height", "width", "type"], + "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"], + "param": ["name", "value"], + "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"], + "audio": ["src", "autobuffer", "autoplay", "loop", "controls"], + "source": ["src", "type", "media"], + "track": ["kind", "src", "srclang", "label", "default"], + "canvas": ["width", "height"], + "map": ["name"], + "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"], + "svg": [], + "math": [], + "table": ["summary"], + "caption": [], + "colgroup": ["span"], + "col": ["span"], + "tbody": [], + "thead": [], + "tfoot": [], + "tr": [], + "td": ["headers", "rowspan", "colspan"], + "th": ["headers", "rowspan", "colspan", "scope"], + "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"], + "fieldset": ["disabled", "form", "name"], + "legend": [], + "label": ["form", "for"], + "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "acequired", "size", "src", "step", "width", "files", "value"], + "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"], + "select": ["autofocus", "disabled", "form", "multiple", "name", "size"], + "datalist": [], + "optgroup": ["disabled", "label"], + "option": ["disabled", "selected", "label", "value"], + "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "acequired", "rows", "cols", "wrap"], + "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"], + "output": ["for", "form", "name"], + "progress": ["value", "max"], + "meter": ["value", "min", "max", "low", "high", "optimum"], + "details": ["open"], + "summary": [], + "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"], + "menu": ["type", "label"], + "dialog": ["open"] +}; + +var allElements = Object.keys(attributeMap); + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); +} + +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + if (!token || !hasType(token, 'tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'operator') || hasType(token, 'attribute-name') || hasType(token, 'text'))); + } + if (token && hasType(token, 'tag-name') && !iterator.stepBackward().value.match('/')) + return token.value; +} + +var HtmlCompletions = function() { + +}; + +(function() { + + this.getCompletions = function(state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + + if (!token) + return []; + if (hasType(token, "tag-name") || (token.value == '<' && hasType(token, "text"))) + return this.getTagCompletions(state, session, pos, prefix); + if (hasType(token, 'text') || hasType(token, 'attribute-name')) + return this.getAttributeCompetions(state, session, pos, prefix); + + return []; + }; + + this.getTagCompletions = function(state, session, pos, prefix) { + var elements = allElements; + if (prefix) { + elements = elements.filter(function(element){ + return element.indexOf(prefix) === 0; + }); + } + return elements.map(function(element){ + return { + value: element, + meta: "tag" + }; + }); + }; + + this.getAttributeCompetions = function(state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(attributeMap[tagName]); + } + if (prefix) { + attributes = attributes.filter(function(attribute){ + return attribute.indexOf(prefix) === 0; + }); + } + return attributes.map(function(attribute){ + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute" + }; + }); + }; + +}).call(HtmlCompletions.prototype); + +exports.HtmlCompletions = HtmlCompletions; +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/html_ruby.js b/pitfall/pdfkit/node_modules/brace/mode/html_ruby.js new file mode 100644 index 00000000..830259e4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/html_ruby.js @@ -0,0 +1,2812 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2012, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + + +ace.define('ace/mode/html_ruby', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/tokenizer', 'ace/mode/html_ruby_highlight_rules', 'ace/mode/html', 'ace/mode/javascript', 'ace/mode/css', 'ace/mode/ruby'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var Tokenizer = acequire("../tokenizer").Tokenizer; +var HtmlRubyHighlightRules = acequire("./html_ruby_highlight_rules").HtmlRubyHighlightRules; +var HtmlMode = acequire("./html").Mode; +var JavaScriptMode = acequire("./javascript").Mode; +var CssMode = acequire("./css").Mode; +var RubyMode = acequire("./ruby").Mode; + +var Mode = function() { + HtmlMode.call(this); + this.HighlightRules = HtmlRubyHighlightRules; + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode, + "ruby-": RubyMode + }); +}; +oop.inherits(Mode, HtmlMode); + +(function() { + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/html_ruby_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/html_highlight_rules', 'ace/mode/ruby_highlight_rules'], function(acequire, exports, module) { + + + var oop = acequire("../lib/oop"); + var HtmlHighlightRules = acequire("./html_highlight_rules").HtmlHighlightRules; + var RubyHighlightRules = acequire("./ruby_highlight_rules").RubyHighlightRules; + + var HtmlRubyHighlightRules = function() { + HtmlHighlightRules.call(this); + + var startRules = [ + { + regex: "<%%|%%>", + token: "constant.language.escape" + }, { + token : "comment.start.erb", + regex : "<%#", + push : [{ + token : "comment.end.erb", + regex: "%>", + next: "pop", + defaultToken:"comment" + }] + }, { + token : "support.ruby_tag", + regex : "<%+(?!>)[-=]?", + push : "ruby-start" + } + ]; + + var endRules = [ + { + token : "support.ruby_tag", + regex : "%>", + next : "pop" + }, { + token: "comment", + regex: "#(?:[^%]|%[^>])*" + } + ]; + + for (var key in this.$rules) + this.$rules[key].unshift.apply(this.$rules[key], startRules); + + this.embedRules(RubyHighlightRules, "ruby-", endRules, ["start"]); + + this.normalizeRules(); + }; + + + oop.inherits(HtmlRubyHighlightRules, HtmlHighlightRules); + + exports.HtmlRubyHighlightRules = HtmlRubyHighlightRules; +}); + +ace.define('ace/mode/html_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var CssHighlightRules = acequire("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = acequire("./xml_highlight_rules").XmlHighlightRules; + +var tagMap = lang.createMap({ + a : 'anchor', + button : 'form', + form : 'form', + img : 'image', + input : 'form', + label : 'form', + option : 'form', + script : 'script', + select : 'form', + textarea : 'form', + style : 'style', + table : 'table', + tbody : 'table', + td : 'table', + tfoot : 'table', + th : 'table', + tr : 'table' +}); + +var HtmlHighlightRules = function() { + XmlHighlightRules.call(this); + + this.addRules({ + attributes: [{ + include : "space" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "keyword.operator.separator", + regex : "=", + push : [{ + include: "space" + }, { + token : "string", + regex : "[^<>='\"`\\s]+", + next : "pop" + }, { + token : "empty", + regex : "", + next : "pop" + }] + }, { + include : "string" + }], + tag: [{ + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation.begin", + "meta.tag.name" + (group ? "." + group : "")]; + }, + regex : "(<)([-_a-zA-Z0-9:]+)", + next: "start_tag_stuff" + }, { + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation.begin", + "meta.tag.name" + (group ? "." + group : "")]; + }, + regex : "(", next : "start"} + ], + end_tag_stuff: [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next : "start"} + ] + }); + + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); + + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; + +oop.inherits(HtmlHighlightRules, XmlHighlightRules); + +exports.HtmlHighlightRules = HtmlHighlightRules; +}); + +ace.define('ace/mode/css_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; + +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|acequired|root|target|valid|visited)\\b"; + +var CssHighlightRules = function() { + + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + + this.$rules = { + "start" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "@.*?{", + push: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "media" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "\\}", + next: "pop" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "comment" : [{ + token : "comment", + regex : "\\*\\/", + next : "pop" + }, { + defaultToken : "comment" + }], + + "ruleset" : [ + { + token : "paren.rparen", + regex : "\\}", + next: "pop" + }, { + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : ["constant.numeric", "keyword"], + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + }, { + token : "constant.numeric", + regex : numRe + }, { + token : "constant.numeric", // hex6 color + regex : "#[a-f0-9]{6}" + }, { + token : "constant.numeric", // hex3 color + regex : "#[a-f0-9]{3}" + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex : pseudoElements + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex : pseudoClasses + }, { + token : ["support.function", "string", "support.function"], + regex : "(url\\()(.*)(\\))" + }, { + token : keywordMapper, + regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + caseInsensitive: true + }] + }; + + this.normalizeRules(); +}; + +oop.inherits(CssHighlightRules, TextHighlightRules); + +exports.CssHighlightRules = CssHighlightRules; + +}); + +ace.define('ace/mode/javascript_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var JavaScriptHighlightRules = function() { + var keywordMapper = this.createKeywordMapper({ + "variable.language": + "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document" , // Pseudo + "keyword": + "const|yield|import|get|set|" + + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", + "storage.type": + "const|let|var|function", + "constant.language": + "null|Infinity|NaN|undefined", + "support.function": + "alert", + "constant.language.boolean": "true|false" + }, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; + + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-6][0-7]?|" + // oct + "37[0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + + this.$rules = { + "no_regex" : [ + { + token : "comment", + regex : "\\/\\/", + next : "line_comment" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : /\/\*/, + next : "comment" + }, { + token : "string", + regex : "'(?=.)", + next : "qstring" + }, { + token : "string", + regex : '"(?=.)', + next : "qqstring" + }, { + token : "constant.numeric", // hex + regex : /0[xX][0-9a-fA-F]+\b/ + }, { + token : "constant.numeric", // float + regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ + }, { + token : [ + "storage.type", "punctuation.operator", "support.function", + "punctuation.operator", "entity.name.function", "text","keyword.operator" + ], + regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "paren.lparen" + ], + regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "text", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : "keyword", + regex : "(?:" + kwBeforeRe + ")\\b", + next : "start" + }, { + token : ["punctuation.operator", "support.function"], + regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token : ["punctuation.operator", "support.function.dom"], + regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token : ["punctuation.operator", "support.constant"], + regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token : ["storage.type", "punctuation.operator", "support.function.firebug"], + regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/ + }, { + token : keywordMapper, + regex : identifierRe + }, { + token : "keyword.operator", + regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, + next : "start" + }, { + token : "punctuation.operator", + regex : /\?|\:|\,|\;|\./, + next : "start" + }, { + token : "paren.lparen", + regex : /[\[({]/, + next : "start" + }, { + token : "paren.rparen", + regex : /[\])}]/ + }, { + token : "keyword.operator", + regex : /\/=?/, + next : "start" + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment_regex_allowed" + }, { + token : "comment", + regex : "\\/\\/", + next : "line_comment_regex_allowed" + }, { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token : "text", + regex : "\\s+|^$", + next : "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/\\w*", + next: "no_regex" + }, { + token : "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token : "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/ + }, { + token : "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "function_arguments": [ + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "[, ]+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "comment_regex_allowed" : [ + {token : "comment", regex : "\\*\\/", next : "start"}, + {defaultToken : "comment"} + ], + "comment" : [ + {token : "comment", regex : "\\*\\/", next : "no_regex"}, + {defaultToken : "comment"} + ], + "line_comment_regex_allowed" : [ + {token : "comment", regex : "$|^", next : "start"}, + {defaultToken : "comment"} + ], + "line_comment" : [ + {token : "comment", regex : "$|^", next : "no_regex"}, + {defaultToken : "comment"} + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qqstring" + }, { + token : "string", + regex : '"|$', + next : "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qstring" + }, { + token : "string", + regex : "'|$", + next : "no_regex" + }, { + defaultToken: "string" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("no_regex") ]); +}; + +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); + +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define('ace/mode/xml_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var xmlUtil = acequire("./xml_util"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var XmlHighlightRules = function(normalize) { + this.$rules = { + start : [ + {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"}, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration" + }, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction" + }, + {token : "comment", regex : "<\\!--", next : "comment"}, + { + token : ["punctuation.doctype.begin", "meta.tag.doctype"], + regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype" + }, + {include : "tag"}, + {include : "reference"} + ], + + xml_declaration : [ + {include : "attributes"}, + {include : "instruction"} + ], + + instruction : [ + {token : "punctuation.instruction.end", regex : "\\?>", next : "start"} + ], + + doctype : [ + {include : "space"}, + {include : "string"}, + {token : "punctuation.doctype.end", regex : ">", next : "start"}, + {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"}, + {token : "punctuation.begin", regex : "\\[", push : "declarations"} + ], + + declarations : [{ + token : "text", + regex : "\\s+" + }, { + token: "punctuation.end", + regex: "]", + next: "pop" + }, { + token : ["punctuation.begin", "keyword"], + regex : "(<\\!)([-_a-zA-Z0-9]+)", + push : [{ + token : "text", + regex : "\\s+" + }, + { + token : "punctuation.end", + regex : ">", + next : "pop" + }, + {include : "string"}] + }], + + cdata : [ + {token : "string.end", regex : "\\]\\]>", next : "start"}, + {token : "text", regex : "\\s+"}, + {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"} + ], + + comment : [ + {token : "comment", regex : "-->", next : "start"}, + {defaultToken : "comment"} + ], + + tag : [{ + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)", + next: [ + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"} + ] + }, { + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(", next : "start"} + ] + }], + + space : [ + {token : "text", regex : "\\s+"} + ], + + reference : [{ + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, { + token : "invalid.illegal", regex : "&" + }], + + string: [{ + token : "string", + regex : "'", + push : "qstring_inner" + }, { + token : "string", + regex : '"', + push : "qqstring_inner" + }], + + qstring_inner: [ + {token : "string", regex: "'", next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + qqstring_inner: [ + {token : "string", regex: '"', next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + attributes: [{ + token : "entity.other.attribute-name", + regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" + }, { + token : "keyword.operator.separator", + regex : "=" + }, { + include : "space" + }, { + include : "string" + }] + }; + + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; + + +(function() { + + this.embedTagRules = function(HighlightRules, prefix, tag){ + this.$rules.tag.unshift({ + token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(<)(" + tag + ")", + next: [ + {include : "space"}, + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"} + ] + }); + + this.$rules[tag + "-end"] = [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next: "start", + onMatch : function(value, currentState, stack) { + stack.splice(0); + return this.token; + }} + ] + + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(" + }]); + }; + +}).call(TextHighlightRules.prototype); + +oop.inherits(XmlHighlightRules, TextHighlightRules); + +exports.XmlHighlightRules = XmlHighlightRules; +}); + +ace.define('ace/mode/xml_util', ["require", 'exports', 'module' ], function(acequire, exports, module) { + + +function string(state) { + return [{ + token : "string", + regex : '"', + next : state + "_qqstring" + }, { + token : "string", + regex : "'", + next : state + "_qstring" + }]; +} + +function multiLineString(quote, state) { + return [ + {token : "string", regex : quote, next : state}, + { + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, + {defaultToken : "string"} + ]; +} + +exports.tag = function(states, name, nextState, tagMap) { + states[name] = [{ + token : "text", + regex : "\\s+" + }, { + + token : !tagMap ? "meta.tag.tag-name" : function(value) { + if (tagMap[value]) + return "meta.tag.tag-name." + tagMap[value]; + else + return "meta.tag.tag-name"; + }, + regex : "[-_a-zA-Z0-9:]+", + next : name + "_embed_attribute_list" + }, { + token: "empty", + regex: "", + next : name + "_embed_attribute_list" + }]; + + states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list"); + states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list"); + + states[name + "_embed_attribute_list"] = [{ + token : "meta.tag.r", + regex : "/?>", + next : nextState + }, { + token : "keyword.operator", + regex : "=" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "text", + regex : "\\s+" + }].concat(string(name)); +}; + +}); + +ace.define('ace/mode/ruby_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var constantOtherSymbol = exports.constantOtherSymbol = { + token : "constant.other.symbol.ruby", // symbol + regex : "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?" +}; + +var qString = exports.qString = { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" +}; + +var qqString = exports.qqString = { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' +}; + +var tString = exports.tString = { + token : "string", // backtick string + regex : "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]" +}; + +var constantNumericHex = exports.constantNumericHex = { + token : "constant.numeric", // hex + regex : "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b" +}; + +var constantNumericFloat = exports.constantNumericFloat = { + token : "constant.numeric", // float + regex : "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b" +}; + +var RubyHighlightRules = function() { + + var builtinFunctions = ( + "abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|" + + "assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|" + + "assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|" + + "assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|" + + "assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|" + + "assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|" + + "attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|" + + "caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|" + + "exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|" + + "gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|" + + "link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|" + + "p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|" + + "raw|readline|readlines|redirect?|request_via_redirect|acequire|scan|select|" + + "set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|" + + "throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|" + + "render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|" + + "content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|" + + "fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|" + + "time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|" + + "select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|" + + "file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|" + + "protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|" + + "send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|" + + "validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|" + + "validates_inclusion_of|validates_numericality_of|validates_with|validates_each|" + + "authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|" + + "filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|" + + "translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|" + + "cache|expire_fragment|expire_cache_for|observe|cache_sweeper|" + + "has_many|has_one|belongs_to|has_and_belongs_to_many" + ); + + var keywords = ( + "alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|" + + "__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|" + + "redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield" + ); + + var buildinConstants = ( + "true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|" + + "RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING" + ); + + var builtinVariables = ( + "\$DEBUG|\$defout|\$FILENAME|\$LOAD_PATH|\$SAFE|\$stdin|\$stdout|\$stderr|\$VERBOSE|" + + "$!|root_url|flash|session|cookies|params|request|response|logger|self" + ); + + var keywordMapper = this.$keywords = this.createKeywordMapper({ + "keyword": keywords, + "constant.language": buildinConstants, + "variable.language": builtinVariables, + "support.function": builtinFunctions, + "invalid.deprecated": "debugger" // TODO is this a remnant from js mode? + }, "identifier"); + + this.$rules = { + "start" : [ + { + token : "comment", + regex : "#.*$" + }, { + token : "comment", // multi line comment + regex : "^=begin(?:$|\\s.*$)", + next : "comment" + }, { + token : "string.regexp", + regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" + }, + + qString, + qqString, + tString, + + { + token : "text", // namespaces aren't symbols + regex : "::" + }, { + token : "variable.instance", // instance variable + regex : "@{1,2}[a-zA-Z_\\d]+" + }, { + token : "support.class", // class name + regex : "[A-Z][a-zA-Z_\\d]+" + }, + + constantOtherSymbol, + constantNumericHex, + constantNumericFloat, + + { + token : "constant.language.boolean", + regex : "(?:true|false)\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "punctuation.separator.key-value", + regex : "=>" + }, { + stateName: "heredoc", + onMatch : function(value, currentState, stack) { + var next = value[2] == '-' ? "indentedHeredoc" : "heredoc"; + var tokens = value.split(this.splitRegex); + stack.push(next, tokens[3]); + return [ + {type:"constant", value: tokens[1]}, + {type:"string", value: tokens[2]}, + {type:"support.class", value: tokens[3]}, + {type:"string", value: tokens[4]} + ]; + }, + regex : "(<<-?)(['\"`]?)([\\w]+)(['\"`]?)", + rules: { + heredoc: [{ + onMatch: function(value, currentState, stack) { + if (value === stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack[0] || "start"; + return "support.class"; + } + this.next = ""; + return "string"; + }, + regex: ".*$", + next: "start" + }], + indentedHeredoc: [{ + token: "string", + regex: "^ +" + }, { + onMatch: function(value, currentState, stack) { + if (value === stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack[0] || "start"; + return "support.class"; + } + this.next = ""; + return "string"; + }, + regex: ".*$", + next: "start" + }] + } + }, { + regex : "$", + token : "empty", + next : function(currentState, stack) { + if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc") + return stack[0]; + return currentState; + } + }, { + token : "keyword.operator", + regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" + }, { + token : "paren.lparen", + regex : "[[({]" + }, { + token : "paren.rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + } + ], + "comment" : [ + { + token : "comment", // closing comment + regex : "^=end(?:$|\\s.*$)", + next : "start" + }, { + token : "comment", // comment spanning whole line + regex : ".+" + } + ] + }; + + this.normalizeRules(); +}; + +oop.inherits(RubyHighlightRules, TextHighlightRules); + +exports.RubyHighlightRules = RubyHighlightRules; +}); + +ace.define('ace/mode/html', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/css', 'ace/tokenizer', 'ace/mode/html_highlight_rules', 'ace/mode/behaviour/html', 'ace/mode/folding/html', 'ace/mode/html_completions'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var JavaScriptMode = acequire("./javascript").Mode; +var CssMode = acequire("./css").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var HtmlHighlightRules = acequire("./html_highlight_rules").HtmlHighlightRules; +var HtmlBehaviour = acequire("./behaviour/html").HtmlBehaviour; +var HtmlFoldMode = acequire("./folding/html").FoldMode; +var HtmlCompletions = acequire("./html_completions").HtmlCompletions; + +var Mode = function() { + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new HtmlBehaviour(); + this.$completer = new HtmlCompletions(); + + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + + this.foldingRules = new HtmlFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.blockComment = {start: ""}; + + this.getNextLineIndent = function(state, line, tab) { + return this.$getIndent(line); + }; + + this.checkOutdent = function(state, line, input) { + return false; + }; + + this.getCompletions = function(state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/javascript', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = JavaScriptHighlightRules; + + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/javascript"), "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + + worker.on("jslint", function(results) { + session.setAnnotations(results.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); + +ace.define('ace/mode/css', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/behaviour/css', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var CssHighlightRules = acequire("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var CssBehaviour = acequire("./behaviour/css").CssBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.foldingRules = "cStyle"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/css"), "Worker"); + worker.attachToDocument(session.getDocument()); + + worker.on("csslint", function(e) { + session.setAnnotations(e.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; + +}); + +ace.define('ace/mode/behaviour/css', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + +var CssBehaviour = function () { + + this.inherit(CstyleBehaviour); + + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + } + } + if (!line.substring(cursor.column).match(/^\s*;/)) { + return { + text: ':;', + selection: [1, 1] + } + } + } + } + }); + + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column ++; + return range; + } + } + } + }); + + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + } + } + } + }); + +} +oop.inherits(CssBehaviour, CstyleBehaviour); + +exports.CssBehaviour = CssBehaviour; +}); + +ace.define('ace/mode/behaviour/html', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour/xml', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var XmlBehaviour = acequire("../behaviour/xml").XmlBehaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var voidElements = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr']; + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); + return hasType; +} + +var HtmlBehaviour = function () { + + this.inherit(XmlBehaviour); // Get xml behaviour + + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getCursorPosition(); + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken(); + + if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column) + return; + var atCursor = false; + if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text'))); + } else { + atCursor = true; + } + if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) { + return; + } + var element = token.value; + if (atCursor){ + var element = element.substring(0, position.column - token.start); + } + if (voidElements.indexOf(element) !== -1){ + return; + } + return { + text: '>' + '', + selection: [1, 1] + } + } + }); +} +oop.inherits(HtmlBehaviour, XmlBehaviour); + +exports.HtmlBehaviour = HtmlBehaviour; +}); + +ace.define('ace/mode/behaviour/xml', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); + return hasType; +} + +var XmlBehaviour = function () { + + this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour + + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getCursorPosition(); + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken(); + + if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column) + return; + var atCursor = false; + if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text'))); + } else { + atCursor = true; + } + if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) { + return; + } + var tag = token.value; + if (atCursor){ + var tag = tag.substring(0, position.column - token.start); + } + + return { + text: '>' + '', + selection: [1, 1] + } + } + }); + + this.add('autoindent', 'insertion', function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var rightChars = line.substring(cursor.column, cursor.column + 2); + if (rightChars == '?)/; + this._parseTag = function(tag) { + + var match = tag.match(this.tagRe); + var column = 0; + + return { + value: tag, + match: match ? match[2] : "", + closing: match ? !!match[3] : false, + selfClosing: match ? !!match[5] || match[2] == "/>" : false, + tagName: match ? match[4] : "", + column: match[1] ? column + match[1].length : column + }; + }; + this._readTagForward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var value = ""; + var start; + + do { + if (token.type.lastIndexOf("meta.tag", 0) === 0) { + if (!start) { + var start = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + }; + } + value += token.value; + if (value.indexOf(">") !== -1) { + var tag = this._parseTag(value); + tag.start = start; + tag.end = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + token.value.length + }; + iterator.stepForward(); + return tag; + } + } + } while(token = iterator.stepForward()); + + return null; + }; + + this._readTagBackward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var value = ""; + var end; + + do { + if (token.type.lastIndexOf("meta.tag", 0) === 0) { + if (!end) { + end = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + token.value.length + }; + } + value = token.value + value; + if (value.indexOf("<") !== -1) { + var tag = this._parseTag(value); + tag.end = end; + tag.start = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + }; + iterator.stepBackward(); + return tag; + } + } + } while(token = iterator.stepBackward()); + + return null; + }; + + this._pop = function(stack, tag) { + while (stack.length) { + + var top = stack[stack.length-1]; + if (!tag || top.tagName == tag.tagName) { + return stack.pop(); + } + else if (this.voidElements[tag.tagName]) { + return; + } + else if (this.voidElements[top.tagName]) { + stack.pop(); + continue; + } else { + return null; + } + } + }; + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + + if (!firstTag.match) + return null; + + var isBackward = firstTag.closing || firstTag.selfClosing; + var stack = []; + var tag; + + if (!isBackward) { + var iterator = new TokenIterator(session, row, firstTag.column); + var start = { + row: row, + column: firstTag.column + firstTag.tagName.length + 2 + }; + while (tag = this._readTagForward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) + return Range.fromPoints(start, tag.start); + } + else { + stack.push(tag) + } + } + } + else { + var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length); + var end = { + row: row, + column: firstTag.column + }; + + while (tag = this._readTagBackward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (!tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) { + tag.start.column += tag.tagName.length + 2; + return Range.fromPoints(tag.start, end); + } + } + else { + stack.push(tag) + } + } + } + + }; + +}).call(FoldMode.prototype); + +}); + +ace.define('ace/mode/html_completions', ["require", 'exports', 'module' , 'ace/token_iterator'], function(acequire, exports, module) { + + +var TokenIterator = acequire("../token_iterator").TokenIterator; + +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; + +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; + +var globalAttributes = commonAttributes.concat(eventAttributes); + +var attributeMap = { + "html": ["manifest"], + "head": [], + "title": [], + "base": ["href", "target"], + "link": ["href", "hreflang", "rel", "media", "type", "sizes"], + "meta": ["http-equiv", "name", "content", "charset"], + "style": ["type", "media", "scoped"], + "script": ["charset", "type", "src", "defer", "async"], + "noscript": ["href"], + "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"], + "section": [], + "nav": [], + "article": ["pubdate"], + "aside": [], + "h1": [], + "h2": [], + "h3": [], + "h4": [], + "h5": [], + "h6": [], + "header": [], + "footer": [], + "address": [], + "main": [], + "p": [], + "hr": [], + "pre": [], + "blockquote": ["cite"], + "ol": ["start", "reversed"], + "ul": [], + "li": ["value"], + "dl": [], + "dt": [], + "dd": [], + "figure": [], + "figcaption": [], + "div": [], + "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"], + "em": [], + "strong": [], + "small": [], + "s": [], + "cite": [], + "q": ["cite"], + "dfn": [], + "abbr": [], + "data": [], + "time": ["datetime"], + "code": [], + "var": [], + "samp": [], + "kbd": [], + "sub": [], + "sup": [], + "i": [], + "b": [], + "u": [], + "mark": [], + "ruby": [], + "rt": [], + "rp": [], + "bdi": [], + "bdo": [], + "span": [], + "br": [], + "wbr": [], + "ins": ["cite", "datetime"], + "del": ["cite", "datetime"], + "img": ["alt", "src", "height", "width", "usemap", "ismap"], + "iframe": ["name", "src", "height", "width", "sandbox", "seamless"], + "embed": ["src", "height", "width", "type"], + "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"], + "param": ["name", "value"], + "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"], + "audio": ["src", "autobuffer", "autoplay", "loop", "controls"], + "source": ["src", "type", "media"], + "track": ["kind", "src", "srclang", "label", "default"], + "canvas": ["width", "height"], + "map": ["name"], + "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"], + "svg": [], + "math": [], + "table": ["summary"], + "caption": [], + "colgroup": ["span"], + "col": ["span"], + "tbody": [], + "thead": [], + "tfoot": [], + "tr": [], + "td": ["headers", "rowspan", "colspan"], + "th": ["headers", "rowspan", "colspan", "scope"], + "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"], + "fieldset": ["disabled", "form", "name"], + "legend": [], + "label": ["form", "for"], + "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "acequired", "size", "src", "step", "width", "files", "value"], + "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"], + "select": ["autofocus", "disabled", "form", "multiple", "name", "size"], + "datalist": [], + "optgroup": ["disabled", "label"], + "option": ["disabled", "selected", "label", "value"], + "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "acequired", "rows", "cols", "wrap"], + "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"], + "output": ["for", "form", "name"], + "progress": ["value", "max"], + "meter": ["value", "min", "max", "low", "high", "optimum"], + "details": ["open"], + "summary": [], + "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"], + "menu": ["type", "label"], + "dialog": ["open"] +}; + +var allElements = Object.keys(attributeMap); + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); +} + +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + if (!token || !hasType(token, 'tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'operator') || hasType(token, 'attribute-name') || hasType(token, 'text'))); + } + if (token && hasType(token, 'tag-name') && !iterator.stepBackward().value.match('/')) + return token.value; +} + +var HtmlCompletions = function() { + +}; + +(function() { + + this.getCompletions = function(state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + + if (!token) + return []; + if (hasType(token, "tag-name") || (token.value == '<' && hasType(token, "text"))) + return this.getTagCompletions(state, session, pos, prefix); + if (hasType(token, 'text') || hasType(token, 'attribute-name')) + return this.getAttributeCompetions(state, session, pos, prefix); + + return []; + }; + + this.getTagCompletions = function(state, session, pos, prefix) { + var elements = allElements; + if (prefix) { + elements = elements.filter(function(element){ + return element.indexOf(prefix) === 0; + }); + } + return elements.map(function(element){ + return { + value: element, + meta: "tag" + }; + }); + }; + + this.getAttributeCompetions = function(state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(attributeMap[tagName]); + } + if (prefix) { + attributes = attributes.filter(function(attribute){ + return attribute.indexOf(prefix) === 0; + }); + } + return attributes.map(function(attribute){ + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute" + }; + }); + }; + +}).call(HtmlCompletions.prototype); + +exports.HtmlCompletions = HtmlCompletions; +}); + +ace.define('ace/mode/ruby', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/ruby_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/folding/coffee'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var RubyHighlightRules = acequire("./ruby_highlight_rules").RubyHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; +var FoldMode = acequire("./folding/coffee").FoldMode; + +var Mode = function() { + this.HighlightRules = RubyHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + + this.lineCommentStart = "#"; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + var startingClassOrMethod = line.match(/^\s*(class|def)\s.*$/); + var startingDoBlock = line.match(/.*do(\s*|\s+\|.*\|\s*)$/); + var startingConditional = line.match(/^\s*(if|else)\s*/) + if (match || startingClassOrMethod || startingDoBlock || startingConditional) { + indent += tab; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return /^\s+end$/.test(line + input) || /^\s+}$/.test(line + input) || /^\s+else$/.test(line + input); + }; + + this.autoOutdent = function(state, doc, row) { + var indent = this.$getIndent(doc.getLine(row)); + var tab = doc.getTabString(); + if (indent.slice(-tab.length) == tab) + doc.remove(new Range(row, indent.length-tab.length, row, indent.length)); + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/folding/coffee', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var BaseFoldMode = acequire("./fold_mode").FoldMode; +var Range = acequire("../../range").Range; + +var FoldMode = exports.FoldMode = function() {}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var range = this.indentationBlock(session, row); + if (range) + return range; + + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1 || line[startLevel] != "#") + return; + + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + + while (++row < maxRow) { + line = session.getLine(row); + var level = line.search(re); + + if (level == -1) + continue; + + if (line[level] != "#") + break; + + endRow = row; + } + + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + + if (prevIndent!= -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + + if (indent < nextIndent) + return "start"; + else + return ""; + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/ini.js b/pitfall/pdfkit/node_modules/brace/mode/ini.js new file mode 100644 index 00000000..3d3b7e1a --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/ini.js @@ -0,0 +1,184 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2012, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/ini', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/ini_highlight_rules', 'ace/mode/folding/ini'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var IniHighlightRules = acequire("./ini_highlight_rules").IniHighlightRules; +var FoldMode = acequire("./folding/ini").FoldMode; + +var Mode = function() { + this.HighlightRules = IniHighlightRules; + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + this.lineCommentStart = ";"; + this.blockComment = {start: "/*", end: "*/"}; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/ini_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var escapeRe = "\\\\(?:[\\\\0abtrn;#=:]|x[a-fA-F\\d]{4})"; + +var IniHighlightRules = function() { + this.$rules = { + start: [{ + token: 'punctuation.definition.comment.ini', + regex: '#.*', + push_: [{ + token: 'comment.line.number-sign.ini', + regex: '$|^', + next: 'pop' + }, { + defaultToken: 'comment.line.number-sign.ini' + }] + }, { + token: 'punctuation.definition.comment.ini', + regex: ';.*', + push_: [{ + token: 'comment.line.semicolon.ini', + regex: '$|^', + next: 'pop' + }, { + defaultToken: 'comment.line.semicolon.ini' + }] + }, { + token: ['keyword.other.definition.ini', 'text', 'punctuation.separator.key-value.ini'], + regex: '\\b([a-zA-Z0-9_.-]+)\\b(\\s*)(=)' + }, { + token: ['punctuation.definition.entity.ini', 'constant.section.group-title.ini', 'punctuation.definition.entity.ini'], + regex: '^(\\[)(.*?)(\\])' + }, { + token: 'punctuation.definition.string.begin.ini', + regex: "'", + push: [{ + token: 'punctuation.definition.string.end.ini', + regex: "'", + next: 'pop' + }, { + token: "constant.language.escape", + regex: escapeRe + }, { + defaultToken: 'string.quoted.single.ini' + }] + }, { + token: 'punctuation.definition.string.begin.ini', + regex: '"', + push: [{ + token: "constant.language.escape", + regex: escapeRe + }, { + token: 'punctuation.definition.string.end.ini', + regex: '"', + next: 'pop' + }, { + defaultToken: 'string.quoted.double.ini' + }] + }] + }; + + this.normalizeRules(); +}; + +IniHighlightRules.metaData = { + fileTypes: ['ini', 'conf'], + keyEquivalent: '^~I', + name: 'Ini', + scopeName: 'source.ini' +}; + + +oop.inherits(IniHighlightRules, TextHighlightRules); + +exports.IniHighlightRules = IniHighlightRules; +}); + +ace.define('ace/mode/folding/ini', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function() { +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /^\s*\[([^\])]*)]\s*(?:$|[;#])/; + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var re = this.foldingStartMarker; + var line = session.getLine(row); + + var m = line.match(re); + + if (!m) return; + + var startName = m[1] + "."; + + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + + while (++row < maxRow) { + line = session.getLine(row); + if (/^\s*$/.test(line)) + continue; + m = line.match(re); + if (m && m[1].lastIndexOf(startName, 0) !== 0) + break; + + endRow = row; + } + + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/jack.js b/pitfall/pdfkit/node_modules/brace/mode/jack.js new file mode 100644 index 00000000..79843d48 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/jack.js @@ -0,0 +1,647 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/jack', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/jack_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var HighlightRules = acequire("./jack_highlight_rules").JackHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = HighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "--"; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/jack_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var JackHighlightRules = function() { + this.$rules = { + "start" : [ + { + token : "string", + regex : '"', + next : "string2" + }, { + token : "string", + regex : "'", + next : "string1" + }, { + token : "constant.numeric", // hex + regex: "-?0[xX][0-9a-fA-F]+\\b" + }, { + token : "constant.numeric", // float + regex : "(?:0|[-+]?[1-9][0-9]*)\\b" + }, { + token : "constant.binary", + regex : "<[0-9A-Fa-f][0-9A-Fa-f](\\s+[0-9A-Fa-f][0-9A-Fa-f])*>" + }, { + token : "constant.language.boolean", + regex : "(?:true|false)\\b" + }, { + token : "constant.language.null", + regex : "null\\b" + }, { + token : "storage.type", + regex: "(?:Integer|Boolean|Null|String|Buffer|Tuple|List|Object|Function|Coroutine|Form)\\b" + }, { + token : "keyword", + regex : "(?:return|abort|vars|for|delete|in|is|escape|exec|split|and|if|elif|else|while)\\b" + }, { + token : "language.builtin", + regex : "(?:lines|source|parse|read-stream|interval|substr|parseint|write|print|range|rand|inspect|bind|i-values|i-pairs|i-map|i-filter|i-chunk|i-all\\?|i-any\\?|i-collect|i-zip|i-merge|i-each)\\b" + }, { + token : "comment", + regex : "--.*$" + }, { + token : "paren.lparen", + regex : "[[({]" + }, { + token : "paren.rparen", + regex : "[\\])}]" + }, { + token : "storage.form", + regex : "@[a-z]+" + }, { + token : "constant.other.symbol", + regex : ':+[a-zA-Z_]([-]?[a-zA-Z0-9_])*[?!]?' + }, { + token : "variable", + regex : '[a-zA-Z_]([-]?[a-zA-Z0-9_])*[?!]?' + }, { + token : "keyword.operator", + regex : "\\|\\||\\^\\^|&&|!=|==|<=|<|>=|>|\\+|-|\\*|\\/|\\^|\\%|\\#|\\!" + }, { + token : "text", + regex : "\\s+" + } + ], + "string1" : [ + { + token : "constant.language.escape", + regex : /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|['"\\\/bfnrt])/ + }, { + token : "string", + regex : "[^'\\\\]+" + }, { + token : "string", + regex : "'", + next : "start" + }, { + token : "string", + regex : "", + next : "start" + } + ], + "string2" : [ + { + token : "constant.language.escape", + regex : /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|['"\\\/bfnrt])/ + }, { + token : "string", + regex : '[^"\\\\]+' + }, { + token : "string", + regex : '"', + next : "start" + }, { + token : "string", + regex : "", + next : "start" + } + ] + }; + +}; + +oop.inherits(JackHighlightRules, TextHighlightRules); + +exports.JackHighlightRules = JackHighlightRules; +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/jade.js b/pitfall/pdfkit/node_modules/brace/mode/jade.js new file mode 100644 index 00000000..a55fcdc6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/jade.js @@ -0,0 +1,2080 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2012, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * Contributor(s): + * + * Garen J. Torikian + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/jade', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/jade_highlight_rules', 'ace/mode/folding/coffee'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var JadeHighlightRules = acequire("./jade_highlight_rules").JadeHighlightRules; +var FoldMode = acequire("./folding/coffee").FoldMode; + +var Mode = function() { + this.HighlightRules = JadeHighlightRules; + + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + this.lineCommentStart = "//"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/jade_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules', 'ace/mode/markdown_highlight_rules', 'ace/mode/scss_highlight_rules', 'ace/mode/less_highlight_rules', 'ace/mode/coffee_highlight_rules', 'ace/mode/javascript_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var MarkdownHighlightRules = acequire("./markdown_highlight_rules").MarkdownHighlightRules; +var SassHighlightRules = acequire("./scss_highlight_rules").ScssHighlightRules; +var LessHighlightRules = acequire("./less_highlight_rules").LessHighlightRules; +var CoffeeHighlightRules = acequire("./coffee_highlight_rules").CoffeeHighlightRules; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; + +function mixin_embed(tag, prefix) { + return { + token : "entity.name.function.jade", + regex : "^\\s*\\:" + tag, + next : prefix + "start" + }; +} + +var JadeHighlightRules = function() { + + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-6][0-7]?|" + // oct + "37[0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + + this.$rules = + { + "start": [ + { + token: "keyword.control.import.include.jade", + regex: "\\s*\\binclude\\b" + }, + { + token: "keyword.other.doctype.jade", + regex: "^!!!\\s*(?:[a-zA-Z0-9-_]+)?" + }, + { + token : "punctuation.section.comment", + regex : "^\\s*\/\/(?:\\s*[^-\\s]|\\s+\\S)(?:.*$)" + }, + { + onMatch: function(value, currentState, stack) { + stack.unshift(this.next, value.length - 2, currentState); + return "comment"; + }, + regex: /^\s*\/\//, + next: "comment_block" + }, + mixin_embed("markdown", "markdown-"), + mixin_embed("sass", "sass-"), + mixin_embed("less", "less-"), + mixin_embed("coffee", "coffee-"), + { + token: [ "storage.type.function.jade", + "entity.name.function.jade", + "punctuation.definition.parameters.begin.jade", + "variable.parameter.function.jade", + "punctuation.definition.parameters.end.jade" + ], + regex: "^(\\s*mixin)( [\\w\\-]+)(\\s*\\()(.*?)(\\))" + }, + { + token: [ "storage.type.function.jade", "entity.name.function.jade"], + regex: "^(\\s*mixin)( [\\w\\-]+)" + }, + { + token: "source.js.embedded.jade", + regex: "^\\s*(?:-|=|!=)", + next: "js-start" + }, + { + token: "string.interpolated.jade", + regex: "[#!]\\{[^\\}]+\\}" + }, + { + token: "meta.tag.any.jade", + regex: /^\s*(?!\w+\:)(?:[\w]+|(?=\.|#)])/, + next: "tag_single" + }, + { + token: "suport.type.attribute.id.jade", + regex: "#\\w+" + }, + { + token: "suport.type.attribute.class.jade", + regex: "\\.\\w+" + }, + { + token: "punctuation", + regex: "\\s*(?:\\()", + next: "tag_attributes" + } + ], + "comment_block": [ + {regex: /^\s*/, onMatch: function(value, currentState, stack) { + if (value.length <= stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack.shift(); + return "text"; + } else { + this.next = ""; + return "comment"; + } + }, next: "start"}, + {defaultToken: "comment"} + ], + "tag_single": [ + { + token: "entity.other.attribute-name.class.jade", + regex: "\\.[\\w-]+" + }, + { + token: "entity.other.attribute-name.id.jade", + regex: "#[\\w-]+" + }, + { + token: ["text", "punctuation"], + regex: "($)|((?!\\.|#|=|-))", + next: "start" + } + ], + "tag_attributes": [ + { + token : "string", + regex : "'(?=.)", + next : "qstring" + }, + { + token : "string", + regex : '"(?=.)', + next : "qqstring" + }, + { + token: "entity.other.attribute-name.jade", + regex: "\\b[a-zA-Z\\-:]+" + }, + { + token: ["entity.other.attribute-name.jade", "punctuation"], + regex: "\\b([a-zA-Z:\\.-]+)(=)", + next: "attribute_strings" + }, + { + token: "punctuation", + regex: "\\)", + next: "start" + } + ], + "attribute_strings": [ + { + token : "string", + regex : "'(?=.)", + next : "qstring" + }, + { + token : "string", + regex : '"(?=.)', + next : "qqstring" + } + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : '[^"\\\\]+' + }, { + token : "string", + regex : "\\\\$", + next : "qqstring" + }, { + token : "string", + regex : '"|$', + next : "tag_attributes" + } + ], + "qstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "[^'\\\\]+" + }, { + token : "string", + regex : "\\\\$", + next : "qstring" + }, { + token : "string", + regex : "'|$", + next : "tag_attributes" + } + ] +}; + + this.embedRules(JavaScriptHighlightRules, "js-", [{ + token: "text", + regex: ".$", + next: "start" + }]); +}; + +oop.inherits(JadeHighlightRules, TextHighlightRules); + +exports.JadeHighlightRules = JadeHighlightRules; +}); + +ace.define('ace/mode/markdown_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules', 'ace/mode/html_highlight_rules', 'ace/mode/css_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = acequire("./xml_highlight_rules").XmlHighlightRules; +var HtmlHighlightRules = acequire("./html_highlight_rules").HtmlHighlightRules; +var CssHighlightRules = acequire("./css_highlight_rules").CssHighlightRules; + +var escaped = function(ch) { + return "(?:[^" + lang.escapeRegExp(ch) + "\\\\]|\\\\.)*"; +} + +function github_embed(tag, prefix) { + return { // Github style block + token : "support.function", + regex : "^```" + tag + "\\s*$", + push : prefix + "start" + }; +} + +var MarkdownHighlightRules = function() { + HtmlHighlightRules.call(this); + + this.$rules["start"].unshift({ + token : "empty_line", + regex : '^$', + next: "allowBlock" + }, { // h1 + token: "markup.heading.1", + regex: "^=+(?=\\s*$)" + }, { // h2 + token: "markup.heading.2", + regex: "^\\-+(?=\\s*$)" + }, { + token : function(value) { + return "markup.heading." + value.length; + }, + regex : /^#{1,6}(?=\s*[^ #]|\s+#.)/, + next : "header" + }, + github_embed("(?:javascript|js)", "jscode-"), + github_embed("xml", "xmlcode-"), + github_embed("html", "htmlcode-"), + github_embed("css", "csscode-"), + { // Github style block + token : "support.function", + regex : "^```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$", + next : "githubblock" + }, { // block quote + token : "string.blockquote", + regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+", + next : "blockquote" + }, { // HR * - _ + token : "constant", + regex : "^ {0,2}(?:(?: ?\\* ?){3,}|(?: ?\\- ?){3,}|(?: ?\\_ ?){3,})\\s*$", + next: "allowBlock" + }, { // list + token : "markup.list", + regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+", + next : "listblock-start" + }, { + include : "basic" + }); + + this.addRules({ + "basic" : [{ + token : "constant.language.escape", + regex : /\\[\\`*_{}\[\]()#+\-.!]/ + }, { // code span ` + token : "support.function", + regex : "(`+)(.*?[^`])(\\1)" + }, { // reference + token : ["text", "constant", "text", "url", "string", "text"], + regex : "^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:[\"][^\"]+[\"])?(\\s*))$" + }, { // link by reference + token : ["text", "string", "text", "constant", "text"], + regex : "(\\[)(" + escaped("]") + ")(\\]\s*\\[)("+ escaped("]") + ")(\\])" + }, { // link by url + token : ["text", "string", "text", "markup.underline", "string", "text"], + regex : "(\\[)(" + // [ + escaped("]") + // link text + ")(\\]\\()"+ // ]( + '((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)' + // href + '(\\s*"' + escaped('"') + '"\\s*)?' + // "title" + "(\\))" // ) + }, { // strong ** __ + token : "string.strong", + regex : "([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)" + }, { // emphasis * _ + token : "string.emphasis", + regex : "([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)" + }, { // + token : ["text", "url", "text"], + regex : "(<)("+ + "(?:https?|ftp|dict):[^'\">\\s]+"+ + "|"+ + "(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+"+ + ")(>)" + }], + "allowBlock": [ + {token : "support.function", regex : "^ {4}.+", next : "allowBlock"}, + {token : "empty", regex : "", next : "start"} + ], + + "header" : [{ + regex: "$", + next : "start" + }, { + include: "basic" + }, { + defaultToken : "heading" + } ], + + "listblock-start" : [{ + token : "support.variable", + regex : /(?:\[[ x]\])?/, + next : "listblock" + }], + + "listblock" : [ { // Lists only escape on completely blank lines. + token : "empty_line", + regex : "^$", + next : "start" + }, { // list + token : "markup.list", + regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+", + next : "listblock-start" + }, { + include : "basic", noEscape: true + }, { + defaultToken : "list" //do not use markup.list to allow stling leading `*` differntly + } ], + + "blockquote" : [ { // BLockquotes only escape on blank lines. + token : "empty_line", + regex : "^\\s*$", + next : "start" + }, { // block quote + token : "string.blockquote", + regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+", + next : "blockquote" + }, { + include : "basic", noEscape: true + }, { + defaultToken : "string.blockquote" + } ], + + "githubblock" : [ { + token : "support.function", + regex : "^```", + next : "start" + }, { + token : "support.function", + regex : ".+" + } ] + }); + + this.embedRules(JavaScriptHighlightRules, "jscode-", [{ + token : "support.function", + regex : "^```", + next : "pop" + }]); + + this.embedRules(HtmlHighlightRules, "htmlcode-", [{ + token : "support.function", + regex : "^```", + next : "pop" + }]); + + this.embedRules(CssHighlightRules, "csscode-", [{ + token : "support.function", + regex : "^```", + next : "pop" + }]); + + this.embedRules(XmlHighlightRules, "xmlcode-", [{ + token : "support.function", + regex : "^```", + next : "pop" + }]); + + this.normalizeRules(); +}; +oop.inherits(MarkdownHighlightRules, TextHighlightRules); + +exports.MarkdownHighlightRules = MarkdownHighlightRules; +}); + +ace.define('ace/mode/javascript_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var JavaScriptHighlightRules = function() { + var keywordMapper = this.createKeywordMapper({ + "variable.language": + "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document" , // Pseudo + "keyword": + "const|yield|import|get|set|" + + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", + "storage.type": + "const|let|var|function", + "constant.language": + "null|Infinity|NaN|undefined", + "support.function": + "alert", + "constant.language.boolean": "true|false" + }, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; + + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-6][0-7]?|" + // oct + "37[0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + + this.$rules = { + "no_regex" : [ + { + token : "comment", + regex : "\\/\\/", + next : "line_comment" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : /\/\*/, + next : "comment" + }, { + token : "string", + regex : "'(?=.)", + next : "qstring" + }, { + token : "string", + regex : '"(?=.)', + next : "qqstring" + }, { + token : "constant.numeric", // hex + regex : /0[xX][0-9a-fA-F]+\b/ + }, { + token : "constant.numeric", // float + regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ + }, { + token : [ + "storage.type", "punctuation.operator", "support.function", + "punctuation.operator", "entity.name.function", "text","keyword.operator" + ], + regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "paren.lparen" + ], + regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "text", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : "keyword", + regex : "(?:" + kwBeforeRe + ")\\b", + next : "start" + }, { + token : ["punctuation.operator", "support.function"], + regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token : ["punctuation.operator", "support.function.dom"], + regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token : ["punctuation.operator", "support.constant"], + regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token : ["storage.type", "punctuation.operator", "support.function.firebug"], + regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/ + }, { + token : keywordMapper, + regex : identifierRe + }, { + token : "keyword.operator", + regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, + next : "start" + }, { + token : "punctuation.operator", + regex : /\?|\:|\,|\;|\./, + next : "start" + }, { + token : "paren.lparen", + regex : /[\[({]/, + next : "start" + }, { + token : "paren.rparen", + regex : /[\])}]/ + }, { + token : "keyword.operator", + regex : /\/=?/, + next : "start" + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment_regex_allowed" + }, { + token : "comment", + regex : "\\/\\/", + next : "line_comment_regex_allowed" + }, { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token : "text", + regex : "\\s+|^$", + next : "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/\\w*", + next: "no_regex" + }, { + token : "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token : "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/ + }, { + token : "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "function_arguments": [ + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "[, ]+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "comment_regex_allowed" : [ + {token : "comment", regex : "\\*\\/", next : "start"}, + {defaultToken : "comment"} + ], + "comment" : [ + {token : "comment", regex : "\\*\\/", next : "no_regex"}, + {defaultToken : "comment"} + ], + "line_comment_regex_allowed" : [ + {token : "comment", regex : "$|^", next : "start"}, + {defaultToken : "comment"} + ], + "line_comment" : [ + {token : "comment", regex : "$|^", next : "no_regex"}, + {defaultToken : "comment"} + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qqstring" + }, { + token : "string", + regex : '"|$', + next : "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qstring" + }, { + token : "string", + regex : "'|$", + next : "no_regex" + }, { + defaultToken: "string" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("no_regex") ]); +}; + +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); + +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define('ace/mode/xml_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var xmlUtil = acequire("./xml_util"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var XmlHighlightRules = function(normalize) { + this.$rules = { + start : [ + {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"}, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration" + }, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction" + }, + {token : "comment", regex : "<\\!--", next : "comment"}, + { + token : ["punctuation.doctype.begin", "meta.tag.doctype"], + regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype" + }, + {include : "tag"}, + {include : "reference"} + ], + + xml_declaration : [ + {include : "attributes"}, + {include : "instruction"} + ], + + instruction : [ + {token : "punctuation.instruction.end", regex : "\\?>", next : "start"} + ], + + doctype : [ + {include : "space"}, + {include : "string"}, + {token : "punctuation.doctype.end", regex : ">", next : "start"}, + {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"}, + {token : "punctuation.begin", regex : "\\[", push : "declarations"} + ], + + declarations : [{ + token : "text", + regex : "\\s+" + }, { + token: "punctuation.end", + regex: "]", + next: "pop" + }, { + token : ["punctuation.begin", "keyword"], + regex : "(<\\!)([-_a-zA-Z0-9]+)", + push : [{ + token : "text", + regex : "\\s+" + }, + { + token : "punctuation.end", + regex : ">", + next : "pop" + }, + {include : "string"}] + }], + + cdata : [ + {token : "string.end", regex : "\\]\\]>", next : "start"}, + {token : "text", regex : "\\s+"}, + {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"} + ], + + comment : [ + {token : "comment", regex : "-->", next : "start"}, + {defaultToken : "comment"} + ], + + tag : [{ + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)", + next: [ + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"} + ] + }, { + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(", next : "start"} + ] + }], + + space : [ + {token : "text", regex : "\\s+"} + ], + + reference : [{ + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, { + token : "invalid.illegal", regex : "&" + }], + + string: [{ + token : "string", + regex : "'", + push : "qstring_inner" + }, { + token : "string", + regex : '"', + push : "qqstring_inner" + }], + + qstring_inner: [ + {token : "string", regex: "'", next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + qqstring_inner: [ + {token : "string", regex: '"', next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + attributes: [{ + token : "entity.other.attribute-name", + regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" + }, { + token : "keyword.operator.separator", + regex : "=" + }, { + include : "space" + }, { + include : "string" + }] + }; + + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; + + +(function() { + + this.embedTagRules = function(HighlightRules, prefix, tag){ + this.$rules.tag.unshift({ + token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(<)(" + tag + ")", + next: [ + {include : "space"}, + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"} + ] + }); + + this.$rules[tag + "-end"] = [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next: "start", + onMatch : function(value, currentState, stack) { + stack.splice(0); + return this.token; + }} + ] + + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(" + }]); + }; + +}).call(TextHighlightRules.prototype); + +oop.inherits(XmlHighlightRules, TextHighlightRules); + +exports.XmlHighlightRules = XmlHighlightRules; +}); + +ace.define('ace/mode/xml_util', ["require", 'exports', 'module' ], function(acequire, exports, module) { + + +function string(state) { + return [{ + token : "string", + regex : '"', + next : state + "_qqstring" + }, { + token : "string", + regex : "'", + next : state + "_qstring" + }]; +} + +function multiLineString(quote, state) { + return [ + {token : "string", regex : quote, next : state}, + { + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, + {defaultToken : "string"} + ]; +} + +exports.tag = function(states, name, nextState, tagMap) { + states[name] = [{ + token : "text", + regex : "\\s+" + }, { + + token : !tagMap ? "meta.tag.tag-name" : function(value) { + if (tagMap[value]) + return "meta.tag.tag-name." + tagMap[value]; + else + return "meta.tag.tag-name"; + }, + regex : "[-_a-zA-Z0-9:]+", + next : name + "_embed_attribute_list" + }, { + token: "empty", + regex: "", + next : name + "_embed_attribute_list" + }]; + + states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list"); + states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list"); + + states[name + "_embed_attribute_list"] = [{ + token : "meta.tag.r", + regex : "/?>", + next : nextState + }, { + token : "keyword.operator", + regex : "=" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "text", + regex : "\\s+" + }].concat(string(name)); +}; + +}); + +ace.define('ace/mode/html_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var CssHighlightRules = acequire("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = acequire("./xml_highlight_rules").XmlHighlightRules; + +var tagMap = lang.createMap({ + a : 'anchor', + button : 'form', + form : 'form', + img : 'image', + input : 'form', + label : 'form', + option : 'form', + script : 'script', + select : 'form', + textarea : 'form', + style : 'style', + table : 'table', + tbody : 'table', + td : 'table', + tfoot : 'table', + th : 'table', + tr : 'table' +}); + +var HtmlHighlightRules = function() { + XmlHighlightRules.call(this); + + this.addRules({ + attributes: [{ + include : "space" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "keyword.operator.separator", + regex : "=", + push : [{ + include: "space" + }, { + token : "string", + regex : "[^<>='\"`\\s]+", + next : "pop" + }, { + token : "empty", + regex : "", + next : "pop" + }] + }, { + include : "string" + }], + tag: [{ + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation.begin", + "meta.tag.name" + (group ? "." + group : "")]; + }, + regex : "(<)([-_a-zA-Z0-9:]+)", + next: "start_tag_stuff" + }, { + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation.begin", + "meta.tag.name" + (group ? "." + group : "")]; + }, + regex : "(", next : "start"} + ], + end_tag_stuff: [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next : "start"} + ] + }); + + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); + + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; + +oop.inherits(HtmlHighlightRules, XmlHighlightRules); + +exports.HtmlHighlightRules = HtmlHighlightRules; +}); + +ace.define('ace/mode/css_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; + +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|acequired|root|target|valid|visited)\\b"; + +var CssHighlightRules = function() { + + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + + this.$rules = { + "start" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "@.*?{", + push: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "media" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "\\}", + next: "pop" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "comment" : [{ + token : "comment", + regex : "\\*\\/", + next : "pop" + }, { + defaultToken : "comment" + }], + + "ruleset" : [ + { + token : "paren.rparen", + regex : "\\}", + next: "pop" + }, { + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : ["constant.numeric", "keyword"], + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + }, { + token : "constant.numeric", + regex : numRe + }, { + token : "constant.numeric", // hex6 color + regex : "#[a-f0-9]{6}" + }, { + token : "constant.numeric", // hex3 color + regex : "#[a-f0-9]{3}" + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex : pseudoElements + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex : pseudoClasses + }, { + token : ["support.function", "string", "support.function"], + regex : "(url\\()(.*)(\\))" + }, { + token : keywordMapper, + regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + caseInsensitive: true + }] + }; + + this.normalizeRules(); +}; + +oop.inherits(CssHighlightRules, TextHighlightRules); + +exports.CssHighlightRules = CssHighlightRules; + +}); + +ace.define('ace/mode/scss_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var ScssHighlightRules = function() { + + var properties = lang.arrayToMap( (function () { + + var browserPrefix = ("-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-").split("|"); + + var prefixProperties = ("appearance|background-clip|background-inline-policy|background-origin|" + + "background-size|binding|border-bottom-colors|border-left-colors|" + + "border-right-colors|border-top-colors|border-end|border-end-color|" + + "border-end-style|border-end-width|border-image|border-start|" + + "border-start-color|border-start-style|border-start-width|box-align|" + + "box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|" + + "box-pack|box-sizing|column-count|column-gap|column-width|column-rule|" + + "column-rule-width|column-rule-style|column-rule-color|float-edge|" + + "font-feature-settings|font-language-override|force-broken-image-icon|" + + "image-region|margin-end|margin-start|opacity|outline|outline-color|" + + "outline-offset|outline-radius|outline-radius-bottomleft|" + + "outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|" + + "outline-style|outline-width|padding-end|padding-start|stack-sizing|" + + "tab-size|text-blink|text-decoration-color|text-decoration-line|" + + "text-decoration-style|transform|transform-origin|transition|" + + "transition-delay|transition-duration|transition-property|" + + "transition-timing-function|user-focus|user-input|user-modify|user-select|" + + "window-shadow|border-radius").split("|"); + + var properties = ("azimuth|background-attachment|background-color|background-image|" + + "background-position|background-repeat|background|border-bottom-color|" + + "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" + + "border-color|border-left-color|border-left-style|border-left-width|" + + "border-left|border-right-color|border-right-style|border-right-width|" + + "border-right|border-spacing|border-style|border-top-color|" + + "border-top-style|border-top-width|border-top|border-width|border|bottom|" + + "box-shadow|box-sizing|caption-side|clear|clip|color|content|counter-increment|" + + "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" + + "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" + + "font-stretch|font-style|font-variant|font-weight|font|height|left|" + + "letter-spacing|line-height|list-style-image|list-style-position|" + + "list-style-type|list-style|margin-bottom|margin-left|margin-right|" + + "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" + + "min-width|opacity|orphans|outline-color|" + + "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" + + "padding-left|padding-right|padding-top|padding|page-break-after|" + + "page-break-before|page-break-inside|page|pause-after|pause-before|" + + "pause|pitch-range|pitch|play-during|position|quotes|richness|right|" + + "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" + + "stress|table-layout|text-align|text-decoration|text-indent|" + + "text-shadow|text-transform|top|unicode-bidi|vertical-align|" + + "visibility|voice-family|volume|white-space|widows|width|word-spacing|" + + "z-index").split("|"); + var ret = []; + for (var i=0, ln=browserPrefix.length; i|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*" + }, { + token : "paren.lparen", + regex : "[[({]" + }, { + token : "paren.rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + }, { + caseInsensitive: true + } + ], + "comment" : [ + { + token : "comment", // closing comment + regex : ".*?\\*\\/", + next : "start" + }, { + token : "comment", // comment spanning whole line + regex : ".+" + } + ], + "qqstring" : [ + { + token : "string", + regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', + next : "start" + }, { + token : "string", + regex : '.+' + } + ], + "qstring" : [ + { + token : "string", + regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", + next : "start" + }, { + token : "string", + regex : '.+' + } + ] + }; +}; + +oop.inherits(ScssHighlightRules, TextHighlightRules); + +exports.ScssHighlightRules = ScssHighlightRules; + +}); + +ace.define('ace/mode/less_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var LessHighlightRules = function() { + + var properties = lang.arrayToMap( (function () { + + var browserPrefix = ("-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-").split("|"); + + var prefixProperties = ("appearance|background-clip|background-inline-policy|background-origin|" + + "background-size|binding|border-bottom-colors|border-left-colors|" + + "border-right-colors|border-top-colors|border-end|border-end-color|" + + "border-end-style|border-end-width|border-image|border-start|" + + "border-start-color|border-start-style|border-start-width|box-align|" + + "box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|" + + "box-pack|box-sizing|column-count|column-gap|column-width|column-rule|" + + "column-rule-width|column-rule-style|column-rule-color|float-edge|" + + "font-feature-settings|font-language-override|force-broken-image-icon|" + + "image-region|margin-end|margin-start|opacity|outline|outline-color|" + + "outline-offset|outline-radius|outline-radius-bottomleft|" + + "outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|" + + "outline-style|outline-width|padding-end|padding-start|stack-sizing|" + + "tab-size|text-blink|text-decoration-color|text-decoration-line|" + + "text-decoration-style|transform|transform-origin|transition|" + + "transition-delay|transition-duration|transition-property|" + + "transition-timing-function|user-focus|user-input|user-modify|user-select|" + + "window-shadow|border-radius").split("|"); + + var properties = ("azimuth|background-attachment|background-color|background-image|" + + "background-position|background-repeat|background|border-bottom-color|" + + "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" + + "border-color|border-left-color|border-left-style|border-left-width|" + + "border-left|border-right-color|border-right-style|border-right-width|" + + "border-right|border-spacing|border-style|border-top-color|" + + "border-top-style|border-top-width|border-top|border-width|border|" + + "bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|" + + "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" + + "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" + + "font-stretch|font-style|font-variant|font-weight|font|height|left|" + + "letter-spacing|line-height|list-style-image|list-style-position|" + + "list-style-type|list-style|margin-bottom|margin-left|margin-right|" + + "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" + + "min-width|opacity|orphans|outline-color|" + + "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" + + "padding-left|padding-right|padding-top|padding|page-break-after|" + + "page-break-before|page-break-inside|page|pause-after|pause-before|" + + "pause|pitch-range|pitch|play-during|position|quotes|richness|right|" + + "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" + + "stress|table-layout|text-align|text-decoration|text-indent|" + + "text-shadow|text-transform|top|unicode-bidi|vertical-align|" + + "visibility|voice-family|volume|white-space|widows|width|word-spacing|" + + "z-index").split("|"); + var ret = []; + for (var i=0, ln=browserPrefix.length; i|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*" + }, { + token : "paren.lparen", + regex : "[[({]" + }, { + token : "paren.rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + }, { + caseInsensitive: true + } + ], + "comment" : [ + { + token : "comment", // closing comment + regex : ".*?\\*\\/", + next : "start" + }, { + token : "comment", // comment spanning whole line + regex : ".+" + } + ] + }; +}; + +oop.inherits(LessHighlightRules, TextHighlightRules); + +exports.LessHighlightRules = LessHighlightRules; + +}); + +ace.define('ace/mode/coffee_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + + var oop = acequire("../lib/oop"); + var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + + oop.inherits(CoffeeHighlightRules, TextHighlightRules); + + function CoffeeHighlightRules() { + var identifier = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*"; + + var keywords = ( + "this|throw|then|try|typeof|super|switch|return|break|by|continue|" + + "catch|class|in|instanceof|is|isnt|if|else|extends|for|own|" + + "finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|" + + "or|on|unless|until|and|yes" + ); + + var langConstant = ( + "true|false|null|undefined|NaN|Infinity" + ); + + var illegal = ( + "case|const|default|function|var|void|with|enum|export|implements|" + + "interface|let|package|private|protected|public|static|yield|" + + "__hasProp|slice|bind|indexOf" + ); + + var supportClass = ( + "Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|String|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + + "SyntaxError|TypeError|URIError|" + + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray" + ); + + var supportFunction = ( + "Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|" + + "encodeURIComponent|decodeURI|decodeURIComponent|String|" + ); + + var variableLanguage = ( + "window|arguments|prototype|document" + ); + + var keywordMapper = this.createKeywordMapper({ + "keyword": keywords, + "constant.language": langConstant, + "invalid.illegal": illegal, + "language.support.class": supportClass, + "language.support.function": supportFunction, + "variable.language": variableLanguage + }, "identifier"); + + var functionRule = { + token: ["paren.lparen", "variable.parameter", "paren.rparen", "text", "storage.type"], + regex: /(?:(\()((?:"[^")]*?"|'[^')]*?'|\/[^\/)]*?\/|[^()\"'\/])*?)(\))(\s*))?([\-=]>)/.source + }; + + var stringEscape = /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)/; + + this.$rules = { + start : [ + { + token : "constant.numeric", + regex : "(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)" + }, { + stateName: "qdoc", + token : "string", regex : "'''", next : [ + {token : "string", regex : "'''", next : "start"}, + {token : "constant.language.escape", regex : stringEscape}, + {defaultToken: "string"} + ] + }, { + stateName: "qqdoc", + token : "string", + regex : '"""', + next : [ + {token : "string", regex : '"""', next : "start"}, + {token : "paren.string", regex : '#{', push : "start"}, + {token : "constant.language.escape", regex : stringEscape}, + {defaultToken: "string"} + ] + }, { + stateName: "qstring", + token : "string", regex : "'", next : [ + {token : "string", regex : "'", next : "start"}, + {token : "constant.language.escape", regex : stringEscape}, + {defaultToken: "string"} + ] + }, { + stateName: "qqstring", + token : "string.start", regex : '"', next : [ + {token : "string.end", regex : '"', next : "start"}, + {token : "paren.string", regex : '#{', push : "start"}, + {token : "constant.language.escape", regex : stringEscape}, + {defaultToken: "string"} + ] + }, { + stateName: "js", + token : "string", regex : "`", next : [ + {token : "string", regex : "`", next : "start"}, + {token : "constant.language.escape", regex : stringEscape}, + {defaultToken: "string"} + ] + }, { + regex: "[{}]", onMatch: function(val, state, stack) { + this.next = ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + return "paren"; + } + if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1) + return "paren.string"; + } + return "paren"; + } + }, { + token : "string.regex", + regex : "///", + next : "heregex" + }, { + token : "string.regex", + regex : /(?:\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)(?:[imgy]{0,4})(?!\w)/ + }, { + token : "comment", + regex : "###(?!#)", + next : "comment" + }, { + token : "comment", + regex : "#.*" + }, { + token : ["punctuation.operator", "text", "identifier"], + regex : "(\\.)(\\s*)(" + illegal + ")" + }, { + token : "punctuation.operator", + regex : "\\." + }, { + token : ["keyword", "text", "language.support.class", + "text", "keyword", "text", "language.support.class"], + regex : "(class)(\\s+)(" + identifier + ")(?:(\\s+)(extends)(\\s+)(" + identifier + "))?" + }, { + token : ["entity.name.function", "text", "keyword.operator", "text"].concat(functionRule.token), + regex : "(" + identifier + ")(\\s*)([=:])(\\s*)" + functionRule.regex + }, + functionRule, + { + token : "variable", + regex : "@(?:" + identifier + ")?" + }, { + token: keywordMapper, + regex : identifier + }, { + token : "punctuation.operator", + regex : "\\,|\\." + }, { + token : "storage.type", + regex : "[\\-=]>" + }, { + token : "keyword.operator", + regex : "(?:[-+*/%<>&|^!?=]=|>>>=?|\\-\\-|\\+\\+|::|&&=|\\|\\|=|<<=|>>=|\\?\\.|\\.{2,3}|[!*+-=><])" + }, { + token : "paren.lparen", + regex : "[({[]" + }, { + token : "paren.rparen", + regex : "[\\]})]" + }, { + token : "text", + regex : "\\s+" + }], + + + heregex : [{ + token : "string.regex", + regex : '.*?///[imgy]{0,4}', + next : "start" + }, { + token : "comment.regex", + regex : "\\s+(?:#.*)?" + }, { + token : "string.regex", + regex : "\\S+" + }], + + comment : [{ + token : "comment", + regex : '###', + next : "start" + }, { + defaultToken : "comment" + }] + }; + this.normalizeRules(); + } + + exports.CoffeeHighlightRules = CoffeeHighlightRules; +}); + +ace.define('ace/mode/folding/coffee', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var BaseFoldMode = acequire("./fold_mode").FoldMode; +var Range = acequire("../../range").Range; + +var FoldMode = exports.FoldMode = function() {}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var range = this.indentationBlock(session, row); + if (range) + return range; + + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1 || line[startLevel] != "#") + return; + + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + + while (++row < maxRow) { + line = session.getLine(row); + var level = line.search(re); + + if (level == -1) + continue; + + if (line[level] != "#") + break; + + endRow = row; + } + + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + + if (prevIndent!= -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + + if (indent < nextIndent) + return "start"; + else + return ""; + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/java.js b/pitfall/pdfkit/node_modules/brace/mode/java.js new file mode 100644 index 00000000..de7b8890 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/java.js @@ -0,0 +1,1046 @@ +ace.define('ace/mode/java', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript', 'ace/tokenizer', 'ace/mode/java_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var JavaScriptMode = acequire("./javascript").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var JavaHighlightRules = acequire("./java_highlight_rules").JavaHighlightRules; + +var Mode = function() { + JavaScriptMode.call(this); + this.HighlightRules = JavaHighlightRules; +}; +oop.inherits(Mode, JavaScriptMode); + +(function() { + + this.createWorker = function(session) { + return null; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/javascript', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = JavaScriptHighlightRules; + + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/javascript"), "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + + worker.on("jslint", function(results) { + session.setAnnotations(results.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/javascript_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var JavaScriptHighlightRules = function() { + var keywordMapper = this.createKeywordMapper({ + "variable.language": + "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document" , // Pseudo + "keyword": + "const|yield|import|get|set|" + + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", + "storage.type": + "const|let|var|function", + "constant.language": + "null|Infinity|NaN|undefined", + "support.function": + "alert", + "constant.language.boolean": "true|false" + }, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; + + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-6][0-7]?|" + // oct + "37[0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + + this.$rules = { + "no_regex" : [ + { + token : "comment", + regex : "\\/\\/", + next : "line_comment" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : /\/\*/, + next : "comment" + }, { + token : "string", + regex : "'(?=.)", + next : "qstring" + }, { + token : "string", + regex : '"(?=.)', + next : "qqstring" + }, { + token : "constant.numeric", // hex + regex : /0[xX][0-9a-fA-F]+\b/ + }, { + token : "constant.numeric", // float + regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ + }, { + token : [ + "storage.type", "punctuation.operator", "support.function", + "punctuation.operator", "entity.name.function", "text","keyword.operator" + ], + regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "paren.lparen" + ], + regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "text", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : "keyword", + regex : "(?:" + kwBeforeRe + ")\\b", + next : "start" + }, { + token : ["punctuation.operator", "support.function"], + regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token : ["punctuation.operator", "support.function.dom"], + regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token : ["punctuation.operator", "support.constant"], + regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token : ["storage.type", "punctuation.operator", "support.function.firebug"], + regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/ + }, { + token : keywordMapper, + regex : identifierRe + }, { + token : "keyword.operator", + regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, + next : "start" + }, { + token : "punctuation.operator", + regex : /\?|\:|\,|\;|\./, + next : "start" + }, { + token : "paren.lparen", + regex : /[\[({]/, + next : "start" + }, { + token : "paren.rparen", + regex : /[\])}]/ + }, { + token : "keyword.operator", + regex : /\/=?/, + next : "start" + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment_regex_allowed" + }, { + token : "comment", + regex : "\\/\\/", + next : "line_comment_regex_allowed" + }, { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token : "text", + regex : "\\s+|^$", + next : "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/\\w*", + next: "no_regex" + }, { + token : "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token : "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/ + }, { + token : "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "function_arguments": [ + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "[, ]+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "comment_regex_allowed" : [ + {token : "comment", regex : "\\*\\/", next : "start"}, + {defaultToken : "comment"} + ], + "comment" : [ + {token : "comment", regex : "\\*\\/", next : "no_regex"}, + {defaultToken : "comment"} + ], + "line_comment_regex_allowed" : [ + {token : "comment", regex : "$|^", next : "start"}, + {defaultToken : "comment"} + ], + "line_comment" : [ + {token : "comment", regex : "$|^", next : "no_regex"}, + {defaultToken : "comment"} + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qqstring" + }, { + token : "string", + regex : '"|$', + next : "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qstring" + }, { + token : "string", + regex : "'|$", + next : "no_regex" + }, { + defaultToken: "string" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("no_regex") ]); +}; + +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); + +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); +ace.define('ace/mode/java_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var JavaHighlightRules = function() { + var keywords = ( + "abstract|continue|for|new|switch|" + + "assert|default|goto|package|synchronized|" + + "boolean|do|if|private|this|" + + "break|double|implements|protected|throw|" + + "byte|else|import|public|throws|" + + "case|enum|instanceof|return|transient|" + + "catch|extends|int|short|try|" + + "char|final|interface|static|void|" + + "class|finally|long|strictfp|volatile|" + + "const|float|native|super|while" + ); + + var buildinConstants = ("null|Infinity|NaN|undefined"); + + + var langClasses = ( + "AbstractMethodError|AssertionError|ClassCircularityError|"+ + "ClassFormatError|Deprecated|EnumConstantNotPresentException|"+ + "ExceptionInInitializerError|IllegalAccessError|"+ + "IllegalThreadStateException|InstantiationError|InternalError|"+ + "NegativeArraySizeException|NoSuchFieldError|Override|Process|"+ + "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|"+ + "SuppressWarnings|TypeNotPresentException|UnknownError|"+ + "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|"+ + "InstantiationException|IndexOutOfBoundsException|"+ + "ArrayIndexOutOfBoundsException|CloneNotSupportedException|"+ + "NoSuchFieldException|IllegalArgumentException|NumberFormatException|"+ + "SecurityException|Void|InheritableThreadLocal|IllegalStateException|"+ + "InterruptedException|NoSuchMethodException|IllegalAccessException|"+ + "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|"+ + "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|"+ + "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|"+ + "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|"+ + "Character|Boolean|StackTraceElement|Appendable|StringBuffer|"+ + "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|"+ + "StackOverflowError|OutOfMemoryError|VirtualMachineError|"+ + "ArrayStoreException|ClassCastException|LinkageError|"+ + "NoClassDefFoundError|ClassNotFoundException|RuntimeException|"+ + "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|"+ + "Cloneable|Class|CharSequence|Comparable|String|Object" + ); + + var keywordMapper = this.createKeywordMapper({ + "variable.language": "this", + "keyword": keywords, + "constant.language": buildinConstants, + "support.function": langClasses + }, "identifier"); + + this.$rules = { + "start" : [ + { + token : "comment", + regex : "\\/\\/.*$" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment" + }, { + token : "string.regexp", + regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : "constant.numeric", // hex + regex : "0[xX][0-9a-fA-F]+\\b" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "constant.language.boolean", + regex : "(?:true|false)\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator", + regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" + }, { + token : "lparen", + regex : "[[({]" + }, { + token : "rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + } + ], + "comment" : [ + { + token : "comment", // closing comment + regex : ".*?\\*\\/", + next : "start" + }, { + token : "comment", // comment spanning whole line + regex : ".+" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("start") ]); +}; + +oop.inherits(JavaHighlightRules, TextHighlightRules); + +exports.JavaHighlightRules = JavaHighlightRules; +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/javascript.js b/pitfall/pdfkit/node_modules/brace/mode/javascript.js new file mode 100644 index 00000000..4890a1d5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/javascript.js @@ -0,0 +1,927 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/javascript', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = JavaScriptHighlightRules; + + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/javascript"), "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + + worker.on("jslint", function(results) { + session.setAnnotations(results.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/javascript_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var JavaScriptHighlightRules = function() { + var keywordMapper = this.createKeywordMapper({ + "variable.language": + "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document" , // Pseudo + "keyword": + "const|yield|import|get|set|" + + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", + "storage.type": + "const|let|var|function", + "constant.language": + "null|Infinity|NaN|undefined", + "support.function": + "alert", + "constant.language.boolean": "true|false" + }, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; + + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-6][0-7]?|" + // oct + "37[0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + + this.$rules = { + "no_regex" : [ + { + token : "comment", + regex : "\\/\\/", + next : "line_comment" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : /\/\*/, + next : "comment" + }, { + token : "string", + regex : "'(?=.)", + next : "qstring" + }, { + token : "string", + regex : '"(?=.)', + next : "qqstring" + }, { + token : "constant.numeric", // hex + regex : /0[xX][0-9a-fA-F]+\b/ + }, { + token : "constant.numeric", // float + regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ + }, { + token : [ + "storage.type", "punctuation.operator", "support.function", + "punctuation.operator", "entity.name.function", "text","keyword.operator" + ], + regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "paren.lparen" + ], + regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "text", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : "keyword", + regex : "(?:" + kwBeforeRe + ")\\b", + next : "start" + }, { + token : ["punctuation.operator", "support.function"], + regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token : ["punctuation.operator", "support.function.dom"], + regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token : ["punctuation.operator", "support.constant"], + regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token : ["storage.type", "punctuation.operator", "support.function.firebug"], + regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/ + }, { + token : keywordMapper, + regex : identifierRe + }, { + token : "keyword.operator", + regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, + next : "start" + }, { + token : "punctuation.operator", + regex : /\?|\:|\,|\;|\./, + next : "start" + }, { + token : "paren.lparen", + regex : /[\[({]/, + next : "start" + }, { + token : "paren.rparen", + regex : /[\])}]/ + }, { + token : "keyword.operator", + regex : /\/=?/, + next : "start" + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment_regex_allowed" + }, { + token : "comment", + regex : "\\/\\/", + next : "line_comment_regex_allowed" + }, { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token : "text", + regex : "\\s+|^$", + next : "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/\\w*", + next: "no_regex" + }, { + token : "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token : "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/ + }, { + token : "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "function_arguments": [ + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "[, ]+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "comment_regex_allowed" : [ + {token : "comment", regex : "\\*\\/", next : "start"}, + {defaultToken : "comment"} + ], + "comment" : [ + {token : "comment", regex : "\\*\\/", next : "no_regex"}, + {defaultToken : "comment"} + ], + "line_comment_regex_allowed" : [ + {token : "comment", regex : "$|^", next : "start"}, + {defaultToken : "comment"} + ], + "line_comment" : [ + {token : "comment", regex : "$|^", next : "no_regex"}, + {defaultToken : "comment"} + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qqstring" + }, { + token : "string", + regex : '"|$', + next : "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qstring" + }, { + token : "string", + regex : "'|$", + next : "no_regex" + }, { + defaultToken: "string" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("no_regex") ]); +}; + +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); + +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/json.js b/pitfall/pdfkit/node_modules/brace/mode/json.js new file mode 100644 index 00000000..7cd33f2f --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/json.js @@ -0,0 +1,619 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/json', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/json_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle', 'ace/worker/worker_client'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var HighlightRules = acequire("./json_highlight_rules").JsonHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; + +var Mode = function() { + this.HighlightRules = HighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/json"), "JsonWorker"); + worker.attachToDocument(session.getDocument()); + + worker.on("error", function(e) { + session.setAnnotations([e.data]); + }); + + worker.on("ok", function() { + session.clearAnnotations(); + }); + + return worker; + }; + + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/json_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var JsonHighlightRules = function() { + this.$rules = { + "start" : [ + { + token : "variable", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)' + }, { + token : "string", // single line + regex : '"', + next : "string" + }, { + token : "constant.numeric", // hex + regex : "0[xX][0-9a-fA-F]+\\b" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "constant.language.boolean", + regex : "(?:true|false)\\b" + }, { + token : "invalid.illegal", // single quoted strings are not allowed + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : "invalid.illegal", // comments are not allowed + regex : "\\/\\/.*$" + }, { + token : "paren.lparen", + regex : "[[({]" + }, { + token : "paren.rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + } + ], + "string" : [ + { + token : "constant.language.escape", + regex : /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/ + }, { + token : "string", + regex : '[^"\\\\]+' + }, { + token : "string", + regex : '"', + next : "start" + }, { + token : "string", + regex : "", + next : "start" + } + ] + }; + +}; + +oop.inherits(JsonHighlightRules, TextHighlightRules); + +exports.JsonHighlightRules = JsonHighlightRules; +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/jsoniq.js b/pitfall/pdfkit/node_modules/brace/mode/jsoniq.js new file mode 100644 index 00000000..8898249f --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/jsoniq.js @@ -0,0 +1,2755 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ +ace.define('ace/mode/jsoniq', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/xquery/JSONiqLexer', 'ace/range', 'ace/mode/behaviour/xquery', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var JSONiqLexer = acequire("./xquery/JSONiqLexer").JSONiqLexer; +var Range = acequire("../range").Range; +var XQueryBehaviour = acequire("./behaviour/xquery").XQueryBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + + +var Mode = function() { + this.$tokenizer = new JSONiqLexer(); + this.$behaviour = new XQueryBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; + +oop.inherits(Mode, TextMode); + +(function() { + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + var match = line.match(/\s*(?:then|else|return|[{\(]|<\w+>)\s*$/); + if (match) + indent += tab; + return indent; + }; + + this.checkOutdent = function(state, line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*[\}\)]/.test(input); + }; + + this.autoOutdent = function(state, doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*[\}\)])/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.toggleCommentLines = function(state, doc, startRow, endRow) { + var i, line; + var outdent = true; + var re = /^\s*\(:(.*):\)/; + + for (i=startRow; i<= endRow; i++) { + if (!re.test(doc.getLine(i))) { + outdent = false; + break; + } + } + + var range = new Range(0, 0, 0, 0); + for (i=startRow; i<= endRow; i++) { + line = doc.getLine(i); + range.start.row = i; + range.end.row = i; + range.end.column = line.length; + + doc.replace(range, outdent ? line.match(re)[1] : "(:" + line + ":)"); + } + }; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/xquery/JSONiqLexer', ["require", 'exports', 'module' , 'ace/mode/xquery/JSONiqTokenizer'], function(acequire, exports, module) { + + var JSONiqTokenizer = acequire("./JSONiqTokenizer").JSONiqTokenizer; + + var TokenHandler = function(code) { + + var input = code; + + this.tokens = []; + + this.reset = function(code) { + input = input; + this.tokens = []; + }; + + this.startNonterminal = function(name, begin) {}; + + this.endNonterminal = function(name, end) {}; + + this.terminal = function(name, begin, end) { + this.tokens.push({ + name: name, + value: input.substring(begin, end) + }); + }; + + this.whitespace = function(begin, end) { + this.tokens.push({ + name: "WS", + value: input.substring(begin, end) + }); + }; + }; + var keys = "NaN|after|allowing|ancestor|ancestor-or-self|and|append|array|as|ascending|at|attribute|base-uri|before|boundary-space|break|by|case|cast|castable|catch|child|collation|comment|constraint|construction|contains|context|continue|copy|copy-namespaces|count|decimal-format|decimal-separator|declare|default|delete|descendant|descendant-or-self|descending|digit|div|document|document-node|element|else|empty|empty-sequence|encoding|end|eq|every|except|exit|external|false|first|following|following-sibling|for|from|ft-option|function|ge|greatest|group|grouping-separator|gt|idiv|if|import|in|index|infinity|insert|instance|integrity|intersect|into|is|item|json|json-item|jsoniq|last|lax|le|least|let|loop|lt|minus-sign|mod|modify|module|namespace|namespace-node|ne|next|node|nodes|not|null|object|of|only|option|or|order|ordered|ordering|paragraphs|parent|pattern-separator|per-mille|percent|preceding|preceding-sibling|previous|processing-instruction|rename|replace|return|returning|revalidation|satisfies|schema|schema-attribute|schema-element|score|select|self|sentences|sliding|some|stable|start|strict|switch|text|then|times|to|treat|true|try|tumbling|type|typeswitch|union|unordered|updating|validate|value|variable|version|when|where|while|window|with|words|xquery|zero-digit".split("|"); + var keywords = keys.map( + function(val) { return { name: "'" + val + "'", token: "keyword" }; } + ); + + var ncnames = keys.map( + function(val) { return { name: "'" + val + "'", token: "text", next: function(stack){ stack.pop(); } }; } + ); + + var cdata = "constant.language"; + var number = "constant"; + var xmlcomment = "comment"; + var pi = "xml-pe"; + var pragma = "constant.buildin"; + + var Rules = { + start: [ + { name: "'(#'", token: pragma, next: function(stack){ stack.push("Pragma"); } }, + { name: "'(:'", token: "comment", next: function(stack){ stack.push("Comment"); } }, + { name: "'(:~'", token: "comment.doc", next: function(stack){ stack.push("CommentDoc"); } }, + { name: "''", token: xmlcomment, next: function(stack){ stack.pop(); } } + ], + CData: [ + { name: "CDataSectionContents", token: cdata }, + { name: "']]>'", token: cdata, next: function(stack){ stack.pop(); } } + ], + PI: [ + { name: "DirPIContents", token: pi }, + { name: "'?'", token: pi }, + { name: "'?>'", token: pi, next: function(stack){ stack.pop(); } } + ], + AposString: [ + { name: "''''", token: "string", next: function(stack){ stack.pop(); } }, + { name: "PredefinedEntityRef", token: "constant.language.escape" }, + { name: "CharRef", token: "constant.language.escape" }, + { name: "EscapeApos", token: "constant.language.escape" }, + { name: "AposChar", token: "string" } + ], + QuotString: [ + { name: "'\"'", token: "string", next: function(stack){ stack.pop(); } }, + { name: "PredefinedEntityRef", token: "constant.language.escape" }, + { name: "CharRef", token: "constant.language.escape" }, + { name: "EscapeQuot", token: "constant.language.escape" }, + { name: "QuotChar", token: "string" } + ] + }; + +exports.JSONiqLexer = function() { + + this.tokens = []; + + this.getLineTokens = function(line, state, row) { + state = (state === "start" || !state) ? '["start"]' : state; + var stack = JSON.parse(state); + var h = new TokenHandler(line); + var tokenizer = new JSONiqTokenizer(line, h); + var tokens = []; + + while(true) { + var currentState = stack[stack.length - 1]; + try { + + h.tokens = []; + tokenizer["parse_" + currentState](); + var info = null; + + if(h.tokens.length > 1 && h.tokens[0].name === "WS") { + tokens.push({ + type: "text", + value: h.tokens[0].value + }); + h.tokens.splice(0, 1); + } + + var token = h.tokens[0]; + var rules = Rules[currentState]; + for(var k = 0; k < rules.length; k++) { + var rule = Rules[currentState][k]; + if((typeof(rule.name) === "function" && rule.name(token)) || rule.name === token.name) { + info = rule; + break; + } + } + + if(token.name === "EOF") { break; } + if(token.value === "") { throw "Encountered empty string lexical rule."; } + + tokens.push({ + type: info === null ? "text" : (typeof(info.token) === "function" ? info.token(token.value) : info.token), + value: token.value + }); + + if(info && info.next) { + info.next(stack); + } + + } catch(e) { + if(e instanceof tokenizer.ParseException) { + var index = 0; + for(var i=0; i < tokens.length; i++) { + index += tokens[i].value.length; + } + tokens.push({ type: "text", value: line.substring(index) }); + return { + tokens: tokens, + state: JSON.stringify(["start"]) + }; + } else { + throw e; + } + } + } + + + if(this.tokens[row] !== undefined) { + var cachedLine = this.lines[row]; + var begin = sharedStart([line, cachedLine]); + var diff = cachedLine.length - line.length; + var idx = 0; + var col = 0; + for(var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + for(var j = 0; j < this.tokens[row].length; j++) { + var semanticToken = this.tokens[row][j]; + if( + ((col + token.value.length) <= begin.length && semanticToken.sc === col && semanticToken.ec === (col + token.value.length)) || + (semanticToken.sc === (col + diff) && semanticToken.ec === (col + token.value.length + diff)) + ) { + idx = i; + tokens[i].type = semanticToken.type; + } + } + col += token.value.length; + } + } + + return { + tokens: tokens, + state: JSON.stringify(stack) + }; + }; + + function sharedStart(A) { + var tem1, tem2, s, A = A.slice(0).sort(); + tem1 = A[0]; + s = tem1.length; + tem2 = A.pop(); + while(s && tem2.indexOf(tem1) == -1) { + tem1 = tem1.substring(0, --s); + } + return tem1; + } +}; +}); + + ace.define('ace/mode/xquery/JSONiqTokenizer', ["require", 'exports', 'module' ], function(acequire, exports, module) { + var JSONiqTokenizer = exports.JSONiqTokenizer = function JSONiqTokenizer(string, parsingEventHandler) + { + init(string, parsingEventHandler); + var self = this; + + this.ParseException = function(b, e, s, o, x) + { + var + begin = b, + end = e, + state = s, + offending = o, + expected = x; + + this.getBegin = function() {return begin;}; + this.getEnd = function() {return end;}; + this.getState = function() {return state;}; + this.getExpected = function() {return expected;}; + this.getOffending = function() {return offending;}; + + this.getMessage = function() + { + return offending < 0 ? "lexical analysis failed" : "syntax error"; + }; + }; + + function init(string, parsingEventHandler) + { + eventHandler = parsingEventHandler; + input = string; + size = string.length; + reset(0, 0, 0); + } + + this.getInput = function() + { + return input; + }; + + function reset(l, b, e) + { + b0 = b; e0 = b; + l1 = l; b1 = b; e1 = e; + end = e; + eventHandler.reset(input); + } + + this.getOffendingToken = function(e) + { + var o = e.getOffending(); + return o >= 0 ? JSONiqTokenizer.TOKEN[o] : null; + }; + + this.getExpectedTokenSet = function(e) + { + var expected; + if (e.getExpected() < 0) + { + expected = JSONiqTokenizer.getTokenSet(- e.getState()); + } + else + { + expected = [JSONiqTokenizer.TOKEN[e.getExpected()]]; + } + return expected; + }; + + this.getErrorMessage = function(e) + { + var tokenSet = this.getExpectedTokenSet(e); + var found = this.getOffendingToken(e); + var prefix = input.substring(0, e.getBegin()); + var lines = prefix.split("\n"); + var line = lines.length; + var column = lines[line - 1].length + 1; + var size = e.getEnd() - e.getBegin(); + return e.getMessage() + + (found == null ? "" : ", found " + found) + + "\nwhile expecting " + + (tokenSet.length == 1 ? tokenSet[0] : ("[" + tokenSet.join(", ") + "]")) + + "\n" + + (size == 0 || found != null ? "" : "after successfully scanning " + size + " characters beginning ") + + "at line " + line + ", column " + column + ":\n..." + + input.substring(e.getBegin(), Math.min(input.length, e.getBegin() + 64)) + + "..."; + }; + + this.parse_start = function() + { + eventHandler.startNonterminal("start", e0); + lookahead1W(14); // ModuleDecl | Annotation | OptionDecl | Operator | Variable | Tag | AttrTest | + switch (l1) + { + case 55: // '' | '=' | '>' + switch (l1) + { + case 58: // '>' + shift(58); // '>' + break; + case 50: // '/>' + shift(50); // '/>' + break; + case 27: // QName + shift(27); // QName + break; + case 57: // '=' + shift(57); // '=' + break; + case 35: // '"' + shift(35); // '"' + break; + case 38: // "'" + shift(38); // "'" + break; + default: + shift(33); // EOF + } + eventHandler.endNonterminal("StartTag", e0); + }; + + this.parse_TagContent = function() + { + eventHandler.startNonterminal("TagContent", e0); + lookahead1(11); // Tag | EndTag | PredefinedEntityRef | ElementContentChar | CharRef | EOF | + switch (l1) + { + case 23: // ElementContentChar + shift(23); // ElementContentChar + break; + case 6: // Tag + shift(6); // Tag + break; + case 7: // EndTag + shift(7); // EndTag + break; + case 55: // '' + switch (l1) + { + case 11: // CDataSectionContents + shift(11); // CDataSectionContents + break; + case 64: // ']]>' + shift(64); // ']]>' + break; + default: + shift(33); // EOF + } + eventHandler.endNonterminal("CData", e0); + }; + + this.parse_XMLComment = function() + { + eventHandler.startNonterminal("XMLComment", e0); + lookahead1(0); // DirCommentContents | EOF | '-->' + switch (l1) + { + case 9: // DirCommentContents + shift(9); // DirCommentContents + break; + case 47: // '-->' + shift(47); // '-->' + break; + default: + shift(33); // EOF + } + eventHandler.endNonterminal("XMLComment", e0); + }; + + this.parse_PI = function() + { + eventHandler.startNonterminal("PI", e0); + lookahead1(3); // DirPIContents | EOF | '?' | '?>' + switch (l1) + { + case 10: // DirPIContents + shift(10); // DirPIContents + break; + case 59: // '?' + shift(59); // '?' + break; + case 60: // '?>' + shift(60); // '?>' + break; + default: + shift(33); // EOF + } + eventHandler.endNonterminal("PI", e0); + }; + + this.parse_Pragma = function() + { + eventHandler.startNonterminal("Pragma", e0); + lookahead1(2); // PragmaContents | EOF | '#' | '#)' + switch (l1) + { + case 8: // PragmaContents + shift(8); // PragmaContents + break; + case 36: // '#' + shift(36); // '#' + break; + case 37: // '#)' + shift(37); // '#)' + break; + default: + shift(33); // EOF + } + eventHandler.endNonterminal("Pragma", e0); + }; + + this.parse_Comment = function() + { + eventHandler.startNonterminal("Comment", e0); + lookahead1(4); // CommentContents | EOF | '(:' | ':)' + switch (l1) + { + case 52: // ':)' + shift(52); // ':)' + break; + case 41: // '(:' + shift(41); // '(:' + break; + case 30: // CommentContents + shift(30); // CommentContents + break; + default: + shift(33); // EOF + } + eventHandler.endNonterminal("Comment", e0); + }; + + this.parse_CommentDoc = function() + { + eventHandler.startNonterminal("CommentDoc", e0); + lookahead1(5); // DocTag | DocCommentContents | EOF | '(:' | ':)' + switch (l1) + { + case 31: // DocTag + shift(31); // DocTag + break; + case 32: // DocCommentContents + shift(32); // DocCommentContents + break; + case 52: // ':)' + shift(52); // ':)' + break; + case 41: // '(:' + shift(41); // '(:' + break; + default: + shift(33); // EOF + } + eventHandler.endNonterminal("CommentDoc", e0); + }; + + this.parse_QuotString = function() + { + eventHandler.startNonterminal("QuotString", e0); + lookahead1(6); // PredefinedEntityRef | EscapeQuot | QuotChar | CharRef | EOF | '"' + switch (l1) + { + case 18: // PredefinedEntityRef + shift(18); // PredefinedEntityRef + break; + case 29: // CharRef + shift(29); // CharRef + break; + case 19: // EscapeQuot + shift(19); // EscapeQuot + break; + case 21: // QuotChar + shift(21); // QuotChar + break; + case 35: // '"' + shift(35); // '"' + break; + default: + shift(33); // EOF + } + eventHandler.endNonterminal("QuotString", e0); + }; + + this.parse_AposString = function() + { + eventHandler.startNonterminal("AposString", e0); + lookahead1(7); // PredefinedEntityRef | EscapeApos | AposChar | CharRef | EOF | "'" + switch (l1) + { + case 18: // PredefinedEntityRef + shift(18); // PredefinedEntityRef + break; + case 29: // CharRef + shift(29); // CharRef + break; + case 20: // EscapeApos + shift(20); // EscapeApos + break; + case 22: // AposChar + shift(22); // AposChar + break; + case 38: // "'" + shift(38); // "'" + break; + default: + shift(33); // EOF + } + eventHandler.endNonterminal("AposString", e0); + }; + + this.parse_Prefix = function() + { + eventHandler.startNonterminal("Prefix", e0); + lookahead1W(13); // NCName^Token | S^WS | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | + whitespace(); + parse_NCName(); + eventHandler.endNonterminal("Prefix", e0); + }; + + this.parse__EQName = function() + { + eventHandler.startNonterminal("_EQName", e0); + lookahead1W(12); // EQName^Token | S^WS | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | + whitespace(); + parse_EQName(); + eventHandler.endNonterminal("_EQName", e0); + }; + + function parse_EQName() + { + eventHandler.startNonterminal("EQName", e0); + switch (l1) + { + case 77: // 'attribute' + shift(77); // 'attribute' + break; + case 91: // 'comment' + shift(91); // 'comment' + break; + case 115: // 'document-node' + shift(115); // 'document-node' + break; + case 116: // 'element' + shift(116); // 'element' + break; + case 119: // 'empty-sequence' + shift(119); // 'empty-sequence' + break; + case 140: // 'function' + shift(140); // 'function' + break; + case 147: // 'if' + shift(147); // 'if' + break; + case 160: // 'item' + shift(160); // 'item' + break; + case 180: // 'namespace-node' + shift(180); // 'namespace-node' + break; + case 186: // 'node' + shift(186); // 'node' + break; + case 211: // 'processing-instruction' + shift(211); // 'processing-instruction' + break; + case 221: // 'schema-attribute' + shift(221); // 'schema-attribute' + break; + case 222: // 'schema-element' + shift(222); // 'schema-element' + break; + case 238: // 'switch' + shift(238); // 'switch' + break; + case 239: // 'text' + shift(239); // 'text' + break; + case 248: // 'typeswitch' + shift(248); // 'typeswitch' + break; + default: + parse_FunctionName(); + } + eventHandler.endNonterminal("EQName", e0); + } + + function parse_FunctionName() + { + eventHandler.startNonterminal("FunctionName", e0); + switch (l1) + { + case 14: // EQName^Token + shift(14); // EQName^Token + break; + case 65: // 'after' + shift(65); // 'after' + break; + case 68: // 'ancestor' + shift(68); // 'ancestor' + break; + case 69: // 'ancestor-or-self' + shift(69); // 'ancestor-or-self' + break; + case 70: // 'and' + shift(70); // 'and' + break; + case 74: // 'as' + shift(74); // 'as' + break; + case 75: // 'ascending' + shift(75); // 'ascending' + break; + case 79: // 'before' + shift(79); // 'before' + break; + case 83: // 'case' + shift(83); // 'case' + break; + case 84: // 'cast' + shift(84); // 'cast' + break; + case 85: // 'castable' + shift(85); // 'castable' + break; + case 88: // 'child' + shift(88); // 'child' + break; + case 89: // 'collation' + shift(89); // 'collation' + break; + case 98: // 'copy' + shift(98); // 'copy' + break; + case 100: // 'count' + shift(100); // 'count' + break; + case 103: // 'declare' + shift(103); // 'declare' + break; + case 104: // 'default' + shift(104); // 'default' + break; + case 105: // 'delete' + shift(105); // 'delete' + break; + case 106: // 'descendant' + shift(106); // 'descendant' + break; + case 107: // 'descendant-or-self' + shift(107); // 'descendant-or-self' + break; + case 108: // 'descending' + shift(108); // 'descending' + break; + case 113: // 'div' + shift(113); // 'div' + break; + case 114: // 'document' + shift(114); // 'document' + break; + case 117: // 'else' + shift(117); // 'else' + break; + case 118: // 'empty' + shift(118); // 'empty' + break; + case 121: // 'end' + shift(121); // 'end' + break; + case 123: // 'eq' + shift(123); // 'eq' + break; + case 124: // 'every' + shift(124); // 'every' + break; + case 126: // 'except' + shift(126); // 'except' + break; + case 129: // 'first' + shift(129); // 'first' + break; + case 130: // 'following' + shift(130); // 'following' + break; + case 131: // 'following-sibling' + shift(131); // 'following-sibling' + break; + case 132: // 'for' + shift(132); // 'for' + break; + case 141: // 'ge' + shift(141); // 'ge' + break; + case 143: // 'group' + shift(143); // 'group' + break; + case 145: // 'gt' + shift(145); // 'gt' + break; + case 146: // 'idiv' + shift(146); // 'idiv' + break; + case 148: // 'import' + shift(148); // 'import' + break; + case 154: // 'insert' + shift(154); // 'insert' + break; + case 155: // 'instance' + shift(155); // 'instance' + break; + case 157: // 'intersect' + shift(157); // 'intersect' + break; + case 158: // 'into' + shift(158); // 'into' + break; + case 159: // 'is' + shift(159); // 'is' + break; + case 165: // 'last' + shift(165); // 'last' + break; + case 167: // 'le' + shift(167); // 'le' + break; + case 169: // 'let' + shift(169); // 'let' + break; + case 173: // 'lt' + shift(173); // 'lt' + break; + case 175: // 'mod' + shift(175); // 'mod' + break; + case 176: // 'modify' + shift(176); // 'modify' + break; + case 177: // 'module' + shift(177); // 'module' + break; + case 179: // 'namespace' + shift(179); // 'namespace' + break; + case 181: // 'ne' + shift(181); // 'ne' + break; + case 193: // 'only' + shift(193); // 'only' + break; + case 195: // 'or' + shift(195); // 'or' + break; + case 196: // 'order' + shift(196); // 'order' + break; + case 197: // 'ordered' + shift(197); // 'ordered' + break; + case 201: // 'parent' + shift(201); // 'parent' + break; + case 207: // 'preceding' + shift(207); // 'preceding' + break; + case 208: // 'preceding-sibling' + shift(208); // 'preceding-sibling' + break; + case 213: // 'rename' + shift(213); // 'rename' + break; + case 214: // 'replace' + shift(214); // 'replace' + break; + case 215: // 'return' + shift(215); // 'return' + break; + case 219: // 'satisfies' + shift(219); // 'satisfies' + break; + case 224: // 'self' + shift(224); // 'self' + break; + case 230: // 'some' + shift(230); // 'some' + break; + case 231: // 'stable' + shift(231); // 'stable' + break; + case 232: // 'start' + shift(232); // 'start' + break; + case 243: // 'to' + shift(243); // 'to' + break; + case 244: // 'treat' + shift(244); // 'treat' + break; + case 245: // 'try' + shift(245); // 'try' + break; + case 249: // 'union' + shift(249); // 'union' + break; + case 251: // 'unordered' + shift(251); // 'unordered' + break; + case 255: // 'validate' + shift(255); // 'validate' + break; + case 261: // 'where' + shift(261); // 'where' + break; + case 265: // 'with' + shift(265); // 'with' + break; + case 269: // 'xquery' + shift(269); // 'xquery' + break; + case 67: // 'allowing' + shift(67); // 'allowing' + break; + case 76: // 'at' + shift(76); // 'at' + break; + case 78: // 'base-uri' + shift(78); // 'base-uri' + break; + case 80: // 'boundary-space' + shift(80); // 'boundary-space' + break; + case 81: // 'break' + shift(81); // 'break' + break; + case 86: // 'catch' + shift(86); // 'catch' + break; + case 93: // 'construction' + shift(93); // 'construction' + break; + case 96: // 'context' + shift(96); // 'context' + break; + case 97: // 'continue' + shift(97); // 'continue' + break; + case 99: // 'copy-namespaces' + shift(99); // 'copy-namespaces' + break; + case 101: // 'decimal-format' + shift(101); // 'decimal-format' + break; + case 120: // 'encoding' + shift(120); // 'encoding' + break; + case 127: // 'exit' + shift(127); // 'exit' + break; + case 128: // 'external' + shift(128); // 'external' + break; + case 136: // 'ft-option' + shift(136); // 'ft-option' + break; + case 149: // 'in' + shift(149); // 'in' + break; + case 150: // 'index' + shift(150); // 'index' + break; + case 156: // 'integrity' + shift(156); // 'integrity' + break; + case 166: // 'lax' + shift(166); // 'lax' + break; + case 187: // 'nodes' + shift(187); // 'nodes' + break; + case 194: // 'option' + shift(194); // 'option' + break; + case 198: // 'ordering' + shift(198); // 'ordering' + break; + case 217: // 'revalidation' + shift(217); // 'revalidation' + break; + case 220: // 'schema' + shift(220); // 'schema' + break; + case 223: // 'score' + shift(223); // 'score' + break; + case 229: // 'sliding' + shift(229); // 'sliding' + break; + case 235: // 'strict' + shift(235); // 'strict' + break; + case 246: // 'tumbling' + shift(246); // 'tumbling' + break; + case 247: // 'type' + shift(247); // 'type' + break; + case 252: // 'updating' + shift(252); // 'updating' + break; + case 256: // 'value' + shift(256); // 'value' + break; + case 257: // 'variable' + shift(257); // 'variable' + break; + case 258: // 'version' + shift(258); // 'version' + break; + case 262: // 'while' + shift(262); // 'while' + break; + case 92: // 'constraint' + shift(92); // 'constraint' + break; + case 171: // 'loop' + shift(171); // 'loop' + break; + default: + shift(216); // 'returning' + } + eventHandler.endNonterminal("FunctionName", e0); + } + + function parse_NCName() + { + eventHandler.startNonterminal("NCName", e0); + switch (l1) + { + case 26: // NCName^Token + shift(26); // NCName^Token + break; + case 65: // 'after' + shift(65); // 'after' + break; + case 70: // 'and' + shift(70); // 'and' + break; + case 74: // 'as' + shift(74); // 'as' + break; + case 75: // 'ascending' + shift(75); // 'ascending' + break; + case 79: // 'before' + shift(79); // 'before' + break; + case 83: // 'case' + shift(83); // 'case' + break; + case 84: // 'cast' + shift(84); // 'cast' + break; + case 85: // 'castable' + shift(85); // 'castable' + break; + case 89: // 'collation' + shift(89); // 'collation' + break; + case 100: // 'count' + shift(100); // 'count' + break; + case 104: // 'default' + shift(104); // 'default' + break; + case 108: // 'descending' + shift(108); // 'descending' + break; + case 113: // 'div' + shift(113); // 'div' + break; + case 117: // 'else' + shift(117); // 'else' + break; + case 118: // 'empty' + shift(118); // 'empty' + break; + case 121: // 'end' + shift(121); // 'end' + break; + case 123: // 'eq' + shift(123); // 'eq' + break; + case 126: // 'except' + shift(126); // 'except' + break; + case 132: // 'for' + shift(132); // 'for' + break; + case 141: // 'ge' + shift(141); // 'ge' + break; + case 143: // 'group' + shift(143); // 'group' + break; + case 145: // 'gt' + shift(145); // 'gt' + break; + case 146: // 'idiv' + shift(146); // 'idiv' + break; + case 155: // 'instance' + shift(155); // 'instance' + break; + case 157: // 'intersect' + shift(157); // 'intersect' + break; + case 158: // 'into' + shift(158); // 'into' + break; + case 159: // 'is' + shift(159); // 'is' + break; + case 167: // 'le' + shift(167); // 'le' + break; + case 169: // 'let' + shift(169); // 'let' + break; + case 173: // 'lt' + shift(173); // 'lt' + break; + case 175: // 'mod' + shift(175); // 'mod' + break; + case 176: // 'modify' + shift(176); // 'modify' + break; + case 181: // 'ne' + shift(181); // 'ne' + break; + case 193: // 'only' + shift(193); // 'only' + break; + case 195: // 'or' + shift(195); // 'or' + break; + case 196: // 'order' + shift(196); // 'order' + break; + case 215: // 'return' + shift(215); // 'return' + break; + case 219: // 'satisfies' + shift(219); // 'satisfies' + break; + case 231: // 'stable' + shift(231); // 'stable' + break; + case 232: // 'start' + shift(232); // 'start' + break; + case 243: // 'to' + shift(243); // 'to' + break; + case 244: // 'treat' + shift(244); // 'treat' + break; + case 249: // 'union' + shift(249); // 'union' + break; + case 261: // 'where' + shift(261); // 'where' + break; + case 265: // 'with' + shift(265); // 'with' + break; + case 68: // 'ancestor' + shift(68); // 'ancestor' + break; + case 69: // 'ancestor-or-self' + shift(69); // 'ancestor-or-self' + break; + case 77: // 'attribute' + shift(77); // 'attribute' + break; + case 88: // 'child' + shift(88); // 'child' + break; + case 91: // 'comment' + shift(91); // 'comment' + break; + case 98: // 'copy' + shift(98); // 'copy' + break; + case 103: // 'declare' + shift(103); // 'declare' + break; + case 105: // 'delete' + shift(105); // 'delete' + break; + case 106: // 'descendant' + shift(106); // 'descendant' + break; + case 107: // 'descendant-or-self' + shift(107); // 'descendant-or-self' + break; + case 114: // 'document' + shift(114); // 'document' + break; + case 115: // 'document-node' + shift(115); // 'document-node' + break; + case 116: // 'element' + shift(116); // 'element' + break; + case 119: // 'empty-sequence' + shift(119); // 'empty-sequence' + break; + case 124: // 'every' + shift(124); // 'every' + break; + case 129: // 'first' + shift(129); // 'first' + break; + case 130: // 'following' + shift(130); // 'following' + break; + case 131: // 'following-sibling' + shift(131); // 'following-sibling' + break; + case 140: // 'function' + shift(140); // 'function' + break; + case 147: // 'if' + shift(147); // 'if' + break; + case 148: // 'import' + shift(148); // 'import' + break; + case 154: // 'insert' + shift(154); // 'insert' + break; + case 160: // 'item' + shift(160); // 'item' + break; + case 165: // 'last' + shift(165); // 'last' + break; + case 177: // 'module' + shift(177); // 'module' + break; + case 179: // 'namespace' + shift(179); // 'namespace' + break; + case 180: // 'namespace-node' + shift(180); // 'namespace-node' + break; + case 186: // 'node' + shift(186); // 'node' + break; + case 197: // 'ordered' + shift(197); // 'ordered' + break; + case 201: // 'parent' + shift(201); // 'parent' + break; + case 207: // 'preceding' + shift(207); // 'preceding' + break; + case 208: // 'preceding-sibling' + shift(208); // 'preceding-sibling' + break; + case 211: // 'processing-instruction' + shift(211); // 'processing-instruction' + break; + case 213: // 'rename' + shift(213); // 'rename' + break; + case 214: // 'replace' + shift(214); // 'replace' + break; + case 221: // 'schema-attribute' + shift(221); // 'schema-attribute' + break; + case 222: // 'schema-element' + shift(222); // 'schema-element' + break; + case 224: // 'self' + shift(224); // 'self' + break; + case 230: // 'some' + shift(230); // 'some' + break; + case 238: // 'switch' + shift(238); // 'switch' + break; + case 239: // 'text' + shift(239); // 'text' + break; + case 245: // 'try' + shift(245); // 'try' + break; + case 248: // 'typeswitch' + shift(248); // 'typeswitch' + break; + case 251: // 'unordered' + shift(251); // 'unordered' + break; + case 255: // 'validate' + shift(255); // 'validate' + break; + case 257: // 'variable' + shift(257); // 'variable' + break; + case 269: // 'xquery' + shift(269); // 'xquery' + break; + case 67: // 'allowing' + shift(67); // 'allowing' + break; + case 76: // 'at' + shift(76); // 'at' + break; + case 78: // 'base-uri' + shift(78); // 'base-uri' + break; + case 80: // 'boundary-space' + shift(80); // 'boundary-space' + break; + case 81: // 'break' + shift(81); // 'break' + break; + case 86: // 'catch' + shift(86); // 'catch' + break; + case 93: // 'construction' + shift(93); // 'construction' + break; + case 96: // 'context' + shift(96); // 'context' + break; + case 97: // 'continue' + shift(97); // 'continue' + break; + case 99: // 'copy-namespaces' + shift(99); // 'copy-namespaces' + break; + case 101: // 'decimal-format' + shift(101); // 'decimal-format' + break; + case 120: // 'encoding' + shift(120); // 'encoding' + break; + case 127: // 'exit' + shift(127); // 'exit' + break; + case 128: // 'external' + shift(128); // 'external' + break; + case 136: // 'ft-option' + shift(136); // 'ft-option' + break; + case 149: // 'in' + shift(149); // 'in' + break; + case 150: // 'index' + shift(150); // 'index' + break; + case 156: // 'integrity' + shift(156); // 'integrity' + break; + case 166: // 'lax' + shift(166); // 'lax' + break; + case 187: // 'nodes' + shift(187); // 'nodes' + break; + case 194: // 'option' + shift(194); // 'option' + break; + case 198: // 'ordering' + shift(198); // 'ordering' + break; + case 217: // 'revalidation' + shift(217); // 'revalidation' + break; + case 220: // 'schema' + shift(220); // 'schema' + break; + case 223: // 'score' + shift(223); // 'score' + break; + case 229: // 'sliding' + shift(229); // 'sliding' + break; + case 235: // 'strict' + shift(235); // 'strict' + break; + case 246: // 'tumbling' + shift(246); // 'tumbling' + break; + case 247: // 'type' + shift(247); // 'type' + break; + case 252: // 'updating' + shift(252); // 'updating' + break; + case 256: // 'value' + shift(256); // 'value' + break; + case 258: // 'version' + shift(258); // 'version' + break; + case 262: // 'while' + shift(262); // 'while' + break; + case 92: // 'constraint' + shift(92); // 'constraint' + break; + case 171: // 'loop' + shift(171); // 'loop' + break; + default: + shift(216); // 'returning' + } + eventHandler.endNonterminal("NCName", e0); + } + + function shift(t) + { + if (l1 == t) + { + whitespace(); + eventHandler.terminal(JSONiqTokenizer.TOKEN[l1], b1, e1 > size ? size : e1); + b0 = b1; e0 = e1; l1 = 0; + } + else + { + error(b1, e1, 0, l1, t); + } + } + + function whitespace() + { + if (e0 != b1) + { + b0 = e0; + e0 = b1; + eventHandler.whitespace(b0, e0); + } + } + + function matchW(set) + { + var code; + for (;;) + { + code = match(set); + if (code != 28) // S^WS + { + break; + } + } + return code; + } + + function lookahead1W(set) + { + if (l1 == 0) + { + l1 = matchW(set); + b1 = begin; + e1 = end; + } + } + + function lookahead1(set) + { + if (l1 == 0) + { + l1 = match(set); + b1 = begin; + e1 = end; + } + } + + function error(b, e, s, l, t) + { + throw new self.ParseException(b, e, s, l, t); + } + + var lk, b0, e0; + var l1, b1, e1; + var eventHandler; + + var input; + var size; + var begin; + var end; + + function match(tokenSetId) + { + var nonbmp = false; + begin = end; + var current = end; + var result = JSONiqTokenizer.INITIAL[tokenSetId]; + var state = 0; + + for (var code = result & 4095; code != 0; ) + { + var charclass; + var c0 = current < size ? input.charCodeAt(current) : 0; + ++current; + if (c0 < 0x80) + { + charclass = JSONiqTokenizer.MAP0[c0]; + } + else if (c0 < 0xd800) + { + var c1 = c0 >> 4; + charclass = JSONiqTokenizer.MAP1[(c0 & 15) + JSONiqTokenizer.MAP1[(c1 & 31) + JSONiqTokenizer.MAP1[c1 >> 5]]]; + } + else + { + if (c0 < 0xdc00) + { + var c1 = current < size ? input.charCodeAt(current) : 0; + if (c1 >= 0xdc00 && c1 < 0xe000) + { + ++current; + c0 = ((c0 & 0x3ff) << 10) + (c1 & 0x3ff) + 0x10000; + nonbmp = true; + } + } + var lo = 0, hi = 5; + for (var m = 3; ; m = (hi + lo) >> 1) + { + if (JSONiqTokenizer.MAP2[m] > c0) hi = m - 1; + else if (JSONiqTokenizer.MAP2[6 + m] < c0) lo = m + 1; + else {charclass = JSONiqTokenizer.MAP2[12 + m]; break;} + if (lo > hi) {charclass = 0; break;} + } + } + + state = code; + var i0 = (charclass << 12) + code - 1; + code = JSONiqTokenizer.TRANSITION[(i0 & 15) + JSONiqTokenizer.TRANSITION[i0 >> 4]]; + + if (code > 4095) + { + result = code; + code &= 4095; + end = current; + } + } + + result >>= 12; + if (result == 0) + { + end = current - 1; + var c1 = end < size ? input.charCodeAt(end) : 0; + if (c1 >= 0xdc00 && c1 < 0xe000) --end; + return error(begin, end, state, -1, -1); + } + + if (nonbmp) + { + for (var i = result >> 9; i > 0; --i) + { + --end; + var c1 = end < size ? input.charCodeAt(end) : 0; + if (c1 >= 0xdc00 && c1 < 0xe000) --end; + } + } + else + { + end -= result >> 9; + } + + return (result & 511) - 1; + } +} + +JSONiqTokenizer.getTokenSet = function(tokenSetId) +{ + var set = []; + var s = tokenSetId < 0 ? - tokenSetId : INITIAL[tokenSetId] & 4095; + for (var i = 0; i < 276; i += 32) + { + var j = i; + var i0 = (i >> 5) * 2062 + s - 1; + var i1 = i0 >> 2; + var i2 = i1 >> 2; + var f = JSONiqTokenizer.EXPECTED[(i0 & 3) + JSONiqTokenizer.EXPECTED[(i1 & 3) + JSONiqTokenizer.EXPECTED[(i2 & 3) + JSONiqTokenizer.EXPECTED[i2 >> 2]]]]; + for ( ; f != 0; f >>>= 1, ++j) + { + if ((f & 1) != 0) + { + set.push(JSONiqTokenizer.TOKEN[j]); + } + } + } + return set; +}; + +JSONiqTokenizer.MAP0 = +[ 66, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 27, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 31, 31, 33, 31, 31, 31, 31, 31, 31, 34, 35, 36, 35, 31, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 31, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 31, 61, 62, 63, 64, 35 +]; + +JSONiqTokenizer.MAP1 = +[ 108, 124, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 156, 181, 181, 181, 181, 181, 214, 215, 213, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 247, 261, 277, 293, 309, 347, 363, 379, 416, 416, 416, 408, 331, 323, 331, 323, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 433, 433, 433, 433, 433, 433, 433, 316, 331, 331, 331, 331, 331, 331, 331, 331, 394, 416, 416, 417, 415, 416, 416, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 330, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 416, 66, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 27, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 35, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 31, 31, 33, 31, 31, 31, 31, 31, 31, 34, 35, 36, 35, 31, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 31, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 31, 61, 62, 63, 64, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 31, 31, 35, 35, 35, 35, 35, 35, 35, 65, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65 +]; + +JSONiqTokenizer.MAP2 = +[ 57344, 63744, 64976, 65008, 65536, 983040, 63743, 64975, 65007, 65533, 983039, 1114111, 35, 31, 35, 31, 31, 35 +]; + +JSONiqTokenizer.INITIAL = +[ 1, 2, 36867, 45060, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 +]; + +JSONiqTokenizer.TRANSITION = +[ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22874, 18847, 17152, 19027, 19252, 17687, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 17365, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 17470, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 18199, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 17890, 17922, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18065, 36544, 18632, 18081, 18098, 18114, 18159, 18185, 18215, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17756, 18816, 18429, 18445, 18143, 17393, 18500, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 18590, 21686, 17152, 19027, 19252, 17687, 19027, 28677, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 17365, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 17470, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 18199, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 17890, 17922, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18065, 36544, 18632, 18081, 18098, 18114, 18159, 18185, 18215, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17756, 18816, 18429, 18445, 18143, 17393, 18500, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 20083, 18847, 18648, 19027, 19252, 21242, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 18774, 18789, 18805, 19027, 19252, 17687, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 18832, 22889, 18925, 19027, 19252, 17569, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18956, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 19073, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 18972, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21818, 18847, 19006, 19027, 19252, 17687, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21671, 18847, 19006, 19027, 19252, 17687, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22395, 20098, 18731, 19027, 19252, 17687, 19027, 17173, 23525, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 18129, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 20746, 19130, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 19043, 18847, 18620, 19027, 19252, 17687, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 19100, 22410, 19006, 19027, 19252, 17687, 19027, 19084, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21967, 21982, 19006, 19027, 19252, 17687, 19027, 18701, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22380, 18847, 19006, 19027, 19252, 30659, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 19157, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 19299, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 19191, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21758, 18847, 19006, 19027, 19252, 17687, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 19237, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21626, 18847, 19006, 19027, 19252, 17687, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 19268, 19284, 19326, 18482, 27869, 30509, 24384, 31417, 23323, 18482, 19370, 18482, 18484, 27202, 19389, 27202, 27202, 19411, 24384, 34295, 24384, 24384, 25485, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202, 28530, 19459, 24384, 24384, 24384, 24384, 24017, 18036, 24041, 18482, 18482, 18482, 18484, 19487, 27202, 27202, 27202, 27202, 19503, 35523, 19539, 24384, 24384, 24384, 19647, 18482, 35623, 18482, 18482, 23052, 27202, 19557, 27202, 27202, 30764, 23993, 24384, 19579, 24384, 24384, 26758, 18482, 18482, 19346, 27867, 27202, 27202, 19599, 17590, 23998, 24384, 24384, 19619, 25683, 18482, 18482, 28511, 27202, 27203, 23997, 19639, 19887, 28419, 18902, 18483, 19663, 27202, 24325, 35844, 19887, 30991, 19713, 19395, 19736, 22259, 19754, 22073, 19770, 35154, 19795, 19816, 19836, 19859, 25794, 34248, 24116, 19720, 19875, 30988, 23482, 30981, 28304, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21743, 18847, 19006, 19027, 19252, 17431, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22365, 18847, 19907, 19027, 19252, 17687, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21641, 18847, 19326, 18482, 27869, 30544, 24384, 29176, 21442, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 19935, 24384, 24384, 24384, 24384, 32316, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202, 28530, 19965, 24384, 24384, 24384, 24384, 31473, 18475, 18482, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 27202, 19988, 24384, 24384, 24384, 24384, 24384, 33654, 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 29523, 29939, 24384, 24384, 24384, 24384, 26114, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 20017, 22934, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 35771, 20047, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 20068, 19058, 20158, 20367, 20884, 17944, 20276, 20853, 25651, 20604, 20460, 20185, 20209, 17189, 17208, 17281, 17675, 20232, 20273, 20295, 20338, 22456, 20777, 20600, 21329, 20635, 20365, 20937, 21207, 17292, 17421, 21157, 17192, 21217, 22425, 20279, 25549, 22436, 20276, 20383, 18983, 20421, 20446, 21317, 21051, 20476, 20322, 20663, 20490, 17543, 17559, 17585, 22463, 20540, 19523, 20246, 20556, 20257, 20430, 20585, 20620, 20193, 20651, 17661, 18368, 17703, 17730, 17772, 19513, 20679, 20692, 22446, 21027, 21097, 18990, 21111, 20708, 20736, 17744, 17795, 17874, 17590, 25536, 20349, 20762, 20812, 20169, 20828, 21376, 17714, 17976, 18021, 18560, 20844, 20569, 25560, 20869, 20900, 18114, 18159, 20916, 20953, 21013, 21043, 21067, 18281, 21083, 18574, 21127, 21143, 21181, 20515, 20930, 20883, 20504, 21197, 21233, 21258, 20524, 20216, 17405, 21270, 21286, 21302, 20720, 20310, 21345, 21361, 21392, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21952, 18847, 19006, 19027, 19252, 17687, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 21427, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 21479, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 36500, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 28667, 21921, 17617, 36472, 18265, 17237, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 21550, 21509, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 21535, 30636, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21773, 18847, 21587, 19027, 19252, 17687, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21611, 18847, 19006, 19027, 19252, 18169, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21728, 19115, 21878, 19027, 19252, 17687, 19027, 19310, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 17379, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 21906, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 18322, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21937, 18605, 19006, 19027, 19252, 22018, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21656, 21833, 19006, 19027, 19252, 17687, 19027, 21519, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22305, 18847, 22034, 18482, 27869, 25325, 24384, 29176, 22062, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 22096, 24384, 24384, 24384, 24384, 30621, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202, 35010, 22148, 24384, 24384, 24384, 24384, 31473, 31659, 18482, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 27202, 19503, 24384, 24384, 24384, 24384, 24384, 32253, 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 30764, 21406, 24384, 24384, 24384, 24384, 26114, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 22171, 22934, 24384, 24384, 24384, 22228, 18482, 18482, 27202, 27202, 35771, 20047, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22305, 18847, 22034, 18482, 27869, 25325, 24384, 29176, 22062, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 22096, 24384, 24384, 24384, 24384, 30621, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202, 35010, 22148, 24384, 24384, 24384, 24384, 31473, 31659, 18482, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 27202, 19503, 24384, 24384, 24384, 24384, 24384, 31154, 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 30764, 21406, 24384, 24384, 24384, 24384, 26114, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 22171, 22934, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 35771, 20047, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22305, 18847, 22034, 18482, 27869, 25325, 24384, 29176, 22062, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 22096, 24384, 24384, 24384, 24384, 31644, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202, 35010, 22148, 24384, 24384, 24384, 24384, 31473, 31659, 18482, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 27202, 19503, 24384, 24384, 24384, 24384, 24384, 31154, 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 30764, 21406, 24384, 24384, 24384, 24384, 26114, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 22171, 22934, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 35771, 20047, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22305, 18847, 22034, 18482, 27869, 25325, 24384, 29176, 22062, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 22096, 24384, 24384, 24384, 24384, 30621, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202, 35010, 22148, 24384, 24384, 24384, 24384, 33557, 31659, 18482, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 27202, 19503, 24384, 24384, 24384, 24384, 24384, 31154, 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 30764, 21406, 24384, 24384, 24384, 24384, 26114, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 22171, 22934, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 35771, 20047, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22305, 18847, 22034, 18482, 27869, 34068, 24384, 29176, 22062, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 22245, 24384, 24384, 24384, 24384, 30621, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202, 35010, 22148, 24384, 24384, 24384, 24384, 31473, 31659, 18482, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 27202, 19503, 24384, 24384, 24384, 24384, 24384, 31154, 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 30764, 21406, 24384, 24384, 24384, 24384, 26114, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 22171, 22934, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 35771, 20047, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22305, 18847, 22034, 18482, 27869, 25325, 24384, 29176, 22062, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 22096, 24384, 24384, 24384, 24384, 18877, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202, 35010, 22148, 24384, 24384, 24384, 24384, 24017, 31659, 18482, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 27202, 19503, 24384, 24384, 24384, 24384, 24384, 19647, 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 30764, 23993, 24384, 24384, 24384, 24384, 26758, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 17590, 23998, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 27203, 23997, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22290, 18847, 22034, 18482, 27869, 34957, 24384, 29176, 22062, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 22096, 24384, 24384, 24384, 24384, 18877, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202, 35010, 22148, 24384, 24384, 24384, 24384, 24017, 31659, 18482, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 27202, 19503, 24384, 24384, 24384, 24384, 24384, 19647, 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 30764, 23993, 24384, 24384, 24384, 24384, 26758, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 17590, 23998, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 27203, 23997, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22305, 18847, 22034, 18482, 27869, 25325, 24384, 29176, 22062, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 22096, 24384, 24384, 24384, 24384, 18877, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202, 35010, 22148, 24384, 24384, 24384, 24384, 24017, 31659, 18482, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 27202, 19503, 24384, 24384, 24384, 24384, 24384, 19647, 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 30764, 23993, 24384, 24384, 24384, 24384, 34436, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 17590, 23998, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 27203, 23997, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22320, 18847, 19006, 19027, 19252, 17687, 19027, 17173, 27077, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 19919, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21803, 18847, 19006, 19027, 19252, 17687, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22275, 22479, 19006, 19027, 19252, 17687, 19027, 19141, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 22510, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22574, 18847, 22954, 22970, 27597, 22986, 23002, 23033, 22062, 18482, 18482, 18482, 23049, 27202, 27202, 27202, 23068, 22096, 24384, 24384, 24384, 23088, 31359, 31082, 19693, 18482, 28112, 28225, 19443, 35045, 27202, 27202, 23108, 23139, 23155, 23178, 24384, 24384, 23212, 35330, 31659, 23228, 18482, 23256, 23274, 27795, 26712, 23293, 35214, 34879, 33340, 23312, 18235, 23359, 32708, 23949, 24384, 23380, 35255, 23429, 18482, 33884, 23408, 23448, 27202, 27202, 23498, 23518, 21406, 23541, 24384, 24384, 23570, 26114, 23601, 23623, 18482, 33444, 23651, 32875, 27202, 22171, 18862, 23702, 36589, 24384, 18481, 23731, 32601, 27202, 23750, 23768, 20047, 32969, 24367, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 23784, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 28217, 31795, 23804, 26925, 34916, 23831, 26501, 25793, 23859, 23895, 23482, 30981, 22080, 19438, 27956, 19678, 29812, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22589, 18847, 22034, 18482, 27869, 25325, 24384, 29176, 22062, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 22096, 24384, 24384, 24384, 24384, 30621, 18482, 18482, 18482, 18482, 28902, 25794, 27202, 27202, 27202, 34019, 23914, 22148, 24384, 24384, 24384, 28393, 23930, 31659, 18482, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 27202, 19503, 24384, 24384, 24384, 24384, 24384, 31154, 26591, 18482, 18482, 18482, 31585, 23965, 27202, 27202, 27202, 23986, 22185, 24014, 24384, 24384, 24384, 24033, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 22171, 22934, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 35771, 20047, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 26504, 24057, 24107, 24132, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22604, 18847, 22034, 19697, 27869, 24166, 24384, 24182, 24198, 26600, 18482, 18482, 18484, 24233, 24249, 27202, 27202, 22096, 24268, 24284, 24384, 24384, 30621, 19800, 35427, 35999, 32609, 18482, 25794, 24303, 28959, 23752, 27202, 35010, 22148, 24341, 32040, 26837, 24383, 31473, 31659, 18482, 18482, 18482, 24784, 18484, 27202, 27202, 27202, 27202, 24401, 19503, 24384, 24384, 24384, 24384, 20134, 31154, 18482, 18482, 18482, 27845, 23052, 27202, 27202, 33502, 27202, 30764, 21406, 24384, 24384, 22938, 24384, 26114, 18482, 36246, 18482, 27867, 27202, 24423, 27202, 22171, 22934, 24384, 24442, 24384, 36762, 28438, 18482, 34466, 34508, 35771, 24461, 24385, 24477, 25677, 18482, 36220, 27202, 27202, 24498, 30954, 23715, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 24521, 30990, 27868, 34251, 30090, 23343, 24546, 19856, 25793, 19779, 30988, 23482, 26152, 22080, 19438, 29824, 24562, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22619, 18847, 22034, 25767, 22132, 25325, 23162, 29176, 24597, 24091, 23607, 24656, 26122, 24680, 24426, 24696, 28551, 22096, 24731, 24445, 24747, 23364, 30621, 18482, 18482, 18482, 18482, 24781, 25794, 27202, 27202, 27202, 34210, 35010, 22148, 24384, 24384, 24384, 33259, 31473, 22525, 24087, 24213, 18482, 18482, 34908, 24800, 30419, 27202, 27202, 32418, 19503, 29781, 35065, 24384, 24384, 19891, 31154, 24835, 18482, 18482, 24854, 29214, 27202, 27202, 32006, 27202, 30764, 35344, 24384, 24384, 31544, 24384, 26114, 33098, 27814, 27002, 27867, 34668, 25625, 24871, 22171, 22934, 19214, 34531, 24889, 18481, 18482, 18482, 27202, 27202, 35771, 20047, 24385, 19887, 25677, 18482, 33615, 27202, 27202, 24907, 24930, 23554, 30991, 18484, 27202, 31802, 22199, 19466, 23052, 23296, 19847, 30877, 31015, 24955, 19859, 24983, 34248, 30871, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 24999, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22634, 18847, 25024, 25040, 31293, 25056, 25072, 25088, 22062, 34734, 24217, 36253, 34808, 32637, 25104, 23072, 32848, 22245, 36623, 25120, 30679, 27356, 30621, 25136, 26455, 25174, 25208, 22540, 23240, 25224, 25240, 25256, 25306, 25341, 25357, 25418, 25446, 25470, 26739, 25522, 31659, 23635, 25576, 27398, 25593, 28592, 25945, 25617, 27202, 32546, 27295, 25641, 25850, 25667, 24384, 34758, 25699, 25716, 22552, 27787, 30221, 25756, 25789, 25810, 25828, 28333, 28988, 30764, 21493, 33405, 25848, 25866, 25904, 26114, 31227, 26677, 30167, 27867, 25941, 25961, 27202, 22171, 22934, 25977, 25997, 24384, 23394, 27775, 25740, 25270, 26013, 26048, 26064, 26104, 26138, 26178, 26211, 26230, 26247, 30500, 26380, 26282, 28388, 30991, 33711, 27202, 33645, 26324, 36716, 26353, 26374, 35300, 30990, 26396, 26415, 30927, 26358, 33832, 26442, 26471, 26487, 26520, 23482, 33146, 26539, 26555, 27956, 31266, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22649, 18847, 26576, 26189, 26616, 25325, 26643, 29176, 22062, 26669, 18482, 18482, 18484, 26693, 27202, 27202, 27202, 22096, 26728, 24384, 24384, 24384, 30621, 18482, 18482, 18482, 18482, 26782, 25794, 27202, 27202, 27202, 26258, 35010, 22148, 24384, 24384, 24384, 21571, 31473, 31659, 18482, 18482, 33949, 18482, 18484, 27202, 27202, 25812, 27202, 27202, 19503, 24384, 24384, 24384, 26800, 24384, 31154, 18482, 18482, 18482, 35570, 23052, 27202, 27202, 27202, 26817, 30764, 21406, 24384, 24384, 24384, 26836, 26114, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 22171, 22934, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 35771, 20047, 24385, 19887, 25677, 31882, 18483, 35699, 27202, 19738, 26853, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 26913, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 24967, 31061, 19438, 26953, 27663, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22664, 18847, 26990, 18482, 27869, 25325, 24384, 29176, 22062, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 22096, 24384, 24384, 24384, 24384, 23017, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202, 35010, 27024, 24384, 24384, 24384, 24384, 24017, 31659, 18482, 18482, 27047, 18482, 18484, 27202, 27202, 27331, 27202, 27202, 27066, 24384, 24384, 29025, 24384, 24384, 19647, 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 30764, 23993, 24384, 24384, 24384, 24384, 26758, 18482, 18482, 33957, 27867, 27202, 27202, 27093, 17590, 23998, 24384, 24384, 27114, 27135, 36322, 27153, 27201, 27219, 28359, 18229, 34780, 34405, 27235, 35972, 27268, 27293, 27311, 36040, 33984, 20980, 31851, 21453, 30535, 27347, 32520, 27372, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 26337, 30118, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22305, 18847, 22034, 27397, 27414, 27436, 27452, 27473, 22062, 18482, 18482, 30171, 18484, 27202, 27202, 27982, 27202, 22096, 24384, 24384, 25700, 24384, 18877, 18482, 18482, 18482, 18482, 18482, 34013, 27202, 27202, 27202, 27202, 29731, 22148, 24384, 24384, 24384, 24384, 27119, 31659, 27489, 18482, 18482, 18482, 18484, 27185, 27202, 27202, 27202, 27202, 19503, 27457, 24384, 24384, 24384, 24384, 19647, 18482, 18482, 18482, 27050, 23052, 27202, 27202, 27202, 32469, 30764, 23993, 24384, 24384, 24384, 34982, 26758, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 17590, 23998, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 27203, 23997, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 20796, 27202, 29362, 22110, 33940, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22679, 18847, 22034, 27508, 27528, 27553, 35182, 27569, 22062, 29693, 26300, 23258, 27585, 24715, 27613, 27202, 27648, 22096, 36597, 27698, 24384, 27733, 18877, 18482, 27811, 18482, 27830, 22046, 27865, 32194, 27202, 25158, 27885, 27913, 22148, 29458, 24384, 29977, 34392, 26750, 27763, 26889, 18482, 18482, 27252, 29886, 27929, 27202, 27202, 27202, 27981, 27998, 28024, 28045, 24384, 24384, 28062, 28081, 28128, 25506, 28145, 26088, 28160, 27202, 28173, 24640, 28189, 30764, 31496, 24384, 28205, 34154, 36166, 24939, 28241, 28259, 28283, 21463, 33034, 28320, 28349, 17590, 20967, 23092, 28375, 28409, 28095, 28435, 28454, 28474, 28509, 28527, 20001, 33682, 25879, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30272, 28267, 28546, 28567, 19425, 28583, 23052, 23296, 19847, 19471, 28608, 28653, 31075, 25794, 34248, 19856, 25793, 19779, 29644, 35950, 30318, 22080, 19438, 27956, 23123, 28693, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22305, 18847, 22034, 18482, 27869, 25325, 24384, 29176, 22062, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 22096, 24384, 24384, 24384, 24384, 18877, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202, 35010, 22148, 24384, 24384, 24384, 24384, 24017, 22494, 18482, 18482, 18482, 18482, 18484, 25283, 27202, 27202, 27202, 27202, 19503, 29397, 24384, 24384, 24384, 24384, 19647, 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 30764, 23993, 24384, 24384, 24384, 24384, 26758, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 17590, 23998, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 27203, 23997, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22694, 18847, 28740, 28775, 28810, 28834, 28850, 28873, 28889, 24142, 28936, 31945, 36329, 25290, 28954, 27632, 28975, 29004, 24505, 29020, 25454, 29041, 23017, 27512, 29083, 29103, 30721, 18482, 23478, 29123, 24819, 27202, 29148, 28920, 27024, 29166, 23196, 24384, 29192, 35529, 31659, 18482, 18482, 25601, 32589, 29211, 27202, 27202, 31434, 30700, 29230, 27066, 24384, 24384, 24384, 29255, 29306, 19647, 18482, 33383, 18482, 18482, 23052, 27202, 29333, 27202, 27202, 30764, 23993, 35925, 24384, 24384, 24384, 27717, 36123, 18482, 18482, 29350, 29413, 27202, 35642, 17590, 21411, 29432, 24384, 25981, 18481, 33866, 18482, 27202, 26967, 27203, 23997, 32729, 19887, 25677, 18482, 26897, 27202, 27202, 29451, 23870, 24354, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 31737, 19859, 25794, 34248, 19856, 29474, 29539, 29283, 29581, 29637, 22080, 32533, 29501, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22709, 18847, 22034, 29660, 29512, 25325, 33242, 29176, 29682, 27245, 18482, 29709, 33286, 26974, 27202, 29725, 29747, 22096, 19221, 24384, 32702, 29772, 18877, 26784, 33892, 28458, 18482, 18482, 25794, 29797, 27202, 29840, 27202, 35010, 22148, 35817, 24384, 29859, 24384, 24017, 36756, 25192, 18482, 18482, 29879, 18484, 27202, 29902, 27202, 26032, 27202, 29925, 24384, 29960, 24384, 33594, 24384, 19647, 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 29239, 29993, 24384, 24384, 24384, 24384, 26758, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 17590, 23998, 24384, 24384, 24384, 31665, 18482, 18482, 19603, 27202, 27203, 23997, 30013, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19949, 19466, 36661, 19563, 19847, 30029, 30128, 30062, 19859, 25794, 30078, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 30106, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22724, 18847, 30152, 30187, 30237, 30288, 30304, 30344, 22062, 35616, 32797, 25773, 18484, 29909, 34096, 26820, 27202, 22096, 24914, 23189, 29195, 24384, 18877, 34444, 30360, 18482, 18482, 18482, 23413, 24707, 27202, 27202, 27202, 35010, 30378, 34990, 24384, 24384, 24384, 24017, 29554, 18482, 18482, 27137, 18482, 31281, 30394, 27202, 27202, 30413, 30566, 19503, 30435, 24384, 24384, 29969, 35678, 19647, 28759, 30455, 35459, 35606, 23052, 28724, 30490, 30525, 30560, 30764, 23993, 20123, 30582, 30606, 30675, 26291, 33426, 28938, 27682, 30695, 23675, 33466, 28493, 17590, 23944, 20405, 34338, 20997, 32331, 26308, 30716, 30737, 24315, 30756, 21563, 36372, 30787, 26653, 24611, 33177, 32448, 30814, 31804, 25430, 25917, 26523, 18484, 28818, 31802, 29269, 19466, 28297, 34240, 23815, 26076, 30842, 30858, 32115, 30893, 30915, 32757, 25793, 30943, 30988, 23482, 30981, 30970, 31007, 27956, 19678, 29489, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22739, 18847, 31031, 31047, 32397, 31098, 31114, 31170, 22062, 18482, 29565, 35577, 36725, 27202, 33216, 31186, 24407, 22096, 24384, 20142, 31202, 34301, 27748, 31218, 33388, 27166, 18482, 29087, 27277, 27202, 31251, 31309, 27202, 31328, 31344, 24384, 31375, 31391, 24384, 31410, 31659, 18482, 36130, 32801, 18482, 18484, 27202, 27202, 31433, 31450, 27202, 19503, 24384, 24384, 31470, 33588, 24384, 32977, 18482, 18482, 18482, 18482, 30038, 27202, 27202, 27202, 27202, 31489, 32244, 24384, 24384, 24384, 24384, 31512, 18482, 28755, 18482, 24634, 35732, 27202, 27202, 28637, 31538, 35788, 24384, 24384, 19337, 31986, 18482, 33208, 25316, 27203, 29997, 29863, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 31560, 19887, 31601, 32369, 33316, 30136, 31629, 19972, 31681, 31726, 31753, 31781, 30046, 31820, 31847, 25794, 34282, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 31867, 30252, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22754, 18847, 22034, 18909, 30474, 31902, 24287, 31918, 31934, 32767, 35262, 27008, 29621, 34103, 19820, 29416, 33323, 22096, 27031, 30439, 29435, 28857, 29596, 18482, 18482, 18482, 31961, 18482, 25794, 27202, 27202, 35038, 27202, 35010, 22148, 24384, 24384, 29389, 24384, 24017, 31979, 18482, 26937, 18482, 18482, 18484, 27202, 31454, 32002, 27202, 27202, 32022, 24384, 33015, 32056, 24384, 24384, 33690, 18482, 18482, 33119, 18482, 23052, 27202, 27202, 27624, 27202, 29756, 32078, 24384, 24384, 34332, 24384, 26758, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 36691, 23998, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 27203, 23997, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 31710, 22155, 33181, 24252, 32103, 30990, 27868, 34251, 19859, 25794, 34248, 30265, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22305, 18847, 32138, 32166, 32186, 30826, 33252, 29067, 22062, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 22096, 24384, 24384, 24384, 24384, 23585, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202, 35010, 32210, 24384, 24384, 24384, 24384, 24017, 31659, 18482, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 27202, 32233, 24384, 24384, 24384, 24384, 24384, 19647, 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 30764, 23993, 24384, 24384, 24384, 24384, 26758, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 17590, 23998, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 27203, 23997, 24385, 19887, 25677, 33857, 18483, 36057, 27202, 19738, 35289, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22769, 18847, 32269, 31613, 34604, 32285, 32301, 32351, 22062, 18482, 32367, 19354, 32385, 27202, 32413, 27098, 32434, 22096, 24384, 32485, 20052, 32506, 18877, 25396, 23734, 18482, 18482, 32562, 32625, 27202, 32653, 27202, 23664, 32673, 32689, 24384, 32724, 24384, 25888, 32745, 34706, 18482, 27381, 32783, 24577, 24838, 32817, 24873, 32838, 32864, 27202, 32899, 32934, 24384, 32957, 29317, 24384, 30798, 26214, 27678, 33875, 18482, 23052, 36352, 27202, 32993, 27202, 30764, 23993, 32087, 24384, 33013, 24384, 35853, 18482, 18482, 30362, 27965, 27202, 27202, 33754, 17590, 20112, 24384, 24384, 34576, 20792, 18482, 18482, 33031, 27202, 27203, 36159, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 34554, 24150, 33050, 33080, 33114, 27868, 34251, 23843, 26560, 31696, 19856, 25793, 19779, 30988, 23482, 30981, 33135, 22123, 27956, 23463, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22784, 18847, 33162, 28106, 33197, 25325, 33232, 29176, 22062, 33275, 35433, 18482, 18484, 33302, 26399, 33339, 27202, 22096, 33356, 28065, 33404, 24384, 18877, 22229, 18482, 33421, 18482, 18482, 33442, 33460, 24811, 27202, 27202, 26627, 22148, 24758, 35190, 24384, 24384, 25925, 29611, 18482, 18482, 29290, 25186, 33482, 33501, 27202, 27202, 33518, 36276, 19503, 33554, 24384, 24384, 33573, 32490, 19647, 18482, 18482, 31235, 33610, 23052, 27202, 27202, 33631, 27202, 30764, 23993, 24384, 24384, 33670, 24384, 26862, 27492, 18482, 33706, 27867, 32883, 34639, 27202, 17590, 32036, 24765, 23788, 24384, 18481, 18482, 18482, 27202, 27202, 27203, 33727, 36097, 19887, 25677, 18482, 23334, 27202, 29150, 19738, 23870, 35357, 30328, 18484, 33748, 34675, 33770, 19466, 34050, 33824, 31831, 30990, 27868, 34251, 33848, 28913, 33908, 19856, 30469, 33973, 25385, 36033, 34000, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22799, 18847, 34035, 32576, 34084, 34119, 34135, 34170, 34186, 32150, 36005, 31522, 31886, 34202, 34226, 34267, 29334, 34317, 34354, 34378, 34421, 26801, 18877, 26195, 29666, 25402, 18482, 35091, 25794, 34460, 34482, 34504, 25832, 35010, 22148, 34524, 34547, 34570, 19623, 24017, 36654, 35111, 24664, 18482, 32335, 34592, 31312, 34620, 34636, 27202, 34655, 34691, 28046, 34750, 34774, 24384, 33785, 19647, 34796, 32170, 34844, 24581, 33485, 26704, 34828, 34860, 35493, 29132, 36704, 33800, 35368, 32941, 34146, 26758, 34895, 18482, 18482, 34932, 34948, 27202, 32997, 17590, 29944, 34973, 24384, 36296, 25500, 30202, 35875, 35006, 35026, 26266, 20396, 31146, 35061, 35081, 35127, 24623, 28484, 27897, 19738, 35143, 35170, 26162, 28794, 35206, 35230, 33064, 35245, 23052, 23296, 29054, 30990, 27868, 34251, 19859, 25794, 34248, 24530, 25147, 35278, 31765, 35316, 33370, 22080, 19438, 27956, 24072, 28623, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22814, 18847, 22034, 34720, 34059, 35384, 20989, 35400, 35416, 35449, 18482, 18482, 23432, 35475, 27202, 27202, 27202, 35509, 31127, 24384, 24384, 24384, 35545, 18482, 26871, 35101, 35593, 24855, 25794, 30397, 23502, 26024, 35639, 35658, 22148, 19541, 19583, 30590, 35674, 27709, 35560, 29107, 18482, 18482, 18482, 18484, 27202, 35694, 27202, 27202, 27202, 35715, 24384, 36580, 24384, 24384, 24384, 19647, 30215, 18482, 18482, 18482, 23052, 35731, 27202, 27202, 27202, 27537, 22904, 24384, 24384, 24384, 24384, 23879, 35748, 18482, 18482, 25008, 35770, 27202, 27202, 17590, 20031, 35787, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 27203, 23997, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 23898, 18484, 34488, 31802, 25371, 19466, 23052, 23296, 26426, 30990, 27868, 34251, 19859, 25794, 35804, 19856, 27178, 35833, 33092, 23482, 30981, 22080, 22212, 28705, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22829, 18847, 22034, 35869, 28716, 25325, 31137, 29176, 22062, 26766, 18482, 22558, 18484, 23970, 27202, 29843, 27202, 22096, 33732, 24384, 31394, 24384, 18877, 18482, 18482, 26880, 18482, 18482, 25794, 27202, 30740, 27202, 27202, 35010, 22148, 24384, 24891, 24384, 24384, 24017, 31659, 18482, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 27202, 19503, 24384, 24384, 24384, 24384, 24384, 19647, 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 30764, 23993, 24384, 24384, 24384, 24384, 26758, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 17590, 23998, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 27203, 23997, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22844, 18847, 22034, 27849, 27869, 35891, 24384, 35907, 22062, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 22096, 24384, 24384, 24384, 24384, 18877, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202, 35010, 22148, 24384, 24384, 24384, 24384, 24017, 31575, 18482, 18482, 18482, 18482, 26231, 27202, 27202, 27202, 27202, 27202, 19503, 35923, 24384, 24384, 24384, 24384, 19647, 18482, 28129, 18482, 18482, 35941, 27202, 32822, 27202, 32657, 30764, 23993, 24384, 32217, 24384, 32062, 26758, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 17590, 23998, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 27203, 23997, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22859, 18847, 22034, 35966, 34820, 25325, 33931, 29176, 35988, 18482, 23277, 18482, 36021, 27202, 27202, 36056, 36073, 22096, 24384, 24384, 36096, 33921, 18877, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202, 35010, 22148, 24384, 24384, 24384, 24384, 24017, 36113, 18482, 25577, 18482, 18482, 18484, 27202, 27202, 27324, 27202, 27202, 36146, 24384, 24384, 34362, 24384, 24384, 19647, 28243, 18482, 18482, 18482, 23052, 30899, 27202, 27202, 27202, 23686, 23993, 33808, 24384, 24384, 24384, 26758, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 17590, 23998, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 27203, 23997, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22305, 18847, 22034, 19373, 27869, 36182, 24384, 36198, 22062, 18482, 18482, 18482, 18049, 27202, 27202, 27202, 35485, 22096, 24384, 24384, 24384, 29371, 18877, 18482, 36214, 18482, 28788, 18482, 25794, 34872, 27202, 27420, 27202, 35010, 22148, 29380, 24384, 24482, 24384, 24017, 31659, 18482, 36236, 18482, 18482, 18484, 27202, 36080, 27202, 27202, 27202, 19503, 24384, 28029, 24384, 24384, 24384, 19647, 18482, 18482, 32122, 18482, 35754, 27202, 27202, 36269, 27202, 33531, 23993, 24384, 24384, 36292, 24384, 36312, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 17590, 23998, 24384, 24384, 24384, 25730, 18482, 18482, 36345, 27202, 27203, 19203, 24385, 19887, 25677, 31963, 18483, 27202, 32462, 19738, 23870, 36368, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22350, 18847, 36388, 19027, 19252, 17687, 36433, 17173, 17595, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 36452, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 17682, 21701, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22335, 18847, 19006, 19027, 19252, 17687, 19027, 21712, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17991, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21788, 18847, 36488, 19027, 19252, 17687, 19027, 17173, 17779, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17810, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21165, 21997, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21803, 18847, 19006, 19027, 19252, 17687, 19027, 17173, 30771, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 36516, 17308, 17327, 17346, 18937, 18460, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 21217, 21848, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21803, 18847, 19326, 18482, 27869, 30764, 24384, 29176, 28008, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 36566, 24384, 24384, 24384, 24384, 22919, 18482, 18482, 18482, 18482, 18482, 25794, 27202, 27202, 27202, 27202, 28530, 36613, 24384, 24384, 24384, 24384, 24017, 18892, 18482, 18482, 18482, 18482, 18484, 27202, 27202, 27202, 27202, 27202, 19503, 24384, 24384, 24384, 24384, 24384, 19647, 18482, 18482, 18482, 18482, 23052, 27202, 27202, 27202, 27202, 30764, 23993, 24384, 24384, 24384, 24384, 26758, 18482, 18482, 18482, 27867, 27202, 27202, 27202, 17590, 23998, 24384, 24384, 24384, 18481, 18482, 18482, 27202, 27202, 27203, 23997, 24385, 19887, 25677, 18482, 18483, 27202, 27202, 19738, 23870, 19887, 30991, 18484, 27202, 31802, 19425, 19466, 23052, 23296, 19847, 30990, 27868, 34251, 19859, 25794, 34248, 19856, 25793, 19779, 30988, 23482, 30981, 22080, 19438, 27956, 19678, 27944, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 36639, 36677, 18731, 19027, 19252, 17687, 19027, 17454, 17595, 36436, 17330, 17349, 18940, 17189, 17208, 17281, 17675, 17223, 17308, 17327, 17346, 18937, 36741, 21855, 18660, 18676, 19025, 17265, 22008, 17292, 17421, 21157, 17192, 17682, 21701, 17311, 18669, 19018, 19027, 17447, 32909, 17497, 17520, 17251, 36410, 17824, 20322, 20663, 20490, 17543, 17559, 17585, 21862, 17504, 17527, 17258, 36417, 21890, 21915, 17611, 36466, 18259, 17633, 17661, 18368, 17703, 17730, 17772, 33538, 21921, 17617, 36472, 18265, 36530, 17477, 19171, 17902, 17934, 17744, 17795, 17874, 17590, 21595, 17481, 19175, 17906, 18742, 17960, 36550, 17714, 17976, 18021, 18738, 18692, 18413, 18632, 18081, 18098, 18114, 18159, 18185, 18717, 18094, 18251, 18292, 18281, 18308, 18005, 18338, 18354, 18384, 17849, 36402, 19251, 17838, 17163, 30650, 18400, 17858, 32918, 17645, 18816, 18429, 18445, 18530, 17393, 18758, 18516, 18546, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 0, 94242, 0, 118820, 0, 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2482176, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 2207744, 2404352, 2412544, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3104768, 2605056, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2678784, 2207744, 2695168, 2207744, 2703360, 2207744, 2711552, 2752512, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 3170304, 3174400, 2158592, 0, 139, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 2748416, 2756608, 2777088, 2801664, 2158592, 2158592, 2158592, 2863104, 2891776, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3104768, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744, 2785280, 2207744, 2809856, 2207744, 2207744, 2842624, 2207744, 2207744, 2207744, 2899968, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2564096, 2207744, 2207744, 2207744, 2158592, 2404352, 2412544, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2564096, 2158592, 2158592, 2605056, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2678784, 2158592, 2695168, 2158592, 2703360, 2158592, 2711552, 2752512, 2158592, 2158592, 2785280, 2158592, 2158592, 2785280, 2158592, 2809856, 2158592, 2158592, 2842624, 2158592, 2158592, 2158592, 2899968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 641, 0, 2158592, 0, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 32768, 0, 2158592, 0, 2158592, 2158592, 2158592, 2383872, 2158592, 2158592, 2158592, 2158592, 3006464, 2383872, 2207744, 2207744, 2207744, 2207744, 2158877, 2158877, 2158877, 2158877, 0, 0, 0, 2158877, 2572573, 2158877, 2158877, 0, 2207744, 2207744, 2596864, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2641920, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162968, 0, 0, 3104768, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 0, 0, 2146304, 2146304, 2224128, 2224128, 2232320, 2232320, 2232320, 641, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2531328, 2158592, 2158592, 2158592, 2158592, 2158592, 2617344, 2158592, 2158592, 2158592, 2158592, 2441216, 2445312, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2502656, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2580480, 2158592, 2158592, 2158592, 2158592, 2621440, 2158592, 2580480, 2158592, 2158592, 2158592, 2158592, 2621440, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2699264, 2158592, 2158592, 2158592, 2158592, 2158592, 2748416, 2756608, 2777088, 2801664, 2207744, 2863104, 2891776, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3018752, 2207744, 3043328, 2207744, 2207744, 2207744, 2207744, 3080192, 2207744, 2207744, 3112960, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 167936, 0, 0, 2162688, 0, 0, 2207744, 2207744, 2207744, 3186688, 2207744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2404352, 2412544, 2158592, 2510848, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2584576, 2158592, 2609152, 2158592, 2158592, 2629632, 2158592, 2158592, 2158592, 2686976, 2158592, 2715648, 2158592, 2158592, 3121152, 2158592, 2158592, 2158592, 3149824, 2158592, 2158592, 3170304, 3174400, 2158592, 2367488, 2207744, 2207744, 2207744, 2207744, 2158592, 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2572288, 2158592, 2158592, 0, 2207744, 2207744, 2207744, 2433024, 2207744, 2453504, 2461696, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2510848, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3096576, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 0, 0, 2715648, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2867200, 2207744, 2904064, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2473984, 2207744, 2207744, 2494464, 2207744, 2207744, 2207744, 2523136, 2207744, 2207744, 2207744, 2207744, 3014656, 2207744, 2207744, 3051520, 2207744, 2207744, 3100672, 2207744, 2207744, 3121152, 2207744, 2207744, 2207744, 2207744, 2207744, 2531328, 2207744, 2207744, 2207744, 2207744, 2207744, 2617344, 2207744, 2207744, 2207744, 2207744, 2158592, 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2572288, 2158592, 2158592, 1508, 2207744, 3149824, 2207744, 2207744, 3170304, 3174400, 2207744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 138, 2158592, 2158592, 2158592, 2404352, 2412544, 2707456, 2732032, 2207744, 2207744, 2207744, 2822144, 2826240, 2207744, 2895872, 2207744, 2207744, 2924544, 2207744, 2207744, 2973696, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 285, 2158592, 2158592, 3112960, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 2207744, 2207744, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 0, 0, 2535424, 2543616, 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 2990080, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2572288, 2981888, 2207744, 2207744, 3002368, 2207744, 3047424, 3063808, 3076096, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3203072, 2708960, 2732032, 2158592, 2158592, 2158592, 2822144, 2827748, 2158592, 2895872, 2158592, 2158592, 2924544, 2158592, 2158592, 2973696, 2158592, 2981888, 2158592, 2158592, 3002368, 2158592, 3047424, 3063808, 3076096, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3203072, 2981888, 2158592, 2158592, 3003876, 2158592, 3047424, 3063808, 3076096, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3203072, 2207744, 2207744, 2207744, 2207744, 2207744, 2424832, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 172310, 279, 0, 2162688, 0, 0, 2523136, 2527232, 2158592, 2158592, 2576384, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2908160, 2527232, 2207744, 2207744, 2576384, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2908160, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 286, 2158592, 2158592, 0, 0, 2158592, 2158592, 2158592, 2158592, 2633728, 2658304, 0, 0, 2740224, 2744320, 0, 2834432, 2207744, 2207744, 2977792, 2207744, 2207744, 2207744, 2207744, 3039232, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3158016, 0, 0, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 933, 45, 45, 45, 45, 442, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 2494464, 2158592, 2158592, 2158592, 2524757, 2527232, 2158592, 2158592, 2576384, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 1504, 2158592, 2498560, 2158592, 2158592, 2158592, 2158592, 2568192, 2158592, 2592768, 2625536, 2158592, 2158592, 2674688, 2736128, 2158592, 2158592, 0, 2158592, 2912256, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3108864, 2158592, 2158592, 3133440, 3145728, 3153920, 2375680, 2379776, 2207744, 2207744, 2420736, 2207744, 2449408, 2207744, 2207744, 2207744, 2498560, 2207744, 2207744, 2207744, 2207744, 2568192, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 551, 2158592, 2158592, 2158592, 2158592, 2207744, 2506752, 2207744, 2207744, 2207744, 2207744, 2207744, 2158592, 2506752, 0, 2020, 2158592, 2592768, 2625536, 2207744, 2207744, 2674688, 2736128, 2207744, 2207744, 2207744, 2912256, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 20480, 0, 0, 0, 0, 0, 2162688, 20480, 0, 2207744, 3108864, 2207744, 2207744, 3133440, 3145728, 3153920, 2375680, 2379776, 2158592, 2158592, 2420736, 2158592, 2449408, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 641, 0, 0, 0, 0, 0, 0, 2367488, 2158592, 2498560, 2158592, 2158592, 1621, 2158592, 2158592, 2568192, 2158592, 2592768, 2625536, 2158592, 2158592, 2674688, 0, 0, 0, 0, 0, 1608, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1107, 97, 97, 1110, 97, 97, 3133440, 3145728, 3153920, 2158592, 2408448, 2416640, 2158592, 2465792, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3014656, 2158592, 2158592, 3051520, 2158592, 2158592, 3100672, 2158592, 2158592, 3121152, 2158592, 2158592, 2158592, 3149824, 2416640, 2207744, 2465792, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2633728, 2658304, 2740224, 2744320, 2834432, 2949120, 2158592, 2985984, 2158592, 2998272, 2158592, 2158592, 2158592, 3129344, 2207744, 2408448, 2949120, 2207744, 2985984, 2207744, 2998272, 2207744, 2207744, 2207744, 3129344, 2158592, 2408448, 2416640, 2158592, 2465792, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 32768, 0, 0, 0, 0, 0, 0, 2367488, 2949120, 2158592, 2985984, 2158592, 2998272, 2158592, 2158592, 2158592, 3129344, 2158592, 2158592, 2478080, 2158592, 2158592, 2158592, 2535424, 2543616, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3117056, 2207744, 2207744, 2478080, 2207744, 2207744, 2207744, 2207744, 2207744, 2584576, 2207744, 2609152, 2207744, 2207744, 2629632, 2207744, 2207744, 2207744, 2686976, 2207744, 2207744, 2535424, 2543616, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3117056, 2158592, 2158592, 2478080, 2207744, 2207744, 2990080, 2207744, 2207744, 2158592, 2158592, 2482176, 2158592, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 0, 2158592, 2908160, 2158592, 2158592, 2158592, 2977792, 2158592, 2158592, 2158592, 2158592, 3039232, 2158592, 2158592, 3010560, 2207744, 2428928, 2207744, 2514944, 2207744, 2588672, 2207744, 2838528, 2207744, 2207744, 2207744, 3010560, 2158592, 2428928, 2158592, 2514944, 0, 0, 2158592, 2588672, 2158592, 0, 2838528, 2158592, 2158592, 2158592, 3010560, 2158592, 2506752, 2158592, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 0, 29315, 922, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 3006464, 2383872, 0, 2020, 2158592, 2158592, 2158592, 2158592, 3006464, 2158592, 2637824, 2953216, 2158592, 2207744, 2637824, 2953216, 2207744, 0, 0, 2158592, 2637824, 2953216, 2158592, 2539520, 2158592, 2539520, 2207744, 0, 0, 2539520, 2158592, 2158592, 2158592, 2158592, 2207744, 2506752, 2207744, 2207744, 2207744, 2207744, 2207744, 2158592, 2506752, 0, 0, 2158592, 2207744, 0, 2158592, 2158592, 2207744, 0, 2158592, 2158592, 2207744, 0, 2158592, 2965504, 2965504, 2965504, 0, 0, 0, 0, 0, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2474269, 2158877, 2158877, 0, 0, 2158877, 2158877, 2158877, 2158877, 2634013, 2658589, 0, 0, 2740509, 2744605, 0, 2834717, 40976, 18, 36884, 45078, 24, 28, 90143, 94242, 118820, 102439, 106538, 98347, 118820, 118820, 118820, 40976, 18, 18, 36884, 0, 0, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 86016, 0, 0, 2211840, 102439, 0, 0, 0, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 3158016, 0, 2375680, 2379776, 2158592, 2158592, 2420736, 2158592, 2449408, 2158592, 2158592, 0, 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 135, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2564096, 2158592, 2158592, 2158592, 2158592, 2158592, 2596864, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2641920, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2781184, 2793472, 2494464, 2158592, 2158592, 2158592, 2523136, 2527232, 2158592, 2158592, 2576384, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 0, 27, 27, 0, 2158592, 2498560, 2158592, 2158592, 0, 2158592, 2158592, 2568192, 2158592, 2592768, 2625536, 2158592, 2158592, 2674688, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2473984, 2158592, 2158592, 2494464, 2158592, 2158592, 2158592, 3006464, 2383872, 0, 0, 2158592, 2158592, 2158592, 2158592, 3006464, 2158592, 2637824, 2953216, 2158592, 2207744, 2637824, 2953216, 40976, 18, 36884, 45078, 24, 27, 147488, 94242, 147456, 147488, 106538, 98347, 0, 0, 147456, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 0, 81920, 0, 94242, 0, 0, 0, 2211840, 0, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2428928, 2158592, 2514944, 2158592, 2588672, 2158592, 2838528, 2158592, 2158592, 40976, 18, 151573, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 0, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 1315, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1487, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 0, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1663, 45, 45, 45, 45, 45, 45, 45, 45, 45, 183, 45, 45, 45, 45, 201, 45, 130, 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3096576, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744, 2207744, 2158592, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 644, 2207744, 2207744, 2207744, 3186688, 2207744, 0, 1080, 0, 1084, 0, 1088, 0, 0, 0, 0, 0, 0, 0, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2531466, 2158730, 2158730, 2158730, 2158730, 2158730, 2617482, 0, 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2781184, 2793472, 2158592, 2818048, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 40976, 18, 36884, 45078, 24, 27, 90143, 159779, 159744, 102439, 159779, 98347, 0, 0, 159744, 40976, 18, 18, 36884, 0, 45078, 0, 2224253, 172032, 2224253, 2232448, 2232448, 172032, 2232448, 90143, 0, 0, 2170880, 0, 0, 550, 829, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 124, 124, 127, 127, 127, 40976, 18, 36884, 45078, 25, 29, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 163931, 40976, 18, 18, 36884, 0, 45078, 249856, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 2170880, 0, 0, 827, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 4243810, 4243810, 24, 24, 27, 27, 27, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 57344, 286, 2158592, 2158592, 2158592, 2158592, 2707456, 2732032, 2158592, 2158592, 2158592, 2822144, 2826240, 2158592, 2895872, 2158592, 2158592, 2924544, 2158592, 2158592, 2973696, 2158592, 2207744, 2207744, 2207744, 3186688, 2207744, 0, 0, 0, 0, 0, 0, 53248, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 1613, 97, 97, 97, 97, 97, 97, 1495, 97, 97, 97, 97, 97, 97, 97, 97, 97, 566, 97, 97, 97, 97, 97, 97, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 546, 0, 0, 0, 0, 286, 2158592, 2158592, 2158592, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 17, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 20480, 120, 121, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 2170880, 0, 53248, 550, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 196608, 18, 266240, 24, 24, 27, 27, 27, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 0, 45, 45, 45, 45, 45, 45, 45, 1535, 45, 45, 45, 45, 45, 45, 45, 1416, 45, 45, 45, 45, 45, 45, 45, 45, 424, 45, 45, 45, 45, 45, 45, 45, 45, 45, 405, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 199, 45, 45, 67, 67, 67, 67, 67, 491, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1766, 67, 67, 67, 1767, 67, 24850, 24850, 12564, 12564, 0, 0, 2166784, 546, 0, 53531, 53531, 0, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 743, 57889, 0, 2170880, 0, 0, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 1856, 45, 1858, 1859, 67, 67, 67, 1009, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1021, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2367773, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2699549, 2158877, 2158877, 2158877, 2158877, 2158877, 2748701, 2756893, 2777373, 2801949, 97, 1115, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 857, 97, 67, 67, 67, 67, 67, 1258, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1826, 67, 97, 97, 97, 97, 97, 97, 1338, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 870, 97, 97, 67, 67, 67, 1463, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1579, 67, 67, 97, 97, 97, 1518, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 904, 905, 97, 97, 97, 97, 1620, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 0, 0, 0, 0, 0, 45, 1679, 67, 67, 67, 1682, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1690, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 669, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 189, 45, 45, 45, 1748, 45, 45, 45, 1749, 1750, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1959, 67, 67, 67, 67, 1768, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1791, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1802, 67, 1817, 67, 67, 67, 67, 67, 67, 1823, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 97, 1848, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 659, 45, 45, 45, 45, 45, 45, 45, 1863, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 495, 67, 67, 67, 67, 67, 1878, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 0, 1973, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1165, 97, 1167, 0, 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 136, 2158592, 2158592, 2158592, 2158592, 2158592, 3158016, 229376, 2375680, 2379776, 2158592, 2158592, 2420736, 2158592, 2449408, 2158592, 2158592, 67, 24850, 24850, 12564, 12564, 0, 0, 280, 547, 0, 53531, 53531, 0, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 1789, 97, 57889, 547, 547, 0, 0, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 1799, 45, 45, 45, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 1092, 0, 0, 0, 0, 0, 97, 97, 97, 97, 1612, 97, 97, 97, 97, 1616, 97, 1297, 1472, 0, 0, 0, 0, 1303, 1474, 0, 0, 0, 0, 1309, 1476, 0, 0, 0, 0, 97, 97, 97, 1481, 97, 97, 97, 97, 97, 97, 1488, 97, 0, 1474, 0, 1476, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 607, 97, 97, 97, 97, 40976, 18, 36884, 45078, 26, 30, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 213080, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 143448, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 0, 0, 0, 0, 97, 97, 97, 97, 1482, 97, 1483, 97, 97, 97, 97, 97, 97, 1326, 97, 97, 1329, 1330, 97, 97, 97, 97, 97, 97, 1159, 1160, 97, 97, 97, 97, 97, 97, 97, 97, 590, 97, 97, 97, 97, 97, 97, 97, 0, 94242, 0, 0, 0, 2211974, 102439, 0, 0, 106538, 98347, 0, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2474122, 2158730, 2158730, 2494602, 2158730, 2158730, 2158730, 2809994, 2158730, 2158730, 2842762, 2158730, 2158730, 2158730, 2900106, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3014794, 2158730, 2158730, 3051658, 2158730, 2158730, 3100810, 2158730, 2158730, 2158730, 2158730, 3096714, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2207744, 2207744, 2207744, 2207744, 2207744, 2572288, 2207744, 2207744, 2207744, 2207744, 541, 541, 543, 543, 0, 0, 2166784, 0, 548, 549, 549, 0, 286, 2158877, 2158877, 2158877, 2863389, 2892061, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 3186973, 2158877, 0, 0, 0, 0, 0, 0, 0, 0, 2367626, 2158877, 2404637, 2412829, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2564381, 2158877, 2158877, 2605341, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2679069, 2158877, 2695453, 2158877, 2703645, 2158877, 2711837, 2752797, 2158877, 0, 2158877, 2158877, 2158877, 2384010, 2158730, 2158730, 2158730, 2158730, 3006602, 2383872, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2441216, 2445312, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2502656, 2158877, 2785565, 2158877, 2810141, 2158877, 2158877, 2842909, 2158877, 2158877, 2158877, 2900253, 2158877, 2158877, 2158877, 2158877, 2158877, 2531613, 2158877, 2158877, 2158877, 2158877, 2158877, 2617629, 2158877, 2158877, 2158877, 2158877, 2158730, 2818186, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3105053, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 0, 0, 0, 0, 0, 97, 97, 97, 1611, 97, 97, 97, 97, 97, 97, 97, 1496, 97, 97, 1499, 97, 97, 97, 97, 97, 2441354, 2445450, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2502794, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2433162, 2158730, 2453642, 2461834, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2580618, 2158730, 2158730, 2158730, 2158730, 2621578, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2699402, 2158730, 2158730, 2158730, 2158730, 2678922, 2158730, 2695306, 2158730, 2703498, 2158730, 2711690, 2752650, 2158730, 2158730, 2785418, 2158730, 2158730, 2158730, 3113098, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3186826, 2158730, 2207744, 2207744, 2207744, 2207744, 2699264, 2207744, 2207744, 2207744, 2207744, 2207744, 2748416, 2756608, 2777088, 2801664, 2207744, 2207744, 2158877, 2158877, 2158877, 2158877, 2158877, 0, 0, 0, 2158877, 2158877, 2158877, 2158877, 0, 0, 2535709, 2543901, 2158877, 2158877, 2158877, 0, 0, 0, 2158877, 2158877, 2158877, 2990365, 2158877, 2158877, 2158730, 2158730, 2158730, 2158730, 2158730, 2572426, 2158877, 2502941, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2580765, 2158877, 2158877, 2158877, 2158877, 2621725, 2158877, 3019037, 2158877, 3043613, 2158877, 2158877, 2158877, 2158877, 3080477, 2158877, 2158877, 3113245, 2158877, 2158877, 2158877, 2158877, 0, 2158877, 2908445, 2158877, 2158877, 2158877, 2978077, 2158877, 2158877, 2158877, 2158877, 3039517, 2158877, 2158730, 2510986, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2584714, 2158730, 2609290, 2158730, 2158730, 2629770, 2158730, 2158730, 2158730, 2388106, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2605194, 2158730, 2158730, 2158730, 2158730, 2687114, 2158730, 2715786, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2867338, 2158730, 2904202, 2158730, 2158730, 2158730, 2642058, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2781322, 2793610, 2158730, 3121290, 2158730, 2158730, 2158730, 3149962, 2158730, 2158730, 3170442, 3174538, 2158730, 2367488, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2580480, 2207744, 2207744, 2207744, 2207744, 2621440, 2207744, 2207744, 2158877, 2433309, 2158877, 2453789, 2461981, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2511133, 2158877, 2158877, 2158877, 2158877, 2584861, 2158877, 2609437, 2158877, 2158877, 2629917, 2158877, 2158877, 2158877, 2687261, 2158877, 2715933, 2158877, 2158730, 2158730, 2973834, 2158730, 2982026, 2158730, 2158730, 3002506, 2158730, 3047562, 3063946, 3076234, 2158730, 2158730, 2158730, 2158730, 2207744, 2506752, 2207744, 2207744, 2207744, 2207744, 2207744, 2158877, 2507037, 0, 0, 2158877, 2158730, 2158730, 2158730, 3203210, 2207744, 2207744, 2207744, 2207744, 2207744, 2424832, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 823, 0, 825, 2707741, 2732317, 2158877, 2158877, 2158877, 2822429, 2826525, 2158877, 2896157, 2158877, 2158877, 2924829, 2158877, 2158877, 2973981, 2158877, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 642, 0, 2158592, 0, 45, 1529, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1755, 45, 67, 67, 2982173, 2158877, 2158877, 3002653, 2158877, 3047709, 3064093, 3076381, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 3203357, 2523274, 2527370, 2158730, 2158730, 2576522, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2908298, 2494749, 2158877, 2158877, 2158877, 2523421, 2527517, 2158877, 2158877, 2576669, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 0, 40976, 0, 18, 18, 4321280, 2224253, 2232448, 4329472, 2232448, 2158730, 2498698, 2158730, 2158730, 2158730, 2158730, 2568330, 2158730, 2592906, 2625674, 2158730, 2158730, 2674826, 2736266, 2158730, 2158730, 2158730, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2158730, 2912394, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3109002, 2158730, 2158730, 3133578, 3145866, 3154058, 2375680, 2207744, 3108864, 2207744, 2207744, 3133440, 3145728, 3153920, 2375965, 2380061, 2158877, 2158877, 2421021, 2158877, 2449693, 2158877, 2158877, 2158877, 3117341, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3104906, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158877, 2498845, 2158877, 2158877, 0, 2158877, 2158877, 2568477, 2158877, 2593053, 2625821, 2158877, 2158877, 2674973, 0, 0, 0, 0, 97, 97, 1480, 97, 97, 97, 97, 97, 1485, 97, 97, 97, 0, 97, 97, 1729, 97, 1731, 97, 97, 97, 97, 97, 97, 97, 311, 97, 97, 97, 97, 97, 97, 97, 97, 1520, 97, 97, 1523, 97, 97, 1526, 97, 2736413, 2158877, 2158877, 0, 2158877, 2912541, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 3109149, 2158877, 2158877, 3014941, 2158877, 2158877, 3051805, 2158877, 2158877, 3100957, 2158877, 2158877, 3121437, 2158877, 2158877, 2158877, 3150109, 3133725, 3146013, 3154205, 2158730, 2408586, 2416778, 2158730, 2465930, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3018890, 2158730, 3043466, 2158730, 2158730, 2158730, 2158730, 3080330, 2633866, 2658442, 2740362, 2744458, 2834570, 2949258, 2158730, 2986122, 2158730, 2998410, 2158730, 2158730, 2158730, 3129482, 2207744, 2408448, 2949120, 2207744, 2985984, 2207744, 2998272, 2207744, 2207744, 2207744, 3129344, 2158877, 2408733, 2416925, 2158877, 2466077, 2158877, 2158877, 3170589, 3174685, 2158877, 0, 0, 0, 2158730, 2158730, 2158730, 2158730, 2158730, 2424970, 2158730, 2158730, 2158730, 2158730, 2707594, 2732170, 2158730, 2158730, 2158730, 2822282, 2826378, 2158730, 2896010, 2158730, 2158730, 2924682, 2949405, 2158877, 2986269, 2158877, 2998557, 2158877, 2158877, 2158877, 3129629, 2158730, 2158730, 2478218, 2158730, 2158730, 2158730, 2535562, 2543754, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3117194, 2207744, 2207744, 2478080, 2207744, 2207744, 2207744, 2207744, 2781184, 2793472, 2207744, 2818048, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 541, 0, 543, 2207744, 2535424, 2543616, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3117056, 2158877, 2158877, 2478365, 0, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158730, 2158730, 2482314, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2207744, 2207744, 2207744, 2387968, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 542, 0, 544, 2158730, 2158730, 2158730, 2990218, 2158730, 2158730, 2207744, 2207744, 2482176, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 135, 0, 2207744, 2207744, 2990080, 2207744, 2207744, 2158877, 2158877, 2482461, 2158877, 2158877, 0, 0, 0, 2158877, 2158877, 2158877, 2158877, 2158877, 2158730, 2429066, 2158730, 2515082, 2158730, 2588810, 2158730, 2838666, 2158730, 2158730, 2158730, 3010698, 2207744, 2428928, 2207744, 2514944, 2207744, 2588672, 2207744, 2838528, 2207744, 2207744, 2207744, 3010560, 2158877, 2429213, 2158877, 2515229, 0, 0, 2158877, 2588957, 2158877, 0, 2838813, 2158877, 2158877, 2158877, 3010845, 2158730, 2506890, 2158730, 2158730, 2158730, 2748554, 2756746, 2777226, 2801802, 2158730, 2158730, 2158730, 2863242, 2891914, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2564234, 2158730, 2158730, 2158730, 2158730, 2158730, 2597002, 2158730, 2158730, 2158730, 3006464, 2384157, 0, 0, 2158877, 2158877, 2158877, 2158877, 3006749, 2158730, 2637962, 2953354, 2158730, 2207744, 2637824, 2953216, 2207744, 0, 0, 2158877, 2638109, 2953501, 2158877, 2539658, 2158730, 2539520, 2207744, 0, 0, 2539805, 2158877, 2158730, 2158730, 2158730, 2977930, 2158730, 2158730, 2158730, 2158730, 3039370, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3158154, 2207744, 0, 2158877, 2158730, 2207744, 0, 2158877, 2158730, 2207744, 0, 2158877, 2965642, 2965504, 2965789, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1484, 97, 97, 97, 97, 2158592, 18, 0, 122880, 0, 0, 0, 77824, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 356, 0, 0, 0, 0, 0, 0, 28809, 0, 139, 45, 45, 45, 45, 45, 45, 1751, 45, 45, 45, 45, 45, 45, 45, 67, 67, 1427, 67, 67, 67, 67, 67, 1432, 67, 67, 67, 3104768, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 122880, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 1322, 550, 0, 286, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 24, 4329472, 27, 27, 2207744, 2207744, 2977792, 2207744, 2207744, 2207744, 2207744, 3039232, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3158016, 542, 0, 0, 0, 542, 0, 544, 0, 0, 0, 544, 0, 550, 0, 0, 0, 0, 0, 97, 97, 1610, 97, 97, 97, 97, 97, 97, 97, 97, 898, 97, 97, 97, 97, 97, 97, 97, 0, 94242, 0, 0, 0, 2211840, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 237568, 102439, 106538, 98347, 0, 0, 20480, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 192512, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 94, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 96, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 12378, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 126, 126, 126, 126, 90143, 0, 0, 2170880, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 20480, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 241664, 102439, 106538, 98347, 0, 0, 20568, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 200797, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 20480, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 0, 0, 44, 0, 0, 20575, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 41, 41, 41, 0, 0, 1126400, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 0, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 89, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 131201, 27, 27, 90143, 0, 0, 2170880, 0, 0, 550, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2441216, 2445312, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 94242, 0, 0, 208896, 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 0, 0, 0, 0, 0, 0, 0, 2367488, 32768, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2433024, 2158592, 2453504, 2461696, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2510848, 2158592, 2158592, 2158592, 2158592, 40976, 18, 36884, 245783, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 20480, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 221184, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 180224, 40976, 18, 18, 36884, 155648, 45078, 0, 24, 24, 217088, 27, 27, 27, 217088, 90143, 0, 0, 2170880, 0, 0, 828, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744, 2207744, 2207744, 2387968, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 233472, 0, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 45, 45, 718, 45, 45, 45, 45, 45, 45, 45, 45, 45, 727, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 45, 1808, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 97, 97, 0, 0, 97, 67, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 1788, 97, 97, 0, 97, 2024, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 235, 67, 67, 67, 67, 67, 57889, 0, 0, 54074, 54074, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 1798, 45, 45, 1800, 45, 45, 0, 1472, 0, 0, 0, 0, 0, 1474, 0, 0, 0, 0, 0, 1476, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 1320, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 1787, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 2029, 45, 67, 67, 67, 67, 2033, 1527, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 663, 67, 24850, 24850, 12564, 12564, 0, 57889, 281, 0, 0, 53531, 53531, 367, 286, 97, 97, 0, 0, 97, 97, 97, 97, 1786, 97, 0, 0, 97, 97, 0, 1790, 40976, 19, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 262144, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 46, 67, 98, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 45, 67, 97, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 258048, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 1122423, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 1114152, 1114152, 1114152, 0, 0, 1114112, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 37, 102439, 106538, 98347, 0, 0, 204800, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 57436, 40976, 18, 36884, 45078, 24, 27, 33, 33, 0, 33, 33, 33, 0, 0, 0, 40976, 18, 18, 36884, 0, 45078, 0, 124, 124, 124, 127, 127, 127, 127, 90143, 0, 0, 2170880, 0, 0, 550, 0, 2158877, 2158877, 2158877, 2388253, 2158877, 2158877, 2158877, 2158877, 2158877, 2781469, 2793757, 2158877, 2818333, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2867485, 2158877, 2904349, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 3096861, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2441501, 2445597, 2158877, 2158877, 2158877, 2158877, 2158877, 40976, 122, 123, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 936, 2158592, 4243810, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 935, 45, 45, 45, 715, 45, 45, 45, 45, 45, 45, 45, 723, 45, 45, 45, 45, 45, 1182, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 430, 45, 45, 45, 45, 45, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 47, 68, 99, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 48, 69, 100, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 49, 70, 101, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 50, 71, 102, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 51, 72, 103, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 52, 73, 104, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 53, 74, 105, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 54, 75, 106, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 55, 76, 107, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 56, 77, 108, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 57, 78, 109, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 58, 79, 110, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 59, 80, 111, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 60, 81, 112, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 61, 82, 113, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 62, 83, 114, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 63, 84, 115, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 64, 85, 116, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 65, 86, 117, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 66, 87, 118, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 118820, 102439, 106538, 98347, 118820, 118820, 118820, 40976, 18, 18, 0, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 1314, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 1321, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 0, 367, 0, 0, 1315, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1360, 97, 97, 131, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 145, 149, 45, 45, 45, 45, 45, 174, 45, 179, 45, 185, 45, 188, 45, 45, 202, 67, 255, 67, 67, 269, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 292, 296, 97, 97, 97, 97, 97, 321, 97, 326, 97, 332, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 646, 335, 97, 97, 349, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 437, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 523, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 511, 67, 67, 67, 97, 97, 97, 620, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1501, 1502, 97, 793, 67, 67, 796, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 808, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 2052, 67, 67, 67, 67, 813, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 57889, 0, 0, 54074, 54074, 550, 830, 97, 97, 97, 97, 97, 97, 97, 97, 97, 315, 97, 97, 97, 97, 97, 97, 841, 97, 97, 97, 97, 97, 97, 97, 97, 97, 854, 97, 97, 97, 97, 97, 97, 589, 97, 97, 97, 97, 97, 97, 97, 97, 97, 867, 97, 97, 97, 97, 97, 97, 97, 891, 97, 97, 894, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 906, 45, 937, 45, 45, 940, 45, 45, 45, 45, 45, 45, 948, 45, 45, 45, 45, 45, 734, 735, 67, 737, 67, 738, 67, 740, 67, 67, 67, 45, 967, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 435, 45, 45, 45, 980, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 415, 45, 45, 67, 67, 1024, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 67, 67, 67, 67, 67, 25398, 1081, 13112, 1085, 54074, 1089, 0, 0, 0, 0, 0, 0, 363, 0, 28809, 0, 139, 45, 45, 45, 45, 45, 45, 1674, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1913, 67, 1914, 67, 67, 67, 1918, 67, 67, 97, 97, 97, 97, 1118, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 630, 97, 97, 97, 97, 97, 1169, 97, 97, 97, 97, 97, 0, 921, 0, 1175, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 1534, 45, 45, 45, 45, 45, 1538, 45, 45, 45, 45, 1233, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 742, 67, 45, 45, 1191, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 454, 67, 67, 67, 67, 1243, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1251, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 2050, 0, 97, 97, 45, 45, 45, 732, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 67, 67, 67, 1284, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 772, 67, 67, 67, 1293, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 368, 2158592, 2158592, 2158592, 2404352, 2412544, 1323, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1331, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1737, 97, 1364, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1373, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 647, 45, 45, 1387, 45, 45, 1391, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 410, 45, 45, 45, 45, 45, 1400, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1407, 45, 45, 45, 45, 45, 941, 45, 943, 45, 45, 45, 45, 45, 45, 951, 45, 67, 1438, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1447, 67, 67, 67, 67, 67, 67, 799, 67, 67, 67, 804, 67, 67, 67, 67, 67, 67, 67, 1443, 67, 67, 1446, 67, 67, 67, 67, 67, 67, 67, 1298, 0, 0, 0, 1304, 0, 0, 0, 1310, 97, 1491, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1500, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1736, 97, 45, 45, 1541, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 677, 45, 45, 67, 1581, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 791, 792, 67, 67, 67, 67, 1598, 67, 1600, 67, 67, 67, 67, 67, 67, 67, 67, 1472, 97, 97, 97, 1727, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1513, 97, 97, 67, 67, 97, 1879, 97, 1881, 97, 0, 1884, 0, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 1842, 97, 97, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1928, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 1903, 45, 45, 45, 67, 67, 67, 67, 97, 97, 97, 97, 1971, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 1381, 45, 45, 45, 45, 1976, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1747, 809, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 97, 907, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 638, 0, 0, 0, 0, 1478, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1150, 97, 97, 97, 97, 67, 67, 67, 67, 1244, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 477, 67, 67, 67, 67, 67, 67, 1294, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1324, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 1374, 97, 97, 97, 97, 0, 1175, 0, 45, 45, 45, 45, 45, 45, 45, 45, 945, 45, 45, 45, 45, 45, 45, 45, 45, 1908, 45, 45, 1910, 45, 67, 67, 67, 67, 67, 67, 67, 67, 1919, 67, 0, 0, 97, 97, 97, 97, 45, 2048, 67, 2049, 0, 0, 97, 2051, 45, 45, 45, 939, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 397, 45, 45, 45, 1921, 67, 67, 1923, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 1947, 45, 1935, 0, 0, 0, 97, 1939, 97, 97, 1941, 97, 45, 45, 45, 45, 45, 45, 382, 389, 45, 45, 45, 45, 45, 45, 45, 45, 1810, 45, 45, 1812, 67, 67, 67, 67, 67, 256, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 336, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 371, 373, 45, 45, 45, 955, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 413, 45, 45, 45, 457, 459, 67, 67, 67, 67, 67, 67, 67, 67, 473, 67, 478, 67, 67, 482, 67, 67, 485, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 1828, 97, 554, 556, 97, 97, 97, 97, 97, 97, 97, 97, 570, 97, 575, 97, 97, 579, 97, 97, 582, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 330, 97, 97, 67, 746, 67, 67, 67, 67, 67, 67, 67, 67, 67, 758, 67, 67, 67, 67, 67, 67, 67, 1587, 67, 1589, 67, 67, 67, 67, 67, 67, 67, 97, 1706, 97, 97, 97, 1709, 97, 97, 97, 97, 97, 844, 97, 97, 97, 97, 97, 97, 97, 97, 97, 856, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1735, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 1642, 97, 1644, 97, 97, 890, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 67, 67, 67, 67, 1065, 1066, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 532, 67, 67, 67, 67, 67, 67, 67, 1451, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 496, 67, 67, 97, 97, 1505, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 593, 97, 97, 0, 1474, 0, 1476, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1617, 97, 97, 1635, 0, 1637, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 885, 97, 97, 97, 97, 67, 67, 1704, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 565, 572, 97, 97, 97, 97, 97, 97, 97, 97, 1832, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 1946, 45, 45, 67, 67, 67, 67, 67, 97, 1926, 97, 1927, 97, 0, 0, 0, 97, 97, 1934, 2043, 0, 0, 97, 97, 97, 2047, 45, 45, 67, 67, 0, 1832, 97, 97, 45, 45, 45, 981, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1227, 45, 45, 45, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 372, 45, 45, 45, 45, 1661, 1662, 45, 45, 45, 45, 45, 1666, 45, 45, 45, 45, 45, 1673, 45, 1675, 45, 45, 45, 45, 45, 45, 45, 67, 1426, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1275, 67, 67, 67, 67, 67, 45, 418, 45, 45, 420, 45, 45, 423, 45, 45, 45, 45, 45, 45, 45, 45, 959, 45, 45, 962, 45, 45, 45, 45, 458, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 483, 67, 67, 67, 67, 504, 67, 67, 506, 67, 67, 509, 67, 67, 67, 67, 67, 67, 67, 753, 67, 67, 67, 67, 67, 67, 67, 67, 467, 67, 67, 67, 67, 67, 67, 67, 555, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 580, 97, 97, 97, 97, 601, 97, 97, 603, 97, 97, 606, 97, 97, 97, 97, 97, 97, 848, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1498, 97, 97, 97, 97, 97, 97, 45, 45, 714, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 989, 990, 45, 67, 67, 67, 67, 67, 1011, 67, 67, 67, 67, 1015, 67, 67, 67, 67, 67, 67, 67, 768, 67, 67, 67, 67, 67, 67, 67, 67, 769, 67, 67, 67, 67, 67, 67, 67, 45, 45, 1179, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1003, 1004, 67, 1217, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 728, 67, 1461, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1034, 67, 97, 1516, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 871, 97, 67, 67, 67, 1705, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 567, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1715, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 1380, 45, 45, 45, 45, 45, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 1887, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 2006, 45, 45, 1907, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1920, 67, 97, 0, 2035, 97, 97, 97, 97, 97, 45, 45, 45, 45, 67, 67, 67, 1428, 67, 67, 67, 67, 67, 67, 1435, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 146, 45, 152, 45, 45, 165, 45, 175, 45, 180, 45, 45, 187, 190, 195, 45, 203, 254, 257, 262, 67, 270, 67, 67, 0, 24850, 12564, 0, 0, 0, 281, 28809, 53531, 97, 97, 97, 293, 97, 299, 97, 97, 312, 97, 322, 97, 327, 97, 97, 334, 337, 342, 97, 350, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 67, 484, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 499, 97, 581, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 596, 648, 45, 650, 45, 651, 45, 653, 45, 45, 45, 657, 45, 45, 45, 45, 45, 45, 1954, 67, 67, 67, 1958, 67, 67, 67, 67, 67, 67, 67, 783, 67, 67, 67, 788, 67, 67, 67, 67, 680, 45, 45, 45, 45, 45, 45, 45, 45, 688, 689, 691, 45, 45, 45, 45, 45, 983, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 947, 45, 45, 45, 45, 952, 45, 45, 698, 699, 45, 45, 702, 703, 45, 45, 45, 45, 45, 45, 45, 711, 744, 67, 67, 67, 67, 67, 67, 67, 67, 67, 757, 67, 67, 67, 67, 761, 67, 67, 67, 67, 765, 67, 767, 67, 67, 67, 67, 67, 67, 67, 67, 775, 776, 778, 67, 67, 67, 67, 67, 67, 785, 786, 67, 67, 789, 790, 67, 67, 67, 67, 67, 67, 1574, 67, 67, 67, 67, 67, 1578, 67, 67, 67, 67, 67, 67, 1012, 67, 67, 67, 67, 67, 67, 67, 67, 67, 468, 475, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 798, 67, 67, 67, 802, 67, 67, 67, 67, 67, 67, 67, 67, 1588, 67, 67, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 67, 810, 67, 67, 67, 67, 67, 67, 67, 67, 67, 821, 25398, 542, 13112, 544, 57889, 0, 0, 54074, 54074, 550, 0, 833, 97, 835, 97, 836, 97, 838, 97, 97, 0, 0, 97, 97, 97, 1785, 97, 97, 0, 0, 97, 97, 0, 97, 97, 1979, 97, 97, 45, 45, 1983, 45, 1984, 45, 45, 45, 45, 45, 652, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 690, 45, 45, 694, 45, 45, 97, 842, 97, 97, 97, 97, 97, 97, 97, 97, 97, 855, 97, 97, 97, 97, 0, 1717, 1718, 97, 97, 97, 97, 97, 1722, 97, 0, 0, 859, 97, 97, 97, 97, 863, 97, 865, 97, 97, 97, 97, 97, 97, 97, 97, 604, 97, 97, 97, 97, 97, 97, 97, 873, 874, 876, 97, 97, 97, 97, 97, 97, 883, 884, 97, 97, 887, 888, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 225280, 0, 365, 0, 367, 0, 45, 45, 45, 1531, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1199, 45, 45, 45, 45, 45, 97, 97, 908, 97, 97, 97, 97, 97, 97, 97, 97, 97, 919, 638, 0, 0, 0, 0, 2158877, 2158877, 2158877, 2158877, 2158877, 2425117, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2597149, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2642205, 2158877, 2158877, 2158877, 2158877, 2158877, 3158301, 0, 2375818, 2379914, 2158730, 2158730, 2420874, 2158730, 2449546, 2158730, 2158730, 953, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 965, 978, 45, 45, 45, 45, 45, 45, 985, 45, 45, 45, 45, 45, 45, 45, 45, 971, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1027, 67, 1029, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1455, 67, 67, 67, 67, 67, 67, 67, 1077, 1078, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 0, 366, 0, 139, 2158730, 2158730, 2158730, 2404490, 2412682, 1113, 97, 97, 97, 97, 97, 97, 1121, 97, 1123, 97, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1540, 1155, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 615, 1168, 97, 97, 1171, 1172, 97, 97, 0, 921, 0, 1175, 0, 0, 0, 0, 45, 45, 45, 45, 45, 1533, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1559, 1561, 45, 45, 45, 1564, 45, 1566, 1567, 45, 45, 45, 1219, 45, 45, 45, 45, 45, 45, 45, 1226, 45, 45, 45, 45, 45, 168, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 427, 45, 45, 45, 45, 45, 45, 45, 1231, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1242, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1046, 67, 67, 1254, 67, 1256, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 806, 807, 67, 67, 97, 1336, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1111, 97, 97, 97, 97, 97, 1351, 97, 97, 97, 1354, 97, 97, 97, 1359, 97, 97, 97, 0, 97, 97, 97, 97, 1640, 97, 97, 97, 97, 97, 97, 97, 897, 97, 97, 97, 902, 97, 97, 97, 97, 97, 97, 97, 97, 1366, 97, 97, 97, 97, 97, 97, 97, 1371, 97, 97, 97, 0, 97, 97, 97, 1730, 97, 97, 97, 97, 97, 97, 97, 97, 915, 97, 97, 97, 97, 0, 360, 0, 67, 67, 67, 1440, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1017, 67, 1019, 67, 67, 67, 67, 67, 1453, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1459, 97, 97, 97, 1493, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1525, 97, 97, 97, 97, 97, 97, 1507, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1514, 67, 67, 67, 67, 1584, 67, 67, 67, 67, 67, 1590, 67, 67, 67, 67, 67, 67, 67, 784, 67, 67, 67, 67, 67, 67, 67, 67, 1055, 67, 67, 67, 67, 1060, 67, 67, 67, 67, 67, 67, 67, 1599, 1601, 67, 67, 67, 1604, 67, 1606, 1607, 67, 1472, 0, 1474, 0, 1476, 0, 97, 97, 97, 97, 97, 97, 1614, 97, 97, 97, 97, 45, 45, 1850, 45, 45, 45, 45, 1855, 45, 45, 45, 45, 45, 1222, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1229, 97, 1618, 97, 97, 97, 97, 97, 97, 97, 1625, 97, 97, 97, 97, 97, 0, 1175, 0, 45, 45, 45, 45, 45, 45, 45, 45, 447, 45, 45, 45, 45, 45, 67, 67, 1633, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1643, 1645, 97, 97, 0, 0, 97, 97, 97, 2002, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 1740, 45, 45, 45, 1744, 45, 45, 45, 97, 1648, 97, 1650, 1651, 97, 0, 45, 45, 45, 1654, 45, 45, 45, 45, 45, 169, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 658, 45, 45, 45, 45, 664, 45, 45, 1659, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1187, 45, 45, 1669, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1005, 67, 67, 1681, 67, 67, 67, 67, 67, 67, 67, 1686, 67, 67, 67, 67, 67, 67, 67, 800, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1603, 67, 67, 67, 67, 67, 0, 97, 97, 1713, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 1378, 45, 45, 45, 45, 45, 45, 45, 408, 45, 45, 45, 45, 45, 45, 45, 45, 1547, 45, 1549, 45, 45, 45, 45, 45, 97, 97, 1780, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 2027, 2028, 45, 45, 67, 67, 2031, 2032, 67, 45, 45, 1804, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1917, 67, 67, 67, 67, 67, 67, 67, 1819, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 1708, 97, 97, 97, 97, 97, 45, 45, 1862, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 497, 67, 67, 67, 1877, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 1839, 0, 0, 97, 97, 97, 97, 1936, 0, 0, 97, 97, 97, 97, 97, 97, 1943, 1944, 1945, 45, 45, 45, 45, 670, 45, 45, 45, 45, 674, 45, 45, 45, 45, 678, 45, 1948, 45, 1950, 45, 45, 45, 45, 1955, 1956, 1957, 67, 67, 67, 1960, 67, 1962, 67, 67, 67, 67, 1967, 1968, 1969, 97, 0, 0, 0, 97, 97, 1974, 97, 0, 1936, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 1906, 0, 1977, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1746, 45, 45, 45, 45, 2011, 67, 67, 2013, 67, 67, 67, 2017, 97, 97, 0, 0, 2021, 97, 8192, 97, 97, 2025, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1916, 67, 67, 67, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 140, 45, 45, 45, 1180, 45, 45, 45, 45, 1184, 45, 45, 45, 45, 45, 45, 45, 387, 45, 392, 45, 45, 396, 45, 45, 399, 45, 45, 67, 207, 67, 67, 67, 67, 67, 67, 236, 67, 67, 67, 67, 67, 67, 67, 817, 67, 67, 67, 67, 25398, 542, 13112, 544, 97, 97, 287, 97, 97, 97, 97, 97, 97, 316, 97, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 1656, 1657, 45, 376, 45, 45, 45, 45, 45, 388, 45, 45, 45, 45, 45, 45, 45, 45, 1406, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 462, 67, 67, 67, 67, 67, 474, 67, 67, 67, 67, 67, 67, 67, 1245, 67, 67, 67, 67, 67, 67, 67, 67, 1013, 67, 67, 1016, 67, 67, 67, 67, 97, 97, 97, 97, 559, 97, 97, 97, 97, 97, 571, 97, 97, 97, 97, 97, 97, 896, 97, 97, 97, 900, 97, 97, 97, 97, 97, 97, 912, 914, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 391, 45, 45, 45, 45, 45, 45, 45, 45, 713, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 662, 45, 1140, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 636, 67, 67, 1283, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 513, 67, 67, 1363, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 889, 97, 97, 97, 1714, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 926, 45, 45, 45, 45, 45, 45, 45, 45, 672, 45, 45, 45, 45, 45, 45, 45, 45, 686, 45, 45, 45, 45, 45, 45, 45, 45, 944, 45, 45, 45, 45, 45, 45, 45, 45, 1676, 45, 45, 45, 45, 45, 45, 67, 97, 97, 97, 1833, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 1902, 45, 45, 45, 45, 45, 957, 45, 45, 45, 45, 961, 45, 963, 45, 45, 45, 67, 97, 2034, 0, 97, 97, 97, 97, 97, 2040, 45, 45, 45, 2042, 67, 67, 67, 67, 67, 67, 1586, 67, 67, 67, 67, 67, 67, 67, 67, 67, 469, 67, 67, 67, 67, 67, 67, 132, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 45, 45, 1414, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 428, 45, 45, 45, 45, 45, 57889, 0, 0, 54074, 54074, 550, 831, 97, 97, 97, 97, 97, 97, 97, 97, 97, 568, 97, 97, 97, 97, 578, 97, 45, 45, 968, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1228, 45, 45, 67, 67, 67, 67, 67, 25398, 1082, 13112, 1086, 54074, 1090, 0, 0, 0, 0, 0, 0, 364, 0, 0, 0, 139, 2158592, 2158592, 2158592, 2404352, 2412544, 67, 67, 67, 67, 1464, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 510, 67, 67, 67, 67, 97, 97, 97, 97, 1519, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 918, 97, 0, 0, 0, 0, 1528, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 976, 45, 1554, 45, 45, 45, 45, 45, 45, 45, 45, 1562, 45, 45, 1565, 45, 45, 45, 45, 683, 45, 45, 45, 687, 45, 45, 692, 45, 45, 45, 45, 45, 1953, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1014, 67, 67, 67, 67, 67, 67, 1568, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 67, 67, 67, 67, 67, 1585, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1594, 97, 97, 1649, 97, 97, 97, 0, 45, 45, 1653, 45, 45, 45, 45, 45, 45, 383, 45, 45, 45, 45, 45, 45, 45, 45, 45, 986, 45, 45, 45, 45, 45, 45, 45, 45, 1670, 45, 1672, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 736, 67, 67, 67, 67, 67, 741, 67, 67, 67, 1680, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1074, 67, 67, 67, 1692, 67, 67, 67, 67, 67, 67, 67, 1697, 67, 1699, 67, 67, 67, 67, 67, 67, 1041, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1044, 67, 67, 67, 67, 67, 67, 67, 1769, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 624, 97, 97, 97, 97, 97, 97, 634, 97, 97, 1792, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 958, 45, 45, 45, 45, 45, 45, 964, 45, 150, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 977, 204, 45, 67, 67, 67, 217, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 787, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 271, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 97, 297, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1108, 97, 97, 97, 97, 97, 97, 97, 97, 351, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 45, 938, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1398, 45, 45, 45, 153, 45, 161, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 660, 661, 45, 45, 205, 45, 67, 67, 67, 67, 220, 67, 228, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 1302, 0, 0, 0, 1308, 0, 67, 67, 67, 67, 67, 272, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 97, 352, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 439, 45, 45, 45, 45, 45, 445, 45, 45, 45, 452, 45, 45, 67, 67, 212, 216, 67, 67, 67, 67, 67, 241, 67, 246, 67, 252, 67, 67, 486, 67, 67, 67, 67, 67, 67, 67, 494, 67, 67, 67, 67, 67, 67, 67, 1272, 67, 67, 67, 67, 67, 67, 67, 67, 507, 67, 67, 67, 67, 67, 67, 67, 67, 521, 67, 67, 525, 67, 67, 67, 67, 67, 531, 67, 67, 67, 538, 67, 0, 0, 2046, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 1192, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1418, 45, 45, 1421, 97, 97, 583, 97, 97, 97, 97, 97, 97, 97, 591, 97, 97, 97, 97, 97, 97, 913, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 1384, 97, 618, 97, 97, 622, 97, 97, 97, 97, 97, 628, 97, 97, 97, 635, 97, 18, 131427, 0, 0, 0, 639, 0, 132, 362, 0, 0, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 932, 45, 45, 45, 45, 45, 1544, 45, 45, 45, 45, 45, 1550, 45, 45, 45, 45, 45, 1194, 45, 1196, 45, 45, 45, 45, 45, 45, 45, 45, 999, 45, 45, 45, 45, 45, 67, 67, 45, 45, 667, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1408, 45, 45, 45, 696, 45, 45, 45, 701, 45, 45, 45, 45, 45, 45, 45, 45, 710, 45, 45, 45, 1220, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 194, 45, 45, 45, 729, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 797, 67, 67, 67, 67, 67, 67, 805, 67, 67, 67, 67, 67, 67, 67, 1695, 67, 67, 67, 67, 67, 1700, 67, 1702, 67, 67, 67, 67, 67, 814, 816, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 67, 67, 1008, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1020, 67, 0, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 67, 67, 67, 67, 1429, 67, 1430, 67, 67, 67, 67, 67, 1062, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 518, 1076, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 0, 28809, 0, 139, 45, 45, 45, 45, 45, 97, 97, 97, 97, 1102, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1124, 97, 1126, 97, 97, 1114, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1112, 97, 97, 1156, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 594, 97, 97, 97, 97, 1170, 97, 97, 97, 97, 0, 921, 0, 0, 0, 0, 0, 0, 45, 45, 45, 45, 1532, 45, 45, 45, 45, 1536, 45, 45, 45, 45, 45, 172, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 706, 45, 45, 709, 45, 45, 1177, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1202, 45, 1204, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1215, 45, 45, 45, 1232, 45, 45, 45, 45, 45, 45, 45, 67, 1237, 67, 67, 67, 67, 67, 67, 1259, 67, 67, 67, 67, 67, 67, 1264, 67, 67, 67, 1282, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1289, 67, 67, 67, 1292, 97, 97, 97, 97, 1339, 97, 97, 97, 97, 97, 97, 1344, 97, 97, 97, 97, 45, 1849, 45, 1851, 45, 45, 45, 45, 45, 45, 45, 45, 721, 45, 45, 45, 45, 45, 726, 45, 1385, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1188, 45, 45, 1401, 1402, 45, 45, 45, 45, 1405, 45, 45, 45, 45, 45, 45, 45, 45, 1752, 45, 45, 45, 45, 45, 67, 67, 1410, 45, 45, 45, 1413, 45, 1415, 45, 45, 45, 45, 45, 45, 1419, 45, 45, 45, 45, 1806, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 97, 97, 2019, 0, 97, 67, 67, 67, 1452, 67, 67, 67, 67, 67, 67, 67, 67, 1457, 67, 67, 67, 67, 67, 67, 1271, 67, 67, 67, 1274, 67, 67, 67, 1279, 67, 1460, 67, 1462, 67, 67, 67, 67, 67, 67, 1466, 67, 67, 67, 67, 67, 67, 67, 67, 1602, 67, 67, 1605, 67, 67, 67, 0, 97, 97, 97, 1506, 97, 97, 97, 97, 97, 97, 97, 97, 1512, 97, 97, 97, 0, 1728, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 901, 97, 97, 97, 97, 1515, 97, 1517, 97, 97, 97, 97, 97, 97, 1521, 97, 97, 97, 97, 97, 97, 0, 45, 1652, 45, 45, 45, 1655, 45, 45, 45, 45, 45, 1542, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1552, 1553, 45, 45, 45, 1556, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 693, 45, 45, 45, 67, 67, 67, 67, 1572, 67, 67, 67, 67, 1576, 67, 67, 67, 67, 67, 67, 67, 67, 1685, 67, 67, 67, 67, 67, 67, 67, 67, 1465, 67, 67, 1468, 67, 67, 1471, 67, 67, 1582, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1580, 67, 67, 1596, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 542, 0, 544, 67, 67, 67, 67, 1759, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 533, 67, 67, 67, 67, 67, 67, 67, 1770, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 1777, 97, 97, 97, 1793, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 998, 45, 45, 1001, 1002, 45, 45, 67, 67, 45, 1861, 45, 67, 67, 67, 67, 67, 67, 67, 67, 1871, 67, 1873, 1874, 67, 0, 97, 45, 67, 0, 97, 45, 67, 16384, 97, 45, 67, 97, 0, 0, 0, 1473, 0, 1082, 0, 0, 0, 1475, 0, 1086, 0, 0, 0, 1477, 1876, 67, 97, 97, 97, 97, 97, 1883, 0, 1885, 97, 97, 97, 1889, 0, 0, 0, 286, 0, 0, 0, 286, 0, 2367488, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 24, 126, 126, 126, 2053, 0, 2055, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 97, 97, 2039, 97, 45, 45, 45, 45, 67, 67, 67, 67, 67, 226, 67, 67, 67, 67, 67, 67, 67, 67, 1246, 67, 67, 1249, 1250, 67, 67, 67, 132, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 141, 45, 45, 45, 1403, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1186, 45, 45, 1189, 45, 45, 155, 45, 45, 45, 45, 45, 45, 45, 45, 45, 191, 45, 45, 45, 45, 700, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1753, 45, 45, 45, 67, 67, 45, 45, 67, 208, 67, 67, 67, 222, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1764, 67, 67, 67, 67, 67, 67, 67, 258, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 288, 97, 97, 97, 302, 97, 97, 97, 97, 97, 97, 97, 97, 97, 627, 97, 97, 97, 97, 97, 97, 338, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 370, 45, 45, 45, 45, 716, 45, 45, 45, 45, 45, 722, 45, 45, 45, 45, 45, 45, 1912, 67, 67, 67, 67, 67, 67, 67, 67, 67, 819, 67, 67, 25398, 542, 13112, 544, 45, 403, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1409, 45, 67, 67, 67, 67, 489, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 771, 67, 67, 67, 67, 520, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 534, 67, 67, 67, 67, 67, 67, 1286, 67, 67, 67, 67, 67, 67, 67, 1291, 67, 67, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 97, 553, 97, 97, 97, 97, 586, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1138, 97, 97, 97, 97, 617, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 631, 97, 97, 97, 0, 1834, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 353, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 45, 668, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 724, 45, 45, 45, 45, 45, 682, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 949, 45, 45, 45, 67, 67, 747, 748, 67, 67, 67, 67, 755, 67, 67, 67, 67, 67, 67, 67, 0, 0, 1301, 0, 0, 0, 1307, 0, 0, 67, 794, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1701, 67, 97, 97, 97, 845, 846, 97, 97, 97, 97, 853, 97, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 97, 97, 892, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 610, 97, 97, 45, 992, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1239, 67, 67, 67, 1063, 67, 67, 67, 67, 67, 1068, 67, 67, 67, 67, 67, 67, 67, 0, 1299, 0, 0, 0, 1305, 0, 0, 0, 97, 1141, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1152, 97, 97, 0, 0, 97, 97, 1784, 97, 97, 97, 0, 0, 97, 97, 0, 97, 1978, 97, 97, 97, 1982, 45, 45, 45, 45, 45, 45, 45, 45, 45, 972, 973, 45, 45, 45, 45, 45, 97, 97, 97, 97, 1157, 97, 97, 97, 97, 97, 1162, 97, 97, 97, 97, 97, 97, 1145, 97, 97, 97, 97, 97, 1151, 97, 97, 97, 1253, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 539, 45, 1423, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1431, 67, 67, 67, 67, 67, 67, 67, 1773, 67, 97, 97, 97, 97, 97, 97, 97, 625, 97, 97, 97, 97, 97, 97, 97, 97, 850, 97, 97, 97, 97, 97, 97, 97, 97, 880, 97, 97, 97, 97, 97, 97, 97, 97, 1106, 97, 97, 97, 97, 97, 97, 97, 67, 67, 1439, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 514, 67, 67, 97, 97, 1492, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 611, 97, 97, 1703, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 852, 97, 97, 97, 97, 97, 97, 45, 1949, 45, 1951, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1961, 67, 0, 97, 45, 67, 0, 97, 2060, 2061, 0, 2062, 45, 67, 97, 0, 0, 2036, 97, 97, 97, 97, 45, 45, 45, 45, 67, 67, 67, 67, 67, 223, 67, 67, 237, 67, 67, 67, 67, 67, 67, 67, 1297, 0, 0, 0, 1303, 0, 0, 0, 1309, 1963, 67, 67, 67, 97, 97, 97, 97, 0, 1972, 0, 97, 97, 97, 1975, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 931, 45, 45, 45, 45, 45, 407, 45, 45, 45, 45, 45, 45, 45, 45, 45, 417, 45, 45, 1989, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1996, 97, 18, 131427, 0, 0, 360, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 930, 45, 45, 45, 45, 45, 45, 444, 45, 45, 45, 45, 45, 45, 45, 67, 67, 97, 97, 1998, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1985, 45, 1986, 45, 45, 45, 156, 45, 45, 170, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 675, 45, 45, 45, 45, 679, 131427, 0, 358, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 381, 45, 45, 45, 45, 45, 45, 45, 45, 45, 400, 45, 45, 419, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 436, 67, 67, 67, 67, 67, 505, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 820, 67, 25398, 542, 13112, 544, 67, 67, 522, 67, 67, 67, 67, 67, 529, 67, 67, 67, 67, 67, 67, 67, 0, 1300, 0, 0, 0, 1306, 0, 0, 0, 97, 97, 619, 97, 97, 97, 97, 97, 626, 97, 97, 97, 97, 97, 97, 97, 1105, 97, 97, 97, 97, 1109, 97, 97, 97, 67, 67, 67, 67, 749, 67, 67, 67, 67, 67, 67, 67, 67, 67, 760, 67, 0, 97, 45, 67, 2058, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 97, 97, 97, 97, 45, 45, 45, 2041, 67, 67, 67, 67, 67, 780, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 516, 67, 67, 97, 97, 97, 878, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1629, 97, 0, 45, 979, 45, 45, 45, 45, 984, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1000, 45, 45, 45, 45, 67, 67, 67, 1023, 67, 67, 67, 67, 1028, 67, 67, 67, 67, 67, 67, 67, 67, 67, 470, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 1094, 0, 0, 0, 1092, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1486, 97, 1489, 97, 97, 97, 1117, 97, 97, 97, 97, 1122, 97, 97, 97, 97, 97, 97, 97, 1146, 97, 97, 97, 97, 97, 97, 97, 97, 881, 97, 97, 97, 886, 97, 97, 97, 1311, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1615, 97, 97, 97, 97, 97, 1619, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1631, 97, 97, 1847, 97, 45, 45, 45, 45, 1852, 45, 45, 45, 45, 45, 45, 45, 1235, 45, 45, 45, 67, 67, 67, 67, 67, 1868, 67, 67, 67, 1872, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1882, 0, 0, 0, 97, 97, 97, 97, 0, 1891, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 1929, 0, 0, 97, 97, 97, 97, 97, 97, 45, 1900, 45, 1901, 45, 45, 45, 1905, 45, 67, 2054, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 2037, 2038, 97, 97, 45, 45, 45, 45, 67, 67, 67, 67, 1867, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1774, 97, 97, 97, 97, 97, 97, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 142, 45, 45, 45, 1412, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 432, 45, 45, 45, 45, 45, 157, 45, 45, 171, 45, 45, 45, 182, 45, 45, 45, 45, 200, 45, 45, 45, 1543, 45, 45, 45, 45, 45, 45, 45, 45, 1551, 45, 45, 45, 45, 1181, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1211, 45, 45, 45, 1214, 45, 45, 45, 67, 209, 67, 67, 67, 224, 67, 67, 238, 67, 67, 67, 249, 67, 0, 97, 2056, 2057, 0, 2059, 45, 67, 0, 97, 45, 67, 97, 0, 0, 1937, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1741, 45, 45, 45, 45, 45, 45, 67, 67, 67, 267, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 289, 97, 97, 97, 304, 97, 97, 318, 97, 97, 97, 329, 97, 97, 0, 0, 97, 97, 2001, 0, 97, 2003, 97, 97, 97, 45, 45, 45, 1739, 45, 45, 45, 1742, 45, 45, 45, 45, 45, 97, 97, 347, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 666, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1420, 45, 57889, 0, 0, 54074, 54074, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 840, 67, 1007, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 759, 67, 67, 67, 67, 67, 67, 67, 1052, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1031, 67, 67, 67, 67, 67, 97, 97, 97, 1101, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 592, 97, 97, 97, 1190, 45, 45, 45, 45, 45, 1195, 45, 1197, 45, 45, 45, 45, 1201, 45, 45, 45, 45, 1952, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 250, 67, 67, 67, 1255, 67, 1257, 67, 67, 67, 67, 1261, 67, 67, 67, 67, 67, 67, 67, 67, 1696, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 2162688, 0, 0, 67, 67, 1267, 67, 67, 67, 67, 67, 67, 1273, 67, 67, 67, 67, 67, 67, 67, 67, 1763, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 280, 94, 0, 0, 1281, 67, 67, 67, 67, 1285, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1070, 67, 67, 67, 67, 67, 1335, 97, 1337, 97, 97, 97, 97, 1341, 97, 97, 97, 97, 97, 97, 97, 97, 882, 97, 97, 97, 97, 97, 97, 97, 1347, 97, 97, 97, 97, 97, 97, 1353, 97, 97, 97, 97, 97, 97, 1361, 97, 18, 131427, 0, 638, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 544, 0, 550, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2473984, 2158592, 2158592, 2158592, 2990080, 2158592, 2158592, 2207744, 2207744, 2482176, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 0, 53530, 97, 97, 97, 1365, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 608, 97, 97, 97, 45, 45, 1424, 45, 1425, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1058, 67, 67, 67, 67, 45, 1555, 45, 45, 1557, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 707, 45, 45, 45, 45, 67, 67, 1570, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 773, 67, 67, 1595, 67, 67, 1597, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 2158592, 2158592, 2158592, 2404352, 2412544, 97, 97, 97, 1636, 97, 97, 97, 1639, 97, 97, 1641, 97, 97, 97, 97, 97, 97, 1173, 0, 921, 0, 0, 0, 0, 0, 0, 45, 67, 67, 67, 1693, 67, 67, 67, 67, 67, 67, 67, 1698, 67, 67, 67, 67, 67, 67, 273, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 1860, 45, 45, 67, 67, 1865, 67, 67, 67, 67, 1870, 67, 67, 67, 67, 1875, 67, 67, 97, 97, 1880, 97, 97, 0, 0, 0, 97, 97, 1888, 97, 0, 0, 0, 1938, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1854, 45, 45, 45, 45, 45, 45, 45, 1909, 45, 45, 1911, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1248, 67, 67, 67, 67, 67, 67, 1922, 67, 67, 1924, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 1898, 45, 45, 45, 45, 45, 45, 1904, 45, 45, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 16384, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 1724, 2008, 2009, 45, 45, 67, 67, 67, 2014, 2015, 67, 67, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 2022, 0, 2023, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1869, 67, 67, 67, 67, 67, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 147, 151, 154, 45, 162, 45, 45, 176, 178, 181, 45, 45, 45, 192, 196, 45, 45, 45, 45, 2012, 67, 67, 67, 67, 67, 67, 2018, 97, 0, 0, 97, 1894, 1895, 97, 1897, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 656, 45, 45, 45, 45, 45, 45, 67, 259, 263, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 294, 298, 301, 97, 309, 97, 97, 323, 325, 328, 97, 97, 97, 97, 97, 560, 97, 97, 97, 569, 97, 97, 97, 97, 97, 97, 306, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1624, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 1175, 0, 0, 0, 0, 45, 339, 343, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 67, 67, 503, 67, 67, 67, 67, 67, 67, 67, 67, 67, 512, 67, 67, 519, 97, 97, 600, 97, 97, 97, 97, 97, 97, 97, 97, 97, 609, 97, 97, 616, 45, 649, 45, 45, 45, 45, 45, 654, 45, 45, 45, 45, 45, 45, 45, 45, 1393, 45, 45, 45, 45, 45, 45, 45, 45, 1209, 45, 45, 45, 45, 45, 45, 45, 67, 763, 67, 67, 67, 67, 67, 67, 67, 67, 770, 67, 67, 67, 774, 67, 0, 2045, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 994, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 213, 67, 219, 67, 67, 232, 67, 242, 67, 247, 67, 67, 67, 779, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1018, 67, 67, 67, 67, 811, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 57889, 0, 0, 54074, 54074, 550, 0, 97, 834, 97, 97, 97, 97, 97, 839, 97, 18, 131427, 0, 638, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 645, 97, 97, 861, 97, 97, 97, 97, 97, 97, 97, 97, 868, 97, 97, 97, 872, 97, 97, 877, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 613, 97, 97, 97, 97, 97, 909, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 18, 18, 24, 24, 27, 27, 27, 1036, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1047, 67, 67, 67, 1050, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1033, 67, 67, 67, 97, 97, 1130, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 638, 0, 0, 67, 67, 67, 1295, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 1317, 97, 97, 97, 97, 97, 97, 1375, 97, 97, 97, 0, 0, 0, 45, 1379, 45, 45, 45, 45, 45, 45, 422, 45, 45, 45, 429, 431, 45, 45, 45, 45, 0, 1090, 0, 0, 97, 1479, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1357, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1716, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1723, 0, 921, 29315, 0, 0, 0, 0, 45, 929, 45, 45, 45, 45, 45, 45, 45, 1234, 45, 45, 45, 45, 67, 67, 67, 67, 1240, 97, 97, 97, 1738, 45, 45, 45, 45, 45, 45, 45, 1743, 45, 45, 45, 45, 166, 45, 45, 45, 45, 184, 186, 45, 45, 197, 45, 45, 97, 1779, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 18, 131427, 0, 638, 0, 0, 0, 0, 362, 0, 640, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1539, 45, 45, 1803, 45, 45, 45, 45, 45, 1809, 45, 45, 45, 67, 67, 67, 1814, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 1932, 97, 97, 0, 1781, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 67, 67, 67, 1818, 67, 67, 67, 67, 67, 1824, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 1890, 0, 1829, 97, 97, 0, 0, 97, 97, 1836, 97, 97, 0, 0, 0, 97, 97, 97, 97, 1981, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1987, 1845, 97, 97, 97, 45, 45, 45, 45, 45, 1853, 45, 45, 45, 1857, 45, 45, 45, 67, 1864, 67, 1866, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 1710, 1711, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 1886, 97, 97, 97, 0, 0, 97, 97, 97, 97, 1838, 0, 0, 0, 97, 1843, 97, 0, 1893, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1745, 45, 45, 67, 2044, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 1660, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 453, 45, 455, 67, 67, 67, 67, 268, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 348, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 359, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 421, 45, 45, 45, 45, 45, 45, 45, 434, 45, 45, 695, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1667, 45, 0, 921, 29315, 0, 925, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1548, 45, 45, 45, 45, 45, 45, 67, 1037, 67, 1039, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1277, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 1095, 0, 0, 0, 1096, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 869, 97, 97, 97, 97, 97, 97, 1131, 97, 1133, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1370, 97, 97, 97, 97, 97, 1312, 0, 0, 0, 0, 1096, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1327, 97, 97, 97, 97, 97, 1332, 97, 97, 97, 1830, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 1896, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1210, 45, 45, 45, 45, 45, 45, 133, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 45, 380, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 401, 45, 45, 158, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1200, 45, 45, 45, 45, 206, 67, 67, 67, 67, 67, 225, 67, 67, 67, 67, 67, 67, 67, 67, 754, 67, 67, 67, 67, 67, 67, 67, 57889, 0, 0, 54074, 54074, 550, 832, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1342, 97, 97, 97, 97, 97, 97, 67, 67, 67, 67, 67, 25398, 1083, 13112, 1087, 54074, 1091, 0, 0, 0, 0, 0, 0, 1316, 0, 831, 97, 97, 97, 97, 97, 97, 97, 1174, 921, 0, 1175, 0, 0, 0, 0, 45, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 148, 67, 67, 264, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 295, 97, 97, 97, 97, 313, 97, 97, 97, 97, 331, 333, 97, 18, 131427, 356, 638, 0, 0, 0, 0, 362, 0, 0, 365, 0, 367, 0, 45, 45, 1530, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 988, 45, 45, 45, 97, 344, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 402, 404, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1756, 67, 438, 45, 45, 45, 45, 45, 45, 45, 45, 449, 450, 45, 45, 45, 67, 67, 214, 218, 221, 67, 229, 67, 67, 243, 245, 248, 67, 67, 67, 67, 67, 488, 490, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1071, 67, 1073, 67, 67, 67, 67, 67, 524, 67, 67, 67, 67, 67, 67, 67, 67, 535, 536, 67, 67, 67, 67, 67, 67, 1683, 1684, 67, 67, 67, 67, 1688, 1689, 67, 67, 67, 67, 67, 67, 1694, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1288, 67, 67, 67, 67, 67, 67, 97, 97, 97, 585, 587, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1163, 97, 97, 97, 97, 97, 97, 97, 621, 97, 97, 97, 97, 97, 97, 97, 97, 632, 633, 97, 97, 0, 0, 97, 1783, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 2026, 45, 45, 45, 45, 67, 2030, 67, 67, 67, 67, 67, 67, 1053, 1054, 67, 67, 67, 67, 67, 67, 1061, 67, 712, 45, 45, 45, 717, 45, 45, 45, 45, 45, 45, 45, 45, 725, 45, 45, 45, 163, 167, 173, 177, 45, 45, 45, 45, 45, 193, 45, 45, 45, 45, 982, 45, 45, 45, 45, 45, 45, 987, 45, 45, 45, 45, 45, 1558, 45, 1560, 45, 45, 45, 45, 45, 45, 45, 45, 704, 705, 45, 45, 45, 45, 45, 45, 45, 45, 731, 45, 45, 45, 67, 67, 67, 67, 67, 739, 67, 67, 67, 67, 67, 67, 464, 67, 67, 67, 67, 67, 67, 479, 67, 67, 67, 67, 67, 764, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1290, 67, 67, 67, 67, 67, 67, 812, 67, 67, 67, 67, 818, 67, 67, 67, 25398, 542, 13112, 544, 57889, 0, 0, 54074, 54074, 550, 0, 97, 97, 97, 97, 97, 837, 97, 97, 97, 97, 97, 602, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1137, 97, 97, 97, 97, 97, 97, 97, 97, 97, 862, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1627, 97, 97, 97, 0, 97, 97, 97, 97, 910, 97, 97, 97, 97, 916, 97, 97, 97, 0, 0, 0, 97, 97, 1940, 97, 97, 1942, 45, 45, 45, 45, 45, 45, 385, 45, 45, 45, 45, 395, 45, 45, 45, 45, 966, 45, 969, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 975, 45, 45, 45, 406, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 974, 45, 45, 45, 67, 67, 67, 67, 1010, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1262, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1040, 67, 1042, 67, 1045, 67, 67, 67, 67, 67, 67, 67, 527, 67, 67, 67, 67, 67, 67, 537, 67, 67, 67, 67, 67, 1051, 67, 67, 67, 67, 67, 1057, 67, 67, 67, 67, 67, 67, 67, 1454, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1445, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1079, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744, 2207744, 2207744, 2207744, 2207744, 2572288, 2207744, 2207744, 2207744, 1098, 97, 97, 97, 97, 97, 1104, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1356, 97, 97, 97, 97, 97, 97, 1128, 97, 97, 97, 97, 97, 97, 1134, 97, 1136, 97, 1139, 97, 97, 97, 97, 97, 97, 1622, 97, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 0, 0, 1176, 0, 646, 45, 67, 67, 67, 1268, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1469, 67, 67, 67, 97, 1348, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1127, 97, 67, 1569, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1448, 1449, 67, 1816, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1825, 67, 67, 1827, 97, 97, 0, 0, 1782, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 1831, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 1980, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1395, 45, 45, 45, 45, 45, 97, 1846, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1212, 45, 45, 45, 45, 45, 45, 2010, 45, 67, 67, 67, 67, 67, 2016, 67, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 2007, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 143, 45, 45, 45, 1671, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1813, 67, 67, 1815, 45, 45, 67, 210, 67, 67, 67, 67, 67, 67, 239, 67, 67, 67, 67, 67, 67, 67, 1575, 67, 67, 67, 67, 67, 67, 67, 67, 493, 67, 67, 67, 67, 67, 67, 67, 97, 97, 290, 97, 97, 97, 97, 97, 97, 319, 97, 97, 97, 97, 97, 97, 303, 97, 97, 317, 97, 97, 97, 97, 97, 97, 305, 97, 97, 97, 97, 97, 97, 97, 97, 97, 899, 97, 97, 97, 97, 97, 97, 375, 45, 45, 45, 379, 45, 45, 390, 45, 45, 394, 45, 45, 45, 45, 45, 443, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 461, 67, 67, 67, 465, 67, 67, 476, 67, 67, 480, 67, 67, 67, 67, 67, 67, 1761, 67, 67, 67, 67, 67, 67, 67, 67, 67, 530, 67, 67, 67, 67, 67, 67, 500, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1075, 97, 97, 97, 558, 97, 97, 97, 562, 97, 97, 573, 97, 97, 577, 97, 97, 0, 1999, 97, 97, 97, 0, 97, 97, 2004, 2005, 97, 45, 45, 45, 45, 1193, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 676, 45, 45, 45, 45, 597, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1334, 45, 681, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1396, 45, 45, 1399, 45, 45, 730, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1434, 67, 67, 67, 67, 67, 67, 750, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1456, 67, 67, 67, 67, 67, 45, 45, 993, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 1238, 67, 67, 1006, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1280, 1048, 1049, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1059, 67, 67, 67, 67, 67, 67, 1296, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2367488, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 97, 97, 1100, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 638, 0, 920, 97, 97, 1142, 1143, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1153, 97, 97, 97, 97, 97, 1144, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1149, 97, 97, 97, 97, 1154, 45, 1218, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1678, 45, 45, 45, 67, 67, 67, 67, 67, 1269, 67, 67, 67, 67, 67, 67, 67, 67, 1278, 67, 67, 67, 67, 67, 67, 1772, 67, 67, 97, 97, 97, 97, 97, 97, 97, 0, 921, 922, 1175, 0, 0, 0, 0, 45, 97, 97, 1349, 97, 97, 97, 97, 97, 97, 97, 97, 1358, 97, 97, 97, 97, 97, 97, 1623, 97, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 0, 926, 0, 0, 0, 45, 45, 1411, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1754, 45, 45, 67, 67, 1301, 0, 1307, 0, 1313, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 21054, 97, 97, 97, 97, 67, 1757, 67, 67, 67, 1760, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1467, 67, 67, 67, 67, 67, 1778, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 97, 97, 1158, 97, 97, 97, 1161, 97, 97, 97, 97, 1166, 97, 97, 97, 97, 97, 1325, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1328, 97, 97, 97, 97, 97, 97, 97, 67, 67, 67, 67, 67, 1820, 67, 1822, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 1933, 97, 1892, 97, 97, 97, 97, 97, 97, 1899, 45, 45, 45, 45, 45, 45, 45, 45, 1664, 45, 45, 45, 45, 45, 45, 45, 45, 1546, 45, 45, 45, 45, 45, 45, 45, 45, 1208, 45, 45, 45, 45, 45, 45, 45, 45, 1224, 45, 45, 45, 45, 45, 45, 45, 45, 673, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1925, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 623, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 307, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1796, 97, 45, 45, 45, 45, 45, 45, 45, 970, 45, 45, 45, 45, 45, 45, 45, 45, 1417, 45, 45, 45, 45, 45, 45, 45, 67, 1964, 67, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 1721, 97, 97, 0, 0, 1997, 97, 0, 0, 2000, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 733, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 803, 67, 67, 67, 67, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 144, 45, 45, 45, 1805, 45, 1807, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 231, 67, 67, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 281, 28809, 53531, 45, 45, 67, 211, 67, 67, 67, 67, 230, 234, 240, 244, 67, 67, 67, 67, 67, 67, 492, 67, 67, 67, 67, 67, 67, 67, 67, 67, 471, 67, 67, 67, 67, 481, 67, 67, 260, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 291, 97, 97, 97, 97, 310, 314, 320, 324, 97, 97, 97, 97, 97, 97, 1367, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1355, 97, 97, 97, 97, 97, 97, 1362, 340, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0, 360, 0, 362, 0, 365, 28809, 367, 139, 369, 45, 45, 45, 374, 67, 67, 460, 67, 67, 67, 67, 466, 67, 67, 67, 67, 67, 67, 67, 67, 801, 67, 67, 67, 67, 67, 67, 67, 67, 67, 487, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 498, 67, 67, 67, 67, 67, 67, 1821, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 0, 67, 502, 67, 67, 67, 67, 67, 67, 67, 508, 67, 67, 67, 515, 517, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 1931, 97, 97, 97, 97, 97, 588, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 629, 97, 97, 97, 97, 97, 67, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 552, 97, 97, 97, 97, 97, 1352, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1511, 97, 97, 97, 97, 97, 97, 97, 557, 97, 97, 97, 97, 563, 97, 97, 97, 97, 97, 97, 97, 97, 1135, 97, 97, 97, 97, 97, 97, 97, 97, 97, 584, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 595, 97, 97, 97, 97, 97, 895, 97, 97, 97, 97, 97, 97, 903, 97, 97, 97, 0, 97, 97, 1638, 97, 97, 97, 97, 97, 97, 97, 97, 1646, 97, 599, 97, 97, 97, 97, 97, 97, 97, 605, 97, 97, 97, 612, 614, 97, 97, 97, 97, 97, 1377, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 655, 45, 45, 45, 45, 45, 45, 45, 745, 67, 67, 67, 67, 751, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1577, 67, 67, 67, 67, 67, 762, 67, 67, 67, 67, 766, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1765, 67, 67, 67, 67, 67, 777, 67, 67, 781, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1592, 1593, 67, 67, 97, 843, 97, 97, 97, 97, 849, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1510, 97, 97, 97, 97, 97, 97, 97, 860, 97, 97, 97, 97, 864, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1797, 45, 45, 45, 45, 1801, 45, 97, 875, 97, 97, 879, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1522, 97, 97, 97, 97, 97, 991, 45, 45, 45, 45, 996, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 215, 67, 67, 67, 67, 233, 67, 67, 67, 67, 251, 253, 1022, 67, 67, 67, 1026, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1035, 67, 67, 1038, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1458, 67, 67, 67, 67, 67, 1064, 67, 67, 67, 1067, 67, 67, 67, 67, 1072, 67, 67, 67, 67, 67, 67, 1442, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 1775, 97, 97, 97, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 1096, 0, 921, 29315, 0, 0, 0, 0, 928, 45, 45, 45, 45, 45, 934, 45, 45, 45, 164, 45, 45, 45, 45, 45, 45, 45, 45, 45, 198, 45, 45, 45, 378, 45, 45, 45, 45, 45, 45, 393, 45, 45, 45, 398, 45, 97, 97, 1116, 97, 97, 97, 1120, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1147, 1148, 97, 97, 97, 97, 97, 97, 97, 1129, 97, 97, 1132, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1626, 97, 97, 97, 97, 0, 45, 1178, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1185, 45, 45, 45, 45, 441, 45, 45, 45, 45, 45, 45, 451, 45, 45, 67, 67, 67, 67, 67, 227, 67, 67, 67, 67, 67, 67, 67, 67, 1260, 67, 67, 67, 1263, 67, 67, 1265, 1203, 45, 45, 1205, 45, 1206, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1216, 67, 1266, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1276, 67, 67, 67, 67, 67, 67, 752, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1056, 67, 67, 67, 67, 67, 67, 45, 1386, 45, 1389, 45, 45, 45, 45, 1394, 45, 45, 45, 1397, 45, 45, 45, 45, 995, 45, 997, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1915, 67, 67, 67, 67, 67, 1422, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1433, 67, 1436, 67, 67, 67, 67, 1441, 67, 67, 67, 1444, 67, 67, 67, 67, 67, 67, 67, 0, 24851, 12565, 0, 0, 0, 0, 28809, 53532, 97, 97, 97, 97, 1494, 97, 97, 97, 1497, 97, 97, 97, 97, 97, 97, 97, 1368, 97, 97, 97, 97, 97, 97, 97, 97, 851, 97, 97, 97, 97, 97, 97, 97, 67, 67, 67, 1571, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 67, 67, 1583, 67, 67, 67, 67, 67, 67, 67, 67, 1591, 67, 67, 67, 67, 67, 67, 782, 67, 67, 67, 67, 67, 67, 67, 67, 67, 756, 67, 67, 67, 67, 67, 67, 97, 1634, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1125, 97, 97, 97, 1647, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 719, 720, 45, 45, 45, 45, 45, 45, 45, 45, 685, 45, 45, 45, 45, 45, 45, 45, 45, 45, 942, 45, 45, 946, 45, 45, 45, 950, 45, 45, 1658, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1668, 1712, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 1835, 97, 97, 97, 97, 0, 0, 0, 97, 97, 1844, 97, 97, 1726, 0, 97, 97, 97, 97, 97, 1732, 97, 1734, 97, 97, 97, 97, 97, 300, 97, 308, 97, 97, 97, 97, 97, 97, 97, 97, 866, 97, 97, 97, 97, 97, 97, 97, 67, 67, 67, 1758, 67, 67, 67, 1762, 67, 67, 67, 67, 67, 67, 67, 67, 1043, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1771, 67, 67, 67, 97, 97, 97, 97, 97, 1776, 97, 97, 97, 97, 97, 1794, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 1183, 45, 45, 45, 45, 45, 45, 45, 45, 45, 409, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1966, 97, 97, 97, 1970, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 1720, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 1837, 97, 0, 1840, 1841, 97, 97, 97, 1988, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1994, 1995, 67, 97, 97, 97, 97, 97, 911, 97, 97, 97, 97, 97, 97, 97, 638, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 1319, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 1733, 97, 97, 97, 97, 97, 97, 1340, 97, 97, 97, 1343, 97, 97, 1345, 97, 1346, 67, 67, 265, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 345, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0, 0, 361, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 671, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 411, 45, 45, 414, 45, 45, 45, 45, 377, 45, 45, 45, 386, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1207, 45, 45, 45, 45, 45, 45, 1213, 45, 45, 67, 67, 67, 67, 67, 463, 67, 67, 67, 472, 67, 67, 67, 67, 67, 67, 67, 528, 67, 67, 67, 67, 67, 67, 67, 67, 1287, 67, 67, 67, 67, 67, 67, 67, 540, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 97, 97, 97, 97, 97, 1103, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 917, 97, 97, 0, 0, 0, 637, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 927, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1223, 45, 45, 45, 45, 45, 45, 45, 45, 45, 426, 45, 45, 433, 45, 45, 45, 45, 697, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 708, 45, 45, 45, 45, 1221, 45, 45, 45, 45, 1225, 45, 45, 45, 45, 45, 45, 384, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1198, 45, 45, 45, 45, 45, 45, 67, 67, 795, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1470, 67, 67, 67, 67, 67, 67, 67, 815, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 97, 97, 97, 893, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1164, 97, 97, 97, 67, 67, 67, 1025, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1687, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 1097, 1241, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1450, 45, 45, 1388, 45, 1390, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1236, 67, 67, 67, 67, 67, 1437, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1472, 1490, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1503, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 1930, 0, 97, 97, 97, 97, 97, 847, 97, 97, 97, 97, 97, 97, 97, 97, 97, 858, 67, 67, 1965, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 1719, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 45, 1382, 45, 1383, 45, 45, 45, 159, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1563, 45, 45, 45, 45, 45, 67, 261, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 341, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 97, 1099, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1333, 97, 1230, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1992, 67, 1993, 67, 67, 67, 97, 97, 45, 45, 160, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1665, 45, 45, 45, 45, 45, 131427, 357, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 684, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 412, 45, 45, 45, 416, 45, 45, 45, 440, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 1990, 67, 1991, 67, 67, 67, 67, 67, 67, 67, 97, 97, 1707, 97, 97, 97, 97, 97, 97, 501, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1691, 67, 67, 67, 67, 67, 526, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1030, 67, 1032, 67, 67, 67, 67, 598, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1632, 0, 921, 29315, 923, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1392, 45, 45, 45, 45, 45, 45, 45, 45, 45, 960, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 1093, 0, 0, 0, 0, 0, 97, 1609, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1369, 97, 97, 97, 1372, 97, 97, 67, 67, 266, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 346, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 665, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1677, 45, 45, 45, 45, 67, 45, 45, 954, 45, 956, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1404, 45, 45, 45, 45, 45, 45, 45, 45, 45, 425, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1270, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1069, 67, 67, 67, 67, 67, 67, 97, 97, 97, 1350, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1524, 97, 97, 97, 97, 97, 97, 97, 1376, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 1545, 45, 45, 45, 45, 45, 45, 45, 45, 45, 448, 45, 45, 45, 45, 67, 456, 67, 67, 67, 67, 67, 1573, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1247, 67, 67, 67, 67, 67, 1252, 97, 1725, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1628, 97, 1630, 0, 0, 94242, 0, 0, 0, 2211840, 0, 1118208, 0, 0, 0, 0, 2158592, 2158731, 2158592, 2158592, 2158592, 3117056, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3018752, 2158592, 3043328, 2158592, 2158592, 2158592, 2158592, 3080192, 2158592, 2158592, 3112960, 2158592, 2158592, 2158592, 2158592, 2158592, 2158878, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2605056, 2158592, 2158592, 2207744, 0, 542, 0, 544, 0, 0, 2166784, 0, 0, 0, 550, 0, 0, 2158592, 2158592, 2686976, 2158592, 2715648, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2867200, 2158592, 2904064, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 94242, 0, 0, 0, 2211840, 0, 0, 1130496, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 0, 139, 0, 0, 0, 139, 0, 2367488, 2207744, 0, 0, 0, 0, 176128, 0, 2166784, 0, 0, 0, 0, 0, 286, 2158592, 2158592, 3170304, 3174400, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 1508, 2158592, 2908160, 2158592, 2158592, 2158592, 2977792, 2158592, 2158592, 2158592, 2158592, 3039232, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3158016, 67, 24850, 24850, 12564, 12564, 0, 0, 0, 0, 0, 53531, 53531, 0, 286, 97, 97, 97, 97, 97, 1119, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1509, 97, 97, 97, 97, 97, 97, 97, 97, 564, 97, 97, 97, 97, 97, 97, 97, 57889, 0, 0, 0, 0, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 561, 97, 97, 97, 97, 97, 97, 576, 97, 97, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 0, 0, 139264, 0, 921, 29315, 0, 0, 926, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1811, 45, 67, 67, 67, 67, 67, 0, 2146304, 2146304, 0, 0, 0, 0, 2224128, 2224128, 2224128, 2232320, 2232320, 2232320, 2232320, 0, 0, 1301, 0, 0, 0, 0, 0, 1307, 0, 0, 0, 0, 0, 1313, 0, 0, 0, 0, 0, 0, 0, 97, 97, 1318, 97, 97, 97, 97, 97, 97, 1795, 97, 97, 45, 45, 45, 45, 45, 45, 45, 446, 45, 45, 45, 45, 45, 45, 67, 67, 2158592, 2146304, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 921, 29315, 0, 924, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1537, 45, 45, 45, 45 +]; + +JSONiqTokenizer.EXPECTED = +[ 290, 300, 304, 353, 296, 309, 305, 319, 315, 324, 328, 352, 354, 334, 338, 330, 320, 345, 349, 293, 358, 362, 341, 366, 312, 370, 374, 378, 382, 386, 390, 394, 398, 737, 402, 634, 439, 604, 634, 634, 634, 634, 408, 634, 634, 634, 404, 634, 634, 634, 457, 634, 634, 963, 634, 634, 413, 634, 634, 634, 634, 634, 634, 634, 663, 418, 422, 903, 902, 426, 431, 548, 634, 437, 521, 919, 443, 615, 409, 449, 455, 624, 731, 751, 634, 461, 465, 672, 470, 469, 474, 481, 485, 477, 489, 493, 629, 542, 497, 505, 603, 602, 991, 648, 510, 804, 634, 515, 958, 526, 525, 530, 768, 634, 546, 552, 711, 710, 593, 558, 562, 618, 566, 570, 574, 578, 582, 586, 590, 608, 612, 660, 822, 821, 634, 622, 596, 444, 628, 533, 724, 633, 640, 653, 647, 652, 536, 1008, 451, 450, 445, 657, 670, 676, 685, 689, 693, 697, 701, 704, 707, 715, 719, 798, 815, 634, 723, 762, 996, 634, 728, 969, 730, 735, 908, 634, 741, 679, 889, 511, 747, 634, 750, 755, 499, 666, 499, 501, 759, 772, 776, 780, 634, 787, 784, 797, 802, 809, 808, 427, 814, 1006, 517, 634, 519, 853, 634, 813, 850, 793, 634, 819, 826, 833, 832, 837, 843, 847, 857, 861, 863, 867, 871, 875, 879, 883, 643, 887, 539, 980, 979, 634, 893, 944, 634, 900, 896, 634, 907, 933, 506, 912, 917, 828, 433, 636, 635, 554, 961, 923, 930, 927, 937, 941, 634, 634, 634, 974, 948, 952, 985, 913, 968, 967, 743, 634, 973, 839, 634, 978, 599, 634, 984, 989, 765, 444, 995, 1000, 634, 1003, 790, 955, 1012, 681, 634, 634, 634, 634, 634, 414, 1016, 1020, 1024, 1085, 1027, 1090, 1090, 1046, 1080, 1137, 1108, 1215, 1049, 1032, 1039, 1085, 1085, 1085, 1085, 1058, 1062, 1068, 1085, 1086, 1090, 1090, 1091, 1072, 1064, 1107, 1090, 1090, 1090, 1118, 1123, 1138, 1078, 1074, 1084, 1085, 1085, 1085, 1087, 1090, 1062, 1052, 1060, 1114, 1062, 1104, 1085, 1085, 1090, 1090, 1028, 1122, 1063, 1128, 1139, 1127, 1158, 1085, 1085, 1151, 1090, 1090, 1090, 1095, 1090, 1132, 1073, 1136, 1143, 1061, 1150, 1085, 1155, 1098, 1101, 1146, 1162, 1169, 1101, 1185, 1151, 1090, 1110, 1173, 1054, 1087, 1109, 1177, 1165, 1089, 1204, 1184, 1107, 1189, 1193, 1088, 1197, 1180, 1201, 1208, 1042, 1212, 1219, 1223, 1227, 1231, 1235, 1245, 1777, 1527, 1686, 1686, 1238, 1686, 1254, 1686, 1686, 1686, 1294, 1669, 1686, 1686, 1686, 1322, 1625, 1534, 1268, 1624, 1275, 1281, 1443, 1292, 1300, 1686, 1686, 1686, 1350, 1826, 1306, 1686, 1686, 1240, 2032, 1317, 1321, 1686, 1686, 1253, 1686, 1326, 1686, 1686, 1686, 1418, 1709, 1446, 1686, 1686, 1686, 1492, 1686, 1295, 1447, 1686, 1686, 1258, 1686, 1736, 1686, 1686, 1520, 1355, 1686, 1288, 1348, 1361, 1686, 1359, 1686, 1364, 1498, 1368, 1302, 1362, 1381, 1389, 1395, 1486, 1686, 1371, 1377, 1370, 1686, 1375, 1382, 1384, 1402, 1408, 1385, 1383, 1619, 1413, 1423, 1428, 1433, 1686, 1686, 1270, 1686, 1338, 1686, 1440, 1686, 1686, 1686, 1499, 1465, 1686, 1686, 1686, 1639, 1473, 1884, 1686, 1686, 1293, 1864, 1686, 1686, 1296, 1321, 1483, 1686, 1686, 1686, 1646, 1686, 1748, 1496, 1686, 1418, 1675, 1686, 1418, 1702, 1686, 1418, 1981, 1686, 1429, 1409, 1427, 1504, 1692, 1686, 1686, 1313, 1448, 1651, 1508, 1686, 1686, 1340, 1686, 1903, 1686, 1686, 1435, 1513, 1686, 1283, 1287, 1519, 1686, 1524, 1363, 1568, 1938, 1539, 1566, 1579, 1479, 1533, 1538, 1553, 1544, 1552, 1557, 1563, 1574, 1557, 1583, 1589, 1590, 1759, 1594, 1603, 1607, 1611, 1686, 1436, 1514, 1686, 1434, 1656, 1686, 1434, 1680, 1686, 1453, 1686, 1686, 1686, 1559, 1617, 1686, 1770, 1418, 1623, 1769, 1629, 1686, 1515, 1335, 1686, 1285, 1686, 1671, 1921, 1650, 1686, 1686, 1344, 1308, 1666, 1686, 1686, 1686, 1659, 1685, 1686, 1686, 1686, 1686, 1241, 1686, 1686, 1844, 1691, 1686, 1630, 1977, 1970, 1362, 1686, 1686, 1686, 1693, 1698, 1686, 1686, 1686, 1697, 1686, 1764, 1715, 1686, 1634, 1638, 1686, 1599, 1585, 1686, 1271, 1686, 1269, 1686, 1721, 1686, 1686, 1354, 1686, 1801, 1686, 1799, 1686, 1640, 1686, 1686, 1461, 1686, 1686, 1732, 1686, 1944, 1686, 1740, 1686, 1746, 1415, 1396, 1686, 1598, 1547, 1417, 1597, 1416, 1577, 1546, 1397, 1577, 1547, 1548, 1570, 1398, 1753, 1686, 1652, 1509, 1686, 1686, 1686, 1757, 1686, 1419, 1686, 1763, 1418, 1768, 1781, 1686, 1686, 1686, 1705, 1686, 2048, 1792, 1686, 1686, 1686, 1735, 1686, 1797, 1686, 1686, 1404, 1686, 1639, 1815, 1686, 1686, 1418, 2017, 1820, 1686, 1686, 1803, 1686, 1686, 1686, 1736, 1489, 1686, 1686, 1825, 1338, 1260, 1263, 1686, 1686, 1785, 1686, 1686, 1728, 1686, 1686, 1749, 1497, 1830, 1830, 1262, 1248, 1261, 1329, 1260, 1264, 1329, 1248, 1249, 1259, 1540, 1849, 1842, 1686, 1686, 1835, 1686, 1686, 1816, 1686, 1686, 1831, 1882, 1848, 1686, 1686, 1686, 1774, 2071, 1854, 1686, 1686, 1469, 1884, 1686, 1821, 1859, 1686, 1686, 1350, 1883, 1686, 1686, 1686, 1781, 1391, 1875, 1686, 1686, 1613, 1644, 1686, 1686, 1889, 1686, 1686, 1662, 1884, 1686, 1885, 1890, 1686, 1686, 1686, 1894, 1686, 1686, 1678, 1686, 1907, 1686, 1686, 1529, 1914, 1686, 1838, 1686, 1686, 1881, 1686, 1686, 1872, 1876, 1836, 1919, 1686, 1837, 1692, 1910, 1686, 1925, 1928, 1742, 1686, 1811, 1811, 1930, 1810, 1929, 1935, 1928, 1900, 1942, 1867, 1868, 1931, 1035, 1788, 1948, 1952, 1956, 1960, 1964, 1686, 1976, 1686, 1686, 1686, 2065, 1686, 1992, 2037, 1686, 1686, 1998, 2009, 1972, 2002, 1686, 1686, 1686, 2077, 1300, 2023, 1686, 1686, 1686, 1807, 2031, 1686, 1686, 1686, 1860, 1500, 2032, 1686, 1686, 1686, 2083, 1686, 2036, 1686, 1277, 1276, 2042, 1877, 1686, 1686, 2041, 1686, 1686, 2027, 2037, 2012, 1686, 2012, 1855, 1850, 1686, 2046, 1686, 1686, 2054, 1996, 1686, 1897, 1309, 2059, 2052, 1686, 2058, 1686, 1686, 2081, 1686, 1717, 1477, 1686, 1331, 1686, 1686, 1687, 1686, 1860, 1681, 1686, 1686, 1686, 1966, 1724, 1686, 1686, 1686, 1984, 2015, 1686, 1686, 1686, 1988, 1686, 2063, 1686, 1686, 1686, 2005, 1686, 1727, 1686, 1686, 1711, 1457, 2069, 1686, 1686, 1686, 2019, 2075, 1686, 1686, 1915, 1686, 1686, 1793, 1874, 1686, 1686, 1491, 1362, 1449, 1686, 1686, 1460, 2098, 2087, 2091, 2095, 2184, 2102, 2113, 2780, 2117, 2134, 2142, 2281, 2146, 2146, 2146, 2304, 2296, 2181, 2639, 2591, 2872, 2592, 2873, 2313, 2195, 2200, 2281, 2146, 2273, 2226, 2204, 2152, 2219, 2276, 2167, 2177, 2276, 2235, 2276, 2276, 2230, 2281, 2276, 2296, 2276, 2293, 2276, 2276, 2276, 2276, 2234, 2276, 2311, 2314, 2210, 2199, 2217, 2222, 2276, 2276, 2276, 2240, 2276, 2294, 2276, 2276, 2173, 2276, 2198, 2281, 2281, 2281, 2281, 2282, 2146, 2146, 2146, 2146, 2205, 2146, 2204, 2248, 2276, 2235, 2276, 2297, 2276, 2276, 2276, 2277, 2256, 2281, 2283, 2146, 2146, 2146, 2275, 2276, 2295, 2276, 2276, 2293, 2146, 2304, 2264, 2269, 2221, 2276, 2276, 2276, 2293, 2295, 2276, 2276, 2276, 2295, 2263, 2205, 2268, 2220, 2172, 2276, 2276, 2276, 2296, 2276, 2276, 2296, 2294, 2276, 2276, 2278, 2281, 2281, 2280, 2281, 2281, 2281, 2283, 2206, 2223, 2276, 2276, 2279, 2281, 2281, 2146, 2273, 2276, 2276, 2281, 2281, 2281, 2276, 2292, 2276, 2298, 2225, 2276, 2298, 2169, 2224, 2292, 2298, 2171, 2229, 2281, 2281, 2171, 2236, 2281, 2281, 2281, 2146, 2275, 2225, 2292, 2299, 2276, 2229, 2281, 2146, 2276, 2290, 2297, 2283, 2146, 2146, 2274, 2224, 2227, 2298, 2225, 2297, 2276, 2230, 2170, 2230, 2282, 2146, 2147, 2151, 2156, 2288, 2276, 2230, 2303, 2308, 2236, 2284, 2228, 2318, 2318, 2318, 2326, 2335, 2339, 2343, 2349, 2416, 2693, 2357, 2592, 2109, 2592, 2592, 2162, 2943, 2823, 2646, 2592, 2361, 2592, 2122, 2592, 2592, 2122, 2470, 2592, 2592, 2592, 2109, 2107, 2592, 2592, 2592, 2123, 2592, 2592, 2592, 2125, 2592, 2413, 2592, 2592, 2592, 2127, 2592, 2592, 2414, 2592, 2592, 2592, 2130, 2952, 2592, 2594, 2592, 2592, 2212, 2609, 2252, 2592, 2592, 2592, 2446, 2434, 2592, 2592, 2592, 2212, 2446, 2450, 2456, 2431, 2435, 2592, 2592, 2243, 2478, 2448, 2439, 2946, 2592, 2592, 2592, 2368, 2809, 2813, 2450, 2441, 2212, 2812, 2449, 2440, 2947, 2592, 2592, 2592, 2345, 2451, 2457, 2948, 2592, 2124, 2592, 2592, 2650, 2823, 2449, 2455, 2946, 2592, 2128, 2592, 2592, 2649, 2952, 2592, 2810, 2448, 2461, 2991, 2467, 2592, 2592, 2329, 2817, 2474, 2990, 2466, 2592, 2592, 2373, 2447, 2992, 2469, 2592, 2592, 2592, 2373, 2447, 2477, 2468, 2592, 2592, 2353, 2469, 2592, 2495, 2592, 2592, 2415, 2483, 2592, 2415, 2496, 2592, 2592, 2352, 2592, 2592, 2352, 2352, 2469, 2592, 2592, 2363, 2331, 2494, 2592, 2592, 2592, 2375, 2592, 2375, 2415, 2504, 2592, 2592, 2367, 2372, 2503, 2592, 2592, 2592, 2389, 2418, 2415, 2592, 2592, 2373, 2592, 2592, 2592, 2593, 2732, 2417, 2415, 2592, 2417, 2520, 2592, 2592, 2592, 2390, 2521, 2521, 2592, 2592, 2592, 2401, 2599, 2585, 2526, 2531, 2120, 2592, 2212, 2426, 2450, 2463, 2948, 2592, 2592, 2592, 2213, 2389, 2527, 2532, 2121, 2542, 2551, 2105, 2592, 2213, 2592, 2592, 2592, 2558, 2538, 2544, 2553, 2557, 2537, 2543, 2552, 2421, 2572, 2576, 2546, 2543, 2547, 2592, 2592, 2373, 2615, 2575, 2545, 2105, 2592, 2244, 2479, 2592, 2129, 2592, 2592, 2628, 2690, 2469, 2562, 2566, 2592, 2592, 2592, 2415, 2928, 2934, 2401, 2570, 2574, 2564, 2572, 2585, 2590, 2592, 2592, 2585, 2965, 2592, 2592, 2592, 2445, 2251, 2592, 2592, 2592, 2474, 2592, 2609, 2892, 2592, 2362, 2592, 2592, 2138, 2851, 2159, 2592, 2592, 2592, 2509, 2888, 2892, 2592, 2592, 2592, 2490, 2418, 2891, 2592, 2592, 2376, 2592, 2592, 2374, 2592, 2889, 2388, 2592, 2373, 2373, 2890, 2592, 2592, 2387, 2592, 2887, 2505, 2892, 2592, 2373, 2610, 2388, 2592, 2592, 2376, 2373, 2592, 2887, 2891, 2592, 2374, 2592, 2592, 2608, 2159, 2614, 2620, 2592, 2592, 2394, 2594, 2887, 2399, 2592, 2887, 2397, 2508, 2374, 2507, 2592, 2375, 2592, 2592, 2592, 2595, 2508, 2506, 2592, 2506, 2505, 2505, 2592, 2507, 2637, 2505, 2592, 2592, 2401, 2661, 2592, 2643, 2592, 2592, 2417, 2592, 2655, 2592, 2592, 2592, 2510, 2414, 2656, 2592, 2592, 2592, 2516, 2592, 2593, 2660, 2665, 2880, 2592, 2592, 2592, 2522, 2767, 2666, 2881, 2592, 2592, 2420, 2571, 2696, 2592, 2592, 2592, 2580, 2572, 2686, 2632, 2698, 2592, 2383, 2514, 2592, 2163, 2932, 2465, 2685, 2631, 2697, 2592, 2388, 2592, 2592, 2212, 2604, 2671, 2632, 2678, 2592, 2401, 2405, 2409, 2592, 2592, 2592, 2679, 2592, 2592, 2592, 2592, 2108, 2677, 2591, 2592, 2592, 2592, 2419, 2592, 2683, 2187, 2191, 2469, 2671, 2189, 2467, 2592, 2401, 2629, 2633, 2702, 2468, 2592, 2592, 2421, 2536, 2703, 2469, 2592, 2592, 2422, 2573, 2593, 2672, 2467, 2592, 2402, 2406, 2592, 2402, 2979, 2592, 2592, 2626, 2673, 2467, 2592, 2446, 2259, 2947, 2592, 2377, 2709, 2592, 2592, 2522, 2862, 2713, 2468, 2592, 2592, 2581, 2572, 2562, 2374, 2374, 2592, 2376, 2721, 2724, 2592, 2592, 2624, 2373, 2731, 2592, 2592, 2592, 2626, 2732, 2592, 2592, 2592, 2755, 2656, 2726, 2736, 2741, 2592, 2486, 2593, 2381, 2592, 2727, 2737, 2742, 2715, 2747, 2753, 2592, 2498, 2469, 2873, 2743, 2592, 2592, 2592, 2791, 2759, 2763, 2592, 2592, 2627, 2704, 2592, 2592, 2522, 2789, 2593, 2761, 2753, 2592, 2498, 2863, 2592, 2592, 2767, 2592, 2592, 2592, 2792, 2789, 2592, 2592, 2592, 2803, 2126, 2592, 2592, 2592, 2811, 2122, 2592, 2592, 2592, 2834, 2777, 2592, 2592, 2592, 2848, 2936, 2591, 2489, 2797, 2592, 2592, 2670, 2631, 2490, 2798, 2592, 2592, 2592, 2963, 2807, 2592, 2592, 2592, 2965, 2838, 2592, 2592, 2592, 2975, 2330, 2818, 2829, 2592, 2498, 2939, 2592, 2498, 2592, 2791, 2331, 2819, 2830, 2592, 2592, 2592, 2982, 2834, 2817, 2828, 2106, 2592, 2592, 2592, 2405, 2405, 2817, 2828, 2592, 2592, 2415, 2849, 2842, 2592, 2522, 2773, 2592, 2522, 2868, 2592, 2580, 2600, 2586, 2137, 2850, 2843, 2592, 2592, 2855, 2937, 2844, 2592, 2592, 2592, 2987, 2936, 2591, 2592, 2592, 2684, 2630, 2592, 2856, 2938, 2592, 2592, 2860, 2939, 2592, 2592, 2872, 2592, 2861, 2591, 2592, 2592, 2887, 2616, 2592, 2867, 2592, 2592, 2708, 2592, 2498, 2469, 2498, 2497, 2785, 2773, 2499, 2783, 2770, 2877, 2877, 2877, 2772, 2592, 2592, 2345, 2885, 2592, 2592, 2592, 2715, 2762, 2515, 2896, 2592, 2592, 2715, 2917, 2516, 2897, 2592, 2592, 2592, 2901, 2906, 2911, 2592, 2592, 2956, 2960, 2715, 2902, 2907, 2912, 2593, 2916, 2920, 2820, 2922, 2822, 2592, 2592, 2715, 2927, 2921, 2821, 2106, 2592, 2592, 2974, 2408, 2321, 2821, 2106, 2592, 2592, 2983, 2592, 2593, 2404, 2408, 2592, 2592, 2717, 2749, 2716, 2928, 2322, 2822, 2593, 2926, 2919, 2820, 2934, 2823, 2592, 2592, 2592, 2651, 2824, 2592, 2592, 2592, 2130, 2952, 2592, 2592, 2592, 2592, 2964, 2592, 2592, 2716, 2748, 2592, 2969, 2592, 2592, 2716, 2918, 2368, 2970, 2592, 2592, 2592, 2403, 2407, 2592, 2592, 2787, 2211, 2404, 2409, 2592, 2592, 2802, 2837, 2987, 2592, 2592, 2592, 2809, 2427, 2592, 2793, 2592, 2592, 2809, 2447, 1073741824, 0x80000000, 539754496, 542375936, 402653184, 554434560, 571736064, 545521856, 268451840, 335544320, 268693630, 512, 2048, 256, 1024, 0, 1024, 0, 1073741824, 0x80000000, 0, 0, 0, 8388608, 0, 0, 1073741824, 1073741824, 0, 0x80000000, 537133056, 4194304, 1048576, 268435456, -1073741824, 0, 0, 0, 1048576, 0, 0, 0, 1572864, 0, 0, 0, 4194304, 0, 134217728, 16777216, 0, 0, 32, 64, 98304, 0, 33554432, 8388608, 192, 67108864, 67108864, 67108864, 67108864, 16, 32, 4, 0, 8192, 196608, 196608, 229376, 80, 4096, 524288, 8388608, 0, 0, 32, 128, 256, 24576, 24600, 24576, 24576, 2, 24576, 24576, 24576, 24584, 24592, 24576, 24578, 24576, 24578, 24576, 24576, 16, 512, 2048, 2048, 256, 4096, 32768, 1048576, 4194304, 67108864, 134217728, 268435456, 262144, 134217728, 0, 128, 128, 64, 16384, 16384, 16384, 67108864, 32, 32, 4, 4, 4096, 262144, 134217728, 0, 0, 0, 2, 0, 8192, 131072, 131072, 4096, 4096, 4096, 4096, 24576, 24576, 24576, 8, 8, 24576, 24576, 16384, 16384, 16384, 24576, 24584, 24576, 24576, 24576, 16384, 24576, 536870912, 262144, 0, 0, 32, 2048, 8192, 4, 4096, 4096, 4096, 786432, 8388608, 16777216, 0, 128, 16384, 16384, 16384, 32768, 65536, 2097152, 32, 32, 32, 32, 4, 4, 4, 4, 4, 4096, 67108864, 67108864, 67108864, 24576, 24576, 24576, 24576, 0, 16384, 16384, 16384, 16384, 67108864, 67108864, 8, 67108864, 24576, 8, 8, 8, 24576, 24576, 24576, 24578, 24576, 24576, 24576, 2, 2, 2, 16384, 67108864, 67108864, 67108864, 32, 67108864, 8, 8, 24576, 2048, 0x80000000, 536870912, 262144, 262144, 262144, 67108864, 8, 24576, 16384, 32768, 1048576, 4194304, 25165824, 67108864, 24576, 32770, 2, 4, 112, 512, 98304, 524288, 50, 402653186, 1049090, 1049091, 10, 66, 100925514, 10, 66, 12582914, 0, 0, -1678194207, -1678194207, -1041543218, 0, 32768, 0, 0, 32, 65536, 268435456, 1, 1, 513, 1048577, 0, 12582912, 0, 0, 0, 4, 1792, 0, 0, 0, 7, 29360128, 0, 0, 0, 8, 0, 0, 0, 12, 1, 1, 0, 0, -604102721, -604102721, 4194304, 8388608, 0, 0, 0, 31, 925600, 997981306, 997981306, 997981306, 0, 0, 2048, 8388608, 0, 0, 1, 2, 4, 32, 64, 512, 8192, 0, 0, 0, 245760, 997720064, 0, 0, 0, 32, 0, 0, 0, 3, 12, 16, 32, 8, 112, 3072, 12288, 16384, 32768, 65536, 131072, 7864320, 16777216, 973078528, 0, 0, 65536, 131072, 3670016, 4194304, 16777216, 33554432, 2, 8, 48, 2048, 8192, 16384, 32768, 65536, 131072, 524288, 131072, 524288, 3145728, 4194304, 16777216, 33554432, 65536, 131072, 2097152, 4194304, 16777216, 33554432, 134217728, 268435456, 536870912, 0, 0, 0, 1024, 0, 8, 48, 2048, 8192, 65536, 33554432, 268435456, 536870912, 65536, 268435456, 536870912, 0, 0, 32768, 0, 0, 126, 623104, 65011712, 0, 32, 65536, 536870912, 0, 0, 65536, 524288, 0, 32, 65536, 0, 0, 0, 2048, 0, 0, 0, 15482, 245760, -604102721, 0, 0, 0, 18913, 33062912, 925600, -605028352, 0, 0, 0, 65536, 31, 8096, 131072, 786432, 3145728, 3145728, 12582912, 50331648, 134217728, 268435456, 160, 256, 512, 7168, 131072, 786432, 131072, 786432, 1048576, 2097152, 12582912, 16777216, 268435456, 1073741824, 0x80000000, 12582912, 16777216, 33554432, 268435456, 1073741824, 0x80000000, 3, 12, 16, 160, 256, 7168, 786432, 1048576, 12582912, 16777216, 268435456, 1073741824, 0, 8, 16, 32, 128, 256, 512, 7168, 786432, 1048576, 2097152, 0, 1, 2, 8, 16, 7168, 786432, 1048576, 8388608, 16777216, 16777216, 1073741824, 0, 0, 0, 0, 1, 0, 0, 8, 32, 128, 256, 7168, 8, 32, 0, 3072, 0, 8, 32, 3072, 4096, 524288, 8, 32, 0, 0, 3072, 4096, 0, 2048, 524288, 8388608, 8, 2048, 0, 0, 1, 12, 256, 4096, 32768, 262144, 1048576, 4194304, 67108864, 0, 2048, 0, 2048, 2048, 1073741824, -58805985, -58805985, -58805985, 0, 0, 262144, 0, 0, 32, 4194304, 16777216, 134217728, 4382, 172032, -58982400, 0, 0, 2, 28, 256, 4096, 8192, 8192, 32768, 131072, 262144, 524288, 1, 2, 12, 256, 4096, 0, 0, 4194304, 67108864, 134217728, 805306368, 1073741824, 0, 0, 1, 2, 12, 16, 256, 4096, 1048576, 67108864, 134217728, 268435456, 0, 512, 1048576, 4194304, 201326592, 1879048192, 0, 0, 12, 256, 4096, 134217728, 268435456, 536870912, 12, 256, 268435456, 536870912, 0, 12, 256, 0, 0, 1, 32, 64, 512, 0, 0, 205236961, 205236961, 0, 0, 0, 1, 96, 640, 1, 10976, 229376, 204996608, 0, 640, 2048, 8192, 229376, 1572864, 1572864, 2097152, 201326592, 0, 0, 0, 64, 512, 2048, 229376, 1572864, 201326592, 1572864, 201326592, 0, 0, 1, 4382, 0, 1, 32, 2048, 65536, 131072, 1572864, 201326592, 131072, 1572864, 134217728, 0, 0, 524288, 524288, 0, 0, 0, -68582786, -68582786, -68582786, 0, 0, 2097152, 524288, 0, 524288, 0, 0, 65536, 131072, 1572864, 0, 0, 2, 4, 0, 0, 65011712, -134217728, 0, 0, 0, 0, 2, 4, 120, 512, -268435456, 0, 0, 0, 2, 8, 48, 64, 2048, 8192, 98304, 524288, 2097152, 4194304, 25165824, 33554432, 134217728, 268435456, 0x80000000, 0, 0, 25165824, 33554432, 134217728, 1879048192, 0x80000000, 0, 0, 4, 112, 512, 622592, 65011712, 134217728, -268435456, 16777216, 33554432, 134217728, 1610612736, 0, 0, 0, 64, 98304, 524288, 4194304, 16777216, 33554432, 0, 98304, 524288, 16777216, 33554432, 0, 65536, 524288, 33554432, 536870912, 1073741824, 0, 65536, 524288, 536870912, 1073741824, 0, 0, 65536, 524288, 536870912, 0, 524288, 0, 524288, 524288, 1048576, 2086666240, 0x80000000, 0, -1678194207, 0, 0, 0, 8, 32, 2048, 524288, 8388608, 0, 0, 33062912, 436207616, 0x80000000, 0, 0, 32, 64, 2432, 16384, 32768, 32768, 524288, 3145728, 4194304, 25165824, 25165824, 167772160, 268435456, 0x80000000, 0, 32, 64, 384, 2048, 16384, 32768, 1048576, 2097152, 4194304, 25165824, 32, 64, 128, 256, 2048, 16384, 2048, 16384, 1048576, 4194304, 16777216, 33554432, 134217728, 536870912, 1073741824, 0, 0, 2048, 16384, 4194304, 16777216, 33554432, 134217728, 805306368, 0, 0, 16777216, 134217728, 268435456, 0x80000000, 0, 622592, 622592, 622592, 8807, 8807, 434791, 0, 0, 16777216, 0, 0, 0, 7, 608, 8192, 0, 0, 0, 3, 4, 96, 512, 32, 64, 8192, 0, 0, 16777216, 134217728, 0, 0, 2, 4, 8192, 16384, 65536, 2097152, 33554432, 268435456 +]; + +JSONiqTokenizer.TOKEN = +[ + "(0)", + "ModuleDecl", + "Annotation", + "OptionDecl", + "Operator", + "Variable", + "Tag", + "EndTag", + "PragmaContents", + "DirCommentContents", + "DirPIContents", + "CDataSectionContents", + "AttrTest", + "Wildcard", + "EQName", + "IntegerLiteral", + "DecimalLiteral", + "DoubleLiteral", + "PredefinedEntityRef", + "'\"\"'", + "EscapeApos", + "QuotChar", + "AposChar", + "ElementContentChar", + "QuotAttrContentChar", + "AposAttrContentChar", + "NCName", + "QName", + "S", + "CharRef", + "CommentContents", + "DocTag", + "DocCommentContents", + "EOF", + "'!'", + "'\"'", + "'#'", + "'#)'", + "''''", + "'('", + "'(#'", + "'(:'", + "'(:~'", + "')'", + "'*'", + "'*'", + "','", + "'-->'", + "'.'", + "'/'", + "'/>'", + "':'", + "':)'", + "';'", + "'", next : "start"}, + {defaultToken : "comment"} + ], + + tag : [{ + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)", + next: [ + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"} + ] + }, { + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(", next : "start"} + ] + }], + + space : [ + {token : "text", regex : "\\s+"} + ], + + reference : [{ + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, { + token : "invalid.illegal", regex : "&" + }], + + string: [{ + token : "string", + regex : "'", + push : "qstring_inner" + }, { + token : "string", + regex : '"', + push : "qqstring_inner" + }], + + qstring_inner: [ + {token : "string", regex: "'", next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + qqstring_inner: [ + {token : "string", regex: '"', next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + attributes: [{ + token : "entity.other.attribute-name", + regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" + }, { + token : "keyword.operator.separator", + regex : "=" + }, { + include : "space" + }, { + include : "string" + }] + }; + + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; + + +(function() { + + this.embedTagRules = function(HighlightRules, prefix, tag){ + this.$rules.tag.unshift({ + token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(<)(" + tag + ")", + next: [ + {include : "space"}, + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"} + ] + }); + + this.$rules[tag + "-end"] = [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next: "start", + onMatch : function(value, currentState, stack) { + stack.splice(0); + return this.token; + }} + ] + + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(" + }]); + }; + +}).call(TextHighlightRules.prototype); + +oop.inherits(XmlHighlightRules, TextHighlightRules); + +exports.XmlHighlightRules = XmlHighlightRules; +}); + +ace.define('ace/mode/xml_util', ["require", 'exports', 'module' ], function(acequire, exports, module) { + + +function string(state) { + return [{ + token : "string", + regex : '"', + next : state + "_qqstring" + }, { + token : "string", + regex : "'", + next : state + "_qstring" + }]; +} + +function multiLineString(quote, state) { + return [ + {token : "string", regex : quote, next : state}, + { + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, + {defaultToken : "string"} + ]; +} + +exports.tag = function(states, name, nextState, tagMap) { + states[name] = [{ + token : "text", + regex : "\\s+" + }, { + + token : !tagMap ? "meta.tag.tag-name" : function(value) { + if (tagMap[value]) + return "meta.tag.tag-name." + tagMap[value]; + else + return "meta.tag.tag-name"; + }, + regex : "[-_a-zA-Z0-9:]+", + next : name + "_embed_attribute_list" + }, { + token: "empty", + regex: "", + next : name + "_embed_attribute_list" + }]; + + states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list"); + states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list"); + + states[name + "_embed_attribute_list"] = [{ + token : "meta.tag.r", + regex : "/?>", + next : nextState + }, { + token : "keyword.operator", + regex : "=" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "text", + regex : "\\s+" + }].concat(string(name)); +}; + +}); +ace.define('ace/mode/java_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var JavaHighlightRules = function() { + var keywords = ( + "abstract|continue|for|new|switch|" + + "assert|default|goto|package|synchronized|" + + "boolean|do|if|private|this|" + + "break|double|implements|protected|throw|" + + "byte|else|import|public|throws|" + + "case|enum|instanceof|return|transient|" + + "catch|extends|int|short|try|" + + "char|final|interface|static|void|" + + "class|finally|long|strictfp|volatile|" + + "const|float|native|super|while" + ); + + var buildinConstants = ("null|Infinity|NaN|undefined"); + + + var langClasses = ( + "AbstractMethodError|AssertionError|ClassCircularityError|"+ + "ClassFormatError|Deprecated|EnumConstantNotPresentException|"+ + "ExceptionInInitializerError|IllegalAccessError|"+ + "IllegalThreadStateException|InstantiationError|InternalError|"+ + "NegativeArraySizeException|NoSuchFieldError|Override|Process|"+ + "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|"+ + "SuppressWarnings|TypeNotPresentException|UnknownError|"+ + "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|"+ + "InstantiationException|IndexOutOfBoundsException|"+ + "ArrayIndexOutOfBoundsException|CloneNotSupportedException|"+ + "NoSuchFieldException|IllegalArgumentException|NumberFormatException|"+ + "SecurityException|Void|InheritableThreadLocal|IllegalStateException|"+ + "InterruptedException|NoSuchMethodException|IllegalAccessException|"+ + "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|"+ + "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|"+ + "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|"+ + "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|"+ + "Character|Boolean|StackTraceElement|Appendable|StringBuffer|"+ + "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|"+ + "StackOverflowError|OutOfMemoryError|VirtualMachineError|"+ + "ArrayStoreException|ClassCastException|LinkageError|"+ + "NoClassDefFoundError|ClassNotFoundException|RuntimeException|"+ + "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|"+ + "Cloneable|Class|CharSequence|Comparable|String|Object" + ); + + var keywordMapper = this.createKeywordMapper({ + "variable.language": "this", + "keyword": keywords, + "constant.language": buildinConstants, + "support.function": langClasses + }, "identifier"); + + this.$rules = { + "start" : [ + { + token : "comment", + regex : "\\/\\/.*$" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment" + }, { + token : "string.regexp", + regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : "constant.numeric", // hex + regex : "0[xX][0-9a-fA-F]+\\b" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "constant.language.boolean", + regex : "(?:true|false)\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator", + regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" + }, { + token : "lparen", + regex : "[[({]" + }, { + token : "rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + } + ], + "comment" : [ + { + token : "comment", // closing comment + regex : ".*?\\*\\/", + next : "start" + }, { + token : "comment", // comment spanning whole line + regex : ".+" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("start") ]); +}; + +oop.inherits(JavaHighlightRules, TextHighlightRules); + +exports.JavaHighlightRules = JavaHighlightRules; +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/jsx.js b/pitfall/pdfkit/node_modules/brace/mode/jsx.js new file mode 100644 index 00000000..3f182769 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/jsx.js @@ -0,0 +1,676 @@ +ace.define('ace/mode/jsx', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/jsx_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var JsxHighlightRules = acequire("./jsx_highlight_rules").JsxHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +function Mode() { + this.HighlightRules = JsxHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +} +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); +ace.define('ace/mode/jsx_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var JsxHighlightRules = function() { + var keywords = lang.arrayToMap( + ("break|do|instanceof|typeof|case|else|new|var|catch|finally|return|void|continue|for|switch|default|while|function|this|" + + "if|throw|" + + "delete|in|try|" + + "class|extends|super|import|from|into|implements|interface|static|mixin|override|abstract|final|" + + "number|int|string|boolean|variant|" + + "log|assert").split("|") + ); + + var buildinConstants = lang.arrayToMap( + ("null|true|false|NaN|Infinity|__FILE__|__LINE__|undefined").split("|") + ); + + var reserved = lang.arrayToMap( + ("debugger|with|" + + "const|export|" + + "let|private|public|yield|protected|" + + "extern|native|as|operator|__fake__|__readonly__").split("|") + ); + + var identifierRe = "[a-zA-Z_][a-zA-Z0-9_]*\\b"; + + this.$rules = { + "start" : [ + { + token : "comment", + regex : "\\/\\/.*$" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment" + }, { + token : "string.regexp", + regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : "constant.numeric", // hex + regex : "0[xX][0-9a-fA-F]+\\b" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "constant.language.boolean", + regex : "(?:true|false)\\b" + }, { + token : [ + "storage.type", + "text", + "entity.name.function" + ], + regex : "(function)(\\s+)(" + identifierRe + ")" + }, { + token : function(value) { + if (value == "this") + return "variable.language"; + else if (value == "function") + return "storage.type"; + else if (keywords.hasOwnProperty(value) || reserved.hasOwnProperty(value)) + return "keyword"; + else if (buildinConstants.hasOwnProperty(value)) + return "constant.language"; + else if (/^_?[A-Z][a-zA-Z0-9_]*$/.test(value)) + return "language.support.class"; + else + return "identifier"; + }, + regex : identifierRe + }, { + token : "keyword.operator", + regex : "!|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" + }, { + token : "punctuation.operator", + regex : "\\?|\\:|\\,|\\;|\\." + }, { + token : "paren.lparen", + regex : "[[({<]" + }, { + token : "paren.rparen", + regex : "[\\])}>]" + }, { + token : "text", + regex : "\\s+" + } + ], + "comment" : [ + { + token : "comment", // closing comment + regex : ".*?\\*\\/", + next : "start" + }, { + token : "comment", // comment spanning whole line + regex : ".+" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("start") ]); +}; + +oop.inherits(JsxHighlightRules, TextHighlightRules); + +exports.JsxHighlightRules = JsxHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/julia.js b/pitfall/pdfkit/node_modules/brace/mode/julia.js new file mode 100644 index 00000000..a34dc38a --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/julia.js @@ -0,0 +1,285 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2012, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * Contributor(s): + * + * + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/julia', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/julia_highlight_rules', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var JuliaHighlightRules = acequire("./julia_highlight_rules").JuliaHighlightRules; +var FoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = JuliaHighlightRules; + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + this.lineCommentStart = "#"; + this.blockComment = ""; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/julia_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var JuliaHighlightRules = function() { + + this.$rules = { start: + [ { include: '#function_decl' }, + { include: '#function_call' }, + { include: '#type_decl' }, + { include: '#keyword' }, + { include: '#operator' }, + { include: '#number' }, + { include: '#string' }, + { include: '#comment' } ], + '#bracket': + [ { token: 'keyword.bracket.julia', + regex: '\\(|\\)|\\[|\\]|\\{|\\}|,' } ], + '#comment': + [ { token: + [ 'punctuation.definition.comment.julia', + 'comment.line.number-sign.julia' ], + regex: '(#)(?!\\{)(.*$)'} ], + '#function_call': + [ { token: [ 'support.function.julia', 'text' ], + regex: '([a-zA-Z0-9_]+!?)(\\w*\\()'} ], + '#function_decl': + [ { token: [ 'keyword.other.julia', 'meta.function.julia', + 'entity.name.function.julia', 'meta.function.julia','text' ], + regex: '(function|macro)(\\s*)([a-zA-Z0-9_\\{]+!?)(\\w*)([(\\\\{])'} ], + '#keyword': + [ { token: 'keyword.other.julia', + regex: '\\b(?:function|type|immutable|macro|quote|abstract|bitstype|typealias|module|baremodule|new)\\b' }, + { token: 'keyword.control.julia', + regex: '\\b(?:if|else|elseif|while|for|in|begin|let|end|do|try|catch|finally|return|break|continue)\\b' }, + { token: 'storage.modifier.variable.julia', + regex: '\\b(?:global|local|const|export|import|importall|using)\\b' }, + { token: 'variable.macro.julia', regex: '@\\w+\\b' } ], + '#number': + [ { token: 'constant.numeric.julia', + regex: '\\b0(?:x|X)[0-9a-fA-F]*|(?:\\b[0-9]+\\.?[0-9]*|\\.[0-9]+)(?:(?:e|E)(?:\\+|-)?[0-9]*)?(?:im)?|\\bInf(?:32)?\\b|\\bNaN(?:32)?\\b|\\btrue\\b|\\bfalse\\b' } ], + '#operator': + [ { token: 'keyword.operator.update.julia', + regex: '=|:=|\\+=|-=|\\*=|/=|//=|\\.//=|\\.\\*=|\\\\=|\\.\\\\=|^=|\\.^=|%=|\\|=|&=|\\$=|<<=|>>=' }, + { token: 'keyword.operator.ternary.julia', regex: '\\?|:' }, + { token: 'keyword.operator.boolean.julia', + regex: '\\|\\||&&|!' }, + { token: 'keyword.operator.arrow.julia', regex: '->|<-|-->' }, + { token: 'keyword.operator.relation.julia', + regex: '>|<|>=|<=|==|!=|\\.>|\\.<|\\.>=|\\.>=|\\.==|\\.!=|\\.=|\\.!|<:|:>' }, + { token: 'keyword.operator.range.julia', regex: ':' }, + { token: 'keyword.operator.shift.julia', regex: '<<|>>' }, + { token: 'keyword.operator.bitwise.julia', regex: '\\||\\&|~' }, + { token: 'keyword.operator.arithmetic.julia', + regex: '\\+|-|\\*|\\.\\*|/|\\./|//|\\.//|%|\\.%|\\\\|\\.\\\\|\\^|\\.\\^' }, + { token: 'keyword.operator.isa.julia', regex: '::' }, + { token: 'keyword.operator.dots.julia', + regex: '\\.(?=[a-zA-Z])|\\.\\.+' }, + { token: 'keyword.operator.interpolation.julia', + regex: '\\$#?(?=.)' }, + { token: [ 'variable', 'keyword.operator.transposed-variable.julia' ], + regex: '(\\w+)((?:\'|\\.\')*\\.?\')' }, + { token: 'text', + regex: '\\[|\\('}, + { token: [ 'text', 'keyword.operator.transposed-matrix.julia' ], + regex: "([\\]\\)])((?:'|\\.')*\\.?')"} ], + '#string': + [ { token: 'punctuation.definition.string.begin.julia', + regex: '\'', + push: + [ { token: 'punctuation.definition.string.end.julia', + regex: '\'', + next: 'pop' }, + { include: '#string_escaped_char' }, + { defaultToken: 'string.quoted.single.julia' } ] }, + { token: 'punctuation.definition.string.begin.julia', + regex: '"', + push: + [ { token: 'punctuation.definition.string.end.julia', + regex: '"', + next: 'pop' }, + { include: '#string_escaped_char' }, + { defaultToken: 'string.quoted.double.julia' } ] }, + { token: 'punctuation.definition.string.begin.julia', + regex: '\\b\\w+"', + push: + [ { token: 'punctuation.definition.string.end.julia', + regex: '"\\w*', + next: 'pop' }, + { include: '#string_custom_escaped_char' }, + { defaultToken: 'string.quoted.custom-double.julia' } ] }, + { token: 'punctuation.definition.string.begin.julia', + regex: '`', + push: + [ { token: 'punctuation.definition.string.end.julia', + regex: '`', + next: 'pop' }, + { include: '#string_escaped_char' }, + { defaultToken: 'string.quoted.backtick.julia' } ] } ], + '#string_custom_escaped_char': [ { token: 'constant.character.escape.julia', regex: '\\\\"' } ], + '#string_escaped_char': + [ { token: 'constant.character.escape.julia', + regex: '\\\\(?:\\\\|[0-3]\\d{,2}|[4-7]\\d?|x[a-fA-F0-9]{,2}|u[a-fA-F0-9]{,4}|U[a-fA-F0-9]{,8}|.)' } ], + '#type_decl': + [ { token: + [ 'keyword.control.type.julia', + 'meta.type.julia', + 'entity.name.type.julia', + 'entity.other.inherited-class.julia', + 'punctuation.separator.inheritance.julia', + 'entity.other.inherited-class.julia' ], + regex: '(type|immutable)(\\s+)([a-zA-Z0-9_]+)(?:(\\s*)(<:)(\\s*[.a-zA-Z0-9_:]+))?' }, + { token: [ 'other.typed-variable.julia', 'support.type.julia' ], + regex: '([a-zA-Z0-9_]+)(::[a-zA-Z0-9_{}]+)' } ] } + + this.normalizeRules(); +}; + +JuliaHighlightRules.metaData = { fileTypes: [ 'jl' ], + firstLineMatch: '^#!.*\\bjulia\\s*$', + foldingStartMarker: '^\\s*(?:if|while|for|begin|function|macro|module|baremodule|type|immutable|let)\\b(?!.*\\bend\\b).*$', + foldingStopMarker: '^\\s*(?:end)\\b.*$', + name: 'Julia', + scopeName: 'source.julia' } + + +oop.inherits(JuliaHighlightRules, TextHighlightRules); + +exports.JuliaHighlightRules = JuliaHighlightRules; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/latex.js b/pitfall/pdfkit/node_modules/brace/mode/latex.js new file mode 100644 index 00000000..93ecadf2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/latex.js @@ -0,0 +1,189 @@ +ace.define('ace/mode/latex', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/latex_highlight_rules', 'ace/mode/folding/latex', 'ace/range'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var LatexHighlightRules = acequire("./latex_highlight_rules").LatexHighlightRules; +var LatexFoldMode = acequire("./folding/latex").FoldMode; +var Range = acequire("../range").Range; + +var Mode = function() { + this.HighlightRules = LatexHighlightRules; + this.foldingRules = new LatexFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + this.lineCommentStart = "%"; + +}).call(Mode.prototype); + +exports.Mode = Mode; + +}); +ace.define('ace/mode/latex_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var LatexHighlightRules = function() { + this.$rules = { + "start" : [{ + token : "keyword", + regex : "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)" + }, { + token : "lparen", + regex : "[[({]" + }, { + token : "rparen", + regex : "[\\])}]" + }, { + token : "string", + regex : "\\$(?:(?:\\\\.)|(?:[^\\$\\\\]))*?\\$" + }, { + token : "comment", + regex : "%.*$" + }] + }; +}; + +oop.inherits(LatexHighlightRules, TextHighlightRules); + +exports.LatexHighlightRules = LatexHighlightRules; + +}); + +ace.define('ace/mode/folding/latex', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var BaseFoldMode = acequire("./fold_mode").FoldMode; +var Range = acequire("../../range").Range; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + +var FoldMode = exports.FoldMode = function() {}; + +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /^\s*\\(begin)|(section|subsection)\b|{\s*$/; + this.foldingStopMarker = /^\s*\\(end)\b|^\s*}/; + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var line = session.doc.getLine(row); + var match = this.foldingStartMarker.exec(line); + if (match) { + if (match[1]) + return this.latexBlock(session, row, match[0].length - 1); + if (match[2]) + return this.latexSection(session, row, match[0].length - 1); + + return this.openingBracketBlock(session, "{", row, match.index); + } + + var match = this.foldingStopMarker.exec(line); + if (match) { + if (match[1]) + return this.latexBlock(session, row, match[0].length - 1); + + return this.closingBracketBlock(session, "}", row, match.index + match[0].length); + } + }; + + this.latexBlock = function(session, row, column) { + var keywords = { + "\\begin": 1, + "\\end": -1 + }; + + var stream = new TokenIterator(session, row, column); + var token = stream.getCurrentToken(); + if (!token || token.type !== "keyword") + return; + + var val = token.value; + var dir = keywords[val]; + + var getType = function() { + var token = stream.stepForward(); + var type = token.type == "lparen" ?stream.stepForward().value : ""; + if (dir === -1) { + stream.stepBackward(); + if (type) + stream.stepBackward(); + } + return type; + }; + var stack = [getType()]; + var startColumn = dir === -1 ? stream.getCurrentTokenColumn() : session.getLine(row).length; + var startRow = row; + + stream.step = dir === -1 ? stream.stepBackward : stream.stepForward; + while(token = stream.step()) { + if (token.type !== "keyword") + continue; + var level = keywords[token.value]; + if (!level) + continue; + var type = getType(); + if (level === dir) + stack.unshift(type); + else if (stack.shift() !== type || !stack.length) + break; + } + + if (stack.length) + return; + + var row = stream.getCurrentTokenRow(); + if (dir === -1) + return new Range(row, session.getLine(row).length, startRow, startColumn); + stream.stepBackward(); + return new Range(startRow, startColumn, row, stream.getCurrentTokenColumn()); + }; + + this.latexSection = function(session, row, column) { + var keywords = ["\\subsection", "\\section", "\\begin", "\\end"]; + + var stream = new TokenIterator(session, row, column); + var token = stream.getCurrentToken(); + if (!token || token.type != "keyword") + return; + + var startLevel = keywords.indexOf(token.value); + var stackDepth = 0 + var endRow = row; + + while(token = stream.stepForward()) { + if (token.type !== "keyword") + continue; + var level = keywords.indexOf(token.value); + + if (level >= 2) { + if (!stackDepth) + endRow = stream.getCurrentTokenRow() - 1; + stackDepth += level == 2 ? 1 : - 1; + if (stackDepth < 0) + break + } else if (level >= startLevel) + break; + } + + if (!stackDepth) + endRow = stream.getCurrentTokenRow() - 1; + + while (endRow > row && !/\S/.test(session.getLine(endRow))) + endRow--; + + return new Range( + row, session.getLine(row).length, + endRow, session.getLine(endRow).length + ); + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/less.js b/pitfall/pdfkit/node_modules/brace/mode/less.js new file mode 100644 index 00000000..73e20aa1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/less.js @@ -0,0 +1,848 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/less', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/less_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/css', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var LessHighlightRules = acequire("./less_highlight_rules").LessHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var CssBehaviour = acequire("./behaviour/css").CssBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = LessHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; + +}); + +ace.define('ace/mode/less_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var LessHighlightRules = function() { + + var properties = lang.arrayToMap( (function () { + + var browserPrefix = ("-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-").split("|"); + + var prefixProperties = ("appearance|background-clip|background-inline-policy|background-origin|" + + "background-size|binding|border-bottom-colors|border-left-colors|" + + "border-right-colors|border-top-colors|border-end|border-end-color|" + + "border-end-style|border-end-width|border-image|border-start|" + + "border-start-color|border-start-style|border-start-width|box-align|" + + "box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|" + + "box-pack|box-sizing|column-count|column-gap|column-width|column-rule|" + + "column-rule-width|column-rule-style|column-rule-color|float-edge|" + + "font-feature-settings|font-language-override|force-broken-image-icon|" + + "image-region|margin-end|margin-start|opacity|outline|outline-color|" + + "outline-offset|outline-radius|outline-radius-bottomleft|" + + "outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|" + + "outline-style|outline-width|padding-end|padding-start|stack-sizing|" + + "tab-size|text-blink|text-decoration-color|text-decoration-line|" + + "text-decoration-style|transform|transform-origin|transition|" + + "transition-delay|transition-duration|transition-property|" + + "transition-timing-function|user-focus|user-input|user-modify|user-select|" + + "window-shadow|border-radius").split("|"); + + var properties = ("azimuth|background-attachment|background-color|background-image|" + + "background-position|background-repeat|background|border-bottom-color|" + + "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" + + "border-color|border-left-color|border-left-style|border-left-width|" + + "border-left|border-right-color|border-right-style|border-right-width|" + + "border-right|border-spacing|border-style|border-top-color|" + + "border-top-style|border-top-width|border-top|border-width|border|" + + "bottom|box-sizing|caption-side|clear|clip|color|content|counter-increment|" + + "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" + + "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" + + "font-stretch|font-style|font-variant|font-weight|font|height|left|" + + "letter-spacing|line-height|list-style-image|list-style-position|" + + "list-style-type|list-style|margin-bottom|margin-left|margin-right|" + + "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" + + "min-width|opacity|orphans|outline-color|" + + "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" + + "padding-left|padding-right|padding-top|padding|page-break-after|" + + "page-break-before|page-break-inside|page|pause-after|pause-before|" + + "pause|pitch-range|pitch|play-during|position|quotes|richness|right|" + + "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" + + "stress|table-layout|text-align|text-decoration|text-indent|" + + "text-shadow|text-transform|top|unicode-bidi|vertical-align|" + + "visibility|voice-family|volume|white-space|widows|width|word-spacing|" + + "z-index").split("|"); + var ret = []; + for (var i=0, ln=browserPrefix.length; i|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*" + }, { + token : "paren.lparen", + regex : "[[({]" + }, { + token : "paren.rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + }, { + caseInsensitive: true + } + ], + "comment" : [ + { + token : "comment", // closing comment + regex : ".*?\\*\\/", + next : "start" + }, { + token : "comment", // comment spanning whole line + regex : ".+" + } + ] + }; +}; + +oop.inherits(LessHighlightRules, TextHighlightRules); + +exports.LessHighlightRules = LessHighlightRules; + +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/behaviour/css', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + +var CssBehaviour = function () { + + this.inherit(CstyleBehaviour); + + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + } + } + if (!line.substring(cursor.column).match(/^\s*;/)) { + return { + text: ':;', + selection: [1, 1] + } + } + } + } + }); + + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column ++; + return range; + } + } + } + }); + + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + } + } + } + }); + +} +oop.inherits(CssBehaviour, CstyleBehaviour); + +exports.CssBehaviour = CssBehaviour; +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/liquid.js b/pitfall/pdfkit/node_modules/brace/mode/liquid.js new file mode 100644 index 00000000..f875dce1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/liquid.js @@ -0,0 +1,1062 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/liquid', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/liquid_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range'], function(acequire, exports, module) { + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var LiquidHighlightRules = acequire("./liquid_highlight_rules").LiquidHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; + +var Mode = function() { + this.HighlightRules = LiquidHighlightRules; + this.$outdent = new MatchingBraceOutdent(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.blockComment = {start: ""}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/liquid_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules', 'ace/mode/html_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var HtmlHighlightRules = acequire("./html_highlight_rules").HtmlHighlightRules; + +var LiquidHighlightRules = function() { + HtmlHighlightRules.call(this); + var functions = ( + "date|capitalize|downcase|upcase|first|last|join|sort|map|size|escape|" + + "escape_once|strip_html|strip_newlines|newline_to_br|replace|replace_first|" + + "truncate|truncatewords|prepend|append|minus|plus|times|divided_by|split" + ); + + var keywords = ( + "capture|endcapture|case|endcase|when|comment|endcomment|" + + "cycle|for|endfor|in|reversed|if|endif|else|elsif|include|endinclude|unless|endunless|" + + "style|text|image|widget|plugin|marker|endmarker|tablerow|endtablerow" + ); + + var builtinVariables = 'forloop|tablerowloop'; + + var definitions = ("assign"); + + var keywordMapper = this.createKeywordMapper({ + "variable.language": builtinVariables, + "keyword": keywords, + "support.function": functions, + "keyword.definition": definitions + }, "identifier"); + for (var rule in this.$rules) { + this.$rules[rule].unshift({ + token : "variable", + regex : "{%", + push : "liquid-start" + }, { + token : "variable", + regex : "{{", + push : "liquid-start" + }); + } + + this.addRules({ + "liquid-start" : [{ + token: "variable", + regex: "}}", + next: "pop" + }, { + token: "variable", + regex: "%}", + next: "pop" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : "constant.numeric", // hex + regex : "0[xX][0-9a-fA-F]+\\b" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "constant.language.boolean", + regex : "(?:true|false)\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator", + regex : "\/|\\*|\\-|\\+|=|!=|\\?\\:" + }, { + token : "paren.lparen", + regex : /[\[\({]/ + }, { + token : "paren.rparen", + regex : /[\])}]/ + }, { + token : "text", + regex : "\\s+" + }] + }); + + this.normalizeRules(); +}; +oop.inherits(LiquidHighlightRules, TextHighlightRules); + +exports.LiquidHighlightRules = LiquidHighlightRules; +}); + +ace.define('ace/mode/html_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var CssHighlightRules = acequire("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = acequire("./xml_highlight_rules").XmlHighlightRules; + +var tagMap = lang.createMap({ + a : 'anchor', + button : 'form', + form : 'form', + img : 'image', + input : 'form', + label : 'form', + option : 'form', + script : 'script', + select : 'form', + textarea : 'form', + style : 'style', + table : 'table', + tbody : 'table', + td : 'table', + tfoot : 'table', + th : 'table', + tr : 'table' +}); + +var HtmlHighlightRules = function() { + XmlHighlightRules.call(this); + + this.addRules({ + attributes: [{ + include : "space" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "keyword.operator.separator", + regex : "=", + push : [{ + include: "space" + }, { + token : "string", + regex : "[^<>='\"`\\s]+", + next : "pop" + }, { + token : "empty", + regex : "", + next : "pop" + }] + }, { + include : "string" + }], + tag: [{ + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation.begin", + "meta.tag.name" + (group ? "." + group : "")]; + }, + regex : "(<)([-_a-zA-Z0-9:]+)", + next: "start_tag_stuff" + }, { + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation.begin", + "meta.tag.name" + (group ? "." + group : "")]; + }, + regex : "(", next : "start"} + ], + end_tag_stuff: [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next : "start"} + ] + }); + + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); + + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; + +oop.inherits(HtmlHighlightRules, XmlHighlightRules); + +exports.HtmlHighlightRules = HtmlHighlightRules; +}); + +ace.define('ace/mode/css_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; + +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|acequired|root|target|valid|visited)\\b"; + +var CssHighlightRules = function() { + + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + + this.$rules = { + "start" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "@.*?{", + push: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "media" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "\\}", + next: "pop" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "comment" : [{ + token : "comment", + regex : "\\*\\/", + next : "pop" + }, { + defaultToken : "comment" + }], + + "ruleset" : [ + { + token : "paren.rparen", + regex : "\\}", + next: "pop" + }, { + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : ["constant.numeric", "keyword"], + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + }, { + token : "constant.numeric", + regex : numRe + }, { + token : "constant.numeric", // hex6 color + regex : "#[a-f0-9]{6}" + }, { + token : "constant.numeric", // hex3 color + regex : "#[a-f0-9]{3}" + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex : pseudoElements + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex : pseudoClasses + }, { + token : ["support.function", "string", "support.function"], + regex : "(url\\()(.*)(\\))" + }, { + token : keywordMapper, + regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + caseInsensitive: true + }] + }; + + this.normalizeRules(); +}; + +oop.inherits(CssHighlightRules, TextHighlightRules); + +exports.CssHighlightRules = CssHighlightRules; + +}); + +ace.define('ace/mode/javascript_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var JavaScriptHighlightRules = function() { + var keywordMapper = this.createKeywordMapper({ + "variable.language": + "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document" , // Pseudo + "keyword": + "const|yield|import|get|set|" + + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", + "storage.type": + "const|let|var|function", + "constant.language": + "null|Infinity|NaN|undefined", + "support.function": + "alert", + "constant.language.boolean": "true|false" + }, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; + + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-6][0-7]?|" + // oct + "37[0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + + this.$rules = { + "no_regex" : [ + { + token : "comment", + regex : "\\/\\/", + next : "line_comment" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : /\/\*/, + next : "comment" + }, { + token : "string", + regex : "'(?=.)", + next : "qstring" + }, { + token : "string", + regex : '"(?=.)', + next : "qqstring" + }, { + token : "constant.numeric", // hex + regex : /0[xX][0-9a-fA-F]+\b/ + }, { + token : "constant.numeric", // float + regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ + }, { + token : [ + "storage.type", "punctuation.operator", "support.function", + "punctuation.operator", "entity.name.function", "text","keyword.operator" + ], + regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "paren.lparen" + ], + regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "text", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : "keyword", + regex : "(?:" + kwBeforeRe + ")\\b", + next : "start" + }, { + token : ["punctuation.operator", "support.function"], + regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token : ["punctuation.operator", "support.function.dom"], + regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token : ["punctuation.operator", "support.constant"], + regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token : ["storage.type", "punctuation.operator", "support.function.firebug"], + regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/ + }, { + token : keywordMapper, + regex : identifierRe + }, { + token : "keyword.operator", + regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, + next : "start" + }, { + token : "punctuation.operator", + regex : /\?|\:|\,|\;|\./, + next : "start" + }, { + token : "paren.lparen", + regex : /[\[({]/, + next : "start" + }, { + token : "paren.rparen", + regex : /[\])}]/ + }, { + token : "keyword.operator", + regex : /\/=?/, + next : "start" + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment_regex_allowed" + }, { + token : "comment", + regex : "\\/\\/", + next : "line_comment_regex_allowed" + }, { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token : "text", + regex : "\\s+|^$", + next : "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/\\w*", + next: "no_regex" + }, { + token : "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token : "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/ + }, { + token : "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "function_arguments": [ + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "[, ]+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "comment_regex_allowed" : [ + {token : "comment", regex : "\\*\\/", next : "start"}, + {defaultToken : "comment"} + ], + "comment" : [ + {token : "comment", regex : "\\*\\/", next : "no_regex"}, + {defaultToken : "comment"} + ], + "line_comment_regex_allowed" : [ + {token : "comment", regex : "$|^", next : "start"}, + {defaultToken : "comment"} + ], + "line_comment" : [ + {token : "comment", regex : "$|^", next : "no_regex"}, + {defaultToken : "comment"} + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qqstring" + }, { + token : "string", + regex : '"|$', + next : "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qstring" + }, { + token : "string", + regex : "'|$", + next : "no_regex" + }, { + defaultToken: "string" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("no_regex") ]); +}; + +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); + +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define('ace/mode/xml_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var xmlUtil = acequire("./xml_util"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var XmlHighlightRules = function(normalize) { + this.$rules = { + start : [ + {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"}, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration" + }, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction" + }, + {token : "comment", regex : "<\\!--", next : "comment"}, + { + token : ["punctuation.doctype.begin", "meta.tag.doctype"], + regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype" + }, + {include : "tag"}, + {include : "reference"} + ], + + xml_declaration : [ + {include : "attributes"}, + {include : "instruction"} + ], + + instruction : [ + {token : "punctuation.instruction.end", regex : "\\?>", next : "start"} + ], + + doctype : [ + {include : "space"}, + {include : "string"}, + {token : "punctuation.doctype.end", regex : ">", next : "start"}, + {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"}, + {token : "punctuation.begin", regex : "\\[", push : "declarations"} + ], + + declarations : [{ + token : "text", + regex : "\\s+" + }, { + token: "punctuation.end", + regex: "]", + next: "pop" + }, { + token : ["punctuation.begin", "keyword"], + regex : "(<\\!)([-_a-zA-Z0-9]+)", + push : [{ + token : "text", + regex : "\\s+" + }, + { + token : "punctuation.end", + regex : ">", + next : "pop" + }, + {include : "string"}] + }], + + cdata : [ + {token : "string.end", regex : "\\]\\]>", next : "start"}, + {token : "text", regex : "\\s+"}, + {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"} + ], + + comment : [ + {token : "comment", regex : "-->", next : "start"}, + {defaultToken : "comment"} + ], + + tag : [{ + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)", + next: [ + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"} + ] + }, { + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(", next : "start"} + ] + }], + + space : [ + {token : "text", regex : "\\s+"} + ], + + reference : [{ + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, { + token : "invalid.illegal", regex : "&" + }], + + string: [{ + token : "string", + regex : "'", + push : "qstring_inner" + }, { + token : "string", + regex : '"', + push : "qqstring_inner" + }], + + qstring_inner: [ + {token : "string", regex: "'", next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + qqstring_inner: [ + {token : "string", regex: '"', next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + attributes: [{ + token : "entity.other.attribute-name", + regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" + }, { + token : "keyword.operator.separator", + regex : "=" + }, { + include : "space" + }, { + include : "string" + }] + }; + + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; + + +(function() { + + this.embedTagRules = function(HighlightRules, prefix, tag){ + this.$rules.tag.unshift({ + token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(<)(" + tag + ")", + next: [ + {include : "space"}, + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"} + ] + }); + + this.$rules[tag + "-end"] = [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next: "start", + onMatch : function(value, currentState, stack) { + stack.splice(0); + return this.token; + }} + ] + + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(" + }]); + }; + +}).call(TextHighlightRules.prototype); + +oop.inherits(XmlHighlightRules, TextHighlightRules); + +exports.XmlHighlightRules = XmlHighlightRules; +}); + +ace.define('ace/mode/xml_util', ["require", 'exports', 'module' ], function(acequire, exports, module) { + + +function string(state) { + return [{ + token : "string", + regex : '"', + next : state + "_qqstring" + }, { + token : "string", + regex : "'", + next : state + "_qstring" + }]; +} + +function multiLineString(quote, state) { + return [ + {token : "string", regex : quote, next : state}, + { + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, + {defaultToken : "string"} + ]; +} + +exports.tag = function(states, name, nextState, tagMap) { + states[name] = [{ + token : "text", + regex : "\\s+" + }, { + + token : !tagMap ? "meta.tag.tag-name" : function(value) { + if (tagMap[value]) + return "meta.tag.tag-name." + tagMap[value]; + else + return "meta.tag.tag-name"; + }, + regex : "[-_a-zA-Z0-9:]+", + next : name + "_embed_attribute_list" + }, { + token: "empty", + regex: "", + next : name + "_embed_attribute_list" + }]; + + states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list"); + states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list"); + + states[name + "_embed_attribute_list"] = [{ + token : "meta.tag.r", + regex : "/?>", + next : nextState + }, { + token : "keyword.operator", + regex : "=" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "text", + regex : "\\s+" + }].concat(string(name)); +}; + +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/lisp.js b/pitfall/pdfkit/node_modules/brace/mode/lisp.js new file mode 100644 index 00000000..955b124d --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/lisp.js @@ -0,0 +1,136 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2012, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/lisp', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/lisp_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var LispHighlightRules = acequire("./lisp_highlight_rules").LispHighlightRules; + +var Mode = function() { + this.HighlightRules = LispHighlightRules; +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = ";"; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + + +ace.define('ace/mode/lisp_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var LispHighlightRules = function() { + var keywordControl = "case|do|let|loop|if|else|when"; + var keywordOperator = "eq|neq|and|or"; + var constantLanguage = "null|nil"; + var supportFunctions = "cons|car|cdr|cond|lambda|format|setq|setf|quote|eval|append|list|listp|memberp|t|load|progn"; + + var keywordMapper = this.createKeywordMapper({ + "keyword.control": keywordControl, + "keyword.operator": keywordOperator, + "constant.language": constantLanguage, + "support.function": supportFunctions + }, "identifier", true); + + this.$rules = + { + "start": [ + { + token : "comment", + regex : ";.*$" + }, + { + token: ["storage.type.function-type.lisp", "text", "entity.name.function.lisp"], + regex: "(?:\\b(?:(defun|defmethod|defmacro))\\b)(\\s+)((?:\\w|\\-|\\!|\\?)*)" + }, + { + token: ["punctuation.definition.constant.character.lisp", "constant.character.lisp"], + regex: "(#)((?:\\w|[\\\\+-=<>'\"&#])+)" + }, + { + token: ["punctuation.definition.variable.lisp", "variable.other.global.lisp", "punctuation.definition.variable.lisp"], + regex: "(\\*)(\\S*)(\\*)" + }, + { + token : "constant.numeric", // hex + regex : "0[xX][0-9a-fA-F]+(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" + }, + { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(?:L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" + }, + { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, + { + token : "string", + regex : '"(?=.)', + next : "qqstring" + } + ], + "qqstring": [ + { + token: "constant.character.escape.lisp", + regex: "\\\\." + }, + { + token : "string", + regex : '[^"\\\\]+' + }, { + token : "string", + regex : "\\\\$", + next : "qqstring" + }, { + token : "string", + regex : '"|$', + next : "start" + } + ] +} + +}; + +oop.inherits(LispHighlightRules, TextHighlightRules); + +exports.LispHighlightRules = LispHighlightRules; +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/livescript.js b/pitfall/pdfkit/node_modules/brace/mode/livescript.js new file mode 100644 index 00000000..2204921a --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/livescript.js @@ -0,0 +1,288 @@ +ace.define('ace/mode/livescript', ["require", 'exports', 'module' , 'ace/tokenizer', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/text'], function(acequire, exports, module) { + var identifier, LiveScriptMode, keywordend, stringfill; + identifier = '(?![\\d\\s])[$\\w\\xAA-\\uFFDC](?:(?!\\s)[$\\w\\xAA-\\uFFDC]|-[A-Za-z])*'; + exports.Mode = LiveScriptMode = (function(superclass){ + var indenter, prototype = extend$((import$(LiveScriptMode, superclass).displayName = 'LiveScriptMode', LiveScriptMode), superclass).prototype, constructor = LiveScriptMode; + function LiveScriptMode(){ + var that; + this.$tokenizer = new (acequire('../tokenizer')).Tokenizer(LiveScriptMode.Rules); + if (that = acequire('../mode/matching_brace_outdent')) { + this.$outdent = new that.MatchingBraceOutdent; + } + } + indenter = RegExp('(?:[({[=:]|[-~]>|\\b(?:e(?:lse|xport)|d(?:o|efault)|t(?:ry|hen)|finally|import(?:\\s*all)?|const|var|let|new|catch(?:\\s*' + identifier + ')?))\\s*$'); + prototype.getNextLineIndent = function(state, line, tab){ + var indent, tokens; + indent = this.$getIndent(line); + tokens = this.$tokenizer.getLineTokens(line, state).tokens; + if (!(tokens.length && tokens[tokens.length - 1].type === 'comment')) { + if (state === 'start' && indenter.test(line)) { + indent += tab; + } + } + return indent; + }; + prototype.toggleCommentLines = function(state, doc, startRow, endRow){ + var comment, range, i$, i, out, line; + comment = /^(\s*)#/; + range = new (acequire('../range')).Range(0, 0, 0, 0); + for (i$ = startRow; i$ <= endRow; ++i$) { + i = i$; + if (out = comment.test(line = doc.getLine(i))) { + line = line.replace(comment, '$1'); + } else { + line = line.replace(/^\s*/, '$&#'); + } + range.end.row = range.start.row = i; + range.end.column = line.length + 1; + doc.replace(range, line); + } + return 1 - out * 2; + }; + prototype.checkOutdent = function(state, line, input){ + var ref$; + return (ref$ = this.$outdent) != null ? ref$.checkOutdent(line, input) : void 8; + }; + prototype.autoOutdent = function(state, doc, row){ + var ref$; + return (ref$ = this.$outdent) != null ? ref$.autoOutdent(doc, row) : void 8; + }; + return LiveScriptMode; + }(acequire('../mode/text').Mode)); + keywordend = '(?![$\\w]|-[A-Za-z]|\\s*:(?![:=]))'; + stringfill = { + token: 'string', + regex: '.+' + }; + LiveScriptMode.Rules = { + start: [ + { + token: 'keyword', + regex: '(?:t(?:h(?:is|row|en)|ry|ypeof!?)|c(?:on(?:tinue|st)|a(?:se|tch)|lass)|i(?:n(?:stanceof)?|mp(?:ort(?:\\s+all)?|lements)|[fs])|d(?:e(?:fault|lete|bugger)|o)|f(?:or(?:\\s+own)?|inally|unction)|s(?:uper|witch)|e(?:lse|x(?:tends|port)|val)|a(?:nd|rguments)|n(?:ew|ot)|un(?:less|til)|w(?:hile|ith)|o[fr]|return|break|let|var|loop)' + keywordend + }, { + token: 'constant.language', + regex: '(?:true|false|yes|no|on|off|null|void|undefined)' + keywordend + }, { + token: 'invalid.illegal', + regex: '(?:p(?:ackage|r(?:ivate|otected)|ublic)|i(?:mplements|nterface)|enum|static|yield)' + keywordend + }, { + token: 'language.support.class', + regex: '(?:R(?:e(?:gExp|ferenceError)|angeError)|S(?:tring|yntaxError)|E(?:rror|valError)|Array|Boolean|Date|Function|Number|Object|TypeError|URIError)' + keywordend + }, { + token: 'language.support.function', + regex: '(?:is(?:NaN|Finite)|parse(?:Int|Float)|Math|JSON|(?:en|de)codeURI(?:Component)?)' + keywordend + }, { + token: 'variable.language', + regex: '(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)' + keywordend + }, { + token: 'identifier', + regex: identifier + '\\s*:(?![:=])' + }, { + token: 'variable', + regex: identifier + }, { + token: 'keyword.operator', + regex: '(?:\\.{3}|\\s+\\?)' + }, { + token: 'keyword.variable', + regex: '(?:@+|::|\\.\\.)', + next: 'key' + }, { + token: 'keyword.operator', + regex: '\\.\\s*', + next: 'key' + }, { + token: 'string', + regex: '\\\\\\S[^\\s,;)}\\]]*' + }, { + token: 'string.doc', + regex: '\'\'\'', + next: 'qdoc' + }, { + token: 'string.doc', + regex: '"""', + next: 'qqdoc' + }, { + token: 'string', + regex: '\'', + next: 'qstring' + }, { + token: 'string', + regex: '"', + next: 'qqstring' + }, { + token: 'string', + regex: '`', + next: 'js' + }, { + token: 'string', + regex: '<\\[', + next: 'words' + }, { + token: 'string.regex', + regex: '//', + next: 'heregex' + }, { + token: 'comment.doc', + regex: '/\\*', + next: 'comment' + }, { + token: 'comment', + regex: '#.*' + }, { + token: 'string.regex', + regex: '\\/(?:[^[\\/\\n\\\\]*(?:(?:\\\\.|\\[[^\\]\\n\\\\]*(?:\\\\.[^\\]\\n\\\\]*)*\\])[^[\\/\\n\\\\]*)*)\\/[gimy$]{0,4}', + next: 'key' + }, { + token: 'constant.numeric', + regex: '(?:0x[\\da-fA-F][\\da-fA-F_]*|(?:[2-9]|[12]\\d|3[0-6])r[\\da-zA-Z][\\da-zA-Z_]*|(?:\\d[\\d_]*(?:\\.\\d[\\d_]*)?|\\.\\d[\\d_]*)(?:e[+-]?\\d[\\d_]*)?[\\w$]*)' + }, { + token: 'lparen', + regex: '[({[]' + }, { + token: 'rparen', + regex: '[)}\\]]', + next: 'key' + }, { + token: 'keyword.operator', + regex: '\\S+' + }, { + token: 'text', + regex: '\\s+' + } + ], + heregex: [ + { + token: 'string.regex', + regex: '.*?//[gimy$?]{0,4}', + next: 'start' + }, { + token: 'string.regex', + regex: '\\s*#{' + }, { + token: 'comment.regex', + regex: '\\s+(?:#.*)?' + }, { + token: 'string.regex', + regex: '\\S+' + } + ], + key: [ + { + token: 'keyword.operator', + regex: '[.?@!]+' + }, { + token: 'identifier', + regex: identifier, + next: 'start' + }, { + token: 'text', + regex: '.', + next: 'start' + } + ], + comment: [ + { + token: 'comment.doc', + regex: '.*?\\*/', + next: 'start' + }, { + token: 'comment.doc', + regex: '.+' + } + ], + qdoc: [ + { + token: 'string', + regex: ".*?'''", + next: 'key' + }, stringfill + ], + qqdoc: [ + { + token: 'string', + regex: '.*?"""', + next: 'key' + }, stringfill + ], + qstring: [ + { + token: 'string', + regex: '[^\\\\\']*(?:\\\\.[^\\\\\']*)*\'', + next: 'key' + }, stringfill + ], + qqstring: [ + { + token: 'string', + regex: '[^\\\\"]*(?:\\\\.[^\\\\"]*)*"', + next: 'key' + }, stringfill + ], + js: [ + { + token: 'string', + regex: '[^\\\\`]*(?:\\\\.[^\\\\`]*)*`', + next: 'key' + }, stringfill + ], + words: [ + { + token: 'string', + regex: '.*?\\]>', + next: 'key' + }, stringfill + ] + }; +function extend$(sub, sup){ + function fun(){} fun.prototype = (sub.superclass = sup).prototype; + (sub.prototype = new fun).constructor = sub; + if (typeof sup.extended == 'function') sup.extended(sub); + return sub; +} +function import$(obj, src){ + var own = {}.hasOwnProperty; + for (var key in src) if (own.call(src, key)) obj[key] = src[key]; + return obj; +} +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/logiql.js b/pitfall/pdfkit/node_modules/brace/mode/logiql.js new file mode 100644 index 00000000..c0424f32 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/logiql.js @@ -0,0 +1,663 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2012, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/logiql', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/logiql_highlight_rules', 'ace/mode/folding/coffee', 'ace/token_iterator', 'ace/range', 'ace/mode/behaviour/cstyle', 'ace/mode/matching_brace_outdent'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var LogiQLHighlightRules = acequire("./logiql_highlight_rules").LogiQLHighlightRules; +var FoldMode = acequire("./folding/coffee").FoldMode; +var TokenIterator = acequire("../token_iterator").TokenIterator; +var Range = acequire("../range").Range; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; + +var Mode = function() { + this.HighlightRules = LogiQLHighlightRules; + this.foldingRules = new FoldMode(); + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); +}; +oop.inherits(Mode, TextMode); + +(function() { + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + if (/comment|string/.test(endState)) + return indent; + if (tokens.length && tokens[tokens.length - 1].type == "comment.single") + return indent; + + var match = line.match(); + if (/(-->|<--|<-|->|{)\s*$/.test(line)) + indent += tab; + return indent; + }; + + this.checkOutdent = function(state, line, input) { + if (this.$outdent.checkOutdent(line, input)) + return true; + + if (input !== "\n" && input !== "\r\n") + return false; + + if (!/^\s+/.test(line)) + return false; + + return true; + }; + + this.autoOutdent = function(state, doc, row) { + if (this.$outdent.autoOutdent(doc, row)) + return; + var prevLine = doc.getLine(row); + var match = prevLine.match(/^\s+/); + var column = prevLine.lastIndexOf(".") + 1; + if (!match || !row || !column) return 0; + + var line = doc.getLine(row + 1); + var startRange = this.getMatching(doc, {row: row, column: column}); + if (!startRange || startRange.start.row == row) return 0; + + column = match[0].length; + var indent = this.$getIndent(doc.getLine(startRange.start.row)); + doc.replace(new Range(row + 1, 0, row + 1, column), indent); + }; + + this.getMatching = function(session, row, column) { + if (row == undefined) + row = session.selection.lead + if (typeof row == "object") { + column = row.column; + row = row.row; + } + + var startToken = session.getTokenAt(row, column); + var KW_START = "keyword.start", KW_END = "keyword.end"; + var tok; + if (!startToken) + return; + if (startToken.type == KW_START) { + var it = new TokenIterator(session, row, column); + it.step = it.stepForward; + } else if (startToken.type == KW_END) { + var it = new TokenIterator(session, row, column); + it.step = it.stepBackward; + } else + return; + + while (tok = it.step()) { + if (tok.type == KW_START || tok.type == KW_END) + break; + } + if (!tok || tok.type == startToken.type) + return; + + var col = it.getCurrentTokenColumn(); + var row = it.getCurrentTokenRow(); + return new Range(row, col, row, col + tok.value.length); + }; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/logiql_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var LogiQLHighlightRules = function() { + + this.$rules = { start: + [ { token: 'comment.block', + regex: '/\\*', + push: + [ { token: 'comment.block', regex: '\\*/', next: 'pop' }, + { defaultToken: 'comment.block' } ], + }, + { token: 'comment.single', + regex: '//.*', + }, + { token: 'constant.numeric', + regex: '\\d+(?:\\.\\d+)?(?:[eE][+-]?\\d+)?[fd]?', + }, + { token: 'string', + regex: '"', + push: + [ { token: 'string', regex: '"', next: 'pop' }, + { defaultToken: 'string' } ], + }, + { token: 'constant.language', + regex: '\\b(true|false)\\b', + }, + { token: 'entity.name.type.logicblox', + regex: '`[a-zA-Z_:]+(\\d|\\a)*\\b', + }, + { token: 'keyword.start', regex: '->', comment: 'Constraint' }, + { token: 'keyword.start', regex: '-->', comment: 'Level 1 Constraint'}, + { token: 'keyword.start', regex: '<-', comment: 'Rule' }, + { token: 'keyword.start', regex: '<--', comment: 'Level 1 Rule' }, + { token: 'keyword.end', regex: '\\.', comment: 'Terminator' }, + { token: 'keyword.other', regex: '!', comment: 'Negation' }, + { token: 'keyword.other', regex: ',', comment: 'Conjunction' }, + { token: 'keyword.other', regex: ';', comment: 'Disjunction' }, + { token: 'keyword.operator', regex: '<=|>=|!=|<|>', comment: 'Equality'}, + { token: 'keyword.other', regex: '@', comment: 'Equality' }, + { token: 'keyword.operator', regex: '\\+|-|\\*|/', comment: 'Arithmetic operations'}, + { token: 'keyword', regex: '::', comment: 'Colon colon' }, + { token: 'support.function', + regex: '\\b(agg\\s*<<)', + push: + [ { include: '$self' }, + { token: 'support.function', + regex: '>>', + next: 'pop' } ], + }, + { token: 'storage.modifier', + regex: '\\b(lang:[\\w:]*)', + }, + { token: [ 'storage.type', 'text' ], + regex: '(export|sealed|clauses|block|alias)(\\s*\\()(?=`)', + }, + { token: 'entity.name', + regex: '[a-zA-Z_][a-zA-Z_0-9:]*(@prev|@init|@final)?(?=(\\(|\\[))', + }, + { token: 'variable.parameter', + regex: '([a-zA-Z][a-zA-Z_0-9]*|_)\\s*(?=(,|\\.|<-|->|\\)|\\]|=))', + } ] } + + this.normalizeRules(); +}; + +oop.inherits(LogiQLHighlightRules, TextHighlightRules); + +exports.LogiQLHighlightRules = LogiQLHighlightRules; +}); + +ace.define('ace/mode/folding/coffee', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var BaseFoldMode = acequire("./fold_mode").FoldMode; +var Range = acequire("../../range").Range; + +var FoldMode = exports.FoldMode = function() {}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var range = this.indentationBlock(session, row); + if (range) + return range; + + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1 || line[startLevel] != "#") + return; + + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + + while (++row < maxRow) { + line = session.getLine(row); + var level = line.search(re); + + if (level == -1) + continue; + + if (line[level] != "#") + break; + + endRow = row; + } + + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + + if (prevIndent!= -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + + if (indent < nextIndent) + return "start"; + else + return ""; + }; + +}).call(FoldMode.prototype); + +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/lsl.js b/pitfall/pdfkit/node_modules/brace/mode/lsl.js new file mode 100644 index 00000000..dbd3b51b --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/lsl.js @@ -0,0 +1,884 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2013, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/lsl', ["require", 'exports', 'module' , 'ace/tokenizer', 'ace/mode/lsl_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/text', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle', 'ace/lib/oop'], function(acequire, exports, module) { + + +var Tokenizer = acequire("../tokenizer").Tokenizer; +var Rules = acequire("./lsl_highlight_rules").LSLHighlightRules; +var Outdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; +var TextMode = acequire("./text").Mode; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; +var oop = acequire("../lib/oop"); + +var Mode = function() { + this.HighlightRules = Rules; + this.$outdent = new Outdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = ["//"]; + + this.blockComment = { + start: "/*", + end: "*/" + }; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type === "comment.block.lsl") { + return indent; + } + + if (state === "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/lsl_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +oop.inherits(LSLHighlightRules, TextHighlightRules); + +function LSLHighlightRules() { + var keywordMapper = this.createKeywordMapper({ + "constant.language.float.lsl" : "DEG_TO_RAD|PI|PI_BY_TWO|RAD_TO_DEG|SQRT2|TWO_PI", + "constant.language.integer.lsl": "ACTIVE|AGENT|AGENT_ALWAYS_RUN|AGENT_ATTACHMENTS|" + + "AGENT_AUTOPILOT|AGENT_AWAY|AGENT_BUSY|AGENT_BY_LEGACY_NAME|AGENT_BY_USERNAME|" + + "AGENT_CROUCHING|AGENT_FLYING|AGENT_IN_AIR|AGENT_LIST_PARCEL|AGENT_LIST_PARCEL_OWNER|" + + "AGENT_LIST_REGION|AGENT_MOUSELOOK|AGENT_ON_OBJECT|AGENT_SCRIPTED|AGENT_SITTING|" + + "AGENT_TYPING|AGENT_WALKING|ALL_SIDES|ANIM_ON|ATTACH_AVATAR_CENTER|ATTACH_BACK|" + + "ATTACH_BELLY|ATTACH_CHEST|ATTACH_CHIN|ATTACH_HEAD|ATTACH_HUD_BOTTOM|" + + "ATTACH_HUD_BOTTOM_LEFT|ATTACH_HUD_BOTTOM_RIGHT|ATTACH_HUD_CENTER_1|ATTACH_HUD_CENTER_2|" + + "ATTACH_HUD_TOP_CENTER|ATTACH_HUD_TOP_LEFT|ATTACH_HUD_TOP_RIGHT|ATTACH_LEAR|" + + "ATTACH_LEFT_PEC|ATTACH_LEYE|ATTACH_LFOOT|ATTACH_LHAND|ATTACH_LHIP|ATTACH_LLARM|" + + "ATTACH_LLLEG|ATTACH_LSHOULDER|ATTACH_LUARM|ATTACH_LULEG|ATTACH_MOUTH|" + + "ATTACH_NECK|ATTACH_NOSE|ATTACH_PELVIS|ATTACH_REAR|ATTACH_REYE|ATTACH_RFOOT|" + + "ATTACH_RHAND|ATTACH_RHIP|ATTACH_RIGHT_PEC|ATTACH_RLARM|ATTACH_RLLEG|" + + "ATTACH_RSHOULDER|ATTACH_RUARM|ATTACH_RULEG|AVOID_CHARACTERS|AVOID_DYNAMIC_OBSTACLES|" + + "AVOID_NONE|CAMERA_ACTIVE|CAMERA_BEHINDNESS_ANGLE|CAMERA_BEHINDNESS_LAG|" + + "CAMERA_DISTANCE|CAMERA_FOCUS|CAMERA_FOCUS_LAG|CAMERA_FOCUS_LOCKED|CAMERA_FOCUS_OFFSET|" + + "CAMERA_FOCUS_THRESHOLD|CAMERA_PITCH|CAMERA_POSITION|CAMERA_POSITION_LAG|" + + "CAMERA_POSITION_LOCKED|CAMERA_POSITION_THRESHOLD|CHANGED_ALLOWED_DROP|" + + "CHANGED_COLOR|CHANGED_INVENTORY|CHANGED_LINK|CHANGED_MEDIA|CHANGED_OWNER|" + + "CHANGED_REGION|CHANGED_REGION_START|CHANGED_SCALE|CHANGED_SHAPE|CHANGED_TELEPORT|" + + "CHANGED_TEXTURE|CHARACTER_ACCOUNT_FOR_SKIPPED_FRAMES|CHARACTER_AVOIDANCE_MODE|" + + "CHARACTER_CMD_JUMP|CHARACTER_CMD_SMOOTH_STOP|CHARACTER_CMD_STOP|CHARACTER_DESIRED_SPEED|" + + "CHARACTER_DESIRED_TURN_SPEED|CHARACTER_LENGTH|CHARACTER_MAX_ACCEL|CHARACTER_MAX_DECEL|" + + "CHARACTER_MAX_SPEED|CHARACTER_MAX_TURN_RADIUS|CHARACTER_ORIENTATION|" + + "CHARACTER_RADIUS|CHARACTER_STAY_WITHIN_PARCEL|CHARACTER_TYPE|CHARACTER_TYPE_A|" + + "CHARACTER_TYPE_B|CHARACTER_TYPE_C|CHARACTER_TYPE_D|CHARACTER_TYPE_NONE|" + + "CLICK_ACTION_BUY|CLICK_ACTION_NONE|CLICK_ACTION_OPEN|CLICK_ACTION_OPEN_MEDIA|" + + "CLICK_ACTION_PAY|CLICK_ACTION_PLAY|CLICK_ACTION_SIT|CLICK_ACTION_TOUCH|" + + "CONTENT_TYPE_ATOM|CONTENT_TYPE_FORM|CONTENT_TYPE_HTML|CONTENT_TYPE_JSON|" + + "CONTENT_TYPE_LLSD|CONTENT_TYPE_RSS|CONTENT_TYPE_TEXT|CONTENT_TYPE_XHTML|" + + "CONTENT_TYPE_XML|CONTROL_BACK|CONTROL_DOWN|CONTROL_FWD|CONTROL_LBUTTON|" + + "CONTROL_LEFT|CONTROL_ML_LBUTTON|CONTROL_RIGHT|CONTROL_ROT_LEFT|CONTROL_ROT_RIGHT|" + + "CONTROL_UP|DATA_BORN|DATA_NAME|DATA_ONLINE|DATA_PAYINFO|DATA_SIM_POS|" + + "DATA_SIM_RATING|DATA_SIM_STATUS|DEBUG_CHANNEL|DENSITY|ERR_GENERIC|ERR_MALFORMED_PARAMS|" + + "ERR_PARCEL_PERMISSIONS|ERR_RUNTIME_PERMISSIONS|ERR_THROTTLED|ESTATE_ACCESS_ALLOWED_AGENT_ADD|" + + "ESTATE_ACCESS_ALLOWED_AGENT_REMOVE|ESTATE_ACCESS_ALLOWED_GROUP_ADD|ESTATE_ACCESS_ALLOWED_GROUP_REMOVE|" + + "ESTATE_ACCESS_BANNED_AGENT_ADD|ESTATE_ACCESS_BANNED_AGENT_REMOVE|FORCE_DIRECT_PATH|" + + "FRICTION|GCNP_RADIUS|GCNP_STATIC|GRAVITY_MULTIPLIER|HORIZONTAL|HTTP_BODY_MAXLENGTH|" + + "HTTP_BODY_TRUNCATED|HTTP_CUSTOM_HEADER|HTTP_METHOD|HTTP_MIMETYPE|HTTP_PRAGMA_NO_CACHE|" + + "HTTP_VERBOSE_THROTTLE|HTTP_VERIFY_CERT|INVENTORY_ALL|INVENTORY_ANIMATION|" + + "INVENTORY_BODYPART|INVENTORY_CLOTHING|INVENTORY_GESTURE|INVENTORY_LANDMARK|" + + "INVENTORY_NONE|INVENTORY_NOTECARD|INVENTORY_OBJECT|INVENTORY_SCRIPT|" + + "INVENTORY_SOUND|INVENTORY_TEXTURE|JSON_APPEND|KFM_CMD_PAUSE|KFM_CMD_PLAY|" + + "KFM_CMD_SET_MODE|KFM_CMD_STOP|KFM_COMMAND|KFM_DATA|KFM_FORWARD|KFM_LOOP|" + + "KFM_MODE|KFM_PING_PONG|KFM_REVERSE|KFM_ROTATION|KFM_TRANSLATION|LAND_LEVEL|" + + "LAND_LOWER|LAND_NOISE|LAND_RAISE|LAND_REVERT|LAND_SMOOTH|LINK_ALL_CHILDREN|" + + "LINK_ALL_OTHERS|LINK_ROOT|LINK_SET|LINK_THIS|LIST_STAT_GEOMETRIC_MEAN|" + + "LIST_STAT_MAX|LIST_STAT_MEAN|LIST_STAT_MEDIAN|LIST_STAT_MIN|LIST_STAT_NUM_COUNT|" + + "LIST_STAT_RANGE|LIST_STAT_STD_DEV|LIST_STAT_SUM|LIST_STAT_SUM_SQUARES|" + + "LOOP|MASK_BASE|MASK_EVERYONE|MASK_GROUP|MASK_NEXT|MASK_OWNER|OBJECT_ATTACHED_POINT|" + + "OBJECT_CHARACTER_TIME|OBJECT_CREATOR|OBJECT_DESC|OBJECT_GROUP|OBJECT_NAME|" + + "OBJECT_OWNER|OBJECT_PATHFINDING_TYPE|OBJECT_PHANTOM|OBJECT_PHYSICS|OBJECT_PHYSICS_COST|" + + "OBJECT_POS|OBJECT_PRIM_EQUIVALENCE|OBJECT_RETURN_PARCEL|OBJECT_RETURN_PARCEL_OWNER|" + + "OBJECT_RETURN_REGION|OBJECT_ROOT|OBJECT_ROT|OBJECT_RUNNING_SCRIPT_COUNT|" + + "OBJECT_SCRIPT_MEMORY|OBJECT_SCRIPT_TIME|OBJECT_SERVER_COST|OBJECT_STREAMING_COST|" + + "OBJECT_TEMP_ON_REZ|OBJECT_TOTAL_SCRIPT_COUNT|OBJECT_UNKNOWN_DETAIL|OBJECT_VELOCITY|" + + "OPT_AVATAR|OPT_CHARACTER|OPT_EXCLUSION_VOLUME|OPT_LEGACY_LINKSET|OPT_MATERIAL_VOLUME|" + + "OPT_OTHER|OPT_STATIC_OBSTACLE|OPT_WALKABLE|PARCEL_COUNT_GROUP|PARCEL_COUNT_OTHER|" + + "PARCEL_COUNT_OWNER|PARCEL_COUNT_SELECTED|PARCEL_COUNT_TEMP|PARCEL_COUNT_TOTAL|" + + "PARCEL_DETAILS_AREA|PARCEL_DETAILS_DESC|PARCEL_DETAILS_GROUP|PARCEL_DETAILS_ID|" + + "PARCEL_DETAILS_NAME|PARCEL_DETAILS_OWNER|PARCEL_DETAILS_SEE_AVATARS|" + + "PARCEL_FLAG_ALLOW_ALL_OBJECT_ENTRY|PARCEL_FLAG_ALLOW_CREATE_GROUP_OBJECTS|" + + "PARCEL_FLAG_ALLOW_CREATE_OBJECTS|PARCEL_FLAG_ALLOW_DAMAGE|PARCEL_FLAG_ALLOW_FLY|" + + "PARCEL_FLAG_ALLOW_GROUP_OBJECT_ENTRY|PARCEL_FLAG_ALLOW_GROUP_SCRIPTS|" + + "PARCEL_FLAG_ALLOW_LANDMARK|PARCEL_FLAG_ALLOW_SCRIPTS|PARCEL_FLAG_ALLOW_TERRAFORM|" + + "PARCEL_FLAG_LOCAL_SOUND_ONLY|PARCEL_FLAG_RESTRICT_PUSHOBJECT|PARCEL_FLAG_USE_ACCESS_GROUP|" + + "PARCEL_FLAG_USE_ACCESS_LIST|PARCEL_FLAG_USE_BAN_LIST|PARCEL_FLAG_USE_LAND_PASS_LIST|" + + "PARCEL_MEDIA_COMMAND_AGENT|PARCEL_MEDIA_COMMAND_AUTO_ALIGN|PARCEL_MEDIA_COMMAND_DESC|" + + "PARCEL_MEDIA_COMMAND_LOOP|PARCEL_MEDIA_COMMAND_LOOP_SET|PARCEL_MEDIA_COMMAND_PAUSE|" + + "PARCEL_MEDIA_COMMAND_PLAY|PARCEL_MEDIA_COMMAND_SIZE|PARCEL_MEDIA_COMMAND_STOP|" + + "PARCEL_MEDIA_COMMAND_TEXTURE|PARCEL_MEDIA_COMMAND_TIME|PARCEL_MEDIA_COMMAND_TYPE|" + + "PARCEL_MEDIA_COMMAND_UNLOAD|PARCEL_MEDIA_COMMAND_URL|PASSIVE|PATROL_PAUSE_AT_WAYPOINTS|" + + "PAY_DEFAULT|PAY_HIDE|PAYMENT_INFO_ON_FILE|PAYMENT_INFO_USED|PERM_ALL|" + + "PERM_COPY|PERM_MODIFY|PERM_MOVE|PERM_TRANSFER|PERMISSION_ATTACH|PERMISSION_CHANGE_LINKS|" + + "PERMISSION_CONTROL_CAMERA|PERMISSION_DEBIT|PERMISSION_OVERRIDE_ANIMATIONS|" + + "PERMISSION_RETURN_OBJECTS|PERMISSION_SILENT_ESTATE_MANAGEMENT|PERMISSION_TAKE_CONTROLS|" + + "PERMISSION_TELEPORT|PERMISSION_TRACK_CAMERA|PERMISSION_TRIGGER_ANIMATION|" + + "PING_PONG|PRIM_BUMP_BARK|PRIM_BUMP_BLOBS|PRIM_BUMP_BRICKS|PRIM_BUMP_BRIGHT|" + + "PRIM_BUMP_CHECKER|PRIM_BUMP_CONCRETE|PRIM_BUMP_DARK|PRIM_BUMP_DISKS|" + + "PRIM_BUMP_GRAVEL|PRIM_BUMP_LARGETILE|PRIM_BUMP_NONE|PRIM_BUMP_SHINY|" + + "PRIM_BUMP_SIDING|PRIM_BUMP_STONE|PRIM_BUMP_STUCCO|PRIM_BUMP_SUCTION|" + + "PRIM_BUMP_TILE|PRIM_BUMP_WEAVE|PRIM_BUMP_WOOD|PRIM_COLOR|PRIM_DESC|PRIM_FLEXIBLE|" + + "PRIM_FULLBRIGHT|PRIM_GLOW|PRIM_HOLE_CIRCLE|PRIM_HOLE_DEFAULT|PRIM_HOLE_SQUARE|" + + "PRIM_HOLE_TRIANGLE|PRIM_LINK_TARGET|PRIM_MATERIAL|PRIM_MATERIAL_FLESH|" + + "PRIM_MATERIAL_GLASS|PRIM_MATERIAL_METAL|PRIM_MATERIAL_PLASTIC|PRIM_MATERIAL_RUBBER|" + + "PRIM_MATERIAL_STONE|PRIM_MATERIAL_WOOD|PRIM_MEDIA_ALT_IMAGE_ENABLE|PRIM_MEDIA_AUTO_LOOP|" + + "PRIM_MEDIA_AUTO_PLAY|PRIM_MEDIA_AUTO_SCALE|PRIM_MEDIA_AUTO_ZOOM|PRIM_MEDIA_CONTROLS|" + + "PRIM_MEDIA_CONTROLS_MINI|PRIM_MEDIA_CONTROLS_STANDARD|PRIM_MEDIA_CURRENT_URL|" + + "PRIM_MEDIA_FIRST_CLICK_INTERACT|PRIM_MEDIA_HEIGHT_PIXELS|PRIM_MEDIA_HOME_URL|" + + "PRIM_MEDIA_MAX_HEIGHT_PIXELS|PRIM_MEDIA_MAX_URL_LENGTH|PRIM_MEDIA_MAX_WHITELIST_COUNT|" + + "PRIM_MEDIA_MAX_WHITELIST_SIZE|PRIM_MEDIA_MAX_WIDTH_PIXELS|PRIM_MEDIA_PARAM_MAX|" + + "PRIM_MEDIA_PERM_ANYONE|PRIM_MEDIA_PERM_GROUP|PRIM_MEDIA_PERM_NONE|PRIM_MEDIA_PERM_OWNER|" + + "PRIM_MEDIA_PERMS_CONTROL|PRIM_MEDIA_PERMS_INTERACT|PRIM_MEDIA_WHITELIST|" + + "PRIM_MEDIA_WHITELIST_ENABLE|PRIM_MEDIA_WIDTH_PIXELS|PRIM_NAME|PRIM_OMEGA|" + + "PRIM_PHANTOM|PRIM_PHYSICS|PRIM_PHYSICS_SHAPE_CONVEX|PRIM_PHYSICS_SHAPE_NONE|" + + "PRIM_PHYSICS_SHAPE_PRIM|PRIM_PHYSICS_SHAPE_TYPE|PRIM_POINT_LIGHT|PRIM_POS_LOCAL|" + + "PRIM_POSITION|PRIM_ROT_LOCAL|PRIM_ROTATION|PRIM_SCULPT_FLAG_INVERT|PRIM_SCULPT_FLAG_MIRROR|" + + "PRIM_SCULPT_TYPE_CYLINDER|PRIM_SCULPT_TYPE_MASK|PRIM_SCULPT_TYPE_PLANE|" + + "PRIM_SCULPT_TYPE_SPHERE|PRIM_SCULPT_TYPE_TORUS|PRIM_SHINY_HIGH|PRIM_SHINY_LOW|" + + "PRIM_SHINY_MEDIUM|PRIM_SHINY_NONE|PRIM_SIZE|PRIM_SLICE|PRIM_TEMP_ON_REZ|" + + "PRIM_TEXGEN|PRIM_TEXGEN_DEFAULT|PRIM_TEXGEN_PLANAR|PRIM_TEXT|PRIM_TEXTURE|" + + "PRIM_TYPE|PRIM_TYPE_BOX|PRIM_TYPE_CYLINDER|PRIM_TYPE_PRISM|PRIM_TYPE_RING|" + + "PRIM_TYPE_SCULPT|PRIM_TYPE_SPHERE|PRIM_TYPE_TORUS|PRIM_TYPE_TUBE|PROFILE_NONE|" + + "PROFILE_SCRIPT_MEMORY|PSYS_PART_BOUNCE_MASK|PSYS_PART_EMISSIVE_MASK|" + + "PSYS_PART_END_ALPHA|PSYS_PART_END_COLOR|PSYS_PART_END_SCALE|PSYS_PART_FLAGS|" + + "PSYS_PART_FOLLOW_SRC_MASK|PSYS_PART_FOLLOW_VELOCITY_MASK|PSYS_PART_INTERP_COLOR_MASK|" + + "PSYS_PART_INTERP_SCALE_MASK|PSYS_PART_MAX_AGE|PSYS_PART_START_ALPHA|" + + "PSYS_PART_START_COLOR|PSYS_PART_START_SCALE|PSYS_PART_TARGET_LINEAR_MASK|" + + "PSYS_PART_TARGET_POS_MASK|PSYS_PART_WIND_MASK|PSYS_SRC_ACCEL|PSYS_SRC_ANGLE_BEGIN|" + + "PSYS_SRC_ANGLE_END|PSYS_SRC_BURST_PART_COUNT|PSYS_SRC_BURST_RADIUS|PSYS_SRC_BURST_RATE|" + + "PSYS_SRC_BURST_SPEED_MAX|PSYS_SRC_BURST_SPEED_MIN|PSYS_SRC_MAX_AGE|PSYS_SRC_OMEGA|" + + "PSYS_SRC_PATTERN|PSYS_SRC_PATTERN_ANGLE|PSYS_SRC_PATTERN_ANGLE_CONE|" + + "PSYS_SRC_PATTERN_ANGLE_CONE_EMPTY|PSYS_SRC_PATTERN_DROP|PSYS_SRC_PATTERN_EXPLODE|" + + "PSYS_SRC_TARGET_KEY|PSYS_SRC_TEXTURE|PU_EVADE_HIDDEN|PU_EVADE_SPOTTED|" + + "PU_FAILURE_DYNAMIC_PATHFINDING_DISABLED|PU_FAILURE_INVALID_GOAL|PU_FAILURE_INVALID_START|" + + "PU_FAILURE_NO_NAVMESH|PU_FAILURE_NO_VALID_DESTINATION|PU_FAILURE_OTHER|" + + "PU_FAILURE_PARCEL_UNREACHABLE|PU_FAILURE_TARGET_GONE|PU_FAILURE_UNREACHABLE|" + + "PU_GOAL_REACHED|PU_SLOWDOWN_DISTANCE_REACHED|PUBLIC_CHANNEL|PURSUIT_FUZZ_FACTOR|" + + "PURSUIT_GOAL_TOLERANCE|PURSUIT_INTERCEPT|PURSUIT_OFFSET|RC_DATA_FLAGS|" + + "RC_DETECT_PHANTOM|RC_GET_LINK_NUM|RC_GET_NORMAL|RC_GET_ROOT_KEY|RC_MAX_HITS|" + + "RC_REJECT_AGENTS|RC_REJECT_LAND|RC_REJECT_NONPHYSICAL|RC_REJECT_PHYSICAL|" + + "RC_REJECT_TYPES|RCERR_CAST_TIME_EXCEEDED|RCERR_SIM_PERF_LOW|RCERR_UNKNOWN|" + + "REGION_FLAG_ALLOW_DAMAGE|REGION_FLAG_ALLOW_DIRECT_TELEPORT|REGION_FLAG_BLOCK_FLY|" + + "REGION_FLAG_BLOCK_TERRAFORM|REGION_FLAG_DISABLE_COLLISIONS|REGION_FLAG_DISABLE_PHYSICS|" + + "REGION_FLAG_FIXED_SUN|REGION_FLAG_RESTRICT_PUSHOBJECT|REGION_FLAG_SANDBOX|" + + "REMOTE_DATA_CHANNEL|REMOTE_DATA_REPLY|REMOTE_DATA_REQUEST|REQUIRE_LINE_OF_SIGHT|" + + "RESTITUTION|REVERSE|ROTATE|SCALE|SCRIPTED|SIM_STAT_PCT_CHARS_STEPPED|" + + "SMOOTH|STATUS_BLOCK_GRAB|STATUS_BLOCK_GRAB_OBJECT|STATUS_BOUNDS_ERROR|" + + "STATUS_CAST_SHADOWS|STATUS_DIE_AT_EDGE|STATUS_INTERNAL_ERROR|STATUS_MALFORMED_PARAMS|" + + "STATUS_NOT_FOUND|STATUS_NOT_SUPPORTED|STATUS_OK|STATUS_PHANTOM|STATUS_PHYSICS|" + + "STATUS_RETURN_AT_EDGE|STATUS_ROTATE_X|STATUS_ROTATE_Y|STATUS_ROTATE_Z|" + + "STATUS_SANDBOX|STATUS_TYPE_MISMATCH|STATUS_WHITELIST_FAILED|STRING_TRIM|" + + "STRING_TRIM_HEAD|STRING_TRIM_TAIL|TOUCH_INVALID_FACE|TRAVERSAL_TYPE|" + + "TRAVERSAL_TYPE_FAST|TRAVERSAL_TYPE_NONE|TRAVERSAL_TYPE_SLOW|TYPE_FLOAT|" + + "TYPE_INTEGER|TYPE_INVALID|TYPE_KEY|TYPE_ROTATION|TYPE_STRING|TYPE_VECTOR|" + + "VEHICLE_ANGULAR_DEFLECTION_EFFICIENCY|VEHICLE_ANGULAR_DEFLECTION_TIMESCALE|" + + "VEHICLE_ANGULAR_FRICTION_TIMESCALE|VEHICLE_ANGULAR_MOTOR_DECAY_TIMESCALE|" + + "VEHICLE_ANGULAR_MOTOR_DIRECTION|VEHICLE_ANGULAR_MOTOR_TIMESCALE|VEHICLE_BANKING_EFFICIENCY|" + + "VEHICLE_BANKING_MIX|VEHICLE_BANKING_TIMESCALE|VEHICLE_BUOYANCY|VEHICLE_FLAG_CAMERA_DECOUPLED|" + + "VEHICLE_FLAG_HOVER_GLOBAL_HEIGHT|VEHICLE_FLAG_HOVER_TERRAIN_ONLY|VEHICLE_FLAG_HOVER_UP_ONLY|" + + "VEHICLE_FLAG_HOVER_WATER_ONLY|VEHICLE_FLAG_LIMIT_MOTOR_UP|VEHICLE_FLAG_LIMIT_ROLL_ONLY|" + + "VEHICLE_FLAG_MOUSELOOK_BANK|VEHICLE_FLAG_MOUSELOOK_STEER|VEHICLE_FLAG_NO_DEFLECTION_UP|" + + "VEHICLE_HOVER_EFFICIENCY|VEHICLE_HOVER_HEIGHT|VEHICLE_HOVER_TIMESCALE|" + + "VEHICLE_LINEAR_DEFLECTION_EFFICIENCY|VEHICLE_LINEAR_DEFLECTION_TIMESCALE|" + + "VEHICLE_LINEAR_FRICTION_TIMESCALE|VEHICLE_LINEAR_MOTOR_DECAY_TIMESCALE|" + + "VEHICLE_LINEAR_MOTOR_DIRECTION|VEHICLE_LINEAR_MOTOR_OFFSET|VEHICLE_LINEAR_MOTOR_TIMESCALE|" + + "VEHICLE_REFERENCE_FRAME|VEHICLE_TYPE_AIRPLANE|VEHICLE_TYPE_BALLOON|VEHICLE_TYPE_BOAT|" + + "VEHICLE_TYPE_CAR|VEHICLE_TYPE_NONE|VEHICLE_TYPE_SLED|VEHICLE_VERTICAL_ATTRACTION_EFFICIENCY|" + + "VEHICLE_VERTICAL_ATTRACTION_TIMESCALE|VERTICAL|WANDER_PAUSE_AT_WAYPOINTS", + "constant.language.integer.boolean.lsl" : "FALSE|TRUE", + "constant.language.quaternion.lsl" : "ZERO_ROTATION", + "constant.language.string.lsl" : "EOF|JSON_ARRAY|JSON_FALSE|JSON_INVALID|" + + "JSON_NULL|JSON_NUMBER|JSON_OBJECT|JSON_STRING|JSON_TRUE|NULL_KEY|" + + "TEXTURE_BLANK|TEXTURE_DEFAULT|TEXTURE_MEDIA|TEXTURE_PLYWOOD|" + + "TEXTURE_TRANSPARENT|URL_REQUEST_DENIED|URL_REQUEST_GRANTED", + "constant.language.vector.lsl" : "TOUCH_INVALID_TEXCOORD|TOUCH_INVALID_VECTOR|ZERO_VECTOR", + "invalid.broken.lsl": "LAND_LARGE_BRUSH|LAND_MEDIUM_BRUSH|LAND_SMALL_BRUSH", + "invalid.deprecated.lsl" : "ATTACH_LPEC|ATTACH_RPEC|CHARACTER_MAX_ANGULAR_ACCEL|" + + "CHARACTER_MAX_ANGULAR_SPEED|CHARACTER_TURN_SPEED_MULTIPLIER|DATA_RATING|" + + "PRIM_CAST_SHADOWS|PRIM_MATERIAL_LIGHT|PRIM_PHYSICS_MATERIAL|PRIM_TYPE_LEGACY|" + + "PSYS_SRC_INNERANGLE|PSYS_SRC_OUTERANGLE|VEHICLE_FLAG_NO_FLY_UP|llCloud|" + + "llGodLikeRezObject|llMakeExplosion|llMakeFire|llMakeFountain|llMakeSmoke|" + + "llRemoteDataSetRegion|llSetInventoryPermMask|llSetObjectPermMask|llSound|" + + "llSoundPreload|llXorBase64Strings|llXorBase64StringsCorrect", + "invalid.godmode.lsl": "llGodLikeRezObject|llSetInventoryPermMask|llSetObjectPermMask", + "invalid.illegal.lsl" : "print", + "invalid.unimplemented.lsl": "CHARACTER_MAX_ANGULAR_ACCEL|CHARACTER_MAX_ANGULAR_SPEED|" + + "CHARACTER_TURN_SPEED_MULTIPLIER|PERMISSION_CHANGE_JOINTS|PERMISSION_CHANGE_PERMISSIONS|" + + "PERMISSION_RELEASE_OWNERSHIP|PERMISSION_REMAP_CONTROLS|PRIM_PHYSICS_MATERIAL|PRIM_TYPE_LEGACY|" + + "PSYS_SRC_OBJ_REL_MASK|event|llCollisionSprite|llPointAt|llRefreshPrimURL|" + + "llReleaseCamera|llRemoteLoadScript|llSetPrimURL|llStopPointAt|llTakeCamera", + "keyword.control.lsl" : "do|else|for|if|jump|return|while", + "storage.type.lsl" : "float|integer|key|list|quaternion|rotation|string|vector", + "support.function.lsl": "llAbs|llAcos|llAddToLandBanList|llAddToLandPassList|" + + "llAdjustSoundVolume|llAllowInventoryDrop|llAngleBetween|llApplyImpulse|" + + "llApplyRotationalImpulse|llAsin|llAtan2|llAttachToAvatar|llAttachToAvatarTemp|" + + "llAvatarOnLinkSitTarget|llAvatarOnSitTarget|llAxes2Rot|llAxisAngle2Rot|" + + "llBase64ToInteger|llBase64ToString|llBreakAllLinks|llBreakLink|llCastRay|" + + "llCeil|llClearCameraParams|llClearLinkMedia|llClearPrimMedia|llCloseRemoteDataChannel|" + + "llCollisionFilter|llCollisionSound|llCos|llCreateCharacter|llCreateLink|" + + "llCSV2List|llDeleteCharacter|llDeleteSubList|llDeleteSubString|llDetachFromAvatar|" + + "llDetectedGrab|llDetectedGroup|llDetectedKey|llDetectedLinkNumber|llDetectedName|" + + "llDetectedOwner|llDetectedPos|llDetectedRot|llDetectedTouchBinormal|" + + "llDetectedTouchFace|llDetectedTouchNormal|llDetectedTouchPos|llDetectedTouchST|" + + "llDetectedTouchUV|llDetectedType|llDetectedVel|llDialog|llDie|llDumpList2String|" + + "llEdgeOfWorld|llEjectFromLand|llEmail|llEscapeURL|llEuler2Rot|llExecCharacterCmd|" + + "llEvade|llFabs|llFleeFrom|llFloor|llForceMouselook|llFrand|llGenerateKey|" + + "llGetAccel|llGetAgentInfo|llGetAgentLanguage|llGetAgentList|llGetAgentSize|" + + "llGetAlpha|llGetAndResetTime|llGetAnimation|llGetAnimationList|llGetAnimationOverride|" + + "llGetAttached|llGetBoundingBox|llGetCameraPos|llGetCameraRot|llGetCenterOfMass|" + + "llGetClosestNavPoint|llGetColor|llGetCreator|llGetDate|llGetDisplayName|" + + "llGetEnergy|llGetEnv|llGetForce|llGetFreeMemory|llGetFreeURLs|llGetGeometricCenter|" + + "llGetGMTclock|llGetHTTPHeader|llGetInventoryCreator|llGetInventoryKey|llGetInventoryName|" + + "llGetInventoryNumber|llGetInventoryPermMask|llGetInventoryType|llGetKey|" + + "llGetLandOwnerAt|llGetLinkKey|llGetLinkMedia|llGetLinkName|llGetLinkNumber|" + + "llGetLinkNumberOfSides|llGetLinkPrimitiveParams|llGetListEntryType|llGetListLength|" + + "llGetLocalPos|llGetLocalRot|llGetMass|llGetMassMKS|llGetMemoryLimit|" + + "llGetNextEmail|llGetNotecardLine|llGetNumberOfNotecardLines|llGetNumberOfPrims|" + + "llGetNumberOfSides|llGetObjectDesc|llGetObjectDetails|llGetObjectMass|" + + "llGetObjectName|llGetObjectPermMask|llGetObjectPrimCount|llGetOmega|" + + "llGetOwner|llGetOwnerKey|llGetParcelDetails|llGetParcelFlags|llGetParcelMaxPrims|" + + "llGetParcelMusicURL|llGetParcelPrimCount|llGetParcelPrimOwners|llGetPermissions|" + + "llGetPermissionsKey|llGetPhysicsMaterial|llGetPos|llGetPrimitiveParams|" + + "llGetPrimMediaParams|llGetRegionAgentCount|llGetRegionCorner|llGetRegionFlags|" + + "llGetRegionFPS|llGetRegionName|llGetRegionTimeDilation|llGetRootPosition|" + + "llGetRootRotation|llGetRot|llGetScale|llGetScriptName|llGetScriptState|" + + "llGetSimStats|llGetSimulatorHostname|llGetSPMaxMemory|llGetStartParameter|" + + "llGetStaticPath|llGetStatus|llGetSubString|llGetSunDirection|llGetTexture|" + + "llGetTextureOffset|llGetTextureRot|llGetTextureScale|llGetTime|llGetTimeOfDay|" + + "llGetTimestamp|llGetTorque|llGetUnixTime|llGetUsedMemory|llGetUsername|" + + "llGetVel|llGetWallclock|llGiveInventory|llGiveInventoryList|llGiveMoney|" + + "llGround|llGroundContour|llGroundNormal|llGroundRepel|llGroundSlope|" + + "llHTTPRequest|llHTTPResponse|llInsertString|llInstantMessage|llIntegerToBase64|" + + "llJson2List|llJsonGetValue|llJsonSetValue|llJsonValueType|llKey2Name|" + + "llLinkParticleSystem|llLinkSitTarget|llList2CSV|llList2Float|llList2Integer|" + + "llList2Json|llList2Key|llList2List|llList2ListStrided|llList2Rot|" + + "llList2String|llList2Vector|llListen|llListenControl|llListenRemove|" + + "llListFindList|llListInsertList|llListRandomize|llListReplaceList|llListSort|" + + "llListStatistics|llLoadURL|llLog|llLog10|llLookAt|llLoopSound|llLoopSoundMaster|" + + "llLoopSoundSlave|llManageEstateAccess|llMapDestination|llMD5String|llMessageLinked|" + + "llMinEventDelay|llModifyLand|llModPow|llMoveToTarget|llNavigateTo|llOffsetTexture|" + + "llOpenRemoteDataChannel|llOverMyLand|llOwnerSay|llParcelMediaCommandList|" + + "llParcelMediaQuery|llParseString2List|llParseStringKeepNulls|llParticleSystem|" + + "llPassCollisions|llPassTouches|llPatrolPoints|llPlaySound|llPlaySoundSlave|" + + "llPow|llPreloadSound|llPursue|llPushObject|llRegionSay|llRegionSayTo|" + + "llReleaseControls|llReleaseURL|llRemoteDataReply|llRemoteLoadScriptPin|" + + "llRemoveFromLandBanList|llRemoveFromLandPassList|llRemoveInventory|llRemoveVehicleFlags|" + + "llRequestAgentData|llRequestDisplayName|llRequestInventoryData|llRequestPermissions|" + + "llRequestSecureURL|llRequestSimulatorData|llRequestURL|llRequestUsername|" + + "llResetAnimationOverride|llResetLandBanList|llResetLandPassList|llResetOtherScript|" + + "llResetScript|llResetTime|llReturnObjectsByID|llReturnObjectsByOwner|" + + "llRezAtRoot|llRezObject|llRot2Angle|llRot2Axis|llRot2Euler|" + + "llRot2Fwd|llRot2Left|llRot2Up|llRotateTexture|llRotBetween|llRotLookAt|" + + "llRotTarget|llRotTargetRemove|llRound|llSameGroup|llSay|llScaleTexture|" + + "llScriptDanger|llScriptProfiler|llSendRemoteData|llSensor|llSensorRemove|" + + "llSensorRepeat|llSetAlpha|llSetAngularVelocity|llSetAnimationOverride|llSetBuoyancy|" + + "llSetCameraAtOffset|llSetCameraEyeOffset|llSetCameraParams|llSetClickAction|" + + "llSetColor|llSetContentType|llSetDamage|llSetForce|llSetForceAndTorque|llSetHoverHeight|" + + "llSetKeyframedMotion|llSetLinkAlpha|llSetLinkCamera|llSetLinkColor|llSetLinkMedia|" + + "llSetLinkPrimitiveParams|llSetLinkPrimitiveParamsFast|llSetLinkTexture|llSetLinkTextureAnim|" + + "llSetLocalRot|llSetMemoryLimit|llSetObjectDesc|llSetObjectName|llSetParcelMusicURL|" + + "llSetPayPrice|llSetPhysicsMaterial|llSetPos|llSetPrimitiveParams|llSetPrimMediaParams|" + + "llSetRegionPos|llSetRemoteScriptAccessPin|llSetRot|llSetScale|llSetScriptState|" + + "llSetSitText|llSetSoundQueueing|llSetSoundRadius|llSetStatus|llSetText|" + + "llSetTexture|llSetTextureAnim|llSetTimerEvent|llSetTorque|llSetTouchText|" + + "llSetVehicleFlags|llSetVehicleFloatParam|llSetVehicleRotationParam|llSetVehicleType|" + + "llSetVehicleVectorParam|llSetVelocity|llSHA1String|llShout|llSin|llSitTarget|" + + "llSleep|llSqrt|llStartAnimation|llStopAnimation|llStopHover|llStopLookAt|" + + "llStopMoveToTarget|llStopSound|llStringLength|llStringToBase64|llStringTrim|" + + "llSubStringIndex|llTakeControls|llTan|llTarget|llTargetOmega|llTargetRemove|" + + "llTeleportAgent|llTeleportAgentGlobalCoords|llTeleportAgentHome|llTextBox|" + + "llToLower|llToUpper|llTransferLindenDollars|llTriggerSound|llTriggerSoundLimited|" + + "llUnescapeURL|llUnSit|llUpdateCharacter|llVecDist|llVecMag|llVecNorm|" + + "llVolumeDetect|llWanderWithin|llWater|llWhisper|llWind|llXorBase64", + "support.function.event.lsl" : "at_rot_target|at_target|attach|changed|collision|" + + "collision_end|collision_start|control|dataserver|email|http_request|" + + "http_response|land_collision|land_collision_end|land_collision_start|" + + "link_message|listen|money|moving_end|moving_start|no_sensor|not_at_rot_target|" + + "not_at_target|object_rez|on_rez|path_update|remote_data|run_time_permissions|" + + "sensor|state_entry|state_exit|timer|touch|touch_end|touch_start|transaction_result" + }, "identifier"); + + this.$rules = { + "start" : [ + { + token : "comment.line.double-slash.lsl", + regex : "\\/\\/.*$" + }, { + token : "comment.block.lsl", + regex : "\\/\\*", + next : "comment" + }, { + token : "string.quoted.double.lsl", + start : '"', + end : '"', + next : [{ + token : "constant.language.escape.lsl", regex : /\\[tn"\\]/ + }] + }, { + token : "constant.numeric.lsl", + regex : "(0[xX][0-9a-fA-F]+|[+-]?[0-9]+(?:(?:\\.[0-9]*)?(?:[eE][+-]?[0-9]+)?)?)\\b" + }, { + token : "entity.name.state.lsl", + regex : "\\b((state)\\s+\\w+|default)\\b" + }, { + token : keywordMapper, + regex : "\\b[a-zA-Z_][a-zA-Z0-9_]*\\b" + }, { + token : "support.function.user-defined.lsl", + regex : /\b([a-zA-Z_]\w*)(?=\(.*?\))/ + }, { + token : "keyword.operator.lsl", + regex : "\\+\\+|\\-\\-|<<|>>|&&?|\\|\\|?|\\^|~|[!%<>=*+\\-\\/]=?" + }, { + token : "punctuation.operator.lsl", + regex : "\\,|\\;" + }, { + token : "paren.lparen.lsl", + regex : "[\\[\\(\\{]" + }, { + token : "paren.rparen.lsl", + regex : "[\\]\\)\\}]" + }, { + token : "text.lsl", + regex : "\\s+" + } + ], + "comment" : [ + { + token : "comment.block.lsl", + regex : ".*?\\*\\/", + next : "start" + }, { + token : "comment.block.lsl", + regex : ".+" + } + ] + }; + this.normalizeRules(); +} + +exports.LSLHighlightRules = LSLHighlightRules; +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/lua.js b/pitfall/pdfkit/node_modules/brace/mode/lua.js new file mode 100644 index 00000000..37f5f10e --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/lua.js @@ -0,0 +1,456 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/lua', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/lua_highlight_rules', 'ace/mode/folding/lua', 'ace/range', 'ace/worker/worker_client'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var LuaHighlightRules = acequire("./lua_highlight_rules").LuaHighlightRules; +var LuaFoldMode = acequire("./folding/lua").FoldMode; +var Range = acequire("../range").Range; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; + +var Mode = function() { + this.HighlightRules = LuaHighlightRules; + + this.foldingRules = new LuaFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "--"; + this.blockComment = {start: "--[", end: "]--"}; + + var indentKeywords = { + "function": 1, + "then": 1, + "do": 1, + "else": 1, + "elseif": 1, + "repeat": 1, + "end": -1, + "until": -1 + }; + var outdentKeywords = [ + "else", + "elseif", + "end", + "until" + ]; + + function getNetIndentLevel(tokens) { + var level = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + if (token.type == "keyword") { + if (token.value in indentKeywords) { + level += indentKeywords[token.value]; + } + } else if (token.type == "paren.lparen") { + level ++; + } else if (token.type == "paren.rparen") { + level --; + } + } + if (level < 0) { + return -1; + } else if (level > 0) { + return 1; + } else { + return 0; + } + } + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + var level = 0; + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + + if (state == "start") { + level = getNetIndentLevel(tokens); + } + if (level > 0) { + return indent + tab; + } else if (level < 0 && indent.substr(indent.length - tab.length) == tab) { + if (!this.checkOutdent(state, line, "\n")) { + return indent.substr(0, indent.length - tab.length); + } + } + return indent; + }; + + this.checkOutdent = function(state, line, input) { + if (input != "\n" && input != "\r" && input != "\r\n") + return false; + + if (line.match(/^\s*[\)\}\]]$/)) + return true; + + var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens; + + if (!tokens || !tokens.length) + return false; + + return (tokens[0].type == "keyword" && outdentKeywords.indexOf(tokens[0].value) != -1); + }; + + this.autoOutdent = function(state, session, row) { + var prevLine = session.getLine(row - 1); + var prevIndent = this.$getIndent(prevLine).length; + var prevTokens = this.getTokenizer().getLineTokens(prevLine, "start").tokens; + var tabLength = session.getTabString().length; + var expectedIndent = prevIndent + tabLength * getNetIndentLevel(prevTokens); + var curIndent = this.$getIndent(session.getLine(row)).length; + if (curIndent < expectedIndent) { + return; + } + session.outdentRows(new Range(row, 0, row + 2, 0)); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/lua"), "Worker"); + worker.attachToDocument(session.getDocument()); + + worker.on("error", function(e) { + session.setAnnotations([e.data]); + }); + + worker.on("ok", function(e) { + session.clearAnnotations(); + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/lua_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var LuaHighlightRules = function() { + + var keywords = ( + "break|do|else|elseif|end|for|function|if|in|local|repeat|"+ + "return|then|until|while|or|and|not" + ); + + var builtinConstants = ("true|false|nil|_G|_VERSION"); + + var functions = ( + "string|xpcall|package|tostring|print|os|unpack|acequire|"+ + "getfenv|setmetatable|next|assert|tonumber|io|rawequal|"+ + "collectgarbage|getmetatable|module|rawset|math|debug|"+ + "pcall|table|newproxy|type|coroutine|_G|select|gcinfo|"+ + "pairs|rawget|loadstring|ipairs|_VERSION|dofile|setfenv|"+ + "load|error|loadfile|"+ + + "sub|upper|len|gfind|rep|find|match|char|dump|gmatch|"+ + "reverse|byte|format|gsub|lower|preload|loadlib|loaded|"+ + "loaders|cpath|config|path|seeall|exit|setlocale|date|"+ + "getenv|difftime|remove|time|clock|tmpname|rename|execute|"+ + "lines|write|close|flush|open|output|type|read|stderr|"+ + "stdin|input|stdout|popen|tmpfile|log|max|acos|huge|"+ + "ldexp|pi|cos|tanh|pow|deg|tan|cosh|sinh|random|randomseed|"+ + "frexp|ceil|floor|rad|abs|sqrt|modf|asin|min|mod|fmod|log10|"+ + "atan2|exp|sin|atan|getupvalue|debug|sethook|getmetatable|"+ + "gethook|setmetatable|setlocal|traceback|setfenv|getinfo|"+ + "setupvalue|getlocal|getregistry|getfenv|setn|insert|getn|"+ + "foreachi|maxn|foreach|concat|sort|remove|resume|yield|"+ + "status|wrap|create|running|"+ + "__add|__sub|__mod|__unm|__concat|__lt|__index|__call|__gc|__metatable|"+ + "__mul|__div|__pow|__len|__eq|__le|__newindex|__tostring|__mode|__tonumber" + ); + + var stdLibaries = ("string|package|os|io|math|debug|table|coroutine"); + + var futureReserved = ""; + + var deprecatedIn5152 = ("setn|foreach|foreachi|gcinfo|log10|maxn"); + + var keywordMapper = this.createKeywordMapper({ + "keyword": keywords, + "support.function": functions, + "invalid.deprecated": deprecatedIn5152, + "constant.library": stdLibaries, + "constant.language": builtinConstants, + "invalid.illegal": futureReserved, + "variable.language": "this" + }, "identifier"); + + var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))"; + var hexInteger = "(?:0[xX][\\dA-Fa-f]+)"; + var integer = "(?:" + decimalInteger + "|" + hexInteger + ")"; + + var fraction = "(?:\\.\\d+)"; + var intPart = "(?:\\d+)"; + var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; + var floatNumber = "(?:" + pointFloat + ")"; + + this.$rules = { + "start" : [{ + stateName: "bracketedComment", + onMatch : function(value, currentState, stack){ + stack.unshift(this.next, value.length - 2, currentState); + return "comment"; + }, + regex : /\-\-\[=*\[/, + next : [ + { + onMatch : function(value, currentState, stack) { + if (value.length == stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack.shift(); + } else { + this.next = ""; + } + return "comment"; + }, + regex : /\]=*\]/, + next : "start" + }, { + defaultToken : "comment" + } + ] + }, + + { + token : "comment", + regex : "\\-\\-.*$" + }, + { + stateName: "bracketedString", + onMatch : function(value, currentState, stack){ + stack.unshift(this.next, value.length, currentState); + return "comment"; + }, + regex : /\[=*\[/, + next : [ + { + onMatch : function(value, currentState, stack) { + if (value.length == stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack.shift(); + } else { + this.next = ""; + } + return "comment"; + }, + + regex : /\]=*\]/, + next : "start" + }, { + defaultToken : "comment" + } + ] + }, + { + token : "string", // " string + regex : '"(?:[^\\\\]|\\\\.)*?"' + }, { + token : "string", // ' string + regex : "'(?:[^\\\\]|\\\\.)*?'" + }, { + token : "constant.numeric", // float + regex : floatNumber + }, { + token : "constant.numeric", // integer + regex : integer + "\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator", + regex : "\\+|\\-|\\*|\\/|%|\\#|\\^|~|<|>|<=|=>|==|~=|=|\\:|\\.\\.\\.|\\.\\." + }, { + token : "paren.lparen", + regex : "[\\[\\(\\{]" + }, { + token : "paren.rparen", + regex : "[\\]\\)\\}]" + }, { + token : "text", + regex : "\\s+|\\w+" + } ] + }; + + this.normalizeRules(); +} + +oop.inherits(LuaHighlightRules, TextHighlightRules); + +exports.LuaHighlightRules = LuaHighlightRules; +}); + +ace.define('ace/mode/folding/lua', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var BaseFoldMode = acequire("./fold_mode").FoldMode; +var Range = acequire("../../range").Range; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + + +var FoldMode = exports.FoldMode = function() {}; + +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /\b(function|then|do|repeat)\b|{\s*$|(\[=*\[)/; + this.foldingStopMarker = /\bend\b|^\s*}|\]=*\]/; + + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + var isStart = this.foldingStartMarker.test(line); + var isEnd = this.foldingStopMarker.test(line); + + if (isStart && !isEnd) { + var match = line.match(this.foldingStartMarker); + if (match[1] == "then" && /\belseif\b/.test(line)) + return; + if (match[1]) { + if (session.getTokenAt(row, match.index + 1).type === "keyword") + return "start"; + } else if (match[2]) { + var type = session.bgTokenizer.getState(row) || ""; + if (type[0] == "bracketedComment" || type[0] == "bracketedString") + return "start"; + } else { + return "start"; + } + } + if (foldStyle != "markbeginend" || !isEnd || isStart && isEnd) + return ""; + + var match = line.match(this.foldingStopMarker); + if (match[0] === "end") { + if (session.getTokenAt(row, match.index + 1).type === "keyword") + return "end"; + } else if (match[0][0] === "]") { + var type = session.bgTokenizer.getState(row - 1) || ""; + if (type[0] == "bracketedComment" || type[0] == "bracketedString") + return "end"; + } else + return "end"; + }; + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var line = session.doc.getLine(row); + var match = this.foldingStartMarker.exec(line); + if (match) { + if (match[1]) + return this.luaBlock(session, row, match.index + 1); + + if (match[2]) + return session.getCommentFoldRange(row, match.index + 1); + + return this.openingBracketBlock(session, "{", row, match.index); + } + + var match = this.foldingStopMarker.exec(line); + if (match) { + if (match[0] === "end") { + if (session.getTokenAt(row, match.index + 1).type === "keyword") + return this.luaBlock(session, row, match.index + 1); + } + + if (match[0][0] === "]") + return session.getCommentFoldRange(row, match.index + 1); + + return this.closingBracketBlock(session, "}", row, match.index + match[0].length); + } + }; + + this.luaBlock = function(session, row, column) { + var stream = new TokenIterator(session, row, column); + var indentKeywords = { + "function": 1, + "do": 1, + "then": 1, + "elseif": -1, + "end": -1, + "repeat": 1, + "until": -1 + }; + + var token = stream.getCurrentToken(); + if (!token || token.type != "keyword") + return; + + var val = token.value; + var stack = [val]; + var dir = indentKeywords[val]; + + if (!dir) + return; + + var startColumn = dir === -1 ? stream.getCurrentTokenColumn() : session.getLine(row).length; + var startRow = row; + + stream.step = dir === -1 ? stream.stepBackward : stream.stepForward; + while(token = stream.step()) { + if (token.type !== "keyword") + continue; + var level = dir * indentKeywords[token.value]; + + if (level > 0) { + stack.unshift(token.value); + } else if (level <= 0) { + stack.shift(); + if (!stack.length && token.value != "elseif") + break; + if (level === 0) + stack.unshift(token.value); + } + } + + var row = stream.getCurrentTokenRow(); + if (dir === -1) + return new Range(row, session.getLine(row).length, startRow, startColumn); + else + return new Range(startRow, startColumn, row, stream.getCurrentTokenColumn()); + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/luapage.js b/pitfall/pdfkit/node_modules/brace/mode/luapage.js new file mode 100644 index 00000000..acef1ed7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/luapage.js @@ -0,0 +1,2819 @@ +ace.define('ace/mode/luapage', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/html', 'ace/mode/lua', 'ace/tokenizer', 'ace/mode/luapage_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var HtmlMode = acequire("./html").Mode; +var LuaMode = acequire("./lua").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var LuaPageHighlightRules = acequire("./luapage_highlight_rules").LuaPageHighlightRules; + +var Mode = function() { + this.HighlightRules = LuaPageHighlightRules; + + this.HighlightRules = LuaPageHighlightRules; + this.createModeDelegates({ + "lua-": LuaMode + }); +}; +oop.inherits(Mode, HtmlMode); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/html', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/css', 'ace/tokenizer', 'ace/mode/html_highlight_rules', 'ace/mode/behaviour/html', 'ace/mode/folding/html', 'ace/mode/html_completions'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var JavaScriptMode = acequire("./javascript").Mode; +var CssMode = acequire("./css").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var HtmlHighlightRules = acequire("./html_highlight_rules").HtmlHighlightRules; +var HtmlBehaviour = acequire("./behaviour/html").HtmlBehaviour; +var HtmlFoldMode = acequire("./folding/html").FoldMode; +var HtmlCompletions = acequire("./html_completions").HtmlCompletions; + +var Mode = function() { + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new HtmlBehaviour(); + this.$completer = new HtmlCompletions(); + + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + + this.foldingRules = new HtmlFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.blockComment = {start: ""}; + + this.getNextLineIndent = function(state, line, tab) { + return this.$getIndent(line); + }; + + this.checkOutdent = function(state, line, input) { + return false; + }; + + this.getCompletions = function(state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/javascript', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = JavaScriptHighlightRules; + + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/javascript"), "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + + worker.on("jslint", function(results) { + session.setAnnotations(results.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/javascript_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var JavaScriptHighlightRules = function() { + var keywordMapper = this.createKeywordMapper({ + "variable.language": + "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document" , // Pseudo + "keyword": + "const|yield|import|get|set|" + + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", + "storage.type": + "const|let|var|function", + "constant.language": + "null|Infinity|NaN|undefined", + "support.function": + "alert", + "constant.language.boolean": "true|false" + }, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; + + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-6][0-7]?|" + // oct + "37[0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + + this.$rules = { + "no_regex" : [ + { + token : "comment", + regex : "\\/\\/", + next : "line_comment" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : /\/\*/, + next : "comment" + }, { + token : "string", + regex : "'(?=.)", + next : "qstring" + }, { + token : "string", + regex : '"(?=.)', + next : "qqstring" + }, { + token : "constant.numeric", // hex + regex : /0[xX][0-9a-fA-F]+\b/ + }, { + token : "constant.numeric", // float + regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ + }, { + token : [ + "storage.type", "punctuation.operator", "support.function", + "punctuation.operator", "entity.name.function", "text","keyword.operator" + ], + regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "paren.lparen" + ], + regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "text", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : "keyword", + regex : "(?:" + kwBeforeRe + ")\\b", + next : "start" + }, { + token : ["punctuation.operator", "support.function"], + regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token : ["punctuation.operator", "support.function.dom"], + regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token : ["punctuation.operator", "support.constant"], + regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token : ["storage.type", "punctuation.operator", "support.function.firebug"], + regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/ + }, { + token : keywordMapper, + regex : identifierRe + }, { + token : "keyword.operator", + regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, + next : "start" + }, { + token : "punctuation.operator", + regex : /\?|\:|\,|\;|\./, + next : "start" + }, { + token : "paren.lparen", + regex : /[\[({]/, + next : "start" + }, { + token : "paren.rparen", + regex : /[\])}]/ + }, { + token : "keyword.operator", + regex : /\/=?/, + next : "start" + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment_regex_allowed" + }, { + token : "comment", + regex : "\\/\\/", + next : "line_comment_regex_allowed" + }, { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token : "text", + regex : "\\s+|^$", + next : "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/\\w*", + next: "no_regex" + }, { + token : "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token : "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/ + }, { + token : "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "function_arguments": [ + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "[, ]+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "comment_regex_allowed" : [ + {token : "comment", regex : "\\*\\/", next : "start"}, + {defaultToken : "comment"} + ], + "comment" : [ + {token : "comment", regex : "\\*\\/", next : "no_regex"}, + {defaultToken : "comment"} + ], + "line_comment_regex_allowed" : [ + {token : "comment", regex : "$|^", next : "start"}, + {defaultToken : "comment"} + ], + "line_comment" : [ + {token : "comment", regex : "$|^", next : "no_regex"}, + {defaultToken : "comment"} + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qqstring" + }, { + token : "string", + regex : '"|$', + next : "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qstring" + }, { + token : "string", + regex : "'|$", + next : "no_regex" + }, { + defaultToken: "string" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("no_regex") ]); +}; + +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); + +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); + +ace.define('ace/mode/css', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/behaviour/css', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var CssHighlightRules = acequire("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var CssBehaviour = acequire("./behaviour/css").CssBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.foldingRules = "cStyle"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/css"), "Worker"); + worker.attachToDocument(session.getDocument()); + + worker.on("csslint", function(e) { + session.setAnnotations(e.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; + +}); + +ace.define('ace/mode/css_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; + +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|acequired|root|target|valid|visited)\\b"; + +var CssHighlightRules = function() { + + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + + this.$rules = { + "start" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "@.*?{", + push: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "media" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "\\}", + next: "pop" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "comment" : [{ + token : "comment", + regex : "\\*\\/", + next : "pop" + }, { + defaultToken : "comment" + }], + + "ruleset" : [ + { + token : "paren.rparen", + regex : "\\}", + next: "pop" + }, { + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : ["constant.numeric", "keyword"], + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + }, { + token : "constant.numeric", + regex : numRe + }, { + token : "constant.numeric", // hex6 color + regex : "#[a-f0-9]{6}" + }, { + token : "constant.numeric", // hex3 color + regex : "#[a-f0-9]{3}" + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex : pseudoElements + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex : pseudoClasses + }, { + token : ["support.function", "string", "support.function"], + regex : "(url\\()(.*)(\\))" + }, { + token : keywordMapper, + regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + caseInsensitive: true + }] + }; + + this.normalizeRules(); +}; + +oop.inherits(CssHighlightRules, TextHighlightRules); + +exports.CssHighlightRules = CssHighlightRules; + +}); + +ace.define('ace/mode/behaviour/css', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + +var CssBehaviour = function () { + + this.inherit(CstyleBehaviour); + + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + } + } + if (!line.substring(cursor.column).match(/^\s*;/)) { + return { + text: ':;', + selection: [1, 1] + } + } + } + } + }); + + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column ++; + return range; + } + } + } + }); + + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + } + } + } + }); + +} +oop.inherits(CssBehaviour, CstyleBehaviour); + +exports.CssBehaviour = CssBehaviour; +}); + +ace.define('ace/mode/html_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var CssHighlightRules = acequire("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = acequire("./xml_highlight_rules").XmlHighlightRules; + +var tagMap = lang.createMap({ + a : 'anchor', + button : 'form', + form : 'form', + img : 'image', + input : 'form', + label : 'form', + option : 'form', + script : 'script', + select : 'form', + textarea : 'form', + style : 'style', + table : 'table', + tbody : 'table', + td : 'table', + tfoot : 'table', + th : 'table', + tr : 'table' +}); + +var HtmlHighlightRules = function() { + XmlHighlightRules.call(this); + + this.addRules({ + attributes: [{ + include : "space" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "keyword.operator.separator", + regex : "=", + push : [{ + include: "space" + }, { + token : "string", + regex : "[^<>='\"`\\s]+", + next : "pop" + }, { + token : "empty", + regex : "", + next : "pop" + }] + }, { + include : "string" + }], + tag: [{ + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation.begin", + "meta.tag.name" + (group ? "." + group : "")]; + }, + regex : "(<)([-_a-zA-Z0-9:]+)", + next: "start_tag_stuff" + }, { + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation.begin", + "meta.tag.name" + (group ? "." + group : "")]; + }, + regex : "(", next : "start"} + ], + end_tag_stuff: [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next : "start"} + ] + }); + + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); + + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; + +oop.inherits(HtmlHighlightRules, XmlHighlightRules); + +exports.HtmlHighlightRules = HtmlHighlightRules; +}); + +ace.define('ace/mode/xml_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var xmlUtil = acequire("./xml_util"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var XmlHighlightRules = function(normalize) { + this.$rules = { + start : [ + {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"}, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration" + }, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction" + }, + {token : "comment", regex : "<\\!--", next : "comment"}, + { + token : ["punctuation.doctype.begin", "meta.tag.doctype"], + regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype" + }, + {include : "tag"}, + {include : "reference"} + ], + + xml_declaration : [ + {include : "attributes"}, + {include : "instruction"} + ], + + instruction : [ + {token : "punctuation.instruction.end", regex : "\\?>", next : "start"} + ], + + doctype : [ + {include : "space"}, + {include : "string"}, + {token : "punctuation.doctype.end", regex : ">", next : "start"}, + {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"}, + {token : "punctuation.begin", regex : "\\[", push : "declarations"} + ], + + declarations : [{ + token : "text", + regex : "\\s+" + }, { + token: "punctuation.end", + regex: "]", + next: "pop" + }, { + token : ["punctuation.begin", "keyword"], + regex : "(<\\!)([-_a-zA-Z0-9]+)", + push : [{ + token : "text", + regex : "\\s+" + }, + { + token : "punctuation.end", + regex : ">", + next : "pop" + }, + {include : "string"}] + }], + + cdata : [ + {token : "string.end", regex : "\\]\\]>", next : "start"}, + {token : "text", regex : "\\s+"}, + {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"} + ], + + comment : [ + {token : "comment", regex : "-->", next : "start"}, + {defaultToken : "comment"} + ], + + tag : [{ + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)", + next: [ + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"} + ] + }, { + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(", next : "start"} + ] + }], + + space : [ + {token : "text", regex : "\\s+"} + ], + + reference : [{ + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, { + token : "invalid.illegal", regex : "&" + }], + + string: [{ + token : "string", + regex : "'", + push : "qstring_inner" + }, { + token : "string", + regex : '"', + push : "qqstring_inner" + }], + + qstring_inner: [ + {token : "string", regex: "'", next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + qqstring_inner: [ + {token : "string", regex: '"', next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + attributes: [{ + token : "entity.other.attribute-name", + regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" + }, { + token : "keyword.operator.separator", + regex : "=" + }, { + include : "space" + }, { + include : "string" + }] + }; + + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; + + +(function() { + + this.embedTagRules = function(HighlightRules, prefix, tag){ + this.$rules.tag.unshift({ + token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(<)(" + tag + ")", + next: [ + {include : "space"}, + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"} + ] + }); + + this.$rules[tag + "-end"] = [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next: "start", + onMatch : function(value, currentState, stack) { + stack.splice(0); + return this.token; + }} + ] + + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(" + }]); + }; + +}).call(TextHighlightRules.prototype); + +oop.inherits(XmlHighlightRules, TextHighlightRules); + +exports.XmlHighlightRules = XmlHighlightRules; +}); + +ace.define('ace/mode/xml_util', ["require", 'exports', 'module' ], function(acequire, exports, module) { + + +function string(state) { + return [{ + token : "string", + regex : '"', + next : state + "_qqstring" + }, { + token : "string", + regex : "'", + next : state + "_qstring" + }]; +} + +function multiLineString(quote, state) { + return [ + {token : "string", regex : quote, next : state}, + { + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, + {defaultToken : "string"} + ]; +} + +exports.tag = function(states, name, nextState, tagMap) { + states[name] = [{ + token : "text", + regex : "\\s+" + }, { + + token : !tagMap ? "meta.tag.tag-name" : function(value) { + if (tagMap[value]) + return "meta.tag.tag-name." + tagMap[value]; + else + return "meta.tag.tag-name"; + }, + regex : "[-_a-zA-Z0-9:]+", + next : name + "_embed_attribute_list" + }, { + token: "empty", + regex: "", + next : name + "_embed_attribute_list" + }]; + + states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list"); + states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list"); + + states[name + "_embed_attribute_list"] = [{ + token : "meta.tag.r", + regex : "/?>", + next : nextState + }, { + token : "keyword.operator", + regex : "=" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "text", + regex : "\\s+" + }].concat(string(name)); +}; + +}); + +ace.define('ace/mode/behaviour/html', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour/xml', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var XmlBehaviour = acequire("../behaviour/xml").XmlBehaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var voidElements = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr']; + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); + return hasType; +} + +var HtmlBehaviour = function () { + + this.inherit(XmlBehaviour); // Get xml behaviour + + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getCursorPosition(); + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken(); + + if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column) + return; + var atCursor = false; + if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text'))); + } else { + atCursor = true; + } + if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) { + return; + } + var element = token.value; + if (atCursor){ + var element = element.substring(0, position.column - token.start); + } + if (voidElements.indexOf(element) !== -1){ + return; + } + return { + text: '>' + '', + selection: [1, 1] + } + } + }); +} +oop.inherits(HtmlBehaviour, XmlBehaviour); + +exports.HtmlBehaviour = HtmlBehaviour; +}); + +ace.define('ace/mode/behaviour/xml', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); + return hasType; +} + +var XmlBehaviour = function () { + + this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour + + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getCursorPosition(); + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken(); + + if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column) + return; + var atCursor = false; + if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text'))); + } else { + atCursor = true; + } + if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) { + return; + } + var tag = token.value; + if (atCursor){ + var tag = tag.substring(0, position.column - token.start); + } + + return { + text: '>' + '', + selection: [1, 1] + } + } + }); + + this.add('autoindent', 'insertion', function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var rightChars = line.substring(cursor.column, cursor.column + 2); + if (rightChars == '?)/; + this._parseTag = function(tag) { + + var match = tag.match(this.tagRe); + var column = 0; + + return { + value: tag, + match: match ? match[2] : "", + closing: match ? !!match[3] : false, + selfClosing: match ? !!match[5] || match[2] == "/>" : false, + tagName: match ? match[4] : "", + column: match[1] ? column + match[1].length : column + }; + }; + this._readTagForward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var value = ""; + var start; + + do { + if (token.type.lastIndexOf("meta.tag", 0) === 0) { + if (!start) { + var start = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + }; + } + value += token.value; + if (value.indexOf(">") !== -1) { + var tag = this._parseTag(value); + tag.start = start; + tag.end = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + token.value.length + }; + iterator.stepForward(); + return tag; + } + } + } while(token = iterator.stepForward()); + + return null; + }; + + this._readTagBackward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var value = ""; + var end; + + do { + if (token.type.lastIndexOf("meta.tag", 0) === 0) { + if (!end) { + end = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + token.value.length + }; + } + value = token.value + value; + if (value.indexOf("<") !== -1) { + var tag = this._parseTag(value); + tag.end = end; + tag.start = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + }; + iterator.stepBackward(); + return tag; + } + } + } while(token = iterator.stepBackward()); + + return null; + }; + + this._pop = function(stack, tag) { + while (stack.length) { + + var top = stack[stack.length-1]; + if (!tag || top.tagName == tag.tagName) { + return stack.pop(); + } + else if (this.voidElements[tag.tagName]) { + return; + } + else if (this.voidElements[top.tagName]) { + stack.pop(); + continue; + } else { + return null; + } + } + }; + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + + if (!firstTag.match) + return null; + + var isBackward = firstTag.closing || firstTag.selfClosing; + var stack = []; + var tag; + + if (!isBackward) { + var iterator = new TokenIterator(session, row, firstTag.column); + var start = { + row: row, + column: firstTag.column + firstTag.tagName.length + 2 + }; + while (tag = this._readTagForward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) + return Range.fromPoints(start, tag.start); + } + else { + stack.push(tag) + } + } + } + else { + var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length); + var end = { + row: row, + column: firstTag.column + }; + + while (tag = this._readTagBackward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (!tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) { + tag.start.column += tag.tagName.length + 2; + return Range.fromPoints(tag.start, end); + } + } + else { + stack.push(tag) + } + } + } + + }; + +}).call(FoldMode.prototype); + +}); + +ace.define('ace/mode/html_completions', ["require", 'exports', 'module' , 'ace/token_iterator'], function(acequire, exports, module) { + + +var TokenIterator = acequire("../token_iterator").TokenIterator; + +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; + +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; + +var globalAttributes = commonAttributes.concat(eventAttributes); + +var attributeMap = { + "html": ["manifest"], + "head": [], + "title": [], + "base": ["href", "target"], + "link": ["href", "hreflang", "rel", "media", "type", "sizes"], + "meta": ["http-equiv", "name", "content", "charset"], + "style": ["type", "media", "scoped"], + "script": ["charset", "type", "src", "defer", "async"], + "noscript": ["href"], + "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"], + "section": [], + "nav": [], + "article": ["pubdate"], + "aside": [], + "h1": [], + "h2": [], + "h3": [], + "h4": [], + "h5": [], + "h6": [], + "header": [], + "footer": [], + "address": [], + "main": [], + "p": [], + "hr": [], + "pre": [], + "blockquote": ["cite"], + "ol": ["start", "reversed"], + "ul": [], + "li": ["value"], + "dl": [], + "dt": [], + "dd": [], + "figure": [], + "figcaption": [], + "div": [], + "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"], + "em": [], + "strong": [], + "small": [], + "s": [], + "cite": [], + "q": ["cite"], + "dfn": [], + "abbr": [], + "data": [], + "time": ["datetime"], + "code": [], + "var": [], + "samp": [], + "kbd": [], + "sub": [], + "sup": [], + "i": [], + "b": [], + "u": [], + "mark": [], + "ruby": [], + "rt": [], + "rp": [], + "bdi": [], + "bdo": [], + "span": [], + "br": [], + "wbr": [], + "ins": ["cite", "datetime"], + "del": ["cite", "datetime"], + "img": ["alt", "src", "height", "width", "usemap", "ismap"], + "iframe": ["name", "src", "height", "width", "sandbox", "seamless"], + "embed": ["src", "height", "width", "type"], + "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"], + "param": ["name", "value"], + "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"], + "audio": ["src", "autobuffer", "autoplay", "loop", "controls"], + "source": ["src", "type", "media"], + "track": ["kind", "src", "srclang", "label", "default"], + "canvas": ["width", "height"], + "map": ["name"], + "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"], + "svg": [], + "math": [], + "table": ["summary"], + "caption": [], + "colgroup": ["span"], + "col": ["span"], + "tbody": [], + "thead": [], + "tfoot": [], + "tr": [], + "td": ["headers", "rowspan", "colspan"], + "th": ["headers", "rowspan", "colspan", "scope"], + "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"], + "fieldset": ["disabled", "form", "name"], + "legend": [], + "label": ["form", "for"], + "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "acequired", "size", "src", "step", "width", "files", "value"], + "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"], + "select": ["autofocus", "disabled", "form", "multiple", "name", "size"], + "datalist": [], + "optgroup": ["disabled", "label"], + "option": ["disabled", "selected", "label", "value"], + "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "acequired", "rows", "cols", "wrap"], + "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"], + "output": ["for", "form", "name"], + "progress": ["value", "max"], + "meter": ["value", "min", "max", "low", "high", "optimum"], + "details": ["open"], + "summary": [], + "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"], + "menu": ["type", "label"], + "dialog": ["open"] +}; + +var allElements = Object.keys(attributeMap); + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); +} + +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + if (!token || !hasType(token, 'tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'operator') || hasType(token, 'attribute-name') || hasType(token, 'text'))); + } + if (token && hasType(token, 'tag-name') && !iterator.stepBackward().value.match('/')) + return token.value; +} + +var HtmlCompletions = function() { + +}; + +(function() { + + this.getCompletions = function(state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + + if (!token) + return []; + if (hasType(token, "tag-name") || (token.value == '<' && hasType(token, "text"))) + return this.getTagCompletions(state, session, pos, prefix); + if (hasType(token, 'text') || hasType(token, 'attribute-name')) + return this.getAttributeCompetions(state, session, pos, prefix); + + return []; + }; + + this.getTagCompletions = function(state, session, pos, prefix) { + var elements = allElements; + if (prefix) { + elements = elements.filter(function(element){ + return element.indexOf(prefix) === 0; + }); + } + return elements.map(function(element){ + return { + value: element, + meta: "tag" + }; + }); + }; + + this.getAttributeCompetions = function(state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(attributeMap[tagName]); + } + if (prefix) { + attributes = attributes.filter(function(attribute){ + return attribute.indexOf(prefix) === 0; + }); + } + return attributes.map(function(attribute){ + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute" + }; + }); + }; + +}).call(HtmlCompletions.prototype); + +exports.HtmlCompletions = HtmlCompletions; +}); + +ace.define('ace/mode/lua', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/lua_highlight_rules', 'ace/mode/folding/lua', 'ace/range', 'ace/worker/worker_client'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var LuaHighlightRules = acequire("./lua_highlight_rules").LuaHighlightRules; +var LuaFoldMode = acequire("./folding/lua").FoldMode; +var Range = acequire("../range").Range; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; + +var Mode = function() { + this.HighlightRules = LuaHighlightRules; + + this.foldingRules = new LuaFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "--"; + this.blockComment = {start: "--[", end: "]--"}; + + var indentKeywords = { + "function": 1, + "then": 1, + "do": 1, + "else": 1, + "elseif": 1, + "repeat": 1, + "end": -1, + "until": -1 + }; + var outdentKeywords = [ + "else", + "elseif", + "end", + "until" + ]; + + function getNetIndentLevel(tokens) { + var level = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + if (token.type == "keyword") { + if (token.value in indentKeywords) { + level += indentKeywords[token.value]; + } + } else if (token.type == "paren.lparen") { + level ++; + } else if (token.type == "paren.rparen") { + level --; + } + } + if (level < 0) { + return -1; + } else if (level > 0) { + return 1; + } else { + return 0; + } + } + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + var level = 0; + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + + if (state == "start") { + level = getNetIndentLevel(tokens); + } + if (level > 0) { + return indent + tab; + } else if (level < 0 && indent.substr(indent.length - tab.length) == tab) { + if (!this.checkOutdent(state, line, "\n")) { + return indent.substr(0, indent.length - tab.length); + } + } + return indent; + }; + + this.checkOutdent = function(state, line, input) { + if (input != "\n" && input != "\r" && input != "\r\n") + return false; + + if (line.match(/^\s*[\)\}\]]$/)) + return true; + + var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens; + + if (!tokens || !tokens.length) + return false; + + return (tokens[0].type == "keyword" && outdentKeywords.indexOf(tokens[0].value) != -1); + }; + + this.autoOutdent = function(state, session, row) { + var prevLine = session.getLine(row - 1); + var prevIndent = this.$getIndent(prevLine).length; + var prevTokens = this.getTokenizer().getLineTokens(prevLine, "start").tokens; + var tabLength = session.getTabString().length; + var expectedIndent = prevIndent + tabLength * getNetIndentLevel(prevTokens); + var curIndent = this.$getIndent(session.getLine(row)).length; + if (curIndent < expectedIndent) { + return; + } + session.outdentRows(new Range(row, 0, row + 2, 0)); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/lua"), "Worker"); + worker.attachToDocument(session.getDocument()); + + worker.on("error", function(e) { + session.setAnnotations([e.data]); + }); + + worker.on("ok", function(e) { + session.clearAnnotations(); + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/lua_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var LuaHighlightRules = function() { + + var keywords = ( + "break|do|else|elseif|end|for|function|if|in|local|repeat|"+ + "return|then|until|while|or|and|not" + ); + + var builtinConstants = ("true|false|nil|_G|_VERSION"); + + var functions = ( + "string|xpcall|package|tostring|print|os|unpack|acequire|"+ + "getfenv|setmetatable|next|assert|tonumber|io|rawequal|"+ + "collectgarbage|getmetatable|module|rawset|math|debug|"+ + "pcall|table|newproxy|type|coroutine|_G|select|gcinfo|"+ + "pairs|rawget|loadstring|ipairs|_VERSION|dofile|setfenv|"+ + "load|error|loadfile|"+ + + "sub|upper|len|gfind|rep|find|match|char|dump|gmatch|"+ + "reverse|byte|format|gsub|lower|preload|loadlib|loaded|"+ + "loaders|cpath|config|path|seeall|exit|setlocale|date|"+ + "getenv|difftime|remove|time|clock|tmpname|rename|execute|"+ + "lines|write|close|flush|open|output|type|read|stderr|"+ + "stdin|input|stdout|popen|tmpfile|log|max|acos|huge|"+ + "ldexp|pi|cos|tanh|pow|deg|tan|cosh|sinh|random|randomseed|"+ + "frexp|ceil|floor|rad|abs|sqrt|modf|asin|min|mod|fmod|log10|"+ + "atan2|exp|sin|atan|getupvalue|debug|sethook|getmetatable|"+ + "gethook|setmetatable|setlocal|traceback|setfenv|getinfo|"+ + "setupvalue|getlocal|getregistry|getfenv|setn|insert|getn|"+ + "foreachi|maxn|foreach|concat|sort|remove|resume|yield|"+ + "status|wrap|create|running|"+ + "__add|__sub|__mod|__unm|__concat|__lt|__index|__call|__gc|__metatable|"+ + "__mul|__div|__pow|__len|__eq|__le|__newindex|__tostring|__mode|__tonumber" + ); + + var stdLibaries = ("string|package|os|io|math|debug|table|coroutine"); + + var futureReserved = ""; + + var deprecatedIn5152 = ("setn|foreach|foreachi|gcinfo|log10|maxn"); + + var keywordMapper = this.createKeywordMapper({ + "keyword": keywords, + "support.function": functions, + "invalid.deprecated": deprecatedIn5152, + "constant.library": stdLibaries, + "constant.language": builtinConstants, + "invalid.illegal": futureReserved, + "variable.language": "this" + }, "identifier"); + + var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))"; + var hexInteger = "(?:0[xX][\\dA-Fa-f]+)"; + var integer = "(?:" + decimalInteger + "|" + hexInteger + ")"; + + var fraction = "(?:\\.\\d+)"; + var intPart = "(?:\\d+)"; + var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; + var floatNumber = "(?:" + pointFloat + ")"; + + this.$rules = { + "start" : [{ + stateName: "bracketedComment", + onMatch : function(value, currentState, stack){ + stack.unshift(this.next, value.length - 2, currentState); + return "comment"; + }, + regex : /\-\-\[=*\[/, + next : [ + { + onMatch : function(value, currentState, stack) { + if (value.length == stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack.shift(); + } else { + this.next = ""; + } + return "comment"; + }, + regex : /\]=*\]/, + next : "start" + }, { + defaultToken : "comment" + } + ] + }, + + { + token : "comment", + regex : "\\-\\-.*$" + }, + { + stateName: "bracketedString", + onMatch : function(value, currentState, stack){ + stack.unshift(this.next, value.length, currentState); + return "comment"; + }, + regex : /\[=*\[/, + next : [ + { + onMatch : function(value, currentState, stack) { + if (value.length == stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack.shift(); + } else { + this.next = ""; + } + return "comment"; + }, + + regex : /\]=*\]/, + next : "start" + }, { + defaultToken : "comment" + } + ] + }, + { + token : "string", // " string + regex : '"(?:[^\\\\]|\\\\.)*?"' + }, { + token : "string", // ' string + regex : "'(?:[^\\\\]|\\\\.)*?'" + }, { + token : "constant.numeric", // float + regex : floatNumber + }, { + token : "constant.numeric", // integer + regex : integer + "\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator", + regex : "\\+|\\-|\\*|\\/|%|\\#|\\^|~|<|>|<=|=>|==|~=|=|\\:|\\.\\.\\.|\\.\\." + }, { + token : "paren.lparen", + regex : "[\\[\\(\\{]" + }, { + token : "paren.rparen", + regex : "[\\]\\)\\}]" + }, { + token : "text", + regex : "\\s+|\\w+" + } ] + }; + + this.normalizeRules(); +} + +oop.inherits(LuaHighlightRules, TextHighlightRules); + +exports.LuaHighlightRules = LuaHighlightRules; +}); + +ace.define('ace/mode/folding/lua', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var BaseFoldMode = acequire("./fold_mode").FoldMode; +var Range = acequire("../../range").Range; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + + +var FoldMode = exports.FoldMode = function() {}; + +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /\b(function|then|do|repeat)\b|{\s*$|(\[=*\[)/; + this.foldingStopMarker = /\bend\b|^\s*}|\]=*\]/; + + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + var isStart = this.foldingStartMarker.test(line); + var isEnd = this.foldingStopMarker.test(line); + + if (isStart && !isEnd) { + var match = line.match(this.foldingStartMarker); + if (match[1] == "then" && /\belseif\b/.test(line)) + return; + if (match[1]) { + if (session.getTokenAt(row, match.index + 1).type === "keyword") + return "start"; + } else if (match[2]) { + var type = session.bgTokenizer.getState(row) || ""; + if (type[0] == "bracketedComment" || type[0] == "bracketedString") + return "start"; + } else { + return "start"; + } + } + if (foldStyle != "markbeginend" || !isEnd || isStart && isEnd) + return ""; + + var match = line.match(this.foldingStopMarker); + if (match[0] === "end") { + if (session.getTokenAt(row, match.index + 1).type === "keyword") + return "end"; + } else if (match[0][0] === "]") { + var type = session.bgTokenizer.getState(row - 1) || ""; + if (type[0] == "bracketedComment" || type[0] == "bracketedString") + return "end"; + } else + return "end"; + }; + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var line = session.doc.getLine(row); + var match = this.foldingStartMarker.exec(line); + if (match) { + if (match[1]) + return this.luaBlock(session, row, match.index + 1); + + if (match[2]) + return session.getCommentFoldRange(row, match.index + 1); + + return this.openingBracketBlock(session, "{", row, match.index); + } + + var match = this.foldingStopMarker.exec(line); + if (match) { + if (match[0] === "end") { + if (session.getTokenAt(row, match.index + 1).type === "keyword") + return this.luaBlock(session, row, match.index + 1); + } + + if (match[0][0] === "]") + return session.getCommentFoldRange(row, match.index + 1); + + return this.closingBracketBlock(session, "}", row, match.index + match[0].length); + } + }; + + this.luaBlock = function(session, row, column) { + var stream = new TokenIterator(session, row, column); + var indentKeywords = { + "function": 1, + "do": 1, + "then": 1, + "elseif": -1, + "end": -1, + "repeat": 1, + "until": -1 + }; + + var token = stream.getCurrentToken(); + if (!token || token.type != "keyword") + return; + + var val = token.value; + var stack = [val]; + var dir = indentKeywords[val]; + + if (!dir) + return; + + var startColumn = dir === -1 ? stream.getCurrentTokenColumn() : session.getLine(row).length; + var startRow = row; + + stream.step = dir === -1 ? stream.stepBackward : stream.stepForward; + while(token = stream.step()) { + if (token.type !== "keyword") + continue; + var level = dir * indentKeywords[token.value]; + + if (level > 0) { + stack.unshift(token.value); + } else if (level <= 0) { + stack.shift(); + if (!stack.length && token.value != "elseif") + break; + if (level === 0) + stack.unshift(token.value); + } + } + + var row = stream.getCurrentTokenRow(); + if (dir === -1) + return new Range(row, session.getLine(row).length, startRow, startColumn); + else + return new Range(startRow, startColumn, row, stream.getCurrentTokenColumn()); + }; + +}).call(FoldMode.prototype); + +}); +ace.define('ace/mode/luapage_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/html_highlight_rules', 'ace/mode/lua_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var HtmlHighlightRules = acequire("./html_highlight_rules").HtmlHighlightRules; +var LuaHighlightRules = acequire("./lua_highlight_rules").LuaHighlightRules; + +var LuaPageHighlightRules = function() { + HtmlHighlightRules.call(this); + + var startRules = [ + { + token: "keyword", + regex: "<\\%\\=?", + push: "lua-start" + }, { + token: "keyword", + regex: "<\\?lua\\=?", + push: "lua-start" + } + ]; + + var endRules = [ + { + token: "keyword", + regex: "\\%>", + next: "pop" + }, { + token: "keyword", + regex: "\\?>", + next: "pop" + } + ]; + + this.embedRules(LuaHighlightRules, "lua-", endRules, ["start"]); + + for (var key in this.$rules) + this.$rules[key].unshift.apply(this.$rules[key], startRules); + + this.normalizeRules(); +}; + +oop.inherits(LuaPageHighlightRules, HtmlHighlightRules); + +exports.LuaPageHighlightRules = LuaPageHighlightRules; + +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/brace/mode/lucene.js b/pitfall/pdfkit/node_modules/brace/mode/lucene.js new file mode 100644 index 00000000..8d8026a0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/lucene.js @@ -0,0 +1,64 @@ +ace.define('ace/mode/lucene', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/lucene_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var LuceneHighlightRules = acequire("./lucene_highlight_rules").LuceneHighlightRules; + +var Mode = function() { + this.$tokenizer = new Tokenizer(new LuceneHighlightRules().getRules()); +}; + +oop.inherits(Mode, TextMode); + +exports.Mode = Mode; +});ace.define('ace/mode/lucene_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var LuceneHighlightRules = function() { + this.$rules = { + "start" : [ + { + token : "constant.character.negation", + regex : "[\\-]" + }, { + token : "constant.character.interro", + regex : "[\\?]" + }, { + token : "constant.character.asterisk", + regex : "[\\*]" + }, { + token: 'constant.character.proximity', + regex: '~[0-9]+\\b' + }, { + token : 'keyword.operator', + regex: '(?:AND|OR|NOT)\\b' + }, { + token : "paren.lparen", + regex : "[\\(]" + }, { + token : "paren.rparen", + regex : "[\\)]" + }, { + token : "keyword", + regex : "[\\S]+:" + }, { + token : "string", // " string + regex : '".*?"' + }, { + token : "text", + regex : "\\s+" + } + ] + }; +}; + +oop.inherits(LuceneHighlightRules, TextHighlightRules); + +exports.LuceneHighlightRules = LuceneHighlightRules; +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/makefile.js b/pitfall/pdfkit/node_modules/brace/mode/makefile.js new file mode 100644 index 00000000..58be84fb --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/makefile.js @@ -0,0 +1,331 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2012, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * Contributor(s): + * + * + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/makefile', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/makefile_highlight_rules', 'ace/mode/folding/coffee'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var MakefileHighlightRules = acequire("./makefile_highlight_rules").MakefileHighlightRules; +var FoldMode = acequire("./folding/coffee").FoldMode; + +var Mode = function() { + this.HighlightRules = MakefileHighlightRules; + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "#"; + this.$indentWithTabs = true; + +}).call(Mode.prototype); + +exports.Mode = Mode; +});ace.define('ace/mode/makefile_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules', 'ace/mode/sh_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var ShHighlightFile = acequire("./sh_highlight_rules"); + +var MakefileHighlightRules = function() { + + var keywordMapper = this.createKeywordMapper({ + "keyword": ShHighlightFile.reservedKeywords, + "support.function.builtin": ShHighlightFile.languageConstructs, + "invalid.deprecated": "debugger" + }, "string"); + + this.$rules = + { + "start": [ + { + token: "string.interpolated.backtick.makefile", + regex: "`", + next: "shell-start" + }, + { + token: "punctuation.definition.comment.makefile", + regex: /#(?=.)/, + next: "comment" + }, + { + token: [ "keyword.control.makefile"], + regex: "^(?:\\s*\\b)(\\-??include|ifeq|ifneq|ifdef|ifndef|else|endif|vpath|export|unexport|define|endef|override)(?:\\b)" + }, + {// ^([^\t ]+(\s[^\t ]+)*:(?!\=))\s*.* + token: ["entity.name.function.makefile", "text"], + regex: "^([^\\t ]+(?:\\s[^\\t ]+)*:)(\\s*.*)" + } + ], + "comment": [ + { + token : "punctuation.definition.comment.makefile", + regex : /.+\\/ + }, + { + token : "punctuation.definition.comment.makefile", + regex : ".+", + next : "start" + } + ], + "shell-start": [ + { + token: keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, + { + token: "string", + regex : "\\w+" + }, + { + token : "string.interpolated.backtick.makefile", + regex : "`", + next : "start" + } + ] +} + +}; + +oop.inherits(MakefileHighlightRules, TextHighlightRules); + +exports.MakefileHighlightRules = MakefileHighlightRules; +}); + +ace.define('ace/mode/sh_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var reservedKeywords = exports.reservedKeywords = ( + '!|{|}|case|do|done|elif|else|'+ + 'esac|fi|for|if|in|then|until|while|'+ + '&|;|export|local|read|typeset|unset|'+ + 'elif|select|set' + ); + +var languageConstructs = exports.languageConstructs = ( + '[|]|alias|bg|bind|break|builtin|'+ + 'cd|command|compgen|complete|continue|'+ + 'dirs|disown|echo|enable|eval|exec|'+ + 'exit|fc|fg|getopts|hash|help|history|'+ + 'jobs|kill|let|logout|popd|printf|pushd|'+ + 'pwd|return|set|shift|shopt|source|'+ + 'suspend|test|times|trap|type|ulimit|'+ + 'umask|unalias|wait' +); + +var ShHighlightRules = function() { + var keywordMapper = this.createKeywordMapper({ + "keyword": reservedKeywords, + "support.function.builtin": languageConstructs, + "invalid.deprecated": "debugger" + }, "identifier"); + + var integer = "(?:(?:[1-9]\\d*)|(?:0))"; + + var fraction = "(?:\\.\\d+)"; + var intPart = "(?:\\d+)"; + var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; + var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + ")"; + var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; + var fileDescriptor = "(?:&" + intPart + ")"; + + var variableName = "[a-zA-Z][a-zA-Z0-9_]*"; + var variable = "(?:(?:\\$" + variableName + ")|(?:" + variableName + "=))"; + + var builtinVariable = "(?:\\$(?:SHLVL|\\$|\\!|\\?))"; + + var func = "(?:" + variableName + "\\s*\\(\\))"; + + this.$rules = { + "start" : [{ + token : "constant", + regex : /\\./ + }, { + token : ["text", "comment"], + regex : /(^|\s)(#.*)$/ + }, { + token : "string", + regex : '"', + push : [{ + token : "constant.language.escape", + regex : /\\(?:[$abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/ + }, { + token : "constant", + regex : /\$\w+/ + }, { + token : "string", + regex : '"', + next: "pop" + }, { + defaultToken: "string" + }] + }, { + token : "variable.language", + regex : builtinVariable + }, { + token : "variable", + regex : variable + }, { + token : "support.function", + regex : func + }, { + token : "support.function", + regex : fileDescriptor + }, { + token : "string", // ' string + start : "'", end : "'" + }, { + token : "constant.numeric", // float + regex : floatNumber + }, { + token : "constant.numeric", // integer + regex : integer + "\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator", + regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=" + }, { + token : "paren.lparen", + regex : "[\\[\\(\\{]" + }, { + token : "paren.rparen", + regex : "[\\]\\)\\}]" + } ] + }; + + this.normalizeRules(); +}; + +oop.inherits(ShHighlightRules, TextHighlightRules); + +exports.ShHighlightRules = ShHighlightRules; +}); + +ace.define('ace/mode/folding/coffee', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var BaseFoldMode = acequire("./fold_mode").FoldMode; +var Range = acequire("../../range").Range; + +var FoldMode = exports.FoldMode = function() {}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var range = this.indentationBlock(session, row); + if (range) + return range; + + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1 || line[startLevel] != "#") + return; + + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + + while (++row < maxRow) { + line = session.getLine(row); + var level = line.search(re); + + if (level == -1) + continue; + + if (line[level] != "#") + break; + + endRow = row; + } + + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + + if (prevIndent!= -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + + if (indent < nextIndent) + return "start"; + else + return ""; + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/markdown.js b/pitfall/pdfkit/node_modules/brace/mode/markdown.js new file mode 100644 index 00000000..06639ab8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/markdown.js @@ -0,0 +1,2714 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/markdown', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/xml', 'ace/mode/html', 'ace/tokenizer', 'ace/mode/markdown_highlight_rules', 'ace/mode/folding/markdown'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var JavaScriptMode = acequire("./javascript").Mode; +var XmlMode = acequire("./xml").Mode; +var HtmlMode = acequire("./html").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var MarkdownHighlightRules = acequire("./markdown_highlight_rules").MarkdownHighlightRules; +var MarkdownFoldMode = acequire("./folding/markdown").FoldMode; + +var Mode = function() { + this.HighlightRules = MarkdownHighlightRules; + + this.createModeDelegates({ + "js-": JavaScriptMode, + "xml-": XmlMode, + "html-": HtmlMode + }); + + this.foldingRules = new MarkdownFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + this.type = "text"; + this.lineCommentStart = ">"; + + this.getNextLineIndent = function(state, line, tab) { + if (state == "listblock") { + var match = /^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(line); + if (!match) + return ""; + var marker = match[2]; + if (!marker) + marker = parseInt(match[3], 10) + 1 + "."; + return match[1] + marker + match[4]; + } else { + return this.$getIndent(line); + } + }; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/javascript', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = JavaScriptHighlightRules; + + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/javascript"), "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + + worker.on("jslint", function(results) { + session.setAnnotations(results.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/javascript_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var JavaScriptHighlightRules = function() { + var keywordMapper = this.createKeywordMapper({ + "variable.language": + "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document" , // Pseudo + "keyword": + "const|yield|import|get|set|" + + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", + "storage.type": + "const|let|var|function", + "constant.language": + "null|Infinity|NaN|undefined", + "support.function": + "alert", + "constant.language.boolean": "true|false" + }, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; + + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-6][0-7]?|" + // oct + "37[0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + + this.$rules = { + "no_regex" : [ + { + token : "comment", + regex : "\\/\\/", + next : "line_comment" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : /\/\*/, + next : "comment" + }, { + token : "string", + regex : "'(?=.)", + next : "qstring" + }, { + token : "string", + regex : '"(?=.)', + next : "qqstring" + }, { + token : "constant.numeric", // hex + regex : /0[xX][0-9a-fA-F]+\b/ + }, { + token : "constant.numeric", // float + regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ + }, { + token : [ + "storage.type", "punctuation.operator", "support.function", + "punctuation.operator", "entity.name.function", "text","keyword.operator" + ], + regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "paren.lparen" + ], + regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "text", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : "keyword", + regex : "(?:" + kwBeforeRe + ")\\b", + next : "start" + }, { + token : ["punctuation.operator", "support.function"], + regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token : ["punctuation.operator", "support.function.dom"], + regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token : ["punctuation.operator", "support.constant"], + regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token : ["storage.type", "punctuation.operator", "support.function.firebug"], + regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/ + }, { + token : keywordMapper, + regex : identifierRe + }, { + token : "keyword.operator", + regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, + next : "start" + }, { + token : "punctuation.operator", + regex : /\?|\:|\,|\;|\./, + next : "start" + }, { + token : "paren.lparen", + regex : /[\[({]/, + next : "start" + }, { + token : "paren.rparen", + regex : /[\])}]/ + }, { + token : "keyword.operator", + regex : /\/=?/, + next : "start" + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment_regex_allowed" + }, { + token : "comment", + regex : "\\/\\/", + next : "line_comment_regex_allowed" + }, { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token : "text", + regex : "\\s+|^$", + next : "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/\\w*", + next: "no_regex" + }, { + token : "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token : "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/ + }, { + token : "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "function_arguments": [ + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "[, ]+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "comment_regex_allowed" : [ + {token : "comment", regex : "\\*\\/", next : "start"}, + {defaultToken : "comment"} + ], + "comment" : [ + {token : "comment", regex : "\\*\\/", next : "no_regex"}, + {defaultToken : "comment"} + ], + "line_comment_regex_allowed" : [ + {token : "comment", regex : "$|^", next : "start"}, + {defaultToken : "comment"} + ], + "line_comment" : [ + {token : "comment", regex : "$|^", next : "no_regex"}, + {defaultToken : "comment"} + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qqstring" + }, { + token : "string", + regex : '"|$', + next : "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qstring" + }, { + token : "string", + regex : "'|$", + next : "no_regex" + }, { + defaultToken: "string" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("no_regex") ]); +}; + +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); + +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); + +ace.define('ace/mode/xml', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/xml_highlight_rules', 'ace/mode/behaviour/xml', 'ace/mode/folding/xml'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var XmlHighlightRules = acequire("./xml_highlight_rules").XmlHighlightRules; +var XmlBehaviour = acequire("./behaviour/xml").XmlBehaviour; +var XmlFoldMode = acequire("./folding/xml").FoldMode; + +var Mode = function() { + this.HighlightRules = XmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.foldingRules = new XmlFoldMode(); +}; + +oop.inherits(Mode, TextMode); + +(function() { + + this.blockComment = {start: ""}; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/xml_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var xmlUtil = acequire("./xml_util"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var XmlHighlightRules = function(normalize) { + this.$rules = { + start : [ + {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"}, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration" + }, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction" + }, + {token : "comment", regex : "<\\!--", next : "comment"}, + { + token : ["punctuation.doctype.begin", "meta.tag.doctype"], + regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype" + }, + {include : "tag"}, + {include : "reference"} + ], + + xml_declaration : [ + {include : "attributes"}, + {include : "instruction"} + ], + + instruction : [ + {token : "punctuation.instruction.end", regex : "\\?>", next : "start"} + ], + + doctype : [ + {include : "space"}, + {include : "string"}, + {token : "punctuation.doctype.end", regex : ">", next : "start"}, + {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"}, + {token : "punctuation.begin", regex : "\\[", push : "declarations"} + ], + + declarations : [{ + token : "text", + regex : "\\s+" + }, { + token: "punctuation.end", + regex: "]", + next: "pop" + }, { + token : ["punctuation.begin", "keyword"], + regex : "(<\\!)([-_a-zA-Z0-9]+)", + push : [{ + token : "text", + regex : "\\s+" + }, + { + token : "punctuation.end", + regex : ">", + next : "pop" + }, + {include : "string"}] + }], + + cdata : [ + {token : "string.end", regex : "\\]\\]>", next : "start"}, + {token : "text", regex : "\\s+"}, + {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"} + ], + + comment : [ + {token : "comment", regex : "-->", next : "start"}, + {defaultToken : "comment"} + ], + + tag : [{ + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)", + next: [ + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"} + ] + }, { + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(", next : "start"} + ] + }], + + space : [ + {token : "text", regex : "\\s+"} + ], + + reference : [{ + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, { + token : "invalid.illegal", regex : "&" + }], + + string: [{ + token : "string", + regex : "'", + push : "qstring_inner" + }, { + token : "string", + regex : '"', + push : "qqstring_inner" + }], + + qstring_inner: [ + {token : "string", regex: "'", next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + qqstring_inner: [ + {token : "string", regex: '"', next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + attributes: [{ + token : "entity.other.attribute-name", + regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" + }, { + token : "keyword.operator.separator", + regex : "=" + }, { + include : "space" + }, { + include : "string" + }] + }; + + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; + + +(function() { + + this.embedTagRules = function(HighlightRules, prefix, tag){ + this.$rules.tag.unshift({ + token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(<)(" + tag + ")", + next: [ + {include : "space"}, + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"} + ] + }); + + this.$rules[tag + "-end"] = [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next: "start", + onMatch : function(value, currentState, stack) { + stack.splice(0); + return this.token; + }} + ] + + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(" + }]); + }; + +}).call(TextHighlightRules.prototype); + +oop.inherits(XmlHighlightRules, TextHighlightRules); + +exports.XmlHighlightRules = XmlHighlightRules; +}); + +ace.define('ace/mode/xml_util', ["require", 'exports', 'module' ], function(acequire, exports, module) { + + +function string(state) { + return [{ + token : "string", + regex : '"', + next : state + "_qqstring" + }, { + token : "string", + regex : "'", + next : state + "_qstring" + }]; +} + +function multiLineString(quote, state) { + return [ + {token : "string", regex : quote, next : state}, + { + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, + {defaultToken : "string"} + ]; +} + +exports.tag = function(states, name, nextState, tagMap) { + states[name] = [{ + token : "text", + regex : "\\s+" + }, { + + token : !tagMap ? "meta.tag.tag-name" : function(value) { + if (tagMap[value]) + return "meta.tag.tag-name." + tagMap[value]; + else + return "meta.tag.tag-name"; + }, + regex : "[-_a-zA-Z0-9:]+", + next : name + "_embed_attribute_list" + }, { + token: "empty", + regex: "", + next : name + "_embed_attribute_list" + }]; + + states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list"); + states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list"); + + states[name + "_embed_attribute_list"] = [{ + token : "meta.tag.r", + regex : "/?>", + next : nextState + }, { + token : "keyword.operator", + regex : "=" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "text", + regex : "\\s+" + }].concat(string(name)); +}; + +}); + +ace.define('ace/mode/behaviour/xml', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); + return hasType; +} + +var XmlBehaviour = function () { + + this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour + + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getCursorPosition(); + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken(); + + if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column) + return; + var atCursor = false; + if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text'))); + } else { + atCursor = true; + } + if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) { + return; + } + var tag = token.value; + if (atCursor){ + var tag = tag.substring(0, position.column - token.start); + } + + return { + text: '>' + '', + selection: [1, 1] + } + } + }); + + this.add('autoindent', 'insertion', function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var rightChars = line.substring(cursor.column, cursor.column + 2); + if (rightChars == '?)/; + this._parseTag = function(tag) { + + var match = tag.match(this.tagRe); + var column = 0; + + return { + value: tag, + match: match ? match[2] : "", + closing: match ? !!match[3] : false, + selfClosing: match ? !!match[5] || match[2] == "/>" : false, + tagName: match ? match[4] : "", + column: match[1] ? column + match[1].length : column + }; + }; + this._readTagForward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var value = ""; + var start; + + do { + if (token.type.lastIndexOf("meta.tag", 0) === 0) { + if (!start) { + var start = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + }; + } + value += token.value; + if (value.indexOf(">") !== -1) { + var tag = this._parseTag(value); + tag.start = start; + tag.end = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + token.value.length + }; + iterator.stepForward(); + return tag; + } + } + } while(token = iterator.stepForward()); + + return null; + }; + + this._readTagBackward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var value = ""; + var end; + + do { + if (token.type.lastIndexOf("meta.tag", 0) === 0) { + if (!end) { + end = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + token.value.length + }; + } + value = token.value + value; + if (value.indexOf("<") !== -1) { + var tag = this._parseTag(value); + tag.end = end; + tag.start = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + }; + iterator.stepBackward(); + return tag; + } + } + } while(token = iterator.stepBackward()); + + return null; + }; + + this._pop = function(stack, tag) { + while (stack.length) { + + var top = stack[stack.length-1]; + if (!tag || top.tagName == tag.tagName) { + return stack.pop(); + } + else if (this.voidElements[tag.tagName]) { + return; + } + else if (this.voidElements[top.tagName]) { + stack.pop(); + continue; + } else { + return null; + } + } + }; + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + + if (!firstTag.match) + return null; + + var isBackward = firstTag.closing || firstTag.selfClosing; + var stack = []; + var tag; + + if (!isBackward) { + var iterator = new TokenIterator(session, row, firstTag.column); + var start = { + row: row, + column: firstTag.column + firstTag.tagName.length + 2 + }; + while (tag = this._readTagForward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) + return Range.fromPoints(start, tag.start); + } + else { + stack.push(tag) + } + } + } + else { + var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length); + var end = { + row: row, + column: firstTag.column + }; + + while (tag = this._readTagBackward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (!tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) { + tag.start.column += tag.tagName.length + 2; + return Range.fromPoints(tag.start, end); + } + } + else { + stack.push(tag) + } + } + } + + }; + +}).call(FoldMode.prototype); + +}); + +ace.define('ace/mode/html', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/css', 'ace/tokenizer', 'ace/mode/html_highlight_rules', 'ace/mode/behaviour/html', 'ace/mode/folding/html', 'ace/mode/html_completions'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var JavaScriptMode = acequire("./javascript").Mode; +var CssMode = acequire("./css").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var HtmlHighlightRules = acequire("./html_highlight_rules").HtmlHighlightRules; +var HtmlBehaviour = acequire("./behaviour/html").HtmlBehaviour; +var HtmlFoldMode = acequire("./folding/html").FoldMode; +var HtmlCompletions = acequire("./html_completions").HtmlCompletions; + +var Mode = function() { + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new HtmlBehaviour(); + this.$completer = new HtmlCompletions(); + + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + + this.foldingRules = new HtmlFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.blockComment = {start: ""}; + + this.getNextLineIndent = function(state, line, tab) { + return this.$getIndent(line); + }; + + this.checkOutdent = function(state, line, input) { + return false; + }; + + this.getCompletions = function(state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/css', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/behaviour/css', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var CssHighlightRules = acequire("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var CssBehaviour = acequire("./behaviour/css").CssBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.foldingRules = "cStyle"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/css"), "Worker"); + worker.attachToDocument(session.getDocument()); + + worker.on("csslint", function(e) { + session.setAnnotations(e.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; + +}); + +ace.define('ace/mode/css_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; + +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|acequired|root|target|valid|visited)\\b"; + +var CssHighlightRules = function() { + + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + + this.$rules = { + "start" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "@.*?{", + push: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "media" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "\\}", + next: "pop" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "comment" : [{ + token : "comment", + regex : "\\*\\/", + next : "pop" + }, { + defaultToken : "comment" + }], + + "ruleset" : [ + { + token : "paren.rparen", + regex : "\\}", + next: "pop" + }, { + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : ["constant.numeric", "keyword"], + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + }, { + token : "constant.numeric", + regex : numRe + }, { + token : "constant.numeric", // hex6 color + regex : "#[a-f0-9]{6}" + }, { + token : "constant.numeric", // hex3 color + regex : "#[a-f0-9]{3}" + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex : pseudoElements + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex : pseudoClasses + }, { + token : ["support.function", "string", "support.function"], + regex : "(url\\()(.*)(\\))" + }, { + token : keywordMapper, + regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + caseInsensitive: true + }] + }; + + this.normalizeRules(); +}; + +oop.inherits(CssHighlightRules, TextHighlightRules); + +exports.CssHighlightRules = CssHighlightRules; + +}); + +ace.define('ace/mode/behaviour/css', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + +var CssBehaviour = function () { + + this.inherit(CstyleBehaviour); + + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + } + } + if (!line.substring(cursor.column).match(/^\s*;/)) { + return { + text: ':;', + selection: [1, 1] + } + } + } + } + }); + + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column ++; + return range; + } + } + } + }); + + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + } + } + } + }); + +} +oop.inherits(CssBehaviour, CstyleBehaviour); + +exports.CssBehaviour = CssBehaviour; +}); + +ace.define('ace/mode/html_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var CssHighlightRules = acequire("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = acequire("./xml_highlight_rules").XmlHighlightRules; + +var tagMap = lang.createMap({ + a : 'anchor', + button : 'form', + form : 'form', + img : 'image', + input : 'form', + label : 'form', + option : 'form', + script : 'script', + select : 'form', + textarea : 'form', + style : 'style', + table : 'table', + tbody : 'table', + td : 'table', + tfoot : 'table', + th : 'table', + tr : 'table' +}); + +var HtmlHighlightRules = function() { + XmlHighlightRules.call(this); + + this.addRules({ + attributes: [{ + include : "space" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "keyword.operator.separator", + regex : "=", + push : [{ + include: "space" + }, { + token : "string", + regex : "[^<>='\"`\\s]+", + next : "pop" + }, { + token : "empty", + regex : "", + next : "pop" + }] + }, { + include : "string" + }], + tag: [{ + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation.begin", + "meta.tag.name" + (group ? "." + group : "")]; + }, + regex : "(<)([-_a-zA-Z0-9:]+)", + next: "start_tag_stuff" + }, { + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation.begin", + "meta.tag.name" + (group ? "." + group : "")]; + }, + regex : "(", next : "start"} + ], + end_tag_stuff: [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next : "start"} + ] + }); + + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); + + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; + +oop.inherits(HtmlHighlightRules, XmlHighlightRules); + +exports.HtmlHighlightRules = HtmlHighlightRules; +}); + +ace.define('ace/mode/behaviour/html', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour/xml', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var XmlBehaviour = acequire("../behaviour/xml").XmlBehaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var voidElements = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr']; + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); + return hasType; +} + +var HtmlBehaviour = function () { + + this.inherit(XmlBehaviour); // Get xml behaviour + + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getCursorPosition(); + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken(); + + if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column) + return; + var atCursor = false; + if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text'))); + } else { + atCursor = true; + } + if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) { + return; + } + var element = token.value; + if (atCursor){ + var element = element.substring(0, position.column - token.start); + } + if (voidElements.indexOf(element) !== -1){ + return; + } + return { + text: '>' + '', + selection: [1, 1] + } + } + }); +} +oop.inherits(HtmlBehaviour, XmlBehaviour); + +exports.HtmlBehaviour = HtmlBehaviour; +}); + +ace.define('ace/mode/folding/html', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/mixed', 'ace/mode/folding/xml', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var MixedFoldMode = acequire("./mixed").FoldMode; +var XmlFoldMode = acequire("./xml").FoldMode; +var CStyleFoldMode = acequire("./cstyle").FoldMode; + +var FoldMode = exports.FoldMode = function() { + MixedFoldMode.call(this, new XmlFoldMode({ + "area": 1, + "base": 1, + "br": 1, + "col": 1, + "command": 1, + "embed": 1, + "hr": 1, + "img": 1, + "input": 1, + "keygen": 1, + "link": 1, + "meta": 1, + "param": 1, + "source": 1, + "track": 1, + "wbr": 1, + "li": 1, + "dt": 1, + "dd": 1, + "p": 1, + "rt": 1, + "rp": 1, + "optgroup": 1, + "option": 1, + "colgroup": 1, + "td": 1, + "th": 1 + }), { + "js-": new CStyleFoldMode(), + "css-": new CStyleFoldMode() + }); +}; + +oop.inherits(FoldMode, MixedFoldMode); + +}); + +ace.define('ace/mode/folding/mixed', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(defaultMode, subModes) { + this.defaultMode = defaultMode; + this.subModes = subModes; +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + + this.$getMode = function(state) { + if (typeof state != "string") + state = state[0]; + for (var key in this.subModes) { + if (state.indexOf(key) === 0) + return this.subModes[key]; + } + return null; + }; + + this.$tryMode = function(state, session, foldStyle, row) { + var mode = this.$getMode(state); + return (mode ? mode.getFoldWidget(session, foldStyle, row) : ""); + }; + + this.getFoldWidget = function(session, foldStyle, row) { + return ( + this.$tryMode(session.getState(row-1), session, foldStyle, row) || + this.$tryMode(session.getState(row), session, foldStyle, row) || + this.defaultMode.getFoldWidget(session, foldStyle, row) + ); + }; + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var mode = this.$getMode(session.getState(row-1)); + + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.$getMode(session.getState(row)); + + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.defaultMode; + + return mode.getFoldWidgetRange(session, foldStyle, row); + }; + +}).call(FoldMode.prototype); + +}); + +ace.define('ace/mode/html_completions', ["require", 'exports', 'module' , 'ace/token_iterator'], function(acequire, exports, module) { + + +var TokenIterator = acequire("../token_iterator").TokenIterator; + +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; + +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; + +var globalAttributes = commonAttributes.concat(eventAttributes); + +var attributeMap = { + "html": ["manifest"], + "head": [], + "title": [], + "base": ["href", "target"], + "link": ["href", "hreflang", "rel", "media", "type", "sizes"], + "meta": ["http-equiv", "name", "content", "charset"], + "style": ["type", "media", "scoped"], + "script": ["charset", "type", "src", "defer", "async"], + "noscript": ["href"], + "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"], + "section": [], + "nav": [], + "article": ["pubdate"], + "aside": [], + "h1": [], + "h2": [], + "h3": [], + "h4": [], + "h5": [], + "h6": [], + "header": [], + "footer": [], + "address": [], + "main": [], + "p": [], + "hr": [], + "pre": [], + "blockquote": ["cite"], + "ol": ["start", "reversed"], + "ul": [], + "li": ["value"], + "dl": [], + "dt": [], + "dd": [], + "figure": [], + "figcaption": [], + "div": [], + "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"], + "em": [], + "strong": [], + "small": [], + "s": [], + "cite": [], + "q": ["cite"], + "dfn": [], + "abbr": [], + "data": [], + "time": ["datetime"], + "code": [], + "var": [], + "samp": [], + "kbd": [], + "sub": [], + "sup": [], + "i": [], + "b": [], + "u": [], + "mark": [], + "ruby": [], + "rt": [], + "rp": [], + "bdi": [], + "bdo": [], + "span": [], + "br": [], + "wbr": [], + "ins": ["cite", "datetime"], + "del": ["cite", "datetime"], + "img": ["alt", "src", "height", "width", "usemap", "ismap"], + "iframe": ["name", "src", "height", "width", "sandbox", "seamless"], + "embed": ["src", "height", "width", "type"], + "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"], + "param": ["name", "value"], + "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"], + "audio": ["src", "autobuffer", "autoplay", "loop", "controls"], + "source": ["src", "type", "media"], + "track": ["kind", "src", "srclang", "label", "default"], + "canvas": ["width", "height"], + "map": ["name"], + "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"], + "svg": [], + "math": [], + "table": ["summary"], + "caption": [], + "colgroup": ["span"], + "col": ["span"], + "tbody": [], + "thead": [], + "tfoot": [], + "tr": [], + "td": ["headers", "rowspan", "colspan"], + "th": ["headers", "rowspan", "colspan", "scope"], + "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"], + "fieldset": ["disabled", "form", "name"], + "legend": [], + "label": ["form", "for"], + "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "acequired", "size", "src", "step", "width", "files", "value"], + "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"], + "select": ["autofocus", "disabled", "form", "multiple", "name", "size"], + "datalist": [], + "optgroup": ["disabled", "label"], + "option": ["disabled", "selected", "label", "value"], + "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "acequired", "rows", "cols", "wrap"], + "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"], + "output": ["for", "form", "name"], + "progress": ["value", "max"], + "meter": ["value", "min", "max", "low", "high", "optimum"], + "details": ["open"], + "summary": [], + "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"], + "menu": ["type", "label"], + "dialog": ["open"] +}; + +var allElements = Object.keys(attributeMap); + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); +} + +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + if (!token || !hasType(token, 'tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'operator') || hasType(token, 'attribute-name') || hasType(token, 'text'))); + } + if (token && hasType(token, 'tag-name') && !iterator.stepBackward().value.match('/')) + return token.value; +} + +var HtmlCompletions = function() { + +}; + +(function() { + + this.getCompletions = function(state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + + if (!token) + return []; + if (hasType(token, "tag-name") || (token.value == '<' && hasType(token, "text"))) + return this.getTagCompletions(state, session, pos, prefix); + if (hasType(token, 'text') || hasType(token, 'attribute-name')) + return this.getAttributeCompetions(state, session, pos, prefix); + + return []; + }; + + this.getTagCompletions = function(state, session, pos, prefix) { + var elements = allElements; + if (prefix) { + elements = elements.filter(function(element){ + return element.indexOf(prefix) === 0; + }); + } + return elements.map(function(element){ + return { + value: element, + meta: "tag" + }; + }); + }; + + this.getAttributeCompetions = function(state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(attributeMap[tagName]); + } + if (prefix) { + attributes = attributes.filter(function(attribute){ + return attribute.indexOf(prefix) === 0; + }); + } + return attributes.map(function(attribute){ + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute" + }; + }); + }; + +}).call(HtmlCompletions.prototype); + +exports.HtmlCompletions = HtmlCompletions; +}); + +ace.define('ace/mode/markdown_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules', 'ace/mode/html_highlight_rules', 'ace/mode/css_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = acequire("./xml_highlight_rules").XmlHighlightRules; +var HtmlHighlightRules = acequire("./html_highlight_rules").HtmlHighlightRules; +var CssHighlightRules = acequire("./css_highlight_rules").CssHighlightRules; + +var escaped = function(ch) { + return "(?:[^" + lang.escapeRegExp(ch) + "\\\\]|\\\\.)*"; +} + +function github_embed(tag, prefix) { + return { // Github style block + token : "support.function", + regex : "^```" + tag + "\\s*$", + push : prefix + "start" + }; +} + +var MarkdownHighlightRules = function() { + HtmlHighlightRules.call(this); + + this.$rules["start"].unshift({ + token : "empty_line", + regex : '^$', + next: "allowBlock" + }, { // h1 + token: "markup.heading.1", + regex: "^=+(?=\\s*$)" + }, { // h2 + token: "markup.heading.2", + regex: "^\\-+(?=\\s*$)" + }, { + token : function(value) { + return "markup.heading." + value.length; + }, + regex : /^#{1,6}(?=\s*[^ #]|\s+#.)/, + next : "header" + }, + github_embed("(?:javascript|js)", "jscode-"), + github_embed("xml", "xmlcode-"), + github_embed("html", "htmlcode-"), + github_embed("css", "csscode-"), + { // Github style block + token : "support.function", + regex : "^```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$", + next : "githubblock" + }, { // block quote + token : "string.blockquote", + regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+", + next : "blockquote" + }, { // HR * - _ + token : "constant", + regex : "^ {0,2}(?:(?: ?\\* ?){3,}|(?: ?\\- ?){3,}|(?: ?\\_ ?){3,})\\s*$", + next: "allowBlock" + }, { // list + token : "markup.list", + regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+", + next : "listblock-start" + }, { + include : "basic" + }); + + this.addRules({ + "basic" : [{ + token : "constant.language.escape", + regex : /\\[\\`*_{}\[\]()#+\-.!]/ + }, { // code span ` + token : "support.function", + regex : "(`+)(.*?[^`])(\\1)" + }, { // reference + token : ["text", "constant", "text", "url", "string", "text"], + regex : "^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:[\"][^\"]+[\"])?(\\s*))$" + }, { // link by reference + token : ["text", "string", "text", "constant", "text"], + regex : "(\\[)(" + escaped("]") + ")(\\]\s*\\[)("+ escaped("]") + ")(\\])" + }, { // link by url + token : ["text", "string", "text", "markup.underline", "string", "text"], + regex : "(\\[)(" + // [ + escaped("]") + // link text + ")(\\]\\()"+ // ]( + '((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)' + // href + '(\\s*"' + escaped('"') + '"\\s*)?' + // "title" + "(\\))" // ) + }, { // strong ** __ + token : "string.strong", + regex : "([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)" + }, { // emphasis * _ + token : "string.emphasis", + regex : "([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)" + }, { // + token : ["text", "url", "text"], + regex : "(<)("+ + "(?:https?|ftp|dict):[^'\">\\s]+"+ + "|"+ + "(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+"+ + ")(>)" + }], + "allowBlock": [ + {token : "support.function", regex : "^ {4}.+", next : "allowBlock"}, + {token : "empty", regex : "", next : "start"} + ], + + "header" : [{ + regex: "$", + next : "start" + }, { + include: "basic" + }, { + defaultToken : "heading" + } ], + + "listblock-start" : [{ + token : "support.variable", + regex : /(?:\[[ x]\])?/, + next : "listblock" + }], + + "listblock" : [ { // Lists only escape on completely blank lines. + token : "empty_line", + regex : "^$", + next : "start" + }, { // list + token : "markup.list", + regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+", + next : "listblock-start" + }, { + include : "basic", noEscape: true + }, { + defaultToken : "list" //do not use markup.list to allow stling leading `*` differntly + } ], + + "blockquote" : [ { // BLockquotes only escape on blank lines. + token : "empty_line", + regex : "^\\s*$", + next : "start" + }, { // block quote + token : "string.blockquote", + regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+", + next : "blockquote" + }, { + include : "basic", noEscape: true + }, { + defaultToken : "string.blockquote" + } ], + + "githubblock" : [ { + token : "support.function", + regex : "^```", + next : "start" + }, { + token : "support.function", + regex : ".+" + } ] + }); + + this.embedRules(JavaScriptHighlightRules, "jscode-", [{ + token : "support.function", + regex : "^```", + next : "pop" + }]); + + this.embedRules(HtmlHighlightRules, "htmlcode-", [{ + token : "support.function", + regex : "^```", + next : "pop" + }]); + + this.embedRules(CssHighlightRules, "csscode-", [{ + token : "support.function", + regex : "^```", + next : "pop" + }]); + + this.embedRules(XmlHighlightRules, "xmlcode-", [{ + token : "support.function", + regex : "^```", + next : "pop" + }]); + + this.normalizeRules(); +}; +oop.inherits(MarkdownHighlightRules, TextHighlightRules); + +exports.MarkdownHighlightRules = MarkdownHighlightRules; +}); + +ace.define('ace/mode/folding/markdown', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var BaseFoldMode = acequire("./fold_mode").FoldMode; +var Range = acequire("../../range").Range; + +var FoldMode = exports.FoldMode = function() {}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + this.foldingStartMarker = /^(?:[=-]+\s*$|#{1,6} |`{3})/; + + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + if (!this.foldingStartMarker.test(line)) + return ""; + + if (line[0] == "`") { + if (session.bgTokenizer.getState(row) == "start") + return "end"; + return "start"; + } + + return "start"; + }; + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var line = session.getLine(row); + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + if (!line.match(this.foldingStartMarker)) + return; + + if (line[0] == "`") { + if (session.bgTokenizer.getState(row) !== "start") { + while (++row < maxRow) { + line = session.getLine(row); + if (line[0] == "`" & line.substring(0, 3) == "```") + break; + } + return new Range(startRow, startColumn, row, 0); + } else { + while (row -- > 0) { + line = session.getLine(row); + if (line[0] == "`" & line.substring(0, 3) == "```") + break; + } + return new Range(row, line.length, startRow, 0); + } + } + + var token; + function isHeading(row) { + token = session.getTokens(row)[0]; + return token && token.type.lastIndexOf(heading, 0) === 0; + } + + var heading = "markup.heading"; + function getLevel() { + var ch = token.value[0]; + if (ch == "=") return 6; + if (ch == "-") return 5; + return 7 - token.value.search(/[^#]/); + } + + if (isHeading(row)) { + var startHeadingLevel = getLevel(); + while (++row < maxRow) { + if (!isHeading(row)) + continue; + var level = getLevel(); + if (level >= startHeadingLevel) + break; + } + + endRow = row - (!token || ["=", "-"].indexOf(token.value[0]) == -1 ? 1 : 2); + + if (endRow > startRow) { + while (endRow > startRow && /^\s*$/.test(session.getLine(endRow))) + endRow--; + } + + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + } + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/matlab.js b/pitfall/pdfkit/node_modules/brace/mode/matlab.js new file mode 100644 index 00000000..a90efadb --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/matlab.js @@ -0,0 +1,229 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/matlab', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/matlab_highlight_rules', 'ace/range'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var MatlabHighlightRules = acequire("./matlab_highlight_rules").MatlabHighlightRules; +var Range = acequire("../range").Range; + +var Mode = function() { + this.HighlightRules = MatlabHighlightRules; +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "%"; + this.blockComment = {start: "%{", end: "%}"}; + +}).call(Mode.prototype); + +exports.Mode = Mode; + +}); + +ace.define('ace/mode/matlab_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var MatlabHighlightRules = function() { + +var keywords = ( + "break|case|catch|classdef|continue|else|elseif|end|for|function|global|if|otherwise|parfor|persistent|return|spmd|switch|try|while" + ); + + var builtinConstants = ( + "true|false|inf|Inf|nan|NaN|eps|pi|ans|nargin|nargout|varargin|varargout" + ); + + var builtinFunctions = ( + "abs|accumarray|acos(?:d|h)?|acot(?:d|h)?|acsc(?:d|h)?|actxcontrol(?:list|select)?|actxGetRunningServer|actxserver|addlistener|addpath|addpref|addtodate|"+ + "airy|align|alim|all|allchild|alpha|alphamap|amd|ancestor|and|angle|annotation|any|area|arrayfun|asec(?:d|h)?|asin(?:d|h)?|assert|assignin|atan(?:2|d|h)?|" + + "audiodevinfo|audioplayer|audiorecorder|aufinfo|auread|autumn|auwrite|avifile|aviinfo|aviread|axes|axis|balance|bar(?:3|3h|h)?|base2dec|beep|BeginInvoke|bench|"+ + "bessel(?:h|i|j|k|y)|beta|betainc|betaincinv|betaln|bicg|bicgstab|bicgstabl|bin2dec|bitand|bitcmp|bitget|bitmax|bitnot|bitor|bitset|bitshift|bitxor|blanks|blkdiag|"+ + "bone|box|brighten|brush|bsxfun|builddocsearchdb|builtin|bvp4c|bvp5c|bvpget|bvpinit|bvpset|bvpxtend|calendar|calllib|callSoapService|camdolly|cameratoolbar|camlight|"+ + "camlookat|camorbit|campan|campos|camproj|camroll|camtarget|camup|camva|camzoom|cart2pol|cart2sph|cast|cat|caxis|cd|cdf2rdf|cdfepoch|cdfinfo|cdflib(?:\.(?:close|closeVar|"+ + "computeEpoch|computeEpoch16|create|createAttr|createVar|delete|deleteAttr|deleteAttrEntry|deleteAttrgEntry|deleteVar|deleteVarRecords|epoch16Breakdown|epochBreakdown|getAttrEntry|"+ + "getAttrgEntry|getAttrMaxEntry|getAttrMaxgEntry|getAttrName|getAttrNum|getAttrScope|getCacheSize|getChecksum|getCompression|getCompressionCacheSize|getConstantNames|"+ + "getConstantValue|getCopyright|getFileBackward|getFormat|getLibraryCopyright|getLibraryVersion|getMajority|getName|getNumAttrEntries|getNumAttrgEntries|getNumAttributes|"+ + "getNumgAttributes|getReadOnlyMode|getStageCacheSize|getValidate|getVarAllocRecords|getVarBlockingFactor|getVarCacheSize|getVarCompression|getVarData|getVarMaxAllocRecNum|"+ + "getVarMaxWrittenRecNum|getVarName|getVarNum|getVarNumRecsWritten|getVarPadValue|getVarRecordData|getVarReservePercent|getVarsMaxWrittenRecNum|getVarSparseRecords|getVersion|"+ + "hyperGetVarData|hyperPutVarData|inquire|inquireAttr|inquireAttrEntry|inquireAttrgEntry|inquireVar|open|putAttrEntry|putAttrgEntry|putVarData|putVarRecordData|renameAttr|"+ + "renameVar|setCacheSize|setChecksum|setCompression|setCompressionCacheSize|setFileBackward|setFormat|setMajority|setReadOnlyMode|setStageCacheSize|setValidate|"+ + "setVarAllocBlockRecords|setVarBlockingFactor|setVarCacheSize|setVarCompression|setVarInitialRecs|setVarPadValue|SetVarReservePercent|setVarsCacheSize|setVarSparseRecords))?|"+ + "cdfread|cdfwrite|ceil|cell2mat|cell2struct|celldisp|cellfun|cellplot|cellstr|cgs|checkcode|checkin|checkout|chol|cholinc|cholupdate|circshift|cla|clabel|class|clc|clear|"+ + "clearvars|clf|clipboard|clock|close|closereq|cmopts|cmpermute|cmunique|colamd|colon|colorbar|colordef|colormap|colormapeditor|colperm|Combine|comet|comet3|commandhistory|"+ + "commandwindow|compan|compass|complex|computer|cond|condeig|condest|coneplot|conj|containers\.Map|contour(?:3|c|f|slice)?|contrast|conv|conv2|convhull|convhulln|convn|cool|"+ + "copper|copyfile|copyobj|corrcoef|cos(?:d|h)?|cot(?:d|h)?|cov|cplxpair|cputime|createClassFromWsdl|createSoapMessage|cross|csc(?:d|h)?|csvread|csvwrite|ctranspose|cumprod|"+ + "cumsum|cumtrapz|curl|customverctrl|cylinder|daqread|daspect|datacursormode|datatipinfo|date|datenum|datestr|datetick|datevec|dbclear|dbcont|dbdown|dblquad|dbmex|dbquit|"+ + "dbstack|dbstatus|dbstep|dbstop|dbtype|dbup|dde23|ddeget|ddesd|ddeset|deal|deblank|dec2base|dec2bin|dec2hex|decic|deconv|del2|delaunay|delaunay3|delaunayn|DelaunayTri|delete|"+ + "demo|depdir|depfun|det|detrend|deval|diag|dialog|diary|diff|diffuse|dir|disp|display|dither|divergence|dlmread|dlmwrite|dmperm|doc|docsearch|dos|dot|dragrect|drawnow|dsearch|"+ + "dsearchn|dynamicprops|echo|echodemo|edit|eig|eigs|ellipj|ellipke|ellipsoid|empty|enableNETfromNetworkDrive|enableservice|EndInvoke|enumeration|eomday|eq|erf|erfc|erfcinv|"+ + "erfcx|erfinv|error|errorbar|errordlg|etime|etree|etreeplot|eval|evalc|evalin|event\.(?:EventData|listener|PropertyEvent|proplistener)|exifread|exist|exit|exp|expint|expm|"+ + "expm1|export2wsdlg|eye|ezcontour|ezcontourf|ezmesh|ezmeshc|ezplot|ezplot3|ezpolar|ezsurf|ezsurfc|factor|factorial|fclose|feather|feature|feof|ferror|feval|fft|fft2|fftn|"+ + "fftshift|fftw|fgetl|fgets|fieldnames|figure|figurepalette|fileattrib|filebrowser|filemarker|fileparts|fileread|filesep|fill|fill3|filter|filter2|find|findall|findfigs|"+ + "findobj|findstr|finish|fitsdisp|fitsinfo|fitsread|fitswrite|fix|flag|flipdim|fliplr|flipud|floor|flow|fminbnd|fminsearch|fopen|format|fplot|fprintf|frame2im|fread|freqspace|"+ + "frewind|fscanf|fseek|ftell|FTP|full|fullfile|func2str|functions|funm|fwrite|fzero|gallery|gamma|gammainc|gammaincinv|gammaln|gca|gcbf|gcbo|gcd|gcf|gco|ge|genpath|genvarname|"+ + "get|getappdata|getenv|getfield|getframe|getpixelposition|getpref|ginput|gmres|gplot|grabcode|gradient|gray|graymon|grid|griddata(?:3|n)?|griddedInterpolant|gsvd|gt|gtext|"+ + "guidata|guide|guihandles|gunzip|gzip|h5create|h5disp|h5info|h5read|h5readatt|h5write|h5writeatt|hadamard|handle|hankel|hdf|hdf5|hdf5info|hdf5read|hdf5write|hdfinfo|"+ + "hdfread|hdftool|help|helpbrowser|helpdesk|helpdlg|helpwin|hess|hex2dec|hex2num|hgexport|hggroup|hgload|hgsave|hgsetget|hgtransform|hidden|hilb|hist|histc|hold|home|horzcat|"+ + "hostid|hot|hsv|hsv2rgb|hypot|ichol|idivide|ifft|ifft2|ifftn|ifftshift|ilu|im2frame|im2java|imag|image|imagesc|imapprox|imfinfo|imformats|import|importdata|imread|imwrite|"+ + "ind2rgb|ind2sub|inferiorto|info|inline|inmem|inpolygon|input|inputdlg|inputname|inputParser|inspect|instrcallback|instrfind|instrfindall|int2str|integral(?:2|3)?|interp(?:1|"+ + "1q|2|3|ft|n)|interpstreamspeed|intersect|intmax|intmin|inv|invhilb|ipermute|isa|isappdata|iscell|iscellstr|ischar|iscolumn|isdir|isempty|isequal|isequaln|isequalwithequalnans|"+ + "isfield|isfinite|isfloat|isglobal|ishandle|ishghandle|ishold|isinf|isinteger|isjava|iskeyword|isletter|islogical|ismac|ismatrix|ismember|ismethod|isnan|isnumeric|isobject|"+ + "isocaps|isocolors|isonormals|isosurface|ispc|ispref|isprime|isprop|isreal|isrow|isscalar|issorted|isspace|issparse|isstr|isstrprop|isstruct|isstudent|isunix|isvarname|"+ + "isvector|javaaddpath|javaArray|javachk|javaclasspath|javacomponent|javaMethod|javaMethodEDT|javaObject|javaObjectEDT|javarmpath|jet|keyboard|kron|lasterr|lasterror|"+ + "lastwarn|lcm|ldivide|ldl|le|legend|legendre|length|libfunctions|libfunctionsview|libisloaded|libpointer|libstruct|license|light|lightangle|lighting|lin2mu|line|lines|"+ + "linkaxes|linkdata|linkprop|linsolve|linspace|listdlg|listfonts|load|loadlibrary|loadobj|log|log10|log1p|log2|loglog|logm|logspace|lookfor|lower|ls|lscov|lsqnonneg|lsqr|"+ + "lt|lu|luinc|magic|makehgtform|mat2cell|mat2str|material|matfile|matlab\.io\.MatFile|matlab\.mixin\.(?:Copyable|Heterogeneous(?:\.getDefaultScalarElement)?)|matlabrc|"+ + "matlabroot|max|maxNumCompThreads|mean|median|membrane|memmapfile|memory|menu|mesh|meshc|meshgrid|meshz|meta\.(?:class(?:\.fromName)?|DynamicProperty|EnumeratedValue|event|"+ + "MetaData|method|package(?:\.(?:fromName|getAllPackages))?|property)|metaclass|methods|methodsview|mex(?:\.getCompilerConfigurations)?|MException|mexext|mfilename|min|minres|"+ + "minus|mislocked|mkdir|mkpp|mldivide|mlint|mlintrpt|mlock|mmfileinfo|mmreader|mod|mode|more|move|movefile|movegui|movie|movie2avi|mpower|mrdivide|msgbox|mtimes|mu2lin|"+ + "multibandread|multibandwrite|munlock|namelengthmax|nargchk|narginchk|nargoutchk|native2unicode|nccreate|ncdisp|nchoosek|ncinfo|ncread|ncreadatt|ncwrite|ncwriteatt|"+ + "ncwriteschema|ndgrid|ndims|ne|NET(?:\.(?:addAssembly|Assembly|convertArray|createArray|createGeneric|disableAutoRelease|enableAutoRelease|GenericClass|invokeGenericMethod|"+ + "NetException|setStaticProperty))?|netcdf\.(?:abort|close|copyAtt|create|defDim|defGrp|defVar|defVarChunking|defVarDeflate|defVarFill|defVarFletcher32|delAtt|endDef|getAtt|"+ + "getChunkCache|getConstant|getConstantNames|getVar|inq|inqAtt|inqAttID|inqAttName|inqDim|inqDimID|inqDimIDs|inqFormat|inqGrpName|inqGrpNameFull|inqGrpParent|inqGrps|"+ + "inqLibVers|inqNcid|inqUnlimDims|inqVar|inqVarChunking|inqVarDeflate|inqVarFill|inqVarFletcher32|inqVarID|inqVarIDs|open|putAtt|putVar|reDef|renameAtt|renameDim|renameVar|"+ + "setChunkCache|setDefaultFormat|setFill|sync)|newplot|nextpow2|nnz|noanimate|nonzeros|norm|normest|not|notebook|now|nthroot|null|num2cell|num2hex|num2str|numel|nzmax|"+ + "ode(?:113|15i|15s|23|23s|23t|23tb|45)|odeget|odeset|odextend|onCleanup|ones|open|openfig|opengl|openvar|optimget|optimset|or|ordeig|orderfields|ordqz|ordschur|orient|"+ + "orth|pack|padecoef|pagesetupdlg|pan|pareto|parseSoapResponse|pascal|patch|path|path2rc|pathsep|pathtool|pause|pbaspect|pcg|pchip|pcode|pcolor|pdepe|pdeval|peaks|perl|perms|"+ + "permute|pie|pink|pinv|planerot|playshow|plot|plot3|plotbrowser|plotedit|plotmatrix|plottools|plotyy|plus|pol2cart|polar|poly|polyarea|polyder|polyeig|polyfit|polyint|polyval|"+ + "polyvalm|pow2|power|ppval|prefdir|preferences|primes|print|printdlg|printopt|printpreview|prod|profile|profsave|propedit|propertyeditor|psi|publish|PutCharArray|PutFullMatrix|"+ + "PutWorkspaceData|pwd|qhull|qmr|qr|qrdelete|qrinsert|qrupdate|quad|quad2d|quadgk|quadl|quadv|questdlg|quit|quiver|quiver3|qz|rand|randi|randn|randperm|RandStream(?:\.(?:create|"+ + "getDefaultStream|getGlobalStream|list|setDefaultStream|setGlobalStream))?|rank|rat|rats|rbbox|rcond|rdivide|readasync|real|reallog|realmax|realmin|realpow|realsqrt|record|"+ + "rectangle|rectint|recycle|reducepatch|reducevolume|refresh|refreshdata|regexp|regexpi|regexprep|regexptranslate|rehash|rem|Remove|RemoveAll|repmat|reset|reshape|residue|"+ + "restoredefaultpath|rethrow|rgb2hsv|rgb2ind|rgbplot|ribbon|rmappdata|rmdir|rmfield|rmpath|rmpref|rng|roots|rose|rosser|rot90|rotate|rotate3d|round|rref|rsf2csf|run|save|saveas|"+ + "saveobj|savepath|scatter|scatter3|schur|sec|secd|sech|selectmoveresize|semilogx|semilogy|sendmail|serial|set|setappdata|setdiff|setenv|setfield|setpixelposition|setpref|setstr|"+ + "setxor|shading|shg|shiftdim|showplottool|shrinkfaces|sign|sin(?:d|h)?|size|slice|smooth3|snapnow|sort|sortrows|sound|soundsc|spalloc|spaugment|spconvert|spdiags|specular|speye|"+ + "spfun|sph2cart|sphere|spinmap|spline|spones|spparms|sprand|sprandn|sprandsym|sprank|spring|sprintf|spy|sqrt|sqrtm|squeeze|ss2tf|sscanf|stairs|startup|std|stem|stem3|stopasync|"+ + "str2double|str2func|str2mat|str2num|strcat|strcmp|strcmpi|stream2|stream3|streamline|streamparticles|streamribbon|streamslice|streamtube|strfind|strjust|strmatch|strncmp|"+ + "strncmpi|strread|strrep|strtok|strtrim|struct2cell|structfun|strvcat|sub2ind|subplot|subsasgn|subsindex|subspace|subsref|substruct|subvolume|sum|summer|superclasses|superiorto|"+ + "support|surf|surf2patch|surface|surfc|surfl|surfnorm|svd|svds|swapbytes|symamd|symbfact|symmlq|symrcm|symvar|system|tan(?:d|h)?|tar|tempdir|tempname|tetramesh|texlabel|text|"+ + "textread|textscan|textwrap|tfqmr|throw|tic|Tiff(?:\.(?:getTagNames|getVersion))?|timer|timerfind|timerfindall|times|timeseries|title|toc|todatenum|toeplitz|toolboxdir|trace|"+ + "transpose|trapz|treelayout|treeplot|tril|trimesh|triplequad|triplot|TriRep|TriScatteredInterp|trisurf|triu|tscollection|tsearch|tsearchn|tstool|type|typecast|uibuttongroup|"+ + "uicontextmenu|uicontrol|uigetdir|uigetfile|uigetpref|uiimport|uimenu|uiopen|uipanel|uipushtool|uiputfile|uiresume|uisave|uisetcolor|uisetfont|uisetpref|uistack|uitable|"+ + "uitoggletool|uitoolbar|uiwait|uminus|undocheckout|unicode2native|union|unique|unix|unloadlibrary|unmesh|unmkpp|untar|unwrap|unzip|uplus|upper|urlread|urlwrite|usejava|"+ + "userpath|validateattributes|validatestring|vander|var|vectorize|ver|verctrl|verLessThan|version|vertcat|VideoReader(?:\.isPlatformSupported)?|VideoWriter(?:\.getProfiles)?|"+ + "view|viewmtx|visdiff|volumebounds|voronoi|voronoin|wait|waitbar|waitfor|waitforbuttonpress|warndlg|warning|waterfall|wavfinfo|wavplay|wavread|wavrecord|wavwrite|web|weekday|"+ + "what|whatsnew|which|whitebg|who|whos|wilkinson|winopen|winqueryreg|winter|wk1finfo|wk1read|wk1write|workspace|xlabel|xlim|xlsfinfo|xlsread|xlswrite|xmlread|xmlwrite|xor|xslt|"+ + "ylabel|ylim|zeros|zip|zlabel|zlim|zoom|addedvarplot|andrewsplot|anova(?:1|2|n)|ansaribradley|aoctool|barttest|bbdesign|beta(?:cdf|fit|inv|like|pdf|rnd|stat)|bino(?:cdf|fit|inv|"+ + "pdf|rnd|stat)|biplot|bootci|bootstrp|boxplot|candexch|candgen|canoncorr|capability|capaplot|caseread|casewrite|categorical|ccdesign|cdfplot|chi2(?:cdf|gof|inv|pdf|rnd|stat)|"+ + "cholcov|Classification(?:BaggedEnsemble|Discriminant(?:\.(?:fit|make|template))?|Ensemble|KNN(?:\.(?:fit|template))?|PartitionedEnsemble|PartitionedModel|Tree(?:\.(?:fit|"+ + "template))?)|classify|classregtree|cluster|clusterdata|cmdscale|combnk|Compact(?:Classification(?:Discriminant|Ensemble|Tree)|Regression(?:Ensemble|Tree)|TreeBagger)|confusionmat|"+ + "controlchart|controlrules|cophenet|copula(?:cdf|fit|param|pdf|rnd|stat)|cordexch|corr|corrcov|coxphfit|createns|crosstab|crossval|cvpartition|datasample|dataset|daugment|dcovary|"+ + "dendrogram|dfittool|disttool|dummyvar|dwtest|ecdf|ecdfhist|ev(?:cdf|fit|inv|like|pdf|rnd|stat)|ExhaustiveSearcher|exp(?:cdf|fit|inv|like|pdf|rnd|stat)|factoran|fcdf|ff2n|finv|"+ + "fitdist|fitensemble|fpdf|fracfact|fracfactgen|friedman|frnd|fstat|fsurfht|fullfact|gagerr|gam(?:cdf|fit|inv|like|pdf|rnd|stat)|GeneralizedLinearModel(?:\.fit)?|geo(?:cdf|inv|mean|"+ + "pdf|rnd|stat)|gev(?:cdf|fit|inv|like|pdf|rnd|stat)|gline|glmfit|glmval|glyphplot|gmdistribution(?:\.fit)?|gname|gp(?:cdf|fit|inv|like|pdf|rnd|stat)|gplotmatrix|grp2idx|grpstats|"+ + "gscatter|haltonset|harmmean|hist3|histfit|hmm(?:decode|estimate|generate|train|viterbi)|hougen|hyge(?:cdf|inv|pdf|rnd|stat)|icdf|inconsistent|interactionplot|invpred|iqr|iwishrnd|"+ + "jackknife|jbtest|johnsrnd|KDTreeSearcher|kmeans|knnsearch|kruskalwallis|ksdensity|kstest|kstest2|kurtosis|lasso|lassoglm|lassoPlot|leverage|lhsdesign|lhsnorm|lillietest|"+ + "LinearModel(?:\.fit)?|linhyptest|linkage|logn(?:cdf|fit|inv|like|pdf|rnd|stat)|lsline|mad|mahal|maineffectsplot|manova1|manovacluster|mdscale|mhsample|mle|mlecov|mnpdf|"+ + "mnrfit|mnrnd|mnrval|moment|multcompare|multivarichart|mvn(?:cdf|pdf|rnd)|mvregress|mvregresslike|mvt(?:cdf|pdf|rnd)|NaiveBayes(?:\.fit)?|nan(?:cov|max|mean|median|min|std|"+ + "sum|var)|nbin(?:cdf|fit|inv|pdf|rnd|stat)|ncf(?:cdf|inv|pdf|rnd|stat)|nct(?:cdf|inv|pdf|rnd|stat)|ncx2(?:cdf|inv|pdf|rnd|stat)|NeighborSearcher|nlinfit|nlintool|nlmefit|nlmefitsa|"+ + "nlparci|nlpredci|nnmf|nominal|NonLinearModel(?:\.fit)?|norm(?:cdf|fit|inv|like|pdf|rnd|stat)|normplot|normspec|ordinal|outlierMeasure|parallelcoords|paretotails|partialcorr|"+ + "pcacov|pcares|pdf|pdist|pdist2|pearsrnd|perfcurve|perms|piecewisedistribution|plsregress|poiss(?:cdf|fit|inv|pdf|rnd|tat)|polyconf|polytool|prctile|princomp|ProbDist(?:Kernel|"+ + "Parametric|UnivKernel|UnivParam)?|probplot|procrustes|qqplot|qrandset|qrandstream|quantile|randg|random|randsample|randtool|range|rangesearch|ranksum|rayl(?:cdf|fit|inv|pdf|"+ + "rnd|stat)|rcoplot|refcurve|refline|regress|Regression(?:BaggedEnsemble|Ensemble|PartitionedEnsemble|PartitionedModel|Tree(?:\.(?:fit|template))?)|regstats|relieff|ridge|"+ + "robustdemo|robustfit|rotatefactors|rowexch|rsmdemo|rstool|runstest|sampsizepwr|scatterhist|sequentialfs|signrank|signtest|silhouette|skewness|slicesample|sobolset|squareform|"+ + "statget|statset|stepwise|stepwisefit|surfht|tabulate|tblread|tblwrite|tcdf|tdfread|tiedrank|tinv|tpdf|TreeBagger|treedisp|treefit|treeprune|treetest|treeval|trimmean|trnd|tstat|"+ + "ttest|ttest2|unid(?:cdf|inv|pdf|rnd|stat)|unif(?:cdf|inv|it|pdf|rnd|stat)|vartest(?:2|n)?|wbl(?:cdf|fit|inv|like|pdf|rnd|stat)|wblplot|wishrnd|x2fx|xptread|zscore|ztest"+ + "adapthisteq|analyze75info|analyze75read|applycform|applylut|axes2pix|bestblk|blockproc|bwarea|bwareaopen|bwboundaries|bwconncomp|bwconvhull|bwdist|bwdistgeodesic|bweuler|"+ + "bwhitmiss|bwlabel|bwlabeln|bwmorph|bwpack|bwperim|bwselect|bwtraceboundary|bwulterode|bwunpack|checkerboard|col2im|colfilt|conndef|convmtx2|corner|cornermetric|corr2|cp2tform|"+ + "cpcorr|cpselect|cpstruct2pairs|dct2|dctmtx|deconvblind|deconvlucy|deconvreg|deconvwnr|decorrstretch|demosaic|dicom(?:anon|dict|info|lookup|read|uid|write)|edge|edgetaper|entropy|"+ + "entropyfilt|fan2para|fanbeam|findbounds|fliptform|freqz2|fsamp2|fspecial|ftrans2|fwind1|fwind2|getheight|getimage|getimagemodel|getline|getneighbors|getnhood|getpts|"+ + "getrangefromclass|getrect|getsequence|gray2ind|graycomatrix|graycoprops|graydist|grayslice|graythresh|hdrread|hdrwrite|histeq|hough|houghlines|houghpeaks|iccfind|iccread|"+ + "iccroot|iccwrite|idct2|ifanbeam|im2bw|im2col|im2double|im2int16|im2java2d|im2single|im2uint16|im2uint8|imabsdiff|imadd|imadjust|ImageAdapter|imageinfo|imagemodel|imapplymatrix|"+ + "imattributes|imbothat|imclearborder|imclose|imcolormaptool|imcomplement|imcontour|imcontrast|imcrop|imdilate|imdisplayrange|imdistline|imdivide|imellipse|imerode|imextendedmax|"+ + "imextendedmin|imfill|imfilter|imfindcircles|imfreehand|imfuse|imgca|imgcf|imgetfile|imhandles|imhist|imhmax|imhmin|imimposemin|imlincomb|imline|immagbox|immovie|immultiply|imnoise|"+ + "imopen|imoverview|imoverviewpanel|impixel|impixelinfo|impixelinfoval|impixelregion|impixelregionpanel|implay|impoint|impoly|impositionrect|improfile|imputfile|impyramid|"+ + "imreconstruct|imrect|imregconfig|imregionalmax|imregionalmin|imregister|imresize|imroi|imrotate|imsave|imscrollpanel|imshow|imshowpair|imsubtract|imtool|imtophat|imtransform|"+ + "imview|ind2gray|ind2rgb|interfileinfo|interfileread|intlut|ippl|iptaddcallback|iptcheckconn|iptcheckhandle|iptcheckinput|iptcheckmap|iptchecknargin|iptcheckstrs|iptdemos|iptgetapi|"+ + "iptGetPointerBehavior|iptgetpref|ipticondir|iptnum2ordinal|iptPointerManager|iptprefs|iptremovecallback|iptSetPointerBehavior|iptsetpref|iptwindowalign|iradon|isbw|isflat|isgray|"+ + "isicc|isind|isnitf|isrgb|isrset|lab2double|lab2uint16|lab2uint8|label2rgb|labelmatrix|makecform|makeConstrainToRectFcn|makehdr|makelut|makeresampler|maketform|mat2gray|mean2|"+ + "medfilt2|montage|nitfinfo|nitfread|nlfilter|normxcorr2|ntsc2rgb|openrset|ordfilt2|otf2psf|padarray|para2fan|phantom|poly2mask|psf2otf|qtdecomp|qtgetblk|qtsetblk|radon|rangefilt|"+ + "reflect|regionprops|registration\.metric\.(?:MattesMutualInformation|MeanSquares)|registration\.optimizer\.(?:OnePlusOneEvolutionary|RegularStepGradientDescent)|rgb2gray|"+ + "rgb2ntsc|rgb2ycbcr|roicolor|roifill|roifilt2|roipoly|rsetwrite|std2|stdfilt|strel|stretchlim|subimage|tformarray|tformfwd|tforminv|tonemap|translate|truesize|uintlut|viscircles|"+ + "warp|watershed|whitepoint|wiener2|xyz2double|xyz2uint16|ycbcr2rgb|bintprog|color|fgoalattain|fminbnd|fmincon|fminimax|fminsearch|fminunc|fseminf|fsolve|fzero|fzmult|gangstr|ktrlink|"+ + "linprog|lsqcurvefit|lsqlin|lsqnonlin|lsqnonneg|optimget|optimset|optimtool|quadprog" + ); + var storageType = ( + "cell|struct|char|double|single|logical|u?int(?:8|16|32|64)|sparse" + ); + var keywordMapper = this.createKeywordMapper({ + "storage.type": storageType, + "support.function": builtinFunctions, + "keyword": keywords, + "constant.language": builtinConstants + }, "identifier", true); + + this.$rules = { + "start" : [ { + token : "comment", + regex : "^%[^\r\n]*" + }, { + token : "string", // " string + regex : '".*?"' + }, { + token : "string", // ' string + regex : "'.*?'" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator", + regex : "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=" + }, { + token : "punctuation.operator", + regex : "\\?|\\:|\\,|\\;|\\." + }, { + token : "paren.lparen", + regex : "[\\(]" + }, { + token : "paren.rparen", + regex : "[\\)]" + }, { + token : "text", + regex : "\\s+" + } ] + }; +}; + +oop.inherits(MatlabHighlightRules, TextHighlightRules); + +exports.MatlabHighlightRules = MatlabHighlightRules; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/brace/mode/mushcode.js b/pitfall/pdfkit/node_modules/brace/mode/mushcode.js new file mode 100644 index 00000000..88694ac8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/mushcode.js @@ -0,0 +1,704 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/mushcode', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/mushcode_high_rules', 'ace/mode/folding/pythonic', 'ace/range'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var MushCodeRules = acequire("./mushcode_high_rules").MushCodeRules; +var PythonFoldMode = acequire("./folding/pythonic").FoldMode; +var Range = acequire("../range").Range; + +var Mode = function() { + this.HighlightRules = MushCodeRules; + this.foldingRules = new PythonFoldMode("\\:"); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "#"; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start") { + var match = line.match(/^.*[\{\(\[\:]\s*$/); + if (match) { + indent += tab; + } + } + + return indent; + }; + + var outdents = { + "pass": 1, + "return": 1, + "raise": 1, + "break": 1, + "continue": 1 + }; + + this.checkOutdent = function(state, line, input) { + if (input !== "\r\n" && input !== "\r" && input !== "\n") + return false; + + var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens; + + if (!tokens) + return false; + do { + var last = tokens.pop(); + } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/)))); + + if (!last) + return false; + + return (last.type == "keyword" && outdents[last.value]); + }; + + this.autoOutdent = function(state, doc, row) { + + row += 1; + var indent = this.$getIndent(doc.getLine(row)); + var tab = doc.getTabString(); + if (indent.slice(-tab.length) == tab) + doc.remove(new Range(row, indent.length-tab.length, row, indent.length)); + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/mushcode_high_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var MushCodeRules = function() { + + + var keywords = ( + "@if|"+ + "@ifelse|"+ + "@switch|"+ + "@halt|"+ + "@dolist|"+ + "@create|"+ + "@scent|"+ + "@sound|"+ + "@touch|"+ + "@ataste|"+ + "@osound|"+ + "@ahear|"+ + "@aahear|"+ + "@amhear|"+ + "@otouch|"+ + "@otaste|"+ + "@drop|"+ + "@odrop|"+ + "@adrop|"+ + "@dropfail|"+ + "@odropfail|"+ + "@smell|"+ + "@oemit|"+ + "@emit|"+ + "@pemit|"+ + "@parent|"+ + "@clone|"+ + "@taste|"+ + "whisper|"+ + "page|"+ + "say|"+ + "pose|"+ + "semipose|"+ + "teach|"+ + "touch|"+ + "taste|"+ + "smell|"+ + "listen|"+ + "look|"+ + "move|"+ + "go|"+ + "home|"+ + "follow|"+ + "unfollow|"+ + "desert|"+ + "dismiss|"+ + "@tel" + ); + + var builtinConstants = ( + "=#0" + ); + + var builtinFunctions = ( + "default|"+ + "edefault|"+ + "eval|"+ + "get_eval|"+ + "get|"+ + "grep|"+ + "grepi|"+ + "hasattr|"+ + "hasattrp|"+ + "hasattrval|"+ + "hasattrpval|"+ + "lattr|"+ + "nattr|"+ + "poss|"+ + "udefault|"+ + "ufun|"+ + "u|"+ + "v|"+ + "uldefault|"+ + "xget|"+ + "zfun|"+ + "band|"+ + "bnand|"+ + "bnot|"+ + "bor|"+ + "bxor|"+ + "shl|"+ + "shr|"+ + "and|"+ + "cand|"+ + "cor|"+ + "eq|"+ + "gt|"+ + "gte|"+ + "lt|"+ + "lte|"+ + "nand|"+ + "neq|"+ + "nor|"+ + "not|"+ + "or|"+ + "t|"+ + "xor|"+ + "con|"+ + "entrances|"+ + "exit|"+ + "followers|"+ + "home|"+ + "lcon|"+ + "lexits|"+ + "loc|"+ + "locate|"+ + "lparent|"+ + "lsearch|"+ + "next|"+ + "num|"+ + "owner|"+ + "parent|"+ + "pmatch|"+ + "rloc|"+ + "rnum|"+ + "room|"+ + "where|"+ + "zone|"+ + "worn|"+ + "held|"+ + "carried|"+ + "acos|"+ + "asin|"+ + "atan|"+ + "ceil|"+ + "cos|"+ + "e|"+ + "exp|"+ + "fdiv|"+ + "fmod|"+ + "floor|"+ + "log|"+ + "ln|"+ + "pi|"+ + "power|"+ + "round|"+ + "sin|"+ + "sqrt|"+ + "tan|"+ + "aposs|"+ + "andflags|"+ + "conn|"+ + "commandssent|"+ + "controls|"+ + "doing|"+ + "elock|"+ + "findable|"+ + "flags|"+ + "fullname|"+ + "hasflag|"+ + "haspower|"+ + "hastype|"+ + "hidden|"+ + "idle|"+ + "isbaker|"+ + "lock|"+ + "lstats|"+ + "money|"+ + "who|"+ + "name|"+ + "nearby|"+ + "obj|"+ + "objflags|"+ + "photo|"+ + "poll|"+ + "powers|"+ + "pendingtext|"+ + "receivedtext|"+ + "restarts|"+ + "restarttime|"+ + "subj|"+ + "shortestpath|"+ + "tmoney|"+ + "type|"+ + "visible|"+ + "cat|"+ + "element|"+ + "elements|"+ + "extract|"+ + "filter|"+ + "filterbool|"+ + "first|"+ + "foreach|"+ + "fold|"+ + "grab|"+ + "graball|"+ + "index|"+ + "insert|"+ + "itemize|"+ + "items|"+ + "iter|"+ + "last|"+ + "ldelete|"+ + "map|"+ + "match|"+ + "matchall|"+ + "member|"+ + "mix|"+ + "munge|"+ + "pick|"+ + "remove|"+ + "replace|"+ + "rest|"+ + "revwords|"+ + "setdiff|"+ + "setinter|"+ + "setunion|"+ + "shuffle|"+ + "sort|"+ + "sortby|"+ + "splice|"+ + "step|"+ + "wordpos|"+ + "words|"+ + "add|"+ + "lmath|"+ + "max|"+ + "mean|"+ + "median|"+ + "min|"+ + "mul|"+ + "percent|"+ + "sign|"+ + "stddev|"+ + "sub|"+ + "val|"+ + "bound|"+ + "abs|"+ + "inc|"+ + "dec|"+ + "dist2d|"+ + "dist3d|"+ + "div|"+ + "floordiv|"+ + "mod|"+ + "modulo|"+ + "remainder|"+ + "vadd|"+ + "vdim|"+ + "vdot|"+ + "vmag|"+ + "vmax|"+ + "vmin|"+ + "vmul|"+ + "vsub|"+ + "vunit|"+ + "regedit|"+ + "regeditall|"+ + "regeditalli|"+ + "regediti|"+ + "regmatch|"+ + "regmatchi|"+ + "regrab|"+ + "regraball|"+ + "regraballi|"+ + "regrabi|"+ + "regrep|"+ + "regrepi|"+ + "after|"+ + "alphamin|"+ + "alphamax|"+ + "art|"+ + "before|"+ + "brackets|"+ + "capstr|"+ + "case|"+ + "caseall|"+ + "center|"+ + "containsfansi|"+ + "comp|"+ + "decompose|"+ + "decrypt|"+ + "delete|"+ + "edit|"+ + "encrypt|"+ + "escape|"+ + "if|"+ + "ifelse|"+ + "lcstr|"+ + "left|"+ + "lit|"+ + "ljust|"+ + "merge|"+ + "mid|"+ + "ostrlen|"+ + "pos|"+ + "repeat|"+ + "reverse|"+ + "right|"+ + "rjust|"+ + "scramble|"+ + "secure|"+ + "space|"+ + "spellnum|"+ + "squish|"+ + "strcat|"+ + "strmatch|"+ + "strinsert|"+ + "stripansi|"+ + "stripfansi|"+ + "strlen|"+ + "switch|"+ + "switchall|"+ + "table|"+ + "tr|"+ + "trim|"+ + "ucstr|"+ + "unsafe|"+ + "wrap|"+ + "ctitle|"+ + "cwho|"+ + "channels|"+ + "clock|"+ + "cflags|"+ + "ilev|"+ + "itext|"+ + "inum|"+ + "convsecs|"+ + "convutcsecs|"+ + "convtime|"+ + "ctime|"+ + "etimefmt|"+ + "isdaylight|"+ + "mtime|"+ + "secs|"+ + "msecs|"+ + "starttime|"+ + "time|"+ + "timefmt|"+ + "timestring|"+ + "utctime|"+ + "atrlock|"+ + "clone|"+ + "create|"+ + "cook|"+ + "dig|"+ + "emit|"+ + "lemit|"+ + "link|"+ + "oemit|"+ + "open|"+ + "pemit|"+ + "remit|"+ + "set|"+ + "tel|"+ + "wipe|"+ + "zemit|"+ + "fbcreate|"+ + "fbdestroy|"+ + "fbwrite|"+ + "fbclear|"+ + "fbcopy|"+ + "fbcopyto|"+ + "fbclip|"+ + "fbdump|"+ + "fbflush|"+ + "fbhset|"+ + "fblist|"+ + "fbstats|"+ + "qentries|"+ + "qentry|"+ + "play|"+ + "ansi|"+ + "break|"+ + "c|"+ + "asc|"+ + "die|"+ + "isdbref|"+ + "isint|"+ + "isnum|"+ + "isletters|"+ + "linecoords|"+ + "localize|"+ + "lnum|"+ + "nameshort|"+ + "null|"+ + "objeval|"+ + "r|"+ + "rand|"+ + "s|"+ + "setq|"+ + "setr|"+ + "soundex|"+ + "soundslike|"+ + "valid|"+ + "vchart|"+ + "vchart2|"+ + "vlabel|"+ + "@@|"+ + "bakerdays|"+ + "bodybuild|"+ + "box|"+ + "capall|"+ + "catalog|"+ + "children|"+ + "ctrailer|"+ + "darttime|"+ + "debt|"+ + "detailbar|"+ + "exploredroom|"+ + "fansitoansi|"+ + "fansitoxansi|"+ + "fullbar|"+ + "halfbar|"+ + "isdarted|"+ + "isnewbie|"+ + "isword|"+ + "lambda|"+ + "lobjects|"+ + "lplayers|"+ + "lthings|"+ + "lvexits|"+ + "lvobjects|"+ + "lvplayers|"+ + "lvthings|"+ + "newswrap|"+ + "numsuffix|"+ + "playerson|"+ + "playersthisweek|"+ + "randomad|"+ + "randword|"+ + "realrandword|"+ + "replacechr|"+ + "second|"+ + "splitamount|"+ + "strlenall|"+ + "text|"+ + "third|"+ + "tofansi|"+ + "totalac|"+ + "unique|"+ + "getaddressroom|"+ + "listpropertycomm|"+ + "listpropertyres|"+ + "lotowner|"+ + "lotrating|"+ + "lotratingcount|"+ + "lotvalue|"+ + "boughtproduct|"+ + "companyabb|"+ + "companyicon|"+ + "companylist|"+ + "companyname|"+ + "companyowners|"+ + "companyvalue|"+ + "employees|"+ + "invested|"+ + "productlist|"+ + "productname|"+ + "productowners|"+ + "productrating|"+ + "productratingcount|"+ + "productsoldat|"+ + "producttype|"+ + "ratedproduct|"+ + "soldproduct|"+ + "topproducts|"+ + "totalspentonproduct|"+ + "totalstock|"+ + "transfermoney|"+ + "uniquebuyercount|"+ + "uniqueproductsbought|"+ + "validcompany|"+ + "deletepicture|"+ + "fbsave|"+ + "getpicturesecurity|"+ + "haspicture|"+ + "listpictures|"+ + "picturesize|"+ + "replacecolor|"+ + "rgbtocolor|"+ + "savepicture|"+ + "setpicturesecurity|"+ + "showpicture|"+ + "piechart|"+ + "piechartlabel|"+ + "createmaze|"+ + "drawmaze|"+ + "drawwireframe" + ); + var keywordMapper = this.createKeywordMapper({ + "invalid.deprecated": "debugger", + "support.function": builtinFunctions, + "constant.language": builtinConstants, + "keyword": keywords + }, "identifier"); + + var strPre = "(?:r|u|ur|R|U|UR|Ur|uR)?"; + + var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))"; + var octInteger = "(?:0[oO]?[0-7]+)"; + var hexInteger = "(?:0[xX][\\dA-Fa-f]+)"; + var binInteger = "(?:0[bB][01]+)"; + var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")"; + + var exponent = "(?:[eE][+-]?\\d+)"; + var fraction = "(?:\\.\\d+)"; + var intPart = "(?:\\d+)"; + var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; + var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")"; + var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; + + this.$rules = { + "start" : [ + { + token : "variable", // mush substitution register + regex : "%[0-9]{1}" + }, + { + token : "variable", // mush substitution register + regex : "%q[0-9A-Za-z]{1}" + }, + { + token : "variable", // mush special character register + regex : "%[a-zA-Z]{1}" + }, + { + token: "variable.language", + regex: "%[a-z0-9-_]+" + }, + { + token : "constant.numeric", // imaginary + regex : "(?:" + floatNumber + "|\\d+)[jJ]\\b" + }, { + token : "constant.numeric", // float + regex : floatNumber + }, { + token : "constant.numeric", // long integer + regex : integer + "[lL]\\b" + }, { + token : "constant.numeric", // integer + regex : integer + "\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator", + regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|#|%|<<|>>|\\||\\^|~|<|>|<=|=>|==|!=|<>|=" + }, { + token : "paren.lparen", + regex : "[\\[\\(\\{]" + }, { + token : "paren.rparen", + regex : "[\\]\\)\\}]" + }, { + token : "text", + regex : "\\s+" + } ] + }; +}; + +oop.inherits(MushCodeRules, TextHighlightRules); + +exports.MushCodeRules = MushCodeRules; +}); + +ace.define('ace/mode/folding/pythonic', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(markers) { + this.foldingStartMarker = new RegExp("([\\[{])(?:\\s*)$|(" + markers + ")(?:\\s*)(?:#.*)?$"); +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + if (match[1]) + return this.openingBracketBlock(session, match[1], row, match.index); + if (match[2]) + return this.indentationBlock(session, row, match.index + match[2].length); + return this.indentationBlock(session, row); + } + } + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/mushcode_high_rules.js b/pitfall/pdfkit/node_modules/brace/mode/mushcode_high_rules.js new file mode 100644 index 00000000..4b94d7f8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/mushcode_high_rules.js @@ -0,0 +1,569 @@ +/* + * MUSHCodeMode + */ + +ace.define('ace/mode/mushcode_high_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var MushCodeRules = function() { + + + var keywords = ( + "@if|"+ + "@ifelse|"+ + "@switch|"+ + "@halt|"+ + "@dolist|"+ + "@create|"+ + "@scent|"+ + "@sound|"+ + "@touch|"+ + "@ataste|"+ + "@osound|"+ + "@ahear|"+ + "@aahear|"+ + "@amhear|"+ + "@otouch|"+ + "@otaste|"+ + "@drop|"+ + "@odrop|"+ + "@adrop|"+ + "@dropfail|"+ + "@odropfail|"+ + "@smell|"+ + "@oemit|"+ + "@emit|"+ + "@pemit|"+ + "@parent|"+ + "@clone|"+ + "@taste|"+ + "whisper|"+ + "page|"+ + "say|"+ + "pose|"+ + "semipose|"+ + "teach|"+ + "touch|"+ + "taste|"+ + "smell|"+ + "listen|"+ + "look|"+ + "move|"+ + "go|"+ + "home|"+ + "follow|"+ + "unfollow|"+ + "desert|"+ + "dismiss|"+ + "@tel" + ); + + var builtinConstants = ( + "=#0" + ); + + var builtinFunctions = ( + "default|"+ + "edefault|"+ + "eval|"+ + "get_eval|"+ + "get|"+ + "grep|"+ + "grepi|"+ + "hasattr|"+ + "hasattrp|"+ + "hasattrval|"+ + "hasattrpval|"+ + "lattr|"+ + "nattr|"+ + "poss|"+ + "udefault|"+ + "ufun|"+ + "u|"+ + "v|"+ + "uldefault|"+ + "xget|"+ + "zfun|"+ + "band|"+ + "bnand|"+ + "bnot|"+ + "bor|"+ + "bxor|"+ + "shl|"+ + "shr|"+ + "and|"+ + "cand|"+ + "cor|"+ + "eq|"+ + "gt|"+ + "gte|"+ + "lt|"+ + "lte|"+ + "nand|"+ + "neq|"+ + "nor|"+ + "not|"+ + "or|"+ + "t|"+ + "xor|"+ + "con|"+ + "entrances|"+ + "exit|"+ + "followers|"+ + "home|"+ + "lcon|"+ + "lexits|"+ + "loc|"+ + "locate|"+ + "lparent|"+ + "lsearch|"+ + "next|"+ + "num|"+ + "owner|"+ + "parent|"+ + "pmatch|"+ + "rloc|"+ + "rnum|"+ + "room|"+ + "where|"+ + "zone|"+ + "worn|"+ + "held|"+ + "carried|"+ + "acos|"+ + "asin|"+ + "atan|"+ + "ceil|"+ + "cos|"+ + "e|"+ + "exp|"+ + "fdiv|"+ + "fmod|"+ + "floor|"+ + "log|"+ + "ln|"+ + "pi|"+ + "power|"+ + "round|"+ + "sin|"+ + "sqrt|"+ + "tan|"+ + "aposs|"+ + "andflags|"+ + "conn|"+ + "commandssent|"+ + "controls|"+ + "doing|"+ + "elock|"+ + "findable|"+ + "flags|"+ + "fullname|"+ + "hasflag|"+ + "haspower|"+ + "hastype|"+ + "hidden|"+ + "idle|"+ + "isbaker|"+ + "lock|"+ + "lstats|"+ + "money|"+ + "who|"+ + "name|"+ + "nearby|"+ + "obj|"+ + "objflags|"+ + "photo|"+ + "poll|"+ + "powers|"+ + "pendingtext|"+ + "receivedtext|"+ + "restarts|"+ + "restarttime|"+ + "subj|"+ + "shortestpath|"+ + "tmoney|"+ + "type|"+ + "visible|"+ + "cat|"+ + "element|"+ + "elements|"+ + "extract|"+ + "filter|"+ + "filterbool|"+ + "first|"+ + "foreach|"+ + "fold|"+ + "grab|"+ + "graball|"+ + "index|"+ + "insert|"+ + "itemize|"+ + "items|"+ + "iter|"+ + "last|"+ + "ldelete|"+ + "map|"+ + "match|"+ + "matchall|"+ + "member|"+ + "mix|"+ + "munge|"+ + "pick|"+ + "remove|"+ + "replace|"+ + "rest|"+ + "revwords|"+ + "setdiff|"+ + "setinter|"+ + "setunion|"+ + "shuffle|"+ + "sort|"+ + "sortby|"+ + "splice|"+ + "step|"+ + "wordpos|"+ + "words|"+ + "add|"+ + "lmath|"+ + "max|"+ + "mean|"+ + "median|"+ + "min|"+ + "mul|"+ + "percent|"+ + "sign|"+ + "stddev|"+ + "sub|"+ + "val|"+ + "bound|"+ + "abs|"+ + "inc|"+ + "dec|"+ + "dist2d|"+ + "dist3d|"+ + "div|"+ + "floordiv|"+ + "mod|"+ + "modulo|"+ + "remainder|"+ + "vadd|"+ + "vdim|"+ + "vdot|"+ + "vmag|"+ + "vmax|"+ + "vmin|"+ + "vmul|"+ + "vsub|"+ + "vunit|"+ + "regedit|"+ + "regeditall|"+ + "regeditalli|"+ + "regediti|"+ + "regmatch|"+ + "regmatchi|"+ + "regrab|"+ + "regraball|"+ + "regraballi|"+ + "regrabi|"+ + "regrep|"+ + "regrepi|"+ + "after|"+ + "alphamin|"+ + "alphamax|"+ + "art|"+ + "before|"+ + "brackets|"+ + "capstr|"+ + "case|"+ + "caseall|"+ + "center|"+ + "containsfansi|"+ + "comp|"+ + "decompose|"+ + "decrypt|"+ + "delete|"+ + "edit|"+ + "encrypt|"+ + "escape|"+ + "if|"+ + "ifelse|"+ + "lcstr|"+ + "left|"+ + "lit|"+ + "ljust|"+ + "merge|"+ + "mid|"+ + "ostrlen|"+ + "pos|"+ + "repeat|"+ + "reverse|"+ + "right|"+ + "rjust|"+ + "scramble|"+ + "secure|"+ + "space|"+ + "spellnum|"+ + "squish|"+ + "strcat|"+ + "strmatch|"+ + "strinsert|"+ + "stripansi|"+ + "stripfansi|"+ + "strlen|"+ + "switch|"+ + "switchall|"+ + "table|"+ + "tr|"+ + "trim|"+ + "ucstr|"+ + "unsafe|"+ + "wrap|"+ + "ctitle|"+ + "cwho|"+ + "channels|"+ + "clock|"+ + "cflags|"+ + "ilev|"+ + "itext|"+ + "inum|"+ + "convsecs|"+ + "convutcsecs|"+ + "convtime|"+ + "ctime|"+ + "etimefmt|"+ + "isdaylight|"+ + "mtime|"+ + "secs|"+ + "msecs|"+ + "starttime|"+ + "time|"+ + "timefmt|"+ + "timestring|"+ + "utctime|"+ + "atrlock|"+ + "clone|"+ + "create|"+ + "cook|"+ + "dig|"+ + "emit|"+ + "lemit|"+ + "link|"+ + "oemit|"+ + "open|"+ + "pemit|"+ + "remit|"+ + "set|"+ + "tel|"+ + "wipe|"+ + "zemit|"+ + "fbcreate|"+ + "fbdestroy|"+ + "fbwrite|"+ + "fbclear|"+ + "fbcopy|"+ + "fbcopyto|"+ + "fbclip|"+ + "fbdump|"+ + "fbflush|"+ + "fbhset|"+ + "fblist|"+ + "fbstats|"+ + "qentries|"+ + "qentry|"+ + "play|"+ + "ansi|"+ + "break|"+ + "c|"+ + "asc|"+ + "die|"+ + "isdbref|"+ + "isint|"+ + "isnum|"+ + "isletters|"+ + "linecoords|"+ + "localize|"+ + "lnum|"+ + "nameshort|"+ + "null|"+ + "objeval|"+ + "r|"+ + "rand|"+ + "s|"+ + "setq|"+ + "setr|"+ + "soundex|"+ + "soundslike|"+ + "valid|"+ + "vchart|"+ + "vchart2|"+ + "vlabel|"+ + "@@|"+ + "bakerdays|"+ + "bodybuild|"+ + "box|"+ + "capall|"+ + "catalog|"+ + "children|"+ + "ctrailer|"+ + "darttime|"+ + "debt|"+ + "detailbar|"+ + "exploredroom|"+ + "fansitoansi|"+ + "fansitoxansi|"+ + "fullbar|"+ + "halfbar|"+ + "isdarted|"+ + "isnewbie|"+ + "isword|"+ + "lambda|"+ + "lobjects|"+ + "lplayers|"+ + "lthings|"+ + "lvexits|"+ + "lvobjects|"+ + "lvplayers|"+ + "lvthings|"+ + "newswrap|"+ + "numsuffix|"+ + "playerson|"+ + "playersthisweek|"+ + "randomad|"+ + "randword|"+ + "realrandword|"+ + "replacechr|"+ + "second|"+ + "splitamount|"+ + "strlenall|"+ + "text|"+ + "third|"+ + "tofansi|"+ + "totalac|"+ + "unique|"+ + "getaddressroom|"+ + "listpropertycomm|"+ + "listpropertyres|"+ + "lotowner|"+ + "lotrating|"+ + "lotratingcount|"+ + "lotvalue|"+ + "boughtproduct|"+ + "companyabb|"+ + "companyicon|"+ + "companylist|"+ + "companyname|"+ + "companyowners|"+ + "companyvalue|"+ + "employees|"+ + "invested|"+ + "productlist|"+ + "productname|"+ + "productowners|"+ + "productrating|"+ + "productratingcount|"+ + "productsoldat|"+ + "producttype|"+ + "ratedproduct|"+ + "soldproduct|"+ + "topproducts|"+ + "totalspentonproduct|"+ + "totalstock|"+ + "transfermoney|"+ + "uniquebuyercount|"+ + "uniqueproductsbought|"+ + "validcompany|"+ + "deletepicture|"+ + "fbsave|"+ + "getpicturesecurity|"+ + "haspicture|"+ + "listpictures|"+ + "picturesize|"+ + "replacecolor|"+ + "rgbtocolor|"+ + "savepicture|"+ + "setpicturesecurity|"+ + "showpicture|"+ + "piechart|"+ + "piechartlabel|"+ + "createmaze|"+ + "drawmaze|"+ + "drawwireframe" + ); + var keywordMapper = this.createKeywordMapper({ + "invalid.deprecated": "debugger", + "support.function": builtinFunctions, + "constant.language": builtinConstants, + "keyword": keywords + }, "identifier"); + + var strPre = "(?:r|u|ur|R|U|UR|Ur|uR)?"; + + var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))"; + var octInteger = "(?:0[oO]?[0-7]+)"; + var hexInteger = "(?:0[xX][\\dA-Fa-f]+)"; + var binInteger = "(?:0[bB][01]+)"; + var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")"; + + var exponent = "(?:[eE][+-]?\\d+)"; + var fraction = "(?:\\.\\d+)"; + var intPart = "(?:\\d+)"; + var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; + var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")"; + var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; + + this.$rules = { + "start" : [ + { + token : "variable", // mush substitution register + regex : "%[0-9]{1}" + }, + { + token : "variable", // mush substitution register + regex : "%q[0-9A-Za-z]{1}" + }, + { + token : "variable", // mush special character register + regex : "%[a-zA-Z]{1}" + }, + { + token: "variable.language", + regex: "%[a-z0-9-_]+" + }, + { + token : "constant.numeric", // imaginary + regex : "(?:" + floatNumber + "|\\d+)[jJ]\\b" + }, { + token : "constant.numeric", // float + regex : floatNumber + }, { + token : "constant.numeric", // long integer + regex : integer + "[lL]\\b" + }, { + token : "constant.numeric", // integer + regex : integer + "\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator", + regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|#|%|<<|>>|\\||\\^|~|<|>|<=|=>|==|!=|<>|=" + }, { + token : "paren.lparen", + regex : "[\\[\\(\\{]" + }, { + token : "paren.rparen", + regex : "[\\]\\)\\}]" + }, { + token : "text", + regex : "\\s+" + } ] + }; +}; + +oop.inherits(MushCodeRules, TextHighlightRules); + +exports.MushCodeRules = MushCodeRules; +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/mysql.js b/pitfall/pdfkit/node_modules/brace/mode/mysql.js new file mode 100644 index 00000000..c53084aa --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/mysql.js @@ -0,0 +1,184 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/mysql', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/mysql_highlight_rules', 'ace/range'], function(acequire, exports, module) { + +var oop = acequire("../lib/oop"); +var TextMode = acequire("../mode/text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var MysqlHighlightRules = acequire("./mysql_highlight_rules").MysqlHighlightRules; +var Range = acequire("../range").Range; + +var Mode = function() { + this.HighlightRules = MysqlHighlightRules; +}; +oop.inherits(Mode, TextMode); + +(function() { + this.lineCommentStart = ["--", "#"]; // todo space + this.blockComment = {start: "/*", end: "*/"}; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/mysql_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var MysqlHighlightRules = function() { + + var mySqlKeywords = /*sql*/ "alter|and|as|asc|between|count|create|delete|desc|distinct|drop|from|having|in|insert|into|is|join|like|not|on|or|order|select|set|table|union|update|values|where" + "|accessible|action|add|after|algorithm|all|analyze|asensitive|at|authors|auto_increment|autocommit|avg|avg_row_length|before|binary|binlog|both|btree|cache|call|cascade|cascaded|case|catalog_name|chain|change|changed|character|check|checkpoint|checksum|class_origin|client_statistics|close|coalesce|code|collate|collation|collations|column|columns|comment|commit|committed|completion|concurrent|condition|connection|consistent|constraint|contains|continue|contributors|convert|cross|current_date|current_time|current_timestamp|current_user|cursor|data|database|databases|day_hour|day_microsecond|day_minute|day_second|deallocate|dec|declare|default|delay_key_write|delayed|delimiter|des_key_file|describe|deterministic|dev_pop|dev_samp|deviance|directory|disable|discard|distinctrow|div|dual|dumpfile|each|elseif|enable|enclosed|end|ends|engine|engines|enum|errors|escape|escaped|even|event|events|every|execute|exists|exit|explain|extended|fast|fetch|field|fields|first|flush|for|force|foreign|found_rows|full|fulltext|function|general|global|grant|grants|group|groupby_concat|handler|hash|help|high_priority|hosts|hour_microsecond|hour_minute|hour_second|if|ignore|ignore_server_ids|import|index|index_statistics|infile|inner|innodb|inout|insensitive|insert_method|install|interval|invoker|isolation|iterate|key|keys|kill|language|last|leading|leave|left|level|limit|linear|lines|list|load|local|localtime|localtimestamp|lock|logs|low_priority|master|master_heartbeat_period|master_ssl_verify_server_cert|masters|match|max|max_rows|maxvalue|message_text|middleint|migrate|min|min_rows|minute_microsecond|minute_second|mod|mode|modifies|modify|mutex|mysql_errno|natural|next|no|no_write_to_binlog|offline|offset|one|online|open|optimize|option|optionally|out|outer|outfile|pack_keys|parser|partition|partitions|password|phase|plugin|plugins|prepare|preserve|prev|primary|privileges|procedure|processlist|profile|profiles|purge|query|quick|range|read|read_write|reads|real|rebuild|recover|references|regexp|relaylog|release|remove|rename|reorganize|repair|repeatable|replace|acequire|resignal|restrict|resume|return|returns|revoke|right|rlike|rollback|rollup|row|row_format|rtree|savepoint|schedule|schema|schema_name|schemas|second_microsecond|security|sensitive|separator|serializable|server|session|share|show|signal|slave|slow|smallint|snapshot|soname|spatial|specific|sql|sql_big_result|sql_buffer_result|sql_cache|sql_calc_found_rows|sql_no_cache|sql_small_result|sqlexception|sqlstate|sqlwarning|ssl|start|starting|starts|status|std|stddev|stddev_pop|stddev_samp|storage|straight_join|subclass_origin|sum|suspend|table_name|table_statistics|tables|tablespace|temporary|terminated|to|trailing|transaction|trigger|triggers|truncate|uncommitted|undo|uninstall|unique|unlock|upgrade|usage|use|use_frm|user|user_resources|user_statistics|using|utc_date|utc_time|utc_timestamp|value|variables|varying|view|views|warnings|when|while|with|work|write|xa|xor|year_month|zerofill|begin|do|then|else|loop|repeat"; + var builtins = "by|bool|boolean|bit|blob|decimal|double|enum|float|long|longblob|longtext|medium|mediumblob|mediumint|mediumtext|time|timestamp|tinyblob|tinyint|tinytext|text|bigint|int|int1|int2|int3|int4|int8|integer|float|float4|float8|double|char|varbinary|varchar|varcharacter|precision|date|datetime|year|unsigned|signed|numeric" + var variable = "charset|clear|connect|edit|ego|exit|go|help|nopager|notee|nowarning|pager|print|prompt|quit|rehash|source|status|system|tee" + + var keywordMapper = this.createKeywordMapper({ + "support.function": builtins, + "keyword": mySqlKeywords, + "constant": "false|true|null|unknown|date|time|timestamp|ODBCdotTable|zerolessFloat", + "variable.language": variable + }, "identifier", true); + + + function string(rule) { + var start = rule.start; + var escapeSeq = rule.escape; + return { + token: "string.start", + regex: start, + next: [ + {token: "constant.language.escape", regex: escapeSeq}, + {token: "string.end", next: "start", regex: start}, + {defaultToken: "string"} + ] + }; + } + + this.$rules = { + "start" : [ { + token : "comment", regex : "(?:-- |#).*$" + }, + string({start: '"', escape: /\\[0'"bnrtZ\\%_]?/}), + string({start: "'", escape: /\\[0'"bnrtZ\\%_]?/}), + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : /\/\*/, + next : "comment" + }, { + token : "constant.numeric", // hex + regex : /0[xX][0-9a-fA-F]+|[xX]'[0-9a-fA-F]+'|0[bB][01]+|[bB]'[01]+'/ + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "constant.class", + regex : "@@?[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "constant.buildin", + regex : "`[^`]*`" + }, { + token : "keyword.operator", + regex : "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=" + }, { + token : "paren.lparen", + regex : "[\\(]" + }, { + token : "paren.rparen", + regex : "[\\)]" + }, { + token : "text", + regex : "\\s+" + } ], + "comment" : [ + {token : "comment", regex : "\\*\\/", next : "start"}, + {defaultToken : "comment"} + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("start") ]); + this.normalizeRules(); +}; + +oop.inherits(MysqlHighlightRules, TextHighlightRules); + +exports.MysqlHighlightRules = MysqlHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/nix.js b/pitfall/pdfkit/node_modules/brace/mode/nix.js new file mode 100644 index 00000000..0fc6b945 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/nix.js @@ -0,0 +1,928 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2012, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * Contributor(s): + * + * Zef Hemel + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/nix', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/c_cpp', 'ace/tokenizer', 'ace/mode/nix_highlight_rules', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var CMode = acequire("./c_cpp").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var NixHighlightRules = acequire("./nix_highlight_rules").NixHighlightRules; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + CMode.call(this); + this.HighlightRules = NixHighlightRules; + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, CMode); + +(function() { + this.lineCommentStart = "#"; + this.blockComment = {start: "/*", end: "*/"}; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/c_cpp', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/c_cpp_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var c_cppHighlightRules = acequire("./c_cpp_highlight_rules").c_cppHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = c_cppHighlightRules; + + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } else if (state == "doc-start") { + if (endState == "start") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); +ace.define('ace/mode/c_cpp_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var cFunctions = exports.cFunctions = "\\s*\\bhypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len)))\\b" + +var c_cppHighlightRules = function() { + + var keywordControls = ( + "break|case|continue|default|do|else|for|goto|if|_Pragma|" + + "return|switch|while|catch|operator|try|throw|using" + ); + + var storageType = ( + "asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" + + "_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|" + + "class|wchar_t|template" + ); + + var storageModifiers = ( + "const|extern|register|restrict|static|volatile|inline|private:|" + + "protected:|public:|friend|explicit|virtual|export|mutable|typename" + ); + + var keywordOperators = ( + "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq" + + "const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace" + ); + + var builtinConstants = ( + "NULL|true|false|TRUE|FALSE" + ); + + var keywordMapper = this.$keywords = this.createKeywordMapper({ + "keyword.control" : keywordControls, + "storage.type" : storageType, + "storage.modifier" : storageModifiers, + "keyword.operator" : keywordOperators, + "variable.language": "this", + "constant.language": builtinConstants + }, "identifier"); + + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\d\\$_\u00a1-\uffff]*\\b"; + + this.$rules = { + "start" : [ + { + token : "comment", + regex : "\\/\\/.*$" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // multi line string start + regex : '["].*\\\\$', + next : "qqstring" + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : "string", // multi line string start + regex : "['].*\\\\$", + next : "qstring" + }, { + token : "constant.numeric", // hex + regex : "0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" + }, { + token : "keyword", // pre-compiler directives + regex : "#\\s*(?:include|import|pragma|line|define|undef|if|ifdef|else|elif|ifndef)\\b", + next : "directive" + }, { + token : "keyword", // special case pre-compiler directive + regex : "(?:#\\s*endif)\\b" + }, { + token : "support.function.C99.c", + regex : cFunctions + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator", + regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)" + }, { + token : "punctuation.operator", + regex : "\\?|\\:|\\,|\\;|\\." + }, { + token : "paren.lparen", + regex : "[[({]" + }, { + token : "paren.rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + } + ], + "comment" : [ + { + token : "comment", // closing comment + regex : ".*?\\*\\/", + next : "start" + }, { + token : "comment", // comment spanning whole line + regex : ".+" + } + ], + "qqstring" : [ + { + token : "string", + regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', + next : "start" + }, { + token : "string", + regex : '.+' + } + ], + "qstring" : [ + { + token : "string", + regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", + next : "start" + }, { + token : "string", + regex : '.+' + } + ], + "directive" : [ + { + token : "constant.other.multiline", + regex : /\\/ + }, + { + token : "constant.other.multiline", + regex : /.*\\/ + }, + { + token : "constant.other", + regex : "\\s*<.+?>", + next : "start" + }, + { + token : "constant.other", // single line + regex : '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]', + next : "start" + }, + { + token : "constant.other", // single line + regex : "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']", + next : "start" + }, + { + token : "constant.other", + regex : /[^\\\/]+/, + next : "start" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("start") ]); +}; + +oop.inherits(c_cppHighlightRules, TextHighlightRules); + +exports.c_cppHighlightRules = c_cppHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); +ace.define('ace/mode/nix_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + + var oop = acequire("../lib/oop"); + var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + + var NixHighlightRules = function() { + + var constantLanguage = "true|false"; + var keywordControl = "with|import|if|else|then|inherit"; + var keywordDeclaration = "let|in|rec"; + + var keywordMapper = this.createKeywordMapper({ + "constant.language.nix": constantLanguage, + "keyword.control.nix": keywordControl, + "keyword.declaration.nix": keywordDeclaration + }, "identifier"); + + this.$rules = { + "start": [{ + token: "comment", + regex: /#.*$/ + }, { + token: "comment", + regex: /\/\*/, + next: "comment" + }, { + token: "constant", + regex: "<[^>]+>" + }, { + regex: "(==|!=|<=?|>=?)", + token: ["keyword.operator.comparison.nix"] + }, { + regex: "((?:[+*/%-]|\\~)=)", + token: ["keyword.operator.assignment.arithmetic.nix"] + }, { + regex: "=", + token: "keyword.operator.assignment.nix" + }, { + token: "string", + regex: "''", + next: "qqdoc" + }, { + token: "string", + regex: "'", + next: "qstring" + }, { + token: "string", + regex: '"', + push: "qqstring" + }, { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F]+\\b" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + regex: "}", + token: function(val, start, stack) { + return stack[1] && stack[1].charAt(0) == "q" ? "constant.language.escape" : "text"; + }, + next: "pop" + }], + "comment": [{ + token: "comment", // closing comment + regex: ".*?\\*\\/", + next: "start" + }, { + token: "comment", // comment spanning whole line + regex: ".+" + }], + "qqdoc": [ + { + token: "constant.language.escape", + regex: /\$\{/, + push: "start" + }, { + token: "string", + regex: "''", + next: "pop" + }, { + defaultToken: "string" + }], + "qqstring": [ + { + token: "constant.language.escape", + regex: /\$\{/, + push: "start" + }, { + token: "string", + regex: '"', + next: "pop" + }, { + defaultToken: "string" + }], + "qstring": [ + { + token: "constant.language.escape", + regex: /\$\{/, + push: "start" + }, { + token: "string", + regex: "'", + next: "pop" + }, { + defaultToken: "string" + }] + }; + + this.normalizeRules(); + }; + + oop.inherits(NixHighlightRules, TextHighlightRules); + + exports.NixHighlightRules = NixHighlightRules; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/brace/mode/objectivec.js b/pitfall/pdfkit/node_modules/brace/mode/objectivec.js new file mode 100644 index 00000000..32d232e6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/objectivec.js @@ -0,0 +1,698 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2012, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * Contributor(s): + * + * + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/objectivec', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/objectivec_highlight_rules', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var ObjectiveCHighlightRules = acequire("./objectivec_highlight_rules").ObjectiveCHighlightRules; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = ObjectiveCHighlightRules; + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; +}).call(Mode.prototype); + +exports.Mode = Mode; +});ace.define('ace/mode/objectivec_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/c_cpp_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var C_Highlight_File = acequire("./c_cpp_highlight_rules"); +var CHighlightRules = C_Highlight_File.c_cppHighlightRules; + +var ObjectiveCHighlightRules = function() { + + var escapedConstRe = "\\\\(?:[abefnrtv'\"?\\\\]|" + + "[0-3]\\d{1,2}|" + + "[4-7]\\d?|" + + "222|" + + "x[a-zA-Z0-9]+)"; + + var specialVariables = [{ + regex: "\\b_cmd\\b", + token: "variable.other.selector.objc" + }, { + regex: "\\b(?:self|super)\\b", + token: "variable.language.objc" + } + ]; + + var cObj = new CHighlightRules(); + var cRules = cObj.getRules(); + + this.$rules = { + "start": [ + { + token : "comment", + regex : "\\/\\/.*$" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment" + }, + { + token: [ "storage.type.objc", "punctuation.definition.storage.type.objc", + "entity.name.type.objc", "text", "entity.other.inherited-class.objc" + ], + regex: "(@)(interface|protocol)(?!.+;)(\\s+[A-Za-z_][A-Za-z0-9_]*)(\\s*:\\s*)([A-Za-z]+)" + }, + { + token: [ "storage.type.objc" ], + regex: "(@end)" + }, + { + token: [ "storage.type.objc", "entity.name.type.objc", + "entity.other.inherited-class.objc" + ], + regex: "(@implementation)(\\s+[A-Za-z_][A-Za-z0-9_]*)(\\s*?::\\s*(?:[A-Za-z][A-Za-z0-9]*))?" + }, + { + token: "string.begin.objc", + regex: '@"', + next: "constant_NSString" + }, + { + token: "storage.type.objc", + regex: "\\bid\\s*<", + next: "protocol_list" + }, + { + token: "keyword.control.macro.objc", + regex: "\\bNS_DURING|NS_HANDLER|NS_ENDHANDLER\\b" + }, + { + token: ["punctuation.definition.keyword.objc", "keyword.control.exception.objc"], + regex: "(@)(try|catch|finally|throw)\\b" + }, + { + token: ["punctuation.definition.keyword.objc", "keyword.other.objc"], + regex: "(@)(defs|encode)\\b" + }, + { + token: ["storage.type.id.objc", "text"], + regex: "(\\bid\\b)(\\s|\\n)?" + }, + { + token: "storage.type.objc", + regex: "\\bIBOutlet|IBAction|BOOL|SEL|id|unichar|IMP|Class\\b" + }, + { + token: [ "punctuation.definition.storage.type.objc", "storage.type.objc"], + regex: "(@)(class|protocol)\\b" + }, + { + token: [ "punctuation.definition.storage.type.objc", "punctuation"], + regex: "(@selector)(\\s*\\()", + next: "selectors" + }, + { + token: [ "punctuation.definition.storage.modifier.objc", "storage.modifier.objc"], + regex: "(@)(synchronized|public|private|protected|package)\\b" + }, + { + token: "constant.language.objc", + regex: "\\bYES|NO|Nil|nil\\b" + }, + { + token: "support.variable.foundation", + regex: "\\bNSApp\\b" + }, + { + token: [ "support.function.cocoa.leopard"], + regex: "(?:\\b)(NS(?:Rect(?:ToCGRect|FromCGRect)|MakeCollectable|S(?:tringFromProtocol|ize(?:ToCGSize|FromCGSize))|Draw(?:NinePartImage|ThreePartImage)|P(?:oint(?:ToCGPoint|FromCGPoint)|rotocolFromString)|EventMaskFromType|Value))(?:\\b)" + }, + { + token: ["support.function.cocoa"], + regex: "(?:\\b)(NS(?:R(?:ound(?:DownToMultipleOfPageSize|UpToMultipleOfPageSize)|un(?:CriticalAlertPanel(?:RelativeToWindow)?|InformationalAlertPanel(?:RelativeToWindow)?|AlertPanel(?:RelativeToWindow)?)|e(?:set(?:MapTable|HashTable)|c(?:ycleZone|t(?:Clip(?:List)?|F(?:ill(?:UsingOperation|List(?:UsingOperation|With(?:Grays|Colors(?:UsingOperation)?))?)?|romString))|ordAllocationEvent)|turnAddress|leaseAlertPanel|a(?:dPixel|l(?:MemoryAvailable|locateCollectable))|gisterServicesProvider)|angeFromString)|Get(?:SizeAndAlignment|CriticalAlertPanel|InformationalAlertPanel|UncaughtExceptionHandler|FileType(?:s)?|WindowServerMemory|AlertPanel)|M(?:i(?:n(?:X|Y)|d(?:X|Y))|ouseInRect|a(?:p(?:Remove|Get|Member|Insert(?:IfAbsent|KnownAbsent)?)|ke(?:R(?:ect|ange)|Size|Point)|x(?:Range|X|Y)))|B(?:itsPer(?:SampleFromDepth|PixelFromDepth)|e(?:stDepth|ep|gin(?:CriticalAlertSheet|InformationalAlertSheet|AlertSheet)))|S(?:ho(?:uldRetainWithZone|w(?:sServicesMenuItem|AnimationEffect))|tringFrom(?:R(?:ect|ange)|MapTable|S(?:ize|elector)|HashTable|Class|Point)|izeFromString|e(?:t(?:ShowsServicesMenuItem|ZoneName|UncaughtExceptionHandler|FocusRingStyle)|lectorFromString|archPathForDirectoriesInDomains)|wap(?:Big(?:ShortToHost|IntToHost|DoubleToHost|FloatToHost|Long(?:ToHost|LongToHost))|Short|Host(?:ShortTo(?:Big|Little)|IntTo(?:Big|Little)|DoubleTo(?:Big|Little)|FloatTo(?:Big|Little)|Long(?:To(?:Big|Little)|LongTo(?:Big|Little)))|Int|Double|Float|L(?:ittle(?:ShortToHost|IntToHost|DoubleToHost|FloatToHost|Long(?:ToHost|LongToHost))|ong(?:Long)?)))|H(?:ighlightRect|o(?:stByteOrder|meDirectory(?:ForUser)?)|eight|ash(?:Remove|Get|Insert(?:IfAbsent|KnownAbsent)?)|FSType(?:CodeFromFileType|OfFile))|N(?:umberOfColorComponents|ext(?:MapEnumeratorPair|HashEnumeratorItem))|C(?:o(?:n(?:tainsRect|vert(?:GlyphsToPackedGlyphs|Swapped(?:DoubleToHost|FloatToHost)|Host(?:DoubleToSwapped|FloatToSwapped)))|unt(?:MapTable|HashTable|Frames|Windows(?:ForContext)?)|py(?:M(?:emoryPages|apTableWithZone)|Bits|HashTableWithZone|Object)|lorSpaceFromDepth|mpare(?:MapTables|HashTables))|lassFromString|reate(?:MapTable(?:WithZone)?|HashTable(?:WithZone)?|Zone|File(?:namePboardType|ContentsPboardType)))|TemporaryDirectory|I(?:s(?:ControllerMarker|EmptyRect|FreedObject)|n(?:setRect|crementExtraRefCount|te(?:r(?:sect(?:sRect|ionR(?:ect|ange))|faceStyleForKey)|gralRect)))|Zone(?:Realloc|Malloc|Name|Calloc|Fr(?:omPointer|ee))|O(?:penStepRootDirectory|ffsetRect)|D(?:i(?:sableScreenUpdates|videRect)|ottedFrameRect|e(?:c(?:imal(?:Round|Multiply|S(?:tring|ubtract)|Normalize|Co(?:py|mpa(?:ct|re))|IsNotANumber|Divide|Power|Add)|rementExtraRefCountWasZero)|faultMallocZone|allocate(?:MemoryPages|Object))|raw(?:Gr(?:oove|ayBezel)|B(?:itmap|utton)|ColorTiledRects|TiledRects|DarkBezel|W(?:hiteBezel|indowBackground)|LightBezel))|U(?:serName|n(?:ionR(?:ect|ange)|registerServicesProvider)|pdateDynamicServices)|Java(?:Bundle(?:Setup|Cleanup)|Setup(?:VirtualMachine)?|Needs(?:ToLoadClasses|VirtualMachine)|ClassesF(?:orBundle|romPath)|ObjectNamedInPath|ProvidesClasses)|P(?:oint(?:InRect|FromString)|erformService|lanarFromDepth|ageSize)|E(?:n(?:d(?:MapTableEnumeration|HashTableEnumeration)|umerate(?:MapTable|HashTable)|ableScreenUpdates)|qual(?:R(?:ects|anges)|Sizes|Points)|raseRect|xtraRefCount)|F(?:ileTypeForHFSTypeCode|ullUserName|r(?:ee(?:MapTable|HashTable)|ame(?:Rect(?:WithWidth(?:UsingOperation)?)?|Address)))|Wi(?:ndowList(?:ForContext)?|dth)|Lo(?:cationInRange|g(?:v|PageSize)?)|A(?:ccessibility(?:R(?:oleDescription(?:ForUIElement)?|aiseBadArgumentException)|Unignored(?:Children(?:ForOnlyChild)?|Descendant|Ancestor)|PostNotification|ActionDescription)|pplication(?:Main|Load)|vailableWindowDepths|ll(?:MapTable(?:Values|Keys)|HashTableObjects|ocate(?:MemoryPages|Collectable|Object)))))(?:\\b)" + }, + { + token: ["support.class.cocoa.leopard"], + regex: "(?:\\b)(NS(?:RuleEditor|G(?:arbageCollector|radient)|MapTable|HashTable|Co(?:ndition|llectionView(?:Item)?)|T(?:oolbarItemGroup|extInputClient|r(?:eeNode|ackingArea))|InvocationOperation|Operation(?:Queue)?|D(?:ictionaryController|ockTile)|P(?:ointer(?:Functions|Array)|athC(?:o(?:ntrol(?:Delegate)?|mponentCell)|ell(?:Delegate)?)|r(?:intPanelAccessorizing|edicateEditor(?:RowTemplate)?))|ViewController|FastEnumeration|Animat(?:ionContext|ablePropertyContainer)))(?:\\b)" + }, + { + token: ["support.class.cocoa"], + regex: "(?:\\b)(NS(?:R(?:u(?:nLoop|ler(?:Marker|View))|e(?:sponder|cursiveLock|lativeSpecifier)|an(?:domSpecifier|geSpecifier))|G(?:etCommand|lyph(?:Generator|Storage|Info)|raphicsContext)|XML(?:Node|D(?:ocument|TD(?:Node)?)|Parser|Element)|M(?:iddleSpecifier|ov(?:ie(?:View)?|eCommand)|utable(?:S(?:tring|et)|C(?:haracterSet|opying)|IndexSet|D(?:ictionary|ata)|URLRequest|ParagraphStyle|A(?:ttributedString|rray))|e(?:ssagePort(?:NameServer)?|nu(?:Item(?:Cell)?|View)?|t(?:hodSignature|adata(?:Item|Query(?:ResultGroup|AttributeValueTuple)?)))|a(?:ch(?:BootstrapServer|Port)|trix))|B(?:itmapImageRep|ox|u(?:ndle|tton(?:Cell)?)|ezierPath|rowser(?:Cell)?)|S(?:hadow|c(?:anner|r(?:ipt(?:SuiteRegistry|C(?:o(?:ercionHandler|mmand(?:Description)?)|lassDescription)|ObjectSpecifier|ExecutionContext|WhoseTest)|oll(?:er|View)|een))|t(?:epper(?:Cell)?|atus(?:Bar|Item)|r(?:ing|eam))|imple(?:HorizontalTypesetter|CString)|o(?:cketPort(?:NameServer)?|und|rtDescriptor)|p(?:e(?:cifierTest|ech(?:Recognizer|Synthesizer)|ll(?:Server|Checker))|litView)|e(?:cureTextField(?:Cell)?|t(?:Command)?|archField(?:Cell)?|rializer|gmentedC(?:ontrol|ell))|lider(?:Cell)?|avePanel)|H(?:ost|TTP(?:Cookie(?:Storage)?|URLResponse)|elpManager)|N(?:ib(?:Con(?:nector|trolConnector)|OutletConnector)?|otification(?:Center|Queue)?|u(?:ll|mber(?:Formatter)?)|etService(?:Browser)?|ameSpecifier)|C(?:ha(?:ngeSpelling|racterSet)|o(?:n(?:stantString|nection|trol(?:ler)?|ditionLock)|d(?:ing|er)|unt(?:Command|edSet)|pying|lor(?:Space|P(?:ick(?:ing(?:Custom|Default)|er)|anel)|Well|List)?|m(?:p(?:oundPredicate|arisonPredicate)|boBox(?:Cell)?))|u(?:stomImageRep|rsor)|IImageRep|ell|l(?:ipView|o(?:seCommand|neCommand)|assDescription)|a(?:ched(?:ImageRep|URLResponse)|lendar(?:Date)?)|reateCommand)|T(?:hread|ypesetter|ime(?:Zone|r)|o(?:olbar(?:Item(?:Validations)?)?|kenField(?:Cell)?)|ext(?:Block|Storage|Container|Tab(?:le(?:Block)?)?|Input|View|Field(?:Cell)?|List|Attachment(?:Cell)?)?|a(?:sk|b(?:le(?:Header(?:Cell|View)|Column|View)|View(?:Item)?))|reeController)|I(?:n(?:dex(?:S(?:pecifier|et)|Path)|put(?:Manager|S(?:tream|erv(?:iceProvider|er(?:MouseTracker)?)))|vocation)|gnoreMisspelledWords|mage(?:Rep|Cell|View)?)|O(?:ut(?:putStream|lineView)|pen(?:GL(?:Context|Pixel(?:Buffer|Format)|View)|Panel)|bj(?:CTypeSerializationCallBack|ect(?:Controller)?))|D(?:i(?:st(?:antObject(?:Request)?|ributed(?:NotificationCenter|Lock))|ctionary|rectoryEnumerator)|ocument(?:Controller)?|e(?:serializer|cimalNumber(?:Behaviors|Handler)?|leteCommand)|at(?:e(?:Components|Picker(?:Cell)?|Formatter)?|a)|ra(?:wer|ggingInfo))|U(?:ser(?:InterfaceValidations|Defaults(?:Controller)?)|RL(?:Re(?:sponse|quest)|Handle(?:Client)?|C(?:onnection|ache|redential(?:Storage)?)|Download(?:Delegate)?|Prot(?:ocol(?:Client)?|ectionSpace)|AuthenticationChallenge(?:Sender)?)?|n(?:iqueIDSpecifier|doManager|archiver))|P(?:ipe|o(?:sitionalSpecifier|pUpButton(?:Cell)?|rt(?:Message|NameServer|Coder)?)|ICTImageRep|ersistentDocument|DFImageRep|a(?:steboard|nel|ragraphStyle|geLayout)|r(?:int(?:Info|er|Operation|Panel)|o(?:cessInfo|tocolChecker|perty(?:Specifier|ListSerialization)|gressIndicator|xy)|edicate))|E(?:numerator|vent|PSImageRep|rror|x(?:ception|istsCommand|pression))|V(?:iew(?:Animation)?|al(?:idated(?:ToobarItem|UserInterfaceItem)|ue(?:Transformer)?))|Keyed(?:Unarchiver|Archiver)|Qui(?:ckDrawView|tCommand)|F(?:ile(?:Manager|Handle|Wrapper)|o(?:nt(?:Manager|Descriptor|Panel)?|rm(?:Cell|atter)))|W(?:hoseSpecifier|indow(?:Controller)?|orkspace)|L(?:o(?:c(?:k(?:ing)?|ale)|gicalTest)|evelIndicator(?:Cell)?|ayoutManager)|A(?:ssertionHandler|nimation|ctionCell|ttributedString|utoreleasePool|TSTypesetter|ppl(?:ication|e(?:Script|Event(?:Manager|Descriptor)))|ffineTransform|lert|r(?:chiver|ray(?:Controller)?))))(?:\\b)" + }, + { + token: ["support.type.cocoa.leopard"], + regex: "(?:\\b)(NS(?:R(?:u(?:nLoop|ler(?:Marker|View))|e(?:sponder|cursiveLock|lativeSpecifier)|an(?:domSpecifier|geSpecifier))|G(?:etCommand|lyph(?:Generator|Storage|Info)|raphicsContext)|XML(?:Node|D(?:ocument|TD(?:Node)?)|Parser|Element)|M(?:iddleSpecifier|ov(?:ie(?:View)?|eCommand)|utable(?:S(?:tring|et)|C(?:haracterSet|opying)|IndexSet|D(?:ictionary|ata)|URLRequest|ParagraphStyle|A(?:ttributedString|rray))|e(?:ssagePort(?:NameServer)?|nu(?:Item(?:Cell)?|View)?|t(?:hodSignature|adata(?:Item|Query(?:ResultGroup|AttributeValueTuple)?)))|a(?:ch(?:BootstrapServer|Port)|trix))|B(?:itmapImageRep|ox|u(?:ndle|tton(?:Cell)?)|ezierPath|rowser(?:Cell)?)|S(?:hadow|c(?:anner|r(?:ipt(?:SuiteRegistry|C(?:o(?:ercionHandler|mmand(?:Description)?)|lassDescription)|ObjectSpecifier|ExecutionContext|WhoseTest)|oll(?:er|View)|een))|t(?:epper(?:Cell)?|atus(?:Bar|Item)|r(?:ing|eam))|imple(?:HorizontalTypesetter|CString)|o(?:cketPort(?:NameServer)?|und|rtDescriptor)|p(?:e(?:cifierTest|ech(?:Recognizer|Synthesizer)|ll(?:Server|Checker))|litView)|e(?:cureTextField(?:Cell)?|t(?:Command)?|archField(?:Cell)?|rializer|gmentedC(?:ontrol|ell))|lider(?:Cell)?|avePanel)|H(?:ost|TTP(?:Cookie(?:Storage)?|URLResponse)|elpManager)|N(?:ib(?:Con(?:nector|trolConnector)|OutletConnector)?|otification(?:Center|Queue)?|u(?:ll|mber(?:Formatter)?)|etService(?:Browser)?|ameSpecifier)|C(?:ha(?:ngeSpelling|racterSet)|o(?:n(?:stantString|nection|trol(?:ler)?|ditionLock)|d(?:ing|er)|unt(?:Command|edSet)|pying|lor(?:Space|P(?:ick(?:ing(?:Custom|Default)|er)|anel)|Well|List)?|m(?:p(?:oundPredicate|arisonPredicate)|boBox(?:Cell)?))|u(?:stomImageRep|rsor)|IImageRep|ell|l(?:ipView|o(?:seCommand|neCommand)|assDescription)|a(?:ched(?:ImageRep|URLResponse)|lendar(?:Date)?)|reateCommand)|T(?:hread|ypesetter|ime(?:Zone|r)|o(?:olbar(?:Item(?:Validations)?)?|kenField(?:Cell)?)|ext(?:Block|Storage|Container|Tab(?:le(?:Block)?)?|Input|View|Field(?:Cell)?|List|Attachment(?:Cell)?)?|a(?:sk|b(?:le(?:Header(?:Cell|View)|Column|View)|View(?:Item)?))|reeController)|I(?:n(?:dex(?:S(?:pecifier|et)|Path)|put(?:Manager|S(?:tream|erv(?:iceProvider|er(?:MouseTracker)?)))|vocation)|gnoreMisspelledWords|mage(?:Rep|Cell|View)?)|O(?:ut(?:putStream|lineView)|pen(?:GL(?:Context|Pixel(?:Buffer|Format)|View)|Panel)|bj(?:CTypeSerializationCallBack|ect(?:Controller)?))|D(?:i(?:st(?:antObject(?:Request)?|ributed(?:NotificationCenter|Lock))|ctionary|rectoryEnumerator)|ocument(?:Controller)?|e(?:serializer|cimalNumber(?:Behaviors|Handler)?|leteCommand)|at(?:e(?:Components|Picker(?:Cell)?|Formatter)?|a)|ra(?:wer|ggingInfo))|U(?:ser(?:InterfaceValidations|Defaults(?:Controller)?)|RL(?:Re(?:sponse|quest)|Handle(?:Client)?|C(?:onnection|ache|redential(?:Storage)?)|Download(?:Delegate)?|Prot(?:ocol(?:Client)?|ectionSpace)|AuthenticationChallenge(?:Sender)?)?|n(?:iqueIDSpecifier|doManager|archiver))|P(?:ipe|o(?:sitionalSpecifier|pUpButton(?:Cell)?|rt(?:Message|NameServer|Coder)?)|ICTImageRep|ersistentDocument|DFImageRep|a(?:steboard|nel|ragraphStyle|geLayout)|r(?:int(?:Info|er|Operation|Panel)|o(?:cessInfo|tocolChecker|perty(?:Specifier|ListSerialization)|gressIndicator|xy)|edicate))|E(?:numerator|vent|PSImageRep|rror|x(?:ception|istsCommand|pression))|V(?:iew(?:Animation)?|al(?:idated(?:ToobarItem|UserInterfaceItem)|ue(?:Transformer)?))|Keyed(?:Unarchiver|Archiver)|Qui(?:ckDrawView|tCommand)|F(?:ile(?:Manager|Handle|Wrapper)|o(?:nt(?:Manager|Descriptor|Panel)?|rm(?:Cell|atter)))|W(?:hoseSpecifier|indow(?:Controller)?|orkspace)|L(?:o(?:c(?:k(?:ing)?|ale)|gicalTest)|evelIndicator(?:Cell)?|ayoutManager)|A(?:ssertionHandler|nimation|ctionCell|ttributedString|utoreleasePool|TSTypesetter|ppl(?:ication|e(?:Script|Event(?:Manager|Descriptor)))|ffineTransform|lert|r(?:chiver|ray(?:Controller)?))))(?:\\b)" + }, + { + token: ["support.class.quartz"], + regex: "(?:\\b)(C(?:I(?:Sampler|Co(?:ntext|lor)|Image(?:Accumulator)?|PlugIn(?:Registration)?|Vector|Kernel|Filter(?:Generator|Shape)?)|A(?:Renderer|MediaTiming(?:Function)?|BasicAnimation|ScrollLayer|Constraint(?:LayoutManager)?|T(?:iledLayer|extLayer|rans(?:ition|action))|OpenGLLayer|PropertyAnimation|KeyframeAnimation|Layer|A(?:nimation(?:Group)?|ction))))(?:\\b)" + }, + { + token: ["support.type.quartz"], + regex: "(?:\\b)(C(?:G(?:Float|Point|Size|Rect)|IFormat|AConstraintAttribute))(?:\\b)" + }, + { + token: ["support.type.cocoa"], + regex: "(?:\\b)(NS(?:R(?:ect(?:Edge)?|ange)|G(?:lyph(?:Relation|LayoutMode)?|radientType)|M(?:odalSession|a(?:trixMode|p(?:Table|Enumerator)))|B(?:itmapImageFileType|orderType|uttonType|ezelStyle|ackingStoreType|rowserColumnResizingType)|S(?:cr(?:oll(?:er(?:Part|Arrow)|ArrowPosition)|eenAuxiliaryOpaque)|tringEncoding|ize|ocketNativeHandle|election(?:Granularity|Direction|Affinity)|wapped(?:Double|Float)|aveOperationType)|Ha(?:sh(?:Table|Enumerator)|ndler(?:2)?)|C(?:o(?:ntrol(?:Size|Tint)|mp(?:ositingOperation|arisonResult))|ell(?:State|Type|ImagePosition|Attribute))|T(?:hreadPrivate|ypesetterGlyphInfo|i(?:ckMarkPosition|tlePosition|meInterval)|o(?:ol(?:TipTag|bar(?:SizeMode|DisplayMode))|kenStyle)|IFFCompression|ext(?:TabType|Alignment)|ab(?:State|leViewDropOperation|ViewType)|rackingRectTag)|ImageInterpolation|Zone|OpenGL(?:ContextAuxiliary|PixelFormatAuxiliary)|D(?:ocumentChangeType|atePickerElementFlags|ra(?:werState|gOperation))|UsableScrollerParts|P(?:oint|r(?:intingPageOrder|ogressIndicator(?:Style|Th(?:ickness|readInfo))))|EventType|KeyValueObservingOptions|Fo(?:nt(?:SymbolicTraits|TraitMask|Action)|cusRingType)|W(?:indow(?:OrderingMode|Depth)|orkspace(?:IconCreationOptions|LaunchOptions)|ritingDirection)|L(?:ineBreakMode|ayout(?:Status|Direction))|A(?:nimation(?:Progress|Effect)|ppl(?:ication(?:TerminateReply|DelegateReply|PrintReply)|eEventManagerSuspensionID)|ffineTransformStruct|lertStyle)))(?:\\b)" + }, + { + token: ["support.constant.cocoa"], + regex: "(?:\\b)(NS(?:NotFound|Ordered(?:Ascending|Descending|Same)))(?:\\b)" + }, + { + token: ["support.constant.notification.cocoa.leopard"], + regex: "(?:\\b)(NS(?:MenuDidBeginTracking|ViewDidUpdateTrackingAreas)?Notification)(?:\\b)" + }, + { + token: ["support.constant.notification.cocoa"], + regex: "(?:\\b)(NS(?:Menu(?:Did(?:RemoveItem|SendAction|ChangeItem|EndTracking|AddItem)|WillSendAction)|S(?:ystemColorsDidChange|plitView(?:DidResizeSubviews|WillResizeSubviews))|C(?:o(?:nt(?:extHelpModeDid(?:Deactivate|Activate)|rolT(?:intDidChange|extDid(?:BeginEditing|Change|EndEditing)))|lor(?:PanelColorDidChange|ListDidChange)|mboBox(?:Selection(?:IsChanging|DidChange)|Will(?:Dismiss|PopUp)))|lassDescriptionNeededForClass)|T(?:oolbar(?:DidRemoveItem|WillAddItem)|ext(?:Storage(?:DidProcessEditing|WillProcessEditing)|Did(?:BeginEditing|Change|EndEditing)|View(?:DidChange(?:Selection|TypingAttributes)|WillChangeNotifyingTextView))|ableView(?:Selection(?:IsChanging|DidChange)|ColumnDid(?:Resize|Move)))|ImageRepRegistryDidChange|OutlineView(?:Selection(?:IsChanging|DidChange)|ColumnDid(?:Resize|Move)|Item(?:Did(?:Collapse|Expand)|Will(?:Collapse|Expand)))|Drawer(?:Did(?:Close|Open)|Will(?:Close|Open))|PopUpButton(?:CellWillPopUp|WillPopUp)|View(?:GlobalFrameDidChange|BoundsDidChange|F(?:ocusDidChange|rameDidChange))|FontSetChanged|W(?:indow(?:Did(?:Resi(?:ze|gn(?:Main|Key))|M(?:iniaturize|ove)|Become(?:Main|Key)|ChangeScreen(?:|Profile)|Deminiaturize|Update|E(?:ndSheet|xpose))|Will(?:M(?:iniaturize|ove)|BeginSheet|Close))|orkspace(?:SessionDid(?:ResignActive|BecomeActive)|Did(?:Mount|TerminateApplication|Unmount|PerformFileOperation|Wake|LaunchApplication)|Will(?:Sleep|Unmount|PowerOff|LaunchApplication)))|A(?:ntialiasThresholdChanged|ppl(?:ication(?:Did(?:ResignActive|BecomeActive|Hide|ChangeScreenParameters|U(?:nhide|pdate)|FinishLaunching)|Will(?:ResignActive|BecomeActive|Hide|Terminate|U(?:nhide|pdate)|FinishLaunching))|eEventManagerWillProcessFirstEvent)))Notification)(?:\\b)" + }, + { + token: ["support.constant.cocoa.leopard"], + regex: "(?:\\b)(NS(?:RuleEditor(?:RowType(?:Simple|Compound)|NestingMode(?:Si(?:ngle|mple)|Compound|List))|GradientDraws(?:BeforeStartingLocation|AfterEndingLocation)|M(?:inusSetExpressionType|a(?:chPortDeallocate(?:ReceiveRight|SendRight|None)|pTable(?:StrongMemory|CopyIn|ZeroingWeakMemory|ObjectPointerPersonality)))|B(?:oxCustom|undleExecutableArchitecture(?:X86|I386|PPC(?:64)?)|etweenPredicateOperatorType|ackgroundStyle(?:Raised|Dark|L(?:ight|owered)))|S(?:tring(?:DrawingTruncatesLastVisibleLine|EncodingConversion(?:ExternalRepresentation|AllowLossy))|ubqueryExpressionType|p(?:e(?:ech(?:SentenceBoundary|ImmediateBoundary|WordBoundary)|llingState(?:GrammarFlag|SpellingFlag))|litViewDividerStyleThi(?:n|ck))|e(?:rvice(?:RequestTimedOutError|M(?:iscellaneousError|alformedServiceDictionaryError)|InvalidPasteboardDataError|ErrorM(?:inimum|aximum)|Application(?:NotFoundError|LaunchFailedError))|gmentStyle(?:Round(?:Rect|ed)|SmallSquare|Capsule|Textured(?:Rounded|Square)|Automatic)))|H(?:UDWindowMask|ashTable(?:StrongMemory|CopyIn|ZeroingWeakMemory|ObjectPointerPersonality))|N(?:oModeColorPanel|etServiceNoAutoRename)|C(?:hangeRedone|o(?:ntainsPredicateOperatorType|l(?:orRenderingIntent(?:RelativeColorimetric|Saturation|Default|Perceptual|AbsoluteColorimetric)|lectorDisabledOption))|ellHit(?:None|ContentArea|TrackableArea|EditableTextArea))|T(?:imeZoneNameStyle(?:S(?:hort(?:Standard|DaylightSaving)|tandard)|DaylightSaving)|extFieldDatePickerStyle|ableViewSelectionHighlightStyle(?:Regular|SourceList)|racking(?:Mouse(?:Moved|EnteredAndExited)|CursorUpdate|InVisibleRect|EnabledDuringMouseDrag|A(?:ssumeInside|ctive(?:In(?:KeyWindow|ActiveApp)|WhenFirstResponder|Always))))|I(?:n(?:tersectSetExpressionType|dexedColorSpaceModel)|mageScale(?:None|Proportionally(?:Down|UpOrDown)|AxesIndependently))|Ope(?:nGLPFAAllowOfflineRenderers|rationQueue(?:DefaultMaxConcurrentOperationCount|Priority(?:High|Normal|Very(?:High|Low)|Low)))|D(?:iacriticInsensitiveSearch|ownloadsDirectory)|U(?:nionSetExpressionType|TF(?:16(?:BigEndianStringEncoding|StringEncoding|LittleEndianStringEncoding)|32(?:BigEndianStringEncoding|StringEncoding|LittleEndianStringEncoding)))|P(?:ointerFunctions(?:Ma(?:chVirtualMemory|llocMemory)|Str(?:ongMemory|uctPersonality)|C(?:StringPersonality|opyIn)|IntegerPersonality|ZeroingWeakMemory|O(?:paque(?:Memory|Personality)|bjectP(?:ointerPersonality|ersonality)))|at(?:hStyle(?:Standard|NavigationBar|PopUp)|ternColorSpaceModel)|rintPanelShows(?:Scaling|Copies|Orientation|P(?:a(?:perSize|ge(?:Range|SetupAccessory))|review)))|Executable(?:RuntimeMismatchError|NotLoadableError|ErrorM(?:inimum|aximum)|L(?:inkError|oadError)|ArchitectureMismatchError)|KeyValueObservingOption(?:Initial|Prior)|F(?:i(?:ndPanelSubstringMatchType(?:StartsWith|Contains|EndsWith|FullWord)|leRead(?:TooLargeError|UnknownStringEncodingError))|orcedOrderingSearch)|Wi(?:ndow(?:BackingLocation(?:MainMemory|Default|VideoMemory)|Sharing(?:Read(?:Only|Write)|None)|CollectionBehavior(?:MoveToActiveSpace|CanJoinAllSpaces|Default))|dthInsensitiveSearch)|AggregateExpressionType))(?:\\b)" + }, + { + token: ["support.constant.cocoa"], + regex: "(?:\\b)(NS(?:R(?:GB(?:ModeColorPanel|ColorSpaceModel)|ight(?:Mouse(?:D(?:own(?:Mask)?|ragged(?:Mask)?)|Up(?:Mask)?)|T(?:ext(?:Movement|Alignment)|ab(?:sBezelBorder|StopType))|ArrowFunctionKey)|ound(?:RectBezelStyle|Bankers|ed(?:BezelStyle|TokenStyle|DisclosureBezelStyle)|Down|Up|Plain|Line(?:CapStyle|JoinStyle))|un(?:StoppedResponse|ContinuesResponse|AbortedResponse)|e(?:s(?:izableWindowMask|et(?:CursorRectsRunLoopOrdering|FunctionKey))|ce(?:ssedBezelStyle|iver(?:sCantHandleCommandScriptError|EvaluationScriptError))|turnTextMovement|doFunctionKey|quiredArgumentsMissingScriptError|l(?:evancyLevelIndicatorStyle|ative(?:Before|After))|gular(?:SquareBezelStyle|ControlSize)|moveTraitFontAction)|a(?:n(?:domSubelement|geDateMode)|tingLevelIndicatorStyle|dio(?:ModeMatrix|Button)))|G(?:IFFileType|lyph(?:Below|Inscribe(?:B(?:elow|ase)|Over(?:strike|Below)|Above)|Layout(?:WithPrevious|A(?:tAPoint|gainstAPoint))|A(?:ttribute(?:BidiLevel|Soft|Inscribe|Elastic)|bove))|r(?:ooveBorder|eaterThan(?:Comparison|OrEqualTo(?:Comparison|PredicateOperatorType)|PredicateOperatorType)|a(?:y(?:ModeColorPanel|ColorSpaceModel)|dient(?:None|Con(?:cave(?:Strong|Weak)|vex(?:Strong|Weak)))|phiteControlTint)))|XML(?:N(?:o(?:tationDeclarationKind|de(?:CompactEmptyElement|IsCDATA|OptionsNone|Use(?:SingleQuotes|DoubleQuotes)|Pre(?:serve(?:NamespaceOrder|C(?:haracterReferences|DATA)|DTD|Prefixes|E(?:ntities|mptyElements)|Quotes|Whitespace|A(?:ttributeOrder|ll))|ttyPrint)|ExpandEmptyElement))|amespaceKind)|CommentKind|TextKind|InvalidKind|D(?:ocument(?:X(?:MLKind|HTMLKind|Include)|HTMLKind|T(?:idy(?:XML|HTML)|extKind)|IncludeContentTypeDeclaration|Validate|Kind)|TDKind)|P(?:arser(?:GTRequiredError|XMLDeclNot(?:StartedError|FinishedError)|Mi(?:splaced(?:XMLDeclarationError|CDATAEndStringError)|xedContentDeclNot(?:StartedError|FinishedError))|S(?:t(?:andaloneValueError|ringNot(?:StartedError|ClosedError))|paceRequiredError|eparatorRequiredError)|N(?:MTOKENRequiredError|o(?:t(?:ationNot(?:StartedError|FinishedError)|WellBalancedError)|DTDError)|amespaceDeclarationError|AMERequiredError)|C(?:haracterRef(?:In(?:DTDError|PrologError|EpilogError)|AtEOFError)|o(?:nditionalSectionNot(?:StartedError|FinishedError)|mment(?:NotFinishedError|ContainsDoubleHyphenError))|DATANotFinishedError)|TagNameMismatchError|In(?:ternalError|valid(?:HexCharacterRefError|C(?:haracter(?:RefError|InEntityError|Error)|onditionalSectionError)|DecimalCharacterRefError|URIError|Encoding(?:NameError|Error)))|OutOfMemoryError|D(?:ocumentStartError|elegateAbortedParseError|OCTYPEDeclNotFinishedError)|U(?:RI(?:RequiredError|FragmentError)|n(?:declaredEntityError|parsedEntityError|knownEncodingError|finishedTagError))|P(?:CDATARequiredError|ublicIdentifierRequiredError|arsedEntityRef(?:MissingSemiError|NoNameError|In(?:Internal(?:SubsetError|Error)|PrologError|EpilogError)|AtEOFError)|r(?:ocessingInstructionNot(?:StartedError|FinishedError)|ematureDocumentEndError))|E(?:n(?:codingNotSupportedError|tity(?:Ref(?:In(?:DTDError|PrologError|EpilogError)|erence(?:MissingSemiError|WithoutNameError)|LoopError|AtEOFError)|BoundaryError|Not(?:StartedError|FinishedError)|Is(?:ParameterError|ExternalError)|ValueRequiredError))|qualExpectedError|lementContentDeclNot(?:StartedError|FinishedError)|xt(?:ernalS(?:tandaloneEntityError|ubsetNotFinishedError)|raContentError)|mptyDocumentError)|L(?:iteralNot(?:StartedError|FinishedError)|T(?:RequiredError|SlashRequiredError)|essThanSymbolInAttributeError)|Attribute(?:RedefinedError|HasNoValueError|Not(?:StartedError|FinishedError)|ListNot(?:StartedError|FinishedError)))|rocessingInstructionKind)|E(?:ntity(?:GeneralKind|DeclarationKind|UnparsedKind|P(?:ar(?:sedKind|ameterKind)|redefined))|lement(?:Declaration(?:MixedKind|UndefinedKind|E(?:lementKind|mptyKind)|Kind|AnyKind)|Kind))|Attribute(?:N(?:MToken(?:sKind|Kind)|otationKind)|CDATAKind|ID(?:Ref(?:sKind|Kind)|Kind)|DeclarationKind|En(?:tit(?:yKind|iesKind)|umerationKind)|Kind))|M(?:i(?:n(?:XEdge|iaturizableWindowMask|YEdge|uteCalendarUnit)|terLineJoinStyle|ddleSubelement|xedState)|o(?:nthCalendarUnit|deSwitchFunctionKey|use(?:Moved(?:Mask)?|E(?:ntered(?:Mask)?|ventSubtype|xited(?:Mask)?))|veToBezierPathElement|mentary(?:ChangeButton|Push(?:Button|InButton)|Light(?:Button)?))|enuFunctionKey|a(?:c(?:intoshInterfaceStyle|OSRomanStringEncoding)|tchesPredicateOperatorType|ppedRead|x(?:XEdge|YEdge))|ACHOperatingSystem)|B(?:MPFileType|o(?:ttomTabsBezelBorder|ldFontMask|rderlessWindowMask|x(?:Se(?:condary|parator)|OldStyle|Primary))|uttLineCapStyle|e(?:zelBorder|velLineJoinStyle|low(?:Bottom|Top)|gin(?:sWith(?:Comparison|PredicateOperatorType)|FunctionKey))|lueControlTint|ack(?:spaceCharacter|tabTextMovement|ingStore(?:Retained|Buffered|Nonretained)|TabCharacter|wardsSearch|groundTab)|r(?:owser(?:NoColumnResizing|UserColumnResizing|AutoColumnResizing)|eakFunctionKey))|S(?:h(?:ift(?:JISStringEncoding|KeyMask)|ow(?:ControlGlyphs|InvisibleGlyphs)|adowlessSquareBezelStyle)|y(?:s(?:ReqFunctionKey|tem(?:D(?:omainMask|efined(?:Mask)?)|FunctionKey))|mbolStringEncoding)|c(?:a(?:nnedOption|le(?:None|ToFit|Proportionally))|r(?:oll(?:er(?:NoPart|Increment(?:Page|Line|Arrow)|Decrement(?:Page|Line|Arrow)|Knob(?:Slot)?|Arrows(?:M(?:inEnd|axEnd)|None|DefaultSetting))|Wheel(?:Mask)?|LockFunctionKey)|eenChangedEventType))|t(?:opFunctionKey|r(?:ingDrawing(?:OneShot|DisableScreenFontSubstitution|Uses(?:DeviceMetrics|FontLeading|LineFragmentOrigin))|eam(?:Status(?:Reading|NotOpen|Closed|Open(?:ing)?|Error|Writing|AtEnd)|Event(?:Has(?:BytesAvailable|SpaceAvailable)|None|OpenCompleted|E(?:ndEncountered|rrorOccurred)))))|i(?:ngle(?:DateMode|UnderlineStyle)|ze(?:DownFontAction|UpFontAction))|olarisOperatingSystem|unOSOperatingSystem|pecialPageOrder|e(?:condCalendarUnit|lect(?:By(?:Character|Paragraph|Word)|i(?:ng(?:Next|Previous)|onAffinity(?:Downstream|Upstream))|edTab|FunctionKey)|gmentSwitchTracking(?:Momentary|Select(?:One|Any)))|quareLineCapStyle|witchButton|ave(?:ToOperation|Op(?:tions(?:Yes|No|Ask)|eration)|AsOperation)|mall(?:SquareBezelStyle|C(?:ontrolSize|apsFontMask)|IconButtonBezelStyle))|H(?:ighlightModeMatrix|SBModeColorPanel|o(?:ur(?:Minute(?:SecondDatePickerElementFlag|DatePickerElementFlag)|CalendarUnit)|rizontalRuler|meFunctionKey)|TTPCookieAcceptPolicy(?:Never|OnlyFromMainDocumentDomain|Always)|e(?:lp(?:ButtonBezelStyle|KeyMask|FunctionKey)|avierFontAction)|PUXOperatingSystem)|Year(?:MonthDa(?:yDatePickerElementFlag|tePickerElementFlag)|CalendarUnit)|N(?:o(?:n(?:StandardCharacterSetFontMask|ZeroWindingRule|activatingPanelMask|LossyASCIIStringEncoding)|Border|t(?:ification(?:SuspensionBehavior(?:Hold|Coalesce|D(?:eliverImmediately|rop))|NoCoalescing|CoalescingOn(?:Sender|Name)|DeliverImmediately|PostToAllSessions)|PredicateType|EqualToPredicateOperatorType)|S(?:cr(?:iptError|ollerParts)|ubelement|pecifierError)|CellMask|T(?:itle|opLevelContainersSpecifierError|abs(?:BezelBorder|NoBorder|LineBorder))|I(?:nterfaceStyle|mage)|UnderlineStyle|FontChangeAction)|u(?:ll(?:Glyph|CellType)|m(?:eric(?:Search|PadKeyMask)|berFormatter(?:Round(?:Half(?:Down|Up|Even)|Ceiling|Down|Up|Floor)|Behavior(?:10|Default)|S(?:cientificStyle|pellOutStyle)|NoStyle|CurrencyStyle|DecimalStyle|P(?:ercentStyle|ad(?:Before(?:Suffix|Prefix)|After(?:Suffix|Prefix))))))|e(?:t(?:Services(?:BadArgumentError|NotFoundError|C(?:ollisionError|ancelledError)|TimeoutError|InvalidError|UnknownError|ActivityInProgress)|workDomainMask)|wlineCharacter|xt(?:StepInterfaceStyle|FunctionKey))|EXTSTEPStringEncoding|a(?:t(?:iveShortGlyphPacking|uralTextAlignment)|rrowFontMask))|C(?:hange(?:ReadOtherContents|GrayCell(?:Mask)?|BackgroundCell(?:Mask)?|Cleared|Done|Undone|Autosaved)|MYK(?:ModeColorPanel|ColorSpaceModel)|ircular(?:BezelStyle|Slider)|o(?:n(?:stantValueExpressionType|t(?:inuousCapacityLevelIndicatorStyle|entsCellMask|ain(?:sComparison|erSpecifierError)|rol(?:Glyph|KeyMask))|densedFontMask)|lor(?:Panel(?:RGBModeMask|GrayModeMask|HSBModeMask|C(?:MYKModeMask|olorListModeMask|ustomPaletteModeMask|rayonModeMask)|WheelModeMask|AllModesMask)|ListModeColorPanel)|reServiceDirectory|m(?:p(?:osite(?:XOR|Source(?:In|O(?:ut|ver)|Atop)|Highlight|C(?:opy|lear)|Destination(?:In|O(?:ut|ver)|Atop)|Plus(?:Darker|Lighter))|ressedFontMask)|mandKeyMask))|u(?:stom(?:SelectorPredicateOperatorType|PaletteModeColorPanel)|r(?:sor(?:Update(?:Mask)?|PointingDevice)|veToBezierPathElement))|e(?:nterT(?:extAlignment|abStopType)|ll(?:State|H(?:ighlighted|as(?:Image(?:Horizontal|OnLeftOrBottom)|OverlappingImage))|ChangesContents|Is(?:Bordered|InsetButton)|Disabled|Editable|LightsBy(?:Gray|Background|Contents)|AllowsMixedState))|l(?:ipPagination|o(?:s(?:ePathBezierPathElement|ableWindowMask)|ckAndCalendarDatePickerStyle)|ear(?:ControlTint|DisplayFunctionKey|LineFunctionKey))|a(?:seInsensitive(?:Search|PredicateOption)|n(?:notCreateScriptCommandError|cel(?:Button|TextMovement))|chesDirectory|lculation(?:NoError|Overflow|DivideByZero|Underflow|LossOfPrecision)|rriageReturnCharacter)|r(?:itical(?:Request|AlertStyle)|ayonModeColorPanel))|T(?:hick(?:SquareBezelStyle|erSquareBezelStyle)|ypesetter(?:Behavior|HorizontalTabAction|ContainerBreakAction|ZeroAdvancementAction|OriginalBehavior|ParagraphBreakAction|WhitespaceAction|L(?:ineBreakAction|atestBehavior))|i(?:ckMark(?:Right|Below|Left|Above)|tledWindowMask|meZoneDatePickerElementFlag)|o(?:olbarItemVisibilityPriority(?:Standard|High|User|Low)|pTabsBezelBorder|ggleButton)|IFF(?:Compression(?:N(?:one|EXT)|CCITTFAX(?:3|4)|OldJPEG|JPEG|PackBits|LZW)|FileType)|e(?:rminate(?:Now|Cancel|Later)|xt(?:Read(?:InapplicableDocumentTypeError|WriteErrorM(?:inimum|aximum))|Block(?:M(?:i(?:nimum(?:Height|Width)|ddleAlignment)|a(?:rgin|ximum(?:Height|Width)))|B(?:o(?:ttomAlignment|rder)|aselineAlignment)|Height|TopAlignment|P(?:ercentageValueType|adding)|Width|AbsoluteValueType)|StorageEdited(?:Characters|Attributes)|CellType|ured(?:RoundedBezelStyle|BackgroundWindowMask|SquareBezelStyle)|Table(?:FixedLayoutAlgorithm|AutomaticLayoutAlgorithm)|Field(?:RoundedBezel|SquareBezel|AndStepperDatePickerStyle)|WriteInapplicableDocumentTypeError|ListPrependEnclosingMarker))|woByteGlyphPacking|ab(?:Character|TextMovement|le(?:tP(?:oint(?:Mask|EventSubtype)?|roximity(?:Mask|EventSubtype)?)|Column(?:NoResizing|UserResizingMask|AutoresizingMask)|View(?:ReverseSequentialColumnAutoresizingStyle|GridNone|S(?:olid(?:HorizontalGridLineMask|VerticalGridLineMask)|equentialColumnAutoresizingStyle)|NoColumnAutoresizing|UniformColumnAutoresizingStyle|FirstColumnOnlyAutoresizingStyle|LastColumnOnlyAutoresizingStyle)))|rackModeMatrix)|I(?:n(?:sert(?:CharFunctionKey|FunctionKey|LineFunctionKey)|t(?:Type|ernalS(?:criptError|pecifierError))|dexSubelement|validIndexSpecifierError|formational(?:Request|AlertStyle)|PredicateOperatorType)|talicFontMask|SO(?:2022JPStringEncoding|Latin(?:1StringEncoding|2StringEncoding))|dentityMappingCharacterCollection|llegalTextMovement|mage(?:R(?:ight|ep(?:MatchesDevice|LoadStatus(?:ReadingHeader|Completed|InvalidData|Un(?:expectedEOF|knownType)|WillNeedAllData)))|Below|C(?:ellType|ache(?:BySize|Never|Default|Always))|Interpolation(?:High|None|Default|Low)|O(?:nly|verlaps)|Frame(?:Gr(?:oove|ayBezel)|Button|None|Photo)|L(?:oadStatus(?:ReadError|C(?:ompleted|ancelled)|InvalidData|UnexpectedEOF)|eft)|A(?:lign(?:Right|Bottom(?:Right|Left)?|Center|Top(?:Right|Left)?|Left)|bove)))|O(?:n(?:State|eByteGlyphPacking|OffButton|lyScrollerArrows)|ther(?:Mouse(?:D(?:own(?:Mask)?|ragged(?:Mask)?)|Up(?:Mask)?)|TextMovement)|SF1OperatingSystem|pe(?:n(?:GL(?:GO(?:Re(?:setLibrary|tainRenderers)|ClearFormatCache|FormatCacheSize)|PFA(?:R(?:obust|endererID)|M(?:inimumPolicy|ulti(?:sample|Screen)|PSafe|aximumPolicy)|BackingStore|S(?:creenMask|te(?:ncilSize|reo)|ingleRenderer|upersample|ample(?:s|Buffers|Alpha))|NoRecovery|C(?:o(?:lor(?:Size|Float)|mpliant)|losestPolicy)|OffScreen|D(?:oubleBuffer|epthSize)|PixelBuffer|VirtualScreenCount|FullScreen|Window|A(?:cc(?:umSize|elerated)|ux(?:Buffers|DepthStencil)|l(?:phaSize|lRenderers))))|StepUnicodeReservedBase)|rationNotSupportedForKeyS(?:criptError|pecifierError))|ffState|KButton|rPredicateType|bjC(?:B(?:itfield|oolType)|S(?:hortType|tr(?:ingType|uctType)|electorType)|NoType|CharType|ObjectType|DoubleType|UnionType|PointerType|VoidType|FloatType|Long(?:Type|longType)|ArrayType))|D(?:i(?:s(?:c(?:losureBezelStyle|reteCapacityLevelIndicatorStyle)|playWindowRunLoopOrdering)|acriticInsensitivePredicateOption|rect(?:Selection|PredicateModifier))|o(?:c(?:ModalWindowMask|ument(?:Directory|ationDirectory))|ubleType|wn(?:TextMovement|ArrowFunctionKey))|e(?:s(?:cendingPageOrder|ktopDirectory)|cimalTabStopType|v(?:ice(?:NColorSpaceModel|IndependentModifierFlagsMask)|eloper(?:Directory|ApplicationDirectory))|fault(?:ControlTint|TokenStyle)|lete(?:Char(?:acter|FunctionKey)|FunctionKey|LineFunctionKey)|moApplicationDirectory)|a(?:yCalendarUnit|teFormatter(?:MediumStyle|Behavior(?:10|Default)|ShortStyle|NoStyle|FullStyle|LongStyle))|ra(?:wer(?:Clos(?:ingState|edState)|Open(?:ingState|State))|gOperation(?:Generic|Move|None|Copy|Delete|Private|Every|Link|All)))|U(?:ser(?:CancelledError|D(?:irectory|omainMask)|FunctionKey)|RL(?:Handle(?:NotLoaded|Load(?:Succeeded|InProgress|Failed))|CredentialPersistence(?:None|Permanent|ForSession))|n(?:scaledWindowMask|cachedRead|i(?:codeStringEncoding|talicFontMask|fiedTitleAndToolbarWindowMask)|d(?:o(?:CloseGroupingRunLoopOrdering|FunctionKey)|e(?:finedDateComponent|rline(?:Style(?:Single|None|Thick|Double)|Pattern(?:Solid|D(?:ot|ash(?:Dot(?:Dot)?)?)))))|known(?:ColorSpaceModel|P(?:ointingDevice|ageOrder)|KeyS(?:criptError|pecifierError))|boldFontMask)|tilityWindowMask|TF8StringEncoding|p(?:dateWindowsRunLoopOrdering|TextMovement|ArrowFunctionKey))|J(?:ustifiedTextAlignment|PEG(?:2000FileType|FileType)|apaneseEUC(?:GlyphPacking|StringEncoding))|P(?:o(?:s(?:t(?:Now|erFontMask|WhenIdle|ASAP)|iti(?:on(?:Replace|Be(?:fore|ginning)|End|After)|ve(?:IntType|DoubleType|FloatType)))|pUp(?:NoArrow|ArrowAt(?:Bottom|Center))|werOffEventType|rtraitOrientation)|NGFileType|ush(?:InCell(?:Mask)?|OnPushOffButton)|e(?:n(?:TipMask|UpperSideMask|PointingDevice|LowerSideMask)|riodic(?:Mask)?)|P(?:S(?:caleField|tatus(?:Title|Field)|aveButton)|N(?:ote(?:Title|Field)|ame(?:Title|Field))|CopiesField|TitleField|ImageButton|OptionsButton|P(?:a(?:perFeedButton|ge(?:Range(?:To|From)|ChoiceMatrix))|reviewButton)|LayoutButton)|lainTextTokenStyle|a(?:useFunctionKey|ragraphSeparatorCharacter|ge(?:DownFunctionKey|UpFunctionKey))|r(?:int(?:ing(?:ReplyLater|Success|Cancelled|Failure)|ScreenFunctionKey|erTable(?:NotFound|OK|Error)|FunctionKey)|o(?:p(?:ertyList(?:XMLFormat|MutableContainers(?:AndLeaves)?|BinaryFormat|Immutable|OpenStepFormat)|rietaryStringEncoding)|gressIndicator(?:BarStyle|SpinningStyle|Preferred(?:SmallThickness|Thickness|LargeThickness|AquaThickness)))|e(?:ssedTab|vFunctionKey))|L(?:HeightForm|CancelButton|TitleField|ImageButton|O(?:KButton|rientationMatrix)|UnitsButton|PaperNameButton|WidthForm))|E(?:n(?:terCharacter|d(?:sWith(?:Comparison|PredicateOperatorType)|FunctionKey))|v(?:e(?:nOddWindingRule|rySubelement)|aluatedObjectExpressionType)|qualTo(?:Comparison|PredicateOperatorType)|ra(?:serPointingDevice|CalendarUnit|DatePickerElementFlag)|x(?:clude(?:10|QuickDrawElementsIconCreationOption)|pandedFontMask|ecuteFunctionKey))|V(?:i(?:ew(?:M(?:in(?:XMargin|YMargin)|ax(?:XMargin|YMargin))|HeightSizable|NotSizable|WidthSizable)|aPanelFontAction)|erticalRuler|a(?:lidationErrorM(?:inimum|aximum)|riableExpressionType))|Key(?:SpecifierEvaluationScriptError|Down(?:Mask)?|Up(?:Mask)?|PathExpressionType|Value(?:MinusSetMutation|SetSetMutation|Change(?:Re(?:placement|moval)|Setting|Insertion)|IntersectSetMutation|ObservingOption(?:New|Old)|UnionSetMutation|ValidationError))|QTMovie(?:NormalPlayback|Looping(?:BackAndForthPlayback|Playback))|F(?:1(?:1FunctionKey|7FunctionKey|2FunctionKey|8FunctionKey|3FunctionKey|9FunctionKey|4FunctionKey|5FunctionKey|FunctionKey|0FunctionKey|6FunctionKey)|7FunctionKey|i(?:nd(?:PanelAction(?:Replace(?:A(?:ndFind|ll(?:InSelection)?))?|S(?:howFindPanel|e(?:tFindString|lectAll(?:InSelection)?))|Next|Previous)|FunctionKey)|tPagination|le(?:Read(?:No(?:SuchFileError|PermissionError)|CorruptFileError|In(?:validFileNameError|applicableStringEncodingError)|Un(?:supportedSchemeError|knownError))|HandlingPanel(?:CancelButton|OKButton)|NoSuchFileError|ErrorM(?:inimum|aximum)|Write(?:NoPermissionError|In(?:validFileNameError|applicableStringEncodingError)|OutOfSpaceError|Un(?:supportedSchemeError|knownError))|LockingError)|xedPitchFontMask)|2(?:1FunctionKey|7FunctionKey|2FunctionKey|8FunctionKey|3FunctionKey|9FunctionKey|4FunctionKey|5FunctionKey|FunctionKey|0FunctionKey|6FunctionKey)|o(?:nt(?:Mo(?:noSpaceTrait|dernSerifsClass)|BoldTrait|S(?:ymbolicClass|criptsClass|labSerifsClass|ansSerifClass)|C(?:o(?:ndensedTrait|llectionApplicationOnlyMask)|larendonSerifsClass)|TransitionalSerifsClass|I(?:ntegerAdvancementsRenderingMode|talicTrait)|O(?:ldStyleSerifsClass|rnamentalsClass)|DefaultRenderingMode|U(?:nknownClass|IOptimizedTrait)|Panel(?:S(?:hadowEffectModeMask|t(?:andardModesMask|rikethroughEffectModeMask)|izeModeMask)|CollectionModeMask|TextColorEffectModeMask|DocumentColorEffectModeMask|UnderlineEffectModeMask|FaceModeMask|All(?:ModesMask|EffectsModeMask))|ExpandedTrait|VerticalTrait|F(?:amilyClassMask|reeformSerifsClass)|Antialiased(?:RenderingMode|IntegerAdvancementsRenderingMode))|cusRing(?:Below|Type(?:None|Default|Exterior)|Only|Above)|urByteGlyphPacking|rm(?:attingError(?:M(?:inimum|aximum))?|FeedCharacter))|8FunctionKey|unction(?:ExpressionType|KeyMask)|3(?:1FunctionKey|2FunctionKey|3FunctionKey|4FunctionKey|5FunctionKey|FunctionKey|0FunctionKey)|9FunctionKey|4FunctionKey|P(?:RevertButton|S(?:ize(?:Title|Field)|etButton)|CurrentField|Preview(?:Button|Field))|l(?:oat(?:ingPointSamplesBitmapFormat|Type)|agsChanged(?:Mask)?)|axButton|5FunctionKey|6FunctionKey)|W(?:heelModeColorPanel|indow(?:s(?:NTOperatingSystem|CP125(?:1StringEncoding|2StringEncoding|3StringEncoding|4StringEncoding|0StringEncoding)|95(?:InterfaceStyle|OperatingSystem))|M(?:iniaturizeButton|ovedEventType)|Below|CloseButton|ToolbarButton|ZoomButton|Out|DocumentIconButton|ExposedEventType|Above)|orkspaceLaunch(?:NewInstance|InhibitingBackgroundOnly|Default|PreferringClassic|WithoutA(?:ctivation|ddingToRecents)|A(?:sync|nd(?:Hide(?:Others)?|Print)|llowingClassicStartup))|eek(?:day(?:CalendarUnit|OrdinalCalendarUnit)|CalendarUnit)|a(?:ntsBidiLevels|rningAlertStyle)|r(?:itingDirection(?:RightToLeft|Natural|LeftToRight)|apCalendarComponents))|L(?:i(?:stModeMatrix|ne(?:Moves(?:Right|Down|Up|Left)|B(?:order|reakBy(?:C(?:harWrapping|lipping)|Truncating(?:Middle|Head|Tail)|WordWrapping))|S(?:eparatorCharacter|weep(?:Right|Down|Up|Left))|ToBezierPathElement|DoesntMove|arSlider)|teralSearch|kePredicateOperatorType|ghterFontAction|braryDirectory)|ocalDomainMask|e(?:ssThan(?:Comparison|OrEqualTo(?:Comparison|PredicateOperatorType)|PredicateOperatorType)|ft(?:Mouse(?:D(?:own(?:Mask)?|ragged(?:Mask)?)|Up(?:Mask)?)|T(?:ext(?:Movement|Alignment)|ab(?:sBezelBorder|StopType))|ArrowFunctionKey))|a(?:yout(?:RightToLeft|NotDone|CantFit|OutOfGlyphs|Done|LeftToRight)|ndscapeOrientation)|ABColorSpaceModel)|A(?:sc(?:iiWithDoubleByteEUCGlyphPacking|endingPageOrder)|n(?:y(?:Type|PredicateModifier|EventMask)|choredSearch|imation(?:Blocking|Nonblocking(?:Threaded)?|E(?:ffect(?:DisappearingItemDefault|Poof)|ase(?:In(?:Out)?|Out))|Linear)|dPredicateType)|t(?:Bottom|tachmentCharacter|omicWrite|Top)|SCIIStringEncoding|d(?:obe(?:GB1CharacterCollection|CNS1CharacterCollection|Japan(?:1CharacterCollection|2CharacterCollection)|Korea1CharacterCollection)|dTraitFontAction|minApplicationDirectory)|uto(?:saveOperation|Pagination)|pp(?:lication(?:SupportDirectory|D(?:irectory|e(?:fined(?:Mask)?|legateReply(?:Success|Cancel|Failure)|activatedEventType))|ActivatedEventType)|KitDefined(?:Mask)?)|l(?:ternateKeyMask|pha(?:ShiftKeyMask|NonpremultipliedBitmapFormat|FirstBitmapFormat)|ert(?:SecondButtonReturn|ThirdButtonReturn|OtherReturn|DefaultReturn|ErrorReturn|FirstButtonReturn|AlternateReturn)|l(?:ScrollerParts|DomainsMask|PredicateModifier|LibrariesDirectory|ApplicationsDirectory))|rgument(?:sWrongScriptError|EvaluationScriptError)|bove(?:Bottom|Top)|WTEventType)))(?:\\b)" + }, + { + token: "support.function.C99.c", + regex: C_Highlight_File.cFunctions + }, + { + token : cObj.getKeywords(), + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, + { + token: "punctuation.section.scope.begin.objc", + regex: "\\[", + next: "bracketed_content" + }, + { + token: "meta.function.objc", + regex: "^(?:-|\\+)\\s*" + } + ], + "constant_NSString": [ + { + token: "constant.character.escape.objc", + regex: escapedConstRe + }, + { + token: "invalid.illegal.unknown-escape.objc", + regex: "\\\\." + }, + { + token: "string", + regex: '[^"\\\\]+' + }, + { + token: "punctuation.definition.string.end", + regex: "\"", + next: "start" + } + ], + "protocol_list": [ + { + token: "punctuation.section.scope.end.objc", + regex: ">", + next: "start" + }, + { + token: "support.other.protocol.objc", + regex: "\bNS(?:GlyphStorage|M(?:utableCopying|enuItem)|C(?:hangeSpelling|o(?:ding|pying|lorPicking(?:Custom|Default)))|T(?:oolbarItemValidations|ext(?:Input|AttachmentCell))|I(?:nputServ(?:iceProvider|erMouseTracker)|gnoreMisspelledWords)|Obj(?:CTypeSerializationCallBack|ect)|D(?:ecimalNumberBehaviors|raggingInfo)|U(?:serInterfaceValidations|RL(?:HandleClient|DownloadDelegate|ProtocolClient|AuthenticationChallengeSender))|Validated(?:ToobarItem|UserInterfaceItem)|Locking)\b" + } + ], + "selectors": [ + { + token: "support.function.any-method.name-of-parameter.objc", + regex: "\\b(?:[a-zA-Z_:][\\w]*)+" + }, + { + token: "punctuation", + regex: "\\)", + next: "start" + } + ], + "bracketed_content": [ + { + token: "punctuation.section.scope.end.objc", + regex: "\]", + next: "start" + }, + { + token: ["support.function.any-method.objc"], + regex: "(?:predicateWithFormat:| NSPredicate predicateWithFormat:)", + next: "start" + }, + { + token: "support.function.any-method.objc", + regex: "\\w+(?::|(?=\]))", + next: "start" + } + ], + "bracketed_strings": [ + { + token: "punctuation.section.scope.end.objc", + regex: "\]", + next: "start" + }, + { + token: "keyword.operator.logical.predicate.cocoa", + regex: "\\b(?:AND|OR|NOT|IN)\\b" + }, + { + token: ["invalid.illegal.unknown-method.objc", "punctuation.separator.arguments.objc"], + regex: "\\b(\w+)(:)" + }, + { + regex: "\\b(?:ALL|ANY|SOME|NONE)\\b", + token: "constant.language.predicate.cocoa" + }, + { + regex: "\\b(?:NULL|NIL|SELF|TRUE|YES|FALSE|NO|FIRST|LAST|SIZE)\\b", + token: "constant.language.predicate.cocoa" + }, + { + regex: "\\b(?:MATCHES|CONTAINS|BEGINSWITH|ENDSWITH|BETWEEN)\\b", + token: "keyword.operator.comparison.predicate.cocoa" + }, + { + regex: "\\bC(?:ASEINSENSITIVE|I)\\b", + token: "keyword.other.modifier.predicate.cocoa" + }, + { + regex: "\\b(?:ANYKEY|SUBQUERY|CAST|TRUEPREDICATE|FALSEPREDICATE)\\b", + token: "keyword.other.predicate.cocoa" + }, + { + regex: escapedConstRe, + token: "constant.character.escape.objc" + }, + { + regex: "\\\\.", + token: "invalid.illegal.unknown-escape.objc" + }, + { + token: "string", + regex: '[^"\\\\]' + }, + { + token: "punctuation.definition.string.end.objc", + regex: "\"", + next: "predicates" + } + ], + "comment" : [ + { + token : "comment", // closing comment + regex : ".*?\\*\\/", + next : "start" + }, { + token : "comment", // comment spanning whole line + regex : ".+" + } + ], + "methods" : [ + { + token : "meta.function.objc", + regex : "(?=\\{|#)|;", + next : "start" + } + ] +} + for (var r in cRules) { + if (this.$rules[r]) { + if (this.$rules[r].push) + this.$rules[r].push.apply(this.$rules[r], cRules[r]); + } else { + this.$rules[r] = cRules[r]; + } + } + + this.$rules.bracketed_content = this.$rules.bracketed_content.concat( + this.$rules.start, specialVariables + ); + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("start") ]); +}; + +oop.inherits(ObjectiveCHighlightRules, CHighlightRules); + +exports.ObjectiveCHighlightRules = ObjectiveCHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); +ace.define('ace/mode/c_cpp_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var cFunctions = exports.cFunctions = "\\s*\\bhypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len)))\\b" + +var c_cppHighlightRules = function() { + + var keywordControls = ( + "break|case|continue|default|do|else|for|goto|if|_Pragma|" + + "return|switch|while|catch|operator|try|throw|using" + ); + + var storageType = ( + "asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" + + "_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|" + + "class|wchar_t|template" + ); + + var storageModifiers = ( + "const|extern|register|restrict|static|volatile|inline|private:|" + + "protected:|public:|friend|explicit|virtual|export|mutable|typename" + ); + + var keywordOperators = ( + "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq" + + "const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace" + ); + + var builtinConstants = ( + "NULL|true|false|TRUE|FALSE" + ); + + var keywordMapper = this.$keywords = this.createKeywordMapper({ + "keyword.control" : keywordControls, + "storage.type" : storageType, + "storage.modifier" : storageModifiers, + "keyword.operator" : keywordOperators, + "variable.language": "this", + "constant.language": builtinConstants + }, "identifier"); + + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\d\\$_\u00a1-\uffff]*\\b"; + + this.$rules = { + "start" : [ + { + token : "comment", + regex : "\\/\\/.*$" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // multi line string start + regex : '["].*\\\\$', + next : "qqstring" + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : "string", // multi line string start + regex : "['].*\\\\$", + next : "qstring" + }, { + token : "constant.numeric", // hex + regex : "0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" + }, { + token : "keyword", // pre-compiler directives + regex : "#\\s*(?:include|import|pragma|line|define|undef|if|ifdef|else|elif|ifndef)\\b", + next : "directive" + }, { + token : "keyword", // special case pre-compiler directive + regex : "(?:#\\s*endif)\\b" + }, { + token : "support.function.C99.c", + regex : cFunctions + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator", + regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)" + }, { + token : "punctuation.operator", + regex : "\\?|\\:|\\,|\\;|\\." + }, { + token : "paren.lparen", + regex : "[[({]" + }, { + token : "paren.rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + } + ], + "comment" : [ + { + token : "comment", // closing comment + regex : ".*?\\*\\/", + next : "start" + }, { + token : "comment", // comment spanning whole line + regex : ".+" + } + ], + "qqstring" : [ + { + token : "string", + regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', + next : "start" + }, { + token : "string", + regex : '.+' + } + ], + "qstring" : [ + { + token : "string", + regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", + next : "start" + }, { + token : "string", + regex : '.+' + } + ], + "directive" : [ + { + token : "constant.other.multiline", + regex : /\\/ + }, + { + token : "constant.other.multiline", + regex : /.*\\/ + }, + { + token : "constant.other", + regex : "\\s*<.+?>", + next : "start" + }, + { + token : "constant.other", // single line + regex : '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]', + next : "start" + }, + { + token : "constant.other", // single line + regex : "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']", + next : "start" + }, + { + token : "constant.other", + regex : /[^\\\/]+/, + next : "start" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("start") ]); +}; + +oop.inherits(c_cppHighlightRules, TextHighlightRules); + +exports.c_cppHighlightRules = c_cppHighlightRules; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/ocaml.js b/pitfall/pdfkit/node_modules/brace/mode/ocaml.js new file mode 100644 index 00000000..44be060b --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/ocaml.js @@ -0,0 +1,444 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/ocaml', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/ocaml_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var OcamlHighlightRules = acequire("./ocaml_highlight_rules").OcamlHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; + +var Mode = function() { + this.HighlightRules = OcamlHighlightRules; + + this.$outdent = new MatchingBraceOutdent(); +}; +oop.inherits(Mode, TextMode); + +var indenter = /(?:[({[=:]|[-=]>|\b(?:else|try|with))\s*$/; + +(function() { + + this.toggleCommentLines = function(state, doc, startRow, endRow) { + var i, line; + var outdent = true; + var re = /^\s*\(\*(.*)\*\)/; + + for (i=startRow; i<= endRow; i++) { + if (!re.test(doc.getLine(i))) { + outdent = false; + break; + } + } + + var range = new Range(0, 0, 0, 0); + for (i=startRow; i<= endRow; i++) { + line = doc.getLine(i); + range.start.row = i; + range.end.row = i; + range.end.column = line.length; + + doc.replace(range, outdent ? line.match(re)[1] : "(*" + line + "*)"); + } + }; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + + if (!(tokens.length && tokens[tokens.length - 1].type === 'comment') && + state === 'start' && indenter.test(line)) + indent += tab; + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/ocaml_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var OcamlHighlightRules = function() { + + var keywords = ( + "and|as|assert|begin|class|constraint|do|done|downto|else|end|" + + "exception|external|for|fun|function|functor|if|in|include|" + + "inherit|initializer|lazy|let|match|method|module|mutable|new|" + + "object|of|open|or|private|rec|sig|struct|then|to|try|type|val|" + + "virtual|when|while|with" + ); + + var builtinConstants = ("true|false"); + + var builtinFunctions = ( + "abs|abs_big_int|abs_float|abs_num|abstract_tag|accept|access|acos|add|" + + "add_available_units|add_big_int|add_buffer|add_channel|add_char|" + + "add_initializer|add_int_big_int|add_interfaces|add_num|add_string|" + + "add_substitute|add_substring|alarm|allocated_bytes|allow_only|" + + "allow_unsafe_modules|always|append|appname_get|appname_set|" + + "approx_num_exp|approx_num_fix|arg|argv|arith_status|array|" + + "array1_of_genarray|array2_of_genarray|array3_of_genarray|asin|asr|" + + "assoc|assq|at_exit|atan|atan2|auto_synchronize|background|basename|" + + "beginning_of_input|big_int_of_int|big_int_of_num|big_int_of_string|bind|" + + "bind_class|bind_tag|bits|bits_of_float|black|blit|blit_image|blue|bool|" + + "bool_of_string|bounded_full_split|bounded_split|bounded_split_delim|" + + "bprintf|break|broadcast|bscanf|button_down|c_layout|capitalize|cardinal|" + + "cardinal|catch|catch_break|ceil|ceiling_num|channel|char|char_of_int|" + + "chdir|check|check_suffix|chmod|choose|chop_extension|chop_suffix|chown|" + + "chown|chr|chroot|classify_float|clear|clear_available_units|" + + "clear_close_on_exec|clear_graph|clear_nonblock|clear_parser|" + + "close|close|closeTk|close_box|close_graph|close_in|close_in_noerr|" + + "close_out|close_out_noerr|close_process|close_process|" + + "close_process_full|close_process_in|close_process_out|close_subwindow|" + + "close_tag|close_tbox|closedir|closedir|closure_tag|code|combine|" + + "combine|combine|command|compact|compare|compare_big_int|compare_num|" + + "complex32|complex64|concat|conj|connect|contains|contains_from|contents|" + + "copy|cos|cosh|count|count|counters|create|create_alarm|create_image|" + + "create_matrix|create_matrix|create_matrix|create_object|" + + "create_object_and_run_initializers|create_object_opt|create_process|" + + "create_process|create_process_env|create_process_env|create_table|" + + "current|current_dir_name|current_point|current_x|current_y|curveto|" + + "custom_tag|cyan|data_size|decr|decr_num|default_available_units|delay|" + + "delete_alarm|descr_of_in_channel|descr_of_out_channel|destroy|diff|dim|" + + "dim1|dim2|dim3|dims|dirname|display_mode|div|div_big_int|div_num|" + + "double_array_tag|double_tag|draw_arc|draw_char|draw_circle|draw_ellipse|" + + "draw_image|draw_poly|draw_poly_line|draw_rect|draw_segments|draw_string|" + + "dummy_pos|dummy_table|dump_image|dup|dup2|elements|empty|end_of_input|" + + "environment|eprintf|epsilon_float|eq_big_int|eq_num|equal|err_formatter|" + + "error_message|escaped|establish_server|executable_name|execv|execve|execvp|" + + "execvpe|exists|exists2|exit|exp|failwith|fast_sort|fchmod|fchown|field|" + + "file|file_exists|fill|fill_arc|fill_circle|fill_ellipse|fill_poly|fill_rect|" + + "filter|final_tag|finalise|find|find_all|first_chars|firstkey|flatten|" + + "float|float32|float64|float_of_big_int|float_of_bits|float_of_int|" + + "float_of_num|float_of_string|floor|floor_num|flush|flush_all|flush_input|" + + "flush_str_formatter|fold|fold_left|fold_left2|fold_right|fold_right2|" + + "for_all|for_all2|force|force_newline|force_val|foreground|fork|" + + "format_of_string|formatter_of_buffer|formatter_of_out_channel|" + + "fortran_layout|forward_tag|fprintf|frexp|from|from_channel|from_file|" + + "from_file_bin|from_function|from_string|fscanf|fst|fstat|ftruncate|" + + "full_init|full_major|full_split|gcd_big_int|ge_big_int|ge_num|" + + "genarray_of_array1|genarray_of_array2|genarray_of_array3|get|" + + "get_all_formatter_output_functions|get_approx_printing|get_copy|" + + "get_ellipsis_text|get_error_when_null_denominator|get_floating_precision|" + + "get_formatter_output_functions|get_formatter_tag_functions|get_image|" + + "get_margin|get_mark_tags|get_max_boxes|get_max_indent|get_method|" + + "get_method_label|get_normalize_ratio|get_normalize_ratio_when_printing|" + + "get_print_tags|get_state|get_variable|getcwd|getegid|getegid|getenv|" + + "getenv|getenv|geteuid|geteuid|getgid|getgid|getgrgid|getgrgid|getgrnam|" + + "getgrnam|getgroups|gethostbyaddr|gethostbyname|gethostname|getitimer|" + + "getlogin|getpeername|getpid|getppid|getprotobyname|getprotobynumber|" + + "getpwnam|getpwuid|getservbyname|getservbyport|getsockname|getsockopt|" + + "getsockopt_float|getsockopt_int|getsockopt_optint|gettimeofday|getuid|" + + "global_replace|global_substitute|gmtime|green|grid|group_beginning|" + + "group_end|gt_big_int|gt_num|guard|handle_unix_error|hash|hash_param|" + + "hd|header_size|i|id|ignore|in_channel_length|in_channel_of_descr|incr|" + + "incr_num|index|index_from|inet_addr_any|inet_addr_of_string|infinity|" + + "infix_tag|init|init_class|input|input_binary_int|input_byte|input_char|" + + "input_line|input_value|int|int16_signed|int16_unsigned|int32|int64|" + + "int8_signed|int8_unsigned|int_of_big_int|int_of_char|int_of_float|" + + "int_of_num|int_of_string|integer_num|inter|interactive|inv|invalid_arg|" + + "is_block|is_empty|is_implicit|is_int|is_int_big_int|is_integer_num|" + + "is_relative|iter|iter2|iteri|join|junk|key_pressed|kill|kind|kprintf|" + + "kscanf|land|last_chars|layout|lazy_from_fun|lazy_from_val|lazy_is_val|" + + "lazy_tag|ldexp|le_big_int|le_num|length|lexeme|lexeme_char|lexeme_end|" + + "lexeme_end_p|lexeme_start|lexeme_start_p|lineto|link|list|listen|lnot|" + + "loadfile|loadfile_private|localtime|lock|lockf|log|log10|logand|lognot|" + + "logor|logxor|lor|lower_window|lowercase|lseek|lsl|lsr|lstat|lt_big_int|" + + "lt_num|lxor|magenta|magic|mainLoop|major|major_slice|make|make_formatter|" + + "make_image|make_lexer|make_matrix|make_self_init|map|map2|map_file|mapi|" + + "marshal|match_beginning|match_end|matched_group|matched_string|max|" + + "max_array_length|max_big_int|max_elt|max_float|max_int|max_num|" + + "max_string_length|mem|mem_assoc|mem_assq|memq|merge|min|min_big_int|" + + "min_elt|min_float|min_int|min_num|minor|minus_big_int|minus_num|" + + "minus_one|mkdir|mkfifo|mktime|mod|mod_big_int|mod_float|mod_num|modf|" + + "mouse_pos|moveto|mul|mult_big_int|mult_int_big_int|mult_num|nan|narrow|" + + "nat_of_num|nativeint|neg|neg_infinity|new_block|new_channel|new_method|" + + "new_variable|next|nextkey|nice|nice|no_scan_tag|norm|norm2|not|npeek|" + + "nth|nth_dim|num_digits_big_int|num_dims|num_of_big_int|num_of_int|" + + "num_of_nat|num_of_ratio|num_of_string|O|obj|object_tag|ocaml_version|" + + "of_array|of_channel|of_float|of_int|of_int32|of_list|of_nativeint|" + + "of_string|one|openTk|open_box|open_connection|open_graph|open_hbox|" + + "open_hovbox|open_hvbox|open_in|open_in_bin|open_in_gen|open_out|" + + "open_out_bin|open_out_gen|open_process|open_process_full|open_process_in|" + + "open_process_out|open_subwindow|open_tag|open_tbox|open_temp_file|" + + "open_vbox|opendbm|opendir|openfile|or|os_type|out_channel_length|" + + "out_channel_of_descr|output|output_binary_int|output_buffer|output_byte|" + + "output_char|output_string|output_value|over_max_boxes|pack|params|" + + "parent_dir_name|parse|parse_argv|partition|pause|peek|pipe|pixels|" + + "place|plot|plots|point_color|polar|poll|pop|pos_in|pos_out|pow|" + + "power_big_int_positive_big_int|power_big_int_positive_int|" + + "power_int_positive_big_int|power_int_positive_int|power_num|" + + "pp_close_box|pp_close_tag|pp_close_tbox|pp_force_newline|" + + "pp_get_all_formatter_output_functions|pp_get_ellipsis_text|" + + "pp_get_formatter_output_functions|pp_get_formatter_tag_functions|" + + "pp_get_margin|pp_get_mark_tags|pp_get_max_boxes|pp_get_max_indent|" + + "pp_get_print_tags|pp_open_box|pp_open_hbox|pp_open_hovbox|pp_open_hvbox|" + + "pp_open_tag|pp_open_tbox|pp_open_vbox|pp_over_max_boxes|pp_print_as|" + + "pp_print_bool|pp_print_break|pp_print_char|pp_print_cut|pp_print_float|" + + "pp_print_flush|pp_print_if_newline|pp_print_int|pp_print_newline|" + + "pp_print_space|pp_print_string|pp_print_tab|pp_print_tbreak|" + + "pp_set_all_formatter_output_functions|pp_set_ellipsis_text|" + + "pp_set_formatter_out_channel|pp_set_formatter_output_functions|" + + "pp_set_formatter_tag_functions|pp_set_margin|pp_set_mark_tags|" + + "pp_set_max_boxes|pp_set_max_indent|pp_set_print_tags|pp_set_tab|" + + "pp_set_tags|pred|pred_big_int|pred_num|prerr_char|prerr_endline|" + + "prerr_float|prerr_int|prerr_newline|prerr_string|print|print_as|" + + "print_bool|print_break|print_char|print_cut|print_endline|print_float|" + + "print_flush|print_if_newline|print_int|print_newline|print_space|" + + "print_stat|print_string|print_tab|print_tbreak|printf|prohibit|" + + "public_method_label|push|putenv|quo_num|quomod_big_int|quote|raise|" + + "raise_window|ratio_of_num|rcontains_from|read|read_float|read_int|" + + "read_key|read_line|readdir|readdir|readlink|really_input|receive|recv|" + + "recvfrom|red|ref|regexp|regexp_case_fold|regexp_string|" + + "regexp_string_case_fold|register|register_exception|rem|remember_mode|" + + "remove|remove_assoc|remove_assq|rename|replace|replace_first|" + + "replace_matched|repr|reset|reshape|reshape_1|reshape_2|reshape_3|rev|" + + "rev_append|rev_map|rev_map2|rewinddir|rgb|rhs_end|rhs_end_pos|rhs_start|" + + "rhs_start_pos|rindex|rindex_from|rlineto|rmdir|rmoveto|round_num|" + + "run_initializers|run_initializers_opt|scanf|search_backward|" + + "search_forward|seek_in|seek_out|select|self|self_init|send|sendto|set|" + + "set_all_formatter_output_functions|set_approx_printing|" + + "set_binary_mode_in|set_binary_mode_out|set_close_on_exec|" + + "set_close_on_exec|set_color|set_ellipsis_text|" + + "set_error_when_null_denominator|set_field|set_floating_precision|" + + "set_font|set_formatter_out_channel|set_formatter_output_functions|" + + "set_formatter_tag_functions|set_line_width|set_margin|set_mark_tags|" + + "set_max_boxes|set_max_indent|set_method|set_nonblock|set_nonblock|" + + "set_normalize_ratio|set_normalize_ratio_when_printing|set_print_tags|" + + "set_signal|set_state|set_tab|set_tag|set_tags|set_text_size|" + + "set_window_title|setgid|setgid|setitimer|setitimer|setsid|setsid|" + + "setsockopt|setsockopt|setsockopt_float|setsockopt_float|setsockopt_int|" + + "setsockopt_int|setsockopt_optint|setsockopt_optint|setuid|setuid|" + + "shift_left|shift_left|shift_left|shift_right|shift_right|shift_right|" + + "shift_right_logical|shift_right_logical|shift_right_logical|show_buckets|" + + "shutdown|shutdown|shutdown_connection|shutdown_connection|sigabrt|" + + "sigalrm|sigchld|sigcont|sigfpe|sighup|sigill|sigint|sigkill|sign_big_int|" + + "sign_num|signal|signal|sigpending|sigpending|sigpipe|sigprocmask|" + + "sigprocmask|sigprof|sigquit|sigsegv|sigstop|sigsuspend|sigsuspend|" + + "sigterm|sigtstp|sigttin|sigttou|sigusr1|sigusr2|sigvtalrm|sin|singleton|" + + "sinh|size|size|size_x|size_y|sleep|sleep|sleep|slice_left|slice_left|" + + "slice_left_1|slice_left_2|slice_right|slice_right|slice_right_1|" + + "slice_right_2|snd|socket|socket|socket|socketpair|socketpair|sort|sound|" + + "split|split_delim|sprintf|sprintf|sqrt|sqrt|sqrt_big_int|square_big_int|" + + "square_num|sscanf|stable_sort|stable_sort|stable_sort|stable_sort|stable_sort|" + + "stable_sort|stat|stat|stat|stat|stat|stats|stats|std_formatter|stdbuf|" + + "stderr|stderr|stderr|stdib|stdin|stdin|stdin|stdout|stdout|stdout|" + + "str_formatter|string|string_after|string_before|string_match|" + + "string_of_big_int|string_of_bool|string_of_float|string_of_format|" + + "string_of_inet_addr|string_of_inet_addr|string_of_int|string_of_num|" + + "string_partial_match|string_tag|sub|sub|sub_big_int|sub_left|sub_num|" + + "sub_right|subset|subset|substitute_first|substring|succ|succ|" + + "succ|succ|succ_big_int|succ_num|symbol_end|symbol_end_pos|symbol_start|" + + "symbol_start_pos|symlink|symlink|sync|synchronize|system|system|system|" + + "tag|take|tan|tanh|tcdrain|tcdrain|tcflow|tcflow|tcflush|tcflush|" + + "tcgetattr|tcgetattr|tcsendbreak|tcsendbreak|tcsetattr|tcsetattr|" + + "temp_file|text_size|time|time|time|timed_read|timed_write|times|times|" + + "tl|tl|tl|to_buffer|to_channel|to_float|to_hex|to_int|to_int32|to_list|" + + "to_list|to_list|to_nativeint|to_string|to_string|to_string|to_string|" + + "to_string|top|top|total_size|transfer|transp|truncate|truncate|truncate|" + + "truncate|truncate|truncate|try_lock|umask|umask|uncapitalize|uncapitalize|" + + "uncapitalize|union|union|unit_big_int|unlink|unlink|unlock|unmarshal|" + + "unsafe_blit|unsafe_fill|unsafe_get|unsafe_get|unsafe_set|unsafe_set|" + + "update|uppercase|uppercase|uppercase|uppercase|usage|utimes|utimes|wait|" + + "wait|wait|wait|wait_next_event|wait_pid|wait_read|wait_signal|" + + "wait_timed_read|wait_timed_write|wait_write|waitpid|white|" + + "widen|window_id|word_size|wrap|wrap_abort|write|yellow|yield|zero|zero_big_int|" + + + "Arg|Arith_status|Array|Array1|Array2|Array3|ArrayLabels|Big_int|Bigarray|" + + "Buffer|Callback|CamlinternalOO|Char|Complex|Condition|Dbm|Digest|Dynlink|" + + "Event|Filename|Format|Gc|Genarray|Genlex|Graphics|GraphicsX11|Hashtbl|" + + "Int32|Int64|LargeFile|Lazy|Lexing|List|ListLabels|Make|Map|Marshal|" + + "MoreLabels|Mutex|Nativeint|Num|Obj|Oo|Parsing|Pervasives|Printexc|" + + "Printf|Queue|Random|Scanf|Scanning|Set|Sort|Stack|State|StdLabels|Str|" + + "Stream|String|StringLabels|Sys|Thread|ThreadUnix|Tk|Unix|UnixLabels|Weak" + ); + + var keywordMapper = this.createKeywordMapper({ + "variable.language": "this", + "keyword": keywords, + "constant.language": builtinConstants, + "support.function": builtinFunctions + }, "identifier"); + + var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))"; + var octInteger = "(?:0[oO]?[0-7]+)"; + var hexInteger = "(?:0[xX][\\dA-Fa-f]+)"; + var binInteger = "(?:0[bB][01]+)"; + var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")"; + + var exponent = "(?:[eE][+-]?\\d+)"; + var fraction = "(?:\\.\\d+)"; + var intPart = "(?:\\d+)"; + var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; + var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")"; + var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; + + this.$rules = { + "start" : [ + { + token : "comment", + regex : '\\(\\*.*?\\*\\)\\s*?$' + }, + { + token : "comment", + regex : '\\(\\*.*', + next : "comment" + }, + { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, + { + token : "string", // single char + regex : "'.'" + }, + { + token : "string", // " string + regex : '"', + next : "qstring" + }, + { + token : "constant.numeric", // imaginary + regex : "(?:" + floatNumber + "|\\d+)[jJ]\\b" + }, + { + token : "constant.numeric", // float + regex : floatNumber + }, + { + token : "constant.numeric", // integer + regex : integer + "\\b" + }, + { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, + { + token : "keyword.operator", + regex : "\\+\\.|\\-\\.|\\*\\.|\\/\\.|#|;;|\\+|\\-|\\*|\\*\\*\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|<-|=" + }, + { + token : "paren.lparen", + regex : "[[({]" + }, + { + token : "paren.rparen", + regex : "[\\])}]" + }, + { + token : "text", + regex : "\\s+" + } + ], + "comment" : [ + { + token : "comment", // closing comment + regex : ".*?\\*\\)", + next : "start" + }, + { + token : "comment", // comment spanning whole line + regex : ".+" + } + ], + + "qstring" : [ + { + token : "string", + regex : '"', + next : "start" + }, { + token : "string", + regex : '.+' + } + ] + }; +}; + +oop.inherits(OcamlHighlightRules, TextHighlightRules); + +exports.OcamlHighlightRules = OcamlHighlightRules; +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/pascal.js b/pitfall/pdfkit/node_modules/brace/mode/pascal.js new file mode 100644 index 00000000..b5744cc7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/pascal.js @@ -0,0 +1,232 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2012, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * Contributor(s): + * + * + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/pascal', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/pascal_highlight_rules', 'ace/mode/folding/coffee'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var PascalHighlightRules = acequire("./pascal_highlight_rules").PascalHighlightRules; +var FoldMode = acequire("./folding/coffee").FoldMode; + +var Mode = function() { + this.HighlightRules = PascalHighlightRules; + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = ["--", "//"]; + this.blockComment = [ + {start: "(*", end: "*)"}, + {start: "{", end: "}"} + ]; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/pascal_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var PascalHighlightRules = function() { + + this.$rules = { start: + [ { caseInsensitive: true, + token: 'keyword.control.pascal', + regex: '\\b(?:(absolute|abstract|all|and|and_then|array|as|asm|attribute|begin|bindable|case|class|const|constructor|destructor|div|do|do|else|end|except|export|exports|external|far|file|finalization|finally|for|forward|goto|if|implementation|import|in|inherited|initialization|interface|interrupt|is|label|library|mod|module|name|near|nil|not|object|of|only|operator|or|or_else|otherwise|packed|pow|private|program|property|protected|public|published|qualified|record|repeat|resident|restricted|segment|set|shl|shr|then|to|try|type|unit|until|uses|value|var|view|virtual|while|with|xor))\\b' }, + { caseInsensitive: true, + token: + [ 'variable.pascal', "text", + 'storage.type.prototype.pascal', + 'entity.name.function.prototype.pascal' ], + regex: '\\b(function|procedure)(\\s+)(\\w+)(\\.\\w+)?(?=(?:\\(.*?\\))?;\\s*(?:attribute|forward|external))' }, + { caseInsensitive: true, + token: + [ 'variable.pascal', "text", + 'storage.type.function.pascal', + 'entity.name.function.pascal' ], + regex: '\\b(function|procedure)(\\s+)(\\w+)(\\.\\w+)?' }, + { token: 'constant.numeric.pascal', + regex: '\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b' }, + { token: 'punctuation.definition.comment.pascal', + regex: '--.*$', + push_: + [ { token: 'comment.line.double-dash.pascal.one', + regex: '$', + next: 'pop' }, + { defaultToken: 'comment.line.double-dash.pascal.one' } ] }, + { token: 'punctuation.definition.comment.pascal', + regex: '//.*$', + push_: + [ { token: 'comment.line.double-slash.pascal.two', + regex: '$', + next: 'pop' }, + { defaultToken: 'comment.line.double-slash.pascal.two' } ] }, + { token: 'punctuation.definition.comment.pascal', + regex: '\\(\\*', + push: + [ { token: 'punctuation.definition.comment.pascal', + regex: '\\*\\)', + next: 'pop' }, + { defaultToken: 'comment.block.pascal.one' } ] }, + { token: 'punctuation.definition.comment.pascal', + regex: '\\{', + push: + [ { token: 'punctuation.definition.comment.pascal', + regex: '\\}', + next: 'pop' }, + { defaultToken: 'comment.block.pascal.two' } ] }, + { token: 'punctuation.definition.string.begin.pascal', + regex: '"', + push: + [ { token: 'constant.character.escape.pascal', regex: '\\\\.' }, + { token: 'punctuation.definition.string.end.pascal', + regex: '"', + next: 'pop' }, + { defaultToken: 'string.quoted.double.pascal' } ], + }, + { token: 'punctuation.definition.string.begin.pascal', + regex: '\'', + push: + [ { token: 'constant.character.escape.apostrophe.pascal', + regex: '\'\'' }, + { token: 'punctuation.definition.string.end.pascal', + regex: '\'', + next: 'pop' }, + { defaultToken: 'string.quoted.single.pascal' } ] }, + { token: 'keyword.operator', + regex: '[+\\-;,/*%]|:=|=' } ] } + + this.normalizeRules(); +}; + +oop.inherits(PascalHighlightRules, TextHighlightRules); + +exports.PascalHighlightRules = PascalHighlightRules; +}); + +ace.define('ace/mode/folding/coffee', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var BaseFoldMode = acequire("./fold_mode").FoldMode; +var Range = acequire("../../range").Range; + +var FoldMode = exports.FoldMode = function() {}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var range = this.indentationBlock(session, row); + if (range) + return range; + + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1 || line[startLevel] != "#") + return; + + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + + while (++row < maxRow) { + line = session.getLine(row); + var level = line.search(re); + + if (level == -1) + continue; + + if (line[level] != "#") + break; + + endRow = row; + } + + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + + if (prevIndent!= -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + + if (indent < nextIndent) + return "start"; + else + return ""; + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/perl.js b/pitfall/pdfkit/node_modules/brace/mode/perl.js new file mode 100644 index 00000000..be80ba8f --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/perl.js @@ -0,0 +1,358 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/perl', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/perl_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var PerlHighlightRules = acequire("./perl_highlight_rules").PerlHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = PerlHighlightRules; + + this.$outdent = new MatchingBraceOutdent(); + this.foldingRules = new CStyleFoldMode({start: "^=(begin|item)\\b", end: "^=(cut)\\b"}); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "#"; + this.blockComment = [ + {start: "=begin", end: "=cut"}, + {start: "=item", end: "=cut"} + ]; + + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start") { + var match = line.match(/^.*[\{\(\[\:]\s*$/); + if (match) { + indent += tab; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/perl_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var PerlHighlightRules = function() { + + var keywords = ( + "base|constant|continue|else|elsif|for|foreach|format|goto|if|last|local|my|next|" + + "no|package|parent|redo|acequire|scalar|sub|unless|until|while|use|vars" + ); + + var buildinConstants = ("ARGV|ENV|INC|SIG"); + + var builtinFunctions = ( + "getprotobynumber|getprotobyname|getservbyname|gethostbyaddr|" + + "gethostbyname|getservbyport|getnetbyaddr|getnetbyname|getsockname|" + + "getpeername|setpriority|getprotoent|setprotoent|getpriority|" + + "endprotoent|getservent|setservent|endservent|sethostent|socketpair|" + + "getsockopt|gethostent|endhostent|setsockopt|setnetent|quotemeta|" + + "localtime|prototype|getnetent|endnetent|rewinddir|wantarray|getpwuid|" + + "closedir|getlogin|readlink|endgrent|getgrgid|getgrnam|shmwrite|" + + "shutdown|readline|endpwent|setgrent|readpipe|formline|truncate|" + + "dbmclose|syswrite|setpwent|getpwnam|getgrent|getpwent|ucfirst|sysread|" + + "setpgrp|shmread|sysseek|sysopen|telldir|defined|opendir|connect|" + + "lcfirst|getppid|binmode|syscall|sprintf|getpgrp|readdir|seekdir|" + + "waitpid|reverse|unshift|symlink|dbmopen|semget|msgrcv|rename|listen|" + + "chroot|msgsnd|shmctl|accept|unpack|exists|fileno|shmget|system|" + + "unlink|printf|gmtime|msgctl|semctl|values|rindex|substr|splice|" + + "length|msgget|select|socket|return|caller|delete|alarm|ioctl|index|" + + "undef|lstat|times|srand|chown|fcntl|close|write|umask|rmdir|study|" + + "sleep|chomp|untie|print|utime|mkdir|atan2|split|crypt|flock|chmod|" + + "BEGIN|bless|chdir|semop|shift|reset|link|stat|chop|grep|fork|dump|" + + "join|open|tell|pipe|exit|glob|warn|each|bind|sort|pack|eval|push|" + + "keys|getc|kill|seek|sqrt|send|wait|rand|tied|read|time|exec|recv|" + + "eof|chr|int|ord|exp|pos|pop|sin|log|abs|oct|hex|tie|cos|vec|END|ref|" + + "map|die|uc|lc|do" + ); + + var keywordMapper = this.createKeywordMapper({ + "keyword": keywords, + "constant.language": buildinConstants, + "support.function": builtinFunctions + }, "identifier"); + + this.$rules = { + "start" : [ + { + token : "comment.doc", + regex : "^=(?:begin|item)\\b", + next : "block_comment" + }, { + token : "string.regexp", + regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // multi line string start + regex : '["].*\\\\$', + next : "qqstring" + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : "string", // multi line string start + regex : "['].*\\\\$", + next : "qstring" + }, { + token : "constant.numeric", // hex + regex : "0x[0-9a-fA-F]+\\b" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator", + regex : "%#|\\$#|\\.\\.\\.|\\|\\|=|>>=|<<=|<=>|&&=|=>|!~|\\^=|&=|\\|=|\\.=|x=|%=|\\/=|\\*=|\\-=|\\+=|=~|\\*\\*|\\-\\-|\\.\\.|\\|\\||&&|\\+\\+|\\->|!=|==|>=|<=|>>|<<|,|=|\\?\\:|\\^|\\||x|%|\\/|\\*|<|&|\\\\|~|!|>|\\.|\\-|\\+|\\-C|\\-b|\\-S|\\-u|\\-t|\\-p|\\-l|\\-d|\\-f|\\-g|\\-s|\\-z|\\-k|\\-e|\\-O|\\-T|\\-B|\\-M|\\-A|\\-X|\\-W|\\-c|\\-R|\\-o|\\-x|\\-w|\\-r|\\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)" + }, { + token : "comment", + regex : "#.*$" + }, { + token : "lparen", + regex : "[[({]" + }, { + token : "rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + } + ], + "qqstring" : [ + { + token : "string", + regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', + next : "start" + }, { + token : "string", + regex : '.+' + } + ], + "qstring" : [ + { + token : "string", + regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", + next : "start" + }, { + token : "string", + regex : '.+' + } + ], + "block_comment": [ + { + token: "comment.doc", + regex: "^=cut\\b", + next: "start" + }, + { + defaultToken: "comment.doc" + } + ] + }; +}; + +oop.inherits(PerlHighlightRules, TextHighlightRules); + +exports.PerlHighlightRules = PerlHighlightRules; +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/pgsql.js b/pitfall/pdfkit/node_modules/brace/mode/pgsql.js new file mode 100644 index 00000000..73b614ea --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/pgsql.js @@ -0,0 +1,929 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/pgsql', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/pgsql_highlight_rules', 'ace/range'], function(acequire, exports, module) { + +var oop = acequire("../lib/oop"); +var TextMode = acequire("../mode/text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var PgsqlHighlightRules = acequire("./pgsql_highlight_rules").PgsqlHighlightRules; +var Range = acequire("../range").Range; + +var Mode = function() { + this.HighlightRules = PgsqlHighlightRules; +}; +oop.inherits(Mode, TextMode); + +(function() { + this.lineCommentStart = "--"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + if (state == "start" || state == "keyword.statementEnd") { + return ""; + } else { + return this.$getIndent(line); // Keep whatever indent the previous line has + } + } + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/pgsql_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules', 'ace/mode/perl_highlight_rules', 'ace/mode/python_highlight_rules'], function(acequire, exports, module) { + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var PerlHighlightRules = acequire("./perl_highlight_rules").PerlHighlightRules; +var PythonHighlightRules = acequire("./python_highlight_rules").PythonHighlightRules; + +var PgsqlHighlightRules = function() { + var keywords = ( + "abort|absolute|abstime|access|aclitem|action|add|admin|after|aggregate|all|also|alter|always|" + + "analyse|analyze|and|any|anyarray|anyelement|anyenum|anynonarray|array|as|asc|assertion|" + + "assignment|asymmetric|at|attribute|authorization|backward|before|begin|between|bigint|" + + "binary|bit|bool|boolean|both|box|bpchar|by|bytea|cache|called|cascade|cascaded|case|cast|" + + "catalog|chain|char|character|characteristics|check|checkpoint|cid|cidr|circle|class|close|" + + "cluster|coalesce|collate|collation|column|comment|comments|commit|committed|concurrently|" + + "configuration|connection|constraint|constraints|content|continue|conversion|copy|cost|" + + "create|cross|cstring|csv|current|current_catalog|current_date|current_role|" + + "current_schema|current_time|current_timestamp|current_user|cursor|cycle|data|database|" + + "date|day|deallocate|dec|decimal|declare|default|defaults|deferrable|deferred|definer|delete|" + + "delimiter|delimiters|desc|dictionary|disable|discard|distinct|do|document|domain|double|" + + "drop|each|else|enable|encoding|encrypted|end|enum|escape|except|exclude|excluding|exclusive|" + + "execute|exists|explain|extension|external|extract|false|family|fdw_handler|fetch|first|" + + "float|float4|float8|following|for|force|foreign|forward|freeze|from|full|function|functions|" + + "global|grant|granted|greatest|group|gtsvector|handler|having|header|hold|hour|identity|if|" + + "ilike|immediate|immutable|implicit|in|including|increment|index|indexes|inet|inherit|" + + "inherits|initially|inline|inner|inout|input|insensitive|insert|instead|int|int2|int2vector|" + + "int4|int8|integer|internal|intersect|interval|into|invoker|is|isnull|isolation|join|key|label|" + + "language|language_handler|large|last|lc_collate|lc_ctype|leading|least|left|level|like|" + + "limit|line|listen|load|local|localtime|localtimestamp|location|lock|lseg|macaddr|mapping|" + + "match|maxvalue|minute|minvalue|mode|money|month|move|name|names|national|natural|nchar|next|no|" + + "none|not|nothing|notify|notnull|nowait|null|nullif|nulls|numeric|object|of|off|offset|oid|oids|" + + "oidvector|on|only|opaque|operator|option|options|or|order|out|outer|over|overlaps|overlay|" + + "owned|owner|parser|partial|partition|passing|password|path|pg_attribute|pg_auth_members|" + + "pg_authid|pg_class|pg_database|pg_node_tree|pg_proc|pg_type|placing|plans|point|polygon|" + + "position|preceding|precision|prepare|prepared|preserve|primary|prior|privileges|" + + "procedural|procedure|quote|range|read|real|reassign|recheck|record|recursive|ref|refcursor|" + + "references|regclass|regconfig|regdictionary|regoper|regoperator|regproc|regprocedure|" + + "regtype|reindex|relative|release|reltime|rename|repeatable|replace|replica|reset|restart|" + + "restrict|returning|returns|revoke|right|role|rollback|row|rows|rule|savepoint|schema|scroll|" + + "search|second|security|select|sequence|sequences|serializable|server|session|session_user|" + + "set|setof|share|show|similar|simple|smallint|smgr|some|stable|standalone|start|statement|" + + "statistics|stdin|stdout|storage|strict|strip|substring|symmetric|sysid|system|table|tables|" + + "tablespace|temp|template|temporary|text|then|tid|time|timestamp|timestamptz|timetz|" + + "tinterval|to|trailing|transaction|treat|trigger|trim|true|truncate|trusted|tsquery|tsvector|" + + "txid_snapshot|type|unbounded|uncommitted|unencrypted|union|unique|unknown|unlisten|" + + "unlogged|until|update|user|using|uuid|vacuum|valid|validate|validator|value|values|varbit|" + + "varchar|variadic|varying|verbose|version|view|void|volatile|when|where|whitespace|window|" + + "with|without|work|wrapper|write|xid|xml|xmlattributes|xmlconcat|xmlelement|xmlexists|" + + "xmlforest|xmlparse|xmlpi|xmlroot|xmlserialize|year|yes|zone" + ); + + + var builtinFunctions = ( + "RI_FKey_cascade_del|RI_FKey_cascade_upd|RI_FKey_check_ins|RI_FKey_check_upd|" + + "RI_FKey_noaction_del|RI_FKey_noaction_upd|RI_FKey_restrict_del|RI_FKey_restrict_upd|" + + "RI_FKey_setdefault_del|RI_FKey_setdefault_upd|RI_FKey_setnull_del|" + + "RI_FKey_setnull_upd|abbrev|abs|abstime|abstimeeq|abstimege|abstimegt|abstimein|abstimele|" + + "abstimelt|abstimene|abstimeout|abstimerecv|abstimesend|aclcontains|aclexplode|aclinsert|" + + "aclitemeq|aclitemin|aclitemout|aclremove|acos|age|any_in|any_out|anyarray_in|anyarray_out|" + + "anyarray_recv|anyarray_send|anyelement_in|anyelement_out|anyenum_in|anyenum_out|" + + "anynonarray_in|anynonarray_out|anytextcat|area|areajoinsel|areasel|array_agg|" + + "array_agg_finalfn|array_agg_transfn|array_append|array_cat|array_dims|array_eq|" + + "array_fill|array_ge|array_gt|array_in|array_larger|array_le|array_length|array_lower|" + + "array_lt|array_ndims|array_ne|array_out|array_prepend|array_recv|array_send|" + + "array_smaller|array_to_string|array_upper|arraycontained|arraycontains|arrayoverlap|" + + "ascii|ascii_to_mic|ascii_to_utf8|asin|atan|atan2|avg|big5_to_euc_tw|big5_to_mic|" + + "big5_to_utf8|bit_and|bit_in|bit_length|bit_or|bit_out|bit_recv|bit_send|bitand|bitcat|" + + "bitcmp|biteq|bitge|bitgt|bitle|bitlt|bitne|bitnot|bitor|bitshiftleft|bitshiftright|" + + "bittypmodin|bittypmodout|bitxor|bool|bool_and|bool_or|booland_statefunc|booleq|boolge|" + + "boolgt|boolin|boolle|boollt|boolne|boolor_statefunc|boolout|boolrecv|boolsend|box|" + + "box_above|box_above_eq|box_add|box_below|box_below_eq|box_center|box_contain|" + + "box_contain_pt|box_contained|box_distance|box_div|box_eq|box_ge|box_gt|box_in|" + + "box_intersect|box_le|box_left|box_lt|box_mul|box_out|box_overabove|box_overbelow|" + + "box_overlap|box_overleft|box_overright|box_recv|box_right|box_same|box_send|box_sub|" + + "bpchar_larger|bpchar_pattern_ge|bpchar_pattern_gt|bpchar_pattern_le|" + + "bpchar_pattern_lt|bpchar_smaller|bpcharcmp|bpchareq|bpcharge|bpchargt|bpchariclike|" + + "bpcharicnlike|bpcharicregexeq|bpcharicregexne|bpcharin|bpcharle|bpcharlike|bpcharlt|" + + "bpcharne|bpcharnlike|bpcharout|bpcharrecv|bpcharregexeq|bpcharregexne|bpcharsend|" + + "bpchartypmodin|bpchartypmodout|broadcast|btabstimecmp|btarraycmp|btbeginscan|btboolcmp|" + + "btbpchar_pattern_cmp|btbuild|btbuildempty|btbulkdelete|btcharcmp|btcostestimate|" + + "btendscan|btfloat48cmp|btfloat4cmp|btfloat84cmp|btfloat8cmp|btgetbitmap|btgettuple|" + + "btinsert|btint24cmp|btint28cmp|btint2cmp|btint42cmp|btint48cmp|btint4cmp|btint82cmp|" + + "btint84cmp|btint8cmp|btmarkpos|btnamecmp|btoidcmp|btoidvectorcmp|btoptions|btrecordcmp|" + + "btreltimecmp|btrescan|btrestrpos|btrim|bttext_pattern_cmp|bttextcmp|bttidcmp|" + + "bttintervalcmp|btvacuumcleanup|byteacat|byteacmp|byteaeq|byteage|byteagt|byteain|byteale|" + + "bytealike|bytealt|byteane|byteanlike|byteaout|bytearecv|byteasend|cash_cmp|cash_div_cash|" + + "cash_div_flt4|cash_div_flt8|cash_div_int2|cash_div_int4|cash_eq|cash_ge|cash_gt|cash_in|" + + "cash_le|cash_lt|cash_mi|cash_mul_flt4|cash_mul_flt8|cash_mul_int2|cash_mul_int4|cash_ne|" + + "cash_out|cash_pl|cash_recv|cash_send|cash_words|cashlarger|cashsmaller|cbrt|ceil|ceiling|" + + "center|char|char_length|character_length|chareq|charge|chargt|charin|charle|charlt|charne|" + + "charout|charrecv|charsend|chr|cideq|cidin|cidout|cidr|cidr_in|cidr_out|cidr_recv|cidr_send|" + + "cidrecv|cidsend|circle|circle_above|circle_add_pt|circle_below|circle_center|" + + "circle_contain|circle_contain_pt|circle_contained|circle_distance|circle_div_pt|" + + "circle_eq|circle_ge|circle_gt|circle_in|circle_le|circle_left|circle_lt|circle_mul_pt|" + + "circle_ne|circle_out|circle_overabove|circle_overbelow|circle_overlap|circle_overleft|" + + "circle_overright|circle_recv|circle_right|circle_same|circle_send|circle_sub_pt|" + + "clock_timestamp|close_lb|close_ls|close_lseg|close_pb|close_pl|close_ps|close_sb|" + + "close_sl|col_description|concat|concat_ws|contjoinsel|contsel|convert|convert_from|" + + "convert_to|corr|cos|cot|count|covar_pop|covar_samp|cstring_in|cstring_out|cstring_recv|" + + "cstring_send|cume_dist|current_database|current_query|current_schema|current_schemas|" + + "current_setting|current_user|currtid|currtid2|currval|cursor_to_xml|" + + "cursor_to_xmlschema|database_to_xml|database_to_xml_and_xmlschema|" + + "database_to_xmlschema|date|date_cmp|date_cmp_timestamp|date_cmp_timestamptz|date_eq|" + + "date_eq_timestamp|date_eq_timestamptz|date_ge|date_ge_timestamp|date_ge_timestamptz|" + + "date_gt|date_gt_timestamp|date_gt_timestamptz|date_in|date_larger|date_le|" + + "date_le_timestamp|date_le_timestamptz|date_lt|date_lt_timestamp|date_lt_timestamptz|" + + "date_mi|date_mi_interval|date_mii|date_ne|date_ne_timestamp|date_ne_timestamptz|" + + "date_out|date_part|date_pl_interval|date_pli|date_recv|date_send|date_smaller|" + + "date_trunc|datetime_pl|datetimetz_pl|dcbrt|decode|degrees|dense_rank|dexp|diagonal|" + + "diameter|dispell_init|dispell_lexize|dist_cpoly|dist_lb|dist_pb|dist_pc|dist_pl|" + + "dist_ppath|dist_ps|dist_sb|dist_sl|div|dlog1|dlog10|domain_in|domain_recv|dpow|dround|" + + "dsimple_init|dsimple_lexize|dsnowball_init|dsnowball_lexize|dsqrt|dsynonym_init|" + + "dsynonym_lexize|dtrunc|encode|enum_cmp|enum_eq|enum_first|enum_ge|enum_gt|enum_in|" + + "enum_larger|enum_last|enum_le|enum_lt|enum_ne|enum_out|enum_range|enum_recv|enum_send|" + + "enum_smaller|eqjoinsel|eqsel|euc_cn_to_mic|euc_cn_to_utf8|" + + "euc_jis_2004_to_shift_jis_2004|euc_jis_2004_to_utf8|euc_jp_to_mic|euc_jp_to_sjis|" + + "euc_jp_to_utf8|euc_kr_to_mic|euc_kr_to_utf8|euc_tw_to_big5|euc_tw_to_mic|" + + "euc_tw_to_utf8|every|exp|factorial|family|fdw_handler_in|fdw_handler_out|first_value|" + + "float4|float48div|float48eq|float48ge|float48gt|float48le|float48lt|float48mi|float48mul|" + + "float48ne|float48pl|float4_accum|float4abs|float4div|float4eq|float4ge|float4gt|float4in|" + + "float4larger|float4le|float4lt|float4mi|float4mul|float4ne|float4out|float4pl|float4recv|" + + "float4send|float4smaller|float4um|float4up|float8|float84div|float84eq|float84ge|" + + "float84gt|float84le|float84lt|float84mi|float84mul|float84ne|float84pl|float8_accum|" + + "float8_avg|float8_corr|float8_covar_pop|float8_covar_samp|float8_regr_accum|" + + "float8_regr_avgx|float8_regr_avgy|float8_regr_intercept|float8_regr_r2|" + + "float8_regr_slope|float8_regr_sxx|float8_regr_sxy|float8_regr_syy|float8_stddev_pop|" + + "float8_stddev_samp|float8_var_pop|float8_var_samp|float8abs|float8div|float8eq|" + + "float8ge|float8gt|float8in|float8larger|float8le|float8lt|float8mi|float8mul|float8ne|" + + "float8out|float8pl|float8recv|float8send|float8smaller|float8um|float8up|floor|" + + "flt4_mul_cash|flt8_mul_cash|fmgr_c_validator|fmgr_internal_validator|" + + "fmgr_sql_validator|format|format_type|gb18030_to_utf8|gbk_to_utf8|generate_series|" + + "generate_subscripts|get_bit|get_byte|get_current_ts_config|getdatabaseencoding|" + + "getpgusername|gin_cmp_prefix|gin_cmp_tslexeme|gin_extract_tsquery|" + + "gin_extract_tsvector|gin_tsquery_consistent|ginarrayconsistent|ginarrayextract|" + + "ginbeginscan|ginbuild|ginbuildempty|ginbulkdelete|gincostestimate|ginendscan|" + + "gingetbitmap|gininsert|ginmarkpos|ginoptions|ginqueryarrayextract|ginrescan|" + + "ginrestrpos|ginvacuumcleanup|gist_box_compress|gist_box_consistent|" + + "gist_box_decompress|gist_box_penalty|gist_box_picksplit|gist_box_same|gist_box_union|" + + "gist_circle_compress|gist_circle_consistent|gist_point_compress|" + + "gist_point_consistent|gist_point_distance|gist_poly_compress|gist_poly_consistent|" + + "gistbeginscan|gistbuild|gistbuildempty|gistbulkdelete|gistcostestimate|gistendscan|" + + "gistgetbitmap|gistgettuple|gistinsert|gistmarkpos|gistoptions|gistrescan|gistrestrpos|" + + "gistvacuumcleanup|gtsquery_compress|gtsquery_consistent|gtsquery_decompress|" + + "gtsquery_penalty|gtsquery_picksplit|gtsquery_same|gtsquery_union|gtsvector_compress|" + + "gtsvector_consistent|gtsvector_decompress|gtsvector_penalty|gtsvector_picksplit|" + + "gtsvector_same|gtsvector_union|gtsvectorin|gtsvectorout|has_any_column_privilege|" + + "has_column_privilege|has_database_privilege|has_foreign_data_wrapper_privilege|" + + "has_function_privilege|has_language_privilege|has_schema_privilege|" + + "has_sequence_privilege|has_server_privilege|has_table_privilege|" + + "has_tablespace_privilege|hash_aclitem|hash_array|hash_numeric|hashbeginscan|" + + "hashbpchar|hashbuild|hashbuildempty|hashbulkdelete|hashchar|hashcostestimate|" + + "hashendscan|hashenum|hashfloat4|hashfloat8|hashgetbitmap|hashgettuple|hashinet|" + + "hashinsert|hashint2|hashint2vector|hashint4|hashint8|hashmacaddr|hashmarkpos|hashname|" + + "hashoid|hashoidvector|hashoptions|hashrescan|hashrestrpos|hashtext|hashvacuumcleanup|" + + "hashvarlena|height|host|hostmask|iclikejoinsel|iclikesel|icnlikejoinsel|icnlikesel|" + + "icregexeqjoinsel|icregexeqsel|icregexnejoinsel|icregexnesel|inet_client_addr|" + + "inet_client_port|inet_in|inet_out|inet_recv|inet_send|inet_server_addr|" + + "inet_server_port|inetand|inetmi|inetmi_int8|inetnot|inetor|inetpl|initcap|int2|int24div|" + + "int24eq|int24ge|int24gt|int24le|int24lt|int24mi|int24mul|int24ne|int24pl|int28div|int28eq|" + + "int28ge|int28gt|int28le|int28lt|int28mi|int28mul|int28ne|int28pl|int2_accum|" + + "int2_avg_accum|int2_mul_cash|int2_sum|int2abs|int2and|int2div|int2eq|int2ge|int2gt|int2in|" + + "int2larger|int2le|int2lt|int2mi|int2mod|int2mul|int2ne|int2not|int2or|int2out|int2pl|" + + "int2recv|int2send|int2shl|int2shr|int2smaller|int2um|int2up|int2vectoreq|int2vectorin|" + + "int2vectorout|int2vectorrecv|int2vectorsend|int2xor|int4|int42div|int42eq|int42ge|" + + "int42gt|int42le|int42lt|int42mi|int42mul|int42ne|int42pl|int48div|int48eq|int48ge|int48gt|" + + "int48le|int48lt|int48mi|int48mul|int48ne|int48pl|int4_accum|int4_avg_accum|int4_mul_cash|" + + "int4_sum|int4abs|int4and|int4div|int4eq|int4ge|int4gt|int4in|int4inc|int4larger|int4le|" + + "int4lt|int4mi|int4mod|int4mul|int4ne|int4not|int4or|int4out|int4pl|int4recv|int4send|" + + "int4shl|int4shr|int4smaller|int4um|int4up|int4xor|int8|int82div|int82eq|int82ge|int82gt|" + + "int82le|int82lt|int82mi|int82mul|int82ne|int82pl|int84div|int84eq|int84ge|int84gt|int84le|" + + "int84lt|int84mi|int84mul|int84ne|int84pl|int8_accum|int8_avg|int8_avg_accum|int8_sum|" + + "int8abs|int8and|int8div|int8eq|int8ge|int8gt|int8in|int8inc|int8inc_any|" + + "int8inc_float8_float8|int8larger|int8le|int8lt|int8mi|int8mod|int8mul|int8ne|int8not|" + + "int8or|int8out|int8pl|int8pl_inet|int8recv|int8send|int8shl|int8shr|int8smaller|int8um|" + + "int8up|int8xor|integer_pl_date|inter_lb|inter_sb|inter_sl|internal_in|internal_out|" + + "interval_accum|interval_avg|interval_cmp|interval_div|interval_eq|interval_ge|" + + "interval_gt|interval_hash|interval_in|interval_larger|interval_le|interval_lt|" + + "interval_mi|interval_mul|interval_ne|interval_out|interval_pl|interval_pl_date|" + + "interval_pl_time|interval_pl_timestamp|interval_pl_timestamptz|interval_pl_timetz|" + + "interval_recv|interval_send|interval_smaller|interval_um|intervaltypmodin|" + + "intervaltypmodout|intinterval|isclosed|isfinite|ishorizontal|iso8859_1_to_utf8|" + + "iso8859_to_utf8|iso_to_koi8r|iso_to_mic|iso_to_win1251|iso_to_win866|isopen|isparallel|" + + "isperp|isvertical|johab_to_utf8|justify_days|justify_hours|justify_interval|" + + "koi8r_to_iso|koi8r_to_mic|koi8r_to_utf8|koi8r_to_win1251|koi8r_to_win866|" + + "koi8u_to_utf8|lag|language_handler_in|language_handler_out|last_value|lastval|" + + "latin1_to_mic|latin2_to_mic|latin2_to_win1250|latin3_to_mic|latin4_to_mic|lead|left|" + + "length|like|like_escape|likejoinsel|likesel|line|line_distance|line_eq|line_horizontal|" + + "line_in|line_interpt|line_intersect|line_out|line_parallel|line_perp|line_recv|" + + "line_send|line_vertical|ln|lo_close|lo_creat|lo_create|lo_export|lo_import|lo_lseek|" + + "lo_open|lo_tell|lo_truncate|lo_unlink|log|loread|lower|lowrite|lpad|lseg|lseg_center|" + + "lseg_distance|lseg_eq|lseg_ge|lseg_gt|lseg_horizontal|lseg_in|lseg_interpt|" + + "lseg_intersect|lseg_le|lseg_length|lseg_lt|lseg_ne|lseg_out|lseg_parallel|lseg_perp|" + + "lseg_recv|lseg_send|lseg_vertical|ltrim|macaddr_cmp|macaddr_eq|macaddr_ge|macaddr_gt|" + + "macaddr_in|macaddr_le|macaddr_lt|macaddr_ne|macaddr_out|macaddr_recv|macaddr_send|" + + "makeaclitem|masklen|max|md5|mic_to_ascii|mic_to_big5|mic_to_euc_cn|mic_to_euc_jp|" + + "mic_to_euc_kr|mic_to_euc_tw|mic_to_iso|mic_to_koi8r|mic_to_latin1|mic_to_latin2|" + + "mic_to_latin3|mic_to_latin4|mic_to_sjis|mic_to_win1250|mic_to_win1251|mic_to_win866|" + + "min|mktinterval|mod|money|mul_d_interval|name|nameeq|namege|namegt|nameiclike|nameicnlike|" + + "nameicregexeq|nameicregexne|namein|namele|namelike|namelt|namene|namenlike|nameout|" + + "namerecv|nameregexeq|nameregexne|namesend|neqjoinsel|neqsel|netmask|network|network_cmp|" + + "network_eq|network_ge|network_gt|network_le|network_lt|network_ne|network_sub|" + + "network_subeq|network_sup|network_supeq|nextval|nlikejoinsel|nlikesel|notlike|now|" + + "npoints|nth_value|ntile|numeric_abs|numeric_accum|numeric_add|numeric_avg|" + + "numeric_avg_accum|numeric_cmp|numeric_div|numeric_div_trunc|numeric_eq|numeric_exp|" + + "numeric_fac|numeric_ge|numeric_gt|numeric_in|numeric_inc|numeric_larger|numeric_le|" + + "numeric_ln|numeric_log|numeric_lt|numeric_mod|numeric_mul|numeric_ne|numeric_out|" + + "numeric_power|numeric_recv|numeric_send|numeric_smaller|numeric_sqrt|" + + "numeric_stddev_pop|numeric_stddev_samp|numeric_sub|numeric_uminus|numeric_uplus|" + + "numeric_var_pop|numeric_var_samp|numerictypmodin|numerictypmodout|numnode|" + + "obj_description|octet_length|oid|oideq|oidge|oidgt|oidin|oidlarger|oidle|oidlt|oidne|oidout|" + + "oidrecv|oidsend|oidsmaller|oidvectoreq|oidvectorge|oidvectorgt|oidvectorin|oidvectorle|" + + "oidvectorlt|oidvectorne|oidvectorout|oidvectorrecv|oidvectorsend|oidvectortypes|on_pb|" + + "on_pl|on_ppath|on_ps|on_sb|on_sl|opaque_in|opaque_out|overlaps|overlay|path|path_add|" + + "path_add_pt|path_center|path_contain_pt|path_distance|path_div_pt|path_in|path_inter|" + + "path_length|path_mul_pt|path_n_eq|path_n_ge|path_n_gt|path_n_le|path_n_lt|path_npoints|" + + "path_out|path_recv|path_send|path_sub_pt|pclose|percent_rank|pg_advisory_lock|" + + "pg_advisory_lock_shared|pg_advisory_unlock|pg_advisory_unlock_all|" + + "pg_advisory_unlock_shared|pg_advisory_xact_lock|pg_advisory_xact_lock_shared|" + + "pg_available_extension_versions|pg_available_extensions|pg_backend_pid|" + + "pg_cancel_backend|pg_char_to_encoding|pg_client_encoding|pg_collation_is_visible|" + + "pg_column_size|pg_conf_load_time|pg_conversion_is_visible|pg_create_restore_point|" + + "pg_current_xlog_insert_location|pg_current_xlog_location|pg_cursor|pg_database_size|" + + "pg_describe_object|pg_encoding_max_length|pg_encoding_to_char|" + + "pg_extension_config_dump|pg_extension_update_paths|pg_function_is_visible|" + + "pg_get_constraintdef|pg_get_expr|pg_get_function_arguments|" + + "pg_get_function_identity_arguments|pg_get_function_result|pg_get_functiondef|" + + "pg_get_indexdef|pg_get_keywords|pg_get_ruledef|pg_get_serial_sequence|" + + "pg_get_triggerdef|pg_get_userbyid|pg_get_viewdef|pg_has_role|pg_indexes_size|" + + "pg_is_in_recovery|pg_is_other_temp_schema|pg_is_xlog_replay_paused|" + + "pg_last_xact_replay_timestamp|pg_last_xlog_receive_location|" + + "pg_last_xlog_replay_location|pg_listening_channels|pg_lock_status|pg_ls_dir|" + + "pg_my_temp_schema|pg_node_tree_in|pg_node_tree_out|pg_node_tree_recv|" + + "pg_node_tree_send|pg_notify|pg_opclass_is_visible|pg_operator_is_visible|" + + "pg_options_to_table|pg_postmaster_start_time|pg_prepared_statement|pg_prepared_xact|" + + "pg_read_binary_file|pg_read_file|pg_relation_filenode|pg_relation_filepath|" + + "pg_relation_size|pg_reload_conf|pg_rotate_logfile|pg_sequence_parameters|" + + "pg_show_all_settings|pg_size_pretty|pg_sleep|pg_start_backup|pg_stat_clear_snapshot|" + + "pg_stat_file|pg_stat_get_activity|pg_stat_get_analyze_count|" + + "pg_stat_get_autoanalyze_count|pg_stat_get_autovacuum_count|" + + "pg_stat_get_backend_activity|pg_stat_get_backend_activity_start|" + + "pg_stat_get_backend_client_addr|pg_stat_get_backend_client_port|" + + "pg_stat_get_backend_dbid|pg_stat_get_backend_idset|pg_stat_get_backend_pid|" + + "pg_stat_get_backend_start|pg_stat_get_backend_userid|pg_stat_get_backend_waiting|" + + "pg_stat_get_backend_xact_start|pg_stat_get_bgwriter_buf_written_checkpoints|" + + "pg_stat_get_bgwriter_buf_written_clean|pg_stat_get_bgwriter_maxwritten_clean|" + + "pg_stat_get_bgwriter_requested_checkpoints|pg_stat_get_bgwriter_stat_reset_time|" + + "pg_stat_get_bgwriter_timed_checkpoints|pg_stat_get_blocks_fetched|" + + "pg_stat_get_blocks_hit|pg_stat_get_buf_alloc|pg_stat_get_buf_fsync_backend|" + + "pg_stat_get_buf_written_backend|pg_stat_get_db_blocks_fetched|" + + "pg_stat_get_db_blocks_hit|pg_stat_get_db_conflict_all|" + + "pg_stat_get_db_conflict_bufferpin|pg_stat_get_db_conflict_lock|" + + "pg_stat_get_db_conflict_snapshot|pg_stat_get_db_conflict_startup_deadlock|" + + "pg_stat_get_db_conflict_tablespace|pg_stat_get_db_numbackends|" + + "pg_stat_get_db_stat_reset_time|pg_stat_get_db_tuples_deleted|" + + "pg_stat_get_db_tuples_fetched|pg_stat_get_db_tuples_inserted|" + + "pg_stat_get_db_tuples_returned|pg_stat_get_db_tuples_updated|" + + "pg_stat_get_db_xact_commit|pg_stat_get_db_xact_rollback|pg_stat_get_dead_tuples|" + + "pg_stat_get_function_calls|pg_stat_get_function_self_time|" + + "pg_stat_get_function_time|pg_stat_get_last_analyze_time|" + + "pg_stat_get_last_autoanalyze_time|pg_stat_get_last_autovacuum_time|" + + "pg_stat_get_last_vacuum_time|pg_stat_get_live_tuples|pg_stat_get_numscans|" + + "pg_stat_get_tuples_deleted|pg_stat_get_tuples_fetched|" + + "pg_stat_get_tuples_hot_updated|pg_stat_get_tuples_inserted|" + + "pg_stat_get_tuples_returned|pg_stat_get_tuples_updated|pg_stat_get_vacuum_count|" + + "pg_stat_get_wal_senders|pg_stat_get_xact_blocks_fetched|" + + "pg_stat_get_xact_blocks_hit|pg_stat_get_xact_function_calls|" + + "pg_stat_get_xact_function_self_time|pg_stat_get_xact_function_time|" + + "pg_stat_get_xact_numscans|pg_stat_get_xact_tuples_deleted|" + + "pg_stat_get_xact_tuples_fetched|pg_stat_get_xact_tuples_hot_updated|" + + "pg_stat_get_xact_tuples_inserted|pg_stat_get_xact_tuples_returned|" + + "pg_stat_get_xact_tuples_updated|pg_stat_reset|pg_stat_reset_shared|" + + "pg_stat_reset_single_function_counters|pg_stat_reset_single_table_counters|" + + "pg_stop_backup|pg_switch_xlog|pg_table_is_visible|pg_table_size|" + + "pg_tablespace_databases|pg_tablespace_size|pg_terminate_backend|pg_timezone_abbrevs|" + + "pg_timezone_names|pg_total_relation_size|pg_try_advisory_lock|" + + "pg_try_advisory_lock_shared|pg_try_advisory_xact_lock|" + + "pg_try_advisory_xact_lock_shared|pg_ts_config_is_visible|pg_ts_dict_is_visible|" + + "pg_ts_parser_is_visible|pg_ts_template_is_visible|pg_type_is_visible|pg_typeof|" + + "pg_xlog_replay_pause|pg_xlog_replay_resume|pg_xlogfile_name|pg_xlogfile_name_offset|" + + "pi|plainto_tsquery|plpgsql_call_handler|plpgsql_inline_handler|plpgsql_validator|" + + "point|point_above|point_add|point_below|point_distance|point_div|point_eq|point_horiz|" + + "point_in|point_left|point_mul|point_ne|point_out|point_recv|point_right|point_send|" + + "point_sub|point_vert|poly_above|poly_below|poly_center|poly_contain|poly_contain_pt|" + + "poly_contained|poly_distance|poly_in|poly_left|poly_npoints|poly_out|poly_overabove|" + + "poly_overbelow|poly_overlap|poly_overleft|poly_overright|poly_recv|poly_right|" + + "poly_same|poly_send|polygon|popen|position|positionjoinsel|positionsel|" + + "postgresql_fdw_validator|pow|power|prsd_end|prsd_headline|prsd_lextype|prsd_nexttoken|" + + "prsd_start|pt_contained_circle|pt_contained_poly|query_to_xml|" + + "query_to_xml_and_xmlschema|query_to_xmlschema|querytree|quote_ident|quote_literal|" + + "quote_nullable|radians|radius|random|rank|record_eq|record_ge|record_gt|record_in|" + + "record_le|record_lt|record_ne|record_out|record_recv|record_send|regclass|regclassin|" + + "regclassout|regclassrecv|regclasssend|regconfigin|regconfigout|regconfigrecv|" + + "regconfigsend|regdictionaryin|regdictionaryout|regdictionaryrecv|regdictionarysend|" + + "regexeqjoinsel|regexeqsel|regexnejoinsel|regexnesel|regexp_matches|regexp_replace|" + + "regexp_split_to_array|regexp_split_to_table|regoperatorin|regoperatorout|" + + "regoperatorrecv|regoperatorsend|regoperin|regoperout|regoperrecv|regopersend|" + + "regprocedurein|regprocedureout|regprocedurerecv|regproceduresend|regprocin|regprocout|" + + "regprocrecv|regprocsend|regr_avgx|regr_avgy|regr_count|regr_intercept|regr_r2|" + + "regr_slope|regr_sxx|regr_sxy|regr_syy|regtypein|regtypeout|regtyperecv|regtypesend|" + + "reltime|reltimeeq|reltimege|reltimegt|reltimein|reltimele|reltimelt|reltimene|reltimeout|" + + "reltimerecv|reltimesend|repeat|replace|reverse|right|round|row_number|rpad|rtrim|" + + "scalargtjoinsel|scalargtsel|scalarltjoinsel|scalarltsel|schema_to_xml|" + + "schema_to_xml_and_xmlschema|schema_to_xmlschema|session_user|set_bit|set_byte|" + + "set_config|set_masklen|setseed|setval|setweight|shell_in|shell_out|" + + "shift_jis_2004_to_euc_jis_2004|shift_jis_2004_to_utf8|shobj_description|sign|" + + "similar_escape|sin|sjis_to_euc_jp|sjis_to_mic|sjis_to_utf8|slope|smgreq|smgrin|smgrne|" + + "smgrout|split_part|sqrt|statement_timestamp|stddev|stddev_pop|stddev_samp|string_agg|" + + "string_agg_finalfn|string_agg_transfn|string_to_array|strip|strpos|substr|substring|sum|" + + "suppress_redundant_updates_trigger|table_to_xml|table_to_xml_and_xmlschema|" + + "table_to_xmlschema|tan|text|text_ge|text_gt|text_larger|text_le|text_lt|text_pattern_ge|" + + "text_pattern_gt|text_pattern_le|text_pattern_lt|text_smaller|textanycat|textcat|texteq|" + + "texticlike|texticnlike|texticregexeq|texticregexne|textin|textlen|textlike|textne|" + + "textnlike|textout|textrecv|textregexeq|textregexne|textsend|thesaurus_init|" + + "thesaurus_lexize|tideq|tidge|tidgt|tidin|tidlarger|tidle|tidlt|tidne|tidout|tidrecv|tidsend|" + + "tidsmaller|time_cmp|time_eq|time_ge|time_gt|time_hash|time_in|time_larger|time_le|time_lt|" + + "time_mi_interval|time_mi_time|time_ne|time_out|time_pl_interval|time_recv|time_send|" + + "time_smaller|timedate_pl|timemi|timenow|timeofday|timepl|timestamp_cmp|" + + "timestamp_cmp_date|timestamp_cmp_timestamptz|timestamp_eq|timestamp_eq_date|" + + "timestamp_eq_timestamptz|timestamp_ge|timestamp_ge_date|timestamp_ge_timestamptz|" + + "timestamp_gt|timestamp_gt_date|timestamp_gt_timestamptz|timestamp_hash|timestamp_in|" + + "timestamp_larger|timestamp_le|timestamp_le_date|timestamp_le_timestamptz|" + + "timestamp_lt|timestamp_lt_date|timestamp_lt_timestamptz|timestamp_mi|" + + "timestamp_mi_interval|timestamp_ne|timestamp_ne_date|timestamp_ne_timestamptz|" + + "timestamp_out|timestamp_pl_interval|timestamp_recv|timestamp_send|timestamp_smaller|" + + "timestamptypmodin|timestamptypmodout|timestamptz_cmp|timestamptz_cmp_date|" + + "timestamptz_cmp_timestamp|timestamptz_eq|timestamptz_eq_date|" + + "timestamptz_eq_timestamp|timestamptz_ge|timestamptz_ge_date|" + + "timestamptz_ge_timestamp|timestamptz_gt|timestamptz_gt_date|" + + "timestamptz_gt_timestamp|timestamptz_in|timestamptz_larger|timestamptz_le|" + + "timestamptz_le_date|timestamptz_le_timestamp|timestamptz_lt|timestamptz_lt_date|" + + "timestamptz_lt_timestamp|timestamptz_mi|timestamptz_mi_interval|timestamptz_ne|" + + "timestamptz_ne_date|timestamptz_ne_timestamp|timestamptz_out|" + + "timestamptz_pl_interval|timestamptz_recv|timestamptz_send|timestamptz_smaller|" + + "timestamptztypmodin|timestamptztypmodout|timetypmodin|timetypmodout|timetz_cmp|" + + "timetz_eq|timetz_ge|timetz_gt|timetz_hash|timetz_in|timetz_larger|timetz_le|timetz_lt|" + + "timetz_mi_interval|timetz_ne|timetz_out|timetz_pl_interval|timetz_recv|timetz_send|" + + "timetz_smaller|timetzdate_pl|timetztypmodin|timetztypmodout|timezone|tinterval|" + + "tintervalct|tintervalend|tintervaleq|tintervalge|tintervalgt|tintervalin|tintervalle|" + + "tintervalleneq|tintervallenge|tintervallengt|tintervallenle|tintervallenlt|" + + "tintervallenne|tintervallt|tintervalne|tintervalout|tintervalov|tintervalrecv|" + + "tintervalrel|tintervalsame|tintervalsend|tintervalstart|to_ascii|to_char|to_date|to_hex|" + + "to_number|to_timestamp|to_tsquery|to_tsvector|transaction_timestamp|translate|" + + "trigger_in|trigger_out|trunc|ts_debug|ts_headline|ts_lexize|ts_match_qv|ts_match_tq|" + + "ts_match_tt|ts_match_vq|ts_parse|ts_rank|ts_rank_cd|ts_rewrite|ts_stat|ts_token_type|" + + "ts_typanalyze|tsmatchjoinsel|tsmatchsel|tsq_mcontained|tsq_mcontains|tsquery_and|" + + "tsquery_cmp|tsquery_eq|tsquery_ge|tsquery_gt|tsquery_le|tsquery_lt|tsquery_ne|" + + "tsquery_not|tsquery_or|tsqueryin|tsqueryout|tsqueryrecv|tsquerysend|tsvector_cmp|" + + "tsvector_concat|tsvector_eq|tsvector_ge|tsvector_gt|tsvector_le|tsvector_lt|" + + "tsvector_ne|tsvector_update_trigger|tsvector_update_trigger_column|tsvectorin|" + + "tsvectorout|tsvectorrecv|tsvectorsend|txid_current|txid_current_snapshot|" + + "txid_snapshot_in|txid_snapshot_out|txid_snapshot_recv|txid_snapshot_send|" + + "txid_snapshot_xip|txid_snapshot_xmax|txid_snapshot_xmin|txid_visible_in_snapshot|" + + "uhc_to_utf8|unique_key_recheck|unknownin|unknownout|unknownrecv|unknownsend|unnest|" + + "upper|utf8_to_ascii|utf8_to_big5|utf8_to_euc_cn|utf8_to_euc_jis_2004|utf8_to_euc_jp|" + + "utf8_to_euc_kr|utf8_to_euc_tw|utf8_to_gb18030|utf8_to_gbk|utf8_to_iso8859|" + + "utf8_to_iso8859_1|utf8_to_johab|utf8_to_koi8r|utf8_to_koi8u|utf8_to_shift_jis_2004|" + + "utf8_to_sjis|utf8_to_uhc|utf8_to_win|uuid_cmp|uuid_eq|uuid_ge|uuid_gt|uuid_hash|uuid_in|" + + "uuid_le|uuid_lt|uuid_ne|uuid_out|uuid_recv|uuid_send|var_pop|var_samp|varbit_in|" + + "varbit_out|varbit_recv|varbit_send|varbitcmp|varbiteq|varbitge|varbitgt|varbitle|" + + "varbitlt|varbitne|varbittypmodin|varbittypmodout|varcharin|varcharout|varcharrecv|" + + "varcharsend|varchartypmodin|varchartypmodout|variance|version|void_in|void_out|" + + "void_recv|void_send|width|width_bucket|win1250_to_latin2|win1250_to_mic|win1251_to_iso|" + + "win1251_to_koi8r|win1251_to_mic|win1251_to_win866|win866_to_iso|win866_to_koi8r|" + + "win866_to_mic|win866_to_win1251|win_to_utf8|xideq|xideqint4|xidin|xidout|xidrecv|xidsend|" + + "xml|xml_in|xml_is_well_formed|xml_is_well_formed_content|xml_is_well_formed_document|" + + "xml_out|xml_recv|xml_send|xmlagg|xmlcomment|xmlconcat2|xmlexists|xmlvalidate|xpath|" + + "xpath_exists" + ); + + var keywordMapper = this.createKeywordMapper({ + "support.function": builtinFunctions, + "keyword": keywords + }, "identifier", true); + + + var sqlRules = [{ + token : "string", // single line string -- assume dollar strings if multi-line for now + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : "variable.language", // pg identifier + regex : '".*?"' + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_][a-zA-Z0-9_$]*\\b" // TODO - Unicode in identifiers + }, { + token : "keyword.operator", + regex : "!|!!|!~|!~\\*|!~~|!~~\\*|#|##|#<|#<=|#<>|#=|#>|#>=|%|\\&|\\&\\&|\\&<|\\&<\\||\\&>|\\*|\\+|" + + "\\-|/|<|<#>|<\\->|<<|<<=|<<\\||<=|<>|<\\?>|<@|<\\^|=|>|>=|>>|>>=|>\\^|\\?#|\\?\\-|\\?\\-\\||" + + "\\?\\||\\?\\|\\||@|@\\-@|@>|@@|@@@|\\^|\\||\\|\\&>|\\|/|\\|>>|\\|\\||\\|\\|/|~|~\\*|~<=~|~<~|" + + "~=|~>=~|~>~|~~|~~\\*" + }, { + token : "paren.lparen", + regex : "[\\(]" + }, { + token : "paren.rparen", + regex : "[\\)]" + }, { + token : "text", + regex : "\\s+" + } + ]; + + + this.$rules = { + "start" : [{ + token : "comment", + regex : "--.*$" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi-line comment + regex : "\\/\\*", + next : "comment" + },{ + token : "keyword.statementBegin", + regex : "^[a-zA-Z]+", // Could enumerate starting keywords but this allows things to work when new statements are added. + next : "statement" + },{ + token : "support.buildin", // psql directive + regex : "^\\\\[\\S]+.*$" + } + ], + + "statement" : [{ + token : "comment", + regex : "--.*$" + }, { + token : "comment", // multi-line comment + regex : "\\/\\*", + next : "commentStatement" + }, { + token : "statementEnd", + regex : ";", + next : "start" + }, { + token : "string", // perl, python, tcl are in the pg default dist (no tcl highlighter) + regex : "\\$perl\\$", + next : "perl-start" + }, { + token : "string", + regex : "\\$python\\$", + next : "python-start" + },{ + token : "string", + regex : "\\$[\\w_0-9]*\\$$", // dollar quote at the end of a line + next : "dollarSql" + }, { + token : "string", + regex : "\\$[\\w_0-9]*\\$", + next : "dollarStatementString" + } + ].concat(sqlRules), + + "dollarSql" : [{ + token : "comment", + regex : "--.*$" + }, { + token : "comment", // multi-line comment + regex : "\\/\\*", + next : "commentDollarSql" + }, { + token : "string", // end quoting with dollar at the start of a line + regex : "^\\$[\\w_0-9]*\\$", + next : "statement" + }, { + token : "string", + regex : "\\$[\\w_0-9]*\\$", + next : "dollarSqlString" + } + ].concat(sqlRules), + + "comment" : [{ + token : "comment", // closing comment + regex : ".*?\\*\\/", + next : "start" + }, { + token : "comment", // comment spanning whole line + regex : ".+" + } + ], + + "commentStatement" : [{ + token : "comment", // closing comment + regex : ".*?\\*\\/", + next : "statement" + }, { + token : "comment", // comment spanning whole line + regex : ".+" + } + ], + + "commentDollarSql" : [{ + token : "comment", // closing comment + regex : ".*?\\*\\/", + next : "dollarSql" + }, { + token : "comment", // comment spanning whole line + regex : ".+" + } + ], + + "dollarStatementString" : [{ + token : "string", // closing dollarstring + regex : ".*?\\$[\\w_0-9]*\\$", + next : "statement" + }, { + token : "string", // dollarstring spanning whole line + regex : ".+" + } + ], + + "dollarSqlString" : [{ + token : "string", // closing dollarstring + regex : ".*?\\$[\\w_0-9]*\\$", + next : "dollarSql" + }, { + token : "string", // dollarstring spanning whole line + regex : ".+" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("start") ]); + this.embedRules(PerlHighlightRules, "perl-", [{token : "string", regex : "\\$perl\\$", next : "statement"}]); + this.embedRules(PythonHighlightRules, "python-", [{token : "string", regex : "\\$python\\$", next : "statement"}]); +}; + +oop.inherits(PgsqlHighlightRules, TextHighlightRules); + +exports.PgsqlHighlightRules = PgsqlHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define('ace/mode/perl_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var PerlHighlightRules = function() { + + var keywords = ( + "base|constant|continue|else|elsif|for|foreach|format|goto|if|last|local|my|next|" + + "no|package|parent|redo|acequire|scalar|sub|unless|until|while|use|vars" + ); + + var buildinConstants = ("ARGV|ENV|INC|SIG"); + + var builtinFunctions = ( + "getprotobynumber|getprotobyname|getservbyname|gethostbyaddr|" + + "gethostbyname|getservbyport|getnetbyaddr|getnetbyname|getsockname|" + + "getpeername|setpriority|getprotoent|setprotoent|getpriority|" + + "endprotoent|getservent|setservent|endservent|sethostent|socketpair|" + + "getsockopt|gethostent|endhostent|setsockopt|setnetent|quotemeta|" + + "localtime|prototype|getnetent|endnetent|rewinddir|wantarray|getpwuid|" + + "closedir|getlogin|readlink|endgrent|getgrgid|getgrnam|shmwrite|" + + "shutdown|readline|endpwent|setgrent|readpipe|formline|truncate|" + + "dbmclose|syswrite|setpwent|getpwnam|getgrent|getpwent|ucfirst|sysread|" + + "setpgrp|shmread|sysseek|sysopen|telldir|defined|opendir|connect|" + + "lcfirst|getppid|binmode|syscall|sprintf|getpgrp|readdir|seekdir|" + + "waitpid|reverse|unshift|symlink|dbmopen|semget|msgrcv|rename|listen|" + + "chroot|msgsnd|shmctl|accept|unpack|exists|fileno|shmget|system|" + + "unlink|printf|gmtime|msgctl|semctl|values|rindex|substr|splice|" + + "length|msgget|select|socket|return|caller|delete|alarm|ioctl|index|" + + "undef|lstat|times|srand|chown|fcntl|close|write|umask|rmdir|study|" + + "sleep|chomp|untie|print|utime|mkdir|atan2|split|crypt|flock|chmod|" + + "BEGIN|bless|chdir|semop|shift|reset|link|stat|chop|grep|fork|dump|" + + "join|open|tell|pipe|exit|glob|warn|each|bind|sort|pack|eval|push|" + + "keys|getc|kill|seek|sqrt|send|wait|rand|tied|read|time|exec|recv|" + + "eof|chr|int|ord|exp|pos|pop|sin|log|abs|oct|hex|tie|cos|vec|END|ref|" + + "map|die|uc|lc|do" + ); + + var keywordMapper = this.createKeywordMapper({ + "keyword": keywords, + "constant.language": buildinConstants, + "support.function": builtinFunctions + }, "identifier"); + + this.$rules = { + "start" : [ + { + token : "comment.doc", + regex : "^=(?:begin|item)\\b", + next : "block_comment" + }, { + token : "string.regexp", + regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // multi line string start + regex : '["].*\\\\$', + next : "qqstring" + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : "string", // multi line string start + regex : "['].*\\\\$", + next : "qstring" + }, { + token : "constant.numeric", // hex + regex : "0x[0-9a-fA-F]+\\b" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator", + regex : "%#|\\$#|\\.\\.\\.|\\|\\|=|>>=|<<=|<=>|&&=|=>|!~|\\^=|&=|\\|=|\\.=|x=|%=|\\/=|\\*=|\\-=|\\+=|=~|\\*\\*|\\-\\-|\\.\\.|\\|\\||&&|\\+\\+|\\->|!=|==|>=|<=|>>|<<|,|=|\\?\\:|\\^|\\||x|%|\\/|\\*|<|&|\\\\|~|!|>|\\.|\\-|\\+|\\-C|\\-b|\\-S|\\-u|\\-t|\\-p|\\-l|\\-d|\\-f|\\-g|\\-s|\\-z|\\-k|\\-e|\\-O|\\-T|\\-B|\\-M|\\-A|\\-X|\\-W|\\-c|\\-R|\\-o|\\-x|\\-w|\\-r|\\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)" + }, { + token : "comment", + regex : "#.*$" + }, { + token : "lparen", + regex : "[[({]" + }, { + token : "rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + } + ], + "qqstring" : [ + { + token : "string", + regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', + next : "start" + }, { + token : "string", + regex : '.+' + } + ], + "qstring" : [ + { + token : "string", + regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", + next : "start" + }, { + token : "string", + regex : '.+' + } + ], + "block_comment": [ + { + token: "comment.doc", + regex: "^=cut\\b", + next: "start" + }, + { + defaultToken: "comment.doc" + } + ] + }; +}; + +oop.inherits(PerlHighlightRules, TextHighlightRules); + +exports.PerlHighlightRules = PerlHighlightRules; +}); + +ace.define('ace/mode/python_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var PythonHighlightRules = function() { + + var keywords = ( + "and|as|assert|break|class|continue|def|del|elif|else|except|exec|" + + "finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|" + + "raise|return|try|while|with|yield" + ); + + var builtinConstants = ( + "True|False|None|NotImplemented|Ellipsis|__debug__" + ); + + var builtinFunctions = ( + "abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|" + + "eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|" + + "binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|" + + "float|list|raw_input|unichr|callable|format|locals|reduce|unicode|" + + "chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|" + + "cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|" + + "__import__|complex|hash|min|set|apply|delattr|help|next|setattr|" + + "buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern" + ); + var keywordMapper = this.createKeywordMapper({ + "invalid.deprecated": "debugger", + "support.function": builtinFunctions, + "constant.language": builtinConstants, + "keyword": keywords + }, "identifier"); + + var strPre = "(?:r|u|ur|R|U|UR|Ur|uR)?"; + + var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))"; + var octInteger = "(?:0[oO]?[0-7]+)"; + var hexInteger = "(?:0[xX][\\dA-Fa-f]+)"; + var binInteger = "(?:0[bB][01]+)"; + var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")"; + + var exponent = "(?:[eE][+-]?\\d+)"; + var fraction = "(?:\\.\\d+)"; + var intPart = "(?:\\d+)"; + var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; + var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")"; + var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; + + var stringEscape = "\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})"; + + this.$rules = { + "start" : [ { + token : "comment", + regex : "#.*$" + }, { + token : "string", // multi line """ string start + regex : strPre + '"{3}', + next : "qqstring3" + }, { + token : "string", // " string + regex : strPre + '"(?=.)', + next : "qqstring" + }, { + token : "string", // multi line ''' string start + regex : strPre + "'{3}", + next : "qstring3" + }, { + token : "string", // ' string + regex : strPre + "'(?=.)", + next : "qstring" + }, { + token : "constant.numeric", // imaginary + regex : "(?:" + floatNumber + "|\\d+)[jJ]\\b" + }, { + token : "constant.numeric", // float + regex : floatNumber + }, { + token : "constant.numeric", // long integer + regex : integer + "[lL]\\b" + }, { + token : "constant.numeric", // integer + regex : integer + "\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator", + regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|=" + }, { + token : "paren.lparen", + regex : "[\\[\\(\\{]" + }, { + token : "paren.rparen", + regex : "[\\]\\)\\}]" + }, { + token : "text", + regex : "\\s+" + } ], + "qqstring3" : [ { + token : "constant.language.escape", + regex : stringEscape + }, { + token : "string", // multi line """ string end + regex : '"{3}', + next : "start" + }, { + defaultToken : "string" + } ], + "qstring3" : [ { + token : "constant.language.escape", + regex : stringEscape + }, { + token : "string", // multi line ''' string end + regex : "'{3}", + next : "start" + }, { + defaultToken : "string" + } ], + "qqstring" : [{ + token : "constant.language.escape", + regex : stringEscape + }, { + token : "string", + regex : "\\\\$", + next : "qqstring" + }, { + token : "string", + regex : '"|$', + next : "start" + }, { + defaultToken: "string" + }], + "qstring" : [{ + token : "constant.language.escape", + regex : stringEscape + }, { + token : "string", + regex : "\\\\$", + next : "qstring" + }, { + token : "string", + regex : "'|$", + next : "start" + }, { + defaultToken: "string" + }] + }; +}; + +oop.inherits(PythonHighlightRules, TextHighlightRules); + +exports.PythonHighlightRules = PythonHighlightRules; +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/php.js b/pitfall/pdfkit/node_modules/brace/mode/php.js new file mode 100644 index 00000000..b89dba46 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/php.js @@ -0,0 +1,2487 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/php', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/php_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle', 'ace/unicode'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var PhpHighlightRules = acequire("./php_highlight_rules").PhpHighlightRules; +var PhpLangHighlightRules = acequire("./php_highlight_rules").PhpLangHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; +var unicode = acequire("../unicode"); + +var Mode = function(opts) { + var inline = opts && opts.inline; + var HighlightRules = inline ? PhpLangHighlightRules : PhpHighlightRules; + this.HighlightRules = HighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.tokenRe = new RegExp("^[" + + unicode.packages.L + + unicode.packages.Mn + unicode.packages.Mc + + unicode.packages.Nd + + unicode.packages.Pc + "\_]+", "g" + ); + + this.nonTokenRe = new RegExp("^(?:[^" + + unicode.packages.L + + unicode.packages.Mn + unicode.packages.Mc + + unicode.packages.Nd + + unicode.packages.Pc + "\_]|\s])+", "g" + ); + + + this.lineCommentStart = ["//", "#"]; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "php-start") { + var match = line.match(/^.*[\{\(\[\:]\s*$/); + if (match) { + indent += tab; + } + } else if (state == "php-doc-start") { + if (endState != "php-doc-start") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], "ace/mode/php_worker", "PhpWorker"); + worker.attachToDocument(session.getDocument()); + + worker.on("error", function(e) { + session.setAnnotations(e.data); + }); + + worker.on("ok", function() { + session.clearAnnotations(); + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/php_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules', 'ace/mode/html_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var HtmlHighlightRules = acequire("./html_highlight_rules").HtmlHighlightRules; + +var PhpLangHighlightRules = function() { + var docComment = DocCommentHighlightRules; + var builtinFunctions = lang.arrayToMap( + ('abs|acos|acosh|addcslashes|addslashes|aggregate|aggregate_info|aggregate_methods|aggregate_methods_by_list|aggregate_methods_by_regexp|' + + 'aggregate_properties|aggregate_properties_by_list|aggregate_properties_by_regexp|aggregation_info|amqpconnection|amqpexchange|amqpqueue|' + + 'apache_child_terminate|apache_get_modules|apache_get_version|apache_getenv|apache_lookup_uri|apache_note|apache_request_headers|' + + 'apache_reset_timeout|apache_response_headers|apache_setenv|apc_add|apc_bin_dump|apc_bin_dumpfile|apc_bin_load|apc_bin_loadfile|' + + 'apc_cache_info|apc_cas|apc_clear_cache|apc_compile_file|apc_dec|apc_define_constants|apc_delete|apc_delete_file|apc_exists|apc_fetch|' + + 'apc_inc|apc_load_constants|apc_sma_info|apc_store|apciterator|apd_breakpoint|apd_callstack|apd_clunk|apd_continue|apd_croak|' + + 'apd_dump_function_table|apd_dump_persistent_resources|apd_dump_regular_resources|apd_echo|apd_get_active_symbols|apd_set_pprof_trace|' + + 'apd_set_session|apd_set_session_trace|apd_set_session_trace_socket|appenditerator|array|array_change_key_case|array_chunk|array_combine|' + + 'array_count_values|array_diff|array_diff_assoc|array_diff_key|array_diff_uassoc|array_diff_ukey|array_fill|array_fill_keys|array_filter|' + + 'array_flip|array_intersect|array_intersect_assoc|array_intersect_key|array_intersect_uassoc|array_intersect_ukey|array_key_exists|' + + 'array_keys|array_map|array_merge|array_merge_recursive|array_multisort|array_pad|array_pop|array_product|array_push|array_rand|' + + 'array_reduce|array_replace|array_replace_recursive|array_reverse|array_search|array_shift|array_slice|array_splice|array_sum|array_udiff|' + + 'array_udiff_assoc|array_udiff_uassoc|array_uintersect|array_uintersect_assoc|array_uintersect_uassoc|array_unique|array_unshift|' + + 'array_values|array_walk|array_walk_recursive|arrayaccess|arrayiterator|arrayobject|arsort|asin|asinh|asort|assert|assert_options|atan|' + + 'atan2|atanh|audioproperties|badfunctioncallexception|badmethodcallexception|base64_decode|base64_encode|base_convert|basename|' + + 'bbcode_add_element|bbcode_add_smiley|bbcode_create|bbcode_destroy|bbcode_parse|bbcode_set_arg_parser|bbcode_set_flags|bcadd|bccomp|bcdiv|' + + 'bcmod|bcmul|bcompiler_load|bcompiler_load_exe|bcompiler_parse_class|bcompiler_read|bcompiler_write_class|bcompiler_write_constant|' + + 'bcompiler_write_exe_footer|bcompiler_write_file|bcompiler_write_footer|bcompiler_write_function|bcompiler_write_functions_from_file|' + + 'bcompiler_write_header|bcompiler_write_included_filename|bcpow|bcpowmod|bcscale|bcsqrt|bcsub|bin2hex|bind_textdomain_codeset|bindec|' + + 'bindtextdomain|bson_decode|bson_encode|bumpValue|bzclose|bzcompress|bzdecompress|bzerrno|bzerror|bzerrstr|bzflush|bzopen|bzread|bzwrite|' + + 'cachingiterator|cairo|cairo_create|cairo_font_face_get_type|cairo_font_face_status|cairo_font_options_create|cairo_font_options_equal|' + + 'cairo_font_options_get_antialias|cairo_font_options_get_hint_metrics|cairo_font_options_get_hint_style|' + + 'cairo_font_options_get_subpixel_order|cairo_font_options_hash|cairo_font_options_merge|cairo_font_options_set_antialias|' + + 'cairo_font_options_set_hint_metrics|cairo_font_options_set_hint_style|cairo_font_options_set_subpixel_order|cairo_font_options_status|' + + 'cairo_format_stride_for_width|cairo_image_surface_create|cairo_image_surface_create_for_data|cairo_image_surface_create_from_png|' + + 'cairo_image_surface_get_data|cairo_image_surface_get_format|cairo_image_surface_get_height|cairo_image_surface_get_stride|' + + 'cairo_image_surface_get_width|cairo_matrix_create_scale|cairo_matrix_create_translate|cairo_matrix_invert|cairo_matrix_multiply|' + + 'cairo_matrix_rotate|cairo_matrix_transform_distance|cairo_matrix_transform_point|cairo_matrix_translate|cairo_pattern_add_color_stop_rgb|' + + 'cairo_pattern_add_color_stop_rgba|cairo_pattern_create_for_surface|cairo_pattern_create_linear|cairo_pattern_create_radial|' + + 'cairo_pattern_create_rgb|cairo_pattern_create_rgba|cairo_pattern_get_color_stop_count|cairo_pattern_get_color_stop_rgba|' + + 'cairo_pattern_get_extend|cairo_pattern_get_filter|cairo_pattern_get_linear_points|cairo_pattern_get_matrix|' + + 'cairo_pattern_get_radial_circles|cairo_pattern_get_rgba|cairo_pattern_get_surface|cairo_pattern_get_type|cairo_pattern_set_extend|' + + 'cairo_pattern_set_filter|cairo_pattern_set_matrix|cairo_pattern_status|cairo_pdf_surface_create|cairo_pdf_surface_set_size|' + + 'cairo_ps_get_levels|cairo_ps_level_to_string|cairo_ps_surface_create|cairo_ps_surface_dsc_begin_page_setup|' + + 'cairo_ps_surface_dsc_begin_setup|cairo_ps_surface_dsc_comment|cairo_ps_surface_get_eps|cairo_ps_surface_restrict_to_level|' + + 'cairo_ps_surface_set_eps|cairo_ps_surface_set_size|cairo_scaled_font_create|cairo_scaled_font_extents|cairo_scaled_font_get_ctm|' + + 'cairo_scaled_font_get_font_face|cairo_scaled_font_get_font_matrix|cairo_scaled_font_get_font_options|cairo_scaled_font_get_scale_matrix|' + + 'cairo_scaled_font_get_type|cairo_scaled_font_glyph_extents|cairo_scaled_font_status|cairo_scaled_font_text_extents|' + + 'cairo_surface_copy_page|cairo_surface_create_similar|cairo_surface_finish|cairo_surface_flush|cairo_surface_get_content|' + + 'cairo_surface_get_device_offset|cairo_surface_get_font_options|cairo_surface_get_type|cairo_surface_mark_dirty|' + + 'cairo_surface_mark_dirty_rectangle|cairo_surface_set_device_offset|cairo_surface_set_fallback_resolution|cairo_surface_show_page|' + + 'cairo_surface_status|cairo_surface_write_to_png|cairo_svg_surface_create|cairo_svg_surface_restrict_to_version|' + + 'cairo_svg_version_to_string|cairoantialias|cairocontent|cairocontext|cairoexception|cairoextend|cairofillrule|cairofilter|cairofontface|' + + 'cairofontoptions|cairofontslant|cairofonttype|cairofontweight|cairoformat|cairogradientpattern|cairohintmetrics|cairohintstyle|' + + 'cairoimagesurface|cairolineargradient|cairolinecap|cairolinejoin|cairomatrix|cairooperator|cairopath|cairopattern|cairopatterntype|' + + 'cairopdfsurface|cairopslevel|cairopssurface|cairoradialgradient|cairoscaledfont|cairosolidpattern|cairostatus|cairosubpixelorder|' + + 'cairosurface|cairosurfacepattern|cairosurfacetype|cairosvgsurface|cairosvgversion|cairotoyfontface|cal_days_in_month|cal_from_jd|cal_info|' + + 'cal_to_jd|calcul_hmac|calculhmac|call_user_func|call_user_func_array|call_user_method|call_user_method_array|callbackfilteriterator|ceil|' + + 'chdb|chdb_create|chdir|checkdate|checkdnsrr|chgrp|chmod|chop|chown|chr|chroot|chunk_split|class_alias|class_exists|class_implements|' + + 'class_parents|classkit_import|classkit_method_add|classkit_method_copy|classkit_method_redefine|classkit_method_remove|' + + 'classkit_method_rename|clearstatcache|clone|closedir|closelog|collator|com|com_addref|com_create_guid|com_event_sink|com_get|' + + 'com_get_active_object|com_invoke|com_isenum|com_load|com_load_typelib|com_message_pump|com_print_typeinfo|com_propget|com_propput|' + + 'com_propset|com_release|com_set|compact|connection_aborted|connection_status|connection_timeout|constant|construct|construct|construct|' + + 'convert_cyr_string|convert_uudecode|convert_uuencode|copy|cos|cosh|count|count_chars|countable|counter_bump|counter_bump_value|' + + 'counter_create|counter_get|counter_get_meta|counter_get_named|counter_get_value|counter_reset|counter_reset_value|crack_check|' + + 'crack_closedict|crack_getlastmessage|crack_opendict|crc32|create_function|crypt|ctype_alnum|ctype_alpha|ctype_cntrl|ctype_digit|' + + 'ctype_graph|ctype_lower|ctype_print|ctype_punct|ctype_space|ctype_upper|ctype_xdigit|cubrid_affected_rows|cubrid_bind|' + + 'cubrid_client_encoding|cubrid_close|cubrid_close_prepare|cubrid_close_request|cubrid_col_get|cubrid_col_size|cubrid_column_names|' + + 'cubrid_column_types|cubrid_commit|cubrid_connect|cubrid_connect_with_url|cubrid_current_oid|cubrid_data_seek|cubrid_db_name|' + + 'cubrid_disconnect|cubrid_drop|cubrid_errno|cubrid_error|cubrid_error_code|cubrid_error_code_facility|cubrid_error_msg|cubrid_execute|' + + 'cubrid_fetch|cubrid_fetch_array|cubrid_fetch_assoc|cubrid_fetch_field|cubrid_fetch_lengths|cubrid_fetch_object|cubrid_fetch_row|' + + 'cubrid_field_flags|cubrid_field_len|cubrid_field_name|cubrid_field_seek|cubrid_field_table|cubrid_field_type|cubrid_free_result|' + + 'cubrid_get|cubrid_get_autocommit|cubrid_get_charset|cubrid_get_class_name|cubrid_get_client_info|cubrid_get_db_parameter|' + + 'cubrid_get_server_info|cubrid_insert_id|cubrid_is_instance|cubrid_list_dbs|cubrid_load_from_glo|cubrid_lob_close|cubrid_lob_export|' + + 'cubrid_lob_get|cubrid_lob_send|cubrid_lob_size|cubrid_lock_read|cubrid_lock_write|cubrid_move_cursor|cubrid_new_glo|cubrid_next_result|' + + 'cubrid_num_cols|cubrid_num_fields|cubrid_num_rows|cubrid_ping|cubrid_prepare|cubrid_put|cubrid_query|cubrid_real_escape_string|' + + 'cubrid_result|cubrid_rollback|cubrid_save_to_glo|cubrid_schema|cubrid_send_glo|cubrid_seq_drop|cubrid_seq_insert|cubrid_seq_put|' + + 'cubrid_set_add|cubrid_set_autocommit|cubrid_set_db_parameter|cubrid_set_drop|cubrid_unbuffered_query|cubrid_version|curl_close|' + + 'curl_copy_handle|curl_errno|curl_error|curl_exec|curl_getinfo|curl_init|curl_multi_add_handle|curl_multi_close|curl_multi_exec|' + + 'curl_multi_getcontent|curl_multi_info_read|curl_multi_init|curl_multi_remove_handle|curl_multi_select|curl_setopt|curl_setopt_array|' + + 'curl_version|current|cyrus_authenticate|cyrus_bind|cyrus_close|cyrus_connect|cyrus_query|cyrus_unbind|date|date_add|date_create|' + + 'date_create_from_format|date_date_set|date_default_timezone_get|date_default_timezone_set|date_diff|date_format|date_get_last_errors|' + + 'date_interval_create_from_date_string|date_interval_format|date_isodate_set|date_modify|date_offset_get|date_parse|date_parse_from_format|' + + 'date_sub|date_sun_info|date_sunrise|date_sunset|date_time_set|date_timestamp_get|date_timestamp_set|date_timezone_get|date_timezone_set|' + + 'dateinterval|dateperiod|datetime|datetimezone|db2_autocommit|db2_bind_param|db2_client_info|db2_close|db2_column_privileges|db2_columns|' + + 'db2_commit|db2_conn_error|db2_conn_errormsg|db2_connect|db2_cursor_type|db2_escape_string|db2_exec|db2_execute|db2_fetch_array|' + + 'db2_fetch_assoc|db2_fetch_both|db2_fetch_object|db2_fetch_row|db2_field_display_size|db2_field_name|db2_field_num|db2_field_precision|' + + 'db2_field_scale|db2_field_type|db2_field_width|db2_foreign_keys|db2_free_result|db2_free_stmt|db2_get_option|db2_last_insert_id|' + + 'db2_lob_read|db2_next_result|db2_num_fields|db2_num_rows|db2_pclose|db2_pconnect|db2_prepare|db2_primary_keys|db2_procedure_columns|' + + 'db2_procedures|db2_result|db2_rollback|db2_server_info|db2_set_option|db2_special_columns|db2_statistics|db2_stmt_error|db2_stmt_errormsg|' + + 'db2_table_privileges|db2_tables|dba_close|dba_delete|dba_exists|dba_fetch|dba_firstkey|dba_handlers|dba_insert|dba_key_split|dba_list|' + + 'dba_nextkey|dba_open|dba_optimize|dba_popen|dba_replace|dba_sync|dbase_add_record|dbase_close|dbase_create|dbase_delete_record|' + + 'dbase_get_header_info|dbase_get_record|dbase_get_record_with_names|dbase_numfields|dbase_numrecords|dbase_open|dbase_pack|' + + 'dbase_replace_record|dbplus_add|dbplus_aql|dbplus_chdir|dbplus_close|dbplus_curr|dbplus_errcode|dbplus_errno|dbplus_find|dbplus_first|' + + 'dbplus_flush|dbplus_freealllocks|dbplus_freelock|dbplus_freerlocks|dbplus_getlock|dbplus_getunique|dbplus_info|dbplus_last|dbplus_lockrel|' + + 'dbplus_next|dbplus_open|dbplus_prev|dbplus_rchperm|dbplus_rcreate|dbplus_rcrtexact|dbplus_rcrtlike|dbplus_resolve|dbplus_restorepos|' + + 'dbplus_rkeys|dbplus_ropen|dbplus_rquery|dbplus_rrename|dbplus_rsecindex|dbplus_runlink|dbplus_rzap|dbplus_savepos|dbplus_setindex|' + + 'dbplus_setindexbynumber|dbplus_sql|dbplus_tcl|dbplus_tremove|dbplus_undo|dbplus_undoprepare|dbplus_unlockrel|dbplus_unselect|' + + 'dbplus_update|dbplus_xlockrel|dbplus_xunlockrel|dbx_close|dbx_compare|dbx_connect|dbx_error|dbx_escape_string|dbx_fetch_row|dbx_query|' + + 'dbx_sort|dcgettext|dcngettext|deaggregate|debug_backtrace|debug_print_backtrace|debug_zval_dump|decbin|dechex|decoct|define|' + + 'define_syslog_variables|defined|deg2rad|delete|dgettext|die|dio_close|dio_fcntl|dio_open|dio_read|dio_seek|dio_stat|dio_tcsetattr|' + + 'dio_truncate|dio_write|dir|directoryiterator|dirname|disk_free_space|disk_total_space|diskfreespace|dl|dngettext|dns_check_record|' + + 'dns_get_mx|dns_get_record|dom_import_simplexml|domainexception|domattr|domattribute_name|domattribute_set_value|domattribute_specified|' + + 'domattribute_value|domcharacterdata|domcomment|domdocument|domdocument_add_root|domdocument_create_attribute|' + + 'domdocument_create_cdata_section|domdocument_create_comment|domdocument_create_element|domdocument_create_element_ns|' + + 'domdocument_create_entity_reference|domdocument_create_processing_instruction|domdocument_create_text_node|domdocument_doctype|' + + 'domdocument_document_element|domdocument_dump_file|domdocument_dump_mem|domdocument_get_element_by_id|domdocument_get_elements_by_tagname|' + + 'domdocument_html_dump_mem|domdocument_xinclude|domdocumentfragment|domdocumenttype|domdocumenttype_entities|' + + 'domdocumenttype_internal_subset|domdocumenttype_name|domdocumenttype_notations|domdocumenttype_public_id|domdocumenttype_system_id|' + + 'domelement|domelement_get_attribute|domelement_get_attribute_node|domelement_get_elements_by_tagname|domelement_has_attribute|' + + 'domelement_remove_attribute|domelement_set_attribute|domelement_set_attribute_node|domelement_tagname|domentity|domentityreference|' + + 'domexception|domimplementation|domnamednodemap|domnode|domnode_add_namespace|domnode_append_child|domnode_append_sibling|' + + 'domnode_attributes|domnode_child_nodes|domnode_clone_node|domnode_dump_node|domnode_first_child|domnode_get_content|' + + 'domnode_has_attributes|domnode_has_child_nodes|domnode_insert_before|domnode_is_blank_node|domnode_last_child|domnode_next_sibling|' + + 'domnode_node_name|domnode_node_type|domnode_node_value|domnode_owner_document|domnode_parent_node|domnode_prefix|domnode_previous_sibling|' + + 'domnode_remove_child|domnode_replace_child|domnode_replace_node|domnode_set_content|domnode_set_name|domnode_set_namespace|' + + 'domnode_unlink_node|domnodelist|domnotation|domprocessinginstruction|domprocessinginstruction_data|domprocessinginstruction_target|' + + 'domtext|domxml_new_doc|domxml_open_file|domxml_open_mem|domxml_version|domxml_xmltree|domxml_xslt_stylesheet|domxml_xslt_stylesheet_doc|' + + 'domxml_xslt_stylesheet_file|domxml_xslt_version|domxpath|domxsltstylesheet_process|domxsltstylesheet_result_dump_file|' + + 'domxsltstylesheet_result_dump_mem|dotnet|dotnet_load|doubleval|each|easter_date|easter_days|echo|empty|emptyiterator|' + + 'enchant_broker_describe|enchant_broker_dict_exists|enchant_broker_free|enchant_broker_free_dict|enchant_broker_get_error|' + + 'enchant_broker_init|enchant_broker_list_dicts|enchant_broker_request_dict|enchant_broker_request_pwl_dict|enchant_broker_set_ordering|' + + 'enchant_dict_add_to_personal|enchant_dict_add_to_session|enchant_dict_check|enchant_dict_describe|enchant_dict_get_error|' + + 'enchant_dict_is_in_session|enchant_dict_quick_check|enchant_dict_store_replacement|enchant_dict_suggest|end|ereg|ereg_replace|eregi|' + + 'eregi_replace|error_get_last|error_log|error_reporting|errorexception|escapeshellarg|escapeshellcmd|eval|event_add|event_base_free|' + + 'event_base_loop|event_base_loopbreak|event_base_loopexit|event_base_new|event_base_priority_init|event_base_set|event_buffer_base_set|' + + 'event_buffer_disable|event_buffer_enable|event_buffer_fd_set|event_buffer_free|event_buffer_new|event_buffer_priority_set|' + + 'event_buffer_read|event_buffer_set_callback|event_buffer_timeout_set|event_buffer_watermark_set|event_buffer_write|event_del|event_free|' + + 'event_new|event_set|exception|exec|exif_imagetype|exif_read_data|exif_tagname|exif_thumbnail|exit|exp|expect_expectl|expect_popen|explode|' + + 'expm1|export|export|extension_loaded|extract|ezmlm_hash|fam_cancel_monitor|fam_close|fam_monitor_collection|fam_monitor_directory|' + + 'fam_monitor_file|fam_next_event|fam_open|fam_pending|fam_resume_monitor|fam_suspend_monitor|fbsql_affected_rows|fbsql_autocommit|' + + 'fbsql_blob_size|fbsql_change_user|fbsql_clob_size|fbsql_close|fbsql_commit|fbsql_connect|fbsql_create_blob|fbsql_create_clob|' + + 'fbsql_create_db|fbsql_data_seek|fbsql_database|fbsql_database_password|fbsql_db_query|fbsql_db_status|fbsql_drop_db|fbsql_errno|' + + 'fbsql_error|fbsql_fetch_array|fbsql_fetch_assoc|fbsql_fetch_field|fbsql_fetch_lengths|fbsql_fetch_object|fbsql_fetch_row|' + + 'fbsql_field_flags|fbsql_field_len|fbsql_field_name|fbsql_field_seek|fbsql_field_table|fbsql_field_type|fbsql_free_result|' + + 'fbsql_get_autostart_info|fbsql_hostname|fbsql_insert_id|fbsql_list_dbs|fbsql_list_fields|fbsql_list_tables|fbsql_next_result|' + + 'fbsql_num_fields|fbsql_num_rows|fbsql_password|fbsql_pconnect|fbsql_query|fbsql_read_blob|fbsql_read_clob|fbsql_result|fbsql_rollback|' + + 'fbsql_rows_fetched|fbsql_select_db|fbsql_set_characterset|fbsql_set_lob_mode|fbsql_set_password|fbsql_set_transaction|fbsql_start_db|' + + 'fbsql_stop_db|fbsql_table_name|fbsql_tablename|fbsql_username|fbsql_warnings|fclose|fdf_add_doc_javascript|fdf_add_template|fdf_close|' + + 'fdf_create|fdf_enum_values|fdf_errno|fdf_error|fdf_get_ap|fdf_get_attachment|fdf_get_encoding|fdf_get_file|fdf_get_flags|fdf_get_opt|' + + 'fdf_get_status|fdf_get_value|fdf_get_version|fdf_header|fdf_next_field_name|fdf_open|fdf_open_string|fdf_remove_item|fdf_save|' + + 'fdf_save_string|fdf_set_ap|fdf_set_encoding|fdf_set_file|fdf_set_flags|fdf_set_javascript_action|fdf_set_on_import_javascript|fdf_set_opt|' + + 'fdf_set_status|fdf_set_submit_form_action|fdf_set_target_frame|fdf_set_value|fdf_set_version|feof|fflush|fgetc|fgetcsv|fgets|fgetss|file|' + + 'file_exists|file_get_contents|file_put_contents|fileatime|filectime|filegroup|fileinode|filemtime|fileowner|fileperms|filepro|' + + 'filepro_fieldcount|filepro_fieldname|filepro_fieldtype|filepro_fieldwidth|filepro_retrieve|filepro_rowcount|filesize|filesystemiterator|' + + 'filetype|filter_has_var|filter_id|filter_input|filter_input_array|filter_list|filter_var|filter_var_array|filteriterator|finfo_buffer|' + + 'finfo_close|finfo_file|finfo_open|finfo_set_flags|floatval|flock|floor|flush|fmod|fnmatch|fopen|forward_static_call|' + + 'forward_static_call_array|fpassthru|fprintf|fputcsv|fputs|fread|frenchtojd|fribidi_log2vis|fscanf|fseek|fsockopen|fstat|ftell|ftok|' + + 'ftp_alloc|ftp_cdup|ftp_chdir|ftp_chmod|ftp_close|ftp_connect|ftp_delete|ftp_exec|ftp_fget|ftp_fput|ftp_get|ftp_get_option|ftp_login|' + + 'ftp_mdtm|ftp_mkdir|ftp_nb_continue|ftp_nb_fget|ftp_nb_fput|ftp_nb_get|ftp_nb_put|ftp_nlist|ftp_pasv|ftp_put|ftp_pwd|ftp_quit|ftp_raw|' + + 'ftp_rawlist|ftp_rename|ftp_rmdir|ftp_set_option|ftp_site|ftp_size|ftp_ssl_connect|ftp_systype|ftruncate|func_get_arg|func_get_args|' + + 'func_num_args|function_exists|fwrite|gc_collect_cycles|gc_disable|gc_enable|gc_enabled|gd_info|gearmanclient|gearmanjob|gearmantask|' + + 'gearmanworker|geoip_continent_code_by_name|geoip_country_code3_by_name|geoip_country_code_by_name|geoip_country_name_by_name|' + + 'geoip_database_info|geoip_db_avail|geoip_db_filename|geoip_db_get_all_info|geoip_id_by_name|geoip_isp_by_name|geoip_org_by_name|' + + 'geoip_record_by_name|geoip_region_by_name|geoip_region_name_by_code|geoip_time_zone_by_country_and_region|getMeta|getNamed|getValue|' + + 'get_browser|get_called_class|get_cfg_var|get_class|get_class_methods|get_class_vars|get_current_user|get_declared_classes|' + + 'get_declared_interfaces|get_defined_constants|get_defined_functions|get_defined_vars|get_extension_funcs|get_headers|' + + 'get_html_translation_table|get_include_path|get_included_files|get_loaded_extensions|get_magic_quotes_gpc|get_magic_quotes_runtime|' + + 'get_meta_tags|get_object_vars|get_parent_class|get_acequired_files|get_resource_type|getallheaders|getconstant|getconstants|getconstructor|' + + 'getcwd|getdate|getdefaultproperties|getdoccomment|getendline|getenv|getextension|getextensionname|getfilename|gethostbyaddr|gethostbyname|' + + 'gethostbynamel|gethostname|getimagesize|getinterfacenames|getinterfaces|getlastmod|getmethod|getmethods|getmodifiers|getmxrr|getmygid|' + + 'getmyinode|getmypid|getmyuid|getname|getnamespacename|getopt|getparentclass|getproperties|getproperty|getprotobyname|getprotobynumber|' + + 'getrandmax|getrusage|getservbyname|getservbyport|getshortname|getstartline|getstaticproperties|getstaticpropertyvalue|gettext|' + + 'gettimeofday|gettype|glob|globiterator|gmagick|gmagickdraw|gmagickpixel|gmdate|gmmktime|gmp_abs|gmp_add|gmp_and|gmp_clrbit|gmp_cmp|' + + 'gmp_com|gmp_div|gmp_div_q|gmp_div_qr|gmp_div_r|gmp_divexact|gmp_fact|gmp_gcd|gmp_gcdext|gmp_hamdist|gmp_init|gmp_intval|gmp_invert|' + + 'gmp_jacobi|gmp_legendre|gmp_mod|gmp_mul|gmp_neg|gmp_nextprime|gmp_or|gmp_perfect_square|gmp_popcount|gmp_pow|gmp_powm|gmp_prob_prime|' + + 'gmp_random|gmp_scan0|gmp_scan1|gmp_setbit|gmp_sign|gmp_sqrt|gmp_sqrtrem|gmp_strval|gmp_sub|gmp_testbit|gmp_xor|gmstrftime|' + + 'gnupg_adddecryptkey|gnupg_addencryptkey|gnupg_addsignkey|gnupg_cleardecryptkeys|gnupg_clearencryptkeys|gnupg_clearsignkeys|gnupg_decrypt|' + + 'gnupg_decryptverify|gnupg_encrypt|gnupg_encryptsign|gnupg_export|gnupg_geterror|gnupg_getprotocol|gnupg_import|gnupg_init|gnupg_keyinfo|' + + 'gnupg_setarmor|gnupg_seterrormode|gnupg_setsignmode|gnupg_sign|gnupg_verify|gopher_parsedir|grapheme_extract|grapheme_stripos|' + + 'grapheme_stristr|grapheme_strlen|grapheme_strpos|grapheme_strripos|grapheme_strrpos|grapheme_strstr|grapheme_substr|gregoriantojd|' + + 'gupnp_context_get_host_ip|gupnp_context_get_port|gupnp_context_get_subscription_timeout|gupnp_context_host_path|gupnp_context_new|' + + 'gupnp_context_set_subscription_timeout|gupnp_context_timeout_add|gupnp_context_unhost_path|gupnp_control_point_browse_start|' + + 'gupnp_control_point_browse_stop|gupnp_control_point_callback_set|gupnp_control_point_new|gupnp_device_action_callback_set|' + + 'gupnp_device_info_get|gupnp_device_info_get_service|gupnp_root_device_get_available|gupnp_root_device_get_relative_location|' + + 'gupnp_root_device_new|gupnp_root_device_set_available|gupnp_root_device_start|gupnp_root_device_stop|gupnp_service_action_get|' + + 'gupnp_service_action_return|gupnp_service_action_return_error|gupnp_service_action_set|gupnp_service_freeze_notify|gupnp_service_info_get|' + + 'gupnp_service_info_get_introspection|gupnp_service_introspection_get_state_variable|gupnp_service_notify|gupnp_service_proxy_action_get|' + + 'gupnp_service_proxy_action_set|gupnp_service_proxy_add_notify|gupnp_service_proxy_callback_set|gupnp_service_proxy_get_subscribed|' + + 'gupnp_service_proxy_remove_notify|gupnp_service_proxy_set_subscribed|gupnp_service_thaw_notify|gzclose|gzcompress|gzdecode|gzdeflate|' + + 'gzencode|gzeof|gzfile|gzgetc|gzgets|gzgetss|gzinflate|gzopen|gzpassthru|gzputs|gzread|gzrewind|gzseek|gztell|gzuncompress|gzwrite|' + + 'halt_compiler|haruannotation|haruannotation_setborderstyle|haruannotation_sethighlightmode|haruannotation_seticon|' + + 'haruannotation_setopened|harudestination|harudestination_setfit|harudestination_setfitb|harudestination_setfitbh|harudestination_setfitbv|' + + 'harudestination_setfith|harudestination_setfitr|harudestination_setfitv|harudestination_setxyz|harudoc|harudoc_addpage|' + + 'harudoc_addpagelabel|harudoc_construct|harudoc_createoutline|harudoc_getcurrentencoder|harudoc_getcurrentpage|harudoc_getencoder|' + + 'harudoc_getfont|harudoc_getinfoattr|harudoc_getpagelayout|harudoc_getpagemode|harudoc_getstreamsize|harudoc_insertpage|harudoc_loadjpeg|' + + 'harudoc_loadpng|harudoc_loadraw|harudoc_loadttc|harudoc_loadttf|harudoc_loadtype1|harudoc_output|harudoc_readfromstream|' + + 'harudoc_reseterror|harudoc_resetstream|harudoc_save|harudoc_savetostream|harudoc_setcompressionmode|harudoc_setcurrentencoder|' + + 'harudoc_setencryptionmode|harudoc_setinfoattr|harudoc_setinfodateattr|harudoc_setopenaction|harudoc_setpagelayout|harudoc_setpagemode|' + + 'harudoc_setpagesconfiguration|harudoc_setpassword|harudoc_setpermission|harudoc_usecnsencodings|harudoc_usecnsfonts|' + + 'harudoc_usecntencodings|harudoc_usecntfonts|harudoc_usejpencodings|harudoc_usejpfonts|harudoc_usekrencodings|harudoc_usekrfonts|' + + 'haruencoder|haruencoder_getbytetype|haruencoder_gettype|haruencoder_getunicode|haruencoder_getwritingmode|haruexception|harufont|' + + 'harufont_getascent|harufont_getcapheight|harufont_getdescent|harufont_getencodingname|harufont_getfontname|harufont_gettextwidth|' + + 'harufont_getunicodewidth|harufont_getxheight|harufont_measuretext|haruimage|haruimage_getbitspercomponent|haruimage_getcolorspace|' + + 'haruimage_getheight|haruimage_getsize|haruimage_getwidth|haruimage_setcolormask|haruimage_setmaskimage|haruoutline|' + + 'haruoutline_setdestination|haruoutline_setopened|harupage|harupage_arc|harupage_begintext|harupage_circle|harupage_closepath|' + + 'harupage_concat|harupage_createdestination|harupage_createlinkannotation|harupage_createtextannotation|harupage_createurlannotation|' + + 'harupage_curveto|harupage_curveto2|harupage_curveto3|harupage_drawimage|harupage_ellipse|harupage_endpath|harupage_endtext|' + + 'harupage_eofill|harupage_eofillstroke|harupage_fill|harupage_fillstroke|harupage_getcharspace|harupage_getcmykfill|harupage_getcmykstroke|' + + 'harupage_getcurrentfont|harupage_getcurrentfontsize|harupage_getcurrentpos|harupage_getcurrenttextpos|harupage_getdash|' + + 'harupage_getfillingcolorspace|harupage_getflatness|harupage_getgmode|harupage_getgrayfill|harupage_getgraystroke|harupage_getheight|' + + 'harupage_gethorizontalscaling|harupage_getlinecap|harupage_getlinejoin|harupage_getlinewidth|harupage_getmiterlimit|harupage_getrgbfill|' + + 'harupage_getrgbstroke|harupage_getstrokingcolorspace|harupage_gettextleading|harupage_gettextmatrix|harupage_gettextrenderingmode|' + + 'harupage_gettextrise|harupage_gettextwidth|harupage_gettransmatrix|harupage_getwidth|harupage_getwordspace|harupage_lineto|' + + 'harupage_measuretext|harupage_movetextpos|harupage_moveto|harupage_movetonextline|harupage_rectangle|harupage_setcharspace|' + + 'harupage_setcmykfill|harupage_setcmykstroke|harupage_setdash|harupage_setflatness|harupage_setfontandsize|harupage_setgrayfill|' + + 'harupage_setgraystroke|harupage_setheight|harupage_sethorizontalscaling|harupage_setlinecap|harupage_setlinejoin|harupage_setlinewidth|' + + 'harupage_setmiterlimit|harupage_setrgbfill|harupage_setrgbstroke|harupage_setrotate|harupage_setsize|harupage_setslideshow|' + + 'harupage_settextleading|harupage_settextmatrix|harupage_settextrenderingmode|harupage_settextrise|harupage_setwidth|harupage_setwordspace|' + + 'harupage_showtext|harupage_showtextnextline|harupage_stroke|harupage_textout|harupage_textrect|hasconstant|hash|hash_algos|hash_copy|' + + 'hash_file|hash_final|hash_hmac|hash_hmac_file|hash_init|hash_update|hash_update_file|hash_update_stream|hasmethod|hasproperty|header|' + + 'header_register_callback|header_remove|headers_list|headers_sent|hebrev|hebrevc|hex2bin|hexdec|highlight_file|highlight_string|' + + 'html_entity_decode|htmlentities|htmlspecialchars|htmlspecialchars_decode|http_build_cookie|http_build_query|http_build_str|http_build_url|' + + 'http_cache_etag|http_cache_last_modified|http_chunked_decode|http_date|http_deflate|http_get|http_get_request_body|' + + 'http_get_request_body_stream|http_get_request_headers|http_head|http_inflate|http_match_etag|http_match_modified|' + + 'http_match_request_header|http_negotiate_charset|http_negotiate_content_type|http_negotiate_language|http_parse_cookie|http_parse_headers|' + + 'http_parse_message|http_parse_params|http_persistent_handles_clean|http_persistent_handles_count|http_persistent_handles_ident|' + + 'http_post_data|http_post_fields|http_put_data|http_put_file|http_put_stream|http_redirect|http_request|http_request_body_encode|' + + 'http_request_method_exists|http_request_method_name|http_request_method_register|http_request_method_unregister|http_response_code|' + + 'http_send_content_disposition|http_send_content_type|http_send_data|http_send_file|http_send_last_modified|http_send_status|' + + 'http_send_stream|http_support|http_throttle|httpdeflatestream|httpdeflatestream_construct|httpdeflatestream_factory|' + + 'httpdeflatestream_finish|httpdeflatestream_flush|httpdeflatestream_update|httpinflatestream|httpinflatestream_construct|' + + 'httpinflatestream_factory|httpinflatestream_finish|httpinflatestream_flush|httpinflatestream_update|httpmessage|httpmessage_addheaders|' + + 'httpmessage_construct|httpmessage_detach|httpmessage_factory|httpmessage_fromenv|httpmessage_fromstring|httpmessage_getbody|' + + 'httpmessage_getheader|httpmessage_getheaders|httpmessage_gethttpversion|httpmessage_getparentmessage|httpmessage_getrequestmethod|' + + 'httpmessage_getrequesturl|httpmessage_getresponsecode|httpmessage_getresponsestatus|httpmessage_gettype|httpmessage_guesscontenttype|' + + 'httpmessage_prepend|httpmessage_reverse|httpmessage_send|httpmessage_setbody|httpmessage_setheaders|httpmessage_sethttpversion|' + + 'httpmessage_setrequestmethod|httpmessage_setrequesturl|httpmessage_setresponsecode|httpmessage_setresponsestatus|httpmessage_settype|' + + 'httpmessage_tomessagetypeobject|httpmessage_tostring|httpquerystring|httpquerystring_construct|httpquerystring_get|httpquerystring_mod|' + + 'httpquerystring_set|httpquerystring_singleton|httpquerystring_toarray|httpquerystring_tostring|httpquerystring_xlate|httprequest|' + + 'httprequest_addcookies|httprequest_addheaders|httprequest_addpostfields|httprequest_addpostfile|httprequest_addputdata|' + + 'httprequest_addquerydata|httprequest_addrawpostdata|httprequest_addssloptions|httprequest_clearhistory|httprequest_construct|' + + 'httprequest_enablecookies|httprequest_getcontenttype|httprequest_getcookies|httprequest_getheaders|httprequest_gethistory|' + + 'httprequest_getmethod|httprequest_getoptions|httprequest_getpostfields|httprequest_getpostfiles|httprequest_getputdata|' + + 'httprequest_getputfile|httprequest_getquerydata|httprequest_getrawpostdata|httprequest_getrawrequestmessage|' + + 'httprequest_getrawresponsemessage|httprequest_getrequestmessage|httprequest_getresponsebody|httprequest_getresponsecode|' + + 'httprequest_getresponsecookies|httprequest_getresponsedata|httprequest_getresponseheader|httprequest_getresponseinfo|' + + 'httprequest_getresponsemessage|httprequest_getresponsestatus|httprequest_getssloptions|httprequest_geturl|httprequest_resetcookies|' + + 'httprequest_send|httprequest_setcontenttype|httprequest_setcookies|httprequest_setheaders|httprequest_setmethod|httprequest_setoptions|' + + 'httprequest_setpostfields|httprequest_setpostfiles|httprequest_setputdata|httprequest_setputfile|httprequest_setquerydata|' + + 'httprequest_setrawpostdata|httprequest_setssloptions|httprequest_seturl|httprequestpool|httprequestpool_attach|httprequestpool_construct|' + + 'httprequestpool_destruct|httprequestpool_detach|httprequestpool_getattachedrequests|httprequestpool_getfinishedrequests|' + + 'httprequestpool_reset|httprequestpool_send|httprequestpool_socketperform|httprequestpool_socketselect|httpresponse|httpresponse_capture|' + + 'httpresponse_getbuffersize|httpresponse_getcache|httpresponse_getcachecontrol|httpresponse_getcontentdisposition|' + + 'httpresponse_getcontenttype|httpresponse_getdata|httpresponse_getetag|httpresponse_getfile|httpresponse_getgzip|httpresponse_getheader|' + + 'httpresponse_getlastmodified|httpresponse_getrequestbody|httpresponse_getrequestbodystream|httpresponse_getrequestheaders|' + + 'httpresponse_getstream|httpresponse_getthrottledelay|httpresponse_guesscontenttype|httpresponse_redirect|httpresponse_send|' + + 'httpresponse_setbuffersize|httpresponse_setcache|httpresponse_setcachecontrol|httpresponse_setcontentdisposition|' + + 'httpresponse_setcontenttype|httpresponse_setdata|httpresponse_setetag|httpresponse_setfile|httpresponse_setgzip|httpresponse_setheader|' + + 'httpresponse_setlastmodified|httpresponse_setstream|httpresponse_setthrottledelay|httpresponse_status|hw_array2objrec|hw_changeobject|' + + 'hw_children|hw_childrenobj|hw_close|hw_connect|hw_connection_info|hw_cp|hw_deleteobject|hw_docbyanchor|hw_docbyanchorobj|' + + 'hw_document_attributes|hw_document_bodytag|hw_document_content|hw_document_setcontent|hw_document_size|hw_dummy|hw_edittext|hw_error|' + + 'hw_errormsg|hw_free_document|hw_getanchors|hw_getanchorsobj|hw_getandlock|hw_getchildcoll|hw_getchildcollobj|hw_getchilddoccoll|' + + 'hw_getchilddoccollobj|hw_getobject|hw_getobjectbyquery|hw_getobjectbyquerycoll|hw_getobjectbyquerycollobj|hw_getobjectbyqueryobj|' + + 'hw_getparents|hw_getparentsobj|hw_getrellink|hw_getremote|hw_getremotechildren|hw_getsrcbydestobj|hw_gettext|hw_getusername|hw_identify|' + + 'hw_incollections|hw_info|hw_inscoll|hw_insdoc|hw_insertanchors|hw_insertdocument|hw_insertobject|hw_mapid|hw_modifyobject|hw_mv|' + + 'hw_new_document|hw_objrec2array|hw_output_document|hw_pconnect|hw_pipedocument|hw_root|hw_setlinkroot|hw_stat|hw_unlock|hw_who|' + + 'hwapi_attribute|hwapi_attribute_key|hwapi_attribute_langdepvalue|hwapi_attribute_value|hwapi_attribute_values|hwapi_checkin|' + + 'hwapi_checkout|hwapi_children|hwapi_content|hwapi_content_mimetype|hwapi_content_read|hwapi_copy|hwapi_dbstat|hwapi_dcstat|' + + 'hwapi_dstanchors|hwapi_dstofsrcanchor|hwapi_error_count|hwapi_error_reason|hwapi_find|hwapi_ftstat|hwapi_hgcsp|hwapi_hwstat|' + + 'hwapi_identify|hwapi_info|hwapi_insert|hwapi_insertanchor|hwapi_insertcollection|hwapi_insertdocument|hwapi_link|hwapi_lock|hwapi_move|' + + 'hwapi_new_content|hwapi_object|hwapi_object_assign|hwapi_object_attreditable|hwapi_object_count|hwapi_object_insert|hwapi_object_new|' + + 'hwapi_object_remove|hwapi_object_title|hwapi_object_value|hwapi_objectbyanchor|hwapi_parents|hwapi_reason_description|hwapi_reason_type|' + + 'hwapi_remove|hwapi_replace|hwapi_setcommittedversion|hwapi_srcanchors|hwapi_srcsofdst|hwapi_unlock|hwapi_user|hwapi_userlist|hypot|' + + 'ibase_add_user|ibase_affected_rows|ibase_backup|ibase_blob_add|ibase_blob_cancel|ibase_blob_close|ibase_blob_create|ibase_blob_echo|' + + 'ibase_blob_get|ibase_blob_import|ibase_blob_info|ibase_blob_open|ibase_close|ibase_commit|ibase_commit_ret|ibase_connect|ibase_db_info|' + + 'ibase_delete_user|ibase_drop_db|ibase_errcode|ibase_errmsg|ibase_execute|ibase_fetch_assoc|ibase_fetch_object|ibase_fetch_row|' + + 'ibase_field_info|ibase_free_event_handler|ibase_free_query|ibase_free_result|ibase_gen_id|ibase_maintain_db|ibase_modify_user|' + + 'ibase_name_result|ibase_num_fields|ibase_num_params|ibase_param_info|ibase_pconnect|ibase_prepare|ibase_query|ibase_restore|' + + 'ibase_rollback|ibase_rollback_ret|ibase_server_info|ibase_service_attach|ibase_service_detach|ibase_set_event_handler|ibase_timefmt|' + + 'ibase_trans|ibase_wait_event|iconv|iconv_get_encoding|iconv_mime_decode|iconv_mime_decode_headers|iconv_mime_encode|iconv_set_encoding|' + + 'iconv_strlen|iconv_strpos|iconv_strrpos|iconv_substr|id3_get_frame_long_name|id3_get_frame_short_name|id3_get_genre_id|id3_get_genre_list|' + + 'id3_get_genre_name|id3_get_tag|id3_get_version|id3_remove_tag|id3_set_tag|id3v2attachedpictureframe|id3v2frame|id3v2tag|idate|' + + 'idn_to_ascii|idn_to_unicode|idn_to_utf8|ifx_affected_rows|ifx_blobinfile_mode|ifx_byteasvarchar|ifx_close|ifx_connect|ifx_copy_blob|' + + 'ifx_create_blob|ifx_create_char|ifx_do|ifx_error|ifx_errormsg|ifx_fetch_row|ifx_fieldproperties|ifx_fieldtypes|ifx_free_blob|' + + 'ifx_free_char|ifx_free_result|ifx_get_blob|ifx_get_char|ifx_getsqlca|ifx_htmltbl_result|ifx_nullformat|ifx_num_fields|ifx_num_rows|' + + 'ifx_pconnect|ifx_prepare|ifx_query|ifx_textasvarchar|ifx_update_blob|ifx_update_char|ifxus_close_slob|ifxus_create_slob|ifxus_free_slob|' + + 'ifxus_open_slob|ifxus_read_slob|ifxus_seek_slob|ifxus_tell_slob|ifxus_write_slob|ignore_user_abort|iis_add_server|iis_get_dir_security|' + + 'iis_get_script_map|iis_get_server_by_comment|iis_get_server_by_path|iis_get_server_rights|iis_get_service_state|iis_remove_server|' + + 'iis_set_app_settings|iis_set_dir_security|iis_set_script_map|iis_set_server_rights|iis_start_server|iis_start_service|iis_stop_server|' + + 'iis_stop_service|image2wbmp|image_type_to_extension|image_type_to_mime_type|imagealphablending|imageantialias|imagearc|imagechar|' + + 'imagecharup|imagecolorallocate|imagecolorallocatealpha|imagecolorat|imagecolorclosest|imagecolorclosestalpha|imagecolorclosesthwb|' + + 'imagecolordeallocate|imagecolorexact|imagecolorexactalpha|imagecolormatch|imagecolorresolve|imagecolorresolvealpha|imagecolorset|' + + 'imagecolorsforindex|imagecolorstotal|imagecolortransparent|imageconvolution|imagecopy|imagecopymerge|imagecopymergegray|' + + 'imagecopyresampled|imagecopyresized|imagecreate|imagecreatefromgd|imagecreatefromgd2|imagecreatefromgd2part|imagecreatefromgif|' + + 'imagecreatefromjpeg|imagecreatefrompng|imagecreatefromstring|imagecreatefromwbmp|imagecreatefromxbm|imagecreatefromxpm|' + + 'imagecreatetruecolor|imagedashedline|imagedestroy|imageellipse|imagefill|imagefilledarc|imagefilledellipse|imagefilledpolygon|' + + 'imagefilledrectangle|imagefilltoborder|imagefilter|imagefontheight|imagefontwidth|imageftbbox|imagefttext|imagegammacorrect|imagegd|' + + 'imagegd2|imagegif|imagegrabscreen|imagegrabwindow|imageinterlace|imageistruecolor|imagejpeg|imagelayereffect|imageline|imageloadfont|' + + 'imagepalettecopy|imagepng|imagepolygon|imagepsbbox|imagepsencodefont|imagepsextendfont|imagepsfreefont|imagepsloadfont|imagepsslantfont|' + + 'imagepstext|imagerectangle|imagerotate|imagesavealpha|imagesetbrush|imagesetpixel|imagesetstyle|imagesetthickness|imagesettile|' + + 'imagestring|imagestringup|imagesx|imagesy|imagetruecolortopalette|imagettfbbox|imagettftext|imagetypes|imagewbmp|imagexbm|imagick|' + + 'imagick_adaptiveblurimage|imagick_adaptiveresizeimage|imagick_adaptivesharpenimage|imagick_adaptivethresholdimage|imagick_addimage|' + + 'imagick_addnoiseimage|imagick_affinetransformimage|imagick_animateimages|imagick_annotateimage|imagick_appendimages|imagick_averageimages|' + + 'imagick_blackthresholdimage|imagick_blurimage|imagick_borderimage|imagick_charcoalimage|imagick_chopimage|imagick_clear|imagick_clipimage|' + + 'imagick_clippathimage|imagick_clone|imagick_clutimage|imagick_coalesceimages|imagick_colorfloodfillimage|imagick_colorizeimage|' + + 'imagick_combineimages|imagick_commentimage|imagick_compareimagechannels|imagick_compareimagelayers|imagick_compareimages|' + + 'imagick_compositeimage|imagick_construct|imagick_contrastimage|imagick_contraststretchimage|imagick_convolveimage|imagick_cropimage|' + + 'imagick_cropthumbnailimage|imagick_current|imagick_cyclecolormapimage|imagick_decipherimage|imagick_deconstructimages|' + + 'imagick_deleteimageartifact|imagick_despeckleimage|imagick_destroy|imagick_displayimage|imagick_displayimages|imagick_distortimage|' + + 'imagick_drawimage|imagick_edgeimage|imagick_embossimage|imagick_encipherimage|imagick_enhanceimage|imagick_equalizeimage|' + + 'imagick_evaluateimage|imagick_extentimage|imagick_flattenimages|imagick_flipimage|imagick_floodfillpaintimage|imagick_flopimage|' + + 'imagick_frameimage|imagick_fximage|imagick_gammaimage|imagick_gaussianblurimage|imagick_getcolorspace|imagick_getcompression|' + + 'imagick_getcompressionquality|imagick_getcopyright|imagick_getfilename|imagick_getfont|imagick_getformat|imagick_getgravity|' + + 'imagick_gethomeurl|imagick_getimage|imagick_getimagealphachannel|imagick_getimageartifact|imagick_getimagebackgroundcolor|' + + 'imagick_getimageblob|imagick_getimageblueprimary|imagick_getimagebordercolor|imagick_getimagechanneldepth|' + + 'imagick_getimagechanneldistortion|imagick_getimagechanneldistortions|imagick_getimagechannelextrema|imagick_getimagechannelmean|' + + 'imagick_getimagechannelrange|imagick_getimagechannelstatistics|imagick_getimageclipmask|imagick_getimagecolormapcolor|' + + 'imagick_getimagecolors|imagick_getimagecolorspace|imagick_getimagecompose|imagick_getimagecompression|imagick_getimagecompressionquality|' + + 'imagick_getimagedelay|imagick_getimagedepth|imagick_getimagedispose|imagick_getimagedistortion|imagick_getimageextrema|' + + 'imagick_getimagefilename|imagick_getimageformat|imagick_getimagegamma|imagick_getimagegeometry|imagick_getimagegravity|' + + 'imagick_getimagegreenprimary|imagick_getimageheight|imagick_getimagehistogram|imagick_getimageindex|imagick_getimageinterlacescheme|' + + 'imagick_getimageinterpolatemethod|imagick_getimageiterations|imagick_getimagelength|imagick_getimagemagicklicense|imagick_getimagematte|' + + 'imagick_getimagemattecolor|imagick_getimageorientation|imagick_getimagepage|imagick_getimagepixelcolor|imagick_getimageprofile|' + + 'imagick_getimageprofiles|imagick_getimageproperties|imagick_getimageproperty|imagick_getimageredprimary|imagick_getimageregion|' + + 'imagick_getimagerenderingintent|imagick_getimageresolution|imagick_getimagesblob|imagick_getimagescene|imagick_getimagesignature|' + + 'imagick_getimagesize|imagick_getimagetickspersecond|imagick_getimagetotalinkdensity|imagick_getimagetype|imagick_getimageunits|' + + 'imagick_getimagevirtualpixelmethod|imagick_getimagewhitepoint|imagick_getimagewidth|imagick_getinterlacescheme|imagick_getiteratorindex|' + + 'imagick_getnumberimages|imagick_getoption|imagick_getpackagename|imagick_getpage|imagick_getpixeliterator|imagick_getpixelregioniterator|' + + 'imagick_getpointsize|imagick_getquantumdepth|imagick_getquantumrange|imagick_getreleasedate|imagick_getresource|imagick_getresourcelimit|' + + 'imagick_getsamplingfactors|imagick_getsize|imagick_getsizeoffset|imagick_getversion|imagick_hasnextimage|imagick_haspreviousimage|' + + 'imagick_identifyimage|imagick_implodeimage|imagick_labelimage|imagick_levelimage|imagick_linearstretchimage|imagick_liquidrescaleimage|' + + 'imagick_magnifyimage|imagick_mapimage|imagick_mattefloodfillimage|imagick_medianfilterimage|imagick_mergeimagelayers|imagick_minifyimage|' + + 'imagick_modulateimage|imagick_montageimage|imagick_morphimages|imagick_mosaicimages|imagick_motionblurimage|imagick_negateimage|' + + 'imagick_newimage|imagick_newpseudoimage|imagick_nextimage|imagick_normalizeimage|imagick_oilpaintimage|imagick_opaquepaintimage|' + + 'imagick_optimizeimagelayers|imagick_orderedposterizeimage|imagick_paintfloodfillimage|imagick_paintopaqueimage|' + + 'imagick_painttransparentimage|imagick_pingimage|imagick_pingimageblob|imagick_pingimagefile|imagick_polaroidimage|imagick_posterizeimage|' + + 'imagick_previewimages|imagick_previousimage|imagick_profileimage|imagick_quantizeimage|imagick_quantizeimages|imagick_queryfontmetrics|' + + 'imagick_queryfonts|imagick_queryformats|imagick_radialblurimage|imagick_raiseimage|imagick_randomthresholdimage|imagick_readimage|' + + 'imagick_readimageblob|imagick_readimagefile|imagick_recolorimage|imagick_reducenoiseimage|imagick_removeimage|imagick_removeimageprofile|' + + 'imagick_render|imagick_resampleimage|imagick_resetimagepage|imagick_resizeimage|imagick_rollimage|imagick_rotateimage|' + + 'imagick_roundcorners|imagick_sampleimage|imagick_scaleimage|imagick_separateimagechannel|imagick_sepiatoneimage|' + + 'imagick_setbackgroundcolor|imagick_setcolorspace|imagick_setcompression|imagick_setcompressionquality|imagick_setfilename|' + + 'imagick_setfirstiterator|imagick_setfont|imagick_setformat|imagick_setgravity|imagick_setimage|imagick_setimagealphachannel|' + + 'imagick_setimageartifact|imagick_setimagebackgroundcolor|imagick_setimagebias|imagick_setimageblueprimary|imagick_setimagebordercolor|' + + 'imagick_setimagechanneldepth|imagick_setimageclipmask|imagick_setimagecolormapcolor|imagick_setimagecolorspace|imagick_setimagecompose|' + + 'imagick_setimagecompression|imagick_setimagecompressionquality|imagick_setimagedelay|imagick_setimagedepth|imagick_setimagedispose|' + + 'imagick_setimageextent|imagick_setimagefilename|imagick_setimageformat|imagick_setimagegamma|imagick_setimagegravity|' + + 'imagick_setimagegreenprimary|imagick_setimageindex|imagick_setimageinterlacescheme|imagick_setimageinterpolatemethod|' + + 'imagick_setimageiterations|imagick_setimagematte|imagick_setimagemattecolor|imagick_setimageopacity|imagick_setimageorientation|' + + 'imagick_setimagepage|imagick_setimageprofile|imagick_setimageproperty|imagick_setimageredprimary|imagick_setimagerenderingintent|' + + 'imagick_setimageresolution|imagick_setimagescene|imagick_setimagetickspersecond|imagick_setimagetype|imagick_setimageunits|' + + 'imagick_setimagevirtualpixelmethod|imagick_setimagewhitepoint|imagick_setinterlacescheme|imagick_setiteratorindex|imagick_setlastiterator|' + + 'imagick_setoption|imagick_setpage|imagick_setpointsize|imagick_setresolution|imagick_setresourcelimit|imagick_setsamplingfactors|' + + 'imagick_setsize|imagick_setsizeoffset|imagick_settype|imagick_shadeimage|imagick_shadowimage|imagick_sharpenimage|imagick_shaveimage|' + + 'imagick_shearimage|imagick_sigmoidalcontrastimage|imagick_sketchimage|imagick_solarizeimage|imagick_spliceimage|imagick_spreadimage|' + + 'imagick_steganoimage|imagick_stereoimage|imagick_stripimage|imagick_swirlimage|imagick_textureimage|imagick_thresholdimage|' + + 'imagick_thumbnailimage|imagick_tintimage|imagick_transformimage|imagick_transparentpaintimage|imagick_transposeimage|' + + 'imagick_transverseimage|imagick_trimimage|imagick_uniqueimagecolors|imagick_unsharpmaskimage|imagick_valid|imagick_vignetteimage|' + + 'imagick_waveimage|imagick_whitethresholdimage|imagick_writeimage|imagick_writeimagefile|imagick_writeimages|imagick_writeimagesfile|' + + 'imagickdraw|imagickdraw_affine|imagickdraw_annotation|imagickdraw_arc|imagickdraw_bezier|imagickdraw_circle|imagickdraw_clear|' + + 'imagickdraw_clone|imagickdraw_color|imagickdraw_comment|imagickdraw_composite|imagickdraw_construct|imagickdraw_destroy|' + + 'imagickdraw_ellipse|imagickdraw_getclippath|imagickdraw_getcliprule|imagickdraw_getclipunits|imagickdraw_getfillcolor|' + + 'imagickdraw_getfillopacity|imagickdraw_getfillrule|imagickdraw_getfont|imagickdraw_getfontfamily|imagickdraw_getfontsize|' + + 'imagickdraw_getfontstyle|imagickdraw_getfontweight|imagickdraw_getgravity|imagickdraw_getstrokeantialias|imagickdraw_getstrokecolor|' + + 'imagickdraw_getstrokedasharray|imagickdraw_getstrokedashoffset|imagickdraw_getstrokelinecap|imagickdraw_getstrokelinejoin|' + + 'imagickdraw_getstrokemiterlimit|imagickdraw_getstrokeopacity|imagickdraw_getstrokewidth|imagickdraw_gettextalignment|' + + 'imagickdraw_gettextantialias|imagickdraw_gettextdecoration|imagickdraw_gettextencoding|imagickdraw_gettextundercolor|' + + 'imagickdraw_getvectorgraphics|imagickdraw_line|imagickdraw_matte|imagickdraw_pathclose|imagickdraw_pathcurvetoabsolute|' + + 'imagickdraw_pathcurvetoquadraticbezierabsolute|imagickdraw_pathcurvetoquadraticbezierrelative|' + + 'imagickdraw_pathcurvetoquadraticbeziersmoothabsolute|imagickdraw_pathcurvetoquadraticbeziersmoothrelative|imagickdraw_pathcurvetorelative|' + + 'imagickdraw_pathcurvetosmoothabsolute|imagickdraw_pathcurvetosmoothrelative|imagickdraw_pathellipticarcabsolute|' + + 'imagickdraw_pathellipticarcrelative|imagickdraw_pathfinish|imagickdraw_pathlinetoabsolute|imagickdraw_pathlinetohorizontalabsolute|' + + 'imagickdraw_pathlinetohorizontalrelative|imagickdraw_pathlinetorelative|imagickdraw_pathlinetoverticalabsolute|' + + 'imagickdraw_pathlinetoverticalrelative|imagickdraw_pathmovetoabsolute|imagickdraw_pathmovetorelative|imagickdraw_pathstart|' + + 'imagickdraw_point|imagickdraw_polygon|imagickdraw_polyline|imagickdraw_pop|imagickdraw_popclippath|imagickdraw_popdefs|' + + 'imagickdraw_poppattern|imagickdraw_push|imagickdraw_pushclippath|imagickdraw_pushdefs|imagickdraw_pushpattern|imagickdraw_rectangle|' + + 'imagickdraw_render|imagickdraw_rotate|imagickdraw_roundrectangle|imagickdraw_scale|imagickdraw_setclippath|imagickdraw_setcliprule|' + + 'imagickdraw_setclipunits|imagickdraw_setfillalpha|imagickdraw_setfillcolor|imagickdraw_setfillopacity|imagickdraw_setfillpatternurl|' + + 'imagickdraw_setfillrule|imagickdraw_setfont|imagickdraw_setfontfamily|imagickdraw_setfontsize|imagickdraw_setfontstretch|' + + 'imagickdraw_setfontstyle|imagickdraw_setfontweight|imagickdraw_setgravity|imagickdraw_setstrokealpha|imagickdraw_setstrokeantialias|' + + 'imagickdraw_setstrokecolor|imagickdraw_setstrokedasharray|imagickdraw_setstrokedashoffset|imagickdraw_setstrokelinecap|' + + 'imagickdraw_setstrokelinejoin|imagickdraw_setstrokemiterlimit|imagickdraw_setstrokeopacity|imagickdraw_setstrokepatternurl|' + + 'imagickdraw_setstrokewidth|imagickdraw_settextalignment|imagickdraw_settextantialias|imagickdraw_settextdecoration|' + + 'imagickdraw_settextencoding|imagickdraw_settextundercolor|imagickdraw_setvectorgraphics|imagickdraw_setviewbox|imagickdraw_skewx|' + + 'imagickdraw_skewy|imagickdraw_translate|imagickpixel|imagickpixel_clear|imagickpixel_construct|imagickpixel_destroy|imagickpixel_getcolor|' + + 'imagickpixel_getcolorasstring|imagickpixel_getcolorcount|imagickpixel_getcolorvalue|imagickpixel_gethsl|imagickpixel_issimilar|' + + 'imagickpixel_setcolor|imagickpixel_setcolorvalue|imagickpixel_sethsl|imagickpixeliterator|imagickpixeliterator_clear|' + + 'imagickpixeliterator_construct|imagickpixeliterator_destroy|imagickpixeliterator_getcurrentiteratorrow|' + + 'imagickpixeliterator_getiteratorrow|imagickpixeliterator_getnextiteratorrow|imagickpixeliterator_getpreviousiteratorrow|' + + 'imagickpixeliterator_newpixeliterator|imagickpixeliterator_newpixelregioniterator|imagickpixeliterator_resetiterator|' + + 'imagickpixeliterator_setiteratorfirstrow|imagickpixeliterator_setiteratorlastrow|imagickpixeliterator_setiteratorrow|' + + 'imagickpixeliterator_synciterator|imap_8bit|imap_alerts|imap_append|imap_base64|imap_binary|imap_body|imap_bodystruct|imap_check|' + + 'imap_clearflag_full|imap_close|imap_create|imap_createmailbox|imap_delete|imap_deletemailbox|imap_errors|imap_expunge|imap_fetch_overview|' + + 'imap_fetchbody|imap_fetchheader|imap_fetchmime|imap_fetchstructure|imap_fetchtext|imap_gc|imap_get_quota|imap_get_quotaroot|imap_getacl|' + + 'imap_getmailboxes|imap_getsubscribed|imap_header|imap_headerinfo|imap_headers|imap_last_error|imap_list|imap_listmailbox|imap_listscan|' + + 'imap_listsubscribed|imap_lsub|imap_mail|imap_mail_compose|imap_mail_copy|imap_mail_move|imap_mailboxmsginfo|imap_mime_header_decode|' + + 'imap_msgno|imap_num_msg|imap_num_recent|imap_open|imap_ping|imap_qprint|imap_rename|imap_renamemailbox|imap_reopen|' + + 'imap_rfc822_parse_adrlist|imap_rfc822_parse_headers|imap_rfc822_write_address|imap_savebody|imap_scan|imap_scanmailbox|imap_search|' + + 'imap_set_quota|imap_setacl|imap_setflag_full|imap_sort|imap_status|imap_subscribe|imap_thread|imap_timeout|imap_uid|imap_undelete|' + + 'imap_unsubscribe|imap_utf7_decode|imap_utf7_encode|imap_utf8|implementsinterface|implode|import_request_variables|in_array|include|' + + 'include_once|inclued_get_data|inet_ntop|inet_pton|infiniteiterator|ingres_autocommit|ingres_autocommit_state|ingres_charset|ingres_close|' + + 'ingres_commit|ingres_connect|ingres_cursor|ingres_errno|ingres_error|ingres_errsqlstate|ingres_escape_string|ingres_execute|' + + 'ingres_fetch_array|ingres_fetch_assoc|ingres_fetch_object|ingres_fetch_proc_return|ingres_fetch_row|ingres_field_length|ingres_field_name|' + + 'ingres_field_nullable|ingres_field_precision|ingres_field_scale|ingres_field_type|ingres_free_result|ingres_next_error|ingres_num_fields|' + + 'ingres_num_rows|ingres_pconnect|ingres_prepare|ingres_query|ingres_result_seek|ingres_rollback|ingres_set_environment|' + + 'ingres_unbuffered_query|ini_alter|ini_get|ini_get_all|ini_restore|ini_set|innamespace|inotify_add_watch|inotify_init|inotify_queue_len|' + + 'inotify_read|inotify_rm_watch|interface_exists|intl_error_name|intl_get_error_code|intl_get_error_message|intl_is_failure|' + + 'intldateformatter|intval|invalidargumentexception|invoke|invokeargs|ip2long|iptcembed|iptcparse|is_a|is_array|is_bool|is_callable|is_dir|' + + 'is_double|is_executable|is_file|is_finite|is_float|is_infinite|is_int|is_integer|is_link|is_long|is_nan|is_null|is_numeric|is_object|' + + 'is_readable|is_real|is_resource|is_scalar|is_soap_fault|is_string|is_subclass_of|is_uploaded_file|is_writable|is_writeable|isabstract|' + + 'iscloneable|isdisabled|isfinal|isinstance|isinstantiable|isinterface|isinternal|isiterateable|isset|issubclassof|isuserdefined|iterator|' + + 'iterator_apply|iterator_count|iterator_to_array|iteratoraggregate|iteratoriterator|java_last_exception_clear|java_last_exception_get|' + + 'jddayofweek|jdmonthname|jdtofrench|jdtogregorian|jdtojewish|jdtojulian|jdtounix|jewishtojd|join|jpeg2wbmp|json_decode|json_encode|' + + 'json_last_error|jsonserializable|judy|judy_type|judy_version|juliantojd|kadm5_chpass_principal|kadm5_create_principal|' + + 'kadm5_delete_principal|kadm5_destroy|kadm5_flush|kadm5_get_policies|kadm5_get_principal|kadm5_get_principals|kadm5_init_with_password|' + + 'kadm5_modify_principal|key|krsort|ksort|lcfirst|lcg_value|lchgrp|lchown|ldap_8859_to_t61|ldap_add|ldap_bind|ldap_close|ldap_compare|' + + 'ldap_connect|ldap_count_entries|ldap_delete|ldap_dn2ufn|ldap_err2str|ldap_errno|ldap_error|ldap_explode_dn|ldap_first_attribute|' + + 'ldap_first_entry|ldap_first_reference|ldap_free_result|ldap_get_attributes|ldap_get_dn|ldap_get_entries|ldap_get_option|ldap_get_values|' + + 'ldap_get_values_len|ldap_list|ldap_mod_add|ldap_mod_del|ldap_mod_replace|ldap_modify|ldap_next_attribute|ldap_next_entry|' + + 'ldap_next_reference|ldap_parse_reference|ldap_parse_result|ldap_read|ldap_rename|ldap_sasl_bind|ldap_search|ldap_set_option|' + + 'ldap_set_rebind_proc|ldap_sort|ldap_start_tls|ldap_t61_to_8859|ldap_unbind|lengthexception|levenshtein|libxml_clear_errors|' + + 'libxml_disable_entity_loader|libxml_get_errors|libxml_get_last_error|libxml_set_streams_context|libxml_use_internal_errors|libxmlerror|' + + 'limititerator|link|linkinfo|list|locale|localeconv|localtime|log|log10|log1p|logicexception|long2ip|lstat|ltrim|lzf_compress|' + + 'lzf_decompress|lzf_optimized_for|m_checkstatus|m_completeauthorizations|m_connect|m_connectionerror|m_deletetrans|m_destroyconn|' + + 'm_destroyengine|m_getcell|m_getcellbynum|m_getcommadelimited|m_getheader|m_initconn|m_initengine|m_iscommadelimited|m_maxconntimeout|' + + 'm_monitor|m_numcolumns|m_numrows|m_parsecommadelimited|m_responsekeys|m_responseparam|m_returnstatus|m_setblocking|m_setdropfile|m_setip|' + + 'm_setssl|m_setssl_cafile|m_setssl_files|m_settimeout|m_sslcert_gen_hash|m_transactionssent|m_transinqueue|m_transkeyval|m_transnew|' + + 'm_transsend|m_uwait|m_validateidentifier|m_verifyconnection|m_verifysslcert|magic_quotes_runtime|mail|' + + 'mailparse_determine_best_xfer_encoding|mailparse_msg_create|mailparse_msg_extract_part|mailparse_msg_extract_part_file|' + + 'mailparse_msg_extract_whole_part_file|mailparse_msg_free|mailparse_msg_get_part|mailparse_msg_get_part_data|mailparse_msg_get_structure|' + + 'mailparse_msg_parse|mailparse_msg_parse_file|mailparse_rfc822_parse_addresses|mailparse_stream_encode|mailparse_uudecode_all|main|max|' + + 'maxdb_affected_rows|maxdb_autocommit|maxdb_bind_param|maxdb_bind_result|maxdb_change_user|maxdb_character_set_name|maxdb_client_encoding|' + + 'maxdb_close|maxdb_close_long_data|maxdb_commit|maxdb_connect|maxdb_connect_errno|maxdb_connect_error|maxdb_data_seek|maxdb_debug|' + + 'maxdb_disable_reads_from_master|maxdb_disable_rpl_parse|maxdb_dump_debug_info|maxdb_embedded_connect|maxdb_enable_reads_from_master|' + + 'maxdb_enable_rpl_parse|maxdb_errno|maxdb_error|maxdb_escape_string|maxdb_execute|maxdb_fetch|maxdb_fetch_array|maxdb_fetch_assoc|' + + 'maxdb_fetch_field|maxdb_fetch_field_direct|maxdb_fetch_fields|maxdb_fetch_lengths|maxdb_fetch_object|maxdb_fetch_row|maxdb_field_count|' + + 'maxdb_field_seek|maxdb_field_tell|maxdb_free_result|maxdb_get_client_info|maxdb_get_client_version|maxdb_get_host_info|maxdb_get_metadata|' + + 'maxdb_get_proto_info|maxdb_get_server_info|maxdb_get_server_version|maxdb_info|maxdb_init|maxdb_insert_id|maxdb_kill|maxdb_master_query|' + + 'maxdb_more_results|maxdb_multi_query|maxdb_next_result|maxdb_num_fields|maxdb_num_rows|maxdb_options|maxdb_param_count|maxdb_ping|' + + 'maxdb_prepare|maxdb_query|maxdb_real_connect|maxdb_real_escape_string|maxdb_real_query|maxdb_report|maxdb_rollback|' + + 'maxdb_rpl_parse_enabled|maxdb_rpl_probe|maxdb_rpl_query_type|maxdb_select_db|maxdb_send_long_data|maxdb_send_query|maxdb_server_end|' + + 'maxdb_server_init|maxdb_set_opt|maxdb_sqlstate|maxdb_ssl_set|maxdb_stat|maxdb_stmt_affected_rows|maxdb_stmt_bind_param|' + + 'maxdb_stmt_bind_result|maxdb_stmt_close|maxdb_stmt_close_long_data|maxdb_stmt_data_seek|maxdb_stmt_errno|maxdb_stmt_error|' + + 'maxdb_stmt_execute|maxdb_stmt_fetch|maxdb_stmt_free_result|maxdb_stmt_init|maxdb_stmt_num_rows|maxdb_stmt_param_count|maxdb_stmt_prepare|' + + 'maxdb_stmt_reset|maxdb_stmt_result_metadata|maxdb_stmt_send_long_data|maxdb_stmt_sqlstate|maxdb_stmt_store_result|maxdb_store_result|' + + 'maxdb_thread_id|maxdb_thread_safe|maxdb_use_result|maxdb_warning_count|mb_check_encoding|mb_convert_case|mb_convert_encoding|' + + 'mb_convert_kana|mb_convert_variables|mb_decode_mimeheader|mb_decode_numericentity|mb_detect_encoding|mb_detect_order|mb_encode_mimeheader|' + + 'mb_encode_numericentity|mb_encoding_aliases|mb_ereg|mb_ereg_match|mb_ereg_replace|mb_ereg_search|mb_ereg_search_getpos|' + + 'mb_ereg_search_getregs|mb_ereg_search_init|mb_ereg_search_pos|mb_ereg_search_regs|mb_ereg_search_setpos|mb_eregi|mb_eregi_replace|' + + 'mb_get_info|mb_http_input|mb_http_output|mb_internal_encoding|mb_language|mb_list_encodings|mb_output_handler|mb_parse_str|' + + 'mb_preferred_mime_name|mb_regex_encoding|mb_regex_set_options|mb_send_mail|mb_split|mb_strcut|mb_strimwidth|mb_stripos|mb_stristr|' + + 'mb_strlen|mb_strpos|mb_strrchr|mb_strrichr|mb_strripos|mb_strrpos|mb_strstr|mb_strtolower|mb_strtoupper|mb_strwidth|' + + 'mb_substitute_character|mb_substr|mb_substr_count|mcrypt_cbc|mcrypt_cfb|mcrypt_create_iv|mcrypt_decrypt|mcrypt_ecb|' + + 'mcrypt_enc_get_algorithms_name|mcrypt_enc_get_block_size|mcrypt_enc_get_iv_size|mcrypt_enc_get_key_size|mcrypt_enc_get_modes_name|' + + 'mcrypt_enc_get_supported_key_sizes|mcrypt_enc_is_block_algorithm|mcrypt_enc_is_block_algorithm_mode|mcrypt_enc_is_block_mode|' + + 'mcrypt_enc_self_test|mcrypt_encrypt|mcrypt_generic|mcrypt_generic_deinit|mcrypt_generic_end|mcrypt_generic_init|mcrypt_get_block_size|' + + 'mcrypt_get_cipher_name|mcrypt_get_iv_size|mcrypt_get_key_size|mcrypt_list_algorithms|mcrypt_list_modes|mcrypt_module_close|' + + 'mcrypt_module_get_algo_block_size|mcrypt_module_get_algo_key_size|mcrypt_module_get_supported_key_sizes|mcrypt_module_is_block_algorithm|' + + 'mcrypt_module_is_block_algorithm_mode|mcrypt_module_is_block_mode|mcrypt_module_open|mcrypt_module_self_test|mcrypt_ofb|md5|md5_file|' + + 'mdecrypt_generic|memcache|memcache_debug|memcached|memory_get_peak_usage|memory_get_usage|messageformatter|metaphone|method_exists|mhash|' + + 'mhash_count|mhash_get_block_size|mhash_get_hash_name|mhash_keygen_s2k|microtime|mime_content_type|min|ming_keypress|' + + 'ming_setcubicthreshold|ming_setscale|ming_setswfcompression|ming_useconstants|ming_useswfversion|mkdir|mktime|money_format|mongo|' + + 'mongobindata|mongocode|mongocollection|mongoconnectionexception|mongocursor|mongocursorexception|mongocursortimeoutexception|mongodate|' + + 'mongodb|mongodbref|mongoexception|mongogridfs|mongogridfscursor|mongogridfsexception|mongogridfsfile|mongoid|mongoint32|mongoint64|' + + 'mongomaxkey|mongominkey|mongoregex|mongotimestamp|move_uploaded_file|mpegfile|mqseries_back|mqseries_begin|mqseries_close|mqseries_cmit|' + + 'mqseries_conn|mqseries_connx|mqseries_disc|mqseries_get|mqseries_inq|mqseries_open|mqseries_put|mqseries_put1|mqseries_set|' + + 'mqseries_strerror|msession_connect|msession_count|msession_create|msession_destroy|msession_disconnect|msession_find|msession_get|' + + 'msession_get_array|msession_get_data|msession_inc|msession_list|msession_listvar|msession_lock|msession_plugin|msession_randstr|' + + 'msession_set|msession_set_array|msession_set_data|msession_timeout|msession_uniq|msession_unlock|msg_get_queue|msg_queue_exists|' + + 'msg_receive|msg_remove_queue|msg_send|msg_set_queue|msg_stat_queue|msql|msql_affected_rows|msql_close|msql_connect|msql_create_db|' + + 'msql_createdb|msql_data_seek|msql_db_query|msql_dbname|msql_drop_db|msql_error|msql_fetch_array|msql_fetch_field|msql_fetch_object|' + + 'msql_fetch_row|msql_field_flags|msql_field_len|msql_field_name|msql_field_seek|msql_field_table|msql_field_type|msql_fieldflags|' + + 'msql_fieldlen|msql_fieldname|msql_fieldtable|msql_fieldtype|msql_free_result|msql_list_dbs|msql_list_fields|msql_list_tables|' + + 'msql_num_fields|msql_num_rows|msql_numfields|msql_numrows|msql_pconnect|msql_query|msql_regcase|msql_result|msql_select_db|msql_tablename|' + + 'mssql_bind|mssql_close|mssql_connect|mssql_data_seek|mssql_execute|mssql_fetch_array|mssql_fetch_assoc|mssql_fetch_batch|' + + 'mssql_fetch_field|mssql_fetch_object|mssql_fetch_row|mssql_field_length|mssql_field_name|mssql_field_seek|mssql_field_type|' + + 'mssql_free_result|mssql_free_statement|mssql_get_last_message|mssql_guid_string|mssql_init|mssql_min_error_severity|' + + 'mssql_min_message_severity|mssql_next_result|mssql_num_fields|mssql_num_rows|mssql_pconnect|mssql_query|mssql_result|mssql_rows_affected|' + + 'mssql_select_db|mt_getrandmax|mt_rand|mt_srand|multipleiterator|mysql_affected_rows|mysql_client_encoding|mysql_close|mysql_connect|' + + 'mysql_create_db|mysql_data_seek|mysql_db_name|mysql_db_query|mysql_drop_db|mysql_errno|mysql_error|mysql_escape_string|mysql_fetch_array|' + + 'mysql_fetch_assoc|mysql_fetch_field|mysql_fetch_lengths|mysql_fetch_object|mysql_fetch_row|mysql_field_flags|mysql_field_len|' + + 'mysql_field_name|mysql_field_seek|mysql_field_table|mysql_field_type|mysql_free_result|mysql_get_client_info|mysql_get_host_info|' + + 'mysql_get_proto_info|mysql_get_server_info|mysql_info|mysql_insert_id|mysql_list_dbs|mysql_list_fields|mysql_list_processes|' + + 'mysql_list_tables|mysql_num_fields|mysql_num_rows|mysql_pconnect|mysql_ping|mysql_query|mysql_real_escape_string|mysql_result|' + + 'mysql_select_db|mysql_set_charset|mysql_stat|mysql_tablename|mysql_thread_id|mysql_unbuffered_query|mysqli|mysqli_bind_param|' + + 'mysqli_bind_result|mysqli_client_encoding|mysqli_connect|mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_driver|' + + 'mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_escape_string|mysqli_execute|mysqli_fetch|mysqli_get_metadata|' + + 'mysqli_master_query|mysqli_param_count|mysqli_report|mysqli_result|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|' + + 'mysqli_send_long_data|mysqli_send_query|mysqli_set_opt|mysqli_slave_query|mysqli_stmt|mysqli_warning|mysqlnd_ms_get_stats|' + + 'mysqlnd_ms_query_is_select|mysqlnd_ms_set_user_pick_server|mysqlnd_qc_change_handler|mysqlnd_qc_clear_cache|mysqlnd_qc_get_cache_info|' + + 'mysqlnd_qc_get_core_stats|mysqlnd_qc_get_handler|mysqlnd_qc_get_query_trace_log|mysqlnd_qc_set_user_handlers|natcasesort|natsort|' + + 'ncurses_addch|ncurses_addchnstr|ncurses_addchstr|ncurses_addnstr|ncurses_addstr|ncurses_assume_default_colors|ncurses_attroff|' + + 'ncurses_attron|ncurses_attrset|ncurses_baudrate|ncurses_beep|ncurses_bkgd|ncurses_bkgdset|ncurses_border|ncurses_bottom_panel|' + + 'ncurses_can_change_color|ncurses_cbreak|ncurses_clear|ncurses_clrtobot|ncurses_clrtoeol|ncurses_color_content|ncurses_color_set|' + + 'ncurses_curs_set|ncurses_def_prog_mode|ncurses_def_shell_mode|ncurses_define_key|ncurses_del_panel|ncurses_delay_output|ncurses_delch|' + + 'ncurses_deleteln|ncurses_delwin|ncurses_doupdate|ncurses_echo|ncurses_echochar|ncurses_end|ncurses_erase|ncurses_erasechar|ncurses_filter|' + + 'ncurses_flash|ncurses_flushinp|ncurses_getch|ncurses_getmaxyx|ncurses_getmouse|ncurses_getyx|ncurses_halfdelay|ncurses_has_colors|' + + 'ncurses_has_ic|ncurses_has_il|ncurses_has_key|ncurses_hide_panel|ncurses_hline|ncurses_inch|ncurses_init|ncurses_init_color|' + + 'ncurses_init_pair|ncurses_insch|ncurses_insdelln|ncurses_insertln|ncurses_insstr|ncurses_instr|ncurses_isendwin|ncurses_keyok|' + + 'ncurses_keypad|ncurses_killchar|ncurses_longname|ncurses_meta|ncurses_mouse_trafo|ncurses_mouseinterval|ncurses_mousemask|ncurses_move|' + + 'ncurses_move_panel|ncurses_mvaddch|ncurses_mvaddchnstr|ncurses_mvaddchstr|ncurses_mvaddnstr|ncurses_mvaddstr|ncurses_mvcur|' + + 'ncurses_mvdelch|ncurses_mvgetch|ncurses_mvhline|ncurses_mvinch|ncurses_mvvline|ncurses_mvwaddstr|ncurses_napms|ncurses_new_panel|' + + 'ncurses_newpad|ncurses_newwin|ncurses_nl|ncurses_nocbreak|ncurses_noecho|ncurses_nonl|ncurses_noqiflush|ncurses_noraw|' + + 'ncurses_pair_content|ncurses_panel_above|ncurses_panel_below|ncurses_panel_window|ncurses_pnoutrefresh|ncurses_prefresh|ncurses_putp|' + + 'ncurses_qiflush|ncurses_raw|ncurses_refresh|ncurses_replace_panel|ncurses_reset_prog_mode|ncurses_reset_shell_mode|ncurses_resetty|' + + 'ncurses_savetty|ncurses_scr_dump|ncurses_scr_init|ncurses_scr_restore|ncurses_scr_set|ncurses_scrl|ncurses_show_panel|ncurses_slk_attr|' + + 'ncurses_slk_attroff|ncurses_slk_attron|ncurses_slk_attrset|ncurses_slk_clear|ncurses_slk_color|ncurses_slk_init|ncurses_slk_noutrefresh|' + + 'ncurses_slk_refresh|ncurses_slk_restore|ncurses_slk_set|ncurses_slk_touch|ncurses_standend|ncurses_standout|ncurses_start_color|' + + 'ncurses_termattrs|ncurses_termname|ncurses_timeout|ncurses_top_panel|ncurses_typeahead|ncurses_ungetch|ncurses_ungetmouse|' + + 'ncurses_update_panels|ncurses_use_default_colors|ncurses_use_env|ncurses_use_extended_names|ncurses_vidattr|ncurses_vline|ncurses_waddch|' + + 'ncurses_waddstr|ncurses_wattroff|ncurses_wattron|ncurses_wattrset|ncurses_wborder|ncurses_wclear|ncurses_wcolor_set|ncurses_werase|' + + 'ncurses_wgetch|ncurses_whline|ncurses_wmouse_trafo|ncurses_wmove|ncurses_wnoutrefresh|ncurses_wrefresh|ncurses_wstandend|' + + 'ncurses_wstandout|ncurses_wvline|newinstance|newinstanceargs|newt_bell|newt_button|newt_button_bar|newt_centered_window|newt_checkbox|' + + 'newt_checkbox_get_value|newt_checkbox_set_flags|newt_checkbox_set_value|newt_checkbox_tree|newt_checkbox_tree_add_item|' + + 'newt_checkbox_tree_find_item|newt_checkbox_tree_get_current|newt_checkbox_tree_get_entry_value|newt_checkbox_tree_get_multi_selection|' + + 'newt_checkbox_tree_get_selection|newt_checkbox_tree_multi|newt_checkbox_tree_set_current|newt_checkbox_tree_set_entry|' + + 'newt_checkbox_tree_set_entry_value|newt_checkbox_tree_set_width|newt_clear_key_buffer|newt_cls|newt_compact_button|' + + 'newt_component_add_callback|newt_component_takes_focus|newt_create_grid|newt_cursor_off|newt_cursor_on|newt_delay|newt_draw_form|' + + 'newt_draw_root_text|newt_entry|newt_entry_get_value|newt_entry_set|newt_entry_set_filter|newt_entry_set_flags|newt_finished|newt_form|' + + 'newt_form_add_component|newt_form_add_components|newt_form_add_hot_key|newt_form_destroy|newt_form_get_current|newt_form_run|' + + 'newt_form_set_background|newt_form_set_height|newt_form_set_size|newt_form_set_timer|newt_form_set_width|newt_form_watch_fd|' + + 'newt_get_screen_size|newt_grid_add_components_to_form|newt_grid_basic_window|newt_grid_free|newt_grid_get_size|newt_grid_h_close_stacked|' + + 'newt_grid_h_stacked|newt_grid_place|newt_grid_set_field|newt_grid_simple_window|newt_grid_v_close_stacked|newt_grid_v_stacked|' + + 'newt_grid_wrapped_window|newt_grid_wrapped_window_at|newt_init|newt_label|newt_label_set_text|newt_listbox|newt_listbox_append_entry|' + + 'newt_listbox_clear|newt_listbox_clear_selection|newt_listbox_delete_entry|newt_listbox_get_current|newt_listbox_get_selection|' + + 'newt_listbox_insert_entry|newt_listbox_item_count|newt_listbox_select_item|newt_listbox_set_current|newt_listbox_set_current_by_key|' + + 'newt_listbox_set_data|newt_listbox_set_entry|newt_listbox_set_width|newt_listitem|newt_listitem_get_data|newt_listitem_set|' + + 'newt_open_window|newt_pop_help_line|newt_pop_window|newt_push_help_line|newt_radio_get_current|newt_radiobutton|newt_redraw_help_line|' + + 'newt_reflow_text|newt_refresh|newt_resize_screen|newt_resume|newt_run_form|newt_scale|newt_scale_set|newt_scrollbar_set|' + + 'newt_set_help_callback|newt_set_suspend_callback|newt_suspend|newt_textbox|newt_textbox_get_num_lines|newt_textbox_reflowed|' + + 'newt_textbox_set_height|newt_textbox_set_text|newt_vertical_scrollbar|newt_wait_for_key|newt_win_choice|newt_win_entries|newt_win_menu|' + + 'newt_win_message|newt_win_messagev|newt_win_ternary|next|ngettext|nl2br|nl_langinfo|norewinditerator|normalizer|notes_body|notes_copy_db|' + + 'notes_create_db|notes_create_note|notes_drop_db|notes_find_note|notes_header_info|notes_list_msgs|notes_mark_read|notes_mark_unread|' + + 'notes_nav_create|notes_search|notes_unread|notes_version|nsapi_request_headers|nsapi_response_headers|nsapi_virtual|nthmac|number_format|' + + 'numberformatter|oauth|oauth_get_sbs|oauth_urlencode|oauthexception|oauthprovider|ob_clean|ob_deflatehandler|ob_end_clean|ob_end_flush|' + + 'ob_etaghandler|ob_flush|ob_get_clean|ob_get_contents|ob_get_flush|ob_get_length|ob_get_level|ob_get_status|ob_gzhandler|ob_iconv_handler|' + + 'ob_implicit_flush|ob_inflatehandler|ob_list_handlers|ob_start|ob_tidyhandler|oci_bind_array_by_name|oci_bind_by_name|oci_cancel|' + + 'oci_client_version|oci_close|oci_collection_append|oci_collection_assign|oci_collection_element_assign|oci_collection_element_get|' + + 'oci_collection_free|oci_collection_max|oci_collection_size|oci_collection_trim|oci_commit|oci_connect|oci_define_by_name|oci_error|' + + 'oci_execute|oci_fetch|oci_fetch_all|oci_fetch_array|oci_fetch_assoc|oci_fetch_object|oci_fetch_row|oci_field_is_null|oci_field_name|' + + 'oci_field_precision|oci_field_scale|oci_field_size|oci_field_type|oci_field_type_raw|oci_free_statement|oci_internal_debug|oci_lob_append|' + + 'oci_lob_close|oci_lob_copy|oci_lob_eof|oci_lob_erase|oci_lob_export|oci_lob_flush|oci_lob_free|oci_lob_getbuffering|oci_lob_import|' + + 'oci_lob_is_equal|oci_lob_load|oci_lob_read|oci_lob_rewind|oci_lob_save|oci_lob_savefile|oci_lob_seek|oci_lob_setbuffering|oci_lob_size|' + + 'oci_lob_tell|oci_lob_truncate|oci_lob_write|oci_lob_writetemporary|oci_lob_writetofile|oci_new_collection|oci_new_connect|oci_new_cursor|' + + 'oci_new_descriptor|oci_num_fields|oci_num_rows|oci_parse|oci_password_change|oci_pconnect|oci_result|oci_rollback|oci_server_version|' + + 'oci_set_action|oci_set_client_identifier|oci_set_client_info|oci_set_edition|oci_set_module_name|oci_set_prefetch|oci_statement_type|' + + 'ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|' + + 'ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|' + + 'ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|' + + 'ociloadlob|ocilogoff|ocilogon|ocinewcollection|ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|' + + 'ocirollback|ocirowcount|ocisavelob|ocisavelobfile|ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|' + + 'octdec|odbc_autocommit|odbc_binmode|odbc_close|odbc_close_all|odbc_columnprivileges|odbc_columns|odbc_commit|odbc_connect|odbc_cursor|' + + 'odbc_data_source|odbc_do|odbc_error|odbc_errormsg|odbc_exec|odbc_execute|odbc_fetch_array|odbc_fetch_into|odbc_fetch_object|' + + 'odbc_fetch_row|odbc_field_len|odbc_field_name|odbc_field_num|odbc_field_precision|odbc_field_scale|odbc_field_type|odbc_foreignkeys|' + + 'odbc_free_result|odbc_gettypeinfo|odbc_longreadlen|odbc_next_result|odbc_num_fields|odbc_num_rows|odbc_pconnect|odbc_prepare|' + + 'odbc_primarykeys|odbc_procedurecolumns|odbc_procedures|odbc_result|odbc_result_all|odbc_rollback|odbc_setoption|odbc_specialcolumns|' + + 'odbc_statistics|odbc_tableprivileges|odbc_tables|openal_buffer_create|openal_buffer_data|openal_buffer_destroy|openal_buffer_get|' + + 'openal_buffer_loadwav|openal_context_create|openal_context_current|openal_context_destroy|openal_context_process|openal_context_suspend|' + + 'openal_device_close|openal_device_open|openal_listener_get|openal_listener_set|openal_source_create|openal_source_destroy|' + + 'openal_source_get|openal_source_pause|openal_source_play|openal_source_rewind|openal_source_set|openal_source_stop|openal_stream|opendir|' + + 'openlog|openssl_cipher_iv_length|openssl_csr_export|openssl_csr_export_to_file|openssl_csr_get_public_key|openssl_csr_get_subject|' + + 'openssl_csr_new|openssl_csr_sign|openssl_decrypt|openssl_dh_compute_key|openssl_digest|openssl_encrypt|openssl_error_string|' + + 'openssl_free_key|openssl_get_cipher_methods|openssl_get_md_methods|openssl_get_privatekey|openssl_get_publickey|openssl_open|' + + 'openssl_pkcs12_export|openssl_pkcs12_export_to_file|openssl_pkcs12_read|openssl_pkcs7_decrypt|openssl_pkcs7_encrypt|openssl_pkcs7_sign|' + + 'openssl_pkcs7_verify|openssl_pkey_export|openssl_pkey_export_to_file|openssl_pkey_free|openssl_pkey_get_details|openssl_pkey_get_private|' + + 'openssl_pkey_get_public|openssl_pkey_new|openssl_private_decrypt|openssl_private_encrypt|openssl_public_decrypt|openssl_public_encrypt|' + + 'openssl_random_pseudo_bytes|openssl_seal|openssl_sign|openssl_verify|openssl_x509_check_private_key|openssl_x509_checkpurpose|' + + 'openssl_x509_export|openssl_x509_export_to_file|openssl_x509_free|openssl_x509_parse|openssl_x509_read|ord|outeriterator|' + + 'outofboundsexception|outofrangeexception|output_add_rewrite_var|output_reset_rewrite_vars|overflowexception|overload|override_function|' + + 'ovrimos_close|ovrimos_commit|ovrimos_connect|ovrimos_cursor|ovrimos_exec|ovrimos_execute|ovrimos_fetch_into|ovrimos_fetch_row|' + + 'ovrimos_field_len|ovrimos_field_name|ovrimos_field_num|ovrimos_field_type|ovrimos_free_result|ovrimos_longreadlen|ovrimos_num_fields|' + + 'ovrimos_num_rows|ovrimos_prepare|ovrimos_result|ovrimos_result_all|ovrimos_rollback|pack|parentiterator|parse_ini_file|parse_ini_string|' + + 'parse_str|parse_url|parsekit_compile_file|parsekit_compile_string|parsekit_func_arginfo|passthru|pathinfo|pclose|pcntl_alarm|pcntl_exec|' + + 'pcntl_fork|pcntl_getpriority|pcntl_setpriority|pcntl_signal|pcntl_signal_dispatch|pcntl_sigprocmask|pcntl_sigtimedwait|pcntl_sigwaitinfo|' + + 'pcntl_wait|pcntl_waitpid|pcntl_wexitstatus|pcntl_wifexited|pcntl_wifsignaled|pcntl_wifstopped|pcntl_wstopsig|pcntl_wtermsig|' + + 'pdf_activate_item|pdf_add_annotation|pdf_add_bookmark|pdf_add_launchlink|pdf_add_locallink|pdf_add_nameddest|pdf_add_note|pdf_add_outline|' + + 'pdf_add_pdflink|pdf_add_table_cell|pdf_add_textflow|pdf_add_thumbnail|pdf_add_weblink|pdf_arc|pdf_arcn|pdf_attach_file|pdf_begin_document|' + + 'pdf_begin_font|pdf_begin_glyph|pdf_begin_item|pdf_begin_layer|pdf_begin_page|pdf_begin_page_ext|pdf_begin_pattern|pdf_begin_template|' + + 'pdf_begin_template_ext|pdf_circle|pdf_clip|pdf_close|pdf_close_image|pdf_close_pdi|pdf_close_pdi_page|pdf_closepath|' + + 'pdf_closepath_fill_stroke|pdf_closepath_stroke|pdf_concat|pdf_continue_text|pdf_create_3dview|pdf_create_action|pdf_create_annotation|' + + 'pdf_create_bookmark|pdf_create_field|pdf_create_fieldgroup|pdf_create_gstate|pdf_create_pvf|pdf_create_textflow|pdf_curveto|' + + 'pdf_define_layer|pdf_delete|pdf_delete_pvf|pdf_delete_table|pdf_delete_textflow|pdf_encoding_set_char|pdf_end_document|pdf_end_font|' + + 'pdf_end_glyph|pdf_end_item|pdf_end_layer|pdf_end_page|pdf_end_page_ext|pdf_end_pattern|pdf_end_template|pdf_endpath|pdf_fill|' + + 'pdf_fill_imageblock|pdf_fill_pdfblock|pdf_fill_stroke|pdf_fill_textblock|pdf_findfont|pdf_fit_image|pdf_fit_pdi_page|pdf_fit_table|' + + 'pdf_fit_textflow|pdf_fit_textline|pdf_get_apiname|pdf_get_buffer|pdf_get_errmsg|pdf_get_errnum|pdf_get_font|pdf_get_fontname|' + + 'pdf_get_fontsize|pdf_get_image_height|pdf_get_image_width|pdf_get_majorversion|pdf_get_minorversion|pdf_get_parameter|' + + 'pdf_get_pdi_parameter|pdf_get_pdi_value|pdf_get_value|pdf_info_font|pdf_info_matchbox|pdf_info_table|pdf_info_textflow|pdf_info_textline|' + + 'pdf_initgraphics|pdf_lineto|pdf_load_3ddata|pdf_load_font|pdf_load_iccprofile|pdf_load_image|pdf_makespotcolor|pdf_moveto|pdf_new|' + + 'pdf_open_ccitt|pdf_open_file|pdf_open_gif|pdf_open_image|pdf_open_image_file|pdf_open_jpeg|pdf_open_memory_image|pdf_open_pdi|' + + 'pdf_open_pdi_document|pdf_open_pdi_page|pdf_open_tiff|pdf_pcos_get_number|pdf_pcos_get_stream|pdf_pcos_get_string|pdf_place_image|' + + 'pdf_place_pdi_page|pdf_process_pdi|pdf_rect|pdf_restore|pdf_resume_page|pdf_rotate|pdf_save|pdf_scale|pdf_set_border_color|' + + 'pdf_set_border_dash|pdf_set_border_style|pdf_set_char_spacing|pdf_set_duration|pdf_set_gstate|pdf_set_horiz_scaling|pdf_set_info|' + + 'pdf_set_info_author|pdf_set_info_creator|pdf_set_info_keywords|pdf_set_info_subject|pdf_set_info_title|pdf_set_layer_dependency|' + + 'pdf_set_leading|pdf_set_parameter|pdf_set_text_matrix|pdf_set_text_pos|pdf_set_text_rendering|pdf_set_text_rise|pdf_set_value|' + + 'pdf_set_word_spacing|pdf_setcolor|pdf_setdash|pdf_setdashpattern|pdf_setflat|pdf_setfont|pdf_setgray|pdf_setgray_fill|pdf_setgray_stroke|' + + 'pdf_setlinecap|pdf_setlinejoin|pdf_setlinewidth|pdf_setmatrix|pdf_setmiterlimit|pdf_setpolydash|pdf_setrgbcolor|pdf_setrgbcolor_fill|' + + 'pdf_setrgbcolor_stroke|pdf_shading|pdf_shading_pattern|pdf_shfill|pdf_show|pdf_show_boxed|pdf_show_xy|pdf_skew|pdf_stringwidth|pdf_stroke|' + + 'pdf_suspend_page|pdf_translate|pdf_utf16_to_utf8|pdf_utf32_to_utf16|pdf_utf8_to_utf16|pdo|pdo_cubrid_schema|pdo_pgsqllobcreate|' + + 'pdo_pgsqllobopen|pdo_pgsqllobunlink|pdo_sqlitecreateaggregate|pdo_sqlitecreatefunction|pdoexception|pdostatement|pfsockopen|' + + 'pg_affected_rows|pg_cancel_query|pg_client_encoding|pg_close|pg_connect|pg_connection_busy|pg_connection_reset|pg_connection_status|' + + 'pg_convert|pg_copy_from|pg_copy_to|pg_dbname|pg_delete|pg_end_copy|pg_escape_bytea|pg_escape_string|pg_execute|pg_fetch_all|' + + 'pg_fetch_all_columns|pg_fetch_array|pg_fetch_assoc|pg_fetch_object|pg_fetch_result|pg_fetch_row|pg_field_is_null|pg_field_name|' + + 'pg_field_num|pg_field_prtlen|pg_field_size|pg_field_table|pg_field_type|pg_field_type_oid|pg_free_result|pg_get_notify|pg_get_pid|' + + 'pg_get_result|pg_host|pg_insert|pg_last_error|pg_last_notice|pg_last_oid|pg_lo_close|pg_lo_create|pg_lo_export|pg_lo_import|pg_lo_open|' + + 'pg_lo_read|pg_lo_read_all|pg_lo_seek|pg_lo_tell|pg_lo_unlink|pg_lo_write|pg_meta_data|pg_num_fields|pg_num_rows|pg_options|' + + 'pg_parameter_status|pg_pconnect|pg_ping|pg_port|pg_prepare|pg_put_line|pg_query|pg_query_params|pg_result_error|pg_result_error_field|' + + 'pg_result_seek|pg_result_status|pg_select|pg_send_execute|pg_send_prepare|pg_send_query|pg_send_query_params|pg_set_client_encoding|' + + 'pg_set_error_verbosity|pg_trace|pg_transaction_status|pg_tty|pg_unescape_bytea|pg_untrace|pg_update|pg_version|php_check_syntax|' + + 'php_ini_loaded_file|php_ini_scanned_files|php_logo_guid|php_sapi_name|php_strip_whitespace|php_uname|phpcredits|phpinfo|phpversion|pi|' + + 'png2wbmp|popen|pos|posix_access|posix_ctermid|posix_errno|posix_get_last_error|posix_getcwd|posix_getegid|posix_geteuid|posix_getgid|' + + 'posix_getgrgid|posix_getgrnam|posix_getgroups|posix_getlogin|posix_getpgid|posix_getpgrp|posix_getpid|posix_getppid|posix_getpwnam|' + + 'posix_getpwuid|posix_getrlimit|posix_getsid|posix_getuid|posix_initgroups|posix_isatty|posix_kill|posix_mkfifo|posix_mknod|posix_setegid|' + + 'posix_seteuid|posix_setgid|posix_setpgid|posix_setsid|posix_setuid|posix_strerror|posix_times|posix_ttyname|posix_uname|pow|preg_filter|' + + 'preg_grep|preg_last_error|preg_match|preg_match_all|preg_quote|preg_replace|preg_replace_callback|preg_split|prev|print|print_r|' + + 'printer_abort|printer_close|printer_create_brush|printer_create_dc|printer_create_font|printer_create_pen|printer_delete_brush|' + + 'printer_delete_dc|printer_delete_font|printer_delete_pen|printer_draw_bmp|printer_draw_chord|printer_draw_elipse|printer_draw_line|' + + 'printer_draw_pie|printer_draw_rectangle|printer_draw_roundrect|printer_draw_text|printer_end_doc|printer_end_page|printer_get_option|' + + 'printer_list|printer_logical_fontheight|printer_open|printer_select_brush|printer_select_font|printer_select_pen|printer_set_option|' + + 'printer_start_doc|printer_start_page|printer_write|printf|proc_close|proc_get_status|proc_nice|proc_open|proc_terminate|property_exists|' + + 'ps_add_bookmark|ps_add_launchlink|ps_add_locallink|ps_add_note|ps_add_pdflink|ps_add_weblink|ps_arc|ps_arcn|ps_begin_page|' + + 'ps_begin_pattern|ps_begin_template|ps_circle|ps_clip|ps_close|ps_close_image|ps_closepath|ps_closepath_stroke|ps_continue_text|ps_curveto|' + + 'ps_delete|ps_end_page|ps_end_pattern|ps_end_template|ps_fill|ps_fill_stroke|ps_findfont|ps_get_buffer|ps_get_parameter|ps_get_value|' + + 'ps_hyphenate|ps_include_file|ps_lineto|ps_makespotcolor|ps_moveto|ps_new|ps_open_file|ps_open_image|ps_open_image_file|' + + 'ps_open_memory_image|ps_place_image|ps_rect|ps_restore|ps_rotate|ps_save|ps_scale|ps_set_border_color|ps_set_border_dash|' + + 'ps_set_border_style|ps_set_info|ps_set_parameter|ps_set_text_pos|ps_set_value|ps_setcolor|ps_setdash|ps_setflat|ps_setfont|ps_setgray|' + + 'ps_setlinecap|ps_setlinejoin|ps_setlinewidth|ps_setmiterlimit|ps_setoverprintmode|ps_setpolydash|ps_shading|ps_shading_pattern|ps_shfill|' + + 'ps_show|ps_show2|ps_show_boxed|ps_show_xy|ps_show_xy2|ps_string_geometry|ps_stringwidth|ps_stroke|ps_symbol|ps_symbol_name|' + + 'ps_symbol_width|ps_translate|pspell_add_to_personal|pspell_add_to_session|pspell_check|pspell_clear_session|pspell_config_create|' + + 'pspell_config_data_dir|pspell_config_dict_dir|pspell_config_ignore|pspell_config_mode|pspell_config_personal|pspell_config_repl|' + + 'pspell_config_runtogether|pspell_config_save_repl|pspell_new|pspell_new_config|pspell_new_personal|pspell_save_wordlist|' + + 'pspell_store_replacement|pspell_suggest|putenv|px_close|px_create_fp|px_date2string|px_delete|px_delete_record|px_get_field|px_get_info|' + + 'px_get_parameter|px_get_record|px_get_schema|px_get_value|px_insert_record|px_new|px_numfields|px_numrecords|px_open_fp|px_put_record|' + + 'px_retrieve_record|px_set_blob_file|px_set_parameter|px_set_tablename|px_set_targetencoding|px_set_value|px_timestamp2string|' + + 'px_update_record|qdom_error|qdom_tree|quoted_printable_decode|quoted_printable_encode|quotemeta|rad2deg|radius_acct_open|' + + 'radius_add_server|radius_auth_open|radius_close|radius_config|radius_create_request|radius_cvt_addr|radius_cvt_int|radius_cvt_string|' + + 'radius_demangle|radius_demangle_mppe_key|radius_get_attr|radius_get_vendor_attr|radius_put_addr|radius_put_attr|radius_put_int|' + + 'radius_put_string|radius_put_vendor_addr|radius_put_vendor_attr|radius_put_vendor_int|radius_put_vendor_string|' + + 'radius_request_authenticator|radius_send_request|radius_server_secret|radius_strerror|rand|range|rangeexception|rar_wrapper_cache_stats|' + + 'rararchive|rarentry|rarexception|rawurldecode|rawurlencode|read_exif_data|readdir|readfile|readgzfile|readline|readline_add_history|' + + 'readline_callback_handler_install|readline_callback_handler_remove|readline_callback_read_char|readline_clear_history|' + + 'readline_completion_function|readline_info|readline_list_history|readline_on_new_line|readline_read_history|readline_redisplay|' + + 'readline_write_history|readlink|realpath|realpath_cache_get|realpath_cache_size|recode|recode_file|recode_string|recursivearrayiterator|' + + 'recursivecachingiterator|recursivecallbackfilteriterator|recursivedirectoryiterator|recursivefilteriterator|recursiveiterator|' + + 'recursiveiteratoriterator|recursiveregexiterator|recursivetreeiterator|reflection|reflectionclass|reflectionexception|reflectionextension|' + + 'reflectionfunction|reflectionfunctionabstract|reflectionmethod|reflectionobject|reflectionparameter|reflectionproperty|reflector|' + + 'regexiterator|register_shutdown_function|register_tick_function|rename|rename_function|acequire|acequire_once|reset|resetValue|' + + 'resourcebundle|restore_error_handler|restore_exception_handler|restore_include_path|return|rewind|rewinddir|rmdir|round|rpm_close|' + + 'rpm_get_tag|rpm_is_valid|rpm_open|rpm_version|rrd_create|rrd_error|rrd_fetch|rrd_first|rrd_graph|rrd_info|rrd_last|rrd_lastupdate|' + + 'rrd_restore|rrd_tune|rrd_update|rrd_xport|rrdcreator|rrdgraph|rrdupdater|rsort|rtrim|runkit_class_adopt|runkit_class_emancipate|' + + 'runkit_constant_add|runkit_constant_redefine|runkit_constant_remove|runkit_function_add|runkit_function_copy|runkit_function_redefine|' + + 'runkit_function_remove|runkit_function_rename|runkit_import|runkit_lint|runkit_lint_file|runkit_method_add|runkit_method_copy|' + + 'runkit_method_redefine|runkit_method_remove|runkit_method_rename|runkit_return_value_used|runkit_sandbox_output_handler|' + + 'runkit_superglobals|runtimeexception|samconnection_commit|samconnection_connect|samconnection_constructor|samconnection_disconnect|' + + 'samconnection_errno|samconnection_error|samconnection_isconnected|samconnection_peek|samconnection_peekall|samconnection_receive|' + + 'samconnection_remove|samconnection_rollback|samconnection_send|samconnection_setDebug|samconnection_subscribe|samconnection_unsubscribe|' + + 'sammessage_body|sammessage_constructor|sammessage_header|sca_createdataobject|sca_getservice|sca_localproxy_createdataobject|' + + 'sca_soapproxy_createdataobject|scandir|sdo_das_changesummary_beginlogging|sdo_das_changesummary_endlogging|' + + 'sdo_das_changesummary_getchangeddataobjects|sdo_das_changesummary_getchangetype|sdo_das_changesummary_getoldcontainer|' + + 'sdo_das_changesummary_getoldvalues|sdo_das_changesummary_islogging|sdo_das_datafactory_addpropertytotype|sdo_das_datafactory_addtype|' + + 'sdo_das_datafactory_getdatafactory|sdo_das_dataobject_getchangesummary|sdo_das_relational_applychanges|sdo_das_relational_construct|' + + 'sdo_das_relational_createrootdataobject|sdo_das_relational_executepreparedquery|sdo_das_relational_executequery|' + + 'sdo_das_setting_getlistindex|sdo_das_setting_getpropertyindex|sdo_das_setting_getpropertyname|sdo_das_setting_getvalue|' + + 'sdo_das_setting_isset|sdo_das_xml_addtypes|sdo_das_xml_create|sdo_das_xml_createdataobject|sdo_das_xml_createdocument|' + + 'sdo_das_xml_document_getrootdataobject|sdo_das_xml_document_getrootelementname|sdo_das_xml_document_getrootelementuri|' + + 'sdo_das_xml_document_setencoding|sdo_das_xml_document_setxmldeclaration|sdo_das_xml_document_setxmlversion|sdo_das_xml_loadfile|' + + 'sdo_das_xml_loadstring|sdo_das_xml_savefile|sdo_das_xml_savestring|sdo_datafactory_create|sdo_dataobject_clear|' + + 'sdo_dataobject_createdataobject|sdo_dataobject_getcontainer|sdo_dataobject_getsequence|sdo_dataobject_gettypename|' + + 'sdo_dataobject_gettypenamespaceuri|sdo_exception_getcause|sdo_list_insert|sdo_model_property_getcontainingtype|' + + 'sdo_model_property_getdefault|sdo_model_property_getname|sdo_model_property_gettype|sdo_model_property_iscontainment|' + + 'sdo_model_property_ismany|sdo_model_reflectiondataobject_construct|sdo_model_reflectiondataobject_export|' + + 'sdo_model_reflectiondataobject_getcontainmentproperty|sdo_model_reflectiondataobject_getinstanceproperties|' + + 'sdo_model_reflectiondataobject_gettype|sdo_model_type_getbasetype|sdo_model_type_getname|sdo_model_type_getnamespaceuri|' + + 'sdo_model_type_getproperties|sdo_model_type_getproperty|sdo_model_type_isabstracttype|sdo_model_type_isdatatype|sdo_model_type_isinstance|' + + 'sdo_model_type_isopentype|sdo_model_type_issequencedtype|sdo_sequence_getproperty|sdo_sequence_insert|sdo_sequence_move|seekableiterator|' + + 'sem_acquire|sem_get|sem_release|sem_remove|serializable|serialize|session_cache_expire|session_cache_limiter|session_commit|' + + 'session_decode|session_destroy|session_encode|session_get_cookie_params|session_id|session_is_registered|session_module_name|session_name|' + + 'session_pgsql_add_error|session_pgsql_get_error|session_pgsql_get_field|session_pgsql_reset|session_pgsql_set_field|session_pgsql_status|' + + 'session_regenerate_id|session_register|session_save_path|session_set_cookie_params|session_set_save_handler|session_start|' + + 'session_unregister|session_unset|session_write_close|setCounterClass|set_error_handler|set_exception_handler|set_file_buffer|' + + 'set_include_path|set_magic_quotes_runtime|set_socket_blocking|set_time_limit|setcookie|setlocale|setproctitle|setrawcookie|' + + 'setstaticpropertyvalue|setthreadtitle|settype|sha1|sha1_file|shell_exec|shm_attach|shm_detach|shm_get_var|shm_has_var|shm_put_var|' + + 'shm_remove|shm_remove_var|shmop_close|shmop_delete|shmop_open|shmop_read|shmop_size|shmop_write|show_source|shuffle|signeurlpaiement|' + + 'similar_text|simplexml_import_dom|simplexml_load_file|simplexml_load_string|simplexmlelement|simplexmliterator|sin|sinh|sizeof|sleep|snmp|' + + 'snmp2_get|snmp2_getnext|snmp2_real_walk|snmp2_set|snmp2_walk|snmp3_get|snmp3_getnext|snmp3_real_walk|snmp3_set|snmp3_walk|' + + 'snmp_get_quick_print|snmp_get_valueretrieval|snmp_read_mib|snmp_set_enum_print|snmp_set_oid_numeric_print|snmp_set_oid_output_format|' + + 'snmp_set_quick_print|snmp_set_valueretrieval|snmpget|snmpgetnext|snmprealwalk|snmpset|snmpwalk|snmpwalkoid|soapclient|soapfault|' + + 'soapheader|soapparam|soapserver|soapvar|socket_accept|socket_bind|socket_clear_error|socket_close|socket_connect|socket_create|' + + 'socket_create_listen|socket_create_pair|socket_get_option|socket_get_status|socket_getpeername|socket_getsockname|socket_last_error|' + + 'socket_listen|socket_read|socket_recv|socket_recvfrom|socket_select|socket_send|socket_sendto|socket_set_block|socket_set_blocking|' + + 'socket_set_nonblock|socket_set_option|socket_set_timeout|socket_shutdown|socket_strerror|socket_write|solr_get_version|solrclient|' + + 'solrclientexception|solrdocument|solrdocumentfield|solrexception|solrgenericresponse|solrillegalargumentexception|' + + 'solrillegaloperationexception|solrinputdocument|solrmodifiableparams|solrobject|solrparams|solrpingresponse|solrquery|solrqueryresponse|' + + 'solrresponse|solrupdateresponse|solrutils|sort|soundex|sphinxclient|spl_autoload|spl_autoload_call|spl_autoload_extensions|' + + 'spl_autoload_functions|spl_autoload_register|spl_autoload_unregister|spl_classes|spl_object_hash|splbool|spldoublylinkedlist|splenum|' + + 'splfileinfo|splfileobject|splfixedarray|splfloat|splheap|splint|split|spliti|splmaxheap|splminheap|splobjectstorage|splobserver|' + + 'splpriorityqueue|splqueue|splstack|splstring|splsubject|spltempfileobject|spoofchecker|sprintf|sql_regcase|sqlite3|sqlite3result|' + + 'sqlite3stmt|sqlite_array_query|sqlite_busy_timeout|sqlite_changes|sqlite_close|sqlite_column|sqlite_create_aggregate|' + + 'sqlite_create_function|sqlite_current|sqlite_error_string|sqlite_escape_string|sqlite_exec|sqlite_factory|sqlite_fetch_all|' + + 'sqlite_fetch_array|sqlite_fetch_column_types|sqlite_fetch_object|sqlite_fetch_single|sqlite_fetch_string|sqlite_field_name|' + + 'sqlite_has_more|sqlite_has_prev|sqlite_key|sqlite_last_error|sqlite_last_insert_rowid|sqlite_libencoding|sqlite_libversion|sqlite_next|' + + 'sqlite_num_fields|sqlite_num_rows|sqlite_open|sqlite_popen|sqlite_prev|sqlite_query|sqlite_rewind|sqlite_seek|sqlite_single_query|' + + 'sqlite_udf_decode_binary|sqlite_udf_encode_binary|sqlite_unbuffered_query|sqlite_valid|sqrt|srand|sscanf|ssdeep_fuzzy_compare|' + + 'ssdeep_fuzzy_hash|ssdeep_fuzzy_hash_filename|ssh2_auth_hostbased_file|ssh2_auth_none|ssh2_auth_password|ssh2_auth_pubkey_file|' + + 'ssh2_connect|ssh2_exec|ssh2_fetch_stream|ssh2_fingerprint|ssh2_methods_negotiated|ssh2_publickey_add|ssh2_publickey_init|' + + 'ssh2_publickey_list|ssh2_publickey_remove|ssh2_scp_recv|ssh2_scp_send|ssh2_sftp|ssh2_sftp_lstat|ssh2_sftp_mkdir|ssh2_sftp_readlink|' + + 'ssh2_sftp_realpath|ssh2_sftp_rename|ssh2_sftp_rmdir|ssh2_sftp_stat|ssh2_sftp_symlink|ssh2_sftp_unlink|ssh2_shell|ssh2_tunnel|stat|' + + 'stats_absolute_deviation|stats_cdf_beta|stats_cdf_binomial|stats_cdf_cauchy|stats_cdf_chisquare|stats_cdf_exponential|stats_cdf_f|' + + 'stats_cdf_gamma|stats_cdf_laplace|stats_cdf_logistic|stats_cdf_negative_binomial|stats_cdf_noncentral_chisquare|stats_cdf_noncentral_f|' + + 'stats_cdf_poisson|stats_cdf_t|stats_cdf_uniform|stats_cdf_weibull|stats_covariance|stats_den_uniform|stats_dens_beta|stats_dens_cauchy|' + + 'stats_dens_chisquare|stats_dens_exponential|stats_dens_f|stats_dens_gamma|stats_dens_laplace|stats_dens_logistic|' + + 'stats_dens_negative_binomial|stats_dens_normal|stats_dens_pmf_binomial|stats_dens_pmf_hypergeometric|stats_dens_pmf_poisson|stats_dens_t|' + + 'stats_dens_weibull|stats_harmonic_mean|stats_kurtosis|stats_rand_gen_beta|stats_rand_gen_chisquare|stats_rand_gen_exponential|' + + 'stats_rand_gen_f|stats_rand_gen_funiform|stats_rand_gen_gamma|stats_rand_gen_ibinomial|stats_rand_gen_ibinomial_negative|' + + 'stats_rand_gen_int|stats_rand_gen_ipoisson|stats_rand_gen_iuniform|stats_rand_gen_noncenral_chisquare|stats_rand_gen_noncentral_f|' + + 'stats_rand_gen_noncentral_t|stats_rand_gen_normal|stats_rand_gen_t|stats_rand_get_seeds|stats_rand_phrase_to_seeds|stats_rand_ranf|' + + 'stats_rand_setall|stats_skew|stats_standard_deviation|stats_stat_binomial_coef|stats_stat_correlation|stats_stat_gennch|' + + 'stats_stat_independent_t|stats_stat_innerproduct|stats_stat_noncentral_t|stats_stat_paired_t|stats_stat_percentile|stats_stat_powersum|' + + 'stats_variance|stomp|stomp_connect_error|stomp_version|stompexception|stompframe|str_getcsv|str_ireplace|str_pad|str_repeat|str_replace|' + + 'str_rot13|str_shuffle|str_split|str_word_count|strcasecmp|strchr|strcmp|strcoll|strcspn|stream_bucket_append|stream_bucket_make_writeable|' + + 'stream_bucket_new|stream_bucket_prepend|stream_context_create|stream_context_get_default|stream_context_get_options|' + + 'stream_context_get_params|stream_context_set_default|stream_context_set_option|stream_context_set_params|stream_copy_to_stream|' + + 'stream_encoding|stream_filter_append|stream_filter_prepend|stream_filter_register|stream_filter_remove|stream_get_contents|' + + 'stream_get_filters|stream_get_line|stream_get_meta_data|stream_get_transports|stream_get_wrappers|stream_is_local|' + + 'stream_notification_callback|stream_register_wrapper|stream_resolve_include_path|stream_select|stream_set_blocking|stream_set_read_buffer|' + + 'stream_set_timeout|stream_set_write_buffer|stream_socket_accept|stream_socket_client|stream_socket_enable_crypto|stream_socket_get_name|' + + 'stream_socket_pair|stream_socket_recvfrom|stream_socket_sendto|stream_socket_server|stream_socket_shutdown|stream_supports_lock|' + + 'stream_wrapper_register|stream_wrapper_restore|stream_wrapper_unregister|streamwrapper|strftime|strip_tags|stripcslashes|stripos|' + + 'stripslashes|stristr|strlen|strnatcasecmp|strnatcmp|strncasecmp|strncmp|strpbrk|strpos|strptime|strrchr|strrev|strripos|strrpos|strspn|' + + 'strstr|strtok|strtolower|strtotime|strtoupper|strtr|strval|substr|substr_compare|substr_count|substr_replace|svm|svmmodel|svn_add|' + + 'svn_auth_get_parameter|svn_auth_set_parameter|svn_blame|svn_cat|svn_checkout|svn_cleanup|svn_client_version|svn_commit|svn_delete|' + + 'svn_diff|svn_export|svn_fs_abort_txn|svn_fs_apply_text|svn_fs_begin_txn2|svn_fs_change_node_prop|svn_fs_check_path|' + + 'svn_fs_contents_changed|svn_fs_copy|svn_fs_delete|svn_fs_dir_entries|svn_fs_file_contents|svn_fs_file_length|svn_fs_is_dir|svn_fs_is_file|' + + 'svn_fs_make_dir|svn_fs_make_file|svn_fs_node_created_rev|svn_fs_node_prop|svn_fs_props_changed|svn_fs_revision_prop|svn_fs_revision_root|' + + 'svn_fs_txn_root|svn_fs_youngest_rev|svn_import|svn_log|svn_ls|svn_mkdir|svn_repos_create|svn_repos_fs|svn_repos_fs_begin_txn_for_commit|' + + 'svn_repos_fs_commit_txn|svn_repos_hotcopy|svn_repos_open|svn_repos_recover|svn_revert|svn_status|svn_update|swf_actiongeturl|' + + 'swf_actiongotoframe|swf_actiongotolabel|swf_actionnextframe|swf_actionplay|swf_actionprevframe|swf_actionsettarget|swf_actionstop|' + + 'swf_actiontogglequality|swf_actionwaitforframe|swf_addbuttonrecord|swf_addcolor|swf_closefile|swf_definebitmap|swf_definefont|' + + 'swf_defineline|swf_definepoly|swf_definerect|swf_definetext|swf_endbutton|swf_enddoaction|swf_endshape|swf_endsymbol|swf_fontsize|' + + 'swf_fontslant|swf_fonttracking|swf_getbitmapinfo|swf_getfontinfo|swf_getframe|swf_labelframe|swf_lookat|swf_modifyobject|swf_mulcolor|' + + 'swf_nextid|swf_oncondition|swf_openfile|swf_ortho|swf_ortho2|swf_perspective|swf_placeobject|swf_polarview|swf_popmatrix|swf_posround|' + + 'swf_pushmatrix|swf_removeobject|swf_rotate|swf_scale|swf_setfont|swf_setframe|swf_shapearc|swf_shapecurveto|swf_shapecurveto3|' + + 'swf_shapefillbitmapclip|swf_shapefillbitmaptile|swf_shapefilloff|swf_shapefillsolid|swf_shapelinesolid|swf_shapelineto|swf_shapemoveto|' + + 'swf_showframe|swf_startbutton|swf_startdoaction|swf_startshape|swf_startsymbol|swf_textwidth|swf_translate|swf_viewport|swfaction|' + + 'swfbitmap|swfbutton|swfdisplayitem|swffill|swffont|swffontchar|swfgradient|swfmorph|swfmovie|swfprebuiltclip|swfshape|swfsound|' + + 'swfsoundinstance|swfsprite|swftext|swftextfield|swfvideostream|swish_construct|swish_getmetalist|swish_getpropertylist|swish_prepare|' + + 'swish_query|swishresult_getmetalist|swishresult_stem|swishresults_getparsedwords|swishresults_getremovedstopwords|swishresults_nextresult|' + + 'swishresults_seekresult|swishsearch_execute|swishsearch_resetlimit|swishsearch_setlimit|swishsearch_setphrasedelimiter|' + + 'swishsearch_setsort|swishsearch_setstructure|sybase_affected_rows|sybase_close|sybase_connect|sybase_data_seek|' + + 'sybase_deadlock_retry_count|sybase_fetch_array|sybase_fetch_assoc|sybase_fetch_field|sybase_fetch_object|sybase_fetch_row|' + + 'sybase_field_seek|sybase_free_result|sybase_get_last_message|sybase_min_client_severity|sybase_min_error_severity|' + + 'sybase_min_message_severity|sybase_min_server_severity|sybase_num_fields|sybase_num_rows|sybase_pconnect|sybase_query|sybase_result|' + + 'sybase_select_db|sybase_set_message_handler|sybase_unbuffered_query|symlink|sys_get_temp_dir|sys_getloadavg|syslog|system|tag|tan|tanh|' + + 'tcpwrap_check|tempnam|textdomain|tidy|tidy_access_count|tidy_config_count|tidy_diagnose|tidy_error_count|tidy_get_error_buffer|' + + 'tidy_get_output|tidy_load_config|tidy_reset_config|tidy_save_config|tidy_set_encoding|tidy_setopt|tidy_warning_count|tidynode|time|' + + 'time_nanosleep|time_sleep_until|timezone_abbreviations_list|timezone_identifiers_list|timezone_location_get|timezone_name_from_abbr|' + + 'timezone_name_get|timezone_offset_get|timezone_open|timezone_transitions_get|timezone_version_get|tmpfile|token_get_all|token_name|' + + 'tokyotyrant|tokyotyrantquery|tokyotyranttable|tostring|tostring|touch|transliterator|traversable|trigger_error|trim|uasort|ucfirst|' + + 'ucwords|udm_add_search_limit|udm_alloc_agent|udm_alloc_agent_array|udm_api_version|udm_cat_list|udm_cat_path|udm_check_charset|' + + 'udm_check_stored|udm_clear_search_limits|udm_close_stored|udm_crc32|udm_errno|udm_error|udm_find|udm_free_agent|udm_free_ispell_data|' + + 'udm_free_res|udm_get_doc_count|udm_get_res_field|udm_get_res_param|udm_hash32|udm_load_ispell_data|udm_open_stored|udm_set_agent_param|' + + 'uksort|umask|underflowexception|unexpectedvalueexception|uniqid|unixtojd|unlink|unpack|unregister_tick_function|unserialize|unset|' + + 'urldecode|urlencode|use_soap_error_handler|user_error|usleep|usort|utf8_decode|utf8_encode|v8js|v8jsexception|var_dump|var_export|variant|' + + 'variant_abs|variant_add|variant_and|variant_cast|variant_cat|variant_cmp|variant_date_from_timestamp|variant_date_to_timestamp|' + + 'variant_div|variant_eqv|variant_fix|variant_get_type|variant_idiv|variant_imp|variant_int|variant_mod|variant_mul|variant_neg|variant_not|' + + 'variant_or|variant_pow|variant_round|variant_set|variant_set_type|variant_sub|variant_xor|version_compare|vfprintf|virtual|' + + 'vpopmail_add_alias_domain|vpopmail_add_alias_domain_ex|vpopmail_add_domain|vpopmail_add_domain_ex|vpopmail_add_user|vpopmail_alias_add|' + + 'vpopmail_alias_del|vpopmail_alias_del_domain|vpopmail_alias_get|vpopmail_alias_get_all|vpopmail_auth_user|vpopmail_del_domain|' + + 'vpopmail_del_domain_ex|vpopmail_del_user|vpopmail_error|vpopmail_passwd|vpopmail_set_user_quota|vprintf|vsprintf|w32api_deftype|' + + 'w32api_init_dtype|w32api_invoke_function|w32api_register_function|w32api_set_call_method|wddx_add_vars|wddx_deserialize|wddx_packet_end|' + + 'wddx_packet_start|wddx_serialize_value|wddx_serialize_vars|win32_continue_service|win32_create_service|win32_delete_service|' + + 'win32_get_last_control_message|win32_pause_service|win32_ps_list_procs|win32_ps_stat_mem|win32_ps_stat_proc|win32_query_service_status|' + + 'win32_set_service_status|win32_start_service|win32_start_service_ctrl_dispatcher|win32_stop_service|wincache_fcache_fileinfo|' + + 'wincache_fcache_meminfo|wincache_lock|wincache_ocache_fileinfo|wincache_ocache_meminfo|wincache_refresh_if_changed|' + + 'wincache_rplist_fileinfo|wincache_rplist_meminfo|wincache_scache_info|wincache_scache_meminfo|wincache_ucache_add|wincache_ucache_cas|' + + 'wincache_ucache_clear|wincache_ucache_dec|wincache_ucache_delete|wincache_ucache_exists|wincache_ucache_get|wincache_ucache_inc|' + + 'wincache_ucache_info|wincache_ucache_meminfo|wincache_ucache_set|wincache_unlock|wordwrap|xattr_get|xattr_list|xattr_remove|xattr_set|' + + 'xattr_supported|xdiff_file_bdiff|xdiff_file_bdiff_size|xdiff_file_bpatch|xdiff_file_diff|xdiff_file_diff_binary|xdiff_file_merge3|' + + 'xdiff_file_patch|xdiff_file_patch_binary|xdiff_file_rabdiff|xdiff_string_bdiff|xdiff_string_bdiff_size|xdiff_string_bpatch|' + + 'xdiff_string_diff|xdiff_string_diff_binary|xdiff_string_merge3|xdiff_string_patch|xdiff_string_patch_binary|xdiff_string_rabdiff|' + + 'xhprof_disable|xhprof_enable|xhprof_sample_disable|xhprof_sample_enable|xml_error_string|xml_get_current_byte_index|' + + 'xml_get_current_column_number|xml_get_current_line_number|xml_get_error_code|xml_parse|xml_parse_into_struct|xml_parser_create|' + + 'xml_parser_create_ns|xml_parser_free|xml_parser_get_option|xml_parser_set_option|xml_set_character_data_handler|xml_set_default_handler|' + + 'xml_set_element_handler|xml_set_end_namespace_decl_handler|xml_set_external_entity_ref_handler|xml_set_notation_decl_handler|' + + 'xml_set_object|xml_set_processing_instruction_handler|xml_set_start_namespace_decl_handler|xml_set_unparsed_entity_decl_handler|xmlreader|' + + 'xmlrpc_decode|xmlrpc_decode_request|xmlrpc_encode|xmlrpc_encode_request|xmlrpc_get_type|xmlrpc_is_fault|xmlrpc_parse_method_descriptions|' + + 'xmlrpc_server_add_introspection_data|xmlrpc_server_call_method|xmlrpc_server_create|xmlrpc_server_destroy|' + + 'xmlrpc_server_register_introspection_callback|xmlrpc_server_register_method|xmlrpc_set_type|xmlwriter_end_attribute|xmlwriter_end_cdata|' + + 'xmlwriter_end_comment|xmlwriter_end_document|xmlwriter_end_dtd|xmlwriter_end_dtd_attlist|xmlwriter_end_dtd_element|' + + 'xmlwriter_end_dtd_entity|xmlwriter_end_element|xmlwriter_end_pi|xmlwriter_flush|xmlwriter_full_end_element|xmlwriter_open_memory|' + + 'xmlwriter_open_uri|xmlwriter_output_memory|xmlwriter_set_indent|xmlwriter_set_indent_string|xmlwriter_start_attribute|' + + 'xmlwriter_start_attribute_ns|xmlwriter_start_cdata|xmlwriter_start_comment|xmlwriter_start_document|xmlwriter_start_dtd|' + + 'xmlwriter_start_dtd_attlist|xmlwriter_start_dtd_element|xmlwriter_start_dtd_entity|xmlwriter_start_element|xmlwriter_start_element_ns|' + + 'xmlwriter_start_pi|xmlwriter_text|xmlwriter_write_attribute|xmlwriter_write_attribute_ns|xmlwriter_write_cdata|xmlwriter_write_comment|' + + 'xmlwriter_write_dtd|xmlwriter_write_dtd_attlist|xmlwriter_write_dtd_element|xmlwriter_write_dtd_entity|xmlwriter_write_element|' + + 'xmlwriter_write_element_ns|xmlwriter_write_pi|xmlwriter_write_raw|xpath_eval|xpath_eval_expression|xpath_new_context|xpath_register_ns|' + + 'xpath_register_ns_auto|xptr_eval|xptr_new_context|xslt_backend_info|xslt_backend_name|xslt_backend_version|xslt_create|xslt_errno|' + + 'xslt_error|xslt_free|xslt_getopt|xslt_process|xslt_set_base|xslt_set_encoding|xslt_set_error_handler|xslt_set_log|xslt_set_object|' + + 'xslt_set_sax_handler|xslt_set_sax_handlers|xslt_set_scheme_handler|xslt_set_scheme_handlers|xslt_setopt|xsltprocessor|yaml_emit|' + + 'yaml_emit_file|yaml_parse|yaml_parse_file|yaml_parse_url|yaz_addinfo|yaz_ccl_conf|yaz_ccl_parse|yaz_close|yaz_connect|yaz_database|' + + 'yaz_element|yaz_errno|yaz_error|yaz_es|yaz_es_result|yaz_get_option|yaz_hits|yaz_itemorder|yaz_present|yaz_range|yaz_record|yaz_scan|' + + 'yaz_scan_result|yaz_schema|yaz_search|yaz_set_option|yaz_sort|yaz_syntax|yaz_wait|yp_all|yp_cat|yp_err_string|yp_errno|yp_first|' + + 'yp_get_default_domain|yp_master|yp_match|yp_next|yp_order|zend_logo_guid|zend_thread_id|zend_version|zip_close|zip_entry_close|' + + 'zip_entry_compressedsize|zip_entry_compressionmethod|zip_entry_filesize|zip_entry_name|zip_entry_open|zip_entry_read|zip_open|zip_read|' + + 'ziparchive|ziparchive_addemptydir|ziparchive_addfile|ziparchive_addfromstring|ziparchive_close|ziparchive_deleteindex|' + + 'ziparchive_deletename|ziparchive_extractto|ziparchive_getarchivecomment|ziparchive_getcommentindex|ziparchive_getcommentname|' + + 'ziparchive_getfromindex|ziparchive_getfromname|ziparchive_getnameindex|ziparchive_getstatusstring|ziparchive_getstream|' + + 'ziparchive_locatename|ziparchive_open|ziparchive_renameindex|ziparchive_renamename|ziparchive_setCommentName|ziparchive_setarchivecomment|' + + 'ziparchive_setcommentindex|ziparchive_statindex|ziparchive_statname|ziparchive_unchangeall|ziparchive_unchangearchive|' + + 'ziparchive_unchangeindex|ziparchive_unchangename|zlib_get_coding_type').split('|') + ); + var keywords = lang.arrayToMap( + ('abstract|and|array|as|break|case|catch|class|clone|const|continue|declare|default|do|else|elseif|enddeclare|endfor|endforeach|endif|' + + 'endswitch|endwhile|extends|final|for|foreach|function|global|goto|if|implements|interface|instanceof|namespace|new|or|private|protected|' + + 'public|static|switch|throw|try|use|var|while|xor').split('|') + ); + var languageConstructs = lang.arrayToMap( + ('die|echo|empty|exit|eval|include|include_once|isset|list|acequire|acequire_once|return|print|unset').split('|') + ); + + var builtinConstants = lang.arrayToMap( + ('true|false|null|__CLASS__|__DIR__|__FILE__|__LINE__|__METHOD__|__FUNCTION__|__NAMESPACE__').split('|') + ); + + var builtinVariables = lang.arrayToMap( + ('$GLOBALS|$_SERVER|$_GET|$_POST|$_FILES|$_REQUEST|$_SESSION|$_ENV|$_COOKIE|$php_errormsg|$HTTP_RAW_POST_DATA|' + + '$http_response_header|$argc|$argv').split('|') + ); + var builtinFunctionsDeprecated = lang.arrayToMap( + ('key_exists|cairo_matrix_create_scale|cairo_matrix_create_translate|call_user_method|call_user_method_array|com_addref|com_get|' + + 'com_invoke|com_isenum|com_load|com_release|com_set|connection_timeout|cubrid_load_from_glo|cubrid_new_glo|cubrid_save_to_glo|' + + 'cubrid_send_glo|define_syslog_variables|dl|ereg|ereg_replace|eregi|eregi_replace|hw_documentattributes|hw_documentbodytag|' + + 'hw_documentsize|hw_outputdocument|imagedashedline|maxdb_bind_param|maxdb_bind_result|maxdb_client_encoding|maxdb_close_long_data|' + + 'maxdb_execute|maxdb_fetch|maxdb_get_metadata|maxdb_param_count|maxdb_send_long_data|mcrypt_ecb|mcrypt_generic_end|mime_content_type|' + + 'mysql_createdb|mysql_dbname|mysql_db_query|mysql_drop_db|mysql_dropdb|mysql_escape_string|mysql_fieldflags|mysql_fieldflags|' + + 'mysql_fieldname|mysql_fieldtable|mysql_fieldtype|mysql_freeresult|mysql_listdbs|mysql_list_fields|mysql_listfields|mysql_list_tables|' + + 'mysql_listtables|mysql_numfields|mysql_numrows|mysql_selectdb|mysql_tablename|mysqli_bind_param|mysqli_bind_result|' + + 'mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_execute|' + + 'mysqli_fetch|mysqli_get_metadata|mysqli_master_query|mysqli_param_count|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|' + + 'mysqli_send_long_data|mysqli_send_query|mysqli_slave_query|ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|' + + 'ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|' + + 'ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|' + + 'ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|ociloadlob|ocilogoff|ocilogon|ocinewcollection|' + + 'ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|ocirollback|ocirowcount|ocisavelob|ocisavelobfile|' + + 'ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|PDF_add_annotation|PDF_add_bookmark|' + + 'PDF_add_launchlink|PDF_add_locallink|PDF_add_note|PDF_add_outline|PDF_add_pdflink|PDF_add_weblink|PDF_attach_file|PDF_begin_page|' + + 'PDF_begin_template|PDF_close_pdi|PDF_close|PDF_findfont|PDF_get_font|PDF_get_fontname|PDF_get_fontsize|PDF_get_image_height|' + + 'PDF_get_image_width|PDF_get_majorversion|PDF_get_minorversion|PDF_get_pdi_parameter|PDF_get_pdi_value|PDF_open_ccitt|PDF_open_file|' + + 'PDF_open_gif|PDF_open_image_file|PDF_open_image|PDF_open_jpeg|PDF_open_pdi|PDF_open_tiff|PDF_place_image|PDF_place_pdi_page|' + + 'PDF_set_border_color|PDF_set_border_dash|PDF_set_border_style|PDF_set_char_spacing|PDF_set_duration|PDF_set_horiz_scaling|' + + 'PDF_set_info_author|PDF_set_info_creator|PDF_set_info_keywords|PDF_set_info_subject|PDF_set_info_title|PDF_set_leading|' + + 'PDF_set_text_matrix|PDF_set_text_rendering|PDF_set_text_rise|PDF_set_word_spacing|PDF_setgray_fill|PDF_setgray_stroke|PDF_setgray|' + + 'PDF_setpolydash|PDF_setrgbcolor_fill|PDF_setrgbcolor_stroke|PDF_setrgbcolor|PDF_show_boxed|php_check_syntax|px_set_tablename|' + + 'px_set_targetencoding|runkit_sandbox_output_handler|session_is_registered|session_register|session_unregister' + + 'set_magic_quotes_runtime|magic_quotes_runtime|set_socket_blocking|socket_set_blocking|set_socket_timeout|socket_set_timeout|split|spliti|' + + 'sql_regcase').split('|') + ); + + var keywordsDeprecated = lang.arrayToMap( + ('cfunction|old_function').split('|') + ); + + var futureReserved = lang.arrayToMap([]); + + this.$rules = { + "start" : [ + { + token : "comment", + regex : /(?:#|\/\/)(?:[^?]|\?[^>])*/ + }, + docComment.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment" + }, { + token : "string.regexp", + regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/][gimy]*\\s*(?=[).,;]|$)" + }, { + token : "string", // " string start + regex : '"', + next : "qqstring" + }, { + token : "string", // ' string start + regex : "'", + next : "qstring" + }, { + token : "constant.numeric", // hex + regex : "0[xX][0-9a-fA-F]+\\b" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "constant.language", // constants + regex : "\\b(?:DEFAULT_INCLUDE_PATH|E_(?:ALL|CO(?:MPILE_(?:ERROR|WARNING)|RE_(?:ERROR|WARNING))|" + + "ERROR|NOTICE|PARSE|STRICT|USER_(?:ERROR|NOTICE|WARNING)|WARNING)|P(?:EAR_(?:EXTENSION_DIR|INSTALL_DIR)|" + + "HP_(?:BINDIR|CONFIG_FILE_(?:PATH|SCAN_DIR)|DATADIR|E(?:OL|XTENSION_DIR)|INT_(?:MAX|SIZE)|" + + "L(?:IBDIR|OCALSTATEDIR)|O(?:S|UTPUT_HANDLER_(?:CONT|END|START))|PREFIX|S(?:API|HLIB_SUFFIX|YSCONFDIR)|" + + "VERSION))|__COMPILER_HALT_OFFSET__)\\b" + }, { + token : ["keyword", "text", "support.class"], + regex : "\\b(new)(\\s+)(\\w+)" + }, { + token : ["support.class", "keyword.operator"], + regex : "\\b(\\w+)(::)" + }, { + token : "constant.language", // constants + regex : "\\b(?:A(?:B(?:DAY_(?:1|2|3|4|5|6|7)|MON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9))|LT_DIGITS|M_STR|" + + "SSERT_(?:ACTIVE|BAIL|CALLBACK|QUIET_EVAL|WARNING))|C(?:ASE_(?:LOWER|UPPER)|HAR_MAX|" + + "O(?:DESET|NNECTION_(?:ABORTED|NORMAL|TIMEOUT)|UNT_(?:NORMAL|RECURSIVE))|" + + "R(?:EDITS_(?:ALL|DOCS|FULLPAGE|G(?:ENERAL|ROUP)|MODULES|QA|SAPI)|NCYSTR|" + + "YPT_(?:BLOWFISH|EXT_DES|MD5|S(?:ALT_LENGTH|TD_DES)))|URRENCY_SYMBOL)|D(?:AY_(?:1|2|3|4|5|6|7)|" + + "ECIMAL_POINT|IRECTORY_SEPARATOR|_(?:FMT|T_FMT))|E(?:NT_(?:COMPAT|NOQUOTES|QUOTES)|RA(?:_(?:D_(?:FMT|T_FMT)|" + + "T_FMT|YEAR)|)|XTR_(?:IF_EXISTS|OVERWRITE|PREFIX_(?:ALL|I(?:F_EXISTS|NVALID)|SAME)|SKIP))|FRAC_DIGITS|GROUPING|" + + "HTML_(?:ENTITIES|SPECIALCHARS)|IN(?:FO_(?:ALL|C(?:ONFIGURATION|REDITS)|ENVIRONMENT|GENERAL|LICENSE|MODULES|VARIABLES)|" + + "I_(?:ALL|PERDIR|SYSTEM|USER)|T_(?:CURR_SYMBOL|FRAC_DIGITS))|L(?:C_(?:ALL|C(?:OLLATE|TYPE)|M(?:ESSAGES|ONETARY)|NUMERIC|TIME)|" + + "O(?:CK_(?:EX|NB|SH|UN)|G_(?:A(?:LERT|UTH(?:PRIV|))|C(?:ONS|R(?:IT|ON))|D(?:AEMON|EBUG)|E(?:MERG|RR)|INFO|KERN|" + + "L(?:OCAL(?:0|1|2|3|4|5|6|7)|PR)|MAIL|N(?:DELAY|EWS|O(?:TICE|WAIT))|ODELAY|P(?:ERROR|ID)|SYSLOG|U(?:SER|UCP)|WARNING)))|" + + "M(?:ON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9|DECIMAL_POINT|GROUPING|THOUSANDS_SEP)|_(?:1_PI|2_(?:PI|SQRTPI)|E|L(?:N(?:10|2)|" + + "OG(?:10E|2E))|PI(?:_(?:2|4)|)|SQRT(?:1_2|2)))|N(?:EGATIVE_SIGN|O(?:EXPR|STR)|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|" + + "P(?:ATH(?:INFO_(?:BASENAME|DIRNAME|EXTENSION)|_SEPARATOR)|M_STR|OSITIVE_SIGN|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|" + + "RADIXCHAR|S(?:EEK_(?:CUR|END|SET)|ORT_(?:ASC|DESC|NUMERIC|REGULAR|STRING)|TR_PAD_(?:BOTH|LEFT|RIGHT))|" + + "T(?:HOUS(?:ANDS_SEP|EP)|_FMT(?:_AMPM|))|YES(?:EXPR|STR)|STD(?:IN|OUT|ERR))\\b" + }, { + token : function(value) { + if (keywords.hasOwnProperty(value)) + return "keyword"; + else if (builtinConstants.hasOwnProperty(value)) + return "constant.language"; + else if (builtinVariables.hasOwnProperty(value)) + return "variable.language"; + else if (futureReserved.hasOwnProperty(value)) + return "invalid.illegal"; + else if (builtinFunctions.hasOwnProperty(value)) + return "support.function"; + else if (value == "debugger") + return "invalid.deprecated"; + else + if(value.match(/^(\$[a-zA-Z][a-zA-Z0-9_]*|self|parent)$/)) + return "variable"; + return "identifier"; + }, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + onMatch : function(value, currentSate, state) { + value = value.substr(3); + if (value[0] == "'" || value[0] == '"') + value = value.slice(1, -1); + state.unshift(this.next, value); + return "markup.list"; + }, + regex : /<<<(?:\w+|'\w+'|"\w+")$/, + next: "heredoc" + }, { + token : "keyword.operator", + regex : "::|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|!=|!==|<=|>=|=>|<<=|>>=|>>>=|<>|<|>|=|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" + }, { + token : "paren.lparen", + regex : "[[({]" + }, { + token : "paren.rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + } + ], + "heredoc" : [ + { + onMatch : function(value, currentSate, stack) { + if (stack[1] != value) + return "string"; + stack.shift(); + stack.shift(); + return "markup.list" + }, + regex : "^\\w+(?=;?$)", + next: "start" + }, { + token: "string", + regex : ".*" + } + ], + "comment" : [ + { + token : "comment", // closing comment + regex : ".*?\\*\\/", + next : "start" + }, { + token : "comment", // comment spanning whole line + regex : ".+" + } + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : '\\\\(?:[nrtvef\\\\"$]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2})' + }, { + token : "constant.language.escape", + regex : /\$[\w]+(?:\[[\w\]+]|=>\w+)?/ + }, { + token : "constant.language.escape", + regex : /\$\{[^"\}]+\}?/ // this is wrong but ok for now + }, + {token : "string", regex : '"', next : "start"}, + {defaultToken : "string"} + ], + "qstring" : [ + {token : "constant.language.escape", regex : /\\['\\]/}, + {token : "string", regex : "'", next : "start"}, + {defaultToken : "string"} + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("start") ]); +}; + +oop.inherits(PhpLangHighlightRules, TextHighlightRules); + + +var PhpHighlightRules = function() { + HtmlHighlightRules.call(this); + + var startRules = [ + { + token : "support.php_tag", // php open tag + regex : "<\\?(?:php|=)?", + push : "php-start" + } + ]; + + var endRules = [ + { + token : "support.php_tag", // php close tag + regex : "\\?>", + next : "pop" + } + ]; + + for (var key in this.$rules) + this.$rules[key].unshift.apply(this.$rules[key], startRules); + + this.embedRules(PhpLangHighlightRules, "php-", endRules, ["start"]); + + this.normalizeRules(); +}; + +oop.inherits(PhpHighlightRules, HtmlHighlightRules); + +exports.PhpHighlightRules = PhpHighlightRules; +exports.PhpLangHighlightRules = PhpLangHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define('ace/mode/html_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var CssHighlightRules = acequire("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = acequire("./xml_highlight_rules").XmlHighlightRules; + +var tagMap = lang.createMap({ + a : 'anchor', + button : 'form', + form : 'form', + img : 'image', + input : 'form', + label : 'form', + option : 'form', + script : 'script', + select : 'form', + textarea : 'form', + style : 'style', + table : 'table', + tbody : 'table', + td : 'table', + tfoot : 'table', + th : 'table', + tr : 'table' +}); + +var HtmlHighlightRules = function() { + XmlHighlightRules.call(this); + + this.addRules({ + attributes: [{ + include : "space" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "keyword.operator.separator", + regex : "=", + push : [{ + include: "space" + }, { + token : "string", + regex : "[^<>='\"`\\s]+", + next : "pop" + }, { + token : "empty", + regex : "", + next : "pop" + }] + }, { + include : "string" + }], + tag: [{ + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation.begin", + "meta.tag.name" + (group ? "." + group : "")]; + }, + regex : "(<)([-_a-zA-Z0-9:]+)", + next: "start_tag_stuff" + }, { + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation.begin", + "meta.tag.name" + (group ? "." + group : "")]; + }, + regex : "(", next : "start"} + ], + end_tag_stuff: [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next : "start"} + ] + }); + + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); + + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; + +oop.inherits(HtmlHighlightRules, XmlHighlightRules); + +exports.HtmlHighlightRules = HtmlHighlightRules; +}); + +ace.define('ace/mode/css_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; + +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|acequired|root|target|valid|visited)\\b"; + +var CssHighlightRules = function() { + + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + + this.$rules = { + "start" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "@.*?{", + push: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "media" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "\\}", + next: "pop" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "comment" : [{ + token : "comment", + regex : "\\*\\/", + next : "pop" + }, { + defaultToken : "comment" + }], + + "ruleset" : [ + { + token : "paren.rparen", + regex : "\\}", + next: "pop" + }, { + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : ["constant.numeric", "keyword"], + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + }, { + token : "constant.numeric", + regex : numRe + }, { + token : "constant.numeric", // hex6 color + regex : "#[a-f0-9]{6}" + }, { + token : "constant.numeric", // hex3 color + regex : "#[a-f0-9]{3}" + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex : pseudoElements + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex : pseudoClasses + }, { + token : ["support.function", "string", "support.function"], + regex : "(url\\()(.*)(\\))" + }, { + token : keywordMapper, + regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + caseInsensitive: true + }] + }; + + this.normalizeRules(); +}; + +oop.inherits(CssHighlightRules, TextHighlightRules); + +exports.CssHighlightRules = CssHighlightRules; + +}); + +ace.define('ace/mode/javascript_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var JavaScriptHighlightRules = function() { + var keywordMapper = this.createKeywordMapper({ + "variable.language": + "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document" , // Pseudo + "keyword": + "const|yield|import|get|set|" + + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", + "storage.type": + "const|let|var|function", + "constant.language": + "null|Infinity|NaN|undefined", + "support.function": + "alert", + "constant.language.boolean": "true|false" + }, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; + + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-6][0-7]?|" + // oct + "37[0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + + this.$rules = { + "no_regex" : [ + { + token : "comment", + regex : "\\/\\/", + next : "line_comment" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : /\/\*/, + next : "comment" + }, { + token : "string", + regex : "'(?=.)", + next : "qstring" + }, { + token : "string", + regex : '"(?=.)', + next : "qqstring" + }, { + token : "constant.numeric", // hex + regex : /0[xX][0-9a-fA-F]+\b/ + }, { + token : "constant.numeric", // float + regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ + }, { + token : [ + "storage.type", "punctuation.operator", "support.function", + "punctuation.operator", "entity.name.function", "text","keyword.operator" + ], + regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "paren.lparen" + ], + regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "text", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : "keyword", + regex : "(?:" + kwBeforeRe + ")\\b", + next : "start" + }, { + token : ["punctuation.operator", "support.function"], + regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token : ["punctuation.operator", "support.function.dom"], + regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token : ["punctuation.operator", "support.constant"], + regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token : ["storage.type", "punctuation.operator", "support.function.firebug"], + regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/ + }, { + token : keywordMapper, + regex : identifierRe + }, { + token : "keyword.operator", + regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, + next : "start" + }, { + token : "punctuation.operator", + regex : /\?|\:|\,|\;|\./, + next : "start" + }, { + token : "paren.lparen", + regex : /[\[({]/, + next : "start" + }, { + token : "paren.rparen", + regex : /[\])}]/ + }, { + token : "keyword.operator", + regex : /\/=?/, + next : "start" + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment_regex_allowed" + }, { + token : "comment", + regex : "\\/\\/", + next : "line_comment_regex_allowed" + }, { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token : "text", + regex : "\\s+|^$", + next : "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/\\w*", + next: "no_regex" + }, { + token : "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token : "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/ + }, { + token : "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "function_arguments": [ + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "[, ]+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "comment_regex_allowed" : [ + {token : "comment", regex : "\\*\\/", next : "start"}, + {defaultToken : "comment"} + ], + "comment" : [ + {token : "comment", regex : "\\*\\/", next : "no_regex"}, + {defaultToken : "comment"} + ], + "line_comment_regex_allowed" : [ + {token : "comment", regex : "$|^", next : "start"}, + {defaultToken : "comment"} + ], + "line_comment" : [ + {token : "comment", regex : "$|^", next : "no_regex"}, + {defaultToken : "comment"} + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qqstring" + }, { + token : "string", + regex : '"|$', + next : "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qstring" + }, { + token : "string", + regex : "'|$", + next : "no_regex" + }, { + defaultToken: "string" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("no_regex") ]); +}; + +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); + +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; +}); + +ace.define('ace/mode/xml_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var xmlUtil = acequire("./xml_util"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var XmlHighlightRules = function(normalize) { + this.$rules = { + start : [ + {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"}, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration" + }, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction" + }, + {token : "comment", regex : "<\\!--", next : "comment"}, + { + token : ["punctuation.doctype.begin", "meta.tag.doctype"], + regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype" + }, + {include : "tag"}, + {include : "reference"} + ], + + xml_declaration : [ + {include : "attributes"}, + {include : "instruction"} + ], + + instruction : [ + {token : "punctuation.instruction.end", regex : "\\?>", next : "start"} + ], + + doctype : [ + {include : "space"}, + {include : "string"}, + {token : "punctuation.doctype.end", regex : ">", next : "start"}, + {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"}, + {token : "punctuation.begin", regex : "\\[", push : "declarations"} + ], + + declarations : [{ + token : "text", + regex : "\\s+" + }, { + token: "punctuation.end", + regex: "]", + next: "pop" + }, { + token : ["punctuation.begin", "keyword"], + regex : "(<\\!)([-_a-zA-Z0-9]+)", + push : [{ + token : "text", + regex : "\\s+" + }, + { + token : "punctuation.end", + regex : ">", + next : "pop" + }, + {include : "string"}] + }], + + cdata : [ + {token : "string.end", regex : "\\]\\]>", next : "start"}, + {token : "text", regex : "\\s+"}, + {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"} + ], + + comment : [ + {token : "comment", regex : "-->", next : "start"}, + {defaultToken : "comment"} + ], + + tag : [{ + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)", + next: [ + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"} + ] + }, { + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(", next : "start"} + ] + }], + + space : [ + {token : "text", regex : "\\s+"} + ], + + reference : [{ + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, { + token : "invalid.illegal", regex : "&" + }], + + string: [{ + token : "string", + regex : "'", + push : "qstring_inner" + }, { + token : "string", + regex : '"', + push : "qqstring_inner" + }], + + qstring_inner: [ + {token : "string", regex: "'", next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + qqstring_inner: [ + {token : "string", regex: '"', next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + attributes: [{ + token : "entity.other.attribute-name", + regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" + }, { + token : "keyword.operator.separator", + regex : "=" + }, { + include : "space" + }, { + include : "string" + }] + }; + + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; + + +(function() { + + this.embedTagRules = function(HighlightRules, prefix, tag){ + this.$rules.tag.unshift({ + token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(<)(" + tag + ")", + next: [ + {include : "space"}, + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"} + ] + }); + + this.$rules[tag + "-end"] = [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next: "start", + onMatch : function(value, currentState, stack) { + stack.splice(0); + return this.token; + }} + ] + + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(" + }]); + }; + +}).call(TextHighlightRules.prototype); + +oop.inherits(XmlHighlightRules, TextHighlightRules); + +exports.XmlHighlightRules = XmlHighlightRules; +}); + +ace.define('ace/mode/xml_util', ["require", 'exports', 'module' ], function(acequire, exports, module) { + + +function string(state) { + return [{ + token : "string", + regex : '"', + next : state + "_qqstring" + }, { + token : "string", + regex : "'", + next : state + "_qstring" + }]; +} + +function multiLineString(quote, state) { + return [ + {token : "string", regex : quote, next : state}, + { + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, + {defaultToken : "string"} + ]; +} + +exports.tag = function(states, name, nextState, tagMap) { + states[name] = [{ + token : "text", + regex : "\\s+" + }, { + + token : !tagMap ? "meta.tag.tag-name" : function(value) { + if (tagMap[value]) + return "meta.tag.tag-name." + tagMap[value]; + else + return "meta.tag.tag-name"; + }, + regex : "[-_a-zA-Z0-9:]+", + next : name + "_embed_attribute_list" + }, { + token: "empty", + regex: "", + next : name + "_embed_attribute_list" + }]; + + states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list"); + states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list"); + + states[name + "_embed_attribute_list"] = [{ + token : "meta.tag.r", + regex : "/?>", + next : nextState + }, { + token : "keyword.operator", + regex : "=" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "text", + regex : "\\s+" + }].concat(string(name)); +}; + +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/plain_text.js b/pitfall/pdfkit/node_modules/brace/mode/plain_text.js new file mode 100644 index 00000000..bdb5f641 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/plain_text.js @@ -0,0 +1,55 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/plain_text', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/text_highlight_rules', 'ace/mode/behaviour'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var Behaviour = acequire("./behaviour").Behaviour; + +var Mode = function() { + this.HighlightRules = TextHighlightRules; + this.$behaviour = new Behaviour(); +}; + +oop.inherits(Mode, TextMode); + +(function() { + this.type = "text"; + this.getNextLineIndent = function(state, line, tab) { + return ''; + }; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/brace/mode/powershell.js b/pitfall/pdfkit/node_modules/brace/mode/powershell.js new file mode 100644 index 00000000..cf38f948 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/powershell.js @@ -0,0 +1,659 @@ +ace.define('ace/mode/powershell', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/powershell_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var PowershellHighlightRules = acequire("./powershell_highlight_rules").PowershellHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = PowershellHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode({start: "^\\s*(<#)", end: "^[#\\s]>\\s*$"}); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "#"; + this.blockComment = {start: "<#", end: "#>"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + + this.createWorker = function(session) { + return null; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); +ace.define('ace/mode/powershell_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var PowershellHighlightRules = function() { + + var keywords = ( + "function|if|else|elseif|switch|while|default|for|do|until|break|continue|" + + "foreach|return|filter|in|trap|throw|param|begin|process|end" + ); + + var builtinFunctions = ( + "Get-Alias|Import-Alias|New-Alias|Set-Alias|Get-AuthenticodeSignature|Set-AuthenticodeSignature|" + + "Set-Location|Get-ChildItem|Clear-Item|Get-Command|Measure-Command|Trace-Command|" + + "Add-Computer|Checkpoint-Computer|Remove-Computer|Restart-Computer|Restore-Computer|Stop-Computer|" + + "Reset-ComputerMachinePassword|Test-ComputerSecureChannel|Add-Content|Get-Content|Set-Content|Clear-Content|" + + "Get-Command|Invoke-Command|Enable-ComputerRestore|Disable-ComputerRestore|Get-ComputerRestorePoint|Test-Connection|" + + "ConvertFrom-CSV|ConvertTo-CSV|ConvertTo-Html|ConvertTo-Xml|ConvertFrom-SecureString|ConvertTo-SecureString|" + + "Copy-Item|Export-Counter|Get-Counter|Import-Counter|Get-Credential|Get-Culture|" + + "Get-ChildItem|Get-Date|Set-Date|Remove-Item|Compare-Object|Get-Event|" + + "Get-WinEvent|New-Event|Remove-Event|Unregister-Event|Wait-Event|Clear-EventLog|" + + "Get-Eventlog|Limit-EventLog|New-Eventlog|Remove-EventLog|Show-EventLog|Write-EventLog|" + + "Get-EventSubscriber|Register-EngineEvent|Register-ObjectEvent|Register-WmiEvent|Get-ExecutionPolicy|Set-ExecutionPolicy|" + + "Export-Alias|Export-Clixml|Export-Console|Export-Csv|ForEach-Object|Format-Custom|" + + "Format-List|Format-Table|Format-Wide|Export-FormatData|Get-FormatData|Get-Item|" + + "Get-ChildItem|Get-Help|Add-History|Clear-History|Get-History|Invoke-History|" + + "Get-Host|Read-Host|Write-Host|Get-HotFix|Import-Clixml|Import-Csv|" + + "Invoke-Command|Invoke-Expression|Get-Item|Invoke-Item|New-Item|Remove-Item|" + + "Set-Item|Clear-ItemProperty|Copy-ItemProperty|Get-ItemProperty|Move-ItemProperty|New-ItemProperty|" + + "Remove-ItemProperty|Rename-ItemProperty|Set-ItemProperty|Get-Job|Receive-Job|Remove-Job|" + + "Start-Job|Stop-Job|Wait-Job|Stop-Process|Update-List|Get-Location|" + + "Pop-Location|Push-Location|Set-Location|Send-MailMessage|Add-Member|Get-Member|" + + "Move-Item|Compare-Object|Group-Object|Measure-Object|New-Object|Select-Object|" + + "Sort-Object|Where-Object|Out-Default|Out-File|Out-GridView|Out-Host|" + + "Out-Null|Out-Printer|Out-String|Convert-Path|Join-Path|Resolve-Path|" + + "Split-Path|Test-Path|Get-Pfxcertificate|Pop-Location|Push-Location|Get-Process|" + + "Start-Process|Stop-Process|Wait-Process|Enable-PSBreakpoint|Disable-PSBreakpoint|Get-PSBreakpoint|" + + "Set-PSBreakpoint|Remove-PSBreakpoint|Get-PSDrive|New-PSDrive|Remove-PSDrive|Get-PSProvider|" + + "Set-PSdebug|Enter-PSSession|Exit-PSSession|Export-PSSession|Get-PSSession|Import-PSSession|" + + "New-PSSession|Remove-PSSession|Disable-PSSessionConfiguration|Enable-PSSessionConfiguration|Get-PSSessionConfiguration|Register-PSSessionConfiguration|" + + "Set-PSSessionConfiguration|Unregister-PSSessionConfiguration|New-PSSessionOption|Add-PsSnapIn|Get-PsSnapin|Remove-PSSnapin|" + + "Get-Random|Read-Host|Remove-Item|Rename-Item|Rename-ItemProperty|Select-Object|" + + "Select-XML|Send-MailMessage|Get-Service|New-Service|Restart-Service|Resume-Service|" + + "Set-Service|Start-Service|Stop-Service|Suspend-Service|Sort-Object|Start-Sleep|" + + "ConvertFrom-StringData|Select-String|Tee-Object|New-Timespan|Trace-Command|Get-Tracesource|" + + "Set-Tracesource|Start-Transaction|Complete-Transaction|Get-Transaction|Use-Transaction|Undo-Transaction|" + + "Start-Transcript|Stop-Transcript|Add-Type|Update-TypeData|Get-Uiculture|Get-Unique|" + + "Update-Formatdata|Update-Typedata|Clear-Variable|Get-Variable|New-Variable|Remove-Variable|" + + "Set-Variable|New-WebServiceProxy|Where-Object|Write-Debug|Write-Error|Write-Host|" + + "Write-Output|Write-Progress|Write-Verbose|Write-Warning|Set-WmiInstance|Invoke-WmiMethod|" + + "Get-WmiObject|Remove-WmiObject|Connect-WSMan|Disconnect-WSMan|Test-WSMan|Invoke-WSManAction|" + + "Disable-WSManCredSSP|Enable-WSManCredSSP|Get-WSManCredSSP|New-WSManInstance|Get-WSManInstance|Set-WSManInstance|" + + "Remove-WSManInstance|Set-WSManQuickConfig|New-WSManSessionOption" + ); + + var keywordMapper = this.createKeywordMapper({ + "support.function": builtinFunctions, + "keyword": keywords + }, "identifier"); + + var binaryOperatorsRe = "eq|ne|ge|gt|lt|le|like|notlike|match|notmatch|replace|contains|notcontains|" + + "ieq|ine|ige|igt|ile|ilt|ilike|inotlike|imatch|inotmatch|ireplace|icontains|inotcontains|" + + "is|isnot|as|" + + "and|or|band|bor|not"; + + this.$rules = { + "start" : [ + { + token : "comment", + regex : "#.*$" + }, { + token : "comment.start", + regex : "<#", + next : "comment" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : "constant.numeric", // hex + regex : "0[xX][0-9a-fA-F]+\\b" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "constant.language.boolean", + regex : "[$](?:[Tt]rue|[Ff]alse)\\b" + }, { + token : "constant.language", + regex : "[$][Nn]ull\\b" + }, { + token : "variable.instance", + regex : "[$][a-zA-Z][a-zA-Z0-9_]*\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$\\-]*\\b" + }, { + token : "keyword.operator", + regex : "\\-(?:" + binaryOperatorsRe + ")" + }, { + token : "keyword.operator", + regex : "&|\\*|\\+|\\-|\\=|\\+=|\\-=" + }, { + token : "lparen", + regex : "[[({]" + }, { + token : "rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + } + ], + "comment" : [ + { + token : "comment.end", + regex : "#>", + next : "start" + }, { + token : "doc.comment.tag", + regex : "^\\.\\w+" + }, { + token : "comment", + regex : "\\w+" + }, { + token : "comment", + regex : "." + } + ] + }; +}; + +oop.inherits(PowershellHighlightRules, TextHighlightRules); + +exports.PowershellHighlightRules = PowershellHighlightRules; +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/prolog.js b/pitfall/pdfkit/node_modules/brace/mode/prolog.js new file mode 100644 index 00000000..676f4c77 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/prolog.js @@ -0,0 +1,353 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2012, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * Contributor(s): + * + * + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/prolog', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/prolog_highlight_rules', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var PrologHighlightRules = acequire("./prolog_highlight_rules").PrologHighlightRules; +var FoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = PrologHighlightRules; + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + this.lineCommentStart = "%"; + this.blockComment = {start: "/*", end: "*/"}; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/prolog_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var PrologHighlightRules = function() { + + this.$rules = { start: + [ { include: '#comment' }, + { include: '#basic_fact' }, + { include: '#rule' }, + { include: '#directive' }, + { include: '#fact' } ], + '#atom': + [ { token: 'constant.other.atom.prolog', + regex: '\\b[a-z][a-zA-Z0-9_]*\\b' }, + { token: 'constant.numeric.prolog', + regex: '-?\\d+(?:\\.\\d+)?' }, + { include: '#string' } ], + '#basic_elem': + [ { include: '#comment' }, + { include: '#statement' }, + { include: '#constants' }, + { include: '#operators' }, + { include: '#builtins' }, + { include: '#list' }, + { include: '#atom' }, + { include: '#variable' } ], + '#basic_fact': + [ { token: + [ 'entity.name.function.fact.basic.prolog', + 'punctuation.end.fact.basic.prolog' ], + regex: '([a-z]\\w*)(\\.)' } ], + '#builtins': + [ { token: 'support.function.builtin.prolog', + regex: '\\b(?:abolish|abort|ancestors|arg|ascii|assert[az]|atom(?:ic)?|body|char|close|conc|concat|consult|define|definition|dynamic|dump|fail|file|free|free_proc|functor|getc|goal|halt|head|head|integer|length|listing|match_args|member|next_clause|nl|nonvar|nth|number|cvars|nvars|offset|op|print?|prompt|putc|quoted|ratom|read|redefine|rename|retract(?:all)?|see|seeing|seen|skip|spy|statistics|system|tab|tell|telling|term|time|told|univ|unlink_clause|unspy_predicate|var|write)\\b' } ], + '#comment': + [ { token: + [ 'punctuation.definition.comment.prolog', + 'comment.line.percentage.prolog' ], + regex: '(%)(.*$)' }, + { token: 'punctuation.definition.comment.prolog', + regex: '/\\*', + push: + [ { token: 'punctuation.definition.comment.prolog', + regex: '\\*/', + next: 'pop' }, + { defaultToken: 'comment.block.prolog' } ] } ], + '#constants': + [ { token: 'constant.language.prolog', + regex: '\\b(?:true|false|yes|no)\\b' } ], + '#directive': + [ { token: 'keyword.operator.directive.prolog', + regex: ':-', + push: + [ { token: 'meta.directive.prolog', regex: '\\.', next: 'pop' }, + { include: '#comment' }, + { include: '#statement' }, + { defaultToken: 'meta.directive.prolog' } ] } ], + '#expr': + [ { include: '#comments' }, + { token: 'meta.expression.prolog', + regex: '\\(', + push: + [ { token: 'meta.expression.prolog', regex: '\\)', next: 'pop' }, + { include: '#expr' }, + { defaultToken: 'meta.expression.prolog' } ] }, + { token: 'keyword.control.cutoff.prolog', regex: '!' }, + { token: 'punctuation.control.and.prolog', regex: ',' }, + { token: 'punctuation.control.or.prolog', regex: ';' }, + { include: '#basic_elem' } ], + '#fact': + [ { token: + [ 'entity.name.function.fact.prolog', + 'punctuation.begin.fact.parameters.prolog' ], + regex: '([a-z]\\w*)(\\()(?!.*:-)', + push: + [ { token: + [ 'punctuation.end.fact.parameters.prolog', + 'punctuation.end.fact.prolog' ], + regex: '(\\))(\\.?)', + next: 'pop' }, + { include: '#parameter' }, + { defaultToken: 'meta.fact.prolog' } ] } ], + '#list': + [ { token: 'punctuation.begin.list.prolog', + regex: '\\[(?=.*\\])', + push: + [ { token: 'punctuation.end.list.prolog', + regex: '\\]', + next: 'pop' }, + { include: '#comment' }, + { token: 'punctuation.separator.list.prolog', regex: ',' }, + { token: 'punctuation.concat.list.prolog', + regex: '\\|', + push: + [ { token: 'meta.list.concat.prolog', + regex: '(?=\\s*\\])', + next: 'pop' }, + { include: '#basic_elem' }, + { defaultToken: 'meta.list.concat.prolog' } ] }, + { include: '#basic_elem' }, + { defaultToken: 'meta.list.prolog' } ] } ], + '#operators': + [ { token: 'keyword.operator.prolog', + regex: '\\\\\\+|\\bnot\\b|\\bis\\b|->|[><]|[><\\\\:=]?=|(?:=\\\\|\\\\=)=' } ], + '#parameter': + [ { token: 'variable.language.anonymous.prolog', + regex: '\\b_\\b' }, + { token: 'variable.parameter.prolog', + regex: '\\b[A-Z_]\\w*\\b' }, + { token: 'punctuation.separator.parameters.prolog', regex: ',' }, + { include: '#basic_elem' }, + { token: 'text', regex: '[^\\s]' } ], + '#rule': + [ { token: 'meta.rule.prolog', + regex: '(?=[a-z]\\w*.*:-)', + push: + [ { token: 'punctuation.rule.end.prolog', + regex: '\\.', + next: 'pop' }, + { token: 'meta.rule.signature.prolog', + regex: '(?=[a-z]\\w*.*:-)', + push: + [ { token: 'meta.rule.signature.prolog', + regex: '(?=:-)', + next: 'pop' }, + { token: 'entity.name.function.rule.prolog', + regex: '[a-z]\\w*(?=\\(|\\s*:-)' }, + { token: 'punctuation.rule.parameters.begin.prolog', + regex: '\\(', + push: + [ { token: 'punctuation.rule.parameters.end.prolog', + regex: '\\)', + next: 'pop' }, + { include: '#parameter' }, + { defaultToken: 'meta.rule.parameters.prolog' } ] }, + { defaultToken: 'meta.rule.signature.prolog' } ] }, + { token: 'keyword.operator.definition.prolog', + regex: ':-', + push: + [ { token: 'meta.rule.definition.prolog', + regex: '(?=\\.)', + next: 'pop' }, + { include: '#comment' }, + { include: '#expr' }, + { defaultToken: 'meta.rule.definition.prolog' } ] }, + { defaultToken: 'meta.rule.prolog' } ] } ], + '#statement': + [ { token: 'meta.statement.prolog', + regex: '(?=[a-z]\\w*\\()', + push: + [ { token: 'punctuation.end.statement.parameters.prolog', + regex: '\\)', + next: 'pop' }, + { include: '#builtins' }, + { include: '#atom' }, + { token: 'punctuation.begin.statement.parameters.prolog', + regex: '\\(', + push: + [ { token: 'meta.statement.parameters.prolog', + regex: '(?=\\))', + next: 'pop' }, + { token: 'punctuation.separator.statement.prolog', regex: ',' }, + { include: '#basic_elem' }, + { defaultToken: 'meta.statement.parameters.prolog' } ] }, + { defaultToken: 'meta.statement.prolog' } ] } ], + '#string': + [ { token: 'punctuation.definition.string.begin.prolog', + regex: '\'', + push: + [ { token: 'punctuation.definition.string.end.prolog', + regex: '\'', + next: 'pop' }, + { token: 'constant.character.escape.prolog', regex: '\\\\.' }, + { token: 'constant.character.escape.quote.prolog', + regex: '\'\'' }, + { defaultToken: 'string.quoted.single.prolog' } ] } ], + '#variable': + [ { token: 'variable.language.anonymous.prolog', + regex: '\\b_\\b' }, + { token: 'variable.other.prolog', + regex: '\\b[A-Z_][a-zA-Z0-9_]*\\b' } ] } + + this.normalizeRules(); +}; + +PrologHighlightRules.metaData = { fileTypes: [ 'plg', 'prolog' ], + foldingStartMarker: '(%\\s*region \\w*)|([a-z]\\w*.*:- ?)', + foldingStopMarker: '(%\\s*end(\\s*region)?)|(?=\\.)', + keyEquivalent: '^~P', + name: 'Prolog', + scopeName: 'source.prolog' } + + +oop.inherits(PrologHighlightRules, TextHighlightRules); + +exports.PrologHighlightRules = PrologHighlightRules; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/properties.js b/pitfall/pdfkit/node_modules/brace/mode/properties.js new file mode 100644 index 00000000..a6919fdc --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/properties.js @@ -0,0 +1,100 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/properties', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/properties_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var PropertiesHighlightRules = acequire("./properties_highlight_rules").PropertiesHighlightRules; + +var Mode = function() { + this.HighlightRules = PropertiesHighlightRules; +}; +oop.inherits(Mode, TextMode); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/properties_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var PropertiesHighlightRules = function() { + + var escapeRe = /\\u[0-9a-fA-F]{4}|\\/; + + this.$rules = { + "start" : [ + { + token : "comment", + regex : /[!#].*$/ + }, { + token : "keyword", + regex : /[=:]$/ + }, { + token : "keyword", + regex : /[=:]/, + next : "value" + }, { + token : "constant.language.escape", + regex : escapeRe + }, { + defaultToken: "variable" + } + ], + "value" : [ + { + regex : /\\$/, + token : "string", + next : "value" + }, { + regex : /$/, + token : "string", + next : "start" + }, { + token : "constant.language.escape", + regex : escapeRe + }, { + defaultToken: "string" + } + ] + }; + +}; + +oop.inherits(PropertiesHighlightRules, TextHighlightRules); + +exports.PropertiesHighlightRules = PropertiesHighlightRules; +}); + diff --git a/pitfall/pdfkit/node_modules/brace/mode/protobuf.js b/pitfall/pdfkit/node_modules/brace/mode/protobuf.js new file mode 100644 index 00000000..47b29174 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/protobuf.js @@ -0,0 +1,878 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2012, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * Contributor(s): + * + * Zef Hemel + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/protobuf', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/c_cpp', 'ace/tokenizer', 'ace/mode/protobuf_highlight_rules', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var CMode = acequire("./c_cpp").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var ProtobufHighlightRules = acequire("./protobuf_highlight_rules").ProtobufHighlightRules; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + CMode.call(this); + var highlighter = new ProtobufHighlightRules(); + this.foldingRules = new CStyleFoldMode(); + + this.$tokenizer = new Tokenizer(highlighter.getRules()); + this.$keywordList = highlighter.$keywordList; +}; +oop.inherits(Mode, CMode); + +(function() { + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/c_cpp', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/c_cpp_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var c_cppHighlightRules = acequire("./c_cpp_highlight_rules").c_cppHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = c_cppHighlightRules; + + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } else if (state == "doc-start") { + if (endState == "start") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); +ace.define('ace/mode/c_cpp_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var cFunctions = exports.cFunctions = "\\s*\\bhypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len)))\\b" + +var c_cppHighlightRules = function() { + + var keywordControls = ( + "break|case|continue|default|do|else|for|goto|if|_Pragma|" + + "return|switch|while|catch|operator|try|throw|using" + ); + + var storageType = ( + "asm|__asm__|auto|bool|_Bool|char|_Complex|double|enum|float|" + + "_Imaginary|int|long|short|signed|struct|typedef|union|unsigned|void|" + + "class|wchar_t|template" + ); + + var storageModifiers = ( + "const|extern|register|restrict|static|volatile|inline|private:|" + + "protected:|public:|friend|explicit|virtual|export|mutable|typename" + ); + + var keywordOperators = ( + "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq" + + "const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace" + ); + + var builtinConstants = ( + "NULL|true|false|TRUE|FALSE" + ); + + var keywordMapper = this.$keywords = this.createKeywordMapper({ + "keyword.control" : keywordControls, + "storage.type" : storageType, + "storage.modifier" : storageModifiers, + "keyword.operator" : keywordOperators, + "variable.language": "this", + "constant.language": builtinConstants + }, "identifier"); + + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\d\\$_\u00a1-\uffff]*\\b"; + + this.$rules = { + "start" : [ + { + token : "comment", + regex : "\\/\\/.*$" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // multi line string start + regex : '["].*\\\\$', + next : "qqstring" + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : "string", // multi line string start + regex : "['].*\\\\$", + next : "qstring" + }, { + token : "constant.numeric", // hex + regex : "0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" + }, { + token : "keyword", // pre-compiler directives + regex : "#\\s*(?:include|import|pragma|line|define|undef|if|ifdef|else|elif|ifndef)\\b", + next : "directive" + }, { + token : "keyword", // special case pre-compiler directive + regex : "(?:#\\s*endif)\\b" + }, { + token : "support.function.C99.c", + regex : cFunctions + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator", + regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)" + }, { + token : "punctuation.operator", + regex : "\\?|\\:|\\,|\\;|\\." + }, { + token : "paren.lparen", + regex : "[[({]" + }, { + token : "paren.rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + } + ], + "comment" : [ + { + token : "comment", // closing comment + regex : ".*?\\*\\/", + next : "start" + }, { + token : "comment", // comment spanning whole line + regex : ".+" + } + ], + "qqstring" : [ + { + token : "string", + regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', + next : "start" + }, { + token : "string", + regex : '.+' + } + ], + "qstring" : [ + { + token : "string", + regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", + next : "start" + }, { + token : "string", + regex : '.+' + } + ], + "directive" : [ + { + token : "constant.other.multiline", + regex : /\\/ + }, + { + token : "constant.other.multiline", + regex : /.*\\/ + }, + { + token : "constant.other", + regex : "\\s*<.+?>", + next : "start" + }, + { + token : "constant.other", // single line + regex : '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]', + next : "start" + }, + { + token : "constant.other", // single line + regex : "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']", + next : "start" + }, + { + token : "constant.other", + regex : /[^\\\/]+/, + next : "start" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("start") ]); +}; + +oop.inherits(c_cppHighlightRules, TextHighlightRules); + +exports.c_cppHighlightRules = c_cppHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); +ace.define('ace/mode/protobuf_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + + var oop = acequire("../lib/oop"); + var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + + var ProtobufHighlightRules = function() { + + var builtinTypes = "double|float|int32|int64|uint32|uint64|sint32|" + + "sint64|fixed32|fixed64|sfixed32|sfixed64|bool|" + + "string|bytes"; + var keywordDeclaration = "message|acequired|optional|repeated|package|" + + "import|option|enum"; + + var keywordMapper = this.createKeywordMapper({ + "keyword.declaration.protobuf": keywordDeclaration, + "support.type": builtinTypes + }, "identifier"); + + this.$rules = { + "start": [{ + token: "comment", + regex: /\/\/.*$/ + }, { + token: "comment", + regex: /\/\*/, + next: "comment" + }, { + token: "constant", + regex: "<[^>]+>" + }, { + regex: "=", + token: "keyword.operator.assignment.protobuf" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // single line + regex : '[\'](?:(?:\\\\.)|(?:[^\'\\\\]))*?[\']' + }, { + token: "constant.numeric", // hex + regex: "0[xX][0-9a-fA-F]+\\b" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }], + "comment": [{ + token: "comment", // closing comment + regex: ".*?\\*\\/", + next: "start" + }, { + token: "comment", // comment spanning whole line + regex: ".+" + }] + }; + + this.normalizeRules(); + }; + + oop.inherits(ProtobufHighlightRules, TextHighlightRules); + + exports.ProtobufHighlightRules = ProtobufHighlightRules; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/brace/mode/python.js b/pitfall/pdfkit/node_modules/brace/mode/python.js new file mode 100644 index 00000000..622e8e24 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/python.js @@ -0,0 +1,294 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/python', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/python_highlight_rules', 'ace/mode/folding/pythonic', 'ace/range'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var PythonHighlightRules = acequire("./python_highlight_rules").PythonHighlightRules; +var PythonFoldMode = acequire("./folding/pythonic").FoldMode; +var Range = acequire("../range").Range; + +var Mode = function() { + this.HighlightRules = PythonHighlightRules; + this.foldingRules = new PythonFoldMode("\\:"); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "#"; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start") { + var match = line.match(/^.*[\{\(\[\:]\s*$/); + if (match) { + indent += tab; + } + } + + return indent; + }; + + var outdents = { + "pass": 1, + "return": 1, + "raise": 1, + "break": 1, + "continue": 1 + }; + + this.checkOutdent = function(state, line, input) { + if (input !== "\r\n" && input !== "\r" && input !== "\n") + return false; + + var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens; + + if (!tokens) + return false; + do { + var last = tokens.pop(); + } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/)))); + + if (!last) + return false; + + return (last.type == "keyword" && outdents[last.value]); + }; + + this.autoOutdent = function(state, doc, row) { + + row += 1; + var indent = this.$getIndent(doc.getLine(row)); + var tab = doc.getTabString(); + if (indent.slice(-tab.length) == tab) + doc.remove(new Range(row, indent.length-tab.length, row, indent.length)); + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/python_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var PythonHighlightRules = function() { + + var keywords = ( + "and|as|assert|break|class|continue|def|del|elif|else|except|exec|" + + "finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|" + + "raise|return|try|while|with|yield" + ); + + var builtinConstants = ( + "True|False|None|NotImplemented|Ellipsis|__debug__" + ); + + var builtinFunctions = ( + "abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|" + + "eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|" + + "binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|" + + "float|list|raw_input|unichr|callable|format|locals|reduce|unicode|" + + "chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|" + + "cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|" + + "__import__|complex|hash|min|set|apply|delattr|help|next|setattr|" + + "buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern" + ); + var keywordMapper = this.createKeywordMapper({ + "invalid.deprecated": "debugger", + "support.function": builtinFunctions, + "constant.language": builtinConstants, + "keyword": keywords + }, "identifier"); + + var strPre = "(?:r|u|ur|R|U|UR|Ur|uR)?"; + + var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))"; + var octInteger = "(?:0[oO]?[0-7]+)"; + var hexInteger = "(?:0[xX][\\dA-Fa-f]+)"; + var binInteger = "(?:0[bB][01]+)"; + var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")"; + + var exponent = "(?:[eE][+-]?\\d+)"; + var fraction = "(?:\\.\\d+)"; + var intPart = "(?:\\d+)"; + var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; + var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")"; + var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; + + var stringEscape = "\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})"; + + this.$rules = { + "start" : [ { + token : "comment", + regex : "#.*$" + }, { + token : "string", // multi line """ string start + regex : strPre + '"{3}', + next : "qqstring3" + }, { + token : "string", // " string + regex : strPre + '"(?=.)', + next : "qqstring" + }, { + token : "string", // multi line ''' string start + regex : strPre + "'{3}", + next : "qstring3" + }, { + token : "string", // ' string + regex : strPre + "'(?=.)", + next : "qstring" + }, { + token : "constant.numeric", // imaginary + regex : "(?:" + floatNumber + "|\\d+)[jJ]\\b" + }, { + token : "constant.numeric", // float + regex : floatNumber + }, { + token : "constant.numeric", // long integer + regex : integer + "[lL]\\b" + }, { + token : "constant.numeric", // integer + regex : integer + "\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator", + regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|=" + }, { + token : "paren.lparen", + regex : "[\\[\\(\\{]" + }, { + token : "paren.rparen", + regex : "[\\]\\)\\}]" + }, { + token : "text", + regex : "\\s+" + } ], + "qqstring3" : [ { + token : "constant.language.escape", + regex : stringEscape + }, { + token : "string", // multi line """ string end + regex : '"{3}', + next : "start" + }, { + defaultToken : "string" + } ], + "qstring3" : [ { + token : "constant.language.escape", + regex : stringEscape + }, { + token : "string", // multi line ''' string end + regex : "'{3}", + next : "start" + }, { + defaultToken : "string" + } ], + "qqstring" : [{ + token : "constant.language.escape", + regex : stringEscape + }, { + token : "string", + regex : "\\\\$", + next : "qqstring" + }, { + token : "string", + regex : '"|$', + next : "start" + }, { + defaultToken: "string" + }], + "qstring" : [{ + token : "constant.language.escape", + regex : stringEscape + }, { + token : "string", + regex : "\\\\$", + next : "qstring" + }, { + token : "string", + regex : "'|$", + next : "start" + }, { + defaultToken: "string" + }] + }; +}; + +oop.inherits(PythonHighlightRules, TextHighlightRules); + +exports.PythonHighlightRules = PythonHighlightRules; +}); + +ace.define('ace/mode/folding/pythonic', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(markers) { + this.foldingStartMarker = new RegExp("([\\[{])(?:\\s*)$|(" + markers + ")(?:\\s*)(?:#.*)?$"); +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + if (match[1]) + return this.openingBracketBlock(session, match[1], row, match.index); + if (match[2]) + return this.indentationBlock(session, row, match.index + match[2].length); + return this.indentationBlock(session, row); + } + } + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/r.js b/pitfall/pdfkit/node_modules/brace/mode/r.js new file mode 100644 index 00000000..01aa6be7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/r.js @@ -0,0 +1,336 @@ +/* + * r.js + * + * Copyright (C) 2009-11 by RStudio, Inc. + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * + */ +ace.define('ace/mode/r', ["require", 'exports', 'module' , 'ace/range', 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/text_highlight_rules', 'ace/mode/r_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/unicode'], function(acequire, exports, module) { + + + var Range = acequire("../range").Range; + var oop = acequire("../lib/oop"); + var TextMode = acequire("./text").Mode; + var Tokenizer = acequire("../tokenizer").Tokenizer; + var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + var RHighlightRules = acequire("./r_highlight_rules").RHighlightRules; + var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; + var unicode = acequire("../unicode"); + + var Mode = function() + { + this.HighlightRules = RHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + }; + oop.inherits(Mode, TextMode); + + (function() + { + this.lineCommentStart = "#"; + }).call(Mode.prototype); + exports.Mode = Mode; +}); +ace.define('ace/mode/r_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules', 'ace/mode/tex_highlight_rules'], function(acequire, exports, module) { + + var oop = acequire("../lib/oop"); + var lang = acequire("../lib/lang"); + var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + var TexHighlightRules = acequire("./tex_highlight_rules").TexHighlightRules; + + var RHighlightRules = function() + { + + var keywords = lang.arrayToMap( + ("function|if|in|break|next|repeat|else|for|return|switch|while|try|tryCatch|stop|warning|acequire|library|attach|detach|source|setMethod|setGeneric|setGroupGeneric|setClass") + .split("|") + ); + + var buildinConstants = lang.arrayToMap( + ("NULL|NA|TRUE|FALSE|T|F|Inf|NaN|NA_integer_|NA_real_|NA_character_|" + + "NA_complex_").split("|") + ); + + this.$rules = { + "start" : [ + { + token : "comment.sectionhead", + regex : "#+(?!').*(?:----|====|####)\\s*$" + }, + { + token : "comment", + regex : "#+'", + next : "rd-start" + }, + { + token : "comment", + regex : "#.*$" + }, + { + token : "string", // multi line string start + regex : '["]', + next : "qqstring" + }, + { + token : "string", // multi line string start + regex : "[']", + next : "qstring" + }, + { + token : "constant.numeric", // hex + regex : "0[xX][0-9a-fA-F]+[Li]?\\b" + }, + { + token : "constant.numeric", // explicit integer + regex : "\\d+L\\b" + }, + { + token : "constant.numeric", // number + regex : "\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b" + }, + { + token : "constant.numeric", // number with leading decimal + regex : "\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b" + }, + { + token : "constant.language.boolean", + regex : "(?:TRUE|FALSE|T|F)\\b" + }, + { + token : "identifier", + regex : "`.*?`" + }, + { + onMatch : function(value) { + if (keywords[value]) + return "keyword"; + else if (buildinConstants[value]) + return "constant.language"; + else if (value == '...' || value.match(/^\.\.\d+$/)) + return "variable.language"; + else + return "identifier"; + }, + regex : "[a-zA-Z.][a-zA-Z0-9._]*\\b" + }, + { + token : "keyword.operator", + regex : "%%|>=|<=|==|!=|\\->|<\\-|\\|\\||&&|=|\\+|\\-|\\*|/|\\^|>|<|!|&|\\||~|\\$|:" + }, + { + token : "keyword.operator", // infix operators + regex : "%.*?%" + }, + { + token : "paren.keyword.operator", + regex : "[[({]" + }, + { + token : "paren.keyword.operator", + regex : "[\\])}]" + }, + { + token : "text", + regex : "\\s+" + } + ], + "qqstring" : [ + { + token : "string", + regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', + next : "start" + }, + { + token : "string", + regex : '.+' + } + ], + "qstring" : [ + { + token : "string", + regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", + next : "start" + }, + { + token : "string", + regex : '.+' + } + ] + }; + + var rdRules = new TexHighlightRules("comment").getRules(); + for (var i = 0; i < rdRules["start"].length; i++) { + rdRules["start"][i].token += ".virtual-comment"; + } + + this.addRules(rdRules, "rd-"); + this.$rules["rd-start"].unshift({ + token: "text", + regex: "^", + next: "start" + }); + this.$rules["rd-start"].unshift({ + token : "keyword", + regex : "@(?!@)[^ ]*" + }); + this.$rules["rd-start"].unshift({ + token : "comment", + regex : "@@" + }); + this.$rules["rd-start"].push({ + token : "comment", + regex : "[^%\\\\[({\\])}]+" + }); + }; + + oop.inherits(RHighlightRules, TextHighlightRules); + + exports.RHighlightRules = RHighlightRules; +}); +ace.define('ace/mode/tex_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var TexHighlightRules = function(textClass) { + + if (!textClass) + textClass = "text"; + + this.$rules = { + "start" : [ + { + token : "comment", + regex : "%.*$" + }, { + token : textClass, // non-command + regex : "\\\\[$&%#\\{\\}]" + }, { + token : "keyword", // command + regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b", + next : "nospell" + }, { + token : "keyword", // command + regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])" + }, { + token : "paren.keyword.operator", + regex : "[[({]" + }, { + token : "paren.keyword.operator", + regex : "[\\])}]" + }, { + token : textClass, + regex : "\\s+" + } + ], + "nospell" : [ + { + token : "comment", + regex : "%.*$", + next : "start" + }, { + token : "nospell." + textClass, // non-command + regex : "\\\\[$&%#\\{\\}]" + }, { + token : "keyword", // command + regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b" + }, { + token : "keyword", // command + regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])", + next : "start" + }, { + token : "paren.keyword.operator", + regex : "[[({]" + }, { + token : "paren.keyword.operator", + regex : "[\\])]" + }, { + token : "paren.keyword.operator", + regex : "}", + next : "start" + }, { + token : "nospell." + textClass, + regex : "\\s+" + }, { + token : "nospell." + textClass, + regex : "\\w+" + } + ] + }; +}; + +oop.inherits(TexHighlightRules, TextHighlightRules); + +exports.TexHighlightRules = TexHighlightRules; +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/rdoc.js b/pitfall/pdfkit/node_modules/brace/mode/rdoc.js new file mode 100644 index 00000000..3855c7f3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/rdoc.js @@ -0,0 +1,209 @@ +/* + * rdoc.js + * + * Copyright (C) 2009-11 by RStudio, Inc. + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * + */ +ace.define('ace/mode/rdoc', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/text_highlight_rules', 'ace/mode/rdoc_highlight_rules', 'ace/mode/matching_brace_outdent'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var RDocHighlightRules = acequire("./rdoc_highlight_rules").RDocHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; + +var Mode = function(suppressHighlighting) { + this.HighlightRules = RDocHighlightRules; + this.$outdent = new MatchingBraceOutdent(); +}; +oop.inherits(Mode, TextMode); + +(function() { + this.getNextLineIndent = function(state, line, tab) { + return this.$getIndent(line); + }; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); +ace.define('ace/mode/rdoc_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules', 'ace/mode/latex_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var LaTeXHighlightRules = acequire("./latex_highlight_rules"); + +var RDocHighlightRules = function() { + + this.$rules = { + "start" : [ + { + token : "comment", + regex : "%.*$" + }, { + token : "text", // non-command + regex : "\\\\[$&%#\\{\\}]" + }, { + token : "keyword", // command + regex : "\\\\(?:name|alias|method|S3method|S4method|item|code|preformatted|kbd|pkg|var|env|option|command|author|email|url|source|cite|acronym|href|code|preformatted|link|eqn|deqn|keyword|usage|examples|dontrun|dontshow|figure|if|ifelse|Sexpr|RdOpts|inputencoding|usepackage)\\b", + next : "nospell" + }, { + token : "keyword", // command + regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])" + }, { + token : "paren.keyword.operator", + regex : "[[({]" + }, { + token : "paren.keyword.operator", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + } + ], + "nospell" : [ + { + token : "comment", + regex : "%.*$", + next : "start" + }, { + token : "nospell.text", // non-command + regex : "\\\\[$&%#\\{\\}]" + }, { + token : "keyword", // command + regex : "\\\\(?:name|alias|method|S3method|S4method|item|code|preformatted|kbd|pkg|var|env|option|command|author|email|url|source|cite|acronym|href|code|preformatted|link|eqn|deqn|keyword|usage|examples|dontrun|dontshow|figure|if|ifelse|Sexpr|RdOpts|inputencoding|usepackage)\\b" + }, { + token : "keyword", // command + regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])", + next : "start" + }, { + token : "paren.keyword.operator", + regex : "[[({]" + }, { + token : "paren.keyword.operator", + regex : "[\\])]" + }, { + token : "paren.keyword.operator", + regex : "}", + next : "start" + }, { + token : "nospell.text", + regex : "\\s+" + }, { + token : "nospell.text", + regex : "\\w+" + } + ] + }; +}; + +oop.inherits(RDocHighlightRules, TextHighlightRules); + +exports.RDocHighlightRules = RDocHighlightRules; +}); +ace.define('ace/mode/latex_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var LatexHighlightRules = function() { + this.$rules = { + "start" : [{ + token : "keyword", + regex : "\\\\(?:[^a-zA-Z]|[a-zA-Z]+)" + }, { + token : "lparen", + regex : "[[({]" + }, { + token : "rparen", + regex : "[\\])}]" + }, { + token : "string", + regex : "\\$(?:(?:\\\\.)|(?:[^\\$\\\\]))*?\\$" + }, { + token : "comment", + regex : "%.*$" + }] + }; +}; + +oop.inherits(LatexHighlightRules, TextHighlightRules); + +exports.LatexHighlightRules = LatexHighlightRules; + +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/rhtml.js b/pitfall/pdfkit/node_modules/brace/mode/rhtml.js new file mode 100644 index 00000000..c6c8100a --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/rhtml.js @@ -0,0 +1,2654 @@ +/* + * rhtml.js + * + * Copyright (C) 2009-11 by RStudio, Inc. + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + */ + +ace.define('ace/mode/rhtml', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/html', 'ace/tokenizer', 'ace/mode/rhtml_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var HtmlMode = acequire("./html").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; + +var RHtmlHighlightRules = acequire("./rhtml_highlight_rules").RHtmlHighlightRules; + +var Mode = function(doc, session) { + this.$session = session; + this.HighlightRules = RHtmlHighlightRules; +}; +oop.inherits(Mode, HtmlMode); + +(function() { + this.insertChunkInfo = { + value: "\n", + position: {row: 0, column: 15} + }; + + this.getLanguageMode = function(position) + { + return this.$session.getState(position.row).match(/^r-/) ? 'R' : 'HTML'; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/html', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/css', 'ace/tokenizer', 'ace/mode/html_highlight_rules', 'ace/mode/behaviour/html', 'ace/mode/folding/html', 'ace/mode/html_completions'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var JavaScriptMode = acequire("./javascript").Mode; +var CssMode = acequire("./css").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var HtmlHighlightRules = acequire("./html_highlight_rules").HtmlHighlightRules; +var HtmlBehaviour = acequire("./behaviour/html").HtmlBehaviour; +var HtmlFoldMode = acequire("./folding/html").FoldMode; +var HtmlCompletions = acequire("./html_completions").HtmlCompletions; + +var Mode = function() { + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new HtmlBehaviour(); + this.$completer = new HtmlCompletions(); + + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + + this.foldingRules = new HtmlFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.blockComment = {start: ""}; + + this.getNextLineIndent = function(state, line, tab) { + return this.$getIndent(line); + }; + + this.checkOutdent = function(state, line, input) { + return false; + }; + + this.getCompletions = function(state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/javascript', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = JavaScriptHighlightRules; + + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/javascript"), "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + + worker.on("jslint", function(results) { + session.setAnnotations(results.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/javascript_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var JavaScriptHighlightRules = function() { + var keywordMapper = this.createKeywordMapper({ + "variable.language": + "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document" , // Pseudo + "keyword": + "const|yield|import|get|set|" + + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", + "storage.type": + "const|let|var|function", + "constant.language": + "null|Infinity|NaN|undefined", + "support.function": + "alert", + "constant.language.boolean": "true|false" + }, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; + + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-6][0-7]?|" + // oct + "37[0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + + this.$rules = { + "no_regex" : [ + { + token : "comment", + regex : "\\/\\/", + next : "line_comment" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : /\/\*/, + next : "comment" + }, { + token : "string", + regex : "'(?=.)", + next : "qstring" + }, { + token : "string", + regex : '"(?=.)', + next : "qqstring" + }, { + token : "constant.numeric", // hex + regex : /0[xX][0-9a-fA-F]+\b/ + }, { + token : "constant.numeric", // float + regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ + }, { + token : [ + "storage.type", "punctuation.operator", "support.function", + "punctuation.operator", "entity.name.function", "text","keyword.operator" + ], + regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "paren.lparen" + ], + regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "text", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : "keyword", + regex : "(?:" + kwBeforeRe + ")\\b", + next : "start" + }, { + token : ["punctuation.operator", "support.function"], + regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token : ["punctuation.operator", "support.function.dom"], + regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token : ["punctuation.operator", "support.constant"], + regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token : ["storage.type", "punctuation.operator", "support.function.firebug"], + regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/ + }, { + token : keywordMapper, + regex : identifierRe + }, { + token : "keyword.operator", + regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, + next : "start" + }, { + token : "punctuation.operator", + regex : /\?|\:|\,|\;|\./, + next : "start" + }, { + token : "paren.lparen", + regex : /[\[({]/, + next : "start" + }, { + token : "paren.rparen", + regex : /[\])}]/ + }, { + token : "keyword.operator", + regex : /\/=?/, + next : "start" + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment_regex_allowed" + }, { + token : "comment", + regex : "\\/\\/", + next : "line_comment_regex_allowed" + }, { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token : "text", + regex : "\\s+|^$", + next : "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/\\w*", + next: "no_regex" + }, { + token : "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token : "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/ + }, { + token : "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "function_arguments": [ + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "[, ]+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "comment_regex_allowed" : [ + {token : "comment", regex : "\\*\\/", next : "start"}, + {defaultToken : "comment"} + ], + "comment" : [ + {token : "comment", regex : "\\*\\/", next : "no_regex"}, + {defaultToken : "comment"} + ], + "line_comment_regex_allowed" : [ + {token : "comment", regex : "$|^", next : "start"}, + {defaultToken : "comment"} + ], + "line_comment" : [ + {token : "comment", regex : "$|^", next : "no_regex"}, + {defaultToken : "comment"} + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qqstring" + }, { + token : "string", + regex : '"|$', + next : "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qstring" + }, { + token : "string", + regex : "'|$", + next : "no_regex" + }, { + defaultToken: "string" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("no_regex") ]); +}; + +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); + +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); + +ace.define('ace/mode/css', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/behaviour/css', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var CssHighlightRules = acequire("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var CssBehaviour = acequire("./behaviour/css").CssBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.foldingRules = "cStyle"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/css"), "Worker"); + worker.attachToDocument(session.getDocument()); + + worker.on("csslint", function(e) { + session.setAnnotations(e.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; + +}); + +ace.define('ace/mode/css_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; + +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|acequired|root|target|valid|visited)\\b"; + +var CssHighlightRules = function() { + + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + + this.$rules = { + "start" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "@.*?{", + push: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "media" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "\\}", + next: "pop" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "comment" : [{ + token : "comment", + regex : "\\*\\/", + next : "pop" + }, { + defaultToken : "comment" + }], + + "ruleset" : [ + { + token : "paren.rparen", + regex : "\\}", + next: "pop" + }, { + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : ["constant.numeric", "keyword"], + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + }, { + token : "constant.numeric", + regex : numRe + }, { + token : "constant.numeric", // hex6 color + regex : "#[a-f0-9]{6}" + }, { + token : "constant.numeric", // hex3 color + regex : "#[a-f0-9]{3}" + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex : pseudoElements + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex : pseudoClasses + }, { + token : ["support.function", "string", "support.function"], + regex : "(url\\()(.*)(\\))" + }, { + token : keywordMapper, + regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + caseInsensitive: true + }] + }; + + this.normalizeRules(); +}; + +oop.inherits(CssHighlightRules, TextHighlightRules); + +exports.CssHighlightRules = CssHighlightRules; + +}); + +ace.define('ace/mode/behaviour/css', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + +var CssBehaviour = function () { + + this.inherit(CstyleBehaviour); + + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + } + } + if (!line.substring(cursor.column).match(/^\s*;/)) { + return { + text: ':;', + selection: [1, 1] + } + } + } + } + }); + + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column ++; + return range; + } + } + } + }); + + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + } + } + } + }); + +} +oop.inherits(CssBehaviour, CstyleBehaviour); + +exports.CssBehaviour = CssBehaviour; +}); + +ace.define('ace/mode/html_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var CssHighlightRules = acequire("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = acequire("./xml_highlight_rules").XmlHighlightRules; + +var tagMap = lang.createMap({ + a : 'anchor', + button : 'form', + form : 'form', + img : 'image', + input : 'form', + label : 'form', + option : 'form', + script : 'script', + select : 'form', + textarea : 'form', + style : 'style', + table : 'table', + tbody : 'table', + td : 'table', + tfoot : 'table', + th : 'table', + tr : 'table' +}); + +var HtmlHighlightRules = function() { + XmlHighlightRules.call(this); + + this.addRules({ + attributes: [{ + include : "space" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "keyword.operator.separator", + regex : "=", + push : [{ + include: "space" + }, { + token : "string", + regex : "[^<>='\"`\\s]+", + next : "pop" + }, { + token : "empty", + regex : "", + next : "pop" + }] + }, { + include : "string" + }], + tag: [{ + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation.begin", + "meta.tag.name" + (group ? "." + group : "")]; + }, + regex : "(<)([-_a-zA-Z0-9:]+)", + next: "start_tag_stuff" + }, { + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation.begin", + "meta.tag.name" + (group ? "." + group : "")]; + }, + regex : "(", next : "start"} + ], + end_tag_stuff: [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next : "start"} + ] + }); + + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); + + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; + +oop.inherits(HtmlHighlightRules, XmlHighlightRules); + +exports.HtmlHighlightRules = HtmlHighlightRules; +}); + +ace.define('ace/mode/xml_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var xmlUtil = acequire("./xml_util"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var XmlHighlightRules = function(normalize) { + this.$rules = { + start : [ + {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"}, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration" + }, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction" + }, + {token : "comment", regex : "<\\!--", next : "comment"}, + { + token : ["punctuation.doctype.begin", "meta.tag.doctype"], + regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype" + }, + {include : "tag"}, + {include : "reference"} + ], + + xml_declaration : [ + {include : "attributes"}, + {include : "instruction"} + ], + + instruction : [ + {token : "punctuation.instruction.end", regex : "\\?>", next : "start"} + ], + + doctype : [ + {include : "space"}, + {include : "string"}, + {token : "punctuation.doctype.end", regex : ">", next : "start"}, + {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"}, + {token : "punctuation.begin", regex : "\\[", push : "declarations"} + ], + + declarations : [{ + token : "text", + regex : "\\s+" + }, { + token: "punctuation.end", + regex: "]", + next: "pop" + }, { + token : ["punctuation.begin", "keyword"], + regex : "(<\\!)([-_a-zA-Z0-9]+)", + push : [{ + token : "text", + regex : "\\s+" + }, + { + token : "punctuation.end", + regex : ">", + next : "pop" + }, + {include : "string"}] + }], + + cdata : [ + {token : "string.end", regex : "\\]\\]>", next : "start"}, + {token : "text", regex : "\\s+"}, + {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"} + ], + + comment : [ + {token : "comment", regex : "-->", next : "start"}, + {defaultToken : "comment"} + ], + + tag : [{ + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)", + next: [ + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"} + ] + }, { + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(", next : "start"} + ] + }], + + space : [ + {token : "text", regex : "\\s+"} + ], + + reference : [{ + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, { + token : "invalid.illegal", regex : "&" + }], + + string: [{ + token : "string", + regex : "'", + push : "qstring_inner" + }, { + token : "string", + regex : '"', + push : "qqstring_inner" + }], + + qstring_inner: [ + {token : "string", regex: "'", next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + qqstring_inner: [ + {token : "string", regex: '"', next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + attributes: [{ + token : "entity.other.attribute-name", + regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" + }, { + token : "keyword.operator.separator", + regex : "=" + }, { + include : "space" + }, { + include : "string" + }] + }; + + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; + + +(function() { + + this.embedTagRules = function(HighlightRules, prefix, tag){ + this.$rules.tag.unshift({ + token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(<)(" + tag + ")", + next: [ + {include : "space"}, + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"} + ] + }); + + this.$rules[tag + "-end"] = [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next: "start", + onMatch : function(value, currentState, stack) { + stack.splice(0); + return this.token; + }} + ] + + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(" + }]); + }; + +}).call(TextHighlightRules.prototype); + +oop.inherits(XmlHighlightRules, TextHighlightRules); + +exports.XmlHighlightRules = XmlHighlightRules; +}); + +ace.define('ace/mode/xml_util', ["require", 'exports', 'module' ], function(acequire, exports, module) { + + +function string(state) { + return [{ + token : "string", + regex : '"', + next : state + "_qqstring" + }, { + token : "string", + regex : "'", + next : state + "_qstring" + }]; +} + +function multiLineString(quote, state) { + return [ + {token : "string", regex : quote, next : state}, + { + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, + {defaultToken : "string"} + ]; +} + +exports.tag = function(states, name, nextState, tagMap) { + states[name] = [{ + token : "text", + regex : "\\s+" + }, { + + token : !tagMap ? "meta.tag.tag-name" : function(value) { + if (tagMap[value]) + return "meta.tag.tag-name." + tagMap[value]; + else + return "meta.tag.tag-name"; + }, + regex : "[-_a-zA-Z0-9:]+", + next : name + "_embed_attribute_list" + }, { + token: "empty", + regex: "", + next : name + "_embed_attribute_list" + }]; + + states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list"); + states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list"); + + states[name + "_embed_attribute_list"] = [{ + token : "meta.tag.r", + regex : "/?>", + next : nextState + }, { + token : "keyword.operator", + regex : "=" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "text", + regex : "\\s+" + }].concat(string(name)); +}; + +}); + +ace.define('ace/mode/behaviour/html', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour/xml', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var XmlBehaviour = acequire("../behaviour/xml").XmlBehaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var voidElements = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr']; + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); + return hasType; +} + +var HtmlBehaviour = function () { + + this.inherit(XmlBehaviour); // Get xml behaviour + + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getCursorPosition(); + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken(); + + if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column) + return; + var atCursor = false; + if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text'))); + } else { + atCursor = true; + } + if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) { + return; + } + var element = token.value; + if (atCursor){ + var element = element.substring(0, position.column - token.start); + } + if (voidElements.indexOf(element) !== -1){ + return; + } + return { + text: '>' + '', + selection: [1, 1] + } + } + }); +} +oop.inherits(HtmlBehaviour, XmlBehaviour); + +exports.HtmlBehaviour = HtmlBehaviour; +}); + +ace.define('ace/mode/behaviour/xml', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); + return hasType; +} + +var XmlBehaviour = function () { + + this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour + + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getCursorPosition(); + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken(); + + if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column) + return; + var atCursor = false; + if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text'))); + } else { + atCursor = true; + } + if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) { + return; + } + var tag = token.value; + if (atCursor){ + var tag = tag.substring(0, position.column - token.start); + } + + return { + text: '>' + '', + selection: [1, 1] + } + } + }); + + this.add('autoindent', 'insertion', function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var rightChars = line.substring(cursor.column, cursor.column + 2); + if (rightChars == '?)/; + this._parseTag = function(tag) { + + var match = tag.match(this.tagRe); + var column = 0; + + return { + value: tag, + match: match ? match[2] : "", + closing: match ? !!match[3] : false, + selfClosing: match ? !!match[5] || match[2] == "/>" : false, + tagName: match ? match[4] : "", + column: match[1] ? column + match[1].length : column + }; + }; + this._readTagForward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var value = ""; + var start; + + do { + if (token.type.lastIndexOf("meta.tag", 0) === 0) { + if (!start) { + var start = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + }; + } + value += token.value; + if (value.indexOf(">") !== -1) { + var tag = this._parseTag(value); + tag.start = start; + tag.end = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + token.value.length + }; + iterator.stepForward(); + return tag; + } + } + } while(token = iterator.stepForward()); + + return null; + }; + + this._readTagBackward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var value = ""; + var end; + + do { + if (token.type.lastIndexOf("meta.tag", 0) === 0) { + if (!end) { + end = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + token.value.length + }; + } + value = token.value + value; + if (value.indexOf("<") !== -1) { + var tag = this._parseTag(value); + tag.end = end; + tag.start = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + }; + iterator.stepBackward(); + return tag; + } + } + } while(token = iterator.stepBackward()); + + return null; + }; + + this._pop = function(stack, tag) { + while (stack.length) { + + var top = stack[stack.length-1]; + if (!tag || top.tagName == tag.tagName) { + return stack.pop(); + } + else if (this.voidElements[tag.tagName]) { + return; + } + else if (this.voidElements[top.tagName]) { + stack.pop(); + continue; + } else { + return null; + } + } + }; + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + + if (!firstTag.match) + return null; + + var isBackward = firstTag.closing || firstTag.selfClosing; + var stack = []; + var tag; + + if (!isBackward) { + var iterator = new TokenIterator(session, row, firstTag.column); + var start = { + row: row, + column: firstTag.column + firstTag.tagName.length + 2 + }; + while (tag = this._readTagForward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) + return Range.fromPoints(start, tag.start); + } + else { + stack.push(tag) + } + } + } + else { + var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length); + var end = { + row: row, + column: firstTag.column + }; + + while (tag = this._readTagBackward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (!tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) { + tag.start.column += tag.tagName.length + 2; + return Range.fromPoints(tag.start, end); + } + } + else { + stack.push(tag) + } + } + } + + }; + +}).call(FoldMode.prototype); + +}); + +ace.define('ace/mode/html_completions', ["require", 'exports', 'module' , 'ace/token_iterator'], function(acequire, exports, module) { + + +var TokenIterator = acequire("../token_iterator").TokenIterator; + +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; + +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; + +var globalAttributes = commonAttributes.concat(eventAttributes); + +var attributeMap = { + "html": ["manifest"], + "head": [], + "title": [], + "base": ["href", "target"], + "link": ["href", "hreflang", "rel", "media", "type", "sizes"], + "meta": ["http-equiv", "name", "content", "charset"], + "style": ["type", "media", "scoped"], + "script": ["charset", "type", "src", "defer", "async"], + "noscript": ["href"], + "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"], + "section": [], + "nav": [], + "article": ["pubdate"], + "aside": [], + "h1": [], + "h2": [], + "h3": [], + "h4": [], + "h5": [], + "h6": [], + "header": [], + "footer": [], + "address": [], + "main": [], + "p": [], + "hr": [], + "pre": [], + "blockquote": ["cite"], + "ol": ["start", "reversed"], + "ul": [], + "li": ["value"], + "dl": [], + "dt": [], + "dd": [], + "figure": [], + "figcaption": [], + "div": [], + "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"], + "em": [], + "strong": [], + "small": [], + "s": [], + "cite": [], + "q": ["cite"], + "dfn": [], + "abbr": [], + "data": [], + "time": ["datetime"], + "code": [], + "var": [], + "samp": [], + "kbd": [], + "sub": [], + "sup": [], + "i": [], + "b": [], + "u": [], + "mark": [], + "ruby": [], + "rt": [], + "rp": [], + "bdi": [], + "bdo": [], + "span": [], + "br": [], + "wbr": [], + "ins": ["cite", "datetime"], + "del": ["cite", "datetime"], + "img": ["alt", "src", "height", "width", "usemap", "ismap"], + "iframe": ["name", "src", "height", "width", "sandbox", "seamless"], + "embed": ["src", "height", "width", "type"], + "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"], + "param": ["name", "value"], + "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"], + "audio": ["src", "autobuffer", "autoplay", "loop", "controls"], + "source": ["src", "type", "media"], + "track": ["kind", "src", "srclang", "label", "default"], + "canvas": ["width", "height"], + "map": ["name"], + "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"], + "svg": [], + "math": [], + "table": ["summary"], + "caption": [], + "colgroup": ["span"], + "col": ["span"], + "tbody": [], + "thead": [], + "tfoot": [], + "tr": [], + "td": ["headers", "rowspan", "colspan"], + "th": ["headers", "rowspan", "colspan", "scope"], + "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"], + "fieldset": ["disabled", "form", "name"], + "legend": [], + "label": ["form", "for"], + "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "acequired", "size", "src", "step", "width", "files", "value"], + "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"], + "select": ["autofocus", "disabled", "form", "multiple", "name", "size"], + "datalist": [], + "optgroup": ["disabled", "label"], + "option": ["disabled", "selected", "label", "value"], + "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "acequired", "rows", "cols", "wrap"], + "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"], + "output": ["for", "form", "name"], + "progress": ["value", "max"], + "meter": ["value", "min", "max", "low", "high", "optimum"], + "details": ["open"], + "summary": [], + "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"], + "menu": ["type", "label"], + "dialog": ["open"] +}; + +var allElements = Object.keys(attributeMap); + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); +} + +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + if (!token || !hasType(token, 'tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'operator') || hasType(token, 'attribute-name') || hasType(token, 'text'))); + } + if (token && hasType(token, 'tag-name') && !iterator.stepBackward().value.match('/')) + return token.value; +} + +var HtmlCompletions = function() { + +}; + +(function() { + + this.getCompletions = function(state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + + if (!token) + return []; + if (hasType(token, "tag-name") || (token.value == '<' && hasType(token, "text"))) + return this.getTagCompletions(state, session, pos, prefix); + if (hasType(token, 'text') || hasType(token, 'attribute-name')) + return this.getAttributeCompetions(state, session, pos, prefix); + + return []; + }; + + this.getTagCompletions = function(state, session, pos, prefix) { + var elements = allElements; + if (prefix) { + elements = elements.filter(function(element){ + return element.indexOf(prefix) === 0; + }); + } + return elements.map(function(element){ + return { + value: element, + meta: "tag" + }; + }); + }; + + this.getAttributeCompetions = function(state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(attributeMap[tagName]); + } + if (prefix) { + attributes = attributes.filter(function(attribute){ + return attribute.indexOf(prefix) === 0; + }); + } + return attributes.map(function(attribute){ + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute" + }; + }); + }; + +}).call(HtmlCompletions.prototype); + +exports.HtmlCompletions = HtmlCompletions; +}); +ace.define('ace/mode/rhtml_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/r_highlight_rules', 'ace/mode/html_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var RHighlightRules = acequire("./r_highlight_rules").RHighlightRules; +var HtmlHighlightRules = acequire("./html_highlight_rules").HtmlHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var RHtmlHighlightRules = function() { + HtmlHighlightRules.call(this); + + this.$rules["start"].unshift({ + token: "support.function.codebegin", + regex: "^<" + "!--\\s*begin.rcode\\s*(?:.*)", + next: "r-start" + }); + + this.embedRules(RHighlightRules, "r-", [{ + token: "support.function.codeend", + regex: "^\\s*end.rcode\\s*-->", + next: "start" + }], ["start"]); + + this.normalizeRules(); +}; +oop.inherits(RHtmlHighlightRules, TextHighlightRules); + +exports.RHtmlHighlightRules = RHtmlHighlightRules; +}); +ace.define('ace/mode/r_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules', 'ace/mode/tex_highlight_rules'], function(acequire, exports, module) { + + var oop = acequire("../lib/oop"); + var lang = acequire("../lib/lang"); + var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + var TexHighlightRules = acequire("./tex_highlight_rules").TexHighlightRules; + + var RHighlightRules = function() + { + + var keywords = lang.arrayToMap( + ("function|if|in|break|next|repeat|else|for|return|switch|while|try|tryCatch|stop|warning|acequire|library|attach|detach|source|setMethod|setGeneric|setGroupGeneric|setClass") + .split("|") + ); + + var buildinConstants = lang.arrayToMap( + ("NULL|NA|TRUE|FALSE|T|F|Inf|NaN|NA_integer_|NA_real_|NA_character_|" + + "NA_complex_").split("|") + ); + + this.$rules = { + "start" : [ + { + token : "comment.sectionhead", + regex : "#+(?!').*(?:----|====|####)\\s*$" + }, + { + token : "comment", + regex : "#+'", + next : "rd-start" + }, + { + token : "comment", + regex : "#.*$" + }, + { + token : "string", // multi line string start + regex : '["]', + next : "qqstring" + }, + { + token : "string", // multi line string start + regex : "[']", + next : "qstring" + }, + { + token : "constant.numeric", // hex + regex : "0[xX][0-9a-fA-F]+[Li]?\\b" + }, + { + token : "constant.numeric", // explicit integer + regex : "\\d+L\\b" + }, + { + token : "constant.numeric", // number + regex : "\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b" + }, + { + token : "constant.numeric", // number with leading decimal + regex : "\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b" + }, + { + token : "constant.language.boolean", + regex : "(?:TRUE|FALSE|T|F)\\b" + }, + { + token : "identifier", + regex : "`.*?`" + }, + { + onMatch : function(value) { + if (keywords[value]) + return "keyword"; + else if (buildinConstants[value]) + return "constant.language"; + else if (value == '...' || value.match(/^\.\.\d+$/)) + return "variable.language"; + else + return "identifier"; + }, + regex : "[a-zA-Z.][a-zA-Z0-9._]*\\b" + }, + { + token : "keyword.operator", + regex : "%%|>=|<=|==|!=|\\->|<\\-|\\|\\||&&|=|\\+|\\-|\\*|/|\\^|>|<|!|&|\\||~|\\$|:" + }, + { + token : "keyword.operator", // infix operators + regex : "%.*?%" + }, + { + token : "paren.keyword.operator", + regex : "[[({]" + }, + { + token : "paren.keyword.operator", + regex : "[\\])}]" + }, + { + token : "text", + regex : "\\s+" + } + ], + "qqstring" : [ + { + token : "string", + regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', + next : "start" + }, + { + token : "string", + regex : '.+' + } + ], + "qstring" : [ + { + token : "string", + regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", + next : "start" + }, + { + token : "string", + regex : '.+' + } + ] + }; + + var rdRules = new TexHighlightRules("comment").getRules(); + for (var i = 0; i < rdRules["start"].length; i++) { + rdRules["start"][i].token += ".virtual-comment"; + } + + this.addRules(rdRules, "rd-"); + this.$rules["rd-start"].unshift({ + token: "text", + regex: "^", + next: "start" + }); + this.$rules["rd-start"].unshift({ + token : "keyword", + regex : "@(?!@)[^ ]*" + }); + this.$rules["rd-start"].unshift({ + token : "comment", + regex : "@@" + }); + this.$rules["rd-start"].push({ + token : "comment", + regex : "[^%\\\\[({\\])}]+" + }); + }; + + oop.inherits(RHighlightRules, TextHighlightRules); + + exports.RHighlightRules = RHighlightRules; +}); +ace.define('ace/mode/tex_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var TexHighlightRules = function(textClass) { + + if (!textClass) + textClass = "text"; + + this.$rules = { + "start" : [ + { + token : "comment", + regex : "%.*$" + }, { + token : textClass, // non-command + regex : "\\\\[$&%#\\{\\}]" + }, { + token : "keyword", // command + regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b", + next : "nospell" + }, { + token : "keyword", // command + regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])" + }, { + token : "paren.keyword.operator", + regex : "[[({]" + }, { + token : "paren.keyword.operator", + regex : "[\\])}]" + }, { + token : textClass, + regex : "\\s+" + } + ], + "nospell" : [ + { + token : "comment", + regex : "%.*$", + next : "start" + }, { + token : "nospell." + textClass, // non-command + regex : "\\\\[$&%#\\{\\}]" + }, { + token : "keyword", // command + regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b" + }, { + token : "keyword", // command + regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])", + next : "start" + }, { + token : "paren.keyword.operator", + regex : "[[({]" + }, { + token : "paren.keyword.operator", + regex : "[\\])]" + }, { + token : "paren.keyword.operator", + regex : "}", + next : "start" + }, { + token : "nospell." + textClass, + regex : "\\s+" + }, { + token : "nospell." + textClass, + regex : "\\w+" + } + ] + }; +}; + +oop.inherits(TexHighlightRules, TextHighlightRules); + +exports.TexHighlightRules = TexHighlightRules; +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/ruby.js b/pitfall/pdfkit/node_modules/brace/mode/ruby.js new file mode 100644 index 00000000..db3f30f7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/ruby.js @@ -0,0 +1,443 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/ruby', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/ruby_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/folding/coffee'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var RubyHighlightRules = acequire("./ruby_highlight_rules").RubyHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; +var FoldMode = acequire("./folding/coffee").FoldMode; + +var Mode = function() { + this.HighlightRules = RubyHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + + this.lineCommentStart = "#"; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + var startingClassOrMethod = line.match(/^\s*(class|def)\s.*$/); + var startingDoBlock = line.match(/.*do(\s*|\s+\|.*\|\s*)$/); + var startingConditional = line.match(/^\s*(if|else)\s*/) + if (match || startingClassOrMethod || startingDoBlock || startingConditional) { + indent += tab; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return /^\s+end$/.test(line + input) || /^\s+}$/.test(line + input) || /^\s+else$/.test(line + input); + }; + + this.autoOutdent = function(state, doc, row) { + var indent = this.$getIndent(doc.getLine(row)); + var tab = doc.getTabString(); + if (indent.slice(-tab.length) == tab) + doc.remove(new Range(row, indent.length-tab.length, row, indent.length)); + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/ruby_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var constantOtherSymbol = exports.constantOtherSymbol = { + token : "constant.other.symbol.ruby", // symbol + regex : "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?" +}; + +var qString = exports.qString = { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" +}; + +var qqString = exports.qqString = { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' +}; + +var tString = exports.tString = { + token : "string", // backtick string + regex : "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]" +}; + +var constantNumericHex = exports.constantNumericHex = { + token : "constant.numeric", // hex + regex : "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b" +}; + +var constantNumericFloat = exports.constantNumericFloat = { + token : "constant.numeric", // float + regex : "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b" +}; + +var RubyHighlightRules = function() { + + var builtinFunctions = ( + "abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|" + + "assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|" + + "assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|" + + "assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|" + + "assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|" + + "assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|" + + "attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|" + + "caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|" + + "exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|" + + "gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|" + + "link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|" + + "p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|" + + "raw|readline|readlines|redirect?|request_via_redirect|acequire|scan|select|" + + "set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|" + + "throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|" + + "render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|" + + "content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|" + + "fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|" + + "time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|" + + "select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|" + + "file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|" + + "protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|" + + "send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|" + + "validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|" + + "validates_inclusion_of|validates_numericality_of|validates_with|validates_each|" + + "authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|" + + "filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|" + + "translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|" + + "cache|expire_fragment|expire_cache_for|observe|cache_sweeper|" + + "has_many|has_one|belongs_to|has_and_belongs_to_many" + ); + + var keywords = ( + "alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|" + + "__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|" + + "redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield" + ); + + var buildinConstants = ( + "true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|" + + "RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING" + ); + + var builtinVariables = ( + "\$DEBUG|\$defout|\$FILENAME|\$LOAD_PATH|\$SAFE|\$stdin|\$stdout|\$stderr|\$VERBOSE|" + + "$!|root_url|flash|session|cookies|params|request|response|logger|self" + ); + + var keywordMapper = this.$keywords = this.createKeywordMapper({ + "keyword": keywords, + "constant.language": buildinConstants, + "variable.language": builtinVariables, + "support.function": builtinFunctions, + "invalid.deprecated": "debugger" // TODO is this a remnant from js mode? + }, "identifier"); + + this.$rules = { + "start" : [ + { + token : "comment", + regex : "#.*$" + }, { + token : "comment", // multi line comment + regex : "^=begin(?:$|\\s.*$)", + next : "comment" + }, { + token : "string.regexp", + regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" + }, + + qString, + qqString, + tString, + + { + token : "text", // namespaces aren't symbols + regex : "::" + }, { + token : "variable.instance", // instance variable + regex : "@{1,2}[a-zA-Z_\\d]+" + }, { + token : "support.class", // class name + regex : "[A-Z][a-zA-Z_\\d]+" + }, + + constantOtherSymbol, + constantNumericHex, + constantNumericFloat, + + { + token : "constant.language.boolean", + regex : "(?:true|false)\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "punctuation.separator.key-value", + regex : "=>" + }, { + stateName: "heredoc", + onMatch : function(value, currentState, stack) { + var next = value[2] == '-' ? "indentedHeredoc" : "heredoc"; + var tokens = value.split(this.splitRegex); + stack.push(next, tokens[3]); + return [ + {type:"constant", value: tokens[1]}, + {type:"string", value: tokens[2]}, + {type:"support.class", value: tokens[3]}, + {type:"string", value: tokens[4]} + ]; + }, + regex : "(<<-?)(['\"`]?)([\\w]+)(['\"`]?)", + rules: { + heredoc: [{ + onMatch: function(value, currentState, stack) { + if (value === stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack[0] || "start"; + return "support.class"; + } + this.next = ""; + return "string"; + }, + regex: ".*$", + next: "start" + }], + indentedHeredoc: [{ + token: "string", + regex: "^ +" + }, { + onMatch: function(value, currentState, stack) { + if (value === stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack[0] || "start"; + return "support.class"; + } + this.next = ""; + return "string"; + }, + regex: ".*$", + next: "start" + }] + } + }, { + regex : "$", + token : "empty", + next : function(currentState, stack) { + if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc") + return stack[0]; + return currentState; + } + }, { + token : "keyword.operator", + regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" + }, { + token : "paren.lparen", + regex : "[[({]" + }, { + token : "paren.rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + } + ], + "comment" : [ + { + token : "comment", // closing comment + regex : "^=end(?:$|\\s.*$)", + next : "start" + }, { + token : "comment", // comment spanning whole line + regex : ".+" + } + ] + }; + + this.normalizeRules(); +}; + +oop.inherits(RubyHighlightRules, TextHighlightRules); + +exports.RubyHighlightRules = RubyHighlightRules; +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/folding/coffee', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var BaseFoldMode = acequire("./fold_mode").FoldMode; +var Range = acequire("../../range").Range; + +var FoldMode = exports.FoldMode = function() {}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var range = this.indentationBlock(session, row); + if (range) + return range; + + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1 || line[startLevel] != "#") + return; + + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + + while (++row < maxRow) { + line = session.getLine(row); + var level = line.search(re); + + if (level == -1) + continue; + + if (line[level] != "#") + break; + + endRow = row; + } + + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + + if (prevIndent!= -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + + if (indent < nextIndent) + return "start"; + else + return ""; + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/rust.js b/pitfall/pdfkit/node_modules/brace/mode/rust.js new file mode 100644 index 00000000..469ca8cb --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/rust.js @@ -0,0 +1,244 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2012, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * Contributor(s): + * + * + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/rust', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/rust_highlight_rules', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var RustHighlightRules = acequire("./rust_highlight_rules").RustHighlightRules; +var FoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = RustHighlightRules; + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + this.lineCommentStart = "/\\*"; + this.blockComment = {start: "/*", end: "*/"}; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/rust_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var RustHighlightRules = function() { + + this.$rules = { start: + [ { token: 'variable.other.source.rust', + regex: '\'[a-zA-Z_][a-zA-Z0-9_]*[^\\\']' }, + { token: 'string.quoted.single.source.rust', + regex: '\'', + push: + [ { token: 'string.quoted.single.source.rust', + regex: '\'', + next: 'pop' }, + { include: '#rust_escaped_character' }, + { defaultToken: 'string.quoted.single.source.rust' } ] }, + { token: 'string.quoted.double.source.rust', + regex: '"', + push: + [ { token: 'string.quoted.double.source.rust', + regex: '"', + next: 'pop' }, + { include: '#rust_escaped_character' }, + { defaultToken: 'string.quoted.double.source.rust' } ] }, + { token: [ 'keyword.source.rust', 'meta.function.source.rust', + 'entity.name.function.source.rust', 'meta.function.source.rust' ], + regex: '\\b(fn)(\\s+)([a-zA-Z_][a-zA-Z0-9_][\\w\\:,+ \\\'<>]*)(\\s*\\()' }, + { token: 'support.constant', regex: '\\b[a-zA-Z_][\\w\\d]*::' }, + { token: 'keyword.source.rust', + regex: '\\b(?:as|assert|break|claim|const|copy|Copy|do|drop|else|extern|fail|for|if|impl|in|let|log|loop|match|mod|module|move|mut|Owned|priv|pub|pure|ref|return|unchecked|unsafe|use|while|mod|Send|static|trait|class|struct|enum|type)\\b' }, + { token: 'storage.type.source.rust', + regex: '\\b(?:Self|m32|m64|m128|f80|f16|f128|int|uint|float|char|bool|u8|u16|u32|u64|f32|f64|i8|i16|i32|i64|str|option|either|c_float|c_double|c_void|FILE|fpos_t|DIR|dirent|c_char|c_schar|c_uchar|c_short|c_ushort|c_int|c_uint|c_long|c_ulong|size_t|ptrdiff_t|clock_t|time_t|c_longlong|c_ulonglong|intptr_t|uintptr_t|off_t|dev_t|ino_t|pid_t|mode_t|ssize_t)\\b' }, + { token: 'variable.language.source.rust', regex: '\\bself\\b' }, + { token: 'keyword.operator', + regex: '!|\\$|\\*|\\-\\-|\\-|\\+\\+|\\+|-->|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|/=|%=|\\+=|\\-=|&=|\\^=|,|;' }, + { token: 'constant.language.source.rust', + regex: '\\b(?:true|false|Some|None|Left|Right|Ok|Err)\\b' }, + { token: 'support.constant.source.rust', + regex: '\\b(?:EXIT_FAILURE|EXIT_SUCCESS|RAND_MAX|EOF|SEEK_SET|SEEK_CUR|SEEK_END|_IOFBF|_IONBF|_IOLBF|BUFSIZ|FOPEN_MAX|FILENAME_MAX|L_tmpnam|TMP_MAX|O_RDONLY|O_WRONLY|O_RDWR|O_APPEND|O_CREAT|O_EXCL|O_TRUNC|S_IFIFO|S_IFCHR|S_IFBLK|S_IFDIR|S_IFREG|S_IFMT|S_IEXEC|S_IWRITE|S_IREAD|S_IRWXU|S_IXUSR|S_IWUSR|S_IRUSR|F_OK|R_OK|W_OK|X_OK|STDIN_FILENO|STDOUT_FILENO|STDERR_FILENO)\\b' }, + { token: 'meta.preprocessor.source.rust', + regex: '\\b\\w\\(\\w\\)*!|#\\[[\\w=\\(\\)_]+\\]\\b' }, + { token: 'constant.numeric.integer.source.rust', + regex: '\\b(?:[0-9][0-9_]*|[0-9][0-9_]*(?:u|u8|u16|u32|u64)|[0-9][0-9_]*(?:i|i8|i16|i32|i64))\\b' }, + { token: 'constant.numeric.hex.source.rust', + regex: '\\b(?:0x[a-fA-F0-9_]+|0x[a-fA-F0-9_]+(?:u|u8|u16|u32|u64)|0x[a-fA-F0-9_]+(?:i|i8|i16|i32|i64))\\b' }, + { token: 'constant.numeric.binary.source.rust', + regex: '\\b(?:0b[01_]+|0b[01_]+(?:u|u8|u16|u32|u64)|0b[01_]+(?:i|i8|i16|i32|i64))\\b' }, + { token: 'constant.numeric.float.source.rust', + regex: '[0-9][0-9_]*(?:f32|f64|f)|[0-9][0-9_]*[eE][+-]=[0-9_]+|[0-9][0-9_]*[eE][+-]=[0-9_]+(?:f32|f64|f)|[0-9][0-9_]*\\.[0-9_]+|[0-9][0-9_]*\\.[0-9_]+(?:f32|f64|f)|[0-9][0-9_]*\\.[0-9_]+%[eE][+-]=[0-9_]+|[0-9][0-9_]*\\.[0-9_]+%[eE][+-]=[0-9_]+(?:f32|f64|f)' }, + { token: 'comment.line.documentation.source.rust', + regex: '//!.*$', + push_: + [ { token: 'comment.line.documentation.source.rust', + regex: '$', + next: 'pop' }, + { defaultToken: 'comment.line.documentation.source.rust' } ] }, + { token: 'comment.line.double-dash.source.rust', + regex: '//.*$', + push_: + [ { token: 'comment.line.double-dash.source.rust', + regex: '$', + next: 'pop' }, + { defaultToken: 'comment.line.double-dash.source.rust' } ] }, + { token: 'comment.block.source.rust', + regex: '/\\*', + push: + [ { token: 'comment.block.source.rust', + regex: '\\*/', + next: 'pop' }, + { defaultToken: 'comment.block.source.rust' } ] } ], + '#rust_escaped_character': + [ { token: 'constant.character.escape.source.rust', + regex: '\\\\(?:x[\\da-fA-F]{2}|[0-2][0-7]{,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)' } ] } + + this.normalizeRules(); +}; + +RustHighlightRules.metaData = { fileTypes: [ 'rs', 'rc' ], + foldingStartMarker: '^.*\\bfn\\s*(\\w+\\s*)?\\([^\\)]*\\)(\\s*\\{[^\\}]*)?\\s*$', + foldingStopMarker: '^\\s*\\}', + name: 'Rust', + scopeName: 'source.rust' } + + +oop.inherits(RustHighlightRules, TextHighlightRules); + +exports.RustHighlightRules = RustHighlightRules; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/sass.js b/pitfall/pdfkit/node_modules/brace/mode/sass.js new file mode 100644 index 00000000..6af9da51 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/sass.js @@ -0,0 +1,442 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/sass', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/sass_highlight_rules', 'ace/mode/folding/coffee'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var SassHighlightRules = acequire("./sass_highlight_rules").SassHighlightRules; +var FoldMode = acequire("./folding/coffee").FoldMode; + +var Mode = function() { + this.HighlightRules = SassHighlightRules; + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + this.lineCommentStart = "//"; +}).call(Mode.prototype); + +exports.Mode = Mode; + +}); + +ace.define('ace/mode/sass_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/scss_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var ScssHighlightRules = acequire("./scss_highlight_rules").ScssHighlightRules; + +var SassHighlightRules = function() { + ScssHighlightRules.call(this); + var start = this.$rules.start; + if (start[1].token == "comment") { + start.splice(1, 1, { + onMatch: function(value, currentState, stack) { + stack.unshift(this.next, -1, value.length - 2, currentState); + return "comment"; + }, + regex: /^\s*\/\*/, + next: "comment" + }, { + token: "error.invalid", + regex: "/\\*|[{;}]" + }, { + token: "support.type", + regex: /^\s*:[\w\-]+\s/ + }); + + this.$rules.comment = [ + {regex: /^\s*/, onMatch: function(value, currentState, stack) { + if (stack[1] === -1) + stack[1] = Math.max(stack[2], value.length - 1); + if (value.length <= stack[1]) {stack.shift();stack.shift();stack.shift(); + this.next = stack.shift(); + return "text"; + } else { + this.next = ""; + return "comment"; + } + }, next: "start"}, + {defaultToken: "comment"} + ] + } +}; + +oop.inherits(SassHighlightRules, ScssHighlightRules); + +exports.SassHighlightRules = SassHighlightRules; + +}); + +ace.define('ace/mode/scss_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var ScssHighlightRules = function() { + + var properties = lang.arrayToMap( (function () { + + var browserPrefix = ("-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-").split("|"); + + var prefixProperties = ("appearance|background-clip|background-inline-policy|background-origin|" + + "background-size|binding|border-bottom-colors|border-left-colors|" + + "border-right-colors|border-top-colors|border-end|border-end-color|" + + "border-end-style|border-end-width|border-image|border-start|" + + "border-start-color|border-start-style|border-start-width|box-align|" + + "box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|" + + "box-pack|box-sizing|column-count|column-gap|column-width|column-rule|" + + "column-rule-width|column-rule-style|column-rule-color|float-edge|" + + "font-feature-settings|font-language-override|force-broken-image-icon|" + + "image-region|margin-end|margin-start|opacity|outline|outline-color|" + + "outline-offset|outline-radius|outline-radius-bottomleft|" + + "outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|" + + "outline-style|outline-width|padding-end|padding-start|stack-sizing|" + + "tab-size|text-blink|text-decoration-color|text-decoration-line|" + + "text-decoration-style|transform|transform-origin|transition|" + + "transition-delay|transition-duration|transition-property|" + + "transition-timing-function|user-focus|user-input|user-modify|user-select|" + + "window-shadow|border-radius").split("|"); + + var properties = ("azimuth|background-attachment|background-color|background-image|" + + "background-position|background-repeat|background|border-bottom-color|" + + "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" + + "border-color|border-left-color|border-left-style|border-left-width|" + + "border-left|border-right-color|border-right-style|border-right-width|" + + "border-right|border-spacing|border-style|border-top-color|" + + "border-top-style|border-top-width|border-top|border-width|border|bottom|" + + "box-shadow|box-sizing|caption-side|clear|clip|color|content|counter-increment|" + + "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" + + "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" + + "font-stretch|font-style|font-variant|font-weight|font|height|left|" + + "letter-spacing|line-height|list-style-image|list-style-position|" + + "list-style-type|list-style|margin-bottom|margin-left|margin-right|" + + "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" + + "min-width|opacity|orphans|outline-color|" + + "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" + + "padding-left|padding-right|padding-top|padding|page-break-after|" + + "page-break-before|page-break-inside|page|pause-after|pause-before|" + + "pause|pitch-range|pitch|play-during|position|quotes|richness|right|" + + "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" + + "stress|table-layout|text-align|text-decoration|text-indent|" + + "text-shadow|text-transform|top|unicode-bidi|vertical-align|" + + "visibility|voice-family|volume|white-space|widows|width|word-spacing|" + + "z-index").split("|"); + var ret = []; + for (var i=0, ln=browserPrefix.length; i|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*" + }, { + token : "paren.lparen", + regex : "[[({]" + }, { + token : "paren.rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + }, { + caseInsensitive: true + } + ], + "comment" : [ + { + token : "comment", // closing comment + regex : ".*?\\*\\/", + next : "start" + }, { + token : "comment", // comment spanning whole line + regex : ".+" + } + ], + "qqstring" : [ + { + token : "string", + regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', + next : "start" + }, { + token : "string", + regex : '.+' + } + ], + "qstring" : [ + { + token : "string", + regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", + next : "start" + }, { + token : "string", + regex : '.+' + } + ] + }; +}; + +oop.inherits(ScssHighlightRules, TextHighlightRules); + +exports.ScssHighlightRules = ScssHighlightRules; + +}); + +ace.define('ace/mode/folding/coffee', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var BaseFoldMode = acequire("./fold_mode").FoldMode; +var Range = acequire("../../range").Range; + +var FoldMode = exports.FoldMode = function() {}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var range = this.indentationBlock(session, row); + if (range) + return range; + + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1 || line[startLevel] != "#") + return; + + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + + while (++row < maxRow) { + line = session.getLine(row); + var level = line.search(re); + + if (level == -1) + continue; + + if (line[level] != "#") + break; + + endRow = row; + } + + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + + if (prevIndent!= -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + + if (indent < nextIndent) + return "start"; + else + return ""; + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/scad.js b/pitfall/pdfkit/node_modules/brace/mode/scad.js new file mode 100644 index 00000000..743905e4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/scad.js @@ -0,0 +1,711 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/scad', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/scad_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var scadHighlightRules = acequire("./scad_highlight_rules").scadHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = scadHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } else if (state == "doc-start") { + if (endState == "start") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/scad_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var scadHighlightRules = function() { + var keywordMapper = this.createKeywordMapper({ + "variable.language": "this", + "keyword": "module|if|else|for", + "constant.language": "NULL" + }, "identifier"); + + this.$rules = { + "start" : [ + { + token : "comment", + regex : "\\/\\/.*$" + }, + DocCommentHighlightRules.getStartRule("start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // multi line string start + regex : '["].*\\\\$', + next : "qqstring" + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : "string", // multi line string start + regex : "['].*\\\\$", + next : "qstring" + }, { + token : "constant.numeric", // hex + regex : "0[xX][0-9a-fA-F]+\\b" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "constant", // + regex : "<[a-zA-Z0-9.]+>" + }, { + token : "keyword", // pre-compiler directivs + regex : "(?:use|include)" + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator", + regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)" + }, { + token : "paren.lparen", + regex : "[[({]" + }, { + token : "paren.rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + } + ], + "comment" : [ + { + token : "comment", // closing comment + regex : ".*?\\*\\/", + next : "start" + }, { + token : "comment", // comment spanning whole line + regex : ".+" + } + ], + "qqstring" : [ + { + token : "string", + regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', + next : "start" + }, { + token : "string", + regex : '.+' + } + ], + "qstring" : [ + { + token : "string", + regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", + next : "start" + }, { + token : "string", + regex : '.+' + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("start") ]); +}; + +oop.inherits(scadHighlightRules, TextHighlightRules); + +exports.scadHighlightRules = scadHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/scala.js b/pitfall/pdfkit/node_modules/brace/mode/scala.js new file mode 100644 index 00000000..5892dfe4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/scala.js @@ -0,0 +1,1076 @@ +ace.define('ace/mode/scala', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript', 'ace/tokenizer', 'ace/mode/scala_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var JavaScriptMode = acequire("./javascript").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var ScalaHighlightRules = acequire("./scala_highlight_rules").ScalaHighlightRules; + +var Mode = function() { + JavaScriptMode.call(this); + + this.HighlightRules = ScalaHighlightRules; +}; +oop.inherits(Mode, JavaScriptMode); + +(function() { + + this.createWorker = function(session) { + return null; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/javascript', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = JavaScriptHighlightRules; + + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/javascript"), "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + + worker.on("jslint", function(results) { + session.setAnnotations(results.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/javascript_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var JavaScriptHighlightRules = function() { + var keywordMapper = this.createKeywordMapper({ + "variable.language": + "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document" , // Pseudo + "keyword": + "const|yield|import|get|set|" + + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", + "storage.type": + "const|let|var|function", + "constant.language": + "null|Infinity|NaN|undefined", + "support.function": + "alert", + "constant.language.boolean": "true|false" + }, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; + + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-6][0-7]?|" + // oct + "37[0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + + this.$rules = { + "no_regex" : [ + { + token : "comment", + regex : "\\/\\/", + next : "line_comment" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : /\/\*/, + next : "comment" + }, { + token : "string", + regex : "'(?=.)", + next : "qstring" + }, { + token : "string", + regex : '"(?=.)', + next : "qqstring" + }, { + token : "constant.numeric", // hex + regex : /0[xX][0-9a-fA-F]+\b/ + }, { + token : "constant.numeric", // float + regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ + }, { + token : [ + "storage.type", "punctuation.operator", "support.function", + "punctuation.operator", "entity.name.function", "text","keyword.operator" + ], + regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "paren.lparen" + ], + regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "text", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : "keyword", + regex : "(?:" + kwBeforeRe + ")\\b", + next : "start" + }, { + token : ["punctuation.operator", "support.function"], + regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token : ["punctuation.operator", "support.function.dom"], + regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token : ["punctuation.operator", "support.constant"], + regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token : ["storage.type", "punctuation.operator", "support.function.firebug"], + regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/ + }, { + token : keywordMapper, + regex : identifierRe + }, { + token : "keyword.operator", + regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, + next : "start" + }, { + token : "punctuation.operator", + regex : /\?|\:|\,|\;|\./, + next : "start" + }, { + token : "paren.lparen", + regex : /[\[({]/, + next : "start" + }, { + token : "paren.rparen", + regex : /[\])}]/ + }, { + token : "keyword.operator", + regex : /\/=?/, + next : "start" + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment_regex_allowed" + }, { + token : "comment", + regex : "\\/\\/", + next : "line_comment_regex_allowed" + }, { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token : "text", + regex : "\\s+|^$", + next : "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/\\w*", + next: "no_regex" + }, { + token : "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token : "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/ + }, { + token : "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "function_arguments": [ + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "[, ]+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "comment_regex_allowed" : [ + {token : "comment", regex : "\\*\\/", next : "start"}, + {defaultToken : "comment"} + ], + "comment" : [ + {token : "comment", regex : "\\*\\/", next : "no_regex"}, + {defaultToken : "comment"} + ], + "line_comment_regex_allowed" : [ + {token : "comment", regex : "$|^", next : "start"}, + {defaultToken : "comment"} + ], + "line_comment" : [ + {token : "comment", regex : "$|^", next : "no_regex"}, + {defaultToken : "comment"} + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qqstring" + }, { + token : "string", + regex : '"|$', + next : "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qstring" + }, { + token : "string", + regex : "'|$", + next : "no_regex" + }, { + defaultToken: "string" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("no_regex") ]); +}; + +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); + +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); +ace.define('ace/mode/scala_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var ScalaHighlightRules = function() { + var keywords = ( + "case|default|do|else|for|if|match|while|throw|return|try|catch|finally|yield|" + + "abstract|class|def|extends|final|forSome|implicit|implicits|import|lazy|new|object|" + + "override|package|private|protected|sealed|super|this|trait|type|val|var|with" + ); + + var buildinConstants = ("true|false"); + + var langClasses = ( + "AbstractMethodError|AssertionError|ClassCircularityError|"+ + "ClassFormatError|Deprecated|EnumConstantNotPresentException|"+ + "ExceptionInInitializerError|IllegalAccessError|"+ + "IllegalThreadStateException|InstantiationError|InternalError|"+ + + "NegativeArraySizeException|NoSuchFieldError|Override|Process|"+ + "ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|"+ + "SuppressWarnings|TypeNotPresentException|UnknownError|"+ + "UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|"+ + "InstantiationException|IndexOutOfBoundsException|"+ + "ArrayIndexOutOfBoundsException|CloneNotSupportedException|"+ + "NoSuchFieldException|IllegalArgumentException|NumberFormatException|"+ + "SecurityException|Void|InheritableThreadLocal|IllegalStateException|"+ + "InterruptedException|NoSuchMethodException|IllegalAccessException|"+ + "UnsupportedOperationException|Enum|StrictMath|Package|Compiler|"+ + "Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|"+ + "NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|"+ + "NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|"+ + "Character|Boolean|StackTraceElement|Appendable|StringBuffer|"+ + "Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|"+ + "StackOverflowError|OutOfMemoryError|VirtualMachineError|"+ + "ArrayStoreException|ClassCastException|LinkageError|"+ + "NoClassDefFoundError|ClassNotFoundException|RuntimeException|"+ + "Exception|ThreadDeath|Error|Throwable|System|ClassLoader|"+ + "Cloneable|Class|CharSequence|Comparable|String|Object|" + + "Unit|Any|AnyVal|AnyRef|Null|ScalaObject|Singleton|Seq|Iterable|List|" + + "Option|Array|Char|Byte|Short|Int|Long|Nothing" + + + ); + + var keywordMapper = this.createKeywordMapper({ + "variable.language": "this", + "keyword": keywords, + "support.function": langClasses, + "constant.language": buildinConstants + }, "identifier"); + + this.$rules = { + "start" : [ + { + token : "comment", + regex : "\\/\\/.*$" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment" + }, { + token : "string.regexp", + regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" + }, { + token : "string", + regex : '"""', + next : "tstring" + }, { + token : "string", + regex : '"(?=.)', // " strings can't span multiple lines + next : "string" + }, { + token : "symbol.constant", // single line + regex : "'[\\w\\d_]+" + }, { + token : "constant.numeric", // hex + regex : "0[xX][0-9a-fA-F]+\\b" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "constant.language.boolean", + regex : "(?:true|false)\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator", + regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" + }, { + token : "paren.lparen", + regex : "[[({]" + }, { + token : "paren.rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + } + ], + "comment" : [ + { + token : "comment", // closing comment + regex : ".*?\\*\\/", + next : "start" + }, { + token : "comment", // comment spanning whole line + regex : ".+" + } + ], + "string" : [ + { + token : "escape", + regex : '\\\\"' + }, { + token : "string", + regex : '"', + next : "start" + }, { + token : "string.invalid", + regex : '[^"\\\\]*$', + next : "start" + }, { + token : "string", + regex : '[^"\\\\]+' + } + ], + "tstring" : [ + { + token : "string", // closing comment + regex : '"{3,5}', + next : "start" + }, { + token : "string", // comment spanning whole line + regex : ".+?" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("start") ]); +}; + +oop.inherits(ScalaHighlightRules, TextHighlightRules); + +exports.ScalaHighlightRules = ScalaHighlightRules; +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/scheme.js b/pitfall/pdfkit/node_modules/brace/mode/scheme.js new file mode 100644 index 00000000..cf6cd426 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/scheme.js @@ -0,0 +1,142 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2012, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * Contributor(s): + * + * NalaGinrut@gmail.com + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/scheme', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/scheme_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var SchemeHighlightRules = acequire("./scheme_highlight_rules").SchemeHighlightRules; + +var Mode = function() { + this.HighlightRules = SchemeHighlightRules; +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = ";"; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/scheme_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var SchemeHighlightRules = function() { + var keywordControl = "case|do|let|loop|if|else|when"; + var keywordOperator = "eq?|eqv?|equal?|and|or|not|null?"; + var constantLanguage = "#t|#f"; + var supportFunctions = "cons|car|cdr|cond|lambda|lambda*|syntax-rules|format|set!|quote|eval|append|list|list?|member?|load"; + + var keywordMapper = this.createKeywordMapper({ + "keyword.control": keywordControl, + "keyword.operator": keywordOperator, + "constant.language": constantLanguage, + "support.function": supportFunctions + }, "identifier", true); + + this.$rules = + { + "start": [ + { + token : "comment", + regex : ";.*$" + }, + { + "token": ["storage.type.function-type.scheme", "text", "entity.name.function.scheme"], + "regex": "(?:\\b(?:(define|define-syntax|define-macro))\\b)(\\s+)((?:\\w|\\-|\\!|\\?)*)" + }, + { + "token": "punctuation.definition.constant.character.scheme", + "regex": "#:\\S+" + }, + { + "token": ["punctuation.definition.variable.scheme", "variable.other.global.scheme", "punctuation.definition.variable.scheme"], + "regex": "(\\*)(\\S*)(\\*)" + }, + { + "token" : "constant.numeric", // hex + "regex" : "#[xXoObB][0-9a-fA-F]+" + }, + { + "token" : "constant.numeric", // float + "regex" : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?" + }, + { + "token" : keywordMapper, + "regex" : "[a-zA-Z_#][a-zA-Z0-9_\\-\\?\\!\\*]*" + }, + { + "token" : "string", + "regex" : '"(?=.)', + "next" : "qqstring" + } + ], + "qqstring": [ + { + "token": "constant.character.escape.scheme", + "regex": "\\\\." + }, + { + "token" : "string", + "regex" : '[^"\\\\]+', + "merge" : true + }, { + "token" : "string", + "regex" : "\\\\$", + "next" : "qqstring", + "merge" : true + }, { + "token" : "string", + "regex" : '"|$', + "next" : "start", + "merge" : true + } + ] +} + +}; + +oop.inherits(SchemeHighlightRules, TextHighlightRules); + +exports.SchemeHighlightRules = SchemeHighlightRules; +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/scss.js b/pitfall/pdfkit/node_modules/brace/mode/scss.js new file mode 100644 index 00000000..32f31ef4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/scss.js @@ -0,0 +1,873 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/scss', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/scss_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/css', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var ScssHighlightRules = acequire("./scss_highlight_rules").ScssHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var CssBehaviour = acequire("./behaviour/css").CssBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = ScssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; + +}); + +ace.define('ace/mode/scss_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var ScssHighlightRules = function() { + + var properties = lang.arrayToMap( (function () { + + var browserPrefix = ("-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-").split("|"); + + var prefixProperties = ("appearance|background-clip|background-inline-policy|background-origin|" + + "background-size|binding|border-bottom-colors|border-left-colors|" + + "border-right-colors|border-top-colors|border-end|border-end-color|" + + "border-end-style|border-end-width|border-image|border-start|" + + "border-start-color|border-start-style|border-start-width|box-align|" + + "box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|" + + "box-pack|box-sizing|column-count|column-gap|column-width|column-rule|" + + "column-rule-width|column-rule-style|column-rule-color|float-edge|" + + "font-feature-settings|font-language-override|force-broken-image-icon|" + + "image-region|margin-end|margin-start|opacity|outline|outline-color|" + + "outline-offset|outline-radius|outline-radius-bottomleft|" + + "outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|" + + "outline-style|outline-width|padding-end|padding-start|stack-sizing|" + + "tab-size|text-blink|text-decoration-color|text-decoration-line|" + + "text-decoration-style|transform|transform-origin|transition|" + + "transition-delay|transition-duration|transition-property|" + + "transition-timing-function|user-focus|user-input|user-modify|user-select|" + + "window-shadow|border-radius").split("|"); + + var properties = ("azimuth|background-attachment|background-color|background-image|" + + "background-position|background-repeat|background|border-bottom-color|" + + "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" + + "border-color|border-left-color|border-left-style|border-left-width|" + + "border-left|border-right-color|border-right-style|border-right-width|" + + "border-right|border-spacing|border-style|border-top-color|" + + "border-top-style|border-top-width|border-top|border-width|border|bottom|" + + "box-shadow|box-sizing|caption-side|clear|clip|color|content|counter-increment|" + + "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" + + "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" + + "font-stretch|font-style|font-variant|font-weight|font|height|left|" + + "letter-spacing|line-height|list-style-image|list-style-position|" + + "list-style-type|list-style|margin-bottom|margin-left|margin-right|" + + "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" + + "min-width|opacity|orphans|outline-color|" + + "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" + + "padding-left|padding-right|padding-top|padding|page-break-after|" + + "page-break-before|page-break-inside|page|pause-after|pause-before|" + + "pause|pitch-range|pitch|play-during|position|quotes|richness|right|" + + "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" + + "stress|table-layout|text-align|text-decoration|text-indent|" + + "text-shadow|text-transform|top|unicode-bidi|vertical-align|" + + "visibility|voice-family|volume|white-space|widows|width|word-spacing|" + + "z-index").split("|"); + var ret = []; + for (var i=0, ln=browserPrefix.length; i|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*" + }, { + token : "paren.lparen", + regex : "[[({]" + }, { + token : "paren.rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + }, { + caseInsensitive: true + } + ], + "comment" : [ + { + token : "comment", // closing comment + regex : ".*?\\*\\/", + next : "start" + }, { + token : "comment", // comment spanning whole line + regex : ".+" + } + ], + "qqstring" : [ + { + token : "string", + regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', + next : "start" + }, { + token : "string", + regex : '.+' + } + ], + "qstring" : [ + { + token : "string", + regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", + next : "start" + }, { + token : "string", + regex : '.+' + } + ] + }; +}; + +oop.inherits(ScssHighlightRules, TextHighlightRules); + +exports.ScssHighlightRules = ScssHighlightRules; + +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/behaviour/css', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + +var CssBehaviour = function () { + + this.inherit(CstyleBehaviour); + + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + } + } + if (!line.substring(cursor.column).match(/^\s*;/)) { + return { + text: ':;', + selection: [1, 1] + } + } + } + } + }); + + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column ++; + return range; + } + } + } + }); + + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + } + } + } + }); + +} +oop.inherits(CssBehaviour, CstyleBehaviour); + +exports.CssBehaviour = CssBehaviour; +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/sh.js b/pitfall/pdfkit/node_modules/brace/mode/sh.js new file mode 100644 index 00000000..37811b59 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/sh.js @@ -0,0 +1,319 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/sh', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/sh_highlight_rules', 'ace/range', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var ShHighlightRules = acequire("./sh_highlight_rules").ShHighlightRules; +var Range = acequire("../range").Range; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = ShHighlightRules; + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + + this.lineCommentStart = "#"; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start") { + var match = line.match(/^.*[\{\(\[\:]\s*$/); + if (match) { + indent += tab; + } + } + + return indent; + }; + + var outdents = { + "pass": 1, + "return": 1, + "raise": 1, + "break": 1, + "continue": 1 + }; + + this.checkOutdent = function(state, line, input) { + if (input !== "\r\n" && input !== "\r" && input !== "\n") + return false; + + var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens; + + if (!tokens) + return false; + do { + var last = tokens.pop(); + } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/)))); + + if (!last) + return false; + + return (last.type == "keyword" && outdents[last.value]); + }; + + this.autoOutdent = function(state, doc, row) { + + row += 1; + var indent = this.$getIndent(doc.getLine(row)); + var tab = doc.getTabString(); + if (indent.slice(-tab.length) == tab) + doc.remove(new Range(row, indent.length-tab.length, row, indent.length)); + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/sh_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var reservedKeywords = exports.reservedKeywords = ( + '!|{|}|case|do|done|elif|else|'+ + 'esac|fi|for|if|in|then|until|while|'+ + '&|;|export|local|read|typeset|unset|'+ + 'elif|select|set' + ); + +var languageConstructs = exports.languageConstructs = ( + '[|]|alias|bg|bind|break|builtin|'+ + 'cd|command|compgen|complete|continue|'+ + 'dirs|disown|echo|enable|eval|exec|'+ + 'exit|fc|fg|getopts|hash|help|history|'+ + 'jobs|kill|let|logout|popd|printf|pushd|'+ + 'pwd|return|set|shift|shopt|source|'+ + 'suspend|test|times|trap|type|ulimit|'+ + 'umask|unalias|wait' +); + +var ShHighlightRules = function() { + var keywordMapper = this.createKeywordMapper({ + "keyword": reservedKeywords, + "support.function.builtin": languageConstructs, + "invalid.deprecated": "debugger" + }, "identifier"); + + var integer = "(?:(?:[1-9]\\d*)|(?:0))"; + + var fraction = "(?:\\.\\d+)"; + var intPart = "(?:\\d+)"; + var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; + var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + ")"; + var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; + var fileDescriptor = "(?:&" + intPart + ")"; + + var variableName = "[a-zA-Z][a-zA-Z0-9_]*"; + var variable = "(?:(?:\\$" + variableName + ")|(?:" + variableName + "=))"; + + var builtinVariable = "(?:\\$(?:SHLVL|\\$|\\!|\\?))"; + + var func = "(?:" + variableName + "\\s*\\(\\))"; + + this.$rules = { + "start" : [{ + token : "constant", + regex : /\\./ + }, { + token : ["text", "comment"], + regex : /(^|\s)(#.*)$/ + }, { + token : "string", + regex : '"', + push : [{ + token : "constant.language.escape", + regex : /\\(?:[$abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/ + }, { + token : "constant", + regex : /\$\w+/ + }, { + token : "string", + regex : '"', + next: "pop" + }, { + defaultToken: "string" + }] + }, { + token : "variable.language", + regex : builtinVariable + }, { + token : "variable", + regex : variable + }, { + token : "support.function", + regex : func + }, { + token : "support.function", + regex : fileDescriptor + }, { + token : "string", // ' string + start : "'", end : "'" + }, { + token : "constant.numeric", // float + regex : floatNumber + }, { + token : "constant.numeric", // integer + regex : integer + "\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator", + regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=" + }, { + token : "paren.lparen", + regex : "[\\[\\(\\{]" + }, { + token : "paren.rparen", + regex : "[\\]\\)\\}]" + } ] + }; + + this.normalizeRules(); +}; + +oop.inherits(ShHighlightRules, TextHighlightRules); + +exports.ShHighlightRules = ShHighlightRules; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/sjs.js b/pitfall/pdfkit/node_modules/brace/mode/sjs.js new file mode 100644 index 00000000..d49b320d --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/sjs.js @@ -0,0 +1,1147 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/sjs', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript', 'ace/tokenizer', 'ace/mode/sjs_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + +var oop = acequire("../lib/oop"); +var JSMode = acequire("./javascript").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var SJSHighlightRules = acequire("./sjs_highlight_rules").SJSHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + var highlighter = new SJSHighlightRules(); + + this.$tokenizer = new Tokenizer(highlighter.getRules()); + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.$keywordList = highlighter.$keywordList; + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, JSMode); +(function() { + this.createWorker = function(session) { + return null; + } +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/javascript', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = JavaScriptHighlightRules; + + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/javascript"), "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + + worker.on("jslint", function(results) { + session.setAnnotations(results.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/javascript_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var JavaScriptHighlightRules = function() { + var keywordMapper = this.createKeywordMapper({ + "variable.language": + "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document" , // Pseudo + "keyword": + "const|yield|import|get|set|" + + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", + "storage.type": + "const|let|var|function", + "constant.language": + "null|Infinity|NaN|undefined", + "support.function": + "alert", + "constant.language.boolean": "true|false" + }, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; + + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-6][0-7]?|" + // oct + "37[0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + + this.$rules = { + "no_regex" : [ + { + token : "comment", + regex : "\\/\\/", + next : "line_comment" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : /\/\*/, + next : "comment" + }, { + token : "string", + regex : "'(?=.)", + next : "qstring" + }, { + token : "string", + regex : '"(?=.)', + next : "qqstring" + }, { + token : "constant.numeric", // hex + regex : /0[xX][0-9a-fA-F]+\b/ + }, { + token : "constant.numeric", // float + regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ + }, { + token : [ + "storage.type", "punctuation.operator", "support.function", + "punctuation.operator", "entity.name.function", "text","keyword.operator" + ], + regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "paren.lparen" + ], + regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "text", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : "keyword", + regex : "(?:" + kwBeforeRe + ")\\b", + next : "start" + }, { + token : ["punctuation.operator", "support.function"], + regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token : ["punctuation.operator", "support.function.dom"], + regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token : ["punctuation.operator", "support.constant"], + regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token : ["storage.type", "punctuation.operator", "support.function.firebug"], + regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/ + }, { + token : keywordMapper, + regex : identifierRe + }, { + token : "keyword.operator", + regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, + next : "start" + }, { + token : "punctuation.operator", + regex : /\?|\:|\,|\;|\./, + next : "start" + }, { + token : "paren.lparen", + regex : /[\[({]/, + next : "start" + }, { + token : "paren.rparen", + regex : /[\])}]/ + }, { + token : "keyword.operator", + regex : /\/=?/, + next : "start" + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment_regex_allowed" + }, { + token : "comment", + regex : "\\/\\/", + next : "line_comment_regex_allowed" + }, { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token : "text", + regex : "\\s+|^$", + next : "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/\\w*", + next: "no_regex" + }, { + token : "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token : "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/ + }, { + token : "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "function_arguments": [ + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "[, ]+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "comment_regex_allowed" : [ + {token : "comment", regex : "\\*\\/", next : "start"}, + {defaultToken : "comment"} + ], + "comment" : [ + {token : "comment", regex : "\\*\\/", next : "no_regex"}, + {defaultToken : "comment"} + ], + "line_comment_regex_allowed" : [ + {token : "comment", regex : "$|^", next : "start"}, + {defaultToken : "comment"} + ], + "line_comment" : [ + {token : "comment", regex : "$|^", next : "no_regex"}, + {defaultToken : "comment"} + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qqstring" + }, { + token : "string", + regex : '"|$', + next : "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qstring" + }, { + token : "string", + regex : "'|$", + next : "no_regex" + }, { + defaultToken: "string" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("no_regex") ]); +}; + +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); + +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); + +ace.define('ace/mode/sjs_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var SJSHighlightRules = function() { + var parent = new JavaScriptHighlightRules(); + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-6][0-7]?|" + // oct + "37[0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + + var contextAware = function(f) { + f.isContextAware = true; + return f; + }; + + var ctxBegin = function(opts) { + return { + token: opts.token, + regex: opts.regex, + next: contextAware(function(currentState, stack) { + if (stack.length === 0) + stack.unshift(currentState); + stack.unshift(opts.next); + return opts.next; + }), + }; + }; + + var ctxEnd = function(opts) { + return { + token: opts.token, + regex: opts.regex, + next: contextAware(function(currentState, stack) { + stack.shift(); + return stack[0] || "start"; + }), + }; + }; + + this.$rules = parent.$rules; + this.$rules.no_regex = [ + { + token: "keyword", + regex: "(waitfor|or|and|collapse|spawn|retract)\\b" + }, + { + token: "keyword.operator", + regex: "(->|=>|\\.\\.)" + }, + { + token: "variable.language", + regex: "(hold|default)\\b" + }, + ctxBegin({ + token: "string", + regex: "`", + next: "bstring" + }), + ctxBegin({ + token: "string", + regex: '"', + next: "qqstring" + }), + ctxBegin({ + token: "string", + regex: '"', + next: "qqstring" + }), + { + token: ["paren.lparen", "text", "paren.rparen"], + regex: "(\\{)(\\s*)(\\|)", + next: "block_arguments", + } + + ].concat(this.$rules.no_regex); + + this.$rules.block_arguments = [ + { + token: "paren.rparen", + regex: "\\|", + next: "no_regex", + } + ].concat(this.$rules.function_arguments); + + this.$rules.bstring = [ + { + token : "constant.language.escape", + regex : escapedRe + }, + { + token : "string", + regex : "\\\\$", + next: "bstring" + }, + ctxBegin({ + token : "paren.lparen", + regex : "\\$\\{", + next: "string_interp" + }), + ctxBegin({ + token : "paren.lparen", + regex : "\\$", + next: "bstring_interp_single" + }), + ctxEnd({ + token : "string", + regex : "`", + }), + { + defaultToken: "string" + } + ]; + + this.$rules.qqstring = [ + { + token : "constant.language.escape", + regex : escapedRe + }, + { + token : "string", + regex : "\\\\$", + next: "qqstring", + }, + ctxBegin({ + token : "paren.lparen", + regex : "#\\{", + next: "string_interp" + }), + ctxEnd({ + token : "string", + regex : '"', + }), + { + defaultToken: "string" + } + ]; + var embeddableRules = []; + for (var i=0; i startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + + if (prevIndent!= -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + + if (indent < nextIndent) + return "start"; + else + return ""; + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/soy_template.js b/pitfall/pdfkit/node_modules/brace/mode/soy_template.js new file mode 100644 index 00000000..cd05c400 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/soy_template.js @@ -0,0 +1,2698 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2012, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * Contributor(s): + * + * + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/soy_template', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/html', 'ace/tokenizer', 'ace/mode/soy_template_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var HtmlMode = acequire("./html").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var SoyTemplateHighlightRules = acequire("./soy_template_highlight_rules").SoyTemplateHighlightRules; + +var Mode = function() { + HtmlMode.call(this); + this.HighlightRules = SoyTemplateHighlightRules; +}; +oop.inherits(Mode, HtmlMode); + +(function() { + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/html', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/css', 'ace/tokenizer', 'ace/mode/html_highlight_rules', 'ace/mode/behaviour/html', 'ace/mode/folding/html', 'ace/mode/html_completions'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var JavaScriptMode = acequire("./javascript").Mode; +var CssMode = acequire("./css").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var HtmlHighlightRules = acequire("./html_highlight_rules").HtmlHighlightRules; +var HtmlBehaviour = acequire("./behaviour/html").HtmlBehaviour; +var HtmlFoldMode = acequire("./folding/html").FoldMode; +var HtmlCompletions = acequire("./html_completions").HtmlCompletions; + +var Mode = function() { + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new HtmlBehaviour(); + this.$completer = new HtmlCompletions(); + + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + + this.foldingRules = new HtmlFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.blockComment = {start: ""}; + + this.getNextLineIndent = function(state, line, tab) { + return this.$getIndent(line); + }; + + this.checkOutdent = function(state, line, input) { + return false; + }; + + this.getCompletions = function(state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/javascript', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = JavaScriptHighlightRules; + + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/javascript"), "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + + worker.on("jslint", function(results) { + session.setAnnotations(results.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/javascript_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var JavaScriptHighlightRules = function() { + var keywordMapper = this.createKeywordMapper({ + "variable.language": + "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document" , // Pseudo + "keyword": + "const|yield|import|get|set|" + + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", + "storage.type": + "const|let|var|function", + "constant.language": + "null|Infinity|NaN|undefined", + "support.function": + "alert", + "constant.language.boolean": "true|false" + }, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; + + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-6][0-7]?|" + // oct + "37[0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + + this.$rules = { + "no_regex" : [ + { + token : "comment", + regex : "\\/\\/", + next : "line_comment" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : /\/\*/, + next : "comment" + }, { + token : "string", + regex : "'(?=.)", + next : "qstring" + }, { + token : "string", + regex : '"(?=.)', + next : "qqstring" + }, { + token : "constant.numeric", // hex + regex : /0[xX][0-9a-fA-F]+\b/ + }, { + token : "constant.numeric", // float + regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ + }, { + token : [ + "storage.type", "punctuation.operator", "support.function", + "punctuation.operator", "entity.name.function", "text","keyword.operator" + ], + regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "paren.lparen" + ], + regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "text", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : "keyword", + regex : "(?:" + kwBeforeRe + ")\\b", + next : "start" + }, { + token : ["punctuation.operator", "support.function"], + regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token : ["punctuation.operator", "support.function.dom"], + regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token : ["punctuation.operator", "support.constant"], + regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token : ["storage.type", "punctuation.operator", "support.function.firebug"], + regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/ + }, { + token : keywordMapper, + regex : identifierRe + }, { + token : "keyword.operator", + regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, + next : "start" + }, { + token : "punctuation.operator", + regex : /\?|\:|\,|\;|\./, + next : "start" + }, { + token : "paren.lparen", + regex : /[\[({]/, + next : "start" + }, { + token : "paren.rparen", + regex : /[\])}]/ + }, { + token : "keyword.operator", + regex : /\/=?/, + next : "start" + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment_regex_allowed" + }, { + token : "comment", + regex : "\\/\\/", + next : "line_comment_regex_allowed" + }, { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token : "text", + regex : "\\s+|^$", + next : "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/\\w*", + next: "no_regex" + }, { + token : "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token : "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/ + }, { + token : "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "function_arguments": [ + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "[, ]+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "comment_regex_allowed" : [ + {token : "comment", regex : "\\*\\/", next : "start"}, + {defaultToken : "comment"} + ], + "comment" : [ + {token : "comment", regex : "\\*\\/", next : "no_regex"}, + {defaultToken : "comment"} + ], + "line_comment_regex_allowed" : [ + {token : "comment", regex : "$|^", next : "start"}, + {defaultToken : "comment"} + ], + "line_comment" : [ + {token : "comment", regex : "$|^", next : "no_regex"}, + {defaultToken : "comment"} + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qqstring" + }, { + token : "string", + regex : '"|$', + next : "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qstring" + }, { + token : "string", + regex : "'|$", + next : "no_regex" + }, { + defaultToken: "string" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("no_regex") ]); +}; + +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); + +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); + +ace.define('ace/mode/css', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/behaviour/css', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var CssHighlightRules = acequire("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var CssBehaviour = acequire("./behaviour/css").CssBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.foldingRules = "cStyle"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/css"), "Worker"); + worker.attachToDocument(session.getDocument()); + + worker.on("csslint", function(e) { + session.setAnnotations(e.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; + +}); + +ace.define('ace/mode/css_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; + +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|acequired|root|target|valid|visited)\\b"; + +var CssHighlightRules = function() { + + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + + this.$rules = { + "start" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "@.*?{", + push: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "media" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "\\}", + next: "pop" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "comment" : [{ + token : "comment", + regex : "\\*\\/", + next : "pop" + }, { + defaultToken : "comment" + }], + + "ruleset" : [ + { + token : "paren.rparen", + regex : "\\}", + next: "pop" + }, { + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : ["constant.numeric", "keyword"], + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + }, { + token : "constant.numeric", + regex : numRe + }, { + token : "constant.numeric", // hex6 color + regex : "#[a-f0-9]{6}" + }, { + token : "constant.numeric", // hex3 color + regex : "#[a-f0-9]{3}" + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex : pseudoElements + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex : pseudoClasses + }, { + token : ["support.function", "string", "support.function"], + regex : "(url\\()(.*)(\\))" + }, { + token : keywordMapper, + regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + caseInsensitive: true + }] + }; + + this.normalizeRules(); +}; + +oop.inherits(CssHighlightRules, TextHighlightRules); + +exports.CssHighlightRules = CssHighlightRules; + +}); + +ace.define('ace/mode/behaviour/css', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + +var CssBehaviour = function () { + + this.inherit(CstyleBehaviour); + + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + } + } + if (!line.substring(cursor.column).match(/^\s*;/)) { + return { + text: ':;', + selection: [1, 1] + } + } + } + } + }); + + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column ++; + return range; + } + } + } + }); + + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + } + } + } + }); + +} +oop.inherits(CssBehaviour, CstyleBehaviour); + +exports.CssBehaviour = CssBehaviour; +}); + +ace.define('ace/mode/html_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var CssHighlightRules = acequire("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = acequire("./xml_highlight_rules").XmlHighlightRules; + +var tagMap = lang.createMap({ + a : 'anchor', + button : 'form', + form : 'form', + img : 'image', + input : 'form', + label : 'form', + option : 'form', + script : 'script', + select : 'form', + textarea : 'form', + style : 'style', + table : 'table', + tbody : 'table', + td : 'table', + tfoot : 'table', + th : 'table', + tr : 'table' +}); + +var HtmlHighlightRules = function() { + XmlHighlightRules.call(this); + + this.addRules({ + attributes: [{ + include : "space" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "keyword.operator.separator", + regex : "=", + push : [{ + include: "space" + }, { + token : "string", + regex : "[^<>='\"`\\s]+", + next : "pop" + }, { + token : "empty", + regex : "", + next : "pop" + }] + }, { + include : "string" + }], + tag: [{ + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation.begin", + "meta.tag.name" + (group ? "." + group : "")]; + }, + regex : "(<)([-_a-zA-Z0-9:]+)", + next: "start_tag_stuff" + }, { + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation.begin", + "meta.tag.name" + (group ? "." + group : "")]; + }, + regex : "(", next : "start"} + ], + end_tag_stuff: [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next : "start"} + ] + }); + + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); + + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; + +oop.inherits(HtmlHighlightRules, XmlHighlightRules); + +exports.HtmlHighlightRules = HtmlHighlightRules; +}); + +ace.define('ace/mode/xml_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var xmlUtil = acequire("./xml_util"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var XmlHighlightRules = function(normalize) { + this.$rules = { + start : [ + {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"}, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration" + }, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction" + }, + {token : "comment", regex : "<\\!--", next : "comment"}, + { + token : ["punctuation.doctype.begin", "meta.tag.doctype"], + regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype" + }, + {include : "tag"}, + {include : "reference"} + ], + + xml_declaration : [ + {include : "attributes"}, + {include : "instruction"} + ], + + instruction : [ + {token : "punctuation.instruction.end", regex : "\\?>", next : "start"} + ], + + doctype : [ + {include : "space"}, + {include : "string"}, + {token : "punctuation.doctype.end", regex : ">", next : "start"}, + {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"}, + {token : "punctuation.begin", regex : "\\[", push : "declarations"} + ], + + declarations : [{ + token : "text", + regex : "\\s+" + }, { + token: "punctuation.end", + regex: "]", + next: "pop" + }, { + token : ["punctuation.begin", "keyword"], + regex : "(<\\!)([-_a-zA-Z0-9]+)", + push : [{ + token : "text", + regex : "\\s+" + }, + { + token : "punctuation.end", + regex : ">", + next : "pop" + }, + {include : "string"}] + }], + + cdata : [ + {token : "string.end", regex : "\\]\\]>", next : "start"}, + {token : "text", regex : "\\s+"}, + {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"} + ], + + comment : [ + {token : "comment", regex : "-->", next : "start"}, + {defaultToken : "comment"} + ], + + tag : [{ + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)", + next: [ + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"} + ] + }, { + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(", next : "start"} + ] + }], + + space : [ + {token : "text", regex : "\\s+"} + ], + + reference : [{ + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, { + token : "invalid.illegal", regex : "&" + }], + + string: [{ + token : "string", + regex : "'", + push : "qstring_inner" + }, { + token : "string", + regex : '"', + push : "qqstring_inner" + }], + + qstring_inner: [ + {token : "string", regex: "'", next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + qqstring_inner: [ + {token : "string", regex: '"', next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + attributes: [{ + token : "entity.other.attribute-name", + regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" + }, { + token : "keyword.operator.separator", + regex : "=" + }, { + include : "space" + }, { + include : "string" + }] + }; + + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; + + +(function() { + + this.embedTagRules = function(HighlightRules, prefix, tag){ + this.$rules.tag.unshift({ + token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(<)(" + tag + ")", + next: [ + {include : "space"}, + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"} + ] + }); + + this.$rules[tag + "-end"] = [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next: "start", + onMatch : function(value, currentState, stack) { + stack.splice(0); + return this.token; + }} + ] + + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(" + }]); + }; + +}).call(TextHighlightRules.prototype); + +oop.inherits(XmlHighlightRules, TextHighlightRules); + +exports.XmlHighlightRules = XmlHighlightRules; +}); + +ace.define('ace/mode/xml_util', ["require", 'exports', 'module' ], function(acequire, exports, module) { + + +function string(state) { + return [{ + token : "string", + regex : '"', + next : state + "_qqstring" + }, { + token : "string", + regex : "'", + next : state + "_qstring" + }]; +} + +function multiLineString(quote, state) { + return [ + {token : "string", regex : quote, next : state}, + { + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, + {defaultToken : "string"} + ]; +} + +exports.tag = function(states, name, nextState, tagMap) { + states[name] = [{ + token : "text", + regex : "\\s+" + }, { + + token : !tagMap ? "meta.tag.tag-name" : function(value) { + if (tagMap[value]) + return "meta.tag.tag-name." + tagMap[value]; + else + return "meta.tag.tag-name"; + }, + regex : "[-_a-zA-Z0-9:]+", + next : name + "_embed_attribute_list" + }, { + token: "empty", + regex: "", + next : name + "_embed_attribute_list" + }]; + + states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list"); + states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list"); + + states[name + "_embed_attribute_list"] = [{ + token : "meta.tag.r", + regex : "/?>", + next : nextState + }, { + token : "keyword.operator", + regex : "=" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "text", + regex : "\\s+" + }].concat(string(name)); +}; + +}); + +ace.define('ace/mode/behaviour/html', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour/xml', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var XmlBehaviour = acequire("../behaviour/xml").XmlBehaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var voidElements = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr']; + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); + return hasType; +} + +var HtmlBehaviour = function () { + + this.inherit(XmlBehaviour); // Get xml behaviour + + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getCursorPosition(); + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken(); + + if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column) + return; + var atCursor = false; + if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text'))); + } else { + atCursor = true; + } + if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) { + return; + } + var element = token.value; + if (atCursor){ + var element = element.substring(0, position.column - token.start); + } + if (voidElements.indexOf(element) !== -1){ + return; + } + return { + text: '>' + '', + selection: [1, 1] + } + } + }); +} +oop.inherits(HtmlBehaviour, XmlBehaviour); + +exports.HtmlBehaviour = HtmlBehaviour; +}); + +ace.define('ace/mode/behaviour/xml', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); + return hasType; +} + +var XmlBehaviour = function () { + + this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour + + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getCursorPosition(); + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken(); + + if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column) + return; + var atCursor = false; + if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text'))); + } else { + atCursor = true; + } + if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) { + return; + } + var tag = token.value; + if (atCursor){ + var tag = tag.substring(0, position.column - token.start); + } + + return { + text: '>' + '', + selection: [1, 1] + } + } + }); + + this.add('autoindent', 'insertion', function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var rightChars = line.substring(cursor.column, cursor.column + 2); + if (rightChars == '?)/; + this._parseTag = function(tag) { + + var match = tag.match(this.tagRe); + var column = 0; + + return { + value: tag, + match: match ? match[2] : "", + closing: match ? !!match[3] : false, + selfClosing: match ? !!match[5] || match[2] == "/>" : false, + tagName: match ? match[4] : "", + column: match[1] ? column + match[1].length : column + }; + }; + this._readTagForward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var value = ""; + var start; + + do { + if (token.type.lastIndexOf("meta.tag", 0) === 0) { + if (!start) { + var start = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + }; + } + value += token.value; + if (value.indexOf(">") !== -1) { + var tag = this._parseTag(value); + tag.start = start; + tag.end = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + token.value.length + }; + iterator.stepForward(); + return tag; + } + } + } while(token = iterator.stepForward()); + + return null; + }; + + this._readTagBackward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var value = ""; + var end; + + do { + if (token.type.lastIndexOf("meta.tag", 0) === 0) { + if (!end) { + end = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + token.value.length + }; + } + value = token.value + value; + if (value.indexOf("<") !== -1) { + var tag = this._parseTag(value); + tag.end = end; + tag.start = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + }; + iterator.stepBackward(); + return tag; + } + } + } while(token = iterator.stepBackward()); + + return null; + }; + + this._pop = function(stack, tag) { + while (stack.length) { + + var top = stack[stack.length-1]; + if (!tag || top.tagName == tag.tagName) { + return stack.pop(); + } + else if (this.voidElements[tag.tagName]) { + return; + } + else if (this.voidElements[top.tagName]) { + stack.pop(); + continue; + } else { + return null; + } + } + }; + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + + if (!firstTag.match) + return null; + + var isBackward = firstTag.closing || firstTag.selfClosing; + var stack = []; + var tag; + + if (!isBackward) { + var iterator = new TokenIterator(session, row, firstTag.column); + var start = { + row: row, + column: firstTag.column + firstTag.tagName.length + 2 + }; + while (tag = this._readTagForward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) + return Range.fromPoints(start, tag.start); + } + else { + stack.push(tag) + } + } + } + else { + var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length); + var end = { + row: row, + column: firstTag.column + }; + + while (tag = this._readTagBackward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (!tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) { + tag.start.column += tag.tagName.length + 2; + return Range.fromPoints(tag.start, end); + } + } + else { + stack.push(tag) + } + } + } + + }; + +}).call(FoldMode.prototype); + +}); + +ace.define('ace/mode/html_completions', ["require", 'exports', 'module' , 'ace/token_iterator'], function(acequire, exports, module) { + + +var TokenIterator = acequire("../token_iterator").TokenIterator; + +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; + +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; + +var globalAttributes = commonAttributes.concat(eventAttributes); + +var attributeMap = { + "html": ["manifest"], + "head": [], + "title": [], + "base": ["href", "target"], + "link": ["href", "hreflang", "rel", "media", "type", "sizes"], + "meta": ["http-equiv", "name", "content", "charset"], + "style": ["type", "media", "scoped"], + "script": ["charset", "type", "src", "defer", "async"], + "noscript": ["href"], + "body": ["onafterprint", "onbeforeprint", "onbeforeunload", "onhashchange", "onmessage", "onoffline", "onpopstate", "onredo", "onresize", "onstorage", "onundo", "onunload"], + "section": [], + "nav": [], + "article": ["pubdate"], + "aside": [], + "h1": [], + "h2": [], + "h3": [], + "h4": [], + "h5": [], + "h6": [], + "header": [], + "footer": [], + "address": [], + "main": [], + "p": [], + "hr": [], + "pre": [], + "blockquote": ["cite"], + "ol": ["start", "reversed"], + "ul": [], + "li": ["value"], + "dl": [], + "dt": [], + "dd": [], + "figure": [], + "figcaption": [], + "div": [], + "a": ["href", "target", "ping", "rel", "media", "hreflang", "type"], + "em": [], + "strong": [], + "small": [], + "s": [], + "cite": [], + "q": ["cite"], + "dfn": [], + "abbr": [], + "data": [], + "time": ["datetime"], + "code": [], + "var": [], + "samp": [], + "kbd": [], + "sub": [], + "sup": [], + "i": [], + "b": [], + "u": [], + "mark": [], + "ruby": [], + "rt": [], + "rp": [], + "bdi": [], + "bdo": [], + "span": [], + "br": [], + "wbr": [], + "ins": ["cite", "datetime"], + "del": ["cite", "datetime"], + "img": ["alt", "src", "height", "width", "usemap", "ismap"], + "iframe": ["name", "src", "height", "width", "sandbox", "seamless"], + "embed": ["src", "height", "width", "type"], + "object": ["param", "data", "type", "height" , "width", "usemap", "name", "form", "classid"], + "param": ["name", "value"], + "video": ["src", "autobuffer", "autoplay", "loop", "controls", "width", "height", "poster"], + "audio": ["src", "autobuffer", "autoplay", "loop", "controls"], + "source": ["src", "type", "media"], + "track": ["kind", "src", "srclang", "label", "default"], + "canvas": ["width", "height"], + "map": ["name"], + "area": ["shape", "coords", "href", "hreflang", "alt", "target", "media", "rel", "ping", "type"], + "svg": [], + "math": [], + "table": ["summary"], + "caption": [], + "colgroup": ["span"], + "col": ["span"], + "tbody": [], + "thead": [], + "tfoot": [], + "tr": [], + "td": ["headers", "rowspan", "colspan"], + "th": ["headers", "rowspan", "colspan", "scope"], + "form": ["accept-charset", "action", "autocomplete", "enctype", "method", "name", "novalidate", "target"], + "fieldset": ["disabled", "form", "name"], + "legend": [], + "label": ["form", "for"], + "input": ["type", "accept", "alt", "autocomplete", "checked", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "height", "list", "max", "maxlength", "min", "multiple", "pattern", "placeholder", "readonly", "acequired", "size", "src", "step", "width", "files", "value"], + "button": ["autofocus", "disabled", "form", "formaction", "formenctype", "formmethod", "formnovalidate", "formtarget", "name", "value", "type"], + "select": ["autofocus", "disabled", "form", "multiple", "name", "size"], + "datalist": [], + "optgroup": ["disabled", "label"], + "option": ["disabled", "selected", "label", "value"], + "textarea": ["autofocus", "disabled", "form", "maxlength", "name", "placeholder", "readonly", "acequired", "rows", "cols", "wrap"], + "keygen": ["autofocus", "challenge", "disabled", "form", "keytype", "name"], + "output": ["for", "form", "name"], + "progress": ["value", "max"], + "meter": ["value", "min", "max", "low", "high", "optimum"], + "details": ["open"], + "summary": [], + "command": ["type", "label", "icon", "disabled", "checked", "radiogroup", "command"], + "menu": ["type", "label"], + "dialog": ["open"] +}; + +var allElements = Object.keys(attributeMap); + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); +} + +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + if (!token || !hasType(token, 'tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'operator') || hasType(token, 'attribute-name') || hasType(token, 'text'))); + } + if (token && hasType(token, 'tag-name') && !iterator.stepBackward().value.match('/')) + return token.value; +} + +var HtmlCompletions = function() { + +}; + +(function() { + + this.getCompletions = function(state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + + if (!token) + return []; + if (hasType(token, "tag-name") || (token.value == '<' && hasType(token, "text"))) + return this.getTagCompletions(state, session, pos, prefix); + if (hasType(token, 'text') || hasType(token, 'attribute-name')) + return this.getAttributeCompetions(state, session, pos, prefix); + + return []; + }; + + this.getTagCompletions = function(state, session, pos, prefix) { + var elements = allElements; + if (prefix) { + elements = elements.filter(function(element){ + return element.indexOf(prefix) === 0; + }); + } + return elements.map(function(element){ + return { + value: element, + meta: "tag" + }; + }); + }; + + this.getAttributeCompetions = function(state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(attributeMap[tagName]); + } + if (prefix) { + attributes = attributes.filter(function(attribute){ + return attribute.indexOf(prefix) === 0; + }); + } + return attributes.map(function(attribute){ + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute" + }; + }); + }; + +}).call(HtmlCompletions.prototype); + +exports.HtmlCompletions = HtmlCompletions; +}); + +ace.define('ace/mode/soy_template_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/html_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var HtmlHighlightRules = acequire("./html_highlight_rules").HtmlHighlightRules; + +var SoyTemplateHighlightRules = function() { + HtmlHighlightRules.call(this); + + var soyRules = { start: + [ { include: '#template' }, + { include: '#if' }, + { include: '#comment-line' }, + { include: '#comment-block' }, + { include: '#comment-doc' }, + { include: '#call' }, + { include: '#css' }, + { include: '#param' }, + { include: '#print' }, + { include: '#msg' }, + { include: '#for' }, + { include: '#foreach' }, + { include: '#switch' }, + { include: '#tag' }, + { include: 'text.html.basic' } ], + '#call': + [ { token: + [ 'punctuation.definition.tag.begin.soy', + 'meta.tag.call.soy' ], + regex: '(\\{/?)(\\s*)(?=call|delcall)', + push: + [ { token: 'punctuation.definition.tag.end.soy', + regex: '\\}', + next: 'pop' }, + { include: '#string-quoted-single' }, + { include: '#string-quoted-double' }, + { token: ['entity.name.tag.soy', 'variable.parameter.soy'], + regex: '(call|delcall)(\\s+[\\.\\w]+)'}, + { token: + [ 'entity.other.attribute-name.soy', + 'text', + 'keyword.operator.soy' ], + regex: '\\b(data)(\\s*)(=)' }, + { defaultToken: 'meta.tag.call.soy' } ] } ], + '#comment-line': + [ { token: + [ 'comment.line.double-slash.soy', + 'punctuation.definition.comment.soy', + 'comment.line.double-slash.soy' ], + regex: '(\\s+)(//)(.*$)' } ], + '#comment-block': + [ { token: 'punctuation.definition.comment.begin.soy', + regex: '/\\*(?!\\*)', + push: + [ { token: 'punctuation.definition.comment.end.soy', + regex: '\\*/', + next: 'pop' }, + { defaultToken: 'comment.block.soy' } ] } ], + '#comment-doc': + [ { token: 'punctuation.definition.comment.begin.soy', + regex: '/\\*\\*(?!/)', + push: + [ { token: 'punctuation.definition.comment.end.soy', + regex: '\\*/', + next: 'pop' }, + { token: [ 'support.type.soy', 'text', 'variable.parameter.soy' ], + regex: '(@param|@param\\?)(\\s+)(\\w+)' }, + { defaultToken: 'comment.block.documentation.soy' } ] } ], + '#css': + [ { token: + [ 'punctuation.definition.tag.begin.soy', + 'meta.tag.css.soy', + 'entity.name.tag.soy' ], + regex: '(\\{/?)(\\s*)(css)\\b', + push: + [ { token: 'punctuation.definition.tag.end.soy', + regex: '\\}', + next: 'pop' }, + { token: 'support.constant.soy', + regex: '\\b(?:LITERAL|REFERENCE|BACKEND_SPECIFIC|GOOG)\\b' }, + { defaultToken: 'meta.tag.css.soy' } ] } ], + '#for': + [ { token: + [ 'punctuation.definition.tag.begin.soy', + 'meta.tag.for.soy', + 'entity.name.tag.soy' ], + regex: '(\\{/?)(\\s*)(for)\\b', + push: + [ { token: 'punctuation.definition.tag.end.soy', + regex: '\\}', + next: 'pop' }, + { token: 'keyword.operator.soy', regex: '\\bin\\b' }, + { token: 'support.function.soy', regex: '\\brange\\b' }, + { include: '#variable' }, + { include: '#number' }, + { include: '#primitive' }, + { defaultToken: 'meta.tag.for.soy' } ] } ], + '#foreach': + [ { token: + [ 'punctuation.definition.tag.begin.soy', + 'meta.tag.foreach.soy', + 'entity.name.tag.soy' ], + regex: '(\\{/?)(\\s*)(foreach)\\b', + push: + [ { token: 'punctuation.definition.tag.end.soy', + regex: '\\}', + next: 'pop' }, + { token: 'keyword.operator.soy', regex: '\\bin\\b' }, + { include: '#variable' }, + { defaultToken: 'meta.tag.foreach.soy' } ] } ], + '#function': + [ { token: 'support.function.soy', + regex: '\\b(?:isFirst|isLast|index|hasData|length|keys|round|floor|ceiling|min|max|randomInt)\\b' } ], + '#if': + [ { token: + [ 'punctuation.definition.tag.begin.soy', + 'meta.tag.if.soy', + 'entity.name.tag.soy' ], + regex: '(\\{/?)(\\s*)(if|elseif)\\b', + push: + [ { token: 'punctuation.definition.tag.end.soy', + regex: '\\}', + next: 'pop' }, + { include: '#variable' }, + { include: '#operator' }, + { include: '#function' }, + { include: '#string-quoted-single' }, + { include: '#string-quoted-double' }, + { defaultToken: 'meta.tag.if.soy' } ] } ], + '#namespace': + [ { token: [ 'entity.name.tag.soy', 'text', 'variable.parameter.soy' ], + regex: '(namespace|delpackage)(\\s+)([\\w\\.]+)' } ], + '#number': [ { token: 'constant.numeric', regex: '[\\d]+' } ], + '#operator': + [ { token: 'keyword.operator.soy', + regex: '==|!=|\\band\\b|\\bor\\b|\\bnot\\b|-|\\+|/|\\?:' } ], + '#param': + [ { token: + [ 'punctuation.definition.tag.begin.soy', + 'meta.tag.param.soy', + 'entity.name.tag.soy' ], + regex: '(\\{/?)(\\s*)(param)', + push: + [ { token: 'punctuation.definition.tag.end.soy', + regex: '\\}', + next: 'pop' }, + { include: '#variable' }, + { token: + [ 'entity.other.attribute-name.soy', + 'text', + 'keyword.operator.soy' ], + regex: '\\b([\\w]*)(\\s*)((?::)?)' }, + { defaultToken: 'meta.tag.param.soy' } ] } ], + '#primitive': + [ { token: 'constant.language.soy', + regex: '\\b(?:null|false|true)\\b' } ], + '#msg': + [ { token: + [ 'punctuation.definition.tag.begin.soy', + 'meta.tag.msg.soy', + 'entity.name.tag.soy' ], + regex: '(\\{/?)(\\s*)(msg)\\b', + push: + [ { token: 'punctuation.definition.tag.end.soy', + regex: '\\}', + next: 'pop' }, + { include: '#string-quoted-single' }, + { include: '#string-quoted-double' }, + { token: + [ 'entity.other.attribute-name.soy', + 'text', + 'keyword.operator.soy' ], + regex: '\\b(meaning|desc)(\\s*)(=)' }, + { defaultToken: 'meta.tag.msg.soy' } ] } ], + '#print': + [ { token: + [ 'punctuation.definition.tag.begin.soy', + 'meta.tag.print.soy', + 'entity.name.tag.soy' ], + regex: '(\\{/?)(\\s*)(print)\\b', + push: + [ { token: 'punctuation.definition.tag.end.soy', + regex: '\\}', + next: 'pop' }, + { include: '#variable' }, + { include: '#print-parameter' }, + { include: '#number' }, + { include: '#primitive' }, + { include: '#attribute-lookup' }, + { defaultToken: 'meta.tag.print.soy' } ] } ], + '#print-parameter': + [ { token: 'keyword.operator.soy', regex: '\\|' }, + { token: 'variable.parameter.soy', + regex: 'noAutoescape|id|escapeHtml|escapeJs|insertWorkBreaks|truncate' } ], + '#special-character': + [ { token: 'support.constant.soy', + regex: '\\bsp\\b|\\bnil\\b|\\\\r|\\\\n|\\\\t|\\blb\\b|\\brb\\b' } ], + '#string-quoted-double': [ { token: 'string.quoted.double', regex: '"[^"]*"' } ], + '#string-quoted-single': [ { token: 'string.quoted.single', regex: '\'[^\']*\'' } ], + '#switch': + [ { token: + [ 'punctuation.definition.tag.begin.soy', + 'meta.tag.switch.soy', + 'entity.name.tag.soy' ], + regex: '(\\{/?)(\\s*)(switch|case)\\b', + push: + [ { token: 'punctuation.definition.tag.end.soy', + regex: '\\}', + next: 'pop' }, + { include: '#variable' }, + { include: '#function' }, + { include: '#number' }, + { include: '#string-quoted-single' }, + { include: '#string-quoted-double' }, + { defaultToken: 'meta.tag.switch.soy' } ] } ], + '#attribute-lookup': + [ { token: 'punctuation.definition.attribute-lookup.begin.soy', + regex: '\\[', + push: + [ { token: 'punctuation.definition.attribute-lookup.end.soy', + regex: '\\]', + next: 'pop' }, + { include: '#variable' }, + { include: '#function' }, + { include: '#operator' }, + { include: '#number' }, + { include: '#primitive' }, + { include: '#string-quoted-single' }, + { include: '#string-quoted-double' } ] } ], + '#tag': + [ { token: 'punctuation.definition.tag.begin.soy', + regex: '\\{', + push: + [ { token: 'punctuation.definition.tag.end.soy', + regex: '\\}', + next: 'pop' }, + { include: '#namespace' }, + { include: '#variable' }, + { include: '#special-character' }, + { include: '#tag-simple' }, + { include: '#function' }, + { include: '#operator' }, + { include: '#attribute-lookup' }, + { include: '#number' }, + { include: '#primitive' }, + { include: '#print-parameter' } ] } ], + '#tag-simple': + [ { token: 'entity.name.tag.soy', + regex: '{{\\s*(?:literal|else|ifempty|default)\\s*(?=\\})'} ], + '#template': + [ { token: + [ 'punctuation.definition.tag.begin.soy', + 'meta.tag.template.soy' ], + regex: '(\\{/?)(\\s*)(?=template|deltemplate)', + push: + [ { token: 'punctuation.definition.tag.end.soy', + regex: '\\}', + next: 'pop' }, + { token: ['entity.name.tag.soy', 'text', 'entity.name.function.soy' ], + regex: '(template|deltemplate)(\\s+)([\\.\\w]+)', + originalRegex: '(?<=template|deltemplate)\\s+([\\.\\w]+)' }, + { token: + [ 'entity.other.attribute-name.soy', + 'text', + 'keyword.operator.soy', + 'text', + 'string.quoted.double.soy' ], + regex: '\\b(private)(\\s*)(=)(\\s*)("true"|"false")' }, + { token: + [ 'entity.other.attribute-name.soy', + 'text', + 'keyword.operator.soy', + 'text', + 'string.quoted.single.soy' ], + regex: '\\b(private)(\\s*)(=)(\\s*)(\'true\'|\'false\')' }, + { token: + [ 'entity.other.attribute-name.soy', + 'text', + 'keyword.operator.soy', + 'text', + 'string.quoted.double.soy' ], + regex: '\\b(autoescape)(\\s*)(=)(\\s*)("true"|"false"|"contextual")' }, + { token: + [ 'entity.other.attribute-name.soy', + 'text', + 'keyword.operator.soy', + 'text', + 'string.quoted.single.soy' ], + regex: '\\b(autoescape)(\\s*)(=)(\\s*)(\'true\'|\'false\'|\'contextual\')' }, + { defaultToken: 'meta.tag.template.soy' } ] } ], + '#variable': [ { token: 'variable.other.soy', regex: '\\$[\\w\\.]+' } ] } + + + for (var i in soyRules) { + if (this.$rules[i]) { + this.$rules[i].unshift.call(this.$rules[i], soyRules[i]); + } else { + this.$rules[i] = soyRules[i]; + } + } + + this.normalizeRules(); +}; + +SoyTemplateHighlightRules.metaData = { comment: 'SoyTemplate', + fileTypes: [ 'soy' ], + firstLineMatch: '\\{\\s*namespace\\b', + foldingStartMarker: '\\{\\s*template\\s+[^\\}]*\\}', + foldingStopMarker: '\\{\\s*/\\s*template\\s*\\}', + name: 'SoyTemplate', + scopeName: 'source.soy' } + + +oop.inherits(SoyTemplateHighlightRules, HtmlHighlightRules); + +exports.SoyTemplateHighlightRules = SoyTemplateHighlightRules; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/brace/mode/space.js b/pitfall/pdfkit/node_modules/brace/mode/space.js new file mode 100644 index 00000000..be4a8939 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/space.js @@ -0,0 +1,159 @@ +ace.define('ace/mode/space', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/folding/coffee', 'ace/mode/space_highlight_rules'], function(acequire, exports, module) { + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var FoldMode = acequire("./folding/coffee").FoldMode; +var SpaceHighlightRules = acequire("./space_highlight_rules").SpaceHighlightRules; +var Mode = function() { + var highlighter = new SpaceHighlightRules(); + this.$tokenizer = new Tokenizer(highlighter.getRules()); + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); +(function() { + +}).call(Mode.prototype); +exports.Mode = Mode; +}); + +ace.define('ace/mode/folding/coffee', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var BaseFoldMode = acequire("./fold_mode").FoldMode; +var Range = acequire("../../range").Range; + +var FoldMode = exports.FoldMode = function() {}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var range = this.indentationBlock(session, row); + if (range) + return range; + + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1 || line[startLevel] != "#") + return; + + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + + while (++row < maxRow) { + line = session.getLine(row); + var level = line.search(re); + + if (level == -1) + continue; + + if (line[level] != "#") + break; + + endRow = row; + } + + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + + if (prevIndent!= -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + + if (indent < nextIndent) + return "start"; + else + return ""; + }; + +}).call(FoldMode.prototype); + +}); +ace.define('ace/mode/space_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var SpaceHighlightRules = function() { + this.$rules = { + "start" : [ + { + token : "empty_line", + regex : / */, + next : "key" + }, + { + token : "empty_line", + regex : /$/, + next : "key" + } + ], + "key" : [ + { + token : "variable", + regex : /\S+/ + }, + { + token : "empty_line", + regex : /$/, + next : "start" + },{ + token : "keyword.operator", + regex : / /, + next : "value" + } + ], + "value" : [ + { + token : "keyword.operator", + regex : /$/, + next : "start" + }, + { + token : "string", + regex : /[^$]/ + } + ] + }; + +}; + +oop.inherits(SpaceHighlightRules, TextHighlightRules); + +exports.SpaceHighlightRules = SpaceHighlightRules; +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/sql.js b/pitfall/pdfkit/node_modules/brace/mode/sql.js new file mode 100644 index 00000000..e237d6ee --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/sql.js @@ -0,0 +1,118 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/sql', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/sql_highlight_rules', 'ace/range'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var SqlHighlightRules = acequire("./sql_highlight_rules").SqlHighlightRules; +var Range = acequire("../range").Range; + +var Mode = function() { + this.HighlightRules = SqlHighlightRules; +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "--"; + +}).call(Mode.prototype); + +exports.Mode = Mode; + +}); + +ace.define('ace/mode/sql_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var SqlHighlightRules = function() { + + var keywords = ( + "select|insert|update|delete|from|where|and|or|group|by|order|limit|offset|having|as|case|" + + "when|else|end|type|left|right|join|on|outer|desc|asc" + ); + + var builtinConstants = ( + "true|false|null" + ); + + var builtinFunctions = ( + "count|min|max|avg|sum|rank|now|coalesce" + ); + + var keywordMapper = this.createKeywordMapper({ + "support.function": builtinFunctions, + "keyword": keywords, + "constant.language": builtinConstants + }, "identifier", true); + + this.$rules = { + "start" : [ { + token : "comment", + regex : "--.*$" + }, { + token : "string", // " string + regex : '".*?"' + }, { + token : "string", // ' string + regex : "'.*?'" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator", + regex : "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=" + }, { + token : "paren.lparen", + regex : "[\\(]" + }, { + token : "paren.rparen", + regex : "[\\)]" + }, { + token : "text", + regex : "\\s+" + } ] + }; +}; + +oop.inherits(SqlHighlightRules, TextHighlightRules); + +exports.SqlHighlightRules = SqlHighlightRules; +}); + diff --git a/pitfall/pdfkit/node_modules/brace/mode/stylus.js b/pitfall/pdfkit/node_modules/brace/mode/stylus.js new file mode 100644 index 00000000..44b9f565 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/stylus.js @@ -0,0 +1,446 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2012, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * Contributor(s): + * + * + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/stylus', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/stylus_highlight_rules', 'ace/mode/folding/coffee'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var StylusHighlightRules = acequire("./stylus_highlight_rules").StylusHighlightRules; +var FoldMode = acequire("./folding/coffee").FoldMode; + +var Mode = function() { + this.HighlightRules = StylusHighlightRules; + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/stylus_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules', 'ace/mode/css_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var CssHighlightRules = acequire("./css_highlight_rules"); + +var StylusHighlightRules = function() { + + var keywordMapper = this.createKeywordMapper({ + "support.type": CssHighlightRules.supportType, + "support.function": CssHighlightRules.supportFunction, + "support.constant": CssHighlightRules.supportConstant, + "support.constant.color": CssHighlightRules.supportConstantColor, + "support.constant.fonts": CssHighlightRules.supportConstantFonts + }, "text", true); + + this.$rules = { + start: [ + { + token : "comment", + regex : /\/\/.*$/ + }, + { + token : "comment", // multi line comment + regex : /\/\*/, + next : "comment" + }, + { + token: ["entity.name.function.stylus", "text"], + regex: "^([-a-zA-Z_][-\\w]*)?(\\()" + }, + { + token: ["entity.other.attribute-name.class.stylus"], + regex: "\\.-?[_a-zA-Z]+[_a-zA-Z0-9-]*" + }, + { + token: ["entity.language.stylus"], + regex: "^ *&" + }, + { + token: ["variable.language.stylus"], + regex: "(arguments)" + }, + { + token: ["keyword.stylus"], + regex: "@[-\\w]+" + }, + { + token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex : CssHighlightRules.pseudoElements + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex : CssHighlightRules.pseudoClasses + }, + { + token: ["entity.name.tag.stylus"], + regex: "(?:\\b)(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|datalist|dd|del|details|dfn|dialog|div|dl|dt|em|eventsource|fieldset|figure|figcaption|footer|form|frame|frameset|(?:h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|label|legend|li|link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|samp|script|section|select|small|span|strike|strong|style|sub|summary|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)(?:\\b)" + }, + { + token : "constant.numeric", // hex6 color + regex : "#[a-f0-9]{6}" + }, + { + token : "constant.numeric", // hex3 color + regex : "#[a-f0-9]{3}" + }, + { + token: ["punctuation.definition.entity.stylus", "entity.other.attribute-name.id.stylus"], + regex: "(#)([a-zA-Z][a-zA-Z0-9_-]*)" + }, + { + token: "meta.vendor-prefix.stylus", + regex: "-webkit-|-moz\\-|-ms-|-o-" + }, + { + token: "keyword.control.stylus", + regex: "(?:!important|for|in|return|true|false|null|if|else|unless|return)\\b" + }, + { + token: "keyword.operator.stylus", + regex: "!|~|\\+|-|(?:\\*)?\\*|\\/|%|(?:\\.)\\.\\.|<|>|(?:=|:|\\?|\\+|-|\\*|\\/|%|<|>)?=|!=" + }, + { + token: "keyword.operator.stylus", + regex: "(?:in|is(?:nt)?|not)\\b" + }, + { + token : "string", + regex : "'(?=.)", + next : "qstring" + }, { + token : "string", + regex : '"(?=.)', + next : "qqstring" + }, + { + token : "constant.numeric", + regex : CssHighlightRules.numRe + }, + { + token : "keyword", + regex : "(?:ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)\\b" + }, + { + token : keywordMapper, + regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + } + ], + "comment" : [ + { + token : "comment", // closing comment + regex : ".*?\\*\\/", + next : "start" + }, { + token : "comment", // comment spanning whole line + regex : ".+" + } + ], + "qqstring" : [ + { + token : "string", + regex : '[^"\\\\]+' + }, + { + token : "string", + regex : "\\\\$", + next : "qqstring" + }, + { + token : "string", + regex : '"|$', + next : "start" + } + ], + "qstring" : [ + { + token : "string", + regex : "[^'\\\\]+" + }, + { + token : "string", + regex : "\\\\$", + next : "qstring" + }, + { + token : "string", + regex : "'|$", + next : "start" + } + ] +} + +}; + +oop.inherits(StylusHighlightRules, TextHighlightRules); + +exports.StylusHighlightRules = StylusHighlightRules; +}); + +ace.define('ace/mode/css_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; + +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|acequired|root|target|valid|visited)\\b"; + +var CssHighlightRules = function() { + + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + + this.$rules = { + "start" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "@.*?{", + push: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "media" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "\\}", + next: "pop" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "comment" : [{ + token : "comment", + regex : "\\*\\/", + next : "pop" + }, { + defaultToken : "comment" + }], + + "ruleset" : [ + { + token : "paren.rparen", + regex : "\\}", + next: "pop" + }, { + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : ["constant.numeric", "keyword"], + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + }, { + token : "constant.numeric", + regex : numRe + }, { + token : "constant.numeric", // hex6 color + regex : "#[a-f0-9]{6}" + }, { + token : "constant.numeric", // hex3 color + regex : "#[a-f0-9]{3}" + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex : pseudoElements + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex : pseudoClasses + }, { + token : ["support.function", "string", "support.function"], + regex : "(url\\()(.*)(\\))" + }, { + token : keywordMapper, + regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + caseInsensitive: true + }] + }; + + this.normalizeRules(); +}; + +oop.inherits(CssHighlightRules, TextHighlightRules); + +exports.CssHighlightRules = CssHighlightRules; + +}); + +ace.define('ace/mode/folding/coffee', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var BaseFoldMode = acequire("./fold_mode").FoldMode; +var Range = acequire("../../range").Range; + +var FoldMode = exports.FoldMode = function() {}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var range = this.indentationBlock(session, row); + if (range) + return range; + + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1 || line[startLevel] != "#") + return; + + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + + while (++row < maxRow) { + line = session.getLine(row); + var level = line.search(re); + + if (level == -1) + continue; + + if (line[level] != "#") + break; + + endRow = row; + } + + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + + if (prevIndent!= -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + + if (indent < nextIndent) + return "start"; + else + return ""; + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/svg.js b/pitfall/pdfkit/node_modules/brace/mode/svg.js new file mode 100644 index 00000000..dfef2439 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/svg.js @@ -0,0 +1,1620 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/svg', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml', 'ace/mode/javascript', 'ace/tokenizer', 'ace/mode/svg_highlight_rules', 'ace/mode/folding/mixed', 'ace/mode/folding/xml', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var XmlMode = acequire("./xml").Mode; +var JavaScriptMode = acequire("./javascript").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var SvgHighlightRules = acequire("./svg_highlight_rules").SvgHighlightRules; +var MixedFoldMode = acequire("./folding/mixed").FoldMode; +var XmlFoldMode = acequire("./folding/xml").FoldMode; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + XmlMode.call(this); + + this.HighlightRules = SvgHighlightRules; + + this.createModeDelegates({ + "js-": JavaScriptMode + }); + + this.foldingRules = new MixedFoldMode(new XmlFoldMode({}), { + "js-": new CStyleFoldMode() + }); +}; + +oop.inherits(Mode, XmlMode); + +(function() { + + this.getNextLineIndent = function(state, line, tab) { + return this.$getIndent(line); + }; + + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/xml', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/xml_highlight_rules', 'ace/mode/behaviour/xml', 'ace/mode/folding/xml'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var XmlHighlightRules = acequire("./xml_highlight_rules").XmlHighlightRules; +var XmlBehaviour = acequire("./behaviour/xml").XmlBehaviour; +var XmlFoldMode = acequire("./folding/xml").FoldMode; + +var Mode = function() { + this.HighlightRules = XmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.foldingRules = new XmlFoldMode(); +}; + +oop.inherits(Mode, TextMode); + +(function() { + + this.blockComment = {start: ""}; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/xml_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var xmlUtil = acequire("./xml_util"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var XmlHighlightRules = function(normalize) { + this.$rules = { + start : [ + {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"}, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration" + }, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction" + }, + {token : "comment", regex : "<\\!--", next : "comment"}, + { + token : ["punctuation.doctype.begin", "meta.tag.doctype"], + regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype" + }, + {include : "tag"}, + {include : "reference"} + ], + + xml_declaration : [ + {include : "attributes"}, + {include : "instruction"} + ], + + instruction : [ + {token : "punctuation.instruction.end", regex : "\\?>", next : "start"} + ], + + doctype : [ + {include : "space"}, + {include : "string"}, + {token : "punctuation.doctype.end", regex : ">", next : "start"}, + {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"}, + {token : "punctuation.begin", regex : "\\[", push : "declarations"} + ], + + declarations : [{ + token : "text", + regex : "\\s+" + }, { + token: "punctuation.end", + regex: "]", + next: "pop" + }, { + token : ["punctuation.begin", "keyword"], + regex : "(<\\!)([-_a-zA-Z0-9]+)", + push : [{ + token : "text", + regex : "\\s+" + }, + { + token : "punctuation.end", + regex : ">", + next : "pop" + }, + {include : "string"}] + }], + + cdata : [ + {token : "string.end", regex : "\\]\\]>", next : "start"}, + {token : "text", regex : "\\s+"}, + {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"} + ], + + comment : [ + {token : "comment", regex : "-->", next : "start"}, + {defaultToken : "comment"} + ], + + tag : [{ + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)", + next: [ + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"} + ] + }, { + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(", next : "start"} + ] + }], + + space : [ + {token : "text", regex : "\\s+"} + ], + + reference : [{ + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, { + token : "invalid.illegal", regex : "&" + }], + + string: [{ + token : "string", + regex : "'", + push : "qstring_inner" + }, { + token : "string", + regex : '"', + push : "qqstring_inner" + }], + + qstring_inner: [ + {token : "string", regex: "'", next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + qqstring_inner: [ + {token : "string", regex: '"', next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + attributes: [{ + token : "entity.other.attribute-name", + regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" + }, { + token : "keyword.operator.separator", + regex : "=" + }, { + include : "space" + }, { + include : "string" + }] + }; + + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; + + +(function() { + + this.embedTagRules = function(HighlightRules, prefix, tag){ + this.$rules.tag.unshift({ + token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(<)(" + tag + ")", + next: [ + {include : "space"}, + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"} + ] + }); + + this.$rules[tag + "-end"] = [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next: "start", + onMatch : function(value, currentState, stack) { + stack.splice(0); + return this.token; + }} + ] + + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(" + }]); + }; + +}).call(TextHighlightRules.prototype); + +oop.inherits(XmlHighlightRules, TextHighlightRules); + +exports.XmlHighlightRules = XmlHighlightRules; +}); + +ace.define('ace/mode/xml_util', ["require", 'exports', 'module' ], function(acequire, exports, module) { + + +function string(state) { + return [{ + token : "string", + regex : '"', + next : state + "_qqstring" + }, { + token : "string", + regex : "'", + next : state + "_qstring" + }]; +} + +function multiLineString(quote, state) { + return [ + {token : "string", regex : quote, next : state}, + { + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, + {defaultToken : "string"} + ]; +} + +exports.tag = function(states, name, nextState, tagMap) { + states[name] = [{ + token : "text", + regex : "\\s+" + }, { + + token : !tagMap ? "meta.tag.tag-name" : function(value) { + if (tagMap[value]) + return "meta.tag.tag-name." + tagMap[value]; + else + return "meta.tag.tag-name"; + }, + regex : "[-_a-zA-Z0-9:]+", + next : name + "_embed_attribute_list" + }, { + token: "empty", + regex: "", + next : name + "_embed_attribute_list" + }]; + + states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list"); + states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list"); + + states[name + "_embed_attribute_list"] = [{ + token : "meta.tag.r", + regex : "/?>", + next : nextState + }, { + token : "keyword.operator", + regex : "=" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "text", + regex : "\\s+" + }].concat(string(name)); +}; + +}); + +ace.define('ace/mode/behaviour/xml', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); + return hasType; +} + +var XmlBehaviour = function () { + + this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour + + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getCursorPosition(); + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken(); + + if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column) + return; + var atCursor = false; + if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text'))); + } else { + atCursor = true; + } + if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) { + return; + } + var tag = token.value; + if (atCursor){ + var tag = tag.substring(0, position.column - token.start); + } + + return { + text: '>' + '', + selection: [1, 1] + } + } + }); + + this.add('autoindent', 'insertion', function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var rightChars = line.substring(cursor.column, cursor.column + 2); + if (rightChars == ' -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/xml', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var lang = acequire("../../lib/lang"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + +var FoldMode = exports.FoldMode = function(voidElements) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.getFoldWidget = function(session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + + if (tag.closing) + return foldStyle == "markbeginend" ? "end" : ""; + + if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()]) + return ""; + + if (tag.selfClosing) + return ""; + + if (tag.value.indexOf("/" + tag.tagName) !== -1) + return ""; + + return "start"; + }; + + this._getFirstTagInLine = function(session, row) { + var tokens = session.getTokens(row); + var value = ""; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + if (token.type.lastIndexOf("meta.tag", 0) === 0) + value += token.value; + else + value += lang.stringRepeat(" ", token.value.length); + } + + return this._parseTag(value); + }; + + this.tagRe = /^(\s*)(?)/; + this._parseTag = function(tag) { + + var match = tag.match(this.tagRe); + var column = 0; + + return { + value: tag, + match: match ? match[2] : "", + closing: match ? !!match[3] : false, + selfClosing: match ? !!match[5] || match[2] == "/>" : false, + tagName: match ? match[4] : "", + column: match[1] ? column + match[1].length : column + }; + }; + this._readTagForward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var value = ""; + var start; + + do { + if (token.type.lastIndexOf("meta.tag", 0) === 0) { + if (!start) { + var start = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + }; + } + value += token.value; + if (value.indexOf(">") !== -1) { + var tag = this._parseTag(value); + tag.start = start; + tag.end = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + token.value.length + }; + iterator.stepForward(); + return tag; + } + } + } while(token = iterator.stepForward()); + + return null; + }; + + this._readTagBackward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var value = ""; + var end; + + do { + if (token.type.lastIndexOf("meta.tag", 0) === 0) { + if (!end) { + end = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + token.value.length + }; + } + value = token.value + value; + if (value.indexOf("<") !== -1) { + var tag = this._parseTag(value); + tag.end = end; + tag.start = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + }; + iterator.stepBackward(); + return tag; + } + } + } while(token = iterator.stepBackward()); + + return null; + }; + + this._pop = function(stack, tag) { + while (stack.length) { + + var top = stack[stack.length-1]; + if (!tag || top.tagName == tag.tagName) { + return stack.pop(); + } + else if (this.voidElements[tag.tagName]) { + return; + } + else if (this.voidElements[top.tagName]) { + stack.pop(); + continue; + } else { + return null; + } + } + }; + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + + if (!firstTag.match) + return null; + + var isBackward = firstTag.closing || firstTag.selfClosing; + var stack = []; + var tag; + + if (!isBackward) { + var iterator = new TokenIterator(session, row, firstTag.column); + var start = { + row: row, + column: firstTag.column + firstTag.tagName.length + 2 + }; + while (tag = this._readTagForward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) + return Range.fromPoints(start, tag.start); + } + else { + stack.push(tag) + } + } + } + else { + var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length); + var end = { + row: row, + column: firstTag.column + }; + + while (tag = this._readTagBackward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (!tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) { + tag.start.column += tag.tagName.length + 2; + return Range.fromPoints(tag.start, end); + } + } + else { + stack.push(tag) + } + } + } + + }; + +}).call(FoldMode.prototype); + +}); + +ace.define('ace/mode/javascript', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = JavaScriptHighlightRules; + + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/javascript"), "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + + worker.on("jslint", function(results) { + session.setAnnotations(results.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/javascript_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var JavaScriptHighlightRules = function() { + var keywordMapper = this.createKeywordMapper({ + "variable.language": + "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document" , // Pseudo + "keyword": + "const|yield|import|get|set|" + + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", + "storage.type": + "const|let|var|function", + "constant.language": + "null|Infinity|NaN|undefined", + "support.function": + "alert", + "constant.language.boolean": "true|false" + }, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; + + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-6][0-7]?|" + // oct + "37[0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + + this.$rules = { + "no_regex" : [ + { + token : "comment", + regex : "\\/\\/", + next : "line_comment" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : /\/\*/, + next : "comment" + }, { + token : "string", + regex : "'(?=.)", + next : "qstring" + }, { + token : "string", + regex : '"(?=.)', + next : "qqstring" + }, { + token : "constant.numeric", // hex + regex : /0[xX][0-9a-fA-F]+\b/ + }, { + token : "constant.numeric", // float + regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ + }, { + token : [ + "storage.type", "punctuation.operator", "support.function", + "punctuation.operator", "entity.name.function", "text","keyword.operator" + ], + regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "paren.lparen" + ], + regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "text", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : "keyword", + regex : "(?:" + kwBeforeRe + ")\\b", + next : "start" + }, { + token : ["punctuation.operator", "support.function"], + regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token : ["punctuation.operator", "support.function.dom"], + regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token : ["punctuation.operator", "support.constant"], + regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token : ["storage.type", "punctuation.operator", "support.function.firebug"], + regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/ + }, { + token : keywordMapper, + regex : identifierRe + }, { + token : "keyword.operator", + regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, + next : "start" + }, { + token : "punctuation.operator", + regex : /\?|\:|\,|\;|\./, + next : "start" + }, { + token : "paren.lparen", + regex : /[\[({]/, + next : "start" + }, { + token : "paren.rparen", + regex : /[\])}]/ + }, { + token : "keyword.operator", + regex : /\/=?/, + next : "start" + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment_regex_allowed" + }, { + token : "comment", + regex : "\\/\\/", + next : "line_comment_regex_allowed" + }, { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token : "text", + regex : "\\s+|^$", + next : "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/\\w*", + next: "no_regex" + }, { + token : "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token : "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/ + }, { + token : "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "function_arguments": [ + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "[, ]+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "comment_regex_allowed" : [ + {token : "comment", regex : "\\*\\/", next : "start"}, + {defaultToken : "comment"} + ], + "comment" : [ + {token : "comment", regex : "\\*\\/", next : "no_regex"}, + {defaultToken : "comment"} + ], + "line_comment_regex_allowed" : [ + {token : "comment", regex : "$|^", next : "start"}, + {defaultToken : "comment"} + ], + "line_comment" : [ + {token : "comment", regex : "$|^", next : "no_regex"}, + {defaultToken : "comment"} + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qqstring" + }, { + token : "string", + regex : '"|$', + next : "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qstring" + }, { + token : "string", + regex : "'|$", + next : "no_regex" + }, { + defaultToken: "string" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("no_regex") ]); +}; + +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); + +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); + +ace.define('ace/mode/svg_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = acequire("./xml_highlight_rules").XmlHighlightRules; + +var SvgHighlightRules = function() { + XmlHighlightRules.call(this); + + this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); + + this.normalizeRules(); +}; + +oop.inherits(SvgHighlightRules, XmlHighlightRules); + +exports.SvgHighlightRules = SvgHighlightRules; +}); + +ace.define('ace/mode/folding/mixed', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(defaultMode, subModes) { + this.defaultMode = defaultMode; + this.subModes = subModes; +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + + this.$getMode = function(state) { + if (typeof state != "string") + state = state[0]; + for (var key in this.subModes) { + if (state.indexOf(key) === 0) + return this.subModes[key]; + } + return null; + }; + + this.$tryMode = function(state, session, foldStyle, row) { + var mode = this.$getMode(state); + return (mode ? mode.getFoldWidget(session, foldStyle, row) : ""); + }; + + this.getFoldWidget = function(session, foldStyle, row) { + return ( + this.$tryMode(session.getState(row-1), session, foldStyle, row) || + this.$tryMode(session.getState(row), session, foldStyle, row) || + this.defaultMode.getFoldWidget(session, foldStyle, row) + ); + }; + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var mode = this.$getMode(session.getState(row-1)); + + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.$getMode(session.getState(row)); + + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.defaultMode; + + return mode.getFoldWidgetRange(session, foldStyle, row); + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/tcl.js b/pitfall/pdfkit/node_modules/brace/mode/tcl.js new file mode 100644 index 00000000..b86f80aa --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/tcl.js @@ -0,0 +1,360 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/tcl', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/folding/cstyle', 'ace/mode/tcl_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; +var TclHighlightRules = acequire("./tcl_highlight_rules").TclHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; + +var Mode = function() { + this.HighlightRules = TclHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "#"; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); + +ace.define('ace/mode/tcl_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var TclHighlightRules = function() { + + this.$rules = { + "start" : [ + { + token : "comment", + regex : "#.*\\\\$", + next : "commentfollow" + }, { + token : "comment", + regex : "#.*$" + }, { + token : "support.function", + regex : '[\\\\]$', + next : "splitlineStart" + }, { + token : "text", + regex : '[\\\\](?:["]|[{]|[}]|[[]|[]]|[$]|[\])' + }, { + token : "text", // last value before command + regex : '^|[^{][;][^}]|[/\r/]', + next : "commandItem" + }, { + token : "string", // single line + regex : '[ ]*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // multi line """ string start + regex : '[ ]*["]', + next : "qqstring" + }, { + token : "variable.instance", + regex : "[$]", + next : "variable" + }, { + token : "support.function", + regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|{\\*}|;|::" + }, { + token : "identifier", + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "paren.lparen", + regex : "[[{]", + next : "commandItem" + }, { + token : "paren.lparen", + regex : "[(]" + }, { + token : "paren.rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + } + ], + "commandItem" : [ + { + token : "comment", + regex : "#.*\\\\$", + next : "commentfollow" + }, { + token : "comment", + regex : "#.*$", + next : "start" + }, { + token : "string", // single line + regex : '[ ]*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "variable.instance", + regex : "[$]", + next : "variable" + }, { + token : "support.function", + regex : "(?:[:][:])[a-zA-Z0-9_/]+(?:[:][:])", + next : "commandItem" + }, { + token : "support.function", + regex : "[a-zA-Z0-9_/]+(?:[:][:])", + next : "commandItem" + }, { + token : "support.function", + regex : "(?:[:][:])", + next : "commandItem" + }, { + token : "paren.rparen", + regex : "[\\])}]" + }, { + token : "support.function", + regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|{\\*}|;|::" + }, { + token : "keyword", + regex : "[a-zA-Z0-9_/]+", + next : "start" + } ], + "commentfollow" : [ + { + token : "comment", + regex : ".*\\\\$", + next : "commentfollow" + }, { + token : "comment", + regex : '.+', + next : "start" + } ], + "splitlineStart" : [ + { + token : "text", + regex : "^.", + next : "start" + }], + "variable" : [ + { + token : "variable.instance", // variable tcl + regex : "[a-zA-Z_\\d]+(?:[(][a-zA-Z_\\d]+[)])?", + next : "start" + }, { + token : "variable.instance", // variable tcl with braces + regex : "{?[a-zA-Z_\\d]+}?", + next : "start" + }], + "qqstring" : [ { + token : "string", // multi line """ string end + regex : '(?:[^\\\\]|\\\\.)*?["]', + next : "start" + }, { + token : "string", + regex : '.+' + } ] + }; +}; + +oop.inherits(TclHighlightRules, TextHighlightRules); + +exports.TclHighlightRules = TclHighlightRules; +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/tex.js b/pitfall/pdfkit/node_modules/brace/mode/tex.js new file mode 100644 index 00000000..b1caa2de --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/tex.js @@ -0,0 +1,186 @@ +/* + * tex.js + * + * Copyright (C) 2009-11 by RStudio, Inc. + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * + */ +ace.define('ace/mode/tex', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/text_highlight_rules', 'ace/mode/tex_highlight_rules', 'ace/mode/matching_brace_outdent'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var TexHighlightRules = acequire("./tex_highlight_rules").TexHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; + +var Mode = function(suppressHighlighting) { + if (suppressHighlighting) + this.HighlightRules = TextHighlightRules; + else + this.HighlightRules = TexHighlightRules; + this.$outdent = new MatchingBraceOutdent(); +}; +oop.inherits(Mode, TextMode); + +(function() { + this.getNextLineIndent = function(state, line, tab) { + return this.$getIndent(line); + }; + + this.allowAutoInsert = function() { + return false; + }; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); +ace.define('ace/mode/tex_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var TexHighlightRules = function(textClass) { + + if (!textClass) + textClass = "text"; + + this.$rules = { + "start" : [ + { + token : "comment", + regex : "%.*$" + }, { + token : textClass, // non-command + regex : "\\\\[$&%#\\{\\}]" + }, { + token : "keyword", // command + regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b", + next : "nospell" + }, { + token : "keyword", // command + regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])" + }, { + token : "paren.keyword.operator", + regex : "[[({]" + }, { + token : "paren.keyword.operator", + regex : "[\\])}]" + }, { + token : textClass, + regex : "\\s+" + } + ], + "nospell" : [ + { + token : "comment", + regex : "%.*$", + next : "start" + }, { + token : "nospell." + textClass, // non-command + regex : "\\\\[$&%#\\{\\}]" + }, { + token : "keyword", // command + regex : "\\\\(?:documentclass|usepackage|newcounter|setcounter|addtocounter|value|arabic|stepcounter|newenvironment|renewenvironment|ref|vref|eqref|pageref|label|cite[a-zA-Z]*|tag|begin|end|bibitem)\\b" + }, { + token : "keyword", // command + regex : "\\\\(?:[a-zA-z0-9]+|[^a-zA-z0-9])", + next : "start" + }, { + token : "paren.keyword.operator", + regex : "[[({]" + }, { + token : "paren.keyword.operator", + regex : "[\\])]" + }, { + token : "paren.keyword.operator", + regex : "}", + next : "start" + }, { + token : "nospell." + textClass, + regex : "\\s+" + }, { + token : "nospell." + textClass, + regex : "\\w+" + } + ] + }; +}; + +oop.inherits(TexHighlightRules, TextHighlightRules); + +exports.TexHighlightRules = TexHighlightRules; +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/text.js b/pitfall/pdfkit/node_modules/brace/mode/text.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/brace/mode/textile.js b/pitfall/pdfkit/node_modules/brace/mode/textile.js new file mode 100644 index 00000000..fde056f0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/textile.js @@ -0,0 +1,170 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/textile', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/textile_highlight_rules', 'ace/mode/matching_brace_outdent'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var TextileHighlightRules = acequire("./textile_highlight_rules").TextileHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; + +var Mode = function() { + this.HighlightRules = TextileHighlightRules; + this.$outdent = new MatchingBraceOutdent(); +}; +oop.inherits(Mode, TextMode); + +(function() { + this.getNextLineIndent = function(state, line, tab) { + if (state == "intag") + return tab; + + return ""; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; + +}); + +ace.define('ace/mode/textile_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var TextileHighlightRules = function() { + this.$rules = { + "start" : [ + { + token : function(value) { + if (value.charAt(0) == "h") + return "markup.heading." + value.charAt(1); + else + return "markup.heading"; + }, + regex : "h1|h2|h3|h4|h5|h6|bq|p|bc|pre", + next : "blocktag" + }, + { + token : "keyword", + regex : "[\\*]+|[#]+" + }, + { + token : "text", + regex : ".+" + } + ], + "blocktag" : [ + { + token : "keyword", + regex : "\\. ", + next : "start" + }, + { + token : "keyword", + regex : "\\(", + next : "blocktagproperties" + } + ], + "blocktagproperties" : [ + { + token : "keyword", + regex : "\\)", + next : "blocktag" + }, + { + token : "string", + regex : "[a-zA-Z0-9\\-_]+" + }, + { + token : "keyword", + regex : "#" + } + ] + }; +}; + +oop.inherits(TextileHighlightRules, TextHighlightRules); + +exports.TextileHighlightRules = TextileHighlightRules; + +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/toml.js b/pitfall/pdfkit/node_modules/brace/mode/toml.js new file mode 100644 index 00000000..6576aa0f --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/toml.js @@ -0,0 +1,176 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2013, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * Contributor(s): + * + * Garen J. Torikian + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/toml', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/toml_highlight_rules', 'ace/mode/folding/ini'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var TomlHighlightRules = acequire("./toml_highlight_rules").TomlHighlightRules; +var FoldMode = acequire("./folding/ini").FoldMode; + +var Mode = function() { + this.HighlightRules = TomlHighlightRules; + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + this.lineCommentStart = "#"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/toml_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var TomlHighlightRules = function() { + var keywordMapper = this.createKeywordMapper({ + "constant.language.boolean": "true|false" + }, "identifier"); + + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; + + this.$rules = { + "start": [ + { + token: "comment.toml", + regex: /#.*$/ + }, + { + token : "string", + regex : '"(?=.)', + next : "qqstring" + }, + { + token: ["variable.keygroup.toml"], + regex: "(?:^\\s*)(\\[([^\\]]+)\\])" + }, + { + token : keywordMapper, + regex : identifierRe + }, + { + token : "support.date.toml", + regex: "\\d{4}-\\d{2}-\\d{2}(T)\\d{2}:\\d{2}:\\d{2}(Z)" + }, + { + token: "constant.numeric.toml", + regex: "-?\\d+(\\.?\\d+)?" + } + ], + "qqstring" : [ + { + token : "string", + regex : "\\\\$", + next : "qqstring" + }, + { + token : "constant.language.escape", + regex : '\\\\[0tnr"\\\\]' + }, + { + token : "string", + regex : '"|$', + next : "start" + }, + { + defaultToken: "string" + } + ] + } + +}; + +oop.inherits(TomlHighlightRules, TextHighlightRules); + +exports.TomlHighlightRules = TomlHighlightRules; +}); + +ace.define('ace/mode/folding/ini', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function() { +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /^\s*\[([^\])]*)]\s*(?:$|[;#])/; + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var re = this.foldingStartMarker; + var line = session.getLine(row); + + var m = line.match(re); + + if (!m) return; + + var startName = m[1] + "."; + + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + + while (++row < maxRow) { + line = session.getLine(row); + if (/^\s*$/.test(line)) + continue; + m = line.match(re); + if (m && m[1].lastIndexOf(startName, 0) !== 0) + break; + + endRow = row; + } + + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/twig.js b/pitfall/pdfkit/node_modules/brace/mode/twig.js new file mode 100644 index 00000000..865b0bba --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/twig.js @@ -0,0 +1,2220 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2013, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/twig', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/mode/javascript', 'ace/mode/css', 'ace/tokenizer', 'ace/mode/twig_highlight_rules', 'ace/mode/behaviour/html', 'ace/mode/folding/html', 'ace/mode/matching_brace_outdent'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var JavaScriptMode = acequire("./javascript").Mode; +var CssMode = acequire("./css").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var TwigHighlightRules = acequire("./twig_highlight_rules").TwigHighlightRules; +var HtmlBehaviour = acequire("./behaviour/html").HtmlBehaviour; +var HtmlFoldMode = acequire("./folding/html").FoldMode; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; + +var Mode = function() { + this.HighlightRules = TwigHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new HtmlBehaviour(); + + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + + this.foldingRules = new HtmlFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + this.blockComment = {start: "{#", end: "#}"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/javascript', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = JavaScriptHighlightRules; + + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/javascript"), "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + + worker.on("jslint", function(results) { + session.setAnnotations(results.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/javascript_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var JavaScriptHighlightRules = function() { + var keywordMapper = this.createKeywordMapper({ + "variable.language": + "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document" , // Pseudo + "keyword": + "const|yield|import|get|set|" + + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", + "storage.type": + "const|let|var|function", + "constant.language": + "null|Infinity|NaN|undefined", + "support.function": + "alert", + "constant.language.boolean": "true|false" + }, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; + + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-6][0-7]?|" + // oct + "37[0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + + this.$rules = { + "no_regex" : [ + { + token : "comment", + regex : "\\/\\/", + next : "line_comment" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : /\/\*/, + next : "comment" + }, { + token : "string", + regex : "'(?=.)", + next : "qstring" + }, { + token : "string", + regex : '"(?=.)', + next : "qqstring" + }, { + token : "constant.numeric", // hex + regex : /0[xX][0-9a-fA-F]+\b/ + }, { + token : "constant.numeric", // float + regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ + }, { + token : [ + "storage.type", "punctuation.operator", "support.function", + "punctuation.operator", "entity.name.function", "text","keyword.operator" + ], + regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "paren.lparen" + ], + regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "text", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : "keyword", + regex : "(?:" + kwBeforeRe + ")\\b", + next : "start" + }, { + token : ["punctuation.operator", "support.function"], + regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token : ["punctuation.operator", "support.function.dom"], + regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token : ["punctuation.operator", "support.constant"], + regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token : ["storage.type", "punctuation.operator", "support.function.firebug"], + regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/ + }, { + token : keywordMapper, + regex : identifierRe + }, { + token : "keyword.operator", + regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, + next : "start" + }, { + token : "punctuation.operator", + regex : /\?|\:|\,|\;|\./, + next : "start" + }, { + token : "paren.lparen", + regex : /[\[({]/, + next : "start" + }, { + token : "paren.rparen", + regex : /[\])}]/ + }, { + token : "keyword.operator", + regex : /\/=?/, + next : "start" + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment_regex_allowed" + }, { + token : "comment", + regex : "\\/\\/", + next : "line_comment_regex_allowed" + }, { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token : "text", + regex : "\\s+|^$", + next : "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/\\w*", + next: "no_regex" + }, { + token : "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token : "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/ + }, { + token : "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "function_arguments": [ + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "[, ]+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "comment_regex_allowed" : [ + {token : "comment", regex : "\\*\\/", next : "start"}, + {defaultToken : "comment"} + ], + "comment" : [ + {token : "comment", regex : "\\*\\/", next : "no_regex"}, + {defaultToken : "comment"} + ], + "line_comment_regex_allowed" : [ + {token : "comment", regex : "$|^", next : "start"}, + {defaultToken : "comment"} + ], + "line_comment" : [ + {token : "comment", regex : "$|^", next : "no_regex"}, + {defaultToken : "comment"} + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qqstring" + }, { + token : "string", + regex : '"|$', + next : "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qstring" + }, { + token : "string", + regex : "'|$", + next : "no_regex" + }, { + defaultToken: "string" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("no_regex") ]); +}; + +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); + +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); + +ace.define('ace/mode/css', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/css_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/worker/worker_client', 'ace/mode/behaviour/css', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var CssHighlightRules = acequire("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var CssBehaviour = acequire("./behaviour/css").CssBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.foldingRules = "cStyle"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/css"), "Worker"); + worker.attachToDocument(session.getDocument()); + + worker.on("csslint", function(e) { + session.setAnnotations(e.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; + +}); + +ace.define('ace/mode/css_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; + +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|acequired|root|target|valid|visited)\\b"; + +var CssHighlightRules = function() { + + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + + this.$rules = { + "start" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "@.*?{", + push: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "media" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "\\}", + next: "pop" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "comment" : [{ + token : "comment", + regex : "\\*\\/", + next : "pop" + }, { + defaultToken : "comment" + }], + + "ruleset" : [ + { + token : "paren.rparen", + regex : "\\}", + next: "pop" + }, { + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : ["constant.numeric", "keyword"], + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + }, { + token : "constant.numeric", + regex : numRe + }, { + token : "constant.numeric", // hex6 color + regex : "#[a-f0-9]{6}" + }, { + token : "constant.numeric", // hex3 color + regex : "#[a-f0-9]{3}" + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex : pseudoElements + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex : pseudoClasses + }, { + token : ["support.function", "string", "support.function"], + regex : "(url\\()(.*)(\\))" + }, { + token : keywordMapper, + regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + caseInsensitive: true + }] + }; + + this.normalizeRules(); +}; + +oop.inherits(CssHighlightRules, TextHighlightRules); + +exports.CssHighlightRules = CssHighlightRules; + +}); + +ace.define('ace/mode/behaviour/css', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + +var CssBehaviour = function () { + + this.inherit(CstyleBehaviour); + + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + } + } + if (!line.substring(cursor.column).match(/^\s*;/)) { + return { + text: ':;', + selection: [1, 1] + } + } + } + } + }); + + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column ++; + return range; + } + } + } + }); + + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + } + } + } + }); + +} +oop.inherits(CssBehaviour, CstyleBehaviour); + +exports.CssBehaviour = CssBehaviour; +}); + +ace.define('ace/mode/twig_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/html_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var HtmlHighlightRules = acequire("./html_highlight_rules").HtmlHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var TwigHighlightRules = function() { + HtmlHighlightRules.call(this); + + var tags = "autoescape|block|do|embed|extends|filter|flush|for|from|if|import|include|macro|sandbox|set|spaceless|use|verbatim"; + tags = tags + "|end" + tags.replace(/\|/g, "|end"); + var filters = "abs|batch|capitalize|convert_encoding|date|date_modify|default|e|escape|first|format|join|json_encode|keys|last|length|lower|merge|nl2br|number_format|raw|replace|reverse|slice|sort|split|striptags|title|trim|upper|url_encode"; + var functions = "attribute|constant|cycle|date|dump|parent|random|range|template_from_string"; + var tests = "constant|divisibleby|sameas|defined|empty|even|iterable|odd"; + var constants = "null|none|true|false"; + var operators = "b-and|b-xor|b-or|in|is|and|or|not" + + var keywordMapper = this.createKeywordMapper({ + "keyword.control.twig": tags, + "support.function.twig": [filters, functions, tests].join("|"), + "keyword.operator.twig": operators, + "constant.language.twig": constants + }, "identifier"); + for (var rule in this.$rules) { + this.$rules[rule].unshift({ + token : "variable.other.readwrite.local.twig", + regex : "\\{\\{-?", + push : "twig-start" + }, { + token : "meta.tag.twig", + regex : "\\{%-?", + push : "twig-start" + }, { + token : "comment.block.twig", + regex : "\\{#-?", + push : "twig-comment" + }); + } + this.$rules["twig-comment"] = [{ + token : "comment.block.twig", + regex : ".*-?#\\}", + next : "pop" + }]; + + this.$rules["twig-start"] = [{ + token : "variable.other.readwrite.local.twig", + regex : "-?\\}\\}", + next : "pop" + }, { + token : "meta.tag.twig", + regex : "-?%\\}", + next : "pop" + }, { + token : "string", + regex : "'", + next : "twig-qstring" + }, { + token : "string", + regex : '"', + next : "twig-qqstring" + }, { + token : "constant.numeric", // hex + regex : "0[xX][0-9a-fA-F]+\\b" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "constant.language.boolean", + regex : "(?:true|false)\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator.assignment", + regex : "=|~" + }, { + token : "keyword.operator.comparison", + regex : "==|!=|<|>|>=|<=|===" + }, { + token : "keyword.operator.arithmetic", + regex : "\\+|-|/|%|//|\\*|\\*\\*" + }, { + token : "keyword.operator.other", + regex : "\\.\\.|\\|" + }, { + token : "punctuation.operator", + regex : /\?|\:|\,|\;|\./ + }, { + token : "paren.lparen", + regex : /[\[\({]/ + }, { + token : "paren.rparen", + regex : /[\])}]/ + }, { + token : "text", + regex : "\\s+" + } ]; + + this.$rules["twig-qqstring"] = [{ + token : "constant.language.escape", + regex : /\\[\\"$#ntr]|#{[^"}]*}/ + }, { + token : "string", + regex : '"', + next : "twig-start" + }, { + defaultToken : "string" + } + ]; + + this.$rules["twig-qstring"] = [{ + token : "constant.language.escape", + regex : /\\[\\'ntr]}/ + }, { + token : "string", + regex : "'", + next : "twig-start" + }, { + defaultToken : "string" + } + ]; + + this.normalizeRules(); +}; + +oop.inherits(TwigHighlightRules, TextHighlightRules); + +exports.TwigHighlightRules = TwigHighlightRules; +}); + +ace.define('ace/mode/html_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var CssHighlightRules = acequire("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = acequire("./xml_highlight_rules").XmlHighlightRules; + +var tagMap = lang.createMap({ + a : 'anchor', + button : 'form', + form : 'form', + img : 'image', + input : 'form', + label : 'form', + option : 'form', + script : 'script', + select : 'form', + textarea : 'form', + style : 'style', + table : 'table', + tbody : 'table', + td : 'table', + tfoot : 'table', + th : 'table', + tr : 'table' +}); + +var HtmlHighlightRules = function() { + XmlHighlightRules.call(this); + + this.addRules({ + attributes: [{ + include : "space" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "keyword.operator.separator", + regex : "=", + push : [{ + include: "space" + }, { + token : "string", + regex : "[^<>='\"`\\s]+", + next : "pop" + }, { + token : "empty", + regex : "", + next : "pop" + }] + }, { + include : "string" + }], + tag: [{ + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation.begin", + "meta.tag.name" + (group ? "." + group : "")]; + }, + regex : "(<)([-_a-zA-Z0-9:]+)", + next: "start_tag_stuff" + }, { + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation.begin", + "meta.tag.name" + (group ? "." + group : "")]; + }, + regex : "(", next : "start"} + ], + end_tag_stuff: [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next : "start"} + ] + }); + + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); + + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; + +oop.inherits(HtmlHighlightRules, XmlHighlightRules); + +exports.HtmlHighlightRules = HtmlHighlightRules; +}); + +ace.define('ace/mode/xml_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var xmlUtil = acequire("./xml_util"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var XmlHighlightRules = function(normalize) { + this.$rules = { + start : [ + {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"}, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration" + }, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction" + }, + {token : "comment", regex : "<\\!--", next : "comment"}, + { + token : ["punctuation.doctype.begin", "meta.tag.doctype"], + regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype" + }, + {include : "tag"}, + {include : "reference"} + ], + + xml_declaration : [ + {include : "attributes"}, + {include : "instruction"} + ], + + instruction : [ + {token : "punctuation.instruction.end", regex : "\\?>", next : "start"} + ], + + doctype : [ + {include : "space"}, + {include : "string"}, + {token : "punctuation.doctype.end", regex : ">", next : "start"}, + {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"}, + {token : "punctuation.begin", regex : "\\[", push : "declarations"} + ], + + declarations : [{ + token : "text", + regex : "\\s+" + }, { + token: "punctuation.end", + regex: "]", + next: "pop" + }, { + token : ["punctuation.begin", "keyword"], + regex : "(<\\!)([-_a-zA-Z0-9]+)", + push : [{ + token : "text", + regex : "\\s+" + }, + { + token : "punctuation.end", + regex : ">", + next : "pop" + }, + {include : "string"}] + }], + + cdata : [ + {token : "string.end", regex : "\\]\\]>", next : "start"}, + {token : "text", regex : "\\s+"}, + {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"} + ], + + comment : [ + {token : "comment", regex : "-->", next : "start"}, + {defaultToken : "comment"} + ], + + tag : [{ + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)", + next: [ + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"} + ] + }, { + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(", next : "start"} + ] + }], + + space : [ + {token : "text", regex : "\\s+"} + ], + + reference : [{ + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, { + token : "invalid.illegal", regex : "&" + }], + + string: [{ + token : "string", + regex : "'", + push : "qstring_inner" + }, { + token : "string", + regex : '"', + push : "qqstring_inner" + }], + + qstring_inner: [ + {token : "string", regex: "'", next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + qqstring_inner: [ + {token : "string", regex: '"', next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + attributes: [{ + token : "entity.other.attribute-name", + regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" + }, { + token : "keyword.operator.separator", + regex : "=" + }, { + include : "space" + }, { + include : "string" + }] + }; + + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; + + +(function() { + + this.embedTagRules = function(HighlightRules, prefix, tag){ + this.$rules.tag.unshift({ + token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(<)(" + tag + ")", + next: [ + {include : "space"}, + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"} + ] + }); + + this.$rules[tag + "-end"] = [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next: "start", + onMatch : function(value, currentState, stack) { + stack.splice(0); + return this.token; + }} + ] + + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(" + }]); + }; + +}).call(TextHighlightRules.prototype); + +oop.inherits(XmlHighlightRules, TextHighlightRules); + +exports.XmlHighlightRules = XmlHighlightRules; +}); + +ace.define('ace/mode/xml_util', ["require", 'exports', 'module' ], function(acequire, exports, module) { + + +function string(state) { + return [{ + token : "string", + regex : '"', + next : state + "_qqstring" + }, { + token : "string", + regex : "'", + next : state + "_qstring" + }]; +} + +function multiLineString(quote, state) { + return [ + {token : "string", regex : quote, next : state}, + { + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, + {defaultToken : "string"} + ]; +} + +exports.tag = function(states, name, nextState, tagMap) { + states[name] = [{ + token : "text", + regex : "\\s+" + }, { + + token : !tagMap ? "meta.tag.tag-name" : function(value) { + if (tagMap[value]) + return "meta.tag.tag-name." + tagMap[value]; + else + return "meta.tag.tag-name"; + }, + regex : "[-_a-zA-Z0-9:]+", + next : name + "_embed_attribute_list" + }, { + token: "empty", + regex: "", + next : name + "_embed_attribute_list" + }]; + + states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list"); + states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list"); + + states[name + "_embed_attribute_list"] = [{ + token : "meta.tag.r", + regex : "/?>", + next : nextState + }, { + token : "keyword.operator", + regex : "=" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "text", + regex : "\\s+" + }].concat(string(name)); +}; + +}); + +ace.define('ace/mode/behaviour/html', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour/xml', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var XmlBehaviour = acequire("../behaviour/xml").XmlBehaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var voidElements = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr']; + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); + return hasType; +} + +var HtmlBehaviour = function () { + + this.inherit(XmlBehaviour); // Get xml behaviour + + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getCursorPosition(); + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken(); + + if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column) + return; + var atCursor = false; + if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text'))); + } else { + atCursor = true; + } + if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) { + return; + } + var element = token.value; + if (atCursor){ + var element = element.substring(0, position.column - token.start); + } + if (voidElements.indexOf(element) !== -1){ + return; + } + return { + text: '>' + '', + selection: [1, 1] + } + } + }); +} +oop.inherits(HtmlBehaviour, XmlBehaviour); + +exports.HtmlBehaviour = HtmlBehaviour; +}); + +ace.define('ace/mode/behaviour/xml', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); + return hasType; +} + +var XmlBehaviour = function () { + + this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour + + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getCursorPosition(); + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken(); + + if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column) + return; + var atCursor = false; + if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text'))); + } else { + atCursor = true; + } + if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) { + return; + } + var tag = token.value; + if (atCursor){ + var tag = tag.substring(0, position.column - token.start); + } + + return { + text: '>' + '', + selection: [1, 1] + } + } + }); + + this.add('autoindent', 'insertion', function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var rightChars = line.substring(cursor.column, cursor.column + 2); + if (rightChars == '?)/; + this._parseTag = function(tag) { + + var match = tag.match(this.tagRe); + var column = 0; + + return { + value: tag, + match: match ? match[2] : "", + closing: match ? !!match[3] : false, + selfClosing: match ? !!match[5] || match[2] == "/>" : false, + tagName: match ? match[4] : "", + column: match[1] ? column + match[1].length : column + }; + }; + this._readTagForward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var value = ""; + var start; + + do { + if (token.type.lastIndexOf("meta.tag", 0) === 0) { + if (!start) { + var start = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + }; + } + value += token.value; + if (value.indexOf(">") !== -1) { + var tag = this._parseTag(value); + tag.start = start; + tag.end = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + token.value.length + }; + iterator.stepForward(); + return tag; + } + } + } while(token = iterator.stepForward()); + + return null; + }; + + this._readTagBackward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var value = ""; + var end; + + do { + if (token.type.lastIndexOf("meta.tag", 0) === 0) { + if (!end) { + end = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + token.value.length + }; + } + value = token.value + value; + if (value.indexOf("<") !== -1) { + var tag = this._parseTag(value); + tag.end = end; + tag.start = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + }; + iterator.stepBackward(); + return tag; + } + } + } while(token = iterator.stepBackward()); + + return null; + }; + + this._pop = function(stack, tag) { + while (stack.length) { + + var top = stack[stack.length-1]; + if (!tag || top.tagName == tag.tagName) { + return stack.pop(); + } + else if (this.voidElements[tag.tagName]) { + return; + } + else if (this.voidElements[top.tagName]) { + stack.pop(); + continue; + } else { + return null; + } + } + }; + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + + if (!firstTag.match) + return null; + + var isBackward = firstTag.closing || firstTag.selfClosing; + var stack = []; + var tag; + + if (!isBackward) { + var iterator = new TokenIterator(session, row, firstTag.column); + var start = { + row: row, + column: firstTag.column + firstTag.tagName.length + 2 + }; + while (tag = this._readTagForward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) + return Range.fromPoints(start, tag.start); + } + else { + stack.push(tag) + } + } + } + else { + var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length); + var end = { + row: row, + column: firstTag.column + }; + + while (tag = this._readTagBackward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (!tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) { + tag.start.column += tag.tagName.length + 2; + return Range.fromPoints(tag.start, end); + } + } + else { + stack.push(tag) + } + } + } + + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/typescript.js b/pitfall/pdfkit/node_modules/brace/mode/typescript.js new file mode 100644 index 00000000..96d0b7d6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/typescript.js @@ -0,0 +1,1011 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2012, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/typescript', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript', 'ace/tokenizer', 'ace/mode/typescript_highlight_rules', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle', 'ace/mode/matching_brace_outdent'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var jsMode = acequire("./javascript").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var TypeScriptHighlightRules = acequire("./typescript_highlight_rules").TypeScriptHighlightRules; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; + +var Mode = function() { + this.HighlightRules = TypeScriptHighlightRules; + + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, jsMode); + +(function() { + this.createWorker = function(session) { + return null; + }; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/javascript', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/javascript_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/range', 'ace/worker/worker_client', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = acequire("./matching_brace_outdent").MatchingBraceOutdent; +var Range = acequire("../range").Range; +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var CstyleBehaviour = acequire("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = JavaScriptHighlightRules; + + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*\:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], require("../worker/javascript"), "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + + worker.on("jslint", function(results) { + session.setAnnotations(results.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/javascript_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var JavaScriptHighlightRules = function() { + var keywordMapper = this.createKeywordMapper({ + "variable.language": + "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document" , // Pseudo + "keyword": + "const|yield|import|get|set|" + + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", + "storage.type": + "const|let|var|function", + "constant.language": + "null|Infinity|NaN|undefined", + "support.function": + "alert", + "constant.language.boolean": "true|false" + }, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; + + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-6][0-7]?|" + // oct + "37[0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + + this.$rules = { + "no_regex" : [ + { + token : "comment", + regex : "\\/\\/", + next : "line_comment" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : /\/\*/, + next : "comment" + }, { + token : "string", + regex : "'(?=.)", + next : "qstring" + }, { + token : "string", + regex : '"(?=.)', + next : "qqstring" + }, { + token : "constant.numeric", // hex + regex : /0[xX][0-9a-fA-F]+\b/ + }, { + token : "constant.numeric", // float + regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ + }, { + token : [ + "storage.type", "punctuation.operator", "support.function", + "punctuation.operator", "entity.name.function", "text","keyword.operator" + ], + regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "paren.lparen" + ], + regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "text", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : "keyword", + regex : "(?:" + kwBeforeRe + ")\\b", + next : "start" + }, { + token : ["punctuation.operator", "support.function"], + regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token : ["punctuation.operator", "support.function.dom"], + regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token : ["punctuation.operator", "support.constant"], + regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token : ["storage.type", "punctuation.operator", "support.function.firebug"], + regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/ + }, { + token : keywordMapper, + regex : identifierRe + }, { + token : "keyword.operator", + regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, + next : "start" + }, { + token : "punctuation.operator", + regex : /\?|\:|\,|\;|\./, + next : "start" + }, { + token : "paren.lparen", + regex : /[\[({]/, + next : "start" + }, { + token : "paren.rparen", + regex : /[\])}]/ + }, { + token : "keyword.operator", + regex : /\/=?/, + next : "start" + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment_regex_allowed" + }, { + token : "comment", + regex : "\\/\\/", + next : "line_comment_regex_allowed" + }, { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token : "text", + regex : "\\s+|^$", + next : "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/\\w*", + next: "no_regex" + }, { + token : "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token : "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/ + }, { + token : "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "function_arguments": [ + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "[, ]+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "comment_regex_allowed" : [ + {token : "comment", regex : "\\*\\/", next : "start"}, + {defaultToken : "comment"} + ], + "comment" : [ + {token : "comment", regex : "\\*\\/", next : "no_regex"}, + {defaultToken : "comment"} + ], + "line_comment_regex_allowed" : [ + {token : "comment", regex : "$|^", next : "start"}, + {defaultToken : "comment"} + ], + "line_comment" : [ + {token : "comment", regex : "$|^", next : "no_regex"}, + {defaultToken : "comment"} + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qqstring" + }, { + token : "string", + regex : '"|$', + next : "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qstring" + }, { + token : "string", + regex : "'|$", + next : "no_regex" + }, { + defaultToken: "string" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("no_regex") ]); +}; + +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); + +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define('ace/mode/matching_brace_outdent', ["require", 'exports', 'module' , 'ace/range'], function(acequire, exports, module) { + + +var Range = acequire("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +ace.define('ace/mode/behaviour/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/token_iterator', 'ace/lib/lang'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var lang = acequire("../../lib/lang"); + +var SAFE_INSERT_IN_TOKENS = + ["text", "paren.rparen", "punctuation.operator"]; +var SAFE_INSERT_BEFORE_TOKENS = + ["text", "paren.rparen", "punctuation.operator", "comment"]; + + +var autoInsertedBrackets = 0; +var autoInsertedRow = -1; +var autoInsertedLineEnd = ""; +var maybeInsertedBrackets = 0; +var maybeInsertedRow = -1; +var maybeInsertedLineStart = ""; +var maybeInsertedLineEnd = ""; + +var CstyleBehaviour = function () { + + CstyleBehaviour.isSaneInsertion = function(editor, session) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); + if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) + return false; + } + iterator.stepForward(); + return iterator.getCurrentTokenRow() !== cursor.row || + this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_BEFORE_TOKENS); + }; + + CstyleBehaviour.$matchTokenType = function(token, types) { + return types.indexOf(token.type || token) > -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/cstyle', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/range', 'ace/mode/folding/fold_mode'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + +}).call(FoldMode.prototype); + +}); + + +ace.define('ace/mode/typescript_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; + +var TypeScriptHighlightRules = function() { + + var tsRules = [ + { + token: ["keyword.operator.ts", "text", "variable.parameter.function.ts", "text"], + regex: "\\b(module)(\\s*)([a-zA-Z0-9_?.$][\\w?.$]*)(\\s*\\{)" + }, + { + token: ["storage.type.variable.ts", "text", "keyword.other.ts", "text"], + regex: "(super)(\\s*\\()([a-zA-Z0-9,_?.$\\s]+\\s*)(\\))" + }, + { + token: ["entity.name.function.ts","paren.lparen", "paren.rparen"], + regex: "([a-zA-Z_?.$][\\w?.$]*)(\\()(\\))" + }, + { + token: ["variable.parameter.function.ts", "text", "variable.parameter.function.ts"], + regex: "([a-zA-Z0-9_?.$][\\w?.$]*)(\\s*:\\s*)([a-zA-Z0-9_?.$][\\w?.$]*)" + }, + { + token: ["keyword.operator.ts"], + regex: "(?:\\b(constructor|declare|interface|as|AS|public|private|class|extends|export|super)\\b)" + }, + { + token: ["storage.type.variable.ts"], + regex: "(?:\\b(this\\.|string\\b|bool\\b|number)\\b)" + }, + { + token: ["keyword.operator.ts", "storage.type.variable.ts", "keyword.operator.ts", "storage.type.variable.ts"], + regex: "(class)(\\s+[a-zA-Z0-9_?.$][\\w?.$]*\\s+)(extends)(\\s+[a-zA-Z0-9_?.$][\\w?.$]*\\s+)?" + }, + { + token: "keyword", + regex: "(?:super|export|class|extends|import)\\b" + } + ]; + + var JSRules = new JavaScriptHighlightRules().getRules(); + + JSRules.start = tsRules.concat(JSRules.start); + this.$rules = JSRules; +}; + +oop.inherits(TypeScriptHighlightRules, JavaScriptHighlightRules); + +exports.TypeScriptHighlightRules = TypeScriptHighlightRules; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/brace/mode/vbscript.js b/pitfall/pdfkit/node_modules/brace/mode/vbscript.js new file mode 100644 index 00000000..c695b30c --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/vbscript.js @@ -0,0 +1,279 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2012, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * Contributor(s): + * + * + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/vbscript', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/vbscript_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var VBScriptHighlightRules = acequire("./vbscript_highlight_rules").VBScriptHighlightRules; + +var Mode = function() { + this.HighlightRules = VBScriptHighlightRules; +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = ["'", "REM"]; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + + +ace.define('ace/mode/vbscript_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var VBScriptHighlightRules = function() { + + this.$rules = { + "start": [ + { + token: [ + "meta.ending-space" + ], + regex: "$" + }, + { + token: [ + null + ], + regex: "^(?=\\t)", + next: "state_3" + }, + { + token: [null], + regex: "^(?= )", + next: "state_4" + }, + { + token: [ + "storage.type.function.asp", + "text", + "entity.name.function.asp", + "text", + "punctuation.definition.parameters.asp", + "variable.parameter.function.asp", + "punctuation.definition.parameters.asp" + ], + regex: "^\\s*((?:Function|Sub))(\\s*)([a-zA-Z_]\\w*)(\\s*)(\\()([^)]*)(\\)).*\\n?" + }, + { + token: "punctuation.definition.comment.asp", + regex: "'|REM", + next: "comment" + }, + { + token: [ + "keyword.control.asp" + ], + regex: "(?:\\b(If|Then|Else|ElseIf|Else If|End If|While|Wend|For|To|Each|Case|Select|End Select|Return|Continue|Do|Until|Loop|Next|With|Exit Do|Exit For|Exit Function|Exit Property|Exit Sub|IIf)\\b)" + }, + { + token: [ + "keyword.operator.asp" + ], + regex: "(?:\\b(Mod|And|Not|Or|Xor|as)\\b)" + }, + { + token: [ + "storage.type.asp" + ], + regex: "Dim|Call|Class|Const|Dim|Redim|Function|Sub|Private Sub|Public Sub|End sub|End Function|Set|Let|Get|New|Randomize|Option Explicit|On Error Resume Next|On Error GoTo" + }, + { + token: [ + "storage.modifier.asp" + ], + regex: "(?:\\b(Private|Public|Default)\\b)" + }, + { + token: [ + "constant.language.asp" + ], + regex: "(?:\\s*\\b(Empty|False|Nothing|Null|True)\\b)" + }, + { + token: [ + "punctuation.definition.string.begin.asp" + ], + regex: '"', + next: "string" + }, + { + token: [ + "punctuation.definition.variable.asp" + ], + regex: "(\\$)[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?\\b\\s*" + }, + { + token: [ + "support.class.asp" + ], + regex: "(?:\\b(Application|ObjectContext|Request|Response|Server|Session)\\b)" + }, + { + token: [ + "support.class.collection.asp" + ], + regex: "(?:\\b(Contents|StaticObjects|ClientCertificate|Cookies|Form|QueryString|ServerVariables)\\b)" + }, + { + token: [ + "support.constant.asp" + ], + regex: "(?:\\b(TotalBytes|Buffer|CacheControl|Charset|ContentType|Expires|ExpiresAbsolute|IsClientConnected|PICS|Status|ScriptTimeout|CodePage|LCID|SessionID|Timeout)\\b)" + }, + { + token: [ + "support.function.asp" + ], + regex: "(?:\\b(Lock|Unlock|SetAbort|SetComplete|BinaryRead|AddHeader|AppendToLog|BinaryWrite|Clear|End|Flush|Redirect|Write|CreateObject|HTMLEncode|MapPath|URLEncode|Abandon|Convert|Regex)\\b)" + }, + { + token: [ + "support.function.event.asp" + ], + regex: "(?:\\b(Application_OnEnd|Application_OnStart|OnTransactionAbort|OnTransactionCommit|Session_OnEnd|Session_OnStart)\\b)" + }, + { + token: [ + "support.function.vb.asp" + ], + regex: "(?:\\b(Array|Add|Asc|Atn|CBool|CByte|CCur|CDate|CDbl|Chr|CInt|CLng|Conversions|Cos|CreateObject|CSng|CStr|Date|DateAdd|DateDiff|DatePart|DateSerial|DateValue|Day|Derived|Math|Escape|Eval|Exists|Exp|Filter|FormatCurrency|FormatDateTime|FormatNumber|FormatPercent|GetLocale|GetObject|GetRef|Hex|Hour|InputBox|InStr|InStrRev|Int|Fix|IsArray|IsDate|IsEmpty|IsNull|IsNumeric|IsObject|Item|Items|Join|Keys|LBound|LCase|Left|Len|LoadPicture|Log|LTrim|RTrim|Trim|Maths|Mid|Minute|Month|MonthName|MsgBox|Now|Oct|Remove|RemoveAll|Replace|RGB|Right|Rnd|Round|ScriptEngine|ScriptEngineBuildVersion|ScriptEngineMajorVersion|ScriptEngineMinorVersion|Second|SetLocale|Sgn|Sin|Space|Split|Sqr|StrComp|String|StrReverse|Tan|Time|Timer|TimeSerial|TimeValue|TypeName|UBound|UCase|Unescape|VarType|Weekday|WeekdayName|Year)\\b)" + }, + { + token: [ + "constant.numeric.asp" + ], + regex: "-?\\b(?:(?:0(?:x|X)[0-9a-fA-F]*)|(?:(?:[0-9]+\\.?[0-9]*)|(?:\\.[0-9]+))(?:(?:e|E)(?:\\+|-)?[0-9]+)?)(?:L|l|UL|ul|u|U|F|f)?\\b" + }, + { + token: [ + "support.type.vb.asp" + ], + regex: "(?:\\b(vbtrue|vbfalse|vbcr|vbcrlf|vbformfeed|vblf|vbnewline|vbnullchar|vbnullstring|int32|vbtab|vbverticaltab|vbbinarycompare|vbtextcomparevbsunday|vbmonday|vbtuesday|vbwednesday|vbthursday|vbfriday|vbsaturday|vbusesystemdayofweek|vbfirstjan1|vbfirstfourdays|vbfirstfullweek|vbgeneraldate|vblongdate|vbshortdate|vblongtime|vbshorttime|vbobjecterror|vbEmpty|vbNull|vbInteger|vbLong|vbSingle|vbDouble|vbCurrency|vbDate|vbString|vbObject|vbError|vbBoolean|vbVariant|vbDataObject|vbDecimal|vbByte|vbArray)\\b)" + }, + { + token: [ + "entity.name.function.asp" + ], + regex: "(?:(\\b[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*?\\b)(?=\\(\\)?))" + }, + { + token: [ + "keyword.operator.asp" + ], + regex: "\\-|\\+|\\*\\\/|\\>|\\<|\\=|\\&" + } + ], + "state_3": [ + { + token: [ + "meta.odd-tab.tabs", + "meta.even-tab.tabs" + ], + regex: "(\\t)(\\t)?" + }, + { + token: "meta.leading-space", + regex: "(?=[^\\t])", + next: "start" + }, + { + token: "meta.leading-space", + regex: ".", + next: "state_3" + } + ], + "state_4": [ + { + token: [ + "meta.odd-tab.spaces", + "meta.even-tab.spaces" + ], + regex: "( )( )?" + }, + { + token: "meta.leading-space", + regex: "(?=[^ ])", + next: "start" + }, + { + token: "meta.leading-space", + regex: ".", + next: "state_4" + } + ], + "comment": [ + { + token: "comment.line.apostrophe.asp", + regex: "$|(?=(?:%>))", + next: "start" + }, + { + token: "comment.line.apostrophe.asp", + regex: "." + } + ], + "string": [ + { + token: "constant.character.escape.apostrophe.asp", + regex: '""' + }, + { + token: "string.quoted.double.asp", + regex: '"', + next: "start" + }, + { + token: "string.quoted.double.asp", + regex: "." + } + ] +} + +}; + +oop.inherits(VBScriptHighlightRules, TextHighlightRules); + +exports.VBScriptHighlightRules = VBScriptHighlightRules; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/brace/mode/velocity.js b/pitfall/pdfkit/node_modules/brace/mode/velocity.js new file mode 100644 index 00000000..9c142a45 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/velocity.js @@ -0,0 +1,1615 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2012, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/velocity', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/velocity_highlight_rules', 'ace/mode/folding/velocity', 'ace/mode/behaviour/html'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var VelocityHighlightRules = acequire("./velocity_highlight_rules").VelocityHighlightRules; +var FoldMode = acequire("./folding/velocity").FoldMode; +var HtmlBehaviour = acequire("./behaviour/html").HtmlBehaviour; + +var Mode = function() { + this.HighlightRules = VelocityHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = new HtmlBehaviour(); +}; +oop.inherits(Mode, TextMode); + +(function() { + this.lineCommentStart = "##"; + this.blockComment = {start: "#*", end: "*#"}; +}).call(Mode.prototype); + +exports.Mode = Mode; +});ace.define('ace/mode/velocity_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules', 'ace/mode/html_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var HtmlHighlightRules = acequire("./html_highlight_rules").HtmlHighlightRules; + +var VelocityHighlightRules = function() { + HtmlHighlightRules.call(this); + + var builtinConstants = lang.arrayToMap( + ('true|false|null').split('|') + ); + + var builtinFunctions = lang.arrayToMap( + ("_DateTool|_DisplayTool|_EscapeTool|_FieldTool|_MathTool|_NumberTool|_SerializerTool|_SortTool|_StringTool|_XPathTool").split('|') + ); + + var builtinVariables = lang.arrayToMap( + ('$contentRoot|$foreach').split('|') + ); + + var keywords = lang.arrayToMap( + ("#set|#macro|#include|#parse|" + + "#if|#elseif|#else|#foreach|" + + "#break|#end|#stop" + ).split('|') + ); + + this.$rules.start.push( + { + token : "comment", + regex : "##.*$" + },{ + token : "comment.block", // multi line comment + regex : "#\\*", + next : "vm_comment" + }, { + token : "string.regexp", + regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : "constant.numeric", // hex + regex : "0[xX][0-9a-fA-F]+\\b" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "constant.language.boolean", + regex : "(?:true|false)\\b" + }, { + token : function(value) { + if (keywords.hasOwnProperty(value)) + return "keyword"; + else if (builtinConstants.hasOwnProperty(value)) + return "constant.language"; + else if (builtinVariables.hasOwnProperty(value)) + return "variable.language"; + else if (builtinFunctions.hasOwnProperty(value) || builtinFunctions.hasOwnProperty(value.substring(1))) + return "support.function"; + else if (value == "debugger") + return "invalid.deprecated"; + else + if(value.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*)$/)) + return "variable"; + return "identifier"; + }, + regex : "[a-zA-Z$#][a-zA-Z0-9_]*\\b" + }, { + token : "keyword.operator", + regex : "!|&|\\*|\\-|\\+|=|!=|<=|>=|<|>|&&|\\|\\|" + }, { + token : "lparen", + regex : "[[({]" + }, { + token : "rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + } + ); + + this.$rules["vm_comment"] = [ + { + token : "comment", // closing comment + regex : "\\*#|-->", + next : "start" + }, { + defaultToken: "comment" + } + ]; + + this.$rules["vm_start"] = [ + { + token: "variable", + regex: "}", + next: "pop" + }, { + token : "string.regexp", + regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : "constant.numeric", // hex + regex : "0[xX][0-9a-fA-F]+\\b" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "constant.language.boolean", + regex : "(?:true|false)\\b" + }, { + token : function(value) { + if (keywords.hasOwnProperty(value)) + return "keyword"; + else if (builtinConstants.hasOwnProperty(value)) + return "constant.language"; + else if (builtinVariables.hasOwnProperty(value)) + return "variable.language"; + else if (builtinFunctions.hasOwnProperty(value) || builtinFunctions.hasOwnProperty(value.substring(1))) + return "support.function"; + else if (value == "debugger") + return "invalid.deprecated"; + else + if(value.match(/^(\$[a-zA-Z_$][a-zA-Z0-9_]*)$/)) + return "variable"; + return "identifier"; + }, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator", + regex : "!|&|\\*|\\-|\\+|=|!=|<=|>=|<|>|&&|\\|\\|" + }, { + token : "lparen", + regex : "[[({]" + }, { + token : "rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + } + ]; + + for (var i in this.$rules) { + this.$rules[i].unshift({ + token: "variable", + regex: "\\${", + push: "vm_start" + }); + } + + this.normalizeRules(); +}; + +oop.inherits(VelocityHighlightRules, TextHighlightRules); + +exports.VelocityHighlightRules = VelocityHighlightRules; +}); + +ace.define('ace/mode/html_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/css_highlight_rules', 'ace/mode/javascript_highlight_rules', 'ace/mode/xml_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var CssHighlightRules = acequire("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = acequire("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = acequire("./xml_highlight_rules").XmlHighlightRules; + +var tagMap = lang.createMap({ + a : 'anchor', + button : 'form', + form : 'form', + img : 'image', + input : 'form', + label : 'form', + option : 'form', + script : 'script', + select : 'form', + textarea : 'form', + style : 'style', + table : 'table', + tbody : 'table', + td : 'table', + tfoot : 'table', + th : 'table', + tr : 'table' +}); + +var HtmlHighlightRules = function() { + XmlHighlightRules.call(this); + + this.addRules({ + attributes: [{ + include : "space" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "keyword.operator.separator", + regex : "=", + push : [{ + include: "space" + }, { + token : "string", + regex : "[^<>='\"`\\s]+", + next : "pop" + }, { + token : "empty", + regex : "", + next : "pop" + }] + }, { + include : "string" + }], + tag: [{ + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation.begin", + "meta.tag.name" + (group ? "." + group : "")]; + }, + regex : "(<)([-_a-zA-Z0-9:]+)", + next: "start_tag_stuff" + }, { + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation.begin", + "meta.tag.name" + (group ? "." + group : "")]; + }, + regex : "(", next : "start"} + ], + end_tag_stuff: [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next : "start"} + ] + }); + + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(JavaScriptHighlightRules, "js-", "script"); + + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; + +oop.inherits(HtmlHighlightRules, XmlHighlightRules); + +exports.HtmlHighlightRules = HtmlHighlightRules; +}); + +ace.define('ace/mode/css_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var lang = acequire("../lib/lang"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; + +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|acequired|root|target|valid|visited)\\b"; + +var CssHighlightRules = function() { + + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + + this.$rules = { + "start" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "@.*?{", + push: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "media" : [{ + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token: "paren.lparen", + regex: "\\{", + push: "ruleset" + }, { + token: "string", + regex: "\\}", + next: "pop" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "comment" : [{ + token : "comment", + regex : "\\*\\/", + next : "pop" + }, { + defaultToken : "comment" + }], + + "ruleset" : [ + { + token : "paren.rparen", + regex : "\\}", + next: "pop" + }, { + token : "comment", // multi line comment + regex : "\\/\\*", + push : "comment" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : ["constant.numeric", "keyword"], + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + }, { + token : "constant.numeric", + regex : numRe + }, { + token : "constant.numeric", // hex6 color + regex : "#[a-f0-9]{6}" + }, { + token : "constant.numeric", // hex3 color + regex : "#[a-f0-9]{3}" + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex : pseudoElements + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex : pseudoClasses + }, { + token : ["support.function", "string", "support.function"], + regex : "(url\\()(.*)(\\))" + }, { + token : keywordMapper, + regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + caseInsensitive: true + }] + }; + + this.normalizeRules(); +}; + +oop.inherits(CssHighlightRules, TextHighlightRules); + +exports.CssHighlightRules = CssHighlightRules; + +}); + +ace.define('ace/mode/javascript_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/doc_comment_highlight_rules', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var DocCommentHighlightRules = acequire("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var JavaScriptHighlightRules = function() { + var keywordMapper = this.createKeywordMapper({ + "variable.language": + "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document" , // Pseudo + "keyword": + "const|yield|import|get|set|" + + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + + "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", + "storage.type": + "const|let|var|function", + "constant.language": + "null|Infinity|NaN|undefined", + "support.function": + "alert", + "constant.language.boolean": "true|false" + }, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; + + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-6][0-7]?|" + // oct + "37[0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + + this.$rules = { + "no_regex" : [ + { + token : "comment", + regex : "\\/\\/", + next : "line_comment" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : /\/\*/, + next : "comment" + }, { + token : "string", + regex : "'(?=.)", + next : "qstring" + }, { + token : "string", + regex : '"(?=.)', + next : "qqstring" + }, { + token : "constant.numeric", // hex + regex : /0[xX][0-9a-fA-F]+\b/ + }, { + token : "constant.numeric", // float + regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ + }, { + token : [ + "storage.type", "punctuation.operator", "support.function", + "punctuation.operator", "entity.name.function", "text","keyword.operator" + ], + regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "paren.lparen" + ], + regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "text", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : "keyword", + regex : "(?:" + kwBeforeRe + ")\\b", + next : "start" + }, { + token : ["punctuation.operator", "support.function"], + regex : /(\.)(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token : ["punctuation.operator", "support.function.dom"], + regex : /(\.)(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token : ["punctuation.operator", "support.constant"], + regex : /(\.)(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token : ["storage.type", "punctuation.operator", "support.function.firebug"], + regex : /(console)(\.)(warn|info|log|error|time|timeEnd|assert)\b/ + }, { + token : keywordMapper, + regex : identifierRe + }, { + token : "keyword.operator", + regex : /--|\+\+|[!$%&*+\-~]|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|\*=|%=|\+=|\-=|&=|\^=/, + next : "start" + }, { + token : "punctuation.operator", + regex : /\?|\:|\,|\;|\./, + next : "start" + }, { + token : "paren.lparen", + regex : /[\[({]/, + next : "start" + }, { + token : "paren.rparen", + regex : /[\])}]/ + }, { + token : "keyword.operator", + regex : /\/=?/, + next : "start" + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment_regex_allowed" + }, { + token : "comment", + regex : "\\/\\/", + next : "line_comment_regex_allowed" + }, { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token : "text", + regex : "\\s+|^$", + next : "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/\\w*", + next: "no_regex" + }, { + token : "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token : "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?]/ + }, { + token : "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "function_arguments": [ + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "[, ]+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "comment_regex_allowed" : [ + {token : "comment", regex : "\\*\\/", next : "start"}, + {defaultToken : "comment"} + ], + "comment" : [ + {token : "comment", regex : "\\*\\/", next : "no_regex"}, + {defaultToken : "comment"} + ], + "line_comment_regex_allowed" : [ + {token : "comment", regex : "$|^", next : "start"}, + {defaultToken : "comment"} + ], + "line_comment" : [ + {token : "comment", regex : "$|^", next : "no_regex"}, + {defaultToken : "comment"} + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qqstring" + }, { + token : "string", + regex : '"|$', + next : "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + next : "qstring" + }, { + token : "string", + regex : "'|$", + next : "no_regex" + }, { + defaultToken: "string" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("no_regex") ]); +}; + +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); + +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; +}); + +ace.define('ace/mode/doc_comment_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, { + token : "comment.doc.tag", + regex : "\\bTODO\\b" + }, { + defaultToken : "comment.doc" + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +ace.define('ace/mode/xml_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var xmlUtil = acequire("./xml_util"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var XmlHighlightRules = function(normalize) { + this.$rules = { + start : [ + {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"}, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration" + }, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction" + }, + {token : "comment", regex : "<\\!--", next : "comment"}, + { + token : ["punctuation.doctype.begin", "meta.tag.doctype"], + regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype" + }, + {include : "tag"}, + {include : "reference"} + ], + + xml_declaration : [ + {include : "attributes"}, + {include : "instruction"} + ], + + instruction : [ + {token : "punctuation.instruction.end", regex : "\\?>", next : "start"} + ], + + doctype : [ + {include : "space"}, + {include : "string"}, + {token : "punctuation.doctype.end", regex : ">", next : "start"}, + {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"}, + {token : "punctuation.begin", regex : "\\[", push : "declarations"} + ], + + declarations : [{ + token : "text", + regex : "\\s+" + }, { + token: "punctuation.end", + regex: "]", + next: "pop" + }, { + token : ["punctuation.begin", "keyword"], + regex : "(<\\!)([-_a-zA-Z0-9]+)", + push : [{ + token : "text", + regex : "\\s+" + }, + { + token : "punctuation.end", + regex : ">", + next : "pop" + }, + {include : "string"}] + }], + + cdata : [ + {token : "string.end", regex : "\\]\\]>", next : "start"}, + {token : "text", regex : "\\s+"}, + {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"} + ], + + comment : [ + {token : "comment", regex : "-->", next : "start"}, + {defaultToken : "comment"} + ], + + tag : [{ + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)", + next: [ + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"} + ] + }, { + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(", next : "start"} + ] + }], + + space : [ + {token : "text", regex : "\\s+"} + ], + + reference : [{ + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, { + token : "invalid.illegal", regex : "&" + }], + + string: [{ + token : "string", + regex : "'", + push : "qstring_inner" + }, { + token : "string", + regex : '"', + push : "qqstring_inner" + }], + + qstring_inner: [ + {token : "string", regex: "'", next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + qqstring_inner: [ + {token : "string", regex: '"', next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + attributes: [{ + token : "entity.other.attribute-name", + regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" + }, { + token : "keyword.operator.separator", + regex : "=" + }, { + include : "space" + }, { + include : "string" + }] + }; + + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; + + +(function() { + + this.embedTagRules = function(HighlightRules, prefix, tag){ + this.$rules.tag.unshift({ + token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(<)(" + tag + ")", + next: [ + {include : "space"}, + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"} + ] + }); + + this.$rules[tag + "-end"] = [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next: "start", + onMatch : function(value, currentState, stack) { + stack.splice(0); + return this.token; + }} + ] + + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(" + }]); + }; + +}).call(TextHighlightRules.prototype); + +oop.inherits(XmlHighlightRules, TextHighlightRules); + +exports.XmlHighlightRules = XmlHighlightRules; +}); + +ace.define('ace/mode/xml_util', ["require", 'exports', 'module' ], function(acequire, exports, module) { + + +function string(state) { + return [{ + token : "string", + regex : '"', + next : state + "_qqstring" + }, { + token : "string", + regex : "'", + next : state + "_qstring" + }]; +} + +function multiLineString(quote, state) { + return [ + {token : "string", regex : quote, next : state}, + { + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, + {defaultToken : "string"} + ]; +} + +exports.tag = function(states, name, nextState, tagMap) { + states[name] = [{ + token : "text", + regex : "\\s+" + }, { + + token : !tagMap ? "meta.tag.tag-name" : function(value) { + if (tagMap[value]) + return "meta.tag.tag-name." + tagMap[value]; + else + return "meta.tag.tag-name"; + }, + regex : "[-_a-zA-Z0-9:]+", + next : name + "_embed_attribute_list" + }, { + token: "empty", + regex: "", + next : name + "_embed_attribute_list" + }]; + + states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list"); + states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list"); + + states[name + "_embed_attribute_list"] = [{ + token : "meta.tag.r", + regex : "/?>", + next : nextState + }, { + token : "keyword.operator", + regex : "=" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "text", + regex : "\\s+" + }].concat(string(name)); +}; + +}); + +ace.define('ace/mode/folding/velocity', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/folding/fold_mode', 'ace/range'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var BaseFoldMode = acequire("./fold_mode").FoldMode; +var Range = acequire("../../range").Range; + +var FoldMode = exports.FoldMode = function() {}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var range = this.indentationBlock(session, row); + if (range) + return range; + + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1 || line[startLevel] != "##") + return; + + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + + while (++row < maxRow) { + line = session.getLine(row); + var level = line.search(re); + + if (level == -1) + continue; + + if (line[level] != "##") + break; + + endRow = row; + } + + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "##" && next[indent] == "##") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } else if (prevIndent == indent && line[indent] == "##" && prev[indent] == "##") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + + if (prevIndent!= -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + + if (indent < nextIndent) + return "start"; + else + return ""; + }; + +}).call(FoldMode.prototype); + +}); + +ace.define('ace/mode/behaviour/html', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour/xml', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var XmlBehaviour = acequire("../behaviour/xml").XmlBehaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; +var voidElements = ['area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'keygen', 'link', 'meta', 'param', 'source', 'track', 'wbr']; + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); + return hasType; +} + +var HtmlBehaviour = function () { + + this.inherit(XmlBehaviour); // Get xml behaviour + + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getCursorPosition(); + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken(); + + if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column) + return; + var atCursor = false; + if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text'))); + } else { + atCursor = true; + } + if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) { + return; + } + var element = token.value; + if (atCursor){ + var element = element.substring(0, position.column - token.start); + } + if (voidElements.indexOf(element) !== -1){ + return; + } + return { + text: '>' + '', + selection: [1, 1] + } + } + }); +} +oop.inherits(HtmlBehaviour, XmlBehaviour); + +exports.HtmlBehaviour = HtmlBehaviour; +}); + +ace.define('ace/mode/behaviour/xml', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); + return hasType; +} + +var XmlBehaviour = function () { + + this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour + + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getCursorPosition(); + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken(); + + if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column) + return; + var atCursor = false; + if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text'))); + } else { + atCursor = true; + } + if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) { + return; + } + var tag = token.value; + if (atCursor){ + var tag = tag.substring(0, position.column - token.start); + } + + return { + text: '>' + '', + selection: [1, 1] + } + } + }); + + this.add('autoindent', 'insertion', function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var rightChars = line.substring(cursor.column, cursor.column + 2); + if (rightChars == ' -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/verilog.js b/pitfall/pdfkit/node_modules/brace/mode/verilog.js new file mode 100644 index 00000000..4afd44f0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/verilog.js @@ -0,0 +1,126 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/verilog', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/verilog_highlight_rules', 'ace/range'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var VerilogHighlightRules = acequire("./verilog_highlight_rules").VerilogHighlightRules; +var Range = acequire("../range").Range; + +var Mode = function() { + this.HighlightRules = VerilogHighlightRules; +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + +}).call(Mode.prototype); + +exports.Mode = Mode; + +}); + + +ace.define('ace/mode/verilog_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var VerilogHighlightRules = function() { +var keywords = "always|and|assign|automatic|begin|buf|bufif0|bufif1|case|casex|casez|cell|cmos|config|" + + "deassign|default|defparam|design|disable|edge|else|end|endcase|endconfig|endfunction|endgenerate|endmodule|" + + "endprimitive|endspecify|endtable|endtask|event|for|force|forever|fork|function|generate|genvar|highz0|" + + "highz1|if|ifnone|incdir|include|initial|inout|input|instance|integer|join|large|liblist|library|localparam|" + + "macromodule|medium|module|nand|negedge|nmos|nor|noshowcancelled|not|notif0|notif1|or|output|parameter|pmos|" + + "posedge|primitive|pull0|pull1|pulldown|pullup|pulsestyle_onevent|pulsestyle_ondetect|rcmos|real|realtime|" + + "reg|release|repeat|rnmos|rpmos|rtran|rtranif0|rtranif1|scalared|showcancelled|signed|small|specify|specparam|" + + "strong0|strong1|supply0|supply1|table|task|time|tran|tranif0|tranif1|tri|tri0|tri1|triand|trior|trireg|" + + "unsigned|use|vectored|wait|wand|weak0|weak1|while|wire|wor|xnor|xor" + + "begin|bufif0|bufif1|case|casex|casez|config|else|end|endcase|endconfig|endfunction|" + + "endgenerate|endmodule|endprimitive|endspecify|endtable|endtask|for|forever|function|generate|if|ifnone|" + + "macromodule|module|primitive|repeat|specify|table|task|while"; + + var builtinConstants = ( + "true|false|null" + ); + + var builtinFunctions = ( + "count|min|max|avg|sum|rank|now|coalesce|main" + ); + + var keywordMapper = this.createKeywordMapper({ + "support.function": builtinFunctions, + "keyword": keywords, + "constant.language": builtinConstants + }, "identifier", true); + + this.$rules = { + "start" : [ { + token : "comment", + regex : "//.*$" + }, { + token : "string", // " string + regex : '".*?"' + }, { + token : "string", // ' string + regex : "'.*?'" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator", + regex : "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=" + }, { + token : "paren.lparen", + regex : "[\\(]" + }, { + token : "paren.rparen", + regex : "[\\)]" + }, { + token : "text", + regex : "\\s+" + } ] + }; +}; + +oop.inherits(VerilogHighlightRules, TextHighlightRules); + +exports.VerilogHighlightRules = VerilogHighlightRules; +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/vhdl.js b/pitfall/pdfkit/node_modules/brace/mode/vhdl.js new file mode 100644 index 00000000..b4efd40a --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/vhdl.js @@ -0,0 +1,138 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2013, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ +ace.define('ace/mode/vhdl', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/vhdl_highlight_rules', 'ace/range'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var VHDLHighlightRules = acequire("./vhdl_highlight_rules").VHDLHighlightRules; +var Range = acequire("../range").Range; + +var Mode = function() { + this.HighlightRules = VHDLHighlightRules; +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "--"; + +}).call(Mode.prototype); + +exports.Mode = Mode; + +}); +ace.define('ace/mode/vhdl_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var VHDLHighlightRules = function() { + + + + var keywords = "access|after|ailas|all|architecture|assert|attribute|"+ + "begin|block|buffer|bus|case|component|configuration|"+ + "disconnect|downto|else|elsif|end|entity|file|for|function|"+ + "generate|generic|guarded|if|impure|in|inertial|inout|is|"+ + "label|linkage|literal|loop|mapnew|next|of|on|open|"+ + "others|out|port|process|pure|range|record|reject|"+ + "report|return|select|shared|subtype|then|to|transport|"+ + "type|unaffected|united|until|wait|when|while|with"; + + var storageType = "bit|bit_vector|boolean|character|integer|line|natural|"+ + "positive|real|register|severity|signal|signed|"+ + "std_logic|std_logic_vector|string||text|time|unsigned|"+ + "variable"; + + var storageModifiers = "array|constant"; + + var keywordOperators = "abs|and|mod|nand|nor|not|rem|rol|ror|sla|sll|sra"+ + "srl|xnor|xor"; + + var builtinConstants = ( + "true|false|null" + ); + + + var keywordMapper = this.createKeywordMapper({ + "keyword.operator": keywordOperators, + "keyword": keywords, + "constant.language": builtinConstants, + "storage.modifier": storageModifiers, + "storage.type": storageType + }, "identifier", true); + + this.$rules = { + "start" : [ { + token : "comment", + regex : "--.*$" + }, { + token : "string", // " string + regex : '".*?"' + }, { + token : "string", // ' string + regex : "'.*?'" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "keyword", // pre-compiler directives + regex : "\\s*(?:library|package|use)\\b", + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator", + regex : "&|\\*|\\+|\\-|\\/|<|=|>|\\||=>|\\*\\*|:=|\\/=|>=|<=|<>" + }, { + token : "punctuation.operator", + regex : "\\'|\\:|\\,|\\;|\\." + },{ + token : "paren.lparen", + regex : "[[(]" + }, { + token : "paren.rparen", + regex : "[\\])]" + }, { + token : "text", + regex : "\\s+" + } ], + + + }; +}; + +oop.inherits(VHDLHighlightRules, TextHighlightRules); + +exports.VHDLHighlightRules = VHDLHighlightRules; +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/xml.js b/pitfall/pdfkit/node_modules/brace/mode/xml.js new file mode 100644 index 00000000..ffe3765e --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/xml.js @@ -0,0 +1,931 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ + +ace.define('ace/mode/xml', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/xml_highlight_rules', 'ace/mode/behaviour/xml', 'ace/mode/folding/xml'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var Tokenizer = acequire("../tokenizer").Tokenizer; +var XmlHighlightRules = acequire("./xml_highlight_rules").XmlHighlightRules; +var XmlBehaviour = acequire("./behaviour/xml").XmlBehaviour; +var XmlFoldMode = acequire("./folding/xml").FoldMode; + +var Mode = function() { + this.HighlightRules = XmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.foldingRules = new XmlFoldMode(); +}; + +oop.inherits(Mode, TextMode); + +(function() { + + this.blockComment = {start: ""}; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/xml_highlight_rules', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/xml_util', 'ace/mode/text_highlight_rules'], function(acequire, exports, module) { + + +var oop = acequire("../lib/oop"); +var xmlUtil = acequire("./xml_util"); +var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules; + +var XmlHighlightRules = function(normalize) { + this.$rules = { + start : [ + {token : "punctuation.string.begin", regex : "<\\!\\[CDATA\\[", next : "cdata"}, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)(xml)(?=[\\s])", next : "xml_declaration" + }, + { + token : ["punctuation.instruction.begin", "keyword.instruction"], + regex : "(<\\?)([-_a-zA-Z0-9]+)", next : "instruction" + }, + {token : "comment", regex : "<\\!--", next : "comment"}, + { + token : ["punctuation.doctype.begin", "meta.tag.doctype"], + regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype" + }, + {include : "tag"}, + {include : "reference"} + ], + + xml_declaration : [ + {include : "attributes"}, + {include : "instruction"} + ], + + instruction : [ + {token : "punctuation.instruction.end", regex : "\\?>", next : "start"} + ], + + doctype : [ + {include : "space"}, + {include : "string"}, + {token : "punctuation.doctype.end", regex : ">", next : "start"}, + {token : "xml-pe", regex : "[-_a-zA-Z0-9:]+"}, + {token : "punctuation.begin", regex : "\\[", push : "declarations"} + ], + + declarations : [{ + token : "text", + regex : "\\s+" + }, { + token: "punctuation.end", + regex: "]", + next: "pop" + }, { + token : ["punctuation.begin", "keyword"], + regex : "(<\\!)([-_a-zA-Z0-9]+)", + push : [{ + token : "text", + regex : "\\s+" + }, + { + token : "punctuation.end", + regex : ">", + next : "pop" + }, + {include : "string"}] + }], + + cdata : [ + {token : "string.end", regex : "\\]\\]>", next : "start"}, + {token : "text", regex : "\\s+"}, + {token : "text", regex : "(?:[^\\]]|\\](?!\\]>))+"} + ], + + comment : [ + {token : "comment", regex : "-->", next : "start"}, + {defaultToken : "comment"} + ], + + tag : [{ + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(<)((?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+)", + next: [ + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : "start"} + ] + }, { + token : ["meta.tag.punctuation.begin", "meta.tag.name"], + regex : "(", next : "start"} + ] + }], + + space : [ + {token : "text", regex : "\\s+"} + ], + + reference : [{ + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, { + token : "invalid.illegal", regex : "&" + }], + + string: [{ + token : "string", + regex : "'", + push : "qstring_inner" + }, { + token : "string", + regex : '"', + push : "qqstring_inner" + }], + + qstring_inner: [ + {token : "string", regex: "'", next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + qqstring_inner: [ + {token : "string", regex: '"', next: "pop"}, + {include : "reference"}, + {defaultToken : "string"} + ], + + attributes: [{ + token : "entity.other.attribute-name", + regex : "(?:[-_a-zA-Z0-9]+:)?[-_a-zA-Z0-9]+" + }, { + token : "keyword.operator.separator", + regex : "=" + }, { + include : "space" + }, { + include : "string" + }] + }; + + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; + + +(function() { + + this.embedTagRules = function(HighlightRules, prefix, tag){ + this.$rules.tag.unshift({ + token : ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(<)(" + tag + ")", + next: [ + {include : "space"}, + {include : "attributes"}, + {token : "meta.tag.punctuation.end", regex : "/?>", next : prefix + "start"} + ] + }); + + this.$rules[tag + "-end"] = [ + {include : "space"}, + {token : "meta.tag.punctuation.end", regex : ">", next: "start", + onMatch : function(value, currentState, stack) { + stack.splice(0); + return this.token; + }} + ] + + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.begin", "meta.tag.name." + tag], + regex : "(" + }]); + }; + +}).call(TextHighlightRules.prototype); + +oop.inherits(XmlHighlightRules, TextHighlightRules); + +exports.XmlHighlightRules = XmlHighlightRules; +}); + +ace.define('ace/mode/xml_util', ["require", 'exports', 'module' ], function(acequire, exports, module) { + + +function string(state) { + return [{ + token : "string", + regex : '"', + next : state + "_qqstring" + }, { + token : "string", + regex : "'", + next : state + "_qstring" + }]; +} + +function multiLineString(quote, state) { + return [ + {token : "string", regex : quote, next : state}, + { + token : "constant.language.escape", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }, + {defaultToken : "string"} + ]; +} + +exports.tag = function(states, name, nextState, tagMap) { + states[name] = [{ + token : "text", + regex : "\\s+" + }, { + + token : !tagMap ? "meta.tag.tag-name" : function(value) { + if (tagMap[value]) + return "meta.tag.tag-name." + tagMap[value]; + else + return "meta.tag.tag-name"; + }, + regex : "[-_a-zA-Z0-9:]+", + next : name + "_embed_attribute_list" + }, { + token: "empty", + regex: "", + next : name + "_embed_attribute_list" + }]; + + states[name + "_qstring"] = multiLineString("'", name + "_embed_attribute_list"); + states[name + "_qqstring"] = multiLineString("\"", name + "_embed_attribute_list"); + + states[name + "_embed_attribute_list"] = [{ + token : "meta.tag.r", + regex : "/?>", + next : nextState + }, { + token : "keyword.operator", + regex : "=" + }, { + token : "entity.other.attribute-name", + regex : "[-_a-zA-Z0-9:]+" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "text", + regex : "\\s+" + }].concat(string(name)); +}; + +}); + +ace.define('ace/mode/behaviour/xml', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/mode/behaviour', 'ace/mode/behaviour/cstyle', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var Behaviour = acequire("../behaviour").Behaviour; +var CstyleBehaviour = acequire("./cstyle").CstyleBehaviour; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + +function hasType(token, type) { + var tokenTypes = token.type.split('.'); + return type.split('.').every(function(type){ + return (tokenTypes.indexOf(type) !== -1); + }); + return hasType; +} + +var XmlBehaviour = function () { + + this.inherit(CstyleBehaviour, ["string_dquotes"]); // Get string behaviour + + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getCursorPosition(); + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken(); + + if (token && hasType(token, 'string') && iterator.getCurrentTokenColumn() + token.value.length > position.column) + return; + var atCursor = false; + if (!token || !hasType(token, 'meta.tag') && !(hasType(token, 'text') && token.value.match('/'))){ + do { + token = iterator.stepBackward(); + } while (token && (hasType(token, 'string') || hasType(token, 'keyword.operator') || hasType(token, 'entity.attribute-name') || hasType(token, 'text'))); + } else { + atCursor = true; + } + if (!token || !hasType(token, 'meta.tag.name') || iterator.stepBackward().value.match('/')) { + return; + } + var tag = token.value; + if (atCursor){ + var tag = tag.substring(0, position.column - token.start); + } + + return { + text: '>' + '', + selection: [1, 1] + } + } + }); + + this.add('autoindent', 'insertion', function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var rightChars = line.substring(cursor.column, cursor.column + 2); + if (rightChars == ' -1; + }; + + CstyleBehaviour.recordAutoInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isAutoInsertedClosing(cursor, line, autoInsertedLineEnd[0])) + autoInsertedBrackets = 0; + autoInsertedRow = cursor.row; + autoInsertedLineEnd = bracket + line.substr(cursor.column); + autoInsertedBrackets++; + }; + + CstyleBehaviour.recordMaybeInsert = function(editor, session, bracket) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (!this.isMaybeInsertedClosing(cursor, line)) + maybeInsertedBrackets = 0; + maybeInsertedRow = cursor.row; + maybeInsertedLineStart = line.substr(0, cursor.column) + bracket; + maybeInsertedLineEnd = line.substr(cursor.column); + maybeInsertedBrackets++; + }; + + CstyleBehaviour.isAutoInsertedClosing = function(cursor, line, bracket) { + return autoInsertedBrackets > 0 && + cursor.row === autoInsertedRow && + bracket === autoInsertedLineEnd[0] && + line.substr(cursor.column) === autoInsertedLineEnd; + }; + + CstyleBehaviour.isMaybeInsertedClosing = function(cursor, line) { + return maybeInsertedBrackets > 0 && + cursor.row === maybeInsertedRow && + line.substr(cursor.column) === maybeInsertedLineEnd && + line.substr(0, cursor.column) == maybeInsertedLineStart; + }; + + CstyleBehaviour.popAutoInsertedClosing = function() { + autoInsertedLineEnd = autoInsertedLineEnd.substr(1); + autoInsertedBrackets--; + }; + + CstyleBehaviour.clearMaybeInsertedClosing = function() { + maybeInsertedBrackets = 0; + maybeInsertedRow = -1; + }; + + this.add("braces", "insertion", function (state, action, editor, session, text) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + if (text == '{') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "{" && editor.getWrapBehavioursEnabled()) { + return { + text: '{' + selected + '}', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + if (/[\]\}\)]/.test(line[cursor.column])) { + CstyleBehaviour.recordAutoInsert(editor, session, "}"); + return { + text: '{}', + selection: [1, 1] + }; + } else { + CstyleBehaviour.recordMaybeInsert(editor, session, "{"); + return { + text: '{', + selection: [1, 1] + }; + } + } + } else if (text == '}') { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}') { + var matching = session.$findOpeningBracket('}', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } else if (text == "\n" || text == "\r\n") { + var closing = ""; + if (CstyleBehaviour.isMaybeInsertedClosing(cursor, line)) { + closing = lang.stringRepeat("}", maybeInsertedBrackets); + CstyleBehaviour.clearMaybeInsertedClosing(); + } + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == '}' || closing !== "") { + var openBracePos = session.findMatchingBracket({row: cursor.row, column: cursor.column+1}, '}'); + if (!openBracePos) + return null; + + var indent = this.getNextLineIndent(state, line.substring(0, cursor.column), session.getTabString()); + var next_indent = this.$getIndent(line); + + return { + text: '\n' + indent + '\n' + next_indent + closing, + selection: [1, indent.length, 1, indent.length] + }; + } + } + }); + + this.add("braces", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '{') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar == '}') { + range.end.column++; + return range; + } else { + maybeInsertedBrackets--; + } + } + }); + + this.add("parens", "insertion", function (state, action, editor, session, text) { + if (text == '(') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '(' + selected + ')', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, ")"); + return { + text: '()', + selection: [1, 1] + }; + } + } else if (text == ')') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ')') { + var matching = session.$findOpeningBracket(')', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("parens", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '(') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ')') { + range.end.column++; + return range; + } + } + }); + + this.add("brackets", "insertion", function (state, action, editor, session, text) { + if (text == '[') { + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && editor.getWrapBehavioursEnabled()) { + return { + text: '[' + selected + ']', + selection: false + }; + } else if (CstyleBehaviour.isSaneInsertion(editor, session)) { + CstyleBehaviour.recordAutoInsert(editor, session, "]"); + return { + text: '[]', + selection: [1, 1] + }; + } + } else if (text == ']') { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == ']') { + var matching = session.$findOpeningBracket(']', {column: cursor.column + 1, row: cursor.row}); + if (matching !== null && CstyleBehaviour.isAutoInsertedClosing(cursor, line, text)) { + CstyleBehaviour.popAutoInsertedClosing(); + return { + text: '', + selection: [1, 1] + }; + } + } + } + }); + + this.add("brackets", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected == '[') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == ']') { + range.end.column++; + return range; + } + } + }); + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selection = editor.getSelectionRange(); + var selected = session.doc.getTextRange(selection); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } else { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var leftChar = line.substring(cursor.column-1, cursor.column); + if (leftChar == '\\') { + return null; + } + var tokens = session.getTokens(selection.start.row); + var col = 0, token; + var quotepos = -1; // Track whether we're inside an open quote. + + for (var x = 0; x < tokens.length; x++) { + token = tokens[x]; + if (token.type == "string") { + quotepos = -1; + } else if (quotepos < 0) { + quotepos = token.value.indexOf(quote); + } + if ((token.value.length + col) > selection.start.column) { + break; + } + col += tokens[x].value.length; + } + if (!token || (quotepos < 0 && token.type !== "comment" && (token.type !== "string" || ((selection.start.column !== token.value.length+col-1) && token.value.lastIndexOf(quote) === token.value.length-1)))) { + if (!CstyleBehaviour.isSaneInsertion(editor, session)) + return; + return { + text: quote + quote, + selection: [1,1] + }; + } else if (token && token.type === "string") { + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar == quote) { + return { + text: '', + selection: [1, 1] + }; + } + } + } + } + }); + + this.add("string_dquotes", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + +}; + +oop.inherits(CstyleBehaviour, Behaviour); + +exports.CstyleBehaviour = CstyleBehaviour; +}); + +ace.define('ace/mode/folding/xml', ["require", 'exports', 'module' , 'ace/lib/oop', 'ace/lib/lang', 'ace/range', 'ace/mode/folding/fold_mode', 'ace/token_iterator'], function(acequire, exports, module) { + + +var oop = acequire("../../lib/oop"); +var lang = acequire("../../lib/lang"); +var Range = acequire("../../range").Range; +var BaseFoldMode = acequire("./fold_mode").FoldMode; +var TokenIterator = acequire("../../token_iterator").TokenIterator; + +var FoldMode = exports.FoldMode = function(voidElements) { + BaseFoldMode.call(this); + this.voidElements = voidElements || {}; +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.getFoldWidget = function(session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + + if (tag.closing) + return foldStyle == "markbeginend" ? "end" : ""; + + if (!tag.tagName || this.voidElements[tag.tagName.toLowerCase()]) + return ""; + + if (tag.selfClosing) + return ""; + + if (tag.value.indexOf("/" + tag.tagName) !== -1) + return ""; + + return "start"; + }; + + this._getFirstTagInLine = function(session, row) { + var tokens = session.getTokens(row); + var value = ""; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + if (token.type.lastIndexOf("meta.tag", 0) === 0) + value += token.value; + else + value += lang.stringRepeat(" ", token.value.length); + } + + return this._parseTag(value); + }; + + this.tagRe = /^(\s*)(?)/; + this._parseTag = function(tag) { + + var match = tag.match(this.tagRe); + var column = 0; + + return { + value: tag, + match: match ? match[2] : "", + closing: match ? !!match[3] : false, + selfClosing: match ? !!match[5] || match[2] == "/>" : false, + tagName: match ? match[4] : "", + column: match[1] ? column + match[1].length : column + }; + }; + this._readTagForward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var value = ""; + var start; + + do { + if (token.type.lastIndexOf("meta.tag", 0) === 0) { + if (!start) { + var start = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + }; + } + value += token.value; + if (value.indexOf(">") !== -1) { + var tag = this._parseTag(value); + tag.start = start; + tag.end = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + token.value.length + }; + iterator.stepForward(); + return tag; + } + } + } while(token = iterator.stepForward()); + + return null; + }; + + this._readTagBackward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var value = ""; + var end; + + do { + if (token.type.lastIndexOf("meta.tag", 0) === 0) { + if (!end) { + end = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + token.value.length + }; + } + value = token.value + value; + if (value.indexOf("<") !== -1) { + var tag = this._parseTag(value); + tag.end = end; + tag.start = { + row: iterator.getCurrentTokenRow(), + column: iterator.getCurrentTokenColumn() + }; + iterator.stepBackward(); + return tag; + } + } + } while(token = iterator.stepBackward()); + + return null; + }; + + this._pop = function(stack, tag) { + while (stack.length) { + + var top = stack[stack.length-1]; + if (!tag || top.tagName == tag.tagName) { + return stack.pop(); + } + else if (this.voidElements[tag.tagName]) { + return; + } + else if (this.voidElements[top.tagName]) { + stack.pop(); + continue; + } else { + return null; + } + } + }; + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + + if (!firstTag.match) + return null; + + var isBackward = firstTag.closing || firstTag.selfClosing; + var stack = []; + var tag; + + if (!isBackward) { + var iterator = new TokenIterator(session, row, firstTag.column); + var start = { + row: row, + column: firstTag.column + firstTag.tagName.length + 2 + }; + while (tag = this._readTagForward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) + return Range.fromPoints(start, tag.start); + } + else { + stack.push(tag) + } + } + } + else { + var iterator = new TokenIterator(session, row, firstTag.column + firstTag.match.length); + var end = { + row: row, + column: firstTag.column + }; + + while (tag = this._readTagBackward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (!tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) { + tag.start.column += tag.tagName.length + 2; + return Range.fromPoints(tag.start, end); + } + } + else { + stack.push(tag) + } + } + } + + }; + +}).call(FoldMode.prototype); + +}); diff --git a/pitfall/pdfkit/node_modules/brace/mode/xquery.js b/pitfall/pdfkit/node_modules/brace/mode/xquery.js new file mode 100644 index 00000000..bd3a0e7a --- /dev/null +++ b/pitfall/pdfkit/node_modules/brace/mode/xquery.js @@ -0,0 +1,2789 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Distributed under the BSD license: + * + * Copyright (c) 2010, Ajax.org B.V. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of Ajax.org B.V. nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * ***** END LICENSE BLOCK ***** */ +ace.define('ace/mode/xquery', ["require", 'exports', 'module' , 'ace/worker/worker_client', 'ace/lib/oop', 'ace/mode/text', 'ace/mode/xquery/XQueryLexer', 'ace/range', 'ace/mode/behaviour/xquery', 'ace/mode/folding/cstyle'], function(acequire, exports, module) { + + +var WorkerClient = acequire("../worker/worker_client").WorkerClient; +var oop = acequire("../lib/oop"); +var TextMode = acequire("./text").Mode; +var XQueryLexer = acequire("./xquery/XQueryLexer").XQueryLexer; +var Range = acequire("../range").Range; +var XQueryBehaviour = acequire("./behaviour/xquery").XQueryBehaviour; +var CStyleFoldMode = acequire("./folding/cstyle").FoldMode; + + +var Mode = function() { + this.$tokenizer = new XQueryLexer(); + this.$behaviour = new XQueryBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; + +oop.inherits(Mode, TextMode); + +(function() { + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + var match = line.match(/\s*(?:then|else|return|[{\(]|<\w+>)\s*$/); + if (match) + indent += tab; + return indent; + }; + + this.checkOutdent = function(state, line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*[\}\)]/.test(input); + }; + + this.autoOutdent = function(state, doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*[\}\)])/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.toggleCommentLines = function(state, doc, startRow, endRow) { + var i, line; + var outdent = true; + var re = /^\s*\(:(.*):\)/; + + for (i=startRow; i<= endRow; i++) { + if (!re.test(doc.getLine(i))) { + outdent = false; + break; + } + } + + var range = new Range(0, 0, 0, 0); + for (i=startRow; i<= endRow; i++) { + line = doc.getLine(i); + range.start.row = i; + range.end.row = i; + range.end.column = line.length; + + doc.replace(range, outdent ? line.match(re)[1] : "(:" + line + ":)"); + } + }; + + this.createWorker = function(session) { + + var worker = new WorkerClient(["ace"], "ace/mode/xquery_worker", "XQueryWorker"); + var that = this; + + worker.attachToDocument(session.getDocument()); + + worker.on("error", function(e) { + session.setAnnotations([e.data]); + }); + + worker.on("ok", function(e) { + session.clearAnnotations(); + }); + + worker.on("highlight", function(tokens) { + that.$tokenizer.tokens = tokens.data.tokens; + that.$tokenizer.lines = session.getDocument().getAllLines(); + + var rows = Object.keys(that.$tokenizer.tokens); + for(var i=0; i < rows.length; i++) { + var row = parseInt(rows[i]); + delete session.bgTokenizer.lines[row]; + delete session.bgTokenizer.states[row]; + session.bgTokenizer.fireUpdateEvent(row, row); + } + }); + + return worker; + }; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +ace.define('ace/mode/xquery/XQueryLexer', ["require", 'exports', 'module' , 'ace/mode/xquery/XQueryTokenizer'], function(acequire, exports, module) { + + var XQueryTokenizer = acequire("./XQueryTokenizer").XQueryTokenizer; + + var TokenHandler = function(code) { + + var input = code; + + this.tokens = []; + + this.reset = function(code) { + input = input; + this.tokens = []; + }; + + this.startNonterminal = function(name, begin) {}; + + this.endNonterminal = function(name, end) {}; + + this.terminal = function(name, begin, end) { + this.tokens.push({ + name: name, + value: input.substring(begin, end) + }); + }; + + this.whitespace = function(begin, end) { + this.tokens.push({ + name: "WS", + value: input.substring(begin, end) + }); + }; + }; + + var keys = "after|ancestor|ancestor-or-self|and|as|ascending|attribute|before|case|cast|castable|child|collation|comment|copy|count|declare|default|delete|descendant|descendant-or-self|descending|div|document|document-node|element|else|empty|empty-sequence|end|eq|every|except|first|following|following-sibling|for|function|ge|group|gt|idiv|if|import|insert|instance|intersect|into|is|item|last|le|let|lt|mod|modify|module|namespace|namespace-node|ne|node|only|or|order|ordered|parent|preceding|preceding-sibling|processing-instruction|rename|replace|return|satisfies|schema-attribute|schema-element|self|some|stable|start|switch|text|to|treat|try|typeswitch|union|unordered|validate|where|with|xquery|contains|paragraphs|sentences|times|words|by|collectionreturn|variable|version|option|when|encoding|toswitch|catch|tumbling|sliding|window|at|using|stemming|collection|schema|while|on|nodes|index|external|then|in|updating|value|of|containsbreak|loop|continue|exit|returning|append|json|position|strict".split("|"); + var keywords = keys.map( + function(val) { return { name: "'" + val + "'", token: "keyword" }; } + ); + + var ncnames = keys.map( + function(val) { return { name: "'" + val + "'", token: "text", next: function(stack){ stack.pop(); } }; } + ); + + var cdata = "constant.language"; + var number = "constant"; + var xmlcomment = "comment"; + var pi = "xml-pe"; + var pragma = "constant.buildin"; + + var Rules = { + start: [ + { name: "'(#'", token: pragma, next: function(stack){ stack.push("Pragma"); } }, + { name: "'(:'", token: "comment", next: function(stack){ stack.push("Comment"); } }, + { name: "'(:~'", token: "comment.doc", next: function(stack){ stack.push("CommentDoc"); } }, + { name: "''", token: xmlcomment, next: function(stack){ stack.pop(); } } + ], + CData: [ + { name: "CDataSectionContents", token: cdata }, + { name: "']]>'", token: cdata, next: function(stack){ stack.pop(); } } + ], + PI: [ + { name: "DirPIContents", token: pi }, + { name: "'?'", token: pi }, + { name: "'?>'", token: pi, next: function(stack){ stack.pop(); } } + ], + AposString: [ + { name: "''''", token: "string", next: function(stack){ stack.pop(); } }, + { name: "PredefinedEntityRef", token: "constant.language.escape" }, + { name: "CharRef", token: "constant.language.escape" }, + { name: "EscapeApos", token: "constant.language.escape" }, + { name: "AposChar", token: "string" } + ], + QuotString: [ + { name: "'\"'", token: "string", next: function(stack){ stack.pop(); } }, + { name: "PredefinedEntityRef", token: "constant.language.escape" }, + { name: "CharRef", token: "constant.language.escape" }, + { name: "EscapeQuot", token: "constant.language.escape" }, + { name: "QuotChar", token: "string" } + ] + }; + +exports.XQueryLexer = function() { + + this.tokens = []; + + this.getLineTokens = function(line, state, row) { + state = (state === "start" || !state) ? '["start"]' : state; + var stack = JSON.parse(state); + var h = new TokenHandler(line); + var tokenizer = new XQueryTokenizer(line, h); + var tokens = []; + + while(true) { + var currentState = stack[stack.length - 1]; + try { + + h.tokens = []; + tokenizer["parse_" + currentState](); + var info = null; + + if(h.tokens.length > 1 && h.tokens[0].name === "WS") { + tokens.push({ + type: "text", + value: h.tokens[0].value + }); + h.tokens.splice(0, 1); + } + + var token = h.tokens[0]; + var rules = Rules[currentState]; + for(var k = 0; k < rules.length; k++) { + var rule = Rules[currentState][k]; + if((typeof(rule.name) === "function" && rule.name(token)) || rule.name === token.name) { + info = rule; + break; + } + } + + if(token.name === "EOF") { break; } + if(token.value === "") { throw "Encountered empty string lexical rule."; } + + tokens.push({ + type: info === null ? "text" : (typeof(info.token) === "function" ? info.token(token.value) : info.token), + value: token.value + }); + + if(info && info.next) { + info.next(stack); + } + + } catch(e) { + if(e instanceof tokenizer.ParseException) { + var index = 0; + for(var i=0; i < tokens.length; i++) { + index += tokens[i].value.length; + } + tokens.push({ type: "text", value: line.substring(index) }); + return { + tokens: tokens, + state: JSON.stringify(["start"]) + }; + } else { + throw e; + } + } + } + + + if(this.tokens[row] !== undefined) { + var cachedLine = this.lines[row]; + var begin = sharedStart([line, cachedLine]); + var diff = cachedLine.length - line.length; + var idx = 0; + var col = 0; + for(var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + for(var j = 0; j < this.tokens[row].length; j++) { + var semanticToken = this.tokens[row][j]; + if( + ((col + token.value.length) <= begin.length && semanticToken.sc === col && semanticToken.ec === (col + token.value.length)) || + (semanticToken.sc === (col + diff) && semanticToken.ec === (col + token.value.length + diff)) + ) { + idx = i; + tokens[i].type = semanticToken.type; + } + } + col += token.value.length; + } + } + + return { + tokens: tokens, + state: JSON.stringify(stack) + }; + }; + + function sharedStart(A) { + var tem1, tem2, s, A = A.slice(0).sort(); + tem1 = A[0]; + s = tem1.length; + tem2 = A.pop(); + while(s && tem2.indexOf(tem1) == -1) { + tem1 = tem1.substring(0, --s); + } + return tem1; + } +}; +}); + + ace.define('ace/mode/xquery/XQueryTokenizer', ["require", 'exports', 'module' ], function(acequire, exports, module) { + var XQueryTokenizer = exports.XQueryTokenizer = function XQueryTokenizer(string, parsingEventHandler) + { + init(string, parsingEventHandler); + var self = this; + + this.ParseException = function(b, e, s, o, x) + { + var + begin = b, + end = e, + state = s, + offending = o, + expected = x; + + this.getBegin = function() {return begin;}; + this.getEnd = function() {return end;}; + this.getState = function() {return state;}; + this.getExpected = function() {return expected;}; + this.getOffending = function() {return offending;}; + + this.getMessage = function() + { + return offending < 0 ? "lexical analysis failed" : "syntax error"; + }; + }; + + function init(string, parsingEventHandler) + { + eventHandler = parsingEventHandler; + input = string; + size = string.length; + reset(0, 0, 0); + } + + this.getInput = function() + { + return input; + }; + + function reset(l, b, e) + { + b0 = b; e0 = b; + l1 = l; b1 = b; e1 = e; + end = e; + eventHandler.reset(input); + } + + this.getOffendingToken = function(e) + { + var o = e.getOffending(); + return o >= 0 ? XQueryTokenizer.TOKEN[o] : null; + }; + + this.getExpectedTokenSet = function(e) + { + var expected; + if (e.getExpected() < 0) + { + expected = XQueryTokenizer.getTokenSet(- e.getState()); + } + else + { + expected = [XQueryTokenizer.TOKEN[e.getExpected()]]; + } + return expected; + }; + + this.getErrorMessage = function(e) + { + var tokenSet = this.getExpectedTokenSet(e); + var found = this.getOffendingToken(e); + var prefix = input.substring(0, e.getBegin()); + var lines = prefix.split("\n"); + var line = lines.length; + var column = lines[line - 1].length + 1; + var size = e.getEnd() - e.getBegin(); + return e.getMessage() + + (found == null ? "" : ", found " + found) + + "\nwhile expecting " + + (tokenSet.length == 1 ? tokenSet[0] : ("[" + tokenSet.join(", ") + "]")) + + "\n" + + (size == 0 || found != null ? "" : "after successfully scanning " + size + " characters beginning ") + + "at line " + line + ", column " + column + ":\n..." + + input.substring(e.getBegin(), Math.min(input.length, e.getBegin() + 64)) + + "..."; + }; + + this.parse_start = function() + { + eventHandler.startNonterminal("start", e0); + lookahead1W(14); // ModuleDecl | Annotation | OptionDecl | Operator | Variable | Tag | AttrTest | + switch (l1) + { + case 55: // '' | '=' | '>' + switch (l1) + { + case 58: // '>' + shift(58); // '>' + break; + case 50: // '/>' + shift(50); // '/>' + break; + case 27: // QName + shift(27); // QName + break; + case 57: // '=' + shift(57); // '=' + break; + case 35: // '"' + shift(35); // '"' + break; + case 38: // "'" + shift(38); // "'" + break; + default: + shift(33); // EOF + } + eventHandler.endNonterminal("StartTag", e0); + }; + + this.parse_TagContent = function() + { + eventHandler.startNonterminal("TagContent", e0); + lookahead1(11); // Tag | EndTag | PredefinedEntityRef | ElementContentChar | CharRef | EOF | + switch (l1) + { + case 23: // ElementContentChar + shift(23); // ElementContentChar + break; + case 6: // Tag + shift(6); // Tag + break; + case 7: // EndTag + shift(7); // EndTag + break; + case 55: // '' + switch (l1) + { + case 11: // CDataSectionContents + shift(11); // CDataSectionContents + break; + case 64: // ']]>' + shift(64); // ']]>' + break; + default: + shift(33); // EOF + } + eventHandler.endNonterminal("CData", e0); + }; + + this.parse_XMLComment = function() + { + eventHandler.startNonterminal("XMLComment", e0); + lookahead1(0); // DirCommentContents | EOF | '-->' + switch (l1) + { + case 9: // DirCommentContents + shift(9); // DirCommentContents + break; + case 47: // '-->' + shift(47); // '-->' + break; + default: + shift(33); // EOF + } + eventHandler.endNonterminal("XMLComment", e0); + }; + + this.parse_PI = function() + { + eventHandler.startNonterminal("PI", e0); + lookahead1(3); // DirPIContents | EOF | '?' | '?>' + switch (l1) + { + case 10: // DirPIContents + shift(10); // DirPIContents + break; + case 59: // '?' + shift(59); // '?' + break; + case 60: // '?>' + shift(60); // '?>' + break; + default: + shift(33); // EOF + } + eventHandler.endNonterminal("PI", e0); + }; + + this.parse_Pragma = function() + { + eventHandler.startNonterminal("Pragma", e0); + lookahead1(2); // PragmaContents | EOF | '#' | '#)' + switch (l1) + { + case 8: // PragmaContents + shift(8); // PragmaContents + break; + case 36: // '#' + shift(36); // '#' + break; + case 37: // '#)' + shift(37); // '#)' + break; + default: + shift(33); // EOF + } + eventHandler.endNonterminal("Pragma", e0); + }; + + this.parse_Comment = function() + { + eventHandler.startNonterminal("Comment", e0); + lookahead1(4); // CommentContents | EOF | '(:' | ':)' + switch (l1) + { + case 52: // ':)' + shift(52); // ':)' + break; + case 41: // '(:' + shift(41); // '(:' + break; + case 30: // CommentContents + shift(30); // CommentContents + break; + default: + shift(33); // EOF + } + eventHandler.endNonterminal("Comment", e0); + }; + + this.parse_CommentDoc = function() + { + eventHandler.startNonterminal("CommentDoc", e0); + lookahead1(5); // DocTag | DocCommentContents | EOF | '(:' | ':)' + switch (l1) + { + case 31: // DocTag + shift(31); // DocTag + break; + case 32: // DocCommentContents + shift(32); // DocCommentContents + break; + case 52: // ':)' + shift(52); // ':)' + break; + case 41: // '(:' + shift(41); // '(:' + break; + default: + shift(33); // EOF + } + eventHandler.endNonterminal("CommentDoc", e0); + }; + + this.parse_QuotString = function() + { + eventHandler.startNonterminal("QuotString", e0); + lookahead1(6); // PredefinedEntityRef | EscapeQuot | QuotChar | CharRef | EOF | '"' + switch (l1) + { + case 18: // PredefinedEntityRef + shift(18); // PredefinedEntityRef + break; + case 29: // CharRef + shift(29); // CharRef + break; + case 19: // EscapeQuot + shift(19); // EscapeQuot + break; + case 21: // QuotChar + shift(21); // QuotChar + break; + case 35: // '"' + shift(35); // '"' + break; + default: + shift(33); // EOF + } + eventHandler.endNonterminal("QuotString", e0); + }; + + this.parse_AposString = function() + { + eventHandler.startNonterminal("AposString", e0); + lookahead1(7); // PredefinedEntityRef | EscapeApos | AposChar | CharRef | EOF | "'" + switch (l1) + { + case 18: // PredefinedEntityRef + shift(18); // PredefinedEntityRef + break; + case 29: // CharRef + shift(29); // CharRef + break; + case 20: // EscapeApos + shift(20); // EscapeApos + break; + case 22: // AposChar + shift(22); // AposChar + break; + case 38: // "'" + shift(38); // "'" + break; + default: + shift(33); // EOF + } + eventHandler.endNonterminal("AposString", e0); + }; + + this.parse_Prefix = function() + { + eventHandler.startNonterminal("Prefix", e0); + lookahead1W(13); // NCName^Token | S^WS | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | + whitespace(); + parse_NCName(); + eventHandler.endNonterminal("Prefix", e0); + }; + + this.parse__EQName = function() + { + eventHandler.startNonterminal("_EQName", e0); + lookahead1W(12); // EQName^Token | S^WS | 'after' | 'allowing' | 'ancestor' | 'ancestor-or-self' | + whitespace(); + parse_EQName(); + eventHandler.endNonterminal("_EQName", e0); + }; + + function parse_EQName() + { + eventHandler.startNonterminal("EQName", e0); + switch (l1) + { + case 77: // 'attribute' + shift(77); // 'attribute' + break; + case 91: // 'comment' + shift(91); // 'comment' + break; + case 115: // 'document-node' + shift(115); // 'document-node' + break; + case 116: // 'element' + shift(116); // 'element' + break; + case 119: // 'empty-sequence' + shift(119); // 'empty-sequence' + break; + case 140: // 'function' + shift(140); // 'function' + break; + case 147: // 'if' + shift(147); // 'if' + break; + case 160: // 'item' + shift(160); // 'item' + break; + case 180: // 'namespace-node' + shift(180); // 'namespace-node' + break; + case 186: // 'node' + shift(186); // 'node' + break; + case 211: // 'processing-instruction' + shift(211); // 'processing-instruction' + break; + case 221: // 'schema-attribute' + shift(221); // 'schema-attribute' + break; + case 222: // 'schema-element' + shift(222); // 'schema-element' + break; + case 238: // 'switch' + shift(238); // 'switch' + break; + case 239: // 'text' + shift(239); // 'text' + break; + case 248: // 'typeswitch' + shift(248); // 'typeswitch' + break; + default: + parse_FunctionName(); + } + eventHandler.endNonterminal("EQName", e0); + } + + function parse_FunctionName() + { + eventHandler.startNonterminal("FunctionName", e0); + switch (l1) + { + case 14: // EQName^Token + shift(14); // EQName^Token + break; + case 65: // 'after' + shift(65); // 'after' + break; + case 68: // 'ancestor' + shift(68); // 'ancestor' + break; + case 69: // 'ancestor-or-self' + shift(69); // 'ancestor-or-self' + break; + case 70: // 'and' + shift(70); // 'and' + break; + case 74: // 'as' + shift(74); // 'as' + break; + case 75: // 'ascending' + shift(75); // 'ascending' + break; + case 79: // 'before' + shift(79); // 'before' + break; + case 83: // 'case' + shift(83); // 'case' + break; + case 84: // 'cast' + shift(84); // 'cast' + break; + case 85: // 'castable' + shift(85); // 'castable' + break; + case 88: // 'child' + shift(88); // 'child' + break; + case 89: // 'collation' + shift(89); // 'collation' + break; + case 98: // 'copy' + shift(98); // 'copy' + break; + case 100: // 'count' + shift(100); // 'count' + break; + case 103: // 'declare' + shift(103); // 'declare' + break; + case 104: // 'default' + shift(104); // 'default' + break; + case 105: // 'delete' + shift(105); // 'delete' + break; + case 106: // 'descendant' + shift(106); // 'descendant' + break; + case 107: // 'descendant-or-self' + shift(107); // 'descendant-or-self' + break; + case 108: // 'descending' + shift(108); // 'descending' + break; + case 113: // 'div' + shift(113); // 'div' + break; + case 114: // 'document' + shift(114); // 'document' + break; + case 117: // 'else' + shift(117); // 'else' + break; + case 118: // 'empty' + shift(118); // 'empty' + break; + case 121: // 'end' + shift(121); // 'end' + break; + case 123: // 'eq' + shift(123); // 'eq' + break; + case 124: // 'every' + shift(124); // 'every' + break; + case 126: // 'except' + shift(126); // 'except' + break; + case 129: // 'first' + shift(129); // 'first' + break; + case 130: // 'following' + shift(130); // 'following' + break; + case 131: // 'following-sibling' + shift(131); // 'following-sibling' + break; + case 132: // 'for' + shift(132); // 'for' + break; + case 141: // 'ge' + shift(141); // 'ge' + break; + case 143: // 'group' + shift(143); // 'group' + break; + case 145: // 'gt' + shift(145); // 'gt' + break; + case 146: // 'idiv' + shift(146); // 'idiv' + break; + case 148: // 'import' + shift(148); // 'import' + break; + case 154: // 'insert' + shift(154); // 'insert' + break; + case 155: // 'instance' + shift(155); // 'instance' + break; + case 157: // 'intersect' + shift(157); // 'intersect' + break; + case 158: // 'into' + shift(158); // 'into' + break; + case 159: // 'is' + shift(159); // 'is' + break; + case 165: // 'last' + shift(165); // 'last' + break; + case 167: // 'le' + shift(167); // 'le' + break; + case 169: // 'let' + shift(169); // 'let' + break; + case 173: // 'lt' + shift(173); // 'lt' + break; + case 175: // 'mod' + shift(175); // 'mod' + break; + case 176: // 'modify' + shift(176); // 'modify' + break; + case 177: // 'module' + shift(177); // 'module' + break; + case 179: // 'namespace' + shift(179); // 'namespace' + break; + case 181: // 'ne' + shift(181); // 'ne' + break; + case 193: // 'only' + shift(193); // 'only' + break; + case 195: // 'or' + shift(195); // 'or' + break; + case 196: // 'order' + shift(196); // 'order' + break; + case 197: // 'ordered' + shift(197); // 'ordered' + break; + case 201: // 'parent' + shift(201); // 'parent' + break; + case 207: // 'preceding' + shift(207); // 'preceding' + break; + case 208: // 'preceding-sibling' + shift(208); // 'preceding-sibling' + break; + case 213: // 'rename' + shift(213); // 'rename' + break; + case 214: // 'replace' + shift(214); // 'replace' + break; + case 215: // 'return' + shift(215); // 'return' + break; + case 219: // 'satisfies' + shift(219); // 'satisfies' + break; + case 224: // 'self' + shift(224); // 'self' + break; + case 230: // 'some' + shift(230); // 'some' + break; + case 231: // 'stable' + shift(231); // 'stable' + break; + case 232: // 'start' + shift(232); // 'start' + break; + case 243: // 'to' + shift(243); // 'to' + break; + case 244: // 'treat' + shift(244); // 'treat' + break; + case 245: // 'try' + shift(245); // 'try' + break; + case 249: // 'union' + shift(249); // 'union' + break; + case 251: // 'unordered' + shift(251); // 'unordered' + break; + case 255: // 'validate' + shift(255); // 'validate' + break; + case 261: // 'where' + shift(261); // 'where' + break; + case 265: // 'with' + shift(265); // 'with' + break; + case 269: // 'xquery' + shift(269); // 'xquery' + break; + case 67: // 'allowing' + shift(67); // 'allowing' + break; + case 76: // 'at' + shift(76); // 'at' + break; + case 78: // 'base-uri' + shift(78); // 'base-uri' + break; + case 80: // 'boundary-space' + shift(80); // 'boundary-space' + break; + case 81: // 'break' + shift(81); // 'break' + break; + case 86: // 'catch' + shift(86); // 'catch' + break; + case 93: // 'construction' + shift(93); // 'construction' + break; + case 96: // 'context' + shift(96); // 'context' + break; + case 97: // 'continue' + shift(97); // 'continue' + break; + case 99: // 'copy-namespaces' + shift(99); // 'copy-namespaces' + break; + case 101: // 'decimal-format' + shift(101); // 'decimal-format' + break; + case 120: // 'encoding' + shift(120); // 'encoding' + break; + case 127: // 'exit' + shift(127); // 'exit' + break; + case 128: // 'external' + shift(128); // 'external' + break; + case 136: // 'ft-option' + shift(136); // 'ft-option' + break; + case 149: // 'in' + shift(149); // 'in' + break; + case 150: // 'index' + shift(150); // 'index' + break; + case 156: // 'integrity' + shift(156); // 'integrity' + break; + case 166: // 'lax' + shift(166); // 'lax' + break; + case 187: // 'nodes' + shift(187); // 'nodes' + break; + case 194: // 'option' + shift(194); // 'option' + break; + case 198: // 'ordering' + shift(198); // 'ordering' + break; + case 217: // 'revalidation' + shift(217); // 'revalidation' + break; + case 220: // 'schema' + shift(220); // 'schema' + break; + case 223: // 'score' + shift(223); // 'score' + break; + case 229: // 'sliding' + shift(229); // 'sliding' + break; + case 235: // 'strict' + shift(235); // 'strict' + break; + case 246: // 'tumbling' + shift(246); // 'tumbling' + break; + case 247: // 'type' + shift(247); // 'type' + break; + case 252: // 'updating' + shift(252); // 'updating' + break; + case 256: // 'value' + shift(256); // 'value' + break; + case 257: // 'variable' + shift(257); // 'variable' + break; + case 258: // 'version' + shift(258); // 'version' + break; + case 262: // 'while' + shift(262); // 'while' + break; + case 92: // 'constraint' + shift(92); // 'constraint' + break; + case 171: // 'loop' + shift(171); // 'loop' + break; + default: + shift(216); // 'returning' + } + eventHandler.endNonterminal("FunctionName", e0); + } + + function parse_NCName() + { + eventHandler.startNonterminal("NCName", e0); + switch (l1) + { + case 26: // NCName^Token + shift(26); // NCName^Token + break; + case 65: // 'after' + shift(65); // 'after' + break; + case 70: // 'and' + shift(70); // 'and' + break; + case 74: // 'as' + shift(74); // 'as' + break; + case 75: // 'ascending' + shift(75); // 'ascending' + break; + case 79: // 'before' + shift(79); // 'before' + break; + case 83: // 'case' + shift(83); // 'case' + break; + case 84: // 'cast' + shift(84); // 'cast' + break; + case 85: // 'castable' + shift(85); // 'castable' + break; + case 89: // 'collation' + shift(89); // 'collation' + break; + case 100: // 'count' + shift(100); // 'count' + break; + case 104: // 'default' + shift(104); // 'default' + break; + case 108: // 'descending' + shift(108); // 'descending' + break; + case 113: // 'div' + shift(113); // 'div' + break; + case 117: // 'else' + shift(117); // 'else' + break; + case 118: // 'empty' + shift(118); // 'empty' + break; + case 121: // 'end' + shift(121); // 'end' + break; + case 123: // 'eq' + shift(123); // 'eq' + break; + case 126: // 'except' + shift(126); // 'except' + break; + case 132: // 'for' + shift(132); // 'for' + break; + case 141: // 'ge' + shift(141); // 'ge' + break; + case 143: // 'group' + shift(143); // 'group' + break; + case 145: // 'gt' + shift(145); // 'gt' + break; + case 146: // 'idiv' + shift(146); // 'idiv' + break; + case 155: // 'instance' + shift(155); // 'instance' + break; + case 157: // 'intersect' + shift(157); // 'intersect' + break; + case 158: // 'into' + shift(158); // 'into' + break; + case 159: // 'is' + shift(159); // 'is' + break; + case 167: // 'le' + shift(167); // 'le' + break; + case 169: // 'let' + shift(169); // 'let' + break; + case 173: // 'lt' + shift(173); // 'lt' + break; + case 175: // 'mod' + shift(175); // 'mod' + break; + case 176: // 'modify' + shift(176); // 'modify' + break; + case 181: // 'ne' + shift(181); // 'ne' + break; + case 193: // 'only' + shift(193); // 'only' + break; + case 195: // 'or' + shift(195); // 'or' + break; + case 196: // 'order' + shift(196); // 'order' + break; + case 215: // 'return' + shift(215); // 'return' + break; + case 219: // 'satisfies' + shift(219); // 'satisfies' + break; + case 231: // 'stable' + shift(231); // 'stable' + break; + case 232: // 'start' + shift(232); // 'start' + break; + case 243: // 'to' + shift(243); // 'to' + break; + case 244: // 'treat' + shift(244); // 'treat' + break; + case 249: // 'union' + shift(249); // 'union' + break; + case 261: // 'where' + shift(261); // 'where' + break; + case 265: // 'with' + shift(265); // 'with' + break; + case 68: // 'ancestor' + shift(68); // 'ancestor' + break; + case 69: // 'ancestor-or-self' + shift(69); // 'ancestor-or-self' + break; + case 77: // 'attribute' + shift(77); // 'attribute' + break; + case 88: // 'child' + shift(88); // 'child' + break; + case 91: // 'comment' + shift(91); // 'comment' + break; + case 98: // 'copy' + shift(98); // 'copy' + break; + case 103: // 'declare' + shift(103); // 'declare' + break; + case 105: // 'delete' + shift(105); // 'delete' + break; + case 106: // 'descendant' + shift(106); // 'descendant' + break; + case 107: // 'descendant-or-self' + shift(107); // 'descendant-or-self' + break; + case 114: // 'document' + shift(114); // 'document' + break; + case 115: // 'document-node' + shift(115); // 'document-node' + break; + case 116: // 'element' + shift(116); // 'element' + break; + case 119: // 'empty-sequence' + shift(119); // 'empty-sequence' + break; + case 124: // 'every' + shift(124); // 'every' + break; + case 129: // 'first' + shift(129); // 'first' + break; + case 130: // 'following' + shift(130); // 'following' + break; + case 131: // 'following-sibling' + shift(131); // 'following-sibling' + break; + case 140: // 'function' + shift(140); // 'function' + break; + case 147: // 'if' + shift(147); // 'if' + break; + case 148: // 'import' + shift(148); // 'import' + break; + case 154: // 'insert' + shift(154); // 'insert' + break; + case 160: // 'item' + shift(160); // 'item' + break; + case 165: // 'last' + shift(165); // 'last' + break; + case 177: // 'module' + shift(177); // 'module' + break; + case 179: // 'namespace' + shift(179); // 'namespace' + break; + case 180: // 'namespace-node' + shift(180); // 'namespace-node' + break; + case 186: // 'node' + shift(186); // 'node' + break; + case 197: // 'ordered' + shift(197); // 'ordered' + break; + case 201: // 'parent' + shift(201); // 'parent' + break; + case 207: // 'preceding' + shift(207); // 'preceding' + break; + case 208: // 'preceding-sibling' + shift(208); // 'preceding-sibling' + break; + case 211: // 'processing-instruction' + shift(211); // 'processing-instruction' + break; + case 213: // 'rename' + shift(213); // 'rename' + break; + case 214: // 'replace' + shift(214); // 'replace' + break; + case 221: // 'schema-attribute' + shift(221); // 'schema-attribute' + break; + case 222: // 'schema-element' + shift(222); // 'schema-element' + break; + case 224: // 'self' + shift(224); // 'self' + break; + case 230: // 'some' + shift(230); // 'some' + break; + case 238: // 'switch' + shift(238); // 'switch' + break; + case 239: // 'text' + shift(239); // 'text' + break; + case 245: // 'try' + shift(245); // 'try' + break; + case 248: // 'typeswitch' + shift(248); // 'typeswitch' + break; + case 251: // 'unordered' + shift(251); // 'unordered' + break; + case 255: // 'validate' + shift(255); // 'validate' + break; + case 257: // 'variable' + shift(257); // 'variable' + break; + case 269: // 'xquery' + shift(269); // 'xquery' + break; + case 67: // 'allowing' + shift(67); // 'allowing' + break; + case 76: // 'at' + shift(76); // 'at' + break; + case 78: // 'base-uri' + shift(78); // 'base-uri' + break; + case 80: // 'boundary-space' + shift(80); // 'boundary-space' + break; + case 81: // 'break' + shift(81); // 'break' + break; + case 86: // 'catch' + shift(86); // 'catch' + break; + case 93: // 'construction' + shift(93); // 'construction' + break; + case 96: // 'context' + shift(96); // 'context' + break; + case 97: // 'continue' + shift(97); // 'continue' + break; + case 99: // 'copy-namespaces' + shift(99); // 'copy-namespaces' + break; + case 101: // 'decimal-format' + shift(101); // 'decimal-format' + break; + case 120: // 'encoding' + shift(120); // 'encoding' + break; + case 127: // 'exit' + shift(127); // 'exit' + break; + case 128: // 'external' + shift(128); // 'external' + break; + case 136: // 'ft-option' + shift(136); // 'ft-option' + break; + case 149: // 'in' + shift(149); // 'in' + break; + case 150: // 'index' + shift(150); // 'index' + break; + case 156: // 'integrity' + shift(156); // 'integrity' + break; + case 166: // 'lax' + shift(166); // 'lax' + break; + case 187: // 'nodes' + shift(187); // 'nodes' + break; + case 194: // 'option' + shift(194); // 'option' + break; + case 198: // 'ordering' + shift(198); // 'ordering' + break; + case 217: // 'revalidation' + shift(217); // 'revalidation' + break; + case 220: // 'schema' + shift(220); // 'schema' + break; + case 223: // 'score' + shift(223); // 'score' + break; + case 229: // 'sliding' + shift(229); // 'sliding' + break; + case 235: // 'strict' + shift(235); // 'strict' + break; + case 246: // 'tumbling' + shift(246); // 'tumbling' + break; + case 247: // 'type' + shift(247); // 'type' + break; + case 252: // 'updating' + shift(252); // 'updating' + break; + case 256: // 'value' + shift(256); // 'value' + break; + case 258: // 'version' + shift(258); // 'version' + break; + case 262: // 'while' + shift(262); // 'while' + break; + case 92: // 'constraint' + shift(92); // 'constraint' + break; + case 171: // 'loop' + shift(171); // 'loop' + break; + default: + shift(216); // 'returning' + } + eventHandler.endNonterminal("NCName", e0); + } + + function shift(t) + { + if (l1 == t) + { + whitespace(); + eventHandler.terminal(XQueryTokenizer.TOKEN[l1], b1, e1 > size ? size : e1); + b0 = b1; e0 = e1; l1 = 0; + } + else + { + error(b1, e1, 0, l1, t); + } + } + + function whitespace() + { + if (e0 != b1) + { + b0 = e0; + e0 = b1; + eventHandler.whitespace(b0, e0); + } + } + + function matchW(set) + { + var code; + for (;;) + { + code = match(set); + if (code != 28) // S^WS + { + break; + } + } + return code; + } + + function lookahead1W(set) + { + if (l1 == 0) + { + l1 = matchW(set); + b1 = begin; + e1 = end; + } + } + + function lookahead1(set) + { + if (l1 == 0) + { + l1 = match(set); + b1 = begin; + e1 = end; + } + } + + function error(b, e, s, l, t) + { + throw new self.ParseException(b, e, s, l, t); + } + + var lk, b0, e0; + var l1, b1, e1; + var eventHandler; + + var input; + var size; + var begin; + var end; + + function match(tokenSetId) + { + var nonbmp = false; + begin = end; + var current = end; + var result = XQueryTokenizer.INITIAL[tokenSetId]; + var state = 0; + + for (var code = result & 4095; code != 0; ) + { + var charclass; + var c0 = current < size ? input.charCodeAt(current) : 0; + ++current; + if (c0 < 0x80) + { + charclass = XQueryTokenizer.MAP0[c0]; + } + else if (c0 < 0xd800) + { + var c1 = c0 >> 4; + charclass = XQueryTokenizer.MAP1[(c0 & 15) + XQueryTokenizer.MAP1[(c1 & 31) + XQueryTokenizer.MAP1[c1 >> 5]]]; + } + else + { + if (c0 < 0xdc00) + { + var c1 = current < size ? input.charCodeAt(current) : 0; + if (c1 >= 0xdc00 && c1 < 0xe000) + { + ++current; + c0 = ((c0 & 0x3ff) << 10) + (c1 & 0x3ff) + 0x10000; + nonbmp = true; + } + } + var lo = 0, hi = 5; + for (var m = 3; ; m = (hi + lo) >> 1) + { + if (XQueryTokenizer.MAP2[m] > c0) hi = m - 1; + else if (XQueryTokenizer.MAP2[6 + m] < c0) lo = m + 1; + else {charclass = XQueryTokenizer.MAP2[12 + m]; break;} + if (lo > hi) {charclass = 0; break;} + } + } + + state = code; + var i0 = (charclass << 12) + code - 1; + code = XQueryTokenizer.TRANSITION[(i0 & 15) + XQueryTokenizer.TRANSITION[i0 >> 4]]; + + if (code > 4095) + { + result = code; + code &= 4095; + end = current; + } + } + + result >>= 12; + if (result == 0) + { + end = current - 1; + var c1 = end < size ? input.charCodeAt(end) : 0; + if (c1 >= 0xdc00 && c1 < 0xe000) --end; + return error(begin, end, state, -1, -1); + } + + if (nonbmp) + { + for (var i = result >> 9; i > 0; --i) + { + --end; + var c1 = end < size ? input.charCodeAt(end) : 0; + if (c1 >= 0xdc00 && c1 < 0xe000) --end; + } + } + else + { + end -= result >> 9; + } + + return (result & 511) - 1; + } +} + +XQueryTokenizer.getTokenSet = function(tokenSetId) +{ + var set = []; + var s = tokenSetId < 0 ? - tokenSetId : INITIAL[tokenSetId] & 4095; + for (var i = 0; i < 276; i += 32) + { + var j = i; + var i0 = (i >> 5) * 2062 + s - 1; + var i1 = i0 >> 2; + var i2 = i1 >> 2; + var f = XQueryTokenizer.EXPECTED[(i0 & 3) + XQueryTokenizer.EXPECTED[(i1 & 3) + XQueryTokenizer.EXPECTED[(i2 & 3) + XQueryTokenizer.EXPECTED[i2 >> 2]]]]; + for ( ; f != 0; f >>>= 1, ++j) + { + if ((f & 1) != 0) + { + set.push(XQueryTokenizer.TOKEN[j]); + } + } + } + return set; +}; + +XQueryTokenizer.MAP0 = +[ 66, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 27, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 31, 31, 33, 31, 31, 31, 31, 31, 31, 34, 35, 36, 35, 31, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 31, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 31, 61, 62, 63, 64, 35 +]; + +XQueryTokenizer.MAP1 = +[ 108, 124, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 156, 181, 181, 181, 181, 181, 214, 215, 213, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 214, 247, 261, 277, 293, 309, 347, 363, 379, 416, 416, 416, 408, 331, 323, 331, 323, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 433, 433, 433, 433, 433, 433, 433, 316, 331, 331, 331, 331, 331, 331, 331, 331, 394, 416, 416, 417, 415, 416, 416, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 416, 330, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 331, 416, 66, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 27, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 35, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 32, 31, 31, 33, 31, 31, 31, 31, 31, 31, 34, 35, 36, 35, 31, 35, 37, 38, 39, 40, 41, 42, 43, 44, 45, 31, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 31, 61, 62, 63, 64, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 31, 31, 35, 35, 35, 35, 35, 35, 35, 65, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 35, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65, 65 +]; + +XQueryTokenizer.MAP2 = +[ 57344, 63744, 64976, 65008, 65536, 983040, 63743, 64975, 65007, 65533, 983039, 1114111, 35, 31, 35, 31, 31, 35 +]; + +XQueryTokenizer.INITIAL = +[ 1, 2, 36867, 45060, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 +]; + +XQueryTokenizer.TRANSITION = +[ 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22908, 18836, 17152, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 17365, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 17470, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 18157, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 17848, 17880, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18023, 36545, 18621, 18039, 18056, 18072, 18117, 18143, 18173, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17687, 18805, 18421, 18437, 18101, 17393, 18489, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 18579, 21711, 17152, 19008, 19233, 20367, 19008, 28684, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 17365, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 17470, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 18157, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 17848, 17880, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18023, 36545, 18621, 18039, 18056, 18072, 18117, 18143, 18173, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17687, 18805, 18421, 18437, 18101, 17393, 18489, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 20116, 18836, 18637, 19008, 19233, 21267, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 18763, 18778, 18794, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 18821, 22923, 18906, 19008, 19233, 17431, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18937, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 19054, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 18953, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21843, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21696, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22429, 20131, 18720, 19008, 19233, 20367, 19008, 17173, 23559, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 18087, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 21242, 19111, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 19024, 18836, 18609, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 19081, 22444, 18987, 19008, 19233, 20367, 19008, 19065, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21992, 22007, 18987, 19008, 19233, 20367, 19008, 18690, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22414, 18836, 18987, 19008, 19233, 30651, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 19138, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 19280, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 19172, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21783, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 19218, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21651, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 19249, 19265, 19307, 18888, 27857, 30536, 24401, 31444, 23357, 18888, 19351, 18888, 18890, 27211, 19370, 27211, 27211, 19392, 24401, 31911, 24401, 24401, 25467, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 28537, 19440, 24401, 24401, 24401, 24401, 24036, 17994, 24060, 18888, 18888, 18888, 18890, 19468, 27211, 27211, 27211, 27211, 19484, 35367, 19520, 24401, 24401, 24401, 19628, 18888, 29855, 18888, 18888, 23086, 27211, 19538, 27211, 27211, 30756, 24012, 24401, 19560, 24401, 24401, 26750, 18888, 18888, 19327, 27855, 27211, 27211, 19580, 17590, 24017, 24401, 24401, 19600, 25665, 18888, 18888, 28518, 27211, 27212, 24016, 19620, 19868, 28435, 25722, 18889, 19644, 27211, 32888, 35852, 19868, 31018, 19694, 19376, 19717, 22215, 19735, 22098, 19751, 35203, 19776, 19797, 19817, 19840, 25783, 31738, 24135, 19701, 19856, 31015, 23516, 31008, 28311, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21768, 18836, 19307, 18888, 27857, 27904, 24401, 29183, 28015, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 19888, 24401, 24401, 24401, 24401, 22953, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 28537, 19440, 24401, 24401, 24401, 24401, 24036, 18881, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22399, 18836, 19918, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21666, 18836, 19307, 18888, 27857, 27525, 24401, 29183, 21467, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 19946, 24401, 24401, 24401, 24401, 32382, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 28537, 19998, 24401, 24401, 24401, 24401, 31500, 18467, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 20021, 24401, 24401, 24401, 24401, 24401, 34271, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 32926, 29908, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 20050, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 20101, 19039, 20191, 20412, 20903, 17569, 20309, 20872, 25633, 20623, 20505, 20218, 20242, 17189, 17208, 17281, 20355, 20265, 20306, 20328, 20383, 22490, 20796, 20619, 21354, 20654, 20410, 20956, 21232, 20765, 17421, 20535, 17192, 18127, 22459, 20312, 25531, 22470, 20309, 20428, 18964, 20466, 20491, 21342, 21070, 20521, 20682, 17714, 18326, 17543, 17559, 17585, 22497, 20559, 19504, 20279, 20575, 20290, 20475, 20604, 20639, 20226, 20670, 17661, 21190, 17703, 21176, 17730, 19494, 20698, 20711, 22480, 21046, 21116, 18971, 21130, 20727, 20755, 17675, 17753, 17832, 17590, 25518, 20394, 20781, 20831, 20202, 20847, 21401, 17292, 17934, 17979, 18549, 20863, 20588, 25542, 20888, 20919, 18072, 18117, 20935, 20972, 21032, 21062, 21086, 18239, 21102, 18563, 21146, 21162, 21206, 18351, 20949, 20902, 18340, 21222, 21258, 21283, 18360, 20249, 17405, 21295, 21311, 21327, 20739, 20343, 21370, 21386, 21417, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21977, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 21452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 21504, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 36501, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 28674, 21946, 17617, 36473, 18223, 17237, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 21575, 21534, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 21560, 30628, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21798, 18836, 21612, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21636, 18836, 18987, 19008, 19233, 17902, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21753, 19096, 21903, 19008, 19233, 20367, 19008, 19291, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 17379, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 21931, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 18280, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21962, 18594, 18987, 19008, 19233, 22043, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21681, 21858, 18987, 19008, 19233, 20367, 19008, 21544, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 31500, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 32319, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 21431, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 22231, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 31500, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 31181, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 21431, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 31678, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 31500, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 31181, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 21431, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 33588, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 31181, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 21431, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 35019, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22248, 24401, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 31500, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 31181, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 21431, 24401, 24401, 24401, 24401, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22324, 18836, 22059, 18888, 27857, 30501, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 34365, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22354, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 27086, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 19930, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21828, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22309, 22513, 18987, 19008, 19233, 20367, 19008, 19122, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 22544, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22608, 18836, 22988, 23004, 27585, 23020, 23036, 23067, 22087, 18888, 18888, 18888, 23083, 27211, 27211, 27211, 23102, 22121, 24401, 24401, 24401, 23122, 31386, 26154, 19674, 18888, 28119, 28232, 19424, 23705, 27211, 27211, 23142, 23173, 23189, 23212, 24401, 24401, 23246, 34427, 31693, 23262, 18888, 23290, 23308, 27783, 27620, 23327, 35263, 35107, 33383, 23346, 18193, 23393, 32748, 23968, 24401, 23414, 35153, 23463, 18888, 33913, 23442, 23482, 27211, 27211, 23532, 23552, 21431, 23575, 24401, 24401, 23604, 26095, 23635, 23657, 18888, 33482, 23685, 33251, 27211, 22187, 18851, 23721, 35536, 24401, 18887, 23750, 32641, 27211, 23769, 23787, 20080, 33012, 24384, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 23803, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 28224, 31826, 23823, 26917, 34978, 23850, 26493, 25782, 23878, 23914, 23516, 31008, 22105, 19419, 27963, 19659, 29781, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22623, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 28909, 25783, 27211, 27211, 27211, 34048, 23933, 22164, 24401, 24401, 24401, 28409, 23949, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 31181, 26583, 18888, 18888, 18888, 35585, 23984, 27211, 27211, 27211, 24005, 22201, 24033, 24401, 24401, 24401, 24052, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 26496, 24076, 24126, 24151, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22638, 18836, 22059, 19678, 27857, 24185, 24401, 24201, 24217, 26592, 18888, 18888, 18890, 24252, 24268, 27211, 27211, 22121, 24287, 24303, 24401, 24401, 30613, 19781, 35432, 36007, 32649, 18888, 25783, 24322, 28966, 23771, 27211, 35072, 22164, 24358, 32106, 26829, 24400, 31500, 31693, 18888, 18888, 18888, 24801, 18890, 27211, 27211, 27211, 27211, 24418, 19484, 24401, 24401, 24401, 24401, 20167, 31181, 18888, 18888, 18888, 27833, 23086, 27211, 27211, 33540, 27211, 30756, 21431, 24401, 24401, 22972, 24401, 26095, 18888, 36131, 18888, 27855, 27211, 24440, 27211, 22187, 22968, 24401, 24459, 24401, 31699, 28454, 18888, 34528, 34570, 35779, 24478, 24402, 24494, 25659, 18888, 36228, 27211, 27211, 24515, 30981, 23734, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 24538, 31017, 27856, 31741, 30059, 23377, 24563, 19837, 25782, 19760, 31015, 23516, 25374, 22105, 19419, 29793, 24579, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22653, 18836, 22059, 25756, 19982, 34097, 23196, 29183, 24614, 24110, 23641, 24673, 26103, 24697, 24443, 24713, 28558, 22121, 24748, 24462, 24764, 23398, 30613, 18888, 18888, 18888, 18888, 24798, 25783, 27211, 27211, 27211, 34232, 35072, 22164, 24401, 24401, 24401, 33302, 31500, 22559, 24106, 24232, 18888, 18888, 34970, 24817, 30411, 27211, 27211, 32484, 19484, 29750, 35127, 24401, 24401, 19872, 31181, 24852, 18888, 18888, 24871, 29221, 27211, 27211, 32072, 27211, 30756, 34441, 24401, 24401, 31571, 24401, 26095, 33141, 27802, 27011, 27855, 25295, 25607, 24888, 22187, 22968, 19195, 34593, 24906, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 18888, 33663, 27211, 27211, 24924, 24947, 23588, 31018, 18890, 27211, 31833, 22135, 19447, 23086, 23330, 19828, 30904, 31042, 24972, 19840, 25000, 31738, 30898, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 25016, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22668, 18836, 25041, 25057, 31320, 25073, 25089, 25105, 22087, 34796, 24236, 36138, 34870, 34125, 25121, 23106, 35497, 22248, 36613, 25137, 30671, 27365, 30613, 25153, 26447, 25199, 25233, 22574, 23274, 25249, 25265, 25281, 25318, 25344, 25360, 25400, 25428, 25452, 26731, 25504, 31693, 23669, 25558, 27407, 25575, 28599, 25934, 25599, 27211, 28180, 27304, 25623, 25839, 25649, 24401, 34820, 25681, 25698, 22586, 27775, 30190, 25745, 25778, 25799, 25817, 28995, 33569, 30756, 21518, 33443, 25837, 25855, 25893, 26095, 31254, 26677, 30136, 27855, 25930, 25950, 27211, 22187, 22968, 25966, 25986, 24401, 23428, 27763, 36330, 26959, 26002, 26029, 26045, 26085, 26119, 26170, 26203, 26222, 26239, 30527, 26372, 26274, 28404, 31018, 33757, 27211, 34262, 26316, 36729, 26345, 26366, 35337, 31017, 26388, 26407, 30954, 26350, 33861, 26434, 26463, 26479, 26512, 23516, 33189, 26531, 26547, 27963, 31293, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22683, 18836, 26568, 26181, 26608, 34097, 26643, 29183, 22087, 26669, 18888, 18888, 18890, 26693, 27211, 27211, 27211, 22121, 26720, 24401, 24401, 24401, 30613, 18888, 18888, 18888, 18888, 26774, 25783, 27211, 27211, 27211, 26619, 35072, 22164, 24401, 24401, 24401, 21596, 31500, 31693, 18888, 18888, 33978, 18888, 18890, 27211, 27211, 25801, 27211, 27211, 19484, 24401, 24401, 24401, 26792, 24401, 31181, 18888, 18888, 18888, 35464, 23086, 27211, 27211, 27211, 26809, 30756, 21431, 24401, 24401, 24401, 26828, 26095, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 22187, 22968, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 35779, 20080, 24402, 19868, 25659, 31948, 18889, 35707, 27211, 19719, 26845, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 26905, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 24984, 31088, 19419, 26945, 27651, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22698, 18836, 26999, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 23051, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 27033, 24401, 24401, 24401, 24401, 24036, 31693, 18888, 18888, 27056, 18888, 18890, 27211, 27211, 30320, 27211, 27211, 27075, 24401, 24401, 29032, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 33986, 27855, 27211, 27211, 27102, 17590, 24017, 24401, 24401, 27123, 27144, 36254, 27162, 27210, 27228, 28500, 18187, 34842, 33426, 27244, 35980, 27277, 27302, 27320, 36048, 34013, 20999, 31882, 21478, 27895, 27356, 30287, 27381, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 26329, 30087, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 27406, 27423, 27445, 35294, 27461, 22087, 18888, 18888, 30140, 18890, 27211, 27211, 27989, 27211, 22121, 24401, 24401, 25682, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 34042, 27211, 27211, 27211, 27211, 29700, 22164, 24401, 24401, 24401, 24401, 27128, 31693, 27477, 18888, 18888, 18888, 18890, 27194, 27211, 27211, 27211, 27211, 19484, 35299, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 27059, 23086, 27211, 27211, 27211, 33366, 30756, 24012, 24401, 24401, 24401, 35044, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 20815, 27211, 30818, 19960, 33969, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22713, 18836, 22059, 27496, 27516, 27541, 35231, 27557, 22087, 29662, 26292, 23292, 27573, 24836, 27601, 27211, 27636, 22121, 35544, 27686, 24401, 27721, 18866, 18888, 27799, 18888, 27818, 22071, 27853, 32260, 27211, 26013, 27873, 27920, 22164, 29419, 24401, 29946, 33413, 26742, 27751, 26881, 18888, 18888, 27261, 36776, 27936, 27211, 27211, 27211, 27988, 28005, 28031, 28052, 24401, 24401, 28069, 28088, 28135, 25488, 28152, 26069, 28167, 27211, 28340, 24657, 28196, 30756, 31523, 24401, 28212, 34176, 36174, 24956, 28248, 28266, 28290, 21488, 33077, 28327, 28356, 17590, 20986, 23126, 28391, 28425, 28102, 28451, 28470, 28490, 28516, 28534, 20034, 33728, 25868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 30241, 28274, 28553, 28574, 19406, 28590, 23086, 23330, 19828, 19452, 28615, 28660, 26147, 25783, 31738, 19837, 25782, 19760, 29613, 35958, 29276, 22105, 19419, 27963, 23157, 28700, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 18888, 27857, 34097, 24401, 29183, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 22528, 18888, 18888, 18888, 18888, 18890, 27333, 27211, 27211, 27211, 27211, 19484, 30853, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22728, 18836, 28747, 28782, 28817, 28841, 28857, 28880, 28896, 24161, 28943, 32011, 36261, 27340, 28961, 29492, 28982, 29011, 24522, 29027, 25436, 29048, 23051, 27500, 29090, 29110, 30713, 18888, 23512, 29130, 25183, 27211, 29155, 28927, 27033, 29173, 23230, 24401, 29199, 35373, 31693, 18888, 18888, 25583, 32629, 29218, 27211, 27211, 31461, 30692, 29237, 27075, 24401, 24401, 24401, 29262, 29302, 19628, 18888, 34329, 18888, 18888, 23086, 27211, 29329, 27211, 27211, 30756, 24012, 35933, 24401, 24401, 24401, 27705, 31612, 18888, 18888, 29346, 29374, 27211, 35650, 17590, 21436, 29393, 24401, 25970, 18887, 33895, 18888, 27211, 32528, 27212, 24016, 32769, 19868, 25659, 18888, 26889, 27211, 27211, 29412, 23889, 24371, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31768, 19840, 25783, 31738, 19837, 29435, 29508, 31102, 29550, 29606, 22105, 30300, 29462, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22743, 18836, 22059, 29629, 29473, 34097, 33285, 29183, 29651, 27254, 18888, 29678, 33329, 32535, 27211, 29694, 29716, 22121, 19202, 24401, 32742, 29741, 18866, 26776, 33921, 28474, 18888, 18888, 25783, 29766, 27211, 29809, 27211, 35072, 22164, 35825, 24401, 29828, 24401, 24036, 36769, 25217, 18888, 18888, 29848, 18890, 27211, 29871, 27211, 26258, 27211, 29894, 24401, 29929, 24401, 36587, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 29725, 29962, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18473, 18888, 18888, 19584, 27211, 27212, 24016, 29982, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19902, 19447, 32052, 19544, 19828, 29998, 30097, 30031, 19840, 25783, 30047, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 30075, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22758, 18836, 30121, 30156, 30206, 30257, 30273, 30336, 22087, 35624, 32837, 25762, 18890, 29878, 34934, 26812, 27211, 22121, 24931, 23223, 29202, 24401, 18866, 34373, 30352, 18888, 18888, 18888, 23447, 24828, 27211, 27211, 27211, 35072, 30370, 35052, 24401, 24401, 24401, 24036, 29523, 18888, 18888, 27146, 18888, 31308, 30386, 27211, 27211, 30405, 30558, 19484, 30427, 24401, 24401, 29938, 35686, 19628, 28766, 30447, 34506, 35614, 23086, 28731, 30482, 30517, 30552, 30756, 24012, 20156, 30574, 30598, 30667, 26283, 33464, 28945, 27670, 30687, 32915, 33504, 25328, 17590, 23963, 20450, 33837, 21016, 32397, 26300, 30708, 30729, 27885, 30748, 21588, 36373, 30779, 26653, 24628, 33220, 32514, 30806, 31835, 25412, 25906, 26515, 18890, 28825, 31833, 26133, 19447, 28304, 31730, 23834, 26057, 30869, 30885, 32181, 30920, 30942, 32797, 25782, 30970, 31015, 23516, 31008, 30997, 31034, 27963, 19659, 29450, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22773, 18836, 31058, 31074, 32463, 31125, 31141, 31197, 22087, 18888, 29534, 35471, 36738, 27211, 24342, 31213, 24424, 22121, 24401, 20175, 31229, 31917, 27736, 31245, 34334, 27175, 18888, 29094, 27286, 27211, 31278, 31336, 27211, 31355, 31371, 24401, 31402, 31418, 24401, 31437, 31693, 18888, 31619, 32841, 18888, 18890, 27211, 27211, 31460, 31477, 27211, 19484, 24401, 24401, 31497, 36581, 24401, 33020, 18888, 18888, 18888, 18888, 30007, 27211, 27211, 27211, 27211, 31516, 32310, 24401, 24401, 24401, 24401, 31539, 18888, 28762, 18888, 24651, 35740, 27211, 27211, 28644, 31565, 35796, 24401, 24401, 19318, 32188, 18888, 24334, 28366, 27212, 29966, 29832, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 31587, 19868, 31635, 32435, 33693, 30105, 31663, 20005, 31715, 31757, 31784, 31812, 30015, 31851, 31878, 25783, 31898, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 31933, 30221, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22788, 18836, 22059, 25729, 30466, 31968, 24306, 31984, 32000, 32807, 35160, 27017, 29590, 34941, 19801, 29377, 33700, 22121, 27040, 30431, 29396, 28864, 29565, 18888, 18888, 18888, 32027, 18888, 25783, 27211, 27211, 23698, 27211, 35072, 22164, 24401, 24401, 30845, 24401, 24036, 32045, 18888, 26929, 18888, 18888, 18890, 27211, 31481, 32068, 27211, 27211, 32088, 24401, 33058, 32122, 24401, 24401, 33736, 18888, 18888, 33162, 18888, 23086, 27211, 27211, 29484, 27211, 28375, 32144, 24401, 24401, 33831, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 36704, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 33107, 22171, 33224, 24271, 32169, 31017, 27856, 31741, 19840, 25783, 31738, 30234, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 32204, 32232, 32252, 32677, 33295, 29074, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 23619, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 32276, 24401, 24401, 24401, 24401, 24036, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 32299, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 33886, 18889, 36065, 27211, 19719, 35326, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22803, 18836, 32335, 31647, 34666, 32351, 32367, 32417, 22087, 18888, 32433, 19335, 32451, 27211, 32479, 27107, 32500, 22121, 24401, 32551, 20085, 32572, 18866, 22287, 23753, 18888, 18888, 32602, 32665, 27211, 32693, 27211, 26972, 32713, 32729, 24401, 32764, 24401, 25877, 32785, 34768, 18888, 27390, 32823, 24594, 24855, 32857, 24890, 32878, 32904, 27211, 32942, 32977, 24401, 33000, 29313, 24401, 30790, 26206, 27666, 33904, 18888, 23086, 36353, 27211, 33036, 27211, 30756, 24012, 32153, 24401, 33056, 24401, 35861, 18888, 18888, 30354, 27972, 27211, 27211, 33800, 17590, 20145, 24401, 24401, 34638, 20811, 18888, 18888, 33074, 27211, 27212, 36167, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 34616, 24169, 33093, 33123, 33157, 27856, 31741, 23862, 26552, 34302, 19837, 25782, 19760, 31015, 23516, 31008, 33178, 19973, 27963, 23497, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22818, 18836, 33205, 28113, 33240, 34097, 33275, 29183, 22087, 33318, 35438, 18888, 18890, 33345, 26391, 33382, 27211, 22121, 33399, 28072, 33442, 24401, 18866, 22232, 18888, 33459, 18888, 18888, 33480, 33498, 25175, 27211, 27211, 26704, 22164, 24775, 35239, 24401, 24401, 25914, 29580, 18888, 18888, 31109, 25211, 33520, 33539, 27211, 27211, 33556, 36284, 19484, 33585, 24401, 24401, 33604, 32556, 19628, 18888, 18888, 31262, 33658, 23086, 27211, 27211, 33679, 27211, 30756, 24012, 24401, 24401, 33716, 24401, 26854, 27480, 18888, 33752, 27855, 33259, 34701, 27211, 17590, 32102, 24782, 23807, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 33773, 36105, 19868, 25659, 18888, 23368, 27211, 29157, 19719, 23889, 34454, 29286, 18890, 33794, 25302, 33816, 19447, 34079, 33853, 31862, 31017, 27856, 31741, 33877, 28920, 33937, 19837, 30461, 34002, 22276, 36041, 34029, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22833, 18836, 34064, 32616, 34113, 34141, 34157, 34192, 34208, 32216, 36013, 31549, 31952, 34224, 34248, 34287, 29330, 34350, 34389, 34413, 34481, 26793, 18866, 26187, 29635, 22293, 18888, 36654, 25783, 34522, 34544, 34566, 25821, 35072, 22164, 34586, 34609, 34632, 19604, 24036, 36644, 36674, 24681, 18888, 32401, 34654, 31339, 34682, 34698, 27211, 34717, 34753, 28053, 34812, 34836, 24401, 33619, 19628, 34858, 32236, 34906, 24598, 33523, 27612, 34890, 34922, 24732, 29246, 36717, 33634, 34465, 32984, 34168, 26750, 34957, 18888, 18888, 34994, 35010, 27211, 33040, 17590, 29913, 35035, 24401, 36304, 25482, 30171, 35883, 35068, 35088, 26627, 20441, 31173, 35123, 35143, 35176, 24640, 30492, 29358, 19719, 35192, 35219, 25384, 28801, 35255, 35279, 32586, 34496, 23086, 23330, 29061, 31017, 27856, 31741, 19840, 25783, 31738, 24547, 25164, 35315, 31796, 35353, 34316, 22105, 19419, 27963, 24091, 28630, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22848, 18836, 22059, 34782, 34088, 35389, 21008, 35405, 35421, 35454, 18888, 18888, 23466, 35487, 27211, 27211, 27211, 35513, 31154, 24401, 24401, 24401, 35560, 18888, 26863, 36664, 35601, 24872, 25783, 30389, 23536, 26250, 35647, 35666, 22164, 19522, 19564, 30582, 35682, 27697, 35575, 29114, 18888, 18888, 18888, 18890, 27211, 35702, 27211, 27211, 27211, 35723, 24401, 35527, 24401, 24401, 24401, 19628, 30184, 18888, 18888, 18888, 23086, 35739, 27211, 27211, 27211, 29139, 22938, 24401, 24401, 24401, 24401, 23898, 35756, 18888, 18888, 25025, 35778, 27211, 27211, 17590, 20064, 35795, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 23917, 18890, 34550, 31833, 22262, 19447, 23086, 23330, 26418, 31017, 27856, 31741, 19840, 25783, 35812, 19837, 27187, 35841, 33135, 23516, 31008, 22105, 22148, 28712, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22863, 18836, 22059, 35877, 28723, 34097, 31164, 29183, 22087, 26758, 18888, 22592, 18890, 23989, 27211, 29812, 27211, 22121, 33778, 24401, 31421, 24401, 18866, 18888, 18888, 26872, 18888, 18888, 25783, 27211, 30732, 27211, 27211, 35072, 22164, 24401, 24908, 24401, 24401, 24036, 31693, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22878, 18836, 22059, 27837, 27857, 35899, 24401, 35915, 22087, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 22121, 24401, 24401, 24401, 24401, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 31602, 18888, 18888, 18888, 18888, 26223, 27211, 27211, 27211, 27211, 27211, 19484, 35931, 24401, 24401, 24401, 24401, 19628, 18888, 28136, 18888, 18888, 35949, 27211, 32862, 27211, 32697, 30756, 24012, 24401, 32283, 24401, 32128, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22893, 18836, 22059, 35974, 34882, 34097, 33960, 29183, 35996, 18888, 23311, 18888, 36029, 27211, 27211, 36064, 36081, 22121, 24401, 24401, 36104, 33950, 18866, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 35072, 22164, 24401, 24401, 24401, 24401, 24036, 36121, 18888, 25559, 18888, 18888, 18890, 27211, 27211, 30313, 27211, 27211, 36154, 24401, 24401, 34397, 24401, 24401, 19628, 28250, 18888, 18888, 18888, 23086, 30926, 27211, 27211, 27211, 26983, 24012, 33642, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22339, 18836, 22059, 19354, 27857, 36190, 24401, 36206, 22087, 18888, 18888, 18888, 18007, 27211, 27211, 27211, 24724, 22121, 24401, 24401, 24401, 30827, 18866, 18888, 36222, 18888, 28795, 18888, 25783, 35100, 27211, 27429, 27211, 35072, 22164, 30836, 24401, 24499, 24401, 24036, 31693, 18888, 36244, 18888, 18888, 18890, 27211, 36088, 27211, 27211, 27211, 19484, 24401, 28036, 24401, 24401, 24401, 19628, 18888, 18888, 35631, 18888, 35762, 27211, 27211, 36277, 27211, 34730, 24012, 24401, 24401, 36300, 24401, 36320, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 25712, 18888, 18888, 36346, 27211, 27212, 19184, 24402, 19868, 25659, 32029, 18889, 27211, 33359, 19719, 23889, 36369, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22384, 18836, 36389, 19008, 19233, 20367, 36434, 17173, 17595, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 36453, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 20362, 21726, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 22369, 18836, 18987, 19008, 19233, 20367, 19008, 21737, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17949, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21813, 18836, 36489, 19008, 19233, 20367, 19008, 17173, 17737, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17768, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 20543, 22022, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21828, 18836, 18987, 19008, 19233, 20367, 19008, 17173, 30763, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 36517, 17308, 17327, 17346, 18918, 18452, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 18127, 21873, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 21828, 18836, 19307, 18888, 27857, 30756, 24401, 29183, 28015, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 36567, 24401, 24401, 24401, 24401, 22953, 18888, 18888, 18888, 18888, 18888, 25783, 27211, 27211, 27211, 27211, 28537, 36603, 24401, 24401, 24401, 24401, 24036, 18881, 18888, 18888, 18888, 18888, 18890, 27211, 27211, 27211, 27211, 27211, 19484, 24401, 24401, 24401, 24401, 24401, 19628, 18888, 18888, 18888, 18888, 23086, 27211, 27211, 27211, 27211, 30756, 24012, 24401, 24401, 24401, 24401, 26750, 18888, 18888, 18888, 27855, 27211, 27211, 27211, 17590, 24017, 24401, 24401, 24401, 18887, 18888, 18888, 27211, 27211, 27212, 24016, 24402, 19868, 25659, 18888, 18889, 27211, 27211, 19719, 23889, 19868, 31018, 18890, 27211, 31833, 19406, 19447, 23086, 23330, 19828, 31017, 27856, 31741, 19840, 25783, 31738, 19837, 25782, 19760, 31015, 23516, 31008, 22105, 19419, 27963, 19659, 27951, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 36629, 36690, 18720, 19008, 19233, 20367, 19008, 17454, 17595, 36437, 17330, 17349, 18921, 17189, 17208, 17281, 20355, 17223, 17308, 17327, 17346, 18918, 36754, 21880, 18649, 18665, 19006, 17265, 22033, 20765, 17421, 20535, 17192, 20362, 21726, 17311, 18658, 18999, 19008, 17447, 32952, 17497, 17520, 17251, 36411, 17782, 20682, 17714, 18326, 17543, 17559, 17585, 21887, 17504, 17527, 17258, 36418, 21915, 21940, 17611, 36467, 18217, 17633, 17661, 21190, 17703, 21176, 17730, 34737, 21946, 17617, 36473, 18223, 36531, 17477, 19152, 17860, 17892, 17675, 17753, 17832, 17590, 21620, 17481, 19156, 17864, 18731, 17918, 36551, 17292, 17934, 17979, 18727, 18681, 18405, 18621, 18039, 18056, 18072, 18117, 18143, 18706, 18052, 18209, 18250, 18239, 18266, 17963, 18296, 18312, 18376, 17807, 36403, 19232, 17796, 17163, 30642, 18392, 17816, 32961, 17645, 18805, 18421, 18437, 18519, 17393, 18747, 18505, 18535, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 17590, 0, 94242, 0, 118820, 0, 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2482176, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 2207744, 2404352, 2412544, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3104768, 2605056, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2678784, 2207744, 2695168, 2207744, 2703360, 2207744, 2711552, 2752512, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 3170304, 3174400, 2158592, 0, 139, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 2748416, 2756608, 2777088, 2801664, 2158592, 2158592, 2158592, 2863104, 2891776, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3104768, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744, 2785280, 2207744, 2809856, 2207744, 2207744, 2842624, 2207744, 2207744, 2207744, 2899968, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2473984, 2207744, 2207744, 2494464, 2207744, 2207744, 2207744, 2523136, 2158592, 2404352, 2412544, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2564096, 2158592, 2158592, 2605056, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2678784, 2158592, 2695168, 2158592, 2703360, 2158592, 2711552, 2752512, 2158592, 2158592, 2785280, 2158592, 2158592, 2785280, 2158592, 2809856, 2158592, 2158592, 2842624, 2158592, 2158592, 2158592, 2899968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 641, 0, 2158592, 0, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 32768, 0, 2158592, 0, 2158592, 2158592, 2158592, 2383872, 2158592, 2158592, 2158592, 2158592, 3006464, 2383872, 2207744, 2207744, 2207744, 2207744, 2158877, 2158877, 2158877, 2158877, 0, 0, 0, 2158877, 2572573, 2158877, 2158877, 0, 2207744, 2207744, 2596864, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2641920, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 167936, 0, 0, 2162688, 0, 0, 3104768, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 0, 0, 2146304, 2146304, 2224128, 2224128, 2232320, 2232320, 2232320, 641, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2531328, 2158592, 2158592, 2158592, 2158592, 2158592, 2617344, 2158592, 2158592, 2158592, 2158592, 2441216, 2445312, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2502656, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2580480, 2158592, 2158592, 2158592, 2158592, 2621440, 2158592, 2580480, 2158592, 2158592, 2158592, 2158592, 2621440, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2699264, 2158592, 2158592, 2158592, 2158592, 2158592, 2748416, 2756608, 2777088, 2801664, 2207744, 2863104, 2891776, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3018752, 2207744, 3043328, 2207744, 2207744, 2207744, 2207744, 3080192, 2207744, 2207744, 3112960, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 172310, 279, 0, 2162688, 0, 0, 2207744, 2207744, 2207744, 3186688, 2207744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2404352, 2412544, 2158592, 2510848, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2584576, 2158592, 2609152, 2158592, 2158592, 2629632, 2158592, 2158592, 2158592, 2686976, 2158592, 2715648, 2158592, 2158592, 3121152, 2158592, 2158592, 2158592, 3149824, 2158592, 2158592, 3170304, 3174400, 2158592, 2367488, 2207744, 2207744, 2207744, 2207744, 2158592, 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2572288, 2158592, 2158592, 0, 2207744, 2207744, 2207744, 2433024, 2207744, 2453504, 2461696, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2510848, 2207744, 2207744, 2207744, 2207744, 2207744, 2531328, 2207744, 2207744, 2207744, 2207744, 2207744, 2617344, 2207744, 2207744, 2207744, 2207744, 2158592, 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2572288, 2158592, 2158592, 1508, 2715648, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2867200, 2207744, 2904064, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2580480, 2207744, 2207744, 2207744, 2207744, 2621440, 2207744, 2207744, 2207744, 3149824, 2207744, 2207744, 3170304, 3174400, 2207744, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 138, 2158592, 2158592, 2158592, 2404352, 2412544, 2707456, 2732032, 2207744, 2207744, 2207744, 2822144, 2826240, 2207744, 2895872, 2207744, 2207744, 2924544, 2207744, 2207744, 2973696, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 285, 2158592, 2158592, 3112960, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 2207744, 2207744, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 0, 0, 2535424, 2543616, 2158592, 2158592, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 2990080, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2572288, 2981888, 2207744, 2207744, 3002368, 2207744, 3047424, 3063808, 3076096, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3203072, 2708960, 2732032, 2158592, 2158592, 2158592, 2822144, 2827748, 2158592, 2895872, 2158592, 2158592, 2924544, 2158592, 2158592, 2973696, 2158592, 2981888, 2158592, 2158592, 3002368, 2158592, 3047424, 3063808, 3076096, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3203072, 2981888, 2158592, 2158592, 3003876, 2158592, 3047424, 3063808, 3076096, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3203072, 2207744, 2207744, 2207744, 2207744, 2207744, 2424832, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 20480, 0, 0, 0, 0, 0, 2162688, 20480, 0, 2523136, 2527232, 2158592, 2158592, 2576384, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2908160, 2527232, 2207744, 2207744, 2576384, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2908160, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 286, 2158592, 2158592, 0, 0, 2158592, 2158592, 2158592, 2158592, 2633728, 2658304, 0, 0, 2740224, 2744320, 0, 2834432, 2207744, 2207744, 2977792, 2207744, 2207744, 2207744, 2207744, 3039232, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3158016, 0, 0, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 933, 45, 45, 45, 45, 442, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 2494464, 2158592, 2158592, 2158592, 2524757, 2527232, 2158592, 2158592, 2576384, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 1504, 2158592, 2498560, 2158592, 2158592, 2158592, 2158592, 2568192, 2158592, 2592768, 2625536, 2158592, 2158592, 2674688, 2736128, 2158592, 2158592, 0, 2158592, 2912256, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3108864, 2158592, 2158592, 3133440, 3145728, 3153920, 2375680, 2379776, 2207744, 2207744, 2420736, 2207744, 2449408, 2207744, 2207744, 2207744, 2498560, 2207744, 2207744, 2207744, 2207744, 2568192, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 0, 551, 2158592, 2158592, 2158592, 2158592, 2207744, 2506752, 2207744, 2207744, 2207744, 2207744, 2207744, 2158592, 2506752, 0, 2020, 2158592, 2592768, 2625536, 2207744, 2207744, 2674688, 2736128, 2207744, 2207744, 2207744, 2912256, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 542, 0, 544, 2207744, 3108864, 2207744, 2207744, 3133440, 3145728, 3153920, 2375680, 2379776, 2158592, 2158592, 2420736, 2158592, 2449408, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 641, 0, 0, 0, 0, 0, 0, 2367488, 2158592, 2498560, 2158592, 2158592, 1621, 2158592, 2158592, 2568192, 2158592, 2592768, 2625536, 2158592, 2158592, 2674688, 0, 0, 0, 0, 0, 1608, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1107, 97, 97, 1110, 97, 97, 3133440, 3145728, 3153920, 2158592, 2408448, 2416640, 2158592, 2465792, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3014656, 2158592, 2158592, 3051520, 2158592, 2158592, 3100672, 2158592, 2158592, 3121152, 2158592, 2158592, 2158592, 3149824, 2416640, 2207744, 2465792, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2633728, 2658304, 2740224, 2744320, 2834432, 2949120, 2158592, 2985984, 2158592, 2998272, 2158592, 2158592, 2158592, 3129344, 2207744, 2408448, 2949120, 2207744, 2985984, 2207744, 2998272, 2207744, 2207744, 2207744, 3129344, 2158592, 2408448, 2416640, 2158592, 2465792, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 32768, 0, 0, 0, 0, 0, 0, 2367488, 2949120, 2158592, 2985984, 2158592, 2998272, 2158592, 2158592, 2158592, 3129344, 2158592, 2158592, 2478080, 2158592, 2158592, 2158592, 2535424, 2543616, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3117056, 2207744, 2207744, 2478080, 2207744, 2207744, 2207744, 2207744, 2699264, 2207744, 2207744, 2207744, 2207744, 2207744, 2748416, 2756608, 2777088, 2801664, 2207744, 2207744, 2158877, 2158877, 2158877, 2158877, 2158877, 0, 0, 0, 2158877, 2158877, 2158877, 2158877, 0, 0, 2535709, 2543901, 2158877, 2158877, 2158877, 0, 0, 0, 2158877, 2158877, 2158877, 2990365, 2158877, 2158877, 2158730, 2158730, 2158730, 2158730, 2158730, 2572426, 2207744, 2535424, 2543616, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3117056, 2158592, 2158592, 2478080, 2207744, 2207744, 2990080, 2207744, 2207744, 2158592, 2158592, 2482176, 2158592, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 0, 2158592, 2908160, 2158592, 2158592, 2158592, 2977792, 2158592, 2158592, 2158592, 2158592, 3039232, 2158592, 2158592, 3010560, 2207744, 2428928, 2207744, 2514944, 2207744, 2588672, 2207744, 2838528, 2207744, 2207744, 2207744, 3010560, 2158592, 2428928, 2158592, 2514944, 0, 0, 2158592, 2588672, 2158592, 0, 2838528, 2158592, 2158592, 2158592, 3010560, 2158592, 2506752, 2158592, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 0, 29315, 922, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1539, 45, 3006464, 2383872, 0, 2020, 2158592, 2158592, 2158592, 2158592, 3006464, 2158592, 2637824, 2953216, 2158592, 2207744, 2637824, 2953216, 2207744, 0, 0, 2158592, 2637824, 2953216, 2158592, 2539520, 2158592, 2539520, 2207744, 0, 0, 2539520, 2158592, 2158592, 2158592, 2158592, 2207744, 2506752, 2207744, 2207744, 2207744, 2207744, 2207744, 2158592, 2506752, 0, 0, 2158592, 2207744, 0, 2158592, 2158592, 2207744, 0, 2158592, 2158592, 2207744, 0, 2158592, 2965504, 2965504, 2965504, 0, 0, 0, 0, 0, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2474269, 2158877, 2158877, 0, 0, 2158877, 2158877, 2158877, 2158877, 2634013, 2658589, 0, 0, 2740509, 2744605, 0, 2834717, 40976, 18, 36884, 45078, 24, 28, 90143, 94242, 118820, 102439, 106538, 98347, 118820, 118820, 118820, 40976, 18, 18, 36884, 0, 0, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 86016, 0, 0, 2211840, 102439, 0, 0, 0, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 3158016, 0, 2375680, 2379776, 2158592, 2158592, 2420736, 2158592, 2449408, 2158592, 2158592, 0, 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 135, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2564096, 2158592, 2158592, 2158592, 2158592, 2158592, 2596864, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2641920, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2781184, 2793472, 2494464, 2158592, 2158592, 2158592, 2523136, 2527232, 2158592, 2158592, 2576384, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 0, 27, 27, 0, 2158592, 2498560, 2158592, 2158592, 0, 2158592, 2158592, 2568192, 2158592, 2592768, 2625536, 2158592, 2158592, 2674688, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2473984, 2158592, 2158592, 2494464, 2158592, 2158592, 2158592, 3006464, 2383872, 0, 0, 2158592, 2158592, 2158592, 2158592, 3006464, 2158592, 2637824, 2953216, 2158592, 2207744, 2637824, 2953216, 40976, 18, 36884, 45078, 24, 27, 147488, 94242, 147456, 147488, 106538, 98347, 0, 0, 147456, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 0, 81920, 0, 94242, 0, 0, 0, 2211840, 0, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2428928, 2158592, 2514944, 2158592, 2588672, 2158592, 2838528, 2158592, 2158592, 40976, 18, 151573, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 0, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 1315, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1487, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 0, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 130, 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3096576, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744, 2207744, 2158592, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 644, 2207744, 2207744, 2207744, 3186688, 2207744, 0, 1080, 0, 1084, 0, 1088, 0, 0, 0, 0, 0, 0, 0, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2531466, 2158730, 2158730, 2158730, 2158730, 2158730, 2617482, 0, 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2781184, 2793472, 2158592, 2818048, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 40976, 18, 36884, 45078, 24, 27, 90143, 159779, 159744, 102439, 159779, 98347, 0, 0, 159744, 40976, 18, 18, 36884, 0, 45078, 0, 2224253, 172032, 2224253, 2232448, 2232448, 172032, 2232448, 90143, 0, 0, 2170880, 0, 0, 550, 829, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 124, 124, 127, 127, 127, 40976, 18, 36884, 45078, 25, 29, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 163931, 40976, 18, 18, 36884, 0, 45078, 249856, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 2170880, 0, 0, 827, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 4243810, 4243810, 24, 24, 27, 27, 27, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 0, 0, 0, 0, 57344, 286, 2158592, 2158592, 2158592, 2158592, 2707456, 2732032, 2158592, 2158592, 2158592, 2822144, 2826240, 2158592, 2895872, 2158592, 2158592, 2924544, 2158592, 2158592, 2973696, 2158592, 2207744, 2207744, 2207744, 3186688, 2207744, 0, 0, 0, 0, 0, 0, 53248, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 1613, 97, 97, 97, 97, 97, 97, 1495, 97, 97, 97, 97, 97, 97, 97, 97, 97, 566, 97, 97, 97, 97, 97, 97, 2207744, 0, 0, 0, 0, 0, 0, 2166784, 546, 0, 0, 0, 0, 286, 2158592, 2158592, 2158592, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 17, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 20480, 120, 121, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 2170880, 0, 53248, 550, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 196608, 18, 266240, 24, 24, 27, 27, 27, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 0, 45, 45, 45, 45, 45, 45, 45, 1535, 45, 45, 45, 45, 45, 45, 45, 1416, 45, 45, 45, 45, 45, 45, 45, 45, 424, 45, 45, 45, 45, 45, 45, 45, 45, 45, 405, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 199, 45, 45, 67, 67, 67, 67, 67, 491, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1766, 67, 67, 67, 1767, 67, 24850, 24850, 12564, 12564, 0, 0, 2166784, 546, 0, 53531, 53531, 0, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 743, 57889, 0, 2170880, 0, 0, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 1856, 45, 1858, 1859, 67, 67, 67, 1009, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1021, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2367773, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2699549, 2158877, 2158877, 2158877, 2158877, 2158877, 2748701, 2756893, 2777373, 2801949, 97, 1115, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 857, 97, 67, 67, 67, 67, 67, 1258, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1826, 67, 97, 97, 97, 97, 97, 97, 1338, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 870, 97, 97, 67, 67, 67, 1463, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1579, 67, 67, 97, 97, 97, 1518, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 904, 905, 97, 97, 97, 97, 1620, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 0, 0, 0, 0, 0, 45, 1679, 67, 67, 67, 1682, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1690, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 669, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 189, 45, 45, 45, 1748, 45, 45, 45, 1749, 1750, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1959, 67, 67, 67, 67, 1768, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1791, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1802, 67, 1817, 67, 67, 67, 67, 67, 67, 1823, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 97, 1848, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 659, 45, 45, 45, 45, 45, 45, 45, 1863, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 495, 67, 67, 67, 67, 67, 1878, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 0, 1973, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1165, 97, 1167, 67, 24850, 24850, 12564, 12564, 0, 0, 2166784, 0, 0, 53531, 53531, 0, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 1789, 97, 0, 94242, 0, 0, 0, 2211840, 102439, 0, 0, 106538, 98347, 136, 2158592, 2158592, 2158592, 2158592, 2158592, 3158016, 229376, 2375680, 2379776, 2158592, 2158592, 2420736, 2158592, 2449408, 2158592, 2158592, 67, 24850, 24850, 12564, 12564, 0, 0, 280, 547, 0, 53531, 53531, 0, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 1788, 97, 97, 0, 97, 2024, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 235, 67, 67, 67, 67, 67, 57889, 547, 547, 0, 0, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 1799, 45, 45, 45, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 1092, 0, 0, 0, 0, 0, 97, 97, 97, 97, 1612, 97, 97, 97, 97, 1616, 97, 1297, 1472, 0, 0, 0, 0, 1303, 1474, 0, 0, 0, 0, 1309, 1476, 0, 0, 0, 0, 97, 97, 97, 1481, 97, 97, 97, 97, 97, 97, 1488, 97, 0, 1474, 0, 1476, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 607, 97, 97, 97, 97, 40976, 18, 36884, 45078, 26, 30, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 213080, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 143448, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 0, 0, 0, 0, 97, 97, 97, 97, 1482, 97, 1483, 97, 97, 97, 97, 97, 97, 1326, 97, 97, 1329, 1330, 97, 97, 97, 97, 97, 97, 1159, 1160, 97, 97, 97, 97, 97, 97, 97, 97, 590, 97, 97, 97, 97, 97, 97, 97, 0, 94242, 0, 0, 0, 2211974, 102439, 0, 0, 106538, 98347, 0, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2474122, 2158730, 2158730, 2494602, 2158730, 2158730, 2158730, 2809994, 2158730, 2158730, 2842762, 2158730, 2158730, 2158730, 2900106, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3014794, 2158730, 2158730, 3051658, 2158730, 2158730, 3100810, 2158730, 2158730, 2158730, 2158730, 3096714, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2207744, 2207744, 2207744, 2207744, 2207744, 2572288, 2207744, 2207744, 2207744, 2207744, 541, 541, 543, 543, 0, 0, 2166784, 0, 548, 549, 549, 0, 286, 2158877, 2158877, 2158877, 2863389, 2892061, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 3186973, 2158877, 0, 0, 0, 0, 0, 0, 0, 0, 2367626, 2158877, 2404637, 2412829, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2564381, 2158877, 2158877, 2605341, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2679069, 2158877, 2695453, 2158877, 2703645, 2158877, 2711837, 2752797, 2158877, 0, 2158877, 2158877, 2158877, 2384010, 2158730, 2158730, 2158730, 2158730, 3006602, 2383872, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3096576, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 0, 0, 2158877, 2785565, 2158877, 2810141, 2158877, 2158877, 2842909, 2158877, 2158877, 2158877, 2900253, 2158877, 2158877, 2158877, 2158877, 2158877, 2531613, 2158877, 2158877, 2158877, 2158877, 2158877, 2617629, 2158877, 2158877, 2158877, 2158877, 2158730, 2818186, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3105053, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 0, 0, 0, 0, 0, 97, 97, 97, 1611, 97, 97, 97, 97, 97, 97, 97, 1496, 97, 97, 1499, 97, 97, 97, 97, 97, 2441354, 2445450, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2502794, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2433162, 2158730, 2453642, 2461834, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2580618, 2158730, 2158730, 2158730, 2158730, 2621578, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2699402, 2158730, 2158730, 2158730, 2158730, 2678922, 2158730, 2695306, 2158730, 2703498, 2158730, 2711690, 2752650, 2158730, 2158730, 2785418, 2158730, 2158730, 2158730, 3113098, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3186826, 2158730, 2207744, 2207744, 2207744, 2207744, 2781184, 2793472, 2207744, 2818048, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 541, 0, 543, 2158877, 2502941, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2580765, 2158877, 2158877, 2158877, 2158877, 2621725, 2158877, 3019037, 2158877, 3043613, 2158877, 2158877, 2158877, 2158877, 3080477, 2158877, 2158877, 3113245, 2158877, 2158877, 2158877, 2158877, 0, 2158877, 2908445, 2158877, 2158877, 2158877, 2978077, 2158877, 2158877, 2158877, 2158877, 3039517, 2158877, 2158730, 2510986, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2584714, 2158730, 2609290, 2158730, 2158730, 2629770, 2158730, 2158730, 2158730, 2388106, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2605194, 2158730, 2158730, 2158730, 2158730, 2687114, 2158730, 2715786, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2867338, 2158730, 2904202, 2158730, 2158730, 2158730, 2642058, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2781322, 2793610, 2158730, 3121290, 2158730, 2158730, 2158730, 3149962, 2158730, 2158730, 3170442, 3174538, 2158730, 2367488, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2441216, 2445312, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2502656, 2158877, 2433309, 2158877, 2453789, 2461981, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2511133, 2158877, 2158877, 2158877, 2158877, 2584861, 2158877, 2609437, 2158877, 2158877, 2629917, 2158877, 2158877, 2158877, 2687261, 2158877, 2715933, 2158877, 2158730, 2158730, 2973834, 2158730, 2982026, 2158730, 2158730, 3002506, 2158730, 3047562, 3063946, 3076234, 2158730, 2158730, 2158730, 2158730, 2207744, 2506752, 2207744, 2207744, 2207744, 2207744, 2207744, 2158877, 2507037, 0, 0, 2158877, 2158730, 2158730, 2158730, 3203210, 2207744, 2207744, 2207744, 2207744, 2207744, 2424832, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2564096, 2207744, 2207744, 2207744, 2707741, 2732317, 2158877, 2158877, 2158877, 2822429, 2826525, 2158877, 2896157, 2158877, 2158877, 2924829, 2158877, 2158877, 2973981, 2158877, 18, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 642, 0, 2158592, 0, 45, 1529, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1755, 45, 67, 67, 2982173, 2158877, 2158877, 3002653, 2158877, 3047709, 3064093, 3076381, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 3203357, 2523274, 2527370, 2158730, 2158730, 2576522, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2908298, 2494749, 2158877, 2158877, 2158877, 2523421, 2527517, 2158877, 2158877, 2576669, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 0, 40976, 0, 18, 18, 4321280, 2224253, 2232448, 4329472, 2232448, 2158730, 2498698, 2158730, 2158730, 2158730, 2158730, 2568330, 2158730, 2592906, 2625674, 2158730, 2158730, 2674826, 2736266, 2158730, 2158730, 2158730, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2158730, 2912394, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3109002, 2158730, 2158730, 3133578, 3145866, 3154058, 2375680, 2207744, 3108864, 2207744, 2207744, 3133440, 3145728, 3153920, 2375965, 2380061, 2158877, 2158877, 2421021, 2158877, 2449693, 2158877, 2158877, 2158877, 3117341, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3104906, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158877, 2498845, 2158877, 2158877, 0, 2158877, 2158877, 2568477, 2158877, 2593053, 2625821, 2158877, 2158877, 2674973, 0, 0, 0, 0, 97, 97, 1480, 97, 97, 97, 97, 97, 1485, 97, 97, 97, 0, 97, 97, 1729, 97, 1731, 97, 97, 97, 97, 97, 97, 97, 311, 97, 97, 97, 97, 97, 97, 97, 97, 1520, 97, 97, 1523, 97, 97, 1526, 97, 2736413, 2158877, 2158877, 0, 2158877, 2912541, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 3109149, 2158877, 2158877, 3014941, 2158877, 2158877, 3051805, 2158877, 2158877, 3100957, 2158877, 2158877, 3121437, 2158877, 2158877, 2158877, 3150109, 3133725, 3146013, 3154205, 2158730, 2408586, 2416778, 2158730, 2465930, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3018890, 2158730, 3043466, 2158730, 2158730, 2158730, 2158730, 3080330, 2633866, 2658442, 2740362, 2744458, 2834570, 2949258, 2158730, 2986122, 2158730, 2998410, 2158730, 2158730, 2158730, 3129482, 2207744, 2408448, 2949120, 2207744, 2985984, 2207744, 2998272, 2207744, 2207744, 2207744, 3129344, 2158877, 2408733, 2416925, 2158877, 2466077, 2158877, 2158877, 3170589, 3174685, 2158877, 0, 0, 0, 2158730, 2158730, 2158730, 2158730, 2158730, 2424970, 2158730, 2158730, 2158730, 2158730, 2707594, 2732170, 2158730, 2158730, 2158730, 2822282, 2826378, 2158730, 2896010, 2158730, 2158730, 2924682, 2949405, 2158877, 2986269, 2158877, 2998557, 2158877, 2158877, 2158877, 3129629, 2158730, 2158730, 2478218, 2158730, 2158730, 2158730, 2535562, 2543754, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3117194, 2207744, 2207744, 2478080, 2207744, 2207744, 2207744, 2207744, 3014656, 2207744, 2207744, 3051520, 2207744, 2207744, 3100672, 2207744, 2207744, 3121152, 2207744, 2207744, 2207744, 2207744, 2207744, 2584576, 2207744, 2609152, 2207744, 2207744, 2629632, 2207744, 2207744, 2207744, 2686976, 2207744, 2207744, 2535424, 2543616, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3117056, 2158877, 2158877, 2478365, 0, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158730, 2158730, 2482314, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2207744, 2207744, 2207744, 2387968, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 823, 0, 825, 2158730, 2158730, 2158730, 2990218, 2158730, 2158730, 2207744, 2207744, 2482176, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 135, 0, 2207744, 2207744, 2990080, 2207744, 2207744, 2158877, 2158877, 2482461, 2158877, 2158877, 0, 0, 0, 2158877, 2158877, 2158877, 2158877, 2158877, 2158730, 2429066, 2158730, 2515082, 2158730, 2588810, 2158730, 2838666, 2158730, 2158730, 2158730, 3010698, 2207744, 2428928, 2207744, 2514944, 2207744, 2588672, 2207744, 2838528, 2207744, 2207744, 2207744, 3010560, 2158877, 2429213, 2158877, 2515229, 0, 0, 2158877, 2588957, 2158877, 0, 2838813, 2158877, 2158877, 2158877, 3010845, 2158730, 2506890, 2158730, 2158730, 2158730, 2748554, 2756746, 2777226, 2801802, 2158730, 2158730, 2158730, 2863242, 2891914, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 2564234, 2158730, 2158730, 2158730, 2158730, 2158730, 2597002, 2158730, 2158730, 2158730, 3006464, 2384157, 0, 0, 2158877, 2158877, 2158877, 2158877, 3006749, 2158730, 2637962, 2953354, 2158730, 2207744, 2637824, 2953216, 2207744, 0, 0, 2158877, 2638109, 2953501, 2158877, 2539658, 2158730, 2539520, 2207744, 0, 0, 2539805, 2158877, 2158730, 2158730, 2158730, 2977930, 2158730, 2158730, 2158730, 2158730, 3039370, 2158730, 2158730, 2158730, 2158730, 2158730, 2158730, 3158154, 2207744, 0, 2158877, 2158730, 2207744, 0, 2158877, 2158730, 2207744, 0, 2158877, 2965642, 2965504, 2965789, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1484, 97, 97, 97, 97, 2158592, 18, 0, 122880, 0, 0, 0, 77824, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 356, 0, 0, 0, 0, 0, 0, 28809, 0, 139, 45, 45, 45, 45, 45, 45, 1751, 45, 45, 45, 45, 45, 45, 45, 67, 67, 1427, 67, 67, 67, 67, 67, 1432, 67, 67, 67, 3104768, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 122880, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 1322, 550, 0, 286, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 24, 4329472, 27, 27, 2207744, 2207744, 2977792, 2207744, 2207744, 2207744, 2207744, 3039232, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 3158016, 542, 0, 0, 0, 542, 0, 544, 0, 0, 0, 544, 0, 550, 0, 0, 0, 0, 0, 97, 97, 1610, 97, 97, 97, 97, 97, 97, 97, 97, 898, 97, 97, 97, 97, 97, 97, 97, 0, 94242, 0, 0, 0, 2211840, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 237568, 102439, 106538, 98347, 0, 0, 20480, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 192512, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 94, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 96, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 12378, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 126, 126, 126, 126, 90143, 0, 0, 2170880, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 20480, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 241664, 102439, 106538, 98347, 0, 0, 20568, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 200797, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 20480, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 0, 0, 44, 0, 0, 20575, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 41, 41, 41, 0, 0, 1126400, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 0, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 89, 40976, 18, 18, 36884, 0, 45078, 0, 24, 24, 24, 27, 131201, 27, 27, 90143, 0, 0, 2170880, 0, 0, 550, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2441216, 2445312, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 94242, 0, 0, 208896, 2211840, 102439, 0, 0, 106538, 98347, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 0, 0, 0, 0, 0, 0, 0, 2367488, 32768, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2433024, 2158592, 2453504, 2461696, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2510848, 2158592, 2158592, 2158592, 2158592, 40976, 18, 36884, 245783, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 20480, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 221184, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 180224, 40976, 18, 18, 36884, 155648, 45078, 0, 24, 24, 217088, 27, 27, 27, 217088, 90143, 0, 0, 2170880, 0, 0, 828, 0, 2158592, 2158592, 2158592, 2387968, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744, 2207744, 2207744, 2387968, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 233472, 0, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 45, 45, 718, 45, 45, 45, 45, 45, 45, 45, 45, 45, 727, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 45, 1808, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 97, 97, 0, 0, 97, 67, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 97, 97, 0, 0, 97, 97, 97, 97, 97, 97, 1787, 0, 97, 97, 0, 97, 97, 97, 45, 45, 45, 45, 2029, 45, 67, 67, 67, 67, 2033, 57889, 0, 0, 54074, 54074, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 45, 1798, 45, 45, 1800, 45, 45, 0, 1472, 0, 0, 0, 0, 0, 1474, 0, 0, 0, 0, 0, 1476, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 1320, 97, 97, 0, 0, 97, 97, 97, 97, 1786, 97, 0, 0, 97, 97, 0, 1790, 1527, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 663, 67, 24850, 24850, 12564, 12564, 0, 57889, 281, 0, 0, 53531, 53531, 367, 286, 97, 97, 0, 0, 97, 97, 97, 1785, 97, 97, 0, 0, 97, 97, 0, 97, 97, 1979, 97, 97, 45, 45, 1983, 45, 1984, 45, 45, 45, 45, 45, 652, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 690, 45, 45, 694, 45, 45, 40976, 19, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 262144, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 46, 67, 98, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 45, 67, 97, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 258048, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 1122423, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 1114152, 1114152, 1114152, 0, 0, 1114112, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 37, 102439, 106538, 98347, 0, 0, 204800, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 0, 102439, 106538, 98347, 0, 0, 57436, 40976, 18, 36884, 45078, 24, 27, 33, 33, 0, 33, 33, 33, 0, 0, 0, 40976, 18, 18, 36884, 0, 45078, 0, 124, 124, 124, 127, 127, 127, 127, 90143, 0, 0, 2170880, 0, 0, 550, 0, 2158877, 2158877, 2158877, 2388253, 2158877, 2158877, 2158877, 2158877, 2158877, 2781469, 2793757, 2158877, 2818333, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2867485, 2158877, 2904349, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 3096861, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2441501, 2445597, 2158877, 2158877, 2158877, 2158877, 2158877, 40976, 122, 123, 36884, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 936, 2158592, 4243810, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 935, 45, 45, 45, 715, 45, 45, 45, 45, 45, 45, 45, 723, 45, 45, 45, 45, 45, 1182, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 430, 45, 45, 45, 45, 45, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 47, 68, 99, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 48, 69, 100, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 49, 70, 101, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 50, 71, 102, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 51, 72, 103, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 52, 73, 104, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 53, 74, 105, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 54, 75, 106, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 55, 76, 107, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 56, 77, 108, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 57, 78, 109, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 58, 79, 110, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 59, 80, 111, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 60, 81, 112, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 61, 82, 113, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 62, 83, 114, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 63, 84, 115, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 64, 85, 116, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 65, 86, 117, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 38, 102439, 106538, 98347, 66, 87, 118, 40976, 18, 36884, 45078, 24, 27, 90143, 94242, 118820, 102439, 106538, 98347, 118820, 118820, 118820, 40976, 18, 18, 0, 0, 45078, 0, 24, 24, 24, 27, 27, 27, 27, 90143, 0, 0, 1314, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 1321, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 0, 367, 0, 0, 1315, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1360, 97, 97, 131, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 145, 149, 45, 45, 45, 45, 45, 174, 45, 179, 45, 185, 45, 188, 45, 45, 202, 67, 255, 67, 67, 269, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 292, 296, 97, 97, 97, 97, 97, 321, 97, 326, 97, 332, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 646, 335, 97, 97, 349, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 437, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 523, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 511, 67, 67, 67, 97, 97, 97, 620, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1501, 1502, 97, 793, 67, 67, 796, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 808, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 2052, 67, 67, 67, 67, 813, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 57889, 0, 0, 54074, 54074, 550, 830, 97, 97, 97, 97, 97, 97, 97, 97, 97, 315, 97, 97, 97, 97, 97, 97, 841, 97, 97, 97, 97, 97, 97, 97, 97, 97, 854, 97, 97, 97, 97, 97, 97, 589, 97, 97, 97, 97, 97, 97, 97, 97, 97, 867, 97, 97, 97, 97, 97, 97, 97, 891, 97, 97, 894, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 906, 45, 937, 45, 45, 940, 45, 45, 45, 45, 45, 45, 948, 45, 45, 45, 45, 45, 734, 735, 67, 737, 67, 738, 67, 740, 67, 67, 67, 45, 967, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 435, 45, 45, 45, 980, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 415, 45, 45, 67, 67, 1024, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 67, 67, 67, 67, 67, 25398, 1081, 13112, 1085, 54074, 1089, 0, 0, 0, 0, 0, 0, 363, 0, 28809, 0, 139, 45, 45, 45, 45, 45, 45, 1674, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1913, 67, 1914, 67, 67, 67, 1918, 67, 67, 97, 97, 97, 97, 1118, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 630, 97, 97, 97, 97, 97, 1169, 97, 97, 97, 97, 97, 0, 921, 0, 1175, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 1534, 45, 45, 45, 45, 45, 1538, 45, 45, 45, 45, 1233, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 742, 67, 45, 45, 1191, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 454, 67, 67, 67, 67, 1243, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1251, 67, 0, 0, 97, 97, 97, 97, 45, 45, 67, 67, 2050, 0, 97, 97, 45, 45, 45, 732, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 67, 67, 67, 1284, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 772, 67, 67, 67, 1293, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 368, 2158592, 2158592, 2158592, 2404352, 2412544, 1323, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1331, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1737, 97, 1364, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1373, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 647, 45, 45, 1387, 45, 45, 1391, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 410, 45, 45, 45, 45, 45, 1400, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1407, 45, 45, 45, 45, 45, 941, 45, 943, 45, 45, 45, 45, 45, 45, 951, 45, 67, 1438, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1447, 67, 67, 67, 67, 67, 67, 782, 67, 67, 67, 67, 67, 67, 67, 67, 67, 756, 67, 67, 67, 67, 67, 67, 97, 1491, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1500, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1736, 97, 45, 45, 1541, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 677, 45, 45, 67, 1581, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 791, 792, 67, 67, 67, 67, 1598, 67, 1600, 67, 67, 67, 67, 67, 67, 67, 67, 1472, 97, 97, 97, 1727, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1513, 97, 97, 67, 67, 97, 1879, 97, 1881, 97, 0, 1884, 0, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 1842, 97, 97, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1928, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 1903, 45, 45, 45, 67, 67, 67, 67, 97, 97, 97, 97, 1971, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 1381, 45, 45, 45, 45, 1976, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1747, 809, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 97, 907, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 638, 0, 0, 0, 0, 1478, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1150, 97, 97, 97, 97, 67, 67, 67, 67, 1244, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 477, 67, 67, 67, 67, 67, 67, 1294, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1324, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 1374, 97, 97, 97, 97, 0, 1175, 0, 45, 45, 45, 45, 45, 45, 45, 45, 945, 45, 45, 45, 45, 45, 45, 45, 45, 1908, 45, 45, 1910, 45, 67, 67, 67, 67, 67, 67, 67, 67, 1919, 67, 0, 0, 97, 97, 97, 97, 45, 2048, 67, 2049, 0, 0, 97, 2051, 45, 45, 45, 939, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 397, 45, 45, 45, 1921, 67, 67, 1923, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 1947, 45, 1935, 0, 0, 0, 97, 1939, 97, 97, 1941, 97, 45, 45, 45, 45, 45, 45, 382, 389, 45, 45, 45, 45, 45, 45, 45, 45, 1810, 45, 45, 1812, 67, 67, 67, 67, 67, 256, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 336, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 371, 373, 45, 45, 45, 955, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 413, 45, 45, 45, 457, 459, 67, 67, 67, 67, 67, 67, 67, 67, 473, 67, 478, 67, 67, 482, 67, 67, 485, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 1828, 97, 554, 556, 97, 97, 97, 97, 97, 97, 97, 97, 570, 97, 575, 97, 97, 579, 97, 97, 582, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 330, 97, 97, 67, 746, 67, 67, 67, 67, 67, 67, 67, 67, 67, 758, 67, 67, 67, 67, 67, 67, 67, 1575, 67, 67, 67, 67, 67, 67, 67, 67, 493, 67, 67, 67, 67, 67, 67, 67, 97, 97, 844, 97, 97, 97, 97, 97, 97, 97, 97, 97, 856, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1735, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 1642, 97, 1644, 97, 97, 890, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 67, 67, 67, 67, 1065, 1066, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 532, 67, 67, 67, 67, 67, 67, 67, 1451, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 496, 67, 67, 97, 97, 1505, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 593, 97, 97, 0, 1474, 0, 1476, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1617, 97, 97, 1635, 0, 1637, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 885, 97, 97, 97, 97, 67, 67, 1704, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 565, 572, 97, 97, 97, 97, 97, 97, 97, 97, 1832, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 1946, 45, 45, 67, 67, 67, 67, 67, 97, 1926, 97, 1927, 97, 0, 0, 0, 97, 97, 1934, 2043, 0, 0, 97, 97, 97, 2047, 45, 45, 67, 67, 0, 1832, 97, 97, 45, 45, 45, 981, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1227, 45, 45, 45, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 372, 45, 45, 45, 45, 1661, 1662, 45, 45, 45, 45, 45, 1666, 45, 45, 45, 45, 45, 1673, 45, 1675, 45, 45, 45, 45, 45, 45, 45, 67, 1426, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1275, 67, 67, 67, 67, 67, 45, 418, 45, 45, 420, 45, 45, 423, 45, 45, 45, 45, 45, 45, 45, 45, 959, 45, 45, 962, 45, 45, 45, 45, 458, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 483, 67, 67, 67, 67, 504, 67, 67, 506, 67, 67, 509, 67, 67, 67, 67, 67, 67, 67, 528, 67, 67, 67, 67, 67, 67, 67, 67, 1287, 67, 67, 67, 67, 67, 67, 67, 555, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 580, 97, 97, 97, 97, 601, 97, 97, 603, 97, 97, 606, 97, 97, 97, 97, 97, 97, 848, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1498, 97, 97, 97, 97, 97, 97, 45, 45, 714, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 989, 990, 45, 67, 67, 67, 67, 67, 1011, 67, 67, 67, 67, 1015, 67, 67, 67, 67, 67, 67, 67, 753, 67, 67, 67, 67, 67, 67, 67, 67, 467, 67, 67, 67, 67, 67, 67, 67, 45, 45, 1179, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1003, 1004, 67, 1217, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 728, 67, 1461, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1034, 67, 97, 1516, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 871, 97, 67, 67, 67, 1705, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 567, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1715, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 1380, 45, 45, 45, 45, 45, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 1887, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 2006, 45, 45, 1907, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1920, 67, 97, 0, 2035, 97, 97, 97, 97, 97, 45, 45, 45, 45, 67, 67, 67, 1428, 67, 67, 67, 67, 67, 67, 1435, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 146, 45, 152, 45, 45, 165, 45, 175, 45, 180, 45, 45, 187, 190, 195, 45, 203, 254, 257, 262, 67, 270, 67, 67, 0, 24850, 12564, 0, 0, 0, 281, 28809, 53531, 97, 97, 97, 293, 97, 299, 97, 97, 312, 97, 322, 97, 327, 97, 97, 334, 337, 342, 97, 350, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 67, 484, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 499, 97, 581, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 596, 648, 45, 650, 45, 651, 45, 653, 45, 45, 45, 657, 45, 45, 45, 45, 45, 45, 1954, 67, 67, 67, 1958, 67, 67, 67, 67, 67, 67, 67, 768, 67, 67, 67, 67, 67, 67, 67, 67, 769, 67, 67, 67, 67, 67, 67, 67, 680, 45, 45, 45, 45, 45, 45, 45, 45, 688, 689, 691, 45, 45, 45, 45, 45, 983, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 947, 45, 45, 45, 45, 952, 45, 45, 698, 699, 45, 45, 702, 703, 45, 45, 45, 45, 45, 45, 45, 711, 744, 67, 67, 67, 67, 67, 67, 67, 67, 67, 757, 67, 67, 67, 67, 761, 67, 67, 67, 67, 765, 67, 767, 67, 67, 67, 67, 67, 67, 67, 67, 775, 776, 778, 67, 67, 67, 67, 67, 67, 785, 786, 67, 67, 789, 790, 67, 67, 67, 67, 67, 67, 1442, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 1775, 97, 97, 97, 67, 67, 67, 67, 67, 798, 67, 67, 67, 802, 67, 67, 67, 67, 67, 67, 67, 67, 1465, 67, 67, 1468, 67, 67, 1471, 67, 67, 810, 67, 67, 67, 67, 67, 67, 67, 67, 67, 821, 25398, 542, 13112, 544, 57889, 0, 0, 54074, 54074, 550, 0, 833, 97, 835, 97, 836, 97, 838, 97, 97, 0, 0, 97, 97, 97, 2002, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 1740, 45, 45, 45, 1744, 45, 45, 45, 97, 842, 97, 97, 97, 97, 97, 97, 97, 97, 97, 855, 97, 97, 97, 97, 0, 1717, 1718, 97, 97, 97, 97, 97, 1722, 97, 0, 0, 859, 97, 97, 97, 97, 863, 97, 865, 97, 97, 97, 97, 97, 97, 97, 97, 604, 97, 97, 97, 97, 97, 97, 97, 873, 874, 876, 97, 97, 97, 97, 97, 97, 883, 884, 97, 97, 887, 888, 97, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 225280, 0, 365, 0, 367, 0, 45, 45, 45, 1531, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1199, 45, 45, 45, 45, 45, 97, 97, 908, 97, 97, 97, 97, 97, 97, 97, 97, 97, 919, 638, 0, 0, 0, 0, 2158877, 2158877, 2158877, 2158877, 2158877, 2425117, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2597149, 2158877, 2158877, 2158877, 2158877, 2158877, 2158877, 2642205, 2158877, 2158877, 2158877, 2158877, 2158877, 3158301, 0, 2375818, 2379914, 2158730, 2158730, 2420874, 2158730, 2449546, 2158730, 2158730, 953, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 965, 978, 45, 45, 45, 45, 45, 45, 985, 45, 45, 45, 45, 45, 45, 45, 45, 971, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1027, 67, 1029, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1455, 67, 67, 67, 67, 67, 67, 67, 1077, 1078, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 0, 366, 0, 139, 2158730, 2158730, 2158730, 2404490, 2412682, 1113, 97, 97, 97, 97, 97, 97, 1121, 97, 1123, 97, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1540, 1155, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 615, 1168, 97, 97, 1171, 1172, 97, 97, 0, 921, 0, 1175, 0, 0, 0, 0, 45, 45, 45, 45, 45, 1533, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1663, 45, 45, 45, 45, 45, 45, 45, 45, 45, 183, 45, 45, 45, 45, 201, 45, 45, 45, 1219, 45, 45, 45, 45, 45, 45, 45, 1226, 45, 45, 45, 45, 45, 168, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 427, 45, 45, 45, 45, 45, 45, 45, 1231, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1242, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1046, 67, 67, 1254, 67, 1256, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 806, 807, 67, 67, 97, 1336, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1111, 97, 97, 97, 97, 97, 1351, 97, 97, 97, 1354, 97, 97, 97, 1359, 97, 97, 97, 0, 97, 97, 97, 97, 1640, 97, 97, 97, 97, 97, 97, 97, 897, 97, 97, 97, 902, 97, 97, 97, 97, 97, 97, 97, 97, 1366, 97, 97, 97, 97, 97, 97, 97, 1371, 97, 97, 97, 0, 97, 97, 97, 1730, 97, 97, 97, 97, 97, 97, 97, 97, 915, 97, 97, 97, 97, 0, 360, 0, 67, 67, 67, 1440, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1017, 67, 1019, 67, 67, 67, 67, 67, 1453, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1459, 97, 97, 97, 1493, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1525, 97, 97, 97, 97, 97, 97, 1507, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1514, 67, 67, 67, 67, 1584, 67, 67, 67, 67, 67, 1590, 67, 67, 67, 67, 67, 67, 67, 783, 67, 67, 67, 788, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1599, 1601, 67, 67, 67, 1604, 67, 1606, 1607, 67, 1472, 0, 1474, 0, 1476, 0, 97, 97, 97, 97, 97, 97, 1614, 97, 97, 97, 97, 45, 45, 1850, 45, 45, 45, 45, 1855, 45, 45, 45, 45, 45, 1222, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1229, 97, 1618, 97, 97, 97, 97, 97, 97, 97, 1625, 97, 97, 97, 97, 97, 0, 1175, 0, 45, 45, 45, 45, 45, 45, 45, 45, 447, 45, 45, 45, 45, 45, 67, 67, 1633, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 1643, 1645, 97, 97, 0, 0, 97, 97, 1784, 97, 97, 97, 0, 0, 97, 97, 0, 97, 1894, 1895, 97, 1897, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 656, 45, 45, 45, 45, 45, 45, 97, 1648, 97, 1650, 1651, 97, 0, 45, 45, 45, 1654, 45, 45, 45, 45, 45, 169, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 658, 45, 45, 45, 45, 664, 45, 45, 1659, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1187, 45, 45, 1669, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1005, 67, 67, 1681, 67, 67, 67, 67, 67, 67, 67, 1686, 67, 67, 67, 67, 67, 67, 67, 784, 67, 67, 67, 67, 67, 67, 67, 67, 1055, 67, 67, 67, 67, 1060, 67, 67, 97, 97, 1713, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 1378, 45, 45, 45, 45, 45, 45, 45, 408, 45, 45, 45, 45, 45, 45, 45, 45, 1547, 45, 1549, 45, 45, 45, 45, 45, 97, 97, 1780, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 45, 2027, 2028, 45, 45, 67, 67, 2031, 2032, 67, 45, 45, 1804, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1917, 67, 67, 67, 67, 67, 67, 67, 1819, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 1708, 97, 97, 97, 97, 97, 45, 45, 1862, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 497, 67, 67, 67, 1877, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 0, 97, 97, 97, 97, 97, 1839, 0, 0, 97, 97, 97, 97, 1936, 0, 0, 97, 97, 97, 97, 97, 97, 1943, 1944, 1945, 45, 45, 45, 45, 670, 45, 45, 45, 45, 674, 45, 45, 45, 45, 678, 45, 1948, 45, 1950, 45, 45, 45, 45, 1955, 1956, 1957, 67, 67, 67, 1960, 67, 1962, 67, 67, 67, 67, 1967, 1968, 1969, 97, 0, 0, 0, 97, 97, 1974, 97, 0, 1936, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 1906, 0, 1977, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1746, 45, 45, 45, 45, 2011, 67, 67, 2013, 67, 67, 67, 2017, 97, 97, 0, 0, 2021, 97, 8192, 97, 97, 2025, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1916, 67, 67, 67, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 140, 45, 45, 45, 1180, 45, 45, 45, 45, 1184, 45, 45, 45, 45, 45, 45, 45, 387, 45, 392, 45, 45, 396, 45, 45, 399, 45, 45, 67, 207, 67, 67, 67, 67, 67, 67, 236, 67, 67, 67, 67, 67, 67, 67, 800, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1603, 67, 67, 67, 67, 67, 0, 97, 97, 287, 97, 97, 97, 97, 97, 97, 316, 97, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 1656, 1657, 45, 376, 45, 45, 45, 45, 45, 388, 45, 45, 45, 45, 45, 45, 45, 45, 1406, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 462, 67, 67, 67, 67, 67, 474, 67, 67, 67, 67, 67, 67, 67, 817, 67, 67, 67, 67, 25398, 542, 13112, 544, 97, 97, 97, 97, 559, 97, 97, 97, 97, 97, 571, 97, 97, 97, 97, 97, 97, 896, 97, 97, 97, 900, 97, 97, 97, 97, 97, 97, 912, 914, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 391, 45, 45, 45, 45, 45, 45, 45, 45, 713, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 662, 45, 1140, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 636, 67, 67, 1283, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 513, 67, 67, 1363, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 889, 97, 97, 97, 1714, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 926, 45, 45, 45, 45, 45, 45, 45, 45, 672, 45, 45, 45, 45, 45, 45, 45, 45, 686, 45, 45, 45, 45, 45, 45, 45, 45, 944, 45, 45, 45, 45, 45, 45, 45, 45, 1676, 45, 45, 45, 45, 45, 45, 67, 97, 97, 97, 1833, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 1902, 45, 45, 45, 45, 45, 957, 45, 45, 45, 45, 961, 45, 963, 45, 45, 45, 67, 97, 2034, 0, 97, 97, 97, 97, 97, 2040, 45, 45, 45, 2042, 67, 67, 67, 67, 67, 67, 1574, 67, 67, 67, 67, 67, 1578, 67, 67, 67, 67, 67, 67, 799, 67, 67, 67, 804, 67, 67, 67, 67, 67, 67, 67, 1298, 0, 0, 0, 1304, 0, 0, 0, 1310, 132, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 45, 45, 1414, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 428, 45, 45, 45, 45, 45, 57889, 0, 0, 54074, 54074, 550, 831, 97, 97, 97, 97, 97, 97, 97, 97, 97, 568, 97, 97, 97, 97, 578, 97, 45, 45, 968, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1228, 45, 45, 67, 67, 67, 67, 67, 25398, 1082, 13112, 1086, 54074, 1090, 0, 0, 0, 0, 0, 0, 364, 0, 0, 0, 139, 2158592, 2158592, 2158592, 2404352, 2412544, 67, 67, 67, 67, 1464, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 510, 67, 67, 67, 67, 97, 97, 97, 97, 1519, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 918, 97, 0, 0, 0, 0, 1528, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 976, 45, 1554, 45, 45, 45, 45, 45, 45, 45, 45, 1562, 45, 45, 1565, 45, 45, 45, 45, 683, 45, 45, 45, 687, 45, 45, 692, 45, 45, 45, 45, 45, 1953, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1014, 67, 67, 67, 67, 67, 67, 1568, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 67, 67, 67, 67, 67, 1585, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1594, 97, 97, 1649, 97, 97, 97, 0, 45, 45, 1653, 45, 45, 45, 45, 45, 45, 383, 45, 45, 45, 45, 45, 45, 45, 45, 45, 986, 45, 45, 45, 45, 45, 45, 45, 45, 1670, 45, 1672, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 736, 67, 67, 67, 67, 67, 741, 67, 67, 67, 1680, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1074, 67, 67, 67, 1692, 67, 67, 67, 67, 67, 67, 67, 1697, 67, 1699, 67, 67, 67, 67, 67, 67, 1012, 67, 67, 67, 67, 67, 67, 67, 67, 67, 468, 475, 67, 67, 67, 67, 67, 67, 1769, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 624, 97, 97, 97, 97, 97, 97, 634, 97, 97, 1792, 97, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 958, 45, 45, 45, 45, 45, 45, 964, 45, 150, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 977, 204, 45, 67, 67, 67, 217, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 787, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 271, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 97, 351, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 45, 938, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1398, 45, 45, 45, 153, 45, 161, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 660, 661, 45, 45, 205, 45, 67, 67, 67, 67, 220, 67, 228, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 280, 94, 0, 0, 67, 67, 67, 67, 67, 272, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 97, 352, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 439, 45, 45, 45, 45, 45, 445, 45, 45, 45, 452, 45, 45, 67, 67, 212, 216, 67, 67, 67, 67, 67, 241, 67, 246, 67, 252, 67, 67, 486, 67, 67, 67, 67, 67, 67, 67, 494, 67, 67, 67, 67, 67, 67, 67, 1245, 67, 67, 67, 67, 67, 67, 67, 67, 1013, 67, 67, 1016, 67, 67, 67, 67, 67, 521, 67, 67, 525, 67, 67, 67, 67, 67, 531, 67, 67, 67, 538, 67, 0, 0, 2046, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 1192, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1418, 45, 45, 1421, 97, 97, 583, 97, 97, 97, 97, 97, 97, 97, 591, 97, 97, 97, 97, 97, 97, 913, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 1384, 97, 618, 97, 97, 622, 97, 97, 97, 97, 97, 628, 97, 97, 97, 635, 97, 18, 131427, 0, 0, 0, 639, 0, 132, 362, 0, 0, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 932, 45, 45, 45, 45, 45, 1544, 45, 45, 45, 45, 45, 1550, 45, 45, 45, 45, 45, 1194, 45, 1196, 45, 45, 45, 45, 45, 45, 45, 45, 999, 45, 45, 45, 45, 45, 67, 67, 45, 45, 667, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1408, 45, 45, 45, 696, 45, 45, 45, 701, 45, 45, 45, 45, 45, 45, 45, 45, 710, 45, 45, 45, 1220, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 194, 45, 45, 45, 729, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 797, 67, 67, 67, 67, 67, 67, 805, 67, 67, 67, 67, 67, 67, 67, 1587, 67, 1589, 67, 67, 67, 67, 67, 67, 67, 67, 1763, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 2162968, 0, 0, 67, 67, 67, 67, 67, 814, 816, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 67, 67, 1008, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1020, 67, 0, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 67, 67, 67, 67, 1429, 67, 1430, 67, 67, 67, 67, 67, 1062, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 518, 1076, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 0, 28809, 0, 139, 45, 45, 45, 45, 45, 97, 97, 97, 97, 1102, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1124, 97, 1126, 97, 97, 1114, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1112, 97, 97, 1156, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 594, 97, 97, 97, 97, 1170, 97, 97, 97, 97, 0, 921, 0, 0, 0, 0, 0, 0, 45, 45, 45, 45, 1532, 45, 45, 45, 45, 1536, 45, 45, 45, 45, 45, 172, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 706, 45, 45, 709, 45, 45, 1177, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1202, 45, 1204, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1215, 45, 45, 45, 1232, 45, 45, 45, 45, 45, 45, 45, 67, 1237, 67, 67, 67, 67, 67, 67, 1053, 1054, 67, 67, 67, 67, 67, 67, 1061, 67, 67, 1282, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1289, 67, 67, 67, 1292, 97, 97, 97, 97, 1339, 97, 97, 97, 97, 97, 97, 1344, 97, 97, 97, 97, 45, 1849, 45, 1851, 45, 45, 45, 45, 45, 45, 45, 45, 721, 45, 45, 45, 45, 45, 726, 45, 1385, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1188, 45, 45, 1401, 1402, 45, 45, 45, 45, 1405, 45, 45, 45, 45, 45, 45, 45, 45, 1752, 45, 45, 45, 45, 45, 67, 67, 1410, 45, 45, 45, 1413, 45, 1415, 45, 45, 45, 45, 45, 45, 1419, 45, 45, 45, 45, 1806, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 97, 97, 2019, 0, 97, 67, 67, 67, 1452, 67, 67, 67, 67, 67, 67, 67, 67, 1457, 67, 67, 67, 67, 67, 67, 1259, 67, 67, 67, 67, 67, 67, 1264, 67, 67, 1460, 67, 1462, 67, 67, 67, 67, 67, 67, 1466, 67, 67, 67, 67, 67, 67, 67, 67, 1588, 67, 67, 67, 67, 67, 67, 67, 0, 1300, 0, 0, 0, 1306, 0, 0, 0, 97, 97, 97, 1506, 97, 97, 97, 97, 97, 97, 97, 97, 1512, 97, 97, 97, 0, 1728, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 901, 97, 97, 97, 97, 1515, 97, 1517, 97, 97, 97, 97, 97, 97, 1521, 97, 97, 97, 97, 97, 97, 0, 45, 1652, 45, 45, 45, 1655, 45, 45, 45, 45, 45, 1542, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1552, 1553, 45, 45, 45, 1556, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 693, 45, 45, 45, 67, 67, 67, 67, 1572, 67, 67, 67, 67, 1576, 67, 67, 67, 67, 67, 67, 67, 67, 1602, 67, 67, 1605, 67, 67, 67, 0, 67, 1582, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1580, 67, 67, 1596, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 542, 0, 544, 67, 67, 67, 67, 1759, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 533, 67, 67, 67, 67, 67, 67, 67, 1770, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 1777, 97, 97, 97, 1793, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 998, 45, 45, 1001, 1002, 45, 45, 67, 67, 45, 1861, 45, 67, 67, 67, 67, 67, 67, 67, 67, 1871, 67, 1873, 1874, 67, 0, 97, 45, 67, 0, 97, 45, 67, 16384, 97, 45, 67, 97, 0, 0, 0, 1473, 0, 1082, 0, 0, 0, 1475, 0, 1086, 0, 0, 0, 1477, 1876, 67, 97, 97, 97, 97, 97, 1883, 0, 1885, 97, 97, 97, 1889, 0, 0, 0, 286, 0, 0, 0, 286, 0, 2367488, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 40976, 0, 18, 18, 24, 24, 126, 126, 126, 2053, 0, 2055, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 97, 97, 2039, 97, 45, 45, 45, 45, 67, 67, 67, 67, 67, 226, 67, 67, 67, 67, 67, 67, 67, 67, 1246, 67, 67, 1249, 1250, 67, 67, 67, 132, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 141, 45, 45, 45, 1403, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1186, 45, 45, 1189, 45, 45, 155, 45, 45, 45, 45, 45, 45, 45, 45, 45, 191, 45, 45, 45, 45, 700, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1753, 45, 45, 45, 67, 67, 45, 45, 67, 208, 67, 67, 67, 222, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1764, 67, 67, 67, 67, 67, 67, 67, 258, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 288, 97, 97, 97, 302, 97, 97, 97, 97, 97, 97, 97, 97, 97, 627, 97, 97, 97, 97, 97, 97, 338, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 370, 45, 45, 45, 45, 716, 45, 45, 45, 45, 45, 722, 45, 45, 45, 45, 45, 45, 1912, 67, 67, 67, 67, 67, 67, 67, 67, 67, 819, 67, 67, 25398, 542, 13112, 544, 45, 403, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1409, 45, 67, 67, 67, 67, 489, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 771, 67, 67, 67, 67, 520, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 534, 67, 67, 67, 67, 67, 67, 1271, 67, 67, 67, 1274, 67, 67, 67, 1279, 67, 67, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 97, 553, 97, 97, 97, 97, 586, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1138, 97, 97, 97, 97, 617, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 631, 97, 97, 97, 0, 1834, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 353, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 45, 668, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 724, 45, 45, 45, 45, 45, 682, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 949, 45, 45, 45, 67, 67, 747, 748, 67, 67, 67, 67, 755, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 1302, 0, 0, 0, 1308, 0, 67, 794, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1701, 67, 97, 97, 97, 845, 846, 97, 97, 97, 97, 853, 97, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 97, 97, 892, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 610, 97, 97, 45, 992, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 1239, 67, 67, 67, 1063, 67, 67, 67, 67, 67, 1068, 67, 67, 67, 67, 67, 67, 67, 0, 0, 1301, 0, 0, 0, 1307, 0, 0, 97, 1141, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1152, 97, 97, 0, 0, 97, 97, 2001, 0, 97, 2003, 97, 97, 97, 45, 45, 45, 1739, 45, 45, 45, 1742, 45, 45, 45, 45, 45, 97, 97, 97, 97, 1157, 97, 97, 97, 97, 97, 1162, 97, 97, 97, 97, 97, 97, 1145, 97, 97, 97, 97, 97, 1151, 97, 97, 97, 1253, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 539, 45, 1423, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1431, 67, 67, 67, 67, 67, 67, 67, 1695, 67, 67, 67, 67, 67, 1700, 67, 1702, 67, 67, 1439, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 514, 67, 67, 97, 97, 1492, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 611, 97, 97, 1703, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 97, 97, 852, 97, 97, 97, 97, 97, 97, 45, 1949, 45, 1951, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 1961, 67, 0, 97, 45, 67, 0, 97, 2060, 2061, 0, 2062, 45, 67, 97, 0, 0, 2036, 97, 97, 97, 97, 45, 45, 45, 45, 67, 67, 67, 67, 67, 223, 67, 67, 237, 67, 67, 67, 67, 67, 67, 67, 1272, 67, 67, 67, 67, 67, 67, 67, 67, 507, 67, 67, 67, 67, 67, 67, 67, 1963, 67, 67, 67, 97, 97, 97, 97, 0, 1972, 0, 97, 97, 97, 1975, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 931, 45, 45, 45, 45, 45, 407, 45, 45, 45, 45, 45, 45, 45, 45, 45, 417, 45, 45, 1989, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1996, 97, 18, 131427, 0, 0, 360, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 930, 45, 45, 45, 45, 45, 45, 444, 45, 45, 45, 45, 45, 45, 45, 67, 67, 97, 97, 1998, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1985, 45, 1986, 45, 45, 45, 156, 45, 45, 170, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 675, 45, 45, 45, 45, 679, 131427, 0, 358, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 381, 45, 45, 45, 45, 45, 45, 45, 45, 45, 400, 45, 45, 419, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 436, 67, 67, 67, 67, 67, 505, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 820, 67, 25398, 542, 13112, 544, 67, 67, 522, 67, 67, 67, 67, 67, 529, 67, 67, 67, 67, 67, 67, 67, 0, 1299, 0, 0, 0, 1305, 0, 0, 0, 97, 97, 619, 97, 97, 97, 97, 97, 626, 97, 97, 97, 97, 97, 97, 97, 1105, 97, 97, 97, 97, 1109, 97, 97, 97, 67, 67, 67, 67, 749, 67, 67, 67, 67, 67, 67, 67, 67, 67, 760, 67, 0, 97, 45, 67, 2058, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 97, 97, 97, 97, 45, 45, 45, 2041, 67, 67, 67, 67, 67, 780, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 516, 67, 67, 97, 97, 97, 878, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1629, 97, 0, 45, 979, 45, 45, 45, 45, 984, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1198, 45, 45, 45, 45, 45, 45, 67, 1023, 67, 67, 67, 67, 1028, 67, 67, 67, 67, 67, 67, 67, 67, 67, 470, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 1094, 0, 0, 0, 1092, 1315, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1486, 97, 1489, 97, 97, 97, 1117, 97, 97, 97, 97, 1122, 97, 97, 97, 97, 97, 97, 97, 1146, 97, 97, 97, 97, 97, 97, 97, 97, 881, 97, 97, 97, 886, 97, 97, 97, 1311, 0, 0, 0, 0, 0, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1615, 97, 97, 97, 97, 97, 1619, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1631, 97, 97, 1847, 97, 45, 45, 45, 45, 1852, 45, 45, 45, 45, 45, 45, 45, 1235, 45, 45, 45, 67, 67, 67, 67, 67, 1868, 67, 67, 67, 1872, 67, 67, 67, 67, 67, 97, 97, 97, 97, 1882, 0, 0, 0, 97, 97, 97, 97, 0, 1891, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 1929, 0, 0, 97, 97, 97, 97, 97, 97, 45, 1900, 45, 1901, 45, 45, 45, 1905, 45, 67, 2054, 97, 45, 67, 0, 97, 45, 67, 0, 97, 45, 67, 97, 0, 0, 97, 2037, 2038, 97, 97, 45, 45, 45, 45, 67, 67, 67, 67, 1867, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1774, 97, 97, 97, 97, 97, 97, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 142, 45, 45, 45, 1412, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 432, 45, 45, 45, 45, 45, 157, 45, 45, 171, 45, 45, 45, 182, 45, 45, 45, 45, 200, 45, 45, 45, 1543, 45, 45, 45, 45, 45, 45, 45, 45, 1551, 45, 45, 45, 45, 1181, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1211, 45, 45, 45, 1214, 45, 45, 45, 67, 209, 67, 67, 67, 224, 67, 67, 238, 67, 67, 67, 249, 67, 0, 97, 2056, 2057, 0, 2059, 45, 67, 0, 97, 45, 67, 97, 0, 0, 1937, 97, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1741, 45, 45, 45, 45, 45, 45, 67, 67, 67, 267, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 289, 97, 97, 97, 304, 97, 97, 318, 97, 97, 97, 329, 97, 97, 0, 0, 97, 1783, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 45, 2026, 45, 45, 45, 45, 67, 2030, 67, 67, 67, 67, 67, 67, 1041, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1044, 67, 67, 67, 67, 67, 67, 97, 97, 347, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 45, 666, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1420, 45, 57889, 0, 0, 54074, 54074, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 840, 67, 1007, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 759, 67, 67, 67, 67, 67, 67, 67, 1052, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1031, 67, 67, 67, 67, 67, 97, 97, 97, 1101, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 592, 97, 97, 97, 1190, 45, 45, 45, 45, 45, 1195, 45, 1197, 45, 45, 45, 45, 1201, 45, 45, 45, 45, 1952, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 250, 67, 67, 67, 1255, 67, 1257, 67, 67, 67, 67, 1261, 67, 67, 67, 67, 67, 67, 67, 67, 1685, 67, 67, 67, 67, 67, 67, 67, 0, 24851, 12565, 0, 0, 0, 0, 28809, 53532, 67, 67, 1267, 67, 67, 67, 67, 67, 67, 1273, 67, 67, 67, 67, 67, 67, 67, 67, 1696, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 2162688, 0, 0, 1281, 67, 67, 67, 67, 1285, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1070, 67, 67, 67, 67, 67, 1335, 97, 1337, 97, 97, 97, 97, 1341, 97, 97, 97, 97, 97, 97, 97, 97, 882, 97, 97, 97, 97, 97, 97, 97, 1347, 97, 97, 97, 97, 97, 97, 1353, 97, 97, 97, 97, 97, 97, 1361, 97, 18, 131427, 0, 638, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 544, 0, 550, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2473984, 2158592, 2158592, 2158592, 2990080, 2158592, 2158592, 2207744, 2207744, 2482176, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 2207744, 0, 0, 0, 0, 0, 0, 2162688, 0, 53530, 97, 97, 97, 1365, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 608, 97, 97, 97, 45, 45, 1424, 45, 1425, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1058, 67, 67, 67, 67, 45, 1555, 45, 45, 1557, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 707, 45, 45, 45, 45, 67, 67, 1570, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 773, 67, 67, 1595, 67, 67, 1597, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 139, 2158592, 2158592, 2158592, 2404352, 2412544, 97, 97, 97, 1636, 97, 97, 97, 1639, 97, 97, 1641, 97, 97, 97, 97, 97, 97, 1173, 0, 921, 0, 0, 0, 0, 0, 0, 45, 67, 67, 67, 1693, 67, 67, 67, 67, 67, 67, 67, 1698, 67, 67, 67, 67, 67, 67, 67, 1773, 67, 97, 97, 97, 97, 97, 97, 97, 625, 97, 97, 97, 97, 97, 97, 97, 97, 850, 97, 97, 97, 97, 97, 97, 97, 97, 880, 97, 97, 97, 97, 97, 97, 97, 97, 1106, 97, 97, 97, 97, 97, 97, 97, 1860, 45, 45, 67, 67, 1865, 67, 67, 67, 67, 1870, 67, 67, 67, 67, 1875, 67, 67, 97, 97, 1880, 97, 97, 0, 0, 0, 97, 97, 1888, 97, 0, 0, 0, 1938, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 1854, 45, 45, 45, 45, 45, 45, 45, 1909, 45, 45, 1911, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1248, 67, 67, 67, 67, 67, 67, 1922, 67, 67, 1924, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 1898, 45, 45, 45, 45, 45, 45, 1904, 45, 45, 67, 67, 67, 67, 97, 97, 97, 97, 0, 0, 16384, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 1724, 2008, 2009, 45, 45, 67, 67, 67, 2014, 2015, 67, 67, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 2022, 0, 2023, 97, 97, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1869, 67, 67, 67, 67, 67, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 147, 151, 154, 45, 162, 45, 45, 176, 178, 181, 45, 45, 45, 192, 196, 45, 45, 45, 45, 2012, 67, 67, 67, 67, 67, 67, 2018, 97, 0, 0, 97, 1978, 97, 97, 97, 1982, 45, 45, 45, 45, 45, 45, 45, 45, 45, 972, 973, 45, 45, 45, 45, 45, 67, 259, 263, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 294, 298, 301, 97, 309, 97, 97, 323, 325, 328, 97, 97, 97, 97, 97, 560, 97, 97, 97, 569, 97, 97, 97, 97, 97, 97, 306, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1624, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 1175, 0, 0, 0, 0, 45, 339, 343, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 67, 67, 503, 67, 67, 67, 67, 67, 67, 67, 67, 67, 512, 67, 67, 519, 97, 97, 600, 97, 97, 97, 97, 97, 97, 97, 97, 97, 609, 97, 97, 616, 45, 649, 45, 45, 45, 45, 45, 654, 45, 45, 45, 45, 45, 45, 45, 45, 1393, 45, 45, 45, 45, 45, 45, 45, 45, 1209, 45, 45, 45, 45, 45, 45, 45, 67, 763, 67, 67, 67, 67, 67, 67, 67, 67, 770, 67, 67, 67, 774, 67, 0, 2045, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 994, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 213, 67, 219, 67, 67, 232, 67, 242, 67, 247, 67, 67, 67, 779, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1018, 67, 67, 67, 67, 811, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 57889, 0, 0, 54074, 54074, 550, 0, 97, 834, 97, 97, 97, 97, 97, 839, 97, 18, 131427, 0, 638, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 645, 97, 97, 861, 97, 97, 97, 97, 97, 97, 97, 97, 868, 97, 97, 97, 872, 97, 97, 877, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 613, 97, 97, 97, 97, 97, 909, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 0, 18, 18, 24, 24, 27, 27, 27, 1036, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1047, 67, 67, 67, 1050, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1033, 67, 67, 67, 97, 97, 1130, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 638, 0, 0, 67, 67, 67, 1295, 67, 67, 67, 0, 0, 0, 0, 0, 0, 0, 0, 0, 97, 1317, 97, 97, 97, 97, 97, 97, 1375, 97, 97, 97, 0, 0, 0, 45, 1379, 45, 45, 45, 45, 45, 45, 422, 45, 45, 45, 429, 431, 45, 45, 45, 45, 0, 1090, 0, 0, 97, 1479, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1357, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1716, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1723, 0, 921, 29315, 0, 0, 0, 0, 45, 929, 45, 45, 45, 45, 45, 45, 45, 1392, 45, 45, 45, 45, 45, 45, 45, 45, 45, 960, 45, 45, 45, 45, 45, 45, 97, 97, 97, 1738, 45, 45, 45, 45, 45, 45, 45, 1743, 45, 45, 45, 45, 166, 45, 45, 45, 45, 184, 186, 45, 45, 197, 45, 45, 97, 1779, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 18, 131427, 0, 638, 0, 0, 0, 0, 362, 0, 640, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1537, 45, 45, 45, 45, 45, 1803, 45, 45, 45, 45, 45, 1809, 45, 45, 45, 67, 67, 67, 1814, 67, 67, 67, 67, 67, 67, 1821, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 0, 67, 67, 67, 1818, 67, 67, 67, 67, 67, 1824, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 1890, 0, 1829, 97, 97, 0, 0, 97, 97, 1836, 97, 97, 0, 0, 0, 97, 97, 97, 97, 1981, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1987, 1845, 97, 97, 97, 45, 45, 45, 45, 45, 1853, 45, 45, 45, 1857, 45, 45, 45, 67, 1864, 67, 1866, 67, 67, 67, 67, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 97, 97, 1710, 1711, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 1886, 97, 97, 97, 0, 0, 97, 97, 97, 97, 1838, 0, 0, 0, 97, 1843, 97, 0, 1893, 97, 97, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1745, 45, 45, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 1931, 97, 97, 97, 97, 97, 588, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 629, 97, 97, 97, 97, 97, 67, 2044, 0, 97, 97, 97, 97, 45, 45, 67, 67, 0, 0, 97, 97, 45, 45, 45, 1660, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 453, 45, 455, 67, 67, 67, 67, 268, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 348, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 359, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 421, 45, 45, 45, 45, 45, 45, 45, 434, 45, 45, 695, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1667, 45, 0, 921, 29315, 0, 925, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1811, 45, 67, 67, 67, 67, 67, 67, 1037, 67, 1039, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1277, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 1095, 0, 0, 0, 1096, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 869, 97, 97, 97, 97, 97, 97, 1131, 97, 1133, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1370, 97, 97, 97, 97, 97, 1312, 0, 0, 0, 0, 1096, 0, 0, 0, 97, 97, 97, 97, 97, 97, 97, 1327, 97, 97, 97, 97, 97, 1332, 97, 97, 97, 1830, 97, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 1896, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1548, 45, 45, 45, 45, 45, 45, 133, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 45, 380, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 401, 45, 45, 158, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1200, 45, 45, 45, 45, 206, 67, 67, 67, 67, 67, 225, 67, 67, 67, 67, 67, 67, 67, 67, 754, 67, 67, 67, 67, 67, 67, 67, 57889, 0, 0, 54074, 54074, 550, 832, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1342, 97, 97, 97, 97, 97, 97, 67, 67, 67, 67, 67, 25398, 1083, 13112, 1087, 54074, 1091, 0, 0, 0, 0, 0, 0, 1316, 0, 831, 97, 97, 97, 97, 97, 97, 97, 1174, 921, 0, 1175, 0, 0, 0, 0, 45, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 45, 148, 67, 67, 264, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 97, 295, 97, 97, 97, 97, 313, 97, 97, 97, 97, 331, 333, 97, 18, 131427, 356, 638, 0, 0, 0, 0, 362, 0, 0, 365, 0, 367, 0, 45, 45, 1530, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 988, 45, 45, 45, 97, 344, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 402, 404, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1756, 67, 438, 45, 45, 45, 45, 45, 45, 45, 45, 449, 450, 45, 45, 45, 67, 67, 214, 218, 221, 67, 229, 67, 67, 243, 245, 248, 67, 67, 67, 67, 67, 488, 490, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1071, 67, 1073, 67, 67, 67, 67, 67, 524, 67, 67, 67, 67, 67, 67, 67, 67, 535, 536, 67, 67, 67, 67, 67, 67, 1683, 1684, 67, 67, 67, 67, 1688, 1689, 67, 67, 67, 67, 67, 67, 1586, 67, 67, 67, 67, 67, 67, 67, 67, 67, 469, 67, 67, 67, 67, 67, 67, 97, 97, 97, 585, 587, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1163, 97, 97, 97, 97, 97, 97, 97, 621, 97, 97, 97, 97, 97, 97, 97, 97, 632, 633, 97, 97, 0, 0, 1782, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 712, 45, 45, 45, 717, 45, 45, 45, 45, 45, 45, 45, 45, 725, 45, 45, 45, 163, 167, 173, 177, 45, 45, 45, 45, 45, 193, 45, 45, 45, 45, 982, 45, 45, 45, 45, 45, 45, 987, 45, 45, 45, 45, 45, 1558, 45, 1560, 45, 45, 45, 45, 45, 45, 45, 45, 704, 705, 45, 45, 45, 45, 45, 45, 45, 45, 731, 45, 45, 45, 67, 67, 67, 67, 67, 739, 67, 67, 67, 67, 67, 67, 273, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 67, 67, 67, 764, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1290, 67, 67, 67, 67, 67, 67, 812, 67, 67, 67, 67, 818, 67, 67, 67, 25398, 542, 13112, 544, 57889, 0, 0, 54074, 54074, 550, 0, 97, 97, 97, 97, 97, 837, 97, 97, 97, 97, 97, 602, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1137, 97, 97, 97, 97, 97, 97, 97, 97, 97, 862, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1627, 97, 97, 97, 0, 97, 97, 97, 97, 910, 97, 97, 97, 97, 916, 97, 97, 97, 0, 0, 0, 97, 97, 1940, 97, 97, 1942, 45, 45, 45, 45, 45, 45, 385, 45, 45, 45, 45, 395, 45, 45, 45, 45, 966, 45, 969, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 975, 45, 45, 45, 406, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 974, 45, 45, 45, 67, 67, 67, 67, 1010, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1262, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1040, 67, 1042, 67, 1045, 67, 67, 67, 67, 67, 67, 67, 97, 1706, 97, 97, 97, 1709, 97, 97, 97, 67, 67, 67, 67, 1051, 67, 67, 67, 67, 67, 1057, 67, 67, 67, 67, 67, 67, 67, 1443, 67, 67, 1446, 67, 67, 67, 67, 67, 67, 67, 1297, 0, 0, 0, 1303, 0, 0, 0, 1309, 67, 67, 67, 67, 1079, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2207744, 2207744, 2207744, 2207744, 2207744, 2572288, 2207744, 2207744, 2207744, 1098, 97, 97, 97, 97, 97, 1104, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1356, 97, 97, 97, 97, 97, 97, 1128, 97, 97, 97, 97, 97, 97, 1134, 97, 1136, 97, 1139, 97, 97, 97, 97, 97, 97, 1622, 97, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 0, 0, 1176, 0, 646, 45, 67, 67, 67, 1268, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1469, 67, 67, 67, 97, 1348, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1127, 97, 67, 1569, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1448, 1449, 67, 1816, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1825, 67, 67, 1827, 97, 97, 0, 1781, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 1831, 0, 0, 97, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 1980, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1395, 45, 45, 45, 45, 45, 97, 1846, 97, 97, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1212, 45, 45, 45, 45, 45, 45, 2010, 45, 67, 67, 67, 67, 67, 2016, 67, 97, 97, 0, 0, 97, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 2007, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 143, 45, 45, 45, 1671, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 1813, 67, 67, 1815, 45, 45, 67, 210, 67, 67, 67, 67, 67, 67, 239, 67, 67, 67, 67, 67, 67, 67, 1454, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1445, 67, 67, 67, 67, 67, 67, 97, 97, 290, 97, 97, 97, 97, 97, 97, 319, 97, 97, 97, 97, 97, 97, 303, 97, 97, 317, 97, 97, 97, 97, 97, 97, 305, 97, 97, 97, 97, 97, 97, 97, 97, 97, 899, 97, 97, 97, 97, 97, 97, 375, 45, 45, 45, 379, 45, 45, 390, 45, 45, 394, 45, 45, 45, 45, 45, 443, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 461, 67, 67, 67, 465, 67, 67, 476, 67, 67, 480, 67, 67, 67, 67, 67, 67, 1694, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1288, 67, 67, 67, 67, 67, 67, 500, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1075, 97, 97, 97, 558, 97, 97, 97, 562, 97, 97, 573, 97, 97, 577, 97, 97, 97, 97, 97, 895, 97, 97, 97, 97, 97, 97, 903, 97, 97, 97, 0, 97, 97, 1638, 97, 97, 97, 97, 97, 97, 97, 97, 1646, 597, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1334, 45, 681, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1396, 45, 45, 1399, 45, 45, 730, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1434, 67, 67, 67, 67, 67, 67, 750, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1456, 67, 67, 67, 67, 67, 45, 45, 993, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 1238, 67, 67, 1006, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1280, 1048, 1049, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1059, 67, 67, 67, 67, 67, 67, 1286, 67, 67, 67, 67, 67, 67, 67, 1291, 67, 97, 97, 1100, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 638, 0, 920, 97, 97, 1142, 1143, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1153, 97, 97, 97, 97, 97, 1158, 97, 97, 97, 1161, 97, 97, 97, 97, 1166, 97, 97, 97, 97, 97, 1325, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1328, 97, 97, 97, 97, 97, 97, 97, 45, 1218, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1678, 45, 45, 45, 67, 67, 67, 67, 67, 1269, 67, 67, 67, 67, 67, 67, 67, 67, 1278, 67, 67, 67, 67, 67, 67, 1761, 67, 67, 67, 67, 67, 67, 67, 67, 67, 530, 67, 67, 67, 67, 67, 67, 97, 97, 1349, 97, 97, 97, 97, 97, 97, 97, 97, 1358, 97, 97, 97, 97, 97, 97, 1623, 97, 97, 97, 97, 97, 97, 97, 97, 0, 921, 0, 0, 926, 0, 0, 0, 45, 45, 1411, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1754, 45, 45, 67, 67, 1301, 0, 1307, 0, 1313, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 21054, 97, 97, 97, 97, 67, 1757, 67, 67, 67, 1760, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1467, 67, 67, 67, 67, 67, 1778, 97, 0, 0, 97, 97, 97, 97, 97, 97, 0, 0, 97, 97, 0, 97, 97, 97, 97, 97, 1352, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1511, 97, 97, 97, 97, 97, 67, 67, 67, 67, 67, 1820, 67, 1822, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 97, 1933, 97, 1892, 97, 97, 97, 97, 97, 97, 1899, 45, 45, 45, 45, 45, 45, 45, 45, 1664, 45, 45, 45, 45, 45, 45, 45, 45, 1546, 45, 45, 45, 45, 45, 45, 45, 45, 1208, 45, 45, 45, 45, 45, 45, 45, 45, 1224, 45, 45, 45, 45, 45, 45, 45, 45, 673, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 1925, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 97, 623, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 307, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1796, 97, 45, 45, 45, 45, 45, 45, 45, 970, 45, 45, 45, 45, 45, 45, 45, 45, 1417, 45, 45, 45, 45, 45, 45, 45, 67, 1964, 67, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 1721, 97, 97, 0, 0, 1997, 97, 0, 0, 2000, 97, 97, 0, 97, 97, 97, 97, 97, 45, 45, 45, 45, 733, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 803, 67, 67, 67, 67, 67, 0, 94242, 0, 0, 0, 38, 102439, 0, 0, 106538, 98347, 28809, 45, 45, 144, 45, 45, 45, 1805, 45, 1807, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 231, 67, 67, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 45, 45, 67, 211, 67, 67, 67, 67, 230, 234, 240, 244, 67, 67, 67, 67, 67, 67, 464, 67, 67, 67, 67, 67, 67, 479, 67, 67, 67, 260, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 97, 291, 97, 97, 97, 97, 310, 314, 320, 324, 97, 97, 97, 97, 97, 97, 1367, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1355, 97, 97, 97, 97, 97, 97, 1362, 340, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0, 360, 0, 362, 0, 365, 28809, 367, 139, 369, 45, 45, 45, 374, 67, 67, 460, 67, 67, 67, 67, 466, 67, 67, 67, 67, 67, 67, 67, 67, 801, 67, 67, 67, 67, 67, 67, 67, 67, 67, 487, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 498, 67, 67, 67, 67, 67, 67, 1772, 67, 67, 97, 97, 97, 97, 97, 97, 97, 0, 921, 922, 1175, 0, 0, 0, 0, 45, 67, 502, 67, 67, 67, 67, 67, 67, 67, 508, 67, 67, 67, 515, 517, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 0, 0, 1932, 97, 97, 0, 1999, 97, 97, 97, 0, 97, 97, 2004, 2005, 97, 45, 45, 45, 45, 1193, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 676, 45, 45, 45, 45, 67, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 552, 97, 97, 97, 97, 97, 1377, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 655, 45, 45, 45, 45, 45, 45, 45, 97, 97, 557, 97, 97, 97, 97, 563, 97, 97, 97, 97, 97, 97, 97, 97, 1135, 97, 97, 97, 97, 97, 97, 97, 97, 97, 584, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 595, 97, 97, 97, 97, 97, 911, 97, 97, 97, 97, 97, 97, 97, 638, 0, 0, 0, 0, 1315, 0, 0, 0, 0, 97, 97, 97, 1319, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 1733, 97, 97, 97, 97, 97, 97, 1340, 97, 97, 97, 1343, 97, 97, 1345, 97, 1346, 97, 599, 97, 97, 97, 97, 97, 97, 97, 605, 97, 97, 97, 612, 614, 97, 97, 97, 97, 97, 1794, 97, 97, 97, 45, 45, 45, 45, 45, 45, 45, 1207, 45, 45, 45, 45, 45, 45, 1213, 45, 45, 745, 67, 67, 67, 67, 751, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1577, 67, 67, 67, 67, 67, 762, 67, 67, 67, 67, 766, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1765, 67, 67, 67, 67, 67, 777, 67, 67, 781, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1592, 1593, 67, 67, 97, 843, 97, 97, 97, 97, 849, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1510, 97, 97, 97, 97, 97, 97, 97, 860, 97, 97, 97, 97, 864, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1797, 45, 45, 45, 45, 1801, 45, 97, 875, 97, 97, 879, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1522, 97, 97, 97, 97, 97, 991, 45, 45, 45, 45, 996, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 215, 67, 67, 67, 67, 233, 67, 67, 67, 67, 251, 253, 1022, 67, 67, 67, 1026, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1035, 67, 67, 1038, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1458, 67, 67, 67, 67, 67, 1064, 67, 67, 67, 1067, 67, 67, 67, 67, 1072, 67, 67, 67, 67, 67, 67, 1296, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2367488, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 1096, 0, 921, 29315, 0, 0, 0, 0, 928, 45, 45, 45, 45, 45, 934, 45, 45, 45, 164, 45, 45, 45, 45, 45, 45, 45, 45, 45, 198, 45, 45, 45, 378, 45, 45, 45, 45, 45, 45, 393, 45, 45, 45, 398, 45, 97, 97, 1116, 97, 97, 97, 1120, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1147, 1148, 97, 97, 97, 97, 97, 97, 97, 1129, 97, 97, 1132, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1626, 97, 97, 97, 97, 0, 45, 1178, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1185, 45, 45, 45, 45, 441, 45, 45, 45, 45, 45, 45, 451, 45, 45, 67, 67, 67, 67, 67, 227, 67, 67, 67, 67, 67, 67, 67, 67, 1260, 67, 67, 67, 1263, 67, 67, 1265, 1203, 45, 45, 1205, 45, 1206, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1216, 67, 1266, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1276, 67, 67, 67, 67, 67, 67, 492, 67, 67, 67, 67, 67, 67, 67, 67, 67, 471, 67, 67, 67, 67, 481, 67, 45, 1386, 45, 1389, 45, 45, 45, 45, 1394, 45, 45, 45, 1397, 45, 45, 45, 45, 995, 45, 997, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 1915, 67, 67, 67, 67, 67, 1422, 45, 45, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1433, 67, 1436, 67, 67, 67, 67, 1441, 67, 67, 67, 1444, 67, 67, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 281, 28809, 53531, 97, 97, 97, 97, 1494, 97, 97, 97, 1497, 97, 97, 97, 97, 97, 97, 97, 1368, 97, 97, 97, 97, 97, 97, 97, 97, 851, 97, 97, 97, 97, 97, 97, 97, 67, 67, 67, 1571, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 67, 67, 1583, 67, 67, 67, 67, 67, 67, 67, 67, 1591, 67, 67, 67, 67, 67, 67, 752, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1056, 67, 67, 67, 67, 67, 67, 97, 1634, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1125, 97, 97, 97, 1647, 97, 97, 97, 97, 97, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1183, 45, 45, 45, 45, 45, 45, 45, 45, 45, 409, 45, 45, 45, 45, 45, 45, 1658, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1668, 1712, 97, 97, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 0, 0, 1835, 97, 97, 97, 97, 0, 0, 0, 97, 97, 1844, 97, 97, 1726, 0, 97, 97, 97, 97, 97, 1732, 97, 1734, 97, 97, 97, 97, 97, 300, 97, 308, 97, 97, 97, 97, 97, 97, 97, 97, 866, 97, 97, 97, 97, 97, 97, 97, 67, 67, 67, 1758, 67, 67, 67, 1762, 67, 67, 67, 67, 67, 67, 67, 67, 1043, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1771, 67, 67, 67, 97, 97, 97, 97, 97, 1776, 97, 97, 97, 97, 297, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1108, 97, 97, 97, 97, 67, 67, 67, 1966, 97, 97, 97, 1970, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 97, 1720, 97, 97, 97, 97, 97, 0, 0, 97, 97, 97, 1837, 97, 0, 1840, 1841, 97, 97, 97, 1988, 45, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1994, 1995, 67, 97, 97, 97, 97, 97, 1103, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 917, 97, 97, 0, 0, 0, 67, 67, 265, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 345, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 131427, 0, 0, 0, 361, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 671, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 411, 45, 45, 414, 45, 45, 45, 45, 377, 45, 45, 45, 386, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1223, 45, 45, 45, 45, 45, 45, 45, 45, 45, 426, 45, 45, 433, 45, 45, 45, 67, 67, 67, 67, 67, 463, 67, 67, 67, 472, 67, 67, 67, 67, 67, 67, 67, 527, 67, 67, 67, 67, 67, 67, 537, 67, 540, 24850, 24850, 12564, 12564, 0, 57889, 0, 0, 0, 53531, 53531, 367, 286, 97, 97, 97, 97, 97, 1119, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1509, 97, 97, 97, 97, 97, 97, 97, 97, 564, 97, 97, 97, 97, 97, 97, 97, 637, 18, 131427, 0, 0, 0, 0, 0, 0, 362, 0, 0, 365, 29315, 367, 0, 921, 29315, 0, 0, 0, 927, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1234, 45, 45, 45, 45, 67, 67, 67, 67, 1240, 45, 697, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 708, 45, 45, 45, 45, 1221, 45, 45, 45, 45, 1225, 45, 45, 45, 45, 45, 45, 384, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1210, 45, 45, 45, 45, 45, 45, 67, 67, 795, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1470, 67, 67, 67, 67, 67, 67, 67, 815, 67, 67, 67, 67, 67, 67, 25398, 542, 13112, 544, 97, 97, 97, 893, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1164, 97, 97, 97, 67, 67, 67, 1025, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1687, 67, 67, 67, 67, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 0, 0, 0, 1097, 1241, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1450, 45, 45, 1388, 45, 1390, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1236, 67, 67, 67, 67, 67, 1437, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1472, 1490, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1503, 67, 67, 67, 67, 67, 97, 97, 97, 97, 97, 0, 1930, 0, 97, 97, 97, 97, 97, 847, 97, 97, 97, 97, 97, 97, 97, 97, 97, 858, 67, 67, 1965, 67, 97, 97, 97, 97, 0, 0, 0, 97, 97, 97, 97, 0, 97, 97, 1719, 97, 97, 97, 97, 97, 97, 0, 0, 0, 45, 45, 45, 45, 1382, 45, 1383, 45, 45, 45, 159, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1563, 45, 45, 45, 45, 45, 67, 261, 67, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 341, 97, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 97, 1099, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1333, 97, 1230, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 67, 1992, 67, 1993, 67, 67, 67, 97, 97, 45, 45, 160, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1665, 45, 45, 45, 45, 45, 131427, 357, 0, 0, 0, 362, 0, 365, 28809, 367, 139, 45, 45, 45, 45, 45, 684, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 412, 45, 45, 45, 416, 45, 45, 45, 440, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 67, 67, 1990, 67, 1991, 67, 67, 67, 67, 67, 67, 67, 97, 97, 1707, 97, 97, 97, 97, 97, 97, 501, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1691, 67, 67, 67, 67, 67, 526, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1030, 67, 1032, 67, 67, 67, 67, 598, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1632, 0, 921, 29315, 923, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1404, 45, 45, 45, 45, 45, 45, 45, 45, 45, 425, 45, 45, 45, 45, 45, 45, 67, 67, 67, 67, 67, 25398, 0, 13112, 0, 54074, 0, 0, 1093, 0, 0, 0, 0, 0, 97, 1609, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1369, 97, 97, 97, 1372, 97, 97, 67, 67, 266, 67, 67, 67, 67, 0, 24850, 12564, 0, 0, 0, 0, 28809, 53531, 97, 346, 97, 97, 97, 97, 0, 40976, 0, 18, 18, 24, 24, 27, 27, 27, 665, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1677, 45, 45, 45, 45, 67, 45, 45, 954, 45, 956, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1545, 45, 45, 45, 45, 45, 45, 45, 45, 45, 448, 45, 45, 45, 45, 67, 456, 67, 67, 67, 67, 67, 1270, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1069, 67, 67, 67, 67, 67, 67, 97, 97, 97, 1350, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1524, 97, 97, 97, 97, 97, 97, 97, 1376, 0, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 1559, 1561, 45, 45, 45, 1564, 45, 1566, 1567, 45, 67, 67, 67, 67, 67, 1573, 67, 67, 67, 67, 67, 67, 67, 67, 67, 67, 1247, 67, 67, 67, 67, 67, 1252, 97, 1725, 97, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1628, 97, 1630, 0, 0, 94242, 0, 0, 0, 2211840, 0, 1118208, 0, 0, 0, 0, 2158592, 2158731, 2158592, 2158592, 2158592, 3117056, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3018752, 2158592, 3043328, 2158592, 2158592, 2158592, 2158592, 3080192, 2158592, 2158592, 3112960, 2158592, 2158592, 2158592, 2158592, 2158592, 2158878, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2605056, 2158592, 2158592, 2207744, 0, 542, 0, 544, 0, 0, 2166784, 0, 0, 0, 550, 0, 0, 2158592, 2158592, 2686976, 2158592, 2715648, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2867200, 2158592, 2904064, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 0, 94242, 0, 0, 0, 2211840, 0, 0, 1130496, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 3186688, 2158592, 0, 0, 139, 0, 0, 0, 139, 0, 2367488, 2207744, 0, 0, 0, 0, 176128, 0, 2166784, 0, 0, 0, 0, 0, 286, 2158592, 2158592, 3170304, 3174400, 2158592, 0, 0, 0, 2158592, 2158592, 2158592, 2158592, 2158592, 2424832, 2158592, 2158592, 2158592, 1508, 2158592, 2908160, 2158592, 2158592, 2158592, 2977792, 2158592, 2158592, 2158592, 2158592, 3039232, 2158592, 2158592, 2158592, 2158592, 2158592, 2158592, 3158016, 67, 24850, 24850, 12564, 12564, 0, 0, 0, 0, 0, 53531, 53531, 0, 286, 97, 97, 97, 97, 97, 1144, 97, 97, 97, 97, 97, 97, 97, 97, 97, 97, 1149, 97, 97, 97, 97, 1154, 57889, 0, 0, 0, 0, 550, 0, 97, 97, 97, 97, 97, 97, 97, 97, 97, 561, 97, 97, 97, 97, 97, 97, 576, 97, 97, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 139264, 0, 0, 139264, 0, 921, 29315, 0, 0, 926, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 719, 720, 45, 45, 45, 45, 45, 45, 45, 45, 685, 45, 45, 45, 45, 45, 45, 45, 45, 45, 942, 45, 45, 946, 45, 45, 45, 950, 45, 45, 0, 2146304, 2146304, 0, 0, 0, 0, 2224128, 2224128, 2224128, 2232320, 2232320, 2232320, 2232320, 0, 0, 1301, 0, 0, 0, 0, 0, 1307, 0, 0, 0, 0, 0, 1313, 0, 0, 0, 0, 0, 0, 0, 97, 97, 1318, 97, 97, 97, 97, 97, 97, 1795, 97, 97, 45, 45, 45, 45, 45, 45, 45, 446, 45, 45, 45, 45, 45, 45, 67, 67, 2158592, 2146304, 0, 0, 0, 0, 0, 0, 0, 2211840, 0, 0, 0, 0, 2158592, 0, 921, 29315, 0, 924, 0, 0, 45, 45, 45, 45, 45, 45, 45, 45, 45, 1000, 45, 45, 45, 45, 67, 67 +]; + +XQueryTokenizer.EXPECTED = +[ 290, 300, 304, 353, 296, 309, 305, 319, 315, 324, 328, 352, 354, 334, 338, 330, 320, 345, 349, 293, 358, 362, 341, 366, 312, 370, 374, 378, 382, 386, 390, 394, 398, 737, 402, 634, 439, 604, 634, 634, 634, 634, 408, 634, 634, 634, 404, 634, 634, 634, 457, 634, 634, 963, 634, 634, 413, 634, 634, 634, 634, 634, 634, 634, 663, 418, 422, 903, 902, 426, 431, 548, 634, 437, 521, 919, 443, 615, 409, 449, 455, 624, 731, 751, 634, 461, 465, 672, 470, 469, 474, 481, 485, 477, 489, 493, 629, 542, 497, 505, 603, 602, 991, 648, 510, 804, 634, 515, 958, 526, 525, 530, 768, 634, 546, 552, 711, 710, 593, 558, 562, 618, 566, 570, 574, 578, 582, 586, 590, 608, 612, 660, 822, 821, 634, 622, 596, 444, 628, 533, 724, 633, 640, 653, 647, 652, 536, 1008, 451, 450, 445, 657, 670, 676, 685, 689, 693, 697, 701, 704, 707, 715, 719, 798, 815, 634, 723, 762, 996, 634, 728, 969, 730, 735, 908, 634, 741, 679, 889, 511, 747, 634, 750, 755, 499, 666, 499, 501, 759, 772, 776, 780, 634, 787, 784, 797, 802, 809, 808, 427, 814, 1006, 517, 634, 519, 853, 634, 813, 850, 793, 634, 819, 826, 833, 832, 837, 843, 847, 857, 861, 863, 867, 871, 875, 879, 883, 643, 887, 539, 980, 979, 634, 893, 944, 634, 900, 896, 634, 907, 933, 506, 912, 917, 828, 433, 636, 635, 554, 961, 923, 930, 927, 937, 941, 634, 634, 634, 974, 948, 952, 985, 913, 968, 967, 743, 634, 973, 839, 634, 978, 599, 634, 984, 989, 765, 444, 995, 1000, 634, 1003, 790, 955, 1012, 681, 634, 634, 634, 634, 634, 414, 1016, 1020, 1024, 1085, 1027, 1090, 1090, 1046, 1080, 1137, 1108, 1215, 1049, 1032, 1039, 1085, 1085, 1085, 1085, 1058, 1062, 1068, 1085, 1086, 1090, 1090, 1091, 1072, 1064, 1107, 1090, 1090, 1090, 1118, 1123, 1138, 1078, 1074, 1084, 1085, 1085, 1085, 1087, 1090, 1062, 1052, 1060, 1114, 1062, 1104, 1085, 1085, 1090, 1090, 1028, 1122, 1063, 1128, 1139, 1127, 1158, 1085, 1085, 1151, 1090, 1090, 1090, 1095, 1090, 1132, 1073, 1136, 1143, 1061, 1150, 1085, 1155, 1098, 1101, 1146, 1162, 1169, 1101, 1185, 1151, 1090, 1110, 1173, 1054, 1087, 1109, 1177, 1165, 1089, 1204, 1184, 1107, 1189, 1193, 1088, 1197, 1180, 1201, 1208, 1042, 1212, 1219, 1223, 1227, 1231, 1235, 1245, 1777, 1527, 1686, 1686, 1238, 1686, 1254, 1686, 1686, 1686, 1294, 1669, 1686, 1686, 1686, 1322, 1625, 1534, 1268, 1624, 1275, 1281, 1443, 1292, 1300, 1686, 1686, 1686, 1350, 1826, 1306, 1686, 1686, 1240, 2032, 1317, 1321, 1686, 1686, 1253, 1686, 1326, 1686, 1686, 1686, 1418, 1709, 1446, 1686, 1686, 1686, 1492, 1686, 1295, 1447, 1686, 1686, 1258, 1686, 1736, 1686, 1686, 1520, 1355, 1686, 1288, 1348, 1361, 1686, 1359, 1686, 1364, 1498, 1368, 1302, 1362, 1381, 1389, 1395, 1486, 1686, 1371, 1377, 1370, 1686, 1375, 1382, 1384, 1402, 1408, 1385, 1383, 1619, 1413, 1423, 1428, 1433, 1686, 1686, 1270, 1686, 1338, 1686, 1440, 1686, 1686, 1686, 1499, 1465, 1686, 1686, 1686, 1639, 1473, 1884, 1686, 1686, 1293, 1864, 1686, 1686, 1296, 1321, 1483, 1686, 1686, 1686, 1646, 1686, 1748, 1496, 1686, 1418, 1675, 1686, 1418, 1702, 1686, 1418, 1981, 1686, 1429, 1409, 1427, 1504, 1692, 1686, 1686, 1313, 1448, 1651, 1508, 1686, 1686, 1340, 1686, 1903, 1686, 1686, 1435, 1513, 1686, 1283, 1287, 1519, 1686, 1524, 1363, 1568, 1938, 1539, 1566, 1579, 1479, 1533, 1538, 1553, 1544, 1552, 1557, 1563, 1574, 1557, 1583, 1589, 1590, 1759, 1594, 1603, 1607, 1611, 1686, 1436, 1514, 1686, 1434, 1656, 1686, 1434, 1680, 1686, 1453, 1686, 1686, 1686, 1559, 1617, 1686, 1770, 1418, 1623, 1769, 1629, 1686, 1515, 1335, 1686, 1285, 1686, 1671, 1921, 1650, 1686, 1686, 1344, 1308, 1666, 1686, 1686, 1686, 1659, 1685, 1686, 1686, 1686, 1686, 1241, 1686, 1686, 1844, 1691, 1686, 1630, 1977, 1970, 1362, 1686, 1686, 1686, 1693, 1698, 1686, 1686, 1686, 1697, 1686, 1764, 1715, 1686, 1634, 1638, 1686, 1599, 1585, 1686, 1271, 1686, 1269, 1686, 1721, 1686, 1686, 1354, 1686, 1801, 1686, 1799, 1686, 1640, 1686, 1686, 1461, 1686, 1686, 1732, 1686, 1944, 1686, 1740, 1686, 1746, 1415, 1396, 1686, 1598, 1547, 1417, 1597, 1416, 1577, 1546, 1397, 1577, 1547, 1548, 1570, 1398, 1753, 1686, 1652, 1509, 1686, 1686, 1686, 1757, 1686, 1419, 1686, 1763, 1418, 1768, 1781, 1686, 1686, 1686, 1705, 1686, 2048, 1792, 1686, 1686, 1686, 1735, 1686, 1797, 1686, 1686, 1404, 1686, 1639, 1815, 1686, 1686, 1418, 2017, 1820, 1686, 1686, 1803, 1686, 1686, 1686, 1736, 1489, 1686, 1686, 1825, 1338, 1260, 1263, 1686, 1686, 1785, 1686, 1686, 1728, 1686, 1686, 1749, 1497, 1830, 1830, 1262, 1248, 1261, 1329, 1260, 1264, 1329, 1248, 1249, 1259, 1540, 1849, 1842, 1686, 1686, 1835, 1686, 1686, 1816, 1686, 1686, 1831, 1882, 1848, 1686, 1686, 1686, 1774, 2071, 1854, 1686, 1686, 1469, 1884, 1686, 1821, 1859, 1686, 1686, 1350, 1883, 1686, 1686, 1686, 1781, 1391, 1875, 1686, 1686, 1613, 1644, 1686, 1686, 1889, 1686, 1686, 1662, 1884, 1686, 1885, 1890, 1686, 1686, 1686, 1894, 1686, 1686, 1678, 1686, 1907, 1686, 1686, 1529, 1914, 1686, 1838, 1686, 1686, 1881, 1686, 1686, 1872, 1876, 1836, 1919, 1686, 1837, 1692, 1910, 1686, 1925, 1928, 1742, 1686, 1811, 1811, 1930, 1810, 1929, 1935, 1928, 1900, 1942, 1867, 1868, 1931, 1035, 1788, 1948, 1952, 1956, 1960, 1964, 1686, 1976, 1686, 1686, 1686, 2065, 1686, 1992, 2037, 1686, 1686, 1998, 2009, 1972, 2002, 1686, 1686, 1686, 2077, 1300, 2023, 1686, 1686, 1686, 1807, 2031, 1686, 1686, 1686, 1860, 1500, 2032, 1686, 1686, 1686, 2083, 1686, 2036, 1686, 1277, 1276, 2042, 1877, 1686, 1686, 2041, 1686, 1686, 2027, 2037, 2012, 1686, 2012, 1855, 1850, 1686, 2046, 1686, 1686, 2054, 1996, 1686, 1897, 1309, 2059, 2052, 1686, 2058, 1686, 1686, 2081, 1686, 1717, 1477, 1686, 1331, 1686, 1686, 1687, 1686, 1860, 1681, 1686, 1686, 1686, 1966, 1724, 1686, 1686, 1686, 1984, 2015, 1686, 1686, 1686, 1988, 1686, 2063, 1686, 1686, 1686, 2005, 1686, 1727, 1686, 1686, 1711, 1457, 2069, 1686, 1686, 1686, 2019, 2075, 1686, 1686, 1915, 1686, 1686, 1793, 1874, 1686, 1686, 1491, 1362, 1449, 1686, 1686, 1460, 2098, 2087, 2091, 2095, 2184, 2102, 2113, 2780, 2117, 2134, 2142, 2281, 2146, 2146, 2146, 2304, 2296, 2181, 2639, 2591, 2872, 2592, 2873, 2313, 2195, 2200, 2281, 2146, 2273, 2226, 2204, 2152, 2219, 2276, 2167, 2177, 2276, 2235, 2276, 2276, 2230, 2281, 2276, 2296, 2276, 2293, 2276, 2276, 2276, 2276, 2234, 2276, 2311, 2314, 2210, 2199, 2217, 2222, 2276, 2276, 2276, 2240, 2276, 2294, 2276, 2276, 2173, 2276, 2198, 2281, 2281, 2281, 2281, 2282, 2146, 2146, 2146, 2146, 2205, 2146, 2204, 2248, 2276, 2235, 2276, 2297, 2276, 2276, 2276, 2277, 2256, 2281, 2283, 2146, 2146, 2146, 2275, 2276, 2295, 2276, 2276, 2293, 2146, 2304, 2264, 2269, 2221, 2276, 2276, 2276, 2293, 2295, 2276, 2276, 2276, 2295, 2263, 2205, 2268, 2220, 2172, 2276, 2276, 2276, 2296, 2276, 2276, 2296, 2294, 2276, 2276, 2278, 2281, 2281, 2280, 2281, 2281, 2281, 2283, 2206, 2223, 2276, 2276, 2279, 2281, 2281, 2146, 2273, 2276, 2276, 2281, 2281, 2281, 2276, 2292, 2276, 2298, 2225, 2276, 2298, 2169, 2224, 2292, 2298, 2171, 2229, 2281, 2281, 2171, 2236, 2281, 2281, 2281, 2146, 2275, 2225, 2292, 2299, 2276, 2229, 2281, 2146, 2276, 2290, 2297, 2283, 2146, 2146, 2274, 2224, 2227, 2298, 2225, 2297, 2276, 2230, 2170, 2230, 2282, 2146, 2147, 2151, 2156, 2288, 2276, 2230, 2303, 2308, 2236, 2284, 2228, 2318, 2318, 2318, 2326, 2335, 2339, 2343, 2349, 2416, 2693, 2357, 2592, 2109, 2592, 2592, 2162, 2943, 2823, 2646, 2592, 2361, 2592, 2122, 2592, 2592, 2122, 2470, 2592, 2592, 2592, 2109, 2107, 2592, 2592, 2592, 2123, 2592, 2592, 2592, 2125, 2592, 2413, 2592, 2592, 2592, 2127, 2592, 2592, 2414, 2592, 2592, 2592, 2130, 2952, 2592, 2594, 2592, 2592, 2212, 2609, 2252, 2592, 2592, 2592, 2446, 2434, 2592, 2592, 2592, 2212, 2446, 2450, 2456, 2431, 2435, 2592, 2592, 2243, 2478, 2448, 2439, 2946, 2592, 2592, 2592, 2368, 2809, 2813, 2450, 2441, 2212, 2812, 2449, 2440, 2947, 2592, 2592, 2592, 2345, 2451, 2457, 2948, 2592, 2124, 2592, 2592, 2650, 2823, 2449, 2455, 2946, 2592, 2128, 2592, 2592, 2649, 2952, 2592, 2810, 2448, 2461, 2991, 2467, 2592, 2592, 2329, 2817, 2474, 2990, 2466, 2592, 2592, 2373, 2447, 2992, 2469, 2592, 2592, 2592, 2373, 2447, 2477, 2468, 2592, 2592, 2353, 2469, 2592, 2495, 2592, 2592, 2415, 2483, 2592, 2415, 2496, 2592, 2592, 2352, 2592, 2592, 2352, 2352, 2469, 2592, 2592, 2363, 2331, 2494, 2592, 2592, 2592, 2375, 2592, 2375, 2415, 2504, 2592, 2592, 2367, 2372, 2503, 2592, 2592, 2592, 2389, 2418, 2415, 2592, 2592, 2373, 2592, 2592, 2592, 2593, 2732, 2417, 2415, 2592, 2417, 2520, 2592, 2592, 2592, 2390, 2521, 2521, 2592, 2592, 2592, 2401, 2599, 2585, 2526, 2531, 2120, 2592, 2212, 2426, 2450, 2463, 2948, 2592, 2592, 2592, 2213, 2389, 2527, 2532, 2121, 2542, 2551, 2105, 2592, 2213, 2592, 2592, 2592, 2558, 2538, 2544, 2553, 2557, 2537, 2543, 2552, 2421, 2572, 2576, 2546, 2543, 2547, 2592, 2592, 2373, 2615, 2575, 2545, 2105, 2592, 2244, 2479, 2592, 2129, 2592, 2592, 2628, 2690, 2469, 2562, 2566, 2592, 2592, 2592, 2415, 2928, 2934, 2401, 2570, 2574, 2564, 2572, 2585, 2590, 2592, 2592, 2585, 2965, 2592, 2592, 2592, 2445, 2251, 2592, 2592, 2592, 2474, 2592, 2609, 2892, 2592, 2362, 2592, 2592, 2138, 2851, 2159, 2592, 2592, 2592, 2509, 2888, 2892, 2592, 2592, 2592, 2490, 2418, 2891, 2592, 2592, 2376, 2592, 2592, 2374, 2592, 2889, 2388, 2592, 2373, 2373, 2890, 2592, 2592, 2387, 2592, 2887, 2505, 2892, 2592, 2373, 2610, 2388, 2592, 2592, 2376, 2373, 2592, 2887, 2891, 2592, 2374, 2592, 2592, 2608, 2159, 2614, 2620, 2592, 2592, 2394, 2594, 2887, 2399, 2592, 2887, 2397, 2508, 2374, 2507, 2592, 2375, 2592, 2592, 2592, 2595, 2508, 2506, 2592, 2506, 2505, 2505, 2592, 2507, 2637, 2505, 2592, 2592, 2401, 2661, 2592, 2643, 2592, 2592, 2417, 2592, 2655, 2592, 2592, 2592, 2510, 2414, 2656, 2592, 2592, 2592, 2516, 2592, 2593, 2660, 2665, 2880, 2592, 2592, 2592, 2522, 2767, 2666, 2881, 2592, 2592, 2420, 2571, 2696, 2592, 2592, 2592, 2580, 2572, 2686, 2632, 2698, 2592, 2383, 2514, 2592, 2163, 2932, 2465, 2685, 2631, 2697, 2592, 2388, 2592, 2592, 2212, 2604, 2671, 2632, 2678, 2592, 2401, 2405, 2409, 2592, 2592, 2592, 2679, 2592, 2592, 2592, 2592, 2108, 2677, 2591, 2592, 2592, 2592, 2419, 2592, 2683, 2187, 2191, 2469, 2671, 2189, 2467, 2592, 2401, 2629, 2633, 2702, 2468, 2592, 2592, 2421, 2536, 2703, 2469, 2592, 2592, 2422, 2573, 2593, 2672, 2467, 2592, 2402, 2406, 2592, 2402, 2979, 2592, 2592, 2626, 2673, 2467, 2592, 2446, 2259, 2947, 2592, 2377, 2709, 2592, 2592, 2522, 2862, 2713, 2468, 2592, 2592, 2581, 2572, 2562, 2374, 2374, 2592, 2376, 2721, 2724, 2592, 2592, 2624, 2373, 2731, 2592, 2592, 2592, 2626, 2732, 2592, 2592, 2592, 2755, 2656, 2726, 2736, 2741, 2592, 2486, 2593, 2381, 2592, 2727, 2737, 2742, 2715, 2747, 2753, 2592, 2498, 2469, 2873, 2743, 2592, 2592, 2592, 2791, 2759, 2763, 2592, 2592, 2627, 2704, 2592, 2592, 2522, 2789, 2593, 2761, 2753, 2592, 2498, 2863, 2592, 2592, 2767, 2592, 2592, 2592, 2792, 2789, 2592, 2592, 2592, 2803, 2126, 2592, 2592, 2592, 2811, 2122, 2592, 2592, 2592, 2834, 2777, 2592, 2592, 2592, 2848, 2936, 2591, 2489, 2797, 2592, 2592, 2670, 2631, 2490, 2798, 2592, 2592, 2592, 2963, 2807, 2592, 2592, 2592, 2965, 2838, 2592, 2592, 2592, 2975, 2330, 2818, 2829, 2592, 2498, 2939, 2592, 2498, 2592, 2791, 2331, 2819, 2830, 2592, 2592, 2592, 2982, 2834, 2817, 2828, 2106, 2592, 2592, 2592, 2405, 2405, 2817, 2828, 2592, 2592, 2415, 2849, 2842, 2592, 2522, 2773, 2592, 2522, 2868, 2592, 2580, 2600, 2586, 2137, 2850, 2843, 2592, 2592, 2855, 2937, 2844, 2592, 2592, 2592, 2987, 2936, 2591, 2592, 2592, 2684, 2630, 2592, 2856, 2938, 2592, 2592, 2860, 2939, 2592, 2592, 2872, 2592, 2861, 2591, 2592, 2592, 2887, 2616, 2592, 2867, 2592, 2592, 2708, 2592, 2498, 2469, 2498, 2497, 2785, 2773, 2499, 2783, 2770, 2877, 2877, 2877, 2772, 2592, 2592, 2345, 2885, 2592, 2592, 2592, 2715, 2762, 2515, 2896, 2592, 2592, 2715, 2917, 2516, 2897, 2592, 2592, 2592, 2901, 2906, 2911, 2592, 2592, 2956, 2960, 2715, 2902, 2907, 2912, 2593, 2916, 2920, 2820, 2922, 2822, 2592, 2592, 2715, 2927, 2921, 2821, 2106, 2592, 2592, 2974, 2408, 2321, 2821, 2106, 2592, 2592, 2983, 2592, 2593, 2404, 2408, 2592, 2592, 2717, 2749, 2716, 2928, 2322, 2822, 2593, 2926, 2919, 2820, 2934, 2823, 2592, 2592, 2592, 2651, 2824, 2592, 2592, 2592, 2130, 2952, 2592, 2592, 2592, 2592, 2964, 2592, 2592, 2716, 2748, 2592, 2969, 2592, 2592, 2716, 2918, 2368, 2970, 2592, 2592, 2592, 2403, 2407, 2592, 2592, 2787, 2211, 2404, 2409, 2592, 2592, 2802, 2837, 2987, 2592, 2592, 2592, 2809, 2427, 2592, 2793, 2592, 2592, 2809, 2447, 1073741824, 0x80000000, 539754496, 542375936, 402653184, 554434560, 571736064, 545521856, 268451840, 335544320, 268693630, 512, 2048, 256, 1024, 0, 1024, 0, 1073741824, 0x80000000, 0, 0, 0, 8388608, 0, 0, 1073741824, 1073741824, 0, 0x80000000, 537133056, 4194304, 1048576, 268435456, -1073741824, 0, 0, 0, 1048576, 0, 0, 0, 1572864, 0, 0, 0, 4194304, 0, 134217728, 16777216, 0, 0, 32, 64, 98304, 0, 33554432, 8388608, 192, 67108864, 67108864, 67108864, 67108864, 16, 32, 4, 0, 8192, 196608, 196608, 229376, 80, 4096, 524288, 8388608, 0, 0, 32, 128, 256, 24576, 24600, 24576, 24576, 2, 24576, 24576, 24576, 24584, 24592, 24576, 24578, 24576, 24578, 24576, 24576, 16, 512, 2048, 2048, 256, 4096, 32768, 1048576, 4194304, 67108864, 134217728, 268435456, 262144, 134217728, 0, 128, 128, 64, 16384, 16384, 16384, 67108864, 32, 32, 4, 4, 4096, 262144, 134217728, 0, 0, 0, 2, 0, 8192, 131072, 131072, 4096, 4096, 4096, 4096, 24576, 24576, 24576, 8, 8, 24576, 24576, 16384, 16384, 16384, 24576, 24584, 24576, 24576, 24576, 16384, 24576, 536870912, 262144, 0, 0, 32, 2048, 8192, 4, 4096, 4096, 4096, 786432, 8388608, 16777216, 0, 128, 16384, 16384, 16384, 32768, 65536, 2097152, 32, 32, 32, 32, 4, 4, 4, 4, 4, 4096, 67108864, 67108864, 67108864, 24576, 24576, 24576, 24576, 0, 16384, 16384, 16384, 16384, 67108864, 67108864, 8, 67108864, 24576, 8, 8, 8, 24576, 24576, 24576, 24578, 24576, 24576, 24576, 2, 2, 2, 16384, 67108864, 67108864, 67108864, 32, 67108864, 8, 8, 24576, 2048, 0x80000000, 536870912, 262144, 262144, 262144, 67108864, 8, 24576, 16384, 32768, 1048576, 4194304, 25165824, 67108864, 24576, 32770, 2, 4, 112, 512, 98304, 524288, 50, 402653186, 1049090, 1049091, 10, 66, 100925514, 10, 66, 12582914, 0, 0, -1678194207, -1678194207, -1041543218, 0, 32768, 0, 0, 32, 65536, 268435456, 1, 1, 513, 1048577, 0, 12582912, 0, 0, 0, 4, 1792, 0, 0, 0, 7, 29360128, 0, 0, 0, 8, 0, 0, 0, 12, 1, 1, 0, 0, -604102721, -604102721, 4194304, 8388608, 0, 0, 0, 31, 925600, 997981306, 997981306, 997981306, 0, 0, 2048, 8388608, 0, 0, 1, 2, 4, 32, 64, 512, 8192, 0, 0, 0, 245760, 997720064, 0, 0, 0, 32, 0, 0, 0, 3, 12, 16, 32, 8, 112, 3072, 12288, 16384, 32768, 65536, 131072, 7864320, 16777216, 973078528, 0, 0, 65536, 131072, 3670016, 4194304, 16777216, 33554432, 2, 8, 48, 2048, 8192, 16384, 32768, 65536, 131072, 524288, 131072, 524288, 3145728, 4194304, 16777216, 33554432, 65536, 131072, 2097152, 4194304, 16777216, 33554432, 134217728, 268435456, 536870912, 0, 0, 0, 1024, 0, 8, 48, 2048, 8192, 65536, 33554432, 268435456, 536870912, 65536, 268435456, 536870912, 0, 0, 32768, 0, 0, 126, 623104, 65011712, 0, 32, 65536, 536870912, 0, 0, 65536, 524288, 0, 32, 65536, 0, 0, 0, 2048, 0, 0, 0, 15482, 245760, -604102721, 0, 0, 0, 18913, 33062912, 925600, -605028352, 0, 0, 0, 65536, 31, 8096, 131072, 786432, 3145728, 3145728, 12582912, 50331648, 134217728, 268435456, 160, 256, 512, 7168, 131072, 786432, 131072, 786432, 1048576, 2097152, 12582912, 16777216, 268435456, 1073741824, 0x80000000, 12582912, 16777216, 33554432, 268435456, 1073741824, 0x80000000, 3, 12, 16, 160, 256, 7168, 786432, 1048576, 12582912, 16777216, 268435456, 1073741824, 0, 8, 16, 32, 128, 256, 512, 7168, 786432, 1048576, 2097152, 0, 1, 2, 8, 16, 7168, 786432, 1048576, 8388608, 16777216, 16777216, 1073741824, 0, 0, 0, 0, 1, 0, 0, 8, 32, 128, 256, 7168, 8, 32, 0, 3072, 0, 8, 32, 3072, 4096, 524288, 8, 32, 0, 0, 3072, 4096, 0, 2048, 524288, 8388608, 8, 2048, 0, 0, 1, 12, 256, 4096, 32768, 262144, 1048576, 4194304, 67108864, 0, 2048, 0, 2048, 2048, 1073741824, -58805985, -58805985, -58805985, 0, 0, 262144, 0, 0, 32, 4194304, 16777216, 134217728, 4382, 172032, -58982400, 0, 0, 2, 28, 256, 4096, 8192, 8192, 32768, 131072, 262144, 524288, 1, 2, 12, 256, 4096, 0, 0, 4194304, 67108864, 134217728, 805306368, 1073741824, 0, 0, 1, 2, 12, 16, 256, 4096, 1048576, 67108864, 134217728, 268435456, 0, 512, 1048576, 4194304, 201326592, 1879048192, 0, 0, 12, 256, 4096, 134217728, 268435456, 536870912, 12, 256, 268435456, 536870912, 0, 12, 256, 0, 0, 1, 32, 64, 512, 0, 0, 205236961, 205236961, 0, 0, 0, 1, 96, 640, 1, 10976, 229376, 204996608, 0, 640, 2048, 8192, 229376, 1572864, 1572864, 2097152, 201326592, 0, 0, 0, 64, 512, 2048, 229376, 1572864, 201326592, 1572864, 201326592, 0, 0, 1, 4382, 0, 1, 32, 2048, 65536, 131072, 1572864, 201326592, 131072, 1572864, 134217728, 0, 0, 524288, 524288, 0, 0, 0, -68582786, -68582786, -68582786, 0, 0, 2097152, 524288, 0, 524288, 0, 0, 65536, 131072, 1572864, 0, 0, 2, 4, 0, 0, 65011712, -134217728, 0, 0, 0, 0, 2, 4, 120, 512, -268435456, 0, 0, 0, 2, 8, 48, 64, 2048, 8192, 98304, 524288, 2097152, 4194304, 25165824, 33554432, 134217728, 268435456, 0x80000000, 0, 0, 25165824, 33554432, 134217728, 1879048192, 0x80000000, 0, 0, 4, 112, 512, 622592, 65011712, 134217728, -268435456, 16777216, 33554432, 134217728, 1610612736, 0, 0, 0, 64, 98304, 524288, 4194304, 16777216, 33554432, 0, 98304, 524288, 16777216, 33554432, 0, 65536, 524288, 33554432, 536870912, 1073741824, 0, 65536, 524288, 536870912, 1073741824, 0, 0, 65536, 524288, 536870912, 0, 524288, 0, 524288, 524288, 1048576, 2086666240, 0x80000000, 0, -1678194207, 0, 0, 0, 8, 32, 2048, 524288, 8388608, 0, 0, 33062912, 436207616, 0x80000000, 0, 0, 32, 64, 2432, 16384, 32768, 32768, 524288, 3145728, 4194304, 25165824, 25165824, 167772160, 268435456, 0x80000000, 0, 32, 64, 384, 2048, 16384, 32768, 1048576, 2097152, 4194304, 25165824, 32, 64, 128, 256, 2048, 16384, 2048, 16384, 1048576, 4194304, 16777216, 33554432, 134217728, 536870912, 1073741824, 0, 0, 2048, 16384, 4194304, 16777216, 33554432, 134217728, 805306368, 0, 0, 16777216, 134217728, 268435456, 0x80000000, 0, 622592, 622592, 622592, 8807, 8807, 434791, 0, 0, 16777216, 0, 0, 0, 7, 608, 8192, 0, 0, 0, 3, 4, 96, 512, 32, 64, 8192, 0, 0, 16777216, 134217728, 0, 0, 2, 4, 8192, 16384, 65536, 2097152, 33554432, 268435456 +]; + +XQueryTokenizer.TOKEN = +[ + "(0)", + "ModuleDecl", + "Annotation", + "OptionDecl", + "Operator", + "Variable", + "Tag", + "EndTag", + "PragmaContents", + "DirCommentContents", + "DirPIContents", + "CDataSectionContents", + "AttrTest", + "Wildcard", + "EQName", + "IntegerLiteral", + "DecimalLiteral", + "DoubleLiteral", + "PredefinedEntityRef", + "'\"\"'", + "EscapeApos", + "QuotChar", + "AposChar", + "ElementContentChar", + "QuotAttrContentChar", + "AposAttrContentChar", + "NCName", + "QName", + "S", + "CharRef", + "CommentContents", + "DocTag", + "DocCommentContents", + "EOF", + "'!'", + "'\"'", + "'#'", + "'#)'", + "''''", + "'('", + "'(#'", + "'(:'", + "'(:~'", + "')'", + "'*'", + "'*'", + "','", + "'-->'", + "'.'", + "'/'", + "'/>'", + "':'", + "':)'", + "';'", + "'\"==text?this.createToken(Tokens.CDC,text,startLine,startCol):(reader.reset(),this.charToken(first,startLine,startCol))},identOrFunctionToken:function(first,startLine,startCol){var reader=this._reader,ident=this.readName(first),tt=Tokens.IDENT;return\"(\"==reader.peek()?(ident+=reader.read(),\"url(\"==ident.toLowerCase()?(tt=Tokens.URI,ident=this.readURI(ident),\"url(\"==ident.toLowerCase()&&(tt=Tokens.FUNCTION)):tt=Tokens.FUNCTION):\":\"==reader.peek()&&\"progid\"==ident.toLowerCase()&&(ident+=reader.readTo(\"(\"),tt=Tokens.IE_FUNCTION),this.createToken(tt,ident,startLine,startCol)},importantToken:function(first,startLine,startCol){var temp,c,reader=this._reader,important=first,tt=Tokens.CHAR;for(reader.mark(),c=reader.read();c;){if(\"/\"==c){if(\"*\"!=reader.peek())break;if(temp=this.readComment(c),\"\"===temp)break}else{if(!isWhitespace(c)){if(/i/i.test(c)){temp=reader.readCount(8),/mportant/i.test(temp)&&(important+=c+temp,tt=Tokens.IMPORTANT_SYM);break}break}important+=c+this.readWhitespace()}c=reader.read()}return tt==Tokens.CHAR?(reader.reset(),this.charToken(first,startLine,startCol)):this.createToken(tt,important,startLine,startCol)},notToken:function(first,startLine,startCol){var reader=this._reader,text=first;return reader.mark(),text+=reader.readCount(4),\":not(\"==text.toLowerCase()?this.createToken(Tokens.NOT,text,startLine,startCol):(reader.reset(),this.charToken(first,startLine,startCol))},numberToken:function(first,startLine,startCol){var ident,reader=this._reader,value=this.readNumber(first),tt=Tokens.NUMBER,c=reader.peek();return isIdentStart(c)?(ident=this.readName(reader.read()),value+=ident,tt=/^em$|^ex$|^px$|^gd$|^rem$|^vw$|^vh$|^vm$|^ch$|^cm$|^mm$|^in$|^pt$|^pc$/i.test(ident)?Tokens.LENGTH:/^deg|^rad$|^grad$/i.test(ident)?Tokens.ANGLE:/^ms$|^s$/i.test(ident)?Tokens.TIME:/^hz$|^khz$/i.test(ident)?Tokens.FREQ:/^dpi$|^dpcm$/i.test(ident)?Tokens.RESOLUTION:Tokens.DIMENSION):\"%\"==c&&(value+=reader.read(),tt=Tokens.PERCENTAGE),this.createToken(tt,value,startLine,startCol)},stringToken:function(first,startLine,startCol){for(var delim=first,string=first,reader=this._reader,prev=first,tt=Tokens.STRING,c=reader.read();c&&(string+=c,c!=delim||\"\\\\\"==prev);){if(isNewLine(reader.peek())&&\"\\\\\"!=c){tt=Tokens.INVALID;break}prev=c,c=reader.read()}return null===c&&(tt=Tokens.INVALID),this.createToken(tt,string,startLine,startCol)},unicodeRangeToken:function(first,startLine,startCol){var temp,reader=this._reader,value=first,tt=Tokens.CHAR;return\"+\"==reader.peek()&&(reader.mark(),value+=reader.read(),value+=this.readUnicodeRangePart(!0),2==value.length?reader.reset():(tt=Tokens.UNICODE_RANGE,-1==value.indexOf(\"?\")&&\"-\"==reader.peek()&&(reader.mark(),temp=reader.read(),temp+=this.readUnicodeRangePart(!1),1==temp.length?reader.reset():value+=temp))),this.createToken(tt,value,startLine,startCol)},whitespaceToken:function(first,startLine,startCol){var value=(this._reader,first+this.readWhitespace());return this.createToken(Tokens.S,value,startLine,startCol)},readUnicodeRangePart:function(allowQuestionMark){for(var reader=this._reader,part=\"\",c=reader.peek();isHexDigit(c)&&6>part.length;)reader.read(),part+=c,c=reader.peek();if(allowQuestionMark)for(;\"?\"==c&&6>part.length;)reader.read(),part+=c,c=reader.peek();return part},readWhitespace:function(){for(var reader=this._reader,whitespace=\"\",c=reader.peek();isWhitespace(c);)reader.read(),whitespace+=c,c=reader.peek();return whitespace},readNumber:function(first){for(var reader=this._reader,number=first,hasDot=\".\"==first,c=reader.peek();c;){if(isDigit(c))number+=reader.read();else{if(\".\"!=c)break;if(hasDot)break;hasDot=!0,number+=reader.read()}c=reader.peek()}return number},readString:function(){for(var reader=this._reader,delim=reader.read(),string=delim,prev=delim,c=reader.peek();c&&(c=reader.read(),string+=c,c!=delim||\"\\\\\"==prev);){if(isNewLine(reader.peek())&&\"\\\\\"!=c){string=\"\";break}prev=c,c=reader.peek()}return null===c&&(string=\"\"),string},readURI:function(first){var reader=this._reader,uri=first,inner=\"\",c=reader.peek();for(reader.mark();c&&isWhitespace(c);)reader.read(),c=reader.peek();for(inner=\"'\"==c||'\"'==c?this.readString():this.readURL(),c=reader.peek();c&&isWhitespace(c);)reader.read(),c=reader.peek();return\"\"===inner||\")\"!=c?(uri=first,reader.reset()):uri+=inner+reader.read(),uri},readURL:function(){for(var reader=this._reader,url=\"\",c=reader.peek();/^[!#$%&\\\\*-~]$/.test(c);)url+=reader.read(),c=reader.peek();return url},readName:function(first){for(var reader=this._reader,ident=first||\"\",c=reader.peek();;)if(\"\\\\\"==c)ident+=this.readEscape(reader.read()),c=reader.peek();else{if(!c||!isNameChar(c))break;ident+=reader.read(),c=reader.peek()}return ident},readEscape:function(first){var reader=this._reader,cssEscape=first||\"\",i=0,c=reader.peek();if(isHexDigit(c))do cssEscape+=reader.read(),c=reader.peek();while(c&&isHexDigit(c)&&6>++i);return 3==cssEscape.length&&/\\s/.test(c)||7==cssEscape.length||1==cssEscape.length?reader.read():c=\"\",cssEscape+c},readComment:function(first){var reader=this._reader,comment=first||\"\",c=reader.read();if(\"*\"==c){for(;c;){if(comment+=c,comment.length>2&&\"*\"==c&&\"/\"==reader.peek()){comment+=reader.read();break}c=reader.read()}return comment}return\"\"}});var Tokens=[{name:\"CDO\"},{name:\"CDC\"},{name:\"S\",whitespace:!0},{name:\"COMMENT\",comment:!0,hide:!0,channel:\"comment\"},{name:\"INCLUDES\",text:\"~=\"},{name:\"DASHMATCH\",text:\"|=\"},{name:\"PREFIXMATCH\",text:\"^=\"},{name:\"SUFFIXMATCH\",text:\"$=\"},{name:\"SUBSTRINGMATCH\",text:\"*=\"},{name:\"STRING\"},{name:\"IDENT\"},{name:\"HASH\"},{name:\"IMPORT_SYM\",text:\"@import\"},{name:\"PAGE_SYM\",text:\"@page\"},{name:\"MEDIA_SYM\",text:\"@media\"},{name:\"FONT_FACE_SYM\",text:\"@font-face\"},{name:\"CHARSET_SYM\",text:\"@charset\"},{name:\"NAMESPACE_SYM\",text:\"@namespace\"},{name:\"UNKNOWN_SYM\"},{name:\"KEYFRAMES_SYM\",text:[\"@keyframes\",\"@-webkit-keyframes\",\"@-moz-keyframes\",\"@-o-keyframes\"]},{name:\"IMPORTANT_SYM\"},{name:\"LENGTH\"},{name:\"ANGLE\"},{name:\"TIME\"},{name:\"FREQ\"},{name:\"DIMENSION\"},{name:\"PERCENTAGE\"},{name:\"NUMBER\"},{name:\"URI\"},{name:\"FUNCTION\"},{name:\"UNICODE_RANGE\"},{name:\"INVALID\"},{name:\"PLUS\",text:\"+\"},{name:\"GREATER\",text:\">\"},{name:\"COMMA\",text:\",\"},{name:\"TILDE\",text:\"~\"},{name:\"NOT\"},{name:\"TOPLEFTCORNER_SYM\",text:\"@top-left-corner\"},{name:\"TOPLEFT_SYM\",text:\"@top-left\"},{name:\"TOPCENTER_SYM\",text:\"@top-center\"},{name:\"TOPRIGHT_SYM\",text:\"@top-right\"},{name:\"TOPRIGHTCORNER_SYM\",text:\"@top-right-corner\"},{name:\"BOTTOMLEFTCORNER_SYM\",text:\"@bottom-left-corner\"},{name:\"BOTTOMLEFT_SYM\",text:\"@bottom-left\"},{name:\"BOTTOMCENTER_SYM\",text:\"@bottom-center\"},{name:\"BOTTOMRIGHT_SYM\",text:\"@bottom-right\"},{name:\"BOTTOMRIGHTCORNER_SYM\",text:\"@bottom-right-corner\"},{name:\"LEFTTOP_SYM\",text:\"@left-top\"},{name:\"LEFTMIDDLE_SYM\",text:\"@left-middle\"},{name:\"LEFTBOTTOM_SYM\",text:\"@left-bottom\"},{name:\"RIGHTTOP_SYM\",text:\"@right-top\"},{name:\"RIGHTMIDDLE_SYM\",text:\"@right-middle\"},{name:\"RIGHTBOTTOM_SYM\",text:\"@right-bottom\"},{name:\"RESOLUTION\",state:\"media\"},{name:\"IE_FUNCTION\"},{name:\"CHAR\"},{name:\"PIPE\",text:\"|\"},{name:\"SLASH\",text:\"/\"},{name:\"MINUS\",text:\"-\"},{name:\"STAR\",text:\"*\"},{name:\"LBRACE\",text:\"{\"},{name:\"RBRACE\",text:\"}\"},{name:\"LBRACKET\",text:\"[\"},{name:\"RBRACKET\",text:\"]\"},{name:\"EQUALS\",text:\"=\"},{name:\"COLON\",text:\":\"},{name:\"SEMICOLON\",text:\";\"},{name:\"LPAREN\",text:\"(\"},{name:\"RPAREN\",text:\")\"},{name:\"DOT\",text:\".\"}];(function(){var nameMap=[],typeMap={};Tokens.UNKNOWN=-1,Tokens.unshift({name:\"EOF\"});for(var i=0,len=Tokens.length;len>i;i++)if(nameMap.push(Tokens[i].name),Tokens[Tokens[i].name]=i,Tokens[i].text)if(Tokens[i].text instanceof Array)for(var j=0;Tokens[i].text.length>j;j++)typeMap[Tokens[i].text[j]]=i;else typeMap[Tokens[i].text]=i;Tokens.name=function(tt){return nameMap[tt]},Tokens.type=function(c){return typeMap[c]||-1}})();var Validation={validate:function(property,value){var name=(\"\"+property).toLowerCase(),expression=(value.parts,new PropertyValueIterator(value)),spec=Properties[name];if(spec)\"number\"!=typeof spec&&(\"string\"==typeof spec?spec.indexOf(\"||\")>-1?this.groupProperty(spec,expression):this.singleProperty(spec,expression,1):spec.multi?this.multiProperty(spec.multi,expression,spec.comma,spec.max||1/0):\"function\"==typeof spec&&spec(expression));else if(0!==name.indexOf(\"-\"))throw new ValidationError(\"Unknown property '\"+property+\"'.\",property.line,property.col)},singleProperty:function(types,expression,max){for(var part,result=!1,value=expression.value,count=0;expression.hasNext()&&max>count&&(result=ValidationTypes.isAny(expression,types));)count++;if(!result)throw expression.hasNext()&&!expression.isFirst()?(part=expression.peek(),new ValidationError(\"Expected end of value but found '\"+part+\"'.\",part.line,part.col)):new ValidationError(\"Expected (\"+types+\") but found '\"+value+\"'.\",value.line,value.col);if(expression.hasNext())throw part=expression.next(),new ValidationError(\"Expected end of value but found '\"+part+\"'.\",part.line,part.col)},multiProperty:function(types,expression,comma,max){for(var part,result=!1,value=expression.value,count=0;expression.hasNext()&&!result&&max>count&&ValidationTypes.isAny(expression,types);)if(count++,expression.hasNext()){if(comma){if(\",\"!=expression.peek())break;part=expression.next()}}else result=!0;if(!result)throw expression.hasNext()&&!expression.isFirst()?(part=expression.peek(),new ValidationError(\"Expected end of value but found '\"+part+\"'.\",part.line,part.col)):(part=expression.previous(),comma&&\",\"==part?new ValidationError(\"Expected end of value but found '\"+part+\"'.\",part.line,part.col):new ValidationError(\"Expected (\"+types+\") but found '\"+value+\"'.\",value.line,value.col));if(expression.hasNext())throw part=expression.next(),new ValidationError(\"Expected end of value but found '\"+part+\"'.\",part.line,part.col)},groupProperty:function(types,expression){for(var name,part,result=!1,value=expression.value,typeCount=types.split(\"||\").length,groups={count:0},partial=!1;expression.hasNext()&&!result&&(name=ValidationTypes.isAnyOfGroup(expression,types))&&!groups[name];)groups[name]=1,groups.count++,partial=!0,groups.count!=typeCount&&expression.hasNext()||(result=!0);if(!result)throw partial&&expression.hasNext()?(part=expression.peek(),new ValidationError(\"Expected end of value but found '\"+part+\"'.\",part.line,part.col)):new ValidationError(\"Expected (\"+types+\") but found '\"+value+\"'.\",value.line,value.col);if(expression.hasNext())throw part=expression.next(),new ValidationError(\"Expected end of value but found '\"+part+\"'.\",part.line,part.col)}};ValidationError.prototype=Error();var ValidationTypes={isLiteral:function(part,literals){var i,len,text=(\"\"+part.text).toLowerCase(),args=literals.split(\" | \"),found=!1;for(i=0,len=args.length;len>i&&!found;i++)text==args[i].toLowerCase()&&(found=!0);return found},isSimple:function(type){return!!this.simple[type]},isComplex:function(type){return!!this.complex[type]},isAny:function(expression,types){var i,len,args=types.split(\" | \"),found=!1;for(i=0,len=args.length;len>i&&!found&&expression.hasNext();i++)found=this.isType(expression,args[i]);return found},isAnyOfGroup:function(expression,types){var i,len,args=types.split(\" || \"),found=!1;for(i=0,len=args.length;len>i&&!found;i++)found=this.isType(expression,args[i]);return found?args[i-1]:!1},isType:function(expression,type){var part=expression.peek(),result=!1;return\"<\"!=type.charAt(0)?(result=this.isLiteral(part,type),result&&expression.next()):this.simple[type]?(result=this.simple[type](part),result&&expression.next()):result=this.complex[type](expression),result},simple:{\"\":function(part){return ValidationTypes.isLiteral(part,\"xx-small | x-small | small | medium | large | x-large | xx-large\")},\"\":function(part){return ValidationTypes.isLiteral(part,\"scroll | fixed | local\")},\"\":function(part){return\"function\"==part.type&&\"attr\"==part.name},\"\":function(part){return this[\"\"](part)||this[\"\"](part)||\"none\"==part},\"\":function(part){return\"function\"==part.type&&/^(?:\\-(?:ms|moz|o|webkit)\\-)?(?:repeating\\-)?(?:radial\\-|linear\\-)?gradient/i.test(part)},\"\":function(part){return ValidationTypes.isLiteral(part,\"padding-box | border-box | content-box\")},\"\":function(part){return\"function\"==part.type&&\"content\"==part.name},\"\":function(part){return ValidationTypes.isLiteral(part,\"smaller | larger\")},\"\":function(part){return\"identifier\"==part.type},\"\":function(part){return\"function\"==part.type&&/^(?:\\-(?:ms|moz|o|webkit)\\-)?calc/i.test(part)?!0:\"length\"==part.type||\"number\"==part.type||\"integer\"==part.type||\"0\"==part},\"\":function(part){return\"color\"==part.type||\"transparent\"==part},\"\":function(part){return\"number\"==part.type||this[\"\"](part)},\"\":function(part){return\"integer\"==part.type},\"\":function(part){return\"integer\"==part.type},\"\":function(part){return\"angle\"==part.type},\"\":function(part){return\"uri\"==part.type},\"\":function(part){return this[\"\"](part)},\"\":function(part){return\"percentage\"==part.type||\"0\"==part},\"\":function(part){return this[\"\"](part)||ValidationTypes.isLiteral(part,\"thin | medium | thick\")},\"\":function(part){return ValidationTypes.isLiteral(part,\"none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset\")},\"\":function(part){return this[\"\"](part)||this[\"\"](part)||ValidationTypes.isLiteral(part,\"auto\")},\"\":function(part){return this[\"\"](part)||this[\"\"](part)},\"\":function(part){return\"function\"==part.type&&(\"rect\"==part.name||\"inset-rect\"==part.name)},\"

Demonstration of bi-directional text support. See + the related + blog post for more background.

+ +

Note: There is + a known + bug with cursor motion and mouse clicks in bi-directional lines + that are line wrapped.

+ + diff --git a/pitfall/pdfkit/node_modules/codemirror/demo/btree.html b/pitfall/pdfkit/node_modules/codemirror/demo/btree.html new file mode 100644 index 00000000..7635ca1b --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/demo/btree.html @@ -0,0 +1,86 @@ + + +CodeMirror: B-Tree visualization + + + + + + + + +
+

B-Tree visualization

+
+ +
+ + + + +

+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/demo/buffers.html b/pitfall/pdfkit/node_modules/codemirror/demo/buffers.html new file mode 100644 index 00000000..951209ca --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/demo/buffers.html @@ -0,0 +1,109 @@ + + +CodeMirror: Multiple Buffer & Split View Demo + + + + + + + + + + +
+

Multiple Buffer & Split View Demo

+ + +
+
+ Select buffer: +     +
+
+
+ Select buffer: +     +
+ + + +

Demonstration of + using linked documents + to provide a split view on a document, and + using swapDoc + to use a single editor to display multiple documents.

+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/demo/changemode.html b/pitfall/pdfkit/node_modules/codemirror/demo/changemode.html new file mode 100644 index 00000000..61c17860 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/demo/changemode.html @@ -0,0 +1,59 @@ + + +CodeMirror: Mode-Changing Demo + + + + + + + + + + +
+

Mode-Changing Demo

+
+ +

On changes to the content of the above editor, a (crude) script +tries to auto-detect the language used, and switches the editor to +either JavaScript or Scheme mode based on that.

+ + +
diff --git a/pitfall/pdfkit/node_modules/codemirror/demo/closebrackets.html b/pitfall/pdfkit/node_modules/codemirror/demo/closebrackets.html new file mode 100644 index 00000000..8c0dc1cc --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/demo/closebrackets.html @@ -0,0 +1,63 @@ + + +CodeMirror: Closebrackets Demo + + + + + + + + + + +
+

Closebrackets Demo

+
+ + +
diff --git a/pitfall/pdfkit/node_modules/codemirror/demo/closetag.html b/pitfall/pdfkit/node_modules/codemirror/demo/closetag.html new file mode 100644 index 00000000..8981f7eb --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/demo/closetag.html @@ -0,0 +1,40 @@ + + +CodeMirror: Close-Tag Demo + + + + + + + + + + + + + +
+

Close-Tag Demo

+
+ + +
diff --git a/pitfall/pdfkit/node_modules/codemirror/demo/complete.html b/pitfall/pdfkit/node_modules/codemirror/demo/complete.html new file mode 100644 index 00000000..e256a908 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/demo/complete.html @@ -0,0 +1,80 @@ + + +CodeMirror: Autocomplete Demo + + + + + + + + + + + +
+

Autocomplete Demo

+
+ +

Press ctrl-space to activate autocompletion. Built +on top of the show-hint +and javascript-hint +addons.

+ + +
diff --git a/pitfall/pdfkit/node_modules/codemirror/demo/emacs.html b/pitfall/pdfkit/node_modules/codemirror/demo/emacs.html new file mode 100644 index 00000000..5b622a99 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/demo/emacs.html @@ -0,0 +1,75 @@ + + +CodeMirror: Emacs bindings demo + + + + + + + + + + + + + + + + +
+

Emacs bindings demo

+
+ +

The emacs keybindings are enabled by +including keymap/emacs.js and setting +the keyMap option to "emacs". Because +CodeMirror's internal API is quite different from Emacs, they are only +a loose approximation of actual emacs bindings, though.

+ +

Also note that a lot of browsers disallow certain keys from being +captured. For example, Chrome blocks both Ctrl-W and Ctrl-N, with the +result that idiomatic use of Emacs keys will constantly close your tab +or open a new window.

+ + + +
diff --git a/pitfall/pdfkit/node_modules/codemirror/demo/folding.html b/pitfall/pdfkit/node_modules/codemirror/demo/folding.html new file mode 100644 index 00000000..94618012 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/demo/folding.html @@ -0,0 +1,75 @@ + + +CodeMirror: Code Folding Demo + + + + + + + + + + + + + + + + +
+

Code Folding Demo

+
+
JavaScript:
+
HTML:
+
+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/demo/fullscreen.html b/pitfall/pdfkit/node_modules/codemirror/demo/fullscreen.html new file mode 100644 index 00000000..827d55d0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/demo/fullscreen.html @@ -0,0 +1,130 @@ + + +CodeMirror: Full Screen Editing + + + + + + + + + + + + +
+

Full Screen Editing

+
+ + +

Demonstration of + the fullscreen + addon. Press F11 when cursor is in the editor to + toggle full screen editing. Esc can also be used + to exit full screen editing.

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/demo/hardwrap.html b/pitfall/pdfkit/node_modules/codemirror/demo/hardwrap.html new file mode 100644 index 00000000..a53d68de --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/demo/hardwrap.html @@ -0,0 +1,69 @@ + + +CodeMirror: Hard-wrapping Demo + + + + + + + + + + +
+

Hard-wrapping Demo

+
+ +

Demonstration of +the hardwrap addon. +The above editor has its change event hooked up to +the wrapParagraphsInRange method, so that the paragraphs +are reflown as you are typing.

+ + + +
diff --git a/pitfall/pdfkit/node_modules/codemirror/demo/html5complete.html b/pitfall/pdfkit/node_modules/codemirror/demo/html5complete.html new file mode 100644 index 00000000..899260aa --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/demo/html5complete.html @@ -0,0 +1,54 @@ + + +CodeMirror: HTML completion demo + + + + + + + + + + + + + + + + +
+

HTML completion demo

+ +

Shows the XML completer + parameterized with information about the tags in HTML. + Press ctrl-space to activate completion.

+ +
+ + +
diff --git a/pitfall/pdfkit/node_modules/codemirror/demo/indentwrap.html b/pitfall/pdfkit/node_modules/codemirror/demo/indentwrap.html new file mode 100644 index 00000000..6c1fc596 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/demo/indentwrap.html @@ -0,0 +1,58 @@ + + +CodeMirror: Indented wrapped line demo + + + + + + + + + +
+

Indented wrapped line demo

+
+ +

This page uses a hack on top of the "renderLine" + event to make wrapped text line up with the base indentation of + the line.

+ + + +
diff --git a/pitfall/pdfkit/node_modules/codemirror/demo/lint.html b/pitfall/pdfkit/node_modules/codemirror/demo/lint.html new file mode 100644 index 00000000..8372c52c --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/demo/lint.html @@ -0,0 +1,171 @@ + + +CodeMirror: Linter Demo + + + + + + + + + + + + + + + + + + +
+

Linter Demo

+ + +

+ +

+ +

+ + +
diff --git a/pitfall/pdfkit/node_modules/codemirror/demo/loadmode.html b/pitfall/pdfkit/node_modules/codemirror/demo/loadmode.html new file mode 100644 index 00000000..be28c7a8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/demo/loadmode.html @@ -0,0 +1,49 @@ + + +CodeMirror: Lazy Mode Loading Demo + + + + + + + + + +
+

Lazy Mode Loading Demo

+
+

+ + +
diff --git a/pitfall/pdfkit/node_modules/codemirror/demo/marker.html b/pitfall/pdfkit/node_modules/codemirror/demo/marker.html new file mode 100644 index 00000000..ac4dfda8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/demo/marker.html @@ -0,0 +1,52 @@ + + +CodeMirror: Breakpoint Demo + + + + + + + + + +
+

Breakpoint Demo

+
+ +

Click the line-number gutter to add or remove 'breakpoints'.

+ + + +
diff --git a/pitfall/pdfkit/node_modules/codemirror/demo/markselection.html b/pitfall/pdfkit/node_modules/codemirror/demo/markselection.html new file mode 100644 index 00000000..45493326 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/demo/markselection.html @@ -0,0 +1,45 @@ + + +CodeMirror: Match Selection Demo + + + + + + + + + + +
+

Match Selection Demo

+
+ + + +

Simple addon to easily mark (and style) selected text.

+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/demo/matchhighlighter.html b/pitfall/pdfkit/node_modules/codemirror/demo/matchhighlighter.html new file mode 100644 index 00000000..170213bf --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/demo/matchhighlighter.html @@ -0,0 +1,47 @@ + + +CodeMirror: Match Highlighter Demo + + + + + + + + + + +
+

Match Highlighter Demo

+
+ + + +

Search and highlight occurences of the selected text.

+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/demo/matchtags.html b/pitfall/pdfkit/node_modules/codemirror/demo/matchtags.html new file mode 100644 index 00000000..9a3797e5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/demo/matchtags.html @@ -0,0 +1,49 @@ + + +CodeMirror: Tag Matcher Demo + + + + + + + + + + + +
+

Tag Matcher Demo

+ + +
+ + + +

Put the cursor on or inside a pair of tags to highlight them. + Press Ctrl-J to jump to the tag that matches the one under the + cursor.

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/demo/merge.html b/pitfall/pdfkit/node_modules/codemirror/demo/merge.html new file mode 100644 index 00000000..d2df900c --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/demo/merge.html @@ -0,0 +1,82 @@ + + +CodeMirror: merge view demo + + + + + + + + + + + + +
+

merge view demo

+ + +
+ +

The merge +addon provides an interface for displaying and merging diffs, +either two-way +or three-way. The left +(or center) pane is editable, and the differences with the other +pane(s) are optionally shown live as you edit it.

+ +

This addon depends on +the google-diff-match-patch +library to compute the diffs.

+ + +
diff --git a/pitfall/pdfkit/node_modules/codemirror/demo/multiplex.html b/pitfall/pdfkit/node_modules/codemirror/demo/multiplex.html new file mode 100644 index 00000000..2ad9608a --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/demo/multiplex.html @@ -0,0 +1,75 @@ + + +CodeMirror: Multiplexing Parser Demo + + + + + + + + + + +
+

Multiplexing Parser Demo

+
+ + + +

Demonstration of a multiplexing mode, which, at certain + boundary strings, switches to one or more inner modes. The out + (HTML) mode does not get fed the content of the << + >> blocks. See + the manual and + the source for more + information.

+ +

+ Parsing/Highlighting Tests: + normal, + verbose. +

+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/demo/mustache.html b/pitfall/pdfkit/node_modules/codemirror/demo/mustache.html new file mode 100644 index 00000000..cb029159 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/demo/mustache.html @@ -0,0 +1,68 @@ + + +CodeMirror: Overlay Parser Demo + + + + + + + + + + +
+

Overlay Parser Demo

+
+ + + +

Demonstration of a mode that parses HTML, highlighting + the Mustache templating + directives inside of it by using the code + in overlay.js. View + source to see the 15 lines of code needed to accomplish this.

+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/demo/placeholder.html b/pitfall/pdfkit/node_modules/codemirror/demo/placeholder.html new file mode 100644 index 00000000..6cf098b0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/demo/placeholder.html @@ -0,0 +1,45 @@ + + +CodeMirror: Placeholder demo + + + + + + + + + +
+

Placeholder demo

+
+ +

The placeholder + plug-in adds an option placeholder that can be set to + make text appear in the editor when it is empty and not focused. + If the source textarea has a placeholder attribute, + it will automatically be inherited.

+ + + +
diff --git a/pitfall/pdfkit/node_modules/codemirror/demo/preview.html b/pitfall/pdfkit/node_modules/codemirror/demo/preview.html new file mode 100644 index 00000000..ccf9122e --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/demo/preview.html @@ -0,0 +1,88 @@ + + +CodeMirror: HTML5 preview + + + + + + + + + + + + +
+

HTML5 preview

+ + + + +
diff --git a/pitfall/pdfkit/node_modules/codemirror/demo/resize.html b/pitfall/pdfkit/node_modules/codemirror/demo/resize.html new file mode 100644 index 00000000..10326ef6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/demo/resize.html @@ -0,0 +1,58 @@ + + +CodeMirror: Autoresize Demo + + + + + + + + + +
+

Autoresize Demo

+
+ +

By setting a few CSS properties, and giving +the viewportMargin +a value of Infinity, CodeMirror can be made to +automatically resize to fit its content.

+ + + +
diff --git a/pitfall/pdfkit/node_modules/codemirror/demo/runmode.html b/pitfall/pdfkit/node_modules/codemirror/demo/runmode.html new file mode 100644 index 00000000..144783d3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/demo/runmode.html @@ -0,0 +1,62 @@ + + +CodeMirror: Mode Runner Demo + + + + + + + + + +
+

Mode Runner Demo

+ + +
+ +

+
+    
+
+    

Running a CodeMirror mode outside of the editor. + The CodeMirror.runMode function, defined + in lib/runmode.js takes the following arguments:

+ +
+
text (string)
+
The document to run through the highlighter.
+
mode (mode spec)
+
The mode to use (must be loaded as normal).
+
output (function or DOM node)
+
If this is a function, it will be called for each token with + two arguments, the token's text and the token's style class (may + be null for unstyled tokens). If it is a DOM node, + the tokens will be converted to span elements as in + an editor, and inserted into the node + (through innerHTML).
+
+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/demo/search.html b/pitfall/pdfkit/node_modules/codemirror/demo/search.html new file mode 100644 index 00000000..4aef2a81 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/demo/search.html @@ -0,0 +1,94 @@ + + +CodeMirror: Search/Replace Demo + + + + + + + + + + + + + +
+

Search/Replace Demo

+
+ + + +

Demonstration of primitive search/replace functionality. The + keybindings (which can be overridden by custom keymaps) are:

+
+
Ctrl-F / Cmd-F
Start searching
+
Ctrl-G / Cmd-G
Find next
+
Shift-Ctrl-G / Shift-Cmd-G
Find previous
+
Shift-Ctrl-F / Cmd-Option-F
Replace
+
Shift-Ctrl-R / Shift-Cmd-Option-F
Replace all
+
+

Searching is enabled by + including addon/search/search.js + and addon/search/searchcursor.js. + For good-looking input dialogs, you also want to include + addon/dialog/dialog.js + and addon/dialog/dialog.css.

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/demo/spanaffectswrapping_shim.html b/pitfall/pdfkit/node_modules/codemirror/demo/spanaffectswrapping_shim.html new file mode 100644 index 00000000..e598221c --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/demo/spanaffectswrapping_shim.html @@ -0,0 +1,85 @@ + + +CodeMirror: Automatically derive odd wrapping behavior for your browser + + + + + +
+

Automatically derive odd wrapping behavior for your browser

+ + +

This is a hack to automatically derive + a spanAffectsWrapping regexp for a browser. See the + comments above that variable + in lib/codemirror.js + for some more details.

+ +
+

+
+    
+  
diff --git a/pitfall/pdfkit/node_modules/codemirror/demo/tern.html b/pitfall/pdfkit/node_modules/codemirror/demo/tern.html new file mode 100644 index 00000000..6843c7f5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/demo/tern.html @@ -0,0 +1,129 @@ + + +CodeMirror: Tern Demo + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Tern Demo

+

+ +

Demonstrates integration of Tern +and CodeMirror. The following keys are bound:

+ +
+
Ctrl-Space
Autocomplete
+
Ctrl-I
Find type at cursor
+
Alt-.
Jump to definition (Alt-, to jump back)
+
Ctrl-Q
Rename variable
+
+ +

Documentation is sparse for now. See the top of +the script for a rough API +overview.

+ + + +
diff --git a/pitfall/pdfkit/node_modules/codemirror/demo/theme.html b/pitfall/pdfkit/node_modules/codemirror/demo/theme.html new file mode 100644 index 00000000..a6e2b2da --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/demo/theme.html @@ -0,0 +1,121 @@ + + +CodeMirror: Theme Demo + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

Theme Demo

+ + +

Select a theme: +

+ + +
diff --git a/pitfall/pdfkit/node_modules/codemirror/demo/trailingspace.html b/pitfall/pdfkit/node_modules/codemirror/demo/trailingspace.html new file mode 100644 index 00000000..c3e9c376 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/demo/trailingspace.html @@ -0,0 +1,48 @@ + + +CodeMirror: Trailing Whitespace Demo + + + + + + + + + +
+

Trailing Whitespace Demo

+
+ + + +

Uses +the trailingspace +addon to highlight trailing whitespace.

+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/demo/variableheight.html b/pitfall/pdfkit/node_modules/codemirror/demo/variableheight.html new file mode 100644 index 00000000..ab241c6d --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/demo/variableheight.html @@ -0,0 +1,67 @@ + + +CodeMirror: Variable Height Demo + + + + + + + + + + +
+

Variable Height Demo

+
+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/demo/vim.html b/pitfall/pdfkit/node_modules/codemirror/demo/vim.html new file mode 100644 index 00000000..379fac14 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/demo/vim.html @@ -0,0 +1,74 @@ + + +CodeMirror: Vim bindings demo + + + + + + + + + + + + + +
+

Vim bindings demo

+
+ +
+ +

The vim keybindings are enabled by +including keymap/vim.js and setting +the keyMap option to "vim". Because +CodeMirror's internal API is quite different from Vim, they are only +a loose approximation of actual vim bindings, though.

+ + + +
diff --git a/pitfall/pdfkit/node_modules/codemirror/demo/visibletabs.html b/pitfall/pdfkit/node_modules/codemirror/demo/visibletabs.html new file mode 100644 index 00000000..5a5a19aa --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/demo/visibletabs.html @@ -0,0 +1,62 @@ + + +CodeMirror: Visible tabs demo + + + + + + + + + +
+

Visible tabs demo

+
+ +

Tabs inside the editor are spans with the +class cm-tab, and can be styled.

+ + + +
diff --git a/pitfall/pdfkit/node_modules/codemirror/demo/widget.html b/pitfall/pdfkit/node_modules/codemirror/demo/widget.html new file mode 100644 index 00000000..6c468539 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/demo/widget.html @@ -0,0 +1,85 @@ + + +CodeMirror: Inline Widget Demo + + + + + + + + + + +
+

Inline Widget Demo

+ + +
+ +

This demo runs JSHint over the code +in the editor (which is the script used on this page), and +inserts line widgets to +display the warnings that JSHint comes up with.

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/demo/xmlcomplete.html b/pitfall/pdfkit/node_modules/codemirror/demo/xmlcomplete.html new file mode 100644 index 00000000..2f81c54c --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/demo/xmlcomplete.html @@ -0,0 +1,116 @@ + + +CodeMirror: XML Autocomplete Demo + + + + + + + + + + + + +
+

XML Autocomplete Demo

+
+ +

Press ctrl-space, or type a '<' character to + activate autocompletion. This demo defines a simple schema that + guides completion. The schema can be customized—see + the manual.

+ +

Development of the xml-hint addon was kindly + sponsored + by www.xperiment.mobi.

+ + +
diff --git a/pitfall/pdfkit/node_modules/codemirror/doc/activebookmark.js b/pitfall/pdfkit/node_modules/codemirror/doc/activebookmark.js new file mode 100644 index 00000000..69a126e8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/doc/activebookmark.js @@ -0,0 +1,42 @@ +(function() { + var pending = false, prevVal = null; + + function updateSoon() { + if (!pending) { + pending = true; + setTimeout(update, 250); + } + } + + function update() { + pending = false; + var marks = document.getElementById("nav").getElementsByTagName("a"), found; + for (var i = 0; i < marks.length; ++i) { + var mark = marks[i], m; + if (mark.getAttribute("data-default")) { + if (found == null) found = i; + } else if (m = mark.href.match(/#(.*)/)) { + var ref = document.getElementById(m[1]); + if (ref && ref.getBoundingClientRect().top < 50) + found = i; + } + } + if (found != null && found != prevVal) { + prevVal = found; + var lis = document.getElementById("nav").getElementsByTagName("li"); + for (var i = 0; i < lis.length; ++i) lis[i].className = ""; + for (var i = 0; i < marks.length; ++i) { + if (found == i) { + marks[i].className = "active"; + for (var n = marks[i]; n; n = n.parentNode) + if (n.nodeName == "LI") n.className = "active"; + } else { + marks[i].className = ""; + } + } + } + } + + window.addEventListener("scroll", updateSoon); + window.addEventListener("load", updateSoon); +})(); diff --git a/pitfall/pdfkit/node_modules/codemirror/doc/compress.html b/pitfall/pdfkit/node_modules/codemirror/doc/compress.html new file mode 100644 index 00000000..3f3bfb04 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/doc/compress.html @@ -0,0 +1,234 @@ + + +CodeMirror: Compression Helper + + + + + +
+ +

Script compression helper

+ +

To optimize loading CodeMirror, especially when including a + bunch of different modes, it is recommended that you combine and + minify (and preferably also gzip) the scripts. This page makes + those first two steps very easy. Simply select the version and + scripts you need in the form below, and + click Compress to download the minified script + file.

+ +
+ +

Version:

+ + + +

+ with UglifyJS +

+ +

Custom code to add to the compressed file:

+
+ + + +
diff --git a/pitfall/pdfkit/node_modules/codemirror/doc/docs.css b/pitfall/pdfkit/node_modules/codemirror/doc/docs.css new file mode 100644 index 00000000..d2b0522e --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/doc/docs.css @@ -0,0 +1,225 @@ +@font-face { + font-family: 'Source Sans Pro'; + font-style: normal; + font-weight: 400; + src: local('Source Sans Pro'), local('SourceSansPro-Regular'), url(http://themes.googleusercontent.com/static/fonts/sourcesanspro/v5/ODelI1aHBYDBqgeIAH2zlBM0YzuT7MdOe03otPbuUS0.woff) format('woff'); +} + +body, html { margin: 0; padding: 0; height: 100%; } +section, article { display: block; padding: 0; } + +body { + background: #f8f8f8; + font-family: 'Source Sans Pro', Helvetica, Arial, sans-serif; + line-height: 1.5; +} + +p { margin-top: 0; } + +h2, h3 { + font-weight: normal; + margin-bottom: .7em; +} +h2 { font-size: 120%; } +h3 { font-size: 110%; } +article > h2:first-child, section:first-child > h2 { margin-top: 0; } + +a, a:visited, a:link, .quasilink { + color: #A21313; + text-decoration: none; +} + +em { + padding-right: 2px; +} + +.quasilink { + cursor: pointer; +} + +article { + max-width: 700px; + margin: 0 auto; + border-left: 2px solid #E30808; + border-right: 1px solid #ddd; + padding: 30px 50px 100px 50px; + background: white; + z-index: 2; + position: relative; + min-height: 100%; + box-sizing: border-box; + -moz-box-sizing: border-box; +} + +#nav { + position: fixed; + top: 30px; + right: 50%; + padding-right: 350px; + text-align: right; + z-index: 1; +} + +@media screen and (max-width: 1000px) { + article { + margin: 0 0 0 160px; + } + #nav { + left: 0; right: none; + width: 160px; + } +} + +#nav ul { + display: block; + margin: 0; padding: 0; + margin-bottom: 32px; +} + +#nav li { + display: block; + margin-bottom: 4px; +} + +#nav li ul { + font-size: 80%; + margin-bottom: 0; + display: none; +} + +#nav li.active ul { + display: block; +} + +#nav li li a { + padding-right: 20px; +} + +#nav ul a { + color: black; + padding: 0 7px 1px 11px; +} + +#nav ul a.active, #nav ul a:hover { + border-bottom: 1px solid #E30808; + color: #E30808; +} + +#logo { + border: 0; + margin-right: 7px; + margin-bottom: 25px; +} + +section { + border-top: 1px solid #E30808; + margin: 1.5em 0; +} + +section.first { + border: none; + margin-top: 0; +} + +#demo { + position: relative; +} + +#demolist { + position: absolute; + right: 5px; + top: 5px; + z-index: 25; +} + +#bankinfo { + text-align: left; + display: none; + padding: 0 .5em; + position: absolute; + border: 2px solid #aaa; + border-radius: 5px; + background: #eee; + top: 10px; + left: 30px; +} + +#bankinfo_close { + position: absolute; + top: 0; right: 6px; + font-weight: bold; + cursor: pointer; +} + +.bigbutton { + cursor: pointer; + text-align: center; + padding: 0 1em; + display: inline-block; + color: white; + position: relative; + line-height: 1.9; + color: white !important; + background: #A21313; +} + +.bigbutton.right { + border-bottom-left-radius: 100px; + border-top-left-radius: 100px; +} + +.bigbutton.left { + border-bottom-right-radius: 100px; + border-top-right-radius: 100px; +} + +.bigbutton:hover { + background: #E30808; +} + +th { + text-decoration: underline; + font-weight: normal; + text-align: left; +} + +#features ul { + list-style: none; + margin: 0 0 1em; + padding: 0 0 0 1.2em; +} + +#features li:before { + content: "-"; + width: 1em; + display: inline-block; + padding: 0; + margin: 0; + margin-left: -1em; +} + +.rel { + margin-bottom: 0; +} +.rel-note { + margin-top: 0; + color: #555; +} + +pre { + padding-left: 15px; + border-left: 2px solid #ddd; +} + +code { + padding: 0 2px; +} + +strong { + text-decoration: underline; + font-weight: normal; +} + +.field { + border: 1px solid #A21313; +} diff --git a/pitfall/pdfkit/node_modules/codemirror/doc/internals.html b/pitfall/pdfkit/node_modules/codemirror/doc/internals.html new file mode 100644 index 00000000..3f1b7de8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/doc/internals.html @@ -0,0 +1,503 @@ + + +CodeMirror: Internals + + + + + + + +
+ +

(Re-) Implementing A Syntax-Highlighting Editor in JavaScript

+ +

+ Topic: JavaScript, code editor implementation
+ Author: Marijn Haverbeke
+ Date: March 2nd 2011 (updated November 13th 2011) +

+ +

Caution: this text was written briefly after +version 2 was initially written. It no longer (even including the +update at the bottom) fully represents the current implementation. I'm +leaving it here as a historic document. For more up-to-date +information, look at the entries +tagged cm-internals +on my blog.

+ +

This is a followup to +my Brutal Odyssey to the +Dark Side of the DOM Tree story. That one describes the +mind-bending process of implementing (what would become) CodeMirror 1. +This one describes the internals of CodeMirror 2, a complete rewrite +and rethink of the old code base. I wanted to give this piece another +Hunter Thompson copycat subtitle, but somehow that would be out of +place—the process this time around was one of straightforward +engineering, requiring no serious mind-bending whatsoever.

+ +

So, what is wrong with CodeMirror 1? I'd estimate, by mailing list +activity and general search-engine presence, that it has been +integrated into about a thousand systems by now. The most prominent +one, since a few weeks, +being Google +code's project hosting. It works, and it's being used widely.

+ +

Still, I did not start replacing it because I was bored. CodeMirror +1 was heavily reliant on designMode +or contentEditable (depending on the browser). Neither of +these are well specified (HTML5 tries +to specify +their basics), and, more importantly, they tend to be one of the more +obscure and buggy areas of browser functionality—CodeMirror, by using +this functionality in a non-typical way, was constantly running up +against browser bugs. WebKit wouldn't show an empty line at the end of +the document, and in some releases would suddenly get unbearably slow. +Firefox would show the cursor in the wrong place. Internet Explorer +would insist on linkifying everything that looked like a URL or email +address, a behaviour that can't be turned off. Some bugs I managed to +work around (which was often a frustrating, painful process), others, +such as the Firefox cursor placement, I gave up on, and had to tell +user after user that they were known problems, but not something I +could help.

+ +

Also, there is the fact that designMode (which seemed +to be less buggy than contentEditable in Webkit and +Firefox, and was thus used by CodeMirror 1 in those browsers) requires +a frame. Frames are another tricky area. It takes some effort to +prevent getting tripped up by domain restrictions, they don't +initialize synchronously, behave strangely in response to the back +button, and, on several browsers, can't be moved around the DOM +without having them re-initialize. They did provide a very nice way to +namespace the library, though—CodeMirror 1 could freely pollute the +namespace inside the frame.

+ +

Finally, working with an editable document means working with +selection in arbitrary DOM structures. Internet Explorer (8 and +before) has an utterly different (and awkward) selection API than all +of the other browsers, and even among the different implementations of +document.selection, details about how exactly a selection +is represented vary quite a bit. Add to that the fact that Opera's +selection support tended to be very buggy until recently, and you can +imagine why CodeMirror 1 contains 700 lines of selection-handling +code.

+ +

And that brings us to the main issue with the CodeMirror 1 +code base: The proportion of browser-bug-workarounds to real +application code was getting dangerously high. By building on top of a +few dodgy features, I put the system in a vulnerable position—any +incompatibility and bugginess in these features, I had to paper over +with my own code. Not only did I have to do some serious stunt-work to +get it to work on older browsers (as detailed in the +previous story), things +also kept breaking in newly released versions, requiring me to come up +with new scary hacks in order to keep up. This was starting +to lose its appeal.

+ +
+

General Approach

+ +

What CodeMirror 2 does is try to sidestep most of the hairy hacks +that came up in version 1. I owe a lot to the +ACE editor for inspiration on how to +approach this.

+ +

I absolutely did not want to be completely reliant on key events to +generate my input. Every JavaScript programmer knows that key event +information is horrible and incomplete. Some people (most awesomely +Mihai Bazon with Ymacs) have been able +to build more or less functioning editors by directly reading key +events, but it takes a lot of work (the kind of never-ending, fragile +work I described earlier), and will never be able to properly support +things like multi-keystoke international character +input. [see below for caveat]

+ +

So what I do is focus a hidden textarea, and let the browser +believe that the user is typing into that. What we show to the user is +a DOM structure we built to represent his document. If this is updated +quickly enough, and shows some kind of believable cursor, it feels +like a real text-input control.

+ +

Another big win is that this DOM representation does not have to +span the whole document. Some CodeMirror 1 users insisted that they +needed to put a 30 thousand line XML document into CodeMirror. Putting +all that into the DOM takes a while, especially since, for some +reason, an editable DOM tree is slower than a normal one on most +browsers. If we have full control over what we show, we must only +ensure that the visible part of the document has been added, and can +do the rest only when needed. (Fortunately, the onscroll +event works almost the same on all browsers, and lends itself well to +displaying things only as they are scrolled into view.)

+
+
+

Input

+ +

ACE uses its hidden textarea only as a text input shim, and does +all cursor movement and things like text deletion itself by directly +handling key events. CodeMirror's way is to let the browser do its +thing as much as possible, and not, for example, define its own set of +key bindings. One way to do this would have been to have the whole +document inside the hidden textarea, and after each key event update +the display DOM to reflect what's in that textarea.

+ +

That'd be simple, but it is not realistic. For even medium-sized +document the editor would be constantly munging huge strings, and get +terribly slow. What CodeMirror 2 does is put the current selection, +along with an extra line on the top and on the bottom, into the +textarea.

+ +

This means that the arrow keys (and their ctrl-variations), home, +end, etcetera, do not have to be handled specially. We just read the +cursor position in the textarea, and update our cursor to match it. +Also, copy and paste work pretty much for free, and people get their +native key bindings, without any special work on my part. For example, +I have emacs key bindings configured for Chrome and Firefox. There is +no way for a script to detect this. [no longer the case]

+ +

Of course, since only a small part of the document sits in the +textarea, keys like page up and ctrl-end won't do the right thing. +CodeMirror is catching those events and handling them itself.

+
+
+

Selection

+ +

Getting and setting the selection range of a textarea in modern +browsers is trivial—you just use the selectionStart +and selectionEnd properties. On IE you have to do some +insane stuff with temporary ranges and compensating for the fact that +moving the selection by a 'character' will treat \r\n as a single +character, but even there it is possible to build functions that +reliably set and get the selection range.

+ +

But consider this typical case: When I'm somewhere in my document, +press shift, and press the up arrow, something gets selected. Then, if +I, still holding shift, press the up arrow again, the top of my +selection is adjusted. The selection remembers where its head +and its anchor are, and moves the head when we shift-move. +This is a generally accepted property of selections, and done right by +every editing component built in the past twenty years.

+ +

But not something that the browser selection APIs expose.

+ +

Great. So when someone creates an 'upside-down' selection, the next +time CodeMirror has to update the textarea, it'll re-create the +selection as an 'upside-up' selection, with the anchor at the top, and +the next cursor motion will behave in an unexpected way—our second +up-arrow press in the example above will not do anything, since it is +interpreted in exactly the same way as the first.

+ +

No problem. We'll just, ehm, detect that the selection is +upside-down (you can tell by the way it was created), and then, when +an upside-down selection is present, and a cursor-moving key is +pressed in combination with shift, we quickly collapse the selection +in the textarea to its start, allow the key to take effect, and then +combine its new head with its old anchor to get the real +selection.

+ +

In short, scary hacks could not be avoided entirely in CodeMirror +2.

+ +

And, the observant reader might ask, how do you even know that a +key combo is a cursor-moving combo, if you claim you support any +native key bindings? Well, we don't, but we can learn. The editor +keeps a set known cursor-movement combos (initialized to the +predictable defaults), and updates this set when it observes that +pressing a certain key had (only) the effect of moving the cursor. +This, of course, doesn't work if the first time the key is used was +for extending an inverted selection, but it works most of the +time.

+
+
+

Intelligent Updating

+ +

One thing that always comes up when you have a complicated internal +state that's reflected in some user-visible external representation +(in this case, the displayed code and the textarea's content) is +keeping the two in sync. The naive way is to just update the display +every time you change your state, but this is not only error prone +(you'll forget), it also easily leads to duplicate work on big, +composite operations. Then you start passing around flags indicating +whether the display should be updated in an attempt to be efficient +again and, well, at that point you might as well give up completely.

+ +

I did go down that road, but then switched to a much simpler model: +simply keep track of all the things that have been changed during an +action, and then, only at the end, use this information to update the +user-visible display.

+ +

CodeMirror uses a concept of operations, which start by +calling a specific set-up function that clears the state and end by +calling another function that reads this state and does the required +updating. Most event handlers, and all the user-visible methods that +change state are wrapped like this. There's a method +called operation that accepts a function, and returns +another function that wraps the given function as an operation.

+ +

It's trivial to extend this (as CodeMirror does) to detect nesting, +and, when an operation is started inside an operation, simply +increment the nesting count, and only do the updating when this count +reaches zero again.

+ +

If we have a set of changed ranges and know the currently shown +range, we can (with some awkward code to deal with the fact that +changes can add and remove lines, so we're dealing with a changing +coordinate system) construct a map of the ranges that were left +intact. We can then compare this map with the part of the document +that's currently visible (based on scroll offset and editor height) to +determine whether something needs to be updated.

+ +

CodeMirror uses two update algorithms—a full refresh, where it just +discards the whole part of the DOM that contains the edited text and +rebuilds it, and a patch algorithm, where it uses the information +about changed and intact ranges to update only the out-of-date parts +of the DOM. When more than 30 percent (which is the current heuristic, +might change) of the lines need to be updated, the full refresh is +chosen (since it's faster to do than painstakingly finding and +updating all the changed lines), in the other case it does the +patching (so that, if you scroll a line or select another character, +the whole screen doesn't have to be +re-rendered). [the full-refresh +algorithm was dropped, it wasn't really faster than the patching +one]

+ +

All updating uses innerHTML rather than direct DOM +manipulation, since that still seems to be by far the fastest way to +build documents. There's a per-line function that combines the +highlighting, marking, and +selection info for that line into a snippet of HTML. The patch updater +uses this to reset individual lines, the refresh updater builds an +HTML chunk for the whole visible document at once, and then uses a +single innerHTML update to do the refresh.

+
+
+

Parsers can be Simple

+ +

When I wrote CodeMirror 1, I +thought interruptable +parsers were a hugely scary and complicated thing, and I used a +bunch of heavyweight abstractions to keep this supposed complexity +under control: parsers +were iterators +that consumed input from another iterator, and used funny +closure-resetting tricks to copy and resume themselves.

+ +

This made for a rather nice system, in that parsers formed strictly +separate modules, and could be composed in predictable ways. +Unfortunately, it was quite slow (stacking three or four iterators on +top of each other), and extremely intimidating to people not used to a +functional programming style.

+ +

With a few small changes, however, we can keep all those +advantages, but simplify the API and make the whole thing less +indirect and inefficient. CodeMirror +2's mode API uses explicit state +objects, and makes the parser/tokenizer a function that simply takes a +state and a character stream abstraction, advances the stream one +token, and returns the way the token should be styled. This state may +be copied, optionally in a mode-defined way, in order to be able to +continue a parse at a given point. Even someone who's never touched a +lambda in his life can understand this approach. Additionally, far +fewer objects are allocated in the course of parsing now.

+ +

The biggest speedup comes from the fact that the parsing no longer +has to touch the DOM though. In CodeMirror 1, on an older browser, you +could see the parser work its way through the document, +managing some twenty lines in each 50-millisecond time slice it got. It +was reading its input from the DOM, and updating the DOM as it went +along, which any experienced JavaScript programmer will immediately +spot as a recipe for slowness. In CodeMirror 2, the parser usually +finishes the whole document in a single 100-millisecond time slice—it +manages some 1500 lines during that time on Chrome. All it has to do +is munge strings, so there is no real reason for it to be slow +anymore.

+
+
+

What Gives?

+ +

Given all this, what can you expect from CodeMirror 2?

+ +
    + +
  • Small. the base library is +some 45k when minified +now, 17k when gzipped. It's smaller than +its own logo.
  • + +
  • Lightweight. CodeMirror 2 initializes very +quickly, and does almost no work when it is not focused. This means +you can treat it almost like a textarea, have multiple instances on a +page without trouble.
  • + +
  • Huge document support. Since highlighting is +really fast, and no DOM structure is being built for non-visible +content, you don't have to worry about locking up your browser when a +user enters a megabyte-sized document.
  • + +
  • Extended API. Some things kept coming up in the +mailing list, such as marking pieces of text or lines, which were +extremely hard to do with CodeMirror 1. The new version has proper +support for these built in.
  • + +
  • Tab support. Tabs inside editable documents were, +for some reason, a no-go. At least six different people announced they +were going to add tab support to CodeMirror 1, none survived (I mean, +none delivered a working version). CodeMirror 2 no longer removes tabs +from your document.
  • + +
  • Sane styling. iframe nodes aren't +really known for respecting document flow. Now that an editor instance +is a plain div element, it is much easier to size it to +fit the surrounding elements. You don't even have to make it scroll if +you do not want to.
  • + +
+ +

On the downside, a CodeMirror 2 instance is not a native +editable component. Though it does its best to emulate such a +component as much as possible, there is functionality that browsers +just do not allow us to hook into. Doing select-all from the context +menu, for example, is not currently detected by CodeMirror.

+ +

[Updates from November 13th 2011] Recently, I've made +some changes to the codebase that cause some of the text above to no +longer be current. I've left the text intact, but added markers at the +passages that are now inaccurate. The new situation is described +below.

+
+
+

Content Representation

+ +

The original implementation of CodeMirror 2 represented the +document as a flat array of line objects. This worked well—splicing +arrays will require the part of the array after the splice to be +moved, but this is basically just a simple memmove of a +bunch of pointers, so it is cheap even for huge documents.

+ +

However, I recently added line wrapping and code folding (line +collapsing, basically). Once lines start taking up a non-constant +amount of vertical space, looking up a line by vertical position +(which is needed when someone clicks the document, and to determine +the visible part of the document during scrolling) can only be done +with a linear scan through the whole array, summing up line heights as +you go. Seeing how I've been going out of my way to make big documents +fast, this is not acceptable.

+ +

The new representation is based on a B-tree. The leaves of the tree +contain arrays of line objects, with a fixed minimum and maximum size, +and the non-leaf nodes simply hold arrays of child nodes. Each node +stores both the amount of lines that live below them and the vertical +space taken up by these lines. This allows the tree to be indexed both +by line number and by vertical position, and all access has +logarithmic complexity in relation to the document size.

+ +

I gave line objects and tree nodes parent pointers, to the node +above them. When a line has to update its height, it can simply walk +these pointers to the top of the tree, adding or subtracting the +difference in height from each node it encounters. The parent pointers +also make it cheaper (in complexity terms, the difference is probably +tiny in normal-sized documents) to find the current line number when +given a line object. In the old approach, the whole document array had +to be searched. Now, we can just walk up the tree and count the sizes +of the nodes coming before us at each level.

+ +

I chose B-trees, not regular binary trees, mostly because they +allow for very fast bulk insertions and deletions. When there is a big +change to a document, it typically involves adding, deleting, or +replacing a chunk of subsequent lines. In a regular balanced tree, all +these inserts or deletes would have to be done separately, which could +be really expensive. In a B-tree, to insert a chunk, you just walk +down the tree once to find where it should go, insert them all in one +shot, and then break up the node if needed. This breaking up might +involve breaking up nodes further up, but only requires a single pass +back up the tree. For deletion, I'm somewhat lax in keeping things +balanced—I just collapse nodes into a leaf when their child count goes +below a given number. This means that there are some weird editing +patterns that may result in a seriously unbalanced tree, but even such +an unbalanced tree will perform well, unless you spend a day making +strangely repeating edits to a really big document.

+
+
+

Keymaps

+ +

Above, I claimed that directly catching key +events for things like cursor movement is impractical because it +requires some browser-specific kludges. I then proceeded to explain +some awful hacks that were needed to make it +possible for the selection changes to be detected through the +textarea. In fact, the second hack is about as bad as the first.

+ +

On top of that, in the presence of user-configurable tab sizes and +collapsed and wrapped lines, lining up cursor movement in the textarea +with what's visible on the screen becomes a nightmare. Thus, I've +decided to move to a model where the textarea's selection is no longer +depended on.

+ +

So I moved to a model where all cursor movement is handled by my +own code. This adds support for a goal column, proper interaction of +cursor movement with collapsed lines, and makes it possible for +vertical movement to move through wrapped lines properly, instead of +just treating them like non-wrapped lines.

+ +

The key event handlers now translate the key event into a string, +something like Ctrl-Home or Shift-Cmd-R, and +use that string to look up an action to perform. To make keybinding +customizable, this lookup goes through +a table, using a scheme that +allows such tables to be chained together (for example, the default +Mac bindings fall through to a table named 'emacsy', which defines +basic Emacs-style bindings like Ctrl-F, and which is also +used by the custom Emacs bindings).

+ +

A new +option extraKeys +allows ad-hoc keybindings to be defined in a much nicer way than what +was possible with the +old onKeyEvent +callback. You simply provide an object mapping key identifiers to +functions, instead of painstakingly looking at raw key events.

+ +

Built-in commands map to strings, rather than functions, for +example "goLineUp" is the default action bound to the up +arrow key. This allows new keymaps to refer to them without +duplicating any code. New commands can be defined by assigning to +the CodeMirror.commands object, which maps such commands +to functions.

+ +

The hidden textarea now only holds the current selection, with no +extra characters around it. This has a nice advantage: polling for +input becomes much, much faster. If there's a big selection, this text +does not have to be read from the textarea every time—when we poll, +just noticing that something is still selected is enough to tell us +that no new text was typed.

+ +

The reason that cheap polling is important is that many browsers do +not fire useful events on IME (input method engine) input, which is +the thing where people inputting a language like Japanese or Chinese +use multiple keystrokes to create a character or sequence of +characters. Most modern browsers fire input when the +composing is finished, but many don't fire anything when the character +is updated during composition. So we poll, whenever the +editor is focused, to provide immediate updates of the display.

+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/doc/logo.png b/pitfall/pdfkit/node_modules/codemirror/doc/logo.png new file mode 100644 index 00000000..2334f5e0 Binary files /dev/null and b/pitfall/pdfkit/node_modules/codemirror/doc/logo.png differ diff --git a/pitfall/pdfkit/node_modules/codemirror/doc/logo.svg b/pitfall/pdfkit/node_modules/codemirror/doc/logo.svg new file mode 100644 index 00000000..9783869c --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/doc/logo.svg @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + image/svg+xml + + + + + + + if (unit == "char") moveOnce(); else if (unit == "column") moveOnce(true); else if (unit == "word" || unit == "group") { var sawType = null, group = unit == "group"; for (var first = true;; first = false) { if (dir < 0 && !moveOnce(!first)) break; var cur = lineObj.text.charAt(ch) || "\n"; var type = isWordChar(cur) ? "w" : !group ? null : /\s/.test(cur) ? null : "p"; // punctuation if (sawType && sawType + + Code Mirror + + diff --git a/pitfall/pdfkit/node_modules/codemirror/doc/manual.html b/pitfall/pdfkit/node_modules/codemirror/doc/manual.html new file mode 100644 index 00000000..a0c650e1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/doc/manual.html @@ -0,0 +1,2532 @@ + + +CodeMirror: User Manual + + + + + + + + + + + + + + + + +
+ +
+

User manual and reference guide

+ +

CodeMirror is a code-editor component that can be embedded in + Web pages. The core library provides only the editor + component, no accompanying buttons, auto-completion, or other IDE + functionality. It does provide a rich API on top of which such + functionality can be straightforwardly implemented. See + the addons included in the distribution, + and the list + of externally hosted addons, for reusable + implementations of extra features.

+ +

CodeMirror works with language-specific modes. Modes are + JavaScript programs that help color (and optionally indent) text + written in a given language. The distribution comes with a number + of modes (see the mode/ + directory), and it isn't hard to write new + ones for other languages.

+
+ +
+

Basic Usage

+ +

The easiest way to use CodeMirror is to simply load the script + and style sheet found under lib/ in the distribution, + plus a mode script from one of the mode/ directories. + (See the compression helper for an + easy way to combine scripts.) For example:

+ +
<script src="lib/codemirror.js"></script>
+<link rel="stylesheet" href="../lib/codemirror.css">
+<script src="mode/javascript/javascript.js"></script>
+ +

Having done this, an editor instance can be created like + this:

+ +
var myCodeMirror = CodeMirror(document.body);
+ +

The editor will be appended to the document body, will start + empty, and will use the mode that we loaded. To have more control + over the new editor, a configuration object can be passed + to CodeMirror as a second + argument:

+ +
var myCodeMirror = CodeMirror(document.body, {
+  value: "function myScript(){return 100;}\n",
+  mode:  "javascript"
+});
+ +

This will initialize the editor with a piece of code already in + it, and explicitly tell it to use the JavaScript mode (which is + useful when multiple modes are loaded). + See below for a full discussion of the + configuration options that CodeMirror accepts.

+ +

In cases where you don't want to append the editor to an + element, and need more control over the way it is inserted, the + first argument to the CodeMirror function can also + be a function that, when given a DOM element, inserts it into the + document somewhere. This could be used to, for example, replace a + textarea with a real editor:

+ +
var myCodeMirror = CodeMirror(function(elt) {
+  myTextArea.parentNode.replaceChild(elt, myTextArea);
+}, {value: myTextArea.value});
+ +

However, for this use case, which is a common way to use + CodeMirror, the library provides a much more powerful + shortcut:

+ +
var myCodeMirror = CodeMirror.fromTextArea(myTextArea);
+ +

This will, among other things, ensure that the textarea's value + is updated with the editor's contents when the form (if it is part + of a form) is submitted. See the API + reference for a full description of this method.

+ +
+
+

Configuration

+ +

Both the CodeMirror + function and its fromTextArea method take as second + (optional) argument an object containing configuration options. + Any option not supplied like this will be taken + from CodeMirror.defaults, an + object containing the default options. You can update this object + to change the defaults on your page.

+ +

Options are not checked in any way, so setting bogus option + values is bound to lead to odd errors.

+ +

These are the supported options:

+ +
+
value: string|CodeMirror.Doc
+
The starting value of the editor. Can be a string, or + a document object.
+ +
mode: string|object
+
The mode to use. When not given, this will default to the + first mode that was loaded. It may be a string, which either + simply names the mode or is + a MIME type + associated with the mode. Alternatively, it may be an object + containing configuration options for the mode, with + a name property that names the mode (for + example {name: "javascript", json: true}). The demo + pages for each mode contain information about what configuration + parameters the mode supports. You can ask CodeMirror which modes + and MIME types have been defined by inspecting + the CodeMirror.modes + and CodeMirror.mimeModes objects. The first maps + mode names to their constructors, and the second maps MIME types + to mode specs.
+ +
theme: string
+
The theme to style the editor with. You must make sure the + CSS file defining the corresponding .cm-s-[name] + styles is loaded (see + the theme directory in the + distribution). The default is "default", for which + colors are included in codemirror.css. It is + possible to use multiple theming classes at once—for + example "foo bar" will assign both + the cm-s-foo and the cm-s-bar classes + to the editor.
+ +
indentUnit: integer
+
How many spaces a block (whatever that means in the edited + language) should be indented. The default is 2.
+ +
smartIndent: boolean
+
Whether to use the context-sensitive indentation that the + mode provides (or just indent the same as the line before). + Defaults to true.
+ +
tabSize: integer
+
The width of a tab character. Defaults to 4.
+ +
indentWithTabs: boolean
+
Whether, when indenting, the first N*tabSize + spaces should be replaced by N tabs. Default is false.
+ +
electricChars: boolean
+
Configures whether the editor should re-indent the current + line when a character is typed that might change its proper + indentation (only works if the mode supports indentation). + Default is true.
+ +
specialChars: RegExp
+
A regular expression used to determine which characters + should be replaced by a + special placeholder. + Mostly useful for non-printing special characters. The default + is /[\u0000-\u0019\u00ad\u200b\u2028\u2029\ufeff]/.
+
specialCharPlaceholder: function(char) → Element
+
A function that, given a special character identified by + the specialChars + option, produces a DOM node that is used to represent the + character. By default, a red dot () + is shown, with a title tooltip to indicate the character code.
+ +
rtlMoveVisually: boolean
+
Determines whether horizontal cursor movement through + right-to-left (Arabic, Hebrew) text is visual (pressing the left + arrow moves the cursor left) or logical (pressing the left arrow + moves to the next lower index in the string, which is visually + right in right-to-left text). The default is false + on Windows, and true on other platforms.
+ +
keyMap: string
+
Configures the keymap to use. The default + is "default", which is the only keymap defined + in codemirror.js itself. Extra keymaps are found in + the keymap directory. See + the section on keymaps for more + information.
+ +
extraKeys: object
+
Can be used to specify extra keybindings for the editor, + alongside the ones defined + by keyMap. Should be + either null, or a valid keymap value.
+ +
lineWrapping: boolean
+
Whether CodeMirror should scroll or wrap for long lines. + Defaults to false (scroll).
+ +
lineNumbers: boolean
+
Whether to show line numbers to the left of the editor.
+ +
firstLineNumber: integer
+
At which number to start counting lines. Default is 1.
+ +
lineNumberFormatter: function(line: integer) → string
+
A function used to format line numbers. The function is + passed the line number, and should return a string that will be + shown in the gutter.
+ +
gutters: array<string>
+
Can be used to add extra gutters (beyond or instead of the + line number gutter). Should be an array of CSS class names, each + of which defines a width (and optionally a + background), and which will be used to draw the background of + the gutters. May include + the CodeMirror-linenumbers class, in order to + explicitly set the position of the line number gutter (it will + default to be to the right of all other gutters). These class + names are the keys passed + to setGutterMarker.
+ +
fixedGutter: boolean
+
Determines whether the gutter scrolls along with the content + horizontally (false) or whether it stays fixed during horizontal + scrolling (true, the default).
+ +
coverGutterNextToScrollbar: boolean
+
When fixedGutter + is on, and there is a horizontal scrollbar, by default the + gutter will be visible to the left of this scrollbar. If this + option is set to true, it will be covered by an element with + class CodeMirror-gutter-filler.
+ +
readOnly: boolean|string
+
This disables editing of the editor content by the user. If + the special value "nocursor" is given (instead of + simply true), focusing of the editor is also + disallowed.
+ +
showCursorWhenSelecting: boolean
+
Whether the cursor should be drawn when a selection is + active. Defaults to false.
+ +
undoDepth: integer
+
The maximum number of undo levels that the editor stores. + Defaults to 40.
+ +
historyEventDelay: integer
+
The period of inactivity (in milliseconds) that will cause a + new history event to be started when typing or deleting. + Defaults to 500.
+ +
tabindex: integer
+
The tab + index to assign to the editor. If not given, no tab index + will be assigned.
+ +
autofocus: boolean
+
Can be used to make CodeMirror focus itself on + initialization. Defaults to off. + When fromTextArea is + used, and no explicit value is given for this option, it will be + set to true when either the source textarea is focused, or it + has an autofocus attribute and no other element is + focused.
+
+ +

Below this a few more specialized, low-level options are + listed. These are only useful in very specific situations, you + might want to skip them the first time you read this manual.

+ +
+
dragDrop: boolean
+
Controls whether drag-and-drop is enabled. On by default.
+ +
onDragEvent: function(instance: CodeMirror, event: Event) → boolean
+
Deprecated! See these event + handlers for the current recommended approach.
When given, + this will be called when the editor is handling + a dragenter, dragover, + or drop event. It will be passed the editor + instance and the event object as arguments. The callback can + choose to handle the event itself, in which case it should + return true to indicate that CodeMirror should not + do anything further.
+ +
onKeyEvent: function(instance: CodeMirror, event: Event) → boolean
+
Deprecated! See these event + handlers for the current recommended approach.
This + provides a rather low-level hook into CodeMirror's key handling. + If provided, this function will be called on + every keydown, keyup, + and keypress event that CodeMirror captures. It + will be passed two arguments, the editor instance and the key + event. This key event is pretty much the raw key event, except + that a stop() method is always added to it. You + could feed it to, for example, jQuery.Event to + further normalize it.
This function can inspect the key + event, and handle it if it wants to. It may return true to tell + CodeMirror to ignore the event. Be wary that, on some browsers, + stopping a keydown does not stop + the keypress from firing, whereas on others it + does. If you respond to an event, you should probably inspect + its type property and only do something when it + is keydown (or keypress for actions + that need character data).
+ +
cursorBlinkRate: number
+
Half-period in milliseconds used for cursor blinking. The default blink + rate is 530ms. By setting this to zero, blinking can be disabled.
+ +
cursorScrollMargin: number
+
How much extra space to always keep above and below the + cursor when approaching the top or bottom of the visible view in + a scrollable document. Default is 0.
+ +
cursorHeight: number
+
Determines the height of the cursor. Default is 1, meaning + it spans the whole height of the line. For some fonts (and by + some tastes) a smaller height (for example 0.85), + which causes the cursor to not reach all the way to the bottom + of the line, looks better
+ +
resetSelectionOnContextMenu: boolean
+
Controls whether, when the context menu is opened with a + click outside of the current selection, the cursor is moved to + the point of the click. Defaults to true.
+ +
workTime, workDelay: number
+
Highlighting is done by a pseudo background-thread that will + work for workTime milliseconds, and then use + timeout to sleep for workDelay milliseconds. The + defaults are 200 and 300, you can change these options to make + the highlighting more or less aggressive.
+ +
workDelay: number
+
See workTime.
+ +
pollInterval: number
+
Indicates how quickly CodeMirror should poll its input + textarea for changes (when focused). Most input is captured by + events, but some things, like IME input on some browsers, don't + generate events that allow CodeMirror to properly detect it. + Thus, it polls. Default is 100 milliseconds.
+ +
flattenSpans: boolean
+
By default, CodeMirror will combine adjacent tokens into a + single span if they have the same class. This will result in a + simpler DOM tree, and thus perform better. With some kinds of + styling (such as rounded corners), this will change the way the + document looks. You can set this option to false to disable this + behavior.
+ +
maxHighlightLength: number
+
When highlighting long lines, in order to stay responsive, + the editor will give up and simply style the rest of the line as + plain text when it reaches a certain position. The default is + 10 000. You can set this to Infinity to turn off + this behavior.
+ +
crudeMeasuringFrom: number
+
When measuring the character positions in long lines, any + line longer than this number (default is 10 000), + when line wrapping + is off, will simply be assumed to consist of + same-sized characters. This means that, on the one hand, + measuring will be inaccurate when characters of varying size, + right-to-left text, markers, or other irregular elements are + present. On the other hand, it means that having such a line + won't freeze the user interface because of the expensiveness of + the measurements.
+ +
viewportMargin: integer
+
Specifies the amount of lines that are rendered above and + below the part of the document that's currently scrolled into + view. This affects the amount of updates needed when scrolling, + and the amount of work that such an update does. You should + usually leave it at its default, 10. Can be set + to Infinity to make sure the whole document is + always rendered, and thus the browser's text search works on it. + This will have bad effects on performance of big + documents.
+
+
+ +
+

Events

+ +

Various CodeMirror-related objects emit events, which allow + client code to react to various situations. Handlers for such + events can be registed with the on + and off methods on the objects + that the event fires on. To fire your own events, + use CodeMirror.signal(target, name, args...), + where target is a non-DOM-node object.

+ +

An editor instance fires the following events. + The instance argument always refers to the editor + itself.

+ +
+
"change" (instance: CodeMirror, changeObj: object)
+
Fires every time the content of the editor is changed. + The changeObj is a {from, to, text, removed, + next} object containing information about the changes + that occurred as second argument. from + and to are the positions (in the pre-change + coordinate system) where the change started and ended (for + example, it might be {ch:0, line:18} if the + position is at the beginning of line #19). text is + an array of strings representing the text that replaced the + changed range (split by line). removed is the text + that used to be between from and to, + which is overwritten by this change. If multiple changes + happened during a single operation, the object will have + a next property pointing to another change object + (which may point to another, etc).
+ +
"beforeChange" (instance: CodeMirror, changeObj: object)
+
This event is fired before a change is applied, and its + handler may choose to modify or cancel the change. + The changeObj object + has from, to, and text + properties, as with + the "change" event, but + never a next property, since this is fired for each + individual change, and not batched per operation. It also has + a cancel() method, which can be called to cancel + the change, and, if the change isn't coming + from an undo or redo event, an update(from, to, + text) method, which may be used to modify the change. + Undo or redo changes can't be modified, because they hold some + metainformation for restoring old marked ranges that is only + valid for that specific change. All three arguments + to update are optional, and can be left off to + leave the existing value for that field + intact. Note: you may not do anything from + a "beforeChange" handler that would cause changes + to the document or its visualization. Doing so will, since this + handler is called directly from the bowels of the CodeMirror + implementation, probably cause the editor to become + corrupted.
+ +
"cursorActivity" (instance: CodeMirror)
+
Will be fired when the cursor or selection moves, or any + change is made to the editor content.
+ +
"keyHandled" (instance: CodeMirror, name: string, event: Event)
+
Fired after a key is handled through a + keymap. name is the name of the handled key (for + example "Ctrl-X" or "'q'"), + and event is the DOM keydown + or keypress event.
+ +
"inputRead" (instance: CodeMirror, changeObj: object)
+
Fired whenever new input is read from the hidden textarea + (typed or pasted by the user).
+ +
"beforeSelectionChange" (instance: CodeMirror, selection: {head, anchor})
+
This event is fired before the selection is moved. Its + handler may modify the resulting selection head and anchor. + The selection parameter is an object + with head and anchor properties + holding {line, ch} objects, which the handler can + read and update. Handlers for this event have the same + restriction + as "beforeChange" + handlers — they should not do anything to directly update the + state of the editor.
+ +
"viewportChange" (instance: CodeMirror, from: number, to: number)
+
Fires whenever the view port of + the editor changes (due to scrolling, editing, or any other + factor). The from and to arguments + give the new start and end of the viewport.
+ +
"swapDoc" (instance: CodeMirror, oldDoc: Doc)
+
This is signalled when the editor's document is replaced + using the swapDoc + method.
+ +
"gutterClick" (instance: CodeMirror, line: integer, gutter: string, clickEvent: Event)
+
Fires when the editor gutter (the line-number area) is + clicked. Will pass the editor instance as first argument, the + (zero-based) number of the line that was clicked as second + argument, the CSS class of the gutter that was clicked as third + argument, and the raw mousedown event object as + fourth argument.
+ +
"gutterContextMenu" (instance: CodeMirror, line: integer, gutter: string, contextMenu: Event: Event)
+
Fires when the editor gutter (the line-number area) + receives a contextmenu event. Will pass the editor + instance as first argument, the (zero-based) number of the line + that was clicked as second argument, the CSS class of the + gutter that was clicked as third argument, and the raw + contextmenu mouse event object as fourth argument. + You can preventDefault the event, to signal that + CodeMirror should do no further handling.
+ +
"focus" (instance: CodeMirror)
+
Fires whenever the editor is focused.
+ +
"blur" (instance: CodeMirror)
+
Fires whenever the editor is unfocused.
+ +
"scroll" (instance: CodeMirror)
+
Fires when the editor is scrolled.
+ +
"update" (instance: CodeMirror)
+
Will be fired whenever CodeMirror updates its DOM display.
+ +
"renderLine" (instance: CodeMirror, line: LineHandle, element: Element)
+
Fired whenever a line is (re-)rendered to the DOM. Fired + right after the DOM element is built, before it is + added to the document. The handler may mess with the style of + the resulting element, or add event handlers, but + should not try to change the state of the editor.
+ +
"mousedown", + "dblclick", "contextmenu", "keydown", "keypress", + "keyup", "dragstart", "dragenter", + "dragover", "drop" + (instance: CodeMirror, event: Event)
+
Fired when CodeMirror is handling a DOM event of this type. + You can preventDefault the event, or give it a + truthy codemirrorIgnore property, to signal that + CodeMirror should do no further handling.
+
+ +

Document objects (instances + of CodeMirror.Doc) emit the + following events:

+ +
+
"change" (doc: CodeMirror.Doc, changeObj: object)
+
Fired whenever a change occurs to the + document. changeObj has a similar type as the + object passed to the + editor's "change" + event, but it never has a next property, because + document change events are not batched (whereas editor change + events are).
+ +
"beforeChange" (doc: CodeMirror.Doc, change: object)
+
See the description of the + same event on editor instances.
+ +
"cursorActivity" (doc: CodeMirror.Doc)
+
Fired whenever the cursor or selection in this document + changes.
+ +
"beforeSelectionChange" (doc: CodeMirror.Doc, selection: {head, anchor})
+
Equivalent to + the event by the same + name as fired on editor instances.
+
+ +

Line handles (as returned by, for + example, getLineHandle) + support these events:

+ +
+
"delete" ()
+
Will be fired when the line object is deleted. A line object + is associated with the start of the line. Mostly useful + when you need to find out when your gutter + markers on a given line are removed.
+
"change" (line: LineHandle, changeObj: object)
+
Fires when the line's text content is changed in any way + (but the line is not deleted outright). The change + object is similar to the one passed + to change event on the editor + object.
+
+ +

Marked range handles (CodeMirror.TextMarker), as returned + by markText + and setBookmark, emit the + following events:

+ +
+
"beforeCursorEnter" ()
+
Fired when the cursor enters the marked range. From this + event handler, the editor state may be inspected + but not modified, with the exception that the range on + which the event fires may be cleared.
+
"clear" (from: {line, ch}, to: {line, ch})
+
Fired when the range is cleared, either through cursor + movement in combination + with clearOnEnter + or through a call to its clear() method. Will only + be fired once per handle. Note that deleting the range through + text editing does not fire this event, because an undo action + might bring the range back into existence. from + and to give the part of the document that the range + spanned when it was cleared.
+
"hide" ()
+
Fired when the last part of the marker is removed from the + document by editing operations.
+
"unhide" ()
+
Fired when, after the marker was removed by editing, a undo + operation brought the marker back.
+
+ +

Line widgets (CodeMirror.LineWidget), returned + by addLineWidget, fire + these events:

+ +
+
"redraw" ()
+
Fired whenever the editor re-adds the widget to the DOM. + This will happen once right after the widget is added (if it is + scrolled into view), and then again whenever it is scrolled out + of view and back in again, or when changes to the editor options + or the line the widget is on require the widget to be + redrawn.
+
+
+ +
+

Keymaps

+ +

Keymaps are ways to associate keys with functionality. A keymap + is an object mapping strings that identify the keys to functions + that implement their functionality.

+ +

Keys are identified either by name or by character. + The CodeMirror.keyNames object defines names for + common keys and associates them with their key codes. Examples of + names defined here are Enter, F5, + and Q. These can be prefixed + with Shift-, Cmd-, Ctrl-, + and Alt- (in that order!) to specify a modifier. So + for example, Shift-Ctrl-Space would be a valid key + identifier.

+ +

Common example: map the Tab key to insert spaces instead of a tab + character.

+ +
+{
+  Tab: function(cm) {
+    var spaces = Array(cm.getOption("indentUnit") + 1).join(" ");
+    cm.replaceSelection(spaces, "end", "+input");
+  }
+}
+ +

Alternatively, a character can be specified directly by + surrounding it in single quotes, for example '$' + or 'q'. Due to limitations in the way browsers fire + key events, these may not be prefixed with modifiers.

+ +

The CodeMirror.keyMap object associates keymaps + with names. User code and keymap definitions can assign extra + properties to this object. Anywhere where a keymap is expected, a + string can be given, which will be looked up in this object. It + also contains the "default" keymap holding the + default bindings.

+ +

The values of properties in keymaps can be either functions of + a single argument (the CodeMirror instance), strings, or + false. Such strings refer to properties of the + CodeMirror.commands object, which defines a number of + common commands that are used by the default keybindings, and maps + them to functions. If the property is set to false, + CodeMirror leaves handling of the key up to the browser. A key + handler function may return CodeMirror.Pass to indicate + that it has decided not to handle the key, and other handlers (or + the default behavior) should be given a turn.

+ +

Keys mapped to command names that start with the + characters "go" (which should be used for + cursor-movement actions) will be fired even when an + extra Shift modifier is present (i.e. "Up": + "goLineUp" matches both up and shift-up). This is used to + easily implement shift-selection.

+ +

Keymaps can defer to each other by defining + a fallthrough property. This indicates that when a + key is not found in the map itself, one or more other maps should + be searched. It can hold either a single keymap or an array of + keymaps.

+ +

When a keymap contains a nofallthrough property + set to true, keys matched against that map will be + ignored if they don't match any of the bindings in the map (no + further child maps will be tried). When + the disableInput property is set + to true, the default effect of inserting a character + will be suppressed when the keymap is active as the top-level + map.

+
+ +
+

Customized Styling

+ +

Up to a certain extent, CodeMirror's look can be changed by + modifying style sheet files. The style sheets supplied by modes + simply provide the colors for that mode, and can be adapted in a + very straightforward way. To style the editor itself, it is + possible to alter or override the styles defined + in codemirror.css.

+ +

Some care must be taken there, since a lot of the rules in this + file are necessary to have CodeMirror function properly. Adjusting + colors should be safe, of course, and with some care a lot of + other things can be changed as well. The CSS classes defined in + this file serve the following roles:

+ +
+
CodeMirror
+
The outer element of the editor. This should be used for the + editor width, height, borders and positioning. Can also be used + to set styles that should hold for everything inside the editor + (such as font and font size), or to set a background.
+ +
CodeMirror-scroll
+
Whether the editor scrolls (overflow: auto + + fixed height). By default, it does. Setting + the CodeMirror class to have height: + auto and giving this class overflow-x: auto; + overflow-y: hidden; will cause the editor + to resize to fit its + content.
+ +
CodeMirror-focused
+
Whenever the editor is focused, the top element gets this + class. This is used to hide the cursor and give the selection a + different color when the editor is not focused.
+ +
CodeMirror-gutters
+
This is the backdrop for all gutters. Use it to set the + default gutter background color, and optionally add a border on + the right of the gutters.
+ +
CodeMirror-linenumbers
+
Use this for giving a background or width to the line number + gutter.
+ +
CodeMirror-linenumber
+
Used to style the actual individual line numbers. These + won't be children of the CodeMirror-linenumbers + (plural) element, but rather will be absolutely positioned to + overlay it. Use this to set alignment and text properties for + the line numbers.
+ +
CodeMirror-lines
+
The visible lines. This is where you specify vertical + padding for the editor content.
+ +
CodeMirror-cursor
+
The cursor is a block element that is absolutely positioned. + You can make it look whichever way you want.
+ +
CodeMirror-selected
+
The selection is represented by span elements + with this class.
+ +
CodeMirror-matchingbracket, + CodeMirror-nonmatchingbracket
+
These are used to style matched (or unmatched) brackets.
+
+ +

If your page's style sheets do funky things to + all div or pre elements (you probably + shouldn't do that), you'll have to define rules to cancel these + effects out again for elements under the CodeMirror + class.

+ +

Themes are also simply CSS files, which define colors for + various syntactic elements. See the files in + the theme directory.

+
+ +
+

Programming API

+ +

A lot of CodeMirror features are only available through its + API. Thus, you need to write code (or + use addons) if you want to expose them to + your users.

+ +

Whenever points in the document are represented, the API uses + objects with line and ch properties. + Both are zero-based. CodeMirror makes sure to 'clip' any positions + passed by client code so that they fit inside the document, so you + shouldn't worry too much about sanitizing your coordinates. If you + give ch a value of null, or don't + specify it, it will be replaced with the length of the specified + line.

+ +

Methods prefixed with doc. can, unless otherwise + specified, be called both on CodeMirror (editor) + instances and CodeMirror.Doc instances. Methods + prefixed with cm. are only available + on CodeMirror instances.

+ +

Constructor

+ +

Constructing an editor instance is done with + the CodeMirror(place: Element|fn(Element), + ?option: object) constructor. If the place + argument is a DOM element, the editor will be appended to it. If + it is a function, it will be called, and is expected to place the + editor into the document. options may be an element + mapping option names to values. The options + that it doesn't explicitly specify (or all options, if it is not + passed) will be taken + from CodeMirror.defaults.

+ +

Note that the options object passed to the constructor will be + mutated when the instance's options + are changed, so you shouldn't share such + objects between instances.

+ +

See CodeMirror.fromTextArea + for another way to construct an editor instance.

+ +

Content manipulation methods

+ +
+
doc.getValue(?separator: string) → string
+
Get the current editor content. You can pass it an optional + argument to specify the string to be used to separate lines + (defaults to "\n").
+
doc.setValue(content: string)
+
Set the editor content.
+ +
doc.getRange(from: {line, ch}, to: {line, ch}, ?separator: string) → string
+
Get the text between the given points in the editor, which + should be {line, ch} objects. An optional third + argument can be given to indicate the line separator string to + use (defaults to "\n").
+
doc.replaceRange(replacement: string, from: {line, ch}, to: {line, ch})
+
Replace the part of the document between from + and to with the given string. from + and to must be {line, ch} + objects. to can be left off to simply insert the + string at position from.
+ +
doc.getLine(n: integer) → string
+
Get the content of line n.
+
doc.setLine(n: integer, text: string)
+
Set the content of line n.
+
doc.removeLine(n: integer)
+
Remove the given line from the document.
+ +
doc.lineCount() → integer
+
Get the number of lines in the editor.
+
doc.firstLine() → integer
+
Get the first line of the editor. This will + usually be zero but for linked sub-views, + or documents instantiated with a non-zero + first line, it might return other values.
+
doc.lastLine() → integer
+
Get the last line of the editor. This will + usually be doc.lineCount() - 1, + but for linked sub-views, + it might return other values.
+ +
doc.getLineHandle(num: integer) → LineHandle
+
Fetches the line handle for the given line number.
+
doc.getLineNumber(handle: LineHandle) → integer
+
Given a line handle, returns the current position of that + line (or null when it is no longer in the + document).
+
doc.eachLine(f: (line: LineHandle))
+
doc.eachLine(start: integer, end: integer, f: (line: LineHandle))
+
Iterate over the whole document, or if start + and end line numbers are given, the range + from start up to (not including) end, + and call f for each line, passing the line handle. + This is a faster way to visit a range of line handlers than + calling getLineHandle + for each of them. Note that line handles have + a text property containing the line's content (as a + string).
+ +
doc.markClean()
+
Set the editor content as 'clean', a flag that it will + retain until it is edited, and which will be set again when such + an edit is undone again. Useful to track whether the content + needs to be saved. This function is deprecated in favor + of changeGeneration, + which allows multiple subsystems to track different notions of + cleanness without interfering.
+
doc.changeGeneration() → integer
+
Returns a number that can later be passed + to isClean to test whether + any edits were made (and not undone) in the meantime.
+
doc.isClean(?generation: integer) → boolean
+
Returns whether the document is currently clean — not + modified since initialization or the last call + to markClean if no + argument is passed, or since the matching call + to changeGeneration + if a generation value is given.
+
+ +

Cursor and selection methods

+ +
+
doc.getSelection() → string
+
Get the currently selected code.
+
doc.replaceSelection(replacement: string, ?collapse: string)
+
Replace the selection with the given string. By default, the + new selection will span the inserted text. The + optional collapse argument can be used to change + this—passing "start" or "end" will + collapse the selection to the start or end of the inserted + text.
+ +
doc.getCursor(?start: string) → {line, ch}
+
start is a an optional string indicating which + end of the selection to return. It may + be "start", "end", "head" + (the side of the selection that moves when you press + shift+arrow), or "anchor" (the fixed side of the + selection). Omitting the argument is the same as + passing "head". A {line, ch} object + will be returned.
+
doc.somethingSelected() → boolean
+
Return true if any text is selected.
+
doc.setCursor(pos: {line, ch})
+
Set the cursor position. You can either pass a + single {line, ch} object, or the line and the + character as two separate parameters.
+
doc.setSelection(anchor: {line, ch}, ?head: {line, ch})
+
Set the selection range. anchor + and head should be {line, ch} + objects. head defaults to anchor when + not given.
+
doc.extendSelection(from: {line, ch}, ?to: {line, ch})
+
Similar + to setSelection, but + will, if shift is held or + the extending flag is set, move the + head of the selection while leaving the anchor at its current + place. to is optional, and can be passed to + ensure a region (for example a word or paragraph) will end up + selected (in addition to whatever lies between that region and + the current anchor).
+
doc.setExtending(value: boolean)
+
Sets or clears the 'extending' flag, which acts similar to + the shift key, in that it will cause cursor movement and calls + to extendSelection + to leave the selection anchor in place.
+ +
cm.hasFocus() → boolean
+
Tells you whether the editor currently has focus.
+ +
cm.findPosH(start: {line, ch}, amount: integer, unit: string, visually: boolean) → {line, ch, ?hitSide: boolean}
+
Used to find the target position for horizontal cursor + motion. start is a {line, ch} + object, amount an integer (may be negative), + and unit one of the + string "char", "column", + or "word". Will return a position that is produced + by moving amount times the distance specified + by unit. When visually is true, motion + in right-to-left text will be visual rather than logical. When + the motion was clipped by hitting the end or start of the + document, the returned value will have a hitSide + property set to true.
+
cm.findPosV(start: {line, ch}, amount: integer, unit: string) → {line, ch, ?hitSide: boolean}
+
Similar to findPosH, + but used for vertical motion. unit may + be "line" or "page". The other + arguments and the returned value have the same interpretation as + they have in findPosH.
+
+ +

Configuration methods

+ +
+
cm.setOption(option: string, value: any)
+
Change the configuration of the editor. option + should the name of an option, + and value should be a valid value for that + option.
+
cm.getOption(option: string) → any
+
Retrieves the current value of the given option for this + editor instance.
+ +
cm.addKeyMap(map: object, bottom: boolean)
+
Attach an additional keymap to the + editor. This is mostly useful for addons that need to register + some key handlers without trampling on + the extraKeys + option. Maps added in this way have a higher precedence than + the extraKeys + and keyMap options, + and between them, the maps added earlier have a lower precedence + than those added later, unless the bottom argument + was passed, in which case they end up below other keymaps added + with this method.
+
cm.removeKeyMap(map: object)
+
Disable a keymap added + with addKeyMap. Either + pass in the keymap object itself, or a string, which will be + compared against the name property of the active + keymaps.
+ +
cm.addOverlay(mode: string|object, ?options: object)
+
Enable a highlighting overlay. This is a stateless mini-mode + that can be used to add extra highlighting. For example, + the search addon uses it to + highlight the term that's currently being + searched. mode can be a mode + spec or a mode object (an object with + a token method). + The options parameter is optional. If given, it + should be an object. Currently, only the opaque + option is recognized. This defaults to off, but can be given to + allow the overlay styling, when not null, to + override the styling of the base mode entirely, instead of the + two being applied together.
+
cm.removeOverlay(mode: string|object)
+
Pass this the exact value passed for the mode + parameter to addOverlay, + or a string that corresponds to the name propery of + that value, to remove an overlay again.
+ +
cm.on(type: string, func: (...args))
+
Register an event handler for the given event type (a + string) on the editor instance. There is also + a CodeMirror.on(object, type, func) version + that allows registering of events on any object.
+
cm.off(type: string, func: (...args))
+
Remove an event handler on the editor instance. An + equivalent CodeMirror.off(object, type, + func) also exists.
+
+ +

Document management methods

+ +

Each editor is associated with an instance + of CodeMirror.Doc, its document. A document + represents the editor content, plus a selection, an undo history, + and a mode. A document can only be + associated with a single editor at a time. You can create new + documents by calling the CodeMirror.Doc(text, mode, + firstLineNumber) constructor. The last two arguments are + optional and can be used to set a mode for the document and make + it start at a line number other than 0, respectively.

+ +
+
cm.getDoc() → Doc
+
Retrieve the currently active document from an editor.
+
doc.getEditor() → CodeMirror
+
Retrieve the editor associated with a document. May + return null.
+ +
cm.swapDoc(doc: CodeMirror.Doc) → Doc
+
Attach a new document to the editor. Returns the old + document, which is now no longer associated with an editor.
+ +
doc.copy(copyHistory: boolean) → Doc
+
Create an identical copy of the given doc. + When copyHistory is true, the history will also be + copied. Can not be called directly on an editor.
+ +
doc.linkedDoc(options: object) → Doc
+
Create a new document that's linked to the target document. + Linked documents will stay in sync (changes to one are also + applied to the other) until unlinked. + These are the options that are supported: +
+
sharedHist: boolean
+
When turned on, the linked copy will share an undo + history with the original. Thus, something done in one of + the two can be undone in the other, and vice versa.
+
from: integer
+
to: integer
+
Can be given to make the new document a subview of the + original. Subviews only show a given range of lines. Note + that line coordinates inside the subview will be consistent + with those of the parent, so that for example a subview + starting at line 10 will refer to its first line as line 10, + not 0.
+
mode: string|object
+
By default, the new document inherits the mode of the + parent. This option can be set to + a mode spec to give it a + different mode.
+
+
doc.unlinkDoc(doc: CodeMirror.Doc)
+
Break the link between two documents. After calling this, + changes will no longer propagate between the documents, and, if + they had a shared history, the history will become + separate.
+
doc.iterLinkedDocs(function: (doc: CodeMirror.Doc, sharedHist: boolean))
+
Will call the given function for all documents linked to the + target document. It will be passed two arguments, the linked document + and a boolean indicating whether that document shares history + with the target.
+
+ +

History-related methods

+ +
+
doc.undo()
+
Undo one edit (if any undo events are stored).
+
doc.redo()
+
Redo one undone edit.
+ +
doc.historySize() → {undo: integer, redo: integer}
+
Returns an object with {undo, redo} properties, + both of which hold integers, indicating the amount of stored + undo and redo operations.
+
doc.clearHistory()
+
Clears the editor's undo history.
+
doc.getHistory() → object
+
Get a (JSON-serializeable) representation of the undo history.
+
doc.setHistory(history: object)
+
Replace the editor's undo history with the one provided, + which must be a value as returned + by getHistory. Note that + this will have entirely undefined results if the editor content + isn't also the same as it was when getHistory was + called.
+
+ +

Text-marking methods

+ +
+
doc.markText(from: {line, ch}, to: {line, ch}, ?options: object) → TextMarker
+
Can be used to mark a range of text with a specific CSS + class name. from and to should + be {line, ch} objects. The options + parameter is optional. When given, it should be an object that + may contain the following configuration options: +
+
className: string
+
Assigns a CSS class to the marked stretch of text.
+
inclusiveLeft: boolean
+
Determines whether + text inserted on the left of the marker will end up inside + or outside of it.
+
inclusiveRight: boolean
+
Like inclusiveLeft, + but for the right side.
+
atomic: boolean
+
Atomic ranges act as a single unit when cursor movement is + concerned—i.e. it is impossible to place the cursor inside of + them. In atomic ranges, inclusiveLeft + and inclusiveRight have a different meaning—they + will prevent the cursor from being placed respectively + directly before and directly after the range.
+
collapsed: boolean
+
Collapsed ranges do not show up in the display. Setting a + range to be collapsed will automatically make it atomic.
+
clearOnEnter: boolean
+
When enabled, will cause the mark to clear itself whenever + the cursor enters its range. This is mostly useful for + text-replacement widgets that need to 'snap open' when the + user tries to edit them. The + "clear" event + fired on the range handle can be used to be notified when this + happens.
+
replacedWith: Element
+
Use a given node to display this range. Implies both + collapsed and atomic. The given DOM node must be an + inline element (as opposed to a block element).
+
handleMouseEvents: boolean
+
When replacedWith is given, this determines + whether the editor will capture mouse and drag events + occurring in this widget. Default is false—the events will be + left alone for the default browser handler, or specific + handlers on the widget, to capture.
+
readOnly: boolean
+
A read-only span can, as long as it is not cleared, not be + modified except by + calling setValue to reset + the whole document. Note: adding a read-only span + currently clears the undo history of the editor, because + existing undo events being partially nullified by read-only + spans would corrupt the history (in the current + implementation).
+
addToHistory: boolean
+
When set to true (default is false), adding this marker + will create an event in the undo history that can be + individually undone (clearing the marker).
+
startStyle: string
Can be used to specify + an extra CSS class to be applied to the leftmost span that + is part of the marker.
+
endStyle: string
Equivalent + to startStyle, but for the rightmost span.
+
title: + string
When given, will give the nodes created + for this span a HTML title attribute with the + given value.
+
shared: boolean
When the + target document is linked to other + documents, you can set shared to true to make the + marker appear in all documents. By default, a marker appears + only in its target document.
+
+ The method will return an object that represents the marker + (with constuctor CodeMirror.TextMarker), which + exposes three methods: + clear(), to remove the mark, + find(), which returns + a {from, to} object (both holding document + positions), indicating the current position of the marked range, + or undefined if the marker is no longer in the + document, and finally changed(), + which you can call if you've done something that might change + the size of the marker (for example changing the content of + a replacedWith + node), and want to cheaply update the display.
+ +
doc.setBookmark(pos: {line, ch}, ?options: object) → TextMarker
+
Inserts a bookmark, a handle that follows the text around it + as it is being edited, at the given position. A bookmark has two + methods find() and clear(). The first + returns the current position of the bookmark, if it is still in + the document, and the second explicitly removes the bookmark. + The options argument is optional. If given, the following + properties are recognized: +
+
widget: Element
Can be used to display a DOM + node at the current location of the bookmark (analogous to + the replacedWith + option to markText).
+
insertLeft: boolean
By default, text typed + when the cursor is on top of the bookmark will end up to the + right of the bookmark. Set this option to true to make it go + to the left instead.
+
+ +
doc.findMarksAt(pos: {line, ch}) → array<TextMarker>
+
Returns an array of all the bookmarks and marked ranges + present at the given position.
+
doc.getAllMarks() → array<TextMarker>
+
Returns an array containing all marked ranges in the document.
+
+ +

Widget, gutter, and decoration methods

+ +
+
cm.setGutterMarker(line: integer|LineHandle, gutterID: string, value: Element) → LineHandle
+
Sets the gutter marker for the given gutter (identified by + its CSS class, see + the gutters option) + to the given value. Value can be either null, to + clear the marker, or a DOM element, to set it. The DOM element + will be shown in the specified gutter next to the specified + line.
+ +
cm.clearGutter(gutterID: string)
+
Remove all gutter markers in + the gutter with the given ID.
+ +
cm.addLineClass(line: integer|LineHandle, where: string, class: string) → LineHandle
+
Set a CSS class name for the given line. line + can be a number or a line handle. where determines + to which element this class should be applied, can can be one + of "text" (the text element, which lies in front of + the selection), "background" (a background element + that will be behind the selection), or "wrap" (the + wrapper node that wraps all of the line's elements, including + gutter elements). class should be the name of the + class to apply.
+ +
cm.removeLineClass(line: integer|LineHandle, where: string, class: string) → LineHandle
+
Remove a CSS class from a line. line can be a + line handle or number. where should be one + of "text", "background", + or "wrap" + (see addLineClass). class + can be left off to remove all classes for the specified node, or + be a string to remove only a specific class.
+ +
cm.lineInfo(line: integer|LineHandle) → object
+
Returns the line number, text content, and marker status of + the given line, which can be either a number or a line handle. + The returned object has the structure {line, handle, text, + gutterMarkers, textClass, bgClass, wrapClass, widgets}, + where gutterMarkers is an object mapping gutter IDs + to marker elements, and widgets is an array + of line widgets attached to this + line, and the various class properties refer to classes added + with addLineClass.
+ +
cm.addWidget(pos: {line, ch}, node: Element, scrollIntoView: boolean)
+
Puts node, which should be an absolutely + positioned DOM node, into the editor, positioned right below the + given {line, ch} position. + When scrollIntoView is true, the editor will ensure + that the entire node is visible (if possible). To remove the + widget again, simply use DOM methods (move it somewhere else, or + call removeChild on its parent).
+ +
cm.addLineWidget(line: integer|LineHandle, node: Element, ?options: object) → LineWidget
+
Adds a line widget, an element shown below a line, spanning + the whole of the editor's width, and moving the lines below it + downwards. line should be either an integer or a + line handle, and node should be a DOM node, which + will be displayed below the given line. options, + when given, should be an object that configures the behavior of + the widget. The following options are supported (all default to + false): +
+
coverGutter: boolean
+
Whether the widget should cover the gutter.
+
noHScroll: boolean
+
Whether the widget should stay fixed in the face of + horizontal scrolling.
+
above: boolean
+
Causes the widget to be placed above instead of below + the text of the line.
+
showIfHidden: boolean
+
When true, will cause the widget to be rendered even if + the line it is associated with is hidden.
+
handleMouseEvents: boolean
+
Determines whether the editor will capture mouse and + drag events occurring in this widget. Default is false—the + events will be left alone for the default browser handler, + or specific handlers on the widget, to capture.
+
insertAt: integer
+
By default, the widget is added below other widgets for + the line. This option can be used to place it at a different + position (zero for the top, N to put it after the Nth other + widget). Note that this only has effect once, when the + widget is created. +
+ Note that the widget node will become a descendant of nodes with + CodeMirror-specific CSS classes, and those classes might in some + cases affect it. This method returns an object that represents + the widget placement. It'll have a line property + pointing at the line handle that it is associated with, and the following methods: +
+
clear()
Removes the widget.
+
changed()
Call + this if you made some change to the widget's DOM node that + might affect its height. It'll force CodeMirror to update + the height of the line that contains the widget.
+
+
+
+ +

Sizing, scrolling and positioning methods

+ +
+
cm.setSize(width: number|string, height: number|string)
+
Programatically set the size of the editor (overriding the + applicable CSS + rules). width and height + can be either numbers (interpreted as pixels) or CSS units + ("100%", for example). You can + pass null for either of them to indicate that that + dimension should not be changed.
+ +
cm.scrollTo(x: number, y: number)
+
Scroll the editor to a given (pixel) position. Both + arguments may be left as null + or undefined to have no effect.
+
cm.getScrollInfo() → {left, top, width, height, clientWidth, clientHeight}
+
Get an {left, top, width, height, clientWidth, + clientHeight} object that represents the current scroll + position, the size of the scrollable area, and the size of the + visible area (minus scrollbars).
+
cm.scrollIntoView(what: {line, ch}|{left, top, right, bottom}|{from, to}|null, ?margin: number)
+
Scrolls the given position into view. what may + be null to scroll the cursor into view, + a {line, ch} position to scroll a character into + view, a {left, top, right, bottom} pixel range (in + editor-local coordinates), or a range {from, to} + containing either two character positions or two pixel squares. + The margin parameter is optional. When given, it + indicates the amount of vertical pixels around the given area + that should be made visible as well.
+ +
cm.cursorCoords(where: boolean|{line, ch}, mode: string) → {left, top, bottom}
+
Returns an {left, top, bottom} object + containing the coordinates of the cursor position. + If mode is "local", they will be + relative to the top-left corner of the editable document. If it + is "page" or not given, they are relative to the + top-left corner of the page. where can be a boolean + indicating whether you want the start (true) or the + end (false) of the selection, or, if a {line, + ch} object is given, it specifies the precise position at + which you want to measure.
+
cm.charCoords(pos: {line, ch}, ?mode: string) → {left, right, top, bottom}
+
Returns the position and dimensions of an arbitrary + character. pos should be a {line, ch} + object. This differs from cursorCoords in that + it'll give the size of the whole character, rather than just the + position that the cursor would have when it would sit at that + position.
+
cm.coordsChar(object: {left, top}, ?mode: string) → {line, ch}
+
Given an {left, top} object, returns + the {line, ch} position that corresponds to it. The + optional mode parameter determines relative to what + the coordinates are interpreted. It may + be "window", "page" (the default), + or "local".
+
cm.lineAtHeight(height: number, ?mode: string) → number
+
Computes the line at the given pixel + height. mode can be one of the same strings + that coordsChar + accepts.
+
cm.heightAtLine(line: number, ?mode: string) → number
+
Computes the height of the top of a line, in the coordinate + system specified by mode + (see coordsChar), which + defaults to "page". When a line below the bottom of + the document is specified, the returned value is the bottom of + the last line in the document.
+
cm.defaultTextHeight() → number
+
Returns the line height of the default font for the editor.
+
cm.defaultCharWidth() → number
+
Returns the pixel width of an 'x' in the default font for + the editor. (Note that for non-monospace fonts, this is mostly + useless, and even for monospace fonts, non-ascii characters + might have a different width).
+ +
cm.getViewport() → {from: number, to: number}
+
Returns a {from, to} object indicating the + start (inclusive) and end (exclusive) of the currently rendered + part of the document. In big documents, when most content is + scrolled out of view, CodeMirror will only render the visible + part, and a margin around it. See also + the viewportChange + event.
+ +
cm.refresh()
+
If your code does something to change the size of the editor + element (window resizes are already listened for), or unhides + it, you should probably follow up by calling this method to + ensure CodeMirror is still looking as intended.
+
+ +

Mode, state, and token-related methods

+ +

When writing language-aware functionality, it can often be + useful to hook into the knowledge that the CodeMirror language + mode has. See the section on modes for a + more detailed description of how these work.

+ +
+
doc.getMode() → object
+
Gets the (outer) mode object for the editor. Note that this + is distinct from getOption("mode"), which gives you + the mode specification, rather than the resolved, instantiated + mode object.
+ +
doc.getModeAt(pos: {line, ch}) → object
+
Gets the inner mode at a given position. This will return + the same as getMode for + simple modes, but will return an inner mode for nesting modes + (such as htmlmixed).
+ +
cm.getTokenAt(pos: {line, ch}, ?precise: boolean) → object
+
Retrieves information about the token the current mode found + before the given position (a {line, ch} object). The + returned object has the following properties: +
+
start
The character (on the given line) at which the token starts.
+
end
The character at which the token ends.
+
string
The token's string.
+
type
The token type the mode assigned + to the token, such as "keyword" + or "comment" (may also be null).
+
state
The mode's state at the end of this token.
+
+ If precise is true, the token will be guaranteed to be accurate based on recent edits. If false or + not specified, the token will use cached state information, which will be faster but might not be accurate if + edits were recently made and highlighting has not yet completed. +
+ +
cm.getTokenTypeAt(pos: {line, ch}) → string
+
This is a (much) cheaper version + of getTokenAt useful for + when you just need the type of the token at a given position, + and no other information. Will return null for + unstyled tokens, and a string, potentially containing multiple + space-separated style names, otherwise.
+ +
cm.getHelper(pos: {line, ch}, type: string) → helper
+
Fetch appropriate helper for the given position. Helpers + provide a way to look up functionality appropriate for a mode. + The type argument provides the helper namespace + (see + also registerHelper), + in which the value will be looked up. The key that is used + depends on the mode active at the given + position. If the mode object contains a property with the same + name as the type argument, that is tried first. + Next, the mode's helperType, if any, is tried. And + finally, the mode's name.
+ +
cm.getStateAfter(?line: integer, ?precise: boolean) → object
+
Returns the mode's parser state, if any, at the end of the + given line number. If no line number is given, the state at the + end of the document is returned. This can be useful for storing + parsing errors in the state, or getting other kinds of + contextual information for a line. precise is defined + as in getTokenAt().
+
+ +

Miscellaneous methods

+ +
+
cm.operation(func: () → any) → any
+
CodeMirror internally buffers changes and only updates its + DOM structure after it has finished performing some operation. + If you need to perform a lot of operations on a CodeMirror + instance, you can call this method with a function argument. It + will call the function, buffering up all changes, and only doing + the expensive update after the function returns. This can be a + lot faster. The return value from this method will be the return + value of your function.
+ +
cm.indentLine(line: integer, ?dir: string|integer)
+
Adjust the indentation of the given line. The second + argument (which defaults to "smart") may be one of: +
+
"prev"
+
Base indentation on the indentation of the previous line.
+
"smart"
+
Use the mode's smart indentation if available, behave + like "prev" otherwise.
+
"add"
+
Increase the indentation of the line by + one indent unit.
+
"subtract"
+
Reduce the indentation of the line.
+
<integer>
+
Add (positive number) or reduce (negative number) the + indentation by the given amount of spaces.
+
+ +
cm.toggleOverwrite(?value: bool)
+
Switches between overwrite and normal insert mode (when not + given an argument), or sets the overwrite mode to a specific + state (when given an argument).
+ +
cm.execCommand(name: string)
+
Runs the command with the given name on the editor.
+ +
doc.posFromIndex(index: integer) → {line, ch}
+
Calculates and returns a {line, ch} object for a + zero-based index who's value is relative to the start of the + editor's text. If the index is out of range of the text then + the returned object is clipped to start or end of the text + respectively.
+
doc.indexFromPos(object: {line, ch}) → integer
+
The reverse of posFromIndex.
+ +
cm.focus()
+
Give the editor focus.
+ +
cm.getInputField() → TextAreaElement
+
Returns the hidden textarea used to read input.
+
cm.getWrapperElement() → Element
+
Returns the DOM node that represents the editor, and + controls its size. Remove this from your tree to delete an + editor instance.
+
cm.getScrollerElement() → Element
+
Returns the DOM node that is responsible for the scrolling + of the editor.
+
cm.getGutterElement() → Element
+
Fetches the DOM node that contains the editor gutters.
+
+ +

Static properties

+

The CodeMirror object itself provides + several useful properties.

+ +
+
CodeMirror.version: string
+
It contains a string that indicates the version of the + library. This is a triple of + integers "major.minor.patch", + where patch is zero for releases, and something + else (usually one) for dev snapshots.
+ +
CodeMirror.fromTextArea(textArea: TextAreaElement, ?config: object)
+
+ The method provides another way to initialize an editor. It + takes a textarea DOM node as first argument and an optional + configuration object as second. It will replace the textarea + with a CodeMirror instance, and wire up the form of that + textarea (if any) to make sure the editor contents are put + into the textarea when the form is submitted. The text in the + textarea will provide the content for the editor. A CodeMirror + instance created this way has three additional methods: +
+
cm.save()
+
Copy the content of the editor into the textarea.
+ +
cm.toTextArea()
+
Remove the editor, and restore the original textarea (with + the editor's current content).
+ +
cm.getTextArea() → TextAreaElement
+
Returns the textarea that the instance was based on.
+
+
+ +
CodeMirror.defaults: object
+
An object containing default values for + all options. You can assign to its + properties to modify defaults (though this won't affect editors + that have already been created).
+ +
CodeMirror.defineExtension(name: string, value: any)
+
If you want to define extra methods in terms of the + CodeMirror API, it is possible to + use defineExtension. This will cause the given + value (usually a method) to be added to all CodeMirror instances + created from then on.
+ +
CodeMirror.defineDocExtension(name: string, value: any)
+
Like defineExtension, + but the method will be added to the interface + for Doc objects instead.
+ +
CodeMirror.defineOption(name: string, + default: any, updateFunc: function)
+
Similarly, defineOption can be used to define new options for + CodeMirror. The updateFunc will be called with the + editor instance and the new value when an editor is initialized, + and whenever the option is modified + through setOption.
+ +
CodeMirror.defineInitHook(func: function)
+
If your extention just needs to run some + code whenever a CodeMirror instance is initialized, + use CodeMirror.defineInitHook. Give it a function as + its only argument, and from then on, that function will be called + (with the instance as argument) whenever a new CodeMirror instance + is initialized.
+ +
CodeMirror.registerHelper(type: string, name: string, value: helper)
+
Registers a helper value with the given name in + the given namespace (type). This is used to define + functionality that may be looked up by mode. Will create (if it + doesn't already exist) a property on the CodeMirror + object for the given type, pointing to an object + that maps names to values. I.e. after + doing CodeMirror.registerHelper("hint", "foo", + myFoo), the value CodeMirror.hint.foo will + point to myFoo.
+ +
CodeMirror.Pos(line: integer, ?ch: integer)
+
A constructor for the {line, ch} objects that + are used to represent positions in editor documents.
+ +
CodeMirror.changeEnd(change: object) → {line, ch}
+
Utility function that computes an end position from a change + (an object with from, to, + and text properties, as passed to + various event handlers). The + returned position will be the end of the changed + range, after the change is applied.
+
+
+ +
+

Addons

+ +

The addon directory in the distribution contains a + number of reusable components that implement extra editor + functionality. In brief, they are:

+ +
+
dialog/dialog.js
+
Provides a very simple way to query users for text input. + Adds an openDialog method to + CodeMirror instances, which can be called with an HTML fragment + or a detached DOM node that provides the prompt (should include + an input tag), and a callback function that is called + when text has been entered. Also adds + an openNotification function that + simply shows an HTML fragment as a notification. Depends + on addon/dialog/dialog.css.
+ +
search/searchcursor.js
+
Adds the getSearchCursor(query, start, caseFold) → + cursor method to CodeMirror instances, which can be used + to implement search/replace functionality. query + can be a regular expression or a string (only strings will match + across lines—if they contain newlines). start + provides the starting position of the search. It can be + a {line, ch} object, or can be left off to default + to the start of the document. caseFold is only + relevant when matching a string. It will cause the search to be + case-insensitive. A search cursor has the following methods: +
+
findNext() → boolean
+
findPrevious() → boolean
+
Search forward or backward from the current position. + The return value indicates whether a match was found. If + matching a regular expression, the return value will be the + array returned by the match method, in case you + want to extract matched groups.
+
from() → {line, ch}
+
to() → {line, ch}
+
These are only valid when the last call + to findNext or findPrevious did + not return false. They will return {line, ch} + objects pointing at the start and end of the match.
+
replace(text: string)
+
Replaces the currently found match with the given text + and adjusts the cursor position to reflect the + replacement.
+
+ + +
Implements the search commands. CodeMirror has keys bound to + these by default, but will not do anything with them unless an + implementation is provided. Depends + on searchcursor.js, and will make use + of openDialog when + available to make prompting for search queries less ugly.
+ +
edit/matchbrackets.js
+
Defines an option matchBrackets which, when set + to true, causes matching brackets to be highlighted whenever the + cursor is next to them. It also adds a + method matchBrackets that forces this to happen + once, and a method findMatchingBracket that can be + used to run the bracket-finding algorithm that this uses + internally.
+ +
edit/closebrackets.js
+
Defines an option autoCloseBrackets that will + auto-close brackets and quotes when typed. By default, it'll + auto-close ()[]{}''"", but you can pass it a string + similar to that (containing pairs of matching characters), or an + object with pairs and + optionally explode properties to customize + it. explode should be a similar string that gives + the pairs of characters that, when enter is pressed between + them, should have the second character also moved to its own + line. Demo here.
+ +
edit/matchtags.js
+
Defines an option matchTags that, when enabled, + will cause the tags around the cursor to be highlighted (using + the CodeMirror-matchingtag class). Also + defines + a command toMatchingTag, + which you can bind a key to in order to jump to the tag mathing + the one under the cursor. Depends on + the addon/fold/xml-fold.js + addon. Demo here.
+ +
edit/trailingspace.js
+
Adds an option showTrailingSpace which, when + enabled, adds the CSS class cm-trailingspace to + stretches of whitespace at the end of lines. + The demo has a nice + squiggly underline style for this class.
+ +
edit/closetag.js
+
Provides utility functions for adding automatic tag closing + to XML modes. See + the demo.
+ +
edit/continuelist.js
+
Markdown specific. Defines + a "newlineAndIndentContinueMarkdownList" command + command that can be bound to enter to automatically + insert the leading characters for continuing a list. See + the Markdown mode + demo.
+ +
comment/comment.js
+
Addon for commenting and uncommenting code. Adds three + methods to CodeMirror instances: +
+
lineComment(from: {line, ch}, to: {line, ch}, ?options: object)
+
Set the lines in the given range to be line comments. Will + fall back to blockComment when no line comment + style is defined for the mode.
+
blockComment(from: {line, ch}, to: {line, ch}, ?options: object)
+
Wrap the code in the given range in a block comment. Will + fall back to lineComment when no block comment + style is defined for the mode.
+
uncomment(from: {line, ch}, to: {line, ch}, ?options: object) → boolean
+
Try to uncomment the given range. + Returns true if a comment range was found and + removed, false otherwise.
+
+ The options object accepted by these methods may + have the following properties: +
+
blockCommentStart, blockCommentEnd, blockCommentLead, lineComment: string
+
Override the comment string + properties of the mode with custom comment strings.
+
padding: string
+
A string that will be inserted after opening and before + closing comment markers. Defaults to a single space.
+
commentBlankLines: boolean
+
Whether, when adding line comments, to also comment lines + that contain only whitespace.
+
indent: boolean
+
When adding line comments and this is turned on, it will + align the comment block to the current indentation of the + first line of the block.
+
fullLines: boolean
+
When block commenting, this controls whether the whole + lines are indented, or only the precise range that is given. + Defaults to true.
+
+ The addon also defines + a toggleComment command, + which will try to uncomment the current selection, and if that + fails, line-comments it.
+ +
fold/foldcode.js
+
Helps with code folding. Adds a foldCode method + to editor instances, which will try to do a code fold starting + at the given line, or unfold the fold that is already present. + The method takes as first argument the position that should be + folded (may be a line number or + a Pos), and as second optional + argument either a range-finder function, or an options object, + supporting the following properties: +
+
rangeFinder: fn(CodeMirror, Pos)
+
The function that is used to find foldable ranges. If this + is not directly passed, it will + call getHelper with + a "fold" type to find one that's appropriate for + the mode. There are files in + the addon/fold/ + directory providing CodeMirror.fold.brace, which + finds blocks in brace languages (JavaScript, C, Java, + etc), CodeMirror.fold.indent, for languages where + indentation determines block structure (Python, Haskell), + and CodeMirror.fold.xml, for XML-style languages, + and CodeMirror.fold.comment, for folding comment + blocks.
+
widget: string|Element
+
The widget to show for folded ranges. Can be either a + string, in which case it'll become a span with + class CodeMirror-foldmarker, or a DOM node.
+
scanUp: boolean
+
When true (default is false), the addon will try to find + foldable ranges on the lines above the current one if there + isn't an eligible one on the given line.
+
minFoldSize: integer
+
The minimum amount of lines that a fold should span to be + accepted. Defaults to 0, which also allows single-line + folds.
+
+ See the demo for an + example.
+ +
fold/foldgutter.js
+
Provides an option foldGutter, which can be + used to create a gutter with markers indicating the blocks that + can be folded. Create a gutter using + the gutters option, + giving it the class CodeMirror-foldgutter or + something else if you configure the addon to use a different + class, and this addon will show markers next to folded and + foldable blocks, and handle clicks in this gutter. Note that + CSS styles should be applied to make the gutter, and the fold + markers within it, visible. A default set of CSS styles are + available in: + + addon/fold/foldgutter.css + . + The option + can be either set to true, or an object containing + the following optional option fields: +
+
gutter: string
+
The CSS class of the gutter. Defaults + to "CodeMirror-foldgutter". You will have to + style this yourself to give it a width (and possibly a + background). See the default gutter style rules above.
+
indicatorOpen: string | Element
+
A CSS class or DOM element to be used as the marker for + open, foldable blocks. Defaults + to "CodeMirror-foldgutter-open".
+
indicatorFolded: string | Element
+
A CSS class or DOM element to be used as the marker for + folded blocks. Defaults to "CodeMirror-foldgutter-folded".
+
rangeFinder: fn(CodeMirror, Pos)
+
The range-finder function to use when determining whether + something can be folded. When not + given, getHelper will be + used to determine a default.
+
+ Demo here.
+ +
runmode/runmode.js
+
Can be used to run a CodeMirror mode over text without + actually opening an editor instance. + See the demo for an example. + There are alternate versions of the file avaible for + running stand-alone + (without including all of CodeMirror) and + for running under + node.js.
+ +
runmode/colorize.js
+
Provides a convenient way to syntax-highlight code snippets + in a webpage. Depends on + the runmode addon (or + its standalone variant). Provides + a CodeMirror.colorize function that can be called + with an array (or other array-ish collection) of DOM nodes that + represent the code snippets. By default, it'll get + all pre tags. Will read the data-lang + attribute of these nodes to figure out their language, and + syntax-color their content using the relevant CodeMirror mode + (you'll have to load the scripts for the relevant modes + yourself). A second argument may be provided to give a default + mode, used when no language attribute is found for a node. Used + in this manual to highlight example code.
+ +
mode/overlay.js
+
Mode combinator that can be used to extend a mode with an + 'overlay' — a secondary mode is run over the stream, along with + the base mode, and can color specific pieces of text without + interfering with the base mode. + Defines CodeMirror.overlayMode, which is used to + create such a mode. See this + demo for a detailed example.
+ +
mode/multiplex.js
+
Mode combinator that can be used to easily 'multiplex' + between several modes. + Defines CodeMirror.multiplexingMode which, when + given as first argument a mode object, and as other arguments + any number of {open, close, mode [, delimStyle, innerStyle]} + objects, will return a mode object that starts parsing using the + mode passed as first argument, but will switch to another mode + as soon as it encounters a string that occurs in one of + the open fields of the passed objects. When in a + sub-mode, it will go back to the top mode again when + the close string is encountered. + Pass "\n" for open or close + if you want to switch on a blank line. +
  • When delimStyle is specified, it will be the token + style returned for the delimiter tokens.
  • +
  • When innerStyle is specified, it will be the token + style added for each inner mode token.
+ The outer mode will not see the content between the delimiters. + See this demo for an + example.
+ +
hint/show-hint.js
+
Provides a framework for showing autocompletion hints. + Defines CodeMirror.showHint, which takes a + CodeMirror instance, a hinting function, and optionally an + options object, and pops up a widget that allows the user to + select a completion. Hinting functions are function that take an + editor instance and an optional options object, and return + a {list, from, to} object, where list + is an array of strings or objects (the completions), + and from and to give the start and end + of the token that is being completed as {line, ch} + objects. If no hinting function is given, the addon will try to + use getHelper with + the "hint" type to find one. When completions + aren't simple strings, they should be objects with the folowing + properties: +
+
text: string
+
The completion text. This is the only required + property.
+
displayText: string
+
The text that should be displayed in the menu.
+
className: string
+
A CSS class name to apply to the completion's line in the + menu.
+
render: fn(Element, self, data)
+
A method used to create the DOM structure for showing the + completion by appending it to its first argument.
+
hint: fn(CodeMirror, self, data)
+
A method used to actually apply the completion, instead of + the default behavior.
+
+ The plugin understands the following options (the options object + will also be passed along to the hinting function, which may + understand additional options): +
+
async: boolean
+
When set to true, the hinting function's signature should + be (cm, callback, ?options), and the completion + interface will only be popped up when the hinting function + calls the callback, passing it the object holding the + completions.
+
completeSingle: boolean
+
Determines whether, when only a single completion is + available, it is completed without showing the dialog. + Defaults to true.
+
alignWithWord: boolean
+
Whether the pop-up should be horizontally aligned with the + start of the word (true, default), or with the cursor (false).
+
closeOnUnfocus: boolean
+
When enabled (which is the default), the pop-up will close + when the editor is unfocused.
+
customKeys: keymap
+
Allows you to provide a custom keymap of keys to be active + when the pop-up is active. The handlers will be called with an + extra argument, a handle to the completion menu, which + has moveFocus(n), setFocus(n), pick(), + and close() methods (see the source for details), + that can be used to change the focused element, pick the + current element or close the menu.
+
extraKeys: keymap
+
Like customKeys above, but the bindings will + be added to the set of default bindings, instead of replacing + them.
+
+ The following events will be fired on the completions object + during completion: +
+
"shown" ()
+
Fired when the pop-up is shown.
+
"select" (completion, Element)
+
Fired when a completion is selected. Passed the completion + value (string or object) and the DOM node that represents it + in the menu.
+
"close" ()
+
Fired when the completion is finished.
+
+ This addon depends styles + from addon/hint/show-hint.css. Check + out the demo for an + example.
+ +
hint/javascript-hint.js
+
Defines a simple hinting function for JavaScript + (CodeMirror.hint.javascript) and CoffeeScript + (CodeMirror.hint.coffeescript) code. This will + simply use the JavaScript environment that the editor runs in as + a source of information about objects and their properties.
+ +
hint/xml-hint.js
+
Defines CodeMirror.hint.xml, which produces + hints for XML tagnames, attribute names, and attribute values, + guided by a schemaInfo option (a property of the + second argument passed to the hinting function, or the third + argument passed to CodeMirror.showHint).
The + schema info should be an object mapping tag names to information + about these tags, with optionally a "!top" property + containing a list of the names of valid top-level tags. The + values of the properties should be objects with optional + properties children (an array of valid child + element names, omit to simply allow all tags to appear) + and attrs (an object mapping attribute names + to null for free-form attributes, and an array of + valid values for restricted + attributes). Demo + here.
+ +
hint/html-hint.js
+
Provides schema info to + the xml-hint addon for HTML + documents. Defines a schema + object CodeMirror.htmlSchema that you can pass to + as a schemaInfo option, and + a CodeMirror.hint.html hinting function that + automatically calls CodeMirror.hint.xml with this + schema data. See + the demo.
+ +
hint/css-hint.js
+
A minimal hinting function for CSS code. + Defines CodeMirror.hint.css.
+ +
hint/python-hint.js
+
A very simple hinting function for Python code. + Defines CodeMirror.hint.python.
+ +
hint/anyword-hint.js
+
A very simple hinting function + (CodeMirror.hint.anyword) that simply looks for + words in the nearby code and completes to those. Takes two + optional options, word, a regular expression that + matches words (sequences of one or more character), + and range, which defines how many lines the addon + should scan when completing (defaults to 500).
+ +
hint/sql-hint.js
+
A simple SQL hinter. Defines CodeMirror.hint.sql.
+ +
hint/pig-hint.js
+
A simple hinter for Pig Latin. Defines CodeMirror.hint.pig.
+ +
search/match-highlighter.js
+
Adds a highlightSelectionMatches option that + can be enabled to highlight all instances of a currently + selected word. Can be set either to true or to an object + containing the following options: minChars, for the + minimum amount of selected characters that triggers a highlight + (default 2), style, for the style to be used to + highlight the matches (default "matchhighlight", + which will correspond to CSS + class cm-matchhighlight), + and showToken which can be set to true + or to a regexp matching the characters that make up a word. When + enabled, it causes the current word to be highlighted when + nothing is selected (defaults to off). + Demo here.
+ +
lint/lint.js
+
Defines an interface component for showing linting warnings, + with pluggable warning sources + (see json-lint.js, + javascript-lint.js, + and css-lint.js + in the same directory). Defines a lint option that + can be set to a warning source (for + example CodeMirror.lint.javascript), or + to true, in which + case getHelper with + type "lint" is used to determined a validator + function. Depends on addon/lint/lint.css. A demo + can be found here.
+ +
selection/mark-selection.js
+
Causes the selected text to be marked with the CSS class + CodeMirror-selectedtext when the styleSelectedText option + is enabled. Useful to change the colour of the selection (in addition to the background), + like in this demo.
+ +
selection/active-line.js
+
Defines a styleActiveLine option that, when enabled, + gives the wrapper of the active line the class CodeMirror-activeline, + and adds a background with the class CodeMirror-activeline-background. + is enabled. See the demo.
+ +
mode/loadmode.js
+
Defines a CodeMirror.requireMode(modename, + callback) function that will try to load a given mode and + call the callback when it succeeded. You'll have to + set CodeMirror.modeURL to a string that mode paths + can be constructed from, for + example "mode/%N/%N.js"—the %N's will + be replaced with the mode name. Also + defines CodeMirror.autoLoadMode(instance, mode), + which will ensure the given mode is loaded and cause the given + editor instance to refresh its mode when the loading + succeeded. See the demo.
+ +
comment/continuecomment.js
+
Adds an continueComments option, which can be + set to true to have the editor prefix new lines inside C-like + block comments with an asterisk when Enter is pressed. It can + also be set to a string in order to bind this functionality to a + specific key..
+ +
display/placeholder.js
+
Adds a placeholder option that can be used to + make text appear in the editor when it is empty and not focused. + Also gives the editor a CodeMirror-empty CSS class + whenever it doesn't contain any text. + See the demo.
+ +
display/fullscreen.js
+
Defines an option fullScreen that, when set + to true, will make the editor full-screen (as in, + taking up the whole browser window). Depends + on fullscreen.css. Demo + here.
+ +
wrap/hardwrap.js
+
Addon to perform hard line wrapping/breaking for paragraphs + of text. Adds these methods to editor instances: +
+
wrapParagraph(?pos: {line, ch}, ?options: object)
+
Wraps the paragraph at the given position. + If pos is not given, it defaults to the cursor + position.
+
wrapRange(from: {line, ch}, to: {line, ch}, ?options: object)
+
Wraps the given range as one big paragraph.
+
wrapParagraphsInRange(from: {line, ch}, to: {line, ch}, ?options: object)
+
Wrapps the paragraphs in (and overlapping with) the + given range individually.
+
+ The following options are recognized: +
+
paragraphStart, paragraphEnd: RegExp
+
Blank lines are always considered paragraph boundaries. + These options can be used to specify a pattern that causes + lines to be considered the start or end of a paragraph.
+
column: number
+
The column to wrap at. Defaults to 80.
+
wrapOn: RegExp
+
A regular expression that matches only those + two-character strings that allow wrapping. By default, the + addon wraps on whitespace and after dash characters.
+
killTrailingSpace: boolean
+
Whether trailing space caused by wrapping should be + preserved, or deleted. Defaults to true.
+
+ A demo of the addon is available here. +
+ +
merge/merge.js
+
Implements an interface for merging changes, using either a + 2-way or a 3-way view. The CodeMirror.MergeView + constructor takes arguments similar to + the CodeMirror + constructor, first a node to append the interface to, and then + an options object. Two extra optional options are + recognized, origLeft and origRight, + which may be strings that provide original versions of the + document, which will be shown to the left and right of the + editor in non-editable CodeMirror instances. The merge interface + will highlight changes between the editable document and the + original(s) (demo).
+ +
tern/tern.js
+
Provides integration with + the Tern JavaScript analysis + engine, for completion, definition finding, and minor + refactoring help. See the demo + for a very simple integration. For more involved scenarios, see + the comments at the top of + the addon and the + implementation of the + (multi-file) demonstration + on the Tern website.
+
+
+ +
+

Writing CodeMirror Modes

+ +

Modes typically consist of a single JavaScript file. This file + defines, in the simplest case, a lexer (tokenizer) for your + language—a function that takes a character stream as input, + advances it past a token, and returns a style for that token. More + advanced modes can also handle indentation for the language.

+ +

The mode script should + call CodeMirror.defineMode to + register itself with CodeMirror. This function takes two + arguments. The first should be the name of the mode, for which you + should use a lowercase string, preferably one that is also the + name of the files that define the mode (i.e. "xml" is + defined in xml.js). The second argument should be a + function that, given a CodeMirror configuration object (the thing + passed to the CodeMirror function) and an optional + mode configuration object (as in + the mode option), returns + a mode object.

+ +

Typically, you should use this second argument + to defineMode as your module scope function (modes + should not leak anything into the global scope!), i.e. write your + whole mode inside this function.

+ +

The main responsibility of a mode script is parsing + the content of the editor. Depending on the language and the + amount of functionality desired, this can be done in really easy + or extremely complicated ways. Some parsers can be stateless, + meaning that they look at one element (token) of the code + at a time, with no memory of what came before. Most, however, will + need to remember something. This is done by using a state + object, which is an object that is always passed when + reading a token, and which can be mutated by the tokenizer.

+ +

Modes that use a state must define + a startState method on their mode + object. This is a function of no arguments that produces a state + object to be used at the start of a document.

+ +

The most important part of a mode object is + its token(stream, state) method. All + modes must define this method. It should read one token from the + stream it is given as an argument, optionally update its state, + and return a style string, or null for tokens that do + not have to be styled. For your styles, you are encouraged to use + the 'standard' names defined in the themes (without + the cm- prefix). If that fails, it is also possible + to come up with your own and write your own CSS theme file.

+ +

A typical token string would + be "variable" or "comment". Multiple + styles can be returned (separated by spaces), for + example "string error" for a thing that looks like a + string but is invalid somehow (say, missing its closing quote). + When a style is prefixed by "line-" + or "line-background-", the style will be applied to + the whole line, analogous to what + the addLineClass method + does—styling the "text" in the simple case, and + the "background" element + when "line-background-" is prefixed.

+ +

The stream object that's passed + to token encapsulates a line of code (tokens may + never span lines) and our current position in that line. It has + the following API:

+ +
+
eol() → boolean
+
Returns true only if the stream is at the end of the + line.
+
sol() → boolean
+
Returns true only if the stream is at the start of the + line.
+ +
peek() → string
+
Returns the next character in the stream without advancing + it. Will return an null at the end of the + line.
+
next() → string
+
Returns the next character in the stream and advances it. + Also returns null when no more characters are + available.
+ +
eat(match: string|regexp|function(char: string) → boolean) → string
+
match can be a character, a regular expression, + or a function that takes a character and returns a boolean. If + the next character in the stream 'matches' the given argument, + it is consumed and returned. Otherwise, undefined + is returned.
+
eatWhile(match: string|regexp|function(char: string) → boolean) → boolean
+
Repeatedly calls eat with the given argument, + until it fails. Returns true if any characters were eaten.
+
eatSpace() → boolean
+
Shortcut for eatWhile when matching + white-space.
+
skipToEnd()
+
Moves the position to the end of the line.
+
skipTo(ch: string) → boolean
+
Skips to the next occurrence of the given character, if + found on the current line (doesn't advance the stream if the + character does not occur on the line). Returns true if the + character was found.
+
match(pattern: string, ?consume: boolean, ?caseFold: boolean) → boolean
+
match(pattern: regexp, ?consume: boolean) → array<string>
+
Act like a + multi-character eat—if consume is true + or not given—or a look-ahead that doesn't update the stream + position—if it is false. pattern can be either a + string or a regular expression starting with ^. + When it is a string, caseFold can be set to true to + make the match case-insensitive. When successfully matching a + regular expression, the returned value will be the array + returned by match, in case you need to extract + matched groups.
+ +
backUp(n: integer)
+
Backs up the stream n characters. Backing it up + further than the start of the current token will cause things to + break, so be careful.
+
column() → integer
+
Returns the column (taking into account tabs) at which the + current token starts.
+
indentation() → integer
+
Tells you how far the current line has been indented, in + spaces. Corrects for tab characters.
+ +
current() → string
+
Get the string between the start of the current token and + the current stream position.
+
+ +

By default, blank lines are simply skipped when + tokenizing a document. For languages that have significant blank + lines, you can define + a blankLine(state) method on your + mode that will get called whenever a blank line is passed over, so + that it can update the parser state.

+ +

Because state object are mutated, and CodeMirror + needs to keep valid versions of a state around so that it can + restart a parse at any line, copies must be made of state objects. + The default algorithm used is that a new state object is created, + which gets all the properties of the old object. Any properties + which hold arrays get a copy of these arrays (since arrays tend to + be used as mutable stacks). When this is not correct, for example + because a mode mutates non-array properties of its state object, a + mode object should define + a copyState method, which is given a + state and should return a safe copy of that state.

+ +

If you want your mode to provide smart indentation + (through the indentLine + method and the indentAuto + and newlineAndIndent commands, to which keys can be + bound), you must define + an indent(state, textAfter) method + on your mode object.

+ +

The indentation method should inspect the given state object, + and optionally the textAfter string, which contains + the text on the line that is being indented, and return an + integer, the amount of spaces to indent. It should usually take + the indentUnit + option into account. An indentation method may + return CodeMirror.Pass to indicate that it + could not come up with a precise indentation.

+ +

To work well with + the commenting addon, a mode may + define lineComment (string that + starts a line + comment), blockCommentStart, blockCommentEnd + (strings that start and end block comments), + and blockCommentLead (a string to put at the start of + continued lines in a block comment). All of these are + optional.

+ +

Finally, a mode may define + an electricChars property, which should hold a string + containing all the characters that should trigger the behaviour + described for + the electricChars + option.

+ +

So, to summarize, a mode must provide + a token method, and it may + provide startState, copyState, + and indent methods. For an example of a trivial mode, + see the diff mode, for a more + involved example, see the C-like + mode.

+ +

Sometimes, it is useful for modes to nest—to have one + mode delegate work to another mode. An example of this kind of + mode is the mixed-mode HTML + mode. To implement such nesting, it is usually necessary to + create mode objects and copy states yourself. To create a mode + object, there are CodeMirror.getMode(options, + parserConfig), where the first argument is a configuration + object as passed to the mode constructor function, and the second + argument is a mode specification as in + the mode option. To copy a + state object, call CodeMirror.copyState(mode, state), + where mode is the mode that created the given + state.

+ +

In a nested mode, it is recommended to add an + extra method, innerMode which, given + a state object, returns a {state, mode} object with + the inner mode and its state for the current position. These are + used by utility scripts such as the tag + closer to get context information. Use + the CodeMirror.innerMode helper function to, starting + from a mode and a state, recursively walk down to the innermost + mode and state.

+ +

To make indentation work properly in a nested parser, it is + advisable to give the startState method of modes that + are intended to be nested an optional argument that provides the + base indentation for the block of code. The JavaScript and CSS + parser do this, for example, to allow JavaScript and CSS code + inside the mixed-mode HTML mode to be properly indented.

+ +

It is possible, and encouraged, to associate + your mode, or a certain configuration of your mode, with + a MIME type. For + example, the JavaScript mode associates itself + with text/javascript, and its JSON variant + with application/json. To do this, + call CodeMirror.defineMIME(mime, + modeSpec), where modeSpec can be a string or + object specifying a mode, as in + the mode option.

+ +

Sometimes, it is useful to add or override mode + object properties from external code. + The CodeMirror.extendMode function + can be used to add properties to mode objects produced for a + specific mode. Its first argument is the name of the mode, its + second an object that specifies the properties that should be + added. This is mostly useful to add utilities that can later be + looked up through getMode.

+
+ +
+ + diff --git a/pitfall/pdfkit/node_modules/codemirror/doc/realworld.html b/pitfall/pdfkit/node_modules/codemirror/doc/realworld.html new file mode 100644 index 00000000..a8ff3590 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/doc/realworld.html @@ -0,0 +1,136 @@ + + +CodeMirror: Real-world Uses + + + + + +
+ +

CodeMirror real-world uses

+ +

Contact me if you'd like + your project to be added to this list.

+ + + +
+ diff --git a/pitfall/pdfkit/node_modules/codemirror/doc/releases.html b/pitfall/pdfkit/node_modules/codemirror/doc/releases.html new file mode 100644 index 00000000..e6d7ddce --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/doc/releases.html @@ -0,0 +1,790 @@ + + +CodeMirror: Release History + + + + + + +
+ +

Release notes and version history

+ +
+ +

Version 3.x

+ +

21-11-2013: Version 3.20:

+ + + +

21-10-2013: Version 3.19:

+ + + +

23-09-2013: Version 3.18:

+ +

Emergency release to fix a problem in 3.17 + where .setOption("lineNumbers", false) would raise an + error.

+ +

23-09-2013: Version 3.17:

+ + + +

21-08-2013: Version 3.16:

+ + + +

29-07-2013: Version 3.15:

+ + + +

20-06-2013: Version 3.14:

+ + + +

20-05-2013: Version 3.13:

+ + + +

19-04-2013: Version 3.12:

+ + + +

20-03-2013: Version 3.11:

+ + + +

21-02-2013: Version 3.1:

+ + + + +

25-01-2013: Version 3.02:

+ +

Single-bugfix release. Fixes a problem that + prevents CodeMirror instances from being garbage-collected after + they become unused.

+ +

21-01-2013: Version 3.01:

+ + + +

10-12-2012: Version 3.0:

+ +

New major version. Only + partially backwards-compatible. See + the upgrading guide for more + information. Changes since release candidate 2:

+ +
    +
  • Rewritten VIM mode.
  • +
  • Fix a few minor scrolling and sizing issues.
  • +
  • Work around Safari segfault when dragging.
  • +
  • Full list of patches.
  • +
+ +

20-11-2012: Version 3.0, release candidate 2:

+ +
    +
  • New mode: HTTP.
  • +
  • Improved handling of selection anchor position.
  • +
  • Improve IE performance on longer lines.
  • +
  • Reduce gutter glitches during horiz. scrolling.
  • +
  • Add addKeyMap and removeKeyMap methods.
  • +
  • Rewrite formatting and closetag add-ons.
  • +
  • Full list of patches.
  • +
+ +

20-11-2012: Version 3.0, release candidate 1:

+ + + +

22-10-2012: Version 3.0, beta 2:

+ +
    +
  • Fix page-based coordinate computation.
  • +
  • Fix firing of gutterClick event.
  • +
  • Add cursorHeight option.
  • +
  • Fix bi-directional text regression.
  • +
  • Add viewportMargin option.
  • +
  • Directly handle mousewheel events (again, hopefully better).
  • +
  • Make vertical cursor movement more robust (through widgets, big line gaps).
  • +
  • Add flattenSpans option.
  • +
  • Many optimizations. Poor responsiveness should be fixed.
  • +
  • Initialization in hidden state works again.
  • +
  • Full list of patches.
  • +
+ +

19-09-2012: Version 3.0, beta 1:

+ +
    +
  • Bi-directional text support.
  • +
  • More powerful gutter model.
  • +
  • Support for arbitrary text/widget height.
  • +
  • In-line widgets.
  • +
  • Generalized event handling.
  • +
+ +
+ +
+ +

Version 2.x

+ +

21-01-2013: Version 2.38:

+ +

Integrate some bugfixes, enhancements to the vim keymap, and new + modes + (D, Sass, APL) + from the v3 branch.

+ +

20-12-2012: Version 2.37:

+ +
    +
  • New mode: SQL (will replace plsql and mysql modes).
  • +
  • Further work on the new VIM mode.
  • +
  • Fix Cmd/Ctrl keys on recent Operas on OS X.
  • +
  • Full list of patches.
  • +
+ +

20-11-2012: Version 2.36:

+ + + +

22-10-2012: Version 2.35:

+ +
    +
  • New (sub) mode: TypeScript.
  • +
  • Don't overwrite (insert key) when pasting.
  • +
  • Fix several bugs in markText/undo interaction.
  • +
  • Better indentation of JavaScript code without semicolons.
  • +
  • Add defineInitHook function.
  • +
  • Full list of patches.
  • +
+ +

19-09-2012: Version 2.34:

+ +
    +
  • New mode: Common Lisp.
  • +
  • Fix right-click select-all on most browsers.
  • +
  • Change the way highlighting happens:
      Saves memory and CPU cycles.
      compareStates is no longer needed.
      onHighlightComplete no longer works.
  • +
  • Integrate mode (Markdown, XQuery, CSS, sTex) tests in central testsuite.
  • +
  • Add a CodeMirror.version property.
  • +
  • More robust handling of nested modes in formatting and closetag plug-ins.
  • +
  • Un/redo now preserves marked text and bookmarks.
  • +
  • Full list of patches.
  • +
+ +

23-08-2012: Version 2.33:

+ +
    +
  • New mode: Sieve.
  • +
  • New getViewPort and onViewportChange API.
  • +
  • Configurable cursor blink rate.
  • +
  • Make binding a key to false disabling handling (again).
  • +
  • Show non-printing characters as red dots.
  • +
  • More tweaks to the scrolling model.
  • +
  • Expanded testsuite. Basic linter added.
  • +
  • Remove most uses of innerHTML. Remove CodeMirror.htmlEscape.
  • +
  • Full list of patches.
  • +
+ +

23-07-2012: Version 2.32:

+ +

Emergency fix for a bug where an editor with + line wrapping on IE will break when there is no + scrollbar.

+ +

20-07-2012: Version 2.31:

+ + + +

22-06-2012: Version 2.3:

+ +
    +
  • New scrollbar implementation. Should flicker less. Changes DOM structure of the editor.
  • +
  • New theme: vibrant-ink.
  • +
  • Many extensions to the VIM keymap (including text objects).
  • +
  • Add mode-multiplexing utility script.
  • +
  • Fix bug where right-click paste works in read-only mode.
  • +
  • Add a getScrollInfo method.
  • +
  • Lots of other fixes.
  • +
+ +

23-05-2012: Version 2.25:

+ +
    +
  • New mode: Erlang.
  • +
  • Remove xmlpure mode (use xml.js).
  • +
  • Fix line-wrapping in Opera.
  • +
  • Fix X Windows middle-click paste in Chrome.
  • +
  • Fix bug that broke pasting of huge documents.
  • +
  • Fix backspace and tab key repeat in Opera.
  • +
+ +

23-04-2012: Version 2.24:

+ +
    +
  • Drop support for Internet Explorer 6.
  • +
  • New + modes: Shell, Tiki + wiki, Pig Latin.
  • +
  • New themes: Ambiance, Blackboard.
  • +
  • More control over drag/drop + with dragDrop + and onDragEvent + options.
  • +
  • Make HTML mode a bit less pedantic.
  • +
  • Add compoundChange API method.
  • +
  • Several fixes in undo history and line hiding.
  • +
  • Remove (broken) support for catchall in key maps, + add nofallthrough boolean field instead.
  • +
+ +

26-03-2012: Version 2.23:

+ +
    +
  • Change default binding for tab [more] + +
  • +
  • New modes: XQuery and VBScript.
  • +
  • Two new themes: lesser-dark and xq-dark.
  • +
  • Differentiate between background and text styles in setLineClass.
  • +
  • Fix drag-and-drop in IE9+.
  • +
  • Extend charCoords + and cursorCoords with a mode argument.
  • +
  • Add autofocus option.
  • +
  • Add findMarksAt method.
  • +
+ +

27-02-2012: Version 2.22:

+ + + +

27-01-2012: Version 2.21:

+ +
    +
  • Added LESS, MySQL, + Go, and Verilog modes.
  • +
  • Add smartIndent + option.
  • +
  • Support a cursor in readOnly-mode.
  • +
  • Support assigning multiple styles to a token.
  • +
  • Use a new approach to drawing the selection.
  • +
  • Add scrollTo method.
  • +
  • Allow undo/redo events to span non-adjacent lines.
  • +
  • Lots and lots of bugfixes.
  • +
+ +

20-12-2011: Version 2.2:

+ + + +

21-11-2011: Version 2.18:

+

Fixes TextMarker.clear, which is broken in 2.17.

+ +

21-11-2011: Version 2.17:

+
    +
  • Add support for line + wrapping and code + folding.
  • +
  • Add Github-style Markdown mode.
  • +
  • Add Monokai + and Rubyblue themes.
  • +
  • Add setBookmark method.
  • +
  • Move some of the demo code into reusable components + under lib/util.
  • +
  • Make screen-coord-finding code faster and more reliable.
  • +
  • Fix drag-and-drop in Firefox.
  • +
  • Improve support for IME.
  • +
  • Speed up content rendering.
  • +
  • Fix browser's built-in search in Webkit.
  • +
  • Make double- and triple-click work in IE.
  • +
  • Various fixes to modes.
  • +
+ +

27-10-2011: Version 2.16:

+
    +
  • Add Perl, Rust, TiddlyWiki, and Groovy modes.
  • +
  • Dragging text inside the editor now moves, rather than copies.
  • +
  • Add a coordsFromIndex method.
  • +
  • API change: setValue now no longer clears history. Use clearHistory for that.
  • +
  • API change: markText now + returns an object with clear and find + methods. Marked text is now more robust when edited.
  • +
  • Fix editing code with tabs in Internet Explorer.
  • +
+ +

26-09-2011: Version 2.15:

+

Fix bug that snuck into 2.14: Clicking the + character that currently has the cursor didn't re-focus the + editor.

+ +

26-09-2011: Version 2.14:

+ + + +

23-08-2011: Version 2.13:

+ + +

25-07-2011: Version 2.12:

+
    +
  • Add a SPARQL mode.
  • +
  • Fix bug with cursor jumping around in an unfocused editor in IE.
  • +
  • Allow key and mouse events to bubble out of the editor. Ignore widget clicks.
  • +
  • Solve cursor flakiness after undo/redo.
  • +
  • Fix block-reindent ignoring the last few lines.
  • +
  • Fix parsing of multi-line attrs in XML mode.
  • +
  • Use innerHTML for HTML-escaping.
  • +
  • Some fixes to indentation in C-like mode.
  • +
  • Shrink horiz scrollbars when long lines removed.
  • +
  • Fix width feedback loop bug that caused the width of an inner DIV to shrink.
  • +
+ +

04-07-2011: Version 2.11:

+
    +
  • Add a Scheme mode.
  • +
  • Add a replace method to search cursors, for cursor-preserving replacements.
  • +
  • Make the C-like mode mode more customizable.
  • +
  • Update XML mode to spot mismatched tags.
  • +
  • Add getStateAfter API and compareState mode API methods for finer-grained mode magic.
  • +
  • Add a getScrollerElement API method to manipulate the scrolling DIV.
  • +
  • Fix drag-and-drop for Firefox.
  • +
  • Add a C# configuration for the C-like mode.
  • +
  • Add full-screen editing and mode-changing demos.
  • +
+ +

07-06-2011: Version 2.1:

+

Add + a theme system + (demo). Note that this is not + backwards-compatible—you'll have to update your styles and + modes!

+ +

07-06-2011: Version 2.02:

+
    +
  • Add a Lua mode.
  • +
  • Fix reverse-searching for a regexp.
  • +
  • Empty lines can no longer break highlighting.
  • +
  • Rework scrolling model (the outer wrapper no longer does the scrolling).
  • +
  • Solve horizontal jittering on long lines.
  • +
  • Add runmode.js.
  • +
  • Immediately re-highlight text when typing.
  • +
  • Fix problem with 'sticking' horizontal scrollbar.
  • +
+ +

26-05-2011: Version 2.01:

+
    +
  • Add a Smalltalk mode.
  • +
  • Add a reStructuredText mode.
  • +
  • Add a Python mode.
  • +
  • Add a PL/SQL mode.
  • +
  • coordsChar now works
  • +
  • Fix a problem where onCursorActivity interfered with onChange.
  • +
  • Fix a number of scrolling and mouse-click-position glitches.
  • +
  • Pass information about the changed lines to onChange.
  • +
  • Support cmd-up/down on OS X.
  • +
  • Add triple-click line selection.
  • +
  • Don't handle shift when changing the selection through the API.
  • +
  • Support "nocursor" mode for readOnly option.
  • +
  • Add an onHighlightComplete option.
  • +
  • Fix the context menu for Firefox.
  • +
+ +

28-03-2011: Version 2.0:

+

CodeMirror 2 is a complete rewrite that's + faster, smaller, simpler to use, and less dependent on browser + quirks. See this + and this + for more information.

+ +

22-02-2011: Version 2.0 beta 2:

+

Somewhat more mature API, lots of bugs shaken out.

+ +

17-02-2011: Version 0.94:

+
    +
  • tabMode: "spaces" was modified slightly (now indents when something is selected).
  • +
  • Fixes a bug that would cause the selection code to break on some IE versions.
  • +
  • Disabling spell-check on WebKit browsers now works.
  • +
+ +

08-02-2011: Version 2.0 beta 1:

+

CodeMirror 2 is a complete rewrite of + CodeMirror, no longer depending on an editable frame.

+ +

19-01-2011: Version 0.93:

+
    +
  • Added a Regular Expression parser.
  • +
  • Fixes to the PHP parser.
  • +
  • Support for regular expression in search/replace.
  • +
  • Add save method to instances created with fromTextArea.
  • +
  • Add support for MS T-SQL in the SQL parser.
  • +
  • Support use of CSS classes for highlighting brackets.
  • +
  • Fix yet another hang with line-numbering in hidden editors.
  • +
+
+ +
+ +

Version 0.x

+ +

28-03-2011: Version 1.0:

+
    +
  • Fix error when debug history overflows.
  • +
  • Refine handling of C# verbatim strings.
  • +
  • Fix some issues with JavaScript indentation.
  • +
+ +

17-12-2010: Version 0.92:

+
    +
  • Make CodeMirror work in XHTML documents.
  • +
  • Fix bug in handling of backslashes in Python strings.
  • +
  • The styleNumbers option is now officially + supported and documented.
  • +
  • onLineNumberClick option added.
  • +
  • More consistent names onLoad and + onCursorActivity callbacks. Old names still work, but + are deprecated.
  • +
  • Add a Freemarker mode.
  • +
+ +

11-11-2010: Version 0.91:

+
    +
  • Adds support for Java.
  • +
  • Small additions to the PHP and SQL parsers.
  • +
  • Work around various Webkit issues.
  • +
  • Fix toTextArea to update the code in the textarea.
  • +
  • Add a noScriptCaching option (hack to ease development).
  • +
  • Make sub-modes of HTML mixed mode configurable.
  • +
+ +

02-10-2010: Version 0.9:

+
    +
  • Add support for searching backwards.
  • +
  • There are now parsers for Scheme, XQuery, and OmetaJS.
  • +
  • Makes height: "dynamic" more robust.
  • +
  • Fixes bug where paste did not work on OS X.
  • +
  • Add a enterMode and electricChars options to make indentation even more customizable.
  • +
  • Add firstLineNumber option.
  • +
  • Fix bad handling of @media rules by the CSS parser.
  • +
  • Take a new, more robust approach to working around the invisible-last-line bug in WebKit.
  • +
+ +

22-07-2010: Version 0.8:

+
    +
  • Add a cursorCoords method to find the screen + coordinates of the cursor.
  • +
  • A number of fixes and support for more syntax in the PHP parser.
  • +
  • Fix indentation problem with JSON-mode JS parser in Webkit.
  • +
  • Add a minification UI.
  • +
  • Support a height: dynamic mode, where the editor's + height will adjust to the size of its content.
  • +
  • Better support for IME input mode.
  • +
  • Fix JavaScript parser getting confused when seeing a no-argument + function call.
  • +
  • Have CSS parser see the difference between selectors and other + identifiers.
  • +
  • Fix scrolling bug when pasting in a horizontally-scrolled + editor.
  • +
  • Support toTextArea method in instances created with + fromTextArea.
  • +
  • Work around new Opera cursor bug that causes the cursor to jump + when pressing backspace at the end of a line.
  • +
+ +

27-04-2010: Version + 0.67:

+

More consistent page-up/page-down behaviour + across browsers. Fix some issues with hidden editors looping forever + when line-numbers were enabled. Make PHP parser parse + "\\" correctly. Have jumpToLine work on + line handles, and add cursorLine function to fetch the + line handle where the cursor currently is. Add new + setStylesheet function to switch style-sheets in a + running editor.

+ +

01-03-2010: Version + 0.66:

+

Adds removeLine method to API. + Introduces the PLSQL parser. + Marks XML errors by adding (rather than replacing) a CSS class, so + that they can be disabled by modifying their style. Fixes several + selection bugs, and a number of small glitches.

+ +

12-11-2009: Version + 0.65:

+

Add support for having both line-wrapping and + line-numbers turned on, make paren-highlighting style customisable + (markParen and unmarkParen config + options), work around a selection bug that Opera + reintroduced in version 10.

+ +

23-10-2009: Version + 0.64:

+

Solves some issues introduced by the + paste-handling changes from the previous release. Adds + setSpellcheck, setTextWrapping, + setIndentUnit, setUndoDepth, + setTabMode, and setLineNumbers to + customise a running editor. Introduces an SQL parser. Fixes a few small + problems in the Python + parser. And, as usual, add workarounds for various newly discovered + browser incompatibilities.

+ +

31-08-2009: Version 0.63:

+

Overhaul of paste-handling (less fragile), fixes for several + serious IE8 issues (cursor jumping, end-of-document bugs) and a number + of small problems.

+ +

30-05-2009: Version 0.62:

+

Introduces Python + and Lua parsers. Add + setParser (on-the-fly mode changing) and + clearHistory methods. Make parsing passes time-based + instead of lines-based (see the passTime option).

+ +
+
diff --git a/pitfall/pdfkit/node_modules/codemirror/doc/reporting.html b/pitfall/pdfkit/node_modules/codemirror/doc/reporting.html new file mode 100644 index 00000000..47e37a55 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/doc/reporting.html @@ -0,0 +1,61 @@ + + +CodeMirror: Reporting Bugs + + + + + +
+ +

Reporting bugs effectively

+ +
+ +

So you found a problem in CodeMirror. By all means, report it! Bug +reports from users are the main drive behind improvements to +CodeMirror. But first, please read over these points:

+ +
    +
  1. CodeMirror is maintained by volunteers. They don't owe you + anything, so be polite. Reports with an indignant or belligerent + tone tend to be moved to the bottom of the pile.
  2. + +
  3. Include information about the browser in which the + problem occurred. Even if you tested several browsers, and + the problem occurred in all of them, mention this fact in the bug + report. Also include browser version numbers and the operating + system that you're on.
  4. + +
  5. Mention which release of CodeMirror you're using. Preferably, + try also with the current development snapshot, to ensure the + problem has not already been fixed.
  6. + +
  7. Mention very precisely what went wrong. "X is broken" is not a + good bug report. What did you expect to happen? What happened + instead? Describe the exact steps a maintainer has to take to make + the problem occur. We can not fix something that we can not + observe.
  8. + +
  9. If the problem can not be reproduced in any of the demos + included in the CodeMirror distribution, please provide an HTML + document that demonstrates the problem. The best way to do this is + to go to jsbin.com, enter + it there, press save, and include the resulting link in your bug + report.
  10. +
+ +
+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/doc/upgrade_v2.2.html b/pitfall/pdfkit/node_modules/codemirror/doc/upgrade_v2.2.html new file mode 100644 index 00000000..a2dddef7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/doc/upgrade_v2.2.html @@ -0,0 +1,96 @@ + + +CodeMirror: Version 2.2 upgrade guide + + + + + +
+ +

Upgrading to v2.2

+ +

There are a few things in the 2.2 release that require some care +when upgrading.

+ +

No more default.css

+ +

The default theme is now included +in codemirror.css, so +you do not have to included it separately anymore. (It was tiny, so +even if you're not using it, the extra data overhead is negligible.) + +

Different key customization

+ +

CodeMirror has moved to a system +where keymaps are used to +bind behavior to keys. This means custom +bindings are now possible.

+ +

Three options that influenced key +behavior, tabMode, enterMode, +and smartHome, are no longer supported. Instead, you can +provide custom bindings to influence the way these keys act. This is +done through the +new extraKeys +option, which can hold an object mapping key names to functionality. A +simple example would be:

+ +
  extraKeys: {
+    "Ctrl-S": function(instance) { saveText(instance.getValue()); },
+    "Ctrl-/": "undo"
+  }
+ +

Keys can be mapped either to functions, which will be given the +editor instance as argument, or to strings, which are mapped through +functions through the CodeMirror.commands table, which +contains all the built-in editing commands, and can be inspected and +extended by external code.

+ +

By default, the Home key is bound to +the "goLineStartSmart" command, which moves the cursor to +the first non-whitespace character on the line. You can set do this to +make it always go to the very start instead:

+ +
  extraKeys: {"Home": "goLineStart"}
+ +

Similarly, Enter is bound +to "newlineAndIndent" by default. You can bind it to +something else to get different behavior. To disable special handling +completely and only get a newline character inserted, you can bind it +to false:

+ +
  extraKeys: {"Enter": false}
+ +

The same works for Tab. If you don't want CodeMirror +to handle it, bind it to false. The default behaviour is +to indent the current line more ("indentMore" command), +and indent it less when shift is held ("indentLess"). +There are also "indentAuto" (smart indent) +and "insertTab" commands provided for alternate +behaviors. Or you can write your own handler function to do something +different altogether.

+ +

Tabs

+ +

Handling of tabs changed completely. The display width of tabs can +now be set with the tabSize option, and tabs can +be styled by setting CSS rules +for the cm-tab class.

+ +

The default width for tabs is now 4, as opposed to the 8 that is +hard-wired into browsers. If you are relying on 8-space tabs, make +sure you explicitly set tabSize: 8 in your options.

+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/doc/upgrade_v3.html b/pitfall/pdfkit/node_modules/codemirror/doc/upgrade_v3.html new file mode 100644 index 00000000..19757924 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/doc/upgrade_v3.html @@ -0,0 +1,230 @@ + + +CodeMirror: Version 3 upgrade guide + + + + + + + + + + + + + + +
+ +

Upgrading to version 3

+ +

Version 3 does not depart too much from 2.x API, and sites that use +CodeMirror in a very simple way might be able to upgrade without +trouble. But it does introduce a number of incompatibilities. Please +at least skim this text before upgrading.

+ +

Note that version 3 drops full support for Internet +Explorer 7. The editor will mostly work on that browser, but +it'll be significantly glitchy.

+ +
+

DOM structure

+ +

This one is the most likely to cause problems. The internal +structure of the editor has changed quite a lot, mostly to implement a +new scrolling model.

+ +

Editor height is now set on the outer wrapper element (CSS +class CodeMirror), not on the scroller element +(CodeMirror-scroll).

+ +

Other nodes were moved, dropped, and added. If you have any code +that makes assumptions about the internal DOM structure of the editor, +you'll have to re-test it and probably update it to work with v3.

+ +

See the styling section of the +manual for more information.

+
+
+

Gutter model

+ +

In CodeMirror 2.x, there was a single gutter, and line markers +created with setMarker would have to somehow coexist with +the line numbers (if present). Version 3 allows you to specify an +array of gutters, by class +name, +use setGutterMarker +to add or remove markers in individual gutters, and clear whole +gutters +with clearGutter. +Gutter markers are now specified as DOM nodes, rather than HTML +snippets.

+ +

The gutters no longer horizontally scrolls along with the content. +The fixedGutter option was removed (since it is now the +only behavior).

+ +
+<style>
+  /* Define a gutter style */
+  .note-gutter { width: 3em; background: cyan; }
+</style>
+<script>
+  // Create an instance with two gutters -- line numbers and notes
+  var cm = new CodeMirror(document.body, {
+    gutters: ["note-gutter", "CodeMirror-linenumbers"],
+    lineNumbers: true
+  });
+  // Add a note to line 0
+  cm.setGutterMarker(0, "note-gutter", document.createTextNode("hi"));
+</script>
+
+
+
+

Event handling

+ +

Most of the onXYZ options have been removed. The same +effect is now obtained by calling +the on method with a string +identifying the event type. Multiple handlers can now be registered +(and individually unregistered) for an event, and objects such as line +handlers now also expose events. See the +full list here.

+ +

(The onKeyEvent and onDragEvent options, +which act more as hooks than as event handlers, are still there in +their old form.)

+ +
+cm.on("change", function(cm, change) {
+  console.log("something changed! (" + change.origin + ")");
+});
+
+
+
+

markText method arguments

+ +

The markText method +(which has gained some interesting new features, such as creating +atomic and read-only spans, or replacing spans with widgets) no longer +takes the CSS class name as a separate argument, but makes it an +optional field in the options object instead.

+ +
+// Style first ten lines, and forbid the cursor from entering them
+cm.markText({line: 0, ch: 0}, {line: 10, ch: 0}, {
+  className: "magic-text",
+  inclusiveLeft: true,
+  atomic: true
+});
+
+
+
+

Line folding

+ +

The interface for hiding lines has been +removed. markText can +now be used to do the same in a more flexible and powerful way.

+ +

The folding script has been +updated to use the new interface, and should now be more robust.

+ +
+// Fold a range, replacing it with the text "??"
+var range = cm.markText({line: 4, ch: 2}, {line: 8, ch: 1}, {
+  replacedWith: document.createTextNode("??"),
+  // Auto-unfold when cursor moves into the range
+  clearOnEnter: true
+});
+// Get notified when auto-unfolding
+CodeMirror.on(range, "clear", function() {
+  console.log("boom");
+});
+
+
+
+

Line CSS classes

+ +

The setLineClass method has been replaced +by addLineClass +and removeLineClass, +which allow more modular control over the classes attached to a line.

+ +
+var marked = cm.addLineClass(10, "background", "highlighted-line");
+setTimeout(function() {
+  cm.removeLineClass(marked, "background", "highlighted-line");
+});
+
+
+
+

Position properties

+ +

All methods that take or return objects that represent screen +positions now use {left, top, bottom, right} properties +(not always all of them) instead of the {x, y, yBot} used +by some methods in v2.x.

+ +

Affected methods +are cursorCoords, charCoords, coordsChar, +and getScrollInfo.

+
+
+

Bracket matching no longer in core

+ +

The matchBrackets +option is no longer defined in the core editor. +Load addon/edit/matchbrackets.js to enable it.

+
+
+

Mode management

+ +

The CodeMirror.listModes +and CodeMirror.listMIMEs functions, used for listing +defined modes, are gone. You are now encouraged to simply +inspect CodeMirror.modes (mapping mode names to mode +constructors) and CodeMirror.mimeModes (mapping MIME +strings to mode specs).

+
+
+

New features

+ +

Some more reasons to upgrade to version 3.

+ +
    +
  • Bi-directional text support. CodeMirror will now mostly do the + right thing when editing Arabic or Hebrew text.
  • +
  • Arbitrary line heights. Using fonts with different heights + inside the editor (whether off by one pixel or fifty) is now + supported and handled gracefully.
  • +
  • In-line widgets. See the demo + and the docs.
  • +
  • Defining custom options + with CodeMirror.defineOption.
  • +
+
+
+ + diff --git a/pitfall/pdfkit/node_modules/codemirror/index.html b/pitfall/pdfkit/node_modules/codemirror/index.html new file mode 100644 index 00000000..f9a93897 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/index.html @@ -0,0 +1,192 @@ + + +CodeMirror + + + + + + + + + + + + + + + + + +
+ +
+

CodeMirror is a versatile text editor + implemented in JavaScript for the browser. It is specialized for + editing code, and comes with a number of language modes and addons + that implement more advanced editing functionaly.

+ +

A rich programming API and a + CSS theming system are + available for customizing CodeMirror to fit your application, and + extending it with new functionality.

+
+ +
+

This is CodeMirror

+
+
+ +
+ DOWNLOAD LATEST RELEASE +
version 3.20 (Release notes)
+ +
+ DONATE WITH PAYPAL +
+ or Bank, + Gittip, + Flattr
+
+ × + Bank: Rabobank
+ Country: Netherlands
+ SWIFT: RABONL2U
+ Account: 147850770
+ Name: Marijn Haverbeke
+ IBAN: NL26 RABO 0147 8507 70 +
+
+ + +
+
+
+ Purchase commercial support +
+
+
+
+ +
+

Features

+ +
+ +
+

Community

+ +

CodeMirror is an open-source project shared under + an MIT license. It is the editor used in + Light + Table, Adobe + Brackets, Google Apps + Script, Bitbucket, + and many other projects.

+ +

Development and bug tracking happens + on github + (alternate git + repository). + Please read these + pointers before submitting a bug. Use pull requests to submit + patches. All contributions must be released under the same MIT + license that CodeMirror uses.

+ +

Discussion around the project is done on + a mailing list. + There is also + the codemirror-announce + list, which is only used for major announcements (such as new + versions). If needed, you can + contact the maintainer + directly.

+ +

A list of CodeMirror-related software that is not part of the + main distribution is maintained + on our + wiki. Feel free to add your project.

+
+ +
+

Browser support

+

The desktop versions of the following browsers, + in standards mode (HTML5 <!doctype html> + recommended) are supported:

+ + + + + + +
Firefoxversion 3 and up
Chromeany version
Safariversion 5.2 and up
Internet Explorerversion 8 and up
Operaversion 9 and up
+

Modern mobile browsers tend to partly work. Bug reports and + patches for mobile support are welcome, but the maintainer does not + have the time or budget to actually work on it himself.

+
+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/keymap/emacs.js b/pitfall/pdfkit/node_modules/codemirror/keymap/emacs.js new file mode 100644 index 00000000..7a3dfb11 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/keymap/emacs.js @@ -0,0 +1,387 @@ +(function() { + "use strict"; + + var Pos = CodeMirror.Pos; + function posEq(a, b) { return a.line == b.line && a.ch == b.ch; } + + // Kill 'ring' + + var killRing = []; + function addToRing(str) { + killRing.push(str); + if (killRing.length > 50) killRing.shift(); + } + function growRingTop(str) { + if (!killRing.length) return addToRing(str); + killRing[killRing.length - 1] += str; + } + function getFromRing(n) { return killRing[killRing.length - (n ? Math.min(n, 1) : 1)] || ""; } + function popFromRing() { if (killRing.length > 1) killRing.pop(); return getFromRing(); } + + var lastKill = null; + + function kill(cm, from, to, mayGrow, text) { + if (text == null) text = cm.getRange(from, to); + + if (mayGrow && lastKill && lastKill.cm == cm && posEq(from, lastKill.pos) && cm.isClean(lastKill.gen)) + growRingTop(text); + else + addToRing(text); + cm.replaceRange("", from, to, "+delete"); + + if (mayGrow) lastKill = {cm: cm, pos: from, gen: cm.changeGeneration()}; + else lastKill = null; + } + + // Boundaries of various units + + function byChar(cm, pos, dir) { + return cm.findPosH(pos, dir, "char", true); + } + + function byWord(cm, pos, dir) { + return cm.findPosH(pos, dir, "word", true); + } + + function byLine(cm, pos, dir) { + return cm.findPosV(pos, dir, "line", cm.doc.sel.goalColumn); + } + + function byPage(cm, pos, dir) { + return cm.findPosV(pos, dir, "page", cm.doc.sel.goalColumn); + } + + function byParagraph(cm, pos, dir) { + var no = pos.line, line = cm.getLine(no); + var sawText = /\S/.test(dir < 0 ? line.slice(0, pos.ch) : line.slice(pos.ch)); + var fst = cm.firstLine(), lst = cm.lastLine(); + for (;;) { + no += dir; + if (no < fst || no > lst) + return cm.clipPos(Pos(no - dir, dir < 0 ? 0 : null)); + line = cm.getLine(no); + var hasText = /\S/.test(line); + if (hasText) sawText = true; + else if (sawText) return Pos(no, 0); + } + } + + function bySentence(cm, pos, dir) { + var line = pos.line, ch = pos.ch; + var text = cm.getLine(pos.line), sawWord = false; + for (;;) { + var next = text.charAt(ch + (dir < 0 ? -1 : 0)); + if (!next) { // End/beginning of line reached + if (line == (dir < 0 ? cm.firstLine() : cm.lastLine())) return Pos(line, ch); + text = cm.getLine(line + dir); + if (!/\S/.test(text)) return Pos(line, ch); + line += dir; + ch = dir < 0 ? text.length : 0; + continue; + } + if (sawWord && /[!?.]/.test(next)) return Pos(line, ch + (dir > 0 ? 1 : 0)); + if (!sawWord) sawWord = /\w/.test(next); + ch += dir; + } + } + + function byExpr(cm, pos, dir) { + var wrap; + if (cm.findMatchingBracket && (wrap = cm.findMatchingBracket(pos, true)) + && wrap.match && (wrap.forward ? 1 : -1) == dir) + return dir > 0 ? Pos(wrap.to.line, wrap.to.ch + 1) : wrap.to; + + for (var first = true;; first = false) { + var token = cm.getTokenAt(pos); + var after = Pos(pos.line, dir < 0 ? token.start : token.end); + if (first && dir > 0 && token.end == pos.ch || !/\w/.test(token.string)) { + var newPos = cm.findPosH(after, dir, "char"); + if (posEq(after, newPos)) return pos; + else pos = newPos; + } else { + return after; + } + } + } + + // Prefixes (only crudely supported) + + function getPrefix(cm, precise) { + var digits = cm.state.emacsPrefix; + if (!digits) return precise ? null : 1; + clearPrefix(cm); + return digits == "-" ? -1 : Number(digits); + } + + function repeated(cmd) { + var f = typeof cmd == "string" ? function(cm) { cm.execCommand(cmd); } : cmd; + return function(cm) { + var prefix = getPrefix(cm); + f(cm); + for (var i = 1; i < prefix; ++i) f(cm); + }; + } + + function findEnd(cm, by, dir) { + var pos = cm.getCursor(), prefix = getPrefix(cm); + if (prefix < 0) { dir = -dir; prefix = -prefix; } + for (var i = 0; i < prefix; ++i) { + var newPos = by(cm, pos, dir); + if (posEq(newPos, pos)) break; + pos = newPos; + } + return pos; + } + + function move(by, dir) { + var f = function(cm) { + cm.extendSelection(findEnd(cm, by, dir)); + }; + f.motion = true; + return f; + } + + function killTo(cm, by, dir) { + kill(cm, cm.getCursor(), findEnd(cm, by, dir), true); + } + + function addPrefix(cm, digit) { + if (cm.state.emacsPrefix) { + if (digit != "-") cm.state.emacsPrefix += digit; + return; + } + // Not active yet + cm.state.emacsPrefix = digit; + cm.on("keyHandled", maybeClearPrefix); + cm.on("inputRead", maybeDuplicateInput); + } + + var prefixPreservingKeys = {"Alt-G": true, "Ctrl-X": true, "Ctrl-Q": true, "Ctrl-U": true}; + + function maybeClearPrefix(cm, arg) { + if (!cm.state.emacsPrefixMap && !prefixPreservingKeys.hasOwnProperty(arg)) + clearPrefix(cm); + } + + function clearPrefix(cm) { + cm.state.emacsPrefix = null; + cm.off("keyHandled", maybeClearPrefix); + cm.off("inputRead", maybeDuplicateInput); + } + + function maybeDuplicateInput(cm, event) { + var dup = getPrefix(cm); + if (dup > 1 && event.origin == "+input") { + var one = event.text.join("\n"), txt = ""; + for (var i = 1; i < dup; ++i) txt += one; + cm.replaceSelection(txt, "end", "+input"); + } + } + + function addPrefixMap(cm) { + cm.state.emacsPrefixMap = true; + cm.addKeyMap(prefixMap); + cm.on("keyHandled", maybeRemovePrefixMap); + cm.on("inputRead", maybeRemovePrefixMap); + } + + function maybeRemovePrefixMap(cm, arg) { + if (typeof arg == "string" && (/^\d$/.test(arg) || arg == "Ctrl-U")) return; + cm.removeKeyMap(prefixMap); + cm.state.emacsPrefixMap = false; + cm.off("keyHandled", maybeRemovePrefixMap); + cm.off("inputRead", maybeRemovePrefixMap); + } + + // Utilities + + function setMark(cm) { + cm.setCursor(cm.getCursor()); + cm.setExtending(true); + cm.on("change", function() { cm.setExtending(false); }); + } + + function getInput(cm, msg, f) { + if (cm.openDialog) + cm.openDialog(msg + ": ", f, {bottom: true}); + else + f(prompt(msg, "")); + } + + function operateOnWord(cm, op) { + var start = cm.getCursor(), end = cm.findPosH(start, 1, "word"); + cm.replaceRange(op(cm.getRange(start, end)), start, end); + cm.setCursor(end); + } + + function toEnclosingExpr(cm) { + var pos = cm.getCursor(), line = pos.line, ch = pos.ch; + var stack = []; + while (line >= cm.firstLine()) { + var text = cm.getLine(line); + for (var i = ch == null ? text.length : ch; i > 0;) { + var ch = text.charAt(--i); + if (ch == ")") + stack.push("("); + else if (ch == "]") + stack.push("["); + else if (ch == "}") + stack.push("{"); + else if (/[\(\{\[]/.test(ch) && (!stack.length || stack.pop() != ch)) + return cm.extendSelection(Pos(line, i)); + } + --line; ch = null; + } + } + + // Actual keymap + + var keyMap = CodeMirror.keyMap.emacs = { + "Ctrl-W": function(cm) {kill(cm, cm.getCursor("start"), cm.getCursor("end"));}, + "Ctrl-K": repeated(function(cm) { + var start = cm.getCursor(), end = cm.clipPos(Pos(start.line)); + var text = cm.getRange(start, end); + if (!/\S/.test(text)) { + text += "\n"; + end = Pos(start.line + 1, 0); + } + kill(cm, start, end, true, text); + }), + "Alt-W": function(cm) { + addToRing(cm.getSelection()); + }, + "Ctrl-Y": function(cm) { + var start = cm.getCursor(); + cm.replaceRange(getFromRing(getPrefix(cm)), start, start, "paste"); + cm.setSelection(start, cm.getCursor()); + }, + "Alt-Y": function(cm) {cm.replaceSelection(popFromRing());}, + + "Ctrl-Space": setMark, "Ctrl-Shift-2": setMark, + + "Ctrl-F": move(byChar, 1), "Ctrl-B": move(byChar, -1), + "Right": move(byChar, 1), "Left": move(byChar, -1), + "Ctrl-D": function(cm) { killTo(cm, byChar, 1); }, + "Delete": function(cm) { killTo(cm, byChar, 1); }, + "Ctrl-H": function(cm) { killTo(cm, byChar, -1); }, + "Backspace": function(cm) { killTo(cm, byChar, -1); }, + + "Alt-F": move(byWord, 1), "Alt-B": move(byWord, -1), + "Alt-D": function(cm) { killTo(cm, byWord, 1); }, + "Alt-Backspace": function(cm) { killTo(cm, byWord, -1); }, + + "Ctrl-N": move(byLine, 1), "Ctrl-P": move(byLine, -1), + "Down": move(byLine, 1), "Up": move(byLine, -1), + "Ctrl-A": "goLineStart", "Ctrl-E": "goLineEnd", + "End": "goLineEnd", "Home": "goLineStart", + + "Alt-V": move(byPage, -1), "Ctrl-V": move(byPage, 1), + "PageUp": move(byPage, -1), "PageDown": move(byPage, 1), + + "Ctrl-Up": move(byParagraph, -1), "Ctrl-Down": move(byParagraph, 1), + + "Alt-A": move(bySentence, -1), "Alt-E": move(bySentence, 1), + "Alt-K": function(cm) { killTo(cm, bySentence, 1); }, + + "Ctrl-Alt-K": function(cm) { killTo(cm, byExpr, 1); }, + "Ctrl-Alt-Backspace": function(cm) { killTo(cm, byExpr, -1); }, + "Ctrl-Alt-F": move(byExpr, 1), "Ctrl-Alt-B": move(byExpr, -1), + + "Shift-Ctrl-Alt-2": function(cm) { + cm.setSelection(findEnd(cm, byExpr, 1), cm.getCursor()); + }, + "Ctrl-Alt-T": function(cm) { + var leftStart = byExpr(cm, cm.getCursor(), -1), leftEnd = byExpr(cm, leftStart, 1); + var rightEnd = byExpr(cm, leftEnd, 1), rightStart = byExpr(cm, rightEnd, -1); + cm.replaceRange(cm.getRange(rightStart, rightEnd) + cm.getRange(leftEnd, rightStart) + + cm.getRange(leftStart, leftEnd), leftStart, rightEnd); + }, + "Ctrl-Alt-U": repeated(toEnclosingExpr), + + "Alt-Space": function(cm) { + var pos = cm.getCursor(), from = pos.ch, to = pos.ch, text = cm.getLine(pos.line); + while (from && /\s/.test(text.charAt(from - 1))) --from; + while (to < text.length && /\s/.test(text.charAt(to))) ++to; + cm.replaceRange(" ", Pos(pos.line, from), Pos(pos.line, to)); + }, + "Ctrl-O": repeated(function(cm) { cm.replaceSelection("\n", "start"); }), + "Ctrl-T": repeated(function(cm) { + var pos = cm.getCursor(); + if (pos.ch < cm.getLine(pos.line).length) pos = Pos(pos.line, pos.ch + 1); + var from = cm.findPosH(pos, -2, "char"); + var range = cm.getRange(from, pos); + if (range.length != 2) return; + cm.setSelection(from, pos); + cm.replaceSelection(range.charAt(1) + range.charAt(0), "end"); + }), + + "Alt-C": repeated(function(cm) { + operateOnWord(cm, function(w) { + var letter = w.search(/\w/); + if (letter == -1) return w; + return w.slice(0, letter) + w.charAt(letter).toUpperCase() + w.slice(letter + 1).toLowerCase(); + }); + }), + "Alt-U": repeated(function(cm) { + operateOnWord(cm, function(w) { return w.toUpperCase(); }); + }), + "Alt-L": repeated(function(cm) { + operateOnWord(cm, function(w) { return w.toLowerCase(); }); + }), + + "Alt-;": "toggleComment", + + "Ctrl-/": repeated("undo"), "Shift-Ctrl--": repeated("undo"), + "Ctrl-Z": repeated("undo"), "Cmd-Z": repeated("undo"), + "Shift-Alt-,": "goDocStart", "Shift-Alt-.": "goDocEnd", + "Ctrl-S": "findNext", "Ctrl-R": "findPrev", "Ctrl-G": "clearSearch", "Shift-Alt-5": "replace", + "Alt-/": "autocomplete", + "Ctrl-J": "newlineAndIndent", "Enter": false, "Tab": "indentAuto", + + "Alt-G": function(cm) {cm.setOption("keyMap", "emacs-Alt-G");}, + "Ctrl-X": function(cm) {cm.setOption("keyMap", "emacs-Ctrl-X");}, + "Ctrl-Q": function(cm) {cm.setOption("keyMap", "emacs-Ctrl-Q");}, + "Ctrl-U": addPrefixMap + }; + + CodeMirror.keyMap["emacs-Ctrl-X"] = { + "Tab": function(cm) { + cm.indentSelection(getPrefix(cm, true) || cm.getOption("indentUnit")); + }, + "Ctrl-X": function(cm) { + cm.setSelection(cm.getCursor("head"), cm.getCursor("anchor")); + }, + + "Ctrl-S": "save", "Ctrl-W": "save", "S": "saveAll", "F": "open", "U": repeated("undo"), "K": "close", + "Delete": function(cm) { kill(cm, cm.getCursor(), bySentence(cm, cm.getCursor(), 1), true); }, + auto: "emacs", nofallthrough: true, disableInput: true + }; + + CodeMirror.keyMap["emacs-Alt-G"] = { + "G": function(cm) { + var prefix = getPrefix(cm, true); + if (prefix != null && prefix > 0) return cm.setCursor(prefix - 1); + + getInput(cm, "Goto line", function(str) { + var num; + if (str && !isNaN(num = Number(str)) && num == num|0 && num > 0) + cm.setCursor(num - 1); + }); + }, + auto: "emacs", nofallthrough: true, disableInput: true + }; + + CodeMirror.keyMap["emacs-Ctrl-Q"] = { + "Tab": repeated("insertTab"), + auto: "emacs", nofallthrough: true + }; + + var prefixMap = {"Ctrl-G": clearPrefix}; + function regPrefix(d) { + prefixMap[d] = function(cm) { addPrefix(cm, d); }; + keyMap["Ctrl-" + d] = function(cm) { addPrefix(cm, d); }; + prefixPreservingKeys["Ctrl-" + d] = true; + } + for (var i = 0; i < 10; ++i) regPrefix(String(i)); + regPrefix("-"); +})(); diff --git a/pitfall/pdfkit/node_modules/codemirror/keymap/extra.js b/pitfall/pdfkit/node_modules/codemirror/keymap/extra.js new file mode 100644 index 00000000..18dd5a97 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/keymap/extra.js @@ -0,0 +1,43 @@ +// A number of additional default bindings that are too obscure to +// include in the core codemirror.js file. + +(function() { + "use strict"; + + var Pos = CodeMirror.Pos; + + function moveLines(cm, start, end, dist) { + if (!dist || start > end) return 0; + + var from = cm.clipPos(Pos(start, 0)), to = cm.clipPos(Pos(end)); + var text = cm.getRange(from, to); + + if (start <= cm.firstLine()) + cm.replaceRange("", from, Pos(to.line + 1, 0)); + else + cm.replaceRange("", Pos(from.line - 1), to); + var target = from.line + dist; + if (target <= cm.firstLine()) { + cm.replaceRange(text + "\n", Pos(target, 0)); + return cm.firstLine() - from.line; + } else { + var targetPos = cm.clipPos(Pos(target - 1)); + cm.replaceRange("\n" + text, targetPos); + return targetPos.line + 1 - from.line; + } + } + + function moveSelectedLines(cm, dist) { + var head = cm.getCursor("head"), anchor = cm.getCursor("anchor"); + cm.operation(function() { + var moved = moveLines(cm, Math.min(head.line, anchor.line), Math.max(head.line, anchor.line), dist); + cm.setSelection(Pos(anchor.line + moved, anchor.ch), Pos(head.line + moved, head.ch)); + }); + } + + CodeMirror.commands.moveLinesUp = function(cm) { moveSelectedLines(cm, -1); }; + CodeMirror.commands.moveLinesDown = function(cm) { moveSelectedLines(cm, 1); }; + + CodeMirror.keyMap["default"]["Alt-Up"] = "moveLinesUp"; + CodeMirror.keyMap["default"]["Alt-Down"] = "moveLinesDown"; +})(); diff --git a/pitfall/pdfkit/node_modules/codemirror/keymap/vim.js b/pitfall/pdfkit/node_modules/codemirror/keymap/vim.js new file mode 100644 index 00000000..dab10e21 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/keymap/vim.js @@ -0,0 +1,3703 @@ +/** + * Supported keybindings: + * + * Motion: + * h, j, k, l + * gj, gk + * e, E, w, W, b, B, ge, gE + * f, F, t, T + * $, ^, 0, -, +, _ + * gg, G + * % + * ', ` + * + * Operator: + * d, y, c + * dd, yy, cc + * g~, g~g~ + * >, <, >>, << + * + * Operator-Motion: + * x, X, D, Y, C, ~ + * + * Action: + * a, i, s, A, I, S, o, O + * zz, z., z, zt, zb, z- + * J + * u, Ctrl-r + * m + * r + * + * Modes: + * ESC - leave insert mode, visual mode, and clear input state. + * Ctrl-[, Ctrl-c - same as ESC. + * + * Registers: unamed, -, a-z, A-Z, 0-9 + * (Does not respect the special case for number registers when delete + * operator is made with these commands: %, (, ), , /, ?, n, N, {, } ) + * TODO: Implement the remaining registers. + * Marks: a-z, A-Z, and 0-9 + * TODO: Implement the remaining special marks. They have more complex + * behavior. + * + * Events: + * 'vim-mode-change' - raised on the editor anytime the current mode changes, + * Event object: {mode: "visual", subMode: "linewise"} + * + * Code structure: + * 1. Default keymap + * 2. Variable declarations and short basic helpers + * 3. Instance (External API) implementation + * 4. Internal state tracking objects (input state, counter) implementation + * and instanstiation + * 5. Key handler (the main command dispatcher) implementation + * 6. Motion, operator, and action implementations + * 7. Helper functions for the key handler, motions, operators, and actions + * 8. Set up Vim to work as a keymap for CodeMirror. + */ + +(function() { + 'use strict'; + + var defaultKeymap = [ + // Key to key mapping. This goes first to make it possible to override + // existing mappings. + { keys: [''], type: 'keyToKey', toKeys: ['h'] }, + { keys: [''], type: 'keyToKey', toKeys: ['l'] }, + { keys: [''], type: 'keyToKey', toKeys: ['k'] }, + { keys: [''], type: 'keyToKey', toKeys: ['j'] }, + { keys: [''], type: 'keyToKey', toKeys: ['l'] }, + { keys: [''], type: 'keyToKey', toKeys: ['h'] }, + { keys: [''], type: 'keyToKey', toKeys: ['W'] }, + { keys: [''], type: 'keyToKey', toKeys: ['B'] }, + { keys: [''], type: 'keyToKey', toKeys: ['w'] }, + { keys: [''], type: 'keyToKey', toKeys: ['b'] }, + { keys: [''], type: 'keyToKey', toKeys: ['j'] }, + { keys: [''], type: 'keyToKey', toKeys: ['k'] }, + { keys: ['C-['], type: 'keyToKey', toKeys: [''] }, + { keys: [''], type: 'keyToKey', toKeys: [''] }, + { keys: ['s'], type: 'keyToKey', toKeys: ['c', 'l'], context: 'normal' }, + { keys: ['s'], type: 'keyToKey', toKeys: ['x', 'i'], context: 'visual'}, + { keys: ['S'], type: 'keyToKey', toKeys: ['c', 'c'], context: 'normal' }, + { keys: ['S'], type: 'keyToKey', toKeys: ['d', 'c', 'c'], context: 'visual' }, + { keys: [''], type: 'keyToKey', toKeys: ['0'] }, + { keys: [''], type: 'keyToKey', toKeys: ['$'] }, + { keys: [''], type: 'keyToKey', toKeys: [''] }, + { keys: [''], type: 'keyToKey', toKeys: [''] }, + // Motions + { keys: ['H'], type: 'motion', + motion: 'moveToTopLine', + motionArgs: { linewise: true, toJumplist: true }}, + { keys: ['M'], type: 'motion', + motion: 'moveToMiddleLine', + motionArgs: { linewise: true, toJumplist: true }}, + { keys: ['L'], type: 'motion', + motion: 'moveToBottomLine', + motionArgs: { linewise: true, toJumplist: true }}, + { keys: ['h'], type: 'motion', + motion: 'moveByCharacters', + motionArgs: { forward: false }}, + { keys: ['l'], type: 'motion', + motion: 'moveByCharacters', + motionArgs: { forward: true }}, + { keys: ['j'], type: 'motion', + motion: 'moveByLines', + motionArgs: { forward: true, linewise: true }}, + { keys: ['k'], type: 'motion', + motion: 'moveByLines', + motionArgs: { forward: false, linewise: true }}, + { keys: ['g','j'], type: 'motion', + motion: 'moveByDisplayLines', + motionArgs: { forward: true }}, + { keys: ['g','k'], type: 'motion', + motion: 'moveByDisplayLines', + motionArgs: { forward: false }}, + { keys: ['w'], type: 'motion', + motion: 'moveByWords', + motionArgs: { forward: true, wordEnd: false }}, + { keys: ['W'], type: 'motion', + motion: 'moveByWords', + motionArgs: { forward: true, wordEnd: false, bigWord: true }}, + { keys: ['e'], type: 'motion', + motion: 'moveByWords', + motionArgs: { forward: true, wordEnd: true, inclusive: true }}, + { keys: ['E'], type: 'motion', + motion: 'moveByWords', + motionArgs: { forward: true, wordEnd: true, bigWord: true, + inclusive: true }}, + { keys: ['b'], type: 'motion', + motion: 'moveByWords', + motionArgs: { forward: false, wordEnd: false }}, + { keys: ['B'], type: 'motion', + motion: 'moveByWords', + motionArgs: { forward: false, wordEnd: false, bigWord: true }}, + { keys: ['g', 'e'], type: 'motion', + motion: 'moveByWords', + motionArgs: { forward: false, wordEnd: true, inclusive: true }}, + { keys: ['g', 'E'], type: 'motion', + motion: 'moveByWords', + motionArgs: { forward: false, wordEnd: true, bigWord: true, + inclusive: true }}, + { keys: ['{'], type: 'motion', motion: 'moveByParagraph', + motionArgs: { forward: false, toJumplist: true }}, + { keys: ['}'], type: 'motion', motion: 'moveByParagraph', + motionArgs: { forward: true, toJumplist: true }}, + { keys: [''], type: 'motion', + motion: 'moveByPage', motionArgs: { forward: true }}, + { keys: [''], type: 'motion', + motion: 'moveByPage', motionArgs: { forward: false }}, + { keys: [''], type: 'motion', + motion: 'moveByScroll', + motionArgs: { forward: true, explicitRepeat: true }}, + { keys: [''], type: 'motion', + motion: 'moveByScroll', + motionArgs: { forward: false, explicitRepeat: true }}, + { keys: ['g', 'g'], type: 'motion', + motion: 'moveToLineOrEdgeOfDocument', + motionArgs: { forward: false, explicitRepeat: true, linewise: true, toJumplist: true }}, + { keys: ['G'], type: 'motion', + motion: 'moveToLineOrEdgeOfDocument', + motionArgs: { forward: true, explicitRepeat: true, linewise: true, toJumplist: true }}, + { keys: ['0'], type: 'motion', motion: 'moveToStartOfLine' }, + { keys: ['^'], type: 'motion', + motion: 'moveToFirstNonWhiteSpaceCharacter' }, + { keys: ['+'], type: 'motion', + motion: 'moveByLines', + motionArgs: { forward: true, toFirstChar:true }}, + { keys: ['-'], type: 'motion', + motion: 'moveByLines', + motionArgs: { forward: false, toFirstChar:true }}, + { keys: ['_'], type: 'motion', + motion: 'moveByLines', + motionArgs: { forward: true, toFirstChar:true, repeatOffset:-1 }}, + { keys: ['$'], type: 'motion', + motion: 'moveToEol', + motionArgs: { inclusive: true }}, + { keys: ['%'], type: 'motion', + motion: 'moveToMatchedSymbol', + motionArgs: { inclusive: true, toJumplist: true }}, + { keys: ['f', 'character'], type: 'motion', + motion: 'moveToCharacter', + motionArgs: { forward: true , inclusive: true }}, + { keys: ['F', 'character'], type: 'motion', + motion: 'moveToCharacter', + motionArgs: { forward: false }}, + { keys: ['t', 'character'], type: 'motion', + motion: 'moveTillCharacter', + motionArgs: { forward: true, inclusive: true }}, + { keys: ['T', 'character'], type: 'motion', + motion: 'moveTillCharacter', + motionArgs: { forward: false }}, + { keys: [';'], type: 'motion', motion: 'repeatLastCharacterSearch', + motionArgs: { forward: true }}, + { keys: [','], type: 'motion', motion: 'repeatLastCharacterSearch', + motionArgs: { forward: false }}, + { keys: ['\'', 'character'], type: 'motion', motion: 'goToMark', + motionArgs: {toJumplist: true}}, + { keys: ['`', 'character'], type: 'motion', motion: 'goToMark', + motionArgs: {toJumplist: true}}, + { keys: [']', '`'], type: 'motion', motion: 'jumpToMark', motionArgs: { forward: true } }, + { keys: ['[', '`'], type: 'motion', motion: 'jumpToMark', motionArgs: { forward: false } }, + { keys: [']', '\''], type: 'motion', motion: 'jumpToMark', motionArgs: { forward: true, linewise: true } }, + { keys: ['[', '\''], type: 'motion', motion: 'jumpToMark', motionArgs: { forward: false, linewise: true } }, + { keys: [']', 'character'], type: 'motion', + motion: 'moveToSymbol', + motionArgs: { forward: true, toJumplist: true}}, + { keys: ['[', 'character'], type: 'motion', + motion: 'moveToSymbol', + motionArgs: { forward: false, toJumplist: true}}, + { keys: ['|'], type: 'motion', + motion: 'moveToColumn', + motionArgs: { }}, + // Operators + { keys: ['d'], type: 'operator', operator: 'delete' }, + { keys: ['y'], type: 'operator', operator: 'yank' }, + { keys: ['c'], type: 'operator', operator: 'change' }, + { keys: ['>'], type: 'operator', operator: 'indent', + operatorArgs: { indentRight: true }}, + { keys: ['<'], type: 'operator', operator: 'indent', + operatorArgs: { indentRight: false }}, + { keys: ['g', '~'], type: 'operator', operator: 'swapcase' }, + { keys: ['n'], type: 'motion', motion: 'findNext', + motionArgs: { forward: true, toJumplist: true }}, + { keys: ['N'], type: 'motion', motion: 'findNext', + motionArgs: { forward: false, toJumplist: true }}, + // Operator-Motion dual commands + { keys: ['x'], type: 'operatorMotion', operator: 'delete', + motion: 'moveByCharacters', motionArgs: { forward: true }, + operatorMotionArgs: { visualLine: false }}, + { keys: ['X'], type: 'operatorMotion', operator: 'delete', + motion: 'moveByCharacters', motionArgs: { forward: false }, + operatorMotionArgs: { visualLine: true }}, + { keys: ['D'], type: 'operatorMotion', operator: 'delete', + motion: 'moveToEol', motionArgs: { inclusive: true }, + operatorMotionArgs: { visualLine: true }}, + { keys: ['Y'], type: 'operatorMotion', operator: 'yank', + motion: 'moveToEol', motionArgs: { inclusive: true }, + operatorMotionArgs: { visualLine: true }}, + { keys: ['C'], type: 'operatorMotion', + operator: 'change', + motion: 'moveToEol', motionArgs: { inclusive: true }, + operatorMotionArgs: { visualLine: true }}, + { keys: ['~'], type: 'operatorMotion', + operator: 'swapcase', operatorArgs: { shouldMoveCursor: true }, + motion: 'moveByCharacters', motionArgs: { forward: true }}, + // Actions + { keys: [''], type: 'action', action: 'jumpListWalk', + actionArgs: { forward: true }}, + { keys: [''], type: 'action', action: 'jumpListWalk', + actionArgs: { forward: false }}, + { keys: ['a'], type: 'action', action: 'enterInsertMode', isEdit: true, + actionArgs: { insertAt: 'charAfter' }}, + { keys: ['A'], type: 'action', action: 'enterInsertMode', isEdit: true, + actionArgs: { insertAt: 'eol' }}, + { keys: ['i'], type: 'action', action: 'enterInsertMode', isEdit: true, + actionArgs: { insertAt: 'inplace' }}, + { keys: ['I'], type: 'action', action: 'enterInsertMode', isEdit: true, + actionArgs: { insertAt: 'firstNonBlank' }}, + { keys: ['o'], type: 'action', action: 'newLineAndEnterInsertMode', + isEdit: true, interlaceInsertRepeat: true, + actionArgs: { after: true }}, + { keys: ['O'], type: 'action', action: 'newLineAndEnterInsertMode', + isEdit: true, interlaceInsertRepeat: true, + actionArgs: { after: false }}, + { keys: ['v'], type: 'action', action: 'toggleVisualMode' }, + { keys: ['V'], type: 'action', action: 'toggleVisualMode', + actionArgs: { linewise: true }}, + { keys: ['J'], type: 'action', action: 'joinLines', isEdit: true }, + { keys: ['p'], type: 'action', action: 'paste', isEdit: true, + actionArgs: { after: true, isEdit: true }}, + { keys: ['P'], type: 'action', action: 'paste', isEdit: true, + actionArgs: { after: false, isEdit: true }}, + { keys: ['r', 'character'], type: 'action', action: 'replace', isEdit: true }, + { keys: ['@', 'character'], type: 'action', action: 'replayMacro' }, + { keys: ['q', 'character'], type: 'action', action: 'enterMacroRecordMode' }, + // Handle Replace-mode as a special case of insert mode. + { keys: ['R'], type: 'action', action: 'enterInsertMode', isEdit: true, + actionArgs: { replace: true }}, + { keys: ['u'], type: 'action', action: 'undo' }, + { keys: [''], type: 'action', action: 'redo' }, + { keys: ['m', 'character'], type: 'action', action: 'setMark' }, + { keys: ['"', 'character'], type: 'action', action: 'setRegister' }, + { keys: ['z', 'z'], type: 'action', action: 'scrollToCursor', + actionArgs: { position: 'center' }}, + { keys: ['z', '.'], type: 'action', action: 'scrollToCursor', + actionArgs: { position: 'center' }, + motion: 'moveToFirstNonWhiteSpaceCharacter' }, + { keys: ['z', 't'], type: 'action', action: 'scrollToCursor', + actionArgs: { position: 'top' }}, + { keys: ['z', ''], type: 'action', action: 'scrollToCursor', + actionArgs: { position: 'top' }, + motion: 'moveToFirstNonWhiteSpaceCharacter' }, + { keys: ['z', '-'], type: 'action', action: 'scrollToCursor', + actionArgs: { position: 'bottom' }}, + { keys: ['z', 'b'], type: 'action', action: 'scrollToCursor', + actionArgs: { position: 'bottom' }, + motion: 'moveToFirstNonWhiteSpaceCharacter' }, + { keys: ['.'], type: 'action', action: 'repeatLastEdit' }, + { keys: [''], type: 'action', action: 'incrementNumberToken', + isEdit: true, + actionArgs: {increase: true, backtrack: false}}, + { keys: [''], type: 'action', action: 'incrementNumberToken', + isEdit: true, + actionArgs: {increase: false, backtrack: false}}, + // Text object motions + { keys: ['a', 'character'], type: 'motion', + motion: 'textObjectManipulation' }, + { keys: ['i', 'character'], type: 'motion', + motion: 'textObjectManipulation', + motionArgs: { textObjectInner: true }}, + // Search + { keys: ['/'], type: 'search', + searchArgs: { forward: true, querySrc: 'prompt', toJumplist: true }}, + { keys: ['?'], type: 'search', + searchArgs: { forward: false, querySrc: 'prompt', toJumplist: true }}, + { keys: ['*'], type: 'search', + searchArgs: { forward: true, querySrc: 'wordUnderCursor', toJumplist: true }}, + { keys: ['#'], type: 'search', + searchArgs: { forward: false, querySrc: 'wordUnderCursor', toJumplist: true }}, + // Ex command + { keys: [':'], type: 'ex' } + ]; + + var Vim = function() { + CodeMirror.defineOption('vimMode', false, function(cm, val) { + if (val) { + cm.setOption('keyMap', 'vim'); + CodeMirror.signal(cm, "vim-mode-change", {mode: "normal"}); + cm.on('beforeSelectionChange', beforeSelectionChange); + maybeInitVimState(cm); + } else if (cm.state.vim) { + cm.setOption('keyMap', 'default'); + cm.off('beforeSelectionChange', beforeSelectionChange); + cm.state.vim = null; + } + }); + function beforeSelectionChange(cm, cur) { + var vim = cm.state.vim; + if (vim.insertMode || vim.exMode) return; + + var head = cur.head; + if (head.ch && head.ch == cm.doc.getLine(head.line).length) { + head.ch--; + } + } + + var numberRegex = /[\d]/; + var wordRegexp = [(/\w/), (/[^\w\s]/)], bigWordRegexp = [(/\S/)]; + function makeKeyRange(start, size) { + var keys = []; + for (var i = start; i < start + size; i++) { + keys.push(String.fromCharCode(i)); + } + return keys; + } + var upperCaseAlphabet = makeKeyRange(65, 26); + var lowerCaseAlphabet = makeKeyRange(97, 26); + var numbers = makeKeyRange(48, 10); + var specialSymbols = '~`!@#$%^&*()_-+=[{}]\\|/?.,<>:;"\''.split(''); + var specialKeys = ['Left', 'Right', 'Up', 'Down', 'Space', 'Backspace', + 'Esc', 'Home', 'End', 'PageUp', 'PageDown', 'Enter']; + var validMarks = [].concat(upperCaseAlphabet, lowerCaseAlphabet, numbers, ['<', '>']); + var validRegisters = [].concat(upperCaseAlphabet, lowerCaseAlphabet, numbers, ['-', '"']); + + function isLine(cm, line) { + return line >= cm.firstLine() && line <= cm.lastLine(); + } + function isLowerCase(k) { + return (/^[a-z]$/).test(k); + } + function isMatchableSymbol(k) { + return '()[]{}'.indexOf(k) != -1; + } + function isNumber(k) { + return numberRegex.test(k); + } + function isUpperCase(k) { + return (/^[A-Z]$/).test(k); + } + function isWhiteSpaceString(k) { + return (/^\s*$/).test(k); + } + function inArray(val, arr) { + for (var i = 0; i < arr.length; i++) { + if (arr[i] == val) { + return true; + } + } + return false; + } + + var createCircularJumpList = function() { + var size = 100; + var pointer = -1; + var head = 0; + var tail = 0; + var buffer = new Array(size); + function add(cm, oldCur, newCur) { + var current = pointer % size; + var curMark = buffer[current]; + function useNextSlot(cursor) { + var next = ++pointer % size; + var trashMark = buffer[next]; + if (trashMark) { + trashMark.clear(); + } + buffer[next] = cm.setBookmark(cursor); + } + if (curMark) { + var markPos = curMark.find(); + // avoid recording redundant cursor position + if (markPos && !cursorEqual(markPos, oldCur)) { + useNextSlot(oldCur); + } + } else { + useNextSlot(oldCur); + } + useNextSlot(newCur); + head = pointer; + tail = pointer - size + 1; + if (tail < 0) { + tail = 0; + } + } + function move(cm, offset) { + pointer += offset; + if (pointer > head) { + pointer = head; + } else if (pointer < tail) { + pointer = tail; + } + var mark = buffer[(size + pointer) % size]; + // skip marks that are temporarily removed from text buffer + if (mark && !mark.find()) { + var inc = offset > 0 ? 1 : -1; + var newCur; + var oldCur = cm.getCursor(); + do { + pointer += inc; + mark = buffer[(size + pointer) % size]; + // skip marks that are the same as current position + if (mark && + (newCur = mark.find()) && + !cursorEqual(oldCur, newCur)) { + break; + } + } while (pointer < head && pointer > tail); + } + return mark; + } + return { + cachedCursor: undefined, //used for # and * jumps + add: add, + move: move + }; + }; + + var createMacroState = function() { + return { + macroKeyBuffer: [], + latestRegister: undefined, + inReplay: false, + lastInsertModeChanges: { + changes: [], // Change list + expectCursorActivityForChange: false // Set to true on change, false on cursorActivity. + }, + enteredMacroMode: undefined, + isMacroPlaying: false, + toggle: function(cm, registerName) { + if (this.enteredMacroMode) { //onExit + this.enteredMacroMode(); // close dialog + this.enteredMacroMode = undefined; + } else { //onEnter + this.latestRegister = registerName; + this.enteredMacroMode = cm.openDialog( + '(recording)['+registerName+']', null, {bottom:true}); + } + } + }; + }; + + + function maybeInitVimState(cm) { + if (!cm.state.vim) { + // Store instance state in the CodeMirror object. + cm.state.vim = { + inputState: new InputState(), + // Vim's input state that triggered the last edit, used to repeat + // motions and operators with '.'. + lastEditInputState: undefined, + // Vim's action command before the last edit, used to repeat actions + // with '.' and insert mode repeat. + lastEditActionCommand: undefined, + // When using jk for navigation, if you move from a longer line to a + // shorter line, the cursor may clip to the end of the shorter line. + // If j is pressed again and cursor goes to the next line, the + // cursor should go back to its horizontal position on the longer + // line if it can. This is to keep track of the horizontal position. + lastHPos: -1, + // Doing the same with screen-position for gj/gk + lastHSPos: -1, + // The last motion command run. Cleared if a non-motion command gets + // executed in between. + lastMotion: null, + marks: {}, + insertMode: false, + // Repeat count for changes made in insert mode, triggered by key + // sequences like 3,i. Only exists when insertMode is true. + insertModeRepeat: undefined, + visualMode: false, + // If we are in visual line mode. No effect if visualMode is false. + visualLine: false + }; + } + return cm.state.vim; + } + var vimGlobalState; + function resetVimGlobalState() { + vimGlobalState = { + // The current search query. + searchQuery: null, + // Whether we are searching backwards. + searchIsReversed: false, + jumpList: createCircularJumpList(), + macroModeState: createMacroState(), + // Recording latest f, t, F or T motion command. + lastChararacterSearch: {increment:0, forward:true, selectedCharacter:''}, + registerController: new RegisterController({}) + }; + } + + var vimApi= { + buildKeyMap: function() { + // TODO: Convert keymap into dictionary format for fast lookup. + }, + // Testing hook, though it might be useful to expose the register + // controller anyways. + getRegisterController: function() { + return vimGlobalState.registerController; + }, + // Testing hook. + resetVimGlobalState_: resetVimGlobalState, + + // Testing hook. + getVimGlobalState_: function() { + return vimGlobalState; + }, + + // Testing hook. + maybeInitVimState_: maybeInitVimState, + + InsertModeKey: InsertModeKey, + map: function(lhs, rhs) { + // Add user defined key bindings. + exCommandDispatcher.map(lhs, rhs); + }, + defineEx: function(name, prefix, func){ + if (name.indexOf(prefix) !== 0) { + throw new Error('(Vim.defineEx) "'+prefix+'" is not a prefix of "'+name+'", command not registered'); + } + exCommands[name]=func; + exCommandDispatcher.commandMap_[prefix]={name:name, shortName:prefix, type:'api'}; + }, + // This is the outermost function called by CodeMirror, after keys have + // been mapped to their Vim equivalents. + handleKey: function(cm, key) { + var command; + var vim = maybeInitVimState(cm); + var macroModeState = vimGlobalState.macroModeState; + if (macroModeState.enteredMacroMode) { + if (key == 'q') { + actions.exitMacroRecordMode(); + vim.inputState = new InputState(); + return; + } + } + if (key == '') { + // Clear input state and get back to normal mode. + vim.inputState = new InputState(); + if (vim.visualMode) { + exitVisualMode(cm); + } + return; + } + // Enter visual mode when the mouse selects text. + if (!vim.visualMode && + !cursorEqual(cm.getCursor('head'), cm.getCursor('anchor'))) { + vim.visualMode = true; + vim.visualLine = false; + CodeMirror.signal(cm, "vim-mode-change", {mode: "visual"}); + cm.on('mousedown', exitVisualMode); + } + if (key != '0' || (key == '0' && vim.inputState.getRepeat() === 0)) { + // Have to special case 0 since it's both a motion and a number. + command = commandDispatcher.matchCommand(key, defaultKeymap, vim); + } + if (!command) { + if (isNumber(key)) { + // Increment count unless count is 0 and key is 0. + vim.inputState.pushRepeatDigit(key); + } + return; + } + if (command.type == 'keyToKey') { + // TODO: prevent infinite recursion. + for (var i = 0; i < command.toKeys.length; i++) { + this.handleKey(cm, command.toKeys[i]); + } + } else { + if (macroModeState.enteredMacroMode) { + logKey(macroModeState, key); + } + commandDispatcher.processCommand(cm, vim, command); + } + }, + handleEx: function(cm, input) { + exCommandDispatcher.processCommand(cm, input); + } + }; + + // Represents the current input state. + function InputState() { + this.prefixRepeat = []; + this.motionRepeat = []; + + this.operator = null; + this.operatorArgs = null; + this.motion = null; + this.motionArgs = null; + this.keyBuffer = []; // For matching multi-key commands. + this.registerName = null; // Defaults to the unamed register. + } + InputState.prototype.pushRepeatDigit = function(n) { + if (!this.operator) { + this.prefixRepeat = this.prefixRepeat.concat(n); + } else { + this.motionRepeat = this.motionRepeat.concat(n); + } + }; + InputState.prototype.getRepeat = function() { + var repeat = 0; + if (this.prefixRepeat.length > 0 || this.motionRepeat.length > 0) { + repeat = 1; + if (this.prefixRepeat.length > 0) { + repeat *= parseInt(this.prefixRepeat.join(''), 10); + } + if (this.motionRepeat.length > 0) { + repeat *= parseInt(this.motionRepeat.join(''), 10); + } + } + return repeat; + }; + + /* + * Register stores information about copy and paste registers. Besides + * text, a register must store whether it is linewise (i.e., when it is + * pasted, should it insert itself into a new line, or should the text be + * inserted at the cursor position.) + */ + function Register(text, linewise) { + this.clear(); + if (text) { + this.set(text, linewise); + } + } + Register.prototype = { + set: function(text, linewise) { + this.text = text; + this.linewise = !!linewise; + }, + append: function(text, linewise) { + // if this register has ever been set to linewise, use linewise. + if (linewise || this.linewise) { + this.text += '\n' + text; + this.linewise = true; + } else { + this.text += text; + } + }, + clear: function() { + this.text = ''; + this.linewise = false; + }, + toString: function() { return this.text; } + }; + + /* + * vim registers allow you to keep many independent copy and paste buffers. + * See http://usevim.com/2012/04/13/registers/ for an introduction. + * + * RegisterController keeps the state of all the registers. An initial + * state may be passed in. The unnamed register '"' will always be + * overridden. + */ + function RegisterController(registers) { + this.registers = registers; + this.unamedRegister = registers['"'] = new Register(); + } + RegisterController.prototype = { + pushText: function(registerName, operator, text, linewise) { + if (linewise && text.charAt(0) == '\n') { + text = text.slice(1) + '\n'; + } + if(linewise && text.charAt(text.length - 1) !== '\n'){ + text += '\n'; + } + // Lowercase and uppercase registers refer to the same register. + // Uppercase just means append. + var register = this.isValidRegister(registerName) ? + this.getRegister(registerName) : null; + // if no register/an invalid register was specified, things go to the + // default registers + if (!register) { + switch (operator) { + case 'yank': + // The 0 register contains the text from the most recent yank. + this.registers['0'] = new Register(text, linewise); + break; + case 'delete': + case 'change': + if (text.indexOf('\n') == -1) { + // Delete less than 1 line. Update the small delete register. + this.registers['-'] = new Register(text, linewise); + } else { + // Shift down the contents of the numbered registers and put the + // deleted text into register 1. + this.shiftNumericRegisters_(); + this.registers['1'] = new Register(text, linewise); + } + break; + } + // Make sure the unnamed register is set to what just happened + this.unamedRegister.set(text, linewise); + return; + } + + // If we've gotten to this point, we've actually specified a register + var append = isUpperCase(registerName); + if (append) { + register.append(text, linewise); + // The unamed register always has the same value as the last used + // register. + this.unamedRegister.append(text, linewise); + } else { + register.set(text, linewise); + this.unamedRegister.set(text, linewise); + } + }, + setRegisterText: function(name, text, linewise) { + this.getRegister(name).set(text, linewise); + }, + // Gets the register named @name. If one of @name doesn't already exist, + // create it. If @name is invalid, return the unamedRegister. + getRegister: function(name) { + if (!this.isValidRegister(name)) { + return this.unamedRegister; + } + name = name.toLowerCase(); + if (!this.registers[name]) { + this.registers[name] = new Register(); + } + return this.registers[name]; + }, + isValidRegister: function(name) { + return name && inArray(name, validRegisters); + }, + shiftNumericRegisters_: function() { + for (var i = 9; i >= 2; i--) { + this.registers[i] = this.getRegister('' + (i - 1)); + } + } + }; + + var commandDispatcher = { + matchCommand: function(key, keyMap, vim) { + var inputState = vim.inputState; + var keys = inputState.keyBuffer.concat(key); + var matchedCommands = []; + var selectedCharacter; + for (var i = 0; i < keyMap.length; i++) { + var command = keyMap[i]; + if (matchKeysPartial(keys, command.keys)) { + if (inputState.operator && command.type == 'action') { + // Ignore matched action commands after an operator. Operators + // only operate on motions. This check is really for text + // objects since aW, a[ etcs conflicts with a. + continue; + } + // Match commands that take as an argument. + if (command.keys[keys.length - 1] == 'character') { + selectedCharacter = keys[keys.length - 1]; + if(selectedCharacter.length>1){ + switch(selectedCharacter){ + case '': + selectedCharacter='\n'; + break; + case '': + selectedCharacter=' '; + break; + default: + continue; + } + } + } + // Add the command to the list of matched commands. Choose the best + // command later. + matchedCommands.push(command); + } + } + + // Returns the command if it is a full match, or null if not. + function getFullyMatchedCommandOrNull(command) { + if (keys.length < command.keys.length) { + // Matches part of a multi-key command. Buffer and wait for next + // stroke. + inputState.keyBuffer.push(key); + return null; + } else { + if (command.keys[keys.length - 1] == 'character') { + inputState.selectedCharacter = selectedCharacter; + } + // Clear the buffer since a full match was found. + inputState.keyBuffer = []; + return command; + } + } + + if (!matchedCommands.length) { + // Clear the buffer since there were no matches. + inputState.keyBuffer = []; + return null; + } else if (matchedCommands.length == 1) { + return getFullyMatchedCommandOrNull(matchedCommands[0]); + } else { + // Find the best match in the list of matchedCommands. + var context = vim.visualMode ? 'visual' : 'normal'; + var bestMatch = matchedCommands[0]; // Default to first in the list. + for (var i = 0; i < matchedCommands.length; i++) { + if (matchedCommands[i].context == context) { + bestMatch = matchedCommands[i]; + break; + } + } + return getFullyMatchedCommandOrNull(bestMatch); + } + }, + processCommand: function(cm, vim, command) { + vim.inputState.repeatOverride = command.repeatOverride; + switch (command.type) { + case 'motion': + this.processMotion(cm, vim, command); + break; + case 'operator': + this.processOperator(cm, vim, command); + break; + case 'operatorMotion': + this.processOperatorMotion(cm, vim, command); + break; + case 'action': + this.processAction(cm, vim, command); + break; + case 'search': + this.processSearch(cm, vim, command); + break; + case 'ex': + case 'keyToEx': + this.processEx(cm, vim, command); + break; + default: + break; + } + }, + processMotion: function(cm, vim, command) { + vim.inputState.motion = command.motion; + vim.inputState.motionArgs = copyArgs(command.motionArgs); + this.evalInput(cm, vim); + }, + processOperator: function(cm, vim, command) { + var inputState = vim.inputState; + if (inputState.operator) { + if (inputState.operator == command.operator) { + // Typing an operator twice like 'dd' makes the operator operate + // linewise + inputState.motion = 'expandToLine'; + inputState.motionArgs = { linewise: true }; + this.evalInput(cm, vim); + return; + } else { + // 2 different operators in a row doesn't make sense. + vim.inputState = new InputState(); + } + } + inputState.operator = command.operator; + inputState.operatorArgs = copyArgs(command.operatorArgs); + if (vim.visualMode) { + // Operating on a selection in visual mode. We don't need a motion. + this.evalInput(cm, vim); + } + }, + processOperatorMotion: function(cm, vim, command) { + var visualMode = vim.visualMode; + var operatorMotionArgs = copyArgs(command.operatorMotionArgs); + if (operatorMotionArgs) { + // Operator motions may have special behavior in visual mode. + if (visualMode && operatorMotionArgs.visualLine) { + vim.visualLine = true; + } + } + this.processOperator(cm, vim, command); + if (!visualMode) { + this.processMotion(cm, vim, command); + } + }, + processAction: function(cm, vim, command) { + var inputState = vim.inputState; + var repeat = inputState.getRepeat(); + var repeatIsExplicit = !!repeat; + var actionArgs = copyArgs(command.actionArgs) || {}; + if (inputState.selectedCharacter) { + actionArgs.selectedCharacter = inputState.selectedCharacter; + } + // Actions may or may not have motions and operators. Do these first. + if (command.operator) { + this.processOperator(cm, vim, command); + } + if (command.motion) { + this.processMotion(cm, vim, command); + } + if (command.motion || command.operator) { + this.evalInput(cm, vim); + } + actionArgs.repeat = repeat || 1; + actionArgs.repeatIsExplicit = repeatIsExplicit; + actionArgs.registerName = inputState.registerName; + vim.inputState = new InputState(); + vim.lastMotion = null; + if (command.isEdit) { + this.recordLastEdit(vim, inputState, command); + } + actions[command.action](cm, actionArgs, vim); + }, + processSearch: function(cm, vim, command) { + if (!cm.getSearchCursor) { + // Search depends on SearchCursor. + return; + } + var forward = command.searchArgs.forward; + getSearchState(cm).setReversed(!forward); + var promptPrefix = (forward) ? '/' : '?'; + var originalQuery = getSearchState(cm).getQuery(); + var originalScrollPos = cm.getScrollInfo(); + function handleQuery(query, ignoreCase, smartCase) { + try { + updateSearchQuery(cm, query, ignoreCase, smartCase); + } catch (e) { + showConfirm(cm, 'Invalid regex: ' + query); + return; + } + commandDispatcher.processMotion(cm, vim, { + type: 'motion', + motion: 'findNext', + motionArgs: { forward: true, toJumplist: command.searchArgs.toJumplist } + }); + } + function onPromptClose(query) { + cm.scrollTo(originalScrollPos.left, originalScrollPos.top); + handleQuery(query, true /** ignoreCase */, true /** smartCase */); + } + function onPromptKeyUp(_e, query) { + var parsedQuery; + try { + parsedQuery = updateSearchQuery(cm, query, + true /** ignoreCase */, true /** smartCase */); + } catch (e) { + // Swallow bad regexes for incremental search. + } + if (parsedQuery) { + cm.scrollIntoView(findNext(cm, !forward, parsedQuery), 30); + } else { + clearSearchHighlight(cm); + cm.scrollTo(originalScrollPos.left, originalScrollPos.top); + } + } + function onPromptKeyDown(e, _query, close) { + var keyName = CodeMirror.keyName(e); + if (keyName == 'Esc' || keyName == 'Ctrl-C' || keyName == 'Ctrl-[') { + updateSearchQuery(cm, originalQuery); + clearSearchHighlight(cm); + cm.scrollTo(originalScrollPos.left, originalScrollPos.top); + + CodeMirror.e_stop(e); + close(); + cm.focus(); + } + } + switch (command.searchArgs.querySrc) { + case 'prompt': + showPrompt(cm, { + onClose: onPromptClose, + prefix: promptPrefix, + desc: searchPromptDesc, + onKeyUp: onPromptKeyUp, + onKeyDown: onPromptKeyDown + }); + break; + case 'wordUnderCursor': + var word = expandWordUnderCursor(cm, false /** inclusive */, + true /** forward */, false /** bigWord */, + true /** noSymbol */); + var isKeyword = true; + if (!word) { + word = expandWordUnderCursor(cm, false /** inclusive */, + true /** forward */, false /** bigWord */, + false /** noSymbol */); + isKeyword = false; + } + if (!word) { + return; + } + var query = cm.getLine(word.start.line).substring(word.start.ch, + word.end.ch); + if (isKeyword) { + query = '\\b' + query + '\\b'; + } else { + query = escapeRegex(query); + } + + // cachedCursor is used to save the old position of the cursor + // when * or # causes vim to seek for the nearest word and shift + // the cursor before entering the motion. + vimGlobalState.jumpList.cachedCursor = cm.getCursor(); + cm.setCursor(word.start); + + handleQuery(query, true /** ignoreCase */, false /** smartCase */); + break; + } + }, + processEx: function(cm, vim, command) { + function onPromptClose(input) { + // Give the prompt some time to close so that if processCommand shows + // an error, the elements don't overlap. + exCommandDispatcher.processCommand(cm, input); + } + function onPromptKeyDown(e, _input, close) { + var keyName = CodeMirror.keyName(e); + if (keyName == 'Esc' || keyName == 'Ctrl-C' || keyName == 'Ctrl-[') { + CodeMirror.e_stop(e); + close(); + cm.focus(); + } + } + if (command.type == 'keyToEx') { + // Handle user defined Ex to Ex mappings + exCommandDispatcher.processCommand(cm, command.exArgs.input); + } else { + if (vim.visualMode) { + showPrompt(cm, { onClose: onPromptClose, prefix: ':', value: '\'<,\'>', + onKeyDown: onPromptKeyDown}); + } else { + showPrompt(cm, { onClose: onPromptClose, prefix: ':', + onKeyDown: onPromptKeyDown}); + } + } + }, + evalInput: function(cm, vim) { + // If the motion comand is set, execute both the operator and motion. + // Otherwise return. + var inputState = vim.inputState; + var motion = inputState.motion; + var motionArgs = inputState.motionArgs || {}; + var operator = inputState.operator; + var operatorArgs = inputState.operatorArgs || {}; + var registerName = inputState.registerName; + var selectionEnd = cm.getCursor('head'); + var selectionStart = cm.getCursor('anchor'); + // The difference between cur and selection cursors are that cur is + // being operated on and ignores that there is a selection. + var curStart = copyCursor(selectionEnd); + var curOriginal = copyCursor(curStart); + var curEnd; + var repeat; + if (operator) { + this.recordLastEdit(vim, inputState); + } + if (inputState.repeatOverride !== undefined) { + // If repeatOverride is specified, that takes precedence over the + // input state's repeat. Used by Ex mode and can be user defined. + repeat = inputState.repeatOverride; + } else { + repeat = inputState.getRepeat(); + } + if (repeat > 0 && motionArgs.explicitRepeat) { + motionArgs.repeatIsExplicit = true; + } else if (motionArgs.noRepeat || + (!motionArgs.explicitRepeat && repeat === 0)) { + repeat = 1; + motionArgs.repeatIsExplicit = false; + } + if (inputState.selectedCharacter) { + // If there is a character input, stick it in all of the arg arrays. + motionArgs.selectedCharacter = operatorArgs.selectedCharacter = + inputState.selectedCharacter; + } + motionArgs.repeat = repeat; + vim.inputState = new InputState(); + if (motion) { + var motionResult = motions[motion](cm, motionArgs, vim); + vim.lastMotion = motions[motion]; + if (!motionResult) { + return; + } + if (motionArgs.toJumplist) { + var jumpList = vimGlobalState.jumpList; + // if the current motion is # or *, use cachedCursor + var cachedCursor = jumpList.cachedCursor; + if (cachedCursor) { + recordJumpPosition(cm, cachedCursor, motionResult); + delete jumpList.cachedCursor; + } else { + recordJumpPosition(cm, curOriginal, motionResult); + } + } + if (motionResult instanceof Array) { + curStart = motionResult[0]; + curEnd = motionResult[1]; + } else { + curEnd = motionResult; + } + // TODO: Handle null returns from motion commands better. + if (!curEnd) { + curEnd = { ch: curStart.ch, line: curStart.line }; + } + if (vim.visualMode) { + // Check if the selection crossed over itself. Will need to shift + // the start point if that happened. + if (cursorIsBefore(selectionStart, selectionEnd) && + (cursorEqual(selectionStart, curEnd) || + cursorIsBefore(curEnd, selectionStart))) { + // The end of the selection has moved from after the start to + // before the start. We will shift the start right by 1. + selectionStart.ch += 1; + } else if (cursorIsBefore(selectionEnd, selectionStart) && + (cursorEqual(selectionStart, curEnd) || + cursorIsBefore(selectionStart, curEnd))) { + // The opposite happened. We will shift the start left by 1. + selectionStart.ch -= 1; + } + selectionEnd = curEnd; + if (vim.visualLine) { + if (cursorIsBefore(selectionStart, selectionEnd)) { + selectionStart.ch = 0; + + var lastLine = cm.lastLine(); + if (selectionEnd.line > lastLine) { + selectionEnd.line = lastLine; + } + selectionEnd.ch = lineLength(cm, selectionEnd.line); + } else { + selectionEnd.ch = 0; + selectionStart.ch = lineLength(cm, selectionStart.line); + } + } + cm.setSelection(selectionStart, selectionEnd); + updateMark(cm, vim, '<', + cursorIsBefore(selectionStart, selectionEnd) ? selectionStart + : selectionEnd); + updateMark(cm, vim, '>', + cursorIsBefore(selectionStart, selectionEnd) ? selectionEnd + : selectionStart); + } else if (!operator) { + curEnd = clipCursorToContent(cm, curEnd); + cm.setCursor(curEnd.line, curEnd.ch); + } + } + + if (operator) { + var inverted = false; + vim.lastMotion = null; + operatorArgs.repeat = repeat; // Indent in visual mode needs this. + if (vim.visualMode) { + curStart = selectionStart; + curEnd = selectionEnd; + motionArgs.inclusive = true; + } + // Swap start and end if motion was backward. + if (cursorIsBefore(curEnd, curStart)) { + var tmp = curStart; + curStart = curEnd; + curEnd = tmp; + inverted = true; + } + if (motionArgs.inclusive && !(vim.visualMode && inverted)) { + // Move the selection end one to the right to include the last + // character. + curEnd.ch++; + } + var linewise = motionArgs.linewise || + (vim.visualMode && vim.visualLine); + if (linewise) { + // Expand selection to entire line. + expandSelectionToLine(cm, curStart, curEnd); + } else if (motionArgs.forward) { + // Clip to trailing newlines only if the motion goes forward. + clipToLine(cm, curStart, curEnd); + } + operatorArgs.registerName = registerName; + // Keep track of linewise as it affects how paste and change behave. + operatorArgs.linewise = linewise; + operators[operator](cm, operatorArgs, vim, curStart, + curEnd, curOriginal); + if (vim.visualMode) { + exitVisualMode(cm); + } + } + }, + recordLastEdit: function(vim, inputState, actionCommand) { + var macroModeState = vimGlobalState.macroModeState; + if (macroModeState.inReplay) { return; } + vim.lastEditInputState = inputState; + vim.lastEditActionCommand = actionCommand; + macroModeState.lastInsertModeChanges.changes = []; + macroModeState.lastInsertModeChanges.expectCursorActivityForChange = false; + } + }; + + /** + * typedef {Object{line:number,ch:number}} Cursor An object containing the + * position of the cursor. + */ + // All of the functions below return Cursor objects. + var motions = { + moveToTopLine: function(cm, motionArgs) { + var line = getUserVisibleLines(cm).top + motionArgs.repeat -1; + return { line: line, ch: findFirstNonWhiteSpaceCharacter(cm.getLine(line)) }; + }, + moveToMiddleLine: function(cm) { + var range = getUserVisibleLines(cm); + var line = Math.floor((range.top + range.bottom) * 0.5); + return { line: line, ch: findFirstNonWhiteSpaceCharacter(cm.getLine(line)) }; + }, + moveToBottomLine: function(cm, motionArgs) { + var line = getUserVisibleLines(cm).bottom - motionArgs.repeat +1; + return { line: line, ch: findFirstNonWhiteSpaceCharacter(cm.getLine(line)) }; + }, + expandToLine: function(cm, motionArgs) { + // Expands forward to end of line, and then to next line if repeat is + // >1. Does not handle backward motion! + var cur = cm.getCursor(); + return { line: cur.line + motionArgs.repeat - 1, ch: Infinity }; + }, + findNext: function(cm, motionArgs) { + var state = getSearchState(cm); + var query = state.getQuery(); + if (!query) { + return; + } + var prev = !motionArgs.forward; + // If search is initiated with ? instead of /, negate direction. + prev = (state.isReversed()) ? !prev : prev; + highlightSearchMatches(cm, query); + return findNext(cm, prev/** prev */, query, motionArgs.repeat); + }, + goToMark: function(_cm, motionArgs, vim) { + var mark = vim.marks[motionArgs.selectedCharacter]; + if (mark) { + return mark.find(); + } + return null; + }, + jumpToMark: function(cm, motionArgs, vim) { + var best = cm.getCursor(); + for (var i = 0; i < motionArgs.repeat; i++) { + var cursor = best; + for (var key in vim.marks) { + if (!isLowerCase(key)) { + continue; + } + var mark = vim.marks[key].find(); + var isWrongDirection = (motionArgs.forward) ? + cursorIsBefore(mark, cursor) : cursorIsBefore(cursor, mark); + + if (isWrongDirection) { + continue; + } + if (motionArgs.linewise && (mark.line == cursor.line)) { + continue; + } + + var equal = cursorEqual(cursor, best); + var between = (motionArgs.forward) ? + cusrorIsBetween(cursor, mark, best) : + cusrorIsBetween(best, mark, cursor); + + if (equal || between) { + best = mark; + } + } + } + + if (motionArgs.linewise) { + // Vim places the cursor on the first non-whitespace character of + // the line if there is one, else it places the cursor at the end + // of the line, regardless of whether a mark was found. + best.ch = findFirstNonWhiteSpaceCharacter(cm.getLine(best.line)); + } + return best; + }, + moveByCharacters: function(cm, motionArgs) { + var cur = cm.getCursor(); + var repeat = motionArgs.repeat; + var ch = motionArgs.forward ? cur.ch + repeat : cur.ch - repeat; + return { line: cur.line, ch: ch }; + }, + moveByLines: function(cm, motionArgs, vim) { + var cur = cm.getCursor(); + var endCh = cur.ch; + // Depending what our last motion was, we may want to do different + // things. If our last motion was moving vertically, we want to + // preserve the HPos from our last horizontal move. If our last motion + // was going to the end of a line, moving vertically we should go to + // the end of the line, etc. + switch (vim.lastMotion) { + case this.moveByLines: + case this.moveByDisplayLines: + case this.moveByScroll: + case this.moveToColumn: + case this.moveToEol: + endCh = vim.lastHPos; + break; + default: + vim.lastHPos = endCh; + } + var repeat = motionArgs.repeat+(motionArgs.repeatOffset||0); + var line = motionArgs.forward ? cur.line + repeat : cur.line - repeat; + var first = cm.firstLine(); + var last = cm.lastLine(); + // Vim cancels linewise motions that start on an edge and move beyond + // that edge. It does not cancel motions that do not start on an edge. + if ((line < first && cur.line == first) || + (line > last && cur.line == last)) { + return; + } + if(motionArgs.toFirstChar){ + endCh=findFirstNonWhiteSpaceCharacter(cm.getLine(line)); + vim.lastHPos = endCh; + } + vim.lastHSPos = cm.charCoords({line:line, ch:endCh},'div').left; + return { line: line, ch: endCh }; + }, + moveByDisplayLines: function(cm, motionArgs, vim) { + var cur = cm.getCursor(); + switch (vim.lastMotion) { + case this.moveByDisplayLines: + case this.moveByScroll: + case this.moveByLines: + case this.moveToColumn: + case this.moveToEol: + break; + default: + vim.lastHSPos = cm.charCoords(cur,'div').left; + } + var repeat = motionArgs.repeat; + var res=cm.findPosV(cur,(motionArgs.forward ? repeat : -repeat),'line',vim.lastHSPos); + if (res.hitSide) { + if (motionArgs.forward) { + var lastCharCoords = cm.charCoords(res, 'div'); + var goalCoords = { top: lastCharCoords.top + 8, left: vim.lastHSPos }; + var res = cm.coordsChar(goalCoords, 'div'); + } else { + var resCoords = cm.charCoords({ line: cm.firstLine(), ch: 0}, 'div'); + resCoords.left = vim.lastHSPos; + res = cm.coordsChar(resCoords, 'div'); + } + } + vim.lastHPos = res.ch; + return res; + }, + moveByPage: function(cm, motionArgs) { + // CodeMirror only exposes functions that move the cursor page down, so + // doing this bad hack to move the cursor and move it back. evalInput + // will move the cursor to where it should be in the end. + var curStart = cm.getCursor(); + var repeat = motionArgs.repeat; + cm.moveV((motionArgs.forward ? repeat : -repeat), 'page'); + var curEnd = cm.getCursor(); + cm.setCursor(curStart); + return curEnd; + }, + moveByParagraph: function(cm, motionArgs) { + var line = cm.getCursor().line; + var repeat = motionArgs.repeat; + var inc = motionArgs.forward ? 1 : -1; + for (var i = 0; i < repeat; i++) { + if ((!motionArgs.forward && line === cm.firstLine() ) || + (motionArgs.forward && line == cm.lastLine())) { + break; + } + line += inc; + while (line !== cm.firstLine() && line != cm.lastLine() && cm.getLine(line)) { + line += inc; + } + } + return { line: line, ch: 0 }; + }, + moveByScroll: function(cm, motionArgs, vim) { + var scrollbox = cm.getScrollInfo(); + var curEnd = null; + var repeat = motionArgs.repeat; + if (!repeat) { + repeat = scrollbox.clientHeight / (2 * cm.defaultTextHeight()); + } + var orig = cm.charCoords(cm.getCursor(), 'local'); + motionArgs.repeat = repeat; + var curEnd = motions.moveByDisplayLines(cm, motionArgs, vim); + if (!curEnd) { + return null; + } + var dest = cm.charCoords(curEnd, 'local'); + cm.scrollTo(null, scrollbox.top + dest.top - orig.top); + return curEnd; + }, + moveByWords: function(cm, motionArgs) { + return moveToWord(cm, motionArgs.repeat, !!motionArgs.forward, + !!motionArgs.wordEnd, !!motionArgs.bigWord); + }, + moveTillCharacter: function(cm, motionArgs) { + var repeat = motionArgs.repeat; + var curEnd = moveToCharacter(cm, repeat, motionArgs.forward, + motionArgs.selectedCharacter); + var increment = motionArgs.forward ? -1 : 1; + recordLastCharacterSearch(increment, motionArgs); + if(!curEnd)return cm.getCursor(); + curEnd.ch += increment; + return curEnd; + }, + moveToCharacter: function(cm, motionArgs) { + var repeat = motionArgs.repeat; + recordLastCharacterSearch(0, motionArgs); + return moveToCharacter(cm, repeat, motionArgs.forward, + motionArgs.selectedCharacter) || cm.getCursor(); + }, + moveToSymbol: function(cm, motionArgs) { + var repeat = motionArgs.repeat; + return findSymbol(cm, repeat, motionArgs.forward, + motionArgs.selectedCharacter) || cm.getCursor(); + }, + moveToColumn: function(cm, motionArgs, vim) { + var repeat = motionArgs.repeat; + // repeat is equivalent to which column we want to move to! + vim.lastHPos = repeat - 1; + vim.lastHSPos = cm.charCoords(cm.getCursor(),'div').left; + return moveToColumn(cm, repeat); + }, + moveToEol: function(cm, motionArgs, vim) { + var cur = cm.getCursor(); + vim.lastHPos = Infinity; + var retval={ line: cur.line + motionArgs.repeat - 1, ch: Infinity }; + var end=cm.clipPos(retval); + end.ch--; + vim.lastHSPos = cm.charCoords(end,'div').left; + return retval; + }, + moveToFirstNonWhiteSpaceCharacter: function(cm) { + // Go to the start of the line where the text begins, or the end for + // whitespace-only lines + var cursor = cm.getCursor(); + return { line: cursor.line, + ch: findFirstNonWhiteSpaceCharacter(cm.getLine(cursor.line)) }; + }, + moveToMatchedSymbol: function(cm) { + var cursor = cm.getCursor(); + var line = cursor.line; + var ch = cursor.ch; + var lineText = cm.getLine(line); + var symbol; + var startContext = cm.getTokenAt(cursor).type; + var startCtxLevel = getContextLevel(startContext); + do { + symbol = lineText.charAt(ch++); + if (symbol && isMatchableSymbol(symbol)) { + var endContext = cm.getTokenAt({line:line, ch:ch}).type; + var endCtxLevel = getContextLevel(endContext); + if (startCtxLevel >= endCtxLevel) { + break; + } + } + } while (symbol); + if (symbol) { + return findMatchedSymbol(cm, {line:line, ch:ch-1}, symbol); + } else { + return cursor; + } + }, + moveToStartOfLine: function(cm) { + var cursor = cm.getCursor(); + return { line: cursor.line, ch: 0 }; + }, + moveToLineOrEdgeOfDocument: function(cm, motionArgs) { + var lineNum = motionArgs.forward ? cm.lastLine() : cm.firstLine(); + if (motionArgs.repeatIsExplicit) { + lineNum = motionArgs.repeat - cm.getOption('firstLineNumber'); + } + return { line: lineNum, + ch: findFirstNonWhiteSpaceCharacter(cm.getLine(lineNum)) }; + }, + textObjectManipulation: function(cm, motionArgs) { + var character = motionArgs.selectedCharacter; + // Inclusive is the difference between a and i + // TODO: Instead of using the additional text object map to perform text + // object operations, merge the map into the defaultKeyMap and use + // motionArgs to define behavior. Define separate entries for 'aw', + // 'iw', 'a[', 'i[', etc. + var inclusive = !motionArgs.textObjectInner; + if (!textObjects[character]) { + // No text object defined for this, don't move. + return null; + } + var tmp = textObjects[character](cm, inclusive); + var start = tmp.start; + var end = tmp.end; + return [start, end]; + }, + repeatLastCharacterSearch: function(cm, motionArgs) { + var lastSearch = vimGlobalState.lastChararacterSearch; + var repeat = motionArgs.repeat; + var forward = motionArgs.forward === lastSearch.forward; + var increment = (lastSearch.increment ? 1 : 0) * (forward ? -1 : 1); + cm.moveH(-increment, 'char'); + motionArgs.inclusive = forward ? true : false; + var curEnd = moveToCharacter(cm, repeat, forward, lastSearch.selectedCharacter); + if (!curEnd) { + cm.moveH(increment, 'char'); + return cm.getCursor(); + } + curEnd.ch += increment; + return curEnd; + } + }; + + var operators = { + change: function(cm, operatorArgs, _vim, curStart, curEnd) { + vimGlobalState.registerController.pushText( + operatorArgs.registerName, 'change', cm.getRange(curStart, curEnd), + operatorArgs.linewise); + if (operatorArgs.linewise) { + // Push the next line back down, if there is a next line. + var replacement = curEnd.line > cm.lastLine() ? '' : '\n'; + cm.replaceRange(replacement, curStart, curEnd); + cm.indentLine(curStart.line, 'smart'); + // null ch so setCursor moves to end of line. + curStart.ch = null; + } else { + // Exclude trailing whitespace if the range is not all whitespace. + var text = cm.getRange(curStart, curEnd); + if (!isWhiteSpaceString(text)) { + var match = (/\s+$/).exec(text); + if (match) { + curEnd = offsetCursor(curEnd, 0, - match[0].length); + } + } + cm.replaceRange('', curStart, curEnd); + } + actions.enterInsertMode(cm, {}, cm.state.vim); + cm.setCursor(curStart); + }, + // delete is a javascript keyword. + 'delete': function(cm, operatorArgs, _vim, curStart, curEnd) { + // If the ending line is past the last line, inclusive, instead of + // including the trailing \n, include the \n before the starting line + if (operatorArgs.linewise && + curEnd.line > cm.lastLine() && curStart.line > cm.firstLine()) { + curStart.line--; + curStart.ch = lineLength(cm, curStart.line); + } + vimGlobalState.registerController.pushText( + operatorArgs.registerName, 'delete', cm.getRange(curStart, curEnd), + operatorArgs.linewise); + cm.replaceRange('', curStart, curEnd); + if (operatorArgs.linewise) { + cm.setCursor(motions.moveToFirstNonWhiteSpaceCharacter(cm)); + } else { + cm.setCursor(curStart); + } + }, + indent: function(cm, operatorArgs, vim, curStart, curEnd) { + var startLine = curStart.line; + var endLine = curEnd.line; + // In visual mode, n> shifts the selection right n times, instead of + // shifting n lines right once. + var repeat = (vim.visualMode) ? operatorArgs.repeat : 1; + if (operatorArgs.linewise) { + // The only way to delete a newline is to delete until the start of + // the next line, so in linewise mode evalInput will include the next + // line. We don't want this in indent, so we go back a line. + endLine--; + } + for (var i = startLine; i <= endLine; i++) { + for (var j = 0; j < repeat; j++) { + cm.indentLine(i, operatorArgs.indentRight); + } + } + cm.setCursor(curStart); + cm.setCursor(motions.moveToFirstNonWhiteSpaceCharacter(cm)); + }, + swapcase: function(cm, operatorArgs, _vim, curStart, curEnd, curOriginal) { + var toSwap = cm.getRange(curStart, curEnd); + var swapped = ''; + for (var i = 0; i < toSwap.length; i++) { + var character = toSwap.charAt(i); + swapped += isUpperCase(character) ? character.toLowerCase() : + character.toUpperCase(); + } + cm.replaceRange(swapped, curStart, curEnd); + if (!operatorArgs.shouldMoveCursor) { + cm.setCursor(curOriginal); + } + }, + yank: function(cm, operatorArgs, _vim, curStart, curEnd, curOriginal) { + vimGlobalState.registerController.pushText( + operatorArgs.registerName, 'yank', + cm.getRange(curStart, curEnd), operatorArgs.linewise); + cm.setCursor(curOriginal); + } + }; + + var actions = { + jumpListWalk: function(cm, actionArgs, vim) { + if (vim.visualMode) { + return; + } + var repeat = actionArgs.repeat; + var forward = actionArgs.forward; + var jumpList = vimGlobalState.jumpList; + + var mark = jumpList.move(cm, forward ? repeat : -repeat); + var markPos = mark ? mark.find() : undefined; + markPos = markPos ? markPos : cm.getCursor(); + cm.setCursor(markPos); + }, + scrollToCursor: function(cm, actionArgs) { + var lineNum = cm.getCursor().line; + var charCoords = cm.charCoords({line: lineNum, ch: 0}, 'local'); + var height = cm.getScrollInfo().clientHeight; + var y = charCoords.top; + var lineHeight = charCoords.bottom - y; + switch (actionArgs.position) { + case 'center': y = y - (height / 2) + lineHeight; + break; + case 'bottom': y = y - height + lineHeight*1.4; + break; + case 'top': y = y + lineHeight*0.4; + break; + } + cm.scrollTo(null, y); + }, + replayMacro: function(cm, actionArgs) { + var registerName = actionArgs.selectedCharacter; + var repeat = actionArgs.repeat; + var macroModeState = vimGlobalState.macroModeState; + if (registerName == '@') { + registerName = macroModeState.latestRegister; + } + var keyBuffer = parseRegisterToKeyBuffer(macroModeState, registerName); + while(repeat--){ + executeMacroKeyBuffer(cm, macroModeState, keyBuffer); + } + }, + exitMacroRecordMode: function() { + var macroModeState = vimGlobalState.macroModeState; + macroModeState.toggle(); + parseKeyBufferToRegister(macroModeState.latestRegister, + macroModeState.macroKeyBuffer); + }, + enterMacroRecordMode: function(cm, actionArgs) { + var macroModeState = vimGlobalState.macroModeState; + var registerName = actionArgs.selectedCharacter; + macroModeState.toggle(cm, registerName); + emptyMacroKeyBuffer(macroModeState); + }, + enterInsertMode: function(cm, actionArgs, vim) { + if (cm.getOption('readOnly')) { return; } + vim.insertMode = true; + vim.insertModeRepeat = actionArgs && actionArgs.repeat || 1; + var insertAt = (actionArgs) ? actionArgs.insertAt : null; + if (insertAt == 'eol') { + var cursor = cm.getCursor(); + cursor = { line: cursor.line, ch: lineLength(cm, cursor.line) }; + cm.setCursor(cursor); + } else if (insertAt == 'charAfter') { + cm.setCursor(offsetCursor(cm.getCursor(), 0, 1)); + } else if (insertAt == 'firstNonBlank') { + cm.setCursor(motions.moveToFirstNonWhiteSpaceCharacter(cm)); + } + cm.setOption('keyMap', 'vim-insert'); + if (actionArgs && actionArgs.replace) { + // Handle Replace-mode as a special case of insert mode. + cm.toggleOverwrite(true); + cm.setOption('keyMap', 'vim-replace'); + CodeMirror.signal(cm, "vim-mode-change", {mode: "replace"}); + } else { + cm.setOption('keyMap', 'vim-insert'); + CodeMirror.signal(cm, "vim-mode-change", {mode: "insert"}); + } + if (!vimGlobalState.macroModeState.inReplay) { + // Only record if not replaying. + cm.on('change', onChange); + cm.on('cursorActivity', onCursorActivity); + CodeMirror.on(cm.getInputField(), 'keydown', onKeyEventTargetKeyDown); + } + }, + toggleVisualMode: function(cm, actionArgs, vim) { + var repeat = actionArgs.repeat; + var curStart = cm.getCursor(); + var curEnd; + // TODO: The repeat should actually select number of characters/lines + // equal to the repeat times the size of the previous visual + // operation. + if (!vim.visualMode) { + cm.on('mousedown', exitVisualMode); + vim.visualMode = true; + vim.visualLine = !!actionArgs.linewise; + if (vim.visualLine) { + curStart.ch = 0; + curEnd = clipCursorToContent(cm, { + line: curStart.line + repeat - 1, + ch: lineLength(cm, curStart.line) + }, true /** includeLineBreak */); + } else { + curEnd = clipCursorToContent(cm, { + line: curStart.line, + ch: curStart.ch + repeat + }, true /** includeLineBreak */); + } + // Make the initial selection. + if (!actionArgs.repeatIsExplicit && !vim.visualLine) { + // This is a strange case. Here the implicit repeat is 1. The + // following commands lets the cursor hover over the 1 character + // selection. + cm.setCursor(curEnd); + cm.setSelection(curEnd, curStart); + } else { + cm.setSelection(curStart, curEnd); + } + CodeMirror.signal(cm, "vim-mode-change", {mode: "visual", subMode: vim.visualLine ? "linewise" : ""}); + } else { + curStart = cm.getCursor('anchor'); + curEnd = cm.getCursor('head'); + if (!vim.visualLine && actionArgs.linewise) { + // Shift-V pressed in characterwise visual mode. Switch to linewise + // visual mode instead of exiting visual mode. + vim.visualLine = true; + curStart.ch = cursorIsBefore(curStart, curEnd) ? 0 : + lineLength(cm, curStart.line); + curEnd.ch = cursorIsBefore(curStart, curEnd) ? + lineLength(cm, curEnd.line) : 0; + cm.setSelection(curStart, curEnd); + CodeMirror.signal(cm, "vim-mode-change", {mode: "visual", subMode: "linewise"}); + } else if (vim.visualLine && !actionArgs.linewise) { + // v pressed in linewise visual mode. Switch to characterwise visual + // mode instead of exiting visual mode. + vim.visualLine = false; + CodeMirror.signal(cm, "vim-mode-change", {mode: "visual"}); + } else { + exitVisualMode(cm); + } + } + updateMark(cm, vim, '<', cursorIsBefore(curStart, curEnd) ? curStart + : curEnd); + updateMark(cm, vim, '>', cursorIsBefore(curStart, curEnd) ? curEnd + : curStart); + }, + joinLines: function(cm, actionArgs, vim) { + var curStart, curEnd; + if (vim.visualMode) { + curStart = cm.getCursor('anchor'); + curEnd = cm.getCursor('head'); + curEnd.ch = lineLength(cm, curEnd.line) - 1; + } else { + // Repeat is the number of lines to join. Minimum 2 lines. + var repeat = Math.max(actionArgs.repeat, 2); + curStart = cm.getCursor(); + curEnd = clipCursorToContent(cm, { line: curStart.line + repeat - 1, + ch: Infinity }); + } + var finalCh = 0; + cm.operation(function() { + for (var i = curStart.line; i < curEnd.line; i++) { + finalCh = lineLength(cm, curStart.line); + var tmp = { line: curStart.line + 1, + ch: lineLength(cm, curStart.line + 1) }; + var text = cm.getRange(curStart, tmp); + text = text.replace(/\n\s*/g, ' '); + cm.replaceRange(text, curStart, tmp); + } + var curFinalPos = { line: curStart.line, ch: finalCh }; + cm.setCursor(curFinalPos); + }); + }, + newLineAndEnterInsertMode: function(cm, actionArgs, vim) { + vim.insertMode = true; + var insertAt = cm.getCursor(); + if (insertAt.line === cm.firstLine() && !actionArgs.after) { + // Special case for inserting newline before start of document. + cm.replaceRange('\n', { line: cm.firstLine(), ch: 0 }); + cm.setCursor(cm.firstLine(), 0); + } else { + insertAt.line = (actionArgs.after) ? insertAt.line : + insertAt.line - 1; + insertAt.ch = lineLength(cm, insertAt.line); + cm.setCursor(insertAt); + var newlineFn = CodeMirror.commands.newlineAndIndentContinueComment || + CodeMirror.commands.newlineAndIndent; + newlineFn(cm); + } + this.enterInsertMode(cm, { repeat: actionArgs.repeat }, vim); + }, + paste: function(cm, actionArgs) { + var cur = cm.getCursor(); + var register = vimGlobalState.registerController.getRegister( + actionArgs.registerName); + if (!register.text) { + return; + } + for (var text = '', i = 0; i < actionArgs.repeat; i++) { + text += register.text; + } + var linewise = register.linewise; + if (linewise) { + if (actionArgs.after) { + // Move the newline at the end to the start instead, and paste just + // before the newline character of the line we are on right now. + text = '\n' + text.slice(0, text.length - 1); + cur.ch = lineLength(cm, cur.line); + } else { + cur.ch = 0; + } + } else { + cur.ch += actionArgs.after ? 1 : 0; + } + cm.replaceRange(text, cur); + // Now fine tune the cursor to where we want it. + var curPosFinal; + var idx; + if (linewise && actionArgs.after) { + curPosFinal = { line: cur.line + 1, + ch: findFirstNonWhiteSpaceCharacter(cm.getLine(cur.line + 1)) }; + } else if (linewise && !actionArgs.after) { + curPosFinal = { line: cur.line, + ch: findFirstNonWhiteSpaceCharacter(cm.getLine(cur.line)) }; + } else if (!linewise && actionArgs.after) { + idx = cm.indexFromPos(cur); + curPosFinal = cm.posFromIndex(idx + text.length - 1); + } else { + idx = cm.indexFromPos(cur); + curPosFinal = cm.posFromIndex(idx + text.length); + } + cm.setCursor(curPosFinal); + }, + undo: function(cm, actionArgs) { + cm.operation(function() { + repeatFn(cm, CodeMirror.commands.undo, actionArgs.repeat)(); + cm.setCursor(cm.getCursor('anchor')); + }); + }, + redo: function(cm, actionArgs) { + repeatFn(cm, CodeMirror.commands.redo, actionArgs.repeat)(); + }, + setRegister: function(_cm, actionArgs, vim) { + vim.inputState.registerName = actionArgs.selectedCharacter; + }, + setMark: function(cm, actionArgs, vim) { + var markName = actionArgs.selectedCharacter; + updateMark(cm, vim, markName, cm.getCursor()); + }, + replace: function(cm, actionArgs, vim) { + var replaceWith = actionArgs.selectedCharacter; + var curStart = cm.getCursor(); + var replaceTo; + var curEnd; + if(vim.visualMode){ + curStart=cm.getCursor('start'); + curEnd=cm.getCursor('end'); + // workaround to catch the character under the cursor + // existing workaround doesn't cover actions + curEnd=cm.clipPos({line: curEnd.line, ch: curEnd.ch+1}); + }else{ + var line = cm.getLine(curStart.line); + replaceTo = curStart.ch + actionArgs.repeat; + if (replaceTo > line.length) { + replaceTo=line.length; + } + curEnd = { line: curStart.line, ch: replaceTo }; + } + if(replaceWith=='\n'){ + if(!vim.visualMode) cm.replaceRange('', curStart, curEnd); + // special case, where vim help says to replace by just one line-break + (CodeMirror.commands.newlineAndIndentContinueComment || CodeMirror.commands.newlineAndIndent)(cm); + }else { + var replaceWithStr=cm.getRange(curStart, curEnd); + //replace all characters in range by selected, but keep linebreaks + replaceWithStr=replaceWithStr.replace(/[^\n]/g,replaceWith); + cm.replaceRange(replaceWithStr, curStart, curEnd); + if(vim.visualMode){ + cm.setCursor(curStart); + exitVisualMode(cm); + }else{ + cm.setCursor(offsetCursor(curEnd, 0, -1)); + } + } + }, + incrementNumberToken: function(cm, actionArgs) { + var cur = cm.getCursor(); + var lineStr = cm.getLine(cur.line); + var re = /-?\d+/g; + var match; + var start; + var end; + var numberStr; + var token; + while ((match = re.exec(lineStr)) !== null) { + token = match[0]; + start = match.index; + end = start + token.length; + if(cur.ch < end)break; + } + if(!actionArgs.backtrack && (end <= cur.ch))return; + if (token) { + var increment = actionArgs.increase ? 1 : -1; + var number = parseInt(token) + (increment * actionArgs.repeat); + var from = {ch:start, line:cur.line}; + var to = {ch:end, line:cur.line}; + numberStr = number.toString(); + cm.replaceRange(numberStr, from, to); + } else { + return; + } + cm.setCursor({line: cur.line, ch: start + numberStr.length - 1}); + }, + repeatLastEdit: function(cm, actionArgs, vim) { + var lastEditInputState = vim.lastEditInputState; + if (!lastEditInputState) { return; } + var repeat = actionArgs.repeat; + if (repeat && actionArgs.repeatIsExplicit) { + vim.lastEditInputState.repeatOverride = repeat; + } else { + repeat = vim.lastEditInputState.repeatOverride || repeat; + } + repeatLastEdit(cm, vim, repeat, false /** repeatForInsert */); + } + }; + + var textObjects = { + // TODO: lots of possible exceptions that can be thrown here. Try da( + // outside of a () block. + // TODO: implement text objects for the reverse like }. Should just be + // an additional mapping after moving to the defaultKeyMap. + 'w': function(cm, inclusive) { + return expandWordUnderCursor(cm, inclusive, true /** forward */, + false /** bigWord */); + }, + 'W': function(cm, inclusive) { + return expandWordUnderCursor(cm, inclusive, + true /** forward */, true /** bigWord */); + }, + '{': function(cm, inclusive) { + return selectCompanionObject(cm, '}', inclusive); + }, + '(': function(cm, inclusive) { + return selectCompanionObject(cm, ')', inclusive); + }, + '[': function(cm, inclusive) { + return selectCompanionObject(cm, ']', inclusive); + }, + '\'': function(cm, inclusive) { + return findBeginningAndEnd(cm, "'", inclusive); + }, + '"': function(cm, inclusive) { + return findBeginningAndEnd(cm, '"', inclusive); + } + }; + + /* + * Below are miscellaneous utility functions used by vim.js + */ + + /** + * Clips cursor to ensure that line is within the buffer's range + * If includeLineBreak is true, then allow cur.ch == lineLength. + */ + function clipCursorToContent(cm, cur, includeLineBreak) { + var line = Math.min(Math.max(cm.firstLine(), cur.line), cm.lastLine() ); + var maxCh = lineLength(cm, line) - 1; + maxCh = (includeLineBreak) ? maxCh + 1 : maxCh; + var ch = Math.min(Math.max(0, cur.ch), maxCh); + return { line: line, ch: ch }; + } + function copyArgs(args) { + var ret = {}; + for (var prop in args) { + if (args.hasOwnProperty(prop)) { + ret[prop] = args[prop]; + } + } + return ret; + } + function offsetCursor(cur, offsetLine, offsetCh) { + return { line: cur.line + offsetLine, ch: cur.ch + offsetCh }; + } + function matchKeysPartial(pressed, mapped) { + for (var i = 0; i < pressed.length; i++) { + // 'character' means any character. For mark, register commads, etc. + if (pressed[i] != mapped[i] && mapped[i] != 'character') { + return false; + } + } + return true; + } + function repeatFn(cm, fn, repeat) { + return function() { + for (var i = 0; i < repeat; i++) { + fn(cm); + } + }; + } + function copyCursor(cur) { + return { line: cur.line, ch: cur.ch }; + } + function cursorEqual(cur1, cur2) { + return cur1.ch == cur2.ch && cur1.line == cur2.line; + } + function cursorIsBefore(cur1, cur2) { + if (cur1.line < cur2.line) { + return true; + } + if (cur1.line == cur2.line && cur1.ch < cur2.ch) { + return true; + } + return false; + } + function cusrorIsBetween(cur1, cur2, cur3) { + // returns true if cur2 is between cur1 and cur3. + var cur1before2 = cursorIsBefore(cur1, cur2); + var cur2before3 = cursorIsBefore(cur2, cur3); + return cur1before2 && cur2before3; + } + function lineLength(cm, lineNum) { + return cm.getLine(lineNum).length; + } + function reverse(s){ + return s.split('').reverse().join(''); + } + function trim(s) { + if (s.trim) { + return s.trim(); + } + return s.replace(/^\s+|\s+$/g, ''); + } + function escapeRegex(s) { + return s.replace(/([.?*+$\[\]\/\\(){}|\-])/g, '\\$1'); + } + + function exitVisualMode(cm) { + cm.off('mousedown', exitVisualMode); + var vim = cm.state.vim; + vim.visualMode = false; + vim.visualLine = false; + var selectionStart = cm.getCursor('anchor'); + var selectionEnd = cm.getCursor('head'); + if (!cursorEqual(selectionStart, selectionEnd)) { + // Clear the selection and set the cursor only if the selection has not + // already been cleared. Otherwise we risk moving the cursor somewhere + // it's not supposed to be. + cm.setCursor(clipCursorToContent(cm, selectionEnd)); + } + CodeMirror.signal(cm, "vim-mode-change", {mode: "normal"}); + } + + // Remove any trailing newlines from the selection. For + // example, with the caret at the start of the last word on the line, + // 'dw' should word, but not the newline, while 'w' should advance the + // caret to the first character of the next line. + function clipToLine(cm, curStart, curEnd) { + var selection = cm.getRange(curStart, curEnd); + // Only clip if the selection ends with trailing newline + whitespace + if (/\n\s*$/.test(selection)) { + var lines = selection.split('\n'); + // We know this is all whitepsace. + lines.pop(); + + // Cases: + // 1. Last word is an empty line - do not clip the trailing '\n' + // 2. Last word is not an empty line - clip the trailing '\n' + var line; + // Find the line containing the last word, and clip all whitespace up + // to it. + for (var line = lines.pop(); lines.length > 0 && line && isWhiteSpaceString(line); line = lines.pop()) { + curEnd.line--; + curEnd.ch = 0; + } + // If the last word is not an empty line, clip an additional newline + if (line) { + curEnd.line--; + curEnd.ch = lineLength(cm, curEnd.line); + } else { + curEnd.ch = 0; + } + } + } + + // Expand the selection to line ends. + function expandSelectionToLine(_cm, curStart, curEnd) { + curStart.ch = 0; + curEnd.ch = 0; + curEnd.line++; + } + + function findFirstNonWhiteSpaceCharacter(text) { + if (!text) { + return 0; + } + var firstNonWS = text.search(/\S/); + return firstNonWS == -1 ? text.length : firstNonWS; + } + + function expandWordUnderCursor(cm, inclusive, _forward, bigWord, noSymbol) { + var cur = cm.getCursor(); + var line = cm.getLine(cur.line); + var idx = cur.ch; + + // Seek to first word or non-whitespace character, depending on if + // noSymbol is true. + var textAfterIdx = line.substring(idx); + var firstMatchedChar; + if (noSymbol) { + firstMatchedChar = textAfterIdx.search(/\w/); + } else { + firstMatchedChar = textAfterIdx.search(/\S/); + } + if (firstMatchedChar == -1) { + return null; + } + idx += firstMatchedChar; + textAfterIdx = line.substring(idx); + var textBeforeIdx = line.substring(0, idx); + + var matchRegex; + // Greedy matchers for the "word" we are trying to expand. + if (bigWord) { + matchRegex = /^\S+/; + } else { + if ((/\w/).test(line.charAt(idx))) { + matchRegex = /^\w+/; + } else { + matchRegex = /^[^\w\s]+/; + } + } + + var wordAfterRegex = matchRegex.exec(textAfterIdx); + var wordStart = idx; + var wordEnd = idx + wordAfterRegex[0].length; + // TODO: Find a better way to do this. It will be slow on very long lines. + var revTextBeforeIdx = reverse(textBeforeIdx); + var wordBeforeRegex = matchRegex.exec(revTextBeforeIdx); + if (wordBeforeRegex) { + wordStart -= wordBeforeRegex[0].length; + } + + if (inclusive) { + // If present, trim all whitespace after word. + // Otherwise, trim all whitespace before word. + var textAfterWordEnd = line.substring(wordEnd); + var whitespacesAfterWord = textAfterWordEnd.match(/^\s*/)[0].length; + if (whitespacesAfterWord > 0) { + wordEnd += whitespacesAfterWord; + } else { + var revTrim = revTextBeforeIdx.length - wordStart; + var textBeforeWordStart = revTextBeforeIdx.substring(revTrim); + var whitespacesBeforeWord = textBeforeWordStart.match(/^\s*/)[0].length; + wordStart -= whitespacesBeforeWord; + } + } + + return { start: { line: cur.line, ch: wordStart }, + end: { line: cur.line, ch: wordEnd }}; + } + + function recordJumpPosition(cm, oldCur, newCur) { + if(!cursorEqual(oldCur, newCur)) { + vimGlobalState.jumpList.add(cm, oldCur, newCur); + } + } + + function recordLastCharacterSearch(increment, args) { + vimGlobalState.lastChararacterSearch.increment = increment; + vimGlobalState.lastChararacterSearch.forward = args.forward; + vimGlobalState.lastChararacterSearch.selectedCharacter = args.selectedCharacter; + } + + var symbolToMode = { + '(': 'bracket', ')': 'bracket', '{': 'bracket', '}': 'bracket', + '[': 'section', ']': 'section', + '*': 'comment', '/': 'comment', + 'm': 'method', 'M': 'method', + '#': 'preprocess' + }; + var findSymbolModes = { + bracket: { + isComplete: function(state) { + if (state.nextCh === state.symb) { + state.depth++; + if(state.depth >= 1)return true; + } else if (state.nextCh === state.reverseSymb) { + state.depth--; + } + return false; + } + }, + section: { + init: function(state) { + state.curMoveThrough = true; + state.symb = (state.forward ? ']' : '[') === state.symb ? '{' : '}'; + }, + isComplete: function(state) { + return state.index === 0 && state.nextCh === state.symb; + } + }, + comment: { + isComplete: function(state) { + var found = state.lastCh === '*' && state.nextCh === '/'; + state.lastCh = state.nextCh; + return found; + } + }, + // TODO: The original Vim implementation only operates on level 1 and 2. + // The current implementation doesn't check for code block level and + // therefore it operates on any levels. + method: { + init: function(state) { + state.symb = (state.symb === 'm' ? '{' : '}'); + state.reverseSymb = state.symb === '{' ? '}' : '{'; + }, + isComplete: function(state) { + if(state.nextCh === state.symb)return true; + return false; + } + }, + preprocess: { + init: function(state) { + state.index = 0; + }, + isComplete: function(state) { + if (state.nextCh === '#') { + var token = state.lineText.match(/#(\w+)/)[1]; + if (token === 'endif') { + if (state.forward && state.depth === 0) { + return true; + } + state.depth++; + } else if (token === 'if') { + if (!state.forward && state.depth === 0) { + return true; + } + state.depth--; + } + if(token === 'else' && state.depth === 0)return true; + } + return false; + } + } + }; + function findSymbol(cm, repeat, forward, symb) { + var cur = cm.getCursor(); + var increment = forward ? 1 : -1; + var endLine = forward ? cm.lineCount() : -1; + var curCh = cur.ch; + var line = cur.line; + var lineText = cm.getLine(line); + var state = { + lineText: lineText, + nextCh: lineText.charAt(curCh), + lastCh: null, + index: curCh, + symb: symb, + reverseSymb: (forward ? { ')': '(', '}': '{' } : { '(': ')', '{': '}' })[symb], + forward: forward, + depth: 0, + curMoveThrough: false + }; + var mode = symbolToMode[symb]; + if(!mode)return cur; + var init = findSymbolModes[mode].init; + var isComplete = findSymbolModes[mode].isComplete; + if(init)init(state); + while (line !== endLine && repeat) { + state.index += increment; + state.nextCh = state.lineText.charAt(state.index); + if (!state.nextCh) { + line += increment; + state.lineText = cm.getLine(line) || ''; + if (increment > 0) { + state.index = 0; + } else { + var lineLen = state.lineText.length; + state.index = (lineLen > 0) ? (lineLen-1) : 0; + } + state.nextCh = state.lineText.charAt(state.index); + } + if (isComplete(state)) { + cur.line = line; + cur.ch = state.index; + repeat--; + } + } + if (state.nextCh || state.curMoveThrough) { + return { line: line, ch: state.index }; + } + return cur; + } + + /* + * Returns the boundaries of the next word. If the cursor in the middle of + * the word, then returns the boundaries of the current word, starting at + * the cursor. If the cursor is at the start/end of a word, and we are going + * forward/backward, respectively, find the boundaries of the next word. + * + * @param {CodeMirror} cm CodeMirror object. + * @param {Cursor} cur The cursor position. + * @param {boolean} forward True to search forward. False to search + * backward. + * @param {boolean} bigWord True if punctuation count as part of the word. + * False if only [a-zA-Z0-9] characters count as part of the word. + * @param {boolean} emptyLineIsWord True if empty lines should be treated + * as words. + * @return {Object{from:number, to:number, line: number}} The boundaries of + * the word, or null if there are no more words. + */ + function findWord(cm, cur, forward, bigWord, emptyLineIsWord) { + var lineNum = cur.line; + var pos = cur.ch; + var line = cm.getLine(lineNum); + var dir = forward ? 1 : -1; + var regexps = bigWord ? bigWordRegexp : wordRegexp; + + if (emptyLineIsWord && line == '') { + lineNum += dir; + line = cm.getLine(lineNum); + if (!isLine(cm, lineNum)) { + return null; + } + pos = (forward) ? 0 : line.length; + } + + while (true) { + if (emptyLineIsWord && line == '') { + return { from: 0, to: 0, line: lineNum }; + } + var stop = (dir > 0) ? line.length : -1; + var wordStart = stop, wordEnd = stop; + // Find bounds of next word. + while (pos != stop) { + var foundWord = false; + for (var i = 0; i < regexps.length && !foundWord; ++i) { + if (regexps[i].test(line.charAt(pos))) { + wordStart = pos; + // Advance to end of word. + while (pos != stop && regexps[i].test(line.charAt(pos))) { + pos += dir; + } + wordEnd = pos; + foundWord = wordStart != wordEnd; + if (wordStart == cur.ch && lineNum == cur.line && + wordEnd == wordStart + dir) { + // We started at the end of a word. Find the next one. + continue; + } else { + return { + from: Math.min(wordStart, wordEnd + 1), + to: Math.max(wordStart, wordEnd), + line: lineNum }; + } + } + } + if (!foundWord) { + pos += dir; + } + } + // Advance to next/prev line. + lineNum += dir; + if (!isLine(cm, lineNum)) { + return null; + } + line = cm.getLine(lineNum); + pos = (dir > 0) ? 0 : line.length; + } + // Should never get here. + throw new Error('The impossible happened.'); + } + + /** + * @param {CodeMirror} cm CodeMirror object. + * @param {int} repeat Number of words to move past. + * @param {boolean} forward True to search forward. False to search + * backward. + * @param {boolean} wordEnd True to move to end of word. False to move to + * beginning of word. + * @param {boolean} bigWord True if punctuation count as part of the word. + * False if only alphabet characters count as part of the word. + * @return {Cursor} The position the cursor should move to. + */ + function moveToWord(cm, repeat, forward, wordEnd, bigWord) { + var cur = cm.getCursor(); + var curStart = copyCursor(cur); + var words = []; + if (forward && !wordEnd || !forward && wordEnd) { + repeat++; + } + // For 'e', empty lines are not considered words, go figure. + var emptyLineIsWord = !(forward && wordEnd); + for (var i = 0; i < repeat; i++) { + var word = findWord(cm, cur, forward, bigWord, emptyLineIsWord); + if (!word) { + var eodCh = lineLength(cm, cm.lastLine()); + words.push(forward + ? {line: cm.lastLine(), from: eodCh, to: eodCh} + : {line: 0, from: 0, to: 0}); + break; + } + words.push(word); + cur = {line: word.line, ch: forward ? (word.to - 1) : word.from}; + } + var shortCircuit = words.length != repeat; + var firstWord = words[0]; + var lastWord = words.pop(); + if (forward && !wordEnd) { + // w + if (!shortCircuit && (firstWord.from != curStart.ch || firstWord.line != curStart.line)) { + // We did not start in the middle of a word. Discard the extra word at the end. + lastWord = words.pop(); + } + return {line: lastWord.line, ch: lastWord.from}; + } else if (forward && wordEnd) { + return {line: lastWord.line, ch: lastWord.to - 1}; + } else if (!forward && wordEnd) { + // ge + if (!shortCircuit && (firstWord.to != curStart.ch || firstWord.line != curStart.line)) { + // We did not start in the middle of a word. Discard the extra word at the end. + lastWord = words.pop(); + } + return {line: lastWord.line, ch: lastWord.to}; + } else { + // b + return {line: lastWord.line, ch: lastWord.from}; + } + } + + function moveToCharacter(cm, repeat, forward, character) { + var cur = cm.getCursor(); + var start = cur.ch; + var idx; + for (var i = 0; i < repeat; i ++) { + var line = cm.getLine(cur.line); + idx = charIdxInLine(start, line, character, forward, true); + if (idx == -1) { + return null; + } + start = idx; + } + return { line: cm.getCursor().line, ch: idx }; + } + + function moveToColumn(cm, repeat) { + // repeat is always >= 1, so repeat - 1 always corresponds + // to the column we want to go to. + var line = cm.getCursor().line; + return clipCursorToContent(cm, { line: line, ch: repeat - 1 }); + } + + function updateMark(cm, vim, markName, pos) { + if (!inArray(markName, validMarks)) { + return; + } + if (vim.marks[markName]) { + vim.marks[markName].clear(); + } + vim.marks[markName] = cm.setBookmark(pos); + } + + function charIdxInLine(start, line, character, forward, includeChar) { + // Search for char in line. + // motion_options: {forward, includeChar} + // If includeChar = true, include it too. + // If forward = true, search forward, else search backwards. + // If char is not found on this line, do nothing + var idx; + if (forward) { + idx = line.indexOf(character, start + 1); + if (idx != -1 && !includeChar) { + idx -= 1; + } + } else { + idx = line.lastIndexOf(character, start - 1); + if (idx != -1 && !includeChar) { + idx += 1; + } + } + return idx; + } + + function getContextLevel(ctx) { + return (ctx === 'string' || ctx === 'comment') ? 1 : 0; + } + + function findMatchedSymbol(cm, cur, symb) { + var line = cur.line; + var ch = cur.ch; + symb = symb ? symb : cm.getLine(line).charAt(ch); + + var symbContext = cm.getTokenAt({line:line, ch:ch+1}).type; + var symbCtxLevel = getContextLevel(symbContext); + + var reverseSymb = ({ + '(': ')', ')': '(', + '[': ']', ']': '[', + '{': '}', '}': '{'})[symb]; + + // Couldn't find a matching symbol, abort + if (!reverseSymb) { + return cur; + } + + // set our increment to move forward (+1) or backwards (-1) + // depending on which bracket we're matching + var increment = ({'(': 1, '{': 1, '[': 1})[symb] || -1; + var endLine = increment === 1 ? cm.lineCount() : -1; + var depth = 1, nextCh = symb, index = ch, lineText = cm.getLine(line); + // Simple search for closing paren--just count openings and closings till + // we find our match + // TODO: use info from CodeMirror to ignore closing brackets in comments + // and quotes, etc. + while (line !== endLine && depth > 0) { + index += increment; + nextCh = lineText.charAt(index); + if (!nextCh) { + line += increment; + lineText = cm.getLine(line) || ''; + if (increment > 0) { + index = 0; + } else { + var lineLen = lineText.length; + index = (lineLen > 0) ? (lineLen-1) : 0; + } + nextCh = lineText.charAt(index); + } + var revSymbContext = cm.getTokenAt({line:line, ch:index+1}).type; + var revSymbCtxLevel = getContextLevel(revSymbContext); + if (symbCtxLevel >= revSymbCtxLevel) { + if (nextCh === symb) { + depth++; + } else if (nextCh === reverseSymb) { + depth--; + } + } + } + + if (nextCh) { + return { line: line, ch: index }; + } + return cur; + } + + function selectCompanionObject(cm, revSymb, inclusive) { + var cur = cm.getCursor(); + + var end = findMatchedSymbol(cm, cur, revSymb); + var start = findMatchedSymbol(cm, end); + start.ch += inclusive ? 1 : 0; + end.ch += inclusive ? 0 : 1; + + return { start: start, end: end }; + } + + // Takes in a symbol and a cursor and tries to simulate text objects that + // have identical opening and closing symbols + // TODO support across multiple lines + function findBeginningAndEnd(cm, symb, inclusive) { + var cur = cm.getCursor(); + var line = cm.getLine(cur.line); + var chars = line.split(''); + var start, end, i, len; + var firstIndex = chars.indexOf(symb); + + // the decision tree is to always look backwards for the beginning first, + // but if the cursor is in front of the first instance of the symb, + // then move the cursor forward + if (cur.ch < firstIndex) { + cur.ch = firstIndex; + // Why is this line even here??? + // cm.setCursor(cur.line, firstIndex+1); + } + // otherwise if the cursor is currently on the closing symbol + else if (firstIndex < cur.ch && chars[cur.ch] == symb) { + end = cur.ch; // assign end to the current cursor + --cur.ch; // make sure to look backwards + } + + // if we're currently on the symbol, we've got a start + if (chars[cur.ch] == symb && !end) { + start = cur.ch + 1; // assign start to ahead of the cursor + } else { + // go backwards to find the start + for (i = cur.ch; i > -1 && !start; i--) { + if (chars[i] == symb) { + start = i + 1; + } + } + } + + // look forwards for the end symbol + if (start && !end) { + for (i = start, len = chars.length; i < len && !end; i++) { + if (chars[i] == symb) { + end = i; + } + } + } + + // nothing found + if (!start || !end) { + return { start: cur, end: cur }; + } + + // include the symbols + if (inclusive) { + --start; ++end; + } + + return { + start: { line: cur.line, ch: start }, + end: { line: cur.line, ch: end } + }; + } + + // Search functions + function SearchState() {} + SearchState.prototype = { + getQuery: function() { + return vimGlobalState.query; + }, + setQuery: function(query) { + vimGlobalState.query = query; + }, + getOverlay: function() { + return this.searchOverlay; + }, + setOverlay: function(overlay) { + this.searchOverlay = overlay; + }, + isReversed: function() { + return vimGlobalState.isReversed; + }, + setReversed: function(reversed) { + vimGlobalState.isReversed = reversed; + } + }; + function getSearchState(cm) { + var vim = cm.state.vim; + return vim.searchState_ || (vim.searchState_ = new SearchState()); + } + function dialog(cm, template, shortText, onClose, options) { + if (cm.openDialog) { + cm.openDialog(template, onClose, { bottom: true, value: options.value, + onKeyDown: options.onKeyDown, onKeyUp: options.onKeyUp }); + } + else { + onClose(prompt(shortText, '')); + } + } + + function findUnescapedSlashes(str) { + var escapeNextChar = false; + var slashes = []; + for (var i = 0; i < str.length; i++) { + var c = str.charAt(i); + if (!escapeNextChar && c == '/') { + slashes.push(i); + } + escapeNextChar = (c == '\\'); + } + return slashes; + } + /** + * Extract the regular expression from the query and return a Regexp object. + * Returns null if the query is blank. + * If ignoreCase is passed in, the Regexp object will have the 'i' flag set. + * If smartCase is passed in, and the query contains upper case letters, + * then ignoreCase is overridden, and the 'i' flag will not be set. + * If the query contains the /i in the flag part of the regular expression, + * then both ignoreCase and smartCase are ignored, and 'i' will be passed + * through to the Regex object. + */ + function parseQuery(query, ignoreCase, smartCase) { + // Check if the query is already a regex. + if (query instanceof RegExp) { return query; } + // First try to extract regex + flags from the input. If no flags found, + // extract just the regex. IE does not accept flags directly defined in + // the regex string in the form /regex/flags + var slashes = findUnescapedSlashes(query); + var regexPart; + var forceIgnoreCase; + if (!slashes.length) { + // Query looks like 'regexp' + regexPart = query; + } else { + // Query looks like 'regexp/...' + regexPart = query.substring(0, slashes[0]); + var flagsPart = query.substring(slashes[0]); + forceIgnoreCase = (flagsPart.indexOf('i') != -1); + } + if (!regexPart) { + return null; + } + if (smartCase) { + ignoreCase = (/^[^A-Z]*$/).test(regexPart); + } + var regexp = new RegExp(regexPart, + (ignoreCase || forceIgnoreCase) ? 'i' : undefined); + return regexp; + } + function showConfirm(cm, text) { + if (cm.openNotification) { + cm.openNotification('' + text + '', + {bottom: true, duration: 5000}); + } else { + alert(text); + } + } + function makePrompt(prefix, desc) { + var raw = ''; + if (prefix) { + raw += '' + prefix + ''; + } + raw += ' ' + + ''; + if (desc) { + raw += ''; + raw += desc; + raw += ''; + } + return raw; + } + var searchPromptDesc = '(Javascript regexp)'; + function showPrompt(cm, options) { + var shortText = (options.prefix || '') + ' ' + (options.desc || ''); + var prompt = makePrompt(options.prefix, options.desc); + dialog(cm, prompt, shortText, options.onClose, options); + } + function regexEqual(r1, r2) { + if (r1 instanceof RegExp && r2 instanceof RegExp) { + var props = ['global', 'multiline', 'ignoreCase', 'source']; + for (var i = 0; i < props.length; i++) { + var prop = props[i]; + if (r1[prop] !== r2[prop]) { + return false; + } + } + return true; + } + return false; + } + // Returns true if the query is valid. + function updateSearchQuery(cm, rawQuery, ignoreCase, smartCase) { + if (!rawQuery) { + return; + } + var state = getSearchState(cm); + var query = parseQuery(rawQuery, !!ignoreCase, !!smartCase); + if (!query) { + return; + } + highlightSearchMatches(cm, query); + if (regexEqual(query, state.getQuery())) { + return query; + } + state.setQuery(query); + return query; + } + function searchOverlay(query) { + if (query.source.charAt(0) == '^') { + var matchSol = true; + } + return { + token: function(stream) { + if (matchSol && !stream.sol()) { + stream.skipToEnd(); + return; + } + var match = stream.match(query, false); + if (match) { + if (match[0].length == 0) { + // Matched empty string, skip to next. + stream.next(); + return 'searching'; + } + if (!stream.sol()) { + // Backtrack 1 to match \b + stream.backUp(1); + if (!query.exec(stream.next() + match[0])) { + stream.next(); + return null; + } + } + stream.match(query); + return 'searching'; + } + while (!stream.eol()) { + stream.next(); + if (stream.match(query, false)) break; + } + }, + query: query + }; + } + function highlightSearchMatches(cm, query) { + var overlay = getSearchState(cm).getOverlay(); + if (!overlay || query != overlay.query) { + if (overlay) { + cm.removeOverlay(overlay); + } + overlay = searchOverlay(query); + cm.addOverlay(overlay); + getSearchState(cm).setOverlay(overlay); + } + } + function findNext(cm, prev, query, repeat) { + if (repeat === undefined) { repeat = 1; } + return cm.operation(function() { + var pos = cm.getCursor(); + var cursor = cm.getSearchCursor(query, pos); + for (var i = 0; i < repeat; i++) { + var found = cursor.find(prev); + if (i == 0 && found && cursorEqual(cursor.from(), pos)) { found = cursor.find(prev); } + if (!found) { + // SearchCursor may have returned null because it hit EOF, wrap + // around and try again. + cursor = cm.getSearchCursor(query, + (prev) ? { line: cm.lastLine() } : {line: cm.firstLine(), ch: 0} ); + if (!cursor.find(prev)) { + return; + } + } + } + return cursor.from(); + }); + } + function clearSearchHighlight(cm) { + cm.removeOverlay(getSearchState(cm).getOverlay()); + getSearchState(cm).setOverlay(null); + } + /** + * Check if pos is in the specified range, INCLUSIVE. + * Range can be specified with 1 or 2 arguments. + * If the first range argument is an array, treat it as an array of line + * numbers. Match pos against any of the lines. + * If the first range argument is a number, + * if there is only 1 range argument, check if pos has the same line + * number + * if there are 2 range arguments, then check if pos is in between the two + * range arguments. + */ + function isInRange(pos, start, end) { + if (typeof pos != 'number') { + // Assume it is a cursor position. Get the line number. + pos = pos.line; + } + if (start instanceof Array) { + return inArray(pos, start); + } else { + if (end) { + return (pos >= start && pos <= end); + } else { + return pos == start; + } + } + } + function getUserVisibleLines(cm) { + var scrollInfo = cm.getScrollInfo(); + var occludeToleranceTop = 6; + var occludeToleranceBottom = 10; + var from = cm.coordsChar({left:0, top: occludeToleranceTop + scrollInfo.top}, 'local'); + var bottomY = scrollInfo.clientHeight - occludeToleranceBottom + scrollInfo.top; + var to = cm.coordsChar({left:0, top: bottomY}, 'local'); + return {top: from.line, bottom: to.line}; + } + + // Ex command handling + // Care must be taken when adding to the default Ex command map. For any + // pair of commands that have a shared prefix, at least one of their + // shortNames must not match the prefix of the other command. + var defaultExCommandMap = [ + { name: 'map', type: 'builtIn' }, + { name: 'write', shortName: 'w', type: 'builtIn' }, + { name: 'undo', shortName: 'u', type: 'builtIn' }, + { name: 'redo', shortName: 'red', type: 'builtIn' }, + { name: 'sort', shortName: 'sor', type: 'builtIn'}, + { name: 'substitute', shortName: 's', type: 'builtIn'}, + { name: 'nohlsearch', shortName: 'noh', type: 'builtIn'}, + { name: 'delmarks', shortName: 'delm', type: 'builtin'} + ]; + Vim.ExCommandDispatcher = function() { + this.buildCommandMap_(); + }; + Vim.ExCommandDispatcher.prototype = { + processCommand: function(cm, input) { + var vim = cm.state.vim; + if (vim.visualMode) { + exitVisualMode(cm); + } + var inputStream = new CodeMirror.StringStream(input); + var params = {}; + params.input = input; + try { + this.parseInput_(cm, inputStream, params); + } catch(e) { + showConfirm(cm, e); + return; + } + var commandName; + if (!params.commandName) { + // If only a line range is defined, move to the line. + if (params.line !== undefined) { + commandName = 'move'; + } + } else { + var command = this.matchCommand_(params.commandName); + if (command) { + commandName = command.name; + this.parseCommandArgs_(inputStream, params, command); + if (command.type == 'exToKey') { + // Handle Ex to Key mapping. + for (var i = 0; i < command.toKeys.length; i++) { + CodeMirror.Vim.handleKey(cm, command.toKeys[i]); + } + return; + } else if (command.type == 'exToEx') { + // Handle Ex to Ex mapping. + this.processCommand(cm, command.toInput); + return; + } + } + } + if (!commandName) { + showConfirm(cm, 'Not an editor command ":' + input + '"'); + return; + } + try { + exCommands[commandName](cm, params); + } catch(e) { + showConfirm(cm, e); + } + }, + parseInput_: function(cm, inputStream, result) { + inputStream.eatWhile(':'); + // Parse range. + if (inputStream.eat('%')) { + result.line = cm.firstLine(); + result.lineEnd = cm.lastLine(); + } else { + result.line = this.parseLineSpec_(cm, inputStream); + if (result.line !== undefined && inputStream.eat(',')) { + result.lineEnd = this.parseLineSpec_(cm, inputStream); + } + } + + // Parse command name. + var commandMatch = inputStream.match(/^(\w+)/); + if (commandMatch) { + result.commandName = commandMatch[1]; + } else { + result.commandName = inputStream.match(/.*/)[0]; + } + + return result; + }, + parseLineSpec_: function(cm, inputStream) { + var numberMatch = inputStream.match(/^(\d+)/); + if (numberMatch) { + return parseInt(numberMatch[1], 10) - 1; + } + switch (inputStream.next()) { + case '.': + return cm.getCursor().line; + case '$': + return cm.lastLine(); + case '\'': + var mark = cm.state.vim.marks[inputStream.next()]; + if (mark && mark.find()) { + return mark.find().line; + } + throw new Error('Mark not set'); + default: + inputStream.backUp(1); + return undefined; + } + }, + parseCommandArgs_: function(inputStream, params, command) { + if (inputStream.eol()) { + return; + } + params.argString = inputStream.match(/.*/)[0]; + // Parse command-line arguments + var delim = command.argDelimiter || /\s+/; + var args = trim(params.argString).split(delim); + if (args.length && args[0]) { + params.args = args; + } + }, + matchCommand_: function(commandName) { + // Return the command in the command map that matches the shortest + // prefix of the passed in command name. The match is guaranteed to be + // unambiguous if the defaultExCommandMap's shortNames are set up + // correctly. (see @code{defaultExCommandMap}). + for (var i = commandName.length; i > 0; i--) { + var prefix = commandName.substring(0, i); + if (this.commandMap_[prefix]) { + var command = this.commandMap_[prefix]; + if (command.name.indexOf(commandName) === 0) { + return command; + } + } + } + return null; + }, + buildCommandMap_: function() { + this.commandMap_ = {}; + for (var i = 0; i < defaultExCommandMap.length; i++) { + var command = defaultExCommandMap[i]; + var key = command.shortName || command.name; + this.commandMap_[key] = command; + } + }, + map: function(lhs, rhs) { + if (lhs != ':' && lhs.charAt(0) == ':') { + var commandName = lhs.substring(1); + if (rhs != ':' && rhs.charAt(0) == ':') { + // Ex to Ex mapping + this.commandMap_[commandName] = { + name: commandName, + type: 'exToEx', + toInput: rhs.substring(1) + }; + } else { + // Ex to key mapping + this.commandMap_[commandName] = { + name: commandName, + type: 'exToKey', + toKeys: parseKeyString(rhs) + }; + } + } else { + if (rhs != ':' && rhs.charAt(0) == ':') { + // Key to Ex mapping. + defaultKeymap.unshift({ + keys: parseKeyString(lhs), + type: 'keyToEx', + exArgs: { input: rhs.substring(1) }}); + } else { + // Key to key mapping + defaultKeymap.unshift({ + keys: parseKeyString(lhs), + type: 'keyToKey', + toKeys: parseKeyString(rhs) + }); + } + } + } + }; + + // Converts a key string sequence of the form abd into Vim's + // keymap representation. + function parseKeyString(str) { + var key, match; + var keys = []; + while (str) { + match = (/<\w+-.+?>|<\w+>|./).exec(str); + if(match === null)break; + key = match[0]; + str = str.substring(match.index + key.length); + keys.push(key); + } + return keys; + } + + var exCommands = { + map: function(cm, params) { + var mapArgs = params.args; + if (!mapArgs || mapArgs.length < 2) { + if (cm) { + showConfirm(cm, 'Invalid mapping: ' + params.input); + } + return; + } + exCommandDispatcher.map(mapArgs[0], mapArgs[1], cm); + }, + move: function(cm, params) { + commandDispatcher.processCommand(cm, cm.state.vim, { + type: 'motion', + motion: 'moveToLineOrEdgeOfDocument', + motionArgs: { forward: false, explicitRepeat: true, + linewise: true }, + repeatOverride: params.line+1}); + }, + sort: function(cm, params) { + var reverse, ignoreCase, unique, number; + function parseArgs() { + if (params.argString) { + var args = new CodeMirror.StringStream(params.argString); + if (args.eat('!')) { reverse = true; } + if (args.eol()) { return; } + if (!args.eatSpace()) { throw new Error('invalid arguments ' + args.match(/.*/)[0]); } + var opts = args.match(/[a-z]+/); + if (opts) { + opts = opts[0]; + ignoreCase = opts.indexOf('i') != -1; + unique = opts.indexOf('u') != -1; + var decimal = opts.indexOf('d') != -1 && 1; + var hex = opts.indexOf('x') != -1 && 1; + var octal = opts.indexOf('o') != -1 && 1; + if (decimal + hex + octal > 1) { throw new Error('invalid arguments'); } + number = decimal && 'decimal' || hex && 'hex' || octal && 'octal'; + } + if (args.eatSpace() && args.match(/\/.*\//)) { throw new Error('patterns not supported'); } + } + } + parseArgs(); + var lineStart = params.line || cm.firstLine(); + var lineEnd = params.lineEnd || params.line || cm.lastLine(); + if (lineStart == lineEnd) { return; } + var curStart = { line: lineStart, ch: 0 }; + var curEnd = { line: lineEnd, ch: lineLength(cm, lineEnd) }; + var text = cm.getRange(curStart, curEnd).split('\n'); + var numberRegex = (number == 'decimal') ? /(-?)([\d]+)/ : + (number == 'hex') ? /(-?)(?:0x)?([0-9a-f]+)/i : + (number == 'octal') ? /([0-7]+)/ : null; + var radix = (number == 'decimal') ? 10 : (number == 'hex') ? 16 : (number == 'octal') ? 8 : null; + var numPart = [], textPart = []; + if (number) { + for (var i = 0; i < text.length; i++) { + if (numberRegex.exec(text[i])) { + numPart.push(text[i]); + } else { + textPart.push(text[i]); + } + } + } else { + textPart = text; + } + function compareFn(a, b) { + if (reverse) { var tmp; tmp = a; a = b; b = tmp; } + if (ignoreCase) { a = a.toLowerCase(); b = b.toLowerCase(); } + var anum = number && numberRegex.exec(a); + var bnum = number && numberRegex.exec(b); + if (!anum) { return a < b ? -1 : 1; } + anum = parseInt((anum[1] + anum[2]).toLowerCase(), radix); + bnum = parseInt((bnum[1] + bnum[2]).toLowerCase(), radix); + return anum - bnum; + } + numPart.sort(compareFn); + textPart.sort(compareFn); + text = (!reverse) ? textPart.concat(numPart) : numPart.concat(textPart); + if (unique) { // Remove duplicate lines + var textOld = text; + var lastLine; + text = []; + for (var i = 0; i < textOld.length; i++) { + if (textOld[i] != lastLine) { + text.push(textOld[i]); + } + lastLine = textOld[i]; + } + } + cm.replaceRange(text.join('\n'), curStart, curEnd); + }, + substitute: function(cm, params) { + if (!cm.getSearchCursor) { + throw new Error('Search feature not available. Requires searchcursor.js or ' + + 'any other getSearchCursor implementation.'); + } + var argString = params.argString; + var slashes = findUnescapedSlashes(argString); + if (slashes[0] !== 0) { + showConfirm(cm, 'Substitutions should be of the form ' + + ':s/pattern/replace/'); + return; + } + var regexPart = argString.substring(slashes[0] + 1, slashes[1]); + var replacePart = ''; + var flagsPart; + var count; + var confirm = false; // Whether to confirm each replace. + if (slashes[1]) { + replacePart = argString.substring(slashes[1] + 1, slashes[2]); + } + if (slashes[2]) { + // After the 3rd slash, we can have flags followed by a space followed + // by count. + var trailing = argString.substring(slashes[2] + 1).split(' '); + flagsPart = trailing[0]; + count = parseInt(trailing[1]); + } + if (flagsPart) { + if (flagsPart.indexOf('c') != -1) { + confirm = true; + flagsPart.replace('c', ''); + } + regexPart = regexPart + '/' + flagsPart; + } + if (regexPart) { + // If regex part is empty, then use the previous query. Otherwise use + // the regex part as the new query. + try { + updateSearchQuery(cm, regexPart, true /** ignoreCase */, + true /** smartCase */); + } catch (e) { + showConfirm(cm, 'Invalid regex: ' + regexPart); + return; + } + } + var state = getSearchState(cm); + var query = state.getQuery(); + var lineStart = (params.line !== undefined) ? params.line : cm.getCursor().line; + var lineEnd = params.lineEnd || lineStart; + if (count) { + lineStart = lineEnd; + lineEnd = lineStart + count - 1; + } + var startPos = clipCursorToContent(cm, { line: lineStart, ch: 0 }); + var cursor = cm.getSearchCursor(query, startPos); + doReplace(cm, confirm, lineStart, lineEnd, cursor, query, replacePart); + }, + redo: CodeMirror.commands.redo, + undo: CodeMirror.commands.undo, + write: function(cm) { + if (CodeMirror.commands.save) { + // If a save command is defined, call it. + CodeMirror.commands.save(cm); + } else { + // Saves to text area if no save command is defined. + cm.save(); + } + }, + nohlsearch: function(cm) { + clearSearchHighlight(cm); + }, + delmarks: function(cm, params) { + if (!params.argString || !params.argString.trim()) { + showConfirm(cm, 'Argument required'); + return; + } + + var state = cm.state.vim; + var stream = new CodeMirror.StringStream(params.argString.trim()); + while (!stream.eol()) { + stream.eatSpace(); + + // Record the streams position at the beginning of the loop for use + // in error messages. + var count = stream.pos; + + if (!stream.match(/[a-zA-Z]/, false)) { + showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count)); + return; + } + + var sym = stream.next(); + // Check if this symbol is part of a range + if (stream.match('-', true)) { + // This symbol is part of a range. + + // The range must terminate at an alphabetic character. + if (!stream.match(/[a-zA-Z]/, false)) { + showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count)); + return; + } + + var startMark = sym; + var finishMark = stream.next(); + // The range must terminate at an alphabetic character which + // shares the same case as the start of the range. + if (isLowerCase(startMark) && isLowerCase(finishMark) || + isUpperCase(startMark) && isUpperCase(finishMark)) { + var start = startMark.charCodeAt(0); + var finish = finishMark.charCodeAt(0); + if (start >= finish) { + showConfirm(cm, 'Invalid argument: ' + params.argString.substring(count)); + return; + } + + // Because marks are always ASCII values, and we have + // determined that they are the same case, we can use + // their char codes to iterate through the defined range. + for (var j = 0; j <= finish - start; j++) { + var mark = String.fromCharCode(start + j); + delete state.marks[mark]; + } + } else { + showConfirm(cm, 'Invalid argument: ' + startMark + '-'); + return; + } + } else { + // This symbol is a valid mark, and is not part of a range. + delete state.marks[sym]; + } + } + } + }; + + var exCommandDispatcher = new Vim.ExCommandDispatcher(); + + /** + * @param {CodeMirror} cm CodeMirror instance we are in. + * @param {boolean} confirm Whether to confirm each replace. + * @param {Cursor} lineStart Line to start replacing from. + * @param {Cursor} lineEnd Line to stop replacing at. + * @param {RegExp} query Query for performing matches with. + * @param {string} replaceWith Text to replace matches with. May contain $1, + * $2, etc for replacing captured groups using Javascript replace. + */ + function doReplace(cm, confirm, lineStart, lineEnd, searchCursor, query, + replaceWith) { + // Set up all the functions. + cm.state.vim.exMode = true; + var done = false; + var lastPos = searchCursor.from(); + function replaceAll() { + cm.operation(function() { + while (!done) { + replace(); + next(); + } + stop(); + }); + } + function replace() { + var text = cm.getRange(searchCursor.from(), searchCursor.to()); + var newText = text.replace(query, replaceWith); + searchCursor.replace(newText); + } + function next() { + var found = searchCursor.findNext(); + if (!found) { + done = true; + } else if (isInRange(searchCursor.from(), lineStart, lineEnd)) { + cm.scrollIntoView(searchCursor.from(), 30); + cm.setSelection(searchCursor.from(), searchCursor.to()); + lastPos = searchCursor.from(); + done = false; + } else { + done = true; + } + } + function stop(close) { + if (close) { close(); } + cm.focus(); + if (lastPos) { + cm.setCursor(lastPos); + var vim = cm.state.vim; + vim.exMode = false; + vim.lastHPos = vim.lastHSPos = lastPos.ch; + } + } + function onPromptKeyDown(e, _value, close) { + // Swallow all keys. + CodeMirror.e_stop(e); + var keyName = CodeMirror.keyName(e); + switch (keyName) { + case 'Y': + replace(); next(); break; + case 'N': + next(); break; + case 'A': + cm.operation(replaceAll); break; + case 'L': + replace(); + // fall through and exit. + case 'Q': + case 'Esc': + case 'Ctrl-C': + case 'Ctrl-[': + stop(close); + break; + } + if (done) { stop(close); } + } + + // Actually do replace. + next(); + if (done) { + throw new Error('No matches for ' + query.source); + } + if (!confirm) { + replaceAll(); + return; + } + showPrompt(cm, { + prefix: 'replace with ' + replaceWith + ' (y/n/a/q/l)', + onKeyDown: onPromptKeyDown + }); + } + + // Register Vim with CodeMirror + function buildVimKeyMap() { + /** + * Handle the raw key event from CodeMirror. Translate the + * Shift + key modifier to the resulting letter, while preserving other + * modifers. + */ + // TODO: Figure out a way to catch capslock. + function cmKeyToVimKey(key, modifier) { + var vimKey = key; + if (isUpperCase(vimKey)) { + // Convert to lower case if shift is not the modifier since the key + // we get from CodeMirror is always upper case. + if (modifier == 'Shift') { + modifier = null; + } + else { + vimKey = vimKey.toLowerCase(); + } + } + if (modifier) { + // Vim will parse modifier+key combination as a single key. + vimKey = modifier.charAt(0) + '-' + vimKey; + } + var specialKey = ({Enter:'CR',Backspace:'BS',Delete:'Del'})[vimKey]; + vimKey = specialKey ? specialKey : vimKey; + vimKey = vimKey.length > 1 ? '<'+ vimKey + '>' : vimKey; + return vimKey; + } + + // Closure to bind CodeMirror, key, modifier. + function keyMapper(vimKey) { + return function(cm) { + CodeMirror.Vim.handleKey(cm, vimKey); + }; + } + + var cmToVimKeymap = { + 'nofallthrough': true, + 'disableInput': true, + 'style': 'fat-cursor' + }; + function bindKeys(keys, modifier) { + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (!modifier && inArray(key, specialSymbols)) { + // Wrap special symbols with '' because that's how CodeMirror binds + // them. + key = "'" + key + "'"; + } + var vimKey = cmKeyToVimKey(keys[i], modifier); + var cmKey = modifier ? modifier + '-' + key : key; + cmToVimKeymap[cmKey] = keyMapper(vimKey); + } + } + bindKeys(upperCaseAlphabet); + bindKeys(upperCaseAlphabet, 'Shift'); + bindKeys(upperCaseAlphabet, 'Ctrl'); + bindKeys(specialSymbols); + bindKeys(specialSymbols, 'Ctrl'); + bindKeys(numbers); + bindKeys(numbers, 'Ctrl'); + bindKeys(specialKeys); + bindKeys(specialKeys, 'Ctrl'); + return cmToVimKeymap; + } + CodeMirror.keyMap.vim = buildVimKeyMap(); + + function exitInsertMode(cm) { + var vim = cm.state.vim; + var inReplay = vimGlobalState.macroModeState.inReplay; + if (!inReplay) { + cm.off('change', onChange); + cm.off('cursorActivity', onCursorActivity); + CodeMirror.off(cm.getInputField(), 'keydown', onKeyEventTargetKeyDown); + } + if (!inReplay && vim.insertModeRepeat > 1) { + // Perform insert mode repeat for commands like 3,a and 3,o. + repeatLastEdit(cm, vim, vim.insertModeRepeat - 1, + true /** repeatForInsert */); + vim.lastEditInputState.repeatOverride = vim.insertModeRepeat; + } + delete vim.insertModeRepeat; + cm.setCursor(cm.getCursor().line, cm.getCursor().ch-1, true); + vim.insertMode = false; + cm.setOption('keyMap', 'vim'); + cm.toggleOverwrite(false); // exit replace mode if we were in it. + CodeMirror.signal(cm, "vim-mode-change", {mode: "normal"}); + } + + CodeMirror.keyMap['vim-insert'] = { + // TODO: override navigation keys so that Esc will cancel automatic + // indentation from o, O, i_ + 'Esc': exitInsertMode, + 'Ctrl-[': exitInsertMode, + 'Ctrl-C': exitInsertMode, + 'Ctrl-N': 'autocomplete', + 'Ctrl-P': 'autocomplete', + 'Enter': function(cm) { + var fn = CodeMirror.commands.newlineAndIndentContinueComment || + CodeMirror.commands.newlineAndIndent; + fn(cm); + }, + fallthrough: ['default'] + }; + + CodeMirror.keyMap['vim-replace'] = { + 'Backspace': 'goCharLeft', + fallthrough: ['vim-insert'] + }; + + function parseRegisterToKeyBuffer(macroModeState, registerName) { + var match, key; + var register = vimGlobalState.registerController.getRegister(registerName); + var text = register.toString(); + var macroKeyBuffer = macroModeState.macroKeyBuffer; + emptyMacroKeyBuffer(macroModeState); + do { + match = (/<\w+-.+?>|<\w+>|./).exec(text); + if(match === null)break; + key = match[0]; + text = text.substring(match.index + key.length); + macroKeyBuffer.push(key); + } while (text); + return macroKeyBuffer; + } + + function parseKeyBufferToRegister(registerName, keyBuffer) { + var text = keyBuffer.join(''); + vimGlobalState.registerController.setRegisterText(registerName, text); + } + + function emptyMacroKeyBuffer(macroModeState) { + if(macroModeState.isMacroPlaying)return; + var macroKeyBuffer = macroModeState.macroKeyBuffer; + macroKeyBuffer.length = 0; + } + + function executeMacroKeyBuffer(cm, macroModeState, keyBuffer) { + macroModeState.isMacroPlaying = true; + for (var i = 0, len = keyBuffer.length; i < len; i++) { + CodeMirror.Vim.handleKey(cm, keyBuffer[i]); + }; + macroModeState.isMacroPlaying = false; + } + + function logKey(macroModeState, key) { + if(macroModeState.isMacroPlaying)return; + var macroKeyBuffer = macroModeState.macroKeyBuffer; + macroKeyBuffer.push(key); + } + + /** + * Listens for changes made in insert mode. + * Should only be active in insert mode. + */ + function onChange(_cm, changeObj) { + var macroModeState = vimGlobalState.macroModeState; + var lastChange = macroModeState.lastInsertModeChanges; + while (changeObj) { + lastChange.expectCursorActivityForChange = true; + if (changeObj.origin == '+input' || changeObj.origin == 'paste' + || changeObj.origin === undefined /* only in testing */) { + var text = changeObj.text.join('\n'); + lastChange.changes.push(text); + } + // Change objects may be chained with next. + changeObj = changeObj.next; + } + } + + /** + * Listens for any kind of cursor activity on CodeMirror. + * - For tracking cursor activity in insert mode. + * - Should only be active in insert mode. + */ + function onCursorActivity() { + var macroModeState = vimGlobalState.macroModeState; + var lastChange = macroModeState.lastInsertModeChanges; + if (lastChange.expectCursorActivityForChange) { + lastChange.expectCursorActivityForChange = false; + } else { + // Cursor moved outside the context of an edit. Reset the change. + lastChange.changes = []; + } + } + + /** Wrapper for special keys pressed in insert mode */ + function InsertModeKey(keyName) { + this.keyName = keyName; + } + + /** + * Handles raw key down events from the text area. + * - Should only be active in insert mode. + * - For recording deletes in insert mode. + */ + function onKeyEventTargetKeyDown(e) { + var macroModeState = vimGlobalState.macroModeState; + var lastChange = macroModeState.lastInsertModeChanges; + var keyName = CodeMirror.keyName(e); + function onKeyFound() { + lastChange.changes.push(new InsertModeKey(keyName)); + return true; + } + if (keyName.indexOf('Delete') != -1 || keyName.indexOf('Backspace') != -1) { + CodeMirror.lookupKey(keyName, ['vim-insert'], onKeyFound); + } + } + + /** + * Repeats the last edit, which includes exactly 1 command and at most 1 + * insert. Operator and motion commands are read from lastEditInputState, + * while action commands are read from lastEditActionCommand. + * + * If repeatForInsert is true, then the function was called by + * exitInsertMode to repeat the insert mode changes the user just made. The + * corresponding enterInsertMode call was made with a count. + */ + function repeatLastEdit(cm, vim, repeat, repeatForInsert) { + var macroModeState = vimGlobalState.macroModeState; + macroModeState.inReplay = true; + var isAction = !!vim.lastEditActionCommand; + var cachedInputState = vim.inputState; + function repeatCommand() { + if (isAction) { + commandDispatcher.processAction(cm, vim, vim.lastEditActionCommand); + } else { + commandDispatcher.evalInput(cm, vim); + } + } + function repeatInsert(repeat) { + if (macroModeState.lastInsertModeChanges.changes.length > 0) { + // For some reason, repeat cw in desktop VIM will does not repeat + // insert mode changes. Will conform to that behavior. + repeat = !vim.lastEditActionCommand ? 1 : repeat; + repeatLastInsertModeChanges(cm, repeat, macroModeState); + } + } + vim.inputState = vim.lastEditInputState; + if (isAction && vim.lastEditActionCommand.interlaceInsertRepeat) { + // o and O repeat have to be interlaced with insert repeats so that the + // insertions appear on separate lines instead of the last line. + for (var i = 0; i < repeat; i++) { + repeatCommand(); + repeatInsert(1); + } + } else { + if (!repeatForInsert) { + // Hack to get the cursor to end up at the right place. If I is + // repeated in insert mode repeat, cursor will be 1 insert + // change set left of where it should be. + repeatCommand(); + } + repeatInsert(repeat); + } + vim.inputState = cachedInputState; + if (vim.insertMode && !repeatForInsert) { + // Don't exit insert mode twice. If repeatForInsert is set, then we + // were called by an exitInsertMode call lower on the stack. + exitInsertMode(cm); + } + macroModeState.inReplay = false; + }; + + function repeatLastInsertModeChanges(cm, repeat, macroModeState) { + var lastChange = macroModeState.lastInsertModeChanges; + function keyHandler(binding) { + if (typeof binding == 'string') { + CodeMirror.commands[binding](cm); + } else { + binding(cm); + } + return true; + } + for (var i = 0; i < repeat; i++) { + for (var j = 0; j < lastChange.changes.length; j++) { + var change = lastChange.changes[j]; + if (change instanceof InsertModeKey) { + CodeMirror.lookupKey(change.keyName, ['vim-insert'], keyHandler); + } else { + var cur = cm.getCursor(); + cm.replaceRange(change, cur, cur); + } + } + } + } + + resetVimGlobalState(); + return vimApi; + }; + // Initialize Vim and make it available as an API. + CodeMirror.Vim = Vim(); +} +)(); diff --git a/pitfall/pdfkit/node_modules/codemirror/lib/codemirror.css b/pitfall/pdfkit/node_modules/codemirror/lib/codemirror.css new file mode 100644 index 00000000..23eaf74d --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/lib/codemirror.css @@ -0,0 +1,263 @@ +/* BASICS */ + +.CodeMirror { + /* Set height, width, borders, and global font properties here */ + font-family: monospace; + height: 300px; +} +.CodeMirror-scroll { + /* Set scrolling behaviour here */ + overflow: auto; +} + +/* PADDING */ + +.CodeMirror-lines { + padding: 4px 0; /* Vertical padding around content */ +} +.CodeMirror pre { + padding: 0 4px; /* Horizontal padding of content */ +} + +.CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { + background-color: white; /* The little square between H and V scrollbars */ +} + +/* GUTTER */ + +.CodeMirror-gutters { + border-right: 1px solid #ddd; + background-color: #f7f7f7; + white-space: nowrap; +} +.CodeMirror-linenumbers {} +.CodeMirror-linenumber { + padding: 0 3px 0 5px; + min-width: 20px; + text-align: right; + color: #999; +} + +/* CURSOR */ + +.CodeMirror div.CodeMirror-cursor { + border-left: 1px solid black; + z-index: 3; +} +/* Shown when moving in bi-directional text */ +.CodeMirror div.CodeMirror-secondarycursor { + border-left: 1px solid silver; +} +.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor { + width: auto; + border: 0; + background: #7e7; + z-index: 1; +} +/* Can style cursor different in overwrite (non-insert) mode */ +.CodeMirror div.CodeMirror-cursor.CodeMirror-overwrite {} + +.cm-tab { display: inline-block; } + +/* DEFAULT THEME */ + +.cm-s-default .cm-keyword {color: #708;} +.cm-s-default .cm-atom {color: #219;} +.cm-s-default .cm-number {color: #164;} +.cm-s-default .cm-def {color: #00f;} +.cm-s-default .cm-variable {color: black;} +.cm-s-default .cm-variable-2 {color: #05a;} +.cm-s-default .cm-variable-3 {color: #085;} +.cm-s-default .cm-property {color: black;} +.cm-s-default .cm-operator {color: black;} +.cm-s-default .cm-comment {color: #a50;} +.cm-s-default .cm-string {color: #a11;} +.cm-s-default .cm-string-2 {color: #f50;} +.cm-s-default .cm-meta {color: #555;} +.cm-s-default .cm-qualifier {color: #555;} +.cm-s-default .cm-builtin {color: #30a;} +.cm-s-default .cm-bracket {color: #997;} +.cm-s-default .cm-tag {color: #170;} +.cm-s-default .cm-attribute {color: #00c;} +.cm-s-default .cm-header {color: blue;} +.cm-s-default .cm-quote {color: #090;} +.cm-s-default .cm-hr {color: #999;} +.cm-s-default .cm-link {color: #00c;} + +.cm-negative {color: #d44;} +.cm-positive {color: #292;} +.cm-header, .cm-strong {font-weight: bold;} +.cm-em {font-style: italic;} +.cm-link {text-decoration: underline;} + +.cm-s-default .cm-error {color: #f00;} +.cm-invalidchar {color: #f00;} + +div.CodeMirror span.CodeMirror-matchingbracket {color: #0f0;} +div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;} +.CodeMirror-activeline-background {background: #e8f2ff;} + +/* STOP */ + +/* The rest of this file contains styles related to the mechanics of + the editor. You probably shouldn't touch them. */ + +.CodeMirror { + line-height: 1; + position: relative; + overflow: hidden; + background: white; + color: black; +} + +.CodeMirror-scroll { + /* 30px is the magic margin used to hide the element's real scrollbars */ + /* See overflow: hidden in .CodeMirror */ + margin-bottom: -30px; margin-right: -30px; + padding-bottom: 30px; padding-right: 30px; + height: 100%; + outline: none; /* Prevent dragging from highlighting the element */ + position: relative; + -moz-box-sizing: content-box; + box-sizing: content-box; +} +.CodeMirror-sizer { + position: relative; +} + +/* The fake, visible scrollbars. Used to force redraw during scrolling + before actuall scrolling happens, thus preventing shaking and + flickering artifacts. */ +.CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { + position: absolute; + z-index: 6; + display: none; +} +.CodeMirror-vscrollbar { + right: 0; top: 0; + overflow-x: hidden; + overflow-y: scroll; +} +.CodeMirror-hscrollbar { + bottom: 0; left: 0; + overflow-y: hidden; + overflow-x: scroll; +} +.CodeMirror-scrollbar-filler { + right: 0; bottom: 0; +} +.CodeMirror-gutter-filler { + left: 0; bottom: 0; +} + +.CodeMirror-gutters { + position: absolute; left: 0; top: 0; + padding-bottom: 30px; + z-index: 3; +} +.CodeMirror-gutter { + white-space: normal; + height: 100%; + -moz-box-sizing: content-box; + box-sizing: content-box; + padding-bottom: 30px; + margin-bottom: -32px; + display: inline-block; + /* Hack to make IE7 behave */ + *zoom:1; + *display:inline; +} +.CodeMirror-gutter-elt { + position: absolute; + cursor: default; + z-index: 4; +} + +.CodeMirror-lines { + cursor: text; +} +.CodeMirror pre { + /* Reset some styles that the rest of the page might have set */ + -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; + border-width: 0; + background: transparent; + font-family: inherit; + font-size: inherit; + margin: 0; + white-space: pre; + word-wrap: normal; + line-height: inherit; + color: inherit; + z-index: 2; + position: relative; + overflow: visible; +} +.CodeMirror-wrap pre { + word-wrap: break-word; + white-space: pre-wrap; + word-break: normal; +} +.CodeMirror-code pre { + border-right: 30px solid transparent; + width: -webkit-fit-content; + width: -moz-fit-content; + width: fit-content; +} +.CodeMirror-wrap .CodeMirror-code pre { + border-right: none; + width: auto; +} +.CodeMirror-linebackground { + position: absolute; + left: 0; right: 0; top: 0; bottom: 0; + z-index: 0; +} + +.CodeMirror-linewidget { + position: relative; + z-index: 2; + overflow: auto; +} + +.CodeMirror-widget {} + +.CodeMirror-wrap .CodeMirror-scroll { + overflow-x: hidden; +} + +.CodeMirror-measure { + position: absolute; + width: 100%; + height: 0; + overflow: hidden; + visibility: hidden; +} +.CodeMirror-measure pre { position: static; } + +.CodeMirror div.CodeMirror-cursor { + position: absolute; + visibility: hidden; + border-right: none; + width: 0; +} +.CodeMirror-focused div.CodeMirror-cursor { + visibility: visible; +} + +.CodeMirror-selected { background: #d9d9d9; } +.CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; } + +.cm-searching { + background: #ffa; + background: rgba(255, 255, 0, .4); +} + +/* IE7 hack to prevent it from returning funny offsetTops on the spans */ +.CodeMirror span { *vertical-align: text-bottom; } + +@media print { + /* Hide the cursor when printing */ + .CodeMirror div.CodeMirror-cursor { + visibility: hidden; + } +} diff --git a/pitfall/pdfkit/node_modules/codemirror/lib/codemirror.js b/pitfall/pdfkit/node_modules/codemirror/lib/codemirror.js new file mode 100644 index 00000000..7b4fd001 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/lib/codemirror.js @@ -0,0 +1,5942 @@ +// CodeMirror is the only global var we claim +window.CodeMirror = (function() { + "use strict"; + + // BROWSER SNIFFING + + // Crude, but necessary to handle a number of hard-to-feature-detect + // bugs and behavior differences. + var gecko = /gecko\/\d/i.test(navigator.userAgent); + // IE11 currently doesn't count as 'ie', since it has almost none of + // the same bugs as earlier versions. Use ie_gt10 to handle + // incompatibilities in that version. + var ie = /MSIE \d/.test(navigator.userAgent); + var ie_lt8 = ie && (document.documentMode == null || document.documentMode < 8); + var ie_lt9 = ie && (document.documentMode == null || document.documentMode < 9); + var ie_gt10 = /Trident\/([7-9]|\d{2,})\./.test(navigator.userAgent); + var webkit = /WebKit\//.test(navigator.userAgent); + var qtwebkit = webkit && /Qt\/\d+\.\d+/.test(navigator.userAgent); + var chrome = /Chrome\//.test(navigator.userAgent); + var opera = /Opera\//.test(navigator.userAgent); + var safari = /Apple Computer/.test(navigator.vendor); + var khtml = /KHTML\//.test(navigator.userAgent); + var mac_geLion = /Mac OS X 1\d\D([7-9]|\d\d)\D/.test(navigator.userAgent); + var mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(navigator.userAgent); + var phantom = /PhantomJS/.test(navigator.userAgent); + + var ios = /AppleWebKit/.test(navigator.userAgent) && /Mobile\/\w+/.test(navigator.userAgent); + // This is woefully incomplete. Suggestions for alternative methods welcome. + var mobile = ios || /Android|webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(navigator.userAgent); + var mac = ios || /Mac/.test(navigator.platform); + var windows = /win/i.test(navigator.platform); + + var opera_version = opera && navigator.userAgent.match(/Version\/(\d*\.\d*)/); + if (opera_version) opera_version = Number(opera_version[1]); + if (opera_version && opera_version >= 15) { opera = false; webkit = true; } + // Some browsers use the wrong event properties to signal cmd/ctrl on OS X + var flipCtrlCmd = mac && (qtwebkit || opera && (opera_version == null || opera_version < 12.11)); + var captureMiddleClick = gecko || (ie && !ie_lt9); + + // Optimize some code when these features are not used + var sawReadOnlySpans = false, sawCollapsedSpans = false; + + // CONSTRUCTOR + + function CodeMirror(place, options) { + if (!(this instanceof CodeMirror)) return new CodeMirror(place, options); + + this.options = options = options || {}; + // Determine effective options based on given values and defaults. + for (var opt in defaults) if (!options.hasOwnProperty(opt) && defaults.hasOwnProperty(opt)) + options[opt] = defaults[opt]; + setGuttersForLineNumbers(options); + + var docStart = typeof options.value == "string" ? 0 : options.value.first; + var display = this.display = makeDisplay(place, docStart); + display.wrapper.CodeMirror = this; + updateGutters(this); + if (options.autofocus && !mobile) focusInput(this); + + this.state = {keyMaps: [], + overlays: [], + modeGen: 0, + overwrite: false, focused: false, + suppressEdits: false, pasteIncoming: false, + draggingText: false, + highlight: new Delayed()}; + + themeChanged(this); + if (options.lineWrapping) + this.display.wrapper.className += " CodeMirror-wrap"; + + var doc = options.value; + if (typeof doc == "string") doc = new Doc(options.value, options.mode); + operation(this, attachDoc)(this, doc); + + // Override magic textarea content restore that IE sometimes does + // on our hidden textarea on reload + if (ie) setTimeout(bind(resetInput, this, true), 20); + + registerEventHandlers(this); + // IE throws unspecified error in certain cases, when + // trying to access activeElement before onload + var hasFocus; try { hasFocus = (document.activeElement == display.input); } catch(e) { } + if (hasFocus || (options.autofocus && !mobile)) setTimeout(bind(onFocus, this), 20); + else onBlur(this); + + operation(this, function() { + for (var opt in optionHandlers) + if (optionHandlers.propertyIsEnumerable(opt)) + optionHandlers[opt](this, options[opt], Init); + for (var i = 0; i < initHooks.length; ++i) initHooks[i](this); + })(); + } + + // DISPLAY CONSTRUCTOR + + function makeDisplay(place, docStart) { + var d = {}; + + var input = d.input = elt("textarea", null, null, "position: absolute; padding: 0; width: 1px; height: 1em; outline: none; font-size: 4px;"); + if (webkit) input.style.width = "1000px"; + else input.setAttribute("wrap", "off"); + // if border: 0; -- iOS fails to open keyboard (issue #1287) + if (ios) input.style.border = "1px solid black"; + input.setAttribute("autocorrect", "off"); input.setAttribute("autocapitalize", "off"); input.setAttribute("spellcheck", "false"); + + // Wraps and hides input textarea + d.inputDiv = elt("div", [input], null, "overflow: hidden; position: relative; width: 3px; height: 0px;"); + // The actual fake scrollbars. + d.scrollbarH = elt("div", [elt("div", null, null, "height: 1px")], "CodeMirror-hscrollbar"); + d.scrollbarV = elt("div", [elt("div", null, null, "width: 1px")], "CodeMirror-vscrollbar"); + d.scrollbarFiller = elt("div", null, "CodeMirror-scrollbar-filler"); + d.gutterFiller = elt("div", null, "CodeMirror-gutter-filler"); + // DIVs containing the selection and the actual code + d.lineDiv = elt("div", null, "CodeMirror-code"); + d.selectionDiv = elt("div", null, null, "position: relative; z-index: 1"); + // Blinky cursor, and element used to ensure cursor fits at the end of a line + d.cursor = elt("div", "\u00a0", "CodeMirror-cursor"); + // Secondary cursor, shown when on a 'jump' in bi-directional text + d.otherCursor = elt("div", "\u00a0", "CodeMirror-cursor CodeMirror-secondarycursor"); + // Used to measure text size + d.measure = elt("div", null, "CodeMirror-measure"); + // Wraps everything that needs to exist inside the vertically-padded coordinate system + d.lineSpace = elt("div", [d.measure, d.selectionDiv, d.lineDiv, d.cursor, d.otherCursor], + null, "position: relative; outline: none"); + // Moved around its parent to cover visible view + d.mover = elt("div", [elt("div", [d.lineSpace], "CodeMirror-lines")], null, "position: relative"); + // Set to the height of the text, causes scrolling + d.sizer = elt("div", [d.mover], "CodeMirror-sizer"); + // D is needed because behavior of elts with overflow: auto and padding is inconsistent across browsers + d.heightForcer = elt("div", null, null, "position: absolute; height: " + scrollerCutOff + "px; width: 1px;"); + // Will contain the gutters, if any + d.gutters = elt("div", null, "CodeMirror-gutters"); + d.lineGutter = null; + // Provides scrolling + d.scroller = elt("div", [d.sizer, d.heightForcer, d.gutters], "CodeMirror-scroll"); + d.scroller.setAttribute("tabIndex", "-1"); + // The element in which the editor lives. + d.wrapper = elt("div", [d.inputDiv, d.scrollbarH, d.scrollbarV, + d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror"); + // Work around IE7 z-index bug + if (ie_lt8) { d.gutters.style.zIndex = -1; d.scroller.style.paddingRight = 0; } + if (place.appendChild) place.appendChild(d.wrapper); else place(d.wrapper); + + // Needed to hide big blue blinking cursor on Mobile Safari + if (ios) input.style.width = "0px"; + if (!webkit) d.scroller.draggable = true; + // Needed to handle Tab key in KHTML + if (khtml) { d.inputDiv.style.height = "1px"; d.inputDiv.style.position = "absolute"; } + // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8). + else if (ie_lt8) d.scrollbarH.style.minWidth = d.scrollbarV.style.minWidth = "18px"; + + // Current visible range (may be bigger than the view window). + d.viewOffset = d.lastSizeC = 0; + d.showingFrom = d.showingTo = docStart; + + // Used to only resize the line number gutter when necessary (when + // the amount of lines crosses a boundary that makes its width change) + d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null; + // See readInput and resetInput + d.prevInput = ""; + // Set to true when a non-horizontal-scrolling widget is added. As + // an optimization, widget aligning is skipped when d is false. + d.alignWidgets = false; + // Flag that indicates whether we currently expect input to appear + // (after some event like 'keypress' or 'input') and are polling + // intensively. + d.pollingFast = false; + // Self-resetting timeout for the poller + d.poll = new Delayed(); + + d.cachedCharWidth = d.cachedTextHeight = null; + d.measureLineCache = []; + d.measureLineCachePos = 0; + + // Tracks when resetInput has punted to just putting a short + // string instead of the (large) selection. + d.inaccurateSelection = false; + + // Tracks the maximum line length so that the horizontal scrollbar + // can be kept static when scrolling. + d.maxLine = null; + d.maxLineLength = 0; + d.maxLineChanged = false; + + // Used for measuring wheel scrolling granularity + d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null; + + return d; + } + + // STATE UPDATES + + // Used to get the editor into a consistent state again when options change. + + function loadMode(cm) { + cm.doc.mode = CodeMirror.getMode(cm.options, cm.doc.modeOption); + cm.doc.iter(function(line) { + if (line.stateAfter) line.stateAfter = null; + if (line.styles) line.styles = null; + }); + cm.doc.frontier = cm.doc.first; + startWorker(cm, 100); + cm.state.modeGen++; + if (cm.curOp) regChange(cm); + } + + function wrappingChanged(cm) { + if (cm.options.lineWrapping) { + cm.display.wrapper.className += " CodeMirror-wrap"; + cm.display.sizer.style.minWidth = ""; + } else { + cm.display.wrapper.className = cm.display.wrapper.className.replace(" CodeMirror-wrap", ""); + computeMaxLength(cm); + } + estimateLineHeights(cm); + regChange(cm); + clearCaches(cm); + setTimeout(function(){updateScrollbars(cm);}, 100); + } + + function estimateHeight(cm) { + var th = textHeight(cm.display), wrapping = cm.options.lineWrapping; + var perLine = wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3); + return function(line) { + if (lineIsHidden(cm.doc, line)) + return 0; + else if (wrapping) + return (Math.ceil(line.text.length / perLine) || 1) * th; + else + return th; + }; + } + + function estimateLineHeights(cm) { + var doc = cm.doc, est = estimateHeight(cm); + doc.iter(function(line) { + var estHeight = est(line); + if (estHeight != line.height) updateLineHeight(line, estHeight); + }); + } + + function keyMapChanged(cm) { + var map = keyMap[cm.options.keyMap], style = map.style; + cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-keymap-\S+/g, "") + + (style ? " cm-keymap-" + style : ""); + cm.state.disableInput = map.disableInput; + } + + function themeChanged(cm) { + cm.display.wrapper.className = cm.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") + + cm.options.theme.replace(/(^|\s)\s*/g, " cm-s-"); + clearCaches(cm); + } + + function guttersChanged(cm) { + updateGutters(cm); + regChange(cm); + setTimeout(function(){alignHorizontally(cm);}, 20); + } + + function updateGutters(cm) { + var gutters = cm.display.gutters, specs = cm.options.gutters; + removeChildren(gutters); + for (var i = 0; i < specs.length; ++i) { + var gutterClass = specs[i]; + var gElt = gutters.appendChild(elt("div", null, "CodeMirror-gutter " + gutterClass)); + if (gutterClass == "CodeMirror-linenumbers") { + cm.display.lineGutter = gElt; + gElt.style.width = (cm.display.lineNumWidth || 1) + "px"; + } + } + gutters.style.display = i ? "" : "none"; + } + + function lineLength(doc, line) { + if (line.height == 0) return 0; + var len = line.text.length, merged, cur = line; + while (merged = collapsedSpanAtStart(cur)) { + var found = merged.find(); + cur = getLine(doc, found.from.line); + len += found.from.ch - found.to.ch; + } + cur = line; + while (merged = collapsedSpanAtEnd(cur)) { + var found = merged.find(); + len -= cur.text.length - found.from.ch; + cur = getLine(doc, found.to.line); + len += cur.text.length - found.to.ch; + } + return len; + } + + function computeMaxLength(cm) { + var d = cm.display, doc = cm.doc; + d.maxLine = getLine(doc, doc.first); + d.maxLineLength = lineLength(doc, d.maxLine); + d.maxLineChanged = true; + doc.iter(function(line) { + var len = lineLength(doc, line); + if (len > d.maxLineLength) { + d.maxLineLength = len; + d.maxLine = line; + } + }); + } + + // Make sure the gutters options contains the element + // "CodeMirror-linenumbers" when the lineNumbers option is true. + function setGuttersForLineNumbers(options) { + var found = indexOf(options.gutters, "CodeMirror-linenumbers"); + if (found == -1 && options.lineNumbers) { + options.gutters = options.gutters.concat(["CodeMirror-linenumbers"]); + } else if (found > -1 && !options.lineNumbers) { + options.gutters = options.gutters.slice(0); + options.gutters.splice(found, 1); + } + } + + // SCROLLBARS + + // Re-synchronize the fake scrollbars with the actual size of the + // content. Optionally force a scrollTop. + function updateScrollbars(cm) { + var d = cm.display, docHeight = cm.doc.height; + var totalHeight = docHeight + paddingVert(d); + d.sizer.style.minHeight = d.heightForcer.style.top = totalHeight + "px"; + d.gutters.style.height = Math.max(totalHeight, d.scroller.clientHeight - scrollerCutOff) + "px"; + var scrollHeight = Math.max(totalHeight, d.scroller.scrollHeight); + var needsH = d.scroller.scrollWidth > (d.scroller.clientWidth + 1); + var needsV = scrollHeight > (d.scroller.clientHeight + 1); + if (needsV) { + d.scrollbarV.style.display = "block"; + d.scrollbarV.style.bottom = needsH ? scrollbarWidth(d.measure) + "px" : "0"; + d.scrollbarV.firstChild.style.height = + (scrollHeight - d.scroller.clientHeight + d.scrollbarV.clientHeight) + "px"; + } else { + d.scrollbarV.style.display = ""; + d.scrollbarV.firstChild.style.height = "0"; + } + if (needsH) { + d.scrollbarH.style.display = "block"; + d.scrollbarH.style.right = needsV ? scrollbarWidth(d.measure) + "px" : "0"; + d.scrollbarH.firstChild.style.width = + (d.scroller.scrollWidth - d.scroller.clientWidth + d.scrollbarH.clientWidth) + "px"; + } else { + d.scrollbarH.style.display = ""; + d.scrollbarH.firstChild.style.width = "0"; + } + if (needsH && needsV) { + d.scrollbarFiller.style.display = "block"; + d.scrollbarFiller.style.height = d.scrollbarFiller.style.width = scrollbarWidth(d.measure) + "px"; + } else d.scrollbarFiller.style.display = ""; + if (needsH && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) { + d.gutterFiller.style.display = "block"; + d.gutterFiller.style.height = scrollbarWidth(d.measure) + "px"; + d.gutterFiller.style.width = d.gutters.offsetWidth + "px"; + } else d.gutterFiller.style.display = ""; + + if (mac_geLion && scrollbarWidth(d.measure) === 0) { + d.scrollbarV.style.minWidth = d.scrollbarH.style.minHeight = mac_geMountainLion ? "18px" : "12px"; + d.scrollbarV.style.pointerEvents = d.scrollbarH.style.pointerEvents = "none"; + } + } + + function visibleLines(display, doc, viewPort) { + var top = display.scroller.scrollTop, height = display.wrapper.clientHeight; + if (typeof viewPort == "number") top = viewPort; + else if (viewPort) {top = viewPort.top; height = viewPort.bottom - viewPort.top;} + top = Math.floor(top - paddingTop(display)); + var bottom = Math.ceil(top + height); + return {from: lineAtHeight(doc, top), to: lineAtHeight(doc, bottom)}; + } + + // LINE NUMBERS + + function alignHorizontally(cm) { + var display = cm.display; + if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) return; + var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft; + var gutterW = display.gutters.offsetWidth, l = comp + "px"; + for (var n = display.lineDiv.firstChild; n; n = n.nextSibling) if (n.alignable) { + for (var i = 0, a = n.alignable; i < a.length; ++i) a[i].style.left = l; + } + if (cm.options.fixedGutter) + display.gutters.style.left = (comp + gutterW) + "px"; + } + + function maybeUpdateLineNumberWidth(cm) { + if (!cm.options.lineNumbers) return false; + var doc = cm.doc, last = lineNumberFor(cm.options, doc.first + doc.size - 1), display = cm.display; + if (last.length != display.lineNumChars) { + var test = display.measure.appendChild(elt("div", [elt("div", last)], + "CodeMirror-linenumber CodeMirror-gutter-elt")); + var innerW = test.firstChild.offsetWidth, padding = test.offsetWidth - innerW; + display.lineGutter.style.width = ""; + display.lineNumInnerWidth = Math.max(innerW, display.lineGutter.offsetWidth - padding); + display.lineNumWidth = display.lineNumInnerWidth + padding; + display.lineNumChars = display.lineNumInnerWidth ? last.length : -1; + display.lineGutter.style.width = display.lineNumWidth + "px"; + return true; + } + return false; + } + + function lineNumberFor(options, i) { + return String(options.lineNumberFormatter(i + options.firstLineNumber)); + } + function compensateForHScroll(display) { + return getRect(display.scroller).left - getRect(display.sizer).left; + } + + // DISPLAY DRAWING + + function updateDisplay(cm, changes, viewPort, forced) { + var oldFrom = cm.display.showingFrom, oldTo = cm.display.showingTo, updated; + var visible = visibleLines(cm.display, cm.doc, viewPort); + for (var first = true;; first = false) { + var oldWidth = cm.display.scroller.clientWidth; + if (!updateDisplayInner(cm, changes, visible, forced)) break; + updated = true; + changes = []; + updateSelection(cm); + updateScrollbars(cm); + if (first && cm.options.lineWrapping && oldWidth != cm.display.scroller.clientWidth) { + forced = true; + continue; + } + forced = false; + + // Clip forced viewport to actual scrollable area + if (viewPort) + viewPort = Math.min(cm.display.scroller.scrollHeight - cm.display.scroller.clientHeight, + typeof viewPort == "number" ? viewPort : viewPort.top); + visible = visibleLines(cm.display, cm.doc, viewPort); + if (visible.from >= cm.display.showingFrom && visible.to <= cm.display.showingTo) + break; + } + + if (updated) { + signalLater(cm, "update", cm); + if (cm.display.showingFrom != oldFrom || cm.display.showingTo != oldTo) + signalLater(cm, "viewportChange", cm, cm.display.showingFrom, cm.display.showingTo); + } + return updated; + } + + // Uses a set of changes plus the current scroll position to + // determine which DOM updates have to be made, and makes the + // updates. + function updateDisplayInner(cm, changes, visible, forced) { + var display = cm.display, doc = cm.doc; + if (!display.wrapper.clientWidth) { + display.showingFrom = display.showingTo = doc.first; + display.viewOffset = 0; + return; + } + + // Bail out if the visible area is already rendered and nothing changed. + if (!forced && changes.length == 0 && + visible.from > display.showingFrom && visible.to < display.showingTo) + return; + + if (maybeUpdateLineNumberWidth(cm)) + changes = [{from: doc.first, to: doc.first + doc.size}]; + var gutterW = display.sizer.style.marginLeft = display.gutters.offsetWidth + "px"; + display.scrollbarH.style.left = cm.options.fixedGutter ? gutterW : "0"; + + // Used to determine which lines need their line numbers updated + var positionsChangedFrom = Infinity; + if (cm.options.lineNumbers) + for (var i = 0; i < changes.length; ++i) + if (changes[i].diff && changes[i].from < positionsChangedFrom) { positionsChangedFrom = changes[i].from; } + + var end = doc.first + doc.size; + var from = Math.max(visible.from - cm.options.viewportMargin, doc.first); + var to = Math.min(end, visible.to + cm.options.viewportMargin); + if (display.showingFrom < from && from - display.showingFrom < 20) from = Math.max(doc.first, display.showingFrom); + if (display.showingTo > to && display.showingTo - to < 20) to = Math.min(end, display.showingTo); + if (sawCollapsedSpans) { + from = lineNo(visualLine(doc, getLine(doc, from))); + while (to < end && lineIsHidden(doc, getLine(doc, to))) ++to; + } + + // Create a range of theoretically intact lines, and punch holes + // in that using the change info. + var intact = [{from: Math.max(display.showingFrom, doc.first), + to: Math.min(display.showingTo, end)}]; + if (intact[0].from >= intact[0].to) intact = []; + else intact = computeIntact(intact, changes); + // When merged lines are present, we might have to reduce the + // intact ranges because changes in continued fragments of the + // intact lines do require the lines to be redrawn. + if (sawCollapsedSpans) + for (var i = 0; i < intact.length; ++i) { + var range = intact[i], merged; + while (merged = collapsedSpanAtEnd(getLine(doc, range.to - 1))) { + var newTo = merged.find().from.line; + if (newTo > range.from) range.to = newTo; + else { intact.splice(i--, 1); break; } + } + } + + // Clip off the parts that won't be visible + var intactLines = 0; + for (var i = 0; i < intact.length; ++i) { + var range = intact[i]; + if (range.from < from) range.from = from; + if (range.to > to) range.to = to; + if (range.from >= range.to) intact.splice(i--, 1); + else intactLines += range.to - range.from; + } + if (!forced && intactLines == to - from && from == display.showingFrom && to == display.showingTo) { + updateViewOffset(cm); + return; + } + intact.sort(function(a, b) {return a.from - b.from;}); + + // Avoid crashing on IE's "unspecified error" when in iframes + try { + var focused = document.activeElement; + } catch(e) {} + if (intactLines < (to - from) * .7) display.lineDiv.style.display = "none"; + patchDisplay(cm, from, to, intact, positionsChangedFrom); + display.lineDiv.style.display = ""; + if (focused && document.activeElement != focused && focused.offsetHeight) focused.focus(); + + var different = from != display.showingFrom || to != display.showingTo || + display.lastSizeC != display.wrapper.clientHeight; + // This is just a bogus formula that detects when the editor is + // resized or the font size changes. + if (different) { + display.lastSizeC = display.wrapper.clientHeight; + startWorker(cm, 400); + } + display.showingFrom = from; display.showingTo = to; + + updateHeightsInViewport(cm); + updateViewOffset(cm); + + return true; + } + + function updateHeightsInViewport(cm) { + var display = cm.display; + var prevBottom = display.lineDiv.offsetTop; + for (var node = display.lineDiv.firstChild, height; node; node = node.nextSibling) if (node.lineObj) { + if (ie_lt8) { + var bot = node.offsetTop + node.offsetHeight; + height = bot - prevBottom; + prevBottom = bot; + } else { + var box = getRect(node); + height = box.bottom - box.top; + } + var diff = node.lineObj.height - height; + if (height < 2) height = textHeight(display); + if (diff > .001 || diff < -.001) { + updateLineHeight(node.lineObj, height); + var widgets = node.lineObj.widgets; + if (widgets) for (var i = 0; i < widgets.length; ++i) + widgets[i].height = widgets[i].node.offsetHeight; + } + } + } + + function updateViewOffset(cm) { + var off = cm.display.viewOffset = heightAtLine(cm, getLine(cm.doc, cm.display.showingFrom)); + // Position the mover div to align with the current virtual scroll position + cm.display.mover.style.top = off + "px"; + } + + function computeIntact(intact, changes) { + for (var i = 0, l = changes.length || 0; i < l; ++i) { + var change = changes[i], intact2 = [], diff = change.diff || 0; + for (var j = 0, l2 = intact.length; j < l2; ++j) { + var range = intact[j]; + if (change.to <= range.from && change.diff) { + intact2.push({from: range.from + diff, to: range.to + diff}); + } else if (change.to <= range.from || change.from >= range.to) { + intact2.push(range); + } else { + if (change.from > range.from) + intact2.push({from: range.from, to: change.from}); + if (change.to < range.to) + intact2.push({from: change.to + diff, to: range.to + diff}); + } + } + intact = intact2; + } + return intact; + } + + function getDimensions(cm) { + var d = cm.display, left = {}, width = {}; + for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) { + left[cm.options.gutters[i]] = n.offsetLeft; + width[cm.options.gutters[i]] = n.offsetWidth; + } + return {fixedPos: compensateForHScroll(d), + gutterTotalWidth: d.gutters.offsetWidth, + gutterLeft: left, + gutterWidth: width, + wrapperWidth: d.wrapper.clientWidth}; + } + + function patchDisplay(cm, from, to, intact, updateNumbersFrom) { + var dims = getDimensions(cm); + var display = cm.display, lineNumbers = cm.options.lineNumbers; + if (!intact.length && (!webkit || !cm.display.currentWheelTarget)) + removeChildren(display.lineDiv); + var container = display.lineDiv, cur = container.firstChild; + + function rm(node) { + var next = node.nextSibling; + if (webkit && mac && cm.display.currentWheelTarget == node) { + node.style.display = "none"; + node.lineObj = null; + } else { + node.parentNode.removeChild(node); + } + return next; + } + + var nextIntact = intact.shift(), lineN = from; + cm.doc.iter(from, to, function(line) { + if (nextIntact && nextIntact.to == lineN) nextIntact = intact.shift(); + if (lineIsHidden(cm.doc, line)) { + if (line.height != 0) updateLineHeight(line, 0); + if (line.widgets && cur && cur.previousSibling) for (var i = 0; i < line.widgets.length; ++i) { + var w = line.widgets[i]; + if (w.showIfHidden) { + var prev = cur.previousSibling; + if (/pre/i.test(prev.nodeName)) { + var wrap = elt("div", null, null, "position: relative"); + prev.parentNode.replaceChild(wrap, prev); + wrap.appendChild(prev); + prev = wrap; + } + var wnode = prev.appendChild(elt("div", [w.node], "CodeMirror-linewidget")); + if (!w.handleMouseEvents) wnode.ignoreEvents = true; + positionLineWidget(w, wnode, prev, dims); + } + } + } else if (nextIntact && nextIntact.from <= lineN && nextIntact.to > lineN) { + // This line is intact. Skip to the actual node. Update its + // line number if needed. + while (cur.lineObj != line) cur = rm(cur); + if (lineNumbers && updateNumbersFrom <= lineN && cur.lineNumber) + setTextContent(cur.lineNumber, lineNumberFor(cm.options, lineN)); + cur = cur.nextSibling; + } else { + // For lines with widgets, make an attempt to find and reuse + // the existing element, so that widgets aren't needlessly + // removed and re-inserted into the dom + if (line.widgets) for (var j = 0, search = cur, reuse; search && j < 20; ++j, search = search.nextSibling) + if (search.lineObj == line && /div/i.test(search.nodeName)) { reuse = search; break; } + // This line needs to be generated. + var lineNode = buildLineElement(cm, line, lineN, dims, reuse); + if (lineNode != reuse) { + container.insertBefore(lineNode, cur); + } else { + while (cur != reuse) cur = rm(cur); + cur = cur.nextSibling; + } + + lineNode.lineObj = line; + } + ++lineN; + }); + while (cur) cur = rm(cur); + } + + function buildLineElement(cm, line, lineNo, dims, reuse) { + var built = buildLineContent(cm, line), lineElement = built.pre; + var markers = line.gutterMarkers, display = cm.display, wrap; + + var bgClass = built.bgClass ? built.bgClass + " " + (line.bgClass || "") : line.bgClass; + if (!cm.options.lineNumbers && !markers && !bgClass && !line.wrapClass && !line.widgets) + return lineElement; + + // Lines with gutter elements, widgets or a background class need + // to be wrapped again, and have the extra elements added to the + // wrapper div + + if (reuse) { + reuse.alignable = null; + var isOk = true, widgetsSeen = 0, insertBefore = null; + for (var n = reuse.firstChild, next; n; n = next) { + next = n.nextSibling; + if (!/\bCodeMirror-linewidget\b/.test(n.className)) { + reuse.removeChild(n); + } else { + for (var i = 0; i < line.widgets.length; ++i) { + var widget = line.widgets[i]; + if (widget.node == n.firstChild) { + if (!widget.above && !insertBefore) insertBefore = n; + positionLineWidget(widget, n, reuse, dims); + ++widgetsSeen; + break; + } + } + if (i == line.widgets.length) { isOk = false; break; } + } + } + reuse.insertBefore(lineElement, insertBefore); + if (isOk && widgetsSeen == line.widgets.length) { + wrap = reuse; + reuse.className = line.wrapClass || ""; + } + } + if (!wrap) { + wrap = elt("div", null, line.wrapClass, "position: relative"); + wrap.appendChild(lineElement); + } + // Kludge to make sure the styled element lies behind the selection (by z-index) + if (bgClass) + wrap.insertBefore(elt("div", null, bgClass + " CodeMirror-linebackground"), wrap.firstChild); + if (cm.options.lineNumbers || markers) { + var gutterWrap = wrap.insertBefore(elt("div", null, null, "position: absolute; left: " + + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px"), + wrap.firstChild); + if (cm.options.fixedGutter) (wrap.alignable || (wrap.alignable = [])).push(gutterWrap); + if (cm.options.lineNumbers && (!markers || !markers["CodeMirror-linenumbers"])) + wrap.lineNumber = gutterWrap.appendChild( + elt("div", lineNumberFor(cm.options, lineNo), + "CodeMirror-linenumber CodeMirror-gutter-elt", + "left: " + dims.gutterLeft["CodeMirror-linenumbers"] + "px; width: " + + display.lineNumInnerWidth + "px")); + if (markers) + for (var k = 0; k < cm.options.gutters.length; ++k) { + var id = cm.options.gutters[k], found = markers.hasOwnProperty(id) && markers[id]; + if (found) + gutterWrap.appendChild(elt("div", [found], "CodeMirror-gutter-elt", "left: " + + dims.gutterLeft[id] + "px; width: " + dims.gutterWidth[id] + "px")); + } + } + if (ie_lt8) wrap.style.zIndex = 2; + if (line.widgets && wrap != reuse) for (var i = 0, ws = line.widgets; i < ws.length; ++i) { + var widget = ws[i], node = elt("div", [widget.node], "CodeMirror-linewidget"); + if (!widget.handleMouseEvents) node.ignoreEvents = true; + positionLineWidget(widget, node, wrap, dims); + if (widget.above) + wrap.insertBefore(node, cm.options.lineNumbers && line.height != 0 ? gutterWrap : lineElement); + else + wrap.appendChild(node); + signalLater(widget, "redraw"); + } + return wrap; + } + + function positionLineWidget(widget, node, wrap, dims) { + if (widget.noHScroll) { + (wrap.alignable || (wrap.alignable = [])).push(node); + var width = dims.wrapperWidth; + node.style.left = dims.fixedPos + "px"; + if (!widget.coverGutter) { + width -= dims.gutterTotalWidth; + node.style.paddingLeft = dims.gutterTotalWidth + "px"; + } + node.style.width = width + "px"; + } + if (widget.coverGutter) { + node.style.zIndex = 5; + node.style.position = "relative"; + if (!widget.noHScroll) node.style.marginLeft = -dims.gutterTotalWidth + "px"; + } + } + + // SELECTION / CURSOR + + function updateSelection(cm) { + var display = cm.display; + var collapsed = posEq(cm.doc.sel.from, cm.doc.sel.to); + if (collapsed || cm.options.showCursorWhenSelecting) + updateSelectionCursor(cm); + else + display.cursor.style.display = display.otherCursor.style.display = "none"; + if (!collapsed) + updateSelectionRange(cm); + else + display.selectionDiv.style.display = "none"; + + // Move the hidden textarea near the cursor to prevent scrolling artifacts + if (cm.options.moveInputWithCursor) { + var headPos = cursorCoords(cm, cm.doc.sel.head, "div"); + var wrapOff = getRect(display.wrapper), lineOff = getRect(display.lineDiv); + display.inputDiv.style.top = Math.max(0, Math.min(display.wrapper.clientHeight - 10, + headPos.top + lineOff.top - wrapOff.top)) + "px"; + display.inputDiv.style.left = Math.max(0, Math.min(display.wrapper.clientWidth - 10, + headPos.left + lineOff.left - wrapOff.left)) + "px"; + } + } + + // No selection, plain cursor + function updateSelectionCursor(cm) { + var display = cm.display, pos = cursorCoords(cm, cm.doc.sel.head, "div"); + display.cursor.style.left = pos.left + "px"; + display.cursor.style.top = pos.top + "px"; + display.cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + "px"; + display.cursor.style.display = ""; + + if (pos.other) { + display.otherCursor.style.display = ""; + display.otherCursor.style.left = pos.other.left + "px"; + display.otherCursor.style.top = pos.other.top + "px"; + display.otherCursor.style.height = (pos.other.bottom - pos.other.top) * .85 + "px"; + } else { display.otherCursor.style.display = "none"; } + } + + // Highlight selection + function updateSelectionRange(cm) { + var display = cm.display, doc = cm.doc, sel = cm.doc.sel; + var fragment = document.createDocumentFragment(); + var clientWidth = display.lineSpace.offsetWidth, pl = paddingLeft(cm.display); + + function add(left, top, width, bottom) { + if (top < 0) top = 0; + fragment.appendChild(elt("div", null, "CodeMirror-selected", "position: absolute; left: " + left + + "px; top: " + top + "px; width: " + (width == null ? clientWidth - left : width) + + "px; height: " + (bottom - top) + "px")); + } + + function drawForLine(line, fromArg, toArg) { + var lineObj = getLine(doc, line); + var lineLen = lineObj.text.length; + var start, end; + function coords(ch, bias) { + return charCoords(cm, Pos(line, ch), "div", lineObj, bias); + } + + iterateBidiSections(getOrder(lineObj), fromArg || 0, toArg == null ? lineLen : toArg, function(from, to, dir) { + var leftPos = coords(from, "left"), rightPos, left, right; + if (from == to) { + rightPos = leftPos; + left = right = leftPos.left; + } else { + rightPos = coords(to - 1, "right"); + if (dir == "rtl") { var tmp = leftPos; leftPos = rightPos; rightPos = tmp; } + left = leftPos.left; + right = rightPos.right; + } + if (fromArg == null && from == 0) left = pl; + if (rightPos.top - leftPos.top > 3) { // Different lines, draw top part + add(left, leftPos.top, null, leftPos.bottom); + left = pl; + if (leftPos.bottom < rightPos.top) add(left, leftPos.bottom, null, rightPos.top); + } + if (toArg == null && to == lineLen) right = clientWidth; + if (!start || leftPos.top < start.top || leftPos.top == start.top && leftPos.left < start.left) + start = leftPos; + if (!end || rightPos.bottom > end.bottom || rightPos.bottom == end.bottom && rightPos.right > end.right) + end = rightPos; + if (left < pl + 1) left = pl; + add(left, rightPos.top, right - left, rightPos.bottom); + }); + return {start: start, end: end}; + } + + if (sel.from.line == sel.to.line) { + drawForLine(sel.from.line, sel.from.ch, sel.to.ch); + } else { + var fromLine = getLine(doc, sel.from.line), toLine = getLine(doc, sel.to.line); + var singleVLine = visualLine(doc, fromLine) == visualLine(doc, toLine); + var leftEnd = drawForLine(sel.from.line, sel.from.ch, singleVLine ? fromLine.text.length : null).end; + var rightStart = drawForLine(sel.to.line, singleVLine ? 0 : null, sel.to.ch).start; + if (singleVLine) { + if (leftEnd.top < rightStart.top - 2) { + add(leftEnd.right, leftEnd.top, null, leftEnd.bottom); + add(pl, rightStart.top, rightStart.left, rightStart.bottom); + } else { + add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom); + } + } + if (leftEnd.bottom < rightStart.top) + add(pl, leftEnd.bottom, null, rightStart.top); + } + + removeChildrenAndAdd(display.selectionDiv, fragment); + display.selectionDiv.style.display = ""; + } + + // Cursor-blinking + function restartBlink(cm) { + if (!cm.state.focused) return; + var display = cm.display; + clearInterval(display.blinker); + var on = true; + display.cursor.style.visibility = display.otherCursor.style.visibility = ""; + if (cm.options.cursorBlinkRate > 0) + display.blinker = setInterval(function() { + display.cursor.style.visibility = display.otherCursor.style.visibility = (on = !on) ? "" : "hidden"; + }, cm.options.cursorBlinkRate); + } + + // HIGHLIGHT WORKER + + function startWorker(cm, time) { + if (cm.doc.mode.startState && cm.doc.frontier < cm.display.showingTo) + cm.state.highlight.set(time, bind(highlightWorker, cm)); + } + + function highlightWorker(cm) { + var doc = cm.doc; + if (doc.frontier < doc.first) doc.frontier = doc.first; + if (doc.frontier >= cm.display.showingTo) return; + var end = +new Date + cm.options.workTime; + var state = copyState(doc.mode, getStateBefore(cm, doc.frontier)); + var changed = [], prevChange; + doc.iter(doc.frontier, Math.min(doc.first + doc.size, cm.display.showingTo + 500), function(line) { + if (doc.frontier >= cm.display.showingFrom) { // Visible + var oldStyles = line.styles; + line.styles = highlightLine(cm, line, state, true); + var ischange = !oldStyles || oldStyles.length != line.styles.length; + for (var i = 0; !ischange && i < oldStyles.length; ++i) ischange = oldStyles[i] != line.styles[i]; + if (ischange) { + if (prevChange && prevChange.end == doc.frontier) prevChange.end++; + else changed.push(prevChange = {start: doc.frontier, end: doc.frontier + 1}); + } + line.stateAfter = copyState(doc.mode, state); + } else { + processLine(cm, line.text, state); + line.stateAfter = doc.frontier % 5 == 0 ? copyState(doc.mode, state) : null; + } + ++doc.frontier; + if (+new Date > end) { + startWorker(cm, cm.options.workDelay); + return true; + } + }); + if (changed.length) + operation(cm, function() { + for (var i = 0; i < changed.length; ++i) + regChange(this, changed[i].start, changed[i].end); + })(); + } + + // Finds the line to start with when starting a parse. Tries to + // find a line with a stateAfter, so that it can start with a + // valid state. If that fails, it returns the line with the + // smallest indentation, which tends to need the least context to + // parse correctly. + function findStartLine(cm, n, precise) { + var minindent, minline, doc = cm.doc; + var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100); + for (var search = n; search > lim; --search) { + if (search <= doc.first) return doc.first; + var line = getLine(doc, search - 1); + if (line.stateAfter && (!precise || search <= doc.frontier)) return search; + var indented = countColumn(line.text, null, cm.options.tabSize); + if (minline == null || minindent > indented) { + minline = search - 1; + minindent = indented; + } + } + return minline; + } + + function getStateBefore(cm, n, precise) { + var doc = cm.doc, display = cm.display; + if (!doc.mode.startState) return true; + var pos = findStartLine(cm, n, precise), state = pos > doc.first && getLine(doc, pos-1).stateAfter; + if (!state) state = startState(doc.mode); + else state = copyState(doc.mode, state); + doc.iter(pos, n, function(line) { + processLine(cm, line.text, state); + var save = pos == n - 1 || pos % 5 == 0 || pos >= display.showingFrom && pos < display.showingTo; + line.stateAfter = save ? copyState(doc.mode, state) : null; + ++pos; + }); + if (precise) doc.frontier = pos; + return state; + } + + // POSITION MEASUREMENT + + function paddingTop(display) {return display.lineSpace.offsetTop;} + function paddingVert(display) {return display.mover.offsetHeight - display.lineSpace.offsetHeight;} + function paddingLeft(display) { + var e = removeChildrenAndAdd(display.measure, elt("pre", null, null, "text-align: left")).appendChild(elt("span", "x")); + return e.offsetLeft; + } + + function measureChar(cm, line, ch, data, bias) { + var dir = -1; + data = data || measureLine(cm, line); + if (data.crude) { + var left = data.left + ch * data.width; + return {left: left, right: left + data.width, top: data.top, bottom: data.bottom}; + } + + for (var pos = ch;; pos += dir) { + var r = data[pos]; + if (r) break; + if (dir < 0 && pos == 0) dir = 1; + } + bias = pos > ch ? "left" : pos < ch ? "right" : bias; + if (bias == "left" && r.leftSide) r = r.leftSide; + else if (bias == "right" && r.rightSide) r = r.rightSide; + return {left: pos < ch ? r.right : r.left, + right: pos > ch ? r.left : r.right, + top: r.top, + bottom: r.bottom}; + } + + function findCachedMeasurement(cm, line) { + var cache = cm.display.measureLineCache; + for (var i = 0; i < cache.length; ++i) { + var memo = cache[i]; + if (memo.text == line.text && memo.markedSpans == line.markedSpans && + cm.display.scroller.clientWidth == memo.width && + memo.classes == line.textClass + "|" + line.wrapClass) + return memo; + } + } + + function clearCachedMeasurement(cm, line) { + var exists = findCachedMeasurement(cm, line); + if (exists) exists.text = exists.measure = exists.markedSpans = null; + } + + function measureLine(cm, line) { + // First look in the cache + var cached = findCachedMeasurement(cm, line); + if (cached) return cached.measure; + + // Failing that, recompute and store result in cache + var measure = measureLineInner(cm, line); + var cache = cm.display.measureLineCache; + var memo = {text: line.text, width: cm.display.scroller.clientWidth, + markedSpans: line.markedSpans, measure: measure, + classes: line.textClass + "|" + line.wrapClass}; + if (cache.length == 16) cache[++cm.display.measureLineCachePos % 16] = memo; + else cache.push(memo); + return measure; + } + + function measureLineInner(cm, line) { + if (!cm.options.lineWrapping && line.text.length >= cm.options.crudeMeasuringFrom) + return crudelyMeasureLine(cm, line); + + var display = cm.display, measure = emptyArray(line.text.length); + var pre = buildLineContent(cm, line, measure, true).pre; + + // IE does not cache element positions of inline elements between + // calls to getBoundingClientRect. This makes the loop below, + // which gathers the positions of all the characters on the line, + // do an amount of layout work quadratic to the number of + // characters. When line wrapping is off, we try to improve things + // by first subdividing the line into a bunch of inline blocks, so + // that IE can reuse most of the layout information from caches + // for those blocks. This does interfere with line wrapping, so it + // doesn't work when wrapping is on, but in that case the + // situation is slightly better, since IE does cache line-wrapping + // information and only recomputes per-line. + if (ie && !ie_lt8 && !cm.options.lineWrapping && pre.childNodes.length > 100) { + var fragment = document.createDocumentFragment(); + var chunk = 10, n = pre.childNodes.length; + for (var i = 0, chunks = Math.ceil(n / chunk); i < chunks; ++i) { + var wrap = elt("div", null, null, "display: inline-block"); + for (var j = 0; j < chunk && n; ++j) { + wrap.appendChild(pre.firstChild); + --n; + } + fragment.appendChild(wrap); + } + pre.appendChild(fragment); + } + + removeChildrenAndAdd(display.measure, pre); + + var outer = getRect(display.lineDiv); + var vranges = [], data = emptyArray(line.text.length), maxBot = pre.offsetHeight; + // Work around an IE7/8 bug where it will sometimes have randomly + // replaced our pre with a clone at this point. + if (ie_lt9 && display.measure.first != pre) + removeChildrenAndAdd(display.measure, pre); + + function measureRect(rect) { + var top = rect.top - outer.top, bot = rect.bottom - outer.top; + if (bot > maxBot) bot = maxBot; + if (top < 0) top = 0; + for (var i = vranges.length - 2; i >= 0; i -= 2) { + var rtop = vranges[i], rbot = vranges[i+1]; + if (rtop > bot || rbot < top) continue; + if (rtop <= top && rbot >= bot || + top <= rtop && bot >= rbot || + Math.min(bot, rbot) - Math.max(top, rtop) >= (bot - top) >> 1) { + vranges[i] = Math.min(top, rtop); + vranges[i+1] = Math.max(bot, rbot); + break; + } + } + if (i < 0) { i = vranges.length; vranges.push(top, bot); } + return {left: rect.left - outer.left, + right: rect.right - outer.left, + top: i, bottom: null}; + } + function finishRect(rect) { + rect.bottom = vranges[rect.top+1]; + rect.top = vranges[rect.top]; + } + + for (var i = 0, cur; i < measure.length; ++i) if (cur = measure[i]) { + var node = cur, rect = null; + // A widget might wrap, needs special care + if (/\bCodeMirror-widget\b/.test(cur.className) && cur.getClientRects) { + if (cur.firstChild.nodeType == 1) node = cur.firstChild; + var rects = node.getClientRects(); + if (rects.length > 1) { + rect = data[i] = measureRect(rects[0]); + rect.rightSide = measureRect(rects[rects.length - 1]); + } + } + if (!rect) rect = data[i] = measureRect(getRect(node)); + if (cur.measureRight) rect.right = getRect(cur.measureRight).left; + if (cur.leftSide) rect.leftSide = measureRect(getRect(cur.leftSide)); + } + removeChildren(cm.display.measure); + for (var i = 0, cur; i < data.length; ++i) if (cur = data[i]) { + finishRect(cur); + if (cur.leftSide) finishRect(cur.leftSide); + if (cur.rightSide) finishRect(cur.rightSide); + } + return data; + } + + function crudelyMeasureLine(cm, line) { + var copy = new Line(line.text.slice(0, 100), null); + if (line.textClass) copy.textClass = line.textClass; + var measure = measureLineInner(cm, copy); + var left = measureChar(cm, copy, 0, measure, "left"); + var right = measureChar(cm, copy, 99, measure, "right"); + return {crude: true, top: left.top, left: left.left, bottom: left.bottom, width: (right.right - left.left) / 100}; + } + + function measureLineWidth(cm, line) { + var hasBadSpan = false; + if (line.markedSpans) for (var i = 0; i < line.markedSpans; ++i) { + var sp = line.markedSpans[i]; + if (sp.collapsed && (sp.to == null || sp.to == line.text.length)) hasBadSpan = true; + } + var cached = !hasBadSpan && findCachedMeasurement(cm, line); + if (cached || line.text.length >= cm.options.crudeMeasuringFrom) + return measureChar(cm, line, line.text.length, cached && cached.measure, "right").right; + + var pre = buildLineContent(cm, line, null, true).pre; + var end = pre.appendChild(zeroWidthElement(cm.display.measure)); + removeChildrenAndAdd(cm.display.measure, pre); + return getRect(end).right - getRect(cm.display.lineDiv).left; + } + + function clearCaches(cm) { + cm.display.measureLineCache.length = cm.display.measureLineCachePos = 0; + cm.display.cachedCharWidth = cm.display.cachedTextHeight = null; + if (!cm.options.lineWrapping) cm.display.maxLineChanged = true; + cm.display.lineNumChars = null; + } + + function pageScrollX() { return window.pageXOffset || (document.documentElement || document.body).scrollLeft; } + function pageScrollY() { return window.pageYOffset || (document.documentElement || document.body).scrollTop; } + + // Context is one of "line", "div" (display.lineDiv), "local"/null (editor), or "page" + function intoCoordSystem(cm, lineObj, rect, context) { + if (lineObj.widgets) for (var i = 0; i < lineObj.widgets.length; ++i) if (lineObj.widgets[i].above) { + var size = widgetHeight(lineObj.widgets[i]); + rect.top += size; rect.bottom += size; + } + if (context == "line") return rect; + if (!context) context = "local"; + var yOff = heightAtLine(cm, lineObj); + if (context == "local") yOff += paddingTop(cm.display); + else yOff -= cm.display.viewOffset; + if (context == "page" || context == "window") { + var lOff = getRect(cm.display.lineSpace); + yOff += lOff.top + (context == "window" ? 0 : pageScrollY()); + var xOff = lOff.left + (context == "window" ? 0 : pageScrollX()); + rect.left += xOff; rect.right += xOff; + } + rect.top += yOff; rect.bottom += yOff; + return rect; + } + + // Context may be "window", "page", "div", or "local"/null + // Result is in "div" coords + function fromCoordSystem(cm, coords, context) { + if (context == "div") return coords; + var left = coords.left, top = coords.top; + // First move into "page" coordinate system + if (context == "page") { + left -= pageScrollX(); + top -= pageScrollY(); + } else if (context == "local" || !context) { + var localBox = getRect(cm.display.sizer); + left += localBox.left; + top += localBox.top; + } + + var lineSpaceBox = getRect(cm.display.lineSpace); + return {left: left - lineSpaceBox.left, top: top - lineSpaceBox.top}; + } + + function charCoords(cm, pos, context, lineObj, bias) { + if (!lineObj) lineObj = getLine(cm.doc, pos.line); + return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, null, bias), context); + } + + function cursorCoords(cm, pos, context, lineObj, measurement) { + lineObj = lineObj || getLine(cm.doc, pos.line); + if (!measurement) measurement = measureLine(cm, lineObj); + function get(ch, right) { + var m = measureChar(cm, lineObj, ch, measurement, right ? "right" : "left"); + if (right) m.left = m.right; else m.right = m.left; + return intoCoordSystem(cm, lineObj, m, context); + } + function getBidi(ch, partPos) { + var part = order[partPos], right = part.level % 2; + if (ch == bidiLeft(part) && partPos && part.level < order[partPos - 1].level) { + part = order[--partPos]; + ch = bidiRight(part) - (part.level % 2 ? 0 : 1); + right = true; + } else if (ch == bidiRight(part) && partPos < order.length - 1 && part.level < order[partPos + 1].level) { + part = order[++partPos]; + ch = bidiLeft(part) - part.level % 2; + right = false; + } + if (right && ch == part.to && ch > part.from) return get(ch - 1); + return get(ch, right); + } + var order = getOrder(lineObj), ch = pos.ch; + if (!order) return get(ch); + var partPos = getBidiPartAt(order, ch); + var val = getBidi(ch, partPos); + if (bidiOther != null) val.other = getBidi(ch, bidiOther); + return val; + } + + function PosWithInfo(line, ch, outside, xRel) { + var pos = new Pos(line, ch); + pos.xRel = xRel; + if (outside) pos.outside = true; + return pos; + } + + // Coords must be lineSpace-local + function coordsChar(cm, x, y) { + var doc = cm.doc; + y += cm.display.viewOffset; + if (y < 0) return PosWithInfo(doc.first, 0, true, -1); + var lineNo = lineAtHeight(doc, y), last = doc.first + doc.size - 1; + if (lineNo > last) + return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, true, 1); + if (x < 0) x = 0; + + for (;;) { + var lineObj = getLine(doc, lineNo); + var found = coordsCharInner(cm, lineObj, lineNo, x, y); + var merged = collapsedSpanAtEnd(lineObj); + var mergedPos = merged && merged.find(); + if (merged && (found.ch > mergedPos.from.ch || found.ch == mergedPos.from.ch && found.xRel > 0)) + lineNo = mergedPos.to.line; + else + return found; + } + } + + function coordsCharInner(cm, lineObj, lineNo, x, y) { + var innerOff = y - heightAtLine(cm, lineObj); + var wrongLine = false, adjust = 2 * cm.display.wrapper.clientWidth; + var measurement = measureLine(cm, lineObj); + + function getX(ch) { + var sp = cursorCoords(cm, Pos(lineNo, ch), "line", + lineObj, measurement); + wrongLine = true; + if (innerOff > sp.bottom) return sp.left - adjust; + else if (innerOff < sp.top) return sp.left + adjust; + else wrongLine = false; + return sp.left; + } + + var bidi = getOrder(lineObj), dist = lineObj.text.length; + var from = lineLeft(lineObj), to = lineRight(lineObj); + var fromX = getX(from), fromOutside = wrongLine, toX = getX(to), toOutside = wrongLine; + + if (x > toX) return PosWithInfo(lineNo, to, toOutside, 1); + // Do a binary search between these bounds. + for (;;) { + if (bidi ? to == from || to == moveVisually(lineObj, from, 1) : to - from <= 1) { + var ch = x < fromX || x - fromX <= toX - x ? from : to; + var xDiff = x - (ch == from ? fromX : toX); + while (isExtendingChar.test(lineObj.text.charAt(ch))) ++ch; + var pos = PosWithInfo(lineNo, ch, ch == from ? fromOutside : toOutside, + xDiff < 0 ? -1 : xDiff ? 1 : 0); + return pos; + } + var step = Math.ceil(dist / 2), middle = from + step; + if (bidi) { + middle = from; + for (var i = 0; i < step; ++i) middle = moveVisually(lineObj, middle, 1); + } + var middleX = getX(middle); + if (middleX > x) {to = middle; toX = middleX; if (toOutside = wrongLine) toX += 1000; dist = step;} + else {from = middle; fromX = middleX; fromOutside = wrongLine; dist -= step;} + } + } + + var measureText; + function textHeight(display) { + if (display.cachedTextHeight != null) return display.cachedTextHeight; + if (measureText == null) { + measureText = elt("pre"); + // Measure a bunch of lines, for browsers that compute + // fractional heights. + for (var i = 0; i < 49; ++i) { + measureText.appendChild(document.createTextNode("x")); + measureText.appendChild(elt("br")); + } + measureText.appendChild(document.createTextNode("x")); + } + removeChildrenAndAdd(display.measure, measureText); + var height = measureText.offsetHeight / 50; + if (height > 3) display.cachedTextHeight = height; + removeChildren(display.measure); + return height || 1; + } + + function charWidth(display) { + if (display.cachedCharWidth != null) return display.cachedCharWidth; + var anchor = elt("span", "x"); + var pre = elt("pre", [anchor]); + removeChildrenAndAdd(display.measure, pre); + var width = anchor.offsetWidth; + if (width > 2) display.cachedCharWidth = width; + return width || 10; + } + + // OPERATIONS + + // Operations are used to wrap changes in such a way that each + // change won't have to update the cursor and display (which would + // be awkward, slow, and error-prone), but instead updates are + // batched and then all combined and executed at once. + + var nextOpId = 0; + function startOperation(cm) { + cm.curOp = { + // An array of ranges of lines that have to be updated. See + // updateDisplay. + changes: [], + forceUpdate: false, + updateInput: null, + userSelChange: null, + textChanged: null, + selectionChanged: false, + cursorActivity: false, + updateMaxLine: false, + updateScrollPos: false, + id: ++nextOpId + }; + if (!delayedCallbackDepth++) delayedCallbacks = []; + } + + function endOperation(cm) { + var op = cm.curOp, doc = cm.doc, display = cm.display; + cm.curOp = null; + + if (op.updateMaxLine) computeMaxLength(cm); + if (display.maxLineChanged && !cm.options.lineWrapping && display.maxLine) { + var width = measureLineWidth(cm, display.maxLine); + display.sizer.style.minWidth = Math.max(0, width + 3 + scrollerCutOff) + "px"; + display.maxLineChanged = false; + var maxScrollLeft = Math.max(0, display.sizer.offsetLeft + display.sizer.offsetWidth - display.scroller.clientWidth); + if (maxScrollLeft < doc.scrollLeft && !op.updateScrollPos) + setScrollLeft(cm, Math.min(display.scroller.scrollLeft, maxScrollLeft), true); + } + var newScrollPos, updated; + if (op.updateScrollPos) { + newScrollPos = op.updateScrollPos; + } else if (op.selectionChanged && display.scroller.clientHeight) { // don't rescroll if not visible + var coords = cursorCoords(cm, doc.sel.head); + newScrollPos = calculateScrollPos(cm, coords.left, coords.top, coords.left, coords.bottom); + } + if (op.changes.length || op.forceUpdate || newScrollPos && newScrollPos.scrollTop != null) { + updated = updateDisplay(cm, op.changes, newScrollPos && newScrollPos.scrollTop, op.forceUpdate); + if (cm.display.scroller.offsetHeight) cm.doc.scrollTop = cm.display.scroller.scrollTop; + } + if (!updated && op.selectionChanged) updateSelection(cm); + if (op.updateScrollPos) { + var top = Math.max(0, Math.min(display.scroller.scrollHeight - display.scroller.clientHeight, newScrollPos.scrollTop)); + var left = Math.max(0, Math.min(display.scroller.scrollWidth - display.scroller.clientWidth, newScrollPos.scrollLeft)); + display.scroller.scrollTop = display.scrollbarV.scrollTop = doc.scrollTop = top; + display.scroller.scrollLeft = display.scrollbarH.scrollLeft = doc.scrollLeft = left; + alignHorizontally(cm); + if (op.scrollToPos) + scrollPosIntoView(cm, clipPos(cm.doc, op.scrollToPos.from), + clipPos(cm.doc, op.scrollToPos.to), op.scrollToPos.margin); + } else if (newScrollPos) { + scrollCursorIntoView(cm); + } + if (op.selectionChanged) restartBlink(cm); + + if (cm.state.focused && op.updateInput) + resetInput(cm, op.userSelChange); + + var hidden = op.maybeHiddenMarkers, unhidden = op.maybeUnhiddenMarkers; + if (hidden) for (var i = 0; i < hidden.length; ++i) + if (!hidden[i].lines.length) signal(hidden[i], "hide"); + if (unhidden) for (var i = 0; i < unhidden.length; ++i) + if (unhidden[i].lines.length) signal(unhidden[i], "unhide"); + + var delayed; + if (!--delayedCallbackDepth) { + delayed = delayedCallbacks; + delayedCallbacks = null; + } + if (op.textChanged) + signal(cm, "change", cm, op.textChanged); + if (op.cursorActivity) signal(cm, "cursorActivity", cm); + if (delayed) for (var i = 0; i < delayed.length; ++i) delayed[i](); + } + + // Wraps a function in an operation. Returns the wrapped function. + function operation(cm1, f) { + return function() { + var cm = cm1 || this, withOp = !cm.curOp; + if (withOp) startOperation(cm); + try { var result = f.apply(cm, arguments); } + finally { if (withOp) endOperation(cm); } + return result; + }; + } + function docOperation(f) { + return function() { + var withOp = this.cm && !this.cm.curOp, result; + if (withOp) startOperation(this.cm); + try { result = f.apply(this, arguments); } + finally { if (withOp) endOperation(this.cm); } + return result; + }; + } + function runInOp(cm, f) { + var withOp = !cm.curOp, result; + if (withOp) startOperation(cm); + try { result = f(); } + finally { if (withOp) endOperation(cm); } + return result; + } + + function regChange(cm, from, to, lendiff) { + if (from == null) from = cm.doc.first; + if (to == null) to = cm.doc.first + cm.doc.size; + cm.curOp.changes.push({from: from, to: to, diff: lendiff}); + } + + // INPUT HANDLING + + function slowPoll(cm) { + if (cm.display.pollingFast) return; + cm.display.poll.set(cm.options.pollInterval, function() { + readInput(cm); + if (cm.state.focused) slowPoll(cm); + }); + } + + function fastPoll(cm) { + var missed = false; + cm.display.pollingFast = true; + function p() { + var changed = readInput(cm); + if (!changed && !missed) {missed = true; cm.display.poll.set(60, p);} + else {cm.display.pollingFast = false; slowPoll(cm);} + } + cm.display.poll.set(20, p); + } + + // prevInput is a hack to work with IME. If we reset the textarea + // on every change, that breaks IME. So we look for changes + // compared to the previous content instead. (Modern browsers have + // events that indicate IME taking place, but these are not widely + // supported or compatible enough yet to rely on.) + function readInput(cm) { + var input = cm.display.input, prevInput = cm.display.prevInput, doc = cm.doc, sel = doc.sel; + if (!cm.state.focused || hasSelection(input) || isReadOnly(cm) || cm.state.disableInput) return false; + if (cm.state.pasteIncoming && cm.state.fakedLastChar) { + input.value = input.value.substring(0, input.value.length - 1); + cm.state.fakedLastChar = false; + } + var text = input.value; + if (text == prevInput && posEq(sel.from, sel.to)) return false; + if (ie && !ie_lt9 && cm.display.inputHasSelection === text) { + resetInput(cm, true); + return false; + } + + var withOp = !cm.curOp; + if (withOp) startOperation(cm); + sel.shift = false; + var same = 0, l = Math.min(prevInput.length, text.length); + while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) ++same; + var from = sel.from, to = sel.to; + if (same < prevInput.length) + from = Pos(from.line, from.ch - (prevInput.length - same)); + else if (cm.state.overwrite && posEq(from, to) && !cm.state.pasteIncoming) + to = Pos(to.line, Math.min(getLine(doc, to.line).text.length, to.ch + (text.length - same))); + + var updateInput = cm.curOp.updateInput; + var changeEvent = {from: from, to: to, text: splitLines(text.slice(same)), + origin: cm.state.pasteIncoming ? "paste" : "+input"}; + makeChange(cm.doc, changeEvent, "end"); + cm.curOp.updateInput = updateInput; + signalLater(cm, "inputRead", cm, changeEvent); + + if (text.length > 1000 || text.indexOf("\n") > -1) input.value = cm.display.prevInput = ""; + else cm.display.prevInput = text; + if (withOp) endOperation(cm); + cm.state.pasteIncoming = false; + return true; + } + + function resetInput(cm, user) { + var minimal, selected, doc = cm.doc; + if (!posEq(doc.sel.from, doc.sel.to)) { + cm.display.prevInput = ""; + minimal = hasCopyEvent && + (doc.sel.to.line - doc.sel.from.line > 100 || (selected = cm.getSelection()).length > 1000); + var content = minimal ? "-" : selected || cm.getSelection(); + cm.display.input.value = content; + if (cm.state.focused) selectInput(cm.display.input); + if (ie && !ie_lt9) cm.display.inputHasSelection = content; + } else if (user) { + cm.display.prevInput = cm.display.input.value = ""; + if (ie && !ie_lt9) cm.display.inputHasSelection = null; + } + cm.display.inaccurateSelection = minimal; + } + + function focusInput(cm) { + if (cm.options.readOnly != "nocursor" && (!mobile || document.activeElement != cm.display.input)) + cm.display.input.focus(); + } + + function isReadOnly(cm) { + return cm.options.readOnly || cm.doc.cantEdit; + } + + // EVENT HANDLERS + + function registerEventHandlers(cm) { + var d = cm.display; + on(d.scroller, "mousedown", operation(cm, onMouseDown)); + if (ie) + on(d.scroller, "dblclick", operation(cm, function(e) { + if (signalDOMEvent(cm, e)) return; + var pos = posFromMouse(cm, e); + if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) return; + e_preventDefault(e); + var word = findWordAt(getLine(cm.doc, pos.line).text, pos); + extendSelection(cm.doc, word.from, word.to); + })); + else + on(d.scroller, "dblclick", function(e) { signalDOMEvent(cm, e) || e_preventDefault(e); }); + on(d.lineSpace, "selectstart", function(e) { + if (!eventInWidget(d, e)) e_preventDefault(e); + }); + // Gecko browsers fire contextmenu *after* opening the menu, at + // which point we can't mess with it anymore. Context menu is + // handled in onMouseDown for Gecko. + if (!captureMiddleClick) on(d.scroller, "contextmenu", function(e) {onContextMenu(cm, e);}); + + on(d.scroller, "scroll", function() { + if (d.scroller.clientHeight) { + setScrollTop(cm, d.scroller.scrollTop); + setScrollLeft(cm, d.scroller.scrollLeft, true); + signal(cm, "scroll", cm); + } + }); + on(d.scrollbarV, "scroll", function() { + if (d.scroller.clientHeight) setScrollTop(cm, d.scrollbarV.scrollTop); + }); + on(d.scrollbarH, "scroll", function() { + if (d.scroller.clientHeight) setScrollLeft(cm, d.scrollbarH.scrollLeft); + }); + + on(d.scroller, "mousewheel", function(e){onScrollWheel(cm, e);}); + on(d.scroller, "DOMMouseScroll", function(e){onScrollWheel(cm, e);}); + + function reFocus() { if (cm.state.focused) setTimeout(bind(focusInput, cm), 0); } + on(d.scrollbarH, "mousedown", reFocus); + on(d.scrollbarV, "mousedown", reFocus); + // Prevent wrapper from ever scrolling + on(d.wrapper, "scroll", function() { d.wrapper.scrollTop = d.wrapper.scrollLeft = 0; }); + + var resizeTimer; + function onResize() { + if (resizeTimer == null) resizeTimer = setTimeout(function() { + resizeTimer = null; + // Might be a text scaling operation, clear size caches. + d.cachedCharWidth = d.cachedTextHeight = knownScrollbarWidth = null; + clearCaches(cm); + runInOp(cm, bind(regChange, cm)); + }, 100); + } + on(window, "resize", onResize); + // Above handler holds on to the editor and its data structures. + // Here we poll to unregister it when the editor is no longer in + // the document, so that it can be garbage-collected. + function unregister() { + for (var p = d.wrapper.parentNode; p && p != document.body; p = p.parentNode) {} + if (p) setTimeout(unregister, 5000); + else off(window, "resize", onResize); + } + setTimeout(unregister, 5000); + + on(d.input, "keyup", operation(cm, function(e) { + if (signalDOMEvent(cm, e) || cm.options.onKeyEvent && cm.options.onKeyEvent(cm, addStop(e))) return; + if (e.keyCode == 16) cm.doc.sel.shift = false; + })); + on(d.input, "input", function() { + if (ie && !ie_lt9 && cm.display.inputHasSelection) cm.display.inputHasSelection = null; + fastPoll(cm); + }); + on(d.input, "keydown", operation(cm, onKeyDown)); + on(d.input, "keypress", operation(cm, onKeyPress)); + on(d.input, "focus", bind(onFocus, cm)); + on(d.input, "blur", bind(onBlur, cm)); + + function drag_(e) { + if (signalDOMEvent(cm, e) || cm.options.onDragEvent && cm.options.onDragEvent(cm, addStop(e))) return; + e_stop(e); + } + if (cm.options.dragDrop) { + on(d.scroller, "dragstart", function(e){onDragStart(cm, e);}); + on(d.scroller, "dragenter", drag_); + on(d.scroller, "dragover", drag_); + on(d.scroller, "drop", operation(cm, onDrop)); + } + on(d.scroller, "paste", function(e) { + if (eventInWidget(d, e)) return; + focusInput(cm); + fastPoll(cm); + }); + on(d.input, "paste", function() { + // Workaround for webkit bug https://bugs.webkit.org/show_bug.cgi?id=90206 + // Add a char to the end of textarea before paste occur so that + // selection doesn't span to the end of textarea. + if (webkit && !cm.state.fakedLastChar && !(new Date - cm.state.lastMiddleDown < 200)) { + var start = d.input.selectionStart, end = d.input.selectionEnd; + d.input.value += "$"; + d.input.selectionStart = start; + d.input.selectionEnd = end; + cm.state.fakedLastChar = true; + } + cm.state.pasteIncoming = true; + fastPoll(cm); + }); + + function prepareCopy() { + if (d.inaccurateSelection) { + d.prevInput = ""; + d.inaccurateSelection = false; + d.input.value = cm.getSelection(); + selectInput(d.input); + } + } + on(d.input, "cut", prepareCopy); + on(d.input, "copy", prepareCopy); + + // Needed to handle Tab key in KHTML + if (khtml) on(d.sizer, "mouseup", function() { + if (document.activeElement == d.input) d.input.blur(); + focusInput(cm); + }); + } + + function eventInWidget(display, e) { + for (var n = e_target(e); n != display.wrapper; n = n.parentNode) { + if (!n || n.ignoreEvents || n.parentNode == display.sizer && n != display.mover) return true; + } + } + + function posFromMouse(cm, e, liberal) { + var display = cm.display; + if (!liberal) { + var target = e_target(e); + if (target == display.scrollbarH || target == display.scrollbarH.firstChild || + target == display.scrollbarV || target == display.scrollbarV.firstChild || + target == display.scrollbarFiller || target == display.gutterFiller) return null; + } + var x, y, space = getRect(display.lineSpace); + // Fails unpredictably on IE[67] when mouse is dragged around quickly. + try { x = e.clientX; y = e.clientY; } catch (e) { return null; } + return coordsChar(cm, x - space.left, y - space.top); + } + + var lastClick, lastDoubleClick; + function onMouseDown(e) { + if (signalDOMEvent(this, e)) return; + var cm = this, display = cm.display, doc = cm.doc, sel = doc.sel; + sel.shift = e.shiftKey; + + if (eventInWidget(display, e)) { + if (!webkit) { + display.scroller.draggable = false; + setTimeout(function(){display.scroller.draggable = true;}, 100); + } + return; + } + if (clickInGutter(cm, e)) return; + var start = posFromMouse(cm, e); + + switch (e_button(e)) { + case 3: + if (captureMiddleClick) onContextMenu.call(cm, cm, e); + return; + case 2: + if (webkit) cm.state.lastMiddleDown = +new Date; + if (start) extendSelection(cm.doc, start); + setTimeout(bind(focusInput, cm), 20); + e_preventDefault(e); + return; + } + // For button 1, if it was clicked inside the editor + // (posFromMouse returning non-null), we have to adjust the + // selection. + if (!start) {if (e_target(e) == display.scroller) e_preventDefault(e); return;} + + if (!cm.state.focused) onFocus(cm); + + var now = +new Date, type = "single"; + if (lastDoubleClick && lastDoubleClick.time > now - 400 && posEq(lastDoubleClick.pos, start)) { + type = "triple"; + e_preventDefault(e); + setTimeout(bind(focusInput, cm), 20); + selectLine(cm, start.line); + } else if (lastClick && lastClick.time > now - 400 && posEq(lastClick.pos, start)) { + type = "double"; + lastDoubleClick = {time: now, pos: start}; + e_preventDefault(e); + var word = findWordAt(getLine(doc, start.line).text, start); + extendSelection(cm.doc, word.from, word.to); + } else { lastClick = {time: now, pos: start}; } + + var last = start; + if (cm.options.dragDrop && dragAndDrop && !isReadOnly(cm) && !posEq(sel.from, sel.to) && + !posLess(start, sel.from) && !posLess(sel.to, start) && type == "single") { + var dragEnd = operation(cm, function(e2) { + if (webkit) display.scroller.draggable = false; + cm.state.draggingText = false; + off(document, "mouseup", dragEnd); + off(display.scroller, "drop", dragEnd); + if (Math.abs(e.clientX - e2.clientX) + Math.abs(e.clientY - e2.clientY) < 10) { + e_preventDefault(e2); + extendSelection(cm.doc, start); + focusInput(cm); + } + }); + // Let the drag handler handle this. + if (webkit) display.scroller.draggable = true; + cm.state.draggingText = dragEnd; + // IE's approach to draggable + if (display.scroller.dragDrop) display.scroller.dragDrop(); + on(document, "mouseup", dragEnd); + on(display.scroller, "drop", dragEnd); + return; + } + e_preventDefault(e); + if (type == "single") extendSelection(cm.doc, clipPos(doc, start)); + + var startstart = sel.from, startend = sel.to, lastPos = start; + + function doSelect(cur) { + if (posEq(lastPos, cur)) return; + lastPos = cur; + + if (type == "single") { + extendSelection(cm.doc, clipPos(doc, start), cur); + return; + } + + startstart = clipPos(doc, startstart); + startend = clipPos(doc, startend); + if (type == "double") { + var word = findWordAt(getLine(doc, cur.line).text, cur); + if (posLess(cur, startstart)) extendSelection(cm.doc, word.from, startend); + else extendSelection(cm.doc, startstart, word.to); + } else if (type == "triple") { + if (posLess(cur, startstart)) extendSelection(cm.doc, startend, clipPos(doc, Pos(cur.line, 0))); + else extendSelection(cm.doc, startstart, clipPos(doc, Pos(cur.line + 1, 0))); + } + } + + var editorSize = getRect(display.wrapper); + // Used to ensure timeout re-tries don't fire when another extend + // happened in the meantime (clearTimeout isn't reliable -- at + // least on Chrome, the timeouts still happen even when cleared, + // if the clear happens after their scheduled firing time). + var counter = 0; + + function extend(e) { + var curCount = ++counter; + var cur = posFromMouse(cm, e, true); + if (!cur) return; + if (!posEq(cur, last)) { + if (!cm.state.focused) onFocus(cm); + last = cur; + doSelect(cur); + var visible = visibleLines(display, doc); + if (cur.line >= visible.to || cur.line < visible.from) + setTimeout(operation(cm, function(){if (counter == curCount) extend(e);}), 150); + } else { + var outside = e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0; + if (outside) setTimeout(operation(cm, function() { + if (counter != curCount) return; + display.scroller.scrollTop += outside; + extend(e); + }), 50); + } + } + + function done(e) { + counter = Infinity; + e_preventDefault(e); + focusInput(cm); + off(document, "mousemove", move); + off(document, "mouseup", up); + } + + var move = operation(cm, function(e) { + if (!ie && !e_button(e)) done(e); + else extend(e); + }); + var up = operation(cm, done); + on(document, "mousemove", move); + on(document, "mouseup", up); + } + + function gutterEvent(cm, e, type, prevent, signalfn) { + try { var mX = e.clientX, mY = e.clientY; } + catch(e) { return false; } + if (mX >= Math.floor(getRect(cm.display.gutters).right)) return false; + if (prevent) e_preventDefault(e); + + var display = cm.display; + var lineBox = getRect(display.lineDiv); + + if (mY > lineBox.bottom || !hasHandler(cm, type)) return e_defaultPrevented(e); + mY -= lineBox.top - display.viewOffset; + + for (var i = 0; i < cm.options.gutters.length; ++i) { + var g = display.gutters.childNodes[i]; + if (g && getRect(g).right >= mX) { + var line = lineAtHeight(cm.doc, mY); + var gutter = cm.options.gutters[i]; + signalfn(cm, type, cm, line, gutter, e); + return e_defaultPrevented(e); + } + } + } + + function contextMenuInGutter(cm, e) { + if (!hasHandler(cm, "gutterContextMenu")) return false; + return gutterEvent(cm, e, "gutterContextMenu", false, signal); + } + + function clickInGutter(cm, e) { + return gutterEvent(cm, e, "gutterClick", true, signalLater); + } + + // Kludge to work around strange IE behavior where it'll sometimes + // re-fire a series of drag-related events right after the drop (#1551) + var lastDrop = 0; + + function onDrop(e) { + var cm = this; + if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e) || (cm.options.onDragEvent && cm.options.onDragEvent(cm, addStop(e)))) + return; + e_preventDefault(e); + if (ie) lastDrop = +new Date; + var pos = posFromMouse(cm, e, true), files = e.dataTransfer.files; + if (!pos || isReadOnly(cm)) return; + if (files && files.length && window.FileReader && window.File) { + var n = files.length, text = Array(n), read = 0; + var loadFile = function(file, i) { + var reader = new FileReader; + reader.onload = function() { + text[i] = reader.result; + if (++read == n) { + pos = clipPos(cm.doc, pos); + makeChange(cm.doc, {from: pos, to: pos, text: splitLines(text.join("\n")), origin: "paste"}, "around"); + } + }; + reader.readAsText(file); + }; + for (var i = 0; i < n; ++i) loadFile(files[i], i); + } else { + // Don't do a replace if the drop happened inside of the selected text. + if (cm.state.draggingText && !(posLess(pos, cm.doc.sel.from) || posLess(cm.doc.sel.to, pos))) { + cm.state.draggingText(e); + // Ensure the editor is re-focused + setTimeout(bind(focusInput, cm), 20); + return; + } + try { + var text = e.dataTransfer.getData("Text"); + if (text) { + var curFrom = cm.doc.sel.from, curTo = cm.doc.sel.to; + setSelection(cm.doc, pos, pos); + if (cm.state.draggingText) replaceRange(cm.doc, "", curFrom, curTo, "paste"); + cm.replaceSelection(text, null, "paste"); + focusInput(cm); + } + } + catch(e){} + } + } + + function onDragStart(cm, e) { + if (ie && (!cm.state.draggingText || +new Date - lastDrop < 100)) { e_stop(e); return; } + if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) return; + + var txt = cm.getSelection(); + e.dataTransfer.setData("Text", txt); + + // Use dummy image instead of default browsers image. + // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there. + if (e.dataTransfer.setDragImage && !safari) { + var img = elt("img", null, null, "position: fixed; left: 0; top: 0;"); + img.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="; + if (opera) { + img.width = img.height = 1; + cm.display.wrapper.appendChild(img); + // Force a relayout, or Opera won't use our image for some obscure reason + img._top = img.offsetTop; + } + e.dataTransfer.setDragImage(img, 0, 0); + if (opera) img.parentNode.removeChild(img); + } + } + + function setScrollTop(cm, val) { + if (Math.abs(cm.doc.scrollTop - val) < 2) return; + cm.doc.scrollTop = val; + if (!gecko) updateDisplay(cm, [], val); + if (cm.display.scroller.scrollTop != val) cm.display.scroller.scrollTop = val; + if (cm.display.scrollbarV.scrollTop != val) cm.display.scrollbarV.scrollTop = val; + if (gecko) updateDisplay(cm, []); + startWorker(cm, 100); + } + function setScrollLeft(cm, val, isScroller) { + if (isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) return; + val = Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth); + cm.doc.scrollLeft = val; + alignHorizontally(cm); + if (cm.display.scroller.scrollLeft != val) cm.display.scroller.scrollLeft = val; + if (cm.display.scrollbarH.scrollLeft != val) cm.display.scrollbarH.scrollLeft = val; + } + + // Since the delta values reported on mouse wheel events are + // unstandardized between browsers and even browser versions, and + // generally horribly unpredictable, this code starts by measuring + // the scroll effect that the first few mouse wheel events have, + // and, from that, detects the way it can convert deltas to pixel + // offsets afterwards. + // + // The reason we want to know the amount a wheel event will scroll + // is that it gives us a chance to update the display before the + // actual scrolling happens, reducing flickering. + + var wheelSamples = 0, wheelPixelsPerUnit = null; + // Fill in a browser-detected starting value on browsers where we + // know one. These don't have to be accurate -- the result of them + // being wrong would just be a slight flicker on the first wheel + // scroll (if it is large enough). + if (ie) wheelPixelsPerUnit = -.53; + else if (gecko) wheelPixelsPerUnit = 15; + else if (chrome) wheelPixelsPerUnit = -.7; + else if (safari) wheelPixelsPerUnit = -1/3; + + function onScrollWheel(cm, e) { + var dx = e.wheelDeltaX, dy = e.wheelDeltaY; + if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) dx = e.detail; + if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) dy = e.detail; + else if (dy == null) dy = e.wheelDelta; + + var display = cm.display, scroll = display.scroller; + // Quit if there's nothing to scroll here + if (!(dx && scroll.scrollWidth > scroll.clientWidth || + dy && scroll.scrollHeight > scroll.clientHeight)) return; + + // Webkit browsers on OS X abort momentum scrolls when the target + // of the scroll event is removed from the scrollable element. + // This hack (see related code in patchDisplay) makes sure the + // element is kept around. + if (dy && mac && webkit) { + for (var cur = e.target; cur != scroll; cur = cur.parentNode) { + if (cur.lineObj) { + cm.display.currentWheelTarget = cur; + break; + } + } + } + + // On some browsers, horizontal scrolling will cause redraws to + // happen before the gutter has been realigned, causing it to + // wriggle around in a most unseemly way. When we have an + // estimated pixels/delta value, we just handle horizontal + // scrolling entirely here. It'll be slightly off from native, but + // better than glitching out. + if (dx && !gecko && !opera && wheelPixelsPerUnit != null) { + if (dy) + setScrollTop(cm, Math.max(0, Math.min(scroll.scrollTop + dy * wheelPixelsPerUnit, scroll.scrollHeight - scroll.clientHeight))); + setScrollLeft(cm, Math.max(0, Math.min(scroll.scrollLeft + dx * wheelPixelsPerUnit, scroll.scrollWidth - scroll.clientWidth))); + e_preventDefault(e); + display.wheelStartX = null; // Abort measurement, if in progress + return; + } + + if (dy && wheelPixelsPerUnit != null) { + var pixels = dy * wheelPixelsPerUnit; + var top = cm.doc.scrollTop, bot = top + display.wrapper.clientHeight; + if (pixels < 0) top = Math.max(0, top + pixels - 50); + else bot = Math.min(cm.doc.height, bot + pixels + 50); + updateDisplay(cm, [], {top: top, bottom: bot}); + } + + if (wheelSamples < 20) { + if (display.wheelStartX == null) { + display.wheelStartX = scroll.scrollLeft; display.wheelStartY = scroll.scrollTop; + display.wheelDX = dx; display.wheelDY = dy; + setTimeout(function() { + if (display.wheelStartX == null) return; + var movedX = scroll.scrollLeft - display.wheelStartX; + var movedY = scroll.scrollTop - display.wheelStartY; + var sample = (movedY && display.wheelDY && movedY / display.wheelDY) || + (movedX && display.wheelDX && movedX / display.wheelDX); + display.wheelStartX = display.wheelStartY = null; + if (!sample) return; + wheelPixelsPerUnit = (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1); + ++wheelSamples; + }, 200); + } else { + display.wheelDX += dx; display.wheelDY += dy; + } + } + } + + function doHandleBinding(cm, bound, dropShift) { + if (typeof bound == "string") { + bound = commands[bound]; + if (!bound) return false; + } + // Ensure previous input has been read, so that the handler sees a + // consistent view of the document + if (cm.display.pollingFast && readInput(cm)) cm.display.pollingFast = false; + var doc = cm.doc, prevShift = doc.sel.shift, done = false; + try { + if (isReadOnly(cm)) cm.state.suppressEdits = true; + if (dropShift) doc.sel.shift = false; + done = bound(cm) != Pass; + } finally { + doc.sel.shift = prevShift; + cm.state.suppressEdits = false; + } + return done; + } + + function allKeyMaps(cm) { + var maps = cm.state.keyMaps.slice(0); + if (cm.options.extraKeys) maps.push(cm.options.extraKeys); + maps.push(cm.options.keyMap); + return maps; + } + + var maybeTransition; + function handleKeyBinding(cm, e) { + // Handle auto keymap transitions + var startMap = getKeyMap(cm.options.keyMap), next = startMap.auto; + clearTimeout(maybeTransition); + if (next && !isModifierKey(e)) maybeTransition = setTimeout(function() { + if (getKeyMap(cm.options.keyMap) == startMap) { + cm.options.keyMap = (next.call ? next.call(null, cm) : next); + keyMapChanged(cm); + } + }, 50); + + var name = keyName(e, true), handled = false; + if (!name) return false; + var keymaps = allKeyMaps(cm); + + if (e.shiftKey) { + // First try to resolve full name (including 'Shift-'). Failing + // that, see if there is a cursor-motion command (starting with + // 'go') bound to the keyname without 'Shift-'. + handled = lookupKey("Shift-" + name, keymaps, function(b) {return doHandleBinding(cm, b, true);}) + || lookupKey(name, keymaps, function(b) { + if (typeof b == "string" ? /^go[A-Z]/.test(b) : b.motion) + return doHandleBinding(cm, b); + }); + } else { + handled = lookupKey(name, keymaps, function(b) { return doHandleBinding(cm, b); }); + } + + if (handled) { + e_preventDefault(e); + restartBlink(cm); + if (ie_lt9) { e.oldKeyCode = e.keyCode; e.keyCode = 0; } + signalLater(cm, "keyHandled", cm, name, e); + } + return handled; + } + + function handleCharBinding(cm, e, ch) { + var handled = lookupKey("'" + ch + "'", allKeyMaps(cm), + function(b) { return doHandleBinding(cm, b, true); }); + if (handled) { + e_preventDefault(e); + restartBlink(cm); + signalLater(cm, "keyHandled", cm, "'" + ch + "'", e); + } + return handled; + } + + var lastStoppedKey = null; + function onKeyDown(e) { + var cm = this; + if (!cm.state.focused) onFocus(cm); + if (signalDOMEvent(cm, e) || cm.options.onKeyEvent && cm.options.onKeyEvent(cm, addStop(e))) return; + if (ie && e.keyCode == 27) e.returnValue = false; + var code = e.keyCode; + // IE does strange things with escape. + cm.doc.sel.shift = code == 16 || e.shiftKey; + // First give onKeyEvent option a chance to handle this. + var handled = handleKeyBinding(cm, e); + if (opera) { + lastStoppedKey = handled ? code : null; + // Opera has no cut event... we try to at least catch the key combo + if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey)) + cm.replaceSelection(""); + } + } + + function onKeyPress(e) { + var cm = this; + if (signalDOMEvent(cm, e) || cm.options.onKeyEvent && cm.options.onKeyEvent(cm, addStop(e))) return; + var keyCode = e.keyCode, charCode = e.charCode; + if (opera && keyCode == lastStoppedKey) {lastStoppedKey = null; e_preventDefault(e); return;} + if (((opera && (!e.which || e.which < 10)) || khtml) && handleKeyBinding(cm, e)) return; + var ch = String.fromCharCode(charCode == null ? keyCode : charCode); + if (this.options.electricChars && this.doc.mode.electricChars && + this.options.smartIndent && !isReadOnly(this) && + this.doc.mode.electricChars.indexOf(ch) > -1) + setTimeout(operation(cm, function() {indentLine(cm, cm.doc.sel.to.line, "smart");}), 75); + if (handleCharBinding(cm, e, ch)) return; + if (ie && !ie_lt9) cm.display.inputHasSelection = null; + fastPoll(cm); + } + + function onFocus(cm) { + if (cm.options.readOnly == "nocursor") return; + if (!cm.state.focused) { + signal(cm, "focus", cm); + cm.state.focused = true; + if (cm.display.wrapper.className.search(/\bCodeMirror-focused\b/) == -1) + cm.display.wrapper.className += " CodeMirror-focused"; + if (!cm.curOp) { + resetInput(cm, true); + if (webkit) setTimeout(bind(resetInput, cm, true), 0); // Issue #1730 + } + } + slowPoll(cm); + restartBlink(cm); + } + function onBlur(cm) { + if (cm.state.focused) { + signal(cm, "blur", cm); + cm.state.focused = false; + cm.display.wrapper.className = cm.display.wrapper.className.replace(" CodeMirror-focused", ""); + } + clearInterval(cm.display.blinker); + setTimeout(function() {if (!cm.state.focused) cm.doc.sel.shift = false;}, 150); + } + + var detectingSelectAll; + function onContextMenu(cm, e) { + if (signalDOMEvent(cm, e, "contextmenu")) return; + var display = cm.display, sel = cm.doc.sel; + if (eventInWidget(display, e) || contextMenuInGutter(cm, e)) return; + + var pos = posFromMouse(cm, e), scrollPos = display.scroller.scrollTop; + if (!pos || opera) return; // Opera is difficult. + + // Reset the current text selection only if the click is done outside of the selection + // and 'resetSelectionOnContextMenu' option is true. + var reset = cm.options.resetSelectionOnContextMenu; + if (reset && (posEq(sel.from, sel.to) || posLess(pos, sel.from) || !posLess(pos, sel.to))) + operation(cm, setSelection)(cm.doc, pos, pos); + + var oldCSS = display.input.style.cssText; + display.inputDiv.style.position = "absolute"; + display.input.style.cssText = "position: fixed; width: 30px; height: 30px; top: " + (e.clientY - 5) + + "px; left: " + (e.clientX - 5) + "px; z-index: 1000; background: white; outline: none;" + + "border-width: 0; outline: none; overflow: hidden; opacity: .05; -ms-opacity: .05; filter: alpha(opacity=5);"; + focusInput(cm); + resetInput(cm, true); + // Adds "Select all" to context menu in FF + if (posEq(sel.from, sel.to)) display.input.value = display.prevInput = " "; + + function prepareSelectAllHack() { + if (display.input.selectionStart != null) { + var extval = display.input.value = "\u200b" + (posEq(sel.from, sel.to) ? "" : display.input.value); + display.prevInput = "\u200b"; + display.input.selectionStart = 1; display.input.selectionEnd = extval.length; + } + } + function rehide() { + display.inputDiv.style.position = "relative"; + display.input.style.cssText = oldCSS; + if (ie_lt9) display.scrollbarV.scrollTop = display.scroller.scrollTop = scrollPos; + slowPoll(cm); + + // Try to detect the user choosing select-all + if (display.input.selectionStart != null) { + if (!ie || ie_lt9) prepareSelectAllHack(); + clearTimeout(detectingSelectAll); + var i = 0, poll = function(){ + if (display.prevInput == " " && display.input.selectionStart == 0) + operation(cm, commands.selectAll)(cm); + else if (i++ < 10) detectingSelectAll = setTimeout(poll, 500); + else resetInput(cm); + }; + detectingSelectAll = setTimeout(poll, 200); + } + } + + if (ie && !ie_lt9) prepareSelectAllHack(); + if (captureMiddleClick) { + e_stop(e); + var mouseup = function() { + off(window, "mouseup", mouseup); + setTimeout(rehide, 20); + }; + on(window, "mouseup", mouseup); + } else { + setTimeout(rehide, 50); + } + } + + // UPDATING + + var changeEnd = CodeMirror.changeEnd = function(change) { + if (!change.text) return change.to; + return Pos(change.from.line + change.text.length - 1, + lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0)); + }; + + // Make sure a position will be valid after the given change. + function clipPostChange(doc, change, pos) { + if (!posLess(change.from, pos)) return clipPos(doc, pos); + var diff = (change.text.length - 1) - (change.to.line - change.from.line); + if (pos.line > change.to.line + diff) { + var preLine = pos.line - diff, lastLine = doc.first + doc.size - 1; + if (preLine > lastLine) return Pos(lastLine, getLine(doc, lastLine).text.length); + return clipToLen(pos, getLine(doc, preLine).text.length); + } + if (pos.line == change.to.line + diff) + return clipToLen(pos, lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0) + + getLine(doc, change.to.line).text.length - change.to.ch); + var inside = pos.line - change.from.line; + return clipToLen(pos, change.text[inside].length + (inside ? 0 : change.from.ch)); + } + + // Hint can be null|"end"|"start"|"around"|{anchor,head} + function computeSelAfterChange(doc, change, hint) { + if (hint && typeof hint == "object") // Assumed to be {anchor, head} object + return {anchor: clipPostChange(doc, change, hint.anchor), + head: clipPostChange(doc, change, hint.head)}; + + if (hint == "start") return {anchor: change.from, head: change.from}; + + var end = changeEnd(change); + if (hint == "around") return {anchor: change.from, head: end}; + if (hint == "end") return {anchor: end, head: end}; + + // hint is null, leave the selection alone as much as possible + var adjustPos = function(pos) { + if (posLess(pos, change.from)) return pos; + if (!posLess(change.to, pos)) return end; + + var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, ch = pos.ch; + if (pos.line == change.to.line) ch += end.ch - change.to.ch; + return Pos(line, ch); + }; + return {anchor: adjustPos(doc.sel.anchor), head: adjustPos(doc.sel.head)}; + } + + function filterChange(doc, change, update) { + var obj = { + canceled: false, + from: change.from, + to: change.to, + text: change.text, + origin: change.origin, + cancel: function() { this.canceled = true; } + }; + if (update) obj.update = function(from, to, text, origin) { + if (from) this.from = clipPos(doc, from); + if (to) this.to = clipPos(doc, to); + if (text) this.text = text; + if (origin !== undefined) this.origin = origin; + }; + signal(doc, "beforeChange", doc, obj); + if (doc.cm) signal(doc.cm, "beforeChange", doc.cm, obj); + + if (obj.canceled) return null; + return {from: obj.from, to: obj.to, text: obj.text, origin: obj.origin}; + } + + // Replace the range from from to to by the strings in replacement. + // change is a {from, to, text [, origin]} object + function makeChange(doc, change, selUpdate, ignoreReadOnly) { + if (doc.cm) { + if (!doc.cm.curOp) return operation(doc.cm, makeChange)(doc, change, selUpdate, ignoreReadOnly); + if (doc.cm.state.suppressEdits) return; + } + + if (hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange")) { + change = filterChange(doc, change, true); + if (!change) return; + } + + // Possibly split or suppress the update based on the presence + // of read-only spans in its range. + var split = sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to); + if (split) { + for (var i = split.length - 1; i >= 1; --i) + makeChangeNoReadonly(doc, {from: split[i].from, to: split[i].to, text: [""]}); + if (split.length) + makeChangeNoReadonly(doc, {from: split[0].from, to: split[0].to, text: change.text}, selUpdate); + } else { + makeChangeNoReadonly(doc, change, selUpdate); + } + } + + function makeChangeNoReadonly(doc, change, selUpdate) { + if (change.text.length == 1 && change.text[0] == "" && posEq(change.from, change.to)) return; + var selAfter = computeSelAfterChange(doc, change, selUpdate); + addToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN); + + makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change)); + var rebased = []; + + linkedDocs(doc, function(doc, sharedHist) { + if (!sharedHist && indexOf(rebased, doc.history) == -1) { + rebaseHist(doc.history, change); + rebased.push(doc.history); + } + makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change)); + }); + } + + function makeChangeFromHistory(doc, type) { + if (doc.cm && doc.cm.state.suppressEdits) return; + + var hist = doc.history; + var event = (type == "undo" ? hist.done : hist.undone).pop(); + if (!event) return; + + var anti = {changes: [], anchorBefore: event.anchorAfter, headBefore: event.headAfter, + anchorAfter: event.anchorBefore, headAfter: event.headBefore, + generation: hist.generation}; + (type == "undo" ? hist.undone : hist.done).push(anti); + hist.generation = event.generation || ++hist.maxGeneration; + + var filter = hasHandler(doc, "beforeChange") || doc.cm && hasHandler(doc.cm, "beforeChange"); + + for (var i = event.changes.length - 1; i >= 0; --i) { + var change = event.changes[i]; + change.origin = type; + if (filter && !filterChange(doc, change, false)) { + (type == "undo" ? hist.done : hist.undone).length = 0; + return; + } + + anti.changes.push(historyChangeFromChange(doc, change)); + + var after = i ? computeSelAfterChange(doc, change, null) + : {anchor: event.anchorBefore, head: event.headBefore}; + makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change)); + var rebased = []; + + linkedDocs(doc, function(doc, sharedHist) { + if (!sharedHist && indexOf(rebased, doc.history) == -1) { + rebaseHist(doc.history, change); + rebased.push(doc.history); + } + makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change)); + }); + } + } + + function shiftDoc(doc, distance) { + function shiftPos(pos) {return Pos(pos.line + distance, pos.ch);} + doc.first += distance; + if (doc.cm) regChange(doc.cm, doc.first, doc.first, distance); + doc.sel.head = shiftPos(doc.sel.head); doc.sel.anchor = shiftPos(doc.sel.anchor); + doc.sel.from = shiftPos(doc.sel.from); doc.sel.to = shiftPos(doc.sel.to); + } + + function makeChangeSingleDoc(doc, change, selAfter, spans) { + if (doc.cm && !doc.cm.curOp) + return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans); + + if (change.to.line < doc.first) { + shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line)); + return; + } + if (change.from.line > doc.lastLine()) return; + + // Clip the change to the size of this doc + if (change.from.line < doc.first) { + var shift = change.text.length - 1 - (doc.first - change.from.line); + shiftDoc(doc, shift); + change = {from: Pos(doc.first, 0), to: Pos(change.to.line + shift, change.to.ch), + text: [lst(change.text)], origin: change.origin}; + } + var last = doc.lastLine(); + if (change.to.line > last) { + change = {from: change.from, to: Pos(last, getLine(doc, last).text.length), + text: [change.text[0]], origin: change.origin}; + } + + change.removed = getBetween(doc, change.from, change.to); + + if (!selAfter) selAfter = computeSelAfterChange(doc, change, null); + if (doc.cm) makeChangeSingleDocInEditor(doc.cm, change, spans, selAfter); + else updateDoc(doc, change, spans, selAfter); + } + + function makeChangeSingleDocInEditor(cm, change, spans, selAfter) { + var doc = cm.doc, display = cm.display, from = change.from, to = change.to; + + var recomputeMaxLength = false, checkWidthStart = from.line; + if (!cm.options.lineWrapping) { + checkWidthStart = lineNo(visualLine(doc, getLine(doc, from.line))); + doc.iter(checkWidthStart, to.line + 1, function(line) { + if (line == display.maxLine) { + recomputeMaxLength = true; + return true; + } + }); + } + + if (!posLess(doc.sel.head, change.from) && !posLess(change.to, doc.sel.head)) + cm.curOp.cursorActivity = true; + + updateDoc(doc, change, spans, selAfter, estimateHeight(cm)); + + if (!cm.options.lineWrapping) { + doc.iter(checkWidthStart, from.line + change.text.length, function(line) { + var len = lineLength(doc, line); + if (len > display.maxLineLength) { + display.maxLine = line; + display.maxLineLength = len; + display.maxLineChanged = true; + recomputeMaxLength = false; + } + }); + if (recomputeMaxLength) cm.curOp.updateMaxLine = true; + } + + // Adjust frontier, schedule worker + doc.frontier = Math.min(doc.frontier, from.line); + startWorker(cm, 400); + + var lendiff = change.text.length - (to.line - from.line) - 1; + // Remember that these lines changed, for updating the display + regChange(cm, from.line, to.line + 1, lendiff); + + if (hasHandler(cm, "change")) { + var changeObj = {from: from, to: to, + text: change.text, + removed: change.removed, + origin: change.origin}; + if (cm.curOp.textChanged) { + for (var cur = cm.curOp.textChanged; cur.next; cur = cur.next) {} + cur.next = changeObj; + } else cm.curOp.textChanged = changeObj; + } + } + + function replaceRange(doc, code, from, to, origin) { + if (!to) to = from; + if (posLess(to, from)) { var tmp = to; to = from; from = tmp; } + if (typeof code == "string") code = splitLines(code); + makeChange(doc, {from: from, to: to, text: code, origin: origin}, null); + } + + // POSITION OBJECT + + function Pos(line, ch) { + if (!(this instanceof Pos)) return new Pos(line, ch); + this.line = line; this.ch = ch; + } + CodeMirror.Pos = Pos; + + function posEq(a, b) {return a.line == b.line && a.ch == b.ch;} + function posLess(a, b) {return a.line < b.line || (a.line == b.line && a.ch < b.ch);} + function copyPos(x) {return Pos(x.line, x.ch);} + + // SELECTION + + function clipLine(doc, n) {return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1));} + function clipPos(doc, pos) { + if (pos.line < doc.first) return Pos(doc.first, 0); + var last = doc.first + doc.size - 1; + if (pos.line > last) return Pos(last, getLine(doc, last).text.length); + return clipToLen(pos, getLine(doc, pos.line).text.length); + } + function clipToLen(pos, linelen) { + var ch = pos.ch; + if (ch == null || ch > linelen) return Pos(pos.line, linelen); + else if (ch < 0) return Pos(pos.line, 0); + else return pos; + } + function isLine(doc, l) {return l >= doc.first && l < doc.first + doc.size;} + + // If shift is held, this will move the selection anchor. Otherwise, + // it'll set the whole selection. + function extendSelection(doc, pos, other, bias) { + if (doc.sel.shift || doc.sel.extend) { + var anchor = doc.sel.anchor; + if (other) { + var posBefore = posLess(pos, anchor); + if (posBefore != posLess(other, anchor)) { + anchor = pos; + pos = other; + } else if (posBefore != posLess(pos, other)) { + pos = other; + } + } + setSelection(doc, anchor, pos, bias); + } else { + setSelection(doc, pos, other || pos, bias); + } + if (doc.cm) doc.cm.curOp.userSelChange = true; + } + + function filterSelectionChange(doc, anchor, head) { + var obj = {anchor: anchor, head: head}; + signal(doc, "beforeSelectionChange", doc, obj); + if (doc.cm) signal(doc.cm, "beforeSelectionChange", doc.cm, obj); + obj.anchor = clipPos(doc, obj.anchor); obj.head = clipPos(doc, obj.head); + return obj; + } + + // Update the selection. Last two args are only used by + // updateDoc, since they have to be expressed in the line + // numbers before the update. + function setSelection(doc, anchor, head, bias, checkAtomic) { + if (!checkAtomic && hasHandler(doc, "beforeSelectionChange") || doc.cm && hasHandler(doc.cm, "beforeSelectionChange")) { + var filtered = filterSelectionChange(doc, anchor, head); + head = filtered.head; + anchor = filtered.anchor; + } + + var sel = doc.sel; + sel.goalColumn = null; + if (bias == null) bias = posLess(head, sel.head) ? -1 : 1; + // Skip over atomic spans. + if (checkAtomic || !posEq(anchor, sel.anchor)) + anchor = skipAtomic(doc, anchor, bias, checkAtomic != "push"); + if (checkAtomic || !posEq(head, sel.head)) + head = skipAtomic(doc, head, bias, checkAtomic != "push"); + + if (posEq(sel.anchor, anchor) && posEq(sel.head, head)) return; + + sel.anchor = anchor; sel.head = head; + var inv = posLess(head, anchor); + sel.from = inv ? head : anchor; + sel.to = inv ? anchor : head; + + if (doc.cm) + doc.cm.curOp.updateInput = doc.cm.curOp.selectionChanged = + doc.cm.curOp.cursorActivity = true; + + signalLater(doc, "cursorActivity", doc); + } + + function reCheckSelection(cm) { + setSelection(cm.doc, cm.doc.sel.from, cm.doc.sel.to, null, "push"); + } + + function skipAtomic(doc, pos, bias, mayClear) { + var flipped = false, curPos = pos; + var dir = bias || 1; + doc.cantEdit = false; + search: for (;;) { + var line = getLine(doc, curPos.line); + if (line.markedSpans) { + for (var i = 0; i < line.markedSpans.length; ++i) { + var sp = line.markedSpans[i], m = sp.marker; + if ((sp.from == null || (m.inclusiveLeft ? sp.from <= curPos.ch : sp.from < curPos.ch)) && + (sp.to == null || (m.inclusiveRight ? sp.to >= curPos.ch : sp.to > curPos.ch))) { + if (mayClear) { + signal(m, "beforeCursorEnter"); + if (m.explicitlyCleared) { + if (!line.markedSpans) break; + else {--i; continue;} + } + } + if (!m.atomic) continue; + var newPos = m.find()[dir < 0 ? "from" : "to"]; + if (posEq(newPos, curPos)) { + newPos.ch += dir; + if (newPos.ch < 0) { + if (newPos.line > doc.first) newPos = clipPos(doc, Pos(newPos.line - 1)); + else newPos = null; + } else if (newPos.ch > line.text.length) { + if (newPos.line < doc.first + doc.size - 1) newPos = Pos(newPos.line + 1, 0); + else newPos = null; + } + if (!newPos) { + if (flipped) { + // Driven in a corner -- no valid cursor position found at all + // -- try again *with* clearing, if we didn't already + if (!mayClear) return skipAtomic(doc, pos, bias, true); + // Otherwise, turn off editing until further notice, and return the start of the doc + doc.cantEdit = true; + return Pos(doc.first, 0); + } + flipped = true; newPos = pos; dir = -dir; + } + } + curPos = newPos; + continue search; + } + } + } + return curPos; + } + } + + // SCROLLING + + function scrollCursorIntoView(cm) { + var coords = scrollPosIntoView(cm, cm.doc.sel.head, null, cm.options.cursorScrollMargin); + if (!cm.state.focused) return; + var display = cm.display, box = getRect(display.sizer), doScroll = null; + if (coords.top + box.top < 0) doScroll = true; + else if (coords.bottom + box.top > (window.innerHeight || document.documentElement.clientHeight)) doScroll = false; + if (doScroll != null && !phantom) { + var hidden = display.cursor.style.display == "none"; + if (hidden) { + display.cursor.style.display = ""; + display.cursor.style.left = coords.left + "px"; + display.cursor.style.top = (coords.top - display.viewOffset) + "px"; + } + display.cursor.scrollIntoView(doScroll); + if (hidden) display.cursor.style.display = "none"; + } + } + + function scrollPosIntoView(cm, pos, end, margin) { + if (margin == null) margin = 0; + for (;;) { + var changed = false, coords = cursorCoords(cm, pos); + var endCoords = !end || end == pos ? coords : cursorCoords(cm, end); + var scrollPos = calculateScrollPos(cm, Math.min(coords.left, endCoords.left), + Math.min(coords.top, endCoords.top) - margin, + Math.max(coords.left, endCoords.left), + Math.max(coords.bottom, endCoords.bottom) + margin); + var startTop = cm.doc.scrollTop, startLeft = cm.doc.scrollLeft; + if (scrollPos.scrollTop != null) { + setScrollTop(cm, scrollPos.scrollTop); + if (Math.abs(cm.doc.scrollTop - startTop) > 1) changed = true; + } + if (scrollPos.scrollLeft != null) { + setScrollLeft(cm, scrollPos.scrollLeft); + if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) changed = true; + } + if (!changed) return coords; + } + } + + function scrollIntoView(cm, x1, y1, x2, y2) { + var scrollPos = calculateScrollPos(cm, x1, y1, x2, y2); + if (scrollPos.scrollTop != null) setScrollTop(cm, scrollPos.scrollTop); + if (scrollPos.scrollLeft != null) setScrollLeft(cm, scrollPos.scrollLeft); + } + + function calculateScrollPos(cm, x1, y1, x2, y2) { + var display = cm.display, snapMargin = textHeight(cm.display); + if (y1 < 0) y1 = 0; + var screen = display.scroller.clientHeight - scrollerCutOff, screentop = display.scroller.scrollTop, result = {}; + var docBottom = cm.doc.height + paddingVert(display); + var atTop = y1 < snapMargin, atBottom = y2 > docBottom - snapMargin; + if (y1 < screentop) { + result.scrollTop = atTop ? 0 : y1; + } else if (y2 > screentop + screen) { + var newTop = Math.min(y1, (atBottom ? docBottom : y2) - screen); + if (newTop != screentop) result.scrollTop = newTop; + } + + var screenw = display.scroller.clientWidth - scrollerCutOff, screenleft = display.scroller.scrollLeft; + x1 += display.gutters.offsetWidth; x2 += display.gutters.offsetWidth; + var gutterw = display.gutters.offsetWidth; + var atLeft = x1 < gutterw + 10; + if (x1 < screenleft + gutterw || atLeft) { + if (atLeft) x1 = 0; + result.scrollLeft = Math.max(0, x1 - 10 - gutterw); + } else if (x2 > screenw + screenleft - 3) { + result.scrollLeft = x2 + 10 - screenw; + } + return result; + } + + function updateScrollPos(cm, left, top) { + cm.curOp.updateScrollPos = {scrollLeft: left == null ? cm.doc.scrollLeft : left, + scrollTop: top == null ? cm.doc.scrollTop : top}; + } + + function addToScrollPos(cm, left, top) { + var pos = cm.curOp.updateScrollPos || (cm.curOp.updateScrollPos = {scrollLeft: cm.doc.scrollLeft, scrollTop: cm.doc.scrollTop}); + var scroll = cm.display.scroller; + pos.scrollTop = Math.max(0, Math.min(scroll.scrollHeight - scroll.clientHeight, pos.scrollTop + top)); + pos.scrollLeft = Math.max(0, Math.min(scroll.scrollWidth - scroll.clientWidth, pos.scrollLeft + left)); + } + + // API UTILITIES + + function indentLine(cm, n, how, aggressive) { + var doc = cm.doc; + if (how == null) how = "add"; + if (how == "smart") { + if (!cm.doc.mode.indent) how = "prev"; + else var state = getStateBefore(cm, n); + } + + var tabSize = cm.options.tabSize; + var line = getLine(doc, n), curSpace = countColumn(line.text, null, tabSize); + var curSpaceString = line.text.match(/^\s*/)[0], indentation; + if (how == "smart") { + indentation = cm.doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text); + if (indentation == Pass) { + if (!aggressive) return; + how = "prev"; + } + } + if (how == "prev") { + if (n > doc.first) indentation = countColumn(getLine(doc, n-1).text, null, tabSize); + else indentation = 0; + } else if (how == "add") { + indentation = curSpace + cm.options.indentUnit; + } else if (how == "subtract") { + indentation = curSpace - cm.options.indentUnit; + } else if (typeof how == "number") { + indentation = curSpace + how; + } + indentation = Math.max(0, indentation); + + var indentString = "", pos = 0; + if (cm.options.indentWithTabs) + for (var i = Math.floor(indentation / tabSize); i; --i) {pos += tabSize; indentString += "\t";} + if (pos < indentation) indentString += spaceStr(indentation - pos); + + if (indentString != curSpaceString) + replaceRange(cm.doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), "+input"); + else if (doc.sel.head.line == n && doc.sel.head.ch < curSpaceString.length) + setSelection(doc, Pos(n, curSpaceString.length), Pos(n, curSpaceString.length), 1); + line.stateAfter = null; + } + + function changeLine(cm, handle, op) { + var no = handle, line = handle, doc = cm.doc; + if (typeof handle == "number") line = getLine(doc, clipLine(doc, handle)); + else no = lineNo(handle); + if (no == null) return null; + if (op(line, no)) regChange(cm, no, no + 1); + else return null; + return line; + } + + function findPosH(doc, pos, dir, unit, visually) { + var line = pos.line, ch = pos.ch, origDir = dir; + var lineObj = getLine(doc, line); + var possible = true; + function findNextLine() { + var l = line + dir; + if (l < doc.first || l >= doc.first + doc.size) return (possible = false); + line = l; + return lineObj = getLine(doc, l); + } + function moveOnce(boundToLine) { + var next = (visually ? moveVisually : moveLogically)(lineObj, ch, dir, true); + if (next == null) { + if (!boundToLine && findNextLine()) { + if (visually) ch = (dir < 0 ? lineRight : lineLeft)(lineObj); + else ch = dir < 0 ? lineObj.text.length : 0; + } else return (possible = false); + } else ch = next; + return true; + } + + if (unit == "char") moveOnce(); + else if (unit == "column") moveOnce(true); + else if (unit == "word" || unit == "group") { + var sawType = null, group = unit == "group"; + for (var first = true;; first = false) { + if (dir < 0 && !moveOnce(!first)) break; + var cur = lineObj.text.charAt(ch) || "\n"; + var type = isWordChar(cur) ? "w" + : !group ? null + : /\s/.test(cur) ? null + : "p"; + if (sawType && sawType != type) { + if (dir < 0) {dir = 1; moveOnce();} + break; + } + if (type) sawType = type; + if (dir > 0 && !moveOnce(!first)) break; + } + } + var result = skipAtomic(doc, Pos(line, ch), origDir, true); + if (!possible) result.hitSide = true; + return result; + } + + function findPosV(cm, pos, dir, unit) { + var doc = cm.doc, x = pos.left, y; + if (unit == "page") { + var pageSize = Math.min(cm.display.wrapper.clientHeight, window.innerHeight || document.documentElement.clientHeight); + y = pos.top + dir * (pageSize - (dir < 0 ? 1.5 : .5) * textHeight(cm.display)); + } else if (unit == "line") { + y = dir > 0 ? pos.bottom + 3 : pos.top - 3; + } + for (;;) { + var target = coordsChar(cm, x, y); + if (!target.outside) break; + if (dir < 0 ? y <= 0 : y >= doc.height) { target.hitSide = true; break; } + y += dir * 5; + } + return target; + } + + function findWordAt(line, pos) { + var start = pos.ch, end = pos.ch; + if (line) { + if ((pos.xRel < 0 || end == line.length) && start) --start; else ++end; + var startChar = line.charAt(start); + var check = isWordChar(startChar) ? isWordChar + : /\s/.test(startChar) ? function(ch) {return /\s/.test(ch);} + : function(ch) {return !/\s/.test(ch) && !isWordChar(ch);}; + while (start > 0 && check(line.charAt(start - 1))) --start; + while (end < line.length && check(line.charAt(end))) ++end; + } + return {from: Pos(pos.line, start), to: Pos(pos.line, end)}; + } + + function selectLine(cm, line) { + extendSelection(cm.doc, Pos(line, 0), clipPos(cm.doc, Pos(line + 1, 0))); + } + + // PROTOTYPE + + // The publicly visible API. Note that operation(null, f) means + // 'wrap f in an operation, performed on its `this` parameter' + + CodeMirror.prototype = { + constructor: CodeMirror, + focus: function(){window.focus(); focusInput(this); fastPoll(this);}, + + setOption: function(option, value) { + var options = this.options, old = options[option]; + if (options[option] == value && option != "mode") return; + options[option] = value; + if (optionHandlers.hasOwnProperty(option)) + operation(this, optionHandlers[option])(this, value, old); + }, + + getOption: function(option) {return this.options[option];}, + getDoc: function() {return this.doc;}, + + addKeyMap: function(map, bottom) { + this.state.keyMaps[bottom ? "push" : "unshift"](map); + }, + removeKeyMap: function(map) { + var maps = this.state.keyMaps; + for (var i = 0; i < maps.length; ++i) + if (maps[i] == map || (typeof maps[i] != "string" && maps[i].name == map)) { + maps.splice(i, 1); + return true; + } + }, + + addOverlay: operation(null, function(spec, options) { + var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec); + if (mode.startState) throw new Error("Overlays may not be stateful."); + this.state.overlays.push({mode: mode, modeSpec: spec, opaque: options && options.opaque}); + this.state.modeGen++; + regChange(this); + }), + removeOverlay: operation(null, function(spec) { + var overlays = this.state.overlays; + for (var i = 0; i < overlays.length; ++i) { + var cur = overlays[i].modeSpec; + if (cur == spec || typeof spec == "string" && cur.name == spec) { + overlays.splice(i, 1); + this.state.modeGen++; + regChange(this); + return; + } + } + }), + + indentLine: operation(null, function(n, dir, aggressive) { + if (typeof dir != "string" && typeof dir != "number") { + if (dir == null) dir = this.options.smartIndent ? "smart" : "prev"; + else dir = dir ? "add" : "subtract"; + } + if (isLine(this.doc, n)) indentLine(this, n, dir, aggressive); + }), + indentSelection: operation(null, function(how) { + var sel = this.doc.sel; + if (posEq(sel.from, sel.to)) return indentLine(this, sel.from.line, how); + var e = sel.to.line - (sel.to.ch ? 0 : 1); + for (var i = sel.from.line; i <= e; ++i) indentLine(this, i, how); + }), + + // Fetch the parser token for a given character. Useful for hacks + // that want to inspect the mode state (say, for completion). + getTokenAt: function(pos, precise) { + var doc = this.doc; + pos = clipPos(doc, pos); + var state = getStateBefore(this, pos.line, precise), mode = this.doc.mode; + var line = getLine(doc, pos.line); + var stream = new StringStream(line.text, this.options.tabSize); + while (stream.pos < pos.ch && !stream.eol()) { + stream.start = stream.pos; + var style = mode.token(stream, state); + } + return {start: stream.start, + end: stream.pos, + string: stream.current(), + className: style || null, // Deprecated, use 'type' instead + type: style || null, + state: state}; + }, + + getTokenTypeAt: function(pos) { + pos = clipPos(this.doc, pos); + var styles = getLineStyles(this, getLine(this.doc, pos.line)); + var before = 0, after = (styles.length - 1) / 2, ch = pos.ch; + if (ch == 0) return styles[2]; + for (;;) { + var mid = (before + after) >> 1; + if ((mid ? styles[mid * 2 - 1] : 0) >= ch) after = mid; + else if (styles[mid * 2 + 1] < ch) before = mid + 1; + else return styles[mid * 2 + 2]; + } + }, + + getModeAt: function(pos) { + var mode = this.doc.mode; + if (!mode.innerMode) return mode; + return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode; + }, + + getHelper: function(pos, type) { + if (!helpers.hasOwnProperty(type)) return; + var help = helpers[type], mode = this.getModeAt(pos); + return mode[type] && help[mode[type]] || + mode.helperType && help[mode.helperType] || + help[mode.name]; + }, + + getStateAfter: function(line, precise) { + var doc = this.doc; + line = clipLine(doc, line == null ? doc.first + doc.size - 1: line); + return getStateBefore(this, line + 1, precise); + }, + + cursorCoords: function(start, mode) { + var pos, sel = this.doc.sel; + if (start == null) pos = sel.head; + else if (typeof start == "object") pos = clipPos(this.doc, start); + else pos = start ? sel.from : sel.to; + return cursorCoords(this, pos, mode || "page"); + }, + + charCoords: function(pos, mode) { + return charCoords(this, clipPos(this.doc, pos), mode || "page"); + }, + + coordsChar: function(coords, mode) { + coords = fromCoordSystem(this, coords, mode || "page"); + return coordsChar(this, coords.left, coords.top); + }, + + lineAtHeight: function(height, mode) { + height = fromCoordSystem(this, {top: height, left: 0}, mode || "page").top; + return lineAtHeight(this.doc, height + this.display.viewOffset); + }, + heightAtLine: function(line, mode) { + var end = false, last = this.doc.first + this.doc.size - 1; + if (line < this.doc.first) line = this.doc.first; + else if (line > last) { line = last; end = true; } + var lineObj = getLine(this.doc, line); + return intoCoordSystem(this, getLine(this.doc, line), {top: 0, left: 0}, mode || "page").top + + (end ? lineObj.height : 0); + }, + + defaultTextHeight: function() { return textHeight(this.display); }, + defaultCharWidth: function() { return charWidth(this.display); }, + + setGutterMarker: operation(null, function(line, gutterID, value) { + return changeLine(this, line, function(line) { + var markers = line.gutterMarkers || (line.gutterMarkers = {}); + markers[gutterID] = value; + if (!value && isEmpty(markers)) line.gutterMarkers = null; + return true; + }); + }), + + clearGutter: operation(null, function(gutterID) { + var cm = this, doc = cm.doc, i = doc.first; + doc.iter(function(line) { + if (line.gutterMarkers && line.gutterMarkers[gutterID]) { + line.gutterMarkers[gutterID] = null; + regChange(cm, i, i + 1); + if (isEmpty(line.gutterMarkers)) line.gutterMarkers = null; + } + ++i; + }); + }), + + addLineClass: operation(null, function(handle, where, cls) { + return changeLine(this, handle, function(line) { + var prop = where == "text" ? "textClass" : where == "background" ? "bgClass" : "wrapClass"; + if (!line[prop]) line[prop] = cls; + else if (new RegExp("(?:^|\\s)" + cls + "(?:$|\\s)").test(line[prop])) return false; + else line[prop] += " " + cls; + return true; + }); + }), + + removeLineClass: operation(null, function(handle, where, cls) { + return changeLine(this, handle, function(line) { + var prop = where == "text" ? "textClass" : where == "background" ? "bgClass" : "wrapClass"; + var cur = line[prop]; + if (!cur) return false; + else if (cls == null) line[prop] = null; + else { + var found = cur.match(new RegExp("(?:^|\\s+)" + cls + "(?:$|\\s+)")); + if (!found) return false; + var end = found.index + found[0].length; + line[prop] = cur.slice(0, found.index) + (!found.index || end == cur.length ? "" : " ") + cur.slice(end) || null; + } + return true; + }); + }), + + addLineWidget: operation(null, function(handle, node, options) { + return addLineWidget(this, handle, node, options); + }), + + removeLineWidget: function(widget) { widget.clear(); }, + + lineInfo: function(line) { + if (typeof line == "number") { + if (!isLine(this.doc, line)) return null; + var n = line; + line = getLine(this.doc, line); + if (!line) return null; + } else { + var n = lineNo(line); + if (n == null) return null; + } + return {line: n, handle: line, text: line.text, gutterMarkers: line.gutterMarkers, + textClass: line.textClass, bgClass: line.bgClass, wrapClass: line.wrapClass, + widgets: line.widgets}; + }, + + getViewport: function() { return {from: this.display.showingFrom, to: this.display.showingTo};}, + + addWidget: function(pos, node, scroll, vert, horiz) { + var display = this.display; + pos = cursorCoords(this, clipPos(this.doc, pos)); + var top = pos.bottom, left = pos.left; + node.style.position = "absolute"; + display.sizer.appendChild(node); + if (vert == "over") { + top = pos.top; + } else if (vert == "above" || vert == "near") { + var vspace = Math.max(display.wrapper.clientHeight, this.doc.height), + hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth); + // Default to positioning above (if specified and possible); otherwise default to positioning below + if ((vert == 'above' || pos.bottom + node.offsetHeight > vspace) && pos.top > node.offsetHeight) + top = pos.top - node.offsetHeight; + else if (pos.bottom + node.offsetHeight <= vspace) + top = pos.bottom; + if (left + node.offsetWidth > hspace) + left = hspace - node.offsetWidth; + } + node.style.top = top + "px"; + node.style.left = node.style.right = ""; + if (horiz == "right") { + left = display.sizer.clientWidth - node.offsetWidth; + node.style.right = "0px"; + } else { + if (horiz == "left") left = 0; + else if (horiz == "middle") left = (display.sizer.clientWidth - node.offsetWidth) / 2; + node.style.left = left + "px"; + } + if (scroll) + scrollIntoView(this, left, top, left + node.offsetWidth, top + node.offsetHeight); + }, + + triggerOnKeyDown: operation(null, onKeyDown), + + execCommand: function(cmd) {return commands[cmd](this);}, + + findPosH: function(from, amount, unit, visually) { + var dir = 1; + if (amount < 0) { dir = -1; amount = -amount; } + for (var i = 0, cur = clipPos(this.doc, from); i < amount; ++i) { + cur = findPosH(this.doc, cur, dir, unit, visually); + if (cur.hitSide) break; + } + return cur; + }, + + moveH: operation(null, function(dir, unit) { + var sel = this.doc.sel, pos; + if (sel.shift || sel.extend || posEq(sel.from, sel.to)) + pos = findPosH(this.doc, sel.head, dir, unit, this.options.rtlMoveVisually); + else + pos = dir < 0 ? sel.from : sel.to; + extendSelection(this.doc, pos, pos, dir); + }), + + deleteH: operation(null, function(dir, unit) { + var sel = this.doc.sel; + if (!posEq(sel.from, sel.to)) replaceRange(this.doc, "", sel.from, sel.to, "+delete"); + else replaceRange(this.doc, "", sel.from, findPosH(this.doc, sel.head, dir, unit, false), "+delete"); + this.curOp.userSelChange = true; + }), + + findPosV: function(from, amount, unit, goalColumn) { + var dir = 1, x = goalColumn; + if (amount < 0) { dir = -1; amount = -amount; } + for (var i = 0, cur = clipPos(this.doc, from); i < amount; ++i) { + var coords = cursorCoords(this, cur, "div"); + if (x == null) x = coords.left; + else coords.left = x; + cur = findPosV(this, coords, dir, unit); + if (cur.hitSide) break; + } + return cur; + }, + + moveV: operation(null, function(dir, unit) { + var sel = this.doc.sel; + var pos = cursorCoords(this, sel.head, "div"); + if (sel.goalColumn != null) pos.left = sel.goalColumn; + var target = findPosV(this, pos, dir, unit); + + if (unit == "page") addToScrollPos(this, 0, charCoords(this, target, "div").top - pos.top); + extendSelection(this.doc, target, target, dir); + sel.goalColumn = pos.left; + }), + + toggleOverwrite: function(value) { + if (value != null && value == this.state.overwrite) return; + if (this.state.overwrite = !this.state.overwrite) + this.display.cursor.className += " CodeMirror-overwrite"; + else + this.display.cursor.className = this.display.cursor.className.replace(" CodeMirror-overwrite", ""); + }, + hasFocus: function() { return this.state.focused; }, + + scrollTo: operation(null, function(x, y) { + updateScrollPos(this, x, y); + }), + getScrollInfo: function() { + var scroller = this.display.scroller, co = scrollerCutOff; + return {left: scroller.scrollLeft, top: scroller.scrollTop, + height: scroller.scrollHeight - co, width: scroller.scrollWidth - co, + clientHeight: scroller.clientHeight - co, clientWidth: scroller.clientWidth - co}; + }, + + scrollIntoView: operation(null, function(range, margin) { + if (range == null) range = {from: this.doc.sel.head, to: null}; + else if (typeof range == "number") range = {from: Pos(range, 0), to: null}; + else if (range.from == null) range = {from: range, to: null}; + if (!range.to) range.to = range.from; + if (!margin) margin = 0; + + var coords = range; + if (range.from.line != null) { + this.curOp.scrollToPos = {from: range.from, to: range.to, margin: margin}; + coords = {from: cursorCoords(this, range.from), + to: cursorCoords(this, range.to)}; + } + var sPos = calculateScrollPos(this, Math.min(coords.from.left, coords.to.left), + Math.min(coords.from.top, coords.to.top) - margin, + Math.max(coords.from.right, coords.to.right), + Math.max(coords.from.bottom, coords.to.bottom) + margin); + updateScrollPos(this, sPos.scrollLeft, sPos.scrollTop); + }), + + setSize: operation(null, function(width, height) { + function interpret(val) { + return typeof val == "number" || /^\d+$/.test(String(val)) ? val + "px" : val; + } + if (width != null) this.display.wrapper.style.width = interpret(width); + if (height != null) this.display.wrapper.style.height = interpret(height); + if (this.options.lineWrapping) + this.display.measureLineCache.length = this.display.measureLineCachePos = 0; + this.curOp.forceUpdate = true; + }), + + operation: function(f){return runInOp(this, f);}, + + refresh: operation(null, function() { + var badHeight = this.display.cachedTextHeight == null; + clearCaches(this); + updateScrollPos(this, this.doc.scrollLeft, this.doc.scrollTop); + regChange(this); + if (badHeight) estimateLineHeights(this); + }), + + swapDoc: operation(null, function(doc) { + var old = this.doc; + old.cm = null; + attachDoc(this, doc); + clearCaches(this); + resetInput(this, true); + updateScrollPos(this, doc.scrollLeft, doc.scrollTop); + signalLater(this, "swapDoc", this, old); + return old; + }), + + getInputField: function(){return this.display.input;}, + getWrapperElement: function(){return this.display.wrapper;}, + getScrollerElement: function(){return this.display.scroller;}, + getGutterElement: function(){return this.display.gutters;} + }; + eventMixin(CodeMirror); + + // OPTION DEFAULTS + + var optionHandlers = CodeMirror.optionHandlers = {}; + + // The default configuration options. + var defaults = CodeMirror.defaults = {}; + + function option(name, deflt, handle, notOnInit) { + CodeMirror.defaults[name] = deflt; + if (handle) optionHandlers[name] = + notOnInit ? function(cm, val, old) {if (old != Init) handle(cm, val, old);} : handle; + } + + var Init = CodeMirror.Init = {toString: function(){return "CodeMirror.Init";}}; + + // These two are, on init, called from the constructor because they + // have to be initialized before the editor can start at all. + option("value", "", function(cm, val) { + cm.setValue(val); + }, true); + option("mode", null, function(cm, val) { + cm.doc.modeOption = val; + loadMode(cm); + }, true); + + option("indentUnit", 2, loadMode, true); + option("indentWithTabs", false); + option("smartIndent", true); + option("tabSize", 4, function(cm) { + loadMode(cm); + clearCaches(cm); + regChange(cm); + }, true); + option("specialChars", /[\t\u0000-\u0019\u00ad\u200b\u2028\u2029\ufeff]/g, function(cm, val) { + cm.options.specialChars = new RegExp(val.source + (val.test("\t") ? "" : "|\t"), "g"); + cm.refresh(); + }, true); + option("specialCharPlaceholder", defaultSpecialCharPlaceholder, function(cm) {cm.refresh();}, true); + option("electricChars", true); + option("rtlMoveVisually", !windows); + option("wholeLineUpdateBefore", true); + + option("theme", "default", function(cm) { + themeChanged(cm); + guttersChanged(cm); + }, true); + option("keyMap", "default", keyMapChanged); + option("extraKeys", null); + + option("onKeyEvent", null); + option("onDragEvent", null); + + option("lineWrapping", false, wrappingChanged, true); + option("gutters", [], function(cm) { + setGuttersForLineNumbers(cm.options); + guttersChanged(cm); + }, true); + option("fixedGutter", true, function(cm, val) { + cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + "px" : "0"; + cm.refresh(); + }, true); + option("coverGutterNextToScrollbar", false, updateScrollbars, true); + option("lineNumbers", false, function(cm) { + setGuttersForLineNumbers(cm.options); + guttersChanged(cm); + }, true); + option("firstLineNumber", 1, guttersChanged, true); + option("lineNumberFormatter", function(integer) {return integer;}, guttersChanged, true); + option("showCursorWhenSelecting", false, updateSelection, true); + + option("resetSelectionOnContextMenu", true); + + option("readOnly", false, function(cm, val) { + if (val == "nocursor") { + onBlur(cm); + cm.display.input.blur(); + cm.display.disabled = true; + } else { + cm.display.disabled = false; + if (!val) resetInput(cm, true); + } + }); + option("dragDrop", true); + + option("cursorBlinkRate", 530); + option("cursorScrollMargin", 0); + option("cursorHeight", 1); + option("workTime", 100); + option("workDelay", 100); + option("flattenSpans", true); + option("pollInterval", 100); + option("undoDepth", 40, function(cm, val){cm.doc.history.undoDepth = val;}); + option("historyEventDelay", 500); + option("viewportMargin", 10, function(cm){cm.refresh();}, true); + option("maxHighlightLength", 10000, function(cm){loadMode(cm); cm.refresh();}, true); + option("crudeMeasuringFrom", 10000); + option("moveInputWithCursor", true, function(cm, val) { + if (!val) cm.display.inputDiv.style.top = cm.display.inputDiv.style.left = 0; + }); + + option("tabindex", null, function(cm, val) { + cm.display.input.tabIndex = val || ""; + }); + option("autofocus", null); + + // MODE DEFINITION AND QUERYING + + // Known modes, by name and by MIME + var modes = CodeMirror.modes = {}, mimeModes = CodeMirror.mimeModes = {}; + + CodeMirror.defineMode = function(name, mode) { + if (!CodeMirror.defaults.mode && name != "null") CodeMirror.defaults.mode = name; + if (arguments.length > 2) { + mode.dependencies = []; + for (var i = 2; i < arguments.length; ++i) mode.dependencies.push(arguments[i]); + } + modes[name] = mode; + }; + + CodeMirror.defineMIME = function(mime, spec) { + mimeModes[mime] = spec; + }; + + CodeMirror.resolveMode = function(spec) { + if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) { + spec = mimeModes[spec]; + } else if (spec && typeof spec.name == "string" && mimeModes.hasOwnProperty(spec.name)) { + var found = mimeModes[spec.name]; + spec = createObj(found, spec); + spec.name = found.name; + } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(spec)) { + return CodeMirror.resolveMode("application/xml"); + } + if (typeof spec == "string") return {name: spec}; + else return spec || {name: "null"}; + }; + + CodeMirror.getMode = function(options, spec) { + var spec = CodeMirror.resolveMode(spec); + var mfactory = modes[spec.name]; + if (!mfactory) return CodeMirror.getMode(options, "text/plain"); + var modeObj = mfactory(options, spec); + if (modeExtensions.hasOwnProperty(spec.name)) { + var exts = modeExtensions[spec.name]; + for (var prop in exts) { + if (!exts.hasOwnProperty(prop)) continue; + if (modeObj.hasOwnProperty(prop)) modeObj["_" + prop] = modeObj[prop]; + modeObj[prop] = exts[prop]; + } + } + modeObj.name = spec.name; + + return modeObj; + }; + + CodeMirror.defineMode("null", function() { + return {token: function(stream) {stream.skipToEnd();}}; + }); + CodeMirror.defineMIME("text/plain", "null"); + + var modeExtensions = CodeMirror.modeExtensions = {}; + CodeMirror.extendMode = function(mode, properties) { + var exts = modeExtensions.hasOwnProperty(mode) ? modeExtensions[mode] : (modeExtensions[mode] = {}); + copyObj(properties, exts); + }; + + // EXTENSIONS + + CodeMirror.defineExtension = function(name, func) { + CodeMirror.prototype[name] = func; + }; + CodeMirror.defineDocExtension = function(name, func) { + Doc.prototype[name] = func; + }; + CodeMirror.defineOption = option; + + var initHooks = []; + CodeMirror.defineInitHook = function(f) {initHooks.push(f);}; + + var helpers = CodeMirror.helpers = {}; + CodeMirror.registerHelper = function(type, name, value) { + if (!helpers.hasOwnProperty(type)) helpers[type] = CodeMirror[type] = {}; + helpers[type][name] = value; + }; + + // UTILITIES + + CodeMirror.isWordChar = isWordChar; + + // MODE STATE HANDLING + + // Utility functions for working with state. Exported because modes + // sometimes need to do this. + function copyState(mode, state) { + if (state === true) return state; + if (mode.copyState) return mode.copyState(state); + var nstate = {}; + for (var n in state) { + var val = state[n]; + if (val instanceof Array) val = val.concat([]); + nstate[n] = val; + } + return nstate; + } + CodeMirror.copyState = copyState; + + function startState(mode, a1, a2) { + return mode.startState ? mode.startState(a1, a2) : true; + } + CodeMirror.startState = startState; + + CodeMirror.innerMode = function(mode, state) { + while (mode.innerMode) { + var info = mode.innerMode(state); + if (!info || info.mode == mode) break; + state = info.state; + mode = info.mode; + } + return info || {mode: mode, state: state}; + }; + + // STANDARD COMMANDS + + var commands = CodeMirror.commands = { + selectAll: function(cm) {cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()));}, + killLine: function(cm) { + var from = cm.getCursor(true), to = cm.getCursor(false), sel = !posEq(from, to); + if (!sel && cm.getLine(from.line).length == from.ch) + cm.replaceRange("", from, Pos(from.line + 1, 0), "+delete"); + else cm.replaceRange("", from, sel ? to : Pos(from.line), "+delete"); + }, + deleteLine: function(cm) { + var l = cm.getCursor().line; + cm.replaceRange("", Pos(l, 0), Pos(l), "+delete"); + }, + delLineLeft: function(cm) { + var cur = cm.getCursor(); + cm.replaceRange("", Pos(cur.line, 0), cur, "+delete"); + }, + undo: function(cm) {cm.undo();}, + redo: function(cm) {cm.redo();}, + goDocStart: function(cm) {cm.extendSelection(Pos(cm.firstLine(), 0));}, + goDocEnd: function(cm) {cm.extendSelection(Pos(cm.lastLine()));}, + goLineStart: function(cm) { + cm.extendSelection(lineStart(cm, cm.getCursor().line)); + }, + goLineStartSmart: function(cm) { + var cur = cm.getCursor(), start = lineStart(cm, cur.line); + var line = cm.getLineHandle(start.line); + var order = getOrder(line); + if (!order || order[0].level == 0) { + var firstNonWS = Math.max(0, line.text.search(/\S/)); + var inWS = cur.line == start.line && cur.ch <= firstNonWS && cur.ch; + cm.extendSelection(Pos(start.line, inWS ? 0 : firstNonWS)); + } else cm.extendSelection(start); + }, + goLineEnd: function(cm) { + cm.extendSelection(lineEnd(cm, cm.getCursor().line)); + }, + goLineRight: function(cm) { + var top = cm.charCoords(cm.getCursor(), "div").top + 5; + cm.extendSelection(cm.coordsChar({left: cm.display.lineDiv.offsetWidth + 100, top: top}, "div")); + }, + goLineLeft: function(cm) { + var top = cm.charCoords(cm.getCursor(), "div").top + 5; + cm.extendSelection(cm.coordsChar({left: 0, top: top}, "div")); + }, + goLineUp: function(cm) {cm.moveV(-1, "line");}, + goLineDown: function(cm) {cm.moveV(1, "line");}, + goPageUp: function(cm) {cm.moveV(-1, "page");}, + goPageDown: function(cm) {cm.moveV(1, "page");}, + goCharLeft: function(cm) {cm.moveH(-1, "char");}, + goCharRight: function(cm) {cm.moveH(1, "char");}, + goColumnLeft: function(cm) {cm.moveH(-1, "column");}, + goColumnRight: function(cm) {cm.moveH(1, "column");}, + goWordLeft: function(cm) {cm.moveH(-1, "word");}, + goGroupRight: function(cm) {cm.moveH(1, "group");}, + goGroupLeft: function(cm) {cm.moveH(-1, "group");}, + goWordRight: function(cm) {cm.moveH(1, "word");}, + delCharBefore: function(cm) {cm.deleteH(-1, "char");}, + delCharAfter: function(cm) {cm.deleteH(1, "char");}, + delWordBefore: function(cm) {cm.deleteH(-1, "word");}, + delWordAfter: function(cm) {cm.deleteH(1, "word");}, + delGroupBefore: function(cm) {cm.deleteH(-1, "group");}, + delGroupAfter: function(cm) {cm.deleteH(1, "group");}, + indentAuto: function(cm) {cm.indentSelection("smart");}, + indentMore: function(cm) {cm.indentSelection("add");}, + indentLess: function(cm) {cm.indentSelection("subtract");}, + insertTab: function(cm) {cm.replaceSelection("\t", "end", "+input");}, + defaultTab: function(cm) { + if (cm.somethingSelected()) cm.indentSelection("add"); + else cm.replaceSelection("\t", "end", "+input"); + }, + transposeChars: function(cm) { + var cur = cm.getCursor(), line = cm.getLine(cur.line); + if (cur.ch > 0 && cur.ch < line.length - 1) + cm.replaceRange(line.charAt(cur.ch) + line.charAt(cur.ch - 1), + Pos(cur.line, cur.ch - 1), Pos(cur.line, cur.ch + 1)); + }, + newlineAndIndent: function(cm) { + operation(cm, function() { + cm.replaceSelection("\n", "end", "+input"); + cm.indentLine(cm.getCursor().line, null, true); + })(); + }, + toggleOverwrite: function(cm) {cm.toggleOverwrite();} + }; + + // STANDARD KEYMAPS + + var keyMap = CodeMirror.keyMap = {}; + keyMap.basic = { + "Left": "goCharLeft", "Right": "goCharRight", "Up": "goLineUp", "Down": "goLineDown", + "End": "goLineEnd", "Home": "goLineStartSmart", "PageUp": "goPageUp", "PageDown": "goPageDown", + "Delete": "delCharAfter", "Backspace": "delCharBefore", "Shift-Backspace": "delCharBefore", + "Tab": "defaultTab", "Shift-Tab": "indentAuto", + "Enter": "newlineAndIndent", "Insert": "toggleOverwrite" + }; + // Note that the save and find-related commands aren't defined by + // default. Unknown commands are simply ignored. + keyMap.pcDefault = { + "Ctrl-A": "selectAll", "Ctrl-D": "deleteLine", "Ctrl-Z": "undo", "Shift-Ctrl-Z": "redo", "Ctrl-Y": "redo", + "Ctrl-Home": "goDocStart", "Alt-Up": "goDocStart", "Ctrl-End": "goDocEnd", "Ctrl-Down": "goDocEnd", + "Ctrl-Left": "goGroupLeft", "Ctrl-Right": "goGroupRight", "Alt-Left": "goLineStart", "Alt-Right": "goLineEnd", + "Ctrl-Backspace": "delGroupBefore", "Ctrl-Delete": "delGroupAfter", "Ctrl-S": "save", "Ctrl-F": "find", + "Ctrl-G": "findNext", "Shift-Ctrl-G": "findPrev", "Shift-Ctrl-F": "replace", "Shift-Ctrl-R": "replaceAll", + "Ctrl-[": "indentLess", "Ctrl-]": "indentMore", + fallthrough: "basic" + }; + keyMap.macDefault = { + "Cmd-A": "selectAll", "Cmd-D": "deleteLine", "Cmd-Z": "undo", "Shift-Cmd-Z": "redo", "Cmd-Y": "redo", + "Cmd-Up": "goDocStart", "Cmd-End": "goDocEnd", "Cmd-Down": "goDocEnd", "Alt-Left": "goGroupLeft", + "Alt-Right": "goGroupRight", "Cmd-Left": "goLineStart", "Cmd-Right": "goLineEnd", "Alt-Backspace": "delGroupBefore", + "Ctrl-Alt-Backspace": "delGroupAfter", "Alt-Delete": "delGroupAfter", "Cmd-S": "save", "Cmd-F": "find", + "Cmd-G": "findNext", "Shift-Cmd-G": "findPrev", "Cmd-Alt-F": "replace", "Shift-Cmd-Alt-F": "replaceAll", + "Cmd-[": "indentLess", "Cmd-]": "indentMore", "Cmd-Backspace": "delLineLeft", + fallthrough: ["basic", "emacsy"] + }; + keyMap["default"] = mac ? keyMap.macDefault : keyMap.pcDefault; + keyMap.emacsy = { + "Ctrl-F": "goCharRight", "Ctrl-B": "goCharLeft", "Ctrl-P": "goLineUp", "Ctrl-N": "goLineDown", + "Alt-F": "goWordRight", "Alt-B": "goWordLeft", "Ctrl-A": "goLineStart", "Ctrl-E": "goLineEnd", + "Ctrl-V": "goPageDown", "Shift-Ctrl-V": "goPageUp", "Ctrl-D": "delCharAfter", "Ctrl-H": "delCharBefore", + "Alt-D": "delWordAfter", "Alt-Backspace": "delWordBefore", "Ctrl-K": "killLine", "Ctrl-T": "transposeChars" + }; + + // KEYMAP DISPATCH + + function getKeyMap(val) { + if (typeof val == "string") return keyMap[val]; + else return val; + } + + function lookupKey(name, maps, handle) { + function lookup(map) { + map = getKeyMap(map); + var found = map[name]; + if (found === false) return "stop"; + if (found != null && handle(found)) return true; + if (map.nofallthrough) return "stop"; + + var fallthrough = map.fallthrough; + if (fallthrough == null) return false; + if (Object.prototype.toString.call(fallthrough) != "[object Array]") + return lookup(fallthrough); + for (var i = 0, e = fallthrough.length; i < e; ++i) { + var done = lookup(fallthrough[i]); + if (done) return done; + } + return false; + } + + for (var i = 0; i < maps.length; ++i) { + var done = lookup(maps[i]); + if (done) return done != "stop"; + } + } + function isModifierKey(event) { + var name = keyNames[event.keyCode]; + return name == "Ctrl" || name == "Alt" || name == "Shift" || name == "Mod"; + } + function keyName(event, noShift) { + if (opera && event.keyCode == 34 && event["char"]) return false; + var name = keyNames[event.keyCode]; + if (name == null || event.altGraphKey) return false; + if (event.altKey) name = "Alt-" + name; + if (flipCtrlCmd ? event.metaKey : event.ctrlKey) name = "Ctrl-" + name; + if (flipCtrlCmd ? event.ctrlKey : event.metaKey) name = "Cmd-" + name; + if (!noShift && event.shiftKey) name = "Shift-" + name; + return name; + } + CodeMirror.lookupKey = lookupKey; + CodeMirror.isModifierKey = isModifierKey; + CodeMirror.keyName = keyName; + + // FROMTEXTAREA + + CodeMirror.fromTextArea = function(textarea, options) { + if (!options) options = {}; + options.value = textarea.value; + if (!options.tabindex && textarea.tabindex) + options.tabindex = textarea.tabindex; + if (!options.placeholder && textarea.placeholder) + options.placeholder = textarea.placeholder; + // Set autofocus to true if this textarea is focused, or if it has + // autofocus and no other element is focused. + if (options.autofocus == null) { + var hasFocus = document.body; + // doc.activeElement occasionally throws on IE + try { hasFocus = document.activeElement; } catch(e) {} + options.autofocus = hasFocus == textarea || + textarea.getAttribute("autofocus") != null && hasFocus == document.body; + } + + function save() {textarea.value = cm.getValue();} + if (textarea.form) { + on(textarea.form, "submit", save); + // Deplorable hack to make the submit method do the right thing. + if (!options.leaveSubmitMethodAlone) { + var form = textarea.form, realSubmit = form.submit; + try { + var wrappedSubmit = form.submit = function() { + save(); + form.submit = realSubmit; + form.submit(); + form.submit = wrappedSubmit; + }; + } catch(e) {} + } + } + + textarea.style.display = "none"; + var cm = CodeMirror(function(node) { + textarea.parentNode.insertBefore(node, textarea.nextSibling); + }, options); + cm.save = save; + cm.getTextArea = function() { return textarea; }; + cm.toTextArea = function() { + save(); + textarea.parentNode.removeChild(cm.getWrapperElement()); + textarea.style.display = ""; + if (textarea.form) { + off(textarea.form, "submit", save); + if (typeof textarea.form.submit == "function") + textarea.form.submit = realSubmit; + } + }; + return cm; + }; + + // STRING STREAM + + // Fed to the mode parsers, provides helper functions to make + // parsers more succinct. + + // The character stream used by a mode's parser. + function StringStream(string, tabSize) { + this.pos = this.start = 0; + this.string = string; + this.tabSize = tabSize || 8; + this.lastColumnPos = this.lastColumnValue = 0; + } + + StringStream.prototype = { + eol: function() {return this.pos >= this.string.length;}, + sol: function() {return this.pos == 0;}, + peek: function() {return this.string.charAt(this.pos) || undefined;}, + next: function() { + if (this.pos < this.string.length) + return this.string.charAt(this.pos++); + }, + eat: function(match) { + var ch = this.string.charAt(this.pos); + if (typeof match == "string") var ok = ch == match; + else var ok = ch && (match.test ? match.test(ch) : match(ch)); + if (ok) {++this.pos; return ch;} + }, + eatWhile: function(match) { + var start = this.pos; + while (this.eat(match)){} + return this.pos > start; + }, + eatSpace: function() { + var start = this.pos; + while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) ++this.pos; + return this.pos > start; + }, + skipToEnd: function() {this.pos = this.string.length;}, + skipTo: function(ch) { + var found = this.string.indexOf(ch, this.pos); + if (found > -1) {this.pos = found; return true;} + }, + backUp: function(n) {this.pos -= n;}, + column: function() { + if (this.lastColumnPos < this.start) { + this.lastColumnValue = countColumn(this.string, this.start, this.tabSize, this.lastColumnPos, this.lastColumnValue); + this.lastColumnPos = this.start; + } + return this.lastColumnValue; + }, + indentation: function() {return countColumn(this.string, null, this.tabSize);}, + match: function(pattern, consume, caseInsensitive) { + if (typeof pattern == "string") { + var cased = function(str) {return caseInsensitive ? str.toLowerCase() : str;}; + var substr = this.string.substr(this.pos, pattern.length); + if (cased(substr) == cased(pattern)) { + if (consume !== false) this.pos += pattern.length; + return true; + } + } else { + var match = this.string.slice(this.pos).match(pattern); + if (match && match.index > 0) return null; + if (match && consume !== false) this.pos += match[0].length; + return match; + } + }, + current: function(){return this.string.slice(this.start, this.pos);} + }; + CodeMirror.StringStream = StringStream; + + // TEXTMARKERS + + function TextMarker(doc, type) { + this.lines = []; + this.type = type; + this.doc = doc; + } + CodeMirror.TextMarker = TextMarker; + eventMixin(TextMarker); + + TextMarker.prototype.clear = function() { + if (this.explicitlyCleared) return; + var cm = this.doc.cm, withOp = cm && !cm.curOp; + if (withOp) startOperation(cm); + if (hasHandler(this, "clear")) { + var found = this.find(); + if (found) signalLater(this, "clear", found.from, found.to); + } + var min = null, max = null; + for (var i = 0; i < this.lines.length; ++i) { + var line = this.lines[i]; + var span = getMarkedSpanFor(line.markedSpans, this); + if (span.to != null) max = lineNo(line); + line.markedSpans = removeMarkedSpan(line.markedSpans, span); + if (span.from != null) + min = lineNo(line); + else if (this.collapsed && !lineIsHidden(this.doc, line) && cm) + updateLineHeight(line, textHeight(cm.display)); + } + if (cm && this.collapsed && !cm.options.lineWrapping) for (var i = 0; i < this.lines.length; ++i) { + var visual = visualLine(cm.doc, this.lines[i]), len = lineLength(cm.doc, visual); + if (len > cm.display.maxLineLength) { + cm.display.maxLine = visual; + cm.display.maxLineLength = len; + cm.display.maxLineChanged = true; + } + } + + if (min != null && cm) regChange(cm, min, max + 1); + this.lines.length = 0; + this.explicitlyCleared = true; + if (this.atomic && this.doc.cantEdit) { + this.doc.cantEdit = false; + if (cm) reCheckSelection(cm); + } + if (withOp) endOperation(cm); + }; + + TextMarker.prototype.find = function() { + var from, to; + for (var i = 0; i < this.lines.length; ++i) { + var line = this.lines[i]; + var span = getMarkedSpanFor(line.markedSpans, this); + if (span.from != null || span.to != null) { + var found = lineNo(line); + if (span.from != null) from = Pos(found, span.from); + if (span.to != null) to = Pos(found, span.to); + } + } + if (this.type == "bookmark") return from; + return from && {from: from, to: to}; + }; + + TextMarker.prototype.changed = function() { + var pos = this.find(), cm = this.doc.cm; + if (!pos || !cm) return; + if (this.type != "bookmark") pos = pos.from; + var line = getLine(this.doc, pos.line); + clearCachedMeasurement(cm, line); + if (pos.line >= cm.display.showingFrom && pos.line < cm.display.showingTo) { + for (var node = cm.display.lineDiv.firstChild; node; node = node.nextSibling) if (node.lineObj == line) { + if (node.offsetHeight != line.height) updateLineHeight(line, node.offsetHeight); + break; + } + runInOp(cm, function() { + cm.curOp.selectionChanged = cm.curOp.forceUpdate = cm.curOp.updateMaxLine = true; + }); + } + }; + + TextMarker.prototype.attachLine = function(line) { + if (!this.lines.length && this.doc.cm) { + var op = this.doc.cm.curOp; + if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1) + (op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this); + } + this.lines.push(line); + }; + TextMarker.prototype.detachLine = function(line) { + this.lines.splice(indexOf(this.lines, line), 1); + if (!this.lines.length && this.doc.cm) { + var op = this.doc.cm.curOp; + (op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this); + } + }; + + function markText(doc, from, to, options, type) { + if (options && options.shared) return markTextShared(doc, from, to, options, type); + if (doc.cm && !doc.cm.curOp) return operation(doc.cm, markText)(doc, from, to, options, type); + + var marker = new TextMarker(doc, type); + if (posLess(to, from) || posEq(from, to) && type == "range" && + !(options.inclusiveLeft && options.inclusiveRight)) + return marker; + if (options) copyObj(options, marker); + if (marker.replacedWith) { + marker.collapsed = true; + marker.replacedWith = elt("span", [marker.replacedWith], "CodeMirror-widget"); + if (!options.handleMouseEvents) marker.replacedWith.ignoreEvents = true; + } + if (marker.collapsed) sawCollapsedSpans = true; + + if (marker.addToHistory) + addToHistory(doc, {from: from, to: to, origin: "markText"}, + {head: doc.sel.head, anchor: doc.sel.anchor}, NaN); + + var curLine = from.line, size = 0, collapsedAtStart, collapsedAtEnd, cm = doc.cm, updateMaxLine; + doc.iter(curLine, to.line + 1, function(line) { + if (cm && marker.collapsed && !cm.options.lineWrapping && visualLine(doc, line) == cm.display.maxLine) + updateMaxLine = true; + var span = {from: null, to: null, marker: marker}; + size += line.text.length; + if (curLine == from.line) {span.from = from.ch; size -= from.ch;} + if (curLine == to.line) {span.to = to.ch; size -= line.text.length - to.ch;} + if (marker.collapsed) { + if (curLine == to.line) collapsedAtEnd = collapsedSpanAt(line, to.ch); + if (curLine == from.line) collapsedAtStart = collapsedSpanAt(line, from.ch); + else updateLineHeight(line, 0); + } + addMarkedSpan(line, span); + ++curLine; + }); + if (marker.collapsed) doc.iter(from.line, to.line + 1, function(line) { + if (lineIsHidden(doc, line)) updateLineHeight(line, 0); + }); + + if (marker.clearOnEnter) on(marker, "beforeCursorEnter", function() { marker.clear(); }); + + if (marker.readOnly) { + sawReadOnlySpans = true; + if (doc.history.done.length || doc.history.undone.length) + doc.clearHistory(); + } + if (marker.collapsed) { + if (collapsedAtStart != collapsedAtEnd) + throw new Error("Inserting collapsed marker overlapping an existing one"); + marker.size = size; + marker.atomic = true; + } + if (cm) { + if (updateMaxLine) cm.curOp.updateMaxLine = true; + if (marker.className || marker.title || marker.startStyle || marker.endStyle || marker.collapsed) + regChange(cm, from.line, to.line + 1); + if (marker.atomic) reCheckSelection(cm); + } + return marker; + } + + // SHARED TEXTMARKERS + + function SharedTextMarker(markers, primary) { + this.markers = markers; + this.primary = primary; + for (var i = 0, me = this; i < markers.length; ++i) { + markers[i].parent = this; + on(markers[i], "clear", function(){me.clear();}); + } + } + CodeMirror.SharedTextMarker = SharedTextMarker; + eventMixin(SharedTextMarker); + + SharedTextMarker.prototype.clear = function() { + if (this.explicitlyCleared) return; + this.explicitlyCleared = true; + for (var i = 0; i < this.markers.length; ++i) + this.markers[i].clear(); + signalLater(this, "clear"); + }; + SharedTextMarker.prototype.find = function() { + return this.primary.find(); + }; + + function markTextShared(doc, from, to, options, type) { + options = copyObj(options); + options.shared = false; + var markers = [markText(doc, from, to, options, type)], primary = markers[0]; + var widget = options.replacedWith; + linkedDocs(doc, function(doc) { + if (widget) options.replacedWith = widget.cloneNode(true); + markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type)); + for (var i = 0; i < doc.linked.length; ++i) + if (doc.linked[i].isParent) return; + primary = lst(markers); + }); + return new SharedTextMarker(markers, primary); + } + + // TEXTMARKER SPANS + + function getMarkedSpanFor(spans, marker) { + if (spans) for (var i = 0; i < spans.length; ++i) { + var span = spans[i]; + if (span.marker == marker) return span; + } + } + function removeMarkedSpan(spans, span) { + for (var r, i = 0; i < spans.length; ++i) + if (spans[i] != span) (r || (r = [])).push(spans[i]); + return r; + } + function addMarkedSpan(line, span) { + line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span]; + span.marker.attachLine(line); + } + + function markedSpansBefore(old, startCh, isInsert) { + if (old) for (var i = 0, nw; i < old.length; ++i) { + var span = old[i], marker = span.marker; + var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh); + if (startsBefore || + (marker.inclusiveLeft && marker.inclusiveRight || marker.type == "bookmark") && + span.from == startCh && (!isInsert || !span.marker.insertLeft)) { + var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= startCh : span.to > startCh); + (nw || (nw = [])).push({from: span.from, + to: endsAfter ? null : span.to, + marker: marker}); + } + } + return nw; + } + + function markedSpansAfter(old, endCh, isInsert) { + if (old) for (var i = 0, nw; i < old.length; ++i) { + var span = old[i], marker = span.marker; + var endsAfter = span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh); + if (endsAfter || marker.type == "bookmark" && span.from == endCh && (!isInsert || span.marker.insertLeft)) { + var startsBefore = span.from == null || (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh); + (nw || (nw = [])).push({from: startsBefore ? null : span.from - endCh, + to: span.to == null ? null : span.to - endCh, + marker: marker}); + } + } + return nw; + } + + function stretchSpansOverChange(doc, change) { + var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans; + var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans; + if (!oldFirst && !oldLast) return null; + + var startCh = change.from.ch, endCh = change.to.ch, isInsert = posEq(change.from, change.to); + // Get the spans that 'stick out' on both sides + var first = markedSpansBefore(oldFirst, startCh, isInsert); + var last = markedSpansAfter(oldLast, endCh, isInsert); + + // Next, merge those two ends + var sameLine = change.text.length == 1, offset = lst(change.text).length + (sameLine ? startCh : 0); + if (first) { + // Fix up .to properties of first + for (var i = 0; i < first.length; ++i) { + var span = first[i]; + if (span.to == null) { + var found = getMarkedSpanFor(last, span.marker); + if (!found) span.to = startCh; + else if (sameLine) span.to = found.to == null ? null : found.to + offset; + } + } + } + if (last) { + // Fix up .from in last (or move them into first in case of sameLine) + for (var i = 0; i < last.length; ++i) { + var span = last[i]; + if (span.to != null) span.to += offset; + if (span.from == null) { + var found = getMarkedSpanFor(first, span.marker); + if (!found) { + span.from = offset; + if (sameLine) (first || (first = [])).push(span); + } + } else { + span.from += offset; + if (sameLine) (first || (first = [])).push(span); + } + } + } + if (sameLine && first) { + // Make sure we didn't create any zero-length spans + for (var i = 0; i < first.length; ++i) + if (first[i].from != null && first[i].from == first[i].to && first[i].marker.type != "bookmark") + first.splice(i--, 1); + if (!first.length) first = null; + } + + var newMarkers = [first]; + if (!sameLine) { + // Fill gap with whole-line-spans + var gap = change.text.length - 2, gapMarkers; + if (gap > 0 && first) + for (var i = 0; i < first.length; ++i) + if (first[i].to == null) + (gapMarkers || (gapMarkers = [])).push({from: null, to: null, marker: first[i].marker}); + for (var i = 0; i < gap; ++i) + newMarkers.push(gapMarkers); + newMarkers.push(last); + } + return newMarkers; + } + + function mergeOldSpans(doc, change) { + var old = getOldSpans(doc, change); + var stretched = stretchSpansOverChange(doc, change); + if (!old) return stretched; + if (!stretched) return old; + + for (var i = 0; i < old.length; ++i) { + var oldCur = old[i], stretchCur = stretched[i]; + if (oldCur && stretchCur) { + spans: for (var j = 0; j < stretchCur.length; ++j) { + var span = stretchCur[j]; + for (var k = 0; k < oldCur.length; ++k) + if (oldCur[k].marker == span.marker) continue spans; + oldCur.push(span); + } + } else if (stretchCur) { + old[i] = stretchCur; + } + } + return old; + } + + function removeReadOnlyRanges(doc, from, to) { + var markers = null; + doc.iter(from.line, to.line + 1, function(line) { + if (line.markedSpans) for (var i = 0; i < line.markedSpans.length; ++i) { + var mark = line.markedSpans[i].marker; + if (mark.readOnly && (!markers || indexOf(markers, mark) == -1)) + (markers || (markers = [])).push(mark); + } + }); + if (!markers) return null; + var parts = [{from: from, to: to}]; + for (var i = 0; i < markers.length; ++i) { + var mk = markers[i], m = mk.find(); + for (var j = 0; j < parts.length; ++j) { + var p = parts[j]; + if (posLess(p.to, m.from) || posLess(m.to, p.from)) continue; + var newParts = [j, 1]; + if (posLess(p.from, m.from) || !mk.inclusiveLeft && posEq(p.from, m.from)) + newParts.push({from: p.from, to: m.from}); + if (posLess(m.to, p.to) || !mk.inclusiveRight && posEq(p.to, m.to)) + newParts.push({from: m.to, to: p.to}); + parts.splice.apply(parts, newParts); + j += newParts.length - 1; + } + } + return parts; + } + + function collapsedSpanAt(line, ch) { + var sps = sawCollapsedSpans && line.markedSpans, found; + if (sps) for (var sp, i = 0; i < sps.length; ++i) { + sp = sps[i]; + if (!sp.marker.collapsed) continue; + if ((sp.from == null || sp.from < ch) && + (sp.to == null || sp.to > ch) && + (!found || found.width < sp.marker.width)) + found = sp.marker; + } + return found; + } + function collapsedSpanAtStart(line) { return collapsedSpanAt(line, -1); } + function collapsedSpanAtEnd(line) { return collapsedSpanAt(line, line.text.length + 1); } + + function visualLine(doc, line) { + var merged; + while (merged = collapsedSpanAtStart(line)) + line = getLine(doc, merged.find().from.line); + return line; + } + + function lineIsHidden(doc, line) { + var sps = sawCollapsedSpans && line.markedSpans; + if (sps) for (var sp, i = 0; i < sps.length; ++i) { + sp = sps[i]; + if (!sp.marker.collapsed) continue; + if (sp.from == null) return true; + if (sp.marker.replacedWith) continue; + if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp)) + return true; + } + } + function lineIsHiddenInner(doc, line, span) { + if (span.to == null) { + var end = span.marker.find().to, endLine = getLine(doc, end.line); + return lineIsHiddenInner(doc, endLine, getMarkedSpanFor(endLine.markedSpans, span.marker)); + } + if (span.marker.inclusiveRight && span.to == line.text.length) + return true; + for (var sp, i = 0; i < line.markedSpans.length; ++i) { + sp = line.markedSpans[i]; + if (sp.marker.collapsed && !sp.marker.replacedWith && sp.from == span.to && + (sp.marker.inclusiveLeft || span.marker.inclusiveRight) && + lineIsHiddenInner(doc, line, sp)) return true; + } + } + + function detachMarkedSpans(line) { + var spans = line.markedSpans; + if (!spans) return; + for (var i = 0; i < spans.length; ++i) + spans[i].marker.detachLine(line); + line.markedSpans = null; + } + + function attachMarkedSpans(line, spans) { + if (!spans) return; + for (var i = 0; i < spans.length; ++i) + spans[i].marker.attachLine(line); + line.markedSpans = spans; + } + + // LINE WIDGETS + + var LineWidget = CodeMirror.LineWidget = function(cm, node, options) { + if (options) for (var opt in options) if (options.hasOwnProperty(opt)) + this[opt] = options[opt]; + this.cm = cm; + this.node = node; + }; + eventMixin(LineWidget); + function widgetOperation(f) { + return function() { + var withOp = !this.cm.curOp; + if (withOp) startOperation(this.cm); + try {var result = f.apply(this, arguments);} + finally {if (withOp) endOperation(this.cm);} + return result; + }; + } + LineWidget.prototype.clear = widgetOperation(function() { + var ws = this.line.widgets, no = lineNo(this.line); + if (no == null || !ws) return; + for (var i = 0; i < ws.length; ++i) if (ws[i] == this) ws.splice(i--, 1); + if (!ws.length) this.line.widgets = null; + var aboveVisible = heightAtLine(this.cm, this.line) < this.cm.doc.scrollTop; + updateLineHeight(this.line, Math.max(0, this.line.height - widgetHeight(this))); + if (aboveVisible) addToScrollPos(this.cm, 0, -this.height); + regChange(this.cm, no, no + 1); + }); + LineWidget.prototype.changed = widgetOperation(function() { + var oldH = this.height; + this.height = null; + var diff = widgetHeight(this) - oldH; + if (!diff) return; + updateLineHeight(this.line, this.line.height + diff); + var no = lineNo(this.line); + regChange(this.cm, no, no + 1); + }); + + function widgetHeight(widget) { + if (widget.height != null) return widget.height; + if (!widget.node.parentNode || widget.node.parentNode.nodeType != 1) + removeChildrenAndAdd(widget.cm.display.measure, elt("div", [widget.node], null, "position: relative")); + return widget.height = widget.node.offsetHeight; + } + + function addLineWidget(cm, handle, node, options) { + var widget = new LineWidget(cm, node, options); + if (widget.noHScroll) cm.display.alignWidgets = true; + changeLine(cm, handle, function(line) { + var widgets = line.widgets || (line.widgets = []); + if (widget.insertAt == null) widgets.push(widget); + else widgets.splice(Math.min(widgets.length - 1, Math.max(0, widget.insertAt)), 0, widget); + widget.line = line; + if (!lineIsHidden(cm.doc, line) || widget.showIfHidden) { + var aboveVisible = heightAtLine(cm, line) < cm.doc.scrollTop; + updateLineHeight(line, line.height + widgetHeight(widget)); + if (aboveVisible) addToScrollPos(cm, 0, widget.height); + } + return true; + }); + return widget; + } + + // LINE DATA STRUCTURE + + // Line objects. These hold state related to a line, including + // highlighting info (the styles array). + var Line = CodeMirror.Line = function(text, markedSpans, estimateHeight) { + this.text = text; + attachMarkedSpans(this, markedSpans); + this.height = estimateHeight ? estimateHeight(this) : 1; + }; + eventMixin(Line); + Line.prototype.lineNo = function() { return lineNo(this); }; + + function updateLine(line, text, markedSpans, estimateHeight) { + line.text = text; + if (line.stateAfter) line.stateAfter = null; + if (line.styles) line.styles = null; + if (line.order != null) line.order = null; + detachMarkedSpans(line); + attachMarkedSpans(line, markedSpans); + var estHeight = estimateHeight ? estimateHeight(line) : 1; + if (estHeight != line.height) updateLineHeight(line, estHeight); + } + + function cleanUpLine(line) { + line.parent = null; + detachMarkedSpans(line); + } + + // Run the given mode's parser over a line, update the styles + // array, which contains alternating fragments of text and CSS + // classes. + function runMode(cm, text, mode, state, f, forceToEnd) { + var flattenSpans = mode.flattenSpans; + if (flattenSpans == null) flattenSpans = cm.options.flattenSpans; + var curStart = 0, curStyle = null; + var stream = new StringStream(text, cm.options.tabSize), style; + if (text == "" && mode.blankLine) mode.blankLine(state); + while (!stream.eol()) { + if (stream.pos > cm.options.maxHighlightLength) { + flattenSpans = false; + if (forceToEnd) processLine(cm, text, state, stream.pos); + stream.pos = text.length; + style = null; + } else { + style = mode.token(stream, state); + } + if (!flattenSpans || curStyle != style) { + if (curStart < stream.start) f(stream.start, curStyle); + curStart = stream.start; curStyle = style; + } + stream.start = stream.pos; + } + while (curStart < stream.pos) { + // Webkit seems to refuse to render text nodes longer than 57444 characters + var pos = Math.min(stream.pos, curStart + 50000); + f(pos, curStyle); + curStart = pos; + } + } + + function highlightLine(cm, line, state, forceToEnd) { + // A styles array always starts with a number identifying the + // mode/overlays that it is based on (for easy invalidation). + var st = [cm.state.modeGen]; + // Compute the base array of styles + runMode(cm, line.text, cm.doc.mode, state, function(end, style) { + st.push(end, style); + }, forceToEnd); + + // Run overlays, adjust style array. + for (var o = 0; o < cm.state.overlays.length; ++o) { + var overlay = cm.state.overlays[o], i = 1, at = 0; + runMode(cm, line.text, overlay.mode, true, function(end, style) { + var start = i; + // Ensure there's a token end at the current position, and that i points at it + while (at < end) { + var i_end = st[i]; + if (i_end > end) + st.splice(i, 1, end, st[i+1], i_end); + i += 2; + at = Math.min(end, i_end); + } + if (!style) return; + if (overlay.opaque) { + st.splice(start, i - start, end, style); + i = start + 2; + } else { + for (; start < i; start += 2) { + var cur = st[start+1]; + st[start+1] = cur ? cur + " " + style : style; + } + } + }); + } + + return st; + } + + function getLineStyles(cm, line) { + if (!line.styles || line.styles[0] != cm.state.modeGen) + line.styles = highlightLine(cm, line, line.stateAfter = getStateBefore(cm, lineNo(line))); + return line.styles; + } + + // Lightweight form of highlight -- proceed over this line and + // update state, but don't save a style array. + function processLine(cm, text, state, startAt) { + var mode = cm.doc.mode; + var stream = new StringStream(text, cm.options.tabSize); + stream.start = stream.pos = startAt || 0; + if (text == "" && mode.blankLine) mode.blankLine(state); + while (!stream.eol() && stream.pos <= cm.options.maxHighlightLength) { + mode.token(stream, state); + stream.start = stream.pos; + } + } + + var styleToClassCache = {}; + function interpretTokenStyle(style, builder) { + if (!style) return null; + for (;;) { + var lineClass = style.match(/(?:^|\s)line-(background-)?(\S+)/); + if (!lineClass) break; + style = style.slice(0, lineClass.index) + style.slice(lineClass.index + lineClass[0].length); + var prop = lineClass[1] ? "bgClass" : "textClass"; + if (builder[prop] == null) + builder[prop] = lineClass[2]; + else if (!(new RegExp("(?:^|\s)" + lineClass[2] + "(?:$|\s)")).test(builder[prop])) + builder[prop] += " " + lineClass[2]; + } + return styleToClassCache[style] || + (styleToClassCache[style] = "cm-" + style.replace(/ +/g, " cm-")); + } + + function buildLineContent(cm, realLine, measure, copyWidgets) { + var merged, line = realLine, empty = true; + while (merged = collapsedSpanAtStart(line)) + line = getLine(cm.doc, merged.find().from.line); + + var builder = {pre: elt("pre"), col: 0, pos: 0, + measure: null, measuredSomething: false, cm: cm, + copyWidgets: copyWidgets}; + + do { + if (line.text) empty = false; + builder.measure = line == realLine && measure; + builder.pos = 0; + builder.addToken = builder.measure ? buildTokenMeasure : buildToken; + if ((ie || webkit) && cm.getOption("lineWrapping")) + builder.addToken = buildTokenSplitSpaces(builder.addToken); + var next = insertLineContent(line, builder, getLineStyles(cm, line)); + if (measure && line == realLine && !builder.measuredSomething) { + measure[0] = builder.pre.appendChild(zeroWidthElement(cm.display.measure)); + builder.measuredSomething = true; + } + if (next) line = getLine(cm.doc, next.to.line); + } while (next); + + if (measure && !builder.measuredSomething && !measure[0]) + measure[0] = builder.pre.appendChild(empty ? elt("span", "\u00a0") : zeroWidthElement(cm.display.measure)); + if (!builder.pre.firstChild && !lineIsHidden(cm.doc, realLine)) + builder.pre.appendChild(document.createTextNode("\u00a0")); + + var order; + // Work around problem with the reported dimensions of single-char + // direction spans on IE (issue #1129). See also the comment in + // cursorCoords. + if (measure && (ie || ie_gt10) && (order = getOrder(line))) { + var l = order.length - 1; + if (order[l].from == order[l].to) --l; + var last = order[l], prev = order[l - 1]; + if (last.from + 1 == last.to && prev && last.level < prev.level) { + var span = measure[builder.pos - 1]; + if (span) span.parentNode.insertBefore(span.measureRight = zeroWidthElement(cm.display.measure), + span.nextSibling); + } + } + + var textClass = builder.textClass ? builder.textClass + " " + (realLine.textClass || "") : realLine.textClass; + if (textClass) builder.pre.className = textClass; + + signal(cm, "renderLine", cm, realLine, builder.pre); + return builder; + } + + function defaultSpecialCharPlaceholder(ch) { + var token = elt("span", "\u2022", "cm-invalidchar"); + token.title = "\\u" + ch.charCodeAt(0).toString(16); + return token; + } + + function buildToken(builder, text, style, startStyle, endStyle, title) { + if (!text) return; + var special = builder.cm.options.specialChars; + if (!special.test(text)) { + builder.col += text.length; + var content = document.createTextNode(text); + } else { + var content = document.createDocumentFragment(), pos = 0; + while (true) { + special.lastIndex = pos; + var m = special.exec(text); + var skipped = m ? m.index - pos : text.length - pos; + if (skipped) { + content.appendChild(document.createTextNode(text.slice(pos, pos + skipped))); + builder.col += skipped; + } + if (!m) break; + pos += skipped + 1; + if (m[0] == "\t") { + var tabSize = builder.cm.options.tabSize, tabWidth = tabSize - builder.col % tabSize; + content.appendChild(elt("span", spaceStr(tabWidth), "cm-tab")); + builder.col += tabWidth; + } else { + var token = builder.cm.options.specialCharPlaceholder(m[0]); + content.appendChild(token); + builder.col += 1; + } + } + } + if (style || startStyle || endStyle || builder.measure) { + var fullStyle = style || ""; + if (startStyle) fullStyle += startStyle; + if (endStyle) fullStyle += endStyle; + var token = elt("span", [content], fullStyle); + if (title) token.title = title; + return builder.pre.appendChild(token); + } + builder.pre.appendChild(content); + } + + function buildTokenMeasure(builder, text, style, startStyle, endStyle) { + var wrapping = builder.cm.options.lineWrapping; + for (var i = 0; i < text.length; ++i) { + var ch = text.charAt(i), start = i == 0; + if (ch >= "\ud800" && ch < "\udbff" && i < text.length - 1) { + ch = text.slice(i, i + 2); + ++i; + } else if (i && wrapping && spanAffectsWrapping(text, i)) { + builder.pre.appendChild(elt("wbr")); + } + var old = builder.measure[builder.pos]; + var span = builder.measure[builder.pos] = + buildToken(builder, ch, style, + start && startStyle, i == text.length - 1 && endStyle); + if (old) span.leftSide = old.leftSide || old; + // In IE single-space nodes wrap differently than spaces + // embedded in larger text nodes, except when set to + // white-space: normal (issue #1268). + if (ie && wrapping && ch == " " && i && !/\s/.test(text.charAt(i - 1)) && + i < text.length - 1 && !/\s/.test(text.charAt(i + 1))) + span.style.whiteSpace = "normal"; + builder.pos += ch.length; + } + if (text.length) builder.measuredSomething = true; + } + + function buildTokenSplitSpaces(inner) { + function split(old) { + var out = " "; + for (var i = 0; i < old.length - 2; ++i) out += i % 2 ? " " : "\u00a0"; + out += " "; + return out; + } + return function(builder, text, style, startStyle, endStyle, title) { + return inner(builder, text.replace(/ {3,}/g, split), style, startStyle, endStyle, title); + }; + } + + function buildCollapsedSpan(builder, size, marker, ignoreWidget) { + var widget = !ignoreWidget && marker.replacedWith; + if (widget) { + if (builder.copyWidgets) widget = widget.cloneNode(true); + builder.pre.appendChild(widget); + if (builder.measure) { + if (size) { + builder.measure[builder.pos] = widget; + } else { + var elt = zeroWidthElement(builder.cm.display.measure); + if (marker.type == "bookmark" && !marker.insertLeft) + builder.measure[builder.pos] = builder.pre.appendChild(elt); + else if (builder.measure[builder.pos]) + return; + else + builder.measure[builder.pos] = builder.pre.insertBefore(elt, widget); + } + builder.measuredSomething = true; + } + } + builder.pos += size; + } + + // Outputs a number of spans to make up a line, taking highlighting + // and marked text into account. + function insertLineContent(line, builder, styles) { + var spans = line.markedSpans, allText = line.text, at = 0; + if (!spans) { + for (var i = 1; i < styles.length; i+=2) + builder.addToken(builder, allText.slice(at, at = styles[i]), interpretTokenStyle(styles[i+1], builder)); + return; + } + + var len = allText.length, pos = 0, i = 1, text = "", style; + var nextChange = 0, spanStyle, spanEndStyle, spanStartStyle, title, collapsed; + for (;;) { + if (nextChange == pos) { // Update current marker set + spanStyle = spanEndStyle = spanStartStyle = title = ""; + collapsed = null; nextChange = Infinity; + var foundBookmarks = []; + for (var j = 0; j < spans.length; ++j) { + var sp = spans[j], m = sp.marker; + if (sp.from <= pos && (sp.to == null || sp.to > pos)) { + if (sp.to != null && nextChange > sp.to) { nextChange = sp.to; spanEndStyle = ""; } + if (m.className) spanStyle += " " + m.className; + if (m.startStyle && sp.from == pos) spanStartStyle += " " + m.startStyle; + if (m.endStyle && sp.to == nextChange) spanEndStyle += " " + m.endStyle; + if (m.title && !title) title = m.title; + if (m.collapsed && (!collapsed || collapsed.marker.size < m.size)) + collapsed = sp; + } else if (sp.from > pos && nextChange > sp.from) { + nextChange = sp.from; + } + if (m.type == "bookmark" && sp.from == pos && m.replacedWith) foundBookmarks.push(m); + } + if (collapsed && (collapsed.from || 0) == pos) { + buildCollapsedSpan(builder, (collapsed.to == null ? len : collapsed.to) - pos, + collapsed.marker, collapsed.from == null); + if (collapsed.to == null) return collapsed.marker.find(); + } + if (!collapsed && foundBookmarks.length) for (var j = 0; j < foundBookmarks.length; ++j) + buildCollapsedSpan(builder, 0, foundBookmarks[j]); + } + if (pos >= len) break; + + var upto = Math.min(len, nextChange); + while (true) { + if (text) { + var end = pos + text.length; + if (!collapsed) { + var tokenText = end > upto ? text.slice(0, upto - pos) : text; + builder.addToken(builder, tokenText, style ? style + spanStyle : spanStyle, + spanStartStyle, pos + tokenText.length == nextChange ? spanEndStyle : "", title); + } + if (end >= upto) {text = text.slice(upto - pos); pos = upto; break;} + pos = end; + spanStartStyle = ""; + } + text = allText.slice(at, at = styles[i++]); + style = interpretTokenStyle(styles[i++], builder); + } + } + } + + // DOCUMENT DATA STRUCTURE + + function updateDoc(doc, change, markedSpans, selAfter, estimateHeight) { + function spansFor(n) {return markedSpans ? markedSpans[n] : null;} + function update(line, text, spans) { + updateLine(line, text, spans, estimateHeight); + signalLater(line, "change", line, change); + } + + var from = change.from, to = change.to, text = change.text; + var firstLine = getLine(doc, from.line), lastLine = getLine(doc, to.line); + var lastText = lst(text), lastSpans = spansFor(text.length - 1), nlines = to.line - from.line; + + // First adjust the line structure + if (from.ch == 0 && to.ch == 0 && lastText == "" && + (!doc.cm || doc.cm.options.wholeLineUpdateBefore)) { + // This is a whole-line replace. Treated specially to make + // sure line objects move the way they are supposed to. + for (var i = 0, e = text.length - 1, added = []; i < e; ++i) + added.push(new Line(text[i], spansFor(i), estimateHeight)); + update(lastLine, lastLine.text, lastSpans); + if (nlines) doc.remove(from.line, nlines); + if (added.length) doc.insert(from.line, added); + } else if (firstLine == lastLine) { + if (text.length == 1) { + update(firstLine, firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), lastSpans); + } else { + for (var added = [], i = 1, e = text.length - 1; i < e; ++i) + added.push(new Line(text[i], spansFor(i), estimateHeight)); + added.push(new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight)); + update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0)); + doc.insert(from.line + 1, added); + } + } else if (text.length == 1) { + update(firstLine, firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), spansFor(0)); + doc.remove(from.line + 1, nlines); + } else { + update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0)); + update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans); + for (var i = 1, e = text.length - 1, added = []; i < e; ++i) + added.push(new Line(text[i], spansFor(i), estimateHeight)); + if (nlines > 1) doc.remove(from.line + 1, nlines - 1); + doc.insert(from.line + 1, added); + } + + signalLater(doc, "change", doc, change); + setSelection(doc, selAfter.anchor, selAfter.head, null, true); + } + + function LeafChunk(lines) { + this.lines = lines; + this.parent = null; + for (var i = 0, e = lines.length, height = 0; i < e; ++i) { + lines[i].parent = this; + height += lines[i].height; + } + this.height = height; + } + + LeafChunk.prototype = { + chunkSize: function() { return this.lines.length; }, + removeInner: function(at, n) { + for (var i = at, e = at + n; i < e; ++i) { + var line = this.lines[i]; + this.height -= line.height; + cleanUpLine(line); + signalLater(line, "delete"); + } + this.lines.splice(at, n); + }, + collapse: function(lines) { + lines.splice.apply(lines, [lines.length, 0].concat(this.lines)); + }, + insertInner: function(at, lines, height) { + this.height += height; + this.lines = this.lines.slice(0, at).concat(lines).concat(this.lines.slice(at)); + for (var i = 0, e = lines.length; i < e; ++i) lines[i].parent = this; + }, + iterN: function(at, n, op) { + for (var e = at + n; at < e; ++at) + if (op(this.lines[at])) return true; + } + }; + + function BranchChunk(children) { + this.children = children; + var size = 0, height = 0; + for (var i = 0, e = children.length; i < e; ++i) { + var ch = children[i]; + size += ch.chunkSize(); height += ch.height; + ch.parent = this; + } + this.size = size; + this.height = height; + this.parent = null; + } + + BranchChunk.prototype = { + chunkSize: function() { return this.size; }, + removeInner: function(at, n) { + this.size -= n; + for (var i = 0; i < this.children.length; ++i) { + var child = this.children[i], sz = child.chunkSize(); + if (at < sz) { + var rm = Math.min(n, sz - at), oldHeight = child.height; + child.removeInner(at, rm); + this.height -= oldHeight - child.height; + if (sz == rm) { this.children.splice(i--, 1); child.parent = null; } + if ((n -= rm) == 0) break; + at = 0; + } else at -= sz; + } + if (this.size - n < 25) { + var lines = []; + this.collapse(lines); + this.children = [new LeafChunk(lines)]; + this.children[0].parent = this; + } + }, + collapse: function(lines) { + for (var i = 0, e = this.children.length; i < e; ++i) this.children[i].collapse(lines); + }, + insertInner: function(at, lines, height) { + this.size += lines.length; + this.height += height; + for (var i = 0, e = this.children.length; i < e; ++i) { + var child = this.children[i], sz = child.chunkSize(); + if (at <= sz) { + child.insertInner(at, lines, height); + if (child.lines && child.lines.length > 50) { + while (child.lines.length > 50) { + var spilled = child.lines.splice(child.lines.length - 25, 25); + var newleaf = new LeafChunk(spilled); + child.height -= newleaf.height; + this.children.splice(i + 1, 0, newleaf); + newleaf.parent = this; + } + this.maybeSpill(); + } + break; + } + at -= sz; + } + }, + maybeSpill: function() { + if (this.children.length <= 10) return; + var me = this; + do { + var spilled = me.children.splice(me.children.length - 5, 5); + var sibling = new BranchChunk(spilled); + if (!me.parent) { // Become the parent node + var copy = new BranchChunk(me.children); + copy.parent = me; + me.children = [copy, sibling]; + me = copy; + } else { + me.size -= sibling.size; + me.height -= sibling.height; + var myIndex = indexOf(me.parent.children, me); + me.parent.children.splice(myIndex + 1, 0, sibling); + } + sibling.parent = me.parent; + } while (me.children.length > 10); + me.parent.maybeSpill(); + }, + iterN: function(at, n, op) { + for (var i = 0, e = this.children.length; i < e; ++i) { + var child = this.children[i], sz = child.chunkSize(); + if (at < sz) { + var used = Math.min(n, sz - at); + if (child.iterN(at, used, op)) return true; + if ((n -= used) == 0) break; + at = 0; + } else at -= sz; + } + } + }; + + var nextDocId = 0; + var Doc = CodeMirror.Doc = function(text, mode, firstLine) { + if (!(this instanceof Doc)) return new Doc(text, mode, firstLine); + if (firstLine == null) firstLine = 0; + + BranchChunk.call(this, [new LeafChunk([new Line("", null)])]); + this.first = firstLine; + this.scrollTop = this.scrollLeft = 0; + this.cantEdit = false; + this.history = makeHistory(); + this.cleanGeneration = 1; + this.frontier = firstLine; + var start = Pos(firstLine, 0); + this.sel = {from: start, to: start, head: start, anchor: start, shift: false, extend: false, goalColumn: null}; + this.id = ++nextDocId; + this.modeOption = mode; + + if (typeof text == "string") text = splitLines(text); + updateDoc(this, {from: start, to: start, text: text}, null, {head: start, anchor: start}); + }; + + Doc.prototype = createObj(BranchChunk.prototype, { + constructor: Doc, + iter: function(from, to, op) { + if (op) this.iterN(from - this.first, to - from, op); + else this.iterN(this.first, this.first + this.size, from); + }, + + insert: function(at, lines) { + var height = 0; + for (var i = 0, e = lines.length; i < e; ++i) height += lines[i].height; + this.insertInner(at - this.first, lines, height); + }, + remove: function(at, n) { this.removeInner(at - this.first, n); }, + + getValue: function(lineSep) { + var lines = getLines(this, this.first, this.first + this.size); + if (lineSep === false) return lines; + return lines.join(lineSep || "\n"); + }, + setValue: function(code) { + var top = Pos(this.first, 0), last = this.first + this.size - 1; + makeChange(this, {from: top, to: Pos(last, getLine(this, last).text.length), + text: splitLines(code), origin: "setValue"}, + {head: top, anchor: top}, true); + }, + replaceRange: function(code, from, to, origin) { + from = clipPos(this, from); + to = to ? clipPos(this, to) : from; + replaceRange(this, code, from, to, origin); + }, + getRange: function(from, to, lineSep) { + var lines = getBetween(this, clipPos(this, from), clipPos(this, to)); + if (lineSep === false) return lines; + return lines.join(lineSep || "\n"); + }, + + getLine: function(line) {var l = this.getLineHandle(line); return l && l.text;}, + setLine: function(line, text) { + if (isLine(this, line)) + replaceRange(this, text, Pos(line, 0), clipPos(this, Pos(line))); + }, + removeLine: function(line) { + if (line) replaceRange(this, "", clipPos(this, Pos(line - 1)), clipPos(this, Pos(line))); + else replaceRange(this, "", Pos(0, 0), clipPos(this, Pos(1, 0))); + }, + + getLineHandle: function(line) {if (isLine(this, line)) return getLine(this, line);}, + getLineNumber: function(line) {return lineNo(line);}, + + getLineHandleVisualStart: function(line) { + if (typeof line == "number") line = getLine(this, line); + return visualLine(this, line); + }, + + lineCount: function() {return this.size;}, + firstLine: function() {return this.first;}, + lastLine: function() {return this.first + this.size - 1;}, + + clipPos: function(pos) {return clipPos(this, pos);}, + + getCursor: function(start) { + var sel = this.sel, pos; + if (start == null || start == "head") pos = sel.head; + else if (start == "anchor") pos = sel.anchor; + else if (start == "end" || start === false) pos = sel.to; + else pos = sel.from; + return copyPos(pos); + }, + somethingSelected: function() {return !posEq(this.sel.head, this.sel.anchor);}, + + setCursor: docOperation(function(line, ch, extend) { + var pos = clipPos(this, typeof line == "number" ? Pos(line, ch || 0) : line); + if (extend) extendSelection(this, pos); + else setSelection(this, pos, pos); + }), + setSelection: docOperation(function(anchor, head, bias) { + setSelection(this, clipPos(this, anchor), clipPos(this, head || anchor), bias); + }), + extendSelection: docOperation(function(from, to, bias) { + extendSelection(this, clipPos(this, from), to && clipPos(this, to), bias); + }), + + getSelection: function(lineSep) {return this.getRange(this.sel.from, this.sel.to, lineSep);}, + replaceSelection: function(code, collapse, origin) { + makeChange(this, {from: this.sel.from, to: this.sel.to, text: splitLines(code), origin: origin}, collapse || "around"); + }, + undo: docOperation(function() {makeChangeFromHistory(this, "undo");}), + redo: docOperation(function() {makeChangeFromHistory(this, "redo");}), + + setExtending: function(val) {this.sel.extend = val;}, + + historySize: function() { + var hist = this.history; + return {undo: hist.done.length, redo: hist.undone.length}; + }, + clearHistory: function() {this.history = makeHistory(this.history.maxGeneration);}, + + markClean: function() { + this.cleanGeneration = this.changeGeneration(); + }, + changeGeneration: function() { + this.history.lastOp = this.history.lastOrigin = null; + return this.history.generation; + }, + isClean: function (gen) { + return this.history.generation == (gen || this.cleanGeneration); + }, + + getHistory: function() { + return {done: copyHistoryArray(this.history.done), + undone: copyHistoryArray(this.history.undone)}; + }, + setHistory: function(histData) { + var hist = this.history = makeHistory(this.history.maxGeneration); + hist.done = histData.done.slice(0); + hist.undone = histData.undone.slice(0); + }, + + markText: function(from, to, options) { + return markText(this, clipPos(this, from), clipPos(this, to), options, "range"); + }, + setBookmark: function(pos, options) { + var realOpts = {replacedWith: options && (options.nodeType == null ? options.widget : options), + insertLeft: options && options.insertLeft}; + pos = clipPos(this, pos); + return markText(this, pos, pos, realOpts, "bookmark"); + }, + findMarksAt: function(pos) { + pos = clipPos(this, pos); + var markers = [], spans = getLine(this, pos.line).markedSpans; + if (spans) for (var i = 0; i < spans.length; ++i) { + var span = spans[i]; + if ((span.from == null || span.from <= pos.ch) && + (span.to == null || span.to >= pos.ch)) + markers.push(span.marker.parent || span.marker); + } + return markers; + }, + getAllMarks: function() { + var markers = []; + this.iter(function(line) { + var sps = line.markedSpans; + if (sps) for (var i = 0; i < sps.length; ++i) + if (sps[i].from != null) markers.push(sps[i].marker); + }); + return markers; + }, + + posFromIndex: function(off) { + var ch, lineNo = this.first; + this.iter(function(line) { + var sz = line.text.length + 1; + if (sz > off) { ch = off; return true; } + off -= sz; + ++lineNo; + }); + return clipPos(this, Pos(lineNo, ch)); + }, + indexFromPos: function (coords) { + coords = clipPos(this, coords); + var index = coords.ch; + if (coords.line < this.first || coords.ch < 0) return 0; + this.iter(this.first, coords.line, function (line) { + index += line.text.length + 1; + }); + return index; + }, + + copy: function(copyHistory) { + var doc = new Doc(getLines(this, this.first, this.first + this.size), this.modeOption, this.first); + doc.scrollTop = this.scrollTop; doc.scrollLeft = this.scrollLeft; + doc.sel = {from: this.sel.from, to: this.sel.to, head: this.sel.head, anchor: this.sel.anchor, + shift: this.sel.shift, extend: false, goalColumn: this.sel.goalColumn}; + if (copyHistory) { + doc.history.undoDepth = this.history.undoDepth; + doc.setHistory(this.getHistory()); + } + return doc; + }, + + linkedDoc: function(options) { + if (!options) options = {}; + var from = this.first, to = this.first + this.size; + if (options.from != null && options.from > from) from = options.from; + if (options.to != null && options.to < to) to = options.to; + var copy = new Doc(getLines(this, from, to), options.mode || this.modeOption, from); + if (options.sharedHist) copy.history = this.history; + (this.linked || (this.linked = [])).push({doc: copy, sharedHist: options.sharedHist}); + copy.linked = [{doc: this, isParent: true, sharedHist: options.sharedHist}]; + return copy; + }, + unlinkDoc: function(other) { + if (other instanceof CodeMirror) other = other.doc; + if (this.linked) for (var i = 0; i < this.linked.length; ++i) { + var link = this.linked[i]; + if (link.doc != other) continue; + this.linked.splice(i, 1); + other.unlinkDoc(this); + break; + } + // If the histories were shared, split them again + if (other.history == this.history) { + var splitIds = [other.id]; + linkedDocs(other, function(doc) {splitIds.push(doc.id);}, true); + other.history = makeHistory(); + other.history.done = copyHistoryArray(this.history.done, splitIds); + other.history.undone = copyHistoryArray(this.history.undone, splitIds); + } + }, + iterLinkedDocs: function(f) {linkedDocs(this, f);}, + + getMode: function() {return this.mode;}, + getEditor: function() {return this.cm;} + }); + + Doc.prototype.eachLine = Doc.prototype.iter; + + // The Doc methods that should be available on CodeMirror instances + var dontDelegate = "iter insert remove copy getEditor".split(" "); + for (var prop in Doc.prototype) if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0) + CodeMirror.prototype[prop] = (function(method) { + return function() {return method.apply(this.doc, arguments);}; + })(Doc.prototype[prop]); + + eventMixin(Doc); + + function linkedDocs(doc, f, sharedHistOnly) { + function propagate(doc, skip, sharedHist) { + if (doc.linked) for (var i = 0; i < doc.linked.length; ++i) { + var rel = doc.linked[i]; + if (rel.doc == skip) continue; + var shared = sharedHist && rel.sharedHist; + if (sharedHistOnly && !shared) continue; + f(rel.doc, shared); + propagate(rel.doc, doc, shared); + } + } + propagate(doc, null, true); + } + + function attachDoc(cm, doc) { + if (doc.cm) throw new Error("This document is already in use."); + cm.doc = doc; + doc.cm = cm; + estimateLineHeights(cm); + loadMode(cm); + if (!cm.options.lineWrapping) computeMaxLength(cm); + cm.options.mode = doc.modeOption; + regChange(cm); + } + + // LINE UTILITIES + + function getLine(chunk, n) { + n -= chunk.first; + while (!chunk.lines) { + for (var i = 0;; ++i) { + var child = chunk.children[i], sz = child.chunkSize(); + if (n < sz) { chunk = child; break; } + n -= sz; + } + } + return chunk.lines[n]; + } + + function getBetween(doc, start, end) { + var out = [], n = start.line; + doc.iter(start.line, end.line + 1, function(line) { + var text = line.text; + if (n == end.line) text = text.slice(0, end.ch); + if (n == start.line) text = text.slice(start.ch); + out.push(text); + ++n; + }); + return out; + } + function getLines(doc, from, to) { + var out = []; + doc.iter(from, to, function(line) { out.push(line.text); }); + return out; + } + + function updateLineHeight(line, height) { + var diff = height - line.height; + for (var n = line; n; n = n.parent) n.height += diff; + } + + function lineNo(line) { + if (line.parent == null) return null; + var cur = line.parent, no = indexOf(cur.lines, line); + for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) { + for (var i = 0;; ++i) { + if (chunk.children[i] == cur) break; + no += chunk.children[i].chunkSize(); + } + } + return no + cur.first; + } + + function lineAtHeight(chunk, h) { + var n = chunk.first; + outer: do { + for (var i = 0, e = chunk.children.length; i < e; ++i) { + var child = chunk.children[i], ch = child.height; + if (h < ch) { chunk = child; continue outer; } + h -= ch; + n += child.chunkSize(); + } + return n; + } while (!chunk.lines); + for (var i = 0, e = chunk.lines.length; i < e; ++i) { + var line = chunk.lines[i], lh = line.height; + if (h < lh) break; + h -= lh; + } + return n + i; + } + + function heightAtLine(cm, lineObj) { + lineObj = visualLine(cm.doc, lineObj); + + var h = 0, chunk = lineObj.parent; + for (var i = 0; i < chunk.lines.length; ++i) { + var line = chunk.lines[i]; + if (line == lineObj) break; + else h += line.height; + } + for (var p = chunk.parent; p; chunk = p, p = chunk.parent) { + for (var i = 0; i < p.children.length; ++i) { + var cur = p.children[i]; + if (cur == chunk) break; + else h += cur.height; + } + } + return h; + } + + function getOrder(line) { + var order = line.order; + if (order == null) order = line.order = bidiOrdering(line.text); + return order; + } + + // HISTORY + + function makeHistory(startGen) { + return { + // Arrays of history events. Doing something adds an event to + // done and clears undo. Undoing moves events from done to + // undone, redoing moves them in the other direction. + done: [], undone: [], undoDepth: Infinity, + // Used to track when changes can be merged into a single undo + // event + lastTime: 0, lastOp: null, lastOrigin: null, + // Used by the isClean() method + generation: startGen || 1, maxGeneration: startGen || 1 + }; + } + + function attachLocalSpans(doc, change, from, to) { + var existing = change["spans_" + doc.id], n = 0; + doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function(line) { + if (line.markedSpans) + (existing || (existing = change["spans_" + doc.id] = {}))[n] = line.markedSpans; + ++n; + }); + } + + function historyChangeFromChange(doc, change) { + var from = { line: change.from.line, ch: change.from.ch }; + var histChange = {from: from, to: changeEnd(change), text: getBetween(doc, change.from, change.to)}; + attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1); + linkedDocs(doc, function(doc) {attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1);}, true); + return histChange; + } + + function addToHistory(doc, change, selAfter, opId) { + var hist = doc.history; + hist.undone.length = 0; + var time = +new Date, cur = lst(hist.done); + + if (cur && + (hist.lastOp == opId || + hist.lastOrigin == change.origin && change.origin && + ((change.origin.charAt(0) == "+" && doc.cm && hist.lastTime > time - doc.cm.options.historyEventDelay) || + change.origin.charAt(0) == "*"))) { + // Merge this change into the last event + var last = lst(cur.changes); + if (posEq(change.from, change.to) && posEq(change.from, last.to)) { + // Optimized case for simple insertion -- don't want to add + // new changesets for every character typed + last.to = changeEnd(change); + } else { + // Add new sub-event + cur.changes.push(historyChangeFromChange(doc, change)); + } + cur.anchorAfter = selAfter.anchor; cur.headAfter = selAfter.head; + } else { + // Can not be merged, start a new event. + cur = {changes: [historyChangeFromChange(doc, change)], + generation: hist.generation, + anchorBefore: doc.sel.anchor, headBefore: doc.sel.head, + anchorAfter: selAfter.anchor, headAfter: selAfter.head}; + hist.done.push(cur); + hist.generation = ++hist.maxGeneration; + while (hist.done.length > hist.undoDepth) + hist.done.shift(); + } + hist.lastTime = time; + hist.lastOp = opId; + hist.lastOrigin = change.origin; + } + + function removeClearedSpans(spans) { + if (!spans) return null; + for (var i = 0, out; i < spans.length; ++i) { + if (spans[i].marker.explicitlyCleared) { if (!out) out = spans.slice(0, i); } + else if (out) out.push(spans[i]); + } + return !out ? spans : out.length ? out : null; + } + + function getOldSpans(doc, change) { + var found = change["spans_" + doc.id]; + if (!found) return null; + for (var i = 0, nw = []; i < change.text.length; ++i) + nw.push(removeClearedSpans(found[i])); + return nw; + } + + // Used both to provide a JSON-safe object in .getHistory, and, when + // detaching a document, to split the history in two + function copyHistoryArray(events, newGroup) { + for (var i = 0, copy = []; i < events.length; ++i) { + var event = events[i], changes = event.changes, newChanges = []; + copy.push({changes: newChanges, anchorBefore: event.anchorBefore, headBefore: event.headBefore, + anchorAfter: event.anchorAfter, headAfter: event.headAfter}); + for (var j = 0; j < changes.length; ++j) { + var change = changes[j], m; + newChanges.push({from: change.from, to: change.to, text: change.text}); + if (newGroup) for (var prop in change) if (m = prop.match(/^spans_(\d+)$/)) { + if (indexOf(newGroup, Number(m[1])) > -1) { + lst(newChanges)[prop] = change[prop]; + delete change[prop]; + } + } + } + } + return copy; + } + + // Rebasing/resetting history to deal with externally-sourced changes + + function rebaseHistSel(pos, from, to, diff) { + if (to < pos.line) { + pos.line += diff; + } else if (from < pos.line) { + pos.line = from; + pos.ch = 0; + } + } + + // Tries to rebase an array of history events given a change in the + // document. If the change touches the same lines as the event, the + // event, and everything 'behind' it, is discarded. If the change is + // before the event, the event's positions are updated. Uses a + // copy-on-write scheme for the positions, to avoid having to + // reallocate them all on every rebase, but also avoid problems with + // shared position objects being unsafely updated. + function rebaseHistArray(array, from, to, diff) { + for (var i = 0; i < array.length; ++i) { + var sub = array[i], ok = true; + for (var j = 0; j < sub.changes.length; ++j) { + var cur = sub.changes[j]; + if (!sub.copied) { cur.from = copyPos(cur.from); cur.to = copyPos(cur.to); } + if (to < cur.from.line) { + cur.from.line += diff; + cur.to.line += diff; + } else if (from <= cur.to.line) { + ok = false; + break; + } + } + if (!sub.copied) { + sub.anchorBefore = copyPos(sub.anchorBefore); sub.headBefore = copyPos(sub.headBefore); + sub.anchorAfter = copyPos(sub.anchorAfter); sub.readAfter = copyPos(sub.headAfter); + sub.copied = true; + } + if (!ok) { + array.splice(0, i + 1); + i = 0; + } else { + rebaseHistSel(sub.anchorBefore); rebaseHistSel(sub.headBefore); + rebaseHistSel(sub.anchorAfter); rebaseHistSel(sub.headAfter); + } + } + } + + function rebaseHist(hist, change) { + var from = change.from.line, to = change.to.line, diff = change.text.length - (to - from) - 1; + rebaseHistArray(hist.done, from, to, diff); + rebaseHistArray(hist.undone, from, to, diff); + } + + // EVENT OPERATORS + + function stopMethod() {e_stop(this);} + // Ensure an event has a stop method. + function addStop(event) { + if (!event.stop) event.stop = stopMethod; + return event; + } + + function e_preventDefault(e) { + if (e.preventDefault) e.preventDefault(); + else e.returnValue = false; + } + function e_stopPropagation(e) { + if (e.stopPropagation) e.stopPropagation(); + else e.cancelBubble = true; + } + function e_defaultPrevented(e) { + return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false; + } + function e_stop(e) {e_preventDefault(e); e_stopPropagation(e);} + CodeMirror.e_stop = e_stop; + CodeMirror.e_preventDefault = e_preventDefault; + CodeMirror.e_stopPropagation = e_stopPropagation; + + function e_target(e) {return e.target || e.srcElement;} + function e_button(e) { + var b = e.which; + if (b == null) { + if (e.button & 1) b = 1; + else if (e.button & 2) b = 3; + else if (e.button & 4) b = 2; + } + if (mac && e.ctrlKey && b == 1) b = 3; + return b; + } + + // EVENT HANDLING + + function on(emitter, type, f) { + if (emitter.addEventListener) + emitter.addEventListener(type, f, false); + else if (emitter.attachEvent) + emitter.attachEvent("on" + type, f); + else { + var map = emitter._handlers || (emitter._handlers = {}); + var arr = map[type] || (map[type] = []); + arr.push(f); + } + } + + function off(emitter, type, f) { + if (emitter.removeEventListener) + emitter.removeEventListener(type, f, false); + else if (emitter.detachEvent) + emitter.detachEvent("on" + type, f); + else { + var arr = emitter._handlers && emitter._handlers[type]; + if (!arr) return; + for (var i = 0; i < arr.length; ++i) + if (arr[i] == f) { arr.splice(i, 1); break; } + } + } + + function signal(emitter, type /*, values...*/) { + var arr = emitter._handlers && emitter._handlers[type]; + if (!arr) return; + var args = Array.prototype.slice.call(arguments, 2); + for (var i = 0; i < arr.length; ++i) arr[i].apply(null, args); + } + + var delayedCallbacks, delayedCallbackDepth = 0; + function signalLater(emitter, type /*, values...*/) { + var arr = emitter._handlers && emitter._handlers[type]; + if (!arr) return; + var args = Array.prototype.slice.call(arguments, 2); + if (!delayedCallbacks) { + ++delayedCallbackDepth; + delayedCallbacks = []; + setTimeout(fireDelayed, 0); + } + function bnd(f) {return function(){f.apply(null, args);};}; + for (var i = 0; i < arr.length; ++i) + delayedCallbacks.push(bnd(arr[i])); + } + + function signalDOMEvent(cm, e, override) { + signal(cm, override || e.type, cm, e); + return e_defaultPrevented(e) || e.codemirrorIgnore; + } + + function fireDelayed() { + --delayedCallbackDepth; + var delayed = delayedCallbacks; + delayedCallbacks = null; + for (var i = 0; i < delayed.length; ++i) delayed[i](); + } + + function hasHandler(emitter, type) { + var arr = emitter._handlers && emitter._handlers[type]; + return arr && arr.length > 0; + } + + CodeMirror.on = on; CodeMirror.off = off; CodeMirror.signal = signal; + + function eventMixin(ctor) { + ctor.prototype.on = function(type, f) {on(this, type, f);}; + ctor.prototype.off = function(type, f) {off(this, type, f);}; + } + + // MISC UTILITIES + + // Number of pixels added to scroller and sizer to hide scrollbar + var scrollerCutOff = 30; + + // Returned or thrown by various protocols to signal 'I'm not + // handling this'. + var Pass = CodeMirror.Pass = {toString: function(){return "CodeMirror.Pass";}}; + + function Delayed() {this.id = null;} + Delayed.prototype = {set: function(ms, f) {clearTimeout(this.id); this.id = setTimeout(f, ms);}}; + + // Counts the column offset in a string, taking tabs into account. + // Used mostly to find indentation. + function countColumn(string, end, tabSize, startIndex, startValue) { + if (end == null) { + end = string.search(/[^\s\u00a0]/); + if (end == -1) end = string.length; + } + for (var i = startIndex || 0, n = startValue || 0; i < end; ++i) { + if (string.charAt(i) == "\t") n += tabSize - (n % tabSize); + else ++n; + } + return n; + } + CodeMirror.countColumn = countColumn; + + var spaceStrs = [""]; + function spaceStr(n) { + while (spaceStrs.length <= n) + spaceStrs.push(lst(spaceStrs) + " "); + return spaceStrs[n]; + } + + function lst(arr) { return arr[arr.length-1]; } + + function selectInput(node) { + if (ios) { // Mobile Safari apparently has a bug where select() is broken. + node.selectionStart = 0; + node.selectionEnd = node.value.length; + } else { + // Suppress mysterious IE10 errors + try { node.select(); } + catch(_e) {} + } + } + + function indexOf(collection, elt) { + if (collection.indexOf) return collection.indexOf(elt); + for (var i = 0, e = collection.length; i < e; ++i) + if (collection[i] == elt) return i; + return -1; + } + + function createObj(base, props) { + function Obj() {} + Obj.prototype = base; + var inst = new Obj(); + if (props) copyObj(props, inst); + return inst; + } + + function copyObj(obj, target) { + if (!target) target = {}; + for (var prop in obj) if (obj.hasOwnProperty(prop)) target[prop] = obj[prop]; + return target; + } + + function emptyArray(size) { + for (var a = [], i = 0; i < size; ++i) a.push(undefined); + return a; + } + + function bind(f) { + var args = Array.prototype.slice.call(arguments, 1); + return function(){return f.apply(null, args);}; + } + + var nonASCIISingleCaseWordChar = /[\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/; + function isWordChar(ch) { + return /\w/.test(ch) || ch > "\x80" && + (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch)); + } + + function isEmpty(obj) { + for (var n in obj) if (obj.hasOwnProperty(n) && obj[n]) return false; + return true; + } + + var isExtendingChar = /[\u0300-\u036F\u0483-\u0487\u0488-\u0489\u0591-\u05BD\u05BF\u05C1-\u05C2\u05C4-\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7-\u06E8\u06EA-\u06ED\uA66F\u1DC0–\u1DFF\u20D0–\u20FF\uA670-\uA672\uA674-\uA67D\uA69F\udc00-\udfff\uFE20–\uFE2F]/; + + // DOM UTILITIES + + function elt(tag, content, className, style) { + var e = document.createElement(tag); + if (className) e.className = className; + if (style) e.style.cssText = style; + if (typeof content == "string") setTextContent(e, content); + else if (content) for (var i = 0; i < content.length; ++i) e.appendChild(content[i]); + return e; + } + + function removeChildren(e) { + for (var count = e.childNodes.length; count > 0; --count) + e.removeChild(e.firstChild); + return e; + } + + function removeChildrenAndAdd(parent, e) { + return removeChildren(parent).appendChild(e); + } + + function setTextContent(e, str) { + if (ie_lt9) { + e.innerHTML = ""; + e.appendChild(document.createTextNode(str)); + } else e.textContent = str; + } + + function getRect(node) { + return node.getBoundingClientRect(); + } + CodeMirror.replaceGetRect = function(f) { getRect = f; }; + + // FEATURE DETECTION + + // Detect drag-and-drop + var dragAndDrop = function() { + // There is *some* kind of drag-and-drop support in IE6-8, but I + // couldn't get it to work yet. + if (ie_lt9) return false; + var div = elt('div'); + return "draggable" in div || "dragDrop" in div; + }(); + + // For a reason I have yet to figure out, some browsers disallow + // word wrapping between certain characters *only* if a new inline + // element is started between them. This makes it hard to reliably + // measure the position of things, since that requires inserting an + // extra span. This terribly fragile set of tests matches the + // character combinations that suffer from this phenomenon on the + // various browsers. + function spanAffectsWrapping() { return false; } + if (gecko) // Only for "$'" + spanAffectsWrapping = function(str, i) { + return str.charCodeAt(i - 1) == 36 && str.charCodeAt(i) == 39; + }; + else if (safari && !/Version\/([6-9]|\d\d)\b/.test(navigator.userAgent)) + spanAffectsWrapping = function(str, i) { + return /\-[^ \-?]|\?[^ !\'\"\),.\-\/:;\?\]\}]/.test(str.slice(i - 1, i + 1)); + }; + else if (webkit && /Chrome\/(?:29|[3-9]\d|\d\d\d)\./.test(navigator.userAgent)) + spanAffectsWrapping = function(str, i) { + var code = str.charCodeAt(i - 1); + return code >= 8208 && code <= 8212; + }; + else if (webkit) + spanAffectsWrapping = function(str, i) { + if (i > 1 && str.charCodeAt(i - 1) == 45) { + if (/\w/.test(str.charAt(i - 2)) && /[^\-?\.]/.test(str.charAt(i))) return true; + if (i > 2 && /[\d\.,]/.test(str.charAt(i - 2)) && /[\d\.,]/.test(str.charAt(i))) return false; + } + return /[~!#%&*)=+}\]\\|\"\.>,:;][({[<]|-[^\-?\.\u2010-\u201f\u2026]|\?[\w~`@#$%\^&*(_=+{[|><]|…[\w~`@#$%\^&*(_=+{[><]/.test(str.slice(i - 1, i + 1)); + }; + + var knownScrollbarWidth; + function scrollbarWidth(measure) { + if (knownScrollbarWidth != null) return knownScrollbarWidth; + var test = elt("div", null, null, "width: 50px; height: 50px; overflow-x: scroll"); + removeChildrenAndAdd(measure, test); + if (test.offsetWidth) + knownScrollbarWidth = test.offsetHeight - test.clientHeight; + return knownScrollbarWidth || 0; + } + + var zwspSupported; + function zeroWidthElement(measure) { + if (zwspSupported == null) { + var test = elt("span", "\u200b"); + removeChildrenAndAdd(measure, elt("span", [test, document.createTextNode("x")])); + if (measure.firstChild.offsetHeight != 0) + zwspSupported = test.offsetWidth <= 1 && test.offsetHeight > 2 && !ie_lt8; + } + if (zwspSupported) return elt("span", "\u200b"); + else return elt("span", "\u00a0", null, "display: inline-block; width: 1px; margin-right: -1px"); + } + + // See if "".split is the broken IE version, if so, provide an + // alternative way to split lines. + var splitLines = "\n\nb".split(/\n/).length != 3 ? function(string) { + var pos = 0, result = [], l = string.length; + while (pos <= l) { + var nl = string.indexOf("\n", pos); + if (nl == -1) nl = string.length; + var line = string.slice(pos, string.charAt(nl - 1) == "\r" ? nl - 1 : nl); + var rt = line.indexOf("\r"); + if (rt != -1) { + result.push(line.slice(0, rt)); + pos += rt + 1; + } else { + result.push(line); + pos = nl + 1; + } + } + return result; + } : function(string){return string.split(/\r\n?|\n/);}; + CodeMirror.splitLines = splitLines; + + var hasSelection = window.getSelection ? function(te) { + try { return te.selectionStart != te.selectionEnd; } + catch(e) { return false; } + } : function(te) { + try {var range = te.ownerDocument.selection.createRange();} + catch(e) {} + if (!range || range.parentElement() != te) return false; + return range.compareEndPoints("StartToEnd", range) != 0; + }; + + var hasCopyEvent = (function() { + var e = elt("div"); + if ("oncopy" in e) return true; + e.setAttribute("oncopy", "return;"); + return typeof e.oncopy == 'function'; + })(); + + // KEY NAMING + + var keyNames = {3: "Enter", 8: "Backspace", 9: "Tab", 13: "Enter", 16: "Shift", 17: "Ctrl", 18: "Alt", + 19: "Pause", 20: "CapsLock", 27: "Esc", 32: "Space", 33: "PageUp", 34: "PageDown", 35: "End", + 36: "Home", 37: "Left", 38: "Up", 39: "Right", 40: "Down", 44: "PrintScrn", 45: "Insert", + 46: "Delete", 59: ";", 91: "Mod", 92: "Mod", 93: "Mod", 109: "-", 107: "=", 127: "Delete", + 186: ";", 187: "=", 188: ",", 189: "-", 190: ".", 191: "/", 192: "`", 219: "[", 220: "\\", + 221: "]", 222: "'", 63276: "PageUp", 63277: "PageDown", 63275: "End", 63273: "Home", + 63234: "Left", 63232: "Up", 63235: "Right", 63233: "Down", 63302: "Insert", 63272: "Delete"}; + CodeMirror.keyNames = keyNames; + (function() { + // Number keys + for (var i = 0; i < 10; i++) keyNames[i + 48] = String(i); + // Alphabetic keys + for (var i = 65; i <= 90; i++) keyNames[i] = String.fromCharCode(i); + // Function keys + for (var i = 1; i <= 12; i++) keyNames[i + 111] = keyNames[i + 63235] = "F" + i; + })(); + + // BIDI HELPERS + + function iterateBidiSections(order, from, to, f) { + if (!order) return f(from, to, "ltr"); + var found = false; + for (var i = 0; i < order.length; ++i) { + var part = order[i]; + if (part.from < to && part.to > from || from == to && part.to == from) { + f(Math.max(part.from, from), Math.min(part.to, to), part.level == 1 ? "rtl" : "ltr"); + found = true; + } + } + if (!found) f(from, to, "ltr"); + } + + function bidiLeft(part) { return part.level % 2 ? part.to : part.from; } + function bidiRight(part) { return part.level % 2 ? part.from : part.to; } + + function lineLeft(line) { var order = getOrder(line); return order ? bidiLeft(order[0]) : 0; } + function lineRight(line) { + var order = getOrder(line); + if (!order) return line.text.length; + return bidiRight(lst(order)); + } + + function lineStart(cm, lineN) { + var line = getLine(cm.doc, lineN); + var visual = visualLine(cm.doc, line); + if (visual != line) lineN = lineNo(visual); + var order = getOrder(visual); + var ch = !order ? 0 : order[0].level % 2 ? lineRight(visual) : lineLeft(visual); + return Pos(lineN, ch); + } + function lineEnd(cm, lineN) { + var merged, line; + while (merged = collapsedSpanAtEnd(line = getLine(cm.doc, lineN))) + lineN = merged.find().to.line; + var order = getOrder(line); + var ch = !order ? line.text.length : order[0].level % 2 ? lineLeft(line) : lineRight(line); + return Pos(lineN, ch); + } + + function compareBidiLevel(order, a, b) { + var linedir = order[0].level; + if (a == linedir) return true; + if (b == linedir) return false; + return a < b; + } + var bidiOther; + function getBidiPartAt(order, pos) { + for (var i = 0, found; i < order.length; ++i) { + var cur = order[i]; + if (cur.from < pos && cur.to > pos) { bidiOther = null; return i; } + if (cur.from == pos || cur.to == pos) { + if (found == null) { + found = i; + } else if (compareBidiLevel(order, cur.level, order[found].level)) { + bidiOther = found; + return i; + } else { + bidiOther = i; + return found; + } + } + } + bidiOther = null; + return found; + } + + function moveInLine(line, pos, dir, byUnit) { + if (!byUnit) return pos + dir; + do pos += dir; + while (pos > 0 && isExtendingChar.test(line.text.charAt(pos))); + return pos; + } + + // This is somewhat involved. It is needed in order to move + // 'visually' through bi-directional text -- i.e., pressing left + // should make the cursor go left, even when in RTL text. The + // tricky part is the 'jumps', where RTL and LTR text touch each + // other. This often requires the cursor offset to move more than + // one unit, in order to visually move one unit. + function moveVisually(line, start, dir, byUnit) { + var bidi = getOrder(line); + if (!bidi) return moveLogically(line, start, dir, byUnit); + var pos = getBidiPartAt(bidi, start), part = bidi[pos]; + var target = moveInLine(line, start, part.level % 2 ? -dir : dir, byUnit); + + for (;;) { + if (target > part.from && target < part.to) return target; + if (target == part.from || target == part.to) { + if (getBidiPartAt(bidi, target) == pos) return target; + part = bidi[pos += dir]; + return (dir > 0) == part.level % 2 ? part.to : part.from; + } else { + part = bidi[pos += dir]; + if (!part) return null; + if ((dir > 0) == part.level % 2) + target = moveInLine(line, part.to, -1, byUnit); + else + target = moveInLine(line, part.from, 1, byUnit); + } + } + } + + function moveLogically(line, start, dir, byUnit) { + var target = start + dir; + if (byUnit) while (target > 0 && isExtendingChar.test(line.text.charAt(target))) target += dir; + return target < 0 || target > line.text.length ? null : target; + } + + // Bidirectional ordering algorithm + // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm + // that this (partially) implements. + + // One-char codes used for character types: + // L (L): Left-to-Right + // R (R): Right-to-Left + // r (AL): Right-to-Left Arabic + // 1 (EN): European Number + // + (ES): European Number Separator + // % (ET): European Number Terminator + // n (AN): Arabic Number + // , (CS): Common Number Separator + // m (NSM): Non-Spacing Mark + // b (BN): Boundary Neutral + // s (B): Paragraph Separator + // t (S): Segment Separator + // w (WS): Whitespace + // N (ON): Other Neutrals + + // Returns null if characters are ordered as they appear + // (left-to-right), or an array of sections ({from, to, level} + // objects) in the order in which they occur visually. + var bidiOrdering = (function() { + // Character types for codepoints 0 to 0xff + var lowTypes = "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLL"; + // Character types for codepoints 0x600 to 0x6ff + var arabicTypes = "rrrrrrrrrrrr,rNNmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmrrrrrrrnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmNmmmmrrrrrrrrrrrrrrrrrr"; + function charType(code) { + if (code <= 0xff) return lowTypes.charAt(code); + else if (0x590 <= code && code <= 0x5f4) return "R"; + else if (0x600 <= code && code <= 0x6ff) return arabicTypes.charAt(code - 0x600); + else if (0x700 <= code && code <= 0x8ac) return "r"; + else return "L"; + } + + var bidiRE = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/; + var isNeutral = /[stwN]/, isStrong = /[LRr]/, countsAsLeft = /[Lb1n]/, countsAsNum = /[1n]/; + // Browsers seem to always treat the boundaries of block elements as being L. + var outerType = "L"; + + return function(str) { + if (!bidiRE.test(str)) return false; + var len = str.length, types = []; + for (var i = 0, type; i < len; ++i) + types.push(type = charType(str.charCodeAt(i))); + + // W1. Examine each non-spacing mark (NSM) in the level run, and + // change the type of the NSM to the type of the previous + // character. If the NSM is at the start of the level run, it will + // get the type of sor. + for (var i = 0, prev = outerType; i < len; ++i) { + var type = types[i]; + if (type == "m") types[i] = prev; + else prev = type; + } + + // W2. Search backwards from each instance of a European number + // until the first strong type (R, L, AL, or sor) is found. If an + // AL is found, change the type of the European number to Arabic + // number. + // W3. Change all ALs to R. + for (var i = 0, cur = outerType; i < len; ++i) { + var type = types[i]; + if (type == "1" && cur == "r") types[i] = "n"; + else if (isStrong.test(type)) { cur = type; if (type == "r") types[i] = "R"; } + } + + // W4. A single European separator between two European numbers + // changes to a European number. A single common separator between + // two numbers of the same type changes to that type. + for (var i = 1, prev = types[0]; i < len - 1; ++i) { + var type = types[i]; + if (type == "+" && prev == "1" && types[i+1] == "1") types[i] = "1"; + else if (type == "," && prev == types[i+1] && + (prev == "1" || prev == "n")) types[i] = prev; + prev = type; + } + + // W5. A sequence of European terminators adjacent to European + // numbers changes to all European numbers. + // W6. Otherwise, separators and terminators change to Other + // Neutral. + for (var i = 0; i < len; ++i) { + var type = types[i]; + if (type == ",") types[i] = "N"; + else if (type == "%") { + for (var end = i + 1; end < len && types[end] == "%"; ++end) {} + var replace = (i && types[i-1] == "!") || (end < len - 1 && types[end] == "1") ? "1" : "N"; + for (var j = i; j < end; ++j) types[j] = replace; + i = end - 1; + } + } + + // W7. Search backwards from each instance of a European number + // until the first strong type (R, L, or sor) is found. If an L is + // found, then change the type of the European number to L. + for (var i = 0, cur = outerType; i < len; ++i) { + var type = types[i]; + if (cur == "L" && type == "1") types[i] = "L"; + else if (isStrong.test(type)) cur = type; + } + + // N1. A sequence of neutrals takes the direction of the + // surrounding strong text if the text on both sides has the same + // direction. European and Arabic numbers act as if they were R in + // terms of their influence on neutrals. Start-of-level-run (sor) + // and end-of-level-run (eor) are used at level run boundaries. + // N2. Any remaining neutrals take the embedding direction. + for (var i = 0; i < len; ++i) { + if (isNeutral.test(types[i])) { + for (var end = i + 1; end < len && isNeutral.test(types[end]); ++end) {} + var before = (i ? types[i-1] : outerType) == "L"; + var after = (end < len - 1 ? types[end] : outerType) == "L"; + var replace = before || after ? "L" : "R"; + for (var j = i; j < end; ++j) types[j] = replace; + i = end - 1; + } + } + + // Here we depart from the documented algorithm, in order to avoid + // building up an actual levels array. Since there are only three + // levels (0, 1, 2) in an implementation that doesn't take + // explicit embedding into account, we can build up the order on + // the fly, without following the level-based algorithm. + var order = [], m; + for (var i = 0; i < len;) { + if (countsAsLeft.test(types[i])) { + var start = i; + for (++i; i < len && countsAsLeft.test(types[i]); ++i) {} + order.push({from: start, to: i, level: 0}); + } else { + var pos = i, at = order.length; + for (++i; i < len && types[i] != "L"; ++i) {} + for (var j = pos; j < i;) { + if (countsAsNum.test(types[j])) { + if (pos < j) order.splice(at, 0, {from: pos, to: j, level: 1}); + var nstart = j; + for (++j; j < i && countsAsNum.test(types[j]); ++j) {} + order.splice(at, 0, {from: nstart, to: j, level: 2}); + pos = j; + } else ++j; + } + if (pos < i) order.splice(at, 0, {from: pos, to: i, level: 1}); + } + } + if (order[0].level == 1 && (m = str.match(/^\s+/))) { + order[0].from = m[0].length; + order.unshift({from: 0, to: m[0].length, level: 0}); + } + if (lst(order).level == 1 && (m = str.match(/\s+$/))) { + lst(order).to -= m[0].length; + order.push({from: len - m[0].length, to: len, level: 0}); + } + if (order[0].level != lst(order).level) + order.push({from: len, to: len, level: order[0].level}); + + return order; + }; + })(); + + // THE END + + CodeMirror.version = "3.20.0"; + + return CodeMirror; +})(); diff --git a/pitfall/pdfkit/node_modules/codemirror/measure_scroll.txt b/pitfall/pdfkit/node_modules/codemirror/measure_scroll.txt new file mode 100644 index 00000000..192121bb --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/measure_scroll.txt @@ -0,0 +1,16 @@ +- Want to first draw lines before doing anything that requires measuring + +- Need to know scroll position to know what to draw + +- Or, in some other way, estimate which parts to draw + + - From cursor: if it looks like cursor will be outside, find side to + align cursor with, plus screenheight above/below it + + - From absolute number -- don't need to measure before redraw + + - Offset is like abs number + +- So instead of pixel viewport, allow either pixels or lines. + + - Or always convert to lines? diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/apl/apl.js b/pitfall/pdfkit/node_modules/codemirror/mode/apl/apl.js new file mode 100644 index 00000000..5c23af85 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/apl/apl.js @@ -0,0 +1,160 @@ +CodeMirror.defineMode("apl", function() { + var builtInOps = { + ".": "innerProduct", + "\\": "scan", + "/": "reduce", + "⌿": "reduce1Axis", + "⍀": "scan1Axis", + "¨": "each", + "⍣": "power" + }; + var builtInFuncs = { + "+": ["conjugate", "add"], + "−": ["negate", "subtract"], + "×": ["signOf", "multiply"], + "÷": ["reciprocal", "divide"], + "⌈": ["ceiling", "greaterOf"], + "⌊": ["floor", "lesserOf"], + "∣": ["absolute", "residue"], + "⍳": ["indexGenerate", "indexOf"], + "?": ["roll", "deal"], + "⋆": ["exponentiate", "toThePowerOf"], + "⍟": ["naturalLog", "logToTheBase"], + "○": ["piTimes", "circularFuncs"], + "!": ["factorial", "binomial"], + "⌹": ["matrixInverse", "matrixDivide"], + "<": [null, "lessThan"], + "≤": [null, "lessThanOrEqual"], + "=": [null, "equals"], + ">": [null, "greaterThan"], + "≥": [null, "greaterThanOrEqual"], + "≠": [null, "notEqual"], + "≡": ["depth", "match"], + "≢": [null, "notMatch"], + "∈": ["enlist", "membership"], + "⍷": [null, "find"], + "∪": ["unique", "union"], + "∩": [null, "intersection"], + "∼": ["not", "without"], + "∨": [null, "or"], + "∧": [null, "and"], + "⍱": [null, "nor"], + "⍲": [null, "nand"], + "⍴": ["shapeOf", "reshape"], + ",": ["ravel", "catenate"], + "⍪": [null, "firstAxisCatenate"], + "⌽": ["reverse", "rotate"], + "⊖": ["axis1Reverse", "axis1Rotate"], + "⍉": ["transpose", null], + "↑": ["first", "take"], + "↓": [null, "drop"], + "⊂": ["enclose", "partitionWithAxis"], + "⊃": ["diclose", "pick"], + "⌷": [null, "index"], + "⍋": ["gradeUp", null], + "⍒": ["gradeDown", null], + "⊤": ["encode", null], + "⊥": ["decode", null], + "⍕": ["format", "formatByExample"], + "⍎": ["execute", null], + "⊣": ["stop", "left"], + "⊢": ["pass", "right"] + }; + + var isOperator = /[\.\/⌿⍀¨⍣]/; + var isNiladic = /⍬/; + var isFunction = /[\+−×÷⌈⌊∣⍳\?⋆⍟○!⌹<≤=>≥≠≡≢∈⍷∪∩∼∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⌷⍋⍒⊤⊥⍕⍎⊣⊢]/; + var isArrow = /←/; + var isComment = /[⍝#].*$/; + + var stringEater = function(type) { + var prev; + prev = false; + return function(c) { + prev = c; + if (c === type) { + return prev === "\\"; + } + return true; + }; + }; + return { + startState: function() { + return { + prev: false, + func: false, + op: false, + string: false, + escape: false + }; + }, + token: function(stream, state) { + var ch, funcName, word; + if (stream.eatSpace()) { + return null; + } + ch = stream.next(); + if (ch === '"' || ch === "'") { + stream.eatWhile(stringEater(ch)); + stream.next(); + state.prev = true; + return "string"; + } + if (/[\[{\(]/.test(ch)) { + state.prev = false; + return null; + } + if (/[\]}\)]/.test(ch)) { + state.prev = true; + return null; + } + if (isNiladic.test(ch)) { + state.prev = false; + return "niladic"; + } + if (/[¯\d]/.test(ch)) { + if (state.func) { + state.func = false; + state.prev = false; + } else { + state.prev = true; + } + stream.eatWhile(/[\w\.]/); + return "number"; + } + if (isOperator.test(ch)) { + return "operator apl-" + builtInOps[ch]; + } + if (isArrow.test(ch)) { + return "apl-arrow"; + } + if (isFunction.test(ch)) { + funcName = "apl-"; + if (builtInFuncs[ch] != null) { + if (state.prev) { + funcName += builtInFuncs[ch][1]; + } else { + funcName += builtInFuncs[ch][0]; + } + } + state.func = true; + state.prev = false; + return "function " + funcName; + } + if (isComment.test(ch)) { + stream.skipToEnd(); + return "comment"; + } + if (ch === "∘" && stream.peek() === ".") { + stream.next(); + return "function jot-dot"; + } + stream.eatWhile(/[\w\$_]/); + word = stream.current(); + state.prev = true; + return "keyword"; + } + }; +}); + +CodeMirror.defineMIME("text/apl", "apl"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/apl/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/apl/index.html new file mode 100644 index 00000000..f8282ac4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/apl/index.html @@ -0,0 +1,72 @@ + + +CodeMirror: APL mode + + + + + + + + + + +
+

APL mode

+
+ + + +

Simple mode that tries to handle APL as well as it can.

+

It attempts to label functions/operators based upon + monadic/dyadic usage (but this is far from fully fleshed out). + This means there are meaningful classnames so hover states can + have popups etc.

+ +

MIME types defined: text/apl (APL code)

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/asterisk/asterisk.js b/pitfall/pdfkit/node_modules/codemirror/mode/asterisk/asterisk.js new file mode 100644 index 00000000..60b689d1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/asterisk/asterisk.js @@ -0,0 +1,183 @@ +/* + * ===================================================================================== + * + * Filename: mode/asterisk/asterisk.js + * + * Description: CodeMirror mode for Asterisk dialplan + * + * Created: 05/17/2012 09:20:25 PM + * Revision: none + * + * Author: Stas Kobzar (stas@modulis.ca), + * Company: Modulis.ca Inc. + * + * ===================================================================================== + */ + +CodeMirror.defineMode("asterisk", function() { + var atoms = ["exten", "same", "include","ignorepat","switch"], + dpcmd = ["#include","#exec"], + apps = [ + "addqueuemember","adsiprog","aelsub","agentlogin","agentmonitoroutgoing","agi", + "alarmreceiver","amd","answer","authenticate","background","backgrounddetect", + "bridge","busy","callcompletioncancel","callcompletionrequest","celgenuserevent", + "changemonitor","chanisavail","channelredirect","chanspy","clearhash","confbridge", + "congestion","continuewhile","controlplayback","dahdiacceptr2call","dahdibarge", + "dahdiras","dahdiscan","dahdisendcallreroutingfacility","dahdisendkeypadfacility", + "datetime","dbdel","dbdeltree","deadagi","dial","dictate","directory","disa", + "dumpchan","eagi","echo","endwhile","exec","execif","execiftime","exitwhile","extenspy", + "externalivr","festival","flash","followme","forkcdr","getcpeid","gosub","gosubif", + "goto","gotoif","gotoiftime","hangup","iax2provision","ices","importvar","incomplete", + "ivrdemo","jabberjoin","jabberleave","jabbersend","jabbersendgroup","jabberstatus", + "jack","log","macro","macroexclusive","macroexit","macroif","mailboxexists","meetme", + "meetmeadmin","meetmechanneladmin","meetmecount","milliwatt","minivmaccmess","minivmdelete", + "minivmgreet","minivmmwi","minivmnotify","minivmrecord","mixmonitor","monitor","morsecode", + "mp3player","mset","musiconhold","nbscat","nocdr","noop","odbc","odbc","odbcfinish", + "originate","ospauth","ospfinish","osplookup","ospnext","page","park","parkandannounce", + "parkedcall","pausemonitor","pausequeuemember","pickup","pickupchan","playback","playtones", + "privacymanager","proceeding","progress","queue","queuelog","raiseexception","read","readexten", + "readfile","receivefax","receivefax","receivefax","record","removequeuemember", + "resetcdr","retrydial","return","ringing","sayalpha","saycountedadj","saycountednoun", + "saycountpl","saydigits","saynumber","sayphonetic","sayunixtime","senddtmf","sendfax", + "sendfax","sendfax","sendimage","sendtext","sendurl","set","setamaflags", + "setcallerpres","setmusiconhold","sipaddheader","sipdtmfmode","sipremoveheader","skel", + "slastation","slatrunk","sms","softhangup","speechactivategrammar","speechbackground", + "speechcreate","speechdeactivategrammar","speechdestroy","speechloadgrammar","speechprocessingsound", + "speechstart","speechunloadgrammar","stackpop","startmusiconhold","stopmixmonitor","stopmonitor", + "stopmusiconhold","stopplaytones","system","testclient","testserver","transfer","tryexec", + "trysystem","unpausemonitor","unpausequeuemember","userevent","verbose","vmauthenticate", + "vmsayname","voicemail","voicemailmain","wait","waitexten","waitfornoise","waitforring", + "waitforsilence","waitmusiconhold","waituntil","while","zapateller" + ]; + + function basicToken(stream,state){ + var cur = ''; + var ch = ''; + ch = stream.next(); + // comment + if(ch == ";") { + stream.skipToEnd(); + return "comment"; + } + // context + if(ch == '[') { + stream.skipTo(']'); + stream.eat(']'); + return "header"; + } + // string + if(ch == '"') { + stream.skipTo('"'); + return "string"; + } + if(ch == "'") { + stream.skipTo("'"); + return "string-2"; + } + // dialplan commands + if(ch == '#') { + stream.eatWhile(/\w/); + cur = stream.current(); + if(dpcmd.indexOf(cur) !== -1) { + stream.skipToEnd(); + return "strong"; + } + } + // application args + if(ch == '$'){ + var ch1 = stream.peek(); + if(ch1 == '{'){ + stream.skipTo('}'); + stream.eat('}'); + return "variable-3"; + } + } + // extension + stream.eatWhile(/\w/); + cur = stream.current(); + if(atoms.indexOf(cur) !== -1) { + state.extenStart = true; + switch(cur) { + case 'same': state.extenSame = true; break; + case 'include': + case 'switch': + case 'ignorepat': + state.extenInclude = true;break; + default:break; + } + return "atom"; + } + } + + return { + startState: function() { + return { + extenStart: false, + extenSame: false, + extenInclude: false, + extenExten: false, + extenPriority: false, + extenApplication: false + }; + }, + token: function(stream, state) { + + var cur = ''; + var ch = ''; + if(stream.eatSpace()) return null; + // extension started + if(state.extenStart){ + stream.eatWhile(/[^\s]/); + cur = stream.current(); + if(/^=>?$/.test(cur)){ + state.extenExten = true; + state.extenStart = false; + return "strong"; + } else { + state.extenStart = false; + stream.skipToEnd(); + return "error"; + } + } else if(state.extenExten) { + // set exten and priority + state.extenExten = false; + state.extenPriority = true; + stream.eatWhile(/[^,]/); + if(state.extenInclude) { + stream.skipToEnd(); + state.extenPriority = false; + state.extenInclude = false; + } + if(state.extenSame) { + state.extenPriority = false; + state.extenSame = false; + state.extenApplication = true; + } + return "tag"; + } else if(state.extenPriority) { + state.extenPriority = false; + state.extenApplication = true; + ch = stream.next(); // get comma + if(state.extenSame) return null; + stream.eatWhile(/[^,]/); + return "number"; + } else if(state.extenApplication) { + stream.eatWhile(/,/); + cur = stream.current(); + if(cur === ',') return null; + stream.eatWhile(/\w/); + cur = stream.current().toLowerCase(); + state.extenApplication = false; + if(apps.indexOf(cur) !== -1){ + return "def strong"; + } + } else{ + return basicToken(stream,state); + } + + return null; + } + }; +}); + +CodeMirror.defineMIME("text/x-asterisk", "asterisk"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/asterisk/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/asterisk/index.html new file mode 100644 index 00000000..6abdecb5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/asterisk/index.html @@ -0,0 +1,154 @@ + + +CodeMirror: Asterisk dialplan mode + + + + + + + + + +
+

Asterisk dialplan mode

+
+ + +

MIME types defined: text/x-asterisk.

+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/clike/clike.js b/pitfall/pdfkit/node_modules/codemirror/mode/clike/clike.js new file mode 100644 index 00000000..f6626cd0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/clike/clike.js @@ -0,0 +1,362 @@ +CodeMirror.defineMode("clike", function(config, parserConfig) { + var indentUnit = config.indentUnit, + statementIndentUnit = parserConfig.statementIndentUnit || indentUnit, + dontAlignCalls = parserConfig.dontAlignCalls, + keywords = parserConfig.keywords || {}, + builtin = parserConfig.builtin || {}, + blockKeywords = parserConfig.blockKeywords || {}, + atoms = parserConfig.atoms || {}, + hooks = parserConfig.hooks || {}, + multiLineStrings = parserConfig.multiLineStrings; + var isOperatorChar = /[+\-*&%=<>!?|\/]/; + + var curPunc; + + function tokenBase(stream, state) { + var ch = stream.next(); + if (hooks[ch]) { + var result = hooks[ch](stream, state); + if (result !== false) return result; + } + if (ch == '"' || ch == "'") { + state.tokenize = tokenString(ch); + return state.tokenize(stream, state); + } + if (/[\[\]{}\(\),;\:\.]/.test(ch)) { + curPunc = ch; + return null; + } + if (/\d/.test(ch)) { + stream.eatWhile(/[\w\.]/); + return "number"; + } + if (ch == "/") { + if (stream.eat("*")) { + state.tokenize = tokenComment; + return tokenComment(stream, state); + } + if (stream.eat("/")) { + stream.skipToEnd(); + return "comment"; + } + } + if (isOperatorChar.test(ch)) { + stream.eatWhile(isOperatorChar); + return "operator"; + } + stream.eatWhile(/[\w\$_]/); + var cur = stream.current(); + if (keywords.propertyIsEnumerable(cur)) { + if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement"; + return "keyword"; + } + if (builtin.propertyIsEnumerable(cur)) { + if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement"; + return "builtin"; + } + if (atoms.propertyIsEnumerable(cur)) return "atom"; + return "variable"; + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, next, end = false; + while ((next = stream.next()) != null) { + if (next == quote && !escaped) {end = true; break;} + escaped = !escaped && next == "\\"; + } + if (end || !(escaped || multiLineStrings)) + state.tokenize = null; + return "string"; + }; + } + + function tokenComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (ch == "/" && maybeEnd) { + state.tokenize = null; + break; + } + maybeEnd = (ch == "*"); + } + return "comment"; + } + + function Context(indented, column, type, align, prev) { + this.indented = indented; + this.column = column; + this.type = type; + this.align = align; + this.prev = prev; + } + function pushContext(state, col, type) { + var indent = state.indented; + if (state.context && state.context.type == "statement") + indent = state.context.indented; + return state.context = new Context(indent, col, type, null, state.context); + } + function popContext(state) { + var t = state.context.type; + if (t == ")" || t == "]" || t == "}") + state.indented = state.context.indented; + return state.context = state.context.prev; + } + + // Interface + + return { + startState: function(basecolumn) { + return { + tokenize: null, + context: new Context((basecolumn || 0) - indentUnit, 0, "top", false), + indented: 0, + startOfLine: true + }; + }, + + token: function(stream, state) { + var ctx = state.context; + if (stream.sol()) { + if (ctx.align == null) ctx.align = false; + state.indented = stream.indentation(); + state.startOfLine = true; + } + if (stream.eatSpace()) return null; + curPunc = null; + var style = (state.tokenize || tokenBase)(stream, state); + if (style == "comment" || style == "meta") return style; + if (ctx.align == null) ctx.align = true; + + if ((curPunc == ";" || curPunc == ":" || curPunc == ",") && ctx.type == "statement") popContext(state); + else if (curPunc == "{") pushContext(state, stream.column(), "}"); + else if (curPunc == "[") pushContext(state, stream.column(), "]"); + else if (curPunc == "(") pushContext(state, stream.column(), ")"); + else if (curPunc == "}") { + while (ctx.type == "statement") ctx = popContext(state); + if (ctx.type == "}") ctx = popContext(state); + while (ctx.type == "statement") ctx = popContext(state); + } + else if (curPunc == ctx.type) popContext(state); + else if (((ctx.type == "}" || ctx.type == "top") && curPunc != ';') || (ctx.type == "statement" && curPunc == "newstatement")) + pushContext(state, stream.column(), "statement"); + state.startOfLine = false; + return style; + }, + + indent: function(state, textAfter) { + if (state.tokenize != tokenBase && state.tokenize != null) return CodeMirror.Pass; + var ctx = state.context, firstChar = textAfter && textAfter.charAt(0); + if (ctx.type == "statement" && firstChar == "}") ctx = ctx.prev; + var closing = firstChar == ctx.type; + if (ctx.type == "statement") return ctx.indented + (firstChar == "{" ? 0 : statementIndentUnit); + else if (ctx.align && (!dontAlignCalls || ctx.type != ")")) return ctx.column + (closing ? 0 : 1); + else if (ctx.type == ")" && !closing) return ctx.indented + statementIndentUnit; + else return ctx.indented + (closing ? 0 : indentUnit); + }, + + electricChars: "{}", + blockCommentStart: "/*", + blockCommentEnd: "*/", + lineComment: "//", + fold: "brace" + }; +}); + +(function() { + function words(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + var cKeywords = "auto if break int case long char register continue return default short do sizeof " + + "double static else struct entry switch extern typedef float union for unsigned " + + "goto while enum void const signed volatile"; + + function cppHook(stream, state) { + if (!state.startOfLine) return false; + for (;;) { + if (stream.skipTo("\\")) { + stream.next(); + if (stream.eol()) { + state.tokenize = cppHook; + break; + } + } else { + stream.skipToEnd(); + state.tokenize = null; + break; + } + } + return "meta"; + } + + // C#-style strings where "" escapes a quote. + function tokenAtString(stream, state) { + var next; + while ((next = stream.next()) != null) { + if (next == '"' && !stream.eat('"')) { + state.tokenize = null; + break; + } + } + return "string"; + } + + function mimes(ms, mode) { + for (var i = 0; i < ms.length; ++i) CodeMirror.defineMIME(ms[i], mode); + } + + mimes(["text/x-csrc", "text/x-c", "text/x-chdr"], { + name: "clike", + keywords: words(cKeywords), + blockKeywords: words("case do else for if switch while struct"), + atoms: words("null"), + hooks: {"#": cppHook} + }); + mimes(["text/x-c++src", "text/x-c++hdr"], { + name: "clike", + keywords: words(cKeywords + " asm dynamic_cast namespace reinterpret_cast try bool explicit new " + + "static_cast typeid catch operator template typename class friend private " + + "this using const_cast inline public throw virtual delete mutable protected " + + "wchar_t"), + blockKeywords: words("catch class do else finally for if struct switch try while"), + atoms: words("true false null"), + hooks: {"#": cppHook} + }); + CodeMirror.defineMIME("text/x-java", { + name: "clike", + keywords: words("abstract assert boolean break byte case catch char class const continue default " + + "do double else enum extends final finally float for goto if implements import " + + "instanceof int interface long native new package private protected public " + + "return short static strictfp super switch synchronized this throw throws transient " + + "try void volatile while"), + blockKeywords: words("catch class do else finally for if switch try while"), + atoms: words("true false null"), + hooks: { + "@": function(stream) { + stream.eatWhile(/[\w\$_]/); + return "meta"; + } + } + }); + CodeMirror.defineMIME("text/x-csharp", { + name: "clike", + keywords: words("abstract as base break case catch checked class const continue" + + " default delegate do else enum event explicit extern finally fixed for" + + " foreach goto if implicit in interface internal is lock namespace new" + + " operator out override params private protected public readonly ref return sealed" + + " sizeof stackalloc static struct switch this throw try typeof unchecked" + + " unsafe using virtual void volatile while add alias ascending descending dynamic from get" + + " global group into join let orderby partial remove select set value var yield"), + blockKeywords: words("catch class do else finally for foreach if struct switch try while"), + builtin: words("Boolean Byte Char DateTime DateTimeOffset Decimal Double" + + " Guid Int16 Int32 Int64 Object SByte Single String TimeSpan UInt16 UInt32" + + " UInt64 bool byte char decimal double short int long object" + + " sbyte float string ushort uint ulong"), + atoms: words("true false null"), + hooks: { + "@": function(stream, state) { + if (stream.eat('"')) { + state.tokenize = tokenAtString; + return tokenAtString(stream, state); + } + stream.eatWhile(/[\w\$_]/); + return "meta"; + } + } + }); + CodeMirror.defineMIME("text/x-scala", { + name: "clike", + keywords: words( + + /* scala */ + "abstract case catch class def do else extends false final finally for forSome if " + + "implicit import lazy match new null object override package private protected return " + + "sealed super this throw trait try trye type val var while with yield _ : = => <- <: " + + "<% >: # @ " + + + /* package scala */ + "assert assume require print println printf readLine readBoolean readByte readShort " + + "readChar readInt readLong readFloat readDouble " + + + "AnyVal App Application Array BufferedIterator BigDecimal BigInt Char Console Either " + + "Enumeration Equiv Error Exception Fractional Function IndexedSeq Integral Iterable " + + "Iterator List Map Numeric Nil NotNull Option Ordered Ordering PartialFunction PartialOrdering " + + "Product Proxy Range Responder Seq Serializable Set Specializable Stream StringBuilder " + + "StringContext Symbol Throwable Traversable TraversableOnce Tuple Unit Vector :: #:: " + + + /* package java.lang */ + "Boolean Byte Character CharSequence Class ClassLoader Cloneable Comparable " + + "Compiler Double Exception Float Integer Long Math Number Object Package Pair Process " + + "Runtime Runnable SecurityManager Short StackTraceElement StrictMath String " + + "StringBuffer System Thread ThreadGroup ThreadLocal Throwable Triple Void" + + + ), + blockKeywords: words("catch class do else finally for forSome if match switch try while"), + atoms: words("true false null"), + hooks: { + "@": function(stream) { + stream.eatWhile(/[\w\$_]/); + return "meta"; + } + } + }); + mimes(["x-shader/x-vertex", "x-shader/x-fragment"], { + name: "clike", + keywords: words("float int bool void " + + "vec2 vec3 vec4 ivec2 ivec3 ivec4 bvec2 bvec3 bvec4 " + + "mat2 mat3 mat4 " + + "sampler1D sampler2D sampler3D samplerCube " + + "sampler1DShadow sampler2DShadow" + + "const attribute uniform varying " + + "break continue discard return " + + "for while do if else struct " + + "in out inout"), + blockKeywords: words("for while do if else struct"), + builtin: words("radians degrees sin cos tan asin acos atan " + + "pow exp log exp2 sqrt inversesqrt " + + "abs sign floor ceil fract mod min max clamp mix step smootstep " + + "length distance dot cross normalize ftransform faceforward " + + "reflect refract matrixCompMult " + + "lessThan lessThanEqual greaterThan greaterThanEqual " + + "equal notEqual any all not " + + "texture1D texture1DProj texture1DLod texture1DProjLod " + + "texture2D texture2DProj texture2DLod texture2DProjLod " + + "texture3D texture3DProj texture3DLod texture3DProjLod " + + "textureCube textureCubeLod " + + "shadow1D shadow2D shadow1DProj shadow2DProj " + + "shadow1DLod shadow2DLod shadow1DProjLod shadow2DProjLod " + + "dFdx dFdy fwidth " + + "noise1 noise2 noise3 noise4"), + atoms: words("true false " + + "gl_FragColor gl_SecondaryColor gl_Normal gl_Vertex " + + "gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 " + + "gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 " + + "gl_FogCoord " + + "gl_Position gl_PointSize gl_ClipVertex " + + "gl_FrontColor gl_BackColor gl_FrontSecondaryColor gl_BackSecondaryColor " + + "gl_TexCoord gl_FogFragCoord " + + "gl_FragCoord gl_FrontFacing " + + "gl_FragColor gl_FragData gl_FragDepth " + + "gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix " + + "gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse " + + "gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse " + + "gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose " + + "gl_ProjectionMatrixInverseTranspose " + + "gl_ModelViewProjectionMatrixInverseTranspose " + + "gl_TextureMatrixInverseTranspose " + + "gl_NormalScale gl_DepthRange gl_ClipPlane " + + "gl_Point gl_FrontMaterial gl_BackMaterial gl_LightSource gl_LightModel " + + "gl_FrontLightModelProduct gl_BackLightModelProduct " + + "gl_TextureColor gl_EyePlaneS gl_EyePlaneT gl_EyePlaneR gl_EyePlaneQ " + + "gl_FogParameters " + + "gl_MaxLights gl_MaxClipPlanes gl_MaxTextureUnits gl_MaxTextureCoords " + + "gl_MaxVertexAttribs gl_MaxVertexUniformComponents gl_MaxVaryingFloats " + + "gl_MaxVertexTextureImageUnits gl_MaxTextureImageUnits " + + "gl_MaxFragmentUniformComponents gl_MaxCombineTextureImageUnits " + + "gl_MaxDrawBuffers"), + hooks: {"#": cppHook} + }); +}()); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/clike/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/clike/index.html new file mode 100644 index 00000000..93bd718a --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/clike/index.html @@ -0,0 +1,195 @@ + + +CodeMirror: C-like mode + + + + + + + + + + +
+

C-like mode

+ +
+ +

C++ example

+ +
+ +

Java example

+ +
+ + + +

Simple mode that tries to handle C-like languages as well as it + can. Takes two configuration parameters: keywords, an + object whose property names are the keywords in the language, + and useCPP, which determines whether C preprocessor + directives are recognized.

+ +

MIME types defined: text/x-csrc + (C code), text/x-c++src (C++ + code), text/x-java (Java + code), text/x-csharp (C#).

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/clike/scala.html b/pitfall/pdfkit/node_modules/codemirror/mode/clike/scala.html new file mode 100644 index 00000000..e9acc049 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/clike/scala.html @@ -0,0 +1,767 @@ + + +CodeMirror: Scala mode + + + + + + + + + + +
+

Scala mode

+
+ +
+ + +
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/clojure/clojure.js b/pitfall/pdfkit/node_modules/codemirror/mode/clojure/clojure.js new file mode 100644 index 00000000..ee22a12f --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/clojure/clojure.js @@ -0,0 +1,224 @@ +/** + * Author: Hans Engel + * Branched from CodeMirror's Scheme mode (by Koh Zi Han, based on implementation by Koh Zi Chun) + */ +CodeMirror.defineMode("clojure", function () { + var BUILTIN = "builtin", COMMENT = "comment", STRING = "string", CHARACTER = "string-2", + ATOM = "atom", NUMBER = "number", BRACKET = "bracket", KEYWORD = "keyword"; + var INDENT_WORD_SKIP = 2; + + function makeKeywords(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + + var atoms = makeKeywords("true false nil"); + + var keywords = makeKeywords( + "defn defn- def def- defonce defmulti defmethod defmacro defstruct deftype defprotocol defrecord defproject deftest slice defalias defhinted defmacro- defn-memo defnk defnk defonce- defunbound defunbound- defvar defvar- let letfn do case cond condp for loop recur when when-not when-let when-first if if-let if-not . .. -> ->> doto and or dosync doseq dotimes dorun doall load import unimport ns in-ns refer try catch finally throw with-open with-local-vars binding gen-class gen-and-load-class gen-and-save-class handler-case handle"); + + var builtins = makeKeywords( + "* *' *1 *2 *3 *agent* *allow-unresolved-vars* *assert* *clojure-version* *command-line-args* *compile-files* *compile-path* *compiler-options* *data-readers* *e *err* *file* *flush-on-newline* *fn-loader* *in* *math-context* *ns* *out* *print-dup* *print-length* *print-level* *print-meta* *print-readably* *read-eval* *source-path* *unchecked-math* *use-context-classloader* *verbose-defrecords* *warn-on-reflection* + +' - -' -> ->> ->ArrayChunk ->Vec ->VecNode ->VecSeq -cache-protocol-fn -reset-methods .. / < <= = == > >= EMPTY-NODE accessor aclone add-classpath add-watch agent agent-error agent-errors aget alength alias all-ns alter alter-meta! alter-var-root amap ancestors and apply areduce array-map aset aset-boolean aset-byte aset-char aset-double aset-float aset-int aset-long aset-short assert assoc assoc! assoc-in associative? atom await await-for await1 bases bean bigdec bigint biginteger binding bit-and bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left bit-shift-right bit-test bit-xor boolean boolean-array booleans bound-fn bound-fn* bound? butlast byte byte-array bytes case cast char char-array char-escape-string char-name-string char? chars chunk chunk-append chunk-buffer chunk-cons chunk-first chunk-next chunk-rest chunked-seq? class class? clear-agent-errors clojure-version coll? comment commute comp comparator compare compare-and-set! compile complement concat cond condp conj conj! cons constantly construct-proxy contains? count counted? create-ns create-struct cycle dec dec' decimal? declare default-data-readers definline definterface defmacro defmethod defmulti defn defn- defonce defprotocol defrecord defstruct deftype delay delay? deliver denominator deref derive descendants destructure disj disj! dissoc dissoc! distinct distinct? doall dorun doseq dosync dotimes doto double double-array doubles drop drop-last drop-while empty empty? ensure enumeration-seq error-handler error-mode eval even? every-pred every? ex-data ex-info extend extend-protocol extend-type extenders extends? false? ffirst file-seq filter filterv find find-keyword find-ns find-protocol-impl find-protocol-method find-var first flatten float float-array float? floats flush fn fn? fnext fnil for force format frequencies future future-call future-cancel future-cancelled? future-done? future? gen-class gen-interface gensym get get-in get-method get-proxy-class get-thread-bindings get-validator group-by hash hash-combine hash-map hash-set identical? identity if-let if-not ifn? import in-ns inc inc' init-proxy instance? int int-array integer? interleave intern interpose into into-array ints io! isa? iterate iterator-seq juxt keep keep-indexed key keys keyword keyword? last lazy-cat lazy-seq let letfn line-seq list list* list? load load-file load-reader load-string loaded-libs locking long long-array longs loop macroexpand macroexpand-1 make-array make-hierarchy map map-indexed map? mapcat mapv max max-key memfn memoize merge merge-with meta method-sig methods min min-key mod munge name namespace namespace-munge neg? newline next nfirst nil? nnext not not-any? not-empty not-every? not= ns ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ns-refers ns-resolve ns-unalias ns-unmap nth nthnext nthrest num number? numerator object-array odd? or parents partial partition partition-all partition-by pcalls peek persistent! pmap pop pop! pop-thread-bindings pos? pr pr-str prefer-method prefers primitives-classnames print print-ctor print-dup print-method print-simple print-str printf println println-str prn prn-str promise proxy proxy-call-with-super proxy-mappings proxy-name proxy-super push-thread-bindings pvalues quot rand rand-int rand-nth range ratio? rational? rationalize re-find re-groups re-matcher re-matches re-pattern re-seq read read-line read-string realized? reduce reduce-kv reductions ref ref-history-count ref-max-history ref-min-history ref-set refer refer-clojure reify release-pending-sends rem remove remove-all-methods remove-method remove-ns remove-watch repeat repeatedly replace replicate require reset! reset-meta! resolve rest restart-agent resultset-seq reverse reversible? rseq rsubseq satisfies? second select-keys send send-off seq seq? seque sequence sequential? set set-error-handler! set-error-mode! set-validator! set? short short-array shorts shuffle shutdown-agents slurp some some-fn sort sort-by sorted-map sorted-map-by sorted-set sorted-set-by sorted? special-symbol? spit split-at split-with str string? struct struct-map subs subseq subvec supers swap! symbol symbol? sync take take-last take-nth take-while test the-ns thread-bound? time to-array to-array-2d trampoline transient tree-seq true? type unchecked-add unchecked-add-int unchecked-byte unchecked-char unchecked-dec unchecked-dec-int unchecked-divide-int unchecked-double unchecked-float unchecked-inc unchecked-inc-int unchecked-int unchecked-long unchecked-multiply unchecked-multiply-int unchecked-negate unchecked-negate-int unchecked-remainder-int unchecked-short unchecked-subtract unchecked-subtract-int underive unquote unquote-splicing update-in update-proxy use val vals var-get var-set var? vary-meta vec vector vector-of vector? when when-first when-let when-not while with-bindings with-bindings* with-in-str with-loading-context with-local-vars with-meta with-open with-out-str with-precision with-redefs with-redefs-fn xml-seq zero? zipmap *default-data-reader-fn* as-> cond-> cond->> reduced reduced? send-via set-agent-send-executor! set-agent-send-off-executor! some-> some->>"); + + var indentKeys = makeKeywords( + // Built-ins + "ns fn def defn defmethod bound-fn if if-not case condp when while when-not when-first do future comment doto locking proxy with-open with-precision reify deftype defrecord defprotocol extend extend-protocol extend-type try catch " + + + // Binding forms + "let letfn binding loop for doseq dotimes when-let if-let " + + + // Data structures + "defstruct struct-map assoc " + + + // clojure.test + "testing deftest " + + + // contrib + "handler-case handle dotrace deftrace"); + + var tests = { + digit: /\d/, + digit_or_colon: /[\d:]/, + hex: /[0-9a-f]/i, + sign: /[+-]/, + exponent: /e/i, + keyword_char: /[^\s\(\[\;\)\]]/, + symbol: /[\w*+!\-\._?:\/]/ + }; + + function stateStack(indent, type, prev) { // represents a state stack object + this.indent = indent; + this.type = type; + this.prev = prev; + } + + function pushStack(state, indent, type) { + state.indentStack = new stateStack(indent, type, state.indentStack); + } + + function popStack(state) { + state.indentStack = state.indentStack.prev; + } + + function isNumber(ch, stream){ + // hex + if ( ch === '0' && stream.eat(/x/i) ) { + stream.eatWhile(tests.hex); + return true; + } + + // leading sign + if ( ( ch == '+' || ch == '-' ) && ( tests.digit.test(stream.peek()) ) ) { + stream.eat(tests.sign); + ch = stream.next(); + } + + if ( tests.digit.test(ch) ) { + stream.eat(ch); + stream.eatWhile(tests.digit); + + if ( '.' == stream.peek() ) { + stream.eat('.'); + stream.eatWhile(tests.digit); + } + + if ( stream.eat(tests.exponent) ) { + stream.eat(tests.sign); + stream.eatWhile(tests.digit); + } + + return true; + } + + return false; + } + + // Eat character that starts after backslash \ + function eatCharacter(stream) { + var first = stream.next(); + // Read special literals: backspace, newline, space, return. + // Just read all lowercase letters. + if (first.match(/[a-z]/) && stream.match(/[a-z]+/, true)) { + return; + } + // Read unicode character: \u1000 \uA0a1 + if (first === "u") { + stream.match(/[0-9a-z]{4}/i, true); + } + } + + return { + startState: function () { + return { + indentStack: null, + indentation: 0, + mode: false + }; + }, + + token: function (stream, state) { + if (state.indentStack == null && stream.sol()) { + // update indentation, but only if indentStack is empty + state.indentation = stream.indentation(); + } + + // skip spaces + if (stream.eatSpace()) { + return null; + } + var returnType = null; + + switch(state.mode){ + case "string": // multi-line string parsing mode + var next, escaped = false; + while ((next = stream.next()) != null) { + if (next == "\"" && !escaped) { + + state.mode = false; + break; + } + escaped = !escaped && next == "\\"; + } + returnType = STRING; // continue on in string mode + break; + default: // default parsing mode + var ch = stream.next(); + + if (ch == "\"") { + state.mode = "string"; + returnType = STRING; + } else if (ch == "\\") { + eatCharacter(stream); + returnType = CHARACTER; + } else if (ch == "'" && !( tests.digit_or_colon.test(stream.peek()) )) { + returnType = ATOM; + } else if (ch == ";") { // comment + stream.skipToEnd(); // rest of the line is a comment + returnType = COMMENT; + } else if (isNumber(ch,stream)){ + returnType = NUMBER; + } else if (ch == "(" || ch == "[" || ch == "{" ) { + var keyWord = '', indentTemp = stream.column(), letter; + /** + Either + (indent-word .. + (non-indent-word .. + (;something else, bracket, etc. + */ + + if (ch == "(") while ((letter = stream.eat(tests.keyword_char)) != null) { + keyWord += letter; + } + + if (keyWord.length > 0 && (indentKeys.propertyIsEnumerable(keyWord) || + /^(?:def|with)/.test(keyWord))) { // indent-word + pushStack(state, indentTemp + INDENT_WORD_SKIP, ch); + } else { // non-indent word + // we continue eating the spaces + stream.eatSpace(); + if (stream.eol() || stream.peek() == ";") { + // nothing significant after + // we restart indentation 1 space after + pushStack(state, indentTemp + 1, ch); + } else { + pushStack(state, indentTemp + stream.current().length, ch); // else we match + } + } + stream.backUp(stream.current().length - 1); // undo all the eating + + returnType = BRACKET; + } else if (ch == ")" || ch == "]" || ch == "}") { + returnType = BRACKET; + if (state.indentStack != null && state.indentStack.type == (ch == ")" ? "(" : (ch == "]" ? "[" :"{"))) { + popStack(state); + } + } else if ( ch == ":" ) { + stream.eatWhile(tests.symbol); + return ATOM; + } else { + stream.eatWhile(tests.symbol); + + if (keywords && keywords.propertyIsEnumerable(stream.current())) { + returnType = KEYWORD; + } else if (builtins && builtins.propertyIsEnumerable(stream.current())) { + returnType = BUILTIN; + } else if (atoms && atoms.propertyIsEnumerable(stream.current())) { + returnType = ATOM; + } else returnType = null; + } + } + + return returnType; + }, + + indent: function (state) { + if (state.indentStack == null) return state.indentation; + return state.indentStack.indent; + }, + + lineComment: ";;" + }; +}); + +CodeMirror.defineMIME("text/x-clojure", "clojure"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/clojure/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/clojure/index.html new file mode 100644 index 00000000..5a50c566 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/clojure/index.html @@ -0,0 +1,88 @@ + + +CodeMirror: Clojure mode + + + + + + + + + +
+

Clojure mode

+
+ + +

MIME types defined: text/x-clojure.

+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/cobol/cobol.js b/pitfall/pdfkit/node_modules/codemirror/mode/cobol/cobol.js new file mode 100644 index 00000000..d92491dd --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/cobol/cobol.js @@ -0,0 +1,240 @@ +/** + * Author: Gautam Mehta + * Branched from CodeMirror's Scheme mode + */ +CodeMirror.defineMode("cobol", function () { + var BUILTIN = "builtin", COMMENT = "comment", STRING = "string", + ATOM = "atom", NUMBER = "number", KEYWORD = "keyword", MODTAG = "header", + COBOLLINENUM = "def", PERIOD = "link"; + function makeKeywords(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + var atoms = makeKeywords("TRUE FALSE ZEROES ZEROS ZERO SPACES SPACE LOW-VALUE LOW-VALUES "); + var keywords = makeKeywords( + "ACCEPT ACCESS ACQUIRE ADD ADDRESS " + + "ADVANCING AFTER ALIAS ALL ALPHABET " + + "ALPHABETIC ALPHABETIC-LOWER ALPHABETIC-UPPER ALPHANUMERIC ALPHANUMERIC-EDITED " + + "ALSO ALTER ALTERNATE AND ANY " + + "ARE AREA AREAS ARITHMETIC ASCENDING " + + "ASSIGN AT ATTRIBUTE AUTHOR AUTO " + + "AUTO-SKIP AUTOMATIC B-AND B-EXOR B-LESS " + + "B-NOT B-OR BACKGROUND-COLOR BACKGROUND-COLOUR BEEP " + + "BEFORE BELL BINARY BIT BITS " + + "BLANK BLINK BLOCK BOOLEAN BOTTOM " + + "BY CALL CANCEL CD CF " + + "CH CHARACTER CHARACTERS CLASS CLOCK-UNITS " + + "CLOSE COBOL CODE CODE-SET COL " + + "COLLATING COLUMN COMMA COMMIT COMMITMENT " + + "COMMON COMMUNICATION COMP COMP-0 COMP-1 " + + "COMP-2 COMP-3 COMP-4 COMP-5 COMP-6 " + + "COMP-7 COMP-8 COMP-9 COMPUTATIONAL COMPUTATIONAL-0 " + + "COMPUTATIONAL-1 COMPUTATIONAL-2 COMPUTATIONAL-3 COMPUTATIONAL-4 COMPUTATIONAL-5 " + + "COMPUTATIONAL-6 COMPUTATIONAL-7 COMPUTATIONAL-8 COMPUTATIONAL-9 COMPUTE " + + "CONFIGURATION CONNECT CONSOLE CONTAINED CONTAINS " + + "CONTENT CONTINUE CONTROL CONTROL-AREA CONTROLS " + + "CONVERTING COPY CORR CORRESPONDING COUNT " + + "CRT CRT-UNDER CURRENCY CURRENT CURSOR " + + "DATA DATE DATE-COMPILED DATE-WRITTEN DAY " + + "DAY-OF-WEEK DB DB-ACCESS-CONTROL-KEY DB-DATA-NAME DB-EXCEPTION " + + "DB-FORMAT-NAME DB-RECORD-NAME DB-SET-NAME DB-STATUS DBCS " + + "DBCS-EDITED DE DEBUG-CONTENTS DEBUG-ITEM DEBUG-LINE " + + "DEBUG-NAME DEBUG-SUB-1 DEBUG-SUB-2 DEBUG-SUB-3 DEBUGGING " + + "DECIMAL-POINT DECLARATIVES DEFAULT DELETE DELIMITED " + + "DELIMITER DEPENDING DESCENDING DESCRIBED DESTINATION " + + "DETAIL DISABLE DISCONNECT DISPLAY DISPLAY-1 " + + "DISPLAY-2 DISPLAY-3 DISPLAY-4 DISPLAY-5 DISPLAY-6 " + + "DISPLAY-7 DISPLAY-8 DISPLAY-9 DIVIDE DIVISION " + + "DOWN DROP DUPLICATE DUPLICATES DYNAMIC " + + "EBCDIC EGI EJECT ELSE EMI " + + "EMPTY EMPTY-CHECK ENABLE END END. END-ACCEPT END-ACCEPT. " + + "END-ADD END-CALL END-COMPUTE END-DELETE END-DISPLAY " + + "END-DIVIDE END-EVALUATE END-IF END-INVOKE END-MULTIPLY " + + "END-OF-PAGE END-PERFORM END-READ END-RECEIVE END-RETURN " + + "END-REWRITE END-SEARCH END-START END-STRING END-SUBTRACT " + + "END-UNSTRING END-WRITE END-XML ENTER ENTRY " + + "ENVIRONMENT EOP EQUAL EQUALS ERASE " + + "ERROR ESI EVALUATE EVERY EXCEEDS " + + "EXCEPTION EXCLUSIVE EXIT EXTEND EXTERNAL " + + "EXTERNALLY-DESCRIBED-KEY FD FETCH FILE FILE-CONTROL " + + "FILE-STREAM FILES FILLER FINAL FIND " + + "FINISH FIRST FOOTING FOR FOREGROUND-COLOR " + + "FOREGROUND-COLOUR FORMAT FREE FROM FULL " + + "FUNCTION GENERATE GET GIVING GLOBAL " + + "GO GOBACK GREATER GROUP HEADING " + + "HIGH-VALUE HIGH-VALUES HIGHLIGHT I-O I-O-CONTROL " + + "ID IDENTIFICATION IF IN INDEX " + + "INDEX-1 INDEX-2 INDEX-3 INDEX-4 INDEX-5 " + + "INDEX-6 INDEX-7 INDEX-8 INDEX-9 INDEXED " + + "INDIC INDICATE INDICATOR INDICATORS INITIAL " + + "INITIALIZE INITIATE INPUT INPUT-OUTPUT INSPECT " + + "INSTALLATION INTO INVALID INVOKE IS " + + "JUST JUSTIFIED KANJI KEEP KEY " + + "LABEL LAST LD LEADING LEFT " + + "LEFT-JUSTIFY LENGTH LENGTH-CHECK LESS LIBRARY " + + "LIKE LIMIT LIMITS LINAGE LINAGE-COUNTER " + + "LINE LINE-COUNTER LINES LINKAGE LOCAL-STORAGE " + + "LOCALE LOCALLY LOCK " + + "MEMBER MEMORY MERGE MESSAGE METACLASS " + + "MODE MODIFIED MODIFY MODULES MOVE " + + "MULTIPLE MULTIPLY NATIONAL NATIVE NEGATIVE " + + "NEXT NO NO-ECHO NONE NOT " + + "NULL NULL-KEY-MAP NULL-MAP NULLS NUMBER " + + "NUMERIC NUMERIC-EDITED OBJECT OBJECT-COMPUTER OCCURS " + + "OF OFF OMITTED ON ONLY " + + "OPEN OPTIONAL OR ORDER ORGANIZATION " + + "OTHER OUTPUT OVERFLOW OWNER PACKED-DECIMAL " + + "PADDING PAGE PAGE-COUNTER PARSE PERFORM " + + "PF PH PIC PICTURE PLUS " + + "POINTER POSITION POSITIVE PREFIX PRESENT " + + "PRINTING PRIOR PROCEDURE PROCEDURE-POINTER PROCEDURES " + + "PROCEED PROCESS PROCESSING PROGRAM PROGRAM-ID " + + "PROMPT PROTECTED PURGE QUEUE QUOTE " + + "QUOTES RANDOM RD READ READY " + + "REALM RECEIVE RECONNECT RECORD RECORD-NAME " + + "RECORDS RECURSIVE REDEFINES REEL REFERENCE " + + "REFERENCE-MONITOR REFERENCES RELATION RELATIVE RELEASE " + + "REMAINDER REMOVAL RENAMES REPEATED REPLACE " + + "REPLACING REPORT REPORTING REPORTS REPOSITORY " + + "REQUIRED RERUN RESERVE RESET RETAINING " + + "RETRIEVAL RETURN RETURN-CODE RETURNING REVERSE-VIDEO " + + "REVERSED REWIND REWRITE RF RH " + + "RIGHT RIGHT-JUSTIFY ROLLBACK ROLLING ROUNDED " + + "RUN SAME SCREEN SD SEARCH " + + "SECTION SECURE SECURITY SEGMENT SEGMENT-LIMIT " + + "SELECT SEND SENTENCE SEPARATE SEQUENCE " + + "SEQUENTIAL SET SHARED SIGN SIZE " + + "SKIP1 SKIP2 SKIP3 SORT SORT-MERGE " + + "SORT-RETURN SOURCE SOURCE-COMPUTER SPACE-FILL " + + "SPECIAL-NAMES STANDARD STANDARD-1 STANDARD-2 " + + "START STARTING STATUS STOP STORE " + + "STRING SUB-QUEUE-1 SUB-QUEUE-2 SUB-QUEUE-3 SUB-SCHEMA " + + "SUBFILE SUBSTITUTE SUBTRACT SUM SUPPRESS " + + "SYMBOLIC SYNC SYNCHRONIZED SYSIN SYSOUT " + + "TABLE TALLYING TAPE TENANT TERMINAL " + + "TERMINATE TEST TEXT THAN THEN " + + "THROUGH THRU TIME TIMES TITLE " + + "TO TOP TRAILING TRAILING-SIGN TRANSACTION " + + "TYPE TYPEDEF UNDERLINE UNEQUAL UNIT " + + "UNSTRING UNTIL UP UPDATE UPON " + + "USAGE USAGE-MODE USE USING VALID " + + "VALIDATE VALUE VALUES VARYING VLR " + + "WAIT WHEN WHEN-COMPILED WITH WITHIN " + + "WORDS WORKING-STORAGE WRITE XML XML-CODE " + + "XML-EVENT XML-NTEXT XML-TEXT ZERO ZERO-FILL " ); + + var builtins = makeKeywords("- * ** / + < <= = > >= "); + var tests = { + digit: /\d/, + digit_or_colon: /[\d:]/, + hex: /[0-9a-f]/i, + sign: /[+-]/, + exponent: /e/i, + keyword_char: /[^\s\(\[\;\)\]]/, + symbol: /[\w*+\-]/ + }; + function isNumber(ch, stream){ + // hex + if ( ch === '0' && stream.eat(/x/i) ) { + stream.eatWhile(tests.hex); + return true; + } + // leading sign + if ( ( ch == '+' || ch == '-' ) && ( tests.digit.test(stream.peek()) ) ) { + stream.eat(tests.sign); + ch = stream.next(); + } + if ( tests.digit.test(ch) ) { + stream.eat(ch); + stream.eatWhile(tests.digit); + if ( '.' == stream.peek()) { + stream.eat('.'); + stream.eatWhile(tests.digit); + } + if ( stream.eat(tests.exponent) ) { + stream.eat(tests.sign); + stream.eatWhile(tests.digit); + } + return true; + } + return false; + } + return { + startState: function () { + return { + indentStack: null, + indentation: 0, + mode: false + }; + }, + token: function (stream, state) { + if (state.indentStack == null && stream.sol()) { + // update indentation, but only if indentStack is empty + state.indentation = 6 ; //stream.indentation(); + } + // skip spaces + if (stream.eatSpace()) { + return null; + } + var returnType = null; + switch(state.mode){ + case "string": // multi-line string parsing mode + var next = false; + while ((next = stream.next()) != null) { + if (next == "\"" || next == "\'") { + state.mode = false; + break; + } + } + returnType = STRING; // continue on in string mode + break; + default: // default parsing mode + var ch = stream.next(); + var col = stream.column(); + if (col >= 0 && col <= 5) { + returnType = COBOLLINENUM; + } else if (col >= 72 && col <= 79) { + stream.skipToEnd(); + returnType = MODTAG; + } else if (ch == "*" && col == 6) { // comment + stream.skipToEnd(); // rest of the line is a comment + returnType = COMMENT; + } else if (ch == "\"" || ch == "\'") { + state.mode = "string"; + returnType = STRING; + } else if (ch == "'" && !( tests.digit_or_colon.test(stream.peek()) )) { + returnType = ATOM; + } else if (ch == ".") { + returnType = PERIOD; + } else if (isNumber(ch,stream)){ + returnType = NUMBER; + } else { + if (stream.current().match(tests.symbol)) { + while (col < 71) { + if (stream.eat(tests.symbol) === undefined) { + break; + } else { + col++; + } + } + } + if (keywords && keywords.propertyIsEnumerable(stream.current().toUpperCase())) { + returnType = KEYWORD; + } else if (builtins && builtins.propertyIsEnumerable(stream.current().toUpperCase())) { + returnType = BUILTIN; + } else if (atoms && atoms.propertyIsEnumerable(stream.current().toUpperCase())) { + returnType = ATOM; + } else returnType = null; + } + } + return returnType; + }, + indent: function (state) { + if (state.indentStack == null) return state.indentation; + return state.indentStack.indent; + } + }; +}); + +CodeMirror.defineMIME("text/x-cobol", "cobol"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/cobol/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/cobol/index.html new file mode 100644 index 00000000..326e398b --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/cobol/index.html @@ -0,0 +1,210 @@ + + +CodeMirror: COBOL mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

COBOL mode

+ +

Select Theme Select Font Size + + + + +

+ + +
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/coffeescript/coffeescript.js b/pitfall/pdfkit/node_modules/codemirror/mode/coffeescript/coffeescript.js new file mode 100644 index 00000000..e8bfe48a --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/coffeescript/coffeescript.js @@ -0,0 +1,354 @@ +/** + * Link to the project's GitHub page: + * https://github.com/pickhardt/coffeescript-codemirror-mode + */ +CodeMirror.defineMode("coffeescript", function(conf) { + var ERRORCLASS = "error"; + + function wordRegexp(words) { + return new RegExp("^((" + words.join(")|(") + "))\\b"); + } + + var operators = /^(?:->|=>|\+[+=]?|-[\-=]?|\*[\*=]?|\/[\/=]?|[=!]=|<[><]?=?|>>?=?|%=?|&=?|\|=?|\^=?|\~|!|\?)/; + var delimiters = /^(?:[()\[\]{},:`=;]|\.\.?\.?)/; + var identifiers = /^[_A-Za-z$][_A-Za-z$0-9]*/; + var properties = /^(@|this\.)[_A-Za-z$][_A-Za-z$0-9]*/; + + var wordOperators = wordRegexp(["and", "or", "not", + "is", "isnt", "in", + "instanceof", "typeof"]); + var indentKeywords = ["for", "while", "loop", "if", "unless", "else", + "switch", "try", "catch", "finally", "class"]; + var commonKeywords = ["break", "by", "continue", "debugger", "delete", + "do", "in", "of", "new", "return", "then", + "this", "throw", "when", "until"]; + + var keywords = wordRegexp(indentKeywords.concat(commonKeywords)); + + indentKeywords = wordRegexp(indentKeywords); + + + var stringPrefixes = /^('{3}|\"{3}|['\"])/; + var regexPrefixes = /^(\/{3}|\/)/; + var commonConstants = ["Infinity", "NaN", "undefined", "null", "true", "false", "on", "off", "yes", "no"]; + var constants = wordRegexp(commonConstants); + + // Tokenizers + function tokenBase(stream, state) { + // Handle scope changes + if (stream.sol()) { + if (state.scope.align === null) state.scope.align = false; + var scopeOffset = state.scope.offset; + if (stream.eatSpace()) { + var lineOffset = stream.indentation(); + if (lineOffset > scopeOffset && state.scope.type == "coffee") { + return "indent"; + } else if (lineOffset < scopeOffset) { + return "dedent"; + } + return null; + } else { + if (scopeOffset > 0) { + dedent(stream, state); + } + } + } + if (stream.eatSpace()) { + return null; + } + + var ch = stream.peek(); + + // Handle docco title comment (single line) + if (stream.match("####")) { + stream.skipToEnd(); + return "comment"; + } + + // Handle multi line comments + if (stream.match("###")) { + state.tokenize = longComment; + return state.tokenize(stream, state); + } + + // Single line comment + if (ch === "#") { + stream.skipToEnd(); + return "comment"; + } + + // Handle number literals + if (stream.match(/^-?[0-9\.]/, false)) { + var floatLiteral = false; + // Floats + if (stream.match(/^-?\d*\.\d+(e[\+\-]?\d+)?/i)) { + floatLiteral = true; + } + if (stream.match(/^-?\d+\.\d*/)) { + floatLiteral = true; + } + if (stream.match(/^-?\.\d+/)) { + floatLiteral = true; + } + + if (floatLiteral) { + // prevent from getting extra . on 1.. + if (stream.peek() == "."){ + stream.backUp(1); + } + return "number"; + } + // Integers + var intLiteral = false; + // Hex + if (stream.match(/^-?0x[0-9a-f]+/i)) { + intLiteral = true; + } + // Decimal + if (stream.match(/^-?[1-9]\d*(e[\+\-]?\d+)?/)) { + intLiteral = true; + } + // Zero by itself with no other piece of number. + if (stream.match(/^-?0(?![\dx])/i)) { + intLiteral = true; + } + if (intLiteral) { + return "number"; + } + } + + // Handle strings + if (stream.match(stringPrefixes)) { + state.tokenize = tokenFactory(stream.current(), "string"); + return state.tokenize(stream, state); + } + // Handle regex literals + if (stream.match(regexPrefixes)) { + if (stream.current() != "/" || stream.match(/^.*\//, false)) { // prevent highlight of division + state.tokenize = tokenFactory(stream.current(), "string-2"); + return state.tokenize(stream, state); + } else { + stream.backUp(1); + } + } + + // Handle operators and delimiters + if (stream.match(operators) || stream.match(wordOperators)) { + return "operator"; + } + if (stream.match(delimiters)) { + return "punctuation"; + } + + if (stream.match(constants)) { + return "atom"; + } + + if (stream.match(keywords)) { + return "keyword"; + } + + if (stream.match(identifiers)) { + return "variable"; + } + + if (stream.match(properties)) { + return "property"; + } + + // Handle non-detected items + stream.next(); + return ERRORCLASS; + } + + function tokenFactory(delimiter, outclass) { + var singleline = delimiter.length == 1; + return function(stream, state) { + while (!stream.eol()) { + stream.eatWhile(/[^'"\/\\]/); + if (stream.eat("\\")) { + stream.next(); + if (singleline && stream.eol()) { + return outclass; + } + } else if (stream.match(delimiter)) { + state.tokenize = tokenBase; + return outclass; + } else { + stream.eat(/['"\/]/); + } + } + if (singleline) { + if (conf.mode.singleLineStringErrors) { + outclass = ERRORCLASS; + } else { + state.tokenize = tokenBase; + } + } + return outclass; + }; + } + + function longComment(stream, state) { + while (!stream.eol()) { + stream.eatWhile(/[^#]/); + if (stream.match("###")) { + state.tokenize = tokenBase; + break; + } + stream.eatWhile("#"); + } + return "comment"; + } + + function indent(stream, state, type) { + type = type || "coffee"; + var offset = 0, align = false, alignOffset = null; + for (var scope = state.scope; scope; scope = scope.prev) { + if (scope.type === "coffee") { + offset = scope.offset + conf.indentUnit; + break; + } + } + if (type !== "coffee") { + align = null; + alignOffset = stream.column() + stream.current().length; + } else if (state.scope.align) { + state.scope.align = false; + } + state.scope = { + offset: offset, + type: type, + prev: state.scope, + align: align, + alignOffset: alignOffset + }; + } + + function dedent(stream, state) { + if (!state.scope.prev) return; + if (state.scope.type === "coffee") { + var _indent = stream.indentation(); + var matched = false; + for (var scope = state.scope; scope; scope = scope.prev) { + if (_indent === scope.offset) { + matched = true; + break; + } + } + if (!matched) { + return true; + } + while (state.scope.prev && state.scope.offset !== _indent) { + state.scope = state.scope.prev; + } + return false; + } else { + state.scope = state.scope.prev; + return false; + } + } + + function tokenLexer(stream, state) { + var style = state.tokenize(stream, state); + var current = stream.current(); + + // Handle "." connected identifiers + if (current === ".") { + style = state.tokenize(stream, state); + current = stream.current(); + if (/^\.[\w$]+$/.test(current)) { + return "variable"; + } else { + return ERRORCLASS; + } + } + + // Handle scope changes. + if (current === "return") { + state.dedent += 1; + } + if (((current === "->" || current === "=>") && + !state.lambda && + !stream.peek()) + || style === "indent") { + indent(stream, state); + } + var delimiter_index = "[({".indexOf(current); + if (delimiter_index !== -1) { + indent(stream, state, "])}".slice(delimiter_index, delimiter_index+1)); + } + if (indentKeywords.exec(current)){ + indent(stream, state); + } + if (current == "then"){ + dedent(stream, state); + } + + + if (style === "dedent") { + if (dedent(stream, state)) { + return ERRORCLASS; + } + } + delimiter_index = "])}".indexOf(current); + if (delimiter_index !== -1) { + while (state.scope.type == "coffee" && state.scope.prev) + state.scope = state.scope.prev; + if (state.scope.type == current) + state.scope = state.scope.prev; + } + if (state.dedent > 0 && stream.eol() && state.scope.type == "coffee") { + if (state.scope.prev) state.scope = state.scope.prev; + state.dedent -= 1; + } + + return style; + } + + var external = { + startState: function(basecolumn) { + return { + tokenize: tokenBase, + scope: {offset:basecolumn || 0, type:"coffee", prev: null, align: false}, + lastToken: null, + lambda: false, + dedent: 0 + }; + }, + + token: function(stream, state) { + var fillAlign = state.scope.align === null && state.scope; + if (fillAlign && stream.sol()) fillAlign.align = false; + + var style = tokenLexer(stream, state); + if (fillAlign && style && style != "comment") fillAlign.align = true; + + state.lastToken = {style:style, content: stream.current()}; + + if (stream.eol() && stream.lambda) { + state.lambda = false; + } + + return style; + }, + + indent: function(state, text) { + if (state.tokenize != tokenBase) return 0; + var scope = state.scope; + var closer = text && "])}".indexOf(text.charAt(0)) > -1; + if (closer) while (scope.type == "coffee" && scope.prev) scope = scope.prev; + var closes = closer && scope.type === text.charAt(0); + if (scope.align) + return scope.alignOffset - (closes ? 1 : 0); + else + return (closes ? scope.prev : scope).offset; + }, + + lineComment: "#", + fold: "indent" + }; + return external; +}); + +CodeMirror.defineMIME("text/x-coffeescript", "coffeescript"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/coffeescript/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/coffeescript/index.html new file mode 100644 index 00000000..6e6fde52 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/coffeescript/index.html @@ -0,0 +1,740 @@ + + +CodeMirror: CoffeeScript mode + + + + + + + + + +
+

CoffeeScript mode

+
+ + +

MIME types defined: text/x-coffeescript.

+ +

The CoffeeScript mode was written by Jeff Pickhardt (license).

+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/commonlisp/commonlisp.js b/pitfall/pdfkit/node_modules/codemirror/mode/commonlisp/commonlisp.js new file mode 100644 index 00000000..8fa08c8a --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/commonlisp/commonlisp.js @@ -0,0 +1,105 @@ +CodeMirror.defineMode("commonlisp", function (config) { + var assumeBody = /^with|^def|^do|^prog|case$|^cond$|bind$|when$|unless$/; + var numLiteral = /^(?:[+\-]?(?:\d+|\d*\.\d+)(?:[efd][+\-]?\d+)?|[+\-]?\d+(?:\/[+\-]?\d+)?|#b[+\-]?[01]+|#o[+\-]?[0-7]+|#x[+\-]?[\da-f]+)/; + var symbol = /[^\s'`,@()\[\]";]/; + var type; + + function readSym(stream) { + var ch; + while (ch = stream.next()) { + if (ch == "\\") stream.next(); + else if (!symbol.test(ch)) { stream.backUp(1); break; } + } + return stream.current(); + } + + function base(stream, state) { + if (stream.eatSpace()) {type = "ws"; return null;} + if (stream.match(numLiteral)) return "number"; + var ch = stream.next(); + if (ch == "\\") ch = stream.next(); + + if (ch == '"') return (state.tokenize = inString)(stream, state); + else if (ch == "(") { type = "open"; return "bracket"; } + else if (ch == ")" || ch == "]") { type = "close"; return "bracket"; } + else if (ch == ";") { stream.skipToEnd(); type = "ws"; return "comment"; } + else if (/['`,@]/.test(ch)) return null; + else if (ch == "|") { + if (stream.skipTo("|")) { stream.next(); return "symbol"; } + else { stream.skipToEnd(); return "error"; } + } else if (ch == "#") { + var ch = stream.next(); + if (ch == "[") { type = "open"; return "bracket"; } + else if (/[+\-=\.']/.test(ch)) return null; + else if (/\d/.test(ch) && stream.match(/^\d*#/)) return null; + else if (ch == "|") return (state.tokenize = inComment)(stream, state); + else if (ch == ":") { readSym(stream); return "meta"; } + else return "error"; + } else { + var name = readSym(stream); + if (name == ".") return null; + type = "symbol"; + if (name == "nil" || name == "t") return "atom"; + if (name.charAt(0) == ":") return "keyword"; + if (name.charAt(0) == "&") return "variable-2"; + return "variable"; + } + } + + function inString(stream, state) { + var escaped = false, next; + while (next = stream.next()) { + if (next == '"' && !escaped) { state.tokenize = base; break; } + escaped = !escaped && next == "\\"; + } + return "string"; + } + + function inComment(stream, state) { + var next, last; + while (next = stream.next()) { + if (next == "#" && last == "|") { state.tokenize = base; break; } + last = next; + } + type = "ws"; + return "comment"; + } + + return { + startState: function () { + return {ctx: {prev: null, start: 0, indentTo: 0}, tokenize: base}; + }, + + token: function (stream, state) { + if (stream.sol() && typeof state.ctx.indentTo != "number") + state.ctx.indentTo = state.ctx.start + 1; + + type = null; + var style = state.tokenize(stream, state); + if (type != "ws") { + if (state.ctx.indentTo == null) { + if (type == "symbol" && assumeBody.test(stream.current())) + state.ctx.indentTo = state.ctx.start + config.indentUnit; + else + state.ctx.indentTo = "next"; + } else if (state.ctx.indentTo == "next") { + state.ctx.indentTo = stream.column(); + } + } + if (type == "open") state.ctx = {prev: state.ctx, start: stream.column(), indentTo: null}; + else if (type == "close") state.ctx = state.ctx.prev || state.ctx; + return style; + }, + + indent: function (state, _textAfter) { + var i = state.ctx.indentTo; + return typeof i == "number" ? i : state.ctx.start + 1; + }, + + lineComment: ";;", + blockCommentStart: "#|", + blockCommentEnd: "|#" + }; +}); + +CodeMirror.defineMIME("text/x-common-lisp", "commonlisp"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/commonlisp/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/commonlisp/index.html new file mode 100644 index 00000000..d48be8d2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/commonlisp/index.html @@ -0,0 +1,177 @@ + + +CodeMirror: Common Lisp mode + + + + + + + + + +
+

Common Lisp mode

+
+ + +

MIME types defined: text/x-common-lisp.

+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/css/css.js b/pitfall/pdfkit/node_modules/codemirror/mode/css/css.js new file mode 100644 index 00000000..d8c30cf3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/css/css.js @@ -0,0 +1,639 @@ +CodeMirror.defineMode("css", function(config, parserConfig) { + "use strict"; + + if (!parserConfig.propertyKeywords) parserConfig = CodeMirror.resolveMode("text/css"); + + var indentUnit = config.indentUnit || config.tabSize || 2, + hooks = parserConfig.hooks || {}, + atMediaTypes = parserConfig.atMediaTypes || {}, + atMediaFeatures = parserConfig.atMediaFeatures || {}, + propertyKeywords = parserConfig.propertyKeywords || {}, + colorKeywords = parserConfig.colorKeywords || {}, + valueKeywords = parserConfig.valueKeywords || {}, + allowNested = !!parserConfig.allowNested, + type = null; + + function ret(style, tp) { type = tp; return style; } + + function tokenBase(stream, state) { + var ch = stream.next(); + if (hooks[ch]) { + // result[0] is style and result[1] is type + var result = hooks[ch](stream, state); + if (result !== false) return result; + } + if (ch == "@") {stream.eatWhile(/[\w\\\-]/); return ret("def", stream.current());} + else if (ch == "=") ret(null, "compare"); + else if ((ch == "~" || ch == "|") && stream.eat("=")) return ret(null, "compare"); + else if (ch == "\"" || ch == "'") { + state.tokenize = tokenString(ch); + return state.tokenize(stream, state); + } + else if (ch == "#") { + stream.eatWhile(/[\w\\\-]/); + return ret("atom", "hash"); + } + else if (ch == "!") { + stream.match(/^\s*\w*/); + return ret("keyword", "important"); + } + else if (/\d/.test(ch) || ch == "." && stream.eat(/\d/)) { + stream.eatWhile(/[\w.%]/); + return ret("number", "unit"); + } + else if (ch === "-") { + if (/\d/.test(stream.peek())) { + stream.eatWhile(/[\w.%]/); + return ret("number", "unit"); + } else if (stream.match(/^[^-]+-/)) { + return ret("meta", "meta"); + } + } + else if (/[,+>*\/]/.test(ch)) { + return ret(null, "select-op"); + } + else if (ch == "." && stream.match(/^-?[_a-z][_a-z0-9-]*/i)) { + return ret("qualifier", "qualifier"); + } + else if (ch == ":") { + return ret("operator", ch); + } + else if (/[;{}\[\]\(\)]/.test(ch)) { + return ret(null, ch); + } + else if (ch == "u" && stream.match("rl(")) { + stream.backUp(1); + state.tokenize = tokenParenthesized; + return ret("property", "variable"); + } + else { + stream.eatWhile(/[\w\\\-]/); + return ret("property", "variable"); + } + } + + function tokenString(quote, nonInclusive) { + return function(stream, state) { + var escaped = false, ch; + while ((ch = stream.next()) != null) { + if (ch == quote && !escaped) + break; + escaped = !escaped && ch == "\\"; + } + if (!escaped) { + if (nonInclusive) stream.backUp(1); + state.tokenize = tokenBase; + } + return ret("string", "string"); + }; + } + + function tokenParenthesized(stream, state) { + stream.next(); // Must be '(' + if (!stream.match(/\s*[\"\']/, false)) + state.tokenize = tokenString(")", true); + else + state.tokenize = tokenBase; + return ret(null, "("); + } + + return { + startState: function(base) { + return {tokenize: tokenBase, + baseIndent: base || 0, + stack: [], + lastToken: null}; + }, + + token: function(stream, state) { + + // Use these terms when applicable (see http://www.xanthir.com/blog/b4E50) + // + // rule** or **ruleset: + // A selector + braces combo, or an at-rule. + // + // declaration block: + // A sequence of declarations. + // + // declaration: + // A property + colon + value combo. + // + // property value: + // The entire value of a property. + // + // component value: + // A single piece of a property value. Like the 5px in + // text-shadow: 0 0 5px blue;. Can also refer to things that are + // multiple terms, like the 1-4 terms that make up the background-size + // portion of the background shorthand. + // + // term: + // The basic unit of author-facing CSS, like a single number (5), + // dimension (5px), string ("foo"), or function. Officially defined + // by the CSS 2.1 grammar (look for the 'term' production) + // + // + // simple selector: + // A single atomic selector, like a type selector, an attr selector, a + // class selector, etc. + // + // compound selector: + // One or more simple selectors without a combinator. div.example is + // compound, div > .example is not. + // + // complex selector: + // One or more compound selectors chained with combinators. + // + // combinator: + // The parts of selectors that express relationships. There are four + // currently - the space (descendant combinator), the greater-than + // bracket (child combinator), the plus sign (next sibling combinator), + // and the tilda (following sibling combinator). + // + // sequence of selectors: + // One or more of the named type of selector chained with commas. + + state.tokenize = state.tokenize || tokenBase; + if (state.tokenize == tokenBase && stream.eatSpace()) return null; + var style = state.tokenize(stream, state); + if (style && typeof style != "string") style = ret(style[0], style[1]); + + // Changing style returned based on context + var context = state.stack[state.stack.length-1]; + if (style == "variable") { + if (type == "variable-definition") state.stack.push("propertyValue"); + return state.lastToken = "variable-2"; + } else if (style == "property") { + var word = stream.current().toLowerCase(); + if (context == "propertyValue") { + if (valueKeywords.hasOwnProperty(word)) { + style = "string-2"; + } else if (colorKeywords.hasOwnProperty(word)) { + style = "keyword"; + } else { + style = "variable-2"; + } + } else if (context == "rule") { + if (!propertyKeywords.hasOwnProperty(word)) { + style += " error"; + } + } else if (context == "block") { + // if a value is present in both property, value, or color, the order + // of preference is property -> color -> value + if (propertyKeywords.hasOwnProperty(word)) { + style = "property"; + } else if (colorKeywords.hasOwnProperty(word)) { + style = "keyword"; + } else if (valueKeywords.hasOwnProperty(word)) { + style = "string-2"; + } else { + style = "tag"; + } + } else if (!context || context == "@media{") { + style = "tag"; + } else if (context == "@media") { + if (atMediaTypes[stream.current()]) { + style = "attribute"; // Known attribute + } else if (/^(only|not)$/.test(word)) { + style = "keyword"; + } else if (word == "and") { + style = "error"; // "and" is only allowed in @mediaType + } else if (atMediaFeatures.hasOwnProperty(word)) { + style = "error"; // Known property, should be in @mediaType( + } else { + // Unknown, expecting keyword or attribute, assuming attribute + style = "attribute error"; + } + } else if (context == "@mediaType") { + if (atMediaTypes.hasOwnProperty(word)) { + style = "attribute"; + } else if (word == "and") { + style = "operator"; + } else if (/^(only|not)$/.test(word)) { + style = "error"; // Only allowed in @media + } else { + // Unknown attribute or property, but expecting property (preceded + // by "and"). Should be in parentheses + style = "error"; + } + } else if (context == "@mediaType(") { + if (propertyKeywords.hasOwnProperty(word)) { + // do nothing, remains "property" + } else if (atMediaTypes.hasOwnProperty(word)) { + style = "error"; // Known property, should be in parentheses + } else if (word == "and") { + style = "operator"; + } else if (/^(only|not)$/.test(word)) { + style = "error"; // Only allowed in @media + } else { + style += " error"; + } + } else if (context == "@import") { + style = "tag"; + } else { + style = "error"; + } + } else if (style == "atom") { + if(!context || context == "@media{" || context == "block") { + style = "builtin"; + } else if (context == "propertyValue") { + if (!/^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/.test(stream.current())) { + style += " error"; + } + } else { + style = "error"; + } + } else if (context == "@media" && type == "{") { + style = "error"; + } + + // Push/pop context stack + if (type == "{") { + if (context == "@media" || context == "@mediaType") { + state.stack[state.stack.length-1] = "@media{"; + } + else { + var newContext = allowNested ? "block" : "rule"; + state.stack.push(newContext); + } + } + else if (type == "}") { + if (context == "interpolation") style = "operator"; + // Pop off end of array until { is reached + while(state.stack.length){ + var removed = state.stack.pop(); + if(removed.indexOf("{") > -1 || removed == "block" || removed == "rule"){ + break; + } + } + } + else if (type == "interpolation") state.stack.push("interpolation"); + else if (type == "@media") state.stack.push("@media"); + else if (type == "@import") state.stack.push("@import"); + else if (context == "@media" && /\b(keyword|attribute)\b/.test(style)) + state.stack[state.stack.length-1] = "@mediaType"; + else if (context == "@mediaType" && stream.current() == ",") + state.stack[state.stack.length-1] = "@media"; + else if (type == "(") { + if (context == "@media" || context == "@mediaType") { + // Make sure @mediaType is used to avoid error on { + state.stack[state.stack.length-1] = "@mediaType"; + state.stack.push("@mediaType("); + } + else state.stack.push("("); + } + else if (type == ")") { + // Pop off end of array until ( is reached + while(state.stack.length){ + var removed = state.stack.pop(); + if(removed.indexOf("(") > -1){ + break; + } + } + } + else if (type == ":" && state.lastToken == "property") state.stack.push("propertyValue"); + else if (context == "propertyValue" && type == ";") state.stack.pop(); + else if (context == "@import" && type == ";") state.stack.pop(); + + return state.lastToken = style; + }, + + indent: function(state, textAfter) { + var n = state.stack.length; + if (/^\}/.test(textAfter)) + n -= state.stack[n-1] == "propertyValue" ? 2 : 1; + return state.baseIndent + n * indentUnit; + }, + + electricChars: "}", + blockCommentStart: "/*", + blockCommentEnd: "*/", + fold: "brace" + }; +}); + +(function() { + function keySet(array) { + var keys = {}; + for (var i = 0; i < array.length; ++i) { + keys[array[i]] = true; + } + return keys; + } + + var atMediaTypes = keySet([ + "all", "aural", "braille", "handheld", "print", "projection", "screen", + "tty", "tv", "embossed" + ]); + + var atMediaFeatures = keySet([ + "width", "min-width", "max-width", "height", "min-height", "max-height", + "device-width", "min-device-width", "max-device-width", "device-height", + "min-device-height", "max-device-height", "aspect-ratio", + "min-aspect-ratio", "max-aspect-ratio", "device-aspect-ratio", + "min-device-aspect-ratio", "max-device-aspect-ratio", "color", "min-color", + "max-color", "color-index", "min-color-index", "max-color-index", + "monochrome", "min-monochrome", "max-monochrome", "resolution", + "min-resolution", "max-resolution", "scan", "grid" + ]); + + var propertyKeywords = keySet([ + "align-content", "align-items", "align-self", "alignment-adjust", + "alignment-baseline", "anchor-point", "animation", "animation-delay", + "animation-direction", "animation-duration", "animation-iteration-count", + "animation-name", "animation-play-state", "animation-timing-function", + "appearance", "azimuth", "backface-visibility", "background", + "background-attachment", "background-clip", "background-color", + "background-image", "background-origin", "background-position", + "background-repeat", "background-size", "baseline-shift", "binding", + "bleed", "bookmark-label", "bookmark-level", "bookmark-state", + "bookmark-target", "border", "border-bottom", "border-bottom-color", + "border-bottom-left-radius", "border-bottom-right-radius", + "border-bottom-style", "border-bottom-width", "border-collapse", + "border-color", "border-image", "border-image-outset", + "border-image-repeat", "border-image-slice", "border-image-source", + "border-image-width", "border-left", "border-left-color", + "border-left-style", "border-left-width", "border-radius", "border-right", + "border-right-color", "border-right-style", "border-right-width", + "border-spacing", "border-style", "border-top", "border-top-color", + "border-top-left-radius", "border-top-right-radius", "border-top-style", + "border-top-width", "border-width", "bottom", "box-decoration-break", + "box-shadow", "box-sizing", "break-after", "break-before", "break-inside", + "caption-side", "clear", "clip", "color", "color-profile", "column-count", + "column-fill", "column-gap", "column-rule", "column-rule-color", + "column-rule-style", "column-rule-width", "column-span", "column-width", + "columns", "content", "counter-increment", "counter-reset", "crop", "cue", + "cue-after", "cue-before", "cursor", "direction", "display", + "dominant-baseline", "drop-initial-after-adjust", + "drop-initial-after-align", "drop-initial-before-adjust", + "drop-initial-before-align", "drop-initial-size", "drop-initial-value", + "elevation", "empty-cells", "fit", "fit-position", "flex", "flex-basis", + "flex-direction", "flex-flow", "flex-grow", "flex-shrink", "flex-wrap", + "float", "float-offset", "flow-from", "flow-into", "font", "font-feature-settings", + "font-family", "font-kerning", "font-language-override", "font-size", "font-size-adjust", + "font-stretch", "font-style", "font-synthesis", "font-variant", + "font-variant-alternates", "font-variant-caps", "font-variant-east-asian", + "font-variant-ligatures", "font-variant-numeric", "font-variant-position", + "font-weight", "grid-cell", "grid-column", "grid-column-align", + "grid-column-sizing", "grid-column-span", "grid-columns", "grid-flow", + "grid-row", "grid-row-align", "grid-row-sizing", "grid-row-span", + "grid-rows", "grid-template", "hanging-punctuation", "height", "hyphens", + "icon", "image-orientation", "image-rendering", "image-resolution", + "inline-box-align", "justify-content", "left", "letter-spacing", + "line-break", "line-height", "line-stacking", "line-stacking-ruby", + "line-stacking-shift", "line-stacking-strategy", "list-style", + "list-style-image", "list-style-position", "list-style-type", "margin", + "margin-bottom", "margin-left", "margin-right", "margin-top", + "marker-offset", "marks", "marquee-direction", "marquee-loop", + "marquee-play-count", "marquee-speed", "marquee-style", "max-height", + "max-width", "min-height", "min-width", "move-to", "nav-down", "nav-index", + "nav-left", "nav-right", "nav-up", "opacity", "order", "orphans", "outline", + "outline-color", "outline-offset", "outline-style", "outline-width", + "overflow", "overflow-style", "overflow-wrap", "overflow-x", "overflow-y", + "padding", "padding-bottom", "padding-left", "padding-right", "padding-top", + "page", "page-break-after", "page-break-before", "page-break-inside", + "page-policy", "pause", "pause-after", "pause-before", "perspective", + "perspective-origin", "pitch", "pitch-range", "play-during", "position", + "presentation-level", "punctuation-trim", "quotes", "region-break-after", + "region-break-before", "region-break-inside", "region-fragment", + "rendering-intent", "resize", "rest", "rest-after", "rest-before", "richness", + "right", "rotation", "rotation-point", "ruby-align", "ruby-overhang", + "ruby-position", "ruby-span", "shape-inside", "shape-outside", "size", + "speak", "speak-as", "speak-header", + "speak-numeral", "speak-punctuation", "speech-rate", "stress", "string-set", + "tab-size", "table-layout", "target", "target-name", "target-new", + "target-position", "text-align", "text-align-last", "text-decoration", + "text-decoration-color", "text-decoration-line", "text-decoration-skip", + "text-decoration-style", "text-emphasis", "text-emphasis-color", + "text-emphasis-position", "text-emphasis-style", "text-height", + "text-indent", "text-justify", "text-outline", "text-overflow", "text-shadow", + "text-size-adjust", "text-space-collapse", "text-transform", "text-underline-position", + "text-wrap", "top", "transform", "transform-origin", "transform-style", + "transition", "transition-delay", "transition-duration", + "transition-property", "transition-timing-function", "unicode-bidi", + "vertical-align", "visibility", "voice-balance", "voice-duration", + "voice-family", "voice-pitch", "voice-range", "voice-rate", "voice-stress", + "voice-volume", "volume", "white-space", "widows", "width", "word-break", + "word-spacing", "word-wrap", "z-index", "zoom", + // SVG-specific + "clip-path", "clip-rule", "mask", "enable-background", "filter", "flood-color", + "flood-opacity", "lighting-color", "stop-color", "stop-opacity", "pointer-events", + "color-interpolation", "color-interpolation-filters", "color-profile", + "color-rendering", "fill", "fill-opacity", "fill-rule", "image-rendering", + "marker", "marker-end", "marker-mid", "marker-start", "shape-rendering", "stroke", + "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", + "stroke-miterlimit", "stroke-opacity", "stroke-width", "text-rendering", + "baseline-shift", "dominant-baseline", "glyph-orientation-horizontal", + "glyph-orientation-vertical", "kerning", "text-anchor", "writing-mode" + ]); + + var colorKeywords = keySet([ + "aliceblue", "antiquewhite", "aqua", "aquamarine", "azure", "beige", + "bisque", "black", "blanchedalmond", "blue", "blueviolet", "brown", + "burlywood", "cadetblue", "chartreuse", "chocolate", "coral", "cornflowerblue", + "cornsilk", "crimson", "cyan", "darkblue", "darkcyan", "darkgoldenrod", + "darkgray", "darkgreen", "darkkhaki", "darkmagenta", "darkolivegreen", + "darkorange", "darkorchid", "darkred", "darksalmon", "darkseagreen", + "darkslateblue", "darkslategray", "darkturquoise", "darkviolet", + "deeppink", "deepskyblue", "dimgray", "dodgerblue", "firebrick", + "floralwhite", "forestgreen", "fuchsia", "gainsboro", "ghostwhite", + "gold", "goldenrod", "gray", "grey", "green", "greenyellow", "honeydew", + "hotpink", "indianred", "indigo", "ivory", "khaki", "lavender", + "lavenderblush", "lawngreen", "lemonchiffon", "lightblue", "lightcoral", + "lightcyan", "lightgoldenrodyellow", "lightgray", "lightgreen", "lightpink", + "lightsalmon", "lightseagreen", "lightskyblue", "lightslategray", + "lightsteelblue", "lightyellow", "lime", "limegreen", "linen", "magenta", + "maroon", "mediumaquamarine", "mediumblue", "mediumorchid", "mediumpurple", + "mediumseagreen", "mediumslateblue", "mediumspringgreen", "mediumturquoise", + "mediumvioletred", "midnightblue", "mintcream", "mistyrose", "moccasin", + "navajowhite", "navy", "oldlace", "olive", "olivedrab", "orange", "orangered", + "orchid", "palegoldenrod", "palegreen", "paleturquoise", "palevioletred", + "papayawhip", "peachpuff", "peru", "pink", "plum", "powderblue", + "purple", "red", "rosybrown", "royalblue", "saddlebrown", "salmon", + "sandybrown", "seagreen", "seashell", "sienna", "silver", "skyblue", + "slateblue", "slategray", "snow", "springgreen", "steelblue", "tan", + "teal", "thistle", "tomato", "turquoise", "violet", "wheat", "white", + "whitesmoke", "yellow", "yellowgreen" + ]); + + var valueKeywords = keySet([ + "above", "absolute", "activeborder", "activecaption", "afar", + "after-white-space", "ahead", "alias", "all", "all-scroll", "alternate", + "always", "amharic", "amharic-abegede", "antialiased", "appworkspace", + "arabic-indic", "armenian", "asterisks", "auto", "avoid", "avoid-column", "avoid-page", + "avoid-region", "background", "backwards", "baseline", "below", "bidi-override", "binary", + "bengali", "blink", "block", "block-axis", "bold", "bolder", "border", "border-box", + "both", "bottom", "break", "break-all", "break-word", "button", "button-bevel", + "buttonface", "buttonhighlight", "buttonshadow", "buttontext", "cambodian", + "capitalize", "caps-lock-indicator", "caption", "captiontext", "caret", + "cell", "center", "checkbox", "circle", "cjk-earthly-branch", + "cjk-heavenly-stem", "cjk-ideographic", "clear", "clip", "close-quote", + "col-resize", "collapse", "column", "compact", "condensed", "contain", "content", + "content-box", "context-menu", "continuous", "copy", "cover", "crop", + "cross", "crosshair", "currentcolor", "cursive", "dashed", "decimal", + "decimal-leading-zero", "default", "default-button", "destination-atop", + "destination-in", "destination-out", "destination-over", "devanagari", + "disc", "discard", "document", "dot-dash", "dot-dot-dash", "dotted", + "double", "down", "e-resize", "ease", "ease-in", "ease-in-out", "ease-out", + "element", "ellipse", "ellipsis", "embed", "end", "ethiopic", "ethiopic-abegede", + "ethiopic-abegede-am-et", "ethiopic-abegede-gez", "ethiopic-abegede-ti-er", + "ethiopic-abegede-ti-et", "ethiopic-halehame-aa-er", + "ethiopic-halehame-aa-et", "ethiopic-halehame-am-et", + "ethiopic-halehame-gez", "ethiopic-halehame-om-et", + "ethiopic-halehame-sid-et", "ethiopic-halehame-so-et", + "ethiopic-halehame-ti-er", "ethiopic-halehame-ti-et", + "ethiopic-halehame-tig", "ew-resize", "expanded", "extra-condensed", + "extra-expanded", "fantasy", "fast", "fill", "fixed", "flat", "footnotes", + "forwards", "from", "geometricPrecision", "georgian", "graytext", "groove", + "gujarati", "gurmukhi", "hand", "hangul", "hangul-consonant", "hebrew", + "help", "hidden", "hide", "higher", "highlight", "highlighttext", + "hiragana", "hiragana-iroha", "horizontal", "hsl", "hsla", "icon", "ignore", + "inactiveborder", "inactivecaption", "inactivecaptiontext", "infinite", + "infobackground", "infotext", "inherit", "initial", "inline", "inline-axis", + "inline-block", "inline-table", "inset", "inside", "intrinsic", "invert", + "italic", "justify", "kannada", "katakana", "katakana-iroha", "keep-all", "khmer", + "landscape", "lao", "large", "larger", "left", "level", "lighter", + "line-through", "linear", "lines", "list-item", "listbox", "listitem", + "local", "logical", "loud", "lower", "lower-alpha", "lower-armenian", + "lower-greek", "lower-hexadecimal", "lower-latin", "lower-norwegian", + "lower-roman", "lowercase", "ltr", "malayalam", "match", + "media-controls-background", "media-current-time-display", + "media-fullscreen-button", "media-mute-button", "media-play-button", + "media-return-to-realtime-button", "media-rewind-button", + "media-seek-back-button", "media-seek-forward-button", "media-slider", + "media-sliderthumb", "media-time-remaining-display", "media-volume-slider", + "media-volume-slider-container", "media-volume-sliderthumb", "medium", + "menu", "menulist", "menulist-button", "menulist-text", + "menulist-textfield", "menutext", "message-box", "middle", "min-intrinsic", + "mix", "mongolian", "monospace", "move", "multiple", "myanmar", "n-resize", + "narrower", "ne-resize", "nesw-resize", "no-close-quote", "no-drop", + "no-open-quote", "no-repeat", "none", "normal", "not-allowed", "nowrap", + "ns-resize", "nw-resize", "nwse-resize", "oblique", "octal", "open-quote", + "optimizeLegibility", "optimizeSpeed", "oriya", "oromo", "outset", + "outside", "outside-shape", "overlay", "overline", "padding", "padding-box", + "painted", "page", "paused", "persian", "plus-darker", "plus-lighter", "pointer", + "polygon", "portrait", "pre", "pre-line", "pre-wrap", "preserve-3d", "progress", "push-button", + "radio", "read-only", "read-write", "read-write-plaintext-only", "rectangle", "region", + "relative", "repeat", "repeat-x", "repeat-y", "reset", "reverse", "rgb", "rgba", + "ridge", "right", "round", "row-resize", "rtl", "run-in", "running", + "s-resize", "sans-serif", "scroll", "scrollbar", "se-resize", "searchfield", + "searchfield-cancel-button", "searchfield-decoration", + "searchfield-results-button", "searchfield-results-decoration", + "semi-condensed", "semi-expanded", "separate", "serif", "show", "sidama", + "single", "skip-white-space", "slide", "slider-horizontal", + "slider-vertical", "sliderthumb-horizontal", "sliderthumb-vertical", "slow", + "small", "small-caps", "small-caption", "smaller", "solid", "somali", + "source-atop", "source-in", "source-out", "source-over", "space", "square", + "square-button", "start", "static", "status-bar", "stretch", "stroke", + "sub", "subpixel-antialiased", "super", "sw-resize", "table", + "table-caption", "table-cell", "table-column", "table-column-group", + "table-footer-group", "table-header-group", "table-row", "table-row-group", + "telugu", "text", "text-bottom", "text-top", "textarea", "textfield", "thai", + "thick", "thin", "threeddarkshadow", "threedface", "threedhighlight", + "threedlightshadow", "threedshadow", "tibetan", "tigre", "tigrinya-er", + "tigrinya-er-abegede", "tigrinya-et", "tigrinya-et-abegede", "to", "top", + "transparent", "ultra-condensed", "ultra-expanded", "underline", "up", + "upper-alpha", "upper-armenian", "upper-greek", "upper-hexadecimal", + "upper-latin", "upper-norwegian", "upper-roman", "uppercase", "urdu", "url", + "vertical", "vertical-text", "visible", "visibleFill", "visiblePainted", + "visibleStroke", "visual", "w-resize", "wait", "wave", "wider", + "window", "windowframe", "windowtext", "x-large", "x-small", "xor", + "xx-large", "xx-small" + ]); + + function tokenCComment(stream, state) { + var maybeEnd = false, ch; + while ((ch = stream.next()) != null) { + if (maybeEnd && ch == "/") { + state.tokenize = null; + break; + } + maybeEnd = (ch == "*"); + } + return ["comment", "comment"]; + } + + CodeMirror.defineMIME("text/css", { + atMediaTypes: atMediaTypes, + atMediaFeatures: atMediaFeatures, + propertyKeywords: propertyKeywords, + colorKeywords: colorKeywords, + valueKeywords: valueKeywords, + hooks: { + "<": function(stream, state) { + function tokenSGMLComment(stream, state) { + var dashes = 0, ch; + while ((ch = stream.next()) != null) { + if (dashes >= 2 && ch == ">") { + state.tokenize = null; + break; + } + dashes = (ch == "-") ? dashes + 1 : 0; + } + return ["comment", "comment"]; + } + if (stream.eat("!")) { + state.tokenize = tokenSGMLComment; + return tokenSGMLComment(stream, state); + } + }, + "/": function(stream, state) { + if (stream.eat("*")) { + state.tokenize = tokenCComment; + return tokenCComment(stream, state); + } + return false; + } + }, + name: "css" + }); + + CodeMirror.defineMIME("text/x-scss", { + atMediaTypes: atMediaTypes, + atMediaFeatures: atMediaFeatures, + propertyKeywords: propertyKeywords, + colorKeywords: colorKeywords, + valueKeywords: valueKeywords, + allowNested: true, + hooks: { + ":": function(stream) { + if (stream.match(/\s*{/)) { + return [null, "{"]; + } + return false; + }, + "$": function(stream) { + stream.match(/^[\w-]+/); + if (stream.peek() == ":") { + return ["variable", "variable-definition"]; + } + return ["variable", "variable"]; + }, + ",": function(stream, state) { + if (state.stack[state.stack.length - 1] == "propertyValue" && stream.match(/^ *\$/, false)) { + return ["operator", ";"]; + } + }, + "/": function(stream, state) { + if (stream.eat("/")) { + stream.skipToEnd(); + return ["comment", "comment"]; + } else if (stream.eat("*")) { + state.tokenize = tokenCComment; + return tokenCComment(stream, state); + } else { + return ["operator", "operator"]; + } + }, + "#": function(stream) { + if (stream.eat("{")) { + return ["operator", "interpolation"]; + } else { + stream.eatWhile(/[\w\\\-]/); + return ["atom", "hash"]; + } + } + }, + name: "css" + }); +})(); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/css/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/css/index.html new file mode 100644 index 00000000..1d1865e2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/css/index.html @@ -0,0 +1,70 @@ + + +CodeMirror: CSS mode + + + + + + + + + +
+

CSS mode

+
+ + +

MIME types defined: text/css.

+ +

Parsing/Highlighting Tests: normal, verbose.

+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/css/scss.html b/pitfall/pdfkit/node_modules/codemirror/mode/css/scss.html new file mode 100644 index 00000000..72781c0d --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/css/scss.html @@ -0,0 +1,157 @@ + + +CodeMirror: SCSS mode + + + + + + + + + +
+

SCSS mode

+
+ + +

MIME types defined: text/scss.

+ +

Parsing/Highlighting Tests: normal, verbose.

+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/css/scss_test.js b/pitfall/pdfkit/node_modules/codemirror/mode/css/scss_test.js new file mode 100644 index 00000000..9998e2aa --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/css/scss_test.js @@ -0,0 +1,93 @@ +(function() { + var mode = CodeMirror.getMode({tabSize: 1}, "text/x-scss"); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1), "scss"); } + function IT(name) { test.indentation(name, mode, Array.prototype.slice.call(arguments, 1), "scss"); } + + MT('url_with_quotation', + "[tag foo] { [property background][operator :][string-2 url]([string test.jpg]) }"); + + MT('url_with_double_quotes', + "[tag foo] { [property background][operator :][string-2 url]([string \"test.jpg\"]) }"); + + MT('url_with_single_quotes', + "[tag foo] { [property background][operator :][string-2 url]([string \'test.jpg\']) }"); + + MT('string', + "[def @import] [string \"compass/css3\"]"); + + MT('important_keyword', + "[tag foo] { [property background][operator :][string-2 url]([string \'test.jpg\']) [keyword !important] }"); + + MT('variable', + "[variable-2 $blue][operator :][atom #333]"); + + MT('variable_as_attribute', + "[tag foo] { [property color][operator :][variable-2 $blue] }"); + + MT('numbers', + "[tag foo] { [property padding][operator :][number 10px] [number 10] [number 10em] [number 8in] }"); + + MT('number_percentage', + "[tag foo] { [property width][operator :][number 80%] }"); + + MT('selector', + "[builtin #hello][qualifier .world]{}"); + + MT('singleline_comment', + "[comment // this is a comment]"); + + MT('multiline_comment', + "[comment /*foobar*/]"); + + MT('attribute_with_hyphen', + "[tag foo] { [property font-size][operator :][number 10px] }"); + + MT('string_after_attribute', + "[tag foo] { [property content][operator :][string \"::\"] }"); + + MT('directives', + "[def @include] [qualifier .mixin]"); + + MT('basic_structure', + "[tag p] { [property background][operator :][keyword red]; }"); + + MT('nested_structure', + "[tag p] { [tag a] { [property color][operator :][keyword red]; } }"); + + MT('mixin', + "[def @mixin] [tag table-base] {}"); + + MT('number_without_semicolon', + "[tag p] {[property width][operator :][number 12]}", + "[tag a] {[property color][operator :][keyword red];}"); + + MT('atom_in_nested_block', + "[tag p] { [tag a] { [property color][operator :][atom #000]; } }"); + + MT('interpolation_in_property', + "[tag foo] { [operator #{][variable-2 $hello][operator }:][number 2]; }"); + + MT('interpolation_in_selector', + "[tag foo][operator #{][variable-2 $hello][operator }] { [property color][operator :][atom #000]; }"); + + MT('interpolation_error', + "[tag foo][operator #{][error foo][operator }] { [property color][operator :][atom #000]; }"); + + MT("divide_operator", + "[tag foo] { [property width][operator :][number 4] [operator /] [number 2] }"); + + MT('nested_structure_with_id_selector', + "[tag p] { [builtin #hello] { [property color][operator :][keyword red]; } }"); + + IT('mixin', + "@mixin container[1 (][2 $a: 10][1 , ][2 $b: 10][1 , ][2 $c: 10]) [1 {]}"); + + IT('nested', + "foo [1 { bar ][2 { ][1 } ]}"); + + IT('comma', + "foo [1 { font-family][2 : verdana, sans-serif][1 ; ]}"); + + IT('parentheses', + "foo [1 { color][2 : darken][3 ($blue, 9%][2 )][1 ; ]}"); +})(); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/css/test.js b/pitfall/pdfkit/node_modules/codemirror/mode/css/test.js new file mode 100644 index 00000000..3c52460d --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/css/test.js @@ -0,0 +1,142 @@ +(function() { + var mode = CodeMirror.getMode({tabSize: 1}, "css"); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } + function IT(name) { test.indentation(name, mode, Array.prototype.slice.call(arguments, 1)); } + + // Requires at least one media query + MT("atMediaEmpty", + "[def @media] [error {] }"); + + MT("atMediaMultiple", + "[def @media] [keyword not] [attribute screen] [operator and] ([property color]), [keyword not] [attribute print] [operator and] ([property color]) { }"); + + MT("atMediaCheckStack", + "[def @media] [attribute screen] { } [tag foo] { }"); + + MT("atMediaCheckStack", + "[def @media] [attribute screen] ([property color]) { } [tag foo] { }"); + + MT("atMediaPropertyOnly", + "[def @media] ([property color]) { } [tag foo] { }"); + + MT("atMediaCheckStackInvalidAttribute", + "[def @media] [attribute&error foobarhello] { [tag foo] { } }"); + + MT("atMediaCheckStackInvalidAttribute", + "[def @media] [attribute&error foobarhello] { } [tag foo] { }"); + + // Error, because "and" is only allowed immediately preceding a media expression + MT("atMediaInvalidAttribute", + "[def @media] [attribute&error foobarhello] { }"); + + // Error, because "and" is only allowed immediately preceding a media expression + MT("atMediaInvalidAnd", + "[def @media] [error and] [attribute screen] { }"); + + // Error, because "not" is only allowed as the first item in each media query + MT("atMediaInvalidNot", + "[def @media] [attribute screen] [error not] ([error not]) { }"); + + // Error, because "only" is only allowed as the first item in each media query + MT("atMediaInvalidOnly", + "[def @media] [attribute screen] [error only] ([error only]) { }"); + + // Error, because "foobarhello" is neither a known type or property, but + // property was expected (after "and"), and it should be in parenthese. + MT("atMediaUnknownType", + "[def @media] [attribute screen] [operator and] [error foobarhello] { }"); + + // Error, because "color" is not a known type, but is a known property, and + // should be in parentheses. + MT("atMediaInvalidType", + "[def @media] [attribute screen] [operator and] [error color] { }"); + + // Error, because "print" is not a known property, but is a known type, + // and should not be in parenthese. + MT("atMediaInvalidProperty", + "[def @media] [attribute screen] [operator and] ([error print]) { }"); + + // Soft error, because "foobarhello" is not a known property or type. + MT("atMediaUnknownProperty", + "[def @media] [attribute screen] [operator and] ([property&error foobarhello]) { }"); + + // Make sure nesting works with media queries + MT("atMediaMaxWidthNested", + "[def @media] [attribute screen] [operator and] ([property max-width][operator :] [number 25px]) { [tag foo] { } }"); + + MT("tagSelector", + "[tag foo] { }"); + + MT("classSelector", + "[qualifier .foo-bar_hello] { }"); + + MT("idSelector", + "[builtin #foo] { [error #foo] }"); + + MT("tagSelectorUnclosed", + "[tag foo] { [property margin][operator :] [number 0] } [tag bar] { }"); + + MT("tagStringNoQuotes", + "[tag foo] { [property font-family][operator :] [variable-2 hello] [variable-2 world]; }"); + + MT("tagStringDouble", + "[tag foo] { [property font-family][operator :] [string \"hello world\"]; }"); + + MT("tagStringSingle", + "[tag foo] { [property font-family][operator :] [string 'hello world']; }"); + + MT("tagColorKeyword", + "[tag foo] {" + + "[property color][operator :] [keyword black];" + + "[property color][operator :] [keyword navy];" + + "[property color][operator :] [keyword yellow];" + + "}"); + + MT("tagColorHex3", + "[tag foo] { [property background][operator :] [atom #fff]; }"); + + MT("tagColorHex6", + "[tag foo] { [property background][operator :] [atom #ffffff]; }"); + + MT("tagColorHex4", + "[tag foo] { [property background][operator :] [atom&error #ffff]; }"); + + MT("tagColorHexInvalid", + "[tag foo] { [property background][operator :] [atom&error #ffg]; }"); + + MT("tagNegativeNumber", + "[tag foo] { [property margin][operator :] [number -5px]; }"); + + MT("tagPositiveNumber", + "[tag foo] { [property padding][operator :] [number 5px]; }"); + + MT("tagVendor", + "[tag foo] { [meta -foo-][property box-sizing][operator :] [meta -foo-][string-2 border-box]; }"); + + MT("tagBogusProperty", + "[tag foo] { [property&error barhelloworld][operator :] [number 0]; }"); + + MT("tagTwoProperties", + "[tag foo] { [property margin][operator :] [number 0]; [property padding][operator :] [number 0]; }"); + + MT("tagTwoPropertiesURL", + "[tag foo] { [property background][operator :] [string-2 url]([string //example.com/foo.png]); [property padding][operator :] [number 0]; }"); + + MT("commentSGML", + "[comment ]"); + + IT("tagSelector", + "strong, em [1 { background][2 : rgba][3 (255, 255, 0, .2][2 )][1 ;]}"); + + IT("atMedia", + "[1 @media { foo ][2 { ][1 } ]}"); + + IT("comma", + "foo [1 { font-family][2 : verdana, sans-serif][1 ; ]}"); + + IT("parentheses", + "foo [1 { background][2 : url][3 (\"bar\"][2 )][1 ; ]}"); + + IT("pseudo", + "foo:before [1 { ]}"); +})(); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/d/d.js b/pitfall/pdfkit/node_modules/codemirror/mode/d/d.js new file mode 100644 index 00000000..ab345f1a --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/d/d.js @@ -0,0 +1,205 @@ +CodeMirror.defineMode("d", function(config, parserConfig) { + var indentUnit = config.indentUnit, + statementIndentUnit = parserConfig.statementIndentUnit || indentUnit, + keywords = parserConfig.keywords || {}, + builtin = parserConfig.builtin || {}, + blockKeywords = parserConfig.blockKeywords || {}, + atoms = parserConfig.atoms || {}, + hooks = parserConfig.hooks || {}, + multiLineStrings = parserConfig.multiLineStrings; + var isOperatorChar = /[+\-*&%=<>!?|\/]/; + + var curPunc; + + function tokenBase(stream, state) { + var ch = stream.next(); + if (hooks[ch]) { + var result = hooks[ch](stream, state); + if (result !== false) return result; + } + if (ch == '"' || ch == "'" || ch == "`") { + state.tokenize = tokenString(ch); + return state.tokenize(stream, state); + } + if (/[\[\]{}\(\),;\:\.]/.test(ch)) { + curPunc = ch; + return null; + } + if (/\d/.test(ch)) { + stream.eatWhile(/[\w\.]/); + return "number"; + } + if (ch == "/") { + if (stream.eat("+")) { + state.tokenize = tokenComment; + return tokenNestedComment(stream, state); + } + if (stream.eat("*")) { + state.tokenize = tokenComment; + return tokenComment(stream, state); + } + if (stream.eat("/")) { + stream.skipToEnd(); + return "comment"; + } + } + if (isOperatorChar.test(ch)) { + stream.eatWhile(isOperatorChar); + return "operator"; + } + stream.eatWhile(/[\w\$_]/); + var cur = stream.current(); + if (keywords.propertyIsEnumerable(cur)) { + if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement"; + return "keyword"; + } + if (builtin.propertyIsEnumerable(cur)) { + if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement"; + return "builtin"; + } + if (atoms.propertyIsEnumerable(cur)) return "atom"; + return "variable"; + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, next, end = false; + while ((next = stream.next()) != null) { + if (next == quote && !escaped) {end = true; break;} + escaped = !escaped && next == "\\"; + } + if (end || !(escaped || multiLineStrings)) + state.tokenize = null; + return "string"; + }; + } + + function tokenComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (ch == "/" && maybeEnd) { + state.tokenize = null; + break; + } + maybeEnd = (ch == "*"); + } + return "comment"; + } + + function tokenNestedComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (ch == "/" && maybeEnd) { + state.tokenize = null; + break; + } + maybeEnd = (ch == "+"); + } + return "comment"; + } + + function Context(indented, column, type, align, prev) { + this.indented = indented; + this.column = column; + this.type = type; + this.align = align; + this.prev = prev; + } + function pushContext(state, col, type) { + var indent = state.indented; + if (state.context && state.context.type == "statement") + indent = state.context.indented; + return state.context = new Context(indent, col, type, null, state.context); + } + function popContext(state) { + var t = state.context.type; + if (t == ")" || t == "]" || t == "}") + state.indented = state.context.indented; + return state.context = state.context.prev; + } + + // Interface + + return { + startState: function(basecolumn) { + return { + tokenize: null, + context: new Context((basecolumn || 0) - indentUnit, 0, "top", false), + indented: 0, + startOfLine: true + }; + }, + + token: function(stream, state) { + var ctx = state.context; + if (stream.sol()) { + if (ctx.align == null) ctx.align = false; + state.indented = stream.indentation(); + state.startOfLine = true; + } + if (stream.eatSpace()) return null; + curPunc = null; + var style = (state.tokenize || tokenBase)(stream, state); + if (style == "comment" || style == "meta") return style; + if (ctx.align == null) ctx.align = true; + + if ((curPunc == ";" || curPunc == ":" || curPunc == ",") && ctx.type == "statement") popContext(state); + else if (curPunc == "{") pushContext(state, stream.column(), "}"); + else if (curPunc == "[") pushContext(state, stream.column(), "]"); + else if (curPunc == "(") pushContext(state, stream.column(), ")"); + else if (curPunc == "}") { + while (ctx.type == "statement") ctx = popContext(state); + if (ctx.type == "}") ctx = popContext(state); + while (ctx.type == "statement") ctx = popContext(state); + } + else if (curPunc == ctx.type) popContext(state); + else if (((ctx.type == "}" || ctx.type == "top") && curPunc != ';') || (ctx.type == "statement" && curPunc == "newstatement")) + pushContext(state, stream.column(), "statement"); + state.startOfLine = false; + return style; + }, + + indent: function(state, textAfter) { + if (state.tokenize != tokenBase && state.tokenize != null) return CodeMirror.Pass; + var ctx = state.context, firstChar = textAfter && textAfter.charAt(0); + if (ctx.type == "statement" && firstChar == "}") ctx = ctx.prev; + var closing = firstChar == ctx.type; + if (ctx.type == "statement") return ctx.indented + (firstChar == "{" ? 0 : statementIndentUnit); + else if (ctx.align) return ctx.column + (closing ? 0 : 1); + else return ctx.indented + (closing ? 0 : indentUnit); + }, + + electricChars: "{}" + }; +}); + +(function() { + function words(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + + var blockKeywords = "body catch class do else enum for foreach foreach_reverse if in interface mixin " + + "out scope struct switch try union unittest version while with"; + + CodeMirror.defineMIME("text/x-d", { + name: "d", + keywords: words("abstract alias align asm assert auto break case cast cdouble cent cfloat const continue " + + "debug default delegate delete deprecated export extern final finally function goto immutable " + + "import inout invariant is lazy macro module new nothrow override package pragma private " + + "protected public pure ref return shared short static super synchronized template this " + + "throw typedef typeid typeof volatile __FILE__ __LINE__ __gshared __traits __vector __parameters " + + blockKeywords), + blockKeywords: words(blockKeywords), + builtin: words("bool byte char creal dchar double float idouble ifloat int ireal long real short ubyte " + + "ucent uint ulong ushort wchar wstring void size_t sizediff_t"), + atoms: words("exit failure success true false null"), + hooks: { + "@": function(stream, _state) { + stream.eatWhile(/[\w\$_]/); + return "meta"; + } + } + }); +}()); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/d/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/d/index.html new file mode 100644 index 00000000..8b25fcc5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/d/index.html @@ -0,0 +1,273 @@ + + +CodeMirror: D mode + + + + + + + + + + +
+

D mode

+
+ + + +

Simple mode that handle D-Syntax (DLang Homepage).

+ +

MIME types defined: text/x-d + .

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/diff/diff.js b/pitfall/pdfkit/node_modules/codemirror/mode/diff/diff.js new file mode 100644 index 00000000..9a0d90ea --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/diff/diff.js @@ -0,0 +1,32 @@ +CodeMirror.defineMode("diff", function() { + + var TOKEN_NAMES = { + '+': 'positive', + '-': 'negative', + '@': 'meta' + }; + + return { + token: function(stream) { + var tw_pos = stream.string.search(/[\t ]+?$/); + + if (!stream.sol() || tw_pos === 0) { + stream.skipToEnd(); + return ("error " + ( + TOKEN_NAMES[stream.string.charAt(0)] || '')).replace(/ $/, ''); + } + + var token_name = TOKEN_NAMES[stream.peek()] || stream.skipToEnd(); + + if (tw_pos === -1) { + stream.skipToEnd(); + } else { + stream.pos = tw_pos; + } + + return token_name; + } + }; +}); + +CodeMirror.defineMIME("text/x-diff", "diff"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/diff/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/diff/index.html new file mode 100644 index 00000000..6ceae8b3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/diff/index.html @@ -0,0 +1,117 @@ + + +CodeMirror: Diff mode + + + + + + + + + +
+

Diff mode

+
+ + +

MIME types defined: text/x-diff.

+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/dtd/dtd.js b/pitfall/pdfkit/node_modules/codemirror/mode/dtd/dtd.js new file mode 100644 index 00000000..7033bf0f --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/dtd/dtd.js @@ -0,0 +1,127 @@ +/* + DTD mode + Ported to CodeMirror by Peter Kroon + Report bugs/issues here: https://github.com/marijnh/CodeMirror/issues + GitHub: @peterkroon +*/ + +CodeMirror.defineMode("dtd", function(config) { + var indentUnit = config.indentUnit, type; + function ret(style, tp) {type = tp; return style;} + + function tokenBase(stream, state) { + var ch = stream.next(); + + if (ch == "<" && stream.eat("!") ) { + if (stream.eatWhile(/[\-]/)) { + state.tokenize = tokenSGMLComment; + return tokenSGMLComment(stream, state); + } else if (stream.eatWhile(/[\w]/)) return ret("keyword", "doindent"); + } else if (ch == "<" && stream.eat("?")) { //xml declaration + state.tokenize = inBlock("meta", "?>"); + return ret("meta", ch); + } else if (ch == "#" && stream.eatWhile(/[\w]/)) return ret("atom", "tag"); + else if (ch == "|") return ret("keyword", "seperator"); + else if (ch.match(/[\(\)\[\]\-\.,\+\?>]/)) return ret(null, ch);//if(ch === ">") return ret(null, "endtag"); else + else if (ch.match(/[\[\]]/)) return ret("rule", ch); + else if (ch == "\"" || ch == "'") { + state.tokenize = tokenString(ch); + return state.tokenize(stream, state); + } else if (stream.eatWhile(/[a-zA-Z\?\+\d]/)) { + var sc = stream.current(); + if( sc.substr(sc.length-1,sc.length).match(/\?|\+/) !== null )stream.backUp(1); + return ret("tag", "tag"); + } else if (ch == "%" || ch == "*" ) return ret("number", "number"); + else { + stream.eatWhile(/[\w\\\-_%.{,]/); + return ret(null, null); + } + } + + function tokenSGMLComment(stream, state) { + var dashes = 0, ch; + while ((ch = stream.next()) != null) { + if (dashes >= 2 && ch == ">") { + state.tokenize = tokenBase; + break; + } + dashes = (ch == "-") ? dashes + 1 : 0; + } + return ret("comment", "comment"); + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, ch; + while ((ch = stream.next()) != null) { + if (ch == quote && !escaped) { + state.tokenize = tokenBase; + break; + } + escaped = !escaped && ch == "\\"; + } + return ret("string", "tag"); + }; + } + + function inBlock(style, terminator) { + return function(stream, state) { + while (!stream.eol()) { + if (stream.match(terminator)) { + state.tokenize = tokenBase; + break; + } + stream.next(); + } + return style; + }; + } + + return { + startState: function(base) { + return {tokenize: tokenBase, + baseIndent: base || 0, + stack: []}; + }, + + token: function(stream, state) { + if (stream.eatSpace()) return null; + var style = state.tokenize(stream, state); + + var context = state.stack[state.stack.length-1]; + if (stream.current() == "[" || type === "doindent" || type == "[") state.stack.push("rule"); + else if (type === "endtag") state.stack[state.stack.length-1] = "endtag"; + else if (stream.current() == "]" || type == "]" || (type == ">" && context == "rule")) state.stack.pop(); + else if (type == "[") state.stack.push("["); + return style; + }, + + indent: function(state, textAfter) { + var n = state.stack.length; + + if( textAfter.match(/\]\s+|\]/) )n=n-1; + else if(textAfter.substr(textAfter.length-1, textAfter.length) === ">"){ + if(textAfter.substr(0,1) === "<")n; + else if( type == "doindent" && textAfter.length > 1 )n; + else if( type == "doindent")n--; + else if( type == ">" && textAfter.length > 1)n; + else if( type == "tag" && textAfter !== ">")n; + else if( type == "tag" && state.stack[state.stack.length-1] == "rule")n--; + else if( type == "tag")n++; + else if( textAfter === ">" && state.stack[state.stack.length-1] == "rule" && type === ">")n--; + else if( textAfter === ">" && state.stack[state.stack.length-1] == "rule")n; + else if( textAfter.substr(0,1) !== "<" && textAfter.substr(0,1) === ">" )n=n-1; + else if( textAfter === ">")n; + else n=n-1; + //over rule them all + if(type == null || type == "]")n--; + } + + return state.baseIndent + n * indentUnit; + }, + + electricChars: "]>" + }; +}); + +CodeMirror.defineMIME("application/xml-dtd", "dtd"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/dtd/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/dtd/index.html new file mode 100644 index 00000000..076d827f --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/dtd/index.html @@ -0,0 +1,89 @@ + + +CodeMirror: DTD mode + + + + + + + + + +
+

DTD mode

+
+ + +

MIME types defined: application/xml-dtd.

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/ecl/ecl.js b/pitfall/pdfkit/node_modules/codemirror/mode/ecl/ecl.js new file mode 100644 index 00000000..7601b189 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/ecl/ecl.js @@ -0,0 +1,192 @@ +CodeMirror.defineMode("ecl", function(config) { + + function words(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + + function metaHook(stream, state) { + if (!state.startOfLine) return false; + stream.skipToEnd(); + return "meta"; + } + + var indentUnit = config.indentUnit; + var keyword = words("abs acos allnodes ascii asin asstring atan atan2 ave case choose choosen choosesets clustersize combine correlation cos cosh count covariance cron dataset dedup define denormalize distribute distributed distribution ebcdic enth error evaluate event eventextra eventname exists exp failcode failmessage fetch fromunicode getisvalid global graph group hash hash32 hash64 hashcrc hashmd5 having if index intformat isvalid iterate join keyunicode length library limit ln local log loop map matched matchlength matchposition matchtext matchunicode max merge mergejoin min nolocal nonempty normalize parse pipe power preload process project pull random range rank ranked realformat recordof regexfind regexreplace regroup rejected rollup round roundup row rowdiff sample set sin sinh sizeof soapcall sort sorted sqrt stepped stored sum table tan tanh thisnode topn tounicode transfer trim truncate typeof ungroup unicodeorder variance which workunit xmldecode xmlencode xmltext xmlunicode"); + var variable = words("apply assert build buildindex evaluate fail keydiff keypatch loadxml nothor notify output parallel sequential soapcall wait"); + var variable_2 = words("__compressed__ all and any as atmost before beginc++ best between case const counter csv descend encrypt end endc++ endmacro except exclusive expire export extend false few first flat from full function group header heading hole ifblock import in interface joined keep keyed last left limit load local locale lookup macro many maxcount maxlength min skew module named nocase noroot noscan nosort not of only opt or outer overwrite packed partition penalty physicallength pipe quote record relationship repeat return right scan self separator service shared skew skip sql store terminator thor threshold token transform trim true type unicodeorder unsorted validate virtual whole wild within xml xpath"); + var variable_3 = words("ascii big_endian boolean data decimal ebcdic integer pattern qstring real record rule set of string token udecimal unicode unsigned varstring varunicode"); + var builtin = words("checkpoint deprecated failcode failmessage failure global independent onwarning persist priority recovery stored success wait when"); + var blockKeywords = words("catch class do else finally for if switch try while"); + var atoms = words("true false null"); + var hooks = {"#": metaHook}; + var multiLineStrings; + var isOperatorChar = /[+\-*&%=<>!?|\/]/; + + var curPunc; + + function tokenBase(stream, state) { + var ch = stream.next(); + if (hooks[ch]) { + var result = hooks[ch](stream, state); + if (result !== false) return result; + } + if (ch == '"' || ch == "'") { + state.tokenize = tokenString(ch); + return state.tokenize(stream, state); + } + if (/[\[\]{}\(\),;\:\.]/.test(ch)) { + curPunc = ch; + return null; + } + if (/\d/.test(ch)) { + stream.eatWhile(/[\w\.]/); + return "number"; + } + if (ch == "/") { + if (stream.eat("*")) { + state.tokenize = tokenComment; + return tokenComment(stream, state); + } + if (stream.eat("/")) { + stream.skipToEnd(); + return "comment"; + } + } + if (isOperatorChar.test(ch)) { + stream.eatWhile(isOperatorChar); + return "operator"; + } + stream.eatWhile(/[\w\$_]/); + var cur = stream.current().toLowerCase(); + if (keyword.propertyIsEnumerable(cur)) { + if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement"; + return "keyword"; + } else if (variable.propertyIsEnumerable(cur)) { + if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement"; + return "variable"; + } else if (variable_2.propertyIsEnumerable(cur)) { + if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement"; + return "variable-2"; + } else if (variable_3.propertyIsEnumerable(cur)) { + if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement"; + return "variable-3"; + } else if (builtin.propertyIsEnumerable(cur)) { + if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement"; + return "builtin"; + } else { //Data types are of from KEYWORD## + var i = cur.length - 1; + while(i >= 0 && (!isNaN(cur[i]) || cur[i] == '_')) + --i; + + if (i > 0) { + var cur2 = cur.substr(0, i + 1); + if (variable_3.propertyIsEnumerable(cur2)) { + if (blockKeywords.propertyIsEnumerable(cur2)) curPunc = "newstatement"; + return "variable-3"; + } + } + } + if (atoms.propertyIsEnumerable(cur)) return "atom"; + return null; + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, next, end = false; + while ((next = stream.next()) != null) { + if (next == quote && !escaped) {end = true; break;} + escaped = !escaped && next == "\\"; + } + if (end || !(escaped || multiLineStrings)) + state.tokenize = tokenBase; + return "string"; + }; + } + + function tokenComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (ch == "/" && maybeEnd) { + state.tokenize = tokenBase; + break; + } + maybeEnd = (ch == "*"); + } + return "comment"; + } + + function Context(indented, column, type, align, prev) { + this.indented = indented; + this.column = column; + this.type = type; + this.align = align; + this.prev = prev; + } + function pushContext(state, col, type) { + return state.context = new Context(state.indented, col, type, null, state.context); + } + function popContext(state) { + var t = state.context.type; + if (t == ")" || t == "]" || t == "}") + state.indented = state.context.indented; + return state.context = state.context.prev; + } + + // Interface + + return { + startState: function(basecolumn) { + return { + tokenize: null, + context: new Context((basecolumn || 0) - indentUnit, 0, "top", false), + indented: 0, + startOfLine: true + }; + }, + + token: function(stream, state) { + var ctx = state.context; + if (stream.sol()) { + if (ctx.align == null) ctx.align = false; + state.indented = stream.indentation(); + state.startOfLine = true; + } + if (stream.eatSpace()) return null; + curPunc = null; + var style = (state.tokenize || tokenBase)(stream, state); + if (style == "comment" || style == "meta") return style; + if (ctx.align == null) ctx.align = true; + + if ((curPunc == ";" || curPunc == ":") && ctx.type == "statement") popContext(state); + else if (curPunc == "{") pushContext(state, stream.column(), "}"); + else if (curPunc == "[") pushContext(state, stream.column(), "]"); + else if (curPunc == "(") pushContext(state, stream.column(), ")"); + else if (curPunc == "}") { + while (ctx.type == "statement") ctx = popContext(state); + if (ctx.type == "}") ctx = popContext(state); + while (ctx.type == "statement") ctx = popContext(state); + } + else if (curPunc == ctx.type) popContext(state); + else if (ctx.type == "}" || ctx.type == "top" || (ctx.type == "statement" && curPunc == "newstatement")) + pushContext(state, stream.column(), "statement"); + state.startOfLine = false; + return style; + }, + + indent: function(state, textAfter) { + if (state.tokenize != tokenBase && state.tokenize != null) return 0; + var ctx = state.context, firstChar = textAfter && textAfter.charAt(0); + if (ctx.type == "statement" && firstChar == "}") ctx = ctx.prev; + var closing = firstChar == ctx.type; + if (ctx.type == "statement") return ctx.indented + (firstChar == "{" ? 0 : indentUnit); + else if (ctx.align) return ctx.column + (closing ? 0 : 1); + else return ctx.indented + (closing ? 0 : indentUnit); + }, + + electricChars: "{}" + }; +}); + +CodeMirror.defineMIME("text/x-ecl", "ecl"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/ecl/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/ecl/index.html new file mode 100644 index 00000000..f4b612d6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/ecl/index.html @@ -0,0 +1,52 @@ + + +CodeMirror: ECL mode + + + + + + + + + +
+

ECL mode

+
+ + +

Based on CodeMirror's clike mode. For more information see HPCC Systems web site.

+

MIME types defined: text/x-ecl.

+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/eiffel/eiffel.js b/pitfall/pdfkit/node_modules/codemirror/mode/eiffel/eiffel.js new file mode 100644 index 00000000..15f34a93 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/eiffel/eiffel.js @@ -0,0 +1,147 @@ +CodeMirror.defineMode("eiffel", function() { + function wordObj(words) { + var o = {}; + for (var i = 0, e = words.length; i < e; ++i) o[words[i]] = true; + return o; + } + var keywords = wordObj([ + 'note', + 'across', + 'when', + 'variant', + 'until', + 'unique', + 'undefine', + 'then', + 'strip', + 'select', + 'retry', + 'rescue', + 'require', + 'rename', + 'reference', + 'redefine', + 'prefix', + 'once', + 'old', + 'obsolete', + 'loop', + 'local', + 'like', + 'is', + 'inspect', + 'infix', + 'include', + 'if', + 'frozen', + 'from', + 'external', + 'export', + 'ensure', + 'end', + 'elseif', + 'else', + 'do', + 'creation', + 'create', + 'check', + 'alias', + 'agent', + 'separate', + 'invariant', + 'inherit', + 'indexing', + 'feature', + 'expanded', + 'deferred', + 'class', + 'Void', + 'True', + 'Result', + 'Precursor', + 'False', + 'Current', + 'create', + 'attached', + 'detachable', + 'as', + 'and', + 'implies', + 'not', + 'or' + ]); + var operators = wordObj([":=", "and then","and", "or","<<",">>"]); + var curPunc; + + function chain(newtok, stream, state) { + state.tokenize.push(newtok); + return newtok(stream, state); + } + + function tokenBase(stream, state) { + curPunc = null; + if (stream.eatSpace()) return null; + var ch = stream.next(); + if (ch == '"'||ch == "'") { + return chain(readQuoted(ch, "string"), stream, state); + } else if (ch == "-"&&stream.eat("-")) { + stream.skipToEnd(); + return "comment"; + } else if (ch == ":"&&stream.eat("=")) { + return "operator"; + } else if (/[0-9]/.test(ch)) { + stream.eatWhile(/[xXbBCc0-9\.]/); + stream.eat(/[\?\!]/); + return "ident"; + } else if (/[a-zA-Z_0-9]/.test(ch)) { + stream.eatWhile(/[a-zA-Z_0-9]/); + stream.eat(/[\?\!]/); + return "ident"; + } else if (/[=+\-\/*^%<>~]/.test(ch)) { + stream.eatWhile(/[=+\-\/*^%<>~]/); + return "operator"; + } else { + return null; + } + } + + function readQuoted(quote, style, unescaped) { + return function(stream, state) { + var escaped = false, ch; + while ((ch = stream.next()) != null) { + if (ch == quote && (unescaped || !escaped)) { + state.tokenize.pop(); + break; + } + escaped = !escaped && ch == "%"; + } + return style; + }; + } + + return { + startState: function() { + return {tokenize: [tokenBase]}; + }, + + token: function(stream, state) { + var style = state.tokenize[state.tokenize.length-1](stream, state); + if (style == "ident") { + var word = stream.current(); + style = keywords.propertyIsEnumerable(stream.current()) ? "keyword" + : operators.propertyIsEnumerable(stream.current()) ? "operator" + : /^[A-Z][A-Z_0-9]*$/g.test(word) ? "tag" + : /^0[bB][0-1]+$/g.test(word) ? "number" + : /^0[cC][0-7]+$/g.test(word) ? "number" + : /^0[xX][a-fA-F0-9]+$/g.test(word) ? "number" + : /^([0-9]+\.[0-9]*)|([0-9]*\.[0-9]+)$/g.test(word) ? "number" + : /^[0-9]+$/g.test(word) ? "number" + : "variable"; + } + return style; + }, + lineComment: "--" + }; +}); + +CodeMirror.defineMIME("text/x-eiffel", "eiffel"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/eiffel/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/eiffel/index.html new file mode 100644 index 00000000..5d395a05 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/eiffel/index.html @@ -0,0 +1,430 @@ + + +CodeMirror: Eiffel mode + + + + + + + + + + +
+

Eiffel mode

+
+ + +

MIME types defined: text/x-eiffel.

+ +

Created by YNH.

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/erlang/erlang.js b/pitfall/pdfkit/node_modules/codemirror/mode/erlang/erlang.js new file mode 100644 index 00000000..af8953c3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/erlang/erlang.js @@ -0,0 +1,484 @@ +// block; "begin", "case", "fun", "if", "receive", "try": closed by "end" +// block internal; "after", "catch", "of" +// guard; "when", closed by "->" +// "->" opens a clause, closed by ";" or "." +// "<<" opens a binary, closed by ">>" +// "," appears in arglists, lists, tuples and terminates lines of code +// "." resets indentation to 0 +// obsolete; "cond", "let", "query" + +CodeMirror.defineMIME("text/x-erlang", "erlang"); + +CodeMirror.defineMode("erlang", function(cmCfg) { + + function rval(state,_stream,type) { + // distinguish between "." as terminator and record field operator + state.in_record = (type == "record"); + + // erlang -> CodeMirror tag + switch (type) { + case "atom": return "atom"; + case "attribute": return "attribute"; + case "boolean": return "special"; + case "builtin": return "builtin"; + case "comment": return "comment"; + case "fun": return "meta"; + case "function": return "tag"; + case "guard": return "property"; + case "keyword": return "keyword"; + case "macro": return "variable-2"; + case "number": return "number"; + case "operator": return "operator"; + case "record": return "bracket"; + case "string": return "string"; + case "type": return "def"; + case "variable": return "variable"; + case "error": return "error"; + case "separator": return null; + case "open_paren": return null; + case "close_paren": return null; + default: return null; + } + } + + var typeWords = [ + "-type", "-spec", "-export_type", "-opaque"]; + + var keywordWords = [ + "after","begin","catch","case","cond","end","fun","if", + "let","of","query","receive","try","when"]; + + var separatorRE = /[\->\.,:;]/; + var separatorWords = [ + "->",";",":",".",","]; + + var operatorWords = [ + "and","andalso","band","bnot","bor","bsl","bsr","bxor", + "div","not","or","orelse","rem","xor"]; + + var symbolRE = /[\+\-\*\/<>=\|:!]/; + var symbolWords = [ + "+","-","*","/",">",">=","<","=<","=:=","==","=/=","/=","||","<-","!"]; + + var openParenRE = /[<\(\[\{]/; + var openParenWords = [ + "<<","(","[","{"]; + + var closeParenRE = /[>\)\]\}]/; + var closeParenWords = [ + "}","]",")",">>"]; + + var guardWords = [ + "is_atom","is_binary","is_bitstring","is_boolean","is_float", + "is_function","is_integer","is_list","is_number","is_pid", + "is_port","is_record","is_reference","is_tuple", + "atom","binary","bitstring","boolean","function","integer","list", + "number","pid","port","record","reference","tuple"]; + + var bifWords = [ + "abs","adler32","adler32_combine","alive","apply","atom_to_binary", + "atom_to_list","binary_to_atom","binary_to_existing_atom", + "binary_to_list","binary_to_term","bit_size","bitstring_to_list", + "byte_size","check_process_code","contact_binary","crc32", + "crc32_combine","date","decode_packet","delete_module", + "disconnect_node","element","erase","exit","float","float_to_list", + "garbage_collect","get","get_keys","group_leader","halt","hd", + "integer_to_list","internal_bif","iolist_size","iolist_to_binary", + "is_alive","is_atom","is_binary","is_bitstring","is_boolean", + "is_float","is_function","is_integer","is_list","is_number","is_pid", + "is_port","is_process_alive","is_record","is_reference","is_tuple", + "length","link","list_to_atom","list_to_binary","list_to_bitstring", + "list_to_existing_atom","list_to_float","list_to_integer", + "list_to_pid","list_to_tuple","load_module","make_ref","module_loaded", + "monitor_node","node","node_link","node_unlink","nodes","notalive", + "now","open_port","pid_to_list","port_close","port_command", + "port_connect","port_control","pre_loaded","process_flag", + "process_info","processes","purge_module","put","register", + "registered","round","self","setelement","size","spawn","spawn_link", + "spawn_monitor","spawn_opt","split_binary","statistics", + "term_to_binary","time","throw","tl","trunc","tuple_size", + "tuple_to_list","unlink","unregister","whereis"]; + +// [Ø-Þ] [À-Ö] +// [ß-ö] [ø-ÿ] + var anumRE = /[\w@Ø-ÞÀ-Öß-öø-ÿ]/; + var escapesRE = + /[0-7]{1,3}|[bdefnrstv\\"']|\^[a-zA-Z]|x[0-9a-zA-Z]{2}|x{[0-9a-zA-Z]+}/; + + function tokenize(stream, state) { + + // in multi-line string + if (state.in_string) { + state.in_string = (!doubleQuote(stream)); + return rval(state,stream,"string"); + } + + // in multi-line atom + if (state.in_atom) { + state.in_atom = (!singleQuote(stream)); + return rval(state,stream,"atom"); + } + + // whitespace + if (stream.eatSpace()) { + return rval(state,stream,"whitespace"); + } + + // attributes and type specs + if ((peekToken(state).token == "") && + stream.match(/-\s*[a-zß-öø-ÿ][\wØ-ÞÀ-Öß-öø-ÿ]*/)) { + if (isMember(stream.current(),typeWords)) { + return rval(state,stream,"type"); + }else{ + return rval(state,stream,"attribute"); + } + } + + var ch = stream.next(); + + // comment + if (ch == '%') { + stream.skipToEnd(); + return rval(state,stream,"comment"); + } + + // macro + if (ch == '?') { + stream.eatWhile(anumRE); + return rval(state,stream,"macro"); + } + + // record + if (ch == "#") { + stream.eatWhile(anumRE); + return rval(state,stream,"record"); + } + + // dollar escape + if ( ch == "$" ) { + if (stream.next() == "\\" && !stream.match(escapesRE)) { + return rval(state,stream,"error"); + } + return rval(state,stream,"number"); + } + + // quoted atom + if (ch == '\'') { + if (!(state.in_atom = (!singleQuote(stream)))) { + if (stream.match(/\s*\/\s*[0-9]/,false)) { + stream.match(/\s*\/\s*[0-9]/,true); + popToken(state); + return rval(state,stream,"fun"); // 'f'/0 style fun + } + if (stream.match(/\s*\(/,false) || stream.match(/\s*:/,false)) { + return rval(state,stream,"function"); + } + } + return rval(state,stream,"atom"); + } + + // string + if (ch == '"') { + state.in_string = (!doubleQuote(stream)); + return rval(state,stream,"string"); + } + + // variable + if (/[A-Z_Ø-ÞÀ-Ö]/.test(ch)) { + stream.eatWhile(anumRE); + return rval(state,stream,"variable"); + } + + // atom/keyword/BIF/function + if (/[a-z_ß-öø-ÿ]/.test(ch)) { + stream.eatWhile(anumRE); + + if (stream.match(/\s*\/\s*[0-9]/,false)) { + stream.match(/\s*\/\s*[0-9]/,true); + popToken(state); + return rval(state,stream,"fun"); // f/0 style fun + } + + var w = stream.current(); + + if (isMember(w,keywordWords)) { + pushToken(state,stream); + return rval(state,stream,"keyword"); + }else if (stream.match(/\s*\(/,false)) { + // 'put' and 'erlang:put' are bifs, 'foo:put' is not + if (isMember(w,bifWords) && + (!isPrev(stream,":") || isPrev(stream,"erlang:"))) { + return rval(state,stream,"builtin"); + }else if (isMember(w,guardWords)) { + return rval(state,stream,"guard"); + }else{ + return rval(state,stream,"function"); + } + }else if (isMember(w,operatorWords)) { + return rval(state,stream,"operator"); + }else if (stream.match(/\s*:/,false)) { + if (w == "erlang") { + return rval(state,stream,"builtin"); + } else { + return rval(state,stream,"function"); + } + }else if (isMember(w,["true","false"])) { + return rval(state,stream,"boolean"); + }else{ + return rval(state,stream,"atom"); + } + } + + // number + var digitRE = /[0-9]/; + var radixRE = /[0-9a-zA-Z]/; // 36#zZ style int + if (digitRE.test(ch)) { + stream.eatWhile(digitRE); + if (stream.eat('#')) { + stream.eatWhile(radixRE); // 36#aZ style integer + } else { + if (stream.eat('.')) { // float + stream.eatWhile(digitRE); + } + if (stream.eat(/[eE]/)) { + stream.eat(/[-+]/); // float with exponent + stream.eatWhile(digitRE); + } + } + return rval(state,stream,"number"); // normal integer + } + + // open parens + if (nongreedy(stream,openParenRE,openParenWords)) { + pushToken(state,stream); + return rval(state,stream,"open_paren"); + } + + // close parens + if (nongreedy(stream,closeParenRE,closeParenWords)) { + pushToken(state,stream); + return rval(state,stream,"close_paren"); + } + + // separators + if (greedy(stream,separatorRE,separatorWords)) { + // distinguish between "." as terminator and record field operator + if (!state.in_record) { + pushToken(state,stream); + } + return rval(state,stream,"separator"); + } + + // operators + if (greedy(stream,symbolRE,symbolWords)) { + return rval(state,stream,"operator"); + } + + return rval(state,stream,null); + } + + function isPrev(stream,string) { + var start = stream.start; + var len = string.length; + if (len <= start) { + var word = stream.string.slice(start-len,start); + return word == string; + }else{ + return false; + } + } + + function nongreedy(stream,re,words) { + if (stream.current().length == 1 && re.test(stream.current())) { + stream.backUp(1); + while (re.test(stream.peek())) { + stream.next(); + if (isMember(stream.current(),words)) { + return true; + } + } + stream.backUp(stream.current().length-1); + } + return false; + } + + function greedy(stream,re,words) { + if (stream.current().length == 1 && re.test(stream.current())) { + while (re.test(stream.peek())) { + stream.next(); + } + while (0 < stream.current().length) { + if (isMember(stream.current(),words)) { + return true; + }else{ + stream.backUp(1); + } + } + stream.next(); + } + return false; + } + + function doubleQuote(stream) { + return quote(stream, '"', '\\'); + } + + function singleQuote(stream) { + return quote(stream,'\'','\\'); + } + + function quote(stream,quoteChar,escapeChar) { + while (!stream.eol()) { + var ch = stream.next(); + if (ch == quoteChar) { + return true; + }else if (ch == escapeChar) { + stream.next(); + } + } + return false; + } + + function isMember(element,list) { + return (-1 < list.indexOf(element)); + } + +///////////////////////////////////////////////////////////////////////////// + function myIndent(state,textAfter) { + var indent = cmCfg.indentUnit; + var token = (peekToken(state)).token; + var wordAfter = takewhile(textAfter,/[^a-z]/); + + if (state.in_string || state.in_atom) { + return CodeMirror.Pass; + }else if (token == "") { + return 0; + }else if (isMember(token,openParenWords)) { + return (peekToken(state)).column+token.length; + }else if (token == "when") { + return (peekToken(state)).column+token.length+1; + }else if (token == "fun" && wordAfter == "") { + return (peekToken(state)).column+token.length; + }else if (token == "->") { + if (isMember(wordAfter,["end","after","catch"])) { + return peekToken(state,2).column; + }else if (peekToken(state,2).token == "fun") { + return peekToken(state,2).column+indent; + }else if (peekToken(state,2).token == "") { + return indent; + }else{ + return (peekToken(state)).indent+indent; + } + }else if (isMember(wordAfter,["after","catch","of"])) { + return (peekToken(state)).indent; + }else{ + return (peekToken(state)).column+indent; + } + } + + function takewhile(str,re) { + var m = str.match(re); + return m ? str.slice(0,m.index) : str; + } + + function Token(stream) { + this.token = stream ? stream.current() : ""; + this.column = stream ? stream.column() : 0; + this.indent = stream ? stream.indentation() : 0; + } + + function popToken(state) { + return state.tokenStack.pop(); + } + + function peekToken(state,depth) { + var len = state.tokenStack.length; + var dep = (depth ? depth : 1); + if (len < dep) { + return new Token; + }else{ + return state.tokenStack[len-dep]; + } + } + + function pushToken(state,stream) { + var token = stream.current(); + var prev_token = peekToken(state).token; + + if (token == ".") { + state.tokenStack = []; + return false; + }else if(isMember(token,[",", ":", "of", "cond", "let", "query"])) { + return false; + }else if (drop_last(prev_token,token)) { + return false; + }else if (drop_both(prev_token,token)) { + popToken(state); + return false; + }else if (drop_first(prev_token,token)) { + popToken(state); + return pushToken(state,stream); + }else if (isMember(token,["after","catch"])) { + return false; + }else{ + state.tokenStack.push(new Token(stream)); + return true; + } + } + + function drop_last(open, close) { + switch(open+" "+close) { + case "when ;": return true; + default: return false; + } + } + + function drop_first(open, close) { + switch (open+" "+close) { + case "when ->": return true; + case "-> end": return true; + default: return false; + } + } + + function drop_both(open, close) { + switch (open+" "+close) { + case "( )": return true; + case "[ ]": return true; + case "{ }": return true; + case "<< >>": return true; + case "begin end": return true; + case "case end": return true; + case "fun end": return true; + case "if end": return true; + case "receive end": return true; + case "try end": return true; + case "-> catch": return true; + case "-> after": return true; + case "-> ;": return true; + default: return false; + } + } + + return { + startState: + function() { + return {tokenStack: [], + in_record: false, + in_string: false, + in_atom: false}; + }, + + token: + function(stream, state) { + return tokenize(stream, state); + }, + + indent: + function(state, textAfter) { + return myIndent(state,textAfter); + }, + + lineComment: "%" + }; +}); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/erlang/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/erlang/index.html new file mode 100644 index 00000000..e63e2312 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/erlang/index.html @@ -0,0 +1,75 @@ + + +CodeMirror: Erlang mode + + + + + + + + + + + +
+

Erlang mode

+
+ + + +

MIME types defined: text/x-erlang.

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/fortran/fortran.js b/pitfall/pdfkit/node_modules/codemirror/mode/fortran/fortran.js new file mode 100644 index 00000000..83fd8fde --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/fortran/fortran.js @@ -0,0 +1,173 @@ +CodeMirror.defineMode("fortran", function() { + function words(array) { + var keys = {}; + for (var i = 0; i < array.length; ++i) { + keys[array[i]] = true; + } + return keys; + } + + var keywords = words([ + "abstract", "accept", "allocatable", "allocate", + "array", "assign", "asynchronous", "backspace", + "bind", "block", "byte", "call", "case", + "class", "close", "common", "contains", + "continue", "cycle", "data", "deallocate", + "decode", "deferred", "dimension", "do", + "elemental", "else", "encode", "end", + "endif", "entry", "enumerator", "equivalence", + "exit", "external", "extrinsic", "final", + "forall", "format", "function", "generic", + "go", "goto", "if", "implicit", "import", "include", + "inquire", "intent", "interface", "intrinsic", + "module", "namelist", "non_intrinsic", + "non_overridable", "none", "nopass", + "nullify", "open", "optional", "options", + "parameter", "pass", "pause", "pointer", + "print", "private", "program", "protected", + "public", "pure", "read", "recursive", "result", + "return", "rewind", "save", "select", "sequence", + "stop", "subroutine", "target", "then", "to", "type", + "use", "value", "volatile", "where", "while", + "write"]); + var builtins = words(["abort", "abs", "access", "achar", "acos", + "adjustl", "adjustr", "aimag", "aint", "alarm", + "all", "allocated", "alog", "amax", "amin", + "amod", "and", "anint", "any", "asin", + "associated", "atan", "besj", "besjn", "besy", + "besyn", "bit_size", "btest", "cabs", "ccos", + "ceiling", "cexp", "char", "chdir", "chmod", + "clog", "cmplx", "command_argument_count", + "complex", "conjg", "cos", "cosh", "count", + "cpu_time", "cshift", "csin", "csqrt", "ctime", + "c_funloc", "c_loc", "c_associated", "c_null_ptr", + "c_null_funptr", "c_f_pointer", "c_null_char", + "c_alert", "c_backspace", "c_form_feed", + "c_new_line", "c_carriage_return", + "c_horizontal_tab", "c_vertical_tab", "dabs", + "dacos", "dasin", "datan", "date_and_time", + "dbesj", "dbesj", "dbesjn", "dbesy", "dbesy", + "dbesyn", "dble", "dcos", "dcosh", "ddim", "derf", + "derfc", "dexp", "digits", "dim", "dint", "dlog", + "dlog", "dmax", "dmin", "dmod", "dnint", + "dot_product", "dprod", "dsign", "dsinh", + "dsin", "dsqrt", "dtanh", "dtan", "dtime", + "eoshift", "epsilon", "erf", "erfc", "etime", + "exit", "exp", "exponent", "extends_type_of", + "fdate", "fget", "fgetc", "float", "floor", + "flush", "fnum", "fputc", "fput", "fraction", + "fseek", "fstat", "ftell", "gerror", "getarg", + "get_command", "get_command_argument", + "get_environment_variable", "getcwd", + "getenv", "getgid", "getlog", "getpid", + "getuid", "gmtime", "hostnm", "huge", "iabs", + "iachar", "iand", "iargc", "ibclr", "ibits", + "ibset", "ichar", "idate", "idim", "idint", + "idnint", "ieor", "ierrno", "ifix", "imag", + "imagpart", "index", "int", "ior", "irand", + "isatty", "ishft", "ishftc", "isign", + "iso_c_binding", "is_iostat_end", "is_iostat_eor", + "itime", "kill", "kind", "lbound", "len", "len_trim", + "lge", "lgt", "link", "lle", "llt", "lnblnk", "loc", + "log", "logical", "long", "lshift", "lstat", "ltime", + "matmul", "max", "maxexponent", "maxloc", "maxval", + "mclock", "merge", "move_alloc", "min", "minexponent", + "minloc", "minval", "mod", "modulo", "mvbits", + "nearest", "new_line", "nint", "not", "or", "pack", + "perror", "precision", "present", "product", "radix", + "rand", "random_number", "random_seed", "range", + "real", "realpart", "rename", "repeat", "reshape", + "rrspacing", "rshift", "same_type_as", "scale", + "scan", "second", "selected_int_kind", + "selected_real_kind", "set_exponent", "shape", + "short", "sign", "signal", "sinh", "sin", "sleep", + "sngl", "spacing", "spread", "sqrt", "srand", "stat", + "sum", "symlnk", "system", "system_clock", "tan", + "tanh", "time", "tiny", "transfer", "transpose", + "trim", "ttynam", "ubound", "umask", "unlink", + "unpack", "verify", "xor", "zabs", "zcos", "zexp", + "zlog", "zsin", "zsqrt"]); + + var dataTypes = words(["c_bool", "c_char", "c_double", "c_double_complex", + "c_float", "c_float_complex", "c_funptr", "c_int", + "c_int16_t", "c_int32_t", "c_int64_t", "c_int8_t", + "c_int_fast16_t", "c_int_fast32_t", "c_int_fast64_t", + "c_int_fast8_t", "c_int_least16_t", "c_int_least32_t", + "c_int_least64_t", "c_int_least8_t", "c_intmax_t", + "c_intptr_t", "c_long", "c_long_double", + "c_long_double_complex", "c_long_long", "c_ptr", + "c_short", "c_signed_char", "c_size_t", "character", + "complex", "double", "integer", "logical", "real"]); + var isOperatorChar = /[+\-*&=<>\/\:]/; + var litOperator = new RegExp("(\.and\.|\.or\.|\.eq\.|\.lt\.|\.le\.|\.gt\.|\.ge\.|\.ne\.|\.not\.|\.eqv\.|\.neqv\.)", "i"); + + function tokenBase(stream, state) { + + if (stream.match(litOperator)){ + return 'operator'; + } + + var ch = stream.next(); + if (ch == "!") { + stream.skipToEnd(); + return "comment"; + } + if (ch == '"' || ch == "'") { + state.tokenize = tokenString(ch); + return state.tokenize(stream, state); + } + if (/[\[\]\(\),]/.test(ch)) { + return null; + } + if (/\d/.test(ch)) { + stream.eatWhile(/[\w\.]/); + return "number"; + } + if (isOperatorChar.test(ch)) { + stream.eatWhile(isOperatorChar); + return "operator"; + } + stream.eatWhile(/[\w\$_]/); + var word = stream.current().toLowerCase(); + + if (keywords.hasOwnProperty(word)){ + return 'keyword'; + } + if (builtins.hasOwnProperty(word) || dataTypes.hasOwnProperty(word)) { + return 'builtin'; + } + return "variable"; + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, next, end = false; + while ((next = stream.next()) != null) { + if (next == quote && !escaped) { + end = true; + break; + } + escaped = !escaped && next == "\\"; + } + if (end || !escaped) state.tokenize = null; + return "string"; + }; + } + + // Interface + + return { + startState: function() { + return {tokenize: null}; + }, + + token: function(stream, state) { + if (stream.eatSpace()) return null; + var style = (state.tokenize || tokenBase)(stream, state); + if (style == "comment" || style == "meta") return style; + return style; + } + }; +}); + +CodeMirror.defineMIME("text/x-fortran", "fortran"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/fortran/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/fortran/index.html new file mode 100644 index 00000000..efa55ec8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/fortran/index.html @@ -0,0 +1,81 @@ + + +CodeMirror: Fortran mode + + + + + + + + + +
+

Fortran mode

+ + +
+ + + +

MIME types defined: text/x-Fortran.

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/gas/gas.js b/pitfall/pdfkit/node_modules/codemirror/mode/gas/gas.js new file mode 100644 index 00000000..a6e68929 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/gas/gas.js @@ -0,0 +1,330 @@ +CodeMirror.defineMode("gas", function(_config, parserConfig) { + 'use strict'; + + // If an architecture is specified, its initialization function may + // populate this array with custom parsing functions which will be + // tried in the event that the standard functions do not find a match. + var custom = []; + + // The symbol used to start a line comment changes based on the target + // architecture. + // If no architecture is pased in "parserConfig" then only multiline + // comments will have syntax support. + var lineCommentStartSymbol = ""; + + // These directives are architecture independent. + // Machine specific directives should go in their respective + // architecture initialization function. + // Reference: + // http://sourceware.org/binutils/docs/as/Pseudo-Ops.html#Pseudo-Ops + var directives = { + ".abort" : "builtin", + ".align" : "builtin", + ".altmacro" : "builtin", + ".ascii" : "builtin", + ".asciz" : "builtin", + ".balign" : "builtin", + ".balignw" : "builtin", + ".balignl" : "builtin", + ".bundle_align_mode" : "builtin", + ".bundle_lock" : "builtin", + ".bundle_unlock" : "builtin", + ".byte" : "builtin", + ".cfi_startproc" : "builtin", + ".comm" : "builtin", + ".data" : "builtin", + ".def" : "builtin", + ".desc" : "builtin", + ".dim" : "builtin", + ".double" : "builtin", + ".eject" : "builtin", + ".else" : "builtin", + ".elseif" : "builtin", + ".end" : "builtin", + ".endef" : "builtin", + ".endfunc" : "builtin", + ".endif" : "builtin", + ".equ" : "builtin", + ".equiv" : "builtin", + ".eqv" : "builtin", + ".err" : "builtin", + ".error" : "builtin", + ".exitm" : "builtin", + ".extern" : "builtin", + ".fail" : "builtin", + ".file" : "builtin", + ".fill" : "builtin", + ".float" : "builtin", + ".func" : "builtin", + ".global" : "builtin", + ".gnu_attribute" : "builtin", + ".hidden" : "builtin", + ".hword" : "builtin", + ".ident" : "builtin", + ".if" : "builtin", + ".incbin" : "builtin", + ".include" : "builtin", + ".int" : "builtin", + ".internal" : "builtin", + ".irp" : "builtin", + ".irpc" : "builtin", + ".lcomm" : "builtin", + ".lflags" : "builtin", + ".line" : "builtin", + ".linkonce" : "builtin", + ".list" : "builtin", + ".ln" : "builtin", + ".loc" : "builtin", + ".loc_mark_labels" : "builtin", + ".local" : "builtin", + ".long" : "builtin", + ".macro" : "builtin", + ".mri" : "builtin", + ".noaltmacro" : "builtin", + ".nolist" : "builtin", + ".octa" : "builtin", + ".offset" : "builtin", + ".org" : "builtin", + ".p2align" : "builtin", + ".popsection" : "builtin", + ".previous" : "builtin", + ".print" : "builtin", + ".protected" : "builtin", + ".psize" : "builtin", + ".purgem" : "builtin", + ".pushsection" : "builtin", + ".quad" : "builtin", + ".reloc" : "builtin", + ".rept" : "builtin", + ".sbttl" : "builtin", + ".scl" : "builtin", + ".section" : "builtin", + ".set" : "builtin", + ".short" : "builtin", + ".single" : "builtin", + ".size" : "builtin", + ".skip" : "builtin", + ".sleb128" : "builtin", + ".space" : "builtin", + ".stab" : "builtin", + ".string" : "builtin", + ".struct" : "builtin", + ".subsection" : "builtin", + ".symver" : "builtin", + ".tag" : "builtin", + ".text" : "builtin", + ".title" : "builtin", + ".type" : "builtin", + ".uleb128" : "builtin", + ".val" : "builtin", + ".version" : "builtin", + ".vtable_entry" : "builtin", + ".vtable_inherit" : "builtin", + ".warning" : "builtin", + ".weak" : "builtin", + ".weakref" : "builtin", + ".word" : "builtin" + }; + + var registers = {}; + + function x86(_parserConfig) { + lineCommentStartSymbol = "#"; + + registers.ax = "variable"; + registers.eax = "variable-2"; + registers.rax = "variable-3"; + + registers.bx = "variable"; + registers.ebx = "variable-2"; + registers.rbx = "variable-3"; + + registers.cx = "variable"; + registers.ecx = "variable-2"; + registers.rcx = "variable-3"; + + registers.dx = "variable"; + registers.edx = "variable-2"; + registers.rdx = "variable-3"; + + registers.si = "variable"; + registers.esi = "variable-2"; + registers.rsi = "variable-3"; + + registers.di = "variable"; + registers.edi = "variable-2"; + registers.rdi = "variable-3"; + + registers.sp = "variable"; + registers.esp = "variable-2"; + registers.rsp = "variable-3"; + + registers.bp = "variable"; + registers.ebp = "variable-2"; + registers.rbp = "variable-3"; + + registers.ip = "variable"; + registers.eip = "variable-2"; + registers.rip = "variable-3"; + + registers.cs = "keyword"; + registers.ds = "keyword"; + registers.ss = "keyword"; + registers.es = "keyword"; + registers.fs = "keyword"; + registers.gs = "keyword"; + } + + function armv6(_parserConfig) { + // Reference: + // http://infocenter.arm.com/help/topic/com.arm.doc.qrc0001l/QRC0001_UAL.pdf + // http://infocenter.arm.com/help/topic/com.arm.doc.ddi0301h/DDI0301H_arm1176jzfs_r0p7_trm.pdf + lineCommentStartSymbol = "@"; + directives.syntax = "builtin"; + + registers.r0 = "variable"; + registers.r1 = "variable"; + registers.r2 = "variable"; + registers.r3 = "variable"; + registers.r4 = "variable"; + registers.r5 = "variable"; + registers.r6 = "variable"; + registers.r7 = "variable"; + registers.r8 = "variable"; + registers.r9 = "variable"; + registers.r10 = "variable"; + registers.r11 = "variable"; + registers.r12 = "variable"; + + registers.sp = "variable-2"; + registers.lr = "variable-2"; + registers.pc = "variable-2"; + registers.r13 = registers.sp; + registers.r14 = registers.lr; + registers.r15 = registers.pc; + + custom.push(function(ch, stream) { + if (ch === '#') { + stream.eatWhile(/\w/); + return "number"; + } + }); + } + + var arch = parserConfig.architecture.toLowerCase(); + if (arch === "x86") { + x86(parserConfig); + } else if (arch === "arm" || arch === "armv6") { + armv6(parserConfig); + } + + function nextUntilUnescaped(stream, end) { + var escaped = false, next; + while ((next = stream.next()) != null) { + if (next === end && !escaped) { + return false; + } + escaped = !escaped && next === "\\"; + } + return escaped; + } + + function clikeComment(stream, state) { + var maybeEnd = false, ch; + while ((ch = stream.next()) != null) { + if (ch === "/" && maybeEnd) { + state.tokenize = null; + break; + } + maybeEnd = (ch === "*"); + } + return "comment"; + } + + return { + startState: function() { + return { + tokenize: null + }; + }, + + token: function(stream, state) { + if (state.tokenize) { + return state.tokenize(stream, state); + } + + if (stream.eatSpace()) { + return null; + } + + var style, cur, ch = stream.next(); + + if (ch === "/") { + if (stream.eat("*")) { + state.tokenize = clikeComment; + return clikeComment(stream, state); + } + } + + if (ch === lineCommentStartSymbol) { + stream.skipToEnd(); + return "comment"; + } + + if (ch === '"') { + nextUntilUnescaped(stream, '"'); + return "string"; + } + + if (ch === '.') { + stream.eatWhile(/\w/); + cur = stream.current().toLowerCase(); + style = directives[cur]; + return style || null; + } + + if (ch === '=') { + stream.eatWhile(/\w/); + return "tag"; + } + + if (ch === '{') { + return "braket"; + } + + if (ch === '}') { + return "braket"; + } + + if (/\d/.test(ch)) { + if (ch === "0" && stream.eat("x")) { + stream.eatWhile(/[0-9a-fA-F]/); + return "number"; + } + stream.eatWhile(/\d/); + return "number"; + } + + if (/\w/.test(ch)) { + stream.eatWhile(/\w/); + if (stream.eat(":")) { + return 'tag'; + } + cur = stream.current().toLowerCase(); + style = registers[cur]; + return style || null; + } + + for (var i = 0; i < custom.length; i++) { + style = custom[i](ch, stream, state); + if (style) { + return style; + } + } + }, + + lineComment: lineCommentStartSymbol, + blockCommentStart: "/*", + blockCommentEnd: "*/" + }; +}); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/gas/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/gas/index.html new file mode 100644 index 00000000..cd8a2ff5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/gas/index.html @@ -0,0 +1,68 @@ + + +CodeMirror: Gas mode + + + + + + + + + +
+

Gas mode

+
+ +
+ + + +

Handles AT&T assembler syntax (more specifically this handles + the GNU Assembler (gas) syntax.) + It takes a single optional configuration parameter: + architecture, which can be one of "ARM", + "ARMv6" or "x86". + Including the parameter adds syntax for the registers and special + directives for the supplied architecture. + +

MIME types defined: text/x-gas

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/gfm/gfm.js b/pitfall/pdfkit/node_modules/codemirror/mode/gfm/gfm.js new file mode 100644 index 00000000..1411a938 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/gfm/gfm.js @@ -0,0 +1,97 @@ +CodeMirror.defineMode("gfm", function(config) { + var codeDepth = 0; + function blankLine(state) { + state.code = false; + return null; + } + var gfmOverlay = { + startState: function() { + return { + code: false, + codeBlock: false, + ateSpace: false + }; + }, + copyState: function(s) { + return { + code: s.code, + codeBlock: s.codeBlock, + ateSpace: s.ateSpace + }; + }, + token: function(stream, state) { + // Hack to prevent formatting override inside code blocks (block and inline) + if (state.codeBlock) { + if (stream.match(/^```/)) { + state.codeBlock = false; + return null; + } + stream.skipToEnd(); + return null; + } + if (stream.sol()) { + state.code = false; + } + if (stream.sol() && stream.match(/^```/)) { + stream.skipToEnd(); + state.codeBlock = true; + return null; + } + // If this block is changed, it may need to be updated in Markdown mode + if (stream.peek() === '`') { + stream.next(); + var before = stream.pos; + stream.eatWhile('`'); + var difference = 1 + stream.pos - before; + if (!state.code) { + codeDepth = difference; + state.code = true; + } else { + if (difference === codeDepth) { // Must be exact + state.code = false; + } + } + return null; + } else if (state.code) { + stream.next(); + return null; + } + // Check if space. If so, links can be formatted later on + if (stream.eatSpace()) { + state.ateSpace = true; + return null; + } + if (stream.sol() || state.ateSpace) { + state.ateSpace = false; + if(stream.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+@)?(?:[a-f0-9]{7,40}\b)/)) { + // User/Project@SHA + // User@SHA + // SHA + return "link"; + } else if (stream.match(/^(?:[a-zA-Z0-9\-_]+\/)?(?:[a-zA-Z0-9\-_]+)?#[0-9]+\b/)) { + // User/Project#Num + // User#Num + // #Num + return "link"; + } + } + if (stream.match(/^((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\([^\s()<>]*\))+(?:\([^\s()<>]*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/i) && + stream.string.slice(stream.start - 2, stream.start) != "](") { + // URLs + // Taken from http://daringfireball.net/2010/07/improved_regex_for_matching_urls + // And then (issue #1160) simplified to make it not crash the Chrome Regexp engine + return "link"; + } + stream.next(); + return null; + }, + blankLine: blankLine + }; + CodeMirror.defineMIME("gfmBase", { + name: "markdown", + underscoresBreakWords: false, + taskLists: true, + fencedCodeBlocks: true + }); + return CodeMirror.overlayMode(CodeMirror.getMode(config, "gfmBase"), gfmOverlay); +}, "markdown"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/gfm/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/gfm/index.html new file mode 100644 index 00000000..b71cd5c7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/gfm/index.html @@ -0,0 +1,82 @@ + + +CodeMirror: GFM mode + + + + + + + + + + + + + + + + +
+

GFM mode

+
+ + + +

Optionally depends on other modes for properly highlighted code blocks.

+ +

Parsing/Highlighting Tests: normal, verbose.

+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/gfm/test.js b/pitfall/pdfkit/node_modules/codemirror/mode/gfm/test.js new file mode 100644 index 00000000..3ccaec50 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/gfm/test.js @@ -0,0 +1,112 @@ +(function() { + var mode = CodeMirror.getMode({tabSize: 4}, "gfm"); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } + + MT("emInWordAsterisk", + "foo[em *bar*]hello"); + + MT("emInWordUnderscore", + "foo_bar_hello"); + + MT("emStrongUnderscore", + "[strong __][em&strong _foo__][em _] bar"); + + MT("fencedCodeBlocks", + "[comment ```]", + "[comment foo]", + "", + "[comment ```]", + "bar"); + + MT("fencedCodeBlockModeSwitching", + "[comment ```javascript]", + "[variable foo]", + "", + "[comment ```]", + "bar"); + + MT("taskListAsterisk", + "[variable-2 * []] foo]", // Invalid; must have space or x between [] + "[variable-2 * [ ]]bar]", // Invalid; must have space after ] + "[variable-2 * [x]]hello]", // Invalid; must have space after ] + "[variable-2 * ][meta [ ]]][variable-2 [world]]]", // Valid; tests reference style links + " [variable-3 * ][property [x]]][variable-3 foo]"); // Valid; can be nested + + MT("taskListPlus", + "[variable-2 + []] foo]", // Invalid; must have space or x between [] + "[variable-2 + [ ]]bar]", // Invalid; must have space after ] + "[variable-2 + [x]]hello]", // Invalid; must have space after ] + "[variable-2 + ][meta [ ]]][variable-2 [world]]]", // Valid; tests reference style links + " [variable-3 + ][property [x]]][variable-3 foo]"); // Valid; can be nested + + MT("taskListDash", + "[variable-2 - []] foo]", // Invalid; must have space or x between [] + "[variable-2 - [ ]]bar]", // Invalid; must have space after ] + "[variable-2 - [x]]hello]", // Invalid; must have space after ] + "[variable-2 - ][meta [ ]]][variable-2 [world]]]", // Valid; tests reference style links + " [variable-3 - ][property [x]]][variable-3 foo]"); // Valid; can be nested + + MT("taskListNumber", + "[variable-2 1. []] foo]", // Invalid; must have space or x between [] + "[variable-2 2. [ ]]bar]", // Invalid; must have space after ] + "[variable-2 3. [x]]hello]", // Invalid; must have space after ] + "[variable-2 4. ][meta [ ]]][variable-2 [world]]]", // Valid; tests reference style links + " [variable-3 1. ][property [x]]][variable-3 foo]"); // Valid; can be nested + + MT("SHA", + "foo [link be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2] bar"); + + MT("shortSHA", + "foo [link be6a8cc] bar"); + + MT("tooShortSHA", + "foo be6a8c bar"); + + MT("longSHA", + "foo be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd22 bar"); + + MT("badSHA", + "foo be6a8cc1c1ecfe9489fb51e4869af15a13fc2cg2 bar"); + + MT("userSHA", + "foo [link bar@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2] hello"); + + MT("userProjectSHA", + "foo [link bar/hello@be6a8cc1c1ecfe9489fb51e4869af15a13fc2cd2] world"); + + MT("num", + "foo [link #1] bar"); + + MT("badNum", + "foo #1bar hello"); + + MT("userNum", + "foo [link bar#1] hello"); + + MT("userProjectNum", + "foo [link bar/hello#1] world"); + + MT("vanillaLink", + "foo [link http://www.example.com/] bar"); + + MT("vanillaLinkPunctuation", + "foo [link http://www.example.com/]. bar"); + + MT("vanillaLinkExtension", + "foo [link http://www.example.com/index.html] bar"); + + MT("notALink", + "[comment ```css]", + "[tag foo] {[property color][operator :][keyword black];}", + "[comment ```][link http://www.example.com/]"); + + MT("notALink", + "[comment ``foo `bar` http://www.example.com/``] hello"); + + MT("notALink", + "[comment `foo]", + "[link http://www.example.com/]", + "[comment `foo]", + "", + "[link http://www.example.com/]"); +})(); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/gherkin/gherkin.js b/pitfall/pdfkit/node_modules/codemirror/mode/gherkin/gherkin.js new file mode 100644 index 00000000..dadb5836 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/gherkin/gherkin.js @@ -0,0 +1,168 @@ +/* +Gherkin mode - http://www.cukes.info/ +Report bugs/issues here: https://github.com/marijnh/CodeMirror/issues +*/ + +// Following Objs from Brackets implementation: https://github.com/tregusti/brackets-gherkin/blob/master/main.js +//var Quotes = { +// SINGLE: 1, +// DOUBLE: 2 +//}; + +//var regex = { +// keywords: /(Feature| {2}(Scenario|In order to|As|I)| {4}(Given|When|Then|And))/ +//}; + +CodeMirror.defineMode("gherkin", function () { + return { + startState: function () { + return { + lineNumber: 0, + tableHeaderLine: null, + allowFeature: true, + allowBackground: false, + allowScenario: false, + allowSteps: false, + allowPlaceholders: false, + inMultilineArgument: false, + inMultilineString: false, + inMultilineTable: false + }; + }, + token: function (stream, state) { + if (stream.sol()) { + state.lineNumber++; + } + stream.eatSpace(); + + // INSIDE OF MULTILINE ARGUMENTS + if (state.inMultilineArgument) { + + // STRING + if (state.inMultilineString) { + if (stream.match('"""')) { + state.inMultilineString = false; + state.inMultilineArgument = false; + } else { + stream.match(/.*/); + } + return "string"; + } + + // TABLE + if (state.inMultilineTable) { + // New table, assume first row is headers + if (state.tableHeaderLine === null) { + state.tableHeaderLine = state.lineNumber; + } + + if (stream.match(/\|\s*/)) { + if (stream.eol()) { + state.inMultilineTable = false; + } + return "bracket"; + } else { + stream.match(/[^\|]*/); + return state.tableHeaderLine === state.lineNumber ? "property" : "string"; + } + } + + // DETECT START + if (stream.match('"""')) { + // String + state.inMultilineString = true; + return "string"; + } else if (stream.match("|")) { + // Table + state.inMultilineTable = true; + return "bracket"; + } else { + // Or abort + state.inMultilineArgument = false; + state.tableHeaderLine = null; + } + + + return null; + } + + // LINE COMMENT + if (stream.match(/#.*/)) { + return "comment"; + + // TAG + } else if (stream.match(/@\S+/)) { + return "def"; + + // FEATURE + } else if (state.allowFeature && stream.match(/Feature:/)) { + state.allowScenario = true; + state.allowBackground = true; + state.allowPlaceholders = false; + state.allowSteps = false; + return "keyword"; + + // BACKGROUND + } else if (state.allowBackground && stream.match("Background:")) { + state.allowPlaceholders = false; + state.allowSteps = true; + state.allowBackground = false; + return "keyword"; + + // SCENARIO OUTLINE + } else if (state.allowScenario && stream.match("Scenario Outline:")) { + state.allowPlaceholders = true; + state.allowSteps = true; + return "keyword"; + + // EXAMPLES + } else if (state.allowScenario && stream.match("Examples:")) { + state.allowPlaceholders = false; + state.allowSteps = true; + state.allowBackground = false; + state.inMultilineArgument = true; + return "keyword"; + + // SCENARIO + } else if (state.allowScenario && stream.match(/Scenario:/)) { + state.allowPlaceholders = false; + state.allowSteps = true; + state.allowBackground = false; + return "keyword"; + + // STEPS + } else if (state.allowSteps && stream.match(/(Given|When|Then|And|But)/)) { + return "keyword"; + + // INLINE STRING + } else if (!state.inMultilineArgument && stream.match(/"/)) { + stream.match(/.*?"/); + return "string"; + + // MULTILINE ARGUMENTS + } else if (state.allowSteps && stream.eat(":")) { + if (stream.match(/\s*$/)) { + state.inMultilineArgument = true; + return "keyword"; + } else { + return null; + } + + } else if (state.allowSteps && stream.match("<")) { + if (stream.match(/.*?>/)) { + return "property"; + } else { + return null; + } + + // Fall through + } else { + stream.eatWhile(/[^":<]/); + } + + return null; + } + }; +}); + +CodeMirror.defineMIME("text/x-feature", "gherkin"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/gherkin/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/gherkin/index.html new file mode 100644 index 00000000..b76877ac --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/gherkin/index.html @@ -0,0 +1,48 @@ + + +CodeMirror: Gherkin mode + + + + + + + + + +
+

Gherkin mode

+
+ + +

MIME types defined: text/x-feature.

+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/go/go.js b/pitfall/pdfkit/node_modules/codemirror/mode/go/go.js new file mode 100644 index 00000000..862c0911 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/go/go.js @@ -0,0 +1,168 @@ +CodeMirror.defineMode("go", function(config) { + var indentUnit = config.indentUnit; + + var keywords = { + "break":true, "case":true, "chan":true, "const":true, "continue":true, + "default":true, "defer":true, "else":true, "fallthrough":true, "for":true, + "func":true, "go":true, "goto":true, "if":true, "import":true, + "interface":true, "map":true, "package":true, "range":true, "return":true, + "select":true, "struct":true, "switch":true, "type":true, "var":true, + "bool":true, "byte":true, "complex64":true, "complex128":true, + "float32":true, "float64":true, "int8":true, "int16":true, "int32":true, + "int64":true, "string":true, "uint8":true, "uint16":true, "uint32":true, + "uint64":true, "int":true, "uint":true, "uintptr":true + }; + + var atoms = { + "true":true, "false":true, "iota":true, "nil":true, "append":true, + "cap":true, "close":true, "complex":true, "copy":true, "imag":true, + "len":true, "make":true, "new":true, "panic":true, "print":true, + "println":true, "real":true, "recover":true + }; + + var isOperatorChar = /[+\-*&^%:=<>!|\/]/; + + var curPunc; + + function tokenBase(stream, state) { + var ch = stream.next(); + if (ch == '"' || ch == "'" || ch == "`") { + state.tokenize = tokenString(ch); + return state.tokenize(stream, state); + } + if (/[\d\.]/.test(ch)) { + if (ch == ".") { + stream.match(/^[0-9]+([eE][\-+]?[0-9]+)?/); + } else if (ch == "0") { + stream.match(/^[xX][0-9a-fA-F]+/) || stream.match(/^0[0-7]+/); + } else { + stream.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/); + } + return "number"; + } + if (/[\[\]{}\(\),;\:\.]/.test(ch)) { + curPunc = ch; + return null; + } + if (ch == "/") { + if (stream.eat("*")) { + state.tokenize = tokenComment; + return tokenComment(stream, state); + } + if (stream.eat("/")) { + stream.skipToEnd(); + return "comment"; + } + } + if (isOperatorChar.test(ch)) { + stream.eatWhile(isOperatorChar); + return "operator"; + } + stream.eatWhile(/[\w\$_]/); + var cur = stream.current(); + if (keywords.propertyIsEnumerable(cur)) { + if (cur == "case" || cur == "default") curPunc = "case"; + return "keyword"; + } + if (atoms.propertyIsEnumerable(cur)) return "atom"; + return "variable"; + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, next, end = false; + while ((next = stream.next()) != null) { + if (next == quote && !escaped) {end = true; break;} + escaped = !escaped && next == "\\"; + } + if (end || !(escaped || quote == "`")) + state.tokenize = tokenBase; + return "string"; + }; + } + + function tokenComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (ch == "/" && maybeEnd) { + state.tokenize = tokenBase; + break; + } + maybeEnd = (ch == "*"); + } + return "comment"; + } + + function Context(indented, column, type, align, prev) { + this.indented = indented; + this.column = column; + this.type = type; + this.align = align; + this.prev = prev; + } + function pushContext(state, col, type) { + return state.context = new Context(state.indented, col, type, null, state.context); + } + function popContext(state) { + var t = state.context.type; + if (t == ")" || t == "]" || t == "}") + state.indented = state.context.indented; + return state.context = state.context.prev; + } + + // Interface + + return { + startState: function(basecolumn) { + return { + tokenize: null, + context: new Context((basecolumn || 0) - indentUnit, 0, "top", false), + indented: 0, + startOfLine: true + }; + }, + + token: function(stream, state) { + var ctx = state.context; + if (stream.sol()) { + if (ctx.align == null) ctx.align = false; + state.indented = stream.indentation(); + state.startOfLine = true; + if (ctx.type == "case") ctx.type = "}"; + } + if (stream.eatSpace()) return null; + curPunc = null; + var style = (state.tokenize || tokenBase)(stream, state); + if (style == "comment") return style; + if (ctx.align == null) ctx.align = true; + + if (curPunc == "{") pushContext(state, stream.column(), "}"); + else if (curPunc == "[") pushContext(state, stream.column(), "]"); + else if (curPunc == "(") pushContext(state, stream.column(), ")"); + else if (curPunc == "case") ctx.type = "case"; + else if (curPunc == "}" && ctx.type == "}") ctx = popContext(state); + else if (curPunc == ctx.type) popContext(state); + state.startOfLine = false; + return style; + }, + + indent: function(state, textAfter) { + if (state.tokenize != tokenBase && state.tokenize != null) return 0; + var ctx = state.context, firstChar = textAfter && textAfter.charAt(0); + if (ctx.type == "case" && /^(?:case|default)\b/.test(textAfter)) { + state.context.type = "}"; + return ctx.indented; + } + var closing = firstChar == ctx.type; + if (ctx.align) return ctx.column + (closing ? 0 : 1); + else return ctx.indented + (closing ? 0 : indentUnit); + }, + + electricChars: "{}):", + blockCommentStart: "/*", + blockCommentEnd: "*/", + lineComment: "//" + }; +}); + +CodeMirror.defineMIME("text/x-go", "go"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/go/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/go/index.html new file mode 100644 index 00000000..3673fa0b --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/go/index.html @@ -0,0 +1,85 @@ + + +CodeMirror: Go mode + + + + + + + + + + + +
+

Go mode

+
+ + + +

MIME type: text/x-go

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/groovy/groovy.js b/pitfall/pdfkit/node_modules/codemirror/mode/groovy/groovy.js new file mode 100644 index 00000000..6800e0aa --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/groovy/groovy.js @@ -0,0 +1,211 @@ +CodeMirror.defineMode("groovy", function(config) { + function words(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + var keywords = words( + "abstract as assert boolean break byte case catch char class const continue def default " + + "do double else enum extends final finally float for goto if implements import in " + + "instanceof int interface long native new package private protected public return " + + "short static strictfp super switch synchronized threadsafe throw throws transient " + + "try void volatile while"); + var blockKeywords = words("catch class do else finally for if switch try while enum interface def"); + var atoms = words("null true false this"); + + var curPunc; + function tokenBase(stream, state) { + var ch = stream.next(); + if (ch == '"' || ch == "'") { + return startString(ch, stream, state); + } + if (/[\[\]{}\(\),;\:\.]/.test(ch)) { + curPunc = ch; + return null; + } + if (/\d/.test(ch)) { + stream.eatWhile(/[\w\.]/); + if (stream.eat(/eE/)) { stream.eat(/\+\-/); stream.eatWhile(/\d/); } + return "number"; + } + if (ch == "/") { + if (stream.eat("*")) { + state.tokenize.push(tokenComment); + return tokenComment(stream, state); + } + if (stream.eat("/")) { + stream.skipToEnd(); + return "comment"; + } + if (expectExpression(state.lastToken)) { + return startString(ch, stream, state); + } + } + if (ch == "-" && stream.eat(">")) { + curPunc = "->"; + return null; + } + if (/[+\-*&%=<>!?|\/~]/.test(ch)) { + stream.eatWhile(/[+\-*&%=<>|~]/); + return "operator"; + } + stream.eatWhile(/[\w\$_]/); + if (ch == "@") { stream.eatWhile(/[\w\$_\.]/); return "meta"; } + if (state.lastToken == ".") return "property"; + if (stream.eat(":")) { curPunc = "proplabel"; return "property"; } + var cur = stream.current(); + if (atoms.propertyIsEnumerable(cur)) { return "atom"; } + if (keywords.propertyIsEnumerable(cur)) { + if (blockKeywords.propertyIsEnumerable(cur)) curPunc = "newstatement"; + return "keyword"; + } + return "variable"; + } + tokenBase.isBase = true; + + function startString(quote, stream, state) { + var tripleQuoted = false; + if (quote != "/" && stream.eat(quote)) { + if (stream.eat(quote)) tripleQuoted = true; + else return "string"; + } + function t(stream, state) { + var escaped = false, next, end = !tripleQuoted; + while ((next = stream.next()) != null) { + if (next == quote && !escaped) { + if (!tripleQuoted) { break; } + if (stream.match(quote + quote)) { end = true; break; } + } + if (quote == '"' && next == "$" && !escaped && stream.eat("{")) { + state.tokenize.push(tokenBaseUntilBrace()); + return "string"; + } + escaped = !escaped && next == "\\"; + } + if (end) state.tokenize.pop(); + return "string"; + } + state.tokenize.push(t); + return t(stream, state); + } + + function tokenBaseUntilBrace() { + var depth = 1; + function t(stream, state) { + if (stream.peek() == "}") { + depth--; + if (depth == 0) { + state.tokenize.pop(); + return state.tokenize[state.tokenize.length-1](stream, state); + } + } else if (stream.peek() == "{") { + depth++; + } + return tokenBase(stream, state); + } + t.isBase = true; + return t; + } + + function tokenComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (ch == "/" && maybeEnd) { + state.tokenize.pop(); + break; + } + maybeEnd = (ch == "*"); + } + return "comment"; + } + + function expectExpression(last) { + return !last || last == "operator" || last == "->" || /[\.\[\{\(,;:]/.test(last) || + last == "newstatement" || last == "keyword" || last == "proplabel"; + } + + function Context(indented, column, type, align, prev) { + this.indented = indented; + this.column = column; + this.type = type; + this.align = align; + this.prev = prev; + } + function pushContext(state, col, type) { + return state.context = new Context(state.indented, col, type, null, state.context); + } + function popContext(state) { + var t = state.context.type; + if (t == ")" || t == "]" || t == "}") + state.indented = state.context.indented; + return state.context = state.context.prev; + } + + // Interface + + return { + startState: function(basecolumn) { + return { + tokenize: [tokenBase], + context: new Context((basecolumn || 0) - config.indentUnit, 0, "top", false), + indented: 0, + startOfLine: true, + lastToken: null + }; + }, + + token: function(stream, state) { + var ctx = state.context; + if (stream.sol()) { + if (ctx.align == null) ctx.align = false; + state.indented = stream.indentation(); + state.startOfLine = true; + // Automatic semicolon insertion + if (ctx.type == "statement" && !expectExpression(state.lastToken)) { + popContext(state); ctx = state.context; + } + } + if (stream.eatSpace()) return null; + curPunc = null; + var style = state.tokenize[state.tokenize.length-1](stream, state); + if (style == "comment") return style; + if (ctx.align == null) ctx.align = true; + + if ((curPunc == ";" || curPunc == ":") && ctx.type == "statement") popContext(state); + // Handle indentation for {x -> \n ... } + else if (curPunc == "->" && ctx.type == "statement" && ctx.prev.type == "}") { + popContext(state); + state.context.align = false; + } + else if (curPunc == "{") pushContext(state, stream.column(), "}"); + else if (curPunc == "[") pushContext(state, stream.column(), "]"); + else if (curPunc == "(") pushContext(state, stream.column(), ")"); + else if (curPunc == "}") { + while (ctx.type == "statement") ctx = popContext(state); + if (ctx.type == "}") ctx = popContext(state); + while (ctx.type == "statement") ctx = popContext(state); + } + else if (curPunc == ctx.type) popContext(state); + else if (ctx.type == "}" || ctx.type == "top" || (ctx.type == "statement" && curPunc == "newstatement")) + pushContext(state, stream.column(), "statement"); + state.startOfLine = false; + state.lastToken = curPunc || style; + return style; + }, + + indent: function(state, textAfter) { + if (!state.tokenize[state.tokenize.length-1].isBase) return 0; + var firstChar = textAfter && textAfter.charAt(0), ctx = state.context; + if (ctx.type == "statement" && !expectExpression(state.lastToken)) ctx = ctx.prev; + var closing = firstChar == ctx.type; + if (ctx.type == "statement") return ctx.indented + (firstChar == "{" ? 0 : config.indentUnit); + else if (ctx.align) return ctx.column + (closing ? 0 : 1); + else return ctx.indented + (closing ? 0 : config.indentUnit); + }, + + electricChars: "{}", + fold: "brace" + }; +}); + +CodeMirror.defineMIME("text/x-groovy", "groovy"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/groovy/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/groovy/index.html new file mode 100644 index 00000000..f5efdf75 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/groovy/index.html @@ -0,0 +1,84 @@ + + +CodeMirror: Groovy mode + + + + + + + + + + +
+

Groovy mode

+
+ + + +

MIME types defined: text/x-groovy

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/haml/haml.js b/pitfall/pdfkit/node_modules/codemirror/mode/haml/haml.js new file mode 100644 index 00000000..793308f6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/haml/haml.js @@ -0,0 +1,153 @@ +(function() { + "use strict"; + + // full haml mode. This handled embeded ruby and html fragments too + CodeMirror.defineMode("haml", function(config) { + var htmlMode = CodeMirror.getMode(config, {name: "htmlmixed"}); + var rubyMode = CodeMirror.getMode(config, "ruby"); + + function rubyInQuote(endQuote) { + return function(stream, state) { + var ch = stream.peek(); + if (ch == endQuote && state.rubyState.tokenize.length == 1) { + // step out of ruby context as it seems to complete processing all the braces + stream.next(); + state.tokenize = html; + return "closeAttributeTag"; + } else { + return ruby(stream, state); + } + }; + } + + function ruby(stream, state) { + if (stream.match("-#")) { + stream.skipToEnd(); + return "comment"; + } + return rubyMode.token(stream, state.rubyState); + } + + function html(stream, state) { + var ch = stream.peek(); + + // handle haml declarations. All declarations that cant be handled here + // will be passed to html mode + if (state.previousToken.style == "comment" ) { + if (state.indented > state.previousToken.indented) { + stream.skipToEnd(); + return "commentLine"; + } + } + + if (state.startOfLine) { + if (ch == "!" && stream.match("!!")) { + stream.skipToEnd(); + return "tag"; + } else if (stream.match(/^%[\w:#\.]+=/)) { + state.tokenize = ruby; + return "hamlTag"; + } else if (stream.match(/^%[\w:]+/)) { + return "hamlTag"; + } else if (ch == "/" ) { + stream.skipToEnd(); + return "comment"; + } + } + + if (state.startOfLine || state.previousToken.style == "hamlTag") { + if ( ch == "#" || ch == ".") { + stream.match(/[\w-#\.]*/); + return "hamlAttribute"; + } + } + + // donot handle --> as valid ruby, make it HTML close comment instead + if (state.startOfLine && !stream.match("-->", false) && (ch == "=" || ch == "-" )) { + state.tokenize = ruby; + return null; + } + + if (state.previousToken.style == "hamlTag" || + state.previousToken.style == "closeAttributeTag" || + state.previousToken.style == "hamlAttribute") { + if (ch == "(") { + state.tokenize = rubyInQuote(")"); + return null; + } else if (ch == "{") { + state.tokenize = rubyInQuote("}"); + return null; + } + } + + return htmlMode.token(stream, state.htmlState); + } + + return { + // default to html mode + startState: function() { + var htmlState = htmlMode.startState(); + var rubyState = rubyMode.startState(); + return { + htmlState: htmlState, + rubyState: rubyState, + indented: 0, + previousToken: { style: null, indented: 0}, + tokenize: html + }; + }, + + copyState: function(state) { + return { + htmlState : CodeMirror.copyState(htmlMode, state.htmlState), + rubyState: CodeMirror.copyState(rubyMode, state.rubyState), + indented: state.indented, + previousToken: state.previousToken, + tokenize: state.tokenize + }; + }, + + token: function(stream, state) { + if (stream.sol()) { + state.indented = stream.indentation(); + state.startOfLine = true; + } + if (stream.eatSpace()) return null; + var style = state.tokenize(stream, state); + state.startOfLine = false; + // dont record comment line as we only want to measure comment line with + // the opening comment block + if (style && style != "commentLine") { + state.previousToken = { style: style, indented: state.indented }; + } + // if current state is ruby and the previous token is not `,` reset the + // tokenize to html + if (stream.eol() && state.tokenize == ruby) { + stream.backUp(1); + var ch = stream.peek(); + stream.next(); + if (ch && ch != ",") { + state.tokenize = html; + } + } + // reprocess some of the specific style tag when finish setting previousToken + if (style == "hamlTag") { + style = "tag"; + } else if (style == "commentLine") { + style = "comment"; + } else if (style == "hamlAttribute") { + style = "attribute"; + } else if (style == "closeAttributeTag") { + style = null; + } + return style; + }, + + indent: function(state) { + return state.indented; + } + }; + }, "htmlmixed", "ruby"); + + CodeMirror.defineMIME("text/x-haml", "haml"); +})(); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/haml/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/haml/index.html new file mode 100644 index 00000000..a7378755 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/haml/index.html @@ -0,0 +1,79 @@ + + +CodeMirror: HAML mode + + + + + + + + + + + + + +
+

HAML mode

+
+ + +

MIME types defined: text/x-haml.

+ +

Parsing/Highlighting Tests: normal, verbose.

+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/haml/test.js b/pitfall/pdfkit/node_modules/codemirror/mode/haml/test.js new file mode 100644 index 00000000..b7178d40 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/haml/test.js @@ -0,0 +1,94 @@ +(function() { + var mode = CodeMirror.getMode({tabSize: 4}, "haml"); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } + + // Requires at least one media query + MT("elementName", + "[tag %h1] Hey There"); + + MT("oneElementPerLine", + "[tag %h1] Hey There %h2"); + + MT("idSelector", + "[tag %h1][attribute #test] Hey There"); + + MT("classSelector", + "[tag %h1][attribute .hello] Hey There"); + + MT("docType", + "[tag !!! XML]"); + + MT("comment", + "[comment / Hello WORLD]"); + + MT("notComment", + "[tag %h1] This is not a / comment "); + + MT("attributes", + "[tag %a]([variable title][operator =][string \"test\"]){[atom :title] [operator =>] [string \"test\"]}"); + + MT("htmlCode", + "[tag

]Title[tag

]"); + + MT("rubyBlock", + "[operator =][variable-2 @item]"); + + MT("selectorRubyBlock", + "[tag %a.selector=] [variable-2 @item]"); + + MT("nestedRubyBlock", + "[tag %a]", + " [operator =][variable puts] [string \"test\"]"); + + MT("multilinePlaintext", + "[tag %p]", + " Hello,", + " World"); + + MT("multilineRuby", + "[tag %p]", + " [comment -# this is a comment]", + " [comment and this is a comment too]", + " Date/Time", + " [operator -] [variable now] [operator =] [tag DateTime][operator .][variable now]", + " [tag %strong=] [variable now]", + " [operator -] [keyword if] [variable now] [operator >] [tag DateTime][operator .][variable parse]([string \"December 31, 2006\"])", + " [operator =][string \"Happy\"]", + " [operator =][string \"Belated\"]", + " [operator =][string \"Birthday\"]"); + + MT("multilineComment", + "[comment /]", + " [comment Multiline]", + " [comment Comment]"); + + MT("hamlComment", + "[comment -# this is a comment]"); + + MT("multilineHamlComment", + "[comment -# this is a comment]", + " [comment and this is a comment too]"); + + MT("multilineHTMLComment", + "[comment ]"); + + MT("hamlAfterRubyTag", + "[attribute .block]", + " [tag %strong=] [variable now]", + " [attribute .test]", + " [operator =][variable now]", + " [attribute .right]"); + + MT("stretchedRuby", + "[operator =] [variable puts] [string \"Hello\"],", + " [string \"World\"]"); + + MT("interpolationInHashAttribute", + //"[tag %div]{[atom :id] [operator =>] [string \"#{][variable test][string }_#{][variable ting][string }\"]} test"); + "[tag %div]{[atom :id] [operator =>] [string \"#{][variable test][string }_#{][variable ting][string }\"]} test"); + + MT("interpolationInHTMLAttribute", + "[tag %div]([variable title][operator =][string \"#{][variable test][string }_#{][variable ting]()[string }\"]) Test"); +})(); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/haskell/haskell.js b/pitfall/pdfkit/node_modules/codemirror/mode/haskell/haskell.js new file mode 100644 index 00000000..68a6317e --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/haskell/haskell.js @@ -0,0 +1,250 @@ +CodeMirror.defineMode("haskell", function(_config, modeConfig) { + + function switchState(source, setState, f) { + setState(f); + return f(source, setState); + } + + // These should all be Unicode extended, as per the Haskell 2010 report + var smallRE = /[a-z_]/; + var largeRE = /[A-Z]/; + var digitRE = /[0-9]/; + var hexitRE = /[0-9A-Fa-f]/; + var octitRE = /[0-7]/; + var idRE = /[a-z_A-Z0-9']/; + var symbolRE = /[-!#$%&*+.\/<=>?@\\^|~:]/; + var specialRE = /[(),;[\]`{}]/; + var whiteCharRE = /[ \t\v\f]/; // newlines are handled in tokenizer + + function normal(source, setState) { + if (source.eatWhile(whiteCharRE)) { + return null; + } + + var ch = source.next(); + if (specialRE.test(ch)) { + if (ch == '{' && source.eat('-')) { + var t = "comment"; + if (source.eat('#')) { + t = "meta"; + } + return switchState(source, setState, ncomment(t, 1)); + } + return null; + } + + if (ch == '\'') { + if (source.eat('\\')) { + source.next(); // should handle other escapes here + } + else { + source.next(); + } + if (source.eat('\'')) { + return "string"; + } + return "error"; + } + + if (ch == '"') { + return switchState(source, setState, stringLiteral); + } + + if (largeRE.test(ch)) { + source.eatWhile(idRE); + if (source.eat('.')) { + return "qualifier"; + } + return "variable-2"; + } + + if (smallRE.test(ch)) { + source.eatWhile(idRE); + return "variable"; + } + + if (digitRE.test(ch)) { + if (ch == '0') { + if (source.eat(/[xX]/)) { + source.eatWhile(hexitRE); // should require at least 1 + return "integer"; + } + if (source.eat(/[oO]/)) { + source.eatWhile(octitRE); // should require at least 1 + return "number"; + } + } + source.eatWhile(digitRE); + var t = "number"; + if (source.eat('.')) { + t = "number"; + source.eatWhile(digitRE); // should require at least 1 + } + if (source.eat(/[eE]/)) { + t = "number"; + source.eat(/[-+]/); + source.eatWhile(digitRE); // should require at least 1 + } + return t; + } + + if (symbolRE.test(ch)) { + if (ch == '-' && source.eat(/-/)) { + source.eatWhile(/-/); + if (!source.eat(symbolRE)) { + source.skipToEnd(); + return "comment"; + } + } + var t = "variable"; + if (ch == ':') { + t = "variable-2"; + } + source.eatWhile(symbolRE); + return t; + } + + return "error"; + } + + function ncomment(type, nest) { + if (nest == 0) { + return normal; + } + return function(source, setState) { + var currNest = nest; + while (!source.eol()) { + var ch = source.next(); + if (ch == '{' && source.eat('-')) { + ++currNest; + } + else if (ch == '-' && source.eat('}')) { + --currNest; + if (currNest == 0) { + setState(normal); + return type; + } + } + } + setState(ncomment(type, currNest)); + return type; + }; + } + + function stringLiteral(source, setState) { + while (!source.eol()) { + var ch = source.next(); + if (ch == '"') { + setState(normal); + return "string"; + } + if (ch == '\\') { + if (source.eol() || source.eat(whiteCharRE)) { + setState(stringGap); + return "string"; + } + if (source.eat('&')) { + } + else { + source.next(); // should handle other escapes here + } + } + } + setState(normal); + return "error"; + } + + function stringGap(source, setState) { + if (source.eat('\\')) { + return switchState(source, setState, stringLiteral); + } + source.next(); + setState(normal); + return "error"; + } + + + var wellKnownWords = (function() { + var wkw = {}; + function setType(t) { + return function () { + for (var i = 0; i < arguments.length; i++) + wkw[arguments[i]] = t; + }; + } + + setType("keyword")( + "case", "class", "data", "default", "deriving", "do", "else", "foreign", + "if", "import", "in", "infix", "infixl", "infixr", "instance", "let", + "module", "newtype", "of", "then", "type", "where", "_"); + + setType("keyword")( + "\.\.", ":", "::", "=", "\\", "\"", "<-", "->", "@", "~", "=>"); + + setType("builtin")( + "!!", "$!", "$", "&&", "+", "++", "-", ".", "/", "/=", "<", "<=", "=<<", + "==", ">", ">=", ">>", ">>=", "^", "^^", "||", "*", "**"); + + setType("builtin")( + "Bool", "Bounded", "Char", "Double", "EQ", "Either", "Enum", "Eq", + "False", "FilePath", "Float", "Floating", "Fractional", "Functor", "GT", + "IO", "IOError", "Int", "Integer", "Integral", "Just", "LT", "Left", + "Maybe", "Monad", "Nothing", "Num", "Ord", "Ordering", "Rational", "Read", + "ReadS", "Real", "RealFloat", "RealFrac", "Right", "Show", "ShowS", + "String", "True"); + + setType("builtin")( + "abs", "acos", "acosh", "all", "and", "any", "appendFile", "asTypeOf", + "asin", "asinh", "atan", "atan2", "atanh", "break", "catch", "ceiling", + "compare", "concat", "concatMap", "const", "cos", "cosh", "curry", + "cycle", "decodeFloat", "div", "divMod", "drop", "dropWhile", "either", + "elem", "encodeFloat", "enumFrom", "enumFromThen", "enumFromThenTo", + "enumFromTo", "error", "even", "exp", "exponent", "fail", "filter", + "flip", "floatDigits", "floatRadix", "floatRange", "floor", "fmap", + "foldl", "foldl1", "foldr", "foldr1", "fromEnum", "fromInteger", + "fromIntegral", "fromRational", "fst", "gcd", "getChar", "getContents", + "getLine", "head", "id", "init", "interact", "ioError", "isDenormalized", + "isIEEE", "isInfinite", "isNaN", "isNegativeZero", "iterate", "last", + "lcm", "length", "lex", "lines", "log", "logBase", "lookup", "map", + "mapM", "mapM_", "max", "maxBound", "maximum", "maybe", "min", "minBound", + "minimum", "mod", "negate", "not", "notElem", "null", "odd", "or", + "otherwise", "pi", "pred", "print", "product", "properFraction", + "putChar", "putStr", "putStrLn", "quot", "quotRem", "read", "readFile", + "readIO", "readList", "readLn", "readParen", "reads", "readsPrec", + "realToFrac", "recip", "rem", "repeat", "replicate", "return", "reverse", + "round", "scaleFloat", "scanl", "scanl1", "scanr", "scanr1", "seq", + "sequence", "sequence_", "show", "showChar", "showList", "showParen", + "showString", "shows", "showsPrec", "significand", "signum", "sin", + "sinh", "snd", "span", "splitAt", "sqrt", "subtract", "succ", "sum", + "tail", "take", "takeWhile", "tan", "tanh", "toEnum", "toInteger", + "toRational", "truncate", "uncurry", "undefined", "unlines", "until", + "unwords", "unzip", "unzip3", "userError", "words", "writeFile", "zip", + "zip3", "zipWith", "zipWith3"); + + var override = modeConfig.overrideKeywords; + if (override) for (var word in override) if (override.hasOwnProperty(word)) + wkw[word] = override[word]; + + return wkw; + })(); + + + + return { + startState: function () { return { f: normal }; }, + copyState: function (s) { return { f: s.f }; }, + + token: function(stream, state) { + var t = state.f(stream, function(s) { state.f = s; }); + var w = stream.current(); + return wellKnownWords.hasOwnProperty(w) ? wellKnownWords[w] : t; + }, + + blockCommentStart: "{-", + blockCommentEnd: "-}", + lineComment: "--" + }; + +}); + +CodeMirror.defineMIME("text/x-haskell", "haskell"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/haskell/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/haskell/index.html new file mode 100644 index 00000000..056b01d4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/haskell/index.html @@ -0,0 +1,73 @@ + + +CodeMirror: Haskell mode + + + + + + + + + + + +
+

Haskell mode

+
+ + + +

MIME types defined: text/x-haskell.

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/haxe/haxe.js b/pitfall/pdfkit/node_modules/codemirror/mode/haxe/haxe.js new file mode 100644 index 00000000..cb761ad1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/haxe/haxe.js @@ -0,0 +1,429 @@ +CodeMirror.defineMode("haxe", function(config, parserConfig) { + var indentUnit = config.indentUnit; + + // Tokenizer + + var keywords = function(){ + function kw(type) {return {type: type, style: "keyword"};} + var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c"); + var operator = kw("operator"), atom = {type: "atom", style: "atom"}, attribute = {type:"attribute", style: "attribute"}; + var type = kw("typedef"); + return { + "if": A, "while": A, "else": B, "do": B, "try": B, + "return": C, "break": C, "continue": C, "new": C, "throw": C, + "var": kw("var"), "inline":attribute, "static": attribute, "using":kw("import"), + "public": attribute, "private": attribute, "cast": kw("cast"), "import": kw("import"), "macro": kw("macro"), + "function": kw("function"), "catch": kw("catch"), "untyped": kw("untyped"), "callback": kw("cb"), + "for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"), + "in": operator, "never": kw("property_access"), "trace":kw("trace"), + "class": type, "enum":type, "interface":type, "typedef":type, "extends":type, "implements":type, "dynamic":type, + "true": atom, "false": atom, "null": atom + }; + }(); + + var isOperatorChar = /[+\-*&%=<>!?|]/; + + function chain(stream, state, f) { + state.tokenize = f; + return f(stream, state); + } + + function nextUntilUnescaped(stream, end) { + var escaped = false, next; + while ((next = stream.next()) != null) { + if (next == end && !escaped) + return false; + escaped = !escaped && next == "\\"; + } + return escaped; + } + + // Used as scratch variables to communicate multiple values without + // consing up tons of objects. + var type, content; + function ret(tp, style, cont) { + type = tp; content = cont; + return style; + } + + function haxeTokenBase(stream, state) { + var ch = stream.next(); + if (ch == '"' || ch == "'") + return chain(stream, state, haxeTokenString(ch)); + else if (/[\[\]{}\(\),;\:\.]/.test(ch)) + return ret(ch); + else if (ch == "0" && stream.eat(/x/i)) { + stream.eatWhile(/[\da-f]/i); + return ret("number", "number"); + } + else if (/\d/.test(ch) || ch == "-" && stream.eat(/\d/)) { + stream.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/); + return ret("number", "number"); + } + else if (state.reAllowed && (ch == "~" && stream.eat(/\//))) { + nextUntilUnescaped(stream, "/"); + stream.eatWhile(/[gimsu]/); + return ret("regexp", "string-2"); + } + else if (ch == "/") { + if (stream.eat("*")) { + return chain(stream, state, haxeTokenComment); + } + else if (stream.eat("/")) { + stream.skipToEnd(); + return ret("comment", "comment"); + } + else { + stream.eatWhile(isOperatorChar); + return ret("operator", null, stream.current()); + } + } + else if (ch == "#") { + stream.skipToEnd(); + return ret("conditional", "meta"); + } + else if (ch == "@") { + stream.eat(/:/); + stream.eatWhile(/[\w_]/); + return ret ("metadata", "meta"); + } + else if (isOperatorChar.test(ch)) { + stream.eatWhile(isOperatorChar); + return ret("operator", null, stream.current()); + } + else { + var word; + if(/[A-Z]/.test(ch)) + { + stream.eatWhile(/[\w_<>]/); + word = stream.current(); + return ret("type", "variable-3", word); + } + else + { + stream.eatWhile(/[\w_]/); + var word = stream.current(), known = keywords.propertyIsEnumerable(word) && keywords[word]; + return (known && state.kwAllowed) ? ret(known.type, known.style, word) : + ret("variable", "variable", word); + } + } + } + + function haxeTokenString(quote) { + return function(stream, state) { + if (!nextUntilUnescaped(stream, quote)) + state.tokenize = haxeTokenBase; + return ret("string", "string"); + }; + } + + function haxeTokenComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (ch == "/" && maybeEnd) { + state.tokenize = haxeTokenBase; + break; + } + maybeEnd = (ch == "*"); + } + return ret("comment", "comment"); + } + + // Parser + + var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true, "regexp": true}; + + function HaxeLexical(indented, column, type, align, prev, info) { + this.indented = indented; + this.column = column; + this.type = type; + this.prev = prev; + this.info = info; + if (align != null) this.align = align; + } + + function inScope(state, varname) { + for (var v = state.localVars; v; v = v.next) + if (v.name == varname) return true; + } + + function parseHaxe(state, style, type, content, stream) { + var cc = state.cc; + // Communicate our context to the combinators. + // (Less wasteful than consing up a hundred closures on every call.) + cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; + + if (!state.lexical.hasOwnProperty("align")) + state.lexical.align = true; + + while(true) { + var combinator = cc.length ? cc.pop() : statement; + if (combinator(type, content)) { + while(cc.length && cc[cc.length - 1].lex) + cc.pop()(); + if (cx.marked) return cx.marked; + if (type == "variable" && inScope(state, content)) return "variable-2"; + if (type == "variable" && imported(state, content)) return "variable-3"; + return style; + } + } + } + + function imported(state, typename) + { + if (/[a-z]/.test(typename.charAt(0))) + return false; + var len = state.importedtypes.length; + for (var i = 0; i= 0; i--) cx.cc.push(arguments[i]); + } + function cont() { + pass.apply(null, arguments); + return true; + } + function register(varname) { + var state = cx.state; + if (state.context) { + cx.marked = "def"; + for (var v = state.localVars; v; v = v.next) + if (v.name == varname) return; + state.localVars = {name: varname, next: state.localVars}; + } + } + + // Combinators + + var defaultVars = {name: "this", next: null}; + function pushcontext() { + if (!cx.state.context) cx.state.localVars = defaultVars; + cx.state.context = {prev: cx.state.context, vars: cx.state.localVars}; + } + function popcontext() { + cx.state.localVars = cx.state.context.vars; + cx.state.context = cx.state.context.prev; + } + function pushlex(type, info) { + var result = function() { + var state = cx.state; + state.lexical = new HaxeLexical(state.indented, cx.stream.column(), type, null, state.lexical, info); + }; + result.lex = true; + return result; + } + function poplex() { + var state = cx.state; + if (state.lexical.prev) { + if (state.lexical.type == ")") + state.indented = state.lexical.indented; + state.lexical = state.lexical.prev; + } + } + poplex.lex = true; + + function expect(wanted) { + return function(type) { + if (type == wanted) return cont(); + else if (wanted == ";") return pass(); + else return cont(arguments.callee); + }; + } + + function statement(type) { + if (type == "@") return cont(metadef); + if (type == "var") return cont(pushlex("vardef"), vardef1, expect(";"), poplex); + if (type == "keyword a") return cont(pushlex("form"), expression, statement, poplex); + if (type == "keyword b") return cont(pushlex("form"), statement, poplex); + if (type == "{") return cont(pushlex("}"), pushcontext, block, poplex, popcontext); + if (type == ";") return cont(); + if (type == "attribute") return cont(maybeattribute); + if (type == "function") return cont(functiondef); + if (type == "for") return cont(pushlex("form"), expect("("), pushlex(")"), forspec1, expect(")"), + poplex, statement, poplex); + if (type == "variable") return cont(pushlex("stat"), maybelabel); + if (type == "switch") return cont(pushlex("form"), expression, pushlex("}", "switch"), expect("{"), + block, poplex, poplex); + if (type == "case") return cont(expression, expect(":")); + if (type == "default") return cont(expect(":")); + if (type == "catch") return cont(pushlex("form"), pushcontext, expect("("), funarg, expect(")"), + statement, poplex, popcontext); + if (type == "import") return cont(importdef, expect(";")); + if (type == "typedef") return cont(typedef); + return pass(pushlex("stat"), expression, expect(";"), poplex); + } + function expression(type) { + if (atomicTypes.hasOwnProperty(type)) return cont(maybeoperator); + if (type == "function") return cont(functiondef); + if (type == "keyword c") return cont(maybeexpression); + if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeoperator); + if (type == "operator") return cont(expression); + if (type == "[") return cont(pushlex("]"), commasep(expression, "]"), poplex, maybeoperator); + if (type == "{") return cont(pushlex("}"), commasep(objprop, "}"), poplex, maybeoperator); + return cont(); + } + function maybeexpression(type) { + if (type.match(/[;\}\)\],]/)) return pass(); + return pass(expression); + } + + function maybeoperator(type, value) { + if (type == "operator" && /\+\+|--/.test(value)) return cont(maybeoperator); + if (type == "operator" || type == ":") return cont(expression); + if (type == ";") return; + if (type == "(") return cont(pushlex(")"), commasep(expression, ")"), poplex, maybeoperator); + if (type == ".") return cont(property, maybeoperator); + if (type == "[") return cont(pushlex("]"), expression, expect("]"), poplex, maybeoperator); + } + + function maybeattribute(type) { + if (type == "attribute") return cont(maybeattribute); + if (type == "function") return cont(functiondef); + if (type == "var") return cont(vardef1); + } + + function metadef(type) { + if(type == ":") return cont(metadef); + if(type == "variable") return cont(metadef); + if(type == "(") return cont(pushlex(")"), commasep(metaargs, ")"), poplex, statement); + } + function metaargs(type) { + if(type == "variable") return cont(); + } + + function importdef (type, value) { + if(type == "variable" && /[A-Z]/.test(value.charAt(0))) { registerimport(value); return cont(); } + else if(type == "variable" || type == "property" || type == ".") return cont(importdef); + } + + function typedef (type, value) + { + if(type == "variable" && /[A-Z]/.test(value.charAt(0))) { registerimport(value); return cont(); } + } + + function maybelabel(type) { + if (type == ":") return cont(poplex, statement); + return pass(maybeoperator, expect(";"), poplex); + } + function property(type) { + if (type == "variable") {cx.marked = "property"; return cont();} + } + function objprop(type) { + if (type == "variable") cx.marked = "property"; + if (atomicTypes.hasOwnProperty(type)) return cont(expect(":"), expression); + } + function commasep(what, end) { + function proceed(type) { + if (type == ",") return cont(what, proceed); + if (type == end) return cont(); + return cont(expect(end)); + } + return function(type) { + if (type == end) return cont(); + else return pass(what, proceed); + }; + } + function block(type) { + if (type == "}") return cont(); + return pass(statement, block); + } + function vardef1(type, value) { + if (type == "variable"){register(value); return cont(typeuse, vardef2);} + return cont(); + } + function vardef2(type, value) { + if (value == "=") return cont(expression, vardef2); + if (type == ",") return cont(vardef1); + } + function forspec1(type, value) { + if (type == "variable") { + register(value); + } + return cont(pushlex(")"), pushcontext, forin, expression, poplex, statement, popcontext); + } + function forin(_type, value) { + if (value == "in") return cont(); + } + function functiondef(type, value) { + if (type == "variable") {register(value); return cont(functiondef);} + if (value == "new") return cont(functiondef); + if (type == "(") return cont(pushlex(")"), pushcontext, commasep(funarg, ")"), poplex, typeuse, statement, popcontext); + } + function typeuse(type) { + if(type == ":") return cont(typestring); + } + function typestring(type) { + if(type == "type") return cont(); + if(type == "variable") return cont(); + if(type == "{") return cont(pushlex("}"), commasep(typeprop, "}"), poplex); + } + function typeprop(type) { + if(type == "variable") return cont(typeuse); + } + function funarg(type, value) { + if (type == "variable") {register(value); return cont(typeuse);} + } + + // Interface + + return { + startState: function(basecolumn) { + var defaulttypes = ["Int", "Float", "String", "Void", "Std", "Bool", "Dynamic", "Array"]; + return { + tokenize: haxeTokenBase, + reAllowed: true, + kwAllowed: true, + cc: [], + lexical: new HaxeLexical((basecolumn || 0) - indentUnit, 0, "block", false), + localVars: parserConfig.localVars, + importedtypes: defaulttypes, + context: parserConfig.localVars && {vars: parserConfig.localVars}, + indented: 0 + }; + }, + + token: function(stream, state) { + if (stream.sol()) { + if (!state.lexical.hasOwnProperty("align")) + state.lexical.align = false; + state.indented = stream.indentation(); + } + if (stream.eatSpace()) return null; + var style = state.tokenize(stream, state); + if (type == "comment") return style; + state.reAllowed = !!(type == "operator" || type == "keyword c" || type.match(/^[\[{}\(,;:]$/)); + state.kwAllowed = type != '.'; + return parseHaxe(state, style, type, content, stream); + }, + + indent: function(state, textAfter) { + if (state.tokenize != haxeTokenBase) return 0; + var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical; + if (lexical.type == "stat" && firstChar == "}") lexical = lexical.prev; + var type = lexical.type, closing = firstChar == type; + if (type == "vardef") return lexical.indented + 4; + else if (type == "form" && firstChar == "{") return lexical.indented; + else if (type == "stat" || type == "form") return lexical.indented + indentUnit; + else if (lexical.info == "switch" && !closing) + return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit); + else if (lexical.align) return lexical.column + (closing ? 0 : 1); + else return lexical.indented + (closing ? 0 : indentUnit); + }, + + electricChars: "{}" + }; +}); + +CodeMirror.defineMIME("text/x-haxe", "haxe"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/haxe/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/haxe/index.html new file mode 100644 index 00000000..ec3b8e0e --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/haxe/index.html @@ -0,0 +1,103 @@ + + +CodeMirror: Haxe mode + + + + + + + + + +
+

Haxe mode

+ + +
+ + + +

MIME types defined: text/x-haxe.

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/htmlembedded/htmlembedded.js b/pitfall/pdfkit/node_modules/codemirror/mode/htmlembedded/htmlembedded.js new file mode 100644 index 00000000..ff6dfd2f --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/htmlembedded/htmlembedded.js @@ -0,0 +1,73 @@ +CodeMirror.defineMode("htmlembedded", function(config, parserConfig) { + + //config settings + var scriptStartRegex = parserConfig.scriptStartRegex || /^<%/i, + scriptEndRegex = parserConfig.scriptEndRegex || /^%>/i; + + //inner modes + var scriptingMode, htmlMixedMode; + + //tokenizer when in html mode + function htmlDispatch(stream, state) { + if (stream.match(scriptStartRegex, false)) { + state.token=scriptingDispatch; + return scriptingMode.token(stream, state.scriptState); + } + else + return htmlMixedMode.token(stream, state.htmlState); + } + + //tokenizer when in scripting mode + function scriptingDispatch(stream, state) { + if (stream.match(scriptEndRegex, false)) { + state.token=htmlDispatch; + return htmlMixedMode.token(stream, state.htmlState); + } + else + return scriptingMode.token(stream, state.scriptState); + } + + + return { + startState: function() { + scriptingMode = scriptingMode || CodeMirror.getMode(config, parserConfig.scriptingModeSpec); + htmlMixedMode = htmlMixedMode || CodeMirror.getMode(config, "htmlmixed"); + return { + token : parserConfig.startOpen ? scriptingDispatch : htmlDispatch, + htmlState : CodeMirror.startState(htmlMixedMode), + scriptState : CodeMirror.startState(scriptingMode) + }; + }, + + token: function(stream, state) { + return state.token(stream, state); + }, + + indent: function(state, textAfter) { + if (state.token == htmlDispatch) + return htmlMixedMode.indent(state.htmlState, textAfter); + else if (scriptingMode.indent) + return scriptingMode.indent(state.scriptState, textAfter); + }, + + copyState: function(state) { + return { + token : state.token, + htmlState : CodeMirror.copyState(htmlMixedMode, state.htmlState), + scriptState : CodeMirror.copyState(scriptingMode, state.scriptState) + }; + }, + + electricChars: "/{}:", + + innerMode: function(state) { + if (state.token == scriptingDispatch) return {state: state.scriptState, mode: scriptingMode}; + else return {state: state.htmlState, mode: htmlMixedMode}; + } + }; +}, "htmlmixed"); + +CodeMirror.defineMIME("application/x-ejs", { name: "htmlembedded", scriptingModeSpec:"javascript"}); +CodeMirror.defineMIME("application/x-aspx", { name: "htmlembedded", scriptingModeSpec:"text/x-csharp"}); +CodeMirror.defineMIME("application/x-jsp", { name: "htmlembedded", scriptingModeSpec:"text/x-java"}); +CodeMirror.defineMIME("application/x-erb", { name: "htmlembedded", scriptingModeSpec:"ruby"}); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/htmlembedded/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/htmlembedded/index.html new file mode 100644 index 00000000..4ab90f7d --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/htmlembedded/index.html @@ -0,0 +1,60 @@ + + +CodeMirror: Html Embedded Scripts mode + + + + + + + + + + + + + +
+

Html Embedded Scripts mode

+
+ + + +

Mode for html embedded scripts like JSP and ASP.NET. Depends on HtmlMixed which in turn depends on + JavaScript, CSS and XML.
Other dependancies include those of the scriping language chosen.

+ +

MIME types defined: application/x-aspx (ASP.NET), + application/x-ejs (Embedded Javascript), application/x-jsp (JavaServer Pages)

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/htmlmixed/htmlmixed.js b/pitfall/pdfkit/node_modules/codemirror/mode/htmlmixed/htmlmixed.js new file mode 100644 index 00000000..b59ef37e --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/htmlmixed/htmlmixed.js @@ -0,0 +1,104 @@ +CodeMirror.defineMode("htmlmixed", function(config, parserConfig) { + var htmlMode = CodeMirror.getMode(config, {name: "xml", htmlMode: true}); + var cssMode = CodeMirror.getMode(config, "css"); + + var scriptTypes = [], scriptTypesConf = parserConfig && parserConfig.scriptTypes; + scriptTypes.push({matches: /^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^$/i, + mode: CodeMirror.getMode(config, "javascript")}); + if (scriptTypesConf) for (var i = 0; i < scriptTypesConf.length; ++i) { + var conf = scriptTypesConf[i]; + scriptTypes.push({matches: conf.matches, mode: conf.mode && CodeMirror.getMode(config, conf.mode)}); + } + scriptTypes.push({matches: /./, + mode: CodeMirror.getMode(config, "text/plain")}); + + function html(stream, state) { + var tagName = state.htmlState.tagName; + var style = htmlMode.token(stream, state.htmlState); + if (tagName == "script" && /\btag\b/.test(style) && stream.current() == ">") { + // Script block: mode to change to depends on type attribute + var scriptType = stream.string.slice(Math.max(0, stream.pos - 100), stream.pos).match(/\btype\s*=\s*("[^"]+"|'[^']+'|\S+)[^<]*$/i); + scriptType = scriptType ? scriptType[1] : ""; + if (scriptType && /[\"\']/.test(scriptType.charAt(0))) scriptType = scriptType.slice(1, scriptType.length - 1); + for (var i = 0; i < scriptTypes.length; ++i) { + var tp = scriptTypes[i]; + if (typeof tp.matches == "string" ? scriptType == tp.matches : tp.matches.test(scriptType)) { + if (tp.mode) { + state.token = script; + state.localMode = tp.mode; + state.localState = tp.mode.startState && tp.mode.startState(htmlMode.indent(state.htmlState, "")); + } + break; + } + } + } else if (tagName == "style" && /\btag\b/.test(style) && stream.current() == ">") { + state.token = css; + state.localMode = cssMode; + state.localState = cssMode.startState(htmlMode.indent(state.htmlState, "")); + } + return style; + } + function maybeBackup(stream, pat, style) { + var cur = stream.current(); + var close = cur.search(pat), m; + if (close > -1) stream.backUp(cur.length - close); + else if (m = cur.match(/<\/?$/)) { + stream.backUp(cur.length); + if (!stream.match(pat, false)) stream.match(cur); + } + return style; + } + function script(stream, state) { + if (stream.match(/^<\/\s*script\s*>/i, false)) { + state.token = html; + state.localState = state.localMode = null; + return html(stream, state); + } + return maybeBackup(stream, /<\/\s*script\s*>/, + state.localMode.token(stream, state.localState)); + } + function css(stream, state) { + if (stream.match(/^<\/\s*style\s*>/i, false)) { + state.token = html; + state.localState = state.localMode = null; + return html(stream, state); + } + return maybeBackup(stream, /<\/\s*style\s*>/, + cssMode.token(stream, state.localState)); + } + + return { + startState: function() { + var state = htmlMode.startState(); + return {token: html, localMode: null, localState: null, htmlState: state}; + }, + + copyState: function(state) { + if (state.localState) + var local = CodeMirror.copyState(state.localMode, state.localState); + return {token: state.token, localMode: state.localMode, localState: local, + htmlState: CodeMirror.copyState(htmlMode, state.htmlState)}; + }, + + token: function(stream, state) { + return state.token(stream, state); + }, + + indent: function(state, textAfter) { + if (!state.localMode || /^\s*<\//.test(textAfter)) + return htmlMode.indent(state.htmlState, textAfter); + else if (state.localMode.indent) + return state.localMode.indent(state.localState, textAfter); + else + return CodeMirror.Pass; + }, + + electricChars: "/{}:", + + innerMode: function(state) { + return {state: state.localState || state.htmlState, mode: state.localMode || htmlMode}; + } + }; +}, "xml", "javascript", "css"); + +CodeMirror.defineMIME("text/html", "htmlmixed"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/htmlmixed/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/htmlmixed/index.html new file mode 100644 index 00000000..b4617435 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/htmlmixed/index.html @@ -0,0 +1,85 @@ + + +CodeMirror: HTML mixed mode + + + + + + + + + + + + + +
+

HTML mixed mode

+
+ + +

The HTML mixed mode depends on the XML, JavaScript, and CSS modes.

+ +

It takes an optional mode configuration + option, scriptTypes, which can be used to add custom + behavior for specific <script type="..."> tags. If + given, it should hold an array of {matches, mode} + objects, where matches is a string or regexp that + matches the script type, and mode is + either null, for script types that should stay in + HTML mode, or a mode + spec corresponding to the mode that should be used for the + script.

+ +

MIME types defined: text/html + (redefined, only takes effect if you load this parser after the + XML parser).

+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/http/http.js b/pitfall/pdfkit/node_modules/codemirror/mode/http/http.js new file mode 100644 index 00000000..5a516360 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/http/http.js @@ -0,0 +1,98 @@ +CodeMirror.defineMode("http", function() { + function failFirstLine(stream, state) { + stream.skipToEnd(); + state.cur = header; + return "error"; + } + + function start(stream, state) { + if (stream.match(/^HTTP\/\d\.\d/)) { + state.cur = responseStatusCode; + return "keyword"; + } else if (stream.match(/^[A-Z]+/) && /[ \t]/.test(stream.peek())) { + state.cur = requestPath; + return "keyword"; + } else { + return failFirstLine(stream, state); + } + } + + function responseStatusCode(stream, state) { + var code = stream.match(/^\d+/); + if (!code) return failFirstLine(stream, state); + + state.cur = responseStatusText; + var status = Number(code[0]); + if (status >= 100 && status < 200) { + return "positive informational"; + } else if (status >= 200 && status < 300) { + return "positive success"; + } else if (status >= 300 && status < 400) { + return "positive redirect"; + } else if (status >= 400 && status < 500) { + return "negative client-error"; + } else if (status >= 500 && status < 600) { + return "negative server-error"; + } else { + return "error"; + } + } + + function responseStatusText(stream, state) { + stream.skipToEnd(); + state.cur = header; + return null; + } + + function requestPath(stream, state) { + stream.eatWhile(/\S/); + state.cur = requestProtocol; + return "string-2"; + } + + function requestProtocol(stream, state) { + if (stream.match(/^HTTP\/\d\.\d$/)) { + state.cur = header; + return "keyword"; + } else { + return failFirstLine(stream, state); + } + } + + function header(stream) { + if (stream.sol() && !stream.eat(/[ \t]/)) { + if (stream.match(/^.*?:/)) { + return "atom"; + } else { + stream.skipToEnd(); + return "error"; + } + } else { + stream.skipToEnd(); + return "string"; + } + } + + function body(stream) { + stream.skipToEnd(); + return null; + } + + return { + token: function(stream, state) { + var cur = state.cur; + if (cur != header && cur != body && stream.eatSpace()) return null; + return cur(stream, state); + }, + + blankLine: function(state) { + state.cur = body; + }, + + startState: function() { + return {cur: start}; + } + }; +}); + +CodeMirror.defineMIME("message/http", "http"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/http/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/http/index.html new file mode 100644 index 00000000..705085e2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/http/index.html @@ -0,0 +1,45 @@ + + +CodeMirror: HTTP mode + + + + + + + + + +
+

HTTP mode

+ + +
+ + + +

MIME types defined: message/http.

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/index.html new file mode 100644 index 00000000..81abc42d --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/index.html @@ -0,0 +1,114 @@ + + +CodeMirror: Language Modes + + + + + +
+ +

Language modes

+ +

This is a list of every mode in the distribution. Each mode lives +in a subdirectory of the mode/ directory, and typically +defines a single JavaScript file that implements the mode. Loading +such file will make the language available to CodeMirror, through +the mode +option.

+ +
+ +
+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/jade/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/jade/index.html new file mode 100644 index 00000000..e22b15e6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/jade/index.html @@ -0,0 +1,66 @@ + + +CodeMirror: Jade Templating Mode + + + + + + + + + +
+

Jade Templating Mode

+
+ +

The Jade Templating Mode

+

Created by Drew Bratcher. Managed as part of an Adobe Brackets extension at https://github.com/dbratcher/brackets-jade.

+

MIME type defined: text/x-jade.

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/jade/jade.js b/pitfall/pdfkit/node_modules/codemirror/mode/jade/jade.js new file mode 100644 index 00000000..61abb27a --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/jade/jade.js @@ -0,0 +1,90 @@ +CodeMirror.defineMode("jade", function () { + var symbol_regex1 = /^(?:~|!|%|\^|\*|\+|=|\\|:|;|,|\/|\?|&|<|>|\|)/; + var open_paren_regex = /^(\(|\[)/; + var close_paren_regex = /^(\)|\])/; + var keyword_regex1 = /^(if|else|return|var|function|include|doctype|each)/; + var keyword_regex2 = /^(#|{|}|\.)/; + var keyword_regex3 = /^(in)/; + var html_regex1 = /^(html|head|title|meta|link|script|body|br|div|input|span|a|img)/; + var html_regex2 = /^(h1|h2|h3|h4|h5|p|strong|em)/; + return { + startState: function () { + return { + inString: false, + stringType: "", + beforeTag: true, + justMatchedKeyword: false, + afterParen: false + }; + }, + token: function (stream, state) { + //check for state changes + if (!state.inString && ((stream.peek() == '"') || (stream.peek() == "'"))) { + state.stringType = stream.peek(); + stream.next(); // Skip quote + state.inString = true; // Update state + } + + //return state + if (state.inString) { + if (stream.skipTo(state.stringType)) { // Quote found on this line + stream.next(); // Skip quote + state.inString = false; // Clear flag + } else { + stream.skipToEnd(); // Rest of line is string + } + state.justMatchedKeyword = false; + return "string"; // Token style + } else if (stream.sol() && stream.eatSpace()) { + if (stream.match(keyword_regex1)) { + state.justMatchedKeyword = true; + stream.eatSpace(); + return "keyword"; + } + if (stream.match(html_regex1) || stream.match(html_regex2)) { + state.justMatchedKeyword = true; + return "variable"; + } + } else if (stream.sol() && stream.match(keyword_regex1)) { + state.justMatchedKeyword = true; + stream.eatSpace(); + return "keyword"; + } else if (stream.sol() && (stream.match(html_regex1) || stream.match(html_regex2))) { + state.justMatchedKeyword = true; + return "variable"; + } else if (stream.eatSpace()) { + state.justMatchedKeyword = false; + if (stream.match(keyword_regex3) && stream.eatSpace()) { + state.justMatchedKeyword = true; + return "keyword"; + } + } else if (stream.match(symbol_regex1)) { + state.justMatchedKeyword = false; + return "atom"; + } else if (stream.match(open_paren_regex)) { + state.afterParen = true; + state.justMatchedKeyword = true; + return "def"; + } else if (stream.match(close_paren_regex)) { + state.afterParen = false; + state.justMatchedKeyword = true; + return "def"; + } else if (stream.match(keyword_regex2)) { + state.justMatchedKeyword = true; + return "keyword"; + } else if (stream.eatSpace()) { + state.justMatchedKeyword = false; + } else { + stream.next(); + if (state.justMatchedKeyword) { + return "property"; + } else if (state.afterParen) { + return "property"; + } + } + return null; + } + }; +}); + +CodeMirror.defineMIME('text/x-jade', 'jade'); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/javascript/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/javascript/index.html new file mode 100644 index 00000000..45d70ffd --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/javascript/index.html @@ -0,0 +1,107 @@ + + +CodeMirror: JavaScript mode + + + + + + + + + + + + +
+

JavaScript mode

+ + +
+ + + +

+ JavaScript mode supports a two configuration + options: +

    +
  • json which will set the mode to expect JSON + data rather than a JavaScript program.
  • +
  • typescript which will activate additional + syntax highlighting and some other things for TypeScript code + (demo).
  • +
  • statementIndent which (given a number) will + determine the amount of indentation to use for statements + continued on a new line.
  • +
+

+ +

MIME types defined: text/javascript, application/json, text/typescript, application/typescript.

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/javascript/javascript.js b/pitfall/pdfkit/node_modules/codemirror/mode/javascript/javascript.js new file mode 100644 index 00000000..f27c0634 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/javascript/javascript.js @@ -0,0 +1,617 @@ +// TODO actually recognize syntax of TypeScript constructs + +CodeMirror.defineMode("javascript", function(config, parserConfig) { + var indentUnit = config.indentUnit; + var statementIndent = parserConfig.statementIndent; + var jsonMode = parserConfig.json; + var isTS = parserConfig.typescript; + + // Tokenizer + + var keywords = function(){ + function kw(type) {return {type: type, style: "keyword"};} + var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c"); + var operator = kw("operator"), atom = {type: "atom", style: "atom"}; + + var jsKeywords = { + "if": kw("if"), "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B, + "return": C, "break": C, "continue": C, "new": C, "delete": C, "throw": C, + "var": kw("var"), "const": kw("var"), "let": kw("var"), + "function": kw("function"), "catch": kw("catch"), + "for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"), + "in": operator, "typeof": operator, "instanceof": operator, + "true": atom, "false": atom, "null": atom, "undefined": atom, "NaN": atom, "Infinity": atom, + "this": kw("this"), "module": kw("module"), "class": kw("class"), "super": kw("atom"), + "yield": C, "export": kw("export"), "import": kw("import"), "extends": C + }; + + // Extend the 'normal' keywords with the TypeScript language extensions + if (isTS) { + var type = {type: "variable", style: "variable-3"}; + var tsKeywords = { + // object-like things + "interface": kw("interface"), + "extends": kw("extends"), + "constructor": kw("constructor"), + + // scope modifiers + "public": kw("public"), + "private": kw("private"), + "protected": kw("protected"), + "static": kw("static"), + + // types + "string": type, "number": type, "bool": type, "any": type + }; + + for (var attr in tsKeywords) { + jsKeywords[attr] = tsKeywords[attr]; + } + } + + return jsKeywords; + }(); + + var isOperatorChar = /[+\-*&%=<>!?|~^]/; + + function nextUntilUnescaped(stream, end) { + var escaped = false, next; + while ((next = stream.next()) != null) { + if (next == end && !escaped) + return false; + escaped = !escaped && next == "\\"; + } + return escaped; + } + + // Used as scratch variables to communicate multiple values without + // consing up tons of objects. + var type, content; + function ret(tp, style, cont) { + type = tp; content = cont; + return style; + } + function tokenBase(stream, state) { + var ch = stream.next(); + if (ch == '"' || ch == "'") { + state.tokenize = tokenString(ch); + return state.tokenize(stream, state); + } else if (ch == "." && stream.match(/^\d+(?:[eE][+\-]?\d+)?/)) { + return ret("number", "number"); + } else if (ch == "." && stream.match("..")) { + return ret("spread", "meta"); + } else if (/[\[\]{}\(\),;\:\.]/.test(ch)) { + return ret(ch); + } else if (ch == "=" && stream.eat(">")) { + return ret("=>"); + } else if (ch == "0" && stream.eat(/x/i)) { + stream.eatWhile(/[\da-f]/i); + return ret("number", "number"); + } else if (/\d/.test(ch)) { + stream.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/); + return ret("number", "number"); + } else if (ch == "/") { + if (stream.eat("*")) { + state.tokenize = tokenComment; + return tokenComment(stream, state); + } else if (stream.eat("/")) { + stream.skipToEnd(); + return ret("comment", "comment"); + } else if (state.lastType == "operator" || state.lastType == "keyword c" || + state.lastType == "sof" || /^[\[{}\(,;:]$/.test(state.lastType)) { + nextUntilUnescaped(stream, "/"); + stream.eatWhile(/[gimy]/); // 'y' is "sticky" option in Mozilla + return ret("regexp", "string-2"); + } else { + stream.eatWhile(isOperatorChar); + return ret("operator", null, stream.current()); + } + } else if (ch == "`") { + state.tokenize = tokenQuasi; + return tokenQuasi(stream, state); + } else if (ch == "#") { + stream.skipToEnd(); + return ret("error", "error"); + } else if (isOperatorChar.test(ch)) { + stream.eatWhile(isOperatorChar); + return ret("operator", null, stream.current()); + } else { + stream.eatWhile(/[\w\$_]/); + var word = stream.current(), known = keywords.propertyIsEnumerable(word) && keywords[word]; + return (known && state.lastType != ".") ? ret(known.type, known.style, word) : + ret("variable", "variable", word); + } + } + + function tokenString(quote) { + return function(stream, state) { + if (!nextUntilUnescaped(stream, quote)) + state.tokenize = tokenBase; + return ret("string", "string"); + }; + } + + function tokenComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (ch == "/" && maybeEnd) { + state.tokenize = tokenBase; + break; + } + maybeEnd = (ch == "*"); + } + return ret("comment", "comment"); + } + + function tokenQuasi(stream, state) { + var escaped = false, next; + while ((next = stream.next()) != null) { + if (!escaped && (next == "`" || next == "$" && stream.eat("{"))) { + state.tokenize = tokenBase; + break; + } + escaped = !escaped && next == "\\"; + } + return ret("quasi", "string-2", stream.current()); + } + + var brackets = "([{}])"; + // This is a crude lookahead trick to try and notice that we're + // parsing the argument patterns for a fat-arrow function before we + // actually hit the arrow token. It only works if the arrow is on + // the same line as the arguments and there's no strange noise + // (comments) in between. Fallback is to only notice when we hit the + // arrow, and not declare the arguments as locals for the arrow + // body. + function findFatArrow(stream, state) { + if (state.fatArrowAt) state.fatArrowAt = null; + var arrow = stream.string.indexOf("=>", stream.start); + if (arrow < 0) return; + + var depth = 0, sawSomething = false; + for (var pos = arrow - 1; pos >= 0; --pos) { + var ch = stream.string.charAt(pos); + var bracket = brackets.indexOf(ch); + if (bracket >= 0 && bracket < 3) { + if (!depth) { ++pos; break; } + if (--depth == 0) break; + } else if (bracket >= 3 && bracket < 6) { + ++depth; + } else if (/[$\w]/.test(ch)) { + sawSomething = true; + } else if (sawSomething && !depth) { + ++pos; + break; + } + } + if (sawSomething && !depth) state.fatArrowAt = pos; + } + + // Parser + + var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true, "regexp": true, "this": true}; + + function JSLexical(indented, column, type, align, prev, info) { + this.indented = indented; + this.column = column; + this.type = type; + this.prev = prev; + this.info = info; + if (align != null) this.align = align; + } + + function inScope(state, varname) { + for (var v = state.localVars; v; v = v.next) + if (v.name == varname) return true; + for (var cx = state.context; cx; cx = cx.prev) { + for (var v = cx.vars; v; v = v.next) + if (v.name == varname) return true; + } + } + + function parseJS(state, style, type, content, stream) { + var cc = state.cc; + // Communicate our context to the combinators. + // (Less wasteful than consing up a hundred closures on every call.) + cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; + + if (!state.lexical.hasOwnProperty("align")) + state.lexical.align = true; + + while(true) { + var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement; + if (combinator(type, content)) { + while(cc.length && cc[cc.length - 1].lex) + cc.pop()(); + if (cx.marked) return cx.marked; + if (type == "variable" && inScope(state, content)) return "variable-2"; + return style; + } + } + } + + // Combinator utils + + var cx = {state: null, column: null, marked: null, cc: null}; + function pass() { + for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]); + } + function cont() { + pass.apply(null, arguments); + return true; + } + function register(varname) { + function inList(list) { + for (var v = list; v; v = v.next) + if (v.name == varname) return true; + return false; + } + var state = cx.state; + if (state.context) { + cx.marked = "def"; + if (inList(state.localVars)) return; + state.localVars = {name: varname, next: state.localVars}; + } else { + if (inList(state.globalVars)) return; + if (parserConfig.globalVars) + state.globalVars = {name: varname, next: state.globalVars}; + } + } + + // Combinators + + var defaultVars = {name: "this", next: {name: "arguments"}}; + function pushcontext() { + cx.state.context = {prev: cx.state.context, vars: cx.state.localVars}; + cx.state.localVars = defaultVars; + } + function popcontext() { + cx.state.localVars = cx.state.context.vars; + cx.state.context = cx.state.context.prev; + } + function pushlex(type, info) { + var result = function() { + var state = cx.state, indent = state.indented; + if (state.lexical.type == "stat") indent = state.lexical.indented; + state.lexical = new JSLexical(indent, cx.stream.column(), type, null, state.lexical, info); + }; + result.lex = true; + return result; + } + function poplex() { + var state = cx.state; + if (state.lexical.prev) { + if (state.lexical.type == ")") + state.indented = state.lexical.indented; + state.lexical = state.lexical.prev; + } + } + poplex.lex = true; + + function expect(wanted) { + return function(type) { + if (type == wanted) return cont(); + else if (wanted == ";") return pass(); + else return cont(arguments.callee); + }; + } + + function statement(type, value) { + if (type == "var") return cont(pushlex("vardef", value.length), vardef, expect(";"), poplex); + if (type == "keyword a") return cont(pushlex("form"), expression, statement, poplex); + if (type == "keyword b") return cont(pushlex("form"), statement, poplex); + if (type == "{") return cont(pushlex("}"), block, poplex); + if (type == ";") return cont(); + if (type == "if") return cont(pushlex("form"), expression, statement, poplex, maybeelse); + if (type == "function") return cont(functiondef); + if (type == "for") return cont(pushlex("form"), forspec, poplex, statement, poplex); + if (type == "variable") return cont(pushlex("stat"), maybelabel); + if (type == "switch") return cont(pushlex("form"), expression, pushlex("}", "switch"), expect("{"), + block, poplex, poplex); + if (type == "case") return cont(expression, expect(":")); + if (type == "default") return cont(expect(":")); + if (type == "catch") return cont(pushlex("form"), pushcontext, expect("("), funarg, expect(")"), + statement, poplex, popcontext); + if (type == "module") return cont(pushlex("form"), pushcontext, afterModule, popcontext, poplex); + if (type == "class") return cont(pushlex("form"), className, objlit, poplex); + if (type == "export") return cont(pushlex("form"), afterExport, poplex); + if (type == "import") return cont(pushlex("form"), afterImport, poplex); + return pass(pushlex("stat"), expression, expect(";"), poplex); + } + function expression(type) { + return expressionInner(type, false); + } + function expressionNoComma(type) { + return expressionInner(type, true); + } + function expressionInner(type, noComma) { + if (cx.state.fatArrowAt == cx.stream.start) { + var body = noComma ? arrowBodyNoComma : arrowBody; + if (type == "(") return cont(pushcontext, commasep(pattern, ")"), expect("=>"), body, popcontext); + else if (type == "variable") return pass(pushcontext, pattern, expect("=>"), body, popcontext); + } + + var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma; + if (atomicTypes.hasOwnProperty(type)) return cont(maybeop); + if (type == "function") return cont(functiondef); + if (type == "keyword c") return cont(noComma ? maybeexpressionNoComma : maybeexpression); + if (type == "(") return cont(pushlex(")"), maybeexpression, comprehension, expect(")"), poplex, maybeop); + if (type == "operator" || type == "spread") return cont(noComma ? expressionNoComma : expression); + if (type == "[") return cont(pushlex("]"), expressionNoComma, maybeArrayComprehension, poplex, maybeop); + if (type == "{") return cont(commasep(objprop, "}"), maybeop); + return cont(); + } + function maybeexpression(type) { + if (type.match(/[;\}\)\],]/)) return pass(); + return pass(expression); + } + function maybeexpressionNoComma(type) { + if (type.match(/[;\}\)\],]/)) return pass(); + return pass(expressionNoComma); + } + + function maybeoperatorComma(type, value) { + if (type == ",") return cont(expression); + return maybeoperatorNoComma(type, value, false); + } + function maybeoperatorNoComma(type, value, noComma) { + var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma; + var expr = noComma == false ? expression : expressionNoComma; + if (value == "=>") return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext); + if (type == "operator") { + if (/\+\+|--/.test(value)) return cont(me); + if (value == "?") return cont(expression, expect(":"), expr); + return cont(expr); + } + if (type == "quasi") { cx.cc.push(me); return quasi(value); } + if (type == ";") return; + if (type == "(") return cont(commasep(expressionNoComma, ")", "call"), me); + if (type == ".") return cont(property, me); + if (type == "[") return cont(pushlex("]"), maybeexpression, expect("]"), poplex, me); + } + function quasi(value) { + if (!value) debugger; + if (value.slice(value.length - 2) != "${") return cont(); + return cont(expression, continueQuasi); + } + function continueQuasi(type) { + if (type == "}") { + cx.marked = "string-2"; + cx.state.tokenize = tokenQuasi; + return cont(); + } + } + function arrowBody(type) { + findFatArrow(cx.stream, cx.state); + if (type == "{") return pass(statement); + return pass(expression); + } + function arrowBodyNoComma(type) { + findFatArrow(cx.stream, cx.state); + if (type == "{") return pass(statement); + return pass(expressionNoComma); + } + function maybelabel(type) { + if (type == ":") return cont(poplex, statement); + return pass(maybeoperatorComma, expect(";"), poplex); + } + function property(type) { + if (type == "variable") {cx.marked = "property"; return cont();} + } + function objprop(type, value) { + if (type == "variable") { + cx.marked = "property"; + if (value == "get" || value == "set") return cont(getterSetter); + } else if (type == "number" || type == "string") { + cx.marked = type + " property"; + } else if (type == "[") { + return cont(expression, expect("]"), afterprop); + } + if (atomicTypes.hasOwnProperty(type)) return cont(afterprop); + } + function getterSetter(type) { + if (type != "variable") return pass(afterprop); + cx.marked = "property"; + return cont(functiondef); + } + function afterprop(type) { + if (type == ":") return cont(expressionNoComma); + if (type == "(") return pass(functiondef); + } + function commasep(what, end, info) { + function proceed(type) { + if (type == ",") { + var lex = cx.state.lexical; + if (lex.info == "call") lex.pos = (lex.pos || 0) + 1; + return cont(what, proceed); + } + if (type == end) return cont(); + return cont(expect(end)); + } + return function(type) { + if (type == end) return cont(); + if (info === false) return pass(what, proceed); + return pass(pushlex(end, info), what, proceed, poplex); + }; + } + function block(type) { + if (type == "}") return cont(); + return pass(statement, block); + } + function maybetype(type) { + if (isTS && type == ":") return cont(typedef); + } + function typedef(type) { + if (type == "variable"){cx.marked = "variable-3"; return cont();} + } + function vardef() { + return pass(pattern, maybetype, maybeAssign, vardefCont); + } + function pattern(type, value) { + if (type == "variable") { register(value); return cont(); } + if (type == "[") return cont(commasep(pattern, "]")); + if (type == "{") return cont(commasep(proppattern, "}")); + } + function proppattern(type, value) { + if (type == "variable" && !cx.stream.match(/^\s*:/, false)) { + register(value); + return cont(maybeAssign); + } + if (type == "variable") cx.marked = "property"; + return cont(expect(":"), pattern, maybeAssign); + } + function maybeAssign(_type, value) { + if (value == "=") return cont(expressionNoComma); + } + function vardefCont(type) { + if (type == ",") return cont(vardef); + } + function maybeelse(type, value) { + if (type == "keyword b" && value == "else") return cont(pushlex("form"), statement, poplex); + } + function forspec(type) { + if (type == "(") return cont(pushlex(")"), forspec1, expect(")")); + } + function forspec1(type) { + if (type == "var") return cont(vardef, expect(";"), forspec2); + if (type == ";") return cont(forspec2); + if (type == "variable") return cont(formaybeinof); + return pass(expression, expect(";"), forspec2); + } + function formaybeinof(_type, value) { + if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression); } + return cont(maybeoperatorComma, forspec2); + } + function forspec2(type, value) { + if (type == ";") return cont(forspec3); + if (value == "in" || value == "of") { cx.marked = "keyword"; return cont(expression); } + return pass(expression, expect(";"), forspec3); + } + function forspec3(type) { + if (type != ")") cont(expression); + } + function functiondef(type, value) { + if (value == "*") {cx.marked = "keyword"; return cont(functiondef);} + if (type == "variable") {register(value); return cont(functiondef);} + if (type == "(") return cont(pushcontext, commasep(funarg, ")"), statement, popcontext); + } + function funarg(type) { + if (type == "spread") return cont(funarg); + return pass(pattern, maybetype); + } + function className(type, value) { + if (type == "variable") {register(value); return cont(classNameAfter);} + } + function classNameAfter(_type, value) { + if (value == "extends") return cont(expression); + } + function objlit(type) { + if (type == "{") return cont(commasep(objprop, "}")); + } + function afterModule(type, value) { + if (type == "string") return cont(statement); + if (type == "variable") { register(value); return cont(maybeFrom); } + } + function afterExport(_type, value) { + if (value == "*") { cx.marked = "keyword"; return cont(maybeFrom, expect(";")); } + if (value == "default") { cx.marked = "keyword"; return cont(expression, expect(";")); } + return pass(statement); + } + function afterImport(type) { + if (type == "string") return cont(); + return pass(importSpec, maybeFrom); + } + function importSpec(type, value) { + if (type == "{") return cont(commasep(importSpec, "}")); + if (type == "variable") register(value); + return cont(); + } + function maybeFrom(_type, value) { + if (value == "from") { cx.marked = "keyword"; return cont(expression); } + } + function maybeArrayComprehension(type) { + if (type == "for") return pass(comprehension); + if (type == ",") return cont(commasep(expressionNoComma, "]", false)); + return pass(commasep(expressionNoComma, "]", false)); + } + function comprehension(type) { + if (type == "for") return cont(forspec, comprehension); + if (type == "if") return cont(expression, comprehension); + } + + // Interface + + return { + startState: function(basecolumn) { + var state = { + tokenize: tokenBase, + lastType: "sof", + cc: [], + lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false), + localVars: parserConfig.localVars, + context: parserConfig.localVars && {vars: parserConfig.localVars}, + indented: 0 + }; + if (parserConfig.globalVars) state.globalVars = parserConfig.globalVars; + return state; + }, + + token: function(stream, state) { + if (stream.sol()) { + if (!state.lexical.hasOwnProperty("align")) + state.lexical.align = false; + state.indented = stream.indentation(); + findFatArrow(stream, state); + } + if (state.tokenize != tokenComment && stream.eatSpace()) return null; + var style = state.tokenize(stream, state); + if (type == "comment") return style; + state.lastType = type == "operator" && (content == "++" || content == "--") ? "incdec" : type; + return parseJS(state, style, type, content, stream); + }, + + indent: function(state, textAfter) { + if (state.tokenize == tokenComment) return CodeMirror.Pass; + if (state.tokenize != tokenBase) return 0; + var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical; + // Kludge to prevent 'maybelse' from blocking lexical scope pops + for (var i = state.cc.length - 1; i >= 0; --i) { + var c = state.cc[i]; + if (c == poplex) lexical = lexical.prev; + else if (c != maybeelse) break; + } + if (lexical.type == "stat" && firstChar == "}") lexical = lexical.prev; + if (statementIndent && lexical.type == ")" && lexical.prev.type == "stat") + lexical = lexical.prev; + var type = lexical.type, closing = firstChar == type; + + if (type == "vardef") return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? lexical.info + 1 : 0); + else if (type == "form" && firstChar == "{") return lexical.indented; + else if (type == "form") return lexical.indented + indentUnit; + else if (type == "stat") + return lexical.indented + (state.lastType == "operator" || state.lastType == "," ? statementIndent || indentUnit : 0); + else if (lexical.info == "switch" && !closing && parserConfig.doubleIndentSwitch != false) + return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit); + else if (lexical.align) return lexical.column + (closing ? 0 : 1); + else return lexical.indented + (closing ? 0 : indentUnit); + }, + + electricChars: ":{}", + blockCommentStart: jsonMode ? null : "/*", + blockCommentEnd: jsonMode ? null : "*/", + lineComment: jsonMode ? null : "//", + fold: "brace", + + helperType: jsonMode ? "json" : "javascript", + jsonMode: jsonMode + }; +}); + +CodeMirror.defineMIME("text/javascript", "javascript"); +CodeMirror.defineMIME("text/ecmascript", "javascript"); +CodeMirror.defineMIME("application/javascript", "javascript"); +CodeMirror.defineMIME("application/ecmascript", "javascript"); +CodeMirror.defineMIME("application/json", {name: "javascript", json: true}); +CodeMirror.defineMIME("application/x-json", {name: "javascript", json: true}); +CodeMirror.defineMIME("text/typescript", { name: "javascript", typescript: true }); +CodeMirror.defineMIME("application/typescript", { name: "javascript", typescript: true }); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/javascript/test.js b/pitfall/pdfkit/node_modules/codemirror/mode/javascript/test.js new file mode 100644 index 00000000..76015249 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/javascript/test.js @@ -0,0 +1,72 @@ +(function() { + var mode = CodeMirror.getMode({indentUnit: 2}, "javascript"); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } + + MT("locals", + "[keyword function] [variable foo]([def a], [def b]) { [keyword var] [def c] = [number 10]; [keyword return] [variable-2 a] + [variable-2 c] + [variable d]; }"); + + MT("comma-and-binop", + "[keyword function](){ [keyword var] [def x] = [number 1] + [number 2], [def y]; }"); + + MT("destructuring", + "([keyword function]([def a], [[[def b], [def c] ]]) {", + " [keyword let] {[def d], [property foo]: [def c]=[number 10], [def x]} = [variable foo]([variable-2 a]);", + " [[[variable-2 c], [variable y] ]] = [variable-2 c];", + "})();"); + + MT("class", + "[keyword class] [variable Point] [keyword extends] [variable SuperThing] {", + " [[ [string-2 /expr/] ]]: [number 24],", + " [property constructor]([def x], [def y]) {", + " [keyword super]([string 'something']);", + " [keyword this].[property x] = [variable-2 x];", + " }", + "}"); + + MT("module", + "[keyword module] [string 'foo'] {", + " [keyword export] [keyword let] [def x] = [number 42];", + " [keyword export] [keyword *] [keyword from] [string 'somewhere'];", + "}"); + + MT("import", + "[keyword function] [variable foo]() {", + " [keyword import] [def $] [keyword from] [string 'jquery'];", + " [keyword module] [def crypto] [keyword from] [string 'crypto'];", + " [keyword import] { [def encrypt], [def decrypt] } [keyword from] [string 'crypto'];", + "}"); + + MT("const", + "[keyword function] [variable f]() {", + " [keyword const] [[ [def a], [def b] ]] = [[ [number 1], [number 2] ]];", + "}"); + + MT("for/of", + "[keyword for]([keyword let] [variable of] [keyword of] [variable something]) {}"); + + MT("generator", + "[keyword function*] [variable repeat]([def n]) {", + " [keyword for]([keyword var] [def i] = [number 0]; [variable-2 i] < [variable-2 n]; ++[variable-2 i])", + " [keyword yield] [variable-2 i];", + "}"); + + MT("fatArrow", + "[variable array].[property filter]([def a] => [variable-2 a] + [number 1]);", + "[variable a];", // No longer in scope + "[keyword let] [variable f] = ([[ [def a], [def b] ]], [def c]) => [variable-2 a] + [variable-2 c];", + "[variable c];"); + + MT("spread", + "[keyword function] [variable f]([def a], [meta ...][def b]) {", + " [variable something]([variable-2 a], [meta ...][variable-2 b]);", + "}"); + + MT("comprehension", + "[keyword function] [variable f]() {", + " [[ [variable x] + [number 1] [keyword for] ([keyword var] [def x] [keyword in] [variable y]) [keyword if] [variable pred]([variable-2 x]) ]];", + " ([variable u] [keyword for] ([keyword var] [def u] [keyword of] [variable generateValues]()) [keyword if] ([variable-2 u].[property color] === [string 'blue']));", + "}"); + + MT("quasi", + "[variable re][string-2 `fofdlakj${][variable x] + ([variable re][string-2 `foo`]) + [number 1][string-2 }fdsa`] + [number 2]"); +})(); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/javascript/typescript.html b/pitfall/pdfkit/node_modules/codemirror/mode/javascript/typescript.html new file mode 100644 index 00000000..9cc5f493 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/javascript/typescript.html @@ -0,0 +1,61 @@ + + +CodeMirror: TypeScript mode + + + + + + + + + +
+

TypeScript mode

+ + +
+ + + +

This is a specialization of the JavaScript mode.

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/jinja2/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/jinja2/index.html new file mode 100644 index 00000000..66bf2ec6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/jinja2/index.html @@ -0,0 +1,50 @@ + + +CodeMirror: Jinja2 mode + + + + + + + + + +
+

Jinja2 mode

+
+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/jinja2/jinja2.js b/pitfall/pdfkit/node_modules/codemirror/mode/jinja2/jinja2.js new file mode 100644 index 00000000..16b06c48 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/jinja2/jinja2.js @@ -0,0 +1,42 @@ +CodeMirror.defineMode("jinja2", function() { + var keywords = ["block", "endblock", "for", "endfor", "in", "true", "false", + "loop", "none", "self", "super", "if", "as", "not", "and", + "else", "import", "with", "without", "context"]; + keywords = new RegExp("^((" + keywords.join(")|(") + "))\\b"); + + function tokenBase (stream, state) { + var ch = stream.next(); + if (ch == "{") { + if (ch = stream.eat(/\{|%|#/)) { + stream.eat("-"); + state.tokenize = inTag(ch); + return "tag"; + } + } + } + function inTag (close) { + if (close == "{") { + close = "}"; + } + return function (stream, state) { + var ch = stream.next(); + if ((ch == close || (ch == "-" && stream.eat(close))) + && stream.eat("}")) { + state.tokenize = tokenBase; + return "tag"; + } + if (stream.match(keywords)) { + return "keyword"; + } + return close == "#" ? "comment" : "string"; + }; + } + return { + startState: function () { + return {tokenize: tokenBase}; + }, + token: function (stream, state) { + return state.tokenize(stream, state); + } + }; +}); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/julia/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/julia/index.html new file mode 100644 index 00000000..dd567a62 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/julia/index.html @@ -0,0 +1,187 @@ + + +CodeMirror: Julia mode + + + + + + + + + +
+

Julia mode

+ +
+ + +

MIME types defined: text/x-julia.

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/julia/julia.js b/pitfall/pdfkit/node_modules/codemirror/mode/julia/julia.js new file mode 100644 index 00000000..9ec2428c --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/julia/julia.js @@ -0,0 +1,262 @@ +CodeMirror.defineMode("julia", function(_conf, parserConf) { + var ERRORCLASS = 'error'; + + function wordRegexp(words) { + return new RegExp("^((" + words.join(")|(") + "))\\b"); + } + + var operators = parserConf.operators || /^(?:\.?[|&^\\%*+\-<>!=\/]=?|\?|~|:|\$|<:|\.[<>]|<<=?|>>>?=?|\.[<>=]=|->?|\/\/|\bin\b|\.{3})/; + var delimiters = parserConf.delimiters || /^[;,()[\]{}]/; + var identifiers = parserConf.identifiers|| /^[_A-Za-z][_A-Za-z0-9]*!*/; + var blockOpeners = ["begin", "function", "type", "immutable", "let", "macro", "for", "while", "quote", "if", "else", "elseif", "try", "finally", "catch"]; + var blockClosers = ["end", "else", "elseif", "catch", "finally"]; + var keywordList = ['if', 'else', 'elseif', 'while', 'for', 'begin', 'let', 'end', 'do', 'try', 'catch', 'finally', 'return', 'break', 'continue', 'global', 'local', 'const', 'export', 'import', 'importall', 'using', 'function', 'macro', 'module', 'baremodule', 'type', 'immutable', 'quote', 'typealias', 'abstract', 'bitstype', 'ccall']; + var builtinList = ['true', 'false', 'enumerate', 'open', 'close', 'nothing', 'NaN', 'Inf', 'print', 'println', 'Int8', 'Uint8', 'Int16', 'Uint16', 'Int32', 'Uint32', 'Int64', 'Uint64', 'Int128', 'Uint128', 'Bool', 'Char', 'Float16', 'Float32', 'Float64', 'Array', 'Vector', 'Matrix', 'String', 'UTF8String', 'ASCIIString', 'error', 'warn', 'info', '@printf']; + + //var stringPrefixes = new RegExp("^[br]?('|\")") + var stringPrefixes = /^[br]?('|"{3}|")/; + var keywords = wordRegexp(keywordList); + var builtins = wordRegexp(builtinList); + var openers = wordRegexp(blockOpeners); + var closers = wordRegexp(blockClosers); + var macro = /@[_A-Za-z][_A-Za-z0-9]*!*/; + var indentInfo = null; + + function in_array(state) { + var ch = cur_scope(state); + if(ch=="[" || ch=="{") { + return true; + } + else { + return false; + } + } + + function cur_scope(state) { + if(state.scopes.length==0) { + return null; + } + return state.scopes[state.scopes.length - 1]; + } + + // tokenizers + function tokenBase(stream, state) { + // Handle scope changes + var leaving_expr = state.leaving_expr; + state.leaving_expr = false; + if(leaving_expr) { + if(stream.match(/^'+/)) { + return 'operator'; + } + if(stream.match("...")) { + return 'operator'; + } + } + + if (stream.eatSpace()) { + return null; + } + + var ch = stream.peek(); + // Handle Comments + if (ch === '#') { + stream.skipToEnd(); + return 'comment'; + } + if(ch==='[') { + state.scopes.push("["); + } + + if(ch==='{') { + state.scopes.push("{"); + } + + var scope=cur_scope(state); + + if(scope==='[' && ch===']') { + state.scopes.pop(); + state.leaving_expr=true; + } + + if(scope==='{' && ch==='}') { + state.scopes.pop(); + state.leaving_expr=true; + } + + var match; + if(match=stream.match(openers, false)) { + state.scopes.push(match); + } + + if(!in_array(state) && stream.match(closers, false)) { + state.scopes.pop(); + } + + if(in_array(state)) { + if(stream.match("end")) { + return 'number'; + } + + } + if(stream.match("=>")) { + return 'operator'; + } + // Handle Number Literals + if (stream.match(/^[0-9\.]/, false)) { + var imMatcher = RegExp(/^im\b/); + var floatLiteral = false; + // Floats + if (stream.match(/^\d*\.\d+([ef][\+\-]?\d+)?/i)) { floatLiteral = true; } + if (stream.match(/^\d+\.\d*/)) { floatLiteral = true; } + if (stream.match(/^\.\d+/)) { floatLiteral = true; } + if (floatLiteral) { + // Float literals may be "imaginary" + stream.match(imMatcher); + return 'number'; + } + // Integers + var intLiteral = false; + // Hex + if (stream.match(/^0x[0-9a-f]+/i)) { intLiteral = true; } + // Binary + if (stream.match(/^0b[01]+/i)) { intLiteral = true; } + // Octal + if (stream.match(/^0o[0-7]+/i)) { intLiteral = true; } + // Decimal + if (stream.match(/^[1-9]\d*(e[\+\-]?\d+)?/)) { + // Decimal literals may be "imaginary" + stream.eat(/J/i); + // TODO - Can you have imaginary longs? + intLiteral = true; + } + // Zero by itself with no other piece of number. + if (stream.match(/^0(?![\dx])/i)) { intLiteral = true; } + if (intLiteral) { + // Integer literals may be "long" + stream.match(imMatcher); + return 'number'; + } + } + + // Handle Strings + if (stream.match(stringPrefixes)) { + state.tokenize = tokenStringFactory(stream.current()); + return state.tokenize(stream, state); + } + + // Handle operators and Delimiters + if (stream.match(operators)) { + return 'operator'; + } + + if (stream.match(delimiters)) { + return null; + } + + if (stream.match(keywords)) { + return 'keyword'; + } + + if (stream.match(builtins)) { + return 'builtin'; + } + + if (stream.match(macro)) { + return 'meta'; + } + + if (stream.match(identifiers)) { + state.leaving_expr=true; + return 'variable'; + } + // Handle non-detected items + stream.next(); + return ERRORCLASS; + } + + function tokenStringFactory(delimiter) { + while ('rub'.indexOf(delimiter.charAt(0).toLowerCase()) >= 0) { + delimiter = delimiter.substr(1); + } + var singleline = delimiter.length == 1; + var OUTCLASS = 'string'; + + function tokenString(stream, state) { + while (!stream.eol()) { + stream.eatWhile(/[^'"\\]/); + if (stream.eat('\\')) { + stream.next(); + if (singleline && stream.eol()) { + return OUTCLASS; + } + } else if (stream.match(delimiter)) { + state.tokenize = tokenBase; + return OUTCLASS; + } else { + stream.eat(/['"]/); + } + } + if (singleline) { + if (parserConf.singleLineStringErrors) { + return ERRORCLASS; + } else { + state.tokenize = tokenBase; + } + } + return OUTCLASS; + } + tokenString.isString = true; + return tokenString; + } + + function tokenLexer(stream, state) { + indentInfo = null; + var style = state.tokenize(stream, state); + var current = stream.current(); + + // Handle '.' connected identifiers + if (current === '.') { + style = stream.match(identifiers, false) ? null : ERRORCLASS; + if (style === null && state.lastStyle === 'meta') { + // Apply 'meta' style to '.' connected identifiers when + // appropriate. + style = 'meta'; + } + return style; + } + + return style; + } + + var external = { + startState: function() { + return { + tokenize: tokenBase, + scopes: [], + leaving_expr: false + }; + }, + + token: function(stream, state) { + var style = tokenLexer(stream, state); + state.lastStyle = style; + return style; + }, + + indent: function(state, textAfter) { + var delta = 0; + if(textAfter=="end" || textAfter=="]" || textAfter=="}" || textAfter=="else" || textAfter=="elseif" || textAfter=="catch" || textAfter=="finally") { + delta = -1; + } + return (state.scopes.length + delta) * 2; + }, + + lineComment: "#", + fold: "indent", + electricChars: "edlsifyh]}" + }; + return external; +}); + + +CodeMirror.defineMIME("text/x-julia", "julia"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/less/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/less/index.html new file mode 100644 index 00000000..7239143c --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/less/index.html @@ -0,0 +1,753 @@ + + +CodeMirror: LESS mode + + + + + + + + + + + +
+

LESS mode

+
+ + +

MIME types defined: text/x-less, text/css (if not previously defined).

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/less/less.js b/pitfall/pdfkit/node_modules/codemirror/mode/less/less.js new file mode 100644 index 00000000..da390748 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/less/less.js @@ -0,0 +1,346 @@ +/* + LESS mode - http://www.lesscss.org/ + Ported to CodeMirror by Peter Kroon + Report bugs/issues here: https://github.com/marijnh/CodeMirror/issues + GitHub: @peterkroon +*/ + +CodeMirror.defineMode("less", function(config) { + var indentUnit = config.indentUnit, type; + function ret(style, tp) {type = tp; return style;} + + var selectors = /(^\:root$|^\:nth\-child$|^\:nth\-last\-child$|^\:nth\-of\-type$|^\:nth\-last\-of\-type$|^\:first\-child$|^\:last\-child$|^\:first\-of\-type$|^\:last\-of\-type$|^\:only\-child$|^\:only\-of\-type$|^\:empty$|^\:link|^\:visited$|^\:active$|^\:hover$|^\:focus$|^\:target$|^\:lang$|^\:enabled^\:disabled$|^\:checked$|^\:first\-line$|^\:first\-letter$|^\:before$|^\:after$|^\:not$|^\:required$|^\:invalid$)/; + + function tokenBase(stream, state) { + var ch = stream.next(); + + if (ch == "@") {stream.eatWhile(/[\w\-]/); return ret("meta", stream.current());} + else if (ch == "/" && stream.eat("*")) { + state.tokenize = tokenCComment; + return tokenCComment(stream, state); + } else if (ch == "<" && stream.eat("!")) { + state.tokenize = tokenSGMLComment; + return tokenSGMLComment(stream, state); + } else if (ch == "=") ret(null, "compare"); + else if (ch == "|" && stream.eat("=")) return ret(null, "compare"); + else if (ch == "\"" || ch == "'") { + state.tokenize = tokenString(ch); + return state.tokenize(stream, state); + } else if (ch == "/") { // e.g.: .png will not be parsed as a class + if(stream.eat("/")){ + state.tokenize = tokenSComment; + return tokenSComment(stream, state); + } else { + if(type == "string" || type == "(") return ret("string", "string"); + if(state.stack[state.stack.length-1] !== undefined) return ret(null, ch); + stream.eatWhile(/[\a-zA-Z0-9\-_.\s]/); + if( /\/|\)|#/.test(stream.peek() || (stream.eatSpace() && stream.peek() === ")")) || stream.eol() )return ret("string", "string"); // let url(/images/logo.png) without quotes return as string + } + } else if (ch == "!") { + stream.match(/^\s*\w*/); + return ret("keyword", "important"); + } else if (/\d/.test(ch)) { + stream.eatWhile(/[\w.%]/); + return ret("number", "unit"); + } else if (/[,+<>*\/]/.test(ch)) { + if(stream.peek() == "=" || type == "a")return ret("string", "string"); + if(ch === ",")return ret(null, ch); + return ret(null, "select-op"); + } else if (/[;{}:\[\]()~\|]/.test(ch)) { + if(ch == ":"){ + stream.eatWhile(/[a-z\\\-]/); + if( selectors.test(stream.current()) ){ + return ret("tag", "tag"); + } else if(stream.peek() == ":"){//::-webkit-search-decoration + stream.next(); + stream.eatWhile(/[a-z\\\-]/); + if(stream.current().match(/\:\:\-(o|ms|moz|webkit)\-/))return ret("string", "string"); + if( selectors.test(stream.current().substring(1)) )return ret("tag", "tag"); + return ret(null, ch); + } else { + return ret(null, ch); + } + } else if(ch == "~"){ + if(type == "r")return ret("string", "string"); + } else { + return ret(null, ch); + } + } else if (ch == ".") { + if(type == "(")return ret("string", "string"); // allow url(../image.png) + stream.eatWhile(/[\a-zA-Z0-9\-_]/); + if(stream.peek() === " ")stream.eatSpace(); + if(stream.peek() === ")" || type === ":")return ret("number", "unit");//rgba(0,0,0,.25); + else if(stream.current().length >1){ + if(state.stack[state.stack.length-1] === "rule" && stream.peek().match(/{|,|\+|\(/) === null)return ret("number", "unit"); + } + return ret("tag", "tag"); + } else if (ch == "#") { + //we don't eat white-space, we want the hex color and or id only + stream.eatWhile(/[A-Za-z0-9]/); + //check if there is a proper hex color length e.g. #eee || #eeeEEE + if(stream.current().length == 4 || stream.current().length == 7){ + if(stream.current().match(/[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}/,false) != null){//is there a valid hex color value present in the current stream + //when not a valid hex value, parse as id + if(stream.current().substring(1) != stream.current().match(/[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3}/,false))return ret("atom", "tag"); + //eat white-space + stream.eatSpace(); + //when hex value declaration doesn't end with [;,] but is does with a slash/cc comment treat it as an id, just like the other hex values that don't end with[;,] + if( /[\/<>.(){!$%^&*_\-\\?=+\|#'~`]/.test(stream.peek()) ){ + if(type === "select-op")return ret("number", "unit"); else return ret("atom", "tag"); + } + //#time { color: #aaa } + else if(stream.peek() == "}" )return ret("number", "unit"); + //we have a valid hex color value, parse as id whenever an element/class is defined after the hex(id) value e.g. #eee aaa || #eee .aaa + else if( /[a-zA-Z\\]/.test(stream.peek()) )return ret("atom", "tag"); + //when a hex value is on the end of a line, parse as id + else if(stream.eol())return ret("atom", "tag"); + //default + else return ret("number", "unit"); + } else {//when not a valid hexvalue in the current stream e.g. #footer + stream.eatWhile(/[\w\\\-]/); + return ret("atom", stream.current()); + } + } else {//when not a valid hexvalue length + stream.eatWhile(/[\w\\\-]/); + if(state.stack[state.stack.length-1] === "rule")return ret("atom", stream.current());return ret("atom", stream.current()); + return ret("atom", "tag"); + } + } else if (ch == "&") { + stream.eatWhile(/[\w\-]/); + return ret(null, ch); + } else { + stream.eatWhile(/[\w\\\-_%.{]/); + if(stream.current().match(/\\/) !== null){ + if(stream.current().charAt(stream.current().length-1) === "\\"){ + stream.eat(/\'|\"|\)|\(/); + while(stream.eatWhile(/[\w\\\-_%.{]/)){ + stream.eat(/\'|\"|\)|\(/); + } + return ret("string", stream.current()); + } + } //else if(type === "tag")return ret("tag", "tag"); + else if(type == "string"){ + if(state.stack[state.stack.length-1] === "{" && stream.peek() === ":")return ret("variable", "variable"); + if(stream.peek() === "/")stream.eatWhile(/[\w\\\-_%.{:\/]/); + return ret(type, stream.current()); + } else if(stream.current().match(/(^http$|^https$)/) != null){ + stream.eatWhile(/[\w\\\-_%.{:\/]/); + if(stream.peek() === "/")stream.eatWhile(/[\w\\\-_%.{:\/]/); + return ret("string", "string"); + } else if(stream.peek() == "<" || stream.peek() == ">" || stream.peek() == "+"){ + if(type === "(" && (stream.current() === "n" || stream.current() === "-n"))return ret("string", stream.current()); + return ret("tag", "tag"); + } else if( /\(/.test(stream.peek()) ){ + if(stream.current() === "when")return ret("variable","variable"); + else if(state.stack[state.stack.length-1] === "@media" && stream.current() === "and")return ret("variable",stream.current()); + return ret(null, ch); + } else if (stream.peek() == "/" && state.stack[state.stack.length-1] !== undefined){ // url(dir/center/image.png) + if(stream.peek() === "/")stream.eatWhile(/[\w\\\-_%.{:\/]/); + return ret("string", stream.current()); + } else if( stream.current().match(/\-\d|\-.\d/) ){ // match e.g.: -5px -0.4 etc... only colorize the minus sign + //commment out these 2 comment if you want the minus sign to be parsed as null -500px + //stream.backUp(stream.current().length-1); + //return ret(null, ch); + return ret("number", "unit"); + } else if( /\/|[\s\)]/.test(stream.peek() || stream.eol() || (stream.eatSpace() && stream.peek() == "/")) && stream.current().indexOf(".") !== -1){ + if(stream.current().substring(stream.current().length-1,stream.current().length) == "{"){ + stream.backUp(1); + return ret("tag", "tag"); + }//end if + stream.eatSpace(); + if( /[{<>.a-zA-Z\/]/.test(stream.peek()) || stream.eol() )return ret("tag", "tag"); // e.g. button.icon-plus + return ret("string", "string"); // let url(/images/logo.png) without quotes return as string + } else if( stream.eol() || stream.peek() == "[" || stream.peek() == "#" || type == "tag" ){ + + if(stream.current().substring(stream.current().length-1,stream.current().length) == "{")stream.backUp(1); + else if(state.stack[state.stack.length-1] === "border-color" || state.stack[state.stack.length-1] === "background-position" || state.stack[state.stack.length-1] === "font-family")return ret(null, stream.current()); + else if(type === "tag")return ret("tag", "tag"); + else if((type === ":" || type === "unit") && state.stack[state.stack.length-1] === "rule")return ret(null, stream.current()); + else if(state.stack[state.stack.length-1] === "rule" && type === "tag")return ret("string", stream.current()); + else if(state.stack[state.stack.length-1] === ";" && type === ":")return ret(null, stream.current()); + //else if(state.stack[state.stack.length-1] === ";" || type === "")return ret("variable", stream.current()); + else if(stream.peek() === "#" && type !== undefined && type.match(/\+|,|tag|select\-op|}|{|;/g) === null)return ret("string", stream.current()); + else if(type === "variable")return ret(null, stream.current()); + else if(state.stack[state.stack.length-1] === "{" && type === "comment")return ret("variable", stream.current()); + else if(state.stack.length === 0 && (type === ";" || type === "comment"))return ret("tag", stream.current()); + else if((state.stack[state.stack.length-1] === "{" || type === ";") && state.stack[state.stack.length-1] !== "@media{")return ret("variable", stream.current()); + else if(state.stack[state.stack.length-2] === "{" && state.stack[state.stack.length-1] === ";")return ret("variable", stream.current()); + + return ret("tag", "tag"); + } else if(type == "compare" || type == "a" || type == "("){ + return ret("string", "string"); + } else if(type == "|" || stream.current() == "-" || type == "["){ + if(type == "|" && stream.peek().match(/\]|=|\~/) !== null)return ret("number", stream.current()); + else if(type == "|" )return ret("tag", "tag"); + else if(type == "["){ + stream.eatWhile(/\w\-/); + return ret("number", stream.current()); + } + return ret(null, ch); + } else if((stream.peek() == ":") || ( stream.eatSpace() && stream.peek() == ":")) { + stream.next(); + var t_v = stream.peek() == ":" ? true : false; + if(!t_v){ + var old_pos = stream.pos; + var sc = stream.current().length; + stream.eatWhile(/[a-z\\\-]/); + var new_pos = stream.pos; + if(stream.current().substring(sc-1).match(selectors) != null){ + stream.backUp(new_pos-(old_pos-1)); + return ret("tag", "tag"); + } else stream.backUp(new_pos-(old_pos-1)); + } else { + stream.backUp(1); + } + if(t_v)return ret("tag", "tag"); else return ret("variable", "variable"); + } else if(state.stack[state.stack.length-1] === "font-family" || state.stack[state.stack.length-1] === "background-position" || state.stack[state.stack.length-1] === "border-color"){ + return ret(null, null); + } else { + + if(state.stack[state.stack.length-1] === null && type === ":")return ret(null, stream.current()); + + //else if((type === ")" && state.stack[state.stack.length-1] === "rule") || (state.stack[state.stack.length-2] === "{" && state.stack[state.stack.length-1] === "rule" && type === "variable"))return ret(null, stream.current()); + + else if(/\^|\$/.test(stream.current()) && stream.peek().match(/\~|=/) !== null)return ret("string", "string");//att^=val + + else if(type === "unit" && state.stack[state.stack.length-1] === "rule")return ret(null, "unit"); + else if(type === "unit" && state.stack[state.stack.length-1] === ";")return ret(null, "unit"); + else if(type === ")" && state.stack[state.stack.length-1] === "rule")return ret(null, "unit"); + else if(type && type.match("@") !== null && state.stack[state.stack.length-1] === "rule")return ret(null, "unit"); + //else if(type === "unit" && state.stack[state.stack.length-1] === "rule")return ret(null, stream.current()); + + else if((type === ";" || type === "}" || type === ",") && state.stack[state.stack.length-1] === ";")return ret("tag", stream.current()); + else if((type === ";" && stream.peek() !== undefined && stream.peek().match(/{|./) === null) || (type === ";" && stream.eatSpace() && stream.peek().match(/{|./) === null))return ret("variable", stream.current()); + else if((type === "@media" && state.stack[state.stack.length-1] === "@media") || type === "@namespace")return ret("tag", stream.current()); + + else if(type === "{" && state.stack[state.stack.length-1] === ";" && stream.peek() === "{")return ret("tag", "tag"); + else if((type === "{" || type === ":") && state.stack[state.stack.length-1] === ";")return ret(null, stream.current()); + else if((state.stack[state.stack.length-1] === "{" && stream.eatSpace() && stream.peek().match(/.|#/) === null) || type === "select-op" || (state.stack[state.stack.length-1] === "rule" && type === ",") )return ret("tag", "tag"); + else if(type === "variable" && state.stack[state.stack.length-1] === "rule")return ret("tag", "tag"); + else if((stream.eatSpace() && stream.peek() === "{") || stream.eol() || stream.peek() === "{")return ret("tag", "tag"); + //this one messes up indentation + //else if((type === "}" && stream.peek() !== ":") || (type === "}" && stream.eatSpace() && stream.peek() !== ":"))return(type, "tag"); + + else if(type === ")" && (stream.current() == "and" || stream.current() == "and "))return ret("variable", "variable"); + else if(type === ")" && (stream.current() == "when" || stream.current() == "when "))return ret("variable", "variable"); + else if(type === ")" || type === "comment" || type === "{")return ret("tag", "tag"); + else if(stream.sol())return ret("tag", "tag"); + else if((stream.eatSpace() && stream.peek() === "#") || stream.peek() === "#")return ret("tag", "tag"); + else if(state.stack.length === 0)return ret("tag", "tag"); + else if(type === ";" && stream.peek() !== undefined && stream.peek().match(/^[.|\#]/g) !== null)return ret("tag", "tag"); + + else if(type === ":"){stream.eatSpace();return ret(null, stream.current());} + + else if(stream.current() === "and " || stream.current() === "and")return ret("variable", stream.current()); + else if(type === ";" && state.stack[state.stack.length-1] === "{")return ret("variable", stream.current()); + + else if(state.stack[state.stack.length-1] === "rule")return ret(null, stream.current()); + + return ret("tag", stream.current()); + } + } + } + + function tokenSComment(stream, state) { // SComment = Slash comment + stream.skipToEnd(); + state.tokenize = tokenBase; + return ret("comment", "comment"); + } + + function tokenCComment(stream, state) { + var maybeEnd = false, ch; + while ((ch = stream.next()) != null) { + if (maybeEnd && ch == "/") { + state.tokenize = tokenBase; + break; + } + maybeEnd = (ch == "*"); + } + return ret("comment", "comment"); + } + + function tokenSGMLComment(stream, state) { + var dashes = 0, ch; + while ((ch = stream.next()) != null) { + if (dashes >= 2 && ch == ">") { + state.tokenize = tokenBase; + break; + } + dashes = (ch == "-") ? dashes + 1 : 0; + } + return ret("comment", "comment"); + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, ch; + while ((ch = stream.next()) != null) { + if (ch == quote && !escaped) + break; + escaped = !escaped && ch == "\\"; + } + if (!escaped) state.tokenize = tokenBase; + return ret("string", "string"); + }; + } + + return { + startState: function(base) { + return {tokenize: tokenBase, + baseIndent: base || 0, + stack: []}; + }, + + token: function(stream, state) { + if (stream.eatSpace()) return null; + var style = state.tokenize(stream, state); + + var context = state.stack[state.stack.length-1]; + if (type == "hash" && context == "rule") style = "atom"; + else if (style == "variable") { + if (context == "rule") style = null; //"tag" + else if (!context || context == "@media{") { + style = stream.current() == "when" ? "variable" : + /[\s,|\s\)|\s]/.test(stream.peek()) ? "tag" : type; + } + } + + if (context == "rule" && /^[\{\};]$/.test(type)) + state.stack.pop(); + if (type == "{") { + if (context == "@media") state.stack[state.stack.length-1] = "@media{"; + else state.stack.push("{"); + } + else if (type == "}") state.stack.pop(); + else if (type == "@media") state.stack.push("@media"); + else if (stream.current() === "font-family") state.stack[state.stack.length-1] = "font-family"; + else if (stream.current() === "background-position") state.stack[state.stack.length-1] = "background-position"; + else if (stream.current() === "border-color") state.stack[state.stack.length-1] = "border-color"; + else if (context == "{" && type != "comment" && type !== "tag") state.stack.push("rule"); + else if (stream.peek() === ":" && stream.current().match(/@|#/) === null) style = type; + if(type === ";" && (state.stack[state.stack.length-1] == "font-family" || state.stack[state.stack.length-1] == "background-position" || state.stack[state.stack.length-1] == "border-color"))state.stack[state.stack.length-1] = stream.current(); + else if(type === "tag" && stream.peek() === ")" && stream.current().match(/\:/) === null){type = null; style = null;} + // ???? + else if((type === "variable" && stream.peek() === ")") || (type === "variable" && stream.eatSpace() && stream.peek() === ")"))return ret(null,stream.current()); + return style; + }, + + indent: function(state, textAfter) { + var n = state.stack.length; + if (/^\}/.test(textAfter)) + n -= state.stack[state.stack.length-1] === "rule" ? 2 : 1; + else if (state.stack[state.stack.length-2] === "{") + n -= state.stack[state.stack.length-1] === "rule" ? 1 : 0; + return state.baseIndent + n * indentUnit; + }, + + electricChars: "}", + blockCommentStart: "/*", + blockCommentEnd: "*/", + lineComment: "//" + }; +}); + +CodeMirror.defineMIME("text/x-less", "less"); +if (!CodeMirror.mimeModes.hasOwnProperty("text/css")) + CodeMirror.defineMIME("text/css", "less"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/livescript/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/livescript/index.html new file mode 100644 index 00000000..b5944697 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/livescript/index.html @@ -0,0 +1,459 @@ + + +CodeMirror: LiveScript mode + + + + + + + + + + +
+

LiveScript mode

+
+ + +

MIME types defined: text/x-livescript.

+ +

The LiveScript mode was written by Kenneth Bentley (license).

+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/livescript/livescript.js b/pitfall/pdfkit/node_modules/codemirror/mode/livescript/livescript.js new file mode 100644 index 00000000..c000324b --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/livescript/livescript.js @@ -0,0 +1,267 @@ +/** + * Link to the project's GitHub page: + * https://github.com/duralog/CodeMirror + */ +(function() { + CodeMirror.defineMode('livescript', function(){ + var tokenBase, external; + tokenBase = function(stream, state){ + var next_rule, nr, i$, len$, r, m; + if (next_rule = state.next || 'start') { + state.next = state.next; + if (Array.isArray(nr = Rules[next_rule])) { + for (i$ = 0, len$ = nr.length; i$ < len$; ++i$) { + r = nr[i$]; + if (r.regex && (m = stream.match(r.regex))) { + state.next = r.next; + return r.token; + } + } + stream.next(); + return 'error'; + } + if (stream.match(r = Rules[next_rule])) { + if (r.regex && stream.match(r.regex)) { + state.next = r.next; + return r.token; + } else { + stream.next(); + return 'error'; + } + } + } + stream.next(); + return 'error'; + }; + external = { + startState: function(){ + return { + next: 'start', + lastToken: null + }; + }, + token: function(stream, state){ + var style; + style = tokenBase(stream, state); + state.lastToken = { + style: style, + indent: stream.indentation(), + content: stream.current() + }; + return style.replace(/\./g, ' '); + }, + indent: function(state){ + var indentation; + indentation = state.lastToken.indent; + if (state.lastToken.content.match(indenter)) { + indentation += 2; + } + return indentation; + } + }; + return external; + }); + + var identifier = '(?![\\d\\s])[$\\w\\xAA-\\uFFDC](?:(?!\\s)[$\\w\\xAA-\\uFFDC]|-[A-Za-z])*'; + var indenter = RegExp('(?:[({[=:]|[-~]>|\\b(?:e(?:lse|xport)|d(?:o|efault)|t(?:ry|hen)|finally|import(?:\\s*all)?|const|var|let|new|catch(?:\\s*' + identifier + ')?))\\s*$'); + var keywordend = '(?![$\\w]|-[A-Za-z]|\\s*:(?![:=]))'; + var stringfill = { + token: 'string', + regex: '.+' + }; + var Rules = { + start: [ + { + token: 'comment.doc', + regex: '/\\*', + next: 'comment' + }, { + token: 'comment', + regex: '#.*' + }, { + token: 'keyword', + regex: '(?:t(?:h(?:is|row|en)|ry|ypeof!?)|c(?:on(?:tinue|st)|a(?:se|tch)|lass)|i(?:n(?:stanceof)?|mp(?:ort(?:\\s+all)?|lements)|[fs])|d(?:e(?:fault|lete|bugger)|o)|f(?:or(?:\\s+own)?|inally|unction)|s(?:uper|witch)|e(?:lse|x(?:tends|port)|val)|a(?:nd|rguments)|n(?:ew|ot)|un(?:less|til)|w(?:hile|ith)|o[fr]|return|break|let|var|loop)' + keywordend + }, { + token: 'constant.language', + regex: '(?:true|false|yes|no|on|off|null|void|undefined)' + keywordend + }, { + token: 'invalid.illegal', + regex: '(?:p(?:ackage|r(?:ivate|otected)|ublic)|i(?:mplements|nterface)|enum|static|yield)' + keywordend + }, { + token: 'language.support.class', + regex: '(?:R(?:e(?:gExp|ferenceError)|angeError)|S(?:tring|yntaxError)|E(?:rror|valError)|Array|Boolean|Date|Function|Number|Object|TypeError|URIError)' + keywordend + }, { + token: 'language.support.function', + regex: '(?:is(?:NaN|Finite)|parse(?:Int|Float)|Math|JSON|(?:en|de)codeURI(?:Component)?)' + keywordend + }, { + token: 'variable.language', + regex: '(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)' + keywordend + }, { + token: 'identifier', + regex: identifier + '\\s*:(?![:=])' + }, { + token: 'variable', + regex: identifier + }, { + token: 'keyword.operator', + regex: '(?:\\.{3}|\\s+\\?)' + }, { + token: 'keyword.variable', + regex: '(?:@+|::|\\.\\.)', + next: 'key' + }, { + token: 'keyword.operator', + regex: '\\.\\s*', + next: 'key' + }, { + token: 'string', + regex: '\\\\\\S[^\\s,;)}\\]]*' + }, { + token: 'string.doc', + regex: '\'\'\'', + next: 'qdoc' + }, { + token: 'string.doc', + regex: '"""', + next: 'qqdoc' + }, { + token: 'string', + regex: '\'', + next: 'qstring' + }, { + token: 'string', + regex: '"', + next: 'qqstring' + }, { + token: 'string', + regex: '`', + next: 'js' + }, { + token: 'string', + regex: '<\\[', + next: 'words' + }, { + token: 'string.regex', + regex: '//', + next: 'heregex' + }, { + token: 'string.regex', + regex: '\\/(?:[^[\\/\\n\\\\]*(?:(?:\\\\.|\\[[^\\]\\n\\\\]*(?:\\\\.[^\\]\\n\\\\]*)*\\])[^[\\/\\n\\\\]*)*)\\/[gimy$]{0,4}', + next: 'key' + }, { + token: 'constant.numeric', + regex: '(?:0x[\\da-fA-F][\\da-fA-F_]*|(?:[2-9]|[12]\\d|3[0-6])r[\\da-zA-Z][\\da-zA-Z_]*|(?:\\d[\\d_]*(?:\\.\\d[\\d_]*)?|\\.\\d[\\d_]*)(?:e[+-]?\\d[\\d_]*)?[\\w$]*)' + }, { + token: 'lparen', + regex: '[({[]' + }, { + token: 'rparen', + regex: '[)}\\]]', + next: 'key' + }, { + token: 'keyword.operator', + regex: '\\S+' + }, { + token: 'text', + regex: '\\s+' + } + ], + heregex: [ + { + token: 'string.regex', + regex: '.*?//[gimy$?]{0,4}', + next: 'start' + }, { + token: 'string.regex', + regex: '\\s*#{' + }, { + token: 'comment.regex', + regex: '\\s+(?:#.*)?' + }, { + token: 'string.regex', + regex: '\\S+' + } + ], + key: [ + { + token: 'keyword.operator', + regex: '[.?@!]+' + }, { + token: 'identifier', + regex: identifier, + next: 'start' + }, { + token: 'text', + regex: '.', + next: 'start' + } + ], + comment: [ + { + token: 'comment.doc', + regex: '.*?\\*/', + next: 'start' + }, { + token: 'comment.doc', + regex: '.+' + } + ], + qdoc: [ + { + token: 'string', + regex: ".*?'''", + next: 'key' + }, stringfill + ], + qqdoc: [ + { + token: 'string', + regex: '.*?"""', + next: 'key' + }, stringfill + ], + qstring: [ + { + token: 'string', + regex: '[^\\\\\']*(?:\\\\.[^\\\\\']*)*\'', + next: 'key' + }, stringfill + ], + qqstring: [ + { + token: 'string', + regex: '[^\\\\"]*(?:\\\\.[^\\\\"]*)*"', + next: 'key' + }, stringfill + ], + js: [ + { + token: 'string', + regex: '[^\\\\`]*(?:\\\\.[^\\\\`]*)*`', + next: 'key' + }, stringfill + ], + words: [ + { + token: 'string', + regex: '.*?\\]>', + next: 'key' + }, stringfill + ] + }; + for (var idx in Rules) { + var r = Rules[idx]; + if (Array.isArray(r)) { + for (var i = 0, len = r.length; i < len; ++i) { + var rr = r[i]; + if (rr.regex) { + Rules[idx][i].regex = new RegExp('^' + rr.regex); + } + } + } else if (r.regex) { + Rules[idx].regex = new RegExp('^' + r.regex); + } + } +})(); + +CodeMirror.defineMIME('text/x-livescript', 'livescript'); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/livescript/livescript.ls b/pitfall/pdfkit/node_modules/codemirror/mode/livescript/livescript.ls new file mode 100644 index 00000000..06524231 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/livescript/livescript.ls @@ -0,0 +1,266 @@ +/** + * Link to the project's GitHub page: + * https://github.com/duralog/CodeMirror + */ +CodeMirror.defineMode 'livescript', (conf) -> + tokenBase = (stream, state) -> + #indent = + if next_rule = state.next or \start + state.next = state.next + if Array.isArray nr = Rules[next_rule] + for r in nr + if r.regex and m = stream.match r.regex + state.next = r.next + return r.token + stream.next! + return \error + if stream.match r = Rules[next_rule] + if r.regex and stream.match r.regex + state.next = r.next + return r.token + else + stream.next! + return \error + stream.next! + return 'error' + external = { + startState: (basecolumn) -> + { + next: \start + lastToken: null + } + token: (stream, state) -> + style = tokenBase stream, state #tokenLexer stream, state + state.lastToken = { + style: style + indent: stream.indentation! + content: stream.current! + } + style.replace /\./g, ' ' + indent: (state, textAfter) -> + # XXX this won't work with backcalls + indentation = state.lastToken.indent + if state.lastToken.content.match indenter then indentation += 2 + return indentation + } + external + +### Highlight Rules +# taken from mode-ls.ls + +indenter = // (? + : [({[=:] + | [-~]> + | \b (?: e(?:lse|xport) | d(?:o|efault) | t(?:ry|hen) | finally | + import (?:\s* all)? | const | var | + let | new | catch (?:\s* #identifier)? ) + ) \s* $ // + +identifier = /(?![\d\s])[$\w\xAA-\uFFDC](?:(?!\s)[$\w\xAA-\uFFDC]|-[A-Za-z])*/$ +keywordend = /(?![$\w]|-[A-Za-z]|\s*:(?![:=]))/$ +stringfill = token: \string, regex: '.+' + +Rules = + start: + * token: \comment.doc + regex: '/\\*' + next : \comment + + * token: \comment + regex: '#.*' + + * token: \keyword + regex: //(? + :t(?:h(?:is|row|en)|ry|ypeof!?) + |c(?:on(?:tinue|st)|a(?:se|tch)|lass) + |i(?:n(?:stanceof)?|mp(?:ort(?:\s+all)?|lements)|[fs]) + |d(?:e(?:fault|lete|bugger)|o) + |f(?:or(?:\s+own)?|inally|unction) + |s(?:uper|witch) + |e(?:lse|x(?:tends|port)|val) + |a(?:nd|rguments) + |n(?:ew|ot) + |un(?:less|til) + |w(?:hile|ith) + |o[fr]|return|break|let|var|loop + )//$ + keywordend + + * token: \constant.language + regex: '(?:true|false|yes|no|on|off|null|void|undefined)' + keywordend + + * token: \invalid.illegal + regex: '(? + :p(?:ackage|r(?:ivate|otected)|ublic) + |i(?:mplements|nterface) + |enum|static|yield + )' + keywordend + + * token: \language.support.class + regex: '(? + :R(?:e(?:gExp|ferenceError)|angeError) + |S(?:tring|yntaxError) + |E(?:rror|valError) + |Array|Boolean|Date|Function|Number|Object|TypeError|URIError + )' + keywordend + + * token: \language.support.function + regex: '(? + :is(?:NaN|Finite) + |parse(?:Int|Float) + |Math|JSON + |(?:en|de)codeURI(?:Component)? + )' + keywordend + + * token: \variable.language + regex: '(?:t(?:hat|il|o)|f(?:rom|allthrough)|it|by|e)' + keywordend + + * token: \identifier + regex: identifier + /\s*:(?![:=])/$ + + * token: \variable + regex: identifier + + * token: \keyword.operator + regex: /(?:\.{3}|\s+\?)/$ + + * token: \keyword.variable + regex: /(?:@+|::|\.\.)/$ + next : \key + + * token: \keyword.operator + regex: /\.\s*/$ + next : \key + + * token: \string + regex: /\\\S[^\s,;)}\]]*/$ + + * token: \string.doc + regex: \''' + next : \qdoc + + * token: \string.doc + regex: \""" + next : \qqdoc + + * token: \string + regex: \' + next : \qstring + + * token: \string + regex: \" + next : \qqstring + + * token: \string + regex: \` + next : \js + + * token: \string + regex: '<\\[' + next : \words + + * token: \string.regex + regex: \// + next : \heregex + + * token: \string.regex + regex: // + /(?: [^ [ / \n \\ ]* + (?: (?: \\. + | \[ [^\]\n\\]* (?:\\.[^\]\n\\]*)* \] + ) [^ [ / \n \\ ]* + )* + )/ [gimy$]{0,4} + //$ + next : \key + + * token: \constant.numeric + regex: '(?:0x[\\da-fA-F][\\da-fA-F_]* + |(?:[2-9]|[12]\\d|3[0-6])r[\\da-zA-Z][\\da-zA-Z_]* + |(?:\\d[\\d_]*(?:\\.\\d[\\d_]*)?|\\.\\d[\\d_]*) + (?:e[+-]?\\d[\\d_]*)?[\\w$]*)' + + * token: \lparen + regex: '[({[]' + + * token: \rparen + regex: '[)}\\]]' + next : \key + + * token: \keyword.operator + regex: \\\S+ + + * token: \text + regex: \\\s+ + + heregex: + * token: \string.regex + regex: '.*?//[gimy$?]{0,4}' + next : \start + * token: \string.regex + regex: '\\s*#{' + * token: \comment.regex + regex: '\\s+(?:#.*)?' + * token: \string.regex + regex: '\\S+' + + key: + * token: \keyword.operator + regex: '[.?@!]+' + * token: \identifier + regex: identifier + next : \start + * token: \text + regex: '.' + next : \start + + comment: + * token: \comment.doc + regex: '.*?\\*/' + next : \start + * token: \comment.doc + regex: '.+' + + qdoc: + token: \string + regex: ".*?'''" + next : \key + stringfill + + qqdoc: + token: \string + regex: '.*?"""' + next : \key + stringfill + + qstring: + token: \string + regex: /[^\\']*(?:\\.[^\\']*)*'/$ + next : \key + stringfill + + qqstring: + token: \string + regex: /[^\\"]*(?:\\.[^\\"]*)*"/$ + next : \key + stringfill + + js: + token: \string + regex: /[^\\`]*(?:\\.[^\\`]*)*`/$ + next : \key + stringfill + + words: + token: \string + regex: '.*?\\]>' + next : \key + stringfill + +# for optimization, precompile the regexps +for idx, r of Rules + if Array.isArray r + for rr, i in r + if rr.regex then Rules[idx][i].regex = new RegExp '^'+rr.regex + else if r.regex then Rules[idx].regex = new RegExp '^'+r.regex + +CodeMirror.defineMIME 'text/x-livescript', 'livescript' diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/lua/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/lua/index.html new file mode 100644 index 00000000..69433e44 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/lua/index.html @@ -0,0 +1,86 @@ + + +CodeMirror: Lua mode + + + + + + + + + + + +
+

Lua mode

+
+ + +

Loosely based on Franciszek + Wawrzak's CodeMirror + 1 mode. One configuration parameter is + supported, specials, to which you can provide an + array of strings to have those identifiers highlighted with + the lua-special style.

+

MIME types defined: text/x-lua.

+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/lua/lua.js b/pitfall/pdfkit/node_modules/codemirror/mode/lua/lua.js new file mode 100644 index 00000000..b8deaa25 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/lua/lua.js @@ -0,0 +1,144 @@ +// LUA mode. Ported to CodeMirror 2 from Franciszek Wawrzak's +// CodeMirror 1 mode. +// highlights keywords, strings, comments (no leveling supported! ("[==[")), tokens, basic indenting + +CodeMirror.defineMode("lua", function(config, parserConfig) { + var indentUnit = config.indentUnit; + + function prefixRE(words) { + return new RegExp("^(?:" + words.join("|") + ")", "i"); + } + function wordRE(words) { + return new RegExp("^(?:" + words.join("|") + ")$", "i"); + } + var specials = wordRE(parserConfig.specials || []); + + // long list of standard functions from lua manual + var builtins = wordRE([ + "_G","_VERSION","assert","collectgarbage","dofile","error","getfenv","getmetatable","ipairs","load", + "loadfile","loadstring","module","next","pairs","pcall","print","rawequal","rawget","rawset","require", + "select","setfenv","setmetatable","tonumber","tostring","type","unpack","xpcall", + + "coroutine.create","coroutine.resume","coroutine.running","coroutine.status","coroutine.wrap","coroutine.yield", + + "debug.debug","debug.getfenv","debug.gethook","debug.getinfo","debug.getlocal","debug.getmetatable", + "debug.getregistry","debug.getupvalue","debug.setfenv","debug.sethook","debug.setlocal","debug.setmetatable", + "debug.setupvalue","debug.traceback", + + "close","flush","lines","read","seek","setvbuf","write", + + "io.close","io.flush","io.input","io.lines","io.open","io.output","io.popen","io.read","io.stderr","io.stdin", + "io.stdout","io.tmpfile","io.type","io.write", + + "math.abs","math.acos","math.asin","math.atan","math.atan2","math.ceil","math.cos","math.cosh","math.deg", + "math.exp","math.floor","math.fmod","math.frexp","math.huge","math.ldexp","math.log","math.log10","math.max", + "math.min","math.modf","math.pi","math.pow","math.rad","math.random","math.randomseed","math.sin","math.sinh", + "math.sqrt","math.tan","math.tanh", + + "os.clock","os.date","os.difftime","os.execute","os.exit","os.getenv","os.remove","os.rename","os.setlocale", + "os.time","os.tmpname", + + "package.cpath","package.loaded","package.loaders","package.loadlib","package.path","package.preload", + "package.seeall", + + "string.byte","string.char","string.dump","string.find","string.format","string.gmatch","string.gsub", + "string.len","string.lower","string.match","string.rep","string.reverse","string.sub","string.upper", + + "table.concat","table.insert","table.maxn","table.remove","table.sort" + ]); + var keywords = wordRE(["and","break","elseif","false","nil","not","or","return", + "true","function", "end", "if", "then", "else", "do", + "while", "repeat", "until", "for", "in", "local" ]); + + var indentTokens = wordRE(["function", "if","repeat","do", "\\(", "{"]); + var dedentTokens = wordRE(["end", "until", "\\)", "}"]); + var dedentPartial = prefixRE(["end", "until", "\\)", "}", "else", "elseif"]); + + function readBracket(stream) { + var level = 0; + while (stream.eat("=")) ++level; + stream.eat("["); + return level; + } + + function normal(stream, state) { + var ch = stream.next(); + if (ch == "-" && stream.eat("-")) { + if (stream.eat("[") && stream.eat("[")) + return (state.cur = bracketed(readBracket(stream), "comment"))(stream, state); + stream.skipToEnd(); + return "comment"; + } + if (ch == "\"" || ch == "'") + return (state.cur = string(ch))(stream, state); + if (ch == "[" && /[\[=]/.test(stream.peek())) + return (state.cur = bracketed(readBracket(stream), "string"))(stream, state); + if (/\d/.test(ch)) { + stream.eatWhile(/[\w.%]/); + return "number"; + } + if (/[\w_]/.test(ch)) { + stream.eatWhile(/[\w\\\-_.]/); + return "variable"; + } + return null; + } + + function bracketed(level, style) { + return function(stream, state) { + var curlev = null, ch; + while ((ch = stream.next()) != null) { + if (curlev == null) {if (ch == "]") curlev = 0;} + else if (ch == "=") ++curlev; + else if (ch == "]" && curlev == level) { state.cur = normal; break; } + else curlev = null; + } + return style; + }; + } + + function string(quote) { + return function(stream, state) { + var escaped = false, ch; + while ((ch = stream.next()) != null) { + if (ch == quote && !escaped) break; + escaped = !escaped && ch == "\\"; + } + if (!escaped) state.cur = normal; + return "string"; + }; + } + + return { + startState: function(basecol) { + return {basecol: basecol || 0, indentDepth: 0, cur: normal}; + }, + + token: function(stream, state) { + if (stream.eatSpace()) return null; + var style = state.cur(stream, state); + var word = stream.current(); + if (style == "variable") { + if (keywords.test(word)) style = "keyword"; + else if (builtins.test(word)) style = "builtin"; + else if (specials.test(word)) style = "variable-2"; + } + if ((style != "comment") && (style != "string")){ + if (indentTokens.test(word)) ++state.indentDepth; + else if (dedentTokens.test(word)) --state.indentDepth; + } + return style; + }, + + indent: function(state, textAfter) { + var closing = dedentPartial.test(textAfter); + return state.basecol + indentUnit * (state.indentDepth - (closing ? 1 : 0)); + }, + + lineComment: "--", + blockCommentStart: "--[[", + blockCommentEnd: "]]" + }; +}); + +CodeMirror.defineMIME("text/x-lua", "lua"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/markdown/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/markdown/index.html new file mode 100644 index 00000000..a6b541e2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/markdown/index.html @@ -0,0 +1,359 @@ + + +CodeMirror: Markdown mode + + + + + + + + + + + +
+

Markdown mode

+
+ + + +

Optionally depends on the XML mode for properly highlighted inline XML blocks.

+ +

MIME types defined: text/x-markdown.

+ +

Parsing/Highlighting Tests: normal, verbose.

+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/markdown/markdown.js b/pitfall/pdfkit/node_modules/codemirror/mode/markdown/markdown.js new file mode 100644 index 00000000..218408fb --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/markdown/markdown.js @@ -0,0 +1,560 @@ +CodeMirror.defineMode("markdown", function(cmCfg, modeCfg) { + + var htmlFound = CodeMirror.modes.hasOwnProperty("xml"); + var htmlMode = CodeMirror.getMode(cmCfg, htmlFound ? {name: "xml", htmlMode: true} : "text/plain"); + var aliases = { + html: "htmlmixed", + js: "javascript", + json: "application/json", + c: "text/x-csrc", + "c++": "text/x-c++src", + java: "text/x-java", + csharp: "text/x-csharp", + "c#": "text/x-csharp", + scala: "text/x-scala" + }; + + var getMode = (function () { + var i, modes = {}, mimes = {}, mime; + + var list = []; + for (var m in CodeMirror.modes) + if (CodeMirror.modes.propertyIsEnumerable(m)) list.push(m); + for (i = 0; i < list.length; i++) { + modes[list[i]] = list[i]; + } + var mimesList = []; + for (var m in CodeMirror.mimeModes) + if (CodeMirror.mimeModes.propertyIsEnumerable(m)) + mimesList.push({mime: m, mode: CodeMirror.mimeModes[m]}); + for (i = 0; i < mimesList.length; i++) { + mime = mimesList[i].mime; + mimes[mime] = mimesList[i].mime; + } + + for (var a in aliases) { + if (aliases[a] in modes || aliases[a] in mimes) + modes[a] = aliases[a]; + } + + return function (lang) { + return modes[lang] ? CodeMirror.getMode(cmCfg, modes[lang]) : null; + }; + }()); + + // Should underscores in words open/close em/strong? + if (modeCfg.underscoresBreakWords === undefined) + modeCfg.underscoresBreakWords = true; + + // Turn on fenced code blocks? ("```" to start/end) + if (modeCfg.fencedCodeBlocks === undefined) modeCfg.fencedCodeBlocks = false; + + // Turn on task lists? ("- [ ] " and "- [x] ") + if (modeCfg.taskLists === undefined) modeCfg.taskLists = false; + + var codeDepth = 0; + + var header = 'header' + , code = 'comment' + , quote1 = 'atom' + , quote2 = 'number' + , list1 = 'variable-2' + , list2 = 'variable-3' + , list3 = 'keyword' + , hr = 'hr' + , image = 'tag' + , linkinline = 'link' + , linkemail = 'link' + , linktext = 'link' + , linkhref = 'string' + , em = 'em' + , strong = 'strong'; + + var hrRE = /^([*\-=_])(?:\s*\1){2,}\s*$/ + , ulRE = /^[*\-+]\s+/ + , olRE = /^[0-9]+\.\s+/ + , taskListRE = /^\[(x| )\](?=\s)/ // Must follow ulRE or olRE + , atxHeaderRE = /^#+/ + , setextHeaderRE = /^(?:\={1,}|-{1,})$/ + , textRE = /^[^!\[\]*_\\<>` "'(]+/; + + function switchInline(stream, state, f) { + state.f = state.inline = f; + return f(stream, state); + } + + function switchBlock(stream, state, f) { + state.f = state.block = f; + return f(stream, state); + } + + + // Blocks + + function blankLine(state) { + // Reset linkTitle state + state.linkTitle = false; + // Reset EM state + state.em = false; + // Reset STRONG state + state.strong = false; + // Reset state.quote + state.quote = 0; + if (!htmlFound && state.f == htmlBlock) { + state.f = inlineNormal; + state.block = blockNormal; + } + // Reset state.trailingSpace + state.trailingSpace = 0; + state.trailingSpaceNewLine = false; + // Mark this line as blank + state.thisLineHasContent = false; + return null; + } + + function blockNormal(stream, state) { + + var prevLineIsList = (state.list !== false); + if (state.list !== false && state.indentationDiff >= 0) { // Continued list + if (state.indentationDiff < 4) { // Only adjust indentation if *not* a code block + state.indentation -= state.indentationDiff; + } + state.list = null; + } else if (state.list !== false && state.indentation > 0) { + state.list = null; + state.listDepth = Math.floor(state.indentation / 4); + } else if (state.list !== false) { // No longer a list + state.list = false; + state.listDepth = 0; + } + + var match = null; + if (state.indentationDiff >= 4) { + state.indentation -= 4; + stream.skipToEnd(); + return code; + } else if (stream.eatSpace()) { + return null; + } else if (match = stream.match(atxHeaderRE)) { + state.header = match[0].length <= 6 ? match[0].length : 6; + } else if (state.prevLineHasContent && (match = stream.match(setextHeaderRE))) { + state.header = match[0].charAt(0) == '=' ? 1 : 2; + } else if (stream.eat('>')) { + state.indentation++; + state.quote = 1; + stream.eatSpace(); + while (stream.eat('>')) { + stream.eatSpace(); + state.quote++; + } + } else if (stream.peek() === '[') { + return switchInline(stream, state, footnoteLink); + } else if (stream.match(hrRE, true)) { + return hr; + } else if ((!state.prevLineHasContent || prevLineIsList) && (stream.match(ulRE, true) || stream.match(olRE, true))) { + state.indentation += 4; + state.list = true; + state.listDepth++; + if (modeCfg.taskLists && stream.match(taskListRE, false)) { + state.taskList = true; + } + } else if (modeCfg.fencedCodeBlocks && stream.match(/^```([\w+#]*)/, true)) { + // try switching mode + state.localMode = getMode(RegExp.$1); + if (state.localMode) state.localState = state.localMode.startState(); + switchBlock(stream, state, local); + return code; + } + + return switchInline(stream, state, state.inline); + } + + function htmlBlock(stream, state) { + var style = htmlMode.token(stream, state.htmlState); + if (htmlFound && style === 'tag' && state.htmlState.type !== 'openTag' && !state.htmlState.context) { + state.f = inlineNormal; + state.block = blockNormal; + } + if (state.md_inside && stream.current().indexOf(">")!=-1) { + state.f = inlineNormal; + state.block = blockNormal; + state.htmlState.context = undefined; + } + return style; + } + + function local(stream, state) { + if (stream.sol() && stream.match(/^```/, true)) { + state.localMode = state.localState = null; + state.f = inlineNormal; + state.block = blockNormal; + return code; + } else if (state.localMode) { + return state.localMode.token(stream, state.localState); + } else { + stream.skipToEnd(); + return code; + } + } + + // Inline + function getType(state) { + var styles = []; + + if (state.taskOpen) { return "meta"; } + if (state.taskClosed) { return "property"; } + + if (state.strong) { styles.push(strong); } + if (state.em) { styles.push(em); } + + if (state.linkText) { styles.push(linktext); } + + if (state.code) { styles.push(code); } + + if (state.header) { styles.push(header); styles.push(header + state.header); } + if (state.quote) { styles.push(state.quote % 2 ? quote1 : quote2); } + if (state.list !== false) { + var listMod = (state.listDepth - 1) % 3; + if (!listMod) { + styles.push(list1); + } else if (listMod === 1) { + styles.push(list2); + } else { + styles.push(list3); + } + } + + if (state.trailingSpaceNewLine) { + styles.push("trailing-space-new-line"); + } else if (state.trailingSpace) { + styles.push("trailing-space-" + (state.trailingSpace % 2 ? "a" : "b")); + } + + return styles.length ? styles.join(' ') : null; + } + + function handleText(stream, state) { + if (stream.match(textRE, true)) { + return getType(state); + } + return undefined; + } + + function inlineNormal(stream, state) { + var style = state.text(stream, state); + if (typeof style !== 'undefined') + return style; + + if (state.list) { // List marker (*, +, -, 1., etc) + state.list = null; + return getType(state); + } + + if (state.taskList) { + var taskOpen = stream.match(taskListRE, true)[1] !== "x"; + if (taskOpen) state.taskOpen = true; + else state.taskClosed = true; + state.taskList = false; + return getType(state); + } + + state.taskOpen = false; + state.taskClosed = false; + + // Get sol() value now, before character is consumed + var sol = stream.sol(); + + var ch = stream.next(); + + if (ch === '\\') { + stream.next(); + return getType(state); + } + + // Matches link titles present on next line + if (state.linkTitle) { + state.linkTitle = false; + var matchCh = ch; + if (ch === '(') { + matchCh = ')'; + } + matchCh = (matchCh+'').replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1"); + var regex = '^\\s*(?:[^' + matchCh + '\\\\]+|\\\\\\\\|\\\\.)' + matchCh; + if (stream.match(new RegExp(regex), true)) { + return linkhref; + } + } + + // If this block is changed, it may need to be updated in GFM mode + if (ch === '`') { + var t = getType(state); + var before = stream.pos; + stream.eatWhile('`'); + var difference = 1 + stream.pos - before; + if (!state.code) { + codeDepth = difference; + state.code = true; + return getType(state); + } else { + if (difference === codeDepth) { // Must be exact + state.code = false; + return t; + } + return getType(state); + } + } else if (state.code) { + return getType(state); + } + + if (ch === '!' && stream.match(/\[[^\]]*\] ?(?:\(|\[)/, false)) { + stream.match(/\[[^\]]*\]/); + state.inline = state.f = linkHref; + return image; + } + + if (ch === '[' && stream.match(/.*\](\(| ?\[)/, false)) { + state.linkText = true; + return getType(state); + } + + if (ch === ']' && state.linkText) { + var type = getType(state); + state.linkText = false; + state.inline = state.f = linkHref; + return type; + } + + if (ch === '<' && stream.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/, false)) { + return switchInline(stream, state, inlineElement(linkinline, '>')); + } + + if (ch === '<' && stream.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/, false)) { + return switchInline(stream, state, inlineElement(linkemail, '>')); + } + + if (ch === '<' && stream.match(/^\w/, false)) { + if (stream.string.indexOf(">")!=-1) { + var atts = stream.string.substring(1,stream.string.indexOf(">")); + if (/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(atts)) { + state.md_inside = true; + } + } + stream.backUp(1); + return switchBlock(stream, state, htmlBlock); + } + + if (ch === '<' && stream.match(/^\/\w*?>/)) { + state.md_inside = false; + return "tag"; + } + + var ignoreUnderscore = false; + if (!modeCfg.underscoresBreakWords) { + if (ch === '_' && stream.peek() !== '_' && stream.match(/(\w)/, false)) { + var prevPos = stream.pos - 2; + if (prevPos >= 0) { + var prevCh = stream.string.charAt(prevPos); + if (prevCh !== '_' && prevCh.match(/(\w)/, false)) { + ignoreUnderscore = true; + } + } + } + } + var t = getType(state); + if (ch === '*' || (ch === '_' && !ignoreUnderscore)) { + if (sol && stream.peek() === ' ') { + // Do nothing, surrounded by newline and space + } else if (state.strong === ch && stream.eat(ch)) { // Remove STRONG + state.strong = false; + return t; + } else if (!state.strong && stream.eat(ch)) { // Add STRONG + state.strong = ch; + return getType(state); + } else if (state.em === ch) { // Remove EM + state.em = false; + return t; + } else if (!state.em) { // Add EM + state.em = ch; + return getType(state); + } + } else if (ch === ' ') { + if (stream.eat('*') || stream.eat('_')) { // Probably surrounded by spaces + if (stream.peek() === ' ') { // Surrounded by spaces, ignore + return getType(state); + } else { // Not surrounded by spaces, back up pointer + stream.backUp(1); + } + } + } + + if (ch === ' ') { + if (stream.match(/ +$/, false)) { + state.trailingSpace++; + } else if (state.trailingSpace) { + state.trailingSpaceNewLine = true; + } + } + + return getType(state); + } + + function linkHref(stream, state) { + // Check if space, and return NULL if so (to avoid marking the space) + if(stream.eatSpace()){ + return null; + } + var ch = stream.next(); + if (ch === '(' || ch === '[') { + return switchInline(stream, state, inlineElement(linkhref, ch === '(' ? ')' : ']')); + } + return 'error'; + } + + function footnoteLink(stream, state) { + if (stream.match(/^[^\]]*\]:/, true)) { + state.f = footnoteUrl; + return linktext; + } + return switchInline(stream, state, inlineNormal); + } + + function footnoteUrl(stream, state) { + // Check if space, and return NULL if so (to avoid marking the space) + if(stream.eatSpace()){ + return null; + } + // Match URL + stream.match(/^[^\s]+/, true); + // Check for link title + if (stream.peek() === undefined) { // End of line, set flag to check next line + state.linkTitle = true; + } else { // More content on line, check if link title + stream.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/, true); + } + state.f = state.inline = inlineNormal; + return linkhref; + } + + var savedInlineRE = []; + function inlineRE(endChar) { + if (!savedInlineRE[endChar]) { + // Escape endChar for RegExp (taken from http://stackoverflow.com/a/494122/526741) + endChar = (endChar+'').replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1"); + // Match any non-endChar, escaped character, as well as the closing + // endChar. + savedInlineRE[endChar] = new RegExp('^(?:[^\\\\]|\\\\.)*?(' + endChar + ')'); + } + return savedInlineRE[endChar]; + } + + function inlineElement(type, endChar, next) { + next = next || inlineNormal; + return function(stream, state) { + stream.match(inlineRE(endChar)); + state.inline = state.f = next; + return type; + }; + } + + return { + startState: function() { + return { + f: blockNormal, + + prevLineHasContent: false, + thisLineHasContent: false, + + block: blockNormal, + htmlState: CodeMirror.startState(htmlMode), + indentation: 0, + + inline: inlineNormal, + text: handleText, + + linkText: false, + linkTitle: false, + em: false, + strong: false, + header: 0, + taskList: false, + list: false, + listDepth: 0, + quote: 0, + trailingSpace: 0, + trailingSpaceNewLine: false + }; + }, + + copyState: function(s) { + return { + f: s.f, + + prevLineHasContent: s.prevLineHasContent, + thisLineHasContent: s.thisLineHasContent, + + block: s.block, + htmlState: CodeMirror.copyState(htmlMode, s.htmlState), + indentation: s.indentation, + + localMode: s.localMode, + localState: s.localMode ? CodeMirror.copyState(s.localMode, s.localState) : null, + + inline: s.inline, + text: s.text, + linkTitle: s.linkTitle, + em: s.em, + strong: s.strong, + header: s.header, + taskList: s.taskList, + list: s.list, + listDepth: s.listDepth, + quote: s.quote, + trailingSpace: s.trailingSpace, + trailingSpaceNewLine: s.trailingSpaceNewLine, + md_inside: s.md_inside + }; + }, + + token: function(stream, state) { + if (stream.sol()) { + if (stream.match(/^\s*$/, true)) { + state.prevLineHasContent = false; + return blankLine(state); + } else { + state.prevLineHasContent = state.thisLineHasContent; + state.thisLineHasContent = true; + } + + // Reset state.header + state.header = 0; + + // Reset state.taskList + state.taskList = false; + + // Reset state.code + state.code = false; + + // Reset state.trailingSpace + state.trailingSpace = 0; + state.trailingSpaceNewLine = false; + + state.f = state.block; + var indentation = stream.match(/^\s*/, true)[0].replace(/\t/g, ' ').length; + var difference = Math.floor((indentation - state.indentation) / 4) * 4; + if (difference > 4) difference = 4; + var adjustedIndentation = state.indentation + difference; + state.indentationDiff = adjustedIndentation - state.indentation; + state.indentation = adjustedIndentation; + if (indentation > 0) return null; + } + return state.f(stream, state); + }, + + blankLine: blankLine, + + getType: getType + }; + +}, "xml"); + +CodeMirror.defineMIME("text/x-markdown", "markdown"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/markdown/test.js b/pitfall/pdfkit/node_modules/codemirror/mode/markdown/test.js new file mode 100644 index 00000000..6bf40065 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/markdown/test.js @@ -0,0 +1,664 @@ +(function() { + var mode = CodeMirror.getMode({tabSize: 4}, "markdown"); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } + + MT("plainText", + "foo"); + + // Don't style single trailing space + MT("trailingSpace1", + "foo "); + + // Two or more trailing spaces should be styled with line break character + MT("trailingSpace2", + "foo[trailing-space-a ][trailing-space-new-line ]"); + + MT("trailingSpace3", + "foo[trailing-space-a ][trailing-space-b ][trailing-space-new-line ]"); + + MT("trailingSpace4", + "foo[trailing-space-a ][trailing-space-b ][trailing-space-a ][trailing-space-new-line ]"); + + // Code blocks using 4 spaces (regardless of CodeMirror.tabSize value) + MT("codeBlocksUsing4Spaces", + " [comment foo]"); + + // Code blocks using 4 spaces with internal indentation + MT("codeBlocksUsing4SpacesIndentation", + " [comment bar]", + " [comment hello]", + " [comment world]", + " [comment foo]", + "bar"); + + // Code blocks using 4 spaces with internal indentation + MT("codeBlocksUsing4SpacesIndentation", + " foo", + " [comment bar]", + " [comment hello]", + " [comment world]"); + + // Code blocks using 1 tab (regardless of CodeMirror.indentWithTabs value) + MT("codeBlocksUsing1Tab", + "\t[comment foo]"); + + // Inline code using backticks + MT("inlineCodeUsingBackticks", + "foo [comment `bar`]"); + + // Block code using single backtick (shouldn't work) + MT("blockCodeSingleBacktick", + "[comment `]", + "foo", + "[comment `]"); + + // Unclosed backticks + // Instead of simply marking as CODE, it would be nice to have an + // incomplete flag for CODE, that is styled slightly different. + MT("unclosedBackticks", + "foo [comment `bar]"); + + // Per documentation: "To include a literal backtick character within a + // code span, you can use multiple backticks as the opening and closing + // delimiters" + MT("doubleBackticks", + "[comment ``foo ` bar``]"); + + // Tests based on Dingus + // http://daringfireball.net/projects/markdown/dingus + // + // Multiple backticks within an inline code block + MT("consecutiveBackticks", + "[comment `foo```bar`]"); + + // Multiple backticks within an inline code block with a second code block + MT("consecutiveBackticks", + "[comment `foo```bar`] hello [comment `world`]"); + + // Unclosed with several different groups of backticks + MT("unclosedBackticks", + "[comment ``foo ``` bar` hello]"); + + // Closed with several different groups of backticks + MT("closedBackticks", + "[comment ``foo ``` bar` hello``] world"); + + // atx headers + // http://daringfireball.net/projects/markdown/syntax#header + + MT("atxH1", + "[header&header1 # foo]"); + + MT("atxH2", + "[header&header2 ## foo]"); + + MT("atxH3", + "[header&header3 ### foo]"); + + MT("atxH4", + "[header&header4 #### foo]"); + + MT("atxH5", + "[header&header5 ##### foo]"); + + MT("atxH6", + "[header&header6 ###### foo]"); + + // H6 - 7x '#' should still be H6, per Dingus + // http://daringfireball.net/projects/markdown/dingus + MT("atxH6NotH7", + "[header&header6 ####### foo]"); + + // Inline styles should be parsed inside headers + MT("atxH1inline", + "[header&header1 # foo ][header&header1&em *bar*]"); + + // Setext headers - H1, H2 + // Per documentation, "Any number of underlining =’s or -’s will work." + // http://daringfireball.net/projects/markdown/syntax#header + // Ideally, the text would be marked as `header` as well, but this is + // not really feasible at the moment. So, instead, we're testing against + // what works today, to avoid any regressions. + // + // Check if single underlining = works + MT("setextH1", + "foo", + "[header&header1 =]"); + + // Check if 3+ ='s work + MT("setextH1", + "foo", + "[header&header1 ===]"); + + // Check if single underlining - works + MT("setextH2", + "foo", + "[header&header2 -]"); + + // Check if 3+ -'s work + MT("setextH2", + "foo", + "[header&header2 ---]"); + + // Single-line blockquote with trailing space + MT("blockquoteSpace", + "[atom > foo]"); + + // Single-line blockquote + MT("blockquoteNoSpace", + "[atom >foo]"); + + // No blank line before blockquote + MT("blockquoteNoBlankLine", + "foo", + "[atom > bar]"); + + // Nested blockquote + MT("blockquoteSpace", + "[atom > foo]", + "[number > > foo]", + "[atom > > > foo]"); + + // Single-line blockquote followed by normal paragraph + MT("blockquoteThenParagraph", + "[atom >foo]", + "", + "bar"); + + // Multi-line blockquote (lazy mode) + MT("multiBlockquoteLazy", + "[atom >foo]", + "[atom bar]"); + + // Multi-line blockquote followed by normal paragraph (lazy mode) + MT("multiBlockquoteLazyThenParagraph", + "[atom >foo]", + "[atom bar]", + "", + "hello"); + + // Multi-line blockquote (non-lazy mode) + MT("multiBlockquote", + "[atom >foo]", + "[atom >bar]"); + + // Multi-line blockquote followed by normal paragraph (non-lazy mode) + MT("multiBlockquoteThenParagraph", + "[atom >foo]", + "[atom >bar]", + "", + "hello"); + + // Check list types + + MT("listAsterisk", + "foo", + "bar", + "", + "[variable-2 * foo]", + "[variable-2 * bar]"); + + MT("listPlus", + "foo", + "bar", + "", + "[variable-2 + foo]", + "[variable-2 + bar]"); + + MT("listDash", + "foo", + "bar", + "", + "[variable-2 - foo]", + "[variable-2 - bar]"); + + MT("listNumber", + "foo", + "bar", + "", + "[variable-2 1. foo]", + "[variable-2 2. bar]"); + + // Lists require a preceding blank line (per Dingus) + MT("listBogus", + "foo", + "1. bar", + "2. hello"); + + // Formatting in lists (*) + MT("listAsteriskFormatting", + "[variable-2 * ][variable-2&em *foo*][variable-2 bar]", + "[variable-2 * ][variable-2&strong **foo**][variable-2 bar]", + "[variable-2 * ][variable-2&strong **][variable-2&em&strong *foo**][variable-2&em *][variable-2 bar]", + "[variable-2 * ][variable-2&comment `foo`][variable-2 bar]"); + + // Formatting in lists (+) + MT("listPlusFormatting", + "[variable-2 + ][variable-2&em *foo*][variable-2 bar]", + "[variable-2 + ][variable-2&strong **foo**][variable-2 bar]", + "[variable-2 + ][variable-2&strong **][variable-2&em&strong *foo**][variable-2&em *][variable-2 bar]", + "[variable-2 + ][variable-2&comment `foo`][variable-2 bar]"); + + // Formatting in lists (-) + MT("listDashFormatting", + "[variable-2 - ][variable-2&em *foo*][variable-2 bar]", + "[variable-2 - ][variable-2&strong **foo**][variable-2 bar]", + "[variable-2 - ][variable-2&strong **][variable-2&em&strong *foo**][variable-2&em *][variable-2 bar]", + "[variable-2 - ][variable-2&comment `foo`][variable-2 bar]"); + + // Formatting in lists (1.) + MT("listNumberFormatting", + "[variable-2 1. ][variable-2&em *foo*][variable-2 bar]", + "[variable-2 2. ][variable-2&strong **foo**][variable-2 bar]", + "[variable-2 3. ][variable-2&strong **][variable-2&em&strong *foo**][variable-2&em *][variable-2 bar]", + "[variable-2 4. ][variable-2&comment `foo`][variable-2 bar]"); + + // Paragraph lists + MT("listParagraph", + "[variable-2 * foo]", + "", + "[variable-2 * bar]"); + + // Multi-paragraph lists + // + // 4 spaces + MT("listMultiParagraph", + "[variable-2 * foo]", + "", + "[variable-2 * bar]", + "", + " [variable-2 hello]"); + + // 4 spaces, extra blank lines (should still be list, per Dingus) + MT("listMultiParagraphExtra", + "[variable-2 * foo]", + "", + "[variable-2 * bar]", + "", + "", + " [variable-2 hello]"); + + // 4 spaces, plus 1 space (should still be list, per Dingus) + MT("listMultiParagraphExtraSpace", + "[variable-2 * foo]", + "", + "[variable-2 * bar]", + "", + " [variable-2 hello]", + "", + " [variable-2 world]"); + + // 1 tab + MT("listTab", + "[variable-2 * foo]", + "", + "[variable-2 * bar]", + "", + "\t[variable-2 hello]"); + + // No indent + MT("listNoIndent", + "[variable-2 * foo]", + "", + "[variable-2 * bar]", + "", + "hello"); + + // Blockquote + MT("blockquote", + "[variable-2 * foo]", + "", + "[variable-2 * bar]", + "", + " [variable-2&atom > hello]"); + + // Code block + MT("blockquoteCode", + "[variable-2 * foo]", + "", + "[variable-2 * bar]", + "", + " [comment > hello]", + "", + " [variable-2 world]"); + + // Code block followed by text + MT("blockquoteCodeText", + "[variable-2 * foo]", + "", + " [variable-2 bar]", + "", + " [comment hello]", + "", + " [variable-2 world]"); + + // Nested list + + MT("listAsteriskNested", + "[variable-2 * foo]", + "", + " [variable-3 * bar]"); + + MT("listPlusNested", + "[variable-2 + foo]", + "", + " [variable-3 + bar]"); + + MT("listDashNested", + "[variable-2 - foo]", + "", + " [variable-3 - bar]"); + + MT("listNumberNested", + "[variable-2 1. foo]", + "", + " [variable-3 2. bar]"); + + MT("listMixed", + "[variable-2 * foo]", + "", + " [variable-3 + bar]", + "", + " [keyword - hello]", + "", + " [variable-2 1. world]"); + + MT("listBlockquote", + "[variable-2 * foo]", + "", + " [variable-3 + bar]", + "", + " [atom&variable-3 > hello]"); + + MT("listCode", + "[variable-2 * foo]", + "", + " [variable-3 + bar]", + "", + " [comment hello]"); + + // Code with internal indentation + MT("listCodeIndentation", + "[variable-2 * foo]", + "", + " [comment bar]", + " [comment hello]", + " [comment world]", + " [comment foo]", + " [variable-2 bar]"); + + // List nesting edge cases + MT("listNested", + "[variable-2 * foo]", + "", + " [variable-3 * bar]", + "", + " [variable-2 hello]" + ); + MT("listNested", + "[variable-2 * foo]", + "", + " [variable-3 * bar]", + "", + " [variable-3 * foo]" + ); + + // Code followed by text + MT("listCodeText", + "[variable-2 * foo]", + "", + " [comment bar]", + "", + "hello"); + + // Following tests directly from official Markdown documentation + // http://daringfireball.net/projects/markdown/syntax#hr + + MT("hrSpace", + "[hr * * *]"); + + MT("hr", + "[hr ***]"); + + MT("hrLong", + "[hr *****]"); + + MT("hrSpaceDash", + "[hr - - -]"); + + MT("hrDashLong", + "[hr ---------------------------------------]"); + + // Inline link with title + MT("linkTitle", + "[link [[foo]]][string (http://example.com/ \"bar\")] hello"); + + // Inline link without title + MT("linkNoTitle", + "[link [[foo]]][string (http://example.com/)] bar"); + + // Inline link with image + MT("linkImage", + "[link [[][tag ![[foo]]][string (http://example.com/)][link ]]][string (http://example.com/)] bar"); + + // Inline link with Em + MT("linkEm", + "[link [[][link&em *foo*][link ]]][string (http://example.com/)] bar"); + + // Inline link with Strong + MT("linkStrong", + "[link [[][link&strong **foo**][link ]]][string (http://example.com/)] bar"); + + // Inline link with EmStrong + MT("linkEmStrong", + "[link [[][link&strong **][link&em&strong *foo**][link&em *][link ]]][string (http://example.com/)] bar"); + + // Image with title + MT("imageTitle", + "[tag ![[foo]]][string (http://example.com/ \"bar\")] hello"); + + // Image without title + MT("imageNoTitle", + "[tag ![[foo]]][string (http://example.com/)] bar"); + + // Image with asterisks + MT("imageAsterisks", + "[tag ![[*foo*]]][string (http://example.com/)] bar"); + + // Not a link. Should be normal text due to square brackets being used + // regularly in text, especially in quoted material, and no space is allowed + // between square brackets and parentheses (per Dingus). + MT("notALink", + "[[foo]] (bar)"); + + // Reference-style links + MT("linkReference", + "[link [[foo]]][string [[bar]]] hello"); + + // Reference-style links with Em + MT("linkReferenceEm", + "[link [[][link&em *foo*][link ]]][string [[bar]]] hello"); + + // Reference-style links with Strong + MT("linkReferenceStrong", + "[link [[][link&strong **foo**][link ]]][string [[bar]]] hello"); + + // Reference-style links with EmStrong + MT("linkReferenceEmStrong", + "[link [[][link&strong **][link&em&strong *foo**][link&em *][link ]]][string [[bar]]] hello"); + + // Reference-style links with optional space separator (per docuentation) + // "You can optionally use a space to separate the sets of brackets" + MT("linkReferenceSpace", + "[link [[foo]]] [string [[bar]]] hello"); + + // Should only allow a single space ("...use *a* space...") + MT("linkReferenceDoubleSpace", + "[[foo]] [[bar]] hello"); + + // Reference-style links with implicit link name + MT("linkImplicit", + "[link [[foo]]][string [[]]] hello"); + + // @todo It would be nice if, at some point, the document was actually + // checked to see if the referenced link exists + + // Link label, for reference-style links (taken from documentation) + + MT("labelNoTitle", + "[link [[foo]]:] [string http://example.com/]"); + + MT("labelIndented", + " [link [[foo]]:] [string http://example.com/]"); + + MT("labelSpaceTitle", + "[link [[foo bar]]:] [string http://example.com/ \"hello\"]"); + + MT("labelDoubleTitle", + "[link [[foo bar]]:] [string http://example.com/ \"hello\"] \"world\""); + + MT("labelTitleDoubleQuotes", + "[link [[foo]]:] [string http://example.com/ \"bar\"]"); + + MT("labelTitleSingleQuotes", + "[link [[foo]]:] [string http://example.com/ 'bar']"); + + MT("labelTitleParenthese", + "[link [[foo]]:] [string http://example.com/ (bar)]"); + + MT("labelTitleInvalid", + "[link [[foo]]:] [string http://example.com/] bar"); + + MT("labelLinkAngleBrackets", + "[link [[foo]]:] [string \"bar\"]"); + + MT("labelTitleNextDoubleQuotes", + "[link [[foo]]:] [string http://example.com/]", + "[string \"bar\"] hello"); + + MT("labelTitleNextSingleQuotes", + "[link [[foo]]:] [string http://example.com/]", + "[string 'bar'] hello"); + + MT("labelTitleNextParenthese", + "[link [[foo]]:] [string http://example.com/]", + "[string (bar)] hello"); + + MT("labelTitleNextMixed", + "[link [[foo]]:] [string http://example.com/]", + "(bar\" hello"); + + MT("linkWeb", + "[link ] foo"); + + MT("linkWebDouble", + "[link ] foo [link ]"); + + MT("linkEmail", + "[link ] foo"); + + MT("linkEmailDouble", + "[link ] foo [link ]"); + + MT("emAsterisk", + "[em *foo*] bar"); + + MT("emUnderscore", + "[em _foo_] bar"); + + MT("emInWordAsterisk", + "foo[em *bar*]hello"); + + MT("emInWordUnderscore", + "foo[em _bar_]hello"); + + // Per documentation: "...surround an * or _ with spaces, it’ll be + // treated as a literal asterisk or underscore." + + MT("emEscapedBySpaceIn", + "foo [em _bar _ hello_] world"); + + MT("emEscapedBySpaceOut", + "foo _ bar[em _hello_]world"); + + MT("emEscapedByNewline", + "foo", + "_ bar[em _hello_]world"); + + // Unclosed emphasis characters + // Instead of simply marking as EM / STRONG, it would be nice to have an + // incomplete flag for EM and STRONG, that is styled slightly different. + MT("emIncompleteAsterisk", + "foo [em *bar]"); + + MT("emIncompleteUnderscore", + "foo [em _bar]"); + + MT("strongAsterisk", + "[strong **foo**] bar"); + + MT("strongUnderscore", + "[strong __foo__] bar"); + + MT("emStrongAsterisk", + "[em *foo][em&strong **bar*][strong hello**] world"); + + MT("emStrongUnderscore", + "[em _foo][em&strong __bar_][strong hello__] world"); + + // "...same character must be used to open and close an emphasis span."" + MT("emStrongMixed", + "[em _foo][em&strong **bar*hello__ world]"); + + MT("emStrongMixed", + "[em *foo][em&strong __bar_hello** world]"); + + // These characters should be escaped: + // \ backslash + // ` backtick + // * asterisk + // _ underscore + // {} curly braces + // [] square brackets + // () parentheses + // # hash mark + // + plus sign + // - minus sign (hyphen) + // . dot + // ! exclamation mark + + MT("escapeBacktick", + "foo \\`bar\\`"); + + MT("doubleEscapeBacktick", + "foo \\\\[comment `bar\\\\`]"); + + MT("escapeAsterisk", + "foo \\*bar\\*"); + + MT("doubleEscapeAsterisk", + "foo \\\\[em *bar\\\\*]"); + + MT("escapeUnderscore", + "foo \\_bar\\_"); + + MT("doubleEscapeUnderscore", + "foo \\\\[em _bar\\\\_]"); + + MT("escapeHash", + "\\# foo"); + + MT("doubleEscapeHash", + "\\\\# foo"); + + + // Tests to make sure GFM-specific things aren't getting through + + MT("taskList", + "[variable-2 * [ ]] bar]"); + + MT("fencedCodeBlocks", + "[comment ```]", + "foo", + "[comment ```]"); +})(); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/meta.js b/pitfall/pdfkit/node_modules/codemirror/mode/meta.js new file mode 100644 index 00000000..226cff12 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/meta.js @@ -0,0 +1,91 @@ +CodeMirror.modeInfo = [ + {name: 'APL', mime: 'text/apl', mode: 'apl'}, + {name: 'Asterisk', mime: 'text/x-asterisk', mode: 'asterisk'}, + {name: 'C', mime: 'text/x-csrc', mode: 'clike'}, + {name: 'C++', mime: 'text/x-c++src', mode: 'clike'}, + {name: 'Cobol', mime: 'text/x-cobol', mode: 'cobol'}, + {name: 'Java', mime: 'text/x-java', mode: 'clike'}, + {name: 'C#', mime: 'text/x-csharp', mode: 'clike'}, + {name: 'Scala', mime: 'text/x-scala', mode: 'clike'}, + {name: 'Clojure', mime: 'text/x-clojure', mode: 'clojure'}, + {name: 'CoffeeScript', mime: 'text/x-coffeescript', mode: 'coffeescript'}, + {name: 'Common Lisp', mime: 'text/x-common-lisp', mode: 'commonlisp'}, + {name: 'CSS', mime: 'text/css', mode: 'css'}, + {name: 'D', mime: 'text/x-d', mode: 'd'}, + {name: 'diff', mime: 'text/x-diff', mode: 'diff'}, + {name: 'DTD', mime: 'application/xml-dtd', mode: 'dtd'}, + {name: 'ECL', mime: 'text/x-ecl', mode: 'ecl'}, + {name: 'Eiffel', mime: 'text/x-eiffel', mode: 'eiffel'}, + {name: 'Erlang', mime: 'text/x-erlang', mode: 'erlang'}, + {name: 'Fortran', mime: 'text/x-fortran', mode: 'fortran'}, + {name: 'Gas', mime: 'text/x-gas', mode: 'gas'}, + {name: 'Gherkin', mime: 'text/x-feature', mode: 'gherkin'}, + {name: 'GitHub Flavored Markdown', mime: 'text/x-gfm', mode: 'gfm'}, + {name: 'Go', mime: 'text/x-go', mode: 'go'}, + {name: 'Groovy', mime: 'text/x-groovy', mode: 'groovy'}, + {name: 'HAML', mime: 'text/x-haml', mode: 'haml'}, + {name: 'Haskell', mime: 'text/x-haskell', mode: 'haskell'}, + {name: 'Haxe', mime: 'text/x-haxe', mode: 'haxe'}, + {name: 'ASP.NET', mime: 'application/x-aspx', mode: 'htmlembedded'}, + {name: 'Embedded Javascript', mime: 'application/x-ejs', mode: 'htmlembedded'}, + {name: 'JavaServer Pages', mime: 'application/x-jsp', mode: 'htmlembedded'}, + {name: 'HTML', mime: 'text/html', mode: 'htmlmixed'}, + {name: 'HTTP', mime: 'message/http', mode: 'http'}, + {name: 'Jade', mime: 'text/x-jade', mode: 'jade'}, + {name: 'JavaScript', mime: 'text/javascript', mode: 'javascript'}, + {name: 'JSON', mime: 'application/x-json', mode: 'javascript'}, + {name: 'JSON', mime: 'application/json', mode: 'javascript'}, + {name: 'TypeScript', mime: 'application/typescript', mode: 'javascript'}, + {name: 'Jinja2', mime: null, mode: 'jinja2'}, + {name: 'Julia', mime: 'text/x-julia', mode: 'julia'}, + {name: 'LESS', mime: 'text/x-less', mode: 'less'}, + {name: 'LiveScript', mime: 'text/x-livescript', mode: 'livescript'}, + {name: 'Lua', mime: 'text/x-lua', mode: 'lua'}, + {name: 'Markdown (GitHub-flavour)', mime: 'text/x-markdown', mode: 'markdown'}, + {name: 'mIRC', mime: 'text/mirc', mode: 'mirc'}, + {name: 'Nginx', mime: 'text/x-nginx-conf', mode: 'nginx'}, + {name: 'NTriples', mime: 'text/n-triples', mode: 'ntriples'}, + {name: 'OCaml', mime: 'text/x-ocaml', mode: 'ocaml'}, + {name: 'Octave', mime: 'text/x-octave', mode: 'octave'}, + {name: 'Pascal', mime: 'text/x-pascal', mode: 'pascal'}, + {name: 'PEG.js', mime: null, mode: 'pegjs'}, + {name: 'Perl', mime: 'text/x-perl', mode: 'perl'}, + {name: 'PHP', mime: 'text/x-php', mode: 'php'}, + {name: 'PHP(HTML)', mime: 'application/x-httpd-php', mode: 'php'}, + {name: 'Pig', mime: 'text/x-pig', mode: 'pig'}, + {name: 'Plain Text', mime: 'text/plain', mode: 'null'}, + {name: 'Properties files', mime: 'text/x-properties', mode: 'properties'}, + {name: 'Python', mime: 'text/x-python', mode: 'python'}, + {name: 'Cython', mime: 'text/x-cython', mode: 'python'}, + {name: 'R', mime: 'text/x-rsrc', mode: 'r'}, + {name: 'reStructuredText', mime: 'text/x-rst', mode: 'rst'}, + {name: 'Ruby', mime: 'text/x-ruby', mode: 'ruby'}, + {name: 'Rust', mime: 'text/x-rustsrc', mode: 'rust'}, + {name: 'Sass', mime: 'text/x-sass', mode: 'sass'}, + {name: 'Scheme', mime: 'text/x-scheme', mode: 'scheme'}, + {name: 'SCSS', mime: 'text/x-scss', mode: 'css'}, + {name: 'Shell', mime: 'text/x-sh', mode: 'shell'}, + {name: 'Sieve', mime: 'application/sieve', mode: 'sieve'}, + {name: 'Smalltalk', mime: 'text/x-stsrc', mode: 'smalltalk'}, + {name: 'Smarty', mime: 'text/x-smarty', mode: 'smarty'}, + {name: 'SmartyMixed', mime: 'text/x-smarty', mode: 'smartymixed'}, + {name: 'SPARQL', mime: 'application/x-sparql-query', mode: 'sparql'}, + {name: 'SQL', mime: 'text/x-sql', mode: 'sql'}, + {name: 'MariaDB', mime: 'text/x-mariadb', mode: 'sql'}, + {name: 'sTeX', mime: 'text/x-stex', mode: 'stex'}, + {name: 'LaTeX', mime: 'text/x-latex', mode: 'stex'}, + {name: 'Tcl', mime: 'text/x-tcl', mode: 'tcl'}, + {name: 'TiddlyWiki ', mime: 'text/x-tiddlywiki', mode: 'tiddlywiki'}, + {name: 'Tiki wiki', mime: 'text/tiki', mode: 'tiki'}, + {name: 'TOML', mime: 'text/x-toml', mode: 'toml'}, + {name: 'Turtle', mime: 'text/turtle', mode: 'turtle'}, + {name: 'VB.NET', mime: 'text/x-vb', mode: 'vb'}, + {name: 'VBScript', mime: 'text/vbscript', mode: 'vbscript'}, + {name: 'Velocity', mime: 'text/velocity', mode: 'velocity'}, + {name: 'Verilog', mime: 'text/x-verilog', mode: 'verilog'}, + {name: 'XML', mime: 'application/xml', mode: 'xml'}, + {name: 'HTML', mime: 'text/html', mode: 'xml'}, + {name: 'XQuery', mime: 'application/xquery', mode: 'xquery'}, + {name: 'YAML', mime: 'text/x-yaml', mode: 'yaml'}, + {name: 'Z80', mime: 'text/x-z80', mode: 'z80'} +]; diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/mirc/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/mirc/index.html new file mode 100644 index 00000000..dbd7a06d --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/mirc/index.html @@ -0,0 +1,161 @@ + + +CodeMirror: mIRC mode + + + + + + + + + + +
+

mIRC mode

+
+ + +

MIME types defined: text/mirc.

+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/mirc/mirc.js b/pitfall/pdfkit/node_modules/codemirror/mode/mirc/mirc.js new file mode 100644 index 00000000..fc88bc56 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/mirc/mirc.js @@ -0,0 +1,177 @@ +//mIRC mode by Ford_Lawnmower :: Based on Velocity mode by Steve O'Hara +CodeMirror.defineMIME("text/mirc", "mirc"); +CodeMirror.defineMode("mirc", function() { + function parseWords(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + var specials = parseWords("$! $$ $& $? $+ $abook $abs $active $activecid " + + "$activewid $address $addtok $agent $agentname $agentstat $agentver " + + "$alias $and $anick $ansi2mirc $aop $appactive $appstate $asc $asctime " + + "$asin $atan $avoice $away $awaymsg $awaytime $banmask $base $bfind " + + "$binoff $biton $bnick $bvar $bytes $calc $cb $cd $ceil $chan $chanmodes " + + "$chantypes $chat $chr $cid $clevel $click $cmdbox $cmdline $cnick $color " + + "$com $comcall $comchan $comerr $compact $compress $comval $cos $count " + + "$cr $crc $creq $crlf $ctime $ctimer $ctrlenter $date $day $daylight " + + "$dbuh $dbuw $dccignore $dccport $dde $ddename $debug $decode $decompress " + + "$deltok $devent $dialog $did $didreg $didtok $didwm $disk $dlevel $dll " + + "$dllcall $dname $dns $duration $ebeeps $editbox $emailaddr $encode $error " + + "$eval $event $exist $feof $ferr $fgetc $file $filename $filtered $finddir " + + "$finddirn $findfile $findfilen $findtok $fline $floor $fopen $fread $fserve " + + "$fulladdress $fulldate $fullname $fullscreen $get $getdir $getdot $gettok $gmt " + + "$group $halted $hash $height $hfind $hget $highlight $hnick $hotline " + + "$hotlinepos $ial $ialchan $ibl $idle $iel $ifmatch $ignore $iif $iil " + + "$inelipse $ini $inmidi $inpaste $inpoly $input $inrect $inroundrect " + + "$insong $instok $int $inwave $ip $isalias $isbit $isdde $isdir $isfile " + + "$isid $islower $istok $isupper $keychar $keyrpt $keyval $knick $lactive " + + "$lactivecid $lactivewid $left $len $level $lf $line $lines $link $lock " + + "$lock $locked $log $logstamp $logstampfmt $longfn $longip $lower $ltimer " + + "$maddress $mask $matchkey $matchtok $md5 $me $menu $menubar $menucontext " + + "$menutype $mid $middir $mircdir $mircexe $mircini $mklogfn $mnick $mode " + + "$modefirst $modelast $modespl $mouse $msfile $network $newnick $nick $nofile " + + "$nopath $noqt $not $notags $notify $null $numeric $numok $oline $onpoly " + + "$opnick $or $ord $os $passivedcc $pic $play $pnick $port $portable $portfree " + + "$pos $prefix $prop $protect $puttok $qt $query $rand $r $rawmsg $read $readomo " + + "$readn $regex $regml $regsub $regsubex $remove $remtok $replace $replacex " + + "$reptok $result $rgb $right $round $scid $scon $script $scriptdir $scriptline " + + "$sdir $send $server $serverip $sfile $sha1 $shortfn $show $signal $sin " + + "$site $sline $snick $snicks $snotify $sock $sockbr $sockerr $sockname " + + "$sorttok $sound $sqrt $ssl $sreq $sslready $status $strip $str $stripped " + + "$syle $submenu $switchbar $tan $target $ticks $time $timer $timestamp " + + "$timestampfmt $timezone $tip $titlebar $toolbar $treebar $trust $ulevel " + + "$ulist $upper $uptime $url $usermode $v1 $v2 $var $vcmd $vcmdstat $vcmdver " + + "$version $vnick $vol $wid $width $wildsite $wildtok $window $wrap $xor"); + var keywords = parseWords("abook ajinvite alias aline ame amsg anick aop auser autojoin avoice " + + "away background ban bcopy beep bread break breplace bset btrunc bunset bwrite " + + "channel clear clearall cline clipboard close cnick color comclose comopen " + + "comreg continue copy creq ctcpreply ctcps dcc dccserver dde ddeserver " + + "debug dec describe dialog did didtok disable disconnect dlevel dline dll " + + "dns dqwindow drawcopy drawdot drawfill drawline drawpic drawrect drawreplace " + + "drawrot drawsave drawscroll drawtext ebeeps echo editbox emailaddr enable " + + "events exit fclose filter findtext finger firewall flash flist flood flush " + + "flushini font fopen fseek fsend fserve fullname fwrite ghide gload gmove " + + "gopts goto gplay gpoint gqreq groups gshow gsize gstop gtalk gunload hadd " + + "halt haltdef hdec hdel help hfree hinc hload hmake hop hsave ial ialclear " + + "ialmark identd if ignore iline inc invite iuser join kick linesep links list " + + "load loadbuf localinfo log mdi me menubar mkdir mnick mode msg nick noop notice " + + "notify omsg onotice part partall pdcc perform play playctrl pop protect pvoice " + + "qme qmsg query queryn quit raw reload remini remote remove rename renwin " + + "reseterror resetidle return rlevel rline rmdir run ruser save savebuf saveini " + + "say scid scon server set showmirc signam sline sockaccept sockclose socklist " + + "socklisten sockmark sockopen sockpause sockread sockrename sockudp sockwrite " + + "sound speak splay sreq strip switchbar timer timestamp titlebar tnick tokenize " + + "toolbar topic tray treebar ulist unload unset unsetall updatenl url uwho " + + "var vcadd vcmd vcrem vol while whois window winhelp write writeint if isalnum " + + "isalpha isaop isavoice isban ischan ishop isignore isin isincs isletter islower " + + "isnotify isnum ison isop isprotect isreg isupper isvoice iswm iswmcs " + + "elseif else goto menu nicklist status title icon size option text edit " + + "button check radio box scroll list combo link tab item"); + var functions = parseWords("if elseif else and not or eq ne in ni for foreach while switch"); + var isOperatorChar = /[+\-*&%=<>!?^\/\|]/; + function chain(stream, state, f) { + state.tokenize = f; + return f(stream, state); + } + function tokenBase(stream, state) { + var beforeParams = state.beforeParams; + state.beforeParams = false; + var ch = stream.next(); + if (/[\[\]{}\(\),\.]/.test(ch)) { + if (ch == "(" && beforeParams) state.inParams = true; + else if (ch == ")") state.inParams = false; + return null; + } + else if (/\d/.test(ch)) { + stream.eatWhile(/[\w\.]/); + return "number"; + } + else if (ch == "\\") { + stream.eat("\\"); + stream.eat(/./); + return "number"; + } + else if (ch == "/" && stream.eat("*")) { + return chain(stream, state, tokenComment); + } + else if (ch == ";" && stream.match(/ *\( *\(/)) { + return chain(stream, state, tokenUnparsed); + } + else if (ch == ";" && !state.inParams) { + stream.skipToEnd(); + return "comment"; + } + else if (ch == '"') { + stream.eat(/"/); + return "keyword"; + } + else if (ch == "$") { + stream.eatWhile(/[$_a-z0-9A-Z\.:]/); + if (specials && specials.propertyIsEnumerable(stream.current().toLowerCase())) { + return "keyword"; + } + else { + state.beforeParams = true; + return "builtin"; + } + } + else if (ch == "%") { + stream.eatWhile(/[^,^\s^\(^\)]/); + state.beforeParams = true; + return "string"; + } + else if (isOperatorChar.test(ch)) { + stream.eatWhile(isOperatorChar); + return "operator"; + } + else { + stream.eatWhile(/[\w\$_{}]/); + var word = stream.current().toLowerCase(); + if (keywords && keywords.propertyIsEnumerable(word)) + return "keyword"; + if (functions && functions.propertyIsEnumerable(word)) { + state.beforeParams = true; + return "keyword"; + } + return null; + } + } + function tokenComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (ch == "/" && maybeEnd) { + state.tokenize = tokenBase; + break; + } + maybeEnd = (ch == "*"); + } + return "comment"; + } + function tokenUnparsed(stream, state) { + var maybeEnd = 0, ch; + while (ch = stream.next()) { + if (ch == ";" && maybeEnd == 2) { + state.tokenize = tokenBase; + break; + } + if (ch == ")") + maybeEnd++; + else if (ch != " ") + maybeEnd = 0; + } + return "meta"; + } + return { + startState: function() { + return { + tokenize: tokenBase, + beforeParams: false, + inParams: false + }; + }, + token: function(stream, state) { + if (stream.eatSpace()) return null; + return state.tokenize(stream, state); + } + }; +}); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/nginx/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/nginx/index.html new file mode 100644 index 00000000..16be1eb6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/nginx/index.html @@ -0,0 +1,181 @@ + + +CodeMirror: NGINX mode + + + + + + + + + + + + + +
+

NGINX mode

+
+ + +

MIME types defined: text/nginx.

+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/nginx/nginx.js b/pitfall/pdfkit/node_modules/codemirror/mode/nginx/nginx.js new file mode 100644 index 00000000..c98c8a1d --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/nginx/nginx.js @@ -0,0 +1,163 @@ +CodeMirror.defineMode("nginx", function(config) { + + function words(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + + var keywords = words( + /* ngxDirectiveControl */ "break return rewrite set" + + /* ngxDirective */ " accept_mutex accept_mutex_delay access_log add_after_body add_before_body add_header addition_types aio alias allow ancient_browser ancient_browser_value auth_basic auth_basic_user_file auth_http auth_http_header auth_http_timeout autoindex autoindex_exact_size autoindex_localtime charset charset_types client_body_buffer_size client_body_in_file_only client_body_in_single_buffer client_body_temp_path client_body_timeout client_header_buffer_size client_header_timeout client_max_body_size connection_pool_size create_full_put_path daemon dav_access dav_methods debug_connection debug_points default_type degradation degrade deny devpoll_changes devpoll_events directio directio_alignment empty_gif env epoll_events error_log eventport_events expires fastcgi_bind fastcgi_buffer_size fastcgi_buffers fastcgi_busy_buffers_size fastcgi_cache fastcgi_cache_key fastcgi_cache_methods fastcgi_cache_min_uses fastcgi_cache_path fastcgi_cache_use_stale fastcgi_cache_valid fastcgi_catch_stderr fastcgi_connect_timeout fastcgi_hide_header fastcgi_ignore_client_abort fastcgi_ignore_headers fastcgi_index fastcgi_intercept_errors fastcgi_max_temp_file_size fastcgi_next_upstream fastcgi_param fastcgi_pass_header fastcgi_pass_request_body fastcgi_pass_request_headers fastcgi_read_timeout fastcgi_send_lowat fastcgi_send_timeout fastcgi_split_path_info fastcgi_store fastcgi_store_access fastcgi_temp_file_write_size fastcgi_temp_path fastcgi_upstream_fail_timeout fastcgi_upstream_max_fails flv geoip_city geoip_country google_perftools_profiles gzip gzip_buffers gzip_comp_level gzip_disable gzip_hash gzip_http_version gzip_min_length gzip_no_buffer gzip_proxied gzip_static gzip_types gzip_vary gzip_window if_modified_since ignore_invalid_headers image_filter image_filter_buffer image_filter_jpeg_quality image_filter_transparency imap_auth imap_capabilities imap_client_buffer index ip_hash keepalive_requests keepalive_timeout kqueue_changes kqueue_events large_client_header_buffers limit_conn limit_conn_log_level limit_rate limit_rate_after limit_req limit_req_log_level limit_req_zone limit_zone lingering_time lingering_timeout lock_file log_format log_not_found log_subrequest map_hash_bucket_size map_hash_max_size master_process memcached_bind memcached_buffer_size memcached_connect_timeout memcached_next_upstream memcached_read_timeout memcached_send_timeout memcached_upstream_fail_timeout memcached_upstream_max_fails merge_slashes min_delete_depth modern_browser modern_browser_value msie_padding msie_refresh multi_accept open_file_cache open_file_cache_errors open_file_cache_events open_file_cache_min_uses open_file_cache_valid open_log_file_cache output_buffers override_charset perl perl_modules perl_require perl_set pid pop3_auth pop3_capabilities port_in_redirect postpone_gzipping postpone_output protocol proxy proxy_bind proxy_buffer proxy_buffer_size proxy_buffering proxy_buffers proxy_busy_buffers_size proxy_cache proxy_cache_key proxy_cache_methods proxy_cache_min_uses proxy_cache_path proxy_cache_use_stale proxy_cache_valid proxy_connect_timeout proxy_headers_hash_bucket_size proxy_headers_hash_max_size proxy_hide_header proxy_ignore_client_abort proxy_ignore_headers proxy_intercept_errors proxy_max_temp_file_size proxy_method proxy_next_upstream proxy_pass_error_message proxy_pass_header proxy_pass_request_body proxy_pass_request_headers proxy_read_timeout proxy_redirect proxy_send_lowat proxy_send_timeout proxy_set_body proxy_set_header proxy_ssl_session_reuse proxy_store proxy_store_access proxy_temp_file_write_size proxy_temp_path proxy_timeout proxy_upstream_fail_timeout proxy_upstream_max_fails random_index read_ahead real_ip_header recursive_error_pages request_pool_size reset_timedout_connection resolver resolver_timeout rewrite_log rtsig_overflow_events rtsig_overflow_test rtsig_overflow_threshold rtsig_signo satisfy secure_link_secret send_lowat send_timeout sendfile sendfile_max_chunk server_name_in_redirect server_names_hash_bucket_size server_names_hash_max_size server_tokens set_real_ip_from smtp_auth smtp_capabilities smtp_client_buffer smtp_greeting_delay so_keepalive source_charset ssi ssi_ignore_recycled_buffers ssi_min_file_chunk ssi_silent_errors ssi_types ssi_value_length ssl ssl_certificate ssl_certificate_key ssl_ciphers ssl_client_certificate ssl_crl ssl_dhparam ssl_engine ssl_prefer_server_ciphers ssl_protocols ssl_session_cache ssl_session_timeout ssl_verify_client ssl_verify_depth starttls stub_status sub_filter sub_filter_once sub_filter_types tcp_nodelay tcp_nopush thread_stack_size timeout timer_resolution types_hash_bucket_size types_hash_max_size underscores_in_headers uninitialized_variable_warn use user userid userid_domain userid_expires userid_mark userid_name userid_p3p userid_path userid_service valid_referers variables_hash_bucket_size variables_hash_max_size worker_connections worker_cpu_affinity worker_priority worker_processes worker_rlimit_core worker_rlimit_nofile worker_rlimit_sigpending worker_threads working_directory xclient xml_entities xslt_stylesheet xslt_typesdrew@li229-23" + ); + + var keywords_block = words( + /* ngxDirectiveBlock */ "http mail events server types location upstream charset_map limit_except if geo map" + ); + + var keywords_important = words( + /* ngxDirectiveImportant */ "include root server server_name listen internal proxy_pass memcached_pass fastcgi_pass try_files" + ); + + var indentUnit = config.indentUnit, type; + function ret(style, tp) {type = tp; return style;} + + function tokenBase(stream, state) { + + + stream.eatWhile(/[\w\$_]/); + + var cur = stream.current(); + + + if (keywords.propertyIsEnumerable(cur)) { + return "keyword"; + } + else if (keywords_block.propertyIsEnumerable(cur)) { + return "variable-2"; + } + else if (keywords_important.propertyIsEnumerable(cur)) { + return "string-2"; + } + /**/ + + var ch = stream.next(); + if (ch == "@") {stream.eatWhile(/[\w\\\-]/); return ret("meta", stream.current());} + else if (ch == "/" && stream.eat("*")) { + state.tokenize = tokenCComment; + return tokenCComment(stream, state); + } + else if (ch == "<" && stream.eat("!")) { + state.tokenize = tokenSGMLComment; + return tokenSGMLComment(stream, state); + } + else if (ch == "=") ret(null, "compare"); + else if ((ch == "~" || ch == "|") && stream.eat("=")) return ret(null, "compare"); + else if (ch == "\"" || ch == "'") { + state.tokenize = tokenString(ch); + return state.tokenize(stream, state); + } + else if (ch == "#") { + stream.skipToEnd(); + return ret("comment", "comment"); + } + else if (ch == "!") { + stream.match(/^\s*\w*/); + return ret("keyword", "important"); + } + else if (/\d/.test(ch)) { + stream.eatWhile(/[\w.%]/); + return ret("number", "unit"); + } + else if (/[,.+>*\/]/.test(ch)) { + return ret(null, "select-op"); + } + else if (/[;{}:\[\]]/.test(ch)) { + return ret(null, ch); + } + else { + stream.eatWhile(/[\w\\\-]/); + return ret("variable", "variable"); + } + } + + function tokenCComment(stream, state) { + var maybeEnd = false, ch; + while ((ch = stream.next()) != null) { + if (maybeEnd && ch == "/") { + state.tokenize = tokenBase; + break; + } + maybeEnd = (ch == "*"); + } + return ret("comment", "comment"); + } + + function tokenSGMLComment(stream, state) { + var dashes = 0, ch; + while ((ch = stream.next()) != null) { + if (dashes >= 2 && ch == ">") { + state.tokenize = tokenBase; + break; + } + dashes = (ch == "-") ? dashes + 1 : 0; + } + return ret("comment", "comment"); + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, ch; + while ((ch = stream.next()) != null) { + if (ch == quote && !escaped) + break; + escaped = !escaped && ch == "\\"; + } + if (!escaped) state.tokenize = tokenBase; + return ret("string", "string"); + }; + } + + return { + startState: function(base) { + return {tokenize: tokenBase, + baseIndent: base || 0, + stack: []}; + }, + + token: function(stream, state) { + if (stream.eatSpace()) return null; + type = null; + var style = state.tokenize(stream, state); + + var context = state.stack[state.stack.length-1]; + if (type == "hash" && context == "rule") style = "atom"; + else if (style == "variable") { + if (context == "rule") style = "number"; + else if (!context || context == "@media{") style = "tag"; + } + + if (context == "rule" && /^[\{\};]$/.test(type)) + state.stack.pop(); + if (type == "{") { + if (context == "@media") state.stack[state.stack.length-1] = "@media{"; + else state.stack.push("{"); + } + else if (type == "}") state.stack.pop(); + else if (type == "@media") state.stack.push("@media"); + else if (context == "{" && type != "comment") state.stack.push("rule"); + return style; + }, + + indent: function(state, textAfter) { + var n = state.stack.length; + if (/^\}/.test(textAfter)) + n -= state.stack[state.stack.length-1] == "rule" ? 2 : 1; + return state.baseIndent + n * indentUnit; + }, + + electricChars: "}" + }; +}); + +CodeMirror.defineMIME("text/nginx", "text/x-nginx-conf"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/ntriples/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/ntriples/index.html new file mode 100644 index 00000000..c8a67916 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/ntriples/index.html @@ -0,0 +1,45 @@ + + +CodeMirror: NTriples mode + + + + + + + + + +
+

NTriples mode

+
+ +
+ + +

MIME types defined: text/n-triples.

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/ntriples/ntriples.js b/pitfall/pdfkit/node_modules/codemirror/mode/ntriples/ntriples.js new file mode 100644 index 00000000..ed0cee34 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/ntriples/ntriples.js @@ -0,0 +1,170 @@ +/********************************************************** +* This script provides syntax highlighting support for +* the Ntriples format. +* Ntriples format specification: +* http://www.w3.org/TR/rdf-testcases/#ntriples +***********************************************************/ + +/* + The following expression defines the defined ASF grammar transitions. + + pre_subject -> + { + ( writing_subject_uri | writing_bnode_uri ) + -> pre_predicate + -> writing_predicate_uri + -> pre_object + -> writing_object_uri | writing_object_bnode | + ( + writing_object_literal + -> writing_literal_lang | writing_literal_type + ) + -> post_object + -> BEGIN + } otherwise { + -> ERROR + } +*/ +CodeMirror.defineMode("ntriples", function() { + + var Location = { + PRE_SUBJECT : 0, + WRITING_SUB_URI : 1, + WRITING_BNODE_URI : 2, + PRE_PRED : 3, + WRITING_PRED_URI : 4, + PRE_OBJ : 5, + WRITING_OBJ_URI : 6, + WRITING_OBJ_BNODE : 7, + WRITING_OBJ_LITERAL : 8, + WRITING_LIT_LANG : 9, + WRITING_LIT_TYPE : 10, + POST_OBJ : 11, + ERROR : 12 + }; + function transitState(currState, c) { + var currLocation = currState.location; + var ret; + + // Opening. + if (currLocation == Location.PRE_SUBJECT && c == '<') ret = Location.WRITING_SUB_URI; + else if(currLocation == Location.PRE_SUBJECT && c == '_') ret = Location.WRITING_BNODE_URI; + else if(currLocation == Location.PRE_PRED && c == '<') ret = Location.WRITING_PRED_URI; + else if(currLocation == Location.PRE_OBJ && c == '<') ret = Location.WRITING_OBJ_URI; + else if(currLocation == Location.PRE_OBJ && c == '_') ret = Location.WRITING_OBJ_BNODE; + else if(currLocation == Location.PRE_OBJ && c == '"') ret = Location.WRITING_OBJ_LITERAL; + + // Closing. + else if(currLocation == Location.WRITING_SUB_URI && c == '>') ret = Location.PRE_PRED; + else if(currLocation == Location.WRITING_BNODE_URI && c == ' ') ret = Location.PRE_PRED; + else if(currLocation == Location.WRITING_PRED_URI && c == '>') ret = Location.PRE_OBJ; + else if(currLocation == Location.WRITING_OBJ_URI && c == '>') ret = Location.POST_OBJ; + else if(currLocation == Location.WRITING_OBJ_BNODE && c == ' ') ret = Location.POST_OBJ; + else if(currLocation == Location.WRITING_OBJ_LITERAL && c == '"') ret = Location.POST_OBJ; + else if(currLocation == Location.WRITING_LIT_LANG && c == ' ') ret = Location.POST_OBJ; + else if(currLocation == Location.WRITING_LIT_TYPE && c == '>') ret = Location.POST_OBJ; + + // Closing typed and language literal. + else if(currLocation == Location.WRITING_OBJ_LITERAL && c == '@') ret = Location.WRITING_LIT_LANG; + else if(currLocation == Location.WRITING_OBJ_LITERAL && c == '^') ret = Location.WRITING_LIT_TYPE; + + // Spaces. + else if( c == ' ' && + ( + currLocation == Location.PRE_SUBJECT || + currLocation == Location.PRE_PRED || + currLocation == Location.PRE_OBJ || + currLocation == Location.POST_OBJ + ) + ) ret = currLocation; + + // Reset. + else if(currLocation == Location.POST_OBJ && c == '.') ret = Location.PRE_SUBJECT; + + // Error + else ret = Location.ERROR; + + currState.location=ret; + } + + return { + startState: function() { + return { + location : Location.PRE_SUBJECT, + uris : [], + anchors : [], + bnodes : [], + langs : [], + types : [] + }; + }, + token: function(stream, state) { + var ch = stream.next(); + if(ch == '<') { + transitState(state, ch); + var parsedURI = ''; + stream.eatWhile( function(c) { if( c != '#' && c != '>' ) { parsedURI += c; return true; } return false;} ); + state.uris.push(parsedURI); + if( stream.match('#', false) ) return 'variable'; + stream.next(); + transitState(state, '>'); + return 'variable'; + } + if(ch == '#') { + var parsedAnchor = ''; + stream.eatWhile(function(c) { if(c != '>' && c != ' ') { parsedAnchor+= c; return true; } return false;}); + state.anchors.push(parsedAnchor); + return 'variable-2'; + } + if(ch == '>') { + transitState(state, '>'); + return 'variable'; + } + if(ch == '_') { + transitState(state, ch); + var parsedBNode = ''; + stream.eatWhile(function(c) { if( c != ' ' ) { parsedBNode += c; return true; } return false;}); + state.bnodes.push(parsedBNode); + stream.next(); + transitState(state, ' '); + return 'builtin'; + } + if(ch == '"') { + transitState(state, ch); + stream.eatWhile( function(c) { return c != '"'; } ); + stream.next(); + if( stream.peek() != '@' && stream.peek() != '^' ) { + transitState(state, '"'); + } + return 'string'; + } + if( ch == '@' ) { + transitState(state, '@'); + var parsedLang = ''; + stream.eatWhile(function(c) { if( c != ' ' ) { parsedLang += c; return true; } return false;}); + state.langs.push(parsedLang); + stream.next(); + transitState(state, ' '); + return 'string-2'; + } + if( ch == '^' ) { + stream.next(); + transitState(state, '^'); + var parsedType = ''; + stream.eatWhile(function(c) { if( c != '>' ) { parsedType += c; return true; } return false;} ); + state.types.push(parsedType); + stream.next(); + transitState(state, '>'); + return 'variable'; + } + if( ch == ' ' ) { + transitState(state, ch); + } + if( ch == '.' ) { + transitState(state, ch); + } + } + }; +}); + +CodeMirror.defineMIME("text/n-triples", "ntriples"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/ocaml/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/ocaml/index.html new file mode 100644 index 00000000..5d39fadd --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/ocaml/index.html @@ -0,0 +1,146 @@ + + +CodeMirror: OCaml mode + + + + + + + + + + +
+

OCaml mode

+ + + + + + +

MIME types defined: text/x-ocaml.

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/ocaml/ocaml.js b/pitfall/pdfkit/node_modules/codemirror/mode/ocaml/ocaml.js new file mode 100644 index 00000000..32cbc0b7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/ocaml/ocaml.js @@ -0,0 +1,116 @@ +CodeMirror.defineMode('ocaml', function() { + + var words = { + 'true': 'atom', + 'false': 'atom', + 'let': 'keyword', + 'rec': 'keyword', + 'in': 'keyword', + 'of': 'keyword', + 'and': 'keyword', + 'succ': 'keyword', + 'if': 'keyword', + 'then': 'keyword', + 'else': 'keyword', + 'for': 'keyword', + 'to': 'keyword', + 'while': 'keyword', + 'do': 'keyword', + 'done': 'keyword', + 'fun': 'keyword', + 'function': 'keyword', + 'val': 'keyword', + 'type': 'keyword', + 'mutable': 'keyword', + 'match': 'keyword', + 'with': 'keyword', + 'try': 'keyword', + 'raise': 'keyword', + 'begin': 'keyword', + 'end': 'keyword', + 'open': 'builtin', + 'trace': 'builtin', + 'ignore': 'builtin', + 'exit': 'builtin', + 'print_string': 'builtin', + 'print_endline': 'builtin' + }; + + function tokenBase(stream, state) { + var ch = stream.next(); + + if (ch === '"') { + state.tokenize = tokenString; + return state.tokenize(stream, state); + } + if (ch === '(') { + if (stream.eat('*')) { + state.commentLevel++; + state.tokenize = tokenComment; + return state.tokenize(stream, state); + } + } + if (ch === '~') { + stream.eatWhile(/\w/); + return 'variable-2'; + } + if (ch === '`') { + stream.eatWhile(/\w/); + return 'quote'; + } + if (/\d/.test(ch)) { + stream.eatWhile(/[\d]/); + if (stream.eat('.')) { + stream.eatWhile(/[\d]/); + } + return 'number'; + } + if ( /[+\-*&%=<>!?|]/.test(ch)) { + return 'operator'; + } + stream.eatWhile(/\w/); + var cur = stream.current(); + return words[cur] || 'variable'; + } + + function tokenString(stream, state) { + var next, end = false, escaped = false; + while ((next = stream.next()) != null) { + if (next === '"' && !escaped) { + end = true; + break; + } + escaped = !escaped && next === '\\'; + } + if (end && !escaped) { + state.tokenize = tokenBase; + } + return 'string'; + }; + + function tokenComment(stream, state) { + var prev, next; + while(state.commentLevel > 0 && (next = stream.next()) != null) { + if (prev === '(' && next === '*') state.commentLevel++; + if (prev === '*' && next === ')') state.commentLevel--; + prev = next; + } + if (state.commentLevel <= 0) { + state.tokenize = tokenBase; + } + return 'comment'; + } + + return { + startState: function() {return {tokenize: tokenBase, commentLevel: 0};}, + token: function(stream, state) { + if (stream.eatSpace()) return null; + return state.tokenize(stream, state); + }, + + blockCommentStart: "(*", + blockCommentEnd: "*)" + }; +}); + +CodeMirror.defineMIME('text/x-ocaml', 'ocaml'); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/octave/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/octave/index.html new file mode 100644 index 00000000..bd5a5232 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/octave/index.html @@ -0,0 +1,95 @@ + + +CodeMirror: Octave mode + + + + + + + + + +
+

Octave mode

+ +
+ + +

MIME types defined: text/x-octave.

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/octave/octave.js b/pitfall/pdfkit/node_modules/codemirror/mode/octave/octave.js new file mode 100644 index 00000000..23cd2fe2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/octave/octave.js @@ -0,0 +1,118 @@ +CodeMirror.defineMode("octave", function() { + function wordRegexp(words) { + return new RegExp("^((" + words.join(")|(") + "))\\b"); + } + + var singleOperators = new RegExp("^[\\+\\-\\*/&|\\^~<>!@'\\\\]"); + var singleDelimiters = new RegExp('^[\\(\\[\\{\\},:=;]'); + var doubleOperators = new RegExp("^((==)|(~=)|(<=)|(>=)|(<<)|(>>)|(\\.[\\+\\-\\*/\\^\\\\]))"); + var doubleDelimiters = new RegExp("^((!=)|(\\+=)|(\\-=)|(\\*=)|(/=)|(&=)|(\\|=)|(\\^=))"); + var tripleDelimiters = new RegExp("^((>>=)|(<<=))"); + var expressionEnd = new RegExp("^[\\]\\)]"); + var identifiers = new RegExp("^[_A-Za-z][_A-Za-z0-9]*"); + + var builtins = wordRegexp([ + 'error', 'eval', 'function', 'abs', 'acos', 'atan', 'asin', 'cos', + 'cosh', 'exp', 'log', 'prod', 'log10', 'max', 'min', 'sign', 'sin', 'sinh', + 'sqrt', 'tan', 'reshape', 'break', 'zeros', 'default', 'margin', 'round', 'ones', + 'rand', 'syn', 'ceil', 'floor', 'size', 'clear', 'zeros', 'eye', 'mean', 'std', 'cov', + 'det', 'eig', 'inv', 'norm', 'rank', 'trace', 'expm', 'logm', 'sqrtm', 'linspace', 'plot', + 'title', 'xlabel', 'ylabel', 'legend', 'text', 'meshgrid', 'mesh', 'num2str' + ]); + + var keywords = wordRegexp([ + 'return', 'case', 'switch', 'else', 'elseif', 'end', 'endif', 'endfunction', + 'if', 'otherwise', 'do', 'for', 'while', 'try', 'catch', 'classdef', 'properties', 'events', + 'methods', 'global', 'persistent', 'endfor', 'endwhile', 'printf', 'disp', 'until', 'continue' + ]); + + + // tokenizers + function tokenTranspose(stream, state) { + if (!stream.sol() && stream.peek() === '\'') { + stream.next(); + state.tokenize = tokenBase; + return 'operator'; + } + state.tokenize = tokenBase; + return tokenBase(stream, state); + } + + + function tokenComment(stream, state) { + if (stream.match(/^.*%}/)) { + state.tokenize = tokenBase; + return 'comment'; + }; + stream.skipToEnd(); + return 'comment'; + } + + function tokenBase(stream, state) { + // whitespaces + if (stream.eatSpace()) return null; + + // Handle one line Comments + if (stream.match('%{')){ + state.tokenize = tokenComment; + stream.skipToEnd(); + return 'comment'; + } + + if (stream.match(/^(%)|(\.\.\.)/)){ + stream.skipToEnd(); + return 'comment'; + } + + // Handle Number Literals + if (stream.match(/^[0-9\.+-]/, false)) { + if (stream.match(/^[+-]?0x[0-9a-fA-F]+[ij]?/)) { + stream.tokenize = tokenBase; + return 'number'; }; + if (stream.match(/^[+-]?\d*\.\d+([EeDd][+-]?\d+)?[ij]?/)) { return 'number'; }; + if (stream.match(/^[+-]?\d+([EeDd][+-]?\d+)?[ij]?/)) { return 'number'; }; + } + if (stream.match(wordRegexp(['nan','NaN','inf','Inf']))) { return 'number'; }; + + // Handle Strings + if (stream.match(/^"([^"]|(""))*"/)) { return 'string'; } ; + if (stream.match(/^'([^']|(''))*'/)) { return 'string'; } ; + + // Handle words + if (stream.match(keywords)) { return 'keyword'; } ; + if (stream.match(builtins)) { return 'builtin'; } ; + if (stream.match(identifiers)) { return 'variable'; } ; + + if (stream.match(singleOperators) || stream.match(doubleOperators)) { return 'operator'; }; + if (stream.match(singleDelimiters) || stream.match(doubleDelimiters) || stream.match(tripleDelimiters)) { return null; }; + + if (stream.match(expressionEnd)) { + state.tokenize = tokenTranspose; + return null; + }; + + + // Handle non-detected items + stream.next(); + return 'error'; + }; + + + return { + startState: function() { + return { + tokenize: tokenBase + }; + }, + + token: function(stream, state) { + var style = state.tokenize(stream, state); + if (style === 'number' || style === 'variable'){ + state.tokenize = tokenTranspose; + } + return style; + } + }; +}); + +CodeMirror.defineMIME("text/x-octave", "octave"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/pascal/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/pascal/index.html new file mode 100644 index 00000000..bf8ff0d6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/pascal/index.html @@ -0,0 +1,61 @@ + + +CodeMirror: Pascal mode + + + + + + + + + +
+

Pascal mode

+ + +
+ + + +

MIME types defined: text/x-pascal.

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/pascal/pascal.js b/pitfall/pdfkit/node_modules/codemirror/mode/pascal/pascal.js new file mode 100644 index 00000000..09d9b061 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/pascal/pascal.js @@ -0,0 +1,94 @@ +CodeMirror.defineMode("pascal", function() { + function words(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + var keywords = words("and array begin case const div do downto else end file for forward integer " + + "boolean char function goto if in label mod nil not of or packed procedure " + + "program record repeat set string then to type until var while with"); + var atoms = {"null": true}; + + var isOperatorChar = /[+\-*&%=<>!?|\/]/; + + function tokenBase(stream, state) { + var ch = stream.next(); + if (ch == "#" && state.startOfLine) { + stream.skipToEnd(); + return "meta"; + } + if (ch == '"' || ch == "'") { + state.tokenize = tokenString(ch); + return state.tokenize(stream, state); + } + if (ch == "(" && stream.eat("*")) { + state.tokenize = tokenComment; + return tokenComment(stream, state); + } + if (/[\[\]{}\(\),;\:\.]/.test(ch)) { + return null; + } + if (/\d/.test(ch)) { + stream.eatWhile(/[\w\.]/); + return "number"; + } + if (ch == "/") { + if (stream.eat("/")) { + stream.skipToEnd(); + return "comment"; + } + } + if (isOperatorChar.test(ch)) { + stream.eatWhile(isOperatorChar); + return "operator"; + } + stream.eatWhile(/[\w\$_]/); + var cur = stream.current(); + if (keywords.propertyIsEnumerable(cur)) return "keyword"; + if (atoms.propertyIsEnumerable(cur)) return "atom"; + return "variable"; + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, next, end = false; + while ((next = stream.next()) != null) { + if (next == quote && !escaped) {end = true; break;} + escaped = !escaped && next == "\\"; + } + if (end || !escaped) state.tokenize = null; + return "string"; + }; + } + + function tokenComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (ch == ")" && maybeEnd) { + state.tokenize = null; + break; + } + maybeEnd = (ch == "*"); + } + return "comment"; + } + + // Interface + + return { + startState: function() { + return {tokenize: null}; + }, + + token: function(stream, state) { + if (stream.eatSpace()) return null; + var style = (state.tokenize || tokenBase)(stream, state); + if (style == "comment" || style == "meta") return style; + return style; + }, + + electricChars: "{}" + }; +}); + +CodeMirror.defineMIME("text/x-pascal", "pascal"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/pegjs/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/pegjs/index.html new file mode 100644 index 00000000..678b714d --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/pegjs/index.html @@ -0,0 +1,66 @@ + + + + CodeMirror: PEG.js Mode + + + + + + + + + + + + +
+

PEG.js Mode

+
+ +

The PEG.js Mode

+

Created by Forbes Lindesay.

+
+ + diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/pegjs/pegjs.js b/pitfall/pdfkit/node_modules/codemirror/mode/pegjs/pegjs.js new file mode 100644 index 00000000..6cdcc61f --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/pegjs/pegjs.js @@ -0,0 +1,103 @@ +CodeMirror.defineMode("pegjs", function (config) { + var jsMode = CodeMirror.getMode(config, "javascript"); + + function identifier(stream) { + return stream.match(/^[a-zA-Z_][a-zA-Z0-9_]*/); + } + + return { + startState: function () { + return { + inString: false, + stringType: null, + inComment: false, + inChracterClass: false, + braced: 0, + lhs: true, + localState: null + }; + }, + token: function (stream, state) { + if (stream) + + //check for state changes + if (!state.inString && !state.inComment && ((stream.peek() == '"') || (stream.peek() == "'"))) { + state.stringType = stream.peek(); + stream.next(); // Skip quote + state.inString = true; // Update state + } + if (!state.inString && !state.inComment && stream.match(/^\/\*/)) { + state.inComment = true; + } + + //return state + if (state.inString) { + while (state.inString && !stream.eol()) { + if (stream.peek() === state.stringType) { + stream.next(); // Skip quote + state.inString = false; // Clear flag + } else if (stream.peek() === '\\') { + stream.next(); + stream.next(); + } else { + stream.match(/^.[^\\\"\']*/); + } + } + return state.lhs ? "property string" : "string"; // Token style + } else if (state.inComment) { + while (state.inComment && !stream.eol()) { + if (stream.match(/\*\//)) { + state.inComment = false; // Clear flag + } else { + stream.match(/^.[^\*]*/); + } + } + return "comment"; + } else if (state.inChracterClass) { + if (stream.match(/^[^\]\\]+/)) { + return; + } else if (stream.match(/^\\./)) { + return; + } else { + stream.next(); + state.inChracterClass = false; + return 'bracket'; + } + } else if (stream.peek() === '[') { + stream.next(); + state.inChracterClass = true; + return 'bracket'; + } else if (stream.match(/^\/\//)) { + stream.skipToEnd(); + return "comment"; + } else if (state.braced || stream.peek() === '{') { + if (state.localState === null) { + state.localState = jsMode.startState(); + } + var token = jsMode.token(stream, state.localState); + var text = stream.current(); + if (!token) { + for (var i = 0; i < text.length; i++) { + if (text[i] === '{') { + state.braced++; + } else if (text[i] === '}') { + state.braced--; + } + }; + } + return token; + } else if (identifier(stream)) { + if (stream.peek() === ':') { + return 'variable'; + } + return 'variable-2'; + } else if (['[', ']', '(', ')'].indexOf(stream.peek()) != -1) { + stream.next(); + return 'bracket'; + } else if (!stream.eatSpace()) { + stream.next(); + } + return null; + } + }; +}, "javascript"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/perl/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/perl/index.html new file mode 100644 index 00000000..2b7578ef --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/perl/index.html @@ -0,0 +1,75 @@ + + +CodeMirror: Perl mode + + + + + + + + + +
+

Perl mode

+ + +
+ + + +

MIME types defined: text/x-perl.

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/perl/perl.js b/pitfall/pdfkit/node_modules/codemirror/mode/perl/perl.js new file mode 100644 index 00000000..5954b1a6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/perl/perl.js @@ -0,0 +1,816 @@ +// CodeMirror2 mode/perl/perl.js (text/x-perl) beta 0.10 (2011-11-08) +// This is a part of CodeMirror from https://github.com/sabaca/CodeMirror_mode_perl (mail@sabaca.com) +CodeMirror.defineMode("perl",function(){ + // http://perldoc.perl.org + var PERL={ // null - magic touch + // 1 - keyword + // 2 - def + // 3 - atom + // 4 - operator + // 5 - variable-2 (predefined) + // [x,y] - x=1,2,3; y=must be defined if x{...} + // PERL operators + '->' : 4, + '++' : 4, + '--' : 4, + '**' : 4, + // ! ~ \ and unary + and - + '=~' : 4, + '!~' : 4, + '*' : 4, + '/' : 4, + '%' : 4, + 'x' : 4, + '+' : 4, + '-' : 4, + '.' : 4, + '<<' : 4, + '>>' : 4, + // named unary operators + '<' : 4, + '>' : 4, + '<=' : 4, + '>=' : 4, + 'lt' : 4, + 'gt' : 4, + 'le' : 4, + 'ge' : 4, + '==' : 4, + '!=' : 4, + '<=>' : 4, + 'eq' : 4, + 'ne' : 4, + 'cmp' : 4, + '~~' : 4, + '&' : 4, + '|' : 4, + '^' : 4, + '&&' : 4, + '||' : 4, + '//' : 4, + '..' : 4, + '...' : 4, + '?' : 4, + ':' : 4, + '=' : 4, + '+=' : 4, + '-=' : 4, + '*=' : 4, // etc. ??? + ',' : 4, + '=>' : 4, + '::' : 4, + // list operators (rightward) + 'not' : 4, + 'and' : 4, + 'or' : 4, + 'xor' : 4, + // PERL predefined variables (I know, what this is a paranoid idea, but may be needed for people, who learn PERL, and for me as well, ...and may be for you?;) + 'BEGIN' : [5,1], + 'END' : [5,1], + 'PRINT' : [5,1], + 'PRINTF' : [5,1], + 'GETC' : [5,1], + 'READ' : [5,1], + 'READLINE' : [5,1], + 'DESTROY' : [5,1], + 'TIE' : [5,1], + 'TIEHANDLE' : [5,1], + 'UNTIE' : [5,1], + 'STDIN' : 5, + 'STDIN_TOP' : 5, + 'STDOUT' : 5, + 'STDOUT_TOP' : 5, + 'STDERR' : 5, + 'STDERR_TOP' : 5, + '$ARG' : 5, + '$_' : 5, + '@ARG' : 5, + '@_' : 5, + '$LIST_SEPARATOR' : 5, + '$"' : 5, + '$PROCESS_ID' : 5, + '$PID' : 5, + '$$' : 5, + '$REAL_GROUP_ID' : 5, + '$GID' : 5, + '$(' : 5, + '$EFFECTIVE_GROUP_ID' : 5, + '$EGID' : 5, + '$)' : 5, + '$PROGRAM_NAME' : 5, + '$0' : 5, + '$SUBSCRIPT_SEPARATOR' : 5, + '$SUBSEP' : 5, + '$;' : 5, + '$REAL_USER_ID' : 5, + '$UID' : 5, + '$<' : 5, + '$EFFECTIVE_USER_ID' : 5, + '$EUID' : 5, + '$>' : 5, + '$a' : 5, + '$b' : 5, + '$COMPILING' : 5, + '$^C' : 5, + '$DEBUGGING' : 5, + '$^D' : 5, + '${^ENCODING}' : 5, + '$ENV' : 5, + '%ENV' : 5, + '$SYSTEM_FD_MAX' : 5, + '$^F' : 5, + '@F' : 5, + '${^GLOBAL_PHASE}' : 5, + '$^H' : 5, + '%^H' : 5, + '@INC' : 5, + '%INC' : 5, + '$INPLACE_EDIT' : 5, + '$^I' : 5, + '$^M' : 5, + '$OSNAME' : 5, + '$^O' : 5, + '${^OPEN}' : 5, + '$PERLDB' : 5, + '$^P' : 5, + '$SIG' : 5, + '%SIG' : 5, + '$BASETIME' : 5, + '$^T' : 5, + '${^TAINT}' : 5, + '${^UNICODE}' : 5, + '${^UTF8CACHE}' : 5, + '${^UTF8LOCALE}' : 5, + '$PERL_VERSION' : 5, + '$^V' : 5, + '${^WIN32_SLOPPY_STAT}' : 5, + '$EXECUTABLE_NAME' : 5, + '$^X' : 5, + '$1' : 5, // - regexp $1, $2... + '$MATCH' : 5, + '$&' : 5, + '${^MATCH}' : 5, + '$PREMATCH' : 5, + '$`' : 5, + '${^PREMATCH}' : 5, + '$POSTMATCH' : 5, + "$'" : 5, + '${^POSTMATCH}' : 5, + '$LAST_PAREN_MATCH' : 5, + '$+' : 5, + '$LAST_SUBMATCH_RESULT' : 5, + '$^N' : 5, + '@LAST_MATCH_END' : 5, + '@+' : 5, + '%LAST_PAREN_MATCH' : 5, + '%+' : 5, + '@LAST_MATCH_START' : 5, + '@-' : 5, + '%LAST_MATCH_START' : 5, + '%-' : 5, + '$LAST_REGEXP_CODE_RESULT' : 5, + '$^R' : 5, + '${^RE_DEBUG_FLAGS}' : 5, + '${^RE_TRIE_MAXBUF}' : 5, + '$ARGV' : 5, + '@ARGV' : 5, + 'ARGV' : 5, + 'ARGVOUT' : 5, + '$OUTPUT_FIELD_SEPARATOR' : 5, + '$OFS' : 5, + '$,' : 5, + '$INPUT_LINE_NUMBER' : 5, + '$NR' : 5, + '$.' : 5, + '$INPUT_RECORD_SEPARATOR' : 5, + '$RS' : 5, + '$/' : 5, + '$OUTPUT_RECORD_SEPARATOR' : 5, + '$ORS' : 5, + '$\\' : 5, + '$OUTPUT_AUTOFLUSH' : 5, + '$|' : 5, + '$ACCUMULATOR' : 5, + '$^A' : 5, + '$FORMAT_FORMFEED' : 5, + '$^L' : 5, + '$FORMAT_PAGE_NUMBER' : 5, + '$%' : 5, + '$FORMAT_LINES_LEFT' : 5, + '$-' : 5, + '$FORMAT_LINE_BREAK_CHARACTERS' : 5, + '$:' : 5, + '$FORMAT_LINES_PER_PAGE' : 5, + '$=' : 5, + '$FORMAT_TOP_NAME' : 5, + '$^' : 5, + '$FORMAT_NAME' : 5, + '$~' : 5, + '${^CHILD_ERROR_NATIVE}' : 5, + '$EXTENDED_OS_ERROR' : 5, + '$^E' : 5, + '$EXCEPTIONS_BEING_CAUGHT' : 5, + '$^S' : 5, + '$WARNING' : 5, + '$^W' : 5, + '${^WARNING_BITS}' : 5, + '$OS_ERROR' : 5, + '$ERRNO' : 5, + '$!' : 5, + '%OS_ERROR' : 5, + '%ERRNO' : 5, + '%!' : 5, + '$CHILD_ERROR' : 5, + '$?' : 5, + '$EVAL_ERROR' : 5, + '$@' : 5, + '$OFMT' : 5, + '$#' : 5, + '$*' : 5, + '$ARRAY_BASE' : 5, + '$[' : 5, + '$OLD_PERL_VERSION' : 5, + '$]' : 5, + // PERL blocks + 'if' :[1,1], + elsif :[1,1], + 'else' :[1,1], + 'while' :[1,1], + unless :[1,1], + 'for' :[1,1], + foreach :[1,1], + // PERL functions + 'abs' :1, // - absolute value function + accept :1, // - accept an incoming socket connect + alarm :1, // - schedule a SIGALRM + 'atan2' :1, // - arctangent of Y/X in the range -PI to PI + bind :1, // - binds an address to a socket + binmode :1, // - prepare binary files for I/O + bless :1, // - create an object + bootstrap :1, // + 'break' :1, // - break out of a "given" block + caller :1, // - get context of the current subroutine call + chdir :1, // - change your current working directory + chmod :1, // - changes the permissions on a list of files + chomp :1, // - remove a trailing record separator from a string + chop :1, // - remove the last character from a string + chown :1, // - change the owership on a list of files + chr :1, // - get character this number represents + chroot :1, // - make directory new root for path lookups + close :1, // - close file (or pipe or socket) handle + closedir :1, // - close directory handle + connect :1, // - connect to a remote socket + 'continue' :[1,1], // - optional trailing block in a while or foreach + 'cos' :1, // - cosine function + crypt :1, // - one-way passwd-style encryption + dbmclose :1, // - breaks binding on a tied dbm file + dbmopen :1, // - create binding on a tied dbm file + 'default' :1, // + defined :1, // - test whether a value, variable, or function is defined + 'delete' :1, // - deletes a value from a hash + die :1, // - raise an exception or bail out + 'do' :1, // - turn a BLOCK into a TERM + dump :1, // - create an immediate core dump + each :1, // - retrieve the next key/value pair from a hash + endgrent :1, // - be done using group file + endhostent :1, // - be done using hosts file + endnetent :1, // - be done using networks file + endprotoent :1, // - be done using protocols file + endpwent :1, // - be done using passwd file + endservent :1, // - be done using services file + eof :1, // - test a filehandle for its end + 'eval' :1, // - catch exceptions or compile and run code + 'exec' :1, // - abandon this program to run another + exists :1, // - test whether a hash key is present + exit :1, // - terminate this program + 'exp' :1, // - raise I to a power + fcntl :1, // - file control system call + fileno :1, // - return file descriptor from filehandle + flock :1, // - lock an entire file with an advisory lock + fork :1, // - create a new process just like this one + format :1, // - declare a picture format with use by the write() function + formline :1, // - internal function used for formats + getc :1, // - get the next character from the filehandle + getgrent :1, // - get next group record + getgrgid :1, // - get group record given group user ID + getgrnam :1, // - get group record given group name + gethostbyaddr :1, // - get host record given its address + gethostbyname :1, // - get host record given name + gethostent :1, // - get next hosts record + getlogin :1, // - return who logged in at this tty + getnetbyaddr :1, // - get network record given its address + getnetbyname :1, // - get networks record given name + getnetent :1, // - get next networks record + getpeername :1, // - find the other end of a socket connection + getpgrp :1, // - get process group + getppid :1, // - get parent process ID + getpriority :1, // - get current nice value + getprotobyname :1, // - get protocol record given name + getprotobynumber :1, // - get protocol record numeric protocol + getprotoent :1, // - get next protocols record + getpwent :1, // - get next passwd record + getpwnam :1, // - get passwd record given user login name + getpwuid :1, // - get passwd record given user ID + getservbyname :1, // - get services record given its name + getservbyport :1, // - get services record given numeric port + getservent :1, // - get next services record + getsockname :1, // - retrieve the sockaddr for a given socket + getsockopt :1, // - get socket options on a given socket + given :1, // + glob :1, // - expand filenames using wildcards + gmtime :1, // - convert UNIX time into record or string using Greenwich time + 'goto' :1, // - create spaghetti code + grep :1, // - locate elements in a list test true against a given criterion + hex :1, // - convert a string to a hexadecimal number + 'import' :1, // - patch a module's namespace into your own + index :1, // - find a substring within a string + 'int' :1, // - get the integer portion of a number + ioctl :1, // - system-dependent device control system call + 'join' :1, // - join a list into a string using a separator + keys :1, // - retrieve list of indices from a hash + kill :1, // - send a signal to a process or process group + last :1, // - exit a block prematurely + lc :1, // - return lower-case version of a string + lcfirst :1, // - return a string with just the next letter in lower case + length :1, // - return the number of bytes in a string + 'link' :1, // - create a hard link in the filesytem + listen :1, // - register your socket as a server + local : 2, // - create a temporary value for a global variable (dynamic scoping) + localtime :1, // - convert UNIX time into record or string using local time + lock :1, // - get a thread lock on a variable, subroutine, or method + 'log' :1, // - retrieve the natural logarithm for a number + lstat :1, // - stat a symbolic link + m :null, // - match a string with a regular expression pattern + map :1, // - apply a change to a list to get back a new list with the changes + mkdir :1, // - create a directory + msgctl :1, // - SysV IPC message control operations + msgget :1, // - get SysV IPC message queue + msgrcv :1, // - receive a SysV IPC message from a message queue + msgsnd :1, // - send a SysV IPC message to a message queue + my : 2, // - declare and assign a local variable (lexical scoping) + 'new' :1, // + next :1, // - iterate a block prematurely + no :1, // - unimport some module symbols or semantics at compile time + oct :1, // - convert a string to an octal number + open :1, // - open a file, pipe, or descriptor + opendir :1, // - open a directory + ord :1, // - find a character's numeric representation + our : 2, // - declare and assign a package variable (lexical scoping) + pack :1, // - convert a list into a binary representation + 'package' :1, // - declare a separate global namespace + pipe :1, // - open a pair of connected filehandles + pop :1, // - remove the last element from an array and return it + pos :1, // - find or set the offset for the last/next m//g search + print :1, // - output a list to a filehandle + printf :1, // - output a formatted list to a filehandle + prototype :1, // - get the prototype (if any) of a subroutine + push :1, // - append one or more elements to an array + q :null, // - singly quote a string + qq :null, // - doubly quote a string + qr :null, // - Compile pattern + quotemeta :null, // - quote regular expression magic characters + qw :null, // - quote a list of words + qx :null, // - backquote quote a string + rand :1, // - retrieve the next pseudorandom number + read :1, // - fixed-length buffered input from a filehandle + readdir :1, // - get a directory from a directory handle + readline :1, // - fetch a record from a file + readlink :1, // - determine where a symbolic link is pointing + readpipe :1, // - execute a system command and collect standard output + recv :1, // - receive a message over a Socket + redo :1, // - start this loop iteration over again + ref :1, // - find out the type of thing being referenced + rename :1, // - change a filename + require :1, // - load in external functions from a library at runtime + reset :1, // - clear all variables of a given name + 'return' :1, // - get out of a function early + reverse :1, // - flip a string or a list + rewinddir :1, // - reset directory handle + rindex :1, // - right-to-left substring search + rmdir :1, // - remove a directory + s :null, // - replace a pattern with a string + say :1, // - print with newline + scalar :1, // - force a scalar context + seek :1, // - reposition file pointer for random-access I/O + seekdir :1, // - reposition directory pointer + select :1, // - reset default output or do I/O multiplexing + semctl :1, // - SysV semaphore control operations + semget :1, // - get set of SysV semaphores + semop :1, // - SysV semaphore operations + send :1, // - send a message over a socket + setgrent :1, // - prepare group file for use + sethostent :1, // - prepare hosts file for use + setnetent :1, // - prepare networks file for use + setpgrp :1, // - set the process group of a process + setpriority :1, // - set a process's nice value + setprotoent :1, // - prepare protocols file for use + setpwent :1, // - prepare passwd file for use + setservent :1, // - prepare services file for use + setsockopt :1, // - set some socket options + shift :1, // - remove the first element of an array, and return it + shmctl :1, // - SysV shared memory operations + shmget :1, // - get SysV shared memory segment identifier + shmread :1, // - read SysV shared memory + shmwrite :1, // - write SysV shared memory + shutdown :1, // - close down just half of a socket connection + 'sin' :1, // - return the sine of a number + sleep :1, // - block for some number of seconds + socket :1, // - create a socket + socketpair :1, // - create a pair of sockets + 'sort' :1, // - sort a list of values + splice :1, // - add or remove elements anywhere in an array + 'split' :1, // - split up a string using a regexp delimiter + sprintf :1, // - formatted print into a string + 'sqrt' :1, // - square root function + srand :1, // - seed the random number generator + stat :1, // - get a file's status information + state :1, // - declare and assign a state variable (persistent lexical scoping) + study :1, // - optimize input data for repeated searches + 'sub' :1, // - declare a subroutine, possibly anonymously + 'substr' :1, // - get or alter a portion of a stirng + symlink :1, // - create a symbolic link to a file + syscall :1, // - execute an arbitrary system call + sysopen :1, // - open a file, pipe, or descriptor + sysread :1, // - fixed-length unbuffered input from a filehandle + sysseek :1, // - position I/O pointer on handle used with sysread and syswrite + system :1, // - run a separate program + syswrite :1, // - fixed-length unbuffered output to a filehandle + tell :1, // - get current seekpointer on a filehandle + telldir :1, // - get current seekpointer on a directory handle + tie :1, // - bind a variable to an object class + tied :1, // - get a reference to the object underlying a tied variable + time :1, // - return number of seconds since 1970 + times :1, // - return elapsed time for self and child processes + tr :null, // - transliterate a string + truncate :1, // - shorten a file + uc :1, // - return upper-case version of a string + ucfirst :1, // - return a string with just the next letter in upper case + umask :1, // - set file creation mode mask + undef :1, // - remove a variable or function definition + unlink :1, // - remove one link to a file + unpack :1, // - convert binary structure into normal perl variables + unshift :1, // - prepend more elements to the beginning of a list + untie :1, // - break a tie binding to a variable + use :1, // - load in a module at compile time + utime :1, // - set a file's last access and modify times + values :1, // - return a list of the values in a hash + vec :1, // - test or set particular bits in a string + wait :1, // - wait for any child process to die + waitpid :1, // - wait for a particular child process to die + wantarray :1, // - get void vs scalar vs list context of current subroutine call + warn :1, // - print debugging info + when :1, // + write :1, // - print a picture record + y :null}; // - transliterate a string + + var RXstyle="string-2"; + var RXmodifiers=/[goseximacplud]/; // NOTE: "m", "s", "y" and "tr" need to correct real modifiers for each regexp type + + function tokenChain(stream,state,chain,style,tail){ // NOTE: chain.length > 2 is not working now (it's for s[...][...]geos;) + state.chain=null; // 12 3tail + state.style=null; + state.tail=null; + state.tokenize=function(stream,state){ + var e=false,c,i=0; + while(c=stream.next()){ + if(c===chain[i]&&!e){ + if(chain[++i]!==undefined){ + state.chain=chain[i]; + state.style=style; + state.tail=tail;} + else if(tail) + stream.eatWhile(tail); + state.tokenize=tokenPerl; + return style;} + e=!e&&c=="\\";} + return style;}; + return state.tokenize(stream,state);} + + function tokenSOMETHING(stream,state,string){ + state.tokenize=function(stream,state){ + if(stream.string==string) + state.tokenize=tokenPerl; + stream.skipToEnd(); + return "string";}; + return state.tokenize(stream,state);} + + function tokenPerl(stream,state){ + if(stream.eatSpace()) + return null; + if(state.chain) + return tokenChain(stream,state,state.chain,state.style,state.tail); + if(stream.match(/^\-?[\d\.]/,false)) + if(stream.match(/^(\-?(\d*\.\d+(e[+-]?\d+)?|\d+\.\d*)|0x[\da-fA-F]+|0b[01]+|\d+(e[+-]?\d+)?)/)) + return 'number'; + if(stream.match(/^<<(?=\w)/)){ // NOTE: <"],RXstyle,RXmodifiers);} + if(/[\^'"!~\/]/.test(c)){ + stream.eatSuffix(1); + return tokenChain(stream,state,[stream.eat(c)],RXstyle,RXmodifiers);}} + else if(c=="q"){ + c=stream.look(1); + if(c=="("){ + stream.eatSuffix(2); + return tokenChain(stream,state,[")"],"string");} + if(c=="["){ + stream.eatSuffix(2); + return tokenChain(stream,state,["]"],"string");} + if(c=="{"){ +stream.eatSuffix(2); + return tokenChain(stream,state,["}"],"string");} + if(c=="<"){ + stream.eatSuffix(2); + return tokenChain(stream,state,[">"],"string");} + if(/[\^'"!~\/]/.test(c)){ + stream.eatSuffix(1); + return tokenChain(stream,state,[stream.eat(c)],"string");}} + else if(c=="w"){ + c=stream.look(1); + if(c=="("){ + stream.eatSuffix(2); + return tokenChain(stream,state,[")"],"bracket");} + if(c=="["){ + stream.eatSuffix(2); + return tokenChain(stream,state,["]"],"bracket");} + if(c=="{"){ + stream.eatSuffix(2); + return tokenChain(stream,state,["}"],"bracket");} + if(c=="<"){ + stream.eatSuffix(2); + return tokenChain(stream,state,[">"],"bracket");} + if(/[\^'"!~\/]/.test(c)){ + stream.eatSuffix(1); + return tokenChain(stream,state,[stream.eat(c)],"bracket");}} + else if(c=="r"){ + c=stream.look(1); + if(c=="("){ + stream.eatSuffix(2); + return tokenChain(stream,state,[")"],RXstyle,RXmodifiers);} + if(c=="["){ + stream.eatSuffix(2); + return tokenChain(stream,state,["]"],RXstyle,RXmodifiers);} + if(c=="{"){ + stream.eatSuffix(2); + return tokenChain(stream,state,["}"],RXstyle,RXmodifiers);} + if(c=="<"){ + stream.eatSuffix(2); + return tokenChain(stream,state,[">"],RXstyle,RXmodifiers);} + if(/[\^'"!~\/]/.test(c)){ + stream.eatSuffix(1); + return tokenChain(stream,state,[stream.eat(c)],RXstyle,RXmodifiers);}} + else if(/[\^'"!~\/(\[{<]/.test(c)){ + if(c=="("){ + stream.eatSuffix(1); + return tokenChain(stream,state,[")"],"string");} + if(c=="["){ + stream.eatSuffix(1); + return tokenChain(stream,state,["]"],"string");} + if(c=="{"){ + stream.eatSuffix(1); + return tokenChain(stream,state,["}"],"string");} + if(c=="<"){ + stream.eatSuffix(1); + return tokenChain(stream,state,[">"],"string");} + if(/[\^'"!~\/]/.test(c)){ + return tokenChain(stream,state,[stream.eat(c)],"string");}}}} + if(ch=="m"){ + var c=stream.look(-2); + if(!(c&&/\w/.test(c))){ + c=stream.eat(/[(\[{<\^'"!~\/]/); + if(c){ + if(/[\^'"!~\/]/.test(c)){ + return tokenChain(stream,state,[c],RXstyle,RXmodifiers);} + if(c=="("){ + return tokenChain(stream,state,[")"],RXstyle,RXmodifiers);} + if(c=="["){ + return tokenChain(stream,state,["]"],RXstyle,RXmodifiers);} + if(c=="{"){ + return tokenChain(stream,state,["}"],RXstyle,RXmodifiers);} + if(c=="<"){ + return tokenChain(stream,state,[">"],RXstyle,RXmodifiers);}}}} + if(ch=="s"){ + var c=/[\/>\]})\w]/.test(stream.look(-2)); + if(!c){ + c=stream.eat(/[(\[{<\^'"!~\/]/); + if(c){ + if(c=="[") + return tokenChain(stream,state,["]","]"],RXstyle,RXmodifiers); + if(c=="{") + return tokenChain(stream,state,["}","}"],RXstyle,RXmodifiers); + if(c=="<") + return tokenChain(stream,state,[">",">"],RXstyle,RXmodifiers); + if(c=="(") + return tokenChain(stream,state,[")",")"],RXstyle,RXmodifiers); + return tokenChain(stream,state,[c,c],RXstyle,RXmodifiers);}}} + if(ch=="y"){ + var c=/[\/>\]})\w]/.test(stream.look(-2)); + if(!c){ + c=stream.eat(/[(\[{<\^'"!~\/]/); + if(c){ + if(c=="[") + return tokenChain(stream,state,["]","]"],RXstyle,RXmodifiers); + if(c=="{") + return tokenChain(stream,state,["}","}"],RXstyle,RXmodifiers); + if(c=="<") + return tokenChain(stream,state,[">",">"],RXstyle,RXmodifiers); + if(c=="(") + return tokenChain(stream,state,[")",")"],RXstyle,RXmodifiers); + return tokenChain(stream,state,[c,c],RXstyle,RXmodifiers);}}} + if(ch=="t"){ + var c=/[\/>\]})\w]/.test(stream.look(-2)); + if(!c){ + c=stream.eat("r");if(c){ + c=stream.eat(/[(\[{<\^'"!~\/]/); + if(c){ + if(c=="[") + return tokenChain(stream,state,["]","]"],RXstyle,RXmodifiers); + if(c=="{") + return tokenChain(stream,state,["}","}"],RXstyle,RXmodifiers); + if(c=="<") + return tokenChain(stream,state,[">",">"],RXstyle,RXmodifiers); + if(c=="(") + return tokenChain(stream,state,[")",")"],RXstyle,RXmodifiers); + return tokenChain(stream,state,[c,c],RXstyle,RXmodifiers);}}}} + if(ch=="`"){ + return tokenChain(stream,state,[ch],"variable-2");} + if(ch=="/"){ + if(!/~\s*$/.test(stream.prefix())) + return "operator"; + else + return tokenChain(stream,state,[ch],RXstyle,RXmodifiers);} + if(ch=="$"){ + var p=stream.pos; + if(stream.eatWhile(/\d/)||stream.eat("{")&&stream.eatWhile(/\d/)&&stream.eat("}")) + return "variable-2"; + else + stream.pos=p;} + if(/[$@%]/.test(ch)){ + var p=stream.pos; + if(stream.eat("^")&&stream.eat(/[A-Z]/)||!/[@$%&]/.test(stream.look(-2))&&stream.eat(/[=|\\\-#?@;:&`~\^!\[\]*'"$+.,\/<>()]/)){ + var c=stream.current(); + if(PERL[c]) + return "variable-2";} + stream.pos=p;} + if(/[$@%&]/.test(ch)){ + if(stream.eatWhile(/[\w$\[\]]/)||stream.eat("{")&&stream.eatWhile(/[\w$\[\]]/)&&stream.eat("}")){ + var c=stream.current(); + if(PERL[c]) + return "variable-2"; + else + return "variable";}} + if(ch=="#"){ + if(stream.look(-2)!="$"){ + stream.skipToEnd(); + return "comment";}} + if(/[:+\-\^*$&%@=<>!?|\/~\.]/.test(ch)){ + var p=stream.pos; + stream.eatWhile(/[:+\-\^*$&%@=<>!?|\/~\.]/); + if(PERL[stream.current()]) + return "operator"; + else + stream.pos=p;} + if(ch=="_"){ + if(stream.pos==1){ + if(stream.suffix(6)=="_END__"){ + return tokenChain(stream,state,['\0'],"comment");} + else if(stream.suffix(7)=="_DATA__"){ + return tokenChain(stream,state,['\0'],"variable-2");} + else if(stream.suffix(7)=="_C__"){ + return tokenChain(stream,state,['\0'],"string");}}} + if(/\w/.test(ch)){ + var p=stream.pos; + if(stream.look(-2)=="{"&&(stream.look(0)=="}"||stream.eatWhile(/\w/)&&stream.look(0)=="}")) + return "string"; + else + stream.pos=p;} + if(/[A-Z]/.test(ch)){ + var l=stream.look(-2); + var p=stream.pos; + stream.eatWhile(/[A-Z_]/); + if(/[\da-z]/.test(stream.look(0))){ + stream.pos=p;} + else{ + var c=PERL[stream.current()]; + if(!c) + return "meta"; + if(c[1]) + c=c[0]; + if(l!=":"){ + if(c==1) + return "keyword"; + else if(c==2) + return "def"; + else if(c==3) + return "atom"; + else if(c==4) + return "operator"; + else if(c==5) + return "variable-2"; + else + return "meta";} + else + return "meta";}} + if(/[a-zA-Z_]/.test(ch)){ + var l=stream.look(-2); + stream.eatWhile(/\w/); + var c=PERL[stream.current()]; + if(!c) + return "meta"; + if(c[1]) + c=c[0]; + if(l!=":"){ + if(c==1) + return "keyword"; + else if(c==2) + return "def"; + else if(c==3) + return "atom"; + else if(c==4) + return "operator"; + else if(c==5) + return "variable-2"; + else + return "meta";} + else + return "meta";} + return null;} + + return{ + startState:function(){ + return{ + tokenize:tokenPerl, + chain:null, + style:null, + tail:null};}, + token:function(stream,state){ + return (state.tokenize||tokenPerl)(stream,state);}, + electricChars:"{}"};}); + +CodeMirror.defineMIME("text/x-perl", "perl"); + +// it's like "peek", but need for look-ahead or look-behind if index < 0 +CodeMirror.StringStream.prototype.look=function(c){ + return this.string.charAt(this.pos+(c||0));}; + +// return a part of prefix of current stream from current position +CodeMirror.StringStream.prototype.prefix=function(c){ + if(c){ + var x=this.pos-c; + return this.string.substr((x>=0?x:0),c);} + else{ + return this.string.substr(0,this.pos-1);}}; + +// return a part of suffix of current stream from current position +CodeMirror.StringStream.prototype.suffix=function(c){ + var y=this.string.length; + var x=y-this.pos+1; + return this.string.substr(this.pos,(c&&c=(y=this.string.length-1)) + this.pos=y; + else + this.pos=x;}; diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/php/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/php/index.html new file mode 100644 index 00000000..aaf51c0f --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/php/index.html @@ -0,0 +1,62 @@ + + +CodeMirror: PHP mode + + + + + + + + + + + + + + + +
+

PHP mode

+
+ + + +

Simple HTML/PHP mode based on + the C-like mode. Depends on XML, + JavaScript, CSS, HTMLMixed, and C-like modes.

+ +

MIME types defined: application/x-httpd-php (HTML with PHP code), text/x-php (plain, non-wrapped PHP code).

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/php/php.js b/pitfall/pdfkit/node_modules/codemirror/mode/php/php.js new file mode 100755 index 00000000..3555b8b1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/php/php.js @@ -0,0 +1,132 @@ +(function() { + function keywords(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + function heredoc(delim) { + return function(stream, state) { + if (stream.match(delim)) state.tokenize = null; + else stream.skipToEnd(); + return "string"; + }; + } + var phpConfig = { + name: "clike", + keywords: keywords("abstract and array as break case catch class clone const continue declare default " + + "do else elseif enddeclare endfor endforeach endif endswitch endwhile extends final " + + "for foreach function global goto if implements interface instanceof namespace " + + "new or private protected public static switch throw trait try use var while xor " + + "die echo empty exit eval include include_once isset list require require_once return " + + "print unset __halt_compiler self static parent yield insteadof finally"), + blockKeywords: keywords("catch do else elseif for foreach if switch try while finally"), + atoms: keywords("true false null TRUE FALSE NULL __CLASS__ __DIR__ __FILE__ __LINE__ __METHOD__ __FUNCTION__ __NAMESPACE__ __TRAIT__"), + builtin: keywords("func_num_args func_get_arg func_get_args strlen strcmp strncmp strcasecmp strncasecmp each error_reporting define defined trigger_error user_error set_error_handler restore_error_handler get_declared_classes get_loaded_extensions extension_loaded get_extension_funcs debug_backtrace constant bin2hex hex2bin sleep usleep time mktime gmmktime strftime gmstrftime strtotime date gmdate getdate localtime checkdate flush wordwrap htmlspecialchars htmlentities html_entity_decode md5 md5_file crc32 getimagesize image_type_to_mime_type phpinfo phpversion phpcredits strnatcmp strnatcasecmp substr_count strspn strcspn strtok strtoupper strtolower strpos strrpos strrev hebrev hebrevc nl2br basename dirname pathinfo stripslashes stripcslashes strstr stristr strrchr str_shuffle str_word_count strcoll substr substr_replace quotemeta ucfirst ucwords strtr addslashes addcslashes rtrim str_replace str_repeat count_chars chunk_split trim ltrim strip_tags similar_text explode implode setlocale localeconv parse_str str_pad chop strchr sprintf printf vprintf vsprintf sscanf fscanf parse_url urlencode urldecode rawurlencode rawurldecode readlink linkinfo link unlink exec system escapeshellcmd escapeshellarg passthru shell_exec proc_open proc_close rand srand getrandmax mt_rand mt_srand mt_getrandmax base64_decode base64_encode abs ceil floor round is_finite is_nan is_infinite bindec hexdec octdec decbin decoct dechex base_convert number_format fmod ip2long long2ip getenv putenv getopt microtime gettimeofday getrusage uniqid quoted_printable_decode set_time_limit get_cfg_var magic_quotes_runtime set_magic_quotes_runtime get_magic_quotes_gpc get_magic_quotes_runtime import_request_variables error_log serialize unserialize memory_get_usage var_dump var_export debug_zval_dump print_r highlight_file show_source highlight_string ini_get ini_get_all ini_set ini_alter ini_restore get_include_path set_include_path restore_include_path setcookie header headers_sent connection_aborted connection_status ignore_user_abort parse_ini_file is_uploaded_file move_uploaded_file intval floatval doubleval strval gettype settype is_null is_resource is_bool is_long is_float is_int is_integer is_double is_real is_numeric is_string is_array is_object is_scalar ereg ereg_replace eregi eregi_replace split spliti join sql_regcase dl pclose popen readfile rewind rmdir umask fclose feof fgetc fgets fgetss fread fopen fpassthru ftruncate fstat fseek ftell fflush fwrite fputs mkdir rename copy tempnam tmpfile file file_get_contents stream_select stream_context_create stream_context_set_params stream_context_set_option stream_context_get_options stream_filter_prepend stream_filter_append fgetcsv flock get_meta_tags stream_set_write_buffer set_file_buffer set_socket_blocking stream_set_blocking socket_set_blocking stream_get_meta_data stream_register_wrapper stream_wrapper_register stream_set_timeout socket_set_timeout socket_get_status realpath fnmatch fsockopen pfsockopen pack unpack get_browser crypt opendir closedir chdir getcwd rewinddir readdir dir glob fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype file_exists is_writable is_writeable is_readable is_executable is_file is_dir is_link stat lstat chown touch clearstatcache mail ob_start ob_flush ob_clean ob_end_flush ob_end_clean ob_get_flush ob_get_clean ob_get_length ob_get_level ob_get_status ob_get_contents ob_implicit_flush ob_list_handlers ksort krsort natsort natcasesort asort arsort sort rsort usort uasort uksort shuffle array_walk count end prev next reset current key min max in_array array_search extract compact array_fill range array_multisort array_push array_pop array_shift array_unshift array_splice array_slice array_merge array_merge_recursive array_keys array_values array_count_values array_reverse array_reduce array_pad array_flip array_change_key_case array_rand array_unique array_intersect array_intersect_assoc array_diff array_diff_assoc array_sum array_filter array_map array_chunk array_key_exists pos sizeof key_exists assert assert_options version_compare ftok str_rot13 aggregate session_name session_module_name session_save_path session_id session_regenerate_id session_decode session_register session_unregister session_is_registered session_encode session_start session_destroy session_unset session_set_save_handler session_cache_limiter session_cache_expire session_set_cookie_params session_get_cookie_params session_write_close preg_match preg_match_all preg_replace preg_replace_callback preg_split preg_quote preg_grep overload ctype_alnum ctype_alpha ctype_cntrl ctype_digit ctype_lower ctype_graph ctype_print ctype_punct ctype_space ctype_upper ctype_xdigit virtual apache_request_headers apache_note apache_lookup_uri apache_child_terminate apache_setenv apache_response_headers apache_get_version getallheaders mysql_connect mysql_pconnect mysql_close mysql_select_db mysql_create_db mysql_drop_db mysql_query mysql_unbuffered_query mysql_db_query mysql_list_dbs mysql_list_tables mysql_list_fields mysql_list_processes mysql_error mysql_errno mysql_affected_rows mysql_insert_id mysql_result mysql_num_rows mysql_num_fields mysql_fetch_row mysql_fetch_array mysql_fetch_assoc mysql_fetch_object mysql_data_seek mysql_fetch_lengths mysql_fetch_field mysql_field_seek mysql_free_result mysql_field_name mysql_field_table mysql_field_len mysql_field_type mysql_field_flags mysql_escape_string mysql_real_escape_string mysql_stat mysql_thread_id mysql_client_encoding mysql_get_client_info mysql_get_host_info mysql_get_proto_info mysql_get_server_info mysql_info mysql mysql_fieldname mysql_fieldtable mysql_fieldlen mysql_fieldtype mysql_fieldflags mysql_selectdb mysql_createdb mysql_dropdb mysql_freeresult mysql_numfields mysql_numrows mysql_listdbs mysql_listtables mysql_listfields mysql_db_name mysql_dbname mysql_tablename mysql_table_name pg_connect pg_pconnect pg_close pg_connection_status pg_connection_busy pg_connection_reset pg_host pg_dbname pg_port pg_tty pg_options pg_ping pg_query pg_send_query pg_cancel_query pg_fetch_result pg_fetch_row pg_fetch_assoc pg_fetch_array pg_fetch_object pg_fetch_all pg_affected_rows pg_get_result pg_result_seek pg_result_status pg_free_result pg_last_oid pg_num_rows pg_num_fields pg_field_name pg_field_num pg_field_size pg_field_type pg_field_prtlen pg_field_is_null pg_get_notify pg_get_pid pg_result_error pg_last_error pg_last_notice pg_put_line pg_end_copy pg_copy_to pg_copy_from pg_trace pg_untrace pg_lo_create pg_lo_unlink pg_lo_open pg_lo_close pg_lo_read pg_lo_write pg_lo_read_all pg_lo_import pg_lo_export pg_lo_seek pg_lo_tell pg_escape_string pg_escape_bytea pg_unescape_bytea pg_client_encoding pg_set_client_encoding pg_meta_data pg_convert pg_insert pg_update pg_delete pg_select pg_exec pg_getlastoid pg_cmdtuples pg_errormessage pg_numrows pg_numfields pg_fieldname pg_fieldsize pg_fieldtype pg_fieldnum pg_fieldprtlen pg_fieldisnull pg_freeresult pg_result pg_loreadall pg_locreate pg_lounlink pg_loopen pg_loclose pg_loread pg_lowrite pg_loimport pg_loexport http_response_code get_declared_traits getimagesizefromstring socket_import_stream stream_set_chunk_size trait_exists header_register_callback class_uses session_status session_register_shutdown echo print global static exit array empty eval isset unset die include require include_once require_once"), + multiLineStrings: true, + hooks: { + "$": function(stream) { + stream.eatWhile(/[\w\$_]/); + return "variable-2"; + }, + "<": function(stream, state) { + if (stream.match(/<", false)) stream.next(); + return "comment"; + }, + "/": function(stream) { + if (stream.eat("/")) { + while (!stream.eol() && !stream.match("?>", false)) stream.next(); + return "comment"; + } + return false; + } + } + }; + + CodeMirror.defineMode("php", function(config, parserConfig) { + var htmlMode = CodeMirror.getMode(config, "text/html"); + var phpMode = CodeMirror.getMode(config, phpConfig); + + function dispatch(stream, state) { + var isPHP = state.curMode == phpMode; + if (stream.sol() && state.pending != '"') state.pending = null; + if (!isPHP) { + if (stream.match(/^<\?\w*/)) { + state.curMode = phpMode; + state.curState = state.php; + return "meta"; + } + if (state.pending == '"') { + while (!stream.eol() && stream.next() != '"') {} + var style = "string"; + } else if (state.pending && stream.pos < state.pending.end) { + stream.pos = state.pending.end; + var style = state.pending.style; + } else { + var style = htmlMode.token(stream, state.curState); + } + state.pending = null; + var cur = stream.current(), openPHP = cur.search(/<\?/); + if (openPHP != -1) { + if (style == "string" && /\"$/.test(cur) && !/\?>/.test(cur)) state.pending = '"'; + else state.pending = {end: stream.pos, style: style}; + stream.backUp(cur.length - openPHP); + } + return style; + } else if (isPHP && state.php.tokenize == null && stream.match("?>")) { + state.curMode = htmlMode; + state.curState = state.html; + return "meta"; + } else { + return phpMode.token(stream, state.curState); + } + } + + return { + startState: function() { + var html = CodeMirror.startState(htmlMode), php = CodeMirror.startState(phpMode); + return {html: html, + php: php, + curMode: parserConfig.startOpen ? phpMode : htmlMode, + curState: parserConfig.startOpen ? php : html, + pending: null}; + }, + + copyState: function(state) { + var html = state.html, htmlNew = CodeMirror.copyState(htmlMode, html), + php = state.php, phpNew = CodeMirror.copyState(phpMode, php), cur; + if (state.curMode == htmlMode) cur = htmlNew; + else cur = phpNew; + return {html: htmlNew, php: phpNew, curMode: state.curMode, curState: cur, + pending: state.pending}; + }, + + token: dispatch, + + indent: function(state, textAfter) { + if ((state.curMode != phpMode && /^\s*<\//.test(textAfter)) || + (state.curMode == phpMode && /^\?>/.test(textAfter))) + return htmlMode.indent(state.html, textAfter); + return state.curMode.indent(state.curState, textAfter); + }, + + electricChars: "/{}:", + blockCommentStart: "/*", + blockCommentEnd: "*/", + lineComment: "//", + + innerMode: function(state) { return {state: state.curState, mode: state.curMode}; } + }; + }, "htmlmixed", "clike"); + + CodeMirror.defineMIME("application/x-httpd-php", "php"); + CodeMirror.defineMIME("application/x-httpd-php-open", {name: "php", startOpen: true}); + CodeMirror.defineMIME("text/x-php", phpConfig); +})(); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/pig/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/pig/index.html new file mode 100644 index 00000000..93744ae2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/pig/index.html @@ -0,0 +1,55 @@ + + +CodeMirror: Pig Latin mode + + + + + + + + + +
+

Pig Latin mode

+
+ + + +

+ Simple mode that handles Pig Latin language. +

+ +

MIME type defined: text/x-pig + (PIG code) + +

diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/pig/pig.js b/pitfall/pdfkit/node_modules/codemirror/mode/pig/pig.js new file mode 100644 index 00000000..4b44e7cc --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/pig/pig.js @@ -0,0 +1,171 @@ +/* + * Pig Latin Mode for CodeMirror 2 + * @author Prasanth Jayachandran + * @link https://github.com/prasanthj/pig-codemirror-2 + * This implementation is adapted from PL/SQL mode in CodeMirror 2. + */ +CodeMirror.defineMode("pig", function(_config, parserConfig) { + var keywords = parserConfig.keywords, + builtins = parserConfig.builtins, + types = parserConfig.types, + multiLineStrings = parserConfig.multiLineStrings; + + var isOperatorChar = /[*+\-%<>=&?:\/!|]/; + + function chain(stream, state, f) { + state.tokenize = f; + return f(stream, state); + } + + var type; + function ret(tp, style) { + type = tp; + return style; + } + + function tokenComment(stream, state) { + var isEnd = false; + var ch; + while(ch = stream.next()) { + if(ch == "/" && isEnd) { + state.tokenize = tokenBase; + break; + } + isEnd = (ch == "*"); + } + return ret("comment", "comment"); + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, next, end = false; + while((next = stream.next()) != null) { + if (next == quote && !escaped) { + end = true; break; + } + escaped = !escaped && next == "\\"; + } + if (end || !(escaped || multiLineStrings)) + state.tokenize = tokenBase; + return ret("string", "error"); + }; + } + + function tokenBase(stream, state) { + var ch = stream.next(); + + // is a start of string? + if (ch == '"' || ch == "'") + return chain(stream, state, tokenString(ch)); + // is it one of the special chars + else if(/[\[\]{}\(\),;\.]/.test(ch)) + return ret(ch); + // is it a number? + else if(/\d/.test(ch)) { + stream.eatWhile(/[\w\.]/); + return ret("number", "number"); + } + // multi line comment or operator + else if (ch == "/") { + if (stream.eat("*")) { + return chain(stream, state, tokenComment); + } + else { + stream.eatWhile(isOperatorChar); + return ret("operator", "operator"); + } + } + // single line comment or operator + else if (ch=="-") { + if(stream.eat("-")){ + stream.skipToEnd(); + return ret("comment", "comment"); + } + else { + stream.eatWhile(isOperatorChar); + return ret("operator", "operator"); + } + } + // is it an operator + else if (isOperatorChar.test(ch)) { + stream.eatWhile(isOperatorChar); + return ret("operator", "operator"); + } + else { + // get the while word + stream.eatWhile(/[\w\$_]/); + // is it one of the listed keywords? + if (keywords && keywords.propertyIsEnumerable(stream.current().toUpperCase())) { + if (stream.eat(")") || stream.eat(".")) { + //keywords can be used as variables like flatten(group), group.$0 etc.. + } + else { + return ("keyword", "keyword"); + } + } + // is it one of the builtin functions? + if (builtins && builtins.propertyIsEnumerable(stream.current().toUpperCase())) + { + return ("keyword", "variable-2"); + } + // is it one of the listed types? + if (types && types.propertyIsEnumerable(stream.current().toUpperCase())) + return ("keyword", "variable-3"); + // default is a 'variable' + return ret("variable", "pig-word"); + } + } + + // Interface + return { + startState: function() { + return { + tokenize: tokenBase, + startOfLine: true + }; + }, + + token: function(stream, state) { + if(stream.eatSpace()) return null; + var style = state.tokenize(stream, state); + return style; + } + }; +}); + +(function() { + function keywords(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + + // builtin funcs taken from trunk revision 1303237 + var pBuiltins = "ABS ACOS ARITY ASIN ATAN AVG BAGSIZE BINSTORAGE BLOOM BUILDBLOOM CBRT CEIL " + + "CONCAT COR COS COSH COUNT COUNT_STAR COV CONSTANTSIZE CUBEDIMENSIONS DIFF DISTINCT DOUBLEABS " + + "DOUBLEAVG DOUBLEBASE DOUBLEMAX DOUBLEMIN DOUBLEROUND DOUBLESUM EXP FLOOR FLOATABS FLOATAVG " + + "FLOATMAX FLOATMIN FLOATROUND FLOATSUM GENERICINVOKER INDEXOF INTABS INTAVG INTMAX INTMIN " + + "INTSUM INVOKEFORDOUBLE INVOKEFORFLOAT INVOKEFORINT INVOKEFORLONG INVOKEFORSTRING INVOKER " + + "ISEMPTY JSONLOADER JSONMETADATA JSONSTORAGE LAST_INDEX_OF LCFIRST LOG LOG10 LOWER LONGABS " + + "LONGAVG LONGMAX LONGMIN LONGSUM MAX MIN MAPSIZE MONITOREDUDF NONDETERMINISTIC OUTPUTSCHEMA " + + "PIGSTORAGE PIGSTREAMING RANDOM REGEX_EXTRACT REGEX_EXTRACT_ALL REPLACE ROUND SIN SINH SIZE " + + "SQRT STRSPLIT SUBSTRING SUM STRINGCONCAT STRINGMAX STRINGMIN STRINGSIZE TAN TANH TOBAG " + + "TOKENIZE TOMAP TOP TOTUPLE TRIM TEXTLOADER TUPLESIZE UCFIRST UPPER UTF8STORAGECONVERTER "; + + // taken from QueryLexer.g + var pKeywords = "VOID IMPORT RETURNS DEFINE LOAD FILTER FOREACH ORDER CUBE DISTINCT COGROUP " + + "JOIN CROSS UNION SPLIT INTO IF OTHERWISE ALL AS BY USING INNER OUTER ONSCHEMA PARALLEL " + + "PARTITION GROUP AND OR NOT GENERATE FLATTEN ASC DESC IS STREAM THROUGH STORE MAPREDUCE " + + "SHIP CACHE INPUT OUTPUT STDERROR STDIN STDOUT LIMIT SAMPLE LEFT RIGHT FULL EQ GT LT GTE LTE " + + "NEQ MATCHES TRUE FALSE DUMP"; + + // data types + var pTypes = "BOOLEAN INT LONG FLOAT DOUBLE CHARARRAY BYTEARRAY BAG TUPLE MAP "; + + CodeMirror.defineMIME("text/x-pig", { + name: "pig", + builtins: keywords(pBuiltins), + keywords: keywords(pKeywords), + types: keywords(pTypes) + }); +}()); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/properties/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/properties/index.html new file mode 100644 index 00000000..40ee1a37 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/properties/index.html @@ -0,0 +1,53 @@ + + +CodeMirror: Properties files mode + + + + + + + + + +
+

Properties files mode

+
+ + +

MIME types defined: text/x-properties, + text/x-ini.

+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/properties/properties.js b/pitfall/pdfkit/node_modules/codemirror/mode/properties/properties.js new file mode 100644 index 00000000..d3a13c76 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/properties/properties.js @@ -0,0 +1,63 @@ +CodeMirror.defineMode("properties", function() { + return { + token: function(stream, state) { + var sol = stream.sol() || state.afterSection; + var eol = stream.eol(); + + state.afterSection = false; + + if (sol) { + if (state.nextMultiline) { + state.inMultiline = true; + state.nextMultiline = false; + } else { + state.position = "def"; + } + } + + if (eol && ! state.nextMultiline) { + state.inMultiline = false; + state.position = "def"; + } + + if (sol) { + while(stream.eatSpace()); + } + + var ch = stream.next(); + + if (sol && (ch === "#" || ch === "!" || ch === ";")) { + state.position = "comment"; + stream.skipToEnd(); + return "comment"; + } else if (sol && ch === "[") { + state.afterSection = true; + stream.skipTo("]"); stream.eat("]"); + return "header"; + } else if (ch === "=" || ch === ":") { + state.position = "quote"; + return null; + } else if (ch === "\\" && state.position === "quote") { + if (stream.next() !== "u") { // u = Unicode sequence \u1234 + // Multiline value + state.nextMultiline = true; + } + } + + return state.position; + }, + + startState: function() { + return { + position : "def", // Current position, "def", "quote" or "comment" + nextMultiline : false, // Is the next line multiline value + inMultiline : false, // Is the current line a multiline value + afterSection : false // Did we just open a section + }; + } + + }; +}); + +CodeMirror.defineMIME("text/x-properties", "properties"); +CodeMirror.defineMIME("text/x-ini", "properties"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/python/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/python/index.html new file mode 100644 index 00000000..49773492 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/python/index.html @@ -0,0 +1,187 @@ + + +CodeMirror: Python mode + + + + + + + + + + +
+

Python mode

+ +
+ + +

Cython mode

+ +
+ + +

Configuration Options for Python mode:

+
    +
  • version - 2/3 - The version of Python to recognize. Default is 2.
  • +
  • singleLineStringErrors - true/false - If you have a single-line string that is not terminated at the end of the line, this will show subsequent lines as errors if true, otherwise it will consider the newline as the end of the string. Default is false.
  • +
+

Advanced Configuration Options:

+

Usefull for superset of python syntax like Enthought enaml, IPython magics and questionmark help

+
    +
  • singleOperators - RegEx - Regular Expression for single operator matching, default :
    ^[\\+\\-\\*/%&|\\^~<>!]
  • +
  • singleDelimiters - RegEx - Regular Expression for single delimiter matching, default :
    ^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]
  • +
  • doubleOperators - RegEx - Regular Expression for double operators matching, default :
    ^((==)|(!=)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))
  • +
  • doubleDelimiters - RegEx - Regular Expressoin for double delimiters matching, default :
    ^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))
  • +
  • tripleDelimiters - RegEx - Regular Expression for triple delimiters matching, default :
    ^((//=)|(>>=)|(<<=)|(\\*\\*=))
  • +
  • identifiers - RegEx - Regular Expression for identifier, default :
    ^[_A-Za-z][_A-Za-z0-9]*
  • +
  • extra_keywords - list of string - List of extra words ton consider as keywords
  • +
  • extra_builtins - list of string - List of extra words ton consider as builtins
  • +
+ + +

MIME types defined: text/x-python and text/x-cython.

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/python/python.js b/pitfall/pdfkit/node_modules/codemirror/mode/python/python.js new file mode 100644 index 00000000..802c2dd4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/python/python.js @@ -0,0 +1,368 @@ +CodeMirror.defineMode("python", function(conf, parserConf) { + var ERRORCLASS = 'error'; + + function wordRegexp(words) { + return new RegExp("^((" + words.join(")|(") + "))\\b"); + } + + var singleOperators = parserConf.singleOperators || new RegExp("^[\\+\\-\\*/%&|\\^~<>!]"); + var singleDelimiters = parserConf.singleDelimiters || new RegExp('^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]'); + var doubleOperators = parserConf.doubleOperators || new RegExp("^((==)|(!=)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))"); + var doubleDelimiters = parserConf.doubleDelimiters || new RegExp("^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"); + var tripleDelimiters = parserConf.tripleDelimiters || new RegExp("^((//=)|(>>=)|(<<=)|(\\*\\*=))"); + var identifiers = parserConf.identifiers|| new RegExp("^[_A-Za-z][_A-Za-z0-9]*"); + + var wordOperators = wordRegexp(['and', 'or', 'not', 'is', 'in']); + var commonkeywords = ['as', 'assert', 'break', 'class', 'continue', + 'def', 'del', 'elif', 'else', 'except', 'finally', + 'for', 'from', 'global', 'if', 'import', + 'lambda', 'pass', 'raise', 'return', + 'try', 'while', 'with', 'yield']; + var commonBuiltins = ['abs', 'all', 'any', 'bin', 'bool', 'bytearray', 'callable', 'chr', + 'classmethod', 'compile', 'complex', 'delattr', 'dict', 'dir', 'divmod', + 'enumerate', 'eval', 'filter', 'float', 'format', 'frozenset', + 'getattr', 'globals', 'hasattr', 'hash', 'help', 'hex', 'id', + 'input', 'int', 'isinstance', 'issubclass', 'iter', 'len', + 'list', 'locals', 'map', 'max', 'memoryview', 'min', 'next', + 'object', 'oct', 'open', 'ord', 'pow', 'property', 'range', + 'repr', 'reversed', 'round', 'set', 'setattr', 'slice', + 'sorted', 'staticmethod', 'str', 'sum', 'super', 'tuple', + 'type', 'vars', 'zip', '__import__', 'NotImplemented', + 'Ellipsis', '__debug__']; + var py2 = {'builtins': ['apply', 'basestring', 'buffer', 'cmp', 'coerce', 'execfile', + 'file', 'intern', 'long', 'raw_input', 'reduce', 'reload', + 'unichr', 'unicode', 'xrange', 'False', 'True', 'None'], + 'keywords': ['exec', 'print']}; + var py3 = {'builtins': ['ascii', 'bytes', 'exec', 'print'], + 'keywords': ['nonlocal', 'False', 'True', 'None']}; + + if(parserConf.extra_keywords != undefined){ + commonkeywords = commonkeywords.concat(parserConf.extra_keywords); + } + if(parserConf.extra_builtins != undefined){ + commonBuiltins = commonBuiltins.concat(parserConf.extra_builtins); + } + if (!!parserConf.version && parseInt(parserConf.version, 10) === 3) { + commonkeywords = commonkeywords.concat(py3.keywords); + commonBuiltins = commonBuiltins.concat(py3.builtins); + var stringPrefixes = new RegExp("^(([rb]|(br))?('{3}|\"{3}|['\"]))", "i"); + } else { + commonkeywords = commonkeywords.concat(py2.keywords); + commonBuiltins = commonBuiltins.concat(py2.builtins); + var stringPrefixes = new RegExp("^(([rub]|(ur)|(br))?('{3}|\"{3}|['\"]))", "i"); + } + var keywords = wordRegexp(commonkeywords); + var builtins = wordRegexp(commonBuiltins); + + var indentInfo = null; + + // tokenizers + function tokenBase(stream, state) { + // Handle scope changes + if (stream.sol()) { + var scopeOffset = state.scopes[0].offset; + if (stream.eatSpace()) { + var lineOffset = stream.indentation(); + if (lineOffset > scopeOffset) { + indentInfo = 'indent'; + } else if (lineOffset < scopeOffset) { + indentInfo = 'dedent'; + } + return null; + } else { + if (scopeOffset > 0) { + dedent(stream, state); + } + } + } + if (stream.eatSpace()) { + return null; + } + + var ch = stream.peek(); + + // Handle Comments + if (ch === '#') { + stream.skipToEnd(); + return 'comment'; + } + + // Handle Number Literals + if (stream.match(/^[0-9\.]/, false)) { + var floatLiteral = false; + // Floats + if (stream.match(/^\d*\.\d+(e[\+\-]?\d+)?/i)) { floatLiteral = true; } + if (stream.match(/^\d+\.\d*/)) { floatLiteral = true; } + if (stream.match(/^\.\d+/)) { floatLiteral = true; } + if (floatLiteral) { + // Float literals may be "imaginary" + stream.eat(/J/i); + return 'number'; + } + // Integers + var intLiteral = false; + // Hex + if (stream.match(/^0x[0-9a-f]+/i)) { intLiteral = true; } + // Binary + if (stream.match(/^0b[01]+/i)) { intLiteral = true; } + // Octal + if (stream.match(/^0o[0-7]+/i)) { intLiteral = true; } + // Decimal + if (stream.match(/^[1-9]\d*(e[\+\-]?\d+)?/)) { + // Decimal literals may be "imaginary" + stream.eat(/J/i); + // TODO - Can you have imaginary longs? + intLiteral = true; + } + // Zero by itself with no other piece of number. + if (stream.match(/^0(?![\dx])/i)) { intLiteral = true; } + if (intLiteral) { + // Integer literals may be "long" + stream.eat(/L/i); + return 'number'; + } + } + + // Handle Strings + if (stream.match(stringPrefixes)) { + state.tokenize = tokenStringFactory(stream.current()); + return state.tokenize(stream, state); + } + + // Handle operators and Delimiters + if (stream.match(tripleDelimiters) || stream.match(doubleDelimiters)) { + return null; + } + if (stream.match(doubleOperators) + || stream.match(singleOperators) + || stream.match(wordOperators)) { + return 'operator'; + } + if (stream.match(singleDelimiters)) { + return null; + } + + if (stream.match(keywords)) { + return 'keyword'; + } + + if (stream.match(builtins)) { + return 'builtin'; + } + + if (stream.match(identifiers)) { + if (state.lastToken == 'def' || state.lastToken == 'class') { + return 'def'; + } + return 'variable'; + } + + // Handle non-detected items + stream.next(); + return ERRORCLASS; + } + + function tokenStringFactory(delimiter) { + while ('rub'.indexOf(delimiter.charAt(0).toLowerCase()) >= 0) { + delimiter = delimiter.substr(1); + } + var singleline = delimiter.length == 1; + var OUTCLASS = 'string'; + + function tokenString(stream, state) { + while (!stream.eol()) { + stream.eatWhile(/[^'"\\]/); + if (stream.eat('\\')) { + stream.next(); + if (singleline && stream.eol()) { + return OUTCLASS; + } + } else if (stream.match(delimiter)) { + state.tokenize = tokenBase; + return OUTCLASS; + } else { + stream.eat(/['"]/); + } + } + if (singleline) { + if (parserConf.singleLineStringErrors) { + return ERRORCLASS; + } else { + state.tokenize = tokenBase; + } + } + return OUTCLASS; + } + tokenString.isString = true; + return tokenString; + } + + function indent(stream, state, type) { + type = type || 'py'; + var indentUnit = 0; + if (type === 'py') { + if (state.scopes[0].type !== 'py') { + state.scopes[0].offset = stream.indentation(); + return; + } + for (var i = 0; i < state.scopes.length; ++i) { + if (state.scopes[i].type === 'py') { + indentUnit = state.scopes[i].offset + conf.indentUnit; + break; + } + } + } else { + indentUnit = stream.column() + stream.current().length; + } + state.scopes.unshift({ + offset: indentUnit, + type: type + }); + } + + function dedent(stream, state, type) { + type = type || 'py'; + if (state.scopes.length == 1) return; + if (state.scopes[0].type === 'py') { + var _indent = stream.indentation(); + var _indent_index = -1; + for (var i = 0; i < state.scopes.length; ++i) { + if (_indent === state.scopes[i].offset) { + _indent_index = i; + break; + } + } + if (_indent_index === -1) { + return true; + } + while (state.scopes[0].offset !== _indent) { + state.scopes.shift(); + } + return false; + } else { + if (type === 'py') { + state.scopes[0].offset = stream.indentation(); + return false; + } else { + if (state.scopes[0].type != type) { + return true; + } + state.scopes.shift(); + return false; + } + } + } + + function tokenLexer(stream, state) { + indentInfo = null; + var style = state.tokenize(stream, state); + var current = stream.current(); + + // Handle '.' connected identifiers + if (current === '.') { + style = stream.match(identifiers, false) ? null : ERRORCLASS; + if (style === null && state.lastStyle === 'meta') { + // Apply 'meta' style to '.' connected identifiers when + // appropriate. + style = 'meta'; + } + return style; + } + + // Handle decorators + if (current === '@') { + return stream.match(identifiers, false) ? 'meta' : ERRORCLASS; + } + + if ((style === 'variable' || style === 'builtin') + && state.lastStyle === 'meta') { + style = 'meta'; + } + + // Handle scope changes. + if (current === 'pass' || current === 'return') { + state.dedent += 1; + } + if (current === 'lambda') state.lambda = true; + if ((current === ':' && !state.lambda && state.scopes[0].type == 'py') + || indentInfo === 'indent') { + indent(stream, state); + } + var delimiter_index = '[({'.indexOf(current); + if (delimiter_index !== -1) { + indent(stream, state, '])}'.slice(delimiter_index, delimiter_index+1)); + } + if (indentInfo === 'dedent') { + if (dedent(stream, state)) { + return ERRORCLASS; + } + } + delimiter_index = '])}'.indexOf(current); + if (delimiter_index !== -1) { + if (dedent(stream, state, current)) { + return ERRORCLASS; + } + } + if (state.dedent > 0 && stream.eol() && state.scopes[0].type == 'py') { + if (state.scopes.length > 1) state.scopes.shift(); + state.dedent -= 1; + } + + return style; + } + + var external = { + startState: function(basecolumn) { + return { + tokenize: tokenBase, + scopes: [{offset:basecolumn || 0, type:'py'}], + lastStyle: null, + lastToken: null, + lambda: false, + dedent: 0 + }; + }, + + token: function(stream, state) { + var style = tokenLexer(stream, state); + + state.lastStyle = style; + + var current = stream.current(); + if (current && style) { + state.lastToken = current; + } + + if (stream.eol() && state.lambda) { + state.lambda = false; + } + return style; + }, + + indent: function(state) { + if (state.tokenize != tokenBase) { + return state.tokenize.isString ? CodeMirror.Pass : 0; + } + + return state.scopes[0].offset; + }, + + lineComment: "#", + fold: "indent" + }; + return external; +}); + +CodeMirror.defineMIME("text/x-python", "python"); + +(function() { + "use strict"; + var words = function(str){return str.split(' ');}; + + CodeMirror.defineMIME("text/x-cython", { + name: "python", + extra_keywords: words("by cdef cimport cpdef ctypedef enum except"+ + "extern gil include nogil property public"+ + "readonly struct union DEF IF ELIF ELSE") + }); +})(); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/q/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/q/index.html new file mode 100644 index 00000000..78ed3d88 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/q/index.html @@ -0,0 +1,144 @@ + + +CodeMirror: Q mode + + + + + + + + + + +
+

Q mode

+ + +
+ + + +

MIME type defined: text/x-q.

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/q/q.js b/pitfall/pdfkit/node_modules/codemirror/mode/q/q.js new file mode 100644 index 00000000..56017e30 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/q/q.js @@ -0,0 +1,124 @@ +CodeMirror.defineMode("q",function(config){ + var indentUnit=config.indentUnit, + curPunc, + keywords=buildRE(["abs","acos","aj","aj0","all","and","any","asc","asin","asof","atan","attr","avg","avgs","bin","by","ceiling","cols","cor","cos","count","cov","cross","csv","cut","delete","deltas","desc","dev","differ","distinct","div","do","each","ej","enlist","eval","except","exec","exit","exp","fby","fills","first","fkeys","flip","floor","from","get","getenv","group","gtime","hclose","hcount","hdel","hopen","hsym","iasc","idesc","if","ij","in","insert","inter","inv","key","keys","last","like","list","lj","load","log","lower","lsq","ltime","ltrim","mavg","max","maxs","mcount","md5","mdev","med","meta","min","mins","mmax","mmin","mmu","mod","msum","neg","next","not","null","or","over","parse","peach","pj","plist","prd","prds","prev","prior","rand","rank","ratios","raze","read0","read1","reciprocal","reverse","rload","rotate","rsave","rtrim","save","scan","select","set","setenv","show","signum","sin","sqrt","ss","ssr","string","sublist","sum","sums","sv","system","tables","tan","til","trim","txf","type","uj","ungroup","union","update","upper","upsert","value","var","view","views","vs","wavg","where","where","while","within","wj","wj1","wsum","xasc","xbar","xcol","xcols","xdesc","xexp","xgroup","xkey","xlog","xprev","xrank"]), + E=/[|/&^!+:\\\-*%$=~#;@><,?_\'\"\[\(\]\)\s{}]/; + function buildRE(w){return new RegExp("^("+w.join("|")+")$");} + function tokenBase(stream,state){ + var sol=stream.sol(),c=stream.next(); + curPunc=null; + if(sol) + if(c=="/") + return(state.tokenize=tokenLineComment)(stream,state); + else if(c=="\\"){ + if(stream.eol()||/\s/.test(stream.peek())) + return stream.skipToEnd(),/^\\\s*$/.test(stream.current())?(state.tokenize=tokenCommentToEOF)(stream, state):state.tokenize=tokenBase,"comment"; + else + return state.tokenize=tokenBase,"builtin"; + } + if(/\s/.test(c)) + return stream.peek()=="/"?(stream.skipToEnd(),"comment"):"whitespace"; + if(c=='"') + return(state.tokenize=tokenString)(stream,state); + if(c=='`') + return stream.eatWhile(/[A-Z|a-z|\d|_|:|\/|\.]/),"symbol"; + if(("."==c&&/\d/.test(stream.peek()))||/\d/.test(c)){ + var t=null; + stream.backUp(1); + if(stream.match(/^\d{4}\.\d{2}(m|\.\d{2}([D|T](\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)?)?)/) + || stream.match(/^\d+D(\d{2}(:\d{2}(:\d{2}(\.\d{1,9})?)?)?)/) + || stream.match(/^\d{2}:\d{2}(:\d{2}(\.\d{1,9})?)?/) + || stream.match(/^\d+[ptuv]{1}/)) + t="temporal"; + else if(stream.match(/^0[NwW]{1}/) + || stream.match(/^0x[\d|a-f|A-F]*/) + || stream.match(/^[0|1]+[b]{1}/) + || stream.match(/^\d+[chijn]{1}/) + || stream.match(/-?\d*(\.\d*)?(e[+\-]?\d+)?(e|f)?/)) + t="number"; + return(t&&(!(c=stream.peek())||E.test(c)))?t:(stream.next(),"error"); + } + if(/[A-Z|a-z]|\./.test(c)) + return stream.eatWhile(/[A-Z|a-z|\.|_|\d]/),keywords.test(stream.current())?"keyword":"variable"; + if(/[|/&^!+:\\\-*%$=~#;@><\.,?_\']/.test(c)) + return null; + if(/[{}\(\[\]\)]/.test(c)) + return null; + return"error"; + } + function tokenLineComment(stream,state){ + return stream.skipToEnd(),/\/\s*$/.test(stream.current())?(state.tokenize=tokenBlockComment)(stream,state):(state.tokenize=tokenBase),"comment"; + } + function tokenBlockComment(stream,state){ + var f=stream.sol()&&stream.peek()=="\\"; + stream.skipToEnd(); + if(f&&/^\\\s*$/.test(stream.current())) + state.tokenize=tokenBase; + return"comment"; + } + function tokenCommentToEOF(stream){return stream.skipToEnd(),"comment";} + function tokenString(stream,state){ + var escaped=false,next,end=false; + while((next=stream.next())){ + if(next=="\""&&!escaped){end=true;break;} + escaped=!escaped&&next=="\\"; + } + if(end)state.tokenize=tokenBase; + return"string"; + } + function pushContext(state,type,col){state.context={prev:state.context,indent:state.indent,col:col,type:type};} + function popContext(state){state.indent=state.context.indent;state.context=state.context.prev;} + return{ + startState:function(){ + return{tokenize:tokenBase, + context:null, + indent:0, + col:0}; + }, + token:function(stream,state){ + if(stream.sol()){ + if(state.context&&state.context.align==null) + state.context.align=false; + state.indent=stream.indentation(); + } + //if (stream.eatSpace()) return null; + var style=state.tokenize(stream,state); + if(style!="comment"&&state.context&&state.context.align==null&&state.context.type!="pattern"){ + state.context.align=true; + } + if(curPunc=="(")pushContext(state,")",stream.column()); + else if(curPunc=="[")pushContext(state,"]",stream.column()); + else if(curPunc=="{")pushContext(state,"}",stream.column()); + else if(/[\]\}\)]/.test(curPunc)){ + while(state.context&&state.context.type=="pattern")popContext(state); + if(state.context&&curPunc==state.context.type)popContext(state); + } + else if(curPunc=="."&&state.context&&state.context.type=="pattern")popContext(state); + else if(/atom|string|variable/.test(style)&&state.context){ + if(/[\}\]]/.test(state.context.type)) + pushContext(state,"pattern",stream.column()); + else if(state.context.type=="pattern"&&!state.context.align){ + state.context.align=true; + state.context.col=stream.column(); + } + } + return style; + }, + indent:function(state,textAfter){ + var firstChar=textAfter&&textAfter.charAt(0); + var context=state.context; + if(/[\]\}]/.test(firstChar)) + while (context&&context.type=="pattern")context=context.prev; + var closing=context&&firstChar==context.type; + if(!context) + return 0; + else if(context.type=="pattern") + return context.col; + else if(context.align) + return context.col+(closing?0:1); + else + return context.indent+(closing?0:indentUnit); + } + }; +}); +CodeMirror.defineMIME("text/x-q","q"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/r/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/r/index.html new file mode 100644 index 00000000..f73e13d6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/r/index.html @@ -0,0 +1,86 @@ + + +CodeMirror: R mode + + + + + + + + + +
+

R mode

+
+ + +

MIME types defined: text/x-rsrc.

+ +

Development of the CodeMirror R mode was kindly sponsored + by Ubalo, who hold + the license.

+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/r/r.js b/pitfall/pdfkit/node_modules/codemirror/mode/r/r.js new file mode 100644 index 00000000..6410efbb --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/r/r.js @@ -0,0 +1,141 @@ +CodeMirror.defineMode("r", function(config) { + function wordObj(str) { + var words = str.split(" "), res = {}; + for (var i = 0; i < words.length; ++i) res[words[i]] = true; + return res; + } + var atoms = wordObj("NULL NA Inf NaN NA_integer_ NA_real_ NA_complex_ NA_character_"); + var builtins = wordObj("list quote bquote eval return call parse deparse"); + var keywords = wordObj("if else repeat while function for in next break"); + var blockkeywords = wordObj("if else repeat while function for"); + var opChars = /[+\-*\/^<>=!&|~$:]/; + var curPunc; + + function tokenBase(stream, state) { + curPunc = null; + var ch = stream.next(); + if (ch == "#") { + stream.skipToEnd(); + return "comment"; + } else if (ch == "0" && stream.eat("x")) { + stream.eatWhile(/[\da-f]/i); + return "number"; + } else if (ch == "." && stream.eat(/\d/)) { + stream.match(/\d*(?:e[+\-]?\d+)?/); + return "number"; + } else if (/\d/.test(ch)) { + stream.match(/\d*(?:\.\d+)?(?:e[+\-]\d+)?L?/); + return "number"; + } else if (ch == "'" || ch == '"') { + state.tokenize = tokenString(ch); + return "string"; + } else if (ch == "." && stream.match(/.[.\d]+/)) { + return "keyword"; + } else if (/[\w\.]/.test(ch) && ch != "_") { + stream.eatWhile(/[\w\.]/); + var word = stream.current(); + if (atoms.propertyIsEnumerable(word)) return "atom"; + if (keywords.propertyIsEnumerable(word)) { + if (blockkeywords.propertyIsEnumerable(word)) curPunc = "block"; + return "keyword"; + } + if (builtins.propertyIsEnumerable(word)) return "builtin"; + return "variable"; + } else if (ch == "%") { + if (stream.skipTo("%")) stream.next(); + return "variable-2"; + } else if (ch == "<" && stream.eat("-")) { + return "arrow"; + } else if (ch == "=" && state.ctx.argList) { + return "arg-is"; + } else if (opChars.test(ch)) { + if (ch == "$") return "dollar"; + stream.eatWhile(opChars); + return "operator"; + } else if (/[\(\){}\[\];]/.test(ch)) { + curPunc = ch; + if (ch == ";") return "semi"; + return null; + } else { + return null; + } + } + + function tokenString(quote) { + return function(stream, state) { + if (stream.eat("\\")) { + var ch = stream.next(); + if (ch == "x") stream.match(/^[a-f0-9]{2}/i); + else if ((ch == "u" || ch == "U") && stream.eat("{") && stream.skipTo("}")) stream.next(); + else if (ch == "u") stream.match(/^[a-f0-9]{4}/i); + else if (ch == "U") stream.match(/^[a-f0-9]{8}/i); + else if (/[0-7]/.test(ch)) stream.match(/^[0-7]{1,2}/); + return "string-2"; + } else { + var next; + while ((next = stream.next()) != null) { + if (next == quote) { state.tokenize = tokenBase; break; } + if (next == "\\") { stream.backUp(1); break; } + } + return "string"; + } + }; + } + + function push(state, type, stream) { + state.ctx = {type: type, + indent: state.indent, + align: null, + column: stream.column(), + prev: state.ctx}; + } + function pop(state) { + state.indent = state.ctx.indent; + state.ctx = state.ctx.prev; + } + + return { + startState: function() { + return {tokenize: tokenBase, + ctx: {type: "top", + indent: -config.indentUnit, + align: false}, + indent: 0, + afterIdent: false}; + }, + + token: function(stream, state) { + if (stream.sol()) { + if (state.ctx.align == null) state.ctx.align = false; + state.indent = stream.indentation(); + } + if (stream.eatSpace()) return null; + var style = state.tokenize(stream, state); + if (style != "comment" && state.ctx.align == null) state.ctx.align = true; + + var ctype = state.ctx.type; + if ((curPunc == ";" || curPunc == "{" || curPunc == "}") && ctype == "block") pop(state); + if (curPunc == "{") push(state, "}", stream); + else if (curPunc == "(") { + push(state, ")", stream); + if (state.afterIdent) state.ctx.argList = true; + } + else if (curPunc == "[") push(state, "]", stream); + else if (curPunc == "block") push(state, "block", stream); + else if (curPunc == ctype) pop(state); + state.afterIdent = style == "variable" || style == "keyword"; + return style; + }, + + indent: function(state, textAfter) { + if (state.tokenize != tokenBase) return 0; + var firstChar = textAfter && textAfter.charAt(0), ctx = state.ctx, + closing = firstChar == ctx.type; + if (ctx.type == "block") return ctx.indent + (firstChar == "{" ? 0 : config.indentUnit); + else if (ctx.align) return ctx.column + (closing ? 0 : 1); + else return ctx.indent + (closing ? 0 : config.indentUnit); + } + }; +}); + +CodeMirror.defineMIME("text/x-rsrc", "r"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/rpm/changes/changes.js b/pitfall/pdfkit/node_modules/codemirror/mode/rpm/changes/changes.js new file mode 100644 index 00000000..14a08d97 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/rpm/changes/changes.js @@ -0,0 +1,19 @@ +CodeMirror.defineMode("changes", function() { + var headerSeperator = /^-+$/; + var headerLine = /^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ?\d{1,2} \d{2}:\d{2}(:\d{2})? [A-Z]{3,4} \d{4} - /; + var simpleEmail = /^[\w+.-]+@[\w.-]+/; + + return { + token: function(stream) { + if (stream.sol()) { + if (stream.match(headerSeperator)) { return 'tag'; } + if (stream.match(headerLine)) { return 'tag'; } + } + if (stream.match(simpleEmail)) { return 'string'; } + stream.next(); + return null; + } + }; +}); + +CodeMirror.defineMIME("text/x-rpm-changes", "changes"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/rpm/changes/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/rpm/changes/index.html new file mode 100644 index 00000000..18fe7ab7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/rpm/changes/index.html @@ -0,0 +1,67 @@ + + +CodeMirror: RPM changes mode + + + + + + + + + + + +
+

RPM changes mode

+ +
+ + +

MIME types defined: text/x-rpm-changes.

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/rpm/spec/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/rpm/spec/index.html new file mode 100644 index 00000000..127b72ee --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/rpm/spec/index.html @@ -0,0 +1,114 @@ + + +CodeMirror: RPM spec mode + + + + + + + + + + + + +
+

RPM spec mode

+ +
+ + +

MIME types defined: text/x-rpm-spec.

+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/rpm/spec/spec.css b/pitfall/pdfkit/node_modules/codemirror/mode/rpm/spec/spec.css new file mode 100644 index 00000000..d0a5d430 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/rpm/spec/spec.css @@ -0,0 +1,5 @@ +.cm-s-default span.cm-preamble {color: #b26818; font-weight: bold;} +.cm-s-default span.cm-macro {color: #b218b2;} +.cm-s-default span.cm-section {color: green; font-weight: bold;} +.cm-s-default span.cm-script {color: red;} +.cm-s-default span.cm-issue {color: yellow;} diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/rpm/spec/spec.js b/pitfall/pdfkit/node_modules/codemirror/mode/rpm/spec/spec.js new file mode 100644 index 00000000..9f339c21 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/rpm/spec/spec.js @@ -0,0 +1,66 @@ +// Quick and dirty spec file highlighting + +CodeMirror.defineMode("spec", function() { + var arch = /^(i386|i586|i686|x86_64|ppc64|ppc|ia64|s390x|s390|sparc64|sparcv9|sparc|noarch|alphaev6|alpha|hppa|mipsel)/; + + var preamble = /^(Name|Version|Release|License|Summary|Url|Group|Source|BuildArch|BuildRequires|BuildRoot|AutoReqProv|Provides|Requires(\(\w+\))?|Obsoletes|Conflicts|Recommends|Source\d*|Patch\d*|ExclusiveArch|NoSource|Supplements):/; + var section = /^%(debug_package|package|description|prep|build|install|files|clean|changelog|preun|postun|pre|post|triggerin|triggerun|pretrans|posttrans|verifyscript|check|triggerpostun|triggerprein|trigger)/; + var control_flow_complex = /^%(ifnarch|ifarch|if)/; // rpm control flow macros + var control_flow_simple = /^%(else|endif)/; // rpm control flow macros + var operators = /^(\!|\?|\<\=|\<|\>\=|\>|\=\=|\&\&|\|\|)/; // operators in control flow macros + + return { + startState: function () { + return { + controlFlow: false, + macroParameters: false, + section: false + }; + }, + token: function (stream, state) { + var ch = stream.peek(); + if (ch == "#") { stream.skipToEnd(); return "comment"; } + + if (stream.sol()) { + if (stream.match(preamble)) { return "preamble"; } + if (stream.match(section)) { return "section"; } + } + + if (stream.match(/^\$\w+/)) { return "def"; } // Variables like '$RPM_BUILD_ROOT' + if (stream.match(/^\$\{\w+\}/)) { return "def"; } // Variables like '${RPM_BUILD_ROOT}' + + if (stream.match(control_flow_simple)) { return "keyword"; } + if (stream.match(control_flow_complex)) { + state.controlFlow = true; + return "keyword"; + } + if (state.controlFlow) { + if (stream.match(operators)) { return "operator"; } + if (stream.match(/^(\d+)/)) { return "number"; } + if (stream.eol()) { state.controlFlow = false; } + } + + if (stream.match(arch)) { return "number"; } + + // Macros like '%make_install' or '%attr(0775,root,root)' + if (stream.match(/^%[\w]+/)) { + if (stream.match(/^\(/)) { state.macroParameters = true; } + return "macro"; + } + if (state.macroParameters) { + if (stream.match(/^\d+/)) { return "number";} + if (stream.match(/^\)/)) { + state.macroParameters = false; + return "macro"; + } + } + if (stream.match(/^%\{\??[\w \-]+\}/)) { return "macro"; } // Macros like '%{defined fedora}' + + //TODO: Include bash script sub-parser (CodeMirror supports that) + stream.next(); + return null; + } + }; +}); + +CodeMirror.defineMIME("text/x-rpm-spec", "spec"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/rst/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/rst/index.html new file mode 100644 index 00000000..78030ebe --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/rst/index.html @@ -0,0 +1,534 @@ + + +CodeMirror: reStructuredText mode + + + + + + + + + +
+

reStructuredText mode

+
+ + +

+ The python mode will be used for highlighting blocks + containing Python/IPython terminal sessions: blocks starting with + >>> (for Python) or In [num]: (for + IPython). + + Further, the stex mode will be used for highlighting + blocks containing LaTex code. +

+ +

MIME types defined: text/x-rst.

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/rst/rst.js b/pitfall/pdfkit/node_modules/codemirror/mode/rst/rst.js new file mode 100644 index 00000000..75563ba9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/rst/rst.js @@ -0,0 +1,560 @@ +CodeMirror.defineMode('rst-base', function (config) { + + /////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////// + + function format(string) { + var args = Array.prototype.slice.call(arguments, 1); + return string.replace(/{(\d+)}/g, function (match, n) { + return typeof args[n] != 'undefined' ? args[n] : match; + }); + } + + function AssertException(message) { + this.message = message; + } + + AssertException.prototype.toString = function () { + return 'AssertException: ' + this.message; + }; + + function assert(expression, message) { + if (!expression) throw new AssertException(message); + return expression; + } + + /////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////// + + var mode_python = CodeMirror.getMode(config, 'python'); + var mode_stex = CodeMirror.getMode(config, 'stex'); + + /////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////// + + var SEPA = "\\s+"; + var TAIL = "(?:\\s*|\\W|$)", + rx_TAIL = new RegExp(format('^{0}', TAIL)); + + var NAME = + "(?:[^\\W\\d_](?:[\\w!\"#$%&'()\\*\\+,\\-\\.\/:;<=>\\?]*[^\\W_])?)", + rx_NAME = new RegExp(format('^{0}', NAME)); + var NAME_WWS = + "(?:[^\\W\\d_](?:[\\w\\s!\"#$%&'()\\*\\+,\\-\\.\/:;<=>\\?]*[^\\W_])?)"; + var REF_NAME = format('(?:{0}|`{1}`)', NAME, NAME_WWS); + + var TEXT1 = "(?:[^\\s\\|](?:[^\\|]*[^\\s\\|])?)"; + var TEXT2 = "(?:[^\\`]+)", + rx_TEXT2 = new RegExp(format('^{0}', TEXT2)); + + var rx_section = new RegExp( + "^([!'#$%&\"()*+,-./:;<=>?@\\[\\\\\\]^_`{|}~])\\1{3,}\\s*$"); + var rx_explicit = new RegExp( + format('^\\.\\.{0}', SEPA)); + var rx_link = new RegExp( + format('^_{0}:{1}|^__:{1}', REF_NAME, TAIL)); + var rx_directive = new RegExp( + format('^{0}::{1}', REF_NAME, TAIL)); + var rx_substitution = new RegExp( + format('^\\|{0}\\|{1}{2}::{3}', TEXT1, SEPA, REF_NAME, TAIL)); + var rx_footnote = new RegExp( + format('^\\[(?:\\d+|#{0}?|\\*)]{1}', REF_NAME, TAIL)); + var rx_citation = new RegExp( + format('^\\[{0}\\]{1}', REF_NAME, TAIL)); + + var rx_substitution_ref = new RegExp( + format('^\\|{0}\\|', TEXT1)); + var rx_footnote_ref = new RegExp( + format('^\\[(?:\\d+|#{0}?|\\*)]_', REF_NAME)); + var rx_citation_ref = new RegExp( + format('^\\[{0}\\]_', REF_NAME)); + var rx_link_ref1 = new RegExp( + format('^{0}__?', REF_NAME)); + var rx_link_ref2 = new RegExp( + format('^`{0}`_', TEXT2)); + + var rx_role_pre = new RegExp( + format('^:{0}:`{1}`{2}', NAME, TEXT2, TAIL)); + var rx_role_suf = new RegExp( + format('^`{1}`:{0}:{2}', NAME, TEXT2, TAIL)); + var rx_role = new RegExp( + format('^:{0}:{1}', NAME, TAIL)); + + var rx_directive_name = new RegExp(format('^{0}', REF_NAME)); + var rx_directive_tail = new RegExp(format('^::{0}', TAIL)); + var rx_substitution_text = new RegExp(format('^\\|{0}\\|', TEXT1)); + var rx_substitution_sepa = new RegExp(format('^{0}', SEPA)); + var rx_substitution_name = new RegExp(format('^{0}', REF_NAME)); + var rx_substitution_tail = new RegExp(format('^::{0}', TAIL)); + var rx_link_head = new RegExp("^_"); + var rx_link_name = new RegExp(format('^{0}|_', REF_NAME)); + var rx_link_tail = new RegExp(format('^:{0}', TAIL)); + + var rx_verbatim = new RegExp('^::\\s*$'); + var rx_examples = new RegExp('^\\s+(?:>>>|In \\[\\d+\\]:)\\s'); + + /////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////// + + function to_normal(stream, state) { + var token = null; + + if (stream.sol() && stream.match(rx_examples, false)) { + change(state, to_mode, { + mode: mode_python, local: mode_python.startState() + }); + } else if (stream.sol() && stream.match(rx_explicit)) { + change(state, to_explicit); + token = 'meta'; + } else if (stream.sol() && stream.match(rx_section)) { + change(state, to_normal); + token = 'header'; + } else if (phase(state) == rx_role_pre || + stream.match(rx_role_pre, false)) { + + switch (stage(state)) { + case 0: + change(state, to_normal, context(rx_role_pre, 1)); + assert(stream.match(/^:/)); + token = 'meta'; + break; + case 1: + change(state, to_normal, context(rx_role_pre, 2)); + assert(stream.match(rx_NAME)); + token = 'keyword'; + + if (stream.current().match(/^(?:math|latex)/)) { + state.tmp_stex = true; + } + break; + case 2: + change(state, to_normal, context(rx_role_pre, 3)); + assert(stream.match(/^:`/)); + token = 'meta'; + break; + case 3: + if (state.tmp_stex) { + state.tmp_stex = undefined; state.tmp = { + mode: mode_stex, local: mode_stex.startState() + }; + } + + if (state.tmp) { + if (stream.peek() == '`') { + change(state, to_normal, context(rx_role_pre, 4)); + state.tmp = undefined; + break; + } + + token = state.tmp.mode.token(stream, state.tmp.local); + break; + } + + change(state, to_normal, context(rx_role_pre, 4)); + assert(stream.match(rx_TEXT2)); + token = 'string'; + break; + case 4: + change(state, to_normal, context(rx_role_pre, 5)); + assert(stream.match(/^`/)); + token = 'meta'; + break; + case 5: + change(state, to_normal, context(rx_role_pre, 6)); + assert(stream.match(rx_TAIL)); + break; + default: + change(state, to_normal); + assert(stream.current() == ''); + } + } else if (phase(state) == rx_role_suf || + stream.match(rx_role_suf, false)) { + + switch (stage(state)) { + case 0: + change(state, to_normal, context(rx_role_suf, 1)); + assert(stream.match(/^`/)); + token = 'meta'; + break; + case 1: + change(state, to_normal, context(rx_role_suf, 2)); + assert(stream.match(rx_TEXT2)); + token = 'string'; + break; + case 2: + change(state, to_normal, context(rx_role_suf, 3)); + assert(stream.match(/^`:/)); + token = 'meta'; + break; + case 3: + change(state, to_normal, context(rx_role_suf, 4)); + assert(stream.match(rx_NAME)); + token = 'keyword'; + break; + case 4: + change(state, to_normal, context(rx_role_suf, 5)); + assert(stream.match(/^:/)); + token = 'meta'; + break; + case 5: + change(state, to_normal, context(rx_role_suf, 6)); + assert(stream.match(rx_TAIL)); + break; + default: + change(state, to_normal); + assert(stream.current() == ''); + } + } else if (phase(state) == rx_role || stream.match(rx_role, false)) { + + switch (stage(state)) { + case 0: + change(state, to_normal, context(rx_role, 1)); + assert(stream.match(/^:/)); + token = 'meta'; + break; + case 1: + change(state, to_normal, context(rx_role, 2)); + assert(stream.match(rx_NAME)); + token = 'keyword'; + break; + case 2: + change(state, to_normal, context(rx_role, 3)); + assert(stream.match(/^:/)); + token = 'meta'; + break; + case 3: + change(state, to_normal, context(rx_role, 4)); + assert(stream.match(rx_TAIL)); + break; + default: + change(state, to_normal); + assert(stream.current() == ''); + } + } else if (phase(state) == rx_substitution_ref || + stream.match(rx_substitution_ref, false)) { + + switch (stage(state)) { + case 0: + change(state, to_normal, context(rx_substitution_ref, 1)); + assert(stream.match(rx_substitution_text)); + token = 'variable-2'; + break; + case 1: + change(state, to_normal, context(rx_substitution_ref, 2)); + if (stream.match(/^_?_?/)) token = 'link'; + break; + default: + change(state, to_normal); + assert(stream.current() == ''); + } + } else if (stream.match(rx_footnote_ref)) { + change(state, to_normal); + token = 'quote'; + } else if (stream.match(rx_citation_ref)) { + change(state, to_normal); + token = 'quote'; + } else if (stream.match(rx_link_ref1)) { + change(state, to_normal); + if (!stream.peek() || stream.peek().match(/^\W$/)) { + token = 'link'; + } + } else if (phase(state) == rx_link_ref2 || + stream.match(rx_link_ref2, false)) { + + switch (stage(state)) { + case 0: + if (!stream.peek() || stream.peek().match(/^\W$/)) { + change(state, to_normal, context(rx_link_ref2, 1)); + } else { + stream.match(rx_link_ref2); + } + break; + case 1: + change(state, to_normal, context(rx_link_ref2, 2)); + assert(stream.match(/^`/)); + token = 'link'; + break; + case 2: + change(state, to_normal, context(rx_link_ref2, 3)); + assert(stream.match(rx_TEXT2)); + break; + case 3: + change(state, to_normal, context(rx_link_ref2, 4)); + assert(stream.match(/^`_/)); + token = 'link'; + break; + default: + change(state, to_normal); + assert(stream.current() == ''); + } + } else if (stream.match(rx_verbatim)) { + change(state, to_verbatim); + } + + else { + if (stream.next()) change(state, to_normal); + } + + return token; + } + + /////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////// + + function to_explicit(stream, state) { + var token = null; + + if (phase(state) == rx_substitution || + stream.match(rx_substitution, false)) { + + switch (stage(state)) { + case 0: + change(state, to_explicit, context(rx_substitution, 1)); + assert(stream.match(rx_substitution_text)); + token = 'variable-2'; + break; + case 1: + change(state, to_explicit, context(rx_substitution, 2)); + assert(stream.match(rx_substitution_sepa)); + break; + case 2: + change(state, to_explicit, context(rx_substitution, 3)); + assert(stream.match(rx_substitution_name)); + token = 'keyword'; + break; + case 3: + change(state, to_explicit, context(rx_substitution, 4)); + assert(stream.match(rx_substitution_tail)); + token = 'meta'; + break; + default: + change(state, to_normal); + assert(stream.current() == ''); + } + } else if (phase(state) == rx_directive || + stream.match(rx_directive, false)) { + + switch (stage(state)) { + case 0: + change(state, to_explicit, context(rx_directive, 1)); + assert(stream.match(rx_directive_name)); + token = 'keyword'; + + if (stream.current().match(/^(?:math|latex)/)) + state.tmp_stex = true; + else if (stream.current().match(/^python/)) + state.tmp_py = true; + break; + case 1: + change(state, to_explicit, context(rx_directive, 2)); + assert(stream.match(rx_directive_tail)); + token = 'meta'; + + if (stream.match(/^latex\s*$/) || state.tmp_stex) { + state.tmp_stex = undefined; change(state, to_mode, { + mode: mode_stex, local: mode_stex.startState() + }); + } + break; + case 2: + change(state, to_explicit, context(rx_directive, 3)); + if (stream.match(/^python\s*$/) || state.tmp_py) { + state.tmp_py = undefined; change(state, to_mode, { + mode: mode_python, local: mode_python.startState() + }); + } + break; + default: + change(state, to_normal); + assert(stream.current() == ''); + } + } else if (phase(state) == rx_link || stream.match(rx_link, false)) { + + switch (stage(state)) { + case 0: + change(state, to_explicit, context(rx_link, 1)); + assert(stream.match(rx_link_head)); + assert(stream.match(rx_link_name)); + token = 'link'; + break; + case 1: + change(state, to_explicit, context(rx_link, 2)); + assert(stream.match(rx_link_tail)); + token = 'meta'; + break; + default: + change(state, to_normal); + assert(stream.current() == ''); + } + } else if (stream.match(rx_footnote)) { + change(state, to_normal); + token = 'quote'; + } else if (stream.match(rx_citation)) { + change(state, to_normal); + token = 'quote'; + } + + else { + stream.eatSpace(); + if (stream.eol()) { + change(state, to_normal); + } else { + stream.skipToEnd(); + change(state, to_comment); + token = 'comment'; + } + } + + return token; + } + + /////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////// + + function to_comment(stream, state) { + return as_block(stream, state, 'comment'); + } + + function to_verbatim(stream, state) { + return as_block(stream, state, 'meta'); + } + + function as_block(stream, state, token) { + if (stream.eol() || stream.eatSpace()) { + stream.skipToEnd(); + return token; + } else { + change(state, to_normal); + return null; + } + } + + /////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////// + + function to_mode(stream, state) { + + if (state.ctx.mode && state.ctx.local) { + + if (stream.sol()) { + if (!stream.eatSpace()) change(state, to_normal); + return null; + } + + return state.ctx.mode.token(stream, state.ctx.local); + } + + change(state, to_normal); + return null; + } + + /////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////// + + function context(phase, stage, mode, local) { + return {phase: phase, stage: stage, mode: mode, local: local}; + } + + function change(state, tok, ctx) { + state.tok = tok; + state.ctx = ctx || {}; + } + + function stage(state) { + return state.ctx.stage || 0; + } + + function phase(state) { + return state.ctx.phase; + } + + /////////////////////////////////////////////////////////////////////////// + /////////////////////////////////////////////////////////////////////////// + + return { + startState: function () { + return {tok: to_normal, ctx: context(undefined, 0)}; + }, + + copyState: function (state) { + return {tok: state.tok, ctx: state.ctx}; + }, + + innerMode: function (state) { + return state.tmp ? {state: state.tmp.local, mode: state.tmp.mode} + : state.ctx ? {state: state.ctx.local, mode: state.ctx.mode} + : null; + }, + + token: function (stream, state) { + return state.tok(stream, state); + } + }; +}, 'python', 'stex'); + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +CodeMirror.defineMode('rst', function (config, options) { + + var rx_strong = /^\*\*[^\*\s](?:[^\*]*[^\*\s])?\*\*/; + var rx_emphasis = /^\*[^\*\s](?:[^\*]*[^\*\s])?\*/; + var rx_literal = /^``[^`\s](?:[^`]*[^`\s])``/; + + var rx_number = /^(?:[\d]+(?:[\.,]\d+)*)/; + var rx_positive = /^(?:\s\+[\d]+(?:[\.,]\d+)*)/; + var rx_negative = /^(?:\s\-[\d]+(?:[\.,]\d+)*)/; + + var rx_uri_protocol = "[Hh][Tt][Tt][Pp][Ss]?://"; + var rx_uri_domain = "(?:[\\d\\w.-]+)\\.(?:\\w{2,6})"; + var rx_uri_path = "(?:/[\\d\\w\\#\\%\\&\\-\\.\\,\\/\\:\\=\\?\\~]+)*"; + var rx_uri = new RegExp("^" + + rx_uri_protocol + rx_uri_domain + rx_uri_path + ); + + var overlay = { + token: function (stream) { + + if (stream.match(rx_strong) && stream.match (/\W+|$/, false)) + return 'strong'; + if (stream.match(rx_emphasis) && stream.match (/\W+|$/, false)) + return 'em'; + if (stream.match(rx_literal) && stream.match (/\W+|$/, false)) + return 'string-2'; + if (stream.match(rx_number)) + return 'number'; + if (stream.match(rx_positive)) + return 'positive'; + if (stream.match(rx_negative)) + return 'negative'; + if (stream.match(rx_uri)) + return 'link'; + + while (stream.next() != null) { + if (stream.match(rx_strong, false)) break; + if (stream.match(rx_emphasis, false)) break; + if (stream.match(rx_literal, false)) break; + if (stream.match(rx_number, false)) break; + if (stream.match(rx_positive, false)) break; + if (stream.match(rx_negative, false)) break; + if (stream.match(rx_uri, false)) break; + } + + return null; + } + }; + + var mode = CodeMirror.getMode( + config, options.backdrop || 'rst-base' + ); + + return CodeMirror.overlayMode(mode, overlay, true); // combine +}, 'python', 'stex'); + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// + +CodeMirror.defineMIME('text/x-rst', 'rst'); + +/////////////////////////////////////////////////////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/ruby/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/ruby/index.html new file mode 100644 index 00000000..2b3e1a3e --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/ruby/index.html @@ -0,0 +1,185 @@ + + +CodeMirror: Ruby mode + + + + + + + + + + +
+

Ruby mode

+
+ + +

MIME types defined: text/x-ruby.

+ +

Development of the CodeMirror Ruby mode was kindly sponsored + by Ubalo, who hold + the license.

+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/ruby/ruby.js b/pitfall/pdfkit/node_modules/codemirror/mode/ruby/ruby.js new file mode 100644 index 00000000..96cdd5f9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/ruby/ruby.js @@ -0,0 +1,247 @@ +CodeMirror.defineMode("ruby", function(config) { + function wordObj(words) { + var o = {}; + for (var i = 0, e = words.length; i < e; ++i) o[words[i]] = true; + return o; + } + var keywords = wordObj([ + "alias", "and", "BEGIN", "begin", "break", "case", "class", "def", "defined?", "do", "else", + "elsif", "END", "end", "ensure", "false", "for", "if", "in", "module", "next", "not", "or", + "redo", "rescue", "retry", "return", "self", "super", "then", "true", "undef", "unless", + "until", "when", "while", "yield", "nil", "raise", "throw", "catch", "fail", "loop", "callcc", + "caller", "lambda", "proc", "public", "protected", "private", "require", "load", + "require_relative", "extend", "autoload", "__END__", "__FILE__", "__LINE__", "__dir__" + ]); + var indentWords = wordObj(["def", "class", "case", "for", "while", "do", "module", "then", + "catch", "loop", "proc", "begin"]); + var dedentWords = wordObj(["end", "until"]); + var matching = {"[": "]", "{": "}", "(": ")"}; + var curPunc; + + function chain(newtok, stream, state) { + state.tokenize.push(newtok); + return newtok(stream, state); + } + + function tokenBase(stream, state) { + curPunc = null; + if (stream.sol() && stream.match("=begin") && stream.eol()) { + state.tokenize.push(readBlockComment); + return "comment"; + } + if (stream.eatSpace()) return null; + var ch = stream.next(), m; + if (ch == "`" || ch == "'" || ch == '"') { + return chain(readQuoted(ch, "string", ch == '"' || ch == "`"), stream, state); + } else if (ch == "/" && !stream.eol() && stream.peek() != " ") { + return chain(readQuoted(ch, "string-2", true), stream, state); + } else if (ch == "%") { + var style = "string", embed = true; + if (stream.eat("s")) style = "atom"; + else if (stream.eat(/[WQ]/)) style = "string"; + else if (stream.eat(/[r]/)) style = "string-2"; + else if (stream.eat(/[wxq]/)) { style = "string"; embed = false; } + var delim = stream.eat(/[^\w\s]/); + if (!delim) return "operator"; + if (matching.propertyIsEnumerable(delim)) delim = matching[delim]; + return chain(readQuoted(delim, style, embed, true), stream, state); + } else if (ch == "#") { + stream.skipToEnd(); + return "comment"; + } else if (ch == "<" && (m = stream.match(/^<-?[\`\"\']?([a-zA-Z_?]\w*)[\`\"\']?(?:;|$)/))) { + return chain(readHereDoc(m[1]), stream, state); + } else if (ch == "0") { + if (stream.eat("x")) stream.eatWhile(/[\da-fA-F]/); + else if (stream.eat("b")) stream.eatWhile(/[01]/); + else stream.eatWhile(/[0-7]/); + return "number"; + } else if (/\d/.test(ch)) { + stream.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+\-]?[\d_]+)?/); + return "number"; + } else if (ch == "?") { + while (stream.match(/^\\[CM]-/)) {} + if (stream.eat("\\")) stream.eatWhile(/\w/); + else stream.next(); + return "string"; + } else if (ch == ":") { + if (stream.eat("'")) return chain(readQuoted("'", "atom", false), stream, state); + if (stream.eat('"')) return chain(readQuoted('"', "atom", true), stream, state); + + // :> :>> :< :<< are valid symbols + if (stream.eat(/[\<\>]/)) { + stream.eat(/[\<\>]/); + return "atom"; + } + + // :+ :- :/ :* :| :& :! are valid symbols + if (stream.eat(/[\+\-\*\/\&\|\:\!]/)) { + return "atom"; + } + + // Symbols can't start by a digit + if (stream.eat(/[a-zA-Z$@_]/)) { + stream.eatWhile(/[\w]/); + // Only one ? ! = is allowed and only as the last character + stream.eat(/[\?\!\=]/); + return "atom"; + } + return "operator"; + } else if (ch == "@" && stream.match(/^@?[a-zA-Z_]/)) { + stream.eat("@"); + stream.eatWhile(/[\w]/); + return "variable-2"; + } else if (ch == "$") { + if (stream.eat(/[a-zA-Z_]/)) { + stream.eatWhile(/[\w]/); + } else if (stream.eat(/\d/)) { + stream.eat(/\d/); + } else { + stream.next(); // Must be a special global like $: or $! + } + return "variable-3"; + } else if (/[a-zA-Z_]/.test(ch)) { + stream.eatWhile(/[\w]/); + stream.eat(/[\?\!]/); + if (stream.eat(":")) return "atom"; + return "ident"; + } else if (ch == "|" && (state.varList || state.lastTok == "{" || state.lastTok == "do")) { + curPunc = "|"; + return null; + } else if (/[\(\)\[\]{}\\;]/.test(ch)) { + curPunc = ch; + return null; + } else if (ch == "-" && stream.eat(">")) { + return "arrow"; + } else if (/[=+\-\/*:\.^%<>~|]/.test(ch)) { + stream.eatWhile(/[=+\-\/*:\.^%<>~|]/); + return "operator"; + } else { + return null; + } + } + + function tokenBaseUntilBrace() { + var depth = 1; + return function(stream, state) { + if (stream.peek() == "}") { + depth--; + if (depth == 0) { + state.tokenize.pop(); + return state.tokenize[state.tokenize.length-1](stream, state); + } + } else if (stream.peek() == "{") { + depth++; + } + return tokenBase(stream, state); + }; + } + function tokenBaseOnce() { + var alreadyCalled = false; + return function(stream, state) { + if (alreadyCalled) { + state.tokenize.pop(); + return state.tokenize[state.tokenize.length-1](stream, state); + } + alreadyCalled = true; + return tokenBase(stream, state); + }; + } + function readQuoted(quote, style, embed, unescaped) { + return function(stream, state) { + var escaped = false, ch; + + if (state.context.type === 'read-quoted-paused') { + state.context = state.context.prev; + stream.eat("}"); + } + + while ((ch = stream.next()) != null) { + if (ch == quote && (unescaped || !escaped)) { + state.tokenize.pop(); + break; + } + if (embed && ch == "#" && !escaped) { + if (stream.eat("{")) { + if (quote == "}") { + state.context = {prev: state.context, type: 'read-quoted-paused'}; + } + state.tokenize.push(tokenBaseUntilBrace()); + break; + } else if (/[@\$]/.test(stream.peek())) { + state.tokenize.push(tokenBaseOnce()); + break; + } + } + escaped = !escaped && ch == "\\"; + } + return style; + }; + } + function readHereDoc(phrase) { + return function(stream, state) { + if (stream.match(phrase)) state.tokenize.pop(); + else stream.skipToEnd(); + return "string"; + }; + } + function readBlockComment(stream, state) { + if (stream.sol() && stream.match("=end") && stream.eol()) + state.tokenize.pop(); + stream.skipToEnd(); + return "comment"; + } + + return { + startState: function() { + return {tokenize: [tokenBase], + indented: 0, + context: {type: "top", indented: -config.indentUnit}, + continuedLine: false, + lastTok: null, + varList: false}; + }, + + token: function(stream, state) { + if (stream.sol()) state.indented = stream.indentation(); + var style = state.tokenize[state.tokenize.length-1](stream, state), kwtype; + if (style == "ident") { + var word = stream.current(); + style = keywords.propertyIsEnumerable(stream.current()) ? "keyword" + : /^[A-Z]/.test(word) ? "tag" + : (state.lastTok == "def" || state.lastTok == "class" || state.varList) ? "def" + : "variable"; + if (indentWords.propertyIsEnumerable(word)) kwtype = "indent"; + else if (dedentWords.propertyIsEnumerable(word)) kwtype = "dedent"; + else if ((word == "if" || word == "unless") && stream.column() == stream.indentation()) + kwtype = "indent"; + } + if (curPunc || (style && style != "comment")) state.lastTok = word || curPunc || style; + if (curPunc == "|") state.varList = !state.varList; + + if (kwtype == "indent" || /[\(\[\{]/.test(curPunc)) + state.context = {prev: state.context, type: curPunc || style, indented: state.indented}; + else if ((kwtype == "dedent" || /[\)\]\}]/.test(curPunc)) && state.context.prev) + state.context = state.context.prev; + + if (stream.eol()) + state.continuedLine = (curPunc == "\\" || style == "operator"); + return style; + }, + + indent: function(state, textAfter) { + if (state.tokenize[state.tokenize.length-1] != tokenBase) return 0; + var firstChar = textAfter && textAfter.charAt(0); + var ct = state.context; + var closing = ct.type == matching[firstChar] || + ct.type == "keyword" && /^(?:end|until|else|elsif|when|rescue)\b/.test(textAfter); + return ct.indented + (closing ? 0 : config.indentUnit) + + (state.continuedLine ? config.indentUnit : 0); + }, + + electricChars: "}de", // enD and rescuE + lineComment: "#" + }; +}); + +CodeMirror.defineMIME("text/x-ruby", "ruby"); + diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/rust/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/rust/index.html new file mode 100644 index 00000000..b0b4c241 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/rust/index.html @@ -0,0 +1,61 @@ + + +CodeMirror: Rust mode + + + + + + + + + +
+

Rust mode

+ + +
+ + + +

MIME types defined: text/x-rustsrc.

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/rust/rust.js b/pitfall/pdfkit/node_modules/codemirror/mode/rust/rust.js new file mode 100644 index 00000000..c7530b6c --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/rust/rust.js @@ -0,0 +1,436 @@ +CodeMirror.defineMode("rust", function() { + var indentUnit = 4, altIndentUnit = 2; + var valKeywords = { + "if": "if-style", "while": "if-style", "else": "else-style", + "do": "else-style", "ret": "else-style", "fail": "else-style", + "break": "atom", "cont": "atom", "const": "let", "resource": "fn", + "let": "let", "fn": "fn", "for": "for", "alt": "alt", "iface": "iface", + "impl": "impl", "type": "type", "enum": "enum", "mod": "mod", + "as": "op", "true": "atom", "false": "atom", "assert": "op", "check": "op", + "claim": "op", "native": "ignore", "unsafe": "ignore", "import": "else-style", + "export": "else-style", "copy": "op", "log": "op", "log_err": "op", + "use": "op", "bind": "op", "self": "atom" + }; + var typeKeywords = function() { + var keywords = {"fn": "fn", "block": "fn", "obj": "obj"}; + var atoms = "bool uint int i8 i16 i32 i64 u8 u16 u32 u64 float f32 f64 str char".split(" "); + for (var i = 0, e = atoms.length; i < e; ++i) keywords[atoms[i]] = "atom"; + return keywords; + }(); + var operatorChar = /[+\-*&%=<>!?|\.@]/; + + // Tokenizer + + // Used as scratch variable to communicate multiple values without + // consing up tons of objects. + var tcat, content; + function r(tc, style) { + tcat = tc; + return style; + } + + function tokenBase(stream, state) { + var ch = stream.next(); + if (ch == '"') { + state.tokenize = tokenString; + return state.tokenize(stream, state); + } + if (ch == "'") { + tcat = "atom"; + if (stream.eat("\\")) { + if (stream.skipTo("'")) { stream.next(); return "string"; } + else { return "error"; } + } else { + stream.next(); + return stream.eat("'") ? "string" : "error"; + } + } + if (ch == "/") { + if (stream.eat("/")) { stream.skipToEnd(); return "comment"; } + if (stream.eat("*")) { + state.tokenize = tokenComment(1); + return state.tokenize(stream, state); + } + } + if (ch == "#") { + if (stream.eat("[")) { tcat = "open-attr"; return null; } + stream.eatWhile(/\w/); + return r("macro", "meta"); + } + if (ch == ":" && stream.match(":<")) { + return r("op", null); + } + if (ch.match(/\d/) || (ch == "." && stream.eat(/\d/))) { + var flp = false; + if (!stream.match(/^x[\da-f]+/i) && !stream.match(/^b[01]+/)) { + stream.eatWhile(/\d/); + if (stream.eat(".")) { flp = true; stream.eatWhile(/\d/); } + if (stream.match(/^e[+\-]?\d+/i)) { flp = true; } + } + if (flp) stream.match(/^f(?:32|64)/); + else stream.match(/^[ui](?:8|16|32|64)/); + return r("atom", "number"); + } + if (ch.match(/[()\[\]{}:;,]/)) return r(ch, null); + if (ch == "-" && stream.eat(">")) return r("->", null); + if (ch.match(operatorChar)) { + stream.eatWhile(operatorChar); + return r("op", null); + } + stream.eatWhile(/\w/); + content = stream.current(); + if (stream.match(/^::\w/)) { + stream.backUp(1); + return r("prefix", "variable-2"); + } + if (state.keywords.propertyIsEnumerable(content)) + return r(state.keywords[content], content.match(/true|false/) ? "atom" : "keyword"); + return r("name", "variable"); + } + + function tokenString(stream, state) { + var ch, escaped = false; + while (ch = stream.next()) { + if (ch == '"' && !escaped) { + state.tokenize = tokenBase; + return r("atom", "string"); + } + escaped = !escaped && ch == "\\"; + } + // Hack to not confuse the parser when a string is split in + // pieces. + return r("op", "string"); + } + + function tokenComment(depth) { + return function(stream, state) { + var lastCh = null, ch; + while (ch = stream.next()) { + if (ch == "/" && lastCh == "*") { + if (depth == 1) { + state.tokenize = tokenBase; + break; + } else { + state.tokenize = tokenComment(depth - 1); + return state.tokenize(stream, state); + } + } + if (ch == "*" && lastCh == "/") { + state.tokenize = tokenComment(depth + 1); + return state.tokenize(stream, state); + } + lastCh = ch; + } + return "comment"; + }; + } + + // Parser + + var cx = {state: null, stream: null, marked: null, cc: null}; + function pass() { + for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]); + } + function cont() { + pass.apply(null, arguments); + return true; + } + + function pushlex(type, info) { + var result = function() { + var state = cx.state; + state.lexical = {indented: state.indented, column: cx.stream.column(), + type: type, prev: state.lexical, info: info}; + }; + result.lex = true; + return result; + } + function poplex() { + var state = cx.state; + if (state.lexical.prev) { + if (state.lexical.type == ")") + state.indented = state.lexical.indented; + state.lexical = state.lexical.prev; + } + } + function typecx() { cx.state.keywords = typeKeywords; } + function valcx() { cx.state.keywords = valKeywords; } + poplex.lex = typecx.lex = valcx.lex = true; + + function commasep(comb, end) { + function more(type) { + if (type == ",") return cont(comb, more); + if (type == end) return cont(); + return cont(more); + } + return function(type) { + if (type == end) return cont(); + return pass(comb, more); + }; + } + + function stat_of(comb, tag) { + return cont(pushlex("stat", tag), comb, poplex, block); + } + function block(type) { + if (type == "}") return cont(); + if (type == "let") return stat_of(letdef1, "let"); + if (type == "fn") return stat_of(fndef); + if (type == "type") return cont(pushlex("stat"), tydef, endstatement, poplex, block); + if (type == "enum") return stat_of(enumdef); + if (type == "mod") return stat_of(mod); + if (type == "iface") return stat_of(iface); + if (type == "impl") return stat_of(impl); + if (type == "open-attr") return cont(pushlex("]"), commasep(expression, "]"), poplex); + if (type == "ignore" || type.match(/[\]\);,]/)) return cont(block); + return pass(pushlex("stat"), expression, poplex, endstatement, block); + } + function endstatement(type) { + if (type == ";") return cont(); + return pass(); + } + function expression(type) { + if (type == "atom" || type == "name") return cont(maybeop); + if (type == "{") return cont(pushlex("}"), exprbrace, poplex); + if (type.match(/[\[\(]/)) return matchBrackets(type, expression); + if (type.match(/[\]\)\};,]/)) return pass(); + if (type == "if-style") return cont(expression, expression); + if (type == "else-style" || type == "op") return cont(expression); + if (type == "for") return cont(pattern, maybetype, inop, expression, expression); + if (type == "alt") return cont(expression, altbody); + if (type == "fn") return cont(fndef); + if (type == "macro") return cont(macro); + return cont(); + } + function maybeop(type) { + if (content == ".") return cont(maybeprop); + if (content == "::<"){return cont(typarams, maybeop);} + if (type == "op" || content == ":") return cont(expression); + if (type == "(" || type == "[") return matchBrackets(type, expression); + return pass(); + } + function maybeprop() { + if (content.match(/^\w+$/)) {cx.marked = "variable"; return cont(maybeop);} + return pass(expression); + } + function exprbrace(type) { + if (type == "op") { + if (content == "|") return cont(blockvars, poplex, pushlex("}", "block"), block); + if (content == "||") return cont(poplex, pushlex("}", "block"), block); + } + if (content == "mutable" || (content.match(/^\w+$/) && cx.stream.peek() == ":" + && !cx.stream.match("::", false))) + return pass(record_of(expression)); + return pass(block); + } + function record_of(comb) { + function ro(type) { + if (content == "mutable" || content == "with") {cx.marked = "keyword"; return cont(ro);} + if (content.match(/^\w*$/)) {cx.marked = "variable"; return cont(ro);} + if (type == ":") return cont(comb, ro); + if (type == "}") return cont(); + return cont(ro); + } + return ro; + } + function blockvars(type) { + if (type == "name") {cx.marked = "def"; return cont(blockvars);} + if (type == "op" && content == "|") return cont(); + return cont(blockvars); + } + + function letdef1(type) { + if (type.match(/[\]\)\};]/)) return cont(); + if (content == "=") return cont(expression, letdef2); + if (type == ",") return cont(letdef1); + return pass(pattern, maybetype, letdef1); + } + function letdef2(type) { + if (type.match(/[\]\)\};,]/)) return pass(letdef1); + else return pass(expression, letdef2); + } + function maybetype(type) { + if (type == ":") return cont(typecx, rtype, valcx); + return pass(); + } + function inop(type) { + if (type == "name" && content == "in") {cx.marked = "keyword"; return cont();} + return pass(); + } + function fndef(type) { + if (content == "@" || content == "~") {cx.marked = "keyword"; return cont(fndef);} + if (type == "name") {cx.marked = "def"; return cont(fndef);} + if (content == "<") return cont(typarams, fndef); + if (type == "{") return pass(expression); + if (type == "(") return cont(pushlex(")"), commasep(argdef, ")"), poplex, fndef); + if (type == "->") return cont(typecx, rtype, valcx, fndef); + if (type == ";") return cont(); + return cont(fndef); + } + function tydef(type) { + if (type == "name") {cx.marked = "def"; return cont(tydef);} + if (content == "<") return cont(typarams, tydef); + if (content == "=") return cont(typecx, rtype, valcx); + return cont(tydef); + } + function enumdef(type) { + if (type == "name") {cx.marked = "def"; return cont(enumdef);} + if (content == "<") return cont(typarams, enumdef); + if (content == "=") return cont(typecx, rtype, valcx, endstatement); + if (type == "{") return cont(pushlex("}"), typecx, enumblock, valcx, poplex); + return cont(enumdef); + } + function enumblock(type) { + if (type == "}") return cont(); + if (type == "(") return cont(pushlex(")"), commasep(rtype, ")"), poplex, enumblock); + if (content.match(/^\w+$/)) cx.marked = "def"; + return cont(enumblock); + } + function mod(type) { + if (type == "name") {cx.marked = "def"; return cont(mod);} + if (type == "{") return cont(pushlex("}"), block, poplex); + return pass(); + } + function iface(type) { + if (type == "name") {cx.marked = "def"; return cont(iface);} + if (content == "<") return cont(typarams, iface); + if (type == "{") return cont(pushlex("}"), block, poplex); + return pass(); + } + function impl(type) { + if (content == "<") return cont(typarams, impl); + if (content == "of" || content == "for") {cx.marked = "keyword"; return cont(rtype, impl);} + if (type == "name") {cx.marked = "def"; return cont(impl);} + if (type == "{") return cont(pushlex("}"), block, poplex); + return pass(); + } + function typarams() { + if (content == ">") return cont(); + if (content == ",") return cont(typarams); + if (content == ":") return cont(rtype, typarams); + return pass(rtype, typarams); + } + function argdef(type) { + if (type == "name") {cx.marked = "def"; return cont(argdef);} + if (type == ":") return cont(typecx, rtype, valcx); + return pass(); + } + function rtype(type) { + if (type == "name") {cx.marked = "variable-3"; return cont(rtypemaybeparam); } + if (content == "mutable") {cx.marked = "keyword"; return cont(rtype);} + if (type == "atom") return cont(rtypemaybeparam); + if (type == "op" || type == "obj") return cont(rtype); + if (type == "fn") return cont(fntype); + if (type == "{") return cont(pushlex("{"), record_of(rtype), poplex); + return matchBrackets(type, rtype); + } + function rtypemaybeparam() { + if (content == "<") return cont(typarams); + return pass(); + } + function fntype(type) { + if (type == "(") return cont(pushlex("("), commasep(rtype, ")"), poplex, fntype); + if (type == "->") return cont(rtype); + return pass(); + } + function pattern(type) { + if (type == "name") {cx.marked = "def"; return cont(patternmaybeop);} + if (type == "atom") return cont(patternmaybeop); + if (type == "op") return cont(pattern); + if (type.match(/[\]\)\};,]/)) return pass(); + return matchBrackets(type, pattern); + } + function patternmaybeop(type) { + if (type == "op" && content == ".") return cont(); + if (content == "to") {cx.marked = "keyword"; return cont(pattern);} + else return pass(); + } + function altbody(type) { + if (type == "{") return cont(pushlex("}", "alt"), altblock1, poplex); + return pass(); + } + function altblock1(type) { + if (type == "}") return cont(); + if (type == "|") return cont(altblock1); + if (content == "when") {cx.marked = "keyword"; return cont(expression, altblock2);} + if (type.match(/[\]\);,]/)) return cont(altblock1); + return pass(pattern, altblock2); + } + function altblock2(type) { + if (type == "{") return cont(pushlex("}", "alt"), block, poplex, altblock1); + else return pass(altblock1); + } + + function macro(type) { + if (type.match(/[\[\(\{]/)) return matchBrackets(type, expression); + return pass(); + } + function matchBrackets(type, comb) { + if (type == "[") return cont(pushlex("]"), commasep(comb, "]"), poplex); + if (type == "(") return cont(pushlex(")"), commasep(comb, ")"), poplex); + if (type == "{") return cont(pushlex("}"), commasep(comb, "}"), poplex); + return cont(); + } + + function parse(state, stream, style) { + var cc = state.cc; + // Communicate our context to the combinators. + // (Less wasteful than consing up a hundred closures on every call.) + cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc; + + while (true) { + var combinator = cc.length ? cc.pop() : block; + if (combinator(tcat)) { + while(cc.length && cc[cc.length - 1].lex) + cc.pop()(); + return cx.marked || style; + } + } + } + + return { + startState: function() { + return { + tokenize: tokenBase, + cc: [], + lexical: {indented: -indentUnit, column: 0, type: "top", align: false}, + keywords: valKeywords, + indented: 0 + }; + }, + + token: function(stream, state) { + if (stream.sol()) { + if (!state.lexical.hasOwnProperty("align")) + state.lexical.align = false; + state.indented = stream.indentation(); + } + if (stream.eatSpace()) return null; + tcat = content = null; + var style = state.tokenize(stream, state); + if (style == "comment") return style; + if (!state.lexical.hasOwnProperty("align")) + state.lexical.align = true; + if (tcat == "prefix") return style; + if (!content) content = stream.current(); + return parse(state, stream, style); + }, + + indent: function(state, textAfter) { + if (state.tokenize != tokenBase) return 0; + var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical, + type = lexical.type, closing = firstChar == type; + if (type == "stat") return lexical.indented + indentUnit; + if (lexical.align) return lexical.column + (closing ? 0 : 1); + return lexical.indented + (closing ? 0 : (lexical.info == "alt" ? altIndentUnit : indentUnit)); + }, + + electricChars: "{}", + blockCommentStart: "/*", + blockCommentEnd: "*/", + lineComment: "//", + fold: "brace" + }; +}); + +CodeMirror.defineMIME("text/x-rustsrc", "rust"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/sass/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/sass/index.html new file mode 100644 index 00000000..66d46778 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/sass/index.html @@ -0,0 +1,66 @@ + + +CodeMirror: Sass mode + + + + + + + + + + +
+

Sass mode

+
+ + +

MIME types defined: text/x-sass.

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/sass/sass.js b/pitfall/pdfkit/node_modules/codemirror/mode/sass/sass.js new file mode 100644 index 00000000..9c9a0dae --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/sass/sass.js @@ -0,0 +1,330 @@ +CodeMirror.defineMode("sass", function(config) { + var tokenRegexp = function(words){ + return new RegExp("^" + words.join("|")); + }; + + var keywords = ["true", "false", "null", "auto"]; + var keywordsRegexp = new RegExp("^" + keywords.join("|")); + + var operators = ["\\(", "\\)", "=", ">", "<", "==", ">=", "<=", "\\+", "-", "\\!=", "/", "\\*", "%", "and", "or", "not"]; + var opRegexp = tokenRegexp(operators); + + var pseudoElementsRegexp = /^::?[\w\-]+/; + + var urlTokens = function(stream, state){ + var ch = stream.peek(); + + if (ch === ")"){ + stream.next(); + state.tokenizer = tokenBase; + return "operator"; + }else if (ch === "("){ + stream.next(); + stream.eatSpace(); + + return "operator"; + }else if (ch === "'" || ch === '"'){ + state.tokenizer = buildStringTokenizer(stream.next()); + return "string"; + }else{ + state.tokenizer = buildStringTokenizer(")", false); + return "string"; + } + }; + var multilineComment = function(stream, state) { + if (stream.skipTo("*/")){ + stream.next(); + stream.next(); + state.tokenizer = tokenBase; + }else { + stream.next(); + } + + return "comment"; + }; + + var buildStringTokenizer = function(quote, greedy){ + if(greedy == null){ greedy = true; } + + function stringTokenizer(stream, state){ + var nextChar = stream.next(); + var peekChar = stream.peek(); + var previousChar = stream.string.charAt(stream.pos-2); + + var endingString = ((nextChar !== "\\" && peekChar === quote) || (nextChar === quote && previousChar !== "\\")); + + /* + console.log("previousChar: " + previousChar); + console.log("nextChar: " + nextChar); + console.log("peekChar: " + peekChar); + console.log("ending: " + endingString); + */ + + if (endingString){ + if (nextChar !== quote && greedy) { stream.next(); } + state.tokenizer = tokenBase; + return "string"; + }else if (nextChar === "#" && peekChar === "{"){ + state.tokenizer = buildInterpolationTokenizer(stringTokenizer); + stream.next(); + return "operator"; + }else { + return "string"; + } + } + + return stringTokenizer; + }; + + var buildInterpolationTokenizer = function(currentTokenizer){ + return function(stream, state){ + if (stream.peek() === "}"){ + stream.next(); + state.tokenizer = currentTokenizer; + return "operator"; + }else{ + return tokenBase(stream, state); + } + }; + }; + + var indent = function(state){ + if (state.indentCount == 0){ + state.indentCount++; + var lastScopeOffset = state.scopes[0].offset; + var currentOffset = lastScopeOffset + config.indentUnit; + state.scopes.unshift({ offset:currentOffset }); + } + }; + + var dedent = function(state){ + if (state.scopes.length == 1) { return; } + + state.scopes.shift(); + }; + + var tokenBase = function(stream, state) { + var ch = stream.peek(); + + // Single line Comment + if (stream.match('//')) { + stream.skipToEnd(); + return "comment"; + } + + // Multiline Comment + if (stream.match('/*')){ + state.tokenizer = multilineComment; + return state.tokenizer(stream, state); + } + + // Interpolation + if (stream.match('#{')){ + state.tokenizer = buildInterpolationTokenizer(tokenBase); + return "operator"; + } + + if (ch === "."){ + stream.next(); + + // Match class selectors + if (stream.match(/^[\w-]+/)){ + indent(state); + return "atom"; + }else if (stream.peek() === "#"){ + indent(state); + return "atom"; + }else{ + return "operator"; + } + } + + if (ch === "#"){ + stream.next(); + + // Hex numbers + if (stream.match(/[0-9a-fA-F]{6}|[0-9a-fA-F]{3}/)){ + return "number"; + } + + // ID selectors + if (stream.match(/^[\w-]+/)){ + indent(state); + return "atom"; + } + + if (stream.peek() === "#"){ + indent(state); + return "atom"; + } + } + + // Numbers + if (stream.match(/^-?[0-9\.]+/)){ + return "number"; + } + + // Units + if (stream.match(/^(px|em|in)\b/)){ + return "unit"; + } + + if (stream.match(keywordsRegexp)){ + return "keyword"; + } + + if (stream.match(/^url/) && stream.peek() === "("){ + state.tokenizer = urlTokens; + return "atom"; + } + + // Variables + if (ch === "$"){ + stream.next(); + stream.eatWhile(/[\w-]/); + + if (stream.peek() === ":"){ + stream.next(); + return "variable-2"; + }else{ + return "variable-3"; + } + } + + if (ch === "!"){ + stream.next(); + + if (stream.match(/^[\w]+/)){ + return "keyword"; + } + + return "operator"; + } + + if (ch === "="){ + stream.next(); + + // Match shortcut mixin definition + if (stream.match(/^[\w-]+/)){ + indent(state); + return "meta"; + }else { + return "operator"; + } + } + + if (ch === "+"){ + stream.next(); + + // Match shortcut mixin definition + if (stream.match(/^[\w-]+/)){ + return "variable-3"; + }else { + return "operator"; + } + } + + // Indent Directives + if (stream.match(/^@(else if|if|media|else|for|each|while|mixin|function)/)){ + indent(state); + return "meta"; + } + + // Other Directives + if (ch === "@"){ + stream.next(); + stream.eatWhile(/[\w-]/); + return "meta"; + } + + // Strings + if (ch === '"' || ch === "'"){ + stream.next(); + state.tokenizer = buildStringTokenizer(ch); + return "string"; + } + + // Pseudo element selectors + if (ch == ':' && stream.match(pseudoElementsRegexp)){ + return "keyword"; + } + + // atoms + if (stream.eatWhile(/[\w-&]/)){ + // matches a property definition + if (stream.peek() === ":" && !stream.match(pseudoElementsRegexp, false)) + return "property"; + else + return "atom"; + } + + if (stream.match(opRegexp)){ + return "operator"; + } + + // If we haven't returned by now, we move 1 character + // and return an error + stream.next(); + return null; + }; + + var tokenLexer = function(stream, state) { + if (stream.sol()){ + state.indentCount = 0; + } + var style = state.tokenizer(stream, state); + var current = stream.current(); + + if (current === "@return"){ + dedent(state); + } + + if (style === "atom"){ + indent(state); + } + + if (style !== null){ + var startOfToken = stream.pos - current.length; + var withCurrentIndent = startOfToken + (config.indentUnit * state.indentCount); + + var newScopes = []; + + for (var i = 0; i < state.scopes.length; i++){ + var scope = state.scopes[i]; + + if (scope.offset <= withCurrentIndent){ + newScopes.push(scope); + } + } + + state.scopes = newScopes; + } + + + return style; + }; + + return { + startState: function() { + return { + tokenizer: tokenBase, + scopes: [{offset: 0, type: 'sass'}], + definedVars: [], + definedMixins: [] + }; + }, + token: function(stream, state) { + var style = tokenLexer(stream, state); + + state.lastToken = { style: style, content: stream.current() }; + + return style; + }, + + indent: function(state) { + return state.scopes[0].offset; + } + }; +}); + +CodeMirror.defineMIME("text/x-sass", "sass"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/scheme/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/scheme/index.html new file mode 100644 index 00000000..164d5da6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/scheme/index.html @@ -0,0 +1,77 @@ + + +CodeMirror: Scheme mode + + + + + + + + + +
+

Scheme mode

+
+ + +

MIME types defined: text/x-scheme.

+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/scheme/scheme.js b/pitfall/pdfkit/node_modules/codemirror/mode/scheme/scheme.js new file mode 100644 index 00000000..c5990ae9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/scheme/scheme.js @@ -0,0 +1,232 @@ +/** + * Author: Koh Zi Han, based on implementation by Koh Zi Chun + */ +CodeMirror.defineMode("scheme", function () { + var BUILTIN = "builtin", COMMENT = "comment", STRING = "string", + ATOM = "atom", NUMBER = "number", BRACKET = "bracket"; + var INDENT_WORD_SKIP = 2; + + function makeKeywords(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + + var keywords = makeKeywords("λ case-lambda call/cc class define-class exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt #f floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string=? string>? string? substring symbol->string symbol? #t tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?"); + var indentKeys = makeKeywords("define let letrec let* lambda"); + + function stateStack(indent, type, prev) { // represents a state stack object + this.indent = indent; + this.type = type; + this.prev = prev; + } + + function pushStack(state, indent, type) { + state.indentStack = new stateStack(indent, type, state.indentStack); + } + + function popStack(state) { + state.indentStack = state.indentStack.prev; + } + + var binaryMatcher = new RegExp(/^(?:[-+]i|[-+][01]+#*(?:\/[01]+#*)?i|[-+]?[01]+#*(?:\/[01]+#*)?@[-+]?[01]+#*(?:\/[01]+#*)?|[-+]?[01]+#*(?:\/[01]+#*)?[-+](?:[01]+#*(?:\/[01]+#*)?)?i|[-+]?[01]+#*(?:\/[01]+#*)?)(?=[()\s;"]|$)/i); + var octalMatcher = new RegExp(/^(?:[-+]i|[-+][0-7]+#*(?:\/[0-7]+#*)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?@[-+]?[0-7]+#*(?:\/[0-7]+#*)?|[-+]?[0-7]+#*(?:\/[0-7]+#*)?[-+](?:[0-7]+#*(?:\/[0-7]+#*)?)?i|[-+]?[0-7]+#*(?:\/[0-7]+#*)?)(?=[()\s;"]|$)/i); + var hexMatcher = new RegExp(/^(?:[-+]i|[-+][\da-f]+#*(?:\/[\da-f]+#*)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?@[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?[-+](?:[\da-f]+#*(?:\/[\da-f]+#*)?)?i|[-+]?[\da-f]+#*(?:\/[\da-f]+#*)?)(?=[()\s;"]|$)/i); + var decimalMatcher = new RegExp(/^(?:[-+]i|[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)i|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)@[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)|[-+]?(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)[-+](?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*)?i|(?:(?:(?:\d+#+\.?#*|\d+\.\d*#*|\.\d+#*|\d+)(?:[esfdl][-+]?\d+)?)|\d+#*\/\d+#*))(?=[()\s;"]|$)/i); + + function isBinaryNumber (stream) { + return stream.match(binaryMatcher); + } + + function isOctalNumber (stream) { + return stream.match(octalMatcher); + } + + function isDecimalNumber (stream, backup) { + if (backup === true) { + stream.backUp(1); + } + return stream.match(decimalMatcher); + } + + function isHexNumber (stream) { + return stream.match(hexMatcher); + } + + return { + startState: function () { + return { + indentStack: null, + indentation: 0, + mode: false, + sExprComment: false + }; + }, + + token: function (stream, state) { + if (state.indentStack == null && stream.sol()) { + // update indentation, but only if indentStack is empty + state.indentation = stream.indentation(); + } + + // skip spaces + if (stream.eatSpace()) { + return null; + } + var returnType = null; + + switch(state.mode){ + case "string": // multi-line string parsing mode + var next, escaped = false; + while ((next = stream.next()) != null) { + if (next == "\"" && !escaped) { + + state.mode = false; + break; + } + escaped = !escaped && next == "\\"; + } + returnType = STRING; // continue on in scheme-string mode + break; + case "comment": // comment parsing mode + var next, maybeEnd = false; + while ((next = stream.next()) != null) { + if (next == "#" && maybeEnd) { + + state.mode = false; + break; + } + maybeEnd = (next == "|"); + } + returnType = COMMENT; + break; + case "s-expr-comment": // s-expr commenting mode + state.mode = false; + if(stream.peek() == "(" || stream.peek() == "["){ + // actually start scheme s-expr commenting mode + state.sExprComment = 0; + }else{ + // if not we just comment the entire of the next token + stream.eatWhile(/[^/s]/); // eat non spaces + returnType = COMMENT; + break; + } + default: // default parsing mode + var ch = stream.next(); + + if (ch == "\"") { + state.mode = "string"; + returnType = STRING; + + } else if (ch == "'") { + returnType = ATOM; + } else if (ch == '#') { + if (stream.eat("|")) { // Multi-line comment + state.mode = "comment"; // toggle to comment mode + returnType = COMMENT; + } else if (stream.eat(/[tf]/i)) { // #t/#f (atom) + returnType = ATOM; + } else if (stream.eat(';')) { // S-Expr comment + state.mode = "s-expr-comment"; + returnType = COMMENT; + } else { + var numTest = null, hasExactness = false, hasRadix = true; + if (stream.eat(/[ei]/i)) { + hasExactness = true; + } else { + stream.backUp(1); // must be radix specifier + } + if (stream.match(/^#b/i)) { + numTest = isBinaryNumber; + } else if (stream.match(/^#o/i)) { + numTest = isOctalNumber; + } else if (stream.match(/^#x/i)) { + numTest = isHexNumber; + } else if (stream.match(/^#d/i)) { + numTest = isDecimalNumber; + } else if (stream.match(/^[-+0-9.]/, false)) { + hasRadix = false; + numTest = isDecimalNumber; + // re-consume the intial # if all matches failed + } else if (!hasExactness) { + stream.eat('#'); + } + if (numTest != null) { + if (hasRadix && !hasExactness) { + // consume optional exactness after radix + stream.match(/^#[ei]/i); + } + if (numTest(stream)) + returnType = NUMBER; + } + } + } else if (/^[-+0-9.]/.test(ch) && isDecimalNumber(stream, true)) { // match non-prefixed number, must be decimal + returnType = NUMBER; + } else if (ch == ";") { // comment + stream.skipToEnd(); // rest of the line is a comment + returnType = COMMENT; + } else if (ch == "(" || ch == "[") { + var keyWord = ''; var indentTemp = stream.column(), letter; + /** + Either + (indent-word .. + (non-indent-word .. + (;something else, bracket, etc. + */ + + while ((letter = stream.eat(/[^\s\(\[\;\)\]]/)) != null) { + keyWord += letter; + } + + if (keyWord.length > 0 && indentKeys.propertyIsEnumerable(keyWord)) { // indent-word + + pushStack(state, indentTemp + INDENT_WORD_SKIP, ch); + } else { // non-indent word + // we continue eating the spaces + stream.eatSpace(); + if (stream.eol() || stream.peek() == ";") { + // nothing significant after + // we restart indentation 1 space after + pushStack(state, indentTemp + 1, ch); + } else { + pushStack(state, indentTemp + stream.current().length, ch); // else we match + } + } + stream.backUp(stream.current().length - 1); // undo all the eating + + if(typeof state.sExprComment == "number") state.sExprComment++; + + returnType = BRACKET; + } else if (ch == ")" || ch == "]") { + returnType = BRACKET; + if (state.indentStack != null && state.indentStack.type == (ch == ")" ? "(" : "[")) { + popStack(state); + + if(typeof state.sExprComment == "number"){ + if(--state.sExprComment == 0){ + returnType = COMMENT; // final closing bracket + state.sExprComment = false; // turn off s-expr commenting mode + } + } + } + } else { + stream.eatWhile(/[\w\$_\-!$%&*+\.\/:<=>?@\^~]/); + + if (keywords && keywords.propertyIsEnumerable(stream.current())) { + returnType = BUILTIN; + } else returnType = "variable"; + } + } + return (typeof state.sExprComment == "number") ? COMMENT : returnType; + }, + + indent: function (state) { + if (state.indentStack == null) return state.indentation; + return state.indentStack.indent; + }, + + lineComment: ";;" + }; +}); + +CodeMirror.defineMIME("text/x-scheme", "scheme"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/shell/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/shell/index.html new file mode 100644 index 00000000..cf415e83 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/shell/index.html @@ -0,0 +1,66 @@ + + +CodeMirror: Shell mode + + + + + + + + + + +
+

Shell mode

+ + + + + + +

MIME types defined: text/x-sh.

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/shell/shell.js b/pitfall/pdfkit/node_modules/codemirror/mode/shell/shell.js new file mode 100644 index 00000000..abfd2144 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/shell/shell.js @@ -0,0 +1,118 @@ +CodeMirror.defineMode('shell', function() { + + var words = {}; + function define(style, string) { + var split = string.split(' '); + for(var i = 0; i < split.length; i++) { + words[split[i]] = style; + } + }; + + // Atoms + define('atom', 'true false'); + + // Keywords + define('keyword', 'if then do else elif while until for in esac fi fin ' + + 'fil done exit set unset export function'); + + // Commands + define('builtin', 'ab awk bash beep cat cc cd chown chmod chroot clear cp ' + + 'curl cut diff echo find gawk gcc get git grep kill killall ln ls make ' + + 'mkdir openssl mv nc node npm ping ps restart rm rmdir sed service sh ' + + 'shopt shred source sort sleep ssh start stop su sudo tee telnet top ' + + 'touch vi vim wall wc wget who write yes zsh'); + + function tokenBase(stream, state) { + + var sol = stream.sol(); + var ch = stream.next(); + + if (ch === '\'' || ch === '"' || ch === '`') { + state.tokens.unshift(tokenString(ch)); + return tokenize(stream, state); + } + if (ch === '#') { + if (sol && stream.eat('!')) { + stream.skipToEnd(); + return 'meta'; // 'comment'? + } + stream.skipToEnd(); + return 'comment'; + } + if (ch === '$') { + state.tokens.unshift(tokenDollar); + return tokenize(stream, state); + } + if (ch === '+' || ch === '=') { + return 'operator'; + } + if (ch === '-') { + stream.eat('-'); + stream.eatWhile(/\w/); + return 'attribute'; + } + if (/\d/.test(ch)) { + stream.eatWhile(/\d/); + if(!/\w/.test(stream.peek())) { + return 'number'; + } + } + stream.eatWhile(/[\w-]/); + var cur = stream.current(); + if (stream.peek() === '=' && /\w+/.test(cur)) return 'def'; + return words.hasOwnProperty(cur) ? words[cur] : null; + } + + function tokenString(quote) { + return function(stream, state) { + var next, end = false, escaped = false; + while ((next = stream.next()) != null) { + if (next === quote && !escaped) { + end = true; + break; + } + if (next === '$' && !escaped && quote !== '\'') { + escaped = true; + stream.backUp(1); + state.tokens.unshift(tokenDollar); + break; + } + escaped = !escaped && next === '\\'; + } + if (end || !escaped) { + state.tokens.shift(); + } + return (quote === '`' || quote === ')' ? 'quote' : 'string'); + }; + }; + + var tokenDollar = function(stream, state) { + if (state.tokens.length > 1) stream.eat('$'); + var ch = stream.next(), hungry = /\w/; + if (ch === '{') hungry = /[^}]/; + if (ch === '(') { + state.tokens[0] = tokenString(')'); + return tokenize(stream, state); + } + if (!/\d/.test(ch)) { + stream.eatWhile(hungry); + stream.eat('}'); + } + state.tokens.shift(); + return 'def'; + }; + + function tokenize(stream, state) { + return (state.tokens[0] || tokenBase) (stream, state); + }; + + return { + startState: function() {return {tokens:[]};}, + token: function(stream, state) { + if (stream.eatSpace()) return null; + return tokenize(stream, state); + } + }; +}); + +CodeMirror.defineMIME('text/x-sh', 'shell'); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/sieve/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/sieve/index.html new file mode 100644 index 00000000..9d814a9d --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/sieve/index.html @@ -0,0 +1,93 @@ + + +CodeMirror: Sieve (RFC5228) mode + + + + + + + + + +
+

Sieve (RFC5228) mode

+
+ + +

MIME types defined: application/sieve.

+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/sieve/sieve.js b/pitfall/pdfkit/node_modules/codemirror/mode/sieve/sieve.js new file mode 100644 index 00000000..8ca2a4cb --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/sieve/sieve.js @@ -0,0 +1,183 @@ +/* + * See LICENSE in this directory for the license under which this code + * is released. + */ + +CodeMirror.defineMode("sieve", function(config) { + function words(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + + var keywords = words("if elsif else stop require"); + var atoms = words("true false not"); + var indentUnit = config.indentUnit; + + function tokenBase(stream, state) { + + var ch = stream.next(); + if (ch == "/" && stream.eat("*")) { + state.tokenize = tokenCComment; + return tokenCComment(stream, state); + } + + if (ch === '#') { + stream.skipToEnd(); + return "comment"; + } + + if (ch == "\"") { + state.tokenize = tokenString(ch); + return state.tokenize(stream, state); + } + + if (ch == "(") { + state._indent.push("("); + // add virtual angel wings so that editor behaves... + // ...more sane incase of broken brackets + state._indent.push("{"); + return null; + } + + if (ch === "{") { + state._indent.push("{"); + return null; + } + + if (ch == ")") { + state._indent.pop(); + state._indent.pop(); + } + + if (ch === "}") { + state._indent.pop(); + return null; + } + + if (ch == ",") + return null; + + if (ch == ";") + return null; + + + if (/[{}\(\),;]/.test(ch)) + return null; + + // 1*DIGIT "K" / "M" / "G" + if (/\d/.test(ch)) { + stream.eatWhile(/[\d]/); + stream.eat(/[KkMmGg]/); + return "number"; + } + + // ":" (ALPHA / "_") *(ALPHA / DIGIT / "_") + if (ch == ":") { + stream.eatWhile(/[a-zA-Z_]/); + stream.eatWhile(/[a-zA-Z0-9_]/); + + return "operator"; + } + + stream.eatWhile(/\w/); + var cur = stream.current(); + + // "text:" *(SP / HTAB) (hash-comment / CRLF) + // *(multiline-literal / multiline-dotstart) + // "." CRLF + if ((cur == "text") && stream.eat(":")) + { + state.tokenize = tokenMultiLineString; + return "string"; + } + + if (keywords.propertyIsEnumerable(cur)) + return "keyword"; + + if (atoms.propertyIsEnumerable(cur)) + return "atom"; + + return null; + } + + function tokenMultiLineString(stream, state) + { + state._multiLineString = true; + // the first line is special it may contain a comment + if (!stream.sol()) { + stream.eatSpace(); + + if (stream.peek() == "#") { + stream.skipToEnd(); + return "comment"; + } + + stream.skipToEnd(); + return "string"; + } + + if ((stream.next() == ".") && (stream.eol())) + { + state._multiLineString = false; + state.tokenize = tokenBase; + } + + return "string"; + } + + function tokenCComment(stream, state) { + var maybeEnd = false, ch; + while ((ch = stream.next()) != null) { + if (maybeEnd && ch == "/") { + state.tokenize = tokenBase; + break; + } + maybeEnd = (ch == "*"); + } + return "comment"; + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, ch; + while ((ch = stream.next()) != null) { + if (ch == quote && !escaped) + break; + escaped = !escaped && ch == "\\"; + } + if (!escaped) state.tokenize = tokenBase; + return "string"; + }; + } + + return { + startState: function(base) { + return {tokenize: tokenBase, + baseIndent: base || 0, + _indent: []}; + }, + + token: function(stream, state) { + if (stream.eatSpace()) + return null; + + return (state.tokenize || tokenBase)(stream, state);; + }, + + indent: function(state, _textAfter) { + var length = state._indent.length; + if (_textAfter && (_textAfter[0] == "}")) + length--; + + if (length <0) + length = 0; + + return length * indentUnit; + }, + + electricChars: "}" + }; +}); + +CodeMirror.defineMIME("application/sieve", "sieve"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/smalltalk/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/smalltalk/index.html new file mode 100644 index 00000000..0d2b172e --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/smalltalk/index.html @@ -0,0 +1,68 @@ + + +CodeMirror: Smalltalk mode + + + + + + + + + + +
+

Smalltalk mode

+
+ + + +

Simple Smalltalk mode.

+ +

MIME types defined: text/x-stsrc.

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/smalltalk/smalltalk.js b/pitfall/pdfkit/node_modules/codemirror/mode/smalltalk/smalltalk.js new file mode 100644 index 00000000..f2d4cb31 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/smalltalk/smalltalk.js @@ -0,0 +1,151 @@ +CodeMirror.defineMode('smalltalk', function(config) { + + var specialChars = /[+\-\/\\*~<>=@%|&?!.,:;^]/; + var keywords = /true|false|nil|self|super|thisContext/; + + var Context = function(tokenizer, parent) { + this.next = tokenizer; + this.parent = parent; + }; + + var Token = function(name, context, eos) { + this.name = name; + this.context = context; + this.eos = eos; + }; + + var State = function() { + this.context = new Context(next, null); + this.expectVariable = true; + this.indentation = 0; + this.userIndentationDelta = 0; + }; + + State.prototype.userIndent = function(indentation) { + this.userIndentationDelta = indentation > 0 ? (indentation / config.indentUnit - this.indentation) : 0; + }; + + var next = function(stream, context, state) { + var token = new Token(null, context, false); + var aChar = stream.next(); + + if (aChar === '"') { + token = nextComment(stream, new Context(nextComment, context)); + + } else if (aChar === '\'') { + token = nextString(stream, new Context(nextString, context)); + + } else if (aChar === '#') { + if (stream.peek() === '\'') { + stream.next(); + token = nextSymbol(stream, new Context(nextSymbol, context)); + } else { + stream.eatWhile(/[^ .\[\]()]/); + token.name = 'string-2'; + } + + } else if (aChar === '$') { + if (stream.next() === '<') { + stream.eatWhile(/[^ >]/); + stream.next(); + } + token.name = 'string-2'; + + } else if (aChar === '|' && state.expectVariable) { + token.context = new Context(nextTemporaries, context); + + } else if (/[\[\]{}()]/.test(aChar)) { + token.name = 'bracket'; + token.eos = /[\[{(]/.test(aChar); + + if (aChar === '[') { + state.indentation++; + } else if (aChar === ']') { + state.indentation = Math.max(0, state.indentation - 1); + } + + } else if (specialChars.test(aChar)) { + stream.eatWhile(specialChars); + token.name = 'operator'; + token.eos = aChar !== ';'; // ; cascaded message expression + + } else if (/\d/.test(aChar)) { + stream.eatWhile(/[\w\d]/); + token.name = 'number'; + + } else if (/[\w_]/.test(aChar)) { + stream.eatWhile(/[\w\d_]/); + token.name = state.expectVariable ? (keywords.test(stream.current()) ? 'keyword' : 'variable') : null; + + } else { + token.eos = state.expectVariable; + } + + return token; + }; + + var nextComment = function(stream, context) { + stream.eatWhile(/[^"]/); + return new Token('comment', stream.eat('"') ? context.parent : context, true); + }; + + var nextString = function(stream, context) { + stream.eatWhile(/[^']/); + return new Token('string', stream.eat('\'') ? context.parent : context, false); + }; + + var nextSymbol = function(stream, context) { + stream.eatWhile(/[^']/); + return new Token('string-2', stream.eat('\'') ? context.parent : context, false); + }; + + var nextTemporaries = function(stream, context) { + var token = new Token(null, context, false); + var aChar = stream.next(); + + if (aChar === '|') { + token.context = context.parent; + token.eos = true; + + } else { + stream.eatWhile(/[^|]/); + token.name = 'variable'; + } + + return token; + }; + + return { + startState: function() { + return new State; + }, + + token: function(stream, state) { + state.userIndent(stream.indentation()); + + if (stream.eatSpace()) { + return null; + } + + var token = state.context.next(stream, state.context, state); + state.context = token.context; + state.expectVariable = token.eos; + + return token.name; + }, + + blankLine: function(state) { + state.userIndent(0); + }, + + indent: function(state, textAfter) { + var i = state.context.next === next && textAfter && textAfter.charAt(0) === ']' ? -1 : state.userIndentationDelta; + return (state.indentation + i) * config.indentUnit; + }, + + electricChars: ']' + }; + +}); + +CodeMirror.defineMIME('text/x-stsrc', {name: 'smalltalk'}); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/smarty/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/smarty/index.html new file mode 100644 index 00000000..d458aef0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/smarty/index.html @@ -0,0 +1,136 @@ + + +CodeMirror: Smarty mode + + + + + + + + + +
+

Smarty mode

+
+ + + +
+ +

Smarty 2, custom delimiters

+
+ + + +
+ +

Smarty 3

+ + + + + + +

A plain text/Smarty version 2 or 3 mode, which allows for custom delimiter tags.

+ +

MIME types defined: text/x-smarty

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/smarty/smarty.js b/pitfall/pdfkit/node_modules/codemirror/mode/smarty/smarty.js new file mode 100644 index 00000000..826c2b96 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/smarty/smarty.js @@ -0,0 +1,205 @@ +/** + * Smarty 2 and 3 mode. + */ +CodeMirror.defineMode("smarty", function(config) { + "use strict"; + + // our default settings; check to see if they're overridden + var settings = { + rightDelimiter: '}', + leftDelimiter: '{', + smartyVersion: 2 // for backward compatibility + }; + if (config.hasOwnProperty("leftDelimiter")) { + settings.leftDelimiter = config.leftDelimiter; + } + if (config.hasOwnProperty("rightDelimiter")) { + settings.rightDelimiter = config.rightDelimiter; + } + if (config.hasOwnProperty("smartyVersion") && config.smartyVersion === 3) { + settings.smartyVersion = 3; + } + + var keyFunctions = ["debug", "extends", "function", "include", "literal"]; + var last; + var regs = { + operatorChars: /[+\-*&%=<>!?]/, + validIdentifier: /[a-zA-Z0-9_]/, + stringChar: /['"]/ + }; + + var helpers = { + cont: function(style, lastType) { + last = lastType; + return style; + }, + chain: function(stream, state, parser) { + state.tokenize = parser; + return parser(stream, state); + } + }; + + + // our various parsers + var parsers = { + + // the main tokenizer + tokenizer: function(stream, state) { + if (stream.match(settings.leftDelimiter, true)) { + if (stream.eat("*")) { + return helpers.chain(stream, state, parsers.inBlock("comment", "*" + settings.rightDelimiter)); + } else { + // Smarty 3 allows { and } surrounded by whitespace to NOT slip into Smarty mode + state.depth++; + var isEol = stream.eol(); + var isFollowedByWhitespace = /\s/.test(stream.peek()); + if (settings.smartyVersion === 3 && settings.leftDelimiter === "{" && (isEol || isFollowedByWhitespace)) { + state.depth--; + return null; + } else { + state.tokenize = parsers.smarty; + last = "startTag"; + return "tag"; + } + } + } else { + stream.next(); + return null; + } + }, + + // parsing Smarty content + smarty: function(stream, state) { + if (stream.match(settings.rightDelimiter, true)) { + if (settings.smartyVersion === 3) { + state.depth--; + if (state.depth <= 0) { + state.tokenize = parsers.tokenizer; + } + } else { + state.tokenize = parsers.tokenizer; + } + return helpers.cont("tag", null); + } + + if (stream.match(settings.leftDelimiter, true)) { + state.depth++; + return helpers.cont("tag", "startTag"); + } + + var ch = stream.next(); + if (ch == "$") { + stream.eatWhile(regs.validIdentifier); + return helpers.cont("variable-2", "variable"); + } else if (ch == "|") { + return helpers.cont("operator", "pipe"); + } else if (ch == ".") { + return helpers.cont("operator", "property"); + } else if (regs.stringChar.test(ch)) { + state.tokenize = parsers.inAttribute(ch); + return helpers.cont("string", "string"); + } else if (regs.operatorChars.test(ch)) { + stream.eatWhile(regs.operatorChars); + return helpers.cont("operator", "operator"); + } else if (ch == "[" || ch == "]") { + return helpers.cont("bracket", "bracket"); + } else if (ch == "(" || ch == ")") { + return helpers.cont("bracket", "operator"); + } else if (/\d/.test(ch)) { + stream.eatWhile(/\d/); + return helpers.cont("number", "number"); + } else { + + if (state.last == "variable") { + if (ch == "@") { + stream.eatWhile(regs.validIdentifier); + return helpers.cont("property", "property"); + } else if (ch == "|") { + stream.eatWhile(regs.validIdentifier); + return helpers.cont("qualifier", "modifier"); + } + } else if (state.last == "pipe") { + stream.eatWhile(regs.validIdentifier); + return helpers.cont("qualifier", "modifier"); + } else if (state.last == "whitespace") { + stream.eatWhile(regs.validIdentifier); + return helpers.cont("attribute", "modifier"); + } if (state.last == "property") { + stream.eatWhile(regs.validIdentifier); + return helpers.cont("property", null); + } else if (/\s/.test(ch)) { + last = "whitespace"; + return null; + } + + var str = ""; + if (ch != "/") { + str += ch; + } + var c = null; + while (c = stream.eat(regs.validIdentifier)) { + str += c; + } + for (var i=0, j=keyFunctions.length; i + +CodeMirror: Smarty mixed mode + + + + + + + + + + + + + +
+

Smarty mixed mode

+
+ + + +

The Smarty mixed mode depends on the Smarty and HTML mixed modes. HTML + mixed mode itself depends on XML, JavaScript, and CSS modes.

+ +

It takes the same options, as Smarty and HTML mixed modes.

+ +

MIME types defined: text/x-smarty.

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/smartymixed/smartymixed.js b/pitfall/pdfkit/node_modules/codemirror/mode/smartymixed/smartymixed.js new file mode 100755 index 00000000..a033ab04 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/smartymixed/smartymixed.js @@ -0,0 +1,175 @@ +/** +* @file smartymixed.js +* @brief Smarty Mixed Codemirror mode (Smarty + Mixed HTML) +* @author Ruslan Osmanov +* @version 3.0 +* @date 05.07.2013 +*/ +CodeMirror.defineMode("smartymixed", function(config) { + var settings, regs, helpers, parsers, + htmlMixedMode = CodeMirror.getMode(config, "htmlmixed"), + smartyMode = CodeMirror.getMode(config, "smarty"), + + settings = { + rightDelimiter: '}', + leftDelimiter: '{' + }; + + if (config.hasOwnProperty("leftDelimiter")) { + settings.leftDelimiter = config.leftDelimiter; + } + if (config.hasOwnProperty("rightDelimiter")) { + settings.rightDelimiter = config.rightDelimiter; + } + + regs = { + smartyComment: new RegExp("^" + settings.leftDelimiter + "\\*"), + literalOpen: new RegExp(settings.leftDelimiter + "literal" + settings.rightDelimiter), + literalClose: new RegExp(settings.leftDelimiter + "\/literal" + settings.rightDelimiter), + hasLeftDelimeter: new RegExp(".*" + settings.leftDelimiter), + htmlHasLeftDelimeter: new RegExp("[^<>]*" + settings.leftDelimiter) + }; + + helpers = { + chain: function(stream, state, parser) { + state.tokenize = parser; + return parser(stream, state); + }, + + cleanChain: function(stream, state, parser) { + state.tokenize = null; + state.localState = null; + state.localMode = null; + return (typeof parser == "string") ? (parser ? parser : null) : parser(stream, state); + }, + + maybeBackup: function(stream, pat, style) { + var cur = stream.current(); + var close = cur.search(pat), + m; + if (close > - 1) stream.backUp(cur.length - close); + else if (m = cur.match(/<\/?$/)) { + stream.backUp(cur.length); + if (!stream.match(pat, false)) stream.match(cur[0]); + } + return style; + } + }; + + parsers = { + html: function(stream, state) { + if (!state.inLiteral && stream.match(regs.htmlHasLeftDelimeter, false) && state.htmlMixedState.htmlState.tagName === null) { + state.tokenize = parsers.smarty; + state.localMode = smartyMode; + state.localState = smartyMode.startState(htmlMixedMode.indent(state.htmlMixedState, "")); + return helpers.maybeBackup(stream, settings.leftDelimiter, smartyMode.token(stream, state.localState)); + } else if (!state.inLiteral && stream.match(settings.leftDelimiter, false)) { + state.tokenize = parsers.smarty; + state.localMode = smartyMode; + state.localState = smartyMode.startState(htmlMixedMode.indent(state.htmlMixedState, "")); + return helpers.maybeBackup(stream, settings.leftDelimiter, smartyMode.token(stream, state.localState)); + } + return htmlMixedMode.token(stream, state.htmlMixedState); + }, + + smarty: function(stream, state) { + if (stream.match(settings.leftDelimiter, false)) { + if (stream.match(regs.smartyComment, false)) { + return helpers.chain(stream, state, parsers.inBlock("comment", "*" + settings.rightDelimiter)); + } + } else if (stream.match(settings.rightDelimiter, false)) { + stream.eat(settings.rightDelimiter); + state.tokenize = parsers.html; + state.localMode = htmlMixedMode; + state.localState = state.htmlMixedState; + return "tag"; + } + + return helpers.maybeBackup(stream, settings.rightDelimiter, smartyMode.token(stream, state.localState)); + }, + + inBlock: function(style, terminator) { + return function(stream, state) { + while (!stream.eol()) { + if (stream.match(terminator)) { + helpers.cleanChain(stream, state, ""); + break; + } + stream.next(); + } + return style; + }; + } + }; + + return { + startState: function() { + var state = htmlMixedMode.startState(); + return { + token: parsers.html, + localMode: null, + localState: null, + htmlMixedState: state, + tokenize: null, + inLiteral: false + }; + }, + + copyState: function(state) { + var local = null, tok = (state.tokenize || state.token); + if (state.localState) { + local = CodeMirror.copyState((tok != parsers.html ? smartyMode : htmlMixedMode), state.localState); + } + return { + token: state.token, + tokenize: state.tokenize, + localMode: state.localMode, + localState: local, + htmlMixedState: CodeMirror.copyState(htmlMixedMode, state.htmlMixedState), + inLiteral: state.inLiteral + }; + }, + + token: function(stream, state) { + if (stream.match(settings.leftDelimiter, false)) { + if (!state.inLiteral && stream.match(regs.literalOpen, true)) { + state.inLiteral = true; + return "keyword"; + } else if (state.inLiteral && stream.match(regs.literalClose, true)) { + state.inLiteral = false; + return "keyword"; + } + } + if (state.inLiteral && state.localState != state.htmlMixedState) { + state.tokenize = parsers.html; + state.localMode = htmlMixedMode; + state.localState = state.htmlMixedState; + } + + var style = (state.tokenize || state.token)(stream, state); + return style; + }, + + indent: function(state, textAfter) { + if (state.localMode == smartyMode + || (state.inLiteral && !state.localMode) + || regs.hasLeftDelimeter.test(textAfter)) { + return CodeMirror.Pass; + } + return htmlMixedMode.indent(state.htmlMixedState, textAfter); + }, + + electricChars: "/{}:", + + innerMode: function(state) { + return { + state: state.localState || state.htmlMixedState, + mode: state.localMode || htmlMixedMode + }; + } + }; +}, +"htmlmixed"); + +CodeMirror.defineMIME("text/x-smarty", "smartymixed"); +// vim: et ts=2 sts=2 sw=2 diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/sparql/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/sparql/index.html new file mode 100644 index 00000000..7c41e17b --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/sparql/index.html @@ -0,0 +1,54 @@ + + +CodeMirror: SPARQL mode + + + + + + + + + + +
+

SPARQL mode

+
+ + +

MIME types defined: application/x-sparql-query.

+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/sparql/sparql.js b/pitfall/pdfkit/node_modules/codemirror/mode/sparql/sparql.js new file mode 100644 index 00000000..0329057f --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/sparql/sparql.js @@ -0,0 +1,145 @@ +CodeMirror.defineMode("sparql", function(config) { + var indentUnit = config.indentUnit; + var curPunc; + + function wordRegexp(words) { + return new RegExp("^(?:" + words.join("|") + ")$", "i"); + } + var ops = wordRegexp(["str", "lang", "langmatches", "datatype", "bound", "sameterm", "isiri", "isuri", + "isblank", "isliteral", "a"]); + var keywords = wordRegexp(["base", "prefix", "select", "distinct", "reduced", "construct", "describe", + "ask", "from", "named", "where", "order", "limit", "offset", "filter", "optional", + "graph", "by", "asc", "desc", "as", "having", "undef", "values", "group", + "minus", "in", "not", "service", "silent", "using", "insert", "delete", "union", + "data", "copy", "to", "move", "add", "create", "drop", "clear", "load"]); + var operatorChars = /[*+\-<>=&|]/; + + function tokenBase(stream, state) { + var ch = stream.next(); + curPunc = null; + if (ch == "$" || ch == "?") { + stream.match(/^[\w\d]*/); + return "variable-2"; + } + else if (ch == "<" && !stream.match(/^[\s\u00a0=]/, false)) { + stream.match(/^[^\s\u00a0>]*>?/); + return "atom"; + } + else if (ch == "\"" || ch == "'") { + state.tokenize = tokenLiteral(ch); + return state.tokenize(stream, state); + } + else if (/[{}\(\),\.;\[\]]/.test(ch)) { + curPunc = ch; + return null; + } + else if (ch == "#") { + stream.skipToEnd(); + return "comment"; + } + else if (operatorChars.test(ch)) { + stream.eatWhile(operatorChars); + return null; + } + else if (ch == ":") { + stream.eatWhile(/[\w\d\._\-]/); + return "atom"; + } + else { + stream.eatWhile(/[_\w\d]/); + if (stream.eat(":")) { + stream.eatWhile(/[\w\d_\-]/); + return "atom"; + } + var word = stream.current(); + if (ops.test(word)) + return null; + else if (keywords.test(word)) + return "keyword"; + else + return "variable"; + } + } + + function tokenLiteral(quote) { + return function(stream, state) { + var escaped = false, ch; + while ((ch = stream.next()) != null) { + if (ch == quote && !escaped) { + state.tokenize = tokenBase; + break; + } + escaped = !escaped && ch == "\\"; + } + return "string"; + }; + } + + function pushContext(state, type, col) { + state.context = {prev: state.context, indent: state.indent, col: col, type: type}; + } + function popContext(state) { + state.indent = state.context.indent; + state.context = state.context.prev; + } + + return { + startState: function() { + return {tokenize: tokenBase, + context: null, + indent: 0, + col: 0}; + }, + + token: function(stream, state) { + if (stream.sol()) { + if (state.context && state.context.align == null) state.context.align = false; + state.indent = stream.indentation(); + } + if (stream.eatSpace()) return null; + var style = state.tokenize(stream, state); + + if (style != "comment" && state.context && state.context.align == null && state.context.type != "pattern") { + state.context.align = true; + } + + if (curPunc == "(") pushContext(state, ")", stream.column()); + else if (curPunc == "[") pushContext(state, "]", stream.column()); + else if (curPunc == "{") pushContext(state, "}", stream.column()); + else if (/[\]\}\)]/.test(curPunc)) { + while (state.context && state.context.type == "pattern") popContext(state); + if (state.context && curPunc == state.context.type) popContext(state); + } + else if (curPunc == "." && state.context && state.context.type == "pattern") popContext(state); + else if (/atom|string|variable/.test(style) && state.context) { + if (/[\}\]]/.test(state.context.type)) + pushContext(state, "pattern", stream.column()); + else if (state.context.type == "pattern" && !state.context.align) { + state.context.align = true; + state.context.col = stream.column(); + } + } + + return style; + }, + + indent: function(state, textAfter) { + var firstChar = textAfter && textAfter.charAt(0); + var context = state.context; + if (/[\]\}]/.test(firstChar)) + while (context && context.type == "pattern") context = context.prev; + + var closing = context && firstChar == context.type; + if (!context) + return 0; + else if (context.type == "pattern") + return context.col; + else if (context.align) + return context.col + (closing ? 0 : 1); + else + return context.indent + (closing ? 0 : indentUnit); + } + }; +}); + +CodeMirror.defineMIME("application/x-sparql-query", "sparql"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/sql/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/sql/index.html new file mode 100644 index 00000000..e6882d79 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/sql/index.html @@ -0,0 +1,75 @@ + + +CodeMirror: SQL Mode for CodeMirror + + + + + + + + + +
+

SQL Mode for CodeMirror

+
+ +
+

MIME types defined: + text/x-sql, + text/x-mysql, + text/x-mariadb, + text/x-cassandra, + text/x-plsql, + text/x-mssql. +

+ + +
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/sql/sql.js b/pitfall/pdfkit/node_modules/codemirror/mode/sql/sql.js new file mode 100644 index 00000000..3be68caa --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/sql/sql.js @@ -0,0 +1,365 @@ +CodeMirror.defineMode("sql", function(config, parserConfig) { + "use strict"; + + var client = parserConfig.client || {}, + atoms = parserConfig.atoms || {"false": true, "true": true, "null": true}, + builtin = parserConfig.builtin || {}, + keywords = parserConfig.keywords || {}, + operatorChars = parserConfig.operatorChars || /^[*+\-%<>!=&|~^]/, + support = parserConfig.support || {}, + hooks = parserConfig.hooks || {}, + dateSQL = parserConfig.dateSQL || {"date" : true, "time" : true, "timestamp" : true}; + + function tokenBase(stream, state) { + var ch = stream.next(); + + // call hooks from the mime type + if (hooks[ch]) { + var result = hooks[ch](stream, state); + if (result !== false) return result; + } + + if (support.hexNumber == true && + ((ch == "0" && stream.match(/^[xX][0-9a-fA-F]+/)) + || (ch == "x" || ch == "X") && stream.match(/^'[0-9a-fA-F]+'/))) { + // hex + // ref: http://dev.mysql.com/doc/refman/5.5/en/hexadecimal-literals.html + return "number"; + } else if (support.binaryNumber == true && + (((ch == "b" || ch == "B") && stream.match(/^'[01]+'/)) + || (ch == "0" && stream.match(/^b[01]+/)))) { + // bitstring + // ref: http://dev.mysql.com/doc/refman/5.5/en/bit-field-literals.html + return "number"; + } else if (ch.charCodeAt(0) > 47 && ch.charCodeAt(0) < 58) { + // numbers + // ref: http://dev.mysql.com/doc/refman/5.5/en/number-literals.html + stream.match(/^[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?/); + support.decimallessFloat == true && stream.eat('.'); + return "number"; + } else if (ch == "?" && (stream.eatSpace() || stream.eol() || stream.eat(";"))) { + // placeholders + return "variable-3"; + } else if (ch == "'" || (ch == '"' && support.doubleQuote)) { + // strings + // ref: http://dev.mysql.com/doc/refman/5.5/en/string-literals.html + state.tokenize = tokenLiteral(ch); + return state.tokenize(stream, state); + } else if ((((support.nCharCast == true && (ch == "n" || ch == "N")) + || (support.charsetCast == true && ch == "_" && stream.match(/[a-z][a-z0-9]*/i))) + && (stream.peek() == "'" || stream.peek() == '"'))) { + // charset casting: _utf8'str', N'str', n'str' + // ref: http://dev.mysql.com/doc/refman/5.5/en/string-literals.html + return "keyword"; + } else if (/^[\(\),\;\[\]]/.test(ch)) { + // no highlightning + return null; + } else if (support.commentSlashSlash && ch == "/" && stream.eat("/")) { + // 1-line comment + stream.skipToEnd(); + return "comment"; + } else if ((support.commentHash && ch == "#") + || (ch == "-" && stream.eat("-") && (!support.commentSpaceRequired || stream.eat(" ")))) { + // 1-line comments + // ref: https://kb.askmonty.org/en/comment-syntax/ + stream.skipToEnd(); + return "comment"; + } else if (ch == "/" && stream.eat("*")) { + // multi-line comments + // ref: https://kb.askmonty.org/en/comment-syntax/ + state.tokenize = tokenComment; + return state.tokenize(stream, state); + } else if (ch == ".") { + // .1 for 0.1 + if (support.zerolessFloat == true && stream.match(/^(?:\d+(?:e[+-]?\d+)?)/i)) { + return "number"; + } + // .table_name (ODBC) + // // ref: http://dev.mysql.com/doc/refman/5.6/en/identifier-qualifiers.html + if (support.ODBCdotTable == true && stream.match(/^[a-zA-Z_]+/)) { + return "variable-2"; + } + } else if (operatorChars.test(ch)) { + // operators + stream.eatWhile(operatorChars); + return null; + } else if (ch == '{' && + (stream.match(/^( )*(d|D|t|T|ts|TS)( )*'[^']*'( )*}/) || stream.match(/^( )*(d|D|t|T|ts|TS)( )*"[^"]*"( )*}/))) { + // dates (weird ODBC syntax) + // ref: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-literals.html + return "number"; + } else { + stream.eatWhile(/^[_\w\d]/); + var word = stream.current().toLowerCase(); + // dates (standard SQL syntax) + // ref: http://dev.mysql.com/doc/refman/5.5/en/date-and-time-literals.html + if (dateSQL.hasOwnProperty(word) && (stream.match(/^( )+'[^']*'/) || stream.match(/^( )+"[^"]*"/))) + return "number"; + if (atoms.hasOwnProperty(word)) return "atom"; + if (builtin.hasOwnProperty(word)) return "builtin"; + if (keywords.hasOwnProperty(word)) return "keyword"; + if (client.hasOwnProperty(word)) return "string-2"; + return null; + } + } + + // 'string', with char specified in quote escaped by '\' + function tokenLiteral(quote) { + return function(stream, state) { + var escaped = false, ch; + while ((ch = stream.next()) != null) { + if (ch == quote && !escaped) { + state.tokenize = tokenBase; + break; + } + escaped = !escaped && ch == "\\"; + } + return "string"; + }; + } + function tokenComment(stream, state) { + while (true) { + if (stream.skipTo("*")) { + stream.next(); + if (stream.eat("/")) { + state.tokenize = tokenBase; + break; + } + } else { + stream.skipToEnd(); + break; + } + } + return "comment"; + } + + function pushContext(stream, state, type) { + state.context = { + prev: state.context, + indent: stream.indentation(), + col: stream.column(), + type: type + }; + } + + function popContext(state) { + state.indent = state.context.indent; + state.context = state.context.prev; + } + + return { + startState: function() { + return {tokenize: tokenBase, context: null}; + }, + + token: function(stream, state) { + if (stream.sol()) { + if (state.context && state.context.align == null) + state.context.align = false; + } + if (stream.eatSpace()) return null; + + var style = state.tokenize(stream, state); + if (style == "comment") return style; + + if (state.context && state.context.align == null) + state.context.align = true; + + var tok = stream.current(); + if (tok == "(") + pushContext(stream, state, ")"); + else if (tok == "[") + pushContext(stream, state, "]"); + else if (state.context && state.context.type == tok) + popContext(state); + return style; + }, + + indent: function(state, textAfter) { + var cx = state.context; + if (!cx) return CodeMirror.Pass; + if (cx.align) return cx.col + (textAfter.charAt(0) == cx.type ? 0 : 1); + else return cx.indent + config.indentUnit; + }, + + blockCommentStart: "/*", + blockCommentEnd: "*/", + lineComment: support.commentSlashSlash ? "//" : support.commentHash ? "#" : null + }; +}); + +(function() { + "use strict"; + + // `identifier` + function hookIdentifier(stream) { + // MySQL/MariaDB identifiers + // ref: http://dev.mysql.com/doc/refman/5.6/en/identifier-qualifiers.html + var ch; + while ((ch = stream.next()) != null) { + if (ch == "`" && !stream.eat("`")) return "variable-2"; + } + return null; + } + + // variable token + function hookVar(stream) { + // variables + // @@prefix.varName @varName + // varName can be quoted with ` or ' or " + // ref: http://dev.mysql.com/doc/refman/5.5/en/user-variables.html + if (stream.eat("@")) { + stream.match(/^session\./); + stream.match(/^local\./); + stream.match(/^global\./); + } + + if (stream.eat("'")) { + stream.match(/^.*'/); + return "variable-2"; + } else if (stream.eat('"')) { + stream.match(/^.*"/); + return "variable-2"; + } else if (stream.eat("`")) { + stream.match(/^.*`/); + return "variable-2"; + } else if (stream.match(/^[0-9a-zA-Z$\.\_]+/)) { + return "variable-2"; + } + return null; + }; + + // short client keyword token + function hookClient(stream) { + // \N means NULL + // ref: http://dev.mysql.com/doc/refman/5.5/en/null-values.html + if (stream.eat("N")) { + return "atom"; + } + // \g, etc + // ref: http://dev.mysql.com/doc/refman/5.5/en/mysql-commands.html + return stream.match(/^[a-zA-Z.#!?]/) ? "variable-2" : null; + } + + // these keywords are used by all SQL dialects (however, a mode can still overwrite it) + var sqlKeywords = "alter and as asc between by count create delete desc distinct drop from having in insert into is join like not on or order select set table union update values where "; + + // turn a space-separated list into an array + function set(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + + // A generic SQL Mode. It's not a standard, it just try to support what is generally supported + CodeMirror.defineMIME("text/x-sql", { + name: "sql", + keywords: set(sqlKeywords + "begin"), + builtin: set("bool boolean bit blob enum long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision real date datetime year unsigned signed decimal numeric"), + atoms: set("false true null unknown"), + operatorChars: /^[*+\-%<>!=]/, + dateSQL: set("date time timestamp"), + support: set("ODBCdotTable doubleQuote binaryNumber hexNumber") + }); + + CodeMirror.defineMIME("text/x-mssql", { + name: "sql", + client: set("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"), + keywords: set(sqlKeywords + "begin trigger proc view index for add constraint key primary foreign collate clustered nonclustered"), + builtin: set("bigint numeric bit smallint decimal smallmoney int tinyint money float real char varchar text nchar nvarchar ntext binary varbinary image cursor timestamp hierarchyid uniqueidentifier sql_variant xml table "), + atoms: set("false true null unknown"), + operatorChars: /^[*+\-%<>!=]/, + dateSQL: set("date datetimeoffset datetime2 smalldatetime datetime time"), + hooks: { + "@": hookVar + } + }); + + CodeMirror.defineMIME("text/x-mysql", { + name: "sql", + client: set("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"), + keywords: set(sqlKeywords + "accessible action add after algorithm all analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general get global grant grants group groupby_concat handler hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show signal slave slow smallint snapshot soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"), + builtin: set("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"), + atoms: set("false true null unknown"), + operatorChars: /^[*+\-%<>!=&|^]/, + dateSQL: set("date time timestamp"), + support: set("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"), + hooks: { + "@": hookVar, + "`": hookIdentifier, + "\\": hookClient + } + }); + + CodeMirror.defineMIME("text/x-mariadb", { + name: "sql", + client: set("charset clear connect edit ego exit go help nopager notee nowarning pager print prompt quit rehash source status system tee"), + keywords: set(sqlKeywords + "accessible action add after algorithm all always analyze asensitive at authors auto_increment autocommit avg avg_row_length before binary binlog both btree cache call cascade cascaded case catalog_name chain change changed character check checkpoint checksum class_origin client_statistics close coalesce code collate collation collations column columns comment commit committed completion concurrent condition connection consistent constraint contains continue contributors convert cross current current_date current_time current_timestamp current_user cursor data database databases day_hour day_microsecond day_minute day_second deallocate dec declare default delay_key_write delayed delimiter des_key_file describe deterministic dev_pop dev_samp deviance diagnostics directory disable discard distinctrow div dual dumpfile each elseif enable enclosed end ends engine engines enum errors escape escaped even event events every execute exists exit explain extended fast fetch field fields first flush for force foreign found_rows full fulltext function general generated get global grant grants group groupby_concat handler hard hash help high_priority hosts hour_microsecond hour_minute hour_second if ignore ignore_server_ids import index index_statistics infile inner innodb inout insensitive insert_method install interval invoker isolation iterate key keys kill language last leading leave left level limit linear lines list load local localtime localtimestamp lock logs low_priority master master_heartbeat_period master_ssl_verify_server_cert masters match max max_rows maxvalue message_text middleint migrate min min_rows minute_microsecond minute_second mod mode modifies modify mutex mysql_errno natural next no no_write_to_binlog offline offset one online open optimize option optionally out outer outfile pack_keys parser partition partitions password persistent phase plugin plugins prepare preserve prev primary privileges procedure processlist profile profiles purge query quick range read read_write reads real rebuild recover references regexp relaylog release remove rename reorganize repair repeatable replace require resignal restrict resume return returns revoke right rlike rollback rollup row row_format rtree savepoint schedule schema schema_name schemas second_microsecond security sensitive separator serializable server session share show shutdown signal slave slow smallint snapshot soft soname spatial specific sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_no_cache sql_small_result sqlexception sqlstate sqlwarning ssl start starting starts status std stddev stddev_pop stddev_samp storage straight_join subclass_origin sum suspend table_name table_statistics tables tablespace temporary terminated to trailing transaction trigger triggers truncate uncommitted undo uninstall unique unlock upgrade usage use use_frm user user_resources user_statistics using utc_date utc_time utc_timestamp value variables varying view views virtual warnings when while with work write xa xor year_month zerofill begin do then else loop repeat"), + builtin: set("bool boolean bit blob decimal double float long longblob longtext medium mediumblob mediumint mediumtext time timestamp tinyblob tinyint tinytext text bigint int int1 int2 int3 int4 int8 integer float float4 float8 double char varbinary varchar varcharacter precision date datetime year unsigned signed numeric"), + atoms: set("false true null unknown"), + operatorChars: /^[*+\-%<>!=&|^]/, + dateSQL: set("date time timestamp"), + support: set("ODBCdotTable decimallessFloat zerolessFloat binaryNumber hexNumber doubleQuote nCharCast charsetCast commentHash commentSpaceRequired"), + hooks: { + "@": hookVar, + "`": hookIdentifier, + "\\": hookClient + } + }); + + // the query language used by Apache Cassandra is called CQL, but this mime type + // is called Cassandra to avoid confusion with Contextual Query Language + CodeMirror.defineMIME("text/x-cassandra", { + name: "sql", + client: { }, + keywords: set("use select from using consistency where limit first reversed first and in insert into values using consistency ttl update set delete truncate begin batch apply create keyspace with columnfamily primary key index on drop alter type add any one quorum all local_quorum each_quorum"), + builtin: set("ascii bigint blob boolean counter decimal double float int text timestamp uuid varchar varint"), + atoms: set("false true"), + operatorChars: /^[<>=]/, + dateSQL: { }, + support: set("commentSlashSlash decimallessFloat"), + hooks: { } + }); + + // this is based on Peter Raganitsch's 'plsql' mode + CodeMirror.defineMIME("text/x-plsql", { + name: "sql", + client: set("appinfo arraysize autocommit autoprint autorecovery autotrace blockterminator break btitle cmdsep colsep compatibility compute concat copycommit copytypecheck define describe echo editfile embedded escape exec execute feedback flagger flush heading headsep instance linesize lno loboffset logsource long longchunksize markup native newpage numformat numwidth pagesize pause pno recsep recsepchar release repfooter repheader serveroutput shiftinout show showmode size spool sqlblanklines sqlcase sqlcode sqlcontinue sqlnumber sqlpluscompatibility sqlprefix sqlprompt sqlterminator suffix tab term termout time timing trimout trimspool ttitle underline verify version wrap"), + keywords: set("abort accept access add all alter and any array arraylen as asc assert assign at attributes audit authorization avg base_table begin between binary_integer body boolean by case cast char char_base check close cluster clusters colauth column comment commit compress connect connected constant constraint crash create current currval cursor data_base database date dba deallocate debugoff debugon decimal declare default definition delay delete desc digits dispose distinct do drop else elsif enable end entry escape exception exception_init exchange exclusive exists exit external fast fetch file for force form from function generic goto grant group having identified if immediate in increment index indexes indicator initial initrans insert interface intersect into is key level library like limited local lock log logging long loop master maxextents maxtrans member minextents minus mislabel mode modify multiset new next no noaudit nocompress nologging noparallel not nowait number_base object of off offline on online only open option or order out package parallel partition pctfree pctincrease pctused pls_integer positive positiven pragma primary prior private privileges procedure public raise range raw read rebuild record ref references refresh release rename replace resource restrict return returning reverse revoke rollback row rowid rowlabel rownum rows run savepoint schema segment select separate session set share snapshot some space split sql start statement storage subtype successful synonym tabauth table tables tablespace task terminate then to trigger truncate type union unique unlimited unrecoverable unusable update use using validate value values variable view views when whenever where while with work"), + builtin: set("bfile blob character clob dec float int integer mlslabel natural naturaln nchar nclob number numeric nvarchar2 real rowtype signtype smallint string varchar varchar2 abs acos add_months ascii asin atan atan2 average bfilename ceil chartorowid chr concat convert cos cosh count decode deref dual dump dup_val_on_index empty error exp false floor found glb greatest hextoraw initcap instr instrb isopen last_day least lenght lenghtb ln lower lpad ltrim lub make_ref max min mod months_between new_time next_day nextval nls_charset_decl_len nls_charset_id nls_charset_name nls_initcap nls_lower nls_sort nls_upper nlssort no_data_found notfound null nvl others power rawtohex reftohex round rowcount rowidtochar rpad rtrim sign sin sinh soundex sqlcode sqlerrm sqrt stddev substr substrb sum sysdate tan tanh to_char to_date to_label to_multi_byte to_number to_single_byte translate true trunc uid upper user userenv variance vsize"), + operatorChars: /^[*+\-%<>!=~]/, + dateSQL: set("date time timestamp"), + support: set("doubleQuote nCharCast zerolessFloat binaryNumber hexNumber") + }); +}()); + +/* + How Properties of Mime Types are used by SQL Mode + ================================================= + + keywords: + A list of keywords you want to be highlighted. + functions: + A list of function names you want to be highlighted. + builtin: + A list of builtin types you want to be highlighted (if you want types to be of class "builtin" instead of "keyword"). + operatorChars: + All characters that must be handled as operators. + client: + Commands parsed and executed by the client (not the server). + support: + A list of supported syntaxes which are not common, but are supported by more than 1 DBMS. + * ODBCdotTable: .tableName + * zerolessFloat: .1 + * doubleQuote + * nCharCast: N'string' + * charsetCast: _utf8'string' + * commentHash: use # char for comments + * commentSlashSlash: use // for comments + * commentSpaceRequired: require a space after -- for comments + atoms: + Keywords that must be highlighted as atoms,. Some DBMS's support more atoms than others: + UNKNOWN, INFINITY, UNDERFLOW, NaN... + dateSQL: + Used for date/time SQL standard syntax, because not all DBMS's support same temporal types. +*/ diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/stex/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/stex/index.html new file mode 100644 index 00000000..28b8f64b --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/stex/index.html @@ -0,0 +1,110 @@ + + +CodeMirror: sTeX mode + + + + + + + + + +
+

sTeX mode

+
+ + +

MIME types defined: text/x-stex.

+ +

Parsing/Highlighting Tests: normal, verbose.

+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/stex/stex.js b/pitfall/pdfkit/node_modules/codemirror/mode/stex/stex.js new file mode 100644 index 00000000..ca04c24f --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/stex/stex.js @@ -0,0 +1,246 @@ +/* + * Author: Constantin Jucovschi (c.jucovschi@jacobs-university.de) + * Licence: MIT + */ + +CodeMirror.defineMode("stex", function() { + "use strict"; + + function pushCommand(state, command) { + state.cmdState.push(command); + } + + function peekCommand(state) { + if (state.cmdState.length > 0) { + return state.cmdState[state.cmdState.length - 1]; + } else { + return null; + } + } + + function popCommand(state) { + var plug = state.cmdState.pop(); + if (plug) { + plug.closeBracket(); + } + } + + // returns the non-default plugin closest to the end of the list + function getMostPowerful(state) { + var context = state.cmdState; + for (var i = context.length - 1; i >= 0; i--) { + var plug = context[i]; + if (plug.name == "DEFAULT") { + continue; + } + return plug; + } + return { styleIdentifier: function() { return null; } }; + } + + function addPluginPattern(pluginName, cmdStyle, styles) { + return function () { + this.name = pluginName; + this.bracketNo = 0; + this.style = cmdStyle; + this.styles = styles; + this.argument = null; // \begin and \end have arguments that follow. These are stored in the plugin + + this.styleIdentifier = function() { + return this.styles[this.bracketNo - 1] || null; + }; + this.openBracket = function() { + this.bracketNo++; + return "bracket"; + }; + this.closeBracket = function() {}; + }; + } + + var plugins = {}; + + plugins["importmodule"] = addPluginPattern("importmodule", "tag", ["string", "builtin"]); + plugins["documentclass"] = addPluginPattern("documentclass", "tag", ["", "atom"]); + plugins["usepackage"] = addPluginPattern("usepackage", "tag", ["atom"]); + plugins["begin"] = addPluginPattern("begin", "tag", ["atom"]); + plugins["end"] = addPluginPattern("end", "tag", ["atom"]); + + plugins["DEFAULT"] = function () { + this.name = "DEFAULT"; + this.style = "tag"; + + this.styleIdentifier = this.openBracket = this.closeBracket = function() {}; + }; + + function setState(state, f) { + state.f = f; + } + + // called when in a normal (no environment) context + function normal(source, state) { + var plug; + // Do we look like '\command' ? If so, attempt to apply the plugin 'command' + if (source.match(/^\\[a-zA-Z@]+/)) { + var cmdName = source.current().slice(1); + plug = plugins[cmdName] || plugins["DEFAULT"]; + plug = new plug(); + pushCommand(state, plug); + setState(state, beginParams); + return plug.style; + } + + // escape characters + if (source.match(/^\\[$&%#{}_]/)) { + return "tag"; + } + + // white space control characters + if (source.match(/^\\[,;!\/\\]/)) { + return "tag"; + } + + // find if we're starting various math modes + if (source.match("\\[")) { + setState(state, function(source, state){ return inMathMode(source, state, "\\]"); }); + return "keyword"; + } + if (source.match("$$")) { + setState(state, function(source, state){ return inMathMode(source, state, "$$"); }); + return "keyword"; + } + if (source.match("$")) { + setState(state, function(source, state){ return inMathMode(source, state, "$"); }); + return "keyword"; + } + + var ch = source.next(); + if (ch == "%") { + // special case: % at end of its own line; stay in same state + if (!source.eol()) { + setState(state, inCComment); + } + return "comment"; + } + else if (ch == '}' || ch == ']') { + plug = peekCommand(state); + if (plug) { + plug.closeBracket(ch); + setState(state, beginParams); + } else { + return "error"; + } + return "bracket"; + } else if (ch == '{' || ch == '[') { + plug = plugins["DEFAULT"]; + plug = new plug(); + pushCommand(state, plug); + return "bracket"; + } + else if (/\d/.test(ch)) { + source.eatWhile(/[\w.%]/); + return "atom"; + } + else { + source.eatWhile(/[\w\-_]/); + plug = getMostPowerful(state); + if (plug.name == 'begin') { + plug.argument = source.current(); + } + return plug.styleIdentifier(); + } + } + + function inCComment(source, state) { + source.skipToEnd(); + setState(state, normal); + return "comment"; + } + + function inMathMode(source, state, endModeSeq) { + if (source.eatSpace()) { + return null; + } + if (source.match(endModeSeq)) { + setState(state, normal); + return "keyword"; + } + if (source.match(/^\\[a-zA-Z@]+/)) { + return "tag"; + } + if (source.match(/^[a-zA-Z]+/)) { + return "variable-2"; + } + // escape characters + if (source.match(/^\\[$&%#{}_]/)) { + return "tag"; + } + // white space control characters + if (source.match(/^\\[,;!\/]/)) { + return "tag"; + } + // special math-mode characters + if (source.match(/^[\^_&]/)) { + return "tag"; + } + // non-special characters + if (source.match(/^[+\-<>|=,\/@!*:;'"`~#?]/)) { + return null; + } + if (source.match(/^(\d+\.\d*|\d*\.\d+|\d+)/)) { + return "number"; + } + var ch = source.next(); + if (ch == "{" || ch == "}" || ch == "[" || ch == "]" || ch == "(" || ch == ")") { + return "bracket"; + } + + // eat comments here, because inCComment returns us to normal state! + if (ch == "%") { + if (!source.eol()) { + source.skipToEnd(); + } + return "comment"; + } + return "error"; + } + + function beginParams(source, state) { + var ch = source.peek(), lastPlug; + if (ch == '{' || ch == '[') { + lastPlug = peekCommand(state); + lastPlug.openBracket(ch); + source.eat(ch); + setState(state, normal); + return "bracket"; + } + if (/[ \t\r]/.test(ch)) { + source.eat(ch); + return null; + } + setState(state, normal); + popCommand(state); + + return normal(source, state); + } + + return { + startState: function() { + return { + cmdState: [], + f: normal + }; + }, + copyState: function(s) { + return { + cmdState: s.cmdState.slice(), + f: s.f + }; + }, + token: function(stream, state) { + return state.f(stream, state); + } + }; +}); + +CodeMirror.defineMIME("text/x-stex", "stex"); +CodeMirror.defineMIME("text/x-latex", "stex"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/stex/test.js b/pitfall/pdfkit/node_modules/codemirror/mode/stex/test.js new file mode 100644 index 00000000..ab629e81 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/stex/test.js @@ -0,0 +1,120 @@ +(function() { + var mode = CodeMirror.getMode({tabSize: 4}, "stex"); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } + + MT("word", + "foo"); + + MT("twoWords", + "foo bar"); + + MT("beginEndDocument", + "[tag \\begin][bracket {][atom document][bracket }]", + "[tag \\end][bracket {][atom document][bracket }]"); + + MT("beginEndEquation", + "[tag \\begin][bracket {][atom equation][bracket }]", + " E=mc^2", + "[tag \\end][bracket {][atom equation][bracket }]"); + + MT("beginModule", + "[tag \\begin][bracket {][atom module][bracket }[[]]]"); + + MT("beginModuleId", + "[tag \\begin][bracket {][atom module][bracket }[[]id=bbt-size[bracket ]]]"); + + MT("importModule", + "[tag \\importmodule][bracket [[][string b-b-t][bracket ]]{][builtin b-b-t][bracket }]"); + + MT("importModulePath", + "[tag \\importmodule][bracket [[][tag \\KWARCslides][bracket {][string dmath/en/cardinality][bracket }]]{][builtin card][bracket }]"); + + MT("psForPDF", + "[tag \\PSforPDF][bracket [[][atom 1][bracket ]]{]#1[bracket }]"); + + MT("comment", + "[comment % foo]"); + + MT("tagComment", + "[tag \\item][comment % bar]"); + + MT("commentTag", + " [comment % \\item]"); + + MT("commentLineBreak", + "[comment %]", + "foo"); + + MT("tagErrorCurly", + "[tag \\begin][error }][bracket {]"); + + MT("tagErrorSquare", + "[tag \\item][error ]]][bracket {]"); + + MT("commentCurly", + "[comment % }]"); + + MT("tagHash", + "the [tag \\#] key"); + + MT("tagNumber", + "a [tag \\$][atom 5] stetson"); + + MT("tagPercent", + "[atom 100][tag \\%] beef"); + + MT("tagAmpersand", + "L [tag \\&] N"); + + MT("tagUnderscore", + "foo[tag \\_]bar"); + + MT("tagBracketOpen", + "[tag \\emph][bracket {][tag \\{][bracket }]"); + + MT("tagBracketClose", + "[tag \\emph][bracket {][tag \\}][bracket }]"); + + MT("tagLetterNumber", + "section [tag \\S][atom 1]"); + + MT("textTagNumber", + "para [tag \\P][atom 2]"); + + MT("thinspace", + "x[tag \\,]y"); + + MT("thickspace", + "x[tag \\;]y"); + + MT("negativeThinspace", + "x[tag \\!]y"); + + MT("periodNotSentence", + "J.\\ L.\\ is"); + + MT("periodSentence", + "X[tag \\@]. The"); + + MT("italicCorrection", + "[bracket {][tag \\em] If[tag \\/][bracket }] I"); + + MT("tagBracket", + "[tag \\newcommand][bracket {][tag \\pop][bracket }]"); + + MT("inlineMathTagFollowedByNumber", + "[keyword $][tag \\pi][number 2][keyword $]"); + + MT("inlineMath", + "[keyword $][number 3][variable-2 x][tag ^][number 2.45]-[tag \\sqrt][bracket {][tag \\$\\alpha][bracket }] = [number 2][keyword $] other text"); + + MT("displayMath", + "More [keyword $$]\t[variable-2 S][tag ^][variable-2 n][tag \\sum] [variable-2 i][keyword $$] other text"); + + MT("mathWithComment", + "[keyword $][variable-2 x] [comment % $]", + "[variable-2 y][keyword $] other text"); + + MT("lineBreakArgument", + "[tag \\\\][bracket [[][atom 1cm][bracket ]]]"); +})(); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/tcl/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/tcl/index.html new file mode 100644 index 00000000..2c0d1a2d --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/tcl/index.html @@ -0,0 +1,143 @@ + + +CodeMirror: Tcl mode + + + + + + + + + + +
+

Tcl mode

+
+ + +

MIME types defined: text/x-tcl.

+ +
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/tcl/tcl.js b/pitfall/pdfkit/node_modules/codemirror/mode/tcl/tcl.js new file mode 100644 index 00000000..ed2c6972 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/tcl/tcl.js @@ -0,0 +1,131 @@ +//tcl mode by Ford_Lawnmower :: Based on Velocity mode by Steve O'Hara +CodeMirror.defineMode("tcl", function() { + function parseWords(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + var keywords = parseWords("Tcl safe after append array auto_execok auto_import auto_load " + + "auto_mkindex auto_mkindex_old auto_qualify auto_reset bgerror " + + "binary break catch cd close concat continue dde eof encoding error " + + "eval exec exit expr fblocked fconfigure fcopy file fileevent filename " + + "filename flush for foreach format gets glob global history http if " + + "incr info interp join lappend lindex linsert list llength load lrange " + + "lreplace lsearch lset lsort memory msgcat namespace open package parray " + + "pid pkg::create pkg_mkIndex proc puts pwd re_syntax read regex regexp " + + "registry regsub rename resource return scan seek set socket source split " + + "string subst switch tcl_endOfWord tcl_findLibrary tcl_startOfNextWord " + + "tcl_wordBreakAfter tcl_startOfPreviousWord tcl_wordBreakBefore tcltest " + + "tclvars tell time trace unknown unset update uplevel upvar variable " + + "vwait"); + var functions = parseWords("if elseif else and not or eq ne in ni for foreach while switch"); + var isOperatorChar = /[+\-*&%=<>!?^\/\|]/; + function chain(stream, state, f) { + state.tokenize = f; + return f(stream, state); + } + function tokenBase(stream, state) { + var beforeParams = state.beforeParams; + state.beforeParams = false; + var ch = stream.next(); + if ((ch == '"' || ch == "'") && state.inParams) + return chain(stream, state, tokenString(ch)); + else if (/[\[\]{}\(\),;\.]/.test(ch)) { + if (ch == "(" && beforeParams) state.inParams = true; + else if (ch == ")") state.inParams = false; + return null; + } + else if (/\d/.test(ch)) { + stream.eatWhile(/[\w\.]/); + return "number"; + } + else if (ch == "#" && stream.eat("*")) { + return chain(stream, state, tokenComment); + } + else if (ch == "#" && stream.match(/ *\[ *\[/)) { + return chain(stream, state, tokenUnparsed); + } + else if (ch == "#" && stream.eat("#")) { + stream.skipToEnd(); + return "comment"; + } + else if (ch == '"') { + stream.skipTo(/"/); + return "comment"; + } + else if (ch == "$") { + stream.eatWhile(/[$_a-z0-9A-Z\.{:]/); + stream.eatWhile(/}/); + state.beforeParams = true; + return "builtin"; + } + else if (isOperatorChar.test(ch)) { + stream.eatWhile(isOperatorChar); + return "comment"; + } + else { + stream.eatWhile(/[\w\$_{}]/); + var word = stream.current().toLowerCase(); + if (keywords && keywords.propertyIsEnumerable(word)) + return "keyword"; + if (functions && functions.propertyIsEnumerable(word)) { + state.beforeParams = true; + return "keyword"; + } + return null; + } + } + function tokenString(quote) { + return function(stream, state) { + var escaped = false, next, end = false; + while ((next = stream.next()) != null) { + if (next == quote && !escaped) { + end = true; + break; + } + escaped = !escaped && next == "\\"; + } + if (end) state.tokenize = tokenBase; + return "string"; + }; + } + function tokenComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (ch == "#" && maybeEnd) { + state.tokenize = tokenBase; + break; + } + maybeEnd = (ch == "*"); + } + return "comment"; + } + function tokenUnparsed(stream, state) { + var maybeEnd = 0, ch; + while (ch = stream.next()) { + if (ch == "#" && maybeEnd == 2) { + state.tokenize = tokenBase; + break; + } + if (ch == "]") + maybeEnd++; + else if (ch != " ") + maybeEnd = 0; + } + return "meta"; + } + return { + startState: function() { + return { + tokenize: tokenBase, + beforeParams: false, + inParams: false + }; + }, + token: function(stream, state) { + if (stream.eatSpace()) return null; + return state.tokenize(stream, state); + } + }; +}); +CodeMirror.defineMIME("text/x-tcl", "tcl"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/tiddlywiki/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/tiddlywiki/index.html new file mode 100644 index 00000000..fc8f5d39 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/tiddlywiki/index.html @@ -0,0 +1,155 @@ + + +CodeMirror: TiddlyWiki mode + + + + + + + + + + + +
+

TiddlyWiki mode

+ + +
+ + + +

TiddlyWiki mode supports a single configuration.

+ +

MIME types defined: text/x-tiddlywiki.

+
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/tiddlywiki/tiddlywiki.css b/pitfall/pdfkit/node_modules/codemirror/mode/tiddlywiki/tiddlywiki.css new file mode 100644 index 00000000..9a69b639 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/tiddlywiki/tiddlywiki.css @@ -0,0 +1,14 @@ +span.cm-underlined { + text-decoration: underline; +} +span.cm-strikethrough { + text-decoration: line-through; +} +span.cm-brace { + color: #170; + font-weight: bold; +} +span.cm-table { + color: blue; + font-weight: bold; +} diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/tiddlywiki/tiddlywiki.js b/pitfall/pdfkit/node_modules/codemirror/mode/tiddlywiki/tiddlywiki.js new file mode 100644 index 00000000..24a24786 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/tiddlywiki/tiddlywiki.js @@ -0,0 +1,353 @@ +/*** + |''Name''|tiddlywiki.js| + |''Description''|Enables TiddlyWikiy syntax highlighting using CodeMirror| + |''Author''|PMario| + |''Version''|0.1.7| + |''Status''|''stable''| + |''Source''|[[GitHub|https://github.com/pmario/CodeMirror2/blob/tw-syntax/mode/tiddlywiki]]| + |''Documentation''|http://codemirror.tiddlyspace.com/| + |''License''|[[MIT License|http://www.opensource.org/licenses/mit-license.php]]| + |''CoreVersion''|2.5.0| + |''Requires''|codemirror.js| + |''Keywords''|syntax highlighting color code mirror codemirror| + ! Info + CoreVersion parameter is needed for TiddlyWiki only! +***/ +//{{{ +CodeMirror.defineMode("tiddlywiki", function () { + // Tokenizer + var textwords = {}; + + var keywords = function () { + function kw(type) { + return { type: type, style: "macro"}; + } + return { + "allTags": kw('allTags'), "closeAll": kw('closeAll'), "list": kw('list'), + "newJournal": kw('newJournal'), "newTiddler": kw('newTiddler'), + "permaview": kw('permaview'), "saveChanges": kw('saveChanges'), + "search": kw('search'), "slider": kw('slider'), "tabs": kw('tabs'), + "tag": kw('tag'), "tagging": kw('tagging'), "tags": kw('tags'), + "tiddler": kw('tiddler'), "timeline": kw('timeline'), + "today": kw('today'), "version": kw('version'), "option": kw('option'), + + "with": kw('with'), + "filter": kw('filter') + }; + }(); + + var isSpaceName = /[\w_\-]/i, + reHR = /^\-\-\-\-+$/, //
+ reWikiCommentStart = /^\/\*\*\*$/, // /*** + reWikiCommentStop = /^\*\*\*\/$/, // ***/ + reBlockQuote = /^<<<$/, + + reJsCodeStart = /^\/\/\{\{\{$/, // //{{{ js block start + reJsCodeStop = /^\/\/\}\}\}$/, // //}}} js stop + reXmlCodeStart = /^$/, // xml block start + reXmlCodeStop = /^$/, // xml stop + + reCodeBlockStart = /^\{\{\{$/, // {{{ TW text div block start + reCodeBlockStop = /^\}\}\}$/, // }}} TW text stop + + reUntilCodeStop = /.*?\}\}\}/; + + function chain(stream, state, f) { + state.tokenize = f; + return f(stream, state); + } + + // Used as scratch variables to communicate multiple values without + // consing up tons of objects. + var type, content; + + function ret(tp, style, cont) { + type = tp; + content = cont; + return style; + } + + function jsTokenBase(stream, state) { + var sol = stream.sol(), ch; + + state.block = false; // indicates the start of a code block. + + ch = stream.peek(); // don't eat, to make matching simpler + + // check start of blocks + if (sol && /[<\/\*{}\-]/.test(ch)) { + if (stream.match(reCodeBlockStart)) { + state.block = true; + return chain(stream, state, twTokenCode); + } + if (stream.match(reBlockQuote)) { + return ret('quote', 'quote'); + } + if (stream.match(reWikiCommentStart) || stream.match(reWikiCommentStop)) { + return ret('code', 'comment'); + } + if (stream.match(reJsCodeStart) || stream.match(reJsCodeStop) || stream.match(reXmlCodeStart) || stream.match(reXmlCodeStop)) { + return ret('code', 'comment'); + } + if (stream.match(reHR)) { + return ret('hr', 'hr'); + } + } // sol + ch = stream.next(); + + if (sol && /[\/\*!#;:>|]/.test(ch)) { + if (ch == "!") { // tw header + stream.skipToEnd(); + return ret("header", "header"); + } + if (ch == "*") { // tw list + stream.eatWhile('*'); + return ret("list", "comment"); + } + if (ch == "#") { // tw numbered list + stream.eatWhile('#'); + return ret("list", "comment"); + } + if (ch == ";") { // definition list, term + stream.eatWhile(';'); + return ret("list", "comment"); + } + if (ch == ":") { // definition list, description + stream.eatWhile(':'); + return ret("list", "comment"); + } + if (ch == ">") { // single line quote + stream.eatWhile(">"); + return ret("quote", "quote"); + } + if (ch == '|') { + return ret('table', 'header'); + } + } + + if (ch == '{' && stream.match(/\{\{/)) { + return chain(stream, state, twTokenCode); + } + + // rudimentary html:// file:// link matching. TW knows much more ... + if (/[hf]/i.test(ch)) { + if (/[ti]/i.test(stream.peek()) && stream.match(/\b(ttps?|tp|ile):\/\/[\-A-Z0-9+&@#\/%?=~_|$!:,.;]*[A-Z0-9+&@#\/%=~_|$]/i)) { + return ret("link", "link"); + } + } + // just a little string indicator, don't want to have the whole string covered + if (ch == '"') { + return ret('string', 'string'); + } + if (ch == '~') { // _no_ CamelCase indicator should be bold + return ret('text', 'brace'); + } + if (/[\[\]]/.test(ch)) { // check for [[..]] + if (stream.peek() == ch) { + stream.next(); + return ret('brace', 'brace'); + } + } + if (ch == "@") { // check for space link. TODO fix @@...@@ highlighting + stream.eatWhile(isSpaceName); + return ret("link", "link"); + } + if (/\d/.test(ch)) { // numbers + stream.eatWhile(/\d/); + return ret("number", "number"); + } + if (ch == "/") { // tw invisible comment + if (stream.eat("%")) { + return chain(stream, state, twTokenComment); + } + else if (stream.eat("/")) { // + return chain(stream, state, twTokenEm); + } + } + if (ch == "_") { // tw underline + if (stream.eat("_")) { + return chain(stream, state, twTokenUnderline); + } + } + // strikethrough and mdash handling + if (ch == "-") { + if (stream.eat("-")) { + // if strikethrough looks ugly, change CSS. + if (stream.peek() != ' ') + return chain(stream, state, twTokenStrike); + // mdash + if (stream.peek() == ' ') + return ret('text', 'brace'); + } + } + if (ch == "'") { // tw bold + if (stream.eat("'")) { + return chain(stream, state, twTokenStrong); + } + } + if (ch == "<") { // tw macro + if (stream.eat("<")) { + return chain(stream, state, twTokenMacro); + } + } + else { + return ret(ch); + } + + // core macro handling + stream.eatWhile(/[\w\$_]/); + var word = stream.current(), + known = textwords.propertyIsEnumerable(word) && textwords[word]; + + return known ? ret(known.type, known.style, word) : ret("text", null, word); + + } // jsTokenBase() + + // tw invisible comment + function twTokenComment(stream, state) { + var maybeEnd = false, + ch; + while (ch = stream.next()) { + if (ch == "/" && maybeEnd) { + state.tokenize = jsTokenBase; + break; + } + maybeEnd = (ch == "%"); + } + return ret("comment", "comment"); + } + + // tw strong / bold + function twTokenStrong(stream, state) { + var maybeEnd = false, + ch; + while (ch = stream.next()) { + if (ch == "'" && maybeEnd) { + state.tokenize = jsTokenBase; + break; + } + maybeEnd = (ch == "'"); + } + return ret("text", "strong"); + } + + // tw code + function twTokenCode(stream, state) { + var ch, sb = state.block; + + if (sb && stream.current()) { + return ret("code", "comment"); + } + + if (!sb && stream.match(reUntilCodeStop)) { + state.tokenize = jsTokenBase; + return ret("code", "comment"); + } + + if (sb && stream.sol() && stream.match(reCodeBlockStop)) { + state.tokenize = jsTokenBase; + return ret("code", "comment"); + } + + ch = stream.next(); + return (sb) ? ret("code", "comment") : ret("code", "comment"); + } + + // tw em / italic + function twTokenEm(stream, state) { + var maybeEnd = false, + ch; + while (ch = stream.next()) { + if (ch == "/" && maybeEnd) { + state.tokenize = jsTokenBase; + break; + } + maybeEnd = (ch == "/"); + } + return ret("text", "em"); + } + + // tw underlined text + function twTokenUnderline(stream, state) { + var maybeEnd = false, + ch; + while (ch = stream.next()) { + if (ch == "_" && maybeEnd) { + state.tokenize = jsTokenBase; + break; + } + maybeEnd = (ch == "_"); + } + return ret("text", "underlined"); + } + + // tw strike through text looks ugly + // change CSS if needed + function twTokenStrike(stream, state) { + var maybeEnd = false, ch; + + while (ch = stream.next()) { + if (ch == "-" && maybeEnd) { + state.tokenize = jsTokenBase; + break; + } + maybeEnd = (ch == "-"); + } + return ret("text", "strikethrough"); + } + + // macro + function twTokenMacro(stream, state) { + var ch, word, known; + + if (stream.current() == '<<') { + return ret('brace', 'macro'); + } + + ch = stream.next(); + if (!ch) { + state.tokenize = jsTokenBase; + return ret(ch); + } + if (ch == ">") { + if (stream.peek() == '>') { + stream.next(); + state.tokenize = jsTokenBase; + return ret("brace", "macro"); + } + } + + stream.eatWhile(/[\w\$_]/); + word = stream.current(); + known = keywords.propertyIsEnumerable(word) && keywords[word]; + + if (known) { + return ret(known.type, known.style, word); + } + else { + return ret("macro", null, word); + } + } + + // Interface + return { + startState: function () { + return { + tokenize: jsTokenBase, + indented: 0, + level: 0 + }; + }, + + token: function (stream, state) { + if (stream.eatSpace()) return null; + var style = state.tokenize(stream, state); + return style; + }, + + electricChars: "" + }; +}); + +CodeMirror.defineMIME("text/x-tiddlywiki", "tiddlywiki"); +//}}} diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/tiki/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/tiki/index.html new file mode 100644 index 00000000..5315dbfc --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/tiki/index.html @@ -0,0 +1,95 @@ + + +CodeMirror: Tiki wiki mode + + + + + + + + + + +
+

Tiki wiki mode

+ + +
+ + + +
diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/tiki/tiki.css b/pitfall/pdfkit/node_modules/codemirror/mode/tiki/tiki.css new file mode 100644 index 00000000..0dbc3ea0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/tiki/tiki.css @@ -0,0 +1,26 @@ +.cm-tw-syntaxerror { + color: #FFF; + background-color: #900; +} + +.cm-tw-deleted { + text-decoration: line-through; +} + +.cm-tw-header5 { + font-weight: bold; +} +.cm-tw-listitem:first-child { /*Added first child to fix duplicate padding when highlighting*/ + padding-left: 10px; +} + +.cm-tw-box { + border-top-width: 0px ! important; + border-style: solid; + border-width: 1px; + border-color: inherit; +} + +.cm-tw-underline { + text-decoration: underline; +} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/tiki/tiki.js b/pitfall/pdfkit/node_modules/codemirror/mode/tiki/tiki.js new file mode 100644 index 00000000..e789163d --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/tiki/tiki.js @@ -0,0 +1,308 @@ +CodeMirror.defineMode('tiki', function(config) { + function inBlock(style, terminator, returnTokenizer) { + return function(stream, state) { + while (!stream.eol()) { + if (stream.match(terminator)) { + state.tokenize = inText; + break; + } + stream.next(); + } + + if (returnTokenizer) state.tokenize = returnTokenizer; + + return style; + }; + } + + function inLine(style) { + return function(stream, state) { + while(!stream.eol()) { + stream.next(); + } + state.tokenize = inText; + return style; + }; + } + + function inText(stream, state) { + function chain(parser) { + state.tokenize = parser; + return parser(stream, state); + } + + var sol = stream.sol(); + var ch = stream.next(); + + //non start of line + switch (ch) { //switch is generally much faster than if, so it is used here + case "{": //plugin + stream.eat("/"); + stream.eatSpace(); + var tagName = ""; + var c; + while ((c = stream.eat(/[^\s\u00a0=\"\'\/?(}]/))) tagName += c; + state.tokenize = inPlugin; + return "tag"; + break; + case "_": //bold + if (stream.eat("_")) { + return chain(inBlock("strong", "__", inText)); + } + break; + case "'": //italics + if (stream.eat("'")) { + // Italic text + return chain(inBlock("em", "''", inText)); + } + break; + case "(":// Wiki Link + if (stream.eat("(")) { + return chain(inBlock("variable-2", "))", inText)); + } + break; + case "[":// Weblink + return chain(inBlock("variable-3", "]", inText)); + break; + case "|": //table + if (stream.eat("|")) { + return chain(inBlock("comment", "||")); + } + break; + case "-": + if (stream.eat("=")) {//titleBar + return chain(inBlock("header string", "=-", inText)); + } else if (stream.eat("-")) {//deleted + return chain(inBlock("error tw-deleted", "--", inText)); + } + break; + case "=": //underline + if (stream.match("==")) { + return chain(inBlock("tw-underline", "===", inText)); + } + break; + case ":": + if (stream.eat(":")) { + return chain(inBlock("comment", "::")); + } + break; + case "^": //box + return chain(inBlock("tw-box", "^")); + break; + case "~": //np + if (stream.match("np~")) { + return chain(inBlock("meta", "~/np~")); + } + break; + } + + //start of line types + if (sol) { + switch (ch) { + case "!": //header at start of line + if (stream.match('!!!!!')) { + return chain(inLine("header string")); + } else if (stream.match('!!!!')) { + return chain(inLine("header string")); + } else if (stream.match('!!!')) { + return chain(inLine("header string")); + } else if (stream.match('!!')) { + return chain(inLine("header string")); + } else { + return chain(inLine("header string")); + } + break; + case "*": //unordered list line item, or
  • at start of line + case "#": //ordered list line item, or
  • at start of line + case "+": //ordered list line item, or
  • at start of line + return chain(inLine("tw-listitem bracket")); + break; + } + } + + //stream.eatWhile(/[&{]/); was eating up plugins, turned off to act less like html and more like tiki + return null; + } + + var indentUnit = config.indentUnit; + + // Return variables for tokenizers + var pluginName, type; + function inPlugin(stream, state) { + var ch = stream.next(); + var peek = stream.peek(); + + if (ch == "}") { + state.tokenize = inText; + //type = ch == ")" ? "endPlugin" : "selfclosePlugin"; inPlugin + return "tag"; + } else if (ch == "(" || ch == ")") { + return "bracket"; + } else if (ch == "=") { + type = "equals"; + + if (peek == ">") { + ch = stream.next(); + peek = stream.peek(); + } + + //here we detect values directly after equal character with no quotes + if (!/[\'\"]/.test(peek)) { + state.tokenize = inAttributeNoQuote(); + } + //end detect values + + return "operator"; + } else if (/[\'\"]/.test(ch)) { + state.tokenize = inAttribute(ch); + return state.tokenize(stream, state); + } else { + stream.eatWhile(/[^\s\u00a0=\"\'\/?]/); + return "keyword"; + } + } + + function inAttribute(quote) { + return function(stream, state) { + while (!stream.eol()) { + if (stream.next() == quote) { + state.tokenize = inPlugin; + break; + } + } + return "string"; + }; + } + + function inAttributeNoQuote() { + return function(stream, state) { + while (!stream.eol()) { + var ch = stream.next(); + var peek = stream.peek(); + if (ch == " " || ch == "," || /[ )}]/.test(peek)) { + state.tokenize = inPlugin; + break; + } + } + return "string"; +}; + } + +var curState, setStyle; +function pass() { + for (var i = arguments.length - 1; i >= 0; i--) curState.cc.push(arguments[i]); +} + +function cont() { + pass.apply(null, arguments); + return true; +} + +function pushContext(pluginName, startOfLine) { + var noIndent = curState.context && curState.context.noIndent; + curState.context = { + prev: curState.context, + pluginName: pluginName, + indent: curState.indented, + startOfLine: startOfLine, + noIndent: noIndent + }; +} + +function popContext() { + if (curState.context) curState.context = curState.context.prev; +} + +function element(type) { + if (type == "openPlugin") {curState.pluginName = pluginName; return cont(attributes, endplugin(curState.startOfLine));} + else if (type == "closePlugin") { + var err = false; + if (curState.context) { + err = curState.context.pluginName != pluginName; + popContext(); + } else { + err = true; + } + if (err) setStyle = "error"; + return cont(endcloseplugin(err)); + } + else if (type == "string") { + if (!curState.context || curState.context.name != "!cdata") pushContext("!cdata"); + if (curState.tokenize == inText) popContext(); + return cont(); + } + else return cont(); +} + +function endplugin(startOfLine) { + return function(type) { + if ( + type == "selfclosePlugin" || + type == "endPlugin" + ) + return cont(); + if (type == "endPlugin") {pushContext(curState.pluginName, startOfLine); return cont();} + return cont(); + }; +} + +function endcloseplugin(err) { + return function(type) { + if (err) setStyle = "error"; + if (type == "endPlugin") return cont(); + return pass(); + }; +} + +function attributes(type) { + if (type == "keyword") {setStyle = "attribute"; return cont(attributes);} + if (type == "equals") return cont(attvalue, attributes); + return pass(); +} +function attvalue(type) { + if (type == "keyword") {setStyle = "string"; return cont();} + if (type == "string") return cont(attvaluemaybe); + return pass(); +} +function attvaluemaybe(type) { + if (type == "string") return cont(attvaluemaybe); + else return pass(); +} +return { + startState: function() { + return {tokenize: inText, cc: [], indented: 0, startOfLine: true, pluginName: null, context: null}; + }, + token: function(stream, state) { + if (stream.sol()) { + state.startOfLine = true; + state.indented = stream.indentation(); + } + if (stream.eatSpace()) return null; + + setStyle = type = pluginName = null; + var style = state.tokenize(stream, state); + if ((style || type) && style != "comment") { + curState = state; + while (true) { + var comb = state.cc.pop() || element; + if (comb(type || style)) break; + } + } + state.startOfLine = false; + return setStyle || style; + }, + indent: function(state, textAfter) { + var context = state.context; + if (context && context.noIndent) return 0; + if (context && /^{\//.test(textAfter)) + context = context.prev; + while (context && !context.startOfLine) + context = context.prev; + if (context) return context.indent + indentUnit; + else return 0; + }, + electricChars: "/" + }; +}); + +CodeMirror.defineMIME("text/tiki", "tiki"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/toml/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/toml/index.html new file mode 100644 index 00000000..c59b4cc0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/toml/index.html @@ -0,0 +1,73 @@ + + +CodeMirror: TOML Mode + + + + + + + + + +
    +

    TOML Mode

    +
    + +

    The TOML Mode

    +

    Created by Forbes Lindesay.

    +

    MIME type defined: text/x-toml.

    +
    diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/toml/toml.js b/pitfall/pdfkit/node_modules/codemirror/mode/toml/toml.js new file mode 100644 index 00000000..1d163f13 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/toml/toml.js @@ -0,0 +1,71 @@ +CodeMirror.defineMode("toml", function () { + return { + startState: function () { + return { + inString: false, + stringType: "", + lhs: true, + inArray: 0 + }; + }, + token: function (stream, state) { + //check for state changes + if (!state.inString && ((stream.peek() == '"') || (stream.peek() == "'"))) { + state.stringType = stream.peek(); + stream.next(); // Skip quote + state.inString = true; // Update state + } + if (stream.sol() && state.inArray === 0) { + state.lhs = true; + } + //return state + if (state.inString) { + while (state.inString && !stream.eol()) { + if (stream.peek() === state.stringType) { + stream.next(); // Skip quote + state.inString = false; // Clear flag + } else if (stream.peek() === '\\') { + stream.next(); + stream.next(); + } else { + stream.match(/^.[^\\\"\']*/); + } + } + return state.lhs ? "property string" : "string"; // Token style + } else if (state.inArray && stream.peek() === ']') { + stream.next(); + state.inArray--; + return 'bracket'; + } else if (state.lhs && stream.peek() === '[' && stream.skipTo(']')) { + stream.next();//skip closing ] + return "atom"; + } else if (stream.peek() === "#") { + stream.skipToEnd(); + return "comment"; + } else if (stream.eatSpace()) { + return null; + } else if (state.lhs && stream.eatWhile(function (c) { return c != '=' && c != ' '; })) { + return "property"; + } else if (state.lhs && stream.peek() === "=") { + stream.next(); + state.lhs = false; + return null; + } else if (!state.lhs && stream.match(/^\d\d\d\d[\d\-\:\.T]*Z/)) { + return 'atom'; //date + } else if (!state.lhs && (stream.match('true') || stream.match('false'))) { + return 'atom'; + } else if (!state.lhs && stream.peek() === '[') { + state.inArray++; + stream.next(); + return 'bracket'; + } else if (!state.lhs && stream.match(/^\-?\d+(?:\.\d+)?/)) { + return 'number'; + } else if (!stream.eatSpace()) { + stream.next(); + } + return null; + } + }; +}); + +CodeMirror.defineMIME('text/x-toml', 'toml'); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/turtle/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/turtle/index.html new file mode 100644 index 00000000..74b5f896 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/turtle/index.html @@ -0,0 +1,51 @@ + + +CodeMirror: Turtle mode + + + + + + + + + +
    +

    Turtle mode

    +
    + + +

    MIME types defined: text/turtle.

    + +
    diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/turtle/turtle.js b/pitfall/pdfkit/node_modules/codemirror/mode/turtle/turtle.js new file mode 100644 index 00000000..e118bfbc --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/turtle/turtle.js @@ -0,0 +1,145 @@ +CodeMirror.defineMode("turtle", function(config) { + var indentUnit = config.indentUnit; + var curPunc; + + function wordRegexp(words) { + return new RegExp("^(?:" + words.join("|") + ")$", "i"); + } + var ops = wordRegexp([]); + var keywords = wordRegexp(["@prefix", "@base", "a"]); + var operatorChars = /[*+\-<>=&|]/; + + function tokenBase(stream, state) { + var ch = stream.next(); + curPunc = null; + if (ch == "<" && !stream.match(/^[\s\u00a0=]/, false)) { + stream.match(/^[^\s\u00a0>]*>?/); + return "atom"; + } + else if (ch == "\"" || ch == "'") { + state.tokenize = tokenLiteral(ch); + return state.tokenize(stream, state); + } + else if (/[{}\(\),\.;\[\]]/.test(ch)) { + curPunc = ch; + return null; + } + else if (ch == "#") { + stream.skipToEnd(); + return "comment"; + } + else if (operatorChars.test(ch)) { + stream.eatWhile(operatorChars); + return null; + } + else if (ch == ":") { + return "operator"; + } else { + stream.eatWhile(/[_\w\d]/); + if(stream.peek() == ":") { + return "variable-3"; + } else { + var word = stream.current(); + + if(keywords.test(word)) { + return "meta"; + } + + if(ch >= "A" && ch <= "Z") { + return "comment"; + } else { + return "keyword"; + } + } + var word = stream.current(); + if (ops.test(word)) + return null; + else if (keywords.test(word)) + return "meta"; + else + return "variable"; + } + } + + function tokenLiteral(quote) { + return function(stream, state) { + var escaped = false, ch; + while ((ch = stream.next()) != null) { + if (ch == quote && !escaped) { + state.tokenize = tokenBase; + break; + } + escaped = !escaped && ch == "\\"; + } + return "string"; + }; + } + + function pushContext(state, type, col) { + state.context = {prev: state.context, indent: state.indent, col: col, type: type}; + } + function popContext(state) { + state.indent = state.context.indent; + state.context = state.context.prev; + } + + return { + startState: function() { + return {tokenize: tokenBase, + context: null, + indent: 0, + col: 0}; + }, + + token: function(stream, state) { + if (stream.sol()) { + if (state.context && state.context.align == null) state.context.align = false; + state.indent = stream.indentation(); + } + if (stream.eatSpace()) return null; + var style = state.tokenize(stream, state); + + if (style != "comment" && state.context && state.context.align == null && state.context.type != "pattern") { + state.context.align = true; + } + + if (curPunc == "(") pushContext(state, ")", stream.column()); + else if (curPunc == "[") pushContext(state, "]", stream.column()); + else if (curPunc == "{") pushContext(state, "}", stream.column()); + else if (/[\]\}\)]/.test(curPunc)) { + while (state.context && state.context.type == "pattern") popContext(state); + if (state.context && curPunc == state.context.type) popContext(state); + } + else if (curPunc == "." && state.context && state.context.type == "pattern") popContext(state); + else if (/atom|string|variable/.test(style) && state.context) { + if (/[\}\]]/.test(state.context.type)) + pushContext(state, "pattern", stream.column()); + else if (state.context.type == "pattern" && !state.context.align) { + state.context.align = true; + state.context.col = stream.column(); + } + } + + return style; + }, + + indent: function(state, textAfter) { + var firstChar = textAfter && textAfter.charAt(0); + var context = state.context; + if (/[\]\}]/.test(firstChar)) + while (context && context.type == "pattern") context = context.prev; + + var closing = context && firstChar == context.type; + if (!context) + return 0; + else if (context.type == "pattern") + return context.col; + else if (context.align) + return context.col + (closing ? 0 : 1); + else + return context.indent + (closing ? 0 : indentUnit); + } + }; +}); + +CodeMirror.defineMIME("text/turtle", "turtle"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/vb/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/vb/index.html new file mode 100644 index 00000000..42c3e526 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/vb/index.html @@ -0,0 +1,103 @@ + + +CodeMirror: VB.NET mode + + + + + + + + + + + +
    +

    VB.NET mode

    + + + +
    + +
    +
    
    +  

    MIME type defined: text/x-vb.

    + +
    diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/vb/vb.js b/pitfall/pdfkit/node_modules/codemirror/mode/vb/vb.js new file mode 100644 index 00000000..27b22719 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/vb/vb.js @@ -0,0 +1,259 @@ +CodeMirror.defineMode("vb", function(conf, parserConf) { + var ERRORCLASS = 'error'; + + function wordRegexp(words) { + return new RegExp("^((" + words.join(")|(") + "))\\b", "i"); + } + + var singleOperators = new RegExp("^[\\+\\-\\*/%&\\\\|\\^~<>!]"); + var singleDelimiters = new RegExp('^[\\(\\)\\[\\]\\{\\}@,:`=;\\.]'); + var doubleOperators = new RegExp("^((==)|(<>)|(<=)|(>=)|(<>)|(<<)|(>>)|(//)|(\\*\\*))"); + var doubleDelimiters = new RegExp("^((\\+=)|(\\-=)|(\\*=)|(%=)|(/=)|(&=)|(\\|=)|(\\^=))"); + var tripleDelimiters = new RegExp("^((//=)|(>>=)|(<<=)|(\\*\\*=))"); + var identifiers = new RegExp("^[_A-Za-z][_A-Za-z0-9]*"); + + var openingKeywords = ['class','module', 'sub','enum','select','while','if','function', 'get','set','property', 'try']; + var middleKeywords = ['else','elseif','case', 'catch']; + var endKeywords = ['next','loop']; + + var wordOperators = wordRegexp(['and', 'or', 'not', 'xor', 'in']); + var commonkeywords = ['as', 'dim', 'break', 'continue','optional', 'then', 'until', + 'goto', 'byval','byref','new','handles','property', 'return', + 'const','private', 'protected', 'friend', 'public', 'shared', 'static', 'true','false']; + var commontypes = ['integer','string','double','decimal','boolean','short','char', 'float','single']; + + var keywords = wordRegexp(commonkeywords); + var types = wordRegexp(commontypes); + var stringPrefixes = '"'; + + var opening = wordRegexp(openingKeywords); + var middle = wordRegexp(middleKeywords); + var closing = wordRegexp(endKeywords); + var doubleClosing = wordRegexp(['end']); + var doOpening = wordRegexp(['do']); + + var indentInfo = null; + + + + + function indent(_stream, state) { + state.currentIndent++; + } + + function dedent(_stream, state) { + state.currentIndent--; + } + // tokenizers + function tokenBase(stream, state) { + if (stream.eatSpace()) { + return null; + } + + var ch = stream.peek(); + + // Handle Comments + if (ch === "'") { + stream.skipToEnd(); + return 'comment'; + } + + + // Handle Number Literals + if (stream.match(/^((&H)|(&O))?[0-9\.a-f]/i, false)) { + var floatLiteral = false; + // Floats + if (stream.match(/^\d*\.\d+F?/i)) { floatLiteral = true; } + else if (stream.match(/^\d+\.\d*F?/)) { floatLiteral = true; } + else if (stream.match(/^\.\d+F?/)) { floatLiteral = true; } + + if (floatLiteral) { + // Float literals may be "imaginary" + stream.eat(/J/i); + return 'number'; + } + // Integers + var intLiteral = false; + // Hex + if (stream.match(/^&H[0-9a-f]+/i)) { intLiteral = true; } + // Octal + else if (stream.match(/^&O[0-7]+/i)) { intLiteral = true; } + // Decimal + else if (stream.match(/^[1-9]\d*F?/)) { + // Decimal literals may be "imaginary" + stream.eat(/J/i); + // TODO - Can you have imaginary longs? + intLiteral = true; + } + // Zero by itself with no other piece of number. + else if (stream.match(/^0(?![\dx])/i)) { intLiteral = true; } + if (intLiteral) { + // Integer literals may be "long" + stream.eat(/L/i); + return 'number'; + } + } + + // Handle Strings + if (stream.match(stringPrefixes)) { + state.tokenize = tokenStringFactory(stream.current()); + return state.tokenize(stream, state); + } + + // Handle operators and Delimiters + if (stream.match(tripleDelimiters) || stream.match(doubleDelimiters)) { + return null; + } + if (stream.match(doubleOperators) + || stream.match(singleOperators) + || stream.match(wordOperators)) { + return 'operator'; + } + if (stream.match(singleDelimiters)) { + return null; + } + if (stream.match(doOpening)) { + indent(stream,state); + state.doInCurrentLine = true; + return 'keyword'; + } + if (stream.match(opening)) { + if (! state.doInCurrentLine) + indent(stream,state); + else + state.doInCurrentLine = false; + return 'keyword'; + } + if (stream.match(middle)) { + return 'keyword'; + } + + if (stream.match(doubleClosing)) { + dedent(stream,state); + dedent(stream,state); + return 'keyword'; + } + if (stream.match(closing)) { + dedent(stream,state); + return 'keyword'; + } + + if (stream.match(types)) { + return 'keyword'; + } + + if (stream.match(keywords)) { + return 'keyword'; + } + + if (stream.match(identifiers)) { + return 'variable'; + } + + // Handle non-detected items + stream.next(); + return ERRORCLASS; + } + + function tokenStringFactory(delimiter) { + var singleline = delimiter.length == 1; + var OUTCLASS = 'string'; + + return function(stream, state) { + while (!stream.eol()) { + stream.eatWhile(/[^'"]/); + if (stream.match(delimiter)) { + state.tokenize = tokenBase; + return OUTCLASS; + } else { + stream.eat(/['"]/); + } + } + if (singleline) { + if (parserConf.singleLineStringErrors) { + return ERRORCLASS; + } else { + state.tokenize = tokenBase; + } + } + return OUTCLASS; + }; + } + + + function tokenLexer(stream, state) { + var style = state.tokenize(stream, state); + var current = stream.current(); + + // Handle '.' connected identifiers + if (current === '.') { + style = state.tokenize(stream, state); + current = stream.current(); + if (style === 'variable') { + return 'variable'; + } else { + return ERRORCLASS; + } + } + + + var delimiter_index = '[({'.indexOf(current); + if (delimiter_index !== -1) { + indent(stream, state ); + } + if (indentInfo === 'dedent') { + if (dedent(stream, state)) { + return ERRORCLASS; + } + } + delimiter_index = '])}'.indexOf(current); + if (delimiter_index !== -1) { + if (dedent(stream, state)) { + return ERRORCLASS; + } + } + + return style; + } + + var external = { + electricChars:"dDpPtTfFeE ", + startState: function() { + return { + tokenize: tokenBase, + lastToken: null, + currentIndent: 0, + nextLineIndent: 0, + doInCurrentLine: false + + + }; + }, + + token: function(stream, state) { + if (stream.sol()) { + state.currentIndent += state.nextLineIndent; + state.nextLineIndent = 0; + state.doInCurrentLine = 0; + } + var style = tokenLexer(stream, state); + + state.lastToken = {style:style, content: stream.current()}; + + + + return style; + }, + + indent: function(state, textAfter) { + var trueText = textAfter.replace(/^\s+|\s+$/g, '') ; + if (trueText.match(closing) || trueText.match(doubleClosing) || trueText.match(middle)) return conf.indentUnit*(state.currentIndent-1); + if(state.currentIndent < 0) return 0; + return state.currentIndent * conf.indentUnit; + } + + }; + return external; +}); + +CodeMirror.defineMIME("text/x-vb", "vb"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/vbscript/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/vbscript/index.html new file mode 100644 index 00000000..9b506b79 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/vbscript/index.html @@ -0,0 +1,55 @@ + + +CodeMirror: VBScript mode + + + + + + + + + +
    +

    VBScript mode

    + + +
    + + + +

    MIME types defined: text/vbscript.

    +
    diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/vbscript/vbscript.js b/pitfall/pdfkit/node_modules/codemirror/mode/vbscript/vbscript.js new file mode 100644 index 00000000..0a97fb64 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/vbscript/vbscript.js @@ -0,0 +1,334 @@ +/* +For extra ASP classic objects, initialize CodeMirror instance with this option: + isASP: true + +E.G.: + var editor = CodeMirror.fromTextArea(document.getElementById("code"), { + lineNumbers: true, + isASP: true + }); +*/ +CodeMirror.defineMode("vbscript", function(conf, parserConf) { + var ERRORCLASS = 'error'; + + function wordRegexp(words) { + return new RegExp("^((" + words.join(")|(") + "))\\b", "i"); + } + + var singleOperators = new RegExp("^[\\+\\-\\*/&\\\\\\^<>=]"); + var doubleOperators = new RegExp("^((<>)|(<=)|(>=))"); + var singleDelimiters = new RegExp('^[\\.,]'); + var brakets = new RegExp('^[\\(\\)]'); + var identifiers = new RegExp("^[A-Za-z][_A-Za-z0-9]*"); + + var openingKeywords = ['class','sub','select','while','if','function', 'property', 'with', 'for']; + var middleKeywords = ['else','elseif','case']; + var endKeywords = ['next','loop','wend']; + + var wordOperators = wordRegexp(['and', 'or', 'not', 'xor', 'is', 'mod', 'eqv', 'imp']); + var commonkeywords = ['dim', 'redim', 'then', 'until', 'randomize', + 'byval','byref','new','property', 'exit', 'in', + 'const','private', 'public', + 'get','set','let', 'stop', 'on error resume next', 'on error goto 0', 'option explicit', 'call', 'me']; + + //This list was from: http://msdn.microsoft.com/en-us/library/f8tbc79x(v=vs.84).aspx + var atomWords = ['true', 'false', 'nothing', 'empty', 'null']; + //This list was from: http://msdn.microsoft.com/en-us/library/3ca8tfek(v=vs.84).aspx + var builtinFuncsWords = ['abs', 'array', 'asc', 'atn', 'cbool', 'cbyte', 'ccur', 'cdate', 'cdbl', 'chr', 'cint', 'clng', 'cos', 'csng', 'cstr', 'date', 'dateadd', 'datediff', 'datepart', + 'dateserial', 'datevalue', 'day', 'escape', 'eval', 'execute', 'exp', 'filter', 'formatcurrency', 'formatdatetime', 'formatnumber', 'formatpercent', 'getlocale', 'getobject', + 'getref', 'hex', 'hour', 'inputbox', 'instr', 'instrrev', 'int', 'fix', 'isarray', 'isdate', 'isempty', 'isnull', 'isnumeric', 'isobject', 'join', 'lbound', 'lcase', 'left', + 'len', 'loadpicture', 'log', 'ltrim', 'rtrim', 'trim', 'maths', 'mid', 'minute', 'month', 'monthname', 'msgbox', 'now', 'oct', 'replace', 'rgb', 'right', 'rnd', 'round', + 'scriptengine', 'scriptenginebuildversion', 'scriptenginemajorversion', 'scriptengineminorversion', 'second', 'setlocale', 'sgn', 'sin', 'space', 'split', 'sqr', 'strcomp', + 'string', 'strreverse', 'tan', 'time', 'timer', 'timeserial', 'timevalue', 'typename', 'ubound', 'ucase', 'unescape', 'vartype', 'weekday', 'weekdayname', 'year']; + + //This list was from: http://msdn.microsoft.com/en-us/library/ydz4cfk3(v=vs.84).aspx + var builtinConsts = ['vbBlack', 'vbRed', 'vbGreen', 'vbYellow', 'vbBlue', 'vbMagenta', 'vbCyan', 'vbWhite', 'vbBinaryCompare', 'vbTextCompare', + 'vbSunday', 'vbMonday', 'vbTuesday', 'vbWednesday', 'vbThursday', 'vbFriday', 'vbSaturday', 'vbUseSystemDayOfWeek', 'vbFirstJan1', 'vbFirstFourDays', 'vbFirstFullWeek', + 'vbGeneralDate', 'vbLongDate', 'vbShortDate', 'vbLongTime', 'vbShortTime', 'vbObjectError', + 'vbOKOnly', 'vbOKCancel', 'vbAbortRetryIgnore', 'vbYesNoCancel', 'vbYesNo', 'vbRetryCancel', 'vbCritical', 'vbQuestion', 'vbExclamation', 'vbInformation', 'vbDefaultButton1', 'vbDefaultButton2', + 'vbDefaultButton3', 'vbDefaultButton4', 'vbApplicationModal', 'vbSystemModal', 'vbOK', 'vbCancel', 'vbAbort', 'vbRetry', 'vbIgnore', 'vbYes', 'vbNo', + 'vbCr', 'VbCrLf', 'vbFormFeed', 'vbLf', 'vbNewLine', 'vbNullChar', 'vbNullString', 'vbTab', 'vbVerticalTab', 'vbUseDefault', 'vbTrue', 'vbFalse', + 'vbEmpty', 'vbNull', 'vbInteger', 'vbLong', 'vbSingle', 'vbDouble', 'vbCurrency', 'vbDate', 'vbString', 'vbObject', 'vbError', 'vbBoolean', 'vbVariant', 'vbDataObject', 'vbDecimal', 'vbByte', 'vbArray']; + //This list was from: http://msdn.microsoft.com/en-us/library/hkc375ea(v=vs.84).aspx + var builtinObjsWords = ['WScript', 'err', 'debug', 'RegExp']; + var knownProperties = ['description', 'firstindex', 'global', 'helpcontext', 'helpfile', 'ignorecase', 'length', 'number', 'pattern', 'source', 'value', 'count']; + var knownMethods = ['clear', 'execute', 'raise', 'replace', 'test', 'write', 'writeline', 'close', 'open', 'state', 'eof', 'update', 'addnew', 'end', 'createobject', 'quit']; + + var aspBuiltinObjsWords = ['server', 'response', 'request', 'session', 'application']; + var aspKnownProperties = ['buffer', 'cachecontrol', 'charset', 'contenttype', 'expires', 'expiresabsolute', 'isclientconnected', 'pics', 'status', //response + 'clientcertificate', 'cookies', 'form', 'querystring', 'servervariables', 'totalbytes', //request + 'contents', 'staticobjects', //application + 'codepage', 'lcid', 'sessionid', 'timeout', //session + 'scripttimeout']; //server + var aspKnownMethods = ['addheader', 'appendtolog', 'binarywrite', 'end', 'flush', 'redirect', //response + 'binaryread', //request + 'remove', 'removeall', 'lock', 'unlock', //application + 'abandon', //session + 'getlasterror', 'htmlencode', 'mappath', 'transfer', 'urlencode']; //server + + var knownWords = knownMethods.concat(knownProperties); + + builtinObjsWords = builtinObjsWords.concat(builtinConsts); + + if (conf.isASP){ + builtinObjsWords = builtinObjsWords.concat(aspBuiltinObjsWords); + knownWords = knownWords.concat(aspKnownMethods, aspKnownProperties); + }; + + var keywords = wordRegexp(commonkeywords); + var atoms = wordRegexp(atomWords); + var builtinFuncs = wordRegexp(builtinFuncsWords); + var builtinObjs = wordRegexp(builtinObjsWords); + var known = wordRegexp(knownWords); + var stringPrefixes = '"'; + + var opening = wordRegexp(openingKeywords); + var middle = wordRegexp(middleKeywords); + var closing = wordRegexp(endKeywords); + var doubleClosing = wordRegexp(['end']); + var doOpening = wordRegexp(['do']); + var noIndentWords = wordRegexp(['on error resume next', 'exit']); + var comment = wordRegexp(['rem']); + + + function indent(_stream, state) { + state.currentIndent++; + } + + function dedent(_stream, state) { + state.currentIndent--; + } + // tokenizers + function tokenBase(stream, state) { + if (stream.eatSpace()) { + return 'space'; + //return null; + } + + var ch = stream.peek(); + + // Handle Comments + if (ch === "'") { + stream.skipToEnd(); + return 'comment'; + } + if (stream.match(comment)){ + stream.skipToEnd(); + return 'comment'; + } + + + // Handle Number Literals + if (stream.match(/^((&H)|(&O))?[0-9\.]/i, false) && !stream.match(/^((&H)|(&O))?[0-9\.]+[a-z_]/i, false)) { + var floatLiteral = false; + // Floats + if (stream.match(/^\d*\.\d+/i)) { floatLiteral = true; } + else if (stream.match(/^\d+\.\d*/)) { floatLiteral = true; } + else if (stream.match(/^\.\d+/)) { floatLiteral = true; } + + if (floatLiteral) { + // Float literals may be "imaginary" + stream.eat(/J/i); + return 'number'; + } + // Integers + var intLiteral = false; + // Hex + if (stream.match(/^&H[0-9a-f]+/i)) { intLiteral = true; } + // Octal + else if (stream.match(/^&O[0-7]+/i)) { intLiteral = true; } + // Decimal + else if (stream.match(/^[1-9]\d*F?/)) { + // Decimal literals may be "imaginary" + stream.eat(/J/i); + // TODO - Can you have imaginary longs? + intLiteral = true; + } + // Zero by itself with no other piece of number. + else if (stream.match(/^0(?![\dx])/i)) { intLiteral = true; } + if (intLiteral) { + // Integer literals may be "long" + stream.eat(/L/i); + return 'number'; + } + } + + // Handle Strings + if (stream.match(stringPrefixes)) { + state.tokenize = tokenStringFactory(stream.current()); + return state.tokenize(stream, state); + } + + // Handle operators and Delimiters + if (stream.match(doubleOperators) + || stream.match(singleOperators) + || stream.match(wordOperators)) { + return 'operator'; + } + if (stream.match(singleDelimiters)) { + return null; + } + + if (stream.match(brakets)) { + return "bracket"; + } + + if (stream.match(noIndentWords)) { + state.doInCurrentLine = true; + + return 'keyword'; + } + + if (stream.match(doOpening)) { + indent(stream,state); + state.doInCurrentLine = true; + + return 'keyword'; + } + if (stream.match(opening)) { + if (! state.doInCurrentLine) + indent(stream,state); + else + state.doInCurrentLine = false; + + return 'keyword'; + } + if (stream.match(middle)) { + return 'keyword'; + } + + + if (stream.match(doubleClosing)) { + dedent(stream,state); + dedent(stream,state); + + return 'keyword'; + } + if (stream.match(closing)) { + if (! state.doInCurrentLine) + dedent(stream,state); + else + state.doInCurrentLine = false; + + return 'keyword'; + } + + if (stream.match(keywords)) { + return 'keyword'; + } + + if (stream.match(atoms)) { + return 'atom'; + } + + if (stream.match(known)) { + return 'variable-2'; + } + + if (stream.match(builtinFuncs)) { + return 'builtin'; + } + + if (stream.match(builtinObjs)){ + return 'variable-2'; + } + + if (stream.match(identifiers)) { + return 'variable'; + } + + // Handle non-detected items + stream.next(); + return ERRORCLASS; + } + + function tokenStringFactory(delimiter) { + var singleline = delimiter.length == 1; + var OUTCLASS = 'string'; + + return function(stream, state) { + while (!stream.eol()) { + stream.eatWhile(/[^'"]/); + if (stream.match(delimiter)) { + state.tokenize = tokenBase; + return OUTCLASS; + } else { + stream.eat(/['"]/); + } + } + if (singleline) { + if (parserConf.singleLineStringErrors) { + return ERRORCLASS; + } else { + state.tokenize = tokenBase; + } + } + return OUTCLASS; + }; + } + + + function tokenLexer(stream, state) { + var style = state.tokenize(stream, state); + var current = stream.current(); + + // Handle '.' connected identifiers + if (current === '.') { + style = state.tokenize(stream, state); + + current = stream.current(); + if (style.substr(0, 8) === 'variable' || style==='builtin' || style==='keyword'){//|| knownWords.indexOf(current.substring(1)) > -1) { + if (style === 'builtin' || style === 'keyword') style='variable'; + if (knownWords.indexOf(current.substr(1)) > -1) style='variable-2'; + + return style; + } else { + return ERRORCLASS; + } + } + + return style; + } + + var external = { + electricChars:"dDpPtTfFeE ", + startState: function() { + return { + tokenize: tokenBase, + lastToken: null, + currentIndent: 0, + nextLineIndent: 0, + doInCurrentLine: false, + ignoreKeyword: false + + + }; + }, + + token: function(stream, state) { + if (stream.sol()) { + state.currentIndent += state.nextLineIndent; + state.nextLineIndent = 0; + state.doInCurrentLine = 0; + } + var style = tokenLexer(stream, state); + + state.lastToken = {style:style, content: stream.current()}; + + if (style==='space') style=null; + + return style; + }, + + indent: function(state, textAfter) { + var trueText = textAfter.replace(/^\s+|\s+$/g, '') ; + if (trueText.match(closing) || trueText.match(doubleClosing) || trueText.match(middle)) return conf.indentUnit*(state.currentIndent-1); + if(state.currentIndent < 0) return 0; + return state.currentIndent * conf.indentUnit; + } + + }; + return external; +}); + +CodeMirror.defineMIME("text/vbscript", "vbscript"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/velocity/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/velocity/index.html new file mode 100644 index 00000000..023542d1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/velocity/index.html @@ -0,0 +1,119 @@ + + +CodeMirror: Velocity mode + + + + + + + + + + +
    +

    Velocity mode

    +
    + + +

    MIME types defined: text/velocity.

    + +
    diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/velocity/velocity.js b/pitfall/pdfkit/node_modules/codemirror/mode/velocity/velocity.js new file mode 100644 index 00000000..968d8799 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/velocity/velocity.js @@ -0,0 +1,186 @@ +CodeMirror.defineMode("velocity", function() { + function parseWords(str) { + var obj = {}, words = str.split(" "); + for (var i = 0; i < words.length; ++i) obj[words[i]] = true; + return obj; + } + + var keywords = parseWords("#end #else #break #stop #[[ #]] " + + "#{end} #{else} #{break} #{stop}"); + var functions = parseWords("#if #elseif #foreach #set #include #parse #macro #define #evaluate " + + "#{if} #{elseif} #{foreach} #{set} #{include} #{parse} #{macro} #{define} #{evaluate}"); + var specials = parseWords("$foreach.count $foreach.hasNext $foreach.first $foreach.last $foreach.topmost $foreach.parent.count $foreach.parent.hasNext $foreach.parent.first $foreach.parent.last $foreach.parent $velocityCount $!bodyContent $bodyContent"); + var isOperatorChar = /[+\-*&%=<>!?:\/|]/; + + function chain(stream, state, f) { + state.tokenize = f; + return f(stream, state); + } + function tokenBase(stream, state) { + var beforeParams = state.beforeParams; + state.beforeParams = false; + var ch = stream.next(); + // start of unparsed string? + if ((ch == "'") && state.inParams) { + state.lastTokenWasBuiltin = false; + return chain(stream, state, tokenString(ch)); + } + // start of parsed string? + else if ((ch == '"')) { + state.lastTokenWasBuiltin = false; + if (state.inString) { + state.inString = false; + return "string"; + } + else if (state.inParams) + return chain(stream, state, tokenString(ch)); + } + // is it one of the special signs []{}().,;? Seperator? + else if (/[\[\]{}\(\),;\.]/.test(ch)) { + if (ch == "(" && beforeParams) + state.inParams = true; + else if (ch == ")") { + state.inParams = false; + state.lastTokenWasBuiltin = true; + } + return null; + } + // start of a number value? + else if (/\d/.test(ch)) { + state.lastTokenWasBuiltin = false; + stream.eatWhile(/[\w\.]/); + return "number"; + } + // multi line comment? + else if (ch == "#" && stream.eat("*")) { + state.lastTokenWasBuiltin = false; + return chain(stream, state, tokenComment); + } + // unparsed content? + else if (ch == "#" && stream.match(/ *\[ *\[/)) { + state.lastTokenWasBuiltin = false; + return chain(stream, state, tokenUnparsed); + } + // single line comment? + else if (ch == "#" && stream.eat("#")) { + state.lastTokenWasBuiltin = false; + stream.skipToEnd(); + return "comment"; + } + // variable? + else if (ch == "$") { + stream.eatWhile(/[\w\d\$_\.{}]/); + // is it one of the specials? + if (specials && specials.propertyIsEnumerable(stream.current())) { + return "keyword"; + } + else { + state.lastTokenWasBuiltin = true; + state.beforeParams = true; + return "builtin"; + } + } + // is it a operator? + else if (isOperatorChar.test(ch)) { + state.lastTokenWasBuiltin = false; + stream.eatWhile(isOperatorChar); + return "operator"; + } + else { + // get the whole word + stream.eatWhile(/[\w\$_{}@]/); + var word = stream.current(); + // is it one of the listed keywords? + if (keywords && keywords.propertyIsEnumerable(word)) + return "keyword"; + // is it one of the listed functions? + if (functions && functions.propertyIsEnumerable(word) || + (stream.current().match(/^#@?[a-z0-9_]+ *$/i) && stream.peek()=="(") && + !(functions && functions.propertyIsEnumerable(word.toLowerCase()))) { + state.beforeParams = true; + state.lastTokenWasBuiltin = false; + return "keyword"; + } + if (state.inString) { + state.lastTokenWasBuiltin = false; + return "string"; + } + if (stream.pos > word.length && stream.string.charAt(stream.pos-word.length-1)=="." && state.lastTokenWasBuiltin) + return "builtin"; + // default: just a "word" + state.lastTokenWasBuiltin = false; + return null; + } + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, next, end = false; + while ((next = stream.next()) != null) { + if ((next == quote) && !escaped) { + end = true; + break; + } + if (quote=='"' && stream.peek() == '$' && !escaped) { + state.inString = true; + end = true; + break; + } + escaped = !escaped && next == "\\"; + } + if (end) state.tokenize = tokenBase; + return "string"; + }; + } + + function tokenComment(stream, state) { + var maybeEnd = false, ch; + while (ch = stream.next()) { + if (ch == "#" && maybeEnd) { + state.tokenize = tokenBase; + break; + } + maybeEnd = (ch == "*"); + } + return "comment"; + } + + function tokenUnparsed(stream, state) { + var maybeEnd = 0, ch; + while (ch = stream.next()) { + if (ch == "#" && maybeEnd == 2) { + state.tokenize = tokenBase; + break; + } + if (ch == "]") + maybeEnd++; + else if (ch != " ") + maybeEnd = 0; + } + return "meta"; + } + // Interface + + return { + startState: function() { + return { + tokenize: tokenBase, + beforeParams: false, + inParams: false, + inString: false, + lastTokenWasBuiltin: false + }; + }, + + token: function(stream, state) { + if (stream.eatSpace()) return null; + return state.tokenize(stream, state); + }, + blockCommentStart: "#*", + blockCommentEnd: "*#", + lineComment: "##", + fold: "velocity" + }; +}); + +CodeMirror.defineMIME("text/velocity", "velocity"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/verilog/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/verilog/index.html new file mode 100644 index 00000000..cc710564 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/verilog/index.html @@ -0,0 +1,132 @@ + + +CodeMirror: Verilog mode + + + + + + + + + +
    +

    Verilog mode

    +
    + + + +

    Simple mode that tries to handle Verilog-like languages as well as it + can. Takes one configuration parameters: keywords, an + object whose property names are the keywords in the language.

    + +

    MIME types defined: text/x-verilog (Verilog code).

    +
    diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/verilog/verilog.js b/pitfall/pdfkit/node_modules/codemirror/mode/verilog/verilog.js new file mode 100644 index 00000000..708de23f --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/verilog/verilog.js @@ -0,0 +1,182 @@ +CodeMirror.defineMode("verilog", function(config, parserConfig) { + var indentUnit = config.indentUnit, + keywords = parserConfig.keywords || {}, + blockKeywords = parserConfig.blockKeywords || {}, + atoms = parserConfig.atoms || {}, + hooks = parserConfig.hooks || {}, + multiLineStrings = parserConfig.multiLineStrings; + var isOperatorChar = /[&|~> + +CodeMirror: XML mode + + + + + + + + + +
    +

    XML mode

    +
    + +

    The XML mode supports two configuration parameters:

    +
    +
    htmlMode (boolean)
    +
    This switches the mode to parse HTML instead of XML. This + means attributes do not have to be quoted, and some elements + (such as br) do not require a closing tag.
    +
    alignCDATA (boolean)
    +
    Setting this to true will force the opening tag of CDATA + blocks to not be indented.
    +
    + +

    MIME types defined: application/xml, text/html.

    +
    diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/xml/xml.js b/pitfall/pdfkit/node_modules/codemirror/mode/xml/xml.js new file mode 100644 index 00000000..4f49e07f --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/xml/xml.js @@ -0,0 +1,345 @@ +CodeMirror.defineMode("xml", function(config, parserConfig) { + var indentUnit = config.indentUnit; + var multilineTagIndentFactor = parserConfig.multilineTagIndentFactor || 1; + var multilineTagIndentPastTag = parserConfig.multilineTagIndentPastTag || true; + + var Kludges = parserConfig.htmlMode ? { + autoSelfClosers: {'area': true, 'base': true, 'br': true, 'col': true, 'command': true, + 'embed': true, 'frame': true, 'hr': true, 'img': true, 'input': true, + 'keygen': true, 'link': true, 'meta': true, 'param': true, 'source': true, + 'track': true, 'wbr': true}, + implicitlyClosed: {'dd': true, 'li': true, 'optgroup': true, 'option': true, 'p': true, + 'rp': true, 'rt': true, 'tbody': true, 'td': true, 'tfoot': true, + 'th': true, 'tr': true}, + contextGrabbers: { + 'dd': {'dd': true, 'dt': true}, + 'dt': {'dd': true, 'dt': true}, + 'li': {'li': true}, + 'option': {'option': true, 'optgroup': true}, + 'optgroup': {'optgroup': true}, + 'p': {'address': true, 'article': true, 'aside': true, 'blockquote': true, 'dir': true, + 'div': true, 'dl': true, 'fieldset': true, 'footer': true, 'form': true, + 'h1': true, 'h2': true, 'h3': true, 'h4': true, 'h5': true, 'h6': true, + 'header': true, 'hgroup': true, 'hr': true, 'menu': true, 'nav': true, 'ol': true, + 'p': true, 'pre': true, 'section': true, 'table': true, 'ul': true}, + 'rp': {'rp': true, 'rt': true}, + 'rt': {'rp': true, 'rt': true}, + 'tbody': {'tbody': true, 'tfoot': true}, + 'td': {'td': true, 'th': true}, + 'tfoot': {'tbody': true}, + 'th': {'td': true, 'th': true}, + 'thead': {'tbody': true, 'tfoot': true}, + 'tr': {'tr': true} + }, + doNotIndent: {"pre": true}, + allowUnquoted: true, + allowMissing: true + } : { + autoSelfClosers: {}, + implicitlyClosed: {}, + contextGrabbers: {}, + doNotIndent: {}, + allowUnquoted: false, + allowMissing: false + }; + var alignCDATA = parserConfig.alignCDATA; + + // Return variables for tokenizers + var tagName, type; + + function inText(stream, state) { + function chain(parser) { + state.tokenize = parser; + return parser(stream, state); + } + + var ch = stream.next(); + if (ch == "<") { + if (stream.eat("!")) { + if (stream.eat("[")) { + if (stream.match("CDATA[")) return chain(inBlock("atom", "]]>")); + else return null; + } else if (stream.match("--")) { + return chain(inBlock("comment", "-->")); + } else if (stream.match("DOCTYPE", true, true)) { + stream.eatWhile(/[\w\._\-]/); + return chain(doctype(1)); + } else { + return null; + } + } else if (stream.eat("?")) { + stream.eatWhile(/[\w\._\-]/); + state.tokenize = inBlock("meta", "?>"); + return "meta"; + } else { + var isClose = stream.eat("/"); + tagName = ""; + var c; + while ((c = stream.eat(/[^\s\u00a0=<>\"\'\/?]/))) tagName += c; + if (!tagName) return "tag error"; + type = isClose ? "closeTag" : "openTag"; + state.tokenize = inTag; + return "tag"; + } + } else if (ch == "&") { + var ok; + if (stream.eat("#")) { + if (stream.eat("x")) { + ok = stream.eatWhile(/[a-fA-F\d]/) && stream.eat(";"); + } else { + ok = stream.eatWhile(/[\d]/) && stream.eat(";"); + } + } else { + ok = stream.eatWhile(/[\w\.\-:]/) && stream.eat(";"); + } + return ok ? "atom" : "error"; + } else { + stream.eatWhile(/[^&<]/); + return null; + } + } + + function inTag(stream, state) { + var ch = stream.next(); + if (ch == ">" || (ch == "/" && stream.eat(">"))) { + state.tokenize = inText; + type = ch == ">" ? "endTag" : "selfcloseTag"; + return "tag"; + } else if (ch == "=") { + type = "equals"; + return null; + } else if (ch == "<") { + state.tokenize = inText; + var next = state.tokenize(stream, state); + return next ? next + " error" : "error"; + } else if (/[\'\"]/.test(ch)) { + state.tokenize = inAttribute(ch); + state.stringStartCol = stream.column(); + return state.tokenize(stream, state); + } else { + stream.eatWhile(/[^\s\u00a0=<>\"\']/); + return "word"; + } + } + + function inAttribute(quote) { + var closure = function(stream, state) { + while (!stream.eol()) { + if (stream.next() == quote) { + state.tokenize = inTag; + break; + } + } + return "string"; + }; + closure.isInAttribute = true; + return closure; + } + + function inBlock(style, terminator) { + return function(stream, state) { + while (!stream.eol()) { + if (stream.match(terminator)) { + state.tokenize = inText; + break; + } + stream.next(); + } + return style; + }; + } + function doctype(depth) { + return function(stream, state) { + var ch; + while ((ch = stream.next()) != null) { + if (ch == "<") { + state.tokenize = doctype(depth + 1); + return state.tokenize(stream, state); + } else if (ch == ">") { + if (depth == 1) { + state.tokenize = inText; + break; + } else { + state.tokenize = doctype(depth - 1); + return state.tokenize(stream, state); + } + } + } + return "meta"; + }; + } + + var curState, curStream, setStyle; + function pass() { + for (var i = arguments.length - 1; i >= 0; i--) curState.cc.push(arguments[i]); + } + function cont() { + pass.apply(null, arguments); + return true; + } + + function pushContext(tagName, startOfLine) { + var noIndent = Kludges.doNotIndent.hasOwnProperty(tagName) || (curState.context && curState.context.noIndent); + curState.context = { + prev: curState.context, + tagName: tagName, + indent: curState.indented, + startOfLine: startOfLine, + noIndent: noIndent + }; + } + function popContext() { + if (curState.context) curState.context = curState.context.prev; + } + + function element(type) { + if (type == "openTag") { + curState.tagName = tagName; + curState.tagStart = curStream.column(); + return cont(attributes, endtag(curState.startOfLine)); + } else if (type == "closeTag") { + var err = false; + if (curState.context) { + if (curState.context.tagName != tagName) { + if (Kludges.implicitlyClosed.hasOwnProperty(curState.context.tagName.toLowerCase())) { + popContext(); + } + err = !curState.context || curState.context.tagName != tagName; + } + } else { + err = true; + } + if (err) setStyle = "error"; + return cont(endclosetag(err)); + } + return cont(); + } + function endtag(startOfLine) { + return function(type) { + var tagName = curState.tagName; + curState.tagName = curState.tagStart = null; + if (type == "selfcloseTag" || + (type == "endTag" && Kludges.autoSelfClosers.hasOwnProperty(tagName.toLowerCase()))) { + maybePopContext(tagName.toLowerCase()); + return cont(); + } + if (type == "endTag") { + maybePopContext(tagName.toLowerCase()); + pushContext(tagName, startOfLine); + return cont(); + } + return cont(); + }; + } + function endclosetag(err) { + return function(type) { + if (err) setStyle = "error"; + if (type == "endTag") { popContext(); return cont(); } + setStyle = "error"; + return cont(arguments.callee); + }; + } + function maybePopContext(nextTagName) { + var parentTagName; + while (true) { + if (!curState.context) { + return; + } + parentTagName = curState.context.tagName.toLowerCase(); + if (!Kludges.contextGrabbers.hasOwnProperty(parentTagName) || + !Kludges.contextGrabbers[parentTagName].hasOwnProperty(nextTagName)) { + return; + } + popContext(); + } + } + + function attributes(type) { + if (type == "word") {setStyle = "attribute"; return cont(attribute, attributes);} + if (type == "endTag" || type == "selfcloseTag") return pass(); + setStyle = "error"; + return cont(attributes); + } + function attribute(type) { + if (type == "equals") return cont(attvalue, attributes); + if (!Kludges.allowMissing) setStyle = "error"; + else if (type == "word") {setStyle = "attribute"; return cont(attribute, attributes);} + return (type == "endTag" || type == "selfcloseTag") ? pass() : cont(); + } + function attvalue(type) { + if (type == "string") return cont(attvaluemaybe); + if (type == "word" && Kludges.allowUnquoted) {setStyle = "string"; return cont();} + setStyle = "error"; + return (type == "endTag" || type == "selfCloseTag") ? pass() : cont(); + } + function attvaluemaybe(type) { + if (type == "string") return cont(attvaluemaybe); + else return pass(); + } + + return { + startState: function() { + return {tokenize: inText, cc: [], indented: 0, startOfLine: true, tagName: null, tagStart: null, context: null}; + }, + + token: function(stream, state) { + if (!state.tagName && stream.sol()) { + state.startOfLine = true; + state.indented = stream.indentation(); + } + if (stream.eatSpace()) return null; + + setStyle = type = tagName = null; + var style = state.tokenize(stream, state); + state.type = type; + if ((style || type) && style != "comment") { + curState = state; curStream = stream; + while (true) { + var comb = state.cc.pop() || element; + if (comb(type || style)) break; + } + } + state.startOfLine = false; + if (setStyle) + style = setStyle == "error" ? style + " error" : setStyle; + return style; + }, + + indent: function(state, textAfter, fullLine) { + var context = state.context; + // Indent multi-line strings (e.g. css). + if (state.tokenize.isInAttribute) { + return state.stringStartCol + 1; + } + if ((state.tokenize != inTag && state.tokenize != inText) || + context && context.noIndent) + return fullLine ? fullLine.match(/^(\s*)/)[0].length : 0; + // Indent the starts of attribute names. + if (state.tagName) { + if (multilineTagIndentPastTag) + return state.tagStart + state.tagName.length + 2; + else + return state.tagStart + indentUnit * multilineTagIndentFactor; + } + if (alignCDATA && /", + + configuration: parserConfig.htmlMode ? "html" : "xml", + helperType: parserConfig.htmlMode ? "html" : "xml" + }; +}); + +CodeMirror.defineMIME("text/xml", "xml"); +CodeMirror.defineMIME("application/xml", "xml"); +if (!CodeMirror.mimeModes.hasOwnProperty("text/html")) + CodeMirror.defineMIME("text/html", {name: "xml", htmlMode: true}); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/xquery/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/xquery/index.html new file mode 100644 index 00000000..3baf5e3e --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/xquery/index.html @@ -0,0 +1,210 @@ + + +CodeMirror: XQuery mode + + + + + + + + + + +
    +

    XQuery mode

    + + +
    + +
    + + + +

    MIME types defined: application/xquery.

    + +

    Development of the CodeMirror XQuery mode was sponsored by + MarkLogic and developed by + Mike Brevoort. +

    + +
    diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/xquery/test.js b/pitfall/pdfkit/node_modules/codemirror/mode/xquery/test.js new file mode 100644 index 00000000..41719dd1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/xquery/test.js @@ -0,0 +1,64 @@ +// Don't take these too seriously -- the expected results appear to be +// based on the results of actual runs without any serious manual +// verification. If a change you made causes them to fail, the test is +// as likely to wrong as the code. + +(function() { + var mode = CodeMirror.getMode({tabSize: 4}, "xquery"); + function MT(name) { test.mode(name, mode, Array.prototype.slice.call(arguments, 1)); } + + MT("eviltest", + "[keyword xquery] [keyword version] [variable "1][keyword .][atom 0][keyword -][variable ml"][def&variable ;] [comment (: this is : a \"comment\" :)]", + " [keyword let] [variable $let] [keyword :=] [variable <x] [variable attr][keyword =][variable "value">"test"<func>][def&variable ;function]() [variable $var] {[keyword function]()} {[variable $var]}[variable <][keyword /][variable func><][keyword /][variable x>]", + " [keyword let] [variable $joe][keyword :=][atom 1]", + " [keyword return] [keyword element] [variable element] {", + " [keyword attribute] [variable attribute] { [atom 1] },", + " [keyword element] [variable test] { [variable 'a'] }, [keyword attribute] [variable foo] { [variable "bar"] },", + " [def&variable fn:doc]()[[ [variable foo][keyword /][variable @bar] [keyword eq] [variable $let] ]],", + " [keyword //][variable x] } [comment (: a more 'evil' test :)]", + " [comment (: Modified Blakeley example (: with nested comment :) ... :)]", + " [keyword declare] [keyword private] [keyword function] [def&variable local:declare]() {()}[variable ;]", + " [keyword declare] [keyword private] [keyword function] [def&variable local:private]() {()}[variable ;]", + " [keyword declare] [keyword private] [keyword function] [def&variable local:function]() {()}[variable ;]", + " [keyword declare] [keyword private] [keyword function] [def&variable local:local]() {()}[variable ;]", + " [keyword let] [variable $let] [keyword :=] [variable <let>let] [variable $let] [keyword :=] [variable "let"<][keyword /let][variable >]", + " [keyword return] [keyword element] [variable element] {", + " [keyword attribute] [variable attribute] { [keyword try] { [def&variable xdmp:version]() } [keyword catch]([variable $e]) { [def&variable xdmp:log]([variable $e]) } },", + " [keyword attribute] [variable fn:doc] { [variable "bar"] [variable castable] [keyword as] [atom xs:string] },", + " [keyword element] [variable text] { [keyword text] { [variable "text"] } },", + " [def&variable fn:doc]()[[ [qualifier child::][variable eq][keyword /]([variable @bar] [keyword |] [qualifier attribute::][variable attribute]) [keyword eq] [variable $let] ]],", + " [keyword //][variable fn:doc]", + " }"); + + MT("testEmptySequenceKeyword", + "[string \"foo\"] [keyword instance] [keyword of] [keyword empty-sequence]()"); + + MT("testMultiAttr", + "[tag

    ][variable hello] [variable world][tag

    ]"); + + MT("test namespaced variable", + "[keyword declare] [keyword namespace] [variable e] [keyword =] [string \"http://example.com/ANamespace\"][variable ;declare] [keyword variable] [variable $e:exampleComThisVarIsNotRecognized] [keyword as] [keyword element]([keyword *]) [variable external;]"); + + MT("test EQName variable", + "[keyword declare] [keyword variable] [variable $\"http://www.example.com/ns/my\":var] [keyword :=] [atom 12][variable ;]", + "[tag ]{[variable $\"http://www.example.com/ns/my\":var]}[tag ]"); + + MT("test EQName function", + "[keyword declare] [keyword function] [def&variable \"http://www.example.com/ns/my\":fn] ([variable $a] [keyword as] [atom xs:integer]) [keyword as] [atom xs:integer] {", + " [variable $a] [keyword +] [atom 2]", + "}[variable ;]", + "[tag ]{[def&variable \"http://www.example.com/ns/my\":fn]([atom 12])}[tag ]"); + + MT("test EQName function with single quotes", + "[keyword declare] [keyword function] [def&variable 'http://www.example.com/ns/my':fn] ([variable $a] [keyword as] [atom xs:integer]) [keyword as] [atom xs:integer] {", + " [variable $a] [keyword +] [atom 2]", + "}[variable ;]", + "[tag ]{[def&variable 'http://www.example.com/ns/my':fn]([atom 12])}[tag ]"); + + MT("testProcessingInstructions", + "[def&variable data]([comment&meta ]) [keyword instance] [keyword of] [atom xs:string]"); + + MT("testQuoteEscapeDouble", + "[keyword let] [variable $rootfolder] [keyword :=] [string \"c:\\builds\\winnt\\HEAD\\qa\\scripts\\\"]", + "[keyword let] [variable $keysfolder] [keyword :=] [def&variable concat]([variable $rootfolder], [string \"keys\\\"])"); +})(); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/xquery/xquery.js b/pitfall/pdfkit/node_modules/codemirror/mode/xquery/xquery.js new file mode 100644 index 00000000..be179846 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/xquery/xquery.js @@ -0,0 +1,432 @@ +CodeMirror.defineMode("xquery", function() { + + // The keywords object is set to the result of this self executing + // function. Each keyword is a property of the keywords object whose + // value is {type: atype, style: astyle} + var keywords = function(){ + // conveinence functions used to build keywords object + function kw(type) {return {type: type, style: "keyword"};} + var A = kw("keyword a") + , B = kw("keyword b") + , C = kw("keyword c") + , operator = kw("operator") + , atom = {type: "atom", style: "atom"} + , punctuation = {type: "punctuation", style: null} + , qualifier = {type: "axis_specifier", style: "qualifier"}; + + // kwObj is what is return from this function at the end + var kwObj = { + 'if': A, 'switch': A, 'while': A, 'for': A, + 'else': B, 'then': B, 'try': B, 'finally': B, 'catch': B, + 'element': C, 'attribute': C, 'let': C, 'implements': C, 'import': C, 'module': C, 'namespace': C, + 'return': C, 'super': C, 'this': C, 'throws': C, 'where': C, 'private': C, + ',': punctuation, + 'null': atom, 'fn:false()': atom, 'fn:true()': atom + }; + + // a list of 'basic' keywords. For each add a property to kwObj with the value of + // {type: basic[i], style: "keyword"} e.g. 'after' --> {type: "after", style: "keyword"} + var basic = ['after','ancestor','ancestor-or-self','and','as','ascending','assert','attribute','before', + 'by','case','cast','child','comment','declare','default','define','descendant','descendant-or-self', + 'descending','document','document-node','element','else','eq','every','except','external','following', + 'following-sibling','follows','for','function','if','import','in','instance','intersect','item', + 'let','module','namespace','node','node','of','only','or','order','parent','precedes','preceding', + 'preceding-sibling','processing-instruction','ref','return','returns','satisfies','schema','schema-element', + 'self','some','sortby','stable','text','then','to','treat','typeswitch','union','variable','version','where', + 'xquery', 'empty-sequence']; + for(var i=0, l=basic.length; i < l; i++) { kwObj[basic[i]] = kw(basic[i]);}; + + // a list of types. For each add a property to kwObj with the value of + // {type: "atom", style: "atom"} + var types = ['xs:string', 'xs:float', 'xs:decimal', 'xs:double', 'xs:integer', 'xs:boolean', 'xs:date', 'xs:dateTime', + 'xs:time', 'xs:duration', 'xs:dayTimeDuration', 'xs:time', 'xs:yearMonthDuration', 'numeric', 'xs:hexBinary', + 'xs:base64Binary', 'xs:anyURI', 'xs:QName', 'xs:byte','xs:boolean','xs:anyURI','xf:yearMonthDuration']; + for(var i=0, l=types.length; i < l; i++) { kwObj[types[i]] = atom;}; + + // each operator will add a property to kwObj with value of {type: "operator", style: "keyword"} + var operators = ['eq', 'ne', 'lt', 'le', 'gt', 'ge', ':=', '=', '>', '>=', '<', '<=', '.', '|', '?', 'and', 'or', 'div', 'idiv', 'mod', '*', '/', '+', '-']; + for(var i=0, l=operators.length; i < l; i++) { kwObj[operators[i]] = operator;}; + + // each axis_specifiers will add a property to kwObj with value of {type: "axis_specifier", style: "qualifier"} + var axis_specifiers = ["self::", "attribute::", "child::", "descendant::", "descendant-or-self::", "parent::", + "ancestor::", "ancestor-or-self::", "following::", "preceding::", "following-sibling::", "preceding-sibling::"]; + for(var i=0, l=axis_specifiers.length; i < l; i++) { kwObj[axis_specifiers[i]] = qualifier; }; + + return kwObj; + }(); + + // Used as scratch variables to communicate multiple values without + // consing up tons of objects. + var type, content; + + function ret(tp, style, cont) { + type = tp; content = cont; + return style; + } + + function chain(stream, state, f) { + state.tokenize = f; + return f(stream, state); + } + + // the primary mode tokenizer + function tokenBase(stream, state) { + var ch = stream.next(), + mightBeFunction = false, + isEQName = isEQNameAhead(stream); + + // an XML tag (if not in some sub, chained tokenizer) + if (ch == "<") { + if(stream.match("!--", true)) + return chain(stream, state, tokenXMLComment); + + if(stream.match("![CDATA", false)) { + state.tokenize = tokenCDATA; + return ret("tag", "tag"); + } + + if(stream.match("?", false)) { + return chain(stream, state, tokenPreProcessing); + } + + var isclose = stream.eat("/"); + stream.eatSpace(); + var tagName = "", c; + while ((c = stream.eat(/[^\s\u00a0=<>\"\'\/?]/))) tagName += c; + + return chain(stream, state, tokenTag(tagName, isclose)); + } + // start code block + else if(ch == "{") { + pushStateStack(state,{ type: "codeblock"}); + return ret("", null); + } + // end code block + else if(ch == "}") { + popStateStack(state); + return ret("", null); + } + // if we're in an XML block + else if(isInXmlBlock(state)) { + if(ch == ">") + return ret("tag", "tag"); + else if(ch == "/" && stream.eat(">")) { + popStateStack(state); + return ret("tag", "tag"); + } + else + return ret("word", "variable"); + } + // if a number + else if (/\d/.test(ch)) { + stream.match(/^\d*(?:\.\d*)?(?:E[+\-]?\d+)?/); + return ret("number", "atom"); + } + // comment start + else if (ch === "(" && stream.eat(":")) { + pushStateStack(state, { type: "comment"}); + return chain(stream, state, tokenComment); + } + // quoted string + else if ( !isEQName && (ch === '"' || ch === "'")) + return chain(stream, state, tokenString(ch)); + // variable + else if(ch === "$") { + return chain(stream, state, tokenVariable); + } + // assignment + else if(ch ===":" && stream.eat("=")) { + return ret("operator", "keyword"); + } + // open paren + else if(ch === "(") { + pushStateStack(state, { type: "paren"}); + return ret("", null); + } + // close paren + else if(ch === ")") { + popStateStack(state); + return ret("", null); + } + // open paren + else if(ch === "[") { + pushStateStack(state, { type: "bracket"}); + return ret("", null); + } + // close paren + else if(ch === "]") { + popStateStack(state); + return ret("", null); + } + else { + var known = keywords.propertyIsEnumerable(ch) && keywords[ch]; + + // if there's a EQName ahead, consume the rest of the string portion, it's likely a function + if(isEQName && ch === '\"') while(stream.next() !== '"'){} + if(isEQName && ch === '\'') while(stream.next() !== '\''){} + + // gobble up a word if the character is not known + if(!known) stream.eatWhile(/[\w\$_-]/); + + // gobble a colon in the case that is a lib func type call fn:doc + var foundColon = stream.eat(":"); + + // if there's not a second colon, gobble another word. Otherwise, it's probably an axis specifier + // which should get matched as a keyword + if(!stream.eat(":") && foundColon) { + stream.eatWhile(/[\w\$_-]/); + } + // if the next non whitespace character is an open paren, this is probably a function (if not a keyword of other sort) + if(stream.match(/^[ \t]*\(/, false)) { + mightBeFunction = true; + } + // is the word a keyword? + var word = stream.current(); + known = keywords.propertyIsEnumerable(word) && keywords[word]; + + // if we think it's a function call but not yet known, + // set style to variable for now for lack of something better + if(mightBeFunction && !known) known = {type: "function_call", style: "variable def"}; + + // if the previous word was element, attribute, axis specifier, this word should be the name of that + if(isInXmlConstructor(state)) { + popStateStack(state); + return ret("word", "variable", word); + } + // as previously checked, if the word is element,attribute, axis specifier, call it an "xmlconstructor" and + // push the stack so we know to look for it on the next word + if(word == "element" || word == "attribute" || known.type == "axis_specifier") pushStateStack(state, {type: "xmlconstructor"}); + + // if the word is known, return the details of that else just call this a generic 'word' + return known ? ret(known.type, known.style, word) : + ret("word", "variable", word); + } + } + + // handle comments, including nested + function tokenComment(stream, state) { + var maybeEnd = false, maybeNested = false, nestedCount = 0, ch; + while (ch = stream.next()) { + if (ch == ")" && maybeEnd) { + if(nestedCount > 0) + nestedCount--; + else { + popStateStack(state); + break; + } + } + else if(ch == ":" && maybeNested) { + nestedCount++; + } + maybeEnd = (ch == ":"); + maybeNested = (ch == "("); + } + + return ret("comment", "comment"); + } + + // tokenizer for string literals + // optionally pass a tokenizer function to set state.tokenize back to when finished + function tokenString(quote, f) { + return function(stream, state) { + var ch; + + if(isInString(state) && stream.current() == quote) { + popStateStack(state); + if(f) state.tokenize = f; + return ret("string", "string"); + } + + pushStateStack(state, { type: "string", name: quote, tokenize: tokenString(quote, f) }); + + // if we're in a string and in an XML block, allow an embedded code block + if(stream.match("{", false) && isInXmlAttributeBlock(state)) { + state.tokenize = tokenBase; + return ret("string", "string"); + } + + + while (ch = stream.next()) { + if (ch == quote) { + popStateStack(state); + if(f) state.tokenize = f; + break; + } + else { + // if we're in a string and in an XML block, allow an embedded code block in an attribute + if(stream.match("{", false) && isInXmlAttributeBlock(state)) { + state.tokenize = tokenBase; + return ret("string", "string"); + } + + } + } + + return ret("string", "string"); + }; + } + + // tokenizer for variables + function tokenVariable(stream, state) { + var isVariableChar = /[\w\$_-]/; + + // a variable may start with a quoted EQName so if the next character is quote, consume to the next quote + if(stream.eat("\"")) { + while(stream.next() !== '\"'){}; + stream.eat(":"); + } else { + stream.eatWhile(isVariableChar); + if(!stream.match(":=", false)) stream.eat(":"); + } + stream.eatWhile(isVariableChar); + state.tokenize = tokenBase; + return ret("variable", "variable"); + } + + // tokenizer for XML tags + function tokenTag(name, isclose) { + return function(stream, state) { + stream.eatSpace(); + if(isclose && stream.eat(">")) { + popStateStack(state); + state.tokenize = tokenBase; + return ret("tag", "tag"); + } + // self closing tag without attributes? + if(!stream.eat("/")) + pushStateStack(state, { type: "tag", name: name, tokenize: tokenBase}); + if(!stream.eat(">")) { + state.tokenize = tokenAttribute; + return ret("tag", "tag"); + } + else { + state.tokenize = tokenBase; + } + return ret("tag", "tag"); + }; + } + + // tokenizer for XML attributes + function tokenAttribute(stream, state) { + var ch = stream.next(); + + if(ch == "/" && stream.eat(">")) { + if(isInXmlAttributeBlock(state)) popStateStack(state); + if(isInXmlBlock(state)) popStateStack(state); + return ret("tag", "tag"); + } + if(ch == ">") { + if(isInXmlAttributeBlock(state)) popStateStack(state); + return ret("tag", "tag"); + } + if(ch == "=") + return ret("", null); + // quoted string + if (ch == '"' || ch == "'") + return chain(stream, state, tokenString(ch, tokenAttribute)); + + if(!isInXmlAttributeBlock(state)) + pushStateStack(state, { type: "attribute", tokenize: tokenAttribute}); + + stream.eat(/[a-zA-Z_:]/); + stream.eatWhile(/[-a-zA-Z0-9_:.]/); + stream.eatSpace(); + + // the case where the attribute has not value and the tag was closed + if(stream.match(">", false) || stream.match("/", false)) { + popStateStack(state); + state.tokenize = tokenBase; + } + + return ret("attribute", "attribute"); + } + + // handle comments, including nested + function tokenXMLComment(stream, state) { + var ch; + while (ch = stream.next()) { + if (ch == "-" && stream.match("->", true)) { + state.tokenize = tokenBase; + return ret("comment", "comment"); + } + } + } + + + // handle CDATA + function tokenCDATA(stream, state) { + var ch; + while (ch = stream.next()) { + if (ch == "]" && stream.match("]", true)) { + state.tokenize = tokenBase; + return ret("comment", "comment"); + } + } + } + + // handle preprocessing instructions + function tokenPreProcessing(stream, state) { + var ch; + while (ch = stream.next()) { + if (ch == "?" && stream.match(">", true)) { + state.tokenize = tokenBase; + return ret("comment", "comment meta"); + } + } + } + + + // functions to test the current context of the state + function isInXmlBlock(state) { return isIn(state, "tag"); } + function isInXmlAttributeBlock(state) { return isIn(state, "attribute"); } + function isInXmlConstructor(state) { return isIn(state, "xmlconstructor"); } + function isInString(state) { return isIn(state, "string"); } + + function isEQNameAhead(stream) { + // assume we've already eaten a quote (") + if(stream.current() === '"') + return stream.match(/^[^\"]+\"\:/, false); + else if(stream.current() === '\'') + return stream.match(/^[^\"]+\'\:/, false); + else + return false; + } + + function isIn(state, type) { + return (state.stack.length && state.stack[state.stack.length - 1].type == type); + } + + function pushStateStack(state, newState) { + state.stack.push(newState); + } + + function popStateStack(state) { + state.stack.pop(); + var reinstateTokenize = state.stack.length && state.stack[state.stack.length-1].tokenize; + state.tokenize = reinstateTokenize || tokenBase; + } + + // the interface for the mode API + return { + startState: function() { + return { + tokenize: tokenBase, + cc: [], + stack: [] + }; + }, + + token: function(stream, state) { + if (stream.eatSpace()) return null; + var style = state.tokenize(stream, state); + return style; + }, + + blockCommentStart: "(:", + blockCommentEnd: ":)" + + }; + +}); + +CodeMirror.defineMIME("application/xquery", "xquery"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/yaml/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/yaml/index.html new file mode 100644 index 00000000..bbb40a3c --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/yaml/index.html @@ -0,0 +1,80 @@ + + +CodeMirror: YAML mode + + + + + + + + + +
    +

    YAML mode

    +
    + + +

    MIME types defined: text/x-yaml.

    + +
    diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/yaml/yaml.js b/pitfall/pdfkit/node_modules/codemirror/mode/yaml/yaml.js new file mode 100644 index 00000000..efacd7d5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/yaml/yaml.js @@ -0,0 +1,97 @@ +CodeMirror.defineMode("yaml", function() { + + var cons = ['true', 'false', 'on', 'off', 'yes', 'no']; + var keywordRegex = new RegExp("\\b(("+cons.join(")|(")+"))$", 'i'); + + return { + token: function(stream, state) { + var ch = stream.peek(); + var esc = state.escaped; + state.escaped = false; + /* comments */ + if (ch == "#" && (stream.pos == 0 || /\s/.test(stream.string.charAt(stream.pos - 1)))) { + stream.skipToEnd(); return "comment"; + } + if (state.literal && stream.indentation() > state.keyCol) { + stream.skipToEnd(); return "string"; + } else if (state.literal) { state.literal = false; } + if (stream.sol()) { + state.keyCol = 0; + state.pair = false; + state.pairStart = false; + /* document start */ + if(stream.match(/---/)) { return "def"; } + /* document end */ + if (stream.match(/\.\.\./)) { return "def"; } + /* array list item */ + if (stream.match(/\s*-\s+/)) { return 'meta'; } + } + /* inline pairs/lists */ + if (stream.match(/^(\{|\}|\[|\])/)) { + if (ch == '{') + state.inlinePairs++; + else if (ch == '}') + state.inlinePairs--; + else if (ch == '[') + state.inlineList++; + else + state.inlineList--; + return 'meta'; + } + + /* list seperator */ + if (state.inlineList > 0 && !esc && ch == ',') { + stream.next(); + return 'meta'; + } + /* pairs seperator */ + if (state.inlinePairs > 0 && !esc && ch == ',') { + state.keyCol = 0; + state.pair = false; + state.pairStart = false; + stream.next(); + return 'meta'; + } + + /* start of value of a pair */ + if (state.pairStart) { + /* block literals */ + if (stream.match(/^\s*(\||\>)\s*/)) { state.literal = true; return 'meta'; }; + /* references */ + if (stream.match(/^\s*(\&|\*)[a-z0-9\._-]+\b/i)) { return 'variable-2'; } + /* numbers */ + if (state.inlinePairs == 0 && stream.match(/^\s*-?[0-9\.\,]+\s?$/)) { return 'number'; } + if (state.inlinePairs > 0 && stream.match(/^\s*-?[0-9\.\,]+\s?(?=(,|}))/)) { return 'number'; } + /* keywords */ + if (stream.match(keywordRegex)) { return 'keyword'; } + } + + /* pairs (associative arrays) -> key */ + if (!state.pair && stream.match(/^\s*\S+(?=\s*:($|\s))/i)) { + state.pair = true; + state.keyCol = stream.indentation(); + return "atom"; + } + if (state.pair && stream.match(/^:\s*/)) { state.pairStart = true; return 'meta'; } + + /* nothing found, continue */ + state.pairStart = false; + state.escaped = (ch == '\\'); + stream.next(); + return null; + }, + startState: function() { + return { + pair: false, + pairStart: false, + keyCol: 0, + inlinePairs: 0, + inlineList: 0, + literal: false, + escaped: false + }; + } + }; +}); + +CodeMirror.defineMIME("text/x-yaml", "yaml"); diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/z80/index.html b/pitfall/pdfkit/node_modules/codemirror/mode/z80/index.html new file mode 100644 index 00000000..b63c9621 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/z80/index.html @@ -0,0 +1,52 @@ + + +CodeMirror: Z80 assembly mode + + + + + + + + + +
    +

    Z80 assembly mode

    + + +
    + + + +

    MIME type defined: text/x-z80.

    +
    diff --git a/pitfall/pdfkit/node_modules/codemirror/mode/z80/z80.js b/pitfall/pdfkit/node_modules/codemirror/mode/z80/z80.js new file mode 100644 index 00000000..ff43d32b --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/mode/z80/z80.js @@ -0,0 +1,85 @@ +CodeMirror.defineMode('z80', function() { + var keywords1 = /^(exx?|(ld|cp|in)([di]r?)?|pop|push|ad[cd]|cpl|daa|dec|inc|neg|sbc|sub|and|bit|[cs]cf|x?or|res|set|r[lr]c?a?|r[lr]d|s[lr]a|srl|djnz|nop|rst|[de]i|halt|im|ot[di]r|out[di]?)\b/i; + var keywords2 = /^(call|j[pr]|ret[in]?)\b/i; + var keywords3 = /^b_?(call|jump)\b/i; + var variables1 = /^(af?|bc?|c|de?|e|hl?|l|i[xy]?|r|sp)\b/i; + var variables2 = /^(n?[zc]|p[oe]?|m)\b/i; + var errors = /^([hl][xy]|i[xy][hl]|slia|sll)\b/i; + var numbers = /^([\da-f]+h|[0-7]+o|[01]+b|\d+)\b/i; + + return { + startState: function() { + return {context: 0}; + }, + token: function(stream, state) { + if (!stream.column()) + state.context = 0; + + if (stream.eatSpace()) + return null; + + var w; + + if (stream.eatWhile(/\w/)) { + w = stream.current(); + + if (stream.indentation()) { + if (state.context == 1 && variables1.test(w)) + return 'variable-2'; + + if (state.context == 2 && variables2.test(w)) + return 'variable-3'; + + if (keywords1.test(w)) { + state.context = 1; + return 'keyword'; + } else if (keywords2.test(w)) { + state.context = 2; + return 'keyword'; + } else if (keywords3.test(w)) { + state.context = 3; + return 'keyword'; + } + + if (errors.test(w)) + return 'error'; + } else if (numbers.test(w)) { + return 'number'; + } else { + return null; + } + } else if (stream.eat(';')) { + stream.skipToEnd(); + return 'comment'; + } else if (stream.eat('"')) { + while (w = stream.next()) { + if (w == '"') + break; + + if (w == '\\') + stream.next(); + } + return 'string'; + } else if (stream.eat('\'')) { + if (stream.match(/\\?.'/)) + return 'number'; + } else if (stream.eat('.') || stream.sol() && stream.eat('#')) { + state.context = 4; + + if (stream.eatWhile(/\w/)) + return 'def'; + } else if (stream.eat('$')) { + if (stream.eatWhile(/[\da-f]/i)) + return 'number'; + } else if (stream.eat('%')) { + if (stream.eatWhile(/[01]/)) + return 'number'; + } else { + stream.next(); + } + return null; + } + }; +}); + +CodeMirror.defineMIME("text/x-z80", "z80"); diff --git a/pitfall/pdfkit/node_modules/codemirror/package.json b/pitfall/pdfkit/node_modules/codemirror/package.json new file mode 100644 index 00000000..810ffd39 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/package.json @@ -0,0 +1,853 @@ +{ + "_args": [ + [ + { + "raw": "codemirror@~3.20.0", + "scope": null, + "escapedName": "codemirror", + "name": "codemirror", + "rawSpec": "~3.20.0", + "spec": ">=3.20.0 <3.21.0", + "type": "range" + }, + "/Users/MB/git/pdfkit" + ] + ], + "_from": "codemirror@>=3.20.0 <3.21.0", + "_id": "codemirror@3.20.0", + "_inCache": true, + "_location": "/codemirror", + "_npmUser": { + "name": "marijn", + "email": "marijnh@gmail.com" + }, + "_npmVersion": "1.1.59", + "_phantomChildren": {}, + "_requested": { + "raw": "codemirror@~3.20.0", + "scope": null, + "escapedName": "codemirror", + "name": "codemirror", + "rawSpec": "~3.20.0", + "spec": ">=3.20.0 <3.21.0", + "type": "range" + }, + "_requiredBy": [ + "#DEV:/" + ], + "_resolved": "https://registry.npmjs.org/codemirror/-/codemirror-3.20.0.tgz", + "_shasum": "2e10326c2f0bf043b1ede32fdbc06ddfab801c62", + "_shrinkwrap": null, + "_spec": "codemirror@~3.20.0", + "_where": "/Users/MB/git/pdfkit", + "bugs": { + "url": "http://github.com/marijnh/CodeMirror/issues" + }, + "contributors": [ + { + "name": "List of CodeMirror contributors. Updated before every release." + }, + { + "name": "4r2r" + }, + { + "name": "Aaron Brooks" + }, + { + "name": "Adam King" + }, + { + "name": "adanlobato" + }, + { + "name": "Adán Lobato" + }, + { + "name": "aeroson" + }, + { + "name": "Ahmad Amireh" + }, + { + "name": "Ahmad M. Zawawi" + }, + { + "name": "ahoward" + }, + { + "name": "Akeksandr Motsjonov" + }, + { + "name": "Albert Xing" + }, + { + "name": "Alexander Pavlov" + }, + { + "name": "Alexander Schepanovski" + }, + { + "name": "alexey-k" + }, + { + "name": "Alex Piggott" + }, + { + "name": "Amy" + }, + { + "name": "Ananya Sen" + }, + { + "name": "AndersMad" + }, + { + "name": "Andre von Houck" + }, + { + "name": "Andrey Lushnikov" + }, + { + "name": "Andy Kimball" + }, + { + "name": "Andy Li" + }, + { + "name": "angelozerr" + }, + { + "name": "angelo.zerr@gmail.com" + }, + { + "name": "Ankit Ahuja" + }, + { + "name": "Ansel Santosa" + }, + { + "name": "Anthony Grimes" + }, + { + "name": "areos" + }, + { + "name": "Atul Bhouraskar" + }, + { + "name": "Aurelian Oancea" + }, + { + "name": "Bastian Müller" + }, + { + "name": "benbro" + }, + { + "name": "Benjamin DeCoste" + }, + { + "name": "Ben Keen" + }, + { + "name": "boomyjee" + }, + { + "name": "borawjm" + }, + { + "name": "Brandon Frohs" + }, + { + "name": "Brett Zamir" + }, + { + "name": "Brian Sletten" + }, + { + "name": "Bruce Mitchener" + }, + { + "name": "Chandra Sekhar Pydi" + }, + { + "name": "Charles Skelton" + }, + { + "name": "Chris Coyier" + }, + { + "name": "Chris Granger" + }, + { + "name": "Chris Morgan" + }, + { + "name": "Christopher Brown" + }, + { + "name": "ciaranj" + }, + { + "name": "CodeAnimal" + }, + { + "name": "ComFreek" + }, + { + "name": "dagsta" + }, + { + "name": "Dan Heberden" + }, + { + "name": "Daniel, Dao Quang Minh" + }, + { + "name": "Daniel Faust" + }, + { + "name": "Daniel Huigens" + }, + { + "name": "Daniel Neel" + }, + { + "name": "Daniel Parnell" + }, + { + "name": "Danny Yoo" + }, + { + "name": "David Mignot" + }, + { + "name": "David Pathakjee" + }, + { + "name": "deebugger" + }, + { + "name": "Deep Thought" + }, + { + "name": "Dominator008" + }, + { + "name": "Domizio Demichelis" + }, + { + "name": "Drew Bratcher" + }, + { + "name": "Drew Hintz" + }, + { + "name": "Drew Khoury" + }, + { + "name": "Dror BG" + }, + { + "name": "duralog" + }, + { + "name": "edsharp" + }, + { + "name": "ekhaled" + }, + { + "name": "Eric Allam" + }, + { + "name": "eustas" + }, + { + "name": "Fauntleroy" + }, + { + "name": "fbuchinger" + }, + { + "name": "feizhang365" + }, + { + "name": "Felipe Lalanne" + }, + { + "name": "Felix Raab" + }, + { + "name": "Filip Noetzel" + }, + { + "name": "flack" + }, + { + "name": "ForbesLindesay" + }, + { + "name": "Ford_Lawnmower" + }, + { + "name": "Gabriel Nahmias" + }, + { + "name": "galambalazs" + }, + { + "name": "Gautam Mehta" + }, + { + "name": "Glenn Jorde" + }, + { + "name": "Glenn Ruehle" + }, + { + "name": "Golevka" + }, + { + "name": "Gordon Smith" + }, + { + "name": "greengiant" + }, + { + "name": "Guillaume Massé" + }, + { + "name": "Guillaume Massé" + }, + { + "name": "Hans Engel" + }, + { + "name": "Hardest" + }, + { + "name": "Hasan Karahan" + }, + { + "name": "Hocdoc" + }, + { + "name": "Ian Beck" + }, + { + "name": "Ian Wehrman" + }, + { + "name": "Ian Wetherbee" + }, + { + "name": "Ice White" + }, + { + "name": "ICHIKAWA, Yuji" + }, + { + "name": "Ingo Richter" + }, + { + "name": "Irakli Gozalishvili" + }, + { + "name": "Ivan Kurnosov" + }, + { + "name": "Jacob Lee" + }, + { + "name": "Jakub Vrana" + }, + { + "name": "James Campos" + }, + { + "name": "James Thorne" + }, + { + "name": "Jamie Hill" + }, + { + "name": "Jan Jongboom" + }, + { + "name": "jankeromnes" + }, + { + "name": "Jan Keromnes" + }, + { + "name": "Jan T. Sott" + }, + { + "name": "Jason" + }, + { + "name": "Jason Grout" + }, + { + "name": "Jason Johnston" + }, + { + "name": "Jason San Jose" + }, + { + "name": "Jason Siefken" + }, + { + "name": "Jean Boussier" + }, + { + "name": "jeffkenton" + }, + { + "name": "Jeff Pickhardt" + }, + { + "name": "jem", + "url": "graphite" + }, + { + "name": "Jochen Berger" + }, + { + "name": "John Connor" + }, + { + "name": "John Lees-Miller" + }, + { + "name": "John Snelson" + }, + { + "name": "jongalloway" + }, + { + "name": "Joost-Wim Boekesteijn" + }, + { + "name": "Joseph Pecoraro" + }, + { + "name": "Joshua Newman" + }, + { + "name": "jots" + }, + { + "name": "Juan Benavides Romero" + }, + { + "name": "Jucovschi Constantin" + }, + { + "name": "jwallers@gmail.com" + }, + { + "name": "kaniga" + }, + { + "name": "Ken Newman" + }, + { + "name": "Ken Rockot" + }, + { + "name": "Kevin Sawicki" + }, + { + "name": "Klaus Silveira" + }, + { + "name": "Koh Zi Han, Cliff" + }, + { + "name": "komakino" + }, + { + "name": "Konstantin Lopuhin" + }, + { + "name": "koops" + }, + { + "name": "ks-ifware" + }, + { + "name": "kubelsmieci" + }, + { + "name": "Lanny" + }, + { + "name": "leaf corcoran" + }, + { + "name": "Leonya Khachaturov" + }, + { + "name": "Liam Newman" + }, + { + "name": "LM" + }, + { + "name": "Lorenzo Stoakes" + }, + { + "name": "lynschinzer" + }, + { + "name": "Maksim Lin" + }, + { + "name": "Maksym Taran" + }, + { + "name": "Marat Dreizin" + }, + { + "name": "Marco Aurélio" + }, + { + "name": "Marijn Haverbeke" + }, + { + "name": "Mario Pietsch" + }, + { + "name": "Mark Lentczner" + }, + { + "name": "Martin Balek" + }, + { + "name": "Martín Gaitán" + }, + { + "name": "Mason Malone" + }, + { + "name": "Mateusz Paprocki" + }, + { + "name": "mats cronqvist" + }, + { + "name": "Matthew Beale" + }, + { + "name": "Matthias BUSSONNIER" + }, + { + "name": "Matt McDonald" + }, + { + "name": "Matt Pass" + }, + { + "name": "Matt Sacks" + }, + { + "name": "Maximilian Hils" + }, + { + "name": "Max Kirsch" + }, + { + "name": "mbarkhau" + }, + { + "name": "Metatheos" + }, + { + "name": "Micah Dubinko" + }, + { + "name": "Michael Lehenbauer" + }, + { + "name": "Michael Zhou" + }, + { + "name": "Mighty Guava" + }, + { + "name": "Miguel Castillo" + }, + { + "name": "Mike" + }, + { + "name": "Mike Brevoort" + }, + { + "name": "Mike Diaz" + }, + { + "name": "Mike Ivanov" + }, + { + "name": "Mike Kadin" + }, + { + "name": "MinRK" + }, + { + "name": "misfo" + }, + { + "name": "mps" + }, + { + "name": "Narciso Jaramillo" + }, + { + "name": "Nathan Williams" + }, + { + "name": "nerbert" + }, + { + "name": "nguillaumin" + }, + { + "name": "Niels van Groningen" + }, + { + "name": "Nikita Beloglazov" + }, + { + "name": "Nikita Vasilyev" + }, + { + "name": "nlwillia" + }, + { + "name": "pablo" + }, + { + "name": "Page" + }, + { + "name": "Patrick Strawderman" + }, + { + "name": "Paul Garvin" + }, + { + "name": "Paul Ivanov" + }, + { + "name": "Pavel Feldman" + }, + { + "name": "Paweł Bartkiewicz" + }, + { + "name": "peteguhl" + }, + { + "name": "peterkroon" + }, + { + "name": "Peter Kroon" + }, + { + "name": "prasanthj" + }, + { + "name": "Prasanth J" + }, + { + "name": "Rahul" + }, + { + "name": "Randy Edmunds" + }, + { + "name": "Richard Z.H. Wang" + }, + { + "name": "robertop23" + }, + { + "name": "Robert Plummer" + }, + { + "name": "Ruslan Osmanov" + }, + { + "name": "sabaca" + }, + { + "name": "Samuel Ainsworth" + }, + { + "name": "sandeepshetty" + }, + { + "name": "santec" + }, + { + "name": "Sascha Peilicke" + }, + { + "name": "satchmorun" + }, + { + "name": "sathyamoorthi" + }, + { + "name": "SCLINIC\\jdecker" + }, + { + "name": "shaund" + }, + { + "name": "shaun gilchrist" + }, + { + "name": "Shmuel Englard" + }, + { + "name": "sonson" + }, + { + "name": "spastorelli" + }, + { + "name": "Stas Kobzar" + }, + { + "name": "Stefan Borsje" + }, + { + "name": "Steffen Beyer" + }, + { + "name": "Steve O'Hara" + }, + { + "name": "stoskov" + }, + { + "name": "Tarmil" + }, + { + "name": "tfjgeorge" + }, + { + "name": "Thaddee Tyl" + }, + { + "name": "think" + }, + { + "name": "Thomas Dvornik" + }, + { + "name": "Thomas Schmid" + }, + { + "name": "Tim Baumann" + }, + { + "name": "Timothy Farrell" + }, + { + "name": "Timothy Hatcher" + }, + { + "name": "TobiasBg" + }, + { + "name": "Tomas-A" + }, + { + "name": "Tomas Varaneckas" + }, + { + "name": "Tom Erik Støwer" + }, + { + "name": "Tom MacWright" + }, + { + "name": "Tony Jian" + }, + { + "name": "Vestimir Markov" + }, + { + "name": "vf" + }, + { + "name": "Volker Mische" + }, + { + "name": "William Jamieson" + }, + { + "name": "Wojtek Ptak" + }, + { + "name": "Xavier Mendez" + }, + { + "name": "Yunchi Luo" + }, + { + "name": "Yuvi Panda" + }, + { + "name": "Zachary Dremann" + } + ], + "dependencies": {}, + "description": "In-browser code editing made bearable", + "devDependencies": { + "node-static": "0.6.0" + }, + "directories": { + "lib": "./lib" + }, + "dist": { + "shasum": "2e10326c2f0bf043b1ede32fdbc06ddfab801c62", + "tarball": "https://registry.npmjs.org/codemirror/-/codemirror-3.20.0.tgz" + }, + "homepage": "http://codemirror.net", + "keywords": [ + "JavaScript", + "CodeMirror", + "Editor" + ], + "licenses": [ + { + "type": "MIT", + "url": "http://codemirror.net/LICENSE" + } + ], + "main": "lib/codemirror.js", + "maintainers": [ + { + "name": "marijn", + "email": "marijnh@gmail.com" + } + ], + "name": "codemirror", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "http://marijnhaverbeke.nl/git/codemirror" + }, + "scripts": { + "test": "node ./test/run.js" + }, + "version": "3.20.0" +} diff --git a/pitfall/pdfkit/node_modules/codemirror/test/comment_test.js b/pitfall/pdfkit/node_modules/codemirror/test/comment_test.js new file mode 100644 index 00000000..7ab3127b --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/test/comment_test.js @@ -0,0 +1,51 @@ +namespace = "comment_"; + +(function() { + function test(name, mode, run, before, after) { + return testCM(name, function(cm) { + run(cm); + eq(cm.getValue(), after); + }, {value: before, mode: mode}); + } + + var simpleProg = "function foo() {\n return bar;\n}"; + + test("block", "javascript", function(cm) { + cm.blockComment(Pos(0, 3), Pos(3, 0), {blockCommentLead: " *"}); + }, simpleProg + "\n", "/* function foo() {\n * return bar;\n * }\n */"); + + test("blockToggle", "javascript", function(cm) { + cm.blockComment(Pos(0, 3), Pos(2, 0), {blockCommentLead: " *"}); + cm.uncomment(Pos(0, 3), Pos(2, 0), {blockCommentLead: " *"}); + }, simpleProg, simpleProg); + + test("line", "javascript", function(cm) { + cm.lineComment(Pos(1, 1), Pos(1, 1)); + }, simpleProg, "function foo() {\n// return bar;\n}"); + + test("lineToggle", "javascript", function(cm) { + cm.lineComment(Pos(0, 0), Pos(2, 1)); + cm.uncomment(Pos(0, 0), Pos(2, 1)); + }, simpleProg, simpleProg); + + test("fallbackToBlock", "css", function(cm) { + cm.lineComment(Pos(0, 0), Pos(2, 1)); + }, "html {\n border: none;\n}", "/* html {\n border: none;\n} */"); + + test("fallbackToLine", "ruby", function(cm) { + cm.blockComment(Pos(0, 0), Pos(1)); + }, "def blah()\n return hah\n", "# def blah()\n# return hah\n"); + + test("commentRange", "javascript", function(cm) { + cm.blockComment(Pos(1, 2), Pos(1, 13), {fullLines: false}); + }, simpleProg, "function foo() {\n /*return bar;*/\n}"); + + test("indented", "javascript", function(cm) { + cm.lineComment(Pos(1, 0), Pos(2), {indent: true}); + }, simpleProg, "function foo() {\n // return bar;\n // }"); + + test("singleEmptyLine", "javascript", function(cm) { + cm.setCursor(1); + cm.execCommand("toggleComment"); + }, "a;\n\nb;", "a;\n// \nb;"); +})(); diff --git a/pitfall/pdfkit/node_modules/codemirror/test/doc_test.js b/pitfall/pdfkit/node_modules/codemirror/test/doc_test.js new file mode 100644 index 00000000..3e04e155 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/test/doc_test.js @@ -0,0 +1,329 @@ +(function() { + // A minilanguage for instantiating linked CodeMirror instances and Docs + function instantiateSpec(spec, place, opts) { + var names = {}, pos = 0, l = spec.length, editors = []; + while (spec) { + var m = spec.match(/^(\w+)(\*?)(?:='([^\']*)'|<(~?)(\w+)(?:\/(\d+)-(\d+))?)\s*/); + var name = m[1], isDoc = m[2], cur; + if (m[3]) { + cur = isDoc ? CodeMirror.Doc(m[3]) : CodeMirror(place, clone(opts, {value: m[3]})); + } else { + var other = m[5]; + if (!names.hasOwnProperty(other)) { + names[other] = editors.length; + editors.push(CodeMirror(place, opts)); + } + var doc = editors[names[other]].linkedDoc({ + sharedHist: !m[4], + from: m[6] ? Number(m[6]) : null, + to: m[7] ? Number(m[7]) : null + }); + cur = isDoc ? doc : CodeMirror(place, clone(opts, {value: doc})); + } + names[name] = editors.length; + editors.push(cur); + spec = spec.slice(m[0].length); + } + return editors; + } + + function clone(obj, props) { + if (!obj) return; + clone.prototype = obj; + var inst = new clone(); + if (props) for (var n in props) if (props.hasOwnProperty(n)) + inst[n] = props[n]; + return inst; + } + + function eqAll(val) { + var end = arguments.length, msg = null; + if (typeof arguments[end-1] == "string") + msg = arguments[--end]; + if (i == end) throw new Error("No editors provided to eqAll"); + for (var i = 1; i < end; ++i) + eq(arguments[i].getValue(), val, msg) + } + + function testDoc(name, spec, run, opts, expectFail) { + if (!opts) opts = {}; + + return test("doc_" + name, function() { + var place = document.getElementById("testground"); + var editors = instantiateSpec(spec, place, opts); + var successful = false; + + try { + run.apply(null, editors); + successful = true; + } finally { + if ((debug && !successful) || verbose) { + place.style.visibility = "visible"; + } else { + for (var i = 0; i < editors.length; ++i) + if (editors[i] instanceof CodeMirror) + place.removeChild(editors[i].getWrapperElement()); + } + } + }, expectFail); + } + + var ie_lt8 = /MSIE [1-7]\b/.test(navigator.userAgent); + + function testBasic(a, b) { + eqAll("x", a, b); + a.setValue("hey"); + eqAll("hey", a, b); + b.setValue("wow"); + eqAll("wow", a, b); + a.replaceRange("u\nv\nw", Pos(0, 3)); + b.replaceRange("i", Pos(0, 4)); + b.replaceRange("j", Pos(2, 1)); + eqAll("wowui\nv\nwj", a, b); + } + + testDoc("basic", "A='x' B 0, "not at left"); + is(pos.top > 0, "not at top"); + }); + + testDoc("copyDoc", "A='u'", function(a) { + var copy = a.getDoc().copy(true); + a.setValue("foo"); + copy.setValue("bar"); + var old = a.swapDoc(copy); + eq(a.getValue(), "bar"); + a.undo(); + eq(a.getValue(), "u"); + a.swapDoc(old); + eq(a.getValue(), "foo"); + eq(old.historySize().undo, 1); + eq(old.copy(false).historySize().undo, 0); + }); + + testDoc("docKeepsMode", "A='1+1'", function(a) { + var other = CodeMirror.Doc("hi", "text/x-markdown"); + a.setOption("mode", "text/javascript"); + var old = a.swapDoc(other); + eq(a.getOption("mode"), "text/x-markdown"); + eq(a.getMode().name, "markdown"); + a.swapDoc(old); + eq(a.getOption("mode"), "text/javascript"); + eq(a.getMode().name, "javascript"); + }); + + testDoc("subview", "A='1\n2\n3\n4\n5' B<~A/1-3", function(a, b) { + eq(b.getValue(), "2\n3"); + eq(b.firstLine(), 1); + b.setCursor(Pos(4)); + eqPos(b.getCursor(), Pos(2, 1)); + a.replaceRange("-1\n0\n", Pos(0, 0)); + eq(b.firstLine(), 3); + eqPos(b.getCursor(), Pos(4, 1)); + a.undo(); + eqPos(b.getCursor(), Pos(2, 1)); + b.replaceRange("oyoy\n", Pos(2, 0)); + eq(a.getValue(), "1\n2\noyoy\n3\n4\n5"); + b.undo(); + eq(a.getValue(), "1\n2\n3\n4\n5"); + }); + + testDoc("subviewEditOnBoundary", "A='11\n22\n33\n44\n55' B<~A/1-4", function(a, b) { + a.replaceRange("x\nyy\nz", Pos(0, 1), Pos(2, 1)); + eq(b.firstLine(), 2); + eq(b.lineCount(), 2); + eq(b.getValue(), "z3\n44"); + a.replaceRange("q\nrr\ns", Pos(3, 1), Pos(4, 1)); + eq(b.firstLine(), 2); + eq(b.getValue(), "z3\n4q"); + eq(a.getValue(), "1x\nyy\nz3\n4q\nrr\ns5"); + a.execCommand("selectAll"); + a.replaceSelection("!"); + eqAll("!", a, b); + }); + + + testDoc("sharedMarker", "A='ab\ncd\nef\ngh' B 500){ + totalTime = 0; + delay = 50; + } + setTimeout(function(){step(i + 1);}, delay); + } else { // Quit tests + running = false; + return null; + } + } + step(0); +} + +function label(str, msg) { + if (msg) return str + " (" + msg + ")"; + return str; +} +function eq(a, b, msg) { + if (a != b) throw new Failure(label(a + " != " + b, msg)); +} +function eqPos(a, b, msg) { + function str(p) { return "{line:" + p.line + ",ch:" + p.ch + "}"; } + if (a == b) return; + if (a == null) throw new Failure(label("comparing null to " + str(b), msg)); + if (b == null) throw new Failure(label("comparing " + str(a) + " to null", msg)); + if (a.line != b.line || a.ch != b.ch) throw new Failure(label(str(a) + " != " + str(b), msg)); +} +function is(a, msg) { + if (!a) throw new Failure(label("assertion failed", msg)); +} + +function countTests() { + if (!debug) return tests.length; + var sum = 0; + for (var i = 0; i < tests.length; ++i) { + var name = tests[i].name; + if (indexOf(debug, name) != -1 || + indexOf(debug, name.split("_")[0] + "_*") != -1) + ++sum; + } + return sum; +} diff --git a/pitfall/pdfkit/node_modules/codemirror/test/emacs_test.js b/pitfall/pdfkit/node_modules/codemirror/test/emacs_test.js new file mode 100644 index 00000000..ab18241d --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/test/emacs_test.js @@ -0,0 +1,135 @@ +(function() { + "use strict"; + + var Pos = CodeMirror.Pos; + namespace = "emacs_"; + + var eventCache = {}; + function fakeEvent(keyName) { + var event = eventCache[key]; + if (event) return event; + + var ctrl, shift, alt; + var key = keyName.replace(/\w+-/g, function(type) { + if (type == "Ctrl-") ctrl = true; + else if (type == "Alt-") alt = true; + else if (type == "Shift-") shift = true; + return ""; + }); + var code; + for (var c in CodeMirror.keyNames) + if (CodeMirror.keyNames[c] == key) { code = c; break; } + if (c == null) throw new Error("Unknown key: " + key); + + return eventCache[keyName] = { + type: "keydown", keyCode: code, ctrlKey: ctrl, shiftKey: shift, altKey: alt, + preventDefault: function(){}, stopPropagation: function(){} + }; + } + + function sim(name, start /*, actions... */) { + var keys = Array.prototype.slice.call(arguments, 2); + testCM(name, function(cm) { + for (var i = 0; i < keys.length; ++i) { + var cur = keys[i]; + if (cur instanceof Pos) cm.setCursor(cur); + else if (cur.call) cur(cm); + else cm.triggerOnKeyDown(fakeEvent(cur)); + } + }, {keyMap: "emacs", value: start, mode: "javascript"}); + } + + function at(line, ch) { return function(cm) { eqPos(cm.getCursor(), Pos(line, ch)); }; } + function txt(str) { return function(cm) { eq(cm.getValue(), str); }; } + + sim("motionHSimple", "abc", "Ctrl-F", "Ctrl-F", "Ctrl-B", at(0, 1)); + sim("motionHMulti", "abcde", + "Ctrl-4", "Ctrl-F", at(0, 4), "Ctrl--", "Ctrl-2", "Ctrl-F", at(0, 2), + "Ctrl-5", "Ctrl-B", at(0, 0)); + + sim("motionHWord", "abc. def ghi", + "Alt-F", at(0, 3), "Alt-F", at(0, 8), + "Ctrl-B", "Alt-B", at(0, 5), "Alt-B", at(0, 0)); + sim("motionHWordMulti", "abc. def ghi ", + "Ctrl-3", "Alt-F", at(0, 12), "Ctrl-2", "Alt-B", at(0, 5), + "Ctrl--", "Alt-B", at(0, 8)); + + sim("motionVSimple", "a\nb\nc\n", "Ctrl-N", "Ctrl-N", "Ctrl-P", at(1, 0)); + sim("motionVMulti", "a\nb\nc\nd\ne\n", + "Ctrl-2", "Ctrl-N", at(2, 0), "Ctrl-F", "Ctrl--", "Ctrl-N", at(1, 1), + "Ctrl--", "Ctrl-3", "Ctrl-P", at(4, 1)); + + sim("killYank", "abc\ndef\nghi", + "Ctrl-F", "Ctrl-Space", "Ctrl-N", "Ctrl-N", "Ctrl-W", "Ctrl-E", "Ctrl-Y", + txt("ahibc\ndef\ng")); + sim("killRing", "abcdef", + "Ctrl-Space", "Ctrl-F", "Ctrl-W", "Ctrl-Space", "Ctrl-F", "Ctrl-W", + "Ctrl-Y", "Alt-Y", + txt("acdef")); + sim("copyYank", "abcd", + "Ctrl-Space", "Ctrl-E", "Alt-W", "Ctrl-Y", + txt("abcdabcd")); + + sim("killLineSimple", "foo\nbar", "Ctrl-F", "Ctrl-K", txt("f\nbar")); + sim("killLineEmptyLine", "foo\n \nbar", "Ctrl-N", "Ctrl-K", txt("foo\nbar")); + sim("killLineMulti", "foo\nbar\nbaz", + "Ctrl-F", "Ctrl-F", "Ctrl-K", "Ctrl-K", "Ctrl-K", "Ctrl-A", "Ctrl-Y", + txt("o\nbarfo\nbaz")); + + sim("moveByParagraph", "abc\ndef\n\n\nhij\nklm\n\n", + "Ctrl-F", "Ctrl-Down", at(2, 0), "Ctrl-Down", at(6, 0), + "Ctrl-N", "Ctrl-Up", at(3, 0), "Ctrl-Up", at(0, 0), + Pos(1, 2), "Ctrl-Down", at(2, 0), Pos(4, 2), "Ctrl-Up", at(3, 0)); + sim("moveByParagraphMulti", "abc\n\ndef\n\nhij\n\nklm", + "Ctrl-U", "2", "Ctrl-Down", at(3, 0), + "Shift-Alt-.", "Ctrl-3", "Ctrl-Up", at(1, 0)); + + sim("moveBySentence", "sentence one! sentence\ntwo\n\nparagraph two", + "Alt-E", at(0, 13), "Alt-E", at(1, 3), "Ctrl-F", "Alt-A", at(0, 13)); + + sim("moveByExpr", "function foo(a, b) {}", + "Ctrl-Alt-F", at(0, 8), "Ctrl-Alt-F", at(0, 12), "Ctrl-Alt-F", at(0, 18), + "Ctrl-Alt-B", at(0, 12), "Ctrl-Alt-B", at(0, 9)); + sim("moveByExprMulti", "foo bar baz bug", + "Ctrl-2", "Ctrl-Alt-F", at(0, 7), + "Ctrl--", "Ctrl-Alt-F", at(0, 4), + "Ctrl--", "Ctrl-2", "Ctrl-Alt-B", at(0, 11)); + sim("delExpr", "var x = [\n a,\n b\n c\n];", + Pos(0, 8), "Ctrl-Alt-K", txt("var x = ;"), "Ctrl-/", + Pos(4, 1), "Ctrl-Alt-Backspace", txt("var x = ;")); + sim("delExprMulti", "foo bar baz", + "Ctrl-2", "Ctrl-Alt-K", txt(" baz"), + "Ctrl-/", "Ctrl-E", "Ctrl-2", "Ctrl-Alt-Backspace", txt("foo ")); + + sim("justOneSpace", "hi bye ", + Pos(0, 4), "Alt-Space", txt("hi bye "), + Pos(0, 4), "Alt-Space", txt("hi b ye "), + "Ctrl-A", "Alt-Space", "Ctrl-E", "Alt-Space", txt(" hi b ye ")); + + sim("openLine", "foo bar", "Alt-F", "Ctrl-O", txt("foo\n bar")) + + sim("transposeChar", "abcd\n\ne", + "Ctrl-F", "Ctrl-T", "Ctrl-T", txt("bcad\n\ne"), at(0, 3), + "Ctrl-F", "Ctrl-T", "Ctrl-T", "Ctrl-T", txt("bcda\n\ne"), at(0, 4), + "Ctrl-F", "Ctrl-T", txt("bcd\na\ne"), at(1, 1)); + + sim("manipWordCase", "foo BAR bAZ", + "Alt-C", "Alt-L", "Alt-U", txt("Foo bar BAZ"), + "Ctrl-A", "Alt-U", "Alt-L", "Alt-C", txt("FOO bar Baz")); + sim("manipWordCaseMulti", "foo Bar bAz", + "Ctrl-2", "Alt-U", txt("FOO BAR bAz"), + "Ctrl-A", "Ctrl-3", "Alt-C", txt("Foo Bar Baz")); + + sim("upExpr", "foo {\n bar[];\n baz(blah);\n}", + Pos(2, 7), "Ctrl-Alt-U", at(2, 5), "Ctrl-Alt-U", at(0, 4)); + sim("transposeExpr", "do foo[bar] dah", + Pos(0, 6), "Ctrl-Alt-T", txt("do [bar]foo dah")); + + testCM("save", function(cm) { + var saved = false; + CodeMirror.commands.save = function(cm) { saved = cm.getValue(); }; + cm.triggerOnKeyDown(fakeEvent("Ctrl-X")); + cm.triggerOnKeyDown(fakeEvent("Ctrl-S")); + is(saved, "hi"); + }, {value: "hi", keyMap: "emacs"}); +})(); diff --git a/pitfall/pdfkit/node_modules/codemirror/test/index.html b/pitfall/pdfkit/node_modules/codemirror/test/index.html new file mode 100644 index 00000000..8e45b6d0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/test/index.html @@ -0,0 +1,209 @@ + + +CodeMirror: Test Suite + + + + + + + + + + + + + + + + + + + + + +
    +

    Test Suite

    + +

    A limited set of programmatic sanity tests for CodeMirror.

    + +
    +
    Ran 0 of 0 tests
    +
    +

    Please enable JavaScript...

    +
    + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    diff --git a/pitfall/pdfkit/node_modules/codemirror/test/lint/acorn.js b/pitfall/pdfkit/node_modules/codemirror/test/lint/acorn.js new file mode 100644 index 00000000..6323b1fc --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/test/lint/acorn.js @@ -0,0 +1,1593 @@ +// Acorn is a tiny, fast JavaScript parser written in JavaScript. +// +// Acorn was written by Marijn Haverbeke and released under an MIT +// license. The Unicode regexps (for identifiers and whitespace) were +// taken from [Esprima](http://esprima.org) by Ariya Hidayat. +// +// Git repositories for Acorn are available at +// +// http://marijnhaverbeke.nl/git/acorn +// https://github.com/marijnh/acorn.git +// +// Please use the [github bug tracker][ghbt] to report issues. +// +// [ghbt]: https://github.com/marijnh/acorn/issues + +(function(exports) { + "use strict"; + + exports.version = "0.0.1"; + + // The main exported interface (under `window.acorn` when in the + // browser) is a `parse` function that takes a code string and + // returns an abstract syntax tree as specified by [Mozilla parser + // API][api], with the caveat that the SpiderMonkey-specific syntax + // (`let`, `yield`, inline XML, etc) is not recognized. + // + // [api]: https://developer.mozilla.org/en-US/docs/SpiderMonkey/Parser_API + + var options, input, inputLen, sourceFile; + + exports.parse = function(inpt, opts) { + input = String(inpt); inputLen = input.length; + options = opts || {}; + for (var opt in defaultOptions) if (!options.hasOwnProperty(opt)) + options[opt] = defaultOptions[opt]; + sourceFile = options.sourceFile || null; + return parseTopLevel(options.program); + }; + + // A second optional argument can be given to further configure + // the parser process. These options are recognized: + + var defaultOptions = exports.defaultOptions = { + // `ecmaVersion` indicates the ECMAScript version to parse. Must + // be either 3 or 5. This + // influences support for strict mode, the set of reserved words, and + // support for getters and setter. + ecmaVersion: 5, + // Turn on `strictSemicolons` to prevent the parser from doing + // automatic semicolon insertion. + strictSemicolons: false, + // When `allowTrailingCommas` is false, the parser will not allow + // trailing commas in array and object literals. + allowTrailingCommas: true, + // By default, reserved words are not enforced. Enable + // `forbidReserved` to enforce them. + forbidReserved: false, + // When `trackComments` is turned on, the parser will attach + // `commentsBefore` and `commentsAfter` properties to AST nodes + // holding arrays of strings. A single comment may appear in both + // a `commentsBefore` and `commentsAfter` array (of the nodes + // after and before it), but never twice in the before (or after) + // array of different nodes. + trackComments: false, + // When `locations` is on, `loc` properties holding objects with + // `start` and `end` properties in `{line, column}` form (with + // line being 1-based and column 0-based) will be attached to the + // nodes. + locations: false, + // Nodes have their start and end characters offsets recorded in + // `start` and `end` properties (directly on the node, rather than + // the `loc` object, which holds line/column data. To also add a + // [semi-standardized][range] `range` property holding a `[start, + // end]` array with the same numbers, set the `ranges` option to + // `true`. + // + // [range]: https://bugzilla.mozilla.org/show_bug.cgi?id=745678 + ranges: false, + // It is possible to parse multiple files into a single AST by + // passing the tree produced by parsing the first file as + // `program` option in subsequent parses. This will add the + // toplevel forms of the parsed file to the `Program` (top) node + // of an existing parse tree. + program: null, + // When `location` is on, you can pass this to record the source + // file in every node's `loc` object. + sourceFile: null + }; + + // The `getLineInfo` function is mostly useful when the + // `locations` option is off (for performance reasons) and you + // want to find the line/column position for a given character + // offset. `input` should be the code string that the offset refers + // into. + + var getLineInfo = exports.getLineInfo = function(input, offset) { + for (var line = 1, cur = 0;;) { + lineBreak.lastIndex = cur; + var match = lineBreak.exec(input); + if (match && match.index < offset) { + ++line; + cur = match.index + match[0].length; + } else break; + } + return {line: line, column: offset - cur}; + }; + + // Acorn is organized as a tokenizer and a recursive-descent parser. + // Both use (closure-)global variables to keep their state and + // communicate. We already saw the `options`, `input`, and + // `inputLen` variables above (set in `parse`). + + // The current position of the tokenizer in the input. + + var tokPos; + + // The start and end offsets of the current token. + + var tokStart, tokEnd; + + // When `options.locations` is true, these hold objects + // containing the tokens start and end line/column pairs. + + var tokStartLoc, tokEndLoc; + + // The type and value of the current token. Token types are objects, + // named by variables against which they can be compared, and + // holding properties that describe them (indicating, for example, + // the precedence of an infix operator, and the original name of a + // keyword token). The kind of value that's held in `tokVal` depends + // on the type of the token. For literals, it is the literal value, + // for operators, the operator name, and so on. + + var tokType, tokVal; + + // These are used to hold arrays of comments when + // `options.trackComments` is true. + + var tokCommentsBefore, tokCommentsAfter; + + // Interal state for the tokenizer. To distinguish between division + // operators and regular expressions, it remembers whether the last + // token was one that is allowed to be followed by an expression. + // (If it is, a slash is probably a regexp, if it isn't it's a + // division operator. See the `parseStatement` function for a + // caveat.) + + var tokRegexpAllowed, tokComments; + + // When `options.locations` is true, these are used to keep + // track of the current line, and know when a new line has been + // entered. See the `curLineLoc` function. + + var tokCurLine, tokLineStart, tokLineStartNext; + + // These store the position of the previous token, which is useful + // when finishing a node and assigning its `end` position. + + var lastStart, lastEnd, lastEndLoc; + + // This is the parser's state. `inFunction` is used to reject + // `return` statements outside of functions, `labels` to verify that + // `break` and `continue` have somewhere to jump to, and `strict` + // indicates whether strict mode is on. + + var inFunction, labels, strict; + + // This function is used to raise exceptions on parse errors. It + // takes either a `{line, column}` object or an offset integer (into + // the current `input`) as `pos` argument. It attaches the position + // to the end of the error message, and then raises a `SyntaxError` + // with that message. + + function raise(pos, message) { + if (typeof pos == "number") pos = getLineInfo(input, pos); + message += " (" + pos.line + ":" + pos.column + ")"; + throw new SyntaxError(message); + } + + // ## Token types + + // The assignment of fine-grained, information-carrying type objects + // allows the tokenizer to store the information it has about a + // token in a way that is very cheap for the parser to look up. + + // All token type variables start with an underscore, to make them + // easy to recognize. + + // These are the general types. The `type` property is only used to + // make them recognizeable when debugging. + + var _num = {type: "num"}, _regexp = {type: "regexp"}, _string = {type: "string"}; + var _name = {type: "name"}, _eof = {type: "eof"}; + + // Keyword tokens. The `keyword` property (also used in keyword-like + // operators) indicates that the token originated from an + // identifier-like word, which is used when parsing property names. + // + // The `beforeExpr` property is used to disambiguate between regular + // expressions and divisions. It is set on all token types that can + // be followed by an expression (thus, a slash after them would be a + // regular expression). + // + // `isLoop` marks a keyword as starting a loop, which is important + // to know when parsing a label, in order to allow or disallow + // continue jumps to that label. + + var _break = {keyword: "break"}, _case = {keyword: "case", beforeExpr: true}, _catch = {keyword: "catch"}; + var _continue = {keyword: "continue"}, _debugger = {keyword: "debugger"}, _default = {keyword: "default"}; + var _do = {keyword: "do", isLoop: true}, _else = {keyword: "else", beforeExpr: true}; + var _finally = {keyword: "finally"}, _for = {keyword: "for", isLoop: true}, _function = {keyword: "function"}; + var _if = {keyword: "if"}, _return = {keyword: "return", beforeExpr: true}, _switch = {keyword: "switch"}; + var _throw = {keyword: "throw", beforeExpr: true}, _try = {keyword: "try"}, _var = {keyword: "var"}; + var _while = {keyword: "while", isLoop: true}, _with = {keyword: "with"}, _new = {keyword: "new", beforeExpr: true}; + var _this = {keyword: "this"}; + + // The keywords that denote values. + + var _null = {keyword: "null", atomValue: null}, _true = {keyword: "true", atomValue: true}; + var _false = {keyword: "false", atomValue: false}; + + // Some keywords are treated as regular operators. `in` sometimes + // (when parsing `for`) needs to be tested against specifically, so + // we assign a variable name to it for quick comparing. + + var _in = {keyword: "in", binop: 7, beforeExpr: true}; + + // Map keyword names to token types. + + var keywordTypes = {"break": _break, "case": _case, "catch": _catch, + "continue": _continue, "debugger": _debugger, "default": _default, + "do": _do, "else": _else, "finally": _finally, "for": _for, + "function": _function, "if": _if, "return": _return, "switch": _switch, + "throw": _throw, "try": _try, "var": _var, "while": _while, "with": _with, + "null": _null, "true": _true, "false": _false, "new": _new, "in": _in, + "instanceof": {keyword: "instanceof", binop: 7}, "this": _this, + "typeof": {keyword: "typeof", prefix: true}, + "void": {keyword: "void", prefix: true}, + "delete": {keyword: "delete", prefix: true}}; + + // Punctuation token types. Again, the `type` property is purely for debugging. + + var _bracketL = {type: "[", beforeExpr: true}, _bracketR = {type: "]"}, _braceL = {type: "{", beforeExpr: true}; + var _braceR = {type: "}"}, _parenL = {type: "(", beforeExpr: true}, _parenR = {type: ")"}; + var _comma = {type: ",", beforeExpr: true}, _semi = {type: ";", beforeExpr: true}; + var _colon = {type: ":", beforeExpr: true}, _dot = {type: "."}, _question = {type: "?", beforeExpr: true}; + + // Operators. These carry several kinds of properties to help the + // parser use them properly (the presence of these properties is + // what categorizes them as operators). + // + // `binop`, when present, specifies that this operator is a binary + // operator, and will refer to its precedence. + // + // `prefix` and `postfix` mark the operator as a prefix or postfix + // unary operator. `isUpdate` specifies that the node produced by + // the operator should be of type UpdateExpression rather than + // simply UnaryExpression (`++` and `--`). + // + // `isAssign` marks all of `=`, `+=`, `-=` etcetera, which act as + // binary operators with a very low precedence, that should result + // in AssignmentExpression nodes. + + var _slash = {binop: 10, beforeExpr: true}, _eq = {isAssign: true, beforeExpr: true}; + var _assign = {isAssign: true, beforeExpr: true}, _plusmin = {binop: 9, prefix: true, beforeExpr: true}; + var _incdec = {postfix: true, prefix: true, isUpdate: true}, _prefix = {prefix: true, beforeExpr: true}; + var _bin1 = {binop: 1, beforeExpr: true}, _bin2 = {binop: 2, beforeExpr: true}; + var _bin3 = {binop: 3, beforeExpr: true}, _bin4 = {binop: 4, beforeExpr: true}; + var _bin5 = {binop: 5, beforeExpr: true}, _bin6 = {binop: 6, beforeExpr: true}; + var _bin7 = {binop: 7, beforeExpr: true}, _bin8 = {binop: 8, beforeExpr: true}; + var _bin10 = {binop: 10, beforeExpr: true}; + + // This is a trick taken from Esprima. It turns out that, on + // non-Chrome browsers, to check whether a string is in a set, a + // predicate containing a big ugly `switch` statement is faster than + // a regular expression, and on Chrome the two are about on par. + // This function uses `eval` (non-lexical) to produce such a + // predicate from a space-separated string of words. + // + // It starts by sorting the words by length. + + function makePredicate(words) { + words = words.split(" "); + var f = "", cats = []; + out: for (var i = 0; i < words.length; ++i) { + for (var j = 0; j < cats.length; ++j) + if (cats[j][0].length == words[i].length) { + cats[j].push(words[i]); + continue out; + } + cats.push([words[i]]); + } + function compareTo(arr) { + if (arr.length == 1) return f += "return str === " + JSON.stringify(arr[0]) + ";"; + f += "switch(str){"; + for (var i = 0; i < arr.length; ++i) f += "case " + JSON.stringify(arr[i]) + ":"; + f += "return true}return false;"; + } + + // When there are more than three length categories, an outer + // switch first dispatches on the lengths, to save on comparisons. + + if (cats.length > 3) { + cats.sort(function(a, b) {return b.length - a.length;}); + f += "switch(str.length){"; + for (var i = 0; i < cats.length; ++i) { + var cat = cats[i]; + f += "case " + cat[0].length + ":"; + compareTo(cat); + } + f += "}"; + + // Otherwise, simply generate a flat `switch` statement. + + } else { + compareTo(words); + } + return new Function("str", f); + } + + // The ECMAScript 3 reserved word list. + + var isReservedWord3 = makePredicate("abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile"); + + // ECMAScript 5 reserved words. + + var isReservedWord5 = makePredicate("class enum extends super const export import"); + + // The additional reserved words in strict mode. + + var isStrictReservedWord = makePredicate("implements interface let package private protected public static yield"); + + // The forbidden variable names in strict mode. + + var isStrictBadIdWord = makePredicate("eval arguments"); + + // And the keywords. + + var isKeyword = makePredicate("break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this"); + + // ## Character categories + + // Big ugly regular expressions that match characters in the + // whitespace, identifier, and identifier-start categories. These + // are only applied when a character is found to actually have a + // code point above 128. + + var nonASCIIwhitespace = /[\u1680\u180e\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]/; + var nonASCIIidentifierStartChars = "\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc"; + var nonASCIIidentifierChars = "\u0371-\u0374\u0483-\u0487\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u0620-\u0649\u0672-\u06d3\u06e7-\u06e8\u06fb-\u06fc\u0730-\u074a\u0800-\u0814\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0840-\u0857\u08e4-\u08fe\u0900-\u0903\u093a-\u093c\u093e-\u094f\u0951-\u0957\u0962-\u0963\u0966-\u096f\u0981-\u0983\u09bc\u09be-\u09c4\u09c7\u09c8\u09d7\u09df-\u09e0\u0a01-\u0a03\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a66-\u0a71\u0a75\u0a81-\u0a83\u0abc\u0abe-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ae2-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b3c\u0b3e-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5f-\u0b60\u0b66-\u0b6f\u0b82\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62-\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0cbc\u0cbe-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0ce2-\u0ce3\u0ce6-\u0cef\u0d02\u0d03\u0d46-\u0d48\u0d57\u0d62-\u0d63\u0d66-\u0d6f\u0d82\u0d83\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e34-\u0e3a\u0e40-\u0e45\u0e50-\u0e59\u0eb4-\u0eb9\u0ec8-\u0ecd\u0ed0-\u0ed9\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f41-\u0f47\u0f71-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1029\u1040-\u1049\u1067-\u106d\u1071-\u1074\u1082-\u108d\u108f-\u109d\u135d-\u135f\u170e-\u1710\u1720-\u1730\u1740-\u1750\u1772\u1773\u1780-\u17b2\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1920-\u192b\u1930-\u193b\u1951-\u196d\u19b0-\u19c0\u19c8-\u19c9\u19d0-\u19d9\u1a00-\u1a15\u1a20-\u1a53\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1b46-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1bb0-\u1bb9\u1be6-\u1bf3\u1c00-\u1c22\u1c40-\u1c49\u1c5b-\u1c7d\u1cd0-\u1cd2\u1d00-\u1dbe\u1e01-\u1f15\u200c\u200d\u203f\u2040\u2054\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2d81-\u2d96\u2de0-\u2dff\u3021-\u3028\u3099\u309a\ua640-\ua66d\ua674-\ua67d\ua69f\ua6f0-\ua6f1\ua7f8-\ua800\ua806\ua80b\ua823-\ua827\ua880-\ua881\ua8b4-\ua8c4\ua8d0-\ua8d9\ua8f3-\ua8f7\ua900-\ua909\ua926-\ua92d\ua930-\ua945\ua980-\ua983\ua9b3-\ua9c0\uaa00-\uaa27\uaa40-\uaa41\uaa4c-\uaa4d\uaa50-\uaa59\uaa7b\uaae0-\uaae9\uaaf2-\uaaf3\uabc0-\uabe1\uabec\uabed\uabf0-\uabf9\ufb20-\ufb28\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\uff10-\uff19\uff3f"; + var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]"); + var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]"); + + // Whether a single character denotes a newline. + + var newline = /[\n\r\u2028\u2029]/; + + // Matches a whole line break (where CRLF is considered a single + // line break). Used to count lines. + + var lineBreak = /\r\n|[\n\r\u2028\u2029]/g; + + // Test whether a given character code starts an identifier. + + function isIdentifierStart(code) { + if (code < 65) return code === 36; + if (code < 91) return true; + if (code < 97) return code === 95; + if (code < 123)return true; + return code >= 0xaa && nonASCIIidentifierStart.test(String.fromCharCode(code)); + } + + // Test whether a given character is part of an identifier. + + function isIdentifierChar(code) { + if (code < 48) return code === 36; + if (code < 58) return true; + if (code < 65) return false; + if (code < 91) return true; + if (code < 97) return code === 95; + if (code < 123)return true; + return code >= 0xaa && nonASCIIidentifier.test(String.fromCharCode(code)); + } + + // ## Tokenizer + + // These are used when `options.locations` is on, in order to track + // the current line number and start of line offset, in order to set + // `tokStartLoc` and `tokEndLoc`. + + function nextLineStart() { + lineBreak.lastIndex = tokLineStart; + var match = lineBreak.exec(input); + return match ? match.index + match[0].length : input.length + 1; + } + + function curLineLoc() { + while (tokLineStartNext <= tokPos) { + ++tokCurLine; + tokLineStart = tokLineStartNext; + tokLineStartNext = nextLineStart(); + } + return {line: tokCurLine, column: tokPos - tokLineStart}; + } + + // Reset the token state. Used at the start of a parse. + + function initTokenState() { + tokCurLine = 1; + tokPos = tokLineStart = 0; + tokLineStartNext = nextLineStart(); + tokRegexpAllowed = true; + tokComments = null; + skipSpace(); + } + + // Called at the end of every token. Sets `tokEnd`, `tokVal`, + // `tokCommentsAfter`, and `tokRegexpAllowed`, and skips the space + // after the token, so that the next one's `tokStart` will point at + // the right position. + + function finishToken(type, val) { + tokEnd = tokPos; + if (options.locations) tokEndLoc = curLineLoc(); + tokType = type; + skipSpace(); + tokVal = val; + tokCommentsAfter = tokComments; + tokRegexpAllowed = type.beforeExpr; + } + + function skipBlockComment() { + var end = input.indexOf("*/", tokPos += 2); + if (end === -1) raise(tokPos - 2, "Unterminated comment"); + if (options.trackComments) + (tokComments || (tokComments = [])).push(input.slice(tokPos, end)); + tokPos = end + 2; + } + + function skipLineComment() { + var start = tokPos; + var ch = input.charCodeAt(tokPos+=2); + while (tokPos < inputLen && ch !== 10 && ch !== 13 && ch !== 8232 && ch !== 8329) { + ++tokPos; + ch = input.charCodeAt(tokPos); + } + (tokComments || (tokComments = [])).push(input.slice(start, tokPos)); + } + + // Called at the start of the parse and after every token. Skips + // whitespace and comments, and, if `options.trackComments` is on, + // will store all skipped comments in `tokComments`. + + function skipSpace() { + tokComments = null; + while (tokPos < inputLen) { + var ch = input.charCodeAt(tokPos); + if (ch === 47) { // '/' + var next = input.charCodeAt(tokPos+1); + if (next === 42) { // '*' + skipBlockComment(); + } else if (next === 47) { // '/' + skipLineComment(); + } else break; + } else if (ch < 14 && ch > 8) { + ++tokPos; + } else if (ch === 32 || ch === 160) { // ' ', '\xa0' + ++tokPos; + } else if (ch >= 5760 && nonASCIIwhitespace.test(String.fromCharCode(ch))) { + ++tokPos; + } else { + break; + } + } + } + + // ### Token reading + + // This is the function that is called to fetch the next token. It + // is somewhat obscure, because it works in character codes rather + // than characters, and because operator parsing has been inlined + // into it. + // + // All in the name of speed. + // + // The `forceRegexp` parameter is used in the one case where the + // `tokRegexpAllowed` trick does not work. See `parseStatement`. + + function readToken(forceRegexp) { + tokStart = tokPos; + if (options.locations) tokStartLoc = curLineLoc(); + tokCommentsBefore = tokComments; + if (forceRegexp) return readRegexp(); + if (tokPos >= inputLen) return finishToken(_eof); + + var code = input.charCodeAt(tokPos); + // Identifier or keyword. '\uXXXX' sequences are allowed in + // identifiers, so '\' also dispatches to that. + if (isIdentifierStart(code) || code === 92 /* '\' */) return readWord(); + var next = input.charCodeAt(tokPos+1); + + switch(code) { + // The interpretation of a dot depends on whether it is followed + // by a digit. + case 46: // '.' + if (next >= 48 && next <= 57) return readNumber(String.fromCharCode(code)); + ++tokPos; + return finishToken(_dot); + + // Punctuation tokens. + case 40: ++tokPos; return finishToken(_parenL); + case 41: ++tokPos; return finishToken(_parenR); + case 59: ++tokPos; return finishToken(_semi); + case 44: ++tokPos; return finishToken(_comma); + case 91: ++tokPos; return finishToken(_bracketL); + case 93: ++tokPos; return finishToken(_bracketR); + case 123: ++tokPos; return finishToken(_braceL); + case 125: ++tokPos; return finishToken(_braceR); + case 58: ++tokPos; return finishToken(_colon); + case 63: ++tokPos; return finishToken(_question); + + // '0x' is a hexadecimal number. + case 48: // '0' + if (next === 120 || next === 88) return readHexNumber(); + // Anything else beginning with a digit is an integer, octal + // number, or float. + case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: // 1-9 + return readNumber(String.fromCharCode(code)); + + // Quotes produce strings. + case 34: case 39: // '"', "'" + return readString(code); + + // Operators are parsed inline in tiny state machines. '=' (61) is + // often referred to. `finishOp` simply skips the amount of + // characters it is given as second argument, and returns a token + // of the type given by its first argument. + + case 47: // '/' + if (tokRegexpAllowed) {++tokPos; return readRegexp();} + if (next === 61) return finishOp(_assign, 2); + return finishOp(_slash, 1); + + case 37: case 42: // '%*' + if (next === 61) return finishOp(_assign, 2); + return finishOp(_bin10, 1); + + case 124: case 38: // '|&' + if (next === code) return finishOp(code === 124 ? _bin1 : _bin2, 2); + if (next === 61) return finishOp(_assign, 2); + return finishOp(code === 124 ? _bin3 : _bin5, 1); + + case 94: // '^' + if (next === 61) return finishOp(_assign, 2); + return finishOp(_bin4, 1); + + case 43: case 45: // '+-' + if (next === code) return finishOp(_incdec, 2); + if (next === 61) return finishOp(_assign, 2); + return finishOp(_plusmin, 1); + + case 60: case 62: // '<>' + var size = 1; + if (next === code) { + size = code === 62 && input.charCodeAt(tokPos+2) === 62 ? 3 : 2; + if (input.charCodeAt(tokPos + size) === 61) return finishOp(_assign, size + 1); + return finishOp(_bin8, size); + } + if (next === 61) + size = input.charCodeAt(tokPos+2) === 61 ? 3 : 2; + return finishOp(_bin7, size); + + case 61: case 33: // '=!' + if (next === 61) return finishOp(_bin6, input.charCodeAt(tokPos+2) === 61 ? 3 : 2); + return finishOp(code === 61 ? _eq : _prefix, 1); + + case 126: // '~' + return finishOp(_prefix, 1); + } + + // If we are here, we either found a non-ASCII identifier + // character, or something that's entirely disallowed. + var ch = String.fromCharCode(code); + if (ch === "\\" || nonASCIIidentifierStart.test(ch)) return readWord(); + raise(tokPos, "Unexpected character '" + ch + "'"); + } + + function finishOp(type, size) { + var str = input.slice(tokPos, tokPos + size); + tokPos += size; + finishToken(type, str); + } + + // Parse a regular expression. Some context-awareness is necessary, + // since a '/' inside a '[]' set does not end the expression. + + function readRegexp() { + var content = "", escaped, inClass, start = tokPos; + for (;;) { + if (tokPos >= inputLen) raise(start, "Unterminated regular expression"); + var ch = input.charAt(tokPos); + if (newline.test(ch)) raise(start, "Unterminated regular expression"); + if (!escaped) { + if (ch === "[") inClass = true; + else if (ch === "]" && inClass) inClass = false; + else if (ch === "/" && !inClass) break; + escaped = ch === "\\"; + } else escaped = false; + ++tokPos; + } + var content = input.slice(start, tokPos); + ++tokPos; + // Need to use `readWord1` because '\uXXXX' sequences are allowed + // here (don't ask). + var mods = readWord1(); + if (mods && !/^[gmsiy]*$/.test(mods)) raise(start, "Invalid regexp flag"); + return finishToken(_regexp, new RegExp(content, mods)); + } + + // Read an integer in the given radix. Return null if zero digits + // were read, the integer value otherwise. When `len` is given, this + // will return `null` unless the integer has exactly `len` digits. + + function readInt(radix, len) { + var start = tokPos, total = 0; + for (;;) { + var code = input.charCodeAt(tokPos), val; + if (code >= 97) val = code - 97 + 10; // a + else if (code >= 65) val = code - 65 + 10; // A + else if (code >= 48 && code <= 57) val = code - 48; // 0-9 + else val = Infinity; + if (val >= radix) break; + ++tokPos; + total = total * radix + val; + } + if (tokPos === start || len != null && tokPos - start !== len) return null; + + return total; + } + + function readHexNumber() { + tokPos += 2; // 0x + var val = readInt(16); + if (val == null) raise(tokStart + 2, "Expected hexadecimal number"); + if (isIdentifierStart(input.charCodeAt(tokPos))) raise(tokPos, "Identifier directly after number"); + return finishToken(_num, val); + } + + // Read an integer, octal integer, or floating-point number. + + function readNumber(ch) { + var start = tokPos, isFloat = ch === "."; + if (!isFloat && readInt(10) == null) raise(start, "Invalid number"); + if (isFloat || input.charAt(tokPos) === ".") { + var next = input.charAt(++tokPos); + if (next === "-" || next === "+") ++tokPos; + if (readInt(10) === null && ch === ".") raise(start, "Invalid number"); + isFloat = true; + } + if (/e/i.test(input.charAt(tokPos))) { + var next = input.charAt(++tokPos); + if (next === "-" || next === "+") ++tokPos; + if (readInt(10) === null) raise(start, "Invalid number") + isFloat = true; + } + if (isIdentifierStart(input.charCodeAt(tokPos))) raise(tokPos, "Identifier directly after number"); + + var str = input.slice(start, tokPos), val; + if (isFloat) val = parseFloat(str); + else if (ch !== "0" || str.length === 1) val = parseInt(str, 10); + else if (/[89]/.test(str) || strict) raise(start, "Invalid number"); + else val = parseInt(str, 8); + return finishToken(_num, val); + } + + // Read a string value, interpreting backslash-escapes. + + function readString(quote) { + tokPos++; + var str = []; + for (;;) { + if (tokPos >= inputLen) raise(tokStart, "Unterminated string constant"); + var ch = input.charCodeAt(tokPos); + if (ch === quote) { + ++tokPos; + return finishToken(_string, String.fromCharCode.apply(null, str)); + } + if (ch === 92) { // '\' + ch = input.charCodeAt(++tokPos); + var octal = /^[0-7]+/.exec(input.slice(tokPos, tokPos + 3)); + if (octal) octal = octal[0]; + while (octal && parseInt(octal, 8) > 255) octal = octal.slice(0, octal.length - 1); + if (octal === "0") octal = null; + ++tokPos; + if (octal) { + if (strict) raise(tokPos - 2, "Octal literal in strict mode"); + str.push(parseInt(octal, 8)); + tokPos += octal.length - 1; + } else { + switch (ch) { + case 110: str.push(10); break; // 'n' -> '\n' + case 114: str.push(13); break; // 'r' -> '\r' + case 120: str.push(readHexChar(2)); break; // 'x' + case 117: str.push(readHexChar(4)); break; // 'u' + case 85: str.push(readHexChar(8)); break; // 'U' + case 116: str.push(9); break; // 't' -> '\t' + case 98: str.push(8); break; // 'b' -> '\b' + case 118: str.push(11); break; // 'v' -> '\u000b' + case 102: str.push(12); break; // 'f' -> '\f' + case 48: str.push(0); break; // 0 -> '\0' + case 13: if (input.charCodeAt(tokPos) === 10) ++tokPos; // '\r\n' + case 10: break; // ' \n' + default: str.push(ch); break; + } + } + } else { + if (ch === 13 || ch === 10 || ch === 8232 || ch === 8329) raise(tokStart, "Unterminated string constant"); + if (ch !== 92) str.push(ch); // '\' + ++tokPos; + } + } + } + + // Used to read character escape sequences ('\x', '\u', '\U'). + + function readHexChar(len) { + var n = readInt(16, len); + if (n === null) raise(tokStart, "Bad character escape sequence"); + return n; + } + + // Used to signal to callers of `readWord1` whether the word + // contained any escape sequences. This is needed because words with + // escape sequences must not be interpreted as keywords. + + var containsEsc; + + // Read an identifier, and return it as a string. Sets `containsEsc` + // to whether the word contained a '\u' escape. + // + // Only builds up the word character-by-character when it actually + // containeds an escape, as a micro-optimization. + + function readWord1() { + containsEsc = false; + var word, first = true, start = tokPos; + for (;;) { + var ch = input.charCodeAt(tokPos); + if (isIdentifierChar(ch)) { + if (containsEsc) word += input.charAt(tokPos); + ++tokPos; + } else if (ch === 92) { // "\" + if (!containsEsc) word = input.slice(start, tokPos); + containsEsc = true; + if (input.charCodeAt(++tokPos) != 117) // "u" + raise(tokPos, "Expecting Unicode escape sequence \\uXXXX"); + ++tokPos; + var esc = readHexChar(4); + var escStr = String.fromCharCode(esc); + if (!escStr) raise(tokPos - 1, "Invalid Unicode escape"); + if (!(first ? isIdentifierStart(esc) : isIdentifierChar(esc))) + raise(tokPos - 4, "Invalid Unicode escape"); + word += escStr; + } else { + break; + } + first = false; + } + return containsEsc ? word : input.slice(start, tokPos); + } + + // Read an identifier or keyword token. Will check for reserved + // words when necessary. + + function readWord() { + var word = readWord1(); + var type = _name; + if (!containsEsc) { + if (isKeyword(word)) type = keywordTypes[word]; + else if (options.forbidReserved && + (options.ecmaVersion === 3 ? isReservedWord3 : isReservedWord5)(word) || + strict && isStrictReservedWord(word)) + raise(tokStart, "The keyword '" + word + "' is reserved"); + } + return finishToken(type, word); + } + + // ## Parser + + // A recursive descent parser operates by defining functions for all + // syntactic elements, and recursively calling those, each function + // advancing the input stream and returning an AST node. Precedence + // of constructs (for example, the fact that `!x[1]` means `!(x[1])` + // instead of `(!x)[1]` is handled by the fact that the parser + // function that parses unary prefix operators is called first, and + // in turn calls the function that parses `[]` subscripts — that + // way, it'll receive the node for `x[1]` already parsed, and wraps + // *that* in the unary operator node. + // + // Acorn uses an [operator precedence parser][opp] to handle binary + // operator precedence, because it is much more compact than using + // the technique outlined above, which uses different, nesting + // functions to specify precedence, for all of the ten binary + // precedence levels that JavaScript defines. + // + // [opp]: http://en.wikipedia.org/wiki/Operator-precedence_parser + + // ### Parser utilities + + // Continue to the next token. + + function next() { + lastStart = tokStart; + lastEnd = tokEnd; + lastEndLoc = tokEndLoc; + readToken(); + } + + // Enter strict mode. Re-reads the next token to please pedantic + // tests ("use strict"; 010; -- should fail). + + function setStrict(strct) { + strict = strct; + tokPos = lastEnd; + skipSpace(); + readToken(); + } + + // Start an AST node, attaching a start offset and optionally a + // `commentsBefore` property to it. + + function startNode() { + var node = {type: null, start: tokStart, end: null}; + if (options.trackComments && tokCommentsBefore) { + node.commentsBefore = tokCommentsBefore; + tokCommentsBefore = null; + } + if (options.locations) + node.loc = {start: tokStartLoc, end: null, source: sourceFile}; + if (options.ranges) + node.range = [tokStart, 0]; + return node; + } + + // Start a node whose start offset/comments information should be + // based on the start of another node. For example, a binary + // operator node is only started after its left-hand side has + // already been parsed. + + function startNodeFrom(other) { + var node = {type: null, start: other.start}; + if (other.commentsBefore) { + node.commentsBefore = other.commentsBefore; + other.commentsBefore = null; + } + if (options.locations) + node.loc = {start: other.loc.start, end: null, source: other.loc.source}; + if (options.ranges) + node.range = [other.range[0], 0]; + + return node; + } + + // Finish an AST node, adding `type`, `end`, and `commentsAfter` + // properties. + // + // We keep track of the last node that we finished, in order + // 'bubble' `commentsAfter` properties up to the biggest node. I.e. + // in '`1 + 1 // foo', the comment should be attached to the binary + // operator node, not the second literal node. + + var lastFinishedNode; + + function finishNode(node, type) { + node.type = type; + node.end = lastEnd; + if (options.trackComments) { + if (tokCommentsAfter) { + node.commentsAfter = tokCommentsAfter; + tokCommentsAfter = null; + } else if (lastFinishedNode && lastFinishedNode.end === lastEnd) { + node.commentsAfter = lastFinishedNode.commentsAfter; + lastFinishedNode.commentsAfter = null; + } + lastFinishedNode = node; + } + if (options.locations) + node.loc.end = lastEndLoc; + if (options.ranges) + node.range[1] = lastEnd; + return node; + } + + // Test whether a statement node is the string literal `"use strict"`. + + function isUseStrict(stmt) { + return options.ecmaVersion >= 5 && stmt.type === "ExpressionStatement" && + stmt.expression.type === "Literal" && stmt.expression.value === "use strict"; + } + + // Predicate that tests whether the next token is of the given + // type, and if yes, consumes it as a side effect. + + function eat(type) { + if (tokType === type) { + next(); + return true; + } + } + + // Test whether a semicolon can be inserted at the current position. + + function canInsertSemicolon() { + return !options.strictSemicolons && + (tokType === _eof || tokType === _braceR || newline.test(input.slice(lastEnd, tokStart))); + } + + // Consume a semicolon, or, failing that, see if we are allowed to + // pretend that there is a semicolon at this position. + + function semicolon() { + if (!eat(_semi) && !canInsertSemicolon()) unexpected(); + } + + // Expect a token of a given type. If found, consume it, otherwise, + // raise an unexpected token error. + + function expect(type) { + if (tokType === type) next(); + else unexpected(); + } + + // Raise an unexpected token error. + + function unexpected() { + raise(tokStart, "Unexpected token"); + } + + // Verify that a node is an lval — something that can be assigned + // to. + + function checkLVal(expr) { + if (expr.type !== "Identifier" && expr.type !== "MemberExpression") + raise(expr.start, "Assigning to rvalue"); + if (strict && expr.type === "Identifier" && isStrictBadIdWord(expr.name)) + raise(expr.start, "Assigning to " + expr.name + " in strict mode"); + } + + // ### Statement parsing + + // Parse a program. Initializes the parser, reads any number of + // statements, and wraps them in a Program node. Optionally takes a + // `program` argument. If present, the statements will be appended + // to its body instead of creating a new node. + + function parseTopLevel(program) { + initTokenState(); + lastStart = lastEnd = tokPos; + if (options.locations) lastEndLoc = curLineLoc(); + inFunction = strict = null; + labels = []; + readToken(); + + var node = program || startNode(), first = true; + if (!program) node.body = []; + while (tokType !== _eof) { + var stmt = parseStatement(); + node.body.push(stmt); + if (first && isUseStrict(stmt)) setStrict(true); + first = false; + } + return finishNode(node, "Program"); + }; + + var loopLabel = {kind: "loop"}, switchLabel = {kind: "switch"}; + + // Parse a single statement. + // + // If expecting a statement and finding a slash operator, parse a + // regular expression literal. This is to handle cases like + // `if (foo) /blah/.exec(foo);`, where looking at the previous token + // does not help. + + function parseStatement() { + if (tokType === _slash) + readToken(true); + + var starttype = tokType, node = startNode(); + + // Most types of statements are recognized by the keyword they + // start with. Many are trivial to parse, some require a bit of + // complexity. + + switch (starttype) { + case _break: case _continue: + next(); + var isBreak = starttype === _break; + if (eat(_semi) || canInsertSemicolon()) node.label = null; + else if (tokType !== _name) unexpected(); + else { + node.label = parseIdent(); + semicolon(); + } + + // Verify that there is an actual destination to break or + // continue to. + for (var i = 0; i < labels.length; ++i) { + var lab = labels[i]; + if (node.label == null || lab.name === node.label.name) { + if (lab.kind != null && (isBreak || lab.kind === "loop")) break; + if (node.label && isBreak) break; + } + } + if (i === labels.length) raise(node.start, "Unsyntactic " + starttype.keyword); + return finishNode(node, isBreak ? "BreakStatement" : "ContinueStatement"); + + case _debugger: + next(); + return finishNode(node, "DebuggerStatement"); + + case _do: + next(); + labels.push(loopLabel); + node.body = parseStatement(); + labels.pop(); + expect(_while); + node.test = parseParenExpression(); + semicolon(); + return finishNode(node, "DoWhileStatement"); + + // Disambiguating between a `for` and a `for`/`in` loop is + // non-trivial. Basically, we have to parse the init `var` + // statement or expression, disallowing the `in` operator (see + // the second parameter to `parseExpression`), and then check + // whether the next token is `in`. When there is no init part + // (semicolon immediately after the opening parenthesis), it is + // a regular `for` loop. + + case _for: + next(); + labels.push(loopLabel); + expect(_parenL); + if (tokType === _semi) return parseFor(node, null); + if (tokType === _var) { + var init = startNode(); + next(); + parseVar(init, true); + if (init.declarations.length === 1 && eat(_in)) + return parseForIn(node, init); + return parseFor(node, init); + } + var init = parseExpression(false, true); + if (eat(_in)) {checkLVal(init); return parseForIn(node, init);} + return parseFor(node, init); + + case _function: + next(); + return parseFunction(node, true); + + case _if: + next(); + node.test = parseParenExpression(); + node.consequent = parseStatement(); + node.alternate = eat(_else) ? parseStatement() : null; + return finishNode(node, "IfStatement"); + + case _return: + if (!inFunction) raise(tokStart, "'return' outside of function"); + next(); + + // In `return` (and `break`/`continue`), the keywords with + // optional arguments, we eagerly look for a semicolon or the + // possibility to insert one. + + if (eat(_semi) || canInsertSemicolon()) node.argument = null; + else { node.argument = parseExpression(); semicolon(); } + return finishNode(node, "ReturnStatement"); + + case _switch: + next(); + node.discriminant = parseParenExpression(); + node.cases = []; + expect(_braceL); + labels.push(switchLabel); + + // Statements under must be grouped (by label) in SwitchCase + // nodes. `cur` is used to keep the node that we are currently + // adding statements to. + + for (var cur, sawDefault; tokType != _braceR;) { + if (tokType === _case || tokType === _default) { + var isCase = tokType === _case; + if (cur) finishNode(cur, "SwitchCase"); + node.cases.push(cur = startNode()); + cur.consequent = []; + next(); + if (isCase) cur.test = parseExpression(); + else { + if (sawDefault) raise(lastStart, "Multiple default clauses"); sawDefault = true; + cur.test = null; + } + expect(_colon); + } else { + if (!cur) unexpected(); + cur.consequent.push(parseStatement()); + } + } + if (cur) finishNode(cur, "SwitchCase"); + next(); // Closing brace + labels.pop(); + return finishNode(node, "SwitchStatement"); + + case _throw: + next(); + if (newline.test(input.slice(lastEnd, tokStart))) + raise(lastEnd, "Illegal newline after throw"); + node.argument = parseExpression(); + return finishNode(node, "ThrowStatement"); + + case _try: + next(); + node.block = parseBlock(); + node.handlers = []; + while (tokType === _catch) { + var clause = startNode(); + next(); + expect(_parenL); + clause.param = parseIdent(); + if (strict && isStrictBadIdWord(clause.param.name)) + raise(clause.param.start, "Binding " + clause.param.name + " in strict mode"); + expect(_parenR); + clause.guard = null; + clause.body = parseBlock(); + node.handlers.push(finishNode(clause, "CatchClause")); + } + node.finalizer = eat(_finally) ? parseBlock() : null; + if (!node.handlers.length && !node.finalizer) + raise(node.start, "Missing catch or finally clause"); + return finishNode(node, "TryStatement"); + + case _var: + next(); + node = parseVar(node); + semicolon(); + return node; + + case _while: + next(); + node.test = parseParenExpression(); + labels.push(loopLabel); + node.body = parseStatement(); + labels.pop(); + return finishNode(node, "WhileStatement"); + + case _with: + if (strict) raise(tokStart, "'with' in strict mode"); + next(); + node.object = parseParenExpression(); + node.body = parseStatement(); + return finishNode(node, "WithStatement"); + + case _braceL: + return parseBlock(); + + case _semi: + next(); + return finishNode(node, "EmptyStatement"); + + // If the statement does not start with a statement keyword or a + // brace, it's an ExpressionStatement or LabeledStatement. We + // simply start parsing an expression, and afterwards, if the + // next token is a colon and the expression was a simple + // Identifier node, we switch to interpreting it as a label. + + default: + var maybeName = tokVal, expr = parseExpression(); + if (starttype === _name && expr.type === "Identifier" && eat(_colon)) { + for (var i = 0; i < labels.length; ++i) + if (labels[i].name === maybeName) raise(expr.start, "Label '" + maybeName + "' is already declared"); + var kind = tokType.isLoop ? "loop" : tokType === _switch ? "switch" : null; + labels.push({name: maybeName, kind: kind}); + node.body = parseStatement(); + node.label = expr; + return finishNode(node, "LabeledStatement"); + } else { + node.expression = expr; + semicolon(); + return finishNode(node, "ExpressionStatement"); + } + } + } + + // Used for constructs like `switch` and `if` that insist on + // parentheses around their expression. + + function parseParenExpression() { + expect(_parenL); + var val = parseExpression(); + expect(_parenR); + return val; + } + + // Parse a semicolon-enclosed block of statements, handling `"use + // strict"` declarations when `allowStrict` is true (used for + // function bodies). + + function parseBlock(allowStrict) { + var node = startNode(), first = true, strict = false, oldStrict; + node.body = []; + expect(_braceL); + while (!eat(_braceR)) { + var stmt = parseStatement(); + node.body.push(stmt); + if (first && isUseStrict(stmt)) { + oldStrict = strict; + setStrict(strict = true); + } + first = false + } + if (strict && !oldStrict) setStrict(false); + return finishNode(node, "BlockStatement"); + } + + // Parse a regular `for` loop. The disambiguation code in + // `parseStatement` will already have parsed the init statement or + // expression. + + function parseFor(node, init) { + node.init = init; + expect(_semi); + node.test = tokType === _semi ? null : parseExpression(); + expect(_semi); + node.update = tokType === _parenR ? null : parseExpression(); + expect(_parenR); + node.body = parseStatement(); + labels.pop(); + return finishNode(node, "ForStatement"); + } + + // Parse a `for`/`in` loop. + + function parseForIn(node, init) { + node.left = init; + node.right = parseExpression(); + expect(_parenR); + node.body = parseStatement(); + labels.pop(); + return finishNode(node, "ForInStatement"); + } + + // Parse a list of variable declarations. + + function parseVar(node, noIn) { + node.declarations = []; + node.kind = "var"; + for (;;) { + var decl = startNode(); + decl.id = parseIdent(); + if (strict && isStrictBadIdWord(decl.id.name)) + raise(decl.id.start, "Binding " + decl.id.name + " in strict mode"); + decl.init = eat(_eq) ? parseExpression(true, noIn) : null; + node.declarations.push(finishNode(decl, "VariableDeclarator")); + if (!eat(_comma)) break; + } + return finishNode(node, "VariableDeclaration"); + } + + // ### Expression parsing + + // These nest, from the most general expression type at the top to + // 'atomic', nondivisible expression types at the bottom. Most of + // the functions will simply let the function(s) below them parse, + // and, *if* the syntactic construct they handle is present, wrap + // the AST node that the inner parser gave them in another node. + + // Parse a full expression. The arguments are used to forbid comma + // sequences (in argument lists, array literals, or object literals) + // or the `in` operator (in for loops initalization expressions). + + function parseExpression(noComma, noIn) { + var expr = parseMaybeAssign(noIn); + if (!noComma && tokType === _comma) { + var node = startNodeFrom(expr); + node.expressions = [expr]; + while (eat(_comma)) node.expressions.push(parseMaybeAssign(noIn)); + return finishNode(node, "SequenceExpression"); + } + return expr; + } + + // Parse an assignment expression. This includes applications of + // operators like `+=`. + + function parseMaybeAssign(noIn) { + var left = parseMaybeConditional(noIn); + if (tokType.isAssign) { + var node = startNodeFrom(left); + node.operator = tokVal; + node.left = left; + next(); + node.right = parseMaybeAssign(noIn); + checkLVal(left); + return finishNode(node, "AssignmentExpression"); + } + return left; + } + + // Parse a ternary conditional (`?:`) operator. + + function parseMaybeConditional(noIn) { + var expr = parseExprOps(noIn); + if (eat(_question)) { + var node = startNodeFrom(expr); + node.test = expr; + node.consequent = parseExpression(true); + expect(_colon); + node.alternate = parseExpression(true, noIn); + return finishNode(node, "ConditionalExpression"); + } + return expr; + } + + // Start the precedence parser. + + function parseExprOps(noIn) { + return parseExprOp(parseMaybeUnary(noIn), -1, noIn); + } + + // Parse binary operators with the operator precedence parsing + // algorithm. `left` is the left-hand side of the operator. + // `minPrec` provides context that allows the function to stop and + // defer further parser to one of its callers when it encounters an + // operator that has a lower precedence than the set it is parsing. + + function parseExprOp(left, minPrec, noIn) { + var prec = tokType.binop; + if (prec != null && (!noIn || tokType !== _in)) { + if (prec > minPrec) { + var node = startNodeFrom(left); + node.left = left; + node.operator = tokVal; + next(); + node.right = parseExprOp(parseMaybeUnary(noIn), prec, noIn); + var node = finishNode(node, /&&|\|\|/.test(node.operator) ? "LogicalExpression" : "BinaryExpression"); + return parseExprOp(node, minPrec, noIn); + } + } + return left; + } + + // Parse unary operators, both prefix and postfix. + + function parseMaybeUnary(noIn) { + if (tokType.prefix) { + var node = startNode(), update = tokType.isUpdate; + node.operator = tokVal; + node.prefix = true; + next(); + node.argument = parseMaybeUnary(noIn); + if (update) checkLVal(node.argument); + else if (strict && node.operator === "delete" && + node.argument.type === "Identifier") + raise(node.start, "Deleting local variable in strict mode"); + return finishNode(node, update ? "UpdateExpression" : "UnaryExpression"); + } + var expr = parseExprSubscripts(); + while (tokType.postfix && !canInsertSemicolon()) { + var node = startNodeFrom(expr); + node.operator = tokVal; + node.prefix = false; + node.argument = expr; + checkLVal(expr); + next(); + expr = finishNode(node, "UpdateExpression"); + } + return expr; + } + + // Parse call, dot, and `[]`-subscript expressions. + + function parseExprSubscripts() { + return parseSubscripts(parseExprAtom()); + } + + function parseSubscripts(base, noCalls) { + if (eat(_dot)) { + var node = startNodeFrom(base); + node.object = base; + node.property = parseIdent(true); + node.computed = false; + return parseSubscripts(finishNode(node, "MemberExpression"), noCalls); + } else if (eat(_bracketL)) { + var node = startNodeFrom(base); + node.object = base; + node.property = parseExpression(); + node.computed = true; + expect(_bracketR); + return parseSubscripts(finishNode(node, "MemberExpression"), noCalls); + } else if (!noCalls && eat(_parenL)) { + var node = startNodeFrom(base); + node.callee = base; + node.arguments = parseExprList(_parenR, false); + return parseSubscripts(finishNode(node, "CallExpression"), noCalls); + } else return base; + } + + // Parse an atomic expression — either a single token that is an + // expression, an expression started by a keyword like `function` or + // `new`, or an expression wrapped in punctuation like `()`, `[]`, + // or `{}`. + + function parseExprAtom() { + switch (tokType) { + case _this: + var node = startNode(); + next(); + return finishNode(node, "ThisExpression"); + case _name: + return parseIdent(); + case _num: case _string: case _regexp: + var node = startNode(); + node.value = tokVal; + node.raw = input.slice(tokStart, tokEnd); + next(); + return finishNode(node, "Literal"); + + case _null: case _true: case _false: + var node = startNode(); + node.value = tokType.atomValue; + next(); + return finishNode(node, "Literal"); + + case _parenL: + next(); + var val = parseExpression(); + expect(_parenR); + return val; + + case _bracketL: + var node = startNode(); + next(); + node.elements = parseExprList(_bracketR, true, true); + return finishNode(node, "ArrayExpression"); + + case _braceL: + return parseObj(); + + case _function: + var node = startNode(); + next(); + return parseFunction(node, false); + + case _new: + return parseNew(); + + default: + unexpected(); + } + } + + // New's precedence is slightly tricky. It must allow its argument + // to be a `[]` or dot subscript expression, but not a call — at + // least, not without wrapping it in parentheses. Thus, it uses the + + function parseNew() { + var node = startNode(); + next(); + node.callee = parseSubscripts(parseExprAtom(false), true); + if (eat(_parenL)) node.arguments = parseExprList(_parenR, false); + else node.arguments = []; + return finishNode(node, "NewExpression"); + } + + // Parse an object literal. + + function parseObj() { + var node = startNode(), first = true, sawGetSet = false; + node.properties = []; + next(); + while (!eat(_braceR)) { + if (!first) { + expect(_comma); + if (options.allowTrailingCommas && eat(_braceR)) break; + } else first = false; + + var prop = {key: parsePropertyName()}, isGetSet = false, kind; + if (eat(_colon)) { + prop.value = parseExpression(true); + kind = prop.kind = "init"; + } else if (options.ecmaVersion >= 5 && prop.key.type === "Identifier" && + (prop.key.name === "get" || prop.key.name === "set")) { + isGetSet = sawGetSet = true; + kind = prop.kind = prop.key.name; + prop.key = parsePropertyName(); + if (!tokType === _parenL) unexpected(); + prop.value = parseFunction(startNode(), false); + } else unexpected(); + + // getters and setters are not allowed to clash — either with + // each other or with an init property — and in strict mode, + // init properties are also not allowed to be repeated. + + if (prop.key.type === "Identifier" && (strict || sawGetSet)) { + for (var i = 0; i < node.properties.length; ++i) { + var other = node.properties[i]; + if (other.key.name === prop.key.name) { + var conflict = kind == other.kind || isGetSet && other.kind === "init" || + kind === "init" && (other.kind === "get" || other.kind === "set"); + if (conflict && !strict && kind === "init" && other.kind === "init") conflict = false; + if (conflict) raise(prop.key.start, "Redefinition of property"); + } + } + } + node.properties.push(prop); + } + return finishNode(node, "ObjectExpression"); + } + + function parsePropertyName() { + if (tokType === _num || tokType === _string) return parseExprAtom(); + return parseIdent(true); + } + + // Parse a function declaration or literal (depending on the + // `isStatement` parameter). + + function parseFunction(node, isStatement) { + if (tokType === _name) node.id = parseIdent(); + else if (isStatement) unexpected(); + else node.id = null; + node.params = []; + var first = true; + expect(_parenL); + while (!eat(_parenR)) { + if (!first) expect(_comma); else first = false; + node.params.push(parseIdent()); + } + + // Start a new scope with regard to labels and the `inFunction` + // flag (restore them to their old value afterwards). + var oldInFunc = inFunction, oldLabels = labels; + inFunction = true; labels = []; + node.body = parseBlock(true); + inFunction = oldInFunc; labels = oldLabels; + + // If this is a strict mode function, verify that argument names + // are not repeated, and it does not try to bind the words `eval` + // or `arguments`. + if (strict || node.body.body.length && isUseStrict(node.body.body[0])) { + for (var i = node.id ? -1 : 0; i < node.params.length; ++i) { + var id = i < 0 ? node.id : node.params[i]; + if (isStrictReservedWord(id.name) || isStrictBadIdWord(id.name)) + raise(id.start, "Defining '" + id.name + "' in strict mode"); + if (i >= 0) for (var j = 0; j < i; ++j) if (id.name === node.params[j].name) + raise(id.start, "Argument name clash in strict mode"); + } + } + + return finishNode(node, isStatement ? "FunctionDeclaration" : "FunctionExpression"); + } + + // Parses a comma-separated list of expressions, and returns them as + // an array. `close` is the token type that ends the list, and + // `allowEmpty` can be turned on to allow subsequent commas with + // nothing in between them to be parsed as `null` (which is needed + // for array literals). + + function parseExprList(close, allowTrailingComma, allowEmpty) { + var elts = [], first = true; + while (!eat(close)) { + if (!first) { + expect(_comma); + if (allowTrailingComma && options.allowTrailingCommas && eat(close)) break; + } else first = false; + + if (allowEmpty && tokType === _comma) elts.push(null); + else elts.push(parseExpression(true)); + } + return elts; + } + + // Parse the next token as an identifier. If `liberal` is true (used + // when parsing properties), it will also convert keywords into + // identifiers. + + function parseIdent(liberal) { + var node = startNode(); + node.name = tokType === _name ? tokVal : (liberal && !options.forbidReserved && tokType.keyword) || unexpected(); + next(); + return finishNode(node, "Identifier"); + } + +})(typeof exports === "undefined" ? (window.acorn = {}) : exports); diff --git a/pitfall/pdfkit/node_modules/codemirror/test/lint/lint.js b/pitfall/pdfkit/node_modules/codemirror/test/lint/lint.js new file mode 100644 index 00000000..fda737c0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/test/lint/lint.js @@ -0,0 +1,139 @@ +/* + Simple linter, based on the Acorn [1] parser module + + All of the existing linters either cramp my style or have huge + dependencies (Closure). So here's a very simple, non-invasive one + that only spots + + - missing semicolons and trailing commas + - variables or properties that are reserved words + - assigning to a variable you didn't declare + - access to non-whitelisted globals + (use a '// declare global: foo, bar' comment to declare extra + globals in a file) + + [1]: https://github.com/marijnh/acorn/ +*/ + +var topAllowedGlobals = Object.create(null); +("Error RegExp Number String Array Function Object Math Date undefined " + + "parseInt parseFloat Infinity NaN isNaN " + + "window document navigator prompt alert confirm console " + + "FileReader Worker postMessage importScripts " + + "setInterval clearInterval setTimeout clearTimeout " + + "CodeMirror test") + .split(" ").forEach(function(n) { topAllowedGlobals[n] = true; }); + +var fs = require("fs"), acorn = require("./acorn.js"), walk = require("./walk.js"); + +var scopePasser = walk.make({ + ScopeBody: function(node, prev, c) { c(node, node.scope); } +}); + +function checkFile(fileName) { + var file = fs.readFileSync(fileName, "utf8"), notAllowed; + if (notAllowed = file.match(/[\x00-\x08\x0b\x0c\x0e-\x19\uFEFF\t]|[ \t]\n/)) { + var msg; + if (notAllowed[0] == "\t") msg = "Found tab character"; + else if (notAllowed[0].indexOf("\n") > -1) msg = "Trailing whitespace"; + else msg = "Undesirable character " + notAllowed[0].charCodeAt(0); + var info = acorn.getLineInfo(file, notAllowed.index); + fail(msg + " at line " + info.line + ", column " + info.column, {source: fileName}); + } + + var globalsSeen = Object.create(null); + + try { + var parsed = acorn.parse(file, { + locations: true, + ecmaVersion: 3, + strictSemicolons: true, + allowTrailingCommas: false, + forbidReserved: true, + sourceFile: fileName + }); + } catch (e) { + fail(e.message, {source: fileName}); + return; + } + + var scopes = []; + + walk.simple(parsed, { + ScopeBody: function(node, scope) { + node.scope = scope; + scopes.push(scope); + } + }, walk.scopeVisitor, {vars: Object.create(null)}); + + var ignoredGlobals = Object.create(null); + + function inScope(name, scope) { + for (var cur = scope; cur; cur = cur.prev) + if (name in cur.vars) return true; + } + function checkLHS(node, scope) { + if (node.type == "Identifier" && !(node.name in ignoredGlobals) && + !inScope(node.name, scope)) { + ignoredGlobals[node.name] = true; + fail("Assignment to global variable", node.loc); + } + } + + walk.simple(parsed, { + UpdateExpression: function(node, scope) {checkLHS(node.argument, scope);}, + AssignmentExpression: function(node, scope) {checkLHS(node.left, scope);}, + Identifier: function(node, scope) { + if (node.name == "arguments") return; + // Mark used identifiers + for (var cur = scope; cur; cur = cur.prev) + if (node.name in cur.vars) { + cur.vars[node.name].used = true; + return; + } + globalsSeen[node.name] = node.loc; + }, + FunctionExpression: function(node) { + if (node.id) fail("Named function expression", node.loc); + } + }, scopePasser); + + if (!globalsSeen.exports) { + var allowedGlobals = Object.create(topAllowedGlobals), m; + if (m = file.match(/\/\/ declare global:\s+(.*)/)) + m[1].split(/,\s*/g).forEach(function(n) { allowedGlobals[n] = true; }); + for (var glob in globalsSeen) + if (!(glob in allowedGlobals)) + fail("Access to global variable " + glob + ". Add a '// declare global: " + glob + + "' comment or add this variable in test/lint/lint.js.", globalsSeen[glob]); + } + + + for (var i = 0; i < scopes.length; ++i) { + var scope = scopes[i]; + for (var name in scope.vars) { + var info = scope.vars[name]; + if (!info.used && info.type != "catch clause" && info.type != "function name" && name.charAt(0) != "_") + fail("Unused " + info.type + " " + name, info.node.loc); + } + } +} + +var failed = false; +function fail(msg, pos) { + if (pos.start) msg += " (" + pos.start.line + ":" + pos.start.column + ")"; + console.log(pos.source + ": " + msg); + failed = true; +} + +function checkDir(dir) { + fs.readdirSync(dir).forEach(function(file) { + var fname = dir + "/" + file; + if (/\.js$/.test(file)) checkFile(fname); + else if (file != "dep" && fs.lstatSync(fname).isDirectory()) checkDir(fname); + }); +} + +exports.checkDir = checkDir; +exports.checkFile = checkFile; +exports.success = function() { return !failed; }; diff --git a/pitfall/pdfkit/node_modules/codemirror/test/lint/walk.js b/pitfall/pdfkit/node_modules/codemirror/test/lint/walk.js new file mode 100644 index 00000000..97321acf --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/test/lint/walk.js @@ -0,0 +1,216 @@ +// AST walker module for Mozilla Parser API compatible trees + +(function(exports) { + "use strict"; + + // A simple walk is one where you simply specify callbacks to be + // called on specific nodes. The last two arguments are optional. A + // simple use would be + // + // walk.simple(myTree, { + // Expression: function(node) { ... } + // }); + // + // to do something with all expressions. All Parser API node types + // can be used to identify node types, as well as Expression, + // Statement, and ScopeBody, which denote categories of nodes. + // + // The base argument can be used to pass a custom (recursive) + // walker, and state can be used to give this walked an initial + // state. + exports.simple = function(node, visitors, base, state) { + if (!base) base = exports; + function c(node, st, override) { + var type = override || node.type, found = visitors[type]; + if (found) found(node, st); + base[type](node, st, c); + } + c(node, state); + }; + + // A recursive walk is one where your functions override the default + // walkers. They can modify and replace the state parameter that's + // threaded through the walk, and can opt how and whether to walk + // their child nodes (by calling their third argument on these + // nodes). + exports.recursive = function(node, state, funcs, base) { + var visitor = exports.make(funcs, base); + function c(node, st, override) { + visitor[override || node.type](node, st, c); + } + c(node, state); + }; + + // Used to create a custom walker. Will fill in all missing node + // type properties with the defaults. + exports.make = function(funcs, base) { + if (!base) base = exports; + var visitor = {}; + for (var type in base) + visitor[type] = funcs.hasOwnProperty(type) ? funcs[type] : base[type]; + return visitor; + }; + + function skipThrough(node, st, c) { c(node, st); } + function ignore(node, st, c) {} + + // Node walkers. + + exports.Program = exports.BlockStatement = function(node, st, c) { + for (var i = 0; i < node.body.length; ++i) + c(node.body[i], st, "Statement"); + }; + exports.Statement = skipThrough; + exports.EmptyStatement = ignore; + exports.ExpressionStatement = function(node, st, c) { + c(node.expression, st, "Expression"); + }; + exports.IfStatement = function(node, st, c) { + c(node.test, st, "Expression"); + c(node.consequent, st, "Statement"); + if (node.alternate) c(node.alternate, st, "Statement"); + }; + exports.LabeledStatement = function(node, st, c) { + c(node.body, st, "Statement"); + }; + exports.BreakStatement = exports.ContinueStatement = ignore; + exports.WithStatement = function(node, st, c) { + c(node.object, st, "Expression"); + c(node.body, st, "Statement"); + }; + exports.SwitchStatement = function(node, st, c) { + c(node.discriminant, st, "Expression"); + for (var i = 0; i < node.cases.length; ++i) { + var cs = node.cases[i]; + if (cs.test) c(cs.test, st, "Expression"); + for (var j = 0; j < cs.consequent.length; ++j) + c(cs.consequent[j], st, "Statement"); + } + }; + exports.ReturnStatement = function(node, st, c) { + if (node.argument) c(node.argument, st, "Expression"); + }; + exports.ThrowStatement = function(node, st, c) { + c(node.argument, st, "Expression"); + }; + exports.TryStatement = function(node, st, c) { + c(node.block, st, "Statement"); + for (var i = 0; i < node.handlers.length; ++i) + c(node.handlers[i].body, st, "ScopeBody"); + if (node.finalizer) c(node.finalizer, st, "Statement"); + }; + exports.WhileStatement = function(node, st, c) { + c(node.test, st, "Expression"); + c(node.body, st, "Statement"); + }; + exports.DoWhileStatement = exports.WhileStatement; + exports.ForStatement = function(node, st, c) { + if (node.init) c(node.init, st, "ForInit"); + if (node.test) c(node.test, st, "Expression"); + if (node.update) c(node.update, st, "Expression"); + c(node.body, st, "Statement"); + }; + exports.ForInStatement = function(node, st, c) { + c(node.left, st, "ForInit"); + c(node.right, st, "Expression"); + c(node.body, st, "Statement"); + }; + exports.ForInit = function(node, st, c) { + if (node.type == "VariableDeclaration") c(node, st); + else c(node, st, "Expression"); + }; + exports.DebuggerStatement = ignore; + + exports.FunctionDeclaration = function(node, st, c) { + c(node, st, "Function"); + }; + exports.VariableDeclaration = function(node, st, c) { + for (var i = 0; i < node.declarations.length; ++i) { + var decl = node.declarations[i]; + if (decl.init) c(decl.init, st, "Expression"); + } + }; + + exports.Function = function(node, st, c) { + c(node.body, st, "ScopeBody"); + }; + exports.ScopeBody = function(node, st, c) { + c(node, st, "Statement"); + }; + + exports.Expression = skipThrough; + exports.ThisExpression = ignore; + exports.ArrayExpression = function(node, st, c) { + for (var i = 0; i < node.elements.length; ++i) { + var elt = node.elements[i]; + if (elt) c(elt, st, "Expression"); + } + }; + exports.ObjectExpression = function(node, st, c) { + for (var i = 0; i < node.properties.length; ++i) + c(node.properties[i].value, st, "Expression"); + }; + exports.FunctionExpression = exports.FunctionDeclaration; + exports.SequenceExpression = function(node, st, c) { + for (var i = 0; i < node.expressions.length; ++i) + c(node.expressions[i], st, "Expression"); + }; + exports.UnaryExpression = exports.UpdateExpression = function(node, st, c) { + c(node.argument, st, "Expression"); + }; + exports.BinaryExpression = exports.AssignmentExpression = exports.LogicalExpression = function(node, st, c) { + c(node.left, st, "Expression"); + c(node.right, st, "Expression"); + }; + exports.ConditionalExpression = function(node, st, c) { + c(node.test, st, "Expression"); + c(node.consequent, st, "Expression"); + c(node.alternate, st, "Expression"); + }; + exports.NewExpression = exports.CallExpression = function(node, st, c) { + c(node.callee, st, "Expression"); + if (node.arguments) for (var i = 0; i < node.arguments.length; ++i) + c(node.arguments[i], st, "Expression"); + }; + exports.MemberExpression = function(node, st, c) { + c(node.object, st, "Expression"); + if (node.computed) c(node.property, st, "Expression"); + }; + exports.Identifier = exports.Literal = ignore; + + // A custom walker that keeps track of the scope chain and the + // variables defined in it. + function makeScope(prev) { + return {vars: Object.create(null), prev: prev}; + } + exports.scopeVisitor = exports.make({ + Function: function(node, scope, c) { + var inner = makeScope(scope); + for (var i = 0; i < node.params.length; ++i) + inner.vars[node.params[i].name] = {type: "argument", node: node.params[i]}; + if (node.id) { + var decl = node.type == "FunctionDeclaration"; + (decl ? scope : inner).vars[node.id.name] = + {type: decl ? "function" : "function name", node: node.id}; + } + c(node.body, inner, "ScopeBody"); + }, + TryStatement: function(node, scope, c) { + c(node.block, scope, "Statement"); + for (var i = 0; i < node.handlers.length; ++i) { + var handler = node.handlers[i], inner = makeScope(scope); + inner.vars[handler.param.name] = {type: "catch clause", node: handler.param}; + c(handler.body, inner, "ScopeBody"); + } + if (node.finalizer) c(node.finalizer, scope, "Statement"); + }, + VariableDeclaration: function(node, scope, c) { + for (var i = 0; i < node.declarations.length; ++i) { + var decl = node.declarations[i]; + scope.vars[decl.id.name] = {type: "var", node: decl.id}; + if (decl.init) c(decl.init, scope, "Expression"); + } + } + }); + +})(typeof exports == "undefined" ? acorn.walk = {} : exports); diff --git a/pitfall/pdfkit/node_modules/codemirror/test/mode_test.css b/pitfall/pdfkit/node_modules/codemirror/test/mode_test.css new file mode 100644 index 00000000..1ac66737 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/test/mode_test.css @@ -0,0 +1,10 @@ +.mt-output .mt-token { + border: 1px solid #ddd; + white-space: pre; + font-family: "Consolas", monospace; + text-align: center; +} + +.mt-output .mt-style { + font-size: x-small; +} diff --git a/pitfall/pdfkit/node_modules/codemirror/test/mode_test.js b/pitfall/pdfkit/node_modules/codemirror/test/mode_test.js new file mode 100644 index 00000000..4b63cf51 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/test/mode_test.js @@ -0,0 +1,200 @@ +/** + * Helper to test CodeMirror highlighting modes. It pretty prints output of the + * highlighter and can check against expected styles. + * + * Mode tests are registered by calling test.mode(testName, mode, + * tokens), where mode is a mode object as returned by + * CodeMirror.getMode, and tokens is an array of lines that make up + * the test. + * + * These lines are strings, in which styled stretches of code are + * enclosed in brackets `[]`, and prefixed by their style. For + * example, `[keyword if]`. Brackets in the code itself must be + * duplicated to prevent them from being interpreted as token + * boundaries. For example `a[[i]]` for `a[i]`. If a token has + * multiple styles, the styles must be separated by ampersands, for + * example `[tag&error ]`. + * + * See the test.js files in the css, markdown, gfm, and stex mode + * directories for examples. + */ +(function() { + function findSingle(str, pos, ch) { + for (;;) { + var found = str.indexOf(ch, pos); + if (found == -1) return null; + if (str.charAt(found + 1) != ch) return found; + pos = found + 2; + } + } + + var styleName = /[\w&-_]+/g; + function parseTokens(strs) { + var tokens = [], plain = ""; + for (var i = 0; i < strs.length; ++i) { + if (i) plain += "\n"; + var str = strs[i], pos = 0; + while (pos < str.length) { + var style = null, text; + if (str.charAt(pos) == "[" && str.charAt(pos+1) != "[") { + styleName.lastIndex = pos + 1; + var m = styleName.exec(str); + style = m[0].replace(/&/g, " "); + var textStart = pos + style.length + 2; + var end = findSingle(str, textStart, "]"); + if (end == null) throw new Error("Unterminated token at " + pos + " in '" + str + "'" + style); + text = str.slice(textStart, end); + pos = end + 1; + } else { + var end = findSingle(str, pos, "["); + if (end == null) end = str.length; + text = str.slice(pos, end); + pos = end; + } + text = text.replace(/\[\[|\]\]/g, function(s) {return s.charAt(0);}); + tokens.push(style, text); + plain += text; + } + } + return {tokens: tokens, plain: plain}; + } + + test.indentation = function(name, mode, tokens, modeName) { + var data = parseTokens(tokens); + return test((modeName || mode.name) + "_indent_" + name, function() { + return compare(data.plain, data.tokens, mode, true); + }); + }; + + test.mode = function(name, mode, tokens, modeName) { + var data = parseTokens(tokens); + return test((modeName || mode.name) + "_" + name, function() { + return compare(data.plain, data.tokens, mode); + }); + }; + + function compare(text, expected, mode, compareIndentation) { + + var expectedOutput = []; + for (var i = 0; i < expected.length; i += 2) { + var sty = expected[i]; + if (sty && sty.indexOf(" ")) sty = sty.split(' ').sort().join(' '); + expectedOutput.push(sty, expected[i + 1]); + } + + var observedOutput = highlight(text, mode, compareIndentation); + + var pass, passStyle = ""; + pass = highlightOutputsEqual(expectedOutput, observedOutput); + passStyle = pass ? 'mt-pass' : 'mt-fail'; + + var s = ''; + if (pass) { + s += '
    '; + s += '
    ' + text.replace('&', '&').replace('<', '<') + '
    '; + s += '
    '; + s += prettyPrintOutputTable(observedOutput); + s += '
    '; + s += '
    '; + return s; + } else { + s += '
    '; + s += '
    ' + text.replace('&', '&').replace('<', '<') + '
    '; + s += '
    '; + s += 'expected:'; + s += prettyPrintOutputTable(expectedOutput); + s += 'observed:'; + s += prettyPrintOutputTable(observedOutput); + s += '
    '; + s += '
    '; + throw s; + } + } + + /** + * Emulation of CodeMirror's internal highlight routine for testing. Multi-line + * input is supported. + * + * @param string to highlight + * + * @param mode the mode that will do the actual highlighting + * + * @return array of [style, token] pairs + */ + function highlight(string, mode, compareIndentation) { + var state = mode.startState() + + var lines = string.replace(/\r\n/g,'\n').split('\n'); + var st = [], pos = 0; + for (var i = 0; i < lines.length; ++i) { + var line = lines[i], newLine = true; + var stream = new CodeMirror.StringStream(line); + if (line == "" && mode.blankLine) mode.blankLine(state); + /* Start copied code from CodeMirror.highlight */ + while (!stream.eol()) { + var compare = mode.token(stream, state), substr = stream.current(); + if(compareIndentation) compare = mode.indent(state) || null; + else if (compare && compare.indexOf(" ") > -1) compare = compare.split(' ').sort().join(' '); + + stream.start = stream.pos; + if (pos && st[pos-2] == compare && !newLine) { + st[pos-1] += substr; + } else if (substr) { + st[pos++] = compare; st[pos++] = substr; + } + // Give up when line is ridiculously long + if (stream.pos > 5000) { + st[pos++] = null; st[pos++] = this.text.slice(stream.pos); + break; + } + newLine = false; + } + } + + return st; + } + + /** + * Compare two arrays of output from highlight. + * + * @param o1 array of [style, token] pairs + * + * @param o2 array of [style, token] pairs + * + * @return boolean; true iff outputs equal + */ + function highlightOutputsEqual(o1, o2) { + if (o1.length != o2.length) return false; + for (var i = 0; i < o1.length; ++i) + if (o1[i] != o2[i]) return false; + return true; + } + + /** + * Print tokens and corresponding styles in a table. Spaces in the token are + * replaced with 'interpunct' dots (·). + * + * @param output array of [style, token] pairs + * + * @return html string + */ + function prettyPrintOutputTable(output) { + var s = ''; + s += ''; + for (var i = 0; i < output.length; i += 2) { + var style = output[i], val = output[i+1]; + s += + ''; + } + s += ''; + for (var i = 0; i < output.length; i += 2) { + s += ''; + } + s += '
    ' + + '' + + val.replace(/ /g,'\xb7').replace('&', '&').replace('<', '<') + + '' + + '
    ' + (output[i] || null) + '
    '; + return s; + } +})(); diff --git a/pitfall/pdfkit/node_modules/codemirror/test/phantom_driver.js b/pitfall/pdfkit/node_modules/codemirror/test/phantom_driver.js new file mode 100644 index 00000000..dbad08db --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/test/phantom_driver.js @@ -0,0 +1,31 @@ +var page = require('webpage').create(); + +page.open("http://localhost:3000/test/index.html", function (status) { + if (status != "success") { + console.log("page couldn't be loaded successfully"); + phantom.exit(1); + } + waitFor(function () { + return page.evaluate(function () { + var output = document.getElementById('status'); + if (!output) { return false; } + return (/^(\d+ failures?|all passed)/i).test(output.innerText); + }); + }, function () { + var failed = page.evaluate(function () { return window.failed; }); + var output = page.evaluate(function () { + return document.getElementById('output').innerText + "\n" + + document.getElementById('status').innerText; + }); + console.log(output); + phantom.exit(failed > 0 ? 1 : 0); + }); +}); + +function waitFor (test, cb) { + if (test()) { + cb(); + } else { + setTimeout(function () { waitFor(test, cb); }, 250); + } +} diff --git a/pitfall/pdfkit/node_modules/codemirror/test/run.js b/pitfall/pdfkit/node_modules/codemirror/test/run.js new file mode 100755 index 00000000..52221be5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/test/run.js @@ -0,0 +1,34 @@ +#!/usr/bin/env node + +var lint = require("./lint/lint"); + +lint.checkDir("mode"); +lint.checkDir("lib"); +lint.checkDir("addon"); +lint.checkDir("keymap"); + +var ok = lint.success(); + +var files = new (require('node-static').Server)('.'); + +var server = require('http').createServer(function (req, res) { + req.addListener('end', function () { + files.serve(req, res); + }); +}).addListener('error', function (err) { + throw err; +}).listen(3000, function () { + var child_process = require('child_process'); + child_process.exec("which phantomjs", function (err) { + if (err) { + console.error("PhantomJS is not installed. Download from http://phantomjs.org"); + process.exit(1); + } + var cmd = 'phantomjs test/phantom_driver.js'; + child_process.exec(cmd, function (err, stdout) { + server.close(); + console.log(stdout); + process.exit(err || !ok ? 1 : 0); + }); + }); +}); diff --git a/pitfall/pdfkit/node_modules/codemirror/test/test.js b/pitfall/pdfkit/node_modules/codemirror/test/test.js new file mode 100644 index 00000000..e5d9afde --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/test/test.js @@ -0,0 +1,1562 @@ +var Pos = CodeMirror.Pos; + +CodeMirror.defaults.rtlMoveVisually = true; + +function forEach(arr, f) { + for (var i = 0, e = arr.length; i < e; ++i) f(arr[i]); +} + +function addDoc(cm, width, height) { + var content = [], line = ""; + for (var i = 0; i < width; ++i) line += "x"; + for (var i = 0; i < height; ++i) content.push(line); + cm.setValue(content.join("\n")); +} + +function byClassName(elt, cls) { + if (elt.getElementsByClassName) return elt.getElementsByClassName(cls); + var found = [], re = new RegExp("\\b" + cls + "\\b"); + function search(elt) { + if (elt.nodeType == 3) return; + if (re.test(elt.className)) found.push(elt); + for (var i = 0, e = elt.childNodes.length; i < e; ++i) + search(elt.childNodes[i]); + } + search(elt); + return found; +} + +var ie_lt8 = /MSIE [1-7]\b/.test(navigator.userAgent); +var mac = /Mac/.test(navigator.platform); +var phantom = /PhantomJS/.test(navigator.userAgent); +var opera = /Opera\/\./.test(navigator.userAgent); +var opera_version = opera && navigator.userAgent.match(/Version\/(\d+\.\d+)/); +if (opera_version) opera_version = Number(opera_version); +var opera_lt10 = opera && (!opera_version || opera_version < 10); + +namespace = "core_"; + +test("core_fromTextArea", function() { + var te = document.getElementById("code"); + te.value = "CONTENT"; + var cm = CodeMirror.fromTextArea(te); + is(!te.offsetHeight); + eq(cm.getValue(), "CONTENT"); + cm.setValue("foo\nbar"); + eq(cm.getValue(), "foo\nbar"); + cm.save(); + is(/^foo\r?\nbar$/.test(te.value)); + cm.setValue("xxx"); + cm.toTextArea(); + is(te.offsetHeight); + eq(te.value, "xxx"); +}); + +testCM("getRange", function(cm) { + eq(cm.getLine(0), "1234"); + eq(cm.getLine(1), "5678"); + eq(cm.getLine(2), null); + eq(cm.getLine(-1), null); + eq(cm.getRange(Pos(0, 0), Pos(0, 3)), "123"); + eq(cm.getRange(Pos(0, -1), Pos(0, 200)), "1234"); + eq(cm.getRange(Pos(0, 2), Pos(1, 2)), "34\n56"); + eq(cm.getRange(Pos(1, 2), Pos(100, 0)), "78"); +}, {value: "1234\n5678"}); + +testCM("replaceRange", function(cm) { + eq(cm.getValue(), ""); + cm.replaceRange("foo\n", Pos(0, 0)); + eq(cm.getValue(), "foo\n"); + cm.replaceRange("a\nb", Pos(0, 1)); + eq(cm.getValue(), "fa\nboo\n"); + eq(cm.lineCount(), 3); + cm.replaceRange("xyzzy", Pos(0, 0), Pos(1, 1)); + eq(cm.getValue(), "xyzzyoo\n"); + cm.replaceRange("abc", Pos(0, 0), Pos(10, 0)); + eq(cm.getValue(), "abc"); + eq(cm.lineCount(), 1); +}); + +testCM("selection", function(cm) { + cm.setSelection(Pos(0, 4), Pos(2, 2)); + is(cm.somethingSelected()); + eq(cm.getSelection(), "11\n222222\n33"); + eqPos(cm.getCursor(false), Pos(2, 2)); + eqPos(cm.getCursor(true), Pos(0, 4)); + cm.setSelection(Pos(1, 0)); + is(!cm.somethingSelected()); + eq(cm.getSelection(), ""); + eqPos(cm.getCursor(true), Pos(1, 0)); + cm.replaceSelection("abc"); + eq(cm.getSelection(), "abc"); + eq(cm.getValue(), "111111\nabc222222\n333333"); + cm.replaceSelection("def", "end"); + eq(cm.getSelection(), ""); + eqPos(cm.getCursor(true), Pos(1, 3)); + cm.setCursor(Pos(2, 1)); + eqPos(cm.getCursor(true), Pos(2, 1)); + cm.setCursor(1, 2); + eqPos(cm.getCursor(true), Pos(1, 2)); +}, {value: "111111\n222222\n333333"}); + +testCM("extendSelection", function(cm) { + cm.setExtending(true); + addDoc(cm, 10, 10); + cm.setSelection(Pos(3, 5)); + eqPos(cm.getCursor("head"), Pos(3, 5)); + eqPos(cm.getCursor("anchor"), Pos(3, 5)); + cm.setSelection(Pos(2, 5), Pos(5, 5)); + eqPos(cm.getCursor("head"), Pos(5, 5)); + eqPos(cm.getCursor("anchor"), Pos(2, 5)); + eqPos(cm.getCursor("start"), Pos(2, 5)); + eqPos(cm.getCursor("end"), Pos(5, 5)); + cm.setSelection(Pos(5, 5), Pos(2, 5)); + eqPos(cm.getCursor("head"), Pos(2, 5)); + eqPos(cm.getCursor("anchor"), Pos(5, 5)); + eqPos(cm.getCursor("start"), Pos(2, 5)); + eqPos(cm.getCursor("end"), Pos(5, 5)); + cm.extendSelection(Pos(3, 2)); + eqPos(cm.getCursor("head"), Pos(3, 2)); + eqPos(cm.getCursor("anchor"), Pos(5, 5)); + cm.extendSelection(Pos(6, 2)); + eqPos(cm.getCursor("head"), Pos(6, 2)); + eqPos(cm.getCursor("anchor"), Pos(5, 5)); + cm.extendSelection(Pos(6, 3), Pos(6, 4)); + eqPos(cm.getCursor("head"), Pos(6, 4)); + eqPos(cm.getCursor("anchor"), Pos(5, 5)); + cm.extendSelection(Pos(0, 3), Pos(0, 4)); + eqPos(cm.getCursor("head"), Pos(0, 3)); + eqPos(cm.getCursor("anchor"), Pos(5, 5)); + cm.extendSelection(Pos(4, 5), Pos(6, 5)); + eqPos(cm.getCursor("head"), Pos(6, 5)); + eqPos(cm.getCursor("anchor"), Pos(4, 5)); + cm.setExtending(false); + cm.extendSelection(Pos(0, 3), Pos(0, 4)); + eqPos(cm.getCursor("head"), Pos(0, 4)); + eqPos(cm.getCursor("anchor"), Pos(0, 3)); +}); + +testCM("lines", function(cm) { + eq(cm.getLine(0), "111111"); + eq(cm.getLine(1), "222222"); + eq(cm.getLine(-1), null); + cm.removeLine(1); + cm.setLine(1, "abc"); + eq(cm.getValue(), "111111\nabc"); +}, {value: "111111\n222222\n333333"}); + +testCM("indent", function(cm) { + cm.indentLine(1); + eq(cm.getLine(1), " blah();"); + cm.setOption("indentUnit", 8); + cm.indentLine(1); + eq(cm.getLine(1), "\tblah();"); + cm.setOption("indentUnit", 10); + cm.setOption("tabSize", 4); + cm.indentLine(1); + eq(cm.getLine(1), "\t\t blah();"); +}, {value: "if (x) {\nblah();\n}", indentUnit: 3, indentWithTabs: true, tabSize: 8}); + +testCM("indentByNumber", function(cm) { + cm.indentLine(0, 2); + eq(cm.getLine(0), " foo"); + cm.indentLine(0, -200); + eq(cm.getLine(0), "foo"); + cm.setSelection(Pos(0, 0), Pos(1, 2)); + cm.indentSelection(3); + eq(cm.getValue(), " foo\n bar\nbaz"); +}, {value: "foo\nbar\nbaz"}); + +test("core_defaults", function() { + var defsCopy = {}, defs = CodeMirror.defaults; + for (var opt in defs) defsCopy[opt] = defs[opt]; + defs.indentUnit = 5; + defs.value = "uu"; + defs.enterMode = "keep"; + defs.tabindex = 55; + var place = document.getElementById("testground"), cm = CodeMirror(place); + try { + eq(cm.getOption("indentUnit"), 5); + cm.setOption("indentUnit", 10); + eq(defs.indentUnit, 5); + eq(cm.getValue(), "uu"); + eq(cm.getOption("enterMode"), "keep"); + eq(cm.getInputField().tabIndex, 55); + } + finally { + for (var opt in defsCopy) defs[opt] = defsCopy[opt]; + place.removeChild(cm.getWrapperElement()); + } +}); + +testCM("lineInfo", function(cm) { + eq(cm.lineInfo(-1), null); + var mark = document.createElement("span"); + var lh = cm.setGutterMarker(1, "FOO", mark); + var info = cm.lineInfo(1); + eq(info.text, "222222"); + eq(info.gutterMarkers.FOO, mark); + eq(info.line, 1); + eq(cm.lineInfo(2).gutterMarkers, null); + cm.setGutterMarker(lh, "FOO", null); + eq(cm.lineInfo(1).gutterMarkers, null); + cm.setGutterMarker(1, "FOO", mark); + cm.setGutterMarker(0, "FOO", mark); + cm.clearGutter("FOO"); + eq(cm.lineInfo(0).gutterMarkers, null); + eq(cm.lineInfo(1).gutterMarkers, null); +}, {value: "111111\n222222\n333333"}); + +testCM("coords", function(cm) { + cm.setSize(null, 100); + addDoc(cm, 32, 200); + var top = cm.charCoords(Pos(0, 0)); + var bot = cm.charCoords(Pos(200, 30)); + is(top.left < bot.left); + is(top.top < bot.top); + is(top.top < top.bottom); + cm.scrollTo(null, 100); + var top2 = cm.charCoords(Pos(0, 0)); + is(top.top > top2.top); + eq(top.left, top2.left); +}); + +testCM("coordsChar", function(cm) { + addDoc(cm, 35, 70); + for (var i = 0; i < 2; ++i) { + var sys = i ? "local" : "page"; + for (var ch = 0; ch <= 35; ch += 5) { + for (var line = 0; line < 70; line += 5) { + cm.setCursor(line, ch); + var coords = cm.charCoords(Pos(line, ch), sys); + var pos = cm.coordsChar({left: coords.left + 1, top: coords.top + 1}, sys); + eqPos(pos, Pos(line, ch)); + } + } + } +}, {lineNumbers: true}); + +testCM("posFromIndex", function(cm) { + cm.setValue( + "This function should\n" + + "convert a zero based index\n" + + "to line and ch." + ); + + var examples = [ + { index: -1, line: 0, ch: 0 }, // <- Tests clipping + { index: 0, line: 0, ch: 0 }, + { index: 10, line: 0, ch: 10 }, + { index: 39, line: 1, ch: 18 }, + { index: 55, line: 2, ch: 7 }, + { index: 63, line: 2, ch: 15 }, + { index: 64, line: 2, ch: 15 } // <- Tests clipping + ]; + + for (var i = 0; i < examples.length; i++) { + var example = examples[i]; + var pos = cm.posFromIndex(example.index); + eq(pos.line, example.line); + eq(pos.ch, example.ch); + if (example.index >= 0 && example.index < 64) + eq(cm.indexFromPos(pos), example.index); + } +}); + +testCM("undo", function(cm) { + cm.setLine(0, "def"); + eq(cm.historySize().undo, 1); + cm.undo(); + eq(cm.getValue(), "abc"); + eq(cm.historySize().undo, 0); + eq(cm.historySize().redo, 1); + cm.redo(); + eq(cm.getValue(), "def"); + eq(cm.historySize().undo, 1); + eq(cm.historySize().redo, 0); + cm.setValue("1\n\n\n2"); + cm.clearHistory(); + eq(cm.historySize().undo, 0); + for (var i = 0; i < 20; ++i) { + cm.replaceRange("a", Pos(0, 0)); + cm.replaceRange("b", Pos(3, 0)); + } + eq(cm.historySize().undo, 40); + for (var i = 0; i < 40; ++i) + cm.undo(); + eq(cm.historySize().redo, 40); + eq(cm.getValue(), "1\n\n\n2"); +}, {value: "abc"}); + +testCM("undoDepth", function(cm) { + cm.replaceRange("d", Pos(0)); + cm.replaceRange("e", Pos(0)); + cm.replaceRange("f", Pos(0)); + cm.undo(); cm.undo(); cm.undo(); + eq(cm.getValue(), "abcd"); +}, {value: "abc", undoDepth: 2}); + +testCM("undoDoesntClearValue", function(cm) { + cm.undo(); + eq(cm.getValue(), "x"); +}, {value: "x"}); + +testCM("undoMultiLine", function(cm) { + cm.operation(function() { + cm.replaceRange("x", Pos(0, 0)); + cm.replaceRange("y", Pos(1, 0)); + }); + cm.undo(); + eq(cm.getValue(), "abc\ndef\nghi"); + cm.operation(function() { + cm.replaceRange("y", Pos(1, 0)); + cm.replaceRange("x", Pos(0, 0)); + }); + cm.undo(); + eq(cm.getValue(), "abc\ndef\nghi"); + cm.operation(function() { + cm.replaceRange("y", Pos(2, 0)); + cm.replaceRange("x", Pos(1, 0)); + cm.replaceRange("z", Pos(2, 0)); + }); + cm.undo(); + eq(cm.getValue(), "abc\ndef\nghi", 3); +}, {value: "abc\ndef\nghi"}); + +testCM("undoComposite", function(cm) { + cm.replaceRange("y", Pos(1)); + cm.operation(function() { + cm.replaceRange("x", Pos(0)); + cm.replaceRange("z", Pos(2)); + }); + eq(cm.getValue(), "ax\nby\ncz\n"); + cm.undo(); + eq(cm.getValue(), "a\nby\nc\n"); + cm.undo(); + eq(cm.getValue(), "a\nb\nc\n"); + cm.redo(); cm.redo(); + eq(cm.getValue(), "ax\nby\ncz\n"); +}, {value: "a\nb\nc\n"}); + +testCM("undoSelection", function(cm) { + cm.setSelection(Pos(0, 2), Pos(0, 4)); + cm.replaceSelection(""); + cm.setCursor(Pos(1, 0)); + cm.undo(); + eqPos(cm.getCursor(true), Pos(0, 2)); + eqPos(cm.getCursor(false), Pos(0, 4)); + cm.setCursor(Pos(1, 0)); + cm.redo(); + eqPos(cm.getCursor(true), Pos(0, 2)); + eqPos(cm.getCursor(false), Pos(0, 2)); +}, {value: "abcdefgh\n"}); + +testCM("markTextSingleLine", function(cm) { + forEach([{a: 0, b: 1, c: "", f: 2, t: 5}, + {a: 0, b: 4, c: "", f: 0, t: 2}, + {a: 1, b: 2, c: "x", f: 3, t: 6}, + {a: 4, b: 5, c: "", f: 3, t: 5}, + {a: 4, b: 5, c: "xx", f: 3, t: 7}, + {a: 2, b: 5, c: "", f: 2, t: 3}, + {a: 2, b: 5, c: "abcd", f: 6, t: 7}, + {a: 2, b: 6, c: "x", f: null, t: null}, + {a: 3, b: 6, c: "", f: null, t: null}, + {a: 0, b: 9, c: "hallo", f: null, t: null}, + {a: 4, b: 6, c: "x", f: 3, t: 4}, + {a: 4, b: 8, c: "", f: 3, t: 4}, + {a: 6, b: 6, c: "a", f: 3, t: 6}, + {a: 8, b: 9, c: "", f: 3, t: 6}], function(test) { + cm.setValue("1234567890"); + var r = cm.markText(Pos(0, 3), Pos(0, 6), {className: "foo"}); + cm.replaceRange(test.c, Pos(0, test.a), Pos(0, test.b)); + var f = r.find(); + eq(f && f.from.ch, test.f); eq(f && f.to.ch, test.t); + }); +}); + +testCM("markTextMultiLine", function(cm) { + function p(v) { return v && Pos(v[0], v[1]); } + forEach([{a: [0, 0], b: [0, 5], c: "", f: [0, 0], t: [2, 5]}, + {a: [0, 0], b: [0, 5], c: "foo\n", f: [1, 0], t: [3, 5]}, + {a: [0, 1], b: [0, 10], c: "", f: [0, 1], t: [2, 5]}, + {a: [0, 5], b: [0, 6], c: "x", f: [0, 6], t: [2, 5]}, + {a: [0, 0], b: [1, 0], c: "", f: [0, 0], t: [1, 5]}, + {a: [0, 6], b: [2, 4], c: "", f: [0, 5], t: [0, 7]}, + {a: [0, 6], b: [2, 4], c: "aa", f: [0, 5], t: [0, 9]}, + {a: [1, 2], b: [1, 8], c: "", f: [0, 5], t: [2, 5]}, + {a: [0, 5], b: [2, 5], c: "xx", f: null, t: null}, + {a: [0, 0], b: [2, 10], c: "x", f: null, t: null}, + {a: [1, 5], b: [2, 5], c: "", f: [0, 5], t: [1, 5]}, + {a: [2, 0], b: [2, 3], c: "", f: [0, 5], t: [2, 2]}, + {a: [2, 5], b: [3, 0], c: "a\nb", f: [0, 5], t: [2, 5]}, + {a: [2, 3], b: [3, 0], c: "x", f: [0, 5], t: [2, 3]}, + {a: [1, 1], b: [1, 9], c: "1\n2\n3", f: [0, 5], t: [4, 5]}], function(test) { + cm.setValue("aaaaaaaaaa\nbbbbbbbbbb\ncccccccccc\ndddddddd\n"); + var r = cm.markText(Pos(0, 5), Pos(2, 5), + {className: "CodeMirror-matchingbracket"}); + cm.replaceRange(test.c, p(test.a), p(test.b)); + var f = r.find(); + eqPos(f && f.from, p(test.f)); eqPos(f && f.to, p(test.t)); + }); +}); + +testCM("markTextUndo", function(cm) { + var marker1, marker2, bookmark; + marker1 = cm.markText(Pos(0, 1), Pos(0, 3), + {className: "CodeMirror-matchingbracket"}); + marker2 = cm.markText(Pos(0, 0), Pos(2, 1), + {className: "CodeMirror-matchingbracket"}); + bookmark = cm.setBookmark(Pos(1, 5)); + cm.operation(function(){ + cm.replaceRange("foo", Pos(0, 2)); + cm.replaceRange("bar\nbaz\nbug\n", Pos(2, 0), Pos(3, 0)); + }); + var v1 = cm.getValue(); + cm.setValue(""); + eq(marker1.find(), null); eq(marker2.find(), null); eq(bookmark.find(), null); + cm.undo(); + eqPos(bookmark.find(), Pos(1, 5), "still there"); + cm.undo(); + var m1Pos = marker1.find(), m2Pos = marker2.find(); + eqPos(m1Pos.from, Pos(0, 1)); eqPos(m1Pos.to, Pos(0, 3)); + eqPos(m2Pos.from, Pos(0, 0)); eqPos(m2Pos.to, Pos(2, 1)); + eqPos(bookmark.find(), Pos(1, 5)); + cm.redo(); cm.redo(); + eq(bookmark.find(), null); + cm.undo(); + eqPos(bookmark.find(), Pos(1, 5)); + eq(cm.getValue(), v1); +}, {value: "1234\n56789\n00\n"}); + +testCM("markTextStayGone", function(cm) { + var m1 = cm.markText(Pos(0, 0), Pos(0, 1)); + cm.replaceRange("hi", Pos(0, 2)); + m1.clear(); + cm.undo(); + eq(m1.find(), null); +}, {value: "hello"}); + +testCM("undoPreservesNewMarks", function(cm) { + cm.markText(Pos(0, 3), Pos(0, 4)); + cm.markText(Pos(1, 1), Pos(1, 3)); + cm.replaceRange("", Pos(0, 3), Pos(3, 1)); + var mBefore = cm.markText(Pos(0, 0), Pos(0, 1)); + var mAfter = cm.markText(Pos(0, 5), Pos(0, 6)); + var mAround = cm.markText(Pos(0, 2), Pos(0, 4)); + cm.undo(); + eqPos(mBefore.find().from, Pos(0, 0)); + eqPos(mBefore.find().to, Pos(0, 1)); + eqPos(mAfter.find().from, Pos(3, 3)); + eqPos(mAfter.find().to, Pos(3, 4)); + eqPos(mAround.find().from, Pos(0, 2)); + eqPos(mAround.find().to, Pos(3, 2)); + var found = cm.findMarksAt(Pos(2, 2)); + eq(found.length, 1); + eq(found[0], mAround); +}, {value: "aaaa\nbbbb\ncccc\ndddd"}); + +testCM("markClearBetween", function(cm) { + cm.setValue("aaa\nbbb\nccc\nddd\n"); + cm.markText(Pos(0, 0), Pos(2)); + cm.replaceRange("aaa\nbbb\nccc", Pos(0, 0), Pos(2)); + eq(cm.findMarksAt(Pos(1, 1)).length, 0); +}); + +testCM("deleteSpanCollapsedInclusiveLeft", function(cm) { + var from = Pos(1, 0), to = Pos(1, 1); + var m = cm.markText(from, to, {collapsed: true, inclusiveLeft: true}); + // Delete collapsed span. + cm.replaceRange("", from, to); +}, {value: "abc\nX\ndef"}); + +testCM("bookmark", function(cm) { + function p(v) { return v && Pos(v[0], v[1]); } + forEach([{a: [1, 0], b: [1, 1], c: "", d: [1, 4]}, + {a: [1, 1], b: [1, 1], c: "xx", d: [1, 7]}, + {a: [1, 4], b: [1, 5], c: "ab", d: [1, 6]}, + {a: [1, 4], b: [1, 6], c: "", d: null}, + {a: [1, 5], b: [1, 6], c: "abc", d: [1, 5]}, + {a: [1, 6], b: [1, 8], c: "", d: [1, 5]}, + {a: [1, 4], b: [1, 4], c: "\n\n", d: [3, 1]}, + {bm: [1, 9], a: [1, 1], b: [1, 1], c: "\n", d: [2, 8]}], function(test) { + cm.setValue("1234567890\n1234567890\n1234567890"); + var b = cm.setBookmark(p(test.bm) || Pos(1, 5)); + cm.replaceRange(test.c, p(test.a), p(test.b)); + eqPos(b.find(), p(test.d)); + }); +}); + +testCM("bookmarkInsertLeft", function(cm) { + var br = cm.setBookmark(Pos(0, 2), {insertLeft: false}); + var bl = cm.setBookmark(Pos(0, 2), {insertLeft: true}); + cm.setCursor(Pos(0, 2)); + cm.replaceSelection("hi"); + eqPos(br.find(), Pos(0, 2)); + eqPos(bl.find(), Pos(0, 4)); + cm.replaceRange("", Pos(0, 4), Pos(0, 5)); + cm.replaceRange("", Pos(0, 2), Pos(0, 4)); + cm.replaceRange("", Pos(0, 1), Pos(0, 2)); + // Verify that deleting next to bookmarks doesn't kill them + eqPos(br.find(), Pos(0, 1)); + eqPos(bl.find(), Pos(0, 1)); +}, {value: "abcdef"}); + +testCM("bookmarkCursor", function(cm) { + var pos01 = cm.cursorCoords(Pos(0, 1)), pos11 = cm.cursorCoords(Pos(1, 1)), + pos20 = cm.cursorCoords(Pos(2, 0)), pos30 = cm.cursorCoords(Pos(3, 0)), + pos41 = cm.cursorCoords(Pos(4, 1)); + cm.setBookmark(Pos(0, 1), {widget: document.createTextNode("←"), insertLeft: true}); + cm.setBookmark(Pos(2, 0), {widget: document.createTextNode("←"), insertLeft: true}); + cm.setBookmark(Pos(1, 1), {widget: document.createTextNode("→")}); + cm.setBookmark(Pos(3, 0), {widget: document.createTextNode("→")}); + var new01 = cm.cursorCoords(Pos(0, 1)), new11 = cm.cursorCoords(Pos(1, 1)), + new20 = cm.cursorCoords(Pos(2, 0)), new30 = cm.cursorCoords(Pos(3, 0)); + is(new01.left == pos01.left && new01.top == pos01.top, "at left, middle of line"); + is(new11.left > pos11.left && new11.top == pos11.top, "at right, middle of line"); + is(new20.left == pos20.left && new20.top == pos20.top, "at left, empty line"); + is(new30.left > pos30.left && new30.top == pos30.top, "at right, empty line"); + cm.setBookmark(Pos(4, 0), {widget: document.createTextNode("→")}); + is(cm.cursorCoords(Pos(4, 1)).left > pos41.left, "single-char bug"); +}, {value: "foo\nbar\n\n\nx\ny"}); + +testCM("multiBookmarkCursor", function(cm) { + if (phantom) return; + var ms = [], m; + function add(insertLeft) { + for (var i = 0; i < 3; ++i) { + var node = document.createElement("span"); + node.innerHTML = "X"; + ms.push(cm.setBookmark(Pos(0, 1), {widget: node, insertLeft: insertLeft})); + } + } + var base1 = cm.cursorCoords(Pos(0, 1)).left, base4 = cm.cursorCoords(Pos(0, 4)).left; + add(true); + is(Math.abs(base1 - cm.cursorCoords(Pos(0, 1)).left) < .1); + while (m = ms.pop()) m.clear(); + add(false); + is(Math.abs(base4 - cm.cursorCoords(Pos(0, 1)).left) < .1); +}, {value: "abcdefg"}); + +testCM("getAllMarks", function(cm) { + addDoc(cm, 10, 10); + var m1 = cm.setBookmark(Pos(0, 2)); + var m2 = cm.markText(Pos(0, 2), Pos(3, 2)); + var m3 = cm.markText(Pos(1, 2), Pos(1, 8)); + var m4 = cm.markText(Pos(8, 0), Pos(9, 0)); + eq(cm.getAllMarks().length, 4); + m1.clear(); + m3.clear(); + eq(cm.getAllMarks().length, 2); +}); + +testCM("bug577", function(cm) { + cm.setValue("a\nb"); + cm.clearHistory(); + cm.setValue("fooooo"); + cm.undo(); +}); + +testCM("scrollSnap", function(cm) { + cm.setSize(100, 100); + addDoc(cm, 200, 200); + cm.setCursor(Pos(100, 180)); + var info = cm.getScrollInfo(); + is(info.left > 0 && info.top > 0); + cm.setCursor(Pos(0, 0)); + info = cm.getScrollInfo(); + is(info.left == 0 && info.top == 0, "scrolled clean to top"); + cm.setCursor(Pos(100, 180)); + cm.setCursor(Pos(199, 0)); + info = cm.getScrollInfo(); + is(info.left == 0 && info.top + 2 > info.height - cm.getScrollerElement().clientHeight, "scrolled clean to bottom"); +}); + +testCM("scrollIntoView", function(cm) { + if (phantom) return; + var outer = cm.getWrapperElement().getBoundingClientRect(); + function test(line, ch) { + var pos = Pos(line, ch); + cm.scrollIntoView(pos); + var box = cm.charCoords(pos, "window"); + is(box.left >= outer.left && box.right <= outer.right && + box.top >= outer.top && box.bottom <= outer.bottom); + } + addDoc(cm, 200, 200); + test(199, 199); + test(0, 0); + test(100, 100); + test(199, 0); + test(0, 199); + test(100, 100); +}); + +testCM("selectionPos", function(cm) { + if (phantom) return; + cm.setSize(100, 100); + addDoc(cm, 200, 100); + cm.setSelection(Pos(1, 100), Pos(98, 100)); + var lineWidth = cm.charCoords(Pos(0, 200), "local").left; + var lineHeight = (cm.charCoords(Pos(99)).top - cm.charCoords(Pos(0)).top) / 100; + cm.scrollTo(0, 0); + var selElt = byClassName(cm.getWrapperElement(), "CodeMirror-selected"); + var outer = cm.getWrapperElement().getBoundingClientRect(); + var sawMiddle, sawTop, sawBottom; + for (var i = 0, e = selElt.length; i < e; ++i) { + var box = selElt[i].getBoundingClientRect(); + var atLeft = box.left - outer.left < 30; + var width = box.right - box.left; + var atRight = box.right - outer.left > .8 * lineWidth; + if (atLeft && atRight) { + sawMiddle = true; + is(box.bottom - box.top > 90 * lineHeight, "middle high"); + is(width > .9 * lineWidth, "middle wide"); + } else { + is(width > .4 * lineWidth, "top/bot wide enough"); + is(width < .6 * lineWidth, "top/bot slim enough"); + if (atLeft) { + sawBottom = true; + is(box.top - outer.top > 96 * lineHeight, "bot below"); + } else if (atRight) { + sawTop = true; + is(box.top - outer.top < 2.1 * lineHeight, "top above"); + } + } + } + is(sawTop && sawBottom && sawMiddle, "all parts"); +}, null); + +testCM("restoreHistory", function(cm) { + cm.setValue("abc\ndef"); + cm.setLine(1, "hello"); + cm.setLine(0, "goop"); + cm.undo(); + var storedVal = cm.getValue(), storedHist = cm.getHistory(); + if (window.JSON) storedHist = JSON.parse(JSON.stringify(storedHist)); + eq(storedVal, "abc\nhello"); + cm.setValue(""); + cm.clearHistory(); + eq(cm.historySize().undo, 0); + cm.setValue(storedVal); + cm.setHistory(storedHist); + cm.redo(); + eq(cm.getValue(), "goop\nhello"); + cm.undo(); cm.undo(); + eq(cm.getValue(), "abc\ndef"); +}); + +testCM("doubleScrollbar", function(cm) { + var dummy = document.body.appendChild(document.createElement("p")); + dummy.style.cssText = "height: 50px; overflow: scroll; width: 50px"; + var scrollbarWidth = dummy.offsetWidth + 1 - dummy.clientWidth; + document.body.removeChild(dummy); + if (scrollbarWidth < 2) return; + cm.setSize(null, 100); + addDoc(cm, 1, 300); + var wrap = cm.getWrapperElement(); + is(wrap.offsetWidth - byClassName(wrap, "CodeMirror-lines")[0].offsetWidth <= scrollbarWidth * 1.5); +}); + +testCM("weirdLinebreaks", function(cm) { + cm.setValue("foo\nbar\rbaz\r\nquux\n\rplop"); + is(cm.getValue(), "foo\nbar\nbaz\nquux\n\nplop"); + is(cm.lineCount(), 6); + cm.setValue("\n\n"); + is(cm.lineCount(), 3); +}); + +testCM("setSize", function(cm) { + cm.setSize(100, 100); + var wrap = cm.getWrapperElement(); + is(wrap.offsetWidth, 100); + is(wrap.offsetHeight, 100); + cm.setSize("100%", "3em"); + is(wrap.style.width, "100%"); + is(wrap.style.height, "3em"); + cm.setSize(null, 40); + is(wrap.style.width, "100%"); + is(wrap.style.height, "40px"); +}); + +function foldLines(cm, start, end, autoClear) { + return cm.markText(Pos(start, 0), Pos(end - 1), { + inclusiveLeft: true, + inclusiveRight: true, + collapsed: true, + clearOnEnter: autoClear + }); +} + +testCM("collapsedLines", function(cm) { + addDoc(cm, 4, 10); + var range = foldLines(cm, 4, 5), cleared = 0; + CodeMirror.on(range, "clear", function() {cleared++;}); + cm.setCursor(Pos(3, 0)); + CodeMirror.commands.goLineDown(cm); + eqPos(cm.getCursor(), Pos(5, 0)); + cm.setLine(3, "abcdefg"); + cm.setCursor(Pos(3, 6)); + CodeMirror.commands.goLineDown(cm); + eqPos(cm.getCursor(), Pos(5, 4)); + cm.setLine(3, "ab"); + cm.setCursor(Pos(3, 2)); + CodeMirror.commands.goLineDown(cm); + eqPos(cm.getCursor(), Pos(5, 2)); + cm.operation(function() {range.clear(); range.clear();}); + eq(cleared, 1); +}); + +testCM("collapsedRangeCoordsChar", function(cm) { + var pos_1_3 = cm.charCoords(Pos(1, 3)); + pos_1_3.left += 2; pos_1_3.top += 2; + var opts = {collapsed: true, inclusiveLeft: true, inclusiveRight: true}; + var m1 = cm.markText(Pos(0, 0), Pos(2, 0), opts); + eqPos(cm.coordsChar(pos_1_3), Pos(3, 3)); + m1.clear(); + var m1 = cm.markText(Pos(0, 0), Pos(1, 1), opts); + var m2 = cm.markText(Pos(1, 1), Pos(2, 0), opts); + eqPos(cm.coordsChar(pos_1_3), Pos(3, 3)); + m1.clear(); m2.clear(); + var m1 = cm.markText(Pos(0, 0), Pos(1, 6), opts); + eqPos(cm.coordsChar(pos_1_3), Pos(3, 3)); +}, {value: "123456\nabcdef\nghijkl\nmnopqr\n"}); + +testCM("hiddenLinesAutoUnfold", function(cm) { + var range = foldLines(cm, 1, 3, true), cleared = 0; + CodeMirror.on(range, "clear", function() {cleared++;}); + cm.setCursor(Pos(3, 0)); + eq(cleared, 0); + cm.execCommand("goCharLeft"); + eq(cleared, 1); + range = foldLines(cm, 1, 3, true); + CodeMirror.on(range, "clear", function() {cleared++;}); + eqPos(cm.getCursor(), Pos(3, 0)); + cm.setCursor(Pos(0, 3)); + cm.execCommand("goCharRight"); + eq(cleared, 2); +}, {value: "abc\ndef\nghi\njkl"}); + +testCM("hiddenLinesSelectAll", function(cm) { // Issue #484 + addDoc(cm, 4, 20); + foldLines(cm, 0, 10); + foldLines(cm, 11, 20); + CodeMirror.commands.selectAll(cm); + eqPos(cm.getCursor(true), Pos(10, 0)); + eqPos(cm.getCursor(false), Pos(10, 4)); +}); + + +testCM("everythingFolded", function(cm) { + addDoc(cm, 2, 2); + function enterPress() { + cm.triggerOnKeyDown({type: "keydown", keyCode: 13, preventDefault: function(){}, stopPropagation: function(){}}); + } + var fold = foldLines(cm, 0, 2); + enterPress(); + eq(cm.getValue(), "xx\nxx"); + fold.clear(); + fold = foldLines(cm, 0, 2, true); + eq(fold.find(), null); + enterPress(); + eq(cm.getValue(), "\nxx\nxx"); +}); + +testCM("structuredFold", function(cm) { + if (phantom) return; + addDoc(cm, 4, 8); + var range = cm.markText(Pos(1, 2), Pos(6, 2), { + replacedWith: document.createTextNode("Q") + }); + cm.setCursor(0, 3); + CodeMirror.commands.goLineDown(cm); + eqPos(cm.getCursor(), Pos(6, 2)); + CodeMirror.commands.goCharLeft(cm); + eqPos(cm.getCursor(), Pos(1, 2)); + CodeMirror.commands.delCharAfter(cm); + eq(cm.getValue(), "xxxx\nxxxx\nxxxx"); + addDoc(cm, 4, 8); + range = cm.markText(Pos(1, 2), Pos(6, 2), { + replacedWith: document.createTextNode("M"), + clearOnEnter: true + }); + var cleared = 0; + CodeMirror.on(range, "clear", function(){++cleared;}); + cm.setCursor(0, 3); + CodeMirror.commands.goLineDown(cm); + eqPos(cm.getCursor(), Pos(6, 2)); + CodeMirror.commands.goCharLeft(cm); + eqPos(cm.getCursor(), Pos(6, 1)); + eq(cleared, 1); + range.clear(); + eq(cleared, 1); + range = cm.markText(Pos(1, 2), Pos(6, 2), { + replacedWith: document.createTextNode("Q"), + clearOnEnter: true + }); + range.clear(); + cm.setCursor(1, 2); + CodeMirror.commands.goCharRight(cm); + eqPos(cm.getCursor(), Pos(1, 3)); + range = cm.markText(Pos(2, 0), Pos(4, 4), { + replacedWith: document.createTextNode("M") + }); + cm.setCursor(1, 0); + CodeMirror.commands.goLineDown(cm); + eqPos(cm.getCursor(), Pos(2, 0)); +}, null); + +testCM("nestedFold", function(cm) { + addDoc(cm, 10, 3); + function fold(ll, cl, lr, cr) { + return cm.markText(Pos(ll, cl), Pos(lr, cr), {collapsed: true}); + } + var inner1 = fold(0, 6, 1, 3), inner2 = fold(0, 2, 1, 8), outer = fold(0, 1, 2, 3), inner0 = fold(0, 5, 0, 6); + cm.setCursor(0, 1); + CodeMirror.commands.goCharRight(cm); + eqPos(cm.getCursor(), Pos(2, 3)); + inner0.clear(); + CodeMirror.commands.goCharLeft(cm); + eqPos(cm.getCursor(), Pos(0, 1)); + outer.clear(); + CodeMirror.commands.goCharRight(cm); + eqPos(cm.getCursor(), Pos(0, 2)); + CodeMirror.commands.goCharRight(cm); + eqPos(cm.getCursor(), Pos(1, 8)); + inner2.clear(); + CodeMirror.commands.goCharLeft(cm); + eqPos(cm.getCursor(), Pos(1, 7)); + cm.setCursor(0, 5); + CodeMirror.commands.goCharRight(cm); + eqPos(cm.getCursor(), Pos(0, 6)); + CodeMirror.commands.goCharRight(cm); + eqPos(cm.getCursor(), Pos(1, 3)); +}); + +testCM("badNestedFold", function(cm) { + addDoc(cm, 4, 4); + cm.markText(Pos(0, 2), Pos(3, 2), {collapsed: true}); + var caught; + try {cm.markText(Pos(0, 1), Pos(0, 3), {collapsed: true});} + catch(e) {caught = e;} + is(caught instanceof Error, "no error"); + is(/overlap/i.test(caught.message), "wrong error"); +}); + +testCM("wrappingInlineWidget", function(cm) { + cm.setSize("11em"); + var w = document.createElement("span"); + w.style.color = "red"; + w.innerHTML = "one two three four"; + cm.markText(Pos(0, 6), Pos(0, 9), {replacedWith: w}); + var cur0 = cm.cursorCoords(Pos(0, 0)), cur1 = cm.cursorCoords(Pos(0, 10)); + is(cur0.top < cur1.top); + is(cur0.bottom < cur1.bottom); + var curL = cm.cursorCoords(Pos(0, 6)), curR = cm.cursorCoords(Pos(0, 9)); + eq(curL.top, cur0.top); + eq(curL.bottom, cur0.bottom); + eq(curR.top, cur1.top); + eq(curR.bottom, cur1.bottom); + cm.replaceRange("", Pos(0, 9), Pos(0)); + curR = cm.cursorCoords(Pos(0, 9)); + eq(curR.top, cur1.top); + eq(curR.bottom, cur1.bottom); +}, {value: "1 2 3 xxx 4", lineWrapping: true}); + +testCM("changedInlineWidget", function(cm) { + cm.setSize("10em"); + var w = document.createElement("span"); + w.innerHTML = "x"; + var m = cm.markText(Pos(0, 4), Pos(0, 5), {replacedWith: w}); + w.innerHTML = "and now the widget is really really long all of a sudden and a scrollbar is needed"; + m.changed(); + var hScroll = byClassName(cm.getWrapperElement(), "CodeMirror-hscrollbar")[0]; + is(hScroll.scrollWidth > hScroll.clientWidth); +}, {value: "hello there"}); + +testCM("changedBookmark", function(cm) { + cm.setSize("10em"); + var w = document.createElement("span"); + w.innerHTML = "x"; + var m = cm.setBookmark(Pos(0, 4), {widget: w}); + w.innerHTML = "and now the widget is really really long all of a sudden and a scrollbar is needed"; + m.changed(); + var hScroll = byClassName(cm.getWrapperElement(), "CodeMirror-hscrollbar")[0]; + is(hScroll.scrollWidth > hScroll.clientWidth); +}, {value: "abcdefg"}); + +testCM("inlineWidget", function(cm) { + var w = cm.setBookmark(Pos(0, 2), {widget: document.createTextNode("uu")}); + cm.setCursor(0, 2); + CodeMirror.commands.goLineDown(cm); + eqPos(cm.getCursor(), Pos(1, 4)); + cm.setCursor(0, 2); + cm.replaceSelection("hi"); + eqPos(w.find(), Pos(0, 2)); + cm.setCursor(0, 1); + cm.replaceSelection("ay"); + eqPos(w.find(), Pos(0, 4)); + eq(cm.getLine(0), "uayuhiuu"); +}, {value: "uuuu\nuuuuuu"}); + +testCM("wrappingAndResizing", function(cm) { + cm.setSize(null, "auto"); + cm.setOption("lineWrapping", true); + var wrap = cm.getWrapperElement(), h0 = wrap.offsetHeight; + var doc = "xxx xxx xxx xxx xxx"; + cm.setValue(doc); + for (var step = 10, w = cm.charCoords(Pos(0, 18), "div").right;; w += step) { + cm.setSize(w); + if (wrap.offsetHeight <= h0 * (opera_lt10 ? 1.2 : 1.5)) { + if (step == 10) { w -= 10; step = 1; } + else break; + } + } + // Ensure that putting the cursor at the end of the maximally long + // line doesn't cause wrapping to happen. + cm.setCursor(Pos(0, doc.length)); + eq(wrap.offsetHeight, h0); + cm.replaceSelection("x"); + is(wrap.offsetHeight > h0, "wrapping happens"); + // Now add a max-height and, in a document consisting of + // almost-wrapped lines, go over it so that a scrollbar appears. + cm.setValue(doc + "\n" + doc + "\n"); + cm.getScrollerElement().style.maxHeight = "100px"; + cm.replaceRange("\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n!\n", Pos(2, 0)); + forEach([Pos(0, doc.length), Pos(0, doc.length - 1), + Pos(0, 0), Pos(1, doc.length), Pos(1, doc.length - 1)], + function(pos) { + var coords = cm.charCoords(pos); + eqPos(pos, cm.coordsChar({left: coords.left + 2, top: coords.top + 5})); + }); +}, null, ie_lt8); + +testCM("measureEndOfLine", function(cm) { + cm.setSize(null, "auto"); + var inner = byClassName(cm.getWrapperElement(), "CodeMirror-lines")[0].firstChild; + var lh = inner.offsetHeight; + for (var step = 10, w = cm.charCoords(Pos(0, 7), "div").right;; w += step) { + cm.setSize(w); + if (inner.offsetHeight < 2.5 * lh) { + if (step == 10) { w -= 10; step = 1; } + else break; + } + } + cm.setValue(cm.getValue() + "\n\n"); + var endPos = cm.charCoords(Pos(0, 18), "local"); + is(endPos.top > lh * .8, "not at top"); + is(endPos.left > w - 20, "not at right"); + endPos = cm.charCoords(Pos(0, 18)); + eqPos(cm.coordsChar({left: endPos.left, top: endPos.top + 5}), Pos(0, 18)); +}, {mode: "text/html", value: "", lineWrapping: true}, ie_lt8 || opera_lt10); + +testCM("scrollVerticallyAndHorizontally", function(cm) { + cm.setSize(100, 100); + addDoc(cm, 40, 40); + cm.setCursor(39); + var wrap = cm.getWrapperElement(), bar = byClassName(wrap, "CodeMirror-vscrollbar")[0]; + is(bar.offsetHeight < wrap.offsetHeight, "vertical scrollbar limited by horizontal one"); + var cursorBox = byClassName(wrap, "CodeMirror-cursor")[0].getBoundingClientRect(); + var editorBox = wrap.getBoundingClientRect(); + is(cursorBox.bottom < editorBox.top + cm.getScrollerElement().clientHeight, + "bottom line visible"); +}, {lineNumbers: true}); + +testCM("moveVstuck", function(cm) { + var lines = byClassName(cm.getWrapperElement(), "CodeMirror-lines")[0].firstChild, h0 = lines.offsetHeight; + var val = "fooooooooooooooooooooooooo baaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaar\n"; + cm.setValue(val); + for (var w = cm.charCoords(Pos(0, 26), "div").right * 2.8;; w += 5) { + cm.setSize(w); + if (lines.offsetHeight <= 3.5 * h0) break; + } + cm.setCursor(Pos(0, val.length - 1)); + cm.moveV(-1, "line"); + eqPos(cm.getCursor(), Pos(0, 26)); +}, {lineWrapping: true}, ie_lt8 || opera_lt10); + +testCM("clickTab", function(cm) { + var p0 = cm.charCoords(Pos(0, 0)); + eqPos(cm.coordsChar({left: p0.left + 5, top: p0.top + 5}), Pos(0, 0)); + eqPos(cm.coordsChar({left: p0.right - 5, top: p0.top + 5}), Pos(0, 1)); +}, {value: "\t\n\n", lineWrapping: true, tabSize: 8}); + +testCM("verticalScroll", function(cm) { + cm.setSize(100, 200); + cm.setValue("foo\nbar\nbaz\n"); + var sc = cm.getScrollerElement(), baseWidth = sc.scrollWidth; + cm.setLine(0, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaah"); + is(sc.scrollWidth > baseWidth, "scrollbar present"); + cm.setLine(0, "foo"); + if (!phantom) eq(sc.scrollWidth, baseWidth, "scrollbar gone"); + cm.setLine(0, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaah"); + cm.setLine(1, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbh"); + is(sc.scrollWidth > baseWidth, "present again"); + var curWidth = sc.scrollWidth; + cm.setLine(0, "foo"); + is(sc.scrollWidth < curWidth, "scrollbar smaller"); + is(sc.scrollWidth > baseWidth, "but still present"); +}); + +testCM("extraKeys", function(cm) { + var outcome; + function fakeKey(expected, code, props) { + if (typeof code == "string") code = code.charCodeAt(0); + var e = {type: "keydown", keyCode: code, preventDefault: function(){}, stopPropagation: function(){}}; + if (props) for (var n in props) e[n] = props[n]; + outcome = null; + cm.triggerOnKeyDown(e); + eq(outcome, expected); + } + CodeMirror.commands.testCommand = function() {outcome = "tc";}; + CodeMirror.commands.goTestCommand = function() {outcome = "gtc";}; + cm.setOption("extraKeys", {"Shift-X": function() {outcome = "sx";}, + "X": function() {outcome = "x";}, + "Ctrl-Alt-U": function() {outcome = "cau";}, + "End": "testCommand", + "Home": "goTestCommand", + "Tab": false}); + fakeKey(null, "U"); + fakeKey("cau", "U", {ctrlKey: true, altKey: true}); + fakeKey(null, "U", {shiftKey: true, ctrlKey: true, altKey: true}); + fakeKey("x", "X"); + fakeKey("sx", "X", {shiftKey: true}); + fakeKey("tc", 35); + fakeKey(null, 35, {shiftKey: true}); + fakeKey("gtc", 36); + fakeKey("gtc", 36, {shiftKey: true}); + fakeKey(null, 9); +}, null, window.opera && mac); + +testCM("wordMovementCommands", function(cm) { + cm.execCommand("goWordLeft"); + eqPos(cm.getCursor(), Pos(0, 0)); + cm.execCommand("goWordRight"); cm.execCommand("goWordRight"); + eqPos(cm.getCursor(), Pos(0, 7)); + cm.execCommand("goWordLeft"); + eqPos(cm.getCursor(), Pos(0, 5)); + cm.execCommand("goWordRight"); cm.execCommand("goWordRight"); + eqPos(cm.getCursor(), Pos(0, 12)); + cm.execCommand("goWordLeft"); + eqPos(cm.getCursor(), Pos(0, 9)); + cm.execCommand("goWordRight"); cm.execCommand("goWordRight"); cm.execCommand("goWordRight"); + eqPos(cm.getCursor(), Pos(0, 24)); + cm.execCommand("goWordRight"); cm.execCommand("goWordRight"); + eqPos(cm.getCursor(), Pos(1, 9)); + cm.execCommand("goWordRight"); + eqPos(cm.getCursor(), Pos(1, 13)); + cm.execCommand("goWordRight"); cm.execCommand("goWordRight"); + eqPos(cm.getCursor(), Pos(2, 0)); +}, {value: "this is (the) firstline.\na foo12\u00e9\u00f8\u00d7bar\n"}); + +testCM("groupMovementCommands", function(cm) { + cm.execCommand("goGroupLeft"); + eqPos(cm.getCursor(), Pos(0, 0)); + cm.execCommand("goGroupRight"); + eqPos(cm.getCursor(), Pos(0, 4)); + cm.execCommand("goGroupRight"); + eqPos(cm.getCursor(), Pos(0, 7)); + cm.execCommand("goGroupRight"); + eqPos(cm.getCursor(), Pos(0, 10)); + cm.execCommand("goGroupLeft"); + eqPos(cm.getCursor(), Pos(0, 7)); + cm.execCommand("goGroupRight"); cm.execCommand("goGroupRight"); cm.execCommand("goGroupRight"); + eqPos(cm.getCursor(), Pos(0, 15)); + cm.setCursor(Pos(0, 17)); + cm.execCommand("goGroupLeft"); + eqPos(cm.getCursor(), Pos(0, 16)); + cm.execCommand("goGroupLeft"); + eqPos(cm.getCursor(), Pos(0, 14)); + cm.execCommand("goGroupRight"); cm.execCommand("goGroupRight"); + eqPos(cm.getCursor(), Pos(0, 20)); + cm.execCommand("goGroupRight"); + eqPos(cm.getCursor(), Pos(1, 5)); + cm.execCommand("goGroupLeft"); cm.execCommand("goGroupLeft"); + eqPos(cm.getCursor(), Pos(1, 0)); + cm.execCommand("goGroupLeft"); + eqPos(cm.getCursor(), Pos(0, 16)); +}, {value: "booo ba---quux. ffff\n abc d"}); + +testCM("charMovementCommands", function(cm) { + cm.execCommand("goCharLeft"); cm.execCommand("goColumnLeft"); + eqPos(cm.getCursor(), Pos(0, 0)); + cm.execCommand("goCharRight"); cm.execCommand("goCharRight"); + eqPos(cm.getCursor(), Pos(0, 2)); + cm.setCursor(Pos(1, 0)); + cm.execCommand("goColumnLeft"); + eqPos(cm.getCursor(), Pos(1, 0)); + cm.execCommand("goCharLeft"); + eqPos(cm.getCursor(), Pos(0, 5)); + cm.execCommand("goColumnRight"); + eqPos(cm.getCursor(), Pos(0, 5)); + cm.execCommand("goCharRight"); + eqPos(cm.getCursor(), Pos(1, 0)); + cm.execCommand("goLineEnd"); + eqPos(cm.getCursor(), Pos(1, 5)); + cm.execCommand("goLineStartSmart"); + eqPos(cm.getCursor(), Pos(1, 1)); + cm.execCommand("goLineStartSmart"); + eqPos(cm.getCursor(), Pos(1, 0)); + cm.setCursor(Pos(2, 0)); + cm.execCommand("goCharRight"); cm.execCommand("goColumnRight"); + eqPos(cm.getCursor(), Pos(2, 0)); +}, {value: "line1\n ine2\n"}); + +testCM("verticalMovementCommands", function(cm) { + cm.execCommand("goLineUp"); + eqPos(cm.getCursor(), Pos(0, 0)); + cm.execCommand("goLineDown"); + if (!phantom) // This fails in PhantomJS, though not in a real Webkit + eqPos(cm.getCursor(), Pos(1, 0)); + cm.setCursor(Pos(1, 12)); + cm.execCommand("goLineDown"); + eqPos(cm.getCursor(), Pos(2, 5)); + cm.execCommand("goLineDown"); + eqPos(cm.getCursor(), Pos(3, 0)); + cm.execCommand("goLineUp"); + eqPos(cm.getCursor(), Pos(2, 5)); + cm.execCommand("goLineUp"); + eqPos(cm.getCursor(), Pos(1, 12)); + cm.execCommand("goPageDown"); + eqPos(cm.getCursor(), Pos(5, 0)); + cm.execCommand("goPageDown"); cm.execCommand("goLineDown"); + eqPos(cm.getCursor(), Pos(5, 0)); + cm.execCommand("goPageUp"); + eqPos(cm.getCursor(), Pos(0, 0)); +}, {value: "line1\nlong long line2\nline3\n\nline5\n"}); + +testCM("verticalMovementCommandsWrapping", function(cm) { + cm.setSize(120); + cm.setCursor(Pos(0, 5)); + cm.execCommand("goLineDown"); + eq(cm.getCursor().line, 0); + is(cm.getCursor().ch > 5, "moved beyond wrap"); + for (var i = 0; ; ++i) { + is(i < 20, "no endless loop"); + cm.execCommand("goLineDown"); + var cur = cm.getCursor(); + if (cur.line == 1) eq(cur.ch, 5); + if (cur.line == 2) { eq(cur.ch, 1); break; } + } +}, {value: "a very long line that wraps around somehow so that we can test cursor movement\nshortone\nk", + lineWrapping: true}); + +testCM("rtlMovement", function(cm) { + forEach(["خحج", "خحabcخحج", "abخحخحجcd", "abخde", "abخح2342خ1حج", "خ1ح2خح3حxج", + "خحcd", "1خحcd", "abcdeح1ج", "خمرحبها مها!", "foobarر", + ""], function(line) { + var inv = line.charAt(0) == "خ"; + cm.setValue(line + "\n"); cm.execCommand(inv ? "goLineEnd" : "goLineStart"); + var cursor = byClassName(cm.getWrapperElement(), "CodeMirror-cursor")[0]; + var prevX = cursor.offsetLeft, prevY = cursor.offsetTop; + for (var i = 0; i <= line.length; ++i) { + cm.execCommand("goCharRight"); + if (i == line.length) is(cursor.offsetTop > prevY, "next line"); + else is(cursor.offsetLeft > prevX, "moved right"); + prevX = cursor.offsetLeft; prevY = cursor.offsetTop; + } + cm.setCursor(0, 0); cm.execCommand(inv ? "goLineStart" : "goLineEnd"); + prevX = cursor.offsetLeft; + for (var i = 0; i < line.length; ++i) { + cm.execCommand("goCharLeft"); + is(cursor.offsetLeft < prevX, "moved left"); + prevX = cursor.offsetLeft; + } + }); +}); + +// Verify that updating a line clears its bidi ordering +testCM("bidiUpdate", function(cm) { + cm.setCursor(Pos(0, 2)); + cm.replaceSelection("خحج", "start"); + cm.execCommand("goCharRight"); + eqPos(cm.getCursor(), Pos(0, 4)); +}, {value: "abcd\n"}); + +testCM("movebyTextUnit", function(cm) { + cm.setValue("בְּרֵאשִ\ńéée\n"); + cm.execCommand("goLineEnd"); + for (var i = 0; i < 4; ++i) cm.execCommand("goCharRight"); + eqPos(cm.getCursor(), Pos(0, 0)); + cm.execCommand("goCharRight"); + eqPos(cm.getCursor(), Pos(1, 0)); + cm.execCommand("goCharRight"); + cm.execCommand("goCharRight"); + eqPos(cm.getCursor(), Pos(1, 3)); + cm.execCommand("goCharRight"); + cm.execCommand("goCharRight"); + eqPos(cm.getCursor(), Pos(1, 6)); +}); + +testCM("lineChangeEvents", function(cm) { + addDoc(cm, 3, 5); + var log = [], want = ["ch 0", "ch 1", "del 2", "ch 0", "ch 0", "del 1", "del 3", "del 4"]; + for (var i = 0; i < 5; ++i) { + CodeMirror.on(cm.getLineHandle(i), "delete", function(i) { + return function() {log.push("del " + i);}; + }(i)); + CodeMirror.on(cm.getLineHandle(i), "change", function(i) { + return function() {log.push("ch " + i);}; + }(i)); + } + cm.replaceRange("x", Pos(0, 1)); + cm.replaceRange("xy", Pos(1, 1), Pos(2)); + cm.replaceRange("foo\nbar", Pos(0, 1)); + cm.replaceRange("", Pos(0, 0), Pos(cm.lineCount())); + eq(log.length, want.length, "same length"); + for (var i = 0; i < log.length; ++i) + eq(log[i], want[i]); +}); + +testCM("scrollEntirelyToRight", function(cm) { + if (phantom) return; + addDoc(cm, 500, 2); + cm.setCursor(Pos(0, 500)); + var wrap = cm.getWrapperElement(), cur = byClassName(wrap, "CodeMirror-cursor")[0]; + is(wrap.getBoundingClientRect().right > cur.getBoundingClientRect().left); +}); + +testCM("lineWidgets", function(cm) { + addDoc(cm, 500, 3); + var last = cm.charCoords(Pos(2, 0)); + var node = document.createElement("div"); + node.innerHTML = "hi"; + var widget = cm.addLineWidget(1, node); + is(last.top < cm.charCoords(Pos(2, 0)).top, "took up space"); + cm.setCursor(Pos(1, 1)); + cm.execCommand("goLineDown"); + eqPos(cm.getCursor(), Pos(2, 1)); + cm.execCommand("goLineUp"); + eqPos(cm.getCursor(), Pos(1, 1)); +}); + +testCM("lineWidgetFocus", function(cm) { + var place = document.getElementById("testground"); + place.className = "offscreen"; + try { + addDoc(cm, 500, 10); + var node = document.createElement("input"); + var widget = cm.addLineWidget(1, node); + node.focus(); + eq(document.activeElement, node); + cm.replaceRange("new stuff", Pos(1, 0)); + eq(document.activeElement, node); + } finally { + place.className = ""; + } +}); + +testCM("getLineNumber", function(cm) { + addDoc(cm, 2, 20); + var h1 = cm.getLineHandle(1); + eq(cm.getLineNumber(h1), 1); + cm.replaceRange("hi\nbye\n", Pos(0, 0)); + eq(cm.getLineNumber(h1), 3); + cm.setValue(""); + eq(cm.getLineNumber(h1), null); +}); + +testCM("jumpTheGap", function(cm) { + var longLine = "abcdef ghiklmnop qrstuvw xyz "; + longLine += longLine; longLine += longLine; longLine += longLine; + cm.setLine(2, longLine); + cm.setSize("200px", null); + cm.getWrapperElement().style.lineHeight = 2; + cm.refresh(); + cm.setCursor(Pos(0, 1)); + cm.execCommand("goLineDown"); + eqPos(cm.getCursor(), Pos(1, 1)); + cm.execCommand("goLineDown"); + eqPos(cm.getCursor(), Pos(2, 1)); + cm.execCommand("goLineDown"); + eq(cm.getCursor().line, 2); + is(cm.getCursor().ch > 1); + cm.execCommand("goLineUp"); + eqPos(cm.getCursor(), Pos(2, 1)); + cm.execCommand("goLineUp"); + eqPos(cm.getCursor(), Pos(1, 1)); + var node = document.createElement("div"); + node.innerHTML = "hi"; node.style.height = "30px"; + cm.addLineWidget(0, node); + cm.addLineWidget(1, node.cloneNode(true), {above: true}); + cm.setCursor(Pos(0, 2)); + cm.execCommand("goLineDown"); + eqPos(cm.getCursor(), Pos(1, 2)); + cm.execCommand("goLineUp"); + eqPos(cm.getCursor(), Pos(0, 2)); +}, {lineWrapping: true, value: "abc\ndef\nghi\njkl\n"}); + +testCM("addLineClass", function(cm) { + function cls(line, text, bg, wrap) { + var i = cm.lineInfo(line); + eq(i.textClass, text); + eq(i.bgClass, bg); + eq(i.wrapClass, wrap); + } + cm.addLineClass(0, "text", "foo"); + cm.addLineClass(0, "text", "bar"); + cm.addLineClass(1, "background", "baz"); + cm.addLineClass(1, "wrap", "foo"); + cls(0, "foo bar", null, null); + cls(1, null, "baz", "foo"); + var lines = cm.display.lineDiv; + eq(byClassName(lines, "foo").length, 2); + eq(byClassName(lines, "bar").length, 1); + eq(byClassName(lines, "baz").length, 1); + cm.removeLineClass(0, "text", "foo"); + cls(0, "bar", null, null); + cm.removeLineClass(0, "text", "foo"); + cls(0, "bar", null, null); + cm.removeLineClass(0, "text", "bar"); + cls(0, null, null, null); + cm.addLineClass(1, "wrap", "quux"); + cls(1, null, "baz", "foo quux"); + cm.removeLineClass(1, "wrap"); + cls(1, null, "baz", null); +}, {value: "hohoho\n"}); + +testCM("atomicMarker", function(cm) { + addDoc(cm, 10, 10); + function atom(ll, cl, lr, cr, li, ri) { + return cm.markText(Pos(ll, cl), Pos(lr, cr), + {atomic: true, inclusiveLeft: li, inclusiveRight: ri}); + } + var m = atom(0, 1, 0, 5); + cm.setCursor(Pos(0, 1)); + cm.execCommand("goCharRight"); + eqPos(cm.getCursor(), Pos(0, 5)); + cm.execCommand("goCharLeft"); + eqPos(cm.getCursor(), Pos(0, 1)); + m.clear(); + m = atom(0, 0, 0, 5, true); + eqPos(cm.getCursor(), Pos(0, 5), "pushed out"); + cm.execCommand("goCharLeft"); + eqPos(cm.getCursor(), Pos(0, 5)); + m.clear(); + m = atom(8, 4, 9, 10, false, true); + cm.setCursor(Pos(9, 8)); + eqPos(cm.getCursor(), Pos(8, 4), "set"); + cm.execCommand("goCharRight"); + eqPos(cm.getCursor(), Pos(8, 4), "char right"); + cm.execCommand("goLineDown"); + eqPos(cm.getCursor(), Pos(8, 4), "line down"); + cm.execCommand("goCharLeft"); + eqPos(cm.getCursor(), Pos(8, 3)); + m.clear(); + m = atom(1, 1, 3, 8); + cm.setCursor(Pos(0, 0)); + cm.setCursor(Pos(2, 0)); + eqPos(cm.getCursor(), Pos(3, 8)); + cm.execCommand("goCharLeft"); + eqPos(cm.getCursor(), Pos(1, 1)); + cm.execCommand("goCharRight"); + eqPos(cm.getCursor(), Pos(3, 8)); + cm.execCommand("goLineUp"); + eqPos(cm.getCursor(), Pos(1, 1)); + cm.execCommand("goLineDown"); + eqPos(cm.getCursor(), Pos(3, 8)); + cm.execCommand("delCharBefore"); + eq(cm.getValue().length, 80, "del chunk"); + m = atom(3, 0, 5, 5); + cm.setCursor(Pos(3, 0)); + cm.execCommand("delWordAfter"); + eq(cm.getValue().length, 53, "del chunk"); +}); + +testCM("readOnlyMarker", function(cm) { + function mark(ll, cl, lr, cr, at) { + return cm.markText(Pos(ll, cl), Pos(lr, cr), + {readOnly: true, atomic: at}); + } + var m = mark(0, 1, 0, 4); + cm.setCursor(Pos(0, 2)); + cm.replaceSelection("hi", "end"); + eqPos(cm.getCursor(), Pos(0, 2)); + eq(cm.getLine(0), "abcde"); + cm.execCommand("selectAll"); + cm.replaceSelection("oops"); + eq(cm.getValue(), "oopsbcd"); + cm.undo(); + eqPos(m.find().from, Pos(0, 1)); + eqPos(m.find().to, Pos(0, 4)); + m.clear(); + cm.setCursor(Pos(0, 2)); + cm.replaceSelection("hi"); + eq(cm.getLine(0), "abhicde"); + eqPos(cm.getCursor(), Pos(0, 4)); + m = mark(0, 2, 2, 2, true); + cm.setSelection(Pos(1, 1), Pos(2, 4)); + cm.replaceSelection("t", "end"); + eqPos(cm.getCursor(), Pos(2, 3)); + eq(cm.getLine(2), "klto"); + cm.execCommand("goCharLeft"); + cm.execCommand("goCharLeft"); + eqPos(cm.getCursor(), Pos(0, 2)); + cm.setSelection(Pos(0, 1), Pos(0, 3)); + cm.replaceSelection("xx"); + eqPos(cm.getCursor(), Pos(0, 3)); + eq(cm.getLine(0), "axxhicde"); +}, {value: "abcde\nfghij\nklmno\n"}); + +testCM("dirtyBit", function(cm) { + eq(cm.isClean(), true); + cm.replaceSelection("boo"); + eq(cm.isClean(), false); + cm.undo(); + eq(cm.isClean(), true); + cm.replaceSelection("boo"); + cm.replaceSelection("baz"); + cm.undo(); + eq(cm.isClean(), false); + cm.markClean(); + eq(cm.isClean(), true); + cm.undo(); + eq(cm.isClean(), false); + cm.redo(); + eq(cm.isClean(), true); +}); + +testCM("addKeyMap", function(cm) { + function sendKey(code) { + cm.triggerOnKeyDown({type: "keydown", keyCode: code, + preventDefault: function(){}, stopPropagation: function(){}}); + } + + sendKey(39); + eqPos(cm.getCursor(), Pos(0, 1)); + var test = 0; + var map1 = {Right: function() { ++test; }}, map2 = {Right: function() { test += 10; }} + cm.addKeyMap(map1); + sendKey(39); + eqPos(cm.getCursor(), Pos(0, 1)); + eq(test, 1); + cm.addKeyMap(map2, true); + sendKey(39); + eq(test, 2); + cm.removeKeyMap(map1); + sendKey(39); + eq(test, 12); + cm.removeKeyMap(map2); + sendKey(39); + eq(test, 12); + eqPos(cm.getCursor(), Pos(0, 2)); + cm.addKeyMap({Right: function() { test = 55; }, name: "mymap"}); + sendKey(39); + eq(test, 55); + cm.removeKeyMap("mymap"); + sendKey(39); + eqPos(cm.getCursor(), Pos(0, 3)); +}, {value: "abc"}); + +testCM("findPosH", function(cm) { + forEach([{from: Pos(0, 0), to: Pos(0, 1), by: 1}, + {from: Pos(0, 0), to: Pos(0, 0), by: -1, hitSide: true}, + {from: Pos(0, 0), to: Pos(0, 4), by: 1, unit: "word"}, + {from: Pos(0, 0), to: Pos(0, 8), by: 2, unit: "word"}, + {from: Pos(0, 0), to: Pos(2, 0), by: 20, unit: "word", hitSide: true}, + {from: Pos(0, 7), to: Pos(0, 5), by: -1, unit: "word"}, + {from: Pos(0, 4), to: Pos(0, 8), by: 1, unit: "word"}, + {from: Pos(1, 0), to: Pos(1, 18), by: 3, unit: "word"}, + {from: Pos(1, 22), to: Pos(1, 5), by: -3, unit: "word"}, + {from: Pos(1, 15), to: Pos(1, 10), by: -5}, + {from: Pos(1, 15), to: Pos(1, 10), by: -5, unit: "column"}, + {from: Pos(1, 15), to: Pos(1, 0), by: -50, unit: "column", hitSide: true}, + {from: Pos(1, 15), to: Pos(1, 24), by: 50, unit: "column", hitSide: true}, + {from: Pos(1, 15), to: Pos(2, 0), by: 50, hitSide: true}], function(t) { + var r = cm.findPosH(t.from, t.by, t.unit || "char"); + eqPos(r, t.to); + eq(!!r.hitSide, !!t.hitSide); + }); +}, {value: "line one\nline two.something.other\n"}); + +testCM("beforeChange", function(cm) { + cm.on("beforeChange", function(cm, change) { + var text = []; + for (var i = 0; i < change.text.length; ++i) + text.push(change.text[i].replace(/\s/g, "_")); + change.update(null, null, text); + }); + cm.setValue("hello, i am a\nnew document\n"); + eq(cm.getValue(), "hello,_i_am_a\nnew_document\n"); + CodeMirror.on(cm.getDoc(), "beforeChange", function(doc, change) { + if (change.from.line == 0) change.cancel(); + }); + cm.setValue("oops"); // Canceled + eq(cm.getValue(), "hello,_i_am_a\nnew_document\n"); + cm.replaceRange("hey hey hey", Pos(1, 0), Pos(2, 0)); + eq(cm.getValue(), "hello,_i_am_a\nhey_hey_hey"); +}, {value: "abcdefghijk"}); + +testCM("beforeChangeUndo", function(cm) { + cm.setLine(0, "hi"); + cm.setLine(0, "bye"); + eq(cm.historySize().undo, 2); + cm.on("beforeChange", function(cm, change) { + is(!change.update); + change.cancel(); + }); + cm.undo(); + eq(cm.historySize().undo, 0); + eq(cm.getValue(), "bye\ntwo"); +}, {value: "one\ntwo"}); + +testCM("beforeSelectionChange", function(cm) { + function notAtEnd(cm, pos) { + var len = cm.getLine(pos.line).length; + if (!len || pos.ch == len) return Pos(pos.line, pos.ch - 1); + return pos; + } + cm.on("beforeSelectionChange", function(cm, sel) { + sel.head = notAtEnd(cm, sel.head); + sel.anchor = notAtEnd(cm, sel.anchor); + }); + + addDoc(cm, 10, 10); + cm.execCommand("goLineEnd"); + eqPos(cm.getCursor(), Pos(0, 9)); + cm.execCommand("selectAll"); + eqPos(cm.getCursor("start"), Pos(0, 0)); + eqPos(cm.getCursor("end"), Pos(9, 9)); +}); + +testCM("change_removedText", function(cm) { + cm.setValue("abc\ndef"); + + var removedText; + cm.on("change", function(cm, change) { + removedText = [change.removed, change.next && change.next.removed]; + }); + + cm.operation(function() { + cm.replaceRange("xyz", Pos(0, 0), Pos(1,1)); + cm.replaceRange("123", Pos(0,0)); + }); + + eq(removedText[0].join("\n"), "abc\nd"); + eq(removedText[1].join("\n"), ""); + + cm.undo(); + eq(removedText[0].join("\n"), "123"); + eq(removedText[1].join("\n"), "xyz"); + + cm.redo(); + eq(removedText[0].join("\n"), "abc\nd"); + eq(removedText[1].join("\n"), ""); +}); + +testCM("lineStyleFromMode", function(cm) { + CodeMirror.defineMode("test_mode", function() { + return {token: function(stream) { + if (stream.match(/^\[[^\]]*\]/)) return "line-brackets"; + if (stream.match(/^\([^\]]*\)/)) return "line-background-parens"; + stream.match(/^\s+|^\S+/); + }}; + }); + cm.setOption("mode", "test_mode"); + var bracketElts = byClassName(cm.getWrapperElement(), "brackets"); + eq(bracketElts.length, 1); + eq(bracketElts[0].nodeName, "PRE"); + is(!/brackets.*brackets/.test(bracketElts[0].className)); + var parenElts = byClassName(cm.getWrapperElement(), "parens"); + eq(parenElts.length, 1); + eq(parenElts[0].nodeName, "DIV"); + is(!/parens.*parens/.test(parenElts[0].className)); +}, {value: "line1: [br] [br]\nline2: (par) (par)\nline3: nothing"}); diff --git a/pitfall/pdfkit/node_modules/codemirror/test/vim_test.js b/pitfall/pdfkit/node_modules/codemirror/test/vim_test.js new file mode 100644 index 00000000..fe272551 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/test/vim_test.js @@ -0,0 +1,2391 @@ +var code = '' + +' wOrd1 (#%\n' + +' word3] \n' + +'aopop pop 0 1 2 3 4\n' + +' (a) [b] {c} \n' + +'int getchar(void) {\n' + +' static char buf[BUFSIZ];\n' + +' static char *bufp = buf;\n' + +' if (n == 0) { /* buffer is empty */\n' + +' n = read(0, buf, sizeof buf);\n' + +' bufp = buf;\n' + +' }\n' + +'\n' + +' return (--n >= 0) ? (unsigned char) *bufp++ : EOF;\n' + +' \n' + +'}\n'; + +var lines = (function() { + lineText = code.split('\n'); + var ret = []; + for (var i = 0; i < lineText.length; i++) { + ret[i] = { + line: i, + length: lineText[i].length, + lineText: lineText[i], + textStart: /^\s*/.exec(lineText[i])[0].length + }; + } + return ret; +})(); +var endOfDocument = makeCursor(lines.length - 1, + lines[lines.length - 1].length); +var wordLine = lines[0]; +var bigWordLine = lines[1]; +var charLine = lines[2]; +var bracesLine = lines[3]; +var seekBraceLine = lines[4]; + +var word1 = { + start: { line: wordLine.line, ch: 1 }, + end: { line: wordLine.line, ch: 5 } +}; +var word2 = { + start: { line: wordLine.line, ch: word1.end.ch + 2 }, + end: { line: wordLine.line, ch: word1.end.ch + 4 } +}; +var word3 = { + start: { line: bigWordLine.line, ch: 1 }, + end: { line: bigWordLine.line, ch: 5 } +}; +var bigWord1 = word1; +var bigWord2 = word2; +var bigWord3 = { + start: { line: bigWordLine.line, ch: 1 }, + end: { line: bigWordLine.line, ch: 7 } +}; +var bigWord4 = { + start: { line: bigWordLine.line, ch: bigWord1.end.ch + 3 }, + end: { line: bigWordLine.line, ch: bigWord1.end.ch + 7 } +}; + +var oChars = [ { line: charLine.line, ch: 1 }, + { line: charLine.line, ch: 3 }, + { line: charLine.line, ch: 7 } ]; +var pChars = [ { line: charLine.line, ch: 2 }, + { line: charLine.line, ch: 4 }, + { line: charLine.line, ch: 6 }, + { line: charLine.line, ch: 8 } ]; +var numChars = [ { line: charLine.line, ch: 10 }, + { line: charLine.line, ch: 12 }, + { line: charLine.line, ch: 14 }, + { line: charLine.line, ch: 16 }, + { line: charLine.line, ch: 18 }]; +var parens1 = { + start: { line: bracesLine.line, ch: 1 }, + end: { line: bracesLine.line, ch: 3 } +}; +var squares1 = { + start: { line: bracesLine.line, ch: 5 }, + end: { line: bracesLine.line, ch: 7 } +}; +var curlys1 = { + start: { line: bracesLine.line, ch: 9 }, + end: { line: bracesLine.line, ch: 11 } +}; +var seekOutside = { + start: { line: seekBraceLine.line, ch: 1 }, + end: { line: seekBraceLine.line, ch: 16 } +}; +var seekInside = { + start: { line: seekBraceLine.line, ch: 14 }, + end: { line: seekBraceLine.line, ch: 11 } +}; + +function copyCursor(cur) { + return { ch: cur.ch, line: cur.line }; +} + +function testVim(name, run, opts, expectedFail) { + var vimOpts = { + lineNumbers: true, + vimMode: true, + showCursorWhenSelecting: true, + value: code + }; + for (var prop in opts) { + if (opts.hasOwnProperty(prop)) { + vimOpts[prop] = opts[prop]; + } + } + return test('vim_' + name, function() { + var place = document.getElementById("testground"); + var cm = CodeMirror(place, vimOpts); + var vim = CodeMirror.Vim.maybeInitVimState_(cm); + + function doKeysFn(cm) { + return function(args) { + if (args instanceof Array) { + arguments = args; + } + for (var i = 0; i < arguments.length; i++) { + CodeMirror.Vim.handleKey(cm, arguments[i]); + } + } + } + function doInsertModeKeysFn(cm) { + return function(args) { + if (args instanceof Array) { arguments = args; } + function executeHandler(handler) { + if (typeof handler == 'string') { + CodeMirror.commands[handler](cm); + } else { + handler(cm); + } + return true; + } + for (var i = 0; i < arguments.length; i++) { + var key = arguments[i]; + // Find key in keymap and handle. + var handled = CodeMirror.lookupKey(key, ['vim-insert'], executeHandler); + // Record for insert mode. + if (handled === true && cm.state.vim.insertMode && arguments[i] != 'Esc') { + var lastChange = CodeMirror.Vim.getVimGlobalState_().macroModeState.lastInsertModeChanges; + if (lastChange) { + lastChange.changes.push(new CodeMirror.Vim.InsertModeKey(key)); + } + } + } + } + } + function doExFn(cm) { + return function(command) { + cm.openDialog = helpers.fakeOpenDialog(command); + helpers.doKeys(':'); + } + } + function assertCursorAtFn(cm) { + return function(line, ch) { + var pos; + if (ch == null && typeof line.line == 'number') { + pos = line; + } else { + pos = makeCursor(line, ch); + } + eqPos(pos, cm.getCursor()); + } + } + function fakeOpenDialog(result) { + return function(text, callback) { + return callback(result); + } + } + var helpers = { + doKeys: doKeysFn(cm), + // Warning: Only emulates keymap events, not character insertions. Use + // replaceRange to simulate character insertions. + // Keys are in CodeMirror format, NOT vim format. + doInsertModeKeys: doInsertModeKeysFn(cm), + doEx: doExFn(cm), + assertCursorAt: assertCursorAtFn(cm), + fakeOpenDialog: fakeOpenDialog, + getRegisterController: function() { + return CodeMirror.Vim.getRegisterController(); + } + } + CodeMirror.Vim.resetVimGlobalState_(); + var successful = false; + try { + run(cm, vim, helpers); + successful = true; + } finally { + if ((debug && !successful) || verbose) { + place.style.visibility = "visible"; + } else { + place.removeChild(cm.getWrapperElement()); + } + } + }, expectedFail); +}; +testVim('qq@q', function(cm, vim, helpers) { + cm.setCursor(0, 0); + helpers.doKeys('q', 'q', 'l', 'l', 'q'); + helpers.assertCursorAt(0,2); + helpers.doKeys('@', 'q'); + helpers.assertCursorAt(0,4); +}, { value: ' '}); +testVim('@@', function(cm, vim, helpers) { + cm.setCursor(0, 0); + helpers.doKeys('q', 'q', 'l', 'l', 'q'); + helpers.assertCursorAt(0,2); + helpers.doKeys('@', 'q'); + helpers.assertCursorAt(0,4); + helpers.doKeys('@', '@'); + helpers.assertCursorAt(0,6); +}, { value: ' '}); +var jumplistScene = ''+ + 'word\n'+ + '(word)\n'+ + '{word\n'+ + 'word.\n'+ + '\n'+ + 'word search\n'+ + '}word\n'+ + 'word\n'+ + 'word\n'; +function testJumplist(name, keys, endPos, startPos, dialog) { + endPos = makeCursor(endPos[0], endPos[1]); + startPos = makeCursor(startPos[0], startPos[1]); + testVim(name, function(cm, vim, helpers) { + CodeMirror.Vim.resetVimGlobalState_(); + if(dialog)cm.openDialog = helpers.fakeOpenDialog('word'); + cm.setCursor(startPos); + helpers.doKeys.apply(null, keys); + helpers.assertCursorAt(endPos); + }, {value: jumplistScene}); +}; +testJumplist('jumplist_H', ['H', ''], [5,2], [5,2]); +testJumplist('jumplist_M', ['M', ''], [2,2], [2,2]); +testJumplist('jumplist_L', ['L', ''], [2,2], [2,2]); +testJumplist('jumplist_[[', ['[', '[', ''], [5,2], [5,2]); +testJumplist('jumplist_]]', [']', ']', ''], [2,2], [2,2]); +testJumplist('jumplist_G', ['G', ''], [5,2], [5,2]); +testJumplist('jumplist_gg', ['g', 'g', ''], [5,2], [5,2]); +testJumplist('jumplist_%', ['%', ''], [1,5], [1,5]); +testJumplist('jumplist_{', ['{', ''], [1,5], [1,5]); +testJumplist('jumplist_}', ['}', ''], [1,5], [1,5]); +testJumplist('jumplist_\'', ['m', 'a', 'h', '\'', 'a', 'h', ''], [1,5], [1,5]); +testJumplist('jumplist_`', ['m', 'a', 'h', '`', 'a', 'h', ''], [1,5], [1,5]); +testJumplist('jumplist_*_cachedCursor', ['*', ''], [1,3], [1,3]); +testJumplist('jumplist_#_cachedCursor', ['#', ''], [1,3], [1,3]); +testJumplist('jumplist_n', ['#', 'n', ''], [1,1], [2,3]); +testJumplist('jumplist_N', ['#', 'N', ''], [1,1], [2,3]); +testJumplist('jumplist_repeat_', ['*', '*', '*', '3', ''], [2,3], [2,3]); +testJumplist('jumplist_repeat_', ['*', '*', '*', '3', '', '2', ''], [5,0], [2,3]); +testJumplist('jumplist_repeated_motion', ['3', '*', ''], [2,3], [2,3]); +testJumplist('jumplist_/', ['/', ''], [2,3], [2,3], 'dialog'); +testJumplist('jumplist_?', ['?', ''], [2,3], [2,3], 'dialog'); +testJumplist('jumplist_skip_delted_mark', + ['*', 'n', 'n', 'k', 'd', 'k', '', '', ''], + [0,2], [0,2]); +testJumplist('jumplist_skip_delted_mark', + ['*', 'n', 'n', 'k', 'd', 'k', '', '', ''], + [1,0], [0,2]); +/** + * @param name Name of the test + * @param keys An array of keys or a string with a single key to simulate. + * @param endPos The expected end position of the cursor. + * @param startPos The position the cursor should start at, defaults to 0, 0. + */ +function testMotion(name, keys, endPos, startPos) { + testVim(name, function(cm, vim, helpers) { + if (!startPos) { + startPos = { line: 0, ch: 0 }; + } + cm.setCursor(startPos); + helpers.doKeys(keys); + helpers.assertCursorAt(endPos); + }); +}; + +function makeCursor(line, ch) { + return { line: line, ch: ch }; +}; + +function offsetCursor(cur, offsetLine, offsetCh) { + return { line: cur.line + offsetLine, ch: cur.ch + offsetCh }; +}; + +// Motion tests +testMotion('|', '|', makeCursor(0, 0), makeCursor(0,4)); +testMotion('|_repeat', ['3', '|'], makeCursor(0, 2), makeCursor(0,4)); +testMotion('h', 'h', makeCursor(0, 0), word1.start); +testMotion('h_repeat', ['3', 'h'], offsetCursor(word1.end, 0, -3), word1.end); +testMotion('l', 'l', makeCursor(0, 1)); +testMotion('l_repeat', ['2', 'l'], makeCursor(0, 2)); +testMotion('j', 'j', offsetCursor(word1.end, 1, 0), word1.end); +testMotion('j_repeat', ['2', 'j'], offsetCursor(word1.end, 2, 0), word1.end); +testMotion('j_repeat_clip', ['1000', 'j'], endOfDocument); +testMotion('k', 'k', offsetCursor(word3.end, -1, 0), word3.end); +testMotion('k_repeat', ['2', 'k'], makeCursor(0, 4), makeCursor(2, 4)); +testMotion('k_repeat_clip', ['1000', 'k'], makeCursor(0, 4), makeCursor(2, 4)); +testMotion('w', 'w', word1.start); +testMotion('w_multiple_newlines_no_space', 'w', makeCursor(12, 2), makeCursor(11, 2)); +testMotion('w_multiple_newlines_with_space', 'w', makeCursor(14, 0), makeCursor(12, 51)); +testMotion('w_repeat', ['2', 'w'], word2.start); +testMotion('w_wrap', ['w'], word3.start, word2.start); +testMotion('w_endOfDocument', 'w', endOfDocument, endOfDocument); +testMotion('w_start_to_end', ['1000', 'w'], endOfDocument, makeCursor(0, 0)); +testMotion('W', 'W', bigWord1.start); +testMotion('W_repeat', ['2', 'W'], bigWord3.start, bigWord1.start); +testMotion('e', 'e', word1.end); +testMotion('e_repeat', ['2', 'e'], word2.end); +testMotion('e_wrap', 'e', word3.end, word2.end); +testMotion('e_endOfDocument', 'e', endOfDocument, endOfDocument); +testMotion('e_start_to_end', ['1000', 'e'], endOfDocument, makeCursor(0, 0)); +testMotion('b', 'b', word3.start, word3.end); +testMotion('b_repeat', ['2', 'b'], word2.start, word3.end); +testMotion('b_wrap', 'b', word2.start, word3.start); +testMotion('b_startOfDocument', 'b', makeCursor(0, 0), makeCursor(0, 0)); +testMotion('b_end_to_start', ['1000', 'b'], makeCursor(0, 0), endOfDocument); +testMotion('ge', ['g', 'e'], word2.end, word3.end); +testMotion('ge_repeat', ['2', 'g', 'e'], word1.end, word3.start); +testMotion('ge_wrap', ['g', 'e'], word2.end, word3.start); +testMotion('ge_startOfDocument', ['g', 'e'], makeCursor(0, 0), + makeCursor(0, 0)); +testMotion('ge_end_to_start', ['1000', 'g', 'e'], makeCursor(0, 0), endOfDocument); +testMotion('gg', ['g', 'g'], makeCursor(lines[0].line, lines[0].textStart), + makeCursor(3, 1)); +testMotion('gg_repeat', ['3', 'g', 'g'], + makeCursor(lines[2].line, lines[2].textStart)); +testMotion('G', 'G', + makeCursor(lines[lines.length - 1].line, lines[lines.length - 1].textStart), + makeCursor(3, 1)); +testMotion('G_repeat', ['3', 'G'], makeCursor(lines[2].line, + lines[2].textStart)); +// TODO: Make the test code long enough to test Ctrl-F and Ctrl-B. +testMotion('0', '0', makeCursor(0, 0), makeCursor(0, 8)); +testMotion('^', '^', makeCursor(0, lines[0].textStart), makeCursor(0, 8)); +testMotion('+', '+', makeCursor(1, lines[1].textStart), makeCursor(0, 8)); +testMotion('-', '-', makeCursor(0, lines[0].textStart), makeCursor(1, 4)); +testMotion('_', ['6','_'], makeCursor(5, lines[5].textStart), makeCursor(0, 8)); +testMotion('$', '$', makeCursor(0, lines[0].length - 1), makeCursor(0, 1)); +testMotion('$_repeat', ['2', '$'], makeCursor(1, lines[1].length - 1), + makeCursor(0, 3)); +testMotion('f', ['f', 'p'], pChars[0], makeCursor(charLine.line, 0)); +testMotion('f_repeat', ['2', 'f', 'p'], pChars[2], pChars[0]); +testMotion('f_num', ['f', '2'], numChars[2], makeCursor(charLine.line, 0)); +testMotion('t', ['t','p'], offsetCursor(pChars[0], 0, -1), + makeCursor(charLine.line, 0)); +testMotion('t_repeat', ['2', 't', 'p'], offsetCursor(pChars[2], 0, -1), + pChars[0]); +testMotion('F', ['F', 'p'], pChars[0], pChars[1]); +testMotion('F_repeat', ['2', 'F', 'p'], pChars[0], pChars[2]); +testMotion('T', ['T', 'p'], offsetCursor(pChars[0], 0, 1), pChars[1]); +testMotion('T_repeat', ['2', 'T', 'p'], offsetCursor(pChars[0], 0, 1), pChars[2]); +testMotion('%_parens', ['%'], parens1.end, parens1.start); +testMotion('%_squares', ['%'], squares1.end, squares1.start); +testMotion('%_braces', ['%'], curlys1.end, curlys1.start); +testMotion('%_seek_outside', ['%'], seekOutside.end, seekOutside.start); +testMotion('%_seek_inside', ['%'], seekInside.end, seekInside.start); +testVim('%_seek_skip', function(cm, vim, helpers) { + cm.setCursor(0,0); + helpers.doKeys(['%']); + helpers.assertCursorAt(0,9); +}, {value:'01234"("()'}); +testVim('%_skip_string', function(cm, vim, helpers) { + cm.setCursor(0,0); + helpers.doKeys(['%']); + helpers.assertCursorAt(0,4); + cm.setCursor(0,2); + helpers.doKeys(['%']); + helpers.assertCursorAt(0,0); +}, {value:'(")")'}); +(')') +testVim('%_skip_comment', function(cm, vim, helpers) { + cm.setCursor(0,0); + helpers.doKeys(['%']); + helpers.assertCursorAt(0,6); + cm.setCursor(0,3); + helpers.doKeys(['%']); + helpers.assertCursorAt(0,0); +}, {value:'(/*)*/)'}); +// Make sure that moving down after going to the end of a line always leaves you +// at the end of a line, but preserves the offset in other cases +testVim('Changing lines after Eol operation', function(cm, vim, helpers) { + cm.setCursor(0,0); + helpers.doKeys(['$']); + helpers.doKeys(['j']); + // After moving to Eol and then down, we should be at Eol of line 2 + helpers.assertCursorAt({ line: 1, ch: lines[1].length - 1 }); + helpers.doKeys(['j']); + // After moving down, we should be at Eol of line 3 + helpers.assertCursorAt({ line: 2, ch: lines[2].length - 1 }); + helpers.doKeys(['h']); + helpers.doKeys(['j']); + // After moving back one space and then down, since line 4 is shorter than line 2, we should + // be at Eol of line 2 - 1 + helpers.assertCursorAt({ line: 3, ch: lines[3].length - 1 }); + helpers.doKeys(['j']); + helpers.doKeys(['j']); + // After moving down again, since line 3 has enough characters, we should be back to the + // same place we were at on line 1 + helpers.assertCursorAt({ line: 5, ch: lines[2].length - 2 }); +}); +//making sure gj and gk recover from clipping +testVim('gj_gk_clipping', function(cm,vim,helpers){ + cm.setCursor(0, 1); + helpers.doKeys('g','j','g','j'); + helpers.assertCursorAt(2, 1); + helpers.doKeys('g','k','g','k'); + helpers.assertCursorAt(0, 1); +},{value: 'line 1\n\nline 2'}); +//testing a mix of j/k and gj/gk +testVim('j_k_and_gj_gk', function(cm,vim,helpers){ + cm.setSize(120); + cm.setCursor(0, 0); + //go to the last character on the first line + helpers.doKeys('$'); + //move up/down on the column within the wrapped line + //side-effect: cursor is not locked to eol anymore + helpers.doKeys('g','k'); + var cur=cm.getCursor(); + eq(cur.line,0); + is((cur.ch<176),'gk didn\'t move cursor back (1)'); + helpers.doKeys('g','j'); + helpers.assertCursorAt(0, 176); + //should move to character 177 on line 2 (j/k preserve character index within line) + helpers.doKeys('j'); + //due to different line wrapping, the cursor can be on a different screen-x now + //gj and gk preserve screen-x on movement, much like moveV + helpers.doKeys('3','g','k'); + cur=cm.getCursor(); + eq(cur.line,1); + is((cur.ch<176),'gk didn\'t move cursor back (2)'); + helpers.doKeys('g','j','2','g','j'); + //should return to the same character-index + helpers.doKeys('k'); + helpers.assertCursorAt(0, 176); +},{ lineWrapping:true, value: 'This line is intentially long to test movement of gj and gk over wrapped lines. I will start on the end of this line, then make a step up and back to set the origin for j and k.\nThis line is supposed to be even longer than the previous. I will jump here and make another wiggle with gj and gk, before I jump back to the line above. Both wiggles should not change my cursor\'s target character but both j/k and gj/gk change each other\'s reference position.'}); +testVim('gj_gk', function(cm, vim, helpers) { + if (phantom) return; + cm.setSize(120); + // Test top of document edge case. + cm.setCursor(0, 4); + helpers.doKeys('g', 'j'); + helpers.doKeys('10', 'g', 'k'); + helpers.assertCursorAt(0, 4); + + // Test moving down preserves column position. + helpers.doKeys('g', 'j'); + var pos1 = cm.getCursor(); + var expectedPos2 = { line: 0, ch: (pos1.ch - 4) * 2 + 4}; + helpers.doKeys('g', 'j'); + helpers.assertCursorAt(expectedPos2); + + // Move to the last character + cm.setCursor(0, 0); + // Move left to reset HSPos + helpers.doKeys('h'); + // Test bottom of document edge case. + helpers.doKeys('100', 'g', 'j'); + var endingPos = cm.getCursor(); + is(endingPos != 0, 'gj should not be on wrapped line 0'); + var topLeftCharCoords = cm.charCoords(makeCursor(0, 0)); + var endingCharCoords = cm.charCoords(endingPos); + is(topLeftCharCoords.left == endingCharCoords.left, 'gj should end up on column 0'); +},{ lineNumbers: false, lineWrapping:true, value: 'Thislineisintentiallylongtotestmovementofgjandgkoverwrappedlines.' }); +testVim('}', function(cm, vim, helpers) { + cm.setCursor(0, 0); + helpers.doKeys('}'); + helpers.assertCursorAt(1, 0); + cm.setCursor(0, 0); + helpers.doKeys('2', '}'); + helpers.assertCursorAt(4, 0); + cm.setCursor(0, 0); + helpers.doKeys('6', '}'); + helpers.assertCursorAt(5, 0); +}, { value: 'a\n\nb\nc\n\nd' }); +testVim('{', function(cm, vim, helpers) { + cm.setCursor(5, 0); + helpers.doKeys('{'); + helpers.assertCursorAt(4, 0); + cm.setCursor(5, 0); + helpers.doKeys('2', '{'); + helpers.assertCursorAt(1, 0); + cm.setCursor(5, 0); + helpers.doKeys('6', '{'); + helpers.assertCursorAt(0, 0); +}, { value: 'a\n\nb\nc\n\nd' }); + +// Operator tests +testVim('dl', function(cm, vim, helpers) { + var curStart = makeCursor(0, 0); + cm.setCursor(curStart); + helpers.doKeys('d', 'l'); + eq('word1 ', cm.getValue()); + var register = helpers.getRegisterController().getRegister(); + eq(' ', register.text); + is(!register.linewise); + eqPos(curStart, cm.getCursor()); +}, { value: ' word1 ' }); +testVim('dl_eol', function(cm, vim, helpers) { + cm.setCursor(0, 6); + helpers.doKeys('d', 'l'); + eq(' word1', cm.getValue()); + var register = helpers.getRegisterController().getRegister(); + eq(' ', register.text); + is(!register.linewise); + helpers.assertCursorAt(0, 5); +}, { value: ' word1 ' }); +testVim('dl_repeat', function(cm, vim, helpers) { + var curStart = makeCursor(0, 0); + cm.setCursor(curStart); + helpers.doKeys('2', 'd', 'l'); + eq('ord1 ', cm.getValue()); + var register = helpers.getRegisterController().getRegister(); + eq(' w', register.text); + is(!register.linewise); + eqPos(curStart, cm.getCursor()); +}, { value: ' word1 ' }); +testVim('dh', function(cm, vim, helpers) { + var curStart = makeCursor(0, 3); + cm.setCursor(curStart); + helpers.doKeys('d', 'h'); + eq(' wrd1 ', cm.getValue()); + var register = helpers.getRegisterController().getRegister(); + eq('o', register.text); + is(!register.linewise); + eqPos(offsetCursor(curStart, 0 , -1), cm.getCursor()); +}, { value: ' word1 ' }); +testVim('dj', function(cm, vim, helpers) { + var curStart = makeCursor(0, 3); + cm.setCursor(curStart); + helpers.doKeys('d', 'j'); + eq(' word3', cm.getValue()); + var register = helpers.getRegisterController().getRegister(); + eq(' word1\nword2\n', register.text); + is(register.linewise); + helpers.assertCursorAt(0, 1); +}, { value: ' word1\nword2\n word3' }); +testVim('dj_end_of_document', function(cm, vim, helpers) { + var curStart = makeCursor(0, 3); + cm.setCursor(curStart); + helpers.doKeys('d', 'j'); + eq(' word1 ', cm.getValue()); + var register = helpers.getRegisterController().getRegister(); + eq('', register.text); + is(!register.linewise); + helpers.assertCursorAt(0, 3); +}, { value: ' word1 ' }); +testVim('dk', function(cm, vim, helpers) { + var curStart = makeCursor(1, 3); + cm.setCursor(curStart); + helpers.doKeys('d', 'k'); + eq(' word3', cm.getValue()); + var register = helpers.getRegisterController().getRegister(); + eq(' word1\nword2\n', register.text); + is(register.linewise); + helpers.assertCursorAt(0, 1); +}, { value: ' word1\nword2\n word3' }); +testVim('dk_start_of_document', function(cm, vim, helpers) { + var curStart = makeCursor(0, 3); + cm.setCursor(curStart); + helpers.doKeys('d', 'k'); + eq(' word1 ', cm.getValue()); + var register = helpers.getRegisterController().getRegister(); + eq('', register.text); + is(!register.linewise); + helpers.assertCursorAt(0, 3); +}, { value: ' word1 ' }); +testVim('dw_space', function(cm, vim, helpers) { + var curStart = makeCursor(0, 0); + cm.setCursor(curStart); + helpers.doKeys('d', 'w'); + eq('word1 ', cm.getValue()); + var register = helpers.getRegisterController().getRegister(); + eq(' ', register.text); + is(!register.linewise); + eqPos(curStart, cm.getCursor()); +}, { value: ' word1 ' }); +testVim('dw_word', function(cm, vim, helpers) { + var curStart = makeCursor(0, 1); + cm.setCursor(curStart); + helpers.doKeys('d', 'w'); + eq(' word2', cm.getValue()); + var register = helpers.getRegisterController().getRegister(); + eq('word1 ', register.text); + is(!register.linewise); + eqPos(curStart, cm.getCursor()); +}, { value: ' word1 word2' }); +testVim('dw_only_word', function(cm, vim, helpers) { + // Test that if there is only 1 word left, dw deletes till the end of the + // line. + cm.setCursor(0, 1); + helpers.doKeys('d', 'w'); + eq(' ', cm.getValue()); + var register = helpers.getRegisterController().getRegister(); + eq('word1 ', register.text); + is(!register.linewise); + helpers.assertCursorAt(0, 0); +}, { value: ' word1 ' }); +testVim('dw_eol', function(cm, vim, helpers) { + // Assert that dw does not delete the newline if last word to delete is at end + // of line. + cm.setCursor(0, 1); + helpers.doKeys('d', 'w'); + eq(' \nword2', cm.getValue()); + var register = helpers.getRegisterController().getRegister(); + eq('word1', register.text); + is(!register.linewise); + helpers.assertCursorAt(0, 0); +}, { value: ' word1\nword2' }); +testVim('dw_eol_with_multiple_newlines', function(cm, vim, helpers) { + // Assert that dw does not delete the newline if last word to delete is at end + // of line and it is followed by multiple newlines. + cm.setCursor(0, 1); + helpers.doKeys('d', 'w'); + eq(' \n\nword2', cm.getValue()); + var register = helpers.getRegisterController().getRegister(); + eq('word1', register.text); + is(!register.linewise); + helpers.assertCursorAt(0, 0); +}, { value: ' word1\n\nword2' }); +testVim('dw_empty_line_followed_by_whitespace', function(cm, vim, helpers) { + cm.setCursor(0, 0); + helpers.doKeys('d', 'w'); + eq(' \nword', cm.getValue()); +}, { value: '\n \nword' }); +testVim('dw_empty_line_followed_by_word', function(cm, vim, helpers) { + cm.setCursor(0, 0); + helpers.doKeys('d', 'w'); + eq('word', cm.getValue()); +}, { value: '\nword' }); +testVim('dw_empty_line_followed_by_empty_line', function(cm, vim, helpers) { + cm.setCursor(0, 0); + helpers.doKeys('d', 'w'); + eq('\n', cm.getValue()); +}, { value: '\n\n' }); +testVim('dw_whitespace_followed_by_whitespace', function(cm, vim, helpers) { + cm.setCursor(0, 0); + helpers.doKeys('d', 'w'); + eq('\n \n', cm.getValue()); +}, { value: ' \n \n' }); +testVim('dw_whitespace_followed_by_empty_line', function(cm, vim, helpers) { + cm.setCursor(0, 0); + helpers.doKeys('d', 'w'); + eq('\n\n', cm.getValue()); +}, { value: ' \n\n' }); +testVim('dw_word_whitespace_word', function(cm, vim, helpers) { + cm.setCursor(0, 0); + helpers.doKeys('d', 'w'); + eq('\n \nword2', cm.getValue()); +}, { value: 'word1\n \nword2'}) +testVim('dw_end_of_document', function(cm, vim, helpers) { + cm.setCursor(1, 2); + helpers.doKeys('d', 'w'); + eq('\nab', cm.getValue()); +}, { value: '\nabc' }); +testVim('dw_repeat', function(cm, vim, helpers) { + // Assert that dw does delete newline if it should go to the next line, and + // that repeat works properly. + cm.setCursor(0, 1); + helpers.doKeys('d', '2', 'w'); + eq(' ', cm.getValue()); + var register = helpers.getRegisterController().getRegister(); + eq('word1\nword2', register.text); + is(!register.linewise); + helpers.assertCursorAt(0, 0); +}, { value: ' word1\nword2' }); +testVim('de_word_start_and_empty_lines', function(cm, vim, helpers) { + cm.setCursor(0, 0); + helpers.doKeys('d', 'e'); + eq('\n\n', cm.getValue()); +}, { value: 'word\n\n' }); +testVim('de_word_end_and_empty_lines', function(cm, vim, helpers) { + cm.setCursor(0, 3); + helpers.doKeys('d', 'e'); + eq('wor', cm.getValue()); +}, { value: 'word\n\n\n' }); +testVim('de_whitespace_and_empty_lines', function(cm, vim, helpers) { + cm.setCursor(0, 0); + helpers.doKeys('d', 'e'); + eq('', cm.getValue()); +}, { value: ' \n\n\n' }); +testVim('de_end_of_document', function(cm, vim, helpers) { + cm.setCursor(1, 2); + helpers.doKeys('d', 'e'); + eq('\nab', cm.getValue()); +}, { value: '\nabc' }); +testVim('db_empty_lines', function(cm, vim, helpers) { + cm.setCursor(2, 0); + helpers.doKeys('d', 'b'); + eq('\n\n', cm.getValue()); +}, { value: '\n\n\n' }); +testVim('db_word_start_and_empty_lines', function(cm, vim, helpers) { + cm.setCursor(2, 0); + helpers.doKeys('d', 'b'); + eq('\nword', cm.getValue()); +}, { value: '\n\nword' }); +testVim('db_word_end_and_empty_lines', function(cm, vim, helpers) { + cm.setCursor(2, 3); + helpers.doKeys('d', 'b'); + eq('\n\nd', cm.getValue()); +}, { value: '\n\nword' }); +testVim('db_whitespace_and_empty_lines', function(cm, vim, helpers) { + cm.setCursor(2, 0); + helpers.doKeys('d', 'b'); + eq('', cm.getValue()); +}, { value: '\n \n' }); +testVim('db_start_of_document', function(cm, vim, helpers) { + cm.setCursor(0, 0); + helpers.doKeys('d', 'b'); + eq('abc\n', cm.getValue()); +}, { value: 'abc\n' }); +testVim('dge_empty_lines', function(cm, vim, helpers) { + cm.setCursor(1, 0); + helpers.doKeys('d', 'g', 'e'); + // Note: In real VIM the result should be '', but it's not quite consistent, + // since 2 newlines are deleted. But in the similar case of word\n\n, only + // 1 newline is deleted. We'll diverge from VIM's behavior since it's much + // easier this way. + eq('\n', cm.getValue()); +}, { value: '\n\n' }); +testVim('dge_word_and_empty_lines', function(cm, vim, helpers) { + cm.setCursor(1, 0); + helpers.doKeys('d', 'g', 'e'); + eq('wor\n', cm.getValue()); +}, { value: 'word\n\n'}); +testVim('dge_whitespace_and_empty_lines', function(cm, vim, helpers) { + cm.setCursor(2, 0); + helpers.doKeys('d', 'g', 'e'); + eq('', cm.getValue()); +}, { value: '\n \n' }); +testVim('dge_start_of_document', function(cm, vim, helpers) { + cm.setCursor(0, 0); + helpers.doKeys('d', 'g', 'e'); + eq('bc\n', cm.getValue()); +}, { value: 'abc\n' }); +testVim('d_inclusive', function(cm, vim, helpers) { + // Assert that when inclusive is set, the character the cursor is on gets + // deleted too. + var curStart = makeCursor(0, 1); + cm.setCursor(curStart); + helpers.doKeys('d', 'e'); + eq(' ', cm.getValue()); + var register = helpers.getRegisterController().getRegister(); + eq('word1', register.text); + is(!register.linewise); + eqPos(curStart, cm.getCursor()); +}, { value: ' word1 ' }); +testVim('d_reverse', function(cm, vim, helpers) { + // Test that deleting in reverse works. + cm.setCursor(1, 0); + helpers.doKeys('d', 'b'); + eq(' word2 ', cm.getValue()); + var register = helpers.getRegisterController().getRegister(); + eq('word1\n', register.text); + is(!register.linewise); + helpers.assertCursorAt(0, 1); +}, { value: ' word1\nword2 ' }); +testVim('dd', function(cm, vim, helpers) { + cm.setCursor(0, 3); + var expectedBuffer = cm.getRange({ line: 0, ch: 0 }, + { line: 1, ch: 0 }); + var expectedLineCount = cm.lineCount() - 1; + helpers.doKeys('d', 'd'); + eq(expectedLineCount, cm.lineCount()); + var register = helpers.getRegisterController().getRegister(); + eq(expectedBuffer, register.text); + is(register.linewise); + helpers.assertCursorAt(0, lines[1].textStart); +}); +testVim('dd_prefix_repeat', function(cm, vim, helpers) { + cm.setCursor(0, 3); + var expectedBuffer = cm.getRange({ line: 0, ch: 0 }, + { line: 2, ch: 0 }); + var expectedLineCount = cm.lineCount() - 2; + helpers.doKeys('2', 'd', 'd'); + eq(expectedLineCount, cm.lineCount()); + var register = helpers.getRegisterController().getRegister(); + eq(expectedBuffer, register.text); + is(register.linewise); + helpers.assertCursorAt(0, lines[2].textStart); +}); +testVim('dd_motion_repeat', function(cm, vim, helpers) { + cm.setCursor(0, 3); + var expectedBuffer = cm.getRange({ line: 0, ch: 0 }, + { line: 2, ch: 0 }); + var expectedLineCount = cm.lineCount() - 2; + helpers.doKeys('d', '2', 'd'); + eq(expectedLineCount, cm.lineCount()); + var register = helpers.getRegisterController().getRegister(); + eq(expectedBuffer, register.text); + is(register.linewise); + helpers.assertCursorAt(0, lines[2].textStart); +}); +testVim('dd_multiply_repeat', function(cm, vim, helpers) { + cm.setCursor(0, 3); + var expectedBuffer = cm.getRange({ line: 0, ch: 0 }, + { line: 6, ch: 0 }); + var expectedLineCount = cm.lineCount() - 6; + helpers.doKeys('2', 'd', '3', 'd'); + eq(expectedLineCount, cm.lineCount()); + var register = helpers.getRegisterController().getRegister(); + eq(expectedBuffer, register.text); + is(register.linewise); + helpers.assertCursorAt(0, lines[6].textStart); +}); +testVim('dd_lastline', function(cm, vim, helpers) { + cm.setCursor(cm.lineCount(), 0); + var expectedLineCount = cm.lineCount() - 1; + helpers.doKeys('d', 'd'); + eq(expectedLineCount, cm.lineCount()); + helpers.assertCursorAt(cm.lineCount() - 1, 0); +}); +// Yank commands should behave the exact same as d commands, expect that nothing +// gets deleted. +testVim('yw_repeat', function(cm, vim, helpers) { + // Assert that yw does yank newline if it should go to the next line, and + // that repeat works properly. + var curStart = makeCursor(0, 1); + cm.setCursor(curStart); + helpers.doKeys('y', '2', 'w'); + eq(' word1\nword2', cm.getValue()); + var register = helpers.getRegisterController().getRegister(); + eq('word1\nword2', register.text); + is(!register.linewise); + eqPos(curStart, cm.getCursor()); +}, { value: ' word1\nword2' }); +testVim('yy_multiply_repeat', function(cm, vim, helpers) { + var curStart = makeCursor(0, 3); + cm.setCursor(curStart); + var expectedBuffer = cm.getRange({ line: 0, ch: 0 }, + { line: 6, ch: 0 }); + var expectedLineCount = cm.lineCount(); + helpers.doKeys('2', 'y', '3', 'y'); + eq(expectedLineCount, cm.lineCount()); + var register = helpers.getRegisterController().getRegister(); + eq(expectedBuffer, register.text); + is(register.linewise); + eqPos(curStart, cm.getCursor()); +}); +// Change commands behave like d commands except that it also enters insert +// mode. In addition, when the change is linewise, an additional newline is +// inserted so that insert mode starts on that line. +testVim('cw', function(cm, vim, helpers) { + cm.setCursor(0, 0); + helpers.doKeys('c', '2', 'w'); + eq(' word3', cm.getValue()); + helpers.assertCursorAt(0, 0); +}, { value: 'word1 word2 word3'}); +testVim('cw_repeat', function(cm, vim, helpers) { + // Assert that cw does delete newline if it should go to the next line, and + // that repeat works properly. + var curStart = makeCursor(0, 1); + cm.setCursor(curStart); + helpers.doKeys('c', '2', 'w'); + eq(' ', cm.getValue()); + var register = helpers.getRegisterController().getRegister(); + eq('word1\nword2', register.text); + is(!register.linewise); + eqPos(curStart, cm.getCursor()); + eq('vim-insert', cm.getOption('keyMap')); +}, { value: ' word1\nword2' }); +testVim('cc_multiply_repeat', function(cm, vim, helpers) { + cm.setCursor(0, 3); + var expectedBuffer = cm.getRange({ line: 0, ch: 0 }, + { line: 6, ch: 0 }); + var expectedLineCount = cm.lineCount() - 5; + helpers.doKeys('2', 'c', '3', 'c'); + eq(expectedLineCount, cm.lineCount()); + var register = helpers.getRegisterController().getRegister(); + eq(expectedBuffer, register.text); + is(register.linewise); + eq('vim-insert', cm.getOption('keyMap')); +}); +testVim('cc_append', function(cm, vim, helpers) { + var expectedLineCount = cm.lineCount(); + cm.setCursor(cm.lastLine(), 0); + helpers.doKeys('c', 'c'); + eq(expectedLineCount, cm.lineCount()); +}); +// Swapcase commands edit in place and do not modify registers. +testVim('g~w_repeat', function(cm, vim, helpers) { + // Assert that dw does delete newline if it should go to the next line, and + // that repeat works properly. + var curStart = makeCursor(0, 1); + cm.setCursor(curStart); + helpers.doKeys('g', '~', '2', 'w'); + eq(' WORD1\nWORD2', cm.getValue()); + var register = helpers.getRegisterController().getRegister(); + eq('', register.text); + is(!register.linewise); + eqPos(curStart, cm.getCursor()); +}, { value: ' word1\nword2' }); +testVim('g~g~', function(cm, vim, helpers) { + var curStart = makeCursor(0, 3); + cm.setCursor(curStart); + var expectedLineCount = cm.lineCount(); + var expectedValue = cm.getValue().toUpperCase(); + helpers.doKeys('2', 'g', '~', '3', 'g', '~'); + eq(expectedValue, cm.getValue()); + var register = helpers.getRegisterController().getRegister(); + eq('', register.text); + is(!register.linewise); + eqPos(curStart, cm.getCursor()); +}, { value: ' word1\nword2\nword3\nword4\nword5\nword6' }); +testVim('>{motion}', function(cm, vim, helpers) { + cm.setCursor(1, 3); + var expectedLineCount = cm.lineCount(); + var expectedValue = ' word1\n word2\nword3 '; + helpers.doKeys('>', 'k'); + eq(expectedValue, cm.getValue()); + var register = helpers.getRegisterController().getRegister(); + eq('', register.text); + is(!register.linewise); + helpers.assertCursorAt(0, 3); +}, { value: ' word1\nword2\nword3 ', indentUnit: 2 }); +testVim('>>', function(cm, vim, helpers) { + cm.setCursor(0, 3); + var expectedLineCount = cm.lineCount(); + var expectedValue = ' word1\n word2\nword3 '; + helpers.doKeys('2', '>', '>'); + eq(expectedValue, cm.getValue()); + var register = helpers.getRegisterController().getRegister(); + eq('', register.text); + is(!register.linewise); + helpers.assertCursorAt(0, 3); +}, { value: ' word1\nword2\nword3 ', indentUnit: 2 }); +testVim('<{motion}', function(cm, vim, helpers) { + cm.setCursor(1, 3); + var expectedLineCount = cm.lineCount(); + var expectedValue = ' word1\nword2\nword3 '; + helpers.doKeys('<', 'k'); + eq(expectedValue, cm.getValue()); + var register = helpers.getRegisterController().getRegister(); + eq('', register.text); + is(!register.linewise); + helpers.assertCursorAt(0, 1); +}, { value: ' word1\n word2\nword3 ', indentUnit: 2 }); +testVim('<<', function(cm, vim, helpers) { + cm.setCursor(0, 3); + var expectedLineCount = cm.lineCount(); + var expectedValue = ' word1\nword2\nword3 '; + helpers.doKeys('2', '<', '<'); + eq(expectedValue, cm.getValue()); + var register = helpers.getRegisterController().getRegister(); + eq('', register.text); + is(!register.linewise); + helpers.assertCursorAt(0, 1); +}, { value: ' word1\n word2\nword3 ', indentUnit: 2 }); + +// Edit tests +function testEdit(name, before, pos, edit, after) { + return testVim(name, function(cm, vim, helpers) { + cm.setCursor(0, before.search(pos)); + helpers.doKeys.apply(this, edit.split('')); + eq(after, cm.getValue()); + }, {value: before}); +} + +// These Delete tests effectively cover word-wise Change, Visual & Yank. +// Tabs are used as differentiated whitespace to catch edge cases. +// Normal word: +testEdit('diw_mid_spc', 'foo \tbAr\t baz', /A/, 'diw', 'foo \t\t baz'); +testEdit('daw_mid_spc', 'foo \tbAr\t baz', /A/, 'daw', 'foo \tbaz'); +testEdit('diw_mid_punct', 'foo \tbAr.\t baz', /A/, 'diw', 'foo \t.\t baz'); +testEdit('daw_mid_punct', 'foo \tbAr.\t baz', /A/, 'daw', 'foo.\t baz'); +testEdit('diw_mid_punct2', 'foo \t,bAr.\t baz', /A/, 'diw', 'foo \t,.\t baz'); +testEdit('daw_mid_punct2', 'foo \t,bAr.\t baz', /A/, 'daw', 'foo \t,.\t baz'); +testEdit('diw_start_spc', 'bAr \tbaz', /A/, 'diw', ' \tbaz'); +testEdit('daw_start_spc', 'bAr \tbaz', /A/, 'daw', 'baz'); +testEdit('diw_start_punct', 'bAr. \tbaz', /A/, 'diw', '. \tbaz'); +testEdit('daw_start_punct', 'bAr. \tbaz', /A/, 'daw', '. \tbaz'); +testEdit('diw_end_spc', 'foo \tbAr', /A/, 'diw', 'foo \t'); +testEdit('daw_end_spc', 'foo \tbAr', /A/, 'daw', 'foo'); +testEdit('diw_end_punct', 'foo \tbAr.', /A/, 'diw', 'foo \t.'); +testEdit('daw_end_punct', 'foo \tbAr.', /A/, 'daw', 'foo.'); +// Big word: +testEdit('diW_mid_spc', 'foo \tbAr\t baz', /A/, 'diW', 'foo \t\t baz'); +testEdit('daW_mid_spc', 'foo \tbAr\t baz', /A/, 'daW', 'foo \tbaz'); +testEdit('diW_mid_punct', 'foo \tbAr.\t baz', /A/, 'diW', 'foo \t\t baz'); +testEdit('daW_mid_punct', 'foo \tbAr.\t baz', /A/, 'daW', 'foo \tbaz'); +testEdit('diW_mid_punct2', 'foo \t,bAr.\t baz', /A/, 'diW', 'foo \t\t baz'); +testEdit('daW_mid_punct2', 'foo \t,bAr.\t baz', /A/, 'daW', 'foo \tbaz'); +testEdit('diW_start_spc', 'bAr\t baz', /A/, 'diW', '\t baz'); +testEdit('daW_start_spc', 'bAr\t baz', /A/, 'daW', 'baz'); +testEdit('diW_start_punct', 'bAr.\t baz', /A/, 'diW', '\t baz'); +testEdit('daW_start_punct', 'bAr.\t baz', /A/, 'daW', 'baz'); +testEdit('diW_end_spc', 'foo \tbAr', /A/, 'diW', 'foo \t'); +testEdit('daW_end_spc', 'foo \tbAr', /A/, 'daW', 'foo'); +testEdit('diW_end_punct', 'foo \tbAr.', /A/, 'diW', 'foo \t'); +testEdit('daW_end_punct', 'foo \tbAr.', /A/, 'daW', 'foo'); + +// Operator-motion tests +testVim('D', function(cm, vim, helpers) { + cm.setCursor(0, 3); + helpers.doKeys('D'); + eq(' wo\nword2\n word3', cm.getValue()); + var register = helpers.getRegisterController().getRegister(); + eq('rd1', register.text); + is(!register.linewise); + helpers.assertCursorAt(0, 2); +}, { value: ' word1\nword2\n word3' }); +testVim('C', function(cm, vim, helpers) { + var curStart = makeCursor(0, 3); + cm.setCursor(curStart); + helpers.doKeys('C'); + eq(' wo\nword2\n word3', cm.getValue()); + var register = helpers.getRegisterController().getRegister(); + eq('rd1', register.text); + is(!register.linewise); + eqPos(curStart, cm.getCursor()); + eq('vim-insert', cm.getOption('keyMap')); +}, { value: ' word1\nword2\n word3' }); +testVim('Y', function(cm, vim, helpers) { + var curStart = makeCursor(0, 3); + cm.setCursor(curStart); + helpers.doKeys('Y'); + eq(' word1\nword2\n word3', cm.getValue()); + var register = helpers.getRegisterController().getRegister(); + eq('rd1', register.text); + is(!register.linewise); + helpers.assertCursorAt(0, 3); +}, { value: ' word1\nword2\n word3' }); +testVim('~', function(cm, vim, helpers) { + helpers.doKeys('3', '~'); + eq('ABCdefg', cm.getValue()); + helpers.assertCursorAt(0, 3); +}, { value: 'abcdefg' }); + +// Action tests +testVim('ctrl-a', function(cm, vim, helpers) { + cm.setCursor(0, 0); + helpers.doKeys(''); + eq('-9', cm.getValue()); + helpers.assertCursorAt(0, 1); + helpers.doKeys('2',''); + eq('-7', cm.getValue()); +}, {value: '-10'}); +testVim('ctrl-x', function(cm, vim, helpers) { + cm.setCursor(0, 0); + helpers.doKeys(''); + eq('-1', cm.getValue()); + helpers.assertCursorAt(0, 1); + helpers.doKeys('2',''); + eq('-3', cm.getValue()); +}, {value: '0'}); +testVim('/ search forward', function(cm, vim, helpers) { + ['', ''].forEach(function(key) { + cm.setCursor(0, 0); + helpers.doKeys(key); + helpers.assertCursorAt(0, 5); + helpers.doKeys('l'); + helpers.doKeys(key); + helpers.assertCursorAt(0, 10); + cm.setCursor(0, 11); + helpers.doKeys(key); + helpers.assertCursorAt(0, 11); + }); +}, {value: '__jmp1 jmp2 jmp'}); +testVim('a', function(cm, vim, helpers) { + cm.setCursor(0, 1); + helpers.doKeys('a'); + helpers.assertCursorAt(0, 2); + eq('vim-insert', cm.getOption('keyMap')); +}); +testVim('a_eol', function(cm, vim, helpers) { + cm.setCursor(0, lines[0].length - 1); + helpers.doKeys('a'); + helpers.assertCursorAt(0, lines[0].length); + eq('vim-insert', cm.getOption('keyMap')); +}); +testVim('i', function(cm, vim, helpers) { + cm.setCursor(0, 1); + helpers.doKeys('i'); + helpers.assertCursorAt(0, 1); + eq('vim-insert', cm.getOption('keyMap')); +}); +testVim('i_repeat', function(cm, vim, helpers) { + helpers.doKeys('3', 'i'); + cm.replaceRange('test', cm.getCursor()); + helpers.doInsertModeKeys('Esc'); + eq('testtesttest', cm.getValue()); + helpers.assertCursorAt(0, 11); +}, { value: '' }); +testVim('i_repeat_delete', function(cm, vim, helpers) { + cm.setCursor(0, 4); + helpers.doKeys('2', 'i'); + cm.replaceRange('z', cm.getCursor()); + helpers.doInsertModeKeys('Backspace', 'Backspace', 'Esc'); + eq('abe', cm.getValue()); + helpers.assertCursorAt(0, 1); +}, { value: 'abcde' }); +testVim('A', function(cm, vim, helpers) { + helpers.doKeys('A'); + helpers.assertCursorAt(0, lines[0].length); + eq('vim-insert', cm.getOption('keyMap')); +}); +testVim('I', function(cm, vim, helpers) { + cm.setCursor(0, 4); + helpers.doKeys('I'); + helpers.assertCursorAt(0, lines[0].textStart); + eq('vim-insert', cm.getOption('keyMap')); +}); +testVim('I_repeat', function(cm, vim, helpers) { + cm.setCursor(0, 1); + helpers.doKeys('3', 'I'); + cm.replaceRange('test', cm.getCursor()); + helpers.doInsertModeKeys('Esc'); + eq('testtesttestblah', cm.getValue()); + helpers.assertCursorAt(0, 11); +}, { value: 'blah' }); +testVim('o', function(cm, vim, helpers) { + cm.setCursor(0, 4); + helpers.doKeys('o'); + eq('word1\n\nword2', cm.getValue()); + helpers.assertCursorAt(1, 0); + eq('vim-insert', cm.getOption('keyMap')); +}, { value: 'word1\nword2' }); +testVim('o_repeat', function(cm, vim, helpers) { + cm.setCursor(0, 0); + helpers.doKeys('3', 'o'); + cm.replaceRange('test', cm.getCursor()); + helpers.doInsertModeKeys('Esc'); + eq('\ntest\ntest\ntest', cm.getValue()); + helpers.assertCursorAt(3, 3); +}, { value: '' }); +testVim('O', function(cm, vim, helpers) { + cm.setCursor(0, 4); + helpers.doKeys('O'); + eq('\nword1\nword2', cm.getValue()); + helpers.assertCursorAt(0, 0); + eq('vim-insert', cm.getOption('keyMap')); +}, { value: 'word1\nword2' }); +testVim('J', function(cm, vim, helpers) { + cm.setCursor(0, 4); + helpers.doKeys('J'); + var expectedValue = 'word1 word2\nword3\n word4'; + eq(expectedValue, cm.getValue()); + helpers.assertCursorAt(0, expectedValue.indexOf('word2') - 1); +}, { value: 'word1 \n word2\nword3\n word4' }); +testVim('J_repeat', function(cm, vim, helpers) { + cm.setCursor(0, 4); + helpers.doKeys('3', 'J'); + var expectedValue = 'word1 word2 word3\n word4'; + eq(expectedValue, cm.getValue()); + helpers.assertCursorAt(0, expectedValue.indexOf('word3') - 1); +}, { value: 'word1 \n word2\nword3\n word4' }); +testVim('p', function(cm, vim, helpers) { + cm.setCursor(0, 1); + helpers.getRegisterController().pushText('"', 'yank', 'abc\ndef', false); + helpers.doKeys('p'); + eq('__abc\ndef_', cm.getValue()); + helpers.assertCursorAt(1, 2); +}, { value: '___' }); +testVim('p_register', function(cm, vim, helpers) { + cm.setCursor(0, 1); + helpers.getRegisterController().getRegister('a').set('abc\ndef', false); + helpers.doKeys('"', 'a', 'p'); + eq('__abc\ndef_', cm.getValue()); + helpers.assertCursorAt(1, 2); +}, { value: '___' }); +testVim('p_wrong_register', function(cm, vim, helpers) { + cm.setCursor(0, 1); + helpers.getRegisterController().getRegister('a').set('abc\ndef', false); + helpers.doKeys('p'); + eq('___', cm.getValue()); + helpers.assertCursorAt(0, 1); +}, { value: '___' }); +testVim('p_line', function(cm, vim, helpers) { + cm.setCursor(0, 1); + helpers.getRegisterController().pushText('"', 'yank', ' a\nd\n', true); + helpers.doKeys('2', 'p'); + eq('___\n a\nd\n a\nd', cm.getValue()); + helpers.assertCursorAt(1, 2); +}, { value: '___' }); +testVim('p_lastline', function(cm, vim, helpers) { + cm.setCursor(0, 1); + helpers.getRegisterController().pushText('"', 'yank', ' a\nd', true); + helpers.doKeys('2', 'p'); + eq('___\n a\nd\n a\nd', cm.getValue()); + helpers.assertCursorAt(1, 2); +}, { value: '___' }); +testVim('P', function(cm, vim, helpers) { + cm.setCursor(0, 1); + helpers.getRegisterController().pushText('"', 'yank', 'abc\ndef', false); + helpers.doKeys('P'); + eq('_abc\ndef__', cm.getValue()); + helpers.assertCursorAt(1, 3); +}, { value: '___' }); +testVim('P_line', function(cm, vim, helpers) { + cm.setCursor(0, 1); + helpers.getRegisterController().pushText('"', 'yank', ' a\nd\n', true); + helpers.doKeys('2', 'P'); + eq(' a\nd\n a\nd\n___', cm.getValue()); + helpers.assertCursorAt(0, 2); +}, { value: '___' }); +testVim('r', function(cm, vim, helpers) { + cm.setCursor(0, 1); + helpers.doKeys('3', 'r', 'u'); + eq('wuuuet\nanother', cm.getValue(),'3r failed'); + helpers.assertCursorAt(0, 3); + cm.setCursor(0, 4); + helpers.doKeys('v', 'j', 'h', 'r', ''); + eq('wuuu \n her', cm.getValue(),'Replacing selection by space-characters failed'); +}, { value: 'wordet\nanother' }); +testVim('R', function(cm, vim, helpers) { + cm.setCursor(0, 1); + helpers.doKeys('R'); + helpers.assertCursorAt(0, 1); + eq('vim-replace', cm.getOption('keyMap')); + is(cm.state.overwrite, 'Setting overwrite state failed'); +}); +testVim('mark', function(cm, vim, helpers) { + cm.setCursor(2, 2); + helpers.doKeys('m', 't'); + cm.setCursor(0, 0); + helpers.doKeys('\'', 't'); + helpers.assertCursorAt(2, 2); + cm.setCursor(0, 0); + helpers.doKeys('`', 't'); + helpers.assertCursorAt(2, 2); +}); +testVim('jumpToMark_next', function(cm, vim, helpers) { + cm.setCursor(2, 2); + helpers.doKeys('m', 't'); + cm.setCursor(0, 0); + helpers.doKeys(']', '`'); + helpers.assertCursorAt(2, 2); + cm.setCursor(0, 0); + helpers.doKeys(']', '\''); + helpers.assertCursorAt(2, 0); +}); +testVim('jumpToMark_next_repeat', function(cm, vim, helpers) { + cm.setCursor(2, 2); + helpers.doKeys('m', 'a'); + cm.setCursor(3, 2); + helpers.doKeys('m', 'b'); + cm.setCursor(4, 2); + helpers.doKeys('m', 'c'); + cm.setCursor(0, 0); + helpers.doKeys('2', ']', '`'); + helpers.assertCursorAt(3, 2); + cm.setCursor(0, 0); + helpers.doKeys('2', ']', '\''); + helpers.assertCursorAt(3, 1); +}); +testVim('jumpToMark_next_sameline', function(cm, vim, helpers) { + cm.setCursor(2, 0); + helpers.doKeys('m', 'a'); + cm.setCursor(2, 4); + helpers.doKeys('m', 'b'); + cm.setCursor(2, 2); + helpers.doKeys(']', '`'); + helpers.assertCursorAt(2, 4); +}); +testVim('jumpToMark_next_onlyprev', function(cm, vim, helpers) { + cm.setCursor(2, 0); + helpers.doKeys('m', 'a'); + cm.setCursor(4, 0); + helpers.doKeys(']', '`'); + helpers.assertCursorAt(4, 0); +}); +testVim('jumpToMark_next_nomark', function(cm, vim, helpers) { + cm.setCursor(2, 2); + helpers.doKeys(']', '`'); + helpers.assertCursorAt(2, 2); + helpers.doKeys(']', '\''); + helpers.assertCursorAt(2, 0); +}); +testVim('jumpToMark_next_linewise_over', function(cm, vim, helpers) { + cm.setCursor(2, 2); + helpers.doKeys('m', 'a'); + cm.setCursor(3, 4); + helpers.doKeys('m', 'b'); + cm.setCursor(2, 1); + helpers.doKeys(']', '\''); + helpers.assertCursorAt(3, 1); +}); +testVim('jumpToMark_next_action', function(cm, vim, helpers) { + cm.setCursor(2, 2); + helpers.doKeys('m', 't'); + cm.setCursor(0, 0); + helpers.doKeys('d', ']', '`'); + helpers.assertCursorAt(0, 0); + var actual = cm.getLine(0); + var expected = 'pop pop 0 1 2 3 4'; + eq(actual, expected, "Deleting while jumping to the next mark failed."); +}); +testVim('jumpToMark_next_line_action', function(cm, vim, helpers) { + cm.setCursor(2, 2); + helpers.doKeys('m', 't'); + cm.setCursor(0, 0); + helpers.doKeys('d', ']', '\''); + helpers.assertCursorAt(0, 1); + var actual = cm.getLine(0); + var expected = ' (a) [b] {c} ' + eq(actual, expected, "Deleting while jumping to the next mark line failed."); +}); +testVim('jumpToMark_prev', function(cm, vim, helpers) { + cm.setCursor(2, 2); + helpers.doKeys('m', 't'); + cm.setCursor(4, 0); + helpers.doKeys('[', '`'); + helpers.assertCursorAt(2, 2); + cm.setCursor(4, 0); + helpers.doKeys('[', '\''); + helpers.assertCursorAt(2, 0); +}); +testVim('jumpToMark_prev_repeat', function(cm, vim, helpers) { + cm.setCursor(2, 2); + helpers.doKeys('m', 'a'); + cm.setCursor(3, 2); + helpers.doKeys('m', 'b'); + cm.setCursor(4, 2); + helpers.doKeys('m', 'c'); + cm.setCursor(5, 0); + helpers.doKeys('2', '[', '`'); + helpers.assertCursorAt(3, 2); + cm.setCursor(5, 0); + helpers.doKeys('2', '[', '\''); + helpers.assertCursorAt(3, 1); +}); +testVim('jumpToMark_prev_sameline', function(cm, vim, helpers) { + cm.setCursor(2, 0); + helpers.doKeys('m', 'a'); + cm.setCursor(2, 4); + helpers.doKeys('m', 'b'); + cm.setCursor(2, 2); + helpers.doKeys('[', '`'); + helpers.assertCursorAt(2, 0); +}); +testVim('jumpToMark_prev_onlynext', function(cm, vim, helpers) { + cm.setCursor(4, 4); + helpers.doKeys('m', 'a'); + cm.setCursor(2, 0); + helpers.doKeys('[', '`'); + helpers.assertCursorAt(2, 0); +}); +testVim('jumpToMark_prev_nomark', function(cm, vim, helpers) { + cm.setCursor(2, 2); + helpers.doKeys('[', '`'); + helpers.assertCursorAt(2, 2); + helpers.doKeys('[', '\''); + helpers.assertCursorAt(2, 0); +}); +testVim('jumpToMark_prev_linewise_over', function(cm, vim, helpers) { + cm.setCursor(2, 2); + helpers.doKeys('m', 'a'); + cm.setCursor(3, 4); + helpers.doKeys('m', 'b'); + cm.setCursor(3, 6); + helpers.doKeys('[', '\''); + helpers.assertCursorAt(2, 0); +}); +testVim('delmark_single', function(cm, vim, helpers) { + cm.setCursor(1, 2); + helpers.doKeys('m', 't'); + helpers.doEx('delmarks t'); + cm.setCursor(0, 0); + helpers.doKeys('`', 't'); + helpers.assertCursorAt(0, 0); +}); +testVim('delmark_range', function(cm, vim, helpers) { + cm.setCursor(1, 2); + helpers.doKeys('m', 'a'); + cm.setCursor(2, 2); + helpers.doKeys('m', 'b'); + cm.setCursor(3, 2); + helpers.doKeys('m', 'c'); + cm.setCursor(4, 2); + helpers.doKeys('m', 'd'); + cm.setCursor(5, 2); + helpers.doKeys('m', 'e'); + helpers.doEx('delmarks b-d'); + cm.setCursor(0, 0); + helpers.doKeys('`', 'a'); + helpers.assertCursorAt(1, 2); + helpers.doKeys('`', 'b'); + helpers.assertCursorAt(1, 2); + helpers.doKeys('`', 'c'); + helpers.assertCursorAt(1, 2); + helpers.doKeys('`', 'd'); + helpers.assertCursorAt(1, 2); + helpers.doKeys('`', 'e'); + helpers.assertCursorAt(5, 2); +}); +testVim('delmark_multi', function(cm, vim, helpers) { + cm.setCursor(1, 2); + helpers.doKeys('m', 'a'); + cm.setCursor(2, 2); + helpers.doKeys('m', 'b'); + cm.setCursor(3, 2); + helpers.doKeys('m', 'c'); + cm.setCursor(4, 2); + helpers.doKeys('m', 'd'); + cm.setCursor(5, 2); + helpers.doKeys('m', 'e'); + helpers.doEx('delmarks bcd'); + cm.setCursor(0, 0); + helpers.doKeys('`', 'a'); + helpers.assertCursorAt(1, 2); + helpers.doKeys('`', 'b'); + helpers.assertCursorAt(1, 2); + helpers.doKeys('`', 'c'); + helpers.assertCursorAt(1, 2); + helpers.doKeys('`', 'd'); + helpers.assertCursorAt(1, 2); + helpers.doKeys('`', 'e'); + helpers.assertCursorAt(5, 2); +}); +testVim('delmark_multi_space', function(cm, vim, helpers) { + cm.setCursor(1, 2); + helpers.doKeys('m', 'a'); + cm.setCursor(2, 2); + helpers.doKeys('m', 'b'); + cm.setCursor(3, 2); + helpers.doKeys('m', 'c'); + cm.setCursor(4, 2); + helpers.doKeys('m', 'd'); + cm.setCursor(5, 2); + helpers.doKeys('m', 'e'); + helpers.doEx('delmarks b c d'); + cm.setCursor(0, 0); + helpers.doKeys('`', 'a'); + helpers.assertCursorAt(1, 2); + helpers.doKeys('`', 'b'); + helpers.assertCursorAt(1, 2); + helpers.doKeys('`', 'c'); + helpers.assertCursorAt(1, 2); + helpers.doKeys('`', 'd'); + helpers.assertCursorAt(1, 2); + helpers.doKeys('`', 'e'); + helpers.assertCursorAt(5, 2); +}); +testVim('delmark_all', function(cm, vim, helpers) { + cm.setCursor(1, 2); + helpers.doKeys('m', 'a'); + cm.setCursor(2, 2); + helpers.doKeys('m', 'b'); + cm.setCursor(3, 2); + helpers.doKeys('m', 'c'); + cm.setCursor(4, 2); + helpers.doKeys('m', 'd'); + cm.setCursor(5, 2); + helpers.doKeys('m', 'e'); + helpers.doEx('delmarks a b-de'); + cm.setCursor(0, 0); + helpers.doKeys('`', 'a'); + helpers.assertCursorAt(0, 0); + helpers.doKeys('`', 'b'); + helpers.assertCursorAt(0, 0); + helpers.doKeys('`', 'c'); + helpers.assertCursorAt(0, 0); + helpers.doKeys('`', 'd'); + helpers.assertCursorAt(0, 0); + helpers.doKeys('`', 'e'); + helpers.assertCursorAt(0, 0); +}); +testVim('visual', function(cm, vim, helpers) { + helpers.doKeys('l', 'v', 'l', 'l'); + helpers.assertCursorAt(0, 3); + eqPos(makeCursor(0, 1), cm.getCursor('anchor')); + helpers.doKeys('d'); + eq('15', cm.getValue()); +}, { value: '12345' }); +testVim('visual_line', function(cm, vim, helpers) { + helpers.doKeys('l', 'V', 'l', 'j', 'j', 'd'); + eq(' 4\n 5', cm.getValue()); +}, { value: ' 1\n 2\n 3\n 4\n 5' }); +testVim('visual_marks', function(cm, vim, helpers) { + helpers.doKeys('l', 'v', 'l', 'l', 'v'); + // Test visual mode marks + cm.setCursor(0, 0); + helpers.doKeys('\'', '<'); + helpers.assertCursorAt(0, 1); + helpers.doKeys('\'', '>'); + helpers.assertCursorAt(0, 3); +}); +testVim('visual_join', function(cm, vim, helpers) { + helpers.doKeys('l', 'V', 'l', 'j', 'j', 'J'); + eq(' 1 2 3\n 4\n 5', cm.getValue()); +}, { value: ' 1\n 2\n 3\n 4\n 5' }); +testVim('visual_blank', function(cm, vim, helpers) { + helpers.doKeys('v', 'k'); + eq(vim.visualMode, true); +}, { value: '\n' }); +testVim('s_normal', function(cm, vim, helpers) { + cm.setCursor(0, 1); + helpers.doKeys('s'); + helpers.doInsertModeKeys('Esc'); + helpers.assertCursorAt(0, 0); + eq('ac', cm.getValue()); +}, { value: 'abc'}); +testVim('s_visual', function(cm, vim, helpers) { + cm.setCursor(0, 1); + helpers.doKeys('v', 's'); + helpers.doInsertModeKeys('Esc'); + helpers.assertCursorAt(0, 0); + eq('ac', cm.getValue()); +}, { value: 'abc'}); +testVim('S_normal', function(cm, vim, helpers) { + cm.setCursor(0, 1); + helpers.doKeys('j', 'S'); + helpers.doInsertModeKeys('Esc'); + helpers.assertCursorAt(1, 0); + eq('aa\n\ncc', cm.getValue()); +}, { value: 'aa\nbb\ncc'}); +testVim('S_visual', function(cm, vim, helpers) { + cm.setCursor(0, 1); + helpers.doKeys('v', 'j', 'S'); + helpers.doInsertModeKeys('Esc'); + helpers.assertCursorAt(0, 0); + eq('\ncc', cm.getValue()); +}, { value: 'aa\nbb\ncc'}); +testVim('/ and n/N', function(cm, vim, helpers) { + cm.openDialog = helpers.fakeOpenDialog('match'); + helpers.doKeys('/'); + helpers.assertCursorAt(0, 11); + helpers.doKeys('n'); + helpers.assertCursorAt(1, 6); + helpers.doKeys('N'); + helpers.assertCursorAt(0, 11); + + cm.setCursor(0, 0); + helpers.doKeys('2', '/'); + helpers.assertCursorAt(1, 6); +}, { value: 'match nope match \n nope Match' }); +testVim('/_case', function(cm, vim, helpers) { + cm.openDialog = helpers.fakeOpenDialog('Match'); + helpers.doKeys('/'); + helpers.assertCursorAt(1, 6); +}, { value: 'match nope match \n nope Match' }); +testVim('/_nongreedy', function(cm, vim, helpers) { + cm.openDialog = helpers.fakeOpenDialog('aa'); + helpers.doKeys('/'); + helpers.assertCursorAt(0, 4); + helpers.doKeys('n'); + helpers.assertCursorAt(1, 3); + helpers.doKeys('n'); + helpers.assertCursorAt(0, 0); +}, { value: 'aaa aa \n a aa'}); +testVim('?_nongreedy', function(cm, vim, helpers) { + cm.openDialog = helpers.fakeOpenDialog('aa'); + helpers.doKeys('?'); + helpers.assertCursorAt(1, 3); + helpers.doKeys('n'); + helpers.assertCursorAt(0, 4); + helpers.doKeys('n'); + helpers.assertCursorAt(0, 0); +}, { value: 'aaa aa \n a aa'}); +testVim('/_greedy', function(cm, vim, helpers) { + cm.openDialog = helpers.fakeOpenDialog('a+'); + helpers.doKeys('/'); + helpers.assertCursorAt(0, 4); + helpers.doKeys('n'); + helpers.assertCursorAt(1, 1); + helpers.doKeys('n'); + helpers.assertCursorAt(1, 3); + helpers.doKeys('n'); + helpers.assertCursorAt(0, 0); +}, { value: 'aaa aa \n a aa'}); +testVim('?_greedy', function(cm, vim, helpers) { + cm.openDialog = helpers.fakeOpenDialog('a+'); + helpers.doKeys('?'); + helpers.assertCursorAt(1, 3); + helpers.doKeys('n'); + helpers.assertCursorAt(1, 1); + helpers.doKeys('n'); + helpers.assertCursorAt(0, 4); + helpers.doKeys('n'); + helpers.assertCursorAt(0, 0); +}, { value: 'aaa aa \n a aa'}); +testVim('/_greedy_0_or_more', function(cm, vim, helpers) { + cm.openDialog = helpers.fakeOpenDialog('a*'); + helpers.doKeys('/'); + helpers.assertCursorAt(0, 3); + helpers.doKeys('n'); + helpers.assertCursorAt(0, 4); + helpers.doKeys('n'); + helpers.assertCursorAt(0, 5); + helpers.doKeys('n'); + helpers.assertCursorAt(1, 0); + helpers.doKeys('n'); + helpers.assertCursorAt(1, 1); + helpers.doKeys('n'); + helpers.assertCursorAt(0, 0); +}, { value: 'aaa aa\n aa'}); +testVim('?_greedy_0_or_more', function(cm, vim, helpers) { + cm.openDialog = helpers.fakeOpenDialog('a*'); + helpers.doKeys('?'); + helpers.assertCursorAt(1, 1); + helpers.doKeys('n'); + helpers.assertCursorAt(1, 0); + helpers.doKeys('n'); + helpers.assertCursorAt(0, 5); + helpers.doKeys('n'); + helpers.assertCursorAt(0, 4); + helpers.doKeys('n'); + helpers.assertCursorAt(0, 3); + helpers.doKeys('n'); + helpers.assertCursorAt(0, 0); +}, { value: 'aaa aa\n aa'}); +testVim('? and n/N', function(cm, vim, helpers) { + cm.openDialog = helpers.fakeOpenDialog('match'); + helpers.doKeys('?'); + helpers.assertCursorAt(1, 6); + helpers.doKeys('n'); + helpers.assertCursorAt(0, 11); + helpers.doKeys('N'); + helpers.assertCursorAt(1, 6); + + cm.setCursor(0, 0); + helpers.doKeys('2', '?'); + helpers.assertCursorAt(0, 11); +}, { value: 'match nope match \n nope Match' }); +testVim('*', function(cm, vim, helpers) { + cm.setCursor(0, 9); + helpers.doKeys('*'); + helpers.assertCursorAt(0, 22); + + cm.setCursor(0, 9); + helpers.doKeys('2', '*'); + helpers.assertCursorAt(1, 8); +}, { value: 'nomatch match nomatch match \nnomatch Match' }); +testVim('*_no_word', function(cm, vim, helpers) { + cm.setCursor(0, 0); + helpers.doKeys('*'); + helpers.assertCursorAt(0, 0); +}, { value: ' \n match \n' }); +testVim('*_symbol', function(cm, vim, helpers) { + cm.setCursor(0, 0); + helpers.doKeys('*'); + helpers.assertCursorAt(1, 0); +}, { value: ' /}\n/} match \n' }); +testVim('#', function(cm, vim, helpers) { + cm.setCursor(0, 9); + helpers.doKeys('#'); + helpers.assertCursorAt(1, 8); + + cm.setCursor(0, 9); + helpers.doKeys('2', '#'); + helpers.assertCursorAt(0, 22); +}, { value: 'nomatch match nomatch match \nnomatch Match' }); +testVim('*_seek', function(cm, vim, helpers) { + // Should skip over space and symbols. + cm.setCursor(0, 3); + helpers.doKeys('*'); + helpers.assertCursorAt(0, 22); +}, { value: ' := match nomatch match \nnomatch Match' }); +testVim('#', function(cm, vim, helpers) { + // Should skip over space and symbols. + cm.setCursor(0, 3); + helpers.doKeys('#'); + helpers.assertCursorAt(1, 8); +}, { value: ' := match nomatch match \nnomatch Match' }); +testVim('.', function(cm, vim, helpers) { + cm.setCursor(0, 0); + helpers.doKeys('2', 'd', 'w'); + helpers.doKeys('.'); + eq('5 6', cm.getValue()); +}, { value: '1 2 3 4 5 6'}); +testVim('._repeat', function(cm, vim, helpers) { + cm.setCursor(0, 0); + helpers.doKeys('2', 'd', 'w'); + helpers.doKeys('3', '.'); + eq('6', cm.getValue()); +}, { value: '1 2 3 4 5 6'}); +testVim('._insert', function(cm, vim, helpers) { + helpers.doKeys('i'); + cm.replaceRange('test', cm.getCursor()); + helpers.doInsertModeKeys('Esc'); + helpers.doKeys('.'); + eq('testestt', cm.getValue()); + helpers.assertCursorAt(0, 6); +}, { value: ''}); +testVim('._insert_repeat', function(cm, vim, helpers) { + helpers.doKeys('i'); + cm.replaceRange('test', cm.getCursor()); + cm.setCursor(0, 4); + helpers.doInsertModeKeys('Esc'); + helpers.doKeys('2', '.'); + eq('testesttestt', cm.getValue()); + helpers.assertCursorAt(0, 10); +}, { value: ''}); +testVim('._repeat_insert', function(cm, vim, helpers) { + helpers.doKeys('3', 'i'); + cm.replaceRange('te', cm.getCursor()); + cm.setCursor(0, 2); + helpers.doInsertModeKeys('Esc'); + helpers.doKeys('.'); + eq('tetettetetee', cm.getValue()); + helpers.assertCursorAt(0, 10); +}, { value: ''}); +testVim('._insert_o', function(cm, vim, helpers) { + helpers.doKeys('o'); + cm.replaceRange('z', cm.getCursor()); + cm.setCursor(1, 1); + helpers.doInsertModeKeys('Esc'); + helpers.doKeys('.'); + eq('\nz\nz', cm.getValue()); + helpers.assertCursorAt(2, 0); +}, { value: ''}); +testVim('._insert_o_repeat', function(cm, vim, helpers) { + helpers.doKeys('o'); + cm.replaceRange('z', cm.getCursor()); + helpers.doInsertModeKeys('Esc'); + cm.setCursor(1, 0); + helpers.doKeys('2', '.'); + eq('\nz\nz\nz', cm.getValue()); + helpers.assertCursorAt(3, 0); +}, { value: ''}); +testVim('._insert_o_indent', function(cm, vim, helpers) { + helpers.doKeys('o'); + cm.replaceRange('z', cm.getCursor()); + helpers.doInsertModeKeys('Esc'); + cm.setCursor(1, 2); + helpers.doKeys('.'); + eq('{\n z\n z', cm.getValue()); + helpers.assertCursorAt(2, 2); +}, { value: '{'}); +testVim('._insert_cw', function(cm, vim, helpers) { + helpers.doKeys('c', 'w'); + cm.replaceRange('test', cm.getCursor()); + helpers.doInsertModeKeys('Esc'); + cm.setCursor(0, 3); + helpers.doKeys('2', 'l'); + helpers.doKeys('.'); + eq('test test word3', cm.getValue()); + helpers.assertCursorAt(0, 8); +}, { value: 'word1 word2 word3' }); +testVim('._insert_cw_repeat', function(cm, vim, helpers) { + // For some reason, repeat cw in desktop VIM will does not repeat insert mode + // changes. Will conform to that behavior. + helpers.doKeys('c', 'w'); + cm.replaceRange('test', cm.getCursor()); + helpers.doInsertModeKeys('Esc'); + cm.setCursor(0, 4); + helpers.doKeys('l'); + helpers.doKeys('2', '.'); + eq('test test', cm.getValue()); + helpers.assertCursorAt(0, 8); +}, { value: 'word1 word2 word3' }); +testVim('._delete', function(cm, vim, helpers) { + cm.setCursor(0, 5); + helpers.doKeys('i'); + helpers.doInsertModeKeys('Backspace', 'Esc'); + helpers.doKeys('.'); + eq('zace', cm.getValue()); + helpers.assertCursorAt(0, 1); +}, { value: 'zabcde'}); +testVim('._delete_repeat', function(cm, vim, helpers) { + cm.setCursor(0, 6); + helpers.doKeys('i'); + helpers.doInsertModeKeys('Backspace', 'Esc'); + helpers.doKeys('2', '.'); + eq('zzce', cm.getValue()); + helpers.assertCursorAt(0, 1); +}, { value: 'zzabcde'}); +testVim('f;', function(cm, vim, helpers) { + cm.setCursor(0, 0); + helpers.doKeys('f', 'x'); + helpers.doKeys(';'); + helpers.doKeys('2', ';'); + eq(9, cm.getCursor().ch); +}, { value: '01x3xx678x'}); +testVim('F;', function(cm, vim, helpers) { + cm.setCursor(0, 8); + helpers.doKeys('F', 'x'); + helpers.doKeys(';'); + helpers.doKeys('2', ';'); + eq(2, cm.getCursor().ch); +}, { value: '01x3xx6x8x'}); +testVim('t;', function(cm, vim, helpers) { + cm.setCursor(0, 0); + helpers.doKeys('t', 'x'); + helpers.doKeys(';'); + helpers.doKeys('2', ';'); + eq(8, cm.getCursor().ch); +}, { value: '01x3xx678x'}); +testVim('T;', function(cm, vim, helpers) { + cm.setCursor(0, 9); + helpers.doKeys('T', 'x'); + helpers.doKeys(';'); + helpers.doKeys('2', ';'); + eq(2, cm.getCursor().ch); +}, { value: '0xx3xx678x'}); +testVim('f,', function(cm, vim, helpers) { + cm.setCursor(0, 6); + helpers.doKeys('f', 'x'); + helpers.doKeys(','); + helpers.doKeys('2', ','); + eq(2, cm.getCursor().ch); +}, { value: '01x3xx678x'}); +testVim('F,', function(cm, vim, helpers) { + cm.setCursor(0, 3); + helpers.doKeys('F', 'x'); + helpers.doKeys(','); + helpers.doKeys('2', ','); + eq(9, cm.getCursor().ch); +}, { value: '01x3xx678x'}); +testVim('t,', function(cm, vim, helpers) { + cm.setCursor(0, 6); + helpers.doKeys('t', 'x'); + helpers.doKeys(','); + helpers.doKeys('2', ','); + eq(3, cm.getCursor().ch); +}, { value: '01x3xx678x'}); +testVim('T,', function(cm, vim, helpers) { + cm.setCursor(0, 4); + helpers.doKeys('T', 'x'); + helpers.doKeys(','); + helpers.doKeys('2', ','); + eq(8, cm.getCursor().ch); +}, { value: '01x3xx67xx'}); +testVim('fd,;', function(cm, vim, helpers) { + cm.setCursor(0, 0); + helpers.doKeys('f', '4'); + cm.setCursor(0, 0); + helpers.doKeys('d', ';'); + eq('56789', cm.getValue()); + helpers.doKeys('u'); + cm.setCursor(0, 9); + helpers.doKeys('d', ','); + eq('01239', cm.getValue()); +}, { value: '0123456789'}); +testVim('Fd,;', function(cm, vim, helpers) { + cm.setCursor(0, 9); + helpers.doKeys('F', '4'); + cm.setCursor(0, 9); + helpers.doKeys('d', ';'); + eq('01239', cm.getValue()); + helpers.doKeys('u'); + cm.setCursor(0, 0); + helpers.doKeys('d', ','); + eq('56789', cm.getValue()); +}, { value: '0123456789'}); +testVim('td,;', function(cm, vim, helpers) { + cm.setCursor(0, 0); + helpers.doKeys('t', '4'); + cm.setCursor(0, 0); + helpers.doKeys('d', ';'); + eq('456789', cm.getValue()); + helpers.doKeys('u'); + cm.setCursor(0, 9); + helpers.doKeys('d', ','); + eq('012349', cm.getValue()); +}, { value: '0123456789'}); +testVim('Td,;', function(cm, vim, helpers) { + cm.setCursor(0, 9); + helpers.doKeys('T', '4'); + cm.setCursor(0, 9); + helpers.doKeys('d', ';'); + eq('012349', cm.getValue()); + helpers.doKeys('u'); + cm.setCursor(0, 0); + helpers.doKeys('d', ','); + eq('456789', cm.getValue()); +}, { value: '0123456789'}); +testVim('fc,;', function(cm, vim, helpers) { + cm.setCursor(0, 0); + helpers.doKeys('f', '4'); + cm.setCursor(0, 0); + helpers.doKeys('c', ';', 'Esc'); + eq('56789', cm.getValue()); + helpers.doKeys('u'); + cm.setCursor(0, 9); + helpers.doKeys('c', ','); + eq('01239', cm.getValue()); +}, { value: '0123456789'}); +testVim('Fc,;', function(cm, vim, helpers) { + cm.setCursor(0, 9); + helpers.doKeys('F', '4'); + cm.setCursor(0, 9); + helpers.doKeys('c', ';', 'Esc'); + eq('01239', cm.getValue()); + helpers.doKeys('u'); + cm.setCursor(0, 0); + helpers.doKeys('c', ','); + eq('56789', cm.getValue()); +}, { value: '0123456789'}); +testVim('tc,;', function(cm, vim, helpers) { + cm.setCursor(0, 0); + helpers.doKeys('t', '4'); + cm.setCursor(0, 0); + helpers.doKeys('c', ';', 'Esc'); + eq('456789', cm.getValue()); + helpers.doKeys('u'); + cm.setCursor(0, 9); + helpers.doKeys('c', ','); + eq('012349', cm.getValue()); +}, { value: '0123456789'}); +testVim('Tc,;', function(cm, vim, helpers) { + cm.setCursor(0, 9); + helpers.doKeys('T', '4'); + cm.setCursor(0, 9); + helpers.doKeys('c', ';', 'Esc'); + eq('012349', cm.getValue()); + helpers.doKeys('u'); + cm.setCursor(0, 0); + helpers.doKeys('c', ','); + eq('456789', cm.getValue()); +}, { value: '0123456789'}); +testVim('fy,;', function(cm, vim, helpers) { + cm.setCursor(0, 0); + helpers.doKeys('f', '4'); + cm.setCursor(0, 0); + helpers.doKeys('y', ';', 'P'); + eq('012340123456789', cm.getValue()); + helpers.doKeys('u'); + cm.setCursor(0, 9); + helpers.doKeys('y', ',', 'P'); + eq('012345678456789', cm.getValue()); +}, { value: '0123456789'}); +testVim('Fy,;', function(cm, vim, helpers) { + cm.setCursor(0, 9); + helpers.doKeys('F', '4'); + cm.setCursor(0, 9); + helpers.doKeys('y', ';', 'p'); + eq('012345678945678', cm.getValue()); + helpers.doKeys('u'); + cm.setCursor(0, 0); + helpers.doKeys('y', ',', 'P'); + eq('012340123456789', cm.getValue()); +}, { value: '0123456789'}); +testVim('ty,;', function(cm, vim, helpers) { + cm.setCursor(0, 0); + helpers.doKeys('t', '4'); + cm.setCursor(0, 0); + helpers.doKeys('y', ';', 'P'); + eq('01230123456789', cm.getValue()); + helpers.doKeys('u'); + cm.setCursor(0, 9); + helpers.doKeys('y', ',', 'p'); + eq('01234567895678', cm.getValue()); +}, { value: '0123456789'}); +testVim('Ty,;', function(cm, vim, helpers) { + cm.setCursor(0, 9); + helpers.doKeys('T', '4'); + cm.setCursor(0, 9); + helpers.doKeys('y', ';', 'p'); + eq('01234567895678', cm.getValue()); + helpers.doKeys('u'); + cm.setCursor(0, 0); + helpers.doKeys('y', ',', 'P'); + eq('01230123456789', cm.getValue()); +}, { value: '0123456789'}); +testVim('HML', function(cm, vim, helpers) { + var lines = 35; + var textHeight = cm.defaultTextHeight(); + cm.setSize(600, lines*textHeight); + cm.setCursor(120, 0); + helpers.doKeys('H'); + helpers.assertCursorAt(86, 2); + helpers.doKeys('L'); + helpers.assertCursorAt(120, 4); + helpers.doKeys('M'); + helpers.assertCursorAt(103,4); +}, { value: (function(){ + var lines = new Array(100); + var upper = ' xx\n'; + var lower = ' xx\n'; + upper = lines.join(upper); + lower = lines.join(lower); + return upper + lower; +})()}); + +var zVals = ['zb','zz','zt','z-','z.','z'].map(function(e, idx){ + var lineNum = 250; + var lines = 35; + testVim(e, function(cm, vim, helpers) { + var k1 = e[0]; + var k2 = e.substring(1); + var textHeight = cm.defaultTextHeight(); + cm.setSize(600, lines*textHeight); + cm.setCursor(lineNum, 0); + helpers.doKeys(k1, k2); + zVals[idx] = cm.getScrollInfo().top; + }, { value: (function(){ + return new Array(500).join('\n'); + })()}); +}); +testVim('zb', function(cm, vim, helpers){ + eq(zVals[2], zVals[5]); +}); + +var squareBracketMotionSandbox = ''+ + '({\n'+//0 + ' ({\n'+//11 + ' /*comment {\n'+//2 + ' */(\n'+//3 + '#else \n'+//4 + ' /* )\n'+//5 + '#if }\n'+//6 + ' )}*/\n'+//7 + ')}\n'+//8 + '{}\n'+//9 + '#else {{\n'+//10 + '{}\n'+//11 + '}\n'+//12 + '{\n'+//13 + '#endif\n'+//14 + '}\n'+//15 + '}\n'+//16 + '#else';//17 +testVim('[[, ]]', function(cm, vim, helpers) { + cm.setCursor(0, 0); + helpers.doKeys(']', ']'); + helpers.assertCursorAt(9,0); + helpers.doKeys('2', ']', ']'); + helpers.assertCursorAt(13,0); + helpers.doKeys(']', ']'); + helpers.assertCursorAt(17,0); + helpers.doKeys('[', '['); + helpers.assertCursorAt(13,0); + helpers.doKeys('2', '[', '['); + helpers.assertCursorAt(9,0); + helpers.doKeys('[', '['); + helpers.assertCursorAt(0,0); +}, { value: squareBracketMotionSandbox}); +testVim('[], ][', function(cm, vim, helpers) { + cm.setCursor(0, 0); + helpers.doKeys(']', '['); + helpers.assertCursorAt(12,0); + helpers.doKeys('2', ']', '['); + helpers.assertCursorAt(16,0); + helpers.doKeys(']', '['); + helpers.assertCursorAt(17,0); + helpers.doKeys('[', ']'); + helpers.assertCursorAt(16,0); + helpers.doKeys('2', '[', ']'); + helpers.assertCursorAt(12,0); + helpers.doKeys('[', ']'); + helpers.assertCursorAt(0,0); +}, { value: squareBracketMotionSandbox}); +testVim('[{, ]}', function(cm, vim, helpers) { + cm.setCursor(4, 10); + helpers.doKeys('[', '{'); + helpers.assertCursorAt(2,12); + helpers.doKeys('2', '[', '{'); + helpers.assertCursorAt(0,1); + cm.setCursor(4, 10); + helpers.doKeys(']', '}'); + helpers.assertCursorAt(6,11); + helpers.doKeys('2', ']', '}'); + helpers.assertCursorAt(8,1); + cm.setCursor(0,1); + helpers.doKeys(']', '}'); + helpers.assertCursorAt(8,1); + helpers.doKeys('[', '{'); + helpers.assertCursorAt(0,1); +}, { value: squareBracketMotionSandbox}); +testVim('[(, ])', function(cm, vim, helpers) { + cm.setCursor(4, 10); + helpers.doKeys('[', '('); + helpers.assertCursorAt(3,14); + helpers.doKeys('2', '[', '('); + helpers.assertCursorAt(0,0); + cm.setCursor(4, 10); + helpers.doKeys(']', ')'); + helpers.assertCursorAt(5,11); + helpers.doKeys('2', ']', ')'); + helpers.assertCursorAt(8,0); + helpers.doKeys('[', '('); + helpers.assertCursorAt(0,0); + helpers.doKeys(']', ')'); + helpers.assertCursorAt(8,0); +}, { value: squareBracketMotionSandbox}); +testVim('[*, ]*, [/, ]/', function(cm, vim, helpers) { + ['*', '/'].forEach(function(key){ + cm.setCursor(7, 0); + helpers.doKeys('2', '[', key); + helpers.assertCursorAt(2,2); + helpers.doKeys('2', ']', key); + helpers.assertCursorAt(7,5); + }); +}, { value: squareBracketMotionSandbox}); +testVim('[#, ]#', function(cm, vim, helpers) { + cm.setCursor(10, 3); + helpers.doKeys('2', '[', '#'); + helpers.assertCursorAt(4,0); + helpers.doKeys('5', ']', '#'); + helpers.assertCursorAt(17,0); + cm.setCursor(10, 3); + helpers.doKeys(']', '#'); + helpers.assertCursorAt(14,0); +}, { value: squareBracketMotionSandbox}); +testVim('[m, ]m, [M, ]M', function(cm, vim, helpers) { + cm.setCursor(11, 0); + helpers.doKeys('[', 'm'); + helpers.assertCursorAt(10,7); + helpers.doKeys('4', '[', 'm'); + helpers.assertCursorAt(1,3); + helpers.doKeys('5', ']', 'm'); + helpers.assertCursorAt(11,0); + helpers.doKeys('[', 'M'); + helpers.assertCursorAt(9,1); + helpers.doKeys('3', ']', 'M'); + helpers.assertCursorAt(15,0); + helpers.doKeys('5', '[', 'M'); + helpers.assertCursorAt(7,3); +}, { value: squareBracketMotionSandbox}); + +// Ex mode tests +testVim('ex_go_to_line', function(cm, vim, helpers) { + cm.setCursor(0, 0); + helpers.doEx('4'); + helpers.assertCursorAt(3, 0); +}, { value: 'a\nb\nc\nd\ne\n'}); +testVim('ex_write', function(cm, vim, helpers) { + var tmp = CodeMirror.commands.save; + var written; + var actualCm; + CodeMirror.commands.save = function(cm) { + written = true; + actualCm = cm; + }; + // Test that w, wr, wri ... write all trigger :write. + var command = 'write'; + for (var i = 1; i < command.length; i++) { + written = false; + actualCm = null; + helpers.doEx(command.substring(0, i)); + eq(written, true); + eq(actualCm, cm); + } + CodeMirror.commands.save = tmp; +}); +testVim('ex_sort', function(cm, vim, helpers) { + helpers.doEx('sort'); + eq('Z\na\nb\nc\nd', cm.getValue()); +}, { value: 'b\nZ\nd\nc\na'}); +testVim('ex_sort_reverse', function(cm, vim, helpers) { + helpers.doEx('sort!'); + eq('d\nc\nb\na', cm.getValue()); +}, { value: 'b\nd\nc\na'}); +testVim('ex_sort_range', function(cm, vim, helpers) { + helpers.doEx('2,3sort'); + eq('b\nc\nd\na', cm.getValue()); +}, { value: 'b\nd\nc\na'}); +testVim('ex_sort_oneline', function(cm, vim, helpers) { + helpers.doEx('2sort'); + // Expect no change. + eq('b\nd\nc\na', cm.getValue()); +}, { value: 'b\nd\nc\na'}); +testVim('ex_sort_ignoreCase', function(cm, vim, helpers) { + helpers.doEx('sort i'); + eq('a\nb\nc\nd\nZ', cm.getValue()); +}, { value: 'b\nZ\nd\nc\na'}); +testVim('ex_sort_unique', function(cm, vim, helpers) { + helpers.doEx('sort u'); + eq('Z\na\nb\nc\nd', cm.getValue()); +}, { value: 'b\nZ\na\na\nd\na\nc\na'}); +testVim('ex_sort_decimal', function(cm, vim, helpers) { + helpers.doEx('sort d'); + eq('d3\n s5\n6\n.9', cm.getValue()); +}, { value: '6\nd3\n s5\n.9'}); +testVim('ex_sort_decimal_negative', function(cm, vim, helpers) { + helpers.doEx('sort d'); + eq('z-9\nd3\n s5\n6\n.9', cm.getValue()); +}, { value: '6\nd3\n s5\n.9\nz-9'}); +testVim('ex_sort_decimal_reverse', function(cm, vim, helpers) { + helpers.doEx('sort! d'); + eq('.9\n6\n s5\nd3', cm.getValue()); +}, { value: '6\nd3\n s5\n.9'}); +testVim('ex_sort_hex', function(cm, vim, helpers) { + helpers.doEx('sort x'); + eq(' s5\n6\n.9\n&0xB\nd3', cm.getValue()); +}, { value: '6\nd3\n s5\n&0xB\n.9'}); +testVim('ex_sort_octal', function(cm, vim, helpers) { + helpers.doEx('sort o'); + eq('.8\n.9\nd3\n s5\n6', cm.getValue()); +}, { value: '6\nd3\n s5\n.9\n.8'}); +testVim('ex_sort_decimal_mixed', function(cm, vim, helpers) { + helpers.doEx('sort d'); + eq('y\nz\nc1\nb2\na3', cm.getValue()); +}, { value: 'a3\nz\nc1\ny\nb2'}); +testVim('ex_sort_decimal_mixed_reverse', function(cm, vim, helpers) { + helpers.doEx('sort! d'); + eq('a3\nb2\nc1\nz\ny', cm.getValue()); +}, { value: 'a3\nz\nc1\ny\nb2'}); +testVim('ex_substitute_same_line', function(cm, vim, helpers) { + cm.setCursor(1, 0); + helpers.doEx('s/one/two'); + eq('one one\n two two', cm.getValue()); +}, { value: 'one one\n one one'}); +testVim('ex_substitute_global', function(cm, vim, helpers) { + cm.setCursor(1, 0); + helpers.doEx('%s/one/two'); + eq('two two\n two two', cm.getValue()); +}, { value: 'one one\n one one'}); +testVim('ex_substitute_input_range', function(cm, vim, helpers) { + cm.setCursor(1, 0); + helpers.doEx('1,3s/\\d/0'); + eq('0\n0\n0\n4', cm.getValue()); +}, { value: '1\n2\n3\n4' }); +testVim('ex_substitute_visual_range', function(cm, vim, helpers) { + cm.setCursor(1, 0); + // Set last visual mode selection marks '< and '> at lines 2 and 4 + helpers.doKeys('V', '2', 'j', 'v'); + helpers.doEx('\'<,\'>s/\\d/0'); + eq('1\n0\n0\n0\n5', cm.getValue()); +}, { value: '1\n2\n3\n4\n5' }); +testVim('ex_substitute_capture', function(cm, vim, helpers) { + cm.setCursor(1, 0); + helpers.doEx('s/(\\d+)/$1$1/') + eq('a1111 a1212 a1313', cm.getValue()); +}, { value: 'a11 a12 a13' }); +testVim('ex_substitute_empty_query', function(cm, vim, helpers) { + // If the query is empty, use last query. + cm.setCursor(1, 0); + cm.openDialog = helpers.fakeOpenDialog('1'); + helpers.doKeys('/'); + helpers.doEx('s//b'); + eq('abb ab2 ab3', cm.getValue()); +}, { value: 'a11 a12 a13' }); +testVim('ex_substitute_count', function(cm, vim, helpers) { + cm.setCursor(1, 0); + helpers.doEx('s/\\d/0/i 2'); + eq('1\n0\n0\n4', cm.getValue()); +}, { value: '1\n2\n3\n4' }); +testVim('ex_substitute_count_with_range', function(cm, vim, helpers) { + cm.setCursor(1, 0); + helpers.doEx('1,3s/\\d/0/ 3'); + eq('1\n2\n0\n0', cm.getValue()); +}, { value: '1\n2\n3\n4' }); +function testSubstituteConfirm(name, command, initialValue, expectedValue, keys, finalPos) { + testVim(name, function(cm, vim, helpers) { + var savedOpenDialog = cm.openDialog; + var savedKeyName = CodeMirror.keyName; + var onKeyDown; + var recordedCallback; + var closed = true; // Start out closed, set false on second openDialog. + function close() { + closed = true; + } + // First openDialog should save callback. + cm.openDialog = function(template, callback, options) { + recordedCallback = callback; + } + // Do first openDialog. + helpers.doKeys(':'); + // Second openDialog should save keyDown handler. + cm.openDialog = function(template, callback, options) { + onKeyDown = options.onKeyDown; + closed = false; + }; + // Return the command to Vim and trigger second openDialog. + recordedCallback(command); + // The event should really use keyCode, but here just mock it out and use + // key and replace keyName to just return key. + CodeMirror.keyName = function (e) { return e.key; } + keys = keys.toUpperCase(); + for (var i = 0; i < keys.length; i++) { + is(!closed); + onKeyDown({ key: keys.charAt(i) }, '', close); + } + try { + eq(expectedValue, cm.getValue()); + helpers.assertCursorAt(finalPos); + is(closed); + } catch(e) { + throw e + } finally { + // Restore overriden functions. + CodeMirror.keyName = savedKeyName; + cm.openDialog = savedOpenDialog; + } + }, { value: initialValue }); +}; +testSubstituteConfirm('ex_substitute_confirm_emptydoc', + '%s/x/b/c', '', '', '', makeCursor(0, 0)); +testSubstituteConfirm('ex_substitute_confirm_nomatch', + '%s/x/b/c', 'ba a\nbab', 'ba a\nbab', '', makeCursor(0, 0)); +testSubstituteConfirm('ex_substitute_confirm_accept', + '%s/a/b/c', 'ba a\nbab', 'bb b\nbbb', 'yyy', makeCursor(1, 1)); +testSubstituteConfirm('ex_substitute_confirm_random_keys', + '%s/a/b/c', 'ba a\nbab', 'bb b\nbbb', 'ysdkywerty', makeCursor(1, 1)); +testSubstituteConfirm('ex_substitute_confirm_some', + '%s/a/b/c', 'ba a\nbab', 'bb a\nbbb', 'yny', makeCursor(1, 1)); +testSubstituteConfirm('ex_substitute_confirm_all', + '%s/a/b/c', 'ba a\nbab', 'bb b\nbbb', 'a', makeCursor(1, 1)); +testSubstituteConfirm('ex_substitute_confirm_accept_then_all', + '%s/a/b/c', 'ba a\nbab', 'bb b\nbbb', 'ya', makeCursor(1, 1)); +testSubstituteConfirm('ex_substitute_confirm_quit', + '%s/a/b/c', 'ba a\nbab', 'bb a\nbab', 'yq', makeCursor(0, 3)); +testSubstituteConfirm('ex_substitute_confirm_last', + '%s/a/b/c', 'ba a\nbab', 'bb b\nbab', 'yl', makeCursor(0, 3)); +testSubstituteConfirm('ex_substitute_confirm_oneline', + '1s/a/b/c', 'ba a\nbab', 'bb b\nbab', 'yl', makeCursor(0, 3)); +testSubstituteConfirm('ex_substitute_confirm_range_accept', + '1,2s/a/b/c', 'aa\na \na\na', 'bb\nb \na\na', 'yyy', makeCursor(1, 0)); +testSubstituteConfirm('ex_substitute_confirm_range_some', + '1,3s/a/b/c', 'aa\na \na\na', 'ba\nb \nb\na', 'ynyy', makeCursor(2, 0)); +testSubstituteConfirm('ex_substitute_confirm_range_all', + '1,3s/a/b/c', 'aa\na \na\na', 'bb\nb \nb\na', 'a', makeCursor(2, 0)); +testSubstituteConfirm('ex_substitute_confirm_range_last', + '1,3s/a/b/c', 'aa\na \na\na', 'bb\nb \na\na', 'yyl', makeCursor(1, 0)); +//:noh should clear highlighting of search-results but allow to resume search through n +testVim('ex_noh_clearSearchHighlight', function(cm, vim, helpers) { + cm.openDialog = helpers.fakeOpenDialog('match'); + helpers.doKeys('?'); + helpers.doEx('noh'); + eq(vim.searchState_.getOverlay(),null,'match-highlighting wasn\'t cleared'); + helpers.doKeys('n'); + helpers.assertCursorAt(0, 11,'can\'t resume search after clearing highlighting'); +}, { value: 'match nope match \n nope Match' }); +// TODO: Reset key maps after each test. +testVim('ex_map_key2key', function(cm, vim, helpers) { + helpers.doEx('map a x'); + helpers.doKeys('a'); + helpers.assertCursorAt(0, 0); + eq('bc', cm.getValue()); +}, { value: 'abc' }); +testVim('ex_map_key2key_to_colon', function(cm, vim, helpers) { + helpers.doEx('map ; :'); + var dialogOpened = false; + cm.openDialog = function() { + dialogOpened = true; + } + helpers.doKeys(';'); + eq(dialogOpened, true); +}); +testVim('ex_map_ex2key:', function(cm, vim, helpers) { + helpers.doEx('map :del x'); + helpers.doEx('del'); + helpers.assertCursorAt(0, 0); + eq('bc', cm.getValue()); +}, { value: 'abc' }); +testVim('ex_map_ex2ex', function(cm, vim, helpers) { + helpers.doEx('map :del :w'); + var tmp = CodeMirror.commands.save; + var written = false; + var actualCm; + CodeMirror.commands.save = function(cm) { + written = true; + actualCm = cm; + }; + helpers.doEx('del'); + CodeMirror.commands.save = tmp; + eq(written, true); + eq(actualCm, cm); +}); +testVim('ex_map_key2ex', function(cm, vim, helpers) { + helpers.doEx('map a :w'); + var tmp = CodeMirror.commands.save; + var written = false; + var actualCm; + CodeMirror.commands.save = function(cm) { + written = true; + actualCm = cm; + }; + helpers.doKeys('a'); + CodeMirror.commands.save = tmp; + eq(written, true); + eq(actualCm, cm); +}); +// Testing registration of functions as ex-commands and mapping to -keys +testVim('ex_api_test', function(cm, vim, helpers) { + var res=false; + var val='from'; + CodeMirror.Vim.defineEx('extest','ext',function(cm,params){ + if(params.args)val=params.args[0]; + else res=true; + }); + helpers.doEx(':ext to'); + eq(val,'to','Defining ex-command failed'); + CodeMirror.Vim.map('',':ext'); + helpers.doKeys('',''); + is(res,'Mapping to key failed'); +}); +// For now, this test needs to be last because it messes up : for future tests. +testVim('ex_map_key2key_from_colon', function(cm, vim, helpers) { + helpers.doEx('map : x'); + helpers.doKeys(':'); + helpers.assertCursorAt(0, 0); + eq('bc', cm.getValue()); +}, { value: 'abc' }); diff --git a/pitfall/pdfkit/node_modules/codemirror/theme/3024-day.css b/pitfall/pdfkit/node_modules/codemirror/theme/3024-day.css new file mode 100644 index 00000000..cbb9a4fa --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/theme/3024-day.css @@ -0,0 +1,34 @@ +/* + + Name: 3024 day + Author: Jan T. Sott (http://github.com/idleberg) + + CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror) + Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) + +*/ + +.cm-s-3024-day.CodeMirror {background: #f7f7f7; color: #3a3432;} +.cm-s-3024-day div.CodeMirror-selected {background: #d6d5d4 !important;} +.cm-s-3024-day .CodeMirror-gutters {background: #f7f7f7; border-right: 0px;} +.cm-s-3024-day .CodeMirror-linenumber {color: #807d7c;} +.cm-s-3024-day .CodeMirror-cursor {border-left: 1px solid #5c5855 !important;} + +.cm-s-3024-day span.cm-comment {color: #cdab53;} +.cm-s-3024-day span.cm-atom {color: #a16a94;} +.cm-s-3024-day span.cm-number {color: #a16a94;} + +.cm-s-3024-day span.cm-property, .cm-s-3024-day span.cm-attribute {color: #01a252;} +.cm-s-3024-day span.cm-keyword {color: #db2d20;} +.cm-s-3024-day span.cm-string {color: #fded02;} + +.cm-s-3024-day span.cm-variable {color: #01a252;} +.cm-s-3024-day span.cm-variable-2 {color: #01a0e4;} +.cm-s-3024-day span.cm-def {color: #e8bbd0;} +.cm-s-3024-day span.cm-bracket {color: #3a3432;} +.cm-s-3024-day span.cm-tag {color: #db2d20;} +.cm-s-3024-day span.cm-link {color: #a16a94;} +.cm-s-3024-day span.cm-error {background: #db2d20; color: #5c5855;} + +.cm-s-3024-day .CodeMirror-activeline-background {background: #e8f2ff !important;} +.cm-s-3024-day .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} diff --git a/pitfall/pdfkit/node_modules/codemirror/theme/3024-night.css b/pitfall/pdfkit/node_modules/codemirror/theme/3024-night.css new file mode 100644 index 00000000..2c62e221 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/theme/3024-night.css @@ -0,0 +1,34 @@ +/* + + Name: 3024 night + Author: Jan T. Sott (http://github.com/idleberg) + + CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror) + Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) + +*/ + +.cm-s-3024-night.CodeMirror {background: #090300; color: #d6d5d4;} +.cm-s-3024-night div.CodeMirror-selected {background: #3a3432 !important;} +.cm-s-3024-night .CodeMirror-gutters {background: #090300; border-right: 0px;} +.cm-s-3024-night .CodeMirror-linenumber {color: #5c5855;} +.cm-s-3024-night .CodeMirror-cursor {border-left: 1px solid #807d7c !important;} + +.cm-s-3024-night span.cm-comment {color: #cdab53;} +.cm-s-3024-night span.cm-atom {color: #a16a94;} +.cm-s-3024-night span.cm-number {color: #a16a94;} + +.cm-s-3024-night span.cm-property, .cm-s-3024-night span.cm-attribute {color: #01a252;} +.cm-s-3024-night span.cm-keyword {color: #db2d20;} +.cm-s-3024-night span.cm-string {color: #fded02;} + +.cm-s-3024-night span.cm-variable {color: #01a252;} +.cm-s-3024-night span.cm-variable-2 {color: #01a0e4;} +.cm-s-3024-night span.cm-def {color: #e8bbd0;} +.cm-s-3024-night span.cm-bracket {color: #d6d5d4;} +.cm-s-3024-night span.cm-tag {color: #db2d20;} +.cm-s-3024-night span.cm-link {color: #a16a94;} +.cm-s-3024-night span.cm-error {background: #db2d20; color: #807d7c;} + +.cm-s-3024-night .CodeMirror-activeline-background {background: #2F2F2F !important;} +.cm-s-3024-night .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} diff --git a/pitfall/pdfkit/node_modules/codemirror/theme/ambiance-mobile.css b/pitfall/pdfkit/node_modules/codemirror/theme/ambiance-mobile.css new file mode 100644 index 00000000..88d332e1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/theme/ambiance-mobile.css @@ -0,0 +1,5 @@ +.cm-s-ambiance.CodeMirror { + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} diff --git a/pitfall/pdfkit/node_modules/codemirror/theme/ambiance.css b/pitfall/pdfkit/node_modules/codemirror/theme/ambiance.css new file mode 100644 index 00000000..3a54b2a0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/theme/ambiance.css @@ -0,0 +1,75 @@ +/* ambiance theme for codemirror */ + +/* Color scheme */ + +.cm-s-ambiance .cm-keyword { color: #cda869; } +.cm-s-ambiance .cm-atom { color: #CF7EA9; } +.cm-s-ambiance .cm-number { color: #78CF8A; } +.cm-s-ambiance .cm-def { color: #aac6e3; } +.cm-s-ambiance .cm-variable { color: #ffb795; } +.cm-s-ambiance .cm-variable-2 { color: #eed1b3; } +.cm-s-ambiance .cm-variable-3 { color: #faded3; } +.cm-s-ambiance .cm-property { color: #eed1b3; } +.cm-s-ambiance .cm-operator {color: #fa8d6a;} +.cm-s-ambiance .cm-comment { color: #555; font-style:italic; } +.cm-s-ambiance .cm-string { color: #8f9d6a; } +.cm-s-ambiance .cm-string-2 { color: #9d937c; } +.cm-s-ambiance .cm-meta { color: #D2A8A1; } +.cm-s-ambiance .cm-qualifier { color: yellow; } +.cm-s-ambiance .cm-builtin { color: #9999cc; } +.cm-s-ambiance .cm-bracket { color: #24C2C7; } +.cm-s-ambiance .cm-tag { color: #fee4ff } +.cm-s-ambiance .cm-attribute { color: #9B859D; } +.cm-s-ambiance .cm-header {color: blue;} +.cm-s-ambiance .cm-quote { color: #24C2C7; } +.cm-s-ambiance .cm-hr { color: pink; } +.cm-s-ambiance .cm-link { color: #F4C20B; } +.cm-s-ambiance .cm-special { color: #FF9D00; } +.cm-s-ambiance .cm-error { color: #AF2018; } + +.cm-s-ambiance .CodeMirror-matchingbracket { color: #0f0; } +.cm-s-ambiance .CodeMirror-nonmatchingbracket { color: #f22; } + +.cm-s-ambiance .CodeMirror-selected { + background: rgba(255, 255, 255, 0.15); +} +.cm-s-ambiance.CodeMirror-focused .CodeMirror-selected { + background: rgba(255, 255, 255, 0.10); +} + +/* Editor styling */ + +.cm-s-ambiance.CodeMirror { + line-height: 1.40em; + font-family: Monaco, Menlo,"Andale Mono","lucida console","Courier New",monospace !important; + color: #E6E1DC; + background-color: #202020; + -webkit-box-shadow: inset 0 0 10px black; + -moz-box-shadow: inset 0 0 10px black; + box-shadow: inset 0 0 10px black; +} + +.cm-s-ambiance .CodeMirror-gutters { + background: #3D3D3D; + border-right: 1px solid #4D4D4D; + box-shadow: 0 10px 20px black; +} + +.cm-s-ambiance .CodeMirror-linenumber { + text-shadow: 0px 1px 1px #4d4d4d; + color: #222; + padding: 0 5px; +} + +.cm-s-ambiance .CodeMirror-lines .CodeMirror-cursor { + border-left: 1px solid #7991E8; +} + +.cm-s-ambiance .CodeMirror-activeline-background { + background: none repeat scroll 0% 0% rgba(255, 255, 255, 0.031); +} + +.cm-s-ambiance.CodeMirror, +.cm-s-ambiance .CodeMirror-gutters { + background-image: url("data:image/png;base64,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"); +} diff --git a/pitfall/pdfkit/node_modules/codemirror/theme/base16-dark.css b/pitfall/pdfkit/node_modules/codemirror/theme/base16-dark.css new file mode 100644 index 00000000..3b7b21c7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/theme/base16-dark.css @@ -0,0 +1,34 @@ +/* + + Name: Base16 Default Dark + Author: Chris Kempson (http://chriskempson.com) + + CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-chrome-devtools) + Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) + +*/ + +.cm-s-base16-dark.CodeMirror {background: #151515; color: #e0e0e0;} +.cm-s-base16-dark div.CodeMirror-selected {background: #202020 !important;} +.cm-s-base16-dark .CodeMirror-gutters {background: #151515; border-right: 0px;} +.cm-s-base16-dark .CodeMirror-linenumber {color: #505050;} +.cm-s-base16-dark .CodeMirror-cursor {border-left: 1px solid #b0b0b0 !important;} + +.cm-s-base16-dark span.cm-comment {color: #8f5536;} +.cm-s-base16-dark span.cm-atom {color: #aa759f;} +.cm-s-base16-dark span.cm-number {color: #aa759f;} + +.cm-s-base16-dark span.cm-property, .cm-s-base16-dark span.cm-attribute {color: #90a959;} +.cm-s-base16-dark span.cm-keyword {color: #ac4142;} +.cm-s-base16-dark span.cm-string {color: #f4bf75;} + +.cm-s-base16-dark span.cm-variable {color: #90a959;} +.cm-s-base16-dark span.cm-variable-2 {color: #6a9fb5;} +.cm-s-base16-dark span.cm-def {color: #d28445;} +.cm-s-base16-dark span.cm-bracket {color: #e0e0e0;} +.cm-s-base16-dark span.cm-tag {color: #ac4142;} +.cm-s-base16-dark span.cm-link {color: #aa759f;} +.cm-s-base16-dark span.cm-error {background: #ac4142; color: #b0b0b0;} + +.cm-s-base16-dark .CodeMirror-activeline-background {background: #2F2F2F !important;} +.cm-s-base16-dark .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} diff --git a/pitfall/pdfkit/node_modules/codemirror/theme/base16-light.css b/pitfall/pdfkit/node_modules/codemirror/theme/base16-light.css new file mode 100644 index 00000000..5aa4b538 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/theme/base16-light.css @@ -0,0 +1,34 @@ +/* + + Name: Base16 Default Light + Author: Chris Kempson (http://chriskempson.com) + + CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-chrome-devtools) + Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) + +*/ + +.cm-s-base16-light.CodeMirror {background: #f5f5f5; color: #202020;} +.cm-s-base16-light div.CodeMirror-selected {background: #e0e0e0 !important;} +.cm-s-base16-light .CodeMirror-gutters {background: #f5f5f5; border-right: 0px;} +.cm-s-base16-light .CodeMirror-linenumber {color: #b0b0b0;} +.cm-s-base16-light .CodeMirror-cursor {border-left: 1px solid #505050 !important;} + +.cm-s-base16-light span.cm-comment {color: #8f5536;} +.cm-s-base16-light span.cm-atom {color: #aa759f;} +.cm-s-base16-light span.cm-number {color: #aa759f;} + +.cm-s-base16-light span.cm-property, .cm-s-base16-light span.cm-attribute {color: #90a959;} +.cm-s-base16-light span.cm-keyword {color: #ac4142;} +.cm-s-base16-light span.cm-string {color: #f4bf75;} + +.cm-s-base16-light span.cm-variable {color: #90a959;} +.cm-s-base16-light span.cm-variable-2 {color: #6a9fb5;} +.cm-s-base16-light span.cm-def {color: #d28445;} +.cm-s-base16-light span.cm-bracket {color: #202020;} +.cm-s-base16-light span.cm-tag {color: #ac4142;} +.cm-s-base16-light span.cm-link {color: #aa759f;} +.cm-s-base16-light span.cm-error {background: #ac4142; color: #505050;} + +.cm-s-base16-light .CodeMirror-activeline-background {background: #DDDCDC !important;} +.cm-s-base16-light .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} diff --git a/pitfall/pdfkit/node_modules/codemirror/theme/blackboard.css b/pitfall/pdfkit/node_modules/codemirror/theme/blackboard.css new file mode 100644 index 00000000..8b760847 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/theme/blackboard.css @@ -0,0 +1,28 @@ +/* Port of TextMate's Blackboard theme */ + +.cm-s-blackboard.CodeMirror { background: #0C1021; color: #F8F8F8; } +.cm-s-blackboard .CodeMirror-selected { background: #253B76 !important; } +.cm-s-blackboard .CodeMirror-gutters { background: #0C1021; border-right: 0; } +.cm-s-blackboard .CodeMirror-linenumber { color: #888; } +.cm-s-blackboard .CodeMirror-cursor { border-left: 1px solid #A7A7A7 !important; } + +.cm-s-blackboard .cm-keyword { color: #FBDE2D; } +.cm-s-blackboard .cm-atom { color: #D8FA3C; } +.cm-s-blackboard .cm-number { color: #D8FA3C; } +.cm-s-blackboard .cm-def { color: #8DA6CE; } +.cm-s-blackboard .cm-variable { color: #FF6400; } +.cm-s-blackboard .cm-operator { color: #FBDE2D;} +.cm-s-blackboard .cm-comment { color: #AEAEAE; } +.cm-s-blackboard .cm-string { color: #61CE3C; } +.cm-s-blackboard .cm-string-2 { color: #61CE3C; } +.cm-s-blackboard .cm-meta { color: #D8FA3C; } +.cm-s-blackboard .cm-builtin { color: #8DA6CE; } +.cm-s-blackboard .cm-tag { color: #8DA6CE; } +.cm-s-blackboard .cm-attribute { color: #8DA6CE; } +.cm-s-blackboard .cm-header { color: #FF6400; } +.cm-s-blackboard .cm-hr { color: #AEAEAE; } +.cm-s-blackboard .cm-link { color: #8DA6CE; } +.cm-s-blackboard .cm-error { background: #9D1E15; color: #F8F8F8; } + +.cm-s-blackboard .CodeMirror-activeline-background {background: #3C3636 !important;} +.cm-s-blackboard .CodeMirror-matchingbracket {outline:1px solid grey;color:white !important} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/codemirror/theme/cobalt.css b/pitfall/pdfkit/node_modules/codemirror/theme/cobalt.css new file mode 100644 index 00000000..b4a91773 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/theme/cobalt.css @@ -0,0 +1,21 @@ +.cm-s-cobalt.CodeMirror { background: #002240; color: white; } +.cm-s-cobalt div.CodeMirror-selected { background: #b36539 !important; } +.cm-s-cobalt .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; } +.cm-s-cobalt .CodeMirror-linenumber { color: #d0d0d0; } +.cm-s-cobalt .CodeMirror-cursor { border-left: 1px solid white !important; } + +.cm-s-cobalt span.cm-comment { color: #08f; } +.cm-s-cobalt span.cm-atom { color: #845dc4; } +.cm-s-cobalt span.cm-number, .cm-s-cobalt span.cm-attribute { color: #ff80e1; } +.cm-s-cobalt span.cm-keyword { color: #ffee80; } +.cm-s-cobalt span.cm-string { color: #3ad900; } +.cm-s-cobalt span.cm-meta { color: #ff9d00; } +.cm-s-cobalt span.cm-variable-2, .cm-s-cobalt span.cm-tag { color: #9effff; } +.cm-s-cobalt span.cm-variable-3, .cm-s-cobalt span.cm-def { color: white; } +.cm-s-cobalt span.cm-bracket { color: #d8d8d8; } +.cm-s-cobalt span.cm-builtin, .cm-s-cobalt span.cm-special { color: #ff9e59; } +.cm-s-cobalt span.cm-link { color: #845dc4; } +.cm-s-cobalt span.cm-error { color: #9d1e15; } + +.cm-s-cobalt .CodeMirror-activeline-background {background: #002D57 !important;} +.cm-s-cobalt .CodeMirror-matchingbracket {outline:1px solid grey;color:white !important} diff --git a/pitfall/pdfkit/node_modules/codemirror/theme/eclipse.css b/pitfall/pdfkit/node_modules/codemirror/theme/eclipse.css new file mode 100644 index 00000000..317218e3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/theme/eclipse.css @@ -0,0 +1,23 @@ +.cm-s-eclipse span.cm-meta {color: #FF1717;} +.cm-s-eclipse span.cm-keyword { line-height: 1em; font-weight: bold; color: #7F0055; } +.cm-s-eclipse span.cm-atom {color: #219;} +.cm-s-eclipse span.cm-number {color: #164;} +.cm-s-eclipse span.cm-def {color: #00f;} +.cm-s-eclipse span.cm-variable {color: black;} +.cm-s-eclipse span.cm-variable-2 {color: #0000C0;} +.cm-s-eclipse span.cm-variable-3 {color: #0000C0;} +.cm-s-eclipse span.cm-property {color: black;} +.cm-s-eclipse span.cm-operator {color: black;} +.cm-s-eclipse span.cm-comment {color: #3F7F5F;} +.cm-s-eclipse span.cm-string {color: #2A00FF;} +.cm-s-eclipse span.cm-string-2 {color: #f50;} +.cm-s-eclipse span.cm-qualifier {color: #555;} +.cm-s-eclipse span.cm-builtin {color: #30a;} +.cm-s-eclipse span.cm-bracket {color: #cc7;} +.cm-s-eclipse span.cm-tag {color: #170;} +.cm-s-eclipse span.cm-attribute {color: #00c;} +.cm-s-eclipse span.cm-link {color: #219;} +.cm-s-eclipse span.cm-error {color: #f00;} + +.cm-s-eclipse .CodeMirror-activeline-background {background: #e8f2ff !important;} +.cm-s-eclipse .CodeMirror-matchingbracket {outline:1px solid grey; color:black !important;} diff --git a/pitfall/pdfkit/node_modules/codemirror/theme/elegant.css b/pitfall/pdfkit/node_modules/codemirror/theme/elegant.css new file mode 100644 index 00000000..dd7df7b7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/theme/elegant.css @@ -0,0 +1,13 @@ +.cm-s-elegant span.cm-number, .cm-s-elegant span.cm-string, .cm-s-elegant span.cm-atom {color: #762;} +.cm-s-elegant span.cm-comment {color: #262; font-style: italic; line-height: 1em;} +.cm-s-elegant span.cm-meta {color: #555; font-style: italic; line-height: 1em;} +.cm-s-elegant span.cm-variable {color: black;} +.cm-s-elegant span.cm-variable-2 {color: #b11;} +.cm-s-elegant span.cm-qualifier {color: #555;} +.cm-s-elegant span.cm-keyword {color: #730;} +.cm-s-elegant span.cm-builtin {color: #30a;} +.cm-s-elegant span.cm-link {color: #762;} +.cm-s-elegant span.cm-error {background-color: #fdd;} + +.cm-s-elegant .CodeMirror-activeline-background {background: #e8f2ff !important;} +.cm-s-elegant .CodeMirror-matchingbracket {outline:1px solid grey; color:black !important;} diff --git a/pitfall/pdfkit/node_modules/codemirror/theme/erlang-dark.css b/pitfall/pdfkit/node_modules/codemirror/theme/erlang-dark.css new file mode 100644 index 00000000..db56b108 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/theme/erlang-dark.css @@ -0,0 +1,30 @@ +.cm-s-erlang-dark.CodeMirror { background: #002240; color: white; } +.cm-s-erlang-dark div.CodeMirror-selected { background: #b36539 !important; } +.cm-s-erlang-dark .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; } +.cm-s-erlang-dark .CodeMirror-linenumber { color: #d0d0d0; } +.cm-s-erlang-dark .CodeMirror-cursor { border-left: 1px solid white !important; } + +.cm-s-erlang-dark span.cm-atom { color: #f133f1; } +.cm-s-erlang-dark span.cm-attribute { color: #ff80e1; } +.cm-s-erlang-dark span.cm-bracket { color: #ff9d00; } +.cm-s-erlang-dark span.cm-builtin { color: #eaa; } +.cm-s-erlang-dark span.cm-comment { color: #77f; } +.cm-s-erlang-dark span.cm-def { color: #e7a; } +.cm-s-erlang-dark span.cm-keyword { color: #ffee80; } +.cm-s-erlang-dark span.cm-meta { color: #50fefe; } +.cm-s-erlang-dark span.cm-number { color: #ffd0d0; } +.cm-s-erlang-dark span.cm-operator { color: #d55; } +.cm-s-erlang-dark span.cm-property { color: #ccc; } +.cm-s-erlang-dark span.cm-qualifier { color: #ccc; } +.cm-s-erlang-dark span.cm-quote { color: #ccc; } +.cm-s-erlang-dark span.cm-special { color: #ffbbbb; } +.cm-s-erlang-dark span.cm-string { color: #3ad900; } +.cm-s-erlang-dark span.cm-string-2 { color: #ccc; } +.cm-s-erlang-dark span.cm-tag { color: #9effff; } +.cm-s-erlang-dark span.cm-variable { color: #50fe50; } +.cm-s-erlang-dark span.cm-variable-2 { color: #e0e; } +.cm-s-erlang-dark span.cm-variable-3 { color: #ccc; } +.cm-s-erlang-dark span.cm-error { color: #9d1e15; } + +.cm-s-erlang-dark .CodeMirror-activeline-background {background: #013461 !important;} +.cm-s-erlang-dark .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;} diff --git a/pitfall/pdfkit/node_modules/codemirror/theme/lesser-dark.css b/pitfall/pdfkit/node_modules/codemirror/theme/lesser-dark.css new file mode 100644 index 00000000..c3255966 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/theme/lesser-dark.css @@ -0,0 +1,47 @@ +/* +http://lesscss.org/ dark theme +Ported to CodeMirror by Peter Kroon +*/ +.cm-s-lesser-dark { + line-height: 1.3em; +} +.cm-s-lesser-dark { + font-family: 'Bitstream Vera Sans Mono', 'DejaVu Sans Mono', 'Monaco', Courier, monospace !important; +} + +.cm-s-lesser-dark.CodeMirror { background: #262626; color: #EBEFE7; text-shadow: 0 -1px 1px #262626; } +.cm-s-lesser-dark div.CodeMirror-selected {background: #45443B !important;} /* 33322B*/ +.cm-s-lesser-dark .CodeMirror-cursor { border-left: 1px solid white !important; } +.cm-s-lesser-dark pre { padding: 0 8px; }/*editable code holder*/ + +.cm-s-lesser-dark.CodeMirror span.CodeMirror-matchingbracket { color: #7EFC7E; }/*65FC65*/ + +.cm-s-lesser-dark .CodeMirror-gutters { background: #262626; border-right:1px solid #aaa; } +.cm-s-lesser-dark .CodeMirror-linenumber { color: #777; } + +.cm-s-lesser-dark span.cm-keyword { color: #599eff; } +.cm-s-lesser-dark span.cm-atom { color: #C2B470; } +.cm-s-lesser-dark span.cm-number { color: #B35E4D; } +.cm-s-lesser-dark span.cm-def {color: white;} +.cm-s-lesser-dark span.cm-variable { color:#D9BF8C; } +.cm-s-lesser-dark span.cm-variable-2 { color: #669199; } +.cm-s-lesser-dark span.cm-variable-3 { color: white; } +.cm-s-lesser-dark span.cm-property {color: #92A75C;} +.cm-s-lesser-dark span.cm-operator {color: #92A75C;} +.cm-s-lesser-dark span.cm-comment { color: #666; } +.cm-s-lesser-dark span.cm-string { color: #BCD279; } +.cm-s-lesser-dark span.cm-string-2 {color: #f50;} +.cm-s-lesser-dark span.cm-meta { color: #738C73; } +.cm-s-lesser-dark span.cm-qualifier {color: #555;} +.cm-s-lesser-dark span.cm-builtin { color: #ff9e59; } +.cm-s-lesser-dark span.cm-bracket { color: #EBEFE7; } +.cm-s-lesser-dark span.cm-tag { color: #669199; } +.cm-s-lesser-dark span.cm-attribute {color: #00c;} +.cm-s-lesser-dark span.cm-header {color: #a0a;} +.cm-s-lesser-dark span.cm-quote {color: #090;} +.cm-s-lesser-dark span.cm-hr {color: #999;} +.cm-s-lesser-dark span.cm-link {color: #00c;} +.cm-s-lesser-dark span.cm-error { color: #9d1e15; } + +.cm-s-lesser-dark .CodeMirror-activeline-background {background: #3C3A3A !important;} +.cm-s-lesser-dark .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;} diff --git a/pitfall/pdfkit/node_modules/codemirror/theme/mbo.css b/pitfall/pdfkit/node_modules/codemirror/theme/mbo.css new file mode 100644 index 00000000..93fe3ee2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/theme/mbo.css @@ -0,0 +1,37 @@ +/* Based on mbonaci's Brackets mbo theme */ + +.cm-s-mbo.CodeMirror {background: #2c2c2c; color: #ffffe9;} +.cm-s-mbo div.CodeMirror-selected {background: #716C62 !important;} +.cm-s-mbo .CodeMirror-gutters {background: #4e4e4e; border-right: 0px;} +.cm-s-mbo .CodeMirror-linenumber {color: #dadada;} +.cm-s-mbo .CodeMirror-cursor {border-left: 1px solid #ffffec !important;} + +.cm-s-mbo span.cm-comment {color: #95958a;} +.cm-s-mbo span.cm-atom {color: #00a8c6;} +.cm-s-mbo span.cm-number {color: #00a8c6;} + +.cm-s-mbo span.cm-property, .cm-s-mbo span.cm-attribute {color: #9ddfe9;} +.cm-s-mbo span.cm-keyword {color: #ffb928;} +.cm-s-mbo span.cm-string {color: #ffcf6c;} + +.cm-s-mbo span.cm-variable {color: #ffffec;} +.cm-s-mbo span.cm-variable-2 {color: #00a8c6;} +.cm-s-mbo span.cm-def {color: #ffffec;} +.cm-s-mbo span.cm-bracket {color: #fffffc; font-weight: bold;} +.cm-s-mbo span.cm-tag {color: #9ddfe9;} +.cm-s-mbo span.cm-link {color: #f54b07;} +.cm-s-mbo span.cm-error {background: #636363; color: #ffffec;} + +.cm-s-mbo .CodeMirror-activeline-background {background: #494b41 !important;} +.cm-s-mbo .CodeMirror-matchingbracket { + text-decoration: underline; + color: #f5e107 !important; + } + +.cm-s-mbo .CodeMirror-matchingtag {background: #4e4e4e;} + +div.CodeMirror span.CodeMirror-searching { + background-color: none; + background: none; + box-shadow: 0 0 0 1px #ffffec; +} diff --git a/pitfall/pdfkit/node_modules/codemirror/theme/midnight.css b/pitfall/pdfkit/node_modules/codemirror/theme/midnight.css new file mode 100644 index 00000000..66126322 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/theme/midnight.css @@ -0,0 +1,43 @@ +/* Based on the theme at http://bonsaiden.github.com/JavaScript-Garden */ + +/**/ +.cm-s-midnight span.CodeMirror-matchhighlight { background: #494949 } +.cm-s-midnight.CodeMirror-focused span.CodeMirror-matchhighlight { background: #314D67 !important; } + +/**/ +.cm-s-midnight .CodeMirror-activeline-background {background: #253540 !important;} + +.cm-s-midnight.CodeMirror { + background: #0F192A; + color: #D1EDFF; +} + +.cm-s-midnight.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;} + +.cm-s-midnight div.CodeMirror-selected {background: #314D67 !important;} +.cm-s-midnight .CodeMirror-gutters {background: #0F192A; border-right: 1px solid;} +.cm-s-midnight .CodeMirror-linenumber {color: #D0D0D0;} +.cm-s-midnight .CodeMirror-cursor { + border-left: 1px solid #F8F8F0 !important; +} + +.cm-s-midnight span.cm-comment {color: #428BDD;} +.cm-s-midnight span.cm-atom {color: #AE81FF;} +.cm-s-midnight span.cm-number {color: #D1EDFF;} + +.cm-s-midnight span.cm-property, .cm-s-midnight span.cm-attribute {color: #A6E22E;} +.cm-s-midnight span.cm-keyword {color: #E83737;} +.cm-s-midnight span.cm-string {color: #1DC116;} + +.cm-s-midnight span.cm-variable {color: #FFAA3E;} +.cm-s-midnight span.cm-variable-2 {color: #FFAA3E;} +.cm-s-midnight span.cm-def {color: #4DD;} +.cm-s-midnight span.cm-bracket {color: #D1EDFF;} +.cm-s-midnight span.cm-tag {color: #449;} +.cm-s-midnight span.cm-link {color: #AE81FF;} +.cm-s-midnight span.cm-error {background: #F92672; color: #F8F8F0;} + +.cm-s-midnight .CodeMirror-matchingbracket { + text-decoration: underline; + color: white !important; +} diff --git a/pitfall/pdfkit/node_modules/codemirror/theme/monokai.css b/pitfall/pdfkit/node_modules/codemirror/theme/monokai.css new file mode 100644 index 00000000..7ac601a1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/theme/monokai.css @@ -0,0 +1,29 @@ +/* Based on Sublime Text's Monokai theme */ + +.cm-s-monokai.CodeMirror {background: #272822; color: #f8f8f2;} +.cm-s-monokai div.CodeMirror-selected {background: #49483E !important;} +.cm-s-monokai .CodeMirror-gutters {background: #272822; border-right: 0px;} +.cm-s-monokai .CodeMirror-linenumber {color: #d0d0d0;} +.cm-s-monokai .CodeMirror-cursor {border-left: 1px solid #f8f8f0 !important;} + +.cm-s-monokai span.cm-comment {color: #75715e;} +.cm-s-monokai span.cm-atom {color: #ae81ff;} +.cm-s-monokai span.cm-number {color: #ae81ff;} + +.cm-s-monokai span.cm-property, .cm-s-monokai span.cm-attribute {color: #a6e22e;} +.cm-s-monokai span.cm-keyword {color: #f92672;} +.cm-s-monokai span.cm-string {color: #e6db74;} + +.cm-s-monokai span.cm-variable {color: #a6e22e;} +.cm-s-monokai span.cm-variable-2 {color: #9effff;} +.cm-s-monokai span.cm-def {color: #fd971f;} +.cm-s-monokai span.cm-bracket {color: #f8f8f2;} +.cm-s-monokai span.cm-tag {color: #f92672;} +.cm-s-monokai span.cm-link {color: #ae81ff;} +.cm-s-monokai span.cm-error {background: #f92672; color: #f8f8f0;} + +.cm-s-monokai .CodeMirror-activeline-background {background: #373831 !important;} +.cm-s-monokai .CodeMirror-matchingbracket { + text-decoration: underline; + color: white !important; +} diff --git a/pitfall/pdfkit/node_modules/codemirror/theme/neat.css b/pitfall/pdfkit/node_modules/codemirror/theme/neat.css new file mode 100644 index 00000000..115083b8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/theme/neat.css @@ -0,0 +1,12 @@ +.cm-s-neat span.cm-comment { color: #a86; } +.cm-s-neat span.cm-keyword { line-height: 1em; font-weight: bold; color: blue; } +.cm-s-neat span.cm-string { color: #a22; } +.cm-s-neat span.cm-builtin { line-height: 1em; font-weight: bold; color: #077; } +.cm-s-neat span.cm-special { line-height: 1em; font-weight: bold; color: #0aa; } +.cm-s-neat span.cm-variable { color: black; } +.cm-s-neat span.cm-number, .cm-s-neat span.cm-atom { color: #3a3; } +.cm-s-neat span.cm-meta {color: #555;} +.cm-s-neat span.cm-link { color: #3a3; } + +.cm-s-neat .CodeMirror-activeline-background {background: #e8f2ff !important;} +.cm-s-neat .CodeMirror-matchingbracket {outline:1px solid grey; color:black !important;} diff --git a/pitfall/pdfkit/node_modules/codemirror/theme/night.css b/pitfall/pdfkit/node_modules/codemirror/theme/night.css new file mode 100644 index 00000000..016e55ee --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/theme/night.css @@ -0,0 +1,24 @@ +/* Loosely based on the Midnight Textmate theme */ + +.cm-s-night.CodeMirror { background: #0a001f; color: #f8f8f8; } +.cm-s-night div.CodeMirror-selected { background: #447 !important; } +.cm-s-night .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; } +.cm-s-night .CodeMirror-linenumber { color: #f8f8f8; } +.cm-s-night .CodeMirror-cursor { border-left: 1px solid white !important; } + +.cm-s-night span.cm-comment { color: #6900a1; } +.cm-s-night span.cm-atom { color: #845dc4; } +.cm-s-night span.cm-number, .cm-s-night span.cm-attribute { color: #ffd500; } +.cm-s-night span.cm-keyword { color: #599eff; } +.cm-s-night span.cm-string { color: #37f14a; } +.cm-s-night span.cm-meta { color: #7678e2; } +.cm-s-night span.cm-variable-2, .cm-s-night span.cm-tag { color: #99b2ff; } +.cm-s-night span.cm-variable-3, .cm-s-night span.cm-def { color: white; } +.cm-s-night span.cm-bracket { color: #8da6ce; } +.cm-s-night span.cm-comment { color: #6900a1; } +.cm-s-night span.cm-builtin, .cm-s-night span.cm-special { color: #ff9e59; } +.cm-s-night span.cm-link { color: #845dc4; } +.cm-s-night span.cm-error { color: #9d1e15; } + +.cm-s-night .CodeMirror-activeline-background {background: #1C005A !important;} +.cm-s-night .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;} diff --git a/pitfall/pdfkit/node_modules/codemirror/theme/paraiso-dark.css b/pitfall/pdfkit/node_modules/codemirror/theme/paraiso-dark.css new file mode 100644 index 00000000..ddefc55d --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/theme/paraiso-dark.css @@ -0,0 +1,34 @@ +/* + + Name: Paraíso (Dark) + Author: Jan T. Sott + + Color scheme by Jan T. Sott (https://github.com/idleberg/Paraiso-CodeMirror) + Inspired by the art of Rubens LP (http://www.rubenslp.com.br) + +*/ + +.cm-s-paraiso-dark.CodeMirror {background: #2f1e2e; color: #b9b6b0;} +.cm-s-paraiso-dark div.CodeMirror-selected {background: #41323f !important;} +.cm-s-paraiso-dark .CodeMirror-gutters {background: #2f1e2e; border-right: 0px;} +.cm-s-paraiso-dark .CodeMirror-linenumber {color: #776e71;} +.cm-s-paraiso-dark .CodeMirror-cursor {border-left: 1px solid #8d8687 !important;} + +.cm-s-paraiso-dark span.cm-comment {color: #e96ba8;} +.cm-s-paraiso-dark span.cm-atom {color: #815ba4;} +.cm-s-paraiso-dark span.cm-number {color: #815ba4;} + +.cm-s-paraiso-dark span.cm-property, .cm-s-paraiso-dark span.cm-attribute {color: #48b685;} +.cm-s-paraiso-dark span.cm-keyword {color: #ef6155;} +.cm-s-paraiso-dark span.cm-string {color: #fec418;} + +.cm-s-paraiso-dark span.cm-variable {color: #48b685;} +.cm-s-paraiso-dark span.cm-variable-2 {color: #06b6ef;} +.cm-s-paraiso-dark span.cm-def {color: #f99b15;} +.cm-s-paraiso-dark span.cm-bracket {color: #b9b6b0;} +.cm-s-paraiso-dark span.cm-tag {color: #ef6155;} +.cm-s-paraiso-dark span.cm-link {color: #815ba4;} +.cm-s-paraiso-dark span.cm-error {background: #ef6155; color: #8d8687;} + +.cm-s-paraiso-dark .CodeMirror-activeline-background {background: #4D344A !important;} +.cm-s-paraiso-dark .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} diff --git a/pitfall/pdfkit/node_modules/codemirror/theme/paraiso-light.css b/pitfall/pdfkit/node_modules/codemirror/theme/paraiso-light.css new file mode 100644 index 00000000..8afb14be --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/theme/paraiso-light.css @@ -0,0 +1,34 @@ +/* + + Name: Paraíso (Light) + Author: Jan T. Sott + + Color scheme by Jan T. Sott (https://github.com/idleberg/Paraiso-CodeMirror) + Inspired by the art of Rubens LP (http://www.rubenslp.com.br) + +*/ + +.cm-s-paraiso-light.CodeMirror {background: #e7e9db; color: #41323f;} +.cm-s-paraiso-light div.CodeMirror-selected {background: #b9b6b0 !important;} +.cm-s-paraiso-light .CodeMirror-gutters {background: #e7e9db; border-right: 0px;} +.cm-s-paraiso-light .CodeMirror-linenumber {color: #8d8687;} +.cm-s-paraiso-light .CodeMirror-cursor {border-left: 1px solid #776e71 !important;} + +.cm-s-paraiso-light span.cm-comment {color: #e96ba8;} +.cm-s-paraiso-light span.cm-atom {color: #815ba4;} +.cm-s-paraiso-light span.cm-number {color: #815ba4;} + +.cm-s-paraiso-light span.cm-property, .cm-s-paraiso-light span.cm-attribute {color: #48b685;} +.cm-s-paraiso-light span.cm-keyword {color: #ef6155;} +.cm-s-paraiso-light span.cm-string {color: #fec418;} + +.cm-s-paraiso-light span.cm-variable {color: #48b685;} +.cm-s-paraiso-light span.cm-variable-2 {color: #06b6ef;} +.cm-s-paraiso-light span.cm-def {color: #f99b15;} +.cm-s-paraiso-light span.cm-bracket {color: #41323f;} +.cm-s-paraiso-light span.cm-tag {color: #ef6155;} +.cm-s-paraiso-light span.cm-link {color: #815ba4;} +.cm-s-paraiso-light span.cm-error {background: #ef6155; color: #776e71;} + +.cm-s-paraiso-light .CodeMirror-activeline-background {background: #CFD1C4 !important;} +.cm-s-paraiso-light .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} diff --git a/pitfall/pdfkit/node_modules/codemirror/theme/rubyblue.css b/pitfall/pdfkit/node_modules/codemirror/theme/rubyblue.css new file mode 100644 index 00000000..b556139d --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/theme/rubyblue.css @@ -0,0 +1,23 @@ +.cm-s-rubyblue { font-family: Trebuchet, Verdana, sans-serif; } /* - customized editor font - */ + +.cm-s-rubyblue.CodeMirror { background: #112435; color: white; } +.cm-s-rubyblue div.CodeMirror-selected { background: #38566F !important; } +.cm-s-rubyblue .CodeMirror-gutters { background: #1F4661; border-right: 7px solid #3E7087; } +.cm-s-rubyblue .CodeMirror-linenumber { color: white; } +.cm-s-rubyblue .CodeMirror-cursor { border-left: 1px solid white !important; } + +.cm-s-rubyblue span.cm-comment { color: #999; font-style:italic; line-height: 1em; } +.cm-s-rubyblue span.cm-atom { color: #F4C20B; } +.cm-s-rubyblue span.cm-number, .cm-s-rubyblue span.cm-attribute { color: #82C6E0; } +.cm-s-rubyblue span.cm-keyword { color: #F0F; } +.cm-s-rubyblue span.cm-string { color: #F08047; } +.cm-s-rubyblue span.cm-meta { color: #F0F; } +.cm-s-rubyblue span.cm-variable-2, .cm-s-rubyblue span.cm-tag { color: #7BD827; } +.cm-s-rubyblue span.cm-variable-3, .cm-s-rubyblue span.cm-def { color: white; } +.cm-s-rubyblue span.cm-bracket { color: #F0F; } +.cm-s-rubyblue span.cm-link { color: #F4C20B; } +.cm-s-rubyblue span.CodeMirror-matchingbracket { color:#F0F !important; } +.cm-s-rubyblue span.cm-builtin, .cm-s-rubyblue span.cm-special { color: #FF9D00; } +.cm-s-rubyblue span.cm-error { color: #AF2018; } + +.cm-s-rubyblue .CodeMirror-activeline-background {background: #173047 !important;} diff --git a/pitfall/pdfkit/node_modules/codemirror/theme/solarized.css b/pitfall/pdfkit/node_modules/codemirror/theme/solarized.css new file mode 100644 index 00000000..af30d621 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/theme/solarized.css @@ -0,0 +1,180 @@ +/* +Solarized theme for code-mirror +http://ethanschoonover.com/solarized +*/ + +/* +Solarized color pallet +http://ethanschoonover.com/solarized/img/solarized-palette.png +*/ + +.solarized.base03 { color: #002b36; } +.solarized.base02 { color: #073642; } +.solarized.base01 { color: #586e75; } +.solarized.base00 { color: #657b83; } +.solarized.base0 { color: #839496; } +.solarized.base1 { color: #93a1a1; } +.solarized.base2 { color: #eee8d5; } +.solarized.base3 { color: #fdf6e3; } +.solarized.solar-yellow { color: #b58900; } +.solarized.solar-orange { color: #cb4b16; } +.solarized.solar-red { color: #dc322f; } +.solarized.solar-magenta { color: #d33682; } +.solarized.solar-violet { color: #6c71c4; } +.solarized.solar-blue { color: #268bd2; } +.solarized.solar-cyan { color: #2aa198; } +.solarized.solar-green { color: #859900; } + +/* Color scheme for code-mirror */ + +.cm-s-solarized { + line-height: 1.45em; + font-family: Menlo,Monaco,"Andale Mono","lucida console","Courier New",monospace !important; + color-profile: sRGB; + rendering-intent: auto; +} +.cm-s-solarized.cm-s-dark { + color: #839496; + background-color: #002b36; + text-shadow: #002b36 0 1px; +} +.cm-s-solarized.cm-s-light { + background-color: #fdf6e3; + color: #657b83; + text-shadow: #eee8d5 0 1px; +} + +.cm-s-solarized .CodeMirror-widget { + text-shadow: none; +} + + +.cm-s-solarized .cm-keyword { color: #cb4b16 } +.cm-s-solarized .cm-atom { color: #d33682; } +.cm-s-solarized .cm-number { color: #d33682; } +.cm-s-solarized .cm-def { color: #2aa198; } + +.cm-s-solarized .cm-variable { color: #268bd2; } +.cm-s-solarized .cm-variable-2 { color: #b58900; } +.cm-s-solarized .cm-variable-3 { color: #6c71c4; } + +.cm-s-solarized .cm-property { color: #2aa198; } +.cm-s-solarized .cm-operator {color: #6c71c4;} + +.cm-s-solarized .cm-comment { color: #586e75; font-style:italic; } + +.cm-s-solarized .cm-string { color: #859900; } +.cm-s-solarized .cm-string-2 { color: #b58900; } + +.cm-s-solarized .cm-meta { color: #859900; } +.cm-s-solarized .cm-qualifier { color: #b58900; } +.cm-s-solarized .cm-builtin { color: #d33682; } +.cm-s-solarized .cm-bracket { color: #cb4b16; } +.cm-s-solarized .CodeMirror-matchingbracket { color: #859900; } +.cm-s-solarized .CodeMirror-nonmatchingbracket { color: #dc322f; } +.cm-s-solarized .cm-tag { color: #93a1a1 } +.cm-s-solarized .cm-attribute { color: #2aa198; } +.cm-s-solarized .cm-header { color: #586e75; } +.cm-s-solarized .cm-quote { color: #93a1a1; } +.cm-s-solarized .cm-hr { + color: transparent; + border-top: 1px solid #586e75; + display: block; +} +.cm-s-solarized .cm-link { color: #93a1a1; cursor: pointer; } +.cm-s-solarized .cm-special { color: #6c71c4; } +.cm-s-solarized .cm-em { + color: #999; + text-decoration: underline; + text-decoration-style: dotted; +} +.cm-s-solarized .cm-strong { color: #eee; } +.cm-s-solarized .cm-tab:before { + content: "➤"; /*visualize tab character*/ + color: #586e75; +} +.cm-s-solarized .cm-error, +.cm-s-solarized .cm-invalidchar { + color: #586e75; + border-bottom: 1px dotted #dc322f; +} + +.cm-s-solarized.cm-s-dark .CodeMirror-selected { + background: #073642; +} + +.cm-s-solarized.cm-s-light .CodeMirror-selected { + background: #eee8d5; +} + +/* Editor styling */ + + + +/* Little shadow on the view-port of the buffer view */ +.cm-s-solarized.CodeMirror { + -moz-box-shadow: inset 7px 0 12px -6px #000; + -webkit-box-shadow: inset 7px 0 12px -6px #000; + box-shadow: inset 7px 0 12px -6px #000; +} + +/* Gutter border and some shadow from it */ +.cm-s-solarized .CodeMirror-gutters { + padding: 0 15px 0 10px; + box-shadow: 0 10px 20px black; + border-right: 1px solid; +} + +/* Gutter colors and line number styling based of color scheme (dark / light) */ + +/* Dark */ +.cm-s-solarized.cm-s-dark .CodeMirror-gutters { + background-color: #073642; + border-color: #00232c; +} + +.cm-s-solarized.cm-s-dark .CodeMirror-linenumber { + text-shadow: #021014 0 -1px; +} + +/* Light */ +.cm-s-solarized.cm-s-light .CodeMirror-gutters { + background-color: #eee8d5; + border-color: #eee8d5; +} + +/* Common */ +.cm-s-solarized .CodeMirror-linenumber { + color: #586e75; +} + +.cm-s-solarized .CodeMirror-gutter .CodeMirror-gutter-text { + color: #586e75; +} + +.cm-s-solarized .CodeMirror-lines { + padding-left: 5px; +} + +.cm-s-solarized .CodeMirror-lines .CodeMirror-cursor { + border-left: 1px solid #819090; +} + +/* +Active line. Negative margin compensates left padding of the text in the +view-port +*/ +.cm-s-solarized.cm-s-dark .CodeMirror-activeline-background { + background: rgba(255, 255, 255, 0.10); +} +.cm-s-solarized.cm-s-light .CodeMirror-activeline-background { + background: rgba(0, 0, 0, 0.10); +} + +/* +View-port and gutter both get little noise background to give it a real feel. +*/ +.cm-s-solarized.CodeMirror, +.cm-s-solarized .CodeMirror-gutters { + background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAQAAAAHUWYVAABFFUlEQVQYGbzBCeDVU/74/6fj9HIcx/FRHx9JCFmzMyGRURhLZIkUsoeRfUjS2FNDtr6WkMhO9sm+S8maJfu+Jcsg+/o/c+Z4z/t97/vezy3z+z8ekGlnYICG/o7gdk+wmSHZ1z4pJItqapjoKXWahm8NmV6eOTbWUOp6/6a/XIg6GQqmenJ2lDHyvCFZ2cBDbmtHA043VFhHwXxClWmeYAdLhV00Bd85go8VmaFCkbVkzlQENzfBDZ5gtN7HwF0KDrTwJ0dypSOzpaKCMwQHKTIreYIxlmhXTzTWkVm+LTynZhiSBT3RZQ7aGfjGEd3qyXQ1FDymqbKxpspERQN2MiRjNZlFFQXfCNFm9nM1zpAsoYjmtRTc5ajwuaXc5xrWskT97RaKzAGe5ARHhVUsDbjKklziiX5WROcJwSNCNI+9w1Jwv4Zb2r7lCMZ4oq5C0EdTx+2GzNuKpJ+iFf38JEWkHJn9DNF7mmBDITrWEg0VWL3pHU20tSZnuqWu+R3BtYa8XxV1HO7GyD32UkOpL/yDloINFTmvtId+nmAjxRw40VMwVKiwrKLE4bK5UOVntYwhOcSSXKrJHKPJedocpGjVz/ZMIbnYUPB10/eKCrs5apqpgVmWzBYWpmtKHecJPjaUuEgRDDaU0oZghCJ6zNMQ5ZhDYx05r5v2muQdM0EILtXUsaKiQX9WMEUotagQzFbUNN6NUPC2nm5pxEWGCjMc3GdJHjSU2kORLK/JGSrkfGEIjncU/CYUnOipoYemwj8tST9NsJmB7TUVXtbUtXATJVZXBMvYeTXJfobgJUPmGMP/yFaWonaa6BcFO3nqcIqCozSZoZoSr1g4zJOzuyGnxTEX3lUEJ7WcZgme8ddaWvWJo2AJR9DZU3CUIbhCSG6ybSwN6qtJVnCU2svDTP2ZInOw2cBTrqtQahtNZn9NcJ4l2NaSmSkkP1noZWnVwkLmdUPOwLZEwy2Z3S3R+4rIG9hcbpPXHFVWcQdZkn2FOta3cKWQnNRC5g1LsJah4GCzSVsKnCOY5OAFRTBekyyryeyilhFKva75r4Mc0aWanGEaThcy31s439KKxTzJYY5WTHPU1FtIHjQU3Oip4xlNzj/lBw23dYZVliQa7WAXf4shetcQfatI+jWRDBPmyNeW6A1P5kdDgyYJlba0BIM8BZu1JfrFwItyjcAMR3K0BWOIrtMEXyhyrlVEx3ui5dUBjmB/Q3CXW85R4mBD0s7B+4q5tKUjOlb9qqmhi5AZ6GFIC5HXtOobdYGlVdMVbNJ8toNTFcHxnoL+muBagcctjWnbNMuR00uI7nQESwg5q2qqrKWIfrNUmeQocY6HuyxJV02wj36w00yhpmUFenv4p6fUkZYqLyuinx2RGOjhCXYyJF84oiU00YMOOhhquNdfbOB7gU88pY4xJO8LVdp6/q2voeB4R04vIdhSE40xZObx1HGGJ/ja0LBthFInKaLPPFzuCaYaoj8JjPME8yoyxo6zlBqkiUZYgq00OYMswbWO5NGmq+xhipxHLRW29ARjNKXO0wRnear8XSg4XFPLKEPUS1GqvyLwiuBUoa7zpZ0l5xxFwWmWZC1H5h5FwU8eQ7K+g8UcVY6TMQreVQT/8uQ8Z+ALIXnSEa2pYZQneE9RZbSBNYXfWYJzW/h/4j4Dp1tYVcFIC5019Vyi4ThPqSFCzjGWaHQTBU8q6vrVwgxP9Lkm840imWKpcLCjYTtrKuwvsKSnrvHCXGkSMk9p6lhckfRpIeis+N2PiszT+mFLspyGleUhDwcLrZqmyeylxwjBcKHEapqkmyangyLZRVOijwOtCY5SsG5zL0OwlCJ4y5KznF3EUNDDrinwiyLZRzOXtlBbK5ITHFGLp8Q0R6ab6mS7enI2cFrxOyHvOCFaT1HThS1krjCwqWeurCkk+willhCC+RSZnRXBiZaC5RXRIZYKp2lyfrHwiKPKR0JDzrdU2EFgpidawlFDR6FgXUMNa+g1FY3bUQh2cLCwosRdnuQTS/S+JVrGLeWIvtQUvONJxlqSQYYKpwoN2kaocLjdVsis4Mk80ESF2YpSkzwldjHkjFCUutI/r+EHDU8oCs6yzL3PhWiEooZdFMkymlas4AcI3KmoMMNSQ3tHzjGWCrcJJdYyZC7QFGwjRL9p+MrRkAGWzIaWCn9W0F3TsK01c2ZvQw0byvxuQU0r1lM0qJO7wW0kRIMdDTtXEdzi4VIh+EoIHm0mWtAtpCixlabgn83fKTI7anJe9ST7WIK1DMGpQmYeA58ImV6ezOGOzK2Kgq01pd60cKWiUi9Lievb/0vIDPHQ05Kzt4ddPckQBQtoaurjyHnek/nKzpQLrVgKPjIkh2v4uyezpv+Xoo7fPFXaGFp1vaLKxQ4uUpQQS5VuQs7BCq4xRJv7fwpVvvFEB3j+620haOuocqMhWd6TTPAEx+mdFNGHdranFe95WrWmIvlY4F1Dle2ECgc6cto7SryuqGGGha0tFQ5V53migUKmg6XKAo4qS3mik+0OZpAhOLeZKicacgaYcyx5hypYQE02ZA4xi/pNhOQxR4klNKyqacj+mpxnLTnnGSo85++3ZCZq6lrZkXlGEX3o+C9FieccJbZWVFjC0Yo1FZnJhoYMFoI1hEZ9r6hwg75HwzBNhbZCdJEfJwTPGzJvaKImw1yYX1HDAmpXR+ZJQ/SmgqMNVQb5vgamGwLtt7VwvP7Qk1xpiM5x5Cyv93E06MZmgs0Nya2azIKOYKCGBQQW97RmhKNKF02JZqHEJ4o58qp7X5EcZmc56trXEqzjCBZ1MFGR87Ql2tSTs6CGxS05PTzRQorkbw7aKoKXFDXsYW42VJih/q+FP2BdTzDTwVqOYB13liM50vG7wy28qagyuIXMeQI/Oqq8bcn5wJI50xH00CRntyfpL1T4hydYpoXgNiFzoIUTDZnLNRzh4TBHwbYGDvZkxmlyJloyr6tRihpeUG94GnKtIznREF0tzJG/OOr73JBcrSh1k6WuTprgLU+mnSGnv6Zge0NNz+kTDdH8nuAuTdJDCNb21LCiIuqlYbqGzT3RAoZofQfjFazkqeNWdYaGvYTM001EW2oKPvVk1ldUGSgUtHFwjKM1h9jnFcmy5lChoLNaQMGGDsYbKixlaMBmmsx1QjCfflwTfO/gckW0ruZ3jugKR3R5W9hGUWqCgxuFgsuaCHorotGKzGaeZB9DMsaTnKCpMtwTvOzhYk0rdrArKCqcaWmVk1+F372ur1YkKxgatI8Qfe1gIX9wE9FgS8ESmuABIXnRUbCapcKe+nO7slClSZFzpV/LkLncEb1qiO42fS3R855Su2mCLh62t1SYZZYVmKwIHjREF2uihTzB20JOkz7dkxzYQnK0UOU494wh+VWRc6Un2kpTaVgLDFEkJ/uhzRcI0YKGgpGWOlocBU/a4fKoJ/pEaNV6jip3+Es9VXY078rGnmAdf7t9ylPXS34RBSuYPs1UecZTU78WanhBCHpZ5sAoTz0LGZKjPf9TRypqWEiTvOFglL1fCEY3wY/++rbk7C8bWebA6p6om6PgOL2kp44TFJlVNBXae2rqqdZztOJpT87GQsE9jqCPIe9VReZuQ/CIgacsyZdCpIScSYqcZk8r+nsyCzhyfhOqHGOIvrLknC8wTpFcaYiGC/RU1NRbUeUpocQOnkRpGOrIOcNRx+1uA0UrzhSSt+VyS3SJpnFWkzNDqOFGIWcfR86DnmARTQ1HKIL33ExPiemeOhYSSjzlSUZZuE4TveoJLnBUOFof6KiysCbnAEcZgcUNTDOwkqWu3RWtmGpZwlHhJENdZ3miGz0lJlsKnjbwqSHQjpxnFDlTLLwqJPMZMjd7KrzkSG7VsxXBZE+F8YZkb01Oe00yyRK9psh5SYh29ySPKBo2ylNht7ZkZnsKenjKNJu9PNEyZpaCHv4Kt6RQsLvAVp7M9kIimmCUwGeWqLMmGuIotYMmWNpSahkhZw9FqZsVnKJhsjAHvtHMsTM9fCI06Dx/u3vfUXCqfsKRc4oFY2jMsoo/7DJDwZ1CsIKnJu+J9ldkpmiCxQx1rWjI+T9FwcWWzOuaYH0Hj7klNRVWEQpmaqosakiGNTFHdjS/qnUdmf0NJW5xsL0HhimCCZZSRzmSPTXJQ4aaztAwtZnoabebJ+htCaZ7Cm535ByoqXKbX1WRc4Eh2MkRXWzImVc96Cj4VdOKVxR84VdQsIUM8Psoou2byVHyZFuq7O8otbSQ2UAoeEWTudATLGSpZzVLlXVkPU2Jc+27lsw2jmg5T5VhbeE3BT083K9WsTTkFU/Osi0rC5lRlpwRHUiesNS0sOvmqGML1aRbPAxTJD9ZKtxuob+hhl8cwYGWpJ8nub7t5p6coYbMovZ1BTdaKn1jYD6h4GFDNFyT/Kqe1XCXphXHOKLZmuRSRdBPEfVUXQzJm5YGPGGJdvAEr7hHNdGZnuBvrpciGmopOLf5N0uVMy0FfYToJk90uUCbJupaVpO53UJXR2bVpoU00V2KOo4zMFrBd0Jtz2pa0clT5Q5L8IpQ177mWQejPMEJhuQjS10ref6HHjdEhy1P1EYR7GtO0uSsKJQYLiTnG1rVScj5lyazpqWGl5uBbRWl7m6ixGOOnEsMJR7z8J0n6KMnCdxhiNYQCoZ6CmYLnO8omC3MkW3bktlPmEt/VQQHejL3+dOE5FlPdK/Mq8hZxxJtLyRrepLThYKbLZxkSb5W52vYxNOaOxUF0yxMUPwBTYqCzy01XayYK0sJyWBLqX0MwU5CzoymRzV0EjjeUeLgDpTo6ij42ZAzvD01dHUUTPLU96MdLbBME8nFBn7zJCMtJcZokn8YoqU0FS5WFKyniHobguMcmW8N0XkWZjkyN3hqOMtS08r+/xTBwpZSZ3qiVRX8SzMHHjfUNFjgHEPmY9PL3ykEzxkSre/1ZD6z/NuznuB0RcE1TWTm9zRgfUWVJiG6yrzgmWPXC8EAR4Wxhlad0ZbgQyEz3pG5RVEwwDJH2mgKpjcTiCOzn1lfUWANFbZ2BA8balnEweJC9J0iuaeZoI+ippFCztEKVvckR2iice1JvhVytrQwUAZpgsubCPaU7xUe9vWnaOpaSBEspalykhC9bUlOMpT42ZHca6hyrqKmw/wMR8H5ZmdFoBVJb03O4UL0tSNnvIeRmkrLWqrs78gcrEn2tpcboh0UPOW3UUR9PMk4T4nnNKWmCjlrefhCwxRNztfmIQVdDElvS4m1/WuOujoZCs5XVOjtKPGokJzsYCtFYoWonSPT21DheU/wWhM19FcElwqNGOsp9Q8N/cwXaiND1MmeL1Q5XROtYYgGeFq1aTMsoMmcrKjQrOFQTQ1fmBYhmW6o8Jkjc7iDJRTBIo5kgJD5yMEYA3srCg7VFKwiVJkmRCc5ohGOKhsYMn/XBLdo5taZjlb9YAlGWRimqbCsoY7HFAXLa5I1HPRxMMsQDHFkWtRNniqT9UEeNjcE7RUlrCJ4R2CSJuqlKHWvJXjAUNcITYkenuBRB84TbeepcqTj3zZyFJzgYQdHnqfgI0ddUwS6GqWpsKWhjq9cV0vBAEMN2znq+EBfIWT+pClYw5xsTlJU6GeIBsjGmmANTzJZiIYpgrM0Oa8ZMjd7NP87jxhqGOhJlnQtjuQpB+8aEE00wZFznSJPyHxgH3HkPOsJFvYk8zqCHzTs1BYOa4J3PFU+UVRZxlHDM4YavlNUuMoRveiZA2d7grMNc2g+RbSCEKzmgYsUmWmazFJyoiOZ4KnyhKOGRzWJa0+moyV4TVHDzn51Awtqaphfk/lRQ08FX1iiqxTB/kLwd0VynKfEvI6cd4XMV5bMhZ7gZUWVzYQ6Nm2BYzxJbw3bGthEUUMfgbGeorae6DxHtJoZ6alhZ0+ytiVoK1R4z5PTrOECT/SugseEOlb1MMNR4VRNcJy+V1Hg9ONClSZFZjdHlc6W6FBLdJja2MC5hhpu0DBYEY1TFGwiFAxRRCsYkiM9JRb0JNMVkW6CZYT/2EiTGWmo8k+h4FhDNE7BvppoTSFnmCV5xZKzvcCdDo7VVPnIU+I+Rc68juApC90MwcFCsJ5hDqxgScYKreruyQwTqrzoqDCmhWi4IbhB0Yrt3RGa6GfDv52rKXWhh28dyZaWUvcZeMTBaZoSGyiCtRU5J8iviioHaErs7Jkj61syVzTTgOcUOQ8buFBTYWdL5g3T4qlpe0+wvD63heAXRfCCIed9RbCsp2CiI7raUOYOTU13N8PNHvpaGvayo4a3LLT1lDrVEPT2zLUlheB1R+ZTRfKWJ+dcocLJfi11vyJ51lLqJ0WD7tRwryezjiV5W28uJO9qykzX8JDe2lHl/9oyBwa2UMfOngpXCixvKdXTk3wrsKmiVYdZIqsoWEERjbcUNDuiaQomGoIbFdEHmsyWnuR+IeriKDVLnlawlyNHKwKlSU631PKep8J4Q+ayjkSLKYLhalNHlYvttb6fHm0p6OApsZ4l2VfdqZkjuysy6ysKLlckf1KUutCTs39bmCgEyyoasIWlVaMF7mgmWtBT8Kol5xpH9IGllo8cJdopcvZ2sImlDmMIbtDk3KIpeNiS08lQw11NFPTwVFlPP6pJ2gvRfI7gQUfmNAtf6Gs0wQxDsKGlVBdF8rCa3jzdwMaGHOsItrZk7hAyOzpK9VS06j5F49b0VNGOOfKs3lDToMsMBe9ZWtHFEgxTJLs7qrygKZjUnmCYoeAqeU6jqWuLJup4WghOdvCYJnrSkSzoyRkm5M2StQwVltPkfCAk58tET/CSg+8MUecmotMEnhBKfWBIZsg2ihruMJQaoIm+tkTLKEqspMh00w95gvFCQRtDwTT1gVDDSEVdlwqZfxoQRbK0g+tbiBZxzKlpnpypejdDwTaeOvorMk/IJE10h9CqRe28hhLbe0pMsdSwv4ZbhKivo2BjDWfL8UKJgeavwlwb5KlwhyE4u4XkGE2ytZCznKLCDZZq42VzT8HLCrpruFbIfOIINmh/qCdZ1ZBc65kLHR1Bkyf5zn6pN3SvGKIlFNGplhrO9QSXanLOMQTLCa0YJCRrCZm/CZmrLTm7WzCK4GJDiWUdFeYx1LCFg3NMd0XmCuF3Y5rITLDUsYS9zoHVzwnJoYpSTQoObyEzr4cFBNqYTopoaU/wkyLZ2lPhX/5Y95ulxGTV7KjhWrOZgl8MyUUafjYraNjNU1N3IWcjT5WzWqjwtoarHSUObGYO3GCJZpsBlnJGPd6ZYLyl1GdCA2625IwwJDP8GUKymbzuyPlZlvTUsaUh5zFDhRWFzPKKZLAlWdcQbObgF9tOqOsmB1dqcqYJmWstFbZRRI9poolmqiLnU0POvxScpah2iSL5UJNzgScY5+AuIbpO0YD3NCW+dLMszFSdFCWGqG6eVq2uYVNDdICGD6W7EPRWZEY5gpsE9rUkS3mijzzJnm6UpUFXG1hCUeVoS5WfNcFpblELL2qqrCvMvRfd45oalvKU2tiQ6ePJOVMRXase9iTtLJztPxJKLWpo2CRDcJwn2sWSLKIO1WQWNTCvpVUvOZhgSC40JD0dOctaSqzkCRbXsKlb11Oip6PCJ0IwSJM31j3akRxlP7Rwn6aGaUL0qiLnJkvB3xWZ2+Q1TfCwpQH3G0o92UzmX4o/oJNQMMSQc547wVHhdk+VCw01DFYEnTxzZKAm74QmeNNR1w6WzEhNK15VJzuCdxQ53dRUDws5KvwgBMOEgpcVNe0hZI6RXT1Jd0cyj5nsaEAHgVmGaJIlWdsc5Ui2ElrRR6jrRAttNMEAIWrTDFubkZaok7/AkzfIwfuWVq0jHzuCK4QabtLUMVPB3kJ0oyHTSVFlqMALilJf2Rf8k5aaHtMfayocLBS8L89oKoxpJvnAkDPa0qp5DAUTHKWmCcnthlou8iCKaFFLHWcINd1nyIwXqrSxMNmSs6KmoL2QrKuWtlQ5V0120xQ5vRyZS1rgFkWwhiOwiuQbR0OOVhQM9iS3tiXp4RawRPMp5tDletOOBL95MpM01dZTBM9pkn5qF010rIeHFcFZhmSGpYpTsI6nwhqe5C9ynhlpp5ophuRb6WcJFldkVnVEwwxVfrVkvnWUuNLCg5bgboFHPDlDPDmnK7hUrWiIbjadDclujlZcaokOFup4Ri1kacV6jmrrK1hN9bGwpKEBQ4Q6DvIUXOmo6U5LqQM6EPyiKNjVkPnJkDPNEaxhiFay5ExW1NXVUGqcpYYdPcGiCq7z/TSlbhL4pplWXKd7NZO5QQFrefhRQW/NHOsqcIglc4UhWklR8K0QzbAw08CBDnpbgqXdeD/QUsM4RZXDFBW6WJKe/mFPdH0LtBgiq57wFLzlyQzz82qYx5D5WJP5yVJDW01BfyHnS6HKO/reZqId1WGa4Hkh2kWodJ8i6KoIPlAj2hPt76CzXsVR6koPRzWTfKqIentatYpQw2me4AA3y1Kind3SwoOKZDcFXTwl9tWU6mfgRk9d71sKtlNwrjnYw5tC5n5LdKiGry3JKNlHEd3oaMCFHrazBPMp/uNJ+V7IudcSbeOIdjUEdwl0VHCOZo5t6YluEuaC9mQeMgSfOyKnYGFHcIeQ84yQWbuJYJpZw5CzglDH7gKnWqqM9ZTaXcN0TeYhR84eQtJT76JJ1lREe7WnnvsMmRc9FQ7SBBM9mV3lCUdmHk/S2RAMt0QjFNFqQpWjDPQ01DXWUdDBkXziKPjGEP3VP+zIWU2t7im41FOloyWzn/L6dkUy3VLDaZ6appgDLHPjJEsyvJngWEPUyVBiAaHCTEXwrLvSEbV1e1gKJniicWorC1MUrVjB3uDhJE/wgSOzk1DXpk0k73qCM8xw2UvD5kJmDUfOomqMpWCkJRlvKXGmoeBm18USjVIk04SClxTB6YrgLAPLWYK9HLUt5cmc0vYES8GnTeRc6skZbQkWdxRsIcyBRzx1DbTk9FbU0caTPOgJHhJKnOGIVhQqvKmo0llRw9sabrZkDtdg3PqaKi9oatjY8B+G371paMg6+mZFNNtQ04mWBq3rYLOmtWWQp8KJnpy9DdFensyjdqZ+yY40VJlH8wcdLzC8PZnvHMFUTZUrDTkLyQaGus5X5LzpYAf3i+e/ZlhqGqWhh6Ou6xTR9Z6oi5AZZtp7Mj2EEm8oSpxiYZCHU/1fbGdNNNRRoZMhmilEb2gqHOEJDtXkHK/JnG6IrvbPCwV3NhONVdS1thBMs1T4QOBcTWa2IzhMk2nW5Kyn9tXUtpv9RsG2msxk+ZsQzRQacJncpgke0+T8y5Fzj8BiGo7XlJjaTIlpQs7KFjpqGnKuoyEPeIKnFMkZHvopgh81ySxNFWvJWcKRs70j2FOT012IllEEO1n4pD1513Yg2ssQPOThOkvyrqHUdEXOSEsihmBbTbKX1kLBPWqWkLOqJbjB3GBIZmoa8qWl4CG/iZ7oiA72ZL7TJNeZUY7kFQftDcHHluBzRbCegzMtrRjVQpX2lgoPKKLJAkcbMl01XK2p7yhL8pCBbQ3BN2avJgKvttcrWDK3CiUOVxQ8ZP+pqXKyIxnmBymCg5vJjNfkPK4+c8cIfK8ocVt7kmfd/I5SR1hKvCzUtb+lhgc00ZaO6CyhIQP1Uv4yIZjload72PXX0OIJvnFU+0Zf6MhsJwTfW0r0UwQfW4LNLZl5HK261JCZ4qnBaAreVAS3WrjV0LBnNDUNNDToCEeFfwgcb4gOEqLRhirWkexrCEYKVV711DLYEE1XBEsp5tpTGjorkomKYF9FDXv7fR3BGwbettSxnyL53MBPjsxDZjMh+VUW9NRxq1DhVk+FSxQcaGjV9Pawv6eGByw5qzoy7xk4RsOShqjJwWKe/1pEEfzkobeD/dQJmpqedcyBTy2sr4nGNRH0c0SPWTLrqAc0OQcb/gemKgqucQT7ySWKCn2EUotoCvpZct7RO2sy/QW0IWcXd7pQRQyZVwT2USRO87uhjioTLKV2brpMUcMQRbKH/N2T+UlTpaMls6cmc6CCNy3JdYYSUzzJQ4oSD3oKLncULOiJvjBEC2oqnCJkJluCYy2ZQ5so9YYlZ1VLlQU1mXEW1jZERwj/MUSRc24TdexlqLKfQBtDTScJUV8FszXBEY5ktpD5Ur9hYB4Nb1iikw3JoYpkKX+RodRKFt53MMuRnKSpY31PwYaGaILh3wxJGz9TkTPEETxoCWZrgvOlmyMzxFEwVJE5xZKzvyJ4WxEc16Gd4Xe3Weq4XH2jKRikqOkGQ87hQnC7wBmGYLAnesX3M+S87eFATauuN+Qcrh7xIxXJbUIdMw3JGE3ylCWzrieaqCn4zhGM19TQ3z1oH1AX+pWEqIc7wNGAkULBo/ZxRaV9NNyh4Br3rCHZzbzmSfawBL0dNRwpW1kK9mxPXR9povcdrGSZK9c2k0xwFGzjuniCtRSZCZ6ccZ7gaktmgAOtKbG/JnOkJrjcQTdFMsxRQ2cLY3WTIrlCw1eWKn8R6pvt4GFDso3QoL4a3nLk3G6JrtME3dSenpx7PNFTmga0EaJTLQ061sEeQoWXhSo9LTXsaSjoJQRXeZLtDclbCrYzfzHHeaKjHCVOUkQHO3JeEepr56mhiyaYYKjjNU+Fed1wS5VlhWSqI/hYUdDOkaxiKehoyOnrCV5yBHtbWFqTHCCwtpDcYolesVR5yUzTZBb3RNMd0d6WP+SvhuBmRcGxnuQzT95IC285cr41cLGQ6aJJhmi4TMGempxeimBRQw1tFKV+8jd6KuzoSTqqDxzRtpZkurvKEHxlqXKRIjjfUNNXQsNOsRScoWFLT+YeRZVD3GRN0MdQcKqQjHDMrdGGVu3iYJpQx3WGUvfbmxwFfR20WBq0oYY7LMFhhgYtr8jpaEnaOzjawWWaTP8mMr0t/EPDPoqcnxTBI5o58L7uoWnMrpoqPwgVrlAUWE+V+TQl9rawoyP6QGAlQw2TPRX+YSkxyBC8Z6jhHkXBgQL7WII3DVFnRfCrBfxewv9D6xsyjys4VkhWb9pUU627JllV0YDNHMku/ldNMMXDEo4aFnAkk4U6frNEU4XgZUPmEKHUl44KrzmYamjAbh0JFvGnaTLPu1s9jPCwjFpYiN7z1DTOk/nc07CfDFzmCf7i+bfNHXhDtLeBXzTBT5rkMvWOIxpl4EMh2LGJBu2syDnAEx2naEhHDWMMzPZEhygyS1mS5RTJr5ZkoKbEUoYqr2kqdDUE8ztK7OaIntJkFrIECwv8LJTaVx5XJE86go8dFeZ3FN3rjabCAYpoYEeC9zzJVULBbmZhDyd7ko09ydpNZ3nm2Kee4FPPXHnYEF1nqOFEC08LUVcDvYXkJHW8gTaKCk9YGOeIJhqiE4ToPEepdp7IWFjdwnWaufGMwJJCMtUTTBBK9BGCOy2tGGrJTHIwyEOzp6aPzNMOtlZkDvcEWpP5SVNhfkvDxhmSazTJXYrM9U1E0xwFVwqZQwzJxw6+kGGGUj2FglGGmnb1/G51udRSMNlTw6GGnCcUwVcOpmsqTHa06o72sw1RL02p9z0VbnMLOaIX3QKaYKSCFQzBKEUNHTSc48k53RH9wxGMtpQa5KjjW0W0n6XCCCG4yxNNdhQ4R4l1Ff+2sSd6UFHiIEOyqqFgT01mEUMD+joy75jPhOA+oVVLm309FR4yVOlp4RhLiScNmSmaYF5Pw0STrOIoWMSR2UkRXOMp+M4SHW8o8Zoi6OZgjKOaFar8zZDzkWzvKOjkKBjmCXby8JahhjXULY4KlzgKLvAwxVGhvyd4zxB1d9T0piazmKLCVZY5sKiD0y2ZSYrkUEPUbIk+dlQ4SJHTR50k1DPaUWIdTZW9NJwnJMOECgd7ou/MnppMJ02O1VT4Wsh85MnZzcFTngpXGKo84qmwgKbCL/orR/SzJ2crA+t6Mp94KvxJUeIbT3CQu1uIdlQEOzlKfS3UMcrTiFmOuroocrZrT2AcmamOKg8YomeEKm/rlT2sociMaybaUlFhuqHCM2qIJ+rg4EcDFymiDSxzaHdPcpE62pD5kyM5SBMoA1PaUtfIthS85ig1VPiPPYXgYEMNk4Qq7TXBgo7oT57gPUdwgCHzhIVFPFU6OYJzHAX9m5oNrVjeE61miDrqQ4VSa1oiURTsKHC0IfjNwU2WzK6eqK8jWln4g15TVBnqmDteCJ501PGAocJhhqjZdtBEB6lnhLreFJKxmlKbeGrqLiSThVIbCdGzloasa6lpMQXHCME2boLpJgT7yWaemu6wBONbqGNVRS0PKIL7LckbjmQtR7K8I5qtqel+T/ChJTNIKLjdUMNIRyvOEko9YYl2cwQveBikCNawJKcLBbc7+JM92mysNvd/Fqp8a0k6CNEe7cnZrxlW0wQXaXjaktnRwNOGZKYiONwS7a1JVheq3WgJHlQUGKHKmp4KAxXR/ULURcNgoa4zhKSLpZR3kxRRb0NmD0OFn+UCS7CzI1nbP6+o4x47QZE5xRCt3ZagnYcvmpYQktXdk5YKXTzBC57kKEe0VVuiSYqapssMS3C9p2CKkHOg8B8Pa8p5atrIw3qezIWanMGa5HRDNF6RM9wcacl0N+Q8Z8hsIkSnaIIdHRUOEebAPy1zbCkhM062FCJtif7PU+UtoVXzWKqM1PxXO8cfdruhFQ/a6x3JKYagvVDhQEtNiyiiSQ7OsuRsZUku0CRNDs4Sog6KKjsZgk2bYJqijgsEenoKeniinRXBn/U3lgpPdyDZynQx8IiioMnCep5Ky8mjGs6Wty0l1hUQTcNWswS3WRp2kCNZwJG8omG8JphPUaFbC8lEfabwP7VtM9yoaNCAjpR41VNhrD9LkbN722v0CoZMByFzhaW+MyzRYEWFDQwN2M4/JiT76PuljT3VU/A36eaIThb+R9oZGOAJ9tewkgGvqOMNRWYjT/Cwu99Q8LqDE4TgbLWxJ1jaDDAERsFOFrobgjUsBScaguXU8kKm2RL19tRypSHnHNlHiIZqgufs4opgQdVdwxBNNFBR6kVFqb8ogimOzB6a6HTzrlDHEpYaxjiiA4TMQobkDg2vejjfwJGWmnbVFAw3H3hq2NyQfG7hz4aC+w3BbwbesG0swYayvpAs6++Ri1Vfzx93mFChvyN5xVHTS+0p9aqCAxyZ6ZacZyw5+7uuQkFPR9DDk9NOiE7X1PCYJVjVUqq7JlrHwWALF5nfHNGjApdpqgzx5OwilDhCiDYTgnc9waGW4BdLNNUQvOtpzDOWHDH8D7TR/A/85KljEQu3NREc4Pl/6B1Hhc8Umb5CsKMmGC9EPcxoT2amwHNCmeOEnOPbklnMkbOgIvO5UMOpQrS9UGVdt6iH/fURjhI/WOpaW9OKLYRod6HCUEdOX000wpDZQ6hwg6LgZfOqo1RfT/CrJzjekXOGhpc1VW71ZLbXyyp+93ILbC1kPtIEYx0FIx1VDrLoVzXRKRYWk809yYlC9ImcrinxtabKnzRJk3lAU1OLEN1j2zrYzr2myHRXJFf4h4QKT1qSTzTB5+ZNTzTRkAxX8FcLV2uS8eoQQ2aAkFzvCM72sJIcJET3WPjRk5wi32uSS9rfZajpWEvj9hW42F4o5NytSXYy8IKHay10VYdrcl4SkqscrXpMwyGOgtkajheSxdQqmpxP1L3t4R5PqasFnrQEjytq6qgp9Y09Qx9o4S1FzhUCn1kyHSzBWLemoSGvOqLNhZyBjmCaAUYpMgt4Ck7wBBMMwWKWgjsUwTaGVsxWC1mYoKiyqqeGKYqonSIRQ3KIkHO0pmAxTdBHkbOvfllfr+AA+7gnc50huVKYK393FOyg7rbPO/izI7hE4CnHHHnJ0ogNPRUGeUpsrZZTBJcrovUcJe51BPsr6GkJdhCCsZ6aTtMEb2pqWkqeVtDXE/QVggsU/Nl86d9RMF3DxvZTA58agu810RWawCiSzzXBeU3MMW9oyJUedvNEvQyNu1f10BSMddR1vaLCYpYa/mGocLSiYDcLbQz8aMn5iyF4xBNMs1P0QEOV7o5gaWGuzSeLue4tt3ro7y4Tgm4G/mopdZgl6q0o6KzJWE3mMksNr3r+a6CbT8g5wZNzT9O7fi/zpaOmnz3BRoqos+tv9zMbdpxsqDBOEewtJLt7cg5wtKKbvldpSzRRCD43VFheCI7yZLppggMVBS/KMAdHODJvOwq2NQSbKKKPLdFWQs7Fqo+mpl01JXYRgq8dnGLhTiFzqmWsUMdpllZdbKlyvSdYxhI9YghOtxR8LgSLWHK62mGGVoxzBE8LNWzqH9CUesQzFy5RQzTc56mhi6fgXEWwpKfE5Z7M05ZgZUPmo6auiv8YKzDYwWBLMErIbKHJvOwIrvEdhOBcQ9JdU1NHQ7CXn2XIDFBKU2WAgcX9UAUzDXWd5alwuyJ41Z9rjKLCL4aCp4WarhPm2rH+SaHUYE001JDZ2ZAzXPjdMpZWvC9wmqIB2lLhQ01D5jO06hghWMndbM7yRJMsoCj1vYbnFQVrW9jak3OlEJ3s/96+p33dEPRV5GxiqaGjIthUU6FFEZyqCa5qJrpBdzSw95IUnOPIrCUUjRZQFrbw5PR0R1qiYx3cb6nrWUMrBmmiBQxVHtTew5ICP/ip6g4hed/Akob/32wvBHsIOX83cI8hGeNeNPCIkPmXe8fPKx84OMSRM1MTdXSwjCZ4S30jVGhvqTRak/OVhgGazHuOCud5onEO1lJr6ecVyaOK6H7zqlBlIaHE0oroCgfvGJIdPcmfLNGLjpz7hZwZQpUbFME0A1cIJa7VNORkgfsMBatbKgwwJM9bSvQXeNOvbIjelg6WWvo5kvbKaJJNHexkKNHL9xRyFlH8Ti2riB5wVPhUk7nGkJnoCe428LR/wRGdYIlmWebCyxou1rCk4g/ShugBDX0V0ZQWkh0dOVsagkM0yV6OoLd5ye+pRlsCr0n+KiQrGuq5yJDzrTAXHtLUMduTDBVKrSm3eHL+6ijxhFDX9Z5gVU/wliHYTMiMFpKLNMEywu80wd3meoFmt6VbRMPenhrOc6DVe4pgXU8DnnHakLOIIrlF4FZPIw6R+zxBP0dyq6OOZ4Q5sLKCcz084ok+VsMMyQhNZmmBgX5xIXOEJTmi7VsGTvMTNdHHhpzdbE8Du2oKxgvBqQKdDDnTFOylCFaxR1syz2iqrOI/FEpNc3C6f11/7+ASS6l2inq2ciTrCCzgyemrCL5SVPjQkdPZUmGy2c9Sw9FtR1sS30RmsKPCS4rkIC/2U0MduwucYolGaPjKEyhzmiPYXagyWbYz8LWBDdzRimAXzxx4z8K9hpzlhLq+NiQ97HuKorMUfK/OVvC2JfiHUPCQI/q7J2gjK+tTDNxkCc4TMssqCs4TGtLVwQihyoAWgj9bosU80XGW6Ac9TJGziaUh5+hnFcHOnlaM1iRn29NaqGENTTTSUHCH2tWTeV0osUhH6psuVLjRUmGWhm6OZEshGeNowABHcJ2Bpy2ZszRcKkRXd2QuKVEeXnbfaEq825FguqfgfE2whlChSRMdron+LATTPQ2Z369t4B9C5gs/ylzv+CMmepIDPclFQl13W0rspPd1JOcbghGOEutqCv5qacURQl3dDKyvyJlqKXGPgcM9FfawJAMVmdcspcYKOZc4GjDYkFlK05olNMHyHn4zFNykyOxt99RkHlfwmiHo60l2EKI+mhreEKp080Tbug08BVPcgoqC5zWt+NLDTZ7oNSF51N1qie7Va3uCCwyZbkINf/NED6jzOsBdZjFN8oqG3wxVunqCSYYKf3EdhJyf9YWGf7tRU2oH3VHgPr1fe5J9hOgHd7xQ0y7qBwXr23aGErP0cm64JVjZwsOGqL+mhNgZmhJLW2oY4UhedsyBgzrCKrq7BmcpNVhR6jBPq64Vgi+kn6XE68pp8J5/+0wRHGOpsKenQn9DZntPzjRLZpDAdD2fnSgkG9tmIXnUwQ6WVighs7Yi2MxQ0N3CqYaCXkJ0oyOztMDJjmSSpcpvlrk0RMMOjmArQ04PRV1DO1FwhCVaUVPpKUM03JK5SxPsIWRu8/CGHi8UHChiqGFDTbSRJWeYUDDcH6vJWUxR4k1FXbMUwV6e4AJFXS8oMqsZKqzvYQ9DDQdZckY4aGsIhtlubbd2r3j4QBMoTamdPZk7O/Bf62lacZwneNjQoGcdVU7zJOd7ghsUHOkosagic6cnWc8+4gg285R6zZP5s1/LUbCKIznTwK36PkdwlOrl4U1LwfdCCa+IrvFkmgw1PCAUXKWo0sURXWcI2muKJlgyFzhynCY4RBOsqCjoI1R5zREco0n2Vt09BQtYSizgKNHfUmUrQ5UOCh51BFcLmY7umhYqXKQomOop8bUnWNNQcIiBcYaC6xzMNOS8JQQfeqKBmmglB+97ok/lfk3ygaHSyZaCRTzRxQo6GzLfa2jWBPepw+UmT7SQEJyiyRkhBLMVOfcoMjcK0eZChfUNzFAUzCsEN5vP/X1uP/n/aoMX+K+nw/Hjr/9xOo7j7Pju61tLcgvJpTWXNbfN5jLpi6VfCOviTktKlFusQixdEKWmEBUKNaIpjZRSSOXSgzaaKLdabrm1/9nZ+/f+vd/vz/v9+Xy+zZ7PRorYoZqyLrCwQdEAixxVOEXNNnjX2nUSRlkqGmWowk8lxR50JPy9Bo6qJXaXwNvREBvnThPEPrewryLhcAnj5WE15Fqi8W7R1sAuEu86S4ENikItFN4xkv9Af4nXSnUVcLiA9xzesFpivRRVeFKtsMRaKBhuSbjOELnAUtlSQUpXgdfB4Z1oSbnFEetbQ0IrAe+Y+pqnDcEJFj6S8LDZzZHwY4e3XONNlARraomNEt2bkvGsosA3ioyHm+6jCMbI59wqt4eeara28IzEmyPgoRaUOEDhTVdEJhmCoTWfC0p8aNkCp0oYqih2iqGi4yXeMkOsn4LdLLnmKfh/YogjNsPebeFGR4m9BJHLzB61XQ3BtpISfS2FugsK9FAtLWX1dCRcrCnUp44CNzuCowUZmxSRgYaE6Za0W2u/E7CVXCiI/UOR8aAm1+OSyE3mOUcwyc1zBBeoX1kiKy0Zfxck1Gsyulti11i83QTBF5Kg3pDQThFMVHiPSlK+0cSedng/VaS8bOZbtsBcTcZAR8JP5KeqQ1OYKAi20njdNNRpgnsU//K+JnaXJaGTomr7aYIphoRn9aeShJWKEq9LcozSF7QleEfDI5LYm5bgVkFkRwVDBCVu0DDIkGupo8TZBq+/pMQURYErJQmPKGKjNDkWOLx7Jd5QizdUweIaKrlP7SwJDhZvONjLkOsBBX9UpGxnydhXkfBLQ8IxgojQbLFnJf81JytSljclYYyEFyx0kVBvKWOFJmONpshGAcsduQY5giVNCV51eOdJYo/pLhbvM0uDHSevNKRcrKZIqnCtJeEsO95RoqcgGK4ocZcho1tTYtcZvH41pNQ7vA0WrhIfOSraIIntIAi+NXWCErdbkvrWwjRLrt0NKUdL6KSOscTOdMSOUtBHwL6OLA0vNSdynaWQEnCpIvKaIrJJEbvHkmuNhn6OjM8VkSGSqn1uYJCGHnq9I3aLhNME3t6GjIkO7xrNFumpyTNX/NrwX7CrIRiqqWijI9JO4d1iieykyfiposQIQ8YjjsjlBh6oHWbwRjgYJQn2NgSnNycmJAk3NiXhx44Sxykihxm8ybUwT1OVKySc7vi3OXVkdBJ4AyXBeksDXG0IhgtYY0lY5ahCD0ehborIk5aUWRJviMA7Xt5kyRjonrXENkm8yYqgs8VzgrJmClK20uMM3jRJ0FiQICQF9hdETlLQWRIb5ki6WDfWRPobvO6a4GP5mcOrNzDFELtTkONLh9dXE8xypEg7z8A9jkhrQ6Fhjlg/QVktJXxt4WXzT/03Q8IaQWSqIuEvloQ2mqC9Jfi7wRul4RX3pSPlzpoVlmCtI2jvKHCFhjcM3sN6lqF6HxnKelLjXWbwrpR4xzuCrTUZx2qq9oAh8p6ixCUGr78g8oyjRAtB5CZFwi80VerVpI0h+IeBxa6Zg6kWvpDHaioYYuEsRbDC3eOmC2JvGYLeioxGknL2UATNJN6hmtj1DlpLvDVmocYbrGCVJKOrg4X6DgddLA203BKMFngdJJFtFd7vJLm6KEpc5yjQrkk7M80SGe34X24nSex1Ra5Omgb71JKyg8SrU3i/kARKwWpH0kOGhKkObyfd0ZGjvyXlAkVZ4xRbYJ2irFMkFY1SwyWxr2oo4zlNiV+7zmaweFpT4kR3kaDAFW6xpSqzJay05FtYR4HmZhc9UxKbbfF2V8RG1MBmSaE+kmC6JnaRXK9gsiXhJHl/U0qM0WTcbyhwkYIvFGwjSbjfwhiJt8ZSQU+Bd5+marPMOkVkD0muxYLIfEuhh60x/J92itguihJSEMySVPQnTewnEm+620rTQEMsOfo4/kP/0ARvWjitlpSX7GxBgcMEsd3EEeYWvdytd+Saawi6aCIj1CkGb6Aj9rwhx16Cf3vAwFy5pyLhVonXzy51FDpdEblbkdJbUcEPDEFzQ8qNmhzzLTmmKWKbFCXeEuRabp6rxbvAtLF442QjQ+wEA9eL1xSR7Q0JXzlSHjJ4exq89yR0laScJ/FW6z4a73pFMEfDiRZvuvijIt86RaSFOl01riV2mD1UEvxGk/Geg5aWwGki1zgKPG9J2U8PEg8qYvMsZeytiTRXBMslCU8JSlxi8EabjwUldlDNLfzTUmCgxWsjqWCOHavYAqsknKFIO0yQ61VL5AVFxk6WhEaCAkdJgt9aSkzXlKNX2jEa79waYuc7gq0N3GDJGCBhoiTXUEPsdknCUE1CK0fwsiaylSF2uiDyO4XX3pFhNd7R4itFGc0k/ElBZwWvq+GC6szVeEoS/MZ+qylwpKNKv9Z469UOjqCjwlusicyTxG6VpNxcQ8IncoR4RhLbR+NdpGGmJWOcIzJGUuKPGpQg8rrG21dOMqQssJQ4RxH5jaUqnZuQ0F4Q+cjxLwPtpZbIAk3QTJHQWBE5S1BokoVtDd6lhqr9UpHSUxMcIYl9pojsb8h4SBOsMQcqvOWC2E8EVehqiJ1hrrAEbQxeK0NGZ0Gkq+guSRgniM23bIHVkqwx4hiHd7smaOyglyIyQuM978j4VS08J/A2G1KeMBRo4fBaSNhKUEZfQewVQ/C1I+MgfbEleEzCUw7mKXI0M3hd1EESVji8x5uQ41nxs1q4RMJCCXs7Iq9acpxn22oSDnQ/sJTxsCbHIYZiLyhY05TY0ZLIOQrGaSJDDN4t8pVaIrsqqFdEegtizc1iTew5Q4ayBDMUsQMkXocaYkc0hZua412siZ1rSXlR460zRJ5SlHGe5j801RLMlJTxtaOM3Q1pvxJ45zUlWFD7rsAbpfEm1JHxG0eh8w2R7QQVzBUw28FhFp5QZzq8t2rx2joqulYTWSuJdTYfWwqMFMcovFmSyJPNyLhE4E10pHzYjOC3huArRa571ZsGajQpQx38SBP5pyZB6lMU3khDnp0MBV51BE9o2E+TY5Ml2E8S7C0o6w1xvCZjf0HkVEHCzFoyNmqC+9wdcqN+Tp7jSDheE9ws8Y5V0NJCn2bk2tqSY4okdrEhx1iDN8cSudwepWmAGXKcJXK65H9to8jYQRH7SBF01ESUJdd0TayVInaWhLkOjlXE5irKGOnI6GSWGCJa482zBI9rCr0jyTVcEuzriC1vcr6mwFGSiqy5zMwxBH/TJHwjSPhL8+01kaaSUuMFKTcLEvaUePcrSmwn8DZrgikWb7CGPxkSjhQwrRk57tctmxLsb9sZvL9LSlyuSLlWkqOjwduo8b6Uv1DkmudIeFF2dHCgxVtk8dpIvHpBxhEOdhKk7OLIUSdJ+cSRY57B+0DgGUUlNfpthTfGkauzxrvTsUUaCVhlKeteTXCoJDCa2NOKhOmC4G1H8JBd4OBZReSRGkqcb/CO1PyLJTLB4j1q8JYaIutEjSLX8YKM+a6phdMsdLFUoV5RTm9JSkuDN8WcIon0NZMNZWh1q8C7SJEwV5HxrmnnTrf3KoJBlmCYI2ilSLlfEvlE4011NNgjgthzEua0oKK7JLE7HZHlEl60BLMVFewg4EWNt0ThrVNEVkkiTwpKXSWJzdRENgvKGq4IhjsiezgSFtsfCUq8qki5S1LRQeYQQ4nemmCkImWMw3tFUoUBZk4NOeZYEp4XRKTGa6wJjrWNHBVJR4m3FCnbuD6aak2WsMTh3SZImGCIPKNgsDpVwnsa70K31lCFJZYcwwSMFcQulGTsZuEaSdBXkPGZhu0FsdUO73RHjq8MPGGIfaGIbVTk6iuI3GFgucHrIQkmWSJdBd7BBu+uOryWAhY7+Lki9rK5wtEQzWwvtbqGhIMFwWRJsElsY4m9IIg9L6lCX0VklaPAYkfkZEGDnOWowlBJjtMUkcGK4Lg6EtoZInMUBVYLgn0UsdmCyCz7gIGHFfk+k1QwTh5We7A9x+IdJ6CvIkEagms0hR50eH9UnTQJ+2oiKyVlLFUE+8gBGu8MQ3CppUHesnjTHN4QB/UGPhCTHLFPHMFrCqa73gqObUJGa03wgbhHkrCfpEpzNLE7JDS25FMKhlhKKWKfCgqstLCPu1zBXy0J2ztwjtixBu8UTRn9LVtkmCN2iyFhtME70JHRQ1KVZXqKI/KNIKYMCYs1GUMEKbM1bKOI9LDXC7zbHS+bt+1MTWS9odA9DtrYtpbImQJ2VHh/lisEwaHqUk1kjKTAKknkBEXkbkdMGwq0dnhzLJF3NJH3JVwrqOB4Sca2hti75nmJN0WzxS6UxDYoEpxpa4htVlRjkYE7DZGzJVU72uC9IyhQL4i8YfGWSYLLNcHXloyz7QhNifmKSE9JgfGmuyLhc403Xm9vqcp6gXe3xuuv8F6VJNxkyTHEkHG2g0aKXL0MsXc1bGfgas2//dCONXiNLCX+5mB7eZIl1kHh7ajwpikyzlUUWOVOsjSQlsS+M0R+pPje/dzBXRZGO0rMtgQrLLG9VSu9n6CMXS3BhwYmSoIBhsjNBmZbgusE9BCPCP5triU4VhNbJfE+swSP27aayE8tuTpYYjtrYjMVGZdp2NpS1s6aBnKSHDsbKuplKbHM4a0wMFd/5/DmGyKrJSUaW4IBrqUhx0vyfzTBBLPIUcnZdrAkNsKR0sWRspumSns6Ch0v/qqIbBYUWKvPU/CFoyrDJGwSNFhbA/MlzKqjrO80hRbpKx0Jewsi/STftwGSlKc1JZyAzx05dhLEdnfQvhZOqiHWWEAHC7+30FuRcZUgaO5gpaIK+xsiHRUsqaPElTV40xQZQ107Q9BZE1nryDVGU9ZSQ47bmhBpLcYpUt7S+xuK/FiT8qKjwXYw5ypS2iuCv7q1gtgjhuBuB8LCFY5cUuCNtsQOFcT+4Ih9JX+k8Ea6v0iCIRZOtCT0Et00JW5UeC85Cg0ScK0k411HcG1zKtre3SeITBRk7WfwDhEvaYLTHP9le0m8By0JDwn4TlLW/aJOvGHxdjYUes+ScZigCkYQdNdEOhkiezgShqkx8ueKjI8lDfK2oNiOFvrZH1hS+tk7NV7nOmLHicGWEgubkXKdwdtZknCLJXaCpkrjZBtLZFsDP9CdxWsSr05Sxl6CMmoFbCOgryX40uDtamB7SVmXW4Ihlgpmq+00tBKUUa83WbjLUNkzDmY7cow1JDygyPGlhgGKYKz4vcV7QBNbJIgM11TUqZaMdwTeSguH6rOaw1JRKzaaGyxVm2EJ/uCIrVWUcZUkcp2grMsEjK+DMwS59jQk3Kd6SEq1d0S6uVmO4Bc1lDXTUcHjluCXEq+1OlBDj1pi9zgiXxnKuE0SqTXwhqbETW6RggMEnGl/q49UT2iCzgJvRwVXS2K/d6+ZkyUl7jawSVLit46EwxVljDZwoSQ20sDBihztHfk2yA8NVZghiXwrYHQdfKAOtzsayjhY9bY0yE2CWEeJ9xfzO423xhL5syS2TFJofO2pboHob0nY4GiAgRrvGQEDa/FWSsoaaYl0syRsEt3kWoH3B01shCXhTUWe9w3Bt44SC9QCh3eShQctwbaK2ApLroGCMlZrYqvlY3qYhM0aXpFkPOuoqJ3Dm6fxXrGwVF9gCWZagjPqznfkuMKQ8DPTQRO8ZqG1hPGKEm9IgpGW4DZDgTNriTxvFiq+Lz+0cKfp4wj6OCK9JSnzNSn9LFU7UhKZZMnYwcJ8s8yRsECScK4j5UOB95HFO0CzhY4xJxuCix0lDlEUeMdS6EZBkTsUkZ4K74dugyTXS7aNgL8aqjDfkCE0ZbwkCXpaWCKhl8P7VD5jxykivSyxyZrYERbe168LYu9ZYh86IkscgVLE7tWPKmJv11CgoyJltMEbrohtVAQfO4ImltiHEroYEs7RxAarVpY8AwXMcMReFOTYWe5iiLRQxJ5Q8DtJ8LQhWOhIeFESPGsILhbNDRljNbHzNRlTFbk2S3L0NOS6V1KFJYKUbSTcIIhM0wQ/s2TM0SRMNcQmSap3jCH4yhJZKSkwyRHpYYgsFeQ4U7xoCB7VVOExhXepo9ABBsYbvGWKXPME3lyH95YioZ0gssQRWWbI+FaSMkXijZXwgiTlYdPdkNLaETxlyDVIwqeaEus0aTcYcg0RVOkpR3CSJqIddK+90JCxzsDVloyrFd5ZAr4TBKfaWa6boEA7C7s6EpYaeFPjveooY72mjIccLHJ9HUwVlDhKkmutJDJBwnp1rvulJZggKDRfbXAkvC/4l3ozQOG9a8lxjx0i7nV4jSXc7vhe3OwIxjgSHjdEhhsif9YkPGlus3iLFDnWOFhtCZbJg0UbQcIaR67JjthoCyMEZRwhiXWyxO5QxI6w5NhT4U1WsJvDO60J34fW9hwzwlKij6ZAW9ne4L0s8C6XeBMEkd/LQy1VucBRot6QMlbivaBhoBgjqGiCJNhsqVp/S2SsG6DIONCR0dXhvWbJ+MRRZJkkuEjgDXJjFQW6SSL7GXK8Z2CZg7cVsbWGoKmEpzQ5elpiy8Ryg7dMkLLUEauzeO86CuwlSOlgYLojZWeJ9xM3S1PWfEfKl5ISLQ0MEKR8YOB2QfCxJBjrKPCN4f9MkaSsqoVXJBmP7EpFZ9UQfOoOFwSzBN4MQ8LsGrymlipcJQhmy0GaQjPqCHaXRwuCZwRbqK2Fg9wlClZqYicrIgMdZfxTQ0c7TBIbrChxmuzoKG8XRaSrIhhiyNFJkrC7oIAWMEOQa5aBekPCRknCo4IKPrYkvCDI8aYmY7WFtprgekcJZ3oLIqssCSMtFbQTJKwXYy3BY5oCh2iKPCpJOE+zRdpYgi6O2KmOAgvVCYaU4ySRek1sgyFhJ403QFHiVEmJHwtybO1gs8Hr5+BETQX3War0qZngYGgtVZtoqd6vFSk/UwdZElYqyjrF4HXUeFspIi9IGKf4j92pKGAdCYMVsbcV3kRF0N+R8LUd5PCsIGWoxDtBkCI0nKofdJQxT+LtZflvuc8Q3CjwWkq8KwUpHzkK/NmSsclCL0nseQdj5FRH5CNHSgtLiW80Of5HU9Hhlsga9bnBq3fEVltKfO5IaSTmGjjc4J0otcP7QsJUSQM8pEj5/wCuUuC2DWz8AAAAAElFTkSuQmCC"); +} diff --git a/pitfall/pdfkit/node_modules/codemirror/theme/the-matrix.css b/pitfall/pdfkit/node_modules/codemirror/theme/the-matrix.css new file mode 100644 index 00000000..9e60b7b0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/theme/the-matrix.css @@ -0,0 +1,26 @@ +.cm-s-the-matrix.CodeMirror { background: #000000; color: #00FF00; } +.cm-s-the-matrix span.CodeMirror-selected { background: #a8f !important; } +.cm-s-the-matrix .CodeMirror-gutters { background: #060; border-right: 2px solid #00FF00; } +.cm-s-the-matrix .CodeMirror-linenumber { color: #FFFFFF; } +.cm-s-the-matrix .CodeMirror-cursor { border-left: 1px solid #00FF00 !important; } + +.cm-s-the-matrix span.cm-keyword {color: #008803; font-weight: bold;} +.cm-s-the-matrix span.cm-atom {color: #3FF;} +.cm-s-the-matrix span.cm-number {color: #FFB94F;} +.cm-s-the-matrix span.cm-def {color: #99C;} +.cm-s-the-matrix span.cm-variable {color: #F6C;} +.cm-s-the-matrix span.cm-variable-2 {color: #C6F;} +.cm-s-the-matrix span.cm-variable-3 {color: #96F;} +.cm-s-the-matrix span.cm-property {color: #62FFA0;} +.cm-s-the-matrix span.cm-operator {color: #999} +.cm-s-the-matrix span.cm-comment {color: #CCCCCC;} +.cm-s-the-matrix span.cm-string {color: #39C;} +.cm-s-the-matrix span.cm-meta {color: #C9F;} +.cm-s-the-matrix span.cm-qualifier {color: #FFF700;} +.cm-s-the-matrix span.cm-builtin {color: #30a;} +.cm-s-the-matrix span.cm-bracket {color: #cc7;} +.cm-s-the-matrix span.cm-tag {color: #FFBD40;} +.cm-s-the-matrix span.cm-attribute {color: #FFF700;} +.cm-s-the-matrix span.cm-error {color: #FF0000;} + +.cm-s-the-matrix .CodeMirror-activeline-background {background: #040;} diff --git a/pitfall/pdfkit/node_modules/codemirror/theme/tomorrow-night-eighties.css b/pitfall/pdfkit/node_modules/codemirror/theme/tomorrow-night-eighties.css new file mode 100644 index 00000000..85c2a4a7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/theme/tomorrow-night-eighties.css @@ -0,0 +1,34 @@ +/* + + Name: Tomorrow Night - Eighties + Author: Chris Kempson + + CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-codemirror) + Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) + +*/ + +.cm-s-tomorrow-night-eighties.CodeMirror {background: #000000; color: #CCCCCC;} +.cm-s-tomorrow-night-eighties div.CodeMirror-selected {background: #2D2D2D !important;} +.cm-s-tomorrow-night-eighties .CodeMirror-gutters {background: #000000; border-right: 0px;} +.cm-s-tomorrow-night-eighties .CodeMirror-linenumber {color: #515151;} +.cm-s-tomorrow-night-eighties .CodeMirror-cursor {border-left: 1px solid #6A6A6A !important;} + +.cm-s-tomorrow-night-eighties span.cm-comment {color: #d27b53;} +.cm-s-tomorrow-night-eighties span.cm-atom {color: #a16a94;} +.cm-s-tomorrow-night-eighties span.cm-number {color: #a16a94;} + +.cm-s-tomorrow-night-eighties span.cm-property, .cm-s-tomorrow-night-eighties span.cm-attribute {color: #99cc99;} +.cm-s-tomorrow-night-eighties span.cm-keyword {color: #f2777a;} +.cm-s-tomorrow-night-eighties span.cm-string {color: #ffcc66;} + +.cm-s-tomorrow-night-eighties span.cm-variable {color: #99cc99;} +.cm-s-tomorrow-night-eighties span.cm-variable-2 {color: #6699cc;} +.cm-s-tomorrow-night-eighties span.cm-def {color: #f99157;} +.cm-s-tomorrow-night-eighties span.cm-bracket {color: #CCCCCC;} +.cm-s-tomorrow-night-eighties span.cm-tag {color: #f2777a;} +.cm-s-tomorrow-night-eighties span.cm-link {color: #a16a94;} +.cm-s-tomorrow-night-eighties span.cm-error {background: #f2777a; color: #6A6A6A;} + +.cm-s-tomorrow-night-eighties .CodeMirror-activeline-background {background: #343600 !important;} +.cm-s-tomorrow-night-eighties .CodeMirror-matchingbracket { text-decoration: underline; color: white !important;} diff --git a/pitfall/pdfkit/node_modules/codemirror/theme/twilight.css b/pitfall/pdfkit/node_modules/codemirror/theme/twilight.css new file mode 100644 index 00000000..19d6abad --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/theme/twilight.css @@ -0,0 +1,28 @@ +.cm-s-twilight.CodeMirror { background: #141414; color: #f7f7f7; } /**/ +.cm-s-twilight .CodeMirror-selected { background: #323232 !important; } /**/ + +.cm-s-twilight .CodeMirror-gutters { background: #222; border-right: 1px solid #aaa; } +.cm-s-twilight .CodeMirror-linenumber { color: #aaa; } +.cm-s-twilight .CodeMirror-cursor { border-left: 1px solid white !important; } + +.cm-s-twilight .cm-keyword { color: #f9ee98; } /**/ +.cm-s-twilight .cm-atom { color: #FC0; } +.cm-s-twilight .cm-number { color: #ca7841; } /**/ +.cm-s-twilight .cm-def { color: #8DA6CE; } +.cm-s-twilight span.cm-variable-2, .cm-s-twilight span.cm-tag { color: #607392; } /**/ +.cm-s-twilight span.cm-variable-3, .cm-s-twilight span.cm-def { color: #607392; } /**/ +.cm-s-twilight .cm-operator { color: #cda869; } /**/ +.cm-s-twilight .cm-comment { color:#777; font-style:italic; font-weight:normal; } /**/ +.cm-s-twilight .cm-string { color:#8f9d6a; font-style:italic; } /**/ +.cm-s-twilight .cm-string-2 { color:#bd6b18 } /*?*/ +.cm-s-twilight .cm-meta { background-color:#141414; color:#f7f7f7; } /*?*/ +.cm-s-twilight .cm-builtin { color: #cda869; } /*?*/ +.cm-s-twilight .cm-tag { color: #997643; } /**/ +.cm-s-twilight .cm-attribute { color: #d6bb6d; } /*?*/ +.cm-s-twilight .cm-header { color: #FF6400; } +.cm-s-twilight .cm-hr { color: #AEAEAE; } +.cm-s-twilight .cm-link { color:#ad9361; font-style:italic; text-decoration:none; } /**/ +.cm-s-twilight .cm-error { border-bottom: 1px solid red; } + +.cm-s-twilight .CodeMirror-activeline-background {background: #27282E !important;} +.cm-s-twilight .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;} diff --git a/pitfall/pdfkit/node_modules/codemirror/theme/vibrant-ink.css b/pitfall/pdfkit/node_modules/codemirror/theme/vibrant-ink.css new file mode 100644 index 00000000..0206225b --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/theme/vibrant-ink.css @@ -0,0 +1,30 @@ +/* Taken from the popular Visual Studio Vibrant Ink Schema */ + +.cm-s-vibrant-ink.CodeMirror { background: black; color: white; } +.cm-s-vibrant-ink .CodeMirror-selected { background: #35493c !important; } + +.cm-s-vibrant-ink .CodeMirror-gutters { background: #002240; border-right: 1px solid #aaa; } +.cm-s-vibrant-ink .CodeMirror-linenumber { color: #d0d0d0; } +.cm-s-vibrant-ink .CodeMirror-cursor { border-left: 1px solid white !important; } + +.cm-s-vibrant-ink .cm-keyword { color: #CC7832; } +.cm-s-vibrant-ink .cm-atom { color: #FC0; } +.cm-s-vibrant-ink .cm-number { color: #FFEE98; } +.cm-s-vibrant-ink .cm-def { color: #8DA6CE; } +.cm-s-vibrant-ink span.cm-variable-2, .cm-s-vibrant span.cm-tag { color: #FFC66D } +.cm-s-vibrant-ink span.cm-variable-3, .cm-s-vibrant span.cm-def { color: #FFC66D } +.cm-s-vibrant-ink .cm-operator { color: #888; } +.cm-s-vibrant-ink .cm-comment { color: gray; font-weight: bold; } +.cm-s-vibrant-ink .cm-string { color: #A5C25C } +.cm-s-vibrant-ink .cm-string-2 { color: red } +.cm-s-vibrant-ink .cm-meta { color: #D8FA3C; } +.cm-s-vibrant-ink .cm-builtin { color: #8DA6CE; } +.cm-s-vibrant-ink .cm-tag { color: #8DA6CE; } +.cm-s-vibrant-ink .cm-attribute { color: #8DA6CE; } +.cm-s-vibrant-ink .cm-header { color: #FF6400; } +.cm-s-vibrant-ink .cm-hr { color: #AEAEAE; } +.cm-s-vibrant-ink .cm-link { color: blue; } +.cm-s-vibrant-ink .cm-error { border-bottom: 1px solid red; } + +.cm-s-vibrant-ink .CodeMirror-activeline-background {background: #27282E !important;} +.cm-s-vibrant-ink .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;} diff --git a/pitfall/pdfkit/node_modules/codemirror/theme/xq-dark.css b/pitfall/pdfkit/node_modules/codemirror/theme/xq-dark.css new file mode 100644 index 00000000..4a0b2138 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/theme/xq-dark.css @@ -0,0 +1,49 @@ +/* +Copyright (C) 2011 by MarkLogic Corporation +Author: Mike Brevoort + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND 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. +*/ +.cm-s-xq-dark.CodeMirror { background: #0a001f; color: #f8f8f8; } +.cm-s-xq-dark .CodeMirror-selected { background: #27007A !important; } +.cm-s-xq-dark .CodeMirror-gutters { background: #0a001f; border-right: 1px solid #aaa; } +.cm-s-xq-dark .CodeMirror-linenumber { color: #f8f8f8; } +.cm-s-xq-dark .CodeMirror-cursor { border-left: 1px solid white !important; } + +.cm-s-xq-dark span.cm-keyword {color: #FFBD40;} +.cm-s-xq-dark span.cm-atom {color: #6C8CD5;} +.cm-s-xq-dark span.cm-number {color: #164;} +.cm-s-xq-dark span.cm-def {color: #FFF; text-decoration:underline;} +.cm-s-xq-dark span.cm-variable {color: #FFF;} +.cm-s-xq-dark span.cm-variable-2 {color: #EEE;} +.cm-s-xq-dark span.cm-variable-3 {color: #DDD;} +.cm-s-xq-dark span.cm-property {} +.cm-s-xq-dark span.cm-operator {} +.cm-s-xq-dark span.cm-comment {color: gray;} +.cm-s-xq-dark span.cm-string {color: #9FEE00;} +.cm-s-xq-dark span.cm-meta {color: yellow;} +.cm-s-xq-dark span.cm-qualifier {color: #FFF700;} +.cm-s-xq-dark span.cm-builtin {color: #30a;} +.cm-s-xq-dark span.cm-bracket {color: #cc7;} +.cm-s-xq-dark span.cm-tag {color: #FFBD40;} +.cm-s-xq-dark span.cm-attribute {color: #FFF700;} +.cm-s-xq-dark span.cm-error {color: #f00;} + +.cm-s-xq-dark .CodeMirror-activeline-background {background: #27282E !important;} +.cm-s-xq-dark .CodeMirror-matchingbracket {outline:1px solid grey; color:white !important;} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/codemirror/theme/xq-light.css b/pitfall/pdfkit/node_modules/codemirror/theme/xq-light.css new file mode 100644 index 00000000..20b5c796 --- /dev/null +++ b/pitfall/pdfkit/node_modules/codemirror/theme/xq-light.css @@ -0,0 +1,43 @@ +/* +Copyright (C) 2011 by MarkLogic Corporation +Author: Mike Brevoort + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND 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. +*/ +.cm-s-xq-light span.cm-keyword {line-height: 1em; font-weight: bold; color: #5A5CAD; } +.cm-s-xq-light span.cm-atom {color: #6C8CD5;} +.cm-s-xq-light span.cm-number {color: #164;} +.cm-s-xq-light span.cm-def {text-decoration:underline;} +.cm-s-xq-light span.cm-variable {color: black; } +.cm-s-xq-light span.cm-variable-2 {color:black;} +.cm-s-xq-light span.cm-variable-3 {color: black; } +.cm-s-xq-light span.cm-property {} +.cm-s-xq-light span.cm-operator {} +.cm-s-xq-light span.cm-comment {color: #0080FF; font-style: italic;} +.cm-s-xq-light span.cm-string {color: red;} +.cm-s-xq-light span.cm-meta {color: yellow;} +.cm-s-xq-light span.cm-qualifier {color: grey} +.cm-s-xq-light span.cm-builtin {color: #7EA656;} +.cm-s-xq-light span.cm-bracket {color: #cc7;} +.cm-s-xq-light span.cm-tag {color: #3F7F7F;} +.cm-s-xq-light span.cm-attribute {color: #7F007F;} +.cm-s-xq-light span.cm-error {color: #f00;} + +.cm-s-xq-light .CodeMirror-activeline-background {background: #e8f2ff !important;} +.cm-s-xq-light .CodeMirror-matchingbracket {outline:1px solid grey;color:black !important;background:yellow;} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/coffee-script/LICENSE b/pitfall/pdfkit/node_modules/coffee-script/LICENSE new file mode 100644 index 00000000..2b8b2288 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffee-script/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2009-2017 Jeremy Ashkenas + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +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. diff --git a/pitfall/pdfkit/node_modules/coffee-script/README.md b/pitfall/pdfkit/node_modules/coffee-script/README.md new file mode 100644 index 00000000..432c83ce --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffee-script/README.md @@ -0,0 +1,57 @@ + { + } } { + { { } } + } }{ { + { }{ } } _____ __ __ + { }{ }{ { } / ____| / _|/ _| + .- { { } { }} -. | | ___ | |_| |_ ___ ___ + ( { } { } { } } ) | | / _ \| _| _/ _ \/ _ \ + |`-..________ ..-'| | |___| (_) | | | || __/ __/ + | | \_____\___/|_| |_| \___|\___| + | ;--. + | (__ \ _____ _ _ + | | ) ) / ____| (_) | | + | |/ / | (___ ___ _ __ _ _ __ | |_ + | ( / \___ \ / __| '__| | '_ \| __| + | |/ ____) | (__| | | | |_) | |_ + | | |_____/ \___|_| |_| .__/ \__| + `-.._________..-' | | + |_| + +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 don’t 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 you’d 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 diff --git a/pitfall/pdfkit/node_modules/coffee-script/bin/cake b/pitfall/pdfkit/node_modules/coffee-script/bin/cake new file mode 100755 index 00000000..5965f4ee --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffee-script/bin/cake @@ -0,0 +1,7 @@ +#!/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(); diff --git a/pitfall/pdfkit/node_modules/coffee-script/bin/coffee b/pitfall/pdfkit/node_modules/coffee-script/bin/coffee new file mode 100755 index 00000000..3d1d71c8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffee-script/bin/coffee @@ -0,0 +1,7 @@ +#!/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/command').run(); diff --git a/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/browser.js b/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/browser.js new file mode 100644 index 00000000..da2a9467 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/browser.js @@ -0,0 +1,132 @@ +// Generated by CoffeeScript 1.12.5 +(function() { + var CoffeeScript, compile, runScripts, + indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; + + CoffeeScript = require('./coffee-script'); + + CoffeeScript.require = require; + + compile = CoffeeScript.compile; + + CoffeeScript["eval"] = function(code, options) { + if (options == null) { + options = {}; + } + if (options.bare == null) { + options.bare = true; + } + return eval(compile(code, options)); + }; + + CoffeeScript.run = function(code, options) { + if (options == null) { + options = {}; + } + options.bare = true; + options.shiftLine = true; + return Function(compile(code, options))(); + }; + + if (typeof window === "undefined" || window === null) { + return; + } + + if ((typeof btoa !== "undefined" && btoa !== null) && (typeof JSON !== "undefined" && JSON !== null)) { + compile = function(code, options) { + if (options == null) { + options = {}; + } + options.inlineMap = true; + return CoffeeScript.compile(code, options); + }; + } + + CoffeeScript.load = function(url, callback, options, hold) { + var xhr; + if (options == null) { + options = {}; + } + if (hold == null) { + hold = false; + } + options.sourceFiles = [url]; + xhr = window.ActiveXObject ? new window.ActiveXObject('Microsoft.XMLHTTP') : new window.XMLHttpRequest(); + xhr.open('GET', url, true); + if ('overrideMimeType' in xhr) { + xhr.overrideMimeType('text/plain'); + } + xhr.onreadystatechange = function() { + var param, ref; + if (xhr.readyState === 4) { + if ((ref = xhr.status) === 0 || ref === 200) { + param = [xhr.responseText, options]; + if (!hold) { + CoffeeScript.run.apply(CoffeeScript, param); + } + } else { + throw new Error("Could not load " + url); + } + if (callback) { + return callback(param); + } + } + }; + return xhr.send(null); + }; + + runScripts = function() { + var coffees, coffeetypes, execute, fn, i, index, j, len, s, script, scripts; + scripts = window.document.getElementsByTagName('script'); + coffeetypes = ['text/coffeescript', 'text/literate-coffeescript']; + coffees = (function() { + var j, len, ref, results; + results = []; + for (j = 0, len = scripts.length; j < len; j++) { + s = scripts[j]; + if (ref = s.type, indexOf.call(coffeetypes, ref) >= 0) { + results.push(s); + } + } + return results; + })(); + index = 0; + execute = function() { + var param; + param = coffees[index]; + if (param instanceof Array) { + CoffeeScript.run.apply(CoffeeScript, param); + index++; + return execute(); + } + }; + fn = function(script, i) { + var options, source; + options = { + literate: script.type === coffeetypes[1] + }; + source = script.src || script.getAttribute('data-src'); + if (source) { + return CoffeeScript.load(source, function(param) { + coffees[i] = param; + return execute(); + }, options, true); + } else { + options.sourceFiles = ['embedded']; + return coffees[i] = [script.innerHTML, options]; + } + }; + for (i = j = 0, len = coffees.length; j < len; i = ++j) { + script = coffees[i]; + fn(script, i); + } + return execute(); + }; + + if (window.addEventListener) { + window.addEventListener('DOMContentLoaded', runScripts, false); + } else { + window.attachEvent('onload', runScripts); + } + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/cake.js b/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/cake.js new file mode 100644 index 00000000..47fcb6b4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/cake.js @@ -0,0 +1,114 @@ +// Generated by CoffeeScript 1.12.5 +(function() { + var CoffeeScript, cakefileDirectory, fatalError, fs, helpers, missingTask, oparse, options, optparse, path, printTasks, switches, tasks; + + fs = require('fs'); + + path = require('path'); + + helpers = require('./helpers'); + + optparse = require('./optparse'); + + CoffeeScript = require('./coffee-script'); + + CoffeeScript.register(); + + tasks = {}; + + options = {}; + + switches = []; + + oparse = null; + + helpers.extend(global, { + task: function(name, description, action) { + var ref; + if (!action) { + ref = [description, action], action = ref[0], description = ref[1]; + } + return tasks[name] = { + name: name, + description: description, + action: action + }; + }, + option: function(letter, flag, description) { + return switches.push([letter, flag, description]); + }, + invoke: function(name) { + if (!tasks[name]) { + missingTask(name); + } + return tasks[name].action(options); + } + }); + + exports.run = function() { + var arg, args, e, i, len, ref, results; + global.__originalDirname = fs.realpathSync('.'); + process.chdir(cakefileDirectory(__originalDirname)); + args = process.argv.slice(2); + CoffeeScript.run(fs.readFileSync('Cakefile').toString(), { + filename: 'Cakefile' + }); + oparse = new optparse.OptionParser(switches); + if (!args.length) { + return printTasks(); + } + try { + options = oparse.parse(args); + } catch (error) { + e = error; + return fatalError("" + e); + } + ref = options["arguments"]; + results = []; + for (i = 0, len = ref.length; i < len; i++) { + arg = ref[i]; + results.push(invoke(arg)); + } + return results; + }; + + printTasks = function() { + var cakefilePath, desc, name, relative, spaces, task; + relative = path.relative || path.resolve; + cakefilePath = path.join(relative(__originalDirname, process.cwd()), 'Cakefile'); + console.log(cakefilePath + " defines the following tasks:\n"); + for (name in tasks) { + task = tasks[name]; + spaces = 20 - name.length; + spaces = spaces > 0 ? Array(spaces + 1).join(' ') : ''; + desc = task.description ? "# " + task.description : ''; + console.log("cake " + name + spaces + " " + desc); + } + if (switches.length) { + return console.log(oparse.help()); + } + }; + + fatalError = function(message) { + console.error(message + '\n'); + console.log('To see a list of all tasks/options, run "cake"'); + return process.exit(1); + }; + + missingTask = function(task) { + return fatalError("No such task: " + task); + }; + + cakefileDirectory = function(dir) { + var parent; + if (fs.existsSync(path.join(dir, 'Cakefile'))) { + return dir; + } + parent = path.normalize(path.join(dir, '..')); + if (parent !== dir) { + return cakefileDirectory(parent); + } + throw new Error("Cakefile not found in " + (process.cwd())); + }; + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/coffee-script.js b/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/coffee-script.js new file mode 100644 index 00000000..ee643b71 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/coffee-script.js @@ -0,0 +1,426 @@ +// Generated by CoffeeScript 1.12.5 +(function() { + var Lexer, SourceMap, base64encode, compile, ext, fn1, formatSourcePosition, fs, getSourceMap, helpers, i, len, lexer, packageJson, parser, path, ref, sourceMaps, sources, vm, withPrettyErrors, + hasProp = {}.hasOwnProperty; + + fs = require('fs'); + + vm = require('vm'); + + path = require('path'); + + Lexer = require('./lexer').Lexer; + + parser = require('./parser').parser; + + helpers = require('./helpers'); + + SourceMap = require('./sourcemap'); + + packageJson = require('../../package.json'); + + exports.VERSION = packageJson.version; + + exports.FILE_EXTENSIONS = ['.coffee', '.litcoffee', '.coffee.md']; + + exports.helpers = helpers; + + base64encode = function(src) { + switch (false) { + case typeof Buffer !== 'function': + return new Buffer(src).toString('base64'); + case typeof btoa !== 'function': + return btoa(encodeURIComponent(src).replace(/%([0-9A-F]{2})/g, function(match, p1) { + return String.fromCharCode('0x' + p1); + })); + default: + throw new Error('Unable to base64 encode inline sourcemap.'); + } + }; + + withPrettyErrors = function(fn) { + return function(code, options) { + var err; + if (options == null) { + options = {}; + } + try { + return fn.call(this, code, options); + } catch (error) { + err = error; + if (typeof code !== 'string') { + throw err; + } + throw helpers.updateSyntaxError(err, code, options.filename); + } + }; + }; + + sources = {}; + + sourceMaps = {}; + + exports.compile = compile = withPrettyErrors(function(code, options) { + var currentColumn, currentLine, encoded, extend, filename, fragment, fragments, generateSourceMap, header, i, j, js, len, len1, map, merge, newLines, ref, ref1, sourceMapDataURI, sourceURL, token, tokens, v3SourceMap; + merge = helpers.merge, extend = helpers.extend; + options = extend({}, options); + generateSourceMap = options.sourceMap || options.inlineMap || (options.filename == null); + filename = options.filename || ''; + sources[filename] = code; + if (generateSourceMap) { + map = new SourceMap; + } + tokens = lexer.tokenize(code, options); + options.referencedVars = (function() { + var i, len, results; + results = []; + for (i = 0, len = tokens.length; i < len; i++) { + token = tokens[i]; + if (token[0] === 'IDENTIFIER') { + results.push(token[1]); + } + } + return results; + })(); + if (!((options.bare != null) && options.bare === true)) { + for (i = 0, len = tokens.length; i < len; i++) { + token = tokens[i]; + if ((ref = token[0]) === 'IMPORT' || ref === 'EXPORT') { + options.bare = true; + break; + } + } + } + fragments = parser.parse(tokens).compileToFragments(options); + currentLine = 0; + if (options.header) { + currentLine += 1; + } + if (options.shiftLine) { + currentLine += 1; + } + currentColumn = 0; + js = ""; + for (j = 0, len1 = fragments.length; j < len1; j++) { + fragment = fragments[j]; + if (generateSourceMap) { + if (fragment.locationData && !/^[;\s]*$/.test(fragment.code)) { + map.add([fragment.locationData.first_line, fragment.locationData.first_column], [currentLine, currentColumn], { + noReplace: true + }); + } + newLines = helpers.count(fragment.code, "\n"); + currentLine += newLines; + if (newLines) { + currentColumn = fragment.code.length - (fragment.code.lastIndexOf("\n") + 1); + } else { + currentColumn += fragment.code.length; + } + } + js += fragment.code; + } + if (options.header) { + header = "Generated by CoffeeScript " + this.VERSION; + js = "// " + header + "\n" + js; + } + if (generateSourceMap) { + v3SourceMap = map.generate(options, code); + sourceMaps[filename] = map; + } + if (options.inlineMap) { + encoded = base64encode(JSON.stringify(v3SourceMap)); + sourceMapDataURI = "//# sourceMappingURL=data:application/json;base64," + encoded; + sourceURL = "//# sourceURL=" + ((ref1 = options.filename) != null ? ref1 : 'coffeescript'); + js = js + "\n" + sourceMapDataURI + "\n" + sourceURL; + } + if (options.sourceMap) { + return { + js: js, + sourceMap: map, + v3SourceMap: JSON.stringify(v3SourceMap, null, 2) + }; + } else { + return js; + } + }); + + exports.tokens = withPrettyErrors(function(code, options) { + return lexer.tokenize(code, options); + }); + + exports.nodes = withPrettyErrors(function(source, options) { + if (typeof source === 'string') { + return parser.parse(lexer.tokenize(source, options)); + } else { + return parser.parse(source); + } + }); + + exports.run = function(code, options) { + var answer, dir, mainModule, ref; + if (options == null) { + options = {}; + } + mainModule = require.main; + mainModule.filename = process.argv[1] = options.filename ? fs.realpathSync(options.filename) : ''; + mainModule.moduleCache && (mainModule.moduleCache = {}); + dir = options.filename != null ? path.dirname(fs.realpathSync(options.filename)) : fs.realpathSync('.'); + mainModule.paths = require('module')._nodeModulePaths(dir); + if (!helpers.isCoffee(mainModule.filename) || require.extensions) { + answer = compile(code, options); + code = (ref = answer.js) != null ? ref : answer; + } + return mainModule._compile(code, mainModule.filename); + }; + + exports["eval"] = function(code, options) { + var Module, _module, _require, createContext, i, isContext, js, k, len, o, r, ref, ref1, ref2, ref3, sandbox, v; + if (options == null) { + options = {}; + } + if (!(code = code.trim())) { + return; + } + createContext = (ref = vm.Script.createContext) != null ? ref : vm.createContext; + isContext = (ref1 = vm.isContext) != null ? ref1 : function(ctx) { + return options.sandbox instanceof createContext().constructor; + }; + if (createContext) { + if (options.sandbox != null) { + if (isContext(options.sandbox)) { + sandbox = options.sandbox; + } else { + sandbox = createContext(); + ref2 = options.sandbox; + for (k in ref2) { + if (!hasProp.call(ref2, k)) continue; + v = ref2[k]; + sandbox[k] = v; + } + } + sandbox.global = sandbox.root = sandbox.GLOBAL = sandbox; + } else { + sandbox = global; + } + sandbox.__filename = options.filename || 'eval'; + sandbox.__dirname = path.dirname(sandbox.__filename); + if (!(sandbox !== global || sandbox.module || sandbox.require)) { + Module = require('module'); + sandbox.module = _module = new Module(options.modulename || 'eval'); + sandbox.require = _require = function(path) { + return Module._load(path, _module, true); + }; + _module.filename = sandbox.__filename; + ref3 = Object.getOwnPropertyNames(require); + for (i = 0, len = ref3.length; i < len; i++) { + r = ref3[i]; + if (r !== 'paths' && r !== 'arguments' && r !== 'caller') { + _require[r] = require[r]; + } + } + _require.paths = _module.paths = Module._nodeModulePaths(process.cwd()); + _require.resolve = function(request) { + return Module._resolveFilename(request, _module); + }; + } + } + o = {}; + for (k in options) { + if (!hasProp.call(options, k)) continue; + v = options[k]; + o[k] = v; + } + o.bare = true; + js = compile(code, o); + if (sandbox === global) { + return vm.runInThisContext(js); + } else { + return vm.runInContext(js, sandbox); + } + }; + + exports.register = function() { + return require('./register'); + }; + + if (require.extensions) { + ref = this.FILE_EXTENSIONS; + fn1 = function(ext) { + var base; + return (base = require.extensions)[ext] != null ? base[ext] : base[ext] = function() { + throw new Error("Use CoffeeScript.register() or require the coffee-script/register module to require " + ext + " files."); + }; + }; + for (i = 0, len = ref.length; i < len; i++) { + ext = ref[i]; + fn1(ext); + } + } + + exports._compileFile = function(filename, sourceMap, inlineMap) { + var answer, err, raw, stripped; + if (sourceMap == null) { + sourceMap = false; + } + if (inlineMap == null) { + inlineMap = false; + } + raw = fs.readFileSync(filename, 'utf8'); + stripped = raw.charCodeAt(0) === 0xFEFF ? raw.substring(1) : raw; + try { + answer = compile(stripped, { + filename: filename, + sourceMap: sourceMap, + inlineMap: inlineMap, + sourceFiles: [filename], + literate: helpers.isLiterate(filename) + }); + } catch (error) { + err = error; + throw helpers.updateSyntaxError(err, stripped, filename); + } + return answer; + }; + + lexer = new Lexer; + + parser.lexer = { + lex: function() { + var tag, token; + token = parser.tokens[this.pos++]; + if (token) { + tag = token[0], this.yytext = token[1], this.yylloc = token[2]; + parser.errorToken = token.origin || token; + this.yylineno = this.yylloc.first_line; + } else { + tag = ''; + } + return tag; + }, + setInput: function(tokens) { + parser.tokens = tokens; + return this.pos = 0; + }, + upcomingInput: function() { + return ""; + } + }; + + parser.yy = require('./nodes'); + + parser.yy.parseError = function(message, arg) { + var errorLoc, errorTag, errorText, errorToken, token, tokens; + token = arg.token; + errorToken = parser.errorToken, tokens = parser.tokens; + errorTag = errorToken[0], errorText = errorToken[1], errorLoc = errorToken[2]; + errorText = (function() { + switch (false) { + case errorToken !== tokens[tokens.length - 1]: + return 'end of input'; + case errorTag !== 'INDENT' && errorTag !== 'OUTDENT': + return 'indentation'; + case errorTag !== 'IDENTIFIER' && errorTag !== 'NUMBER' && errorTag !== 'INFINITY' && errorTag !== 'STRING' && errorTag !== 'STRING_START' && errorTag !== 'REGEX' && errorTag !== 'REGEX_START': + return errorTag.replace(/_START$/, '').toLowerCase(); + default: + return helpers.nameWhitespaceCharacter(errorText); + } + })(); + return helpers.throwSyntaxError("unexpected " + errorText, errorLoc); + }; + + formatSourcePosition = function(frame, getSourceMapping) { + var as, column, fileLocation, filename, functionName, isConstructor, isMethodCall, line, methodName, source, tp, typeName; + filename = void 0; + fileLocation = ''; + if (frame.isNative()) { + fileLocation = "native"; + } else { + if (frame.isEval()) { + filename = frame.getScriptNameOrSourceURL(); + if (!filename) { + fileLocation = (frame.getEvalOrigin()) + ", "; + } + } else { + filename = frame.getFileName(); + } + filename || (filename = ""); + line = frame.getLineNumber(); + column = frame.getColumnNumber(); + source = getSourceMapping(filename, line, column); + fileLocation = source ? filename + ":" + source[0] + ":" + source[1] : filename + ":" + line + ":" + column; + } + functionName = frame.getFunctionName(); + isConstructor = frame.isConstructor(); + isMethodCall = !(frame.isToplevel() || isConstructor); + if (isMethodCall) { + methodName = frame.getMethodName(); + typeName = frame.getTypeName(); + if (functionName) { + tp = as = ''; + if (typeName && functionName.indexOf(typeName)) { + tp = typeName + "."; + } + if (methodName && functionName.indexOf("." + methodName) !== functionName.length - methodName.length - 1) { + as = " [as " + methodName + "]"; + } + return "" + tp + functionName + as + " (" + fileLocation + ")"; + } else { + return typeName + "." + (methodName || '') + " (" + fileLocation + ")"; + } + } else if (isConstructor) { + return "new " + (functionName || '') + " (" + fileLocation + ")"; + } else if (functionName) { + return functionName + " (" + fileLocation + ")"; + } else { + return fileLocation; + } + }; + + getSourceMap = function(filename) { + var answer; + if (sourceMaps[filename] != null) { + return sourceMaps[filename]; + } else if (sourceMaps[''] != null) { + return sourceMaps['']; + } else if (sources[filename] != null) { + answer = compile(sources[filename], { + filename: filename, + sourceMap: true, + literate: helpers.isLiterate(filename) + }); + return answer.sourceMap; + } else { + return null; + } + }; + + Error.prepareStackTrace = function(err, stack) { + var frame, frames, getSourceMapping; + getSourceMapping = function(filename, line, column) { + var answer, sourceMap; + sourceMap = getSourceMap(filename); + if (sourceMap != null) { + answer = sourceMap.sourceLocation([line - 1, column - 1]); + } + if (answer != null) { + return [answer[0] + 1, answer[1] + 1]; + } else { + return null; + } + }; + frames = (function() { + var j, len1, results; + results = []; + for (j = 0, len1 = stack.length; j < len1; j++) { + frame = stack[j]; + if (frame.getFunction() === exports.run) { + break; + } + results.push(" at " + (formatSourcePosition(frame, getSourceMapping))); + } + return results; + })(); + return (err.toString()) + "\n" + (frames.join('\n')) + "\n"; + }; + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/command.js b/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/command.js new file mode 100644 index 00000000..3efd7883 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/command.js @@ -0,0 +1,610 @@ +// Generated by CoffeeScript 1.12.5 +(function() { + var BANNER, CoffeeScript, EventEmitter, SWITCHES, compileJoin, compileOptions, compilePath, compileScript, compileStdio, exec, findDirectoryIndex, forkNode, fs, helpers, hidden, joinTimeout, makePrelude, mkdirp, notSources, optionParser, optparse, opts, outputPath, parseOptions, path, printLine, printTokens, printWarn, ref, removeSource, removeSourceDir, silentUnlink, sourceCode, sources, spawn, timeLog, usage, useWinPathSep, version, wait, watch, watchDir, watchedDirs, writeJs, + indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; + + fs = require('fs'); + + path = require('path'); + + helpers = require('./helpers'); + + optparse = require('./optparse'); + + CoffeeScript = require('./coffee-script'); + + ref = require('child_process'), spawn = ref.spawn, exec = ref.exec; + + EventEmitter = require('events').EventEmitter; + + useWinPathSep = path.sep === '\\'; + + helpers.extend(CoffeeScript, new EventEmitter); + + printLine = function(line) { + return process.stdout.write(line + '\n'); + }; + + printWarn = function(line) { + return process.stderr.write(line + '\n'); + }; + + hidden = function(file) { + return /^\.|~$/.test(file); + }; + + BANNER = 'Usage: coffee [options] path/to/script.coffee -- [args]\n\nIf called without options, `coffee` will run your script.'; + + SWITCHES = [['-b', '--bare', 'compile without a top-level function wrapper'], ['-c', '--compile', 'compile to JavaScript and save as .js files'], ['-e', '--eval', 'pass a string from the command line as input'], ['-h', '--help', 'display this help message'], ['-i', '--interactive', 'run an interactive CoffeeScript REPL'], ['-j', '--join [FILE]', 'concatenate the source CoffeeScript before compiling'], ['-m', '--map', 'generate source map and save as .js.map files'], ['-M', '--inline-map', 'generate source map and include it directly in output'], ['-n', '--nodes', 'print out the parse tree that the parser produces'], ['--nodejs [ARGS]', 'pass options directly to the "node" binary'], ['--no-header', 'suppress the "Generated by" header'], ['-o', '--output [DIR]', 'set the output directory for compiled JavaScript'], ['-p', '--print', 'print out the compiled JavaScript'], ['-r', '--require [MODULE*]', 'require the given module before eval or REPL'], ['-s', '--stdio', 'listen for and compile scripts over stdio'], ['-l', '--literate', 'treat stdio as literate style coffee-script'], ['-t', '--tokens', 'print out the tokens that the lexer/rewriter produce'], ['-v', '--version', 'display the version number'], ['-w', '--watch', 'watch scripts for changes and rerun commands']]; + + opts = {}; + + sources = []; + + sourceCode = []; + + notSources = {}; + + watchedDirs = {}; + + optionParser = null; + + exports.run = function() { + var i, len, literals, ref1, replCliOpts, results, source; + parseOptions(); + replCliOpts = { + useGlobal: true + }; + if (opts.require) { + opts.prelude = makePrelude(opts.require); + } + replCliOpts.prelude = opts.prelude; + if (opts.nodejs) { + return forkNode(); + } + if (opts.help) { + return usage(); + } + if (opts.version) { + return version(); + } + if (opts.interactive) { + return require('./repl').start(replCliOpts); + } + if (opts.stdio) { + return compileStdio(); + } + if (opts["eval"]) { + return compileScript(null, opts["arguments"][0]); + } + if (!opts["arguments"].length) { + return require('./repl').start(replCliOpts); + } + literals = opts.run ? opts["arguments"].splice(1) : []; + process.argv = process.argv.slice(0, 2).concat(literals); + process.argv[0] = 'coffee'; + if (opts.output) { + opts.output = path.resolve(opts.output); + } + if (opts.join) { + opts.join = path.resolve(opts.join); + console.error('\nThe --join option is deprecated and will be removed in a future version.\n\nIf for some reason it\'s necessary to share local variables between files,\nreplace...\n\n $ coffee --compile --join bundle.js -- a.coffee b.coffee c.coffee\n\nwith...\n\n $ cat a.coffee b.coffee c.coffee | coffee --compile --stdio > bundle.js\n'); + } + ref1 = opts["arguments"]; + results = []; + for (i = 0, len = ref1.length; i < len; i++) { + source = ref1[i]; + source = path.resolve(source); + results.push(compilePath(source, true, source)); + } + return results; + }; + + makePrelude = function(requires) { + return requires.map(function(module) { + var _, match, name; + if (match = module.match(/^(.*)=(.*)$/)) { + _ = match[0], name = match[1], module = match[2]; + } + name || (name = helpers.baseFileName(module, true, useWinPathSep)); + return name + " = require('" + module + "')"; + }).join(';'); + }; + + compilePath = function(source, topLevel, base) { + var code, err, file, files, i, len, results, stats; + if (indexOf.call(sources, source) >= 0 || watchedDirs[source] || !topLevel && (notSources[source] || hidden(source))) { + return; + } + try { + stats = fs.statSync(source); + } catch (error) { + err = error; + if (err.code === 'ENOENT') { + console.error("File not found: " + source); + process.exit(1); + } + throw err; + } + if (stats.isDirectory()) { + if (path.basename(source) === 'node_modules') { + notSources[source] = true; + return; + } + if (opts.run) { + compilePath(findDirectoryIndex(source), topLevel, base); + return; + } + if (opts.watch) { + watchDir(source, base); + } + try { + files = fs.readdirSync(source); + } catch (error) { + err = error; + if (err.code === 'ENOENT') { + return; + } else { + throw err; + } + } + results = []; + for (i = 0, len = files.length; i < len; i++) { + file = files[i]; + results.push(compilePath(path.join(source, file), false, base)); + } + return results; + } else if (topLevel || helpers.isCoffee(source)) { + sources.push(source); + sourceCode.push(null); + delete notSources[source]; + if (opts.watch) { + watch(source, base); + } + try { + code = fs.readFileSync(source); + } catch (error) { + err = error; + if (err.code === 'ENOENT') { + return; + } else { + throw err; + } + } + return compileScript(source, code.toString(), base); + } else { + return notSources[source] = true; + } + }; + + findDirectoryIndex = function(source) { + var err, ext, i, index, len, ref1; + ref1 = CoffeeScript.FILE_EXTENSIONS; + for (i = 0, len = ref1.length; i < len; i++) { + ext = ref1[i]; + index = path.join(source, "index" + ext); + try { + if ((fs.statSync(index)).isFile()) { + return index; + } + } catch (error) { + err = error; + if (err.code !== 'ENOENT') { + throw err; + } + } + } + console.error("Missing index.coffee or index.litcoffee in " + source); + return process.exit(1); + }; + + compileScript = function(file, input, base) { + var compiled, err, message, o, options, t, task; + if (base == null) { + base = null; + } + o = opts; + options = compileOptions(file, base); + try { + t = task = { + file: file, + input: input, + options: options + }; + CoffeeScript.emit('compile', task); + if (o.tokens) { + return printTokens(CoffeeScript.tokens(t.input, t.options)); + } else if (o.nodes) { + return printLine(CoffeeScript.nodes(t.input, t.options).toString().trim()); + } else if (o.run) { + CoffeeScript.register(); + if (opts.prelude) { + CoffeeScript["eval"](opts.prelude, t.options); + } + return CoffeeScript.run(t.input, t.options); + } else if (o.join && t.file !== o.join) { + if (helpers.isLiterate(file)) { + t.input = helpers.invertLiterate(t.input); + } + sourceCode[sources.indexOf(t.file)] = t.input; + return compileJoin(); + } else { + compiled = CoffeeScript.compile(t.input, t.options); + t.output = compiled; + if (o.map) { + t.output = compiled.js; + t.sourceMap = compiled.v3SourceMap; + } + CoffeeScript.emit('success', task); + if (o.print) { + return printLine(t.output.trim()); + } else if (o.compile || o.map) { + return writeJs(base, t.file, t.output, options.jsPath, t.sourceMap); + } + } + } catch (error) { + err = error; + CoffeeScript.emit('failure', err, task); + if (CoffeeScript.listeners('failure').length) { + return; + } + message = (err != null ? err.stack : void 0) || ("" + err); + if (o.watch) { + return printLine(message + '\x07'); + } else { + printWarn(message); + return process.exit(1); + } + } + }; + + compileStdio = function() { + var buffers, stdin; + buffers = []; + stdin = process.openStdin(); + stdin.on('data', function(buffer) { + if (buffer) { + return buffers.push(buffer); + } + }); + return stdin.on('end', function() { + return compileScript(null, Buffer.concat(buffers).toString()); + }); + }; + + joinTimeout = null; + + compileJoin = function() { + if (!opts.join) { + return; + } + if (!sourceCode.some(function(code) { + return code === null; + })) { + clearTimeout(joinTimeout); + return joinTimeout = wait(100, function() { + return compileScript(opts.join, sourceCode.join('\n'), opts.join); + }); + } + }; + + watch = function(source, base) { + var compile, compileTimeout, err, prevStats, rewatch, startWatcher, watchErr, watcher; + watcher = null; + prevStats = null; + compileTimeout = null; + watchErr = function(err) { + if (err.code !== 'ENOENT') { + throw err; + } + if (indexOf.call(sources, source) < 0) { + return; + } + try { + rewatch(); + return compile(); + } catch (error) { + removeSource(source, base); + return compileJoin(); + } + }; + compile = function() { + clearTimeout(compileTimeout); + return compileTimeout = wait(25, function() { + return fs.stat(source, function(err, stats) { + if (err) { + return watchErr(err); + } + if (prevStats && stats.size === prevStats.size && stats.mtime.getTime() === prevStats.mtime.getTime()) { + return rewatch(); + } + prevStats = stats; + return fs.readFile(source, function(err, code) { + if (err) { + return watchErr(err); + } + compileScript(source, code.toString(), base); + return rewatch(); + }); + }); + }); + }; + startWatcher = function() { + return watcher = fs.watch(source).on('change', compile).on('error', function(err) { + if (err.code !== 'EPERM') { + throw err; + } + return removeSource(source, base); + }); + }; + rewatch = function() { + if (watcher != null) { + watcher.close(); + } + return startWatcher(); + }; + try { + return startWatcher(); + } catch (error) { + err = error; + return watchErr(err); + } + }; + + watchDir = function(source, base) { + var err, readdirTimeout, startWatcher, stopWatcher, watcher; + watcher = null; + readdirTimeout = null; + startWatcher = function() { + return watcher = fs.watch(source).on('error', function(err) { + if (err.code !== 'EPERM') { + throw err; + } + return stopWatcher(); + }).on('change', function() { + clearTimeout(readdirTimeout); + return readdirTimeout = wait(25, function() { + var err, file, files, i, len, results; + try { + files = fs.readdirSync(source); + } catch (error) { + err = error; + if (err.code !== 'ENOENT') { + throw err; + } + return stopWatcher(); + } + results = []; + for (i = 0, len = files.length; i < len; i++) { + file = files[i]; + results.push(compilePath(path.join(source, file), false, base)); + } + return results; + }); + }); + }; + stopWatcher = function() { + watcher.close(); + return removeSourceDir(source, base); + }; + watchedDirs[source] = true; + try { + return startWatcher(); + } catch (error) { + err = error; + if (err.code !== 'ENOENT') { + throw err; + } + } + }; + + removeSourceDir = function(source, base) { + var file, i, len, sourcesChanged; + delete watchedDirs[source]; + sourcesChanged = false; + for (i = 0, len = sources.length; i < len; i++) { + file = sources[i]; + if (!(source === path.dirname(file))) { + continue; + } + removeSource(file, base); + sourcesChanged = true; + } + if (sourcesChanged) { + return compileJoin(); + } + }; + + removeSource = function(source, base) { + var index; + index = sources.indexOf(source); + sources.splice(index, 1); + sourceCode.splice(index, 1); + if (!opts.join) { + silentUnlink(outputPath(source, base)); + silentUnlink(outputPath(source, base, '.js.map')); + return timeLog("removed " + source); + } + }; + + silentUnlink = function(path) { + var err, ref1; + try { + return fs.unlinkSync(path); + } catch (error) { + err = error; + if ((ref1 = err.code) !== 'ENOENT' && ref1 !== 'EPERM') { + throw err; + } + } + }; + + outputPath = function(source, base, extension) { + var basename, dir, srcDir; + if (extension == null) { + extension = ".js"; + } + basename = helpers.baseFileName(source, true, useWinPathSep); + srcDir = path.dirname(source); + if (!opts.output) { + dir = srcDir; + } else if (source === base) { + dir = opts.output; + } else { + dir = path.join(opts.output, path.relative(base, srcDir)); + } + return path.join(dir, basename + extension); + }; + + mkdirp = function(dir, fn) { + var mkdirs, mode; + mode = 0x1ff & ~process.umask(); + return (mkdirs = function(p, fn) { + return fs.exists(p, function(exists) { + if (exists) { + return fn(); + } else { + return mkdirs(path.dirname(p), function() { + return fs.mkdir(p, mode, function(err) { + if (err) { + return fn(err); + } + return fn(); + }); + }); + } + }); + })(dir, fn); + }; + + writeJs = function(base, sourcePath, js, jsPath, generatedSourceMap) { + var compile, jsDir, sourceMapPath; + if (generatedSourceMap == null) { + generatedSourceMap = null; + } + sourceMapPath = outputPath(sourcePath, base, ".js.map"); + jsDir = path.dirname(jsPath); + compile = function() { + if (opts.compile) { + if (js.length <= 0) { + js = ' '; + } + if (generatedSourceMap) { + js = js + "\n//# sourceMappingURL=" + (helpers.baseFileName(sourceMapPath, false, useWinPathSep)) + "\n"; + } + fs.writeFile(jsPath, js, function(err) { + if (err) { + printLine(err.message); + return process.exit(1); + } else if (opts.compile && opts.watch) { + return timeLog("compiled " + sourcePath); + } + }); + } + if (generatedSourceMap) { + return fs.writeFile(sourceMapPath, generatedSourceMap, function(err) { + if (err) { + printLine("Could not write source map: " + err.message); + return process.exit(1); + } + }); + } + }; + return fs.exists(jsDir, function(itExists) { + if (itExists) { + return compile(); + } else { + return mkdirp(jsDir, compile); + } + }); + }; + + wait = function(milliseconds, func) { + return setTimeout(func, milliseconds); + }; + + timeLog = function(message) { + return console.log(((new Date).toLocaleTimeString()) + " - " + message); + }; + + printTokens = function(tokens) { + var strings, tag, token, value; + strings = (function() { + var i, len, results; + results = []; + for (i = 0, len = tokens.length; i < len; i++) { + token = tokens[i]; + tag = token[0]; + value = token[1].toString().replace(/\n/, '\\n'); + results.push("[" + tag + " " + value + "]"); + } + return results; + })(); + return printLine(strings.join(' ')); + }; + + parseOptions = function() { + var o; + optionParser = new optparse.OptionParser(SWITCHES, BANNER); + o = opts = optionParser.parse(process.argv.slice(2)); + o.compile || (o.compile = !!o.output); + o.run = !(o.compile || o.print || o.map); + return o.print = !!(o.print || (o["eval"] || o.stdio && o.compile)); + }; + + compileOptions = function(filename, base) { + var answer, cwd, jsDir, jsPath; + answer = { + filename: filename, + literate: opts.literate || helpers.isLiterate(filename), + bare: opts.bare, + header: opts.compile && !opts['no-header'], + sourceMap: opts.map, + inlineMap: opts['inline-map'] + }; + if (filename) { + if (base) { + cwd = process.cwd(); + jsPath = outputPath(filename, base); + jsDir = path.dirname(jsPath); + answer = helpers.merge(answer, { + jsPath: jsPath, + sourceRoot: path.relative(jsDir, cwd), + sourceFiles: [path.relative(cwd, filename)], + generatedFile: helpers.baseFileName(jsPath, false, useWinPathSep) + }); + } else { + answer = helpers.merge(answer, { + sourceRoot: "", + sourceFiles: [helpers.baseFileName(filename, false, useWinPathSep)], + generatedFile: helpers.baseFileName(filename, true, useWinPathSep) + ".js" + }); + } + } + return answer; + }; + + forkNode = function() { + var args, nodeArgs, p; + nodeArgs = opts.nodejs.split(/\s+/); + args = process.argv.slice(1); + args.splice(args.indexOf('--nodejs'), 2); + p = spawn(process.execPath, nodeArgs.concat(args), { + cwd: process.cwd(), + env: process.env, + stdio: [0, 1, 2] + }); + return p.on('exit', function(code) { + return process.exit(code); + }); + }; + + usage = function() { + return printLine((new optparse.OptionParser(SWITCHES, BANNER)).help()); + }; + + version = function() { + return printLine("CoffeeScript version " + CoffeeScript.VERSION); + }; + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/grammar.js b/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/grammar.js new file mode 100644 index 00000000..631ad0a8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/grammar.js @@ -0,0 +1,814 @@ +// Generated by CoffeeScript 1.12.5 +(function() { + var Parser, alt, alternatives, grammar, name, o, operators, token, tokens, unwrap; + + Parser = require('jison').Parser; + + unwrap = /^function\s*\(\)\s*\{\s*return\s*([\s\S]*);\s*\}/; + + o = function(patternString, action, options) { + var addLocationDataFn, match, patternCount; + patternString = patternString.replace(/\s{2,}/g, ' '); + patternCount = patternString.split(' ').length; + if (!action) { + return [patternString, '$$ = $1;', options]; + } + action = (match = unwrap.exec(action)) ? match[1] : "(" + action + "())"; + action = action.replace(/\bnew /g, '$&yy.'); + action = action.replace(/\b(?:Block\.wrap|extend)\b/g, 'yy.$&'); + addLocationDataFn = function(first, last) { + if (!last) { + return "yy.addLocationDataFn(@" + first + ")"; + } else { + return "yy.addLocationDataFn(@" + first + ", @" + last + ")"; + } + }; + action = action.replace(/LOC\(([0-9]*)\)/g, addLocationDataFn('$1')); + action = action.replace(/LOC\(([0-9]*),\s*([0-9]*)\)/g, addLocationDataFn('$1', '$2')); + return [patternString, "$$ = " + (addLocationDataFn(1, patternCount)) + "(" + action + ");", options]; + }; + + grammar = { + Root: [ + o('', function() { + return new Block; + }), o('Body') + ], + Body: [ + o('Line', function() { + return Block.wrap([$1]); + }), o('Body TERMINATOR Line', function() { + return $1.push($3); + }), o('Body TERMINATOR') + ], + Line: [o('Expression'), o('Statement'), o('YieldReturn')], + Statement: [ + o('Return'), o('Comment'), o('STATEMENT', function() { + return new StatementLiteral($1); + }), o('Import'), o('Export') + ], + Expression: [o('Value'), o('Invocation'), o('Code'), o('Operation'), o('Assign'), o('If'), o('Try'), o('While'), o('For'), o('Switch'), o('Class'), o('Throw'), o('Yield')], + Yield: [ + o('YIELD', function() { + return new Op($1, new Value(new Literal(''))); + }), o('YIELD Expression', function() { + return new Op($1, $2); + }), o('YIELD FROM Expression', function() { + return new Op($1.concat($2), $3); + }) + ], + Block: [ + o('INDENT OUTDENT', function() { + return new Block; + }), o('INDENT Body OUTDENT', function() { + return $2; + }) + ], + Identifier: [ + o('IDENTIFIER', function() { + return new IdentifierLiteral($1); + }) + ], + Property: [ + o('PROPERTY', function() { + return new PropertyName($1); + }) + ], + AlphaNumeric: [ + o('NUMBER', function() { + return new NumberLiteral($1); + }), o('String') + ], + String: [ + o('STRING', function() { + return new StringLiteral($1); + }), o('STRING_START Body STRING_END', function() { + return new StringWithInterpolations($2); + }) + ], + Regex: [ + o('REGEX', function() { + return new RegexLiteral($1); + }), o('REGEX_START Invocation REGEX_END', function() { + return new RegexWithInterpolations($2.args); + }) + ], + Literal: [ + o('AlphaNumeric'), o('JS', function() { + return new PassthroughLiteral($1); + }), o('Regex'), o('UNDEFINED', function() { + return new UndefinedLiteral; + }), o('NULL', function() { + return new NullLiteral; + }), o('BOOL', function() { + return new BooleanLiteral($1); + }), o('INFINITY', function() { + return new InfinityLiteral($1); + }), o('NAN', function() { + return new NaNLiteral; + }) + ], + Assign: [ + o('Assignable = Expression', function() { + return new Assign($1, $3); + }), o('Assignable = TERMINATOR Expression', function() { + return new Assign($1, $4); + }), o('Assignable = INDENT Expression OUTDENT', function() { + return new Assign($1, $4); + }) + ], + AssignObj: [ + o('ObjAssignable', function() { + return new Value($1); + }), o('ObjAssignable : Expression', function() { + return new Assign(LOC(1)(new Value($1)), $3, 'object', { + operatorToken: LOC(2)(new Literal($2)) + }); + }), o('ObjAssignable : INDENT Expression OUTDENT', function() { + return new Assign(LOC(1)(new Value($1)), $4, 'object', { + operatorToken: LOC(2)(new Literal($2)) + }); + }), o('SimpleObjAssignable = Expression', function() { + return new Assign(LOC(1)(new Value($1)), $3, null, { + operatorToken: LOC(2)(new Literal($2)) + }); + }), o('SimpleObjAssignable = INDENT Expression OUTDENT', function() { + return new Assign(LOC(1)(new Value($1)), $4, null, { + operatorToken: LOC(2)(new Literal($2)) + }); + }), o('Comment') + ], + SimpleObjAssignable: [o('Identifier'), o('Property'), o('ThisProperty')], + ObjAssignable: [o('SimpleObjAssignable'), o('AlphaNumeric')], + Return: [ + o('RETURN Expression', function() { + return new Return($2); + }), o('RETURN', function() { + return new Return; + }) + ], + YieldReturn: [ + o('YIELD RETURN Expression', function() { + return new YieldReturn($3); + }), o('YIELD RETURN', function() { + return new YieldReturn; + }) + ], + Comment: [ + o('HERECOMMENT', function() { + return new Comment($1); + }) + ], + Code: [ + o('PARAM_START ParamList PARAM_END FuncGlyph Block', function() { + return new Code($2, $5, $4); + }), o('FuncGlyph Block', function() { + return new Code([], $2, $1); + }) + ], + FuncGlyph: [ + o('->', function() { + return 'func'; + }), o('=>', function() { + return 'boundfunc'; + }) + ], + OptComma: [o(''), o(',')], + ParamList: [ + o('', function() { + return []; + }), o('Param', function() { + return [$1]; + }), o('ParamList , Param', function() { + return $1.concat($3); + }), o('ParamList OptComma TERMINATOR Param', function() { + return $1.concat($4); + }), o('ParamList OptComma INDENT ParamList OptComma OUTDENT', function() { + return $1.concat($4); + }) + ], + Param: [ + o('ParamVar', function() { + return new Param($1); + }), o('ParamVar ...', function() { + return new Param($1, null, true); + }), o('ParamVar = Expression', function() { + return new Param($1, $3); + }), o('...', function() { + return new Expansion; + }) + ], + ParamVar: [o('Identifier'), o('ThisProperty'), o('Array'), o('Object')], + Splat: [ + o('Expression ...', function() { + return new Splat($1); + }) + ], + SimpleAssignable: [ + o('Identifier', function() { + return new Value($1); + }), o('Value Accessor', function() { + return $1.add($2); + }), o('Invocation Accessor', function() { + return new Value($1, [].concat($2)); + }), o('ThisProperty') + ], + Assignable: [ + o('SimpleAssignable'), o('Array', function() { + return new Value($1); + }), o('Object', function() { + return new Value($1); + }) + ], + Value: [ + o('Assignable'), o('Literal', function() { + return new Value($1); + }), o('Parenthetical', function() { + return new Value($1); + }), o('Range', function() { + return new Value($1); + }), o('This') + ], + Accessor: [ + o('. Property', function() { + return new Access($2); + }), o('?. Property', function() { + return new Access($2, 'soak'); + }), o(':: Property', function() { + return [LOC(1)(new Access(new PropertyName('prototype'))), LOC(2)(new Access($2))]; + }), o('?:: Property', function() { + return [LOC(1)(new Access(new PropertyName('prototype'), 'soak')), LOC(2)(new Access($2))]; + }), o('::', function() { + return new Access(new PropertyName('prototype')); + }), o('Index') + ], + Index: [ + o('INDEX_START IndexValue INDEX_END', function() { + return $2; + }), o('INDEX_SOAK Index', function() { + return extend($2, { + soak: true + }); + }) + ], + IndexValue: [ + o('Expression', function() { + return new Index($1); + }), o('Slice', function() { + return new Slice($1); + }) + ], + Object: [ + o('{ AssignList OptComma }', function() { + return new Obj($2, $1.generated); + }) + ], + AssignList: [ + o('', function() { + return []; + }), o('AssignObj', function() { + return [$1]; + }), o('AssignList , AssignObj', function() { + return $1.concat($3); + }), o('AssignList OptComma TERMINATOR AssignObj', function() { + return $1.concat($4); + }), o('AssignList OptComma INDENT AssignList OptComma OUTDENT', function() { + return $1.concat($4); + }) + ], + Class: [ + o('CLASS', function() { + return new Class; + }), o('CLASS Block', function() { + return new Class(null, null, $2); + }), o('CLASS EXTENDS Expression', function() { + return new Class(null, $3); + }), o('CLASS EXTENDS Expression Block', function() { + return new Class(null, $3, $4); + }), o('CLASS SimpleAssignable', function() { + return new Class($2); + }), o('CLASS SimpleAssignable Block', function() { + return new Class($2, null, $3); + }), o('CLASS SimpleAssignable EXTENDS Expression', function() { + return new Class($2, $4); + }), o('CLASS SimpleAssignable EXTENDS Expression Block', function() { + return new Class($2, $4, $5); + }) + ], + Import: [ + o('IMPORT String', function() { + return new ImportDeclaration(null, $2); + }), o('IMPORT ImportDefaultSpecifier FROM String', function() { + return new ImportDeclaration(new ImportClause($2, null), $4); + }), o('IMPORT ImportNamespaceSpecifier FROM String', function() { + return new ImportDeclaration(new ImportClause(null, $2), $4); + }), o('IMPORT { } FROM String', function() { + return new ImportDeclaration(new ImportClause(null, new ImportSpecifierList([])), $5); + }), o('IMPORT { ImportSpecifierList OptComma } FROM String', function() { + return new ImportDeclaration(new ImportClause(null, new ImportSpecifierList($3)), $7); + }), o('IMPORT ImportDefaultSpecifier , ImportNamespaceSpecifier FROM String', function() { + return new ImportDeclaration(new ImportClause($2, $4), $6); + }), o('IMPORT ImportDefaultSpecifier , { ImportSpecifierList OptComma } FROM String', function() { + return new ImportDeclaration(new ImportClause($2, new ImportSpecifierList($5)), $9); + }) + ], + ImportSpecifierList: [ + o('ImportSpecifier', function() { + return [$1]; + }), o('ImportSpecifierList , ImportSpecifier', function() { + return $1.concat($3); + }), o('ImportSpecifierList OptComma TERMINATOR ImportSpecifier', function() { + return $1.concat($4); + }), o('INDENT ImportSpecifierList OptComma OUTDENT', function() { + return $2; + }), o('ImportSpecifierList OptComma INDENT ImportSpecifierList OptComma OUTDENT', function() { + return $1.concat($4); + }) + ], + ImportSpecifier: [ + o('Identifier', function() { + return new ImportSpecifier($1); + }), o('Identifier AS Identifier', function() { + return new ImportSpecifier($1, $3); + }), o('DEFAULT', function() { + return new ImportSpecifier(new Literal($1)); + }), o('DEFAULT AS Identifier', function() { + return new ImportSpecifier(new Literal($1), $3); + }) + ], + ImportDefaultSpecifier: [ + o('Identifier', function() { + return new ImportDefaultSpecifier($1); + }) + ], + ImportNamespaceSpecifier: [ + o('IMPORT_ALL AS Identifier', function() { + return new ImportNamespaceSpecifier(new Literal($1), $3); + }) + ], + Export: [ + o('EXPORT { }', function() { + return new ExportNamedDeclaration(new ExportSpecifierList([])); + }), o('EXPORT { ExportSpecifierList OptComma }', function() { + return new ExportNamedDeclaration(new ExportSpecifierList($3)); + }), o('EXPORT Class', function() { + return new ExportNamedDeclaration($2); + }), o('EXPORT Identifier = Expression', function() { + return new ExportNamedDeclaration(new Assign($2, $4, null, { + moduleDeclaration: 'export' + })); + }), o('EXPORT Identifier = TERMINATOR Expression', function() { + return new ExportNamedDeclaration(new Assign($2, $5, null, { + moduleDeclaration: 'export' + })); + }), o('EXPORT Identifier = INDENT Expression OUTDENT', function() { + return new ExportNamedDeclaration(new Assign($2, $5, null, { + moduleDeclaration: 'export' + })); + }), o('EXPORT DEFAULT Expression', function() { + return new ExportDefaultDeclaration($3); + }), o('EXPORT EXPORT_ALL FROM String', function() { + return new ExportAllDeclaration(new Literal($2), $4); + }), o('EXPORT { ExportSpecifierList OptComma } FROM String', function() { + return new ExportNamedDeclaration(new ExportSpecifierList($3), $7); + }) + ], + ExportSpecifierList: [ + o('ExportSpecifier', function() { + return [$1]; + }), o('ExportSpecifierList , ExportSpecifier', function() { + return $1.concat($3); + }), o('ExportSpecifierList OptComma TERMINATOR ExportSpecifier', function() { + return $1.concat($4); + }), o('INDENT ExportSpecifierList OptComma OUTDENT', function() { + return $2; + }), o('ExportSpecifierList OptComma INDENT ExportSpecifierList OptComma OUTDENT', function() { + return $1.concat($4); + }) + ], + ExportSpecifier: [ + o('Identifier', function() { + return new ExportSpecifier($1); + }), o('Identifier AS Identifier', function() { + return new ExportSpecifier($1, $3); + }), o('Identifier AS DEFAULT', function() { + return new ExportSpecifier($1, new Literal($3)); + }), o('DEFAULT', function() { + return new ExportSpecifier(new Literal($1)); + }), o('DEFAULT AS Identifier', function() { + return new ExportSpecifier(new Literal($1), $3); + }) + ], + Invocation: [ + o('Value OptFuncExist String', function() { + return new TaggedTemplateCall($1, $3, $2); + }), o('Value OptFuncExist Arguments', function() { + return new Call($1, $3, $2); + }), o('Invocation OptFuncExist Arguments', function() { + return new Call($1, $3, $2); + }), o('Super') + ], + Super: [ + o('SUPER', function() { + return new SuperCall; + }), o('SUPER Arguments', function() { + return new SuperCall($2); + }) + ], + OptFuncExist: [ + o('', function() { + return false; + }), o('FUNC_EXIST', function() { + return true; + }) + ], + Arguments: [ + o('CALL_START CALL_END', function() { + return []; + }), o('CALL_START ArgList OptComma CALL_END', function() { + return $2; + }) + ], + This: [ + o('THIS', function() { + return new Value(new ThisLiteral); + }), o('@', function() { + return new Value(new ThisLiteral); + }) + ], + ThisProperty: [ + o('@ Property', function() { + return new Value(LOC(1)(new ThisLiteral), [LOC(2)(new Access($2))], 'this'); + }) + ], + Array: [ + o('[ ]', function() { + return new Arr([]); + }), o('[ ArgList OptComma ]', function() { + return new Arr($2); + }) + ], + RangeDots: [ + o('..', function() { + return 'inclusive'; + }), o('...', function() { + return 'exclusive'; + }) + ], + Range: [ + o('[ Expression RangeDots Expression ]', function() { + return new Range($2, $4, $3); + }) + ], + Slice: [ + o('Expression RangeDots Expression', function() { + return new Range($1, $3, $2); + }), o('Expression RangeDots', function() { + return new Range($1, null, $2); + }), o('RangeDots Expression', function() { + return new Range(null, $2, $1); + }), o('RangeDots', function() { + return new Range(null, null, $1); + }) + ], + ArgList: [ + o('Arg', function() { + return [$1]; + }), o('ArgList , Arg', function() { + return $1.concat($3); + }), o('ArgList OptComma TERMINATOR Arg', function() { + return $1.concat($4); + }), o('INDENT ArgList OptComma OUTDENT', function() { + return $2; + }), o('ArgList OptComma INDENT ArgList OptComma OUTDENT', function() { + return $1.concat($4); + }) + ], + Arg: [ + o('Expression'), o('Splat'), o('...', function() { + return new Expansion; + }) + ], + SimpleArgs: [ + o('Expression'), o('SimpleArgs , Expression', function() { + return [].concat($1, $3); + }) + ], + Try: [ + o('TRY Block', function() { + return new Try($2); + }), o('TRY Block Catch', function() { + return new Try($2, $3[0], $3[1]); + }), o('TRY Block FINALLY Block', function() { + return new Try($2, null, null, $4); + }), o('TRY Block Catch FINALLY Block', function() { + return new Try($2, $3[0], $3[1], $5); + }) + ], + Catch: [ + o('CATCH Identifier Block', function() { + return [$2, $3]; + }), o('CATCH Object Block', function() { + return [LOC(2)(new Value($2)), $3]; + }), o('CATCH Block', function() { + return [null, $2]; + }) + ], + Throw: [ + o('THROW Expression', function() { + return new Throw($2); + }) + ], + Parenthetical: [ + o('( Body )', function() { + return new Parens($2); + }), o('( INDENT Body OUTDENT )', function() { + return new Parens($3); + }) + ], + WhileSource: [ + o('WHILE Expression', function() { + return new While($2); + }), o('WHILE Expression WHEN Expression', function() { + return new While($2, { + guard: $4 + }); + }), o('UNTIL Expression', function() { + return new While($2, { + invert: true + }); + }), o('UNTIL Expression WHEN Expression', function() { + return new While($2, { + invert: true, + guard: $4 + }); + }) + ], + While: [ + o('WhileSource Block', function() { + return $1.addBody($2); + }), o('Statement WhileSource', function() { + return $2.addBody(LOC(1)(Block.wrap([$1]))); + }), o('Expression WhileSource', function() { + return $2.addBody(LOC(1)(Block.wrap([$1]))); + }), o('Loop', function() { + return $1; + }) + ], + Loop: [ + o('LOOP Block', function() { + return new While(LOC(1)(new BooleanLiteral('true'))).addBody($2); + }), o('LOOP Expression', function() { + return new While(LOC(1)(new BooleanLiteral('true'))).addBody(LOC(2)(Block.wrap([$2]))); + }) + ], + For: [ + o('Statement ForBody', function() { + return new For($1, $2); + }), o('Expression ForBody', function() { + return new For($1, $2); + }), o('ForBody Block', function() { + return new For($2, $1); + }) + ], + ForBody: [ + o('FOR Range', function() { + return { + source: LOC(2)(new Value($2)) + }; + }), o('FOR Range BY Expression', function() { + return { + source: LOC(2)(new Value($2)), + step: $4 + }; + }), o('ForStart ForSource', function() { + $2.own = $1.own; + $2.ownTag = $1.ownTag; + $2.name = $1[0]; + $2.index = $1[1]; + return $2; + }) + ], + ForStart: [ + o('FOR ForVariables', function() { + return $2; + }), o('FOR OWN ForVariables', function() { + $3.own = true; + $3.ownTag = LOC(2)(new Literal($2)); + return $3; + }) + ], + ForValue: [ + o('Identifier'), o('ThisProperty'), o('Array', function() { + return new Value($1); + }), o('Object', function() { + return new Value($1); + }) + ], + ForVariables: [ + o('ForValue', function() { + return [$1]; + }), o('ForValue , ForValue', function() { + return [$1, $3]; + }) + ], + ForSource: [ + o('FORIN Expression', function() { + return { + source: $2 + }; + }), o('FOROF Expression', function() { + return { + source: $2, + object: true + }; + }), o('FORIN Expression WHEN Expression', function() { + return { + source: $2, + guard: $4 + }; + }), o('FOROF Expression WHEN Expression', function() { + return { + source: $2, + guard: $4, + object: true + }; + }), o('FORIN Expression BY Expression', function() { + return { + source: $2, + step: $4 + }; + }), o('FORIN Expression WHEN Expression BY Expression', function() { + return { + source: $2, + guard: $4, + step: $6 + }; + }), o('FORIN Expression BY Expression WHEN Expression', function() { + return { + source: $2, + step: $4, + guard: $6 + }; + }), o('FORFROM Expression', function() { + return { + source: $2, + from: true + }; + }), o('FORFROM Expression WHEN Expression', function() { + return { + source: $2, + guard: $4, + from: true + }; + }) + ], + Switch: [ + o('SWITCH Expression INDENT Whens OUTDENT', function() { + return new Switch($2, $4); + }), o('SWITCH Expression INDENT Whens ELSE Block OUTDENT', function() { + return new Switch($2, $4, $6); + }), o('SWITCH INDENT Whens OUTDENT', function() { + return new Switch(null, $3); + }), o('SWITCH INDENT Whens ELSE Block OUTDENT', function() { + return new Switch(null, $3, $5); + }) + ], + Whens: [ + o('When'), o('Whens When', function() { + return $1.concat($2); + }) + ], + When: [ + o('LEADING_WHEN SimpleArgs Block', function() { + return [[$2, $3]]; + }), o('LEADING_WHEN SimpleArgs Block TERMINATOR', function() { + return [[$2, $3]]; + }) + ], + IfBlock: [ + o('IF Expression Block', function() { + return new If($2, $3, { + type: $1 + }); + }), o('IfBlock ELSE IF Expression Block', function() { + return $1.addElse(LOC(3, 5)(new If($4, $5, { + type: $3 + }))); + }) + ], + If: [ + o('IfBlock'), o('IfBlock ELSE Block', function() { + return $1.addElse($3); + }), o('Statement POST_IF Expression', function() { + return new If($3, LOC(1)(Block.wrap([$1])), { + type: $2, + statement: true + }); + }), o('Expression POST_IF Expression', function() { + return new If($3, LOC(1)(Block.wrap([$1])), { + type: $2, + statement: true + }); + }) + ], + Operation: [ + o('UNARY Expression', function() { + return new Op($1, $2); + }), o('UNARY_MATH Expression', function() { + return new Op($1, $2); + }), o('- Expression', (function() { + return new Op('-', $2); + }), { + prec: 'UNARY_MATH' + }), o('+ Expression', (function() { + return new Op('+', $2); + }), { + prec: 'UNARY_MATH' + }), o('-- SimpleAssignable', function() { + return new Op('--', $2); + }), o('++ SimpleAssignable', function() { + return new Op('++', $2); + }), o('SimpleAssignable --', function() { + return new Op('--', $1, null, true); + }), o('SimpleAssignable ++', function() { + return new Op('++', $1, null, true); + }), o('Expression ?', function() { + return new Existence($1); + }), o('Expression + Expression', function() { + return new Op('+', $1, $3); + }), o('Expression - Expression', function() { + return new Op('-', $1, $3); + }), o('Expression MATH Expression', function() { + return new Op($2, $1, $3); + }), o('Expression ** Expression', function() { + return new Op($2, $1, $3); + }), o('Expression SHIFT Expression', function() { + return new Op($2, $1, $3); + }), o('Expression COMPARE Expression', function() { + return new Op($2, $1, $3); + }), o('Expression & Expression', function() { + return new Op($2, $1, $3); + }), o('Expression ^ Expression', function() { + return new Op($2, $1, $3); + }), o('Expression | Expression', function() { + return new Op($2, $1, $3); + }), o('Expression && Expression', function() { + return new Op($2, $1, $3); + }), o('Expression || Expression', function() { + return new Op($2, $1, $3); + }), o('Expression BIN? Expression', function() { + return new Op($2, $1, $3); + }), o('Expression RELATION Expression', function() { + if ($2.charAt(0) === '!') { + return new Op($2.slice(1), $1, $3).invert(); + } else { + return new Op($2, $1, $3); + } + }), o('SimpleAssignable COMPOUND_ASSIGN Expression', function() { + return new Assign($1, $3, $2); + }), o('SimpleAssignable COMPOUND_ASSIGN INDENT Expression OUTDENT', function() { + return new Assign($1, $4, $2); + }), o('SimpleAssignable COMPOUND_ASSIGN TERMINATOR Expression', function() { + return new Assign($1, $4, $2); + }), o('SimpleAssignable EXTENDS Expression', function() { + return new Extends($1, $3); + }) + ] + }; + + operators = [['left', '.', '?.', '::', '?::'], ['left', 'CALL_START', 'CALL_END'], ['nonassoc', '++', '--'], ['left', '?'], ['right', 'UNARY'], ['right', '**'], ['right', 'UNARY_MATH'], ['left', 'MATH'], ['left', '+', '-'], ['left', 'SHIFT'], ['left', 'RELATION'], ['left', 'COMPARE'], ['left', '&'], ['left', '^'], ['left', '|'], ['left', '&&'], ['left', '||'], ['left', 'BIN?'], ['nonassoc', 'INDENT', 'OUTDENT'], ['right', 'YIELD'], ['right', '=', ':', 'COMPOUND_ASSIGN', 'RETURN', 'THROW', 'EXTENDS'], ['right', 'FORIN', 'FOROF', 'FORFROM', 'BY', 'WHEN'], ['right', 'IF', 'ELSE', 'FOR', 'WHILE', 'UNTIL', 'LOOP', 'SUPER', 'CLASS', 'IMPORT', 'EXPORT'], ['left', 'POST_IF']]; + + tokens = []; + + for (name in grammar) { + alternatives = grammar[name]; + grammar[name] = (function() { + var i, j, len, len1, ref, results; + results = []; + for (i = 0, len = alternatives.length; i < len; i++) { + alt = alternatives[i]; + ref = alt[0].split(' '); + for (j = 0, len1 = ref.length; j < len1; j++) { + token = ref[j]; + if (!grammar[token]) { + tokens.push(token); + } + } + if (name === 'Root') { + alt[1] = "return " + alt[1]; + } + results.push(alt); + } + return results; + })(); + } + + exports.parser = new Parser({ + tokens: tokens.join(' '), + bnf: grammar, + operators: operators.reverse(), + startSymbol: 'Root' + }); + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/helpers.js b/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/helpers.js new file mode 100644 index 00000000..4d36bc4b --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/helpers.js @@ -0,0 +1,249 @@ +// Generated by CoffeeScript 1.12.5 +(function() { + var buildLocationData, extend, flatten, ref, repeat, syntaxErrorToString; + + exports.starts = function(string, literal, start) { + return literal === string.substr(start, literal.length); + }; + + exports.ends = function(string, literal, back) { + var len; + len = literal.length; + return literal === string.substr(string.length - len - (back || 0), len); + }; + + exports.repeat = repeat = function(str, n) { + var res; + res = ''; + while (n > 0) { + if (n & 1) { + res += str; + } + n >>>= 1; + str += str; + } + return res; + }; + + exports.compact = function(array) { + var i, item, len1, results; + results = []; + for (i = 0, len1 = array.length; i < len1; i++) { + item = array[i]; + if (item) { + results.push(item); + } + } + return results; + }; + + exports.count = function(string, substr) { + var num, pos; + num = pos = 0; + if (!substr.length) { + return 1 / 0; + } + while (pos = 1 + string.indexOf(substr, pos)) { + num++; + } + return num; + }; + + exports.merge = function(options, overrides) { + return extend(extend({}, options), overrides); + }; + + extend = exports.extend = function(object, properties) { + var key, val; + for (key in properties) { + val = properties[key]; + object[key] = val; + } + return object; + }; + + exports.flatten = flatten = function(array) { + var element, flattened, i, len1; + flattened = []; + for (i = 0, len1 = array.length; i < len1; i++) { + element = array[i]; + if ('[object Array]' === Object.prototype.toString.call(element)) { + flattened = flattened.concat(flatten(element)); + } else { + flattened.push(element); + } + } + return flattened; + }; + + exports.del = function(obj, key) { + var val; + val = obj[key]; + delete obj[key]; + return val; + }; + + exports.some = (ref = Array.prototype.some) != null ? ref : function(fn) { + var e, i, len1, ref1; + ref1 = this; + for (i = 0, len1 = ref1.length; i < len1; i++) { + e = ref1[i]; + if (fn(e)) { + return true; + } + } + return false; + }; + + exports.invertLiterate = function(code) { + var line, lines, maybe_code; + maybe_code = true; + lines = (function() { + var i, len1, ref1, results; + ref1 = code.split('\n'); + results = []; + for (i = 0, len1 = ref1.length; i < len1; i++) { + line = ref1[i]; + if (maybe_code && /^([ ]{4}|[ ]{0,3}\t)/.test(line)) { + results.push(line); + } else if (maybe_code = /^\s*$/.test(line)) { + results.push(line); + } else { + results.push('# ' + line); + } + } + return results; + })(); + return lines.join('\n'); + }; + + buildLocationData = function(first, last) { + if (!last) { + return first; + } else { + return { + first_line: first.first_line, + first_column: first.first_column, + last_line: last.last_line, + last_column: last.last_column + }; + } + }; + + exports.addLocationDataFn = function(first, last) { + return function(obj) { + if (((typeof obj) === 'object') && (!!obj['updateLocationDataIfMissing'])) { + obj.updateLocationDataIfMissing(buildLocationData(first, last)); + } + return obj; + }; + }; + + exports.locationDataToString = function(obj) { + var locationData; + if (("2" in obj) && ("first_line" in obj[2])) { + locationData = obj[2]; + } else if ("first_line" in obj) { + locationData = obj; + } + if (locationData) { + return ((locationData.first_line + 1) + ":" + (locationData.first_column + 1) + "-") + ((locationData.last_line + 1) + ":" + (locationData.last_column + 1)); + } else { + return "No location data"; + } + }; + + exports.baseFileName = function(file, stripExt, useWinPathSep) { + var parts, pathSep; + if (stripExt == null) { + stripExt = false; + } + if (useWinPathSep == null) { + useWinPathSep = false; + } + pathSep = useWinPathSep ? /\\|\// : /\//; + parts = file.split(pathSep); + file = parts[parts.length - 1]; + if (!(stripExt && file.indexOf('.') >= 0)) { + return file; + } + parts = file.split('.'); + parts.pop(); + if (parts[parts.length - 1] === 'coffee' && parts.length > 1) { + parts.pop(); + } + return parts.join('.'); + }; + + exports.isCoffee = function(file) { + return /\.((lit)?coffee|coffee\.md)$/.test(file); + }; + + exports.isLiterate = function(file) { + return /\.(litcoffee|coffee\.md)$/.test(file); + }; + + exports.throwSyntaxError = function(message, location) { + var error; + error = new SyntaxError(message); + error.location = location; + error.toString = syntaxErrorToString; + error.stack = error.toString(); + throw error; + }; + + exports.updateSyntaxError = function(error, code, filename) { + if (error.toString === syntaxErrorToString) { + error.code || (error.code = code); + error.filename || (error.filename = filename); + error.stack = error.toString(); + } + return error; + }; + + syntaxErrorToString = function() { + var codeLine, colorize, colorsEnabled, end, filename, first_column, first_line, last_column, last_line, marker, ref1, ref2, ref3, ref4, start; + if (!(this.code && this.location)) { + return Error.prototype.toString.call(this); + } + ref1 = this.location, first_line = ref1.first_line, first_column = ref1.first_column, last_line = ref1.last_line, last_column = ref1.last_column; + if (last_line == null) { + last_line = first_line; + } + if (last_column == null) { + last_column = first_column; + } + filename = this.filename || '[stdin]'; + codeLine = this.code.split('\n')[first_line]; + start = first_column; + end = first_line === last_line ? last_column + 1 : codeLine.length; + marker = codeLine.slice(0, start).replace(/[^\s]/g, ' ') + repeat('^', end - start); + if (typeof process !== "undefined" && process !== null) { + colorsEnabled = ((ref2 = process.stdout) != null ? ref2.isTTY : void 0) && !((ref3 = process.env) != null ? ref3.NODE_DISABLE_COLORS : void 0); + } + if ((ref4 = this.colorful) != null ? ref4 : colorsEnabled) { + colorize = function(str) { + return "\x1B[1;31m" + str + "\x1B[0m"; + }; + codeLine = codeLine.slice(0, start) + colorize(codeLine.slice(start, end)) + codeLine.slice(end); + marker = colorize(marker); + } + return filename + ":" + (first_line + 1) + ":" + (first_column + 1) + ": error: " + this.message + "\n" + codeLine + "\n" + marker; + }; + + exports.nameWhitespaceCharacter = function(string) { + switch (string) { + case ' ': + return 'space'; + case '\n': + return 'newline'; + case '\r': + return 'carriage return'; + case '\t': + return 'tab'; + default: + return string; + } + }; + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/index.js b/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/index.js new file mode 100644 index 00000000..15012148 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/index.js @@ -0,0 +1,11 @@ +// Generated by CoffeeScript 1.12.5 +(function() { + var key, ref, val; + + ref = require('./coffee-script'); + for (key in ref) { + val = ref[key]; + exports[key] = val; + } + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/lexer.js b/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/lexer.js new file mode 100644 index 00000000..9e1d98f9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/lexer.js @@ -0,0 +1,1115 @@ +// Generated by CoffeeScript 1.12.5 +(function() { + var BOM, BOOL, CALLABLE, CODE, COFFEE_ALIASES, COFFEE_ALIAS_MAP, COFFEE_KEYWORDS, COMMENT, COMPARE, COMPOUND_ASSIGN, HERECOMMENT_ILLEGAL, HEREDOC_DOUBLE, HEREDOC_INDENT, HEREDOC_SINGLE, HEREGEX, HEREGEX_OMIT, HERE_JSTOKEN, IDENTIFIER, INDENTABLE_CLOSERS, INDEXABLE, INVERSES, JSTOKEN, JS_KEYWORDS, LEADING_BLANK_LINE, LINE_BREAK, LINE_CONTINUER, Lexer, MATH, MULTI_DENT, NOT_REGEX, NUMBER, OPERATOR, POSSIBLY_DIVISION, REGEX, REGEX_FLAGS, REGEX_ILLEGAL, REGEX_INVALID_ESCAPE, RELATION, RESERVED, Rewriter, SHIFT, SIMPLE_STRING_OMIT, STRICT_PROSCRIBED, STRING_DOUBLE, STRING_INVALID_ESCAPE, STRING_OMIT, STRING_SINGLE, STRING_START, TRAILING_BLANK_LINE, TRAILING_SPACES, UNARY, UNARY_MATH, VALID_FLAGS, WHITESPACE, compact, count, invertLiterate, isForFrom, isUnassignable, key, locationDataToString, ref, ref1, repeat, starts, throwSyntaxError, + indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }, + slice = [].slice; + + ref = require('./rewriter'), Rewriter = ref.Rewriter, INVERSES = ref.INVERSES; + + ref1 = require('./helpers'), count = ref1.count, starts = ref1.starts, compact = ref1.compact, repeat = ref1.repeat, invertLiterate = ref1.invertLiterate, locationDataToString = ref1.locationDataToString, throwSyntaxError = ref1.throwSyntaxError; + + exports.Lexer = Lexer = (function() { + function Lexer() {} + + Lexer.prototype.tokenize = function(code, opts) { + var consumed, end, i, ref2; + if (opts == null) { + opts = {}; + } + this.literate = opts.literate; + this.indent = 0; + this.baseIndent = 0; + this.indebt = 0; + this.outdebt = 0; + this.indents = []; + this.ends = []; + this.tokens = []; + this.seenFor = false; + this.seenImport = false; + this.seenExport = false; + this.importSpecifierList = false; + this.exportSpecifierList = false; + this.chunkLine = opts.line || 0; + this.chunkColumn = opts.column || 0; + code = this.clean(code); + i = 0; + while (this.chunk = code.slice(i)) { + consumed = this.identifierToken() || this.commentToken() || this.whitespaceToken() || this.lineToken() || this.stringToken() || this.numberToken() || this.regexToken() || this.jsToken() || this.literalToken(); + ref2 = this.getLineAndColumnFromChunk(consumed), this.chunkLine = ref2[0], this.chunkColumn = ref2[1]; + i += consumed; + if (opts.untilBalanced && this.ends.length === 0) { + return { + tokens: this.tokens, + index: i + }; + } + } + this.closeIndentation(); + if (end = this.ends.pop()) { + this.error("missing " + end.tag, end.origin[2]); + } + if (opts.rewrite === false) { + return this.tokens; + } + return (new Rewriter).rewrite(this.tokens); + }; + + Lexer.prototype.clean = function(code) { + if (code.charCodeAt(0) === BOM) { + code = code.slice(1); + } + code = code.replace(/\r/g, '').replace(TRAILING_SPACES, ''); + if (WHITESPACE.test(code)) { + code = "\n" + code; + this.chunkLine--; + } + if (this.literate) { + code = invertLiterate(code); + } + return code; + }; + + Lexer.prototype.identifierToken = function() { + var alias, colon, colonOffset, id, idLength, input, match, poppedToken, prev, ref2, ref3, ref4, ref5, ref6, ref7, ref8, ref9, tag, tagToken; + if (!(match = IDENTIFIER.exec(this.chunk))) { + return 0; + } + input = match[0], id = match[1], colon = match[2]; + idLength = id.length; + poppedToken = void 0; + if (id === 'own' && this.tag() === 'FOR') { + this.token('OWN', id); + return id.length; + } + if (id === 'from' && this.tag() === 'YIELD') { + this.token('FROM', id); + return id.length; + } + if (id === 'as' && this.seenImport) { + if (this.value() === '*') { + this.tokens[this.tokens.length - 1][0] = 'IMPORT_ALL'; + } else if (ref2 = this.value(), indexOf.call(COFFEE_KEYWORDS, ref2) >= 0) { + this.tokens[this.tokens.length - 1][0] = 'IDENTIFIER'; + } + if ((ref3 = this.tag()) === 'DEFAULT' || ref3 === 'IMPORT_ALL' || ref3 === 'IDENTIFIER') { + this.token('AS', id); + return id.length; + } + } + if (id === 'as' && this.seenExport && ((ref4 = this.tag()) === 'IDENTIFIER' || ref4 === 'DEFAULT')) { + this.token('AS', id); + return id.length; + } + if (id === 'default' && this.seenExport && ((ref5 = this.tag()) === 'EXPORT' || ref5 === 'AS')) { + this.token('DEFAULT', id); + return id.length; + } + ref6 = this.tokens, prev = ref6[ref6.length - 1]; + tag = colon || (prev != null) && (((ref7 = prev[0]) === '.' || ref7 === '?.' || ref7 === '::' || ref7 === '?::') || !prev.spaced && prev[0] === '@') ? 'PROPERTY' : 'IDENTIFIER'; + if (tag === 'IDENTIFIER' && (indexOf.call(JS_KEYWORDS, id) >= 0 || indexOf.call(COFFEE_KEYWORDS, id) >= 0) && !(this.exportSpecifierList && indexOf.call(COFFEE_KEYWORDS, id) >= 0)) { + tag = id.toUpperCase(); + if (tag === 'WHEN' && (ref8 = this.tag(), indexOf.call(LINE_BREAK, ref8) >= 0)) { + tag = 'LEADING_WHEN'; + } else if (tag === 'FOR') { + this.seenFor = true; + } else if (tag === 'UNLESS') { + tag = 'IF'; + } else if (tag === 'IMPORT') { + this.seenImport = true; + } else if (tag === 'EXPORT') { + this.seenExport = true; + } else if (indexOf.call(UNARY, tag) >= 0) { + tag = 'UNARY'; + } else if (indexOf.call(RELATION, tag) >= 0) { + if (tag !== 'INSTANCEOF' && this.seenFor) { + tag = 'FOR' + tag; + this.seenFor = false; + } else { + tag = 'RELATION'; + if (this.value() === '!') { + poppedToken = this.tokens.pop(); + id = '!' + id; + } + } + } + } else if (tag === 'IDENTIFIER' && this.seenFor && id === 'from' && isForFrom(prev)) { + tag = 'FORFROM'; + this.seenFor = false; + } + if (tag === 'IDENTIFIER' && indexOf.call(RESERVED, id) >= 0) { + this.error("reserved word '" + id + "'", { + length: id.length + }); + } + if (tag !== 'PROPERTY') { + if (indexOf.call(COFFEE_ALIASES, id) >= 0) { + alias = id; + id = COFFEE_ALIAS_MAP[id]; + } + tag = (function() { + switch (id) { + case '!': + return 'UNARY'; + case '==': + case '!=': + return 'COMPARE'; + case 'true': + case 'false': + return 'BOOL'; + case 'break': + case 'continue': + case 'debugger': + return 'STATEMENT'; + case '&&': + case '||': + return id; + default: + return tag; + } + })(); + } + tagToken = this.token(tag, id, 0, idLength); + if (alias) { + tagToken.origin = [tag, alias, tagToken[2]]; + } + if (poppedToken) { + ref9 = [poppedToken[2].first_line, poppedToken[2].first_column], tagToken[2].first_line = ref9[0], tagToken[2].first_column = ref9[1]; + } + if (colon) { + colonOffset = input.lastIndexOf(':'); + this.token(':', ':', colonOffset, colon.length); + } + return input.length; + }; + + Lexer.prototype.numberToken = function() { + var base, lexedLength, match, number, numberValue, ref2, tag; + if (!(match = NUMBER.exec(this.chunk))) { + return 0; + } + number = match[0]; + lexedLength = number.length; + switch (false) { + case !/^0[BOX]/.test(number): + this.error("radix prefix in '" + number + "' must be lowercase", { + offset: 1 + }); + break; + case !/^(?!0x).*E/.test(number): + this.error("exponential notation in '" + number + "' must be indicated with a lowercase 'e'", { + offset: number.indexOf('E') + }); + break; + case !/^0\d*[89]/.test(number): + this.error("decimal literal '" + number + "' must not be prefixed with '0'", { + length: lexedLength + }); + break; + case !/^0\d+/.test(number): + this.error("octal literal '" + number + "' must be prefixed with '0o'", { + length: lexedLength + }); + } + base = (function() { + switch (number.charAt(1)) { + case 'b': + return 2; + case 'o': + return 8; + case 'x': + return 16; + default: + return null; + } + })(); + numberValue = base != null ? parseInt(number.slice(2), base) : parseFloat(number); + if ((ref2 = number.charAt(1)) === 'b' || ref2 === 'o') { + number = "0x" + (numberValue.toString(16)); + } + tag = numberValue === 2e308 ? 'INFINITY' : 'NUMBER'; + this.token(tag, number, 0, lexedLength); + return lexedLength; + }; + + Lexer.prototype.stringToken = function() { + var $, attempt, delimiter, doc, end, heredoc, i, indent, indentRegex, match, quote, ref2, ref3, regex, token, tokens; + quote = (STRING_START.exec(this.chunk) || [])[0]; + if (!quote) { + return 0; + } + if (this.tokens.length && this.value() === 'from' && (this.seenImport || this.seenExport)) { + this.tokens[this.tokens.length - 1][0] = 'FROM'; + } + regex = (function() { + switch (quote) { + case "'": + return STRING_SINGLE; + case '"': + return STRING_DOUBLE; + case "'''": + return HEREDOC_SINGLE; + case '"""': + return HEREDOC_DOUBLE; + } + })(); + heredoc = quote.length === 3; + ref2 = this.matchWithInterpolations(regex, quote), tokens = ref2.tokens, end = ref2.index; + $ = tokens.length - 1; + delimiter = quote.charAt(0); + if (heredoc) { + indent = null; + doc = ((function() { + var j, len, results; + results = []; + for (i = j = 0, len = tokens.length; j < len; i = ++j) { + token = tokens[i]; + if (token[0] === 'NEOSTRING') { + results.push(token[1]); + } + } + return results; + })()).join('#{}'); + while (match = HEREDOC_INDENT.exec(doc)) { + attempt = match[1]; + if (indent === null || (0 < (ref3 = attempt.length) && ref3 < indent.length)) { + indent = attempt; + } + } + if (indent) { + indentRegex = RegExp("\\n" + indent, "g"); + } + this.mergeInterpolationTokens(tokens, { + delimiter: delimiter + }, (function(_this) { + return function(value, i) { + value = _this.formatString(value); + if (indentRegex) { + value = value.replace(indentRegex, '\n'); + } + if (i === 0) { + value = value.replace(LEADING_BLANK_LINE, ''); + } + if (i === $) { + value = value.replace(TRAILING_BLANK_LINE, ''); + } + return value; + }; + })(this)); + } else { + this.mergeInterpolationTokens(tokens, { + delimiter: delimiter + }, (function(_this) { + return function(value, i) { + value = _this.formatString(value); + value = value.replace(SIMPLE_STRING_OMIT, function(match, offset) { + if ((i === 0 && offset === 0) || (i === $ && offset + match.length === value.length)) { + return ''; + } else { + return ' '; + } + }); + return value; + }; + })(this)); + } + return end; + }; + + Lexer.prototype.commentToken = function() { + var comment, here, match; + if (!(match = this.chunk.match(COMMENT))) { + return 0; + } + comment = match[0], here = match[1]; + if (here) { + if (match = HERECOMMENT_ILLEGAL.exec(comment)) { + this.error("block comments cannot contain " + match[0], { + offset: match.index, + length: match[0].length + }); + } + if (here.indexOf('\n') >= 0) { + here = here.replace(RegExp("\\n" + (repeat(' ', this.indent)), "g"), '\n'); + } + this.token('HERECOMMENT', here, 0, comment.length); + } + return comment.length; + }; + + Lexer.prototype.jsToken = function() { + var match, script; + if (!(this.chunk.charAt(0) === '`' && (match = HERE_JSTOKEN.exec(this.chunk) || JSTOKEN.exec(this.chunk)))) { + return 0; + } + script = match[1].replace(/\\+(`|$)/g, function(string) { + return string.slice(-Math.ceil(string.length / 2)); + }); + this.token('JS', script, 0, match[0].length); + return match[0].length; + }; + + Lexer.prototype.regexToken = function() { + var body, closed, end, flags, index, match, origin, prev, ref2, ref3, ref4, regex, tokens; + switch (false) { + case !(match = REGEX_ILLEGAL.exec(this.chunk)): + this.error("regular expressions cannot begin with " + match[2], { + offset: match.index + match[1].length + }); + break; + case !(match = this.matchWithInterpolations(HEREGEX, '///')): + tokens = match.tokens, index = match.index; + break; + case !(match = REGEX.exec(this.chunk)): + regex = match[0], body = match[1], closed = match[2]; + this.validateEscapes(body, { + isRegex: true, + offsetInChunk: 1 + }); + index = regex.length; + ref2 = this.tokens, prev = ref2[ref2.length - 1]; + if (prev) { + if (prev.spaced && (ref3 = prev[0], indexOf.call(CALLABLE, ref3) >= 0)) { + if (!closed || POSSIBLY_DIVISION.test(regex)) { + return 0; + } + } else if (ref4 = prev[0], indexOf.call(NOT_REGEX, ref4) >= 0) { + return 0; + } + } + if (!closed) { + this.error('missing / (unclosed regex)'); + } + break; + default: + return 0; + } + flags = REGEX_FLAGS.exec(this.chunk.slice(index))[0]; + end = index + flags.length; + origin = this.makeToken('REGEX', null, 0, end); + switch (false) { + case !!VALID_FLAGS.test(flags): + this.error("invalid regular expression flags " + flags, { + offset: index, + length: flags.length + }); + break; + case !(regex || tokens.length === 1): + if (body == null) { + body = this.formatHeregex(tokens[0][1]); + } + this.token('REGEX', "" + (this.makeDelimitedLiteral(body, { + delimiter: '/' + })) + flags, 0, end, origin); + break; + default: + this.token('REGEX_START', '(', 0, 0, origin); + this.token('IDENTIFIER', 'RegExp', 0, 0); + this.token('CALL_START', '(', 0, 0); + this.mergeInterpolationTokens(tokens, { + delimiter: '"', + double: true + }, this.formatHeregex); + if (flags) { + this.token(',', ',', index - 1, 0); + this.token('STRING', '"' + flags + '"', index - 1, flags.length); + } + this.token(')', ')', end - 1, 0); + this.token('REGEX_END', ')', end - 1, 0); + } + return end; + }; + + Lexer.prototype.lineToken = function() { + var diff, indent, match, noNewlines, size; + if (!(match = MULTI_DENT.exec(this.chunk))) { + return 0; + } + indent = match[0]; + this.seenFor = false; + if (!this.importSpecifierList) { + this.seenImport = false; + } + if (!this.exportSpecifierList) { + this.seenExport = false; + } + size = indent.length - 1 - indent.lastIndexOf('\n'); + noNewlines = this.unfinished(); + if (size - this.indebt === this.indent) { + if (noNewlines) { + this.suppressNewlines(); + } else { + this.newlineToken(0); + } + return indent.length; + } + if (size > this.indent) { + if (noNewlines) { + this.indebt = size - this.indent; + this.suppressNewlines(); + return indent.length; + } + if (!this.tokens.length) { + this.baseIndent = this.indent = size; + return indent.length; + } + diff = size - this.indent + this.outdebt; + this.token('INDENT', diff, indent.length - size, size); + this.indents.push(diff); + this.ends.push({ + tag: 'OUTDENT' + }); + this.outdebt = this.indebt = 0; + this.indent = size; + } else if (size < this.baseIndent) { + this.error('missing indentation', { + offset: indent.length + }); + } else { + this.indebt = 0; + this.outdentToken(this.indent - size, noNewlines, indent.length); + } + return indent.length; + }; + + Lexer.prototype.outdentToken = function(moveOut, noNewlines, outdentLength) { + var decreasedIndent, dent, lastIndent, ref2; + decreasedIndent = this.indent - moveOut; + while (moveOut > 0) { + lastIndent = this.indents[this.indents.length - 1]; + if (!lastIndent) { + moveOut = 0; + } else if (lastIndent === this.outdebt) { + moveOut -= this.outdebt; + this.outdebt = 0; + } else if (lastIndent < this.outdebt) { + this.outdebt -= lastIndent; + moveOut -= lastIndent; + } else { + dent = this.indents.pop() + this.outdebt; + if (outdentLength && (ref2 = this.chunk[outdentLength], indexOf.call(INDENTABLE_CLOSERS, ref2) >= 0)) { + decreasedIndent -= dent - moveOut; + moveOut = dent; + } + this.outdebt = 0; + this.pair('OUTDENT'); + this.token('OUTDENT', moveOut, 0, outdentLength); + moveOut -= dent; + } + } + if (dent) { + this.outdebt -= moveOut; + } + while (this.value() === ';') { + this.tokens.pop(); + } + if (!(this.tag() === 'TERMINATOR' || noNewlines)) { + this.token('TERMINATOR', '\n', outdentLength, 0); + } + this.indent = decreasedIndent; + return this; + }; + + Lexer.prototype.whitespaceToken = function() { + var match, nline, prev, ref2; + if (!((match = WHITESPACE.exec(this.chunk)) || (nline = this.chunk.charAt(0) === '\n'))) { + return 0; + } + ref2 = this.tokens, prev = ref2[ref2.length - 1]; + if (prev) { + prev[match ? 'spaced' : 'newLine'] = true; + } + if (match) { + return match[0].length; + } else { + return 0; + } + }; + + Lexer.prototype.newlineToken = function(offset) { + while (this.value() === ';') { + this.tokens.pop(); + } + if (this.tag() !== 'TERMINATOR') { + this.token('TERMINATOR', '\n', offset, 0); + } + return this; + }; + + Lexer.prototype.suppressNewlines = function() { + if (this.value() === '\\') { + this.tokens.pop(); + } + return this; + }; + + Lexer.prototype.literalToken = function() { + var match, message, origin, prev, ref2, ref3, ref4, ref5, ref6, skipToken, tag, token, value; + if (match = OPERATOR.exec(this.chunk)) { + value = match[0]; + if (CODE.test(value)) { + this.tagParameters(); + } + } else { + value = this.chunk.charAt(0); + } + tag = value; + ref2 = this.tokens, prev = ref2[ref2.length - 1]; + if (prev && indexOf.call(['='].concat(slice.call(COMPOUND_ASSIGN)), value) >= 0) { + skipToken = false; + if (value === '=' && ((ref3 = prev[1]) === '||' || ref3 === '&&') && !prev.spaced) { + prev[0] = 'COMPOUND_ASSIGN'; + prev[1] += '='; + prev = this.tokens[this.tokens.length - 2]; + skipToken = true; + } + if (prev && prev[0] !== 'PROPERTY') { + origin = (ref4 = prev.origin) != null ? ref4 : prev; + message = isUnassignable(prev[1], origin[1]); + if (message) { + this.error(message, origin[2]); + } + } + if (skipToken) { + return value.length; + } + } + if (value === '{' && this.seenImport) { + this.importSpecifierList = true; + } else if (this.importSpecifierList && value === '}') { + this.importSpecifierList = false; + } else if (value === '{' && (prev != null ? prev[0] : void 0) === 'EXPORT') { + this.exportSpecifierList = true; + } else if (this.exportSpecifierList && value === '}') { + this.exportSpecifierList = false; + } + if (value === ';') { + this.seenFor = this.seenImport = this.seenExport = false; + tag = 'TERMINATOR'; + } else if (value === '*' && prev[0] === 'EXPORT') { + tag = 'EXPORT_ALL'; + } else if (indexOf.call(MATH, value) >= 0) { + tag = 'MATH'; + } else if (indexOf.call(COMPARE, value) >= 0) { + tag = 'COMPARE'; + } else if (indexOf.call(COMPOUND_ASSIGN, value) >= 0) { + tag = 'COMPOUND_ASSIGN'; + } else if (indexOf.call(UNARY, value) >= 0) { + tag = 'UNARY'; + } else if (indexOf.call(UNARY_MATH, value) >= 0) { + tag = 'UNARY_MATH'; + } else if (indexOf.call(SHIFT, value) >= 0) { + tag = 'SHIFT'; + } else if (value === '?' && (prev != null ? prev.spaced : void 0)) { + tag = 'BIN?'; + } else if (prev && !prev.spaced) { + if (value === '(' && (ref5 = prev[0], indexOf.call(CALLABLE, ref5) >= 0)) { + if (prev[0] === '?') { + prev[0] = 'FUNC_EXIST'; + } + tag = 'CALL_START'; + } else if (value === '[' && (ref6 = prev[0], indexOf.call(INDEXABLE, ref6) >= 0)) { + tag = 'INDEX_START'; + switch (prev[0]) { + case '?': + prev[0] = 'INDEX_SOAK'; + } + } + } + token = this.makeToken(tag, value); + switch (value) { + case '(': + case '{': + case '[': + this.ends.push({ + tag: INVERSES[value], + origin: token + }); + break; + case ')': + case '}': + case ']': + this.pair(value); + } + this.tokens.push(token); + return value.length; + }; + + Lexer.prototype.tagParameters = function() { + var i, stack, tok, tokens; + if (this.tag() !== ')') { + return this; + } + stack = []; + tokens = this.tokens; + i = tokens.length; + tokens[--i][0] = 'PARAM_END'; + while (tok = tokens[--i]) { + switch (tok[0]) { + case ')': + stack.push(tok); + break; + case '(': + case 'CALL_START': + if (stack.length) { + stack.pop(); + } else if (tok[0] === '(') { + tok[0] = 'PARAM_START'; + return this; + } else { + return this; + } + } + } + return this; + }; + + Lexer.prototype.closeIndentation = function() { + return this.outdentToken(this.indent); + }; + + Lexer.prototype.matchWithInterpolations = function(regex, delimiter) { + var close, column, firstToken, index, lastToken, line, nested, offsetInChunk, open, ref2, ref3, ref4, str, strPart, tokens; + tokens = []; + offsetInChunk = delimiter.length; + if (this.chunk.slice(0, offsetInChunk) !== delimiter) { + return null; + } + str = this.chunk.slice(offsetInChunk); + while (true) { + strPart = regex.exec(str)[0]; + this.validateEscapes(strPart, { + isRegex: delimiter.charAt(0) === '/', + offsetInChunk: offsetInChunk + }); + tokens.push(this.makeToken('NEOSTRING', strPart, offsetInChunk)); + str = str.slice(strPart.length); + offsetInChunk += strPart.length; + if (str.slice(0, 2) !== '#{') { + break; + } + ref2 = this.getLineAndColumnFromChunk(offsetInChunk + 1), line = ref2[0], column = ref2[1]; + ref3 = new Lexer().tokenize(str.slice(1), { + line: line, + column: column, + untilBalanced: true + }), nested = ref3.tokens, index = ref3.index; + index += 1; + open = nested[0], close = nested[nested.length - 1]; + open[0] = open[1] = '('; + close[0] = close[1] = ')'; + close.origin = ['', 'end of interpolation', close[2]]; + if (((ref4 = nested[1]) != null ? ref4[0] : void 0) === 'TERMINATOR') { + nested.splice(1, 1); + } + tokens.push(['TOKENS', nested]); + str = str.slice(index); + offsetInChunk += index; + } + if (str.slice(0, delimiter.length) !== delimiter) { + this.error("missing " + delimiter, { + length: delimiter.length + }); + } + firstToken = tokens[0], lastToken = tokens[tokens.length - 1]; + firstToken[2].first_column -= delimiter.length; + if (lastToken[1].substr(-1) === '\n') { + lastToken[2].last_line += 1; + lastToken[2].last_column = delimiter.length - 1; + } else { + lastToken[2].last_column += delimiter.length; + } + if (lastToken[1].length === 0) { + lastToken[2].last_column -= 1; + } + return { + tokens: tokens, + index: offsetInChunk + delimiter.length + }; + }; + + Lexer.prototype.mergeInterpolationTokens = function(tokens, options, fn) { + var converted, firstEmptyStringIndex, firstIndex, i, j, lastToken, len, locationToken, lparen, plusToken, ref2, rparen, tag, token, tokensToPush, value; + if (tokens.length > 1) { + lparen = this.token('STRING_START', '(', 0, 0); + } + firstIndex = this.tokens.length; + for (i = j = 0, len = tokens.length; j < len; i = ++j) { + token = tokens[i]; + tag = token[0], value = token[1]; + switch (tag) { + case 'TOKENS': + if (value.length === 2) { + continue; + } + locationToken = value[0]; + tokensToPush = value; + break; + case 'NEOSTRING': + converted = fn(token[1], i); + if (converted.length === 0) { + if (i === 0) { + firstEmptyStringIndex = this.tokens.length; + } else { + continue; + } + } + if (i === 2 && (firstEmptyStringIndex != null)) { + this.tokens.splice(firstEmptyStringIndex, 2); + } + token[0] = 'STRING'; + token[1] = this.makeDelimitedLiteral(converted, options); + locationToken = token; + tokensToPush = [token]; + } + if (this.tokens.length > firstIndex) { + plusToken = this.token('+', '+'); + plusToken[2] = { + first_line: locationToken[2].first_line, + first_column: locationToken[2].first_column, + last_line: locationToken[2].first_line, + last_column: locationToken[2].first_column + }; + } + (ref2 = this.tokens).push.apply(ref2, tokensToPush); + } + if (lparen) { + lastToken = tokens[tokens.length - 1]; + lparen.origin = [ + 'STRING', null, { + first_line: lparen[2].first_line, + first_column: lparen[2].first_column, + last_line: lastToken[2].last_line, + last_column: lastToken[2].last_column + } + ]; + rparen = this.token('STRING_END', ')'); + return rparen[2] = { + first_line: lastToken[2].last_line, + first_column: lastToken[2].last_column, + last_line: lastToken[2].last_line, + last_column: lastToken[2].last_column + }; + } + }; + + Lexer.prototype.pair = function(tag) { + var lastIndent, prev, ref2, ref3, wanted; + ref2 = this.ends, prev = ref2[ref2.length - 1]; + if (tag !== (wanted = prev != null ? prev.tag : void 0)) { + if ('OUTDENT' !== wanted) { + this.error("unmatched " + tag); + } + ref3 = this.indents, lastIndent = ref3[ref3.length - 1]; + this.outdentToken(lastIndent, true); + return this.pair(tag); + } + return this.ends.pop(); + }; + + Lexer.prototype.getLineAndColumnFromChunk = function(offset) { + var column, lastLine, lineCount, ref2, string; + if (offset === 0) { + return [this.chunkLine, this.chunkColumn]; + } + if (offset >= this.chunk.length) { + string = this.chunk; + } else { + string = this.chunk.slice(0, +(offset - 1) + 1 || 9e9); + } + lineCount = count(string, '\n'); + column = this.chunkColumn; + if (lineCount > 0) { + ref2 = string.split('\n'), lastLine = ref2[ref2.length - 1]; + column = lastLine.length; + } else { + column += string.length; + } + return [this.chunkLine + lineCount, column]; + }; + + Lexer.prototype.makeToken = function(tag, value, offsetInChunk, length) { + var lastCharacter, locationData, ref2, ref3, token; + if (offsetInChunk == null) { + offsetInChunk = 0; + } + if (length == null) { + length = value.length; + } + locationData = {}; + ref2 = this.getLineAndColumnFromChunk(offsetInChunk), locationData.first_line = ref2[0], locationData.first_column = ref2[1]; + lastCharacter = length > 0 ? length - 1 : 0; + ref3 = this.getLineAndColumnFromChunk(offsetInChunk + lastCharacter), locationData.last_line = ref3[0], locationData.last_column = ref3[1]; + token = [tag, value, locationData]; + return token; + }; + + Lexer.prototype.token = function(tag, value, offsetInChunk, length, origin) { + var token; + token = this.makeToken(tag, value, offsetInChunk, length); + if (origin) { + token.origin = origin; + } + this.tokens.push(token); + return token; + }; + + Lexer.prototype.tag = function() { + var ref2, token; + ref2 = this.tokens, token = ref2[ref2.length - 1]; + return token != null ? token[0] : void 0; + }; + + Lexer.prototype.value = function() { + var ref2, token; + ref2 = this.tokens, token = ref2[ref2.length - 1]; + return token != null ? token[1] : void 0; + }; + + Lexer.prototype.unfinished = function() { + var ref2; + return LINE_CONTINUER.test(this.chunk) || ((ref2 = this.tag()) === '\\' || ref2 === '.' || ref2 === '?.' || ref2 === '?::' || ref2 === 'UNARY' || ref2 === 'MATH' || ref2 === 'UNARY_MATH' || ref2 === '+' || ref2 === '-' || ref2 === '**' || ref2 === 'SHIFT' || ref2 === 'RELATION' || ref2 === 'COMPARE' || ref2 === '&' || ref2 === '^' || ref2 === '|' || ref2 === '&&' || ref2 === '||' || ref2 === 'BIN?' || ref2 === 'THROW' || ref2 === 'EXTENDS'); + }; + + Lexer.prototype.formatString = function(str) { + return str.replace(STRING_OMIT, '$1'); + }; + + Lexer.prototype.formatHeregex = function(str) { + return str.replace(HEREGEX_OMIT, '$1$2'); + }; + + Lexer.prototype.validateEscapes = function(str, options) { + var before, hex, invalidEscape, invalidEscapeRegex, match, message, octal, ref2, unicode; + if (options == null) { + options = {}; + } + invalidEscapeRegex = options.isRegex ? REGEX_INVALID_ESCAPE : STRING_INVALID_ESCAPE; + match = invalidEscapeRegex.exec(str); + if (!match) { + return; + } + match[0], before = match[1], octal = match[2], hex = match[3], unicode = match[4]; + message = octal ? "octal escape sequences are not allowed" : "invalid escape sequence"; + invalidEscape = "\\" + (octal || hex || unicode); + return this.error(message + " " + invalidEscape, { + offset: ((ref2 = options.offsetInChunk) != null ? ref2 : 0) + match.index + before.length, + length: invalidEscape.length + }); + }; + + Lexer.prototype.makeDelimitedLiteral = function(body, options) { + var regex; + if (options == null) { + options = {}; + } + if (body === '' && options.delimiter === '/') { + body = '(?:)'; + } + regex = RegExp("(\\\\\\\\)|(\\\\0(?=[1-7]))|\\\\?(" + options.delimiter + ")|\\\\?(?:(\\n)|(\\r)|(\\u2028)|(\\u2029))|(\\\\.)", "g"); + body = body.replace(regex, function(match, backslash, nul, delimiter, lf, cr, ls, ps, other) { + switch (false) { + case !backslash: + if (options.double) { + return backslash + backslash; + } else { + return backslash; + } + case !nul: + return '\\x00'; + case !delimiter: + return "\\" + delimiter; + case !lf: + return '\\n'; + case !cr: + return '\\r'; + case !ls: + return '\\u2028'; + case !ps: + return '\\u2029'; + case !other: + if (options.double) { + return "\\" + other; + } else { + return other; + } + } + }); + return "" + options.delimiter + body + options.delimiter; + }; + + Lexer.prototype.error = function(message, options) { + var first_column, first_line, location, ref2, ref3, ref4; + if (options == null) { + options = {}; + } + location = 'first_line' in options ? options : ((ref3 = this.getLineAndColumnFromChunk((ref2 = options.offset) != null ? ref2 : 0), first_line = ref3[0], first_column = ref3[1], ref3), { + first_line: first_line, + first_column: first_column, + last_column: first_column + ((ref4 = options.length) != null ? ref4 : 1) - 1 + }); + return throwSyntaxError(message, location); + }; + + return Lexer; + + })(); + + isUnassignable = function(name, displayName) { + if (displayName == null) { + displayName = name; + } + switch (false) { + case indexOf.call(slice.call(JS_KEYWORDS).concat(slice.call(COFFEE_KEYWORDS)), name) < 0: + return "keyword '" + displayName + "' can't be assigned"; + case indexOf.call(STRICT_PROSCRIBED, name) < 0: + return "'" + displayName + "' can't be assigned"; + case indexOf.call(RESERVED, name) < 0: + return "reserved word '" + displayName + "' can't be assigned"; + default: + return false; + } + }; + + exports.isUnassignable = isUnassignable; + + isForFrom = function(prev) { + var ref2; + if (prev[0] === 'IDENTIFIER') { + if (prev[1] === 'from') { + prev[1][0] = 'IDENTIFIER'; + true; + } + return true; + } else if (prev[0] === 'FOR') { + return false; + } else if ((ref2 = prev[1]) === '{' || ref2 === '[' || ref2 === ',' || ref2 === ':') { + return false; + } else { + return true; + } + }; + + JS_KEYWORDS = ['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']; + + COFFEE_KEYWORDS = ['undefined', 'Infinity', 'NaN', 'then', 'unless', 'until', 'loop', 'of', 'by', 'when']; + + COFFEE_ALIAS_MAP = { + and: '&&', + or: '||', + is: '==', + isnt: '!=', + not: '!', + yes: 'true', + no: 'false', + on: 'true', + off: 'false' + }; + + COFFEE_ALIASES = (function() { + var results; + results = []; + for (key in COFFEE_ALIAS_MAP) { + results.push(key); + } + return results; + })(); + + COFFEE_KEYWORDS = COFFEE_KEYWORDS.concat(COFFEE_ALIASES); + + RESERVED = ['case', 'function', 'var', 'void', 'with', 'const', 'let', 'enum', 'native', 'implements', 'interface', 'package', 'private', 'protected', 'public', 'static']; + + STRICT_PROSCRIBED = ['arguments', 'eval']; + + exports.JS_FORBIDDEN = JS_KEYWORDS.concat(RESERVED).concat(STRICT_PROSCRIBED); + + BOM = 65279; + + IDENTIFIER = /^(?!\d)((?:(?!\s)[$\w\x7f-\uffff])+)([^\n\S]*:(?!:))?/; + + NUMBER = /^0b[01]+|^0o[0-7]+|^0x[\da-f]+|^\d*\.?\d+(?:e[+-]?\d+)?/i; + + OPERATOR = /^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>*\/%])\2=?|\?(\.|::)|\.{2,3})/; + + WHITESPACE = /^[^\n\S]+/; + + COMMENT = /^###([^#][\s\S]*?)(?:###[^\n\S]*|###$)|^(?:\s*#(?!##[^#]).*)+/; + + CODE = /^[-=]>/; + + MULTI_DENT = /^(?:\n[^\n\S]*)+/; + + JSTOKEN = /^`(?!``)((?:[^`\\]|\\[\s\S])*)`/; + + HERE_JSTOKEN = /^```((?:[^`\\]|\\[\s\S]|`(?!``))*)```/; + + STRING_START = /^(?:'''|"""|'|")/; + + STRING_SINGLE = /^(?:[^\\']|\\[\s\S])*/; + + STRING_DOUBLE = /^(?:[^\\"#]|\\[\s\S]|\#(?!\{))*/; + + HEREDOC_SINGLE = /^(?:[^\\']|\\[\s\S]|'(?!''))*/; + + HEREDOC_DOUBLE = /^(?:[^\\"#]|\\[\s\S]|"(?!"")|\#(?!\{))*/; + + STRING_OMIT = /((?:\\\\)+)|\\[^\S\n]*\n\s*/g; + + SIMPLE_STRING_OMIT = /\s*\n\s*/g; + + HEREDOC_INDENT = /\n+([^\n\S]*)(?=\S)/g; + + REGEX = /^\/(?!\/)((?:[^[\/\n\\]|\\[^\n]|\[(?:\\[^\n]|[^\]\n\\])*\])*)(\/)?/; + + REGEX_FLAGS = /^\w*/; + + VALID_FLAGS = /^(?!.*(.).*\1)[imgy]*$/; + + HEREGEX = /^(?:[^\\\/#]|\\[\s\S]|\/(?!\/\/)|\#(?!\{))*/; + + HEREGEX_OMIT = /((?:\\\\)+)|\\(\s)|\s+(?:#.*)?/g; + + REGEX_ILLEGAL = /^(\/|\/{3}\s*)(\*)/; + + POSSIBLY_DIVISION = /^\/=?\s/; + + HERECOMMENT_ILLEGAL = /\*\//; + + LINE_CONTINUER = /^\s*(?:,|\??\.(?![.\d])|::)/; + + STRING_INVALID_ESCAPE = /((?:^|[^\\])(?:\\\\)*)\\(?:(0[0-7]|[1-7])|(x(?![\da-fA-F]{2}).{0,2})|(u(?![\da-fA-F]{4}).{0,4}))/; + + REGEX_INVALID_ESCAPE = /((?:^|[^\\])(?:\\\\)*)\\(?:(0[0-7])|(x(?![\da-fA-F]{2}).{0,2})|(u(?![\da-fA-F]{4}).{0,4}))/; + + LEADING_BLANK_LINE = /^[^\n\S]*\n/; + + TRAILING_BLANK_LINE = /\n[^\n\S]*$/; + + TRAILING_SPACES = /\s+$/; + + COMPOUND_ASSIGN = ['-=', '+=', '/=', '*=', '%=', '||=', '&&=', '?=', '<<=', '>>=', '>>>=', '&=', '^=', '|=', '**=', '//=', '%%=']; + + UNARY = ['NEW', 'TYPEOF', 'DELETE', 'DO']; + + UNARY_MATH = ['!', '~']; + + SHIFT = ['<<', '>>', '>>>']; + + COMPARE = ['==', '!=', '<', '>', '<=', '>=']; + + MATH = ['*', '/', '%', '//', '%%']; + + RELATION = ['IN', 'OF', 'INSTANCEOF']; + + BOOL = ['TRUE', 'FALSE']; + + CALLABLE = ['IDENTIFIER', 'PROPERTY', ')', ']', '?', '@', 'THIS', 'SUPER']; + + INDEXABLE = CALLABLE.concat(['NUMBER', 'INFINITY', 'NAN', 'STRING', 'STRING_END', 'REGEX', 'REGEX_END', 'BOOL', 'NULL', 'UNDEFINED', '}', '::']); + + NOT_REGEX = INDEXABLE.concat(['++', '--']); + + LINE_BREAK = ['INDENT', 'OUTDENT', 'TERMINATOR']; + + INDENTABLE_CLOSERS = [')', '}', ']']; + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/nodes.js b/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/nodes.js new file mode 100644 index 00000000..464afb5f --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/nodes.js @@ -0,0 +1,3899 @@ +// Generated by CoffeeScript 1.12.5 +(function() { + var Access, Arr, Assign, Base, Block, BooleanLiteral, Call, Class, Code, CodeFragment, Comment, Existence, Expansion, ExportAllDeclaration, ExportDeclaration, ExportDefaultDeclaration, ExportNamedDeclaration, ExportSpecifier, ExportSpecifierList, Extends, For, IdentifierLiteral, If, ImportClause, ImportDeclaration, ImportDefaultSpecifier, ImportNamespaceSpecifier, ImportSpecifier, ImportSpecifierList, In, Index, InfinityLiteral, JS_FORBIDDEN, LEVEL_ACCESS, LEVEL_COND, LEVEL_LIST, LEVEL_OP, LEVEL_PAREN, LEVEL_TOP, Literal, ModuleDeclaration, ModuleSpecifier, ModuleSpecifierList, NEGATE, NO, NaNLiteral, NullLiteral, NumberLiteral, Obj, Op, Param, Parens, PassthroughLiteral, PropertyName, Range, RegexLiteral, RegexWithInterpolations, Return, SIMPLENUM, Scope, Slice, Splat, StatementLiteral, StringLiteral, StringWithInterpolations, SuperCall, Switch, TAB, THIS, TaggedTemplateCall, ThisLiteral, Throw, Try, UTILITIES, UndefinedLiteral, Value, While, YES, YieldReturn, addLocationDataFn, compact, del, ends, extend, flatten, fragmentsToText, isComplexOrAssignable, isLiteralArguments, isLiteralThis, isUnassignable, locationDataToString, merge, multident, ref1, ref2, some, starts, throwSyntaxError, unfoldSoak, utility, + extend1 = function(child, parent) { for (var key in parent) { if (hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + hasProp = {}.hasOwnProperty, + indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }, + slice = [].slice; + + Error.stackTraceLimit = 2e308; + + Scope = require('./scope').Scope; + + ref1 = require('./lexer'), isUnassignable = ref1.isUnassignable, JS_FORBIDDEN = ref1.JS_FORBIDDEN; + + ref2 = require('./helpers'), compact = ref2.compact, flatten = ref2.flatten, extend = ref2.extend, merge = ref2.merge, del = ref2.del, starts = ref2.starts, ends = ref2.ends, some = ref2.some, addLocationDataFn = ref2.addLocationDataFn, locationDataToString = ref2.locationDataToString, throwSyntaxError = ref2.throwSyntaxError; + + exports.extend = extend; + + exports.addLocationDataFn = addLocationDataFn; + + YES = function() { + return true; + }; + + NO = function() { + return false; + }; + + THIS = function() { + return this; + }; + + NEGATE = function() { + this.negated = !this.negated; + return this; + }; + + exports.CodeFragment = CodeFragment = (function() { + function CodeFragment(parent, code) { + var ref3; + this.code = "" + code; + this.locationData = parent != null ? parent.locationData : void 0; + this.type = (parent != null ? (ref3 = parent.constructor) != null ? ref3.name : void 0 : void 0) || 'unknown'; + } + + CodeFragment.prototype.toString = function() { + return "" + this.code + (this.locationData ? ": " + locationDataToString(this.locationData) : ''); + }; + + return CodeFragment; + + })(); + + fragmentsToText = function(fragments) { + var fragment; + return ((function() { + var j, len1, results; + results = []; + for (j = 0, len1 = fragments.length; j < len1; j++) { + fragment = fragments[j]; + results.push(fragment.code); + } + return results; + })()).join(''); + }; + + exports.Base = Base = (function() { + function Base() {} + + Base.prototype.compile = function(o, lvl) { + return fragmentsToText(this.compileToFragments(o, lvl)); + }; + + Base.prototype.compileToFragments = function(o, lvl) { + var node; + o = extend({}, o); + if (lvl) { + o.level = lvl; + } + node = this.unfoldSoak(o) || this; + node.tab = o.indent; + if (o.level === LEVEL_TOP || !node.isStatement(o)) { + return node.compileNode(o); + } else { + return node.compileClosure(o); + } + }; + + Base.prototype.compileClosure = function(o) { + var args, argumentsNode, func, jumpNode, meth, parts, ref3; + if (jumpNode = this.jumps()) { + jumpNode.error('cannot use a pure statement in an expression'); + } + o.sharedScope = true; + func = new Code([], Block.wrap([this])); + args = []; + if ((argumentsNode = this.contains(isLiteralArguments)) || this.contains(isLiteralThis)) { + args = [new ThisLiteral]; + if (argumentsNode) { + meth = 'apply'; + args.push(new IdentifierLiteral('arguments')); + } else { + meth = 'call'; + } + func = new Value(func, [new Access(new PropertyName(meth))]); + } + parts = (new Call(func, args)).compileNode(o); + if (func.isGenerator || ((ref3 = func.base) != null ? ref3.isGenerator : void 0)) { + parts.unshift(this.makeCode("(yield* ")); + parts.push(this.makeCode(")")); + } + return parts; + }; + + Base.prototype.cache = function(o, level, isComplex) { + var complex, ref, sub; + complex = isComplex != null ? isComplex(this) : this.isComplex(); + if (complex) { + ref = new IdentifierLiteral(o.scope.freeVariable('ref')); + sub = new Assign(ref, this); + if (level) { + return [sub.compileToFragments(o, level), [this.makeCode(ref.value)]]; + } else { + return [sub, ref]; + } + } else { + ref = level ? this.compileToFragments(o, level) : this; + return [ref, ref]; + } + }; + + Base.prototype.cacheToCodeFragments = function(cacheValues) { + return [fragmentsToText(cacheValues[0]), fragmentsToText(cacheValues[1])]; + }; + + Base.prototype.makeReturn = function(res) { + var me; + me = this.unwrapAll(); + if (res) { + return new Call(new Literal(res + ".push"), [me]); + } else { + return new Return(me); + } + }; + + Base.prototype.contains = function(pred) { + var node; + node = void 0; + this.traverseChildren(false, function(n) { + if (pred(n)) { + node = n; + return false; + } + }); + return node; + }; + + Base.prototype.lastNonComment = function(list) { + var i; + i = list.length; + while (i--) { + if (!(list[i] instanceof Comment)) { + return list[i]; + } + } + return null; + }; + + Base.prototype.toString = function(idt, name) { + var tree; + if (idt == null) { + idt = ''; + } + if (name == null) { + name = this.constructor.name; + } + tree = '\n' + idt + name; + if (this.soak) { + tree += '?'; + } + this.eachChild(function(node) { + return tree += node.toString(idt + TAB); + }); + return tree; + }; + + Base.prototype.eachChild = function(func) { + var attr, child, j, k, len1, len2, ref3, ref4; + if (!this.children) { + return this; + } + ref3 = this.children; + for (j = 0, len1 = ref3.length; j < len1; j++) { + attr = ref3[j]; + if (this[attr]) { + ref4 = flatten([this[attr]]); + for (k = 0, len2 = ref4.length; k < len2; k++) { + child = ref4[k]; + if (func(child) === false) { + return this; + } + } + } + } + return this; + }; + + Base.prototype.traverseChildren = function(crossScope, func) { + return this.eachChild(function(child) { + var recur; + recur = func(child); + if (recur !== false) { + return child.traverseChildren(crossScope, func); + } + }); + }; + + Base.prototype.invert = function() { + return new Op('!', this); + }; + + Base.prototype.unwrapAll = function() { + var node; + node = this; + while (node !== (node = node.unwrap())) { + continue; + } + return node; + }; + + Base.prototype.children = []; + + Base.prototype.isStatement = NO; + + Base.prototype.jumps = NO; + + Base.prototype.isComplex = YES; + + Base.prototype.isChainable = NO; + + Base.prototype.isAssignable = NO; + + Base.prototype.isNumber = NO; + + Base.prototype.unwrap = THIS; + + Base.prototype.unfoldSoak = NO; + + Base.prototype.assigns = NO; + + Base.prototype.updateLocationDataIfMissing = function(locationData) { + if (this.locationData) { + return this; + } + this.locationData = locationData; + return this.eachChild(function(child) { + return child.updateLocationDataIfMissing(locationData); + }); + }; + + Base.prototype.error = function(message) { + return throwSyntaxError(message, this.locationData); + }; + + Base.prototype.makeCode = function(code) { + return new CodeFragment(this, code); + }; + + Base.prototype.wrapInBraces = function(fragments) { + return [].concat(this.makeCode('('), fragments, this.makeCode(')')); + }; + + Base.prototype.joinFragmentArrays = function(fragmentsList, joinStr) { + var answer, fragments, i, j, len1; + answer = []; + for (i = j = 0, len1 = fragmentsList.length; j < len1; i = ++j) { + fragments = fragmentsList[i]; + if (i) { + answer.push(this.makeCode(joinStr)); + } + answer = answer.concat(fragments); + } + return answer; + }; + + return Base; + + })(); + + exports.Block = Block = (function(superClass1) { + extend1(Block, superClass1); + + function Block(nodes) { + this.expressions = compact(flatten(nodes || [])); + } + + Block.prototype.children = ['expressions']; + + Block.prototype.push = function(node) { + this.expressions.push(node); + return this; + }; + + Block.prototype.pop = function() { + return this.expressions.pop(); + }; + + Block.prototype.unshift = function(node) { + this.expressions.unshift(node); + return this; + }; + + Block.prototype.unwrap = function() { + if (this.expressions.length === 1) { + return this.expressions[0]; + } else { + return this; + } + }; + + Block.prototype.isEmpty = function() { + return !this.expressions.length; + }; + + Block.prototype.isStatement = function(o) { + var exp, j, len1, ref3; + ref3 = this.expressions; + for (j = 0, len1 = ref3.length; j < len1; j++) { + exp = ref3[j]; + if (exp.isStatement(o)) { + return true; + } + } + return false; + }; + + Block.prototype.jumps = function(o) { + var exp, j, jumpNode, len1, ref3; + ref3 = this.expressions; + for (j = 0, len1 = ref3.length; j < len1; j++) { + exp = ref3[j]; + if (jumpNode = exp.jumps(o)) { + return jumpNode; + } + } + }; + + Block.prototype.makeReturn = function(res) { + var expr, len; + len = this.expressions.length; + while (len--) { + expr = this.expressions[len]; + if (!(expr instanceof Comment)) { + this.expressions[len] = expr.makeReturn(res); + if (expr instanceof Return && !expr.expression) { + this.expressions.splice(len, 1); + } + break; + } + } + return this; + }; + + Block.prototype.compileToFragments = function(o, level) { + if (o == null) { + o = {}; + } + if (o.scope) { + return Block.__super__.compileToFragments.call(this, o, level); + } else { + return this.compileRoot(o); + } + }; + + Block.prototype.compileNode = function(o) { + var answer, compiledNodes, fragments, index, j, len1, node, ref3, top; + this.tab = o.indent; + top = o.level === LEVEL_TOP; + compiledNodes = []; + ref3 = this.expressions; + for (index = j = 0, len1 = ref3.length; j < len1; index = ++j) { + node = ref3[index]; + node = node.unwrapAll(); + node = node.unfoldSoak(o) || node; + if (node instanceof Block) { + compiledNodes.push(node.compileNode(o)); + } else if (top) { + node.front = true; + fragments = node.compileToFragments(o); + if (!node.isStatement(o)) { + fragments.unshift(this.makeCode("" + this.tab)); + fragments.push(this.makeCode(";")); + } + compiledNodes.push(fragments); + } else { + compiledNodes.push(node.compileToFragments(o, LEVEL_LIST)); + } + } + if (top) { + if (this.spaced) { + return [].concat(this.joinFragmentArrays(compiledNodes, '\n\n'), this.makeCode("\n")); + } else { + return this.joinFragmentArrays(compiledNodes, '\n'); + } + } + if (compiledNodes.length) { + answer = this.joinFragmentArrays(compiledNodes, ', '); + } else { + answer = [this.makeCode("void 0")]; + } + if (compiledNodes.length > 1 && o.level >= LEVEL_LIST) { + return this.wrapInBraces(answer); + } else { + return answer; + } + }; + + Block.prototype.compileRoot = function(o) { + var exp, fragments, i, j, len1, name, prelude, preludeExps, ref3, ref4, rest; + o.indent = o.bare ? '' : TAB; + o.level = LEVEL_TOP; + this.spaced = true; + o.scope = new Scope(null, this, null, (ref3 = o.referencedVars) != null ? ref3 : []); + ref4 = o.locals || []; + for (j = 0, len1 = ref4.length; j < len1; j++) { + name = ref4[j]; + o.scope.parameter(name); + } + prelude = []; + if (!o.bare) { + preludeExps = (function() { + var k, len2, ref5, results; + ref5 = this.expressions; + results = []; + for (i = k = 0, len2 = ref5.length; k < len2; i = ++k) { + exp = ref5[i]; + if (!(exp.unwrap() instanceof Comment)) { + break; + } + results.push(exp); + } + return results; + }).call(this); + rest = this.expressions.slice(preludeExps.length); + this.expressions = preludeExps; + if (preludeExps.length) { + prelude = this.compileNode(merge(o, { + indent: '' + })); + prelude.push(this.makeCode("\n")); + } + this.expressions = rest; + } + fragments = this.compileWithDeclarations(o); + if (o.bare) { + return fragments; + } + return [].concat(prelude, this.makeCode("(function() {\n"), fragments, this.makeCode("\n}).call(this);\n")); + }; + + Block.prototype.compileWithDeclarations = function(o) { + var assigns, declars, exp, fragments, i, j, len1, post, ref3, ref4, ref5, rest, scope, spaced; + fragments = []; + post = []; + ref3 = this.expressions; + for (i = j = 0, len1 = ref3.length; j < len1; i = ++j) { + exp = ref3[i]; + exp = exp.unwrap(); + if (!(exp instanceof Comment || exp instanceof Literal)) { + break; + } + } + o = merge(o, { + level: LEVEL_TOP + }); + if (i) { + rest = this.expressions.splice(i, 9e9); + ref4 = [this.spaced, false], spaced = ref4[0], this.spaced = ref4[1]; + ref5 = [this.compileNode(o), spaced], fragments = ref5[0], this.spaced = ref5[1]; + this.expressions = rest; + } + post = this.compileNode(o); + scope = o.scope; + if (scope.expressions === this) { + declars = o.scope.hasDeclarations(); + assigns = scope.hasAssignments; + if (declars || assigns) { + if (i) { + fragments.push(this.makeCode('\n')); + } + fragments.push(this.makeCode(this.tab + "var ")); + if (declars) { + fragments.push(this.makeCode(scope.declaredVariables().join(', '))); + } + if (assigns) { + if (declars) { + fragments.push(this.makeCode(",\n" + (this.tab + TAB))); + } + fragments.push(this.makeCode(scope.assignedVariables().join(",\n" + (this.tab + TAB)))); + } + fragments.push(this.makeCode(";\n" + (this.spaced ? '\n' : ''))); + } else if (fragments.length && post.length) { + fragments.push(this.makeCode("\n")); + } + } + return fragments.concat(post); + }; + + Block.wrap = function(nodes) { + if (nodes.length === 1 && nodes[0] instanceof Block) { + return nodes[0]; + } + return new Block(nodes); + }; + + return Block; + + })(Base); + + exports.Literal = Literal = (function(superClass1) { + extend1(Literal, superClass1); + + function Literal(value1) { + this.value = value1; + } + + Literal.prototype.isComplex = NO; + + Literal.prototype.assigns = function(name) { + return name === this.value; + }; + + Literal.prototype.compileNode = function(o) { + return [this.makeCode(this.value)]; + }; + + Literal.prototype.toString = function() { + return " " + (this.isStatement() ? Literal.__super__.toString.apply(this, arguments) : this.constructor.name) + ": " + this.value; + }; + + return Literal; + + })(Base); + + exports.NumberLiteral = NumberLiteral = (function(superClass1) { + extend1(NumberLiteral, superClass1); + + function NumberLiteral() { + return NumberLiteral.__super__.constructor.apply(this, arguments); + } + + return NumberLiteral; + + })(Literal); + + exports.InfinityLiteral = InfinityLiteral = (function(superClass1) { + extend1(InfinityLiteral, superClass1); + + function InfinityLiteral() { + return InfinityLiteral.__super__.constructor.apply(this, arguments); + } + + InfinityLiteral.prototype.compileNode = function() { + return [this.makeCode('2e308')]; + }; + + return InfinityLiteral; + + })(NumberLiteral); + + exports.NaNLiteral = NaNLiteral = (function(superClass1) { + extend1(NaNLiteral, superClass1); + + function NaNLiteral() { + NaNLiteral.__super__.constructor.call(this, 'NaN'); + } + + NaNLiteral.prototype.compileNode = function(o) { + var code; + code = [this.makeCode('0/0')]; + if (o.level >= LEVEL_OP) { + return this.wrapInBraces(code); + } else { + return code; + } + }; + + return NaNLiteral; + + })(NumberLiteral); + + exports.StringLiteral = StringLiteral = (function(superClass1) { + extend1(StringLiteral, superClass1); + + function StringLiteral() { + return StringLiteral.__super__.constructor.apply(this, arguments); + } + + return StringLiteral; + + })(Literal); + + exports.RegexLiteral = RegexLiteral = (function(superClass1) { + extend1(RegexLiteral, superClass1); + + function RegexLiteral() { + return RegexLiteral.__super__.constructor.apply(this, arguments); + } + + return RegexLiteral; + + })(Literal); + + exports.PassthroughLiteral = PassthroughLiteral = (function(superClass1) { + extend1(PassthroughLiteral, superClass1); + + function PassthroughLiteral() { + return PassthroughLiteral.__super__.constructor.apply(this, arguments); + } + + return PassthroughLiteral; + + })(Literal); + + exports.IdentifierLiteral = IdentifierLiteral = (function(superClass1) { + extend1(IdentifierLiteral, superClass1); + + function IdentifierLiteral() { + return IdentifierLiteral.__super__.constructor.apply(this, arguments); + } + + IdentifierLiteral.prototype.isAssignable = YES; + + return IdentifierLiteral; + + })(Literal); + + exports.PropertyName = PropertyName = (function(superClass1) { + extend1(PropertyName, superClass1); + + function PropertyName() { + return PropertyName.__super__.constructor.apply(this, arguments); + } + + PropertyName.prototype.isAssignable = YES; + + return PropertyName; + + })(Literal); + + exports.StatementLiteral = StatementLiteral = (function(superClass1) { + extend1(StatementLiteral, superClass1); + + function StatementLiteral() { + return StatementLiteral.__super__.constructor.apply(this, arguments); + } + + StatementLiteral.prototype.isStatement = YES; + + StatementLiteral.prototype.makeReturn = THIS; + + StatementLiteral.prototype.jumps = function(o) { + if (this.value === 'break' && !((o != null ? o.loop : void 0) || (o != null ? o.block : void 0))) { + return this; + } + if (this.value === 'continue' && !(o != null ? o.loop : void 0)) { + return this; + } + }; + + StatementLiteral.prototype.compileNode = function(o) { + return [this.makeCode("" + this.tab + this.value + ";")]; + }; + + return StatementLiteral; + + })(Literal); + + exports.ThisLiteral = ThisLiteral = (function(superClass1) { + extend1(ThisLiteral, superClass1); + + function ThisLiteral() { + ThisLiteral.__super__.constructor.call(this, 'this'); + } + + ThisLiteral.prototype.compileNode = function(o) { + var code, ref3; + code = ((ref3 = o.scope.method) != null ? ref3.bound : void 0) ? o.scope.method.context : this.value; + return [this.makeCode(code)]; + }; + + return ThisLiteral; + + })(Literal); + + exports.UndefinedLiteral = UndefinedLiteral = (function(superClass1) { + extend1(UndefinedLiteral, superClass1); + + function UndefinedLiteral() { + UndefinedLiteral.__super__.constructor.call(this, 'undefined'); + } + + UndefinedLiteral.prototype.compileNode = function(o) { + return [this.makeCode(o.level >= LEVEL_ACCESS ? '(void 0)' : 'void 0')]; + }; + + return UndefinedLiteral; + + })(Literal); + + exports.NullLiteral = NullLiteral = (function(superClass1) { + extend1(NullLiteral, superClass1); + + function NullLiteral() { + NullLiteral.__super__.constructor.call(this, 'null'); + } + + return NullLiteral; + + })(Literal); + + exports.BooleanLiteral = BooleanLiteral = (function(superClass1) { + extend1(BooleanLiteral, superClass1); + + function BooleanLiteral() { + return BooleanLiteral.__super__.constructor.apply(this, arguments); + } + + return BooleanLiteral; + + })(Literal); + + exports.Return = Return = (function(superClass1) { + extend1(Return, superClass1); + + function Return(expression) { + this.expression = expression; + } + + Return.prototype.children = ['expression']; + + Return.prototype.isStatement = YES; + + Return.prototype.makeReturn = THIS; + + Return.prototype.jumps = THIS; + + Return.prototype.compileToFragments = function(o, level) { + var expr, ref3; + expr = (ref3 = this.expression) != null ? ref3.makeReturn() : void 0; + if (expr && !(expr instanceof Return)) { + return expr.compileToFragments(o, level); + } else { + return Return.__super__.compileToFragments.call(this, o, level); + } + }; + + Return.prototype.compileNode = function(o) { + var answer; + answer = []; + answer.push(this.makeCode(this.tab + ("return" + (this.expression ? " " : "")))); + if (this.expression) { + answer = answer.concat(this.expression.compileToFragments(o, LEVEL_PAREN)); + } + answer.push(this.makeCode(";")); + return answer; + }; + + return Return; + + })(Base); + + exports.YieldReturn = YieldReturn = (function(superClass1) { + extend1(YieldReturn, superClass1); + + function YieldReturn() { + return YieldReturn.__super__.constructor.apply(this, arguments); + } + + YieldReturn.prototype.compileNode = function(o) { + if (o.scope.parent == null) { + this.error('yield can only occur inside functions'); + } + return YieldReturn.__super__.compileNode.apply(this, arguments); + }; + + return YieldReturn; + + })(Return); + + exports.Value = Value = (function(superClass1) { + extend1(Value, superClass1); + + function Value(base, props, tag) { + if (!props && base instanceof Value) { + return base; + } + this.base = base; + this.properties = props || []; + if (tag) { + this[tag] = true; + } + return this; + } + + Value.prototype.children = ['base', 'properties']; + + Value.prototype.add = function(props) { + this.properties = this.properties.concat(props); + return this; + }; + + Value.prototype.hasProperties = function() { + return !!this.properties.length; + }; + + Value.prototype.bareLiteral = function(type) { + return !this.properties.length && this.base instanceof type; + }; + + Value.prototype.isArray = function() { + return this.bareLiteral(Arr); + }; + + Value.prototype.isRange = function() { + return this.bareLiteral(Range); + }; + + Value.prototype.isComplex = function() { + return this.hasProperties() || this.base.isComplex(); + }; + + Value.prototype.isAssignable = function() { + return this.hasProperties() || this.base.isAssignable(); + }; + + Value.prototype.isNumber = function() { + return this.bareLiteral(NumberLiteral); + }; + + Value.prototype.isString = function() { + return this.bareLiteral(StringLiteral); + }; + + Value.prototype.isRegex = function() { + return this.bareLiteral(RegexLiteral); + }; + + Value.prototype.isUndefined = function() { + return this.bareLiteral(UndefinedLiteral); + }; + + Value.prototype.isNull = function() { + return this.bareLiteral(NullLiteral); + }; + + Value.prototype.isBoolean = function() { + return this.bareLiteral(BooleanLiteral); + }; + + Value.prototype.isAtomic = function() { + var j, len1, node, ref3; + ref3 = this.properties.concat(this.base); + for (j = 0, len1 = ref3.length; j < len1; j++) { + node = ref3[j]; + if (node.soak || node instanceof Call) { + return false; + } + } + return true; + }; + + Value.prototype.isNotCallable = function() { + return this.isNumber() || this.isString() || this.isRegex() || this.isArray() || this.isRange() || this.isSplice() || this.isObject() || this.isUndefined() || this.isNull() || this.isBoolean(); + }; + + Value.prototype.isStatement = function(o) { + return !this.properties.length && this.base.isStatement(o); + }; + + Value.prototype.assigns = function(name) { + return !this.properties.length && this.base.assigns(name); + }; + + Value.prototype.jumps = function(o) { + return !this.properties.length && this.base.jumps(o); + }; + + Value.prototype.isObject = function(onlyGenerated) { + if (this.properties.length) { + return false; + } + return (this.base instanceof Obj) && (!onlyGenerated || this.base.generated); + }; + + Value.prototype.isSplice = function() { + var lastProp, ref3; + ref3 = this.properties, lastProp = ref3[ref3.length - 1]; + return lastProp instanceof Slice; + }; + + Value.prototype.looksStatic = function(className) { + var ref3; + return this.base.value === className && this.properties.length === 1 && ((ref3 = this.properties[0].name) != null ? ref3.value : void 0) !== 'prototype'; + }; + + Value.prototype.unwrap = function() { + if (this.properties.length) { + return this; + } else { + return this.base; + } + }; + + Value.prototype.cacheReference = function(o) { + var base, bref, name, nref, ref3; + ref3 = this.properties, name = ref3[ref3.length - 1]; + if (this.properties.length < 2 && !this.base.isComplex() && !(name != null ? name.isComplex() : void 0)) { + return [this, this]; + } + base = new Value(this.base, this.properties.slice(0, -1)); + if (base.isComplex()) { + bref = new IdentifierLiteral(o.scope.freeVariable('base')); + base = new Value(new Parens(new Assign(bref, base))); + } + if (!name) { + return [base, bref]; + } + if (name.isComplex()) { + nref = new IdentifierLiteral(o.scope.freeVariable('name')); + name = new Index(new Assign(nref, name.index)); + nref = new Index(nref); + } + return [base.add(name), new Value(bref || base.base, [nref || name])]; + }; + + Value.prototype.compileNode = function(o) { + var fragments, j, len1, prop, props; + this.base.front = this.front; + props = this.properties; + fragments = this.base.compileToFragments(o, (props.length ? LEVEL_ACCESS : null)); + if (props.length && SIMPLENUM.test(fragmentsToText(fragments))) { + fragments.push(this.makeCode('.')); + } + for (j = 0, len1 = props.length; j < len1; j++) { + prop = props[j]; + fragments.push.apply(fragments, prop.compileToFragments(o)); + } + return fragments; + }; + + Value.prototype.unfoldSoak = function(o) { + return this.unfoldedSoak != null ? this.unfoldedSoak : this.unfoldedSoak = (function(_this) { + return function() { + var fst, i, ifn, j, len1, prop, ref, ref3, ref4, snd; + if (ifn = _this.base.unfoldSoak(o)) { + (ref3 = ifn.body.properties).push.apply(ref3, _this.properties); + return ifn; + } + ref4 = _this.properties; + for (i = j = 0, len1 = ref4.length; j < len1; i = ++j) { + prop = ref4[i]; + if (!prop.soak) { + continue; + } + prop.soak = false; + fst = new Value(_this.base, _this.properties.slice(0, i)); + snd = new Value(_this.base, _this.properties.slice(i)); + if (fst.isComplex()) { + ref = new IdentifierLiteral(o.scope.freeVariable('ref')); + fst = new Parens(new Assign(ref, fst)); + snd.base = ref; + } + return new If(new Existence(fst), snd, { + soak: true + }); + } + return false; + }; + })(this)(); + }; + + return Value; + + })(Base); + + exports.Comment = Comment = (function(superClass1) { + extend1(Comment, superClass1); + + function Comment(comment1) { + this.comment = comment1; + } + + Comment.prototype.isStatement = YES; + + Comment.prototype.makeReturn = THIS; + + Comment.prototype.compileNode = function(o, level) { + var code, comment; + comment = this.comment.replace(/^(\s*)#(?=\s)/gm, "$1 *"); + code = "/*" + (multident(comment, this.tab)) + (indexOf.call(comment, '\n') >= 0 ? "\n" + this.tab : '') + " */"; + if ((level || o.level) === LEVEL_TOP) { + code = o.indent + code; + } + return [this.makeCode("\n"), this.makeCode(code)]; + }; + + return Comment; + + })(Base); + + exports.Call = Call = (function(superClass1) { + extend1(Call, superClass1); + + function Call(variable1, args1, soak1) { + this.variable = variable1; + this.args = args1 != null ? args1 : []; + this.soak = soak1; + this.isNew = false; + if (this.variable instanceof Value && this.variable.isNotCallable()) { + this.variable.error("literal is not a function"); + } + } + + Call.prototype.children = ['variable', 'args']; + + Call.prototype.updateLocationDataIfMissing = function(locationData) { + var base, ref3; + if (this.locationData && this.needsUpdatedStartLocation) { + this.locationData.first_line = locationData.first_line; + this.locationData.first_column = locationData.first_column; + base = ((ref3 = this.variable) != null ? ref3.base : void 0) || this.variable; + if (base.needsUpdatedStartLocation) { + this.variable.locationData.first_line = locationData.first_line; + this.variable.locationData.first_column = locationData.first_column; + base.updateLocationDataIfMissing(locationData); + } + delete this.needsUpdatedStartLocation; + } + return Call.__super__.updateLocationDataIfMissing.apply(this, arguments); + }; + + Call.prototype.newInstance = function() { + var base, ref3; + base = ((ref3 = this.variable) != null ? ref3.base : void 0) || this.variable; + if (base instanceof Call && !base.isNew) { + base.newInstance(); + } else { + this.isNew = true; + } + this.needsUpdatedStartLocation = true; + return this; + }; + + Call.prototype.unfoldSoak = function(o) { + var call, ifn, j, left, len1, list, ref3, ref4, rite; + if (this.soak) { + if (this instanceof SuperCall) { + left = new Literal(this.superReference(o)); + rite = new Value(left); + } else { + if (ifn = unfoldSoak(o, this, 'variable')) { + return ifn; + } + ref3 = new Value(this.variable).cacheReference(o), left = ref3[0], rite = ref3[1]; + } + rite = new Call(rite, this.args); + rite.isNew = this.isNew; + left = new Literal("typeof " + (left.compile(o)) + " === \"function\""); + return new If(left, new Value(rite), { + soak: true + }); + } + call = this; + list = []; + while (true) { + if (call.variable instanceof Call) { + list.push(call); + call = call.variable; + continue; + } + if (!(call.variable instanceof Value)) { + break; + } + list.push(call); + if (!((call = call.variable.base) instanceof Call)) { + break; + } + } + ref4 = list.reverse(); + for (j = 0, len1 = ref4.length; j < len1; j++) { + call = ref4[j]; + if (ifn) { + if (call.variable instanceof Call) { + call.variable = ifn; + } else { + call.variable.base = ifn; + } + } + ifn = unfoldSoak(o, call, 'variable'); + } + return ifn; + }; + + Call.prototype.compileNode = function(o) { + var arg, argIndex, compiledArgs, compiledArray, fragments, j, len1, preface, ref3, ref4; + if ((ref3 = this.variable) != null) { + ref3.front = this.front; + } + compiledArray = Splat.compileSplattedArray(o, this.args, true); + if (compiledArray.length) { + return this.compileSplat(o, compiledArray); + } + compiledArgs = []; + ref4 = this.args; + for (argIndex = j = 0, len1 = ref4.length; j < len1; argIndex = ++j) { + arg = ref4[argIndex]; + if (argIndex) { + compiledArgs.push(this.makeCode(", ")); + } + compiledArgs.push.apply(compiledArgs, arg.compileToFragments(o, LEVEL_LIST)); + } + fragments = []; + if (this instanceof SuperCall) { + preface = this.superReference(o) + (".call(" + (this.superThis(o))); + if (compiledArgs.length) { + preface += ", "; + } + fragments.push(this.makeCode(preface)); + } else { + if (this.isNew) { + fragments.push(this.makeCode('new ')); + } + fragments.push.apply(fragments, this.variable.compileToFragments(o, LEVEL_ACCESS)); + fragments.push(this.makeCode("(")); + } + fragments.push.apply(fragments, compiledArgs); + fragments.push(this.makeCode(")")); + return fragments; + }; + + Call.prototype.compileSplat = function(o, splatArgs) { + var answer, base, fun, idt, name, ref; + if (this instanceof SuperCall) { + return [].concat(this.makeCode((this.superReference(o)) + ".apply(" + (this.superThis(o)) + ", "), splatArgs, this.makeCode(")")); + } + if (this.isNew) { + idt = this.tab + TAB; + return [].concat(this.makeCode("(function(func, args, ctor) {\n" + idt + "ctor.prototype = func.prototype;\n" + idt + "var child = new ctor, result = func.apply(child, args);\n" + idt + "return Object(result) === result ? result : child;\n" + this.tab + "})("), this.variable.compileToFragments(o, LEVEL_LIST), this.makeCode(", "), splatArgs, this.makeCode(", function(){})")); + } + answer = []; + base = new Value(this.variable); + if ((name = base.properties.pop()) && base.isComplex()) { + ref = o.scope.freeVariable('ref'); + answer = answer.concat(this.makeCode("(" + ref + " = "), base.compileToFragments(o, LEVEL_LIST), this.makeCode(")"), name.compileToFragments(o)); + } else { + fun = base.compileToFragments(o, LEVEL_ACCESS); + if (SIMPLENUM.test(fragmentsToText(fun))) { + fun = this.wrapInBraces(fun); + } + if (name) { + ref = fragmentsToText(fun); + fun.push.apply(fun, name.compileToFragments(o)); + } else { + ref = 'null'; + } + answer = answer.concat(fun); + } + return answer = answer.concat(this.makeCode(".apply(" + ref + ", "), splatArgs, this.makeCode(")")); + }; + + return Call; + + })(Base); + + exports.SuperCall = SuperCall = (function(superClass1) { + extend1(SuperCall, superClass1); + + function SuperCall(args) { + SuperCall.__super__.constructor.call(this, null, args != null ? args : [new Splat(new IdentifierLiteral('arguments'))]); + this.isBare = args != null; + } + + SuperCall.prototype.superReference = function(o) { + var accesses, base, bref, klass, method, name, nref, variable; + method = o.scope.namedMethod(); + if (method != null ? method.klass : void 0) { + klass = method.klass, name = method.name, variable = method.variable; + if (klass.isComplex()) { + bref = new IdentifierLiteral(o.scope.parent.freeVariable('base')); + base = new Value(new Parens(new Assign(bref, klass))); + variable.base = base; + variable.properties.splice(0, klass.properties.length); + } + if (name.isComplex() || (name instanceof Index && name.index.isAssignable())) { + nref = new IdentifierLiteral(o.scope.parent.freeVariable('name')); + name = new Index(new Assign(nref, name.index)); + variable.properties.pop(); + variable.properties.push(name); + } + accesses = [new Access(new PropertyName('__super__'))]; + if (method["static"]) { + accesses.push(new Access(new PropertyName('constructor'))); + } + accesses.push(nref != null ? new Index(nref) : name); + return (new Value(bref != null ? bref : klass, accesses)).compile(o); + } else if (method != null ? method.ctor : void 0) { + return method.name + ".__super__.constructor"; + } else { + return this.error('cannot call super outside of an instance method.'); + } + }; + + SuperCall.prototype.superThis = function(o) { + var method; + method = o.scope.method; + return (method && !method.klass && method.context) || "this"; + }; + + return SuperCall; + + })(Call); + + exports.RegexWithInterpolations = RegexWithInterpolations = (function(superClass1) { + extend1(RegexWithInterpolations, superClass1); + + function RegexWithInterpolations(args) { + if (args == null) { + args = []; + } + RegexWithInterpolations.__super__.constructor.call(this, new Value(new IdentifierLiteral('RegExp')), args, false); + } + + return RegexWithInterpolations; + + })(Call); + + exports.TaggedTemplateCall = TaggedTemplateCall = (function(superClass1) { + extend1(TaggedTemplateCall, superClass1); + + function TaggedTemplateCall(variable, arg, soak) { + if (arg instanceof StringLiteral) { + arg = new StringWithInterpolations(Block.wrap([new Value(arg)])); + } + TaggedTemplateCall.__super__.constructor.call(this, variable, [arg], soak); + } + + TaggedTemplateCall.prototype.compileNode = function(o) { + o.inTaggedTemplateCall = true; + return this.variable.compileToFragments(o, LEVEL_ACCESS).concat(this.args[0].compileToFragments(o, LEVEL_LIST)); + }; + + return TaggedTemplateCall; + + })(Call); + + exports.Extends = Extends = (function(superClass1) { + extend1(Extends, superClass1); + + function Extends(child1, parent1) { + this.child = child1; + this.parent = parent1; + } + + Extends.prototype.children = ['child', 'parent']; + + Extends.prototype.compileToFragments = function(o) { + return new Call(new Value(new Literal(utility('extend', o))), [this.child, this.parent]).compileToFragments(o); + }; + + return Extends; + + })(Base); + + exports.Access = Access = (function(superClass1) { + extend1(Access, superClass1); + + function Access(name1, tag) { + this.name = name1; + this.soak = tag === 'soak'; + } + + Access.prototype.children = ['name']; + + Access.prototype.compileToFragments = function(o) { + var name, node, ref3; + name = this.name.compileToFragments(o); + node = this.name.unwrap(); + if (node instanceof PropertyName) { + if (ref3 = node.value, indexOf.call(JS_FORBIDDEN, ref3) >= 0) { + return [this.makeCode('["')].concat(slice.call(name), [this.makeCode('"]')]); + } else { + return [this.makeCode('.')].concat(slice.call(name)); + } + } else { + return [this.makeCode('[')].concat(slice.call(name), [this.makeCode(']')]); + } + }; + + Access.prototype.isComplex = NO; + + return Access; + + })(Base); + + exports.Index = Index = (function(superClass1) { + extend1(Index, superClass1); + + function Index(index1) { + this.index = index1; + } + + Index.prototype.children = ['index']; + + Index.prototype.compileToFragments = function(o) { + return [].concat(this.makeCode("["), this.index.compileToFragments(o, LEVEL_PAREN), this.makeCode("]")); + }; + + Index.prototype.isComplex = function() { + return this.index.isComplex(); + }; + + return Index; + + })(Base); + + exports.Range = Range = (function(superClass1) { + extend1(Range, superClass1); + + Range.prototype.children = ['from', 'to']; + + function Range(from1, to1, tag) { + this.from = from1; + this.to = to1; + this.exclusive = tag === 'exclusive'; + this.equals = this.exclusive ? '' : '='; + } + + Range.prototype.compileVariables = function(o) { + var isComplex, ref3, ref4, ref5, step; + o = merge(o, { + top: true + }); + isComplex = del(o, 'isComplex'); + ref3 = this.cacheToCodeFragments(this.from.cache(o, LEVEL_LIST, isComplex)), this.fromC = ref3[0], this.fromVar = ref3[1]; + ref4 = this.cacheToCodeFragments(this.to.cache(o, LEVEL_LIST, isComplex)), this.toC = ref4[0], this.toVar = ref4[1]; + if (step = del(o, 'step')) { + ref5 = this.cacheToCodeFragments(step.cache(o, LEVEL_LIST, isComplex)), this.step = ref5[0], this.stepVar = ref5[1]; + } + this.fromNum = this.from.isNumber() ? Number(this.fromVar) : null; + this.toNum = this.to.isNumber() ? Number(this.toVar) : null; + return this.stepNum = (step != null ? step.isNumber() : void 0) ? Number(this.stepVar) : null; + }; + + Range.prototype.compileNode = function(o) { + var cond, condPart, from, gt, idx, idxName, known, lt, namedIndex, ref3, ref4, stepPart, to, varPart; + if (!this.fromVar) { + this.compileVariables(o); + } + if (!o.index) { + return this.compileArray(o); + } + known = (this.fromNum != null) && (this.toNum != null); + idx = del(o, 'index'); + idxName = del(o, 'name'); + namedIndex = idxName && idxName !== idx; + varPart = idx + " = " + this.fromC; + if (this.toC !== this.toVar) { + varPart += ", " + this.toC; + } + if (this.step !== this.stepVar) { + varPart += ", " + this.step; + } + ref3 = [idx + " <" + this.equals, idx + " >" + this.equals], lt = ref3[0], gt = ref3[1]; + condPart = this.stepNum != null ? this.stepNum > 0 ? lt + " " + this.toVar : gt + " " + this.toVar : known ? ((ref4 = [this.fromNum, this.toNum], from = ref4[0], to = ref4[1], ref4), from <= to ? lt + " " + to : gt + " " + to) : (cond = this.stepVar ? this.stepVar + " > 0" : this.fromVar + " <= " + this.toVar, cond + " ? " + lt + " " + this.toVar + " : " + gt + " " + this.toVar); + stepPart = this.stepVar ? idx + " += " + this.stepVar : known ? namedIndex ? from <= to ? "++" + idx : "--" + idx : from <= to ? idx + "++" : idx + "--" : namedIndex ? cond + " ? ++" + idx + " : --" + idx : cond + " ? " + idx + "++ : " + idx + "--"; + if (namedIndex) { + varPart = idxName + " = " + varPart; + } + if (namedIndex) { + stepPart = idxName + " = " + stepPart; + } + return [this.makeCode(varPart + "; " + condPart + "; " + stepPart)]; + }; + + Range.prototype.compileArray = function(o) { + var args, body, cond, hasArgs, i, idt, j, known, post, pre, range, ref3, ref4, result, results, vars; + known = (this.fromNum != null) && (this.toNum != null); + if (known && Math.abs(this.fromNum - this.toNum) <= 20) { + range = (function() { + results = []; + for (var j = ref3 = this.fromNum, ref4 = this.toNum; ref3 <= ref4 ? j <= ref4 : j >= ref4; ref3 <= ref4 ? j++ : j--){ results.push(j); } + return results; + }).apply(this); + if (this.exclusive) { + range.pop(); + } + return [this.makeCode("[" + (range.join(', ')) + "]")]; + } + idt = this.tab + TAB; + i = o.scope.freeVariable('i', { + single: true + }); + result = o.scope.freeVariable('results'); + pre = "\n" + idt + result + " = [];"; + if (known) { + o.index = i; + body = fragmentsToText(this.compileNode(o)); + } else { + vars = (i + " = " + this.fromC) + (this.toC !== this.toVar ? ", " + this.toC : ''); + cond = this.fromVar + " <= " + this.toVar; + body = "var " + vars + "; " + cond + " ? " + i + " <" + this.equals + " " + this.toVar + " : " + i + " >" + this.equals + " " + this.toVar + "; " + cond + " ? " + i + "++ : " + i + "--"; + } + post = "{ " + result + ".push(" + i + "); }\n" + idt + "return " + result + ";\n" + o.indent; + hasArgs = function(node) { + return node != null ? node.contains(isLiteralArguments) : void 0; + }; + if (hasArgs(this.from) || hasArgs(this.to)) { + args = ', arguments'; + } + return [this.makeCode("(function() {" + pre + "\n" + idt + "for (" + body + ")" + post + "}).apply(this" + (args != null ? args : '') + ")")]; + }; + + return Range; + + })(Base); + + exports.Slice = Slice = (function(superClass1) { + extend1(Slice, superClass1); + + Slice.prototype.children = ['range']; + + function Slice(range1) { + this.range = range1; + Slice.__super__.constructor.call(this); + } + + Slice.prototype.compileNode = function(o) { + var compiled, compiledText, from, fromCompiled, ref3, to, toStr; + ref3 = this.range, to = ref3.to, from = ref3.from; + fromCompiled = from && from.compileToFragments(o, LEVEL_PAREN) || [this.makeCode('0')]; + if (to) { + compiled = to.compileToFragments(o, LEVEL_PAREN); + compiledText = fragmentsToText(compiled); + if (!(!this.range.exclusive && +compiledText === -1)) { + toStr = ', ' + (this.range.exclusive ? compiledText : to.isNumber() ? "" + (+compiledText + 1) : (compiled = to.compileToFragments(o, LEVEL_ACCESS), "+" + (fragmentsToText(compiled)) + " + 1 || 9e9")); + } + } + return [this.makeCode(".slice(" + (fragmentsToText(fromCompiled)) + (toStr || '') + ")")]; + }; + + return Slice; + + })(Base); + + exports.Obj = Obj = (function(superClass1) { + extend1(Obj, superClass1); + + function Obj(props, generated) { + this.generated = generated != null ? generated : false; + this.objects = this.properties = props || []; + } + + Obj.prototype.children = ['properties']; + + Obj.prototype.compileNode = function(o) { + var answer, dynamicIndex, hasDynamic, i, idt, indent, j, join, k, key, l, lastNoncom, len1, len2, len3, node, oref, prop, props, ref3, value; + props = this.properties; + if (this.generated) { + for (j = 0, len1 = props.length; j < len1; j++) { + node = props[j]; + if (node instanceof Value) { + node.error('cannot have an implicit value in an implicit object'); + } + } + } + for (dynamicIndex = k = 0, len2 = props.length; k < len2; dynamicIndex = ++k) { + prop = props[dynamicIndex]; + if ((prop.variable || prop).base instanceof Parens) { + break; + } + } + hasDynamic = dynamicIndex < props.length; + idt = o.indent += TAB; + lastNoncom = this.lastNonComment(this.properties); + answer = []; + if (hasDynamic) { + oref = o.scope.freeVariable('obj'); + answer.push(this.makeCode("(\n" + idt + oref + " = ")); + } + answer.push(this.makeCode("{" + (props.length === 0 || dynamicIndex === 0 ? '}' : '\n'))); + for (i = l = 0, len3 = props.length; l < len3; i = ++l) { + prop = props[i]; + if (i === dynamicIndex) { + if (i !== 0) { + answer.push(this.makeCode("\n" + idt + "}")); + } + answer.push(this.makeCode(',\n')); + } + join = i === props.length - 1 || i === dynamicIndex - 1 ? '' : prop === lastNoncom || prop instanceof Comment ? '\n' : ',\n'; + indent = prop instanceof Comment ? '' : idt; + if (hasDynamic && i < dynamicIndex) { + indent += TAB; + } + if (prop instanceof Assign) { + if (prop.context !== 'object') { + prop.operatorToken.error("unexpected " + prop.operatorToken.value); + } + if (prop.variable instanceof Value && prop.variable.hasProperties()) { + prop.variable.error('invalid object key'); + } + } + if (prop instanceof Value && prop["this"]) { + prop = new Assign(prop.properties[0].name, prop, 'object'); + } + if (!(prop instanceof Comment)) { + if (i < dynamicIndex) { + if (!(prop instanceof Assign)) { + prop = new Assign(prop, prop, 'object'); + } + } else { + if (prop instanceof Assign) { + key = prop.variable; + value = prop.value; + } else { + ref3 = prop.base.cache(o), key = ref3[0], value = ref3[1]; + if (key instanceof IdentifierLiteral) { + key = new PropertyName(key.value); + } + } + prop = new Assign(new Value(new IdentifierLiteral(oref), [new Access(key)]), value); + } + } + if (indent) { + answer.push(this.makeCode(indent)); + } + answer.push.apply(answer, prop.compileToFragments(o, LEVEL_TOP)); + if (join) { + answer.push(this.makeCode(join)); + } + } + if (hasDynamic) { + answer.push(this.makeCode(",\n" + idt + oref + "\n" + this.tab + ")")); + } else { + if (props.length !== 0) { + answer.push(this.makeCode("\n" + this.tab + "}")); + } + } + if (this.front && !hasDynamic) { + return this.wrapInBraces(answer); + } else { + return answer; + } + }; + + Obj.prototype.assigns = function(name) { + var j, len1, prop, ref3; + ref3 = this.properties; + for (j = 0, len1 = ref3.length; j < len1; j++) { + prop = ref3[j]; + if (prop.assigns(name)) { + return true; + } + } + return false; + }; + + return Obj; + + })(Base); + + exports.Arr = Arr = (function(superClass1) { + extend1(Arr, superClass1); + + function Arr(objs) { + this.objects = objs || []; + } + + Arr.prototype.children = ['objects']; + + Arr.prototype.compileNode = function(o) { + var answer, compiledObjs, fragments, index, j, len1, obj; + if (!this.objects.length) { + return [this.makeCode('[]')]; + } + o.indent += TAB; + answer = Splat.compileSplattedArray(o, this.objects); + if (answer.length) { + return answer; + } + answer = []; + compiledObjs = (function() { + var j, len1, ref3, results; + ref3 = this.objects; + results = []; + for (j = 0, len1 = ref3.length; j < len1; j++) { + obj = ref3[j]; + results.push(obj.compileToFragments(o, LEVEL_LIST)); + } + return results; + }).call(this); + for (index = j = 0, len1 = compiledObjs.length; j < len1; index = ++j) { + fragments = compiledObjs[index]; + if (index) { + answer.push(this.makeCode(", ")); + } + answer.push.apply(answer, fragments); + } + if (fragmentsToText(answer).indexOf('\n') >= 0) { + answer.unshift(this.makeCode("[\n" + o.indent)); + answer.push(this.makeCode("\n" + this.tab + "]")); + } else { + answer.unshift(this.makeCode("[")); + answer.push(this.makeCode("]")); + } + return answer; + }; + + Arr.prototype.assigns = function(name) { + var j, len1, obj, ref3; + ref3 = this.objects; + for (j = 0, len1 = ref3.length; j < len1; j++) { + obj = ref3[j]; + if (obj.assigns(name)) { + return true; + } + } + return false; + }; + + return Arr; + + })(Base); + + exports.Class = Class = (function(superClass1) { + extend1(Class, superClass1); + + function Class(variable1, parent1, body1) { + this.variable = variable1; + this.parent = parent1; + this.body = body1 != null ? body1 : new Block; + this.boundFuncs = []; + this.body.classBody = true; + } + + Class.prototype.children = ['variable', 'parent', 'body']; + + Class.prototype.defaultClassVariableName = '_Class'; + + Class.prototype.determineName = function() { + var message, name, node, ref3, tail; + if (!this.variable) { + return this.defaultClassVariableName; + } + ref3 = this.variable.properties, tail = ref3[ref3.length - 1]; + node = tail ? tail instanceof Access && tail.name : this.variable.base; + if (!(node instanceof IdentifierLiteral || node instanceof PropertyName)) { + return this.defaultClassVariableName; + } + name = node.value; + if (!tail) { + message = isUnassignable(name); + if (message) { + this.variable.error(message); + } + } + if (indexOf.call(JS_FORBIDDEN, name) >= 0) { + return "_" + name; + } else { + return name; + } + }; + + Class.prototype.setContext = function(name) { + return this.body.traverseChildren(false, function(node) { + if (node.classBody) { + return false; + } + if (node instanceof ThisLiteral) { + return node.value = name; + } else if (node instanceof Code) { + if (node.bound) { + return node.context = name; + } + } + }); + }; + + Class.prototype.addBoundFunctions = function(o) { + var bvar, j, len1, lhs, ref3; + ref3 = this.boundFuncs; + for (j = 0, len1 = ref3.length; j < len1; j++) { + bvar = ref3[j]; + lhs = (new Value(new ThisLiteral, [new Access(bvar)])).compile(o); + this.ctor.body.unshift(new Literal(lhs + " = " + (utility('bind', o)) + "(" + lhs + ", this)")); + } + }; + + Class.prototype.addProperties = function(node, name, o) { + var acc, assign, base, exprs, func, props; + props = node.base.properties.slice(0); + exprs = (function() { + var results; + results = []; + while (assign = props.shift()) { + if (assign instanceof Assign) { + base = assign.variable.base; + delete assign.context; + func = assign.value; + if (base.value === 'constructor') { + if (this.ctor) { + assign.error('cannot define more than one constructor in a class'); + } + if (func.bound) { + assign.error('cannot define a constructor as a bound function'); + } + if (func instanceof Code) { + assign = this.ctor = func; + } else { + this.externalCtor = o.classScope.freeVariable('ctor'); + assign = new Assign(new IdentifierLiteral(this.externalCtor), func); + } + } else { + if (assign.variable["this"]) { + func["static"] = true; + } else { + acc = base.isComplex() ? new Index(base) : new Access(base); + assign.variable = new Value(new IdentifierLiteral(name), [new Access(new PropertyName('prototype')), acc]); + if (func instanceof Code && func.bound) { + this.boundFuncs.push(base); + func.bound = false; + } + } + } + } + results.push(assign); + } + return results; + }).call(this); + return compact(exprs); + }; + + Class.prototype.walkBody = function(name, o) { + return this.traverseChildren(false, (function(_this) { + return function(child) { + var cont, exps, i, j, len1, node, ref3; + cont = true; + if (child instanceof Class) { + return false; + } + if (child instanceof Block) { + ref3 = exps = child.expressions; + for (i = j = 0, len1 = ref3.length; j < len1; i = ++j) { + node = ref3[i]; + if (node instanceof Assign && node.variable.looksStatic(name)) { + node.value["static"] = true; + } else if (node instanceof Value && node.isObject(true)) { + cont = false; + exps[i] = _this.addProperties(node, name, o); + } + } + child.expressions = exps = flatten(exps); + } + return cont && !(child instanceof Class); + }; + })(this)); + }; + + Class.prototype.hoistDirectivePrologue = function() { + var expressions, index, node; + index = 0; + expressions = this.body.expressions; + while ((node = expressions[index]) && node instanceof Comment || node instanceof Value && node.isString()) { + ++index; + } + return this.directives = expressions.splice(0, index); + }; + + Class.prototype.ensureConstructor = function(name) { + if (!this.ctor) { + this.ctor = new Code; + if (this.externalCtor) { + this.ctor.body.push(new Literal(this.externalCtor + ".apply(this, arguments)")); + } else if (this.parent) { + this.ctor.body.push(new Literal(name + ".__super__.constructor.apply(this, arguments)")); + } + this.ctor.body.makeReturn(); + this.body.expressions.unshift(this.ctor); + } + this.ctor.ctor = this.ctor.name = name; + this.ctor.klass = null; + return this.ctor.noReturn = true; + }; + + Class.prototype.compileNode = function(o) { + var args, argumentsNode, func, jumpNode, klass, lname, name, ref3, superClass; + if (jumpNode = this.body.jumps()) { + jumpNode.error('Class bodies cannot contain pure statements'); + } + if (argumentsNode = this.body.contains(isLiteralArguments)) { + argumentsNode.error("Class bodies shouldn't reference arguments"); + } + name = this.determineName(); + lname = new IdentifierLiteral(name); + func = new Code([], Block.wrap([this.body])); + args = []; + o.classScope = func.makeScope(o.scope); + this.hoistDirectivePrologue(); + this.setContext(name); + this.walkBody(name, o); + this.ensureConstructor(name); + this.addBoundFunctions(o); + this.body.spaced = true; + this.body.expressions.push(lname); + if (this.parent) { + superClass = new IdentifierLiteral(o.classScope.freeVariable('superClass', { + reserve: false + })); + this.body.expressions.unshift(new Extends(lname, superClass)); + func.params.push(new Param(superClass)); + args.push(this.parent); + } + (ref3 = this.body.expressions).unshift.apply(ref3, this.directives); + klass = new Parens(new Call(func, args)); + if (this.variable) { + klass = new Assign(this.variable, klass, null, { + moduleDeclaration: this.moduleDeclaration + }); + } + return klass.compileToFragments(o); + }; + + return Class; + + })(Base); + + exports.ModuleDeclaration = ModuleDeclaration = (function(superClass1) { + extend1(ModuleDeclaration, superClass1); + + function ModuleDeclaration(clause, source1) { + this.clause = clause; + this.source = source1; + this.checkSource(); + } + + ModuleDeclaration.prototype.children = ['clause', 'source']; + + ModuleDeclaration.prototype.isStatement = YES; + + ModuleDeclaration.prototype.jumps = THIS; + + ModuleDeclaration.prototype.makeReturn = THIS; + + ModuleDeclaration.prototype.checkSource = function() { + if ((this.source != null) && this.source instanceof StringWithInterpolations) { + return this.source.error('the name of the module to be imported from must be an uninterpolated string'); + } + }; + + ModuleDeclaration.prototype.checkScope = function(o, moduleDeclarationType) { + if (o.indent.length !== 0) { + return this.error(moduleDeclarationType + " statements must be at top-level scope"); + } + }; + + return ModuleDeclaration; + + })(Base); + + exports.ImportDeclaration = ImportDeclaration = (function(superClass1) { + extend1(ImportDeclaration, superClass1); + + function ImportDeclaration() { + return ImportDeclaration.__super__.constructor.apply(this, arguments); + } + + ImportDeclaration.prototype.compileNode = function(o) { + var code, ref3; + this.checkScope(o, 'import'); + o.importedSymbols = []; + code = []; + code.push(this.makeCode(this.tab + "import ")); + if (this.clause != null) { + code.push.apply(code, this.clause.compileNode(o)); + } + if (((ref3 = this.source) != null ? ref3.value : void 0) != null) { + if (this.clause !== null) { + code.push(this.makeCode(' from ')); + } + code.push(this.makeCode(this.source.value)); + } + code.push(this.makeCode(';')); + return code; + }; + + return ImportDeclaration; + + })(ModuleDeclaration); + + exports.ImportClause = ImportClause = (function(superClass1) { + extend1(ImportClause, superClass1); + + function ImportClause(defaultBinding, namedImports) { + this.defaultBinding = defaultBinding; + this.namedImports = namedImports; + } + + ImportClause.prototype.children = ['defaultBinding', 'namedImports']; + + ImportClause.prototype.compileNode = function(o) { + var code; + code = []; + if (this.defaultBinding != null) { + code.push.apply(code, this.defaultBinding.compileNode(o)); + if (this.namedImports != null) { + code.push(this.makeCode(', ')); + } + } + if (this.namedImports != null) { + code.push.apply(code, this.namedImports.compileNode(o)); + } + return code; + }; + + return ImportClause; + + })(Base); + + exports.ExportDeclaration = ExportDeclaration = (function(superClass1) { + extend1(ExportDeclaration, superClass1); + + function ExportDeclaration() { + return ExportDeclaration.__super__.constructor.apply(this, arguments); + } + + ExportDeclaration.prototype.compileNode = function(o) { + var code, ref3; + this.checkScope(o, 'export'); + code = []; + code.push(this.makeCode(this.tab + "export ")); + if (this instanceof ExportDefaultDeclaration) { + code.push(this.makeCode('default ')); + } + if (!(this instanceof ExportDefaultDeclaration) && (this.clause instanceof Assign || this.clause instanceof Class)) { + if (this.clause instanceof Class && !this.clause.variable) { + this.clause.error('anonymous classes cannot be exported'); + } + code.push(this.makeCode('var ')); + this.clause.moduleDeclaration = 'export'; + } + if ((this.clause.body != null) && this.clause.body instanceof Block) { + code = code.concat(this.clause.compileToFragments(o, LEVEL_TOP)); + } else { + code = code.concat(this.clause.compileNode(o)); + } + if (((ref3 = this.source) != null ? ref3.value : void 0) != null) { + code.push(this.makeCode(" from " + this.source.value)); + } + code.push(this.makeCode(';')); + return code; + }; + + return ExportDeclaration; + + })(ModuleDeclaration); + + exports.ExportNamedDeclaration = ExportNamedDeclaration = (function(superClass1) { + extend1(ExportNamedDeclaration, superClass1); + + function ExportNamedDeclaration() { + return ExportNamedDeclaration.__super__.constructor.apply(this, arguments); + } + + return ExportNamedDeclaration; + + })(ExportDeclaration); + + exports.ExportDefaultDeclaration = ExportDefaultDeclaration = (function(superClass1) { + extend1(ExportDefaultDeclaration, superClass1); + + function ExportDefaultDeclaration() { + return ExportDefaultDeclaration.__super__.constructor.apply(this, arguments); + } + + return ExportDefaultDeclaration; + + })(ExportDeclaration); + + exports.ExportAllDeclaration = ExportAllDeclaration = (function(superClass1) { + extend1(ExportAllDeclaration, superClass1); + + function ExportAllDeclaration() { + return ExportAllDeclaration.__super__.constructor.apply(this, arguments); + } + + return ExportAllDeclaration; + + })(ExportDeclaration); + + exports.ModuleSpecifierList = ModuleSpecifierList = (function(superClass1) { + extend1(ModuleSpecifierList, superClass1); + + function ModuleSpecifierList(specifiers) { + this.specifiers = specifiers; + } + + ModuleSpecifierList.prototype.children = ['specifiers']; + + ModuleSpecifierList.prototype.compileNode = function(o) { + var code, compiledList, fragments, index, j, len1, specifier; + code = []; + o.indent += TAB; + compiledList = (function() { + var j, len1, ref3, results; + ref3 = this.specifiers; + results = []; + for (j = 0, len1 = ref3.length; j < len1; j++) { + specifier = ref3[j]; + results.push(specifier.compileToFragments(o, LEVEL_LIST)); + } + return results; + }).call(this); + if (this.specifiers.length !== 0) { + code.push(this.makeCode("{\n" + o.indent)); + for (index = j = 0, len1 = compiledList.length; j < len1; index = ++j) { + fragments = compiledList[index]; + if (index) { + code.push(this.makeCode(",\n" + o.indent)); + } + code.push.apply(code, fragments); + } + code.push(this.makeCode("\n}")); + } else { + code.push(this.makeCode('{}')); + } + return code; + }; + + return ModuleSpecifierList; + + })(Base); + + exports.ImportSpecifierList = ImportSpecifierList = (function(superClass1) { + extend1(ImportSpecifierList, superClass1); + + function ImportSpecifierList() { + return ImportSpecifierList.__super__.constructor.apply(this, arguments); + } + + return ImportSpecifierList; + + })(ModuleSpecifierList); + + exports.ExportSpecifierList = ExportSpecifierList = (function(superClass1) { + extend1(ExportSpecifierList, superClass1); + + function ExportSpecifierList() { + return ExportSpecifierList.__super__.constructor.apply(this, arguments); + } + + return ExportSpecifierList; + + })(ModuleSpecifierList); + + exports.ModuleSpecifier = ModuleSpecifier = (function(superClass1) { + extend1(ModuleSpecifier, superClass1); + + function ModuleSpecifier(original, alias, moduleDeclarationType1) { + this.original = original; + this.alias = alias; + this.moduleDeclarationType = moduleDeclarationType1; + this.identifier = this.alias != null ? this.alias.value : this.original.value; + } + + ModuleSpecifier.prototype.children = ['original', 'alias']; + + ModuleSpecifier.prototype.compileNode = function(o) { + var code; + o.scope.find(this.identifier, this.moduleDeclarationType); + code = []; + code.push(this.makeCode(this.original.value)); + if (this.alias != null) { + code.push(this.makeCode(" as " + this.alias.value)); + } + return code; + }; + + return ModuleSpecifier; + + })(Base); + + exports.ImportSpecifier = ImportSpecifier = (function(superClass1) { + extend1(ImportSpecifier, superClass1); + + function ImportSpecifier(imported, local) { + ImportSpecifier.__super__.constructor.call(this, imported, local, 'import'); + } + + ImportSpecifier.prototype.compileNode = function(o) { + var ref3; + if ((ref3 = this.identifier, indexOf.call(o.importedSymbols, ref3) >= 0) || o.scope.check(this.identifier)) { + this.error("'" + this.identifier + "' has already been declared"); + } else { + o.importedSymbols.push(this.identifier); + } + return ImportSpecifier.__super__.compileNode.call(this, o); + }; + + return ImportSpecifier; + + })(ModuleSpecifier); + + exports.ImportDefaultSpecifier = ImportDefaultSpecifier = (function(superClass1) { + extend1(ImportDefaultSpecifier, superClass1); + + function ImportDefaultSpecifier() { + return ImportDefaultSpecifier.__super__.constructor.apply(this, arguments); + } + + return ImportDefaultSpecifier; + + })(ImportSpecifier); + + exports.ImportNamespaceSpecifier = ImportNamespaceSpecifier = (function(superClass1) { + extend1(ImportNamespaceSpecifier, superClass1); + + function ImportNamespaceSpecifier() { + return ImportNamespaceSpecifier.__super__.constructor.apply(this, arguments); + } + + return ImportNamespaceSpecifier; + + })(ImportSpecifier); + + exports.ExportSpecifier = ExportSpecifier = (function(superClass1) { + extend1(ExportSpecifier, superClass1); + + function ExportSpecifier(local, exported) { + ExportSpecifier.__super__.constructor.call(this, local, exported, 'export'); + } + + return ExportSpecifier; + + })(ModuleSpecifier); + + exports.Assign = Assign = (function(superClass1) { + extend1(Assign, superClass1); + + function Assign(variable1, value1, context, options) { + this.variable = variable1; + this.value = value1; + this.context = context; + if (options == null) { + options = {}; + } + this.param = options.param, this.subpattern = options.subpattern, this.operatorToken = options.operatorToken, this.moduleDeclaration = options.moduleDeclaration; + } + + Assign.prototype.children = ['variable', 'value']; + + Assign.prototype.isStatement = function(o) { + return (o != null ? o.level : void 0) === LEVEL_TOP && (this.context != null) && (this.moduleDeclaration || indexOf.call(this.context, "?") >= 0); + }; + + Assign.prototype.checkAssignability = function(o, varBase) { + if (Object.prototype.hasOwnProperty.call(o.scope.positions, varBase.value) && o.scope.variables[o.scope.positions[varBase.value]].type === 'import') { + return varBase.error("'" + varBase.value + "' is read-only"); + } + }; + + Assign.prototype.assigns = function(name) { + return this[this.context === 'object' ? 'value' : 'variable'].assigns(name); + }; + + Assign.prototype.unfoldSoak = function(o) { + return unfoldSoak(o, this, 'variable'); + }; + + Assign.prototype.compileNode = function(o) { + var answer, compiledName, isValue, j, name, properties, prototype, ref3, ref4, ref5, ref6, ref7, ref8, val, varBase; + if (isValue = this.variable instanceof Value) { + if (this.variable.isArray() || this.variable.isObject()) { + return this.compilePatternMatch(o); + } + if (this.variable.isSplice()) { + return this.compileSplice(o); + } + if ((ref3 = this.context) === '||=' || ref3 === '&&=' || ref3 === '?=') { + return this.compileConditional(o); + } + if ((ref4 = this.context) === '**=' || ref4 === '//=' || ref4 === '%%=') { + return this.compileSpecialMath(o); + } + } + if (this.value instanceof Code) { + if (this.value["static"]) { + this.value.klass = this.variable.base; + this.value.name = this.variable.properties[0]; + this.value.variable = this.variable; + } else if (((ref5 = this.variable.properties) != null ? ref5.length : void 0) >= 2) { + ref6 = this.variable.properties, properties = 3 <= ref6.length ? slice.call(ref6, 0, j = ref6.length - 2) : (j = 0, []), prototype = ref6[j++], name = ref6[j++]; + if (((ref7 = prototype.name) != null ? ref7.value : void 0) === 'prototype') { + this.value.klass = new Value(this.variable.base, properties); + this.value.name = name; + this.value.variable = this.variable; + } + } + } + if (!this.context) { + varBase = this.variable.unwrapAll(); + if (!varBase.isAssignable()) { + this.variable.error("'" + (this.variable.compile(o)) + "' can't be assigned"); + } + if (!(typeof varBase.hasProperties === "function" ? varBase.hasProperties() : void 0)) { + if (this.moduleDeclaration) { + this.checkAssignability(o, varBase); + o.scope.add(varBase.value, this.moduleDeclaration); + } else if (this.param) { + o.scope.add(varBase.value, 'var'); + } else { + this.checkAssignability(o, varBase); + o.scope.find(varBase.value); + } + } + } + val = this.value.compileToFragments(o, LEVEL_LIST); + if (isValue && this.variable.base instanceof Obj) { + this.variable.front = true; + } + compiledName = this.variable.compileToFragments(o, LEVEL_LIST); + if (this.context === 'object') { + if (ref8 = fragmentsToText(compiledName), indexOf.call(JS_FORBIDDEN, ref8) >= 0) { + compiledName.unshift(this.makeCode('"')); + compiledName.push(this.makeCode('"')); + } + return compiledName.concat(this.makeCode(": "), val); + } + answer = compiledName.concat(this.makeCode(" " + (this.context || '=') + " "), val); + if (o.level <= LEVEL_LIST) { + return answer; + } else { + return this.wrapInBraces(answer); + } + }; + + Assign.prototype.compilePatternMatch = function(o) { + var acc, assigns, code, defaultValue, expandedIdx, fragments, i, idx, isObject, ivar, j, len1, message, name, obj, objects, olen, ref, ref3, ref4, ref5, ref6, rest, top, val, value, vvar, vvarText; + top = o.level === LEVEL_TOP; + value = this.value; + objects = this.variable.base.objects; + if (!(olen = objects.length)) { + code = value.compileToFragments(o); + if (o.level >= LEVEL_OP) { + return this.wrapInBraces(code); + } else { + return code; + } + } + obj = objects[0]; + if (olen === 1 && obj instanceof Expansion) { + obj.error('Destructuring assignment has no target'); + } + isObject = this.variable.isObject(); + if (top && olen === 1 && !(obj instanceof Splat)) { + defaultValue = null; + if (obj instanceof Assign && obj.context === 'object') { + ref3 = obj, (ref4 = ref3.variable, idx = ref4.base), obj = ref3.value; + if (obj instanceof Assign) { + defaultValue = obj.value; + obj = obj.variable; + } + } else { + if (obj instanceof Assign) { + defaultValue = obj.value; + obj = obj.variable; + } + idx = isObject ? obj["this"] ? obj.properties[0].name : new PropertyName(obj.unwrap().value) : new NumberLiteral(0); + } + acc = idx.unwrap() instanceof PropertyName; + value = new Value(value); + value.properties.push(new (acc ? Access : Index)(idx)); + message = isUnassignable(obj.unwrap().value); + if (message) { + obj.error(message); + } + if (defaultValue) { + value = new Op('?', value, defaultValue); + } + return new Assign(obj, value, null, { + param: this.param + }).compileToFragments(o, LEVEL_TOP); + } + vvar = value.compileToFragments(o, LEVEL_LIST); + vvarText = fragmentsToText(vvar); + assigns = []; + expandedIdx = false; + if (!(value.unwrap() instanceof IdentifierLiteral) || this.variable.assigns(vvarText)) { + assigns.push([this.makeCode((ref = o.scope.freeVariable('ref')) + " = ")].concat(slice.call(vvar))); + vvar = [this.makeCode(ref)]; + vvarText = ref; + } + for (i = j = 0, len1 = objects.length; j < len1; i = ++j) { + obj = objects[i]; + idx = i; + if (!expandedIdx && obj instanceof Splat) { + name = obj.name.unwrap().value; + obj = obj.unwrap(); + val = olen + " <= " + vvarText + ".length ? " + (utility('slice', o)) + ".call(" + vvarText + ", " + i; + if (rest = olen - i - 1) { + ivar = o.scope.freeVariable('i', { + single: true + }); + val += ", " + ivar + " = " + vvarText + ".length - " + rest + ") : (" + ivar + " = " + i + ", [])"; + } else { + val += ") : []"; + } + val = new Literal(val); + expandedIdx = ivar + "++"; + } else if (!expandedIdx && obj instanceof Expansion) { + if (rest = olen - i - 1) { + if (rest === 1) { + expandedIdx = vvarText + ".length - 1"; + } else { + ivar = o.scope.freeVariable('i', { + single: true + }); + val = new Literal(ivar + " = " + vvarText + ".length - " + rest); + expandedIdx = ivar + "++"; + assigns.push(val.compileToFragments(o, LEVEL_LIST)); + } + } + continue; + } else { + if (obj instanceof Splat || obj instanceof Expansion) { + obj.error("multiple splats/expansions are disallowed in an assignment"); + } + defaultValue = null; + if (obj instanceof Assign && obj.context === 'object') { + ref5 = obj, (ref6 = ref5.variable, idx = ref6.base), obj = ref5.value; + if (obj instanceof Assign) { + defaultValue = obj.value; + obj = obj.variable; + } + } else { + if (obj instanceof Assign) { + defaultValue = obj.value; + obj = obj.variable; + } + idx = isObject ? obj["this"] ? obj.properties[0].name : new PropertyName(obj.unwrap().value) : new Literal(expandedIdx || idx); + } + name = obj.unwrap().value; + acc = idx.unwrap() instanceof PropertyName; + val = new Value(new Literal(vvarText), [new (acc ? Access : Index)(idx)]); + if (defaultValue) { + val = new Op('?', val, defaultValue); + } + } + if (name != null) { + message = isUnassignable(name); + if (message) { + obj.error(message); + } + } + assigns.push(new Assign(obj, val, null, { + param: this.param, + subpattern: true + }).compileToFragments(o, LEVEL_LIST)); + } + if (!(top || this.subpattern)) { + assigns.push(vvar); + } + fragments = this.joinFragmentArrays(assigns, ', '); + if (o.level < LEVEL_LIST) { + return fragments; + } else { + return this.wrapInBraces(fragments); + } + }; + + Assign.prototype.compileConditional = function(o) { + var fragments, left, ref3, right; + ref3 = this.variable.cacheReference(o), left = ref3[0], right = ref3[1]; + if (!left.properties.length && left.base instanceof Literal && !(left.base instanceof ThisLiteral) && !o.scope.check(left.base.value)) { + this.variable.error("the variable \"" + left.base.value + "\" can't be assigned with " + this.context + " because it has not been declared before"); + } + if (indexOf.call(this.context, "?") >= 0) { + o.isExistentialEquals = true; + return new If(new Existence(left), right, { + type: 'if' + }).addElse(new Assign(right, this.value, '=')).compileToFragments(o); + } else { + fragments = new Op(this.context.slice(0, -1), left, new Assign(right, this.value, '=')).compileToFragments(o); + if (o.level <= LEVEL_LIST) { + return fragments; + } else { + return this.wrapInBraces(fragments); + } + } + }; + + Assign.prototype.compileSpecialMath = function(o) { + var left, ref3, right; + ref3 = this.variable.cacheReference(o), left = ref3[0], right = ref3[1]; + return new Assign(left, new Op(this.context.slice(0, -1), right, this.value)).compileToFragments(o); + }; + + Assign.prototype.compileSplice = function(o) { + var answer, exclusive, from, fromDecl, fromRef, name, ref3, ref4, ref5, to, valDef, valRef; + ref3 = this.variable.properties.pop().range, from = ref3.from, to = ref3.to, exclusive = ref3.exclusive; + name = this.variable.compile(o); + if (from) { + ref4 = this.cacheToCodeFragments(from.cache(o, LEVEL_OP)), fromDecl = ref4[0], fromRef = ref4[1]; + } else { + fromDecl = fromRef = '0'; + } + if (to) { + if ((from != null ? from.isNumber() : void 0) && to.isNumber()) { + to = to.compile(o) - fromRef; + if (!exclusive) { + to += 1; + } + } else { + to = to.compile(o, LEVEL_ACCESS) + ' - ' + fromRef; + if (!exclusive) { + to += ' + 1'; + } + } + } else { + to = "9e9"; + } + ref5 = this.value.cache(o, LEVEL_LIST), valDef = ref5[0], valRef = ref5[1]; + answer = [].concat(this.makeCode("[].splice.apply(" + name + ", [" + fromDecl + ", " + to + "].concat("), valDef, this.makeCode(")), "), valRef); + if (o.level > LEVEL_TOP) { + return this.wrapInBraces(answer); + } else { + return answer; + } + }; + + return Assign; + + })(Base); + + exports.Code = Code = (function(superClass1) { + extend1(Code, superClass1); + + function Code(params, body, tag) { + this.params = params || []; + this.body = body || new Block; + this.bound = tag === 'boundfunc'; + this.isGenerator = !!this.body.contains(function(node) { + return (node instanceof Op && node.isYield()) || node instanceof YieldReturn; + }); + } + + Code.prototype.children = ['params', 'body']; + + Code.prototype.isStatement = function() { + return !!this.ctor; + }; + + Code.prototype.jumps = NO; + + Code.prototype.makeScope = function(parentScope) { + return new Scope(parentScope, this.body, this); + }; + + Code.prototype.compileNode = function(o) { + var answer, boundfunc, code, exprs, i, j, k, l, len1, len2, len3, len4, len5, len6, lit, m, p, param, params, q, r, ref, ref3, ref4, ref5, ref6, ref7, ref8, splats, uniqs, val, wasEmpty, wrapper; + if (this.bound && ((ref3 = o.scope.method) != null ? ref3.bound : void 0)) { + this.context = o.scope.method.context; + } + if (this.bound && !this.context) { + this.context = '_this'; + wrapper = new Code([new Param(new IdentifierLiteral(this.context))], new Block([this])); + boundfunc = new Call(wrapper, [new ThisLiteral]); + boundfunc.updateLocationDataIfMissing(this.locationData); + return boundfunc.compileNode(o); + } + o.scope = del(o, 'classScope') || this.makeScope(o.scope); + o.scope.shared = del(o, 'sharedScope'); + o.indent += TAB; + delete o.bare; + delete o.isExistentialEquals; + params = []; + exprs = []; + ref4 = this.params; + for (j = 0, len1 = ref4.length; j < len1; j++) { + param = ref4[j]; + if (!(param instanceof Expansion)) { + o.scope.parameter(param.asReference(o)); + } + } + ref5 = this.params; + for (k = 0, len2 = ref5.length; k < len2; k++) { + param = ref5[k]; + if (!(param.splat || param instanceof Expansion)) { + continue; + } + ref6 = this.params; + for (l = 0, len3 = ref6.length; l < len3; l++) { + p = ref6[l]; + if (!(p instanceof Expansion) && p.name.value) { + o.scope.add(p.name.value, 'var', true); + } + } + splats = new Assign(new Value(new Arr((function() { + var len4, m, ref7, results; + ref7 = this.params; + results = []; + for (m = 0, len4 = ref7.length; m < len4; m++) { + p = ref7[m]; + results.push(p.asReference(o)); + } + return results; + }).call(this))), new Value(new IdentifierLiteral('arguments'))); + break; + } + ref7 = this.params; + for (m = 0, len4 = ref7.length; m < len4; m++) { + param = ref7[m]; + if (param.isComplex()) { + val = ref = param.asReference(o); + if (param.value) { + val = new Op('?', ref, param.value); + } + exprs.push(new Assign(new Value(param.name), val, '=', { + param: true + })); + } else { + ref = param; + if (param.value) { + lit = new Literal(ref.name.value + ' == null'); + val = new Assign(new Value(param.name), param.value, '='); + exprs.push(new If(lit, val)); + } + } + if (!splats) { + params.push(ref); + } + } + wasEmpty = this.body.isEmpty(); + if (splats) { + exprs.unshift(splats); + } + if (exprs.length) { + (ref8 = this.body.expressions).unshift.apply(ref8, exprs); + } + for (i = q = 0, len5 = params.length; q < len5; i = ++q) { + p = params[i]; + params[i] = p.compileToFragments(o); + o.scope.parameter(fragmentsToText(params[i])); + } + uniqs = []; + this.eachParamName(function(name, node) { + if (indexOf.call(uniqs, name) >= 0) { + node.error("multiple parameters named " + name); + } + return uniqs.push(name); + }); + if (!(wasEmpty || this.noReturn)) { + this.body.makeReturn(); + } + code = 'function'; + if (this.isGenerator) { + code += '*'; + } + if (this.ctor) { + code += ' ' + this.name; + } + code += '('; + answer = [this.makeCode(code)]; + for (i = r = 0, len6 = params.length; r < len6; i = ++r) { + p = params[i]; + if (i) { + answer.push(this.makeCode(", ")); + } + answer.push.apply(answer, p); + } + answer.push(this.makeCode(') {')); + if (!this.body.isEmpty()) { + answer = answer.concat(this.makeCode("\n"), this.body.compileWithDeclarations(o), this.makeCode("\n" + this.tab)); + } + answer.push(this.makeCode('}')); + if (this.ctor) { + return [this.makeCode(this.tab)].concat(slice.call(answer)); + } + if (this.front || (o.level >= LEVEL_ACCESS)) { + return this.wrapInBraces(answer); + } else { + return answer; + } + }; + + Code.prototype.eachParamName = function(iterator) { + var j, len1, param, ref3, results; + ref3 = this.params; + results = []; + for (j = 0, len1 = ref3.length; j < len1; j++) { + param = ref3[j]; + results.push(param.eachName(iterator)); + } + return results; + }; + + Code.prototype.traverseChildren = function(crossScope, func) { + if (crossScope) { + return Code.__super__.traverseChildren.call(this, crossScope, func); + } + }; + + return Code; + + })(Base); + + exports.Param = Param = (function(superClass1) { + extend1(Param, superClass1); + + function Param(name1, value1, splat) { + var message, token; + this.name = name1; + this.value = value1; + this.splat = splat; + message = isUnassignable(this.name.unwrapAll().value); + if (message) { + this.name.error(message); + } + if (this.name instanceof Obj && this.name.generated) { + token = this.name.objects[0].operatorToken; + token.error("unexpected " + token.value); + } + } + + Param.prototype.children = ['name', 'value']; + + Param.prototype.compileToFragments = function(o) { + return this.name.compileToFragments(o, LEVEL_LIST); + }; + + Param.prototype.asReference = function(o) { + var name, node; + if (this.reference) { + return this.reference; + } + node = this.name; + if (node["this"]) { + name = node.properties[0].name.value; + if (indexOf.call(JS_FORBIDDEN, name) >= 0) { + name = "_" + name; + } + node = new IdentifierLiteral(o.scope.freeVariable(name)); + } else if (node.isComplex()) { + node = new IdentifierLiteral(o.scope.freeVariable('arg')); + } + node = new Value(node); + if (this.splat) { + node = new Splat(node); + } + node.updateLocationDataIfMissing(this.locationData); + return this.reference = node; + }; + + Param.prototype.isComplex = function() { + return this.name.isComplex(); + }; + + Param.prototype.eachName = function(iterator, name) { + var atParam, j, len1, node, obj, ref3, ref4; + if (name == null) { + name = this.name; + } + atParam = function(obj) { + return iterator("@" + obj.properties[0].name.value, obj); + }; + if (name instanceof Literal) { + return iterator(name.value, name); + } + if (name instanceof Value) { + return atParam(name); + } + ref4 = (ref3 = name.objects) != null ? ref3 : []; + for (j = 0, len1 = ref4.length; j < len1; j++) { + obj = ref4[j]; + if (obj instanceof Assign && (obj.context == null)) { + obj = obj.variable; + } + if (obj instanceof Assign) { + if (obj.value instanceof Assign) { + obj = obj.value; + } + this.eachName(iterator, obj.value.unwrap()); + } else if (obj instanceof Splat) { + node = obj.name.unwrap(); + iterator(node.value, node); + } else if (obj instanceof Value) { + if (obj.isArray() || obj.isObject()) { + this.eachName(iterator, obj.base); + } else if (obj["this"]) { + atParam(obj); + } else { + iterator(obj.base.value, obj.base); + } + } else if (!(obj instanceof Expansion)) { + obj.error("illegal parameter " + (obj.compile())); + } + } + }; + + return Param; + + })(Base); + + exports.Splat = Splat = (function(superClass1) { + extend1(Splat, superClass1); + + Splat.prototype.children = ['name']; + + Splat.prototype.isAssignable = YES; + + function Splat(name) { + this.name = name.compile ? name : new Literal(name); + } + + Splat.prototype.assigns = function(name) { + return this.name.assigns(name); + }; + + Splat.prototype.compileToFragments = function(o) { + return this.name.compileToFragments(o); + }; + + Splat.prototype.unwrap = function() { + return this.name; + }; + + Splat.compileSplattedArray = function(o, list, apply) { + var args, base, compiledNode, concatPart, fragments, i, index, j, last, len1, node; + index = -1; + while ((node = list[++index]) && !(node instanceof Splat)) { + continue; + } + if (index >= list.length) { + return []; + } + if (list.length === 1) { + node = list[0]; + fragments = node.compileToFragments(o, LEVEL_LIST); + if (apply) { + return fragments; + } + return [].concat(node.makeCode((utility('slice', o)) + ".call("), fragments, node.makeCode(")")); + } + args = list.slice(index); + for (i = j = 0, len1 = args.length; j < len1; i = ++j) { + node = args[i]; + compiledNode = node.compileToFragments(o, LEVEL_LIST); + args[i] = node instanceof Splat ? [].concat(node.makeCode((utility('slice', o)) + ".call("), compiledNode, node.makeCode(")")) : [].concat(node.makeCode("["), compiledNode, node.makeCode("]")); + } + if (index === 0) { + node = list[0]; + concatPart = node.joinFragmentArrays(args.slice(1), ', '); + return args[0].concat(node.makeCode(".concat("), concatPart, node.makeCode(")")); + } + base = (function() { + var k, len2, ref3, results; + ref3 = list.slice(0, index); + results = []; + for (k = 0, len2 = ref3.length; k < len2; k++) { + node = ref3[k]; + results.push(node.compileToFragments(o, LEVEL_LIST)); + } + return results; + })(); + base = list[0].joinFragmentArrays(base, ', '); + concatPart = list[index].joinFragmentArrays(args, ', '); + last = list[list.length - 1]; + return [].concat(list[0].makeCode("["), base, list[index].makeCode("].concat("), concatPart, last.makeCode(")")); + }; + + return Splat; + + })(Base); + + exports.Expansion = Expansion = (function(superClass1) { + extend1(Expansion, superClass1); + + function Expansion() { + return Expansion.__super__.constructor.apply(this, arguments); + } + + Expansion.prototype.isComplex = NO; + + Expansion.prototype.compileNode = function(o) { + return this.error('Expansion must be used inside a destructuring assignment or parameter list'); + }; + + Expansion.prototype.asReference = function(o) { + return this; + }; + + Expansion.prototype.eachName = function(iterator) {}; + + return Expansion; + + })(Base); + + exports.While = While = (function(superClass1) { + extend1(While, superClass1); + + function While(condition, options) { + this.condition = (options != null ? options.invert : void 0) ? condition.invert() : condition; + this.guard = options != null ? options.guard : void 0; + } + + While.prototype.children = ['condition', 'guard', 'body']; + + While.prototype.isStatement = YES; + + While.prototype.makeReturn = function(res) { + if (res) { + return While.__super__.makeReturn.apply(this, arguments); + } else { + this.returns = !this.jumps({ + loop: true + }); + return this; + } + }; + + While.prototype.addBody = function(body1) { + this.body = body1; + return this; + }; + + While.prototype.jumps = function() { + var expressions, j, jumpNode, len1, node; + expressions = this.body.expressions; + if (!expressions.length) { + return false; + } + for (j = 0, len1 = expressions.length; j < len1; j++) { + node = expressions[j]; + if (jumpNode = node.jumps({ + loop: true + })) { + return jumpNode; + } + } + return false; + }; + + While.prototype.compileNode = function(o) { + var answer, body, rvar, set; + o.indent += TAB; + set = ''; + body = this.body; + if (body.isEmpty()) { + body = this.makeCode(''); + } else { + if (this.returns) { + body.makeReturn(rvar = o.scope.freeVariable('results')); + set = "" + this.tab + rvar + " = [];\n"; + } + if (this.guard) { + if (body.expressions.length > 1) { + body.expressions.unshift(new If((new Parens(this.guard)).invert(), new StatementLiteral("continue"))); + } else { + if (this.guard) { + body = Block.wrap([new If(this.guard, body)]); + } + } + } + body = [].concat(this.makeCode("\n"), body.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab)); + } + answer = [].concat(this.makeCode(set + this.tab + "while ("), this.condition.compileToFragments(o, LEVEL_PAREN), this.makeCode(") {"), body, this.makeCode("}")); + if (this.returns) { + answer.push(this.makeCode("\n" + this.tab + "return " + rvar + ";")); + } + return answer; + }; + + return While; + + })(Base); + + exports.Op = Op = (function(superClass1) { + var CONVERSIONS, INVERSIONS; + + extend1(Op, superClass1); + + function Op(op, first, second, flip) { + if (op === 'in') { + return new In(first, second); + } + if (op === 'do') { + return this.generateDo(first); + } + if (op === 'new') { + if (first instanceof Call && !first["do"] && !first.isNew) { + return first.newInstance(); + } + if (first instanceof Code && first.bound || first["do"]) { + first = new Parens(first); + } + } + this.operator = CONVERSIONS[op] || op; + this.first = first; + this.second = second; + this.flip = !!flip; + return this; + } + + CONVERSIONS = { + '==': '===', + '!=': '!==', + 'of': 'in', + 'yieldfrom': 'yield*' + }; + + INVERSIONS = { + '!==': '===', + '===': '!==' + }; + + Op.prototype.children = ['first', 'second']; + + Op.prototype.isNumber = function() { + var ref3; + return this.isUnary() && ((ref3 = this.operator) === '+' || ref3 === '-') && this.first instanceof Value && this.first.isNumber(); + }; + + Op.prototype.isYield = function() { + var ref3; + return (ref3 = this.operator) === 'yield' || ref3 === 'yield*'; + }; + + Op.prototype.isUnary = function() { + return !this.second; + }; + + Op.prototype.isComplex = function() { + return !this.isNumber(); + }; + + Op.prototype.isChainable = function() { + var ref3; + return (ref3 = this.operator) === '<' || ref3 === '>' || ref3 === '>=' || ref3 === '<=' || ref3 === '===' || ref3 === '!=='; + }; + + Op.prototype.invert = function() { + var allInvertable, curr, fst, op, ref3; + if (this.isChainable() && this.first.isChainable()) { + allInvertable = true; + curr = this; + while (curr && curr.operator) { + allInvertable && (allInvertable = curr.operator in INVERSIONS); + curr = curr.first; + } + if (!allInvertable) { + return new Parens(this).invert(); + } + curr = this; + while (curr && curr.operator) { + curr.invert = !curr.invert; + curr.operator = INVERSIONS[curr.operator]; + curr = curr.first; + } + return this; + } else if (op = INVERSIONS[this.operator]) { + this.operator = op; + if (this.first.unwrap() instanceof Op) { + this.first.invert(); + } + return this; + } else if (this.second) { + return new Parens(this).invert(); + } else if (this.operator === '!' && (fst = this.first.unwrap()) instanceof Op && ((ref3 = fst.operator) === '!' || ref3 === 'in' || ref3 === 'instanceof')) { + return fst; + } else { + return new Op('!', this); + } + }; + + Op.prototype.unfoldSoak = function(o) { + var ref3; + return ((ref3 = this.operator) === '++' || ref3 === '--' || ref3 === 'delete') && unfoldSoak(o, this, 'first'); + }; + + Op.prototype.generateDo = function(exp) { + var call, func, j, len1, param, passedParams, ref, ref3; + passedParams = []; + func = exp instanceof Assign && (ref = exp.value.unwrap()) instanceof Code ? ref : exp; + ref3 = func.params || []; + for (j = 0, len1 = ref3.length; j < len1; j++) { + param = ref3[j]; + if (param.value) { + passedParams.push(param.value); + delete param.value; + } else { + passedParams.push(param); + } + } + call = new Call(exp, passedParams); + call["do"] = true; + return call; + }; + + Op.prototype.compileNode = function(o) { + var answer, isChain, lhs, message, ref3, rhs; + isChain = this.isChainable() && this.first.isChainable(); + if (!isChain) { + this.first.front = this.front; + } + if (this.operator === 'delete' && o.scope.check(this.first.unwrapAll().value)) { + this.error('delete operand may not be argument or var'); + } + if ((ref3 = this.operator) === '--' || ref3 === '++') { + message = isUnassignable(this.first.unwrapAll().value); + if (message) { + this.first.error(message); + } + } + if (this.isYield()) { + return this.compileYield(o); + } + if (this.isUnary()) { + return this.compileUnary(o); + } + if (isChain) { + return this.compileChain(o); + } + switch (this.operator) { + case '?': + return this.compileExistence(o); + case '**': + return this.compilePower(o); + case '//': + return this.compileFloorDivision(o); + case '%%': + return this.compileModulo(o); + default: + lhs = this.first.compileToFragments(o, LEVEL_OP); + rhs = this.second.compileToFragments(o, LEVEL_OP); + answer = [].concat(lhs, this.makeCode(" " + this.operator + " "), rhs); + if (o.level <= LEVEL_OP) { + return answer; + } else { + return this.wrapInBraces(answer); + } + } + }; + + Op.prototype.compileChain = function(o) { + var fragments, fst, ref3, shared; + ref3 = this.first.second.cache(o), this.first.second = ref3[0], shared = ref3[1]; + fst = this.first.compileToFragments(o, LEVEL_OP); + fragments = fst.concat(this.makeCode(" " + (this.invert ? '&&' : '||') + " "), shared.compileToFragments(o), this.makeCode(" " + this.operator + " "), this.second.compileToFragments(o, LEVEL_OP)); + return this.wrapInBraces(fragments); + }; + + Op.prototype.compileExistence = function(o) { + var fst, ref; + if (this.first.isComplex()) { + ref = new IdentifierLiteral(o.scope.freeVariable('ref')); + fst = new Parens(new Assign(ref, this.first)); + } else { + fst = this.first; + ref = fst; + } + return new If(new Existence(fst), ref, { + type: 'if' + }).addElse(this.second).compileToFragments(o); + }; + + Op.prototype.compileUnary = function(o) { + var op, parts, plusMinus; + parts = []; + op = this.operator; + parts.push([this.makeCode(op)]); + if (op === '!' && this.first instanceof Existence) { + this.first.negated = !this.first.negated; + return this.first.compileToFragments(o); + } + if (o.level >= LEVEL_ACCESS) { + return (new Parens(this)).compileToFragments(o); + } + plusMinus = op === '+' || op === '-'; + if ((op === 'new' || op === 'typeof' || op === 'delete') || plusMinus && this.first instanceof Op && this.first.operator === op) { + parts.push([this.makeCode(' ')]); + } + if ((plusMinus && this.first instanceof Op) || (op === 'new' && this.first.isStatement(o))) { + this.first = new Parens(this.first); + } + parts.push(this.first.compileToFragments(o, LEVEL_OP)); + if (this.flip) { + parts.reverse(); + } + return this.joinFragmentArrays(parts, ''); + }; + + Op.prototype.compileYield = function(o) { + var op, parts, ref3; + parts = []; + op = this.operator; + if (o.scope.parent == null) { + this.error('yield can only occur inside functions'); + } + if (indexOf.call(Object.keys(this.first), 'expression') >= 0 && !(this.first instanceof Throw)) { + if (this.first.expression != null) { + parts.push(this.first.expression.compileToFragments(o, LEVEL_OP)); + } + } else { + if (o.level >= LEVEL_PAREN) { + parts.push([this.makeCode("(")]); + } + parts.push([this.makeCode(op)]); + if (((ref3 = this.first.base) != null ? ref3.value : void 0) !== '') { + parts.push([this.makeCode(" ")]); + } + parts.push(this.first.compileToFragments(o, LEVEL_OP)); + if (o.level >= LEVEL_PAREN) { + parts.push([this.makeCode(")")]); + } + } + return this.joinFragmentArrays(parts, ''); + }; + + Op.prototype.compilePower = function(o) { + var pow; + pow = new Value(new IdentifierLiteral('Math'), [new Access(new PropertyName('pow'))]); + return new Call(pow, [this.first, this.second]).compileToFragments(o); + }; + + Op.prototype.compileFloorDivision = function(o) { + var div, floor, second; + floor = new Value(new IdentifierLiteral('Math'), [new Access(new PropertyName('floor'))]); + second = this.second.isComplex() ? new Parens(this.second) : this.second; + div = new Op('/', this.first, second); + return new Call(floor, [div]).compileToFragments(o); + }; + + Op.prototype.compileModulo = function(o) { + var mod; + mod = new Value(new Literal(utility('modulo', o))); + return new Call(mod, [this.first, this.second]).compileToFragments(o); + }; + + Op.prototype.toString = function(idt) { + return Op.__super__.toString.call(this, idt, this.constructor.name + ' ' + this.operator); + }; + + return Op; + + })(Base); + + exports.In = In = (function(superClass1) { + extend1(In, superClass1); + + function In(object, array) { + this.object = object; + this.array = array; + } + + In.prototype.children = ['object', 'array']; + + In.prototype.invert = NEGATE; + + In.prototype.compileNode = function(o) { + var hasSplat, j, len1, obj, ref3; + if (this.array instanceof Value && this.array.isArray() && this.array.base.objects.length) { + ref3 = this.array.base.objects; + for (j = 0, len1 = ref3.length; j < len1; j++) { + obj = ref3[j]; + if (!(obj instanceof Splat)) { + continue; + } + hasSplat = true; + break; + } + if (!hasSplat) { + return this.compileOrTest(o); + } + } + return this.compileLoopTest(o); + }; + + In.prototype.compileOrTest = function(o) { + var cmp, cnj, i, item, j, len1, ref, ref3, ref4, ref5, sub, tests; + ref3 = this.object.cache(o, LEVEL_OP), sub = ref3[0], ref = ref3[1]; + ref4 = this.negated ? [' !== ', ' && '] : [' === ', ' || '], cmp = ref4[0], cnj = ref4[1]; + tests = []; + ref5 = this.array.base.objects; + for (i = j = 0, len1 = ref5.length; j < len1; i = ++j) { + item = ref5[i]; + if (i) { + tests.push(this.makeCode(cnj)); + } + tests = tests.concat((i ? ref : sub), this.makeCode(cmp), item.compileToFragments(o, LEVEL_ACCESS)); + } + if (o.level < LEVEL_OP) { + return tests; + } else { + return this.wrapInBraces(tests); + } + }; + + In.prototype.compileLoopTest = function(o) { + var fragments, ref, ref3, sub; + ref3 = this.object.cache(o, LEVEL_LIST), sub = ref3[0], ref = ref3[1]; + fragments = [].concat(this.makeCode(utility('indexOf', o) + ".call("), this.array.compileToFragments(o, LEVEL_LIST), this.makeCode(", "), ref, this.makeCode(") " + (this.negated ? '< 0' : '>= 0'))); + if (fragmentsToText(sub) === fragmentsToText(ref)) { + return fragments; + } + fragments = sub.concat(this.makeCode(', '), fragments); + if (o.level < LEVEL_LIST) { + return fragments; + } else { + return this.wrapInBraces(fragments); + } + }; + + In.prototype.toString = function(idt) { + return In.__super__.toString.call(this, idt, this.constructor.name + (this.negated ? '!' : '')); + }; + + return In; + + })(Base); + + exports.Try = Try = (function(superClass1) { + extend1(Try, superClass1); + + function Try(attempt, errorVariable, recovery, ensure) { + this.attempt = attempt; + this.errorVariable = errorVariable; + this.recovery = recovery; + this.ensure = ensure; + } + + Try.prototype.children = ['attempt', 'recovery', 'ensure']; + + Try.prototype.isStatement = YES; + + Try.prototype.jumps = function(o) { + var ref3; + return this.attempt.jumps(o) || ((ref3 = this.recovery) != null ? ref3.jumps(o) : void 0); + }; + + Try.prototype.makeReturn = function(res) { + if (this.attempt) { + this.attempt = this.attempt.makeReturn(res); + } + if (this.recovery) { + this.recovery = this.recovery.makeReturn(res); + } + return this; + }; + + Try.prototype.compileNode = function(o) { + var catchPart, ensurePart, generatedErrorVariableName, message, placeholder, tryPart; + o.indent += TAB; + tryPart = this.attempt.compileToFragments(o, LEVEL_TOP); + catchPart = this.recovery ? (generatedErrorVariableName = o.scope.freeVariable('error', { + reserve: false + }), placeholder = new IdentifierLiteral(generatedErrorVariableName), this.errorVariable ? (message = isUnassignable(this.errorVariable.unwrapAll().value), message ? this.errorVariable.error(message) : void 0, this.recovery.unshift(new Assign(this.errorVariable, placeholder))) : void 0, [].concat(this.makeCode(" catch ("), placeholder.compileToFragments(o), this.makeCode(") {\n"), this.recovery.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab + "}"))) : !(this.ensure || this.recovery) ? (generatedErrorVariableName = o.scope.freeVariable('error', { + reserve: false + }), [this.makeCode(" catch (" + generatedErrorVariableName + ") {}")]) : []; + ensurePart = this.ensure ? [].concat(this.makeCode(" finally {\n"), this.ensure.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab + "}")) : []; + return [].concat(this.makeCode(this.tab + "try {\n"), tryPart, this.makeCode("\n" + this.tab + "}"), catchPart, ensurePart); + }; + + return Try; + + })(Base); + + exports.Throw = Throw = (function(superClass1) { + extend1(Throw, superClass1); + + function Throw(expression) { + this.expression = expression; + } + + Throw.prototype.children = ['expression']; + + Throw.prototype.isStatement = YES; + + Throw.prototype.jumps = NO; + + Throw.prototype.makeReturn = THIS; + + Throw.prototype.compileNode = function(o) { + return [].concat(this.makeCode(this.tab + "throw "), this.expression.compileToFragments(o), this.makeCode(";")); + }; + + return Throw; + + })(Base); + + exports.Existence = Existence = (function(superClass1) { + extend1(Existence, superClass1); + + function Existence(expression) { + this.expression = expression; + } + + Existence.prototype.children = ['expression']; + + Existence.prototype.invert = NEGATE; + + Existence.prototype.compileNode = function(o) { + var cmp, cnj, code, ref3; + this.expression.front = this.front; + code = this.expression.compile(o, LEVEL_OP); + if (this.expression.unwrap() instanceof IdentifierLiteral && !o.scope.check(code)) { + ref3 = this.negated ? ['===', '||'] : ['!==', '&&'], cmp = ref3[0], cnj = ref3[1]; + code = "typeof " + code + " " + cmp + " \"undefined\" " + cnj + " " + code + " " + cmp + " null"; + } else { + code = code + " " + (this.negated ? '==' : '!=') + " null"; + } + return [this.makeCode(o.level <= LEVEL_COND ? code : "(" + code + ")")]; + }; + + return Existence; + + })(Base); + + exports.Parens = Parens = (function(superClass1) { + extend1(Parens, superClass1); + + function Parens(body1) { + this.body = body1; + } + + Parens.prototype.children = ['body']; + + Parens.prototype.unwrap = function() { + return this.body; + }; + + Parens.prototype.isComplex = function() { + return this.body.isComplex(); + }; + + Parens.prototype.compileNode = function(o) { + var bare, expr, fragments; + expr = this.body.unwrap(); + if (expr instanceof Value && expr.isAtomic()) { + expr.front = this.front; + return expr.compileToFragments(o); + } + fragments = expr.compileToFragments(o, LEVEL_PAREN); + bare = o.level < LEVEL_OP && (expr instanceof Op || expr instanceof Call || (expr instanceof For && expr.returns)); + if (bare) { + return fragments; + } else { + return this.wrapInBraces(fragments); + } + }; + + return Parens; + + })(Base); + + exports.StringWithInterpolations = StringWithInterpolations = (function(superClass1) { + extend1(StringWithInterpolations, superClass1); + + function StringWithInterpolations() { + return StringWithInterpolations.__super__.constructor.apply(this, arguments); + } + + StringWithInterpolations.prototype.compileNode = function(o) { + var element, elements, expr, fragments, j, len1, value; + if (!o.inTaggedTemplateCall) { + return StringWithInterpolations.__super__.compileNode.apply(this, arguments); + } + expr = this.body.unwrap(); + elements = []; + expr.traverseChildren(false, function(node) { + if (node instanceof StringLiteral) { + elements.push(node); + return true; + } else if (node instanceof Parens) { + elements.push(node); + return false; + } + return true; + }); + fragments = []; + fragments.push(this.makeCode('`')); + for (j = 0, len1 = elements.length; j < len1; j++) { + element = elements[j]; + if (element instanceof StringLiteral) { + value = element.value.slice(1, -1); + value = value.replace(/(\\*)(`|\$\{)/g, function(match, backslashes, toBeEscaped) { + if (backslashes.length % 2 === 0) { + return backslashes + "\\" + toBeEscaped; + } else { + return match; + } + }); + fragments.push(this.makeCode(value)); + } else { + fragments.push(this.makeCode('${')); + fragments.push.apply(fragments, element.compileToFragments(o, LEVEL_PAREN)); + fragments.push(this.makeCode('}')); + } + } + fragments.push(this.makeCode('`')); + return fragments; + }; + + return StringWithInterpolations; + + })(Parens); + + exports.For = For = (function(superClass1) { + extend1(For, superClass1); + + function For(body, source) { + var ref3; + this.source = source.source, this.guard = source.guard, this.step = source.step, this.name = source.name, this.index = source.index; + this.body = Block.wrap([body]); + this.own = !!source.own; + this.object = !!source.object; + this.from = !!source.from; + if (this.from && this.index) { + this.index.error('cannot use index with for-from'); + } + if (this.own && !this.object) { + source.ownTag.error("cannot use own with for-" + (this.from ? 'from' : 'in')); + } + if (this.object) { + ref3 = [this.index, this.name], this.name = ref3[0], this.index = ref3[1]; + } + if (this.index instanceof Value && !this.index.isAssignable()) { + this.index.error('index cannot be a pattern matching expression'); + } + this.range = this.source instanceof Value && this.source.base instanceof Range && !this.source.properties.length && !this.from; + this.pattern = this.name instanceof Value; + if (this.range && this.index) { + this.index.error('indexes do not apply to range loops'); + } + if (this.range && this.pattern) { + this.name.error('cannot pattern match over range loops'); + } + this.returns = false; + } + + For.prototype.children = ['body', 'source', 'guard', 'step']; + + For.prototype.compileNode = function(o) { + var body, bodyFragments, compare, compareDown, declare, declareDown, defPart, defPartFragments, down, forPartFragments, guardPart, idt1, increment, index, ivar, kvar, kvarAssign, last, lvar, name, namePart, ref, ref3, ref4, resultPart, returnResult, rvar, scope, source, step, stepNum, stepVar, svar, varPart; + body = Block.wrap([this.body]); + ref3 = body.expressions, last = ref3[ref3.length - 1]; + if ((last != null ? last.jumps() : void 0) instanceof Return) { + this.returns = false; + } + source = this.range ? this.source.base : this.source; + scope = o.scope; + if (!this.pattern) { + name = this.name && (this.name.compile(o, LEVEL_LIST)); + } + index = this.index && (this.index.compile(o, LEVEL_LIST)); + if (name && !this.pattern) { + scope.find(name); + } + if (index && !(this.index instanceof Value)) { + scope.find(index); + } + if (this.returns) { + rvar = scope.freeVariable('results'); + } + if (this.from) { + if (this.pattern) { + ivar = scope.freeVariable('x', { + single: true + }); + } + } else { + ivar = (this.object && index) || scope.freeVariable('i', { + single: true + }); + } + kvar = ((this.range || this.from) && name) || index || ivar; + kvarAssign = kvar !== ivar ? kvar + " = " : ""; + if (this.step && !this.range) { + ref4 = this.cacheToCodeFragments(this.step.cache(o, LEVEL_LIST, isComplexOrAssignable)), step = ref4[0], stepVar = ref4[1]; + if (this.step.isNumber()) { + stepNum = Number(stepVar); + } + } + if (this.pattern) { + name = ivar; + } + varPart = ''; + guardPart = ''; + defPart = ''; + idt1 = this.tab + TAB; + if (this.range) { + forPartFragments = source.compileToFragments(merge(o, { + index: ivar, + name: name, + step: this.step, + isComplex: isComplexOrAssignable + })); + } else { + svar = this.source.compile(o, LEVEL_LIST); + if ((name || this.own) && !(this.source.unwrap() instanceof IdentifierLiteral)) { + defPart += "" + this.tab + (ref = scope.freeVariable('ref')) + " = " + svar + ";\n"; + svar = ref; + } + if (name && !this.pattern && !this.from) { + namePart = name + " = " + svar + "[" + kvar + "]"; + } + if (!this.object && !this.from) { + if (step !== stepVar) { + defPart += "" + this.tab + step + ";\n"; + } + down = stepNum < 0; + if (!(this.step && (stepNum != null) && down)) { + lvar = scope.freeVariable('len'); + } + declare = "" + kvarAssign + ivar + " = 0, " + lvar + " = " + svar + ".length"; + declareDown = "" + kvarAssign + ivar + " = " + svar + ".length - 1"; + compare = ivar + " < " + lvar; + compareDown = ivar + " >= 0"; + if (this.step) { + if (stepNum != null) { + if (down) { + compare = compareDown; + declare = declareDown; + } + } else { + compare = stepVar + " > 0 ? " + compare + " : " + compareDown; + declare = "(" + stepVar + " > 0 ? (" + declare + ") : " + declareDown + ")"; + } + increment = ivar + " += " + stepVar; + } else { + increment = "" + (kvar !== ivar ? "++" + ivar : ivar + "++"); + } + forPartFragments = [this.makeCode(declare + "; " + compare + "; " + kvarAssign + increment)]; + } + } + if (this.returns) { + resultPart = "" + this.tab + rvar + " = [];\n"; + returnResult = "\n" + this.tab + "return " + rvar + ";"; + body.makeReturn(rvar); + } + if (this.guard) { + if (body.expressions.length > 1) { + body.expressions.unshift(new If((new Parens(this.guard)).invert(), new StatementLiteral("continue"))); + } else { + if (this.guard) { + body = Block.wrap([new If(this.guard, body)]); + } + } + } + if (this.pattern) { + body.expressions.unshift(new Assign(this.name, this.from ? new IdentifierLiteral(kvar) : new Literal(svar + "[" + kvar + "]"))); + } + defPartFragments = [].concat(this.makeCode(defPart), this.pluckDirectCall(o, body)); + if (namePart) { + varPart = "\n" + idt1 + namePart + ";"; + } + if (this.object) { + forPartFragments = [this.makeCode(kvar + " in " + svar)]; + if (this.own) { + guardPart = "\n" + idt1 + "if (!" + (utility('hasProp', o)) + ".call(" + svar + ", " + kvar + ")) continue;"; + } + } else if (this.from) { + forPartFragments = [this.makeCode(kvar + " of " + svar)]; + } + bodyFragments = body.compileToFragments(merge(o, { + indent: idt1 + }), LEVEL_TOP); + if (bodyFragments && bodyFragments.length > 0) { + bodyFragments = [].concat(this.makeCode("\n"), bodyFragments, this.makeCode("\n")); + } + return [].concat(defPartFragments, this.makeCode("" + (resultPart || '') + this.tab + "for ("), forPartFragments, this.makeCode(") {" + guardPart + varPart), bodyFragments, this.makeCode(this.tab + "}" + (returnResult || ''))); + }; + + For.prototype.pluckDirectCall = function(o, body) { + var base, defs, expr, fn, idx, j, len1, ref, ref3, ref4, ref5, ref6, ref7, ref8, ref9, val; + defs = []; + ref3 = body.expressions; + for (idx = j = 0, len1 = ref3.length; j < len1; idx = ++j) { + expr = ref3[idx]; + expr = expr.unwrapAll(); + if (!(expr instanceof Call)) { + continue; + } + val = (ref4 = expr.variable) != null ? ref4.unwrapAll() : void 0; + if (!((val instanceof Code) || (val instanceof Value && ((ref5 = val.base) != null ? ref5.unwrapAll() : void 0) instanceof Code && val.properties.length === 1 && ((ref6 = (ref7 = val.properties[0].name) != null ? ref7.value : void 0) === 'call' || ref6 === 'apply')))) { + continue; + } + fn = ((ref8 = val.base) != null ? ref8.unwrapAll() : void 0) || val; + ref = new IdentifierLiteral(o.scope.freeVariable('fn')); + base = new Value(ref); + if (val.base) { + ref9 = [base, val], val.base = ref9[0], base = ref9[1]; + } + body.expressions[idx] = new Call(base, expr.args); + defs = defs.concat(this.makeCode(this.tab), new Assign(ref, fn).compileToFragments(o, LEVEL_TOP), this.makeCode(';\n')); + } + return defs; + }; + + return For; + + })(While); + + exports.Switch = Switch = (function(superClass1) { + extend1(Switch, superClass1); + + function Switch(subject, cases, otherwise) { + this.subject = subject; + this.cases = cases; + this.otherwise = otherwise; + } + + Switch.prototype.children = ['subject', 'cases', 'otherwise']; + + Switch.prototype.isStatement = YES; + + Switch.prototype.jumps = function(o) { + var block, conds, j, jumpNode, len1, ref3, ref4, ref5; + if (o == null) { + o = { + block: true + }; + } + ref3 = this.cases; + for (j = 0, len1 = ref3.length; j < len1; j++) { + ref4 = ref3[j], conds = ref4[0], block = ref4[1]; + if (jumpNode = block.jumps(o)) { + return jumpNode; + } + } + return (ref5 = this.otherwise) != null ? ref5.jumps(o) : void 0; + }; + + Switch.prototype.makeReturn = function(res) { + var j, len1, pair, ref3, ref4; + ref3 = this.cases; + for (j = 0, len1 = ref3.length; j < len1; j++) { + pair = ref3[j]; + pair[1].makeReturn(res); + } + if (res) { + this.otherwise || (this.otherwise = new Block([new Literal('void 0')])); + } + if ((ref4 = this.otherwise) != null) { + ref4.makeReturn(res); + } + return this; + }; + + Switch.prototype.compileNode = function(o) { + var block, body, cond, conditions, expr, fragments, i, idt1, idt2, j, k, len1, len2, ref3, ref4, ref5; + idt1 = o.indent + TAB; + idt2 = o.indent = idt1 + TAB; + fragments = [].concat(this.makeCode(this.tab + "switch ("), (this.subject ? this.subject.compileToFragments(o, LEVEL_PAREN) : this.makeCode("false")), this.makeCode(") {\n")); + ref3 = this.cases; + for (i = j = 0, len1 = ref3.length; j < len1; i = ++j) { + ref4 = ref3[i], conditions = ref4[0], block = ref4[1]; + ref5 = flatten([conditions]); + for (k = 0, len2 = ref5.length; k < len2; k++) { + cond = ref5[k]; + if (!this.subject) { + cond = cond.invert(); + } + fragments = fragments.concat(this.makeCode(idt1 + "case "), cond.compileToFragments(o, LEVEL_PAREN), this.makeCode(":\n")); + } + if ((body = block.compileToFragments(o, LEVEL_TOP)).length > 0) { + fragments = fragments.concat(body, this.makeCode('\n')); + } + if (i === this.cases.length - 1 && !this.otherwise) { + break; + } + expr = this.lastNonComment(block.expressions); + if (expr instanceof Return || (expr instanceof Literal && expr.jumps() && expr.value !== 'debugger')) { + continue; + } + fragments.push(cond.makeCode(idt2 + 'break;\n')); + } + if (this.otherwise && this.otherwise.expressions.length) { + fragments.push.apply(fragments, [this.makeCode(idt1 + "default:\n")].concat(slice.call(this.otherwise.compileToFragments(o, LEVEL_TOP)), [this.makeCode("\n")])); + } + fragments.push(this.makeCode(this.tab + '}')); + return fragments; + }; + + return Switch; + + })(Base); + + exports.If = If = (function(superClass1) { + extend1(If, superClass1); + + function If(condition, body1, options) { + this.body = body1; + if (options == null) { + options = {}; + } + this.condition = options.type === 'unless' ? condition.invert() : condition; + this.elseBody = null; + this.isChain = false; + this.soak = options.soak; + } + + If.prototype.children = ['condition', 'body', 'elseBody']; + + If.prototype.bodyNode = function() { + var ref3; + return (ref3 = this.body) != null ? ref3.unwrap() : void 0; + }; + + If.prototype.elseBodyNode = function() { + var ref3; + return (ref3 = this.elseBody) != null ? ref3.unwrap() : void 0; + }; + + If.prototype.addElse = function(elseBody) { + if (this.isChain) { + this.elseBodyNode().addElse(elseBody); + } else { + this.isChain = elseBody instanceof If; + this.elseBody = this.ensureBlock(elseBody); + this.elseBody.updateLocationDataIfMissing(elseBody.locationData); + } + return this; + }; + + If.prototype.isStatement = function(o) { + var ref3; + return (o != null ? o.level : void 0) === LEVEL_TOP || this.bodyNode().isStatement(o) || ((ref3 = this.elseBodyNode()) != null ? ref3.isStatement(o) : void 0); + }; + + If.prototype.jumps = function(o) { + var ref3; + return this.body.jumps(o) || ((ref3 = this.elseBody) != null ? ref3.jumps(o) : void 0); + }; + + If.prototype.compileNode = function(o) { + if (this.isStatement(o)) { + return this.compileStatement(o); + } else { + return this.compileExpression(o); + } + }; + + If.prototype.makeReturn = function(res) { + if (res) { + this.elseBody || (this.elseBody = new Block([new Literal('void 0')])); + } + this.body && (this.body = new Block([this.body.makeReturn(res)])); + this.elseBody && (this.elseBody = new Block([this.elseBody.makeReturn(res)])); + return this; + }; + + If.prototype.ensureBlock = function(node) { + if (node instanceof Block) { + return node; + } else { + return new Block([node]); + } + }; + + If.prototype.compileStatement = function(o) { + var answer, body, child, cond, exeq, ifPart, indent; + child = del(o, 'chainChild'); + exeq = del(o, 'isExistentialEquals'); + if (exeq) { + return new If(this.condition.invert(), this.elseBodyNode(), { + type: 'if' + }).compileToFragments(o); + } + indent = o.indent + TAB; + cond = this.condition.compileToFragments(o, LEVEL_PAREN); + body = this.ensureBlock(this.body).compileToFragments(merge(o, { + indent: indent + })); + ifPart = [].concat(this.makeCode("if ("), cond, this.makeCode(") {\n"), body, this.makeCode("\n" + this.tab + "}")); + if (!child) { + ifPart.unshift(this.makeCode(this.tab)); + } + if (!this.elseBody) { + return ifPart; + } + answer = ifPart.concat(this.makeCode(' else ')); + if (this.isChain) { + o.chainChild = true; + answer = answer.concat(this.elseBody.unwrap().compileToFragments(o, LEVEL_TOP)); + } else { + answer = answer.concat(this.makeCode("{\n"), this.elseBody.compileToFragments(merge(o, { + indent: indent + }), LEVEL_TOP), this.makeCode("\n" + this.tab + "}")); + } + return answer; + }; + + If.prototype.compileExpression = function(o) { + var alt, body, cond, fragments; + cond = this.condition.compileToFragments(o, LEVEL_COND); + body = this.bodyNode().compileToFragments(o, LEVEL_LIST); + alt = this.elseBodyNode() ? this.elseBodyNode().compileToFragments(o, LEVEL_LIST) : [this.makeCode('void 0')]; + fragments = cond.concat(this.makeCode(" ? "), body, this.makeCode(" : "), alt); + if (o.level >= LEVEL_COND) { + return this.wrapInBraces(fragments); + } else { + return fragments; + } + }; + + If.prototype.unfoldSoak = function() { + return this.soak && this; + }; + + return If; + + })(Base); + + UTILITIES = { + extend: function(o) { + return "function(child, parent) { for (var key in parent) { if (" + (utility('hasProp', o)) + ".call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = 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 = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }"; + }, + modulo: function() { + return "function(a, b) { return (+a % (b = +b) + b) % b; }"; + }, + hasProp: function() { + return '{}.hasOwnProperty'; + }, + slice: function() { + return '[].slice'; + } + }; + + LEVEL_TOP = 1; + + LEVEL_PAREN = 2; + + LEVEL_LIST = 3; + + LEVEL_COND = 4; + + LEVEL_OP = 5; + + LEVEL_ACCESS = 6; + + TAB = ' '; + + SIMPLENUM = /^[+-]?\d+$/; + + utility = function(name, o) { + var ref, root; + root = o.scope.root; + if (name in root.utilities) { + return root.utilities[name]; + } else { + ref = root.freeVariable(name); + root.assign(ref, UTILITIES[name](o)); + return root.utilities[name] = ref; + } + }; + + multident = function(code, tab) { + code = code.replace(/\n/g, '$&' + tab); + return code.replace(/\s+$/, ''); + }; + + isLiteralArguments = function(node) { + return node instanceof IdentifierLiteral && node.value === 'arguments'; + }; + + isLiteralThis = function(node) { + return node instanceof ThisLiteral || (node instanceof Code && node.bound) || node instanceof SuperCall; + }; + + isComplexOrAssignable = function(node) { + return node.isComplex() || (typeof node.isAssignable === "function" ? node.isAssignable() : void 0); + }; + + unfoldSoak = function(o, parent, name) { + var ifn; + if (!(ifn = parent[name].unfoldSoak(o))) { + return; + } + parent[name] = ifn.body; + ifn.body = new Value(parent); + return ifn; + }; + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/optparse.js b/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/optparse.js new file mode 100644 index 00000000..e86328a0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/optparse.js @@ -0,0 +1,139 @@ +// Generated by CoffeeScript 1.12.5 +(function() { + var LONG_FLAG, MULTI_FLAG, OPTIONAL, OptionParser, SHORT_FLAG, buildRule, buildRules, normalizeArguments, repeat; + + repeat = require('./helpers').repeat; + + exports.OptionParser = OptionParser = (function() { + function OptionParser(rules, banner) { + this.banner = banner; + this.rules = buildRules(rules); + } + + OptionParser.prototype.parse = function(args) { + var arg, i, isOption, j, k, len, len1, matchedRule, options, originalArgs, pos, ref, rule, seenNonOptionArg, skippingArgument, value; + options = { + "arguments": [] + }; + skippingArgument = false; + originalArgs = args; + args = normalizeArguments(args); + for (i = j = 0, len = args.length; j < len; i = ++j) { + arg = args[i]; + if (skippingArgument) { + skippingArgument = false; + continue; + } + if (arg === '--') { + pos = originalArgs.indexOf('--'); + options["arguments"] = options["arguments"].concat(originalArgs.slice(pos + 1)); + break; + } + isOption = !!(arg.match(LONG_FLAG) || arg.match(SHORT_FLAG)); + seenNonOptionArg = options["arguments"].length > 0; + if (!seenNonOptionArg) { + matchedRule = false; + ref = this.rules; + for (k = 0, len1 = ref.length; k < len1; k++) { + rule = ref[k]; + if (rule.shortFlag === arg || rule.longFlag === arg) { + value = true; + if (rule.hasArgument) { + skippingArgument = true; + value = args[i + 1]; + } + options[rule.name] = rule.isList ? (options[rule.name] || []).concat(value) : value; + matchedRule = true; + break; + } + } + if (isOption && !matchedRule) { + throw new Error("unrecognized option: " + arg); + } + } + if (seenNonOptionArg || !isOption) { + options["arguments"].push(arg); + } + } + return options; + }; + + OptionParser.prototype.help = function() { + var j, len, letPart, lines, ref, rule, spaces; + lines = []; + if (this.banner) { + lines.unshift(this.banner + "\n"); + } + ref = this.rules; + for (j = 0, len = ref.length; j < len; j++) { + rule = ref[j]; + spaces = 15 - rule.longFlag.length; + spaces = spaces > 0 ? repeat(' ', spaces) : ''; + letPart = rule.shortFlag ? rule.shortFlag + ', ' : ' '; + lines.push(' ' + letPart + rule.longFlag + spaces + rule.description); + } + return "\n" + (lines.join('\n')) + "\n"; + }; + + return OptionParser; + + })(); + + LONG_FLAG = /^(--\w[\w\-]*)/; + + SHORT_FLAG = /^(-\w)$/; + + MULTI_FLAG = /^-(\w{2,})/; + + OPTIONAL = /\[(\w+(\*?))\]/; + + buildRules = function(rules) { + var j, len, results, tuple; + results = []; + for (j = 0, len = rules.length; j < len; j++) { + tuple = rules[j]; + if (tuple.length < 3) { + tuple.unshift(null); + } + results.push(buildRule.apply(null, tuple)); + } + return results; + }; + + buildRule = function(shortFlag, longFlag, description, options) { + var match; + if (options == null) { + options = {}; + } + match = longFlag.match(OPTIONAL); + longFlag = longFlag.match(LONG_FLAG)[1]; + return { + name: longFlag.substr(2), + shortFlag: shortFlag, + longFlag: longFlag, + description: description, + hasArgument: !!(match && match[1]), + isList: !!(match && match[2]) + }; + }; + + normalizeArguments = function(args) { + var arg, j, k, l, len, len1, match, ref, result; + args = args.slice(0); + result = []; + for (j = 0, len = args.length; j < len; j++) { + arg = args[j]; + if (match = arg.match(MULTI_FLAG)) { + ref = match[1].split(''); + for (k = 0, len1 = ref.length; k < len1; k++) { + l = ref[k]; + result.push('-' + l); + } + } else { + result.push(arg); + } + } + return result; + }; + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/parser.js b/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/parser.js new file mode 100755 index 00000000..c5fdf934 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/parser.js @@ -0,0 +1,888 @@ +/* parser generated by jison 0.4.17 */ +/* + Returns a Parser object of the following structure: + + Parser: { + yy: {} + } + + Parser.prototype: { + yy: {}, + trace: function(), + symbols_: {associative list: name ==> number}, + terminals_: {associative list: number ==> name}, + productions_: [...], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$), + table: [...], + defaultActions: {...}, + parseError: function(str, hash), + parse: function(input), + + lexer: { + EOF: 1, + parseError: function(str, hash), + setInput: function(input), + input: function(), + unput: function(str), + more: function(), + less: function(n), + pastInput: function(), + upcomingInput: function(), + showPosition: function(), + test_match: function(regex_match_array, rule_index), + next: function(), + lex: function(), + begin: function(condition), + popState: function(), + _currentRules: function(), + topState: function(), + pushState: function(condition), + + options: { + ranges: boolean (optional: true ==> token location info will include a .range[] member) + flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match) + backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code) + }, + + performAction: function(yy, yy_, $avoiding_name_collisions, YY_START), + rules: [...], + conditions: {associative list: name ==> set}, + } + } + + + token location info (@$, _$, etc.): { + first_line: n, + last_line: n, + first_column: n, + last_column: n, + range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based) + } + + + the parseError function receives a 'hash' object with these members for lexer and parser errors: { + text: (matched text) + token: (the produced terminal token, if any) + line: (yylineno) + } + while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: { + loc: (yylloc) + expected: (string describing the set of expected tokens) + recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error) + } +*/ +var parser = (function(){ +var o=function(k,v,o,l){for(o=o||{},l=k.length;l--;o[k[l]]=v);return o},$V0=[1,22],$V1=[1,25],$V2=[1,83],$V3=[1,79],$V4=[1,84],$V5=[1,85],$V6=[1,81],$V7=[1,82],$V8=[1,56],$V9=[1,58],$Va=[1,59],$Vb=[1,60],$Vc=[1,61],$Vd=[1,62],$Ve=[1,49],$Vf=[1,50],$Vg=[1,32],$Vh=[1,68],$Vi=[1,69],$Vj=[1,78],$Vk=[1,47],$Vl=[1,51],$Vm=[1,52],$Vn=[1,67],$Vo=[1,65],$Vp=[1,66],$Vq=[1,64],$Vr=[1,42],$Vs=[1,48],$Vt=[1,63],$Vu=[1,73],$Vv=[1,74],$Vw=[1,75],$Vx=[1,76],$Vy=[1,46],$Vz=[1,72],$VA=[1,34],$VB=[1,35],$VC=[1,36],$VD=[1,37],$VE=[1,38],$VF=[1,39],$VG=[1,86],$VH=[1,6,32,42,131],$VI=[1,101],$VJ=[1,89],$VK=[1,88],$VL=[1,87],$VM=[1,90],$VN=[1,91],$VO=[1,92],$VP=[1,93],$VQ=[1,94],$VR=[1,95],$VS=[1,96],$VT=[1,97],$VU=[1,98],$VV=[1,99],$VW=[1,100],$VX=[1,104],$VY=[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],$VZ=[2,166],$V_=[1,110],$V$=[1,111],$V01=[1,112],$V11=[1,113],$V21=[1,115],$V31=[1,116],$V41=[1,109],$V51=[1,6,32,42,131,133,135,139,156],$V61=[2,27],$V71=[1,123],$V81=[1,121],$V91=[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],$Va1=[2,94],$Vb1=[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],$Vc1=[2,73],$Vd1=[1,128],$Ve1=[1,133],$Vf1=[1,134],$Vg1=[1,136],$Vh1=[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],$Vi1=[2,91],$Vj1=[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],$Vk1=[2,63],$Vl1=[1,166],$Vm1=[1,178],$Vn1=[1,180],$Vo1=[1,175],$Vp1=[1,182],$Vq1=[1,184],$Vr1=[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],$Vs1=[2,110],$Vt1=[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],$Vu1=[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],$Vv1=[40,41,114],$Vw1=[1,241],$Vx1=[1,240],$Vy1=[1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,134,135,139,140,156],$Vz1=[2,71],$VA1=[1,250],$VB1=[6,31,32,65,70],$VC1=[6,31,32,55,65,70,73],$VD1=[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],$VE1=[40,41,82,83,84,85,87,90,113,114],$VF1=[1,269],$VG1=[2,62],$VH1=[1,279],$VI1=[1,281],$VJ1=[1,286],$VK1=[1,288],$VL1=[2,187],$VM1=[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],$VN1=[1,297],$VO1=[6,31,32,70,115,120],$VP1=[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],$VQ1=[1,6,31,32,42,65,70,73,89,94,115,120,122,131,140,156],$VR1=[1,6,31,32,42,65,70,73,89,94,115,120,122,131,134,140,156],$VS1=[146,147,148],$VT1=[70,146,147,148],$VU1=[6,31,94],$VV1=[1,311],$VW1=[6,31,32,70,94],$VX1=[6,31,32,58,70,94],$VY1=[6,31,32,55,58,70,94],$VZ1=[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],$V_1=[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],$V$1=[2,176],$V02=[6,31,32],$V12=[2,72],$V22=[1,323],$V32=[1,324],$V42=[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],$V52=[32,151,153],$V62=[1,6,32,42,65,70,73,89,94,115,120,122,131,134,140,156],$V72=[1,350],$V82=[1,356],$V92=[1,6,32,42,131,156],$Va2=[2,86],$Vb2=[1,367],$Vc2=[1,368],$Vd2=[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],$Ve2=[1,6,31,32,42,65,70,73,89,94,115,120,122,131,133,135,139,140,156],$Vf2=[1,381],$Vg2=[1,382],$Vh2=[6,31,32,94],$Vi2=[6,31,32,70],$Vj2=[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],$Vk2=[31,70],$Vl2=[1,408],$Vm2=[1,409],$Vn2=[1,415],$Vo2=[1,416]; +var parser = {trace: function trace() { }, +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,"=":55,"AssignObj":56,"ObjAssignable":57,":":58,"SimpleObjAssignable":59,"ThisProperty":60,"RETURN":61,"HERECOMMENT":62,"PARAM_START":63,"ParamList":64,"PARAM_END":65,"FuncGlyph":66,"->":67,"=>":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,"&":168,"^":169,"|":170,"&&":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:"=",58:":",61:"RETURN",62:"HERECOMMENT",63:"PARAM_START",65:"PARAM_END",67:"->",68:"=>",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:"&",169:"^",170:"|",171:"&&",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 anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { +/* this == yyval */ + +var $0 = $$.length - 1; +switch (yystate) { +case 1: +return this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Block); +break; +case 2: +return this.$ = $$[$0]; +break; +case 3: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(yy.Block.wrap([$$[$0]])); +break; +case 4: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].push($$[$0])); +break; +case 5: +this.$ = $$[$0-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.$ = $$[$0]; +break; +case 11: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.StatementLiteral($$[$0])); +break; +case 27: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Op($$[$0], new yy.Value(new yy.Literal('')))); +break; +case 28: case 249: case 250: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op($$[$0-1], $$[$0])); +break; +case 29: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-2].concat($$[$0-1]), $$[$0])); +break; +case 30: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Block); +break; +case 31: case 105: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-1]); +break; +case 32: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.IdentifierLiteral($$[$0])); +break; +case 33: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.PropertyName($$[$0])); +break; +case 34: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.NumberLiteral($$[$0])); +break; +case 36: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.StringLiteral($$[$0])); +break; +case 37: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.StringWithInterpolations($$[$0-1])); +break; +case 38: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.RegexLiteral($$[$0])); +break; +case 39: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.RegexWithInterpolations($$[$0-1].args)); +break; +case 41: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.PassthroughLiteral($$[$0])); +break; +case 43: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.UndefinedLiteral); +break; +case 44: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.NullLiteral); +break; +case 45: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.BooleanLiteral($$[$0])); +break; +case 46: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.InfinityLiteral($$[$0])); +break; +case 47: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.NaNLiteral); +break; +case 48: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign($$[$0-2], $$[$0])); +break; +case 49: +this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Assign($$[$0-3], $$[$0])); +break; +case 50: +this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign($$[$0-4], $$[$0-1])); +break; +case 51: case 87: case 92: case 93: case 95: case 96: case 97: case 222: case 223: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); +break; +case 52: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign(yy.addLocationDataFn(_$[$0-2])(new yy.Value($$[$0-2])), $$[$0], 'object', { + operatorToken: yy.addLocationDataFn(_$[$0-1])(new yy.Literal($$[$0-1])) + })); +break; +case 53: +this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign(yy.addLocationDataFn(_$[$0-4])(new yy.Value($$[$0-4])), $$[$0-1], 'object', { + operatorToken: yy.addLocationDataFn(_$[$0-3])(new yy.Literal($$[$0-3])) + })); +break; +case 54: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign(yy.addLocationDataFn(_$[$0-2])(new yy.Value($$[$0-2])), $$[$0], null, { + operatorToken: yy.addLocationDataFn(_$[$0-1])(new yy.Literal($$[$0-1])) + })); +break; +case 55: +this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign(yy.addLocationDataFn(_$[$0-4])(new yy.Value($$[$0-4])), $$[$0-1], null, { + operatorToken: yy.addLocationDataFn(_$[$0-3])(new yy.Literal($$[$0-3])) + })); +break; +case 62: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Return($$[$0])); +break; +case 63: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Return); +break; +case 64: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.YieldReturn($$[$0])); +break; +case 65: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.YieldReturn); +break; +case 66: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Comment($$[$0])); +break; +case 67: +this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Code($$[$0-3], $$[$0], $$[$0-1])); +break; +case 68: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Code([], $$[$0], $$[$0-1])); +break; +case 69: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('func'); +break; +case 70: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('boundfunc'); +break; +case 73: case 110: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([]); +break; +case 74: case 111: case 130: case 150: case 182: case 224: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]); +break; +case 75: case 112: case 131: case 151: case 183: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0])); +break; +case 76: case 113: case 132: case 152: case 184: +this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0])); +break; +case 77: case 114: case 134: case 154: case 186: +this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2])); +break; +case 78: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Param($$[$0])); +break; +case 79: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Param($$[$0-1], null, true)); +break; +case 80: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Param($$[$0-2], $$[$0])); +break; +case 81: case 189: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Expansion); +break; +case 86: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Splat($$[$0-1])); +break; +case 88: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].add($$[$0])); +break; +case 89: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Value($$[$0-1], [].concat($$[$0]))); +break; +case 99: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Access($$[$0])); +break; +case 100: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Access($$[$0], 'soak')); +break; +case 101: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Access(new yy.PropertyName('prototype'))), yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))]); +break; +case 102: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Access(new yy.PropertyName('prototype'), 'soak')), yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))]); +break; +case 103: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Access(new yy.PropertyName('prototype'))); +break; +case 106: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(yy.extend($$[$0], { + soak: true + })); +break; +case 107: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Index($$[$0])); +break; +case 108: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Slice($$[$0])); +break; +case 109: +this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Obj($$[$0-2], $$[$0-3].generated)); +break; +case 115: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Class); +break; +case 116: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Class(null, null, $$[$0])); +break; +case 117: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Class(null, $$[$0])); +break; +case 118: +this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Class(null, $$[$0-1], $$[$0])); +break; +case 119: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Class($$[$0])); +break; +case 120: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Class($$[$0-1], null, $$[$0])); +break; +case 121: +this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Class($$[$0-2], $$[$0])); +break; +case 122: +this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Class($$[$0-3], $$[$0-1], $$[$0])); +break; +case 123: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.ImportDeclaration(null, $$[$0])); +break; +case 124: +this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.ImportDeclaration(new yy.ImportClause($$[$0-2], null), $$[$0])); +break; +case 125: +this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.ImportDeclaration(new yy.ImportClause(null, $$[$0-2]), $$[$0])); +break; +case 126: +this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.ImportDeclaration(new yy.ImportClause(null, new yy.ImportSpecifierList([])), $$[$0])); +break; +case 127: +this.$ = yy.addLocationDataFn(_$[$0-6], _$[$0])(new yy.ImportDeclaration(new yy.ImportClause(null, new yy.ImportSpecifierList($$[$0-4])), $$[$0])); +break; +case 128: +this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])(new yy.ImportDeclaration(new yy.ImportClause($$[$0-4], $$[$0-2]), $$[$0])); +break; +case 129: +this.$ = yy.addLocationDataFn(_$[$0-8], _$[$0])(new yy.ImportDeclaration(new yy.ImportClause($$[$0-7], new yy.ImportSpecifierList($$[$0-4])), $$[$0])); +break; +case 133: case 153: case 169: case 185: +this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-2]); +break; +case 135: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.ImportSpecifier($$[$0])); +break; +case 136: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.ImportSpecifier($$[$0-2], $$[$0])); +break; +case 137: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.ImportSpecifier(new yy.Literal($$[$0]))); +break; +case 138: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.ImportSpecifier(new yy.Literal($$[$0-2]), $$[$0])); +break; +case 139: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.ImportDefaultSpecifier($$[$0])); +break; +case 140: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.ImportNamespaceSpecifier(new yy.Literal($$[$0-2]), $$[$0])); +break; +case 141: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.ExportNamedDeclaration(new yy.ExportSpecifierList([]))); +break; +case 142: +this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.ExportNamedDeclaration(new yy.ExportSpecifierList($$[$0-2]))); +break; +case 143: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.ExportNamedDeclaration($$[$0])); +break; +case 144: +this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.ExportNamedDeclaration(new yy.Assign($$[$0-2], $$[$0], null, { + moduleDeclaration: 'export' + }))); +break; +case 145: +this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.ExportNamedDeclaration(new yy.Assign($$[$0-3], $$[$0], null, { + moduleDeclaration: 'export' + }))); +break; +case 146: +this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])(new yy.ExportNamedDeclaration(new yy.Assign($$[$0-4], $$[$0-1], null, { + moduleDeclaration: 'export' + }))); +break; +case 147: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.ExportDefaultDeclaration($$[$0])); +break; +case 148: +this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.ExportAllDeclaration(new yy.Literal($$[$0-2]), $$[$0])); +break; +case 149: +this.$ = yy.addLocationDataFn(_$[$0-6], _$[$0])(new yy.ExportNamedDeclaration(new yy.ExportSpecifierList($$[$0-4]), $$[$0])); +break; +case 155: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.ExportSpecifier($$[$0])); +break; +case 156: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.ExportSpecifier($$[$0-2], $$[$0])); +break; +case 157: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.ExportSpecifier($$[$0-2], new yy.Literal($$[$0]))); +break; +case 158: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.ExportSpecifier(new yy.Literal($$[$0]))); +break; +case 159: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.ExportSpecifier(new yy.Literal($$[$0-2]), $$[$0])); +break; +case 160: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.TaggedTemplateCall($$[$0-2], $$[$0], $$[$0-1])); +break; +case 161: case 162: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Call($$[$0-2], $$[$0], $$[$0-1])); +break; +case 164: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.SuperCall); +break; +case 165: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.SuperCall($$[$0])); +break; +case 166: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(false); +break; +case 167: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(true); +break; +case 168: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([]); +break; +case 170: case 171: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value(new yy.ThisLiteral)); +break; +case 172: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Value(yy.addLocationDataFn(_$[$0-1])(new yy.ThisLiteral), [yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))], 'this')); +break; +case 173: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Arr([])); +break; +case 174: +this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Arr($$[$0-2])); +break; +case 175: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('inclusive'); +break; +case 176: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('exclusive'); +break; +case 177: +this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Range($$[$0-3], $$[$0-1], $$[$0-2])); +break; +case 178: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Range($$[$0-2], $$[$0], $$[$0-1])); +break; +case 179: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Range($$[$0-1], null, $$[$0])); +break; +case 180: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Range(null, $$[$0], $$[$0-1])); +break; +case 181: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Range(null, null, $$[$0])); +break; +case 191: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([].concat($$[$0-2], $$[$0])); +break; +case 192: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Try($$[$0])); +break; +case 193: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Try($$[$0-1], $$[$0][0], $$[$0][1])); +break; +case 194: +this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Try($$[$0-2], null, null, $$[$0])); +break; +case 195: +this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Try($$[$0-3], $$[$0-2][0], $$[$0-2][1], $$[$0])); +break; +case 196: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([$$[$0-1], $$[$0]]); +break; +case 197: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Value($$[$0-1])), $$[$0]]); +break; +case 198: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([null, $$[$0]]); +break; +case 199: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Throw($$[$0])); +break; +case 200: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Parens($$[$0-1])); +break; +case 201: +this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Parens($$[$0-2])); +break; +case 202: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While($$[$0])); +break; +case 203: +this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.While($$[$0-2], { + guard: $$[$0] + })); +break; +case 204: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While($$[$0], { + invert: true + })); +break; +case 205: +this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.While($$[$0-2], { + invert: true, + guard: $$[$0] + })); +break; +case 206: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].addBody($$[$0])); +break; +case 207: case 208: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0].addBody(yy.addLocationDataFn(_$[$0-1])(yy.Block.wrap([$$[$0-1]])))); +break; +case 209: +this.$ = yy.addLocationDataFn(_$[$0], _$[$0])($$[$0]); +break; +case 210: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While(yy.addLocationDataFn(_$[$0-1])(new yy.BooleanLiteral('true'))).addBody($$[$0])); +break; +case 211: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While(yy.addLocationDataFn(_$[$0-1])(new yy.BooleanLiteral('true'))).addBody(yy.addLocationDataFn(_$[$0])(yy.Block.wrap([$$[$0]])))); +break; +case 212: case 213: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0-1], $$[$0])); +break; +case 214: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0], $$[$0-1])); +break; +case 215: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({ + source: yy.addLocationDataFn(_$[$0])(new yy.Value($$[$0])) + }); +break; +case 216: +this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({ + source: yy.addLocationDataFn(_$[$0-2])(new yy.Value($$[$0-2])), + step: $$[$0] + }); +break; +case 217: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])((function () { + $$[$0].own = $$[$0-1].own; + $$[$0].ownTag = $$[$0-1].ownTag; + $$[$0].name = $$[$0-1][0]; + $$[$0].index = $$[$0-1][1]; + return $$[$0]; + }())); +break; +case 218: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0]); +break; +case 219: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () { + $$[$0].own = true; + $$[$0].ownTag = yy.addLocationDataFn(_$[$0-1])(new yy.Literal($$[$0-1])); + return $$[$0]; + }())); +break; +case 225: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([$$[$0-2], $$[$0]]); +break; +case 226: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({ + source: $$[$0] + }); +break; +case 227: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({ + source: $$[$0], + object: true + }); +break; +case 228: +this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({ + source: $$[$0-2], + guard: $$[$0] + }); +break; +case 229: +this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({ + source: $$[$0-2], + guard: $$[$0], + object: true + }); +break; +case 230: +this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({ + source: $$[$0-2], + step: $$[$0] + }); +break; +case 231: +this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])({ + source: $$[$0-4], + guard: $$[$0-2], + step: $$[$0] + }); +break; +case 232: +this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])({ + source: $$[$0-4], + step: $$[$0-2], + guard: $$[$0] + }); +break; +case 233: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({ + source: $$[$0], + from: true + }); +break; +case 234: +this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({ + source: $$[$0-2], + guard: $$[$0], + from: true + }); +break; +case 235: +this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Switch($$[$0-3], $$[$0-1])); +break; +case 236: +this.$ = yy.addLocationDataFn(_$[$0-6], _$[$0])(new yy.Switch($$[$0-5], $$[$0-3], $$[$0-1])); +break; +case 237: +this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Switch(null, $$[$0-1])); +break; +case 238: +this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])(new yy.Switch(null, $$[$0-3], $$[$0-1])); +break; +case 240: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].concat($$[$0])); +break; +case 241: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([[$$[$0-1], $$[$0]]]); +break; +case 242: +this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])([[$$[$0-2], $$[$0-1]]]); +break; +case 243: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0-1], $$[$0], { + type: $$[$0-2] + })); +break; +case 244: +this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])($$[$0-4].addElse(yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0-1], $$[$0], { + type: $$[$0-2] + })))); +break; +case 246: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].addElse($$[$0])); +break; +case 247: case 248: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0], yy.addLocationDataFn(_$[$0-2])(yy.Block.wrap([$$[$0-2]])), { + type: $$[$0-1], + statement: true + })); +break; +case 251: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('-', $$[$0])); +break; +case 252: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('+', $$[$0])); +break; +case 253: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('--', $$[$0])); +break; +case 254: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('++', $$[$0])); +break; +case 255: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('--', $$[$0-1], null, true)); +break; +case 256: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('++', $$[$0-1], null, true)); +break; +case 257: +this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Existence($$[$0-1])); +break; +case 258: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op('+', $$[$0-2], $$[$0])); +break; +case 259: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op('-', $$[$0-2], $$[$0])); +break; +case 260: case 261: case 262: case 263: case 264: case 265: case 266: case 267: case 268: case 269: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0])); +break; +case 270: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () { + if ($$[$0-1].charAt(0) === '!') { + return new yy.Op($$[$0-1].slice(1), $$[$0-2], $$[$0]).invert(); + } else { + return new yy.Op($$[$0-1], $$[$0-2], $$[$0]); + } + }())); +break; +case 271: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign($$[$0-2], $$[$0], $$[$0-1])); +break; +case 272: +this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign($$[$0-4], $$[$0-1], $$[$0-3])); +break; +case 273: +this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Assign($$[$0-3], $$[$0], $$[$0-2])); +break; +case 274: +this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Extends($$[$0-2], $$[$0])); +break; +} +}, +table: [{1:[2,1],3:1,4:2,5:3,7:4,8:5,9:6,10:20,11:21,12:$V0,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:$V1,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{1:[3]},{1:[2,2],6:$VG},o($VH,[2,3]),o($VH,[2,6],{141:77,132:102,138:103,133:$Vu,135:$Vv,139:$Vx,156:$VI,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),o($VH,[2,7],{141:77,132:105,138:106,133:$Vu,135:$Vv,139:$Vx,156:$VX}),o($VH,[2,8]),o($VY,[2,14],{109:107,78:108,86:114,40:$VZ,41:$VZ,114:$VZ,82:$V_,83:$V$,84:$V01,85:$V11,87:$V21,90:$V31,113:$V41}),o($VY,[2,15],{86:114,109:117,78:118,82:$V_,83:$V$,84:$V01,85:$V11,87:$V21,90:$V31,113:$V41,114:$VZ}),o($VY,[2,16]),o($VY,[2,17]),o($VY,[2,18]),o($VY,[2,19]),o($VY,[2,20]),o($VY,[2,21]),o($VY,[2,22]),o($VY,[2,23]),o($VY,[2,24]),o($VY,[2,25]),o($VY,[2,26]),o($V51,[2,9]),o($V51,[2,10]),o($V51,[2,11]),o($V51,[2,12]),o($V51,[2,13]),o([1,6,32,42,131,133,135,139,156,163,164,165,166,167,168,169,170,171,172,173,174],$V61,{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:$V0,28:$V71,29:$V81,34:$V2,38:$V3,40:$V4,41:$V5,44:$V6,45:$V7,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,61:[1,119],62:$Vf,63:$Vg,67:$Vh,68:$Vi,92:$Vj,95:$Vk,97:$Vl,105:$Vm,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,137:$Vw,149:$Vy,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF}),o($V91,$Va1,{55:[1,124]}),o($V91,[2,95]),o($V91,[2,96]),o($V91,[2,97]),o($V91,[2,98]),o($Vb1,[2,163]),o([6,31,65,70],$Vc1,{64:125,71:126,72:127,33:129,60:130,74:131,75:132,34:$V2,73:$Vd1,92:$Vj,118:$Ve1,119:$Vf1}),{30:135,31:$Vg1},{7:137,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{7:138,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{7:139,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{7:140,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{15:142,16:143,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:144,60:71,74:53,75:54,77:141,79:28,80:29,81:30,92:$Vj,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,130:$Vt},{15:142,16:143,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:144,60:71,74:53,75:54,77:145,79:28,80:29,81:30,92:$Vj,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,130:$Vt},o($Vh1,$Vi1,{96:[1,149],161:[1,146],162:[1,147],175:[1,148]}),o($VY,[2,245],{151:[1,150]}),{30:151,31:$Vg1},{30:152,31:$Vg1},o($VY,[2,209]),{30:153,31:$Vg1},{7:154,8:122,10:20,11:21,12:$V0,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:$V71,31:[1,155],33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},o($Vj1,[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:$Vg1,34:$V2,38:$V3,40:$V4,41:$V5,44:$V6,45:$V7,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,92:$Vj,96:[1,157],112:$Vn,117:$Vo,118:$Vp,119:$Vq,130:$Vt}),{7:159,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},o($V51,$Vk1,{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:$V0,28:$V71,34:$V2,38:$V3,40:$V4,41:$V5,44:$V6,45:$V7,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,61:$Ve,62:$Vf,63:$Vg,67:$Vh,68:$Vi,92:$Vj,95:$Vk,97:$Vl,105:$Vm,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,137:$Vw,149:$Vy,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF}),o([1,6,31,32,42,70,94,131,133,135,139,156],[2,66]),{33:165,34:$V2,39:161,40:$V4,41:$V5,92:[1,164],98:162,99:163,104:$Vl1},{25:168,33:169,34:$V2,92:[1,167],95:$Vk,103:[1,170],107:[1,171]},o($Vh1,[2,92]),o($Vh1,[2,93]),o($V91,[2,40]),o($V91,[2,41]),o($V91,[2,42]),o($V91,[2,43]),o($V91,[2,44]),o($V91,[2,45]),o($V91,[2,46]),o($V91,[2,47]),{4:172,5:3,7:4,8:5,9:6,10:20,11:21,12:$V0,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:$V1,31:[1,173],33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{7:174,8:122,10:20,11:21,12:$V0,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:$V71,31:$Vm1,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,73:$Vn1,74:53,75:54,76:179,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,116:176,117:$Vo,118:$Vp,119:$Vq,120:$Vo1,123:177,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},o($V91,[2,170]),o($V91,[2,171],{35:181,36:$Vp1}),o([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:$Vq1}),{31:[2,69]},{31:[2,70]},o($Vr1,[2,87]),o($Vr1,[2,90]),{7:185,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{7:186,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{7:187,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{7:189,8:122,10:20,11:21,12:$V0,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:$V71,30:188,31:$Vg1,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{33:194,34:$V2,60:195,74:196,75:197,80:190,92:$Vj,118:$Ve1,119:$Vq,143:191,144:[1,192],145:193},{142:198,146:[1,199],147:[1,200],148:[1,201]},o([6,31,70,94],$Vs1,{39:80,93:202,56:203,57:204,59:205,11:206,37:207,33:208,35:209,60:210,34:$V2,36:$Vp1,38:$V3,40:$V4,41:$V5,62:$Vf,118:$Ve1}),o($Vt1,[2,34]),o($Vt1,[2,35]),o($V91,[2,38]),{15:142,16:211,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:144,60:71,74:53,75:54,77:212,79:28,80:29,81:30,92:$Vj,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,130:$Vt},o([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]),o($Vu1,[2,36]),{4:213,5:3,7:4,8:5,9:6,10:20,11:21,12:$V0,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:$V1,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},o($VH,[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:$V0,28:$V1,34:$V2,38:$V3,40:$V4,41:$V5,44:$V6,45:$V7,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,61:$Ve,62:$Vf,63:$Vg,67:$Vh,68:$Vi,92:$Vj,95:$Vk,97:$Vl,105:$Vm,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,133:$Vu,135:$Vv,137:$Vw,139:$Vx,149:$Vy,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF}),o($VY,[2,257]),{7:215,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{7:216,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{7:217,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{7:218,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{7:219,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{7:220,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{7:221,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{7:222,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{7:223,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{7:224,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{7:225,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{7:226,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{7:227,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{7:228,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},o($VY,[2,208]),o($VY,[2,213]),{7:229,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},o($VY,[2,207]),o($VY,[2,212]),{39:230,40:$V4,41:$V5,110:231,114:$Vq1},o($Vr1,[2,88]),o($Vv1,[2,167]),{35:232,36:$Vp1},{35:233,36:$Vp1},o($Vr1,[2,103],{35:234,36:$Vp1}),{35:235,36:$Vp1},o($Vr1,[2,104]),{7:237,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,73:$Vw1,74:53,75:54,77:40,79:28,80:29,81:30,88:236,91:238,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,121:239,122:$Vx1,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{86:242,87:$V21,90:$V31},{110:243,114:$Vq1},o($Vr1,[2,89]),o($VH,[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:$V0,28:$V71,34:$V2,38:$V3,40:$V4,41:$V5,44:$V6,45:$V7,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,61:$Ve,62:$Vf,63:$Vg,67:$Vh,68:$Vi,92:$Vj,95:$Vk,97:$Vl,105:$Vm,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,133:$Vk1,135:$Vk1,139:$Vk1,156:$Vk1,137:$Vw,149:$Vy,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF}),o($Vy1,[2,28],{141:77,132:102,138:103,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),{7:245,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{132:105,133:$Vu,135:$Vv,138:106,139:$Vx,141:77,156:$VX},o([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],$V61,{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:$V0,28:$V71,29:$V81,34:$V2,38:$V3,40:$V4,41:$V5,44:$V6,45:$V7,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,61:$Ve,62:$Vf,63:$Vg,67:$Vh,68:$Vi,92:$Vj,95:$Vk,97:$Vl,105:$Vm,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,137:$Vw,149:$Vy,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF}),{6:[1,247],7:246,8:122,10:20,11:21,12:$V0,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:$V71,31:[1,248],33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},o([6,31],$Vz1,{69:251,65:[1,249],70:$VA1}),o($VB1,[2,74]),o($VB1,[2,78],{55:[1,253],73:[1,252]}),o($VB1,[2,81]),o($VC1,[2,82]),o($VC1,[2,83]),o($VC1,[2,84]),o($VC1,[2,85]),{35:181,36:$Vp1},{7:254,8:122,10:20,11:21,12:$V0,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:$V71,31:$Vm1,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,73:$Vn1,74:53,75:54,76:179,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,116:176,117:$Vo,118:$Vp,119:$Vq,120:$Vo1,123:177,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},o($VY,[2,68]),{4:256,5:3,7:4,8:5,9:6,10:20,11:21,12:$V0,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:$V1,32:[1,255],33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},o([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:$VL}),o($VD1,[2,250],{141:77,132:102,138:103,163:$VL,165:$VN}),o($VD1,[2,251],{141:77,132:102,138:103,163:$VL,165:$VN}),o($VD1,[2,252],{141:77,132:102,138:103,163:$VL,165:$VN}),o($VY,[2,253],{40:$Vi1,41:$Vi1,82:$Vi1,83:$Vi1,84:$Vi1,85:$Vi1,87:$Vi1,90:$Vi1,113:$Vi1,114:$Vi1}),o($Vv1,$VZ,{109:107,78:108,86:114,82:$V_,83:$V$,84:$V01,85:$V11,87:$V21,90:$V31,113:$V41}),{78:118,82:$V_,83:$V$,84:$V01,85:$V11,86:114,87:$V21,90:$V31,109:117,113:$V41,114:$VZ},o($VE1,$Va1),o($VY,[2,254],{40:$Vi1,41:$Vi1,82:$Vi1,83:$Vi1,84:$Vi1,85:$Vi1,87:$Vi1,90:$Vi1,113:$Vi1,114:$Vi1}),o($VY,[2,255]),o($VY,[2,256]),{6:[1,259],7:257,8:122,10:20,11:21,12:$V0,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:$V71,31:[1,258],33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{7:260,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{30:261,31:$Vg1,155:[1,262]},o($VY,[2,192],{126:263,127:[1,264],128:[1,265]}),o($VY,[2,206]),o($VY,[2,214]),{31:[1,266],132:102,133:$Vu,135:$Vv,138:103,139:$Vx,141:77,156:$VI,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW},{150:267,152:268,153:$VF1},o($VY,[2,116]),{7:270,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},o($Vj1,[2,119],{30:271,31:$Vg1,40:$Vi1,41:$Vi1,82:$Vi1,83:$Vi1,84:$Vi1,85:$Vi1,87:$Vi1,90:$Vi1,113:$Vi1,114:$Vi1,96:[1,272]}),o($Vy1,[2,199],{141:77,132:102,138:103,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),o($V51,$VG1,{141:77,132:102,138:103,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),o($V51,[2,123]),{29:[1,273],70:[1,274]},{29:[1,275]},{31:$VH1,33:280,34:$V2,94:[1,276],100:277,101:278,103:$VI1},o([29,70],[2,139]),{102:[1,282]},{31:$VJ1,33:287,34:$V2,94:[1,283],103:$VK1,106:284,108:285},o($V51,[2,143]),{55:[1,289]},{7:290,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{29:[1,291]},{6:$VG,131:[1,292]},{4:293,5:3,7:4,8:5,9:6,10:20,11:21,12:$V0,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:$V1,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},o([6,31,70,120],$VL1,{141:77,132:102,138:103,121:294,73:[1,295],122:$Vx1,133:$Vu,135:$Vv,139:$Vx,156:$VI,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),o($VM1,[2,173]),o([6,31,120],$Vz1,{69:296,70:$VN1}),o($VO1,[2,182]),{7:254,8:122,10:20,11:21,12:$V0,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:$V71,31:$Vm1,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,73:$Vn1,74:53,75:54,76:179,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,116:298,117:$Vo,118:$Vp,119:$Vq,123:177,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},o($VO1,[2,188]),o($VO1,[2,189]),o($VP1,[2,172]),o($VP1,[2,33]),o($Vb1,[2,165]),{7:254,8:122,10:20,11:21,12:$V0,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:$V71,31:$Vm1,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,73:$Vn1,74:53,75:54,76:179,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,115:[1,299],116:300,117:$Vo,118:$Vp,119:$Vq,123:177,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{30:301,31:$Vg1,132:102,133:$Vu,135:$Vv,138:103,139:$Vx,141:77,156:$VI,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW},o($VQ1,[2,202],{141:77,132:102,138:103,133:$Vu,134:[1,302],135:$Vv,139:$Vx,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),o($VQ1,[2,204],{141:77,132:102,138:103,133:$Vu,134:[1,303],135:$Vv,139:$Vx,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),o($VY,[2,210]),o($VR1,[2,211],{141:77,132:102,138:103,133:$Vu,135:$Vv,139:$Vx,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),o([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]}),o($VS1,[2,218]),{33:194,34:$V2,60:195,74:196,75:197,92:$Vj,118:$Ve1,119:$Vf1,143:305,145:193},o($VS1,[2,224],{70:[1,306]}),o($VT1,[2,220]),o($VT1,[2,221]),o($VT1,[2,222]),o($VT1,[2,223]),o($VY,[2,217]),{7:307,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{7:308,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{7:309,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},o($VU1,$Vz1,{69:310,70:$VV1}),o($VW1,[2,111]),o($VW1,[2,51],{58:[1,312]}),o($VX1,[2,60],{55:[1,313]}),o($VW1,[2,56]),o($VX1,[2,61]),o($VY1,[2,57]),o($VY1,[2,58]),o($VY1,[2,59]),{46:[1,314],78:118,82:$V_,83:$V$,84:$V01,85:$V11,86:114,87:$V21,90:$V31,109:117,113:$V41,114:$VZ},o($VE1,$Vi1),{6:$VG,42:[1,315]},o($VH,[2,4]),o($VZ1,[2,258],{141:77,132:102,138:103,163:$VL,164:$VM,165:$VN}),o($VZ1,[2,259],{141:77,132:102,138:103,163:$VL,164:$VM,165:$VN}),o($VD1,[2,260],{141:77,132:102,138:103,163:$VL,165:$VN}),o($VD1,[2,261],{141:77,132:102,138:103,163:$VL,165:$VN}),o([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:$VJ,160:$VK,163:$VL,164:$VM,165:$VN}),o([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:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,174:$VW}),o([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:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,174:$VW}),o([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:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,174:$VW}),o([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:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,174:$VW}),o([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:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,174:$VW}),o([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:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,174:$VW}),o([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:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,174:$VW}),o([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:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO}),o($VR1,[2,248],{141:77,132:102,138:103,133:$Vu,135:$Vv,139:$Vx,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),o($VR1,[2,247],{141:77,132:102,138:103,133:$Vu,135:$Vv,139:$Vx,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),o($Vb1,[2,160]),o($Vb1,[2,161]),o($Vr1,[2,99]),o($Vr1,[2,100]),o($Vr1,[2,101]),o($Vr1,[2,102]),{89:[1,316]},{73:$Vw1,89:[2,107],121:317,122:$Vx1,132:102,133:$Vu,135:$Vv,138:103,139:$Vx,141:77,156:$VI,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW},{89:[2,108]},{7:318,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,89:[2,181],92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},o($V_1,[2,175]),o($V_1,$V$1),o($Vr1,[2,106]),o($Vb1,[2,162]),o($VH,[2,64],{141:77,132:102,138:103,133:$VG1,135:$VG1,139:$VG1,156:$VG1,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),o($Vy1,[2,29],{141:77,132:102,138:103,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),o($Vy1,[2,48],{141:77,132:102,138:103,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),{7:319,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{7:320,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{66:321,67:$Vh,68:$Vi},o($V02,$V12,{72:127,33:129,60:130,74:131,75:132,71:322,34:$V2,73:$Vd1,92:$Vj,118:$Ve1,119:$Vf1}),{6:$V22,31:$V32},o($VB1,[2,79]),{7:325,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},o($VO1,$VL1,{141:77,132:102,138:103,73:[1,326],133:$Vu,135:$Vv,139:$Vx,156:$VI,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),o($V42,[2,30]),{6:$VG,32:[1,327]},o($Vy1,[2,271],{141:77,132:102,138:103,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),{7:328,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{7:329,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},o($Vy1,[2,274],{141:77,132:102,138:103,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),o($VY,[2,246]),{7:330,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},o($VY,[2,193],{127:[1,331]}),{30:332,31:$Vg1},{30:335,31:$Vg1,33:333,34:$V2,75:334,92:$Vj},{150:336,152:268,153:$VF1},{32:[1,337],151:[1,338],152:339,153:$VF1},o($V52,[2,239]),{7:341,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,124:340,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},o($V62,[2,117],{141:77,132:102,138:103,30:342,31:$Vg1,133:$Vu,135:$Vv,139:$Vx,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),o($VY,[2,120]),{7:343,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{39:344,40:$V4,41:$V5},{92:[1,346],99:345,104:$Vl1},{39:347,40:$V4,41:$V5},{29:[1,348]},o($VU1,$Vz1,{69:349,70:$V72}),o($VW1,[2,130]),{31:$VH1,33:280,34:$V2,100:351,101:278,103:$VI1},o($VW1,[2,135],{102:[1,352]}),o($VW1,[2,137],{102:[1,353]}),{33:354,34:$V2},o($V51,[2,141]),o($VU1,$Vz1,{69:355,70:$V82}),o($VW1,[2,150]),{31:$VJ1,33:287,34:$V2,103:$VK1,106:357,108:285},o($VW1,[2,155],{102:[1,358]}),o($VW1,[2,158],{102:[1,359]}),{6:[1,361],7:360,8:122,10:20,11:21,12:$V0,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:$V71,31:[1,362],33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},o($V92,[2,147],{141:77,132:102,138:103,133:$Vu,135:$Vv,139:$Vx,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),{39:363,40:$V4,41:$V5},o($V91,[2,200]),{6:$VG,32:[1,364]},{7:365,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},o([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],$V$1,{6:$Va2,31:$Va2,70:$Va2,120:$Va2}),{6:$Vb2,31:$Vc2,120:[1,366]},o([6,31,32,115,120],$V12,{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:$V0,28:$V71,34:$V2,38:$V3,40:$V4,41:$V5,44:$V6,45:$V7,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,61:$Ve,62:$Vf,63:$Vg,67:$Vh,68:$Vi,73:$Vn1,92:$Vj,95:$Vk,97:$Vl,105:$Vm,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,133:$Vu,135:$Vv,137:$Vw,139:$Vx,149:$Vy,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF}),o($V02,$Vz1,{69:370,70:$VN1}),o($Vb1,[2,168]),o([6,31,115],$Vz1,{69:371,70:$VN1}),o($Vd2,[2,243]),{7:372,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{7:373,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{7:374,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},o($VS1,[2,219]),{33:194,34:$V2,60:195,74:196,75:197,92:$Vj,118:$Ve1,119:$Vf1,145:375},o([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:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),o($Ve2,[2,227],{141:77,132:102,138:103,134:[1,378],159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),o($Ve2,[2,233],{141:77,132:102,138:103,134:[1,379],159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),{6:$Vf2,31:$Vg2,94:[1,380]},o($Vh2,$V12,{39:80,57:204,59:205,11:206,37:207,33:208,35:209,60:210,56:383,34:$V2,36:$Vp1,38:$V3,40:$V4,41:$V5,62:$Vf,118:$Ve1}),{7:384,8:122,10:20,11:21,12:$V0,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:$V71,31:[1,385],33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{7:386,8:122,10:20,11:21,12:$V0,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:$V71,31:[1,387],33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},o($V91,[2,39]),o($Vu1,[2,37]),o($Vr1,[2,105]),{7:388,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,89:[2,179],92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{89:[2,180],132:102,133:$Vu,135:$Vv,138:103,139:$Vx,141:77,156:$VI,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW},o($Vy1,[2,49],{141:77,132:102,138:103,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),{32:[1,389],132:102,133:$Vu,135:$Vv,138:103,139:$Vx,141:77,156:$VI,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW},{30:390,31:$Vg1},o($VB1,[2,75]),{33:129,34:$V2,60:130,71:391,72:127,73:$Vd1,74:131,75:132,92:$Vj,118:$Ve1,119:$Vf1},o($Vi2,$Vc1,{71:126,72:127,33:129,60:130,74:131,75:132,64:392,34:$V2,73:$Vd1,92:$Vj,118:$Ve1,119:$Vf1}),o($VB1,[2,80],{141:77,132:102,138:103,133:$Vu,135:$Vv,139:$Vx,156:$VI,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),o($VO1,$Va2),o($V42,[2,31]),{32:[1,393],132:102,133:$Vu,135:$Vv,138:103,139:$Vx,141:77,156:$VI,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW},o($Vy1,[2,273],{141:77,132:102,138:103,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),{30:394,31:$Vg1,132:102,133:$Vu,135:$Vv,138:103,139:$Vx,141:77,156:$VI,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW},{30:395,31:$Vg1},o($VY,[2,194]),{30:396,31:$Vg1},{30:397,31:$Vg1},o($Vj2,[2,198]),{32:[1,398],151:[1,399],152:339,153:$VF1},o($VY,[2,237]),{30:400,31:$Vg1},o($V52,[2,240]),{30:401,31:$Vg1,70:[1,402]},o($Vk2,[2,190],{141:77,132:102,138:103,133:$Vu,135:$Vv,139:$Vx,156:$VI,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),o($VY,[2,118]),o($V62,[2,121],{141:77,132:102,138:103,30:403,31:$Vg1,133:$Vu,135:$Vv,139:$Vx,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),o($V51,[2,124]),{29:[1,404]},{31:$VH1,33:280,34:$V2,100:405,101:278,103:$VI1},o($V51,[2,125]),{39:406,40:$V4,41:$V5},{6:$Vl2,31:$Vm2,94:[1,407]},o($Vh2,$V12,{33:280,101:410,34:$V2,103:$VI1}),o($V02,$Vz1,{69:411,70:$V72}),{33:412,34:$V2},{33:413,34:$V2},{29:[2,140]},{6:$Vn2,31:$Vo2,94:[1,414]},o($Vh2,$V12,{33:287,108:417,34:$V2,103:$VK1}),o($V02,$Vz1,{69:418,70:$V82}),{33:419,34:$V2,103:[1,420]},{33:421,34:$V2},o($V92,[2,144],{141:77,132:102,138:103,133:$Vu,135:$Vv,139:$Vx,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),{7:422,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{7:423,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},o($V51,[2,148]),{131:[1,424]},{120:[1,425],132:102,133:$Vu,135:$Vv,138:103,139:$Vx,141:77,156:$VI,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW},o($VM1,[2,174]),{7:254,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,73:$Vn1,74:53,75:54,76:179,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,123:426,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{7:254,8:122,10:20,11:21,12:$V0,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:$V71,31:$Vm1,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,73:$Vn1,74:53,75:54,76:179,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,116:427,117:$Vo,118:$Vp,119:$Vq,123:177,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},o($VO1,[2,183]),{6:$Vb2,31:$Vc2,32:[1,428]},{6:$Vb2,31:$Vc2,115:[1,429]},o($VR1,[2,203],{141:77,132:102,138:103,133:$Vu,135:$Vv,139:$Vx,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),o($VR1,[2,205],{141:77,132:102,138:103,133:$Vu,135:$Vv,139:$Vx,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),o($VR1,[2,216],{141:77,132:102,138:103,133:$Vu,135:$Vv,139:$Vx,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),o($VS1,[2,225]),{7:430,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{7:431,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{7:432,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{7:433,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},o($VM1,[2,109]),{11:206,33:208,34:$V2,35:209,36:$Vp1,37:207,38:$V3,39:80,40:$V4,41:$V5,56:434,57:204,59:205,60:210,62:$Vf,118:$Ve1},o($Vi2,$Vs1,{39:80,56:203,57:204,59:205,11:206,37:207,33:208,35:209,60:210,93:435,34:$V2,36:$Vp1,38:$V3,40:$V4,41:$V5,62:$Vf,118:$Ve1}),o($VW1,[2,112]),o($VW1,[2,52],{141:77,132:102,138:103,133:$Vu,135:$Vv,139:$Vx,156:$VI,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),{7:436,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},o($VW1,[2,54],{141:77,132:102,138:103,133:$Vu,135:$Vv,139:$Vx,156:$VI,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),{7:437,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{89:[2,178],132:102,133:$Vu,135:$Vv,138:103,139:$Vx,141:77,156:$VI,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW},o($VY,[2,50]),o($VY,[2,67]),o($VB1,[2,76]),o($V02,$Vz1,{69:438,70:$VA1}),o($VY,[2,272]),o($Vd2,[2,244]),o($VY,[2,195]),o($Vj2,[2,196]),o($Vj2,[2,197]),o($VY,[2,235]),{30:439,31:$Vg1},{32:[1,440]},o($V52,[2,241],{6:[1,441]}),{7:442,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},o($VY,[2,122]),{39:443,40:$V4,41:$V5},o($VU1,$Vz1,{69:444,70:$V72}),o($V51,[2,126]),{29:[1,445]},{33:280,34:$V2,101:446,103:$VI1},{31:$VH1,33:280,34:$V2,100:447,101:278,103:$VI1},o($VW1,[2,131]),{6:$Vl2,31:$Vm2,32:[1,448]},o($VW1,[2,136]),o($VW1,[2,138]),o($V51,[2,142],{29:[1,449]}),{33:287,34:$V2,103:$VK1,108:450},{31:$VJ1,33:287,34:$V2,103:$VK1,106:451,108:285},o($VW1,[2,151]),{6:$Vn2,31:$Vo2,32:[1,452]},o($VW1,[2,156]),o($VW1,[2,157]),o($VW1,[2,159]),o($V92,[2,145],{141:77,132:102,138:103,133:$Vu,135:$Vv,139:$Vx,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),{32:[1,453],132:102,133:$Vu,135:$Vv,138:103,139:$Vx,141:77,156:$VI,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW},o($V91,[2,201]),o($V91,[2,177]),o($VO1,[2,184]),o($V02,$Vz1,{69:454,70:$VN1}),o($VO1,[2,185]),o($Vb1,[2,169]),o([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:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),o($Ve2,[2,230],{141:77,132:102,138:103,134:[1,456],159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),o($Vy1,[2,229],{141:77,132:102,138:103,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),o($Vy1,[2,234],{141:77,132:102,138:103,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),o($VW1,[2,113]),o($V02,$Vz1,{69:457,70:$VV1}),{32:[1,458],132:102,133:$Vu,135:$Vv,138:103,139:$Vx,141:77,156:$VI,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW},{32:[1,459],132:102,133:$Vu,135:$Vv,138:103,139:$Vx,141:77,156:$VI,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW},{6:$V22,31:$V32,32:[1,460]},{32:[1,461]},o($VY,[2,238]),o($V52,[2,242]),o($Vk2,[2,191],{141:77,132:102,138:103,133:$Vu,135:$Vv,139:$Vx,156:$VI,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),o($V51,[2,128]),{6:$Vl2,31:$Vm2,94:[1,462]},{39:463,40:$V4,41:$V5},o($VW1,[2,132]),o($V02,$Vz1,{69:464,70:$V72}),o($VW1,[2,133]),{39:465,40:$V4,41:$V5},o($VW1,[2,152]),o($V02,$Vz1,{69:466,70:$V82}),o($VW1,[2,153]),o($V51,[2,146]),{6:$Vb2,31:$Vc2,32:[1,467]},{7:468,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{7:469,8:122,10:20,11:21,12:$V0,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:$V71,33:70,34:$V2,37:55,38:$V3,39:80,40:$V4,41:$V5,43:57,44:$V6,45:$V7,47:27,48:$V8,49:$V9,50:$Va,51:$Vb,52:$Vc,53:$Vd,54:26,60:71,61:$Ve,62:$Vf,63:$Vg,66:33,67:$Vh,68:$Vi,74:53,75:54,77:40,79:28,80:29,81:30,92:$Vj,95:$Vk,97:$Vl,105:$Vm,111:31,112:$Vn,117:$Vo,118:$Vp,119:$Vq,125:$Vr,129:$Vs,130:$Vt,132:43,133:$Vu,135:$Vv,136:44,137:$Vw,138:45,139:$Vx,141:77,149:$Vy,154:41,155:$Vz,157:$VA,158:$VB,159:$VC,160:$VD,161:$VE,162:$VF},{6:$Vf2,31:$Vg2,32:[1,470]},o($VW1,[2,53]),o($VW1,[2,55]),o($VB1,[2,77]),o($VY,[2,236]),{29:[1,471]},o($V51,[2,127]),{6:$Vl2,31:$Vm2,32:[1,472]},o($V51,[2,149]),{6:$Vn2,31:$Vo2,32:[1,473]},o($VO1,[2,186]),o($Vy1,[2,231],{141:77,132:102,138:103,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),o($Vy1,[2,232],{141:77,132:102,138:103,159:$VJ,160:$VK,163:$VL,164:$VM,165:$VN,166:$VO,167:$VP,168:$VQ,169:$VR,170:$VS,171:$VT,172:$VU,173:$VV,174:$VW}),o($VW1,[2,114]),{39:474,40:$V4,41:$V5},o($VW1,[2,134]),o($VW1,[2,154]),o($V51,[2,129])], +defaultActions: {68:[2,69],69:[2,70],238:[2,108],354:[2,140]}, +parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + function _parseError (msg, hash) { + this.message = msg; + this.hash = hash; + } + _parseError.prototype = Error; + + throw new _parseError(str, hash); + } +}, +parse: function parse(input) { + var self = this, stack = [0], tstack = [], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + var lexer = Object.create(this.lexer); + var sharedState = { yy: {} }; + for (var k in this.yy) { + if (Object.prototype.hasOwnProperty.call(this.yy, k)) { + sharedState.yy[k] = this.yy[k]; + } + } + lexer.setInput(input, sharedState.yy); + sharedState.yy.lexer = lexer; + sharedState.yy.parser = this; + if (typeof lexer.yylloc == 'undefined') { + lexer.yylloc = {}; + } + var yyloc = lexer.yylloc; + lstack.push(yyloc); + var ranges = lexer.options && lexer.options.ranges; + if (typeof sharedState.yy.parseError === 'function') { + this.parseError = sharedState.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function popStack(n) { + stack.length = stack.length - 2 * n; + vstack.length = vstack.length - n; + lstack.length = lstack.length - n; + } + _token_stack: + var lex = function () { + var token; + token = lexer.lex() || EOF; + if (typeof token !== 'number') { + token = self.symbols_[token] || token; + } + return token; + }; + var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == 'undefined') { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === 'undefined' || !action.length || !action[0]) { + var errStr = ''; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push('\'' + this.terminals_[p] + '\''); + } + } + if (lexer.showPosition) { + errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\''; + } else { + errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\''); + } + this.parseError(errStr, { + text: lexer.match, + token: this.terminals_[symbol] || symbol, + line: lexer.yylineno, + loc: yyloc, + expected: expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(lexer.yytext); + lstack.push(lexer.yylloc); + stack.push(action[1]); + symbol = null; + if (!preErrorSymbol) { + yyleng = lexer.yyleng; + yytext = lexer.yytext; + yylineno = lexer.yylineno; + yyloc = lexer.yylloc; + if (recovering > 0) { + recovering--; + } + } else { + symbol = preErrorSymbol; + preErrorSymbol = null; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + sharedState.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== 'undefined') { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; +}}; + +function Parser () { + this.yy = {}; +} +Parser.prototype = parser;parser.Parser = Parser; +return new Parser; +})(); + + +if (typeof require !== 'undefined' && typeof exports !== 'undefined') { +exports.parser = parser; +exports.Parser = parser.Parser; +exports.parse = function () { return parser.parse.apply(parser, arguments); }; +exports.main = function commonjsMain(args) { + if (!args[1]) { + console.log('Usage: '+args[0]+' FILE'); + process.exit(1); + } + var source = ''; + var fs = require('fs'); + if (typeof fs !== 'undefined' && fs !== null) + source = fs.readFileSync(require('path').normalize(args[1]), "utf8"); + return exports.parser.parse(source); +}; +if (typeof module !== 'undefined' && require.main === module) { + exports.main(process.argv.slice(1)); +} +} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/register.js b/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/register.js new file mode 100644 index 00000000..e351b6b8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/register.js @@ -0,0 +1,66 @@ +// Generated by CoffeeScript 1.12.5 +(function() { + var CoffeeScript, Module, binary, child_process, ext, findExtension, fork, helpers, i, len, loadFile, path, ref; + + CoffeeScript = require('./coffee-script'); + + child_process = require('child_process'); + + helpers = require('./helpers'); + + path = require('path'); + + loadFile = function(module, filename) { + var answer; + answer = CoffeeScript._compileFile(filename, false, true); + return module._compile(answer, filename); + }; + + if (require.extensions) { + ref = CoffeeScript.FILE_EXTENSIONS; + for (i = 0, len = ref.length; i < len; i++) { + ext = ref[i]; + require.extensions[ext] = loadFile; + } + Module = require('module'); + findExtension = function(filename) { + var curExtension, extensions; + extensions = path.basename(filename).split('.'); + if (extensions[0] === '') { + extensions.shift(); + } + while (extensions.shift()) { + curExtension = '.' + extensions.join('.'); + if (Module._extensions[curExtension]) { + return curExtension; + } + } + return '.js'; + }; + Module.prototype.load = function(filename) { + var extension; + this.filename = filename; + this.paths = Module._nodeModulePaths(path.dirname(filename)); + extension = findExtension(filename); + Module._extensions[extension](this, filename); + return this.loaded = true; + }; + } + + if (child_process) { + fork = child_process.fork; + binary = require.resolve('../../bin/coffee'); + child_process.fork = function(path, args, options) { + if (helpers.isCoffee(path)) { + if (!Array.isArray(args)) { + options = args || {}; + args = []; + } + args = [path].concat(args); + path = binary; + } + return fork(path, args, options); + }; + } + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/repl.js b/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/repl.js new file mode 100644 index 00000000..65225d75 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/repl.js @@ -0,0 +1,203 @@ +// Generated by CoffeeScript 1.12.5 +(function() { + var CoffeeScript, addHistory, addMultilineHandler, fs, getCommandId, merge, nodeREPL, path, ref, replDefaults, runInContext, updateSyntaxError, vm; + + fs = require('fs'); + + path = require('path'); + + vm = require('vm'); + + nodeREPL = require('repl'); + + CoffeeScript = require('./coffee-script'); + + ref = require('./helpers'), merge = ref.merge, updateSyntaxError = ref.updateSyntaxError; + + replDefaults = { + prompt: 'coffee> ', + historyFile: process.env.HOME ? path.join(process.env.HOME, '.coffee_history') : void 0, + historyMaxInputSize: 10240, + "eval": function(input, context, filename, cb) { + var Assign, Block, Literal, Value, ast, err, js, ref1, referencedVars, token, tokens; + input = input.replace(/\uFF00/g, '\n'); + input = input.replace(/^\(([\s\S]*)\n\)$/m, '$1'); + input = input.replace(/^\s*try\s*{([\s\S]*)}\s*catch.*$/m, '$1'); + ref1 = require('./nodes'), Block = ref1.Block, Assign = ref1.Assign, Value = ref1.Value, Literal = ref1.Literal; + try { + tokens = CoffeeScript.tokens(input); + referencedVars = (function() { + var i, len, results; + results = []; + for (i = 0, len = tokens.length; i < len; i++) { + token = tokens[i]; + if (token[0] === 'IDENTIFIER') { + results.push(token[1]); + } + } + return results; + })(); + ast = CoffeeScript.nodes(tokens); + ast = new Block([new Assign(new Value(new Literal('_')), ast, '=')]); + js = ast.compile({ + bare: true, + locals: Object.keys(context), + referencedVars: referencedVars + }); + return cb(null, runInContext(js, context, filename)); + } catch (error) { + err = error; + updateSyntaxError(err, input); + return cb(err); + } + } + }; + + runInContext = function(js, context, filename) { + if (context === global) { + return vm.runInThisContext(js, filename); + } else { + return vm.runInContext(js, context, filename); + } + }; + + addMultilineHandler = function(repl) { + var inputStream, multiline, nodeLineListener, origPrompt, outputStream, ref1, rli; + rli = repl.rli, inputStream = repl.inputStream, outputStream = repl.outputStream; + origPrompt = (ref1 = repl._prompt) != null ? ref1 : repl.prompt; + multiline = { + enabled: false, + initialPrompt: origPrompt.replace(/^[^> ]*/, function(x) { + return x.replace(/./g, '-'); + }), + prompt: origPrompt.replace(/^[^> ]*>?/, function(x) { + return x.replace(/./g, '.'); + }), + buffer: '' + }; + nodeLineListener = rli.listeners('line')[0]; + rli.removeListener('line', nodeLineListener); + rli.on('line', function(cmd) { + if (multiline.enabled) { + multiline.buffer += cmd + "\n"; + rli.setPrompt(multiline.prompt); + rli.prompt(true); + } else { + rli.setPrompt(origPrompt); + nodeLineListener(cmd); + } + }); + return inputStream.on('keypress', function(char, key) { + if (!(key && key.ctrl && !key.meta && !key.shift && key.name === 'v')) { + return; + } + if (multiline.enabled) { + if (!multiline.buffer.match(/\n/)) { + multiline.enabled = !multiline.enabled; + rli.setPrompt(origPrompt); + rli.prompt(true); + return; + } + if ((rli.line != null) && !rli.line.match(/^\s*$/)) { + return; + } + multiline.enabled = !multiline.enabled; + rli.line = ''; + rli.cursor = 0; + rli.output.cursorTo(0); + rli.output.clearLine(1); + multiline.buffer = multiline.buffer.replace(/\n/g, '\uFF00'); + rli.emit('line', multiline.buffer); + multiline.buffer = ''; + } else { + multiline.enabled = !multiline.enabled; + rli.setPrompt(multiline.initialPrompt); + rli.prompt(true); + } + }); + }; + + addHistory = function(repl, filename, maxSize) { + var buffer, fd, lastLine, readFd, size, stat; + lastLine = null; + try { + stat = fs.statSync(filename); + size = Math.min(maxSize, stat.size); + readFd = fs.openSync(filename, 'r'); + buffer = new Buffer(size); + fs.readSync(readFd, buffer, 0, size, stat.size - size); + fs.closeSync(readFd); + repl.rli.history = buffer.toString().split('\n').reverse(); + if (stat.size > maxSize) { + repl.rli.history.pop(); + } + if (repl.rli.history[0] === '') { + repl.rli.history.shift(); + } + repl.rli.historyIndex = -1; + lastLine = repl.rli.history[0]; + } catch (error) {} + fd = fs.openSync(filename, 'a'); + repl.rli.addListener('line', function(code) { + if (code && code.length && code !== '.history' && code !== '.exit' && lastLine !== code) { + fs.writeSync(fd, code + "\n"); + return lastLine = code; + } + }); + repl.on('exit', function() { + return fs.closeSync(fd); + }); + return repl.commands[getCommandId(repl, 'history')] = { + help: 'Show command history', + action: function() { + repl.outputStream.write((repl.rli.history.slice(0).reverse().join('\n')) + "\n"); + return repl.displayPrompt(); + } + }; + }; + + getCommandId = function(repl, commandName) { + var commandsHaveLeadingDot; + commandsHaveLeadingDot = repl.commands['.help'] != null; + if (commandsHaveLeadingDot) { + return "." + commandName; + } else { + return commandName; + } + }; + + module.exports = { + start: function(opts) { + var build, major, minor, ref1, repl; + if (opts == null) { + opts = {}; + } + ref1 = process.versions.node.split('.').map(function(n) { + return parseInt(n); + }), major = ref1[0], minor = ref1[1], build = ref1[2]; + if (major === 0 && minor < 8) { + console.warn("Node 0.8.0+ required for CoffeeScript REPL"); + process.exit(1); + } + CoffeeScript.register(); + process.argv = ['coffee'].concat(process.argv.slice(2)); + opts = merge(replDefaults, opts); + repl = nodeREPL.start(opts); + if (opts.prelude) { + runInContext(opts.prelude, repl.context, 'prelude'); + } + repl.on('exit', function() { + if (!repl.rli.closed) { + return repl.outputStream.write('\n'); + } + }); + addMultilineHandler(repl); + if (opts.historyFile) { + addHistory(repl, opts.historyFile, opts.historyMaxInputSize); + } + repl.commands[getCommandId(repl, 'load')].help = 'Load code from a file into this REPL session'; + return repl; + } + }; + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/rewriter.js b/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/rewriter.js new file mode 100644 index 00000000..a18e8a6b --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/rewriter.js @@ -0,0 +1,522 @@ +// Generated by CoffeeScript 1.12.5 +(function() { + var BALANCED_PAIRS, CALL_CLOSERS, EXPRESSION_CLOSE, EXPRESSION_END, EXPRESSION_START, IMPLICIT_CALL, IMPLICIT_END, IMPLICIT_FUNC, IMPLICIT_UNSPACED_CALL, INVERSES, LINEBREAKS, SINGLE_CLOSERS, SINGLE_LINERS, generate, k, left, len, ref, rite, + indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }, + slice = [].slice; + + generate = function(tag, value, origin) { + var tok; + tok = [tag, value]; + tok.generated = true; + if (origin) { + tok.origin = origin; + } + return tok; + }; + + exports.Rewriter = (function() { + function Rewriter() {} + + Rewriter.prototype.rewrite = function(tokens1) { + this.tokens = tokens1; + this.removeLeadingNewlines(); + this.closeOpenCalls(); + this.closeOpenIndexes(); + this.normalizeLines(); + this.tagPostfixConditionals(); + this.addImplicitBracesAndParens(); + this.addLocationDataToGeneratedTokens(); + this.fixOutdentLocationData(); + return this.tokens; + }; + + Rewriter.prototype.scanTokens = function(block) { + var i, token, tokens; + tokens = this.tokens; + i = 0; + while (token = tokens[i]) { + i += block.call(this, token, i, tokens); + } + return true; + }; + + Rewriter.prototype.detectEnd = function(i, condition, action) { + var levels, ref, ref1, token, tokens; + tokens = this.tokens; + levels = 0; + while (token = tokens[i]) { + if (levels === 0 && condition.call(this, token, i)) { + return action.call(this, token, i); + } + if (!token || levels < 0) { + return action.call(this, token, i - 1); + } + if (ref = token[0], indexOf.call(EXPRESSION_START, ref) >= 0) { + levels += 1; + } else if (ref1 = token[0], indexOf.call(EXPRESSION_END, ref1) >= 0) { + levels -= 1; + } + i += 1; + } + return i - 1; + }; + + Rewriter.prototype.removeLeadingNewlines = function() { + var i, k, len, ref, tag; + ref = this.tokens; + for (i = k = 0, len = ref.length; k < len; i = ++k) { + tag = ref[i][0]; + if (tag !== 'TERMINATOR') { + break; + } + } + if (i) { + return this.tokens.splice(0, i); + } + }; + + Rewriter.prototype.closeOpenCalls = function() { + var action, condition; + condition = function(token, i) { + var ref; + return ((ref = token[0]) === ')' || ref === 'CALL_END') || token[0] === 'OUTDENT' && this.tag(i - 1) === ')'; + }; + action = function(token, i) { + return this.tokens[token[0] === 'OUTDENT' ? i - 1 : i][0] = 'CALL_END'; + }; + return this.scanTokens(function(token, i) { + if (token[0] === 'CALL_START') { + this.detectEnd(i + 1, condition, action); + } + return 1; + }); + }; + + Rewriter.prototype.closeOpenIndexes = function() { + var action, condition; + condition = function(token, i) { + var ref; + return (ref = token[0]) === ']' || ref === 'INDEX_END'; + }; + action = function(token, i) { + return token[0] = 'INDEX_END'; + }; + return this.scanTokens(function(token, i) { + if (token[0] === 'INDEX_START') { + this.detectEnd(i + 1, condition, action); + } + return 1; + }); + }; + + Rewriter.prototype.indexOfTag = function() { + var fuzz, i, j, k, pattern, ref, ref1; + i = arguments[0], pattern = 2 <= arguments.length ? slice.call(arguments, 1) : []; + fuzz = 0; + for (j = k = 0, ref = pattern.length; 0 <= ref ? k < ref : k > ref; j = 0 <= ref ? ++k : --k) { + while (this.tag(i + j + fuzz) === 'HERECOMMENT') { + fuzz += 2; + } + if (pattern[j] == null) { + continue; + } + if (typeof pattern[j] === 'string') { + pattern[j] = [pattern[j]]; + } + if (ref1 = this.tag(i + j + fuzz), indexOf.call(pattern[j], ref1) < 0) { + return -1; + } + } + return i + j + fuzz - 1; + }; + + Rewriter.prototype.looksObjectish = function(j) { + var end, index; + if (this.indexOfTag(j, '@', null, ':') > -1 || this.indexOfTag(j, null, ':') > -1) { + return true; + } + index = this.indexOfTag(j, EXPRESSION_START); + if (index > -1) { + end = null; + this.detectEnd(index + 1, (function(token) { + var ref; + return ref = token[0], indexOf.call(EXPRESSION_END, ref) >= 0; + }), (function(token, i) { + return end = i; + })); + if (this.tag(end + 1) === ':') { + return true; + } + } + return false; + }; + + Rewriter.prototype.findTagsBackwards = function(i, tags) { + var backStack, ref, ref1, ref2, ref3, ref4, ref5; + backStack = []; + while (i >= 0 && (backStack.length || (ref2 = this.tag(i), indexOf.call(tags, ref2) < 0) && ((ref3 = this.tag(i), indexOf.call(EXPRESSION_START, ref3) < 0) || this.tokens[i].generated) && (ref4 = this.tag(i), indexOf.call(LINEBREAKS, ref4) < 0))) { + if (ref = this.tag(i), indexOf.call(EXPRESSION_END, ref) >= 0) { + backStack.push(this.tag(i)); + } + if ((ref1 = this.tag(i), indexOf.call(EXPRESSION_START, ref1) >= 0) && backStack.length) { + backStack.pop(); + } + i -= 1; + } + return ref5 = this.tag(i), indexOf.call(tags, ref5) >= 0; + }; + + Rewriter.prototype.addImplicitBracesAndParens = function() { + var stack, start; + stack = []; + start = null; + return this.scanTokens(function(token, i, tokens) { + var endImplicitCall, endImplicitObject, forward, inImplicit, inImplicitCall, inImplicitControl, inImplicitObject, newLine, nextTag, offset, prevTag, prevToken, ref, ref1, ref2, ref3, ref4, ref5, s, sameLine, stackIdx, stackTag, stackTop, startIdx, startImplicitCall, startImplicitObject, startsLine, tag; + tag = token[0]; + prevTag = (prevToken = i > 0 ? tokens[i - 1] : [])[0]; + nextTag = (i < tokens.length - 1 ? tokens[i + 1] : [])[0]; + stackTop = function() { + return stack[stack.length - 1]; + }; + startIdx = i; + forward = function(n) { + return i - startIdx + n; + }; + inImplicit = function() { + var ref, ref1; + return (ref = stackTop()) != null ? (ref1 = ref[2]) != null ? ref1.ours : void 0 : void 0; + }; + inImplicitCall = function() { + var ref; + return inImplicit() && ((ref = stackTop()) != null ? ref[0] : void 0) === '('; + }; + inImplicitObject = function() { + var ref; + return inImplicit() && ((ref = stackTop()) != null ? ref[0] : void 0) === '{'; + }; + inImplicitControl = function() { + var ref; + return inImplicit && ((ref = stackTop()) != null ? ref[0] : void 0) === 'CONTROL'; + }; + startImplicitCall = function(j) { + var idx; + idx = j != null ? j : i; + stack.push([ + '(', idx, { + ours: true + } + ]); + tokens.splice(idx, 0, generate('CALL_START', '(')); + if (j == null) { + return i += 1; + } + }; + endImplicitCall = function() { + stack.pop(); + tokens.splice(i, 0, generate('CALL_END', ')', ['', 'end of input', token[2]])); + return i += 1; + }; + startImplicitObject = function(j, startsLine) { + var idx, val; + if (startsLine == null) { + startsLine = true; + } + idx = j != null ? j : i; + stack.push([ + '{', idx, { + sameLine: true, + startsLine: startsLine, + ours: true + } + ]); + val = new String('{'); + val.generated = true; + tokens.splice(idx, 0, generate('{', val, token)); + if (j == null) { + return i += 1; + } + }; + endImplicitObject = function(j) { + j = j != null ? j : i; + stack.pop(); + tokens.splice(j, 0, generate('}', '}', token)); + return i += 1; + }; + if (inImplicitCall() && (tag === 'IF' || tag === 'TRY' || tag === 'FINALLY' || tag === 'CATCH' || tag === 'CLASS' || tag === 'SWITCH')) { + stack.push([ + 'CONTROL', i, { + ours: true + } + ]); + return forward(1); + } + if (tag === 'INDENT' && inImplicit()) { + if (prevTag !== '=>' && prevTag !== '->' && prevTag !== '[' && prevTag !== '(' && prevTag !== ',' && prevTag !== '{' && prevTag !== 'TRY' && prevTag !== 'ELSE' && prevTag !== '=') { + while (inImplicitCall()) { + endImplicitCall(); + } + } + if (inImplicitControl()) { + stack.pop(); + } + stack.push([tag, i]); + return forward(1); + } + if (indexOf.call(EXPRESSION_START, tag) >= 0) { + stack.push([tag, i]); + return forward(1); + } + if (indexOf.call(EXPRESSION_END, tag) >= 0) { + while (inImplicit()) { + if (inImplicitCall()) { + endImplicitCall(); + } else if (inImplicitObject()) { + endImplicitObject(); + } else { + stack.pop(); + } + } + start = stack.pop(); + } + if ((indexOf.call(IMPLICIT_FUNC, tag) >= 0 && token.spaced || tag === '?' && i > 0 && !tokens[i - 1].spaced) && (indexOf.call(IMPLICIT_CALL, nextTag) >= 0 || indexOf.call(IMPLICIT_UNSPACED_CALL, nextTag) >= 0 && !((ref = tokens[i + 1]) != null ? ref.spaced : void 0) && !((ref1 = tokens[i + 1]) != null ? ref1.newLine : void 0))) { + if (tag === '?') { + tag = token[0] = 'FUNC_EXIST'; + } + startImplicitCall(i + 1); + return forward(2); + } + if (indexOf.call(IMPLICIT_FUNC, tag) >= 0 && this.indexOfTag(i + 1, 'INDENT') > -1 && this.looksObjectish(i + 2) && !this.findTagsBackwards(i, ['CLASS', 'EXTENDS', 'IF', 'CATCH', 'SWITCH', 'LEADING_WHEN', 'FOR', 'WHILE', 'UNTIL'])) { + startImplicitCall(i + 1); + stack.push(['INDENT', i + 2]); + return forward(3); + } + if (tag === ':') { + s = (function() { + var ref2; + switch (false) { + case ref2 = this.tag(i - 1), indexOf.call(EXPRESSION_END, ref2) < 0: + return start[1]; + case this.tag(i - 2) !== '@': + return i - 2; + default: + return i - 1; + } + }).call(this); + while (this.tag(s - 2) === 'HERECOMMENT') { + s -= 2; + } + this.insideForDeclaration = nextTag === 'FOR'; + startsLine = s === 0 || (ref2 = this.tag(s - 1), indexOf.call(LINEBREAKS, ref2) >= 0) || tokens[s - 1].newLine; + if (stackTop()) { + ref3 = stackTop(), stackTag = ref3[0], stackIdx = ref3[1]; + if ((stackTag === '{' || stackTag === 'INDENT' && this.tag(stackIdx - 1) === '{') && (startsLine || this.tag(s - 1) === ',' || this.tag(s - 1) === '{')) { + return forward(1); + } + } + startImplicitObject(s, !!startsLine); + return forward(2); + } + if (inImplicitObject() && indexOf.call(LINEBREAKS, tag) >= 0) { + stackTop()[2].sameLine = false; + } + newLine = prevTag === 'OUTDENT' || prevToken.newLine; + if (indexOf.call(IMPLICIT_END, tag) >= 0 || indexOf.call(CALL_CLOSERS, tag) >= 0 && newLine) { + while (inImplicit()) { + ref4 = stackTop(), stackTag = ref4[0], stackIdx = ref4[1], (ref5 = ref4[2], sameLine = ref5.sameLine, startsLine = ref5.startsLine); + if (inImplicitCall() && prevTag !== ',') { + endImplicitCall(); + } else if (inImplicitObject() && !this.insideForDeclaration && sameLine && tag !== 'TERMINATOR' && prevTag !== ':') { + endImplicitObject(); + } else if (inImplicitObject() && tag === 'TERMINATOR' && prevTag !== ',' && !(startsLine && this.looksObjectish(i + 1))) { + if (nextTag === 'HERECOMMENT') { + return forward(1); + } + endImplicitObject(); + } else { + break; + } + } + } + if (tag === ',' && !this.looksObjectish(i + 1) && inImplicitObject() && !this.insideForDeclaration && (nextTag !== 'TERMINATOR' || !this.looksObjectish(i + 2))) { + offset = nextTag === 'OUTDENT' ? 1 : 0; + while (inImplicitObject()) { + endImplicitObject(i + offset); + } + } + return forward(1); + }); + }; + + Rewriter.prototype.addLocationDataToGeneratedTokens = function() { + return this.scanTokens(function(token, i, tokens) { + var column, line, nextLocation, prevLocation, ref, ref1; + if (token[2]) { + return 1; + } + if (!(token.generated || token.explicit)) { + return 1; + } + if (token[0] === '{' && (nextLocation = (ref = tokens[i + 1]) != null ? ref[2] : void 0)) { + line = nextLocation.first_line, column = nextLocation.first_column; + } else if (prevLocation = (ref1 = tokens[i - 1]) != null ? ref1[2] : void 0) { + line = prevLocation.last_line, column = prevLocation.last_column; + } else { + line = column = 0; + } + token[2] = { + first_line: line, + first_column: column, + last_line: line, + last_column: column + }; + return 1; + }); + }; + + Rewriter.prototype.fixOutdentLocationData = function() { + return this.scanTokens(function(token, i, tokens) { + var prevLocationData; + if (!(token[0] === 'OUTDENT' || (token.generated && token[0] === 'CALL_END') || (token.generated && token[0] === '}'))) { + return 1; + } + prevLocationData = tokens[i - 1][2]; + token[2] = { + first_line: prevLocationData.last_line, + first_column: prevLocationData.last_column, + last_line: prevLocationData.last_line, + last_column: prevLocationData.last_column + }; + return 1; + }); + }; + + Rewriter.prototype.normalizeLines = function() { + var action, condition, indent, outdent, starter; + starter = indent = outdent = null; + condition = function(token, i) { + var ref, ref1, ref2, ref3; + return token[1] !== ';' && (ref = token[0], indexOf.call(SINGLE_CLOSERS, ref) >= 0) && !(token[0] === 'TERMINATOR' && (ref1 = this.tag(i + 1), indexOf.call(EXPRESSION_CLOSE, ref1) >= 0)) && !(token[0] === 'ELSE' && starter !== 'THEN') && !(((ref2 = token[0]) === 'CATCH' || ref2 === 'FINALLY') && (starter === '->' || starter === '=>')) || (ref3 = token[0], indexOf.call(CALL_CLOSERS, ref3) >= 0) && this.tokens[i - 1].newLine; + }; + action = function(token, i) { + return this.tokens.splice((this.tag(i - 1) === ',' ? i - 1 : i), 0, outdent); + }; + return this.scanTokens(function(token, i, tokens) { + var j, k, ref, ref1, ref2, tag; + tag = token[0]; + if (tag === 'TERMINATOR') { + if (this.tag(i + 1) === 'ELSE' && this.tag(i - 1) !== 'OUTDENT') { + tokens.splice.apply(tokens, [i, 1].concat(slice.call(this.indentation()))); + return 1; + } + if (ref = this.tag(i + 1), indexOf.call(EXPRESSION_CLOSE, ref) >= 0) { + tokens.splice(i, 1); + return 0; + } + } + if (tag === 'CATCH') { + for (j = k = 1; k <= 2; j = ++k) { + if (!((ref1 = this.tag(i + j)) === 'OUTDENT' || ref1 === 'TERMINATOR' || ref1 === 'FINALLY')) { + continue; + } + tokens.splice.apply(tokens, [i + j, 0].concat(slice.call(this.indentation()))); + return 2 + j; + } + } + if (indexOf.call(SINGLE_LINERS, tag) >= 0 && this.tag(i + 1) !== 'INDENT' && !(tag === 'ELSE' && this.tag(i + 1) === 'IF')) { + starter = tag; + ref2 = this.indentation(tokens[i]), indent = ref2[0], outdent = ref2[1]; + if (starter === 'THEN') { + indent.fromThen = true; + } + tokens.splice(i + 1, 0, indent); + this.detectEnd(i + 2, condition, action); + if (tag === 'THEN') { + tokens.splice(i, 1); + } + return 1; + } + return 1; + }); + }; + + Rewriter.prototype.tagPostfixConditionals = function() { + var action, condition, original; + original = null; + condition = function(token, i) { + var prevTag, tag; + tag = token[0]; + prevTag = this.tokens[i - 1][0]; + return tag === 'TERMINATOR' || (tag === 'INDENT' && indexOf.call(SINGLE_LINERS, prevTag) < 0); + }; + action = function(token, i) { + if (token[0] !== 'INDENT' || (token.generated && !token.fromThen)) { + return original[0] = 'POST_' + original[0]; + } + }; + return this.scanTokens(function(token, i) { + if (token[0] !== 'IF') { + return 1; + } + original = token; + this.detectEnd(i + 1, condition, action); + return 1; + }); + }; + + Rewriter.prototype.indentation = function(origin) { + var indent, outdent; + indent = ['INDENT', 2]; + outdent = ['OUTDENT', 2]; + if (origin) { + indent.generated = outdent.generated = true; + indent.origin = outdent.origin = origin; + } else { + indent.explicit = outdent.explicit = true; + } + return [indent, outdent]; + }; + + Rewriter.prototype.generate = generate; + + Rewriter.prototype.tag = function(i) { + var ref; + return (ref = this.tokens[i]) != null ? ref[0] : void 0; + }; + + return Rewriter; + + })(); + + BALANCED_PAIRS = [['(', ')'], ['[', ']'], ['{', '}'], ['INDENT', 'OUTDENT'], ['CALL_START', 'CALL_END'], ['PARAM_START', 'PARAM_END'], ['INDEX_START', 'INDEX_END'], ['STRING_START', 'STRING_END'], ['REGEX_START', 'REGEX_END']]; + + exports.INVERSES = INVERSES = {}; + + EXPRESSION_START = []; + + EXPRESSION_END = []; + + for (k = 0, len = BALANCED_PAIRS.length; k < len; k++) { + ref = BALANCED_PAIRS[k], left = ref[0], rite = ref[1]; + EXPRESSION_START.push(INVERSES[rite] = left); + EXPRESSION_END.push(INVERSES[left] = rite); + } + + EXPRESSION_CLOSE = ['CATCH', 'THEN', 'ELSE', 'FINALLY'].concat(EXPRESSION_END); + + IMPLICIT_FUNC = ['IDENTIFIER', 'PROPERTY', 'SUPER', ')', 'CALL_END', ']', 'INDEX_END', '@', 'THIS']; + + IMPLICIT_CALL = ['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', '@', '->', '=>', '[', '(', '{', '--', '++']; + + IMPLICIT_UNSPACED_CALL = ['+', '-']; + + IMPLICIT_END = ['POST_IF', 'FOR', 'WHILE', 'UNTIL', 'WHEN', 'BY', 'LOOP', 'TERMINATOR']; + + SINGLE_LINERS = ['ELSE', '->', '=>', 'TRY', 'FINALLY', 'THEN']; + + SINGLE_CLOSERS = ['TERMINATOR', 'CATCH', 'FINALLY', 'ELSE', 'OUTDENT', 'LEADING_WHEN']; + + LINEBREAKS = ['TERMINATOR', 'INDENT', 'OUTDENT']; + + CALL_CLOSERS = ['.', '?.', '::', '?::']; + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/scope.js b/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/scope.js new file mode 100644 index 00000000..33b257f0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/scope.js @@ -0,0 +1,165 @@ +// Generated by CoffeeScript 1.12.5 +(function() { + var Scope, + indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; + + exports.Scope = Scope = (function() { + function Scope(parent, expressions, method, referencedVars) { + var ref, ref1; + this.parent = parent; + this.expressions = expressions; + this.method = method; + this.referencedVars = referencedVars; + this.variables = [ + { + name: 'arguments', + type: 'arguments' + } + ]; + this.positions = {}; + if (!this.parent) { + this.utilities = {}; + } + this.root = (ref = (ref1 = this.parent) != null ? ref1.root : void 0) != null ? ref : this; + } + + Scope.prototype.add = function(name, type, immediate) { + if (this.shared && !immediate) { + return this.parent.add(name, type, immediate); + } + if (Object.prototype.hasOwnProperty.call(this.positions, name)) { + return this.variables[this.positions[name]].type = type; + } else { + return this.positions[name] = this.variables.push({ + name: name, + type: type + }) - 1; + } + }; + + Scope.prototype.namedMethod = function() { + var ref; + if (((ref = this.method) != null ? ref.name : void 0) || !this.parent) { + return this.method; + } + return this.parent.namedMethod(); + }; + + Scope.prototype.find = function(name, type) { + if (type == null) { + type = 'var'; + } + if (this.check(name)) { + return true; + } + this.add(name, type); + return false; + }; + + Scope.prototype.parameter = function(name) { + if (this.shared && this.parent.check(name, true)) { + return; + } + return this.add(name, 'param'); + }; + + Scope.prototype.check = function(name) { + var ref; + return !!(this.type(name) || ((ref = this.parent) != null ? ref.check(name) : void 0)); + }; + + Scope.prototype.temporary = function(name, index, single) { + var diff, endCode, letter, newCode, num, startCode; + if (single == null) { + single = false; + } + if (single) { + startCode = name.charCodeAt(0); + endCode = 'z'.charCodeAt(0); + diff = endCode - startCode; + newCode = startCode + index % (diff + 1); + letter = String.fromCharCode(newCode); + num = Math.floor(index / (diff + 1)); + return "" + letter + (num || ''); + } else { + return "" + name + (index || ''); + } + }; + + Scope.prototype.type = function(name) { + var i, len, ref, v; + ref = this.variables; + for (i = 0, len = ref.length; i < len; i++) { + v = ref[i]; + if (v.name === name) { + return v.type; + } + } + return null; + }; + + Scope.prototype.freeVariable = function(name, options) { + var index, ref, temp; + if (options == null) { + options = {}; + } + index = 0; + while (true) { + temp = this.temporary(name, index, options.single); + if (!(this.check(temp) || indexOf.call(this.root.referencedVars, temp) >= 0)) { + break; + } + index++; + } + if ((ref = options.reserve) != null ? ref : true) { + this.add(temp, 'var', true); + } + return temp; + }; + + Scope.prototype.assign = function(name, value) { + this.add(name, { + value: value, + assigned: true + }, true); + return this.hasAssignments = true; + }; + + Scope.prototype.hasDeclarations = function() { + return !!this.declaredVariables().length; + }; + + Scope.prototype.declaredVariables = function() { + var v; + return ((function() { + var i, len, ref, results; + ref = this.variables; + results = []; + for (i = 0, len = ref.length; i < len; i++) { + v = ref[i]; + if (v.type === 'var') { + results.push(v.name); + } + } + return results; + }).call(this)).sort(); + }; + + Scope.prototype.assignedVariables = function() { + var i, len, ref, results, v; + ref = this.variables; + results = []; + for (i = 0, len = ref.length; i < len; i++) { + v = ref[i]; + if (v.type.assigned) { + results.push(v.name + " = " + v.type.value); + } + } + return results; + }; + + return Scope; + + })(); + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/sourcemap.js b/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/sourcemap.js new file mode 100644 index 00000000..ec7ba1c9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffee-script/lib/coffee-script/sourcemap.js @@ -0,0 +1,161 @@ +// Generated by CoffeeScript 1.12.5 +(function() { + var LineMap, SourceMap; + + LineMap = (function() { + function LineMap(line1) { + this.line = line1; + this.columns = []; + } + + LineMap.prototype.add = function(column, arg, options) { + var sourceColumn, sourceLine; + sourceLine = arg[0], sourceColumn = arg[1]; + if (options == null) { + options = {}; + } + if (this.columns[column] && options.noReplace) { + return; + } + return this.columns[column] = { + line: this.line, + column: column, + sourceLine: sourceLine, + sourceColumn: sourceColumn + }; + }; + + LineMap.prototype.sourceLocation = function(column) { + var mapping; + while (!((mapping = this.columns[column]) || (column <= 0))) { + column--; + } + return mapping && [mapping.sourceLine, mapping.sourceColumn]; + }; + + return LineMap; + + })(); + + SourceMap = (function() { + var BASE64_CHARS, VLQ_CONTINUATION_BIT, VLQ_SHIFT, VLQ_VALUE_MASK; + + function SourceMap() { + this.lines = []; + } + + SourceMap.prototype.add = function(sourceLocation, generatedLocation, options) { + var base, column, line, lineMap; + if (options == null) { + options = {}; + } + line = generatedLocation[0], column = generatedLocation[1]; + lineMap = ((base = this.lines)[line] || (base[line] = new LineMap(line))); + return lineMap.add(column, sourceLocation, options); + }; + + SourceMap.prototype.sourceLocation = function(arg) { + var column, line, lineMap; + line = arg[0], column = arg[1]; + while (!((lineMap = this.lines[line]) || (line <= 0))) { + line--; + } + return lineMap && lineMap.sourceLocation(column); + }; + + SourceMap.prototype.generate = function(options, code) { + var buffer, i, j, lastColumn, lastSourceColumn, lastSourceLine, len, len1, lineMap, lineNumber, mapping, needComma, ref, ref1, v3, writingline; + if (options == null) { + options = {}; + } + if (code == null) { + code = null; + } + writingline = 0; + lastColumn = 0; + lastSourceLine = 0; + lastSourceColumn = 0; + needComma = false; + buffer = ""; + ref = this.lines; + for (lineNumber = i = 0, len = ref.length; i < len; lineNumber = ++i) { + lineMap = ref[lineNumber]; + if (lineMap) { + ref1 = lineMap.columns; + for (j = 0, len1 = ref1.length; j < len1; j++) { + mapping = ref1[j]; + if (!(mapping)) { + continue; + } + while (writingline < mapping.line) { + lastColumn = 0; + needComma = false; + buffer += ";"; + writingline++; + } + if (needComma) { + buffer += ","; + needComma = false; + } + buffer += this.encodeVlq(mapping.column - lastColumn); + lastColumn = mapping.column; + buffer += this.encodeVlq(0); + buffer += this.encodeVlq(mapping.sourceLine - lastSourceLine); + lastSourceLine = mapping.sourceLine; + buffer += this.encodeVlq(mapping.sourceColumn - lastSourceColumn); + lastSourceColumn = mapping.sourceColumn; + needComma = true; + } + } + } + v3 = { + version: 3, + file: options.generatedFile || '', + sourceRoot: options.sourceRoot || '', + sources: options.sourceFiles || [''], + names: [], + mappings: buffer + }; + if (options.inlineMap) { + v3.sourcesContent = [code]; + } + return v3; + }; + + VLQ_SHIFT = 5; + + VLQ_CONTINUATION_BIT = 1 << VLQ_SHIFT; + + VLQ_VALUE_MASK = VLQ_CONTINUATION_BIT - 1; + + SourceMap.prototype.encodeVlq = function(value) { + var answer, nextChunk, signBit, valueToEncode; + answer = ''; + signBit = value < 0 ? 1 : 0; + valueToEncode = (Math.abs(value) << 1) + signBit; + while (valueToEncode || !answer) { + nextChunk = valueToEncode & VLQ_VALUE_MASK; + valueToEncode = valueToEncode >> VLQ_SHIFT; + if (valueToEncode) { + nextChunk |= VLQ_CONTINUATION_BIT; + } + answer += this.encodeBase64(nextChunk); + } + return answer; + }; + + BASE64_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + + SourceMap.prototype.encodeBase64 = function(value) { + return BASE64_CHARS[value] || (function() { + throw new Error("Cannot Base64 encode value: " + value); + })(); + }; + + return SourceMap; + + })(); + + module.exports = SourceMap; + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/coffee-script/package.json b/pitfall/pdfkit/node_modules/coffee-script/package.json new file mode 100644 index 00000000..6de6bf22 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffee-script/package.json @@ -0,0 +1,121 @@ +{ + "_args": [ + [ + { + "raw": "coffee-script@>=1.0.1", + "scope": null, + "escapedName": "coffee-script", + "name": "coffee-script", + "rawSpec": ">=1.0.1", + "spec": ">=1.0.1", + "type": "range" + }, + "/Users/MB/git/pdfkit" + ] + ], + "_from": "coffee-script@>=1.0.1", + "_id": "coffee-script@1.12.5", + "_inCache": true, + "_location": "/coffee-script", + "_nodeVersion": "7.2.0", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/coffee-script-1.12.5.tgz_1491844538802_0.5896224051248282" + }, + "_npmUser": { + "name": "lydell", + "email": "simon.lydell@gmail.com" + }, + "_npmVersion": "3.10.9", + "_phantomChildren": {}, + "_requested": { + "raw": "coffee-script@>=1.0.1", + "scope": null, + "escapedName": "coffee-script", + "name": "coffee-script", + "rawSpec": ">=1.0.1", + "spec": ">=1.0.1", + "type": "range" + }, + "_requiredBy": [ + "#DEV:/" + ], + "_resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.12.5.tgz", + "_shasum": "809f4585419112bbfe46a073ad7543af18c27346", + "_shrinkwrap": null, + "_spec": "coffee-script@>=1.0.1", + "_where": "/Users/MB/git/pdfkit", + "author": { + "name": "Jeremy Ashkenas" + }, + "bin": { + "coffee": "./bin/coffee", + "cake": "./bin/cake" + }, + "bugs": { + "url": "https://github.com/jashkenas/coffeescript/issues" + }, + "dependencies": {}, + "description": "Unfancy JavaScript", + "devDependencies": { + "docco": "~0.7.0", + "google-closure-compiler-js": "^20170218.0.0", + "highlight.js": "~9.10.0", + "jison": ">=0.4.17", + "markdown-it": "^8.3.1", + "underscore": "~1.8.3" + }, + "directories": { + "lib": "./lib/coffee-script" + }, + "dist": { + "shasum": "809f4585419112bbfe46a073ad7543af18c27346", + "tarball": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.12.5.tgz" + }, + "engines": { + "node": ">=0.8.0" + }, + "files": [ + "bin", + "lib", + "register.js", + "repl.js" + ], + "gitHead": "72cf485dceb6a88abb3b83493032734409c3591a", + "homepage": "http://coffeescript.org", + "keywords": [ + "javascript", + "language", + "coffeescript", + "compiler" + ], + "license": "MIT", + "main": "./lib/coffee-script/coffee-script", + "maintainers": [ + { + "name": "jashkenas", + "email": "jashkenas@gmail.com" + }, + { + "name": "lydell", + "email": "simon.lydell@gmail.com" + }, + { + "name": "michaelficarra", + "email": "npm@michael.ficarra.me" + } + ], + "name": "coffee-script", + "optionalDependencies": {}, + "preferGlobal": true, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/jashkenas/coffeescript.git" + }, + "scripts": { + "test": "node ./bin/cake test", + "test-harmony": "node --harmony ./bin/cake test" + }, + "version": "1.12.5" +} diff --git a/pitfall/pdfkit/node_modules/coffee-script/register.js b/pitfall/pdfkit/node_modules/coffee-script/register.js new file mode 100644 index 00000000..97b33d72 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffee-script/register.js @@ -0,0 +1 @@ +require('./lib/coffee-script/register'); diff --git a/pitfall/pdfkit/node_modules/coffee-script/repl.js b/pitfall/pdfkit/node_modules/coffee-script/repl.js new file mode 100644 index 00000000..d2706a7a --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffee-script/repl.js @@ -0,0 +1 @@ +module.exports = require('./lib/coffee-script/repl'); diff --git a/pitfall/pdfkit/node_modules/coffeeify/.npmignore b/pitfall/pdfkit/node_modules/coffeeify/.npmignore new file mode 100644 index 00000000..c2658d7d --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/.npmignore @@ -0,0 +1 @@ +node_modules/ diff --git a/pitfall/pdfkit/node_modules/coffeeify/.travis.yml b/pitfall/pdfkit/node_modules/coffeeify/.travis.yml new file mode 100644 index 00000000..09d3ef37 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.8 + - 0.10 diff --git a/pitfall/pdfkit/node_modules/coffeeify/LICENSE b/pitfall/pdfkit/node_modules/coffeeify/LICENSE new file mode 100644 index 00000000..ee27ba4b --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/coffeeify/example/bar.js b/pitfall/pdfkit/node_modules/coffeeify/example/bar.js new file mode 100644 index 00000000..3761d104 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/example/bar.js @@ -0,0 +1 @@ +module.exports = require('./baz.coffee')(5) diff --git a/pitfall/pdfkit/node_modules/coffeeify/example/bat.js b/pitfall/pdfkit/node_modules/coffeeify/example/bat.js new file mode 100644 index 00000000..9ec5f2fa --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/example/bat.js @@ -0,0 +1 @@ +module.exports = require('./baz.litcoffee')(5) diff --git a/pitfall/pdfkit/node_modules/coffeeify/example/baz.coffee b/pitfall/pdfkit/node_modules/coffeeify/example/baz.coffee new file mode 100644 index 00000000..9a1e51c5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/example/baz.coffee @@ -0,0 +1 @@ +module.exports = (n) -> n * 111 diff --git a/pitfall/pdfkit/node_modules/coffeeify/example/baz.litcoffee b/pitfall/pdfkit/node_modules/coffeeify/example/baz.litcoffee new file mode 100644 index 00000000..3c5f9628 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/example/baz.litcoffee @@ -0,0 +1,3 @@ +Multiply all the things with 111 + + module.exports = (n) -> n * 111 diff --git a/pitfall/pdfkit/node_modules/coffeeify/example/error.coffee b/pitfall/pdfkit/node_modules/coffeeify/example/error.coffee new file mode 100644 index 00000000..ff7d1bc7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/example/error.coffee @@ -0,0 +1,5 @@ +#----------------------------------# +# hello, my name is: SµNTtaX E®Rör # +#----------------------------------# + +thisIsWrong = , 'waaa' diff --git a/pitfall/pdfkit/node_modules/coffeeify/example/foo.coffee b/pitfall/pdfkit/node_modules/coffeeify/example/foo.coffee new file mode 100644 index 00000000..7941a4bb --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/example/foo.coffee @@ -0,0 +1 @@ +console.log(require './bar.js') diff --git a/pitfall/pdfkit/node_modules/coffeeify/example/foo.litcoffee b/pitfall/pdfkit/node_modules/coffeeify/example/foo.litcoffee new file mode 100644 index 00000000..db9da67a --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/example/foo.litcoffee @@ -0,0 +1,3 @@ +Here is a bat + + console.log(require './bat.js') diff --git a/pitfall/pdfkit/node_modules/coffeeify/example/multiline_error.coffee b/pitfall/pdfkit/node_modules/coffeeify/example/multiline_error.coffee new file mode 100644 index 00000000..ad6a087c --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/example/multiline_error.coffee @@ -0,0 +1,7 @@ +#----------------------------------# +# hello, my name is: SµNTtaX E®Rör # +#----------------------------------# + + +'this is very wrong. notice that the first line is'' +longer' \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/coffeeify/index.js b/pitfall/pdfkit/node_modules/coffeeify/index.js new file mode 100644 index 00000000..c5674432 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/index.js @@ -0,0 +1,94 @@ +var coffee = require('coffee-script'); +var through = require('through'); +var convert = require('convert-source-map'); + +function isCoffee (file) { + return (/\.((lit)?coffee|coffee\.md)$/).test(file); +} + +function isLiterate (file) { + return (/\.(litcoffee|coffee\.md)$/).test(file); +} + +function ParseError(error, src, file) { + /* Creates a ParseError from a CoffeeScript SyntaxError + modeled after substack's syntax-error module */ + SyntaxError.call(this); + + this.message = error.message; + + this.line = error.location.first_line + 1; // cs linenums are 0-indexed + this.column = error.location.first_column + 1; // same with columns + + var markerLen = 2; + if(error.location.first_line === error.location.last_line) { + markerLen += error.location.last_column - error.location.first_column; + } + this.annotated = [ + file + ':' + this.line, + src.split('\n')[this.line - 1], + Array(this.column).join(' ') + Array(markerLen).join('^'), + 'ParseError: ' + this.message + ].join('\n'); +} + +ParseError.prototype = Object.create(SyntaxError.prototype); + +ParseError.prototype.toString = function () { + return this.annotated; +}; + +ParseError.prototype.inspect = function () { + return this.annotated; +}; + +function compile(file, data, callback) { + var compiled; + try { + compiled = coffee.compile(data, { + sourceMap: true, + generatedFile: file, + inline: true, + bare: true, + literate: isLiterate(file) + }); + } catch (e) { + var error = e; + if (e.location) { + error = new ParseError(e, data, file); + } + callback(error); + return; + } + + var map = convert.fromJSON(compiled.v3SourceMap); + map.setProperty('sources', [file]); + + callback(null, compiled.js + '\n' + map.toComment()); +} + +function coffeeify(file) { + if (!isCoffee(file)) return through(); + + var data = '', stream = through(write, end); + + return stream; + + function write(buf) { + data += buf; + } + + function end() { + compile(file, data, function(error, result) { + if (error) stream.emit('error', error); + stream.queue(result); + stream.queue(null); + }); + } +} + +coffeeify.compile = compile; +coffeeify.isCoffee = isCoffee; +coffeeify.isLiterate = isLiterate; + +module.exports = coffeeify; diff --git a/pitfall/pdfkit/node_modules/coffeeify/node_modules/.bin/cake b/pitfall/pdfkit/node_modules/coffeeify/node_modules/.bin/cake new file mode 120000 index 00000000..d95f32af --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/node_modules/.bin/cake @@ -0,0 +1 @@ +../coffee-script/bin/cake \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/coffeeify/node_modules/.bin/coffee b/pitfall/pdfkit/node_modules/coffeeify/node_modules/.bin/coffee new file mode 120000 index 00000000..b57f275d --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/node_modules/.bin/coffee @@ -0,0 +1 @@ +../coffee-script/bin/coffee \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/.npmignore b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/.npmignore new file mode 100644 index 00000000..21e430d2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/.npmignore @@ -0,0 +1,11 @@ +*.coffee +*.html +.DS_Store +.git* +Cakefile +documentation/ +examples/ +extras/coffee-script.js +raw/ +src/ +test/ diff --git a/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/CNAME b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/CNAME new file mode 100644 index 00000000..faadabe5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/CNAME @@ -0,0 +1 @@ +coffeescript.org \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/CONTRIBUTING.md b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/CONTRIBUTING.md new file mode 100644 index 00000000..6390c68b --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/CONTRIBUTING.md @@ -0,0 +1,9 @@ +## How to contribute to CoffeeScript + +* Before you open a ticket or send a pull request, [search](https://github.com/jashkenas/coffee-script/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/coffee-script/tree/master/test). + +* Use the same coding style as the rest of the [codebase](https://github.com/jashkenas/coffee-script/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. \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/LICENSE b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/LICENSE new file mode 100644 index 00000000..4d09b4d9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2009-2014 Jeremy Ashkenas + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +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. diff --git a/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/README b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/README new file mode 100644 index 00000000..a297e28c --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/README @@ -0,0 +1,50 @@ + { + } } { + { { } } + } }{ { + { }{ } } _____ __ __ + { }{ }{ { } / ____| / _|/ _| + .- { { } { }} -. | | ___ | |_| |_ ___ ___ + ( { } { } { } } ) | | / _ \| _| _/ _ \/ _ \ + |`-..________ ..-'| | |___| (_) | | | || __/ __/ + | | \_____\___/|_| |_| \___|\___| + | ;--. + | (__ \ _____ _ _ + | | ) ) / ____| (_) | | + | |/ / | (___ ___ _ __ _ _ __ | |_ + | ( / \___ \ / __| '__| | '_ \| __| + | |/ ____) | (__| | | | |_) | |_ + | | |_____/ \___|_| |_| .__/ \__| + `-.._________..-' | | + |_| + + + CoffeeScript is a little language that compiles into JavaScript. + + If you have the Node Package Manager installed: + npm install -g coffee-script + (Leave off the -g if you don't wish to install globally.) + + Or, if you don't wish to use npm: + sudo bin/cake install + + Execute a script: + coffee /path/to/script.coffee + + Compile a script: + coffee -c /path/to/script.coffee + + For documentation, usage, and examples, see: + http://coffeescript.org/ + + To suggest a feature, report a bug, or general discussion: + http://github.com/jashkenas/coffee-script/issues/ + + If you'd like to chat, drop by #coffeescript on Freenode IRC, + or on webchat.freenode.net. + + The source repository: + git://github.com/jashkenas/coffee-script.git + + Top 100 contributors are listed here: + http://github.com/jashkenas/coffee-script/contributors diff --git a/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/bin/cake b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/bin/cake new file mode 100755 index 00000000..5965f4ee --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/bin/cake @@ -0,0 +1,7 @@ +#!/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(); diff --git a/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/bin/coffee b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/bin/coffee new file mode 100755 index 00000000..3d1d71c8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/bin/coffee @@ -0,0 +1,7 @@ +#!/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/command').run(); diff --git a/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/browser.js b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/browser.js new file mode 100644 index 00000000..3a4bf117 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/browser.js @@ -0,0 +1,134 @@ +// Generated by CoffeeScript 1.7.1 +(function() { + var CoffeeScript, compile, runScripts, + __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; + + CoffeeScript = require('./coffee-script'); + + CoffeeScript.require = require; + + compile = CoffeeScript.compile; + + CoffeeScript["eval"] = function(code, options) { + if (options == null) { + options = {}; + } + if (options.bare == null) { + options.bare = true; + } + return eval(compile(code, options)); + }; + + CoffeeScript.run = function(code, options) { + if (options == null) { + options = {}; + } + options.bare = true; + options.shiftLine = true; + return Function(compile(code, options))(); + }; + + if (typeof window === "undefined" || window === null) { + return; + } + + if ((typeof btoa !== "undefined" && btoa !== null) && (typeof JSON !== "undefined" && JSON !== null) && (typeof unescape !== "undefined" && unescape !== null) && (typeof encodeURIComponent !== "undefined" && encodeURIComponent !== null)) { + compile = function(code, options) { + var js, v3SourceMap, _ref; + if (options == null) { + options = {}; + } + options.sourceMap = true; + options.inline = true; + _ref = CoffeeScript.compile(code, options), js = _ref.js, v3SourceMap = _ref.v3SourceMap; + return "" + js + "\n//# sourceMappingURL=data:application/json;base64," + (btoa(unescape(encodeURIComponent(v3SourceMap)))) + "\n//# sourceURL=coffeescript"; + }; + } + + CoffeeScript.load = function(url, callback, options, hold) { + var xhr; + if (options == null) { + options = {}; + } + if (hold == null) { + hold = false; + } + options.sourceFiles = [url]; + xhr = window.ActiveXObject ? new window.ActiveXObject('Microsoft.XMLHTTP') : new window.XMLHttpRequest(); + xhr.open('GET', url, true); + if ('overrideMimeType' in xhr) { + xhr.overrideMimeType('text/plain'); + } + xhr.onreadystatechange = function() { + var param, _ref; + if (xhr.readyState === 4) { + if ((_ref = xhr.status) === 0 || _ref === 200) { + param = [xhr.responseText, options]; + if (!hold) { + CoffeeScript.run.apply(CoffeeScript, param); + } + } else { + throw new Error("Could not load " + url); + } + if (callback) { + return callback(param); + } + } + }; + return xhr.send(null); + }; + + runScripts = function() { + var coffees, coffeetypes, execute, i, index, s, script, scripts, _fn, _i, _len; + scripts = window.document.getElementsByTagName('script'); + coffeetypes = ['text/coffeescript', 'text/literate-coffeescript']; + coffees = (function() { + var _i, _len, _ref, _results; + _results = []; + for (_i = 0, _len = scripts.length; _i < _len; _i++) { + s = scripts[_i]; + if (_ref = s.type, __indexOf.call(coffeetypes, _ref) >= 0) { + _results.push(s); + } + } + return _results; + })(); + index = 0; + execute = function() { + var param; + param = coffees[index]; + if (param instanceof Array) { + CoffeeScript.run.apply(CoffeeScript, param); + index++; + return execute(); + } + }; + _fn = function(script, i) { + var options; + options = { + literate: script.type === coffeetypes[1] + }; + if (script.src) { + return CoffeeScript.load(script.src, function(param) { + coffees[i] = param; + return execute(); + }, options, true); + } else { + options.sourceFiles = ['embedded']; + return coffees[i] = [script.innerHTML, options]; + } + }; + for (i = _i = 0, _len = coffees.length; _i < _len; i = ++_i) { + script = coffees[i]; + _fn(script, i); + } + return execute(); + }; + + if (window.addEventListener) { + window.addEventListener('DOMContentLoaded', runScripts, false); + } else { + window.attachEvent('onload', runScripts); + } + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/cake.js b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/cake.js new file mode 100644 index 00000000..72583346 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/cake.js @@ -0,0 +1,112 @@ +// Generated by CoffeeScript 1.7.1 +(function() { + var CoffeeScript, cakefileDirectory, fatalError, fs, helpers, missingTask, oparse, options, optparse, path, printTasks, switches, tasks; + + fs = require('fs'); + + path = require('path'); + + helpers = require('./helpers'); + + optparse = require('./optparse'); + + CoffeeScript = require('./coffee-script'); + + tasks = {}; + + options = {}; + + switches = []; + + oparse = null; + + helpers.extend(global, { + task: function(name, description, action) { + var _ref; + if (!action) { + _ref = [description, action], action = _ref[0], description = _ref[1]; + } + return tasks[name] = { + name: name, + description: description, + action: action + }; + }, + option: function(letter, flag, description) { + return switches.push([letter, flag, description]); + }, + invoke: function(name) { + if (!tasks[name]) { + missingTask(name); + } + return tasks[name].action(options); + } + }); + + exports.run = function() { + var arg, args, e, _i, _len, _ref, _results; + global.__originalDirname = fs.realpathSync('.'); + process.chdir(cakefileDirectory(__originalDirname)); + args = process.argv.slice(2); + CoffeeScript.run(fs.readFileSync('Cakefile').toString(), { + filename: 'Cakefile' + }); + oparse = new optparse.OptionParser(switches); + if (!args.length) { + return printTasks(); + } + try { + options = oparse.parse(args); + } catch (_error) { + e = _error; + return fatalError("" + e); + } + _ref = options["arguments"]; + _results = []; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + arg = _ref[_i]; + _results.push(invoke(arg)); + } + return _results; + }; + + printTasks = function() { + var cakefilePath, desc, name, relative, spaces, task; + relative = path.relative || path.resolve; + cakefilePath = path.join(relative(__originalDirname, process.cwd()), 'Cakefile'); + console.log("" + cakefilePath + " defines the following tasks:\n"); + for (name in tasks) { + task = tasks[name]; + spaces = 20 - name.length; + spaces = spaces > 0 ? Array(spaces + 1).join(' ') : ''; + desc = task.description ? "# " + task.description : ''; + console.log("cake " + name + spaces + " " + desc); + } + if (switches.length) { + return console.log(oparse.help()); + } + }; + + fatalError = function(message) { + console.error(message + '\n'); + console.log('To see a list of all tasks/options, run "cake"'); + return process.exit(1); + }; + + missingTask = function(task) { + return fatalError("No such task: " + task); + }; + + cakefileDirectory = function(dir) { + var parent; + if (fs.existsSync(path.join(dir, 'Cakefile'))) { + return dir; + } + parent = path.normalize(path.join(dir, '..')); + if (parent !== dir) { + return cakefileDirectory(parent); + } + throw new Error("Cakefile not found in " + (process.cwd())); + }; + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/coffee-script.js b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/coffee-script.js new file mode 100644 index 00000000..ef365dad --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/coffee-script.js @@ -0,0 +1,335 @@ +// Generated by CoffeeScript 1.7.1 +(function() { + var Lexer, SourceMap, compile, formatSourcePosition, fs, getSourceMap, helpers, lexer, parser, path, sourceMaps, vm, withPrettyErrors, + __hasProp = {}.hasOwnProperty, + __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; + + fs = require('fs'); + + vm = require('vm'); + + path = require('path'); + + Lexer = require('./lexer').Lexer; + + parser = require('./parser').parser; + + helpers = require('./helpers'); + + SourceMap = require('./sourcemap'); + + exports.VERSION = '1.7.1'; + + exports.FILE_EXTENSIONS = ['.coffee', '.litcoffee', '.coffee.md']; + + exports.helpers = helpers; + + withPrettyErrors = function(fn) { + return function(code, options) { + var err; + if (options == null) { + options = {}; + } + try { + return fn.call(this, code, options); + } catch (_error) { + err = _error; + throw helpers.updateSyntaxError(err, code, options.filename); + } + }; + }; + + exports.compile = compile = withPrettyErrors(function(code, options) { + var answer, currentColumn, currentLine, extend, fragment, fragments, header, js, map, merge, newLines, _i, _len; + merge = helpers.merge, extend = helpers.extend; + options = extend({}, options); + if (options.sourceMap) { + map = new SourceMap; + } + fragments = parser.parse(lexer.tokenize(code, options)).compileToFragments(options); + currentLine = 0; + if (options.header) { + currentLine += 1; + } + if (options.shiftLine) { + currentLine += 1; + } + currentColumn = 0; + js = ""; + for (_i = 0, _len = fragments.length; _i < _len; _i++) { + fragment = fragments[_i]; + if (options.sourceMap) { + if (fragment.locationData) { + map.add([fragment.locationData.first_line, fragment.locationData.first_column], [currentLine, currentColumn], { + noReplace: true + }); + } + newLines = helpers.count(fragment.code, "\n"); + currentLine += newLines; + if (newLines) { + currentColumn = fragment.code.length - (fragment.code.lastIndexOf("\n") + 1); + } else { + currentColumn += fragment.code.length; + } + } + js += fragment.code; + } + if (options.header) { + header = "Generated by CoffeeScript " + this.VERSION; + js = "// " + header + "\n" + js; + } + if (options.sourceMap) { + answer = { + js: js + }; + answer.sourceMap = map; + answer.v3SourceMap = map.generate(options, code); + return answer; + } else { + return js; + } + }); + + exports.tokens = withPrettyErrors(function(code, options) { + return lexer.tokenize(code, options); + }); + + exports.nodes = withPrettyErrors(function(source, options) { + if (typeof source === 'string') { + return parser.parse(lexer.tokenize(source, options)); + } else { + return parser.parse(source); + } + }); + + exports.run = function(code, options) { + var answer, dir, mainModule, _ref; + if (options == null) { + options = {}; + } + mainModule = require.main; + mainModule.filename = process.argv[1] = options.filename ? fs.realpathSync(options.filename) : '.'; + mainModule.moduleCache && (mainModule.moduleCache = {}); + dir = options.filename ? path.dirname(fs.realpathSync(options.filename)) : fs.realpathSync('.'); + mainModule.paths = require('module')._nodeModulePaths(dir); + if (!helpers.isCoffee(mainModule.filename) || require.extensions) { + answer = compile(code, options); + code = (_ref = answer.js) != null ? _ref : answer; + } + return mainModule._compile(code, mainModule.filename); + }; + + exports["eval"] = function(code, options) { + var Module, Script, js, k, o, r, sandbox, v, _i, _len, _module, _ref, _ref1, _require; + if (options == null) { + options = {}; + } + if (!(code = code.trim())) { + return; + } + Script = vm.Script; + if (Script) { + if (options.sandbox != null) { + if (options.sandbox instanceof Script.createContext().constructor) { + sandbox = options.sandbox; + } else { + sandbox = Script.createContext(); + _ref = options.sandbox; + for (k in _ref) { + if (!__hasProp.call(_ref, k)) continue; + v = _ref[k]; + sandbox[k] = v; + } + } + sandbox.global = sandbox.root = sandbox.GLOBAL = sandbox; + } else { + sandbox = global; + } + sandbox.__filename = options.filename || 'eval'; + sandbox.__dirname = path.dirname(sandbox.__filename); + if (!(sandbox !== global || sandbox.module || sandbox.require)) { + Module = require('module'); + sandbox.module = _module = new Module(options.modulename || 'eval'); + sandbox.require = _require = function(path) { + return Module._load(path, _module, true); + }; + _module.filename = sandbox.__filename; + _ref1 = Object.getOwnPropertyNames(require); + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + r = _ref1[_i]; + if (r !== 'paths') { + _require[r] = require[r]; + } + } + _require.paths = _module.paths = Module._nodeModulePaths(process.cwd()); + _require.resolve = function(request) { + return Module._resolveFilename(request, _module); + }; + } + } + o = {}; + for (k in options) { + if (!__hasProp.call(options, k)) continue; + v = options[k]; + o[k] = v; + } + o.bare = true; + js = compile(code, o); + if (sandbox === global) { + return vm.runInThisContext(js); + } else { + return vm.runInContext(js, sandbox); + } + }; + + exports.register = function() { + return require('./register'); + }; + + exports._compileFile = function(filename, sourceMap) { + var answer, err, raw, stripped; + if (sourceMap == null) { + sourceMap = false; + } + raw = fs.readFileSync(filename, 'utf8'); + stripped = raw.charCodeAt(0) === 0xFEFF ? raw.substring(1) : raw; + try { + answer = compile(stripped, { + filename: filename, + sourceMap: sourceMap, + literate: helpers.isLiterate(filename) + }); + } catch (_error) { + err = _error; + throw helpers.updateSyntaxError(err, stripped, filename); + } + return answer; + }; + + lexer = new Lexer; + + parser.lexer = { + lex: function() { + var tag, token; + token = this.tokens[this.pos++]; + if (token) { + tag = token[0], this.yytext = token[1], this.yylloc = token[2]; + this.errorToken = token.origin || token; + this.yylineno = this.yylloc.first_line; + } else { + tag = ''; + } + return tag; + }, + setInput: function(tokens) { + this.tokens = tokens; + return this.pos = 0; + }, + upcomingInput: function() { + return ""; + } + }; + + parser.yy = require('./nodes'); + + parser.yy.parseError = function(message, _arg) { + var errorLoc, errorTag, errorText, errorToken, token, tokens, _ref; + token = _arg.token; + _ref = parser.lexer, errorToken = _ref.errorToken, tokens = _ref.tokens; + errorTag = errorToken[0], errorText = errorToken[1], errorLoc = errorToken[2]; + errorText = errorToken === tokens[tokens.length - 1] ? 'end of input' : errorTag === 'INDENT' || errorTag === 'OUTDENT' ? 'indentation' : helpers.nameWhitespaceCharacter(errorText); + return helpers.throwSyntaxError("unexpected " + errorText, errorLoc); + }; + + formatSourcePosition = function(frame, getSourceMapping) { + var as, column, fileLocation, fileName, functionName, isConstructor, isMethodCall, line, methodName, source, tp, typeName; + fileName = void 0; + fileLocation = ''; + if (frame.isNative()) { + fileLocation = "native"; + } else { + if (frame.isEval()) { + fileName = frame.getScriptNameOrSourceURL(); + if (!fileName) { + fileLocation = "" + (frame.getEvalOrigin()) + ", "; + } + } else { + fileName = frame.getFileName(); + } + fileName || (fileName = ""); + line = frame.getLineNumber(); + column = frame.getColumnNumber(); + source = getSourceMapping(fileName, line, column); + fileLocation = source ? "" + fileName + ":" + source[0] + ":" + source[1] : "" + fileName + ":" + line + ":" + column; + } + functionName = frame.getFunctionName(); + isConstructor = frame.isConstructor(); + isMethodCall = !(frame.isToplevel() || isConstructor); + if (isMethodCall) { + methodName = frame.getMethodName(); + typeName = frame.getTypeName(); + if (functionName) { + tp = as = ''; + if (typeName && functionName.indexOf(typeName)) { + tp = "" + typeName + "."; + } + if (methodName && functionName.indexOf("." + methodName) !== functionName.length - methodName.length - 1) { + as = " [as " + methodName + "]"; + } + return "" + tp + functionName + as + " (" + fileLocation + ")"; + } else { + return "" + typeName + "." + (methodName || '') + " (" + fileLocation + ")"; + } + } else if (isConstructor) { + return "new " + (functionName || '') + " (" + fileLocation + ")"; + } else if (functionName) { + return "" + functionName + " (" + fileLocation + ")"; + } else { + return fileLocation; + } + }; + + sourceMaps = {}; + + getSourceMap = function(filename) { + var answer, _ref; + if (sourceMaps[filename]) { + return sourceMaps[filename]; + } + if (_ref = path != null ? path.extname(filename) : void 0, __indexOf.call(exports.FILE_EXTENSIONS, _ref) < 0) { + return; + } + answer = exports._compileFile(filename, true); + return sourceMaps[filename] = answer.sourceMap; + }; + + Error.prepareStackTrace = function(err, stack) { + var frame, frames, getSourceMapping, _ref; + getSourceMapping = function(filename, line, column) { + var answer, sourceMap; + sourceMap = getSourceMap(filename); + if (sourceMap) { + answer = sourceMap.sourceLocation([line - 1, column - 1]); + } + if (answer) { + return [answer[0] + 1, answer[1] + 1]; + } else { + return null; + } + }; + frames = (function() { + var _i, _len, _results; + _results = []; + for (_i = 0, _len = stack.length; _i < _len; _i++) { + frame = stack[_i]; + if (frame.getFunction() === exports.run) { + break; + } + _results.push(" at " + (formatSourcePosition(frame, getSourceMapping))); + } + return _results; + })(); + return "" + err.name + ": " + ((_ref = err.message) != null ? _ref : '') + "\n" + (frames.join('\n')) + "\n"; + }; + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/command.js b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/command.js new file mode 100644 index 00000000..ec743fc5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/command.js @@ -0,0 +1,569 @@ +// Generated by CoffeeScript 1.7.1 +(function() { + var BANNER, CoffeeScript, EventEmitter, SWITCHES, compileJoin, compileOptions, compilePath, compileScript, compileStdio, exec, findDirectoryIndex, forkNode, fs, helpers, hidden, joinTimeout, mkdirp, notSources, optionParser, optparse, opts, outputPath, parseOptions, path, printLine, printTokens, printWarn, removeSource, removeSourceDir, silentUnlink, sourceCode, sources, spawn, timeLog, usage, useWinPathSep, version, wait, watch, watchDir, watchedDirs, writeJs, _ref, + __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; + + fs = require('fs'); + + path = require('path'); + + helpers = require('./helpers'); + + optparse = require('./optparse'); + + CoffeeScript = require('./coffee-script'); + + mkdirp = require('mkdirp'); + + _ref = require('child_process'), spawn = _ref.spawn, exec = _ref.exec; + + EventEmitter = require('events').EventEmitter; + + useWinPathSep = path.sep === '\\'; + + helpers.extend(CoffeeScript, new EventEmitter); + + printLine = function(line) { + return process.stdout.write(line + '\n'); + }; + + printWarn = function(line) { + return process.stderr.write(line + '\n'); + }; + + hidden = function(file) { + return /^\.|~$/.test(file); + }; + + BANNER = 'Usage: coffee [options] path/to/script.coffee -- [args]\n\nIf called without options, `coffee` will run your script.'; + + SWITCHES = [['-b', '--bare', 'compile without a top-level function wrapper'], ['-c', '--compile', 'compile to JavaScript and save as .js files'], ['-e', '--eval', 'pass a string from the command line as input'], ['-h', '--help', 'display this help message'], ['-i', '--interactive', 'run an interactive CoffeeScript REPL'], ['-j', '--join [FILE]', 'concatenate the source CoffeeScript before compiling'], ['-m', '--map', 'generate source map and save as .map files'], ['-n', '--nodes', 'print out the parse tree that the parser produces'], ['--nodejs [ARGS]', 'pass options directly to the "node" binary'], ['--no-header', 'suppress the "Generated by" header'], ['-o', '--output [DIR]', 'set the output directory for compiled JavaScript'], ['-p', '--print', 'print out the compiled JavaScript'], ['-s', '--stdio', 'listen for and compile scripts over stdio'], ['-l', '--literate', 'treat stdio as literate style coffee-script'], ['-t', '--tokens', 'print out the tokens that the lexer/rewriter produce'], ['-v', '--version', 'display the version number'], ['-w', '--watch', 'watch scripts for changes and rerun commands']]; + + opts = {}; + + sources = []; + + sourceCode = []; + + notSources = {}; + + watchedDirs = {}; + + optionParser = null; + + exports.run = function() { + var literals, replCliOpts, source, _i, _len, _ref1, _results; + parseOptions(); + replCliOpts = { + useGlobal: true + }; + if (opts.nodejs) { + return forkNode(); + } + if (opts.help) { + return usage(); + } + if (opts.version) { + return version(); + } + if (opts.interactive) { + return require('./repl').start(replCliOpts); + } + if (opts.stdio) { + return compileStdio(); + } + if (opts["eval"]) { + return compileScript(null, opts["arguments"][0]); + } + if (!opts["arguments"].length) { + return require('./repl').start(replCliOpts); + } + literals = opts.run ? opts["arguments"].splice(1) : []; + process.argv = process.argv.slice(0, 2).concat(literals); + process.argv[0] = 'coffee'; + if (opts.output) { + opts.output = path.resolve(opts.output); + } + if (opts.join) { + opts.join = path.resolve(opts.join); + } + _ref1 = opts["arguments"]; + _results = []; + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + source = _ref1[_i]; + source = path.resolve(source); + _results.push(compilePath(source, true, source)); + } + return _results; + }; + + compilePath = function(source, topLevel, base) { + var code, err, file, files, stats, _i, _len, _results; + if (__indexOf.call(sources, source) >= 0 || watchedDirs[source] || !topLevel && (notSources[source] || hidden(source))) { + return; + } + try { + stats = fs.statSync(source); + } catch (_error) { + err = _error; + if (err.code === 'ENOENT') { + console.error("File not found: " + source); + process.exit(1); + } + throw err; + } + if (stats.isDirectory()) { + if (path.basename(source) === 'node_modules') { + notSources[source] = true; + return; + } + if (opts.run) { + compilePath(findDirectoryIndex(source), topLevel, base); + return; + } + if (opts.watch) { + watchDir(source, base); + } + try { + files = fs.readdirSync(source); + } catch (_error) { + err = _error; + if (err.code === 'ENOENT') { + return; + } else { + throw err; + } + } + _results = []; + for (_i = 0, _len = files.length; _i < _len; _i++) { + file = files[_i]; + _results.push(compilePath(path.join(source, file), false, base)); + } + return _results; + } else if (topLevel || helpers.isCoffee(source)) { + sources.push(source); + sourceCode.push(null); + delete notSources[source]; + if (opts.watch) { + watch(source, base); + } + try { + code = fs.readFileSync(source); + } catch (_error) { + err = _error; + if (err.code === 'ENOENT') { + return; + } else { + throw err; + } + } + return compileScript(source, code.toString(), base); + } else { + return notSources[source] = true; + } + }; + + findDirectoryIndex = function(source) { + var err, ext, index, _i, _len, _ref1; + _ref1 = CoffeeScript.FILE_EXTENSIONS; + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + ext = _ref1[_i]; + index = path.join(source, "index" + ext); + try { + if ((fs.statSync(index)).isFile()) { + return index; + } + } catch (_error) { + err = _error; + if (err.code !== 'ENOENT') { + throw err; + } + } + } + console.error("Missing index.coffee or index.litcoffee in " + source); + return process.exit(1); + }; + + compileScript = function(file, input, base) { + var compiled, err, message, o, options, t, task; + if (base == null) { + base = null; + } + o = opts; + options = compileOptions(file, base); + try { + t = task = { + file: file, + input: input, + options: options + }; + CoffeeScript.emit('compile', task); + if (o.tokens) { + return printTokens(CoffeeScript.tokens(t.input, t.options)); + } else if (o.nodes) { + return printLine(CoffeeScript.nodes(t.input, t.options).toString().trim()); + } else if (o.run) { + CoffeeScript.register(); + return CoffeeScript.run(t.input, t.options); + } else if (o.join && t.file !== o.join) { + if (helpers.isLiterate(file)) { + t.input = helpers.invertLiterate(t.input); + } + sourceCode[sources.indexOf(t.file)] = t.input; + return compileJoin(); + } else { + compiled = CoffeeScript.compile(t.input, t.options); + t.output = compiled; + if (o.map) { + t.output = compiled.js; + t.sourceMap = compiled.v3SourceMap; + } + CoffeeScript.emit('success', task); + if (o.print) { + return printLine(t.output.trim()); + } else if (o.compile || o.map) { + return writeJs(base, t.file, t.output, options.jsPath, t.sourceMap); + } + } + } catch (_error) { + err = _error; + CoffeeScript.emit('failure', err, task); + if (CoffeeScript.listeners('failure').length) { + return; + } + message = err.stack || ("" + err); + if (o.watch) { + return printLine(message + '\x07'); + } else { + printWarn(message); + return process.exit(1); + } + } + }; + + compileStdio = function() { + var code, stdin; + code = ''; + stdin = process.openStdin(); + stdin.on('data', function(buffer) { + if (buffer) { + return code += buffer.toString(); + } + }); + return stdin.on('end', function() { + return compileScript(null, code); + }); + }; + + joinTimeout = null; + + compileJoin = function() { + if (!opts.join) { + return; + } + if (!sourceCode.some(function(code) { + return code === null; + })) { + clearTimeout(joinTimeout); + return joinTimeout = wait(100, function() { + return compileScript(opts.join, sourceCode.join('\n'), opts.join); + }); + } + }; + + watch = function(source, base) { + var compile, compileTimeout, err, prevStats, rewatch, startWatcher, watchErr, watcher; + watcher = null; + prevStats = null; + compileTimeout = null; + watchErr = function(err) { + if (err.code !== 'ENOENT') { + throw err; + } + if (__indexOf.call(sources, source) < 0) { + return; + } + try { + rewatch(); + return compile(); + } catch (_error) { + removeSource(source, base); + return compileJoin(); + } + }; + compile = function() { + clearTimeout(compileTimeout); + return compileTimeout = wait(25, function() { + return fs.stat(source, function(err, stats) { + if (err) { + return watchErr(err); + } + if (prevStats && stats.size === prevStats.size && stats.mtime.getTime() === prevStats.mtime.getTime()) { + return rewatch(); + } + prevStats = stats; + return fs.readFile(source, function(err, code) { + if (err) { + return watchErr(err); + } + compileScript(source, code.toString(), base); + return rewatch(); + }); + }); + }); + }; + startWatcher = function() { + return watcher = fs.watch(source).on('change', compile).on('error', function(err) { + if (err.code !== 'EPERM') { + throw err; + } + return removeSource(source, base); + }); + }; + rewatch = function() { + if (watcher != null) { + watcher.close(); + } + return startWatcher(); + }; + try { + return startWatcher(); + } catch (_error) { + err = _error; + return watchErr(err); + } + }; + + watchDir = function(source, base) { + var err, readdirTimeout, startWatcher, stopWatcher, watcher; + watcher = null; + readdirTimeout = null; + startWatcher = function() { + return watcher = fs.watch(source).on('error', function(err) { + if (err.code !== 'EPERM') { + throw err; + } + return stopWatcher(); + }).on('change', function() { + clearTimeout(readdirTimeout); + return readdirTimeout = wait(25, function() { + var err, file, files, _i, _len, _results; + try { + files = fs.readdirSync(source); + } catch (_error) { + err = _error; + if (err.code !== 'ENOENT') { + throw err; + } + return stopWatcher(); + } + _results = []; + for (_i = 0, _len = files.length; _i < _len; _i++) { + file = files[_i]; + _results.push(compilePath(path.join(source, file), false, base)); + } + return _results; + }); + }); + }; + stopWatcher = function() { + watcher.close(); + return removeSourceDir(source, base); + }; + watchedDirs[source] = true; + try { + return startWatcher(); + } catch (_error) { + err = _error; + if (err.code !== 'ENOENT') { + throw err; + } + } + }; + + removeSourceDir = function(source, base) { + var file, sourcesChanged, _i, _len; + delete watchedDirs[source]; + sourcesChanged = false; + for (_i = 0, _len = sources.length; _i < _len; _i++) { + file = sources[_i]; + if (!(source === path.dirname(file))) { + continue; + } + removeSource(file, base); + sourcesChanged = true; + } + if (sourcesChanged) { + return compileJoin(); + } + }; + + removeSource = function(source, base) { + var index; + index = sources.indexOf(source); + sources.splice(index, 1); + sourceCode.splice(index, 1); + if (!opts.join) { + silentUnlink(outputPath(source, base)); + silentUnlink(outputPath(source, base, '.map')); + return timeLog("removed " + source); + } + }; + + silentUnlink = function(path) { + var err, _ref1; + try { + return fs.unlinkSync(path); + } catch (_error) { + err = _error; + if ((_ref1 = err.code) !== 'ENOENT' && _ref1 !== 'EPERM') { + throw err; + } + } + }; + + outputPath = function(source, base, extension) { + var basename, dir, srcDir; + if (extension == null) { + extension = ".js"; + } + basename = helpers.baseFileName(source, true, useWinPathSep); + srcDir = path.dirname(source); + if (!opts.output) { + dir = srcDir; + } else if (source === base) { + dir = opts.output; + } else { + dir = path.join(opts.output, path.relative(base, srcDir)); + } + return path.join(dir, basename + extension); + }; + + writeJs = function(base, sourcePath, js, jsPath, generatedSourceMap) { + var compile, jsDir, sourceMapPath; + if (generatedSourceMap == null) { + generatedSourceMap = null; + } + sourceMapPath = outputPath(sourcePath, base, ".map"); + jsDir = path.dirname(jsPath); + compile = function() { + if (opts.compile) { + if (js.length <= 0) { + js = ' '; + } + if (generatedSourceMap) { + js = "" + js + "\n//# sourceMappingURL=" + (helpers.baseFileName(sourceMapPath, false, useWinPathSep)) + "\n"; + } + fs.writeFile(jsPath, js, function(err) { + if (err) { + return printLine(err.message); + } else if (opts.compile && opts.watch) { + return timeLog("compiled " + sourcePath); + } + }); + } + if (generatedSourceMap) { + return fs.writeFile(sourceMapPath, generatedSourceMap, function(err) { + if (err) { + return printLine("Could not write source map: " + err.message); + } + }); + } + }; + return fs.exists(jsDir, function(itExists) { + if (itExists) { + return compile(); + } else { + return mkdirp(jsDir, compile); + } + }); + }; + + wait = function(milliseconds, func) { + return setTimeout(func, milliseconds); + }; + + timeLog = function(message) { + return console.log("" + ((new Date).toLocaleTimeString()) + " - " + message); + }; + + printTokens = function(tokens) { + var strings, tag, token, value; + strings = (function() { + var _i, _len, _results; + _results = []; + for (_i = 0, _len = tokens.length; _i < _len; _i++) { + token = tokens[_i]; + tag = token[0]; + value = token[1].toString().replace(/\n/, '\\n'); + _results.push("[" + tag + " " + value + "]"); + } + return _results; + })(); + return printLine(strings.join(' ')); + }; + + parseOptions = function() { + var o; + optionParser = new optparse.OptionParser(SWITCHES, BANNER); + o = opts = optionParser.parse(process.argv.slice(2)); + o.compile || (o.compile = !!o.output); + o.run = !(o.compile || o.print || o.map); + return o.print = !!(o.print || (o["eval"] || o.stdio && o.compile)); + }; + + compileOptions = function(filename, base) { + var answer, cwd, jsDir, jsPath; + answer = { + filename: filename, + literate: opts.literate || helpers.isLiterate(filename), + bare: opts.bare, + header: opts.compile && !opts['no-header'], + sourceMap: opts.map + }; + if (filename) { + if (base) { + cwd = process.cwd(); + jsPath = outputPath(filename, base); + jsDir = path.dirname(jsPath); + answer = helpers.merge(answer, { + jsPath: jsPath, + sourceRoot: path.relative(jsDir, cwd), + sourceFiles: [path.relative(cwd, filename)], + generatedFile: helpers.baseFileName(jsPath, false, useWinPathSep) + }); + } else { + answer = helpers.merge(answer, { + sourceRoot: "", + sourceFiles: [helpers.baseFileName(filename, false, useWinPathSep)], + generatedFile: helpers.baseFileName(filename, true, useWinPathSep) + ".js" + }); + } + } + return answer; + }; + + forkNode = function() { + var args, nodeArgs, p; + nodeArgs = opts.nodejs.split(/\s+/); + args = process.argv.slice(1); + args.splice(args.indexOf('--nodejs'), 2); + p = spawn(process.execPath, nodeArgs.concat(args), { + cwd: process.cwd(), + env: process.env, + customFds: [0, 1, 2] + }); + return p.on('exit', function(code) { + return process.exit(code); + }); + }; + + usage = function() { + return printLine((new optparse.OptionParser(SWITCHES, BANNER)).help()); + }; + + version = function() { + return printLine("CoffeeScript version " + CoffeeScript.VERSION); + }; + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/grammar.js b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/grammar.js new file mode 100644 index 00000000..6752310f --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/grammar.js @@ -0,0 +1,631 @@ +// Generated by CoffeeScript 1.7.1 +(function() { + var Parser, alt, alternatives, grammar, name, o, operators, token, tokens, unwrap; + + Parser = require('jison').Parser; + + unwrap = /^function\s*\(\)\s*\{\s*return\s*([\s\S]*);\s*\}/; + + o = function(patternString, action, options) { + var addLocationDataFn, match, patternCount; + patternString = patternString.replace(/\s{2,}/g, ' '); + patternCount = patternString.split(' ').length; + if (!action) { + return [patternString, '$$ = $1;', options]; + } + action = (match = unwrap.exec(action)) ? match[1] : "(" + action + "())"; + action = action.replace(/\bnew /g, '$&yy.'); + action = action.replace(/\b(?:Block\.wrap|extend)\b/g, 'yy.$&'); + addLocationDataFn = function(first, last) { + if (!last) { + return "yy.addLocationDataFn(@" + first + ")"; + } else { + return "yy.addLocationDataFn(@" + first + ", @" + last + ")"; + } + }; + action = action.replace(/LOC\(([0-9]*)\)/g, addLocationDataFn('$1')); + action = action.replace(/LOC\(([0-9]*),\s*([0-9]*)\)/g, addLocationDataFn('$1', '$2')); + return [patternString, "$$ = " + (addLocationDataFn(1, patternCount)) + "(" + action + ");", options]; + }; + + grammar = { + Root: [ + o('', function() { + return new Block; + }), o('Body') + ], + Body: [ + o('Line', function() { + return Block.wrap([$1]); + }), o('Body TERMINATOR Line', function() { + return $1.push($3); + }), o('Body TERMINATOR') + ], + Line: [o('Expression'), o('Statement')], + Statement: [ + o('Return'), o('Comment'), o('STATEMENT', function() { + return new Literal($1); + }) + ], + Expression: [o('Value'), o('Invocation'), o('Code'), o('Operation'), o('Assign'), o('If'), o('Try'), o('While'), o('For'), o('Switch'), o('Class'), o('Throw')], + Block: [ + o('INDENT OUTDENT', function() { + return new Block; + }), o('INDENT Body OUTDENT', function() { + return $2; + }) + ], + Identifier: [ + o('IDENTIFIER', function() { + return new Literal($1); + }) + ], + AlphaNumeric: [ + o('NUMBER', function() { + return new Literal($1); + }), o('STRING', function() { + return new Literal($1); + }) + ], + Literal: [ + o('AlphaNumeric'), o('JS', function() { + return new Literal($1); + }), o('REGEX', function() { + return new Literal($1); + }), o('DEBUGGER', function() { + return new Literal($1); + }), o('UNDEFINED', function() { + return new Undefined; + }), o('NULL', function() { + return new Null; + }), o('BOOL', function() { + return new Bool($1); + }) + ], + Assign: [ + o('Assignable = Expression', function() { + return new Assign($1, $3); + }), o('Assignable = TERMINATOR Expression', function() { + return new Assign($1, $4); + }), o('Assignable = INDENT Expression OUTDENT', function() { + return new Assign($1, $4); + }) + ], + AssignObj: [ + o('ObjAssignable', function() { + return new Value($1); + }), o('ObjAssignable : Expression', function() { + return new Assign(LOC(1)(new Value($1)), $3, 'object'); + }), o('ObjAssignable : INDENT Expression OUTDENT', function() { + return new Assign(LOC(1)(new Value($1)), $4, 'object'); + }), o('Comment') + ], + ObjAssignable: [o('Identifier'), o('AlphaNumeric'), o('ThisProperty')], + Return: [ + o('RETURN Expression', function() { + return new Return($2); + }), o('RETURN', function() { + return new Return; + }) + ], + Comment: [ + o('HERECOMMENT', function() { + return new Comment($1); + }) + ], + Code: [ + o('PARAM_START ParamList PARAM_END FuncGlyph Block', function() { + return new Code($2, $5, $4); + }), o('FuncGlyph Block', function() { + return new Code([], $2, $1); + }) + ], + FuncGlyph: [ + o('->', function() { + return 'func'; + }), o('=>', function() { + return 'boundfunc'; + }) + ], + OptComma: [o(''), o(',')], + ParamList: [ + o('', function() { + return []; + }), o('Param', function() { + return [$1]; + }), o('ParamList , Param', function() { + return $1.concat($3); + }), o('ParamList OptComma TERMINATOR Param', function() { + return $1.concat($4); + }), o('ParamList OptComma INDENT ParamList OptComma OUTDENT', function() { + return $1.concat($4); + }) + ], + Param: [ + o('ParamVar', function() { + return new Param($1); + }), o('ParamVar ...', function() { + return new Param($1, null, true); + }), o('ParamVar = Expression', function() { + return new Param($1, $3); + }), o('...', function() { + return new Expansion; + }) + ], + ParamVar: [o('Identifier'), o('ThisProperty'), o('Array'), o('Object')], + Splat: [ + o('Expression ...', function() { + return new Splat($1); + }) + ], + SimpleAssignable: [ + o('Identifier', function() { + return new Value($1); + }), o('Value Accessor', function() { + return $1.add($2); + }), o('Invocation Accessor', function() { + return new Value($1, [].concat($2)); + }), o('ThisProperty') + ], + Assignable: [ + o('SimpleAssignable'), o('Array', function() { + return new Value($1); + }), o('Object', function() { + return new Value($1); + }) + ], + Value: [ + o('Assignable'), o('Literal', function() { + return new Value($1); + }), o('Parenthetical', function() { + return new Value($1); + }), o('Range', function() { + return new Value($1); + }), o('This') + ], + Accessor: [ + o('. Identifier', function() { + return new Access($2); + }), o('?. Identifier', function() { + return new Access($2, 'soak'); + }), o(':: Identifier', function() { + return [LOC(1)(new Access(new Literal('prototype'))), LOC(2)(new Access($2))]; + }), o('?:: Identifier', function() { + return [LOC(1)(new Access(new Literal('prototype'), 'soak')), LOC(2)(new Access($2))]; + }), o('::', function() { + return new Access(new Literal('prototype')); + }), o('Index') + ], + Index: [ + o('INDEX_START IndexValue INDEX_END', function() { + return $2; + }), o('INDEX_SOAK Index', function() { + return extend($2, { + soak: true + }); + }) + ], + IndexValue: [ + o('Expression', function() { + return new Index($1); + }), o('Slice', function() { + return new Slice($1); + }) + ], + Object: [ + o('{ AssignList OptComma }', function() { + return new Obj($2, $1.generated); + }) + ], + AssignList: [ + o('', function() { + return []; + }), o('AssignObj', function() { + return [$1]; + }), o('AssignList , AssignObj', function() { + return $1.concat($3); + }), o('AssignList OptComma TERMINATOR AssignObj', function() { + return $1.concat($4); + }), o('AssignList OptComma INDENT AssignList OptComma OUTDENT', function() { + return $1.concat($4); + }) + ], + Class: [ + o('CLASS', function() { + return new Class; + }), o('CLASS Block', function() { + return new Class(null, null, $2); + }), o('CLASS EXTENDS Expression', function() { + return new Class(null, $3); + }), o('CLASS EXTENDS Expression Block', function() { + return new Class(null, $3, $4); + }), o('CLASS SimpleAssignable', function() { + return new Class($2); + }), o('CLASS SimpleAssignable Block', function() { + return new Class($2, null, $3); + }), o('CLASS SimpleAssignable EXTENDS Expression', function() { + return new Class($2, $4); + }), o('CLASS SimpleAssignable EXTENDS Expression Block', function() { + return new Class($2, $4, $5); + }) + ], + Invocation: [ + o('Value OptFuncExist Arguments', function() { + return new Call($1, $3, $2); + }), o('Invocation OptFuncExist Arguments', function() { + return new Call($1, $3, $2); + }), o('SUPER', function() { + return new Call('super', [new Splat(new Literal('arguments'))]); + }), o('SUPER Arguments', function() { + return new Call('super', $2); + }) + ], + OptFuncExist: [ + o('', function() { + return false; + }), o('FUNC_EXIST', function() { + return true; + }) + ], + Arguments: [ + o('CALL_START CALL_END', function() { + return []; + }), o('CALL_START ArgList OptComma CALL_END', function() { + return $2; + }) + ], + This: [ + o('THIS', function() { + return new Value(new Literal('this')); + }), o('@', function() { + return new Value(new Literal('this')); + }) + ], + ThisProperty: [ + o('@ Identifier', function() { + return new Value(LOC(1)(new Literal('this')), [LOC(2)(new Access($2))], 'this'); + }) + ], + Array: [ + o('[ ]', function() { + return new Arr([]); + }), o('[ ArgList OptComma ]', function() { + return new Arr($2); + }) + ], + RangeDots: [ + o('..', function() { + return 'inclusive'; + }), o('...', function() { + return 'exclusive'; + }) + ], + Range: [ + o('[ Expression RangeDots Expression ]', function() { + return new Range($2, $4, $3); + }) + ], + Slice: [ + o('Expression RangeDots Expression', function() { + return new Range($1, $3, $2); + }), o('Expression RangeDots', function() { + return new Range($1, null, $2); + }), o('RangeDots Expression', function() { + return new Range(null, $2, $1); + }), o('RangeDots', function() { + return new Range(null, null, $1); + }) + ], + ArgList: [ + o('Arg', function() { + return [$1]; + }), o('ArgList , Arg', function() { + return $1.concat($3); + }), o('ArgList OptComma TERMINATOR Arg', function() { + return $1.concat($4); + }), o('INDENT ArgList OptComma OUTDENT', function() { + return $2; + }), o('ArgList OptComma INDENT ArgList OptComma OUTDENT', function() { + return $1.concat($4); + }) + ], + Arg: [ + o('Expression'), o('Splat'), o('...', function() { + return new Expansion; + }) + ], + SimpleArgs: [ + o('Expression'), o('SimpleArgs , Expression', function() { + return [].concat($1, $3); + }) + ], + Try: [ + o('TRY Block', function() { + return new Try($2); + }), o('TRY Block Catch', function() { + return new Try($2, $3[0], $3[1]); + }), o('TRY Block FINALLY Block', function() { + return new Try($2, null, null, $4); + }), o('TRY Block Catch FINALLY Block', function() { + return new Try($2, $3[0], $3[1], $5); + }) + ], + Catch: [ + o('CATCH Identifier Block', function() { + return [$2, $3]; + }), o('CATCH Object Block', function() { + return [LOC(2)(new Value($2)), $3]; + }), o('CATCH Block', function() { + return [null, $2]; + }) + ], + Throw: [ + o('THROW Expression', function() { + return new Throw($2); + }) + ], + Parenthetical: [ + o('( Body )', function() { + return new Parens($2); + }), o('( INDENT Body OUTDENT )', function() { + return new Parens($3); + }) + ], + WhileSource: [ + o('WHILE Expression', function() { + return new While($2); + }), o('WHILE Expression WHEN Expression', function() { + return new While($2, { + guard: $4 + }); + }), o('UNTIL Expression', function() { + return new While($2, { + invert: true + }); + }), o('UNTIL Expression WHEN Expression', function() { + return new While($2, { + invert: true, + guard: $4 + }); + }) + ], + While: [ + o('WhileSource Block', function() { + return $1.addBody($2); + }), o('Statement WhileSource', function() { + return $2.addBody(LOC(1)(Block.wrap([$1]))); + }), o('Expression WhileSource', function() { + return $2.addBody(LOC(1)(Block.wrap([$1]))); + }), o('Loop', function() { + return $1; + }) + ], + Loop: [ + o('LOOP Block', function() { + return new While(LOC(1)(new Literal('true'))).addBody($2); + }), o('LOOP Expression', function() { + return new While(LOC(1)(new Literal('true'))).addBody(LOC(2)(Block.wrap([$2]))); + }) + ], + For: [ + o('Statement ForBody', function() { + return new For($1, $2); + }), o('Expression ForBody', function() { + return new For($1, $2); + }), o('ForBody Block', function() { + return new For($2, $1); + }) + ], + ForBody: [ + o('FOR Range', function() { + return { + source: LOC(2)(new Value($2)) + }; + }), o('ForStart ForSource', function() { + $2.own = $1.own; + $2.name = $1[0]; + $2.index = $1[1]; + return $2; + }) + ], + ForStart: [ + o('FOR ForVariables', function() { + return $2; + }), o('FOR OWN ForVariables', function() { + $3.own = true; + return $3; + }) + ], + ForValue: [ + o('Identifier'), o('ThisProperty'), o('Array', function() { + return new Value($1); + }), o('Object', function() { + return new Value($1); + }) + ], + ForVariables: [ + o('ForValue', function() { + return [$1]; + }), o('ForValue , ForValue', function() { + return [$1, $3]; + }) + ], + ForSource: [ + o('FORIN Expression', function() { + return { + source: $2 + }; + }), o('FOROF Expression', function() { + return { + source: $2, + object: true + }; + }), o('FORIN Expression WHEN Expression', function() { + return { + source: $2, + guard: $4 + }; + }), o('FOROF Expression WHEN Expression', function() { + return { + source: $2, + guard: $4, + object: true + }; + }), o('FORIN Expression BY Expression', function() { + return { + source: $2, + step: $4 + }; + }), o('FORIN Expression WHEN Expression BY Expression', function() { + return { + source: $2, + guard: $4, + step: $6 + }; + }), o('FORIN Expression BY Expression WHEN Expression', function() { + return { + source: $2, + step: $4, + guard: $6 + }; + }) + ], + Switch: [ + o('SWITCH Expression INDENT Whens OUTDENT', function() { + return new Switch($2, $4); + }), o('SWITCH Expression INDENT Whens ELSE Block OUTDENT', function() { + return new Switch($2, $4, $6); + }), o('SWITCH INDENT Whens OUTDENT', function() { + return new Switch(null, $3); + }), o('SWITCH INDENT Whens ELSE Block OUTDENT', function() { + return new Switch(null, $3, $5); + }) + ], + Whens: [ + o('When'), o('Whens When', function() { + return $1.concat($2); + }) + ], + When: [ + o('LEADING_WHEN SimpleArgs Block', function() { + return [[$2, $3]]; + }), o('LEADING_WHEN SimpleArgs Block TERMINATOR', function() { + return [[$2, $3]]; + }) + ], + IfBlock: [ + o('IF Expression Block', function() { + return new If($2, $3, { + type: $1 + }); + }), o('IfBlock ELSE IF Expression Block', function() { + return $1.addElse(LOC(3, 5)(new If($4, $5, { + type: $3 + }))); + }) + ], + If: [ + o('IfBlock'), o('IfBlock ELSE Block', function() { + return $1.addElse($3); + }), o('Statement POST_IF Expression', function() { + return new If($3, LOC(1)(Block.wrap([$1])), { + type: $2, + statement: true + }); + }), o('Expression POST_IF Expression', function() { + return new If($3, LOC(1)(Block.wrap([$1])), { + type: $2, + statement: true + }); + }) + ], + Operation: [ + o('UNARY Expression', function() { + return new Op($1, $2); + }), o('UNARY_MATH Expression', function() { + return new Op($1, $2); + }), o('- Expression', (function() { + return new Op('-', $2); + }), { + prec: 'UNARY_MATH' + }), o('+ Expression', (function() { + return new Op('+', $2); + }), { + prec: 'UNARY_MATH' + }), o('-- SimpleAssignable', function() { + return new Op('--', $2); + }), o('++ SimpleAssignable', function() { + return new Op('++', $2); + }), o('SimpleAssignable --', function() { + return new Op('--', $1, null, true); + }), o('SimpleAssignable ++', function() { + return new Op('++', $1, null, true); + }), o('Expression ?', function() { + return new Existence($1); + }), o('Expression + Expression', function() { + return new Op('+', $1, $3); + }), o('Expression - Expression', function() { + return new Op('-', $1, $3); + }), o('Expression MATH Expression', function() { + return new Op($2, $1, $3); + }), o('Expression ** Expression', function() { + return new Op($2, $1, $3); + }), o('Expression SHIFT Expression', function() { + return new Op($2, $1, $3); + }), o('Expression COMPARE Expression', function() { + return new Op($2, $1, $3); + }), o('Expression LOGIC Expression', function() { + return new Op($2, $1, $3); + }), o('Expression RELATION Expression', function() { + if ($2.charAt(0) === '!') { + return new Op($2.slice(1), $1, $3).invert(); + } else { + return new Op($2, $1, $3); + } + }), o('SimpleAssignable COMPOUND_ASSIGN Expression', function() { + return new Assign($1, $3, $2); + }), o('SimpleAssignable COMPOUND_ASSIGN INDENT Expression OUTDENT', function() { + return new Assign($1, $4, $2); + }), o('SimpleAssignable COMPOUND_ASSIGN TERMINATOR Expression', function() { + return new Assign($1, $4, $2); + }), o('SimpleAssignable EXTENDS Expression', function() { + return new Extends($1, $3); + }) + ] + }; + + operators = [['left', '.', '?.', '::', '?::'], ['left', 'CALL_START', 'CALL_END'], ['nonassoc', '++', '--'], ['left', '?'], ['right', 'UNARY'], ['right', '**'], ['right', 'UNARY_MATH'], ['left', 'MATH'], ['left', '+', '-'], ['left', 'SHIFT'], ['left', 'RELATION'], ['left', 'COMPARE'], ['left', 'LOGIC'], ['nonassoc', 'INDENT', 'OUTDENT'], ['right', '=', ':', 'COMPOUND_ASSIGN', 'RETURN', 'THROW', 'EXTENDS'], ['right', 'FORIN', 'FOROF', 'BY', 'WHEN'], ['right', 'IF', 'ELSE', 'FOR', 'WHILE', 'UNTIL', 'LOOP', 'SUPER', 'CLASS'], ['left', 'POST_IF']]; + + tokens = []; + + for (name in grammar) { + alternatives = grammar[name]; + grammar[name] = (function() { + var _i, _j, _len, _len1, _ref, _results; + _results = []; + for (_i = 0, _len = alternatives.length; _i < _len; _i++) { + alt = alternatives[_i]; + _ref = alt[0].split(' '); + for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) { + token = _ref[_j]; + if (!grammar[token]) { + tokens.push(token); + } + } + if (name === 'Root') { + alt[1] = "return " + alt[1]; + } + _results.push(alt); + } + return _results; + })(); + } + + exports.parser = new Parser({ + tokens: tokens.join(' '), + bnf: grammar, + operators: operators.reverse(), + startSymbol: 'Root' + }); + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/helpers.js b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/helpers.js new file mode 100644 index 00000000..5c72acf2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/helpers.js @@ -0,0 +1,252 @@ +// Generated by CoffeeScript 1.7.1 +(function() { + var buildLocationData, extend, flatten, last, repeat, syntaxErrorToString, _ref; + + exports.starts = function(string, literal, start) { + return literal === string.substr(start, literal.length); + }; + + exports.ends = function(string, literal, back) { + var len; + len = literal.length; + return literal === string.substr(string.length - len - (back || 0), len); + }; + + exports.repeat = repeat = function(str, n) { + var res; + res = ''; + while (n > 0) { + if (n & 1) { + res += str; + } + n >>>= 1; + str += str; + } + return res; + }; + + exports.compact = function(array) { + var item, _i, _len, _results; + _results = []; + for (_i = 0, _len = array.length; _i < _len; _i++) { + item = array[_i]; + if (item) { + _results.push(item); + } + } + return _results; + }; + + exports.count = function(string, substr) { + var num, pos; + num = pos = 0; + if (!substr.length) { + return 1 / 0; + } + while (pos = 1 + string.indexOf(substr, pos)) { + num++; + } + return num; + }; + + exports.merge = function(options, overrides) { + return extend(extend({}, options), overrides); + }; + + extend = exports.extend = function(object, properties) { + var key, val; + for (key in properties) { + val = properties[key]; + object[key] = val; + } + return object; + }; + + exports.flatten = flatten = function(array) { + var element, flattened, _i, _len; + flattened = []; + for (_i = 0, _len = array.length; _i < _len; _i++) { + element = array[_i]; + if (element instanceof Array) { + flattened = flattened.concat(flatten(element)); + } else { + flattened.push(element); + } + } + return flattened; + }; + + exports.del = function(obj, key) { + var val; + val = obj[key]; + delete obj[key]; + return val; + }; + + exports.last = last = function(array, back) { + return array[array.length - (back || 0) - 1]; + }; + + exports.some = (_ref = Array.prototype.some) != null ? _ref : function(fn) { + var e, _i, _len; + for (_i = 0, _len = this.length; _i < _len; _i++) { + e = this[_i]; + if (fn(e)) { + return true; + } + } + return false; + }; + + exports.invertLiterate = function(code) { + var line, lines, maybe_code; + maybe_code = true; + lines = (function() { + var _i, _len, _ref1, _results; + _ref1 = code.split('\n'); + _results = []; + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + line = _ref1[_i]; + if (maybe_code && /^([ ]{4}|[ ]{0,3}\t)/.test(line)) { + _results.push(line); + } else if (maybe_code = /^\s*$/.test(line)) { + _results.push(line); + } else { + _results.push('# ' + line); + } + } + return _results; + })(); + return lines.join('\n'); + }; + + buildLocationData = function(first, last) { + if (!last) { + return first; + } else { + return { + first_line: first.first_line, + first_column: first.first_column, + last_line: last.last_line, + last_column: last.last_column + }; + } + }; + + exports.addLocationDataFn = function(first, last) { + return function(obj) { + if (((typeof obj) === 'object') && (!!obj['updateLocationDataIfMissing'])) { + obj.updateLocationDataIfMissing(buildLocationData(first, last)); + } + return obj; + }; + }; + + exports.locationDataToString = function(obj) { + var locationData; + if (("2" in obj) && ("first_line" in obj[2])) { + locationData = obj[2]; + } else if ("first_line" in obj) { + locationData = obj; + } + if (locationData) { + return ("" + (locationData.first_line + 1) + ":" + (locationData.first_column + 1) + "-") + ("" + (locationData.last_line + 1) + ":" + (locationData.last_column + 1)); + } else { + return "No location data"; + } + }; + + exports.baseFileName = function(file, stripExt, useWinPathSep) { + var parts, pathSep; + if (stripExt == null) { + stripExt = false; + } + if (useWinPathSep == null) { + useWinPathSep = false; + } + pathSep = useWinPathSep ? /\\|\// : /\//; + parts = file.split(pathSep); + file = parts[parts.length - 1]; + if (!(stripExt && file.indexOf('.') >= 0)) { + return file; + } + parts = file.split('.'); + parts.pop(); + if (parts[parts.length - 1] === 'coffee' && parts.length > 1) { + parts.pop(); + } + return parts.join('.'); + }; + + exports.isCoffee = function(file) { + return /\.((lit)?coffee|coffee\.md)$/.test(file); + }; + + exports.isLiterate = function(file) { + return /\.(litcoffee|coffee\.md)$/.test(file); + }; + + exports.throwSyntaxError = function(message, location) { + var error; + error = new SyntaxError(message); + error.location = location; + error.toString = syntaxErrorToString; + error.stack = error.toString(); + throw error; + }; + + exports.updateSyntaxError = function(error, code, filename) { + if (error.toString === syntaxErrorToString) { + error.code || (error.code = code); + error.filename || (error.filename = filename); + error.stack = error.toString(); + } + return error; + }; + + syntaxErrorToString = function() { + var codeLine, colorize, colorsEnabled, end, filename, first_column, first_line, last_column, last_line, marker, start, _ref1, _ref2; + if (!(this.code && this.location)) { + return Error.prototype.toString.call(this); + } + _ref1 = this.location, first_line = _ref1.first_line, first_column = _ref1.first_column, last_line = _ref1.last_line, last_column = _ref1.last_column; + if (last_line == null) { + last_line = first_line; + } + if (last_column == null) { + last_column = first_column; + } + filename = this.filename || '[stdin]'; + codeLine = this.code.split('\n')[first_line]; + start = first_column; + end = first_line === last_line ? last_column + 1 : codeLine.length; + marker = repeat(' ', start) + repeat('^', end - start); + if (typeof process !== "undefined" && process !== null) { + colorsEnabled = process.stdout.isTTY && !process.env.NODE_DISABLE_COLORS; + } + if ((_ref2 = this.colorful) != null ? _ref2 : colorsEnabled) { + colorize = function(str) { + return "\x1B[1;31m" + str + "\x1B[0m"; + }; + codeLine = codeLine.slice(0, start) + colorize(codeLine.slice(start, end)) + codeLine.slice(end); + marker = colorize(marker); + } + return "" + filename + ":" + (first_line + 1) + ":" + (first_column + 1) + ": error: " + this.message + "\n" + codeLine + "\n" + marker; + }; + + exports.nameWhitespaceCharacter = function(string) { + switch (string) { + case ' ': + return 'space'; + case '\n': + return 'newline'; + case '\r': + return 'carriage return'; + case '\t': + return 'tab'; + default: + return string; + } + }; + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/index.js b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/index.js new file mode 100644 index 00000000..67a133d6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/index.js @@ -0,0 +1,11 @@ +// Generated by CoffeeScript 1.7.1 +(function() { + var key, val, _ref; + + _ref = require('./coffee-script'); + for (key in _ref) { + val = _ref[key]; + exports[key] = val; + } + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/lexer.js b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/lexer.js new file mode 100644 index 00000000..ed5ce975 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/lexer.js @@ -0,0 +1,926 @@ +// Generated by CoffeeScript 1.7.1 +(function() { + var BOM, BOOL, CALLABLE, CODE, COFFEE_ALIASES, COFFEE_ALIAS_MAP, COFFEE_KEYWORDS, COMMENT, COMPARE, COMPOUND_ASSIGN, HEREDOC, HEREDOC_ILLEGAL, HEREDOC_INDENT, HEREGEX, HEREGEX_OMIT, IDENTIFIER, INDENTABLE_CLOSERS, INDEXABLE, INVERSES, JSTOKEN, JS_FORBIDDEN, JS_KEYWORDS, LINE_BREAK, LINE_CONTINUER, LOGIC, Lexer, MATH, MULTILINER, MULTI_DENT, NOT_REGEX, NOT_SPACED_REGEX, NUMBER, OPERATOR, REGEX, RELATION, RESERVED, Rewriter, SHIFT, SIMPLESTR, STRICT_PROSCRIBED, TRAILING_SPACES, UNARY, UNARY_MATH, WHITESPACE, compact, count, invertLiterate, key, last, locationDataToString, repeat, starts, throwSyntaxError, _ref, _ref1, + __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }; + + _ref = require('./rewriter'), Rewriter = _ref.Rewriter, INVERSES = _ref.INVERSES; + + _ref1 = require('./helpers'), count = _ref1.count, starts = _ref1.starts, compact = _ref1.compact, last = _ref1.last, repeat = _ref1.repeat, invertLiterate = _ref1.invertLiterate, locationDataToString = _ref1.locationDataToString, throwSyntaxError = _ref1.throwSyntaxError; + + exports.Lexer = Lexer = (function() { + function Lexer() {} + + Lexer.prototype.tokenize = function(code, opts) { + var consumed, i, tag, _ref2; + if (opts == null) { + opts = {}; + } + this.literate = opts.literate; + this.indent = 0; + this.baseIndent = 0; + this.indebt = 0; + this.outdebt = 0; + this.indents = []; + this.ends = []; + this.tokens = []; + this.chunkLine = opts.line || 0; + this.chunkColumn = opts.column || 0; + code = this.clean(code); + i = 0; + while (this.chunk = code.slice(i)) { + consumed = this.identifierToken() || this.commentToken() || this.whitespaceToken() || this.lineToken() || this.heredocToken() || this.stringToken() || this.numberToken() || this.regexToken() || this.jsToken() || this.literalToken(); + _ref2 = this.getLineAndColumnFromChunk(consumed), this.chunkLine = _ref2[0], this.chunkColumn = _ref2[1]; + i += consumed; + } + this.closeIndentation(); + if (tag = this.ends.pop()) { + this.error("missing " + tag); + } + if (opts.rewrite === false) { + return this.tokens; + } + return (new Rewriter).rewrite(this.tokens); + }; + + Lexer.prototype.clean = function(code) { + if (code.charCodeAt(0) === BOM) { + code = code.slice(1); + } + code = code.replace(/\r/g, '').replace(TRAILING_SPACES, ''); + if (WHITESPACE.test(code)) { + code = "\n" + code; + this.chunkLine--; + } + if (this.literate) { + code = invertLiterate(code); + } + return code; + }; + + Lexer.prototype.identifierToken = function() { + var colon, colonOffset, forcedIdentifier, id, idLength, input, match, poppedToken, prev, tag, tagToken, _ref2, _ref3, _ref4; + if (!(match = IDENTIFIER.exec(this.chunk))) { + return 0; + } + input = match[0], id = match[1], colon = match[2]; + idLength = id.length; + poppedToken = void 0; + if (id === 'own' && this.tag() === 'FOR') { + this.token('OWN', id); + return id.length; + } + forcedIdentifier = colon || (prev = last(this.tokens)) && (((_ref2 = prev[0]) === '.' || _ref2 === '?.' || _ref2 === '::' || _ref2 === '?::') || !prev.spaced && prev[0] === '@'); + tag = 'IDENTIFIER'; + if (!forcedIdentifier && (__indexOf.call(JS_KEYWORDS, id) >= 0 || __indexOf.call(COFFEE_KEYWORDS, id) >= 0)) { + tag = id.toUpperCase(); + if (tag === 'WHEN' && (_ref3 = this.tag(), __indexOf.call(LINE_BREAK, _ref3) >= 0)) { + tag = 'LEADING_WHEN'; + } else if (tag === 'FOR') { + this.seenFor = true; + } else if (tag === 'UNLESS') { + tag = 'IF'; + } else if (__indexOf.call(UNARY, tag) >= 0) { + tag = 'UNARY'; + } else if (__indexOf.call(RELATION, tag) >= 0) { + if (tag !== 'INSTANCEOF' && this.seenFor) { + tag = 'FOR' + tag; + this.seenFor = false; + } else { + tag = 'RELATION'; + if (this.value() === '!') { + poppedToken = this.tokens.pop(); + id = '!' + id; + } + } + } + } + if (__indexOf.call(JS_FORBIDDEN, id) >= 0) { + if (forcedIdentifier) { + tag = 'IDENTIFIER'; + id = new String(id); + id.reserved = true; + } else if (__indexOf.call(RESERVED, id) >= 0) { + this.error("reserved word \"" + id + "\""); + } + } + if (!forcedIdentifier) { + if (__indexOf.call(COFFEE_ALIASES, id) >= 0) { + id = COFFEE_ALIAS_MAP[id]; + } + tag = (function() { + switch (id) { + case '!': + return 'UNARY'; + case '==': + case '!=': + return 'COMPARE'; + case '&&': + case '||': + return 'LOGIC'; + case 'true': + case 'false': + return 'BOOL'; + case 'break': + case 'continue': + return 'STATEMENT'; + default: + return tag; + } + })(); + } + tagToken = this.token(tag, id, 0, idLength); + if (poppedToken) { + _ref4 = [poppedToken[2].first_line, poppedToken[2].first_column], tagToken[2].first_line = _ref4[0], tagToken[2].first_column = _ref4[1]; + } + if (colon) { + colonOffset = input.lastIndexOf(':'); + this.token(':', ':', colonOffset, colon.length); + } + return input.length; + }; + + Lexer.prototype.numberToken = function() { + var binaryLiteral, lexedLength, match, number, octalLiteral; + if (!(match = NUMBER.exec(this.chunk))) { + return 0; + } + number = match[0]; + if (/^0[BOX]/.test(number)) { + this.error("radix prefix '" + number + "' must be lowercase"); + } else if (/E/.test(number) && !/^0x/.test(number)) { + this.error("exponential notation '" + number + "' must be indicated with a lowercase 'e'"); + } else if (/^0\d*[89]/.test(number)) { + this.error("decimal literal '" + number + "' must not be prefixed with '0'"); + } else if (/^0\d+/.test(number)) { + this.error("octal literal '" + number + "' must be prefixed with '0o'"); + } + lexedLength = number.length; + if (octalLiteral = /^0o([0-7]+)/.exec(number)) { + number = '0x' + parseInt(octalLiteral[1], 8).toString(16); + } + if (binaryLiteral = /^0b([01]+)/.exec(number)) { + number = '0x' + parseInt(binaryLiteral[1], 2).toString(16); + } + this.token('NUMBER', number, 0, lexedLength); + return lexedLength; + }; + + Lexer.prototype.stringToken = function() { + var octalEsc, quote, string, trimmed; + switch (quote = this.chunk.charAt(0)) { + case "'": + string = SIMPLESTR.exec(this.chunk)[0]; + break; + case '"': + string = this.balancedString(this.chunk, '"'); + } + if (!string) { + return 0; + } + trimmed = this.removeNewlines(string.slice(1, -1)); + if (quote === '"' && 0 < string.indexOf('#{', 1)) { + this.interpolateString(trimmed, { + strOffset: 1, + lexedLength: string.length + }); + } else { + this.token('STRING', quote + this.escapeLines(trimmed) + quote, 0, string.length); + } + if (octalEsc = /^(?:\\.|[^\\])*\\(?:0[0-7]|[1-7])/.test(string)) { + this.error("octal escape sequences " + string + " are not allowed"); + } + return string.length; + }; + + Lexer.prototype.heredocToken = function() { + var doc, heredoc, match, quote; + if (!(match = HEREDOC.exec(this.chunk))) { + return 0; + } + heredoc = match[0]; + quote = heredoc.charAt(0); + doc = this.sanitizeHeredoc(match[2], { + quote: quote, + indent: null + }); + if (quote === '"' && 0 <= doc.indexOf('#{')) { + this.interpolateString(doc, { + heredoc: true, + strOffset: 3, + lexedLength: heredoc.length + }); + } else { + this.token('STRING', this.makeString(doc, quote, true), 0, heredoc.length); + } + return heredoc.length; + }; + + Lexer.prototype.commentToken = function() { + var comment, here, match; + if (!(match = this.chunk.match(COMMENT))) { + return 0; + } + comment = match[0], here = match[1]; + if (here) { + this.token('HERECOMMENT', this.sanitizeHeredoc(here, { + herecomment: true, + indent: repeat(' ', this.indent) + }), 0, comment.length); + } + return comment.length; + }; + + Lexer.prototype.jsToken = function() { + var match, script; + if (!(this.chunk.charAt(0) === '`' && (match = JSTOKEN.exec(this.chunk)))) { + return 0; + } + this.token('JS', (script = match[0]).slice(1, -1), 0, script.length); + return script.length; + }; + + Lexer.prototype.regexToken = function() { + var flags, length, match, prev, regex, _ref2, _ref3; + if (this.chunk.charAt(0) !== '/') { + return 0; + } + if (length = this.heregexToken()) { + return length; + } + prev = last(this.tokens); + if (prev && (_ref2 = prev[0], __indexOf.call((prev.spaced ? NOT_REGEX : NOT_SPACED_REGEX), _ref2) >= 0)) { + return 0; + } + if (!(match = REGEX.exec(this.chunk))) { + return 0; + } + _ref3 = match, match = _ref3[0], regex = _ref3[1], flags = _ref3[2]; + if (regex === '//') { + return 0; + } + if (regex.slice(0, 2) === '/*') { + this.error('regular expressions cannot begin with `*`'); + } + this.token('REGEX', "" + regex + flags, 0, match.length); + return match.length; + }; + + Lexer.prototype.heregexToken = function() { + var body, flags, flagsOffset, heregex, match, plusToken, prev, re, tag, token, tokens, value, _i, _len, _ref2, _ref3, _ref4; + if (!(match = HEREGEX.exec(this.chunk))) { + return 0; + } + heregex = match[0], body = match[1], flags = match[2]; + if (0 > body.indexOf('#{')) { + re = this.escapeLines(body.replace(HEREGEX_OMIT, '$1$2').replace(/\//g, '\\/'), true); + if (re.match(/^\*/)) { + this.error('regular expressions cannot begin with `*`'); + } + this.token('REGEX', "/" + (re || '(?:)') + "/" + flags, 0, heregex.length); + return heregex.length; + } + this.token('IDENTIFIER', 'RegExp', 0, 0); + this.token('CALL_START', '(', 0, 0); + tokens = []; + _ref2 = this.interpolateString(body, { + regex: true + }); + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + token = _ref2[_i]; + tag = token[0], value = token[1]; + if (tag === 'TOKENS') { + tokens.push.apply(tokens, value); + } else if (tag === 'NEOSTRING') { + if (!(value = value.replace(HEREGEX_OMIT, '$1$2'))) { + continue; + } + value = value.replace(/\\/g, '\\\\'); + token[0] = 'STRING'; + token[1] = this.makeString(value, '"', true); + tokens.push(token); + } else { + this.error("Unexpected " + tag); + } + prev = last(this.tokens); + plusToken = ['+', '+']; + plusToken[2] = prev[2]; + tokens.push(plusToken); + } + tokens.pop(); + if (((_ref3 = tokens[0]) != null ? _ref3[0] : void 0) !== 'STRING') { + this.token('STRING', '""', 0, 0); + this.token('+', '+', 0, 0); + } + (_ref4 = this.tokens).push.apply(_ref4, tokens); + if (flags) { + flagsOffset = heregex.lastIndexOf(flags); + this.token(',', ',', flagsOffset, 0); + this.token('STRING', '"' + flags + '"', flagsOffset, flags.length); + } + this.token(')', ')', heregex.length - 1, 0); + return heregex.length; + }; + + Lexer.prototype.lineToken = function() { + var diff, indent, match, noNewlines, size; + if (!(match = MULTI_DENT.exec(this.chunk))) { + return 0; + } + indent = match[0]; + this.seenFor = false; + size = indent.length - 1 - indent.lastIndexOf('\n'); + noNewlines = this.unfinished(); + if (size - this.indebt === this.indent) { + if (noNewlines) { + this.suppressNewlines(); + } else { + this.newlineToken(0); + } + return indent.length; + } + if (size > this.indent) { + if (noNewlines) { + this.indebt = size - this.indent; + this.suppressNewlines(); + return indent.length; + } + if (!this.tokens.length) { + this.baseIndent = this.indent = size; + return indent.length; + } + diff = size - this.indent + this.outdebt; + this.token('INDENT', diff, indent.length - size, size); + this.indents.push(diff); + this.ends.push('OUTDENT'); + this.outdebt = this.indebt = 0; + this.indent = size; + } else if (size < this.baseIndent) { + this.error('missing indentation', indent.length); + } else { + this.indebt = 0; + this.outdentToken(this.indent - size, noNewlines, indent.length); + } + return indent.length; + }; + + Lexer.prototype.outdentToken = function(moveOut, noNewlines, outdentLength) { + var decreasedIndent, dent, lastIndent, _ref2; + decreasedIndent = this.indent - moveOut; + while (moveOut > 0) { + lastIndent = this.indents[this.indents.length - 1]; + if (!lastIndent) { + moveOut = 0; + } else if (lastIndent === this.outdebt) { + moveOut -= this.outdebt; + this.outdebt = 0; + } else if (lastIndent < this.outdebt) { + this.outdebt -= lastIndent; + moveOut -= lastIndent; + } else { + dent = this.indents.pop() + this.outdebt; + if (outdentLength && (_ref2 = this.chunk[outdentLength], __indexOf.call(INDENTABLE_CLOSERS, _ref2) >= 0)) { + decreasedIndent -= dent - moveOut; + moveOut = dent; + } + this.outdebt = 0; + this.pair('OUTDENT'); + this.token('OUTDENT', moveOut, 0, outdentLength); + moveOut -= dent; + } + } + if (dent) { + this.outdebt -= moveOut; + } + while (this.value() === ';') { + this.tokens.pop(); + } + if (!(this.tag() === 'TERMINATOR' || noNewlines)) { + this.token('TERMINATOR', '\n', outdentLength, 0); + } + this.indent = decreasedIndent; + return this; + }; + + Lexer.prototype.whitespaceToken = function() { + var match, nline, prev; + if (!((match = WHITESPACE.exec(this.chunk)) || (nline = this.chunk.charAt(0) === '\n'))) { + return 0; + } + prev = last(this.tokens); + if (prev) { + prev[match ? 'spaced' : 'newLine'] = true; + } + if (match) { + return match[0].length; + } else { + return 0; + } + }; + + Lexer.prototype.newlineToken = function(offset) { + while (this.value() === ';') { + this.tokens.pop(); + } + if (this.tag() !== 'TERMINATOR') { + this.token('TERMINATOR', '\n', offset, 0); + } + return this; + }; + + Lexer.prototype.suppressNewlines = function() { + if (this.value() === '\\') { + this.tokens.pop(); + } + return this; + }; + + Lexer.prototype.literalToken = function() { + var match, prev, tag, value, _ref2, _ref3, _ref4, _ref5; + if (match = OPERATOR.exec(this.chunk)) { + value = match[0]; + if (CODE.test(value)) { + this.tagParameters(); + } + } else { + value = this.chunk.charAt(0); + } + tag = value; + prev = last(this.tokens); + if (value === '=' && prev) { + if (!prev[1].reserved && (_ref2 = prev[1], __indexOf.call(JS_FORBIDDEN, _ref2) >= 0)) { + this.error("reserved word \"" + (this.value()) + "\" can't be assigned"); + } + if ((_ref3 = prev[1]) === '||' || _ref3 === '&&') { + prev[0] = 'COMPOUND_ASSIGN'; + prev[1] += '='; + return value.length; + } + } + if (value === ';') { + this.seenFor = false; + tag = 'TERMINATOR'; + } else if (__indexOf.call(MATH, value) >= 0) { + tag = 'MATH'; + } else if (__indexOf.call(COMPARE, value) >= 0) { + tag = 'COMPARE'; + } else if (__indexOf.call(COMPOUND_ASSIGN, value) >= 0) { + tag = 'COMPOUND_ASSIGN'; + } else if (__indexOf.call(UNARY, value) >= 0) { + tag = 'UNARY'; + } else if (__indexOf.call(UNARY_MATH, value) >= 0) { + tag = 'UNARY_MATH'; + } else if (__indexOf.call(SHIFT, value) >= 0) { + tag = 'SHIFT'; + } else if (__indexOf.call(LOGIC, value) >= 0 || value === '?' && (prev != null ? prev.spaced : void 0)) { + tag = 'LOGIC'; + } else if (prev && !prev.spaced) { + if (value === '(' && (_ref4 = prev[0], __indexOf.call(CALLABLE, _ref4) >= 0)) { + if (prev[0] === '?') { + prev[0] = 'FUNC_EXIST'; + } + tag = 'CALL_START'; + } else if (value === '[' && (_ref5 = prev[0], __indexOf.call(INDEXABLE, _ref5) >= 0)) { + tag = 'INDEX_START'; + switch (prev[0]) { + case '?': + prev[0] = 'INDEX_SOAK'; + } + } + } + switch (value) { + case '(': + case '{': + case '[': + this.ends.push(INVERSES[value]); + break; + case ')': + case '}': + case ']': + this.pair(value); + } + this.token(tag, value); + return value.length; + }; + + Lexer.prototype.sanitizeHeredoc = function(doc, options) { + var attempt, herecomment, indent, match, _ref2; + indent = options.indent, herecomment = options.herecomment; + if (herecomment) { + if (HEREDOC_ILLEGAL.test(doc)) { + this.error("block comment cannot contain \"*/\", starting"); + } + if (doc.indexOf('\n') < 0) { + return doc; + } + } else { + while (match = HEREDOC_INDENT.exec(doc)) { + attempt = match[1]; + if (indent === null || (0 < (_ref2 = attempt.length) && _ref2 < indent.length)) { + indent = attempt; + } + } + } + if (indent) { + doc = doc.replace(RegExp("\\n" + indent, "g"), '\n'); + } + if (!herecomment) { + doc = doc.replace(/^\n/, ''); + } + return doc; + }; + + Lexer.prototype.tagParameters = function() { + var i, stack, tok, tokens; + if (this.tag() !== ')') { + return this; + } + stack = []; + tokens = this.tokens; + i = tokens.length; + tokens[--i][0] = 'PARAM_END'; + while (tok = tokens[--i]) { + switch (tok[0]) { + case ')': + stack.push(tok); + break; + case '(': + case 'CALL_START': + if (stack.length) { + stack.pop(); + } else if (tok[0] === '(') { + tok[0] = 'PARAM_START'; + return this; + } else { + return this; + } + } + } + return this; + }; + + Lexer.prototype.closeIndentation = function() { + return this.outdentToken(this.indent); + }; + + Lexer.prototype.balancedString = function(str, end) { + var continueCount, i, letter, match, prev, stack, _i, _ref2; + continueCount = 0; + stack = [end]; + for (i = _i = 1, _ref2 = str.length; 1 <= _ref2 ? _i < _ref2 : _i > _ref2; i = 1 <= _ref2 ? ++_i : --_i) { + if (continueCount) { + --continueCount; + continue; + } + switch (letter = str.charAt(i)) { + case '\\': + ++continueCount; + continue; + case end: + stack.pop(); + if (!stack.length) { + return str.slice(0, +i + 1 || 9e9); + } + end = stack[stack.length - 1]; + continue; + } + if (end === '}' && (letter === '"' || letter === "'")) { + stack.push(end = letter); + } else if (end === '}' && letter === '/' && (match = HEREGEX.exec(str.slice(i)) || REGEX.exec(str.slice(i)))) { + continueCount += match[0].length - 1; + } else if (end === '}' && letter === '{') { + stack.push(end = '}'); + } else if (end === '"' && prev === '#' && letter === '{') { + stack.push(end = '}'); + } + prev = letter; + } + return this.error("missing " + (stack.pop()) + ", starting"); + }; + + Lexer.prototype.interpolateString = function(str, options) { + var column, errorToken, expr, heredoc, i, inner, interpolated, len, letter, lexedLength, line, locationToken, nested, offsetInChunk, pi, plusToken, popped, regex, rparen, strOffset, tag, token, tokens, value, _i, _len, _ref2, _ref3, _ref4; + if (options == null) { + options = {}; + } + heredoc = options.heredoc, regex = options.regex, offsetInChunk = options.offsetInChunk, strOffset = options.strOffset, lexedLength = options.lexedLength; + offsetInChunk || (offsetInChunk = 0); + strOffset || (strOffset = 0); + lexedLength || (lexedLength = str.length); + tokens = []; + pi = 0; + i = -1; + while (letter = str.charAt(i += 1)) { + if (letter === '\\') { + i += 1; + continue; + } + if (!(letter === '#' && str.charAt(i + 1) === '{' && (expr = this.balancedString(str.slice(i + 1), '}')))) { + continue; + } + if (pi < i) { + tokens.push(this.makeToken('NEOSTRING', str.slice(pi, i), strOffset + pi)); + } + if (!errorToken) { + errorToken = this.makeToken('', 'string interpolation', offsetInChunk + i + 1, 2); + } + inner = expr.slice(1, -1); + if (inner.length) { + _ref2 = this.getLineAndColumnFromChunk(strOffset + i + 1), line = _ref2[0], column = _ref2[1]; + nested = new Lexer().tokenize(inner, { + line: line, + column: column, + rewrite: false + }); + popped = nested.pop(); + if (((_ref3 = nested[0]) != null ? _ref3[0] : void 0) === 'TERMINATOR') { + popped = nested.shift(); + } + if (len = nested.length) { + if (len > 1) { + nested.unshift(this.makeToken('(', '(', strOffset + i + 1, 0)); + nested.push(this.makeToken(')', ')', strOffset + i + 1 + inner.length, 0)); + } + tokens.push(['TOKENS', nested]); + } + } + i += expr.length; + pi = i + 1; + } + if ((i > pi && pi < str.length)) { + tokens.push(this.makeToken('NEOSTRING', str.slice(pi), strOffset + pi)); + } + if (regex) { + return tokens; + } + if (!tokens.length) { + return this.token('STRING', '""', offsetInChunk, lexedLength); + } + if (tokens[0][0] !== 'NEOSTRING') { + tokens.unshift(this.makeToken('NEOSTRING', '', offsetInChunk)); + } + if (interpolated = tokens.length > 1) { + this.token('(', '(', offsetInChunk, 0, errorToken); + } + for (i = _i = 0, _len = tokens.length; _i < _len; i = ++_i) { + token = tokens[i]; + tag = token[0], value = token[1]; + if (i) { + if (i) { + plusToken = this.token('+', '+'); + } + locationToken = tag === 'TOKENS' ? value[0] : token; + plusToken[2] = { + first_line: locationToken[2].first_line, + first_column: locationToken[2].first_column, + last_line: locationToken[2].first_line, + last_column: locationToken[2].first_column + }; + } + if (tag === 'TOKENS') { + (_ref4 = this.tokens).push.apply(_ref4, value); + } else if (tag === 'NEOSTRING') { + token[0] = 'STRING'; + token[1] = this.makeString(value, '"', heredoc); + this.tokens.push(token); + } else { + this.error("Unexpected " + tag); + } + } + if (interpolated) { + rparen = this.makeToken(')', ')', offsetInChunk + lexedLength, 0); + rparen.stringEnd = true; + this.tokens.push(rparen); + } + return tokens; + }; + + Lexer.prototype.pair = function(tag) { + var wanted; + if (tag !== (wanted = last(this.ends))) { + if ('OUTDENT' !== wanted) { + this.error("unmatched " + tag); + } + this.outdentToken(last(this.indents), true); + return this.pair(tag); + } + return this.ends.pop(); + }; + + Lexer.prototype.getLineAndColumnFromChunk = function(offset) { + var column, lineCount, lines, string; + if (offset === 0) { + return [this.chunkLine, this.chunkColumn]; + } + if (offset >= this.chunk.length) { + string = this.chunk; + } else { + string = this.chunk.slice(0, +(offset - 1) + 1 || 9e9); + } + lineCount = count(string, '\n'); + column = this.chunkColumn; + if (lineCount > 0) { + lines = string.split('\n'); + column = last(lines).length; + } else { + column += string.length; + } + return [this.chunkLine + lineCount, column]; + }; + + Lexer.prototype.makeToken = function(tag, value, offsetInChunk, length) { + var lastCharacter, locationData, token, _ref2, _ref3; + if (offsetInChunk == null) { + offsetInChunk = 0; + } + if (length == null) { + length = value.length; + } + locationData = {}; + _ref2 = this.getLineAndColumnFromChunk(offsetInChunk), locationData.first_line = _ref2[0], locationData.first_column = _ref2[1]; + lastCharacter = Math.max(0, length - 1); + _ref3 = this.getLineAndColumnFromChunk(offsetInChunk + lastCharacter), locationData.last_line = _ref3[0], locationData.last_column = _ref3[1]; + token = [tag, value, locationData]; + return token; + }; + + Lexer.prototype.token = function(tag, value, offsetInChunk, length, origin) { + var token; + token = this.makeToken(tag, value, offsetInChunk, length); + if (origin) { + token.origin = origin; + } + this.tokens.push(token); + return token; + }; + + Lexer.prototype.tag = function(index, tag) { + var tok; + return (tok = last(this.tokens, index)) && (tag ? tok[0] = tag : tok[0]); + }; + + Lexer.prototype.value = function(index, val) { + var tok; + return (tok = last(this.tokens, index)) && (val ? tok[1] = val : tok[1]); + }; + + Lexer.prototype.unfinished = function() { + var _ref2; + return LINE_CONTINUER.test(this.chunk) || ((_ref2 = this.tag()) === '\\' || _ref2 === '.' || _ref2 === '?.' || _ref2 === '?::' || _ref2 === 'UNARY' || _ref2 === 'MATH' || _ref2 === 'UNARY_MATH' || _ref2 === '+' || _ref2 === '-' || _ref2 === '**' || _ref2 === 'SHIFT' || _ref2 === 'RELATION' || _ref2 === 'COMPARE' || _ref2 === 'LOGIC' || _ref2 === 'THROW' || _ref2 === 'EXTENDS'); + }; + + Lexer.prototype.removeNewlines = function(str) { + return str.replace(/^\s*\n\s*/, '').replace(/([^\\]|\\\\)\s*\n\s*$/, '$1'); + }; + + Lexer.prototype.escapeLines = function(str, heredoc) { + str = str.replace(/\\[^\S\n]*(\n|\\)\s*/g, function(escaped, character) { + if (character === '\n') { + return ''; + } else { + return escaped; + } + }); + if (heredoc) { + return str.replace(MULTILINER, '\\n'); + } else { + return str.replace(/\s*\n\s*/g, ' '); + } + }; + + Lexer.prototype.makeString = function(body, quote, heredoc) { + if (!body) { + return quote + quote; + } + body = body.replace(RegExp("\\\\(" + quote + "|\\\\)", "g"), function(match, contents) { + if (contents === quote) { + return contents; + } else { + return match; + } + }); + body = body.replace(RegExp("" + quote, "g"), '\\$&'); + return quote + this.escapeLines(body, heredoc) + quote; + }; + + Lexer.prototype.error = function(message, offset) { + var first_column, first_line, _ref2; + if (offset == null) { + offset = 0; + } + _ref2 = this.getLineAndColumnFromChunk(offset), first_line = _ref2[0], first_column = _ref2[1]; + return throwSyntaxError(message, { + first_line: first_line, + first_column: first_column + }); + }; + + return Lexer; + + })(); + + JS_KEYWORDS = ['true', 'false', 'null', 'this', 'new', 'delete', 'typeof', 'in', 'instanceof', 'return', 'throw', 'break', 'continue', 'debugger', 'if', 'else', 'switch', 'for', 'while', 'do', 'try', 'catch', 'finally', 'class', 'extends', 'super']; + + COFFEE_KEYWORDS = ['undefined', 'then', 'unless', 'until', 'loop', 'of', 'by', 'when']; + + COFFEE_ALIAS_MAP = { + and: '&&', + or: '||', + is: '==', + isnt: '!=', + not: '!', + yes: 'true', + no: 'false', + on: 'true', + off: 'false' + }; + + COFFEE_ALIASES = (function() { + var _results; + _results = []; + for (key in COFFEE_ALIAS_MAP) { + _results.push(key); + } + return _results; + })(); + + COFFEE_KEYWORDS = COFFEE_KEYWORDS.concat(COFFEE_ALIASES); + + RESERVED = ['case', 'default', 'function', 'var', 'void', 'with', 'const', 'let', 'enum', 'export', 'import', 'native', '__hasProp', '__extends', '__slice', '__bind', '__indexOf', 'implements', 'interface', 'package', 'private', 'protected', 'public', 'static', 'yield']; + + STRICT_PROSCRIBED = ['arguments', 'eval']; + + JS_FORBIDDEN = JS_KEYWORDS.concat(RESERVED).concat(STRICT_PROSCRIBED); + + exports.RESERVED = RESERVED.concat(JS_KEYWORDS).concat(COFFEE_KEYWORDS).concat(STRICT_PROSCRIBED); + + exports.STRICT_PROSCRIBED = STRICT_PROSCRIBED; + + BOM = 65279; + + IDENTIFIER = /^([$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)([^\n\S]*:(?!:))?/; + + NUMBER = /^0b[01]+|^0o[0-7]+|^0x[\da-f]+|^\d*\.?\d+(?:e[+-]?\d+)?/i; + + HEREDOC = /^("""|''')((?:\\[\s\S]|[^\\])*?)(?:\n[^\n\S]*)?\1/; + + OPERATOR = /^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>*\/%])\2=?|\?(\.|::)|\.{2,3})/; + + WHITESPACE = /^[^\n\S]+/; + + COMMENT = /^###([^#][\s\S]*?)(?:###[^\n\S]*|###$)|^(?:\s*#(?!##[^#]).*)+/; + + CODE = /^[-=]>/; + + MULTI_DENT = /^(?:\n[^\n\S]*)+/; + + SIMPLESTR = /^'[^\\']*(?:\\[\s\S][^\\']*)*'/; + + JSTOKEN = /^`[^\\`]*(?:\\.[^\\`]*)*`/; + + REGEX = /^(\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)([imgy]{0,4})(?!\w)/; + + HEREGEX = /^\/{3}((?:\\?[\s\S])+?)\/{3}([imgy]{0,4})(?!\w)/; + + HEREGEX_OMIT = /((?:\\\\)+)|\\(\s|\/)|\s+(?:#.*)?/g; + + MULTILINER = /\n/g; + + HEREDOC_INDENT = /\n+([^\n\S]*)/g; + + HEREDOC_ILLEGAL = /\*\//; + + LINE_CONTINUER = /^\s*(?:,|\??\.(?![.\d])|::)/; + + TRAILING_SPACES = /\s+$/; + + COMPOUND_ASSIGN = ['-=', '+=', '/=', '*=', '%=', '||=', '&&=', '?=', '<<=', '>>=', '>>>=', '&=', '^=', '|=', '**=', '//=', '%%=']; + + UNARY = ['NEW', 'TYPEOF', 'DELETE', 'DO']; + + UNARY_MATH = ['!', '~']; + + LOGIC = ['&&', '||', '&', '|', '^']; + + SHIFT = ['<<', '>>', '>>>']; + + COMPARE = ['==', '!=', '<', '>', '<=', '>=']; + + MATH = ['*', '/', '%', '//', '%%']; + + RELATION = ['IN', 'OF', 'INSTANCEOF']; + + BOOL = ['TRUE', 'FALSE']; + + NOT_REGEX = ['NUMBER', 'REGEX', 'BOOL', 'NULL', 'UNDEFINED', '++', '--']; + + NOT_SPACED_REGEX = NOT_REGEX.concat(')', '}', 'THIS', 'IDENTIFIER', 'STRING', ']'); + + CALLABLE = ['IDENTIFIER', 'STRING', 'REGEX', ')', ']', '}', '?', '::', '@', 'THIS', 'SUPER']; + + INDEXABLE = CALLABLE.concat('NUMBER', 'BOOL', 'NULL', 'UNDEFINED'); + + LINE_BREAK = ['INDENT', 'OUTDENT', 'TERMINATOR']; + + INDENTABLE_CLOSERS = [')', '}', ']']; + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/nodes.js b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/nodes.js new file mode 100644 index 00000000..2c7959e1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/nodes.js @@ -0,0 +1,3158 @@ +// Generated by CoffeeScript 1.7.1 +(function() { + var Access, Arr, Assign, Base, Block, Call, Class, Code, CodeFragment, Comment, Existence, Expansion, Extends, For, HEXNUM, IDENTIFIER, IDENTIFIER_STR, IS_REGEX, IS_STRING, If, In, Index, LEVEL_ACCESS, LEVEL_COND, LEVEL_LIST, LEVEL_OP, LEVEL_PAREN, LEVEL_TOP, Literal, METHOD_DEF, NEGATE, NO, NUMBER, Obj, Op, Param, Parens, RESERVED, Range, Return, SIMPLENUM, STRICT_PROSCRIBED, Scope, Slice, Splat, Switch, TAB, THIS, Throw, Try, UTILITIES, Value, While, YES, addLocationDataFn, compact, del, ends, extend, flatten, fragmentsToText, isLiteralArguments, isLiteralThis, last, locationDataToString, merge, multident, parseNum, some, starts, throwSyntaxError, unfoldSoak, utility, _ref, _ref1, + __hasProp = {}.hasOwnProperty, + __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }, + __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }, + __slice = [].slice; + + Error.stackTraceLimit = Infinity; + + Scope = require('./scope').Scope; + + _ref = require('./lexer'), RESERVED = _ref.RESERVED, STRICT_PROSCRIBED = _ref.STRICT_PROSCRIBED; + + _ref1 = require('./helpers'), compact = _ref1.compact, flatten = _ref1.flatten, extend = _ref1.extend, merge = _ref1.merge, del = _ref1.del, starts = _ref1.starts, ends = _ref1.ends, last = _ref1.last, some = _ref1.some, addLocationDataFn = _ref1.addLocationDataFn, locationDataToString = _ref1.locationDataToString, throwSyntaxError = _ref1.throwSyntaxError; + + exports.extend = extend; + + exports.addLocationDataFn = addLocationDataFn; + + YES = function() { + return true; + }; + + NO = function() { + return false; + }; + + THIS = function() { + return this; + }; + + NEGATE = function() { + this.negated = !this.negated; + return this; + }; + + exports.CodeFragment = CodeFragment = (function() { + function CodeFragment(parent, code) { + var _ref2; + this.code = "" + code; + this.locationData = parent != null ? parent.locationData : void 0; + this.type = (parent != null ? (_ref2 = parent.constructor) != null ? _ref2.name : void 0 : void 0) || 'unknown'; + } + + CodeFragment.prototype.toString = function() { + return "" + this.code + (this.locationData ? ": " + locationDataToString(this.locationData) : ''); + }; + + return CodeFragment; + + })(); + + fragmentsToText = function(fragments) { + var fragment; + return ((function() { + var _i, _len, _results; + _results = []; + for (_i = 0, _len = fragments.length; _i < _len; _i++) { + fragment = fragments[_i]; + _results.push(fragment.code); + } + return _results; + })()).join(''); + }; + + exports.Base = Base = (function() { + function Base() {} + + Base.prototype.compile = function(o, lvl) { + return fragmentsToText(this.compileToFragments(o, lvl)); + }; + + Base.prototype.compileToFragments = function(o, lvl) { + var node; + o = extend({}, o); + if (lvl) { + o.level = lvl; + } + node = this.unfoldSoak(o) || this; + node.tab = o.indent; + if (o.level === LEVEL_TOP || !node.isStatement(o)) { + return node.compileNode(o); + } else { + return node.compileClosure(o); + } + }; + + Base.prototype.compileClosure = function(o) { + var args, argumentsNode, func, jumpNode, meth; + if (jumpNode = this.jumps()) { + jumpNode.error('cannot use a pure statement in an expression'); + } + o.sharedScope = true; + func = new Code([], Block.wrap([this])); + args = []; + if ((argumentsNode = this.contains(isLiteralArguments)) || this.contains(isLiteralThis)) { + args = [new Literal('this')]; + if (argumentsNode) { + meth = 'apply'; + args.push(new Literal('arguments')); + } else { + meth = 'call'; + } + func = new Value(func, [new Access(new Literal(meth))]); + } + return (new Call(func, args)).compileNode(o); + }; + + Base.prototype.cache = function(o, level, reused) { + var ref, sub; + if (!this.isComplex()) { + ref = level ? this.compileToFragments(o, level) : this; + return [ref, ref]; + } else { + ref = new Literal(reused || o.scope.freeVariable('ref')); + sub = new Assign(ref, this); + if (level) { + return [sub.compileToFragments(o, level), [this.makeCode(ref.value)]]; + } else { + return [sub, ref]; + } + } + }; + + Base.prototype.cacheToCodeFragments = function(cacheValues) { + return [fragmentsToText(cacheValues[0]), fragmentsToText(cacheValues[1])]; + }; + + Base.prototype.makeReturn = function(res) { + var me; + me = this.unwrapAll(); + if (res) { + return new Call(new Literal("" + res + ".push"), [me]); + } else { + return new Return(me); + } + }; + + Base.prototype.contains = function(pred) { + var node; + node = void 0; + this.traverseChildren(false, function(n) { + if (pred(n)) { + node = n; + return false; + } + }); + return node; + }; + + Base.prototype.lastNonComment = function(list) { + var i; + i = list.length; + while (i--) { + if (!(list[i] instanceof Comment)) { + return list[i]; + } + } + return null; + }; + + Base.prototype.toString = function(idt, name) { + var tree; + if (idt == null) { + idt = ''; + } + if (name == null) { + name = this.constructor.name; + } + tree = '\n' + idt + name; + if (this.soak) { + tree += '?'; + } + this.eachChild(function(node) { + return tree += node.toString(idt + TAB); + }); + return tree; + }; + + Base.prototype.eachChild = function(func) { + var attr, child, _i, _j, _len, _len1, _ref2, _ref3; + if (!this.children) { + return this; + } + _ref2 = this.children; + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + attr = _ref2[_i]; + if (this[attr]) { + _ref3 = flatten([this[attr]]); + for (_j = 0, _len1 = _ref3.length; _j < _len1; _j++) { + child = _ref3[_j]; + if (func(child) === false) { + return this; + } + } + } + } + return this; + }; + + Base.prototype.traverseChildren = function(crossScope, func) { + return this.eachChild(function(child) { + var recur; + recur = func(child); + if (recur !== false) { + return child.traverseChildren(crossScope, func); + } + }); + }; + + Base.prototype.invert = function() { + return new Op('!', this); + }; + + Base.prototype.unwrapAll = function() { + var node; + node = this; + while (node !== (node = node.unwrap())) { + continue; + } + return node; + }; + + Base.prototype.children = []; + + Base.prototype.isStatement = NO; + + Base.prototype.jumps = NO; + + Base.prototype.isComplex = YES; + + Base.prototype.isChainable = NO; + + Base.prototype.isAssignable = NO; + + Base.prototype.unwrap = THIS; + + Base.prototype.unfoldSoak = NO; + + Base.prototype.assigns = NO; + + Base.prototype.updateLocationDataIfMissing = function(locationData) { + if (this.locationData) { + return this; + } + this.locationData = locationData; + return this.eachChild(function(child) { + return child.updateLocationDataIfMissing(locationData); + }); + }; + + Base.prototype.error = function(message) { + return throwSyntaxError(message, this.locationData); + }; + + Base.prototype.makeCode = function(code) { + return new CodeFragment(this, code); + }; + + Base.prototype.wrapInBraces = function(fragments) { + return [].concat(this.makeCode('('), fragments, this.makeCode(')')); + }; + + Base.prototype.joinFragmentArrays = function(fragmentsList, joinStr) { + var answer, fragments, i, _i, _len; + answer = []; + for (i = _i = 0, _len = fragmentsList.length; _i < _len; i = ++_i) { + fragments = fragmentsList[i]; + if (i) { + answer.push(this.makeCode(joinStr)); + } + answer = answer.concat(fragments); + } + return answer; + }; + + return Base; + + })(); + + exports.Block = Block = (function(_super) { + __extends(Block, _super); + + function Block(nodes) { + this.expressions = compact(flatten(nodes || [])); + } + + Block.prototype.children = ['expressions']; + + Block.prototype.push = function(node) { + this.expressions.push(node); + return this; + }; + + Block.prototype.pop = function() { + return this.expressions.pop(); + }; + + Block.prototype.unshift = function(node) { + this.expressions.unshift(node); + return this; + }; + + Block.prototype.unwrap = function() { + if (this.expressions.length === 1) { + return this.expressions[0]; + } else { + return this; + } + }; + + Block.prototype.isEmpty = function() { + return !this.expressions.length; + }; + + Block.prototype.isStatement = function(o) { + var exp, _i, _len, _ref2; + _ref2 = this.expressions; + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + exp = _ref2[_i]; + if (exp.isStatement(o)) { + return true; + } + } + return false; + }; + + Block.prototype.jumps = function(o) { + var exp, jumpNode, _i, _len, _ref2; + _ref2 = this.expressions; + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + exp = _ref2[_i]; + if (jumpNode = exp.jumps(o)) { + return jumpNode; + } + } + }; + + Block.prototype.makeReturn = function(res) { + var expr, len; + len = this.expressions.length; + while (len--) { + expr = this.expressions[len]; + if (!(expr instanceof Comment)) { + this.expressions[len] = expr.makeReturn(res); + if (expr instanceof Return && !expr.expression) { + this.expressions.splice(len, 1); + } + break; + } + } + return this; + }; + + Block.prototype.compileToFragments = function(o, level) { + if (o == null) { + o = {}; + } + if (o.scope) { + return Block.__super__.compileToFragments.call(this, o, level); + } else { + return this.compileRoot(o); + } + }; + + Block.prototype.compileNode = function(o) { + var answer, compiledNodes, fragments, index, node, top, _i, _len, _ref2; + this.tab = o.indent; + top = o.level === LEVEL_TOP; + compiledNodes = []; + _ref2 = this.expressions; + for (index = _i = 0, _len = _ref2.length; _i < _len; index = ++_i) { + node = _ref2[index]; + node = node.unwrapAll(); + node = node.unfoldSoak(o) || node; + if (node instanceof Block) { + compiledNodes.push(node.compileNode(o)); + } else if (top) { + node.front = true; + fragments = node.compileToFragments(o); + if (!node.isStatement(o)) { + fragments.unshift(this.makeCode("" + this.tab)); + fragments.push(this.makeCode(";")); + } + compiledNodes.push(fragments); + } else { + compiledNodes.push(node.compileToFragments(o, LEVEL_LIST)); + } + } + if (top) { + if (this.spaced) { + return [].concat(this.joinFragmentArrays(compiledNodes, '\n\n'), this.makeCode("\n")); + } else { + return this.joinFragmentArrays(compiledNodes, '\n'); + } + } + if (compiledNodes.length) { + answer = this.joinFragmentArrays(compiledNodes, ', '); + } else { + answer = [this.makeCode("void 0")]; + } + if (compiledNodes.length > 1 && o.level >= LEVEL_LIST) { + return this.wrapInBraces(answer); + } else { + return answer; + } + }; + + Block.prototype.compileRoot = function(o) { + var exp, fragments, i, name, prelude, preludeExps, rest, _i, _len, _ref2; + o.indent = o.bare ? '' : TAB; + o.level = LEVEL_TOP; + this.spaced = true; + o.scope = new Scope(null, this, null); + _ref2 = o.locals || []; + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + name = _ref2[_i]; + o.scope.parameter(name); + } + prelude = []; + if (!o.bare) { + preludeExps = (function() { + var _j, _len1, _ref3, _results; + _ref3 = this.expressions; + _results = []; + for (i = _j = 0, _len1 = _ref3.length; _j < _len1; i = ++_j) { + exp = _ref3[i]; + if (!(exp.unwrap() instanceof Comment)) { + break; + } + _results.push(exp); + } + return _results; + }).call(this); + rest = this.expressions.slice(preludeExps.length); + this.expressions = preludeExps; + if (preludeExps.length) { + prelude = this.compileNode(merge(o, { + indent: '' + })); + prelude.push(this.makeCode("\n")); + } + this.expressions = rest; + } + fragments = this.compileWithDeclarations(o); + if (o.bare) { + return fragments; + } + return [].concat(prelude, this.makeCode("(function() {\n"), fragments, this.makeCode("\n}).call(this);\n")); + }; + + Block.prototype.compileWithDeclarations = function(o) { + var assigns, declars, exp, fragments, i, post, rest, scope, spaced, _i, _len, _ref2, _ref3, _ref4; + fragments = []; + post = []; + _ref2 = this.expressions; + for (i = _i = 0, _len = _ref2.length; _i < _len; i = ++_i) { + exp = _ref2[i]; + exp = exp.unwrap(); + if (!(exp instanceof Comment || exp instanceof Literal)) { + break; + } + } + o = merge(o, { + level: LEVEL_TOP + }); + if (i) { + rest = this.expressions.splice(i, 9e9); + _ref3 = [this.spaced, false], spaced = _ref3[0], this.spaced = _ref3[1]; + _ref4 = [this.compileNode(o), spaced], fragments = _ref4[0], this.spaced = _ref4[1]; + this.expressions = rest; + } + post = this.compileNode(o); + scope = o.scope; + if (scope.expressions === this) { + declars = o.scope.hasDeclarations(); + assigns = scope.hasAssignments; + if (declars || assigns) { + if (i) { + fragments.push(this.makeCode('\n')); + } + fragments.push(this.makeCode("" + this.tab + "var ")); + if (declars) { + fragments.push(this.makeCode(scope.declaredVariables().join(', '))); + } + if (assigns) { + if (declars) { + fragments.push(this.makeCode(",\n" + (this.tab + TAB))); + } + fragments.push(this.makeCode(scope.assignedVariables().join(",\n" + (this.tab + TAB)))); + } + fragments.push(this.makeCode(";\n" + (this.spaced ? '\n' : ''))); + } else if (fragments.length && post.length) { + fragments.push(this.makeCode("\n")); + } + } + return fragments.concat(post); + }; + + Block.wrap = function(nodes) { + if (nodes.length === 1 && nodes[0] instanceof Block) { + return nodes[0]; + } + return new Block(nodes); + }; + + return Block; + + })(Base); + + exports.Literal = Literal = (function(_super) { + __extends(Literal, _super); + + function Literal(value) { + this.value = value; + } + + Literal.prototype.makeReturn = function() { + if (this.isStatement()) { + return this; + } else { + return Literal.__super__.makeReturn.apply(this, arguments); + } + }; + + Literal.prototype.isAssignable = function() { + return IDENTIFIER.test(this.value); + }; + + Literal.prototype.isStatement = function() { + var _ref2; + return (_ref2 = this.value) === 'break' || _ref2 === 'continue' || _ref2 === 'debugger'; + }; + + Literal.prototype.isComplex = NO; + + Literal.prototype.assigns = function(name) { + return name === this.value; + }; + + Literal.prototype.jumps = function(o) { + if (this.value === 'break' && !((o != null ? o.loop : void 0) || (o != null ? o.block : void 0))) { + return this; + } + if (this.value === 'continue' && !(o != null ? o.loop : void 0)) { + return this; + } + }; + + Literal.prototype.compileNode = function(o) { + var answer, code, _ref2; + code = this.value === 'this' ? ((_ref2 = o.scope.method) != null ? _ref2.bound : void 0) ? o.scope.method.context : this.value : this.value.reserved ? "\"" + this.value + "\"" : this.value; + answer = this.isStatement() ? "" + this.tab + code + ";" : code; + return [this.makeCode(answer)]; + }; + + Literal.prototype.toString = function() { + return ' "' + this.value + '"'; + }; + + return Literal; + + })(Base); + + exports.Undefined = (function(_super) { + __extends(Undefined, _super); + + function Undefined() { + return Undefined.__super__.constructor.apply(this, arguments); + } + + Undefined.prototype.isAssignable = NO; + + Undefined.prototype.isComplex = NO; + + Undefined.prototype.compileNode = function(o) { + return [this.makeCode(o.level >= LEVEL_ACCESS ? '(void 0)' : 'void 0')]; + }; + + return Undefined; + + })(Base); + + exports.Null = (function(_super) { + __extends(Null, _super); + + function Null() { + return Null.__super__.constructor.apply(this, arguments); + } + + Null.prototype.isAssignable = NO; + + Null.prototype.isComplex = NO; + + Null.prototype.compileNode = function() { + return [this.makeCode("null")]; + }; + + return Null; + + })(Base); + + exports.Bool = (function(_super) { + __extends(Bool, _super); + + Bool.prototype.isAssignable = NO; + + Bool.prototype.isComplex = NO; + + Bool.prototype.compileNode = function() { + return [this.makeCode(this.val)]; + }; + + function Bool(val) { + this.val = val; + } + + return Bool; + + })(Base); + + exports.Return = Return = (function(_super) { + __extends(Return, _super); + + function Return(expr) { + if (expr && !expr.unwrap().isUndefined) { + this.expression = expr; + } + } + + Return.prototype.children = ['expression']; + + Return.prototype.isStatement = YES; + + Return.prototype.makeReturn = THIS; + + Return.prototype.jumps = THIS; + + Return.prototype.compileToFragments = function(o, level) { + var expr, _ref2; + expr = (_ref2 = this.expression) != null ? _ref2.makeReturn() : void 0; + if (expr && !(expr instanceof Return)) { + return expr.compileToFragments(o, level); + } else { + return Return.__super__.compileToFragments.call(this, o, level); + } + }; + + Return.prototype.compileNode = function(o) { + var answer; + answer = []; + answer.push(this.makeCode(this.tab + ("return" + (this.expression ? " " : "")))); + if (this.expression) { + answer = answer.concat(this.expression.compileToFragments(o, LEVEL_PAREN)); + } + answer.push(this.makeCode(";")); + return answer; + }; + + return Return; + + })(Base); + + exports.Value = Value = (function(_super) { + __extends(Value, _super); + + function Value(base, props, tag) { + if (!props && base instanceof Value) { + return base; + } + this.base = base; + this.properties = props || []; + if (tag) { + this[tag] = true; + } + return this; + } + + Value.prototype.children = ['base', 'properties']; + + Value.prototype.add = function(props) { + this.properties = this.properties.concat(props); + return this; + }; + + Value.prototype.hasProperties = function() { + return !!this.properties.length; + }; + + Value.prototype.bareLiteral = function(type) { + return !this.properties.length && this.base instanceof type; + }; + + Value.prototype.isArray = function() { + return this.bareLiteral(Arr); + }; + + Value.prototype.isRange = function() { + return this.bareLiteral(Range); + }; + + Value.prototype.isComplex = function() { + return this.hasProperties() || this.base.isComplex(); + }; + + Value.prototype.isAssignable = function() { + return this.hasProperties() || this.base.isAssignable(); + }; + + Value.prototype.isSimpleNumber = function() { + return this.bareLiteral(Literal) && SIMPLENUM.test(this.base.value); + }; + + Value.prototype.isString = function() { + return this.bareLiteral(Literal) && IS_STRING.test(this.base.value); + }; + + Value.prototype.isRegex = function() { + return this.bareLiteral(Literal) && IS_REGEX.test(this.base.value); + }; + + Value.prototype.isAtomic = function() { + var node, _i, _len, _ref2; + _ref2 = this.properties.concat(this.base); + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + node = _ref2[_i]; + if (node.soak || node instanceof Call) { + return false; + } + } + return true; + }; + + Value.prototype.isNotCallable = function() { + return this.isSimpleNumber() || this.isString() || this.isRegex() || this.isArray() || this.isRange() || this.isSplice() || this.isObject(); + }; + + Value.prototype.isStatement = function(o) { + return !this.properties.length && this.base.isStatement(o); + }; + + Value.prototype.assigns = function(name) { + return !this.properties.length && this.base.assigns(name); + }; + + Value.prototype.jumps = function(o) { + return !this.properties.length && this.base.jumps(o); + }; + + Value.prototype.isObject = function(onlyGenerated) { + if (this.properties.length) { + return false; + } + return (this.base instanceof Obj) && (!onlyGenerated || this.base.generated); + }; + + Value.prototype.isSplice = function() { + return last(this.properties) instanceof Slice; + }; + + Value.prototype.looksStatic = function(className) { + var _ref2; + return this.base.value === className && this.properties.length && ((_ref2 = this.properties[0].name) != null ? _ref2.value : void 0) !== 'prototype'; + }; + + Value.prototype.unwrap = function() { + if (this.properties.length) { + return this; + } else { + return this.base; + } + }; + + Value.prototype.cacheReference = function(o) { + var base, bref, name, nref; + name = last(this.properties); + if (this.properties.length < 2 && !this.base.isComplex() && !(name != null ? name.isComplex() : void 0)) { + return [this, this]; + } + base = new Value(this.base, this.properties.slice(0, -1)); + if (base.isComplex()) { + bref = new Literal(o.scope.freeVariable('base')); + base = new Value(new Parens(new Assign(bref, base))); + } + if (!name) { + return [base, bref]; + } + if (name.isComplex()) { + nref = new Literal(o.scope.freeVariable('name')); + name = new Index(new Assign(nref, name.index)); + nref = new Index(nref); + } + return [base.add(name), new Value(bref || base.base, [nref || name])]; + }; + + Value.prototype.compileNode = function(o) { + var fragments, prop, props, _i, _len; + this.base.front = this.front; + props = this.properties; + fragments = this.base.compileToFragments(o, (props.length ? LEVEL_ACCESS : null)); + if ((this.base instanceof Parens || props.length) && SIMPLENUM.test(fragmentsToText(fragments))) { + fragments.push(this.makeCode('.')); + } + for (_i = 0, _len = props.length; _i < _len; _i++) { + prop = props[_i]; + fragments.push.apply(fragments, prop.compileToFragments(o)); + } + return fragments; + }; + + Value.prototype.unfoldSoak = function(o) { + return this.unfoldedSoak != null ? this.unfoldedSoak : this.unfoldedSoak = (function(_this) { + return function() { + var fst, i, ifn, prop, ref, snd, _i, _len, _ref2, _ref3; + if (ifn = _this.base.unfoldSoak(o)) { + (_ref2 = ifn.body.properties).push.apply(_ref2, _this.properties); + return ifn; + } + _ref3 = _this.properties; + for (i = _i = 0, _len = _ref3.length; _i < _len; i = ++_i) { + prop = _ref3[i]; + if (!prop.soak) { + continue; + } + prop.soak = false; + fst = new Value(_this.base, _this.properties.slice(0, i)); + snd = new Value(_this.base, _this.properties.slice(i)); + if (fst.isComplex()) { + ref = new Literal(o.scope.freeVariable('ref')); + fst = new Parens(new Assign(ref, fst)); + snd.base = ref; + } + return new If(new Existence(fst), snd, { + soak: true + }); + } + return false; + }; + })(this)(); + }; + + return Value; + + })(Base); + + exports.Comment = Comment = (function(_super) { + __extends(Comment, _super); + + function Comment(comment) { + this.comment = comment; + } + + Comment.prototype.isStatement = YES; + + Comment.prototype.makeReturn = THIS; + + Comment.prototype.compileNode = function(o, level) { + var code, comment; + comment = this.comment.replace(/^(\s*)#/gm, "$1 *"); + code = "/*" + (multident(comment, this.tab)) + (__indexOf.call(comment, '\n') >= 0 ? "\n" + this.tab : '') + " */"; + if ((level || o.level) === LEVEL_TOP) { + code = o.indent + code; + } + return [this.makeCode("\n"), this.makeCode(code)]; + }; + + return Comment; + + })(Base); + + exports.Call = Call = (function(_super) { + __extends(Call, _super); + + function Call(variable, args, soak) { + this.args = args != null ? args : []; + this.soak = soak; + this.isNew = false; + this.isSuper = variable === 'super'; + this.variable = this.isSuper ? null : variable; + if (variable instanceof Value && variable.isNotCallable()) { + variable.error("literal is not a function"); + } + } + + Call.prototype.children = ['variable', 'args']; + + Call.prototype.newInstance = function() { + var base, _ref2; + base = ((_ref2 = this.variable) != null ? _ref2.base : void 0) || this.variable; + if (base instanceof Call && !base.isNew) { + base.newInstance(); + } else { + this.isNew = true; + } + return this; + }; + + Call.prototype.superReference = function(o) { + var accesses, method; + method = o.scope.namedMethod(); + if (method != null ? method.klass : void 0) { + accesses = [new Access(new Literal('__super__'))]; + if (method["static"]) { + accesses.push(new Access(new Literal('constructor'))); + } + accesses.push(new Access(new Literal(method.name))); + return (new Value(new Literal(method.klass), accesses)).compile(o); + } else if (method != null ? method.ctor : void 0) { + return "" + method.name + ".__super__.constructor"; + } else { + return this.error('cannot call super outside of an instance method.'); + } + }; + + Call.prototype.superThis = function(o) { + var method; + method = o.scope.method; + return (method && !method.klass && method.context) || "this"; + }; + + Call.prototype.unfoldSoak = function(o) { + var call, ifn, left, list, rite, _i, _len, _ref2, _ref3; + if (this.soak) { + if (this.variable) { + if (ifn = unfoldSoak(o, this, 'variable')) { + return ifn; + } + _ref2 = new Value(this.variable).cacheReference(o), left = _ref2[0], rite = _ref2[1]; + } else { + left = new Literal(this.superReference(o)); + rite = new Value(left); + } + rite = new Call(rite, this.args); + rite.isNew = this.isNew; + left = new Literal("typeof " + (left.compile(o)) + " === \"function\""); + return new If(left, new Value(rite), { + soak: true + }); + } + call = this; + list = []; + while (true) { + if (call.variable instanceof Call) { + list.push(call); + call = call.variable; + continue; + } + if (!(call.variable instanceof Value)) { + break; + } + list.push(call); + if (!((call = call.variable.base) instanceof Call)) { + break; + } + } + _ref3 = list.reverse(); + for (_i = 0, _len = _ref3.length; _i < _len; _i++) { + call = _ref3[_i]; + if (ifn) { + if (call.variable instanceof Call) { + call.variable = ifn; + } else { + call.variable.base = ifn; + } + } + ifn = unfoldSoak(o, call, 'variable'); + } + return ifn; + }; + + Call.prototype.compileNode = function(o) { + var arg, argIndex, compiledArgs, compiledArray, fragments, preface, _i, _len, _ref2, _ref3; + if ((_ref2 = this.variable) != null) { + _ref2.front = this.front; + } + compiledArray = Splat.compileSplattedArray(o, this.args, true); + if (compiledArray.length) { + return this.compileSplat(o, compiledArray); + } + compiledArgs = []; + _ref3 = this.args; + for (argIndex = _i = 0, _len = _ref3.length; _i < _len; argIndex = ++_i) { + arg = _ref3[argIndex]; + if (argIndex) { + compiledArgs.push(this.makeCode(", ")); + } + compiledArgs.push.apply(compiledArgs, arg.compileToFragments(o, LEVEL_LIST)); + } + fragments = []; + if (this.isSuper) { + preface = this.superReference(o) + (".call(" + (this.superThis(o))); + if (compiledArgs.length) { + preface += ", "; + } + fragments.push(this.makeCode(preface)); + } else { + if (this.isNew) { + fragments.push(this.makeCode('new ')); + } + fragments.push.apply(fragments, this.variable.compileToFragments(o, LEVEL_ACCESS)); + fragments.push(this.makeCode("(")); + } + fragments.push.apply(fragments, compiledArgs); + fragments.push(this.makeCode(")")); + return fragments; + }; + + Call.prototype.compileSplat = function(o, splatArgs) { + var answer, base, fun, idt, name, ref; + if (this.isSuper) { + return [].concat(this.makeCode("" + (this.superReference(o)) + ".apply(" + (this.superThis(o)) + ", "), splatArgs, this.makeCode(")")); + } + if (this.isNew) { + idt = this.tab + TAB; + return [].concat(this.makeCode("(function(func, args, ctor) {\n" + idt + "ctor.prototype = func.prototype;\n" + idt + "var child = new ctor, result = func.apply(child, args);\n" + idt + "return Object(result) === result ? result : child;\n" + this.tab + "})("), this.variable.compileToFragments(o, LEVEL_LIST), this.makeCode(", "), splatArgs, this.makeCode(", function(){})")); + } + answer = []; + base = new Value(this.variable); + if ((name = base.properties.pop()) && base.isComplex()) { + ref = o.scope.freeVariable('ref'); + answer = answer.concat(this.makeCode("(" + ref + " = "), base.compileToFragments(o, LEVEL_LIST), this.makeCode(")"), name.compileToFragments(o)); + } else { + fun = base.compileToFragments(o, LEVEL_ACCESS); + if (SIMPLENUM.test(fragmentsToText(fun))) { + fun = this.wrapInBraces(fun); + } + if (name) { + ref = fragmentsToText(fun); + fun.push.apply(fun, name.compileToFragments(o)); + } else { + ref = 'null'; + } + answer = answer.concat(fun); + } + return answer = answer.concat(this.makeCode(".apply(" + ref + ", "), splatArgs, this.makeCode(")")); + }; + + return Call; + + })(Base); + + exports.Extends = Extends = (function(_super) { + __extends(Extends, _super); + + function Extends(child, parent) { + this.child = child; + this.parent = parent; + } + + Extends.prototype.children = ['child', 'parent']; + + Extends.prototype.compileToFragments = function(o) { + return new Call(new Value(new Literal(utility('extends'))), [this.child, this.parent]).compileToFragments(o); + }; + + return Extends; + + })(Base); + + exports.Access = Access = (function(_super) { + __extends(Access, _super); + + function Access(name, tag) { + this.name = name; + this.name.asKey = true; + this.soak = tag === 'soak'; + } + + Access.prototype.children = ['name']; + + Access.prototype.compileToFragments = function(o) { + var name; + name = this.name.compileToFragments(o); + if (IDENTIFIER.test(fragmentsToText(name))) { + name.unshift(this.makeCode(".")); + } else { + name.unshift(this.makeCode("[")); + name.push(this.makeCode("]")); + } + return name; + }; + + Access.prototype.isComplex = NO; + + return Access; + + })(Base); + + exports.Index = Index = (function(_super) { + __extends(Index, _super); + + function Index(index) { + this.index = index; + } + + Index.prototype.children = ['index']; + + Index.prototype.compileToFragments = function(o) { + return [].concat(this.makeCode("["), this.index.compileToFragments(o, LEVEL_PAREN), this.makeCode("]")); + }; + + Index.prototype.isComplex = function() { + return this.index.isComplex(); + }; + + return Index; + + })(Base); + + exports.Range = Range = (function(_super) { + __extends(Range, _super); + + Range.prototype.children = ['from', 'to']; + + function Range(from, to, tag) { + this.from = from; + this.to = to; + this.exclusive = tag === 'exclusive'; + this.equals = this.exclusive ? '' : '='; + } + + Range.prototype.compileVariables = function(o) { + var step, _ref2, _ref3, _ref4, _ref5; + o = merge(o, { + top: true + }); + _ref2 = this.cacheToCodeFragments(this.from.cache(o, LEVEL_LIST)), this.fromC = _ref2[0], this.fromVar = _ref2[1]; + _ref3 = this.cacheToCodeFragments(this.to.cache(o, LEVEL_LIST)), this.toC = _ref3[0], this.toVar = _ref3[1]; + if (step = del(o, 'step')) { + _ref4 = this.cacheToCodeFragments(step.cache(o, LEVEL_LIST)), this.step = _ref4[0], this.stepVar = _ref4[1]; + } + _ref5 = [this.fromVar.match(NUMBER), this.toVar.match(NUMBER)], this.fromNum = _ref5[0], this.toNum = _ref5[1]; + if (this.stepVar) { + return this.stepNum = this.stepVar.match(NUMBER); + } + }; + + Range.prototype.compileNode = function(o) { + var cond, condPart, from, gt, idx, idxName, known, lt, namedIndex, stepPart, to, varPart, _ref2, _ref3; + if (!this.fromVar) { + this.compileVariables(o); + } + if (!o.index) { + return this.compileArray(o); + } + known = this.fromNum && this.toNum; + idx = del(o, 'index'); + idxName = del(o, 'name'); + namedIndex = idxName && idxName !== idx; + varPart = "" + idx + " = " + this.fromC; + if (this.toC !== this.toVar) { + varPart += ", " + this.toC; + } + if (this.step !== this.stepVar) { + varPart += ", " + this.step; + } + _ref2 = ["" + idx + " <" + this.equals, "" + idx + " >" + this.equals], lt = _ref2[0], gt = _ref2[1]; + condPart = this.stepNum ? parseNum(this.stepNum[0]) > 0 ? "" + lt + " " + this.toVar : "" + gt + " " + this.toVar : known ? ((_ref3 = [parseNum(this.fromNum[0]), parseNum(this.toNum[0])], from = _ref3[0], to = _ref3[1], _ref3), from <= to ? "" + lt + " " + to : "" + gt + " " + to) : (cond = this.stepVar ? "" + this.stepVar + " > 0" : "" + this.fromVar + " <= " + this.toVar, "" + cond + " ? " + lt + " " + this.toVar + " : " + gt + " " + this.toVar); + stepPart = this.stepVar ? "" + idx + " += " + this.stepVar : known ? namedIndex ? from <= to ? "++" + idx : "--" + idx : from <= to ? "" + idx + "++" : "" + idx + "--" : namedIndex ? "" + cond + " ? ++" + idx + " : --" + idx : "" + cond + " ? " + idx + "++ : " + idx + "--"; + if (namedIndex) { + varPart = "" + idxName + " = " + varPart; + } + if (namedIndex) { + stepPart = "" + idxName + " = " + stepPart; + } + return [this.makeCode("" + varPart + "; " + condPart + "; " + stepPart)]; + }; + + Range.prototype.compileArray = function(o) { + var args, body, cond, hasArgs, i, idt, post, pre, range, result, vars, _i, _ref2, _ref3, _results; + if (this.fromNum && this.toNum && Math.abs(this.fromNum - this.toNum) <= 20) { + range = (function() { + _results = []; + for (var _i = _ref2 = +this.fromNum, _ref3 = +this.toNum; _ref2 <= _ref3 ? _i <= _ref3 : _i >= _ref3; _ref2 <= _ref3 ? _i++ : _i--){ _results.push(_i); } + return _results; + }).apply(this); + if (this.exclusive) { + range.pop(); + } + return [this.makeCode("[" + (range.join(', ')) + "]")]; + } + idt = this.tab + TAB; + i = o.scope.freeVariable('i'); + result = o.scope.freeVariable('results'); + pre = "\n" + idt + result + " = [];"; + if (this.fromNum && this.toNum) { + o.index = i; + body = fragmentsToText(this.compileNode(o)); + } else { + vars = ("" + i + " = " + this.fromC) + (this.toC !== this.toVar ? ", " + this.toC : ''); + cond = "" + this.fromVar + " <= " + this.toVar; + body = "var " + vars + "; " + cond + " ? " + i + " <" + this.equals + " " + this.toVar + " : " + i + " >" + this.equals + " " + this.toVar + "; " + cond + " ? " + i + "++ : " + i + "--"; + } + post = "{ " + result + ".push(" + i + "); }\n" + idt + "return " + result + ";\n" + o.indent; + hasArgs = function(node) { + return node != null ? node.contains(isLiteralArguments) : void 0; + }; + if (hasArgs(this.from) || hasArgs(this.to)) { + args = ', arguments'; + } + return [this.makeCode("(function() {" + pre + "\n" + idt + "for (" + body + ")" + post + "}).apply(this" + (args != null ? args : '') + ")")]; + }; + + return Range; + + })(Base); + + exports.Slice = Slice = (function(_super) { + __extends(Slice, _super); + + Slice.prototype.children = ['range']; + + function Slice(range) { + this.range = range; + Slice.__super__.constructor.call(this); + } + + Slice.prototype.compileNode = function(o) { + var compiled, compiledText, from, fromCompiled, to, toStr, _ref2; + _ref2 = this.range, to = _ref2.to, from = _ref2.from; + fromCompiled = from && from.compileToFragments(o, LEVEL_PAREN) || [this.makeCode('0')]; + if (to) { + compiled = to.compileToFragments(o, LEVEL_PAREN); + compiledText = fragmentsToText(compiled); + if (!(!this.range.exclusive && +compiledText === -1)) { + toStr = ', ' + (this.range.exclusive ? compiledText : SIMPLENUM.test(compiledText) ? "" + (+compiledText + 1) : (compiled = to.compileToFragments(o, LEVEL_ACCESS), "+" + (fragmentsToText(compiled)) + " + 1 || 9e9")); + } + } + return [this.makeCode(".slice(" + (fragmentsToText(fromCompiled)) + (toStr || '') + ")")]; + }; + + return Slice; + + })(Base); + + exports.Obj = Obj = (function(_super) { + __extends(Obj, _super); + + function Obj(props, generated) { + this.generated = generated != null ? generated : false; + this.objects = this.properties = props || []; + } + + Obj.prototype.children = ['properties']; + + Obj.prototype.compileNode = function(o) { + var answer, i, idt, indent, join, lastNoncom, node, prop, props, _i, _j, _len, _len1; + props = this.properties; + if (!props.length) { + return [this.makeCode(this.front ? '({})' : '{}')]; + } + if (this.generated) { + for (_i = 0, _len = props.length; _i < _len; _i++) { + node = props[_i]; + if (node instanceof Value) { + node.error('cannot have an implicit value in an implicit object'); + } + } + } + idt = o.indent += TAB; + lastNoncom = this.lastNonComment(this.properties); + answer = []; + for (i = _j = 0, _len1 = props.length; _j < _len1; i = ++_j) { + prop = props[i]; + join = i === props.length - 1 ? '' : prop === lastNoncom || prop instanceof Comment ? '\n' : ',\n'; + indent = prop instanceof Comment ? '' : idt; + if (prop instanceof Assign && prop.variable instanceof Value && prop.variable.hasProperties()) { + prop.variable.error('Invalid object key'); + } + if (prop instanceof Value && prop["this"]) { + prop = new Assign(prop.properties[0].name, prop, 'object'); + } + if (!(prop instanceof Comment)) { + if (!(prop instanceof Assign)) { + prop = new Assign(prop, prop, 'object'); + } + (prop.variable.base || prop.variable).asKey = true; + } + if (indent) { + answer.push(this.makeCode(indent)); + } + answer.push.apply(answer, prop.compileToFragments(o, LEVEL_TOP)); + if (join) { + answer.push(this.makeCode(join)); + } + } + answer.unshift(this.makeCode("{" + (props.length && '\n'))); + answer.push(this.makeCode("" + (props.length && '\n' + this.tab) + "}")); + if (this.front) { + return this.wrapInBraces(answer); + } else { + return answer; + } + }; + + Obj.prototype.assigns = function(name) { + var prop, _i, _len, _ref2; + _ref2 = this.properties; + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + prop = _ref2[_i]; + if (prop.assigns(name)) { + return true; + } + } + return false; + }; + + return Obj; + + })(Base); + + exports.Arr = Arr = (function(_super) { + __extends(Arr, _super); + + function Arr(objs) { + this.objects = objs || []; + } + + Arr.prototype.children = ['objects']; + + Arr.prototype.compileNode = function(o) { + var answer, compiledObjs, fragments, index, obj, _i, _len; + if (!this.objects.length) { + return [this.makeCode('[]')]; + } + o.indent += TAB; + answer = Splat.compileSplattedArray(o, this.objects); + if (answer.length) { + return answer; + } + answer = []; + compiledObjs = (function() { + var _i, _len, _ref2, _results; + _ref2 = this.objects; + _results = []; + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + obj = _ref2[_i]; + _results.push(obj.compileToFragments(o, LEVEL_LIST)); + } + return _results; + }).call(this); + for (index = _i = 0, _len = compiledObjs.length; _i < _len; index = ++_i) { + fragments = compiledObjs[index]; + if (index) { + answer.push(this.makeCode(", ")); + } + answer.push.apply(answer, fragments); + } + if (fragmentsToText(answer).indexOf('\n') >= 0) { + answer.unshift(this.makeCode("[\n" + o.indent)); + answer.push(this.makeCode("\n" + this.tab + "]")); + } else { + answer.unshift(this.makeCode("[")); + answer.push(this.makeCode("]")); + } + return answer; + }; + + Arr.prototype.assigns = function(name) { + var obj, _i, _len, _ref2; + _ref2 = this.objects; + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + obj = _ref2[_i]; + if (obj.assigns(name)) { + return true; + } + } + return false; + }; + + return Arr; + + })(Base); + + exports.Class = Class = (function(_super) { + __extends(Class, _super); + + function Class(variable, parent, body) { + this.variable = variable; + this.parent = parent; + this.body = body != null ? body : new Block; + this.boundFuncs = []; + this.body.classBody = true; + } + + Class.prototype.children = ['variable', 'parent', 'body']; + + Class.prototype.determineName = function() { + var decl, tail; + if (!this.variable) { + return null; + } + decl = (tail = last(this.variable.properties)) ? tail instanceof Access && tail.name.value : this.variable.base.value; + if (__indexOf.call(STRICT_PROSCRIBED, decl) >= 0) { + this.variable.error("class variable name may not be " + decl); + } + return decl && (decl = IDENTIFIER.test(decl) && decl); + }; + + Class.prototype.setContext = function(name) { + return this.body.traverseChildren(false, function(node) { + if (node.classBody) { + return false; + } + if (node instanceof Literal && node.value === 'this') { + return node.value = name; + } else if (node instanceof Code) { + node.klass = name; + if (node.bound) { + return node.context = name; + } + } + }); + }; + + Class.prototype.addBoundFunctions = function(o) { + var bvar, lhs, _i, _len, _ref2; + _ref2 = this.boundFuncs; + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + bvar = _ref2[_i]; + lhs = (new Value(new Literal("this"), [new Access(bvar)])).compile(o); + this.ctor.body.unshift(new Literal("" + lhs + " = " + (utility('bind')) + "(" + lhs + ", this)")); + } + }; + + Class.prototype.addProperties = function(node, name, o) { + var assign, base, exprs, func, props; + props = node.base.properties.slice(0); + exprs = (function() { + var _results; + _results = []; + while (assign = props.shift()) { + if (assign instanceof Assign) { + base = assign.variable.base; + delete assign.context; + func = assign.value; + if (base.value === 'constructor') { + if (this.ctor) { + assign.error('cannot define more than one constructor in a class'); + } + if (func.bound) { + assign.error('cannot define a constructor as a bound function'); + } + if (func instanceof Code) { + assign = this.ctor = func; + } else { + this.externalCtor = o.classScope.freeVariable('class'); + assign = new Assign(new Literal(this.externalCtor), func); + } + } else { + if (assign.variable["this"]) { + func["static"] = true; + } else { + assign.variable = new Value(new Literal(name), [new Access(new Literal('prototype')), new Access(base)]); + if (func instanceof Code && func.bound) { + this.boundFuncs.push(base); + func.bound = false; + } + } + } + } + _results.push(assign); + } + return _results; + }).call(this); + return compact(exprs); + }; + + Class.prototype.walkBody = function(name, o) { + return this.traverseChildren(false, (function(_this) { + return function(child) { + var cont, exps, i, node, _i, _len, _ref2; + cont = true; + if (child instanceof Class) { + return false; + } + if (child instanceof Block) { + _ref2 = exps = child.expressions; + for (i = _i = 0, _len = _ref2.length; _i < _len; i = ++_i) { + node = _ref2[i]; + if (node instanceof Assign && node.variable.looksStatic(name)) { + node.value["static"] = true; + } else if (node instanceof Value && node.isObject(true)) { + cont = false; + exps[i] = _this.addProperties(node, name, o); + } + } + child.expressions = exps = flatten(exps); + } + return cont && !(child instanceof Class); + }; + })(this)); + }; + + Class.prototype.hoistDirectivePrologue = function() { + var expressions, index, node; + index = 0; + expressions = this.body.expressions; + while ((node = expressions[index]) && node instanceof Comment || node instanceof Value && node.isString()) { + ++index; + } + return this.directives = expressions.splice(0, index); + }; + + Class.prototype.ensureConstructor = function(name) { + if (!this.ctor) { + this.ctor = new Code; + if (this.externalCtor) { + this.ctor.body.push(new Literal("" + this.externalCtor + ".apply(this, arguments)")); + } else if (this.parent) { + this.ctor.body.push(new Literal("" + name + ".__super__.constructor.apply(this, arguments)")); + } + this.ctor.body.makeReturn(); + this.body.expressions.unshift(this.ctor); + } + this.ctor.ctor = this.ctor.name = name; + this.ctor.klass = null; + return this.ctor.noReturn = true; + }; + + Class.prototype.compileNode = function(o) { + var args, argumentsNode, func, jumpNode, klass, lname, name, superClass, _ref2; + if (jumpNode = this.body.jumps()) { + jumpNode.error('Class bodies cannot contain pure statements'); + } + if (argumentsNode = this.body.contains(isLiteralArguments)) { + argumentsNode.error("Class bodies shouldn't reference arguments"); + } + name = this.determineName() || '_Class'; + if (name.reserved) { + name = "_" + name; + } + lname = new Literal(name); + func = new Code([], Block.wrap([this.body])); + args = []; + o.classScope = func.makeScope(o.scope); + this.hoistDirectivePrologue(); + this.setContext(name); + this.walkBody(name, o); + this.ensureConstructor(name); + this.addBoundFunctions(o); + this.body.spaced = true; + this.body.expressions.push(lname); + if (this.parent) { + superClass = new Literal(o.classScope.freeVariable('super', false)); + this.body.expressions.unshift(new Extends(lname, superClass)); + func.params.push(new Param(superClass)); + args.push(this.parent); + } + (_ref2 = this.body.expressions).unshift.apply(_ref2, this.directives); + klass = new Parens(new Call(func, args)); + if (this.variable) { + klass = new Assign(this.variable, klass); + } + return klass.compileToFragments(o); + }; + + return Class; + + })(Base); + + exports.Assign = Assign = (function(_super) { + __extends(Assign, _super); + + function Assign(variable, value, context, options) { + var forbidden, name, _ref2; + this.variable = variable; + this.value = value; + this.context = context; + this.param = options && options.param; + this.subpattern = options && options.subpattern; + forbidden = (_ref2 = (name = this.variable.unwrapAll().value), __indexOf.call(STRICT_PROSCRIBED, _ref2) >= 0); + if (forbidden && this.context !== 'object') { + this.variable.error("variable name may not be \"" + name + "\""); + } + } + + Assign.prototype.children = ['variable', 'value']; + + Assign.prototype.isStatement = function(o) { + return (o != null ? o.level : void 0) === LEVEL_TOP && (this.context != null) && __indexOf.call(this.context, "?") >= 0; + }; + + Assign.prototype.assigns = function(name) { + return this[this.context === 'object' ? 'value' : 'variable'].assigns(name); + }; + + Assign.prototype.unfoldSoak = function(o) { + return unfoldSoak(o, this, 'variable'); + }; + + Assign.prototype.compileNode = function(o) { + var answer, compiledName, isValue, match, name, val, varBase, _ref2, _ref3, _ref4, _ref5; + if (isValue = this.variable instanceof Value) { + if (this.variable.isArray() || this.variable.isObject()) { + return this.compilePatternMatch(o); + } + if (this.variable.isSplice()) { + return this.compileSplice(o); + } + if ((_ref2 = this.context) === '||=' || _ref2 === '&&=' || _ref2 === '?=') { + return this.compileConditional(o); + } + if ((_ref3 = this.context) === '**=' || _ref3 === '//=' || _ref3 === '%%=') { + return this.compileSpecialMath(o); + } + } + compiledName = this.variable.compileToFragments(o, LEVEL_LIST); + name = fragmentsToText(compiledName); + if (!this.context) { + varBase = this.variable.unwrapAll(); + if (!varBase.isAssignable()) { + this.variable.error("\"" + (this.variable.compile(o)) + "\" cannot be assigned"); + } + if (!(typeof varBase.hasProperties === "function" ? varBase.hasProperties() : void 0)) { + if (this.param) { + o.scope.add(name, 'var'); + } else { + o.scope.find(name); + } + } + } + if (this.value instanceof Code && (match = METHOD_DEF.exec(name))) { + if (match[2]) { + this.value.klass = match[1]; + } + this.value.name = (_ref4 = (_ref5 = match[3]) != null ? _ref5 : match[4]) != null ? _ref4 : match[5]; + } + val = this.value.compileToFragments(o, LEVEL_LIST); + if (this.context === 'object') { + return compiledName.concat(this.makeCode(": "), val); + } + answer = compiledName.concat(this.makeCode(" " + (this.context || '=') + " "), val); + if (o.level <= LEVEL_LIST) { + return answer; + } else { + return this.wrapInBraces(answer); + } + }; + + Assign.prototype.compilePatternMatch = function(o) { + var acc, assigns, code, expandedIdx, fragments, i, idx, isObject, ivar, name, obj, objects, olen, ref, rest, top, val, value, vvar, vvarText, _i, _len, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7; + top = o.level === LEVEL_TOP; + value = this.value; + objects = this.variable.base.objects; + if (!(olen = objects.length)) { + code = value.compileToFragments(o); + if (o.level >= LEVEL_OP) { + return this.wrapInBraces(code); + } else { + return code; + } + } + isObject = this.variable.isObject(); + if (top && olen === 1 && !((obj = objects[0]) instanceof Splat)) { + if (obj instanceof Assign) { + _ref2 = obj, (_ref3 = _ref2.variable, idx = _ref3.base), obj = _ref2.value; + } else { + idx = isObject ? obj["this"] ? obj.properties[0].name : obj : new Literal(0); + } + acc = IDENTIFIER.test(idx.unwrap().value || 0); + value = new Value(value); + value.properties.push(new (acc ? Access : Index)(idx)); + if (_ref4 = obj.unwrap().value, __indexOf.call(RESERVED, _ref4) >= 0) { + obj.error("assignment to a reserved word: " + (obj.compile(o))); + } + return new Assign(obj, value, null, { + param: this.param + }).compileToFragments(o, LEVEL_TOP); + } + vvar = value.compileToFragments(o, LEVEL_LIST); + vvarText = fragmentsToText(vvar); + assigns = []; + expandedIdx = false; + if (!IDENTIFIER.test(vvarText) || this.variable.assigns(vvarText)) { + assigns.push([this.makeCode("" + (ref = o.scope.freeVariable('ref')) + " = ")].concat(__slice.call(vvar))); + vvar = [this.makeCode(ref)]; + vvarText = ref; + } + for (i = _i = 0, _len = objects.length; _i < _len; i = ++_i) { + obj = objects[i]; + idx = i; + if (isObject) { + if (obj instanceof Assign) { + _ref5 = obj, (_ref6 = _ref5.variable, idx = _ref6.base), obj = _ref5.value; + } else { + if (obj.base instanceof Parens) { + _ref7 = new Value(obj.unwrapAll()).cacheReference(o), obj = _ref7[0], idx = _ref7[1]; + } else { + idx = obj["this"] ? obj.properties[0].name : obj; + } + } + } + if (!expandedIdx && obj instanceof Splat) { + name = obj.name.unwrap().value; + obj = obj.unwrap(); + val = "" + olen + " <= " + vvarText + ".length ? " + (utility('slice')) + ".call(" + vvarText + ", " + i; + if (rest = olen - i - 1) { + ivar = o.scope.freeVariable('i'); + val += ", " + ivar + " = " + vvarText + ".length - " + rest + ") : (" + ivar + " = " + i + ", [])"; + } else { + val += ") : []"; + } + val = new Literal(val); + expandedIdx = "" + ivar + "++"; + } else if (!expandedIdx && obj instanceof Expansion) { + if (rest = olen - i - 1) { + if (rest === 1) { + expandedIdx = "" + vvarText + ".length - 1"; + } else { + ivar = o.scope.freeVariable('i'); + val = new Literal("" + ivar + " = " + vvarText + ".length - " + rest); + expandedIdx = "" + ivar + "++"; + assigns.push(val.compileToFragments(o, LEVEL_LIST)); + } + } + continue; + } else { + name = obj.unwrap().value; + if (obj instanceof Splat || obj instanceof Expansion) { + obj.error("multiple splats/expansions are disallowed in an assignment"); + } + if (typeof idx === 'number') { + idx = new Literal(expandedIdx || idx); + acc = false; + } else { + acc = isObject && IDENTIFIER.test(idx.unwrap().value || 0); + } + val = new Value(new Literal(vvarText), [new (acc ? Access : Index)(idx)]); + } + if ((name != null) && __indexOf.call(RESERVED, name) >= 0) { + obj.error("assignment to a reserved word: " + (obj.compile(o))); + } + assigns.push(new Assign(obj, val, null, { + param: this.param, + subpattern: true + }).compileToFragments(o, LEVEL_LIST)); + } + if (!(top || this.subpattern)) { + assigns.push(vvar); + } + fragments = this.joinFragmentArrays(assigns, ', '); + if (o.level < LEVEL_LIST) { + return fragments; + } else { + return this.wrapInBraces(fragments); + } + }; + + Assign.prototype.compileConditional = function(o) { + var fragments, left, right, _ref2; + _ref2 = this.variable.cacheReference(o), left = _ref2[0], right = _ref2[1]; + if (!left.properties.length && left.base instanceof Literal && left.base.value !== "this" && !o.scope.check(left.base.value)) { + this.variable.error("the variable \"" + left.base.value + "\" can't be assigned with " + this.context + " because it has not been declared before"); + } + if (__indexOf.call(this.context, "?") >= 0) { + o.isExistentialEquals = true; + return new If(new Existence(left), right, { + type: 'if' + }).addElse(new Assign(right, this.value, '=')).compileToFragments(o); + } else { + fragments = new Op(this.context.slice(0, -1), left, new Assign(right, this.value, '=')).compileToFragments(o); + if (o.level <= LEVEL_LIST) { + return fragments; + } else { + return this.wrapInBraces(fragments); + } + } + }; + + Assign.prototype.compileSpecialMath = function(o) { + var left, right, _ref2; + _ref2 = this.variable.cacheReference(o), left = _ref2[0], right = _ref2[1]; + return new Assign(left, new Op(this.context.slice(0, -1), right, this.value)).compileToFragments(o); + }; + + Assign.prototype.compileSplice = function(o) { + var answer, exclusive, from, fromDecl, fromRef, name, to, valDef, valRef, _ref2, _ref3, _ref4; + _ref2 = this.variable.properties.pop().range, from = _ref2.from, to = _ref2.to, exclusive = _ref2.exclusive; + name = this.variable.compile(o); + if (from) { + _ref3 = this.cacheToCodeFragments(from.cache(o, LEVEL_OP)), fromDecl = _ref3[0], fromRef = _ref3[1]; + } else { + fromDecl = fromRef = '0'; + } + if (to) { + if (from instanceof Value && from.isSimpleNumber() && to instanceof Value && to.isSimpleNumber()) { + to = to.compile(o) - fromRef; + if (!exclusive) { + to += 1; + } + } else { + to = to.compile(o, LEVEL_ACCESS) + ' - ' + fromRef; + if (!exclusive) { + to += ' + 1'; + } + } + } else { + to = "9e9"; + } + _ref4 = this.value.cache(o, LEVEL_LIST), valDef = _ref4[0], valRef = _ref4[1]; + answer = [].concat(this.makeCode("[].splice.apply(" + name + ", [" + fromDecl + ", " + to + "].concat("), valDef, this.makeCode(")), "), valRef); + if (o.level > LEVEL_TOP) { + return this.wrapInBraces(answer); + } else { + return answer; + } + }; + + return Assign; + + })(Base); + + exports.Code = Code = (function(_super) { + __extends(Code, _super); + + function Code(params, body, tag) { + this.params = params || []; + this.body = body || new Block; + this.bound = tag === 'boundfunc'; + } + + Code.prototype.children = ['params', 'body']; + + Code.prototype.isStatement = function() { + return !!this.ctor; + }; + + Code.prototype.jumps = NO; + + Code.prototype.makeScope = function(parentScope) { + return new Scope(parentScope, this.body, this); + }; + + Code.prototype.compileNode = function(o) { + var answer, boundfunc, code, exprs, i, lit, p, param, params, ref, splats, uniqs, val, wasEmpty, wrapper, _i, _j, _k, _l, _len, _len1, _len2, _len3, _len4, _len5, _m, _n, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7; + if (this.bound && ((_ref2 = o.scope.method) != null ? _ref2.bound : void 0)) { + this.context = o.scope.method.context; + } + if (this.bound && !this.context) { + this.context = '_this'; + wrapper = new Code([new Param(new Literal(this.context))], new Block([this])); + boundfunc = new Call(wrapper, [new Literal('this')]); + boundfunc.updateLocationDataIfMissing(this.locationData); + return boundfunc.compileNode(o); + } + o.scope = del(o, 'classScope') || this.makeScope(o.scope); + o.scope.shared = del(o, 'sharedScope'); + o.indent += TAB; + delete o.bare; + delete o.isExistentialEquals; + params = []; + exprs = []; + _ref3 = this.params; + for (_i = 0, _len = _ref3.length; _i < _len; _i++) { + param = _ref3[_i]; + if (!(param instanceof Expansion)) { + o.scope.parameter(param.asReference(o)); + } + } + _ref4 = this.params; + for (_j = 0, _len1 = _ref4.length; _j < _len1; _j++) { + param = _ref4[_j]; + if (!(param.splat || param instanceof Expansion)) { + continue; + } + _ref5 = this.params; + for (_k = 0, _len2 = _ref5.length; _k < _len2; _k++) { + p = _ref5[_k].name; + if (!(!(param instanceof Expansion))) { + continue; + } + if (p["this"]) { + p = p.properties[0].name; + } + if (p.value) { + o.scope.add(p.value, 'var', true); + } + } + splats = new Assign(new Value(new Arr((function() { + var _l, _len3, _ref6, _results; + _ref6 = this.params; + _results = []; + for (_l = 0, _len3 = _ref6.length; _l < _len3; _l++) { + p = _ref6[_l]; + _results.push(p.asReference(o)); + } + return _results; + }).call(this))), new Value(new Literal('arguments'))); + break; + } + _ref6 = this.params; + for (_l = 0, _len3 = _ref6.length; _l < _len3; _l++) { + param = _ref6[_l]; + if (param.isComplex()) { + val = ref = param.asReference(o); + if (param.value) { + val = new Op('?', ref, param.value); + } + exprs.push(new Assign(new Value(param.name), val, '=', { + param: true + })); + } else { + ref = param; + if (param.value) { + lit = new Literal(ref.name.value + ' == null'); + val = new Assign(new Value(param.name), param.value, '='); + exprs.push(new If(lit, val)); + } + } + if (!splats) { + params.push(ref); + } + } + wasEmpty = this.body.isEmpty(); + if (splats) { + exprs.unshift(splats); + } + if (exprs.length) { + (_ref7 = this.body.expressions).unshift.apply(_ref7, exprs); + } + for (i = _m = 0, _len4 = params.length; _m < _len4; i = ++_m) { + p = params[i]; + params[i] = p.compileToFragments(o); + o.scope.parameter(fragmentsToText(params[i])); + } + uniqs = []; + this.eachParamName(function(name, node) { + if (__indexOf.call(uniqs, name) >= 0) { + node.error("multiple parameters named '" + name + "'"); + } + return uniqs.push(name); + }); + if (!(wasEmpty || this.noReturn)) { + this.body.makeReturn(); + } + code = 'function'; + if (this.ctor) { + code += ' ' + this.name; + } + code += '('; + answer = [this.makeCode(code)]; + for (i = _n = 0, _len5 = params.length; _n < _len5; i = ++_n) { + p = params[i]; + if (i) { + answer.push(this.makeCode(", ")); + } + answer.push.apply(answer, p); + } + answer.push(this.makeCode(') {')); + if (!this.body.isEmpty()) { + answer = answer.concat(this.makeCode("\n"), this.body.compileWithDeclarations(o), this.makeCode("\n" + this.tab)); + } + answer.push(this.makeCode('}')); + if (this.ctor) { + return [this.makeCode(this.tab)].concat(__slice.call(answer)); + } + if (this.front || (o.level >= LEVEL_ACCESS)) { + return this.wrapInBraces(answer); + } else { + return answer; + } + }; + + Code.prototype.eachParamName = function(iterator) { + var param, _i, _len, _ref2, _results; + _ref2 = this.params; + _results = []; + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + param = _ref2[_i]; + _results.push(param.eachName(iterator)); + } + return _results; + }; + + Code.prototype.traverseChildren = function(crossScope, func) { + if (crossScope) { + return Code.__super__.traverseChildren.call(this, crossScope, func); + } + }; + + return Code; + + })(Base); + + exports.Param = Param = (function(_super) { + __extends(Param, _super); + + function Param(name, value, splat) { + var _ref2; + this.name = name; + this.value = value; + this.splat = splat; + if (_ref2 = (name = this.name.unwrapAll().value), __indexOf.call(STRICT_PROSCRIBED, _ref2) >= 0) { + this.name.error("parameter name \"" + name + "\" is not allowed"); + } + } + + Param.prototype.children = ['name', 'value']; + + Param.prototype.compileToFragments = function(o) { + return this.name.compileToFragments(o, LEVEL_LIST); + }; + + Param.prototype.asReference = function(o) { + var node; + if (this.reference) { + return this.reference; + } + node = this.name; + if (node["this"]) { + node = node.properties[0].name; + if (node.value.reserved) { + node = new Literal(o.scope.freeVariable(node.value)); + } + } else if (node.isComplex()) { + node = new Literal(o.scope.freeVariable('arg')); + } + node = new Value(node); + if (this.splat) { + node = new Splat(node); + } + node.updateLocationDataIfMissing(this.locationData); + return this.reference = node; + }; + + Param.prototype.isComplex = function() { + return this.name.isComplex(); + }; + + Param.prototype.eachName = function(iterator, name) { + var atParam, node, obj, _i, _len, _ref2; + if (name == null) { + name = this.name; + } + atParam = function(obj) { + var node; + node = obj.properties[0].name; + if (!node.value.reserved) { + return iterator(node.value, node); + } + }; + if (name instanceof Literal) { + return iterator(name.value, name); + } + if (name instanceof Value) { + return atParam(name); + } + _ref2 = name.objects; + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + obj = _ref2[_i]; + if (obj instanceof Assign) { + this.eachName(iterator, obj.value.unwrap()); + } else if (obj instanceof Splat) { + node = obj.name.unwrap(); + iterator(node.value, node); + } else if (obj instanceof Value) { + if (obj.isArray() || obj.isObject()) { + this.eachName(iterator, obj.base); + } else if (obj["this"]) { + atParam(obj); + } else { + iterator(obj.base.value, obj.base); + } + } else if (!(obj instanceof Expansion)) { + obj.error("illegal parameter " + (obj.compile())); + } + } + }; + + return Param; + + })(Base); + + exports.Splat = Splat = (function(_super) { + __extends(Splat, _super); + + Splat.prototype.children = ['name']; + + Splat.prototype.isAssignable = YES; + + function Splat(name) { + this.name = name.compile ? name : new Literal(name); + } + + Splat.prototype.assigns = function(name) { + return this.name.assigns(name); + }; + + Splat.prototype.compileToFragments = function(o) { + return this.name.compileToFragments(o); + }; + + Splat.prototype.unwrap = function() { + return this.name; + }; + + Splat.compileSplattedArray = function(o, list, apply) { + var args, base, compiledNode, concatPart, fragments, i, index, node, _i, _len; + index = -1; + while ((node = list[++index]) && !(node instanceof Splat)) { + continue; + } + if (index >= list.length) { + return []; + } + if (list.length === 1) { + node = list[0]; + fragments = node.compileToFragments(o, LEVEL_LIST); + if (apply) { + return fragments; + } + return [].concat(node.makeCode("" + (utility('slice')) + ".call("), fragments, node.makeCode(")")); + } + args = list.slice(index); + for (i = _i = 0, _len = args.length; _i < _len; i = ++_i) { + node = args[i]; + compiledNode = node.compileToFragments(o, LEVEL_LIST); + args[i] = node instanceof Splat ? [].concat(node.makeCode("" + (utility('slice')) + ".call("), compiledNode, node.makeCode(")")) : [].concat(node.makeCode("["), compiledNode, node.makeCode("]")); + } + if (index === 0) { + node = list[0]; + concatPart = node.joinFragmentArrays(args.slice(1), ', '); + return args[0].concat(node.makeCode(".concat("), concatPart, node.makeCode(")")); + } + base = (function() { + var _j, _len1, _ref2, _results; + _ref2 = list.slice(0, index); + _results = []; + for (_j = 0, _len1 = _ref2.length; _j < _len1; _j++) { + node = _ref2[_j]; + _results.push(node.compileToFragments(o, LEVEL_LIST)); + } + return _results; + })(); + base = list[0].joinFragmentArrays(base, ', '); + concatPart = list[index].joinFragmentArrays(args, ', '); + return [].concat(list[0].makeCode("["), base, list[index].makeCode("].concat("), concatPart, (last(list)).makeCode(")")); + }; + + return Splat; + + })(Base); + + exports.Expansion = Expansion = (function(_super) { + __extends(Expansion, _super); + + function Expansion() { + return Expansion.__super__.constructor.apply(this, arguments); + } + + Expansion.prototype.isComplex = NO; + + Expansion.prototype.compileNode = function(o) { + return this.error('Expansion must be used inside a destructuring assignment or parameter list'); + }; + + Expansion.prototype.asReference = function(o) { + return this; + }; + + Expansion.prototype.eachName = function(iterator) {}; + + return Expansion; + + })(Base); + + exports.While = While = (function(_super) { + __extends(While, _super); + + function While(condition, options) { + this.condition = (options != null ? options.invert : void 0) ? condition.invert() : condition; + this.guard = options != null ? options.guard : void 0; + } + + While.prototype.children = ['condition', 'guard', 'body']; + + While.prototype.isStatement = YES; + + While.prototype.makeReturn = function(res) { + if (res) { + return While.__super__.makeReturn.apply(this, arguments); + } else { + this.returns = !this.jumps({ + loop: true + }); + return this; + } + }; + + While.prototype.addBody = function(body) { + this.body = body; + return this; + }; + + While.prototype.jumps = function() { + var expressions, jumpNode, node, _i, _len; + expressions = this.body.expressions; + if (!expressions.length) { + return false; + } + for (_i = 0, _len = expressions.length; _i < _len; _i++) { + node = expressions[_i]; + if (jumpNode = node.jumps({ + loop: true + })) { + return jumpNode; + } + } + return false; + }; + + While.prototype.compileNode = function(o) { + var answer, body, rvar, set; + o.indent += TAB; + set = ''; + body = this.body; + if (body.isEmpty()) { + body = this.makeCode(''); + } else { + if (this.returns) { + body.makeReturn(rvar = o.scope.freeVariable('results')); + set = "" + this.tab + rvar + " = [];\n"; + } + if (this.guard) { + if (body.expressions.length > 1) { + body.expressions.unshift(new If((new Parens(this.guard)).invert(), new Literal("continue"))); + } else { + if (this.guard) { + body = Block.wrap([new If(this.guard, body)]); + } + } + } + body = [].concat(this.makeCode("\n"), body.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab)); + } + answer = [].concat(this.makeCode(set + this.tab + "while ("), this.condition.compileToFragments(o, LEVEL_PAREN), this.makeCode(") {"), body, this.makeCode("}")); + if (this.returns) { + answer.push(this.makeCode("\n" + this.tab + "return " + rvar + ";")); + } + return answer; + }; + + return While; + + })(Base); + + exports.Op = Op = (function(_super) { + var CONVERSIONS, INVERSIONS; + + __extends(Op, _super); + + function Op(op, first, second, flip) { + if (op === 'in') { + return new In(first, second); + } + if (op === 'do') { + return this.generateDo(first); + } + if (op === 'new') { + if (first instanceof Call && !first["do"] && !first.isNew) { + return first.newInstance(); + } + if (first instanceof Code && first.bound || first["do"]) { + first = new Parens(first); + } + } + this.operator = CONVERSIONS[op] || op; + this.first = first; + this.second = second; + this.flip = !!flip; + return this; + } + + CONVERSIONS = { + '==': '===', + '!=': '!==', + 'of': 'in' + }; + + INVERSIONS = { + '!==': '===', + '===': '!==' + }; + + Op.prototype.children = ['first', 'second']; + + Op.prototype.isSimpleNumber = NO; + + Op.prototype.isUnary = function() { + return !this.second; + }; + + Op.prototype.isComplex = function() { + var _ref2; + return !(this.isUnary() && ((_ref2 = this.operator) === '+' || _ref2 === '-')) || this.first.isComplex(); + }; + + Op.prototype.isChainable = function() { + var _ref2; + return (_ref2 = this.operator) === '<' || _ref2 === '>' || _ref2 === '>=' || _ref2 === '<=' || _ref2 === '===' || _ref2 === '!=='; + }; + + Op.prototype.invert = function() { + var allInvertable, curr, fst, op, _ref2; + if (this.isChainable() && this.first.isChainable()) { + allInvertable = true; + curr = this; + while (curr && curr.operator) { + allInvertable && (allInvertable = curr.operator in INVERSIONS); + curr = curr.first; + } + if (!allInvertable) { + return new Parens(this).invert(); + } + curr = this; + while (curr && curr.operator) { + curr.invert = !curr.invert; + curr.operator = INVERSIONS[curr.operator]; + curr = curr.first; + } + return this; + } else if (op = INVERSIONS[this.operator]) { + this.operator = op; + if (this.first.unwrap() instanceof Op) { + this.first.invert(); + } + return this; + } else if (this.second) { + return new Parens(this).invert(); + } else if (this.operator === '!' && (fst = this.first.unwrap()) instanceof Op && ((_ref2 = fst.operator) === '!' || _ref2 === 'in' || _ref2 === 'instanceof')) { + return fst; + } else { + return new Op('!', this); + } + }; + + Op.prototype.unfoldSoak = function(o) { + var _ref2; + return ((_ref2 = this.operator) === '++' || _ref2 === '--' || _ref2 === 'delete') && unfoldSoak(o, this, 'first'); + }; + + Op.prototype.generateDo = function(exp) { + var call, func, param, passedParams, ref, _i, _len, _ref2; + passedParams = []; + func = exp instanceof Assign && (ref = exp.value.unwrap()) instanceof Code ? ref : exp; + _ref2 = func.params || []; + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + param = _ref2[_i]; + if (param.value) { + passedParams.push(param.value); + delete param.value; + } else { + passedParams.push(param); + } + } + call = new Call(exp, passedParams); + call["do"] = true; + return call; + }; + + Op.prototype.compileNode = function(o) { + var answer, isChain, lhs, rhs, _ref2, _ref3; + isChain = this.isChainable() && this.first.isChainable(); + if (!isChain) { + this.first.front = this.front; + } + if (this.operator === 'delete' && o.scope.check(this.first.unwrapAll().value)) { + this.error('delete operand may not be argument or var'); + } + if (((_ref2 = this.operator) === '--' || _ref2 === '++') && (_ref3 = this.first.unwrapAll().value, __indexOf.call(STRICT_PROSCRIBED, _ref3) >= 0)) { + this.error("cannot increment/decrement \"" + (this.first.unwrapAll().value) + "\""); + } + if (this.isUnary()) { + return this.compileUnary(o); + } + if (isChain) { + return this.compileChain(o); + } + switch (this.operator) { + case '?': + return this.compileExistence(o); + case '**': + return this.compilePower(o); + case '//': + return this.compileFloorDivision(o); + case '%%': + return this.compileModulo(o); + default: + lhs = this.first.compileToFragments(o, LEVEL_OP); + rhs = this.second.compileToFragments(o, LEVEL_OP); + answer = [].concat(lhs, this.makeCode(" " + this.operator + " "), rhs); + if (o.level <= LEVEL_OP) { + return answer; + } else { + return this.wrapInBraces(answer); + } + } + }; + + Op.prototype.compileChain = function(o) { + var fragments, fst, shared, _ref2; + _ref2 = this.first.second.cache(o), this.first.second = _ref2[0], shared = _ref2[1]; + fst = this.first.compileToFragments(o, LEVEL_OP); + fragments = fst.concat(this.makeCode(" " + (this.invert ? '&&' : '||') + " "), shared.compileToFragments(o), this.makeCode(" " + this.operator + " "), this.second.compileToFragments(o, LEVEL_OP)); + return this.wrapInBraces(fragments); + }; + + Op.prototype.compileExistence = function(o) { + var fst, ref; + if (this.first.isComplex()) { + ref = new Literal(o.scope.freeVariable('ref')); + fst = new Parens(new Assign(ref, this.first)); + } else { + fst = this.first; + ref = fst; + } + return new If(new Existence(fst), ref, { + type: 'if' + }).addElse(this.second).compileToFragments(o); + }; + + Op.prototype.compileUnary = function(o) { + var op, parts, plusMinus; + parts = []; + op = this.operator; + parts.push([this.makeCode(op)]); + if (op === '!' && this.first instanceof Existence) { + this.first.negated = !this.first.negated; + return this.first.compileToFragments(o); + } + if (o.level >= LEVEL_ACCESS) { + return (new Parens(this)).compileToFragments(o); + } + plusMinus = op === '+' || op === '-'; + if ((op === 'new' || op === 'typeof' || op === 'delete') || plusMinus && this.first instanceof Op && this.first.operator === op) { + parts.push([this.makeCode(' ')]); + } + if ((plusMinus && this.first instanceof Op) || (op === 'new' && this.first.isStatement(o))) { + this.first = new Parens(this.first); + } + parts.push(this.first.compileToFragments(o, LEVEL_OP)); + if (this.flip) { + parts.reverse(); + } + return this.joinFragmentArrays(parts, ''); + }; + + Op.prototype.compilePower = function(o) { + var pow; + pow = new Value(new Literal('Math'), [new Access(new Literal('pow'))]); + return new Call(pow, [this.first, this.second]).compileToFragments(o); + }; + + Op.prototype.compileFloorDivision = function(o) { + var div, floor; + floor = new Value(new Literal('Math'), [new Access(new Literal('floor'))]); + div = new Op('/', this.first, this.second); + return new Call(floor, [div]).compileToFragments(o); + }; + + Op.prototype.compileModulo = function(o) { + var mod; + mod = new Value(new Literal(utility('modulo'))); + return new Call(mod, [this.first, this.second]).compileToFragments(o); + }; + + Op.prototype.toString = function(idt) { + return Op.__super__.toString.call(this, idt, this.constructor.name + ' ' + this.operator); + }; + + return Op; + + })(Base); + + exports.In = In = (function(_super) { + __extends(In, _super); + + function In(object, array) { + this.object = object; + this.array = array; + } + + In.prototype.children = ['object', 'array']; + + In.prototype.invert = NEGATE; + + In.prototype.compileNode = function(o) { + var hasSplat, obj, _i, _len, _ref2; + if (this.array instanceof Value && this.array.isArray() && this.array.base.objects.length) { + _ref2 = this.array.base.objects; + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + obj = _ref2[_i]; + if (!(obj instanceof Splat)) { + continue; + } + hasSplat = true; + break; + } + if (!hasSplat) { + return this.compileOrTest(o); + } + } + return this.compileLoopTest(o); + }; + + In.prototype.compileOrTest = function(o) { + var cmp, cnj, i, item, ref, sub, tests, _i, _len, _ref2, _ref3, _ref4; + _ref2 = this.object.cache(o, LEVEL_OP), sub = _ref2[0], ref = _ref2[1]; + _ref3 = this.negated ? [' !== ', ' && '] : [' === ', ' || '], cmp = _ref3[0], cnj = _ref3[1]; + tests = []; + _ref4 = this.array.base.objects; + for (i = _i = 0, _len = _ref4.length; _i < _len; i = ++_i) { + item = _ref4[i]; + if (i) { + tests.push(this.makeCode(cnj)); + } + tests = tests.concat((i ? ref : sub), this.makeCode(cmp), item.compileToFragments(o, LEVEL_ACCESS)); + } + if (o.level < LEVEL_OP) { + return tests; + } else { + return this.wrapInBraces(tests); + } + }; + + In.prototype.compileLoopTest = function(o) { + var fragments, ref, sub, _ref2; + _ref2 = this.object.cache(o, LEVEL_LIST), sub = _ref2[0], ref = _ref2[1]; + fragments = [].concat(this.makeCode(utility('indexOf') + ".call("), this.array.compileToFragments(o, LEVEL_LIST), this.makeCode(", "), ref, this.makeCode(") " + (this.negated ? '< 0' : '>= 0'))); + if (fragmentsToText(sub) === fragmentsToText(ref)) { + return fragments; + } + fragments = sub.concat(this.makeCode(', '), fragments); + if (o.level < LEVEL_LIST) { + return fragments; + } else { + return this.wrapInBraces(fragments); + } + }; + + In.prototype.toString = function(idt) { + return In.__super__.toString.call(this, idt, this.constructor.name + (this.negated ? '!' : '')); + }; + + return In; + + })(Base); + + exports.Try = Try = (function(_super) { + __extends(Try, _super); + + function Try(attempt, errorVariable, recovery, ensure) { + this.attempt = attempt; + this.errorVariable = errorVariable; + this.recovery = recovery; + this.ensure = ensure; + } + + Try.prototype.children = ['attempt', 'recovery', 'ensure']; + + Try.prototype.isStatement = YES; + + Try.prototype.jumps = function(o) { + var _ref2; + return this.attempt.jumps(o) || ((_ref2 = this.recovery) != null ? _ref2.jumps(o) : void 0); + }; + + Try.prototype.makeReturn = function(res) { + if (this.attempt) { + this.attempt = this.attempt.makeReturn(res); + } + if (this.recovery) { + this.recovery = this.recovery.makeReturn(res); + } + return this; + }; + + Try.prototype.compileNode = function(o) { + var catchPart, ensurePart, placeholder, tryPart; + o.indent += TAB; + tryPart = this.attempt.compileToFragments(o, LEVEL_TOP); + catchPart = this.recovery ? (placeholder = new Literal('_error'), this.errorVariable ? this.recovery.unshift(new Assign(this.errorVariable, placeholder)) : void 0, [].concat(this.makeCode(" catch ("), placeholder.compileToFragments(o), this.makeCode(") {\n"), this.recovery.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab + "}"))) : !(this.ensure || this.recovery) ? [this.makeCode(' catch (_error) {}')] : []; + ensurePart = this.ensure ? [].concat(this.makeCode(" finally {\n"), this.ensure.compileToFragments(o, LEVEL_TOP), this.makeCode("\n" + this.tab + "}")) : []; + return [].concat(this.makeCode("" + this.tab + "try {\n"), tryPart, this.makeCode("\n" + this.tab + "}"), catchPart, ensurePart); + }; + + return Try; + + })(Base); + + exports.Throw = Throw = (function(_super) { + __extends(Throw, _super); + + function Throw(expression) { + this.expression = expression; + } + + Throw.prototype.children = ['expression']; + + Throw.prototype.isStatement = YES; + + Throw.prototype.jumps = NO; + + Throw.prototype.makeReturn = THIS; + + Throw.prototype.compileNode = function(o) { + return [].concat(this.makeCode(this.tab + "throw "), this.expression.compileToFragments(o), this.makeCode(";")); + }; + + return Throw; + + })(Base); + + exports.Existence = Existence = (function(_super) { + __extends(Existence, _super); + + function Existence(expression) { + this.expression = expression; + } + + Existence.prototype.children = ['expression']; + + Existence.prototype.invert = NEGATE; + + Existence.prototype.compileNode = function(o) { + var cmp, cnj, code, _ref2; + this.expression.front = this.front; + code = this.expression.compile(o, LEVEL_OP); + if (IDENTIFIER.test(code) && !o.scope.check(code)) { + _ref2 = this.negated ? ['===', '||'] : ['!==', '&&'], cmp = _ref2[0], cnj = _ref2[1]; + code = "typeof " + code + " " + cmp + " \"undefined\" " + cnj + " " + code + " " + cmp + " null"; + } else { + code = "" + code + " " + (this.negated ? '==' : '!=') + " null"; + } + return [this.makeCode(o.level <= LEVEL_COND ? code : "(" + code + ")")]; + }; + + return Existence; + + })(Base); + + exports.Parens = Parens = (function(_super) { + __extends(Parens, _super); + + function Parens(body) { + this.body = body; + } + + Parens.prototype.children = ['body']; + + Parens.prototype.unwrap = function() { + return this.body; + }; + + Parens.prototype.isComplex = function() { + return this.body.isComplex(); + }; + + Parens.prototype.compileNode = function(o) { + var bare, expr, fragments; + expr = this.body.unwrap(); + if (expr instanceof Value && expr.isAtomic()) { + expr.front = this.front; + return expr.compileToFragments(o); + } + fragments = expr.compileToFragments(o, LEVEL_PAREN); + bare = o.level < LEVEL_OP && (expr instanceof Op || expr instanceof Call || (expr instanceof For && expr.returns)); + if (bare) { + return fragments; + } else { + return this.wrapInBraces(fragments); + } + }; + + return Parens; + + })(Base); + + exports.For = For = (function(_super) { + __extends(For, _super); + + function For(body, source) { + var _ref2; + this.source = source.source, this.guard = source.guard, this.step = source.step, this.name = source.name, this.index = source.index; + this.body = Block.wrap([body]); + this.own = !!source.own; + this.object = !!source.object; + if (this.object) { + _ref2 = [this.index, this.name], this.name = _ref2[0], this.index = _ref2[1]; + } + if (this.index instanceof Value) { + this.index.error('index cannot be a pattern matching expression'); + } + this.range = this.source instanceof Value && this.source.base instanceof Range && !this.source.properties.length; + this.pattern = this.name instanceof Value; + if (this.range && this.index) { + this.index.error('indexes do not apply to range loops'); + } + if (this.range && this.pattern) { + this.name.error('cannot pattern match over range loops'); + } + if (this.own && !this.object) { + this.name.error('cannot use own with for-in'); + } + this.returns = false; + } + + For.prototype.children = ['body', 'source', 'guard', 'step']; + + For.prototype.compileNode = function(o) { + var body, bodyFragments, compare, compareDown, declare, declareDown, defPart, defPartFragments, down, forPartFragments, guardPart, idt1, increment, index, ivar, kvar, kvarAssign, lastJumps, lvar, name, namePart, ref, resultPart, returnResult, rvar, scope, source, step, stepNum, stepVar, svar, varPart, _ref2, _ref3; + body = Block.wrap([this.body]); + lastJumps = (_ref2 = last(body.expressions)) != null ? _ref2.jumps() : void 0; + if (lastJumps && lastJumps instanceof Return) { + this.returns = false; + } + source = this.range ? this.source.base : this.source; + scope = o.scope; + if (!this.pattern) { + name = this.name && (this.name.compile(o, LEVEL_LIST)); + } + index = this.index && (this.index.compile(o, LEVEL_LIST)); + if (name && !this.pattern) { + scope.find(name); + } + if (index) { + scope.find(index); + } + if (this.returns) { + rvar = scope.freeVariable('results'); + } + ivar = (this.object && index) || scope.freeVariable('i'); + kvar = (this.range && name) || index || ivar; + kvarAssign = kvar !== ivar ? "" + kvar + " = " : ""; + if (this.step && !this.range) { + _ref3 = this.cacheToCodeFragments(this.step.cache(o, LEVEL_LIST)), step = _ref3[0], stepVar = _ref3[1]; + stepNum = stepVar.match(NUMBER); + } + if (this.pattern) { + name = ivar; + } + varPart = ''; + guardPart = ''; + defPart = ''; + idt1 = this.tab + TAB; + if (this.range) { + forPartFragments = source.compileToFragments(merge(o, { + index: ivar, + name: name, + step: this.step + })); + } else { + svar = this.source.compile(o, LEVEL_LIST); + if ((name || this.own) && !IDENTIFIER.test(svar)) { + defPart += "" + this.tab + (ref = scope.freeVariable('ref')) + " = " + svar + ";\n"; + svar = ref; + } + if (name && !this.pattern) { + namePart = "" + name + " = " + svar + "[" + kvar + "]"; + } + if (!this.object) { + if (step !== stepVar) { + defPart += "" + this.tab + step + ";\n"; + } + if (!(this.step && stepNum && (down = parseNum(stepNum[0]) < 0))) { + lvar = scope.freeVariable('len'); + } + declare = "" + kvarAssign + ivar + " = 0, " + lvar + " = " + svar + ".length"; + declareDown = "" + kvarAssign + ivar + " = " + svar + ".length - 1"; + compare = "" + ivar + " < " + lvar; + compareDown = "" + ivar + " >= 0"; + if (this.step) { + if (stepNum) { + if (down) { + compare = compareDown; + declare = declareDown; + } + } else { + compare = "" + stepVar + " > 0 ? " + compare + " : " + compareDown; + declare = "(" + stepVar + " > 0 ? (" + declare + ") : " + declareDown + ")"; + } + increment = "" + ivar + " += " + stepVar; + } else { + increment = "" + (kvar !== ivar ? "++" + ivar : "" + ivar + "++"); + } + forPartFragments = [this.makeCode("" + declare + "; " + compare + "; " + kvarAssign + increment)]; + } + } + if (this.returns) { + resultPart = "" + this.tab + rvar + " = [];\n"; + returnResult = "\n" + this.tab + "return " + rvar + ";"; + body.makeReturn(rvar); + } + if (this.guard) { + if (body.expressions.length > 1) { + body.expressions.unshift(new If((new Parens(this.guard)).invert(), new Literal("continue"))); + } else { + if (this.guard) { + body = Block.wrap([new If(this.guard, body)]); + } + } + } + if (this.pattern) { + body.expressions.unshift(new Assign(this.name, new Literal("" + svar + "[" + kvar + "]"))); + } + defPartFragments = [].concat(this.makeCode(defPart), this.pluckDirectCall(o, body)); + if (namePart) { + varPart = "\n" + idt1 + namePart + ";"; + } + if (this.object) { + forPartFragments = [this.makeCode("" + kvar + " in " + svar)]; + if (this.own) { + guardPart = "\n" + idt1 + "if (!" + (utility('hasProp')) + ".call(" + svar + ", " + kvar + ")) continue;"; + } + } + bodyFragments = body.compileToFragments(merge(o, { + indent: idt1 + }), LEVEL_TOP); + if (bodyFragments && (bodyFragments.length > 0)) { + bodyFragments = [].concat(this.makeCode("\n"), bodyFragments, this.makeCode("\n")); + } + return [].concat(defPartFragments, this.makeCode("" + (resultPart || '') + this.tab + "for ("), forPartFragments, this.makeCode(") {" + guardPart + varPart), bodyFragments, this.makeCode("" + this.tab + "}" + (returnResult || ''))); + }; + + For.prototype.pluckDirectCall = function(o, body) { + var base, defs, expr, fn, idx, ref, val, _i, _len, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8; + defs = []; + _ref2 = body.expressions; + for (idx = _i = 0, _len = _ref2.length; _i < _len; idx = ++_i) { + expr = _ref2[idx]; + expr = expr.unwrapAll(); + if (!(expr instanceof Call)) { + continue; + } + val = (_ref3 = expr.variable) != null ? _ref3.unwrapAll() : void 0; + if (!((val instanceof Code) || (val instanceof Value && ((_ref4 = val.base) != null ? _ref4.unwrapAll() : void 0) instanceof Code && val.properties.length === 1 && ((_ref5 = (_ref6 = val.properties[0].name) != null ? _ref6.value : void 0) === 'call' || _ref5 === 'apply')))) { + continue; + } + fn = ((_ref7 = val.base) != null ? _ref7.unwrapAll() : void 0) || val; + ref = new Literal(o.scope.freeVariable('fn')); + base = new Value(ref); + if (val.base) { + _ref8 = [base, val], val.base = _ref8[0], base = _ref8[1]; + } + body.expressions[idx] = new Call(base, expr.args); + defs = defs.concat(this.makeCode(this.tab), new Assign(ref, fn).compileToFragments(o, LEVEL_TOP), this.makeCode(';\n')); + } + return defs; + }; + + return For; + + })(While); + + exports.Switch = Switch = (function(_super) { + __extends(Switch, _super); + + function Switch(subject, cases, otherwise) { + this.subject = subject; + this.cases = cases; + this.otherwise = otherwise; + } + + Switch.prototype.children = ['subject', 'cases', 'otherwise']; + + Switch.prototype.isStatement = YES; + + Switch.prototype.jumps = function(o) { + var block, conds, jumpNode, _i, _len, _ref2, _ref3, _ref4; + if (o == null) { + o = { + block: true + }; + } + _ref2 = this.cases; + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + _ref3 = _ref2[_i], conds = _ref3[0], block = _ref3[1]; + if (jumpNode = block.jumps(o)) { + return jumpNode; + } + } + return (_ref4 = this.otherwise) != null ? _ref4.jumps(o) : void 0; + }; + + Switch.prototype.makeReturn = function(res) { + var pair, _i, _len, _ref2, _ref3; + _ref2 = this.cases; + for (_i = 0, _len = _ref2.length; _i < _len; _i++) { + pair = _ref2[_i]; + pair[1].makeReturn(res); + } + if (res) { + this.otherwise || (this.otherwise = new Block([new Literal('void 0')])); + } + if ((_ref3 = this.otherwise) != null) { + _ref3.makeReturn(res); + } + return this; + }; + + Switch.prototype.compileNode = function(o) { + var block, body, cond, conditions, expr, fragments, i, idt1, idt2, _i, _j, _len, _len1, _ref2, _ref3, _ref4; + idt1 = o.indent + TAB; + idt2 = o.indent = idt1 + TAB; + fragments = [].concat(this.makeCode(this.tab + "switch ("), (this.subject ? this.subject.compileToFragments(o, LEVEL_PAREN) : this.makeCode("false")), this.makeCode(") {\n")); + _ref2 = this.cases; + for (i = _i = 0, _len = _ref2.length; _i < _len; i = ++_i) { + _ref3 = _ref2[i], conditions = _ref3[0], block = _ref3[1]; + _ref4 = flatten([conditions]); + for (_j = 0, _len1 = _ref4.length; _j < _len1; _j++) { + cond = _ref4[_j]; + if (!this.subject) { + cond = cond.invert(); + } + fragments = fragments.concat(this.makeCode(idt1 + "case "), cond.compileToFragments(o, LEVEL_PAREN), this.makeCode(":\n")); + } + if ((body = block.compileToFragments(o, LEVEL_TOP)).length > 0) { + fragments = fragments.concat(body, this.makeCode('\n')); + } + if (i === this.cases.length - 1 && !this.otherwise) { + break; + } + expr = this.lastNonComment(block.expressions); + if (expr instanceof Return || (expr instanceof Literal && expr.jumps() && expr.value !== 'debugger')) { + continue; + } + fragments.push(cond.makeCode(idt2 + 'break;\n')); + } + if (this.otherwise && this.otherwise.expressions.length) { + fragments.push.apply(fragments, [this.makeCode(idt1 + "default:\n")].concat(__slice.call(this.otherwise.compileToFragments(o, LEVEL_TOP)), [this.makeCode("\n")])); + } + fragments.push(this.makeCode(this.tab + '}')); + return fragments; + }; + + return Switch; + + })(Base); + + exports.If = If = (function(_super) { + __extends(If, _super); + + function If(condition, body, options) { + this.body = body; + if (options == null) { + options = {}; + } + this.condition = options.type === 'unless' ? condition.invert() : condition; + this.elseBody = null; + this.isChain = false; + this.soak = options.soak; + } + + If.prototype.children = ['condition', 'body', 'elseBody']; + + If.prototype.bodyNode = function() { + var _ref2; + return (_ref2 = this.body) != null ? _ref2.unwrap() : void 0; + }; + + If.prototype.elseBodyNode = function() { + var _ref2; + return (_ref2 = this.elseBody) != null ? _ref2.unwrap() : void 0; + }; + + If.prototype.addElse = function(elseBody) { + if (this.isChain) { + this.elseBodyNode().addElse(elseBody); + } else { + this.isChain = elseBody instanceof If; + this.elseBody = this.ensureBlock(elseBody); + this.elseBody.updateLocationDataIfMissing(elseBody.locationData); + } + return this; + }; + + If.prototype.isStatement = function(o) { + var _ref2; + return (o != null ? o.level : void 0) === LEVEL_TOP || this.bodyNode().isStatement(o) || ((_ref2 = this.elseBodyNode()) != null ? _ref2.isStatement(o) : void 0); + }; + + If.prototype.jumps = function(o) { + var _ref2; + return this.body.jumps(o) || ((_ref2 = this.elseBody) != null ? _ref2.jumps(o) : void 0); + }; + + If.prototype.compileNode = function(o) { + if (this.isStatement(o)) { + return this.compileStatement(o); + } else { + return this.compileExpression(o); + } + }; + + If.prototype.makeReturn = function(res) { + if (res) { + this.elseBody || (this.elseBody = new Block([new Literal('void 0')])); + } + this.body && (this.body = new Block([this.body.makeReturn(res)])); + this.elseBody && (this.elseBody = new Block([this.elseBody.makeReturn(res)])); + return this; + }; + + If.prototype.ensureBlock = function(node) { + if (node instanceof Block) { + return node; + } else { + return new Block([node]); + } + }; + + If.prototype.compileStatement = function(o) { + var answer, body, child, cond, exeq, ifPart, indent; + child = del(o, 'chainChild'); + exeq = del(o, 'isExistentialEquals'); + if (exeq) { + return new If(this.condition.invert(), this.elseBodyNode(), { + type: 'if' + }).compileToFragments(o); + } + indent = o.indent + TAB; + cond = this.condition.compileToFragments(o, LEVEL_PAREN); + body = this.ensureBlock(this.body).compileToFragments(merge(o, { + indent: indent + })); + ifPart = [].concat(this.makeCode("if ("), cond, this.makeCode(") {\n"), body, this.makeCode("\n" + this.tab + "}")); + if (!child) { + ifPart.unshift(this.makeCode(this.tab)); + } + if (!this.elseBody) { + return ifPart; + } + answer = ifPart.concat(this.makeCode(' else ')); + if (this.isChain) { + o.chainChild = true; + answer = answer.concat(this.elseBody.unwrap().compileToFragments(o, LEVEL_TOP)); + } else { + answer = answer.concat(this.makeCode("{\n"), this.elseBody.compileToFragments(merge(o, { + indent: indent + }), LEVEL_TOP), this.makeCode("\n" + this.tab + "}")); + } + return answer; + }; + + If.prototype.compileExpression = function(o) { + var alt, body, cond, fragments; + cond = this.condition.compileToFragments(o, LEVEL_COND); + body = this.bodyNode().compileToFragments(o, LEVEL_LIST); + alt = this.elseBodyNode() ? this.elseBodyNode().compileToFragments(o, LEVEL_LIST) : [this.makeCode('void 0')]; + fragments = cond.concat(this.makeCode(" ? "), body, this.makeCode(" : "), alt); + if (o.level >= LEVEL_COND) { + return this.wrapInBraces(fragments); + } else { + return fragments; + } + }; + + If.prototype.unfoldSoak = function() { + return this.soak && this; + }; + + return If; + + })(Base); + + UTILITIES = { + "extends": function() { + return "function(child, parent) { for (var key in parent) { if (" + (utility('hasProp')) + ".call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = 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 = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }"; + }, + modulo: function() { + return "function(a, b) { return (a % b + +b) % b; }"; + }, + hasProp: function() { + return '{}.hasOwnProperty'; + }, + slice: function() { + return '[].slice'; + } + }; + + LEVEL_TOP = 1; + + LEVEL_PAREN = 2; + + LEVEL_LIST = 3; + + LEVEL_COND = 4; + + LEVEL_OP = 5; + + LEVEL_ACCESS = 6; + + TAB = ' '; + + IDENTIFIER_STR = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*"; + + IDENTIFIER = RegExp("^" + IDENTIFIER_STR + "$"); + + SIMPLENUM = /^[+-]?\d+$/; + + HEXNUM = /^[+-]?0x[\da-f]+/i; + + NUMBER = /^[+-]?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)$/i; + + METHOD_DEF = RegExp("^(" + IDENTIFIER_STR + ")(\\.prototype)?(?:\\.(" + IDENTIFIER_STR + ")|\\[(\"(?:[^\\\\\"\\r\\n]|\\\\.)*\"|'(?:[^\\\\'\\r\\n]|\\\\.)*')\\]|\\[(0x[\\da-fA-F]+|\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\])$"); + + IS_STRING = /^['"]/; + + IS_REGEX = /^\//; + + utility = function(name) { + var ref; + ref = "__" + name; + Scope.root.assign(ref, UTILITIES[name]()); + return ref; + }; + + multident = function(code, tab) { + code = code.replace(/\n/g, '$&' + tab); + return code.replace(/\s+$/, ''); + }; + + parseNum = function(x) { + if (x == null) { + return 0; + } else if (x.match(HEXNUM)) { + return parseInt(x, 16); + } else { + return parseFloat(x); + } + }; + + isLiteralArguments = function(node) { + return node instanceof Literal && node.value === 'arguments' && !node.asKey; + }; + + isLiteralThis = function(node) { + return (node instanceof Literal && node.value === 'this' && !node.asKey) || (node instanceof Code && node.bound) || (node instanceof Call && node.isSuper); + }; + + unfoldSoak = function(o, parent, name) { + var ifn; + if (!(ifn = parent[name].unfoldSoak(o))) { + return; + } + parent[name] = ifn.body; + ifn.body = new Value(parent); + return ifn; + }; + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/optparse.js b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/optparse.js new file mode 100644 index 00000000..96be9ecc --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/optparse.js @@ -0,0 +1,139 @@ +// Generated by CoffeeScript 1.7.1 +(function() { + var LONG_FLAG, MULTI_FLAG, OPTIONAL, OptionParser, SHORT_FLAG, buildRule, buildRules, normalizeArguments, repeat; + + repeat = require('./helpers').repeat; + + exports.OptionParser = OptionParser = (function() { + function OptionParser(rules, banner) { + this.banner = banner; + this.rules = buildRules(rules); + } + + OptionParser.prototype.parse = function(args) { + var arg, i, isOption, matchedRule, options, originalArgs, pos, rule, seenNonOptionArg, skippingArgument, value, _i, _j, _len, _len1, _ref; + options = { + "arguments": [] + }; + skippingArgument = false; + originalArgs = args; + args = normalizeArguments(args); + for (i = _i = 0, _len = args.length; _i < _len; i = ++_i) { + arg = args[i]; + if (skippingArgument) { + skippingArgument = false; + continue; + } + if (arg === '--') { + pos = originalArgs.indexOf('--'); + options["arguments"] = options["arguments"].concat(originalArgs.slice(pos + 1)); + break; + } + isOption = !!(arg.match(LONG_FLAG) || arg.match(SHORT_FLAG)); + seenNonOptionArg = options["arguments"].length > 0; + if (!seenNonOptionArg) { + matchedRule = false; + _ref = this.rules; + for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) { + rule = _ref[_j]; + if (rule.shortFlag === arg || rule.longFlag === arg) { + value = true; + if (rule.hasArgument) { + skippingArgument = true; + value = args[i + 1]; + } + options[rule.name] = rule.isList ? (options[rule.name] || []).concat(value) : value; + matchedRule = true; + break; + } + } + if (isOption && !matchedRule) { + throw new Error("unrecognized option: " + arg); + } + } + if (seenNonOptionArg || !isOption) { + options["arguments"].push(arg); + } + } + return options; + }; + + OptionParser.prototype.help = function() { + var letPart, lines, rule, spaces, _i, _len, _ref; + lines = []; + if (this.banner) { + lines.unshift("" + this.banner + "\n"); + } + _ref = this.rules; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + rule = _ref[_i]; + spaces = 15 - rule.longFlag.length; + spaces = spaces > 0 ? repeat(' ', spaces) : ''; + letPart = rule.shortFlag ? rule.shortFlag + ', ' : ' '; + lines.push(' ' + letPart + rule.longFlag + spaces + rule.description); + } + return "\n" + (lines.join('\n')) + "\n"; + }; + + return OptionParser; + + })(); + + LONG_FLAG = /^(--\w[\w\-]*)/; + + SHORT_FLAG = /^(-\w)$/; + + MULTI_FLAG = /^-(\w{2,})/; + + OPTIONAL = /\[(\w+(\*?))\]/; + + buildRules = function(rules) { + var tuple, _i, _len, _results; + _results = []; + for (_i = 0, _len = rules.length; _i < _len; _i++) { + tuple = rules[_i]; + if (tuple.length < 3) { + tuple.unshift(null); + } + _results.push(buildRule.apply(null, tuple)); + } + return _results; + }; + + buildRule = function(shortFlag, longFlag, description, options) { + var match; + if (options == null) { + options = {}; + } + match = longFlag.match(OPTIONAL); + longFlag = longFlag.match(LONG_FLAG)[1]; + return { + name: longFlag.substr(2), + shortFlag: shortFlag, + longFlag: longFlag, + description: description, + hasArgument: !!(match && match[1]), + isList: !!(match && match[2]) + }; + }; + + normalizeArguments = function(args) { + var arg, l, match, result, _i, _j, _len, _len1, _ref; + args = args.slice(0); + result = []; + for (_i = 0, _len = args.length; _i < _len; _i++) { + arg = args[_i]; + if (match = arg.match(MULTI_FLAG)) { + _ref = match[1].split(''); + for (_j = 0, _len1 = _ref.length; _j < _len1; _j++) { + l = _ref[_j]; + result.push('-' + l); + } + } else { + result.push(arg); + } + } + return result; + }; + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/parser.js b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/parser.js new file mode 100755 index 00000000..724636b5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/parser.js @@ -0,0 +1,724 @@ +/* parser generated by jison 0.4.13 */ +/* + Returns a Parser object of the following structure: + + Parser: { + yy: {} + } + + Parser.prototype: { + yy: {}, + trace: function(), + symbols_: {associative list: name ==> number}, + terminals_: {associative list: number ==> name}, + productions_: [...], + performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$), + table: [...], + defaultActions: {...}, + parseError: function(str, hash), + parse: function(input), + + lexer: { + EOF: 1, + parseError: function(str, hash), + setInput: function(input), + input: function(), + unput: function(str), + more: function(), + less: function(n), + pastInput: function(), + upcomingInput: function(), + showPosition: function(), + test_match: function(regex_match_array, rule_index), + next: function(), + lex: function(), + begin: function(condition), + popState: function(), + _currentRules: function(), + topState: function(), + pushState: function(condition), + + options: { + ranges: boolean (optional: true ==> token location info will include a .range[] member) + flex: boolean (optional: true ==> flex-like lexing behaviour where the rules are tested exhaustively to find the longest match) + backtrack_lexer: boolean (optional: true ==> lexer regexes are tested in order and for each matching regex the action code is invoked; the lexer terminates the scan when a token is returned by the action code) + }, + + performAction: function(yy, yy_, $avoiding_name_collisions, YY_START), + rules: [...], + conditions: {associative list: name ==> set}, + } + } + + + token location info (@$, _$, etc.): { + first_line: n, + last_line: n, + first_column: n, + last_column: n, + range: [start_number, end_number] (where the numbers are indexes into the input string, regular zero-based) + } + + + the parseError function receives a 'hash' object with these members for lexer and parser errors: { + text: (matched text) + token: (the produced terminal token, if any) + line: (yylineno) + } + while parser (grammar) errors will also provide these members, i.e. parser errors deliver a superset of attributes: { + loc: (yylloc) + expected: (string describing the set of expected tokens) + recoverable: (boolean: TRUE when the parser has a error recovery rule available for this particular error) + } +*/ +var parser = (function(){ +var parser = {trace: function trace() { }, +yy: {}, +symbols_: {"error":2,"Root":3,"Body":4,"Line":5,"TERMINATOR":6,"Expression":7,"Statement":8,"Return":9,"Comment":10,"STATEMENT":11,"Value":12,"Invocation":13,"Code":14,"Operation":15,"Assign":16,"If":17,"Try":18,"While":19,"For":20,"Switch":21,"Class":22,"Throw":23,"Block":24,"INDENT":25,"OUTDENT":26,"Identifier":27,"IDENTIFIER":28,"AlphaNumeric":29,"NUMBER":30,"STRING":31,"Literal":32,"JS":33,"REGEX":34,"DEBUGGER":35,"UNDEFINED":36,"NULL":37,"BOOL":38,"Assignable":39,"=":40,"AssignObj":41,"ObjAssignable":42,":":43,"ThisProperty":44,"RETURN":45,"HERECOMMENT":46,"PARAM_START":47,"ParamList":48,"PARAM_END":49,"FuncGlyph":50,"->":51,"=>":52,"OptComma":53,",":54,"Param":55,"ParamVar":56,"...":57,"Array":58,"Object":59,"Splat":60,"SimpleAssignable":61,"Accessor":62,"Parenthetical":63,"Range":64,"This":65,".":66,"?.":67,"::":68,"?::":69,"Index":70,"INDEX_START":71,"IndexValue":72,"INDEX_END":73,"INDEX_SOAK":74,"Slice":75,"{":76,"AssignList":77,"}":78,"CLASS":79,"EXTENDS":80,"OptFuncExist":81,"Arguments":82,"SUPER":83,"FUNC_EXIST":84,"CALL_START":85,"CALL_END":86,"ArgList":87,"THIS":88,"@":89,"[":90,"]":91,"RangeDots":92,"..":93,"Arg":94,"SimpleArgs":95,"TRY":96,"Catch":97,"FINALLY":98,"CATCH":99,"THROW":100,"(":101,")":102,"WhileSource":103,"WHILE":104,"WHEN":105,"UNTIL":106,"Loop":107,"LOOP":108,"ForBody":109,"FOR":110,"ForStart":111,"ForSource":112,"ForVariables":113,"OWN":114,"ForValue":115,"FORIN":116,"FOROF":117,"BY":118,"SWITCH":119,"Whens":120,"ELSE":121,"When":122,"LEADING_WHEN":123,"IfBlock":124,"IF":125,"POST_IF":126,"UNARY":127,"UNARY_MATH":128,"-":129,"+":130,"--":131,"++":132,"?":133,"MATH":134,"**":135,"SHIFT":136,"COMPARE":137,"LOGIC":138,"RELATION":139,"COMPOUND_ASSIGN":140,"$accept":0,"$end":1}, +terminals_: {2:"error",6:"TERMINATOR",11:"STATEMENT",25:"INDENT",26:"OUTDENT",28:"IDENTIFIER",30:"NUMBER",31:"STRING",33:"JS",34:"REGEX",35:"DEBUGGER",36:"UNDEFINED",37:"NULL",38:"BOOL",40:"=",43:":",45:"RETURN",46:"HERECOMMENT",47:"PARAM_START",49:"PARAM_END",51:"->",52:"=>",54:",",57:"...",66:".",67:"?.",68:"::",69:"?::",71:"INDEX_START",73:"INDEX_END",74:"INDEX_SOAK",76:"{",78:"}",79:"CLASS",80:"EXTENDS",83:"SUPER",84:"FUNC_EXIST",85:"CALL_START",86:"CALL_END",88:"THIS",89:"@",90:"[",91:"]",93:"..",96:"TRY",98:"FINALLY",99:"CATCH",100:"THROW",101:"(",102:")",104:"WHILE",105:"WHEN",106:"UNTIL",108:"LOOP",110:"FOR",114:"OWN",116:"FORIN",117:"FOROF",118:"BY",119:"SWITCH",121:"ELSE",123:"LEADING_WHEN",125:"IF",126:"POST_IF",127:"UNARY",128:"UNARY_MATH",129:"-",130:"+",131:"--",132:"++",133:"?",134:"MATH",135:"**",136:"SHIFT",137:"COMPARE",138:"LOGIC",139:"RELATION",140:"COMPOUND_ASSIGN"}, +productions_: [0,[3,0],[3,1],[4,1],[4,3],[4,2],[5,1],[5,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],[24,2],[24,3],[27,1],[29,1],[29,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[32,1],[16,3],[16,4],[16,5],[41,1],[41,3],[41,5],[41,1],[42,1],[42,1],[42,1],[9,2],[9,1],[10,1],[14,5],[14,2],[50,1],[50,1],[53,0],[53,1],[48,0],[48,1],[48,3],[48,4],[48,6],[55,1],[55,2],[55,3],[55,1],[56,1],[56,1],[56,1],[56,1],[60,2],[61,1],[61,2],[61,2],[61,1],[39,1],[39,1],[39,1],[12,1],[12,1],[12,1],[12,1],[12,1],[62,2],[62,2],[62,2],[62,2],[62,1],[62,1],[70,3],[70,2],[72,1],[72,1],[59,4],[77,0],[77,1],[77,3],[77,4],[77,6],[22,1],[22,2],[22,3],[22,4],[22,2],[22,3],[22,4],[22,5],[13,3],[13,3],[13,1],[13,2],[81,0],[81,1],[82,2],[82,4],[65,1],[65,1],[44,2],[58,2],[58,4],[92,1],[92,1],[64,5],[75,3],[75,2],[75,2],[75,1],[87,1],[87,3],[87,4],[87,4],[87,6],[94,1],[94,1],[94,1],[95,1],[95,3],[18,2],[18,3],[18,4],[18,5],[97,3],[97,3],[97,2],[23,2],[63,3],[63,5],[103,2],[103,4],[103,2],[103,4],[19,2],[19,2],[19,2],[19,1],[107,2],[107,2],[20,2],[20,2],[20,2],[109,2],[109,2],[111,2],[111,3],[115,1],[115,1],[115,1],[115,1],[113,1],[113,3],[112,2],[112,2],[112,4],[112,4],[112,4],[112,6],[112,6],[21,5],[21,7],[21,4],[21,6],[120,1],[120,2],[122,3],[122,4],[124,3],[124,5],[17,1],[17,3],[17,3],[17,3],[15,2],[15,2],[15,2],[15,2],[15,2],[15,2],[15,2],[15,2],[15,2],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,5],[15,4],[15,3]], +performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate /* action[1] */, $$ /* vstack */, _$ /* lstack */) { +/* this == yyval */ + +var $0 = $$.length - 1; +switch (yystate) { +case 1:return this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Block); +break; +case 2:return this.$ = $$[$0]; +break; +case 3:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(yy.Block.wrap([$$[$0]])); +break; +case 4:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].push($$[$0])); +break; +case 5:this.$ = $$[$0-1]; +break; +case 6:this.$ = $$[$0]; +break; +case 7:this.$ = $$[$0]; +break; +case 8:this.$ = $$[$0]; +break; +case 9:this.$ = $$[$0]; +break; +case 10:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); +break; +case 11:this.$ = $$[$0]; +break; +case 12:this.$ = $$[$0]; +break; +case 13:this.$ = $$[$0]; +break; +case 14:this.$ = $$[$0]; +break; +case 15:this.$ = $$[$0]; +break; +case 16:this.$ = $$[$0]; +break; +case 17:this.$ = $$[$0]; +break; +case 18:this.$ = $$[$0]; +break; +case 19:this.$ = $$[$0]; +break; +case 20:this.$ = $$[$0]; +break; +case 21:this.$ = $$[$0]; +break; +case 22:this.$ = $$[$0]; +break; +case 23:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Block); +break; +case 24:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-1]); +break; +case 25:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); +break; +case 26:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); +break; +case 27:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); +break; +case 28:this.$ = $$[$0]; +break; +case 29:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); +break; +case 30:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); +break; +case 31:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Literal($$[$0])); +break; +case 32:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Undefined); +break; +case 33:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Null); +break; +case 34:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Bool($$[$0])); +break; +case 35:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign($$[$0-2], $$[$0])); +break; +case 36:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Assign($$[$0-3], $$[$0])); +break; +case 37:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign($$[$0-4], $$[$0-1])); +break; +case 38:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); +break; +case 39:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign(yy.addLocationDataFn(_$[$0-2])(new yy.Value($$[$0-2])), $$[$0], 'object')); +break; +case 40:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign(yy.addLocationDataFn(_$[$0-4])(new yy.Value($$[$0-4])), $$[$0-1], 'object')); +break; +case 41:this.$ = $$[$0]; +break; +case 42:this.$ = $$[$0]; +break; +case 43:this.$ = $$[$0]; +break; +case 44:this.$ = $$[$0]; +break; +case 45:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Return($$[$0])); +break; +case 46:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Return); +break; +case 47:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Comment($$[$0])); +break; +case 48:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Code($$[$0-3], $$[$0], $$[$0-1])); +break; +case 49:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Code([], $$[$0], $$[$0-1])); +break; +case 50:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('func'); +break; +case 51:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('boundfunc'); +break; +case 52:this.$ = $$[$0]; +break; +case 53:this.$ = $$[$0]; +break; +case 54:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([]); +break; +case 55:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]); +break; +case 56:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0])); +break; +case 57:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0])); +break; +case 58:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2])); +break; +case 59:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Param($$[$0])); +break; +case 60:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Param($$[$0-1], null, true)); +break; +case 61:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Param($$[$0-2], $$[$0])); +break; +case 62:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Expansion); +break; +case 63:this.$ = $$[$0]; +break; +case 64:this.$ = $$[$0]; +break; +case 65:this.$ = $$[$0]; +break; +case 66:this.$ = $$[$0]; +break; +case 67:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Splat($$[$0-1])); +break; +case 68:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); +break; +case 69:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].add($$[$0])); +break; +case 70:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Value($$[$0-1], [].concat($$[$0]))); +break; +case 71:this.$ = $$[$0]; +break; +case 72:this.$ = $$[$0]; +break; +case 73:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); +break; +case 74:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); +break; +case 75:this.$ = $$[$0]; +break; +case 76:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); +break; +case 77:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); +break; +case 78:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); +break; +case 79:this.$ = $$[$0]; +break; +case 80:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Access($$[$0])); +break; +case 81:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Access($$[$0], 'soak')); +break; +case 82:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Access(new yy.Literal('prototype'))), yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))]); +break; +case 83:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Access(new yy.Literal('prototype'), 'soak')), yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))]); +break; +case 84:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Access(new yy.Literal('prototype'))); +break; +case 85:this.$ = $$[$0]; +break; +case 86:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-1]); +break; +case 87:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(yy.extend($$[$0], { + soak: true + })); +break; +case 88:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Index($$[$0])); +break; +case 89:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Slice($$[$0])); +break; +case 90:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Obj($$[$0-2], $$[$0-3].generated)); +break; +case 91:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([]); +break; +case 92:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]); +break; +case 93:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0])); +break; +case 94:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0])); +break; +case 95:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2])); +break; +case 96:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Class); +break; +case 97:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Class(null, null, $$[$0])); +break; +case 98:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Class(null, $$[$0])); +break; +case 99:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Class(null, $$[$0-1], $$[$0])); +break; +case 100:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Class($$[$0])); +break; +case 101:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Class($$[$0-1], null, $$[$0])); +break; +case 102:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Class($$[$0-2], $$[$0])); +break; +case 103:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Class($$[$0-3], $$[$0-1], $$[$0])); +break; +case 104:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Call($$[$0-2], $$[$0], $$[$0-1])); +break; +case 105:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Call($$[$0-2], $$[$0], $$[$0-1])); +break; +case 106:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Call('super', [new yy.Splat(new yy.Literal('arguments'))])); +break; +case 107:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Call('super', $$[$0])); +break; +case 108:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(false); +break; +case 109:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(true); +break; +case 110:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([]); +break; +case 111:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-2]); +break; +case 112:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value(new yy.Literal('this'))); +break; +case 113:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value(new yy.Literal('this'))); +break; +case 114:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Value(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('this')), [yy.addLocationDataFn(_$[$0])(new yy.Access($$[$0]))], 'this')); +break; +case 115:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Arr([])); +break; +case 116:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Arr($$[$0-2])); +break; +case 117:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('inclusive'); +break; +case 118:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])('exclusive'); +break; +case 119:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Range($$[$0-3], $$[$0-1], $$[$0-2])); +break; +case 120:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Range($$[$0-2], $$[$0], $$[$0-1])); +break; +case 121:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Range($$[$0-1], null, $$[$0])); +break; +case 122:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Range(null, $$[$0], $$[$0-1])); +break; +case 123:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Range(null, null, $$[$0])); +break; +case 124:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]); +break; +case 125:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].concat($$[$0])); +break; +case 126:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-3].concat($$[$0])); +break; +case 127:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])($$[$0-2]); +break; +case 128:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])($$[$0-5].concat($$[$0-2])); +break; +case 129:this.$ = $$[$0]; +break; +case 130:this.$ = $$[$0]; +break; +case 131:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Expansion); +break; +case 132:this.$ = $$[$0]; +break; +case 133:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([].concat($$[$0-2], $$[$0])); +break; +case 134:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Try($$[$0])); +break; +case 135:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Try($$[$0-1], $$[$0][0], $$[$0][1])); +break; +case 136:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Try($$[$0-2], null, null, $$[$0])); +break; +case 137:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Try($$[$0-3], $$[$0-2][0], $$[$0-2][1], $$[$0])); +break; +case 138:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([$$[$0-1], $$[$0]]); +break; +case 139:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([yy.addLocationDataFn(_$[$0-1])(new yy.Value($$[$0-1])), $$[$0]]); +break; +case 140:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])([null, $$[$0]]); +break; +case 141:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Throw($$[$0])); +break; +case 142:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Parens($$[$0-1])); +break; +case 143:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Parens($$[$0-2])); +break; +case 144:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While($$[$0])); +break; +case 145:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.While($$[$0-2], { + guard: $$[$0] + })); +break; +case 146:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While($$[$0], { + invert: true + })); +break; +case 147:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.While($$[$0-2], { + invert: true, + guard: $$[$0] + })); +break; +case 148:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].addBody($$[$0])); +break; +case 149:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0].addBody(yy.addLocationDataFn(_$[$0-1])(yy.Block.wrap([$$[$0-1]])))); +break; +case 150:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0].addBody(yy.addLocationDataFn(_$[$0-1])(yy.Block.wrap([$$[$0-1]])))); +break; +case 151:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])($$[$0]); +break; +case 152:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('true'))).addBody($$[$0])); +break; +case 153:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.While(yy.addLocationDataFn(_$[$0-1])(new yy.Literal('true'))).addBody(yy.addLocationDataFn(_$[$0])(yy.Block.wrap([$$[$0]])))); +break; +case 154:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0-1], $$[$0])); +break; +case 155:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0-1], $$[$0])); +break; +case 156:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.For($$[$0], $$[$0-1])); +break; +case 157:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({ + source: yy.addLocationDataFn(_$[$0])(new yy.Value($$[$0])) + }); +break; +case 158:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])((function () { + $$[$0].own = $$[$0-1].own; + $$[$0].name = $$[$0-1][0]; + $$[$0].index = $$[$0-1][1]; + return $$[$0]; + }())); +break; +case 159:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0]); +break; +case 160:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () { + $$[$0].own = true; + return $$[$0]; + }())); +break; +case 161:this.$ = $$[$0]; +break; +case 162:this.$ = $$[$0]; +break; +case 163:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); +break; +case 164:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])(new yy.Value($$[$0])); +break; +case 165:this.$ = yy.addLocationDataFn(_$[$0], _$[$0])([$$[$0]]); +break; +case 166:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([$$[$0-2], $$[$0]]); +break; +case 167:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({ + source: $$[$0] + }); +break; +case 168:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])({ + source: $$[$0], + object: true + }); +break; +case 169:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({ + source: $$[$0-2], + guard: $$[$0] + }); +break; +case 170:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({ + source: $$[$0-2], + guard: $$[$0], + object: true + }); +break; +case 171:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])({ + source: $$[$0-2], + step: $$[$0] + }); +break; +case 172:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])({ + source: $$[$0-4], + guard: $$[$0-2], + step: $$[$0] + }); +break; +case 173:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])({ + source: $$[$0-4], + step: $$[$0-2], + guard: $$[$0] + }); +break; +case 174:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Switch($$[$0-3], $$[$0-1])); +break; +case 175:this.$ = yy.addLocationDataFn(_$[$0-6], _$[$0])(new yy.Switch($$[$0-5], $$[$0-3], $$[$0-1])); +break; +case 176:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Switch(null, $$[$0-1])); +break; +case 177:this.$ = yy.addLocationDataFn(_$[$0-5], _$[$0])(new yy.Switch(null, $$[$0-3], $$[$0-1])); +break; +case 178:this.$ = $$[$0]; +break; +case 179:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])($$[$0-1].concat($$[$0])); +break; +case 180:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])([[$$[$0-1], $$[$0]]]); +break; +case 181:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])([[$$[$0-2], $$[$0-1]]]); +break; +case 182:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0-1], $$[$0], { + type: $$[$0-2] + })); +break; +case 183:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])($$[$0-4].addElse(yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0-1], $$[$0], { + type: $$[$0-2] + })))); +break; +case 184:this.$ = $$[$0]; +break; +case 185:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])($$[$0-2].addElse($$[$0])); +break; +case 186:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0], yy.addLocationDataFn(_$[$0-2])(yy.Block.wrap([$$[$0-2]])), { + type: $$[$0-1], + statement: true + })); +break; +case 187:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.If($$[$0], yy.addLocationDataFn(_$[$0-2])(yy.Block.wrap([$$[$0-2]])), { + type: $$[$0-1], + statement: true + })); +break; +case 188:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op($$[$0-1], $$[$0])); +break; +case 189:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op($$[$0-1], $$[$0])); +break; +case 190:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('-', $$[$0])); +break; +case 191:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('+', $$[$0])); +break; +case 192:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('--', $$[$0])); +break; +case 193:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('++', $$[$0])); +break; +case 194:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('--', $$[$0-1], null, true)); +break; +case 195:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Op('++', $$[$0-1], null, true)); +break; +case 196:this.$ = yy.addLocationDataFn(_$[$0-1], _$[$0])(new yy.Existence($$[$0-1])); +break; +case 197:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op('+', $$[$0-2], $$[$0])); +break; +case 198:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op('-', $$[$0-2], $$[$0])); +break; +case 199:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0])); +break; +case 200:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0])); +break; +case 201:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0])); +break; +case 202:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0])); +break; +case 203:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Op($$[$0-1], $$[$0-2], $$[$0])); +break; +case 204:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])((function () { + if ($$[$0-1].charAt(0) === '!') { + return new yy.Op($$[$0-1].slice(1), $$[$0-2], $$[$0]).invert(); + } else { + return new yy.Op($$[$0-1], $$[$0-2], $$[$0]); + } + }())); +break; +case 205:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Assign($$[$0-2], $$[$0], $$[$0-1])); +break; +case 206:this.$ = yy.addLocationDataFn(_$[$0-4], _$[$0])(new yy.Assign($$[$0-4], $$[$0-1], $$[$0-3])); +break; +case 207:this.$ = yy.addLocationDataFn(_$[$0-3], _$[$0])(new yy.Assign($$[$0-3], $$[$0], $$[$0-2])); +break; +case 208:this.$ = yy.addLocationDataFn(_$[$0-2], _$[$0])(new yy.Extends($$[$0-2], $$[$0])); +break; +} +}, +table: [{1:[2,1],3:1,4:2,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{1:[3]},{1:[2,2],6:[1,73]},{1:[2,3],6:[2,3],26:[2,3],102:[2,3]},{1:[2,6],6:[2,6],26:[2,6],102:[2,6],103:84,104:[1,64],106:[1,65],109:85,110:[1,67],111:68,126:[1,83],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{1:[2,7],6:[2,7],26:[2,7],102:[2,7],103:87,104:[1,64],106:[1,65],109:88,110:[1,67],111:68,126:[1,86]},{1:[2,11],6:[2,11],25:[2,11],26:[2,11],49:[2,11],54:[2,11],57:[2,11],62:90,66:[1,92],67:[1,93],68:[1,94],69:[1,95],70:96,71:[1,97],73:[2,11],74:[1,98],78:[2,11],81:89,84:[1,91],85:[2,108],86:[2,11],91:[2,11],93:[2,11],102:[2,11],104:[2,11],105:[2,11],106:[2,11],110:[2,11],118:[2,11],126:[2,11],129:[2,11],130:[2,11],133:[2,11],134:[2,11],135:[2,11],136:[2,11],137:[2,11],138:[2,11],139:[2,11]},{1:[2,12],6:[2,12],25:[2,12],26:[2,12],49:[2,12],54:[2,12],57:[2,12],62:100,66:[1,92],67:[1,93],68:[1,94],69:[1,95],70:96,71:[1,97],73:[2,12],74:[1,98],78:[2,12],81:99,84:[1,91],85:[2,108],86:[2,12],91:[2,12],93:[2,12],102:[2,12],104:[2,12],105:[2,12],106:[2,12],110:[2,12],118:[2,12],126:[2,12],129:[2,12],130:[2,12],133:[2,12],134:[2,12],135:[2,12],136:[2,12],137:[2,12],138:[2,12],139:[2,12]},{1:[2,13],6:[2,13],25:[2,13],26:[2,13],49:[2,13],54:[2,13],57:[2,13],73:[2,13],78:[2,13],86:[2,13],91:[2,13],93:[2,13],102:[2,13],104:[2,13],105:[2,13],106:[2,13],110:[2,13],118:[2,13],126:[2,13],129:[2,13],130:[2,13],133:[2,13],134:[2,13],135:[2,13],136:[2,13],137:[2,13],138:[2,13],139:[2,13]},{1:[2,14],6:[2,14],25:[2,14],26:[2,14],49:[2,14],54:[2,14],57:[2,14],73:[2,14],78:[2,14],86:[2,14],91:[2,14],93:[2,14],102:[2,14],104:[2,14],105:[2,14],106:[2,14],110:[2,14],118:[2,14],126:[2,14],129:[2,14],130:[2,14],133:[2,14],134:[2,14],135:[2,14],136:[2,14],137:[2,14],138:[2,14],139:[2,14]},{1:[2,15],6:[2,15],25:[2,15],26:[2,15],49:[2,15],54:[2,15],57:[2,15],73:[2,15],78:[2,15],86:[2,15],91:[2,15],93:[2,15],102:[2,15],104:[2,15],105:[2,15],106:[2,15],110:[2,15],118:[2,15],126:[2,15],129:[2,15],130:[2,15],133:[2,15],134:[2,15],135:[2,15],136:[2,15],137:[2,15],138:[2,15],139:[2,15]},{1:[2,16],6:[2,16],25:[2,16],26:[2,16],49:[2,16],54:[2,16],57:[2,16],73:[2,16],78:[2,16],86:[2,16],91:[2,16],93:[2,16],102:[2,16],104:[2,16],105:[2,16],106:[2,16],110:[2,16],118:[2,16],126:[2,16],129:[2,16],130:[2,16],133:[2,16],134:[2,16],135:[2,16],136:[2,16],137:[2,16],138:[2,16],139:[2,16]},{1:[2,17],6:[2,17],25:[2,17],26:[2,17],49:[2,17],54:[2,17],57:[2,17],73:[2,17],78:[2,17],86:[2,17],91:[2,17],93:[2,17],102:[2,17],104:[2,17],105:[2,17],106:[2,17],110:[2,17],118:[2,17],126:[2,17],129:[2,17],130:[2,17],133:[2,17],134:[2,17],135:[2,17],136:[2,17],137:[2,17],138:[2,17],139:[2,17]},{1:[2,18],6:[2,18],25:[2,18],26:[2,18],49:[2,18],54:[2,18],57:[2,18],73:[2,18],78:[2,18],86:[2,18],91:[2,18],93:[2,18],102:[2,18],104:[2,18],105:[2,18],106:[2,18],110:[2,18],118:[2,18],126:[2,18],129:[2,18],130:[2,18],133:[2,18],134:[2,18],135:[2,18],136:[2,18],137:[2,18],138:[2,18],139:[2,18]},{1:[2,19],6:[2,19],25:[2,19],26:[2,19],49:[2,19],54:[2,19],57:[2,19],73:[2,19],78:[2,19],86:[2,19],91:[2,19],93:[2,19],102:[2,19],104:[2,19],105:[2,19],106:[2,19],110:[2,19],118:[2,19],126:[2,19],129:[2,19],130:[2,19],133:[2,19],134:[2,19],135:[2,19],136:[2,19],137:[2,19],138:[2,19],139:[2,19]},{1:[2,20],6:[2,20],25:[2,20],26:[2,20],49:[2,20],54:[2,20],57:[2,20],73:[2,20],78:[2,20],86:[2,20],91:[2,20],93:[2,20],102:[2,20],104:[2,20],105:[2,20],106:[2,20],110:[2,20],118:[2,20],126:[2,20],129:[2,20],130:[2,20],133:[2,20],134:[2,20],135:[2,20],136:[2,20],137:[2,20],138:[2,20],139:[2,20]},{1:[2,21],6:[2,21],25:[2,21],26:[2,21],49:[2,21],54:[2,21],57:[2,21],73:[2,21],78:[2,21],86:[2,21],91:[2,21],93:[2,21],102:[2,21],104:[2,21],105:[2,21],106:[2,21],110:[2,21],118:[2,21],126:[2,21],129:[2,21],130:[2,21],133:[2,21],134:[2,21],135:[2,21],136:[2,21],137:[2,21],138:[2,21],139:[2,21]},{1:[2,22],6:[2,22],25:[2,22],26:[2,22],49:[2,22],54:[2,22],57:[2,22],73:[2,22],78:[2,22],86:[2,22],91:[2,22],93:[2,22],102:[2,22],104:[2,22],105:[2,22],106:[2,22],110:[2,22],118:[2,22],126:[2,22],129:[2,22],130:[2,22],133:[2,22],134:[2,22],135:[2,22],136:[2,22],137:[2,22],138:[2,22],139:[2,22]},{1:[2,8],6:[2,8],26:[2,8],102:[2,8],104:[2,8],106:[2,8],110:[2,8],126:[2,8]},{1:[2,9],6:[2,9],26:[2,9],102:[2,9],104:[2,9],106:[2,9],110:[2,9],126:[2,9]},{1:[2,10],6:[2,10],26:[2,10],102:[2,10],104:[2,10],106:[2,10],110:[2,10],126:[2,10]},{1:[2,75],6:[2,75],25:[2,75],26:[2,75],40:[1,101],49:[2,75],54:[2,75],57:[2,75],66:[2,75],67:[2,75],68:[2,75],69:[2,75],71:[2,75],73:[2,75],74:[2,75],78:[2,75],84:[2,75],85:[2,75],86:[2,75],91:[2,75],93:[2,75],102:[2,75],104:[2,75],105:[2,75],106:[2,75],110:[2,75],118:[2,75],126:[2,75],129:[2,75],130:[2,75],133:[2,75],134:[2,75],135:[2,75],136:[2,75],137:[2,75],138:[2,75],139:[2,75]},{1:[2,76],6:[2,76],25:[2,76],26:[2,76],49:[2,76],54:[2,76],57:[2,76],66:[2,76],67:[2,76],68:[2,76],69:[2,76],71:[2,76],73:[2,76],74:[2,76],78:[2,76],84:[2,76],85:[2,76],86:[2,76],91:[2,76],93:[2,76],102:[2,76],104:[2,76],105:[2,76],106:[2,76],110:[2,76],118:[2,76],126:[2,76],129:[2,76],130:[2,76],133:[2,76],134:[2,76],135:[2,76],136:[2,76],137:[2,76],138:[2,76],139:[2,76]},{1:[2,77],6:[2,77],25:[2,77],26:[2,77],49:[2,77],54:[2,77],57:[2,77],66:[2,77],67:[2,77],68:[2,77],69:[2,77],71:[2,77],73:[2,77],74:[2,77],78:[2,77],84:[2,77],85:[2,77],86:[2,77],91:[2,77],93:[2,77],102:[2,77],104:[2,77],105:[2,77],106:[2,77],110:[2,77],118:[2,77],126:[2,77],129:[2,77],130:[2,77],133:[2,77],134:[2,77],135:[2,77],136:[2,77],137:[2,77],138:[2,77],139:[2,77]},{1:[2,78],6:[2,78],25:[2,78],26:[2,78],49:[2,78],54:[2,78],57:[2,78],66:[2,78],67:[2,78],68:[2,78],69:[2,78],71:[2,78],73:[2,78],74:[2,78],78:[2,78],84:[2,78],85:[2,78],86:[2,78],91:[2,78],93:[2,78],102:[2,78],104:[2,78],105:[2,78],106:[2,78],110:[2,78],118:[2,78],126:[2,78],129:[2,78],130:[2,78],133:[2,78],134:[2,78],135:[2,78],136:[2,78],137:[2,78],138:[2,78],139:[2,78]},{1:[2,79],6:[2,79],25:[2,79],26:[2,79],49:[2,79],54:[2,79],57:[2,79],66:[2,79],67:[2,79],68:[2,79],69:[2,79],71:[2,79],73:[2,79],74:[2,79],78:[2,79],84:[2,79],85:[2,79],86:[2,79],91:[2,79],93:[2,79],102:[2,79],104:[2,79],105:[2,79],106:[2,79],110:[2,79],118:[2,79],126:[2,79],129:[2,79],130:[2,79],133:[2,79],134:[2,79],135:[2,79],136:[2,79],137:[2,79],138:[2,79],139:[2,79]},{1:[2,106],6:[2,106],25:[2,106],26:[2,106],49:[2,106],54:[2,106],57:[2,106],66:[2,106],67:[2,106],68:[2,106],69:[2,106],71:[2,106],73:[2,106],74:[2,106],78:[2,106],82:102,84:[2,106],85:[1,103],86:[2,106],91:[2,106],93:[2,106],102:[2,106],104:[2,106],105:[2,106],106:[2,106],110:[2,106],118:[2,106],126:[2,106],129:[2,106],130:[2,106],133:[2,106],134:[2,106],135:[2,106],136:[2,106],137:[2,106],138:[2,106],139:[2,106]},{6:[2,54],25:[2,54],27:108,28:[1,72],44:109,48:104,49:[2,54],54:[2,54],55:105,56:106,57:[1,107],58:110,59:111,76:[1,69],89:[1,112],90:[1,113]},{24:114,25:[1,115]},{7:116,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{7:118,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{7:119,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{7:120,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{12:122,13:123,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:124,44:62,58:46,59:47,61:121,63:23,64:24,65:25,76:[1,69],83:[1,26],88:[1,57],89:[1,58],90:[1,56],101:[1,55]},{12:122,13:123,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:124,44:62,58:46,59:47,61:125,63:23,64:24,65:25,76:[1,69],83:[1,26],88:[1,57],89:[1,58],90:[1,56],101:[1,55]},{1:[2,72],6:[2,72],25:[2,72],26:[2,72],40:[2,72],49:[2,72],54:[2,72],57:[2,72],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,72],74:[2,72],78:[2,72],80:[1,129],84:[2,72],85:[2,72],86:[2,72],91:[2,72],93:[2,72],102:[2,72],104:[2,72],105:[2,72],106:[2,72],110:[2,72],118:[2,72],126:[2,72],129:[2,72],130:[2,72],131:[1,126],132:[1,127],133:[2,72],134:[2,72],135:[2,72],136:[2,72],137:[2,72],138:[2,72],139:[2,72],140:[1,128]},{1:[2,184],6:[2,184],25:[2,184],26:[2,184],49:[2,184],54:[2,184],57:[2,184],73:[2,184],78:[2,184],86:[2,184],91:[2,184],93:[2,184],102:[2,184],104:[2,184],105:[2,184],106:[2,184],110:[2,184],118:[2,184],121:[1,130],126:[2,184],129:[2,184],130:[2,184],133:[2,184],134:[2,184],135:[2,184],136:[2,184],137:[2,184],138:[2,184],139:[2,184]},{24:131,25:[1,115]},{24:132,25:[1,115]},{1:[2,151],6:[2,151],25:[2,151],26:[2,151],49:[2,151],54:[2,151],57:[2,151],73:[2,151],78:[2,151],86:[2,151],91:[2,151],93:[2,151],102:[2,151],104:[2,151],105:[2,151],106:[2,151],110:[2,151],118:[2,151],126:[2,151],129:[2,151],130:[2,151],133:[2,151],134:[2,151],135:[2,151],136:[2,151],137:[2,151],138:[2,151],139:[2,151]},{24:133,25:[1,115]},{7:134,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,135],27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{1:[2,96],6:[2,96],12:122,13:123,24:136,25:[1,115],26:[2,96],27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:124,44:62,49:[2,96],54:[2,96],57:[2,96],58:46,59:47,61:138,63:23,64:24,65:25,73:[2,96],76:[1,69],78:[2,96],80:[1,137],83:[1,26],86:[2,96],88:[1,57],89:[1,58],90:[1,56],91:[2,96],93:[2,96],101:[1,55],102:[2,96],104:[2,96],105:[2,96],106:[2,96],110:[2,96],118:[2,96],126:[2,96],129:[2,96],130:[2,96],133:[2,96],134:[2,96],135:[2,96],136:[2,96],137:[2,96],138:[2,96],139:[2,96]},{7:139,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{1:[2,46],6:[2,46],7:140,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,26:[2,46],27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],102:[2,46],103:38,104:[2,46],106:[2,46],107:39,108:[1,66],109:40,110:[2,46],111:68,119:[1,41],124:36,125:[1,63],126:[2,46],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{1:[2,47],6:[2,47],25:[2,47],26:[2,47],54:[2,47],78:[2,47],102:[2,47],104:[2,47],106:[2,47],110:[2,47],126:[2,47]},{1:[2,73],6:[2,73],25:[2,73],26:[2,73],40:[2,73],49:[2,73],54:[2,73],57:[2,73],66:[2,73],67:[2,73],68:[2,73],69:[2,73],71:[2,73],73:[2,73],74:[2,73],78:[2,73],84:[2,73],85:[2,73],86:[2,73],91:[2,73],93:[2,73],102:[2,73],104:[2,73],105:[2,73],106:[2,73],110:[2,73],118:[2,73],126:[2,73],129:[2,73],130:[2,73],133:[2,73],134:[2,73],135:[2,73],136:[2,73],137:[2,73],138:[2,73],139:[2,73]},{1:[2,74],6:[2,74],25:[2,74],26:[2,74],40:[2,74],49:[2,74],54:[2,74],57:[2,74],66:[2,74],67:[2,74],68:[2,74],69:[2,74],71:[2,74],73:[2,74],74:[2,74],78:[2,74],84:[2,74],85:[2,74],86:[2,74],91:[2,74],93:[2,74],102:[2,74],104:[2,74],105:[2,74],106:[2,74],110:[2,74],118:[2,74],126:[2,74],129:[2,74],130:[2,74],133:[2,74],134:[2,74],135:[2,74],136:[2,74],137:[2,74],138:[2,74],139:[2,74]},{1:[2,28],6:[2,28],25:[2,28],26:[2,28],49:[2,28],54:[2,28],57:[2,28],66:[2,28],67:[2,28],68:[2,28],69:[2,28],71:[2,28],73:[2,28],74:[2,28],78:[2,28],84:[2,28],85:[2,28],86:[2,28],91:[2,28],93:[2,28],102:[2,28],104:[2,28],105:[2,28],106:[2,28],110:[2,28],118:[2,28],126:[2,28],129:[2,28],130:[2,28],133:[2,28],134:[2,28],135:[2,28],136:[2,28],137:[2,28],138:[2,28],139:[2,28]},{1:[2,29],6:[2,29],25:[2,29],26:[2,29],49:[2,29],54:[2,29],57:[2,29],66:[2,29],67:[2,29],68:[2,29],69:[2,29],71:[2,29],73:[2,29],74:[2,29],78:[2,29],84:[2,29],85:[2,29],86:[2,29],91:[2,29],93:[2,29],102:[2,29],104:[2,29],105:[2,29],106:[2,29],110:[2,29],118:[2,29],126:[2,29],129:[2,29],130:[2,29],133:[2,29],134:[2,29],135:[2,29],136:[2,29],137:[2,29],138:[2,29],139:[2,29]},{1:[2,30],6:[2,30],25:[2,30],26:[2,30],49:[2,30],54:[2,30],57:[2,30],66:[2,30],67:[2,30],68:[2,30],69:[2,30],71:[2,30],73:[2,30],74:[2,30],78:[2,30],84:[2,30],85:[2,30],86:[2,30],91:[2,30],93:[2,30],102:[2,30],104:[2,30],105:[2,30],106:[2,30],110:[2,30],118:[2,30],126:[2,30],129:[2,30],130:[2,30],133:[2,30],134:[2,30],135:[2,30],136:[2,30],137:[2,30],138:[2,30],139:[2,30]},{1:[2,31],6:[2,31],25:[2,31],26:[2,31],49:[2,31],54:[2,31],57:[2,31],66:[2,31],67:[2,31],68:[2,31],69:[2,31],71:[2,31],73:[2,31],74:[2,31],78:[2,31],84:[2,31],85:[2,31],86:[2,31],91:[2,31],93:[2,31],102:[2,31],104:[2,31],105:[2,31],106:[2,31],110:[2,31],118:[2,31],126:[2,31],129:[2,31],130:[2,31],133:[2,31],134:[2,31],135:[2,31],136:[2,31],137:[2,31],138:[2,31],139:[2,31]},{1:[2,32],6:[2,32],25:[2,32],26:[2,32],49:[2,32],54:[2,32],57:[2,32],66:[2,32],67:[2,32],68:[2,32],69:[2,32],71:[2,32],73:[2,32],74:[2,32],78:[2,32],84:[2,32],85:[2,32],86:[2,32],91:[2,32],93:[2,32],102:[2,32],104:[2,32],105:[2,32],106:[2,32],110:[2,32],118:[2,32],126:[2,32],129:[2,32],130:[2,32],133:[2,32],134:[2,32],135:[2,32],136:[2,32],137:[2,32],138:[2,32],139:[2,32]},{1:[2,33],6:[2,33],25:[2,33],26:[2,33],49:[2,33],54:[2,33],57:[2,33],66:[2,33],67:[2,33],68:[2,33],69:[2,33],71:[2,33],73:[2,33],74:[2,33],78:[2,33],84:[2,33],85:[2,33],86:[2,33],91:[2,33],93:[2,33],102:[2,33],104:[2,33],105:[2,33],106:[2,33],110:[2,33],118:[2,33],126:[2,33],129:[2,33],130:[2,33],133:[2,33],134:[2,33],135:[2,33],136:[2,33],137:[2,33],138:[2,33],139:[2,33]},{1:[2,34],6:[2,34],25:[2,34],26:[2,34],49:[2,34],54:[2,34],57:[2,34],66:[2,34],67:[2,34],68:[2,34],69:[2,34],71:[2,34],73:[2,34],74:[2,34],78:[2,34],84:[2,34],85:[2,34],86:[2,34],91:[2,34],93:[2,34],102:[2,34],104:[2,34],105:[2,34],106:[2,34],110:[2,34],118:[2,34],126:[2,34],129:[2,34],130:[2,34],133:[2,34],134:[2,34],135:[2,34],136:[2,34],137:[2,34],138:[2,34],139:[2,34]},{4:141,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,142],27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{7:143,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,147],27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],57:[1,149],58:46,59:47,60:148,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],87:145,88:[1,57],89:[1,58],90:[1,56],91:[1,144],94:146,96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{1:[2,112],6:[2,112],25:[2,112],26:[2,112],49:[2,112],54:[2,112],57:[2,112],66:[2,112],67:[2,112],68:[2,112],69:[2,112],71:[2,112],73:[2,112],74:[2,112],78:[2,112],84:[2,112],85:[2,112],86:[2,112],91:[2,112],93:[2,112],102:[2,112],104:[2,112],105:[2,112],106:[2,112],110:[2,112],118:[2,112],126:[2,112],129:[2,112],130:[2,112],133:[2,112],134:[2,112],135:[2,112],136:[2,112],137:[2,112],138:[2,112],139:[2,112]},{1:[2,113],6:[2,113],25:[2,113],26:[2,113],27:150,28:[1,72],49:[2,113],54:[2,113],57:[2,113],66:[2,113],67:[2,113],68:[2,113],69:[2,113],71:[2,113],73:[2,113],74:[2,113],78:[2,113],84:[2,113],85:[2,113],86:[2,113],91:[2,113],93:[2,113],102:[2,113],104:[2,113],105:[2,113],106:[2,113],110:[2,113],118:[2,113],126:[2,113],129:[2,113],130:[2,113],133:[2,113],134:[2,113],135:[2,113],136:[2,113],137:[2,113],138:[2,113],139:[2,113]},{25:[2,50]},{25:[2,51]},{1:[2,68],6:[2,68],25:[2,68],26:[2,68],40:[2,68],49:[2,68],54:[2,68],57:[2,68],66:[2,68],67:[2,68],68:[2,68],69:[2,68],71:[2,68],73:[2,68],74:[2,68],78:[2,68],80:[2,68],84:[2,68],85:[2,68],86:[2,68],91:[2,68],93:[2,68],102:[2,68],104:[2,68],105:[2,68],106:[2,68],110:[2,68],118:[2,68],126:[2,68],129:[2,68],130:[2,68],131:[2,68],132:[2,68],133:[2,68],134:[2,68],135:[2,68],136:[2,68],137:[2,68],138:[2,68],139:[2,68],140:[2,68]},{1:[2,71],6:[2,71],25:[2,71],26:[2,71],40:[2,71],49:[2,71],54:[2,71],57:[2,71],66:[2,71],67:[2,71],68:[2,71],69:[2,71],71:[2,71],73:[2,71],74:[2,71],78:[2,71],80:[2,71],84:[2,71],85:[2,71],86:[2,71],91:[2,71],93:[2,71],102:[2,71],104:[2,71],105:[2,71],106:[2,71],110:[2,71],118:[2,71],126:[2,71],129:[2,71],130:[2,71],131:[2,71],132:[2,71],133:[2,71],134:[2,71],135:[2,71],136:[2,71],137:[2,71],138:[2,71],139:[2,71],140:[2,71]},{7:151,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{7:152,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{7:153,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{7:155,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:154,25:[1,115],27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{27:160,28:[1,72],44:161,58:162,59:163,64:156,76:[1,69],89:[1,112],90:[1,56],113:157,114:[1,158],115:159},{112:164,116:[1,165],117:[1,166]},{6:[2,91],10:170,25:[2,91],27:171,28:[1,72],29:172,30:[1,70],31:[1,71],41:168,42:169,44:173,46:[1,45],54:[2,91],77:167,78:[2,91],89:[1,112]},{1:[2,26],6:[2,26],25:[2,26],26:[2,26],43:[2,26],49:[2,26],54:[2,26],57:[2,26],66:[2,26],67:[2,26],68:[2,26],69:[2,26],71:[2,26],73:[2,26],74:[2,26],78:[2,26],84:[2,26],85:[2,26],86:[2,26],91:[2,26],93:[2,26],102:[2,26],104:[2,26],105:[2,26],106:[2,26],110:[2,26],118:[2,26],126:[2,26],129:[2,26],130:[2,26],133:[2,26],134:[2,26],135:[2,26],136:[2,26],137:[2,26],138:[2,26],139:[2,26]},{1:[2,27],6:[2,27],25:[2,27],26:[2,27],43:[2,27],49:[2,27],54:[2,27],57:[2,27],66:[2,27],67:[2,27],68:[2,27],69:[2,27],71:[2,27],73:[2,27],74:[2,27],78:[2,27],84:[2,27],85:[2,27],86:[2,27],91:[2,27],93:[2,27],102:[2,27],104:[2,27],105:[2,27],106:[2,27],110:[2,27],118:[2,27],126:[2,27],129:[2,27],130:[2,27],133:[2,27],134:[2,27],135:[2,27],136:[2,27],137:[2,27],138:[2,27],139:[2,27]},{1:[2,25],6:[2,25],25:[2,25],26:[2,25],40:[2,25],43:[2,25],49:[2,25],54:[2,25],57:[2,25],66:[2,25],67:[2,25],68:[2,25],69:[2,25],71:[2,25],73:[2,25],74:[2,25],78:[2,25],80:[2,25],84:[2,25],85:[2,25],86:[2,25],91:[2,25],93:[2,25],102:[2,25],104:[2,25],105:[2,25],106:[2,25],110:[2,25],116:[2,25],117:[2,25],118:[2,25],126:[2,25],129:[2,25],130:[2,25],131:[2,25],132:[2,25],133:[2,25],134:[2,25],135:[2,25],136:[2,25],137:[2,25],138:[2,25],139:[2,25],140:[2,25]},{1:[2,5],5:174,6:[2,5],7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,26:[2,5],27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],102:[2,5],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{1:[2,196],6:[2,196],25:[2,196],26:[2,196],49:[2,196],54:[2,196],57:[2,196],73:[2,196],78:[2,196],86:[2,196],91:[2,196],93:[2,196],102:[2,196],104:[2,196],105:[2,196],106:[2,196],110:[2,196],118:[2,196],126:[2,196],129:[2,196],130:[2,196],133:[2,196],134:[2,196],135:[2,196],136:[2,196],137:[2,196],138:[2,196],139:[2,196]},{7:175,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{7:176,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{7:177,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{7:178,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{7:179,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{7:180,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{7:181,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{7:182,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{7:183,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{1:[2,150],6:[2,150],25:[2,150],26:[2,150],49:[2,150],54:[2,150],57:[2,150],73:[2,150],78:[2,150],86:[2,150],91:[2,150],93:[2,150],102:[2,150],104:[2,150],105:[2,150],106:[2,150],110:[2,150],118:[2,150],126:[2,150],129:[2,150],130:[2,150],133:[2,150],134:[2,150],135:[2,150],136:[2,150],137:[2,150],138:[2,150],139:[2,150]},{1:[2,155],6:[2,155],25:[2,155],26:[2,155],49:[2,155],54:[2,155],57:[2,155],73:[2,155],78:[2,155],86:[2,155],91:[2,155],93:[2,155],102:[2,155],104:[2,155],105:[2,155],106:[2,155],110:[2,155],118:[2,155],126:[2,155],129:[2,155],130:[2,155],133:[2,155],134:[2,155],135:[2,155],136:[2,155],137:[2,155],138:[2,155],139:[2,155]},{7:184,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{1:[2,149],6:[2,149],25:[2,149],26:[2,149],49:[2,149],54:[2,149],57:[2,149],73:[2,149],78:[2,149],86:[2,149],91:[2,149],93:[2,149],102:[2,149],104:[2,149],105:[2,149],106:[2,149],110:[2,149],118:[2,149],126:[2,149],129:[2,149],130:[2,149],133:[2,149],134:[2,149],135:[2,149],136:[2,149],137:[2,149],138:[2,149],139:[2,149]},{1:[2,154],6:[2,154],25:[2,154],26:[2,154],49:[2,154],54:[2,154],57:[2,154],73:[2,154],78:[2,154],86:[2,154],91:[2,154],93:[2,154],102:[2,154],104:[2,154],105:[2,154],106:[2,154],110:[2,154],118:[2,154],126:[2,154],129:[2,154],130:[2,154],133:[2,154],134:[2,154],135:[2,154],136:[2,154],137:[2,154],138:[2,154],139:[2,154]},{82:185,85:[1,103]},{1:[2,69],6:[2,69],25:[2,69],26:[2,69],40:[2,69],49:[2,69],54:[2,69],57:[2,69],66:[2,69],67:[2,69],68:[2,69],69:[2,69],71:[2,69],73:[2,69],74:[2,69],78:[2,69],80:[2,69],84:[2,69],85:[2,69],86:[2,69],91:[2,69],93:[2,69],102:[2,69],104:[2,69],105:[2,69],106:[2,69],110:[2,69],118:[2,69],126:[2,69],129:[2,69],130:[2,69],131:[2,69],132:[2,69],133:[2,69],134:[2,69],135:[2,69],136:[2,69],137:[2,69],138:[2,69],139:[2,69],140:[2,69]},{85:[2,109]},{27:186,28:[1,72]},{27:187,28:[1,72]},{1:[2,84],6:[2,84],25:[2,84],26:[2,84],27:188,28:[1,72],40:[2,84],49:[2,84],54:[2,84],57:[2,84],66:[2,84],67:[2,84],68:[2,84],69:[2,84],71:[2,84],73:[2,84],74:[2,84],78:[2,84],80:[2,84],84:[2,84],85:[2,84],86:[2,84],91:[2,84],93:[2,84],102:[2,84],104:[2,84],105:[2,84],106:[2,84],110:[2,84],118:[2,84],126:[2,84],129:[2,84],130:[2,84],131:[2,84],132:[2,84],133:[2,84],134:[2,84],135:[2,84],136:[2,84],137:[2,84],138:[2,84],139:[2,84],140:[2,84]},{27:189,28:[1,72]},{1:[2,85],6:[2,85],25:[2,85],26:[2,85],40:[2,85],49:[2,85],54:[2,85],57:[2,85],66:[2,85],67:[2,85],68:[2,85],69:[2,85],71:[2,85],73:[2,85],74:[2,85],78:[2,85],80:[2,85],84:[2,85],85:[2,85],86:[2,85],91:[2,85],93:[2,85],102:[2,85],104:[2,85],105:[2,85],106:[2,85],110:[2,85],118:[2,85],126:[2,85],129:[2,85],130:[2,85],131:[2,85],132:[2,85],133:[2,85],134:[2,85],135:[2,85],136:[2,85],137:[2,85],138:[2,85],139:[2,85],140:[2,85]},{7:191,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],57:[1,195],58:46,59:47,61:35,63:23,64:24,65:25,72:190,75:192,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],92:193,93:[1,194],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{70:196,71:[1,97],74:[1,98]},{82:197,85:[1,103]},{1:[2,70],6:[2,70],25:[2,70],26:[2,70],40:[2,70],49:[2,70],54:[2,70],57:[2,70],66:[2,70],67:[2,70],68:[2,70],69:[2,70],71:[2,70],73:[2,70],74:[2,70],78:[2,70],80:[2,70],84:[2,70],85:[2,70],86:[2,70],91:[2,70],93:[2,70],102:[2,70],104:[2,70],105:[2,70],106:[2,70],110:[2,70],118:[2,70],126:[2,70],129:[2,70],130:[2,70],131:[2,70],132:[2,70],133:[2,70],134:[2,70],135:[2,70],136:[2,70],137:[2,70],138:[2,70],139:[2,70],140:[2,70]},{6:[1,199],7:198,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,200],27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{1:[2,107],6:[2,107],25:[2,107],26:[2,107],49:[2,107],54:[2,107],57:[2,107],66:[2,107],67:[2,107],68:[2,107],69:[2,107],71:[2,107],73:[2,107],74:[2,107],78:[2,107],84:[2,107],85:[2,107],86:[2,107],91:[2,107],93:[2,107],102:[2,107],104:[2,107],105:[2,107],106:[2,107],110:[2,107],118:[2,107],126:[2,107],129:[2,107],130:[2,107],133:[2,107],134:[2,107],135:[2,107],136:[2,107],137:[2,107],138:[2,107],139:[2,107]},{7:203,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,147],27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],57:[1,149],58:46,59:47,60:148,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],86:[1,201],87:202,88:[1,57],89:[1,58],90:[1,56],94:146,96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{6:[2,52],25:[2,52],49:[1,204],53:206,54:[1,205]},{6:[2,55],25:[2,55],26:[2,55],49:[2,55],54:[2,55]},{6:[2,59],25:[2,59],26:[2,59],40:[1,208],49:[2,59],54:[2,59],57:[1,207]},{6:[2,62],25:[2,62],26:[2,62],49:[2,62],54:[2,62]},{6:[2,63],25:[2,63],26:[2,63],40:[2,63],49:[2,63],54:[2,63],57:[2,63]},{6:[2,64],25:[2,64],26:[2,64],40:[2,64],49:[2,64],54:[2,64],57:[2,64]},{6:[2,65],25:[2,65],26:[2,65],40:[2,65],49:[2,65],54:[2,65],57:[2,65]},{6:[2,66],25:[2,66],26:[2,66],40:[2,66],49:[2,66],54:[2,66],57:[2,66]},{27:150,28:[1,72]},{7:203,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,147],27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],57:[1,149],58:46,59:47,60:148,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],87:145,88:[1,57],89:[1,58],90:[1,56],91:[1,144],94:146,96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{1:[2,49],6:[2,49],25:[2,49],26:[2,49],49:[2,49],54:[2,49],57:[2,49],73:[2,49],78:[2,49],86:[2,49],91:[2,49],93:[2,49],102:[2,49],104:[2,49],105:[2,49],106:[2,49],110:[2,49],118:[2,49],126:[2,49],129:[2,49],130:[2,49],133:[2,49],134:[2,49],135:[2,49],136:[2,49],137:[2,49],138:[2,49],139:[2,49]},{4:210,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,26:[1,209],27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{1:[2,188],6:[2,188],25:[2,188],26:[2,188],49:[2,188],54:[2,188],57:[2,188],73:[2,188],78:[2,188],86:[2,188],91:[2,188],93:[2,188],102:[2,188],103:84,104:[2,188],105:[2,188],106:[2,188],109:85,110:[2,188],111:68,118:[2,188],126:[2,188],129:[2,188],130:[2,188],133:[1,74],134:[2,188],135:[2,188],136:[2,188],137:[2,188],138:[2,188],139:[2,188]},{103:87,104:[1,64],106:[1,65],109:88,110:[1,67],111:68,126:[1,86]},{1:[2,189],6:[2,189],25:[2,189],26:[2,189],49:[2,189],54:[2,189],57:[2,189],73:[2,189],78:[2,189],86:[2,189],91:[2,189],93:[2,189],102:[2,189],103:84,104:[2,189],105:[2,189],106:[2,189],109:85,110:[2,189],111:68,118:[2,189],126:[2,189],129:[2,189],130:[2,189],133:[1,74],134:[2,189],135:[1,78],136:[2,189],137:[2,189],138:[2,189],139:[2,189]},{1:[2,190],6:[2,190],25:[2,190],26:[2,190],49:[2,190],54:[2,190],57:[2,190],73:[2,190],78:[2,190],86:[2,190],91:[2,190],93:[2,190],102:[2,190],103:84,104:[2,190],105:[2,190],106:[2,190],109:85,110:[2,190],111:68,118:[2,190],126:[2,190],129:[2,190],130:[2,190],133:[1,74],134:[2,190],135:[1,78],136:[2,190],137:[2,190],138:[2,190],139:[2,190]},{1:[2,191],6:[2,191],25:[2,191],26:[2,191],49:[2,191],54:[2,191],57:[2,191],73:[2,191],78:[2,191],86:[2,191],91:[2,191],93:[2,191],102:[2,191],103:84,104:[2,191],105:[2,191],106:[2,191],109:85,110:[2,191],111:68,118:[2,191],126:[2,191],129:[2,191],130:[2,191],133:[1,74],134:[2,191],135:[1,78],136:[2,191],137:[2,191],138:[2,191],139:[2,191]},{1:[2,192],6:[2,192],25:[2,192],26:[2,192],49:[2,192],54:[2,192],57:[2,192],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,192],74:[2,72],78:[2,192],84:[2,72],85:[2,72],86:[2,192],91:[2,192],93:[2,192],102:[2,192],104:[2,192],105:[2,192],106:[2,192],110:[2,192],118:[2,192],126:[2,192],129:[2,192],130:[2,192],133:[2,192],134:[2,192],135:[2,192],136:[2,192],137:[2,192],138:[2,192],139:[2,192]},{62:90,66:[1,92],67:[1,93],68:[1,94],69:[1,95],70:96,71:[1,97],74:[1,98],81:89,84:[1,91],85:[2,108]},{62:100,66:[1,92],67:[1,93],68:[1,94],69:[1,95],70:96,71:[1,97],74:[1,98],81:99,84:[1,91],85:[2,108]},{66:[2,75],67:[2,75],68:[2,75],69:[2,75],71:[2,75],74:[2,75],84:[2,75],85:[2,75]},{1:[2,193],6:[2,193],25:[2,193],26:[2,193],49:[2,193],54:[2,193],57:[2,193],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,193],74:[2,72],78:[2,193],84:[2,72],85:[2,72],86:[2,193],91:[2,193],93:[2,193],102:[2,193],104:[2,193],105:[2,193],106:[2,193],110:[2,193],118:[2,193],126:[2,193],129:[2,193],130:[2,193],133:[2,193],134:[2,193],135:[2,193],136:[2,193],137:[2,193],138:[2,193],139:[2,193]},{1:[2,194],6:[2,194],25:[2,194],26:[2,194],49:[2,194],54:[2,194],57:[2,194],73:[2,194],78:[2,194],86:[2,194],91:[2,194],93:[2,194],102:[2,194],104:[2,194],105:[2,194],106:[2,194],110:[2,194],118:[2,194],126:[2,194],129:[2,194],130:[2,194],133:[2,194],134:[2,194],135:[2,194],136:[2,194],137:[2,194],138:[2,194],139:[2,194]},{1:[2,195],6:[2,195],25:[2,195],26:[2,195],49:[2,195],54:[2,195],57:[2,195],73:[2,195],78:[2,195],86:[2,195],91:[2,195],93:[2,195],102:[2,195],104:[2,195],105:[2,195],106:[2,195],110:[2,195],118:[2,195],126:[2,195],129:[2,195],130:[2,195],133:[2,195],134:[2,195],135:[2,195],136:[2,195],137:[2,195],138:[2,195],139:[2,195]},{6:[1,213],7:211,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,212],27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{7:214,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{24:215,25:[1,115],125:[1,216]},{1:[2,134],6:[2,134],25:[2,134],26:[2,134],49:[2,134],54:[2,134],57:[2,134],73:[2,134],78:[2,134],86:[2,134],91:[2,134],93:[2,134],97:217,98:[1,218],99:[1,219],102:[2,134],104:[2,134],105:[2,134],106:[2,134],110:[2,134],118:[2,134],126:[2,134],129:[2,134],130:[2,134],133:[2,134],134:[2,134],135:[2,134],136:[2,134],137:[2,134],138:[2,134],139:[2,134]},{1:[2,148],6:[2,148],25:[2,148],26:[2,148],49:[2,148],54:[2,148],57:[2,148],73:[2,148],78:[2,148],86:[2,148],91:[2,148],93:[2,148],102:[2,148],104:[2,148],105:[2,148],106:[2,148],110:[2,148],118:[2,148],126:[2,148],129:[2,148],130:[2,148],133:[2,148],134:[2,148],135:[2,148],136:[2,148],137:[2,148],138:[2,148],139:[2,148]},{1:[2,156],6:[2,156],25:[2,156],26:[2,156],49:[2,156],54:[2,156],57:[2,156],73:[2,156],78:[2,156],86:[2,156],91:[2,156],93:[2,156],102:[2,156],104:[2,156],105:[2,156],106:[2,156],110:[2,156],118:[2,156],126:[2,156],129:[2,156],130:[2,156],133:[2,156],134:[2,156],135:[2,156],136:[2,156],137:[2,156],138:[2,156],139:[2,156]},{25:[1,220],103:84,104:[1,64],106:[1,65],109:85,110:[1,67],111:68,126:[1,83],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{120:221,122:222,123:[1,223]},{1:[2,97],6:[2,97],25:[2,97],26:[2,97],49:[2,97],54:[2,97],57:[2,97],73:[2,97],78:[2,97],86:[2,97],91:[2,97],93:[2,97],102:[2,97],104:[2,97],105:[2,97],106:[2,97],110:[2,97],118:[2,97],126:[2,97],129:[2,97],130:[2,97],133:[2,97],134:[2,97],135:[2,97],136:[2,97],137:[2,97],138:[2,97],139:[2,97]},{7:224,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{1:[2,100],6:[2,100],24:225,25:[1,115],26:[2,100],49:[2,100],54:[2,100],57:[2,100],66:[2,72],67:[2,72],68:[2,72],69:[2,72],71:[2,72],73:[2,100],74:[2,72],78:[2,100],80:[1,226],84:[2,72],85:[2,72],86:[2,100],91:[2,100],93:[2,100],102:[2,100],104:[2,100],105:[2,100],106:[2,100],110:[2,100],118:[2,100],126:[2,100],129:[2,100],130:[2,100],133:[2,100],134:[2,100],135:[2,100],136:[2,100],137:[2,100],138:[2,100],139:[2,100]},{1:[2,141],6:[2,141],25:[2,141],26:[2,141],49:[2,141],54:[2,141],57:[2,141],73:[2,141],78:[2,141],86:[2,141],91:[2,141],93:[2,141],102:[2,141],103:84,104:[2,141],105:[2,141],106:[2,141],109:85,110:[2,141],111:68,118:[2,141],126:[2,141],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{1:[2,45],6:[2,45],26:[2,45],102:[2,45],103:84,104:[2,45],106:[2,45],109:85,110:[2,45],111:68,126:[2,45],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{6:[1,73],102:[1,227]},{4:228,5:3,7:4,8:5,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{6:[2,129],25:[2,129],54:[2,129],57:[1,230],91:[2,129],92:229,93:[1,194],103:84,104:[1,64],106:[1,65],109:85,110:[1,67],111:68,126:[1,83],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{1:[2,115],6:[2,115],25:[2,115],26:[2,115],40:[2,115],49:[2,115],54:[2,115],57:[2,115],66:[2,115],67:[2,115],68:[2,115],69:[2,115],71:[2,115],73:[2,115],74:[2,115],78:[2,115],84:[2,115],85:[2,115],86:[2,115],91:[2,115],93:[2,115],102:[2,115],104:[2,115],105:[2,115],106:[2,115],110:[2,115],116:[2,115],117:[2,115],118:[2,115],126:[2,115],129:[2,115],130:[2,115],133:[2,115],134:[2,115],135:[2,115],136:[2,115],137:[2,115],138:[2,115],139:[2,115]},{6:[2,52],25:[2,52],53:231,54:[1,232],91:[2,52]},{6:[2,124],25:[2,124],26:[2,124],54:[2,124],86:[2,124],91:[2,124]},{7:203,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,147],27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],57:[1,149],58:46,59:47,60:148,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],87:233,88:[1,57],89:[1,58],90:[1,56],94:146,96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{6:[2,130],25:[2,130],26:[2,130],54:[2,130],86:[2,130],91:[2,130]},{6:[2,131],25:[2,131],26:[2,131],54:[2,131],86:[2,131],91:[2,131]},{1:[2,114],6:[2,114],25:[2,114],26:[2,114],40:[2,114],43:[2,114],49:[2,114],54:[2,114],57:[2,114],66:[2,114],67:[2,114],68:[2,114],69:[2,114],71:[2,114],73:[2,114],74:[2,114],78:[2,114],80:[2,114],84:[2,114],85:[2,114],86:[2,114],91:[2,114],93:[2,114],102:[2,114],104:[2,114],105:[2,114],106:[2,114],110:[2,114],116:[2,114],117:[2,114],118:[2,114],126:[2,114],129:[2,114],130:[2,114],131:[2,114],132:[2,114],133:[2,114],134:[2,114],135:[2,114],136:[2,114],137:[2,114],138:[2,114],139:[2,114],140:[2,114]},{24:234,25:[1,115],103:84,104:[1,64],106:[1,65],109:85,110:[1,67],111:68,126:[1,83],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{1:[2,144],6:[2,144],25:[2,144],26:[2,144],49:[2,144],54:[2,144],57:[2,144],73:[2,144],78:[2,144],86:[2,144],91:[2,144],93:[2,144],102:[2,144],103:84,104:[1,64],105:[1,235],106:[1,65],109:85,110:[1,67],111:68,118:[2,144],126:[2,144],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{1:[2,146],6:[2,146],25:[2,146],26:[2,146],49:[2,146],54:[2,146],57:[2,146],73:[2,146],78:[2,146],86:[2,146],91:[2,146],93:[2,146],102:[2,146],103:84,104:[1,64],105:[1,236],106:[1,65],109:85,110:[1,67],111:68,118:[2,146],126:[2,146],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{1:[2,152],6:[2,152],25:[2,152],26:[2,152],49:[2,152],54:[2,152],57:[2,152],73:[2,152],78:[2,152],86:[2,152],91:[2,152],93:[2,152],102:[2,152],104:[2,152],105:[2,152],106:[2,152],110:[2,152],118:[2,152],126:[2,152],129:[2,152],130:[2,152],133:[2,152],134:[2,152],135:[2,152],136:[2,152],137:[2,152],138:[2,152],139:[2,152]},{1:[2,153],6:[2,153],25:[2,153],26:[2,153],49:[2,153],54:[2,153],57:[2,153],73:[2,153],78:[2,153],86:[2,153],91:[2,153],93:[2,153],102:[2,153],103:84,104:[1,64],105:[2,153],106:[1,65],109:85,110:[1,67],111:68,118:[2,153],126:[2,153],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{1:[2,157],6:[2,157],25:[2,157],26:[2,157],49:[2,157],54:[2,157],57:[2,157],73:[2,157],78:[2,157],86:[2,157],91:[2,157],93:[2,157],102:[2,157],104:[2,157],105:[2,157],106:[2,157],110:[2,157],118:[2,157],126:[2,157],129:[2,157],130:[2,157],133:[2,157],134:[2,157],135:[2,157],136:[2,157],137:[2,157],138:[2,157],139:[2,157]},{116:[2,159],117:[2,159]},{27:160,28:[1,72],44:161,58:162,59:163,76:[1,69],89:[1,112],90:[1,113],113:237,115:159},{54:[1,238],116:[2,165],117:[2,165]},{54:[2,161],116:[2,161],117:[2,161]},{54:[2,162],116:[2,162],117:[2,162]},{54:[2,163],116:[2,163],117:[2,163]},{54:[2,164],116:[2,164],117:[2,164]},{1:[2,158],6:[2,158],25:[2,158],26:[2,158],49:[2,158],54:[2,158],57:[2,158],73:[2,158],78:[2,158],86:[2,158],91:[2,158],93:[2,158],102:[2,158],104:[2,158],105:[2,158],106:[2,158],110:[2,158],118:[2,158],126:[2,158],129:[2,158],130:[2,158],133:[2,158],134:[2,158],135:[2,158],136:[2,158],137:[2,158],138:[2,158],139:[2,158]},{7:239,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{7:240,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{6:[2,52],25:[2,52],53:241,54:[1,242],78:[2,52]},{6:[2,92],25:[2,92],26:[2,92],54:[2,92],78:[2,92]},{6:[2,38],25:[2,38],26:[2,38],43:[1,243],54:[2,38],78:[2,38]},{6:[2,41],25:[2,41],26:[2,41],54:[2,41],78:[2,41]},{6:[2,42],25:[2,42],26:[2,42],43:[2,42],54:[2,42],78:[2,42]},{6:[2,43],25:[2,43],26:[2,43],43:[2,43],54:[2,43],78:[2,43]},{6:[2,44],25:[2,44],26:[2,44],43:[2,44],54:[2,44],78:[2,44]},{1:[2,4],6:[2,4],26:[2,4],102:[2,4]},{1:[2,197],6:[2,197],25:[2,197],26:[2,197],49:[2,197],54:[2,197],57:[2,197],73:[2,197],78:[2,197],86:[2,197],91:[2,197],93:[2,197],102:[2,197],103:84,104:[2,197],105:[2,197],106:[2,197],109:85,110:[2,197],111:68,118:[2,197],126:[2,197],129:[2,197],130:[2,197],133:[1,74],134:[1,77],135:[1,78],136:[2,197],137:[2,197],138:[2,197],139:[2,197]},{1:[2,198],6:[2,198],25:[2,198],26:[2,198],49:[2,198],54:[2,198],57:[2,198],73:[2,198],78:[2,198],86:[2,198],91:[2,198],93:[2,198],102:[2,198],103:84,104:[2,198],105:[2,198],106:[2,198],109:85,110:[2,198],111:68,118:[2,198],126:[2,198],129:[2,198],130:[2,198],133:[1,74],134:[1,77],135:[1,78],136:[2,198],137:[2,198],138:[2,198],139:[2,198]},{1:[2,199],6:[2,199],25:[2,199],26:[2,199],49:[2,199],54:[2,199],57:[2,199],73:[2,199],78:[2,199],86:[2,199],91:[2,199],93:[2,199],102:[2,199],103:84,104:[2,199],105:[2,199],106:[2,199],109:85,110:[2,199],111:68,118:[2,199],126:[2,199],129:[2,199],130:[2,199],133:[1,74],134:[2,199],135:[1,78],136:[2,199],137:[2,199],138:[2,199],139:[2,199]},{1:[2,200],6:[2,200],25:[2,200],26:[2,200],49:[2,200],54:[2,200],57:[2,200],73:[2,200],78:[2,200],86:[2,200],91:[2,200],93:[2,200],102:[2,200],103:84,104:[2,200],105:[2,200],106:[2,200],109:85,110:[2,200],111:68,118:[2,200],126:[2,200],129:[2,200],130:[2,200],133:[1,74],134:[2,200],135:[1,78],136:[2,200],137:[2,200],138:[2,200],139:[2,200]},{1:[2,201],6:[2,201],25:[2,201],26:[2,201],49:[2,201],54:[2,201],57:[2,201],73:[2,201],78:[2,201],86:[2,201],91:[2,201],93:[2,201],102:[2,201],103:84,104:[2,201],105:[2,201],106:[2,201],109:85,110:[2,201],111:68,118:[2,201],126:[2,201],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[2,201],137:[2,201],138:[2,201],139:[2,201]},{1:[2,202],6:[2,202],25:[2,202],26:[2,202],49:[2,202],54:[2,202],57:[2,202],73:[2,202],78:[2,202],86:[2,202],91:[2,202],93:[2,202],102:[2,202],103:84,104:[2,202],105:[2,202],106:[2,202],109:85,110:[2,202],111:68,118:[2,202],126:[2,202],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[2,202],138:[2,202],139:[1,82]},{1:[2,203],6:[2,203],25:[2,203],26:[2,203],49:[2,203],54:[2,203],57:[2,203],73:[2,203],78:[2,203],86:[2,203],91:[2,203],93:[2,203],102:[2,203],103:84,104:[2,203],105:[2,203],106:[2,203],109:85,110:[2,203],111:68,118:[2,203],126:[2,203],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[2,203],139:[1,82]},{1:[2,204],6:[2,204],25:[2,204],26:[2,204],49:[2,204],54:[2,204],57:[2,204],73:[2,204],78:[2,204],86:[2,204],91:[2,204],93:[2,204],102:[2,204],103:84,104:[2,204],105:[2,204],106:[2,204],109:85,110:[2,204],111:68,118:[2,204],126:[2,204],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[2,204],138:[2,204],139:[2,204]},{1:[2,187],6:[2,187],25:[2,187],26:[2,187],49:[2,187],54:[2,187],57:[2,187],73:[2,187],78:[2,187],86:[2,187],91:[2,187],93:[2,187],102:[2,187],103:84,104:[1,64],105:[2,187],106:[1,65],109:85,110:[1,67],111:68,118:[2,187],126:[2,187],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{1:[2,186],6:[2,186],25:[2,186],26:[2,186],49:[2,186],54:[2,186],57:[2,186],73:[2,186],78:[2,186],86:[2,186],91:[2,186],93:[2,186],102:[2,186],103:84,104:[1,64],105:[2,186],106:[1,65],109:85,110:[1,67],111:68,118:[2,186],126:[2,186],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{1:[2,104],6:[2,104],25:[2,104],26:[2,104],49:[2,104],54:[2,104],57:[2,104],66:[2,104],67:[2,104],68:[2,104],69:[2,104],71:[2,104],73:[2,104],74:[2,104],78:[2,104],84:[2,104],85:[2,104],86:[2,104],91:[2,104],93:[2,104],102:[2,104],104:[2,104],105:[2,104],106:[2,104],110:[2,104],118:[2,104],126:[2,104],129:[2,104],130:[2,104],133:[2,104],134:[2,104],135:[2,104],136:[2,104],137:[2,104],138:[2,104],139:[2,104]},{1:[2,80],6:[2,80],25:[2,80],26:[2,80],40:[2,80],49:[2,80],54:[2,80],57:[2,80],66:[2,80],67:[2,80],68:[2,80],69:[2,80],71:[2,80],73:[2,80],74:[2,80],78:[2,80],80:[2,80],84:[2,80],85:[2,80],86:[2,80],91:[2,80],93:[2,80],102:[2,80],104:[2,80],105:[2,80],106:[2,80],110:[2,80],118:[2,80],126:[2,80],129:[2,80],130:[2,80],131:[2,80],132:[2,80],133:[2,80],134:[2,80],135:[2,80],136:[2,80],137:[2,80],138:[2,80],139:[2,80],140:[2,80]},{1:[2,81],6:[2,81],25:[2,81],26:[2,81],40:[2,81],49:[2,81],54:[2,81],57:[2,81],66:[2,81],67:[2,81],68:[2,81],69:[2,81],71:[2,81],73:[2,81],74:[2,81],78:[2,81],80:[2,81],84:[2,81],85:[2,81],86:[2,81],91:[2,81],93:[2,81],102:[2,81],104:[2,81],105:[2,81],106:[2,81],110:[2,81],118:[2,81],126:[2,81],129:[2,81],130:[2,81],131:[2,81],132:[2,81],133:[2,81],134:[2,81],135:[2,81],136:[2,81],137:[2,81],138:[2,81],139:[2,81],140:[2,81]},{1:[2,82],6:[2,82],25:[2,82],26:[2,82],40:[2,82],49:[2,82],54:[2,82],57:[2,82],66:[2,82],67:[2,82],68:[2,82],69:[2,82],71:[2,82],73:[2,82],74:[2,82],78:[2,82],80:[2,82],84:[2,82],85:[2,82],86:[2,82],91:[2,82],93:[2,82],102:[2,82],104:[2,82],105:[2,82],106:[2,82],110:[2,82],118:[2,82],126:[2,82],129:[2,82],130:[2,82],131:[2,82],132:[2,82],133:[2,82],134:[2,82],135:[2,82],136:[2,82],137:[2,82],138:[2,82],139:[2,82],140:[2,82]},{1:[2,83],6:[2,83],25:[2,83],26:[2,83],40:[2,83],49:[2,83],54:[2,83],57:[2,83],66:[2,83],67:[2,83],68:[2,83],69:[2,83],71:[2,83],73:[2,83],74:[2,83],78:[2,83],80:[2,83],84:[2,83],85:[2,83],86:[2,83],91:[2,83],93:[2,83],102:[2,83],104:[2,83],105:[2,83],106:[2,83],110:[2,83],118:[2,83],126:[2,83],129:[2,83],130:[2,83],131:[2,83],132:[2,83],133:[2,83],134:[2,83],135:[2,83],136:[2,83],137:[2,83],138:[2,83],139:[2,83],140:[2,83]},{73:[1,244]},{57:[1,195],73:[2,88],92:245,93:[1,194],103:84,104:[1,64],106:[1,65],109:85,110:[1,67],111:68,126:[1,83],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{73:[2,89]},{7:246,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,73:[2,123],76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{11:[2,117],28:[2,117],30:[2,117],31:[2,117],33:[2,117],34:[2,117],35:[2,117],36:[2,117],37:[2,117],38:[2,117],45:[2,117],46:[2,117],47:[2,117],51:[2,117],52:[2,117],73:[2,117],76:[2,117],79:[2,117],83:[2,117],88:[2,117],89:[2,117],90:[2,117],96:[2,117],100:[2,117],101:[2,117],104:[2,117],106:[2,117],108:[2,117],110:[2,117],119:[2,117],125:[2,117],127:[2,117],128:[2,117],129:[2,117],130:[2,117],131:[2,117],132:[2,117]},{11:[2,118],28:[2,118],30:[2,118],31:[2,118],33:[2,118],34:[2,118],35:[2,118],36:[2,118],37:[2,118],38:[2,118],45:[2,118],46:[2,118],47:[2,118],51:[2,118],52:[2,118],73:[2,118],76:[2,118],79:[2,118],83:[2,118],88:[2,118],89:[2,118],90:[2,118],96:[2,118],100:[2,118],101:[2,118],104:[2,118],106:[2,118],108:[2,118],110:[2,118],119:[2,118],125:[2,118],127:[2,118],128:[2,118],129:[2,118],130:[2,118],131:[2,118],132:[2,118]},{1:[2,87],6:[2,87],25:[2,87],26:[2,87],40:[2,87],49:[2,87],54:[2,87],57:[2,87],66:[2,87],67:[2,87],68:[2,87],69:[2,87],71:[2,87],73:[2,87],74:[2,87],78:[2,87],80:[2,87],84:[2,87],85:[2,87],86:[2,87],91:[2,87],93:[2,87],102:[2,87],104:[2,87],105:[2,87],106:[2,87],110:[2,87],118:[2,87],126:[2,87],129:[2,87],130:[2,87],131:[2,87],132:[2,87],133:[2,87],134:[2,87],135:[2,87],136:[2,87],137:[2,87],138:[2,87],139:[2,87],140:[2,87]},{1:[2,105],6:[2,105],25:[2,105],26:[2,105],49:[2,105],54:[2,105],57:[2,105],66:[2,105],67:[2,105],68:[2,105],69:[2,105],71:[2,105],73:[2,105],74:[2,105],78:[2,105],84:[2,105],85:[2,105],86:[2,105],91:[2,105],93:[2,105],102:[2,105],104:[2,105],105:[2,105],106:[2,105],110:[2,105],118:[2,105],126:[2,105],129:[2,105],130:[2,105],133:[2,105],134:[2,105],135:[2,105],136:[2,105],137:[2,105],138:[2,105],139:[2,105]},{1:[2,35],6:[2,35],25:[2,35],26:[2,35],49:[2,35],54:[2,35],57:[2,35],73:[2,35],78:[2,35],86:[2,35],91:[2,35],93:[2,35],102:[2,35],103:84,104:[2,35],105:[2,35],106:[2,35],109:85,110:[2,35],111:68,118:[2,35],126:[2,35],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{7:247,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{7:248,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{1:[2,110],6:[2,110],25:[2,110],26:[2,110],49:[2,110],54:[2,110],57:[2,110],66:[2,110],67:[2,110],68:[2,110],69:[2,110],71:[2,110],73:[2,110],74:[2,110],78:[2,110],84:[2,110],85:[2,110],86:[2,110],91:[2,110],93:[2,110],102:[2,110],104:[2,110],105:[2,110],106:[2,110],110:[2,110],118:[2,110],126:[2,110],129:[2,110],130:[2,110],133:[2,110],134:[2,110],135:[2,110],136:[2,110],137:[2,110],138:[2,110],139:[2,110]},{6:[2,52],25:[2,52],53:249,54:[1,232],86:[2,52]},{6:[2,129],25:[2,129],26:[2,129],54:[2,129],57:[1,250],86:[2,129],91:[2,129],103:84,104:[1,64],106:[1,65],109:85,110:[1,67],111:68,126:[1,83],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{50:251,51:[1,59],52:[1,60]},{6:[2,53],25:[2,53],26:[2,53],27:108,28:[1,72],44:109,55:252,56:106,57:[1,107],58:110,59:111,76:[1,69],89:[1,112],90:[1,113]},{6:[1,253],25:[1,254]},{6:[2,60],25:[2,60],26:[2,60],49:[2,60],54:[2,60]},{7:255,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{1:[2,23],6:[2,23],25:[2,23],26:[2,23],49:[2,23],54:[2,23],57:[2,23],73:[2,23],78:[2,23],86:[2,23],91:[2,23],93:[2,23],98:[2,23],99:[2,23],102:[2,23],104:[2,23],105:[2,23],106:[2,23],110:[2,23],118:[2,23],121:[2,23],123:[2,23],126:[2,23],129:[2,23],130:[2,23],133:[2,23],134:[2,23],135:[2,23],136:[2,23],137:[2,23],138:[2,23],139:[2,23]},{6:[1,73],26:[1,256]},{1:[2,205],6:[2,205],25:[2,205],26:[2,205],49:[2,205],54:[2,205],57:[2,205],73:[2,205],78:[2,205],86:[2,205],91:[2,205],93:[2,205],102:[2,205],103:84,104:[2,205],105:[2,205],106:[2,205],109:85,110:[2,205],111:68,118:[2,205],126:[2,205],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{7:257,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{7:258,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{1:[2,208],6:[2,208],25:[2,208],26:[2,208],49:[2,208],54:[2,208],57:[2,208],73:[2,208],78:[2,208],86:[2,208],91:[2,208],93:[2,208],102:[2,208],103:84,104:[2,208],105:[2,208],106:[2,208],109:85,110:[2,208],111:68,118:[2,208],126:[2,208],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{1:[2,185],6:[2,185],25:[2,185],26:[2,185],49:[2,185],54:[2,185],57:[2,185],73:[2,185],78:[2,185],86:[2,185],91:[2,185],93:[2,185],102:[2,185],104:[2,185],105:[2,185],106:[2,185],110:[2,185],118:[2,185],126:[2,185],129:[2,185],130:[2,185],133:[2,185],134:[2,185],135:[2,185],136:[2,185],137:[2,185],138:[2,185],139:[2,185]},{7:259,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{1:[2,135],6:[2,135],25:[2,135],26:[2,135],49:[2,135],54:[2,135],57:[2,135],73:[2,135],78:[2,135],86:[2,135],91:[2,135],93:[2,135],98:[1,260],102:[2,135],104:[2,135],105:[2,135],106:[2,135],110:[2,135],118:[2,135],126:[2,135],129:[2,135],130:[2,135],133:[2,135],134:[2,135],135:[2,135],136:[2,135],137:[2,135],138:[2,135],139:[2,135]},{24:261,25:[1,115]},{24:264,25:[1,115],27:262,28:[1,72],59:263,76:[1,69]},{120:265,122:222,123:[1,223]},{26:[1,266],121:[1,267],122:268,123:[1,223]},{26:[2,178],121:[2,178],123:[2,178]},{7:270,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],95:269,96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{1:[2,98],6:[2,98],24:271,25:[1,115],26:[2,98],49:[2,98],54:[2,98],57:[2,98],73:[2,98],78:[2,98],86:[2,98],91:[2,98],93:[2,98],102:[2,98],103:84,104:[1,64],105:[2,98],106:[1,65],109:85,110:[1,67],111:68,118:[2,98],126:[2,98],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{1:[2,101],6:[2,101],25:[2,101],26:[2,101],49:[2,101],54:[2,101],57:[2,101],73:[2,101],78:[2,101],86:[2,101],91:[2,101],93:[2,101],102:[2,101],104:[2,101],105:[2,101],106:[2,101],110:[2,101],118:[2,101],126:[2,101],129:[2,101],130:[2,101],133:[2,101],134:[2,101],135:[2,101],136:[2,101],137:[2,101],138:[2,101],139:[2,101]},{7:272,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{1:[2,142],6:[2,142],25:[2,142],26:[2,142],49:[2,142],54:[2,142],57:[2,142],66:[2,142],67:[2,142],68:[2,142],69:[2,142],71:[2,142],73:[2,142],74:[2,142],78:[2,142],84:[2,142],85:[2,142],86:[2,142],91:[2,142],93:[2,142],102:[2,142],104:[2,142],105:[2,142],106:[2,142],110:[2,142],118:[2,142],126:[2,142],129:[2,142],130:[2,142],133:[2,142],134:[2,142],135:[2,142],136:[2,142],137:[2,142],138:[2,142],139:[2,142]},{6:[1,73],26:[1,273]},{7:274,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{6:[2,67],11:[2,118],25:[2,67],28:[2,118],30:[2,118],31:[2,118],33:[2,118],34:[2,118],35:[2,118],36:[2,118],37:[2,118],38:[2,118],45:[2,118],46:[2,118],47:[2,118],51:[2,118],52:[2,118],54:[2,67],76:[2,118],79:[2,118],83:[2,118],88:[2,118],89:[2,118],90:[2,118],91:[2,67],96:[2,118],100:[2,118],101:[2,118],104:[2,118],106:[2,118],108:[2,118],110:[2,118],119:[2,118],125:[2,118],127:[2,118],128:[2,118],129:[2,118],130:[2,118],131:[2,118],132:[2,118]},{6:[1,276],25:[1,277],91:[1,275]},{6:[2,53],7:203,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[2,53],26:[2,53],27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],57:[1,149],58:46,59:47,60:148,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],86:[2,53],88:[1,57],89:[1,58],90:[1,56],91:[2,53],94:278,96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{6:[2,52],25:[2,52],26:[2,52],53:279,54:[1,232]},{1:[2,182],6:[2,182],25:[2,182],26:[2,182],49:[2,182],54:[2,182],57:[2,182],73:[2,182],78:[2,182],86:[2,182],91:[2,182],93:[2,182],102:[2,182],104:[2,182],105:[2,182],106:[2,182],110:[2,182],118:[2,182],121:[2,182],126:[2,182],129:[2,182],130:[2,182],133:[2,182],134:[2,182],135:[2,182],136:[2,182],137:[2,182],138:[2,182],139:[2,182]},{7:280,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{7:281,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{116:[2,160],117:[2,160]},{27:160,28:[1,72],44:161,58:162,59:163,76:[1,69],89:[1,112],90:[1,113],115:282},{1:[2,167],6:[2,167],25:[2,167],26:[2,167],49:[2,167],54:[2,167],57:[2,167],73:[2,167],78:[2,167],86:[2,167],91:[2,167],93:[2,167],102:[2,167],103:84,104:[2,167],105:[1,283],106:[2,167],109:85,110:[2,167],111:68,118:[1,284],126:[2,167],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{1:[2,168],6:[2,168],25:[2,168],26:[2,168],49:[2,168],54:[2,168],57:[2,168],73:[2,168],78:[2,168],86:[2,168],91:[2,168],93:[2,168],102:[2,168],103:84,104:[2,168],105:[1,285],106:[2,168],109:85,110:[2,168],111:68,118:[2,168],126:[2,168],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{6:[1,287],25:[1,288],78:[1,286]},{6:[2,53],10:170,25:[2,53],26:[2,53],27:171,28:[1,72],29:172,30:[1,70],31:[1,71],41:289,42:169,44:173,46:[1,45],78:[2,53],89:[1,112]},{7:290,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,291],27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{1:[2,86],6:[2,86],25:[2,86],26:[2,86],40:[2,86],49:[2,86],54:[2,86],57:[2,86],66:[2,86],67:[2,86],68:[2,86],69:[2,86],71:[2,86],73:[2,86],74:[2,86],78:[2,86],80:[2,86],84:[2,86],85:[2,86],86:[2,86],91:[2,86],93:[2,86],102:[2,86],104:[2,86],105:[2,86],106:[2,86],110:[2,86],118:[2,86],126:[2,86],129:[2,86],130:[2,86],131:[2,86],132:[2,86],133:[2,86],134:[2,86],135:[2,86],136:[2,86],137:[2,86],138:[2,86],139:[2,86],140:[2,86]},{7:292,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,73:[2,121],76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{73:[2,122],103:84,104:[1,64],106:[1,65],109:85,110:[1,67],111:68,126:[1,83],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{1:[2,36],6:[2,36],25:[2,36],26:[2,36],49:[2,36],54:[2,36],57:[2,36],73:[2,36],78:[2,36],86:[2,36],91:[2,36],93:[2,36],102:[2,36],103:84,104:[2,36],105:[2,36],106:[2,36],109:85,110:[2,36],111:68,118:[2,36],126:[2,36],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{26:[1,293],103:84,104:[1,64],106:[1,65],109:85,110:[1,67],111:68,126:[1,83],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{6:[1,276],25:[1,277],86:[1,294]},{6:[2,67],25:[2,67],26:[2,67],54:[2,67],86:[2,67],91:[2,67]},{24:295,25:[1,115]},{6:[2,56],25:[2,56],26:[2,56],49:[2,56],54:[2,56]},{27:108,28:[1,72],44:109,55:296,56:106,57:[1,107],58:110,59:111,76:[1,69],89:[1,112],90:[1,113]},{6:[2,54],25:[2,54],26:[2,54],27:108,28:[1,72],44:109,48:297,54:[2,54],55:105,56:106,57:[1,107],58:110,59:111,76:[1,69],89:[1,112],90:[1,113]},{6:[2,61],25:[2,61],26:[2,61],49:[2,61],54:[2,61],103:84,104:[1,64],106:[1,65],109:85,110:[1,67],111:68,126:[1,83],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{1:[2,24],6:[2,24],25:[2,24],26:[2,24],49:[2,24],54:[2,24],57:[2,24],73:[2,24],78:[2,24],86:[2,24],91:[2,24],93:[2,24],98:[2,24],99:[2,24],102:[2,24],104:[2,24],105:[2,24],106:[2,24],110:[2,24],118:[2,24],121:[2,24],123:[2,24],126:[2,24],129:[2,24],130:[2,24],133:[2,24],134:[2,24],135:[2,24],136:[2,24],137:[2,24],138:[2,24],139:[2,24]},{26:[1,298],103:84,104:[1,64],106:[1,65],109:85,110:[1,67],111:68,126:[1,83],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{1:[2,207],6:[2,207],25:[2,207],26:[2,207],49:[2,207],54:[2,207],57:[2,207],73:[2,207],78:[2,207],86:[2,207],91:[2,207],93:[2,207],102:[2,207],103:84,104:[2,207],105:[2,207],106:[2,207],109:85,110:[2,207],111:68,118:[2,207],126:[2,207],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{24:299,25:[1,115],103:84,104:[1,64],106:[1,65],109:85,110:[1,67],111:68,126:[1,83],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{24:300,25:[1,115]},{1:[2,136],6:[2,136],25:[2,136],26:[2,136],49:[2,136],54:[2,136],57:[2,136],73:[2,136],78:[2,136],86:[2,136],91:[2,136],93:[2,136],102:[2,136],104:[2,136],105:[2,136],106:[2,136],110:[2,136],118:[2,136],126:[2,136],129:[2,136],130:[2,136],133:[2,136],134:[2,136],135:[2,136],136:[2,136],137:[2,136],138:[2,136],139:[2,136]},{24:301,25:[1,115]},{24:302,25:[1,115]},{1:[2,140],6:[2,140],25:[2,140],26:[2,140],49:[2,140],54:[2,140],57:[2,140],73:[2,140],78:[2,140],86:[2,140],91:[2,140],93:[2,140],98:[2,140],102:[2,140],104:[2,140],105:[2,140],106:[2,140],110:[2,140],118:[2,140],126:[2,140],129:[2,140],130:[2,140],133:[2,140],134:[2,140],135:[2,140],136:[2,140],137:[2,140],138:[2,140],139:[2,140]},{26:[1,303],121:[1,304],122:268,123:[1,223]},{1:[2,176],6:[2,176],25:[2,176],26:[2,176],49:[2,176],54:[2,176],57:[2,176],73:[2,176],78:[2,176],86:[2,176],91:[2,176],93:[2,176],102:[2,176],104:[2,176],105:[2,176],106:[2,176],110:[2,176],118:[2,176],126:[2,176],129:[2,176],130:[2,176],133:[2,176],134:[2,176],135:[2,176],136:[2,176],137:[2,176],138:[2,176],139:[2,176]},{24:305,25:[1,115]},{26:[2,179],121:[2,179],123:[2,179]},{24:306,25:[1,115],54:[1,307]},{25:[2,132],54:[2,132],103:84,104:[1,64],106:[1,65],109:85,110:[1,67],111:68,126:[1,83],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{1:[2,99],6:[2,99],25:[2,99],26:[2,99],49:[2,99],54:[2,99],57:[2,99],73:[2,99],78:[2,99],86:[2,99],91:[2,99],93:[2,99],102:[2,99],104:[2,99],105:[2,99],106:[2,99],110:[2,99],118:[2,99],126:[2,99],129:[2,99],130:[2,99],133:[2,99],134:[2,99],135:[2,99],136:[2,99],137:[2,99],138:[2,99],139:[2,99]},{1:[2,102],6:[2,102],24:308,25:[1,115],26:[2,102],49:[2,102],54:[2,102],57:[2,102],73:[2,102],78:[2,102],86:[2,102],91:[2,102],93:[2,102],102:[2,102],103:84,104:[1,64],105:[2,102],106:[1,65],109:85,110:[1,67],111:68,118:[2,102],126:[2,102],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{102:[1,309]},{91:[1,310],103:84,104:[1,64],106:[1,65],109:85,110:[1,67],111:68,126:[1,83],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{1:[2,116],6:[2,116],25:[2,116],26:[2,116],40:[2,116],49:[2,116],54:[2,116],57:[2,116],66:[2,116],67:[2,116],68:[2,116],69:[2,116],71:[2,116],73:[2,116],74:[2,116],78:[2,116],84:[2,116],85:[2,116],86:[2,116],91:[2,116],93:[2,116],102:[2,116],104:[2,116],105:[2,116],106:[2,116],110:[2,116],116:[2,116],117:[2,116],118:[2,116],126:[2,116],129:[2,116],130:[2,116],133:[2,116],134:[2,116],135:[2,116],136:[2,116],137:[2,116],138:[2,116],139:[2,116]},{7:203,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],57:[1,149],58:46,59:47,60:148,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],94:311,96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{7:203,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,147],27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],57:[1,149],58:46,59:47,60:148,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],87:312,88:[1,57],89:[1,58],90:[1,56],94:146,96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{6:[2,125],25:[2,125],26:[2,125],54:[2,125],86:[2,125],91:[2,125]},{6:[1,276],25:[1,277],26:[1,313]},{1:[2,145],6:[2,145],25:[2,145],26:[2,145],49:[2,145],54:[2,145],57:[2,145],73:[2,145],78:[2,145],86:[2,145],91:[2,145],93:[2,145],102:[2,145],103:84,104:[1,64],105:[2,145],106:[1,65],109:85,110:[1,67],111:68,118:[2,145],126:[2,145],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{1:[2,147],6:[2,147],25:[2,147],26:[2,147],49:[2,147],54:[2,147],57:[2,147],73:[2,147],78:[2,147],86:[2,147],91:[2,147],93:[2,147],102:[2,147],103:84,104:[1,64],105:[2,147],106:[1,65],109:85,110:[1,67],111:68,118:[2,147],126:[2,147],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{116:[2,166],117:[2,166]},{7:314,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{7:315,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{7:316,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{1:[2,90],6:[2,90],25:[2,90],26:[2,90],40:[2,90],49:[2,90],54:[2,90],57:[2,90],66:[2,90],67:[2,90],68:[2,90],69:[2,90],71:[2,90],73:[2,90],74:[2,90],78:[2,90],84:[2,90],85:[2,90],86:[2,90],91:[2,90],93:[2,90],102:[2,90],104:[2,90],105:[2,90],106:[2,90],110:[2,90],116:[2,90],117:[2,90],118:[2,90],126:[2,90],129:[2,90],130:[2,90],133:[2,90],134:[2,90],135:[2,90],136:[2,90],137:[2,90],138:[2,90],139:[2,90]},{10:170,27:171,28:[1,72],29:172,30:[1,70],31:[1,71],41:317,42:169,44:173,46:[1,45],89:[1,112]},{6:[2,91],10:170,25:[2,91],26:[2,91],27:171,28:[1,72],29:172,30:[1,70],31:[1,71],41:168,42:169,44:173,46:[1,45],54:[2,91],77:318,89:[1,112]},{6:[2,93],25:[2,93],26:[2,93],54:[2,93],78:[2,93]},{6:[2,39],25:[2,39],26:[2,39],54:[2,39],78:[2,39],103:84,104:[1,64],106:[1,65],109:85,110:[1,67],111:68,126:[1,83],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{7:319,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{73:[2,120],103:84,104:[1,64],106:[1,65],109:85,110:[1,67],111:68,126:[1,83],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{1:[2,37],6:[2,37],25:[2,37],26:[2,37],49:[2,37],54:[2,37],57:[2,37],73:[2,37],78:[2,37],86:[2,37],91:[2,37],93:[2,37],102:[2,37],104:[2,37],105:[2,37],106:[2,37],110:[2,37],118:[2,37],126:[2,37],129:[2,37],130:[2,37],133:[2,37],134:[2,37],135:[2,37],136:[2,37],137:[2,37],138:[2,37],139:[2,37]},{1:[2,111],6:[2,111],25:[2,111],26:[2,111],49:[2,111],54:[2,111],57:[2,111],66:[2,111],67:[2,111],68:[2,111],69:[2,111],71:[2,111],73:[2,111],74:[2,111],78:[2,111],84:[2,111],85:[2,111],86:[2,111],91:[2,111],93:[2,111],102:[2,111],104:[2,111],105:[2,111],106:[2,111],110:[2,111],118:[2,111],126:[2,111],129:[2,111],130:[2,111],133:[2,111],134:[2,111],135:[2,111],136:[2,111],137:[2,111],138:[2,111],139:[2,111]},{1:[2,48],6:[2,48],25:[2,48],26:[2,48],49:[2,48],54:[2,48],57:[2,48],73:[2,48],78:[2,48],86:[2,48],91:[2,48],93:[2,48],102:[2,48],104:[2,48],105:[2,48],106:[2,48],110:[2,48],118:[2,48],126:[2,48],129:[2,48],130:[2,48],133:[2,48],134:[2,48],135:[2,48],136:[2,48],137:[2,48],138:[2,48],139:[2,48]},{6:[2,57],25:[2,57],26:[2,57],49:[2,57],54:[2,57]},{6:[2,52],25:[2,52],26:[2,52],53:320,54:[1,205]},{1:[2,206],6:[2,206],25:[2,206],26:[2,206],49:[2,206],54:[2,206],57:[2,206],73:[2,206],78:[2,206],86:[2,206],91:[2,206],93:[2,206],102:[2,206],104:[2,206],105:[2,206],106:[2,206],110:[2,206],118:[2,206],126:[2,206],129:[2,206],130:[2,206],133:[2,206],134:[2,206],135:[2,206],136:[2,206],137:[2,206],138:[2,206],139:[2,206]},{1:[2,183],6:[2,183],25:[2,183],26:[2,183],49:[2,183],54:[2,183],57:[2,183],73:[2,183],78:[2,183],86:[2,183],91:[2,183],93:[2,183],102:[2,183],104:[2,183],105:[2,183],106:[2,183],110:[2,183],118:[2,183],121:[2,183],126:[2,183],129:[2,183],130:[2,183],133:[2,183],134:[2,183],135:[2,183],136:[2,183],137:[2,183],138:[2,183],139:[2,183]},{1:[2,137],6:[2,137],25:[2,137],26:[2,137],49:[2,137],54:[2,137],57:[2,137],73:[2,137],78:[2,137],86:[2,137],91:[2,137],93:[2,137],102:[2,137],104:[2,137],105:[2,137],106:[2,137],110:[2,137],118:[2,137],126:[2,137],129:[2,137],130:[2,137],133:[2,137],134:[2,137],135:[2,137],136:[2,137],137:[2,137],138:[2,137],139:[2,137]},{1:[2,138],6:[2,138],25:[2,138],26:[2,138],49:[2,138],54:[2,138],57:[2,138],73:[2,138],78:[2,138],86:[2,138],91:[2,138],93:[2,138],98:[2,138],102:[2,138],104:[2,138],105:[2,138],106:[2,138],110:[2,138],118:[2,138],126:[2,138],129:[2,138],130:[2,138],133:[2,138],134:[2,138],135:[2,138],136:[2,138],137:[2,138],138:[2,138],139:[2,138]},{1:[2,139],6:[2,139],25:[2,139],26:[2,139],49:[2,139],54:[2,139],57:[2,139],73:[2,139],78:[2,139],86:[2,139],91:[2,139],93:[2,139],98:[2,139],102:[2,139],104:[2,139],105:[2,139],106:[2,139],110:[2,139],118:[2,139],126:[2,139],129:[2,139],130:[2,139],133:[2,139],134:[2,139],135:[2,139],136:[2,139],137:[2,139],138:[2,139],139:[2,139]},{1:[2,174],6:[2,174],25:[2,174],26:[2,174],49:[2,174],54:[2,174],57:[2,174],73:[2,174],78:[2,174],86:[2,174],91:[2,174],93:[2,174],102:[2,174],104:[2,174],105:[2,174],106:[2,174],110:[2,174],118:[2,174],126:[2,174],129:[2,174],130:[2,174],133:[2,174],134:[2,174],135:[2,174],136:[2,174],137:[2,174],138:[2,174],139:[2,174]},{24:321,25:[1,115]},{26:[1,322]},{6:[1,323],26:[2,180],121:[2,180],123:[2,180]},{7:324,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{1:[2,103],6:[2,103],25:[2,103],26:[2,103],49:[2,103],54:[2,103],57:[2,103],73:[2,103],78:[2,103],86:[2,103],91:[2,103],93:[2,103],102:[2,103],104:[2,103],105:[2,103],106:[2,103],110:[2,103],118:[2,103],126:[2,103],129:[2,103],130:[2,103],133:[2,103],134:[2,103],135:[2,103],136:[2,103],137:[2,103],138:[2,103],139:[2,103]},{1:[2,143],6:[2,143],25:[2,143],26:[2,143],49:[2,143],54:[2,143],57:[2,143],66:[2,143],67:[2,143],68:[2,143],69:[2,143],71:[2,143],73:[2,143],74:[2,143],78:[2,143],84:[2,143],85:[2,143],86:[2,143],91:[2,143],93:[2,143],102:[2,143],104:[2,143],105:[2,143],106:[2,143],110:[2,143],118:[2,143],126:[2,143],129:[2,143],130:[2,143],133:[2,143],134:[2,143],135:[2,143],136:[2,143],137:[2,143],138:[2,143],139:[2,143]},{1:[2,119],6:[2,119],25:[2,119],26:[2,119],49:[2,119],54:[2,119],57:[2,119],66:[2,119],67:[2,119],68:[2,119],69:[2,119],71:[2,119],73:[2,119],74:[2,119],78:[2,119],84:[2,119],85:[2,119],86:[2,119],91:[2,119],93:[2,119],102:[2,119],104:[2,119],105:[2,119],106:[2,119],110:[2,119],118:[2,119],126:[2,119],129:[2,119],130:[2,119],133:[2,119],134:[2,119],135:[2,119],136:[2,119],137:[2,119],138:[2,119],139:[2,119]},{6:[2,126],25:[2,126],26:[2,126],54:[2,126],86:[2,126],91:[2,126]},{6:[2,52],25:[2,52],26:[2,52],53:325,54:[1,232]},{6:[2,127],25:[2,127],26:[2,127],54:[2,127],86:[2,127],91:[2,127]},{1:[2,169],6:[2,169],25:[2,169],26:[2,169],49:[2,169],54:[2,169],57:[2,169],73:[2,169],78:[2,169],86:[2,169],91:[2,169],93:[2,169],102:[2,169],103:84,104:[2,169],105:[2,169],106:[2,169],109:85,110:[2,169],111:68,118:[1,326],126:[2,169],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{1:[2,171],6:[2,171],25:[2,171],26:[2,171],49:[2,171],54:[2,171],57:[2,171],73:[2,171],78:[2,171],86:[2,171],91:[2,171],93:[2,171],102:[2,171],103:84,104:[2,171],105:[1,327],106:[2,171],109:85,110:[2,171],111:68,118:[2,171],126:[2,171],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{1:[2,170],6:[2,170],25:[2,170],26:[2,170],49:[2,170],54:[2,170],57:[2,170],73:[2,170],78:[2,170],86:[2,170],91:[2,170],93:[2,170],102:[2,170],103:84,104:[2,170],105:[2,170],106:[2,170],109:85,110:[2,170],111:68,118:[2,170],126:[2,170],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{6:[2,94],25:[2,94],26:[2,94],54:[2,94],78:[2,94]},{6:[2,52],25:[2,52],26:[2,52],53:328,54:[1,242]},{26:[1,329],103:84,104:[1,64],106:[1,65],109:85,110:[1,67],111:68,126:[1,83],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{6:[1,253],25:[1,254],26:[1,330]},{26:[1,331]},{1:[2,177],6:[2,177],25:[2,177],26:[2,177],49:[2,177],54:[2,177],57:[2,177],73:[2,177],78:[2,177],86:[2,177],91:[2,177],93:[2,177],102:[2,177],104:[2,177],105:[2,177],106:[2,177],110:[2,177],118:[2,177],126:[2,177],129:[2,177],130:[2,177],133:[2,177],134:[2,177],135:[2,177],136:[2,177],137:[2,177],138:[2,177],139:[2,177]},{26:[2,181],121:[2,181],123:[2,181]},{25:[2,133],54:[2,133],103:84,104:[1,64],106:[1,65],109:85,110:[1,67],111:68,126:[1,83],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{6:[1,276],25:[1,277],26:[1,332]},{7:333,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{7:334,8:117,9:18,10:19,11:[1,20],12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:61,28:[1,72],29:48,30:[1,70],31:[1,71],32:22,33:[1,49],34:[1,50],35:[1,51],36:[1,52],37:[1,53],38:[1,54],39:21,44:62,45:[1,44],46:[1,45],47:[1,27],50:28,51:[1,59],52:[1,60],58:46,59:47,61:35,63:23,64:24,65:25,76:[1,69],79:[1,42],83:[1,26],88:[1,57],89:[1,58],90:[1,56],96:[1,37],100:[1,43],101:[1,55],103:38,104:[1,64],106:[1,65],107:39,108:[1,66],109:40,110:[1,67],111:68,119:[1,41],124:36,125:[1,63],127:[1,29],128:[1,30],129:[1,31],130:[1,32],131:[1,33],132:[1,34]},{6:[1,287],25:[1,288],26:[1,335]},{6:[2,40],25:[2,40],26:[2,40],54:[2,40],78:[2,40]},{6:[2,58],25:[2,58],26:[2,58],49:[2,58],54:[2,58]},{1:[2,175],6:[2,175],25:[2,175],26:[2,175],49:[2,175],54:[2,175],57:[2,175],73:[2,175],78:[2,175],86:[2,175],91:[2,175],93:[2,175],102:[2,175],104:[2,175],105:[2,175],106:[2,175],110:[2,175],118:[2,175],126:[2,175],129:[2,175],130:[2,175],133:[2,175],134:[2,175],135:[2,175],136:[2,175],137:[2,175],138:[2,175],139:[2,175]},{6:[2,128],25:[2,128],26:[2,128],54:[2,128],86:[2,128],91:[2,128]},{1:[2,172],6:[2,172],25:[2,172],26:[2,172],49:[2,172],54:[2,172],57:[2,172],73:[2,172],78:[2,172],86:[2,172],91:[2,172],93:[2,172],102:[2,172],103:84,104:[2,172],105:[2,172],106:[2,172],109:85,110:[2,172],111:68,118:[2,172],126:[2,172],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{1:[2,173],6:[2,173],25:[2,173],26:[2,173],49:[2,173],54:[2,173],57:[2,173],73:[2,173],78:[2,173],86:[2,173],91:[2,173],93:[2,173],102:[2,173],103:84,104:[2,173],105:[2,173],106:[2,173],109:85,110:[2,173],111:68,118:[2,173],126:[2,173],129:[1,76],130:[1,75],133:[1,74],134:[1,77],135:[1,78],136:[1,79],137:[1,80],138:[1,81],139:[1,82]},{6:[2,95],25:[2,95],26:[2,95],54:[2,95],78:[2,95]}], +defaultActions: {59:[2,50],60:[2,51],91:[2,109],192:[2,89]}, +parseError: function parseError(str, hash) { + if (hash.recoverable) { + this.trace(str); + } else { + throw new Error(str); + } +}, +parse: function parse(input) { + var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = '', yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1; + var args = lstack.slice.call(arguments, 1); + this.lexer.setInput(input); + this.lexer.yy = this.yy; + this.yy.lexer = this.lexer; + this.yy.parser = this; + if (typeof this.lexer.yylloc == 'undefined') { + this.lexer.yylloc = {}; + } + var yyloc = this.lexer.yylloc; + lstack.push(yyloc); + var ranges = this.lexer.options && this.lexer.options.ranges; + if (typeof this.yy.parseError === 'function') { + this.parseError = this.yy.parseError; + } else { + this.parseError = Object.getPrototypeOf(this).parseError; + } + function popStack(n) { + stack.length = stack.length - 2 * n; + vstack.length = vstack.length - n; + lstack.length = lstack.length - n; + } + function lex() { + var token; + token = self.lexer.lex() || EOF; + if (typeof token !== 'number') { + token = self.symbols_[token] || token; + } + return token; + } + var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected; + while (true) { + state = stack[stack.length - 1]; + if (this.defaultActions[state]) { + action = this.defaultActions[state]; + } else { + if (symbol === null || typeof symbol == 'undefined') { + symbol = lex(); + } + action = table[state] && table[state][symbol]; + } + if (typeof action === 'undefined' || !action.length || !action[0]) { + var errStr = ''; + expected = []; + for (p in table[state]) { + if (this.terminals_[p] && p > TERROR) { + expected.push('\'' + this.terminals_[p] + '\''); + } + } + if (this.lexer.showPosition) { + errStr = 'Parse error on line ' + (yylineno + 1) + ':\n' + this.lexer.showPosition() + '\nExpecting ' + expected.join(', ') + ', got \'' + (this.terminals_[symbol] || symbol) + '\''; + } else { + errStr = 'Parse error on line ' + (yylineno + 1) + ': Unexpected ' + (symbol == EOF ? 'end of input' : '\'' + (this.terminals_[symbol] || symbol) + '\''); + } + this.parseError(errStr, { + text: this.lexer.match, + token: this.terminals_[symbol] || symbol, + line: this.lexer.yylineno, + loc: yyloc, + expected: expected + }); + } + if (action[0] instanceof Array && action.length > 1) { + throw new Error('Parse Error: multiple actions possible at state: ' + state + ', token: ' + symbol); + } + switch (action[0]) { + case 1: + stack.push(symbol); + vstack.push(this.lexer.yytext); + lstack.push(this.lexer.yylloc); + stack.push(action[1]); + symbol = null; + if (!preErrorSymbol) { + yyleng = this.lexer.yyleng; + yytext = this.lexer.yytext; + yylineno = this.lexer.yylineno; + yyloc = this.lexer.yylloc; + if (recovering > 0) { + recovering--; + } + } else { + symbol = preErrorSymbol; + preErrorSymbol = null; + } + break; + case 2: + len = this.productions_[action[1]][1]; + yyval.$ = vstack[vstack.length - len]; + yyval._$ = { + first_line: lstack[lstack.length - (len || 1)].first_line, + last_line: lstack[lstack.length - 1].last_line, + first_column: lstack[lstack.length - (len || 1)].first_column, + last_column: lstack[lstack.length - 1].last_column + }; + if (ranges) { + yyval._$.range = [ + lstack[lstack.length - (len || 1)].range[0], + lstack[lstack.length - 1].range[1] + ]; + } + r = this.performAction.apply(yyval, [ + yytext, + yyleng, + yylineno, + this.yy, + action[1], + vstack, + lstack + ].concat(args)); + if (typeof r !== 'undefined') { + return r; + } + if (len) { + stack = stack.slice(0, -1 * len * 2); + vstack = vstack.slice(0, -1 * len); + lstack = lstack.slice(0, -1 * len); + } + stack.push(this.productions_[action[1]][0]); + vstack.push(yyval.$); + lstack.push(yyval._$); + newState = table[stack[stack.length - 2]][stack[stack.length - 1]]; + stack.push(newState); + break; + case 3: + return true; + } + } + return true; +}}; + +function Parser () { + this.yy = {}; +} +Parser.prototype = parser;parser.Parser = Parser; +return new Parser; +})(); + + +if (typeof require !== 'undefined' && typeof exports !== 'undefined') { +exports.parser = parser; +exports.Parser = parser.Parser; +exports.parse = function () { return parser.parse.apply(parser, arguments); }; +exports.main = function commonjsMain(args) { + if (!args[1]) { + console.log('Usage: '+args[0]+' FILE'); + process.exit(1); + } + var source = require('fs').readFileSync(require('path').normalize(args[1]), "utf8"); + return exports.parser.parse(source); +}; +if (typeof module !== 'undefined' && require.main === module) { + exports.main(process.argv.slice(1)); +} +} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/register.js b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/register.js new file mode 100644 index 00000000..6e4ab041 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/register.js @@ -0,0 +1,66 @@ +// Generated by CoffeeScript 1.7.1 +(function() { + var CoffeeScript, Module, binary, child_process, ext, findExtension, fork, helpers, loadFile, path, _i, _len, _ref; + + CoffeeScript = require('./coffee-script'); + + child_process = require('child_process'); + + helpers = require('./helpers'); + + path = require('path'); + + loadFile = function(module, filename) { + var answer; + answer = CoffeeScript._compileFile(filename, false); + return module._compile(answer, filename); + }; + + if (require.extensions) { + _ref = CoffeeScript.FILE_EXTENSIONS; + for (_i = 0, _len = _ref.length; _i < _len; _i++) { + ext = _ref[_i]; + require.extensions[ext] = loadFile; + } + Module = require('module'); + findExtension = function(filename) { + var curExtension, extensions; + extensions = path.basename(filename).split('.'); + if (extensions[0] === '') { + extensions.shift(); + } + while (extensions.shift()) { + curExtension = '.' + extensions.join('.'); + if (Module._extensions[curExtension]) { + return curExtension; + } + } + return '.js'; + }; + Module.prototype.load = function(filename) { + var extension; + this.filename = filename; + this.paths = Module._nodeModulePaths(path.dirname(filename)); + extension = findExtension(filename); + Module._extensions[extension](this, filename); + return this.loaded = true; + }; + } + + if (child_process) { + fork = child_process.fork; + binary = require.resolve('../../bin/coffee'); + child_process.fork = function(path, args, options) { + if (helpers.isCoffee(path)) { + if (!Array.isArray(args)) { + options = args || {}; + args = []; + } + args = [path].concat(args); + path = binary; + } + return fork(path, args, options); + }; + } + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/repl.js b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/repl.js new file mode 100644 index 00000000..378fc3a5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/repl.js @@ -0,0 +1,163 @@ +// Generated by CoffeeScript 1.7.1 +(function() { + var CoffeeScript, addHistory, addMultilineHandler, fs, merge, nodeREPL, path, replDefaults, updateSyntaxError, vm, _ref; + + fs = require('fs'); + + path = require('path'); + + vm = require('vm'); + + nodeREPL = require('repl'); + + CoffeeScript = require('./coffee-script'); + + _ref = require('./helpers'), merge = _ref.merge, updateSyntaxError = _ref.updateSyntaxError; + + replDefaults = { + prompt: 'coffee> ', + historyFile: process.env.HOME ? path.join(process.env.HOME, '.coffee_history') : void 0, + historyMaxInputSize: 10240, + "eval": function(input, context, filename, cb) { + var Assign, Block, Literal, Value, ast, err, js, result, _ref1; + input = input.replace(/\uFF00/g, '\n'); + input = input.replace(/^\(([\s\S]*)\n\)$/m, '$1'); + _ref1 = require('./nodes'), Block = _ref1.Block, Assign = _ref1.Assign, Value = _ref1.Value, Literal = _ref1.Literal; + try { + ast = CoffeeScript.nodes(input); + ast = new Block([new Assign(new Value(new Literal('_')), ast, '=')]); + js = ast.compile({ + bare: true, + locals: Object.keys(context) + }); + result = context === global ? vm.runInThisContext(js, filename) : vm.runInContext(js, context, filename); + return cb(null, result); + } catch (_error) { + err = _error; + updateSyntaxError(err, input); + return cb(err); + } + } + }; + + addMultilineHandler = function(repl) { + var inputStream, multiline, nodeLineListener, outputStream, rli; + rli = repl.rli, inputStream = repl.inputStream, outputStream = repl.outputStream; + multiline = { + enabled: false, + initialPrompt: repl.prompt.replace(/^[^> ]*/, function(x) { + return x.replace(/./g, '-'); + }), + prompt: repl.prompt.replace(/^[^> ]*>?/, function(x) { + return x.replace(/./g, '.'); + }), + buffer: '' + }; + nodeLineListener = rli.listeners('line')[0]; + rli.removeListener('line', nodeLineListener); + rli.on('line', function(cmd) { + if (multiline.enabled) { + multiline.buffer += "" + cmd + "\n"; + rli.setPrompt(multiline.prompt); + rli.prompt(true); + } else { + nodeLineListener(cmd); + } + }); + return inputStream.on('keypress', function(char, key) { + if (!(key && key.ctrl && !key.meta && !key.shift && key.name === 'v')) { + return; + } + if (multiline.enabled) { + if (!multiline.buffer.match(/\n/)) { + multiline.enabled = !multiline.enabled; + rli.setPrompt(repl.prompt); + rli.prompt(true); + return; + } + if ((rli.line != null) && !rli.line.match(/^\s*$/)) { + return; + } + multiline.enabled = !multiline.enabled; + rli.line = ''; + rli.cursor = 0; + rli.output.cursorTo(0); + rli.output.clearLine(1); + multiline.buffer = multiline.buffer.replace(/\n/g, '\uFF00'); + rli.emit('line', multiline.buffer); + multiline.buffer = ''; + } else { + multiline.enabled = !multiline.enabled; + rli.setPrompt(multiline.initialPrompt); + rli.prompt(true); + } + }); + }; + + addHistory = function(repl, filename, maxSize) { + var buffer, fd, lastLine, readFd, size, stat; + lastLine = null; + try { + stat = fs.statSync(filename); + size = Math.min(maxSize, stat.size); + readFd = fs.openSync(filename, 'r'); + buffer = new Buffer(size); + fs.readSync(readFd, buffer, 0, size, stat.size - size); + repl.rli.history = buffer.toString().split('\n').reverse(); + if (stat.size > maxSize) { + repl.rli.history.pop(); + } + if (repl.rli.history[0] === '') { + repl.rli.history.shift(); + } + repl.rli.historyIndex = -1; + lastLine = repl.rli.history[0]; + } catch (_error) {} + fd = fs.openSync(filename, 'a'); + repl.rli.addListener('line', function(code) { + if (code && code.length && code !== '.history' && lastLine !== code) { + fs.write(fd, "" + code + "\n"); + return lastLine = code; + } + }); + repl.rli.on('exit', function() { + return fs.close(fd); + }); + return repl.commands['.history'] = { + help: 'Show command history', + action: function() { + repl.outputStream.write("" + (repl.rli.history.slice(0).reverse().join('\n')) + "\n"); + return repl.displayPrompt(); + } + }; + }; + + module.exports = { + start: function(opts) { + var build, major, minor, repl, _ref1; + if (opts == null) { + opts = {}; + } + _ref1 = process.versions.node.split('.').map(function(n) { + return parseInt(n); + }), major = _ref1[0], minor = _ref1[1], build = _ref1[2]; + if (major === 0 && minor < 8) { + console.warn("Node 0.8.0+ required for CoffeeScript REPL"); + process.exit(1); + } + CoffeeScript.register(); + process.argv = ['coffee'].concat(process.argv.slice(2)); + opts = merge(replDefaults, opts); + repl = nodeREPL.start(opts); + repl.on('exit', function() { + return repl.outputStream.write('\n'); + }); + addMultilineHandler(repl); + if (opts.historyFile) { + addHistory(repl, opts.historyFile, opts.historyMaxInputSize); + } + return repl; + } + }; + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/rewriter.js b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/rewriter.js new file mode 100644 index 00000000..176243f2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/rewriter.js @@ -0,0 +1,475 @@ +// Generated by CoffeeScript 1.7.1 +(function() { + var BALANCED_PAIRS, CALL_CLOSERS, EXPRESSION_CLOSE, EXPRESSION_END, EXPRESSION_START, IMPLICIT_CALL, IMPLICIT_END, IMPLICIT_FUNC, IMPLICIT_UNSPACED_CALL, INVERSES, LINEBREAKS, SINGLE_CLOSERS, SINGLE_LINERS, generate, left, rite, _i, _len, _ref, + __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }, + __slice = [].slice; + + generate = function(tag, value, origin) { + var tok; + tok = [tag, value]; + tok.generated = true; + if (origin) { + tok.origin = origin; + } + return tok; + }; + + exports.Rewriter = (function() { + function Rewriter() {} + + Rewriter.prototype.rewrite = function(tokens) { + this.tokens = tokens; + this.removeLeadingNewlines(); + this.closeOpenCalls(); + this.closeOpenIndexes(); + this.normalizeLines(); + this.tagPostfixConditionals(); + this.addImplicitBracesAndParens(); + this.addLocationDataToGeneratedTokens(); + return this.tokens; + }; + + Rewriter.prototype.scanTokens = function(block) { + var i, token, tokens; + tokens = this.tokens; + i = 0; + while (token = tokens[i]) { + i += block.call(this, token, i, tokens); + } + return true; + }; + + Rewriter.prototype.detectEnd = function(i, condition, action) { + var levels, token, tokens, _ref, _ref1; + tokens = this.tokens; + levels = 0; + while (token = tokens[i]) { + if (levels === 0 && condition.call(this, token, i)) { + return action.call(this, token, i); + } + if (!token || levels < 0) { + return action.call(this, token, i - 1); + } + if (_ref = token[0], __indexOf.call(EXPRESSION_START, _ref) >= 0) { + levels += 1; + } else if (_ref1 = token[0], __indexOf.call(EXPRESSION_END, _ref1) >= 0) { + levels -= 1; + } + i += 1; + } + return i - 1; + }; + + Rewriter.prototype.removeLeadingNewlines = function() { + var i, tag, _i, _len, _ref; + _ref = this.tokens; + for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) { + tag = _ref[i][0]; + if (tag !== 'TERMINATOR') { + break; + } + } + if (i) { + return this.tokens.splice(0, i); + } + }; + + Rewriter.prototype.closeOpenCalls = function() { + var action, condition; + condition = function(token, i) { + var _ref; + return ((_ref = token[0]) === ')' || _ref === 'CALL_END') || token[0] === 'OUTDENT' && this.tag(i - 1) === ')'; + }; + action = function(token, i) { + return this.tokens[token[0] === 'OUTDENT' ? i - 1 : i][0] = 'CALL_END'; + }; + return this.scanTokens(function(token, i) { + if (token[0] === 'CALL_START') { + this.detectEnd(i + 1, condition, action); + } + return 1; + }); + }; + + Rewriter.prototype.closeOpenIndexes = function() { + var action, condition; + condition = function(token, i) { + var _ref; + return (_ref = token[0]) === ']' || _ref === 'INDEX_END'; + }; + action = function(token, i) { + return token[0] = 'INDEX_END'; + }; + return this.scanTokens(function(token, i) { + if (token[0] === 'INDEX_START') { + this.detectEnd(i + 1, condition, action); + } + return 1; + }); + }; + + Rewriter.prototype.matchTags = function() { + var fuzz, i, j, pattern, _i, _ref, _ref1; + i = arguments[0], pattern = 2 <= arguments.length ? __slice.call(arguments, 1) : []; + fuzz = 0; + for (j = _i = 0, _ref = pattern.length; 0 <= _ref ? _i < _ref : _i > _ref; j = 0 <= _ref ? ++_i : --_i) { + while (this.tag(i + j + fuzz) === 'HERECOMMENT') { + fuzz += 2; + } + if (pattern[j] == null) { + continue; + } + if (typeof pattern[j] === 'string') { + pattern[j] = [pattern[j]]; + } + if (_ref1 = this.tag(i + j + fuzz), __indexOf.call(pattern[j], _ref1) < 0) { + return false; + } + } + return true; + }; + + Rewriter.prototype.looksObjectish = function(j) { + return this.matchTags(j, '@', null, ':') || this.matchTags(j, null, ':'); + }; + + Rewriter.prototype.findTagsBackwards = function(i, tags) { + var backStack, _ref, _ref1, _ref2, _ref3, _ref4, _ref5; + backStack = []; + while (i >= 0 && (backStack.length || (_ref2 = this.tag(i), __indexOf.call(tags, _ref2) < 0) && ((_ref3 = this.tag(i), __indexOf.call(EXPRESSION_START, _ref3) < 0) || this.tokens[i].generated) && (_ref4 = this.tag(i), __indexOf.call(LINEBREAKS, _ref4) < 0))) { + if (_ref = this.tag(i), __indexOf.call(EXPRESSION_END, _ref) >= 0) { + backStack.push(this.tag(i)); + } + if ((_ref1 = this.tag(i), __indexOf.call(EXPRESSION_START, _ref1) >= 0) && backStack.length) { + backStack.pop(); + } + i -= 1; + } + return _ref5 = this.tag(i), __indexOf.call(tags, _ref5) >= 0; + }; + + Rewriter.prototype.addImplicitBracesAndParens = function() { + var stack; + stack = []; + return this.scanTokens(function(token, i, tokens) { + var endImplicitCall, endImplicitObject, forward, inImplicit, inImplicitCall, inImplicitControl, inImplicitObject, newLine, nextTag, offset, prevTag, prevToken, s, sameLine, stackIdx, stackTag, stackTop, startIdx, startImplicitCall, startImplicitObject, startsLine, tag, _ref, _ref1, _ref2, _ref3, _ref4, _ref5; + tag = token[0]; + prevTag = (prevToken = i > 0 ? tokens[i - 1] : [])[0]; + nextTag = (i < tokens.length - 1 ? tokens[i + 1] : [])[0]; + stackTop = function() { + return stack[stack.length - 1]; + }; + startIdx = i; + forward = function(n) { + return i - startIdx + n; + }; + inImplicit = function() { + var _ref, _ref1; + return (_ref = stackTop()) != null ? (_ref1 = _ref[2]) != null ? _ref1.ours : void 0 : void 0; + }; + inImplicitCall = function() { + var _ref; + return inImplicit() && ((_ref = stackTop()) != null ? _ref[0] : void 0) === '('; + }; + inImplicitObject = function() { + var _ref; + return inImplicit() && ((_ref = stackTop()) != null ? _ref[0] : void 0) === '{'; + }; + inImplicitControl = function() { + var _ref; + return inImplicit && ((_ref = stackTop()) != null ? _ref[0] : void 0) === 'CONTROL'; + }; + startImplicitCall = function(j) { + var idx; + idx = j != null ? j : i; + stack.push([ + '(', idx, { + ours: true + } + ]); + tokens.splice(idx, 0, generate('CALL_START', '(')); + if (j == null) { + return i += 1; + } + }; + endImplicitCall = function() { + stack.pop(); + tokens.splice(i, 0, generate('CALL_END', ')')); + return i += 1; + }; + startImplicitObject = function(j, startsLine) { + var idx; + if (startsLine == null) { + startsLine = true; + } + idx = j != null ? j : i; + stack.push([ + '{', idx, { + sameLine: true, + startsLine: startsLine, + ours: true + } + ]); + tokens.splice(idx, 0, generate('{', generate(new String('{')), token)); + if (j == null) { + return i += 1; + } + }; + endImplicitObject = function(j) { + j = j != null ? j : i; + stack.pop(); + tokens.splice(j, 0, generate('}', '}', token)); + return i += 1; + }; + if (inImplicitCall() && (tag === 'IF' || tag === 'TRY' || tag === 'FINALLY' || tag === 'CATCH' || tag === 'CLASS' || tag === 'SWITCH')) { + stack.push([ + 'CONTROL', i, { + ours: true + } + ]); + return forward(1); + } + if (tag === 'INDENT' && inImplicit()) { + if (prevTag !== '=>' && prevTag !== '->' && prevTag !== '[' && prevTag !== '(' && prevTag !== ',' && prevTag !== '{' && prevTag !== 'TRY' && prevTag !== 'ELSE' && prevTag !== '=') { + while (inImplicitCall()) { + endImplicitCall(); + } + } + if (inImplicitControl()) { + stack.pop(); + } + stack.push([tag, i]); + return forward(1); + } + if (__indexOf.call(EXPRESSION_START, tag) >= 0) { + stack.push([tag, i]); + return forward(1); + } + if (__indexOf.call(EXPRESSION_END, tag) >= 0) { + while (inImplicit()) { + if (inImplicitCall()) { + endImplicitCall(); + } else if (inImplicitObject()) { + endImplicitObject(); + } else { + stack.pop(); + } + } + stack.pop(); + } + if ((__indexOf.call(IMPLICIT_FUNC, tag) >= 0 && token.spaced && !token.stringEnd || tag === '?' && i > 0 && !tokens[i - 1].spaced) && (__indexOf.call(IMPLICIT_CALL, nextTag) >= 0 || __indexOf.call(IMPLICIT_UNSPACED_CALL, nextTag) >= 0 && !((_ref = tokens[i + 1]) != null ? _ref.spaced : void 0) && !((_ref1 = tokens[i + 1]) != null ? _ref1.newLine : void 0))) { + if (tag === '?') { + tag = token[0] = 'FUNC_EXIST'; + } + startImplicitCall(i + 1); + return forward(2); + } + if (__indexOf.call(IMPLICIT_FUNC, tag) >= 0 && this.matchTags(i + 1, 'INDENT', null, ':') && !this.findTagsBackwards(i, ['CLASS', 'EXTENDS', 'IF', 'CATCH', 'SWITCH', 'LEADING_WHEN', 'FOR', 'WHILE', 'UNTIL'])) { + startImplicitCall(i + 1); + stack.push(['INDENT', i + 2]); + return forward(3); + } + if (tag === ':') { + if (this.tag(i - 2) === '@') { + s = i - 2; + } else { + s = i - 1; + } + while (this.tag(s - 2) === 'HERECOMMENT') { + s -= 2; + } + this.insideForDeclaration = nextTag === 'FOR'; + startsLine = s === 0 || (_ref2 = this.tag(s - 1), __indexOf.call(LINEBREAKS, _ref2) >= 0) || tokens[s - 1].newLine; + if (stackTop()) { + _ref3 = stackTop(), stackTag = _ref3[0], stackIdx = _ref3[1]; + if ((stackTag === '{' || stackTag === 'INDENT' && this.tag(stackIdx - 1) === '{') && (startsLine || this.tag(s - 1) === ',' || this.tag(s - 1) === '{')) { + return forward(1); + } + } + startImplicitObject(s, !!startsLine); + return forward(2); + } + if (inImplicitObject() && __indexOf.call(LINEBREAKS, tag) >= 0) { + stackTop()[2].sameLine = false; + } + newLine = prevTag === 'OUTDENT' || prevToken.newLine; + if (__indexOf.call(IMPLICIT_END, tag) >= 0 || __indexOf.call(CALL_CLOSERS, tag) >= 0 && newLine) { + while (inImplicit()) { + _ref4 = stackTop(), stackTag = _ref4[0], stackIdx = _ref4[1], (_ref5 = _ref4[2], sameLine = _ref5.sameLine, startsLine = _ref5.startsLine); + if (inImplicitCall() && prevTag !== ',') { + endImplicitCall(); + } else if (inImplicitObject() && !this.insideForDeclaration && sameLine && tag !== 'TERMINATOR' && prevTag !== ':' && endImplicitObject()) { + + } else if (inImplicitObject() && tag === 'TERMINATOR' && prevTag !== ',' && !(startsLine && this.looksObjectish(i + 1))) { + endImplicitObject(); + } else { + break; + } + } + } + if (tag === ',' && !this.looksObjectish(i + 1) && inImplicitObject() && !this.insideForDeclaration && (nextTag !== 'TERMINATOR' || !this.looksObjectish(i + 2))) { + offset = nextTag === 'OUTDENT' ? 1 : 0; + while (inImplicitObject()) { + endImplicitObject(i + offset); + } + } + return forward(1); + }); + }; + + Rewriter.prototype.addLocationDataToGeneratedTokens = function() { + return this.scanTokens(function(token, i, tokens) { + var column, line, nextLocation, prevLocation, _ref, _ref1; + if (token[2]) { + return 1; + } + if (!(token.generated || token.explicit)) { + return 1; + } + if (token[0] === '{' && (nextLocation = (_ref = tokens[i + 1]) != null ? _ref[2] : void 0)) { + line = nextLocation.first_line, column = nextLocation.first_column; + } else if (prevLocation = (_ref1 = tokens[i - 1]) != null ? _ref1[2] : void 0) { + line = prevLocation.last_line, column = prevLocation.last_column; + } else { + line = column = 0; + } + token[2] = { + first_line: line, + first_column: column, + last_line: line, + last_column: column + }; + return 1; + }); + }; + + Rewriter.prototype.normalizeLines = function() { + var action, condition, indent, outdent, starter; + starter = indent = outdent = null; + condition = function(token, i) { + var _ref, _ref1, _ref2, _ref3; + return token[1] !== ';' && (_ref = token[0], __indexOf.call(SINGLE_CLOSERS, _ref) >= 0) && !(token[0] === 'TERMINATOR' && (_ref1 = this.tag(i + 1), __indexOf.call(EXPRESSION_CLOSE, _ref1) >= 0)) && !(token[0] === 'ELSE' && starter !== 'THEN') && !(((_ref2 = token[0]) === 'CATCH' || _ref2 === 'FINALLY') && (starter === '->' || starter === '=>')) || (_ref3 = token[0], __indexOf.call(CALL_CLOSERS, _ref3) >= 0) && this.tokens[i - 1].newLine; + }; + action = function(token, i) { + return this.tokens.splice((this.tag(i - 1) === ',' ? i - 1 : i), 0, outdent); + }; + return this.scanTokens(function(token, i, tokens) { + var j, tag, _i, _ref, _ref1, _ref2; + tag = token[0]; + if (tag === 'TERMINATOR') { + if (this.tag(i + 1) === 'ELSE' && this.tag(i - 1) !== 'OUTDENT') { + tokens.splice.apply(tokens, [i, 1].concat(__slice.call(this.indentation()))); + return 1; + } + if (_ref = this.tag(i + 1), __indexOf.call(EXPRESSION_CLOSE, _ref) >= 0) { + tokens.splice(i, 1); + return 0; + } + } + if (tag === 'CATCH') { + for (j = _i = 1; _i <= 2; j = ++_i) { + if (!((_ref1 = this.tag(i + j)) === 'OUTDENT' || _ref1 === 'TERMINATOR' || _ref1 === 'FINALLY')) { + continue; + } + tokens.splice.apply(tokens, [i + j, 0].concat(__slice.call(this.indentation()))); + return 2 + j; + } + } + if (__indexOf.call(SINGLE_LINERS, tag) >= 0 && this.tag(i + 1) !== 'INDENT' && !(tag === 'ELSE' && this.tag(i + 1) === 'IF')) { + starter = tag; + _ref2 = this.indentation(tokens[i]), indent = _ref2[0], outdent = _ref2[1]; + if (starter === 'THEN') { + indent.fromThen = true; + } + tokens.splice(i + 1, 0, indent); + this.detectEnd(i + 2, condition, action); + if (tag === 'THEN') { + tokens.splice(i, 1); + } + return 1; + } + return 1; + }); + }; + + Rewriter.prototype.tagPostfixConditionals = function() { + var action, condition, original; + original = null; + condition = function(token, i) { + var prevTag, tag; + tag = token[0]; + prevTag = this.tokens[i - 1][0]; + return tag === 'TERMINATOR' || (tag === 'INDENT' && __indexOf.call(SINGLE_LINERS, prevTag) < 0); + }; + action = function(token, i) { + if (token[0] !== 'INDENT' || (token.generated && !token.fromThen)) { + return original[0] = 'POST_' + original[0]; + } + }; + return this.scanTokens(function(token, i) { + if (token[0] !== 'IF') { + return 1; + } + original = token; + this.detectEnd(i + 1, condition, action); + return 1; + }); + }; + + Rewriter.prototype.indentation = function(origin) { + var indent, outdent; + indent = ['INDENT', 2]; + outdent = ['OUTDENT', 2]; + if (origin) { + indent.generated = outdent.generated = true; + indent.origin = outdent.origin = origin; + } else { + indent.explicit = outdent.explicit = true; + } + return [indent, outdent]; + }; + + Rewriter.prototype.generate = generate; + + Rewriter.prototype.tag = function(i) { + var _ref; + return (_ref = this.tokens[i]) != null ? _ref[0] : void 0; + }; + + return Rewriter; + + })(); + + BALANCED_PAIRS = [['(', ')'], ['[', ']'], ['{', '}'], ['INDENT', 'OUTDENT'], ['CALL_START', 'CALL_END'], ['PARAM_START', 'PARAM_END'], ['INDEX_START', 'INDEX_END']]; + + exports.INVERSES = INVERSES = {}; + + EXPRESSION_START = []; + + EXPRESSION_END = []; + + for (_i = 0, _len = BALANCED_PAIRS.length; _i < _len; _i++) { + _ref = BALANCED_PAIRS[_i], left = _ref[0], rite = _ref[1]; + EXPRESSION_START.push(INVERSES[rite] = left); + EXPRESSION_END.push(INVERSES[left] = rite); + } + + EXPRESSION_CLOSE = ['CATCH', 'THEN', 'ELSE', 'FINALLY'].concat(EXPRESSION_END); + + IMPLICIT_FUNC = ['IDENTIFIER', 'SUPER', ')', 'CALL_END', ']', 'INDEX_END', '@', 'THIS']; + + IMPLICIT_CALL = ['IDENTIFIER', 'NUMBER', 'STRING', 'JS', 'REGEX', 'NEW', 'PARAM_START', 'CLASS', 'IF', 'TRY', 'SWITCH', 'THIS', 'BOOL', 'NULL', 'UNDEFINED', 'UNARY', 'UNARY_MATH', 'SUPER', 'THROW', '@', '->', '=>', '[', '(', '{', '--', '++']; + + IMPLICIT_UNSPACED_CALL = ['+', '-']; + + IMPLICIT_END = ['POST_IF', 'FOR', 'WHILE', 'UNTIL', 'WHEN', 'BY', 'LOOP', 'TERMINATOR']; + + SINGLE_LINERS = ['ELSE', '->', '=>', 'TRY', 'FINALLY', 'THEN']; + + SINGLE_CLOSERS = ['TERMINATOR', 'CATCH', 'FINALLY', 'ELSE', 'OUTDENT', 'LEADING_WHEN']; + + LINEBREAKS = ['TERMINATOR', 'INDENT', 'OUTDENT']; + + CALL_CLOSERS = ['.', '?.', '::', '?::']; + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/scope.js b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/scope.js new file mode 100644 index 00000000..b371b903 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/scope.js @@ -0,0 +1,146 @@ +// Generated by CoffeeScript 1.7.1 +(function() { + var Scope, extend, last, _ref; + + _ref = require('./helpers'), extend = _ref.extend, last = _ref.last; + + exports.Scope = Scope = (function() { + Scope.root = null; + + function Scope(parent, expressions, method) { + this.parent = parent; + this.expressions = expressions; + this.method = method; + this.variables = [ + { + name: 'arguments', + type: 'arguments' + } + ]; + this.positions = {}; + if (!this.parent) { + Scope.root = this; + } + } + + Scope.prototype.add = function(name, type, immediate) { + if (this.shared && !immediate) { + return this.parent.add(name, type, immediate); + } + if (Object.prototype.hasOwnProperty.call(this.positions, name)) { + return this.variables[this.positions[name]].type = type; + } else { + return this.positions[name] = this.variables.push({ + name: name, + type: type + }) - 1; + } + }; + + Scope.prototype.namedMethod = function() { + var _ref1; + if (((_ref1 = this.method) != null ? _ref1.name : void 0) || !this.parent) { + return this.method; + } + return this.parent.namedMethod(); + }; + + Scope.prototype.find = function(name) { + if (this.check(name)) { + return true; + } + this.add(name, 'var'); + return false; + }; + + Scope.prototype.parameter = function(name) { + if (this.shared && this.parent.check(name, true)) { + return; + } + return this.add(name, 'param'); + }; + + Scope.prototype.check = function(name) { + var _ref1; + return !!(this.type(name) || ((_ref1 = this.parent) != null ? _ref1.check(name) : void 0)); + }; + + Scope.prototype.temporary = function(name, index) { + if (name.length > 1) { + return '_' + name + (index > 1 ? index - 1 : ''); + } else { + return '_' + (index + parseInt(name, 36)).toString(36).replace(/\d/g, 'a'); + } + }; + + Scope.prototype.type = function(name) { + var v, _i, _len, _ref1; + _ref1 = this.variables; + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + v = _ref1[_i]; + if (v.name === name) { + return v.type; + } + } + return null; + }; + + Scope.prototype.freeVariable = function(name, reserve) { + var index, temp; + if (reserve == null) { + reserve = true; + } + index = 0; + while (this.check((temp = this.temporary(name, index)))) { + index++; + } + if (reserve) { + this.add(temp, 'var', true); + } + return temp; + }; + + Scope.prototype.assign = function(name, value) { + this.add(name, { + value: value, + assigned: true + }, true); + return this.hasAssignments = true; + }; + + Scope.prototype.hasDeclarations = function() { + return !!this.declaredVariables().length; + }; + + Scope.prototype.declaredVariables = function() { + var realVars, tempVars, v, _i, _len, _ref1; + realVars = []; + tempVars = []; + _ref1 = this.variables; + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + v = _ref1[_i]; + if (v.type === 'var') { + (v.name.charAt(0) === '_' ? tempVars : realVars).push(v.name); + } + } + return realVars.sort().concat(tempVars.sort()); + }; + + Scope.prototype.assignedVariables = function() { + var v, _i, _len, _ref1, _results; + _ref1 = this.variables; + _results = []; + for (_i = 0, _len = _ref1.length; _i < _len; _i++) { + v = _ref1[_i]; + if (v.type.assigned) { + _results.push("" + v.name + " = " + v.type.value); + } + } + return _results; + }; + + return Scope; + + })(); + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/sourcemap.js b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/sourcemap.js new file mode 100644 index 00000000..829e759c --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/lib/coffee-script/sourcemap.js @@ -0,0 +1,161 @@ +// Generated by CoffeeScript 1.7.1 +(function() { + var LineMap, SourceMap; + + LineMap = (function() { + function LineMap(line) { + this.line = line; + this.columns = []; + } + + LineMap.prototype.add = function(column, _arg, options) { + var sourceColumn, sourceLine; + sourceLine = _arg[0], sourceColumn = _arg[1]; + if (options == null) { + options = {}; + } + if (this.columns[column] && options.noReplace) { + return; + } + return this.columns[column] = { + line: this.line, + column: column, + sourceLine: sourceLine, + sourceColumn: sourceColumn + }; + }; + + LineMap.prototype.sourceLocation = function(column) { + var mapping; + while (!((mapping = this.columns[column]) || (column <= 0))) { + column--; + } + return mapping && [mapping.sourceLine, mapping.sourceColumn]; + }; + + return LineMap; + + })(); + + SourceMap = (function() { + var BASE64_CHARS, VLQ_CONTINUATION_BIT, VLQ_SHIFT, VLQ_VALUE_MASK; + + function SourceMap() { + this.lines = []; + } + + SourceMap.prototype.add = function(sourceLocation, generatedLocation, options) { + var column, line, lineMap, _base; + if (options == null) { + options = {}; + } + line = generatedLocation[0], column = generatedLocation[1]; + lineMap = ((_base = this.lines)[line] || (_base[line] = new LineMap(line))); + return lineMap.add(column, sourceLocation, options); + }; + + SourceMap.prototype.sourceLocation = function(_arg) { + var column, line, lineMap; + line = _arg[0], column = _arg[1]; + while (!((lineMap = this.lines[line]) || (line <= 0))) { + line--; + } + return lineMap && lineMap.sourceLocation(column); + }; + + SourceMap.prototype.generate = function(options, code) { + var buffer, lastColumn, lastSourceColumn, lastSourceLine, lineMap, lineNumber, mapping, needComma, v3, writingline, _i, _j, _len, _len1, _ref, _ref1; + if (options == null) { + options = {}; + } + if (code == null) { + code = null; + } + writingline = 0; + lastColumn = 0; + lastSourceLine = 0; + lastSourceColumn = 0; + needComma = false; + buffer = ""; + _ref = this.lines; + for (lineNumber = _i = 0, _len = _ref.length; _i < _len; lineNumber = ++_i) { + lineMap = _ref[lineNumber]; + if (lineMap) { + _ref1 = lineMap.columns; + for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) { + mapping = _ref1[_j]; + if (!(mapping)) { + continue; + } + while (writingline < mapping.line) { + lastColumn = 0; + needComma = false; + buffer += ";"; + writingline++; + } + if (needComma) { + buffer += ","; + needComma = false; + } + buffer += this.encodeVlq(mapping.column - lastColumn); + lastColumn = mapping.column; + buffer += this.encodeVlq(0); + buffer += this.encodeVlq(mapping.sourceLine - lastSourceLine); + lastSourceLine = mapping.sourceLine; + buffer += this.encodeVlq(mapping.sourceColumn - lastSourceColumn); + lastSourceColumn = mapping.sourceColumn; + needComma = true; + } + } + } + v3 = { + version: 3, + file: options.generatedFile || '', + sourceRoot: options.sourceRoot || '', + sources: options.sourceFiles || [''], + names: [], + mappings: buffer + }; + if (options.inline) { + v3.sourcesContent = [code]; + } + return JSON.stringify(v3, null, 2); + }; + + VLQ_SHIFT = 5; + + VLQ_CONTINUATION_BIT = 1 << VLQ_SHIFT; + + VLQ_VALUE_MASK = VLQ_CONTINUATION_BIT - 1; + + SourceMap.prototype.encodeVlq = function(value) { + var answer, nextChunk, signBit, valueToEncode; + answer = ''; + signBit = value < 0 ? 1 : 0; + valueToEncode = (Math.abs(value) << 1) + signBit; + while (valueToEncode || !answer) { + nextChunk = valueToEncode & VLQ_VALUE_MASK; + valueToEncode = valueToEncode >> VLQ_SHIFT; + if (valueToEncode) { + nextChunk |= VLQ_CONTINUATION_BIT; + } + answer += this.encodeBase64(nextChunk); + } + return answer; + }; + + BASE64_CHARS = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + + SourceMap.prototype.encodeBase64 = function(value) { + return BASE64_CHARS[value] || (function() { + throw new Error("Cannot Base64 encode value: " + value); + })(); + }; + + return SourceMap; + + })(); + + module.exports = SourceMap; + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/package.json b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/package.json new file mode 100644 index 00000000..77dadf9a --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/package.json @@ -0,0 +1,99 @@ +{ + "_args": [ + [ + { + "raw": "coffee-script@~1.7.0", + "scope": null, + "escapedName": "coffee-script", + "name": "coffee-script", + "rawSpec": "~1.7.0", + "spec": ">=1.7.0 <1.8.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/coffeeify" + ] + ], + "_from": "coffee-script@>=1.7.0 <1.8.0", + "_id": "coffee-script@1.7.1", + "_inCache": true, + "_location": "/coffeeify/coffee-script", + "_npmUser": { + "name": "michaelficarra", + "email": "npm@michael.ficarra.me" + }, + "_npmVersion": "1.3.24", + "_phantomChildren": {}, + "_requested": { + "raw": "coffee-script@~1.7.0", + "scope": null, + "escapedName": "coffee-script", + "name": "coffee-script", + "rawSpec": "~1.7.0", + "spec": ">=1.7.0 <1.8.0", + "type": "range" + }, + "_requiredBy": [ + "/coffeeify" + ], + "_resolved": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.7.1.tgz", + "_shasum": "62996a861780c75e6d5069d13822723b73404bfc", + "_shrinkwrap": null, + "_spec": "coffee-script@~1.7.0", + "_where": "/Users/MB/git/pdfkit/node_modules/coffeeify", + "author": { + "name": "Jeremy Ashkenas" + }, + "bin": { + "coffee": "./bin/coffee", + "cake": "./bin/cake" + }, + "bugs": { + "url": "https://github.com/jashkenas/coffee-script/issues" + }, + "dependencies": { + "mkdirp": "~0.3.5" + }, + "description": "Unfancy JavaScript", + "devDependencies": { + "highlight.js": "~8.0.0", + "jison": ">=0.2.0", + "uglify-js": "~2.2", + "underscore": "~1.5.2" + }, + "directories": { + "lib": "./lib/coffee-script" + }, + "dist": { + "shasum": "62996a861780c75e6d5069d13822723b73404bfc", + "tarball": "https://registry.npmjs.org/coffee-script/-/coffee-script-1.7.1.tgz" + }, + "engines": { + "node": ">=0.8.0" + }, + "homepage": "http://coffeescript.org", + "keywords": [ + "javascript", + "language", + "coffeescript", + "compiler" + ], + "license": "MIT", + "main": "./lib/coffee-script/coffee-script", + "maintainers": [ + { + "name": "michaelficarra", + "email": "npm@michael.ficarra.me" + } + ], + "name": "coffee-script", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/jashkenas/coffee-script.git" + }, + "scripts": { + "test": "node ./bin/cake test" + }, + "version": "1.7.1" +} diff --git a/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/register.js b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/register.js new file mode 100644 index 00000000..97b33d72 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/node_modules/coffee-script/register.js @@ -0,0 +1 @@ +require('./lib/coffee-script/register'); diff --git a/pitfall/pdfkit/node_modules/coffeeify/package.json b/pitfall/pdfkit/node_modules/coffeeify/package.json new file mode 100644 index 00000000..4054e314 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/package.json @@ -0,0 +1,103 @@ +{ + "_args": [ + [ + { + "raw": "coffeeify@^0.6.0", + "scope": null, + "escapedName": "coffeeify", + "name": "coffeeify", + "rawSpec": "^0.6.0", + "spec": ">=0.6.0 <0.7.0", + "type": "range" + }, + "/Users/MB/git/pdfkit" + ] + ], + "_from": "coffeeify@>=0.6.0 <0.7.0", + "_id": "coffeeify@0.6.0", + "_inCache": true, + "_location": "/coffeeify", + "_npmUser": { + "name": "jnordberg", + "email": "its@johan-nordberg.com" + }, + "_npmVersion": "1.3.21", + "_phantomChildren": { + "mkdirp": "0.3.5" + }, + "_requested": { + "raw": "coffeeify@^0.6.0", + "scope": null, + "escapedName": "coffeeify", + "name": "coffeeify", + "rawSpec": "^0.6.0", + "spec": ">=0.6.0 <0.7.0", + "type": "range" + }, + "_requiredBy": [ + "#DEV:/" + ], + "_resolved": "https://registry.npmjs.org/coffeeify/-/coffeeify-0.6.0.tgz", + "_shasum": "75caba9b2e92c7836c92465c883b6acc9d894652", + "_shrinkwrap": null, + "_spec": "coffeeify@^0.6.0", + "_where": "/Users/MB/git/pdfkit", + "bugs": { + "url": "https://github.com/jnordberg/coffeeify/issues" + }, + "contributors": [ + { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + { + "name": "Johan Nordberg", + "email": "code@johan-nordberg.com", + "url": "http://johan-nordberg.com" + } + ], + "dependencies": { + "coffee-script": "~1.7.0", + "convert-source-map": "~0.3.3", + "through": "~2.3.4" + }, + "description": "browserify v2 plugin for coffee-script with support for mixed .js and .coffee files", + "devDependencies": { + "browserify": "~3.24.6", + "tap": "~0.4.0" + }, + "directories": {}, + "dist": { + "shasum": "75caba9b2e92c7836c92465c883b6acc9d894652", + "tarball": "https://registry.npmjs.org/coffeeify/-/coffeeify-0.6.0.tgz" + }, + "homepage": "https://github.com/jnordberg/coffeeify", + "keywords": [ + "coffee-script", + "browserify", + "v2", + "js", + "plugin", + "transform" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "jnordberg", + "email": "its@johan-nordberg.com" + } + ], + "name": "coffeeify", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/jnordberg/coffeeify.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "0.6.0" +} diff --git a/pitfall/pdfkit/node_modules/coffeeify/readme.markdown b/pitfall/pdfkit/node_modules/coffeeify/readme.markdown new file mode 100644 index 00000000..62b944a8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/readme.markdown @@ -0,0 +1,67 @@ +# coffeeify + +browserify v2 plugin for coffee-script + +mix and match `.coffee` and `.js` files in the same project + +[![Build Status](https://travis-ci.org/jnordberg/coffeeify.png?branch=master)](https://travis-ci.org/jnordberg/coffeeify) + +# example + +given some files written in a mix of `js` and `coffee`: + +foo.coffee: + +``` coffee +console.log(require './bar.js') +``` + +bar.js: + +``` js +module.exports = require('./baz.coffee')(5) +``` + +baz.coffee: + +``` js +module.exports = (n) -> n * 111 +``` + +install coffeeify into your app: + +``` +$ npm install coffeeify +``` + +when you compile your app, just pass `-t coffeeify` to browserify: + +``` +$ browserify -t coffeeify foo.coffee > bundle.js +$ node bundle.js +555 +``` + +you can omit the `.coffee` extension from your requires if you add the extension to browserify's module extensions: + +``` js +module.exports = require('./baz')(5) +``` + +``` +$ browserify -t coffeeify --extension=".coffee" foo.coffee > bundle.js +$ node bundle.js +555 +``` + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install coffeeify +``` + +# license + +MIT diff --git a/pitfall/pdfkit/node_modules/coffeeify/test/bundle.js b/pitfall/pdfkit/node_modules/coffeeify/test/bundle.js new file mode 100644 index 00000000..32f923e2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/test/bundle.js @@ -0,0 +1,26 @@ +var test = require('tap').test; +var browserify = require('browserify'); +var vm = require('vm'); + +function bundle (file) { + test('bundle transform', function (t) { + t.plan(1); + + var b = browserify(); + b.add(__dirname + file); + b.transform(__dirname + '/..'); + b.bundle(function (err, src) { + if (err) t.fail(err); + vm.runInNewContext(src, { + console: { log: log } + }); + }); + + function log (msg) { + t.equal(msg, 555); + } + }); +} + +bundle('/../example/foo.coffee'); +bundle('/../example/foo.litcoffee'); diff --git a/pitfall/pdfkit/node_modules/coffeeify/test/error.js b/pitfall/pdfkit/node_modules/coffeeify/test/error.js new file mode 100644 index 00000000..04daee99 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/test/error.js @@ -0,0 +1,33 @@ +var test = require('tap').test; +var browserify = require('browserify'); +var path = require('path'); +var fs = require('fs'); + +var file = path.resolve(__dirname, '../example/error.coffee'); +var multilineFile = path.resolve(__dirname, '../example/multiline_error.coffee'); +var transform = path.join(__dirname, '..'); + +test('transform error', function (t) { + t.plan(5); + + var b = browserify([file]); + b.transform(transform); + + b.bundle(function (error) { + t.ok(error !== undefined, "bundle should callback with an error"); + t.ok(error.line !== undefined, "error.line should be defined"); + t.ok(error.column !== undefined, "error.column should be defined"); + t.equal(error.line, 5, "error should be on line 5"); + t.equal(error.column, 15, "error should be on column 15"); + }); +}); + +test('multiline transform error', function (t) { + t.plan(1); + + var b = browserify([multilineFile]); + b.transform(transform); + b.bundle(function (error) { + t.ok(error !== undefined, "bundle should callback with an error"); + }); +}); diff --git a/pitfall/pdfkit/node_modules/coffeeify/test/transform.js b/pitfall/pdfkit/node_modules/coffeeify/test/transform.js new file mode 100644 index 00000000..0fe618b4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/coffeeify/test/transform.js @@ -0,0 +1,33 @@ +var test = require('tap').test; +var fs = require('fs'); +var path = require('path'); +var through = require('through'); +var convert = require('convert-source-map'); +var transform = require('..'); + +test('transform adds sourcemap comment', function (t) { + t.plan(1); + var data = ''; + + var file = path.join(__dirname, '../example/foo.coffee') + fs.createReadStream(file) + .pipe(transform(file)) + .pipe(through(write, end)); + + function write (buf) { data += buf } + function end () { + var sourceMap = convert.fromSource(data).toObject(); + + t.deepEqual( + sourceMap, + { version: 3, + file: file, + sourceRoot: '', + sources: [ file ], + names: [], + mappings: 'AAAA,OAAO,CAAC,GAAR,CAAY,OAAA,CAAQ,UAAR,CAAZ,CAAA,CAAA', + sourcesContent: [ 'console.log(require \'./bar.js\')\n' ] }, + 'adds sourcemap comment including original source' + ); + } +}); diff --git a/pitfall/pdfkit/node_modules/combine-source-map/.npmignore b/pitfall/pdfkit/node_modules/combine-source-map/.npmignore new file mode 100644 index 00000000..de78e273 --- /dev/null +++ b/pitfall/pdfkit/node_modules/combine-source-map/.npmignore @@ -0,0 +1,16 @@ +lib-cov +*.seed +*.log +*.csv +*.dat +*.out +*.pid +*.gz + +pids +logs +results + +node_modules +npm-debug.log +tmp diff --git a/pitfall/pdfkit/node_modules/combine-source-map/.travis.yml b/pitfall/pdfkit/node_modules/combine-source-map/.travis.yml new file mode 100644 index 00000000..895dbd36 --- /dev/null +++ b/pitfall/pdfkit/node_modules/combine-source-map/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.6 + - 0.8 diff --git a/pitfall/pdfkit/node_modules/combine-source-map/LICENSE b/pitfall/pdfkit/node_modules/combine-source-map/LICENSE new file mode 100644 index 00000000..41702c50 --- /dev/null +++ b/pitfall/pdfkit/node_modules/combine-source-map/LICENSE @@ -0,0 +1,23 @@ +Copyright 2013 Thorsten Lorenz. +All rights reserved. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +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. diff --git a/pitfall/pdfkit/node_modules/combine-source-map/README.md b/pitfall/pdfkit/node_modules/combine-source-map/README.md new file mode 100644 index 00000000..92dfc1f6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/combine-source-map/README.md @@ -0,0 +1,111 @@ +# combine-source-map [![build status](https://secure.travis-ci.org/thlorenz/combine-source-map.png)](http://travis-ci.org/thlorenz/combine-source-map) + +Add source maps of multiple files, offset them and then combine them into one source map. + +```js +var convert = require('convert-source-map'); +var combine = require('combine-source-map'); + +var fooComment = '//# sourceMappingURL=data:application/json;base64,eyJ2Z [..] pzJylcbiJdfQ=='; +var barComment = '//# sourceMappingURL=data:application/json;base64,eyJ2Z [..] VjaycpXG4iXX0='; + +var fooFile = { + source: '(function() {\n\n console.log(require(\'./bar.js\'));\n\n}).call(this);\n' + '\n' + fooComment + , sourceFile: 'foo.js' +}; +var barFile = { + source: '(function() {\n\n console.log(alert(\'alerts suck\'));\n\n}).call(this);\n' + '\n' + barComment + , sourceFile: 'bar.js' +}; + +var offset = { line: 2 }; +var base64 = combine + .create('bundle.js') + .addFile(fooFile, offset) + .addFile(barFile, { line: offset.line + 8 }) + .base64(); + +var sm = convert.fromBase64(base64).toObject(); +console.log(sm); +``` + +``` +{ version: 3, + file: 'bundle.js', + sources: [ 'foo.coffee', 'bar.coffee' ], + names: [], + mappings: ';;;AAAA;CAAA;CAAA,CAAA,CAAA,IAAO,GAAK;CAAZ;;;;;ACAA;CAAA;CAAA,CAAA,CAAA,IAAO,GAAK;CAAZ', + sourcesContent: + [ 'console.log(require \'./bar.js\')\n', + 'console.log(alert \'alerts suck\')\n' ] } +``` + +## Installation + + npm install combine-source-map + +## API + +### create() + +``` +/** + * @name create + * @function + * @param file {String} optional name of the generated file + * @param sourceRoot { String} optional sourceRoot of the map to be generated + * @return {Object} Combiner instance to which source maps can be added and later combined + */ +``` + +### Combiner.prototype.addFile(opts, offset) + +``` +/** + * Adds map to underlying source map. + * If source contains a source map comment that has the source of the original file inlined it will offset these + * mappings and include them. + * If no source map comment is found or it has no source inlined, mappings for the file will be generated and included + * + * @name addMap + * @function + * @param opts {Object} { sourceFile: {String}, source: {String} } + * @param offset {Object} { line: {Number}, column: {Number} } + */ +``` + +### Combiner.prototype.base64() + +``` +/** +* @name base64 +* @function +* @return {String} base64 encoded combined source map +*/ +``` + +### Combiner.prototype.comment() + +``` +/** + * @name comment + * @function + * @return {String} base64 encoded sourceMappingUrl comment of the combined source map + */ +``` + +### removeComments(src) + +``` +/** + * @name removeComments + * @function + * @param src + * @return {String} src with all sourceMappingUrl comments removed + */ +``` + +## Example + +Read and run the [more elaborate example](https://github.com/thlorenz/combine-source-map/blob/master/example/two-files.js) +in order to get a better idea how things work. diff --git a/pitfall/pdfkit/node_modules/combine-source-map/example/two-files-short.js b/pitfall/pdfkit/node_modules/combine-source-map/example/two-files-short.js new file mode 100644 index 00000000..311849c7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/combine-source-map/example/two-files-short.js @@ -0,0 +1,26 @@ +'use strict'; + +var convert = require('convert-source-map'); +var combine = require('..'); + +var fooComment = '//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9vLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiZm9vLmNvZmZlZSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Q0FBQTtDQUFBLENBQUEsQ0FBQSxJQUFPLEdBQUs7Q0FBWiIsInNvdXJjZXNDb250ZW50IjpbImNvbnNvbGUubG9nKHJlcXVpcmUgJy4vYmFyLmpzJylcbiJdfQ=='; +var barComment = '//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiYmFyLmNvZmZlZSJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUE7Q0FBQTtDQUFBLENBQUEsQ0FBQSxJQUFPLEdBQUs7Q0FBWiIsInNvdXJjZXNDb250ZW50IjpbImNvbnNvbGUubG9nKGFsZXJ0ICdhbGVydHMgc3VjaycpXG4iXX0='; + +var fooFile = { + source: '(function() {\n\n console.log(require(\'./bar.js\'));\n\n}).call(this);\n' + '\n' + fooComment + , sourceFile: 'foo.js' +}; +var barFile = { + source: '(function() {\n\n console.log(alert(\'alerts suck\'));\n\n}).call(this);\n' + '\n' + barComment + , sourceFile: 'bar.js' +}; + +var offset = { line: 2 }; +var base64 = combine + .create('bundle.js') + .addFile(fooFile, offset) + .addFile(barFile, { line: offset.line + 8 }) + .base64(); + +var sm = convert.fromBase64(base64).toObject(); +console.log(sm); diff --git a/pitfall/pdfkit/node_modules/combine-source-map/example/two-files.js b/pitfall/pdfkit/node_modules/combine-source-map/example/two-files.js new file mode 100644 index 00000000..0a4500bd --- /dev/null +++ b/pitfall/pdfkit/node_modules/combine-source-map/example/two-files.js @@ -0,0 +1,46 @@ +'use strict'; + +var convert = require('convert-source-map'); +var combine = require('..'); + +var foo = { + version : 3, + file : 'foo.js', + sourceRoot : '', + sources : [ 'foo.coffee' ], + names : [], + mappings : ';AAAA;CAAA;CAAA,CAAA,CAAA,IAAO,GAAK;CAAZ', + sourcesContent : [ 'console.log(require \'./bar.js\')\n' ] }; + +var bar = { + version : 3, + file : 'bar.js', + sourceRoot : '', + sources : [ 'bar.coffee' ], + names : [], + mappings : ';AAAA;CAAA;CAAA,CAAA,CAAA,IAAO,GAAK;CAAZ', + sourcesContent : [ 'console.log(alert \'alerts suck\')\n' ] }; + + +var fooComment = convert.fromObject(foo).toComment(); +var barComment = convert.fromObject(bar).toComment(); + +var fooFile = { + source: '(function() {\n\n console.log(require(\'./bar.js\'));\n\n}).call(this);\n' + '\n' + fooComment + , sourceFile: 'foo.js' +}; +var barFile = { + source: '(function() {\n\n console.log(alert(\'alerts suck\'));\n\n}).call(this);\n' + '\n' + barComment + , sourceFile: 'bar.js' +}; + +var offset = { line: 2 }; +var base64 = combine + .create('bundle.js') + .addFile(fooFile, offset) + .addFile(barFile, { line: offset.line + 8 }) + .base64(); + +var sm = convert.fromBase64(base64).toObject(); +console.log('Combined source maps:\n', sm); +console.log('\nMappings:\n', sm.mappings); diff --git a/pitfall/pdfkit/node_modules/combine-source-map/index.js b/pitfall/pdfkit/node_modules/combine-source-map/index.js new file mode 100644 index 00000000..18956579 --- /dev/null +++ b/pitfall/pdfkit/node_modules/combine-source-map/index.js @@ -0,0 +1,98 @@ +'use strict'; + +var convert = require('convert-source-map'); +var createGenerator = require('inline-source-map'); +var mappingsFromMap = require('./lib/mappings-from-map'); + +function resolveMap(source) { + var gen = convert.fromSource(source); + return gen ? gen.toObject() : null; +} + +function hasInlinedSource(existingMap) { + return existingMap.sourcesContent && !!existingMap.sourcesContent[0]; +} + +function Combiner(file, sourceRoot) { + // since we include the original code in the map sourceRoot actually not needed + this.generator = createGenerator({ file: file || 'generated.js', sourceRoot: sourceRoot }); +} + +Combiner.prototype._addGeneratedMap = function (sourceFile, source, offset) { + this.generator.addGeneratedMappings(sourceFile, source, offset); + this.generator.addSourceContent(sourceFile, source); + return this; +}; + +Combiner.prototype._addExistingMap = function (sourceFile, source, existingMap, offset) { + var mappings = mappingsFromMap(existingMap); + + var originalSource = existingMap.sourcesContent[0] + , originalSourceFile = existingMap.sources[0]; + + this.generator.addMappings(originalSourceFile || sourceFile, mappings, offset); + this.generator.addSourceContent(originalSourceFile || sourceFile, originalSource); + return this; +}; + +/** + * Adds map to underlying source map. + * If source contains a source map comment that has the source of the original file inlined it will offset these + * mappings and include them. + * If no source map comment is found or it has no source inlined, mappings for the file will be generated and included + * + * @name addMap + * @function + * @param opts {Object} { sourceFile: {String}, source: {String} } + * @param offset {Object} { line: {Number}, column: {Number} } + */ +Combiner.prototype.addFile = function (opts, offset) { + + offset = offset || {}; + if (!offset.hasOwnProperty('line')) offset.line = 0; + if (!offset.hasOwnProperty('column')) offset.column = 0; + + var existingMap = resolveMap(opts.source); + + return existingMap && hasInlinedSource(existingMap) + ? this._addExistingMap(opts.sourceFile, opts.source, existingMap, offset) + : this._addGeneratedMap(opts.sourceFile, opts.source, offset); +}; + +/** +* @name base64 +* @function +* @return {String} base64 encoded combined source map +*/ +Combiner.prototype.base64 = function () { + return this.generator.base64Encode(); +}; + +/** + * @name comment + * @function + * @return {String} base64 encoded sourceMappingUrl comment of the combined source map + */ +Combiner.prototype.comment = function () { + return this.generator.inlineMappingUrl(); +}; + +/** + * @name create + * @function + * @param file {String} optional name of the generated file + * @param sourceRoot { String} optional sourceRoot of the map to be generated + * @return {Object} Combiner instance to which source maps can be added and later combined + */ +exports.create = function (file, sourceRoot) { return new Combiner(file, sourceRoot); }; + +/** + * @name removeComments + * @function + * @param src + * @return {String} src with all sourceMappingUrl comments removed + */ +exports.removeComments = function (src) { + if (!src.replace) return src; + return src.replace(convert.commentRegex, ''); +}; diff --git a/pitfall/pdfkit/node_modules/combine-source-map/lib/mappings-from-map.js b/pitfall/pdfkit/node_modules/combine-source-map/lib/mappings-from-map.js new file mode 100644 index 00000000..c4ece433 --- /dev/null +++ b/pitfall/pdfkit/node_modules/combine-source-map/lib/mappings-from-map.js @@ -0,0 +1,30 @@ +var SMConsumer = require('source-map').SourceMapConsumer; + +/** + * @name mappingsFromMap + * @function + * @param map {Object} the JSON.parse()'ed map + * @return {Array} array of mappings + */ +module.exports = function (map) { + var consumer = new SMConsumer(map); + var mappings = []; + + consumer.eachMapping(function (mapping) { + // only set source if we have original position to handle edgecase (see inline-source-map tests) + mappings.push({ + original: { + column: mapping.originalColumn + , line: mapping.originalLine + } + , generated: { + column: mapping.generatedColumn + , line: mapping.generatedLine + } + , source: mapping.originalColumn != null ? mapping.source : undefined + , name: mapping.name + }); + }); + + return mappings; +} diff --git a/pitfall/pdfkit/node_modules/combine-source-map/package.json b/pitfall/pdfkit/node_modules/combine-source-map/package.json new file mode 100644 index 00000000..40b28980 --- /dev/null +++ b/pitfall/pdfkit/node_modules/combine-source-map/package.json @@ -0,0 +1,98 @@ +{ + "_args": [ + [ + { + "raw": "combine-source-map@~0.3.0", + "scope": null, + "escapedName": "combine-source-map", + "name": "combine-source-map", + "rawSpec": "~0.3.0", + "spec": ">=0.3.0 <0.4.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/browser-pack" + ] + ], + "_from": "combine-source-map@>=0.3.0 <0.4.0", + "_id": "combine-source-map@0.3.0", + "_inCache": true, + "_location": "/combine-source-map", + "_npmUser": { + "name": "thlorenz", + "email": "thlorenz@gmx.de" + }, + "_npmVersion": "1.3.11", + "_phantomChildren": {}, + "_requested": { + "raw": "combine-source-map@~0.3.0", + "scope": null, + "escapedName": "combine-source-map", + "name": "combine-source-map", + "rawSpec": "~0.3.0", + "spec": ">=0.3.0 <0.4.0", + "type": "range" + }, + "_requiredBy": [ + "/browser-pack" + ], + "_resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.3.0.tgz", + "_shasum": "d9e74f593d9cd43807312cb5d846d451efaa9eb7", + "_shrinkwrap": null, + "_spec": "combine-source-map@~0.3.0", + "_where": "/Users/MB/git/pdfkit/node_modules/browser-pack", + "author": { + "name": "Thorsten Lorenz", + "email": "thlorenz@gmx.de", + "url": "http://thlorenz.com" + }, + "bugs": { + "url": "https://github.com/thlorenz/combine-source-map/issues" + }, + "dependencies": { + "convert-source-map": "~0.3.0", + "inline-source-map": "~0.3.0", + "source-map": "~0.1.31" + }, + "description": "Add source maps of multiple files, offset them and then combine them into one source map", + "devDependencies": { + "tap": "~0.4.3" + }, + "directories": {}, + "dist": { + "shasum": "d9e74f593d9cd43807312cb5d846d451efaa9eb7", + "tarball": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.3.0.tgz" + }, + "engine": { + "node": ">=0.6" + }, + "homepage": "https://github.com/thlorenz/combine-source-map", + "keywords": [ + "source", + "map", + "sourcemap", + "bundle", + "combine", + "cat", + "sourceMappingUrl", + "browserify" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "thlorenz", + "email": "thlorenz@gmx.de" + } + ], + "name": "combine-source-map", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/thlorenz/combine-source-map.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "0.3.0" +} diff --git a/pitfall/pdfkit/node_modules/combine-source-map/test/combine-source-map.js b/pitfall/pdfkit/node_modules/combine-source-map/test/combine-source-map.js new file mode 100644 index 00000000..4a0a8bb2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/combine-source-map/test/combine-source-map.js @@ -0,0 +1,153 @@ +'use strict'; +/*jshint asi: true */ + +var test = require('tap').test; +var convert = require('convert-source-map'); +var commentRegex = require('convert-source-map').commentRegex; +var combine = require('..'); +var mappingsFromMap = require('../lib/mappings-from-map'); + +function checkMappings(foo, sm, lineOffset) { + function inspect(obj, depth) { + return require('util').inspect(obj, false, depth || 5, true); + } + + var fooMappings = mappingsFromMap(foo); + var mappings = mappingsFromMap(sm); + + var genLinesOffset = true; + var origLinesSame = true; + for (var i = 0; i < mappings.length; i++) { + var fooGen = fooMappings[i].generated; + var fooOrig = fooMappings[i].original; + var gen = mappings[i].generated + var orig = mappings[i].original; + + if (gen.column !== fooGen.column || gen.line !== (fooGen.line + lineOffset)) { + console.error( + 'generated mapping at %s not offset properly:\ninput: [%s]\noutput:[%s]\n\n', + i , + inspect(fooGen), + inspect(gen) + ); + genLinesOffset = false; + } + + if (orig.column !== fooOrig.column || orig.line !== fooOrig.line) { + console.error( + 'original mapping at %s is not the same as the genrated mapping:\ninput: [%s]\noutput:[%s]\n\n', + i , + inspect(fooOrig), + inspect(orig) + ); + origLinesSame = false; + } + } + return { genLinesOffset: genLinesOffset, origLinesSame: origLinesSame }; +} + +var foo = { + version : 3, + file : 'foo.js', + sourceRoot : '', + sources : [ 'foo.coffee' ], + names : [], + mappings : ';AAAA;CAAA;CAAA,CAAA,CAAA,IAAO,GAAK;CAAZ', + sourcesContent : [ 'console.log(require \'./bar.js\')\n' ] }; + +test('add one file with inlined source', function (t) { + + var mapComment = convert.fromObject(foo).toComment(); + var file = { + id: 'xyz' + , source: '(function() {\n\n console.log(require(\'./bar.js\'));\n\n}).call(this);\n' + '\n' + mapComment + , sourceFile: 'foo.js' + }; + + var lineOffset = 3 + var base64 = combine.create() + .addFile(file, { line: lineOffset }) + .base64() + + var sm = convert.fromBase64(base64).toObject(); + var res = checkMappings(foo, sm, lineOffset); + + t.ok(res.genLinesOffset, 'all generated lines are offset properly and columns unchanged') + t.ok(res.origLinesSame, 'all original lines and columns are unchanged') + t.equal(sm.sourcesContent[0], foo.sourcesContent[0], 'includes the original source') + t.equal(sm.sources[0], 'foo.coffee', 'includes original filename') + t.end() +}); + + +test('add one file without inlined source', function (t) { + + var mapComment = convert + .fromObject(foo) + .setProperty('sourcesContent', []) + .toComment(); + + var file = { + id: 'xyz' + , source: '(function() {\n\n console.log(require(\'./bar.js\'));\n\n}).call(this);\n' + '\n' + mapComment + , sourceFile: 'foo.js' + }; + + var lineOffset = 3 + var base64 = combine.create() + .addFile(file, { line: lineOffset }) + .base64() + + var sm = convert.fromBase64(base64).toObject(); + var mappings = mappingsFromMap(sm); + + t.equal(sm.sourcesContent[0], file.source, 'includes the generated source') + t.equal(sm.sources[0], 'foo.js', 'includes generated filename') + + t.deepEqual( + mappings + , [ { generated: { line: 4, column: 0 }, + original: { line: 1, column: 0 }, + source: 'foo.js', name: undefined }, + { generated: { line: 5, column: 0 }, + original: { line: 2, column: 0 }, + source: 'foo.js', name: undefined }, + { generated: { line: 6, column: 0 }, + original: { line: 3, column: 0 }, + source: 'foo.js', name: undefined }, + { generated: { line: 7, column: 0 }, + original: { line: 4, column: 0 }, + source: 'foo.js', name: undefined }, + { generated: { line: 8, column: 0 }, + original: { line: 5, column: 0 }, + source: 'foo.js', name: undefined }, + { generated: { line: 9, column: 0 }, + original: { line: 6, column: 0 }, + source: 'foo.js', name: undefined }, + { generated: { line: 10, column: 0 }, + original: { line: 7, column: 0 }, + source: 'foo.js', name: undefined } ] + , 'generates mappings offset by the given line' + ) + t.end() +}) + +test('remove comments', function (t) { + var mapComment = convert.fromObject(foo).toComment(); + + function sourcemapComments(src) { + var matches = src.match(commentRegex); + return matches ? matches.length : 0; + } + + t.equal(sourcemapComments('var a = 1;\n' + mapComment), 1); + + [ '' + , 'var a = 1;\n' + mapComment + , 'var a = 1;\n' + mapComment + '\nvar b = 5;\n' + mapComment + ] .forEach(function (x) { + var removed = combine.removeComments(x) + t.equal(sourcemapComments(removed), 0) + }) + t.end() +}) diff --git a/pitfall/pdfkit/node_modules/commander/Readme.md b/pitfall/pdfkit/node_modules/commander/Readme.md new file mode 100644 index 00000000..d1644012 --- /dev/null +++ b/pitfall/pdfkit/node_modules/commander/Readme.md @@ -0,0 +1,195 @@ +# Commander.js + + The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/visionmedia/commander). + + [![Build Status](https://secure.travis-ci.org/visionmedia/commander.js.png)](http://travis-ci.org/visionmedia/commander.js) + +## Installation + + $ npm install commander + +## Option parsing + + Options with commander are defined with the `.option()` method, also serving as documentation for the options. The example below parses args and options from `process.argv`, leaving remaining args as the `program.args` array which were not consumed by options. + +```js +#!/usr/bin/env node + +/** + * Module dependencies. + */ + +var program = require('commander'); + +program + .version('0.0.1') + .option('-p, --peppers', 'Add peppers') + .option('-P, --pineapple', 'Add pineapple') + .option('-b, --bbq', 'Add bbq sauce') + .option('-c, --cheese [type]', 'Add the specified type of cheese [marble]', 'marble') + .parse(process.argv); + +console.log('you ordered a pizza with:'); +if (program.peppers) console.log(' - peppers'); +if (program.pineapple) console.log(' - pineapple'); +if (program.bbq) console.log(' - bbq'); +console.log(' - %s cheese', program.cheese); +``` + + Short flags may be passed as a single arg, for example `-abc` is equivalent to `-a -b -c`. Multi-word options such as "--template-engine" are camel-cased, becoming `program.templateEngine` etc. + +## Automated --help + + The help information is auto-generated based on the information commander already knows about your program, so the following `--help` info is for free: + +``` + $ ./examples/pizza --help + + Usage: pizza [options] + + Options: + + -V, --version output the version number + -p, --peppers Add peppers + -P, --pineapple Add pineapple + -b, --bbq Add bbq sauce + -c, --cheese Add the specified type of cheese [marble] + -h, --help output usage information + +``` + +## Coercion + +```js +function range(val) { + return val.split('..').map(Number); +} + +function list(val) { + return val.split(','); +} + +program + .version('0.0.1') + .usage('[options] ') + .option('-i, --integer ', 'An integer argument', parseInt) + .option('-f, --float ', 'A float argument', parseFloat) + .option('-r, --range ..', 'A range', range) + .option('-l, --list ', 'A list', list) + .option('-o, --optional [value]', 'An optional value') + .parse(process.argv); + +console.log(' int: %j', program.integer); +console.log(' float: %j', program.float); +console.log(' optional: %j', program.optional); +program.range = program.range || []; +console.log(' range: %j..%j', program.range[0], program.range[1]); +console.log(' list: %j', program.list); +console.log(' args: %j', program.args); +``` + +## Custom help + + You can display arbitrary `-h, --help` information + by listening for "--help". Commander will automatically + exit once you are done so that the remainder of your program + does not execute causing undesired behaviours, for example + in the following executable "stuff" will not output when + `--help` is used. + +```js +#!/usr/bin/env node + +/** + * Module dependencies. + */ + +var program = require('../'); + +function list(val) { + return val.split(',').map(Number); +} + +program + .version('0.0.1') + .option('-f, --foo', 'enable some foo') + .option('-b, --bar', 'enable some bar') + .option('-B, --baz', 'enable some baz'); + +// must be before .parse() since +// node's emit() is immediate + +program.on('--help', function(){ + console.log(' Examples:'); + console.log(''); + console.log(' $ custom-help --help'); + console.log(' $ custom-help -h'); + console.log(''); +}); + +program.parse(process.argv); + +console.log('stuff'); +``` + +yielding the following help output: + +``` + +Usage: custom-help [options] + +Options: + + -h, --help output usage information + -V, --version output the version number + -f, --foo enable some foo + -b, --bar enable some bar + -B, --baz enable some baz + +Examples: + + $ custom-help --help + $ custom-help -h + +``` + +## .outputHelp() + + Output help information without exiting. + +## .help() + + Output help information and exit immediately. + +## Links + + - [API documentation](http://visionmedia.github.com/commander.js/) + - [ascii tables](https://github.com/LearnBoost/cli-table) + - [progress bars](https://github.com/visionmedia/node-progress) + - [more progress bars](https://github.com/substack/node-multimeter) + - [examples](https://github.com/visionmedia/commander.js/tree/master/examples) + +## License + +(The MIT License) + +Copyright (c) 2011 TJ Holowaychuk <tj@vision-media.ca> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/commander/index.js b/pitfall/pdfkit/node_modules/commander/index.js new file mode 100644 index 00000000..790a7519 --- /dev/null +++ b/pitfall/pdfkit/node_modules/commander/index.js @@ -0,0 +1,851 @@ + +/** + * Module dependencies. + */ + +var EventEmitter = require('events').EventEmitter; +var spawn = require('child_process').spawn; +var fs = require('fs'); +var exists = fs.existsSync; +var path = require('path'); +var dirname = path.dirname; +var basename = path.basename; + +/** + * Expose the root command. + */ + +exports = module.exports = new Command; + +/** + * Expose `Command`. + */ + +exports.Command = Command; + +/** + * Expose `Option`. + */ + +exports.Option = Option; + +/** + * Initialize a new `Option` with the given `flags` and `description`. + * + * @param {String} flags + * @param {String} description + * @api public + */ + +function Option(flags, description) { + this.flags = flags; + this.required = ~flags.indexOf('<'); + this.optional = ~flags.indexOf('['); + this.bool = !~flags.indexOf('-no-'); + flags = flags.split(/[ ,|]+/); + if (flags.length > 1 && !/^[[<]/.test(flags[1])) this.short = flags.shift(); + this.long = flags.shift(); + this.description = description || ''; +} + +/** + * Return option name. + * + * @return {String} + * @api private + */ + +Option.prototype.name = function(){ + return this.long + .replace('--', '') + .replace('no-', ''); +}; + +/** + * Check if `arg` matches the short or long flag. + * + * @param {String} arg + * @return {Boolean} + * @api private + */ + +Option.prototype.is = function(arg){ + return arg == this.short + || arg == this.long; +}; + +/** + * Initialize a new `Command`. + * + * @param {String} name + * @api public + */ + +function Command(name) { + this.commands = []; + this.options = []; + this._execs = []; + this._args = []; + this._name = name; +} + +/** + * Inherit from `EventEmitter.prototype`. + */ + +Command.prototype.__proto__ = EventEmitter.prototype; + +/** + * Add command `name`. + * + * The `.action()` callback is invoked when the + * command `name` is specified via __ARGV__, + * and the remaining arguments are applied to the + * function for access. + * + * When the `name` is "*" an un-matched command + * will be passed as the first arg, followed by + * the rest of __ARGV__ remaining. + * + * Examples: + * + * program + * .version('0.0.1') + * .option('-C, --chdir ', 'change the working directory') + * .option('-c, --config ', 'set config path. defaults to ./deploy.conf') + * .option('-T, --no-tests', 'ignore test hook') + * + * program + * .command('setup') + * .description('run remote setup commands') + * .action(function(){ + * console.log('setup'); + * }); + * + * program + * .command('exec ') + * .description('run the given remote command') + * .action(function(cmd){ + * console.log('exec "%s"', cmd); + * }); + * + * program + * .command('*') + * .description('deploy the given env') + * .action(function(env){ + * console.log('deploying "%s"', env); + * }); + * + * program.parse(process.argv); + * + * @param {String} name + * @param {String} [desc] + * @return {Command} the new command + * @api public + */ + +Command.prototype.command = function(name, desc){ + var args = name.split(/ +/); + var cmd = new Command(args.shift()); + if (desc) cmd.description(desc); + if (desc) this.executables = true; + if (desc) this._execs[cmd._name] = true; + this.commands.push(cmd); + cmd.parseExpectedArgs(args); + cmd.parent = this; + if (desc) return this; + return cmd; +}; + +/** + * Add an implicit `help [cmd]` subcommand + * which invokes `--help` for the given command. + * + * @api private + */ + +Command.prototype.addImplicitHelpCommand = function() { + this.command('help [cmd]', 'display help for [cmd]'); +}; + +/** + * Parse expected `args`. + * + * For example `["[type]"]` becomes `[{ required: false, name: 'type' }]`. + * + * @param {Array} args + * @return {Command} for chaining + * @api public + */ + +Command.prototype.parseExpectedArgs = function(args){ + if (!args.length) return; + var self = this; + args.forEach(function(arg){ + switch (arg[0]) { + case '<': + self._args.push({ required: true, name: arg.slice(1, -1) }); + break; + case '[': + self._args.push({ required: false, name: arg.slice(1, -1) }); + break; + } + }); + return this; +}; + +/** + * Register callback `fn` for the command. + * + * Examples: + * + * program + * .command('help') + * .description('display verbose help') + * .action(function(){ + * // output help here + * }); + * + * @param {Function} fn + * @return {Command} for chaining + * @api public + */ + +Command.prototype.action = function(fn){ + var self = this; + this.parent.on(this._name, function(args, unknown){ + // Parse any so-far unknown options + unknown = unknown || []; + var parsed = self.parseOptions(unknown); + + // Output help if necessary + outputHelpIfNecessary(self, parsed.unknown); + + // If there are still any unknown options, then we simply + // die, unless someone asked for help, in which case we give it + // to them, and then we die. + if (parsed.unknown.length > 0) { + self.unknownOption(parsed.unknown[0]); + } + + // Leftover arguments need to be pushed back. Fixes issue #56 + if (parsed.args.length) args = parsed.args.concat(args); + + self._args.forEach(function(arg, i){ + if (arg.required && null == args[i]) { + self.missingArgument(arg.name); + } + }); + + // Always append ourselves to the end of the arguments, + // to make sure we match the number of arguments the user + // expects + if (self._args.length) { + args[self._args.length] = self; + } else { + args.push(self); + } + + fn.apply(this, args); + }); + return this; +}; + +/** + * Define option with `flags`, `description` and optional + * coercion `fn`. + * + * The `flags` string should contain both the short and long flags, + * separated by comma, a pipe or space. The following are all valid + * all will output this way when `--help` is used. + * + * "-p, --pepper" + * "-p|--pepper" + * "-p --pepper" + * + * Examples: + * + * // simple boolean defaulting to false + * program.option('-p, --pepper', 'add pepper'); + * + * --pepper + * program.pepper + * // => Boolean + * + * // simple boolean defaulting to false + * program.option('-C, --no-cheese', 'remove cheese'); + * + * program.cheese + * // => true + * + * --no-cheese + * program.cheese + * // => true + * + * // required argument + * program.option('-C, --chdir ', 'change the working directory'); + * + * --chdir /tmp + * program.chdir + * // => "/tmp" + * + * // optional argument + * program.option('-c, --cheese [type]', 'add cheese [marble]'); + * + * @param {String} flags + * @param {String} description + * @param {Function|Mixed} fn or default + * @param {Mixed} defaultValue + * @return {Command} for chaining + * @api public + */ + +Command.prototype.option = function(flags, description, fn, defaultValue){ + var self = this + , option = new Option(flags, description) + , oname = option.name() + , name = camelcase(oname); + + // default as 3rd arg + if ('function' != typeof fn) defaultValue = fn, fn = null; + + // preassign default value only for --no-*, [optional], or + if (false == option.bool || option.optional || option.required) { + // when --no-* we make sure default is true + if (false == option.bool) defaultValue = true; + // preassign only if we have a default + if (undefined !== defaultValue) self[name] = defaultValue; + } + + // register the option + this.options.push(option); + + // when it's passed assign the value + // and conditionally invoke the callback + this.on(oname, function(val){ + // coercion + if (null != val && fn) val = fn(val); + + // unassigned or bool + if ('boolean' == typeof self[name] || 'undefined' == typeof self[name]) { + // if no value, bool true, and we have a default, then use it! + if (null == val) { + self[name] = option.bool + ? defaultValue || true + : false; + } else { + self[name] = val; + } + } else if (null !== val) { + // reassign + self[name] = val; + } + }); + + return this; +}; + +/** + * Parse `argv`, settings options and invoking commands when defined. + * + * @param {Array} argv + * @return {Command} for chaining + * @api public + */ + +Command.prototype.parse = function(argv){ + // implicit help + if (this.executables) this.addImplicitHelpCommand(); + + // store raw args + this.rawArgs = argv; + + // guess name + this._name = this._name || basename(argv[1]); + + // process argv + var parsed = this.parseOptions(this.normalize(argv.slice(2))); + var args = this.args = parsed.args; + + var result = this.parseArgs(this.args, parsed.unknown); + + // executable sub-commands + var name = result.args[0]; + if (this._execs[name]) return this.executeSubCommand(argv, args, parsed.unknown); + + return result; +}; + +/** + * Execute a sub-command executable. + * + * @param {Array} argv + * @param {Array} args + * @param {Array} unknown + * @api private + */ + +Command.prototype.executeSubCommand = function(argv, args, unknown) { + args = args.concat(unknown); + + if (!args.length) this.help(); + if ('help' == args[0] && 1 == args.length) this.help(); + + // --help + if ('help' == args[0]) { + args[0] = args[1]; + args[1] = '--help'; + } + + // executable + var dir = dirname(argv[1]); + var bin = basename(argv[1]) + '-' + args[0]; + + // check for ./ first + var local = path.join(dir, bin); + + // run it + args = args.slice(1); + var proc = spawn(local, args, { stdio: 'inherit', customFds: [0, 1, 2] }); + proc.on('error', function(err){ + if (err.code == "ENOENT") { + console.error('\n %s(1) does not exist, try --help\n', bin); + } else if (err.code == "EACCES") { + console.error('\n %s(1) not executable. try chmod or run with root\n', bin); + } + }); + + this.runningCommand = proc; +}; + +/** + * Normalize `args`, splitting joined short flags. For example + * the arg "-abc" is equivalent to "-a -b -c". + * This also normalizes equal sign and splits "--abc=def" into "--abc def". + * + * @param {Array} args + * @return {Array} + * @api private + */ + +Command.prototype.normalize = function(args){ + var ret = [] + , arg + , lastOpt + , index; + + for (var i = 0, len = args.length; i < len; ++i) { + arg = args[i]; + i > 0 && (lastOpt = this.optionFor(args[i-1])); + + if (lastOpt && lastOpt.required) { + ret.push(arg); + } else if (arg.length > 1 && '-' == arg[0] && '-' != arg[1]) { + arg.slice(1).split('').forEach(function(c){ + ret.push('-' + c); + }); + } else if (/^--/.test(arg) && ~(index = arg.indexOf('='))) { + ret.push(arg.slice(0, index), arg.slice(index + 1)); + } else { + ret.push(arg); + } + } + + return ret; +}; + +/** + * Parse command `args`. + * + * When listener(s) are available those + * callbacks are invoked, otherwise the "*" + * event is emitted and those actions are invoked. + * + * @param {Array} args + * @return {Command} for chaining + * @api private + */ + +Command.prototype.parseArgs = function(args, unknown){ + var cmds = this.commands + , len = cmds.length + , name; + + if (args.length) { + name = args[0]; + if (this.listeners(name).length) { + this.emit(args.shift(), args, unknown); + } else { + this.emit('*', args); + } + } else { + outputHelpIfNecessary(this, unknown); + + // If there were no args and we have unknown options, + // then they are extraneous and we need to error. + if (unknown.length > 0) { + this.unknownOption(unknown[0]); + } + } + + return this; +}; + +/** + * Return an option matching `arg` if any. + * + * @param {String} arg + * @return {Option} + * @api private + */ + +Command.prototype.optionFor = function(arg){ + for (var i = 0, len = this.options.length; i < len; ++i) { + if (this.options[i].is(arg)) { + return this.options[i]; + } + } +}; + +/** + * Parse options from `argv` returning `argv` + * void of these options. + * + * @param {Array} argv + * @return {Array} + * @api public + */ + +Command.prototype.parseOptions = function(argv){ + var args = [] + , len = argv.length + , literal + , option + , arg; + + var unknownOptions = []; + + // parse options + for (var i = 0; i < len; ++i) { + arg = argv[i]; + + // literal args after -- + if ('--' == arg) { + literal = true; + continue; + } + + if (literal) { + args.push(arg); + continue; + } + + // find matching Option + option = this.optionFor(arg); + + // option is defined + if (option) { + // requires arg + if (option.required) { + arg = argv[++i]; + if (null == arg) return this.optionMissingArgument(option); + this.emit(option.name(), arg); + // optional arg + } else if (option.optional) { + arg = argv[i+1]; + if (null == arg || ('-' == arg[0] && '-' != arg)) { + arg = null; + } else { + ++i; + } + this.emit(option.name(), arg); + // bool + } else { + this.emit(option.name()); + } + continue; + } + + // looks like an option + if (arg.length > 1 && '-' == arg[0]) { + unknownOptions.push(arg); + + // If the next argument looks like it might be + // an argument for this option, we pass it on. + // If it isn't, then it'll simply be ignored + if (argv[i+1] && '-' != argv[i+1][0]) { + unknownOptions.push(argv[++i]); + } + continue; + } + + // arg + args.push(arg); + } + + return { args: args, unknown: unknownOptions }; +}; + +/** + * Argument `name` is missing. + * + * @param {String} name + * @api private + */ + +Command.prototype.missingArgument = function(name){ + console.error(); + console.error(" error: missing required argument `%s'", name); + console.error(); + process.exit(1); +}; + +/** + * `Option` is missing an argument, but received `flag` or nothing. + * + * @param {String} option + * @param {String} flag + * @api private + */ + +Command.prototype.optionMissingArgument = function(option, flag){ + console.error(); + if (flag) { + console.error(" error: option `%s' argument missing, got `%s'", option.flags, flag); + } else { + console.error(" error: option `%s' argument missing", option.flags); + } + console.error(); + process.exit(1); +}; + +/** + * Unknown option `flag`. + * + * @param {String} flag + * @api private + */ + +Command.prototype.unknownOption = function(flag){ + console.error(); + console.error(" error: unknown option `%s'", flag); + console.error(); + process.exit(1); +}; + + +/** + * Set the program version to `str`. + * + * This method auto-registers the "-V, --version" flag + * which will print the version number when passed. + * + * @param {String} str + * @param {String} flags + * @return {Command} for chaining + * @api public + */ + +Command.prototype.version = function(str, flags){ + if (0 == arguments.length) return this._version; + this._version = str; + flags = flags || '-V, --version'; + this.option(flags, 'output the version number'); + this.on('version', function(){ + console.log(str); + process.exit(0); + }); + return this; +}; + +/** + * Set the description `str`. + * + * @param {String} str + * @return {String|Command} + * @api public + */ + +Command.prototype.description = function(str){ + if (0 == arguments.length) return this._description; + this._description = str; + return this; +}; + +/** + * Set / get the command usage `str`. + * + * @param {String} str + * @return {String|Command} + * @api public + */ + +Command.prototype.usage = function(str){ + var args = this._args.map(function(arg){ + return arg.required + ? '<' + arg.name + '>' + : '[' + arg.name + ']'; + }); + + var usage = '[options' + + (this.commands.length ? '] [command' : '') + + ']' + + (this._args.length ? ' ' + args : ''); + + if (0 == arguments.length) return this._usage || usage; + this._usage = str; + + return this; +}; + +/** + * Return the largest option length. + * + * @return {Number} + * @api private + */ + +Command.prototype.largestOptionLength = function(){ + return this.options.reduce(function(max, option){ + return Math.max(max, option.flags.length); + }, 0); +}; + +/** + * Return help for options. + * + * @return {String} + * @api private + */ + +Command.prototype.optionHelp = function(){ + var width = this.largestOptionLength(); + + // Prepend the help information + return [pad('-h, --help', width) + ' ' + 'output usage information'] + .concat(this.options.map(function(option){ + return pad(option.flags, width) + + ' ' + option.description; + })) + .join('\n'); +}; + +/** + * Return command help documentation. + * + * @return {String} + * @api private + */ + +Command.prototype.commandHelp = function(){ + if (!this.commands.length) return ''; + return [ + '' + , ' Commands:' + , '' + , this.commands.map(function(cmd){ + var args = cmd._args.map(function(arg){ + return arg.required + ? '<' + arg.name + '>' + : '[' + arg.name + ']'; + }).join(' '); + + return pad(cmd._name + + (cmd.options.length + ? ' [options]' + : '') + ' ' + args, 22) + + (cmd.description() + ? ' ' + cmd.description() + : ''); + }).join('\n').replace(/^/gm, ' ') + , '' + ].join('\n'); +}; + +/** + * Return program help documentation. + * + * @return {String} + * @api private + */ + +Command.prototype.helpInformation = function(){ + return [ + '' + , ' Usage: ' + this._name + ' ' + this.usage() + , '' + this.commandHelp() + , ' Options:' + , '' + , '' + this.optionHelp().replace(/^/gm, ' ') + , '' + , '' + ].join('\n'); +}; + +/** + * Output help information for this command + * + * @api public + */ + +Command.prototype.outputHelp = function(){ + process.stdout.write(this.helpInformation()); + this.emit('--help'); +}; + +/** + * Output help information and exit. + * + * @api public + */ + +Command.prototype.help = function(){ + this.outputHelp(); + process.exit(); +}; + +/** + * Camel-case the given `flag` + * + * @param {String} flag + * @return {String} + * @api private + */ + +function camelcase(flag) { + return flag.split('-').reduce(function(str, word){ + return str + word[0].toUpperCase() + word.slice(1); + }); +} + +/** + * Pad `str` to `width`. + * + * @param {String} str + * @param {Number} width + * @return {String} + * @api private + */ + +function pad(str, width) { + var len = Math.max(0, width - str.length); + return str + Array(len + 1).join(' '); +} + +/** + * Output help information if necessary + * + * @param {Command} command to output help for + * @param {Array} array of options to search for -h or --help + * @api private + */ + +function outputHelpIfNecessary(cmd, options) { + options = options || []; + for (var i = 0; i < options.length; i++) { + if (options[i] == '--help' || options[i] == '-h') { + cmd.outputHelp(); + process.exit(0); + } + } +} diff --git a/pitfall/pdfkit/node_modules/commander/package.json b/pitfall/pdfkit/node_modules/commander/package.json new file mode 100644 index 00000000..d4e4e4c6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/commander/package.json @@ -0,0 +1,92 @@ +{ + "_args": [ + [ + { + "raw": "commander@2.1.0", + "scope": null, + "escapedName": "commander", + "name": "commander", + "rawSpec": "2.1.0", + "spec": "2.1.0", + "type": "version" + }, + "/Users/MB/git/pdfkit/node_modules/jade" + ] + ], + "_from": "commander@2.1.0", + "_id": "commander@2.1.0", + "_inCache": true, + "_location": "/commander", + "_npmUser": { + "name": "tjholowaychuk", + "email": "tj@vision-media.ca" + }, + "_npmVersion": "1.3.14", + "_phantomChildren": {}, + "_requested": { + "raw": "commander@2.1.0", + "scope": null, + "escapedName": "commander", + "name": "commander", + "rawSpec": "2.1.0", + "spec": "2.1.0", + "type": "version" + }, + "_requiredBy": [ + "/jade" + ], + "_resolved": "https://registry.npmjs.org/commander/-/commander-2.1.0.tgz", + "_shasum": "d121bbae860d9992a3d517ba96f56588e47c6781", + "_shrinkwrap": null, + "_spec": "commander@2.1.0", + "_where": "/Users/MB/git/pdfkit/node_modules/jade", + "author": { + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca" + }, + "bugs": { + "url": "https://github.com/visionmedia/commander.js/issues" + }, + "dependencies": {}, + "description": "the complete solution for node.js command-line programs", + "devDependencies": { + "should": ">= 0.0.1" + }, + "directories": {}, + "dist": { + "shasum": "d121bbae860d9992a3d517ba96f56588e47c6781", + "tarball": "https://registry.npmjs.org/commander/-/commander-2.1.0.tgz" + }, + "engines": { + "node": ">= 0.6.x" + }, + "files": [ + "index.js" + ], + "homepage": "https://github.com/visionmedia/commander.js", + "keywords": [ + "command", + "option", + "parser", + "prompt", + "stdin" + ], + "main": "index", + "maintainers": [ + { + "name": "tjholowaychuk", + "email": "tj@vision-media.ca" + } + ], + "name": "commander", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/visionmedia/commander.js.git" + }, + "scripts": { + "test": "make test" + }, + "version": "2.1.0" +} diff --git a/pitfall/pdfkit/node_modules/commondir/README.markdown b/pitfall/pdfkit/node_modules/commondir/README.markdown new file mode 100644 index 00000000..1326dc18 --- /dev/null +++ b/pitfall/pdfkit/node_modules/commondir/README.markdown @@ -0,0 +1,45 @@ +commondir +========= + +Compute the closest common parent directory among an array of directories. + +example +======= + +dir +--- + + > var commondir = require('commondir'); + > commondir([ '/x/y/z', '/x/y', '/x/y/w/q' ]) + '/x/y' + +base +---- + + > var commondir = require('commondir') + > commondir('/foo/bar', [ '../baz', '../../foo/quux', './bizzy' ]) + '/foo' + +methods +======= + +var commondir = require('commondir'); + +commondir(absolutePaths) +------------------------ + +Compute the closest common parent directory for an array `absolutePaths`. + +commondir(basedir, relativePaths) +--------------------------------- + +Compute the closest common parent directory for an array `relativePaths` which +will be resolved for each `dir` in `relativePaths` according to: +`path.resolve(basedir, dir)`. + +installation +============ + +Using [npm](http://npmjs.org), just do: + + npm install commondir diff --git a/pitfall/pdfkit/node_modules/commondir/example/base.js b/pitfall/pdfkit/node_modules/commondir/example/base.js new file mode 100644 index 00000000..715e280c --- /dev/null +++ b/pitfall/pdfkit/node_modules/commondir/example/base.js @@ -0,0 +1,3 @@ +var commondir = require('commondir'); +var dir = commondir('/foo/bar', [ '../baz', '../../foo/quux', './bizzy' ]) +console.log(dir); diff --git a/pitfall/pdfkit/node_modules/commondir/example/dir.js b/pitfall/pdfkit/node_modules/commondir/example/dir.js new file mode 100644 index 00000000..0a5e9cca --- /dev/null +++ b/pitfall/pdfkit/node_modules/commondir/example/dir.js @@ -0,0 +1,3 @@ +var commondir = require('commondir'); +var dir = commondir([ '/x/y/z', '/x/y', '/x/y/w/q' ]) +console.log(dir); diff --git a/pitfall/pdfkit/node_modules/commondir/index.js b/pitfall/pdfkit/node_modules/commondir/index.js new file mode 100644 index 00000000..fa77d045 --- /dev/null +++ b/pitfall/pdfkit/node_modules/commondir/index.js @@ -0,0 +1,29 @@ +var path = require('path'); + +module.exports = function (basedir, relfiles) { + if (relfiles) { + var files = relfiles.map(function (r) { + return path.resolve(basedir, r); + }); + } + else { + var files = basedir; + } + + var res = files.slice(1).reduce(function (ps, file) { + if (!file.match(/^([A-Za-z]:)?\/|\\/)) { + throw new Error('relative path without a basedir'); + } + + var xs = file.split(/\/+|\\+/); + for ( + var i = 0; + ps[i] === xs[i] && i < Math.min(ps.length, xs.length); + i++ + ); + return ps.slice(0, i); + }, files[0].split(/\/+|\\+/)); + + // Windows correctly handles paths with forward-slashes + return res.length > 1 ? res.join('/') : '/' +}; diff --git a/pitfall/pdfkit/node_modules/commondir/package.json b/pitfall/pdfkit/node_modules/commondir/package.json new file mode 100644 index 00000000..a9a738f9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/commondir/package.json @@ -0,0 +1,102 @@ +{ + "_args": [ + [ + { + "raw": "commondir@0.0.1", + "scope": null, + "escapedName": "commondir", + "name": "commondir", + "rawSpec": "0.0.1", + "spec": "0.0.1", + "type": "version" + }, + "/Users/MB/git/pdfkit/node_modules/browserify" + ] + ], + "_defaultsLoaded": true, + "_engineSupported": true, + "_from": "commondir@0.0.1", + "_id": "commondir@0.0.1", + "_inCache": true, + "_location": "/commondir", + "_nodeVersion": "v0.4.12", + "_npmUser": { + "name": "substack", + "email": "mail@substack.net" + }, + "_npmVersion": "1.0.101", + "_phantomChildren": {}, + "_requested": { + "raw": "commondir@0.0.1", + "scope": null, + "escapedName": "commondir", + "name": "commondir", + "rawSpec": "0.0.1", + "spec": "0.0.1", + "type": "version" + }, + "_requiredBy": [ + "/browserify" + ], + "_resolved": "https://registry.npmjs.org/commondir/-/commondir-0.0.1.tgz", + "_shasum": "89f00fdcd51b519c578733fec563e6a6da7f5be2", + "_shrinkwrap": null, + "_spec": "commondir@0.0.1", + "_where": "/Users/MB/git/pdfkit/node_modules/browserify", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/substack/node-commondir/issues" + }, + "dependencies": {}, + "description": "Compute the closest common parent for file paths", + "devDependencies": { + "expresso": "0.7.x" + }, + "directories": { + "lib": ".", + "example": "example", + "test": "test" + }, + "dist": { + "shasum": "89f00fdcd51b519c578733fec563e6a6da7f5be2", + "tarball": "https://registry.npmjs.org/commondir/-/commondir-0.0.1.tgz" + }, + "engine": { + "node": ">=0.4" + }, + "engines": { + "node": "*" + }, + "homepage": "https://github.com/substack/node-commondir#readme", + "keywords": [ + "common", + "path", + "directory", + "file", + "parent", + "root" + ], + "license": "MIT/X11", + "main": "index.js", + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "name": "commondir", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/substack/node-commondir.git" + }, + "scripts": { + "test": "expresso" + }, + "version": "0.0.1" +} diff --git a/pitfall/pdfkit/node_modules/commondir/test/dirs.js b/pitfall/pdfkit/node_modules/commondir/test/dirs.js new file mode 100644 index 00000000..946026d1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/commondir/test/dirs.js @@ -0,0 +1,66 @@ +var assert = require('assert'); +var commondir = require('../'); + +exports.common = function () { + assert.equal( + commondir([ '/foo', '//foo/bar', '/foo//bar/baz' ]), + '/foo' + ); + + assert.equal( + commondir([ '/a/b/c', '/a/b', '/a/b/c/d/e' ]), + '/a/b' + ); + + assert.equal( + commondir([ '/x/y/z/w', '/xy/z', '/x/y/z' ]), + '/' + ); + + assert.equal( + commondir([ 'X:\\foo', 'X:\\\\foo\\bar', 'X://foo/bar/baz' ]), + 'X:/foo' + ); + + assert.equal( + commondir([ 'X:\\a\\b\\c', 'X:\\a\\b', 'X:\\a\\b\\c\\d\\e' ]), + 'X:/a/b' + ); + + assert.equal( + commondir([ 'X:\\x\\y\\z\\w', '\\\\xy\\z', '\\x\\y\\z' ]), + '/' + ); + + assert.throws(function () { + assert.equal( + commondir([ '/x/y/z/w', 'qrs', '/x/y/z' ]), + '/' + ); + }); +}; + +exports.base = function () { + assert.equal( + commondir('/foo/bar', [ 'baz', './quux', '../bar/bazzy' ]), + '/foo/bar' + ); + + assert.equal( + commondir('/a/b', [ 'c', '../b/.', '../../a/b/e' ]), + '/a/b' + ); + + assert.equal( + commondir('/a/b/c', [ '..', '../d', '../../a/z/e' ]), + '/a' + ); + + assert.equal( + commondir('/foo/bar', [ 'baz', '.\\quux', '..\\bar\\bazzy' ]), + '/foo/bar' + ); + + // Tests including X:\ basedirs must wait until path.resolve supports + // Windows-style paths, starting in Node.js v0.5.X +}; diff --git a/pitfall/pdfkit/node_modules/concat-stream/LICENSE b/pitfall/pdfkit/node_modules/concat-stream/LICENSE new file mode 100644 index 00000000..99c130e1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/concat-stream/LICENSE @@ -0,0 +1,24 @@ +The MIT License + +Copyright (c) 2013 Max Ogden + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/concat-stream/index.js b/pitfall/pdfkit/node_modules/concat-stream/index.js new file mode 100644 index 00000000..b55ae7e0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/concat-stream/index.js @@ -0,0 +1,136 @@ +var Writable = require('readable-stream').Writable +var inherits = require('inherits') + +if (typeof Uint8Array === 'undefined') { + var U8 = require('typedarray').Uint8Array +} else { + var U8 = Uint8Array +} + +function ConcatStream(opts, cb) { + if (!(this instanceof ConcatStream)) return new ConcatStream(opts, cb) + + if (typeof opts === 'function') { + cb = opts + opts = {} + } + if (!opts) opts = {} + + var encoding = opts.encoding + var shouldInferEncoding = false + + if (!encoding) { + shouldInferEncoding = true + } else { + encoding = String(encoding).toLowerCase() + if (encoding === 'u8' || encoding === 'uint8') { + encoding = 'uint8array' + } + } + + Writable.call(this, { objectMode: true }) + + this.encoding = encoding + this.shouldInferEncoding = shouldInferEncoding + + if (cb) this.on('finish', function () { cb(this.getBody()) }) + this.body = [] +} + +module.exports = ConcatStream +inherits(ConcatStream, Writable) + +ConcatStream.prototype._write = function(chunk, enc, next) { + this.body.push(chunk) + next() +} + +ConcatStream.prototype.inferEncoding = function (buff) { + var firstBuffer = buff === undefined ? this.body[0] : buff; + if (Buffer.isBuffer(firstBuffer)) return 'buffer' + if (typeof Uint8Array !== 'undefined' && firstBuffer instanceof Uint8Array) return 'uint8array' + if (Array.isArray(firstBuffer)) return 'array' + if (typeof firstBuffer === 'string') return 'string' + if (Object.prototype.toString.call(firstBuffer) === "[object Object]") return 'object' + return 'buffer' +} + +ConcatStream.prototype.getBody = function () { + if (!this.encoding && this.body.length === 0) return [] + if (this.shouldInferEncoding) this.encoding = this.inferEncoding() + if (this.encoding === 'array') return arrayConcat(this.body) + if (this.encoding === 'string') return stringConcat(this.body) + if (this.encoding === 'buffer') return bufferConcat(this.body) + if (this.encoding === 'uint8array') return u8Concat(this.body) + return this.body +} + +var isArray = Array.isArray || function (arr) { + return Object.prototype.toString.call(arr) == '[object Array]' +} + +function isArrayish (arr) { + return /Array\]$/.test(Object.prototype.toString.call(arr)) +} + +function stringConcat (parts) { + var strings = [] + var needsToString = false + for (var i = 0; i < parts.length; i++) { + var p = parts[i] + if (typeof p === 'string') { + strings.push(p) + } else if (Buffer.isBuffer(p)) { + strings.push(p) + } else { + strings.push(Buffer(p)) + } + } + if (Buffer.isBuffer(parts[0])) { + strings = Buffer.concat(strings) + strings = strings.toString('utf8') + } else { + strings = strings.join('') + } + return strings +} + +function bufferConcat (parts) { + var bufs = [] + for (var i = 0; i < parts.length; i++) { + var p = parts[i] + if (Buffer.isBuffer(p)) { + bufs.push(p) + } else if (typeof p === 'string' || isArrayish(p) + || (p && typeof p.subarray === 'function')) { + bufs.push(Buffer(p)) + } else bufs.push(Buffer(String(p))) + } + return Buffer.concat(bufs) +} + +function arrayConcat (parts) { + var res = [] + for (var i = 0; i < parts.length; i++) { + res.push.apply(res, parts[i]) + } + return res +} + +function u8Concat (parts) { + var len = 0 + for (var i = 0; i < parts.length; i++) { + if (typeof parts[i] === 'string') { + parts[i] = Buffer(parts[i]) + } + len += parts[i].length + } + var u8 = new U8(len) + for (var i = 0, offset = 0; i < parts.length; i++) { + var part = parts[i] + for (var j = 0; j < part.length; j++) { + u8[offset++] = part[j] + } + } + return u8 +} diff --git a/pitfall/pdfkit/node_modules/concat-stream/package.json b/pitfall/pdfkit/node_modules/concat-stream/package.json new file mode 100644 index 00000000..642ab10b --- /dev/null +++ b/pitfall/pdfkit/node_modules/concat-stream/package.json @@ -0,0 +1,116 @@ +{ + "_args": [ + [ + { + "raw": "concat-stream@~1.4.1", + "scope": null, + "escapedName": "concat-stream", + "name": "concat-stream", + "rawSpec": "~1.4.1", + "spec": ">=1.4.1 <1.5.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/browserify" + ] + ], + "_from": "concat-stream@>=1.4.1 <1.5.0", + "_id": "concat-stream@1.4.10", + "_inCache": true, + "_location": "/concat-stream", + "_nodeVersion": "1.8.2", + "_npmUser": { + "name": "maxogden", + "email": "max@maxogden.com" + }, + "_npmVersion": "2.9.0", + "_phantomChildren": {}, + "_requested": { + "raw": "concat-stream@~1.4.1", + "scope": null, + "escapedName": "concat-stream", + "name": "concat-stream", + "rawSpec": "~1.4.1", + "spec": ">=1.4.1 <1.5.0", + "type": "range" + }, + "_requiredBy": [ + "/browserify", + "/insert-module-globals", + "/module-deps" + ], + "_resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.4.10.tgz", + "_shasum": "acc3bbf5602cb8cc980c6ac840fa7d8603e3ef36", + "_shrinkwrap": null, + "_spec": "concat-stream@~1.4.1", + "_where": "/Users/MB/git/pdfkit/node_modules/browserify", + "author": { + "name": "Max Ogden", + "email": "max@maxogden.com" + }, + "bugs": { + "url": "http://github.com/maxogden/concat-stream/issues" + }, + "dependencies": { + "inherits": "~2.0.1", + "readable-stream": "~1.1.9", + "typedarray": "~0.0.5" + }, + "description": "writable stream that concatenates strings or binary data and calls a callback with the result", + "devDependencies": { + "tape": "~2.3.2" + }, + "directories": {}, + "dist": { + "shasum": "acc3bbf5602cb8cc980c6ac840fa7d8603e3ef36", + "tarball": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.4.10.tgz" + }, + "engines": [ + "node >= 0.8" + ], + "files": [ + "index.js" + ], + "gitHead": "71d37be263a0457b8afcbb27237e71ddca634373", + "homepage": "https://github.com/maxogden/concat-stream#readme", + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "maxogden", + "email": "max@maxogden.com" + } + ], + "name": "concat-stream", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/maxogden/concat-stream.git" + }, + "scripts": { + "test": "tape test/*.js test/server/*.js" + }, + "tags": [ + "stream", + "simple", + "util", + "utility" + ], + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "firefox/17..latest", + "firefox/nightly", + "chrome/22..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + }, + "version": "1.4.10" +} diff --git a/pitfall/pdfkit/node_modules/concat-stream/readme.md b/pitfall/pdfkit/node_modules/concat-stream/readme.md new file mode 100644 index 00000000..69234d52 --- /dev/null +++ b/pitfall/pdfkit/node_modules/concat-stream/readme.md @@ -0,0 +1,94 @@ +# concat-stream + +Writable stream that concatenates strings or binary data and calls a callback with the result. Not a transform stream -- more of a stream sink. + +[![Build Status](https://travis-ci.org/maxogden/concat-stream.svg?branch=master)](https://travis-ci.org/maxogden/concat-stream) + +[![NPM](https://nodei.co/npm/concat-stream.png)](https://nodei.co/npm/concat-stream/) + +### description + +Streams emit many buffers. If you want to collect all of the buffers, and when the stream ends concatenate all of the buffers together and receive a single buffer then this is the module for you. + +Only use this if you know you can fit all of the output of your stream into a single Buffer (e.g. in RAM). + +There are also `objectMode` streams that emit things other than Buffers, and you can concatenate these too. See below for details. + +### examples + +#### Buffers + +```js +var fs = require('fs') +var concat = require('concat-stream') + +var readStream = fs.createReadStream('cat.png') +var concatStream = concat(gotPicture) + +readStream.on('error', handleError) +readStream.pipe(concatStream) + +function gotPicture(imageBuffer) { + // imageBuffer is all of `cat.png` as a node.js Buffer +} + +function handleError(err) { + // handle your error appropriately here, e.g.: + console.error(err) // print the error to STDERR + process.exit(1) // exit program with non-zero exit code +} + +``` + +#### Arrays + +```js +var write = concat(function(data) {}) +write.write([1,2,3]) +write.write([4,5,6]) +write.end() +// data will be [1,2,3,4,5,6] in the above callback +``` + +#### Uint8Arrays + +```js +var write = concat(function(data) {}) +var a = new Uint8Array(3) +a[0] = 97; a[1] = 98; a[2] = 99 +write.write(a) +write.write('!') +write.end(Buffer('!!1')) +``` + +See `test/` for more examples + +# methods + +```js +var concat = require('concat-stream') +``` + +## var writable = concat(opts={}, cb) + +Return a `writable` stream that will fire `cb(data)` with all of the data that +was written to the stream. Data can be written to `writable` as strings, +Buffers, arrays of byte integers, and Uint8Arrays. + +By default `concat-stream` will give you back the same data type as the type of the first buffer written to the stream. Use `opts.encoding` to set what format `data` should be returned as, e.g. if you if you don't want to rely on the built-in type checking or for some other reason. + +* `string` - get a string +* `buffer` - get back a Buffer +* `array` - get an array of byte integers +* `uint8array`, `u8`, `uint8` - get back a Uint8Array +* `object`, get back an array of Objects + +If you don't specify an encoding, and the types can't be inferred (e.g. you write things that aren't in the list above), it will try to convert concat them into a `Buffer`. + +# error handling + +`concat-stream` does not handle errors for you, so you must handle errors on whatever streams you pipe into `concat-stream`. This is a general rule when programming with node.js streams: always handle errors on each and every stream. Since `concat-stream` is not itself a stream it does not emit errors. + +# license + +MIT LICENSE diff --git a/pitfall/pdfkit/node_modules/console-browserify/.npmignore b/pitfall/pdfkit/node_modules/console-browserify/.npmignore new file mode 100644 index 00000000..aa3fd4b8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/console-browserify/.npmignore @@ -0,0 +1,14 @@ +.DS_Store +.monitor +.*.swp +.nodemonignore +releases +*.log +*.err +fleet.json +public/browserify +bin/*.json +.bin +build +compile +.lock-wscript diff --git a/pitfall/pdfkit/node_modules/console-browserify/.testem.json b/pitfall/pdfkit/node_modules/console-browserify/.testem.json new file mode 100644 index 00000000..633c2ba8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/console-browserify/.testem.json @@ -0,0 +1,14 @@ +{ + "launchers": { + "node": { + "command": "npm test" + } + }, + "src_files": [ + "./**/*.js" + ], + "before_tests": "npm run build", + "on_exit": "rm test/static/bundle.js", + "test_page": "test/static/index.html", + "launch_in_dev": ["node", "phantomjs"] +} diff --git a/pitfall/pdfkit/node_modules/console-browserify/.travis.yml b/pitfall/pdfkit/node_modules/console-browserify/.travis.yml new file mode 100644 index 00000000..ed178f63 --- /dev/null +++ b/pitfall/pdfkit/node_modules/console-browserify/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.8 + - 0.9 diff --git a/pitfall/pdfkit/node_modules/console-browserify/LICENCE b/pitfall/pdfkit/node_modules/console-browserify/LICENCE new file mode 100644 index 00000000..a23e08a8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/console-browserify/LICENCE @@ -0,0 +1,19 @@ +Copyright (c) 2012 Raynos. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND 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. \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/console-browserify/README.md b/pitfall/pdfkit/node_modules/console-browserify/README.md new file mode 100644 index 00000000..5e480ba5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/console-browserify/README.md @@ -0,0 +1,32 @@ +# console-browserify + +[![build status][1]][2] + +[![browser support][3]][4] + +Emulate console for all the browsers + +## Example + +```js +var console = require("console-browserify") + +console.log("hello world!") +``` + +## Installation + +`npm install console-browserify` + +## Contributors + + - Raynos + +## MIT Licenced + + + + [1]: https://secure.travis-ci.org/Raynos/console-browserify.png + [2]: http://travis-ci.org/Raynos/console-browserify + [3]: http://ci.testling.com/Raynos/console-browserify.png + [4]: http://ci.testling.com/Raynos/console-browserify diff --git a/pitfall/pdfkit/node_modules/console-browserify/index.js b/pitfall/pdfkit/node_modules/console-browserify/index.js new file mode 100644 index 00000000..f90cc19c --- /dev/null +++ b/pitfall/pdfkit/node_modules/console-browserify/index.js @@ -0,0 +1,85 @@ +/*global window, global*/ +var util = require("util") +var assert = require("assert") + +var slice = Array.prototype.slice +var console +var times = {} + +if (typeof global !== "undefined" && global.console) { + console = global.console +} else if (typeof window !== "undefined" && window.console) { + console = window.console +} else { + console = {} +} + +var functions = [ + [log, "log"] + , [info, "info"] + , [warn, "warn"] + , [error, "error"] + , [time, "time"] + , [timeEnd, "timeEnd"] + , [trace, "trace"] + , [dir, "dir"] + , [assert, "assert"] +] + +for (var i = 0; i < functions.length; i++) { + var tuple = functions[i] + var f = tuple[0] + var name = tuple[1] + + if (!console[name]) { + console[name] = f + } +} + +module.exports = console + +function log() {} + +function info() { + console.log.apply(console, arguments) +} + +function warn() { + console.log.apply(console, arguments) +} + +function error() { + console.warn.apply(console, arguments) +} + +function time(label) { + times[label] = Date.now() +} + +function timeEnd(label) { + var time = times[label] + if (!time) { + throw new Error("No such label: " + label) + } + + var duration = Date.now() - time + console.log(label + ": " + duration + "ms") +} + +function trace() { + var err = new Error() + err.name = "Trace" + err.message = util.format.apply(null, arguments) + console.error(err.stack) +} + +function dir(object) { + console.log(util.inspect(object) + "\n") +} + +function assert(expression) { + if (!expression) { + var arr = slice.call(arguments, 1) + assert.ok(false, util.format.apply(null, arr)) + } +} diff --git a/pitfall/pdfkit/node_modules/console-browserify/package.json b/pitfall/pdfkit/node_modules/console-browserify/package.json new file mode 100644 index 00000000..aaf19bb7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/console-browserify/package.json @@ -0,0 +1,126 @@ +{ + "_args": [ + [ + { + "raw": "console-browserify@~1.0.1", + "scope": null, + "escapedName": "console-browserify", + "name": "console-browserify", + "rawSpec": "~1.0.1", + "spec": ">=1.0.1 <1.1.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/browserify" + ] + ], + "_from": "console-browserify@>=1.0.1 <1.1.0", + "_id": "console-browserify@1.0.3", + "_inCache": true, + "_location": "/console-browserify", + "_npmUser": { + "name": "raynos", + "email": "raynos2@gmail.com" + }, + "_npmVersion": "1.3.17", + "_phantomChildren": {}, + "_requested": { + "raw": "console-browserify@~1.0.1", + "scope": null, + "escapedName": "console-browserify", + "name": "console-browserify", + "rawSpec": "~1.0.1", + "spec": ">=1.0.1 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "/browserify" + ], + "_resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.0.3.tgz", + "_shasum": "d3898d2c3a93102f364197f8874b4f92b5286a8e", + "_shrinkwrap": null, + "_spec": "console-browserify@~1.0.1", + "_where": "/Users/MB/git/pdfkit/node_modules/browserify", + "author": { + "name": "Raynos", + "email": "raynos2@gmail.com" + }, + "bugs": { + "url": "https://github.com/Raynos/console-browserify/issues", + "email": "raynos2@gmail.com" + }, + "contributors": [ + { + "name": "Raynos" + } + ], + "dependencies": {}, + "description": "Emulate console for all the browsers", + "devDependencies": { + "browserify": "https://github.com/raynos/node-browserify/tarball/master", + "jsonify": "0.0.0", + "tape": "~2.3.0", + "testem": "~0.2.55" + }, + "directories": {}, + "dist": { + "shasum": "d3898d2c3a93102f364197f8874b4f92b5286a8e", + "tarball": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.0.3.tgz" + }, + "homepage": "https://github.com/Raynos/console-browserify", + "keywords": [], + "licenses": [ + { + "type": "MIT", + "url": "http://github.com/Raynos/console-browserify/raw/master/LICENSE" + } + ], + "main": "index", + "maintainers": [ + { + "name": "raynos", + "email": "raynos2@gmail.com" + } + ], + "name": "console-browserify", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/Raynos/console-browserify.git" + }, + "scripts": { + "build": "browserify test/index.js -o test/static/bundle.js", + "test": "node ./test", + "testem": "testem" + }, + "testling": { + "files": "test/index.js", + "browsers": { + "ie": [ + "6", + "7", + "8", + "9", + "10" + ], + "firefox": [ + "16", + "17", + "nightly" + ], + "chrome": [ + "22", + "23", + "canary" + ], + "opera": [ + "12", + "next" + ], + "safari": [ + "5.1" + ] + } + }, + "version": "1.0.3" +} diff --git a/pitfall/pdfkit/node_modules/console-browserify/test/index.js b/pitfall/pdfkit/node_modules/console-browserify/test/index.js new file mode 100644 index 00000000..26dfaad6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/console-browserify/test/index.js @@ -0,0 +1,67 @@ +var console = require("../index") +var test = require("tape") + +if (typeof window !== "undefined" && !window.JSON) { + window.JSON = require("jsonify") +} + +test("console has expected methods", function (assert) { + assert.ok(console.log) + assert.ok(console.info) + assert.ok(console.warn) + assert.ok(console.dir) + assert.ok(console.time, "time") + assert.ok(console.timeEnd, "timeEnd") + assert.ok(console.trace, "trace") + assert.ok(console.assert) + + assert.end() +}) + +test("invoke console.log", function (assert) { + console.log("test-log") + + assert.end() +}) + +test("invoke console.info", function (assert) { + console.info("test-info") + + assert.end() +}) + +test("invoke console.warn", function (assert) { + console.warn("test-warn") + + assert.end() +}) + +test("invoke console.time", function (assert) { + console.time("label") + + assert.end() +}) + +test("invoke console.trace", function (assert) { + console.trace("test-trace") + + assert.end() +}) + +test("invoke console.assert", function (assert) { + console.assert(true) + + assert.end() +}) + +test("invoke console.dir", function (assert) { + console.dir("test-dir") + + assert.end() +}) + +test("invoke console.timeEnd", function (assert) { + console.timeEnd("label") + + assert.end() +}) diff --git a/pitfall/pdfkit/node_modules/console-browserify/test/static/index.html b/pitfall/pdfkit/node_modules/console-browserify/test/static/index.html new file mode 100644 index 00000000..dd55012f --- /dev/null +++ b/pitfall/pdfkit/node_modules/console-browserify/test/static/index.html @@ -0,0 +1,12 @@ + + + + + TAPE Example + + + + + + + diff --git a/pitfall/pdfkit/node_modules/console-browserify/test/static/test-adapter.js b/pitfall/pdfkit/node_modules/console-browserify/test/static/test-adapter.js new file mode 100644 index 00000000..8b4c12dc --- /dev/null +++ b/pitfall/pdfkit/node_modules/console-browserify/test/static/test-adapter.js @@ -0,0 +1,53 @@ +(function () { + var Testem = window.Testem + var regex = /^((?:not )?ok) (\d+) (.+)$/ + + Testem.useCustomAdapter(tapAdapter) + + function tapAdapter(socket){ + var results = { + failed: 0 + , passed: 0 + , total: 0 + , tests: [] + } + + socket.emit('tests-start') + + Testem.handleConsoleMessage = function(msg){ + var m = msg.match(regex) + if (m) { + var passed = m[1] === 'ok' + var test = { + passed: passed ? 1 : 0, + failed: passed ? 0 : 1, + total: 1, + id: m[2], + name: m[3], + items: [] + } + + if (passed) { + results.passed++ + } else { + console.error("failure", m) + + results.failed++ + } + + results.total++ + + // console.log("emitted test", test) + socket.emit('test-result', test) + results.tests.push(test) + } else if (msg === '# ok' || msg.match(/^# tests \d+/)){ + // console.log("emitted all test") + socket.emit('all-test-results', results) + } + + // return false if you want to prevent the console message from + // going to the console + // return false + } + } +}()) diff --git a/pitfall/pdfkit/node_modules/constantinople/.gitattributes b/pitfall/pdfkit/node_modules/constantinople/.gitattributes new file mode 100644 index 00000000..412eeda7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/constantinople/.gitattributes @@ -0,0 +1,22 @@ +# Auto detect text files and perform LF normalization +* text=auto + +# Custom for Visual Studio +*.cs diff=csharp +*.sln merge=union +*.csproj merge=union +*.vbproj merge=union +*.fsproj merge=union +*.dbproj merge=union + +# Standard to msysgit +*.doc diff=astextplain +*.DOC diff=astextplain +*.docx diff=astextplain +*.DOCX diff=astextplain +*.dot diff=astextplain +*.DOT diff=astextplain +*.pdf diff=astextplain +*.PDF diff=astextplain +*.rtf diff=astextplain +*.RTF diff=astextplain diff --git a/pitfall/pdfkit/node_modules/constantinople/.npmignore b/pitfall/pdfkit/node_modules/constantinople/.npmignore new file mode 100644 index 00000000..b83202d0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/constantinople/.npmignore @@ -0,0 +1,13 @@ +lib-cov +*.seed +*.log +*.csv +*.dat +*.out +*.pid +*.gz +pids +logs +results +npm-debug.log +node_modules diff --git a/pitfall/pdfkit/node_modules/constantinople/.travis.yml b/pitfall/pdfkit/node_modules/constantinople/.travis.yml new file mode 100644 index 00000000..a12e3f0f --- /dev/null +++ b/pitfall/pdfkit/node_modules/constantinople/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.8" + - "0.10" \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/constantinople/LICENSE b/pitfall/pdfkit/node_modules/constantinople/LICENSE new file mode 100644 index 00000000..35cc606f --- /dev/null +++ b/pitfall/pdfkit/node_modules/constantinople/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2013 Forbes Lindesay + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND 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. \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/constantinople/README.md b/pitfall/pdfkit/node_modules/constantinople/README.md new file mode 100644 index 00000000..ad156c01 --- /dev/null +++ b/pitfall/pdfkit/node_modules/constantinople/README.md @@ -0,0 +1,35 @@ +# constantinople + +Determine whether a JavaScript expression evaluates to a constant (using UglifyJS). Here it is assumed to be safe to underestimate how constant something is. + +[![Build Status](https://travis-ci.org/ForbesLindesay/constantinople.png?branch=master)](https://travis-ci.org/ForbesLindesay/constantinople) +[![Dependency Status](https://gemnasium.com/ForbesLindesay/constantinople.png)](https://gemnasium.com/ForbesLindesay/constantinople) +[![NPM version](https://badge.fury.io/js/constantinople.png)](http://badge.fury.io/js/constantinople) + +## Installation + + npm install constantinople + +## Usage + +```js +var isConstant = require('constantinople') + +if (isConstant('"foo" + 5')) { + console.dir(isConstant.toConstant('"foo" + 5')) +} +``` + +## API + +### isConstant(src) + +Returns `true` if `src` evaluates to a constant, `false` otherwise. It will also return `false` if there is a syntax error, which makes it safe to use on potentially ES6 code. + +### toConstant(src) + +Returns the value resulting from evaluating `src`. This method throws an error if the expression is not constant. e.g. `toConstant("Math.random()")` would throw an error. + +## License + + MIT \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/constantinople/index.js b/pitfall/pdfkit/node_modules/constantinople/index.js new file mode 100644 index 00000000..3ed8a00d --- /dev/null +++ b/pitfall/pdfkit/node_modules/constantinople/index.js @@ -0,0 +1,35 @@ +'use strict' + +var uglify = require('uglify-js') + +var lastSRC = '(null)' +var lastRes = true + +module.exports = isConstant +function isConstant(src) { + src = '(' + src + ')' + if (lastSRC === src) return lastRes + lastSRC = src + try { + return lastRes = (detect(src).length === 0) + } catch (ex) { + return lastRes = false + } +} +isConstant.isConstant = isConstant + +isConstant.toConstant = toConstant +function toConstant(src) { + if (!isConstant(src)) throw new Error(JSON.stringify(src) + ' is not constant.') + return Function('return (' + src + ')')() +} + +function detect(src) { + var ast = uglify.parse(src.toString()) + ast.figure_out_scope() + var globals = ast.globals + .map(function (node, name) { + return name + }) + return globals +} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/constantinople/package.json b/pitfall/pdfkit/node_modules/constantinople/package.json new file mode 100644 index 00000000..d6d3d9c1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/constantinople/package.json @@ -0,0 +1,81 @@ +{ + "_args": [ + [ + { + "raw": "constantinople@~1.0.2", + "scope": null, + "escapedName": "constantinople", + "name": "constantinople", + "rawSpec": "~1.0.2", + "spec": ">=1.0.2 <1.1.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/jade" + ] + ], + "_from": "constantinople@>=1.0.2 <1.1.0", + "_id": "constantinople@1.0.2", + "_inCache": true, + "_location": "/constantinople", + "_npmUser": { + "name": "forbeslindesay", + "email": "forbes@lindesay.co.uk" + }, + "_npmVersion": "1.2.32", + "_phantomChildren": {}, + "_requested": { + "raw": "constantinople@~1.0.2", + "scope": null, + "escapedName": "constantinople", + "name": "constantinople", + "rawSpec": "~1.0.2", + "spec": ">=1.0.2 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "/jade" + ], + "_resolved": "https://registry.npmjs.org/constantinople/-/constantinople-1.0.2.tgz", + "_shasum": "0e64747dc836644d3f659247efd95231b48c3e71", + "_shrinkwrap": null, + "_spec": "constantinople@~1.0.2", + "_where": "/Users/MB/git/pdfkit/node_modules/jade", + "author": { + "name": "ForbesLindesay" + }, + "bugs": { + "url": "https://github.com/ForbesLindesay/constantinople/issues" + }, + "dependencies": { + "uglify-js": "~2.4.0" + }, + "description": "Determine whether a JavaScript expression evaluates to a constant (using UglifyJS)", + "devDependencies": { + "mocha": "*" + }, + "directories": {}, + "dist": { + "shasum": "0e64747dc836644d3f659247efd95231b48c3e71", + "tarball": "https://registry.npmjs.org/constantinople/-/constantinople-1.0.2.tgz" + }, + "homepage": "https://github.com/ForbesLindesay/constantinople#readme", + "keywords": [], + "license": "MIT", + "maintainers": [ + { + "name": "forbeslindesay", + "email": "forbes@lindesay.co.uk" + } + ], + "name": "constantinople", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/ForbesLindesay/constantinople.git" + }, + "scripts": { + "test": "mocha -R spec" + }, + "version": "1.0.2" +} diff --git a/pitfall/pdfkit/node_modules/constantinople/test/index.js b/pitfall/pdfkit/node_modules/constantinople/test/index.js new file mode 100644 index 00000000..e652bd89 --- /dev/null +++ b/pitfall/pdfkit/node_modules/constantinople/test/index.js @@ -0,0 +1,51 @@ +'use strict' + +var assert = require('assert') +var constaninople = require('../') + +describe('isConstant(src)', function () { + it('handles "[5 + 3 + 10]"', function () { + assert(constaninople.isConstant('[5 + 3 + 10]') === true) + }) + it('handles "/[a-z]/.test(\'a\')"', function () { + assert(constaninople.isConstant('/[a-z]/.test(\'a\')') === true) + }) + it('handles "{\'class\': [(\'data\')]}"', function () { + assert(constaninople.isConstant('{\'class\': [(\'data\')]}') === true) + }) + it('handles "Math.random()"', function () { + assert(constaninople.isConstant('Math.random()') === false) + }) + it('handles "Math.random("', function () { + assert(constaninople.isConstant('Math.random(') === false) + }) +}) + + +describe('toConstant(src)', function () { + it('handles "[5 + 3 + 10]"', function () { + assert.deepEqual(constaninople.toConstant('[5 + 3 + 10]'), [5 + 3 + 10]) + }) + it('handles "/[a-z]/.test(\'a\')"', function () { + assert(constaninople.toConstant('/[a-z]/.test(\'a\')') === true) + }) + it('handles "{\'class\': [(\'data\')]}"', function () { + assert.deepEqual(constaninople.toConstant('{\'class\': [(\'data\')]}'), {'class': ['data']}) + }) + it('handles "Math.random()"', function () { + try { + constaninople.toConstant('Math.random()') + } catch (ex) { + return + } + assert(false, 'Math.random() should result in an error') + }) + it('handles "Math.random("', function () { + try { + constaninople.toConstant('Math.random(') + } catch (ex) { + return + } + assert(false, 'Math.random( should result in an error') + }) +}) \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/constants-browserify/README.md b/pitfall/pdfkit/node_modules/constants-browserify/README.md new file mode 100644 index 00000000..bef2afe2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/constants-browserify/README.md @@ -0,0 +1,52 @@ + +# constants-browserify + +Node's `constants` module for the browser. + +## Usage + +To use with browserify cli: + +```bash +$ browserify -r constants:constants-browserify script.js +``` + +To use with browserify api: + +```js +browserify() + .require('constants-browserify', { expose: 'constants' }) + .add(__dirname + '/script.js') + .bundle() + // ... +``` + +## Installation + +With [npm](http://npmjs.org) do + +```bash +$ npm install constants-browserify +``` + +## License + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/constants-browserify/build.sh b/pitfall/pdfkit/node_modules/constants-browserify/build.sh new file mode 100755 index 00000000..60012d66 --- /dev/null +++ b/pitfall/pdfkit/node_modules/constants-browserify/build.sh @@ -0,0 +1 @@ +node -pe 'JSON.stringify(require("constants"), null, " ")' > constants.json diff --git a/pitfall/pdfkit/node_modules/constants-browserify/constants.json b/pitfall/pdfkit/node_modules/constants-browserify/constants.json new file mode 100644 index 00000000..904c344b --- /dev/null +++ b/pitfall/pdfkit/node_modules/constants-browserify/constants.json @@ -0,0 +1,178 @@ +{ + "O_RDONLY": 0, + "O_WRONLY": 1, + "O_RDWR": 2, + "S_IFMT": 61440, + "S_IFREG": 32768, + "S_IFDIR": 16384, + "S_IFCHR": 8192, + "S_IFBLK": 24576, + "S_IFIFO": 4096, + "S_IFLNK": 40960, + "S_IFSOCK": 49152, + "O_CREAT": 512, + "O_EXCL": 2048, + "O_NOCTTY": 131072, + "O_TRUNC": 1024, + "O_APPEND": 8, + "O_DIRECTORY": 1048576, + "O_NOFOLLOW": 256, + "O_SYNC": 128, + "O_SYMLINK": 2097152, + "S_IRWXU": 448, + "S_IRUSR": 256, + "S_IWUSR": 128, + "S_IXUSR": 64, + "S_IRWXG": 56, + "S_IRGRP": 32, + "S_IWGRP": 16, + "S_IXGRP": 8, + "S_IRWXO": 7, + "S_IROTH": 4, + "S_IWOTH": 2, + "S_IXOTH": 1, + "E2BIG": 7, + "EACCES": 13, + "EADDRINUSE": 48, + "EADDRNOTAVAIL": 49, + "EAFNOSUPPORT": 47, + "EAGAIN": 35, + "EALREADY": 37, + "EBADF": 9, + "EBADMSG": 94, + "EBUSY": 16, + "ECANCELED": 89, + "ECHILD": 10, + "ECONNABORTED": 53, + "ECONNREFUSED": 61, + "ECONNRESET": 54, + "EDEADLK": 11, + "EDESTADDRREQ": 39, + "EDOM": 33, + "EDQUOT": 69, + "EEXIST": 17, + "EFAULT": 14, + "EFBIG": 27, + "EHOSTUNREACH": 65, + "EIDRM": 90, + "EILSEQ": 92, + "EINPROGRESS": 36, + "EINTR": 4, + "EINVAL": 22, + "EIO": 5, + "EISCONN": 56, + "EISDIR": 21, + "ELOOP": 62, + "EMFILE": 24, + "EMLINK": 31, + "EMSGSIZE": 40, + "EMULTIHOP": 95, + "ENAMETOOLONG": 63, + "ENETDOWN": 50, + "ENETRESET": 52, + "ENETUNREACH": 51, + "ENFILE": 23, + "ENOBUFS": 55, + "ENODATA": 96, + "ENODEV": 19, + "ENOENT": 2, + "ENOEXEC": 8, + "ENOLCK": 77, + "ENOLINK": 97, + "ENOMEM": 12, + "ENOMSG": 91, + "ENOPROTOOPT": 42, + "ENOSPC": 28, + "ENOSR": 98, + "ENOSTR": 99, + "ENOSYS": 78, + "ENOTCONN": 57, + "ENOTDIR": 20, + "ENOTEMPTY": 66, + "ENOTSOCK": 38, + "ENOTSUP": 45, + "ENOTTY": 25, + "ENXIO": 6, + "EOPNOTSUPP": 102, + "EOVERFLOW": 84, + "EPERM": 1, + "EPIPE": 32, + "EPROTO": 100, + "EPROTONOSUPPORT": 43, + "EPROTOTYPE": 41, + "ERANGE": 34, + "EROFS": 30, + "ESPIPE": 29, + "ESRCH": 3, + "ESTALE": 70, + "ETIME": 101, + "ETIMEDOUT": 60, + "ETXTBSY": 26, + "EWOULDBLOCK": 35, + "EXDEV": 18, + "SIGHUP": 1, + "SIGINT": 2, + "SIGQUIT": 3, + "SIGILL": 4, + "SIGTRAP": 5, + "SIGABRT": 6, + "SIGIOT": 6, + "SIGBUS": 10, + "SIGFPE": 8, + "SIGKILL": 9, + "SIGUSR1": 30, + "SIGSEGV": 11, + "SIGUSR2": 31, + "SIGPIPE": 13, + "SIGALRM": 14, + "SIGTERM": 15, + "SIGCHLD": 20, + "SIGCONT": 19, + "SIGSTOP": 17, + "SIGTSTP": 18, + "SIGTTIN": 21, + "SIGTTOU": 22, + "SIGURG": 16, + "SIGXCPU": 24, + "SIGXFSZ": 25, + "SIGVTALRM": 26, + "SIGPROF": 27, + "SIGWINCH": 28, + "SIGIO": 23, + "SIGSYS": 12, + "SSL_OP_ALL": 2147486719, + "SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION": 262144, + "SSL_OP_CIPHER_SERVER_PREFERENCE": 4194304, + "SSL_OP_CISCO_ANYCONNECT": 32768, + "SSL_OP_COOKIE_EXCHANGE": 8192, + "SSL_OP_CRYPTOPRO_TLSEXT_BUG": 2147483648, + "SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS": 2048, + "SSL_OP_EPHEMERAL_RSA": 2097152, + "SSL_OP_LEGACY_SERVER_CONNECT": 4, + "SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER": 32, + "SSL_OP_MICROSOFT_SESS_ID_BUG": 1, + "SSL_OP_MSIE_SSLV2_RSA_PADDING": 64, + "SSL_OP_NETSCAPE_CA_DN_BUG": 536870912, + "SSL_OP_NETSCAPE_CHALLENGE_BUG": 2, + "SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG": 1073741824, + "SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG": 8, + "SSL_OP_NO_COMPRESSION": 131072, + "SSL_OP_NO_QUERY_MTU": 4096, + "SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION": 65536, + "SSL_OP_NO_SSLv2": 16777216, + "SSL_OP_NO_SSLv3": 33554432, + "SSL_OP_NO_TICKET": 16384, + "SSL_OP_NO_TLSv1": 67108864, + "SSL_OP_NO_TLSv1_1": 268435456, + "SSL_OP_NO_TLSv1_2": 134217728, + "SSL_OP_PKCS1_CHECK_1": 0, + "SSL_OP_PKCS1_CHECK_2": 0, + "SSL_OP_SINGLE_DH_USE": 1048576, + "SSL_OP_SINGLE_ECDH_USE": 524288, + "SSL_OP_SSLEAY_080_CLIENT_DH_BUG": 128, + "SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG": 16, + "SSL_OP_TLS_BLOCK_PADDING_BUG": 512, + "SSL_OP_TLS_D5_BUG": 256, + "SSL_OP_TLS_ROLLBACK_BUG": 8388608, + "NPN_ENABLED": 1 +} diff --git a/pitfall/pdfkit/node_modules/constants-browserify/package.json b/pitfall/pdfkit/node_modules/constants-browserify/package.json new file mode 100644 index 00000000..9d50c9f1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/constants-browserify/package.json @@ -0,0 +1,82 @@ +{ + "_args": [ + [ + { + "raw": "constants-browserify@~0.0.1", + "scope": null, + "escapedName": "constants-browserify", + "name": "constants-browserify", + "rawSpec": "~0.0.1", + "spec": ">=0.0.1 <0.1.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/browserify" + ] + ], + "_from": "constants-browserify@>=0.0.1 <0.1.0", + "_id": "constants-browserify@0.0.1", + "_inCache": true, + "_location": "/constants-browserify", + "_npmUser": { + "name": "juliangruber", + "email": "julian@juliangruber.com" + }, + "_npmVersion": "1.3.2", + "_phantomChildren": {}, + "_requested": { + "raw": "constants-browserify@~0.0.1", + "scope": null, + "escapedName": "constants-browserify", + "name": "constants-browserify", + "rawSpec": "~0.0.1", + "spec": ">=0.0.1 <0.1.0", + "type": "range" + }, + "_requiredBy": [ + "/browserify" + ], + "_resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-0.0.1.tgz", + "_shasum": "92577db527ba6c4cf0a4568d84bc031f441e21f2", + "_shrinkwrap": null, + "_spec": "constants-browserify@~0.0.1", + "_where": "/Users/MB/git/pdfkit/node_modules/browserify", + "author": { + "name": "Julian Gruber", + "email": "julian@juliangruber.com", + "url": "http://juliangruber.com" + }, + "bugs": { + "url": "https://github.com/juliangruber/constants-browserify/issues" + }, + "dependencies": {}, + "description": "node's constants module for the browser", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "92577db527ba6c4cf0a4568d84bc031f441e21f2", + "tarball": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-0.0.1.tgz" + }, + "homepage": "https://github.com/juliangruber/constants-browserify", + "keywords": [ + "constants", + "node", + "browser", + "browserify" + ], + "license": "MIT", + "main": "constants.json", + "maintainers": [ + { + "name": "juliangruber", + "email": "julian@juliangruber.com" + } + ], + "name": "constants-browserify", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/constants-browserify.git" + }, + "version": "0.0.1" +} diff --git a/pitfall/pdfkit/node_modules/convert-source-map/.npmignore b/pitfall/pdfkit/node_modules/convert-source-map/.npmignore new file mode 100644 index 00000000..de78e273 --- /dev/null +++ b/pitfall/pdfkit/node_modules/convert-source-map/.npmignore @@ -0,0 +1,16 @@ +lib-cov +*.seed +*.log +*.csv +*.dat +*.out +*.pid +*.gz + +pids +logs +results + +node_modules +npm-debug.log +tmp diff --git a/pitfall/pdfkit/node_modules/convert-source-map/.travis.yml b/pitfall/pdfkit/node_modules/convert-source-map/.travis.yml new file mode 100644 index 00000000..a55b235f --- /dev/null +++ b/pitfall/pdfkit/node_modules/convert-source-map/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - 0.8 + - 0.10 + - 0.11 \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/convert-source-map/LICENSE b/pitfall/pdfkit/node_modules/convert-source-map/LICENSE new file mode 100644 index 00000000..41702c50 --- /dev/null +++ b/pitfall/pdfkit/node_modules/convert-source-map/LICENSE @@ -0,0 +1,23 @@ +Copyright 2013 Thorsten Lorenz. +All rights reserved. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +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. diff --git a/pitfall/pdfkit/node_modules/convert-source-map/README.md b/pitfall/pdfkit/node_modules/convert-source-map/README.md new file mode 100644 index 00000000..909da5a1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/convert-source-map/README.md @@ -0,0 +1,114 @@ +# convert-source-map [![build status](https://secure.travis-ci.org/thlorenz/convert-source-map.png)](http://travis-ci.org/thlorenz/convert-source-map) + +[![NPM](https://nodei.co/npm/convert-source-map.png?downloads=true&stars=true)](https://nodei.co/npm/convert-source-map/) + +Converts a source-map from/to different formats and allows adding/changing properties. + +```js +var convert = require('convert-source-map'); + +var json = convert + .fromComment('//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9vLmpzIiwic291cmNlcyI6WyJjb25zb2xlLmxvZyhcImhpXCIpOyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=') + .toJSON(); + +var modified = convert + .fromComment('//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9vLmpzIiwic291cmNlcyI6WyJjb25zb2xlLmxvZyhcImhpXCIpOyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=') + .setProperty('sources', [ 'CONSOLE.LOG("HI");' ]) + .toJSON(); + +console.log(json); +console.log(modified); +``` + +```json +{"version":3,"file":"foo.js","sources":["console.log(\"hi\");"],"names":[],"mappings":"AAAA","sourceRoot":"/"} +{"version":3,"file":"foo.js","sources":["CONSOLE.LOG(\"HI\");"],"names":[],"mappings":"AAAA","sourceRoot":"/"} +``` + +## API + +### fromObject(obj) + +Returns source map converter from given object. + +### fromJSON(json) + +Returns source map converter from given json string. + +### fromBase64(base64) + +Returns source map converter from given base64 encoded json string. + +### fromComment(comment) + +Returns source map converter from given base64 encoded json string prefixed with `//# sourceMappingURL=...`. + +### fromMapFileComment(comment, mapFileDir) + +Returns source map converter from given `filename` by parsing `//# sourceMappingURL=filename`. + +`filename` must point to a file that is found inside the `mapFileDir`. Most tools store this file right next to the +generated file, i.e. the one containing the source map. + +### fromSource(source) + +Finds last sourcemap comment in file and returns source map converter or returns null if no source map comment was +found. + +### fromMapFileSource(source, mapFileDir) + +Finds last sourcemap comment in file and returns source map converter or returns null if no source map comment was +found. + +The sourcemap will be read from the map file found by parsing `# sourceMappingURL=file` comment. For more info see +fromMapFileComment. + +### toObject() + +Returns a copy of the underlying source map. + +### toJSON([space]) + +Converts source map to json string. If `space` is given (optional), this will be passed to +[JSON.stringify](https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Global_Objects/JSON/stringify) when the +JSON string is generated. + +### toBase64() + +Converts source map to base64 encoded json string. + +### toComment() + +Converts source map to base64 encoded json string prefixed with `//# sourceMappingURL=...`. + +### addProperty(key, value) + +Adds given property to the source map. Throws an error if property already exists. + +### setProperty(key, value) + +Sets given property to the source map. If property doesn't exist it is added, otherwise its value is updated. + +### getProperty(key) + +Gets given property of the source map. + +### removeComments(src) + +Returns `src` with all source map comments removed + +### removeMapFileComments(src) + +Returns `src` with all source map comments pointing to map files removed. + +### commentRegex + +Returns the regex used to find source map comments. + +### mapFileCommentRegex + +Returns the regex used to find source map comments pointing to map files. + + +[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/thlorenz/convert-source-map/trend.png)](https://bitdeli.com/free "Bitdeli Badge") + diff --git a/pitfall/pdfkit/node_modules/convert-source-map/example/comment-to-json.js b/pitfall/pdfkit/node_modules/convert-source-map/example/comment-to-json.js new file mode 100644 index 00000000..dfab1861 --- /dev/null +++ b/pitfall/pdfkit/node_modules/convert-source-map/example/comment-to-json.js @@ -0,0 +1,15 @@ +'use strict'; + +var convert = require('..'); + +var json = convert + .fromComment('//@ sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9vLmpzIiwic291cmNlcyI6WyJjb25zb2xlLmxvZyhcImhpXCIpOyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=') + .toJSON(); + +var modified = convert + .fromComment('//@ sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9vLmpzIiwic291cmNlcyI6WyJjb25zb2xlLmxvZyhcImhpXCIpOyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSIsInNvdXJjZVJvb3QiOiIvIn0=') + .setProperty('sources', [ 'CONSOLE.LOG("HI");' ]) + .toJSON(); + +console.log(json); +console.log(modified); diff --git a/pitfall/pdfkit/node_modules/convert-source-map/index.js b/pitfall/pdfkit/node_modules/convert-source-map/index.js new file mode 100644 index 00000000..afe2758d --- /dev/null +++ b/pitfall/pdfkit/node_modules/convert-source-map/index.js @@ -0,0 +1,139 @@ +'use strict'; +var fs = require('fs'); +var path = require('path'); + +var commentRx = /^[ \t]*(?:\/\/|\/\*)[@#][ \t]+sourceMappingURL=data:(?:application|text)\/json;base64,(.+)(?:\*\/)?/mg; +var mapFileCommentRx = + // //# sourceMappingURL=foo.js.map /*# sourceMappingURL=foo.js.map */ + /(?:^[ \t]*\/\/[@|#][ \t]+sourceMappingURL=(.+?)[ \t]*$)|(?:^[ \t]*\/\*[@#][ \t]+sourceMappingURL=(.+?)[ \t]*\*\/[ \t]*$)/mg + +function decodeBase64(base64) { + return new Buffer(base64, 'base64').toString(); +} + +function stripComment(sm) { + return sm.split(',').pop(); +} + +function readFromFileMap(sm, dir) { + // NOTE: this will only work on the server since it attempts to read the map file + + var r = mapFileCommentRx.exec(sm); + mapFileCommentRx.lastIndex = 0; + + // for some odd reason //# .. captures in 1 and /* .. */ in 2 + var filename = r[1] || r[2]; + var filepath = path.join(dir, filename); + + try { + return fs.readFileSync(filepath, 'utf8'); + } catch (e) { + throw new Error('An error occurred while trying to read the map file at ' + filepath + '\n' + e); + } +} + +function Converter (sm, opts) { + opts = opts || {}; + try { + if (opts.isFileComment) sm = readFromFileMap(sm, opts.commentFileDir); + if (opts.hasComment) sm = stripComment(sm); + if (opts.isEncoded) sm = decodeBase64(sm); + if (opts.isJSON || opts.isEncoded) sm = JSON.parse(sm); + + this.sourcemap = sm; + } catch(e) { + console.error(e); + return null; + } +} + +Converter.prototype.toJSON = function (space) { + return JSON.stringify(this.sourcemap, null, space); +}; + +Converter.prototype.toBase64 = function () { + var json = this.toJSON(); + return new Buffer(json).toString('base64'); +}; + +Converter.prototype.toComment = function () { + var base64 = this.toBase64(); + return '//# sourceMappingURL=data:application/json;base64,' + base64; +}; + +// returns copy instead of original +Converter.prototype.toObject = function () { + return JSON.parse(this.toJSON()); +}; + +Converter.prototype.addProperty = function (key, value) { + if (this.sourcemap.hasOwnProperty(key)) throw new Error('property %s already exists on the sourcemap, use set property instead'); + return this.setProperty(key, value); +}; + +Converter.prototype.setProperty = function (key, value) { + this.sourcemap[key] = value; + return this; +}; + +Converter.prototype.getProperty = function (key) { + return this.sourcemap[key]; +}; + +exports.fromObject = function (obj) { + return new Converter(obj); +}; + +exports.fromJSON = function (json) { + return new Converter(json, { isJSON: true }); +}; + +exports.fromBase64 = function (base64) { + return new Converter(base64, { isEncoded: true }); +}; + +exports.fromComment = function (comment) { + comment = comment + .replace(/^\/\*/g, '//') + .replace(/\*\/$/g, ''); + + return new Converter(comment, { isEncoded: true, hasComment: true }); +}; + +exports.fromMapFileComment = function (comment, dir) { + return new Converter(comment, { commentFileDir: dir, isFileComment: true, isJSON: true }); +}; + +// Finds last sourcemap comment in file or returns null if none was found +exports.fromSource = function (content) { + var m = content.match(commentRx); + commentRx.lastIndex = 0; + return m ? exports.fromComment(m.pop()) : null; +}; + +// Finds last sourcemap comment in file or returns null if none was found +exports.fromMapFileSource = function (content, dir) { + var m = content.match(mapFileCommentRx); + mapFileCommentRx.lastIndex = 0; + return m ? exports.fromMapFileComment(m.pop(), dir) : null; +}; + +exports.removeComments = function (src) { + commentRx.lastIndex = 0; + return src.replace(commentRx, ''); +}; + +exports.removeMapFileComments = function (src) { + mapFileCommentRx.lastIndex = 0; + return src.replace(mapFileCommentRx, ''); +}; + +exports.__defineGetter__('commentRegex', function () { + commentRx.lastIndex = 0; + return commentRx; +}); + +exports.__defineGetter__('mapFileCommentRegex', function () { + mapFileCommentRx.lastIndex = 0; + return mapFileCommentRx; +}); diff --git a/pitfall/pdfkit/node_modules/convert-source-map/package.json b/pitfall/pdfkit/node_modules/convert-source-map/package.json new file mode 100644 index 00000000..0b2c99c5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/convert-source-map/package.json @@ -0,0 +1,95 @@ +{ + "_args": [ + [ + { + "raw": "convert-source-map@~0.3.0", + "scope": null, + "escapedName": "convert-source-map", + "name": "convert-source-map", + "rawSpec": "~0.3.0", + "spec": ">=0.3.0 <0.4.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/combine-source-map" + ] + ], + "_from": "convert-source-map@>=0.3.0 <0.4.0", + "_id": "convert-source-map@0.3.5", + "_inCache": true, + "_location": "/convert-source-map", + "_npmUser": { + "name": "thlorenz", + "email": "thlorenz@gmx.de" + }, + "_npmVersion": "1.4.9", + "_phantomChildren": {}, + "_requested": { + "raw": "convert-source-map@~0.3.0", + "scope": null, + "escapedName": "convert-source-map", + "name": "convert-source-map", + "rawSpec": "~0.3.0", + "spec": ">=0.3.0 <0.4.0", + "type": "range" + }, + "_requiredBy": [ + "/coffeeify", + "/combine-source-map", + "/exorcist" + ], + "_resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-0.3.5.tgz", + "_shasum": "f1d802950af7dd2631a1febe0596550c86ab3190", + "_shrinkwrap": null, + "_spec": "convert-source-map@~0.3.0", + "_where": "/Users/MB/git/pdfkit/node_modules/combine-source-map", + "author": { + "name": "Thorsten Lorenz", + "email": "thlorenz@gmx.de", + "url": "http://thlorenz.com" + }, + "bugs": { + "url": "https://github.com/thlorenz/convert-source-map/issues" + }, + "dependencies": {}, + "description": "Converts a source-map from/to different formats and allows adding/changing properties.", + "devDependencies": { + "inline-source-map": "~0.3.0", + "tap": "~0.4.3" + }, + "directories": {}, + "dist": { + "shasum": "f1d802950af7dd2631a1febe0596550c86ab3190", + "tarball": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-0.3.5.tgz" + }, + "engine": { + "node": ">=0.6" + }, + "homepage": "https://github.com/thlorenz/convert-source-map", + "keywords": [ + "convert", + "sourcemap", + "source", + "map", + "browser", + "debug" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "thlorenz", + "email": "thlorenz@gmx.de" + } + ], + "name": "convert-source-map", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/thlorenz/convert-source-map.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "0.3.5" +} diff --git a/pitfall/pdfkit/node_modules/convert-source-map/test/comment-regex.js b/pitfall/pdfkit/node_modules/convert-source-map/test/comment-regex.js new file mode 100644 index 00000000..629d86e5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/convert-source-map/test/comment-regex.js @@ -0,0 +1,100 @@ +'use strict'; +/*jshint asi: true */ + +var test = require('tap').test + , generator = require('inline-source-map') + , rx = require('..').commentRegex + , mapFileRx = require('..').mapFileCommentRegex + +function comment(s) { + rx.lastIndex = 0; + return rx.test(s + 'sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9') +} + +test('comment regex old spec - @', function (t) { + [ '//@ ' + , ' //@ ' + , '\t//@ ' + ].forEach(function (x) { t.ok(comment(x), 'matches ' + x) }); + + [ '///@ ' + , '}}//@ ' + , ' @// @' + ].forEach(function (x) { t.ok(!comment(x), 'does not match ' + x) }) + t.end() +}) + +test('comment regex new spec - #', function (t) { + [ '//# ' + , ' //# ' + , '\t//# ' + ].forEach(function (x) { t.ok(comment(x), 'matches ' + x) }); + + [ '///# ' + , '}}//# ' + , ' #// #' + ].forEach(function (x) { t.ok(!comment(x), 'does not match ' + x) }) + t.end() +}) + +function mapFileComment(s) { + mapFileRx.lastIndex = 0; + return mapFileRx.test(s + 'sourceMappingURL=foo.js.map') +} + +test('mapFileComment regex old spec - @', function (t) { + [ '//@ ' + , ' //@ ' + , '\t//@ ' + ].forEach(function (x) { t.ok(mapFileComment(x), 'matches ' + x) }); + + [ '///@ ' + , '}}//@ ' + , ' @// @' + ].forEach(function (x) { t.ok(!mapFileComment(x), 'does not match ' + x) }) + t.end() +}) + +test('mapFileComment regex new spec - #', function (t) { + [ '//# ' + , ' //# ' + , '\t//# ' + ].forEach(function (x) { t.ok(mapFileComment(x), 'matches ' + x) }); + + [ '///# ' + , '}}//# ' + , ' #// #' + ].forEach(function (x) { t.ok(!mapFileComment(x), 'does not match ' + x) }) + t.end() +}) + +function mapFileCommentWrap(s1, s2) { + mapFileRx.lastIndex = 0; + return mapFileRx.test(s1 + 'sourceMappingURL=foo.js.map' + s2) +} + +test('mapFileComment regex /* */ old spec - @', function (t) { + [ [ '/*@ ', '*/' ] + , [' /*@ ', ' */ ' ] + , [ '\t/*@ ', ' \t*/\t '] + ].forEach(function (x) { t.ok(mapFileCommentWrap(x[0], x[1]), 'matches ' + x.join(' :: ')) }); + + [ [ '/*/*@ ', '*/' ] + , ['}}/*@ ', ' */ ' ] + , [ ' @/*@ ', ' \t*/\t '] + ].forEach(function (x) { t.ok(!mapFileCommentWrap(x[0], x[1]), 'does not match ' + x.join(' :: ')) }); + t.end() +}) + +test('mapFileComment regex /* */ new spec - #', function (t) { + [ [ '/*# ', '*/' ] + , [' /*# ', ' */ ' ] + , [ '\t/*# ', ' \t*/\t '] + ].forEach(function (x) { t.ok(mapFileCommentWrap(x[0], x[1]), 'matches ' + x.join(' :: ')) }); + + [ [ '/*/*# ', '*/' ] + , ['}}/*# ', ' */ ' ] + , [ ' #/*# ', ' \t*/\t '] + ].forEach(function (x) { t.ok(!mapFileCommentWrap(x[0], x[1]), 'does not match ' + x.join(' :: ')) }); + t.end() +}) diff --git a/pitfall/pdfkit/node_modules/convert-source-map/test/convert-source-map.js b/pitfall/pdfkit/node_modules/convert-source-map/test/convert-source-map.js new file mode 100644 index 00000000..af94f961 --- /dev/null +++ b/pitfall/pdfkit/node_modules/convert-source-map/test/convert-source-map.js @@ -0,0 +1,161 @@ +'use strict'; +/*jshint asi: true */ + +var test = require('tap').test + , generator = require('inline-source-map') + , convert = require('..') + +var gen = generator() + .addMappings('foo.js', [{ original: { line: 2, column: 3 } , generated: { line: 5, column: 10 } }], { line: 5 }) + .addGeneratedMappings('bar.js', 'var a = 2;\nconsole.log(a)', { line: 23, column: 22 }) + + , base64 = gen.base64Encode() + , comment = gen.inlineMappingUrl() + , json = gen.toString() + , obj = JSON.parse(json) + +test('different formats', function (t) { + + t.equal(convert.fromComment(comment).toComment(), comment, 'comment -> comment') + t.equal(convert.fromComment(comment).toBase64(), base64, 'comment -> base64') + t.equal(convert.fromComment(comment).toJSON(), json, 'comment -> json') + t.deepEqual(convert.fromComment(comment).toObject(), obj, 'comment -> object') + + t.equal(convert.fromBase64(base64).toBase64(), base64, 'base64 -> base64') + t.equal(convert.fromBase64(base64).toComment(), comment, 'base64 -> comment') + t.equal(convert.fromBase64(base64).toJSON(), json, 'base64 -> json') + t.deepEqual(convert.fromBase64(base64).toObject(), obj, 'base64 -> object') + + t.equal(convert.fromJSON(json).toJSON(), json, 'json -> json') + t.equal(convert.fromJSON(json).toBase64(), base64, 'json -> base64') + t.equal(convert.fromJSON(json).toComment(), comment, 'json -> comment') + t.deepEqual(convert.fromJSON(json).toObject(), obj, 'json -> object') + t.end() +}) + +test('to object returns a copy', function (t) { + var c = convert.fromJSON(json) + var o = c.toObject() + o.version = '99'; + t.equal(c.toObject().version, 3, 'setting property on returned object does not affect original') + t.end() +}) + +test('from source', function (t) { + var foo = [ + 'function foo() {' + , ' console.log("hello I am foo");' + , ' console.log("who are you");' + , '}' + , '' + , 'foo();' + , '' + ].join('\n') + , map = '//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9' + , otherMap = '//# sourceMappingURL=data:application/json;base64,otherZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9' + + function getComment(src) { + var map = convert.fromSource(src); + return map ? map.toComment() : null; + } + + t.equal(getComment(foo), null, 'no comment returns null') + t.equal(getComment(foo + map), map, 'beginning of last line') + t.equal(getComment(foo + ' ' + map), map, 'indented of last line') + t.equal(getComment(foo + ' ' + map + '\n\n'), map, 'indented on last non empty line') + t.equal(getComment(foo + map + '\nconsole.log("more code");\nfoo()\n'), map, 'in the middle of code') + t.equal(getComment(foo + otherMap + '\n' + map), map, 'finds last map in source') + t.end() +}) + +test('remove comments', function (t) { + var foo = [ + 'function foo() {' + , ' console.log("hello I am foo");' + , ' console.log("who are you");' + , '}' + , '' + , 'foo();' + , '' + ].join('\n') + // this one is old spec on purpose + , map = '//@ sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9' + , otherMap = '//# sourceMappingURL=data:application/json;base64,otherZXJzaW9uIjozLCJmaWxlIjoiIiwic291cmNlcyI6WyJmdW5jdGlvbiBmb28oKSB7XG4gY29uc29sZS5sb2coXCJoZWxsbyBJIGFtIGZvb1wiKTtcbiBjb25zb2xlLmxvZyhcIndobyBhcmUgeW91XCIpO1xufVxuXG5mb28oKTtcbiJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9' + , extraCode = '\nconsole.log("more code");\nfoo()\n' + + t.equal(convert.removeComments(foo + map), foo, 'from last line') + t.equal(convert.removeComments(foo + map + extraCode), foo + extraCode, 'from the middle of code') + t.equal(convert.removeComments(foo + otherMap + extraCode + map + map), foo + extraCode, 'multiple comments from the middle of code') + t.end() +}) + +test('remove map file comments', function (t) { + var foo = [ + 'function foo() {' + , ' console.log("hello I am foo");' + , ' console.log("who are you");' + , '}' + , '' + , 'foo();' + , '' + ].join('\n') + , fileMap1 = '//# sourceMappingURL=foo.js.map' + , fileMap2 = '/*# sourceMappingURL=foo.js.map */'; + + t.equal(convert.removeMapFileComments(foo + fileMap1), foo, '// style filemap comment') + t.equal(convert.removeMapFileComments(foo + fileMap2), foo, '/* */ style filemap comment') + t.end() +}) + +test('pretty json', function (t) { + var mod = convert.fromJSON(json).toJSON(2) + , expected = JSON.stringify(obj, null, 2); + + t.equal( + mod + , expected + , 'pretty prints json when space is given') + t.end() +}) + +test('adding properties', function (t) { + var mod = convert + .fromJSON(json) + .addProperty('foo', 'bar') + .toJSON() + , expected = JSON.parse(json); + expected.foo = 'bar'; + t.equal( + mod + , JSON.stringify(expected) + , 'includes added property' + ) + t.end() +}) + +test('setting properties', function (t) { + var mod = convert + .fromJSON(json) + .setProperty('version', '2') + .setProperty('mappings', ';;;UACG') + .setProperty('should add', 'this') + .toJSON() + , expected = JSON.parse(json); + expected.version = '2'; + expected.mappings = ';;;UACG'; + expected['should add'] = 'this'; + t.equal( + mod + , JSON.stringify(expected) + , 'includes new property and changes existing properties' + ) + t.end() +}) + +test('getting properties', function (t) { + var sm = convert.fromJSON(json) + + t.equal(sm.getProperty('version'), 3, 'gets version') + t.deepEqual(sm.getProperty('sources'), ['foo.js', 'bar.js'], 'gets sources') + t.end() +}) diff --git a/pitfall/pdfkit/node_modules/convert-source-map/test/fixtures/map-file-comment-double-slash.css b/pitfall/pdfkit/node_modules/convert-source-map/test/fixtures/map-file-comment-double-slash.css new file mode 100644 index 00000000..e7779916 --- /dev/null +++ b/pitfall/pdfkit/node_modules/convert-source-map/test/fixtures/map-file-comment-double-slash.css @@ -0,0 +1,14 @@ +.header { + background: #444; + border: solid; + padding: 10px; + border-radius: 10px 5px 10px 5px; + color: #b4b472; } + +#main li { + color: green; + margin: 10px; + padding: 10px; + font-size: 18px; } + +//# sourceMappingURL=map-file-comment.css.map diff --git a/pitfall/pdfkit/node_modules/convert-source-map/test/fixtures/map-file-comment-inline.css b/pitfall/pdfkit/node_modules/convert-source-map/test/fixtures/map-file-comment-inline.css new file mode 100644 index 00000000..1e61b241 --- /dev/null +++ b/pitfall/pdfkit/node_modules/convert-source-map/test/fixtures/map-file-comment-inline.css @@ -0,0 +1,14 @@ +.header { + background: #444; + border: solid; + padding: 10px; + border-radius: 10px 5px 10px 5px; + color: #b4b472; } + +#main li { + color: green; + margin: 10px; + padding: 10px; + font-size: 18px; } + +/*# sourceMappingURL=data:application/json;base64,ewoidmVyc2lvbiI6ICIzIiwKIm1hcHBpbmdzIjogIkFBQUEsd0JBQXlCO0VBQ3ZCLFVBQVUsRUFBRSxJQUFJO0VBQ2hCLE1BQU0sRUFBRSxLQUFLO0VBQ2IsT0FBTyxFQUFFLElBQUk7RUFDYixhQUFhLEVBQUUsaUJBQWlCO0VBQ2hDLEtBQUssRUFBRSxPQUFrQjs7QUFHM0Isd0JBQXlCO0VBQ3ZCLE9BQU8sRUFBRSxJQUFJOztBQ1RmLGdCQUFpQjtFQUNmLFVBQVUsRUFBRSxJQUFJO0VBQ2hCLEtBQUssRUFBRSxNQUFNOztBQUdmLGtCQUFtQjtFQUNqQixNQUFNLEVBQUUsSUFBSTtFQUNaLE9BQU8sRUFBRSxJQUFJO0VBQ2IsVUFBVSxFQUFFLEtBQUs7RUFDakIsYUFBYSxFQUFFLEdBQUc7RUFDbEIsS0FBSyxFQUFFLEtBQUs7O0FBRWQsa0JBQW1CO0VBQ2pCLEtBQUssRUFBRSxLQUFLOztBQUdkLG1CQUFvQjtFQUNsQixLQUFLLEVBQUUsS0FBSztFQUNaLE1BQU0sRUFBRSxJQUFJO0VBQ1osT0FBTyxFQUFFLElBQUk7RUFDYixTQUFTLEVBQUUsSUFBSSIsCiJzb3VyY2VzIjogWyIuL2NsaWVudC9zYXNzL2NvcmUuc2NzcyIsIi4vY2xpZW50L3Nhc3MvbWFpbi5zY3NzIl0sCiJmaWxlIjogIm1hcC1maWxlLWNvbW1lbnQuY3NzIgp9 */ diff --git a/pitfall/pdfkit/node_modules/convert-source-map/test/fixtures/map-file-comment.css b/pitfall/pdfkit/node_modules/convert-source-map/test/fixtures/map-file-comment.css new file mode 100644 index 00000000..8b282680 --- /dev/null +++ b/pitfall/pdfkit/node_modules/convert-source-map/test/fixtures/map-file-comment.css @@ -0,0 +1,14 @@ +.header { + background: #444; + border: solid; + padding: 10px; + border-radius: 10px 5px 10px 5px; + color: #b4b472; } + +#main li { + color: green; + margin: 10px; + padding: 10px; + font-size: 18px; } + +/*# sourceMappingURL=map-file-comment.css.map */ diff --git a/pitfall/pdfkit/node_modules/convert-source-map/test/fixtures/map-file-comment.css.map b/pitfall/pdfkit/node_modules/convert-source-map/test/fixtures/map-file-comment.css.map new file mode 100644 index 00000000..25950ea2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/convert-source-map/test/fixtures/map-file-comment.css.map @@ -0,0 +1,6 @@ +{ +"version": "3", +"mappings": "AAAA,wBAAyB;EACvB,UAAU,EAAE,IAAI;EAChB,MAAM,EAAE,KAAK;EACb,OAAO,EAAE,IAAI;EACb,aAAa,EAAE,iBAAiB;EAChC,KAAK,EAAE,OAAkB;;AAG3B,wBAAyB;EACvB,OAAO,EAAE,IAAI;;ACTf,gBAAiB;EACf,UAAU,EAAE,IAAI;EAChB,KAAK,EAAE,MAAM;;AAGf,kBAAmB;EACjB,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,KAAK;EACjB,aAAa,EAAE,GAAG;EAClB,KAAK,EAAE,KAAK;;AAEd,kBAAmB;EACjB,KAAK,EAAE,KAAK;;AAGd,mBAAoB;EAClB,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,SAAS,EAAE,IAAI", +"sources": ["./client/sass/core.scss","./client/sass/main.scss"], +"file": "map-file-comment.css" +} diff --git a/pitfall/pdfkit/node_modules/convert-source-map/test/map-file-comment.js b/pitfall/pdfkit/node_modules/convert-source-map/test/map-file-comment.js new file mode 100644 index 00000000..b4167877 --- /dev/null +++ b/pitfall/pdfkit/node_modules/convert-source-map/test/map-file-comment.js @@ -0,0 +1,70 @@ +'use strict'; +/*jshint asi: true */ + +var test = require('tap').test + , rx = require('..') + , fs = require('fs') + , convert = require('..') + +test('\nresolving a "/*# sourceMappingURL=map-file-comment.css.map*/" style comment inside a given css content', function (t) { + var css = fs.readFileSync(__dirname + '/fixtures/map-file-comment.css', 'utf8') + var conv = convert.fromMapFileSource(css, __dirname + '/fixtures'); + var sm = conv.toObject(); + + t.deepEqual( + sm.sources + , [ './client/sass/core.scss', + './client/sass/main.scss' ] + , 'resolves paths of original sources' + ) + + t.equal(sm.file, 'map-file-comment.css', 'includes filename of generated file') + t.equal( + sm.mappings + , 'AAAA,wBAAyB;EACvB,UAAU,EAAE,IAAI;EAChB,MAAM,EAAE,KAAK;EACb,OAAO,EAAE,IAAI;EACb,aAAa,EAAE,iBAAiB;EAChC,KAAK,EAAE,OAAkB;;AAG3B,wBAAyB;EACvB,OAAO,EAAE,IAAI;;ACTf,gBAAiB;EACf,UAAU,EAAE,IAAI;EAChB,KAAK,EAAE,MAAM;;AAGf,kBAAmB;EACjB,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,KAAK;EACjB,aAAa,EAAE,GAAG;EAClB,KAAK,EAAE,KAAK;;AAEd,kBAAmB;EACjB,KAAK,EAAE,KAAK;;AAGd,mBAAoB;EAClB,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,SAAS,EAAE,IAAI' + , 'includes mappings' + ) + t.end() +}) + +test('\nresolving a "//# sourceMappingURL=map-file-comment.css.map" style comment inside a given css content', function (t) { + var css = fs.readFileSync(__dirname + '/fixtures/map-file-comment-double-slash.css', 'utf8') + var conv = convert.fromMapFileSource(css, __dirname + '/fixtures'); + var sm = conv.toObject(); + + t.deepEqual( + sm.sources + , [ './client/sass/core.scss', + './client/sass/main.scss' ] + , 'resolves paths of original sources' + ) + + t.equal(sm.file, 'map-file-comment.css', 'includes filename of generated file') + t.equal( + sm.mappings + , 'AAAA,wBAAyB;EACvB,UAAU,EAAE,IAAI;EAChB,MAAM,EAAE,KAAK;EACb,OAAO,EAAE,IAAI;EACb,aAAa,EAAE,iBAAiB;EAChC,KAAK,EAAE,OAAkB;;AAG3B,wBAAyB;EACvB,OAAO,EAAE,IAAI;;ACTf,gBAAiB;EACf,UAAU,EAAE,IAAI;EAChB,KAAK,EAAE,MAAM;;AAGf,kBAAmB;EACjB,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,KAAK;EACjB,aAAa,EAAE,GAAG;EAClB,KAAK,EAAE,KAAK;;AAEd,kBAAmB;EACjB,KAAK,EAAE,KAAK;;AAGd,mBAAoB;EAClB,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,SAAS,EAAE,IAAI' + , 'includes mappings' + ) + t.end() +}) + +test('\nresolving a /*# sourceMappingURL=data:application/json;base64,... */ style comment inside a given css content', function(t) { + var css = fs.readFileSync(__dirname + '/fixtures/map-file-comment-inline.css', 'utf8') + var conv = convert.fromSource(css, __dirname + '/fixtures') + var sm = conv.toObject() + + t.deepEqual( + sm.sources + , [ './client/sass/core.scss', + './client/sass/main.scss' ] + , 'resolves paths of original sources' + ) + + t.equal(sm.file, 'map-file-comment.css', 'includes filename of generated file') + t.equal( + sm.mappings + , 'AAAA,wBAAyB;EACvB,UAAU,EAAE,IAAI;EAChB,MAAM,EAAE,KAAK;EACb,OAAO,EAAE,IAAI;EACb,aAAa,EAAE,iBAAiB;EAChC,KAAK,EAAE,OAAkB;;AAG3B,wBAAyB;EACvB,OAAO,EAAE,IAAI;;ACTf,gBAAiB;EACf,UAAU,EAAE,IAAI;EAChB,KAAK,EAAE,MAAM;;AAGf,kBAAmB;EACjB,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,UAAU,EAAE,KAAK;EACjB,aAAa,EAAE,GAAG;EAClB,KAAK,EAAE,KAAK;;AAEd,kBAAmB;EACjB,KAAK,EAAE,KAAK;;AAGd,mBAAoB;EAClB,KAAK,EAAE,KAAK;EACZ,MAAM,EAAE,IAAI;EACZ,OAAO,EAAE,IAAI;EACb,SAAS,EAAE,IAAI' + , 'includes mappings' + ) + t.end() +}) diff --git a/pitfall/pdfkit/node_modules/core-js/CHANGELOG.md b/pitfall/pdfkit/node_modules/core-js/CHANGELOG.md new file mode 100644 index 00000000..b597d55d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/CHANGELOG.md @@ -0,0 +1,561 @@ +## Changelog +##### 2.4.1 - 2016.07.18 +- fixed `script` tag for some parsers, [#204](https://github.com/zloirock/core-js/issues/204), [#216](https://github.com/zloirock/core-js/issues/216) +- removed some unused variables, [#217](https://github.com/zloirock/core-js/issues/217), [#218](https://github.com/zloirock/core-js/issues/218) +- fixed MS Edge `Reflect.construct` and `Reflect.apply` - they should not allow primitive as `argumentsList` argument + +##### 1.2.7 [LEGACY] - 2016.07.18 +- some fixes for issues like [#159](https://github.com/zloirock/core-js/issues/159), [#186](https://github.com/zloirock/core-js/issues/186), [#194](https://github.com/zloirock/core-js/issues/194), [#207](https://github.com/zloirock/core-js/issues/207) + +##### 2.4.0 - 2016.05.08 +- Added `Observable`, [stage 1 proposal](https://github.com/zenparsing/es-observable) +- Fixed behavior `Object.{getOwnPropertySymbols, getOwnPropertyDescriptor}` and `Object#propertyIsEnumerable` on `Object.prototype` +- `Reflect.construct` and `Reflect.apply` should throw an error if `argumentsList` argument is not an object, [#194](https://github.com/zloirock/core-js/issues/194) + +##### 2.3.0 - 2016.04.24 +- Added `asap` for enqueuing microtasks, [stage 0 proposal](https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask) +- Added well-known symbol `Symbol.asyncIterator` for [stage 2 async iteration proposal](https://github.com/tc39/proposal-async-iteration) +- Added well-known symbol `Symbol.observable` for [stage 1 observables proposal](https://github.com/zenparsing/es-observable) +- `String#{padStart, padEnd}` returns original string if filler is empty string, [TC39 meeting notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-03/march-29.md#stringprototypepadstartpadend) +- `Object.values` and `Object.entries` moved to stage 4 from 3, [TC39 meeting notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-03/march-29.md#objectvalues--objectentries) +- `System.global` moved to stage 2 from 1, [TC39 meeting notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-03/march-29.md#systemglobal) +- `Map#toJSON` and `Set#toJSON` rejected and will be removed from the next major release, [TC39 meeting notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-03/march-31.md#mapprototypetojsonsetprototypetojson) +- `Error.isError` withdrawn and will be removed from the next major release, [TC39 meeting notes](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-03/march-29.md#erroriserror) +- Added fallback for `Function#name` on non-extensible functions and functions with broken `toString` conversion, [#193](https://github.com/zloirock/core-js/issues/193) + +##### 2.2.2 - 2016.04.06 +- Added conversion `-0` to `+0` to `Array#{indexOf, lastIndexOf}`, [ES2016 fix](https://github.com/tc39/ecma262/pull/316) +- Added fixes for some `Math` methods in Tor Browser +- `Array.{from, of}` no longer calls prototype setters +- Added workaround over Chrome DevTools strange behavior, [#186](https://github.com/zloirock/core-js/issues/186) + +##### 2.2.1 - 2016.03.19 +- Fixed `Object.getOwnPropertyNames(window)` `2.1+` versions bug, [#181](https://github.com/zloirock/core-js/issues/181) + +##### 2.2.0 - 2016.03.15 +- Added `String#matchAll`, [proposal](https://github.com/tc39/String.prototype.matchAll) +- Added `Object#__(define|lookup)[GS]etter__`, [annex B ES2017](https://github.com/tc39/ecma262/pull/381) +- Added `@@toPrimitive` methods to `Date` and `Symbol` +- Fixed `%TypedArray%#slice` in Edge ~ 13 (throws with `@@species` and wrapped / inherited constructor) +- Some other minor fixes + +##### 2.1.5 - 2016.03.12 +- Improved support NodeJS domains in `Promise#then`, [#180](https://github.com/zloirock/core-js/issues/180) +- Added fallback for `Date#toJSON` bug in Qt Script, [#173](https://github.com/zloirock/core-js/issues/173#issuecomment-193972502) + +##### 2.1.4 - 2016.03.08 +- Added fallback for `Symbol` polyfill in Qt Script, [#173](https://github.com/zloirock/core-js/issues/173) +- Added one more fallback for IE11 `Script Access Denied` error with iframes, [#165](https://github.com/zloirock/core-js/issues/165) + +##### 2.1.3 - 2016.02.29 +- Added fallback for [`es6-promise` package bug](https://github.com/stefanpenner/es6-promise/issues/169), [#176](https://github.com/zloirock/core-js/issues/176) + +##### 2.1.2 - 2016.02.29 +- Some minor `Promise` fixes: + - Browsers `rejectionhandled` event better HTML spec complaint + - Errors in unhandled rejection handlers should not cause any problems + - Fixed typo in feature detection + +##### 2.1.1 - 2016.02.22 +- Some `Promise` improvements: + - Feature detection: + - **Added detection unhandled rejection tracking support - now it's available everywhere**, [#140](https://github.com/zloirock/core-js/issues/140) + - Added detection `@@species` pattern support for completely correct subclassing + - Removed usage `Object.setPrototypeOf` from feature detection and noisy console message about it in FF + - `Promise.all` fixed for some very specific cases + +##### 2.1.0 - 2016.02.09 +- **API**: + - ES5 polyfills are split and logic, used in other polyfills, moved to internal modules + - **All entry point works in ES3 environment like IE8- without `core-js/(library/)es5`** + - **Added all missed single entry points for ES5 polyfills** + - Separated ES5 polyfills moved to the ES6 namespace. Why? + - Mainly, for prevent duplication features in different namespaces - logic of most required ES5 polyfills changed in ES6+: + - Already added changes for: `Object` statics - should accept primitives, new whitespaces lists in `String#trim`, `parse(Int|float)`, `RegExp#toString` logic, `String#split`, etc + - Should be changed in the future: `@@species` and `ToLength` logic in `Array` methods, `Date` parsing, `Function#bind`, etc + - Should not be changed only several features like `Array.isArray` and `Date.now` + - Some ES5 polyfills required for modern engines + - All old entry points should work fine, but in the next major release API can be changed + - `Object.getOwnPropertyDescriptors` moved to the stage 3, [January TC39 meeting](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-01/2016-01-28.md#objectgetownpropertydescriptors-to-stage-3-jordan-harband-low-priority-but-super-quick) + - Added `umd` option for [custom build process](https://github.com/zloirock/core-js#custom-build-from-external-scripts), [#169](https://github.com/zloirock/core-js/issues/169) + - Returned entry points for `Array` statics, removed in `2.0`, for compatibility with `babel` `6` and for future fixes +- **Deprecated**: + - `Reflect.enumerate` deprecated and will be removed from the next major release, [January TC39 meeting](https://github.com/rwaldron/tc39-notes/blob/master/es7/2016-01/2016-01-28.md#5xix-revisit-proxy-enumerate---revisit-decision-to-exhaust-iterator) +- **New Features**: + - Added [`Reflect` metadata API](https://github.com/jonathandturner/decorators/blob/master/specs/metadata.md) as a pre-strawman feature, [#152](https://github.com/zloirock/core-js/issues/152): + - `Reflect.defineMetadata` + - `Reflect.deleteMetadata` + - `Reflect.getMetadata` + - `Reflect.getMetadataKeys` + - `Reflect.getOwnMetadata` + - `Reflect.getOwnMetadataKeys` + - `Reflect.hasMetadata` + - `Reflect.hasOwnMetadata` + - `Reflect.metadata` + - Implementation / fixes `Date#toJSON` + - Fixes for `parseInt` and `Number.parseInt` + - Fixes for `parseFloat` and `Number.parseFloat` + - Fixes for `RegExp#toString` + - Fixes for `Array#sort` + - Fixes for `Number#toFixed` + - Fixes for `Number#toPrecision` + - Additional fixes for `String#split` (`RegExp#@@split`) +- **Improvements**: + - Correct subclassing wrapped collections, `Number` and `RegExp` constructors with native class syntax + - Correct support `SharedArrayBuffer` and buffers from other realms in typed arrays wrappers + - Additional validations for `Object.{defineProperty, getOwnPropertyDescriptor}` and `Reflect.defineProperty` +- **Bug Fixes**: + - Fixed some cases `Array#lastIndexOf` with negative second argument + +##### 2.0.3 - 2016.01.11 +- Added fallback for V8 ~ Chrome 49 `Promise` subclassing bug causes unhandled rejection on feature detection, [#159](https://github.com/zloirock/core-js/issues/159) +- Added fix for very specific environments with global `window === null` + +##### 2.0.2 - 2016.01.04 +- Temporarily removed `length` validation from `Uint8Array` constructor wrapper. Reason - [bug in `ws` module](https://github.com/websockets/ws/pull/645) (-> `socket.io`) which passes to `Buffer` constructor -> `Uint8Array` float and uses [the `V8` bug](https://code.google.com/p/v8/issues/detail?id=4552) for conversion to int (by the spec should be thrown an error). [It creates problems for many people.](https://github.com/karma-runner/karma/issues/1768) I hope, it will be returned after fixing this bug in `V8`. + +##### 2.0.1 - 2015.12.31 +- forced usage `Promise.resolve` polyfill in the `library` version for correct work with wrapper +- `Object.assign` should be defined in the strict mode -> throw an error on extension non-extensible objects, [#154](https://github.com/zloirock/core-js/issues/154) + +##### 2.0.0 - 2015.12.24 +- added implementations and fixes [Typed Arrays](https://github.com/zloirock/core-js#ecmascript-6-typed-arrays)-related features + - `ArrayBuffer`, `ArrayBuffer.isView`, `ArrayBuffer#slice` + - `DataView` with all getter / setter methods + - `Int8Array`, `Uint8Array`, `Uint8ClampedArray`, `Int16Array`, `Uint16Array`, `Int32Array`, `Uint32Array`, `Float32Array` and `Float64Array` constructors + - `%TypedArray%.{for, of}`, `%TypedArray%#{copyWithin, every, fill, filter, find, findIndex, forEach, indexOf, includes, join, lastIndexOf, map, reduce, reduceRight, reverse, set, slice, some, sort, subarray, values, keys, entries, @@iterator, ...}` +- added [`System.global`](https://github.com/zloirock/core-js#ecmascript-7-proposals), [proposal](https://github.com/tc39/proposal-global), [November TC39 meeting](https://github.com/rwaldron/tc39-notes/tree/master/es7/2015-11/nov-19.md#systemglobal-jhd) +- added [`Error.isError`](https://github.com/zloirock/core-js#ecmascript-7-proposals), [proposal](https://github.com/ljharb/proposal-is-error), [November TC39 meeting](https://github.com/rwaldron/tc39-notes/tree/master/es7/2015-11/nov-19.md#jhd-erroriserror) +- added [`Math.{iaddh, isubh, imulh, umulh}`](https://github.com/zloirock/core-js#ecmascript-7-proposals), [proposal](https://gist.github.com/BrendanEich/4294d5c212a6d2254703) +- `RegExp.escape` moved from the `es7` to the non-standard `core` namespace, [July TC39 meeting](https://github.com/rwaldron/tc39-notes/blob/master/es7/2015-07/july-28.md#62-regexpescape) - too slow, but it's condition of stability, [#116](https://github.com/zloirock/core-js/issues/116) +- [`Promise`](https://github.com/zloirock/core-js#ecmascript-6-promise) + - some performance optimisations + - added basic support [`rejectionHandled` event / `onrejectionhandled` handler](https://github.com/zloirock/core-js#unhandled-rejection-tracking) to the polyfill + - removed usage `@@species` from `Promise.{all, race}`, [November TC39 meeting](https://github.com/rwaldron/tc39-notes/tree/master/es7/2015-11/nov-18.md#conclusionresolution-2) +- some improvements [collections polyfills](https://github.com/zloirock/core-js#ecmascript-6-collections) + - `O(1)` and preventing possible leaks with frozen keys, [#134](https://github.com/zloirock/core-js/issues/134) + - correct observable state object keys +- renamed `String#{padLeft, padRight}` -> [`String#{padStart, padEnd}`](https://github.com/zloirock/core-js#ecmascript-7-proposals), [proposal](https://github.com/tc39/proposal-string-pad-start-end), [November TC39 meeting](https://github.com/rwaldron/tc39-notes/tree/master/es7/2015-11/nov-17.md#conclusionresolution-2) (they want to rename it on each meeting?O_o), [#132](https://github.com/zloirock/core-js/issues/132) +- added [`String#{trimStart, trimEnd}` as aliases for `String#{trimLeft, trimRight}`](https://github.com/zloirock/core-js#ecmascript-7-proposals), [proposal](https://github.com/sebmarkbage/ecmascript-string-left-right-trim), [November TC39 meeting](https://github.com/rwaldron/tc39-notes/tree/master/es7/2015-11/nov-17.md#conclusionresolution-2) +- added [annex B HTML methods](https://github.com/zloirock/core-js#ecmascript-6-string) - ugly, but also [the part of the spec](http://www.ecma-international.org/ecma-262/6.0/#sec-string.prototype.anchor) +- added little fix for [`Date#toString`](https://github.com/zloirock/core-js#ecmascript-6-date) - `new Date(NaN).toString()` [should be `'Invalid Date'`](http://www.ecma-international.org/ecma-262/6.0/#sec-todatestring) +- added [`{keys, values, entries, @@iterator}` methods to DOM collections](https://github.com/zloirock/core-js#iterable-dom-collections) which should have [iterable interface](https://heycam.github.io/webidl/#idl-iterable) or should be [inherited from `Array`](https://heycam.github.io/webidl/#LegacyArrayClass) - `NodeList`, `DOMTokenList`, `MediaList`, `StyleSheetList`, `CSSRuleList`. +- removed Mozilla `Array` generics - [deprecated and will be removed from FF](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array#Array_generic_methods), [looks like strawman is dead](http://wiki.ecmascript.org/doku.php?id=strawman:array_statics), available [alternative shim](https://github.com/plusdude/array-generics) +- removed `core.log` module +- CommonJS API + - added entry points for [virtual methods](https://github.com/zloirock/core-js#commonjs-and-prototype-methods-without-global-namespace-pollution) + - added entry points for [stages proposals](https://github.com/zloirock/core-js#ecmascript-7-proposals) + - some other minor changes +- [custom build from external scripts](https://github.com/zloirock/core-js#custom-build-from-external-scripts) moved to the separate package for preventing problems with dependencies +- changed `$` prefix for internal modules file names because Team Foundation Server does not support it, [#129](https://github.com/zloirock/core-js/issues/129) +- additional fix for `SameValueZero` in V8 ~ Chromium 39-42 collections +- additional fix for FF27 `Array` iterator +- removed usage shortcuts for `arguments` object - old WebKit bug, [#150](https://github.com/zloirock/core-js/issues/150) +- `{Map, Set}#forEach` non-generic, [#144](https://github.com/zloirock/core-js/issues/144) +- many other improvements + +##### 1.2.6 - 2015.11.09 +* reject with `TypeError` on attempt resolve promise itself +* correct behavior with broken `Promise` subclass constructors / methods +* added `Promise`-based fallback for microtask +* fixed V8 and FF `Array#{values, @@iterator}.name` +* fixed IE7- `[1, 2].join(undefined) -> '1,2'` +* some other fixes / improvements / optimizations + +##### 1.2.5 - 2015.11.02 +* some more `Number` constructor fixes: + * fixed V8 ~ Node 0.8 bug: `Number('+0x1')` should be `NaN` + * fixed `Number(' 0b1\n')` case, should be `1` + * fixed `Number()` case, should be `0` + +##### 1.2.4 - 2015.11.01 +* fixed `Number('0b12') -> NaN` case in the shim +* fixed V8 ~ Chromium 40- bug - `Weak(Map|Set)#{delete, get, has}` should not throw errors [#124](https://github.com/zloirock/core-js/issues/124) +* some other fixes and optimizations + +##### 1.2.3 - 2015.10.23 +* fixed some problems related old V8 bug `Object('a').propertyIsEnumerable(0) // => false`, for example, `Object.assign({}, 'qwe')` from the last release +* fixed `.name` property and `Function#toString` conversion some polyfilled methods +* fixed `Math.imul` arity in Safari 8- + +##### 1.2.2 - 2015.10.18 +* improved optimisations for V8 +* fixed build process from external packages, [#120](https://github.com/zloirock/core-js/pull/120) +* one more `Object.{assign, values, entries}` fix for [**very** specific case](https://github.com/ljharb/proposal-object-values-entries/issues/5) + +##### 1.2.1 - 2015.10.02 +* replaced fix `JSON.stringify` + `Symbol` behavior from `.toJSON` method to wrapping `JSON.stringify` - little more correct, [compat-table/642](https://github.com/kangax/compat-table/pull/642) +* fixed typo which broke tasks scheduler in WebWorkers in old FF, [#114](https://github.com/zloirock/core-js/pull/114) + +##### 1.2.0 - 2015.09.27 +* added browser [`Promise` rejection hook](#unhandled-rejection-tracking), [#106](https://github.com/zloirock/core-js/issues/106) +* added correct [`IsRegExp`](http://www.ecma-international.org/ecma-262/6.0/#sec-isregexp) logic to [`String#{includes, startsWith, endsWith}`](https://github.com/zloirock/core-js/#ecmascript-6-string) and [`RegExp` constructor](https://github.com/zloirock/core-js/#ecmascript-6-regexp), `@@match` case, [example](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/match#Disabling_the_isRegExp_check) +* updated [`String#leftPad`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) [with proposal](https://github.com/ljharb/proposal-string-pad-left-right/issues/6): string filler truncated from the right side +* replaced V8 [`Object.assign`](https://github.com/zloirock/core-js/#ecmascript-6-object) - its properties order not only [incorrect](https://github.com/sindresorhus/object-assign/issues/22), it is non-deterministic and it causes some problems +* fixed behavior with deleted in getters properties for `Object.{`[`assign`](https://github.com/zloirock/core-js/#ecmascript-6-object)`, `[`entries, values`](https://github.com/zloirock/core-js/#ecmascript-7-proposals)`}`, [example](http://goo.gl/iQE01c) +* fixed [`Math.sinh`](https://github.com/zloirock/core-js/#ecmascript-6-math) with very small numbers in V8 near Chromium 38 +* some other fixes and optimizations + +##### 1.1.4 - 2015.09.05 +* fixed support symbols in FF34-35 [`Object.assign`](https://github.com/zloirock/core-js/#ecmascript-6-object) +* fixed [collections iterators](https://github.com/zloirock/core-js/#ecmascript-6-iterators) in FF25-26 +* fixed non-generic WebKit [`Array.of`](https://github.com/zloirock/core-js/#ecmascript-6-array) +* some other fixes and optimizations + +##### 1.1.3 - 2015.08.29 +* fixed support Node.js domains in [`Promise`](https://github.com/zloirock/core-js/#ecmascript-6-promise), [#103](https://github.com/zloirock/core-js/issues/103) + +##### 1.1.2 - 2015.08.28 +* added `toJSON` method to [`Symbol`](https://github.com/zloirock/core-js/#ecmascript-6-symbol) polyfill and to MS Edge implementation for expected `JSON.stringify` result w/o patching this method +* replaced [`Reflect.construct`](https://github.com/zloirock/core-js/#ecmascript-6-reflect) implementations w/o correct support third argument +* fixed `global` detection with changed `document.domain` in ~IE8, [#100](https://github.com/zloirock/core-js/issues/100) + +##### 1.1.1 - 2015.08.20 +* added more correct microtask implementation for [`Promise`](#ecmascript-6-promise) + +##### 1.1.0 - 2015.08.17 +* updated [string padding](https://github.com/zloirock/core-js/#ecmascript-7-proposals) to [actual proposal](https://github.com/ljharb/proposal-string-pad-left-right) - renamed, minor internal changes: + * `String#lpad` -> `String#padLeft` + * `String#rpad` -> `String#padRight` +* added [string trim functions](#ecmascript-7-proposals) - [proposal](https://github.com/sebmarkbage/ecmascript-string-left-right-trim), defacto standard - required only for IE11- and fixed for some old engines: + * `String#trimLeft` + * `String#trimRight` +* [`String#trim`](https://github.com/zloirock/core-js/#ecmascript-6-string) fixed for some engines by es6 spec and moved from `es5` to single `es6` module +* splitted [`es6.object.statics-accept-primitives`](https://github.com/zloirock/core-js/#ecmascript-6-object) +* caps for `freeze`-family `Object` methods moved from `es5` to `es6` namespace and joined with [es6 wrappers](https://github.com/zloirock/core-js/#ecmascript-6-object) +* `es5` [namespace](https://github.com/zloirock/core-js/#commonjs) also includes modules, moved to `es6` namespace - you can use it as before +* increased `MessageChannel` priority in `$.task`, [#95](https://github.com/zloirock/core-js/issues/95) +* does not get `global.Symbol` on each getting iterator, if you wanna use alternative `Symbol` shim - add it before `core-js` +* [`Reflect.construct`](https://github.com/zloirock/core-js/#ecmascript-6-reflect) optimized and fixed for some cases +* simplified [`Reflect.enumerate`](https://github.com/zloirock/core-js/#ecmascript-6-reflect), see [this question](https://esdiscuss.org/topic/question-about-enumerate-and-property-decision-timing) +* some corrections in [`Math.acosh`](https://github.com/zloirock/core-js/#ecmascript-6-math) +* fixed [`Math.imul`](https://github.com/zloirock/core-js/#ecmascript-6-math) for old WebKit +* some fixes in string / RegExp [well-known symbols](https://github.com/zloirock/core-js/#ecmascript-6-regexp) logic +* some other fixes and optimizations + +##### 1.0.1 - 2015.07.31 +* some fixes for final MS Edge, replaced broken native `Reflect.defineProperty` +* some minor fixes and optimizations +* changed compression `client/*.min.js` options for safe `Function#name` and `Function#length`, should be fixed [#92](https://github.com/zloirock/core-js/issues/92) + +##### 1.0.0 - 2015.07.22 +* added logic for [well-known symbols](https://github.com/zloirock/core-js/#ecmascript-6-regexp): + * `Symbol.match` + * `Symbol.replace` + * `Symbol.split` + * `Symbol.search` +* actualized and optimized work with iterables: + * optimized [`Map`, `Set`, `WeakMap`, `WeakSet` constructors](https://github.com/zloirock/core-js/#ecmascript-6-collections), [`Promise.all`, `Promise.race`](https://github.com/zloirock/core-js/#ecmascript-6-promise) for default `Array Iterator` + * optimized [`Array.from`](https://github.com/zloirock/core-js/#ecmascript-6-array) for default `Array Iterator` + * added [`core.getIteratorMethod`](https://github.com/zloirock/core-js/#ecmascript-6-iterators) helper +* uses enumerable properties in shimmed instances - collections, iterators, etc for optimize performance +* added support native constructors to [`Reflect.construct`](https://github.com/zloirock/core-js/#ecmascript-6-reflect) with 2 arguments +* added support native constructors to [`Function#bind`](https://github.com/zloirock/core-js/#ecmascript-5) shim with `new` +* removed obsolete `.clear` methods native [`Weak`-collections](https://github.com/zloirock/core-js/#ecmascript-6-collections) +* maximum modularity, reduced minimal custom build size, separated into submodules: + * [`es6.reflect`](https://github.com/zloirock/core-js/#ecmascript-6-reflect) + * [`es6.regexp`](https://github.com/zloirock/core-js/#ecmascript-6-regexp) + * [`es6.math`](https://github.com/zloirock/core-js/#ecmascript-6-math) + * [`es6.number`](https://github.com/zloirock/core-js/#ecmascript-6-number) + * [`es7.object.to-array`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) + * [`core.object`](https://github.com/zloirock/core-js/#object) + * [`core.string`](https://github.com/zloirock/core-js/#escaping-strings) + * [`core.iter-helpers`](https://github.com/zloirock/core-js/#ecmascript-6-iterators) + * internal modules (`$`, `$.iter`, etc) +* many other optimizations +* final cleaning non-standard features + * moved `$for` to [separate library](https://github.com/zloirock/forof). This work for syntax - `for-of` loop and comprehensions + * moved `Date#{format, formatUTC}` to [separate library](https://github.com/zloirock/dtf). Standard way for this - `ECMA-402` + * removed `Math` methods from `Number.prototype`. Slight sugar for simple `Math` methods calling + * removed `{Array#, Array, Dict}.turn` + * removed `core.global` +* uses `ToNumber` instead of `ToLength` in [`Number Iterator`](https://github.com/zloirock/core-js/#number-iterator), `Array.from(2.5)` will be `[0, 1, 2]` instead of `[0, 1]` +* fixed [#85](https://github.com/zloirock/core-js/issues/85) - invalid `Promise` unhandled rejection message in nested `setTimeout` +* fixed [#86](https://github.com/zloirock/core-js/issues/86) - support FF extensions +* fixed [#89](https://github.com/zloirock/core-js/issues/89) - behavior `Number` constructor in strange case + +##### 0.9.18 - 2015.06.17 +* removed `/` from [`RegExp.escape`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) escaped characters + +##### 0.9.17 - 2015.06.14 +* updated [`RegExp.escape`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) to the [latest proposal](https://github.com/benjamingr/RexExp.escape) +* fixed conflict with webpack dev server + IE buggy behavior + +##### 0.9.16 - 2015.06.11 +* more correct order resolving thenable in [`Promise`](https://github.com/zloirock/core-js/#ecmascript-6-promise) polyfill +* uses polyfill instead of [buggy V8 `Promise`](https://github.com/zloirock/core-js/issues/78) + +##### 0.9.15 - 2015.06.09 +* [collections](https://github.com/zloirock/core-js/#ecmascript-6-collections) from `library` version return wrapped native instances +* fixed collections prototype methods in `library` version +* optimized [`Math.hypot`](https://github.com/zloirock/core-js/#ecmascript-6-math) + +##### 0.9.14 - 2015.06.04 +* updated [`Promise.resolve` behavior](https://esdiscuss.org/topic/fixing-promise-resolve) +* added fallback for IE11 buggy `Object.getOwnPropertyNames` + iframe +* some other fixes + +##### 0.9.13 - 2015.05.25 +* added fallback for [`Symbol` polyfill](https://github.com/zloirock/core-js/#ecmascript-6-symbol) for old Android +* some other fixes + +##### 0.9.12 - 2015.05.24 +* different instances `core-js` should use / recognize the same symbols +* some fixes + +##### 0.9.11 - 2015.05.18 +* simplified [custom build](https://github.com/zloirock/core-js/#custom-build) + * add custom build js api + * added `grunt-cli` to `devDependencies` for `npm run grunt` +* some fixes + +##### 0.9.10 - 2015.05.16 +* wrapped `Function#toString` for correct work wrapped methods / constructors with methods similar to the [`lodash` `isNative`](https://github.com/lodash/lodash/issues/1197) +* added proto versions of methods to export object in `default` version for consistency with `library` version + +##### 0.9.9 - 2015.05.14 +* wrapped `Object#propertyIsEnumerable` for [`Symbol` polyfill](https://github.com/zloirock/core-js/#ecmascript-6-symbol) +* [added proto versions of methods to `library` for ES7 bind syntax](https://github.com/zloirock/core-js/issues/65) +* some other fixes + +##### 0.9.8 - 2015.05.12 +* fixed [`Math.hypot`](https://github.com/zloirock/core-js/#ecmascript-6-math) with negative arguments +* added `Object#toString.toString` as fallback for [`lodash` `isNative`](https://github.com/lodash/lodash/issues/1197) + +##### 0.9.7 - 2015.05.07 +* added [support DOM collections](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/slice#Streamlining_cross-browser_behavior) to IE8- `Array#slice` + +##### 0.9.6 - 2015.05.01 +* added [`String#lpad`, `String#rpad`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) + +##### 0.9.5 - 2015.04.30 +* added cap for `Function#@@hasInstance` +* some fixes and optimizations + +##### 0.9.4 - 2015.04.27 +* fixed `RegExp` constructor + +##### 0.9.3 - 2015.04.26 +* some fixes and optimizations + +##### 0.9.2 - 2015.04.25 +* more correct [`Promise`](https://github.com/zloirock/core-js/#ecmascript-6-promise) unhandled rejection tracking and resolving / rejection priority + +##### 0.9.1 - 2015.04.25 +* fixed `__proto__`-based [`Promise`](https://github.com/zloirock/core-js/#ecmascript-6-promise) subclassing in some environments + +##### 0.9.0 - 2015.04.24 +* added correct [symbols](https://github.com/zloirock/core-js/#ecmascript-6-symbol) descriptors + * fixed behavior `Object.{assign, create, defineProperty, defineProperties, getOwnPropertyDescriptor, getOwnPropertyDescriptors}` with symbols + * added [single entry points](https://github.com/zloirock/core-js/#commonjs) for `Object.{create, defineProperty, defineProperties}` +* added [`Map#toJSON`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) +* removed non-standard methods `Object#[_]` and `Function#only` - they solves syntax problems, but now in compilers available arrows and ~~in near future will be available~~ [available](http://babeljs.io/blog/2015/05/14/function-bind/) [bind syntax](https://github.com/zenparsing/es-function-bind) +* removed non-standard undocumented methods `Symbol.{pure, set}` +* some fixes and internal changes + +##### 0.8.4 - 2015.04.18 +* uses `webpack` instead of `browserify` for browser builds - more compression-friendly result + +##### 0.8.3 - 2015.04.14 +* fixed `Array` statics with single entry points + +##### 0.8.2 - 2015.04.13 +* [`Math.fround`](https://github.com/zloirock/core-js/#ecmascript-6-math) now also works in IE9- +* added [`Set#toJSON`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) +* some optimizations and fixes + +##### 0.8.1 - 2015.04.03 +* fixed `Symbol.keyFor` + +##### 0.8.0 - 2015.04.02 +* changed [CommonJS API](https://github.com/zloirock/core-js/#commonjs) +* splitted and renamed some modules +* added support ES3 environment (ES5 polyfill) to **all** default versions - size increases slightly (+ ~4kb w/o gzip), many issues disappear, if you don't need it - [simply include only required namespaces / features / modules](https://github.com/zloirock/core-js/#commonjs) +* removed [abstract references](https://github.com/zenparsing/es-abstract-refs) support - proposal has been superseded =\ +* [`$for.isIterable` -> `core.isIterable`, `$for.getIterator` -> `core.getIterator`](https://github.com/zloirock/core-js/#ecmascript-6-iterators), temporary available in old namespace +* fixed iterators support in v8 `Promise.all` and `Promise.race` +* many other fixes + +##### 0.7.2 - 2015.03.09 +* some fixes + +##### 0.7.1 - 2015.03.07 +* some fixes + +##### 0.7.0 - 2015.03.06 +* rewritten and splitted into [CommonJS modules](https://github.com/zloirock/core-js/#commonjs) + +##### 0.6.1 - 2015.02.24 +* fixed support [`Object.defineProperty`](https://github.com/zloirock/core-js/#ecmascript-5) with accessors on DOM elements on IE8 + +##### 0.6.0 - 2015.02.23 +* added support safe closing iteration - calling `iterator.return` on abort iteration, if it exists +* added basic support [`Promise`](https://github.com/zloirock/core-js/#ecmascript-6-promise) unhandled rejection tracking in shim +* added [`Object.getOwnPropertyDescriptors`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) +* removed `console` cap - creates too many problems +* restructuring [namespaces](https://github.com/zloirock/core-js/#custom-build) +* some fixes + +##### 0.5.4 - 2015.02.15 +* some fixes + +##### 0.5.3 - 2015.02.14 +* added [support binary and octal literals](https://github.com/zloirock/core-js/#ecmascript-6-number) to `Number` constructor +* added [`Date#toISOString`](https://github.com/zloirock/core-js/#ecmascript-5) + +##### 0.5.2 - 2015.02.10 +* some fixes + +##### 0.5.1 - 2015.02.09 +* some fixes + +##### 0.5.0 - 2015.02.08 +* systematization of modules +* splitted [`es6` module](https://github.com/zloirock/core-js/#ecmascript-6) +* splitted `console` module: `web.console` - only cap for missing methods, `core.log` - bound methods & additional features +* added [`delay` method](https://github.com/zloirock/core-js/#delay) +* some fixes + +##### 0.4.10 - 2015.01.28 +* [`Object.getOwnPropertySymbols`](https://github.com/zloirock/core-js/#ecmascript-6-symbol) polyfill returns array of wrapped keys + +##### 0.4.9 - 2015.01.27 +* FF20-24 fix + +##### 0.4.8 - 2015.01.25 +* some [collections](https://github.com/zloirock/core-js/#ecmascript-6-collections) fixes + +##### 0.4.7 - 2015.01.25 +* added support frozen objects as [collections](https://github.com/zloirock/core-js/#ecmascript-6-collections) keys + +##### 0.4.6 - 2015.01.21 +* added [`Object.getOwnPropertySymbols`](https://github.com/zloirock/core-js/#ecmascript-6-symbol) +* added [`NodeList.prototype[@@iterator]`](https://github.com/zloirock/core-js/#ecmascript-6-iterators) +* added basic `@@species` logic - getter in native constructors +* removed `Function#by` +* some fixes + +##### 0.4.5 - 2015.01.16 +* some fixes + +##### 0.4.4 - 2015.01.11 +* enabled CSP support + +##### 0.4.3 - 2015.01.10 +* added `Function` instances `name` property for IE9+ + +##### 0.4.2 - 2015.01.10 +* `Object` static methods accept primitives +* `RegExp` constructor can alter flags (IE9+) +* added `Array.prototype[Symbol.unscopables]` + +##### 0.4.1 - 2015.01.05 +* some fixes + +##### 0.4.0 - 2015.01.03 +* added [`es6.reflect`](https://github.com/zloirock/core-js/#ecmascript-6-reflect) module: + * added `Reflect.apply` + * added `Reflect.construct` + * added `Reflect.defineProperty` + * added `Reflect.deleteProperty` + * added `Reflect.enumerate` + * added `Reflect.get` + * added `Reflect.getOwnPropertyDescriptor` + * added `Reflect.getPrototypeOf` + * added `Reflect.has` + * added `Reflect.isExtensible` + * added `Reflect.preventExtensions` + * added `Reflect.set` + * added `Reflect.setPrototypeOf` +* `core-js` methods now can use external `Symbol.iterator` polyfill +* some fixes + +##### 0.3.3 - 2014.12.28 +* [console cap](https://github.com/zloirock/core-js/#console) excluded from node.js default builds + +##### 0.3.2 - 2014.12.25 +* added cap for [ES5](https://github.com/zloirock/core-js/#ecmascript-5) freeze-family methods +* fixed `console` bug + +##### 0.3.1 - 2014.12.23 +* some fixes + +##### 0.3.0 - 2014.12.23 +* Optimize [`Map` & `Set`](https://github.com/zloirock/core-js/#ecmascript-6-collections): + * use entries chain on hash table + * fast & correct iteration + * iterators moved to [`es6`](https://github.com/zloirock/core-js/#ecmascript-6) and [`es6.collections`](https://github.com/zloirock/core-js/#ecmascript-6-collections) modules + +##### 0.2.5 - 2014.12.20 +* `console` no longer shortcut for `console.log` (compatibility problems) +* some fixes + +##### 0.2.4 - 2014.12.17 +* better compliance of ES6 +* added [`Math.fround`](https://github.com/zloirock/core-js/#ecmascript-6-math) (IE10+) +* some fixes + +##### 0.2.3 - 2014.12.15 +* [Symbols](https://github.com/zloirock/core-js/#ecmascript-6-symbol): + * added option to disable addition setter to `Object.prototype` for Symbol polyfill: + * added `Symbol.useSimple` + * added `Symbol.useSetter` + * added cap for well-known Symbols: + * added `Symbol.hasInstance` + * added `Symbol.isConcatSpreadable` + * added `Symbol.match` + * added `Symbol.replace` + * added `Symbol.search` + * added `Symbol.species` + * added `Symbol.split` + * added `Symbol.toPrimitive` + * added `Symbol.unscopables` + +##### 0.2.2 - 2014.12.13 +* added [`RegExp#flags`](https://github.com/zloirock/core-js/#ecmascript-6-regexp) ([December 2014 Draft Rev 29](http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts#december_6_2014_draft_rev_29)) +* added [`String.raw`](https://github.com/zloirock/core-js/#ecmascript-6-string) + +##### 0.2.1 - 2014.12.12 +* repair converting -0 to +0 in [native collections](https://github.com/zloirock/core-js/#ecmascript-6-collections) + +##### 0.2.0 - 2014.12.06 +* added [`es7.proposals`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) and [`es7.abstract-refs`](https://github.com/zenparsing/es-abstract-refs) modules +* added [`String#at`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) +* added real [`String Iterator`](https://github.com/zloirock/core-js/#ecmascript-6-iterators), older versions used Array Iterator +* added abstract references support: + * added `Symbol.referenceGet` + * added `Symbol.referenceSet` + * added `Symbol.referenceDelete` + * added `Function#@@referenceGet` + * added `Map#@@referenceGet` + * added `Map#@@referenceSet` + * added `Map#@@referenceDelete` + * added `WeakMap#@@referenceGet` + * added `WeakMap#@@referenceSet` + * added `WeakMap#@@referenceDelete` + * added `Dict.{...methods}[@@referenceGet]` +* removed deprecated `.contains` methods +* some fixes + +##### 0.1.5 - 2014.12.01 +* added [`Array#copyWithin`](https://github.com/zloirock/core-js/#ecmascript-6-array) +* added [`String#codePointAt`](https://github.com/zloirock/core-js/#ecmascript-6-string) +* added [`String.fromCodePoint`](https://github.com/zloirock/core-js/#ecmascript-6-string) + +##### 0.1.4 - 2014.11.27 +* added [`Dict.mapPairs`](https://github.com/zloirock/core-js/#dict) + +##### 0.1.3 - 2014.11.20 +* [TC39 November meeting](https://github.com/rwaldron/tc39-notes/tree/master/es6/2014-11): + * [`.contains` -> `.includes`](https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-11/nov-18.md#51--44-arrayprototypecontains-and-stringprototypecontains) + * `String#contains` -> [`String#includes`](https://github.com/zloirock/core-js/#ecmascript-6-string) + * `Array#contains` -> [`Array#includes`](https://github.com/zloirock/core-js/#ecmascript-7-proposals) + * `Dict.contains` -> [`Dict.includes`](https://github.com/zloirock/core-js/#dict) + * [removed `WeakMap#clear`](https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-11/nov-19.md#412-should-weakmapweakset-have-a-clear-method-markm) + * [removed `WeakSet#clear`](https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-11/nov-19.md#412-should-weakmapweakset-have-a-clear-method-markm) + +##### 0.1.2 - 2014.11.19 +* `Map` & `Set` bug fix + +##### 0.1.1 - 2014.11.18 +* public release \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/Gruntfile.js b/pitfall/pdfkit/node_modules/core-js/Gruntfile.js new file mode 100644 index 00000000..afbcd948 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/Gruntfile.js @@ -0,0 +1,2 @@ +require('LiveScript'); +module.exports = require('./build/Gruntfile'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/LICENSE b/pitfall/pdfkit/node_modules/core-js/LICENSE new file mode 100644 index 00000000..c99b842d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014-2016 Denis Pushkarev + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/core-js/bower.json b/pitfall/pdfkit/node_modules/core-js/bower.json new file mode 100644 index 00000000..f6eb784b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/bower.json @@ -0,0 +1,47 @@ +{ + "name": "core.js", + "main": "client/core.js", + "version": "2.4.1", + "description": "Standard Library", + "keywords": [ + "ES3", + "ECMAScript 3", + "ES5", + "ECMAScript 5", + "ES6", + "ES2015", + "ECMAScript 6", + "ECMAScript 2015", + "ES7", + "ES2016", + "ECMAScript 7", + "ECMAScript 2016", + "Harmony", + "Strawman", + "Map", + "Set", + "WeakMap", + "WeakSet", + "Promise", + "Symbol", + "TypedArray", + "setImmediate", + "Dict", + "polyfill", + "shim" + ], + "authors": [ + "Denis Pushkarev (http://zloirock.ru/)" + ], + "license": "MIT", + "homepage": "https://github.com/zloirock/core-js", + "repository": { + "type": "git", + "url": "https://github.com/zloirock/core-js.git" + }, + "ignore": [ + "build", + "node_modules", + "tests" + ] +} diff --git a/pitfall/pdfkit/node_modules/core-js/build/Gruntfile.ls b/pitfall/pdfkit/node_modules/core-js/build/Gruntfile.ls new file mode 100644 index 00000000..f4b53809 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/build/Gruntfile.ls @@ -0,0 +1,84 @@ +require! <[./build fs ./config]> +module.exports = (grunt)-> + grunt.loadNpmTasks \grunt-contrib-clean + grunt.loadNpmTasks \grunt-contrib-copy + grunt.loadNpmTasks \grunt-contrib-uglify + grunt.loadNpmTasks \grunt-contrib-watch + grunt.loadNpmTasks \grunt-livescript + grunt.loadNpmTasks \grunt-karma + grunt.initConfig do + pkg: grunt.file.readJSON './package.json' + uglify: build: + files: '<%=grunt.option("path")%>.min.js': '<%=grunt.option("path")%>.js' + options: + mangle: {+sort, +keep_fnames} + compress: {+pure_getters, +keep_fargs, +keep_fnames} + sourceMap: on + banner: config.banner + livescript: src: files: + './tests/helpers.js': './tests/helpers/*' + './tests/tests.js': './tests/tests/*' + './tests/library.js': './tests/library/*' + './tests/es.js': './tests/tests/es*' + './tests/experimental.js': './tests/experimental/*' + './build/index.js': './build/build.ls*' + clean: <[./library]> + copy: lib: files: + * expand: on + cwd: './' + src: <[es5/** es6/** es7/** stage/** web/** core/** fn/** index.js shim.js]> + dest: './library/' + * expand: on + cwd: './' + src: <[modules/*]> + dest: './library/' + filter: \isFile + * expand: on + cwd: './modules/library/' + src: '*' + dest: './library/modules/' + watch: + core: + files: './modules/*' + tasks: \default + tests: + files: './tests/tests/*' + tasks: \livescript + karma: + 'options': + configFile: './tests/karma.conf.js' + browsers: <[PhantomJS]> + singleRun: on + 'default': {} + 'library': files: <[client/library.js tests/helpers.js tests/library.js]>map -> src: it + grunt.registerTask \build (options)-> + done = @async! + build { + modules: (options || 'es5,es6,es7,js,web,core')split \, + blacklist: (grunt.option(\blacklist) || '')split \, + library: grunt.option(\library) in <[yes on true]> + umd: grunt.option(\umd) not in <[no off false]> + } + .then !-> + grunt.option(\path) || grunt.option(\path, './custom') + fs.writeFile grunt.option(\path) + '.js', it, done + .catch !-> + console.error it + process.exit 1 + grunt.registerTask \client -> + grunt.option \library '' + grunt.option \path './client/core' + grunt.task.run <[build:es5,es6,es7,js,web,core uglify]> + grunt.registerTask \library -> + grunt.option \library 'true' + grunt.option \path './client/library' + grunt.task.run <[build:es5,es6,es7,js,web,core uglify]> + grunt.registerTask \shim -> + grunt.option \library '' + grunt.option \path './client/shim' + grunt.task.run <[build:es5,es6,es7,js,web uglify]> + grunt.registerTask \e -> + grunt.option \library ''> + grunt.option \path './client/core' + grunt.task.run <[build:es5,es6,es7,js,web,core,exp uglify]> + grunt.registerTask \default <[clean copy client library shim]> \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/build/build.ls b/pitfall/pdfkit/node_modules/core-js/build/build.ls new file mode 100644 index 00000000..0cf210de --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/build/build.ls @@ -0,0 +1,62 @@ +require! { + '../library/fn/promise': Promise + './config': {list, experimental, libraryBlacklist, es5SpecialCase, banner} + fs: {readFile, writeFile, unlink} + path: {join} + webpack, temp +} + +module.exports = ({modules = [], blacklist = [], library = no, umd = on})-> + resolve, reject <~! new Promise _ + let @ = modules.reduce ((memo, it)-> memo[it] = on; memo), {} + if @exp => for experimental => @[..] = on + if @es5 => for es5SpecialCase => @[..] = on + for ns of @ + if @[ns] + for name in list + if name.indexOf("#ns.") is 0 and name not in experimental + @[name] = on + + if library => blacklist ++= libraryBlacklist + for ns in blacklist + for name in list + if name is ns or name.indexOf("#ns.") is 0 + @[name] = no + + TARGET = temp.path {suffix: '.js'} + + err, info <~! webpack do + entry: list.filter(~> @[it]).map ~> + if library => join __dirname, '..', 'library', 'modules', it + else join __dirname, '..', 'modules', it + output: + path: '' + filename: TARGET + if err => return reject err + + err, script <~! readFile TARGET + if err => return reject err + + err <~! unlink TARGET + if err => return reject err + + if umd + exportScript = """ + // CommonJS export + if(typeof module != 'undefined' && module.exports)module.exports = __e; + // RequireJS export + else if(typeof define == 'function' && define.amd)define(function(){return __e}); + // Export to global object + else __g.core = __e; + """ + else + exportScript = "" + + resolve """ + #banner + !function(__e, __g, undefined){ + 'use strict'; + #script + #exportScript + }(1, 1); + """ \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/build/config.js b/pitfall/pdfkit/node_modules/core-js/build/config.js new file mode 100644 index 00000000..df09eb12 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/build/config.js @@ -0,0 +1,259 @@ +module.exports = { + list: [ + 'es6.symbol', + 'es6.object.define-property', + 'es6.object.define-properties', + 'es6.object.get-own-property-descriptor', + 'es6.object.create', + 'es6.object.get-prototype-of', + 'es6.object.keys', + 'es6.object.get-own-property-names', + 'es6.object.freeze', + 'es6.object.seal', + 'es6.object.prevent-extensions', + 'es6.object.is-frozen', + 'es6.object.is-sealed', + 'es6.object.is-extensible', + 'es6.object.assign', + 'es6.object.is', + 'es6.object.set-prototype-of', + 'es6.object.to-string', + 'es6.function.bind', + 'es6.function.name', + 'es6.function.has-instance', + 'es6.number.constructor', + 'es6.number.to-fixed', + 'es6.number.to-precision', + 'es6.number.epsilon', + 'es6.number.is-finite', + 'es6.number.is-integer', + 'es6.number.is-nan', + 'es6.number.is-safe-integer', + 'es6.number.max-safe-integer', + 'es6.number.min-safe-integer', + 'es6.number.parse-float', + 'es6.number.parse-int', + 'es6.parse-int', + 'es6.parse-float', + 'es6.math.acosh', + 'es6.math.asinh', + 'es6.math.atanh', + 'es6.math.cbrt', + 'es6.math.clz32', + 'es6.math.cosh', + 'es6.math.expm1', + 'es6.math.fround', + 'es6.math.hypot', + 'es6.math.imul', + 'es6.math.log10', + 'es6.math.log1p', + 'es6.math.log2', + 'es6.math.sign', + 'es6.math.sinh', + 'es6.math.tanh', + 'es6.math.trunc', + 'es6.string.from-code-point', + 'es6.string.raw', + 'es6.string.trim', + 'es6.string.code-point-at', + 'es6.string.ends-with', + 'es6.string.includes', + 'es6.string.repeat', + 'es6.string.starts-with', + 'es6.string.iterator', + 'es6.string.anchor', + 'es6.string.big', + 'es6.string.blink', + 'es6.string.bold', + 'es6.string.fixed', + 'es6.string.fontcolor', + 'es6.string.fontsize', + 'es6.string.italics', + 'es6.string.link', + 'es6.string.small', + 'es6.string.strike', + 'es6.string.sub', + 'es6.string.sup', + 'es6.array.is-array', + 'es6.array.from', + 'es6.array.of', + 'es6.array.join', + 'es6.array.slice', + 'es6.array.sort', + 'es6.array.for-each', + 'es6.array.map', + 'es6.array.filter', + 'es6.array.some', + 'es6.array.every', + 'es6.array.reduce', + 'es6.array.reduce-right', + 'es6.array.index-of', + 'es6.array.last-index-of', + 'es6.array.copy-within', + 'es6.array.fill', + 'es6.array.find', + 'es6.array.find-index', + 'es6.array.iterator', + 'es6.array.species', + 'es6.regexp.constructor', + 'es6.regexp.to-string', + 'es6.regexp.flags', + 'es6.regexp.match', + 'es6.regexp.replace', + 'es6.regexp.search', + 'es6.regexp.split', + 'es6.promise', + 'es6.map', + 'es6.set', + 'es6.weak-map', + 'es6.weak-set', + 'es6.reflect.apply', + 'es6.reflect.construct', + 'es6.reflect.define-property', + 'es6.reflect.delete-property', + 'es6.reflect.enumerate', + 'es6.reflect.get', + 'es6.reflect.get-own-property-descriptor', + 'es6.reflect.get-prototype-of', + 'es6.reflect.has', + 'es6.reflect.is-extensible', + 'es6.reflect.own-keys', + 'es6.reflect.prevent-extensions', + 'es6.reflect.set', + 'es6.reflect.set-prototype-of', + 'es6.date.now', + 'es6.date.to-json', + 'es6.date.to-iso-string', + 'es6.date.to-string', + 'es6.date.to-primitive', + 'es6.typed.array-buffer', + 'es6.typed.data-view', + 'es6.typed.int8-array', + 'es6.typed.uint8-array', + 'es6.typed.uint8-clamped-array', + 'es6.typed.int16-array', + 'es6.typed.uint16-array', + 'es6.typed.int32-array', + 'es6.typed.uint32-array', + 'es6.typed.float32-array', + 'es6.typed.float64-array', + 'es7.array.includes', + 'es7.string.at', + 'es7.string.pad-start', + 'es7.string.pad-end', + 'es7.string.trim-left', + 'es7.string.trim-right', + 'es7.string.match-all', + 'es7.symbol.async-iterator', + 'es7.symbol.observable', + 'es7.object.get-own-property-descriptors', + 'es7.object.values', + 'es7.object.entries', + 'es7.object.enumerable-keys', + 'es7.object.enumerable-values', + 'es7.object.enumerable-entries', + 'es7.object.define-getter', + 'es7.object.define-setter', + 'es7.object.lookup-getter', + 'es7.object.lookup-setter', + 'es7.map.to-json', + 'es7.set.to-json', + 'es7.system.global', + 'es7.error.is-error', + 'es7.math.iaddh', + 'es7.math.isubh', + 'es7.math.imulh', + 'es7.math.umulh', + 'es7.reflect.define-metadata', + 'es7.reflect.delete-metadata', + 'es7.reflect.get-metadata', + 'es7.reflect.get-metadata-keys', + 'es7.reflect.get-own-metadata', + 'es7.reflect.get-own-metadata-keys', + 'es7.reflect.has-metadata', + 'es7.reflect.has-own-metadata', + 'es7.reflect.metadata', + 'es7.asap', + 'es7.observable', + 'web.immediate', + 'web.dom.iterable', + 'web.timers', + 'core.dict', + 'core.get-iterator-method', + 'core.get-iterator', + 'core.is-iterable', + 'core.delay', + 'core.function.part', + 'core.object.is-object', + 'core.object.classof', + 'core.object.define', + 'core.object.make', + 'core.number.iterator', + 'core.regexp.escape', + 'core.string.escape-html', + 'core.string.unescape-html', + ], + experimental: [ + 'es7.object.enumerable-keys', + 'es7.object.enumerable-values', + 'es7.object.enumerable-entries', + ], + libraryBlacklist: [ + 'es6.object.to-string', + 'es6.function.name', + 'es6.regexp.constructor', + 'es6.regexp.to-string', + 'es6.regexp.flags', + 'es6.regexp.match', + 'es6.regexp.replace', + 'es6.regexp.search', + 'es6.regexp.split', + 'es6.number.constructor', + 'es6.date.to-string', + 'es6.date.to-primitive', + ], + es5SpecialCase: [ + 'es6.object.create', + 'es6.object.define-property', + 'es6.object.define-properties', + 'es6.object.get-own-property-descriptor', + 'es6.object.get-prototype-of', + 'es6.object.keys', + 'es6.object.get-own-property-names', + 'es6.object.freeze', + 'es6.object.seal', + 'es6.object.prevent-extensions', + 'es6.object.is-frozen', + 'es6.object.is-sealed', + 'es6.object.is-extensible', + 'es6.function.bind', + 'es6.array.is-array', + 'es6.array.join', + 'es6.array.slice', + 'es6.array.sort', + 'es6.array.for-each', + 'es6.array.map', + 'es6.array.filter', + 'es6.array.some', + 'es6.array.every', + 'es6.array.reduce', + 'es6.array.reduce-right', + 'es6.array.index-of', + 'es6.array.last-index-of', + 'es6.number.to-fixed', + 'es6.number.to-precision', + 'es6.date.now', + 'es6.date.to-iso-string', + 'es6.date.to-json', + 'es6.string.trim', + 'es6.regexp.to-string', + 'es6.parse-int', + 'es6.parse-float', + ], + banner: '/**\n' + + ' * core-js ' + require('../package').version + '\n' + + ' * https://github.com/zloirock/core-js\n' + + ' * License: http://rock.mit-license.org\n' + + ' * © ' + new Date().getFullYear() + ' Denis Pushkarev\n' + + ' */' +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/build/index.js b/pitfall/pdfkit/node_modules/core-js/build/index.js new file mode 100644 index 00000000..26bdec41 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/build/index.js @@ -0,0 +1,104 @@ +// Generated by LiveScript 1.4.0 +(function(){ + var Promise, ref$, list, experimental, libraryBlacklist, es5SpecialCase, banner, readFile, writeFile, unlink, join, webpack, temp; + Promise = require('../library/fn/promise'); + ref$ = require('./config'), list = ref$.list, experimental = ref$.experimental, libraryBlacklist = ref$.libraryBlacklist, es5SpecialCase = ref$.es5SpecialCase, banner = ref$.banner; + ref$ = require('fs'), readFile = ref$.readFile, writeFile = ref$.writeFile, unlink = ref$.unlink; + join = require('path').join; + webpack = require('webpack'); + temp = require('temp'); + module.exports = function(arg$){ + var modules, ref$, blacklist, library, umd, this$ = this; + modules = (ref$ = arg$.modules) != null + ? ref$ + : [], blacklist = (ref$ = arg$.blacklist) != null + ? ref$ + : [], library = (ref$ = arg$.library) != null ? ref$ : false, umd = (ref$ = arg$.umd) != null ? ref$ : true; + return new Promise(function(resolve, reject){ + (function(){ + var i$, x$, ref$, len$, y$, ns, name, j$, len1$, TARGET, this$ = this; + if (this.exp) { + for (i$ = 0, len$ = (ref$ = experimental).length; i$ < len$; ++i$) { + x$ = ref$[i$]; + this[x$] = true; + } + } + if (this.es5) { + for (i$ = 0, len$ = (ref$ = es5SpecialCase).length; i$ < len$; ++i$) { + y$ = ref$[i$]; + this[y$] = true; + } + } + for (ns in this) { + if (this[ns]) { + for (i$ = 0, len$ = (ref$ = list).length; i$ < len$; ++i$) { + name = ref$[i$]; + if (name.indexOf(ns + ".") === 0 && !in$(name, experimental)) { + this[name] = true; + } + } + } + } + if (library) { + blacklist = blacklist.concat(libraryBlacklist); + } + for (i$ = 0, len$ = blacklist.length; i$ < len$; ++i$) { + ns = blacklist[i$]; + for (j$ = 0, len1$ = (ref$ = list).length; j$ < len1$; ++j$) { + name = ref$[j$]; + if (name === ns || name.indexOf(ns + ".") === 0) { + this[name] = false; + } + } + } + TARGET = temp.path({ + suffix: '.js' + }); + webpack({ + entry: list.filter(function(it){ + return this$[it]; + }).map(function(it){ + if (library) { + return join(__dirname, '..', 'library', 'modules', it); + } else { + return join(__dirname, '..', 'modules', it); + } + }), + output: { + path: '', + filename: TARGET + } + }, function(err, info){ + if (err) { + return reject(err); + } + readFile(TARGET, function(err, script){ + if (err) { + return reject(err); + } + unlink(TARGET, function(err){ + var exportScript; + if (err) { + return reject(err); + } + if (umd) { + exportScript = "// CommonJS export\nif(typeof module != 'undefined' && module.exports)module.exports = __e;\n// RequireJS export\nelse if(typeof define == 'function' && define.amd)define(function(){return __e});\n// Export to global object\nelse __g.core = __e;"; + } else { + exportScript = ""; + } + resolve("" + banner + "\n!function(__e, __g, undefined){\n'use strict';\n" + script + "\n" + exportScript + "\n}(1, 1);"); + }); + }); + }); + }.call(modules.reduce(function(memo, it){ + memo[it] = true; + return memo; + }, {}))); + }); + }; + function in$(x, xs){ + var i = -1, l = xs.length >>> 0; + while (++i < l) if (x === xs[i]) return true; + return false; + } +}).call(this); diff --git a/pitfall/pdfkit/node_modules/core-js/client/core.js b/pitfall/pdfkit/node_modules/core-js/client/core.js new file mode 100644 index 00000000..1e470de7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/client/core.js @@ -0,0 +1,7613 @@ +/** + * core-js 2.4.1 + * https://github.com/zloirock/core-js + * License: http://rock.mit-license.org + * © 2016 Denis Pushkarev + */ +!function(__e, __g, undefined){ +'use strict'; +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(1); + __webpack_require__(50); + __webpack_require__(51); + __webpack_require__(52); + __webpack_require__(54); + __webpack_require__(55); + __webpack_require__(58); + __webpack_require__(59); + __webpack_require__(60); + __webpack_require__(61); + __webpack_require__(62); + __webpack_require__(63); + __webpack_require__(64); + __webpack_require__(65); + __webpack_require__(66); + __webpack_require__(68); + __webpack_require__(70); + __webpack_require__(72); + __webpack_require__(74); + __webpack_require__(77); + __webpack_require__(78); + __webpack_require__(79); + __webpack_require__(83); + __webpack_require__(86); + __webpack_require__(87); + __webpack_require__(88); + __webpack_require__(89); + __webpack_require__(91); + __webpack_require__(92); + __webpack_require__(93); + __webpack_require__(94); + __webpack_require__(95); + __webpack_require__(97); + __webpack_require__(99); + __webpack_require__(100); + __webpack_require__(101); + __webpack_require__(103); + __webpack_require__(104); + __webpack_require__(105); + __webpack_require__(107); + __webpack_require__(108); + __webpack_require__(109); + __webpack_require__(111); + __webpack_require__(112); + __webpack_require__(113); + __webpack_require__(114); + __webpack_require__(115); + __webpack_require__(116); + __webpack_require__(117); + __webpack_require__(118); + __webpack_require__(119); + __webpack_require__(120); + __webpack_require__(121); + __webpack_require__(122); + __webpack_require__(123); + __webpack_require__(124); + __webpack_require__(126); + __webpack_require__(130); + __webpack_require__(131); + __webpack_require__(132); + __webpack_require__(133); + __webpack_require__(137); + __webpack_require__(139); + __webpack_require__(140); + __webpack_require__(141); + __webpack_require__(142); + __webpack_require__(143); + __webpack_require__(144); + __webpack_require__(145); + __webpack_require__(146); + __webpack_require__(147); + __webpack_require__(148); + __webpack_require__(149); + __webpack_require__(150); + __webpack_require__(151); + __webpack_require__(152); + __webpack_require__(158); + __webpack_require__(159); + __webpack_require__(161); + __webpack_require__(162); + __webpack_require__(163); + __webpack_require__(167); + __webpack_require__(168); + __webpack_require__(169); + __webpack_require__(170); + __webpack_require__(171); + __webpack_require__(173); + __webpack_require__(174); + __webpack_require__(175); + __webpack_require__(176); + __webpack_require__(179); + __webpack_require__(181); + __webpack_require__(182); + __webpack_require__(183); + __webpack_require__(185); + __webpack_require__(187); + __webpack_require__(189); + __webpack_require__(190); + __webpack_require__(191); + __webpack_require__(193); + __webpack_require__(194); + __webpack_require__(195); + __webpack_require__(196); + __webpack_require__(203); + __webpack_require__(206); + __webpack_require__(207); + __webpack_require__(209); + __webpack_require__(210); + __webpack_require__(211); + __webpack_require__(212); + __webpack_require__(213); + __webpack_require__(214); + __webpack_require__(215); + __webpack_require__(216); + __webpack_require__(217); + __webpack_require__(218); + __webpack_require__(219); + __webpack_require__(220); + __webpack_require__(222); + __webpack_require__(223); + __webpack_require__(224); + __webpack_require__(225); + __webpack_require__(226); + __webpack_require__(227); + __webpack_require__(228); + __webpack_require__(229); + __webpack_require__(231); + __webpack_require__(234); + __webpack_require__(235); + __webpack_require__(237); + __webpack_require__(238); + __webpack_require__(239); + __webpack_require__(240); + __webpack_require__(241); + __webpack_require__(242); + __webpack_require__(243); + __webpack_require__(244); + __webpack_require__(245); + __webpack_require__(246); + __webpack_require__(247); + __webpack_require__(249); + __webpack_require__(250); + __webpack_require__(251); + __webpack_require__(252); + __webpack_require__(253); + __webpack_require__(254); + __webpack_require__(255); + __webpack_require__(256); + __webpack_require__(258); + __webpack_require__(259); + __webpack_require__(261); + __webpack_require__(262); + __webpack_require__(263); + __webpack_require__(264); + __webpack_require__(267); + __webpack_require__(268); + __webpack_require__(269); + __webpack_require__(270); + __webpack_require__(271); + __webpack_require__(272); + __webpack_require__(273); + __webpack_require__(274); + __webpack_require__(276); + __webpack_require__(277); + __webpack_require__(278); + __webpack_require__(279); + __webpack_require__(280); + __webpack_require__(281); + __webpack_require__(282); + __webpack_require__(283); + __webpack_require__(284); + __webpack_require__(285); + __webpack_require__(286); + __webpack_require__(287); + __webpack_require__(288); + __webpack_require__(291); + __webpack_require__(156); + __webpack_require__(293); + __webpack_require__(292); + __webpack_require__(294); + __webpack_require__(295); + __webpack_require__(296); + __webpack_require__(297); + __webpack_require__(298); + __webpack_require__(300); + __webpack_require__(301); + __webpack_require__(302); + __webpack_require__(304); + module.exports = __webpack_require__(305); + + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // ECMAScript 6 symbols shim + var global = __webpack_require__(2) + , has = __webpack_require__(3) + , DESCRIPTORS = __webpack_require__(4) + , $export = __webpack_require__(6) + , redefine = __webpack_require__(16) + , META = __webpack_require__(20).KEY + , $fails = __webpack_require__(5) + , shared = __webpack_require__(21) + , setToStringTag = __webpack_require__(22) + , uid = __webpack_require__(17) + , wks = __webpack_require__(23) + , wksExt = __webpack_require__(24) + , wksDefine = __webpack_require__(25) + , keyOf = __webpack_require__(27) + , enumKeys = __webpack_require__(40) + , isArray = __webpack_require__(43) + , anObject = __webpack_require__(10) + , toIObject = __webpack_require__(30) + , toPrimitive = __webpack_require__(14) + , createDesc = __webpack_require__(15) + , _create = __webpack_require__(44) + , gOPNExt = __webpack_require__(47) + , $GOPD = __webpack_require__(49) + , $DP = __webpack_require__(9) + , $keys = __webpack_require__(28) + , gOPD = $GOPD.f + , dP = $DP.f + , gOPN = gOPNExt.f + , $Symbol = global.Symbol + , $JSON = global.JSON + , _stringify = $JSON && $JSON.stringify + , PROTOTYPE = 'prototype' + , HIDDEN = wks('_hidden') + , TO_PRIMITIVE = wks('toPrimitive') + , isEnum = {}.propertyIsEnumerable + , SymbolRegistry = shared('symbol-registry') + , AllSymbols = shared('symbols') + , OPSymbols = shared('op-symbols') + , ObjectProto = Object[PROTOTYPE] + , USE_NATIVE = typeof $Symbol == 'function' + , QObject = global.QObject; + // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 + var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + + // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 + var setSymbolDesc = DESCRIPTORS && $fails(function(){ + return _create(dP({}, 'a', { + get: function(){ return dP(this, 'a', {value: 7}).a; } + })).a != 7; + }) ? function(it, key, D){ + var protoDesc = gOPD(ObjectProto, key); + if(protoDesc)delete ObjectProto[key]; + dP(it, key, D); + if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc); + } : dP; + + var wrap = function(tag){ + var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); + sym._k = tag; + return sym; + }; + + var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){ + return typeof it == 'symbol'; + } : function(it){ + return it instanceof $Symbol; + }; + + var $defineProperty = function defineProperty(it, key, D){ + if(it === ObjectProto)$defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if(has(AllSymbols, key)){ + if(!D.enumerable){ + if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false; + D = _create(D, {enumerable: createDesc(0, false)}); + } return setSymbolDesc(it, key, D); + } return dP(it, key, D); + }; + var $defineProperties = function defineProperties(it, P){ + anObject(it); + var keys = enumKeys(P = toIObject(P)) + , i = 0 + , l = keys.length + , key; + while(l > i)$defineProperty(it, key = keys[i++], P[key]); + return it; + }; + var $create = function create(it, P){ + return P === undefined ? _create(it) : $defineProperties(_create(it), P); + }; + var $propertyIsEnumerable = function propertyIsEnumerable(key){ + var E = isEnum.call(this, key = toPrimitive(key, true)); + if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false; + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; + }; + var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){ + it = toIObject(it); + key = toPrimitive(key, true); + if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return; + var D = gOPD(it, key); + if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true; + return D; + }; + var $getOwnPropertyNames = function getOwnPropertyNames(it){ + var names = gOPN(toIObject(it)) + , result = [] + , i = 0 + , key; + while(names.length > i){ + if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key); + } return result; + }; + var $getOwnPropertySymbols = function getOwnPropertySymbols(it){ + var IS_OP = it === ObjectProto + , names = gOPN(IS_OP ? OPSymbols : toIObject(it)) + , result = [] + , i = 0 + , key; + while(names.length > i){ + if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]); + } return result; + }; + + // 19.4.1.1 Symbol([description]) + if(!USE_NATIVE){ + $Symbol = function Symbol(){ + if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function(value){ + if(this === ObjectProto)$set.call(OPSymbols, value); + if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set}); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString(){ + return this._k; + }); + + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + __webpack_require__(48).f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(42).f = $propertyIsEnumerable; + __webpack_require__(41).f = $getOwnPropertySymbols; + + if(DESCRIPTORS && !__webpack_require__(26)){ + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + wksExt.f = function(name){ + return wrap(wks(name)); + } + } + + $export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol}); + + for(var symbols = ( + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' + ).split(','), i = 0; symbols.length > i; )wks(symbols[i++]); + + for(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]); + + $export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + 'for': function(key){ + return has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(key){ + if(isSymbol(key))return keyOf(SymbolRegistry, key); + throw TypeError(key + ' is not a symbol!'); + }, + useSetter: function(){ setter = true; }, + useSimple: function(){ setter = false; } + }); + + $export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols + }); + + // 24.3.2 JSON.stringify(value [, replacer [, space]]) + $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){ + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}'; + })), 'JSON', { + stringify: function stringify(it){ + if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined + var args = [it] + , i = 1 + , replacer, $replacer; + while(arguments.length > i)args.push(arguments[i++]); + replacer = args[1]; + if(typeof replacer == 'function')$replacer = replacer; + if($replacer || !isArray(replacer))replacer = function(key, value){ + if($replacer)value = $replacer.call(this, key, value); + if(!isSymbol(value))return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + } + }); + + // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) + $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(8)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); + // 19.4.3.5 Symbol.prototype[@@toStringTag] + setToStringTag($Symbol, 'Symbol'); + // 20.2.1.9 Math[@@toStringTag] + setToStringTag(Math, 'Math', true); + // 24.3.3 JSON[@@toStringTag] + setToStringTag(global.JSON, 'JSON', true); + +/***/ }, +/* 2 */ +/***/ function(module, exports) { + + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); + if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef + +/***/ }, +/* 3 */ +/***/ function(module, exports) { + + var hasOwnProperty = {}.hasOwnProperty; + module.exports = function(it, key){ + return hasOwnProperty.call(it, key); + }; + +/***/ }, +/* 4 */ +/***/ function(module, exports, __webpack_require__) { + + // Thank's IE8 for his funny defineProperty + module.exports = !__webpack_require__(5)(function(){ + return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; + }); + +/***/ }, +/* 5 */ +/***/ function(module, exports) { + + module.exports = function(exec){ + try { + return !!exec(); + } catch(e){ + return true; + } + }; + +/***/ }, +/* 6 */ +/***/ function(module, exports, __webpack_require__) { + + var global = __webpack_require__(2) + , core = __webpack_require__(7) + , hide = __webpack_require__(8) + , redefine = __webpack_require__(16) + , ctx = __webpack_require__(18) + , PROTOTYPE = 'prototype'; + + var $export = function(type, name, source){ + var IS_FORCED = type & $export.F + , IS_GLOBAL = type & $export.G + , IS_STATIC = type & $export.S + , IS_PROTO = type & $export.P + , IS_BIND = type & $export.B + , target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE] + , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) + , expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}) + , key, own, out, exp; + if(IS_GLOBAL)source = name; + for(key in source){ + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + // export native or passed + out = (own ? target : source)[key]; + // bind timers to global for call from export context + exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // extend global + if(target)redefine(target, key, out, type & $export.U); + // export + if(exports[key] != out)hide(exports, key, exp); + if(IS_PROTO && expProto[key] != out)expProto[key] = out; + } + }; + global.core = core; + // type bitmap + $export.F = 1; // forced + $export.G = 2; // global + $export.S = 4; // static + $export.P = 8; // proto + $export.B = 16; // bind + $export.W = 32; // wrap + $export.U = 64; // safe + $export.R = 128; // real proto method for `library` + module.exports = $export; + +/***/ }, +/* 7 */ +/***/ function(module, exports) { + + var core = module.exports = {version: '2.4.0'}; + if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef + +/***/ }, +/* 8 */ +/***/ function(module, exports, __webpack_require__) { + + var dP = __webpack_require__(9) + , createDesc = __webpack_require__(15); + module.exports = __webpack_require__(4) ? function(object, key, value){ + return dP.f(object, key, createDesc(1, value)); + } : function(object, key, value){ + object[key] = value; + return object; + }; + +/***/ }, +/* 9 */ +/***/ function(module, exports, __webpack_require__) { + + var anObject = __webpack_require__(10) + , IE8_DOM_DEFINE = __webpack_require__(12) + , toPrimitive = __webpack_require__(14) + , dP = Object.defineProperty; + + exports.f = __webpack_require__(4) ? Object.defineProperty : function defineProperty(O, P, Attributes){ + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if(IE8_DOM_DEFINE)try { + return dP(O, P, Attributes); + } catch(e){ /* empty */ } + if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!'); + if('value' in Attributes)O[P] = Attributes.value; + return O; + }; + +/***/ }, +/* 10 */ +/***/ function(module, exports, __webpack_require__) { + + var isObject = __webpack_require__(11); + module.exports = function(it){ + if(!isObject(it))throw TypeError(it + ' is not an object!'); + return it; + }; + +/***/ }, +/* 11 */ +/***/ function(module, exports) { + + module.exports = function(it){ + return typeof it === 'object' ? it !== null : typeof it === 'function'; + }; + +/***/ }, +/* 12 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = !__webpack_require__(4) && !__webpack_require__(5)(function(){ + return Object.defineProperty(__webpack_require__(13)('div'), 'a', {get: function(){ return 7; }}).a != 7; + }); + +/***/ }, +/* 13 */ +/***/ function(module, exports, __webpack_require__) { + + var isObject = __webpack_require__(11) + , document = __webpack_require__(2).document + // in old IE typeof document.createElement is 'object' + , is = isObject(document) && isObject(document.createElement); + module.exports = function(it){ + return is ? document.createElement(it) : {}; + }; + +/***/ }, +/* 14 */ +/***/ function(module, exports, __webpack_require__) { + + // 7.1.1 ToPrimitive(input [, PreferredType]) + var isObject = __webpack_require__(11); + // instead of the ES6 spec version, we didn't implement @@toPrimitive case + // and the second argument - flag - preferred type is a string + module.exports = function(it, S){ + if(!isObject(it))return it; + var fn, val; + if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; + if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val; + if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; + throw TypeError("Can't convert object to primitive value"); + }; + +/***/ }, +/* 15 */ +/***/ function(module, exports) { + + module.exports = function(bitmap, value){ + return { + enumerable : !(bitmap & 1), + configurable: !(bitmap & 2), + writable : !(bitmap & 4), + value : value + }; + }; + +/***/ }, +/* 16 */ +/***/ function(module, exports, __webpack_require__) { + + var global = __webpack_require__(2) + , hide = __webpack_require__(8) + , has = __webpack_require__(3) + , SRC = __webpack_require__(17)('src') + , TO_STRING = 'toString' + , $toString = Function[TO_STRING] + , TPL = ('' + $toString).split(TO_STRING); + + __webpack_require__(7).inspectSource = function(it){ + return $toString.call(it); + }; + + (module.exports = function(O, key, val, safe){ + var isFunction = typeof val == 'function'; + if(isFunction)has(val, 'name') || hide(val, 'name', key); + if(O[key] === val)return; + if(isFunction)has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); + if(O === global){ + O[key] = val; + } else { + if(!safe){ + delete O[key]; + hide(O, key, val); + } else { + if(O[key])O[key] = val; + else hide(O, key, val); + } + } + // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative + })(Function.prototype, TO_STRING, function toString(){ + return typeof this == 'function' && this[SRC] || $toString.call(this); + }); + +/***/ }, +/* 17 */ +/***/ function(module, exports) { + + var id = 0 + , px = Math.random(); + module.exports = function(key){ + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); + }; + +/***/ }, +/* 18 */ +/***/ function(module, exports, __webpack_require__) { + + // optional / simple context binding + var aFunction = __webpack_require__(19); + module.exports = function(fn, that, length){ + aFunction(fn); + if(that === undefined)return fn; + switch(length){ + case 1: return function(a){ + return fn.call(that, a); + }; + case 2: return function(a, b){ + return fn.call(that, a, b); + }; + case 3: return function(a, b, c){ + return fn.call(that, a, b, c); + }; + } + return function(/* ...args */){ + return fn.apply(that, arguments); + }; + }; + +/***/ }, +/* 19 */ +/***/ function(module, exports) { + + module.exports = function(it){ + if(typeof it != 'function')throw TypeError(it + ' is not a function!'); + return it; + }; + +/***/ }, +/* 20 */ +/***/ function(module, exports, __webpack_require__) { + + var META = __webpack_require__(17)('meta') + , isObject = __webpack_require__(11) + , has = __webpack_require__(3) + , setDesc = __webpack_require__(9).f + , id = 0; + var isExtensible = Object.isExtensible || function(){ + return true; + }; + var FREEZE = !__webpack_require__(5)(function(){ + return isExtensible(Object.preventExtensions({})); + }); + var setMeta = function(it){ + setDesc(it, META, {value: { + i: 'O' + ++id, // object ID + w: {} // weak collections IDs + }}); + }; + var fastKey = function(it, create){ + // return primitive with prefix + if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if(!has(it, META)){ + // can't set metadata to uncaught frozen object + if(!isExtensible(it))return 'F'; + // not necessary to add metadata + if(!create)return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } return it[META].i; + }; + var getWeak = function(it, create){ + if(!has(it, META)){ + // can't set metadata to uncaught frozen object + if(!isExtensible(it))return true; + // not necessary to add metadata + if(!create)return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } return it[META].w; + }; + // add metadata on freeze-family methods calling + var onFreeze = function(it){ + if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it); + return it; + }; + var meta = module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze + }; + +/***/ }, +/* 21 */ +/***/ function(module, exports, __webpack_require__) { + + var global = __webpack_require__(2) + , SHARED = '__core-js_shared__' + , store = global[SHARED] || (global[SHARED] = {}); + module.exports = function(key){ + return store[key] || (store[key] = {}); + }; + +/***/ }, +/* 22 */ +/***/ function(module, exports, __webpack_require__) { + + var def = __webpack_require__(9).f + , has = __webpack_require__(3) + , TAG = __webpack_require__(23)('toStringTag'); + + module.exports = function(it, tag, stat){ + if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag}); + }; + +/***/ }, +/* 23 */ +/***/ function(module, exports, __webpack_require__) { + + var store = __webpack_require__(21)('wks') + , uid = __webpack_require__(17) + , Symbol = __webpack_require__(2).Symbol + , USE_SYMBOL = typeof Symbol == 'function'; + + var $exports = module.exports = function(name){ + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); + }; + + $exports.store = store; + +/***/ }, +/* 24 */ +/***/ function(module, exports, __webpack_require__) { + + exports.f = __webpack_require__(23); + +/***/ }, +/* 25 */ +/***/ function(module, exports, __webpack_require__) { + + var global = __webpack_require__(2) + , core = __webpack_require__(7) + , LIBRARY = __webpack_require__(26) + , wksExt = __webpack_require__(24) + , defineProperty = __webpack_require__(9).f; + module.exports = function(name){ + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)}); + }; + +/***/ }, +/* 26 */ +/***/ function(module, exports) { + + module.exports = false; + +/***/ }, +/* 27 */ +/***/ function(module, exports, __webpack_require__) { + + var getKeys = __webpack_require__(28) + , toIObject = __webpack_require__(30); + module.exports = function(object, el){ + var O = toIObject(object) + , keys = getKeys(O) + , length = keys.length + , index = 0 + , key; + while(length > index)if(O[key = keys[index++]] === el)return key; + }; + +/***/ }, +/* 28 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.14 / 15.2.3.14 Object.keys(O) + var $keys = __webpack_require__(29) + , enumBugKeys = __webpack_require__(39); + + module.exports = Object.keys || function keys(O){ + return $keys(O, enumBugKeys); + }; + +/***/ }, +/* 29 */ +/***/ function(module, exports, __webpack_require__) { + + var has = __webpack_require__(3) + , toIObject = __webpack_require__(30) + , arrayIndexOf = __webpack_require__(34)(false) + , IE_PROTO = __webpack_require__(38)('IE_PROTO'); + + module.exports = function(object, names){ + var O = toIObject(object) + , i = 0 + , result = [] + , key; + for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while(names.length > i)if(has(O, key = names[i++])){ + ~arrayIndexOf(result, key) || result.push(key); + } + return result; + }; + +/***/ }, +/* 30 */ +/***/ function(module, exports, __webpack_require__) { + + // to indexed object, toObject with fallback for non-array-like ES3 strings + var IObject = __webpack_require__(31) + , defined = __webpack_require__(33); + module.exports = function(it){ + return IObject(defined(it)); + }; + +/***/ }, +/* 31 */ +/***/ function(module, exports, __webpack_require__) { + + // fallback for non-array-like ES3 and non-enumerable old V8 strings + var cof = __webpack_require__(32); + module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ + return cof(it) == 'String' ? it.split('') : Object(it); + }; + +/***/ }, +/* 32 */ +/***/ function(module, exports) { + + var toString = {}.toString; + + module.exports = function(it){ + return toString.call(it).slice(8, -1); + }; + +/***/ }, +/* 33 */ +/***/ function(module, exports) { + + // 7.2.1 RequireObjectCoercible(argument) + module.exports = function(it){ + if(it == undefined)throw TypeError("Can't call method on " + it); + return it; + }; + +/***/ }, +/* 34 */ +/***/ function(module, exports, __webpack_require__) { + + // false -> Array#indexOf + // true -> Array#includes + var toIObject = __webpack_require__(30) + , toLength = __webpack_require__(35) + , toIndex = __webpack_require__(37); + module.exports = function(IS_INCLUDES){ + return function($this, el, fromIndex){ + var O = toIObject($this) + , length = toLength(O.length) + , index = toIndex(fromIndex, length) + , value; + // Array#includes uses SameValueZero equality algorithm + if(IS_INCLUDES && el != el)while(length > index){ + value = O[index++]; + if(value != value)return true; + // Array#toIndex ignores holes, Array#includes - not + } else for(;length > index; index++)if(IS_INCLUDES || index in O){ + if(O[index] === el)return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; + }; + +/***/ }, +/* 35 */ +/***/ function(module, exports, __webpack_require__) { + + // 7.1.15 ToLength + var toInteger = __webpack_require__(36) + , min = Math.min; + module.exports = function(it){ + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 + }; + +/***/ }, +/* 36 */ +/***/ function(module, exports) { + + // 7.1.4 ToInteger + var ceil = Math.ceil + , floor = Math.floor; + module.exports = function(it){ + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); + }; + +/***/ }, +/* 37 */ +/***/ function(module, exports, __webpack_require__) { + + var toInteger = __webpack_require__(36) + , max = Math.max + , min = Math.min; + module.exports = function(index, length){ + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); + }; + +/***/ }, +/* 38 */ +/***/ function(module, exports, __webpack_require__) { + + var shared = __webpack_require__(21)('keys') + , uid = __webpack_require__(17); + module.exports = function(key){ + return shared[key] || (shared[key] = uid(key)); + }; + +/***/ }, +/* 39 */ +/***/ function(module, exports) { + + // IE 8- don't enum bug keys + module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' + ).split(','); + +/***/ }, +/* 40 */ +/***/ function(module, exports, __webpack_require__) { + + // all enumerable object keys, includes symbols + var getKeys = __webpack_require__(28) + , gOPS = __webpack_require__(41) + , pIE = __webpack_require__(42); + module.exports = function(it){ + var result = getKeys(it) + , getSymbols = gOPS.f; + if(getSymbols){ + var symbols = getSymbols(it) + , isEnum = pIE.f + , i = 0 + , key; + while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key); + } return result; + }; + +/***/ }, +/* 41 */ +/***/ function(module, exports) { + + exports.f = Object.getOwnPropertySymbols; + +/***/ }, +/* 42 */ +/***/ function(module, exports) { + + exports.f = {}.propertyIsEnumerable; + +/***/ }, +/* 43 */ +/***/ function(module, exports, __webpack_require__) { + + // 7.2.2 IsArray(argument) + var cof = __webpack_require__(32); + module.exports = Array.isArray || function isArray(arg){ + return cof(arg) == 'Array'; + }; + +/***/ }, +/* 44 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + var anObject = __webpack_require__(10) + , dPs = __webpack_require__(45) + , enumBugKeys = __webpack_require__(39) + , IE_PROTO = __webpack_require__(38)('IE_PROTO') + , Empty = function(){ /* empty */ } + , PROTOTYPE = 'prototype'; + + // Create object with fake `null` prototype: use iframe Object with cleared prototype + var createDict = function(){ + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(13)('iframe') + , i = enumBugKeys.length + , lt = '<' + , gt = '>' + , iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(46).appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); + }; + + module.exports = Object.create || function create(O, Properties){ + var result; + if(O !== null){ + Empty[PROTOTYPE] = anObject(O); + result = new Empty; + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); + }; + + +/***/ }, +/* 45 */ +/***/ function(module, exports, __webpack_require__) { + + var dP = __webpack_require__(9) + , anObject = __webpack_require__(10) + , getKeys = __webpack_require__(28); + + module.exports = __webpack_require__(4) ? Object.defineProperties : function defineProperties(O, Properties){ + anObject(O); + var keys = getKeys(Properties) + , length = keys.length + , i = 0 + , P; + while(length > i)dP.f(O, P = keys[i++], Properties[P]); + return O; + }; + +/***/ }, +/* 46 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = __webpack_require__(2).document && document.documentElement; + +/***/ }, +/* 47 */ +/***/ function(module, exports, __webpack_require__) { + + // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window + var toIObject = __webpack_require__(30) + , gOPN = __webpack_require__(48).f + , toString = {}.toString; + + var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + + var getWindowNames = function(it){ + try { + return gOPN(it); + } catch(e){ + return windowNames.slice(); + } + }; + + module.exports.f = function getOwnPropertyNames(it){ + return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); + }; + + +/***/ }, +/* 48 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) + var $keys = __webpack_require__(29) + , hiddenKeys = __webpack_require__(39).concat('length', 'prototype'); + + exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){ + return $keys(O, hiddenKeys); + }; + +/***/ }, +/* 49 */ +/***/ function(module, exports, __webpack_require__) { + + var pIE = __webpack_require__(42) + , createDesc = __webpack_require__(15) + , toIObject = __webpack_require__(30) + , toPrimitive = __webpack_require__(14) + , has = __webpack_require__(3) + , IE8_DOM_DEFINE = __webpack_require__(12) + , gOPD = Object.getOwnPropertyDescriptor; + + exports.f = __webpack_require__(4) ? gOPD : function getOwnPropertyDescriptor(O, P){ + O = toIObject(O); + P = toPrimitive(P, true); + if(IE8_DOM_DEFINE)try { + return gOPD(O, P); + } catch(e){ /* empty */ } + if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]); + }; + +/***/ }, +/* 50 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6); + // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) + $export($export.S + $export.F * !__webpack_require__(4), 'Object', {defineProperty: __webpack_require__(9).f}); + +/***/ }, +/* 51 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6); + // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) + $export($export.S + $export.F * !__webpack_require__(4), 'Object', {defineProperties: __webpack_require__(45)}); + +/***/ }, +/* 52 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + var toIObject = __webpack_require__(30) + , $getOwnPropertyDescriptor = __webpack_require__(49).f; + + __webpack_require__(53)('getOwnPropertyDescriptor', function(){ + return function getOwnPropertyDescriptor(it, key){ + return $getOwnPropertyDescriptor(toIObject(it), key); + }; + }); + +/***/ }, +/* 53 */ +/***/ function(module, exports, __webpack_require__) { + + // most Object methods by ES6 should accept primitives + var $export = __webpack_require__(6) + , core = __webpack_require__(7) + , fails = __webpack_require__(5); + module.exports = function(KEY, exec){ + var fn = (core.Object || {})[KEY] || Object[KEY] + , exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); + }; + +/***/ }, +/* 54 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6) + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + $export($export.S, 'Object', {create: __webpack_require__(44)}); + +/***/ }, +/* 55 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.9 Object.getPrototypeOf(O) + var toObject = __webpack_require__(56) + , $getPrototypeOf = __webpack_require__(57); + + __webpack_require__(53)('getPrototypeOf', function(){ + return function getPrototypeOf(it){ + return $getPrototypeOf(toObject(it)); + }; + }); + +/***/ }, +/* 56 */ +/***/ function(module, exports, __webpack_require__) { + + // 7.1.13 ToObject(argument) + var defined = __webpack_require__(33); + module.exports = function(it){ + return Object(defined(it)); + }; + +/***/ }, +/* 57 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) + var has = __webpack_require__(3) + , toObject = __webpack_require__(56) + , IE_PROTO = __webpack_require__(38)('IE_PROTO') + , ObjectProto = Object.prototype; + + module.exports = Object.getPrototypeOf || function(O){ + O = toObject(O); + if(has(O, IE_PROTO))return O[IE_PROTO]; + if(typeof O.constructor == 'function' && O instanceof O.constructor){ + return O.constructor.prototype; + } return O instanceof Object ? ObjectProto : null; + }; + +/***/ }, +/* 58 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.14 Object.keys(O) + var toObject = __webpack_require__(56) + , $keys = __webpack_require__(28); + + __webpack_require__(53)('keys', function(){ + return function keys(it){ + return $keys(toObject(it)); + }; + }); + +/***/ }, +/* 59 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.7 Object.getOwnPropertyNames(O) + __webpack_require__(53)('getOwnPropertyNames', function(){ + return __webpack_require__(47).f; + }); + +/***/ }, +/* 60 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.5 Object.freeze(O) + var isObject = __webpack_require__(11) + , meta = __webpack_require__(20).onFreeze; + + __webpack_require__(53)('freeze', function($freeze){ + return function freeze(it){ + return $freeze && isObject(it) ? $freeze(meta(it)) : it; + }; + }); + +/***/ }, +/* 61 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.17 Object.seal(O) + var isObject = __webpack_require__(11) + , meta = __webpack_require__(20).onFreeze; + + __webpack_require__(53)('seal', function($seal){ + return function seal(it){ + return $seal && isObject(it) ? $seal(meta(it)) : it; + }; + }); + +/***/ }, +/* 62 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.15 Object.preventExtensions(O) + var isObject = __webpack_require__(11) + , meta = __webpack_require__(20).onFreeze; + + __webpack_require__(53)('preventExtensions', function($preventExtensions){ + return function preventExtensions(it){ + return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; + }; + }); + +/***/ }, +/* 63 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.12 Object.isFrozen(O) + var isObject = __webpack_require__(11); + + __webpack_require__(53)('isFrozen', function($isFrozen){ + return function isFrozen(it){ + return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true; + }; + }); + +/***/ }, +/* 64 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.13 Object.isSealed(O) + var isObject = __webpack_require__(11); + + __webpack_require__(53)('isSealed', function($isSealed){ + return function isSealed(it){ + return isObject(it) ? $isSealed ? $isSealed(it) : false : true; + }; + }); + +/***/ }, +/* 65 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.11 Object.isExtensible(O) + var isObject = __webpack_require__(11); + + __webpack_require__(53)('isExtensible', function($isExtensible){ + return function isExtensible(it){ + return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false; + }; + }); + +/***/ }, +/* 66 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.3.1 Object.assign(target, source) + var $export = __webpack_require__(6); + + $export($export.S + $export.F, 'Object', {assign: __webpack_require__(67)}); + +/***/ }, +/* 67 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // 19.1.2.1 Object.assign(target, source, ...) + var getKeys = __webpack_require__(28) + , gOPS = __webpack_require__(41) + , pIE = __webpack_require__(42) + , toObject = __webpack_require__(56) + , IObject = __webpack_require__(31) + , $assign = Object.assign; + + // should work with symbols and should have deterministic property order (V8 bug) + module.exports = !$assign || __webpack_require__(5)(function(){ + var A = {} + , B = {} + , S = Symbol() + , K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function(k){ B[k] = k; }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; + }) ? function assign(target, source){ // eslint-disable-line no-unused-vars + var T = toObject(target) + , aLen = arguments.length + , index = 1 + , getSymbols = gOPS.f + , isEnum = pIE.f; + while(aLen > index){ + var S = IObject(arguments[index++]) + , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S) + , length = keys.length + , j = 0 + , key; + while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key]; + } return T; + } : $assign; + +/***/ }, +/* 68 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.3.10 Object.is(value1, value2) + var $export = __webpack_require__(6); + $export($export.S, 'Object', {is: __webpack_require__(69)}); + +/***/ }, +/* 69 */ +/***/ function(module, exports) { + + // 7.2.9 SameValue(x, y) + module.exports = Object.is || function is(x, y){ + return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; + }; + +/***/ }, +/* 70 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.3.19 Object.setPrototypeOf(O, proto) + var $export = __webpack_require__(6); + $export($export.S, 'Object', {setPrototypeOf: __webpack_require__(71).set}); + +/***/ }, +/* 71 */ +/***/ function(module, exports, __webpack_require__) { + + // Works with __proto__ only. Old v8 can't work with null proto objects. + /* eslint-disable no-proto */ + var isObject = __webpack_require__(11) + , anObject = __webpack_require__(10); + var check = function(O, proto){ + anObject(O); + if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!"); + }; + module.exports = { + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line + function(test, buggy, set){ + try { + set = __webpack_require__(18)(Function.call, __webpack_require__(49).f(Object.prototype, '__proto__').set, 2); + set(test, []); + buggy = !(test instanceof Array); + } catch(e){ buggy = true; } + return function setPrototypeOf(O, proto){ + check(O, proto); + if(buggy)O.__proto__ = proto; + else set(O, proto); + return O; + }; + }({}, false) : undefined), + check: check + }; + +/***/ }, +/* 72 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // 19.1.3.6 Object.prototype.toString() + var classof = __webpack_require__(73) + , test = {}; + test[__webpack_require__(23)('toStringTag')] = 'z'; + if(test + '' != '[object z]'){ + __webpack_require__(16)(Object.prototype, 'toString', function toString(){ + return '[object ' + classof(this) + ']'; + }, true); + } + +/***/ }, +/* 73 */ +/***/ function(module, exports, __webpack_require__) { + + // getting tag from 19.1.3.6 Object.prototype.toString() + var cof = __webpack_require__(32) + , TAG = __webpack_require__(23)('toStringTag') + // ES3 wrong here + , ARG = cof(function(){ return arguments; }()) == 'Arguments'; + + // fallback for IE11 Script Access Denied error + var tryGet = function(it, key){ + try { + return it[key]; + } catch(e){ /* empty */ } + }; + + module.exports = function(it){ + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T + // builtinTag case + : ARG ? cof(O) + // ES3 arguments fallback + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; + }; + +/***/ }, +/* 74 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) + var $export = __webpack_require__(6); + + $export($export.P, 'Function', {bind: __webpack_require__(75)}); + +/***/ }, +/* 75 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var aFunction = __webpack_require__(19) + , isObject = __webpack_require__(11) + , invoke = __webpack_require__(76) + , arraySlice = [].slice + , factories = {}; + + var construct = function(F, len, args){ + if(!(len in factories)){ + for(var n = [], i = 0; i < len; i++)n[i] = 'a[' + i + ']'; + factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); + } return factories[len](F, args); + }; + + module.exports = Function.bind || function bind(that /*, args... */){ + var fn = aFunction(this) + , partArgs = arraySlice.call(arguments, 1); + var bound = function(/* args... */){ + var args = partArgs.concat(arraySlice.call(arguments)); + return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); + }; + if(isObject(fn.prototype))bound.prototype = fn.prototype; + return bound; + }; + +/***/ }, +/* 76 */ +/***/ function(module, exports) { + + // fast apply, http://jsperf.lnkit.com/fast-apply/5 + module.exports = function(fn, args, that){ + var un = that === undefined; + switch(args.length){ + case 0: return un ? fn() + : fn.call(that); + case 1: return un ? fn(args[0]) + : fn.call(that, args[0]); + case 2: return un ? fn(args[0], args[1]) + : fn.call(that, args[0], args[1]); + case 3: return un ? fn(args[0], args[1], args[2]) + : fn.call(that, args[0], args[1], args[2]); + case 4: return un ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + } return fn.apply(that, args); + }; + +/***/ }, +/* 77 */ +/***/ function(module, exports, __webpack_require__) { + + var dP = __webpack_require__(9).f + , createDesc = __webpack_require__(15) + , has = __webpack_require__(3) + , FProto = Function.prototype + , nameRE = /^\s*function ([^ (]*)/ + , NAME = 'name'; + + var isExtensible = Object.isExtensible || function(){ + return true; + }; + + // 19.2.4.2 name + NAME in FProto || __webpack_require__(4) && dP(FProto, NAME, { + configurable: true, + get: function(){ + try { + var that = this + , name = ('' + that).match(nameRE)[1]; + has(that, NAME) || !isExtensible(that) || dP(that, NAME, createDesc(5, name)); + return name; + } catch(e){ + return ''; + } + } + }); + +/***/ }, +/* 78 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var isObject = __webpack_require__(11) + , getPrototypeOf = __webpack_require__(57) + , HAS_INSTANCE = __webpack_require__(23)('hasInstance') + , FunctionProto = Function.prototype; + // 19.2.3.6 Function.prototype[@@hasInstance](V) + if(!(HAS_INSTANCE in FunctionProto))__webpack_require__(9).f(FunctionProto, HAS_INSTANCE, {value: function(O){ + if(typeof this != 'function' || !isObject(O))return false; + if(!isObject(this.prototype))return O instanceof this; + // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: + while(O = getPrototypeOf(O))if(this.prototype === O)return true; + return false; + }}); + +/***/ }, +/* 79 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var global = __webpack_require__(2) + , has = __webpack_require__(3) + , cof = __webpack_require__(32) + , inheritIfRequired = __webpack_require__(80) + , toPrimitive = __webpack_require__(14) + , fails = __webpack_require__(5) + , gOPN = __webpack_require__(48).f + , gOPD = __webpack_require__(49).f + , dP = __webpack_require__(9).f + , $trim = __webpack_require__(81).trim + , NUMBER = 'Number' + , $Number = global[NUMBER] + , Base = $Number + , proto = $Number.prototype + // Opera ~12 has broken Object#toString + , BROKEN_COF = cof(__webpack_require__(44)(proto)) == NUMBER + , TRIM = 'trim' in String.prototype; + + // 7.1.3 ToNumber(argument) + var toNumber = function(argument){ + var it = toPrimitive(argument, false); + if(typeof it == 'string' && it.length > 2){ + it = TRIM ? it.trim() : $trim(it, 3); + var first = it.charCodeAt(0) + , third, radix, maxCode; + if(first === 43 || first === 45){ + third = it.charCodeAt(2); + if(third === 88 || third === 120)return NaN; // Number('+0x1') should be NaN, old V8 fix + } else if(first === 48){ + switch(it.charCodeAt(1)){ + case 66 : case 98 : radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i + case 79 : case 111 : radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i + default : return +it; + } + for(var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++){ + code = digits.charCodeAt(i); + // parseInt parses a string to a first unavailable symbol + // but ToNumber should return NaN if a string contains unavailable symbols + if(code < 48 || code > maxCode)return NaN; + } return parseInt(digits, radix); + } + } return +it; + }; + + if(!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')){ + $Number = function Number(value){ + var it = arguments.length < 1 ? 0 : value + , that = this; + return that instanceof $Number + // check on 1..constructor(foo) case + && (BROKEN_COF ? fails(function(){ proto.valueOf.call(that); }) : cof(that) != NUMBER) + ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it); + }; + for(var keys = __webpack_require__(4) ? gOPN(Base) : ( + // ES3: + 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + + // ES6 (in case, if modules with ES6 Number statics required before): + 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger' + ).split(','), j = 0, key; keys.length > j; j++){ + if(has(Base, key = keys[j]) && !has($Number, key)){ + dP($Number, key, gOPD(Base, key)); + } + } + $Number.prototype = proto; + proto.constructor = $Number; + __webpack_require__(16)(global, NUMBER, $Number); + } + +/***/ }, +/* 80 */ +/***/ function(module, exports, __webpack_require__) { + + var isObject = __webpack_require__(11) + , setPrototypeOf = __webpack_require__(71).set; + module.exports = function(that, target, C){ + var P, S = target.constructor; + if(S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf){ + setPrototypeOf(that, P); + } return that; + }; + +/***/ }, +/* 81 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6) + , defined = __webpack_require__(33) + , fails = __webpack_require__(5) + , spaces = __webpack_require__(82) + , space = '[' + spaces + ']' + , non = '\u200b\u0085' + , ltrim = RegExp('^' + space + space + '*') + , rtrim = RegExp(space + space + '*$'); + + var exporter = function(KEY, exec, ALIAS){ + var exp = {}; + var FORCE = fails(function(){ + return !!spaces[KEY]() || non[KEY]() != non; + }); + var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; + if(ALIAS)exp[ALIAS] = fn; + $export($export.P + $export.F * FORCE, 'String', exp); + }; + + // 1 -> String#trimLeft + // 2 -> String#trimRight + // 3 -> String#trim + var trim = exporter.trim = function(string, TYPE){ + string = String(defined(string)); + if(TYPE & 1)string = string.replace(ltrim, ''); + if(TYPE & 2)string = string.replace(rtrim, ''); + return string; + }; + + module.exports = exporter; + +/***/ }, +/* 82 */ +/***/ function(module, exports) { + + module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; + +/***/ }, +/* 83 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , toInteger = __webpack_require__(36) + , aNumberValue = __webpack_require__(84) + , repeat = __webpack_require__(85) + , $toFixed = 1..toFixed + , floor = Math.floor + , data = [0, 0, 0, 0, 0, 0] + , ERROR = 'Number.toFixed: incorrect invocation!' + , ZERO = '0'; + + var multiply = function(n, c){ + var i = -1 + , c2 = c; + while(++i < 6){ + c2 += n * data[i]; + data[i] = c2 % 1e7; + c2 = floor(c2 / 1e7); + } + }; + var divide = function(n){ + var i = 6 + , c = 0; + while(--i >= 0){ + c += data[i]; + data[i] = floor(c / n); + c = (c % n) * 1e7; + } + }; + var numToString = function(){ + var i = 6 + , s = ''; + while(--i >= 0){ + if(s !== '' || i === 0 || data[i] !== 0){ + var t = String(data[i]); + s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t; + } + } return s; + }; + var pow = function(x, n, acc){ + return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); + }; + var log = function(x){ + var n = 0 + , x2 = x; + while(x2 >= 4096){ + n += 12; + x2 /= 4096; + } + while(x2 >= 2){ + n += 1; + x2 /= 2; + } return n; + }; + + $export($export.P + $export.F * (!!$toFixed && ( + 0.00008.toFixed(3) !== '0.000' || + 0.9.toFixed(0) !== '1' || + 1.255.toFixed(2) !== '1.25' || + 1000000000000000128..toFixed(0) !== '1000000000000000128' + ) || !__webpack_require__(5)(function(){ + // V8 ~ Android 4.3- + $toFixed.call({}); + })), 'Number', { + toFixed: function toFixed(fractionDigits){ + var x = aNumberValue(this, ERROR) + , f = toInteger(fractionDigits) + , s = '' + , m = ZERO + , e, z, j, k; + if(f < 0 || f > 20)throw RangeError(ERROR); + if(x != x)return 'NaN'; + if(x <= -1e21 || x >= 1e21)return String(x); + if(x < 0){ + s = '-'; + x = -x; + } + if(x > 1e-21){ + e = log(x * pow(2, 69, 1)) - 69; + z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1); + z *= 0x10000000000000; + e = 52 - e; + if(e > 0){ + multiply(0, z); + j = f; + while(j >= 7){ + multiply(1e7, 0); + j -= 7; + } + multiply(pow(10, j, 1), 0); + j = e - 1; + while(j >= 23){ + divide(1 << 23); + j -= 23; + } + divide(1 << j); + multiply(1, 1); + divide(2); + m = numToString(); + } else { + multiply(0, z); + multiply(1 << -e, 0); + m = numToString() + repeat.call(ZERO, f); + } + } + if(f > 0){ + k = m.length; + m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f)); + } else { + m = s + m; + } return m; + } + }); + +/***/ }, +/* 84 */ +/***/ function(module, exports, __webpack_require__) { + + var cof = __webpack_require__(32); + module.exports = function(it, msg){ + if(typeof it != 'number' && cof(it) != 'Number')throw TypeError(msg); + return +it; + }; + +/***/ }, +/* 85 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var toInteger = __webpack_require__(36) + , defined = __webpack_require__(33); + + module.exports = function repeat(count){ + var str = String(defined(this)) + , res = '' + , n = toInteger(count); + if(n < 0 || n == Infinity)throw RangeError("Count can't be negative"); + for(;n > 0; (n >>>= 1) && (str += str))if(n & 1)res += str; + return res; + }; + +/***/ }, +/* 86 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , $fails = __webpack_require__(5) + , aNumberValue = __webpack_require__(84) + , $toPrecision = 1..toPrecision; + + $export($export.P + $export.F * ($fails(function(){ + // IE7- + return $toPrecision.call(1, undefined) !== '1'; + }) || !$fails(function(){ + // V8 ~ Android 4.3- + $toPrecision.call({}); + })), 'Number', { + toPrecision: function toPrecision(precision){ + var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!'); + return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision); + } + }); + +/***/ }, +/* 87 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.1.2.1 Number.EPSILON + var $export = __webpack_require__(6); + + $export($export.S, 'Number', {EPSILON: Math.pow(2, -52)}); + +/***/ }, +/* 88 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.1.2.2 Number.isFinite(number) + var $export = __webpack_require__(6) + , _isFinite = __webpack_require__(2).isFinite; + + $export($export.S, 'Number', { + isFinite: function isFinite(it){ + return typeof it == 'number' && _isFinite(it); + } + }); + +/***/ }, +/* 89 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.1.2.3 Number.isInteger(number) + var $export = __webpack_require__(6); + + $export($export.S, 'Number', {isInteger: __webpack_require__(90)}); + +/***/ }, +/* 90 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.1.2.3 Number.isInteger(number) + var isObject = __webpack_require__(11) + , floor = Math.floor; + module.exports = function isInteger(it){ + return !isObject(it) && isFinite(it) && floor(it) === it; + }; + +/***/ }, +/* 91 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.1.2.4 Number.isNaN(number) + var $export = __webpack_require__(6); + + $export($export.S, 'Number', { + isNaN: function isNaN(number){ + return number != number; + } + }); + +/***/ }, +/* 92 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.1.2.5 Number.isSafeInteger(number) + var $export = __webpack_require__(6) + , isInteger = __webpack_require__(90) + , abs = Math.abs; + + $export($export.S, 'Number', { + isSafeInteger: function isSafeInteger(number){ + return isInteger(number) && abs(number) <= 0x1fffffffffffff; + } + }); + +/***/ }, +/* 93 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.1.2.6 Number.MAX_SAFE_INTEGER + var $export = __webpack_require__(6); + + $export($export.S, 'Number', {MAX_SAFE_INTEGER: 0x1fffffffffffff}); + +/***/ }, +/* 94 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.1.2.10 Number.MIN_SAFE_INTEGER + var $export = __webpack_require__(6); + + $export($export.S, 'Number', {MIN_SAFE_INTEGER: -0x1fffffffffffff}); + +/***/ }, +/* 95 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6) + , $parseFloat = __webpack_require__(96); + // 20.1.2.12 Number.parseFloat(string) + $export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', {parseFloat: $parseFloat}); + +/***/ }, +/* 96 */ +/***/ function(module, exports, __webpack_require__) { + + var $parseFloat = __webpack_require__(2).parseFloat + , $trim = __webpack_require__(81).trim; + + module.exports = 1 / $parseFloat(__webpack_require__(82) + '-0') !== -Infinity ? function parseFloat(str){ + var string = $trim(String(str), 3) + , result = $parseFloat(string); + return result === 0 && string.charAt(0) == '-' ? -0 : result; + } : $parseFloat; + +/***/ }, +/* 97 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6) + , $parseInt = __webpack_require__(98); + // 20.1.2.13 Number.parseInt(string, radix) + $export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', {parseInt: $parseInt}); + +/***/ }, +/* 98 */ +/***/ function(module, exports, __webpack_require__) { + + var $parseInt = __webpack_require__(2).parseInt + , $trim = __webpack_require__(81).trim + , ws = __webpack_require__(82) + , hex = /^[\-+]?0[xX]/; + + module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix){ + var string = $trim(String(str), 3); + return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10)); + } : $parseInt; + +/***/ }, +/* 99 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6) + , $parseInt = __webpack_require__(98); + // 18.2.5 parseInt(string, radix) + $export($export.G + $export.F * (parseInt != $parseInt), {parseInt: $parseInt}); + +/***/ }, +/* 100 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6) + , $parseFloat = __webpack_require__(96); + // 18.2.4 parseFloat(string) + $export($export.G + $export.F * (parseFloat != $parseFloat), {parseFloat: $parseFloat}); + +/***/ }, +/* 101 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.3 Math.acosh(x) + var $export = __webpack_require__(6) + , log1p = __webpack_require__(102) + , sqrt = Math.sqrt + , $acosh = Math.acosh; + + $export($export.S + $export.F * !($acosh + // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509 + && Math.floor($acosh(Number.MAX_VALUE)) == 710 + // Tor Browser bug: Math.acosh(Infinity) -> NaN + && $acosh(Infinity) == Infinity + ), 'Math', { + acosh: function acosh(x){ + return (x = +x) < 1 ? NaN : x > 94906265.62425156 + ? Math.log(x) + Math.LN2 + : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1)); + } + }); + +/***/ }, +/* 102 */ +/***/ function(module, exports) { + + // 20.2.2.20 Math.log1p(x) + module.exports = Math.log1p || function log1p(x){ + return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x); + }; + +/***/ }, +/* 103 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.5 Math.asinh(x) + var $export = __webpack_require__(6) + , $asinh = Math.asinh; + + function asinh(x){ + return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1)); + } + + // Tor Browser bug: Math.asinh(0) -> -0 + $export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', {asinh: asinh}); + +/***/ }, +/* 104 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.7 Math.atanh(x) + var $export = __webpack_require__(6) + , $atanh = Math.atanh; + + // Tor Browser bug: Math.atanh(-0) -> 0 + $export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { + atanh: function atanh(x){ + return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2; + } + }); + +/***/ }, +/* 105 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.9 Math.cbrt(x) + var $export = __webpack_require__(6) + , sign = __webpack_require__(106); + + $export($export.S, 'Math', { + cbrt: function cbrt(x){ + return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3); + } + }); + +/***/ }, +/* 106 */ +/***/ function(module, exports) { + + // 20.2.2.28 Math.sign(x) + module.exports = Math.sign || function sign(x){ + return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; + }; + +/***/ }, +/* 107 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.11 Math.clz32(x) + var $export = __webpack_require__(6); + + $export($export.S, 'Math', { + clz32: function clz32(x){ + return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32; + } + }); + +/***/ }, +/* 108 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.12 Math.cosh(x) + var $export = __webpack_require__(6) + , exp = Math.exp; + + $export($export.S, 'Math', { + cosh: function cosh(x){ + return (exp(x = +x) + exp(-x)) / 2; + } + }); + +/***/ }, +/* 109 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.14 Math.expm1(x) + var $export = __webpack_require__(6) + , $expm1 = __webpack_require__(110); + + $export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', {expm1: $expm1}); + +/***/ }, +/* 110 */ +/***/ function(module, exports) { + + // 20.2.2.14 Math.expm1(x) + var $expm1 = Math.expm1; + module.exports = (!$expm1 + // Old FF bug + || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168 + // Tor Browser bug + || $expm1(-2e-17) != -2e-17 + ) ? function expm1(x){ + return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1; + } : $expm1; + +/***/ }, +/* 111 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.16 Math.fround(x) + var $export = __webpack_require__(6) + , sign = __webpack_require__(106) + , pow = Math.pow + , EPSILON = pow(2, -52) + , EPSILON32 = pow(2, -23) + , MAX32 = pow(2, 127) * (2 - EPSILON32) + , MIN32 = pow(2, -126); + + var roundTiesToEven = function(n){ + return n + 1 / EPSILON - 1 / EPSILON; + }; + + + $export($export.S, 'Math', { + fround: function fround(x){ + var $abs = Math.abs(x) + , $sign = sign(x) + , a, result; + if($abs < MIN32)return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; + a = (1 + EPSILON32 / EPSILON) * $abs; + result = a - (a - $abs); + if(result > MAX32 || result != result)return $sign * Infinity; + return $sign * result; + } + }); + +/***/ }, +/* 112 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) + var $export = __webpack_require__(6) + , abs = Math.abs; + + $export($export.S, 'Math', { + hypot: function hypot(value1, value2){ // eslint-disable-line no-unused-vars + var sum = 0 + , i = 0 + , aLen = arguments.length + , larg = 0 + , arg, div; + while(i < aLen){ + arg = abs(arguments[i++]); + if(larg < arg){ + div = larg / arg; + sum = sum * div * div + 1; + larg = arg; + } else if(arg > 0){ + div = arg / larg; + sum += div * div; + } else sum += arg; + } + return larg === Infinity ? Infinity : larg * Math.sqrt(sum); + } + }); + +/***/ }, +/* 113 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.18 Math.imul(x, y) + var $export = __webpack_require__(6) + , $imul = Math.imul; + + // some WebKit versions fails with big numbers, some has wrong arity + $export($export.S + $export.F * __webpack_require__(5)(function(){ + return $imul(0xffffffff, 5) != -5 || $imul.length != 2; + }), 'Math', { + imul: function imul(x, y){ + var UINT16 = 0xffff + , xn = +x + , yn = +y + , xl = UINT16 & xn + , yl = UINT16 & yn; + return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0); + } + }); + +/***/ }, +/* 114 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.21 Math.log10(x) + var $export = __webpack_require__(6); + + $export($export.S, 'Math', { + log10: function log10(x){ + return Math.log(x) / Math.LN10; + } + }); + +/***/ }, +/* 115 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.20 Math.log1p(x) + var $export = __webpack_require__(6); + + $export($export.S, 'Math', {log1p: __webpack_require__(102)}); + +/***/ }, +/* 116 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.22 Math.log2(x) + var $export = __webpack_require__(6); + + $export($export.S, 'Math', { + log2: function log2(x){ + return Math.log(x) / Math.LN2; + } + }); + +/***/ }, +/* 117 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.28 Math.sign(x) + var $export = __webpack_require__(6); + + $export($export.S, 'Math', {sign: __webpack_require__(106)}); + +/***/ }, +/* 118 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.30 Math.sinh(x) + var $export = __webpack_require__(6) + , expm1 = __webpack_require__(110) + , exp = Math.exp; + + // V8 near Chromium 38 has a problem with very small numbers + $export($export.S + $export.F * __webpack_require__(5)(function(){ + return !Math.sinh(-2e-17) != -2e-17; + }), 'Math', { + sinh: function sinh(x){ + return Math.abs(x = +x) < 1 + ? (expm1(x) - expm1(-x)) / 2 + : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2); + } + }); + +/***/ }, +/* 119 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.33 Math.tanh(x) + var $export = __webpack_require__(6) + , expm1 = __webpack_require__(110) + , exp = Math.exp; + + $export($export.S, 'Math', { + tanh: function tanh(x){ + var a = expm1(x = +x) + , b = expm1(-x); + return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); + } + }); + +/***/ }, +/* 120 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.34 Math.trunc(x) + var $export = __webpack_require__(6); + + $export($export.S, 'Math', { + trunc: function trunc(it){ + return (it > 0 ? Math.floor : Math.ceil)(it); + } + }); + +/***/ }, +/* 121 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6) + , toIndex = __webpack_require__(37) + , fromCharCode = String.fromCharCode + , $fromCodePoint = String.fromCodePoint; + + // length should be 1, old FF problem + $export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { + // 21.1.2.2 String.fromCodePoint(...codePoints) + fromCodePoint: function fromCodePoint(x){ // eslint-disable-line no-unused-vars + var res = [] + , aLen = arguments.length + , i = 0 + , code; + while(aLen > i){ + code = +arguments[i++]; + if(toIndex(code, 0x10ffff) !== code)throw RangeError(code + ' is not a valid code point'); + res.push(code < 0x10000 + ? fromCharCode(code) + : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00) + ); + } return res.join(''); + } + }); + +/***/ }, +/* 122 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6) + , toIObject = __webpack_require__(30) + , toLength = __webpack_require__(35); + + $export($export.S, 'String', { + // 21.1.2.4 String.raw(callSite, ...substitutions) + raw: function raw(callSite){ + var tpl = toIObject(callSite.raw) + , len = toLength(tpl.length) + , aLen = arguments.length + , res = [] + , i = 0; + while(len > i){ + res.push(String(tpl[i++])); + if(i < aLen)res.push(String(arguments[i])); + } return res.join(''); + } + }); + +/***/ }, +/* 123 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // 21.1.3.25 String.prototype.trim() + __webpack_require__(81)('trim', function($trim){ + return function trim(){ + return $trim(this, 3); + }; + }); + +/***/ }, +/* 124 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , $at = __webpack_require__(125)(false); + $export($export.P, 'String', { + // 21.1.3.3 String.prototype.codePointAt(pos) + codePointAt: function codePointAt(pos){ + return $at(this, pos); + } + }); + +/***/ }, +/* 125 */ +/***/ function(module, exports, __webpack_require__) { + + var toInteger = __webpack_require__(36) + , defined = __webpack_require__(33); + // true -> String#at + // false -> String#codePointAt + module.exports = function(TO_STRING){ + return function(that, pos){ + var s = String(defined(that)) + , i = toInteger(pos) + , l = s.length + , a, b; + if(i < 0 || i >= l)return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; + }; + +/***/ }, +/* 126 */ +/***/ function(module, exports, __webpack_require__) { + + // 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) + 'use strict'; + var $export = __webpack_require__(6) + , toLength = __webpack_require__(35) + , context = __webpack_require__(127) + , ENDS_WITH = 'endsWith' + , $endsWith = ''[ENDS_WITH]; + + $export($export.P + $export.F * __webpack_require__(129)(ENDS_WITH), 'String', { + endsWith: function endsWith(searchString /*, endPosition = @length */){ + var that = context(this, searchString, ENDS_WITH) + , endPosition = arguments.length > 1 ? arguments[1] : undefined + , len = toLength(that.length) + , end = endPosition === undefined ? len : Math.min(toLength(endPosition), len) + , search = String(searchString); + return $endsWith + ? $endsWith.call(that, search, end) + : that.slice(end - search.length, end) === search; + } + }); + +/***/ }, +/* 127 */ +/***/ function(module, exports, __webpack_require__) { + + // helper for String#{startsWith, endsWith, includes} + var isRegExp = __webpack_require__(128) + , defined = __webpack_require__(33); + + module.exports = function(that, searchString, NAME){ + if(isRegExp(searchString))throw TypeError('String#' + NAME + " doesn't accept regex!"); + return String(defined(that)); + }; + +/***/ }, +/* 128 */ +/***/ function(module, exports, __webpack_require__) { + + // 7.2.8 IsRegExp(argument) + var isObject = __webpack_require__(11) + , cof = __webpack_require__(32) + , MATCH = __webpack_require__(23)('match'); + module.exports = function(it){ + var isRegExp; + return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); + }; + +/***/ }, +/* 129 */ +/***/ function(module, exports, __webpack_require__) { + + var MATCH = __webpack_require__(23)('match'); + module.exports = function(KEY){ + var re = /./; + try { + '/./'[KEY](re); + } catch(e){ + try { + re[MATCH] = false; + return !'/./'[KEY](re); + } catch(f){ /* empty */ } + } return true; + }; + +/***/ }, +/* 130 */ +/***/ function(module, exports, __webpack_require__) { + + // 21.1.3.7 String.prototype.includes(searchString, position = 0) + 'use strict'; + var $export = __webpack_require__(6) + , context = __webpack_require__(127) + , INCLUDES = 'includes'; + + $export($export.P + $export.F * __webpack_require__(129)(INCLUDES), 'String', { + includes: function includes(searchString /*, position = 0 */){ + return !!~context(this, searchString, INCLUDES) + .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined); + } + }); + +/***/ }, +/* 131 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6); + + $export($export.P, 'String', { + // 21.1.3.13 String.prototype.repeat(count) + repeat: __webpack_require__(85) + }); + +/***/ }, +/* 132 */ +/***/ function(module, exports, __webpack_require__) { + + // 21.1.3.18 String.prototype.startsWith(searchString [, position ]) + 'use strict'; + var $export = __webpack_require__(6) + , toLength = __webpack_require__(35) + , context = __webpack_require__(127) + , STARTS_WITH = 'startsWith' + , $startsWith = ''[STARTS_WITH]; + + $export($export.P + $export.F * __webpack_require__(129)(STARTS_WITH), 'String', { + startsWith: function startsWith(searchString /*, position = 0 */){ + var that = context(this, searchString, STARTS_WITH) + , index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)) + , search = String(searchString); + return $startsWith + ? $startsWith.call(that, search, index) + : that.slice(index, index + search.length) === search; + } + }); + +/***/ }, +/* 133 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $at = __webpack_require__(125)(true); + + // 21.1.3.27 String.prototype[@@iterator]() + __webpack_require__(134)(String, 'String', function(iterated){ + this._t = String(iterated); // target + this._i = 0; // next index + // 21.1.5.2.1 %StringIteratorPrototype%.next() + }, function(){ + var O = this._t + , index = this._i + , point; + if(index >= O.length)return {value: undefined, done: true}; + point = $at(O, index); + this._i += point.length; + return {value: point, done: false}; + }); + +/***/ }, +/* 134 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var LIBRARY = __webpack_require__(26) + , $export = __webpack_require__(6) + , redefine = __webpack_require__(16) + , hide = __webpack_require__(8) + , has = __webpack_require__(3) + , Iterators = __webpack_require__(135) + , $iterCreate = __webpack_require__(136) + , setToStringTag = __webpack_require__(22) + , getPrototypeOf = __webpack_require__(57) + , ITERATOR = __webpack_require__(23)('iterator') + , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` + , FF_ITERATOR = '@@iterator' + , KEYS = 'keys' + , VALUES = 'values'; + + var returnThis = function(){ return this; }; + + module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){ + $iterCreate(Constructor, NAME, next); + var getMethod = function(kind){ + if(!BUGGY && kind in proto)return proto[kind]; + switch(kind){ + case KEYS: return function keys(){ return new Constructor(this, kind); }; + case VALUES: return function values(){ return new Constructor(this, kind); }; + } return function entries(){ return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator' + , DEF_VALUES = DEFAULT == VALUES + , VALUES_BUG = false + , proto = Base.prototype + , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] + , $default = $native || getMethod(DEFAULT) + , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined + , $anyNative = NAME == 'Array' ? proto.entries || $native : $native + , methods, key, IteratorPrototype; + // Fix native + if($anyNative){ + IteratorPrototype = getPrototypeOf($anyNative.call(new Base)); + if(IteratorPrototype !== Object.prototype){ + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if(DEF_VALUES && $native && $native.name !== VALUES){ + VALUES_BUG = true; + $default = function values(){ return $native.call(this); }; + } + // Define iterator + if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){ + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if(DEFAULT){ + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if(FORCED)for(key in methods){ + if(!(key in proto))redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; + }; + +/***/ }, +/* 135 */ +/***/ function(module, exports) { + + module.exports = {}; + +/***/ }, +/* 136 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var create = __webpack_require__(44) + , descriptor = __webpack_require__(15) + , setToStringTag = __webpack_require__(22) + , IteratorPrototype = {}; + + // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() + __webpack_require__(8)(IteratorPrototype, __webpack_require__(23)('iterator'), function(){ return this; }); + + module.exports = function(Constructor, NAME, next){ + Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)}); + setToStringTag(Constructor, NAME + ' Iterator'); + }; + +/***/ }, +/* 137 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.2 String.prototype.anchor(name) + __webpack_require__(138)('anchor', function(createHTML){ + return function anchor(name){ + return createHTML(this, 'a', 'name', name); + } + }); + +/***/ }, +/* 138 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6) + , fails = __webpack_require__(5) + , defined = __webpack_require__(33) + , quot = /"/g; + // B.2.3.2.1 CreateHTML(string, tag, attribute, value) + var createHTML = function(string, tag, attribute, value) { + var S = String(defined(string)) + , p1 = '<' + tag; + if(attribute !== '')p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; + return p1 + '>' + S + ''; + }; + module.exports = function(NAME, exec){ + var O = {}; + O[NAME] = exec(createHTML); + $export($export.P + $export.F * fails(function(){ + var test = ''[NAME]('"'); + return test !== test.toLowerCase() || test.split('"').length > 3; + }), 'String', O); + }; + +/***/ }, +/* 139 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.3 String.prototype.big() + __webpack_require__(138)('big', function(createHTML){ + return function big(){ + return createHTML(this, 'big', '', ''); + } + }); + +/***/ }, +/* 140 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.4 String.prototype.blink() + __webpack_require__(138)('blink', function(createHTML){ + return function blink(){ + return createHTML(this, 'blink', '', ''); + } + }); + +/***/ }, +/* 141 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.5 String.prototype.bold() + __webpack_require__(138)('bold', function(createHTML){ + return function bold(){ + return createHTML(this, 'b', '', ''); + } + }); + +/***/ }, +/* 142 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.6 String.prototype.fixed() + __webpack_require__(138)('fixed', function(createHTML){ + return function fixed(){ + return createHTML(this, 'tt', '', ''); + } + }); + +/***/ }, +/* 143 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.7 String.prototype.fontcolor(color) + __webpack_require__(138)('fontcolor', function(createHTML){ + return function fontcolor(color){ + return createHTML(this, 'font', 'color', color); + } + }); + +/***/ }, +/* 144 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.8 String.prototype.fontsize(size) + __webpack_require__(138)('fontsize', function(createHTML){ + return function fontsize(size){ + return createHTML(this, 'font', 'size', size); + } + }); + +/***/ }, +/* 145 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.9 String.prototype.italics() + __webpack_require__(138)('italics', function(createHTML){ + return function italics(){ + return createHTML(this, 'i', '', ''); + } + }); + +/***/ }, +/* 146 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.10 String.prototype.link(url) + __webpack_require__(138)('link', function(createHTML){ + return function link(url){ + return createHTML(this, 'a', 'href', url); + } + }); + +/***/ }, +/* 147 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.11 String.prototype.small() + __webpack_require__(138)('small', function(createHTML){ + return function small(){ + return createHTML(this, 'small', '', ''); + } + }); + +/***/ }, +/* 148 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.12 String.prototype.strike() + __webpack_require__(138)('strike', function(createHTML){ + return function strike(){ + return createHTML(this, 'strike', '', ''); + } + }); + +/***/ }, +/* 149 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.13 String.prototype.sub() + __webpack_require__(138)('sub', function(createHTML){ + return function sub(){ + return createHTML(this, 'sub', '', ''); + } + }); + +/***/ }, +/* 150 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.14 String.prototype.sup() + __webpack_require__(138)('sup', function(createHTML){ + return function sup(){ + return createHTML(this, 'sup', '', ''); + } + }); + +/***/ }, +/* 151 */ +/***/ function(module, exports, __webpack_require__) { + + // 22.1.2.2 / 15.4.3.2 Array.isArray(arg) + var $export = __webpack_require__(6); + + $export($export.S, 'Array', {isArray: __webpack_require__(43)}); + +/***/ }, +/* 152 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var ctx = __webpack_require__(18) + , $export = __webpack_require__(6) + , toObject = __webpack_require__(56) + , call = __webpack_require__(153) + , isArrayIter = __webpack_require__(154) + , toLength = __webpack_require__(35) + , createProperty = __webpack_require__(155) + , getIterFn = __webpack_require__(156); + + $export($export.S + $export.F * !__webpack_require__(157)(function(iter){ Array.from(iter); }), 'Array', { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){ + var O = toObject(arrayLike) + , C = typeof this == 'function' ? this : Array + , aLen = arguments.length + , mapfn = aLen > 1 ? arguments[1] : undefined + , mapping = mapfn !== undefined + , index = 0 + , iterFn = getIterFn(O) + , length, result, step, iterator; + if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){ + for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){ + createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); + } + } else { + length = toLength(O.length); + for(result = new C(length); length > index; index++){ + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + } + }); + + +/***/ }, +/* 153 */ +/***/ function(module, exports, __webpack_require__) { + + // call something on iterator step with safe closing on error + var anObject = __webpack_require__(10); + module.exports = function(iterator, fn, value, entries){ + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch(e){ + var ret = iterator['return']; + if(ret !== undefined)anObject(ret.call(iterator)); + throw e; + } + }; + +/***/ }, +/* 154 */ +/***/ function(module, exports, __webpack_require__) { + + // check on default Array iterator + var Iterators = __webpack_require__(135) + , ITERATOR = __webpack_require__(23)('iterator') + , ArrayProto = Array.prototype; + + module.exports = function(it){ + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); + }; + +/***/ }, +/* 155 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $defineProperty = __webpack_require__(9) + , createDesc = __webpack_require__(15); + + module.exports = function(object, index, value){ + if(index in object)$defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; + }; + +/***/ }, +/* 156 */ +/***/ function(module, exports, __webpack_require__) { + + var classof = __webpack_require__(73) + , ITERATOR = __webpack_require__(23)('iterator') + , Iterators = __webpack_require__(135); + module.exports = __webpack_require__(7).getIteratorMethod = function(it){ + if(it != undefined)return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; + }; + +/***/ }, +/* 157 */ +/***/ function(module, exports, __webpack_require__) { + + var ITERATOR = __webpack_require__(23)('iterator') + , SAFE_CLOSING = false; + + try { + var riter = [7][ITERATOR](); + riter['return'] = function(){ SAFE_CLOSING = true; }; + Array.from(riter, function(){ throw 2; }); + } catch(e){ /* empty */ } + + module.exports = function(exec, skipClosing){ + if(!skipClosing && !SAFE_CLOSING)return false; + var safe = false; + try { + var arr = [7] + , iter = arr[ITERATOR](); + iter.next = function(){ return {done: safe = true}; }; + arr[ITERATOR] = function(){ return iter; }; + exec(arr); + } catch(e){ /* empty */ } + return safe; + }; + +/***/ }, +/* 158 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , createProperty = __webpack_require__(155); + + // WebKit Array.of isn't generic + $export($export.S + $export.F * __webpack_require__(5)(function(){ + function F(){} + return !(Array.of.call(F) instanceof F); + }), 'Array', { + // 22.1.2.3 Array.of( ...items) + of: function of(/* ...args */){ + var index = 0 + , aLen = arguments.length + , result = new (typeof this == 'function' ? this : Array)(aLen); + while(aLen > index)createProperty(result, index, arguments[index++]); + result.length = aLen; + return result; + } + }); + +/***/ }, +/* 159 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // 22.1.3.13 Array.prototype.join(separator) + var $export = __webpack_require__(6) + , toIObject = __webpack_require__(30) + , arrayJoin = [].join; + + // fallback for not array-like strings + $export($export.P + $export.F * (__webpack_require__(31) != Object || !__webpack_require__(160)(arrayJoin)), 'Array', { + join: function join(separator){ + return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator); + } + }); + +/***/ }, +/* 160 */ +/***/ function(module, exports, __webpack_require__) { + + var fails = __webpack_require__(5); + + module.exports = function(method, arg){ + return !!method && fails(function(){ + arg ? method.call(null, function(){}, 1) : method.call(null); + }); + }; + +/***/ }, +/* 161 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , html = __webpack_require__(46) + , cof = __webpack_require__(32) + , toIndex = __webpack_require__(37) + , toLength = __webpack_require__(35) + , arraySlice = [].slice; + + // fallback for not array-like ES3 strings and DOM objects + $export($export.P + $export.F * __webpack_require__(5)(function(){ + if(html)arraySlice.call(html); + }), 'Array', { + slice: function slice(begin, end){ + var len = toLength(this.length) + , klass = cof(this); + end = end === undefined ? len : end; + if(klass == 'Array')return arraySlice.call(this, begin, end); + var start = toIndex(begin, len) + , upTo = toIndex(end, len) + , size = toLength(upTo - start) + , cloned = Array(size) + , i = 0; + for(; i < size; i++)cloned[i] = klass == 'String' + ? this.charAt(start + i) + : this[start + i]; + return cloned; + } + }); + +/***/ }, +/* 162 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , aFunction = __webpack_require__(19) + , toObject = __webpack_require__(56) + , fails = __webpack_require__(5) + , $sort = [].sort + , test = [1, 2, 3]; + + $export($export.P + $export.F * (fails(function(){ + // IE8- + test.sort(undefined); + }) || !fails(function(){ + // V8 bug + test.sort(null); + // Old WebKit + }) || !__webpack_require__(160)($sort)), 'Array', { + // 22.1.3.25 Array.prototype.sort(comparefn) + sort: function sort(comparefn){ + return comparefn === undefined + ? $sort.call(toObject(this)) + : $sort.call(toObject(this), aFunction(comparefn)); + } + }); + +/***/ }, +/* 163 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , $forEach = __webpack_require__(164)(0) + , STRICT = __webpack_require__(160)([].forEach, true); + + $export($export.P + $export.F * !STRICT, 'Array', { + // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) + forEach: function forEach(callbackfn /* , thisArg */){ + return $forEach(this, callbackfn, arguments[1]); + } + }); + +/***/ }, +/* 164 */ +/***/ function(module, exports, __webpack_require__) { + + // 0 -> Array#forEach + // 1 -> Array#map + // 2 -> Array#filter + // 3 -> Array#some + // 4 -> Array#every + // 5 -> Array#find + // 6 -> Array#findIndex + var ctx = __webpack_require__(18) + , IObject = __webpack_require__(31) + , toObject = __webpack_require__(56) + , toLength = __webpack_require__(35) + , asc = __webpack_require__(165); + module.exports = function(TYPE, $create){ + var IS_MAP = TYPE == 1 + , IS_FILTER = TYPE == 2 + , IS_SOME = TYPE == 3 + , IS_EVERY = TYPE == 4 + , IS_FIND_INDEX = TYPE == 6 + , NO_HOLES = TYPE == 5 || IS_FIND_INDEX + , create = $create || asc; + return function($this, callbackfn, that){ + var O = toObject($this) + , self = IObject(O) + , f = ctx(callbackfn, that, 3) + , length = toLength(self.length) + , index = 0 + , result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined + , val, res; + for(;length > index; index++)if(NO_HOLES || index in self){ + val = self[index]; + res = f(val, index, O); + if(TYPE){ + if(IS_MAP)result[index] = res; // map + else if(res)switch(TYPE){ + case 3: return true; // some + case 5: return val; // find + case 6: return index; // findIndex + case 2: result.push(val); // filter + } else if(IS_EVERY)return false; // every + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; + }; + }; + +/***/ }, +/* 165 */ +/***/ function(module, exports, __webpack_require__) { + + // 9.4.2.3 ArraySpeciesCreate(originalArray, length) + var speciesConstructor = __webpack_require__(166); + + module.exports = function(original, length){ + return new (speciesConstructor(original))(length); + }; + +/***/ }, +/* 166 */ +/***/ function(module, exports, __webpack_require__) { + + var isObject = __webpack_require__(11) + , isArray = __webpack_require__(43) + , SPECIES = __webpack_require__(23)('species'); + + module.exports = function(original){ + var C; + if(isArray(original)){ + C = original.constructor; + // cross-realm fallback + if(typeof C == 'function' && (C === Array || isArray(C.prototype)))C = undefined; + if(isObject(C)){ + C = C[SPECIES]; + if(C === null)C = undefined; + } + } return C === undefined ? Array : C; + }; + +/***/ }, +/* 167 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , $map = __webpack_require__(164)(1); + + $export($export.P + $export.F * !__webpack_require__(160)([].map, true), 'Array', { + // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) + map: function map(callbackfn /* , thisArg */){ + return $map(this, callbackfn, arguments[1]); + } + }); + +/***/ }, +/* 168 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , $filter = __webpack_require__(164)(2); + + $export($export.P + $export.F * !__webpack_require__(160)([].filter, true), 'Array', { + // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) + filter: function filter(callbackfn /* , thisArg */){ + return $filter(this, callbackfn, arguments[1]); + } + }); + +/***/ }, +/* 169 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , $some = __webpack_require__(164)(3); + + $export($export.P + $export.F * !__webpack_require__(160)([].some, true), 'Array', { + // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) + some: function some(callbackfn /* , thisArg */){ + return $some(this, callbackfn, arguments[1]); + } + }); + +/***/ }, +/* 170 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , $every = __webpack_require__(164)(4); + + $export($export.P + $export.F * !__webpack_require__(160)([].every, true), 'Array', { + // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) + every: function every(callbackfn /* , thisArg */){ + return $every(this, callbackfn, arguments[1]); + } + }); + +/***/ }, +/* 171 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , $reduce = __webpack_require__(172); + + $export($export.P + $export.F * !__webpack_require__(160)([].reduce, true), 'Array', { + // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) + reduce: function reduce(callbackfn /* , initialValue */){ + return $reduce(this, callbackfn, arguments.length, arguments[1], false); + } + }); + +/***/ }, +/* 172 */ +/***/ function(module, exports, __webpack_require__) { + + var aFunction = __webpack_require__(19) + , toObject = __webpack_require__(56) + , IObject = __webpack_require__(31) + , toLength = __webpack_require__(35); + + module.exports = function(that, callbackfn, aLen, memo, isRight){ + aFunction(callbackfn); + var O = toObject(that) + , self = IObject(O) + , length = toLength(O.length) + , index = isRight ? length - 1 : 0 + , i = isRight ? -1 : 1; + if(aLen < 2)for(;;){ + if(index in self){ + memo = self[index]; + index += i; + break; + } + index += i; + if(isRight ? index < 0 : length <= index){ + throw TypeError('Reduce of empty array with no initial value'); + } + } + for(;isRight ? index >= 0 : length > index; index += i)if(index in self){ + memo = callbackfn(memo, self[index], index, O); + } + return memo; + }; + +/***/ }, +/* 173 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , $reduce = __webpack_require__(172); + + $export($export.P + $export.F * !__webpack_require__(160)([].reduceRight, true), 'Array', { + // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) + reduceRight: function reduceRight(callbackfn /* , initialValue */){ + return $reduce(this, callbackfn, arguments.length, arguments[1], true); + } + }); + +/***/ }, +/* 174 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , $indexOf = __webpack_require__(34)(false) + , $native = [].indexOf + , NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; + + $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(160)($native)), 'Array', { + // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) + indexOf: function indexOf(searchElement /*, fromIndex = 0 */){ + return NEGATIVE_ZERO + // convert -0 to +0 + ? $native.apply(this, arguments) || 0 + : $indexOf(this, searchElement, arguments[1]); + } + }); + +/***/ }, +/* 175 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , toIObject = __webpack_require__(30) + , toInteger = __webpack_require__(36) + , toLength = __webpack_require__(35) + , $native = [].lastIndexOf + , NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; + + $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(160)($native)), 'Array', { + // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) + lastIndexOf: function lastIndexOf(searchElement /*, fromIndex = @[*-1] */){ + // convert -0 to +0 + if(NEGATIVE_ZERO)return $native.apply(this, arguments) || 0; + var O = toIObject(this) + , length = toLength(O.length) + , index = length - 1; + if(arguments.length > 1)index = Math.min(index, toInteger(arguments[1])); + if(index < 0)index = length + index; + for(;index >= 0; index--)if(index in O)if(O[index] === searchElement)return index || 0; + return -1; + } + }); + +/***/ }, +/* 176 */ +/***/ function(module, exports, __webpack_require__) { + + // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) + var $export = __webpack_require__(6); + + $export($export.P, 'Array', {copyWithin: __webpack_require__(177)}); + + __webpack_require__(178)('copyWithin'); + +/***/ }, +/* 177 */ +/***/ function(module, exports, __webpack_require__) { + + // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) + 'use strict'; + var toObject = __webpack_require__(56) + , toIndex = __webpack_require__(37) + , toLength = __webpack_require__(35); + + module.exports = [].copyWithin || function copyWithin(target/*= 0*/, start/*= 0, end = @length*/){ + var O = toObject(this) + , len = toLength(O.length) + , to = toIndex(target, len) + , from = toIndex(start, len) + , end = arguments.length > 2 ? arguments[2] : undefined + , count = Math.min((end === undefined ? len : toIndex(end, len)) - from, len - to) + , inc = 1; + if(from < to && to < from + count){ + inc = -1; + from += count - 1; + to += count - 1; + } + while(count-- > 0){ + if(from in O)O[to] = O[from]; + else delete O[to]; + to += inc; + from += inc; + } return O; + }; + +/***/ }, +/* 178 */ +/***/ function(module, exports, __webpack_require__) { + + // 22.1.3.31 Array.prototype[@@unscopables] + var UNSCOPABLES = __webpack_require__(23)('unscopables') + , ArrayProto = Array.prototype; + if(ArrayProto[UNSCOPABLES] == undefined)__webpack_require__(8)(ArrayProto, UNSCOPABLES, {}); + module.exports = function(key){ + ArrayProto[UNSCOPABLES][key] = true; + }; + +/***/ }, +/* 179 */ +/***/ function(module, exports, __webpack_require__) { + + // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) + var $export = __webpack_require__(6); + + $export($export.P, 'Array', {fill: __webpack_require__(180)}); + + __webpack_require__(178)('fill'); + +/***/ }, +/* 180 */ +/***/ function(module, exports, __webpack_require__) { + + // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) + 'use strict'; + var toObject = __webpack_require__(56) + , toIndex = __webpack_require__(37) + , toLength = __webpack_require__(35); + module.exports = function fill(value /*, start = 0, end = @length */){ + var O = toObject(this) + , length = toLength(O.length) + , aLen = arguments.length + , index = toIndex(aLen > 1 ? arguments[1] : undefined, length) + , end = aLen > 2 ? arguments[2] : undefined + , endPos = end === undefined ? length : toIndex(end, length); + while(endPos > index)O[index++] = value; + return O; + }; + +/***/ }, +/* 181 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) + var $export = __webpack_require__(6) + , $find = __webpack_require__(164)(5) + , KEY = 'find' + , forced = true; + // Shouldn't skip holes + if(KEY in [])Array(1)[KEY](function(){ forced = false; }); + $export($export.P + $export.F * forced, 'Array', { + find: function find(callbackfn/*, that = undefined */){ + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } + }); + __webpack_require__(178)(KEY); + +/***/ }, +/* 182 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) + var $export = __webpack_require__(6) + , $find = __webpack_require__(164)(6) + , KEY = 'findIndex' + , forced = true; + // Shouldn't skip holes + if(KEY in [])Array(1)[KEY](function(){ forced = false; }); + $export($export.P + $export.F * forced, 'Array', { + findIndex: function findIndex(callbackfn/*, that = undefined */){ + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } + }); + __webpack_require__(178)(KEY); + +/***/ }, +/* 183 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var addToUnscopables = __webpack_require__(178) + , step = __webpack_require__(184) + , Iterators = __webpack_require__(135) + , toIObject = __webpack_require__(30); + + // 22.1.3.4 Array.prototype.entries() + // 22.1.3.13 Array.prototype.keys() + // 22.1.3.29 Array.prototype.values() + // 22.1.3.30 Array.prototype[@@iterator]() + module.exports = __webpack_require__(134)(Array, 'Array', function(iterated, kind){ + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind + // 22.1.5.2.1 %ArrayIteratorPrototype%.next() + }, function(){ + var O = this._t + , kind = this._k + , index = this._i++; + if(!O || index >= O.length){ + this._t = undefined; + return step(1); + } + if(kind == 'keys' )return step(0, index); + if(kind == 'values')return step(0, O[index]); + return step(0, [index, O[index]]); + }, 'values'); + + // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) + Iterators.Arguments = Iterators.Array; + + addToUnscopables('keys'); + addToUnscopables('values'); + addToUnscopables('entries'); + +/***/ }, +/* 184 */ +/***/ function(module, exports) { + + module.exports = function(done, value){ + return {value: value, done: !!done}; + }; + +/***/ }, +/* 185 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(186)('Array'); + +/***/ }, +/* 186 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var global = __webpack_require__(2) + , dP = __webpack_require__(9) + , DESCRIPTORS = __webpack_require__(4) + , SPECIES = __webpack_require__(23)('species'); + + module.exports = function(KEY){ + var C = global[KEY]; + if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, { + configurable: true, + get: function(){ return this; } + }); + }; + +/***/ }, +/* 187 */ +/***/ function(module, exports, __webpack_require__) { + + var global = __webpack_require__(2) + , inheritIfRequired = __webpack_require__(80) + , dP = __webpack_require__(9).f + , gOPN = __webpack_require__(48).f + , isRegExp = __webpack_require__(128) + , $flags = __webpack_require__(188) + , $RegExp = global.RegExp + , Base = $RegExp + , proto = $RegExp.prototype + , re1 = /a/g + , re2 = /a/g + // "new" creates a new object, old webkit buggy here + , CORRECT_NEW = new $RegExp(re1) !== re1; + + if(__webpack_require__(4) && (!CORRECT_NEW || __webpack_require__(5)(function(){ + re2[__webpack_require__(23)('match')] = false; + // RegExp constructor can alter flags and IsRegExp works correct with @@match + return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i'; + }))){ + $RegExp = function RegExp(p, f){ + var tiRE = this instanceof $RegExp + , piRE = isRegExp(p) + , fiU = f === undefined; + return !tiRE && piRE && p.constructor === $RegExp && fiU ? p + : inheritIfRequired(CORRECT_NEW + ? new Base(piRE && !fiU ? p.source : p, f) + : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f) + , tiRE ? this : proto, $RegExp); + }; + var proxy = function(key){ + key in $RegExp || dP($RegExp, key, { + configurable: true, + get: function(){ return Base[key]; }, + set: function(it){ Base[key] = it; } + }); + }; + for(var keys = gOPN(Base), i = 0; keys.length > i; )proxy(keys[i++]); + proto.constructor = $RegExp; + $RegExp.prototype = proto; + __webpack_require__(16)(global, 'RegExp', $RegExp); + } + + __webpack_require__(186)('RegExp'); + +/***/ }, +/* 188 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // 21.2.5.3 get RegExp.prototype.flags + var anObject = __webpack_require__(10); + module.exports = function(){ + var that = anObject(this) + , result = ''; + if(that.global) result += 'g'; + if(that.ignoreCase) result += 'i'; + if(that.multiline) result += 'm'; + if(that.unicode) result += 'u'; + if(that.sticky) result += 'y'; + return result; + }; + +/***/ }, +/* 189 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + __webpack_require__(190); + var anObject = __webpack_require__(10) + , $flags = __webpack_require__(188) + , DESCRIPTORS = __webpack_require__(4) + , TO_STRING = 'toString' + , $toString = /./[TO_STRING]; + + var define = function(fn){ + __webpack_require__(16)(RegExp.prototype, TO_STRING, fn, true); + }; + + // 21.2.5.14 RegExp.prototype.toString() + if(__webpack_require__(5)(function(){ return $toString.call({source: 'a', flags: 'b'}) != '/a/b'; })){ + define(function toString(){ + var R = anObject(this); + return '/'.concat(R.source, '/', + 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined); + }); + // FF44- RegExp#toString has a wrong name + } else if($toString.name != TO_STRING){ + define(function toString(){ + return $toString.call(this); + }); + } + +/***/ }, +/* 190 */ +/***/ function(module, exports, __webpack_require__) { + + // 21.2.5.3 get RegExp.prototype.flags() + if(__webpack_require__(4) && /./g.flags != 'g')__webpack_require__(9).f(RegExp.prototype, 'flags', { + configurable: true, + get: __webpack_require__(188) + }); + +/***/ }, +/* 191 */ +/***/ function(module, exports, __webpack_require__) { + + // @@match logic + __webpack_require__(192)('match', 1, function(defined, MATCH, $match){ + // 21.1.3.11 String.prototype.match(regexp) + return [function match(regexp){ + 'use strict'; + var O = defined(this) + , fn = regexp == undefined ? undefined : regexp[MATCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); + }, $match]; + }); + +/***/ }, +/* 192 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var hide = __webpack_require__(8) + , redefine = __webpack_require__(16) + , fails = __webpack_require__(5) + , defined = __webpack_require__(33) + , wks = __webpack_require__(23); + + module.exports = function(KEY, length, exec){ + var SYMBOL = wks(KEY) + , fns = exec(defined, SYMBOL, ''[KEY]) + , strfn = fns[0] + , rxfn = fns[1]; + if(fails(function(){ + var O = {}; + O[SYMBOL] = function(){ return 7; }; + return ''[KEY](O) != 7; + })){ + redefine(String.prototype, KEY, strfn); + hide(RegExp.prototype, SYMBOL, length == 2 + // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) + // 21.2.5.11 RegExp.prototype[@@split](string, limit) + ? function(string, arg){ return rxfn.call(string, this, arg); } + // 21.2.5.6 RegExp.prototype[@@match](string) + // 21.2.5.9 RegExp.prototype[@@search](string) + : function(string){ return rxfn.call(string, this); } + ); + } + }; + +/***/ }, +/* 193 */ +/***/ function(module, exports, __webpack_require__) { + + // @@replace logic + __webpack_require__(192)('replace', 2, function(defined, REPLACE, $replace){ + // 21.1.3.14 String.prototype.replace(searchValue, replaceValue) + return [function replace(searchValue, replaceValue){ + 'use strict'; + var O = defined(this) + , fn = searchValue == undefined ? undefined : searchValue[REPLACE]; + return fn !== undefined + ? fn.call(searchValue, O, replaceValue) + : $replace.call(String(O), searchValue, replaceValue); + }, $replace]; + }); + +/***/ }, +/* 194 */ +/***/ function(module, exports, __webpack_require__) { + + // @@search logic + __webpack_require__(192)('search', 1, function(defined, SEARCH, $search){ + // 21.1.3.15 String.prototype.search(regexp) + return [function search(regexp){ + 'use strict'; + var O = defined(this) + , fn = regexp == undefined ? undefined : regexp[SEARCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); + }, $search]; + }); + +/***/ }, +/* 195 */ +/***/ function(module, exports, __webpack_require__) { + + // @@split logic + __webpack_require__(192)('split', 2, function(defined, SPLIT, $split){ + 'use strict'; + var isRegExp = __webpack_require__(128) + , _split = $split + , $push = [].push + , $SPLIT = 'split' + , LENGTH = 'length' + , LAST_INDEX = 'lastIndex'; + if( + 'abbc'[$SPLIT](/(b)*/)[1] == 'c' || + 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || + 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || + '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || + '.'[$SPLIT](/()()/)[LENGTH] > 1 || + ''[$SPLIT](/.?/)[LENGTH] + ){ + var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group + // based on es5-shim implementation, need to rework it + $split = function(separator, limit){ + var string = String(this); + if(separator === undefined && limit === 0)return []; + // If `separator` is not a regex, use native split + if(!isRegExp(separator))return _split.call(string, separator, limit); + var output = []; + var flags = (separator.ignoreCase ? 'i' : '') + + (separator.multiline ? 'm' : '') + + (separator.unicode ? 'u' : '') + + (separator.sticky ? 'y' : ''); + var lastLastIndex = 0; + var splitLimit = limit === undefined ? 4294967295 : limit >>> 0; + // Make `global` and avoid `lastIndex` issues by working with a copy + var separatorCopy = new RegExp(separator.source, flags + 'g'); + var separator2, match, lastIndex, lastLength, i; + // Doesn't need flags gy, but they don't hurt + if(!NPCG)separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags); + while(match = separatorCopy.exec(string)){ + // `separatorCopy.lastIndex` is not reliable cross-browser + lastIndex = match.index + match[0][LENGTH]; + if(lastIndex > lastLastIndex){ + output.push(string.slice(lastLastIndex, match.index)); + // Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG + if(!NPCG && match[LENGTH] > 1)match[0].replace(separator2, function(){ + for(i = 1; i < arguments[LENGTH] - 2; i++)if(arguments[i] === undefined)match[i] = undefined; + }); + if(match[LENGTH] > 1 && match.index < string[LENGTH])$push.apply(output, match.slice(1)); + lastLength = match[0][LENGTH]; + lastLastIndex = lastIndex; + if(output[LENGTH] >= splitLimit)break; + } + if(separatorCopy[LAST_INDEX] === match.index)separatorCopy[LAST_INDEX]++; // Avoid an infinite loop + } + if(lastLastIndex === string[LENGTH]){ + if(lastLength || !separatorCopy.test(''))output.push(''); + } else output.push(string.slice(lastLastIndex)); + return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output; + }; + // Chakra, V8 + } else if('0'[$SPLIT](undefined, 0)[LENGTH]){ + $split = function(separator, limit){ + return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit); + }; + } + // 21.1.3.17 String.prototype.split(separator, limit) + return [function split(separator, limit){ + var O = defined(this) + , fn = separator == undefined ? undefined : separator[SPLIT]; + return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit); + }, $split]; + }); + +/***/ }, +/* 196 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var LIBRARY = __webpack_require__(26) + , global = __webpack_require__(2) + , ctx = __webpack_require__(18) + , classof = __webpack_require__(73) + , $export = __webpack_require__(6) + , isObject = __webpack_require__(11) + , aFunction = __webpack_require__(19) + , anInstance = __webpack_require__(197) + , forOf = __webpack_require__(198) + , speciesConstructor = __webpack_require__(199) + , task = __webpack_require__(200).set + , microtask = __webpack_require__(201)() + , PROMISE = 'Promise' + , TypeError = global.TypeError + , process = global.process + , $Promise = global[PROMISE] + , process = global.process + , isNode = classof(process) == 'process' + , empty = function(){ /* empty */ } + , Internal, GenericPromiseCapability, Wrapper; + + var USE_NATIVE = !!function(){ + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1) + , FakePromise = (promise.constructor = {})[__webpack_require__(23)('species')] = function(exec){ exec(empty, empty); }; + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise; + } catch(e){ /* empty */ } + }(); + + // helpers + var sameConstructor = function(a, b){ + // with library wrapper special case + return a === b || a === $Promise && b === Wrapper; + }; + var isThenable = function(it){ + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; + }; + var newPromiseCapability = function(C){ + return sameConstructor($Promise, C) + ? new PromiseCapability(C) + : new GenericPromiseCapability(C); + }; + var PromiseCapability = GenericPromiseCapability = function(C){ + var resolve, reject; + this.promise = new C(function($$resolve, $$reject){ + if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); + }; + var perform = function(exec){ + try { + exec(); + } catch(e){ + return {error: e}; + } + }; + var notify = function(promise, isReject){ + if(promise._n)return; + promise._n = true; + var chain = promise._c; + microtask(function(){ + var value = promise._v + , ok = promise._s == 1 + , i = 0; + var run = function(reaction){ + var handler = ok ? reaction.ok : reaction.fail + , resolve = reaction.resolve + , reject = reaction.reject + , domain = reaction.domain + , result, then; + try { + if(handler){ + if(!ok){ + if(promise._h == 2)onHandleUnhandled(promise); + promise._h = 1; + } + if(handler === true)result = value; + else { + if(domain)domain.enter(); + result = handler(value); + if(domain)domain.exit(); + } + if(result === reaction.promise){ + reject(TypeError('Promise-chain cycle')); + } else if(then = isThenable(result)){ + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch(e){ + reject(e); + } + }; + while(chain.length > i)run(chain[i++]); // variable length - can't use forEach + promise._c = []; + promise._n = false; + if(isReject && !promise._h)onUnhandled(promise); + }); + }; + var onUnhandled = function(promise){ + task.call(global, function(){ + var value = promise._v + , abrupt, handler, console; + if(isUnhandled(promise)){ + abrupt = perform(function(){ + if(isNode){ + process.emit('unhandledRejection', value, promise); + } else if(handler = global.onunhandledrejection){ + handler({promise: promise, reason: value}); + } else if((console = global.console) && console.error){ + console.error('Unhandled promise rejection', value); + } + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } promise._a = undefined; + if(abrupt)throw abrupt.error; + }); + }; + var isUnhandled = function(promise){ + if(promise._h == 1)return false; + var chain = promise._a || promise._c + , i = 0 + , reaction; + while(chain.length > i){ + reaction = chain[i++]; + if(reaction.fail || !isUnhandled(reaction.promise))return false; + } return true; + }; + var onHandleUnhandled = function(promise){ + task.call(global, function(){ + var handler; + if(isNode){ + process.emit('rejectionHandled', promise); + } else if(handler = global.onrejectionhandled){ + handler({promise: promise, reason: promise._v}); + } + }); + }; + var $reject = function(value){ + var promise = this; + if(promise._d)return; + promise._d = true; + promise = promise._w || promise; // unwrap + promise._v = value; + promise._s = 2; + if(!promise._a)promise._a = promise._c.slice(); + notify(promise, true); + }; + var $resolve = function(value){ + var promise = this + , then; + if(promise._d)return; + promise._d = true; + promise = promise._w || promise; // unwrap + try { + if(promise === value)throw TypeError("Promise can't be resolved itself"); + if(then = isThenable(value)){ + microtask(function(){ + var wrapper = {_w: promise, _d: false}; // wrap + try { + then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); + } catch(e){ + $reject.call(wrapper, e); + } + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); + } + } catch(e){ + $reject.call({_w: promise, _d: false}, e); // wrap + } + }; + + // constructor polyfill + if(!USE_NATIVE){ + // 25.4.3.1 Promise(executor) + $Promise = function Promise(executor){ + anInstance(this, $Promise, PROMISE, '_h'); + aFunction(executor); + Internal.call(this); + try { + executor(ctx($resolve, this, 1), ctx($reject, this, 1)); + } catch(err){ + $reject.call(this, err); + } + }; + Internal = function Promise(executor){ + this._c = []; // <- awaiting reactions + this._a = undefined; // <- checked in isUnhandled reactions + this._s = 0; // <- state + this._d = false; // <- done + this._v = undefined; // <- value + this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled + this._n = false; // <- notify + }; + Internal.prototype = __webpack_require__(202)($Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function then(onFulfilled, onRejected){ + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = isNode ? process.domain : undefined; + this._c.push(reaction); + if(this._a)this._a.push(reaction); + if(this._s)notify(this, false); + return reaction.promise; + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + 'catch': function(onRejected){ + return this.then(undefined, onRejected); + } + }); + PromiseCapability = function(){ + var promise = new Internal; + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; + } + + $export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise}); + __webpack_require__(22)($Promise, PROMISE); + __webpack_require__(186)(PROMISE); + Wrapper = __webpack_require__(7)[PROMISE]; + + // statics + $export($export.S + $export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject(r){ + var capability = newPromiseCapability(this) + , $$reject = capability.reject; + $$reject(r); + return capability.promise; + } + }); + $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve(x){ + // instanceof instead of internal slot check because we should fix it without replacement native Promise core + if(x instanceof $Promise && sameConstructor(x.constructor, this))return x; + var capability = newPromiseCapability(this) + , $$resolve = capability.resolve; + $$resolve(x); + return capability.promise; + } + }); + $export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(157)(function(iter){ + $Promise.all(iter)['catch'](empty); + })), PROMISE, { + // 25.4.4.1 Promise.all(iterable) + all: function all(iterable){ + var C = this + , capability = newPromiseCapability(C) + , resolve = capability.resolve + , reject = capability.reject; + var abrupt = perform(function(){ + var values = [] + , index = 0 + , remaining = 1; + forOf(iterable, false, function(promise){ + var $index = index++ + , alreadyCalled = false; + values.push(undefined); + remaining++; + C.resolve(promise).then(function(value){ + if(alreadyCalled)return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if(abrupt)reject(abrupt.error); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable){ + var C = this + , capability = newPromiseCapability(C) + , reject = capability.reject; + var abrupt = perform(function(){ + forOf(iterable, false, function(promise){ + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if(abrupt)reject(abrupt.error); + return capability.promise; + } + }); + +/***/ }, +/* 197 */ +/***/ function(module, exports) { + + module.exports = function(it, Constructor, name, forbiddenField){ + if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){ + throw TypeError(name + ': incorrect invocation!'); + } return it; + }; + +/***/ }, +/* 198 */ +/***/ function(module, exports, __webpack_require__) { + + var ctx = __webpack_require__(18) + , call = __webpack_require__(153) + , isArrayIter = __webpack_require__(154) + , anObject = __webpack_require__(10) + , toLength = __webpack_require__(35) + , getIterFn = __webpack_require__(156) + , BREAK = {} + , RETURN = {}; + var exports = module.exports = function(iterable, entries, fn, that, ITERATOR){ + var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable) + , f = ctx(fn, that, entries ? 2 : 1) + , index = 0 + , length, step, iterator, result; + if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){ + result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); + if(result === BREAK || result === RETURN)return result; + } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){ + result = call(iterator, f, step.value, entries); + if(result === BREAK || result === RETURN)return result; + } + }; + exports.BREAK = BREAK; + exports.RETURN = RETURN; + +/***/ }, +/* 199 */ +/***/ function(module, exports, __webpack_require__) { + + // 7.3.20 SpeciesConstructor(O, defaultConstructor) + var anObject = __webpack_require__(10) + , aFunction = __webpack_require__(19) + , SPECIES = __webpack_require__(23)('species'); + module.exports = function(O, D){ + var C = anObject(O).constructor, S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); + }; + +/***/ }, +/* 200 */ +/***/ function(module, exports, __webpack_require__) { + + var ctx = __webpack_require__(18) + , invoke = __webpack_require__(76) + , html = __webpack_require__(46) + , cel = __webpack_require__(13) + , global = __webpack_require__(2) + , process = global.process + , setTask = global.setImmediate + , clearTask = global.clearImmediate + , MessageChannel = global.MessageChannel + , counter = 0 + , queue = {} + , ONREADYSTATECHANGE = 'onreadystatechange' + , defer, channel, port; + var run = function(){ + var id = +this; + if(queue.hasOwnProperty(id)){ + var fn = queue[id]; + delete queue[id]; + fn(); + } + }; + var listener = function(event){ + run.call(event.data); + }; + // Node.js 0.9+ & IE10+ has setImmediate, otherwise: + if(!setTask || !clearTask){ + setTask = function setImmediate(fn){ + var args = [], i = 1; + while(arguments.length > i)args.push(arguments[i++]); + queue[++counter] = function(){ + invoke(typeof fn == 'function' ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate(id){ + delete queue[id]; + }; + // Node.js 0.8- + if(__webpack_require__(32)(process) == 'process'){ + defer = function(id){ + process.nextTick(ctx(run, id, 1)); + }; + // Browsers with MessageChannel, includes WebWorkers + } else if(MessageChannel){ + channel = new MessageChannel; + port = channel.port2; + channel.port1.onmessage = listener; + defer = ctx(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){ + defer = function(id){ + global.postMessage(id + '', '*'); + }; + global.addEventListener('message', listener, false); + // IE8- + } else if(ONREADYSTATECHANGE in cel('script')){ + defer = function(id){ + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){ + html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers + } else { + defer = function(id){ + setTimeout(ctx(run, id, 1), 0); + }; + } + } + module.exports = { + set: setTask, + clear: clearTask + }; + +/***/ }, +/* 201 */ +/***/ function(module, exports, __webpack_require__) { + + var global = __webpack_require__(2) + , macrotask = __webpack_require__(200).set + , Observer = global.MutationObserver || global.WebKitMutationObserver + , process = global.process + , Promise = global.Promise + , isNode = __webpack_require__(32)(process) == 'process'; + + module.exports = function(){ + var head, last, notify; + + var flush = function(){ + var parent, fn; + if(isNode && (parent = process.domain))parent.exit(); + while(head){ + fn = head.fn; + head = head.next; + try { + fn(); + } catch(e){ + if(head)notify(); + else last = undefined; + throw e; + } + } last = undefined; + if(parent)parent.enter(); + }; + + // Node.js + if(isNode){ + notify = function(){ + process.nextTick(flush); + }; + // browsers with MutationObserver + } else if(Observer){ + var toggle = true + , node = document.createTextNode(''); + new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new + notify = function(){ + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if(Promise && Promise.resolve){ + var promise = Promise.resolve(); + notify = function(){ + promise.then(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function(){ + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(global, flush); + }; + } + + return function(fn){ + var task = {fn: fn, next: undefined}; + if(last)last.next = task; + if(!head){ + head = task; + notify(); + } last = task; + }; + }; + +/***/ }, +/* 202 */ +/***/ function(module, exports, __webpack_require__) { + + var redefine = __webpack_require__(16); + module.exports = function(target, src, safe){ + for(var key in src)redefine(target, key, src[key], safe); + return target; + }; + +/***/ }, +/* 203 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var strong = __webpack_require__(204); + + // 23.1 Map Objects + module.exports = __webpack_require__(205)('Map', function(get){ + return function Map(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; + }, { + // 23.1.3.6 Map.prototype.get(key) + get: function get(key){ + var entry = strong.getEntry(this, key); + return entry && entry.v; + }, + // 23.1.3.9 Map.prototype.set(key, value) + set: function set(key, value){ + return strong.def(this, key === 0 ? 0 : key, value); + } + }, strong, true); + +/***/ }, +/* 204 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var dP = __webpack_require__(9).f + , create = __webpack_require__(44) + , redefineAll = __webpack_require__(202) + , ctx = __webpack_require__(18) + , anInstance = __webpack_require__(197) + , defined = __webpack_require__(33) + , forOf = __webpack_require__(198) + , $iterDefine = __webpack_require__(134) + , step = __webpack_require__(184) + , setSpecies = __webpack_require__(186) + , DESCRIPTORS = __webpack_require__(4) + , fastKey = __webpack_require__(20).fastKey + , SIZE = DESCRIPTORS ? '_s' : 'size'; + + var getEntry = function(that, key){ + // fast case + var index = fastKey(key), entry; + if(index !== 'F')return that._i[index]; + // frozen object case + for(entry = that._f; entry; entry = entry.n){ + if(entry.k == key)return entry; + } + }; + + module.exports = { + getConstructor: function(wrapper, NAME, IS_MAP, ADDER){ + var C = wrapper(function(that, iterable){ + anInstance(that, C, NAME, '_i'); + that._i = create(null); // index + that._f = undefined; // first entry + that._l = undefined; // last entry + that[SIZE] = 0; // size + if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear(){ + for(var that = this, data = that._i, entry = that._f; entry; entry = entry.n){ + entry.r = true; + if(entry.p)entry.p = entry.p.n = undefined; + delete data[entry.i]; + } + that._f = that._l = undefined; + that[SIZE] = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + 'delete': function(key){ + var that = this + , entry = getEntry(that, key); + if(entry){ + var next = entry.n + , prev = entry.p; + delete that._i[entry.i]; + entry.r = true; + if(prev)prev.n = next; + if(next)next.p = prev; + if(that._f == entry)that._f = next; + if(that._l == entry)that._l = prev; + that[SIZE]--; + } return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach(callbackfn /*, that = undefined */){ + anInstance(this, C, 'forEach'); + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3) + , entry; + while(entry = entry ? entry.n : this._f){ + f(entry.v, entry.k, this); + // revert to the last existing entry + while(entry && entry.r)entry = entry.p; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has(key){ + return !!getEntry(this, key); + } + }); + if(DESCRIPTORS)dP(C.prototype, 'size', { + get: function(){ + return defined(this[SIZE]); + } + }); + return C; + }, + def: function(that, key, value){ + var entry = getEntry(that, key) + , prev, index; + // change existing entry + if(entry){ + entry.v = value; + // create new entry + } else { + that._l = entry = { + i: index = fastKey(key, true), // <- index + k: key, // <- key + v: value, // <- value + p: prev = that._l, // <- previous entry + n: undefined, // <- next entry + r: false // <- removed + }; + if(!that._f)that._f = entry; + if(prev)prev.n = entry; + that[SIZE]++; + // add to index + if(index !== 'F')that._i[index] = entry; + } return that; + }, + getEntry: getEntry, + setStrong: function(C, NAME, IS_MAP){ + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + $iterDefine(C, NAME, function(iterated, kind){ + this._t = iterated; // target + this._k = kind; // kind + this._l = undefined; // previous + }, function(){ + var that = this + , kind = that._k + , entry = that._l; + // revert to the last existing entry + while(entry && entry.r)entry = entry.p; + // get next entry + if(!that._t || !(that._l = entry = entry ? entry.n : that._t._f)){ + // or finish the iteration + that._t = undefined; + return step(1); + } + // return step by kind + if(kind == 'keys' )return step(0, entry.k); + if(kind == 'values')return step(0, entry.v); + return step(0, [entry.k, entry.v]); + }, IS_MAP ? 'entries' : 'values' , !IS_MAP, true); + + // add [@@species], 23.1.2.2, 23.2.2.2 + setSpecies(NAME); + } + }; + +/***/ }, +/* 205 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var global = __webpack_require__(2) + , $export = __webpack_require__(6) + , redefine = __webpack_require__(16) + , redefineAll = __webpack_require__(202) + , meta = __webpack_require__(20) + , forOf = __webpack_require__(198) + , anInstance = __webpack_require__(197) + , isObject = __webpack_require__(11) + , fails = __webpack_require__(5) + , $iterDetect = __webpack_require__(157) + , setToStringTag = __webpack_require__(22) + , inheritIfRequired = __webpack_require__(80); + + module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){ + var Base = global[NAME] + , C = Base + , ADDER = IS_MAP ? 'set' : 'add' + , proto = C && C.prototype + , O = {}; + var fixMethod = function(KEY){ + var fn = proto[KEY]; + redefine(proto, KEY, + KEY == 'delete' ? function(a){ + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); + } : KEY == 'has' ? function has(a){ + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); + } : KEY == 'get' ? function get(a){ + return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a); + } : KEY == 'add' ? function add(a){ fn.call(this, a === 0 ? 0 : a); return this; } + : function set(a, b){ fn.call(this, a === 0 ? 0 : a, b); return this; } + ); + }; + if(typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function(){ + new C().entries().next(); + }))){ + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + redefineAll(C.prototype, methods); + meta.NEED = true; + } else { + var instance = new C + // early implementations not supports chaining + , HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance + // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false + , THROWS_ON_PRIMITIVES = fails(function(){ instance.has(1); }) + // most early implementations doesn't supports iterables, most modern - not close it correctly + , ACCEPT_ITERABLES = $iterDetect(function(iter){ new C(iter); }) // eslint-disable-line no-new + // for early implementations -0 and +0 not the same + , BUGGY_ZERO = !IS_WEAK && fails(function(){ + // V8 ~ Chromium 42- fails only with 5+ elements + var $instance = new C() + , index = 5; + while(index--)$instance[ADDER](index, index); + return !$instance.has(-0); + }); + if(!ACCEPT_ITERABLES){ + C = wrapper(function(target, iterable){ + anInstance(target, C, NAME); + var that = inheritIfRequired(new Base, target, C); + if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); + return that; + }); + C.prototype = proto; + proto.constructor = C; + } + if(THROWS_ON_PRIMITIVES || BUGGY_ZERO){ + fixMethod('delete'); + fixMethod('has'); + IS_MAP && fixMethod('get'); + } + if(BUGGY_ZERO || HASNT_CHAINING)fixMethod(ADDER); + // weak collections should not contains .clear method + if(IS_WEAK && proto.clear)delete proto.clear; + } + + setToStringTag(C, NAME); + + O[NAME] = C; + $export($export.G + $export.W + $export.F * (C != Base), O); + + if(!IS_WEAK)common.setStrong(C, NAME, IS_MAP); + + return C; + }; + +/***/ }, +/* 206 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var strong = __webpack_require__(204); + + // 23.2 Set Objects + module.exports = __webpack_require__(205)('Set', function(get){ + return function Set(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; + }, { + // 23.2.3.1 Set.prototype.add(value) + add: function add(value){ + return strong.def(this, value = value === 0 ? 0 : value, value); + } + }, strong); + +/***/ }, +/* 207 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var each = __webpack_require__(164)(0) + , redefine = __webpack_require__(16) + , meta = __webpack_require__(20) + , assign = __webpack_require__(67) + , weak = __webpack_require__(208) + , isObject = __webpack_require__(11) + , getWeak = meta.getWeak + , isExtensible = Object.isExtensible + , uncaughtFrozenStore = weak.ufstore + , tmp = {} + , InternalMap; + + var wrapper = function(get){ + return function WeakMap(){ + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }; + + var methods = { + // 23.3.3.3 WeakMap.prototype.get(key) + get: function get(key){ + if(isObject(key)){ + var data = getWeak(key); + if(data === true)return uncaughtFrozenStore(this).get(key); + return data ? data[this._i] : undefined; + } + }, + // 23.3.3.5 WeakMap.prototype.set(key, value) + set: function set(key, value){ + return weak.def(this, key, value); + } + }; + + // 23.3 WeakMap Objects + var $WeakMap = module.exports = __webpack_require__(205)('WeakMap', wrapper, methods, weak, true, true); + + // IE11 WeakMap frozen keys fix + if(new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7){ + InternalMap = weak.getConstructor(wrapper); + assign(InternalMap.prototype, methods); + meta.NEED = true; + each(['delete', 'has', 'get', 'set'], function(key){ + var proto = $WeakMap.prototype + , method = proto[key]; + redefine(proto, key, function(a, b){ + // store frozen objects on internal weakmap shim + if(isObject(a) && !isExtensible(a)){ + if(!this._f)this._f = new InternalMap; + var result = this._f[key](a, b); + return key == 'set' ? this : result; + // store all the rest on native weakmap + } return method.call(this, a, b); + }); + }); + } + +/***/ }, +/* 208 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var redefineAll = __webpack_require__(202) + , getWeak = __webpack_require__(20).getWeak + , anObject = __webpack_require__(10) + , isObject = __webpack_require__(11) + , anInstance = __webpack_require__(197) + , forOf = __webpack_require__(198) + , createArrayMethod = __webpack_require__(164) + , $has = __webpack_require__(3) + , arrayFind = createArrayMethod(5) + , arrayFindIndex = createArrayMethod(6) + , id = 0; + + // fallback for uncaught frozen keys + var uncaughtFrozenStore = function(that){ + return that._l || (that._l = new UncaughtFrozenStore); + }; + var UncaughtFrozenStore = function(){ + this.a = []; + }; + var findUncaughtFrozen = function(store, key){ + return arrayFind(store.a, function(it){ + return it[0] === key; + }); + }; + UncaughtFrozenStore.prototype = { + get: function(key){ + var entry = findUncaughtFrozen(this, key); + if(entry)return entry[1]; + }, + has: function(key){ + return !!findUncaughtFrozen(this, key); + }, + set: function(key, value){ + var entry = findUncaughtFrozen(this, key); + if(entry)entry[1] = value; + else this.a.push([key, value]); + }, + 'delete': function(key){ + var index = arrayFindIndex(this.a, function(it){ + return it[0] === key; + }); + if(~index)this.a.splice(index, 1); + return !!~index; + } + }; + + module.exports = { + getConstructor: function(wrapper, NAME, IS_MAP, ADDER){ + var C = wrapper(function(that, iterable){ + anInstance(that, C, NAME, '_i'); + that._i = id++; // collection id + that._l = undefined; // leak store for uncaught frozen objects + if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.3.3.2 WeakMap.prototype.delete(key) + // 23.4.3.3 WeakSet.prototype.delete(value) + 'delete': function(key){ + if(!isObject(key))return false; + var data = getWeak(key); + if(data === true)return uncaughtFrozenStore(this)['delete'](key); + return data && $has(data, this._i) && delete data[this._i]; + }, + // 23.3.3.4 WeakMap.prototype.has(key) + // 23.4.3.4 WeakSet.prototype.has(value) + has: function has(key){ + if(!isObject(key))return false; + var data = getWeak(key); + if(data === true)return uncaughtFrozenStore(this).has(key); + return data && $has(data, this._i); + } + }); + return C; + }, + def: function(that, key, value){ + var data = getWeak(anObject(key), true); + if(data === true)uncaughtFrozenStore(that).set(key, value); + else data[that._i] = value; + return that; + }, + ufstore: uncaughtFrozenStore + }; + +/***/ }, +/* 209 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var weak = __webpack_require__(208); + + // 23.4 WeakSet Objects + __webpack_require__(205)('WeakSet', function(get){ + return function WeakSet(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; + }, { + // 23.4.3.1 WeakSet.prototype.add(value) + add: function add(value){ + return weak.def(this, value, true); + } + }, weak, false, true); + +/***/ }, +/* 210 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.1 Reflect.apply(target, thisArgument, argumentsList) + var $export = __webpack_require__(6) + , aFunction = __webpack_require__(19) + , anObject = __webpack_require__(10) + , rApply = (__webpack_require__(2).Reflect || {}).apply + , fApply = Function.apply; + // MS Edge argumentsList argument is optional + $export($export.S + $export.F * !__webpack_require__(5)(function(){ + rApply(function(){}); + }), 'Reflect', { + apply: function apply(target, thisArgument, argumentsList){ + var T = aFunction(target) + , L = anObject(argumentsList); + return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L); + } + }); + +/***/ }, +/* 211 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) + var $export = __webpack_require__(6) + , create = __webpack_require__(44) + , aFunction = __webpack_require__(19) + , anObject = __webpack_require__(10) + , isObject = __webpack_require__(11) + , fails = __webpack_require__(5) + , bind = __webpack_require__(75) + , rConstruct = (__webpack_require__(2).Reflect || {}).construct; + + // MS Edge supports only 2 arguments and argumentsList argument is optional + // FF Nightly sets third argument as `new.target`, but does not create `this` from it + var NEW_TARGET_BUG = fails(function(){ + function F(){} + return !(rConstruct(function(){}, [], F) instanceof F); + }); + var ARGS_BUG = !fails(function(){ + rConstruct(function(){}); + }); + + $export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { + construct: function construct(Target, args /*, newTarget*/){ + aFunction(Target); + anObject(args); + var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); + if(ARGS_BUG && !NEW_TARGET_BUG)return rConstruct(Target, args, newTarget); + if(Target == newTarget){ + // w/o altered newTarget, optimization for 0-4 arguments + switch(args.length){ + case 0: return new Target; + case 1: return new Target(args[0]); + case 2: return new Target(args[0], args[1]); + case 3: return new Target(args[0], args[1], args[2]); + case 4: return new Target(args[0], args[1], args[2], args[3]); + } + // w/o altered newTarget, lot of arguments case + var $args = [null]; + $args.push.apply($args, args); + return new (bind.apply(Target, $args)); + } + // with altered newTarget, not support built-in constructors + var proto = newTarget.prototype + , instance = create(isObject(proto) ? proto : Object.prototype) + , result = Function.apply.call(Target, instance, args); + return isObject(result) ? result : instance; + } + }); + +/***/ }, +/* 212 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) + var dP = __webpack_require__(9) + , $export = __webpack_require__(6) + , anObject = __webpack_require__(10) + , toPrimitive = __webpack_require__(14); + + // MS Edge has broken Reflect.defineProperty - throwing instead of returning false + $export($export.S + $export.F * __webpack_require__(5)(function(){ + Reflect.defineProperty(dP.f({}, 1, {value: 1}), 1, {value: 2}); + }), 'Reflect', { + defineProperty: function defineProperty(target, propertyKey, attributes){ + anObject(target); + propertyKey = toPrimitive(propertyKey, true); + anObject(attributes); + try { + dP.f(target, propertyKey, attributes); + return true; + } catch(e){ + return false; + } + } + }); + +/***/ }, +/* 213 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.4 Reflect.deleteProperty(target, propertyKey) + var $export = __webpack_require__(6) + , gOPD = __webpack_require__(49).f + , anObject = __webpack_require__(10); + + $export($export.S, 'Reflect', { + deleteProperty: function deleteProperty(target, propertyKey){ + var desc = gOPD(anObject(target), propertyKey); + return desc && !desc.configurable ? false : delete target[propertyKey]; + } + }); + +/***/ }, +/* 214 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // 26.1.5 Reflect.enumerate(target) + var $export = __webpack_require__(6) + , anObject = __webpack_require__(10); + var Enumerate = function(iterated){ + this._t = anObject(iterated); // target + this._i = 0; // next index + var keys = this._k = [] // keys + , key; + for(key in iterated)keys.push(key); + }; + __webpack_require__(136)(Enumerate, 'Object', function(){ + var that = this + , keys = that._k + , key; + do { + if(that._i >= keys.length)return {value: undefined, done: true}; + } while(!((key = keys[that._i++]) in that._t)); + return {value: key, done: false}; + }); + + $export($export.S, 'Reflect', { + enumerate: function enumerate(target){ + return new Enumerate(target); + } + }); + +/***/ }, +/* 215 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.6 Reflect.get(target, propertyKey [, receiver]) + var gOPD = __webpack_require__(49) + , getPrototypeOf = __webpack_require__(57) + , has = __webpack_require__(3) + , $export = __webpack_require__(6) + , isObject = __webpack_require__(11) + , anObject = __webpack_require__(10); + + function get(target, propertyKey/*, receiver*/){ + var receiver = arguments.length < 3 ? target : arguments[2] + , desc, proto; + if(anObject(target) === receiver)return target[propertyKey]; + if(desc = gOPD.f(target, propertyKey))return has(desc, 'value') + ? desc.value + : desc.get !== undefined + ? desc.get.call(receiver) + : undefined; + if(isObject(proto = getPrototypeOf(target)))return get(proto, propertyKey, receiver); + } + + $export($export.S, 'Reflect', {get: get}); + +/***/ }, +/* 216 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) + var gOPD = __webpack_require__(49) + , $export = __webpack_require__(6) + , anObject = __webpack_require__(10); + + $export($export.S, 'Reflect', { + getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey){ + return gOPD.f(anObject(target), propertyKey); + } + }); + +/***/ }, +/* 217 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.8 Reflect.getPrototypeOf(target) + var $export = __webpack_require__(6) + , getProto = __webpack_require__(57) + , anObject = __webpack_require__(10); + + $export($export.S, 'Reflect', { + getPrototypeOf: function getPrototypeOf(target){ + return getProto(anObject(target)); + } + }); + +/***/ }, +/* 218 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.9 Reflect.has(target, propertyKey) + var $export = __webpack_require__(6); + + $export($export.S, 'Reflect', { + has: function has(target, propertyKey){ + return propertyKey in target; + } + }); + +/***/ }, +/* 219 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.10 Reflect.isExtensible(target) + var $export = __webpack_require__(6) + , anObject = __webpack_require__(10) + , $isExtensible = Object.isExtensible; + + $export($export.S, 'Reflect', { + isExtensible: function isExtensible(target){ + anObject(target); + return $isExtensible ? $isExtensible(target) : true; + } + }); + +/***/ }, +/* 220 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.11 Reflect.ownKeys(target) + var $export = __webpack_require__(6); + + $export($export.S, 'Reflect', {ownKeys: __webpack_require__(221)}); + +/***/ }, +/* 221 */ +/***/ function(module, exports, __webpack_require__) { + + // all object keys, includes non-enumerable and symbols + var gOPN = __webpack_require__(48) + , gOPS = __webpack_require__(41) + , anObject = __webpack_require__(10) + , Reflect = __webpack_require__(2).Reflect; + module.exports = Reflect && Reflect.ownKeys || function ownKeys(it){ + var keys = gOPN.f(anObject(it)) + , getSymbols = gOPS.f; + return getSymbols ? keys.concat(getSymbols(it)) : keys; + }; + +/***/ }, +/* 222 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.12 Reflect.preventExtensions(target) + var $export = __webpack_require__(6) + , anObject = __webpack_require__(10) + , $preventExtensions = Object.preventExtensions; + + $export($export.S, 'Reflect', { + preventExtensions: function preventExtensions(target){ + anObject(target); + try { + if($preventExtensions)$preventExtensions(target); + return true; + } catch(e){ + return false; + } + } + }); + +/***/ }, +/* 223 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) + var dP = __webpack_require__(9) + , gOPD = __webpack_require__(49) + , getPrototypeOf = __webpack_require__(57) + , has = __webpack_require__(3) + , $export = __webpack_require__(6) + , createDesc = __webpack_require__(15) + , anObject = __webpack_require__(10) + , isObject = __webpack_require__(11); + + function set(target, propertyKey, V/*, receiver*/){ + var receiver = arguments.length < 4 ? target : arguments[3] + , ownDesc = gOPD.f(anObject(target), propertyKey) + , existingDescriptor, proto; + if(!ownDesc){ + if(isObject(proto = getPrototypeOf(target))){ + return set(proto, propertyKey, V, receiver); + } + ownDesc = createDesc(0); + } + if(has(ownDesc, 'value')){ + if(ownDesc.writable === false || !isObject(receiver))return false; + existingDescriptor = gOPD.f(receiver, propertyKey) || createDesc(0); + existingDescriptor.value = V; + dP.f(receiver, propertyKey, existingDescriptor); + return true; + } + return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); + } + + $export($export.S, 'Reflect', {set: set}); + +/***/ }, +/* 224 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.14 Reflect.setPrototypeOf(target, proto) + var $export = __webpack_require__(6) + , setProto = __webpack_require__(71); + + if(setProto)$export($export.S, 'Reflect', { + setPrototypeOf: function setPrototypeOf(target, proto){ + setProto.check(target, proto); + try { + setProto.set(target, proto); + return true; + } catch(e){ + return false; + } + } + }); + +/***/ }, +/* 225 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.3.3.1 / 15.9.4.4 Date.now() + var $export = __webpack_require__(6); + + $export($export.S, 'Date', {now: function(){ return new Date().getTime(); }}); + +/***/ }, +/* 226 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , toObject = __webpack_require__(56) + , toPrimitive = __webpack_require__(14); + + $export($export.P + $export.F * __webpack_require__(5)(function(){ + return new Date(NaN).toJSON() !== null || Date.prototype.toJSON.call({toISOString: function(){ return 1; }}) !== 1; + }), 'Date', { + toJSON: function toJSON(key){ + var O = toObject(this) + , pv = toPrimitive(O); + return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString(); + } + }); + +/***/ }, +/* 227 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() + var $export = __webpack_require__(6) + , fails = __webpack_require__(5) + , getTime = Date.prototype.getTime; + + var lz = function(num){ + return num > 9 ? num : '0' + num; + }; + + // PhantomJS / old WebKit has a broken implementations + $export($export.P + $export.F * (fails(function(){ + return new Date(-5e13 - 1).toISOString() != '0385-07-25T07:06:39.999Z'; + }) || !fails(function(){ + new Date(NaN).toISOString(); + })), 'Date', { + toISOString: function toISOString(){ + if(!isFinite(getTime.call(this)))throw RangeError('Invalid time value'); + var d = this + , y = d.getUTCFullYear() + , m = d.getUTCMilliseconds() + , s = y < 0 ? '-' : y > 9999 ? '+' : ''; + return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + + '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) + + 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) + + ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z'; + } + }); + +/***/ }, +/* 228 */ +/***/ function(module, exports, __webpack_require__) { + + var DateProto = Date.prototype + , INVALID_DATE = 'Invalid Date' + , TO_STRING = 'toString' + , $toString = DateProto[TO_STRING] + , getTime = DateProto.getTime; + if(new Date(NaN) + '' != INVALID_DATE){ + __webpack_require__(16)(DateProto, TO_STRING, function toString(){ + var value = getTime.call(this); + return value === value ? $toString.call(this) : INVALID_DATE; + }); + } + +/***/ }, +/* 229 */ +/***/ function(module, exports, __webpack_require__) { + + var TO_PRIMITIVE = __webpack_require__(23)('toPrimitive') + , proto = Date.prototype; + + if(!(TO_PRIMITIVE in proto))__webpack_require__(8)(proto, TO_PRIMITIVE, __webpack_require__(230)); + +/***/ }, +/* 230 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var anObject = __webpack_require__(10) + , toPrimitive = __webpack_require__(14) + , NUMBER = 'number'; + + module.exports = function(hint){ + if(hint !== 'string' && hint !== NUMBER && hint !== 'default')throw TypeError('Incorrect hint'); + return toPrimitive(anObject(this), hint != NUMBER); + }; + +/***/ }, +/* 231 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , $typed = __webpack_require__(232) + , buffer = __webpack_require__(233) + , anObject = __webpack_require__(10) + , toIndex = __webpack_require__(37) + , toLength = __webpack_require__(35) + , isObject = __webpack_require__(11) + , ArrayBuffer = __webpack_require__(2).ArrayBuffer + , speciesConstructor = __webpack_require__(199) + , $ArrayBuffer = buffer.ArrayBuffer + , $DataView = buffer.DataView + , $isView = $typed.ABV && ArrayBuffer.isView + , $slice = $ArrayBuffer.prototype.slice + , VIEW = $typed.VIEW + , ARRAY_BUFFER = 'ArrayBuffer'; + + $export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), {ArrayBuffer: $ArrayBuffer}); + + $export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, { + // 24.1.3.1 ArrayBuffer.isView(arg) + isView: function isView(it){ + return $isView && $isView(it) || isObject(it) && VIEW in it; + } + }); + + $export($export.P + $export.U + $export.F * __webpack_require__(5)(function(){ + return !new $ArrayBuffer(2).slice(1, undefined).byteLength; + }), ARRAY_BUFFER, { + // 24.1.4.3 ArrayBuffer.prototype.slice(start, end) + slice: function slice(start, end){ + if($slice !== undefined && end === undefined)return $slice.call(anObject(this), start); // FF fix + var len = anObject(this).byteLength + , first = toIndex(start, len) + , final = toIndex(end === undefined ? len : end, len) + , result = new (speciesConstructor(this, $ArrayBuffer))(toLength(final - first)) + , viewS = new $DataView(this) + , viewT = new $DataView(result) + , index = 0; + while(first < final){ + viewT.setUint8(index++, viewS.getUint8(first++)); + } return result; + } + }); + + __webpack_require__(186)(ARRAY_BUFFER); + +/***/ }, +/* 232 */ +/***/ function(module, exports, __webpack_require__) { + + var global = __webpack_require__(2) + , hide = __webpack_require__(8) + , uid = __webpack_require__(17) + , TYPED = uid('typed_array') + , VIEW = uid('view') + , ABV = !!(global.ArrayBuffer && global.DataView) + , CONSTR = ABV + , i = 0, l = 9, Typed; + + var TypedArrayConstructors = ( + 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array' + ).split(','); + + while(i < l){ + if(Typed = global[TypedArrayConstructors[i++]]){ + hide(Typed.prototype, TYPED, true); + hide(Typed.prototype, VIEW, true); + } else CONSTR = false; + } + + module.exports = { + ABV: ABV, + CONSTR: CONSTR, + TYPED: TYPED, + VIEW: VIEW + }; + +/***/ }, +/* 233 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var global = __webpack_require__(2) + , DESCRIPTORS = __webpack_require__(4) + , LIBRARY = __webpack_require__(26) + , $typed = __webpack_require__(232) + , hide = __webpack_require__(8) + , redefineAll = __webpack_require__(202) + , fails = __webpack_require__(5) + , anInstance = __webpack_require__(197) + , toInteger = __webpack_require__(36) + , toLength = __webpack_require__(35) + , gOPN = __webpack_require__(48).f + , dP = __webpack_require__(9).f + , arrayFill = __webpack_require__(180) + , setToStringTag = __webpack_require__(22) + , ARRAY_BUFFER = 'ArrayBuffer' + , DATA_VIEW = 'DataView' + , PROTOTYPE = 'prototype' + , WRONG_LENGTH = 'Wrong length!' + , WRONG_INDEX = 'Wrong index!' + , $ArrayBuffer = global[ARRAY_BUFFER] + , $DataView = global[DATA_VIEW] + , Math = global.Math + , RangeError = global.RangeError + , Infinity = global.Infinity + , BaseBuffer = $ArrayBuffer + , abs = Math.abs + , pow = Math.pow + , floor = Math.floor + , log = Math.log + , LN2 = Math.LN2 + , BUFFER = 'buffer' + , BYTE_LENGTH = 'byteLength' + , BYTE_OFFSET = 'byteOffset' + , $BUFFER = DESCRIPTORS ? '_b' : BUFFER + , $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH + , $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET; + + // IEEE754 conversions based on https://github.com/feross/ieee754 + var packIEEE754 = function(value, mLen, nBytes){ + var buffer = Array(nBytes) + , eLen = nBytes * 8 - mLen - 1 + , eMax = (1 << eLen) - 1 + , eBias = eMax >> 1 + , rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0 + , i = 0 + , s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0 + , e, m, c; + value = abs(value) + if(value != value || value === Infinity){ + m = value != value ? 1 : 0; + e = eMax; + } else { + e = floor(log(value) / LN2); + if(value * (c = pow(2, -e)) < 1){ + e--; + c *= 2; + } + if(e + eBias >= 1){ + value += rt / c; + } else { + value += rt * pow(2, 1 - eBias); + } + if(value * c >= 2){ + e++; + c /= 2; + } + if(e + eBias >= eMax){ + m = 0; + e = eMax; + } else if(e + eBias >= 1){ + m = (value * c - 1) * pow(2, mLen); + e = e + eBias; + } else { + m = value * pow(2, eBias - 1) * pow(2, mLen); + e = 0; + } + } + for(; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8); + e = e << mLen | m; + eLen += mLen; + for(; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8); + buffer[--i] |= s * 128; + return buffer; + }; + var unpackIEEE754 = function(buffer, mLen, nBytes){ + var eLen = nBytes * 8 - mLen - 1 + , eMax = (1 << eLen) - 1 + , eBias = eMax >> 1 + , nBits = eLen - 7 + , i = nBytes - 1 + , s = buffer[i--] + , e = s & 127 + , m; + s >>= 7; + for(; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8); + m = e & (1 << -nBits) - 1; + e >>= -nBits; + nBits += mLen; + for(; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8); + if(e === 0){ + e = 1 - eBias; + } else if(e === eMax){ + return m ? NaN : s ? -Infinity : Infinity; + } else { + m = m + pow(2, mLen); + e = e - eBias; + } return (s ? -1 : 1) * m * pow(2, e - mLen); + }; + + var unpackI32 = function(bytes){ + return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0]; + }; + var packI8 = function(it){ + return [it & 0xff]; + }; + var packI16 = function(it){ + return [it & 0xff, it >> 8 & 0xff]; + }; + var packI32 = function(it){ + return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff]; + }; + var packF64 = function(it){ + return packIEEE754(it, 52, 8); + }; + var packF32 = function(it){ + return packIEEE754(it, 23, 4); + }; + + var addGetter = function(C, key, internal){ + dP(C[PROTOTYPE], key, {get: function(){ return this[internal]; }}); + }; + + var get = function(view, bytes, index, isLittleEndian){ + var numIndex = +index + , intIndex = toInteger(numIndex); + if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b + , start = intIndex + view[$OFFSET] + , pack = store.slice(start, start + bytes); + return isLittleEndian ? pack : pack.reverse(); + }; + var set = function(view, bytes, index, conversion, value, isLittleEndian){ + var numIndex = +index + , intIndex = toInteger(numIndex); + if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b + , start = intIndex + view[$OFFSET] + , pack = conversion(+value); + for(var i = 0; i < bytes; i++)store[start + i] = pack[isLittleEndian ? i : bytes - i - 1]; + }; + + var validateArrayBufferArguments = function(that, length){ + anInstance(that, $ArrayBuffer, ARRAY_BUFFER); + var numberLength = +length + , byteLength = toLength(numberLength); + if(numberLength != byteLength)throw RangeError(WRONG_LENGTH); + return byteLength; + }; + + if(!$typed.ABV){ + $ArrayBuffer = function ArrayBuffer(length){ + var byteLength = validateArrayBufferArguments(this, length); + this._b = arrayFill.call(Array(byteLength), 0); + this[$LENGTH] = byteLength; + }; + + $DataView = function DataView(buffer, byteOffset, byteLength){ + anInstance(this, $DataView, DATA_VIEW); + anInstance(buffer, $ArrayBuffer, DATA_VIEW); + var bufferLength = buffer[$LENGTH] + , offset = toInteger(byteOffset); + if(offset < 0 || offset > bufferLength)throw RangeError('Wrong offset!'); + byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); + if(offset + byteLength > bufferLength)throw RangeError(WRONG_LENGTH); + this[$BUFFER] = buffer; + this[$OFFSET] = offset; + this[$LENGTH] = byteLength; + }; + + if(DESCRIPTORS){ + addGetter($ArrayBuffer, BYTE_LENGTH, '_l'); + addGetter($DataView, BUFFER, '_b'); + addGetter($DataView, BYTE_LENGTH, '_l'); + addGetter($DataView, BYTE_OFFSET, '_o'); + } + + redefineAll($DataView[PROTOTYPE], { + getInt8: function getInt8(byteOffset){ + return get(this, 1, byteOffset)[0] << 24 >> 24; + }, + getUint8: function getUint8(byteOffset){ + return get(this, 1, byteOffset)[0]; + }, + getInt16: function getInt16(byteOffset /*, littleEndian */){ + var bytes = get(this, 2, byteOffset, arguments[1]); + return (bytes[1] << 8 | bytes[0]) << 16 >> 16; + }, + getUint16: function getUint16(byteOffset /*, littleEndian */){ + var bytes = get(this, 2, byteOffset, arguments[1]); + return bytes[1] << 8 | bytes[0]; + }, + getInt32: function getInt32(byteOffset /*, littleEndian */){ + return unpackI32(get(this, 4, byteOffset, arguments[1])); + }, + getUint32: function getUint32(byteOffset /*, littleEndian */){ + return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0; + }, + getFloat32: function getFloat32(byteOffset /*, littleEndian */){ + return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4); + }, + getFloat64: function getFloat64(byteOffset /*, littleEndian */){ + return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8); + }, + setInt8: function setInt8(byteOffset, value){ + set(this, 1, byteOffset, packI8, value); + }, + setUint8: function setUint8(byteOffset, value){ + set(this, 1, byteOffset, packI8, value); + }, + setInt16: function setInt16(byteOffset, value /*, littleEndian */){ + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setUint16: function setUint16(byteOffset, value /*, littleEndian */){ + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setInt32: function setInt32(byteOffset, value /*, littleEndian */){ + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setUint32: function setUint32(byteOffset, value /*, littleEndian */){ + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setFloat32: function setFloat32(byteOffset, value /*, littleEndian */){ + set(this, 4, byteOffset, packF32, value, arguments[2]); + }, + setFloat64: function setFloat64(byteOffset, value /*, littleEndian */){ + set(this, 8, byteOffset, packF64, value, arguments[2]); + } + }); + } else { + if(!fails(function(){ + new $ArrayBuffer; // eslint-disable-line no-new + }) || !fails(function(){ + new $ArrayBuffer(.5); // eslint-disable-line no-new + })){ + $ArrayBuffer = function ArrayBuffer(length){ + return new BaseBuffer(validateArrayBufferArguments(this, length)); + }; + var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE]; + for(var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j; ){ + if(!((key = keys[j++]) in $ArrayBuffer))hide($ArrayBuffer, key, BaseBuffer[key]); + }; + if(!LIBRARY)ArrayBufferProto.constructor = $ArrayBuffer; + } + // iOS Safari 7.x bug + var view = new $DataView(new $ArrayBuffer(2)) + , $setInt8 = $DataView[PROTOTYPE].setInt8; + view.setInt8(0, 2147483648); + view.setInt8(1, 2147483649); + if(view.getInt8(0) || !view.getInt8(1))redefineAll($DataView[PROTOTYPE], { + setInt8: function setInt8(byteOffset, value){ + $setInt8.call(this, byteOffset, value << 24 >> 24); + }, + setUint8: function setUint8(byteOffset, value){ + $setInt8.call(this, byteOffset, value << 24 >> 24); + } + }, true); + } + setToStringTag($ArrayBuffer, ARRAY_BUFFER); + setToStringTag($DataView, DATA_VIEW); + hide($DataView[PROTOTYPE], $typed.VIEW, true); + exports[ARRAY_BUFFER] = $ArrayBuffer; + exports[DATA_VIEW] = $DataView; + +/***/ }, +/* 234 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6); + $export($export.G + $export.W + $export.F * !__webpack_require__(232).ABV, { + DataView: __webpack_require__(233).DataView + }); + +/***/ }, +/* 235 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(236)('Int8', 1, function(init){ + return function Int8Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; + }); + +/***/ }, +/* 236 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + if(__webpack_require__(4)){ + var LIBRARY = __webpack_require__(26) + , global = __webpack_require__(2) + , fails = __webpack_require__(5) + , $export = __webpack_require__(6) + , $typed = __webpack_require__(232) + , $buffer = __webpack_require__(233) + , ctx = __webpack_require__(18) + , anInstance = __webpack_require__(197) + , propertyDesc = __webpack_require__(15) + , hide = __webpack_require__(8) + , redefineAll = __webpack_require__(202) + , toInteger = __webpack_require__(36) + , toLength = __webpack_require__(35) + , toIndex = __webpack_require__(37) + , toPrimitive = __webpack_require__(14) + , has = __webpack_require__(3) + , same = __webpack_require__(69) + , classof = __webpack_require__(73) + , isObject = __webpack_require__(11) + , toObject = __webpack_require__(56) + , isArrayIter = __webpack_require__(154) + , create = __webpack_require__(44) + , getPrototypeOf = __webpack_require__(57) + , gOPN = __webpack_require__(48).f + , getIterFn = __webpack_require__(156) + , uid = __webpack_require__(17) + , wks = __webpack_require__(23) + , createArrayMethod = __webpack_require__(164) + , createArrayIncludes = __webpack_require__(34) + , speciesConstructor = __webpack_require__(199) + , ArrayIterators = __webpack_require__(183) + , Iterators = __webpack_require__(135) + , $iterDetect = __webpack_require__(157) + , setSpecies = __webpack_require__(186) + , arrayFill = __webpack_require__(180) + , arrayCopyWithin = __webpack_require__(177) + , $DP = __webpack_require__(9) + , $GOPD = __webpack_require__(49) + , dP = $DP.f + , gOPD = $GOPD.f + , RangeError = global.RangeError + , TypeError = global.TypeError + , Uint8Array = global.Uint8Array + , ARRAY_BUFFER = 'ArrayBuffer' + , SHARED_BUFFER = 'Shared' + ARRAY_BUFFER + , BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT' + , PROTOTYPE = 'prototype' + , ArrayProto = Array[PROTOTYPE] + , $ArrayBuffer = $buffer.ArrayBuffer + , $DataView = $buffer.DataView + , arrayForEach = createArrayMethod(0) + , arrayFilter = createArrayMethod(2) + , arraySome = createArrayMethod(3) + , arrayEvery = createArrayMethod(4) + , arrayFind = createArrayMethod(5) + , arrayFindIndex = createArrayMethod(6) + , arrayIncludes = createArrayIncludes(true) + , arrayIndexOf = createArrayIncludes(false) + , arrayValues = ArrayIterators.values + , arrayKeys = ArrayIterators.keys + , arrayEntries = ArrayIterators.entries + , arrayLastIndexOf = ArrayProto.lastIndexOf + , arrayReduce = ArrayProto.reduce + , arrayReduceRight = ArrayProto.reduceRight + , arrayJoin = ArrayProto.join + , arraySort = ArrayProto.sort + , arraySlice = ArrayProto.slice + , arrayToString = ArrayProto.toString + , arrayToLocaleString = ArrayProto.toLocaleString + , ITERATOR = wks('iterator') + , TAG = wks('toStringTag') + , TYPED_CONSTRUCTOR = uid('typed_constructor') + , DEF_CONSTRUCTOR = uid('def_constructor') + , ALL_CONSTRUCTORS = $typed.CONSTR + , TYPED_ARRAY = $typed.TYPED + , VIEW = $typed.VIEW + , WRONG_LENGTH = 'Wrong length!'; + + var $map = createArrayMethod(1, function(O, length){ + return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); + }); + + var LITTLE_ENDIAN = fails(function(){ + return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; + }); + + var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function(){ + new Uint8Array(1).set({}); + }); + + var strictToLength = function(it, SAME){ + if(it === undefined)throw TypeError(WRONG_LENGTH); + var number = +it + , length = toLength(it); + if(SAME && !same(number, length))throw RangeError(WRONG_LENGTH); + return length; + }; + + var toOffset = function(it, BYTES){ + var offset = toInteger(it); + if(offset < 0 || offset % BYTES)throw RangeError('Wrong offset!'); + return offset; + }; + + var validate = function(it){ + if(isObject(it) && TYPED_ARRAY in it)return it; + throw TypeError(it + ' is not a typed array!'); + }; + + var allocate = function(C, length){ + if(!(isObject(C) && TYPED_CONSTRUCTOR in C)){ + throw TypeError('It is not a typed array constructor!'); + } return new C(length); + }; + + var speciesFromList = function(O, list){ + return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list); + }; + + var fromList = function(C, list){ + var index = 0 + , length = list.length + , result = allocate(C, length); + while(length > index)result[index] = list[index++]; + return result; + }; + + var addGetter = function(it, key, internal){ + dP(it, key, {get: function(){ return this._d[internal]; }}); + }; + + var $from = function from(source /*, mapfn, thisArg */){ + var O = toObject(source) + , aLen = arguments.length + , mapfn = aLen > 1 ? arguments[1] : undefined + , mapping = mapfn !== undefined + , iterFn = getIterFn(O) + , i, length, values, result, step, iterator; + if(iterFn != undefined && !isArrayIter(iterFn)){ + for(iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++){ + values.push(step.value); + } O = values; + } + if(mapping && aLen > 2)mapfn = ctx(mapfn, arguments[2], 2); + for(i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++){ + result[i] = mapping ? mapfn(O[i], i) : O[i]; + } + return result; + }; + + var $of = function of(/*...items*/){ + var index = 0 + , length = arguments.length + , result = allocate(this, length); + while(length > index)result[index] = arguments[index++]; + return result; + }; + + // iOS Safari 6.x fails here + var TO_LOCALE_BUG = !!Uint8Array && fails(function(){ arrayToLocaleString.call(new Uint8Array(1)); }); + + var $toLocaleString = function toLocaleString(){ + return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments); + }; + + var proto = { + copyWithin: function copyWithin(target, start /*, end */){ + return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined); + }, + every: function every(callbackfn /*, thisArg */){ + return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + fill: function fill(value /*, start, end */){ // eslint-disable-line no-unused-vars + return arrayFill.apply(validate(this), arguments); + }, + filter: function filter(callbackfn /*, thisArg */){ + return speciesFromList(this, arrayFilter(validate(this), callbackfn, + arguments.length > 1 ? arguments[1] : undefined)); + }, + find: function find(predicate /*, thisArg */){ + return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + findIndex: function findIndex(predicate /*, thisArg */){ + return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + forEach: function forEach(callbackfn /*, thisArg */){ + arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + indexOf: function indexOf(searchElement /*, fromIndex */){ + return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); + }, + includes: function includes(searchElement /*, fromIndex */){ + return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); + }, + join: function join(separator){ // eslint-disable-line no-unused-vars + return arrayJoin.apply(validate(this), arguments); + }, + lastIndexOf: function lastIndexOf(searchElement /*, fromIndex */){ // eslint-disable-line no-unused-vars + return arrayLastIndexOf.apply(validate(this), arguments); + }, + map: function map(mapfn /*, thisArg */){ + return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined); + }, + reduce: function reduce(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars + return arrayReduce.apply(validate(this), arguments); + }, + reduceRight: function reduceRight(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars + return arrayReduceRight.apply(validate(this), arguments); + }, + reverse: function reverse(){ + var that = this + , length = validate(that).length + , middle = Math.floor(length / 2) + , index = 0 + , value; + while(index < middle){ + value = that[index]; + that[index++] = that[--length]; + that[length] = value; + } return that; + }, + some: function some(callbackfn /*, thisArg */){ + return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + sort: function sort(comparefn){ + return arraySort.call(validate(this), comparefn); + }, + subarray: function subarray(begin, end){ + var O = validate(this) + , length = O.length + , $begin = toIndex(begin, length); + return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( + O.buffer, + O.byteOffset + $begin * O.BYTES_PER_ELEMENT, + toLength((end === undefined ? length : toIndex(end, length)) - $begin) + ); + } + }; + + var $slice = function slice(start, end){ + return speciesFromList(this, arraySlice.call(validate(this), start, end)); + }; + + var $set = function set(arrayLike /*, offset */){ + validate(this); + var offset = toOffset(arguments[1], 1) + , length = this.length + , src = toObject(arrayLike) + , len = toLength(src.length) + , index = 0; + if(len + offset > length)throw RangeError(WRONG_LENGTH); + while(index < len)this[offset + index] = src[index++]; + }; + + var $iterators = { + entries: function entries(){ + return arrayEntries.call(validate(this)); + }, + keys: function keys(){ + return arrayKeys.call(validate(this)); + }, + values: function values(){ + return arrayValues.call(validate(this)); + } + }; + + var isTAIndex = function(target, key){ + return isObject(target) + && target[TYPED_ARRAY] + && typeof key != 'symbol' + && key in target + && String(+key) == String(key); + }; + var $getDesc = function getOwnPropertyDescriptor(target, key){ + return isTAIndex(target, key = toPrimitive(key, true)) + ? propertyDesc(2, target[key]) + : gOPD(target, key); + }; + var $setDesc = function defineProperty(target, key, desc){ + if(isTAIndex(target, key = toPrimitive(key, true)) + && isObject(desc) + && has(desc, 'value') + && !has(desc, 'get') + && !has(desc, 'set') + // TODO: add validation descriptor w/o calling accessors + && !desc.configurable + && (!has(desc, 'writable') || desc.writable) + && (!has(desc, 'enumerable') || desc.enumerable) + ){ + target[key] = desc.value; + return target; + } else return dP(target, key, desc); + }; + + if(!ALL_CONSTRUCTORS){ + $GOPD.f = $getDesc; + $DP.f = $setDesc; + } + + $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', { + getOwnPropertyDescriptor: $getDesc, + defineProperty: $setDesc + }); + + if(fails(function(){ arrayToString.call({}); })){ + arrayToString = arrayToLocaleString = function toString(){ + return arrayJoin.call(this); + } + } + + var $TypedArrayPrototype$ = redefineAll({}, proto); + redefineAll($TypedArrayPrototype$, $iterators); + hide($TypedArrayPrototype$, ITERATOR, $iterators.values); + redefineAll($TypedArrayPrototype$, { + slice: $slice, + set: $set, + constructor: function(){ /* noop */ }, + toString: arrayToString, + toLocaleString: $toLocaleString + }); + addGetter($TypedArrayPrototype$, 'buffer', 'b'); + addGetter($TypedArrayPrototype$, 'byteOffset', 'o'); + addGetter($TypedArrayPrototype$, 'byteLength', 'l'); + addGetter($TypedArrayPrototype$, 'length', 'e'); + dP($TypedArrayPrototype$, TAG, { + get: function(){ return this[TYPED_ARRAY]; } + }); + + module.exports = function(KEY, BYTES, wrapper, CLAMPED){ + CLAMPED = !!CLAMPED; + var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array' + , ISNT_UINT8 = NAME != 'Uint8Array' + , GETTER = 'get' + KEY + , SETTER = 'set' + KEY + , TypedArray = global[NAME] + , Base = TypedArray || {} + , TAC = TypedArray && getPrototypeOf(TypedArray) + , FORCED = !TypedArray || !$typed.ABV + , O = {} + , TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE]; + var getter = function(that, index){ + var data = that._d; + return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN); + }; + var setter = function(that, index, value){ + var data = that._d; + if(CLAMPED)value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff; + data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN); + }; + var addElement = function(that, index){ + dP(that, index, { + get: function(){ + return getter(this, index); + }, + set: function(value){ + return setter(this, index, value); + }, + enumerable: true + }); + }; + if(FORCED){ + TypedArray = wrapper(function(that, data, $offset, $length){ + anInstance(that, TypedArray, NAME, '_d'); + var index = 0 + , offset = 0 + , buffer, byteLength, length, klass; + if(!isObject(data)){ + length = strictToLength(data, true) + byteLength = length * BYTES; + buffer = new $ArrayBuffer(byteLength); + } else if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){ + buffer = data; + offset = toOffset($offset, BYTES); + var $len = data.byteLength; + if($length === undefined){ + if($len % BYTES)throw RangeError(WRONG_LENGTH); + byteLength = $len - offset; + if(byteLength < 0)throw RangeError(WRONG_LENGTH); + } else { + byteLength = toLength($length) * BYTES; + if(byteLength + offset > $len)throw RangeError(WRONG_LENGTH); + } + length = byteLength / BYTES; + } else if(TYPED_ARRAY in data){ + return fromList(TypedArray, data); + } else { + return $from.call(TypedArray, data); + } + hide(that, '_d', { + b: buffer, + o: offset, + l: byteLength, + e: length, + v: new $DataView(buffer) + }); + while(index < length)addElement(that, index++); + }); + TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$); + hide(TypedArrayPrototype, 'constructor', TypedArray); + } else if(!$iterDetect(function(iter){ + // V8 works with iterators, but fails in many other cases + // https://code.google.com/p/v8/issues/detail?id=4552 + new TypedArray(null); // eslint-disable-line no-new + new TypedArray(iter); // eslint-disable-line no-new + }, true)){ + TypedArray = wrapper(function(that, data, $offset, $length){ + anInstance(that, TypedArray, NAME); + var klass; + // `ws` module bug, temporarily remove validation length for Uint8Array + // https://github.com/websockets/ws/pull/645 + if(!isObject(data))return new Base(strictToLength(data, ISNT_UINT8)); + if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){ + return $length !== undefined + ? new Base(data, toOffset($offset, BYTES), $length) + : $offset !== undefined + ? new Base(data, toOffset($offset, BYTES)) + : new Base(data); + } + if(TYPED_ARRAY in data)return fromList(TypedArray, data); + return $from.call(TypedArray, data); + }); + arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function(key){ + if(!(key in TypedArray))hide(TypedArray, key, Base[key]); + }); + TypedArray[PROTOTYPE] = TypedArrayPrototype; + if(!LIBRARY)TypedArrayPrototype.constructor = TypedArray; + } + var $nativeIterator = TypedArrayPrototype[ITERATOR] + , CORRECT_ITER_NAME = !!$nativeIterator && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined) + , $iterator = $iterators.values; + hide(TypedArray, TYPED_CONSTRUCTOR, true); + hide(TypedArrayPrototype, TYPED_ARRAY, NAME); + hide(TypedArrayPrototype, VIEW, true); + hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray); + + if(CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)){ + dP(TypedArrayPrototype, TAG, { + get: function(){ return NAME; } + }); + } + + O[NAME] = TypedArray; + + $export($export.G + $export.W + $export.F * (TypedArray != Base), O); + + $export($export.S, NAME, { + BYTES_PER_ELEMENT: BYTES, + from: $from, + of: $of + }); + + if(!(BYTES_PER_ELEMENT in TypedArrayPrototype))hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); + + $export($export.P, NAME, proto); + + setSpecies(NAME); + + $export($export.P + $export.F * FORCED_SET, NAME, {set: $set}); + + $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); + + $export($export.P + $export.F * (TypedArrayPrototype.toString != arrayToString), NAME, {toString: arrayToString}); + + $export($export.P + $export.F * fails(function(){ + new TypedArray(1).slice(); + }), NAME, {slice: $slice}); + + $export($export.P + $export.F * (fails(function(){ + return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString() + }) || !fails(function(){ + TypedArrayPrototype.toLocaleString.call([1, 2]); + })), NAME, {toLocaleString: $toLocaleString}); + + Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator; + if(!LIBRARY && !CORRECT_ITER_NAME)hide(TypedArrayPrototype, ITERATOR, $iterator); + }; + } else module.exports = function(){ /* empty */ }; + +/***/ }, +/* 237 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(236)('Uint8', 1, function(init){ + return function Uint8Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; + }); + +/***/ }, +/* 238 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(236)('Uint8', 1, function(init){ + return function Uint8ClampedArray(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; + }, true); + +/***/ }, +/* 239 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(236)('Int16', 2, function(init){ + return function Int16Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; + }); + +/***/ }, +/* 240 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(236)('Uint16', 2, function(init){ + return function Uint16Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; + }); + +/***/ }, +/* 241 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(236)('Int32', 4, function(init){ + return function Int32Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; + }); + +/***/ }, +/* 242 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(236)('Uint32', 4, function(init){ + return function Uint32Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; + }); + +/***/ }, +/* 243 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(236)('Float32', 4, function(init){ + return function Float32Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; + }); + +/***/ }, +/* 244 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(236)('Float64', 8, function(init){ + return function Float64Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; + }); + +/***/ }, +/* 245 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // https://github.com/tc39/Array.prototype.includes + var $export = __webpack_require__(6) + , $includes = __webpack_require__(34)(true); + + $export($export.P, 'Array', { + includes: function includes(el /*, fromIndex = 0 */){ + return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); + } + }); + + __webpack_require__(178)('includes'); + +/***/ }, +/* 246 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // https://github.com/mathiasbynens/String.prototype.at + var $export = __webpack_require__(6) + , $at = __webpack_require__(125)(true); + + $export($export.P, 'String', { + at: function at(pos){ + return $at(this, pos); + } + }); + +/***/ }, +/* 247 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // https://github.com/tc39/proposal-string-pad-start-end + var $export = __webpack_require__(6) + , $pad = __webpack_require__(248); + + $export($export.P, 'String', { + padStart: function padStart(maxLength /*, fillString = ' ' */){ + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); + } + }); + +/***/ }, +/* 248 */ +/***/ function(module, exports, __webpack_require__) { + + // https://github.com/tc39/proposal-string-pad-start-end + var toLength = __webpack_require__(35) + , repeat = __webpack_require__(85) + , defined = __webpack_require__(33); + + module.exports = function(that, maxLength, fillString, left){ + var S = String(defined(that)) + , stringLength = S.length + , fillStr = fillString === undefined ? ' ' : String(fillString) + , intMaxLength = toLength(maxLength); + if(intMaxLength <= stringLength || fillStr == '')return S; + var fillLen = intMaxLength - stringLength + , stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length)); + if(stringFiller.length > fillLen)stringFiller = stringFiller.slice(0, fillLen); + return left ? stringFiller + S : S + stringFiller; + }; + + +/***/ }, +/* 249 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // https://github.com/tc39/proposal-string-pad-start-end + var $export = __webpack_require__(6) + , $pad = __webpack_require__(248); + + $export($export.P, 'String', { + padEnd: function padEnd(maxLength /*, fillString = ' ' */){ + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); + } + }); + +/***/ }, +/* 250 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // https://github.com/sebmarkbage/ecmascript-string-left-right-trim + __webpack_require__(81)('trimLeft', function($trim){ + return function trimLeft(){ + return $trim(this, 1); + }; + }, 'trimStart'); + +/***/ }, +/* 251 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // https://github.com/sebmarkbage/ecmascript-string-left-right-trim + __webpack_require__(81)('trimRight', function($trim){ + return function trimRight(){ + return $trim(this, 2); + }; + }, 'trimEnd'); + +/***/ }, +/* 252 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // https://tc39.github.io/String.prototype.matchAll/ + var $export = __webpack_require__(6) + , defined = __webpack_require__(33) + , toLength = __webpack_require__(35) + , isRegExp = __webpack_require__(128) + , getFlags = __webpack_require__(188) + , RegExpProto = RegExp.prototype; + + var $RegExpStringIterator = function(regexp, string){ + this._r = regexp; + this._s = string; + }; + + __webpack_require__(136)($RegExpStringIterator, 'RegExp String', function next(){ + var match = this._r.exec(this._s); + return {value: match, done: match === null}; + }); + + $export($export.P, 'String', { + matchAll: function matchAll(regexp){ + defined(this); + if(!isRegExp(regexp))throw TypeError(regexp + ' is not a regexp!'); + var S = String(this) + , flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp) + , rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags); + rx.lastIndex = toLength(regexp.lastIndex); + return new $RegExpStringIterator(rx, S); + } + }); + +/***/ }, +/* 253 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(25)('asyncIterator'); + +/***/ }, +/* 254 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(25)('observable'); + +/***/ }, +/* 255 */ +/***/ function(module, exports, __webpack_require__) { + + // https://github.com/tc39/proposal-object-getownpropertydescriptors + var $export = __webpack_require__(6) + , ownKeys = __webpack_require__(221) + , toIObject = __webpack_require__(30) + , gOPD = __webpack_require__(49) + , createProperty = __webpack_require__(155); + + $export($export.S, 'Object', { + getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object){ + var O = toIObject(object) + , getDesc = gOPD.f + , keys = ownKeys(O) + , result = {} + , i = 0 + , key; + while(keys.length > i)createProperty(result, key = keys[i++], getDesc(O, key)); + return result; + } + }); + +/***/ }, +/* 256 */ +/***/ function(module, exports, __webpack_require__) { + + // https://github.com/tc39/proposal-object-values-entries + var $export = __webpack_require__(6) + , $values = __webpack_require__(257)(false); + + $export($export.S, 'Object', { + values: function values(it){ + return $values(it); + } + }); + +/***/ }, +/* 257 */ +/***/ function(module, exports, __webpack_require__) { + + var getKeys = __webpack_require__(28) + , toIObject = __webpack_require__(30) + , isEnum = __webpack_require__(42).f; + module.exports = function(isEntries){ + return function(it){ + var O = toIObject(it) + , keys = getKeys(O) + , length = keys.length + , i = 0 + , result = [] + , key; + while(length > i)if(isEnum.call(O, key = keys[i++])){ + result.push(isEntries ? [key, O[key]] : O[key]); + } return result; + }; + }; + +/***/ }, +/* 258 */ +/***/ function(module, exports, __webpack_require__) { + + // https://github.com/tc39/proposal-object-values-entries + var $export = __webpack_require__(6) + , $entries = __webpack_require__(257)(true); + + $export($export.S, 'Object', { + entries: function entries(it){ + return $entries(it); + } + }); + +/***/ }, +/* 259 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , toObject = __webpack_require__(56) + , aFunction = __webpack_require__(19) + , $defineProperty = __webpack_require__(9); + + // B.2.2.2 Object.prototype.__defineGetter__(P, getter) + __webpack_require__(4) && $export($export.P + __webpack_require__(260), 'Object', { + __defineGetter__: function __defineGetter__(P, getter){ + $defineProperty.f(toObject(this), P, {get: aFunction(getter), enumerable: true, configurable: true}); + } + }); + +/***/ }, +/* 260 */ +/***/ function(module, exports, __webpack_require__) { + + // Forced replacement prototype accessors methods + module.exports = __webpack_require__(26)|| !__webpack_require__(5)(function(){ + var K = Math.random(); + // In FF throws only define methods + __defineSetter__.call(null, K, function(){ /* empty */}); + delete __webpack_require__(2)[K]; + }); + +/***/ }, +/* 261 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , toObject = __webpack_require__(56) + , aFunction = __webpack_require__(19) + , $defineProperty = __webpack_require__(9); + + // B.2.2.3 Object.prototype.__defineSetter__(P, setter) + __webpack_require__(4) && $export($export.P + __webpack_require__(260), 'Object', { + __defineSetter__: function __defineSetter__(P, setter){ + $defineProperty.f(toObject(this), P, {set: aFunction(setter), enumerable: true, configurable: true}); + } + }); + +/***/ }, +/* 262 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , toObject = __webpack_require__(56) + , toPrimitive = __webpack_require__(14) + , getPrototypeOf = __webpack_require__(57) + , getOwnPropertyDescriptor = __webpack_require__(49).f; + + // B.2.2.4 Object.prototype.__lookupGetter__(P) + __webpack_require__(4) && $export($export.P + __webpack_require__(260), 'Object', { + __lookupGetter__: function __lookupGetter__(P){ + var O = toObject(this) + , K = toPrimitive(P, true) + , D; + do { + if(D = getOwnPropertyDescriptor(O, K))return D.get; + } while(O = getPrototypeOf(O)); + } + }); + +/***/ }, +/* 263 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , toObject = __webpack_require__(56) + , toPrimitive = __webpack_require__(14) + , getPrototypeOf = __webpack_require__(57) + , getOwnPropertyDescriptor = __webpack_require__(49).f; + + // B.2.2.5 Object.prototype.__lookupSetter__(P) + __webpack_require__(4) && $export($export.P + __webpack_require__(260), 'Object', { + __lookupSetter__: function __lookupSetter__(P){ + var O = toObject(this) + , K = toPrimitive(P, true) + , D; + do { + if(D = getOwnPropertyDescriptor(O, K))return D.set; + } while(O = getPrototypeOf(O)); + } + }); + +/***/ }, +/* 264 */ +/***/ function(module, exports, __webpack_require__) { + + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var $export = __webpack_require__(6); + + $export($export.P + $export.R, 'Map', {toJSON: __webpack_require__(265)('Map')}); + +/***/ }, +/* 265 */ +/***/ function(module, exports, __webpack_require__) { + + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var classof = __webpack_require__(73) + , from = __webpack_require__(266); + module.exports = function(NAME){ + return function toJSON(){ + if(classof(this) != NAME)throw TypeError(NAME + "#toJSON isn't generic"); + return from(this); + }; + }; + +/***/ }, +/* 266 */ +/***/ function(module, exports, __webpack_require__) { + + var forOf = __webpack_require__(198); + + module.exports = function(iter, ITERATOR){ + var result = []; + forOf(iter, false, result.push, result, ITERATOR); + return result; + }; + + +/***/ }, +/* 267 */ +/***/ function(module, exports, __webpack_require__) { + + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var $export = __webpack_require__(6); + + $export($export.P + $export.R, 'Set', {toJSON: __webpack_require__(265)('Set')}); + +/***/ }, +/* 268 */ +/***/ function(module, exports, __webpack_require__) { + + // https://github.com/ljharb/proposal-global + var $export = __webpack_require__(6); + + $export($export.S, 'System', {global: __webpack_require__(2)}); + +/***/ }, +/* 269 */ +/***/ function(module, exports, __webpack_require__) { + + // https://github.com/ljharb/proposal-is-error + var $export = __webpack_require__(6) + , cof = __webpack_require__(32); + + $export($export.S, 'Error', { + isError: function isError(it){ + return cof(it) === 'Error'; + } + }); + +/***/ }, +/* 270 */ +/***/ function(module, exports, __webpack_require__) { + + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(6); + + $export($export.S, 'Math', { + iaddh: function iaddh(x0, x1, y0, y1){ + var $x0 = x0 >>> 0 + , $x1 = x1 >>> 0 + , $y0 = y0 >>> 0; + return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0; + } + }); + +/***/ }, +/* 271 */ +/***/ function(module, exports, __webpack_require__) { + + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(6); + + $export($export.S, 'Math', { + isubh: function isubh(x0, x1, y0, y1){ + var $x0 = x0 >>> 0 + , $x1 = x1 >>> 0 + , $y0 = y0 >>> 0; + return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0; + } + }); + +/***/ }, +/* 272 */ +/***/ function(module, exports, __webpack_require__) { + + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(6); + + $export($export.S, 'Math', { + imulh: function imulh(u, v){ + var UINT16 = 0xffff + , $u = +u + , $v = +v + , u0 = $u & UINT16 + , v0 = $v & UINT16 + , u1 = $u >> 16 + , v1 = $v >> 16 + , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); + return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16); + } + }); + +/***/ }, +/* 273 */ +/***/ function(module, exports, __webpack_require__) { + + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(6); + + $export($export.S, 'Math', { + umulh: function umulh(u, v){ + var UINT16 = 0xffff + , $u = +u + , $v = +v + , u0 = $u & UINT16 + , v0 = $v & UINT16 + , u1 = $u >>> 16 + , v1 = $v >>> 16 + , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); + return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16); + } + }); + +/***/ }, +/* 274 */ +/***/ function(module, exports, __webpack_require__) { + + var metadata = __webpack_require__(275) + , anObject = __webpack_require__(10) + , toMetaKey = metadata.key + , ordinaryDefineOwnMetadata = metadata.set; + + metadata.exp({defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey){ + ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey)); + }}); + +/***/ }, +/* 275 */ +/***/ function(module, exports, __webpack_require__) { + + var Map = __webpack_require__(203) + , $export = __webpack_require__(6) + , shared = __webpack_require__(21)('metadata') + , store = shared.store || (shared.store = new (__webpack_require__(207))); + + var getOrCreateMetadataMap = function(target, targetKey, create){ + var targetMetadata = store.get(target); + if(!targetMetadata){ + if(!create)return undefined; + store.set(target, targetMetadata = new Map); + } + var keyMetadata = targetMetadata.get(targetKey); + if(!keyMetadata){ + if(!create)return undefined; + targetMetadata.set(targetKey, keyMetadata = new Map); + } return keyMetadata; + }; + var ordinaryHasOwnMetadata = function(MetadataKey, O, P){ + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? false : metadataMap.has(MetadataKey); + }; + var ordinaryGetOwnMetadata = function(MetadataKey, O, P){ + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey); + }; + var ordinaryDefineOwnMetadata = function(MetadataKey, MetadataValue, O, P){ + getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue); + }; + var ordinaryOwnMetadataKeys = function(target, targetKey){ + var metadataMap = getOrCreateMetadataMap(target, targetKey, false) + , keys = []; + if(metadataMap)metadataMap.forEach(function(_, key){ keys.push(key); }); + return keys; + }; + var toMetaKey = function(it){ + return it === undefined || typeof it == 'symbol' ? it : String(it); + }; + var exp = function(O){ + $export($export.S, 'Reflect', O); + }; + + module.exports = { + store: store, + map: getOrCreateMetadataMap, + has: ordinaryHasOwnMetadata, + get: ordinaryGetOwnMetadata, + set: ordinaryDefineOwnMetadata, + keys: ordinaryOwnMetadataKeys, + key: toMetaKey, + exp: exp + }; + +/***/ }, +/* 276 */ +/***/ function(module, exports, __webpack_require__) { + + var metadata = __webpack_require__(275) + , anObject = __webpack_require__(10) + , toMetaKey = metadata.key + , getOrCreateMetadataMap = metadata.map + , store = metadata.store; + + metadata.exp({deleteMetadata: function deleteMetadata(metadataKey, target /*, targetKey */){ + var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]) + , metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false); + if(metadataMap === undefined || !metadataMap['delete'](metadataKey))return false; + if(metadataMap.size)return true; + var targetMetadata = store.get(target); + targetMetadata['delete'](targetKey); + return !!targetMetadata.size || store['delete'](target); + }}); + +/***/ }, +/* 277 */ +/***/ function(module, exports, __webpack_require__) { + + var metadata = __webpack_require__(275) + , anObject = __webpack_require__(10) + , getPrototypeOf = __webpack_require__(57) + , ordinaryHasOwnMetadata = metadata.has + , ordinaryGetOwnMetadata = metadata.get + , toMetaKey = metadata.key; + + var ordinaryGetMetadata = function(MetadataKey, O, P){ + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if(hasOwn)return ordinaryGetOwnMetadata(MetadataKey, O, P); + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined; + }; + + metadata.exp({getMetadata: function getMetadata(metadataKey, target /*, targetKey */){ + return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); + }}); + +/***/ }, +/* 278 */ +/***/ function(module, exports, __webpack_require__) { + + var Set = __webpack_require__(206) + , from = __webpack_require__(266) + , metadata = __webpack_require__(275) + , anObject = __webpack_require__(10) + , getPrototypeOf = __webpack_require__(57) + , ordinaryOwnMetadataKeys = metadata.keys + , toMetaKey = metadata.key; + + var ordinaryMetadataKeys = function(O, P){ + var oKeys = ordinaryOwnMetadataKeys(O, P) + , parent = getPrototypeOf(O); + if(parent === null)return oKeys; + var pKeys = ordinaryMetadataKeys(parent, P); + return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys; + }; + + metadata.exp({getMetadataKeys: function getMetadataKeys(target /*, targetKey */){ + return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); + }}); + +/***/ }, +/* 279 */ +/***/ function(module, exports, __webpack_require__) { + + var metadata = __webpack_require__(275) + , anObject = __webpack_require__(10) + , ordinaryGetOwnMetadata = metadata.get + , toMetaKey = metadata.key; + + metadata.exp({getOwnMetadata: function getOwnMetadata(metadataKey, target /*, targetKey */){ + return ordinaryGetOwnMetadata(metadataKey, anObject(target) + , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); + }}); + +/***/ }, +/* 280 */ +/***/ function(module, exports, __webpack_require__) { + + var metadata = __webpack_require__(275) + , anObject = __webpack_require__(10) + , ordinaryOwnMetadataKeys = metadata.keys + , toMetaKey = metadata.key; + + metadata.exp({getOwnMetadataKeys: function getOwnMetadataKeys(target /*, targetKey */){ + return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); + }}); + +/***/ }, +/* 281 */ +/***/ function(module, exports, __webpack_require__) { + + var metadata = __webpack_require__(275) + , anObject = __webpack_require__(10) + , getPrototypeOf = __webpack_require__(57) + , ordinaryHasOwnMetadata = metadata.has + , toMetaKey = metadata.key; + + var ordinaryHasMetadata = function(MetadataKey, O, P){ + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if(hasOwn)return true; + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false; + }; + + metadata.exp({hasMetadata: function hasMetadata(metadataKey, target /*, targetKey */){ + return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); + }}); + +/***/ }, +/* 282 */ +/***/ function(module, exports, __webpack_require__) { + + var metadata = __webpack_require__(275) + , anObject = __webpack_require__(10) + , ordinaryHasOwnMetadata = metadata.has + , toMetaKey = metadata.key; + + metadata.exp({hasOwnMetadata: function hasOwnMetadata(metadataKey, target /*, targetKey */){ + return ordinaryHasOwnMetadata(metadataKey, anObject(target) + , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); + }}); + +/***/ }, +/* 283 */ +/***/ function(module, exports, __webpack_require__) { + + var metadata = __webpack_require__(275) + , anObject = __webpack_require__(10) + , aFunction = __webpack_require__(19) + , toMetaKey = metadata.key + , ordinaryDefineOwnMetadata = metadata.set; + + metadata.exp({metadata: function metadata(metadataKey, metadataValue){ + return function decorator(target, targetKey){ + ordinaryDefineOwnMetadata( + metadataKey, metadataValue, + (targetKey !== undefined ? anObject : aFunction)(target), + toMetaKey(targetKey) + ); + }; + }}); + +/***/ }, +/* 284 */ +/***/ function(module, exports, __webpack_require__) { + + // https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask + var $export = __webpack_require__(6) + , microtask = __webpack_require__(201)() + , process = __webpack_require__(2).process + , isNode = __webpack_require__(32)(process) == 'process'; + + $export($export.G, { + asap: function asap(fn){ + var domain = isNode && process.domain; + microtask(domain ? domain.bind(fn) : fn); + } + }); + +/***/ }, +/* 285 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // https://github.com/zenparsing/es-observable + var $export = __webpack_require__(6) + , global = __webpack_require__(2) + , core = __webpack_require__(7) + , microtask = __webpack_require__(201)() + , OBSERVABLE = __webpack_require__(23)('observable') + , aFunction = __webpack_require__(19) + , anObject = __webpack_require__(10) + , anInstance = __webpack_require__(197) + , redefineAll = __webpack_require__(202) + , hide = __webpack_require__(8) + , forOf = __webpack_require__(198) + , RETURN = forOf.RETURN; + + var getMethod = function(fn){ + return fn == null ? undefined : aFunction(fn); + }; + + var cleanupSubscription = function(subscription){ + var cleanup = subscription._c; + if(cleanup){ + subscription._c = undefined; + cleanup(); + } + }; + + var subscriptionClosed = function(subscription){ + return subscription._o === undefined; + }; + + var closeSubscription = function(subscription){ + if(!subscriptionClosed(subscription)){ + subscription._o = undefined; + cleanupSubscription(subscription); + } + }; + + var Subscription = function(observer, subscriber){ + anObject(observer); + this._c = undefined; + this._o = observer; + observer = new SubscriptionObserver(this); + try { + var cleanup = subscriber(observer) + , subscription = cleanup; + if(cleanup != null){ + if(typeof cleanup.unsubscribe === 'function')cleanup = function(){ subscription.unsubscribe(); }; + else aFunction(cleanup); + this._c = cleanup; + } + } catch(e){ + observer.error(e); + return; + } if(subscriptionClosed(this))cleanupSubscription(this); + }; + + Subscription.prototype = redefineAll({}, { + unsubscribe: function unsubscribe(){ closeSubscription(this); } + }); + + var SubscriptionObserver = function(subscription){ + this._s = subscription; + }; + + SubscriptionObserver.prototype = redefineAll({}, { + next: function next(value){ + var subscription = this._s; + if(!subscriptionClosed(subscription)){ + var observer = subscription._o; + try { + var m = getMethod(observer.next); + if(m)return m.call(observer, value); + } catch(e){ + try { + closeSubscription(subscription); + } finally { + throw e; + } + } + } + }, + error: function error(value){ + var subscription = this._s; + if(subscriptionClosed(subscription))throw value; + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.error); + if(!m)throw value; + value = m.call(observer, value); + } catch(e){ + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } cleanupSubscription(subscription); + return value; + }, + complete: function complete(value){ + var subscription = this._s; + if(!subscriptionClosed(subscription)){ + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.complete); + value = m ? m.call(observer, value) : undefined; + } catch(e){ + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } cleanupSubscription(subscription); + return value; + } + } + }); + + var $Observable = function Observable(subscriber){ + anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber); + }; + + redefineAll($Observable.prototype, { + subscribe: function subscribe(observer){ + return new Subscription(observer, this._f); + }, + forEach: function forEach(fn){ + var that = this; + return new (core.Promise || global.Promise)(function(resolve, reject){ + aFunction(fn); + var subscription = that.subscribe({ + next : function(value){ + try { + return fn(value); + } catch(e){ + reject(e); + subscription.unsubscribe(); + } + }, + error: reject, + complete: resolve + }); + }); + } + }); + + redefineAll($Observable, { + from: function from(x){ + var C = typeof this === 'function' ? this : $Observable; + var method = getMethod(anObject(x)[OBSERVABLE]); + if(method){ + var observable = anObject(method.call(x)); + return observable.constructor === C ? observable : new C(function(observer){ + return observable.subscribe(observer); + }); + } + return new C(function(observer){ + var done = false; + microtask(function(){ + if(!done){ + try { + if(forOf(x, false, function(it){ + observer.next(it); + if(done)return RETURN; + }) === RETURN)return; + } catch(e){ + if(done)throw e; + observer.error(e); + return; + } observer.complete(); + } + }); + return function(){ done = true; }; + }); + }, + of: function of(){ + for(var i = 0, l = arguments.length, items = Array(l); i < l;)items[i] = arguments[i++]; + return new (typeof this === 'function' ? this : $Observable)(function(observer){ + var done = false; + microtask(function(){ + if(!done){ + for(var i = 0; i < items.length; ++i){ + observer.next(items[i]); + if(done)return; + } observer.complete(); + } + }); + return function(){ done = true; }; + }); + } + }); + + hide($Observable.prototype, OBSERVABLE, function(){ return this; }); + + $export($export.G, {Observable: $Observable}); + + __webpack_require__(186)('Observable'); + +/***/ }, +/* 286 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6) + , $task = __webpack_require__(200); + $export($export.G + $export.B, { + setImmediate: $task.set, + clearImmediate: $task.clear + }); + +/***/ }, +/* 287 */ +/***/ function(module, exports, __webpack_require__) { + + var $iterators = __webpack_require__(183) + , redefine = __webpack_require__(16) + , global = __webpack_require__(2) + , hide = __webpack_require__(8) + , Iterators = __webpack_require__(135) + , wks = __webpack_require__(23) + , ITERATOR = wks('iterator') + , TO_STRING_TAG = wks('toStringTag') + , ArrayValues = Iterators.Array; + + for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){ + var NAME = collections[i] + , Collection = global[NAME] + , proto = Collection && Collection.prototype + , key; + if(proto){ + if(!proto[ITERATOR])hide(proto, ITERATOR, ArrayValues); + if(!proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = ArrayValues; + for(key in $iterators)if(!proto[key])redefine(proto, key, $iterators[key], true); + } + } + +/***/ }, +/* 288 */ +/***/ function(module, exports, __webpack_require__) { + + // ie9- setTimeout & setInterval additional parameters fix + var global = __webpack_require__(2) + , $export = __webpack_require__(6) + , invoke = __webpack_require__(76) + , partial = __webpack_require__(289) + , navigator = global.navigator + , MSIE = !!navigator && /MSIE .\./.test(navigator.userAgent); // <- dirty ie9- check + var wrap = function(set){ + return MSIE ? function(fn, time /*, ...args */){ + return set(invoke( + partial, + [].slice.call(arguments, 2), + typeof fn == 'function' ? fn : Function(fn) + ), time); + } : set; + }; + $export($export.G + $export.B + $export.F * MSIE, { + setTimeout: wrap(global.setTimeout), + setInterval: wrap(global.setInterval) + }); + +/***/ }, +/* 289 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var path = __webpack_require__(290) + , invoke = __webpack_require__(76) + , aFunction = __webpack_require__(19); + module.exports = function(/* ...pargs */){ + var fn = aFunction(this) + , length = arguments.length + , pargs = Array(length) + , i = 0 + , _ = path._ + , holder = false; + while(length > i)if((pargs[i] = arguments[i++]) === _)holder = true; + return function(/* ...args */){ + var that = this + , aLen = arguments.length + , j = 0, k = 0, args; + if(!holder && !aLen)return invoke(fn, pargs, that); + args = pargs.slice(); + if(holder)for(;length > j; j++)if(args[j] === _)args[j] = arguments[k++]; + while(aLen > k)args.push(arguments[k++]); + return invoke(fn, args, that); + }; + }; + +/***/ }, +/* 290 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = __webpack_require__(2); + +/***/ }, +/* 291 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var ctx = __webpack_require__(18) + , $export = __webpack_require__(6) + , createDesc = __webpack_require__(15) + , assign = __webpack_require__(67) + , create = __webpack_require__(44) + , getPrototypeOf = __webpack_require__(57) + , getKeys = __webpack_require__(28) + , dP = __webpack_require__(9) + , keyOf = __webpack_require__(27) + , aFunction = __webpack_require__(19) + , forOf = __webpack_require__(198) + , isIterable = __webpack_require__(292) + , $iterCreate = __webpack_require__(136) + , step = __webpack_require__(184) + , isObject = __webpack_require__(11) + , toIObject = __webpack_require__(30) + , DESCRIPTORS = __webpack_require__(4) + , has = __webpack_require__(3); + + // 0 -> Dict.forEach + // 1 -> Dict.map + // 2 -> Dict.filter + // 3 -> Dict.some + // 4 -> Dict.every + // 5 -> Dict.find + // 6 -> Dict.findKey + // 7 -> Dict.mapPairs + var createDictMethod = function(TYPE){ + var IS_MAP = TYPE == 1 + , IS_EVERY = TYPE == 4; + return function(object, callbackfn, that /* = undefined */){ + var f = ctx(callbackfn, that, 3) + , O = toIObject(object) + , result = IS_MAP || TYPE == 7 || TYPE == 2 + ? new (typeof this == 'function' ? this : Dict) : undefined + , key, val, res; + for(key in O)if(has(O, key)){ + val = O[key]; + res = f(val, key, object); + if(TYPE){ + if(IS_MAP)result[key] = res; // map + else if(res)switch(TYPE){ + case 2: result[key] = val; break; // filter + case 3: return true; // some + case 5: return val; // find + case 6: return key; // findKey + case 7: result[res[0]] = res[1]; // mapPairs + } else if(IS_EVERY)return false; // every + } + } + return TYPE == 3 || IS_EVERY ? IS_EVERY : result; + }; + }; + var findKey = createDictMethod(6); + + var createDictIter = function(kind){ + return function(it){ + return new DictIterator(it, kind); + }; + }; + var DictIterator = function(iterated, kind){ + this._t = toIObject(iterated); // target + this._a = getKeys(iterated); // keys + this._i = 0; // next index + this._k = kind; // kind + }; + $iterCreate(DictIterator, 'Dict', function(){ + var that = this + , O = that._t + , keys = that._a + , kind = that._k + , key; + do { + if(that._i >= keys.length){ + that._t = undefined; + return step(1); + } + } while(!has(O, key = keys[that._i++])); + if(kind == 'keys' )return step(0, key); + if(kind == 'values')return step(0, O[key]); + return step(0, [key, O[key]]); + }); + + function Dict(iterable){ + var dict = create(null); + if(iterable != undefined){ + if(isIterable(iterable)){ + forOf(iterable, true, function(key, value){ + dict[key] = value; + }); + } else assign(dict, iterable); + } + return dict; + } + Dict.prototype = null; + + function reduce(object, mapfn, init){ + aFunction(mapfn); + var O = toIObject(object) + , keys = getKeys(O) + , length = keys.length + , i = 0 + , memo, key; + if(arguments.length < 3){ + if(!length)throw TypeError('Reduce of empty object with no initial value'); + memo = O[keys[i++]]; + } else memo = Object(init); + while(length > i)if(has(O, key = keys[i++])){ + memo = mapfn(memo, O[key], key, object); + } + return memo; + } + + function includes(object, el){ + return (el == el ? keyOf(object, el) : findKey(object, function(it){ + return it != it; + })) !== undefined; + } + + function get(object, key){ + if(has(object, key))return object[key]; + } + function set(object, key, value){ + if(DESCRIPTORS && key in Object)dP.f(object, key, createDesc(0, value)); + else object[key] = value; + return object; + } + + function isDict(it){ + return isObject(it) && getPrototypeOf(it) === Dict.prototype; + } + + $export($export.G + $export.F, {Dict: Dict}); + + $export($export.S, 'Dict', { + keys: createDictIter('keys'), + values: createDictIter('values'), + entries: createDictIter('entries'), + forEach: createDictMethod(0), + map: createDictMethod(1), + filter: createDictMethod(2), + some: createDictMethod(3), + every: createDictMethod(4), + find: createDictMethod(5), + findKey: findKey, + mapPairs: createDictMethod(7), + reduce: reduce, + keyOf: keyOf, + includes: includes, + has: has, + get: get, + set: set, + isDict: isDict + }); + +/***/ }, +/* 292 */ +/***/ function(module, exports, __webpack_require__) { + + var classof = __webpack_require__(73) + , ITERATOR = __webpack_require__(23)('iterator') + , Iterators = __webpack_require__(135); + module.exports = __webpack_require__(7).isIterable = function(it){ + var O = Object(it); + return O[ITERATOR] !== undefined + || '@@iterator' in O + || Iterators.hasOwnProperty(classof(O)); + }; + +/***/ }, +/* 293 */ +/***/ function(module, exports, __webpack_require__) { + + var anObject = __webpack_require__(10) + , get = __webpack_require__(156); + module.exports = __webpack_require__(7).getIterator = function(it){ + var iterFn = get(it); + if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!'); + return anObject(iterFn.call(it)); + }; + +/***/ }, +/* 294 */ +/***/ function(module, exports, __webpack_require__) { + + var global = __webpack_require__(2) + , core = __webpack_require__(7) + , $export = __webpack_require__(6) + , partial = __webpack_require__(289); + // https://esdiscuss.org/topic/promise-returning-delay-function + $export($export.G + $export.F, { + delay: function delay(time){ + return new (core.Promise || global.Promise)(function(resolve){ + setTimeout(partial.call(resolve, true), time); + }); + } + }); + +/***/ }, +/* 295 */ +/***/ function(module, exports, __webpack_require__) { + + var path = __webpack_require__(290) + , $export = __webpack_require__(6); + + // Placeholder + __webpack_require__(7)._ = path._ = path._ || {}; + + $export($export.P + $export.F, 'Function', {part: __webpack_require__(289)}); + +/***/ }, +/* 296 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6); + + $export($export.S + $export.F, 'Object', {isObject: __webpack_require__(11)}); + +/***/ }, +/* 297 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6); + + $export($export.S + $export.F, 'Object', {classof: __webpack_require__(73)}); + +/***/ }, +/* 298 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6) + , define = __webpack_require__(299); + + $export($export.S + $export.F, 'Object', {define: define}); + +/***/ }, +/* 299 */ +/***/ function(module, exports, __webpack_require__) { + + var dP = __webpack_require__(9) + , gOPD = __webpack_require__(49) + , ownKeys = __webpack_require__(221) + , toIObject = __webpack_require__(30); + + module.exports = function define(target, mixin){ + var keys = ownKeys(toIObject(mixin)) + , length = keys.length + , i = 0, key; + while(length > i)dP.f(target, key = keys[i++], gOPD.f(mixin, key)); + return target; + }; + +/***/ }, +/* 300 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6) + , define = __webpack_require__(299) + , create = __webpack_require__(44); + + $export($export.S + $export.F, 'Object', { + make: function(proto, mixin){ + return define(create(proto), mixin); + } + }); + +/***/ }, +/* 301 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + __webpack_require__(134)(Number, 'Number', function(iterated){ + this._l = +iterated; + this._i = 0; + }, function(){ + var i = this._i++ + , done = !(i < this._l); + return {done: done, value: done ? undefined : i}; + }); + +/***/ }, +/* 302 */ +/***/ function(module, exports, __webpack_require__) { + + // https://github.com/benjamingr/RexExp.escape + var $export = __webpack_require__(6) + , $re = __webpack_require__(303)(/[\\^$*+?.()|[\]{}]/g, '\\$&'); + + $export($export.S, 'RegExp', {escape: function escape(it){ return $re(it); }}); + + +/***/ }, +/* 303 */ +/***/ function(module, exports) { + + module.exports = function(regExp, replace){ + var replacer = replace === Object(replace) ? function(part){ + return replace[part]; + } : replace; + return function(it){ + return String(it).replace(regExp, replacer); + }; + }; + +/***/ }, +/* 304 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6); + var $re = __webpack_require__(303)(/[&<>"']/g, { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }); + + $export($export.P + $export.F, 'String', {escapeHTML: function escapeHTML(){ return $re(this); }}); + +/***/ }, +/* 305 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6); + var $re = __webpack_require__(303)(/&(?:amp|lt|gt|quot|apos);/g, { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" + }); + + $export($export.P + $export.F, 'String', {unescapeHTML: function unescapeHTML(){ return $re(this); }}); + +/***/ } +/******/ ]); +// CommonJS export +if(typeof module != 'undefined' && module.exports)module.exports = __e; +// RequireJS export +else if(typeof define == 'function' && define.amd)define(function(){return __e}); +// Export to global object +else __g.core = __e; +}(1, 1); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/client/core.min.js b/pitfall/pdfkit/node_modules/core-js/client/core.min.js new file mode 100644 index 00000000..4c43b467 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/client/core.min.js @@ -0,0 +1,10 @@ +/** + * core-js 2.4.1 + * https://github.com/zloirock/core-js + * License: http://rock.mit-license.org + * © 2016 Denis Pushkarev + */ +!function(a,b,c){"use strict";!function(a){function __webpack_require__(c){if(b[c])return b[c].exports;var d=b[c]={exports:{},id:c,loaded:!1};return a[c].call(d.exports,d,d.exports,__webpack_require__),d.loaded=!0,d.exports}var b={};return __webpack_require__.m=a,__webpack_require__.c=b,__webpack_require__.p="",__webpack_require__(0)}([function(a,b,c){c(1),c(50),c(51),c(52),c(54),c(55),c(58),c(59),c(60),c(61),c(62),c(63),c(64),c(65),c(66),c(68),c(70),c(72),c(74),c(77),c(78),c(79),c(83),c(86),c(87),c(88),c(89),c(91),c(92),c(93),c(94),c(95),c(97),c(99),c(100),c(101),c(103),c(104),c(105),c(107),c(108),c(109),c(111),c(112),c(113),c(114),c(115),c(116),c(117),c(118),c(119),c(120),c(121),c(122),c(123),c(124),c(126),c(130),c(131),c(132),c(133),c(137),c(139),c(140),c(141),c(142),c(143),c(144),c(145),c(146),c(147),c(148),c(149),c(150),c(151),c(152),c(158),c(159),c(161),c(162),c(163),c(167),c(168),c(169),c(170),c(171),c(173),c(174),c(175),c(176),c(179),c(181),c(182),c(183),c(185),c(187),c(189),c(190),c(191),c(193),c(194),c(195),c(196),c(203),c(206),c(207),c(209),c(210),c(211),c(212),c(213),c(214),c(215),c(216),c(217),c(218),c(219),c(220),c(222),c(223),c(224),c(225),c(226),c(227),c(228),c(229),c(231),c(234),c(235),c(237),c(238),c(239),c(240),c(241),c(242),c(243),c(244),c(245),c(246),c(247),c(249),c(250),c(251),c(252),c(253),c(254),c(255),c(256),c(258),c(259),c(261),c(262),c(263),c(264),c(267),c(268),c(269),c(270),c(271),c(272),c(273),c(274),c(276),c(277),c(278),c(279),c(280),c(281),c(282),c(283),c(284),c(285),c(286),c(287),c(288),c(291),c(156),c(293),c(292),c(294),c(295),c(296),c(297),c(298),c(300),c(301),c(302),c(304),a.exports=c(305)},function(a,b,d){var e=d(2),f=d(3),g=d(4),h=d(6),i=d(16),j=d(20).KEY,k=d(5),l=d(21),m=d(22),n=d(17),o=d(23),p=d(24),q=d(25),r=d(27),s=d(40),t=d(43),u=d(10),v=d(30),w=d(14),x=d(15),y=d(44),z=d(47),A=d(49),B=d(9),C=d(28),D=A.f,E=B.f,F=z.f,G=e.Symbol,H=e.JSON,I=H&&H.stringify,J="prototype",K=o("_hidden"),L=o("toPrimitive"),M={}.propertyIsEnumerable,N=l("symbol-registry"),O=l("symbols"),P=l("op-symbols"),Q=Object[J],R="function"==typeof G,S=e.QObject,T=!S||!S[J]||!S[J].findChild,U=g&&k(function(){return 7!=y(E({},"a",{get:function(){return E(this,"a",{value:7}).a}})).a})?function(a,b,c){var d=D(Q,b);d&&delete Q[b],E(a,b,c),d&&a!==Q&&E(Q,b,d)}:E,V=function(a){var b=O[a]=y(G[J]);return b._k=a,b},W=R&&"symbol"==typeof G.iterator?function(a){return"symbol"==typeof a}:function(a){return a instanceof G},X=function defineProperty(a,b,c){return a===Q&&X(P,b,c),u(a),b=w(b,!0),u(c),f(O,b)?(c.enumerable?(f(a,K)&&a[K][b]&&(a[K][b]=!1),c=y(c,{enumerable:x(0,!1)})):(f(a,K)||E(a,K,x(1,{})),a[K][b]=!0),U(a,b,c)):E(a,b,c)},Y=function defineProperties(a,b){u(a);for(var c,d=s(b=v(b)),e=0,f=d.length;f>e;)X(a,c=d[e++],b[c]);return a},Z=function create(a,b){return b===c?y(a):Y(y(a),b)},$=function propertyIsEnumerable(a){var b=M.call(this,a=w(a,!0));return!(this===Q&&f(O,a)&&!f(P,a))&&(!(b||!f(this,a)||!f(O,a)||f(this,K)&&this[K][a])||b)},_=function getOwnPropertyDescriptor(a,b){if(a=v(a),b=w(b,!0),a!==Q||!f(O,b)||f(P,b)){var c=D(a,b);return!c||!f(O,b)||f(a,K)&&a[K][b]||(c.enumerable=!0),c}},aa=function getOwnPropertyNames(a){for(var b,c=F(v(a)),d=[],e=0;c.length>e;)f(O,b=c[e++])||b==K||b==j||d.push(b);return d},ba=function getOwnPropertySymbols(a){for(var b,c=a===Q,d=F(c?P:v(a)),e=[],g=0;d.length>g;)!f(O,b=d[g++])||c&&!f(Q,b)||e.push(O[b]);return e};R||(G=function Symbol(){if(this instanceof G)throw TypeError("Symbol is not a constructor!");var a=n(arguments.length>0?arguments[0]:c),b=function(c){this===Q&&b.call(P,c),f(this,K)&&f(this[K],a)&&(this[K][a]=!1),U(this,a,x(1,c))};return g&&T&&U(Q,a,{configurable:!0,set:b}),V(a)},i(G[J],"toString",function toString(){return this._k}),A.f=_,B.f=X,d(48).f=z.f=aa,d(42).f=$,d(41).f=ba,g&&!d(26)&&i(Q,"propertyIsEnumerable",$,!0),p.f=function(a){return V(o(a))}),h(h.G+h.W+h.F*!R,{Symbol:G});for(var ca="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),da=0;ca.length>da;)o(ca[da++]);for(var ca=C(o.store),da=0;ca.length>da;)q(ca[da++]);h(h.S+h.F*!R,"Symbol",{"for":function(a){return f(N,a+="")?N[a]:N[a]=G(a)},keyFor:function keyFor(a){if(W(a))return r(N,a);throw TypeError(a+" is not a symbol!")},useSetter:function(){T=!0},useSimple:function(){T=!1}}),h(h.S+h.F*!R,"Object",{create:Z,defineProperty:X,defineProperties:Y,getOwnPropertyDescriptor:_,getOwnPropertyNames:aa,getOwnPropertySymbols:ba}),H&&h(h.S+h.F*(!R||k(function(){var a=G();return"[null]"!=I([a])||"{}"!=I({a:a})||"{}"!=I(Object(a))})),"JSON",{stringify:function stringify(a){if(a!==c&&!W(a)){for(var b,d,e=[a],f=1;arguments.length>f;)e.push(arguments[f++]);return b=e[1],"function"==typeof b&&(d=b),!d&&t(b)||(b=function(a,b){if(d&&(b=d.call(this,a,b)),!W(b))return b}),e[1]=b,I.apply(H,e)}}}),G[J][L]||d(8)(G[J],L,G[J].valueOf),m(G,"Symbol"),m(Math,"Math",!0),m(e.JSON,"JSON",!0)},function(a,c){var d=a.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof b&&(b=d)},function(a,b){var c={}.hasOwnProperty;a.exports=function(a,b){return c.call(a,b)}},function(a,b,c){a.exports=!c(5)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(a,b){a.exports=function(a){try{return!!a()}catch(b){return!0}}},function(a,b,d){var e=d(2),f=d(7),g=d(8),h=d(16),i=d(18),j="prototype",k=function(a,b,d){var l,m,n,o,p=a&k.F,q=a&k.G,r=a&k.S,s=a&k.P,t=a&k.B,u=q?e:r?e[b]||(e[b]={}):(e[b]||{})[j],v=q?f:f[b]||(f[b]={}),w=v[j]||(v[j]={});q&&(d=b);for(l in d)m=!p&&u&&u[l]!==c,n=(m?u:d)[l],o=t&&m?i(n,e):s&&"function"==typeof n?i(Function.call,n):n,u&&h(u,l,n,a&k.U),v[l]!=n&&g(v,l,o),s&&w[l]!=n&&(w[l]=n)};e.core=f,k.F=1,k.G=2,k.S=4,k.P=8,k.B=16,k.W=32,k.U=64,k.R=128,a.exports=k},function(b,c){var d=b.exports={version:"2.4.0"};"number"==typeof a&&(a=d)},function(a,b,c){var d=c(9),e=c(15);a.exports=c(4)?function(a,b,c){return d.f(a,b,e(1,c))}:function(a,b,c){return a[b]=c,a}},function(a,b,c){var d=c(10),e=c(12),f=c(14),g=Object.defineProperty;b.f=c(4)?Object.defineProperty:function defineProperty(a,b,c){if(d(a),b=f(b,!0),d(c),e)try{return g(a,b,c)}catch(h){}if("get"in c||"set"in c)throw TypeError("Accessors not supported!");return"value"in c&&(a[b]=c.value),a}},function(a,b,c){var d=c(11);a.exports=function(a){if(!d(a))throw TypeError(a+" is not an object!");return a}},function(a,b){a.exports=function(a){return"object"==typeof a?null!==a:"function"==typeof a}},function(a,b,c){a.exports=!c(4)&&!c(5)(function(){return 7!=Object.defineProperty(c(13)("div"),"a",{get:function(){return 7}}).a})},function(a,b,c){var d=c(11),e=c(2).document,f=d(e)&&d(e.createElement);a.exports=function(a){return f?e.createElement(a):{}}},function(a,b,c){var d=c(11);a.exports=function(a,b){if(!d(a))return a;var c,e;if(b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a)))return e;if("function"==typeof(c=a.valueOf)&&!d(e=c.call(a)))return e;if(!b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a)))return e;throw TypeError("Can't convert object to primitive value")}},function(a,b){a.exports=function(a,b){return{enumerable:!(1&a),configurable:!(2&a),writable:!(4&a),value:b}}},function(a,b,c){var d=c(2),e=c(8),f=c(3),g=c(17)("src"),h="toString",i=Function[h],j=(""+i).split(h);c(7).inspectSource=function(a){return i.call(a)},(a.exports=function(a,b,c,h){var i="function"==typeof c;i&&(f(c,"name")||e(c,"name",b)),a[b]!==c&&(i&&(f(c,g)||e(c,g,a[b]?""+a[b]:j.join(String(b)))),a===d?a[b]=c:h?a[b]?a[b]=c:e(a,b,c):(delete a[b],e(a,b,c)))})(Function.prototype,h,function toString(){return"function"==typeof this&&this[g]||i.call(this)})},function(a,b){var d=0,e=Math.random();a.exports=function(a){return"Symbol(".concat(a===c?"":a,")_",(++d+e).toString(36))}},function(a,b,d){var e=d(19);a.exports=function(a,b,d){if(e(a),b===c)return a;switch(d){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}}},function(a,b){a.exports=function(a){if("function"!=typeof a)throw TypeError(a+" is not a function!");return a}},function(a,b,c){var d=c(17)("meta"),e=c(11),f=c(3),g=c(9).f,h=0,i=Object.isExtensible||function(){return!0},j=!c(5)(function(){return i(Object.preventExtensions({}))}),k=function(a){g(a,d,{value:{i:"O"+ ++h,w:{}}})},l=function(a,b){if(!e(a))return"symbol"==typeof a?a:("string"==typeof a?"S":"P")+a;if(!f(a,d)){if(!i(a))return"F";if(!b)return"E";k(a)}return a[d].i},m=function(a,b){if(!f(a,d)){if(!i(a))return!0;if(!b)return!1;k(a)}return a[d].w},n=function(a){return j&&o.NEED&&i(a)&&!f(a,d)&&k(a),a},o=a.exports={KEY:d,NEED:!1,fastKey:l,getWeak:m,onFreeze:n}},function(a,b,c){var d=c(2),e="__core-js_shared__",f=d[e]||(d[e]={});a.exports=function(a){return f[a]||(f[a]={})}},function(a,b,c){var d=c(9).f,e=c(3),f=c(23)("toStringTag");a.exports=function(a,b,c){a&&!e(a=c?a:a.prototype,f)&&d(a,f,{configurable:!0,value:b})}},function(a,b,c){var d=c(21)("wks"),e=c(17),f=c(2).Symbol,g="function"==typeof f,h=a.exports=function(a){return d[a]||(d[a]=g&&f[a]||(g?f:e)("Symbol."+a))};h.store=d},function(a,b,c){b.f=c(23)},function(a,b,c){var d=c(2),e=c(7),f=c(26),g=c(24),h=c(9).f;a.exports=function(a){var b=e.Symbol||(e.Symbol=f?{}:d.Symbol||{});"_"==a.charAt(0)||a in b||h(b,a,{value:g.f(a)})}},function(a,b){a.exports=!1},function(a,b,c){var d=c(28),e=c(30);a.exports=function(a,b){for(var c,f=e(a),g=d(f),h=g.length,i=0;h>i;)if(f[c=g[i++]]===b)return c}},function(a,b,c){var d=c(29),e=c(39);a.exports=Object.keys||function keys(a){return d(a,e)}},function(a,b,c){var d=c(3),e=c(30),f=c(34)(!1),g=c(38)("IE_PROTO");a.exports=function(a,b){var c,h=e(a),i=0,j=[];for(c in h)c!=g&&d(h,c)&&j.push(c);for(;b.length>i;)d(h,c=b[i++])&&(~f(j,c)||j.push(c));return j}},function(a,b,c){var d=c(31),e=c(33);a.exports=function(a){return d(e(a))}},function(a,b,c){var d=c(32);a.exports=Object("z").propertyIsEnumerable(0)?Object:function(a){return"String"==d(a)?a.split(""):Object(a)}},function(a,b){var c={}.toString;a.exports=function(a){return c.call(a).slice(8,-1)}},function(a,b){a.exports=function(a){if(a==c)throw TypeError("Can't call method on "+a);return a}},function(a,b,c){var d=c(30),e=c(35),f=c(37);a.exports=function(a){return function(b,c,g){var h,i=d(b),j=e(i.length),k=f(g,j);if(a&&c!=c){for(;j>k;)if(h=i[k++],h!=h)return!0}else for(;j>k;k++)if((a||k in i)&&i[k]===c)return a||k||0;return!a&&-1}}},function(a,b,c){var d=c(36),e=Math.min;a.exports=function(a){return a>0?e(d(a),9007199254740991):0}},function(a,b){var c=Math.ceil,d=Math.floor;a.exports=function(a){return isNaN(a=+a)?0:(a>0?d:c)(a)}},function(a,b,c){var d=c(36),e=Math.max,f=Math.min;a.exports=function(a,b){return a=d(a),a<0?e(a+b,0):f(a,b)}},function(a,b,c){var d=c(21)("keys"),e=c(17);a.exports=function(a){return d[a]||(d[a]=e(a))}},function(a,b){a.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(a,b,c){var d=c(28),e=c(41),f=c(42);a.exports=function(a){var b=d(a),c=e.f;if(c)for(var g,h=c(a),i=f.f,j=0;h.length>j;)i.call(a,g=h[j++])&&b.push(g);return b}},function(a,b){b.f=Object.getOwnPropertySymbols},function(a,b){b.f={}.propertyIsEnumerable},function(a,b,c){var d=c(32);a.exports=Array.isArray||function isArray(a){return"Array"==d(a)}},function(a,b,d){var e=d(10),f=d(45),g=d(39),h=d(38)("IE_PROTO"),i=function(){},j="prototype",k=function(){var a,b=d(13)("iframe"),c=g.length,e="<",f=">";for(b.style.display="none",d(46).appendChild(b),b.src="javascript:",a=b.contentWindow.document,a.open(),a.write(e+"script"+f+"document.F=Object"+e+"/script"+f),a.close(),k=a.F;c--;)delete k[j][g[c]];return k()};a.exports=Object.create||function create(a,b){var d;return null!==a?(i[j]=e(a),d=new i,i[j]=null,d[h]=a):d=k(),b===c?d:f(d,b)}},function(a,b,c){var d=c(9),e=c(10),f=c(28);a.exports=c(4)?Object.defineProperties:function defineProperties(a,b){e(a);for(var c,g=f(b),h=g.length,i=0;h>i;)d.f(a,c=g[i++],b[c]);return a}},function(a,b,c){a.exports=c(2).document&&document.documentElement},function(a,b,c){var d=c(30),e=c(48).f,f={}.toString,g="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],h=function(a){try{return e(a)}catch(b){return g.slice()}};a.exports.f=function getOwnPropertyNames(a){return g&&"[object Window]"==f.call(a)?h(a):e(d(a))}},function(a,b,c){var d=c(29),e=c(39).concat("length","prototype");b.f=Object.getOwnPropertyNames||function getOwnPropertyNames(a){return d(a,e)}},function(a,b,c){var d=c(42),e=c(15),f=c(30),g=c(14),h=c(3),i=c(12),j=Object.getOwnPropertyDescriptor;b.f=c(4)?j:function getOwnPropertyDescriptor(a,b){if(a=f(a),b=g(b,!0),i)try{return j(a,b)}catch(c){}if(h(a,b))return e(!d.f.call(a,b),a[b])}},function(a,b,c){var d=c(6);d(d.S+d.F*!c(4),"Object",{defineProperty:c(9).f})},function(a,b,c){var d=c(6);d(d.S+d.F*!c(4),"Object",{defineProperties:c(45)})},function(a,b,c){var d=c(30),e=c(49).f;c(53)("getOwnPropertyDescriptor",function(){return function getOwnPropertyDescriptor(a,b){return e(d(a),b)}})},function(a,b,c){var d=c(6),e=c(7),f=c(5);a.exports=function(a,b){var c=(e.Object||{})[a]||Object[a],g={};g[a]=b(c),d(d.S+d.F*f(function(){c(1)}),"Object",g)}},function(a,b,c){var d=c(6);d(d.S,"Object",{create:c(44)})},function(a,b,c){var d=c(56),e=c(57);c(53)("getPrototypeOf",function(){return function getPrototypeOf(a){return e(d(a))}})},function(a,b,c){var d=c(33);a.exports=function(a){return Object(d(a))}},function(a,b,c){var d=c(3),e=c(56),f=c(38)("IE_PROTO"),g=Object.prototype;a.exports=Object.getPrototypeOf||function(a){return a=e(a),d(a,f)?a[f]:"function"==typeof a.constructor&&a instanceof a.constructor?a.constructor.prototype:a instanceof Object?g:null}},function(a,b,c){var d=c(56),e=c(28);c(53)("keys",function(){return function keys(a){return e(d(a))}})},function(a,b,c){c(53)("getOwnPropertyNames",function(){return c(47).f})},function(a,b,c){var d=c(11),e=c(20).onFreeze;c(53)("freeze",function(a){return function freeze(b){return a&&d(b)?a(e(b)):b}})},function(a,b,c){var d=c(11),e=c(20).onFreeze;c(53)("seal",function(a){return function seal(b){return a&&d(b)?a(e(b)):b}})},function(a,b,c){var d=c(11),e=c(20).onFreeze;c(53)("preventExtensions",function(a){return function preventExtensions(b){return a&&d(b)?a(e(b)):b}})},function(a,b,c){var d=c(11);c(53)("isFrozen",function(a){return function isFrozen(b){return!d(b)||!!a&&a(b)}})},function(a,b,c){var d=c(11);c(53)("isSealed",function(a){return function isSealed(b){return!d(b)||!!a&&a(b)}})},function(a,b,c){var d=c(11);c(53)("isExtensible",function(a){return function isExtensible(b){return!!d(b)&&(!a||a(b))}})},function(a,b,c){var d=c(6);d(d.S+d.F,"Object",{assign:c(67)})},function(a,b,c){var d=c(28),e=c(41),f=c(42),g=c(56),h=c(31),i=Object.assign;a.exports=!i||c(5)(function(){var a={},b={},c=Symbol(),d="abcdefghijklmnopqrst";return a[c]=7,d.split("").forEach(function(a){b[a]=a}),7!=i({},a)[c]||Object.keys(i({},b)).join("")!=d})?function assign(a,b){for(var c=g(a),i=arguments.length,j=1,k=e.f,l=f.f;i>j;)for(var m,n=h(arguments[j++]),o=k?d(n).concat(k(n)):d(n),p=o.length,q=0;p>q;)l.call(n,m=o[q++])&&(c[m]=n[m]);return c}:i},function(a,b,c){var d=c(6);d(d.S,"Object",{is:c(69)})},function(a,b){a.exports=Object.is||function is(a,b){return a===b?0!==a||1/a===1/b:a!=a&&b!=b}},function(a,b,c){var d=c(6);d(d.S,"Object",{setPrototypeOf:c(71).set})},function(a,b,d){var e=d(11),f=d(10),g=function(a,b){if(f(a),!e(b)&&null!==b)throw TypeError(b+": can't set as prototype!")};a.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(a,b,c){try{c=d(18)(Function.call,d(49).f(Object.prototype,"__proto__").set,2),c(a,[]),b=!(a instanceof Array)}catch(e){b=!0}return function setPrototypeOf(a,d){return g(a,d),b?a.__proto__=d:c(a,d),a}}({},!1):c),check:g}},function(a,b,c){var d=c(73),e={};e[c(23)("toStringTag")]="z",e+""!="[object z]"&&c(16)(Object.prototype,"toString",function toString(){return"[object "+d(this)+"]"},!0)},function(a,b,d){var e=d(32),f=d(23)("toStringTag"),g="Arguments"==e(function(){return arguments}()),h=function(a,b){try{return a[b]}catch(c){}};a.exports=function(a){var b,d,i;return a===c?"Undefined":null===a?"Null":"string"==typeof(d=h(b=Object(a),f))?d:g?e(b):"Object"==(i=e(b))&&"function"==typeof b.callee?"Arguments":i}},function(a,b,c){var d=c(6);d(d.P,"Function",{bind:c(75)})},function(a,b,c){var d=c(19),e=c(11),f=c(76),g=[].slice,h={},i=function(a,b,c){if(!(b in h)){for(var d=[],e=0;e2){b=s?b.trim():m(b,3);var c,d,e,f=b.charCodeAt(0);if(43===f||45===f){if(c=b.charCodeAt(2),88===c||120===c)return NaN}else if(48===f){switch(b.charCodeAt(1)){case 66:case 98:d=2,e=49;break;case 79:case 111:d=8,e=55;break;default:return+b}for(var g,i=b.slice(2),j=0,k=i.length;je)return NaN;return parseInt(i,d)}}return+b};if(!o(" 0o1")||!o("0b1")||o("+0x1")){o=function Number(a){var b=arguments.length<1?0:a,c=this;return c instanceof o&&(r?i(function(){q.valueOf.call(c)}):f(c)!=n)?g(new p(t(b)),c,o):t(b)};for(var u,v=c(4)?j(p):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;v.length>w;w++)e(p,u=v[w])&&!e(o,u)&&l(o,u,k(p,u));o.prototype=q,q.constructor=o,c(16)(d,n,o)}},function(a,b,c){var d=c(11),e=c(71).set;a.exports=function(a,b,c){var f,g=b.constructor;return g!==c&&"function"==typeof g&&(f=g.prototype)!==c.prototype&&d(f)&&e&&e(a,f),a}},function(a,b,c){var d=c(6),e=c(33),f=c(5),g=c(82),h="["+g+"]",i="​…",j=RegExp("^"+h+h+"*"),k=RegExp(h+h+"*$"),l=function(a,b,c){var e={},h=f(function(){return!!g[a]()||i[a]()!=i}),j=e[a]=h?b(m):g[a];c&&(e[c]=j),d(d.P+d.F*h,"String",e)},m=l.trim=function(a,b){return a=String(e(a)),1&b&&(a=a.replace(j,"")),2&b&&(a=a.replace(k,"")),a};a.exports=l},function(a,b){a.exports="\t\n\x0B\f\r   ᠎              \u2028\u2029\ufeff"},function(a,b,c){var d=c(6),e=c(36),f=c(84),g=c(85),h=1..toFixed,i=Math.floor,j=[0,0,0,0,0,0],k="Number.toFixed: incorrect invocation!",l="0",m=function(a,b){for(var c=-1,d=b;++c<6;)d+=a*j[c],j[c]=d%1e7,d=i(d/1e7)},n=function(a){for(var b=6,c=0;--b>=0;)c+=j[b],j[b]=i(c/a),c=c%a*1e7},o=function(){for(var a=6,b="";--a>=0;)if(""!==b||0===a||0!==j[a]){var c=String(j[a]);b=""===b?c:b+g.call(l,7-c.length)+c}return b},p=function(a,b,c){return 0===b?c:b%2===1?p(a,b-1,c*a):p(a*a,b/2,c)},q=function(a){for(var b=0,c=a;c>=4096;)b+=12,c/=4096;for(;c>=2;)b+=1,c/=2;return b};d(d.P+d.F*(!!h&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!c(5)(function(){h.call({})})),"Number",{toFixed:function toFixed(a){var b,c,d,h,i=f(this,k),j=e(a),r="",s=l;if(j<0||j>20)throw RangeError(k);if(i!=i)return"NaN";if(i<=-1e21||i>=1e21)return String(i);if(i<0&&(r="-",i=-i),i>1e-21)if(b=q(i*p(2,69,1))-69,c=b<0?i*p(2,-b,1):i/p(2,b,1),c*=4503599627370496,b=52-b,b>0){for(m(0,c),d=j;d>=7;)m(1e7,0),d-=7;for(m(p(10,d,1),0),d=b-1;d>=23;)n(1<<23),d-=23;n(1<0?(h=s.length,s=r+(h<=j?"0."+g.call(l,j-h)+s:s.slice(0,h-j)+"."+s.slice(h-j))):s=r+s,s}})},function(a,b,c){var d=c(32);a.exports=function(a,b){if("number"!=typeof a&&"Number"!=d(a))throw TypeError(b);return+a}},function(a,b,c){var d=c(36),e=c(33);a.exports=function repeat(a){var b=String(e(this)),c="",f=d(a);if(f<0||f==1/0)throw RangeError("Count can't be negative");for(;f>0;(f>>>=1)&&(b+=b))1&f&&(c+=b);return c}},function(a,b,d){var e=d(6),f=d(5),g=d(84),h=1..toPrecision;e(e.P+e.F*(f(function(){return"1"!==h.call(1,c)})||!f(function(){h.call({})})),"Number",{toPrecision:function toPrecision(a){var b=g(this,"Number#toPrecision: incorrect invocation!");return a===c?h.call(b):h.call(b,a)}})},function(a,b,c){var d=c(6);d(d.S,"Number",{EPSILON:Math.pow(2,-52)})},function(a,b,c){var d=c(6),e=c(2).isFinite;d(d.S,"Number",{isFinite:function isFinite(a){return"number"==typeof a&&e(a)}})},function(a,b,c){var d=c(6);d(d.S,"Number",{isInteger:c(90)})},function(a,b,c){var d=c(11),e=Math.floor;a.exports=function isInteger(a){return!d(a)&&isFinite(a)&&e(a)===a}},function(a,b,c){var d=c(6);d(d.S,"Number",{isNaN:function isNaN(a){return a!=a}})},function(a,b,c){var d=c(6),e=c(90),f=Math.abs;d(d.S,"Number",{isSafeInteger:function isSafeInteger(a){return e(a)&&f(a)<=9007199254740991}})},function(a,b,c){var d=c(6);d(d.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(a,b,c){var d=c(6);d(d.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(a,b,c){var d=c(6),e=c(96);d(d.S+d.F*(Number.parseFloat!=e),"Number",{parseFloat:e})},function(a,b,c){var d=c(2).parseFloat,e=c(81).trim;a.exports=1/d(c(82)+"-0")!==-(1/0)?function parseFloat(a){var b=e(String(a),3),c=d(b);return 0===c&&"-"==b.charAt(0)?-0:c}:d},function(a,b,c){var d=c(6),e=c(98);d(d.S+d.F*(Number.parseInt!=e),"Number",{parseInt:e})},function(a,b,c){var d=c(2).parseInt,e=c(81).trim,f=c(82),g=/^[\-+]?0[xX]/;a.exports=8!==d(f+"08")||22!==d(f+"0x16")?function parseInt(a,b){var c=e(String(a),3);return d(c,b>>>0||(g.test(c)?16:10))}:d},function(a,b,c){var d=c(6),e=c(98);d(d.G+d.F*(parseInt!=e),{parseInt:e})},function(a,b,c){var d=c(6),e=c(96);d(d.G+d.F*(parseFloat!=e),{parseFloat:e})},function(a,b,c){var d=c(6),e=c(102),f=Math.sqrt,g=Math.acosh;d(d.S+d.F*!(g&&710==Math.floor(g(Number.MAX_VALUE))&&g(1/0)==1/0),"Math",{acosh:function acosh(a){return(a=+a)<1?NaN:a>94906265.62425156?Math.log(a)+Math.LN2:e(a-1+f(a-1)*f(a+1))}})},function(a,b){a.exports=Math.log1p||function log1p(a){return(a=+a)>-1e-8&&a<1e-8?a-a*a/2:Math.log(1+a)}},function(a,b,c){function asinh(a){return isFinite(a=+a)&&0!=a?a<0?-asinh(-a):Math.log(a+Math.sqrt(a*a+1)):a}var d=c(6),e=Math.asinh;d(d.S+d.F*!(e&&1/e(0)>0),"Math",{asinh:asinh})},function(a,b,c){var d=c(6),e=Math.atanh;d(d.S+d.F*!(e&&1/e(-0)<0),"Math",{atanh:function atanh(a){return 0==(a=+a)?a:Math.log((1+a)/(1-a))/2}})},function(a,b,c){var d=c(6),e=c(106);d(d.S,"Math",{cbrt:function cbrt(a){return e(a=+a)*Math.pow(Math.abs(a),1/3)}})},function(a,b){a.exports=Math.sign||function sign(a){return 0==(a=+a)||a!=a?a:a<0?-1:1}},function(a,b,c){var d=c(6);d(d.S,"Math",{clz32:function clz32(a){return(a>>>=0)?31-Math.floor(Math.log(a+.5)*Math.LOG2E):32}})},function(a,b,c){var d=c(6),e=Math.exp;d(d.S,"Math",{cosh:function cosh(a){return(e(a=+a)+e(-a))/2}})},function(a,b,c){var d=c(6),e=c(110);d(d.S+d.F*(e!=Math.expm1),"Math",{expm1:e})},function(a,b){var c=Math.expm1;a.exports=!c||c(10)>22025.465794806718||c(10)<22025.465794806718||c(-2e-17)!=-2e-17?function expm1(a){return 0==(a=+a)?a:a>-1e-6&&a<1e-6?a+a*a/2:Math.exp(a)-1}:c},function(a,b,c){var d=c(6),e=c(106),f=Math.pow,g=f(2,-52),h=f(2,-23),i=f(2,127)*(2-h),j=f(2,-126),k=function(a){return a+1/g-1/g};d(d.S,"Math",{fround:function fround(a){var b,c,d=Math.abs(a),f=e(a);return di||c!=c?f*(1/0):f*c)}})},function(a,b,c){var d=c(6),e=Math.abs;d(d.S,"Math",{hypot:function hypot(a,b){for(var c,d,f=0,g=0,h=arguments.length,i=0;g0?(d=c/i,f+=d*d):f+=c;return i===1/0?1/0:i*Math.sqrt(f)}})},function(a,b,c){var d=c(6),e=Math.imul;d(d.S+d.F*c(5)(function(){return e(4294967295,5)!=-5||2!=e.length}),"Math",{imul:function imul(a,b){var c=65535,d=+a,e=+b,f=c&d,g=c&e;return 0|f*g+((c&d>>>16)*g+f*(c&e>>>16)<<16>>>0)}})},function(a,b,c){var d=c(6);d(d.S,"Math",{log10:function log10(a){return Math.log(a)/Math.LN10}})},function(a,b,c){var d=c(6);d(d.S,"Math",{log1p:c(102)})},function(a,b,c){var d=c(6);d(d.S,"Math",{log2:function log2(a){return Math.log(a)/Math.LN2}})},function(a,b,c){var d=c(6);d(d.S,"Math",{sign:c(106)})},function(a,b,c){var d=c(6),e=c(110),f=Math.exp;d(d.S+d.F*c(5)(function(){return!Math.sinh(-2e-17)!=-2e-17}),"Math",{sinh:function sinh(a){return Math.abs(a=+a)<1?(e(a)-e(-a))/2:(f(a-1)-f(-a-1))*(Math.E/2)}})},function(a,b,c){var d=c(6),e=c(110),f=Math.exp;d(d.S,"Math",{tanh:function tanh(a){var b=e(a=+a),c=e(-a);return b==1/0?1:c==1/0?-1:(b-c)/(f(a)+f(-a))}})},function(a,b,c){var d=c(6);d(d.S,"Math",{trunc:function trunc(a){return(a>0?Math.floor:Math.ceil)(a)}})},function(a,b,c){var d=c(6),e=c(37),f=String.fromCharCode,g=String.fromCodePoint;d(d.S+d.F*(!!g&&1!=g.length),"String",{fromCodePoint:function fromCodePoint(a){for(var b,c=[],d=arguments.length,g=0;d>g;){if(b=+arguments[g++],e(b,1114111)!==b)throw RangeError(b+" is not a valid code point");c.push(b<65536?f(b):f(((b-=65536)>>10)+55296,b%1024+56320))}return c.join("")}})},function(a,b,c){var d=c(6),e=c(30),f=c(35);d(d.S,"String",{raw:function raw(a){for(var b=e(a.raw),c=f(b.length),d=arguments.length,g=[],h=0;c>h;)g.push(String(b[h++])),h=k?a?"":c:(g=i.charCodeAt(j),g<55296||g>56319||j+1===k||(h=i.charCodeAt(j+1))<56320||h>57343?a?i.charAt(j):g:a?i.slice(j,j+2):(g-55296<<10)+(h-56320)+65536)}}},function(a,b,d){var e=d(6),f=d(35),g=d(127),h="endsWith",i=""[h];e(e.P+e.F*d(129)(h),"String",{endsWith:function endsWith(a){var b=g(this,a,h),d=arguments.length>1?arguments[1]:c,e=f(b.length),j=d===c?e:Math.min(f(d),e),k=String(a);return i?i.call(b,k,j):b.slice(j-k.length,j)===k}})},function(a,b,c){var d=c(128),e=c(33);a.exports=function(a,b,c){if(d(b))throw TypeError("String#"+c+" doesn't accept regex!");return String(e(a))}},function(a,b,d){var e=d(11),f=d(32),g=d(23)("match");a.exports=function(a){var b;return e(a)&&((b=a[g])!==c?!!b:"RegExp"==f(a))}},function(a,b,c){var d=c(23)("match");a.exports=function(a){var b=/./;try{"/./"[a](b)}catch(c){try{return b[d]=!1,!"/./"[a](b)}catch(e){}}return!0}},function(a,b,d){var e=d(6),f=d(127),g="includes";e(e.P+e.F*d(129)(g),"String",{includes:function includes(a){return!!~f(this,a,g).indexOf(a,arguments.length>1?arguments[1]:c)}})},function(a,b,c){var d=c(6);d(d.P,"String",{repeat:c(85)})},function(a,b,d){var e=d(6),f=d(35),g=d(127),h="startsWith",i=""[h];e(e.P+e.F*d(129)(h),"String",{startsWith:function startsWith(a){var b=g(this,a,h),d=f(Math.min(arguments.length>1?arguments[1]:c,b.length)),e=String(a);return i?i.call(b,e,d):b.slice(d,d+e.length)===e}})},function(a,b,d){var e=d(125)(!0);d(134)(String,"String",function(a){this._t=String(a),this._i=0},function(){var a,b=this._t,d=this._i;return d>=b.length?{value:c,done:!0}:(a=e(b,d),this._i+=a.length,{value:a,done:!1})})},function(a,b,d){var e=d(26),f=d(6),g=d(16),h=d(8),i=d(3),j=d(135),k=d(136),l=d(22),m=d(57),n=d(23)("iterator"),o=!([].keys&&"next"in[].keys()),p="@@iterator",q="keys",r="values",s=function(){return this};a.exports=function(a,b,d,t,u,v,w){k(d,b,t);var x,y,z,A=function(a){if(!o&&a in E)return E[a];switch(a){case q:return function keys(){return new d(this,a)};case r:return function values(){return new d(this,a)}}return function entries(){return new d(this,a)}},B=b+" Iterator",C=u==r,D=!1,E=a.prototype,F=E[n]||E[p]||u&&E[u],G=F||A(u),H=u?C?A("entries"):G:c,I="Array"==b?E.entries||F:F;if(I&&(z=m(I.call(new a)),z!==Object.prototype&&(l(z,B,!0),e||i(z,n)||h(z,n,s))),C&&F&&F.name!==r&&(D=!0,G=function values(){return F.call(this)}),e&&!w||!o&&!D&&E[n]||h(E,n,G),j[b]=G,j[B]=s,u)if(x={values:C?G:A(r),keys:v?G:A(q),entries:H},w)for(y in x)y in E||g(E,y,x[y]);else f(f.P+f.F*(o||D),b,x);return x}},function(a,b){a.exports={}},function(a,b,c){var d=c(44),e=c(15),f=c(22),g={};c(8)(g,c(23)("iterator"),function(){return this}),a.exports=function(a,b,c){a.prototype=d(g,{next:e(1,c)}),f(a,b+" Iterator")}},function(a,b,c){c(138)("anchor",function(a){return function anchor(b){return a(this,"a","name",b)}})},function(a,b,c){var d=c(6),e=c(5),f=c(33),g=/"/g,h=function(a,b,c,d){var e=String(f(a)),h="<"+b;return""!==c&&(h+=" "+c+'="'+String(d).replace(g,""")+'"'),h+">"+e+""};a.exports=function(a,b){var c={};c[a]=b(h),d(d.P+d.F*e(function(){var b=""[a]('"');return b!==b.toLowerCase()||b.split('"').length>3}),"String",c)}},function(a,b,c){c(138)("big",function(a){return function big(){return a(this,"big","","")}})},function(a,b,c){c(138)("blink",function(a){return function blink(){return a(this,"blink","","")}})},function(a,b,c){c(138)("bold",function(a){return function bold(){return a(this,"b","","")}})},function(a,b,c){c(138)("fixed",function(a){return function fixed(){return a(this,"tt","","")}})},function(a,b,c){c(138)("fontcolor",function(a){return function fontcolor(b){return a(this,"font","color",b)}})},function(a,b,c){c(138)("fontsize",function(a){return function fontsize(b){return a(this,"font","size",b)}})},function(a,b,c){c(138)("italics",function(a){return function italics(){return a(this,"i","","")}})},function(a,b,c){c(138)("link",function(a){return function link(b){return a(this,"a","href",b)}})},function(a,b,c){c(138)("small",function(a){return function small(){return a(this,"small","","")}})},function(a,b,c){c(138)("strike",function(a){return function strike(){return a(this,"strike","","")}})},function(a,b,c){c(138)("sub",function(a){return function sub(){return a(this,"sub","","")}})},function(a,b,c){c(138)("sup",function(a){return function sup(){return a(this,"sup","","")}})},function(a,b,c){var d=c(6);d(d.S,"Array",{isArray:c(43)})},function(a,b,d){var e=d(18),f=d(6),g=d(56),h=d(153),i=d(154),j=d(35),k=d(155),l=d(156);f(f.S+f.F*!d(157)(function(a){Array.from(a)}),"Array",{from:function from(a){var b,d,f,m,n=g(a),o="function"==typeof this?this:Array,p=arguments.length,q=p>1?arguments[1]:c,r=q!==c,s=0,t=l(n);if(r&&(q=e(q,p>2?arguments[2]:c,2)),t==c||o==Array&&i(t))for(b=j(n.length),d=new o(b);b>s;s++)k(d,s,r?q(n[s],s):n[s]);else for(m=t.call(n),d=new o;!(f=m.next()).done;s++)k(d,s,r?h(m,q,[f.value,s],!0):f.value);return d.length=s,d}})},function(a,b,d){var e=d(10);a.exports=function(a,b,d,f){try{return f?b(e(d)[0],d[1]):b(d)}catch(g){var h=a["return"];throw h!==c&&e(h.call(a)),g}}},function(a,b,d){var e=d(135),f=d(23)("iterator"),g=Array.prototype;a.exports=function(a){return a!==c&&(e.Array===a||g[f]===a)}},function(a,b,c){var d=c(9),e=c(15);a.exports=function(a,b,c){b in a?d.f(a,b,e(0,c)):a[b]=c}},function(a,b,d){var e=d(73),f=d(23)("iterator"),g=d(135);a.exports=d(7).getIteratorMethod=function(a){ +if(a!=c)return a[f]||a["@@iterator"]||g[e(a)]}},function(a,b,c){var d=c(23)("iterator"),e=!1;try{var f=[7][d]();f["return"]=function(){e=!0},Array.from(f,function(){throw 2})}catch(g){}a.exports=function(a,b){if(!b&&!e)return!1;var c=!1;try{var f=[7],g=f[d]();g.next=function(){return{done:c=!0}},f[d]=function(){return g},a(f)}catch(h){}return c}},function(a,b,c){var d=c(6),e=c(155);d(d.S+d.F*c(5)(function(){function F(){}return!(Array.of.call(F)instanceof F)}),"Array",{of:function of(){for(var a=0,b=arguments.length,c=new("function"==typeof this?this:Array)(b);b>a;)e(c,a,arguments[a++]);return c.length=b,c}})},function(a,b,d){var e=d(6),f=d(30),g=[].join;e(e.P+e.F*(d(31)!=Object||!d(160)(g)),"Array",{join:function join(a){return g.call(f(this),a===c?",":a)}})},function(a,b,c){var d=c(5);a.exports=function(a,b){return!!a&&d(function(){b?a.call(null,function(){},1):a.call(null)})}},function(a,b,d){var e=d(6),f=d(46),g=d(32),h=d(37),i=d(35),j=[].slice;e(e.P+e.F*d(5)(function(){f&&j.call(f)}),"Array",{slice:function slice(a,b){var d=i(this.length),e=g(this);if(b=b===c?d:b,"Array"==e)return j.call(this,a,b);for(var f=h(a,d),k=h(b,d),l=i(k-f),m=Array(l),n=0;nw;w++)if((n||w in t)&&(q=t[w],r=u(q,w,s),a))if(d)x[w]=r;else if(r)switch(a){case 3:return!0;case 5:return q;case 6:return w;case 2:x.push(q)}else if(l)return!1;return m?-1:k||l?l:x}}},function(a,b,c){var d=c(166);a.exports=function(a,b){return new(d(a))(b)}},function(a,b,d){var e=d(11),f=d(43),g=d(23)("species");a.exports=function(a){var b;return f(a)&&(b=a.constructor,"function"!=typeof b||b!==Array&&!f(b.prototype)||(b=c),e(b)&&(b=b[g],null===b&&(b=c))),b===c?Array:b}},function(a,b,c){var d=c(6),e=c(164)(1);d(d.P+d.F*!c(160)([].map,!0),"Array",{map:function map(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(164)(2);d(d.P+d.F*!c(160)([].filter,!0),"Array",{filter:function filter(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(164)(3);d(d.P+d.F*!c(160)([].some,!0),"Array",{some:function some(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(164)(4);d(d.P+d.F*!c(160)([].every,!0),"Array",{every:function every(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(172);d(d.P+d.F*!c(160)([].reduce,!0),"Array",{reduce:function reduce(a){return e(this,a,arguments.length,arguments[1],!1)}})},function(a,b,c){var d=c(19),e=c(56),f=c(31),g=c(35);a.exports=function(a,b,c,h,i){d(b);var j=e(a),k=f(j),l=g(j.length),m=i?l-1:0,n=i?-1:1;if(c<2)for(;;){if(m in k){h=k[m],m+=n;break}if(m+=n,i?m<0:l<=m)throw TypeError("Reduce of empty array with no initial value")}for(;i?m>=0:l>m;m+=n)m in k&&(h=b(h,k[m],m,j));return h}},function(a,b,c){var d=c(6),e=c(172);d(d.P+d.F*!c(160)([].reduceRight,!0),"Array",{reduceRight:function reduceRight(a){return e(this,a,arguments.length,arguments[1],!0)}})},function(a,b,c){var d=c(6),e=c(34)(!1),f=[].indexOf,g=!!f&&1/[1].indexOf(1,-0)<0;d(d.P+d.F*(g||!c(160)(f)),"Array",{indexOf:function indexOf(a){return g?f.apply(this,arguments)||0:e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(30),f=c(36),g=c(35),h=[].lastIndexOf,i=!!h&&1/[1].lastIndexOf(1,-0)<0;d(d.P+d.F*(i||!c(160)(h)),"Array",{lastIndexOf:function lastIndexOf(a){if(i)return h.apply(this,arguments)||0;var b=e(this),c=g(b.length),d=c-1;for(arguments.length>1&&(d=Math.min(d,f(arguments[1]))),d<0&&(d=c+d);d>=0;d--)if(d in b&&b[d]===a)return d||0;return-1}})},function(a,b,c){var d=c(6);d(d.P,"Array",{copyWithin:c(177)}),c(178)("copyWithin")},function(a,b,d){var e=d(56),f=d(37),g=d(35);a.exports=[].copyWithin||function copyWithin(a,b){var d=e(this),h=g(d.length),i=f(a,h),j=f(b,h),k=arguments.length>2?arguments[2]:c,l=Math.min((k===c?h:f(k,h))-j,h-i),m=1;for(j0;)j in d?d[i]=d[j]:delete d[i],i+=m,j+=m;return d}},function(a,b,d){var e=d(23)("unscopables"),f=Array.prototype;f[e]==c&&d(8)(f,e,{}),a.exports=function(a){f[e][a]=!0}},function(a,b,c){var d=c(6);d(d.P,"Array",{fill:c(180)}),c(178)("fill")},function(a,b,d){var e=d(56),f=d(37),g=d(35);a.exports=function fill(a){for(var b=e(this),d=g(b.length),h=arguments.length,i=f(h>1?arguments[1]:c,d),j=h>2?arguments[2]:c,k=j===c?d:f(j,d);k>i;)b[i++]=a;return b}},function(a,b,d){var e=d(6),f=d(164)(5),g="find",h=!0;g in[]&&Array(1)[g](function(){h=!1}),e(e.P+e.F*h,"Array",{find:function find(a){return f(this,a,arguments.length>1?arguments[1]:c)}}),d(178)(g)},function(a,b,d){var e=d(6),f=d(164)(6),g="findIndex",h=!0;g in[]&&Array(1)[g](function(){h=!1}),e(e.P+e.F*h,"Array",{findIndex:function findIndex(a){return f(this,a,arguments.length>1?arguments[1]:c)}}),d(178)(g)},function(a,b,d){var e=d(178),f=d(184),g=d(135),h=d(30);a.exports=d(134)(Array,"Array",function(a,b){this._t=h(a),this._i=0,this._k=b},function(){var a=this._t,b=this._k,d=this._i++;return!a||d>=a.length?(this._t=c,f(1)):"keys"==b?f(0,d):"values"==b?f(0,a[d]):f(0,[d,a[d]])},"values"),g.Arguments=g.Array,e("keys"),e("values"),e("entries")},function(a,b){a.exports=function(a,b){return{value:b,done:!!a}}},function(a,b,c){c(186)("Array")},function(a,b,c){var d=c(2),e=c(9),f=c(4),g=c(23)("species");a.exports=function(a){var b=d[a];f&&b&&!b[g]&&e.f(b,g,{configurable:!0,get:function(){return this}})}},function(a,b,d){var e=d(2),f=d(80),g=d(9).f,h=d(48).f,i=d(128),j=d(188),k=e.RegExp,l=k,m=k.prototype,n=/a/g,o=/a/g,p=new k(n)!==n;if(d(4)&&(!p||d(5)(function(){return o[d(23)("match")]=!1,k(n)!=n||k(o)==o||"/a/i"!=k(n,"i")}))){k=function RegExp(a,b){var d=this instanceof k,e=i(a),g=b===c;return!d&&e&&a.constructor===k&&g?a:f(p?new l(e&&!g?a.source:a,b):l((e=a instanceof k)?a.source:a,e&&g?j.call(a):b),d?this:m,k)};for(var q=(function(a){a in k||g(k,a,{configurable:!0,get:function(){return l[a]},set:function(b){l[a]=b}})}),r=h(l),s=0;r.length>s;)q(r[s++]);m.constructor=k,k.prototype=m,d(16)(e,"RegExp",k)}d(186)("RegExp")},function(a,b,c){var d=c(10);a.exports=function(){var a=d(this),b="";return a.global&&(b+="g"),a.ignoreCase&&(b+="i"),a.multiline&&(b+="m"),a.unicode&&(b+="u"),a.sticky&&(b+="y"),b}},function(a,b,d){d(190);var e=d(10),f=d(188),g=d(4),h="toString",i=/./[h],j=function(a){d(16)(RegExp.prototype,h,a,!0)};d(5)(function(){return"/a/b"!=i.call({source:"a",flags:"b"})})?j(function toString(){var a=e(this);return"/".concat(a.source,"/","flags"in a?a.flags:!g&&a instanceof RegExp?f.call(a):c)}):i.name!=h&&j(function toString(){return i.call(this)})},function(a,b,c){c(4)&&"g"!=/./g.flags&&c(9).f(RegExp.prototype,"flags",{configurable:!0,get:c(188)})},function(a,b,d){d(192)("match",1,function(a,b,d){return[function match(d){var e=a(this),f=d==c?c:d[b];return f!==c?f.call(d,e):new RegExp(d)[b](String(e))},d]})},function(a,b,c){var d=c(8),e=c(16),f=c(5),g=c(33),h=c(23);a.exports=function(a,b,c){var i=h(a),j=c(g,i,""[a]),k=j[0],l=j[1];f(function(){var b={};return b[i]=function(){return 7},7!=""[a](b)})&&(e(String.prototype,a,k),d(RegExp.prototype,i,2==b?function(a,b){return l.call(a,this,b)}:function(a){return l.call(a,this)}))}},function(a,b,d){d(192)("replace",2,function(a,b,d){return[function replace(e,f){var g=a(this),h=e==c?c:e[b];return h!==c?h.call(e,g,f):d.call(String(g),e,f)},d]})},function(a,b,d){d(192)("search",1,function(a,b,d){return[function search(d){var e=a(this),f=d==c?c:d[b];return f!==c?f.call(d,e):new RegExp(d)[b](String(e))},d]})},function(a,b,d){d(192)("split",2,function(a,b,e){var f=d(128),g=e,h=[].push,i="split",j="length",k="lastIndex";if("c"=="abbc"[i](/(b)*/)[1]||4!="test"[i](/(?:)/,-1)[j]||2!="ab"[i](/(?:ab)*/)[j]||4!="."[i](/(.?)(.?)/)[j]||"."[i](/()()/)[j]>1||""[i](/.?/)[j]){var l=/()??/.exec("")[1]===c;e=function(a,b){var d=String(this);if(a===c&&0===b)return[];if(!f(a))return g.call(d,a,b);var e,i,m,n,o,p=[],q=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(a.sticky?"y":""),r=0,s=b===c?4294967295:b>>>0,t=new RegExp(a.source,q+"g");for(l||(e=new RegExp("^"+t.source+"$(?!\\s)",q));(i=t.exec(d))&&(m=i.index+i[0][j],!(m>r&&(p.push(d.slice(r,i.index)),!l&&i[j]>1&&i[0].replace(e,function(){for(o=1;o1&&i.index=s)));)t[k]===i.index&&t[k]++;return r===d[j]?!n&&t.test("")||p.push(""):p.push(d.slice(r)),p[j]>s?p.slice(0,s):p}}else"0"[i](c,0)[j]&&(e=function(a,b){return a===c&&0===b?[]:g.call(this,a,b)});return[function split(d,f){var g=a(this),h=d==c?c:d[b];return h!==c?h.call(d,g,f):e.call(String(g),d,f)},e]})},function(a,b,d){var e,f,g,h=d(26),i=d(2),j=d(18),k=d(73),l=d(6),m=d(11),n=d(19),o=d(197),p=d(198),q=d(199),r=d(200).set,s=d(201)(),t="Promise",u=i.TypeError,v=i.process,w=i[t],v=i.process,x="process"==k(v),y=function(){},z=!!function(){try{var a=w.resolve(1),b=(a.constructor={})[d(23)("species")]=function(a){a(y,y)};return(x||"function"==typeof PromiseRejectionEvent)&&a.then(y)instanceof b}catch(c){}}(),A=function(a,b){return a===b||a===w&&b===g},B=function(a){var b;return!(!m(a)||"function"!=typeof(b=a.then))&&b},C=function(a){return A(w,a)?new D(a):new f(a)},D=f=function(a){var b,d;this.promise=new a(function(a,e){if(b!==c||d!==c)throw u("Bad Promise constructor");b=a,d=e}),this.resolve=n(b),this.reject=n(d)},E=function(a){try{a()}catch(b){return{error:b}}},F=function(a,b){if(!a._n){a._n=!0;var c=a._c;s(function(){for(var d=a._v,e=1==a._s,f=0,g=function(b){var c,f,g=e?b.ok:b.fail,h=b.resolve,i=b.reject,j=b.domain;try{g?(e||(2==a._h&&I(a),a._h=1),g===!0?c=d:(j&&j.enter(),c=g(d),j&&j.exit()),c===b.promise?i(u("Promise-chain cycle")):(f=B(c))?f.call(c,h,i):h(c)):i(d)}catch(k){i(k)}};c.length>f;)g(c[f++]);a._c=[],a._n=!1,b&&!a._h&&G(a)})}},G=function(a){r.call(i,function(){var b,d,e,f=a._v;if(H(a)&&(b=E(function(){x?v.emit("unhandledRejection",f,a):(d=i.onunhandledrejection)?d({promise:a,reason:f}):(e=i.console)&&e.error&&e.error("Unhandled promise rejection",f)}),a._h=x||H(a)?2:1),a._a=c,b)throw b.error})},H=function(a){if(1==a._h)return!1;for(var b,c=a._a||a._c,d=0;c.length>d;)if(b=c[d++],b.fail||!H(b.promise))return!1;return!0},I=function(a){r.call(i,function(){var b;x?v.emit("rejectionHandled",a):(b=i.onrejectionhandled)&&b({promise:a,reason:a._v})})},J=function(a){var b=this;b._d||(b._d=!0,b=b._w||b,b._v=a,b._s=2,b._a||(b._a=b._c.slice()),F(b,!0))},K=function(a){var b,c=this;if(!c._d){c._d=!0,c=c._w||c;try{if(c===a)throw u("Promise can't be resolved itself");(b=B(a))?s(function(){var d={_w:c,_d:!1};try{b.call(a,j(K,d,1),j(J,d,1))}catch(e){J.call(d,e)}}):(c._v=a,c._s=1,F(c,!1))}catch(d){J.call({_w:c,_d:!1},d)}}};z||(w=function Promise(a){o(this,w,t,"_h"),n(a),e.call(this);try{a(j(K,this,1),j(J,this,1))}catch(b){J.call(this,b)}},e=function Promise(a){this._c=[],this._a=c,this._s=0,this._d=!1,this._v=c,this._h=0,this._n=!1},e.prototype=d(202)(w.prototype,{then:function then(a,b){var d=C(q(this,w));return d.ok="function"!=typeof a||a,d.fail="function"==typeof b&&b,d.domain=x?v.domain:c,this._c.push(d),this._a&&this._a.push(d),this._s&&F(this,!1),d.promise},"catch":function(a){return this.then(c,a)}}),D=function(){var a=new e;this.promise=a,this.resolve=j(K,a,1),this.reject=j(J,a,1)}),l(l.G+l.W+l.F*!z,{Promise:w}),d(22)(w,t),d(186)(t),g=d(7)[t],l(l.S+l.F*!z,t,{reject:function reject(a){var b=C(this),c=b.reject;return c(a),b.promise}}),l(l.S+l.F*(h||!z),t,{resolve:function resolve(a){if(a instanceof w&&A(a.constructor,this))return a;var b=C(this),c=b.resolve;return c(a),b.promise}}),l(l.S+l.F*!(z&&d(157)(function(a){w.all(a)["catch"](y)})),t,{all:function all(a){var b=this,d=C(b),e=d.resolve,f=d.reject,g=E(function(){var d=[],g=0,h=1;p(a,!1,function(a){var i=g++,j=!1;d.push(c),h++,b.resolve(a).then(function(a){j||(j=!0,d[i]=a,--h||e(d))},f)}),--h||e(d)});return g&&f(g.error),d.promise},race:function race(a){var b=this,c=C(b),d=c.reject,e=E(function(){p(a,!1,function(a){b.resolve(a).then(c.resolve,d)})});return e&&d(e.error),c.promise}})},function(a,b){a.exports=function(a,b,d,e){if(!(a instanceof b)||e!==c&&e in a)throw TypeError(d+": incorrect invocation!");return a}},function(a,b,c){var d=c(18),e=c(153),f=c(154),g=c(10),h=c(35),i=c(156),j={},k={},b=a.exports=function(a,b,c,l,m){var n,o,p,q,r=m?function(){return a}:i(a),s=d(c,l,b?2:1),t=0;if("function"!=typeof r)throw TypeError(a+" is not iterable!");if(f(r)){for(n=h(a.length);n>t;t++)if(q=b?s(g(o=a[t])[0],o[1]):s(a[t]),q===j||q===k)return q}else for(p=r.call(a);!(o=p.next()).done;)if(q=e(p,s,o.value,b),q===j||q===k)return q};b.BREAK=j,b.RETURN=k},function(a,b,d){var e=d(10),f=d(19),g=d(23)("species");a.exports=function(a,b){var d,h=e(a).constructor;return h===c||(d=e(h)[g])==c?b:f(d)}},function(a,b,c){var d,e,f,g=c(18),h=c(76),i=c(46),j=c(13),k=c(2),l=k.process,m=k.setImmediate,n=k.clearImmediate,o=k.MessageChannel,p=0,q={},r="onreadystatechange",s=function(){var a=+this;if(q.hasOwnProperty(a)){var b=q[a];delete q[a],b()}},t=function(a){s.call(a.data)};m&&n||(m=function setImmediate(a){for(var b=[],c=1;arguments.length>c;)b.push(arguments[c++]);return q[++p]=function(){h("function"==typeof a?a:Function(a),b)},d(p),p},n=function clearImmediate(a){delete q[a]},"process"==c(32)(l)?d=function(a){l.nextTick(g(s,a,1))}:o?(e=new o,f=e.port2,e.port1.onmessage=t,d=g(f.postMessage,f,1)):k.addEventListener&&"function"==typeof postMessage&&!k.importScripts?(d=function(a){k.postMessage(a+"","*")},k.addEventListener("message",t,!1)):d=r in j("script")?function(a){i.appendChild(j("script"))[r]=function(){i.removeChild(this),s.call(a)}}:function(a){setTimeout(g(s,a,1),0)}),a.exports={set:m,clear:n}},function(a,b,d){var e=d(2),f=d(200).set,g=e.MutationObserver||e.WebKitMutationObserver,h=e.process,i=e.Promise,j="process"==d(32)(h);a.exports=function(){var a,b,d,k=function(){var e,f;for(j&&(e=h.domain)&&e.exit();a;){f=a.fn,a=a.next;try{f()}catch(g){throw a?d():b=c,g}}b=c,e&&e.enter()};if(j)d=function(){h.nextTick(k)};else if(g){var l=!0,m=document.createTextNode("");new g(k).observe(m,{characterData:!0}),d=function(){m.data=l=!l}}else if(i&&i.resolve){var n=i.resolve();d=function(){n.then(k)}}else d=function(){f.call(e,k)};return function(e){var f={fn:e,next:c};b&&(b.next=f),a||(a=f,d()),b=f}}},function(a,b,c){var d=c(16);a.exports=function(a,b,c){for(var e in b)d(a,e,b[e],c);return a}},function(a,b,d){var e=d(204);a.exports=d(205)("Map",function(a){return function Map(){return a(this,arguments.length>0?arguments[0]:c)}},{get:function get(a){var b=e.getEntry(this,a);return b&&b.v},set:function set(a,b){return e.def(this,0===a?0:a,b)}},e,!0)},function(a,b,d){var e=d(9).f,f=d(44),g=d(202),h=d(18),i=d(197),j=d(33),k=d(198),l=d(134),m=d(184),n=d(186),o=d(4),p=d(20).fastKey,q=o?"_s":"size",r=function(a,b){var c,d=p(b);if("F"!==d)return a._i[d];for(c=a._f;c;c=c.n)if(c.k==b)return c};a.exports={getConstructor:function(a,b,d,l){var m=a(function(a,e){i(a,m,b,"_i"),a._i=f(null),a._f=c,a._l=c,a[q]=0,e!=c&&k(e,d,a[l],a)});return g(m.prototype,{clear:function clear(){for(var a=this,b=a._i,d=a._f;d;d=d.n)d.r=!0,d.p&&(d.p=d.p.n=c),delete b[d.i];a._f=a._l=c,a[q]=0},"delete":function(a){var b=this,c=r(b,a);if(c){var d=c.n,e=c.p;delete b._i[c.i],c.r=!0,e&&(e.n=d),d&&(d.p=e),b._f==c&&(b._f=d),b._l==c&&(b._l=e),b[q]--}return!!c},forEach:function forEach(a){i(this,m,"forEach");for(var b,d=h(a,arguments.length>1?arguments[1]:c,3);b=b?b.n:this._f;)for(d(b.v,b.k,this);b&&b.r;)b=b.p},has:function has(a){return!!r(this,a)}}),o&&e(m.prototype,"size",{get:function(){return j(this[q])}}),m},def:function(a,b,d){var e,f,g=r(a,b);return g?g.v=d:(a._l=g={i:f=p(b,!0),k:b,v:d,p:e=a._l,n:c,r:!1},a._f||(a._f=g),e&&(e.n=g),a[q]++,"F"!==f&&(a._i[f]=g)),a},getEntry:r,setStrong:function(a,b,d){l(a,b,function(a,b){this._t=a,this._k=b,this._l=c},function(){for(var a=this,b=a._k,d=a._l;d&&d.r;)d=d.p;return a._t&&(a._l=d=d?d.n:a._t._f)?"keys"==b?m(0,d.k):"values"==b?m(0,d.v):m(0,[d.k,d.v]):(a._t=c,m(1))},d?"entries":"values",!d,!0),n(b)}}},function(a,b,d){var e=d(2),f=d(6),g=d(16),h=d(202),i=d(20),j=d(198),k=d(197),l=d(11),m=d(5),n=d(157),o=d(22),p=d(80);a.exports=function(a,b,d,q,r,s){var t=e[a],u=t,v=r?"set":"add",w=u&&u.prototype,x={},y=function(a){var b=w[a];g(w,a,"delete"==a?function(a){return!(s&&!l(a))&&b.call(this,0===a?0:a)}:"has"==a?function has(a){return!(s&&!l(a))&&b.call(this,0===a?0:a)}:"get"==a?function get(a){return s&&!l(a)?c:b.call(this,0===a?0:a)}:"add"==a?function add(a){return b.call(this,0===a?0:a),this}:function set(a,c){return b.call(this,0===a?0:a,c),this})};if("function"==typeof u&&(s||w.forEach&&!m(function(){(new u).entries().next()}))){var z=new u,A=z[v](s?{}:-0,1)!=z,B=m(function(){z.has(1)}),C=n(function(a){new u(a)}),D=!s&&m(function(){for(var a=new u,b=5;b--;)a[v](b,b);return!a.has(-0)});C||(u=b(function(b,d){k(b,u,a);var e=p(new t,b,u);return d!=c&&j(d,r,e[v],e),e}),u.prototype=w,w.constructor=u),(B||D)&&(y("delete"),y("has"),r&&y("get")),(D||A)&&y(v),s&&w.clear&&delete w.clear}else u=q.getConstructor(b,a,r,v),h(u.prototype,d),i.NEED=!0;return o(u,a),x[a]=u,f(f.G+f.W+f.F*(u!=t),x),s||q.setStrong(u,a,r),u}},function(a,b,d){var e=d(204);a.exports=d(205)("Set",function(a){return function Set(){return a(this,arguments.length>0?arguments[0]:c)}},{add:function add(a){return e.def(this,a=0===a?0:a,a)}},e)},function(a,b,d){var e,f=d(164)(0),g=d(16),h=d(20),i=d(67),j=d(208),k=d(11),l=h.getWeak,m=Object.isExtensible,n=j.ufstore,o={},p=function(a){return function WeakMap(){return a(this,arguments.length>0?arguments[0]:c)}},q={get:function get(a){if(k(a)){var b=l(a);return b===!0?n(this).get(a):b?b[this._i]:c}},set:function set(a,b){return j.def(this,a,b)}},r=a.exports=d(205)("WeakMap",p,q,j,!0,!0);7!=(new r).set((Object.freeze||Object)(o),7).get(o)&&(e=j.getConstructor(p),i(e.prototype,q),h.NEED=!0,f(["delete","has","get","set"],function(a){var b=r.prototype,c=b[a];g(b,a,function(b,d){if(k(b)&&!m(b)){this._f||(this._f=new e);var f=this._f[a](b,d);return"set"==a?this:f}return c.call(this,b,d)})}))},function(a,b,d){var e=d(202),f=d(20).getWeak,g=d(10),h=d(11),i=d(197),j=d(198),k=d(164),l=d(3),m=k(5),n=k(6),o=0,p=function(a){return a._l||(a._l=new q)},q=function(){this.a=[]},r=function(a,b){return m(a.a,function(a){return a[0]===b})};q.prototype={get:function(a){var b=r(this,a);if(b)return b[1]},has:function(a){return!!r(this,a)},set:function(a,b){var c=r(this,a);c?c[1]=b:this.a.push([a,b])},"delete":function(a){var b=n(this.a,function(b){return b[0]===a});return~b&&this.a.splice(b,1),!!~b}},a.exports={getConstructor:function(a,b,d,g){var k=a(function(a,e){i(a,k,b,"_i"),a._i=o++,a._l=c,e!=c&&j(e,d,a[g],a)});return e(k.prototype,{"delete":function(a){if(!h(a))return!1;var b=f(a);return b===!0?p(this)["delete"](a):b&&l(b,this._i)&&delete b[this._i]},has:function has(a){if(!h(a))return!1;var b=f(a);return b===!0?p(this).has(a):b&&l(b,this._i)}}),k},def:function(a,b,c){var d=f(g(b),!0);return d===!0?p(a).set(b,c):d[a._i]=c,a},ufstore:p}},function(a,b,d){var e=d(208);d(205)("WeakSet",function(a){return function WeakSet(){return a(this,arguments.length>0?arguments[0]:c)}},{add:function add(a){return e.def(this,a,!0)}},e,!1,!0)},function(a,b,c){var d=c(6),e=c(19),f=c(10),g=(c(2).Reflect||{}).apply,h=Function.apply;d(d.S+d.F*!c(5)(function(){g(function(){})}),"Reflect",{apply:function apply(a,b,c){var d=e(a),i=f(c);return g?g(d,b,i):h.call(d,b,i)}})},function(a,b,c){var d=c(6),e=c(44),f=c(19),g=c(10),h=c(11),i=c(5),j=c(75),k=(c(2).Reflect||{}).construct,l=i(function(){function F(){}return!(k(function(){},[],F)instanceof F)}),m=!i(function(){k(function(){})});d(d.S+d.F*(l||m),"Reflect",{construct:function construct(a,b){f(a),g(b);var c=arguments.length<3?a:f(arguments[2]);if(m&&!l)return k(a,b,c);if(a==c){switch(b.length){case 0:return new a;case 1:return new a(b[0]);case 2:return new a(b[0],b[1]);case 3:return new a(b[0],b[1],b[2]);case 4:return new a(b[0],b[1],b[2],b[3])}var d=[null];return d.push.apply(d,b),new(j.apply(a,d))}var i=c.prototype,n=e(h(i)?i:Object.prototype),o=Function.apply.call(a,n,b);return h(o)?o:n}})},function(a,b,c){var d=c(9),e=c(6),f=c(10),g=c(14);e(e.S+e.F*c(5)(function(){Reflect.defineProperty(d.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function defineProperty(a,b,c){f(a),b=g(b,!0),f(c);try{return d.f(a,b,c),!0}catch(e){return!1}}})},function(a,b,c){var d=c(6),e=c(49).f,f=c(10);d(d.S,"Reflect",{deleteProperty:function deleteProperty(a,b){var c=e(f(a),b);return!(c&&!c.configurable)&&delete a[b]}})},function(a,b,d){var e=d(6),f=d(10),g=function(a){this._t=f(a),this._i=0;var b,c=this._k=[];for(b in a)c.push(b)};d(136)(g,"Object",function(){var a,b=this,d=b._k;do if(b._i>=d.length)return{value:c,done:!0};while(!((a=d[b._i++])in b._t));return{value:a,done:!1}}),e(e.S,"Reflect",{enumerate:function enumerate(a){return new g(a)}})},function(a,b,d){function get(a,b){var d,h,k=arguments.length<3?a:arguments[2];return j(a)===k?a[b]:(d=e.f(a,b))?g(d,"value")?d.value:d.get!==c?d.get.call(k):c:i(h=f(a))?get(h,b,k):void 0}var e=d(49),f=d(57),g=d(3),h=d(6),i=d(11),j=d(10);h(h.S,"Reflect",{get:get})},function(a,b,c){var d=c(49),e=c(6),f=c(10);e(e.S,"Reflect",{getOwnPropertyDescriptor:function getOwnPropertyDescriptor(a,b){return d.f(f(a),b)}})},function(a,b,c){var d=c(6),e=c(57),f=c(10);d(d.S,"Reflect",{getPrototypeOf:function getPrototypeOf(a){return e(f(a))}})},function(a,b,c){var d=c(6);d(d.S,"Reflect",{has:function has(a,b){return b in a}})},function(a,b,c){var d=c(6),e=c(10),f=Object.isExtensible;d(d.S,"Reflect",{isExtensible:function isExtensible(a){return e(a),!f||f(a)}})},function(a,b,c){var d=c(6);d(d.S,"Reflect",{ownKeys:c(221)})},function(a,b,c){var d=c(48),e=c(41),f=c(10),g=c(2).Reflect;a.exports=g&&g.ownKeys||function ownKeys(a){var b=d.f(f(a)),c=e.f;return c?b.concat(c(a)):b}},function(a,b,c){var d=c(6),e=c(10),f=Object.preventExtensions;d(d.S,"Reflect",{preventExtensions:function preventExtensions(a){e(a);try{return f&&f(a),!0}catch(b){return!1}}})},function(a,b,d){function set(a,b,d){var i,m,n=arguments.length<4?a:arguments[3],o=f.f(k(a),b);if(!o){if(l(m=g(a)))return set(m,b,d,n);o=j(0)}return h(o,"value")?!(o.writable===!1||!l(n))&&(i=f.f(n,b)||j(0),i.value=d,e.f(n,b,i),!0):o.set!==c&&(o.set.call(n,d),!0)}var e=d(9),f=d(49),g=d(57),h=d(3),i=d(6),j=d(15),k=d(10),l=d(11);i(i.S,"Reflect",{set:set})},function(a,b,c){var d=c(6),e=c(71);e&&d(d.S,"Reflect",{setPrototypeOf:function setPrototypeOf(a,b){e.check(a,b);try{return e.set(a,b),!0}catch(c){return!1}}})},function(a,b,c){var d=c(6);d(d.S,"Date",{now:function(){return(new Date).getTime()}})},function(a,b,c){var d=c(6),e=c(56),f=c(14);d(d.P+d.F*c(5)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function toJSON(a){var b=e(this),c=f(b);return"number"!=typeof c||isFinite(c)?b.toISOString():null}})},function(a,b,c){var d=c(6),e=c(5),f=Date.prototype.getTime,g=function(a){return a>9?a:"0"+a};d(d.P+d.F*(e(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!e(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function toISOString(){if(!isFinite(f.call(this)))throw RangeError("Invalid time value");var a=this,b=a.getUTCFullYear(),c=a.getUTCMilliseconds(),d=b<0?"-":b>9999?"+":"";return d+("00000"+Math.abs(b)).slice(d?-6:-4)+"-"+g(a.getUTCMonth()+1)+"-"+g(a.getUTCDate())+"T"+g(a.getUTCHours())+":"+g(a.getUTCMinutes())+":"+g(a.getUTCSeconds())+"."+(c>99?c:"0"+g(c))+"Z"}})},function(a,b,c){var d=Date.prototype,e="Invalid Date",f="toString",g=d[f],h=d.getTime;new Date(NaN)+""!=e&&c(16)(d,f,function toString(){var a=h.call(this);return a===a?g.call(this):e})},function(a,b,c){var d=c(23)("toPrimitive"),e=Date.prototype;d in e||c(8)(e,d,c(230))},function(a,b,c){var d=c(10),e=c(14),f="number";a.exports=function(a){if("string"!==a&&a!==f&&"default"!==a)throw TypeError("Incorrect hint");return e(d(this),a!=f)}},function(a,b,d){var e=d(6),f=d(232),g=d(233),h=d(10),i=d(37),j=d(35),k=d(11),l=d(2).ArrayBuffer,m=d(199),n=g.ArrayBuffer,o=g.DataView,p=f.ABV&&l.isView,q=n.prototype.slice,r=f.VIEW,s="ArrayBuffer";e(e.G+e.W+e.F*(l!==n),{ArrayBuffer:n}),e(e.S+e.F*!f.CONSTR,s,{isView:function isView(a){return p&&p(a)||k(a)&&r in a}}),e(e.P+e.U+e.F*d(5)(function(){return!new n(2).slice(1,c).byteLength}),s,{slice:function slice(a,b){if(q!==c&&b===c)return q.call(h(this),a);for(var d=h(this).byteLength,e=i(a,d),f=i(b===c?d:b,d),g=new(m(this,n))(j(f-e)),k=new o(this),l=new o(g),p=0;e>1,k=23===b?E(2,-24)-E(2,-77):0,l=0,m=a<0||0===a&&1/a<0?1:0;for(a=D(a),a!=a||a===B?(e=a!=a?1:0,d=i):(d=F(G(a)/H),a*(f=E(2,-d))<1&&(d--,f*=2),a+=d+j>=1?k/f:k*E(2,1-j),a*f>=2&&(d++,f/=2),d+j>=i?(e=0,d=i):d+j>=1?(e=(a*f-1)*E(2,b),d+=j):(e=a*E(2,j-1)*E(2,b),d=0));b>=8;g[l++]=255&e,e/=256,b-=8);for(d=d<0;g[l++]=255&d,d/=256,h-=8);return g[--l]|=128*m,g},P=function(a,b,c){var d,e=8*c-b-1,f=(1<>1,h=e-7,i=c-1,j=a[i--],k=127&j;for(j>>=7;h>0;k=256*k+a[i],i--,h-=8);for(d=k&(1<<-h)-1,k>>=-h,h+=b;h>0;d=256*d+a[i],i--,h-=8);if(0===k)k=1-g;else{if(k===f)return d?NaN:j?-B:B;d+=E(2,b),k-=g}return(j?-1:1)*d*E(2,k-b)},Q=function(a){return a[3]<<24|a[2]<<16|a[1]<<8|a[0]},R=function(a){return[255&a]},S=function(a){return[255&a,a>>8&255]},T=function(a){return[255&a,a>>8&255,a>>16&255,a>>24&255]},U=function(a){return O(a,52,8)},V=function(a){return O(a,23,4)},W=function(a,b,c){p(a[u],b,{get:function(){return this[c]}})},X=function(a,b,c,d){var e=+c,f=m(e);if(e!=f||f<0||f+b>a[M])throw A(w);var g=a[L]._b,h=f+a[N],i=g.slice(h,h+b);return d?i:i.reverse()},Y=function(a,b,c,d,e,f){var g=+c,h=m(g);if(g!=h||h<0||h+b>a[M])throw A(w);for(var i=a[L]._b,j=h+a[N],k=d(+e),l=0;lba;)($=aa[ba++])in x||i(x,$,C[$]);g||(_.constructor=x)}var ca=new y(new x(2)),da=y[u].setInt8;ca.setInt8(0,2147483648),ca.setInt8(1,2147483649),!ca.getInt8(0)&&ca.getInt8(1)||j(y[u],{setInt8:function setInt8(a,b){da.call(this,a,b<<24>>24)},setUint8:function setUint8(a,b){da.call(this,a,b<<24>>24)}},!0)}else x=function ArrayBuffer(a){var b=Z(this,a);this._b=q.call(Array(b),0),this[M]=b},y=function DataView(a,b,d){l(this,y,t),l(a,x,t);var e=a[M],f=m(b);if(f<0||f>e)throw A("Wrong offset!");if(d=d===c?e-f:n(d),f+d>e)throw A(v);this[L]=a,this[N]=f,this[M]=d},f&&(W(x,J,"_l"),W(y,I,"_b"),W(y,J,"_l"),W(y,K,"_o")),j(y[u],{getInt8:function getInt8(a){return X(this,1,a)[0]<<24>>24},getUint8:function getUint8(a){return X(this,1,a)[0]},getInt16:function getInt16(a){var b=X(this,2,a,arguments[1]);return(b[1]<<8|b[0])<<16>>16},getUint16:function getUint16(a){var b=X(this,2,a,arguments[1]);return b[1]<<8|b[0]},getInt32:function getInt32(a){return Q(X(this,4,a,arguments[1]))},getUint32:function getUint32(a){return Q(X(this,4,a,arguments[1]))>>>0},getFloat32:function getFloat32(a){return P(X(this,4,a,arguments[1]),23,4)},getFloat64:function getFloat64(a){return P(X(this,8,a,arguments[1]),52,8)},setInt8:function setInt8(a,b){Y(this,1,a,R,b)},setUint8:function setUint8(a,b){Y(this,1,a,R,b)},setInt16:function setInt16(a,b){Y(this,2,a,S,b,arguments[2])},setUint16:function setUint16(a,b){Y(this,2,a,S,b,arguments[2])},setInt32:function setInt32(a,b){Y(this,4,a,T,b,arguments[2])},setUint32:function setUint32(a,b){Y(this,4,a,T,b,arguments[2])},setFloat32:function setFloat32(a,b){Y(this,4,a,V,b,arguments[2])},setFloat64:function setFloat64(a,b){Y(this,8,a,U,b,arguments[2])}});r(x,s),r(y,t),i(y[u],h.VIEW,!0),b[s]=x,b[t]=y},function(a,b,c){var d=c(6);d(d.G+d.W+d.F*!c(232).ABV,{DataView:c(233).DataView})},function(a,b,c){c(236)("Int8",1,function(a){return function Int8Array(b,c,d){return a(this,b,c,d)}})},function(a,b,d){if(d(4)){var e=d(26),f=d(2),g=d(5),h=d(6),i=d(232),j=d(233),k=d(18),l=d(197),m=d(15),n=d(8),o=d(202),p=d(36),q=d(35),r=d(37),s=d(14),t=d(3),u=d(69),v=d(73),w=d(11),x=d(56),y=d(154),z=d(44),A=d(57),B=d(48).f,C=d(156),D=d(17),E=d(23),F=d(164),G=d(34),H=d(199),I=d(183),J=d(135),K=d(157),L=d(186),M=d(180),N=d(177),O=d(9),P=d(49),Q=O.f,R=P.f,S=f.RangeError,T=f.TypeError,U=f.Uint8Array,V="ArrayBuffer",W="Shared"+V,X="BYTES_PER_ELEMENT",Y="prototype",Z=Array[Y],$=j.ArrayBuffer,_=j.DataView,aa=F(0),ba=F(2),ca=F(3),da=F(4),ea=F(5),fa=F(6),ga=G(!0),ha=G(!1),ia=I.values,ja=I.keys,ka=I.entries,la=Z.lastIndexOf,ma=Z.reduce,na=Z.reduceRight,oa=Z.join,pa=Z.sort,qa=Z.slice,ra=Z.toString,sa=Z.toLocaleString,ta=E("iterator"),ua=E("toStringTag"),va=D("typed_constructor"),wa=D("def_constructor"),xa=i.CONSTR,ya=i.TYPED,za=i.VIEW,Aa="Wrong length!",Ba=F(1,function(a,b){return Ha(H(a,a[wa]),b)}),Ca=g(function(){return 1===new U(new Uint16Array([1]).buffer)[0]}),Da=!!U&&!!U[Y].set&&g(function(){new U(1).set({})}),Ea=function(a,b){if(a===c)throw T(Aa);var d=+a,e=q(a);if(b&&!u(d,e))throw S(Aa);return e},Fa=function(a,b){var c=p(a);if(c<0||c%b)throw S("Wrong offset!");return c},Ga=function(a){if(w(a)&&ya in a)return a;throw T(a+" is not a typed array!")},Ha=function(a,b){if(!(w(a)&&va in a))throw T("It is not a typed array constructor!");return new a(b)},Ia=function(a,b){return Ja(H(a,a[wa]),b)},Ja=function(a,b){for(var c=0,d=b.length,e=Ha(a,d);d>c;)e[c]=b[c++];return e},Ka=function(a,b,c){Q(a,b,{get:function(){return this._d[c]}})},La=function from(a){var b,d,e,f,g,h,i=x(a),j=arguments.length,l=j>1?arguments[1]:c,m=l!==c,n=C(i);if(n!=c&&!y(n)){for(h=n.call(i),e=[],b=0;!(g=h.next()).done;b++)e.push(g.value);i=e}for(m&&j>2&&(l=k(l,arguments[2],2)),b=0,d=q(i.length),f=Ha(this,d);d>b;b++)f[b]=m?l(i[b],b):i[b];return f},Ma=function of(){for(var a=0,b=arguments.length,c=Ha(this,b);b>a;)c[a]=arguments[a++];return c},Na=!!U&&g(function(){sa.call(new U(1))}),Oa=function toLocaleString(){return sa.apply(Na?qa.call(Ga(this)):Ga(this),arguments)},Pa={copyWithin:function copyWithin(a,b){return N.call(Ga(this),a,b,arguments.length>2?arguments[2]:c)},every:function every(a){return da(Ga(this),a,arguments.length>1?arguments[1]:c)},fill:function fill(a){return M.apply(Ga(this),arguments)},filter:function filter(a){return Ia(this,ba(Ga(this),a,arguments.length>1?arguments[1]:c))},find:function find(a){return ea(Ga(this),a,arguments.length>1?arguments[1]:c)},findIndex:function findIndex(a){return fa(Ga(this),a,arguments.length>1?arguments[1]:c)},forEach:function forEach(a){aa(Ga(this),a,arguments.length>1?arguments[1]:c)},indexOf:function indexOf(a){return ha(Ga(this),a,arguments.length>1?arguments[1]:c)},includes:function includes(a){return ga(Ga(this),a,arguments.length>1?arguments[1]:c); +},join:function join(a){return oa.apply(Ga(this),arguments)},lastIndexOf:function lastIndexOf(a){return la.apply(Ga(this),arguments)},map:function map(a){return Ba(Ga(this),a,arguments.length>1?arguments[1]:c)},reduce:function reduce(a){return ma.apply(Ga(this),arguments)},reduceRight:function reduceRight(a){return na.apply(Ga(this),arguments)},reverse:function reverse(){for(var a,b=this,c=Ga(b).length,d=Math.floor(c/2),e=0;e1?arguments[1]:c)},sort:function sort(a){return pa.call(Ga(this),a)},subarray:function subarray(a,b){var d=Ga(this),e=d.length,f=r(a,e);return new(H(d,d[wa]))(d.buffer,d.byteOffset+f*d.BYTES_PER_ELEMENT,q((b===c?e:r(b,e))-f))}},Qa=function slice(a,b){return Ia(this,qa.call(Ga(this),a,b))},Ra=function set(a){Ga(this);var b=Fa(arguments[1],1),c=this.length,d=x(a),e=q(d.length),f=0;if(e+b>c)throw S(Aa);for(;f255?255:255&d),e.v[p](c*b+e.o,d,Ca)},E=function(a,b){Q(a,b,{get:function(){return C(this,b)},set:function(a){return D(this,b,a)},enumerable:!0})};u?(r=d(function(a,d,e,f){l(a,r,k,"_d");var g,h,i,j,m=0,o=0;if(w(d)){if(!(d instanceof $||(j=v(d))==V||j==W))return ya in d?Ja(r,d):La.call(r,d);g=d,o=Fa(e,b);var p=d.byteLength;if(f===c){if(p%b)throw S(Aa);if(h=p-o,h<0)throw S(Aa)}else if(h=q(f)*b,h+o>p)throw S(Aa);i=h/b}else i=Ea(d,!0),h=i*b,g=new $(h);for(n(a,"_d",{b:g,o:o,l:h,e:i,v:new _(g)});m1?arguments[1]:c)}}),d(178)("includes")},function(a,b,c){var d=c(6),e=c(125)(!0);d(d.P,"String",{at:function at(a){return e(this,a)}})},function(a,b,d){var e=d(6),f=d(248);e(e.P,"String",{padStart:function padStart(a){return f(this,a,arguments.length>1?arguments[1]:c,!0)}})},function(a,b,d){var e=d(35),f=d(85),g=d(33);a.exports=function(a,b,d,h){var i=String(g(a)),j=i.length,k=d===c?" ":String(d),l=e(b);if(l<=j||""==k)return i;var m=l-j,n=f.call(k,Math.ceil(m/k.length));return n.length>m&&(n=n.slice(0,m)),h?n+i:i+n}},function(a,b,d){var e=d(6),f=d(248);e(e.P,"String",{padEnd:function padEnd(a){return f(this,a,arguments.length>1?arguments[1]:c,!1)}})},function(a,b,c){c(81)("trimLeft",function(a){return function trimLeft(){return a(this,1)}},"trimStart")},function(a,b,c){c(81)("trimRight",function(a){return function trimRight(){return a(this,2)}},"trimEnd")},function(a,b,c){var d=c(6),e=c(33),f=c(35),g=c(128),h=c(188),i=RegExp.prototype,j=function(a,b){this._r=a,this._s=b};c(136)(j,"RegExp String",function next(){var a=this._r.exec(this._s);return{value:a,done:null===a}}),d(d.P,"String",{matchAll:function matchAll(a){if(e(this),!g(a))throw TypeError(a+" is not a regexp!");var b=String(this),c="flags"in i?String(a.flags):h.call(a),d=new RegExp(a.source,~c.indexOf("g")?c:"g"+c);return d.lastIndex=f(a.lastIndex),new j(d,b)}})},function(a,b,c){c(25)("asyncIterator")},function(a,b,c){c(25)("observable")},function(a,b,c){var d=c(6),e=c(221),f=c(30),g=c(49),h=c(155);d(d.S,"Object",{getOwnPropertyDescriptors:function getOwnPropertyDescriptors(a){for(var b,c=f(a),d=g.f,i=e(c),j={},k=0;i.length>k;)h(j,b=i[k++],d(c,b));return j}})},function(a,b,c){var d=c(6),e=c(257)(!1);d(d.S,"Object",{values:function values(a){return e(a)}})},function(a,b,c){var d=c(28),e=c(30),f=c(42).f;a.exports=function(a){return function(b){for(var c,g=e(b),h=d(g),i=h.length,j=0,k=[];i>j;)f.call(g,c=h[j++])&&k.push(a?[c,g[c]]:g[c]);return k}}},function(a,b,c){var d=c(6),e=c(257)(!0);d(d.S,"Object",{entries:function entries(a){return e(a)}})},function(a,b,c){var d=c(6),e=c(56),f=c(19),g=c(9);c(4)&&d(d.P+c(260),"Object",{__defineGetter__:function __defineGetter__(a,b){g.f(e(this),a,{get:f(b),enumerable:!0,configurable:!0})}})},function(a,b,c){a.exports=c(26)||!c(5)(function(){var a=Math.random();__defineSetter__.call(null,a,function(){}),delete c(2)[a]})},function(a,b,c){var d=c(6),e=c(56),f=c(19),g=c(9);c(4)&&d(d.P+c(260),"Object",{__defineSetter__:function __defineSetter__(a,b){g.f(e(this),a,{set:f(b),enumerable:!0,configurable:!0})}})},function(a,b,c){var d=c(6),e=c(56),f=c(14),g=c(57),h=c(49).f;c(4)&&d(d.P+c(260),"Object",{__lookupGetter__:function __lookupGetter__(a){var b,c=e(this),d=f(a,!0);do if(b=h(c,d))return b.get;while(c=g(c))}})},function(a,b,c){var d=c(6),e=c(56),f=c(14),g=c(57),h=c(49).f;c(4)&&d(d.P+c(260),"Object",{__lookupSetter__:function __lookupSetter__(a){var b,c=e(this),d=f(a,!0);do if(b=h(c,d))return b.set;while(c=g(c))}})},function(a,b,c){var d=c(6);d(d.P+d.R,"Map",{toJSON:c(265)("Map")})},function(a,b,c){var d=c(73),e=c(266);a.exports=function(a){return function toJSON(){if(d(this)!=a)throw TypeError(a+"#toJSON isn't generic");return e(this)}}},function(a,b,c){var d=c(198);a.exports=function(a,b){var c=[];return d(a,!1,c.push,c,b),c}},function(a,b,c){var d=c(6);d(d.P+d.R,"Set",{toJSON:c(265)("Set")})},function(a,b,c){var d=c(6);d(d.S,"System",{global:c(2)})},function(a,b,c){var d=c(6),e=c(32);d(d.S,"Error",{isError:function isError(a){return"Error"===e(a)}})},function(a,b,c){var d=c(6);d(d.S,"Math",{iaddh:function iaddh(a,b,c,d){var e=a>>>0,f=b>>>0,g=c>>>0;return f+(d>>>0)+((e&g|(e|g)&~(e+g>>>0))>>>31)|0}})},function(a,b,c){var d=c(6);d(d.S,"Math",{isubh:function isubh(a,b,c,d){var e=a>>>0,f=b>>>0,g=c>>>0;return f-(d>>>0)-((~e&g|~(e^g)&e-g>>>0)>>>31)|0}})},function(a,b,c){var d=c(6);d(d.S,"Math",{imulh:function imulh(a,b){var c=65535,d=+a,e=+b,f=d&c,g=e&c,h=d>>16,i=e>>16,j=(h*g>>>0)+(f*g>>>16);return h*i+(j>>16)+((f*i>>>0)+(j&c)>>16)}})},function(a,b,c){var d=c(6);d(d.S,"Math",{umulh:function umulh(a,b){var c=65535,d=+a,e=+b,f=d&c,g=e&c,h=d>>>16,i=e>>>16,j=(h*g>>>0)+(f*g>>>16);return h*i+(j>>>16)+((f*i>>>0)+(j&c)>>>16)}})},function(a,b,c){var d=c(275),e=c(10),f=d.key,g=d.set;d.exp({defineMetadata:function defineMetadata(a,b,c,d){g(a,b,e(c),f(d))}})},function(a,b,d){var e=d(203),f=d(6),g=d(21)("metadata"),h=g.store||(g.store=new(d(207))),i=function(a,b,d){var f=h.get(a);if(!f){if(!d)return c;h.set(a,f=new e)}var g=f.get(b);if(!g){if(!d)return c;f.set(b,g=new e)}return g},j=function(a,b,d){var e=i(b,d,!1);return e!==c&&e.has(a)},k=function(a,b,d){var e=i(b,d,!1);return e===c?c:e.get(a)},l=function(a,b,c,d){i(c,d,!0).set(a,b)},m=function(a,b){var c=i(a,b,!1),d=[];return c&&c.forEach(function(a,b){d.push(b)}),d},n=function(a){return a===c||"symbol"==typeof a?a:String(a)},o=function(a){f(f.S,"Reflect",a)};a.exports={store:h,map:i,has:j,get:k,set:l,keys:m,key:n,exp:o}},function(a,b,d){var e=d(275),f=d(10),g=e.key,h=e.map,i=e.store;e.exp({deleteMetadata:function deleteMetadata(a,b){var d=arguments.length<3?c:g(arguments[2]),e=h(f(b),d,!1);if(e===c||!e["delete"](a))return!1;if(e.size)return!0;var j=i.get(b);return j["delete"](d),!!j.size||i["delete"](b)}})},function(a,b,d){var e=d(275),f=d(10),g=d(57),h=e.has,i=e.get,j=e.key,k=function(a,b,d){var e=h(a,b,d);if(e)return i(a,b,d);var f=g(b);return null!==f?k(a,f,d):c};e.exp({getMetadata:function getMetadata(a,b){return k(a,f(b),arguments.length<3?c:j(arguments[2]))}})},function(a,b,d){var e=d(206),f=d(266),g=d(275),h=d(10),i=d(57),j=g.keys,k=g.key,l=function(a,b){var c=j(a,b),d=i(a);if(null===d)return c;var g=l(d,b);return g.length?c.length?f(new e(c.concat(g))):g:c};g.exp({getMetadataKeys:function getMetadataKeys(a){return l(h(a),arguments.length<2?c:k(arguments[1]))}})},function(a,b,d){var e=d(275),f=d(10),g=e.get,h=e.key;e.exp({getOwnMetadata:function getOwnMetadata(a,b){return g(a,f(b),arguments.length<3?c:h(arguments[2]))}})},function(a,b,d){var e=d(275),f=d(10),g=e.keys,h=e.key;e.exp({getOwnMetadataKeys:function getOwnMetadataKeys(a){return g(f(a),arguments.length<2?c:h(arguments[1]))}})},function(a,b,d){var e=d(275),f=d(10),g=d(57),h=e.has,i=e.key,j=function(a,b,c){var d=h(a,b,c);if(d)return!0;var e=g(b);return null!==e&&j(a,e,c)};e.exp({hasMetadata:function hasMetadata(a,b){return j(a,f(b),arguments.length<3?c:i(arguments[2]))}})},function(a,b,d){var e=d(275),f=d(10),g=e.has,h=e.key;e.exp({hasOwnMetadata:function hasOwnMetadata(a,b){return g(a,f(b),arguments.length<3?c:h(arguments[2]))}})},function(a,b,d){var e=d(275),f=d(10),g=d(19),h=e.key,i=e.set;e.exp({metadata:function metadata(a,b){return function decorator(d,e){i(a,b,(e!==c?f:g)(d),h(e))}}})},function(a,b,c){var d=c(6),e=c(201)(),f=c(2).process,g="process"==c(32)(f);d(d.G,{asap:function asap(a){var b=g&&f.domain;e(b?b.bind(a):a)}})},function(a,b,d){var e=d(6),f=d(2),g=d(7),h=d(201)(),i=d(23)("observable"),j=d(19),k=d(10),l=d(197),m=d(202),n=d(8),o=d(198),p=o.RETURN,q=function(a){return null==a?c:j(a)},r=function(a){var b=a._c;b&&(a._c=c,b())},s=function(a){return a._o===c},t=function(a){s(a)||(a._o=c,r(a))},u=function(a,b){k(a),this._c=c,this._o=a,a=new v(this);try{var d=b(a),e=d;null!=d&&("function"==typeof d.unsubscribe?d=function(){e.unsubscribe()}:j(d),this._c=d)}catch(f){return void a.error(f)}s(this)&&r(this)};u.prototype=m({},{unsubscribe:function unsubscribe(){t(this)}});var v=function(a){this._s=a};v.prototype=m({},{next:function next(a){var b=this._s;if(!s(b)){var c=b._o;try{var d=q(c.next);if(d)return d.call(c,a)}catch(e){try{t(b)}finally{throw e}}}},error:function error(a){var b=this._s;if(s(b))throw a;var d=b._o;b._o=c;try{var e=q(d.error);if(!e)throw a;a=e.call(d,a)}catch(f){try{r(b)}finally{throw f}}return r(b),a},complete:function complete(a){var b=this._s;if(!s(b)){var d=b._o;b._o=c;try{var e=q(d.complete);a=e?e.call(d,a):c}catch(f){try{r(b)}finally{throw f}}return r(b),a}}});var w=function Observable(a){l(this,w,"Observable","_f")._f=j(a)};m(w.prototype,{subscribe:function subscribe(a){return new u(a,this._f)},forEach:function forEach(a){var b=this;return new(g.Promise||f.Promise)(function(c,d){j(a);var e=b.subscribe({next:function(b){try{return a(b)}catch(c){d(c),e.unsubscribe()}},error:d,complete:c})})}}),m(w,{from:function from(a){var b="function"==typeof this?this:w,c=q(k(a)[i]);if(c){var d=k(c.call(a));return d.constructor===b?d:new b(function(a){return d.subscribe(a)})}return new b(function(b){var c=!1;return h(function(){if(!c){try{if(o(a,!1,function(a){if(b.next(a),c)return p})===p)return}catch(d){if(c)throw d;return void b.error(d)}b.complete()}}),function(){c=!0}})},of:function of(){for(var a=0,b=arguments.length,c=Array(b);ag;)(c[g]=arguments[g++])===h&&(i=!0);return function(){var d,f=this,g=arguments.length,j=0,k=0;if(!i&&!g)return e(a,c,f);if(d=c.slice(),i)for(;b>j;j++)d[j]===h&&(d[j]=arguments[k++]);for(;g>k;)d.push(arguments[k++]);return e(a,d,f)}}},function(a,b,c){a.exports=c(2)},function(a,b,d){function Dict(a){var b=i(null);return a!=c&&(p(a)?o(a,!0,function(a,c){b[a]=c}):h(b,a)),b}function reduce(a,b,c){n(b);var d,e,f=t(a),g=k(f),h=g.length,i=0;if(arguments.length<3){if(!h)throw TypeError("Reduce of empty object with no initial value");d=f[g[i++]]}else d=Object(c);for(;h>i;)v(f,e=g[i++])&&(d=b(d,f[e],e,a));return d}function includes(a,b){return(b==b?m(a,b):x(a,function(a){return a!=a}))!==c}function get(a,b){if(v(a,b))return a[b]}function set(a,b,c){return u&&b in Object?l.f(a,b,g(0,c)):a[b]=c,a}function isDict(a){return s(a)&&j(a)===Dict.prototype}var e=d(18),f=d(6),g=d(15),h=d(67),i=d(44),j=d(57),k=d(28),l=d(9),m=d(27),n=d(19),o=d(198),p=d(292),q=d(136),r=d(184),s=d(11),t=d(30),u=d(4),v=d(3),w=function(a){var b=1==a,d=4==a;return function(f,g,h){var i,j,k,l=e(g,h,3),m=t(f),n=b||7==a||2==a?new("function"==typeof this?this:Dict):c;for(i in m)if(v(m,i)&&(j=m[i],k=l(j,i,f),a))if(b)n[i]=k;else if(k)switch(a){case 2:n[i]=j;break;case 3:return!0;case 5:return j;case 6:return i;case 7:n[k[0]]=k[1]}else if(d)return!1;return 3==a||d?d:n}},x=w(6),y=function(a){return function(b){return new z(b,a)}},z=function(a,b){this._t=t(a),this._a=k(a),this._i=0,this._k=b};q(z,"Dict",function(){var a,b=this,d=b._t,e=b._a,f=b._k;do if(b._i>=e.length)return b._t=c,r(1);while(!v(d,a=e[b._i++]));return"keys"==f?r(0,a):"values"==f?r(0,d[a]):r(0,[a,d[a]])}),Dict.prototype=null,f(f.G+f.F,{Dict:Dict}),f(f.S,"Dict",{keys:y("keys"),values:y("values"),entries:y("entries"),forEach:w(0),map:w(1),filter:w(2),some:w(3),every:w(4),find:w(5),findKey:x,mapPairs:w(7),reduce:reduce,keyOf:m,includes:includes,has:v,get:get,set:set,isDict:isDict})},function(a,b,d){var e=d(73),f=d(23)("iterator"),g=d(135);a.exports=d(7).isIterable=function(a){var b=Object(a);return b[f]!==c||"@@iterator"in b||g.hasOwnProperty(e(b))}},function(a,b,c){var d=c(10),e=c(156);a.exports=c(7).getIterator=function(a){var b=e(a);if("function"!=typeof b)throw TypeError(a+" is not iterable!");return d(b.call(a))}},function(a,b,c){var d=c(2),e=c(7),f=c(6),g=c(289);f(f.G+f.F,{delay:function delay(a){return new(e.Promise||d.Promise)(function(b){setTimeout(g.call(b,!0),a)})}})},function(a,b,c){var d=c(290),e=c(6);c(7)._=d._=d._||{},e(e.P+e.F,"Function",{part:c(289)})},function(a,b,c){var d=c(6);d(d.S+d.F,"Object",{isObject:c(11)})},function(a,b,c){var d=c(6);d(d.S+d.F,"Object",{classof:c(73)})},function(a,b,c){var d=c(6),e=c(299);d(d.S+d.F,"Object",{define:e})},function(a,b,c){var d=c(9),e=c(49),f=c(221),g=c(30);a.exports=function define(a,b){for(var c,h=f(g(b)),i=h.length,j=0;i>j;)d.f(a,c=h[j++],e.f(b,c));return a}},function(a,b,c){var d=c(6),e=c(299),f=c(44);d(d.S+d.F,"Object",{make:function(a,b){return e(f(a),b)}})},function(a,b,d){d(134)(Number,"Number",function(a){this._l=+a,this._i=0},function(){var a=this._i++,b=!(a"']/g,{"&":"&","<":"<",">":">",'"':""","'":"'"});d(d.P+d.F,"String",{escapeHTML:function escapeHTML(){return e(this)}})},function(a,b,c){var d=c(6),e=c(303)(/&(?:amp|lt|gt|quot|apos);/g,{"&":"&","<":"<",">":">",""":'"',"'":"'"});d(d.P+d.F,"String",{unescapeHTML:function unescapeHTML(){return e(this)}})}]),"undefined"!=typeof module&&module.exports?module.exports=a:"function"==typeof define&&define.amd?define(function(){return a}):b.core=a}(1,1); +//# sourceMappingURL=core.min.js.map \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/client/core.min.js.map b/pitfall/pdfkit/node_modules/core-js/client/core.min.js.map new file mode 100644 index 00000000..bc3ffc58 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/client/core.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["core.js"],"names":["__e","__g","undefined","modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","global","has","DESCRIPTORS","$export","redefine","META","KEY","$fails","shared","setToStringTag","uid","wks","wksExt","wksDefine","keyOf","enumKeys","isArray","anObject","toIObject","toPrimitive","createDesc","_create","gOPNExt","$GOPD","$DP","$keys","gOPD","f","dP","gOPN","$Symbol","Symbol","$JSON","JSON","_stringify","stringify","PROTOTYPE","HIDDEN","TO_PRIMITIVE","isEnum","propertyIsEnumerable","SymbolRegistry","AllSymbols","OPSymbols","ObjectProto","Object","USE_NATIVE","QObject","setter","findChild","setSymbolDesc","get","this","value","a","it","key","D","protoDesc","wrap","tag","sym","_k","isSymbol","iterator","$defineProperty","defineProperty","enumerable","$defineProperties","defineProperties","P","keys","i","l","length","$create","create","$propertyIsEnumerable","E","$getOwnPropertyDescriptor","getOwnPropertyDescriptor","$getOwnPropertyNames","getOwnPropertyNames","names","result","push","$getOwnPropertySymbols","getOwnPropertySymbols","IS_OP","TypeError","arguments","$set","configurable","set","toString","name","G","W","F","symbols","split","store","S","for","keyFor","useSetter","useSimple","replacer","$replacer","args","apply","valueOf","Math","window","self","Function","hasOwnProperty","exec","e","core","hide","ctx","type","source","own","out","exp","IS_FORCED","IS_GLOBAL","IS_STATIC","IS_PROTO","IS_BIND","B","target","expProto","U","R","version","object","IE8_DOM_DEFINE","O","Attributes","isObject","document","is","createElement","fn","val","bitmap","writable","SRC","TO_STRING","$toString","TPL","inspectSource","safe","isFunction","join","String","prototype","px","random","concat","aFunction","that","b","setDesc","isExtensible","FREEZE","preventExtensions","setMeta","w","fastKey","getWeak","onFreeze","meta","NEED","SHARED","def","TAG","stat","USE_SYMBOL","$exports","LIBRARY","charAt","getKeys","el","index","enumBugKeys","arrayIndexOf","IE_PROTO","IObject","defined","cof","slice","toLength","toIndex","IS_INCLUDES","$this","fromIndex","toInteger","min","ceil","floor","isNaN","max","gOPS","pIE","getSymbols","Array","arg","dPs","Empty","createDict","iframeDocument","iframe","lt","gt","style","display","appendChild","src","contentWindow","open","write","close","Properties","documentElement","windowNames","getWindowNames","hiddenKeys","fails","toObject","$getPrototypeOf","getPrototypeOf","constructor","$freeze","freeze","$seal","seal","$preventExtensions","$isFrozen","isFrozen","$isSealed","isSealed","$isExtensible","assign","$assign","A","K","forEach","k","T","aLen","j","x","y","setPrototypeOf","check","proto","test","buggy","__proto__","classof","ARG","tryGet","callee","bind","invoke","arraySlice","factories","construct","len","n","partArgs","bound","un","FProto","nameRE","NAME","match","HAS_INSTANCE","FunctionProto","inheritIfRequired","$trim","trim","NUMBER","$Number","Base","BROKEN_COF","TRIM","toNumber","argument","third","radix","maxCode","first","charCodeAt","NaN","code","digits","parseInt","Number","C","spaces","space","non","ltrim","RegExp","rtrim","exporter","ALIAS","FORCE","string","TYPE","replace","aNumberValue","repeat","$toFixed","toFixed","data","ERROR","ZERO","multiply","c2","divide","numToString","s","t","pow","acc","log","x2","fractionDigits","z","RangeError","msg","count","str","res","Infinity","$toPrecision","toPrecision","precision","EPSILON","_isFinite","isFinite","isInteger","number","abs","isSafeInteger","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","$parseFloat","parseFloat","$parseInt","ws","hex","log1p","sqrt","$acosh","acosh","MAX_VALUE","LN2","asinh","$asinh","$atanh","atanh","sign","cbrt","clz32","LOG2E","cosh","$expm1","expm1","EPSILON32","MAX32","MIN32","roundTiesToEven","fround","$abs","$sign","hypot","value1","value2","div","sum","larg","$imul","imul","UINT16","xn","yn","xl","yl","log10","LN10","log2","sinh","tanh","trunc","fromCharCode","$fromCodePoint","fromCodePoint","raw","callSite","tpl","$at","codePointAt","pos","context","ENDS_WITH","$endsWith","endsWith","searchString","endPosition","end","search","isRegExp","MATCH","re","INCLUDES","includes","indexOf","STARTS_WITH","$startsWith","startsWith","iterated","_t","_i","point","done","Iterators","$iterCreate","ITERATOR","BUGGY","FF_ITERATOR","KEYS","VALUES","returnThis","Constructor","next","DEFAULT","IS_SET","FORCED","methods","IteratorPrototype","getMethod","kind","values","entries","DEF_VALUES","VALUES_BUG","$native","$default","$entries","$anyNative","descriptor","createHTML","anchor","quot","attribute","p1","toLowerCase","big","blink","bold","fixed","fontcolor","color","fontsize","size","italics","link","url","small","strike","sub","sup","isArrayIter","createProperty","getIterFn","iter","from","arrayLike","step","mapfn","mapping","iterFn","ret","ArrayProto","getIteratorMethod","SAFE_CLOSING","riter","skipClosing","arr","of","arrayJoin","separator","method","html","begin","klass","start","upTo","cloned","$sort","sort","comparefn","$forEach","STRICT","callbackfn","asc","IS_MAP","IS_FILTER","IS_SOME","IS_EVERY","IS_FIND_INDEX","NO_HOLES","speciesConstructor","original","SPECIES","$map","map","$filter","filter","$some","some","$every","every","$reduce","reduce","memo","isRight","reduceRight","$indexOf","NEGATIVE_ZERO","searchElement","lastIndexOf","copyWithin","to","inc","UNSCOPABLES","fill","endPos","$find","forced","find","findIndex","addToUnscopables","Arguments","$flags","$RegExp","re1","re2","CORRECT_NEW","tiRE","piRE","fiU","proxy","ignoreCase","multiline","unicode","sticky","define","flags","$match","regexp","SYMBOL","fns","strfn","rxfn","REPLACE","$replace","searchValue","replaceValue","SEARCH","$search","SPLIT","$split","_split","$push","$SPLIT","LENGTH","LAST_INDEX","NPCG","limit","separator2","lastIndex","lastLength","output","lastLastIndex","splitLimit","separatorCopy","Internal","GenericPromiseCapability","Wrapper","anInstance","forOf","task","microtask","PROMISE","process","$Promise","isNode","empty","promise","resolve","FakePromise","PromiseRejectionEvent","then","sameConstructor","isThenable","newPromiseCapability","PromiseCapability","reject","$$resolve","$$reject","perform","error","notify","isReject","_n","chain","_c","_v","ok","_s","run","reaction","handler","fail","domain","_h","onHandleUnhandled","enter","exit","onUnhandled","abrupt","console","isUnhandled","emit","onunhandledrejection","reason","_a","onrejectionhandled","$reject","_d","_w","$resolve","wrapper","Promise","executor","err","onFulfilled","onRejected","catch","r","capability","all","iterable","remaining","$index","alreadyCalled","race","forbiddenField","BREAK","RETURN","defer","channel","port","cel","setTask","setImmediate","clearTask","clearImmediate","MessageChannel","counter","queue","ONREADYSTATECHANGE","listener","event","nextTick","port2","port1","onmessage","postMessage","addEventListener","importScripts","removeChild","setTimeout","clear","macrotask","Observer","MutationObserver","WebKitMutationObserver","head","last","flush","parent","toggle","node","createTextNode","observe","characterData","strong","Map","entry","getEntry","v","redefineAll","$iterDefine","setSpecies","SIZE","_f","getConstructor","ADDER","_l","delete","prev","setStrong","$iterDetect","common","IS_WEAK","fixMethod","add","instance","HASNT_CHAINING","THROWS_ON_PRIMITIVES","ACCEPT_ITERABLES","BUGGY_ZERO","$instance","Set","InternalMap","each","weak","uncaughtFrozenStore","ufstore","tmp","WeakMap","$WeakMap","createArrayMethod","$has","arrayFind","arrayFindIndex","UncaughtFrozenStore","findUncaughtFrozen","splice","WeakSet","rApply","Reflect","fApply","thisArgument","argumentsList","L","rConstruct","NEW_TARGET_BUG","ARGS_BUG","Target","newTarget","$args","propertyKey","attributes","deleteProperty","desc","Enumerate","enumerate","receiver","getProto","ownKeys","V","existingDescriptor","ownDesc","setProto","now","Date","getTime","toJSON","toISOString","pv","lz","num","d","getUTCFullYear","getUTCMilliseconds","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","DateProto","INVALID_DATE","hint","$typed","buffer","ArrayBuffer","$ArrayBuffer","$DataView","DataView","$isView","ABV","isView","$slice","VIEW","ARRAY_BUFFER","CONSTR","byteLength","final","viewS","viewT","setUint8","getUint8","Typed","TYPED","TypedArrayConstructors","arrayFill","DATA_VIEW","WRONG_LENGTH","WRONG_INDEX","BaseBuffer","BUFFER","BYTE_LENGTH","BYTE_OFFSET","$BUFFER","$LENGTH","$OFFSET","packIEEE754","mLen","nBytes","eLen","eMax","eBias","rt","unpackIEEE754","nBits","unpackI32","bytes","packI8","packI16","packI32","packF64","packF32","addGetter","internal","view","isLittleEndian","numIndex","intIndex","_b","pack","reverse","conversion","validateArrayBufferArguments","numberLength","ArrayBufferProto","$setInt8","setInt8","getInt8","byteOffset","bufferLength","offset","getInt16","getUint16","getInt32","getUint32","getFloat32","getFloat64","setInt16","setUint16","setInt32","setUint32","setFloat32","setFloat64","init","Int8Array","$buffer","propertyDesc","same","createArrayIncludes","ArrayIterators","arrayCopyWithin","Uint8Array","SHARED_BUFFER","BYTES_PER_ELEMENT","arrayForEach","arrayFilter","arraySome","arrayEvery","arrayIncludes","arrayValues","arrayKeys","arrayEntries","arrayLastIndexOf","arrayReduce","arrayReduceRight","arraySort","arrayToString","arrayToLocaleString","toLocaleString","TYPED_CONSTRUCTOR","DEF_CONSTRUCTOR","ALL_CONSTRUCTORS","TYPED_ARRAY","allocate","LITTLE_ENDIAN","Uint16Array","FORCED_SET","strictToLength","SAME","toOffset","BYTES","validate","speciesFromList","list","fromList","$from","$of","TO_LOCALE_BUG","$toLocaleString","predicate","middle","subarray","$begin","$iterators","isTAIndex","$getDesc","$setDesc","$TypedArrayPrototype$","CLAMPED","ISNT_UINT8","GETTER","SETTER","TypedArray","TAC","TypedArrayPrototype","getter","o","round","addElement","$offset","$length","$len","$nativeIterator","CORRECT_ITER_NAME","$iterator","Uint8ClampedArray","Int16Array","Int32Array","Uint32Array","Float32Array","Float64Array","$includes","at","$pad","padStart","maxLength","fillString","left","stringLength","fillStr","intMaxLength","fillLen","stringFiller","padEnd","trimLeft","trimRight","getFlags","RegExpProto","$RegExpStringIterator","_r","matchAll","rx","getOwnPropertyDescriptors","getDesc","$values","isEntries","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__","isError","iaddh","x0","x1","y0","y1","$x0","$x1","$y0","isubh","imulh","u","$u","$v","u0","v0","u1","v1","umulh","metadata","toMetaKey","ordinaryDefineOwnMetadata","defineMetadata","metadataKey","metadataValue","targetKey","getOrCreateMetadataMap","targetMetadata","keyMetadata","ordinaryHasOwnMetadata","MetadataKey","metadataMap","ordinaryGetOwnMetadata","MetadataValue","ordinaryOwnMetadataKeys","_","deleteMetadata","ordinaryGetMetadata","hasOwn","getMetadata","ordinaryMetadataKeys","oKeys","pKeys","getMetadataKeys","getOwnMetadata","getOwnMetadataKeys","ordinaryHasMetadata","hasMetadata","hasOwnMetadata","decorator","asap","OBSERVABLE","cleanupSubscription","subscription","cleanup","subscriptionClosed","_o","closeSubscription","Subscription","observer","subscriber","SubscriptionObserver","unsubscribe","complete","$Observable","Observable","subscribe","observable","items","$task","TO_STRING_TAG","ArrayValues","collections","Collection","partial","navigator","MSIE","userAgent","time","setInterval","path","pargs","holder","Dict","dict","isIterable","findKey","isDict","createDictMethod","createDictIter","DictIterator","mapPairs","getIterator","delay","part","mixin","make","$re","escape","regExp","&","<",">","\"","'","escapeHTML","&","<",">",""","'","unescapeHTML","amd"],"mappings":";;;;;;CAMC,SAASA,EAAKC,EAAKC,GACpB,cACS,SAAUC,GAKT,QAASC,qBAAoBC,GAG5B,GAAGC,EAAiBD,GACnB,MAAOC,GAAiBD,GAAUE,OAGnC,IAAIC,GAASF,EAAiBD,IAC7BE,WACAE,GAAIJ,EACJK,QAAQ,EAUT,OANAP,GAAQE,GAAUM,KAAKH,EAAOD,QAASC,EAAQA,EAAOD,QAASH,qBAG/DI,EAAOE,QAAS,EAGTF,EAAOD,QAvBf,GAAID,KAqCJ,OATAF,qBAAoBQ,EAAIT,EAGxBC,oBAAoBS,EAAIP,EAGxBF,oBAAoBU,EAAI,GAGjBV,oBAAoB,KAK/B,SAASI,EAAQD,EAASH,GAE/BA,EAAoB,GACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,K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","file":"core.min.js"} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/client/library.js b/pitfall/pdfkit/node_modules/core-js/client/library.js new file mode 100644 index 00000000..b332abde --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/client/library.js @@ -0,0 +1,7136 @@ +/** + * core-js 2.4.1 + * https://github.com/zloirock/core-js + * License: http://rock.mit-license.org + * © 2016 Denis Pushkarev + */ +!function(__e, __g, undefined){ +'use strict'; +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(1); + __webpack_require__(50); + __webpack_require__(51); + __webpack_require__(52); + __webpack_require__(54); + __webpack_require__(55); + __webpack_require__(58); + __webpack_require__(59); + __webpack_require__(60); + __webpack_require__(61); + __webpack_require__(62); + __webpack_require__(63); + __webpack_require__(64); + __webpack_require__(65); + __webpack_require__(66); + __webpack_require__(68); + __webpack_require__(70); + __webpack_require__(72); + __webpack_require__(75); + __webpack_require__(76); + __webpack_require__(79); + __webpack_require__(80); + __webpack_require__(81); + __webpack_require__(82); + __webpack_require__(84); + __webpack_require__(85); + __webpack_require__(86); + __webpack_require__(87); + __webpack_require__(88); + __webpack_require__(92); + __webpack_require__(94); + __webpack_require__(95); + __webpack_require__(96); + __webpack_require__(98); + __webpack_require__(99); + __webpack_require__(100); + __webpack_require__(102); + __webpack_require__(103); + __webpack_require__(104); + __webpack_require__(106); + __webpack_require__(107); + __webpack_require__(108); + __webpack_require__(109); + __webpack_require__(110); + __webpack_require__(111); + __webpack_require__(112); + __webpack_require__(113); + __webpack_require__(114); + __webpack_require__(115); + __webpack_require__(116); + __webpack_require__(117); + __webpack_require__(118); + __webpack_require__(119); + __webpack_require__(121); + __webpack_require__(125); + __webpack_require__(126); + __webpack_require__(127); + __webpack_require__(128); + __webpack_require__(132); + __webpack_require__(134); + __webpack_require__(135); + __webpack_require__(136); + __webpack_require__(137); + __webpack_require__(138); + __webpack_require__(139); + __webpack_require__(140); + __webpack_require__(141); + __webpack_require__(142); + __webpack_require__(143); + __webpack_require__(144); + __webpack_require__(145); + __webpack_require__(146); + __webpack_require__(147); + __webpack_require__(154); + __webpack_require__(155); + __webpack_require__(157); + __webpack_require__(158); + __webpack_require__(159); + __webpack_require__(163); + __webpack_require__(164); + __webpack_require__(165); + __webpack_require__(166); + __webpack_require__(167); + __webpack_require__(169); + __webpack_require__(170); + __webpack_require__(171); + __webpack_require__(172); + __webpack_require__(175); + __webpack_require__(177); + __webpack_require__(178); + __webpack_require__(179); + __webpack_require__(181); + __webpack_require__(183); + __webpack_require__(190); + __webpack_require__(193); + __webpack_require__(194); + __webpack_require__(196); + __webpack_require__(197); + __webpack_require__(198); + __webpack_require__(199); + __webpack_require__(200); + __webpack_require__(201); + __webpack_require__(202); + __webpack_require__(203); + __webpack_require__(204); + __webpack_require__(205); + __webpack_require__(206); + __webpack_require__(207); + __webpack_require__(209); + __webpack_require__(210); + __webpack_require__(211); + __webpack_require__(212); + __webpack_require__(213); + __webpack_require__(214); + __webpack_require__(215); + __webpack_require__(218); + __webpack_require__(219); + __webpack_require__(221); + __webpack_require__(222); + __webpack_require__(223); + __webpack_require__(224); + __webpack_require__(225); + __webpack_require__(226); + __webpack_require__(227); + __webpack_require__(228); + __webpack_require__(229); + __webpack_require__(230); + __webpack_require__(231); + __webpack_require__(233); + __webpack_require__(234); + __webpack_require__(235); + __webpack_require__(236); + __webpack_require__(238); + __webpack_require__(239); + __webpack_require__(240); + __webpack_require__(241); + __webpack_require__(243); + __webpack_require__(244); + __webpack_require__(246); + __webpack_require__(247); + __webpack_require__(248); + __webpack_require__(249); + __webpack_require__(252); + __webpack_require__(253); + __webpack_require__(254); + __webpack_require__(255); + __webpack_require__(256); + __webpack_require__(257); + __webpack_require__(258); + __webpack_require__(259); + __webpack_require__(261); + __webpack_require__(262); + __webpack_require__(263); + __webpack_require__(264); + __webpack_require__(265); + __webpack_require__(266); + __webpack_require__(267); + __webpack_require__(268); + __webpack_require__(269); + __webpack_require__(270); + __webpack_require__(271); + __webpack_require__(272); + __webpack_require__(273); + __webpack_require__(276); + __webpack_require__(151); + __webpack_require__(278); + __webpack_require__(277); + __webpack_require__(279); + __webpack_require__(280); + __webpack_require__(281); + __webpack_require__(282); + __webpack_require__(283); + __webpack_require__(285); + __webpack_require__(286); + __webpack_require__(287); + __webpack_require__(289); + module.exports = __webpack_require__(290); + + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // ECMAScript 6 symbols shim + var global = __webpack_require__(2) + , has = __webpack_require__(3) + , DESCRIPTORS = __webpack_require__(4) + , $export = __webpack_require__(6) + , redefine = __webpack_require__(18) + , META = __webpack_require__(19).KEY + , $fails = __webpack_require__(5) + , shared = __webpack_require__(21) + , setToStringTag = __webpack_require__(22) + , uid = __webpack_require__(20) + , wks = __webpack_require__(23) + , wksExt = __webpack_require__(24) + , wksDefine = __webpack_require__(25) + , keyOf = __webpack_require__(27) + , enumKeys = __webpack_require__(40) + , isArray = __webpack_require__(43) + , anObject = __webpack_require__(12) + , toIObject = __webpack_require__(30) + , toPrimitive = __webpack_require__(16) + , createDesc = __webpack_require__(17) + , _create = __webpack_require__(44) + , gOPNExt = __webpack_require__(47) + , $GOPD = __webpack_require__(49) + , $DP = __webpack_require__(11) + , $keys = __webpack_require__(28) + , gOPD = $GOPD.f + , dP = $DP.f + , gOPN = gOPNExt.f + , $Symbol = global.Symbol + , $JSON = global.JSON + , _stringify = $JSON && $JSON.stringify + , PROTOTYPE = 'prototype' + , HIDDEN = wks('_hidden') + , TO_PRIMITIVE = wks('toPrimitive') + , isEnum = {}.propertyIsEnumerable + , SymbolRegistry = shared('symbol-registry') + , AllSymbols = shared('symbols') + , OPSymbols = shared('op-symbols') + , ObjectProto = Object[PROTOTYPE] + , USE_NATIVE = typeof $Symbol == 'function' + , QObject = global.QObject; + // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 + var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + + // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 + var setSymbolDesc = DESCRIPTORS && $fails(function(){ + return _create(dP({}, 'a', { + get: function(){ return dP(this, 'a', {value: 7}).a; } + })).a != 7; + }) ? function(it, key, D){ + var protoDesc = gOPD(ObjectProto, key); + if(protoDesc)delete ObjectProto[key]; + dP(it, key, D); + if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc); + } : dP; + + var wrap = function(tag){ + var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); + sym._k = tag; + return sym; + }; + + var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){ + return typeof it == 'symbol'; + } : function(it){ + return it instanceof $Symbol; + }; + + var $defineProperty = function defineProperty(it, key, D){ + if(it === ObjectProto)$defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if(has(AllSymbols, key)){ + if(!D.enumerable){ + if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false; + D = _create(D, {enumerable: createDesc(0, false)}); + } return setSymbolDesc(it, key, D); + } return dP(it, key, D); + }; + var $defineProperties = function defineProperties(it, P){ + anObject(it); + var keys = enumKeys(P = toIObject(P)) + , i = 0 + , l = keys.length + , key; + while(l > i)$defineProperty(it, key = keys[i++], P[key]); + return it; + }; + var $create = function create(it, P){ + return P === undefined ? _create(it) : $defineProperties(_create(it), P); + }; + var $propertyIsEnumerable = function propertyIsEnumerable(key){ + var E = isEnum.call(this, key = toPrimitive(key, true)); + if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false; + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; + }; + var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){ + it = toIObject(it); + key = toPrimitive(key, true); + if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return; + var D = gOPD(it, key); + if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true; + return D; + }; + var $getOwnPropertyNames = function getOwnPropertyNames(it){ + var names = gOPN(toIObject(it)) + , result = [] + , i = 0 + , key; + while(names.length > i){ + if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key); + } return result; + }; + var $getOwnPropertySymbols = function getOwnPropertySymbols(it){ + var IS_OP = it === ObjectProto + , names = gOPN(IS_OP ? OPSymbols : toIObject(it)) + , result = [] + , i = 0 + , key; + while(names.length > i){ + if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]); + } return result; + }; + + // 19.4.1.1 Symbol([description]) + if(!USE_NATIVE){ + $Symbol = function Symbol(){ + if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function(value){ + if(this === ObjectProto)$set.call(OPSymbols, value); + if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set}); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString(){ + return this._k; + }); + + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + __webpack_require__(48).f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(42).f = $propertyIsEnumerable; + __webpack_require__(41).f = $getOwnPropertySymbols; + + if(DESCRIPTORS && !__webpack_require__(26)){ + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + wksExt.f = function(name){ + return wrap(wks(name)); + } + } + + $export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol}); + + for(var symbols = ( + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' + ).split(','), i = 0; symbols.length > i; )wks(symbols[i++]); + + for(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]); + + $export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + 'for': function(key){ + return has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(key){ + if(isSymbol(key))return keyOf(SymbolRegistry, key); + throw TypeError(key + ' is not a symbol!'); + }, + useSetter: function(){ setter = true; }, + useSimple: function(){ setter = false; } + }); + + $export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols + }); + + // 24.3.2 JSON.stringify(value [, replacer [, space]]) + $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){ + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}'; + })), 'JSON', { + stringify: function stringify(it){ + if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined + var args = [it] + , i = 1 + , replacer, $replacer; + while(arguments.length > i)args.push(arguments[i++]); + replacer = args[1]; + if(typeof replacer == 'function')$replacer = replacer; + if($replacer || !isArray(replacer))replacer = function(key, value){ + if($replacer)value = $replacer.call(this, key, value); + if(!isSymbol(value))return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + } + }); + + // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) + $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(10)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); + // 19.4.3.5 Symbol.prototype[@@toStringTag] + setToStringTag($Symbol, 'Symbol'); + // 20.2.1.9 Math[@@toStringTag] + setToStringTag(Math, 'Math', true); + // 24.3.3 JSON[@@toStringTag] + setToStringTag(global.JSON, 'JSON', true); + +/***/ }, +/* 2 */ +/***/ function(module, exports) { + + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); + if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef + +/***/ }, +/* 3 */ +/***/ function(module, exports) { + + var hasOwnProperty = {}.hasOwnProperty; + module.exports = function(it, key){ + return hasOwnProperty.call(it, key); + }; + +/***/ }, +/* 4 */ +/***/ function(module, exports, __webpack_require__) { + + // Thank's IE8 for his funny defineProperty + module.exports = !__webpack_require__(5)(function(){ + return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; + }); + +/***/ }, +/* 5 */ +/***/ function(module, exports) { + + module.exports = function(exec){ + try { + return !!exec(); + } catch(e){ + return true; + } + }; + +/***/ }, +/* 6 */ +/***/ function(module, exports, __webpack_require__) { + + var global = __webpack_require__(2) + , core = __webpack_require__(7) + , ctx = __webpack_require__(8) + , hide = __webpack_require__(10) + , PROTOTYPE = 'prototype'; + + var $export = function(type, name, source){ + var IS_FORCED = type & $export.F + , IS_GLOBAL = type & $export.G + , IS_STATIC = type & $export.S + , IS_PROTO = type & $export.P + , IS_BIND = type & $export.B + , IS_WRAP = type & $export.W + , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) + , expProto = exports[PROTOTYPE] + , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] + , key, own, out; + if(IS_GLOBAL)source = name; + for(key in source){ + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if(own && key in exports)continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function(C){ + var F = function(a, b, c){ + if(this instanceof C){ + switch(arguments.length){ + case 0: return new C; + case 1: return new C(a); + case 2: return new C(a, b); + } return new C(a, b, c); + } return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if(IS_PROTO){ + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out); + } + } + }; + // type bitmap + $export.F = 1; // forced + $export.G = 2; // global + $export.S = 4; // static + $export.P = 8; // proto + $export.B = 16; // bind + $export.W = 32; // wrap + $export.U = 64; // safe + $export.R = 128; // real proto method for `library` + module.exports = $export; + +/***/ }, +/* 7 */ +/***/ function(module, exports) { + + var core = module.exports = {version: '2.4.0'}; + if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef + +/***/ }, +/* 8 */ +/***/ function(module, exports, __webpack_require__) { + + // optional / simple context binding + var aFunction = __webpack_require__(9); + module.exports = function(fn, that, length){ + aFunction(fn); + if(that === undefined)return fn; + switch(length){ + case 1: return function(a){ + return fn.call(that, a); + }; + case 2: return function(a, b){ + return fn.call(that, a, b); + }; + case 3: return function(a, b, c){ + return fn.call(that, a, b, c); + }; + } + return function(/* ...args */){ + return fn.apply(that, arguments); + }; + }; + +/***/ }, +/* 9 */ +/***/ function(module, exports) { + + module.exports = function(it){ + if(typeof it != 'function')throw TypeError(it + ' is not a function!'); + return it; + }; + +/***/ }, +/* 10 */ +/***/ function(module, exports, __webpack_require__) { + + var dP = __webpack_require__(11) + , createDesc = __webpack_require__(17); + module.exports = __webpack_require__(4) ? function(object, key, value){ + return dP.f(object, key, createDesc(1, value)); + } : function(object, key, value){ + object[key] = value; + return object; + }; + +/***/ }, +/* 11 */ +/***/ function(module, exports, __webpack_require__) { + + var anObject = __webpack_require__(12) + , IE8_DOM_DEFINE = __webpack_require__(14) + , toPrimitive = __webpack_require__(16) + , dP = Object.defineProperty; + + exports.f = __webpack_require__(4) ? Object.defineProperty : function defineProperty(O, P, Attributes){ + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if(IE8_DOM_DEFINE)try { + return dP(O, P, Attributes); + } catch(e){ /* empty */ } + if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!'); + if('value' in Attributes)O[P] = Attributes.value; + return O; + }; + +/***/ }, +/* 12 */ +/***/ function(module, exports, __webpack_require__) { + + var isObject = __webpack_require__(13); + module.exports = function(it){ + if(!isObject(it))throw TypeError(it + ' is not an object!'); + return it; + }; + +/***/ }, +/* 13 */ +/***/ function(module, exports) { + + module.exports = function(it){ + return typeof it === 'object' ? it !== null : typeof it === 'function'; + }; + +/***/ }, +/* 14 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = !__webpack_require__(4) && !__webpack_require__(5)(function(){ + return Object.defineProperty(__webpack_require__(15)('div'), 'a', {get: function(){ return 7; }}).a != 7; + }); + +/***/ }, +/* 15 */ +/***/ function(module, exports, __webpack_require__) { + + var isObject = __webpack_require__(13) + , document = __webpack_require__(2).document + // in old IE typeof document.createElement is 'object' + , is = isObject(document) && isObject(document.createElement); + module.exports = function(it){ + return is ? document.createElement(it) : {}; + }; + +/***/ }, +/* 16 */ +/***/ function(module, exports, __webpack_require__) { + + // 7.1.1 ToPrimitive(input [, PreferredType]) + var isObject = __webpack_require__(13); + // instead of the ES6 spec version, we didn't implement @@toPrimitive case + // and the second argument - flag - preferred type is a string + module.exports = function(it, S){ + if(!isObject(it))return it; + var fn, val; + if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; + if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val; + if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; + throw TypeError("Can't convert object to primitive value"); + }; + +/***/ }, +/* 17 */ +/***/ function(module, exports) { + + module.exports = function(bitmap, value){ + return { + enumerable : !(bitmap & 1), + configurable: !(bitmap & 2), + writable : !(bitmap & 4), + value : value + }; + }; + +/***/ }, +/* 18 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = __webpack_require__(10); + +/***/ }, +/* 19 */ +/***/ function(module, exports, __webpack_require__) { + + var META = __webpack_require__(20)('meta') + , isObject = __webpack_require__(13) + , has = __webpack_require__(3) + , setDesc = __webpack_require__(11).f + , id = 0; + var isExtensible = Object.isExtensible || function(){ + return true; + }; + var FREEZE = !__webpack_require__(5)(function(){ + return isExtensible(Object.preventExtensions({})); + }); + var setMeta = function(it){ + setDesc(it, META, {value: { + i: 'O' + ++id, // object ID + w: {} // weak collections IDs + }}); + }; + var fastKey = function(it, create){ + // return primitive with prefix + if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if(!has(it, META)){ + // can't set metadata to uncaught frozen object + if(!isExtensible(it))return 'F'; + // not necessary to add metadata + if(!create)return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } return it[META].i; + }; + var getWeak = function(it, create){ + if(!has(it, META)){ + // can't set metadata to uncaught frozen object + if(!isExtensible(it))return true; + // not necessary to add metadata + if(!create)return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } return it[META].w; + }; + // add metadata on freeze-family methods calling + var onFreeze = function(it){ + if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it); + return it; + }; + var meta = module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze + }; + +/***/ }, +/* 20 */ +/***/ function(module, exports) { + + var id = 0 + , px = Math.random(); + module.exports = function(key){ + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); + }; + +/***/ }, +/* 21 */ +/***/ function(module, exports, __webpack_require__) { + + var global = __webpack_require__(2) + , SHARED = '__core-js_shared__' + , store = global[SHARED] || (global[SHARED] = {}); + module.exports = function(key){ + return store[key] || (store[key] = {}); + }; + +/***/ }, +/* 22 */ +/***/ function(module, exports, __webpack_require__) { + + var def = __webpack_require__(11).f + , has = __webpack_require__(3) + , TAG = __webpack_require__(23)('toStringTag'); + + module.exports = function(it, tag, stat){ + if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag}); + }; + +/***/ }, +/* 23 */ +/***/ function(module, exports, __webpack_require__) { + + var store = __webpack_require__(21)('wks') + , uid = __webpack_require__(20) + , Symbol = __webpack_require__(2).Symbol + , USE_SYMBOL = typeof Symbol == 'function'; + + var $exports = module.exports = function(name){ + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); + }; + + $exports.store = store; + +/***/ }, +/* 24 */ +/***/ function(module, exports, __webpack_require__) { + + exports.f = __webpack_require__(23); + +/***/ }, +/* 25 */ +/***/ function(module, exports, __webpack_require__) { + + var global = __webpack_require__(2) + , core = __webpack_require__(7) + , LIBRARY = __webpack_require__(26) + , wksExt = __webpack_require__(24) + , defineProperty = __webpack_require__(11).f; + module.exports = function(name){ + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)}); + }; + +/***/ }, +/* 26 */ +/***/ function(module, exports) { + + module.exports = true; + +/***/ }, +/* 27 */ +/***/ function(module, exports, __webpack_require__) { + + var getKeys = __webpack_require__(28) + , toIObject = __webpack_require__(30); + module.exports = function(object, el){ + var O = toIObject(object) + , keys = getKeys(O) + , length = keys.length + , index = 0 + , key; + while(length > index)if(O[key = keys[index++]] === el)return key; + }; + +/***/ }, +/* 28 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.14 / 15.2.3.14 Object.keys(O) + var $keys = __webpack_require__(29) + , enumBugKeys = __webpack_require__(39); + + module.exports = Object.keys || function keys(O){ + return $keys(O, enumBugKeys); + }; + +/***/ }, +/* 29 */ +/***/ function(module, exports, __webpack_require__) { + + var has = __webpack_require__(3) + , toIObject = __webpack_require__(30) + , arrayIndexOf = __webpack_require__(34)(false) + , IE_PROTO = __webpack_require__(38)('IE_PROTO'); + + module.exports = function(object, names){ + var O = toIObject(object) + , i = 0 + , result = [] + , key; + for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while(names.length > i)if(has(O, key = names[i++])){ + ~arrayIndexOf(result, key) || result.push(key); + } + return result; + }; + +/***/ }, +/* 30 */ +/***/ function(module, exports, __webpack_require__) { + + // to indexed object, toObject with fallback for non-array-like ES3 strings + var IObject = __webpack_require__(31) + , defined = __webpack_require__(33); + module.exports = function(it){ + return IObject(defined(it)); + }; + +/***/ }, +/* 31 */ +/***/ function(module, exports, __webpack_require__) { + + // fallback for non-array-like ES3 and non-enumerable old V8 strings + var cof = __webpack_require__(32); + module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ + return cof(it) == 'String' ? it.split('') : Object(it); + }; + +/***/ }, +/* 32 */ +/***/ function(module, exports) { + + var toString = {}.toString; + + module.exports = function(it){ + return toString.call(it).slice(8, -1); + }; + +/***/ }, +/* 33 */ +/***/ function(module, exports) { + + // 7.2.1 RequireObjectCoercible(argument) + module.exports = function(it){ + if(it == undefined)throw TypeError("Can't call method on " + it); + return it; + }; + +/***/ }, +/* 34 */ +/***/ function(module, exports, __webpack_require__) { + + // false -> Array#indexOf + // true -> Array#includes + var toIObject = __webpack_require__(30) + , toLength = __webpack_require__(35) + , toIndex = __webpack_require__(37); + module.exports = function(IS_INCLUDES){ + return function($this, el, fromIndex){ + var O = toIObject($this) + , length = toLength(O.length) + , index = toIndex(fromIndex, length) + , value; + // Array#includes uses SameValueZero equality algorithm + if(IS_INCLUDES && el != el)while(length > index){ + value = O[index++]; + if(value != value)return true; + // Array#toIndex ignores holes, Array#includes - not + } else for(;length > index; index++)if(IS_INCLUDES || index in O){ + if(O[index] === el)return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; + }; + +/***/ }, +/* 35 */ +/***/ function(module, exports, __webpack_require__) { + + // 7.1.15 ToLength + var toInteger = __webpack_require__(36) + , min = Math.min; + module.exports = function(it){ + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 + }; + +/***/ }, +/* 36 */ +/***/ function(module, exports) { + + // 7.1.4 ToInteger + var ceil = Math.ceil + , floor = Math.floor; + module.exports = function(it){ + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); + }; + +/***/ }, +/* 37 */ +/***/ function(module, exports, __webpack_require__) { + + var toInteger = __webpack_require__(36) + , max = Math.max + , min = Math.min; + module.exports = function(index, length){ + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); + }; + +/***/ }, +/* 38 */ +/***/ function(module, exports, __webpack_require__) { + + var shared = __webpack_require__(21)('keys') + , uid = __webpack_require__(20); + module.exports = function(key){ + return shared[key] || (shared[key] = uid(key)); + }; + +/***/ }, +/* 39 */ +/***/ function(module, exports) { + + // IE 8- don't enum bug keys + module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' + ).split(','); + +/***/ }, +/* 40 */ +/***/ function(module, exports, __webpack_require__) { + + // all enumerable object keys, includes symbols + var getKeys = __webpack_require__(28) + , gOPS = __webpack_require__(41) + , pIE = __webpack_require__(42); + module.exports = function(it){ + var result = getKeys(it) + , getSymbols = gOPS.f; + if(getSymbols){ + var symbols = getSymbols(it) + , isEnum = pIE.f + , i = 0 + , key; + while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key); + } return result; + }; + +/***/ }, +/* 41 */ +/***/ function(module, exports) { + + exports.f = Object.getOwnPropertySymbols; + +/***/ }, +/* 42 */ +/***/ function(module, exports) { + + exports.f = {}.propertyIsEnumerable; + +/***/ }, +/* 43 */ +/***/ function(module, exports, __webpack_require__) { + + // 7.2.2 IsArray(argument) + var cof = __webpack_require__(32); + module.exports = Array.isArray || function isArray(arg){ + return cof(arg) == 'Array'; + }; + +/***/ }, +/* 44 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + var anObject = __webpack_require__(12) + , dPs = __webpack_require__(45) + , enumBugKeys = __webpack_require__(39) + , IE_PROTO = __webpack_require__(38)('IE_PROTO') + , Empty = function(){ /* empty */ } + , PROTOTYPE = 'prototype'; + + // Create object with fake `null` prototype: use iframe Object with cleared prototype + var createDict = function(){ + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(15)('iframe') + , i = enumBugKeys.length + , lt = '<' + , gt = '>' + , iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(46).appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); + }; + + module.exports = Object.create || function create(O, Properties){ + var result; + if(O !== null){ + Empty[PROTOTYPE] = anObject(O); + result = new Empty; + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); + }; + + +/***/ }, +/* 45 */ +/***/ function(module, exports, __webpack_require__) { + + var dP = __webpack_require__(11) + , anObject = __webpack_require__(12) + , getKeys = __webpack_require__(28); + + module.exports = __webpack_require__(4) ? Object.defineProperties : function defineProperties(O, Properties){ + anObject(O); + var keys = getKeys(Properties) + , length = keys.length + , i = 0 + , P; + while(length > i)dP.f(O, P = keys[i++], Properties[P]); + return O; + }; + +/***/ }, +/* 46 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = __webpack_require__(2).document && document.documentElement; + +/***/ }, +/* 47 */ +/***/ function(module, exports, __webpack_require__) { + + // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window + var toIObject = __webpack_require__(30) + , gOPN = __webpack_require__(48).f + , toString = {}.toString; + + var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + + var getWindowNames = function(it){ + try { + return gOPN(it); + } catch(e){ + return windowNames.slice(); + } + }; + + module.exports.f = function getOwnPropertyNames(it){ + return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); + }; + + +/***/ }, +/* 48 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) + var $keys = __webpack_require__(29) + , hiddenKeys = __webpack_require__(39).concat('length', 'prototype'); + + exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){ + return $keys(O, hiddenKeys); + }; + +/***/ }, +/* 49 */ +/***/ function(module, exports, __webpack_require__) { + + var pIE = __webpack_require__(42) + , createDesc = __webpack_require__(17) + , toIObject = __webpack_require__(30) + , toPrimitive = __webpack_require__(16) + , has = __webpack_require__(3) + , IE8_DOM_DEFINE = __webpack_require__(14) + , gOPD = Object.getOwnPropertyDescriptor; + + exports.f = __webpack_require__(4) ? gOPD : function getOwnPropertyDescriptor(O, P){ + O = toIObject(O); + P = toPrimitive(P, true); + if(IE8_DOM_DEFINE)try { + return gOPD(O, P); + } catch(e){ /* empty */ } + if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]); + }; + +/***/ }, +/* 50 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6); + // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) + $export($export.S + $export.F * !__webpack_require__(4), 'Object', {defineProperty: __webpack_require__(11).f}); + +/***/ }, +/* 51 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6); + // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) + $export($export.S + $export.F * !__webpack_require__(4), 'Object', {defineProperties: __webpack_require__(45)}); + +/***/ }, +/* 52 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + var toIObject = __webpack_require__(30) + , $getOwnPropertyDescriptor = __webpack_require__(49).f; + + __webpack_require__(53)('getOwnPropertyDescriptor', function(){ + return function getOwnPropertyDescriptor(it, key){ + return $getOwnPropertyDescriptor(toIObject(it), key); + }; + }); + +/***/ }, +/* 53 */ +/***/ function(module, exports, __webpack_require__) { + + // most Object methods by ES6 should accept primitives + var $export = __webpack_require__(6) + , core = __webpack_require__(7) + , fails = __webpack_require__(5); + module.exports = function(KEY, exec){ + var fn = (core.Object || {})[KEY] || Object[KEY] + , exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); + }; + +/***/ }, +/* 54 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6) + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + $export($export.S, 'Object', {create: __webpack_require__(44)}); + +/***/ }, +/* 55 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.9 Object.getPrototypeOf(O) + var toObject = __webpack_require__(56) + , $getPrototypeOf = __webpack_require__(57); + + __webpack_require__(53)('getPrototypeOf', function(){ + return function getPrototypeOf(it){ + return $getPrototypeOf(toObject(it)); + }; + }); + +/***/ }, +/* 56 */ +/***/ function(module, exports, __webpack_require__) { + + // 7.1.13 ToObject(argument) + var defined = __webpack_require__(33); + module.exports = function(it){ + return Object(defined(it)); + }; + +/***/ }, +/* 57 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) + var has = __webpack_require__(3) + , toObject = __webpack_require__(56) + , IE_PROTO = __webpack_require__(38)('IE_PROTO') + , ObjectProto = Object.prototype; + + module.exports = Object.getPrototypeOf || function(O){ + O = toObject(O); + if(has(O, IE_PROTO))return O[IE_PROTO]; + if(typeof O.constructor == 'function' && O instanceof O.constructor){ + return O.constructor.prototype; + } return O instanceof Object ? ObjectProto : null; + }; + +/***/ }, +/* 58 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.14 Object.keys(O) + var toObject = __webpack_require__(56) + , $keys = __webpack_require__(28); + + __webpack_require__(53)('keys', function(){ + return function keys(it){ + return $keys(toObject(it)); + }; + }); + +/***/ }, +/* 59 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.7 Object.getOwnPropertyNames(O) + __webpack_require__(53)('getOwnPropertyNames', function(){ + return __webpack_require__(47).f; + }); + +/***/ }, +/* 60 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.5 Object.freeze(O) + var isObject = __webpack_require__(13) + , meta = __webpack_require__(19).onFreeze; + + __webpack_require__(53)('freeze', function($freeze){ + return function freeze(it){ + return $freeze && isObject(it) ? $freeze(meta(it)) : it; + }; + }); + +/***/ }, +/* 61 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.17 Object.seal(O) + var isObject = __webpack_require__(13) + , meta = __webpack_require__(19).onFreeze; + + __webpack_require__(53)('seal', function($seal){ + return function seal(it){ + return $seal && isObject(it) ? $seal(meta(it)) : it; + }; + }); + +/***/ }, +/* 62 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.15 Object.preventExtensions(O) + var isObject = __webpack_require__(13) + , meta = __webpack_require__(19).onFreeze; + + __webpack_require__(53)('preventExtensions', function($preventExtensions){ + return function preventExtensions(it){ + return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; + }; + }); + +/***/ }, +/* 63 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.12 Object.isFrozen(O) + var isObject = __webpack_require__(13); + + __webpack_require__(53)('isFrozen', function($isFrozen){ + return function isFrozen(it){ + return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true; + }; + }); + +/***/ }, +/* 64 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.13 Object.isSealed(O) + var isObject = __webpack_require__(13); + + __webpack_require__(53)('isSealed', function($isSealed){ + return function isSealed(it){ + return isObject(it) ? $isSealed ? $isSealed(it) : false : true; + }; + }); + +/***/ }, +/* 65 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.11 Object.isExtensible(O) + var isObject = __webpack_require__(13); + + __webpack_require__(53)('isExtensible', function($isExtensible){ + return function isExtensible(it){ + return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false; + }; + }); + +/***/ }, +/* 66 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.3.1 Object.assign(target, source) + var $export = __webpack_require__(6); + + $export($export.S + $export.F, 'Object', {assign: __webpack_require__(67)}); + +/***/ }, +/* 67 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // 19.1.2.1 Object.assign(target, source, ...) + var getKeys = __webpack_require__(28) + , gOPS = __webpack_require__(41) + , pIE = __webpack_require__(42) + , toObject = __webpack_require__(56) + , IObject = __webpack_require__(31) + , $assign = Object.assign; + + // should work with symbols and should have deterministic property order (V8 bug) + module.exports = !$assign || __webpack_require__(5)(function(){ + var A = {} + , B = {} + , S = Symbol() + , K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function(k){ B[k] = k; }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; + }) ? function assign(target, source){ // eslint-disable-line no-unused-vars + var T = toObject(target) + , aLen = arguments.length + , index = 1 + , getSymbols = gOPS.f + , isEnum = pIE.f; + while(aLen > index){ + var S = IObject(arguments[index++]) + , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S) + , length = keys.length + , j = 0 + , key; + while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key]; + } return T; + } : $assign; + +/***/ }, +/* 68 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.3.10 Object.is(value1, value2) + var $export = __webpack_require__(6); + $export($export.S, 'Object', {is: __webpack_require__(69)}); + +/***/ }, +/* 69 */ +/***/ function(module, exports) { + + // 7.2.9 SameValue(x, y) + module.exports = Object.is || function is(x, y){ + return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; + }; + +/***/ }, +/* 70 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.3.19 Object.setPrototypeOf(O, proto) + var $export = __webpack_require__(6); + $export($export.S, 'Object', {setPrototypeOf: __webpack_require__(71).set}); + +/***/ }, +/* 71 */ +/***/ function(module, exports, __webpack_require__) { + + // Works with __proto__ only. Old v8 can't work with null proto objects. + /* eslint-disable no-proto */ + var isObject = __webpack_require__(13) + , anObject = __webpack_require__(12); + var check = function(O, proto){ + anObject(O); + if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!"); + }; + module.exports = { + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line + function(test, buggy, set){ + try { + set = __webpack_require__(8)(Function.call, __webpack_require__(49).f(Object.prototype, '__proto__').set, 2); + set(test, []); + buggy = !(test instanceof Array); + } catch(e){ buggy = true; } + return function setPrototypeOf(O, proto){ + check(O, proto); + if(buggy)O.__proto__ = proto; + else set(O, proto); + return O; + }; + }({}, false) : undefined), + check: check + }; + +/***/ }, +/* 72 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) + var $export = __webpack_require__(6); + + $export($export.P, 'Function', {bind: __webpack_require__(73)}); + +/***/ }, +/* 73 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var aFunction = __webpack_require__(9) + , isObject = __webpack_require__(13) + , invoke = __webpack_require__(74) + , arraySlice = [].slice + , factories = {}; + + var construct = function(F, len, args){ + if(!(len in factories)){ + for(var n = [], i = 0; i < len; i++)n[i] = 'a[' + i + ']'; + factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); + } return factories[len](F, args); + }; + + module.exports = Function.bind || function bind(that /*, args... */){ + var fn = aFunction(this) + , partArgs = arraySlice.call(arguments, 1); + var bound = function(/* args... */){ + var args = partArgs.concat(arraySlice.call(arguments)); + return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); + }; + if(isObject(fn.prototype))bound.prototype = fn.prototype; + return bound; + }; + +/***/ }, +/* 74 */ +/***/ function(module, exports) { + + // fast apply, http://jsperf.lnkit.com/fast-apply/5 + module.exports = function(fn, args, that){ + var un = that === undefined; + switch(args.length){ + case 0: return un ? fn() + : fn.call(that); + case 1: return un ? fn(args[0]) + : fn.call(that, args[0]); + case 2: return un ? fn(args[0], args[1]) + : fn.call(that, args[0], args[1]); + case 3: return un ? fn(args[0], args[1], args[2]) + : fn.call(that, args[0], args[1], args[2]); + case 4: return un ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + } return fn.apply(that, args); + }; + +/***/ }, +/* 75 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var isObject = __webpack_require__(13) + , getPrototypeOf = __webpack_require__(57) + , HAS_INSTANCE = __webpack_require__(23)('hasInstance') + , FunctionProto = Function.prototype; + // 19.2.3.6 Function.prototype[@@hasInstance](V) + if(!(HAS_INSTANCE in FunctionProto))__webpack_require__(11).f(FunctionProto, HAS_INSTANCE, {value: function(O){ + if(typeof this != 'function' || !isObject(O))return false; + if(!isObject(this.prototype))return O instanceof this; + // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: + while(O = getPrototypeOf(O))if(this.prototype === O)return true; + return false; + }}); + +/***/ }, +/* 76 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , toInteger = __webpack_require__(36) + , aNumberValue = __webpack_require__(77) + , repeat = __webpack_require__(78) + , $toFixed = 1..toFixed + , floor = Math.floor + , data = [0, 0, 0, 0, 0, 0] + , ERROR = 'Number.toFixed: incorrect invocation!' + , ZERO = '0'; + + var multiply = function(n, c){ + var i = -1 + , c2 = c; + while(++i < 6){ + c2 += n * data[i]; + data[i] = c2 % 1e7; + c2 = floor(c2 / 1e7); + } + }; + var divide = function(n){ + var i = 6 + , c = 0; + while(--i >= 0){ + c += data[i]; + data[i] = floor(c / n); + c = (c % n) * 1e7; + } + }; + var numToString = function(){ + var i = 6 + , s = ''; + while(--i >= 0){ + if(s !== '' || i === 0 || data[i] !== 0){ + var t = String(data[i]); + s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t; + } + } return s; + }; + var pow = function(x, n, acc){ + return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); + }; + var log = function(x){ + var n = 0 + , x2 = x; + while(x2 >= 4096){ + n += 12; + x2 /= 4096; + } + while(x2 >= 2){ + n += 1; + x2 /= 2; + } return n; + }; + + $export($export.P + $export.F * (!!$toFixed && ( + 0.00008.toFixed(3) !== '0.000' || + 0.9.toFixed(0) !== '1' || + 1.255.toFixed(2) !== '1.25' || + 1000000000000000128..toFixed(0) !== '1000000000000000128' + ) || !__webpack_require__(5)(function(){ + // V8 ~ Android 4.3- + $toFixed.call({}); + })), 'Number', { + toFixed: function toFixed(fractionDigits){ + var x = aNumberValue(this, ERROR) + , f = toInteger(fractionDigits) + , s = '' + , m = ZERO + , e, z, j, k; + if(f < 0 || f > 20)throw RangeError(ERROR); + if(x != x)return 'NaN'; + if(x <= -1e21 || x >= 1e21)return String(x); + if(x < 0){ + s = '-'; + x = -x; + } + if(x > 1e-21){ + e = log(x * pow(2, 69, 1)) - 69; + z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1); + z *= 0x10000000000000; + e = 52 - e; + if(e > 0){ + multiply(0, z); + j = f; + while(j >= 7){ + multiply(1e7, 0); + j -= 7; + } + multiply(pow(10, j, 1), 0); + j = e - 1; + while(j >= 23){ + divide(1 << 23); + j -= 23; + } + divide(1 << j); + multiply(1, 1); + divide(2); + m = numToString(); + } else { + multiply(0, z); + multiply(1 << -e, 0); + m = numToString() + repeat.call(ZERO, f); + } + } + if(f > 0){ + k = m.length; + m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f)); + } else { + m = s + m; + } return m; + } + }); + +/***/ }, +/* 77 */ +/***/ function(module, exports, __webpack_require__) { + + var cof = __webpack_require__(32); + module.exports = function(it, msg){ + if(typeof it != 'number' && cof(it) != 'Number')throw TypeError(msg); + return +it; + }; + +/***/ }, +/* 78 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var toInteger = __webpack_require__(36) + , defined = __webpack_require__(33); + + module.exports = function repeat(count){ + var str = String(defined(this)) + , res = '' + , n = toInteger(count); + if(n < 0 || n == Infinity)throw RangeError("Count can't be negative"); + for(;n > 0; (n >>>= 1) && (str += str))if(n & 1)res += str; + return res; + }; + +/***/ }, +/* 79 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , $fails = __webpack_require__(5) + , aNumberValue = __webpack_require__(77) + , $toPrecision = 1..toPrecision; + + $export($export.P + $export.F * ($fails(function(){ + // IE7- + return $toPrecision.call(1, undefined) !== '1'; + }) || !$fails(function(){ + // V8 ~ Android 4.3- + $toPrecision.call({}); + })), 'Number', { + toPrecision: function toPrecision(precision){ + var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!'); + return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision); + } + }); + +/***/ }, +/* 80 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.1.2.1 Number.EPSILON + var $export = __webpack_require__(6); + + $export($export.S, 'Number', {EPSILON: Math.pow(2, -52)}); + +/***/ }, +/* 81 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.1.2.2 Number.isFinite(number) + var $export = __webpack_require__(6) + , _isFinite = __webpack_require__(2).isFinite; + + $export($export.S, 'Number', { + isFinite: function isFinite(it){ + return typeof it == 'number' && _isFinite(it); + } + }); + +/***/ }, +/* 82 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.1.2.3 Number.isInteger(number) + var $export = __webpack_require__(6); + + $export($export.S, 'Number', {isInteger: __webpack_require__(83)}); + +/***/ }, +/* 83 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.1.2.3 Number.isInteger(number) + var isObject = __webpack_require__(13) + , floor = Math.floor; + module.exports = function isInteger(it){ + return !isObject(it) && isFinite(it) && floor(it) === it; + }; + +/***/ }, +/* 84 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.1.2.4 Number.isNaN(number) + var $export = __webpack_require__(6); + + $export($export.S, 'Number', { + isNaN: function isNaN(number){ + return number != number; + } + }); + +/***/ }, +/* 85 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.1.2.5 Number.isSafeInteger(number) + var $export = __webpack_require__(6) + , isInteger = __webpack_require__(83) + , abs = Math.abs; + + $export($export.S, 'Number', { + isSafeInteger: function isSafeInteger(number){ + return isInteger(number) && abs(number) <= 0x1fffffffffffff; + } + }); + +/***/ }, +/* 86 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.1.2.6 Number.MAX_SAFE_INTEGER + var $export = __webpack_require__(6); + + $export($export.S, 'Number', {MAX_SAFE_INTEGER: 0x1fffffffffffff}); + +/***/ }, +/* 87 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.1.2.10 Number.MIN_SAFE_INTEGER + var $export = __webpack_require__(6); + + $export($export.S, 'Number', {MIN_SAFE_INTEGER: -0x1fffffffffffff}); + +/***/ }, +/* 88 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6) + , $parseFloat = __webpack_require__(89); + // 20.1.2.12 Number.parseFloat(string) + $export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', {parseFloat: $parseFloat}); + +/***/ }, +/* 89 */ +/***/ function(module, exports, __webpack_require__) { + + var $parseFloat = __webpack_require__(2).parseFloat + , $trim = __webpack_require__(90).trim; + + module.exports = 1 / $parseFloat(__webpack_require__(91) + '-0') !== -Infinity ? function parseFloat(str){ + var string = $trim(String(str), 3) + , result = $parseFloat(string); + return result === 0 && string.charAt(0) == '-' ? -0 : result; + } : $parseFloat; + +/***/ }, +/* 90 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6) + , defined = __webpack_require__(33) + , fails = __webpack_require__(5) + , spaces = __webpack_require__(91) + , space = '[' + spaces + ']' + , non = '\u200b\u0085' + , ltrim = RegExp('^' + space + space + '*') + , rtrim = RegExp(space + space + '*$'); + + var exporter = function(KEY, exec, ALIAS){ + var exp = {}; + var FORCE = fails(function(){ + return !!spaces[KEY]() || non[KEY]() != non; + }); + var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; + if(ALIAS)exp[ALIAS] = fn; + $export($export.P + $export.F * FORCE, 'String', exp); + }; + + // 1 -> String#trimLeft + // 2 -> String#trimRight + // 3 -> String#trim + var trim = exporter.trim = function(string, TYPE){ + string = String(defined(string)); + if(TYPE & 1)string = string.replace(ltrim, ''); + if(TYPE & 2)string = string.replace(rtrim, ''); + return string; + }; + + module.exports = exporter; + +/***/ }, +/* 91 */ +/***/ function(module, exports) { + + module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; + +/***/ }, +/* 92 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6) + , $parseInt = __webpack_require__(93); + // 20.1.2.13 Number.parseInt(string, radix) + $export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', {parseInt: $parseInt}); + +/***/ }, +/* 93 */ +/***/ function(module, exports, __webpack_require__) { + + var $parseInt = __webpack_require__(2).parseInt + , $trim = __webpack_require__(90).trim + , ws = __webpack_require__(91) + , hex = /^[\-+]?0[xX]/; + + module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix){ + var string = $trim(String(str), 3); + return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10)); + } : $parseInt; + +/***/ }, +/* 94 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6) + , $parseInt = __webpack_require__(93); + // 18.2.5 parseInt(string, radix) + $export($export.G + $export.F * (parseInt != $parseInt), {parseInt: $parseInt}); + +/***/ }, +/* 95 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6) + , $parseFloat = __webpack_require__(89); + // 18.2.4 parseFloat(string) + $export($export.G + $export.F * (parseFloat != $parseFloat), {parseFloat: $parseFloat}); + +/***/ }, +/* 96 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.3 Math.acosh(x) + var $export = __webpack_require__(6) + , log1p = __webpack_require__(97) + , sqrt = Math.sqrt + , $acosh = Math.acosh; + + $export($export.S + $export.F * !($acosh + // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509 + && Math.floor($acosh(Number.MAX_VALUE)) == 710 + // Tor Browser bug: Math.acosh(Infinity) -> NaN + && $acosh(Infinity) == Infinity + ), 'Math', { + acosh: function acosh(x){ + return (x = +x) < 1 ? NaN : x > 94906265.62425156 + ? Math.log(x) + Math.LN2 + : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1)); + } + }); + +/***/ }, +/* 97 */ +/***/ function(module, exports) { + + // 20.2.2.20 Math.log1p(x) + module.exports = Math.log1p || function log1p(x){ + return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x); + }; + +/***/ }, +/* 98 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.5 Math.asinh(x) + var $export = __webpack_require__(6) + , $asinh = Math.asinh; + + function asinh(x){ + return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1)); + } + + // Tor Browser bug: Math.asinh(0) -> -0 + $export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', {asinh: asinh}); + +/***/ }, +/* 99 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.7 Math.atanh(x) + var $export = __webpack_require__(6) + , $atanh = Math.atanh; + + // Tor Browser bug: Math.atanh(-0) -> 0 + $export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { + atanh: function atanh(x){ + return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2; + } + }); + +/***/ }, +/* 100 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.9 Math.cbrt(x) + var $export = __webpack_require__(6) + , sign = __webpack_require__(101); + + $export($export.S, 'Math', { + cbrt: function cbrt(x){ + return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3); + } + }); + +/***/ }, +/* 101 */ +/***/ function(module, exports) { + + // 20.2.2.28 Math.sign(x) + module.exports = Math.sign || function sign(x){ + return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; + }; + +/***/ }, +/* 102 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.11 Math.clz32(x) + var $export = __webpack_require__(6); + + $export($export.S, 'Math', { + clz32: function clz32(x){ + return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32; + } + }); + +/***/ }, +/* 103 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.12 Math.cosh(x) + var $export = __webpack_require__(6) + , exp = Math.exp; + + $export($export.S, 'Math', { + cosh: function cosh(x){ + return (exp(x = +x) + exp(-x)) / 2; + } + }); + +/***/ }, +/* 104 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.14 Math.expm1(x) + var $export = __webpack_require__(6) + , $expm1 = __webpack_require__(105); + + $export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', {expm1: $expm1}); + +/***/ }, +/* 105 */ +/***/ function(module, exports) { + + // 20.2.2.14 Math.expm1(x) + var $expm1 = Math.expm1; + module.exports = (!$expm1 + // Old FF bug + || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168 + // Tor Browser bug + || $expm1(-2e-17) != -2e-17 + ) ? function expm1(x){ + return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1; + } : $expm1; + +/***/ }, +/* 106 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.16 Math.fround(x) + var $export = __webpack_require__(6) + , sign = __webpack_require__(101) + , pow = Math.pow + , EPSILON = pow(2, -52) + , EPSILON32 = pow(2, -23) + , MAX32 = pow(2, 127) * (2 - EPSILON32) + , MIN32 = pow(2, -126); + + var roundTiesToEven = function(n){ + return n + 1 / EPSILON - 1 / EPSILON; + }; + + + $export($export.S, 'Math', { + fround: function fround(x){ + var $abs = Math.abs(x) + , $sign = sign(x) + , a, result; + if($abs < MIN32)return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; + a = (1 + EPSILON32 / EPSILON) * $abs; + result = a - (a - $abs); + if(result > MAX32 || result != result)return $sign * Infinity; + return $sign * result; + } + }); + +/***/ }, +/* 107 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) + var $export = __webpack_require__(6) + , abs = Math.abs; + + $export($export.S, 'Math', { + hypot: function hypot(value1, value2){ // eslint-disable-line no-unused-vars + var sum = 0 + , i = 0 + , aLen = arguments.length + , larg = 0 + , arg, div; + while(i < aLen){ + arg = abs(arguments[i++]); + if(larg < arg){ + div = larg / arg; + sum = sum * div * div + 1; + larg = arg; + } else if(arg > 0){ + div = arg / larg; + sum += div * div; + } else sum += arg; + } + return larg === Infinity ? Infinity : larg * Math.sqrt(sum); + } + }); + +/***/ }, +/* 108 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.18 Math.imul(x, y) + var $export = __webpack_require__(6) + , $imul = Math.imul; + + // some WebKit versions fails with big numbers, some has wrong arity + $export($export.S + $export.F * __webpack_require__(5)(function(){ + return $imul(0xffffffff, 5) != -5 || $imul.length != 2; + }), 'Math', { + imul: function imul(x, y){ + var UINT16 = 0xffff + , xn = +x + , yn = +y + , xl = UINT16 & xn + , yl = UINT16 & yn; + return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0); + } + }); + +/***/ }, +/* 109 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.21 Math.log10(x) + var $export = __webpack_require__(6); + + $export($export.S, 'Math', { + log10: function log10(x){ + return Math.log(x) / Math.LN10; + } + }); + +/***/ }, +/* 110 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.20 Math.log1p(x) + var $export = __webpack_require__(6); + + $export($export.S, 'Math', {log1p: __webpack_require__(97)}); + +/***/ }, +/* 111 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.22 Math.log2(x) + var $export = __webpack_require__(6); + + $export($export.S, 'Math', { + log2: function log2(x){ + return Math.log(x) / Math.LN2; + } + }); + +/***/ }, +/* 112 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.28 Math.sign(x) + var $export = __webpack_require__(6); + + $export($export.S, 'Math', {sign: __webpack_require__(101)}); + +/***/ }, +/* 113 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.30 Math.sinh(x) + var $export = __webpack_require__(6) + , expm1 = __webpack_require__(105) + , exp = Math.exp; + + // V8 near Chromium 38 has a problem with very small numbers + $export($export.S + $export.F * __webpack_require__(5)(function(){ + return !Math.sinh(-2e-17) != -2e-17; + }), 'Math', { + sinh: function sinh(x){ + return Math.abs(x = +x) < 1 + ? (expm1(x) - expm1(-x)) / 2 + : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2); + } + }); + +/***/ }, +/* 114 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.33 Math.tanh(x) + var $export = __webpack_require__(6) + , expm1 = __webpack_require__(105) + , exp = Math.exp; + + $export($export.S, 'Math', { + tanh: function tanh(x){ + var a = expm1(x = +x) + , b = expm1(-x); + return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); + } + }); + +/***/ }, +/* 115 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.34 Math.trunc(x) + var $export = __webpack_require__(6); + + $export($export.S, 'Math', { + trunc: function trunc(it){ + return (it > 0 ? Math.floor : Math.ceil)(it); + } + }); + +/***/ }, +/* 116 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6) + , toIndex = __webpack_require__(37) + , fromCharCode = String.fromCharCode + , $fromCodePoint = String.fromCodePoint; + + // length should be 1, old FF problem + $export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { + // 21.1.2.2 String.fromCodePoint(...codePoints) + fromCodePoint: function fromCodePoint(x){ // eslint-disable-line no-unused-vars + var res = [] + , aLen = arguments.length + , i = 0 + , code; + while(aLen > i){ + code = +arguments[i++]; + if(toIndex(code, 0x10ffff) !== code)throw RangeError(code + ' is not a valid code point'); + res.push(code < 0x10000 + ? fromCharCode(code) + : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00) + ); + } return res.join(''); + } + }); + +/***/ }, +/* 117 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6) + , toIObject = __webpack_require__(30) + , toLength = __webpack_require__(35); + + $export($export.S, 'String', { + // 21.1.2.4 String.raw(callSite, ...substitutions) + raw: function raw(callSite){ + var tpl = toIObject(callSite.raw) + , len = toLength(tpl.length) + , aLen = arguments.length + , res = [] + , i = 0; + while(len > i){ + res.push(String(tpl[i++])); + if(i < aLen)res.push(String(arguments[i])); + } return res.join(''); + } + }); + +/***/ }, +/* 118 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // 21.1.3.25 String.prototype.trim() + __webpack_require__(90)('trim', function($trim){ + return function trim(){ + return $trim(this, 3); + }; + }); + +/***/ }, +/* 119 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , $at = __webpack_require__(120)(false); + $export($export.P, 'String', { + // 21.1.3.3 String.prototype.codePointAt(pos) + codePointAt: function codePointAt(pos){ + return $at(this, pos); + } + }); + +/***/ }, +/* 120 */ +/***/ function(module, exports, __webpack_require__) { + + var toInteger = __webpack_require__(36) + , defined = __webpack_require__(33); + // true -> String#at + // false -> String#codePointAt + module.exports = function(TO_STRING){ + return function(that, pos){ + var s = String(defined(that)) + , i = toInteger(pos) + , l = s.length + , a, b; + if(i < 0 || i >= l)return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; + }; + +/***/ }, +/* 121 */ +/***/ function(module, exports, __webpack_require__) { + + // 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) + 'use strict'; + var $export = __webpack_require__(6) + , toLength = __webpack_require__(35) + , context = __webpack_require__(122) + , ENDS_WITH = 'endsWith' + , $endsWith = ''[ENDS_WITH]; + + $export($export.P + $export.F * __webpack_require__(124)(ENDS_WITH), 'String', { + endsWith: function endsWith(searchString /*, endPosition = @length */){ + var that = context(this, searchString, ENDS_WITH) + , endPosition = arguments.length > 1 ? arguments[1] : undefined + , len = toLength(that.length) + , end = endPosition === undefined ? len : Math.min(toLength(endPosition), len) + , search = String(searchString); + return $endsWith + ? $endsWith.call(that, search, end) + : that.slice(end - search.length, end) === search; + } + }); + +/***/ }, +/* 122 */ +/***/ function(module, exports, __webpack_require__) { + + // helper for String#{startsWith, endsWith, includes} + var isRegExp = __webpack_require__(123) + , defined = __webpack_require__(33); + + module.exports = function(that, searchString, NAME){ + if(isRegExp(searchString))throw TypeError('String#' + NAME + " doesn't accept regex!"); + return String(defined(that)); + }; + +/***/ }, +/* 123 */ +/***/ function(module, exports, __webpack_require__) { + + // 7.2.8 IsRegExp(argument) + var isObject = __webpack_require__(13) + , cof = __webpack_require__(32) + , MATCH = __webpack_require__(23)('match'); + module.exports = function(it){ + var isRegExp; + return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); + }; + +/***/ }, +/* 124 */ +/***/ function(module, exports, __webpack_require__) { + + var MATCH = __webpack_require__(23)('match'); + module.exports = function(KEY){ + var re = /./; + try { + '/./'[KEY](re); + } catch(e){ + try { + re[MATCH] = false; + return !'/./'[KEY](re); + } catch(f){ /* empty */ } + } return true; + }; + +/***/ }, +/* 125 */ +/***/ function(module, exports, __webpack_require__) { + + // 21.1.3.7 String.prototype.includes(searchString, position = 0) + 'use strict'; + var $export = __webpack_require__(6) + , context = __webpack_require__(122) + , INCLUDES = 'includes'; + + $export($export.P + $export.F * __webpack_require__(124)(INCLUDES), 'String', { + includes: function includes(searchString /*, position = 0 */){ + return !!~context(this, searchString, INCLUDES) + .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined); + } + }); + +/***/ }, +/* 126 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6); + + $export($export.P, 'String', { + // 21.1.3.13 String.prototype.repeat(count) + repeat: __webpack_require__(78) + }); + +/***/ }, +/* 127 */ +/***/ function(module, exports, __webpack_require__) { + + // 21.1.3.18 String.prototype.startsWith(searchString [, position ]) + 'use strict'; + var $export = __webpack_require__(6) + , toLength = __webpack_require__(35) + , context = __webpack_require__(122) + , STARTS_WITH = 'startsWith' + , $startsWith = ''[STARTS_WITH]; + + $export($export.P + $export.F * __webpack_require__(124)(STARTS_WITH), 'String', { + startsWith: function startsWith(searchString /*, position = 0 */){ + var that = context(this, searchString, STARTS_WITH) + , index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)) + , search = String(searchString); + return $startsWith + ? $startsWith.call(that, search, index) + : that.slice(index, index + search.length) === search; + } + }); + +/***/ }, +/* 128 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $at = __webpack_require__(120)(true); + + // 21.1.3.27 String.prototype[@@iterator]() + __webpack_require__(129)(String, 'String', function(iterated){ + this._t = String(iterated); // target + this._i = 0; // next index + // 21.1.5.2.1 %StringIteratorPrototype%.next() + }, function(){ + var O = this._t + , index = this._i + , point; + if(index >= O.length)return {value: undefined, done: true}; + point = $at(O, index); + this._i += point.length; + return {value: point, done: false}; + }); + +/***/ }, +/* 129 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var LIBRARY = __webpack_require__(26) + , $export = __webpack_require__(6) + , redefine = __webpack_require__(18) + , hide = __webpack_require__(10) + , has = __webpack_require__(3) + , Iterators = __webpack_require__(130) + , $iterCreate = __webpack_require__(131) + , setToStringTag = __webpack_require__(22) + , getPrototypeOf = __webpack_require__(57) + , ITERATOR = __webpack_require__(23)('iterator') + , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` + , FF_ITERATOR = '@@iterator' + , KEYS = 'keys' + , VALUES = 'values'; + + var returnThis = function(){ return this; }; + + module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){ + $iterCreate(Constructor, NAME, next); + var getMethod = function(kind){ + if(!BUGGY && kind in proto)return proto[kind]; + switch(kind){ + case KEYS: return function keys(){ return new Constructor(this, kind); }; + case VALUES: return function values(){ return new Constructor(this, kind); }; + } return function entries(){ return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator' + , DEF_VALUES = DEFAULT == VALUES + , VALUES_BUG = false + , proto = Base.prototype + , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] + , $default = $native || getMethod(DEFAULT) + , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined + , $anyNative = NAME == 'Array' ? proto.entries || $native : $native + , methods, key, IteratorPrototype; + // Fix native + if($anyNative){ + IteratorPrototype = getPrototypeOf($anyNative.call(new Base)); + if(IteratorPrototype !== Object.prototype){ + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if(DEF_VALUES && $native && $native.name !== VALUES){ + VALUES_BUG = true; + $default = function values(){ return $native.call(this); }; + } + // Define iterator + if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){ + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if(DEFAULT){ + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if(FORCED)for(key in methods){ + if(!(key in proto))redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; + }; + +/***/ }, +/* 130 */ +/***/ function(module, exports) { + + module.exports = {}; + +/***/ }, +/* 131 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var create = __webpack_require__(44) + , descriptor = __webpack_require__(17) + , setToStringTag = __webpack_require__(22) + , IteratorPrototype = {}; + + // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() + __webpack_require__(10)(IteratorPrototype, __webpack_require__(23)('iterator'), function(){ return this; }); + + module.exports = function(Constructor, NAME, next){ + Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)}); + setToStringTag(Constructor, NAME + ' Iterator'); + }; + +/***/ }, +/* 132 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.2 String.prototype.anchor(name) + __webpack_require__(133)('anchor', function(createHTML){ + return function anchor(name){ + return createHTML(this, 'a', 'name', name); + } + }); + +/***/ }, +/* 133 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6) + , fails = __webpack_require__(5) + , defined = __webpack_require__(33) + , quot = /"/g; + // B.2.3.2.1 CreateHTML(string, tag, attribute, value) + var createHTML = function(string, tag, attribute, value) { + var S = String(defined(string)) + , p1 = '<' + tag; + if(attribute !== '')p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; + return p1 + '>' + S + ''; + }; + module.exports = function(NAME, exec){ + var O = {}; + O[NAME] = exec(createHTML); + $export($export.P + $export.F * fails(function(){ + var test = ''[NAME]('"'); + return test !== test.toLowerCase() || test.split('"').length > 3; + }), 'String', O); + }; + +/***/ }, +/* 134 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.3 String.prototype.big() + __webpack_require__(133)('big', function(createHTML){ + return function big(){ + return createHTML(this, 'big', '', ''); + } + }); + +/***/ }, +/* 135 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.4 String.prototype.blink() + __webpack_require__(133)('blink', function(createHTML){ + return function blink(){ + return createHTML(this, 'blink', '', ''); + } + }); + +/***/ }, +/* 136 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.5 String.prototype.bold() + __webpack_require__(133)('bold', function(createHTML){ + return function bold(){ + return createHTML(this, 'b', '', ''); + } + }); + +/***/ }, +/* 137 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.6 String.prototype.fixed() + __webpack_require__(133)('fixed', function(createHTML){ + return function fixed(){ + return createHTML(this, 'tt', '', ''); + } + }); + +/***/ }, +/* 138 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.7 String.prototype.fontcolor(color) + __webpack_require__(133)('fontcolor', function(createHTML){ + return function fontcolor(color){ + return createHTML(this, 'font', 'color', color); + } + }); + +/***/ }, +/* 139 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.8 String.prototype.fontsize(size) + __webpack_require__(133)('fontsize', function(createHTML){ + return function fontsize(size){ + return createHTML(this, 'font', 'size', size); + } + }); + +/***/ }, +/* 140 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.9 String.prototype.italics() + __webpack_require__(133)('italics', function(createHTML){ + return function italics(){ + return createHTML(this, 'i', '', ''); + } + }); + +/***/ }, +/* 141 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.10 String.prototype.link(url) + __webpack_require__(133)('link', function(createHTML){ + return function link(url){ + return createHTML(this, 'a', 'href', url); + } + }); + +/***/ }, +/* 142 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.11 String.prototype.small() + __webpack_require__(133)('small', function(createHTML){ + return function small(){ + return createHTML(this, 'small', '', ''); + } + }); + +/***/ }, +/* 143 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.12 String.prototype.strike() + __webpack_require__(133)('strike', function(createHTML){ + return function strike(){ + return createHTML(this, 'strike', '', ''); + } + }); + +/***/ }, +/* 144 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.13 String.prototype.sub() + __webpack_require__(133)('sub', function(createHTML){ + return function sub(){ + return createHTML(this, 'sub', '', ''); + } + }); + +/***/ }, +/* 145 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.14 String.prototype.sup() + __webpack_require__(133)('sup', function(createHTML){ + return function sup(){ + return createHTML(this, 'sup', '', ''); + } + }); + +/***/ }, +/* 146 */ +/***/ function(module, exports, __webpack_require__) { + + // 22.1.2.2 / 15.4.3.2 Array.isArray(arg) + var $export = __webpack_require__(6); + + $export($export.S, 'Array', {isArray: __webpack_require__(43)}); + +/***/ }, +/* 147 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var ctx = __webpack_require__(8) + , $export = __webpack_require__(6) + , toObject = __webpack_require__(56) + , call = __webpack_require__(148) + , isArrayIter = __webpack_require__(149) + , toLength = __webpack_require__(35) + , createProperty = __webpack_require__(150) + , getIterFn = __webpack_require__(151); + + $export($export.S + $export.F * !__webpack_require__(153)(function(iter){ Array.from(iter); }), 'Array', { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){ + var O = toObject(arrayLike) + , C = typeof this == 'function' ? this : Array + , aLen = arguments.length + , mapfn = aLen > 1 ? arguments[1] : undefined + , mapping = mapfn !== undefined + , index = 0 + , iterFn = getIterFn(O) + , length, result, step, iterator; + if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){ + for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){ + createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); + } + } else { + length = toLength(O.length); + for(result = new C(length); length > index; index++){ + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + } + }); + + +/***/ }, +/* 148 */ +/***/ function(module, exports, __webpack_require__) { + + // call something on iterator step with safe closing on error + var anObject = __webpack_require__(12); + module.exports = function(iterator, fn, value, entries){ + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch(e){ + var ret = iterator['return']; + if(ret !== undefined)anObject(ret.call(iterator)); + throw e; + } + }; + +/***/ }, +/* 149 */ +/***/ function(module, exports, __webpack_require__) { + + // check on default Array iterator + var Iterators = __webpack_require__(130) + , ITERATOR = __webpack_require__(23)('iterator') + , ArrayProto = Array.prototype; + + module.exports = function(it){ + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); + }; + +/***/ }, +/* 150 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $defineProperty = __webpack_require__(11) + , createDesc = __webpack_require__(17); + + module.exports = function(object, index, value){ + if(index in object)$defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; + }; + +/***/ }, +/* 151 */ +/***/ function(module, exports, __webpack_require__) { + + var classof = __webpack_require__(152) + , ITERATOR = __webpack_require__(23)('iterator') + , Iterators = __webpack_require__(130); + module.exports = __webpack_require__(7).getIteratorMethod = function(it){ + if(it != undefined)return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; + }; + +/***/ }, +/* 152 */ +/***/ function(module, exports, __webpack_require__) { + + // getting tag from 19.1.3.6 Object.prototype.toString() + var cof = __webpack_require__(32) + , TAG = __webpack_require__(23)('toStringTag') + // ES3 wrong here + , ARG = cof(function(){ return arguments; }()) == 'Arguments'; + + // fallback for IE11 Script Access Denied error + var tryGet = function(it, key){ + try { + return it[key]; + } catch(e){ /* empty */ } + }; + + module.exports = function(it){ + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T + // builtinTag case + : ARG ? cof(O) + // ES3 arguments fallback + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; + }; + +/***/ }, +/* 153 */ +/***/ function(module, exports, __webpack_require__) { + + var ITERATOR = __webpack_require__(23)('iterator') + , SAFE_CLOSING = false; + + try { + var riter = [7][ITERATOR](); + riter['return'] = function(){ SAFE_CLOSING = true; }; + Array.from(riter, function(){ throw 2; }); + } catch(e){ /* empty */ } + + module.exports = function(exec, skipClosing){ + if(!skipClosing && !SAFE_CLOSING)return false; + var safe = false; + try { + var arr = [7] + , iter = arr[ITERATOR](); + iter.next = function(){ return {done: safe = true}; }; + arr[ITERATOR] = function(){ return iter; }; + exec(arr); + } catch(e){ /* empty */ } + return safe; + }; + +/***/ }, +/* 154 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , createProperty = __webpack_require__(150); + + // WebKit Array.of isn't generic + $export($export.S + $export.F * __webpack_require__(5)(function(){ + function F(){} + return !(Array.of.call(F) instanceof F); + }), 'Array', { + // 22.1.2.3 Array.of( ...items) + of: function of(/* ...args */){ + var index = 0 + , aLen = arguments.length + , result = new (typeof this == 'function' ? this : Array)(aLen); + while(aLen > index)createProperty(result, index, arguments[index++]); + result.length = aLen; + return result; + } + }); + +/***/ }, +/* 155 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // 22.1.3.13 Array.prototype.join(separator) + var $export = __webpack_require__(6) + , toIObject = __webpack_require__(30) + , arrayJoin = [].join; + + // fallback for not array-like strings + $export($export.P + $export.F * (__webpack_require__(31) != Object || !__webpack_require__(156)(arrayJoin)), 'Array', { + join: function join(separator){ + return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator); + } + }); + +/***/ }, +/* 156 */ +/***/ function(module, exports, __webpack_require__) { + + var fails = __webpack_require__(5); + + module.exports = function(method, arg){ + return !!method && fails(function(){ + arg ? method.call(null, function(){}, 1) : method.call(null); + }); + }; + +/***/ }, +/* 157 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , html = __webpack_require__(46) + , cof = __webpack_require__(32) + , toIndex = __webpack_require__(37) + , toLength = __webpack_require__(35) + , arraySlice = [].slice; + + // fallback for not array-like ES3 strings and DOM objects + $export($export.P + $export.F * __webpack_require__(5)(function(){ + if(html)arraySlice.call(html); + }), 'Array', { + slice: function slice(begin, end){ + var len = toLength(this.length) + , klass = cof(this); + end = end === undefined ? len : end; + if(klass == 'Array')return arraySlice.call(this, begin, end); + var start = toIndex(begin, len) + , upTo = toIndex(end, len) + , size = toLength(upTo - start) + , cloned = Array(size) + , i = 0; + for(; i < size; i++)cloned[i] = klass == 'String' + ? this.charAt(start + i) + : this[start + i]; + return cloned; + } + }); + +/***/ }, +/* 158 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , aFunction = __webpack_require__(9) + , toObject = __webpack_require__(56) + , fails = __webpack_require__(5) + , $sort = [].sort + , test = [1, 2, 3]; + + $export($export.P + $export.F * (fails(function(){ + // IE8- + test.sort(undefined); + }) || !fails(function(){ + // V8 bug + test.sort(null); + // Old WebKit + }) || !__webpack_require__(156)($sort)), 'Array', { + // 22.1.3.25 Array.prototype.sort(comparefn) + sort: function sort(comparefn){ + return comparefn === undefined + ? $sort.call(toObject(this)) + : $sort.call(toObject(this), aFunction(comparefn)); + } + }); + +/***/ }, +/* 159 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , $forEach = __webpack_require__(160)(0) + , STRICT = __webpack_require__(156)([].forEach, true); + + $export($export.P + $export.F * !STRICT, 'Array', { + // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) + forEach: function forEach(callbackfn /* , thisArg */){ + return $forEach(this, callbackfn, arguments[1]); + } + }); + +/***/ }, +/* 160 */ +/***/ function(module, exports, __webpack_require__) { + + // 0 -> Array#forEach + // 1 -> Array#map + // 2 -> Array#filter + // 3 -> Array#some + // 4 -> Array#every + // 5 -> Array#find + // 6 -> Array#findIndex + var ctx = __webpack_require__(8) + , IObject = __webpack_require__(31) + , toObject = __webpack_require__(56) + , toLength = __webpack_require__(35) + , asc = __webpack_require__(161); + module.exports = function(TYPE, $create){ + var IS_MAP = TYPE == 1 + , IS_FILTER = TYPE == 2 + , IS_SOME = TYPE == 3 + , IS_EVERY = TYPE == 4 + , IS_FIND_INDEX = TYPE == 6 + , NO_HOLES = TYPE == 5 || IS_FIND_INDEX + , create = $create || asc; + return function($this, callbackfn, that){ + var O = toObject($this) + , self = IObject(O) + , f = ctx(callbackfn, that, 3) + , length = toLength(self.length) + , index = 0 + , result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined + , val, res; + for(;length > index; index++)if(NO_HOLES || index in self){ + val = self[index]; + res = f(val, index, O); + if(TYPE){ + if(IS_MAP)result[index] = res; // map + else if(res)switch(TYPE){ + case 3: return true; // some + case 5: return val; // find + case 6: return index; // findIndex + case 2: result.push(val); // filter + } else if(IS_EVERY)return false; // every + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; + }; + }; + +/***/ }, +/* 161 */ +/***/ function(module, exports, __webpack_require__) { + + // 9.4.2.3 ArraySpeciesCreate(originalArray, length) + var speciesConstructor = __webpack_require__(162); + + module.exports = function(original, length){ + return new (speciesConstructor(original))(length); + }; + +/***/ }, +/* 162 */ +/***/ function(module, exports, __webpack_require__) { + + var isObject = __webpack_require__(13) + , isArray = __webpack_require__(43) + , SPECIES = __webpack_require__(23)('species'); + + module.exports = function(original){ + var C; + if(isArray(original)){ + C = original.constructor; + // cross-realm fallback + if(typeof C == 'function' && (C === Array || isArray(C.prototype)))C = undefined; + if(isObject(C)){ + C = C[SPECIES]; + if(C === null)C = undefined; + } + } return C === undefined ? Array : C; + }; + +/***/ }, +/* 163 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , $map = __webpack_require__(160)(1); + + $export($export.P + $export.F * !__webpack_require__(156)([].map, true), 'Array', { + // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) + map: function map(callbackfn /* , thisArg */){ + return $map(this, callbackfn, arguments[1]); + } + }); + +/***/ }, +/* 164 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , $filter = __webpack_require__(160)(2); + + $export($export.P + $export.F * !__webpack_require__(156)([].filter, true), 'Array', { + // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) + filter: function filter(callbackfn /* , thisArg */){ + return $filter(this, callbackfn, arguments[1]); + } + }); + +/***/ }, +/* 165 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , $some = __webpack_require__(160)(3); + + $export($export.P + $export.F * !__webpack_require__(156)([].some, true), 'Array', { + // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) + some: function some(callbackfn /* , thisArg */){ + return $some(this, callbackfn, arguments[1]); + } + }); + +/***/ }, +/* 166 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , $every = __webpack_require__(160)(4); + + $export($export.P + $export.F * !__webpack_require__(156)([].every, true), 'Array', { + // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) + every: function every(callbackfn /* , thisArg */){ + return $every(this, callbackfn, arguments[1]); + } + }); + +/***/ }, +/* 167 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , $reduce = __webpack_require__(168); + + $export($export.P + $export.F * !__webpack_require__(156)([].reduce, true), 'Array', { + // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) + reduce: function reduce(callbackfn /* , initialValue */){ + return $reduce(this, callbackfn, arguments.length, arguments[1], false); + } + }); + +/***/ }, +/* 168 */ +/***/ function(module, exports, __webpack_require__) { + + var aFunction = __webpack_require__(9) + , toObject = __webpack_require__(56) + , IObject = __webpack_require__(31) + , toLength = __webpack_require__(35); + + module.exports = function(that, callbackfn, aLen, memo, isRight){ + aFunction(callbackfn); + var O = toObject(that) + , self = IObject(O) + , length = toLength(O.length) + , index = isRight ? length - 1 : 0 + , i = isRight ? -1 : 1; + if(aLen < 2)for(;;){ + if(index in self){ + memo = self[index]; + index += i; + break; + } + index += i; + if(isRight ? index < 0 : length <= index){ + throw TypeError('Reduce of empty array with no initial value'); + } + } + for(;isRight ? index >= 0 : length > index; index += i)if(index in self){ + memo = callbackfn(memo, self[index], index, O); + } + return memo; + }; + +/***/ }, +/* 169 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , $reduce = __webpack_require__(168); + + $export($export.P + $export.F * !__webpack_require__(156)([].reduceRight, true), 'Array', { + // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) + reduceRight: function reduceRight(callbackfn /* , initialValue */){ + return $reduce(this, callbackfn, arguments.length, arguments[1], true); + } + }); + +/***/ }, +/* 170 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , $indexOf = __webpack_require__(34)(false) + , $native = [].indexOf + , NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; + + $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(156)($native)), 'Array', { + // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) + indexOf: function indexOf(searchElement /*, fromIndex = 0 */){ + return NEGATIVE_ZERO + // convert -0 to +0 + ? $native.apply(this, arguments) || 0 + : $indexOf(this, searchElement, arguments[1]); + } + }); + +/***/ }, +/* 171 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , toIObject = __webpack_require__(30) + , toInteger = __webpack_require__(36) + , toLength = __webpack_require__(35) + , $native = [].lastIndexOf + , NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; + + $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(156)($native)), 'Array', { + // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) + lastIndexOf: function lastIndexOf(searchElement /*, fromIndex = @[*-1] */){ + // convert -0 to +0 + if(NEGATIVE_ZERO)return $native.apply(this, arguments) || 0; + var O = toIObject(this) + , length = toLength(O.length) + , index = length - 1; + if(arguments.length > 1)index = Math.min(index, toInteger(arguments[1])); + if(index < 0)index = length + index; + for(;index >= 0; index--)if(index in O)if(O[index] === searchElement)return index || 0; + return -1; + } + }); + +/***/ }, +/* 172 */ +/***/ function(module, exports, __webpack_require__) { + + // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) + var $export = __webpack_require__(6); + + $export($export.P, 'Array', {copyWithin: __webpack_require__(173)}); + + __webpack_require__(174)('copyWithin'); + +/***/ }, +/* 173 */ +/***/ function(module, exports, __webpack_require__) { + + // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) + 'use strict'; + var toObject = __webpack_require__(56) + , toIndex = __webpack_require__(37) + , toLength = __webpack_require__(35); + + module.exports = [].copyWithin || function copyWithin(target/*= 0*/, start/*= 0, end = @length*/){ + var O = toObject(this) + , len = toLength(O.length) + , to = toIndex(target, len) + , from = toIndex(start, len) + , end = arguments.length > 2 ? arguments[2] : undefined + , count = Math.min((end === undefined ? len : toIndex(end, len)) - from, len - to) + , inc = 1; + if(from < to && to < from + count){ + inc = -1; + from += count - 1; + to += count - 1; + } + while(count-- > 0){ + if(from in O)O[to] = O[from]; + else delete O[to]; + to += inc; + from += inc; + } return O; + }; + +/***/ }, +/* 174 */ +/***/ function(module, exports) { + + module.exports = function(){ /* empty */ }; + +/***/ }, +/* 175 */ +/***/ function(module, exports, __webpack_require__) { + + // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) + var $export = __webpack_require__(6); + + $export($export.P, 'Array', {fill: __webpack_require__(176)}); + + __webpack_require__(174)('fill'); + +/***/ }, +/* 176 */ +/***/ function(module, exports, __webpack_require__) { + + // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) + 'use strict'; + var toObject = __webpack_require__(56) + , toIndex = __webpack_require__(37) + , toLength = __webpack_require__(35); + module.exports = function fill(value /*, start = 0, end = @length */){ + var O = toObject(this) + , length = toLength(O.length) + , aLen = arguments.length + , index = toIndex(aLen > 1 ? arguments[1] : undefined, length) + , end = aLen > 2 ? arguments[2] : undefined + , endPos = end === undefined ? length : toIndex(end, length); + while(endPos > index)O[index++] = value; + return O; + }; + +/***/ }, +/* 177 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) + var $export = __webpack_require__(6) + , $find = __webpack_require__(160)(5) + , KEY = 'find' + , forced = true; + // Shouldn't skip holes + if(KEY in [])Array(1)[KEY](function(){ forced = false; }); + $export($export.P + $export.F * forced, 'Array', { + find: function find(callbackfn/*, that = undefined */){ + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } + }); + __webpack_require__(174)(KEY); + +/***/ }, +/* 178 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) + var $export = __webpack_require__(6) + , $find = __webpack_require__(160)(6) + , KEY = 'findIndex' + , forced = true; + // Shouldn't skip holes + if(KEY in [])Array(1)[KEY](function(){ forced = false; }); + $export($export.P + $export.F * forced, 'Array', { + findIndex: function findIndex(callbackfn/*, that = undefined */){ + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } + }); + __webpack_require__(174)(KEY); + +/***/ }, +/* 179 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var addToUnscopables = __webpack_require__(174) + , step = __webpack_require__(180) + , Iterators = __webpack_require__(130) + , toIObject = __webpack_require__(30); + + // 22.1.3.4 Array.prototype.entries() + // 22.1.3.13 Array.prototype.keys() + // 22.1.3.29 Array.prototype.values() + // 22.1.3.30 Array.prototype[@@iterator]() + module.exports = __webpack_require__(129)(Array, 'Array', function(iterated, kind){ + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind + // 22.1.5.2.1 %ArrayIteratorPrototype%.next() + }, function(){ + var O = this._t + , kind = this._k + , index = this._i++; + if(!O || index >= O.length){ + this._t = undefined; + return step(1); + } + if(kind == 'keys' )return step(0, index); + if(kind == 'values')return step(0, O[index]); + return step(0, [index, O[index]]); + }, 'values'); + + // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) + Iterators.Arguments = Iterators.Array; + + addToUnscopables('keys'); + addToUnscopables('values'); + addToUnscopables('entries'); + +/***/ }, +/* 180 */ +/***/ function(module, exports) { + + module.exports = function(done, value){ + return {value: value, done: !!done}; + }; + +/***/ }, +/* 181 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(182)('Array'); + +/***/ }, +/* 182 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var global = __webpack_require__(2) + , core = __webpack_require__(7) + , dP = __webpack_require__(11) + , DESCRIPTORS = __webpack_require__(4) + , SPECIES = __webpack_require__(23)('species'); + + module.exports = function(KEY){ + var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; + if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, { + configurable: true, + get: function(){ return this; } + }); + }; + +/***/ }, +/* 183 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var LIBRARY = __webpack_require__(26) + , global = __webpack_require__(2) + , ctx = __webpack_require__(8) + , classof = __webpack_require__(152) + , $export = __webpack_require__(6) + , isObject = __webpack_require__(13) + , aFunction = __webpack_require__(9) + , anInstance = __webpack_require__(184) + , forOf = __webpack_require__(185) + , speciesConstructor = __webpack_require__(186) + , task = __webpack_require__(187).set + , microtask = __webpack_require__(188)() + , PROMISE = 'Promise' + , TypeError = global.TypeError + , process = global.process + , $Promise = global[PROMISE] + , process = global.process + , isNode = classof(process) == 'process' + , empty = function(){ /* empty */ } + , Internal, GenericPromiseCapability, Wrapper; + + var USE_NATIVE = !!function(){ + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1) + , FakePromise = (promise.constructor = {})[__webpack_require__(23)('species')] = function(exec){ exec(empty, empty); }; + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise; + } catch(e){ /* empty */ } + }(); + + // helpers + var sameConstructor = function(a, b){ + // with library wrapper special case + return a === b || a === $Promise && b === Wrapper; + }; + var isThenable = function(it){ + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; + }; + var newPromiseCapability = function(C){ + return sameConstructor($Promise, C) + ? new PromiseCapability(C) + : new GenericPromiseCapability(C); + }; + var PromiseCapability = GenericPromiseCapability = function(C){ + var resolve, reject; + this.promise = new C(function($$resolve, $$reject){ + if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); + }; + var perform = function(exec){ + try { + exec(); + } catch(e){ + return {error: e}; + } + }; + var notify = function(promise, isReject){ + if(promise._n)return; + promise._n = true; + var chain = promise._c; + microtask(function(){ + var value = promise._v + , ok = promise._s == 1 + , i = 0; + var run = function(reaction){ + var handler = ok ? reaction.ok : reaction.fail + , resolve = reaction.resolve + , reject = reaction.reject + , domain = reaction.domain + , result, then; + try { + if(handler){ + if(!ok){ + if(promise._h == 2)onHandleUnhandled(promise); + promise._h = 1; + } + if(handler === true)result = value; + else { + if(domain)domain.enter(); + result = handler(value); + if(domain)domain.exit(); + } + if(result === reaction.promise){ + reject(TypeError('Promise-chain cycle')); + } else if(then = isThenable(result)){ + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch(e){ + reject(e); + } + }; + while(chain.length > i)run(chain[i++]); // variable length - can't use forEach + promise._c = []; + promise._n = false; + if(isReject && !promise._h)onUnhandled(promise); + }); + }; + var onUnhandled = function(promise){ + task.call(global, function(){ + var value = promise._v + , abrupt, handler, console; + if(isUnhandled(promise)){ + abrupt = perform(function(){ + if(isNode){ + process.emit('unhandledRejection', value, promise); + } else if(handler = global.onunhandledrejection){ + handler({promise: promise, reason: value}); + } else if((console = global.console) && console.error){ + console.error('Unhandled promise rejection', value); + } + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } promise._a = undefined; + if(abrupt)throw abrupt.error; + }); + }; + var isUnhandled = function(promise){ + if(promise._h == 1)return false; + var chain = promise._a || promise._c + , i = 0 + , reaction; + while(chain.length > i){ + reaction = chain[i++]; + if(reaction.fail || !isUnhandled(reaction.promise))return false; + } return true; + }; + var onHandleUnhandled = function(promise){ + task.call(global, function(){ + var handler; + if(isNode){ + process.emit('rejectionHandled', promise); + } else if(handler = global.onrejectionhandled){ + handler({promise: promise, reason: promise._v}); + } + }); + }; + var $reject = function(value){ + var promise = this; + if(promise._d)return; + promise._d = true; + promise = promise._w || promise; // unwrap + promise._v = value; + promise._s = 2; + if(!promise._a)promise._a = promise._c.slice(); + notify(promise, true); + }; + var $resolve = function(value){ + var promise = this + , then; + if(promise._d)return; + promise._d = true; + promise = promise._w || promise; // unwrap + try { + if(promise === value)throw TypeError("Promise can't be resolved itself"); + if(then = isThenable(value)){ + microtask(function(){ + var wrapper = {_w: promise, _d: false}; // wrap + try { + then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); + } catch(e){ + $reject.call(wrapper, e); + } + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); + } + } catch(e){ + $reject.call({_w: promise, _d: false}, e); // wrap + } + }; + + // constructor polyfill + if(!USE_NATIVE){ + // 25.4.3.1 Promise(executor) + $Promise = function Promise(executor){ + anInstance(this, $Promise, PROMISE, '_h'); + aFunction(executor); + Internal.call(this); + try { + executor(ctx($resolve, this, 1), ctx($reject, this, 1)); + } catch(err){ + $reject.call(this, err); + } + }; + Internal = function Promise(executor){ + this._c = []; // <- awaiting reactions + this._a = undefined; // <- checked in isUnhandled reactions + this._s = 0; // <- state + this._d = false; // <- done + this._v = undefined; // <- value + this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled + this._n = false; // <- notify + }; + Internal.prototype = __webpack_require__(189)($Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function then(onFulfilled, onRejected){ + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = isNode ? process.domain : undefined; + this._c.push(reaction); + if(this._a)this._a.push(reaction); + if(this._s)notify(this, false); + return reaction.promise; + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + 'catch': function(onRejected){ + return this.then(undefined, onRejected); + } + }); + PromiseCapability = function(){ + var promise = new Internal; + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; + } + + $export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise}); + __webpack_require__(22)($Promise, PROMISE); + __webpack_require__(182)(PROMISE); + Wrapper = __webpack_require__(7)[PROMISE]; + + // statics + $export($export.S + $export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject(r){ + var capability = newPromiseCapability(this) + , $$reject = capability.reject; + $$reject(r); + return capability.promise; + } + }); + $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve(x){ + // instanceof instead of internal slot check because we should fix it without replacement native Promise core + if(x instanceof $Promise && sameConstructor(x.constructor, this))return x; + var capability = newPromiseCapability(this) + , $$resolve = capability.resolve; + $$resolve(x); + return capability.promise; + } + }); + $export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(153)(function(iter){ + $Promise.all(iter)['catch'](empty); + })), PROMISE, { + // 25.4.4.1 Promise.all(iterable) + all: function all(iterable){ + var C = this + , capability = newPromiseCapability(C) + , resolve = capability.resolve + , reject = capability.reject; + var abrupt = perform(function(){ + var values = [] + , index = 0 + , remaining = 1; + forOf(iterable, false, function(promise){ + var $index = index++ + , alreadyCalled = false; + values.push(undefined); + remaining++; + C.resolve(promise).then(function(value){ + if(alreadyCalled)return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if(abrupt)reject(abrupt.error); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable){ + var C = this + , capability = newPromiseCapability(C) + , reject = capability.reject; + var abrupt = perform(function(){ + forOf(iterable, false, function(promise){ + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if(abrupt)reject(abrupt.error); + return capability.promise; + } + }); + +/***/ }, +/* 184 */ +/***/ function(module, exports) { + + module.exports = function(it, Constructor, name, forbiddenField){ + if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){ + throw TypeError(name + ': incorrect invocation!'); + } return it; + }; + +/***/ }, +/* 185 */ +/***/ function(module, exports, __webpack_require__) { + + var ctx = __webpack_require__(8) + , call = __webpack_require__(148) + , isArrayIter = __webpack_require__(149) + , anObject = __webpack_require__(12) + , toLength = __webpack_require__(35) + , getIterFn = __webpack_require__(151) + , BREAK = {} + , RETURN = {}; + var exports = module.exports = function(iterable, entries, fn, that, ITERATOR){ + var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable) + , f = ctx(fn, that, entries ? 2 : 1) + , index = 0 + , length, step, iterator, result; + if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){ + result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); + if(result === BREAK || result === RETURN)return result; + } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){ + result = call(iterator, f, step.value, entries); + if(result === BREAK || result === RETURN)return result; + } + }; + exports.BREAK = BREAK; + exports.RETURN = RETURN; + +/***/ }, +/* 186 */ +/***/ function(module, exports, __webpack_require__) { + + // 7.3.20 SpeciesConstructor(O, defaultConstructor) + var anObject = __webpack_require__(12) + , aFunction = __webpack_require__(9) + , SPECIES = __webpack_require__(23)('species'); + module.exports = function(O, D){ + var C = anObject(O).constructor, S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); + }; + +/***/ }, +/* 187 */ +/***/ function(module, exports, __webpack_require__) { + + var ctx = __webpack_require__(8) + , invoke = __webpack_require__(74) + , html = __webpack_require__(46) + , cel = __webpack_require__(15) + , global = __webpack_require__(2) + , process = global.process + , setTask = global.setImmediate + , clearTask = global.clearImmediate + , MessageChannel = global.MessageChannel + , counter = 0 + , queue = {} + , ONREADYSTATECHANGE = 'onreadystatechange' + , defer, channel, port; + var run = function(){ + var id = +this; + if(queue.hasOwnProperty(id)){ + var fn = queue[id]; + delete queue[id]; + fn(); + } + }; + var listener = function(event){ + run.call(event.data); + }; + // Node.js 0.9+ & IE10+ has setImmediate, otherwise: + if(!setTask || !clearTask){ + setTask = function setImmediate(fn){ + var args = [], i = 1; + while(arguments.length > i)args.push(arguments[i++]); + queue[++counter] = function(){ + invoke(typeof fn == 'function' ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate(id){ + delete queue[id]; + }; + // Node.js 0.8- + if(__webpack_require__(32)(process) == 'process'){ + defer = function(id){ + process.nextTick(ctx(run, id, 1)); + }; + // Browsers with MessageChannel, includes WebWorkers + } else if(MessageChannel){ + channel = new MessageChannel; + port = channel.port2; + channel.port1.onmessage = listener; + defer = ctx(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){ + defer = function(id){ + global.postMessage(id + '', '*'); + }; + global.addEventListener('message', listener, false); + // IE8- + } else if(ONREADYSTATECHANGE in cel('script')){ + defer = function(id){ + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){ + html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers + } else { + defer = function(id){ + setTimeout(ctx(run, id, 1), 0); + }; + } + } + module.exports = { + set: setTask, + clear: clearTask + }; + +/***/ }, +/* 188 */ +/***/ function(module, exports, __webpack_require__) { + + var global = __webpack_require__(2) + , macrotask = __webpack_require__(187).set + , Observer = global.MutationObserver || global.WebKitMutationObserver + , process = global.process + , Promise = global.Promise + , isNode = __webpack_require__(32)(process) == 'process'; + + module.exports = function(){ + var head, last, notify; + + var flush = function(){ + var parent, fn; + if(isNode && (parent = process.domain))parent.exit(); + while(head){ + fn = head.fn; + head = head.next; + try { + fn(); + } catch(e){ + if(head)notify(); + else last = undefined; + throw e; + } + } last = undefined; + if(parent)parent.enter(); + }; + + // Node.js + if(isNode){ + notify = function(){ + process.nextTick(flush); + }; + // browsers with MutationObserver + } else if(Observer){ + var toggle = true + , node = document.createTextNode(''); + new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new + notify = function(){ + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if(Promise && Promise.resolve){ + var promise = Promise.resolve(); + notify = function(){ + promise.then(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function(){ + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(global, flush); + }; + } + + return function(fn){ + var task = {fn: fn, next: undefined}; + if(last)last.next = task; + if(!head){ + head = task; + notify(); + } last = task; + }; + }; + +/***/ }, +/* 189 */ +/***/ function(module, exports, __webpack_require__) { + + var hide = __webpack_require__(10); + module.exports = function(target, src, safe){ + for(var key in src){ + if(safe && target[key])target[key] = src[key]; + else hide(target, key, src[key]); + } return target; + }; + +/***/ }, +/* 190 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var strong = __webpack_require__(191); + + // 23.1 Map Objects + module.exports = __webpack_require__(192)('Map', function(get){ + return function Map(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; + }, { + // 23.1.3.6 Map.prototype.get(key) + get: function get(key){ + var entry = strong.getEntry(this, key); + return entry && entry.v; + }, + // 23.1.3.9 Map.prototype.set(key, value) + set: function set(key, value){ + return strong.def(this, key === 0 ? 0 : key, value); + } + }, strong, true); + +/***/ }, +/* 191 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var dP = __webpack_require__(11).f + , create = __webpack_require__(44) + , redefineAll = __webpack_require__(189) + , ctx = __webpack_require__(8) + , anInstance = __webpack_require__(184) + , defined = __webpack_require__(33) + , forOf = __webpack_require__(185) + , $iterDefine = __webpack_require__(129) + , step = __webpack_require__(180) + , setSpecies = __webpack_require__(182) + , DESCRIPTORS = __webpack_require__(4) + , fastKey = __webpack_require__(19).fastKey + , SIZE = DESCRIPTORS ? '_s' : 'size'; + + var getEntry = function(that, key){ + // fast case + var index = fastKey(key), entry; + if(index !== 'F')return that._i[index]; + // frozen object case + for(entry = that._f; entry; entry = entry.n){ + if(entry.k == key)return entry; + } + }; + + module.exports = { + getConstructor: function(wrapper, NAME, IS_MAP, ADDER){ + var C = wrapper(function(that, iterable){ + anInstance(that, C, NAME, '_i'); + that._i = create(null); // index + that._f = undefined; // first entry + that._l = undefined; // last entry + that[SIZE] = 0; // size + if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear(){ + for(var that = this, data = that._i, entry = that._f; entry; entry = entry.n){ + entry.r = true; + if(entry.p)entry.p = entry.p.n = undefined; + delete data[entry.i]; + } + that._f = that._l = undefined; + that[SIZE] = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + 'delete': function(key){ + var that = this + , entry = getEntry(that, key); + if(entry){ + var next = entry.n + , prev = entry.p; + delete that._i[entry.i]; + entry.r = true; + if(prev)prev.n = next; + if(next)next.p = prev; + if(that._f == entry)that._f = next; + if(that._l == entry)that._l = prev; + that[SIZE]--; + } return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach(callbackfn /*, that = undefined */){ + anInstance(this, C, 'forEach'); + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3) + , entry; + while(entry = entry ? entry.n : this._f){ + f(entry.v, entry.k, this); + // revert to the last existing entry + while(entry && entry.r)entry = entry.p; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has(key){ + return !!getEntry(this, key); + } + }); + if(DESCRIPTORS)dP(C.prototype, 'size', { + get: function(){ + return defined(this[SIZE]); + } + }); + return C; + }, + def: function(that, key, value){ + var entry = getEntry(that, key) + , prev, index; + // change existing entry + if(entry){ + entry.v = value; + // create new entry + } else { + that._l = entry = { + i: index = fastKey(key, true), // <- index + k: key, // <- key + v: value, // <- value + p: prev = that._l, // <- previous entry + n: undefined, // <- next entry + r: false // <- removed + }; + if(!that._f)that._f = entry; + if(prev)prev.n = entry; + that[SIZE]++; + // add to index + if(index !== 'F')that._i[index] = entry; + } return that; + }, + getEntry: getEntry, + setStrong: function(C, NAME, IS_MAP){ + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + $iterDefine(C, NAME, function(iterated, kind){ + this._t = iterated; // target + this._k = kind; // kind + this._l = undefined; // previous + }, function(){ + var that = this + , kind = that._k + , entry = that._l; + // revert to the last existing entry + while(entry && entry.r)entry = entry.p; + // get next entry + if(!that._t || !(that._l = entry = entry ? entry.n : that._t._f)){ + // or finish the iteration + that._t = undefined; + return step(1); + } + // return step by kind + if(kind == 'keys' )return step(0, entry.k); + if(kind == 'values')return step(0, entry.v); + return step(0, [entry.k, entry.v]); + }, IS_MAP ? 'entries' : 'values' , !IS_MAP, true); + + // add [@@species], 23.1.2.2, 23.2.2.2 + setSpecies(NAME); + } + }; + +/***/ }, +/* 192 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var global = __webpack_require__(2) + , $export = __webpack_require__(6) + , meta = __webpack_require__(19) + , fails = __webpack_require__(5) + , hide = __webpack_require__(10) + , redefineAll = __webpack_require__(189) + , forOf = __webpack_require__(185) + , anInstance = __webpack_require__(184) + , isObject = __webpack_require__(13) + , setToStringTag = __webpack_require__(22) + , dP = __webpack_require__(11).f + , each = __webpack_require__(160)(0) + , DESCRIPTORS = __webpack_require__(4); + + module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){ + var Base = global[NAME] + , C = Base + , ADDER = IS_MAP ? 'set' : 'add' + , proto = C && C.prototype + , O = {}; + if(!DESCRIPTORS || typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function(){ + new C().entries().next(); + }))){ + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + redefineAll(C.prototype, methods); + meta.NEED = true; + } else { + C = wrapper(function(target, iterable){ + anInstance(target, C, NAME, '_c'); + target._c = new Base; + if(iterable != undefined)forOf(iterable, IS_MAP, target[ADDER], target); + }); + each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','),function(KEY){ + var IS_ADDER = KEY == 'add' || KEY == 'set'; + if(KEY in proto && !(IS_WEAK && KEY == 'clear'))hide(C.prototype, KEY, function(a, b){ + anInstance(this, C, KEY); + if(!IS_ADDER && IS_WEAK && !isObject(a))return KEY == 'get' ? undefined : false; + var result = this._c[KEY](a === 0 ? 0 : a, b); + return IS_ADDER ? this : result; + }); + }); + if('size' in proto)dP(C.prototype, 'size', { + get: function(){ + return this._c.size; + } + }); + } + + setToStringTag(C, NAME); + + O[NAME] = C; + $export($export.G + $export.W + $export.F, O); + + if(!IS_WEAK)common.setStrong(C, NAME, IS_MAP); + + return C; + }; + +/***/ }, +/* 193 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var strong = __webpack_require__(191); + + // 23.2 Set Objects + module.exports = __webpack_require__(192)('Set', function(get){ + return function Set(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; + }, { + // 23.2.3.1 Set.prototype.add(value) + add: function add(value){ + return strong.def(this, value = value === 0 ? 0 : value, value); + } + }, strong); + +/***/ }, +/* 194 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var each = __webpack_require__(160)(0) + , redefine = __webpack_require__(18) + , meta = __webpack_require__(19) + , assign = __webpack_require__(67) + , weak = __webpack_require__(195) + , isObject = __webpack_require__(13) + , getWeak = meta.getWeak + , isExtensible = Object.isExtensible + , uncaughtFrozenStore = weak.ufstore + , tmp = {} + , InternalMap; + + var wrapper = function(get){ + return function WeakMap(){ + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }; + + var methods = { + // 23.3.3.3 WeakMap.prototype.get(key) + get: function get(key){ + if(isObject(key)){ + var data = getWeak(key); + if(data === true)return uncaughtFrozenStore(this).get(key); + return data ? data[this._i] : undefined; + } + }, + // 23.3.3.5 WeakMap.prototype.set(key, value) + set: function set(key, value){ + return weak.def(this, key, value); + } + }; + + // 23.3 WeakMap Objects + var $WeakMap = module.exports = __webpack_require__(192)('WeakMap', wrapper, methods, weak, true, true); + + // IE11 WeakMap frozen keys fix + if(new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7){ + InternalMap = weak.getConstructor(wrapper); + assign(InternalMap.prototype, methods); + meta.NEED = true; + each(['delete', 'has', 'get', 'set'], function(key){ + var proto = $WeakMap.prototype + , method = proto[key]; + redefine(proto, key, function(a, b){ + // store frozen objects on internal weakmap shim + if(isObject(a) && !isExtensible(a)){ + if(!this._f)this._f = new InternalMap; + var result = this._f[key](a, b); + return key == 'set' ? this : result; + // store all the rest on native weakmap + } return method.call(this, a, b); + }); + }); + } + +/***/ }, +/* 195 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var redefineAll = __webpack_require__(189) + , getWeak = __webpack_require__(19).getWeak + , anObject = __webpack_require__(12) + , isObject = __webpack_require__(13) + , anInstance = __webpack_require__(184) + , forOf = __webpack_require__(185) + , createArrayMethod = __webpack_require__(160) + , $has = __webpack_require__(3) + , arrayFind = createArrayMethod(5) + , arrayFindIndex = createArrayMethod(6) + , id = 0; + + // fallback for uncaught frozen keys + var uncaughtFrozenStore = function(that){ + return that._l || (that._l = new UncaughtFrozenStore); + }; + var UncaughtFrozenStore = function(){ + this.a = []; + }; + var findUncaughtFrozen = function(store, key){ + return arrayFind(store.a, function(it){ + return it[0] === key; + }); + }; + UncaughtFrozenStore.prototype = { + get: function(key){ + var entry = findUncaughtFrozen(this, key); + if(entry)return entry[1]; + }, + has: function(key){ + return !!findUncaughtFrozen(this, key); + }, + set: function(key, value){ + var entry = findUncaughtFrozen(this, key); + if(entry)entry[1] = value; + else this.a.push([key, value]); + }, + 'delete': function(key){ + var index = arrayFindIndex(this.a, function(it){ + return it[0] === key; + }); + if(~index)this.a.splice(index, 1); + return !!~index; + } + }; + + module.exports = { + getConstructor: function(wrapper, NAME, IS_MAP, ADDER){ + var C = wrapper(function(that, iterable){ + anInstance(that, C, NAME, '_i'); + that._i = id++; // collection id + that._l = undefined; // leak store for uncaught frozen objects + if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.3.3.2 WeakMap.prototype.delete(key) + // 23.4.3.3 WeakSet.prototype.delete(value) + 'delete': function(key){ + if(!isObject(key))return false; + var data = getWeak(key); + if(data === true)return uncaughtFrozenStore(this)['delete'](key); + return data && $has(data, this._i) && delete data[this._i]; + }, + // 23.3.3.4 WeakMap.prototype.has(key) + // 23.4.3.4 WeakSet.prototype.has(value) + has: function has(key){ + if(!isObject(key))return false; + var data = getWeak(key); + if(data === true)return uncaughtFrozenStore(this).has(key); + return data && $has(data, this._i); + } + }); + return C; + }, + def: function(that, key, value){ + var data = getWeak(anObject(key), true); + if(data === true)uncaughtFrozenStore(that).set(key, value); + else data[that._i] = value; + return that; + }, + ufstore: uncaughtFrozenStore + }; + +/***/ }, +/* 196 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var weak = __webpack_require__(195); + + // 23.4 WeakSet Objects + __webpack_require__(192)('WeakSet', function(get){ + return function WeakSet(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; + }, { + // 23.4.3.1 WeakSet.prototype.add(value) + add: function add(value){ + return weak.def(this, value, true); + } + }, weak, false, true); + +/***/ }, +/* 197 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.1 Reflect.apply(target, thisArgument, argumentsList) + var $export = __webpack_require__(6) + , aFunction = __webpack_require__(9) + , anObject = __webpack_require__(12) + , rApply = (__webpack_require__(2).Reflect || {}).apply + , fApply = Function.apply; + // MS Edge argumentsList argument is optional + $export($export.S + $export.F * !__webpack_require__(5)(function(){ + rApply(function(){}); + }), 'Reflect', { + apply: function apply(target, thisArgument, argumentsList){ + var T = aFunction(target) + , L = anObject(argumentsList); + return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L); + } + }); + +/***/ }, +/* 198 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) + var $export = __webpack_require__(6) + , create = __webpack_require__(44) + , aFunction = __webpack_require__(9) + , anObject = __webpack_require__(12) + , isObject = __webpack_require__(13) + , fails = __webpack_require__(5) + , bind = __webpack_require__(73) + , rConstruct = (__webpack_require__(2).Reflect || {}).construct; + + // MS Edge supports only 2 arguments and argumentsList argument is optional + // FF Nightly sets third argument as `new.target`, but does not create `this` from it + var NEW_TARGET_BUG = fails(function(){ + function F(){} + return !(rConstruct(function(){}, [], F) instanceof F); + }); + var ARGS_BUG = !fails(function(){ + rConstruct(function(){}); + }); + + $export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { + construct: function construct(Target, args /*, newTarget*/){ + aFunction(Target); + anObject(args); + var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); + if(ARGS_BUG && !NEW_TARGET_BUG)return rConstruct(Target, args, newTarget); + if(Target == newTarget){ + // w/o altered newTarget, optimization for 0-4 arguments + switch(args.length){ + case 0: return new Target; + case 1: return new Target(args[0]); + case 2: return new Target(args[0], args[1]); + case 3: return new Target(args[0], args[1], args[2]); + case 4: return new Target(args[0], args[1], args[2], args[3]); + } + // w/o altered newTarget, lot of arguments case + var $args = [null]; + $args.push.apply($args, args); + return new (bind.apply(Target, $args)); + } + // with altered newTarget, not support built-in constructors + var proto = newTarget.prototype + , instance = create(isObject(proto) ? proto : Object.prototype) + , result = Function.apply.call(Target, instance, args); + return isObject(result) ? result : instance; + } + }); + +/***/ }, +/* 199 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) + var dP = __webpack_require__(11) + , $export = __webpack_require__(6) + , anObject = __webpack_require__(12) + , toPrimitive = __webpack_require__(16); + + // MS Edge has broken Reflect.defineProperty - throwing instead of returning false + $export($export.S + $export.F * __webpack_require__(5)(function(){ + Reflect.defineProperty(dP.f({}, 1, {value: 1}), 1, {value: 2}); + }), 'Reflect', { + defineProperty: function defineProperty(target, propertyKey, attributes){ + anObject(target); + propertyKey = toPrimitive(propertyKey, true); + anObject(attributes); + try { + dP.f(target, propertyKey, attributes); + return true; + } catch(e){ + return false; + } + } + }); + +/***/ }, +/* 200 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.4 Reflect.deleteProperty(target, propertyKey) + var $export = __webpack_require__(6) + , gOPD = __webpack_require__(49).f + , anObject = __webpack_require__(12); + + $export($export.S, 'Reflect', { + deleteProperty: function deleteProperty(target, propertyKey){ + var desc = gOPD(anObject(target), propertyKey); + return desc && !desc.configurable ? false : delete target[propertyKey]; + } + }); + +/***/ }, +/* 201 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // 26.1.5 Reflect.enumerate(target) + var $export = __webpack_require__(6) + , anObject = __webpack_require__(12); + var Enumerate = function(iterated){ + this._t = anObject(iterated); // target + this._i = 0; // next index + var keys = this._k = [] // keys + , key; + for(key in iterated)keys.push(key); + }; + __webpack_require__(131)(Enumerate, 'Object', function(){ + var that = this + , keys = that._k + , key; + do { + if(that._i >= keys.length)return {value: undefined, done: true}; + } while(!((key = keys[that._i++]) in that._t)); + return {value: key, done: false}; + }); + + $export($export.S, 'Reflect', { + enumerate: function enumerate(target){ + return new Enumerate(target); + } + }); + +/***/ }, +/* 202 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.6 Reflect.get(target, propertyKey [, receiver]) + var gOPD = __webpack_require__(49) + , getPrototypeOf = __webpack_require__(57) + , has = __webpack_require__(3) + , $export = __webpack_require__(6) + , isObject = __webpack_require__(13) + , anObject = __webpack_require__(12); + + function get(target, propertyKey/*, receiver*/){ + var receiver = arguments.length < 3 ? target : arguments[2] + , desc, proto; + if(anObject(target) === receiver)return target[propertyKey]; + if(desc = gOPD.f(target, propertyKey))return has(desc, 'value') + ? desc.value + : desc.get !== undefined + ? desc.get.call(receiver) + : undefined; + if(isObject(proto = getPrototypeOf(target)))return get(proto, propertyKey, receiver); + } + + $export($export.S, 'Reflect', {get: get}); + +/***/ }, +/* 203 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) + var gOPD = __webpack_require__(49) + , $export = __webpack_require__(6) + , anObject = __webpack_require__(12); + + $export($export.S, 'Reflect', { + getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey){ + return gOPD.f(anObject(target), propertyKey); + } + }); + +/***/ }, +/* 204 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.8 Reflect.getPrototypeOf(target) + var $export = __webpack_require__(6) + , getProto = __webpack_require__(57) + , anObject = __webpack_require__(12); + + $export($export.S, 'Reflect', { + getPrototypeOf: function getPrototypeOf(target){ + return getProto(anObject(target)); + } + }); + +/***/ }, +/* 205 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.9 Reflect.has(target, propertyKey) + var $export = __webpack_require__(6); + + $export($export.S, 'Reflect', { + has: function has(target, propertyKey){ + return propertyKey in target; + } + }); + +/***/ }, +/* 206 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.10 Reflect.isExtensible(target) + var $export = __webpack_require__(6) + , anObject = __webpack_require__(12) + , $isExtensible = Object.isExtensible; + + $export($export.S, 'Reflect', { + isExtensible: function isExtensible(target){ + anObject(target); + return $isExtensible ? $isExtensible(target) : true; + } + }); + +/***/ }, +/* 207 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.11 Reflect.ownKeys(target) + var $export = __webpack_require__(6); + + $export($export.S, 'Reflect', {ownKeys: __webpack_require__(208)}); + +/***/ }, +/* 208 */ +/***/ function(module, exports, __webpack_require__) { + + // all object keys, includes non-enumerable and symbols + var gOPN = __webpack_require__(48) + , gOPS = __webpack_require__(41) + , anObject = __webpack_require__(12) + , Reflect = __webpack_require__(2).Reflect; + module.exports = Reflect && Reflect.ownKeys || function ownKeys(it){ + var keys = gOPN.f(anObject(it)) + , getSymbols = gOPS.f; + return getSymbols ? keys.concat(getSymbols(it)) : keys; + }; + +/***/ }, +/* 209 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.12 Reflect.preventExtensions(target) + var $export = __webpack_require__(6) + , anObject = __webpack_require__(12) + , $preventExtensions = Object.preventExtensions; + + $export($export.S, 'Reflect', { + preventExtensions: function preventExtensions(target){ + anObject(target); + try { + if($preventExtensions)$preventExtensions(target); + return true; + } catch(e){ + return false; + } + } + }); + +/***/ }, +/* 210 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) + var dP = __webpack_require__(11) + , gOPD = __webpack_require__(49) + , getPrototypeOf = __webpack_require__(57) + , has = __webpack_require__(3) + , $export = __webpack_require__(6) + , createDesc = __webpack_require__(17) + , anObject = __webpack_require__(12) + , isObject = __webpack_require__(13); + + function set(target, propertyKey, V/*, receiver*/){ + var receiver = arguments.length < 4 ? target : arguments[3] + , ownDesc = gOPD.f(anObject(target), propertyKey) + , existingDescriptor, proto; + if(!ownDesc){ + if(isObject(proto = getPrototypeOf(target))){ + return set(proto, propertyKey, V, receiver); + } + ownDesc = createDesc(0); + } + if(has(ownDesc, 'value')){ + if(ownDesc.writable === false || !isObject(receiver))return false; + existingDescriptor = gOPD.f(receiver, propertyKey) || createDesc(0); + existingDescriptor.value = V; + dP.f(receiver, propertyKey, existingDescriptor); + return true; + } + return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); + } + + $export($export.S, 'Reflect', {set: set}); + +/***/ }, +/* 211 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.14 Reflect.setPrototypeOf(target, proto) + var $export = __webpack_require__(6) + , setProto = __webpack_require__(71); + + if(setProto)$export($export.S, 'Reflect', { + setPrototypeOf: function setPrototypeOf(target, proto){ + setProto.check(target, proto); + try { + setProto.set(target, proto); + return true; + } catch(e){ + return false; + } + } + }); + +/***/ }, +/* 212 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.3.3.1 / 15.9.4.4 Date.now() + var $export = __webpack_require__(6); + + $export($export.S, 'Date', {now: function(){ return new Date().getTime(); }}); + +/***/ }, +/* 213 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , toObject = __webpack_require__(56) + , toPrimitive = __webpack_require__(16); + + $export($export.P + $export.F * __webpack_require__(5)(function(){ + return new Date(NaN).toJSON() !== null || Date.prototype.toJSON.call({toISOString: function(){ return 1; }}) !== 1; + }), 'Date', { + toJSON: function toJSON(key){ + var O = toObject(this) + , pv = toPrimitive(O); + return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString(); + } + }); + +/***/ }, +/* 214 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() + var $export = __webpack_require__(6) + , fails = __webpack_require__(5) + , getTime = Date.prototype.getTime; + + var lz = function(num){ + return num > 9 ? num : '0' + num; + }; + + // PhantomJS / old WebKit has a broken implementations + $export($export.P + $export.F * (fails(function(){ + return new Date(-5e13 - 1).toISOString() != '0385-07-25T07:06:39.999Z'; + }) || !fails(function(){ + new Date(NaN).toISOString(); + })), 'Date', { + toISOString: function toISOString(){ + if(!isFinite(getTime.call(this)))throw RangeError('Invalid time value'); + var d = this + , y = d.getUTCFullYear() + , m = d.getUTCMilliseconds() + , s = y < 0 ? '-' : y > 9999 ? '+' : ''; + return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + + '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) + + 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) + + ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z'; + } + }); + +/***/ }, +/* 215 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , $typed = __webpack_require__(216) + , buffer = __webpack_require__(217) + , anObject = __webpack_require__(12) + , toIndex = __webpack_require__(37) + , toLength = __webpack_require__(35) + , isObject = __webpack_require__(13) + , ArrayBuffer = __webpack_require__(2).ArrayBuffer + , speciesConstructor = __webpack_require__(186) + , $ArrayBuffer = buffer.ArrayBuffer + , $DataView = buffer.DataView + , $isView = $typed.ABV && ArrayBuffer.isView + , $slice = $ArrayBuffer.prototype.slice + , VIEW = $typed.VIEW + , ARRAY_BUFFER = 'ArrayBuffer'; + + $export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), {ArrayBuffer: $ArrayBuffer}); + + $export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, { + // 24.1.3.1 ArrayBuffer.isView(arg) + isView: function isView(it){ + return $isView && $isView(it) || isObject(it) && VIEW in it; + } + }); + + $export($export.P + $export.U + $export.F * __webpack_require__(5)(function(){ + return !new $ArrayBuffer(2).slice(1, undefined).byteLength; + }), ARRAY_BUFFER, { + // 24.1.4.3 ArrayBuffer.prototype.slice(start, end) + slice: function slice(start, end){ + if($slice !== undefined && end === undefined)return $slice.call(anObject(this), start); // FF fix + var len = anObject(this).byteLength + , first = toIndex(start, len) + , final = toIndex(end === undefined ? len : end, len) + , result = new (speciesConstructor(this, $ArrayBuffer))(toLength(final - first)) + , viewS = new $DataView(this) + , viewT = new $DataView(result) + , index = 0; + while(first < final){ + viewT.setUint8(index++, viewS.getUint8(first++)); + } return result; + } + }); + + __webpack_require__(182)(ARRAY_BUFFER); + +/***/ }, +/* 216 */ +/***/ function(module, exports, __webpack_require__) { + + var global = __webpack_require__(2) + , hide = __webpack_require__(10) + , uid = __webpack_require__(20) + , TYPED = uid('typed_array') + , VIEW = uid('view') + , ABV = !!(global.ArrayBuffer && global.DataView) + , CONSTR = ABV + , i = 0, l = 9, Typed; + + var TypedArrayConstructors = ( + 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array' + ).split(','); + + while(i < l){ + if(Typed = global[TypedArrayConstructors[i++]]){ + hide(Typed.prototype, TYPED, true); + hide(Typed.prototype, VIEW, true); + } else CONSTR = false; + } + + module.exports = { + ABV: ABV, + CONSTR: CONSTR, + TYPED: TYPED, + VIEW: VIEW + }; + +/***/ }, +/* 217 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var global = __webpack_require__(2) + , DESCRIPTORS = __webpack_require__(4) + , LIBRARY = __webpack_require__(26) + , $typed = __webpack_require__(216) + , hide = __webpack_require__(10) + , redefineAll = __webpack_require__(189) + , fails = __webpack_require__(5) + , anInstance = __webpack_require__(184) + , toInteger = __webpack_require__(36) + , toLength = __webpack_require__(35) + , gOPN = __webpack_require__(48).f + , dP = __webpack_require__(11).f + , arrayFill = __webpack_require__(176) + , setToStringTag = __webpack_require__(22) + , ARRAY_BUFFER = 'ArrayBuffer' + , DATA_VIEW = 'DataView' + , PROTOTYPE = 'prototype' + , WRONG_LENGTH = 'Wrong length!' + , WRONG_INDEX = 'Wrong index!' + , $ArrayBuffer = global[ARRAY_BUFFER] + , $DataView = global[DATA_VIEW] + , Math = global.Math + , RangeError = global.RangeError + , Infinity = global.Infinity + , BaseBuffer = $ArrayBuffer + , abs = Math.abs + , pow = Math.pow + , floor = Math.floor + , log = Math.log + , LN2 = Math.LN2 + , BUFFER = 'buffer' + , BYTE_LENGTH = 'byteLength' + , BYTE_OFFSET = 'byteOffset' + , $BUFFER = DESCRIPTORS ? '_b' : BUFFER + , $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH + , $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET; + + // IEEE754 conversions based on https://github.com/feross/ieee754 + var packIEEE754 = function(value, mLen, nBytes){ + var buffer = Array(nBytes) + , eLen = nBytes * 8 - mLen - 1 + , eMax = (1 << eLen) - 1 + , eBias = eMax >> 1 + , rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0 + , i = 0 + , s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0 + , e, m, c; + value = abs(value) + if(value != value || value === Infinity){ + m = value != value ? 1 : 0; + e = eMax; + } else { + e = floor(log(value) / LN2); + if(value * (c = pow(2, -e)) < 1){ + e--; + c *= 2; + } + if(e + eBias >= 1){ + value += rt / c; + } else { + value += rt * pow(2, 1 - eBias); + } + if(value * c >= 2){ + e++; + c /= 2; + } + if(e + eBias >= eMax){ + m = 0; + e = eMax; + } else if(e + eBias >= 1){ + m = (value * c - 1) * pow(2, mLen); + e = e + eBias; + } else { + m = value * pow(2, eBias - 1) * pow(2, mLen); + e = 0; + } + } + for(; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8); + e = e << mLen | m; + eLen += mLen; + for(; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8); + buffer[--i] |= s * 128; + return buffer; + }; + var unpackIEEE754 = function(buffer, mLen, nBytes){ + var eLen = nBytes * 8 - mLen - 1 + , eMax = (1 << eLen) - 1 + , eBias = eMax >> 1 + , nBits = eLen - 7 + , i = nBytes - 1 + , s = buffer[i--] + , e = s & 127 + , m; + s >>= 7; + for(; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8); + m = e & (1 << -nBits) - 1; + e >>= -nBits; + nBits += mLen; + for(; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8); + if(e === 0){ + e = 1 - eBias; + } else if(e === eMax){ + return m ? NaN : s ? -Infinity : Infinity; + } else { + m = m + pow(2, mLen); + e = e - eBias; + } return (s ? -1 : 1) * m * pow(2, e - mLen); + }; + + var unpackI32 = function(bytes){ + return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0]; + }; + var packI8 = function(it){ + return [it & 0xff]; + }; + var packI16 = function(it){ + return [it & 0xff, it >> 8 & 0xff]; + }; + var packI32 = function(it){ + return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff]; + }; + var packF64 = function(it){ + return packIEEE754(it, 52, 8); + }; + var packF32 = function(it){ + return packIEEE754(it, 23, 4); + }; + + var addGetter = function(C, key, internal){ + dP(C[PROTOTYPE], key, {get: function(){ return this[internal]; }}); + }; + + var get = function(view, bytes, index, isLittleEndian){ + var numIndex = +index + , intIndex = toInteger(numIndex); + if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b + , start = intIndex + view[$OFFSET] + , pack = store.slice(start, start + bytes); + return isLittleEndian ? pack : pack.reverse(); + }; + var set = function(view, bytes, index, conversion, value, isLittleEndian){ + var numIndex = +index + , intIndex = toInteger(numIndex); + if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b + , start = intIndex + view[$OFFSET] + , pack = conversion(+value); + for(var i = 0; i < bytes; i++)store[start + i] = pack[isLittleEndian ? i : bytes - i - 1]; + }; + + var validateArrayBufferArguments = function(that, length){ + anInstance(that, $ArrayBuffer, ARRAY_BUFFER); + var numberLength = +length + , byteLength = toLength(numberLength); + if(numberLength != byteLength)throw RangeError(WRONG_LENGTH); + return byteLength; + }; + + if(!$typed.ABV){ + $ArrayBuffer = function ArrayBuffer(length){ + var byteLength = validateArrayBufferArguments(this, length); + this._b = arrayFill.call(Array(byteLength), 0); + this[$LENGTH] = byteLength; + }; + + $DataView = function DataView(buffer, byteOffset, byteLength){ + anInstance(this, $DataView, DATA_VIEW); + anInstance(buffer, $ArrayBuffer, DATA_VIEW); + var bufferLength = buffer[$LENGTH] + , offset = toInteger(byteOffset); + if(offset < 0 || offset > bufferLength)throw RangeError('Wrong offset!'); + byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); + if(offset + byteLength > bufferLength)throw RangeError(WRONG_LENGTH); + this[$BUFFER] = buffer; + this[$OFFSET] = offset; + this[$LENGTH] = byteLength; + }; + + if(DESCRIPTORS){ + addGetter($ArrayBuffer, BYTE_LENGTH, '_l'); + addGetter($DataView, BUFFER, '_b'); + addGetter($DataView, BYTE_LENGTH, '_l'); + addGetter($DataView, BYTE_OFFSET, '_o'); + } + + redefineAll($DataView[PROTOTYPE], { + getInt8: function getInt8(byteOffset){ + return get(this, 1, byteOffset)[0] << 24 >> 24; + }, + getUint8: function getUint8(byteOffset){ + return get(this, 1, byteOffset)[0]; + }, + getInt16: function getInt16(byteOffset /*, littleEndian */){ + var bytes = get(this, 2, byteOffset, arguments[1]); + return (bytes[1] << 8 | bytes[0]) << 16 >> 16; + }, + getUint16: function getUint16(byteOffset /*, littleEndian */){ + var bytes = get(this, 2, byteOffset, arguments[1]); + return bytes[1] << 8 | bytes[0]; + }, + getInt32: function getInt32(byteOffset /*, littleEndian */){ + return unpackI32(get(this, 4, byteOffset, arguments[1])); + }, + getUint32: function getUint32(byteOffset /*, littleEndian */){ + return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0; + }, + getFloat32: function getFloat32(byteOffset /*, littleEndian */){ + return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4); + }, + getFloat64: function getFloat64(byteOffset /*, littleEndian */){ + return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8); + }, + setInt8: function setInt8(byteOffset, value){ + set(this, 1, byteOffset, packI8, value); + }, + setUint8: function setUint8(byteOffset, value){ + set(this, 1, byteOffset, packI8, value); + }, + setInt16: function setInt16(byteOffset, value /*, littleEndian */){ + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setUint16: function setUint16(byteOffset, value /*, littleEndian */){ + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setInt32: function setInt32(byteOffset, value /*, littleEndian */){ + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setUint32: function setUint32(byteOffset, value /*, littleEndian */){ + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setFloat32: function setFloat32(byteOffset, value /*, littleEndian */){ + set(this, 4, byteOffset, packF32, value, arguments[2]); + }, + setFloat64: function setFloat64(byteOffset, value /*, littleEndian */){ + set(this, 8, byteOffset, packF64, value, arguments[2]); + } + }); + } else { + if(!fails(function(){ + new $ArrayBuffer; // eslint-disable-line no-new + }) || !fails(function(){ + new $ArrayBuffer(.5); // eslint-disable-line no-new + })){ + $ArrayBuffer = function ArrayBuffer(length){ + return new BaseBuffer(validateArrayBufferArguments(this, length)); + }; + var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE]; + for(var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j; ){ + if(!((key = keys[j++]) in $ArrayBuffer))hide($ArrayBuffer, key, BaseBuffer[key]); + }; + if(!LIBRARY)ArrayBufferProto.constructor = $ArrayBuffer; + } + // iOS Safari 7.x bug + var view = new $DataView(new $ArrayBuffer(2)) + , $setInt8 = $DataView[PROTOTYPE].setInt8; + view.setInt8(0, 2147483648); + view.setInt8(1, 2147483649); + if(view.getInt8(0) || !view.getInt8(1))redefineAll($DataView[PROTOTYPE], { + setInt8: function setInt8(byteOffset, value){ + $setInt8.call(this, byteOffset, value << 24 >> 24); + }, + setUint8: function setUint8(byteOffset, value){ + $setInt8.call(this, byteOffset, value << 24 >> 24); + } + }, true); + } + setToStringTag($ArrayBuffer, ARRAY_BUFFER); + setToStringTag($DataView, DATA_VIEW); + hide($DataView[PROTOTYPE], $typed.VIEW, true); + exports[ARRAY_BUFFER] = $ArrayBuffer; + exports[DATA_VIEW] = $DataView; + +/***/ }, +/* 218 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6); + $export($export.G + $export.W + $export.F * !__webpack_require__(216).ABV, { + DataView: __webpack_require__(217).DataView + }); + +/***/ }, +/* 219 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(220)('Int8', 1, function(init){ + return function Int8Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; + }); + +/***/ }, +/* 220 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + if(__webpack_require__(4)){ + var LIBRARY = __webpack_require__(26) + , global = __webpack_require__(2) + , fails = __webpack_require__(5) + , $export = __webpack_require__(6) + , $typed = __webpack_require__(216) + , $buffer = __webpack_require__(217) + , ctx = __webpack_require__(8) + , anInstance = __webpack_require__(184) + , propertyDesc = __webpack_require__(17) + , hide = __webpack_require__(10) + , redefineAll = __webpack_require__(189) + , toInteger = __webpack_require__(36) + , toLength = __webpack_require__(35) + , toIndex = __webpack_require__(37) + , toPrimitive = __webpack_require__(16) + , has = __webpack_require__(3) + , same = __webpack_require__(69) + , classof = __webpack_require__(152) + , isObject = __webpack_require__(13) + , toObject = __webpack_require__(56) + , isArrayIter = __webpack_require__(149) + , create = __webpack_require__(44) + , getPrototypeOf = __webpack_require__(57) + , gOPN = __webpack_require__(48).f + , getIterFn = __webpack_require__(151) + , uid = __webpack_require__(20) + , wks = __webpack_require__(23) + , createArrayMethod = __webpack_require__(160) + , createArrayIncludes = __webpack_require__(34) + , speciesConstructor = __webpack_require__(186) + , ArrayIterators = __webpack_require__(179) + , Iterators = __webpack_require__(130) + , $iterDetect = __webpack_require__(153) + , setSpecies = __webpack_require__(182) + , arrayFill = __webpack_require__(176) + , arrayCopyWithin = __webpack_require__(173) + , $DP = __webpack_require__(11) + , $GOPD = __webpack_require__(49) + , dP = $DP.f + , gOPD = $GOPD.f + , RangeError = global.RangeError + , TypeError = global.TypeError + , Uint8Array = global.Uint8Array + , ARRAY_BUFFER = 'ArrayBuffer' + , SHARED_BUFFER = 'Shared' + ARRAY_BUFFER + , BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT' + , PROTOTYPE = 'prototype' + , ArrayProto = Array[PROTOTYPE] + , $ArrayBuffer = $buffer.ArrayBuffer + , $DataView = $buffer.DataView + , arrayForEach = createArrayMethod(0) + , arrayFilter = createArrayMethod(2) + , arraySome = createArrayMethod(3) + , arrayEvery = createArrayMethod(4) + , arrayFind = createArrayMethod(5) + , arrayFindIndex = createArrayMethod(6) + , arrayIncludes = createArrayIncludes(true) + , arrayIndexOf = createArrayIncludes(false) + , arrayValues = ArrayIterators.values + , arrayKeys = ArrayIterators.keys + , arrayEntries = ArrayIterators.entries + , arrayLastIndexOf = ArrayProto.lastIndexOf + , arrayReduce = ArrayProto.reduce + , arrayReduceRight = ArrayProto.reduceRight + , arrayJoin = ArrayProto.join + , arraySort = ArrayProto.sort + , arraySlice = ArrayProto.slice + , arrayToString = ArrayProto.toString + , arrayToLocaleString = ArrayProto.toLocaleString + , ITERATOR = wks('iterator') + , TAG = wks('toStringTag') + , TYPED_CONSTRUCTOR = uid('typed_constructor') + , DEF_CONSTRUCTOR = uid('def_constructor') + , ALL_CONSTRUCTORS = $typed.CONSTR + , TYPED_ARRAY = $typed.TYPED + , VIEW = $typed.VIEW + , WRONG_LENGTH = 'Wrong length!'; + + var $map = createArrayMethod(1, function(O, length){ + return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); + }); + + var LITTLE_ENDIAN = fails(function(){ + return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; + }); + + var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function(){ + new Uint8Array(1).set({}); + }); + + var strictToLength = function(it, SAME){ + if(it === undefined)throw TypeError(WRONG_LENGTH); + var number = +it + , length = toLength(it); + if(SAME && !same(number, length))throw RangeError(WRONG_LENGTH); + return length; + }; + + var toOffset = function(it, BYTES){ + var offset = toInteger(it); + if(offset < 0 || offset % BYTES)throw RangeError('Wrong offset!'); + return offset; + }; + + var validate = function(it){ + if(isObject(it) && TYPED_ARRAY in it)return it; + throw TypeError(it + ' is not a typed array!'); + }; + + var allocate = function(C, length){ + if(!(isObject(C) && TYPED_CONSTRUCTOR in C)){ + throw TypeError('It is not a typed array constructor!'); + } return new C(length); + }; + + var speciesFromList = function(O, list){ + return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list); + }; + + var fromList = function(C, list){ + var index = 0 + , length = list.length + , result = allocate(C, length); + while(length > index)result[index] = list[index++]; + return result; + }; + + var addGetter = function(it, key, internal){ + dP(it, key, {get: function(){ return this._d[internal]; }}); + }; + + var $from = function from(source /*, mapfn, thisArg */){ + var O = toObject(source) + , aLen = arguments.length + , mapfn = aLen > 1 ? arguments[1] : undefined + , mapping = mapfn !== undefined + , iterFn = getIterFn(O) + , i, length, values, result, step, iterator; + if(iterFn != undefined && !isArrayIter(iterFn)){ + for(iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++){ + values.push(step.value); + } O = values; + } + if(mapping && aLen > 2)mapfn = ctx(mapfn, arguments[2], 2); + for(i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++){ + result[i] = mapping ? mapfn(O[i], i) : O[i]; + } + return result; + }; + + var $of = function of(/*...items*/){ + var index = 0 + , length = arguments.length + , result = allocate(this, length); + while(length > index)result[index] = arguments[index++]; + return result; + }; + + // iOS Safari 6.x fails here + var TO_LOCALE_BUG = !!Uint8Array && fails(function(){ arrayToLocaleString.call(new Uint8Array(1)); }); + + var $toLocaleString = function toLocaleString(){ + return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments); + }; + + var proto = { + copyWithin: function copyWithin(target, start /*, end */){ + return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined); + }, + every: function every(callbackfn /*, thisArg */){ + return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + fill: function fill(value /*, start, end */){ // eslint-disable-line no-unused-vars + return arrayFill.apply(validate(this), arguments); + }, + filter: function filter(callbackfn /*, thisArg */){ + return speciesFromList(this, arrayFilter(validate(this), callbackfn, + arguments.length > 1 ? arguments[1] : undefined)); + }, + find: function find(predicate /*, thisArg */){ + return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + findIndex: function findIndex(predicate /*, thisArg */){ + return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + forEach: function forEach(callbackfn /*, thisArg */){ + arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + indexOf: function indexOf(searchElement /*, fromIndex */){ + return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); + }, + includes: function includes(searchElement /*, fromIndex */){ + return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); + }, + join: function join(separator){ // eslint-disable-line no-unused-vars + return arrayJoin.apply(validate(this), arguments); + }, + lastIndexOf: function lastIndexOf(searchElement /*, fromIndex */){ // eslint-disable-line no-unused-vars + return arrayLastIndexOf.apply(validate(this), arguments); + }, + map: function map(mapfn /*, thisArg */){ + return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined); + }, + reduce: function reduce(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars + return arrayReduce.apply(validate(this), arguments); + }, + reduceRight: function reduceRight(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars + return arrayReduceRight.apply(validate(this), arguments); + }, + reverse: function reverse(){ + var that = this + , length = validate(that).length + , middle = Math.floor(length / 2) + , index = 0 + , value; + while(index < middle){ + value = that[index]; + that[index++] = that[--length]; + that[length] = value; + } return that; + }, + some: function some(callbackfn /*, thisArg */){ + return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + sort: function sort(comparefn){ + return arraySort.call(validate(this), comparefn); + }, + subarray: function subarray(begin, end){ + var O = validate(this) + , length = O.length + , $begin = toIndex(begin, length); + return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( + O.buffer, + O.byteOffset + $begin * O.BYTES_PER_ELEMENT, + toLength((end === undefined ? length : toIndex(end, length)) - $begin) + ); + } + }; + + var $slice = function slice(start, end){ + return speciesFromList(this, arraySlice.call(validate(this), start, end)); + }; + + var $set = function set(arrayLike /*, offset */){ + validate(this); + var offset = toOffset(arguments[1], 1) + , length = this.length + , src = toObject(arrayLike) + , len = toLength(src.length) + , index = 0; + if(len + offset > length)throw RangeError(WRONG_LENGTH); + while(index < len)this[offset + index] = src[index++]; + }; + + var $iterators = { + entries: function entries(){ + return arrayEntries.call(validate(this)); + }, + keys: function keys(){ + return arrayKeys.call(validate(this)); + }, + values: function values(){ + return arrayValues.call(validate(this)); + } + }; + + var isTAIndex = function(target, key){ + return isObject(target) + && target[TYPED_ARRAY] + && typeof key != 'symbol' + && key in target + && String(+key) == String(key); + }; + var $getDesc = function getOwnPropertyDescriptor(target, key){ + return isTAIndex(target, key = toPrimitive(key, true)) + ? propertyDesc(2, target[key]) + : gOPD(target, key); + }; + var $setDesc = function defineProperty(target, key, desc){ + if(isTAIndex(target, key = toPrimitive(key, true)) + && isObject(desc) + && has(desc, 'value') + && !has(desc, 'get') + && !has(desc, 'set') + // TODO: add validation descriptor w/o calling accessors + && !desc.configurable + && (!has(desc, 'writable') || desc.writable) + && (!has(desc, 'enumerable') || desc.enumerable) + ){ + target[key] = desc.value; + return target; + } else return dP(target, key, desc); + }; + + if(!ALL_CONSTRUCTORS){ + $GOPD.f = $getDesc; + $DP.f = $setDesc; + } + + $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', { + getOwnPropertyDescriptor: $getDesc, + defineProperty: $setDesc + }); + + if(fails(function(){ arrayToString.call({}); })){ + arrayToString = arrayToLocaleString = function toString(){ + return arrayJoin.call(this); + } + } + + var $TypedArrayPrototype$ = redefineAll({}, proto); + redefineAll($TypedArrayPrototype$, $iterators); + hide($TypedArrayPrototype$, ITERATOR, $iterators.values); + redefineAll($TypedArrayPrototype$, { + slice: $slice, + set: $set, + constructor: function(){ /* noop */ }, + toString: arrayToString, + toLocaleString: $toLocaleString + }); + addGetter($TypedArrayPrototype$, 'buffer', 'b'); + addGetter($TypedArrayPrototype$, 'byteOffset', 'o'); + addGetter($TypedArrayPrototype$, 'byteLength', 'l'); + addGetter($TypedArrayPrototype$, 'length', 'e'); + dP($TypedArrayPrototype$, TAG, { + get: function(){ return this[TYPED_ARRAY]; } + }); + + module.exports = function(KEY, BYTES, wrapper, CLAMPED){ + CLAMPED = !!CLAMPED; + var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array' + , ISNT_UINT8 = NAME != 'Uint8Array' + , GETTER = 'get' + KEY + , SETTER = 'set' + KEY + , TypedArray = global[NAME] + , Base = TypedArray || {} + , TAC = TypedArray && getPrototypeOf(TypedArray) + , FORCED = !TypedArray || !$typed.ABV + , O = {} + , TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE]; + var getter = function(that, index){ + var data = that._d; + return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN); + }; + var setter = function(that, index, value){ + var data = that._d; + if(CLAMPED)value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff; + data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN); + }; + var addElement = function(that, index){ + dP(that, index, { + get: function(){ + return getter(this, index); + }, + set: function(value){ + return setter(this, index, value); + }, + enumerable: true + }); + }; + if(FORCED){ + TypedArray = wrapper(function(that, data, $offset, $length){ + anInstance(that, TypedArray, NAME, '_d'); + var index = 0 + , offset = 0 + , buffer, byteLength, length, klass; + if(!isObject(data)){ + length = strictToLength(data, true) + byteLength = length * BYTES; + buffer = new $ArrayBuffer(byteLength); + } else if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){ + buffer = data; + offset = toOffset($offset, BYTES); + var $len = data.byteLength; + if($length === undefined){ + if($len % BYTES)throw RangeError(WRONG_LENGTH); + byteLength = $len - offset; + if(byteLength < 0)throw RangeError(WRONG_LENGTH); + } else { + byteLength = toLength($length) * BYTES; + if(byteLength + offset > $len)throw RangeError(WRONG_LENGTH); + } + length = byteLength / BYTES; + } else if(TYPED_ARRAY in data){ + return fromList(TypedArray, data); + } else { + return $from.call(TypedArray, data); + } + hide(that, '_d', { + b: buffer, + o: offset, + l: byteLength, + e: length, + v: new $DataView(buffer) + }); + while(index < length)addElement(that, index++); + }); + TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$); + hide(TypedArrayPrototype, 'constructor', TypedArray); + } else if(!$iterDetect(function(iter){ + // V8 works with iterators, but fails in many other cases + // https://code.google.com/p/v8/issues/detail?id=4552 + new TypedArray(null); // eslint-disable-line no-new + new TypedArray(iter); // eslint-disable-line no-new + }, true)){ + TypedArray = wrapper(function(that, data, $offset, $length){ + anInstance(that, TypedArray, NAME); + var klass; + // `ws` module bug, temporarily remove validation length for Uint8Array + // https://github.com/websockets/ws/pull/645 + if(!isObject(data))return new Base(strictToLength(data, ISNT_UINT8)); + if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){ + return $length !== undefined + ? new Base(data, toOffset($offset, BYTES), $length) + : $offset !== undefined + ? new Base(data, toOffset($offset, BYTES)) + : new Base(data); + } + if(TYPED_ARRAY in data)return fromList(TypedArray, data); + return $from.call(TypedArray, data); + }); + arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function(key){ + if(!(key in TypedArray))hide(TypedArray, key, Base[key]); + }); + TypedArray[PROTOTYPE] = TypedArrayPrototype; + if(!LIBRARY)TypedArrayPrototype.constructor = TypedArray; + } + var $nativeIterator = TypedArrayPrototype[ITERATOR] + , CORRECT_ITER_NAME = !!$nativeIterator && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined) + , $iterator = $iterators.values; + hide(TypedArray, TYPED_CONSTRUCTOR, true); + hide(TypedArrayPrototype, TYPED_ARRAY, NAME); + hide(TypedArrayPrototype, VIEW, true); + hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray); + + if(CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)){ + dP(TypedArrayPrototype, TAG, { + get: function(){ return NAME; } + }); + } + + O[NAME] = TypedArray; + + $export($export.G + $export.W + $export.F * (TypedArray != Base), O); + + $export($export.S, NAME, { + BYTES_PER_ELEMENT: BYTES, + from: $from, + of: $of + }); + + if(!(BYTES_PER_ELEMENT in TypedArrayPrototype))hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); + + $export($export.P, NAME, proto); + + setSpecies(NAME); + + $export($export.P + $export.F * FORCED_SET, NAME, {set: $set}); + + $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); + + $export($export.P + $export.F * (TypedArrayPrototype.toString != arrayToString), NAME, {toString: arrayToString}); + + $export($export.P + $export.F * fails(function(){ + new TypedArray(1).slice(); + }), NAME, {slice: $slice}); + + $export($export.P + $export.F * (fails(function(){ + return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString() + }) || !fails(function(){ + TypedArrayPrototype.toLocaleString.call([1, 2]); + })), NAME, {toLocaleString: $toLocaleString}); + + Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator; + if(!LIBRARY && !CORRECT_ITER_NAME)hide(TypedArrayPrototype, ITERATOR, $iterator); + }; + } else module.exports = function(){ /* empty */ }; + +/***/ }, +/* 221 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(220)('Uint8', 1, function(init){ + return function Uint8Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; + }); + +/***/ }, +/* 222 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(220)('Uint8', 1, function(init){ + return function Uint8ClampedArray(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; + }, true); + +/***/ }, +/* 223 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(220)('Int16', 2, function(init){ + return function Int16Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; + }); + +/***/ }, +/* 224 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(220)('Uint16', 2, function(init){ + return function Uint16Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; + }); + +/***/ }, +/* 225 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(220)('Int32', 4, function(init){ + return function Int32Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; + }); + +/***/ }, +/* 226 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(220)('Uint32', 4, function(init){ + return function Uint32Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; + }); + +/***/ }, +/* 227 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(220)('Float32', 4, function(init){ + return function Float32Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; + }); + +/***/ }, +/* 228 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(220)('Float64', 8, function(init){ + return function Float64Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; + }); + +/***/ }, +/* 229 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // https://github.com/tc39/Array.prototype.includes + var $export = __webpack_require__(6) + , $includes = __webpack_require__(34)(true); + + $export($export.P, 'Array', { + includes: function includes(el /*, fromIndex = 0 */){ + return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); + } + }); + + __webpack_require__(174)('includes'); + +/***/ }, +/* 230 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // https://github.com/mathiasbynens/String.prototype.at + var $export = __webpack_require__(6) + , $at = __webpack_require__(120)(true); + + $export($export.P, 'String', { + at: function at(pos){ + return $at(this, pos); + } + }); + +/***/ }, +/* 231 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // https://github.com/tc39/proposal-string-pad-start-end + var $export = __webpack_require__(6) + , $pad = __webpack_require__(232); + + $export($export.P, 'String', { + padStart: function padStart(maxLength /*, fillString = ' ' */){ + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); + } + }); + +/***/ }, +/* 232 */ +/***/ function(module, exports, __webpack_require__) { + + // https://github.com/tc39/proposal-string-pad-start-end + var toLength = __webpack_require__(35) + , repeat = __webpack_require__(78) + , defined = __webpack_require__(33); + + module.exports = function(that, maxLength, fillString, left){ + var S = String(defined(that)) + , stringLength = S.length + , fillStr = fillString === undefined ? ' ' : String(fillString) + , intMaxLength = toLength(maxLength); + if(intMaxLength <= stringLength || fillStr == '')return S; + var fillLen = intMaxLength - stringLength + , stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length)); + if(stringFiller.length > fillLen)stringFiller = stringFiller.slice(0, fillLen); + return left ? stringFiller + S : S + stringFiller; + }; + + +/***/ }, +/* 233 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // https://github.com/tc39/proposal-string-pad-start-end + var $export = __webpack_require__(6) + , $pad = __webpack_require__(232); + + $export($export.P, 'String', { + padEnd: function padEnd(maxLength /*, fillString = ' ' */){ + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); + } + }); + +/***/ }, +/* 234 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // https://github.com/sebmarkbage/ecmascript-string-left-right-trim + __webpack_require__(90)('trimLeft', function($trim){ + return function trimLeft(){ + return $trim(this, 1); + }; + }, 'trimStart'); + +/***/ }, +/* 235 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // https://github.com/sebmarkbage/ecmascript-string-left-right-trim + __webpack_require__(90)('trimRight', function($trim){ + return function trimRight(){ + return $trim(this, 2); + }; + }, 'trimEnd'); + +/***/ }, +/* 236 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // https://tc39.github.io/String.prototype.matchAll/ + var $export = __webpack_require__(6) + , defined = __webpack_require__(33) + , toLength = __webpack_require__(35) + , isRegExp = __webpack_require__(123) + , getFlags = __webpack_require__(237) + , RegExpProto = RegExp.prototype; + + var $RegExpStringIterator = function(regexp, string){ + this._r = regexp; + this._s = string; + }; + + __webpack_require__(131)($RegExpStringIterator, 'RegExp String', function next(){ + var match = this._r.exec(this._s); + return {value: match, done: match === null}; + }); + + $export($export.P, 'String', { + matchAll: function matchAll(regexp){ + defined(this); + if(!isRegExp(regexp))throw TypeError(regexp + ' is not a regexp!'); + var S = String(this) + , flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp) + , rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags); + rx.lastIndex = toLength(regexp.lastIndex); + return new $RegExpStringIterator(rx, S); + } + }); + +/***/ }, +/* 237 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // 21.2.5.3 get RegExp.prototype.flags + var anObject = __webpack_require__(12); + module.exports = function(){ + var that = anObject(this) + , result = ''; + if(that.global) result += 'g'; + if(that.ignoreCase) result += 'i'; + if(that.multiline) result += 'm'; + if(that.unicode) result += 'u'; + if(that.sticky) result += 'y'; + return result; + }; + +/***/ }, +/* 238 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(25)('asyncIterator'); + +/***/ }, +/* 239 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(25)('observable'); + +/***/ }, +/* 240 */ +/***/ function(module, exports, __webpack_require__) { + + // https://github.com/tc39/proposal-object-getownpropertydescriptors + var $export = __webpack_require__(6) + , ownKeys = __webpack_require__(208) + , toIObject = __webpack_require__(30) + , gOPD = __webpack_require__(49) + , createProperty = __webpack_require__(150); + + $export($export.S, 'Object', { + getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object){ + var O = toIObject(object) + , getDesc = gOPD.f + , keys = ownKeys(O) + , result = {} + , i = 0 + , key; + while(keys.length > i)createProperty(result, key = keys[i++], getDesc(O, key)); + return result; + } + }); + +/***/ }, +/* 241 */ +/***/ function(module, exports, __webpack_require__) { + + // https://github.com/tc39/proposal-object-values-entries + var $export = __webpack_require__(6) + , $values = __webpack_require__(242)(false); + + $export($export.S, 'Object', { + values: function values(it){ + return $values(it); + } + }); + +/***/ }, +/* 242 */ +/***/ function(module, exports, __webpack_require__) { + + var getKeys = __webpack_require__(28) + , toIObject = __webpack_require__(30) + , isEnum = __webpack_require__(42).f; + module.exports = function(isEntries){ + return function(it){ + var O = toIObject(it) + , keys = getKeys(O) + , length = keys.length + , i = 0 + , result = [] + , key; + while(length > i)if(isEnum.call(O, key = keys[i++])){ + result.push(isEntries ? [key, O[key]] : O[key]); + } return result; + }; + }; + +/***/ }, +/* 243 */ +/***/ function(module, exports, __webpack_require__) { + + // https://github.com/tc39/proposal-object-values-entries + var $export = __webpack_require__(6) + , $entries = __webpack_require__(242)(true); + + $export($export.S, 'Object', { + entries: function entries(it){ + return $entries(it); + } + }); + +/***/ }, +/* 244 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , toObject = __webpack_require__(56) + , aFunction = __webpack_require__(9) + , $defineProperty = __webpack_require__(11); + + // B.2.2.2 Object.prototype.__defineGetter__(P, getter) + __webpack_require__(4) && $export($export.P + __webpack_require__(245), 'Object', { + __defineGetter__: function __defineGetter__(P, getter){ + $defineProperty.f(toObject(this), P, {get: aFunction(getter), enumerable: true, configurable: true}); + } + }); + +/***/ }, +/* 245 */ +/***/ function(module, exports, __webpack_require__) { + + // Forced replacement prototype accessors methods + module.exports = __webpack_require__(26)|| !__webpack_require__(5)(function(){ + var K = Math.random(); + // In FF throws only define methods + __defineSetter__.call(null, K, function(){ /* empty */}); + delete __webpack_require__(2)[K]; + }); + +/***/ }, +/* 246 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , toObject = __webpack_require__(56) + , aFunction = __webpack_require__(9) + , $defineProperty = __webpack_require__(11); + + // B.2.2.3 Object.prototype.__defineSetter__(P, setter) + __webpack_require__(4) && $export($export.P + __webpack_require__(245), 'Object', { + __defineSetter__: function __defineSetter__(P, setter){ + $defineProperty.f(toObject(this), P, {set: aFunction(setter), enumerable: true, configurable: true}); + } + }); + +/***/ }, +/* 247 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , toObject = __webpack_require__(56) + , toPrimitive = __webpack_require__(16) + , getPrototypeOf = __webpack_require__(57) + , getOwnPropertyDescriptor = __webpack_require__(49).f; + + // B.2.2.4 Object.prototype.__lookupGetter__(P) + __webpack_require__(4) && $export($export.P + __webpack_require__(245), 'Object', { + __lookupGetter__: function __lookupGetter__(P){ + var O = toObject(this) + , K = toPrimitive(P, true) + , D; + do { + if(D = getOwnPropertyDescriptor(O, K))return D.get; + } while(O = getPrototypeOf(O)); + } + }); + +/***/ }, +/* 248 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , toObject = __webpack_require__(56) + , toPrimitive = __webpack_require__(16) + , getPrototypeOf = __webpack_require__(57) + , getOwnPropertyDescriptor = __webpack_require__(49).f; + + // B.2.2.5 Object.prototype.__lookupSetter__(P) + __webpack_require__(4) && $export($export.P + __webpack_require__(245), 'Object', { + __lookupSetter__: function __lookupSetter__(P){ + var O = toObject(this) + , K = toPrimitive(P, true) + , D; + do { + if(D = getOwnPropertyDescriptor(O, K))return D.set; + } while(O = getPrototypeOf(O)); + } + }); + +/***/ }, +/* 249 */ +/***/ function(module, exports, __webpack_require__) { + + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var $export = __webpack_require__(6); + + $export($export.P + $export.R, 'Map', {toJSON: __webpack_require__(250)('Map')}); + +/***/ }, +/* 250 */ +/***/ function(module, exports, __webpack_require__) { + + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var classof = __webpack_require__(152) + , from = __webpack_require__(251); + module.exports = function(NAME){ + return function toJSON(){ + if(classof(this) != NAME)throw TypeError(NAME + "#toJSON isn't generic"); + return from(this); + }; + }; + +/***/ }, +/* 251 */ +/***/ function(module, exports, __webpack_require__) { + + var forOf = __webpack_require__(185); + + module.exports = function(iter, ITERATOR){ + var result = []; + forOf(iter, false, result.push, result, ITERATOR); + return result; + }; + + +/***/ }, +/* 252 */ +/***/ function(module, exports, __webpack_require__) { + + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var $export = __webpack_require__(6); + + $export($export.P + $export.R, 'Set', {toJSON: __webpack_require__(250)('Set')}); + +/***/ }, +/* 253 */ +/***/ function(module, exports, __webpack_require__) { + + // https://github.com/ljharb/proposal-global + var $export = __webpack_require__(6); + + $export($export.S, 'System', {global: __webpack_require__(2)}); + +/***/ }, +/* 254 */ +/***/ function(module, exports, __webpack_require__) { + + // https://github.com/ljharb/proposal-is-error + var $export = __webpack_require__(6) + , cof = __webpack_require__(32); + + $export($export.S, 'Error', { + isError: function isError(it){ + return cof(it) === 'Error'; + } + }); + +/***/ }, +/* 255 */ +/***/ function(module, exports, __webpack_require__) { + + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(6); + + $export($export.S, 'Math', { + iaddh: function iaddh(x0, x1, y0, y1){ + var $x0 = x0 >>> 0 + , $x1 = x1 >>> 0 + , $y0 = y0 >>> 0; + return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0; + } + }); + +/***/ }, +/* 256 */ +/***/ function(module, exports, __webpack_require__) { + + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(6); + + $export($export.S, 'Math', { + isubh: function isubh(x0, x1, y0, y1){ + var $x0 = x0 >>> 0 + , $x1 = x1 >>> 0 + , $y0 = y0 >>> 0; + return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0; + } + }); + +/***/ }, +/* 257 */ +/***/ function(module, exports, __webpack_require__) { + + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(6); + + $export($export.S, 'Math', { + imulh: function imulh(u, v){ + var UINT16 = 0xffff + , $u = +u + , $v = +v + , u0 = $u & UINT16 + , v0 = $v & UINT16 + , u1 = $u >> 16 + , v1 = $v >> 16 + , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); + return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16); + } + }); + +/***/ }, +/* 258 */ +/***/ function(module, exports, __webpack_require__) { + + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(6); + + $export($export.S, 'Math', { + umulh: function umulh(u, v){ + var UINT16 = 0xffff + , $u = +u + , $v = +v + , u0 = $u & UINT16 + , v0 = $v & UINT16 + , u1 = $u >>> 16 + , v1 = $v >>> 16 + , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); + return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16); + } + }); + +/***/ }, +/* 259 */ +/***/ function(module, exports, __webpack_require__) { + + var metadata = __webpack_require__(260) + , anObject = __webpack_require__(12) + , toMetaKey = metadata.key + , ordinaryDefineOwnMetadata = metadata.set; + + metadata.exp({defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey){ + ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey)); + }}); + +/***/ }, +/* 260 */ +/***/ function(module, exports, __webpack_require__) { + + var Map = __webpack_require__(190) + , $export = __webpack_require__(6) + , shared = __webpack_require__(21)('metadata') + , store = shared.store || (shared.store = new (__webpack_require__(194))); + + var getOrCreateMetadataMap = function(target, targetKey, create){ + var targetMetadata = store.get(target); + if(!targetMetadata){ + if(!create)return undefined; + store.set(target, targetMetadata = new Map); + } + var keyMetadata = targetMetadata.get(targetKey); + if(!keyMetadata){ + if(!create)return undefined; + targetMetadata.set(targetKey, keyMetadata = new Map); + } return keyMetadata; + }; + var ordinaryHasOwnMetadata = function(MetadataKey, O, P){ + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? false : metadataMap.has(MetadataKey); + }; + var ordinaryGetOwnMetadata = function(MetadataKey, O, P){ + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey); + }; + var ordinaryDefineOwnMetadata = function(MetadataKey, MetadataValue, O, P){ + getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue); + }; + var ordinaryOwnMetadataKeys = function(target, targetKey){ + var metadataMap = getOrCreateMetadataMap(target, targetKey, false) + , keys = []; + if(metadataMap)metadataMap.forEach(function(_, key){ keys.push(key); }); + return keys; + }; + var toMetaKey = function(it){ + return it === undefined || typeof it == 'symbol' ? it : String(it); + }; + var exp = function(O){ + $export($export.S, 'Reflect', O); + }; + + module.exports = { + store: store, + map: getOrCreateMetadataMap, + has: ordinaryHasOwnMetadata, + get: ordinaryGetOwnMetadata, + set: ordinaryDefineOwnMetadata, + keys: ordinaryOwnMetadataKeys, + key: toMetaKey, + exp: exp + }; + +/***/ }, +/* 261 */ +/***/ function(module, exports, __webpack_require__) { + + var metadata = __webpack_require__(260) + , anObject = __webpack_require__(12) + , toMetaKey = metadata.key + , getOrCreateMetadataMap = metadata.map + , store = metadata.store; + + metadata.exp({deleteMetadata: function deleteMetadata(metadataKey, target /*, targetKey */){ + var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]) + , metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false); + if(metadataMap === undefined || !metadataMap['delete'](metadataKey))return false; + if(metadataMap.size)return true; + var targetMetadata = store.get(target); + targetMetadata['delete'](targetKey); + return !!targetMetadata.size || store['delete'](target); + }}); + +/***/ }, +/* 262 */ +/***/ function(module, exports, __webpack_require__) { + + var metadata = __webpack_require__(260) + , anObject = __webpack_require__(12) + , getPrototypeOf = __webpack_require__(57) + , ordinaryHasOwnMetadata = metadata.has + , ordinaryGetOwnMetadata = metadata.get + , toMetaKey = metadata.key; + + var ordinaryGetMetadata = function(MetadataKey, O, P){ + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if(hasOwn)return ordinaryGetOwnMetadata(MetadataKey, O, P); + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined; + }; + + metadata.exp({getMetadata: function getMetadata(metadataKey, target /*, targetKey */){ + return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); + }}); + +/***/ }, +/* 263 */ +/***/ function(module, exports, __webpack_require__) { + + var Set = __webpack_require__(193) + , from = __webpack_require__(251) + , metadata = __webpack_require__(260) + , anObject = __webpack_require__(12) + , getPrototypeOf = __webpack_require__(57) + , ordinaryOwnMetadataKeys = metadata.keys + , toMetaKey = metadata.key; + + var ordinaryMetadataKeys = function(O, P){ + var oKeys = ordinaryOwnMetadataKeys(O, P) + , parent = getPrototypeOf(O); + if(parent === null)return oKeys; + var pKeys = ordinaryMetadataKeys(parent, P); + return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys; + }; + + metadata.exp({getMetadataKeys: function getMetadataKeys(target /*, targetKey */){ + return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); + }}); + +/***/ }, +/* 264 */ +/***/ function(module, exports, __webpack_require__) { + + var metadata = __webpack_require__(260) + , anObject = __webpack_require__(12) + , ordinaryGetOwnMetadata = metadata.get + , toMetaKey = metadata.key; + + metadata.exp({getOwnMetadata: function getOwnMetadata(metadataKey, target /*, targetKey */){ + return ordinaryGetOwnMetadata(metadataKey, anObject(target) + , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); + }}); + +/***/ }, +/* 265 */ +/***/ function(module, exports, __webpack_require__) { + + var metadata = __webpack_require__(260) + , anObject = __webpack_require__(12) + , ordinaryOwnMetadataKeys = metadata.keys + , toMetaKey = metadata.key; + + metadata.exp({getOwnMetadataKeys: function getOwnMetadataKeys(target /*, targetKey */){ + return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); + }}); + +/***/ }, +/* 266 */ +/***/ function(module, exports, __webpack_require__) { + + var metadata = __webpack_require__(260) + , anObject = __webpack_require__(12) + , getPrototypeOf = __webpack_require__(57) + , ordinaryHasOwnMetadata = metadata.has + , toMetaKey = metadata.key; + + var ordinaryHasMetadata = function(MetadataKey, O, P){ + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if(hasOwn)return true; + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false; + }; + + metadata.exp({hasMetadata: function hasMetadata(metadataKey, target /*, targetKey */){ + return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); + }}); + +/***/ }, +/* 267 */ +/***/ function(module, exports, __webpack_require__) { + + var metadata = __webpack_require__(260) + , anObject = __webpack_require__(12) + , ordinaryHasOwnMetadata = metadata.has + , toMetaKey = metadata.key; + + metadata.exp({hasOwnMetadata: function hasOwnMetadata(metadataKey, target /*, targetKey */){ + return ordinaryHasOwnMetadata(metadataKey, anObject(target) + , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); + }}); + +/***/ }, +/* 268 */ +/***/ function(module, exports, __webpack_require__) { + + var metadata = __webpack_require__(260) + , anObject = __webpack_require__(12) + , aFunction = __webpack_require__(9) + , toMetaKey = metadata.key + , ordinaryDefineOwnMetadata = metadata.set; + + metadata.exp({metadata: function metadata(metadataKey, metadataValue){ + return function decorator(target, targetKey){ + ordinaryDefineOwnMetadata( + metadataKey, metadataValue, + (targetKey !== undefined ? anObject : aFunction)(target), + toMetaKey(targetKey) + ); + }; + }}); + +/***/ }, +/* 269 */ +/***/ function(module, exports, __webpack_require__) { + + // https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask + var $export = __webpack_require__(6) + , microtask = __webpack_require__(188)() + , process = __webpack_require__(2).process + , isNode = __webpack_require__(32)(process) == 'process'; + + $export($export.G, { + asap: function asap(fn){ + var domain = isNode && process.domain; + microtask(domain ? domain.bind(fn) : fn); + } + }); + +/***/ }, +/* 270 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // https://github.com/zenparsing/es-observable + var $export = __webpack_require__(6) + , global = __webpack_require__(2) + , core = __webpack_require__(7) + , microtask = __webpack_require__(188)() + , OBSERVABLE = __webpack_require__(23)('observable') + , aFunction = __webpack_require__(9) + , anObject = __webpack_require__(12) + , anInstance = __webpack_require__(184) + , redefineAll = __webpack_require__(189) + , hide = __webpack_require__(10) + , forOf = __webpack_require__(185) + , RETURN = forOf.RETURN; + + var getMethod = function(fn){ + return fn == null ? undefined : aFunction(fn); + }; + + var cleanupSubscription = function(subscription){ + var cleanup = subscription._c; + if(cleanup){ + subscription._c = undefined; + cleanup(); + } + }; + + var subscriptionClosed = function(subscription){ + return subscription._o === undefined; + }; + + var closeSubscription = function(subscription){ + if(!subscriptionClosed(subscription)){ + subscription._o = undefined; + cleanupSubscription(subscription); + } + }; + + var Subscription = function(observer, subscriber){ + anObject(observer); + this._c = undefined; + this._o = observer; + observer = new SubscriptionObserver(this); + try { + var cleanup = subscriber(observer) + , subscription = cleanup; + if(cleanup != null){ + if(typeof cleanup.unsubscribe === 'function')cleanup = function(){ subscription.unsubscribe(); }; + else aFunction(cleanup); + this._c = cleanup; + } + } catch(e){ + observer.error(e); + return; + } if(subscriptionClosed(this))cleanupSubscription(this); + }; + + Subscription.prototype = redefineAll({}, { + unsubscribe: function unsubscribe(){ closeSubscription(this); } + }); + + var SubscriptionObserver = function(subscription){ + this._s = subscription; + }; + + SubscriptionObserver.prototype = redefineAll({}, { + next: function next(value){ + var subscription = this._s; + if(!subscriptionClosed(subscription)){ + var observer = subscription._o; + try { + var m = getMethod(observer.next); + if(m)return m.call(observer, value); + } catch(e){ + try { + closeSubscription(subscription); + } finally { + throw e; + } + } + } + }, + error: function error(value){ + var subscription = this._s; + if(subscriptionClosed(subscription))throw value; + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.error); + if(!m)throw value; + value = m.call(observer, value); + } catch(e){ + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } cleanupSubscription(subscription); + return value; + }, + complete: function complete(value){ + var subscription = this._s; + if(!subscriptionClosed(subscription)){ + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.complete); + value = m ? m.call(observer, value) : undefined; + } catch(e){ + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } cleanupSubscription(subscription); + return value; + } + } + }); + + var $Observable = function Observable(subscriber){ + anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber); + }; + + redefineAll($Observable.prototype, { + subscribe: function subscribe(observer){ + return new Subscription(observer, this._f); + }, + forEach: function forEach(fn){ + var that = this; + return new (core.Promise || global.Promise)(function(resolve, reject){ + aFunction(fn); + var subscription = that.subscribe({ + next : function(value){ + try { + return fn(value); + } catch(e){ + reject(e); + subscription.unsubscribe(); + } + }, + error: reject, + complete: resolve + }); + }); + } + }); + + redefineAll($Observable, { + from: function from(x){ + var C = typeof this === 'function' ? this : $Observable; + var method = getMethod(anObject(x)[OBSERVABLE]); + if(method){ + var observable = anObject(method.call(x)); + return observable.constructor === C ? observable : new C(function(observer){ + return observable.subscribe(observer); + }); + } + return new C(function(observer){ + var done = false; + microtask(function(){ + if(!done){ + try { + if(forOf(x, false, function(it){ + observer.next(it); + if(done)return RETURN; + }) === RETURN)return; + } catch(e){ + if(done)throw e; + observer.error(e); + return; + } observer.complete(); + } + }); + return function(){ done = true; }; + }); + }, + of: function of(){ + for(var i = 0, l = arguments.length, items = Array(l); i < l;)items[i] = arguments[i++]; + return new (typeof this === 'function' ? this : $Observable)(function(observer){ + var done = false; + microtask(function(){ + if(!done){ + for(var i = 0; i < items.length; ++i){ + observer.next(items[i]); + if(done)return; + } observer.complete(); + } + }); + return function(){ done = true; }; + }); + } + }); + + hide($Observable.prototype, OBSERVABLE, function(){ return this; }); + + $export($export.G, {Observable: $Observable}); + + __webpack_require__(182)('Observable'); + +/***/ }, +/* 271 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6) + , $task = __webpack_require__(187); + $export($export.G + $export.B, { + setImmediate: $task.set, + clearImmediate: $task.clear + }); + +/***/ }, +/* 272 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(179); + var global = __webpack_require__(2) + , hide = __webpack_require__(10) + , Iterators = __webpack_require__(130) + , TO_STRING_TAG = __webpack_require__(23)('toStringTag'); + + for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){ + var NAME = collections[i] + , Collection = global[NAME] + , proto = Collection && Collection.prototype; + if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; + } + +/***/ }, +/* 273 */ +/***/ function(module, exports, __webpack_require__) { + + // ie9- setTimeout & setInterval additional parameters fix + var global = __webpack_require__(2) + , $export = __webpack_require__(6) + , invoke = __webpack_require__(74) + , partial = __webpack_require__(274) + , navigator = global.navigator + , MSIE = !!navigator && /MSIE .\./.test(navigator.userAgent); // <- dirty ie9- check + var wrap = function(set){ + return MSIE ? function(fn, time /*, ...args */){ + return set(invoke( + partial, + [].slice.call(arguments, 2), + typeof fn == 'function' ? fn : Function(fn) + ), time); + } : set; + }; + $export($export.G + $export.B + $export.F * MSIE, { + setTimeout: wrap(global.setTimeout), + setInterval: wrap(global.setInterval) + }); + +/***/ }, +/* 274 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var path = __webpack_require__(275) + , invoke = __webpack_require__(74) + , aFunction = __webpack_require__(9); + module.exports = function(/* ...pargs */){ + var fn = aFunction(this) + , length = arguments.length + , pargs = Array(length) + , i = 0 + , _ = path._ + , holder = false; + while(length > i)if((pargs[i] = arguments[i++]) === _)holder = true; + return function(/* ...args */){ + var that = this + , aLen = arguments.length + , j = 0, k = 0, args; + if(!holder && !aLen)return invoke(fn, pargs, that); + args = pargs.slice(); + if(holder)for(;length > j; j++)if(args[j] === _)args[j] = arguments[k++]; + while(aLen > k)args.push(arguments[k++]); + return invoke(fn, args, that); + }; + }; + +/***/ }, +/* 275 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = __webpack_require__(7); + +/***/ }, +/* 276 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var ctx = __webpack_require__(8) + , $export = __webpack_require__(6) + , createDesc = __webpack_require__(17) + , assign = __webpack_require__(67) + , create = __webpack_require__(44) + , getPrototypeOf = __webpack_require__(57) + , getKeys = __webpack_require__(28) + , dP = __webpack_require__(11) + , keyOf = __webpack_require__(27) + , aFunction = __webpack_require__(9) + , forOf = __webpack_require__(185) + , isIterable = __webpack_require__(277) + , $iterCreate = __webpack_require__(131) + , step = __webpack_require__(180) + , isObject = __webpack_require__(13) + , toIObject = __webpack_require__(30) + , DESCRIPTORS = __webpack_require__(4) + , has = __webpack_require__(3); + + // 0 -> Dict.forEach + // 1 -> Dict.map + // 2 -> Dict.filter + // 3 -> Dict.some + // 4 -> Dict.every + // 5 -> Dict.find + // 6 -> Dict.findKey + // 7 -> Dict.mapPairs + var createDictMethod = function(TYPE){ + var IS_MAP = TYPE == 1 + , IS_EVERY = TYPE == 4; + return function(object, callbackfn, that /* = undefined */){ + var f = ctx(callbackfn, that, 3) + , O = toIObject(object) + , result = IS_MAP || TYPE == 7 || TYPE == 2 + ? new (typeof this == 'function' ? this : Dict) : undefined + , key, val, res; + for(key in O)if(has(O, key)){ + val = O[key]; + res = f(val, key, object); + if(TYPE){ + if(IS_MAP)result[key] = res; // map + else if(res)switch(TYPE){ + case 2: result[key] = val; break; // filter + case 3: return true; // some + case 5: return val; // find + case 6: return key; // findKey + case 7: result[res[0]] = res[1]; // mapPairs + } else if(IS_EVERY)return false; // every + } + } + return TYPE == 3 || IS_EVERY ? IS_EVERY : result; + }; + }; + var findKey = createDictMethod(6); + + var createDictIter = function(kind){ + return function(it){ + return new DictIterator(it, kind); + }; + }; + var DictIterator = function(iterated, kind){ + this._t = toIObject(iterated); // target + this._a = getKeys(iterated); // keys + this._i = 0; // next index + this._k = kind; // kind + }; + $iterCreate(DictIterator, 'Dict', function(){ + var that = this + , O = that._t + , keys = that._a + , kind = that._k + , key; + do { + if(that._i >= keys.length){ + that._t = undefined; + return step(1); + } + } while(!has(O, key = keys[that._i++])); + if(kind == 'keys' )return step(0, key); + if(kind == 'values')return step(0, O[key]); + return step(0, [key, O[key]]); + }); + + function Dict(iterable){ + var dict = create(null); + if(iterable != undefined){ + if(isIterable(iterable)){ + forOf(iterable, true, function(key, value){ + dict[key] = value; + }); + } else assign(dict, iterable); + } + return dict; + } + Dict.prototype = null; + + function reduce(object, mapfn, init){ + aFunction(mapfn); + var O = toIObject(object) + , keys = getKeys(O) + , length = keys.length + , i = 0 + , memo, key; + if(arguments.length < 3){ + if(!length)throw TypeError('Reduce of empty object with no initial value'); + memo = O[keys[i++]]; + } else memo = Object(init); + while(length > i)if(has(O, key = keys[i++])){ + memo = mapfn(memo, O[key], key, object); + } + return memo; + } + + function includes(object, el){ + return (el == el ? keyOf(object, el) : findKey(object, function(it){ + return it != it; + })) !== undefined; + } + + function get(object, key){ + if(has(object, key))return object[key]; + } + function set(object, key, value){ + if(DESCRIPTORS && key in Object)dP.f(object, key, createDesc(0, value)); + else object[key] = value; + return object; + } + + function isDict(it){ + return isObject(it) && getPrototypeOf(it) === Dict.prototype; + } + + $export($export.G + $export.F, {Dict: Dict}); + + $export($export.S, 'Dict', { + keys: createDictIter('keys'), + values: createDictIter('values'), + entries: createDictIter('entries'), + forEach: createDictMethod(0), + map: createDictMethod(1), + filter: createDictMethod(2), + some: createDictMethod(3), + every: createDictMethod(4), + find: createDictMethod(5), + findKey: findKey, + mapPairs: createDictMethod(7), + reduce: reduce, + keyOf: keyOf, + includes: includes, + has: has, + get: get, + set: set, + isDict: isDict + }); + +/***/ }, +/* 277 */ +/***/ function(module, exports, __webpack_require__) { + + var classof = __webpack_require__(152) + , ITERATOR = __webpack_require__(23)('iterator') + , Iterators = __webpack_require__(130); + module.exports = __webpack_require__(7).isIterable = function(it){ + var O = Object(it); + return O[ITERATOR] !== undefined + || '@@iterator' in O + || Iterators.hasOwnProperty(classof(O)); + }; + +/***/ }, +/* 278 */ +/***/ function(module, exports, __webpack_require__) { + + var anObject = __webpack_require__(12) + , get = __webpack_require__(151); + module.exports = __webpack_require__(7).getIterator = function(it){ + var iterFn = get(it); + if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!'); + return anObject(iterFn.call(it)); + }; + +/***/ }, +/* 279 */ +/***/ function(module, exports, __webpack_require__) { + + var global = __webpack_require__(2) + , core = __webpack_require__(7) + , $export = __webpack_require__(6) + , partial = __webpack_require__(274); + // https://esdiscuss.org/topic/promise-returning-delay-function + $export($export.G + $export.F, { + delay: function delay(time){ + return new (core.Promise || global.Promise)(function(resolve){ + setTimeout(partial.call(resolve, true), time); + }); + } + }); + +/***/ }, +/* 280 */ +/***/ function(module, exports, __webpack_require__) { + + var path = __webpack_require__(275) + , $export = __webpack_require__(6); + + // Placeholder + __webpack_require__(7)._ = path._ = path._ || {}; + + $export($export.P + $export.F, 'Function', {part: __webpack_require__(274)}); + +/***/ }, +/* 281 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6); + + $export($export.S + $export.F, 'Object', {isObject: __webpack_require__(13)}); + +/***/ }, +/* 282 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6); + + $export($export.S + $export.F, 'Object', {classof: __webpack_require__(152)}); + +/***/ }, +/* 283 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6) + , define = __webpack_require__(284); + + $export($export.S + $export.F, 'Object', {define: define}); + +/***/ }, +/* 284 */ +/***/ function(module, exports, __webpack_require__) { + + var dP = __webpack_require__(11) + , gOPD = __webpack_require__(49) + , ownKeys = __webpack_require__(208) + , toIObject = __webpack_require__(30); + + module.exports = function define(target, mixin){ + var keys = ownKeys(toIObject(mixin)) + , length = keys.length + , i = 0, key; + while(length > i)dP.f(target, key = keys[i++], gOPD.f(mixin, key)); + return target; + }; + +/***/ }, +/* 285 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6) + , define = __webpack_require__(284) + , create = __webpack_require__(44); + + $export($export.S + $export.F, 'Object', { + make: function(proto, mixin){ + return define(create(proto), mixin); + } + }); + +/***/ }, +/* 286 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + __webpack_require__(129)(Number, 'Number', function(iterated){ + this._l = +iterated; + this._i = 0; + }, function(){ + var i = this._i++ + , done = !(i < this._l); + return {done: done, value: done ? undefined : i}; + }); + +/***/ }, +/* 287 */ +/***/ function(module, exports, __webpack_require__) { + + // https://github.com/benjamingr/RexExp.escape + var $export = __webpack_require__(6) + , $re = __webpack_require__(288)(/[\\^$*+?.()|[\]{}]/g, '\\$&'); + + $export($export.S, 'RegExp', {escape: function escape(it){ return $re(it); }}); + + +/***/ }, +/* 288 */ +/***/ function(module, exports) { + + module.exports = function(regExp, replace){ + var replacer = replace === Object(replace) ? function(part){ + return replace[part]; + } : replace; + return function(it){ + return String(it).replace(regExp, replacer); + }; + }; + +/***/ }, +/* 289 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6); + var $re = __webpack_require__(288)(/[&<>"']/g, { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }); + + $export($export.P + $export.F, 'String', {escapeHTML: function escapeHTML(){ return $re(this); }}); + +/***/ }, +/* 290 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6); + var $re = __webpack_require__(288)(/&(?:amp|lt|gt|quot|apos);/g, { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" + }); + + $export($export.P + $export.F, 'String', {unescapeHTML: function unescapeHTML(){ return $re(this); }}); + +/***/ } +/******/ ]); +// CommonJS export +if(typeof module != 'undefined' && module.exports)module.exports = __e; +// RequireJS export +else if(typeof define == 'function' && define.amd)define(function(){return __e}); +// Export to global object +else __g.core = __e; +}(1, 1); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/client/library.min.js b/pitfall/pdfkit/node_modules/core-js/client/library.min.js new file mode 100644 index 00000000..d69a0de9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/client/library.min.js @@ -0,0 +1,10 @@ +/** + * core-js 2.4.1 + * https://github.com/zloirock/core-js + * License: http://rock.mit-license.org + * © 2016 Denis Pushkarev + */ +!function(a,b,c){"use strict";!function(a){function __webpack_require__(c){if(b[c])return b[c].exports;var d=b[c]={exports:{},id:c,loaded:!1};return a[c].call(d.exports,d,d.exports,__webpack_require__),d.loaded=!0,d.exports}var b={};return __webpack_require__.m=a,__webpack_require__.c=b,__webpack_require__.p="",__webpack_require__(0)}([function(a,b,c){c(1),c(50),c(51),c(52),c(54),c(55),c(58),c(59),c(60),c(61),c(62),c(63),c(64),c(65),c(66),c(68),c(70),c(72),c(75),c(76),c(79),c(80),c(81),c(82),c(84),c(85),c(86),c(87),c(88),c(92),c(94),c(95),c(96),c(98),c(99),c(100),c(102),c(103),c(104),c(106),c(107),c(108),c(109),c(110),c(111),c(112),c(113),c(114),c(115),c(116),c(117),c(118),c(119),c(121),c(125),c(126),c(127),c(128),c(132),c(134),c(135),c(136),c(137),c(138),c(139),c(140),c(141),c(142),c(143),c(144),c(145),c(146),c(147),c(154),c(155),c(157),c(158),c(159),c(163),c(164),c(165),c(166),c(167),c(169),c(170),c(171),c(172),c(175),c(177),c(178),c(179),c(181),c(183),c(190),c(193),c(194),c(196),c(197),c(198),c(199),c(200),c(201),c(202),c(203),c(204),c(205),c(206),c(207),c(209),c(210),c(211),c(212),c(213),c(214),c(215),c(218),c(219),c(221),c(222),c(223),c(224),c(225),c(226),c(227),c(228),c(229),c(230),c(231),c(233),c(234),c(235),c(236),c(238),c(239),c(240),c(241),c(243),c(244),c(246),c(247),c(248),c(249),c(252),c(253),c(254),c(255),c(256),c(257),c(258),c(259),c(261),c(262),c(263),c(264),c(265),c(266),c(267),c(268),c(269),c(270),c(271),c(272),c(273),c(276),c(151),c(278),c(277),c(279),c(280),c(281),c(282),c(283),c(285),c(286),c(287),c(289),a.exports=c(290)},function(a,b,d){var e=d(2),f=d(3),g=d(4),h=d(6),i=d(18),j=d(19).KEY,k=d(5),l=d(21),m=d(22),n=d(20),o=d(23),p=d(24),q=d(25),r=d(27),s=d(40),t=d(43),u=d(12),v=d(30),w=d(16),x=d(17),y=d(44),z=d(47),A=d(49),B=d(11),C=d(28),D=A.f,E=B.f,F=z.f,G=e.Symbol,H=e.JSON,I=H&&H.stringify,J="prototype",K=o("_hidden"),L=o("toPrimitive"),M={}.propertyIsEnumerable,N=l("symbol-registry"),O=l("symbols"),P=l("op-symbols"),Q=Object[J],R="function"==typeof G,S=e.QObject,T=!S||!S[J]||!S[J].findChild,U=g&&k(function(){return 7!=y(E({},"a",{get:function(){return E(this,"a",{value:7}).a}})).a})?function(a,b,c){var d=D(Q,b);d&&delete Q[b],E(a,b,c),d&&a!==Q&&E(Q,b,d)}:E,V=function(a){var b=O[a]=y(G[J]);return b._k=a,b},W=R&&"symbol"==typeof G.iterator?function(a){return"symbol"==typeof a}:function(a){return a instanceof G},X=function defineProperty(a,b,c){return a===Q&&X(P,b,c),u(a),b=w(b,!0),u(c),f(O,b)?(c.enumerable?(f(a,K)&&a[K][b]&&(a[K][b]=!1),c=y(c,{enumerable:x(0,!1)})):(f(a,K)||E(a,K,x(1,{})),a[K][b]=!0),U(a,b,c)):E(a,b,c)},Y=function defineProperties(a,b){u(a);for(var c,d=s(b=v(b)),e=0,f=d.length;f>e;)X(a,c=d[e++],b[c]);return a},Z=function create(a,b){return b===c?y(a):Y(y(a),b)},$=function propertyIsEnumerable(a){var b=M.call(this,a=w(a,!0));return!(this===Q&&f(O,a)&&!f(P,a))&&(!(b||!f(this,a)||!f(O,a)||f(this,K)&&this[K][a])||b)},_=function getOwnPropertyDescriptor(a,b){if(a=v(a),b=w(b,!0),a!==Q||!f(O,b)||f(P,b)){var c=D(a,b);return!c||!f(O,b)||f(a,K)&&a[K][b]||(c.enumerable=!0),c}},aa=function getOwnPropertyNames(a){for(var b,c=F(v(a)),d=[],e=0;c.length>e;)f(O,b=c[e++])||b==K||b==j||d.push(b);return d},ba=function getOwnPropertySymbols(a){for(var b,c=a===Q,d=F(c?P:v(a)),e=[],g=0;d.length>g;)!f(O,b=d[g++])||c&&!f(Q,b)||e.push(O[b]);return e};R||(G=function Symbol(){if(this instanceof G)throw TypeError("Symbol is not a constructor!");var a=n(arguments.length>0?arguments[0]:c),b=function(c){this===Q&&b.call(P,c),f(this,K)&&f(this[K],a)&&(this[K][a]=!1),U(this,a,x(1,c))};return g&&T&&U(Q,a,{configurable:!0,set:b}),V(a)},i(G[J],"toString",function toString(){return this._k}),A.f=_,B.f=X,d(48).f=z.f=aa,d(42).f=$,d(41).f=ba,g&&!d(26)&&i(Q,"propertyIsEnumerable",$,!0),p.f=function(a){return V(o(a))}),h(h.G+h.W+h.F*!R,{Symbol:G});for(var ca="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),da=0;ca.length>da;)o(ca[da++]);for(var ca=C(o.store),da=0;ca.length>da;)q(ca[da++]);h(h.S+h.F*!R,"Symbol",{"for":function(a){return f(N,a+="")?N[a]:N[a]=G(a)},keyFor:function keyFor(a){if(W(a))return r(N,a);throw TypeError(a+" is not a symbol!")},useSetter:function(){T=!0},useSimple:function(){T=!1}}),h(h.S+h.F*!R,"Object",{create:Z,defineProperty:X,defineProperties:Y,getOwnPropertyDescriptor:_,getOwnPropertyNames:aa,getOwnPropertySymbols:ba}),H&&h(h.S+h.F*(!R||k(function(){var a=G();return"[null]"!=I([a])||"{}"!=I({a:a})||"{}"!=I(Object(a))})),"JSON",{stringify:function stringify(a){if(a!==c&&!W(a)){for(var b,d,e=[a],f=1;arguments.length>f;)e.push(arguments[f++]);return b=e[1],"function"==typeof b&&(d=b),!d&&t(b)||(b=function(a,b){if(d&&(b=d.call(this,a,b)),!W(b))return b}),e[1]=b,I.apply(H,e)}}}),G[J][L]||d(10)(G[J],L,G[J].valueOf),m(G,"Symbol"),m(Math,"Math",!0),m(e.JSON,"JSON",!0)},function(a,c){var d=a.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof b&&(b=d)},function(a,b){var c={}.hasOwnProperty;a.exports=function(a,b){return c.call(a,b)}},function(a,b,c){a.exports=!c(5)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(a,b){a.exports=function(a){try{return!!a()}catch(b){return!0}}},function(a,b,d){var e=d(2),f=d(7),g=d(8),h=d(10),i="prototype",j=function(a,b,d){var k,l,m,n=a&j.F,o=a&j.G,p=a&j.S,q=a&j.P,r=a&j.B,s=a&j.W,t=o?f:f[b]||(f[b]={}),u=t[i],v=o?e:p?e[b]:(e[b]||{})[i];o&&(d=b);for(k in d)l=!n&&v&&v[k]!==c,l&&k in t||(m=l?v[k]:d[k],t[k]=o&&"function"!=typeof v[k]?d[k]:r&&l?g(m,e):s&&v[k]==m?function(a){var b=function(b,c,d){if(this instanceof a){switch(arguments.length){case 0:return new a;case 1:return new a(b);case 2:return new a(b,c)}return new a(b,c,d)}return a.apply(this,arguments)};return b[i]=a[i],b}(m):q&&"function"==typeof m?g(Function.call,m):m,q&&((t.virtual||(t.virtual={}))[k]=m,a&j.R&&u&&!u[k]&&h(u,k,m)))};j.F=1,j.G=2,j.S=4,j.P=8,j.B=16,j.W=32,j.U=64,j.R=128,a.exports=j},function(b,c){var d=b.exports={version:"2.4.0"};"number"==typeof a&&(a=d)},function(a,b,d){var e=d(9);a.exports=function(a,b,d){if(e(a),b===c)return a;switch(d){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}}},function(a,b){a.exports=function(a){if("function"!=typeof a)throw TypeError(a+" is not a function!");return a}},function(a,b,c){var d=c(11),e=c(17);a.exports=c(4)?function(a,b,c){return d.f(a,b,e(1,c))}:function(a,b,c){return a[b]=c,a}},function(a,b,c){var d=c(12),e=c(14),f=c(16),g=Object.defineProperty;b.f=c(4)?Object.defineProperty:function defineProperty(a,b,c){if(d(a),b=f(b,!0),d(c),e)try{return g(a,b,c)}catch(h){}if("get"in c||"set"in c)throw TypeError("Accessors not supported!");return"value"in c&&(a[b]=c.value),a}},function(a,b,c){var d=c(13);a.exports=function(a){if(!d(a))throw TypeError(a+" is not an object!");return a}},function(a,b){a.exports=function(a){return"object"==typeof a?null!==a:"function"==typeof a}},function(a,b,c){a.exports=!c(4)&&!c(5)(function(){return 7!=Object.defineProperty(c(15)("div"),"a",{get:function(){return 7}}).a})},function(a,b,c){var d=c(13),e=c(2).document,f=d(e)&&d(e.createElement);a.exports=function(a){return f?e.createElement(a):{}}},function(a,b,c){var d=c(13);a.exports=function(a,b){if(!d(a))return a;var c,e;if(b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a)))return e;if("function"==typeof(c=a.valueOf)&&!d(e=c.call(a)))return e;if(!b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a)))return e;throw TypeError("Can't convert object to primitive value")}},function(a,b){a.exports=function(a,b){return{enumerable:!(1&a),configurable:!(2&a),writable:!(4&a),value:b}}},function(a,b,c){a.exports=c(10)},function(a,b,c){var d=c(20)("meta"),e=c(13),f=c(3),g=c(11).f,h=0,i=Object.isExtensible||function(){return!0},j=!c(5)(function(){return i(Object.preventExtensions({}))}),k=function(a){g(a,d,{value:{i:"O"+ ++h,w:{}}})},l=function(a,b){if(!e(a))return"symbol"==typeof a?a:("string"==typeof a?"S":"P")+a;if(!f(a,d)){if(!i(a))return"F";if(!b)return"E";k(a)}return a[d].i},m=function(a,b){if(!f(a,d)){if(!i(a))return!0;if(!b)return!1;k(a)}return a[d].w},n=function(a){return j&&o.NEED&&i(a)&&!f(a,d)&&k(a),a},o=a.exports={KEY:d,NEED:!1,fastKey:l,getWeak:m,onFreeze:n}},function(a,b){var d=0,e=Math.random();a.exports=function(a){return"Symbol(".concat(a===c?"":a,")_",(++d+e).toString(36))}},function(a,b,c){var d=c(2),e="__core-js_shared__",f=d[e]||(d[e]={});a.exports=function(a){return f[a]||(f[a]={})}},function(a,b,c){var d=c(11).f,e=c(3),f=c(23)("toStringTag");a.exports=function(a,b,c){a&&!e(a=c?a:a.prototype,f)&&d(a,f,{configurable:!0,value:b})}},function(a,b,c){var d=c(21)("wks"),e=c(20),f=c(2).Symbol,g="function"==typeof f,h=a.exports=function(a){return d[a]||(d[a]=g&&f[a]||(g?f:e)("Symbol."+a))};h.store=d},function(a,b,c){b.f=c(23)},function(a,b,c){var d=c(2),e=c(7),f=c(26),g=c(24),h=c(11).f;a.exports=function(a){var b=e.Symbol||(e.Symbol=f?{}:d.Symbol||{});"_"==a.charAt(0)||a in b||h(b,a,{value:g.f(a)})}},function(a,b){a.exports=!0},function(a,b,c){var d=c(28),e=c(30);a.exports=function(a,b){for(var c,f=e(a),g=d(f),h=g.length,i=0;h>i;)if(f[c=g[i++]]===b)return c}},function(a,b,c){var d=c(29),e=c(39);a.exports=Object.keys||function keys(a){return d(a,e)}},function(a,b,c){var d=c(3),e=c(30),f=c(34)(!1),g=c(38)("IE_PROTO");a.exports=function(a,b){var c,h=e(a),i=0,j=[];for(c in h)c!=g&&d(h,c)&&j.push(c);for(;b.length>i;)d(h,c=b[i++])&&(~f(j,c)||j.push(c));return j}},function(a,b,c){var d=c(31),e=c(33);a.exports=function(a){return d(e(a))}},function(a,b,c){var d=c(32);a.exports=Object("z").propertyIsEnumerable(0)?Object:function(a){return"String"==d(a)?a.split(""):Object(a)}},function(a,b){var c={}.toString;a.exports=function(a){return c.call(a).slice(8,-1)}},function(a,b){a.exports=function(a){if(a==c)throw TypeError("Can't call method on "+a);return a}},function(a,b,c){var d=c(30),e=c(35),f=c(37);a.exports=function(a){return function(b,c,g){var h,i=d(b),j=e(i.length),k=f(g,j);if(a&&c!=c){for(;j>k;)if(h=i[k++],h!=h)return!0}else for(;j>k;k++)if((a||k in i)&&i[k]===c)return a||k||0;return!a&&-1}}},function(a,b,c){var d=c(36),e=Math.min;a.exports=function(a){return a>0?e(d(a),9007199254740991):0}},function(a,b){var c=Math.ceil,d=Math.floor;a.exports=function(a){return isNaN(a=+a)?0:(a>0?d:c)(a)}},function(a,b,c){var d=c(36),e=Math.max,f=Math.min;a.exports=function(a,b){return a=d(a),a<0?e(a+b,0):f(a,b)}},function(a,b,c){var d=c(21)("keys"),e=c(20);a.exports=function(a){return d[a]||(d[a]=e(a))}},function(a,b){a.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(a,b,c){var d=c(28),e=c(41),f=c(42);a.exports=function(a){var b=d(a),c=e.f;if(c)for(var g,h=c(a),i=f.f,j=0;h.length>j;)i.call(a,g=h[j++])&&b.push(g);return b}},function(a,b){b.f=Object.getOwnPropertySymbols},function(a,b){b.f={}.propertyIsEnumerable},function(a,b,c){var d=c(32);a.exports=Array.isArray||function isArray(a){return"Array"==d(a)}},function(a,b,d){var e=d(12),f=d(45),g=d(39),h=d(38)("IE_PROTO"),i=function(){},j="prototype",k=function(){var a,b=d(15)("iframe"),c=g.length,e="<",f=">";for(b.style.display="none",d(46).appendChild(b),b.src="javascript:",a=b.contentWindow.document,a.open(),a.write(e+"script"+f+"document.F=Object"+e+"/script"+f),a.close(),k=a.F;c--;)delete k[j][g[c]];return k()};a.exports=Object.create||function create(a,b){var d;return null!==a?(i[j]=e(a),d=new i,i[j]=null,d[h]=a):d=k(),b===c?d:f(d,b)}},function(a,b,c){var d=c(11),e=c(12),f=c(28);a.exports=c(4)?Object.defineProperties:function defineProperties(a,b){e(a);for(var c,g=f(b),h=g.length,i=0;h>i;)d.f(a,c=g[i++],b[c]);return a}},function(a,b,c){a.exports=c(2).document&&document.documentElement},function(a,b,c){var d=c(30),e=c(48).f,f={}.toString,g="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],h=function(a){try{return e(a)}catch(b){return g.slice()}};a.exports.f=function getOwnPropertyNames(a){return g&&"[object Window]"==f.call(a)?h(a):e(d(a))}},function(a,b,c){var d=c(29),e=c(39).concat("length","prototype");b.f=Object.getOwnPropertyNames||function getOwnPropertyNames(a){return d(a,e)}},function(a,b,c){var d=c(42),e=c(17),f=c(30),g=c(16),h=c(3),i=c(14),j=Object.getOwnPropertyDescriptor;b.f=c(4)?j:function getOwnPropertyDescriptor(a,b){if(a=f(a),b=g(b,!0),i)try{return j(a,b)}catch(c){}if(h(a,b))return e(!d.f.call(a,b),a[b])}},function(a,b,c){var d=c(6);d(d.S+d.F*!c(4),"Object",{defineProperty:c(11).f})},function(a,b,c){var d=c(6);d(d.S+d.F*!c(4),"Object",{defineProperties:c(45)})},function(a,b,c){var d=c(30),e=c(49).f;c(53)("getOwnPropertyDescriptor",function(){return function getOwnPropertyDescriptor(a,b){return e(d(a),b)}})},function(a,b,c){var d=c(6),e=c(7),f=c(5);a.exports=function(a,b){var c=(e.Object||{})[a]||Object[a],g={};g[a]=b(c),d(d.S+d.F*f(function(){c(1)}),"Object",g)}},function(a,b,c){var d=c(6);d(d.S,"Object",{create:c(44)})},function(a,b,c){var d=c(56),e=c(57);c(53)("getPrototypeOf",function(){return function getPrototypeOf(a){return e(d(a))}})},function(a,b,c){var d=c(33);a.exports=function(a){return Object(d(a))}},function(a,b,c){var d=c(3),e=c(56),f=c(38)("IE_PROTO"),g=Object.prototype;a.exports=Object.getPrototypeOf||function(a){return a=e(a),d(a,f)?a[f]:"function"==typeof a.constructor&&a instanceof a.constructor?a.constructor.prototype:a instanceof Object?g:null}},function(a,b,c){var d=c(56),e=c(28);c(53)("keys",function(){return function keys(a){return e(d(a))}})},function(a,b,c){c(53)("getOwnPropertyNames",function(){return c(47).f})},function(a,b,c){var d=c(13),e=c(19).onFreeze;c(53)("freeze",function(a){return function freeze(b){return a&&d(b)?a(e(b)):b}})},function(a,b,c){var d=c(13),e=c(19).onFreeze;c(53)("seal",function(a){return function seal(b){return a&&d(b)?a(e(b)):b}})},function(a,b,c){var d=c(13),e=c(19).onFreeze;c(53)("preventExtensions",function(a){return function preventExtensions(b){return a&&d(b)?a(e(b)):b}})},function(a,b,c){var d=c(13);c(53)("isFrozen",function(a){return function isFrozen(b){return!d(b)||!!a&&a(b)}})},function(a,b,c){var d=c(13);c(53)("isSealed",function(a){return function isSealed(b){return!d(b)||!!a&&a(b)}})},function(a,b,c){var d=c(13);c(53)("isExtensible",function(a){return function isExtensible(b){return!!d(b)&&(!a||a(b))}})},function(a,b,c){var d=c(6);d(d.S+d.F,"Object",{assign:c(67)})},function(a,b,c){var d=c(28),e=c(41),f=c(42),g=c(56),h=c(31),i=Object.assign;a.exports=!i||c(5)(function(){var a={},b={},c=Symbol(),d="abcdefghijklmnopqrst";return a[c]=7,d.split("").forEach(function(a){b[a]=a}),7!=i({},a)[c]||Object.keys(i({},b)).join("")!=d})?function assign(a,b){for(var c=g(a),i=arguments.length,j=1,k=e.f,l=f.f;i>j;)for(var m,n=h(arguments[j++]),o=k?d(n).concat(k(n)):d(n),p=o.length,q=0;p>q;)l.call(n,m=o[q++])&&(c[m]=n[m]);return c}:i},function(a,b,c){var d=c(6);d(d.S,"Object",{is:c(69)})},function(a,b){a.exports=Object.is||function is(a,b){return a===b?0!==a||1/a===1/b:a!=a&&b!=b}},function(a,b,c){var d=c(6);d(d.S,"Object",{setPrototypeOf:c(71).set})},function(a,b,d){var e=d(13),f=d(12),g=function(a,b){if(f(a),!e(b)&&null!==b)throw TypeError(b+": can't set as prototype!")};a.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(a,b,c){try{c=d(8)(Function.call,d(49).f(Object.prototype,"__proto__").set,2),c(a,[]),b=!(a instanceof Array)}catch(e){b=!0}return function setPrototypeOf(a,d){return g(a,d),b?a.__proto__=d:c(a,d),a}}({},!1):c),check:g}},function(a,b,c){var d=c(6);d(d.P,"Function",{bind:c(73)})},function(a,b,c){var d=c(9),e=c(13),f=c(74),g=[].slice,h={},i=function(a,b,c){if(!(b in h)){for(var d=[],e=0;e=0;)c+=j[b],j[b]=i(c/a),c=c%a*1e7},o=function(){for(var a=6,b="";--a>=0;)if(""!==b||0===a||0!==j[a]){var c=String(j[a]);b=""===b?c:b+g.call(l,7-c.length)+c}return b},p=function(a,b,c){return 0===b?c:b%2===1?p(a,b-1,c*a):p(a*a,b/2,c)},q=function(a){for(var b=0,c=a;c>=4096;)b+=12,c/=4096;for(;c>=2;)b+=1,c/=2;return b};d(d.P+d.F*(!!h&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!c(5)(function(){h.call({})})),"Number",{toFixed:function toFixed(a){var b,c,d,h,i=f(this,k),j=e(a),r="",s=l;if(j<0||j>20)throw RangeError(k);if(i!=i)return"NaN";if(i<=-1e21||i>=1e21)return String(i);if(i<0&&(r="-",i=-i),i>1e-21)if(b=q(i*p(2,69,1))-69,c=b<0?i*p(2,-b,1):i/p(2,b,1),c*=4503599627370496,b=52-b,b>0){for(m(0,c),d=j;d>=7;)m(1e7,0),d-=7;for(m(p(10,d,1),0),d=b-1;d>=23;)n(1<<23),d-=23;n(1<0?(h=s.length,s=r+(h<=j?"0."+g.call(l,j-h)+s:s.slice(0,h-j)+"."+s.slice(h-j))):s=r+s,s}})},function(a,b,c){var d=c(32);a.exports=function(a,b){if("number"!=typeof a&&"Number"!=d(a))throw TypeError(b);return+a}},function(a,b,c){var d=c(36),e=c(33);a.exports=function repeat(a){var b=String(e(this)),c="",f=d(a);if(f<0||f==1/0)throw RangeError("Count can't be negative");for(;f>0;(f>>>=1)&&(b+=b))1&f&&(c+=b);return c}},function(a,b,d){var e=d(6),f=d(5),g=d(77),h=1..toPrecision;e(e.P+e.F*(f(function(){return"1"!==h.call(1,c)})||!f(function(){h.call({})})),"Number",{toPrecision:function toPrecision(a){var b=g(this,"Number#toPrecision: incorrect invocation!");return a===c?h.call(b):h.call(b,a)}})},function(a,b,c){var d=c(6);d(d.S,"Number",{EPSILON:Math.pow(2,-52)})},function(a,b,c){var d=c(6),e=c(2).isFinite;d(d.S,"Number",{isFinite:function isFinite(a){return"number"==typeof a&&e(a)}})},function(a,b,c){var d=c(6);d(d.S,"Number",{isInteger:c(83)})},function(a,b,c){var d=c(13),e=Math.floor;a.exports=function isInteger(a){return!d(a)&&isFinite(a)&&e(a)===a}},function(a,b,c){var d=c(6);d(d.S,"Number",{isNaN:function isNaN(a){return a!=a}})},function(a,b,c){var d=c(6),e=c(83),f=Math.abs;d(d.S,"Number",{isSafeInteger:function isSafeInteger(a){return e(a)&&f(a)<=9007199254740991}})},function(a,b,c){var d=c(6);d(d.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(a,b,c){var d=c(6);d(d.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(a,b,c){var d=c(6),e=c(89);d(d.S+d.F*(Number.parseFloat!=e),"Number",{parseFloat:e})},function(a,b,c){var d=c(2).parseFloat,e=c(90).trim;a.exports=1/d(c(91)+"-0")!==-(1/0)?function parseFloat(a){var b=e(String(a),3),c=d(b);return 0===c&&"-"==b.charAt(0)?-0:c}:d},function(a,b,c){var d=c(6),e=c(33),f=c(5),g=c(91),h="["+g+"]",i="​…",j=RegExp("^"+h+h+"*"),k=RegExp(h+h+"*$"),l=function(a,b,c){var e={},h=f(function(){return!!g[a]()||i[a]()!=i}),j=e[a]=h?b(m):g[a];c&&(e[c]=j),d(d.P+d.F*h,"String",e)},m=l.trim=function(a,b){return a=String(e(a)),1&b&&(a=a.replace(j,"")),2&b&&(a=a.replace(k,"")),a};a.exports=l},function(a,b){a.exports="\t\n\x0B\f\r   ᠎              \u2028\u2029\ufeff"},function(a,b,c){var d=c(6),e=c(93);d(d.S+d.F*(Number.parseInt!=e),"Number",{parseInt:e})},function(a,b,c){var d=c(2).parseInt,e=c(90).trim,f=c(91),g=/^[\-+]?0[xX]/;a.exports=8!==d(f+"08")||22!==d(f+"0x16")?function parseInt(a,b){var c=e(String(a),3);return d(c,b>>>0||(g.test(c)?16:10))}:d},function(a,b,c){var d=c(6),e=c(93);d(d.G+d.F*(parseInt!=e),{parseInt:e})},function(a,b,c){var d=c(6),e=c(89);d(d.G+d.F*(parseFloat!=e),{parseFloat:e})},function(a,b,c){var d=c(6),e=c(97),f=Math.sqrt,g=Math.acosh;d(d.S+d.F*!(g&&710==Math.floor(g(Number.MAX_VALUE))&&g(1/0)==1/0),"Math",{acosh:function acosh(a){return(a=+a)<1?NaN:a>94906265.62425156?Math.log(a)+Math.LN2:e(a-1+f(a-1)*f(a+1))}})},function(a,b){a.exports=Math.log1p||function log1p(a){return(a=+a)>-1e-8&&a<1e-8?a-a*a/2:Math.log(1+a)}},function(a,b,c){function asinh(a){return isFinite(a=+a)&&0!=a?a<0?-asinh(-a):Math.log(a+Math.sqrt(a*a+1)):a}var d=c(6),e=Math.asinh;d(d.S+d.F*!(e&&1/e(0)>0),"Math",{asinh:asinh})},function(a,b,c){var d=c(6),e=Math.atanh;d(d.S+d.F*!(e&&1/e(-0)<0),"Math",{atanh:function atanh(a){return 0==(a=+a)?a:Math.log((1+a)/(1-a))/2}})},function(a,b,c){var d=c(6),e=c(101);d(d.S,"Math",{cbrt:function cbrt(a){return e(a=+a)*Math.pow(Math.abs(a),1/3)}})},function(a,b){a.exports=Math.sign||function sign(a){return 0==(a=+a)||a!=a?a:a<0?-1:1}},function(a,b,c){var d=c(6);d(d.S,"Math",{clz32:function clz32(a){return(a>>>=0)?31-Math.floor(Math.log(a+.5)*Math.LOG2E):32}})},function(a,b,c){var d=c(6),e=Math.exp;d(d.S,"Math",{cosh:function cosh(a){return(e(a=+a)+e(-a))/2}})},function(a,b,c){var d=c(6),e=c(105);d(d.S+d.F*(e!=Math.expm1),"Math",{expm1:e})},function(a,b){var c=Math.expm1;a.exports=!c||c(10)>22025.465794806718||c(10)<22025.465794806718||c(-2e-17)!=-2e-17?function expm1(a){return 0==(a=+a)?a:a>-1e-6&&a<1e-6?a+a*a/2:Math.exp(a)-1}:c},function(a,b,c){var d=c(6),e=c(101),f=Math.pow,g=f(2,-52),h=f(2,-23),i=f(2,127)*(2-h),j=f(2,-126),k=function(a){return a+1/g-1/g};d(d.S,"Math",{fround:function fround(a){var b,c,d=Math.abs(a),f=e(a);return di||c!=c?f*(1/0):f*c)}})},function(a,b,c){var d=c(6),e=Math.abs;d(d.S,"Math",{hypot:function hypot(a,b){for(var c,d,f=0,g=0,h=arguments.length,i=0;g0?(d=c/i,f+=d*d):f+=c;return i===1/0?1/0:i*Math.sqrt(f)}})},function(a,b,c){var d=c(6),e=Math.imul;d(d.S+d.F*c(5)(function(){return e(4294967295,5)!=-5||2!=e.length}),"Math",{imul:function imul(a,b){var c=65535,d=+a,e=+b,f=c&d,g=c&e;return 0|f*g+((c&d>>>16)*g+f*(c&e>>>16)<<16>>>0)}})},function(a,b,c){var d=c(6);d(d.S,"Math",{log10:function log10(a){return Math.log(a)/Math.LN10}})},function(a,b,c){var d=c(6);d(d.S,"Math",{log1p:c(97)})},function(a,b,c){var d=c(6);d(d.S,"Math",{log2:function log2(a){return Math.log(a)/Math.LN2}})},function(a,b,c){var d=c(6);d(d.S,"Math",{sign:c(101)})},function(a,b,c){var d=c(6),e=c(105),f=Math.exp;d(d.S+d.F*c(5)(function(){return!Math.sinh(-2e-17)!=-2e-17}),"Math",{sinh:function sinh(a){return Math.abs(a=+a)<1?(e(a)-e(-a))/2:(f(a-1)-f(-a-1))*(Math.E/2)}})},function(a,b,c){var d=c(6),e=c(105),f=Math.exp;d(d.S,"Math",{tanh:function tanh(a){var b=e(a=+a),c=e(-a);return b==1/0?1:c==1/0?-1:(b-c)/(f(a)+f(-a))}})},function(a,b,c){var d=c(6);d(d.S,"Math",{trunc:function trunc(a){return(a>0?Math.floor:Math.ceil)(a)}})},function(a,b,c){var d=c(6),e=c(37),f=String.fromCharCode,g=String.fromCodePoint;d(d.S+d.F*(!!g&&1!=g.length),"String",{fromCodePoint:function fromCodePoint(a){for(var b,c=[],d=arguments.length,g=0;d>g;){if(b=+arguments[g++],e(b,1114111)!==b)throw RangeError(b+" is not a valid code point");c.push(b<65536?f(b):f(((b-=65536)>>10)+55296,b%1024+56320))}return c.join("")}})},function(a,b,c){var d=c(6),e=c(30),f=c(35);d(d.S,"String",{raw:function raw(a){for(var b=e(a.raw),c=f(b.length),d=arguments.length,g=[],h=0;c>h;)g.push(String(b[h++])),h=k?a?"":c:(g=i.charCodeAt(j),g<55296||g>56319||j+1===k||(h=i.charCodeAt(j+1))<56320||h>57343?a?i.charAt(j):g:a?i.slice(j,j+2):(g-55296<<10)+(h-56320)+65536)}}},function(a,b,d){var e=d(6),f=d(35),g=d(122),h="endsWith",i=""[h];e(e.P+e.F*d(124)(h),"String",{endsWith:function endsWith(a){var b=g(this,a,h),d=arguments.length>1?arguments[1]:c,e=f(b.length),j=d===c?e:Math.min(f(d),e),k=String(a);return i?i.call(b,k,j):b.slice(j-k.length,j)===k}})},function(a,b,c){var d=c(123),e=c(33);a.exports=function(a,b,c){if(d(b))throw TypeError("String#"+c+" doesn't accept regex!");return String(e(a))}},function(a,b,d){var e=d(13),f=d(32),g=d(23)("match");a.exports=function(a){var b;return e(a)&&((b=a[g])!==c?!!b:"RegExp"==f(a))}},function(a,b,c){var d=c(23)("match");a.exports=function(a){var b=/./;try{"/./"[a](b)}catch(c){try{return b[d]=!1,!"/./"[a](b)}catch(e){}}return!0}},function(a,b,d){var e=d(6),f=d(122),g="includes";e(e.P+e.F*d(124)(g),"String",{includes:function includes(a){return!!~f(this,a,g).indexOf(a,arguments.length>1?arguments[1]:c)}})},function(a,b,c){var d=c(6);d(d.P,"String",{repeat:c(78)})},function(a,b,d){var e=d(6),f=d(35),g=d(122),h="startsWith",i=""[h];e(e.P+e.F*d(124)(h),"String",{startsWith:function startsWith(a){var b=g(this,a,h),d=f(Math.min(arguments.length>1?arguments[1]:c,b.length)),e=String(a);return i?i.call(b,e,d):b.slice(d,d+e.length)===e}})},function(a,b,d){var e=d(120)(!0);d(129)(String,"String",function(a){this._t=String(a),this._i=0},function(){var a,b=this._t,d=this._i;return d>=b.length?{value:c,done:!0}:(a=e(b,d),this._i+=a.length,{value:a,done:!1})})},function(a,b,d){var e=d(26),f=d(6),g=d(18),h=d(10),i=d(3),j=d(130),k=d(131),l=d(22),m=d(57),n=d(23)("iterator"),o=!([].keys&&"next"in[].keys()),p="@@iterator",q="keys",r="values",s=function(){return this};a.exports=function(a,b,d,t,u,v,w){k(d,b,t);var x,y,z,A=function(a){if(!o&&a in E)return E[a];switch(a){case q:return function keys(){return new d(this,a)};case r:return function values(){return new d(this,a)}}return function entries(){return new d(this,a)}},B=b+" Iterator",C=u==r,D=!1,E=a.prototype,F=E[n]||E[p]||u&&E[u],G=F||A(u),H=u?C?A("entries"):G:c,I="Array"==b?E.entries||F:F;if(I&&(z=m(I.call(new a)),z!==Object.prototype&&(l(z,B,!0),e||i(z,n)||h(z,n,s))),C&&F&&F.name!==r&&(D=!0,G=function values(){return F.call(this)}),e&&!w||!o&&!D&&E[n]||h(E,n,G),j[b]=G,j[B]=s,u)if(x={values:C?G:A(r),keys:v?G:A(q),entries:H},w)for(y in x)y in E||g(E,y,x[y]);else f(f.P+f.F*(o||D),b,x);return x}},function(a,b){a.exports={}},function(a,b,c){var d=c(44),e=c(17),f=c(22),g={};c(10)(g,c(23)("iterator"),function(){return this}),a.exports=function(a,b,c){a.prototype=d(g,{next:e(1,c)}),f(a,b+" Iterator")}},function(a,b,c){c(133)("anchor",function(a){return function anchor(b){return a(this,"a","name",b)}})},function(a,b,c){var d=c(6),e=c(5),f=c(33),g=/"/g,h=function(a,b,c,d){var e=String(f(a)),h="<"+b;return""!==c&&(h+=" "+c+'="'+String(d).replace(g,""")+'"'),h+">"+e+""};a.exports=function(a,b){var c={};c[a]=b(h),d(d.P+d.F*e(function(){var b=""[a]('"');return b!==b.toLowerCase()||b.split('"').length>3}),"String",c)}},function(a,b,c){c(133)("big",function(a){return function big(){return a(this,"big","","")}})},function(a,b,c){c(133)("blink",function(a){return function blink(){return a(this,"blink","","")}})},function(a,b,c){c(133)("bold",function(a){return function bold(){return a(this,"b","","")}})},function(a,b,c){c(133)("fixed",function(a){return function fixed(){return a(this,"tt","","")}})},function(a,b,c){c(133)("fontcolor",function(a){return function fontcolor(b){return a(this,"font","color",b)}})},function(a,b,c){c(133)("fontsize",function(a){return function fontsize(b){return a(this,"font","size",b)}})},function(a,b,c){c(133)("italics",function(a){return function italics(){return a(this,"i","","")}})},function(a,b,c){c(133)("link",function(a){return function link(b){return a(this,"a","href",b)}})},function(a,b,c){c(133)("small",function(a){return function small(){return a(this,"small","","")}})},function(a,b,c){c(133)("strike",function(a){return function strike(){return a(this,"strike","","")}})},function(a,b,c){c(133)("sub",function(a){return function sub(){return a(this,"sub","","")}})},function(a,b,c){c(133)("sup",function(a){return function sup(){return a(this,"sup","","")}})},function(a,b,c){var d=c(6);d(d.S,"Array",{isArray:c(43)})},function(a,b,d){var e=d(8),f=d(6),g=d(56),h=d(148),i=d(149),j=d(35),k=d(150),l=d(151);f(f.S+f.F*!d(153)(function(a){Array.from(a)}),"Array",{from:function from(a){var b,d,f,m,n=g(a),o="function"==typeof this?this:Array,p=arguments.length,q=p>1?arguments[1]:c,r=q!==c,s=0,t=l(n);if(r&&(q=e(q,p>2?arguments[2]:c,2)),t==c||o==Array&&i(t))for(b=j(n.length),d=new o(b);b>s;s++)k(d,s,r?q(n[s],s):n[s]);else for(m=t.call(n),d=new o;!(f=m.next()).done;s++)k(d,s,r?h(m,q,[f.value,s],!0):f.value);return d.length=s,d}})},function(a,b,d){var e=d(12);a.exports=function(a,b,d,f){try{return f?b(e(d)[0],d[1]):b(d)}catch(g){var h=a["return"];throw h!==c&&e(h.call(a)),g}}},function(a,b,d){var e=d(130),f=d(23)("iterator"),g=Array.prototype;a.exports=function(a){return a!==c&&(e.Array===a||g[f]===a)}},function(a,b,c){var d=c(11),e=c(17);a.exports=function(a,b,c){b in a?d.f(a,b,e(0,c)):a[b]=c}},function(a,b,d){var e=d(152),f=d(23)("iterator"),g=d(130);a.exports=d(7).getIteratorMethod=function(a){if(a!=c)return a[f]||a["@@iterator"]||g[e(a)]}},function(a,b,d){var e=d(32),f=d(23)("toStringTag"),g="Arguments"==e(function(){return arguments}()),h=function(a,b){try{return a[b]}catch(c){}};a.exports=function(a){var b,d,i;return a===c?"Undefined":null===a?"Null":"string"==typeof(d=h(b=Object(a),f))?d:g?e(b):"Object"==(i=e(b))&&"function"==typeof b.callee?"Arguments":i}},function(a,b,c){var d=c(23)("iterator"),e=!1;try{var f=[7][d]();f["return"]=function(){e=!0},Array.from(f,function(){throw 2})}catch(g){}a.exports=function(a,b){if(!b&&!e)return!1;var c=!1;try{var f=[7],g=f[d]();g.next=function(){return{done:c=!0}},f[d]=function(){return g},a(f)}catch(h){}return c}},function(a,b,c){var d=c(6),e=c(150);d(d.S+d.F*c(5)(function(){function F(){}return!(Array.of.call(F)instanceof F)}),"Array",{of:function of(){for(var a=0,b=arguments.length,c=new("function"==typeof this?this:Array)(b);b>a;)e(c,a,arguments[a++]);return c.length=b,c}})},function(a,b,d){var e=d(6),f=d(30),g=[].join;e(e.P+e.F*(d(31)!=Object||!d(156)(g)),"Array",{join:function join(a){return g.call(f(this),a===c?",":a)}})},function(a,b,c){var d=c(5);a.exports=function(a,b){return!!a&&d(function(){b?a.call(null,function(){},1):a.call(null)})}},function(a,b,d){var e=d(6),f=d(46),g=d(32),h=d(37),i=d(35),j=[].slice;e(e.P+e.F*d(5)(function(){f&&j.call(f)}),"Array",{slice:function slice(a,b){var d=i(this.length),e=g(this);if(b=b===c?d:b,"Array"==e)return j.call(this,a,b);for(var f=h(a,d),k=h(b,d),l=i(k-f),m=Array(l),n=0;nw;w++)if((n||w in t)&&(q=t[w],r=u(q,w,s),a))if(d)x[w]=r;else if(r)switch(a){case 3:return!0;case 5: +return q;case 6:return w;case 2:x.push(q)}else if(l)return!1;return m?-1:k||l?l:x}}},function(a,b,c){var d=c(162);a.exports=function(a,b){return new(d(a))(b)}},function(a,b,d){var e=d(13),f=d(43),g=d(23)("species");a.exports=function(a){var b;return f(a)&&(b=a.constructor,"function"!=typeof b||b!==Array&&!f(b.prototype)||(b=c),e(b)&&(b=b[g],null===b&&(b=c))),b===c?Array:b}},function(a,b,c){var d=c(6),e=c(160)(1);d(d.P+d.F*!c(156)([].map,!0),"Array",{map:function map(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(160)(2);d(d.P+d.F*!c(156)([].filter,!0),"Array",{filter:function filter(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(160)(3);d(d.P+d.F*!c(156)([].some,!0),"Array",{some:function some(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(160)(4);d(d.P+d.F*!c(156)([].every,!0),"Array",{every:function every(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(168);d(d.P+d.F*!c(156)([].reduce,!0),"Array",{reduce:function reduce(a){return e(this,a,arguments.length,arguments[1],!1)}})},function(a,b,c){var d=c(9),e=c(56),f=c(31),g=c(35);a.exports=function(a,b,c,h,i){d(b);var j=e(a),k=f(j),l=g(j.length),m=i?l-1:0,n=i?-1:1;if(c<2)for(;;){if(m in k){h=k[m],m+=n;break}if(m+=n,i?m<0:l<=m)throw TypeError("Reduce of empty array with no initial value")}for(;i?m>=0:l>m;m+=n)m in k&&(h=b(h,k[m],m,j));return h}},function(a,b,c){var d=c(6),e=c(168);d(d.P+d.F*!c(156)([].reduceRight,!0),"Array",{reduceRight:function reduceRight(a){return e(this,a,arguments.length,arguments[1],!0)}})},function(a,b,c){var d=c(6),e=c(34)(!1),f=[].indexOf,g=!!f&&1/[1].indexOf(1,-0)<0;d(d.P+d.F*(g||!c(156)(f)),"Array",{indexOf:function indexOf(a){return g?f.apply(this,arguments)||0:e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(30),f=c(36),g=c(35),h=[].lastIndexOf,i=!!h&&1/[1].lastIndexOf(1,-0)<0;d(d.P+d.F*(i||!c(156)(h)),"Array",{lastIndexOf:function lastIndexOf(a){if(i)return h.apply(this,arguments)||0;var b=e(this),c=g(b.length),d=c-1;for(arguments.length>1&&(d=Math.min(d,f(arguments[1]))),d<0&&(d=c+d);d>=0;d--)if(d in b&&b[d]===a)return d||0;return-1}})},function(a,b,c){var d=c(6);d(d.P,"Array",{copyWithin:c(173)}),c(174)("copyWithin")},function(a,b,d){var e=d(56),f=d(37),g=d(35);a.exports=[].copyWithin||function copyWithin(a,b){var d=e(this),h=g(d.length),i=f(a,h),j=f(b,h),k=arguments.length>2?arguments[2]:c,l=Math.min((k===c?h:f(k,h))-j,h-i),m=1;for(j0;)j in d?d[i]=d[j]:delete d[i],i+=m,j+=m;return d}},function(a,b){a.exports=function(){}},function(a,b,c){var d=c(6);d(d.P,"Array",{fill:c(176)}),c(174)("fill")},function(a,b,d){var e=d(56),f=d(37),g=d(35);a.exports=function fill(a){for(var b=e(this),d=g(b.length),h=arguments.length,i=f(h>1?arguments[1]:c,d),j=h>2?arguments[2]:c,k=j===c?d:f(j,d);k>i;)b[i++]=a;return b}},function(a,b,d){var e=d(6),f=d(160)(5),g="find",h=!0;g in[]&&Array(1)[g](function(){h=!1}),e(e.P+e.F*h,"Array",{find:function find(a){return f(this,a,arguments.length>1?arguments[1]:c)}}),d(174)(g)},function(a,b,d){var e=d(6),f=d(160)(6),g="findIndex",h=!0;g in[]&&Array(1)[g](function(){h=!1}),e(e.P+e.F*h,"Array",{findIndex:function findIndex(a){return f(this,a,arguments.length>1?arguments[1]:c)}}),d(174)(g)},function(a,b,d){var e=d(174),f=d(180),g=d(130),h=d(30);a.exports=d(129)(Array,"Array",function(a,b){this._t=h(a),this._i=0,this._k=b},function(){var a=this._t,b=this._k,d=this._i++;return!a||d>=a.length?(this._t=c,f(1)):"keys"==b?f(0,d):"values"==b?f(0,a[d]):f(0,[d,a[d]])},"values"),g.Arguments=g.Array,e("keys"),e("values"),e("entries")},function(a,b){a.exports=function(a,b){return{value:b,done:!!a}}},function(a,b,c){c(182)("Array")},function(a,b,c){var d=c(2),e=c(7),f=c(11),g=c(4),h=c(23)("species");a.exports=function(a){var b="function"==typeof e[a]?e[a]:d[a];g&&b&&!b[h]&&f.f(b,h,{configurable:!0,get:function(){return this}})}},function(a,b,d){var e,f,g,h=d(26),i=d(2),j=d(8),k=d(152),l=d(6),m=d(13),n=d(9),o=d(184),p=d(185),q=d(186),r=d(187).set,s=d(188)(),t="Promise",u=i.TypeError,v=i.process,w=i[t],v=i.process,x="process"==k(v),y=function(){},z=!!function(){try{var a=w.resolve(1),b=(a.constructor={})[d(23)("species")]=function(a){a(y,y)};return(x||"function"==typeof PromiseRejectionEvent)&&a.then(y)instanceof b}catch(c){}}(),A=function(a,b){return a===b||a===w&&b===g},B=function(a){var b;return!(!m(a)||"function"!=typeof(b=a.then))&&b},C=function(a){return A(w,a)?new D(a):new f(a)},D=f=function(a){var b,d;this.promise=new a(function(a,e){if(b!==c||d!==c)throw u("Bad Promise constructor");b=a,d=e}),this.resolve=n(b),this.reject=n(d)},E=function(a){try{a()}catch(b){return{error:b}}},F=function(a,b){if(!a._n){a._n=!0;var c=a._c;s(function(){for(var d=a._v,e=1==a._s,f=0,g=function(b){var c,f,g=e?b.ok:b.fail,h=b.resolve,i=b.reject,j=b.domain;try{g?(e||(2==a._h&&I(a),a._h=1),g===!0?c=d:(j&&j.enter(),c=g(d),j&&j.exit()),c===b.promise?i(u("Promise-chain cycle")):(f=B(c))?f.call(c,h,i):h(c)):i(d)}catch(k){i(k)}};c.length>f;)g(c[f++]);a._c=[],a._n=!1,b&&!a._h&&G(a)})}},G=function(a){r.call(i,function(){var b,d,e,f=a._v;if(H(a)&&(b=E(function(){x?v.emit("unhandledRejection",f,a):(d=i.onunhandledrejection)?d({promise:a,reason:f}):(e=i.console)&&e.error&&e.error("Unhandled promise rejection",f)}),a._h=x||H(a)?2:1),a._a=c,b)throw b.error})},H=function(a){if(1==a._h)return!1;for(var b,c=a._a||a._c,d=0;c.length>d;)if(b=c[d++],b.fail||!H(b.promise))return!1;return!0},I=function(a){r.call(i,function(){var b;x?v.emit("rejectionHandled",a):(b=i.onrejectionhandled)&&b({promise:a,reason:a._v})})},J=function(a){var b=this;b._d||(b._d=!0,b=b._w||b,b._v=a,b._s=2,b._a||(b._a=b._c.slice()),F(b,!0))},K=function(a){var b,c=this;if(!c._d){c._d=!0,c=c._w||c;try{if(c===a)throw u("Promise can't be resolved itself");(b=B(a))?s(function(){var d={_w:c,_d:!1};try{b.call(a,j(K,d,1),j(J,d,1))}catch(e){J.call(d,e)}}):(c._v=a,c._s=1,F(c,!1))}catch(d){J.call({_w:c,_d:!1},d)}}};z||(w=function Promise(a){o(this,w,t,"_h"),n(a),e.call(this);try{a(j(K,this,1),j(J,this,1))}catch(b){J.call(this,b)}},e=function Promise(a){this._c=[],this._a=c,this._s=0,this._d=!1,this._v=c,this._h=0,this._n=!1},e.prototype=d(189)(w.prototype,{then:function then(a,b){var d=C(q(this,w));return d.ok="function"!=typeof a||a,d.fail="function"==typeof b&&b,d.domain=x?v.domain:c,this._c.push(d),this._a&&this._a.push(d),this._s&&F(this,!1),d.promise},"catch":function(a){return this.then(c,a)}}),D=function(){var a=new e;this.promise=a,this.resolve=j(K,a,1),this.reject=j(J,a,1)}),l(l.G+l.W+l.F*!z,{Promise:w}),d(22)(w,t),d(182)(t),g=d(7)[t],l(l.S+l.F*!z,t,{reject:function reject(a){var b=C(this),c=b.reject;return c(a),b.promise}}),l(l.S+l.F*(h||!z),t,{resolve:function resolve(a){if(a instanceof w&&A(a.constructor,this))return a;var b=C(this),c=b.resolve;return c(a),b.promise}}),l(l.S+l.F*!(z&&d(153)(function(a){w.all(a)["catch"](y)})),t,{all:function all(a){var b=this,d=C(b),e=d.resolve,f=d.reject,g=E(function(){var d=[],g=0,h=1;p(a,!1,function(a){var i=g++,j=!1;d.push(c),h++,b.resolve(a).then(function(a){j||(j=!0,d[i]=a,--h||e(d))},f)}),--h||e(d)});return g&&f(g.error),d.promise},race:function race(a){var b=this,c=C(b),d=c.reject,e=E(function(){p(a,!1,function(a){b.resolve(a).then(c.resolve,d)})});return e&&d(e.error),c.promise}})},function(a,b){a.exports=function(a,b,d,e){if(!(a instanceof b)||e!==c&&e in a)throw TypeError(d+": incorrect invocation!");return a}},function(a,b,c){var d=c(8),e=c(148),f=c(149),g=c(12),h=c(35),i=c(151),j={},k={},b=a.exports=function(a,b,c,l,m){var n,o,p,q,r=m?function(){return a}:i(a),s=d(c,l,b?2:1),t=0;if("function"!=typeof r)throw TypeError(a+" is not iterable!");if(f(r)){for(n=h(a.length);n>t;t++)if(q=b?s(g(o=a[t])[0],o[1]):s(a[t]),q===j||q===k)return q}else for(p=r.call(a);!(o=p.next()).done;)if(q=e(p,s,o.value,b),q===j||q===k)return q};b.BREAK=j,b.RETURN=k},function(a,b,d){var e=d(12),f=d(9),g=d(23)("species");a.exports=function(a,b){var d,h=e(a).constructor;return h===c||(d=e(h)[g])==c?b:f(d)}},function(a,b,c){var d,e,f,g=c(8),h=c(74),i=c(46),j=c(15),k=c(2),l=k.process,m=k.setImmediate,n=k.clearImmediate,o=k.MessageChannel,p=0,q={},r="onreadystatechange",s=function(){var a=+this;if(q.hasOwnProperty(a)){var b=q[a];delete q[a],b()}},t=function(a){s.call(a.data)};m&&n||(m=function setImmediate(a){for(var b=[],c=1;arguments.length>c;)b.push(arguments[c++]);return q[++p]=function(){h("function"==typeof a?a:Function(a),b)},d(p),p},n=function clearImmediate(a){delete q[a]},"process"==c(32)(l)?d=function(a){l.nextTick(g(s,a,1))}:o?(e=new o,f=e.port2,e.port1.onmessage=t,d=g(f.postMessage,f,1)):k.addEventListener&&"function"==typeof postMessage&&!k.importScripts?(d=function(a){k.postMessage(a+"","*")},k.addEventListener("message",t,!1)):d=r in j("script")?function(a){i.appendChild(j("script"))[r]=function(){i.removeChild(this),s.call(a)}}:function(a){setTimeout(g(s,a,1),0)}),a.exports={set:m,clear:n}},function(a,b,d){var e=d(2),f=d(187).set,g=e.MutationObserver||e.WebKitMutationObserver,h=e.process,i=e.Promise,j="process"==d(32)(h);a.exports=function(){var a,b,d,k=function(){var e,f;for(j&&(e=h.domain)&&e.exit();a;){f=a.fn,a=a.next;try{f()}catch(g){throw a?d():b=c,g}}b=c,e&&e.enter()};if(j)d=function(){h.nextTick(k)};else if(g){var l=!0,m=document.createTextNode("");new g(k).observe(m,{characterData:!0}),d=function(){m.data=l=!l}}else if(i&&i.resolve){var n=i.resolve();d=function(){n.then(k)}}else d=function(){f.call(e,k)};return function(e){var f={fn:e,next:c};b&&(b.next=f),a||(a=f,d()),b=f}}},function(a,b,c){var d=c(10);a.exports=function(a,b,c){for(var e in b)c&&a[e]?a[e]=b[e]:d(a,e,b[e]);return a}},function(a,b,d){var e=d(191);a.exports=d(192)("Map",function(a){return function Map(){return a(this,arguments.length>0?arguments[0]:c)}},{get:function get(a){var b=e.getEntry(this,a);return b&&b.v},set:function set(a,b){return e.def(this,0===a?0:a,b)}},e,!0)},function(a,b,d){var e=d(11).f,f=d(44),g=d(189),h=d(8),i=d(184),j=d(33),k=d(185),l=d(129),m=d(180),n=d(182),o=d(4),p=d(19).fastKey,q=o?"_s":"size",r=function(a,b){var c,d=p(b);if("F"!==d)return a._i[d];for(c=a._f;c;c=c.n)if(c.k==b)return c};a.exports={getConstructor:function(a,b,d,l){var m=a(function(a,e){i(a,m,b,"_i"),a._i=f(null),a._f=c,a._l=c,a[q]=0,e!=c&&k(e,d,a[l],a)});return g(m.prototype,{clear:function clear(){for(var a=this,b=a._i,d=a._f;d;d=d.n)d.r=!0,d.p&&(d.p=d.p.n=c),delete b[d.i];a._f=a._l=c,a[q]=0},"delete":function(a){var b=this,c=r(b,a);if(c){var d=c.n,e=c.p;delete b._i[c.i],c.r=!0,e&&(e.n=d),d&&(d.p=e),b._f==c&&(b._f=d),b._l==c&&(b._l=e),b[q]--}return!!c},forEach:function forEach(a){i(this,m,"forEach");for(var b,d=h(a,arguments.length>1?arguments[1]:c,3);b=b?b.n:this._f;)for(d(b.v,b.k,this);b&&b.r;)b=b.p},has:function has(a){return!!r(this,a)}}),o&&e(m.prototype,"size",{get:function(){return j(this[q])}}),m},def:function(a,b,d){var e,f,g=r(a,b);return g?g.v=d:(a._l=g={i:f=p(b,!0),k:b,v:d,p:e=a._l,n:c,r:!1},a._f||(a._f=g),e&&(e.n=g),a[q]++,"F"!==f&&(a._i[f]=g)),a},getEntry:r,setStrong:function(a,b,d){l(a,b,function(a,b){this._t=a,this._k=b,this._l=c},function(){for(var a=this,b=a._k,d=a._l;d&&d.r;)d=d.p;return a._t&&(a._l=d=d?d.n:a._t._f)?"keys"==b?m(0,d.k):"values"==b?m(0,d.v):m(0,[d.k,d.v]):(a._t=c,m(1))},d?"entries":"values",!d,!0),n(b)}}},function(a,b,d){var e=d(2),f=d(6),g=d(19),h=d(5),i=d(10),j=d(189),k=d(185),l=d(184),m=d(13),n=d(22),o=d(11).f,p=d(160)(0),q=d(4);a.exports=function(a,b,d,r,s,t){var u=e[a],v=u,w=s?"set":"add",x=v&&v.prototype,y={};return q&&"function"==typeof v&&(t||x.forEach&&!h(function(){(new v).entries().next()}))?(v=b(function(b,d){l(b,v,a,"_c"),b._c=new u,d!=c&&k(d,s,b[w],b)}),p("add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON".split(","),function(a){var b="add"==a||"set"==a;a in x&&(!t||"clear"!=a)&&i(v.prototype,a,function(d,e){if(l(this,v,a),!b&&t&&!m(d))return"get"==a&&c;var f=this._c[a](0===d?0:d,e);return b?this:f})}),"size"in x&&o(v.prototype,"size",{get:function(){return this._c.size}})):(v=r.getConstructor(b,a,s,w),j(v.prototype,d),g.NEED=!0),n(v,a),y[a]=v,f(f.G+f.W+f.F,y),t||r.setStrong(v,a,s),v}},function(a,b,d){var e=d(191);a.exports=d(192)("Set",function(a){return function Set(){return a(this,arguments.length>0?arguments[0]:c)}},{add:function add(a){return e.def(this,a=0===a?0:a,a)}},e)},function(a,b,d){var e,f=d(160)(0),g=d(18),h=d(19),i=d(67),j=d(195),k=d(13),l=h.getWeak,m=Object.isExtensible,n=j.ufstore,o={},p=function(a){return function WeakMap(){return a(this,arguments.length>0?arguments[0]:c)}},q={get:function get(a){if(k(a)){var b=l(a);return b===!0?n(this).get(a):b?b[this._i]:c}},set:function set(a,b){return j.def(this,a,b)}},r=a.exports=d(192)("WeakMap",p,q,j,!0,!0);7!=(new r).set((Object.freeze||Object)(o),7).get(o)&&(e=j.getConstructor(p),i(e.prototype,q),h.NEED=!0,f(["delete","has","get","set"],function(a){var b=r.prototype,c=b[a];g(b,a,function(b,d){if(k(b)&&!m(b)){this._f||(this._f=new e);var f=this._f[a](b,d);return"set"==a?this:f}return c.call(this,b,d)})}))},function(a,b,d){var e=d(189),f=d(19).getWeak,g=d(12),h=d(13),i=d(184),j=d(185),k=d(160),l=d(3),m=k(5),n=k(6),o=0,p=function(a){return a._l||(a._l=new q)},q=function(){this.a=[]},r=function(a,b){return m(a.a,function(a){return a[0]===b})};q.prototype={get:function(a){var b=r(this,a);if(b)return b[1]},has:function(a){return!!r(this,a)},set:function(a,b){var c=r(this,a);c?c[1]=b:this.a.push([a,b])},"delete":function(a){var b=n(this.a,function(b){return b[0]===a});return~b&&this.a.splice(b,1),!!~b}},a.exports={getConstructor:function(a,b,d,g){var k=a(function(a,e){i(a,k,b,"_i"),a._i=o++,a._l=c,e!=c&&j(e,d,a[g],a)});return e(k.prototype,{"delete":function(a){if(!h(a))return!1;var b=f(a);return b===!0?p(this)["delete"](a):b&&l(b,this._i)&&delete b[this._i]},has:function has(a){if(!h(a))return!1;var b=f(a);return b===!0?p(this).has(a):b&&l(b,this._i)}}),k},def:function(a,b,c){var d=f(g(b),!0);return d===!0?p(a).set(b,c):d[a._i]=c,a},ufstore:p}},function(a,b,d){var e=d(195);d(192)("WeakSet",function(a){return function WeakSet(){return a(this,arguments.length>0?arguments[0]:c)}},{add:function add(a){return e.def(this,a,!0)}},e,!1,!0)},function(a,b,c){var d=c(6),e=c(9),f=c(12),g=(c(2).Reflect||{}).apply,h=Function.apply;d(d.S+d.F*!c(5)(function(){g(function(){})}),"Reflect",{apply:function apply(a,b,c){var d=e(a),i=f(c);return g?g(d,b,i):h.call(d,b,i)}})},function(a,b,c){var d=c(6),e=c(44),f=c(9),g=c(12),h=c(13),i=c(5),j=c(73),k=(c(2).Reflect||{}).construct,l=i(function(){function F(){}return!(k(function(){},[],F)instanceof F)}),m=!i(function(){k(function(){})});d(d.S+d.F*(l||m),"Reflect",{construct:function construct(a,b){f(a),g(b);var c=arguments.length<3?a:f(arguments[2]);if(m&&!l)return k(a,b,c);if(a==c){switch(b.length){case 0:return new a;case 1:return new a(b[0]);case 2:return new a(b[0],b[1]);case 3:return new a(b[0],b[1],b[2]);case 4:return new a(b[0],b[1],b[2],b[3])}var d=[null];return d.push.apply(d,b),new(j.apply(a,d))}var i=c.prototype,n=e(h(i)?i:Object.prototype),o=Function.apply.call(a,n,b);return h(o)?o:n}})},function(a,b,c){var d=c(11),e=c(6),f=c(12),g=c(16);e(e.S+e.F*c(5)(function(){Reflect.defineProperty(d.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function defineProperty(a,b,c){f(a),b=g(b,!0),f(c);try{return d.f(a,b,c),!0}catch(e){return!1}}})},function(a,b,c){var d=c(6),e=c(49).f,f=c(12);d(d.S,"Reflect",{deleteProperty:function deleteProperty(a,b){var c=e(f(a),b);return!(c&&!c.configurable)&&delete a[b]}})},function(a,b,d){var e=d(6),f=d(12),g=function(a){this._t=f(a),this._i=0;var b,c=this._k=[];for(b in a)c.push(b)};d(131)(g,"Object",function(){var a,b=this,d=b._k;do if(b._i>=d.length)return{value:c,done:!0};while(!((a=d[b._i++])in b._t));return{value:a,done:!1}}),e(e.S,"Reflect",{enumerate:function enumerate(a){return new g(a)}})},function(a,b,d){function get(a,b){var d,h,k=arguments.length<3?a:arguments[2];return j(a)===k?a[b]:(d=e.f(a,b))?g(d,"value")?d.value:d.get!==c?d.get.call(k):c:i(h=f(a))?get(h,b,k):void 0}var e=d(49),f=d(57),g=d(3),h=d(6),i=d(13),j=d(12);h(h.S,"Reflect",{get:get})},function(a,b,c){var d=c(49),e=c(6),f=c(12);e(e.S,"Reflect",{getOwnPropertyDescriptor:function getOwnPropertyDescriptor(a,b){return d.f(f(a),b)}})},function(a,b,c){var d=c(6),e=c(57),f=c(12);d(d.S,"Reflect",{getPrototypeOf:function getPrototypeOf(a){return e(f(a))}})},function(a,b,c){var d=c(6);d(d.S,"Reflect",{has:function has(a,b){return b in a}})},function(a,b,c){var d=c(6),e=c(12),f=Object.isExtensible;d(d.S,"Reflect",{isExtensible:function isExtensible(a){return e(a),!f||f(a)}})},function(a,b,c){var d=c(6);d(d.S,"Reflect",{ownKeys:c(208)})},function(a,b,c){var d=c(48),e=c(41),f=c(12),g=c(2).Reflect;a.exports=g&&g.ownKeys||function ownKeys(a){var b=d.f(f(a)),c=e.f;return c?b.concat(c(a)):b}},function(a,b,c){var d=c(6),e=c(12),f=Object.preventExtensions;d(d.S,"Reflect",{preventExtensions:function preventExtensions(a){e(a);try{return f&&f(a),!0}catch(b){return!1}}})},function(a,b,d){function set(a,b,d){var i,m,n=arguments.length<4?a:arguments[3],o=f.f(k(a),b);if(!o){if(l(m=g(a)))return set(m,b,d,n);o=j(0)}return h(o,"value")?!(o.writable===!1||!l(n))&&(i=f.f(n,b)||j(0),i.value=d,e.f(n,b,i),!0):o.set!==c&&(o.set.call(n,d),!0)}var e=d(11),f=d(49),g=d(57),h=d(3),i=d(6),j=d(17),k=d(12),l=d(13);i(i.S,"Reflect",{set:set})},function(a,b,c){var d=c(6),e=c(71);e&&d(d.S,"Reflect",{setPrototypeOf:function setPrototypeOf(a,b){e.check(a,b);try{return e.set(a,b),!0}catch(c){return!1}}})},function(a,b,c){var d=c(6);d(d.S,"Date",{now:function(){return(new Date).getTime()}})},function(a,b,c){var d=c(6),e=c(56),f=c(16);d(d.P+d.F*c(5)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function toJSON(a){var b=e(this),c=f(b);return"number"!=typeof c||isFinite(c)?b.toISOString():null}})},function(a,b,c){var d=c(6),e=c(5),f=Date.prototype.getTime,g=function(a){return a>9?a:"0"+a};d(d.P+d.F*(e(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!e(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function toISOString(){if(!isFinite(f.call(this)))throw RangeError("Invalid time value");var a=this,b=a.getUTCFullYear(),c=a.getUTCMilliseconds(),d=b<0?"-":b>9999?"+":"";return d+("00000"+Math.abs(b)).slice(d?-6:-4)+"-"+g(a.getUTCMonth()+1)+"-"+g(a.getUTCDate())+"T"+g(a.getUTCHours())+":"+g(a.getUTCMinutes())+":"+g(a.getUTCSeconds())+"."+(c>99?c:"0"+g(c))+"Z"}})},function(a,b,d){var e=d(6),f=d(216),g=d(217),h=d(12),i=d(37),j=d(35),k=d(13),l=d(2).ArrayBuffer,m=d(186),n=g.ArrayBuffer,o=g.DataView,p=f.ABV&&l.isView,q=n.prototype.slice,r=f.VIEW,s="ArrayBuffer";e(e.G+e.W+e.F*(l!==n),{ArrayBuffer:n}),e(e.S+e.F*!f.CONSTR,s,{isView:function isView(a){return p&&p(a)||k(a)&&r in a}}),e(e.P+e.U+e.F*d(5)(function(){return!new n(2).slice(1,c).byteLength}),s,{slice:function slice(a,b){if(q!==c&&b===c)return q.call(h(this),a);for(var d=h(this).byteLength,e=i(a,d),f=i(b===c?d:b,d),g=new(m(this,n))(j(f-e)),k=new o(this),l=new o(g),p=0;e>1,k=23===b?E(2,-24)-E(2,-77):0,l=0,m=a<0||0===a&&1/a<0?1:0;for(a=D(a),a!=a||a===B?(e=a!=a?1:0,d=i):(d=F(G(a)/H),a*(f=E(2,-d))<1&&(d--,f*=2),a+=d+j>=1?k/f:k*E(2,1-j),a*f>=2&&(d++,f/=2),d+j>=i?(e=0,d=i):d+j>=1?(e=(a*f-1)*E(2,b),d+=j):(e=a*E(2,j-1)*E(2,b),d=0));b>=8;g[l++]=255&e,e/=256,b-=8);for(d=d<0;g[l++]=255&d,d/=256,h-=8);return g[--l]|=128*m,g},P=function(a,b,c){var d,e=8*c-b-1,f=(1<>1,h=e-7,i=c-1,j=a[i--],k=127&j;for(j>>=7;h>0;k=256*k+a[i],i--,h-=8);for(d=k&(1<<-h)-1,k>>=-h,h+=b;h>0;d=256*d+a[i],i--,h-=8);if(0===k)k=1-g;else{if(k===f)return d?NaN:j?-B:B;d+=E(2,b),k-=g}return(j?-1:1)*d*E(2,k-b)},Q=function(a){return a[3]<<24|a[2]<<16|a[1]<<8|a[0]},R=function(a){return[255&a]},S=function(a){return[255&a,a>>8&255]},T=function(a){return[255&a,a>>8&255,a>>16&255,a>>24&255]},U=function(a){return O(a,52,8)},V=function(a){return O(a,23,4)},W=function(a,b,c){p(a[u],b,{get:function(){return this[c]}})},X=function(a,b,c,d){var e=+c,f=m(e);if(e!=f||f<0||f+b>a[M])throw A(w);var g=a[L]._b,h=f+a[N],i=g.slice(h,h+b);return d?i:i.reverse()},Y=function(a,b,c,d,e,f){var g=+c,h=m(g);if(g!=h||h<0||h+b>a[M])throw A(w);for(var i=a[L]._b,j=h+a[N],k=d(+e),l=0;lba;)($=aa[ba++])in x||i(x,$,C[$]);g||(_.constructor=x)}var ca=new y(new x(2)),da=y[u].setInt8;ca.setInt8(0,2147483648),ca.setInt8(1,2147483649),!ca.getInt8(0)&&ca.getInt8(1)||j(y[u],{setInt8:function setInt8(a,b){da.call(this,a,b<<24>>24)},setUint8:function setUint8(a,b){da.call(this,a,b<<24>>24)}},!0)}else x=function ArrayBuffer(a){var b=Z(this,a);this._b=q.call(Array(b),0),this[M]=b},y=function DataView(a,b,d){l(this,y,t),l(a,x,t);var e=a[M],f=m(b);if(f<0||f>e)throw A("Wrong offset!");if(d=d===c?e-f:n(d),f+d>e)throw A(v);this[L]=a,this[N]=f,this[M]=d},f&&(W(x,J,"_l"),W(y,I,"_b"),W(y,J,"_l"),W(y,K,"_o")),j(y[u],{getInt8:function getInt8(a){return X(this,1,a)[0]<<24>>24},getUint8:function getUint8(a){return X(this,1,a)[0]},getInt16:function getInt16(a){var b=X(this,2,a,arguments[1]);return(b[1]<<8|b[0])<<16>>16},getUint16:function getUint16(a){var b=X(this,2,a,arguments[1]);return b[1]<<8|b[0]},getInt32:function getInt32(a){return Q(X(this,4,a,arguments[1]))},getUint32:function getUint32(a){return Q(X(this,4,a,arguments[1]))>>>0},getFloat32:function getFloat32(a){return P(X(this,4,a,arguments[1]),23,4)},getFloat64:function getFloat64(a){return P(X(this,8,a,arguments[1]),52,8)},setInt8:function setInt8(a,b){Y(this,1,a,R,b)},setUint8:function setUint8(a,b){Y(this,1,a,R,b)},setInt16:function setInt16(a,b){Y(this,2,a,S,b,arguments[2])},setUint16:function setUint16(a,b){Y(this,2,a,S,b,arguments[2])},setInt32:function setInt32(a,b){Y(this,4,a,T,b,arguments[2])},setUint32:function setUint32(a,b){Y(this,4,a,T,b,arguments[2])},setFloat32:function setFloat32(a,b){Y(this,4,a,V,b,arguments[2])},setFloat64:function setFloat64(a,b){Y(this,8,a,U,b,arguments[2])}});r(x,s),r(y,t),i(y[u],h.VIEW,!0),b[s]=x,b[t]=y},function(a,b,c){var d=c(6);d(d.G+d.W+d.F*!c(216).ABV,{DataView:c(217).DataView})},function(a,b,c){c(220)("Int8",1,function(a){return function Int8Array(b,c,d){return a(this,b,c,d)}})},function(a,b,d){if(d(4)){var e=d(26),f=d(2),g=d(5),h=d(6),i=d(216),j=d(217),k=d(8),l=d(184),m=d(17),n=d(10),o=d(189),p=d(36),q=d(35),r=d(37),s=d(16),t=d(3),u=d(69),v=d(152),w=d(13),x=d(56),y=d(149),z=d(44),A=d(57),B=d(48).f,C=d(151),D=d(20),E=d(23),F=d(160),G=d(34),H=d(186),I=d(179),J=d(130),K=d(153),L=d(182),M=d(176),N=d(173),O=d(11),P=d(49),Q=O.f,R=P.f,S=f.RangeError,T=f.TypeError,U=f.Uint8Array,V="ArrayBuffer",W="Shared"+V,X="BYTES_PER_ELEMENT",Y="prototype",Z=Array[Y],$=j.ArrayBuffer,_=j.DataView,aa=F(0),ba=F(2),ca=F(3),da=F(4),ea=F(5),fa=F(6),ga=G(!0),ha=G(!1),ia=I.values,ja=I.keys,ka=I.entries,la=Z.lastIndexOf,ma=Z.reduce,na=Z.reduceRight,oa=Z.join,pa=Z.sort,qa=Z.slice,ra=Z.toString,sa=Z.toLocaleString,ta=E("iterator"),ua=E("toStringTag"),va=D("typed_constructor"),wa=D("def_constructor"),xa=i.CONSTR,ya=i.TYPED,za=i.VIEW,Aa="Wrong length!",Ba=F(1,function(a,b){return Ha(H(a,a[wa]),b)}),Ca=g(function(){return 1===new U(new Uint16Array([1]).buffer)[0]}),Da=!!U&&!!U[Y].set&&g(function(){new U(1).set({})}),Ea=function(a,b){if(a===c)throw T(Aa);var d=+a,e=q(a);if(b&&!u(d,e))throw S(Aa);return e},Fa=function(a,b){var c=p(a);if(c<0||c%b)throw S("Wrong offset!");return c},Ga=function(a){if(w(a)&&ya in a)return a;throw T(a+" is not a typed array!")},Ha=function(a,b){if(!(w(a)&&va in a))throw T("It is not a typed array constructor!");return new a(b)},Ia=function(a,b){return Ja(H(a,a[wa]),b)},Ja=function(a,b){for(var c=0,d=b.length,e=Ha(a,d);d>c;)e[c]=b[c++];return e},Ka=function(a,b,c){Q(a,b,{get:function(){return this._d[c]}})},La=function from(a){var b,d,e,f,g,h,i=x(a),j=arguments.length,l=j>1?arguments[1]:c,m=l!==c,n=C(i);if(n!=c&&!y(n)){for(h=n.call(i),e=[],b=0;!(g=h.next()).done;b++)e.push(g.value);i=e}for(m&&j>2&&(l=k(l,arguments[2],2)),b=0,d=q(i.length),f=Ha(this,d);d>b;b++)f[b]=m?l(i[b],b):i[b];return f},Ma=function of(){for(var a=0,b=arguments.length,c=Ha(this,b);b>a;)c[a]=arguments[a++];return c},Na=!!U&&g(function(){sa.call(new U(1))}),Oa=function toLocaleString(){return sa.apply(Na?qa.call(Ga(this)):Ga(this),arguments)},Pa={copyWithin:function copyWithin(a,b){return N.call(Ga(this),a,b,arguments.length>2?arguments[2]:c)},every:function every(a){return da(Ga(this),a,arguments.length>1?arguments[1]:c)},fill:function fill(a){return M.apply(Ga(this),arguments)},filter:function filter(a){return Ia(this,ba(Ga(this),a,arguments.length>1?arguments[1]:c))},find:function find(a){return ea(Ga(this),a,arguments.length>1?arguments[1]:c)},findIndex:function findIndex(a){return fa(Ga(this),a,arguments.length>1?arguments[1]:c)},forEach:function forEach(a){aa(Ga(this),a,arguments.length>1?arguments[1]:c)},indexOf:function indexOf(a){return ha(Ga(this),a,arguments.length>1?arguments[1]:c)},includes:function includes(a){return ga(Ga(this),a,arguments.length>1?arguments[1]:c)},join:function join(a){return oa.apply(Ga(this),arguments)},lastIndexOf:function lastIndexOf(a){return la.apply(Ga(this),arguments)},map:function map(a){return Ba(Ga(this),a,arguments.length>1?arguments[1]:c)},reduce:function reduce(a){return ma.apply(Ga(this),arguments)},reduceRight:function reduceRight(a){return na.apply(Ga(this),arguments)},reverse:function reverse(){for(var a,b=this,c=Ga(b).length,d=Math.floor(c/2),e=0;e1?arguments[1]:c)},sort:function sort(a){return pa.call(Ga(this),a)},subarray:function subarray(a,b){var d=Ga(this),e=d.length,f=r(a,e);return new(H(d,d[wa]))(d.buffer,d.byteOffset+f*d.BYTES_PER_ELEMENT,q((b===c?e:r(b,e))-f))}},Qa=function slice(a,b){return Ia(this,qa.call(Ga(this),a,b))},Ra=function set(a){Ga(this);var b=Fa(arguments[1],1),c=this.length,d=x(a),e=q(d.length),f=0;if(e+b>c)throw S(Aa);for(;f255?255:255&d),e.v[p](c*b+e.o,d,Ca)},E=function(a,b){Q(a,b,{get:function(){return C(this,b)},set:function(a){return D(this,b,a)},enumerable:!0})};u?(r=d(function(a,d,e,f){l(a,r,k,"_d");var g,h,i,j,m=0,o=0;if(w(d)){if(!(d instanceof $||(j=v(d))==V||j==W))return ya in d?Ja(r,d):La.call(r,d);g=d,o=Fa(e,b);var p=d.byteLength;if(f===c){if(p%b)throw S(Aa);if(h=p-o,h<0)throw S(Aa)}else if(h=q(f)*b,h+o>p)throw S(Aa);i=h/b}else i=Ea(d,!0),h=i*b,g=new $(h);for(n(a,"_d",{b:g,o:o,l:h,e:i,v:new _(g)});m1?arguments[1]:c)}}),d(174)("includes")},function(a,b,c){var d=c(6),e=c(120)(!0);d(d.P,"String",{at:function at(a){return e(this,a)}})},function(a,b,d){var e=d(6),f=d(232);e(e.P,"String",{padStart:function padStart(a){return f(this,a,arguments.length>1?arguments[1]:c,!0)}})},function(a,b,d){var e=d(35),f=d(78),g=d(33);a.exports=function(a,b,d,h){var i=String(g(a)),j=i.length,k=d===c?" ":String(d),l=e(b);if(l<=j||""==k)return i;var m=l-j,n=f.call(k,Math.ceil(m/k.length));return n.length>m&&(n=n.slice(0,m)),h?n+i:i+n}},function(a,b,d){var e=d(6),f=d(232);e(e.P,"String",{padEnd:function padEnd(a){return f(this,a,arguments.length>1?arguments[1]:c,!1)}})},function(a,b,c){c(90)("trimLeft",function(a){return function trimLeft(){return a(this,1)}},"trimStart")},function(a,b,c){c(90)("trimRight",function(a){return function trimRight(){return a(this,2)}},"trimEnd")},function(a,b,c){var d=c(6),e=c(33),f=c(35),g=c(123),h=c(237),i=RegExp.prototype,j=function(a,b){this._r=a,this._s=b};c(131)(j,"RegExp String",function next(){var a=this._r.exec(this._s);return{value:a,done:null===a}}),d(d.P,"String",{matchAll:function matchAll(a){if(e(this),!g(a))throw TypeError(a+" is not a regexp!");var b=String(this),c="flags"in i?String(a.flags):h.call(a),d=new RegExp(a.source,~c.indexOf("g")?c:"g"+c); +return d.lastIndex=f(a.lastIndex),new j(d,b)}})},function(a,b,c){var d=c(12);a.exports=function(){var a=d(this),b="";return a.global&&(b+="g"),a.ignoreCase&&(b+="i"),a.multiline&&(b+="m"),a.unicode&&(b+="u"),a.sticky&&(b+="y"),b}},function(a,b,c){c(25)("asyncIterator")},function(a,b,c){c(25)("observable")},function(a,b,c){var d=c(6),e=c(208),f=c(30),g=c(49),h=c(150);d(d.S,"Object",{getOwnPropertyDescriptors:function getOwnPropertyDescriptors(a){for(var b,c=f(a),d=g.f,i=e(c),j={},k=0;i.length>k;)h(j,b=i[k++],d(c,b));return j}})},function(a,b,c){var d=c(6),e=c(242)(!1);d(d.S,"Object",{values:function values(a){return e(a)}})},function(a,b,c){var d=c(28),e=c(30),f=c(42).f;a.exports=function(a){return function(b){for(var c,g=e(b),h=d(g),i=h.length,j=0,k=[];i>j;)f.call(g,c=h[j++])&&k.push(a?[c,g[c]]:g[c]);return k}}},function(a,b,c){var d=c(6),e=c(242)(!0);d(d.S,"Object",{entries:function entries(a){return e(a)}})},function(a,b,c){var d=c(6),e=c(56),f=c(9),g=c(11);c(4)&&d(d.P+c(245),"Object",{__defineGetter__:function __defineGetter__(a,b){g.f(e(this),a,{get:f(b),enumerable:!0,configurable:!0})}})},function(a,b,c){a.exports=c(26)||!c(5)(function(){var a=Math.random();__defineSetter__.call(null,a,function(){}),delete c(2)[a]})},function(a,b,c){var d=c(6),e=c(56),f=c(9),g=c(11);c(4)&&d(d.P+c(245),"Object",{__defineSetter__:function __defineSetter__(a,b){g.f(e(this),a,{set:f(b),enumerable:!0,configurable:!0})}})},function(a,b,c){var d=c(6),e=c(56),f=c(16),g=c(57),h=c(49).f;c(4)&&d(d.P+c(245),"Object",{__lookupGetter__:function __lookupGetter__(a){var b,c=e(this),d=f(a,!0);do if(b=h(c,d))return b.get;while(c=g(c))}})},function(a,b,c){var d=c(6),e=c(56),f=c(16),g=c(57),h=c(49).f;c(4)&&d(d.P+c(245),"Object",{__lookupSetter__:function __lookupSetter__(a){var b,c=e(this),d=f(a,!0);do if(b=h(c,d))return b.set;while(c=g(c))}})},function(a,b,c){var d=c(6);d(d.P+d.R,"Map",{toJSON:c(250)("Map")})},function(a,b,c){var d=c(152),e=c(251);a.exports=function(a){return function toJSON(){if(d(this)!=a)throw TypeError(a+"#toJSON isn't generic");return e(this)}}},function(a,b,c){var d=c(185);a.exports=function(a,b){var c=[];return d(a,!1,c.push,c,b),c}},function(a,b,c){var d=c(6);d(d.P+d.R,"Set",{toJSON:c(250)("Set")})},function(a,b,c){var d=c(6);d(d.S,"System",{global:c(2)})},function(a,b,c){var d=c(6),e=c(32);d(d.S,"Error",{isError:function isError(a){return"Error"===e(a)}})},function(a,b,c){var d=c(6);d(d.S,"Math",{iaddh:function iaddh(a,b,c,d){var e=a>>>0,f=b>>>0,g=c>>>0;return f+(d>>>0)+((e&g|(e|g)&~(e+g>>>0))>>>31)|0}})},function(a,b,c){var d=c(6);d(d.S,"Math",{isubh:function isubh(a,b,c,d){var e=a>>>0,f=b>>>0,g=c>>>0;return f-(d>>>0)-((~e&g|~(e^g)&e-g>>>0)>>>31)|0}})},function(a,b,c){var d=c(6);d(d.S,"Math",{imulh:function imulh(a,b){var c=65535,d=+a,e=+b,f=d&c,g=e&c,h=d>>16,i=e>>16,j=(h*g>>>0)+(f*g>>>16);return h*i+(j>>16)+((f*i>>>0)+(j&c)>>16)}})},function(a,b,c){var d=c(6);d(d.S,"Math",{umulh:function umulh(a,b){var c=65535,d=+a,e=+b,f=d&c,g=e&c,h=d>>>16,i=e>>>16,j=(h*g>>>0)+(f*g>>>16);return h*i+(j>>>16)+((f*i>>>0)+(j&c)>>>16)}})},function(a,b,c){var d=c(260),e=c(12),f=d.key,g=d.set;d.exp({defineMetadata:function defineMetadata(a,b,c,d){g(a,b,e(c),f(d))}})},function(a,b,d){var e=d(190),f=d(6),g=d(21)("metadata"),h=g.store||(g.store=new(d(194))),i=function(a,b,d){var f=h.get(a);if(!f){if(!d)return c;h.set(a,f=new e)}var g=f.get(b);if(!g){if(!d)return c;f.set(b,g=new e)}return g},j=function(a,b,d){var e=i(b,d,!1);return e!==c&&e.has(a)},k=function(a,b,d){var e=i(b,d,!1);return e===c?c:e.get(a)},l=function(a,b,c,d){i(c,d,!0).set(a,b)},m=function(a,b){var c=i(a,b,!1),d=[];return c&&c.forEach(function(a,b){d.push(b)}),d},n=function(a){return a===c||"symbol"==typeof a?a:String(a)},o=function(a){f(f.S,"Reflect",a)};a.exports={store:h,map:i,has:j,get:k,set:l,keys:m,key:n,exp:o}},function(a,b,d){var e=d(260),f=d(12),g=e.key,h=e.map,i=e.store;e.exp({deleteMetadata:function deleteMetadata(a,b){var d=arguments.length<3?c:g(arguments[2]),e=h(f(b),d,!1);if(e===c||!e["delete"](a))return!1;if(e.size)return!0;var j=i.get(b);return j["delete"](d),!!j.size||i["delete"](b)}})},function(a,b,d){var e=d(260),f=d(12),g=d(57),h=e.has,i=e.get,j=e.key,k=function(a,b,d){var e=h(a,b,d);if(e)return i(a,b,d);var f=g(b);return null!==f?k(a,f,d):c};e.exp({getMetadata:function getMetadata(a,b){return k(a,f(b),arguments.length<3?c:j(arguments[2]))}})},function(a,b,d){var e=d(193),f=d(251),g=d(260),h=d(12),i=d(57),j=g.keys,k=g.key,l=function(a,b){var c=j(a,b),d=i(a);if(null===d)return c;var g=l(d,b);return g.length?c.length?f(new e(c.concat(g))):g:c};g.exp({getMetadataKeys:function getMetadataKeys(a){return l(h(a),arguments.length<2?c:k(arguments[1]))}})},function(a,b,d){var e=d(260),f=d(12),g=e.get,h=e.key;e.exp({getOwnMetadata:function getOwnMetadata(a,b){return g(a,f(b),arguments.length<3?c:h(arguments[2]))}})},function(a,b,d){var e=d(260),f=d(12),g=e.keys,h=e.key;e.exp({getOwnMetadataKeys:function getOwnMetadataKeys(a){return g(f(a),arguments.length<2?c:h(arguments[1]))}})},function(a,b,d){var e=d(260),f=d(12),g=d(57),h=e.has,i=e.key,j=function(a,b,c){var d=h(a,b,c);if(d)return!0;var e=g(b);return null!==e&&j(a,e,c)};e.exp({hasMetadata:function hasMetadata(a,b){return j(a,f(b),arguments.length<3?c:i(arguments[2]))}})},function(a,b,d){var e=d(260),f=d(12),g=e.has,h=e.key;e.exp({hasOwnMetadata:function hasOwnMetadata(a,b){return g(a,f(b),arguments.length<3?c:h(arguments[2]))}})},function(a,b,d){var e=d(260),f=d(12),g=d(9),h=e.key,i=e.set;e.exp({metadata:function metadata(a,b){return function decorator(d,e){i(a,b,(e!==c?f:g)(d),h(e))}}})},function(a,b,c){var d=c(6),e=c(188)(),f=c(2).process,g="process"==c(32)(f);d(d.G,{asap:function asap(a){var b=g&&f.domain;e(b?b.bind(a):a)}})},function(a,b,d){var e=d(6),f=d(2),g=d(7),h=d(188)(),i=d(23)("observable"),j=d(9),k=d(12),l=d(184),m=d(189),n=d(10),o=d(185),p=o.RETURN,q=function(a){return null==a?c:j(a)},r=function(a){var b=a._c;b&&(a._c=c,b())},s=function(a){return a._o===c},t=function(a){s(a)||(a._o=c,r(a))},u=function(a,b){k(a),this._c=c,this._o=a,a=new v(this);try{var d=b(a),e=d;null!=d&&("function"==typeof d.unsubscribe?d=function(){e.unsubscribe()}:j(d),this._c=d)}catch(f){return void a.error(f)}s(this)&&r(this)};u.prototype=m({},{unsubscribe:function unsubscribe(){t(this)}});var v=function(a){this._s=a};v.prototype=m({},{next:function next(a){var b=this._s;if(!s(b)){var c=b._o;try{var d=q(c.next);if(d)return d.call(c,a)}catch(e){try{t(b)}finally{throw e}}}},error:function error(a){var b=this._s;if(s(b))throw a;var d=b._o;b._o=c;try{var e=q(d.error);if(!e)throw a;a=e.call(d,a)}catch(f){try{r(b)}finally{throw f}}return r(b),a},complete:function complete(a){var b=this._s;if(!s(b)){var d=b._o;b._o=c;try{var e=q(d.complete);a=e?e.call(d,a):c}catch(f){try{r(b)}finally{throw f}}return r(b),a}}});var w=function Observable(a){l(this,w,"Observable","_f")._f=j(a)};m(w.prototype,{subscribe:function subscribe(a){return new u(a,this._f)},forEach:function forEach(a){var b=this;return new(g.Promise||f.Promise)(function(c,d){j(a);var e=b.subscribe({next:function(b){try{return a(b)}catch(c){d(c),e.unsubscribe()}},error:d,complete:c})})}}),m(w,{from:function from(a){var b="function"==typeof this?this:w,c=q(k(a)[i]);if(c){var d=k(c.call(a));return d.constructor===b?d:new b(function(a){return d.subscribe(a)})}return new b(function(b){var c=!1;return h(function(){if(!c){try{if(o(a,!1,function(a){if(b.next(a),c)return p})===p)return}catch(d){if(c)throw d;return void b.error(d)}b.complete()}}),function(){c=!0}})},of:function of(){for(var a=0,b=arguments.length,c=Array(b);ag;)(c[g]=arguments[g++])===h&&(i=!0);return function(){var d,f=this,g=arguments.length,j=0,k=0;if(!i&&!g)return e(a,c,f);if(d=c.slice(),i)for(;b>j;j++)d[j]===h&&(d[j]=arguments[k++]);for(;g>k;)d.push(arguments[k++]);return e(a,d,f)}}},function(a,b,c){a.exports=c(7)},function(a,b,d){function Dict(a){var b=i(null);return a!=c&&(p(a)?o(a,!0,function(a,c){b[a]=c}):h(b,a)),b}function reduce(a,b,c){n(b);var d,e,f=t(a),g=k(f),h=g.length,i=0;if(arguments.length<3){if(!h)throw TypeError("Reduce of empty object with no initial value");d=f[g[i++]]}else d=Object(c);for(;h>i;)v(f,e=g[i++])&&(d=b(d,f[e],e,a));return d}function includes(a,b){return(b==b?m(a,b):x(a,function(a){return a!=a}))!==c}function get(a,b){if(v(a,b))return a[b]}function set(a,b,c){return u&&b in Object?l.f(a,b,g(0,c)):a[b]=c,a}function isDict(a){return s(a)&&j(a)===Dict.prototype}var e=d(8),f=d(6),g=d(17),h=d(67),i=d(44),j=d(57),k=d(28),l=d(11),m=d(27),n=d(9),o=d(185),p=d(277),q=d(131),r=d(180),s=d(13),t=d(30),u=d(4),v=d(3),w=function(a){var b=1==a,d=4==a;return function(f,g,h){var i,j,k,l=e(g,h,3),m=t(f),n=b||7==a||2==a?new("function"==typeof this?this:Dict):c;for(i in m)if(v(m,i)&&(j=m[i],k=l(j,i,f),a))if(b)n[i]=k;else if(k)switch(a){case 2:n[i]=j;break;case 3:return!0;case 5:return j;case 6:return i;case 7:n[k[0]]=k[1]}else if(d)return!1;return 3==a||d?d:n}},x=w(6),y=function(a){return function(b){return new z(b,a)}},z=function(a,b){this._t=t(a),this._a=k(a),this._i=0,this._k=b};q(z,"Dict",function(){var a,b=this,d=b._t,e=b._a,f=b._k;do if(b._i>=e.length)return b._t=c,r(1);while(!v(d,a=e[b._i++]));return"keys"==f?r(0,a):"values"==f?r(0,d[a]):r(0,[a,d[a]])}),Dict.prototype=null,f(f.G+f.F,{Dict:Dict}),f(f.S,"Dict",{keys:y("keys"),values:y("values"),entries:y("entries"),forEach:w(0),map:w(1),filter:w(2),some:w(3),every:w(4),find:w(5),findKey:x,mapPairs:w(7),reduce:reduce,keyOf:m,includes:includes,has:v,get:get,set:set,isDict:isDict})},function(a,b,d){var e=d(152),f=d(23)("iterator"),g=d(130);a.exports=d(7).isIterable=function(a){var b=Object(a);return b[f]!==c||"@@iterator"in b||g.hasOwnProperty(e(b))}},function(a,b,c){var d=c(12),e=c(151);a.exports=c(7).getIterator=function(a){var b=e(a);if("function"!=typeof b)throw TypeError(a+" is not iterable!");return d(b.call(a))}},function(a,b,c){var d=c(2),e=c(7),f=c(6),g=c(274);f(f.G+f.F,{delay:function delay(a){return new(e.Promise||d.Promise)(function(b){setTimeout(g.call(b,!0),a)})}})},function(a,b,c){var d=c(275),e=c(6);c(7)._=d._=d._||{},e(e.P+e.F,"Function",{part:c(274)})},function(a,b,c){var d=c(6);d(d.S+d.F,"Object",{isObject:c(13)})},function(a,b,c){var d=c(6);d(d.S+d.F,"Object",{classof:c(152)})},function(a,b,c){var d=c(6),e=c(284);d(d.S+d.F,"Object",{define:e})},function(a,b,c){var d=c(11),e=c(49),f=c(208),g=c(30);a.exports=function define(a,b){for(var c,h=f(g(b)),i=h.length,j=0;i>j;)d.f(a,c=h[j++],e.f(b,c));return a}},function(a,b,c){var d=c(6),e=c(284),f=c(44);d(d.S+d.F,"Object",{make:function(a,b){return e(f(a),b)}})},function(a,b,d){d(129)(Number,"Number",function(a){this._l=+a,this._i=0},function(){var a=this._i++,b=!(a"']/g,{"&":"&","<":"<",">":">",'"':""","'":"'"});d(d.P+d.F,"String",{escapeHTML:function escapeHTML(){return e(this)}})},function(a,b,c){var d=c(6),e=c(288)(/&(?:amp|lt|gt|quot|apos);/g,{"&":"&","<":"<",">":">",""":'"',"'":"'"});d(d.P+d.F,"String",{unescapeHTML:function unescapeHTML(){return e(this)}})}]),"undefined"!=typeof module&&module.exports?module.exports=a:"function"==typeof define&&define.amd?define(function(){return a}):b.core=a}(1,1); +//# sourceMappingURL=library.min.js.map \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/client/library.min.js.map b/pitfall/pdfkit/node_modules/core-js/client/library.min.js.map new file mode 100644 index 00000000..d62fab82 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/client/library.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["library.js"],"names":["__e","__g","undefined","modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","global","has","DESCRIPTORS","$export","redefine","META","KEY","$fails","shared","setToStringTag","uid","wks","wksExt","wksDefine","keyOf","enumKeys","isArray","anObject","toIObject","toPrimitive","createDesc","_create","gOPNExt","$GOPD","$DP","$keys","gOPD","f","dP","gOPN","$Symbol","Symbol","$JSON","JSON","_stringify","stringify","PROTOTYPE","HIDDEN","TO_PRIMITIVE","isEnum","propertyIsEnumerable","SymbolRegistry","AllSymbols","OPSymbols","ObjectProto","Object","USE_NATIVE","QObject","setter","findChild","setSymbolDesc","get","this","value","a","it","key","D","protoDesc","wrap","tag","sym","_k","isSymbol","iterator","$defineProperty","defineProperty","enumerable","$defineProperties","defineProperties","P","keys","i","l","length","$create","create","$propertyIsEnumerable","E","$getOwnPropertyDescriptor","getOwnPropertyDescriptor","$getOwnPropertyNames","getOwnPropertyNames","names","result","push","$getOwnPropertySymbols","getOwnPropertySymbols","IS_OP","TypeError","arguments","$set","configurable","set","toString","name","G","W","F","symbols","split","store","S","for","keyFor","useSetter","useSimple","replacer","$replacer","args","apply","valueOf","Math","window","self","Function","hasOwnProperty","exec","e","core","ctx","hide","type","source","own","out","IS_FORCED","IS_GLOBAL","IS_STATIC","IS_PROTO","IS_BIND","B","IS_WRAP","expProto","target","C","b","virtual","R","U","version","aFunction","fn","that","object","IE8_DOM_DEFINE","O","Attributes","isObject","document","is","createElement","val","bitmap","writable","setDesc","isExtensible","FREEZE","preventExtensions","setMeta","w","fastKey","getWeak","onFreeze","meta","NEED","px","random","concat","SHARED","def","TAG","stat","prototype","USE_SYMBOL","$exports","LIBRARY","charAt","getKeys","el","index","enumBugKeys","arrayIndexOf","IE_PROTO","IObject","defined","cof","slice","toLength","toIndex","IS_INCLUDES","$this","fromIndex","toInteger","min","ceil","floor","isNaN","max","gOPS","pIE","getSymbols","Array","arg","dPs","Empty","createDict","iframeDocument","iframe","lt","gt","style","display","appendChild","src","contentWindow","open","write","close","Properties","documentElement","windowNames","getWindowNames","hiddenKeys","fails","exp","toObject","$getPrototypeOf","getPrototypeOf","constructor","$freeze","freeze","$seal","seal","$preventExtensions","$isFrozen","isFrozen","$isSealed","isSealed","$isExtensible","assign","$assign","A","K","forEach","k","join","T","aLen","j","x","y","setPrototypeOf","check","proto","test","buggy","__proto__","bind","invoke","arraySlice","factories","construct","len","n","partArgs","bound","un","HAS_INSTANCE","FunctionProto","aNumberValue","repeat","$toFixed","toFixed","data","ERROR","ZERO","multiply","c2","divide","numToString","s","t","String","pow","acc","log","x2","fractionDigits","z","RangeError","msg","count","str","res","Infinity","$toPrecision","toPrecision","precision","EPSILON","_isFinite","isFinite","isInteger","number","abs","isSafeInteger","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","$parseFloat","Number","parseFloat","$trim","trim","string","spaces","space","non","ltrim","RegExp","rtrim","exporter","ALIAS","FORCE","TYPE","replace","$parseInt","parseInt","ws","hex","radix","log1p","sqrt","$acosh","acosh","MAX_VALUE","NaN","LN2","asinh","$asinh","$atanh","atanh","sign","cbrt","clz32","LOG2E","cosh","$expm1","expm1","EPSILON32","MAX32","MIN32","roundTiesToEven","fround","$abs","$sign","hypot","value1","value2","div","sum","larg","$imul","imul","UINT16","xn","yn","xl","yl","log10","LN10","log2","sinh","tanh","trunc","fromCharCode","$fromCodePoint","fromCodePoint","code","raw","callSite","tpl","$at","codePointAt","pos","TO_STRING","charCodeAt","context","ENDS_WITH","$endsWith","endsWith","searchString","endPosition","end","search","isRegExp","NAME","MATCH","re","INCLUDES","includes","indexOf","STARTS_WITH","$startsWith","startsWith","iterated","_t","_i","point","done","Iterators","$iterCreate","ITERATOR","BUGGY","FF_ITERATOR","KEYS","VALUES","returnThis","Base","Constructor","next","DEFAULT","IS_SET","FORCED","methods","IteratorPrototype","getMethod","kind","values","entries","DEF_VALUES","VALUES_BUG","$native","$default","$entries","$anyNative","descriptor","createHTML","anchor","quot","attribute","p1","toLowerCase","big","blink","bold","fixed","fontcolor","color","fontsize","size","italics","link","url","small","strike","sub","sup","isArrayIter","createProperty","getIterFn","iter","from","arrayLike","step","mapfn","mapping","iterFn","ret","ArrayProto","classof","getIteratorMethod","ARG","tryGet","callee","SAFE_CLOSING","riter","skipClosing","safe","arr","of","arrayJoin","separator","method","html","begin","klass","start","upTo","cloned","$sort","sort","comparefn","$forEach","STRICT","callbackfn","asc","IS_MAP","IS_FILTER","IS_SOME","IS_EVERY","IS_FIND_INDEX","NO_HOLES","speciesConstructor","original","SPECIES","$map","map","$filter","filter","$some","some","$every","every","$reduce","reduce","memo","isRight","reduceRight","$indexOf","NEGATIVE_ZERO","searchElement","lastIndexOf","copyWithin","to","inc","fill","endPos","$find","forced","find","findIndex","addToUnscopables","Arguments","Internal","GenericPromiseCapability","Wrapper","anInstance","forOf","task","microtask","PROMISE","process","$Promise","isNode","empty","promise","resolve","FakePromise","PromiseRejectionEvent","then","sameConstructor","isThenable","newPromiseCapability","PromiseCapability","reject","$$resolve","$$reject","perform","error","notify","isReject","_n","chain","_c","_v","ok","_s","run","reaction","handler","fail","domain","_h","onHandleUnhandled","enter","exit","onUnhandled","abrupt","console","isUnhandled","emit","onunhandledrejection","reason","_a","onrejectionhandled","$reject","_d","_w","$resolve","wrapper","Promise","executor","err","onFulfilled","onRejected","catch","r","capability","all","iterable","remaining","$index","alreadyCalled","race","forbiddenField","BREAK","RETURN","defer","channel","port","cel","setTask","setImmediate","clearTask","clearImmediate","MessageChannel","counter","queue","ONREADYSTATECHANGE","listener","event","nextTick","port2","port1","onmessage","postMessage","addEventListener","importScripts","removeChild","setTimeout","clear","macrotask","Observer","MutationObserver","WebKitMutationObserver","head","last","flush","parent","toggle","node","createTextNode","observe","characterData","strong","Map","entry","getEntry","v","redefineAll","$iterDefine","setSpecies","SIZE","_f","getConstructor","ADDER","_l","delete","prev","setStrong","each","common","IS_WEAK","IS_ADDER","Set","add","InternalMap","weak","uncaughtFrozenStore","ufstore","tmp","WeakMap","$WeakMap","createArrayMethod","$has","arrayFind","arrayFindIndex","UncaughtFrozenStore","findUncaughtFrozen","splice","WeakSet","rApply","Reflect","fApply","thisArgument","argumentsList","L","rConstruct","NEW_TARGET_BUG","ARGS_BUG","Target","newTarget","$args","instance","propertyKey","attributes","deleteProperty","desc","Enumerate","enumerate","receiver","getProto","ownKeys","V","existingDescriptor","ownDesc","setProto","now","Date","getTime","toJSON","toISOString","pv","lz","num","d","getUTCFullYear","getUTCMilliseconds","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","$typed","buffer","ArrayBuffer","$ArrayBuffer","$DataView","DataView","$isView","ABV","isView","$slice","VIEW","ARRAY_BUFFER","CONSTR","byteLength","first","final","viewS","viewT","setUint8","getUint8","Typed","TYPED","TypedArrayConstructors","arrayFill","DATA_VIEW","WRONG_LENGTH","WRONG_INDEX","BaseBuffer","BUFFER","BYTE_LENGTH","BYTE_OFFSET","$BUFFER","$LENGTH","$OFFSET","packIEEE754","mLen","nBytes","eLen","eMax","eBias","rt","unpackIEEE754","nBits","unpackI32","bytes","packI8","packI16","packI32","packF64","packF32","addGetter","internal","view","isLittleEndian","numIndex","intIndex","_b","pack","reverse","conversion","validateArrayBufferArguments","numberLength","ArrayBufferProto","$setInt8","setInt8","getInt8","byteOffset","bufferLength","offset","getInt16","getUint16","getInt32","getUint32","getFloat32","getFloat64","setInt16","setUint16","setInt32","setUint32","setFloat32","setFloat64","init","Int8Array","$buffer","propertyDesc","same","createArrayIncludes","ArrayIterators","$iterDetect","arrayCopyWithin","Uint8Array","SHARED_BUFFER","BYTES_PER_ELEMENT","arrayForEach","arrayFilter","arraySome","arrayEvery","arrayIncludes","arrayValues","arrayKeys","arrayEntries","arrayLastIndexOf","arrayReduce","arrayReduceRight","arraySort","arrayToString","arrayToLocaleString","toLocaleString","TYPED_CONSTRUCTOR","DEF_CONSTRUCTOR","ALL_CONSTRUCTORS","TYPED_ARRAY","allocate","LITTLE_ENDIAN","Uint16Array","FORCED_SET","strictToLength","SAME","toOffset","BYTES","validate","speciesFromList","list","fromList","$from","$of","TO_LOCALE_BUG","$toLocaleString","predicate","middle","subarray","$begin","$iterators","isTAIndex","$getDesc","$setDesc","$TypedArrayPrototype$","CLAMPED","ISNT_UINT8","GETTER","SETTER","TypedArray","TAC","TypedArrayPrototype","getter","o","round","addElement","$offset","$length","$len","$nativeIterator","CORRECT_ITER_NAME","$iterator","Uint8ClampedArray","Int16Array","Int32Array","Uint32Array","Float32Array","Float64Array","$includes","at","$pad","padStart","maxLength","fillString","left","stringLength","fillStr","intMaxLength","fillLen","stringFiller","padEnd","trimLeft","trimRight","getFlags","RegExpProto","$RegExpStringIterator","regexp","_r","match","matchAll","flags","rx","lastIndex","ignoreCase","multiline","unicode","sticky","getOwnPropertyDescriptors","getDesc","$values","isEntries","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__","isError","iaddh","x0","x1","y0","y1","$x0","$x1","$y0","isubh","imulh","u","$u","$v","u0","v0","u1","v1","umulh","metadata","toMetaKey","ordinaryDefineOwnMetadata","defineMetadata","metadataKey","metadataValue","targetKey","getOrCreateMetadataMap","targetMetadata","keyMetadata","ordinaryHasOwnMetadata","MetadataKey","metadataMap","ordinaryGetOwnMetadata","MetadataValue","ordinaryOwnMetadataKeys","_","deleteMetadata","ordinaryGetMetadata","hasOwn","getMetadata","ordinaryMetadataKeys","oKeys","pKeys","getMetadataKeys","getOwnMetadata","getOwnMetadataKeys","ordinaryHasMetadata","hasMetadata","hasOwnMetadata","decorator","asap","OBSERVABLE","cleanupSubscription","subscription","cleanup","subscriptionClosed","_o","closeSubscription","Subscription","observer","subscriber","SubscriptionObserver","unsubscribe","complete","$Observable","Observable","subscribe","observable","items","$task","TO_STRING_TAG","collections","Collection","partial","navigator","MSIE","userAgent","time","setInterval","path","pargs","holder","Dict","dict","isIterable","findKey","isDict","createDictMethod","createDictIter","DictIterator","mapPairs","getIterator","delay","part","define","mixin","make","$re","escape","regExp","&","<",">","\"","'","escapeHTML","&","<",">",""","'","unescapeHTML","amd"],"mappings":";;;;;;CAMC,SAASA,EAAKC,EAAKC,GACpB,cACS,SAAUC,GAKT,QAASC,qBAAoBC,GAG5B,GAAGC,EAAiBD,GACnB,MAAOC,GAAiBD,GAAUE,OAGnC,IAAIC,GAASF,EAAiBD,IAC7BE,WACAE,GAAIJ,EACJK,QAAQ,EAUT,OANAP,GAAQE,GAAUM,KAAKH,EAAOD,QAASC,EAAQA,EAAOD,QAASH,qBAG/DI,EAAOE,QAAS,EAGTF,EAAOD,QAvBf,GAAID,KAqCJ,OATAF,qBAAoBQ,EAAIT,EAGxBC,oBAAoBS,EAAIP,EAGxBF,oBAAoBU,EAAI,GAGjBV,oBAAoB,KAK/B,SAASI,EAAQD,EAASH,GAE/BA,EAAoB,GACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,K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","file":"library.min.js"} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/client/shim.js b/pitfall/pdfkit/node_modules/core-js/client/shim.js new file mode 100644 index 00000000..2947f937 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/client/shim.js @@ -0,0 +1,7258 @@ +/** + * core-js 2.4.1 + * https://github.com/zloirock/core-js + * License: http://rock.mit-license.org + * © 2016 Denis Pushkarev + */ +!function(__e, __g, undefined){ +'use strict'; +/******/ (function(modules) { // webpackBootstrap +/******/ // The module cache +/******/ var installedModules = {}; + +/******/ // The require function +/******/ function __webpack_require__(moduleId) { + +/******/ // Check if module is in cache +/******/ if(installedModules[moduleId]) +/******/ return installedModules[moduleId].exports; + +/******/ // Create a new module (and put it into the cache) +/******/ var module = installedModules[moduleId] = { +/******/ exports: {}, +/******/ id: moduleId, +/******/ loaded: false +/******/ }; + +/******/ // Execute the module function +/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); + +/******/ // Flag the module as loaded +/******/ module.loaded = true; + +/******/ // Return the exports of the module +/******/ return module.exports; +/******/ } + + +/******/ // expose the modules object (__webpack_modules__) +/******/ __webpack_require__.m = modules; + +/******/ // expose the module cache +/******/ __webpack_require__.c = installedModules; + +/******/ // __webpack_public_path__ +/******/ __webpack_require__.p = ""; + +/******/ // Load entry module and return exports +/******/ return __webpack_require__(0); +/******/ }) +/************************************************************************/ +/******/ ([ +/* 0 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(1); + __webpack_require__(50); + __webpack_require__(51); + __webpack_require__(52); + __webpack_require__(54); + __webpack_require__(55); + __webpack_require__(58); + __webpack_require__(59); + __webpack_require__(60); + __webpack_require__(61); + __webpack_require__(62); + __webpack_require__(63); + __webpack_require__(64); + __webpack_require__(65); + __webpack_require__(66); + __webpack_require__(68); + __webpack_require__(70); + __webpack_require__(72); + __webpack_require__(74); + __webpack_require__(77); + __webpack_require__(78); + __webpack_require__(79); + __webpack_require__(83); + __webpack_require__(86); + __webpack_require__(87); + __webpack_require__(88); + __webpack_require__(89); + __webpack_require__(91); + __webpack_require__(92); + __webpack_require__(93); + __webpack_require__(94); + __webpack_require__(95); + __webpack_require__(97); + __webpack_require__(99); + __webpack_require__(100); + __webpack_require__(101); + __webpack_require__(103); + __webpack_require__(104); + __webpack_require__(105); + __webpack_require__(107); + __webpack_require__(108); + __webpack_require__(109); + __webpack_require__(111); + __webpack_require__(112); + __webpack_require__(113); + __webpack_require__(114); + __webpack_require__(115); + __webpack_require__(116); + __webpack_require__(117); + __webpack_require__(118); + __webpack_require__(119); + __webpack_require__(120); + __webpack_require__(121); + __webpack_require__(122); + __webpack_require__(123); + __webpack_require__(124); + __webpack_require__(126); + __webpack_require__(130); + __webpack_require__(131); + __webpack_require__(132); + __webpack_require__(133); + __webpack_require__(137); + __webpack_require__(139); + __webpack_require__(140); + __webpack_require__(141); + __webpack_require__(142); + __webpack_require__(143); + __webpack_require__(144); + __webpack_require__(145); + __webpack_require__(146); + __webpack_require__(147); + __webpack_require__(148); + __webpack_require__(149); + __webpack_require__(150); + __webpack_require__(151); + __webpack_require__(152); + __webpack_require__(158); + __webpack_require__(159); + __webpack_require__(161); + __webpack_require__(162); + __webpack_require__(163); + __webpack_require__(167); + __webpack_require__(168); + __webpack_require__(169); + __webpack_require__(170); + __webpack_require__(171); + __webpack_require__(173); + __webpack_require__(174); + __webpack_require__(175); + __webpack_require__(176); + __webpack_require__(179); + __webpack_require__(181); + __webpack_require__(182); + __webpack_require__(183); + __webpack_require__(185); + __webpack_require__(187); + __webpack_require__(189); + __webpack_require__(190); + __webpack_require__(191); + __webpack_require__(193); + __webpack_require__(194); + __webpack_require__(195); + __webpack_require__(196); + __webpack_require__(203); + __webpack_require__(206); + __webpack_require__(207); + __webpack_require__(209); + __webpack_require__(210); + __webpack_require__(211); + __webpack_require__(212); + __webpack_require__(213); + __webpack_require__(214); + __webpack_require__(215); + __webpack_require__(216); + __webpack_require__(217); + __webpack_require__(218); + __webpack_require__(219); + __webpack_require__(220); + __webpack_require__(222); + __webpack_require__(223); + __webpack_require__(224); + __webpack_require__(225); + __webpack_require__(226); + __webpack_require__(227); + __webpack_require__(228); + __webpack_require__(229); + __webpack_require__(231); + __webpack_require__(234); + __webpack_require__(235); + __webpack_require__(237); + __webpack_require__(238); + __webpack_require__(239); + __webpack_require__(240); + __webpack_require__(241); + __webpack_require__(242); + __webpack_require__(243); + __webpack_require__(244); + __webpack_require__(245); + __webpack_require__(246); + __webpack_require__(247); + __webpack_require__(249); + __webpack_require__(250); + __webpack_require__(251); + __webpack_require__(252); + __webpack_require__(253); + __webpack_require__(254); + __webpack_require__(255); + __webpack_require__(256); + __webpack_require__(258); + __webpack_require__(259); + __webpack_require__(261); + __webpack_require__(262); + __webpack_require__(263); + __webpack_require__(264); + __webpack_require__(267); + __webpack_require__(268); + __webpack_require__(269); + __webpack_require__(270); + __webpack_require__(271); + __webpack_require__(272); + __webpack_require__(273); + __webpack_require__(274); + __webpack_require__(276); + __webpack_require__(277); + __webpack_require__(278); + __webpack_require__(279); + __webpack_require__(280); + __webpack_require__(281); + __webpack_require__(282); + __webpack_require__(283); + __webpack_require__(284); + __webpack_require__(285); + __webpack_require__(286); + __webpack_require__(287); + module.exports = __webpack_require__(288); + + +/***/ }, +/* 1 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // ECMAScript 6 symbols shim + var global = __webpack_require__(2) + , has = __webpack_require__(3) + , DESCRIPTORS = __webpack_require__(4) + , $export = __webpack_require__(6) + , redefine = __webpack_require__(16) + , META = __webpack_require__(20).KEY + , $fails = __webpack_require__(5) + , shared = __webpack_require__(21) + , setToStringTag = __webpack_require__(22) + , uid = __webpack_require__(17) + , wks = __webpack_require__(23) + , wksExt = __webpack_require__(24) + , wksDefine = __webpack_require__(25) + , keyOf = __webpack_require__(27) + , enumKeys = __webpack_require__(40) + , isArray = __webpack_require__(43) + , anObject = __webpack_require__(10) + , toIObject = __webpack_require__(30) + , toPrimitive = __webpack_require__(14) + , createDesc = __webpack_require__(15) + , _create = __webpack_require__(44) + , gOPNExt = __webpack_require__(47) + , $GOPD = __webpack_require__(49) + , $DP = __webpack_require__(9) + , $keys = __webpack_require__(28) + , gOPD = $GOPD.f + , dP = $DP.f + , gOPN = gOPNExt.f + , $Symbol = global.Symbol + , $JSON = global.JSON + , _stringify = $JSON && $JSON.stringify + , PROTOTYPE = 'prototype' + , HIDDEN = wks('_hidden') + , TO_PRIMITIVE = wks('toPrimitive') + , isEnum = {}.propertyIsEnumerable + , SymbolRegistry = shared('symbol-registry') + , AllSymbols = shared('symbols') + , OPSymbols = shared('op-symbols') + , ObjectProto = Object[PROTOTYPE] + , USE_NATIVE = typeof $Symbol == 'function' + , QObject = global.QObject; + // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 + var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + + // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 + var setSymbolDesc = DESCRIPTORS && $fails(function(){ + return _create(dP({}, 'a', { + get: function(){ return dP(this, 'a', {value: 7}).a; } + })).a != 7; + }) ? function(it, key, D){ + var protoDesc = gOPD(ObjectProto, key); + if(protoDesc)delete ObjectProto[key]; + dP(it, key, D); + if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc); + } : dP; + + var wrap = function(tag){ + var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); + sym._k = tag; + return sym; + }; + + var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){ + return typeof it == 'symbol'; + } : function(it){ + return it instanceof $Symbol; + }; + + var $defineProperty = function defineProperty(it, key, D){ + if(it === ObjectProto)$defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if(has(AllSymbols, key)){ + if(!D.enumerable){ + if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false; + D = _create(D, {enumerable: createDesc(0, false)}); + } return setSymbolDesc(it, key, D); + } return dP(it, key, D); + }; + var $defineProperties = function defineProperties(it, P){ + anObject(it); + var keys = enumKeys(P = toIObject(P)) + , i = 0 + , l = keys.length + , key; + while(l > i)$defineProperty(it, key = keys[i++], P[key]); + return it; + }; + var $create = function create(it, P){ + return P === undefined ? _create(it) : $defineProperties(_create(it), P); + }; + var $propertyIsEnumerable = function propertyIsEnumerable(key){ + var E = isEnum.call(this, key = toPrimitive(key, true)); + if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false; + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; + }; + var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){ + it = toIObject(it); + key = toPrimitive(key, true); + if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return; + var D = gOPD(it, key); + if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true; + return D; + }; + var $getOwnPropertyNames = function getOwnPropertyNames(it){ + var names = gOPN(toIObject(it)) + , result = [] + , i = 0 + , key; + while(names.length > i){ + if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key); + } return result; + }; + var $getOwnPropertySymbols = function getOwnPropertySymbols(it){ + var IS_OP = it === ObjectProto + , names = gOPN(IS_OP ? OPSymbols : toIObject(it)) + , result = [] + , i = 0 + , key; + while(names.length > i){ + if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]); + } return result; + }; + + // 19.4.1.1 Symbol([description]) + if(!USE_NATIVE){ + $Symbol = function Symbol(){ + if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function(value){ + if(this === ObjectProto)$set.call(OPSymbols, value); + if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set}); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString(){ + return this._k; + }); + + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + __webpack_require__(48).f = gOPNExt.f = $getOwnPropertyNames; + __webpack_require__(42).f = $propertyIsEnumerable; + __webpack_require__(41).f = $getOwnPropertySymbols; + + if(DESCRIPTORS && !__webpack_require__(26)){ + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + wksExt.f = function(name){ + return wrap(wks(name)); + } + } + + $export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol}); + + for(var symbols = ( + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' + ).split(','), i = 0; symbols.length > i; )wks(symbols[i++]); + + for(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]); + + $export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + 'for': function(key){ + return has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(key){ + if(isSymbol(key))return keyOf(SymbolRegistry, key); + throw TypeError(key + ' is not a symbol!'); + }, + useSetter: function(){ setter = true; }, + useSimple: function(){ setter = false; } + }); + + $export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols + }); + + // 24.3.2 JSON.stringify(value [, replacer [, space]]) + $JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){ + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}'; + })), 'JSON', { + stringify: function stringify(it){ + if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined + var args = [it] + , i = 1 + , replacer, $replacer; + while(arguments.length > i)args.push(arguments[i++]); + replacer = args[1]; + if(typeof replacer == 'function')$replacer = replacer; + if($replacer || !isArray(replacer))replacer = function(key, value){ + if($replacer)value = $replacer.call(this, key, value); + if(!isSymbol(value))return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + } + }); + + // 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) + $Symbol[PROTOTYPE][TO_PRIMITIVE] || __webpack_require__(8)($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); + // 19.4.3.5 Symbol.prototype[@@toStringTag] + setToStringTag($Symbol, 'Symbol'); + // 20.2.1.9 Math[@@toStringTag] + setToStringTag(Math, 'Math', true); + // 24.3.3 JSON[@@toStringTag] + setToStringTag(global.JSON, 'JSON', true); + +/***/ }, +/* 2 */ +/***/ function(module, exports) { + + // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 + var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); + if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef + +/***/ }, +/* 3 */ +/***/ function(module, exports) { + + var hasOwnProperty = {}.hasOwnProperty; + module.exports = function(it, key){ + return hasOwnProperty.call(it, key); + }; + +/***/ }, +/* 4 */ +/***/ function(module, exports, __webpack_require__) { + + // Thank's IE8 for his funny defineProperty + module.exports = !__webpack_require__(5)(function(){ + return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; + }); + +/***/ }, +/* 5 */ +/***/ function(module, exports) { + + module.exports = function(exec){ + try { + return !!exec(); + } catch(e){ + return true; + } + }; + +/***/ }, +/* 6 */ +/***/ function(module, exports, __webpack_require__) { + + var global = __webpack_require__(2) + , core = __webpack_require__(7) + , hide = __webpack_require__(8) + , redefine = __webpack_require__(16) + , ctx = __webpack_require__(18) + , PROTOTYPE = 'prototype'; + + var $export = function(type, name, source){ + var IS_FORCED = type & $export.F + , IS_GLOBAL = type & $export.G + , IS_STATIC = type & $export.S + , IS_PROTO = type & $export.P + , IS_BIND = type & $export.B + , target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE] + , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) + , expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}) + , key, own, out, exp; + if(IS_GLOBAL)source = name; + for(key in source){ + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + // export native or passed + out = (own ? target : source)[key]; + // bind timers to global for call from export context + exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // extend global + if(target)redefine(target, key, out, type & $export.U); + // export + if(exports[key] != out)hide(exports, key, exp); + if(IS_PROTO && expProto[key] != out)expProto[key] = out; + } + }; + global.core = core; + // type bitmap + $export.F = 1; // forced + $export.G = 2; // global + $export.S = 4; // static + $export.P = 8; // proto + $export.B = 16; // bind + $export.W = 32; // wrap + $export.U = 64; // safe + $export.R = 128; // real proto method for `library` + module.exports = $export; + +/***/ }, +/* 7 */ +/***/ function(module, exports) { + + var core = module.exports = {version: '2.4.0'}; + if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef + +/***/ }, +/* 8 */ +/***/ function(module, exports, __webpack_require__) { + + var dP = __webpack_require__(9) + , createDesc = __webpack_require__(15); + module.exports = __webpack_require__(4) ? function(object, key, value){ + return dP.f(object, key, createDesc(1, value)); + } : function(object, key, value){ + object[key] = value; + return object; + }; + +/***/ }, +/* 9 */ +/***/ function(module, exports, __webpack_require__) { + + var anObject = __webpack_require__(10) + , IE8_DOM_DEFINE = __webpack_require__(12) + , toPrimitive = __webpack_require__(14) + , dP = Object.defineProperty; + + exports.f = __webpack_require__(4) ? Object.defineProperty : function defineProperty(O, P, Attributes){ + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if(IE8_DOM_DEFINE)try { + return dP(O, P, Attributes); + } catch(e){ /* empty */ } + if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!'); + if('value' in Attributes)O[P] = Attributes.value; + return O; + }; + +/***/ }, +/* 10 */ +/***/ function(module, exports, __webpack_require__) { + + var isObject = __webpack_require__(11); + module.exports = function(it){ + if(!isObject(it))throw TypeError(it + ' is not an object!'); + return it; + }; + +/***/ }, +/* 11 */ +/***/ function(module, exports) { + + module.exports = function(it){ + return typeof it === 'object' ? it !== null : typeof it === 'function'; + }; + +/***/ }, +/* 12 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = !__webpack_require__(4) && !__webpack_require__(5)(function(){ + return Object.defineProperty(__webpack_require__(13)('div'), 'a', {get: function(){ return 7; }}).a != 7; + }); + +/***/ }, +/* 13 */ +/***/ function(module, exports, __webpack_require__) { + + var isObject = __webpack_require__(11) + , document = __webpack_require__(2).document + // in old IE typeof document.createElement is 'object' + , is = isObject(document) && isObject(document.createElement); + module.exports = function(it){ + return is ? document.createElement(it) : {}; + }; + +/***/ }, +/* 14 */ +/***/ function(module, exports, __webpack_require__) { + + // 7.1.1 ToPrimitive(input [, PreferredType]) + var isObject = __webpack_require__(11); + // instead of the ES6 spec version, we didn't implement @@toPrimitive case + // and the second argument - flag - preferred type is a string + module.exports = function(it, S){ + if(!isObject(it))return it; + var fn, val; + if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; + if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val; + if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; + throw TypeError("Can't convert object to primitive value"); + }; + +/***/ }, +/* 15 */ +/***/ function(module, exports) { + + module.exports = function(bitmap, value){ + return { + enumerable : !(bitmap & 1), + configurable: !(bitmap & 2), + writable : !(bitmap & 4), + value : value + }; + }; + +/***/ }, +/* 16 */ +/***/ function(module, exports, __webpack_require__) { + + var global = __webpack_require__(2) + , hide = __webpack_require__(8) + , has = __webpack_require__(3) + , SRC = __webpack_require__(17)('src') + , TO_STRING = 'toString' + , $toString = Function[TO_STRING] + , TPL = ('' + $toString).split(TO_STRING); + + __webpack_require__(7).inspectSource = function(it){ + return $toString.call(it); + }; + + (module.exports = function(O, key, val, safe){ + var isFunction = typeof val == 'function'; + if(isFunction)has(val, 'name') || hide(val, 'name', key); + if(O[key] === val)return; + if(isFunction)has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); + if(O === global){ + O[key] = val; + } else { + if(!safe){ + delete O[key]; + hide(O, key, val); + } else { + if(O[key])O[key] = val; + else hide(O, key, val); + } + } + // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative + })(Function.prototype, TO_STRING, function toString(){ + return typeof this == 'function' && this[SRC] || $toString.call(this); + }); + +/***/ }, +/* 17 */ +/***/ function(module, exports) { + + var id = 0 + , px = Math.random(); + module.exports = function(key){ + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); + }; + +/***/ }, +/* 18 */ +/***/ function(module, exports, __webpack_require__) { + + // optional / simple context binding + var aFunction = __webpack_require__(19); + module.exports = function(fn, that, length){ + aFunction(fn); + if(that === undefined)return fn; + switch(length){ + case 1: return function(a){ + return fn.call(that, a); + }; + case 2: return function(a, b){ + return fn.call(that, a, b); + }; + case 3: return function(a, b, c){ + return fn.call(that, a, b, c); + }; + } + return function(/* ...args */){ + return fn.apply(that, arguments); + }; + }; + +/***/ }, +/* 19 */ +/***/ function(module, exports) { + + module.exports = function(it){ + if(typeof it != 'function')throw TypeError(it + ' is not a function!'); + return it; + }; + +/***/ }, +/* 20 */ +/***/ function(module, exports, __webpack_require__) { + + var META = __webpack_require__(17)('meta') + , isObject = __webpack_require__(11) + , has = __webpack_require__(3) + , setDesc = __webpack_require__(9).f + , id = 0; + var isExtensible = Object.isExtensible || function(){ + return true; + }; + var FREEZE = !__webpack_require__(5)(function(){ + return isExtensible(Object.preventExtensions({})); + }); + var setMeta = function(it){ + setDesc(it, META, {value: { + i: 'O' + ++id, // object ID + w: {} // weak collections IDs + }}); + }; + var fastKey = function(it, create){ + // return primitive with prefix + if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if(!has(it, META)){ + // can't set metadata to uncaught frozen object + if(!isExtensible(it))return 'F'; + // not necessary to add metadata + if(!create)return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } return it[META].i; + }; + var getWeak = function(it, create){ + if(!has(it, META)){ + // can't set metadata to uncaught frozen object + if(!isExtensible(it))return true; + // not necessary to add metadata + if(!create)return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } return it[META].w; + }; + // add metadata on freeze-family methods calling + var onFreeze = function(it){ + if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it); + return it; + }; + var meta = module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze + }; + +/***/ }, +/* 21 */ +/***/ function(module, exports, __webpack_require__) { + + var global = __webpack_require__(2) + , SHARED = '__core-js_shared__' + , store = global[SHARED] || (global[SHARED] = {}); + module.exports = function(key){ + return store[key] || (store[key] = {}); + }; + +/***/ }, +/* 22 */ +/***/ function(module, exports, __webpack_require__) { + + var def = __webpack_require__(9).f + , has = __webpack_require__(3) + , TAG = __webpack_require__(23)('toStringTag'); + + module.exports = function(it, tag, stat){ + if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag}); + }; + +/***/ }, +/* 23 */ +/***/ function(module, exports, __webpack_require__) { + + var store = __webpack_require__(21)('wks') + , uid = __webpack_require__(17) + , Symbol = __webpack_require__(2).Symbol + , USE_SYMBOL = typeof Symbol == 'function'; + + var $exports = module.exports = function(name){ + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); + }; + + $exports.store = store; + +/***/ }, +/* 24 */ +/***/ function(module, exports, __webpack_require__) { + + exports.f = __webpack_require__(23); + +/***/ }, +/* 25 */ +/***/ function(module, exports, __webpack_require__) { + + var global = __webpack_require__(2) + , core = __webpack_require__(7) + , LIBRARY = __webpack_require__(26) + , wksExt = __webpack_require__(24) + , defineProperty = __webpack_require__(9).f; + module.exports = function(name){ + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)}); + }; + +/***/ }, +/* 26 */ +/***/ function(module, exports) { + + module.exports = false; + +/***/ }, +/* 27 */ +/***/ function(module, exports, __webpack_require__) { + + var getKeys = __webpack_require__(28) + , toIObject = __webpack_require__(30); + module.exports = function(object, el){ + var O = toIObject(object) + , keys = getKeys(O) + , length = keys.length + , index = 0 + , key; + while(length > index)if(O[key = keys[index++]] === el)return key; + }; + +/***/ }, +/* 28 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.14 / 15.2.3.14 Object.keys(O) + var $keys = __webpack_require__(29) + , enumBugKeys = __webpack_require__(39); + + module.exports = Object.keys || function keys(O){ + return $keys(O, enumBugKeys); + }; + +/***/ }, +/* 29 */ +/***/ function(module, exports, __webpack_require__) { + + var has = __webpack_require__(3) + , toIObject = __webpack_require__(30) + , arrayIndexOf = __webpack_require__(34)(false) + , IE_PROTO = __webpack_require__(38)('IE_PROTO'); + + module.exports = function(object, names){ + var O = toIObject(object) + , i = 0 + , result = [] + , key; + for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while(names.length > i)if(has(O, key = names[i++])){ + ~arrayIndexOf(result, key) || result.push(key); + } + return result; + }; + +/***/ }, +/* 30 */ +/***/ function(module, exports, __webpack_require__) { + + // to indexed object, toObject with fallback for non-array-like ES3 strings + var IObject = __webpack_require__(31) + , defined = __webpack_require__(33); + module.exports = function(it){ + return IObject(defined(it)); + }; + +/***/ }, +/* 31 */ +/***/ function(module, exports, __webpack_require__) { + + // fallback for non-array-like ES3 and non-enumerable old V8 strings + var cof = __webpack_require__(32); + module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ + return cof(it) == 'String' ? it.split('') : Object(it); + }; + +/***/ }, +/* 32 */ +/***/ function(module, exports) { + + var toString = {}.toString; + + module.exports = function(it){ + return toString.call(it).slice(8, -1); + }; + +/***/ }, +/* 33 */ +/***/ function(module, exports) { + + // 7.2.1 RequireObjectCoercible(argument) + module.exports = function(it){ + if(it == undefined)throw TypeError("Can't call method on " + it); + return it; + }; + +/***/ }, +/* 34 */ +/***/ function(module, exports, __webpack_require__) { + + // false -> Array#indexOf + // true -> Array#includes + var toIObject = __webpack_require__(30) + , toLength = __webpack_require__(35) + , toIndex = __webpack_require__(37); + module.exports = function(IS_INCLUDES){ + return function($this, el, fromIndex){ + var O = toIObject($this) + , length = toLength(O.length) + , index = toIndex(fromIndex, length) + , value; + // Array#includes uses SameValueZero equality algorithm + if(IS_INCLUDES && el != el)while(length > index){ + value = O[index++]; + if(value != value)return true; + // Array#toIndex ignores holes, Array#includes - not + } else for(;length > index; index++)if(IS_INCLUDES || index in O){ + if(O[index] === el)return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; + }; + +/***/ }, +/* 35 */ +/***/ function(module, exports, __webpack_require__) { + + // 7.1.15 ToLength + var toInteger = __webpack_require__(36) + , min = Math.min; + module.exports = function(it){ + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 + }; + +/***/ }, +/* 36 */ +/***/ function(module, exports) { + + // 7.1.4 ToInteger + var ceil = Math.ceil + , floor = Math.floor; + module.exports = function(it){ + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); + }; + +/***/ }, +/* 37 */ +/***/ function(module, exports, __webpack_require__) { + + var toInteger = __webpack_require__(36) + , max = Math.max + , min = Math.min; + module.exports = function(index, length){ + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); + }; + +/***/ }, +/* 38 */ +/***/ function(module, exports, __webpack_require__) { + + var shared = __webpack_require__(21)('keys') + , uid = __webpack_require__(17); + module.exports = function(key){ + return shared[key] || (shared[key] = uid(key)); + }; + +/***/ }, +/* 39 */ +/***/ function(module, exports) { + + // IE 8- don't enum bug keys + module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' + ).split(','); + +/***/ }, +/* 40 */ +/***/ function(module, exports, __webpack_require__) { + + // all enumerable object keys, includes symbols + var getKeys = __webpack_require__(28) + , gOPS = __webpack_require__(41) + , pIE = __webpack_require__(42); + module.exports = function(it){ + var result = getKeys(it) + , getSymbols = gOPS.f; + if(getSymbols){ + var symbols = getSymbols(it) + , isEnum = pIE.f + , i = 0 + , key; + while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key); + } return result; + }; + +/***/ }, +/* 41 */ +/***/ function(module, exports) { + + exports.f = Object.getOwnPropertySymbols; + +/***/ }, +/* 42 */ +/***/ function(module, exports) { + + exports.f = {}.propertyIsEnumerable; + +/***/ }, +/* 43 */ +/***/ function(module, exports, __webpack_require__) { + + // 7.2.2 IsArray(argument) + var cof = __webpack_require__(32); + module.exports = Array.isArray || function isArray(arg){ + return cof(arg) == 'Array'; + }; + +/***/ }, +/* 44 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + var anObject = __webpack_require__(10) + , dPs = __webpack_require__(45) + , enumBugKeys = __webpack_require__(39) + , IE_PROTO = __webpack_require__(38)('IE_PROTO') + , Empty = function(){ /* empty */ } + , PROTOTYPE = 'prototype'; + + // Create object with fake `null` prototype: use iframe Object with cleared prototype + var createDict = function(){ + // Thrash, waste and sodomy: IE GC bug + var iframe = __webpack_require__(13)('iframe') + , i = enumBugKeys.length + , lt = '<' + , gt = '>' + , iframeDocument; + iframe.style.display = 'none'; + __webpack_require__(46).appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); + }; + + module.exports = Object.create || function create(O, Properties){ + var result; + if(O !== null){ + Empty[PROTOTYPE] = anObject(O); + result = new Empty; + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); + }; + + +/***/ }, +/* 45 */ +/***/ function(module, exports, __webpack_require__) { + + var dP = __webpack_require__(9) + , anObject = __webpack_require__(10) + , getKeys = __webpack_require__(28); + + module.exports = __webpack_require__(4) ? Object.defineProperties : function defineProperties(O, Properties){ + anObject(O); + var keys = getKeys(Properties) + , length = keys.length + , i = 0 + , P; + while(length > i)dP.f(O, P = keys[i++], Properties[P]); + return O; + }; + +/***/ }, +/* 46 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = __webpack_require__(2).document && document.documentElement; + +/***/ }, +/* 47 */ +/***/ function(module, exports, __webpack_require__) { + + // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window + var toIObject = __webpack_require__(30) + , gOPN = __webpack_require__(48).f + , toString = {}.toString; + + var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + + var getWindowNames = function(it){ + try { + return gOPN(it); + } catch(e){ + return windowNames.slice(); + } + }; + + module.exports.f = function getOwnPropertyNames(it){ + return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); + }; + + +/***/ }, +/* 48 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) + var $keys = __webpack_require__(29) + , hiddenKeys = __webpack_require__(39).concat('length', 'prototype'); + + exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){ + return $keys(O, hiddenKeys); + }; + +/***/ }, +/* 49 */ +/***/ function(module, exports, __webpack_require__) { + + var pIE = __webpack_require__(42) + , createDesc = __webpack_require__(15) + , toIObject = __webpack_require__(30) + , toPrimitive = __webpack_require__(14) + , has = __webpack_require__(3) + , IE8_DOM_DEFINE = __webpack_require__(12) + , gOPD = Object.getOwnPropertyDescriptor; + + exports.f = __webpack_require__(4) ? gOPD : function getOwnPropertyDescriptor(O, P){ + O = toIObject(O); + P = toPrimitive(P, true); + if(IE8_DOM_DEFINE)try { + return gOPD(O, P); + } catch(e){ /* empty */ } + if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]); + }; + +/***/ }, +/* 50 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6); + // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) + $export($export.S + $export.F * !__webpack_require__(4), 'Object', {defineProperty: __webpack_require__(9).f}); + +/***/ }, +/* 51 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6); + // 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) + $export($export.S + $export.F * !__webpack_require__(4), 'Object', {defineProperties: __webpack_require__(45)}); + +/***/ }, +/* 52 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + var toIObject = __webpack_require__(30) + , $getOwnPropertyDescriptor = __webpack_require__(49).f; + + __webpack_require__(53)('getOwnPropertyDescriptor', function(){ + return function getOwnPropertyDescriptor(it, key){ + return $getOwnPropertyDescriptor(toIObject(it), key); + }; + }); + +/***/ }, +/* 53 */ +/***/ function(module, exports, __webpack_require__) { + + // most Object methods by ES6 should accept primitives + var $export = __webpack_require__(6) + , core = __webpack_require__(7) + , fails = __webpack_require__(5); + module.exports = function(KEY, exec){ + var fn = (core.Object || {})[KEY] || Object[KEY] + , exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); + }; + +/***/ }, +/* 54 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6) + // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) + $export($export.S, 'Object', {create: __webpack_require__(44)}); + +/***/ }, +/* 55 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.9 Object.getPrototypeOf(O) + var toObject = __webpack_require__(56) + , $getPrototypeOf = __webpack_require__(57); + + __webpack_require__(53)('getPrototypeOf', function(){ + return function getPrototypeOf(it){ + return $getPrototypeOf(toObject(it)); + }; + }); + +/***/ }, +/* 56 */ +/***/ function(module, exports, __webpack_require__) { + + // 7.1.13 ToObject(argument) + var defined = __webpack_require__(33); + module.exports = function(it){ + return Object(defined(it)); + }; + +/***/ }, +/* 57 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) + var has = __webpack_require__(3) + , toObject = __webpack_require__(56) + , IE_PROTO = __webpack_require__(38)('IE_PROTO') + , ObjectProto = Object.prototype; + + module.exports = Object.getPrototypeOf || function(O){ + O = toObject(O); + if(has(O, IE_PROTO))return O[IE_PROTO]; + if(typeof O.constructor == 'function' && O instanceof O.constructor){ + return O.constructor.prototype; + } return O instanceof Object ? ObjectProto : null; + }; + +/***/ }, +/* 58 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.14 Object.keys(O) + var toObject = __webpack_require__(56) + , $keys = __webpack_require__(28); + + __webpack_require__(53)('keys', function(){ + return function keys(it){ + return $keys(toObject(it)); + }; + }); + +/***/ }, +/* 59 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.7 Object.getOwnPropertyNames(O) + __webpack_require__(53)('getOwnPropertyNames', function(){ + return __webpack_require__(47).f; + }); + +/***/ }, +/* 60 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.5 Object.freeze(O) + var isObject = __webpack_require__(11) + , meta = __webpack_require__(20).onFreeze; + + __webpack_require__(53)('freeze', function($freeze){ + return function freeze(it){ + return $freeze && isObject(it) ? $freeze(meta(it)) : it; + }; + }); + +/***/ }, +/* 61 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.17 Object.seal(O) + var isObject = __webpack_require__(11) + , meta = __webpack_require__(20).onFreeze; + + __webpack_require__(53)('seal', function($seal){ + return function seal(it){ + return $seal && isObject(it) ? $seal(meta(it)) : it; + }; + }); + +/***/ }, +/* 62 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.15 Object.preventExtensions(O) + var isObject = __webpack_require__(11) + , meta = __webpack_require__(20).onFreeze; + + __webpack_require__(53)('preventExtensions', function($preventExtensions){ + return function preventExtensions(it){ + return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; + }; + }); + +/***/ }, +/* 63 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.12 Object.isFrozen(O) + var isObject = __webpack_require__(11); + + __webpack_require__(53)('isFrozen', function($isFrozen){ + return function isFrozen(it){ + return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true; + }; + }); + +/***/ }, +/* 64 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.13 Object.isSealed(O) + var isObject = __webpack_require__(11); + + __webpack_require__(53)('isSealed', function($isSealed){ + return function isSealed(it){ + return isObject(it) ? $isSealed ? $isSealed(it) : false : true; + }; + }); + +/***/ }, +/* 65 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.2.11 Object.isExtensible(O) + var isObject = __webpack_require__(11); + + __webpack_require__(53)('isExtensible', function($isExtensible){ + return function isExtensible(it){ + return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false; + }; + }); + +/***/ }, +/* 66 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.3.1 Object.assign(target, source) + var $export = __webpack_require__(6); + + $export($export.S + $export.F, 'Object', {assign: __webpack_require__(67)}); + +/***/ }, +/* 67 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // 19.1.2.1 Object.assign(target, source, ...) + var getKeys = __webpack_require__(28) + , gOPS = __webpack_require__(41) + , pIE = __webpack_require__(42) + , toObject = __webpack_require__(56) + , IObject = __webpack_require__(31) + , $assign = Object.assign; + + // should work with symbols and should have deterministic property order (V8 bug) + module.exports = !$assign || __webpack_require__(5)(function(){ + var A = {} + , B = {} + , S = Symbol() + , K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function(k){ B[k] = k; }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; + }) ? function assign(target, source){ // eslint-disable-line no-unused-vars + var T = toObject(target) + , aLen = arguments.length + , index = 1 + , getSymbols = gOPS.f + , isEnum = pIE.f; + while(aLen > index){ + var S = IObject(arguments[index++]) + , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S) + , length = keys.length + , j = 0 + , key; + while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key]; + } return T; + } : $assign; + +/***/ }, +/* 68 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.3.10 Object.is(value1, value2) + var $export = __webpack_require__(6); + $export($export.S, 'Object', {is: __webpack_require__(69)}); + +/***/ }, +/* 69 */ +/***/ function(module, exports) { + + // 7.2.9 SameValue(x, y) + module.exports = Object.is || function is(x, y){ + return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; + }; + +/***/ }, +/* 70 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.1.3.19 Object.setPrototypeOf(O, proto) + var $export = __webpack_require__(6); + $export($export.S, 'Object', {setPrototypeOf: __webpack_require__(71).set}); + +/***/ }, +/* 71 */ +/***/ function(module, exports, __webpack_require__) { + + // Works with __proto__ only. Old v8 can't work with null proto objects. + /* eslint-disable no-proto */ + var isObject = __webpack_require__(11) + , anObject = __webpack_require__(10); + var check = function(O, proto){ + anObject(O); + if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!"); + }; + module.exports = { + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line + function(test, buggy, set){ + try { + set = __webpack_require__(18)(Function.call, __webpack_require__(49).f(Object.prototype, '__proto__').set, 2); + set(test, []); + buggy = !(test instanceof Array); + } catch(e){ buggy = true; } + return function setPrototypeOf(O, proto){ + check(O, proto); + if(buggy)O.__proto__ = proto; + else set(O, proto); + return O; + }; + }({}, false) : undefined), + check: check + }; + +/***/ }, +/* 72 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // 19.1.3.6 Object.prototype.toString() + var classof = __webpack_require__(73) + , test = {}; + test[__webpack_require__(23)('toStringTag')] = 'z'; + if(test + '' != '[object z]'){ + __webpack_require__(16)(Object.prototype, 'toString', function toString(){ + return '[object ' + classof(this) + ']'; + }, true); + } + +/***/ }, +/* 73 */ +/***/ function(module, exports, __webpack_require__) { + + // getting tag from 19.1.3.6 Object.prototype.toString() + var cof = __webpack_require__(32) + , TAG = __webpack_require__(23)('toStringTag') + // ES3 wrong here + , ARG = cof(function(){ return arguments; }()) == 'Arguments'; + + // fallback for IE11 Script Access Denied error + var tryGet = function(it, key){ + try { + return it[key]; + } catch(e){ /* empty */ } + }; + + module.exports = function(it){ + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T + // builtinTag case + : ARG ? cof(O) + // ES3 arguments fallback + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; + }; + +/***/ }, +/* 74 */ +/***/ function(module, exports, __webpack_require__) { + + // 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) + var $export = __webpack_require__(6); + + $export($export.P, 'Function', {bind: __webpack_require__(75)}); + +/***/ }, +/* 75 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var aFunction = __webpack_require__(19) + , isObject = __webpack_require__(11) + , invoke = __webpack_require__(76) + , arraySlice = [].slice + , factories = {}; + + var construct = function(F, len, args){ + if(!(len in factories)){ + for(var n = [], i = 0; i < len; i++)n[i] = 'a[' + i + ']'; + factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); + } return factories[len](F, args); + }; + + module.exports = Function.bind || function bind(that /*, args... */){ + var fn = aFunction(this) + , partArgs = arraySlice.call(arguments, 1); + var bound = function(/* args... */){ + var args = partArgs.concat(arraySlice.call(arguments)); + return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); + }; + if(isObject(fn.prototype))bound.prototype = fn.prototype; + return bound; + }; + +/***/ }, +/* 76 */ +/***/ function(module, exports) { + + // fast apply, http://jsperf.lnkit.com/fast-apply/5 + module.exports = function(fn, args, that){ + var un = that === undefined; + switch(args.length){ + case 0: return un ? fn() + : fn.call(that); + case 1: return un ? fn(args[0]) + : fn.call(that, args[0]); + case 2: return un ? fn(args[0], args[1]) + : fn.call(that, args[0], args[1]); + case 3: return un ? fn(args[0], args[1], args[2]) + : fn.call(that, args[0], args[1], args[2]); + case 4: return un ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + } return fn.apply(that, args); + }; + +/***/ }, +/* 77 */ +/***/ function(module, exports, __webpack_require__) { + + var dP = __webpack_require__(9).f + , createDesc = __webpack_require__(15) + , has = __webpack_require__(3) + , FProto = Function.prototype + , nameRE = /^\s*function ([^ (]*)/ + , NAME = 'name'; + + var isExtensible = Object.isExtensible || function(){ + return true; + }; + + // 19.2.4.2 name + NAME in FProto || __webpack_require__(4) && dP(FProto, NAME, { + configurable: true, + get: function(){ + try { + var that = this + , name = ('' + that).match(nameRE)[1]; + has(that, NAME) || !isExtensible(that) || dP(that, NAME, createDesc(5, name)); + return name; + } catch(e){ + return ''; + } + } + }); + +/***/ }, +/* 78 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var isObject = __webpack_require__(11) + , getPrototypeOf = __webpack_require__(57) + , HAS_INSTANCE = __webpack_require__(23)('hasInstance') + , FunctionProto = Function.prototype; + // 19.2.3.6 Function.prototype[@@hasInstance](V) + if(!(HAS_INSTANCE in FunctionProto))__webpack_require__(9).f(FunctionProto, HAS_INSTANCE, {value: function(O){ + if(typeof this != 'function' || !isObject(O))return false; + if(!isObject(this.prototype))return O instanceof this; + // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: + while(O = getPrototypeOf(O))if(this.prototype === O)return true; + return false; + }}); + +/***/ }, +/* 79 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var global = __webpack_require__(2) + , has = __webpack_require__(3) + , cof = __webpack_require__(32) + , inheritIfRequired = __webpack_require__(80) + , toPrimitive = __webpack_require__(14) + , fails = __webpack_require__(5) + , gOPN = __webpack_require__(48).f + , gOPD = __webpack_require__(49).f + , dP = __webpack_require__(9).f + , $trim = __webpack_require__(81).trim + , NUMBER = 'Number' + , $Number = global[NUMBER] + , Base = $Number + , proto = $Number.prototype + // Opera ~12 has broken Object#toString + , BROKEN_COF = cof(__webpack_require__(44)(proto)) == NUMBER + , TRIM = 'trim' in String.prototype; + + // 7.1.3 ToNumber(argument) + var toNumber = function(argument){ + var it = toPrimitive(argument, false); + if(typeof it == 'string' && it.length > 2){ + it = TRIM ? it.trim() : $trim(it, 3); + var first = it.charCodeAt(0) + , third, radix, maxCode; + if(first === 43 || first === 45){ + third = it.charCodeAt(2); + if(third === 88 || third === 120)return NaN; // Number('+0x1') should be NaN, old V8 fix + } else if(first === 48){ + switch(it.charCodeAt(1)){ + case 66 : case 98 : radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i + case 79 : case 111 : radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i + default : return +it; + } + for(var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++){ + code = digits.charCodeAt(i); + // parseInt parses a string to a first unavailable symbol + // but ToNumber should return NaN if a string contains unavailable symbols + if(code < 48 || code > maxCode)return NaN; + } return parseInt(digits, radix); + } + } return +it; + }; + + if(!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')){ + $Number = function Number(value){ + var it = arguments.length < 1 ? 0 : value + , that = this; + return that instanceof $Number + // check on 1..constructor(foo) case + && (BROKEN_COF ? fails(function(){ proto.valueOf.call(that); }) : cof(that) != NUMBER) + ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it); + }; + for(var keys = __webpack_require__(4) ? gOPN(Base) : ( + // ES3: + 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + + // ES6 (in case, if modules with ES6 Number statics required before): + 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger' + ).split(','), j = 0, key; keys.length > j; j++){ + if(has(Base, key = keys[j]) && !has($Number, key)){ + dP($Number, key, gOPD(Base, key)); + } + } + $Number.prototype = proto; + proto.constructor = $Number; + __webpack_require__(16)(global, NUMBER, $Number); + } + +/***/ }, +/* 80 */ +/***/ function(module, exports, __webpack_require__) { + + var isObject = __webpack_require__(11) + , setPrototypeOf = __webpack_require__(71).set; + module.exports = function(that, target, C){ + var P, S = target.constructor; + if(S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf){ + setPrototypeOf(that, P); + } return that; + }; + +/***/ }, +/* 81 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6) + , defined = __webpack_require__(33) + , fails = __webpack_require__(5) + , spaces = __webpack_require__(82) + , space = '[' + spaces + ']' + , non = '\u200b\u0085' + , ltrim = RegExp('^' + space + space + '*') + , rtrim = RegExp(space + space + '*$'); + + var exporter = function(KEY, exec, ALIAS){ + var exp = {}; + var FORCE = fails(function(){ + return !!spaces[KEY]() || non[KEY]() != non; + }); + var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; + if(ALIAS)exp[ALIAS] = fn; + $export($export.P + $export.F * FORCE, 'String', exp); + }; + + // 1 -> String#trimLeft + // 2 -> String#trimRight + // 3 -> String#trim + var trim = exporter.trim = function(string, TYPE){ + string = String(defined(string)); + if(TYPE & 1)string = string.replace(ltrim, ''); + if(TYPE & 2)string = string.replace(rtrim, ''); + return string; + }; + + module.exports = exporter; + +/***/ }, +/* 82 */ +/***/ function(module, exports) { + + module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; + +/***/ }, +/* 83 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , toInteger = __webpack_require__(36) + , aNumberValue = __webpack_require__(84) + , repeat = __webpack_require__(85) + , $toFixed = 1..toFixed + , floor = Math.floor + , data = [0, 0, 0, 0, 0, 0] + , ERROR = 'Number.toFixed: incorrect invocation!' + , ZERO = '0'; + + var multiply = function(n, c){ + var i = -1 + , c2 = c; + while(++i < 6){ + c2 += n * data[i]; + data[i] = c2 % 1e7; + c2 = floor(c2 / 1e7); + } + }; + var divide = function(n){ + var i = 6 + , c = 0; + while(--i >= 0){ + c += data[i]; + data[i] = floor(c / n); + c = (c % n) * 1e7; + } + }; + var numToString = function(){ + var i = 6 + , s = ''; + while(--i >= 0){ + if(s !== '' || i === 0 || data[i] !== 0){ + var t = String(data[i]); + s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t; + } + } return s; + }; + var pow = function(x, n, acc){ + return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); + }; + var log = function(x){ + var n = 0 + , x2 = x; + while(x2 >= 4096){ + n += 12; + x2 /= 4096; + } + while(x2 >= 2){ + n += 1; + x2 /= 2; + } return n; + }; + + $export($export.P + $export.F * (!!$toFixed && ( + 0.00008.toFixed(3) !== '0.000' || + 0.9.toFixed(0) !== '1' || + 1.255.toFixed(2) !== '1.25' || + 1000000000000000128..toFixed(0) !== '1000000000000000128' + ) || !__webpack_require__(5)(function(){ + // V8 ~ Android 4.3- + $toFixed.call({}); + })), 'Number', { + toFixed: function toFixed(fractionDigits){ + var x = aNumberValue(this, ERROR) + , f = toInteger(fractionDigits) + , s = '' + , m = ZERO + , e, z, j, k; + if(f < 0 || f > 20)throw RangeError(ERROR); + if(x != x)return 'NaN'; + if(x <= -1e21 || x >= 1e21)return String(x); + if(x < 0){ + s = '-'; + x = -x; + } + if(x > 1e-21){ + e = log(x * pow(2, 69, 1)) - 69; + z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1); + z *= 0x10000000000000; + e = 52 - e; + if(e > 0){ + multiply(0, z); + j = f; + while(j >= 7){ + multiply(1e7, 0); + j -= 7; + } + multiply(pow(10, j, 1), 0); + j = e - 1; + while(j >= 23){ + divide(1 << 23); + j -= 23; + } + divide(1 << j); + multiply(1, 1); + divide(2); + m = numToString(); + } else { + multiply(0, z); + multiply(1 << -e, 0); + m = numToString() + repeat.call(ZERO, f); + } + } + if(f > 0){ + k = m.length; + m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f)); + } else { + m = s + m; + } return m; + } + }); + +/***/ }, +/* 84 */ +/***/ function(module, exports, __webpack_require__) { + + var cof = __webpack_require__(32); + module.exports = function(it, msg){ + if(typeof it != 'number' && cof(it) != 'Number')throw TypeError(msg); + return +it; + }; + +/***/ }, +/* 85 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var toInteger = __webpack_require__(36) + , defined = __webpack_require__(33); + + module.exports = function repeat(count){ + var str = String(defined(this)) + , res = '' + , n = toInteger(count); + if(n < 0 || n == Infinity)throw RangeError("Count can't be negative"); + for(;n > 0; (n >>>= 1) && (str += str))if(n & 1)res += str; + return res; + }; + +/***/ }, +/* 86 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , $fails = __webpack_require__(5) + , aNumberValue = __webpack_require__(84) + , $toPrecision = 1..toPrecision; + + $export($export.P + $export.F * ($fails(function(){ + // IE7- + return $toPrecision.call(1, undefined) !== '1'; + }) || !$fails(function(){ + // V8 ~ Android 4.3- + $toPrecision.call({}); + })), 'Number', { + toPrecision: function toPrecision(precision){ + var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!'); + return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision); + } + }); + +/***/ }, +/* 87 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.1.2.1 Number.EPSILON + var $export = __webpack_require__(6); + + $export($export.S, 'Number', {EPSILON: Math.pow(2, -52)}); + +/***/ }, +/* 88 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.1.2.2 Number.isFinite(number) + var $export = __webpack_require__(6) + , _isFinite = __webpack_require__(2).isFinite; + + $export($export.S, 'Number', { + isFinite: function isFinite(it){ + return typeof it == 'number' && _isFinite(it); + } + }); + +/***/ }, +/* 89 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.1.2.3 Number.isInteger(number) + var $export = __webpack_require__(6); + + $export($export.S, 'Number', {isInteger: __webpack_require__(90)}); + +/***/ }, +/* 90 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.1.2.3 Number.isInteger(number) + var isObject = __webpack_require__(11) + , floor = Math.floor; + module.exports = function isInteger(it){ + return !isObject(it) && isFinite(it) && floor(it) === it; + }; + +/***/ }, +/* 91 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.1.2.4 Number.isNaN(number) + var $export = __webpack_require__(6); + + $export($export.S, 'Number', { + isNaN: function isNaN(number){ + return number != number; + } + }); + +/***/ }, +/* 92 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.1.2.5 Number.isSafeInteger(number) + var $export = __webpack_require__(6) + , isInteger = __webpack_require__(90) + , abs = Math.abs; + + $export($export.S, 'Number', { + isSafeInteger: function isSafeInteger(number){ + return isInteger(number) && abs(number) <= 0x1fffffffffffff; + } + }); + +/***/ }, +/* 93 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.1.2.6 Number.MAX_SAFE_INTEGER + var $export = __webpack_require__(6); + + $export($export.S, 'Number', {MAX_SAFE_INTEGER: 0x1fffffffffffff}); + +/***/ }, +/* 94 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.1.2.10 Number.MIN_SAFE_INTEGER + var $export = __webpack_require__(6); + + $export($export.S, 'Number', {MIN_SAFE_INTEGER: -0x1fffffffffffff}); + +/***/ }, +/* 95 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6) + , $parseFloat = __webpack_require__(96); + // 20.1.2.12 Number.parseFloat(string) + $export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', {parseFloat: $parseFloat}); + +/***/ }, +/* 96 */ +/***/ function(module, exports, __webpack_require__) { + + var $parseFloat = __webpack_require__(2).parseFloat + , $trim = __webpack_require__(81).trim; + + module.exports = 1 / $parseFloat(__webpack_require__(82) + '-0') !== -Infinity ? function parseFloat(str){ + var string = $trim(String(str), 3) + , result = $parseFloat(string); + return result === 0 && string.charAt(0) == '-' ? -0 : result; + } : $parseFloat; + +/***/ }, +/* 97 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6) + , $parseInt = __webpack_require__(98); + // 20.1.2.13 Number.parseInt(string, radix) + $export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', {parseInt: $parseInt}); + +/***/ }, +/* 98 */ +/***/ function(module, exports, __webpack_require__) { + + var $parseInt = __webpack_require__(2).parseInt + , $trim = __webpack_require__(81).trim + , ws = __webpack_require__(82) + , hex = /^[\-+]?0[xX]/; + + module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix){ + var string = $trim(String(str), 3); + return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10)); + } : $parseInt; + +/***/ }, +/* 99 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6) + , $parseInt = __webpack_require__(98); + // 18.2.5 parseInt(string, radix) + $export($export.G + $export.F * (parseInt != $parseInt), {parseInt: $parseInt}); + +/***/ }, +/* 100 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6) + , $parseFloat = __webpack_require__(96); + // 18.2.4 parseFloat(string) + $export($export.G + $export.F * (parseFloat != $parseFloat), {parseFloat: $parseFloat}); + +/***/ }, +/* 101 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.3 Math.acosh(x) + var $export = __webpack_require__(6) + , log1p = __webpack_require__(102) + , sqrt = Math.sqrt + , $acosh = Math.acosh; + + $export($export.S + $export.F * !($acosh + // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509 + && Math.floor($acosh(Number.MAX_VALUE)) == 710 + // Tor Browser bug: Math.acosh(Infinity) -> NaN + && $acosh(Infinity) == Infinity + ), 'Math', { + acosh: function acosh(x){ + return (x = +x) < 1 ? NaN : x > 94906265.62425156 + ? Math.log(x) + Math.LN2 + : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1)); + } + }); + +/***/ }, +/* 102 */ +/***/ function(module, exports) { + + // 20.2.2.20 Math.log1p(x) + module.exports = Math.log1p || function log1p(x){ + return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x); + }; + +/***/ }, +/* 103 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.5 Math.asinh(x) + var $export = __webpack_require__(6) + , $asinh = Math.asinh; + + function asinh(x){ + return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1)); + } + + // Tor Browser bug: Math.asinh(0) -> -0 + $export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', {asinh: asinh}); + +/***/ }, +/* 104 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.7 Math.atanh(x) + var $export = __webpack_require__(6) + , $atanh = Math.atanh; + + // Tor Browser bug: Math.atanh(-0) -> 0 + $export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { + atanh: function atanh(x){ + return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2; + } + }); + +/***/ }, +/* 105 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.9 Math.cbrt(x) + var $export = __webpack_require__(6) + , sign = __webpack_require__(106); + + $export($export.S, 'Math', { + cbrt: function cbrt(x){ + return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3); + } + }); + +/***/ }, +/* 106 */ +/***/ function(module, exports) { + + // 20.2.2.28 Math.sign(x) + module.exports = Math.sign || function sign(x){ + return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; + }; + +/***/ }, +/* 107 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.11 Math.clz32(x) + var $export = __webpack_require__(6); + + $export($export.S, 'Math', { + clz32: function clz32(x){ + return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32; + } + }); + +/***/ }, +/* 108 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.12 Math.cosh(x) + var $export = __webpack_require__(6) + , exp = Math.exp; + + $export($export.S, 'Math', { + cosh: function cosh(x){ + return (exp(x = +x) + exp(-x)) / 2; + } + }); + +/***/ }, +/* 109 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.14 Math.expm1(x) + var $export = __webpack_require__(6) + , $expm1 = __webpack_require__(110); + + $export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', {expm1: $expm1}); + +/***/ }, +/* 110 */ +/***/ function(module, exports) { + + // 20.2.2.14 Math.expm1(x) + var $expm1 = Math.expm1; + module.exports = (!$expm1 + // Old FF bug + || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168 + // Tor Browser bug + || $expm1(-2e-17) != -2e-17 + ) ? function expm1(x){ + return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1; + } : $expm1; + +/***/ }, +/* 111 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.16 Math.fround(x) + var $export = __webpack_require__(6) + , sign = __webpack_require__(106) + , pow = Math.pow + , EPSILON = pow(2, -52) + , EPSILON32 = pow(2, -23) + , MAX32 = pow(2, 127) * (2 - EPSILON32) + , MIN32 = pow(2, -126); + + var roundTiesToEven = function(n){ + return n + 1 / EPSILON - 1 / EPSILON; + }; + + + $export($export.S, 'Math', { + fround: function fround(x){ + var $abs = Math.abs(x) + , $sign = sign(x) + , a, result; + if($abs < MIN32)return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; + a = (1 + EPSILON32 / EPSILON) * $abs; + result = a - (a - $abs); + if(result > MAX32 || result != result)return $sign * Infinity; + return $sign * result; + } + }); + +/***/ }, +/* 112 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) + var $export = __webpack_require__(6) + , abs = Math.abs; + + $export($export.S, 'Math', { + hypot: function hypot(value1, value2){ // eslint-disable-line no-unused-vars + var sum = 0 + , i = 0 + , aLen = arguments.length + , larg = 0 + , arg, div; + while(i < aLen){ + arg = abs(arguments[i++]); + if(larg < arg){ + div = larg / arg; + sum = sum * div * div + 1; + larg = arg; + } else if(arg > 0){ + div = arg / larg; + sum += div * div; + } else sum += arg; + } + return larg === Infinity ? Infinity : larg * Math.sqrt(sum); + } + }); + +/***/ }, +/* 113 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.18 Math.imul(x, y) + var $export = __webpack_require__(6) + , $imul = Math.imul; + + // some WebKit versions fails with big numbers, some has wrong arity + $export($export.S + $export.F * __webpack_require__(5)(function(){ + return $imul(0xffffffff, 5) != -5 || $imul.length != 2; + }), 'Math', { + imul: function imul(x, y){ + var UINT16 = 0xffff + , xn = +x + , yn = +y + , xl = UINT16 & xn + , yl = UINT16 & yn; + return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0); + } + }); + +/***/ }, +/* 114 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.21 Math.log10(x) + var $export = __webpack_require__(6); + + $export($export.S, 'Math', { + log10: function log10(x){ + return Math.log(x) / Math.LN10; + } + }); + +/***/ }, +/* 115 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.20 Math.log1p(x) + var $export = __webpack_require__(6); + + $export($export.S, 'Math', {log1p: __webpack_require__(102)}); + +/***/ }, +/* 116 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.22 Math.log2(x) + var $export = __webpack_require__(6); + + $export($export.S, 'Math', { + log2: function log2(x){ + return Math.log(x) / Math.LN2; + } + }); + +/***/ }, +/* 117 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.28 Math.sign(x) + var $export = __webpack_require__(6); + + $export($export.S, 'Math', {sign: __webpack_require__(106)}); + +/***/ }, +/* 118 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.30 Math.sinh(x) + var $export = __webpack_require__(6) + , expm1 = __webpack_require__(110) + , exp = Math.exp; + + // V8 near Chromium 38 has a problem with very small numbers + $export($export.S + $export.F * __webpack_require__(5)(function(){ + return !Math.sinh(-2e-17) != -2e-17; + }), 'Math', { + sinh: function sinh(x){ + return Math.abs(x = +x) < 1 + ? (expm1(x) - expm1(-x)) / 2 + : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2); + } + }); + +/***/ }, +/* 119 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.33 Math.tanh(x) + var $export = __webpack_require__(6) + , expm1 = __webpack_require__(110) + , exp = Math.exp; + + $export($export.S, 'Math', { + tanh: function tanh(x){ + var a = expm1(x = +x) + , b = expm1(-x); + return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); + } + }); + +/***/ }, +/* 120 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.2.2.34 Math.trunc(x) + var $export = __webpack_require__(6); + + $export($export.S, 'Math', { + trunc: function trunc(it){ + return (it > 0 ? Math.floor : Math.ceil)(it); + } + }); + +/***/ }, +/* 121 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6) + , toIndex = __webpack_require__(37) + , fromCharCode = String.fromCharCode + , $fromCodePoint = String.fromCodePoint; + + // length should be 1, old FF problem + $export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { + // 21.1.2.2 String.fromCodePoint(...codePoints) + fromCodePoint: function fromCodePoint(x){ // eslint-disable-line no-unused-vars + var res = [] + , aLen = arguments.length + , i = 0 + , code; + while(aLen > i){ + code = +arguments[i++]; + if(toIndex(code, 0x10ffff) !== code)throw RangeError(code + ' is not a valid code point'); + res.push(code < 0x10000 + ? fromCharCode(code) + : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00) + ); + } return res.join(''); + } + }); + +/***/ }, +/* 122 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6) + , toIObject = __webpack_require__(30) + , toLength = __webpack_require__(35); + + $export($export.S, 'String', { + // 21.1.2.4 String.raw(callSite, ...substitutions) + raw: function raw(callSite){ + var tpl = toIObject(callSite.raw) + , len = toLength(tpl.length) + , aLen = arguments.length + , res = [] + , i = 0; + while(len > i){ + res.push(String(tpl[i++])); + if(i < aLen)res.push(String(arguments[i])); + } return res.join(''); + } + }); + +/***/ }, +/* 123 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // 21.1.3.25 String.prototype.trim() + __webpack_require__(81)('trim', function($trim){ + return function trim(){ + return $trim(this, 3); + }; + }); + +/***/ }, +/* 124 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , $at = __webpack_require__(125)(false); + $export($export.P, 'String', { + // 21.1.3.3 String.prototype.codePointAt(pos) + codePointAt: function codePointAt(pos){ + return $at(this, pos); + } + }); + +/***/ }, +/* 125 */ +/***/ function(module, exports, __webpack_require__) { + + var toInteger = __webpack_require__(36) + , defined = __webpack_require__(33); + // true -> String#at + // false -> String#codePointAt + module.exports = function(TO_STRING){ + return function(that, pos){ + var s = String(defined(that)) + , i = toInteger(pos) + , l = s.length + , a, b; + if(i < 0 || i >= l)return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; + }; + +/***/ }, +/* 126 */ +/***/ function(module, exports, __webpack_require__) { + + // 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) + 'use strict'; + var $export = __webpack_require__(6) + , toLength = __webpack_require__(35) + , context = __webpack_require__(127) + , ENDS_WITH = 'endsWith' + , $endsWith = ''[ENDS_WITH]; + + $export($export.P + $export.F * __webpack_require__(129)(ENDS_WITH), 'String', { + endsWith: function endsWith(searchString /*, endPosition = @length */){ + var that = context(this, searchString, ENDS_WITH) + , endPosition = arguments.length > 1 ? arguments[1] : undefined + , len = toLength(that.length) + , end = endPosition === undefined ? len : Math.min(toLength(endPosition), len) + , search = String(searchString); + return $endsWith + ? $endsWith.call(that, search, end) + : that.slice(end - search.length, end) === search; + } + }); + +/***/ }, +/* 127 */ +/***/ function(module, exports, __webpack_require__) { + + // helper for String#{startsWith, endsWith, includes} + var isRegExp = __webpack_require__(128) + , defined = __webpack_require__(33); + + module.exports = function(that, searchString, NAME){ + if(isRegExp(searchString))throw TypeError('String#' + NAME + " doesn't accept regex!"); + return String(defined(that)); + }; + +/***/ }, +/* 128 */ +/***/ function(module, exports, __webpack_require__) { + + // 7.2.8 IsRegExp(argument) + var isObject = __webpack_require__(11) + , cof = __webpack_require__(32) + , MATCH = __webpack_require__(23)('match'); + module.exports = function(it){ + var isRegExp; + return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); + }; + +/***/ }, +/* 129 */ +/***/ function(module, exports, __webpack_require__) { + + var MATCH = __webpack_require__(23)('match'); + module.exports = function(KEY){ + var re = /./; + try { + '/./'[KEY](re); + } catch(e){ + try { + re[MATCH] = false; + return !'/./'[KEY](re); + } catch(f){ /* empty */ } + } return true; + }; + +/***/ }, +/* 130 */ +/***/ function(module, exports, __webpack_require__) { + + // 21.1.3.7 String.prototype.includes(searchString, position = 0) + 'use strict'; + var $export = __webpack_require__(6) + , context = __webpack_require__(127) + , INCLUDES = 'includes'; + + $export($export.P + $export.F * __webpack_require__(129)(INCLUDES), 'String', { + includes: function includes(searchString /*, position = 0 */){ + return !!~context(this, searchString, INCLUDES) + .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined); + } + }); + +/***/ }, +/* 131 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6); + + $export($export.P, 'String', { + // 21.1.3.13 String.prototype.repeat(count) + repeat: __webpack_require__(85) + }); + +/***/ }, +/* 132 */ +/***/ function(module, exports, __webpack_require__) { + + // 21.1.3.18 String.prototype.startsWith(searchString [, position ]) + 'use strict'; + var $export = __webpack_require__(6) + , toLength = __webpack_require__(35) + , context = __webpack_require__(127) + , STARTS_WITH = 'startsWith' + , $startsWith = ''[STARTS_WITH]; + + $export($export.P + $export.F * __webpack_require__(129)(STARTS_WITH), 'String', { + startsWith: function startsWith(searchString /*, position = 0 */){ + var that = context(this, searchString, STARTS_WITH) + , index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)) + , search = String(searchString); + return $startsWith + ? $startsWith.call(that, search, index) + : that.slice(index, index + search.length) === search; + } + }); + +/***/ }, +/* 133 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $at = __webpack_require__(125)(true); + + // 21.1.3.27 String.prototype[@@iterator]() + __webpack_require__(134)(String, 'String', function(iterated){ + this._t = String(iterated); // target + this._i = 0; // next index + // 21.1.5.2.1 %StringIteratorPrototype%.next() + }, function(){ + var O = this._t + , index = this._i + , point; + if(index >= O.length)return {value: undefined, done: true}; + point = $at(O, index); + this._i += point.length; + return {value: point, done: false}; + }); + +/***/ }, +/* 134 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var LIBRARY = __webpack_require__(26) + , $export = __webpack_require__(6) + , redefine = __webpack_require__(16) + , hide = __webpack_require__(8) + , has = __webpack_require__(3) + , Iterators = __webpack_require__(135) + , $iterCreate = __webpack_require__(136) + , setToStringTag = __webpack_require__(22) + , getPrototypeOf = __webpack_require__(57) + , ITERATOR = __webpack_require__(23)('iterator') + , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` + , FF_ITERATOR = '@@iterator' + , KEYS = 'keys' + , VALUES = 'values'; + + var returnThis = function(){ return this; }; + + module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){ + $iterCreate(Constructor, NAME, next); + var getMethod = function(kind){ + if(!BUGGY && kind in proto)return proto[kind]; + switch(kind){ + case KEYS: return function keys(){ return new Constructor(this, kind); }; + case VALUES: return function values(){ return new Constructor(this, kind); }; + } return function entries(){ return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator' + , DEF_VALUES = DEFAULT == VALUES + , VALUES_BUG = false + , proto = Base.prototype + , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] + , $default = $native || getMethod(DEFAULT) + , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined + , $anyNative = NAME == 'Array' ? proto.entries || $native : $native + , methods, key, IteratorPrototype; + // Fix native + if($anyNative){ + IteratorPrototype = getPrototypeOf($anyNative.call(new Base)); + if(IteratorPrototype !== Object.prototype){ + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if(DEF_VALUES && $native && $native.name !== VALUES){ + VALUES_BUG = true; + $default = function values(){ return $native.call(this); }; + } + // Define iterator + if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){ + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if(DEFAULT){ + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if(FORCED)for(key in methods){ + if(!(key in proto))redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; + }; + +/***/ }, +/* 135 */ +/***/ function(module, exports) { + + module.exports = {}; + +/***/ }, +/* 136 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var create = __webpack_require__(44) + , descriptor = __webpack_require__(15) + , setToStringTag = __webpack_require__(22) + , IteratorPrototype = {}; + + // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() + __webpack_require__(8)(IteratorPrototype, __webpack_require__(23)('iterator'), function(){ return this; }); + + module.exports = function(Constructor, NAME, next){ + Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)}); + setToStringTag(Constructor, NAME + ' Iterator'); + }; + +/***/ }, +/* 137 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.2 String.prototype.anchor(name) + __webpack_require__(138)('anchor', function(createHTML){ + return function anchor(name){ + return createHTML(this, 'a', 'name', name); + } + }); + +/***/ }, +/* 138 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6) + , fails = __webpack_require__(5) + , defined = __webpack_require__(33) + , quot = /"/g; + // B.2.3.2.1 CreateHTML(string, tag, attribute, value) + var createHTML = function(string, tag, attribute, value) { + var S = String(defined(string)) + , p1 = '<' + tag; + if(attribute !== '')p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; + return p1 + '>' + S + ''; + }; + module.exports = function(NAME, exec){ + var O = {}; + O[NAME] = exec(createHTML); + $export($export.P + $export.F * fails(function(){ + var test = ''[NAME]('"'); + return test !== test.toLowerCase() || test.split('"').length > 3; + }), 'String', O); + }; + +/***/ }, +/* 139 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.3 String.prototype.big() + __webpack_require__(138)('big', function(createHTML){ + return function big(){ + return createHTML(this, 'big', '', ''); + } + }); + +/***/ }, +/* 140 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.4 String.prototype.blink() + __webpack_require__(138)('blink', function(createHTML){ + return function blink(){ + return createHTML(this, 'blink', '', ''); + } + }); + +/***/ }, +/* 141 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.5 String.prototype.bold() + __webpack_require__(138)('bold', function(createHTML){ + return function bold(){ + return createHTML(this, 'b', '', ''); + } + }); + +/***/ }, +/* 142 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.6 String.prototype.fixed() + __webpack_require__(138)('fixed', function(createHTML){ + return function fixed(){ + return createHTML(this, 'tt', '', ''); + } + }); + +/***/ }, +/* 143 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.7 String.prototype.fontcolor(color) + __webpack_require__(138)('fontcolor', function(createHTML){ + return function fontcolor(color){ + return createHTML(this, 'font', 'color', color); + } + }); + +/***/ }, +/* 144 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.8 String.prototype.fontsize(size) + __webpack_require__(138)('fontsize', function(createHTML){ + return function fontsize(size){ + return createHTML(this, 'font', 'size', size); + } + }); + +/***/ }, +/* 145 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.9 String.prototype.italics() + __webpack_require__(138)('italics', function(createHTML){ + return function italics(){ + return createHTML(this, 'i', '', ''); + } + }); + +/***/ }, +/* 146 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.10 String.prototype.link(url) + __webpack_require__(138)('link', function(createHTML){ + return function link(url){ + return createHTML(this, 'a', 'href', url); + } + }); + +/***/ }, +/* 147 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.11 String.prototype.small() + __webpack_require__(138)('small', function(createHTML){ + return function small(){ + return createHTML(this, 'small', '', ''); + } + }); + +/***/ }, +/* 148 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.12 String.prototype.strike() + __webpack_require__(138)('strike', function(createHTML){ + return function strike(){ + return createHTML(this, 'strike', '', ''); + } + }); + +/***/ }, +/* 149 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.13 String.prototype.sub() + __webpack_require__(138)('sub', function(createHTML){ + return function sub(){ + return createHTML(this, 'sub', '', ''); + } + }); + +/***/ }, +/* 150 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // B.2.3.14 String.prototype.sup() + __webpack_require__(138)('sup', function(createHTML){ + return function sup(){ + return createHTML(this, 'sup', '', ''); + } + }); + +/***/ }, +/* 151 */ +/***/ function(module, exports, __webpack_require__) { + + // 22.1.2.2 / 15.4.3.2 Array.isArray(arg) + var $export = __webpack_require__(6); + + $export($export.S, 'Array', {isArray: __webpack_require__(43)}); + +/***/ }, +/* 152 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var ctx = __webpack_require__(18) + , $export = __webpack_require__(6) + , toObject = __webpack_require__(56) + , call = __webpack_require__(153) + , isArrayIter = __webpack_require__(154) + , toLength = __webpack_require__(35) + , createProperty = __webpack_require__(155) + , getIterFn = __webpack_require__(156); + + $export($export.S + $export.F * !__webpack_require__(157)(function(iter){ Array.from(iter); }), 'Array', { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){ + var O = toObject(arrayLike) + , C = typeof this == 'function' ? this : Array + , aLen = arguments.length + , mapfn = aLen > 1 ? arguments[1] : undefined + , mapping = mapfn !== undefined + , index = 0 + , iterFn = getIterFn(O) + , length, result, step, iterator; + if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){ + for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){ + createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); + } + } else { + length = toLength(O.length); + for(result = new C(length); length > index; index++){ + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + } + }); + + +/***/ }, +/* 153 */ +/***/ function(module, exports, __webpack_require__) { + + // call something on iterator step with safe closing on error + var anObject = __webpack_require__(10); + module.exports = function(iterator, fn, value, entries){ + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch(e){ + var ret = iterator['return']; + if(ret !== undefined)anObject(ret.call(iterator)); + throw e; + } + }; + +/***/ }, +/* 154 */ +/***/ function(module, exports, __webpack_require__) { + + // check on default Array iterator + var Iterators = __webpack_require__(135) + , ITERATOR = __webpack_require__(23)('iterator') + , ArrayProto = Array.prototype; + + module.exports = function(it){ + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); + }; + +/***/ }, +/* 155 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $defineProperty = __webpack_require__(9) + , createDesc = __webpack_require__(15); + + module.exports = function(object, index, value){ + if(index in object)$defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; + }; + +/***/ }, +/* 156 */ +/***/ function(module, exports, __webpack_require__) { + + var classof = __webpack_require__(73) + , ITERATOR = __webpack_require__(23)('iterator') + , Iterators = __webpack_require__(135); + module.exports = __webpack_require__(7).getIteratorMethod = function(it){ + if(it != undefined)return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; + }; + +/***/ }, +/* 157 */ +/***/ function(module, exports, __webpack_require__) { + + var ITERATOR = __webpack_require__(23)('iterator') + , SAFE_CLOSING = false; + + try { + var riter = [7][ITERATOR](); + riter['return'] = function(){ SAFE_CLOSING = true; }; + Array.from(riter, function(){ throw 2; }); + } catch(e){ /* empty */ } + + module.exports = function(exec, skipClosing){ + if(!skipClosing && !SAFE_CLOSING)return false; + var safe = false; + try { + var arr = [7] + , iter = arr[ITERATOR](); + iter.next = function(){ return {done: safe = true}; }; + arr[ITERATOR] = function(){ return iter; }; + exec(arr); + } catch(e){ /* empty */ } + return safe; + }; + +/***/ }, +/* 158 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , createProperty = __webpack_require__(155); + + // WebKit Array.of isn't generic + $export($export.S + $export.F * __webpack_require__(5)(function(){ + function F(){} + return !(Array.of.call(F) instanceof F); + }), 'Array', { + // 22.1.2.3 Array.of( ...items) + of: function of(/* ...args */){ + var index = 0 + , aLen = arguments.length + , result = new (typeof this == 'function' ? this : Array)(aLen); + while(aLen > index)createProperty(result, index, arguments[index++]); + result.length = aLen; + return result; + } + }); + +/***/ }, +/* 159 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // 22.1.3.13 Array.prototype.join(separator) + var $export = __webpack_require__(6) + , toIObject = __webpack_require__(30) + , arrayJoin = [].join; + + // fallback for not array-like strings + $export($export.P + $export.F * (__webpack_require__(31) != Object || !__webpack_require__(160)(arrayJoin)), 'Array', { + join: function join(separator){ + return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator); + } + }); + +/***/ }, +/* 160 */ +/***/ function(module, exports, __webpack_require__) { + + var fails = __webpack_require__(5); + + module.exports = function(method, arg){ + return !!method && fails(function(){ + arg ? method.call(null, function(){}, 1) : method.call(null); + }); + }; + +/***/ }, +/* 161 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , html = __webpack_require__(46) + , cof = __webpack_require__(32) + , toIndex = __webpack_require__(37) + , toLength = __webpack_require__(35) + , arraySlice = [].slice; + + // fallback for not array-like ES3 strings and DOM objects + $export($export.P + $export.F * __webpack_require__(5)(function(){ + if(html)arraySlice.call(html); + }), 'Array', { + slice: function slice(begin, end){ + var len = toLength(this.length) + , klass = cof(this); + end = end === undefined ? len : end; + if(klass == 'Array')return arraySlice.call(this, begin, end); + var start = toIndex(begin, len) + , upTo = toIndex(end, len) + , size = toLength(upTo - start) + , cloned = Array(size) + , i = 0; + for(; i < size; i++)cloned[i] = klass == 'String' + ? this.charAt(start + i) + : this[start + i]; + return cloned; + } + }); + +/***/ }, +/* 162 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , aFunction = __webpack_require__(19) + , toObject = __webpack_require__(56) + , fails = __webpack_require__(5) + , $sort = [].sort + , test = [1, 2, 3]; + + $export($export.P + $export.F * (fails(function(){ + // IE8- + test.sort(undefined); + }) || !fails(function(){ + // V8 bug + test.sort(null); + // Old WebKit + }) || !__webpack_require__(160)($sort)), 'Array', { + // 22.1.3.25 Array.prototype.sort(comparefn) + sort: function sort(comparefn){ + return comparefn === undefined + ? $sort.call(toObject(this)) + : $sort.call(toObject(this), aFunction(comparefn)); + } + }); + +/***/ }, +/* 163 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , $forEach = __webpack_require__(164)(0) + , STRICT = __webpack_require__(160)([].forEach, true); + + $export($export.P + $export.F * !STRICT, 'Array', { + // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) + forEach: function forEach(callbackfn /* , thisArg */){ + return $forEach(this, callbackfn, arguments[1]); + } + }); + +/***/ }, +/* 164 */ +/***/ function(module, exports, __webpack_require__) { + + // 0 -> Array#forEach + // 1 -> Array#map + // 2 -> Array#filter + // 3 -> Array#some + // 4 -> Array#every + // 5 -> Array#find + // 6 -> Array#findIndex + var ctx = __webpack_require__(18) + , IObject = __webpack_require__(31) + , toObject = __webpack_require__(56) + , toLength = __webpack_require__(35) + , asc = __webpack_require__(165); + module.exports = function(TYPE, $create){ + var IS_MAP = TYPE == 1 + , IS_FILTER = TYPE == 2 + , IS_SOME = TYPE == 3 + , IS_EVERY = TYPE == 4 + , IS_FIND_INDEX = TYPE == 6 + , NO_HOLES = TYPE == 5 || IS_FIND_INDEX + , create = $create || asc; + return function($this, callbackfn, that){ + var O = toObject($this) + , self = IObject(O) + , f = ctx(callbackfn, that, 3) + , length = toLength(self.length) + , index = 0 + , result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined + , val, res; + for(;length > index; index++)if(NO_HOLES || index in self){ + val = self[index]; + res = f(val, index, O); + if(TYPE){ + if(IS_MAP)result[index] = res; // map + else if(res)switch(TYPE){ + case 3: return true; // some + case 5: return val; // find + case 6: return index; // findIndex + case 2: result.push(val); // filter + } else if(IS_EVERY)return false; // every + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; + }; + }; + +/***/ }, +/* 165 */ +/***/ function(module, exports, __webpack_require__) { + + // 9.4.2.3 ArraySpeciesCreate(originalArray, length) + var speciesConstructor = __webpack_require__(166); + + module.exports = function(original, length){ + return new (speciesConstructor(original))(length); + }; + +/***/ }, +/* 166 */ +/***/ function(module, exports, __webpack_require__) { + + var isObject = __webpack_require__(11) + , isArray = __webpack_require__(43) + , SPECIES = __webpack_require__(23)('species'); + + module.exports = function(original){ + var C; + if(isArray(original)){ + C = original.constructor; + // cross-realm fallback + if(typeof C == 'function' && (C === Array || isArray(C.prototype)))C = undefined; + if(isObject(C)){ + C = C[SPECIES]; + if(C === null)C = undefined; + } + } return C === undefined ? Array : C; + }; + +/***/ }, +/* 167 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , $map = __webpack_require__(164)(1); + + $export($export.P + $export.F * !__webpack_require__(160)([].map, true), 'Array', { + // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) + map: function map(callbackfn /* , thisArg */){ + return $map(this, callbackfn, arguments[1]); + } + }); + +/***/ }, +/* 168 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , $filter = __webpack_require__(164)(2); + + $export($export.P + $export.F * !__webpack_require__(160)([].filter, true), 'Array', { + // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) + filter: function filter(callbackfn /* , thisArg */){ + return $filter(this, callbackfn, arguments[1]); + } + }); + +/***/ }, +/* 169 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , $some = __webpack_require__(164)(3); + + $export($export.P + $export.F * !__webpack_require__(160)([].some, true), 'Array', { + // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) + some: function some(callbackfn /* , thisArg */){ + return $some(this, callbackfn, arguments[1]); + } + }); + +/***/ }, +/* 170 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , $every = __webpack_require__(164)(4); + + $export($export.P + $export.F * !__webpack_require__(160)([].every, true), 'Array', { + // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) + every: function every(callbackfn /* , thisArg */){ + return $every(this, callbackfn, arguments[1]); + } + }); + +/***/ }, +/* 171 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , $reduce = __webpack_require__(172); + + $export($export.P + $export.F * !__webpack_require__(160)([].reduce, true), 'Array', { + // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) + reduce: function reduce(callbackfn /* , initialValue */){ + return $reduce(this, callbackfn, arguments.length, arguments[1], false); + } + }); + +/***/ }, +/* 172 */ +/***/ function(module, exports, __webpack_require__) { + + var aFunction = __webpack_require__(19) + , toObject = __webpack_require__(56) + , IObject = __webpack_require__(31) + , toLength = __webpack_require__(35); + + module.exports = function(that, callbackfn, aLen, memo, isRight){ + aFunction(callbackfn); + var O = toObject(that) + , self = IObject(O) + , length = toLength(O.length) + , index = isRight ? length - 1 : 0 + , i = isRight ? -1 : 1; + if(aLen < 2)for(;;){ + if(index in self){ + memo = self[index]; + index += i; + break; + } + index += i; + if(isRight ? index < 0 : length <= index){ + throw TypeError('Reduce of empty array with no initial value'); + } + } + for(;isRight ? index >= 0 : length > index; index += i)if(index in self){ + memo = callbackfn(memo, self[index], index, O); + } + return memo; + }; + +/***/ }, +/* 173 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , $reduce = __webpack_require__(172); + + $export($export.P + $export.F * !__webpack_require__(160)([].reduceRight, true), 'Array', { + // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) + reduceRight: function reduceRight(callbackfn /* , initialValue */){ + return $reduce(this, callbackfn, arguments.length, arguments[1], true); + } + }); + +/***/ }, +/* 174 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , $indexOf = __webpack_require__(34)(false) + , $native = [].indexOf + , NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; + + $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(160)($native)), 'Array', { + // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) + indexOf: function indexOf(searchElement /*, fromIndex = 0 */){ + return NEGATIVE_ZERO + // convert -0 to +0 + ? $native.apply(this, arguments) || 0 + : $indexOf(this, searchElement, arguments[1]); + } + }); + +/***/ }, +/* 175 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , toIObject = __webpack_require__(30) + , toInteger = __webpack_require__(36) + , toLength = __webpack_require__(35) + , $native = [].lastIndexOf + , NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; + + $export($export.P + $export.F * (NEGATIVE_ZERO || !__webpack_require__(160)($native)), 'Array', { + // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) + lastIndexOf: function lastIndexOf(searchElement /*, fromIndex = @[*-1] */){ + // convert -0 to +0 + if(NEGATIVE_ZERO)return $native.apply(this, arguments) || 0; + var O = toIObject(this) + , length = toLength(O.length) + , index = length - 1; + if(arguments.length > 1)index = Math.min(index, toInteger(arguments[1])); + if(index < 0)index = length + index; + for(;index >= 0; index--)if(index in O)if(O[index] === searchElement)return index || 0; + return -1; + } + }); + +/***/ }, +/* 176 */ +/***/ function(module, exports, __webpack_require__) { + + // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) + var $export = __webpack_require__(6); + + $export($export.P, 'Array', {copyWithin: __webpack_require__(177)}); + + __webpack_require__(178)('copyWithin'); + +/***/ }, +/* 177 */ +/***/ function(module, exports, __webpack_require__) { + + // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) + 'use strict'; + var toObject = __webpack_require__(56) + , toIndex = __webpack_require__(37) + , toLength = __webpack_require__(35); + + module.exports = [].copyWithin || function copyWithin(target/*= 0*/, start/*= 0, end = @length*/){ + var O = toObject(this) + , len = toLength(O.length) + , to = toIndex(target, len) + , from = toIndex(start, len) + , end = arguments.length > 2 ? arguments[2] : undefined + , count = Math.min((end === undefined ? len : toIndex(end, len)) - from, len - to) + , inc = 1; + if(from < to && to < from + count){ + inc = -1; + from += count - 1; + to += count - 1; + } + while(count-- > 0){ + if(from in O)O[to] = O[from]; + else delete O[to]; + to += inc; + from += inc; + } return O; + }; + +/***/ }, +/* 178 */ +/***/ function(module, exports, __webpack_require__) { + + // 22.1.3.31 Array.prototype[@@unscopables] + var UNSCOPABLES = __webpack_require__(23)('unscopables') + , ArrayProto = Array.prototype; + if(ArrayProto[UNSCOPABLES] == undefined)__webpack_require__(8)(ArrayProto, UNSCOPABLES, {}); + module.exports = function(key){ + ArrayProto[UNSCOPABLES][key] = true; + }; + +/***/ }, +/* 179 */ +/***/ function(module, exports, __webpack_require__) { + + // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) + var $export = __webpack_require__(6); + + $export($export.P, 'Array', {fill: __webpack_require__(180)}); + + __webpack_require__(178)('fill'); + +/***/ }, +/* 180 */ +/***/ function(module, exports, __webpack_require__) { + + // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) + 'use strict'; + var toObject = __webpack_require__(56) + , toIndex = __webpack_require__(37) + , toLength = __webpack_require__(35); + module.exports = function fill(value /*, start = 0, end = @length */){ + var O = toObject(this) + , length = toLength(O.length) + , aLen = arguments.length + , index = toIndex(aLen > 1 ? arguments[1] : undefined, length) + , end = aLen > 2 ? arguments[2] : undefined + , endPos = end === undefined ? length : toIndex(end, length); + while(endPos > index)O[index++] = value; + return O; + }; + +/***/ }, +/* 181 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) + var $export = __webpack_require__(6) + , $find = __webpack_require__(164)(5) + , KEY = 'find' + , forced = true; + // Shouldn't skip holes + if(KEY in [])Array(1)[KEY](function(){ forced = false; }); + $export($export.P + $export.F * forced, 'Array', { + find: function find(callbackfn/*, that = undefined */){ + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } + }); + __webpack_require__(178)(KEY); + +/***/ }, +/* 182 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) + var $export = __webpack_require__(6) + , $find = __webpack_require__(164)(6) + , KEY = 'findIndex' + , forced = true; + // Shouldn't skip holes + if(KEY in [])Array(1)[KEY](function(){ forced = false; }); + $export($export.P + $export.F * forced, 'Array', { + findIndex: function findIndex(callbackfn/*, that = undefined */){ + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } + }); + __webpack_require__(178)(KEY); + +/***/ }, +/* 183 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var addToUnscopables = __webpack_require__(178) + , step = __webpack_require__(184) + , Iterators = __webpack_require__(135) + , toIObject = __webpack_require__(30); + + // 22.1.3.4 Array.prototype.entries() + // 22.1.3.13 Array.prototype.keys() + // 22.1.3.29 Array.prototype.values() + // 22.1.3.30 Array.prototype[@@iterator]() + module.exports = __webpack_require__(134)(Array, 'Array', function(iterated, kind){ + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind + // 22.1.5.2.1 %ArrayIteratorPrototype%.next() + }, function(){ + var O = this._t + , kind = this._k + , index = this._i++; + if(!O || index >= O.length){ + this._t = undefined; + return step(1); + } + if(kind == 'keys' )return step(0, index); + if(kind == 'values')return step(0, O[index]); + return step(0, [index, O[index]]); + }, 'values'); + + // argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) + Iterators.Arguments = Iterators.Array; + + addToUnscopables('keys'); + addToUnscopables('values'); + addToUnscopables('entries'); + +/***/ }, +/* 184 */ +/***/ function(module, exports) { + + module.exports = function(done, value){ + return {value: value, done: !!done}; + }; + +/***/ }, +/* 185 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(186)('Array'); + +/***/ }, +/* 186 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var global = __webpack_require__(2) + , dP = __webpack_require__(9) + , DESCRIPTORS = __webpack_require__(4) + , SPECIES = __webpack_require__(23)('species'); + + module.exports = function(KEY){ + var C = global[KEY]; + if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, { + configurable: true, + get: function(){ return this; } + }); + }; + +/***/ }, +/* 187 */ +/***/ function(module, exports, __webpack_require__) { + + var global = __webpack_require__(2) + , inheritIfRequired = __webpack_require__(80) + , dP = __webpack_require__(9).f + , gOPN = __webpack_require__(48).f + , isRegExp = __webpack_require__(128) + , $flags = __webpack_require__(188) + , $RegExp = global.RegExp + , Base = $RegExp + , proto = $RegExp.prototype + , re1 = /a/g + , re2 = /a/g + // "new" creates a new object, old webkit buggy here + , CORRECT_NEW = new $RegExp(re1) !== re1; + + if(__webpack_require__(4) && (!CORRECT_NEW || __webpack_require__(5)(function(){ + re2[__webpack_require__(23)('match')] = false; + // RegExp constructor can alter flags and IsRegExp works correct with @@match + return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i'; + }))){ + $RegExp = function RegExp(p, f){ + var tiRE = this instanceof $RegExp + , piRE = isRegExp(p) + , fiU = f === undefined; + return !tiRE && piRE && p.constructor === $RegExp && fiU ? p + : inheritIfRequired(CORRECT_NEW + ? new Base(piRE && !fiU ? p.source : p, f) + : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f) + , tiRE ? this : proto, $RegExp); + }; + var proxy = function(key){ + key in $RegExp || dP($RegExp, key, { + configurable: true, + get: function(){ return Base[key]; }, + set: function(it){ Base[key] = it; } + }); + }; + for(var keys = gOPN(Base), i = 0; keys.length > i; )proxy(keys[i++]); + proto.constructor = $RegExp; + $RegExp.prototype = proto; + __webpack_require__(16)(global, 'RegExp', $RegExp); + } + + __webpack_require__(186)('RegExp'); + +/***/ }, +/* 188 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // 21.2.5.3 get RegExp.prototype.flags + var anObject = __webpack_require__(10); + module.exports = function(){ + var that = anObject(this) + , result = ''; + if(that.global) result += 'g'; + if(that.ignoreCase) result += 'i'; + if(that.multiline) result += 'm'; + if(that.unicode) result += 'u'; + if(that.sticky) result += 'y'; + return result; + }; + +/***/ }, +/* 189 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + __webpack_require__(190); + var anObject = __webpack_require__(10) + , $flags = __webpack_require__(188) + , DESCRIPTORS = __webpack_require__(4) + , TO_STRING = 'toString' + , $toString = /./[TO_STRING]; + + var define = function(fn){ + __webpack_require__(16)(RegExp.prototype, TO_STRING, fn, true); + }; + + // 21.2.5.14 RegExp.prototype.toString() + if(__webpack_require__(5)(function(){ return $toString.call({source: 'a', flags: 'b'}) != '/a/b'; })){ + define(function toString(){ + var R = anObject(this); + return '/'.concat(R.source, '/', + 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined); + }); + // FF44- RegExp#toString has a wrong name + } else if($toString.name != TO_STRING){ + define(function toString(){ + return $toString.call(this); + }); + } + +/***/ }, +/* 190 */ +/***/ function(module, exports, __webpack_require__) { + + // 21.2.5.3 get RegExp.prototype.flags() + if(__webpack_require__(4) && /./g.flags != 'g')__webpack_require__(9).f(RegExp.prototype, 'flags', { + configurable: true, + get: __webpack_require__(188) + }); + +/***/ }, +/* 191 */ +/***/ function(module, exports, __webpack_require__) { + + // @@match logic + __webpack_require__(192)('match', 1, function(defined, MATCH, $match){ + // 21.1.3.11 String.prototype.match(regexp) + return [function match(regexp){ + 'use strict'; + var O = defined(this) + , fn = regexp == undefined ? undefined : regexp[MATCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); + }, $match]; + }); + +/***/ }, +/* 192 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var hide = __webpack_require__(8) + , redefine = __webpack_require__(16) + , fails = __webpack_require__(5) + , defined = __webpack_require__(33) + , wks = __webpack_require__(23); + + module.exports = function(KEY, length, exec){ + var SYMBOL = wks(KEY) + , fns = exec(defined, SYMBOL, ''[KEY]) + , strfn = fns[0] + , rxfn = fns[1]; + if(fails(function(){ + var O = {}; + O[SYMBOL] = function(){ return 7; }; + return ''[KEY](O) != 7; + })){ + redefine(String.prototype, KEY, strfn); + hide(RegExp.prototype, SYMBOL, length == 2 + // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) + // 21.2.5.11 RegExp.prototype[@@split](string, limit) + ? function(string, arg){ return rxfn.call(string, this, arg); } + // 21.2.5.6 RegExp.prototype[@@match](string) + // 21.2.5.9 RegExp.prototype[@@search](string) + : function(string){ return rxfn.call(string, this); } + ); + } + }; + +/***/ }, +/* 193 */ +/***/ function(module, exports, __webpack_require__) { + + // @@replace logic + __webpack_require__(192)('replace', 2, function(defined, REPLACE, $replace){ + // 21.1.3.14 String.prototype.replace(searchValue, replaceValue) + return [function replace(searchValue, replaceValue){ + 'use strict'; + var O = defined(this) + , fn = searchValue == undefined ? undefined : searchValue[REPLACE]; + return fn !== undefined + ? fn.call(searchValue, O, replaceValue) + : $replace.call(String(O), searchValue, replaceValue); + }, $replace]; + }); + +/***/ }, +/* 194 */ +/***/ function(module, exports, __webpack_require__) { + + // @@search logic + __webpack_require__(192)('search', 1, function(defined, SEARCH, $search){ + // 21.1.3.15 String.prototype.search(regexp) + return [function search(regexp){ + 'use strict'; + var O = defined(this) + , fn = regexp == undefined ? undefined : regexp[SEARCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); + }, $search]; + }); + +/***/ }, +/* 195 */ +/***/ function(module, exports, __webpack_require__) { + + // @@split logic + __webpack_require__(192)('split', 2, function(defined, SPLIT, $split){ + 'use strict'; + var isRegExp = __webpack_require__(128) + , _split = $split + , $push = [].push + , $SPLIT = 'split' + , LENGTH = 'length' + , LAST_INDEX = 'lastIndex'; + if( + 'abbc'[$SPLIT](/(b)*/)[1] == 'c' || + 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || + 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || + '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || + '.'[$SPLIT](/()()/)[LENGTH] > 1 || + ''[$SPLIT](/.?/)[LENGTH] + ){ + var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group + // based on es5-shim implementation, need to rework it + $split = function(separator, limit){ + var string = String(this); + if(separator === undefined && limit === 0)return []; + // If `separator` is not a regex, use native split + if(!isRegExp(separator))return _split.call(string, separator, limit); + var output = []; + var flags = (separator.ignoreCase ? 'i' : '') + + (separator.multiline ? 'm' : '') + + (separator.unicode ? 'u' : '') + + (separator.sticky ? 'y' : ''); + var lastLastIndex = 0; + var splitLimit = limit === undefined ? 4294967295 : limit >>> 0; + // Make `global` and avoid `lastIndex` issues by working with a copy + var separatorCopy = new RegExp(separator.source, flags + 'g'); + var separator2, match, lastIndex, lastLength, i; + // Doesn't need flags gy, but they don't hurt + if(!NPCG)separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags); + while(match = separatorCopy.exec(string)){ + // `separatorCopy.lastIndex` is not reliable cross-browser + lastIndex = match.index + match[0][LENGTH]; + if(lastIndex > lastLastIndex){ + output.push(string.slice(lastLastIndex, match.index)); + // Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG + if(!NPCG && match[LENGTH] > 1)match[0].replace(separator2, function(){ + for(i = 1; i < arguments[LENGTH] - 2; i++)if(arguments[i] === undefined)match[i] = undefined; + }); + if(match[LENGTH] > 1 && match.index < string[LENGTH])$push.apply(output, match.slice(1)); + lastLength = match[0][LENGTH]; + lastLastIndex = lastIndex; + if(output[LENGTH] >= splitLimit)break; + } + if(separatorCopy[LAST_INDEX] === match.index)separatorCopy[LAST_INDEX]++; // Avoid an infinite loop + } + if(lastLastIndex === string[LENGTH]){ + if(lastLength || !separatorCopy.test(''))output.push(''); + } else output.push(string.slice(lastLastIndex)); + return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output; + }; + // Chakra, V8 + } else if('0'[$SPLIT](undefined, 0)[LENGTH]){ + $split = function(separator, limit){ + return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit); + }; + } + // 21.1.3.17 String.prototype.split(separator, limit) + return [function split(separator, limit){ + var O = defined(this) + , fn = separator == undefined ? undefined : separator[SPLIT]; + return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit); + }, $split]; + }); + +/***/ }, +/* 196 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var LIBRARY = __webpack_require__(26) + , global = __webpack_require__(2) + , ctx = __webpack_require__(18) + , classof = __webpack_require__(73) + , $export = __webpack_require__(6) + , isObject = __webpack_require__(11) + , aFunction = __webpack_require__(19) + , anInstance = __webpack_require__(197) + , forOf = __webpack_require__(198) + , speciesConstructor = __webpack_require__(199) + , task = __webpack_require__(200).set + , microtask = __webpack_require__(201)() + , PROMISE = 'Promise' + , TypeError = global.TypeError + , process = global.process + , $Promise = global[PROMISE] + , process = global.process + , isNode = classof(process) == 'process' + , empty = function(){ /* empty */ } + , Internal, GenericPromiseCapability, Wrapper; + + var USE_NATIVE = !!function(){ + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1) + , FakePromise = (promise.constructor = {})[__webpack_require__(23)('species')] = function(exec){ exec(empty, empty); }; + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise; + } catch(e){ /* empty */ } + }(); + + // helpers + var sameConstructor = function(a, b){ + // with library wrapper special case + return a === b || a === $Promise && b === Wrapper; + }; + var isThenable = function(it){ + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; + }; + var newPromiseCapability = function(C){ + return sameConstructor($Promise, C) + ? new PromiseCapability(C) + : new GenericPromiseCapability(C); + }; + var PromiseCapability = GenericPromiseCapability = function(C){ + var resolve, reject; + this.promise = new C(function($$resolve, $$reject){ + if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); + }; + var perform = function(exec){ + try { + exec(); + } catch(e){ + return {error: e}; + } + }; + var notify = function(promise, isReject){ + if(promise._n)return; + promise._n = true; + var chain = promise._c; + microtask(function(){ + var value = promise._v + , ok = promise._s == 1 + , i = 0; + var run = function(reaction){ + var handler = ok ? reaction.ok : reaction.fail + , resolve = reaction.resolve + , reject = reaction.reject + , domain = reaction.domain + , result, then; + try { + if(handler){ + if(!ok){ + if(promise._h == 2)onHandleUnhandled(promise); + promise._h = 1; + } + if(handler === true)result = value; + else { + if(domain)domain.enter(); + result = handler(value); + if(domain)domain.exit(); + } + if(result === reaction.promise){ + reject(TypeError('Promise-chain cycle')); + } else if(then = isThenable(result)){ + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch(e){ + reject(e); + } + }; + while(chain.length > i)run(chain[i++]); // variable length - can't use forEach + promise._c = []; + promise._n = false; + if(isReject && !promise._h)onUnhandled(promise); + }); + }; + var onUnhandled = function(promise){ + task.call(global, function(){ + var value = promise._v + , abrupt, handler, console; + if(isUnhandled(promise)){ + abrupt = perform(function(){ + if(isNode){ + process.emit('unhandledRejection', value, promise); + } else if(handler = global.onunhandledrejection){ + handler({promise: promise, reason: value}); + } else if((console = global.console) && console.error){ + console.error('Unhandled promise rejection', value); + } + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } promise._a = undefined; + if(abrupt)throw abrupt.error; + }); + }; + var isUnhandled = function(promise){ + if(promise._h == 1)return false; + var chain = promise._a || promise._c + , i = 0 + , reaction; + while(chain.length > i){ + reaction = chain[i++]; + if(reaction.fail || !isUnhandled(reaction.promise))return false; + } return true; + }; + var onHandleUnhandled = function(promise){ + task.call(global, function(){ + var handler; + if(isNode){ + process.emit('rejectionHandled', promise); + } else if(handler = global.onrejectionhandled){ + handler({promise: promise, reason: promise._v}); + } + }); + }; + var $reject = function(value){ + var promise = this; + if(promise._d)return; + promise._d = true; + promise = promise._w || promise; // unwrap + promise._v = value; + promise._s = 2; + if(!promise._a)promise._a = promise._c.slice(); + notify(promise, true); + }; + var $resolve = function(value){ + var promise = this + , then; + if(promise._d)return; + promise._d = true; + promise = promise._w || promise; // unwrap + try { + if(promise === value)throw TypeError("Promise can't be resolved itself"); + if(then = isThenable(value)){ + microtask(function(){ + var wrapper = {_w: promise, _d: false}; // wrap + try { + then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); + } catch(e){ + $reject.call(wrapper, e); + } + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); + } + } catch(e){ + $reject.call({_w: promise, _d: false}, e); // wrap + } + }; + + // constructor polyfill + if(!USE_NATIVE){ + // 25.4.3.1 Promise(executor) + $Promise = function Promise(executor){ + anInstance(this, $Promise, PROMISE, '_h'); + aFunction(executor); + Internal.call(this); + try { + executor(ctx($resolve, this, 1), ctx($reject, this, 1)); + } catch(err){ + $reject.call(this, err); + } + }; + Internal = function Promise(executor){ + this._c = []; // <- awaiting reactions + this._a = undefined; // <- checked in isUnhandled reactions + this._s = 0; // <- state + this._d = false; // <- done + this._v = undefined; // <- value + this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled + this._n = false; // <- notify + }; + Internal.prototype = __webpack_require__(202)($Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function then(onFulfilled, onRejected){ + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = isNode ? process.domain : undefined; + this._c.push(reaction); + if(this._a)this._a.push(reaction); + if(this._s)notify(this, false); + return reaction.promise; + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + 'catch': function(onRejected){ + return this.then(undefined, onRejected); + } + }); + PromiseCapability = function(){ + var promise = new Internal; + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; + } + + $export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise}); + __webpack_require__(22)($Promise, PROMISE); + __webpack_require__(186)(PROMISE); + Wrapper = __webpack_require__(7)[PROMISE]; + + // statics + $export($export.S + $export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject(r){ + var capability = newPromiseCapability(this) + , $$reject = capability.reject; + $$reject(r); + return capability.promise; + } + }); + $export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve(x){ + // instanceof instead of internal slot check because we should fix it without replacement native Promise core + if(x instanceof $Promise && sameConstructor(x.constructor, this))return x; + var capability = newPromiseCapability(this) + , $$resolve = capability.resolve; + $$resolve(x); + return capability.promise; + } + }); + $export($export.S + $export.F * !(USE_NATIVE && __webpack_require__(157)(function(iter){ + $Promise.all(iter)['catch'](empty); + })), PROMISE, { + // 25.4.4.1 Promise.all(iterable) + all: function all(iterable){ + var C = this + , capability = newPromiseCapability(C) + , resolve = capability.resolve + , reject = capability.reject; + var abrupt = perform(function(){ + var values = [] + , index = 0 + , remaining = 1; + forOf(iterable, false, function(promise){ + var $index = index++ + , alreadyCalled = false; + values.push(undefined); + remaining++; + C.resolve(promise).then(function(value){ + if(alreadyCalled)return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if(abrupt)reject(abrupt.error); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable){ + var C = this + , capability = newPromiseCapability(C) + , reject = capability.reject; + var abrupt = perform(function(){ + forOf(iterable, false, function(promise){ + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if(abrupt)reject(abrupt.error); + return capability.promise; + } + }); + +/***/ }, +/* 197 */ +/***/ function(module, exports) { + + module.exports = function(it, Constructor, name, forbiddenField){ + if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){ + throw TypeError(name + ': incorrect invocation!'); + } return it; + }; + +/***/ }, +/* 198 */ +/***/ function(module, exports, __webpack_require__) { + + var ctx = __webpack_require__(18) + , call = __webpack_require__(153) + , isArrayIter = __webpack_require__(154) + , anObject = __webpack_require__(10) + , toLength = __webpack_require__(35) + , getIterFn = __webpack_require__(156) + , BREAK = {} + , RETURN = {}; + var exports = module.exports = function(iterable, entries, fn, that, ITERATOR){ + var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable) + , f = ctx(fn, that, entries ? 2 : 1) + , index = 0 + , length, step, iterator, result; + if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){ + result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); + if(result === BREAK || result === RETURN)return result; + } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){ + result = call(iterator, f, step.value, entries); + if(result === BREAK || result === RETURN)return result; + } + }; + exports.BREAK = BREAK; + exports.RETURN = RETURN; + +/***/ }, +/* 199 */ +/***/ function(module, exports, __webpack_require__) { + + // 7.3.20 SpeciesConstructor(O, defaultConstructor) + var anObject = __webpack_require__(10) + , aFunction = __webpack_require__(19) + , SPECIES = __webpack_require__(23)('species'); + module.exports = function(O, D){ + var C = anObject(O).constructor, S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); + }; + +/***/ }, +/* 200 */ +/***/ function(module, exports, __webpack_require__) { + + var ctx = __webpack_require__(18) + , invoke = __webpack_require__(76) + , html = __webpack_require__(46) + , cel = __webpack_require__(13) + , global = __webpack_require__(2) + , process = global.process + , setTask = global.setImmediate + , clearTask = global.clearImmediate + , MessageChannel = global.MessageChannel + , counter = 0 + , queue = {} + , ONREADYSTATECHANGE = 'onreadystatechange' + , defer, channel, port; + var run = function(){ + var id = +this; + if(queue.hasOwnProperty(id)){ + var fn = queue[id]; + delete queue[id]; + fn(); + } + }; + var listener = function(event){ + run.call(event.data); + }; + // Node.js 0.9+ & IE10+ has setImmediate, otherwise: + if(!setTask || !clearTask){ + setTask = function setImmediate(fn){ + var args = [], i = 1; + while(arguments.length > i)args.push(arguments[i++]); + queue[++counter] = function(){ + invoke(typeof fn == 'function' ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate(id){ + delete queue[id]; + }; + // Node.js 0.8- + if(__webpack_require__(32)(process) == 'process'){ + defer = function(id){ + process.nextTick(ctx(run, id, 1)); + }; + // Browsers with MessageChannel, includes WebWorkers + } else if(MessageChannel){ + channel = new MessageChannel; + port = channel.port2; + channel.port1.onmessage = listener; + defer = ctx(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){ + defer = function(id){ + global.postMessage(id + '', '*'); + }; + global.addEventListener('message', listener, false); + // IE8- + } else if(ONREADYSTATECHANGE in cel('script')){ + defer = function(id){ + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){ + html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers + } else { + defer = function(id){ + setTimeout(ctx(run, id, 1), 0); + }; + } + } + module.exports = { + set: setTask, + clear: clearTask + }; + +/***/ }, +/* 201 */ +/***/ function(module, exports, __webpack_require__) { + + var global = __webpack_require__(2) + , macrotask = __webpack_require__(200).set + , Observer = global.MutationObserver || global.WebKitMutationObserver + , process = global.process + , Promise = global.Promise + , isNode = __webpack_require__(32)(process) == 'process'; + + module.exports = function(){ + var head, last, notify; + + var flush = function(){ + var parent, fn; + if(isNode && (parent = process.domain))parent.exit(); + while(head){ + fn = head.fn; + head = head.next; + try { + fn(); + } catch(e){ + if(head)notify(); + else last = undefined; + throw e; + } + } last = undefined; + if(parent)parent.enter(); + }; + + // Node.js + if(isNode){ + notify = function(){ + process.nextTick(flush); + }; + // browsers with MutationObserver + } else if(Observer){ + var toggle = true + , node = document.createTextNode(''); + new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new + notify = function(){ + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if(Promise && Promise.resolve){ + var promise = Promise.resolve(); + notify = function(){ + promise.then(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function(){ + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(global, flush); + }; + } + + return function(fn){ + var task = {fn: fn, next: undefined}; + if(last)last.next = task; + if(!head){ + head = task; + notify(); + } last = task; + }; + }; + +/***/ }, +/* 202 */ +/***/ function(module, exports, __webpack_require__) { + + var redefine = __webpack_require__(16); + module.exports = function(target, src, safe){ + for(var key in src)redefine(target, key, src[key], safe); + return target; + }; + +/***/ }, +/* 203 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var strong = __webpack_require__(204); + + // 23.1 Map Objects + module.exports = __webpack_require__(205)('Map', function(get){ + return function Map(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; + }, { + // 23.1.3.6 Map.prototype.get(key) + get: function get(key){ + var entry = strong.getEntry(this, key); + return entry && entry.v; + }, + // 23.1.3.9 Map.prototype.set(key, value) + set: function set(key, value){ + return strong.def(this, key === 0 ? 0 : key, value); + } + }, strong, true); + +/***/ }, +/* 204 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var dP = __webpack_require__(9).f + , create = __webpack_require__(44) + , redefineAll = __webpack_require__(202) + , ctx = __webpack_require__(18) + , anInstance = __webpack_require__(197) + , defined = __webpack_require__(33) + , forOf = __webpack_require__(198) + , $iterDefine = __webpack_require__(134) + , step = __webpack_require__(184) + , setSpecies = __webpack_require__(186) + , DESCRIPTORS = __webpack_require__(4) + , fastKey = __webpack_require__(20).fastKey + , SIZE = DESCRIPTORS ? '_s' : 'size'; + + var getEntry = function(that, key){ + // fast case + var index = fastKey(key), entry; + if(index !== 'F')return that._i[index]; + // frozen object case + for(entry = that._f; entry; entry = entry.n){ + if(entry.k == key)return entry; + } + }; + + module.exports = { + getConstructor: function(wrapper, NAME, IS_MAP, ADDER){ + var C = wrapper(function(that, iterable){ + anInstance(that, C, NAME, '_i'); + that._i = create(null); // index + that._f = undefined; // first entry + that._l = undefined; // last entry + that[SIZE] = 0; // size + if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear(){ + for(var that = this, data = that._i, entry = that._f; entry; entry = entry.n){ + entry.r = true; + if(entry.p)entry.p = entry.p.n = undefined; + delete data[entry.i]; + } + that._f = that._l = undefined; + that[SIZE] = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + 'delete': function(key){ + var that = this + , entry = getEntry(that, key); + if(entry){ + var next = entry.n + , prev = entry.p; + delete that._i[entry.i]; + entry.r = true; + if(prev)prev.n = next; + if(next)next.p = prev; + if(that._f == entry)that._f = next; + if(that._l == entry)that._l = prev; + that[SIZE]--; + } return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach(callbackfn /*, that = undefined */){ + anInstance(this, C, 'forEach'); + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3) + , entry; + while(entry = entry ? entry.n : this._f){ + f(entry.v, entry.k, this); + // revert to the last existing entry + while(entry && entry.r)entry = entry.p; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has(key){ + return !!getEntry(this, key); + } + }); + if(DESCRIPTORS)dP(C.prototype, 'size', { + get: function(){ + return defined(this[SIZE]); + } + }); + return C; + }, + def: function(that, key, value){ + var entry = getEntry(that, key) + , prev, index; + // change existing entry + if(entry){ + entry.v = value; + // create new entry + } else { + that._l = entry = { + i: index = fastKey(key, true), // <- index + k: key, // <- key + v: value, // <- value + p: prev = that._l, // <- previous entry + n: undefined, // <- next entry + r: false // <- removed + }; + if(!that._f)that._f = entry; + if(prev)prev.n = entry; + that[SIZE]++; + // add to index + if(index !== 'F')that._i[index] = entry; + } return that; + }, + getEntry: getEntry, + setStrong: function(C, NAME, IS_MAP){ + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + $iterDefine(C, NAME, function(iterated, kind){ + this._t = iterated; // target + this._k = kind; // kind + this._l = undefined; // previous + }, function(){ + var that = this + , kind = that._k + , entry = that._l; + // revert to the last existing entry + while(entry && entry.r)entry = entry.p; + // get next entry + if(!that._t || !(that._l = entry = entry ? entry.n : that._t._f)){ + // or finish the iteration + that._t = undefined; + return step(1); + } + // return step by kind + if(kind == 'keys' )return step(0, entry.k); + if(kind == 'values')return step(0, entry.v); + return step(0, [entry.k, entry.v]); + }, IS_MAP ? 'entries' : 'values' , !IS_MAP, true); + + // add [@@species], 23.1.2.2, 23.2.2.2 + setSpecies(NAME); + } + }; + +/***/ }, +/* 205 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var global = __webpack_require__(2) + , $export = __webpack_require__(6) + , redefine = __webpack_require__(16) + , redefineAll = __webpack_require__(202) + , meta = __webpack_require__(20) + , forOf = __webpack_require__(198) + , anInstance = __webpack_require__(197) + , isObject = __webpack_require__(11) + , fails = __webpack_require__(5) + , $iterDetect = __webpack_require__(157) + , setToStringTag = __webpack_require__(22) + , inheritIfRequired = __webpack_require__(80); + + module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){ + var Base = global[NAME] + , C = Base + , ADDER = IS_MAP ? 'set' : 'add' + , proto = C && C.prototype + , O = {}; + var fixMethod = function(KEY){ + var fn = proto[KEY]; + redefine(proto, KEY, + KEY == 'delete' ? function(a){ + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); + } : KEY == 'has' ? function has(a){ + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); + } : KEY == 'get' ? function get(a){ + return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a); + } : KEY == 'add' ? function add(a){ fn.call(this, a === 0 ? 0 : a); return this; } + : function set(a, b){ fn.call(this, a === 0 ? 0 : a, b); return this; } + ); + }; + if(typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function(){ + new C().entries().next(); + }))){ + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + redefineAll(C.prototype, methods); + meta.NEED = true; + } else { + var instance = new C + // early implementations not supports chaining + , HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance + // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false + , THROWS_ON_PRIMITIVES = fails(function(){ instance.has(1); }) + // most early implementations doesn't supports iterables, most modern - not close it correctly + , ACCEPT_ITERABLES = $iterDetect(function(iter){ new C(iter); }) // eslint-disable-line no-new + // for early implementations -0 and +0 not the same + , BUGGY_ZERO = !IS_WEAK && fails(function(){ + // V8 ~ Chromium 42- fails only with 5+ elements + var $instance = new C() + , index = 5; + while(index--)$instance[ADDER](index, index); + return !$instance.has(-0); + }); + if(!ACCEPT_ITERABLES){ + C = wrapper(function(target, iterable){ + anInstance(target, C, NAME); + var that = inheritIfRequired(new Base, target, C); + if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); + return that; + }); + C.prototype = proto; + proto.constructor = C; + } + if(THROWS_ON_PRIMITIVES || BUGGY_ZERO){ + fixMethod('delete'); + fixMethod('has'); + IS_MAP && fixMethod('get'); + } + if(BUGGY_ZERO || HASNT_CHAINING)fixMethod(ADDER); + // weak collections should not contains .clear method + if(IS_WEAK && proto.clear)delete proto.clear; + } + + setToStringTag(C, NAME); + + O[NAME] = C; + $export($export.G + $export.W + $export.F * (C != Base), O); + + if(!IS_WEAK)common.setStrong(C, NAME, IS_MAP); + + return C; + }; + +/***/ }, +/* 206 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var strong = __webpack_require__(204); + + // 23.2 Set Objects + module.exports = __webpack_require__(205)('Set', function(get){ + return function Set(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; + }, { + // 23.2.3.1 Set.prototype.add(value) + add: function add(value){ + return strong.def(this, value = value === 0 ? 0 : value, value); + } + }, strong); + +/***/ }, +/* 207 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var each = __webpack_require__(164)(0) + , redefine = __webpack_require__(16) + , meta = __webpack_require__(20) + , assign = __webpack_require__(67) + , weak = __webpack_require__(208) + , isObject = __webpack_require__(11) + , getWeak = meta.getWeak + , isExtensible = Object.isExtensible + , uncaughtFrozenStore = weak.ufstore + , tmp = {} + , InternalMap; + + var wrapper = function(get){ + return function WeakMap(){ + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; + }; + + var methods = { + // 23.3.3.3 WeakMap.prototype.get(key) + get: function get(key){ + if(isObject(key)){ + var data = getWeak(key); + if(data === true)return uncaughtFrozenStore(this).get(key); + return data ? data[this._i] : undefined; + } + }, + // 23.3.3.5 WeakMap.prototype.set(key, value) + set: function set(key, value){ + return weak.def(this, key, value); + } + }; + + // 23.3 WeakMap Objects + var $WeakMap = module.exports = __webpack_require__(205)('WeakMap', wrapper, methods, weak, true, true); + + // IE11 WeakMap frozen keys fix + if(new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7){ + InternalMap = weak.getConstructor(wrapper); + assign(InternalMap.prototype, methods); + meta.NEED = true; + each(['delete', 'has', 'get', 'set'], function(key){ + var proto = $WeakMap.prototype + , method = proto[key]; + redefine(proto, key, function(a, b){ + // store frozen objects on internal weakmap shim + if(isObject(a) && !isExtensible(a)){ + if(!this._f)this._f = new InternalMap; + var result = this._f[key](a, b); + return key == 'set' ? this : result; + // store all the rest on native weakmap + } return method.call(this, a, b); + }); + }); + } + +/***/ }, +/* 208 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var redefineAll = __webpack_require__(202) + , getWeak = __webpack_require__(20).getWeak + , anObject = __webpack_require__(10) + , isObject = __webpack_require__(11) + , anInstance = __webpack_require__(197) + , forOf = __webpack_require__(198) + , createArrayMethod = __webpack_require__(164) + , $has = __webpack_require__(3) + , arrayFind = createArrayMethod(5) + , arrayFindIndex = createArrayMethod(6) + , id = 0; + + // fallback for uncaught frozen keys + var uncaughtFrozenStore = function(that){ + return that._l || (that._l = new UncaughtFrozenStore); + }; + var UncaughtFrozenStore = function(){ + this.a = []; + }; + var findUncaughtFrozen = function(store, key){ + return arrayFind(store.a, function(it){ + return it[0] === key; + }); + }; + UncaughtFrozenStore.prototype = { + get: function(key){ + var entry = findUncaughtFrozen(this, key); + if(entry)return entry[1]; + }, + has: function(key){ + return !!findUncaughtFrozen(this, key); + }, + set: function(key, value){ + var entry = findUncaughtFrozen(this, key); + if(entry)entry[1] = value; + else this.a.push([key, value]); + }, + 'delete': function(key){ + var index = arrayFindIndex(this.a, function(it){ + return it[0] === key; + }); + if(~index)this.a.splice(index, 1); + return !!~index; + } + }; + + module.exports = { + getConstructor: function(wrapper, NAME, IS_MAP, ADDER){ + var C = wrapper(function(that, iterable){ + anInstance(that, C, NAME, '_i'); + that._i = id++; // collection id + that._l = undefined; // leak store for uncaught frozen objects + if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.3.3.2 WeakMap.prototype.delete(key) + // 23.4.3.3 WeakSet.prototype.delete(value) + 'delete': function(key){ + if(!isObject(key))return false; + var data = getWeak(key); + if(data === true)return uncaughtFrozenStore(this)['delete'](key); + return data && $has(data, this._i) && delete data[this._i]; + }, + // 23.3.3.4 WeakMap.prototype.has(key) + // 23.4.3.4 WeakSet.prototype.has(value) + has: function has(key){ + if(!isObject(key))return false; + var data = getWeak(key); + if(data === true)return uncaughtFrozenStore(this).has(key); + return data && $has(data, this._i); + } + }); + return C; + }, + def: function(that, key, value){ + var data = getWeak(anObject(key), true); + if(data === true)uncaughtFrozenStore(that).set(key, value); + else data[that._i] = value; + return that; + }, + ufstore: uncaughtFrozenStore + }; + +/***/ }, +/* 209 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var weak = __webpack_require__(208); + + // 23.4 WeakSet Objects + __webpack_require__(205)('WeakSet', function(get){ + return function WeakSet(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; + }, { + // 23.4.3.1 WeakSet.prototype.add(value) + add: function add(value){ + return weak.def(this, value, true); + } + }, weak, false, true); + +/***/ }, +/* 210 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.1 Reflect.apply(target, thisArgument, argumentsList) + var $export = __webpack_require__(6) + , aFunction = __webpack_require__(19) + , anObject = __webpack_require__(10) + , rApply = (__webpack_require__(2).Reflect || {}).apply + , fApply = Function.apply; + // MS Edge argumentsList argument is optional + $export($export.S + $export.F * !__webpack_require__(5)(function(){ + rApply(function(){}); + }), 'Reflect', { + apply: function apply(target, thisArgument, argumentsList){ + var T = aFunction(target) + , L = anObject(argumentsList); + return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L); + } + }); + +/***/ }, +/* 211 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) + var $export = __webpack_require__(6) + , create = __webpack_require__(44) + , aFunction = __webpack_require__(19) + , anObject = __webpack_require__(10) + , isObject = __webpack_require__(11) + , fails = __webpack_require__(5) + , bind = __webpack_require__(75) + , rConstruct = (__webpack_require__(2).Reflect || {}).construct; + + // MS Edge supports only 2 arguments and argumentsList argument is optional + // FF Nightly sets third argument as `new.target`, but does not create `this` from it + var NEW_TARGET_BUG = fails(function(){ + function F(){} + return !(rConstruct(function(){}, [], F) instanceof F); + }); + var ARGS_BUG = !fails(function(){ + rConstruct(function(){}); + }); + + $export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { + construct: function construct(Target, args /*, newTarget*/){ + aFunction(Target); + anObject(args); + var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); + if(ARGS_BUG && !NEW_TARGET_BUG)return rConstruct(Target, args, newTarget); + if(Target == newTarget){ + // w/o altered newTarget, optimization for 0-4 arguments + switch(args.length){ + case 0: return new Target; + case 1: return new Target(args[0]); + case 2: return new Target(args[0], args[1]); + case 3: return new Target(args[0], args[1], args[2]); + case 4: return new Target(args[0], args[1], args[2], args[3]); + } + // w/o altered newTarget, lot of arguments case + var $args = [null]; + $args.push.apply($args, args); + return new (bind.apply(Target, $args)); + } + // with altered newTarget, not support built-in constructors + var proto = newTarget.prototype + , instance = create(isObject(proto) ? proto : Object.prototype) + , result = Function.apply.call(Target, instance, args); + return isObject(result) ? result : instance; + } + }); + +/***/ }, +/* 212 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) + var dP = __webpack_require__(9) + , $export = __webpack_require__(6) + , anObject = __webpack_require__(10) + , toPrimitive = __webpack_require__(14); + + // MS Edge has broken Reflect.defineProperty - throwing instead of returning false + $export($export.S + $export.F * __webpack_require__(5)(function(){ + Reflect.defineProperty(dP.f({}, 1, {value: 1}), 1, {value: 2}); + }), 'Reflect', { + defineProperty: function defineProperty(target, propertyKey, attributes){ + anObject(target); + propertyKey = toPrimitive(propertyKey, true); + anObject(attributes); + try { + dP.f(target, propertyKey, attributes); + return true; + } catch(e){ + return false; + } + } + }); + +/***/ }, +/* 213 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.4 Reflect.deleteProperty(target, propertyKey) + var $export = __webpack_require__(6) + , gOPD = __webpack_require__(49).f + , anObject = __webpack_require__(10); + + $export($export.S, 'Reflect', { + deleteProperty: function deleteProperty(target, propertyKey){ + var desc = gOPD(anObject(target), propertyKey); + return desc && !desc.configurable ? false : delete target[propertyKey]; + } + }); + +/***/ }, +/* 214 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // 26.1.5 Reflect.enumerate(target) + var $export = __webpack_require__(6) + , anObject = __webpack_require__(10); + var Enumerate = function(iterated){ + this._t = anObject(iterated); // target + this._i = 0; // next index + var keys = this._k = [] // keys + , key; + for(key in iterated)keys.push(key); + }; + __webpack_require__(136)(Enumerate, 'Object', function(){ + var that = this + , keys = that._k + , key; + do { + if(that._i >= keys.length)return {value: undefined, done: true}; + } while(!((key = keys[that._i++]) in that._t)); + return {value: key, done: false}; + }); + + $export($export.S, 'Reflect', { + enumerate: function enumerate(target){ + return new Enumerate(target); + } + }); + +/***/ }, +/* 215 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.6 Reflect.get(target, propertyKey [, receiver]) + var gOPD = __webpack_require__(49) + , getPrototypeOf = __webpack_require__(57) + , has = __webpack_require__(3) + , $export = __webpack_require__(6) + , isObject = __webpack_require__(11) + , anObject = __webpack_require__(10); + + function get(target, propertyKey/*, receiver*/){ + var receiver = arguments.length < 3 ? target : arguments[2] + , desc, proto; + if(anObject(target) === receiver)return target[propertyKey]; + if(desc = gOPD.f(target, propertyKey))return has(desc, 'value') + ? desc.value + : desc.get !== undefined + ? desc.get.call(receiver) + : undefined; + if(isObject(proto = getPrototypeOf(target)))return get(proto, propertyKey, receiver); + } + + $export($export.S, 'Reflect', {get: get}); + +/***/ }, +/* 216 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) + var gOPD = __webpack_require__(49) + , $export = __webpack_require__(6) + , anObject = __webpack_require__(10); + + $export($export.S, 'Reflect', { + getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey){ + return gOPD.f(anObject(target), propertyKey); + } + }); + +/***/ }, +/* 217 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.8 Reflect.getPrototypeOf(target) + var $export = __webpack_require__(6) + , getProto = __webpack_require__(57) + , anObject = __webpack_require__(10); + + $export($export.S, 'Reflect', { + getPrototypeOf: function getPrototypeOf(target){ + return getProto(anObject(target)); + } + }); + +/***/ }, +/* 218 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.9 Reflect.has(target, propertyKey) + var $export = __webpack_require__(6); + + $export($export.S, 'Reflect', { + has: function has(target, propertyKey){ + return propertyKey in target; + } + }); + +/***/ }, +/* 219 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.10 Reflect.isExtensible(target) + var $export = __webpack_require__(6) + , anObject = __webpack_require__(10) + , $isExtensible = Object.isExtensible; + + $export($export.S, 'Reflect', { + isExtensible: function isExtensible(target){ + anObject(target); + return $isExtensible ? $isExtensible(target) : true; + } + }); + +/***/ }, +/* 220 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.11 Reflect.ownKeys(target) + var $export = __webpack_require__(6); + + $export($export.S, 'Reflect', {ownKeys: __webpack_require__(221)}); + +/***/ }, +/* 221 */ +/***/ function(module, exports, __webpack_require__) { + + // all object keys, includes non-enumerable and symbols + var gOPN = __webpack_require__(48) + , gOPS = __webpack_require__(41) + , anObject = __webpack_require__(10) + , Reflect = __webpack_require__(2).Reflect; + module.exports = Reflect && Reflect.ownKeys || function ownKeys(it){ + var keys = gOPN.f(anObject(it)) + , getSymbols = gOPS.f; + return getSymbols ? keys.concat(getSymbols(it)) : keys; + }; + +/***/ }, +/* 222 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.12 Reflect.preventExtensions(target) + var $export = __webpack_require__(6) + , anObject = __webpack_require__(10) + , $preventExtensions = Object.preventExtensions; + + $export($export.S, 'Reflect', { + preventExtensions: function preventExtensions(target){ + anObject(target); + try { + if($preventExtensions)$preventExtensions(target); + return true; + } catch(e){ + return false; + } + } + }); + +/***/ }, +/* 223 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) + var dP = __webpack_require__(9) + , gOPD = __webpack_require__(49) + , getPrototypeOf = __webpack_require__(57) + , has = __webpack_require__(3) + , $export = __webpack_require__(6) + , createDesc = __webpack_require__(15) + , anObject = __webpack_require__(10) + , isObject = __webpack_require__(11); + + function set(target, propertyKey, V/*, receiver*/){ + var receiver = arguments.length < 4 ? target : arguments[3] + , ownDesc = gOPD.f(anObject(target), propertyKey) + , existingDescriptor, proto; + if(!ownDesc){ + if(isObject(proto = getPrototypeOf(target))){ + return set(proto, propertyKey, V, receiver); + } + ownDesc = createDesc(0); + } + if(has(ownDesc, 'value')){ + if(ownDesc.writable === false || !isObject(receiver))return false; + existingDescriptor = gOPD.f(receiver, propertyKey) || createDesc(0); + existingDescriptor.value = V; + dP.f(receiver, propertyKey, existingDescriptor); + return true; + } + return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); + } + + $export($export.S, 'Reflect', {set: set}); + +/***/ }, +/* 224 */ +/***/ function(module, exports, __webpack_require__) { + + // 26.1.14 Reflect.setPrototypeOf(target, proto) + var $export = __webpack_require__(6) + , setProto = __webpack_require__(71); + + if(setProto)$export($export.S, 'Reflect', { + setPrototypeOf: function setPrototypeOf(target, proto){ + setProto.check(target, proto); + try { + setProto.set(target, proto); + return true; + } catch(e){ + return false; + } + } + }); + +/***/ }, +/* 225 */ +/***/ function(module, exports, __webpack_require__) { + + // 20.3.3.1 / 15.9.4.4 Date.now() + var $export = __webpack_require__(6); + + $export($export.S, 'Date', {now: function(){ return new Date().getTime(); }}); + +/***/ }, +/* 226 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , toObject = __webpack_require__(56) + , toPrimitive = __webpack_require__(14); + + $export($export.P + $export.F * __webpack_require__(5)(function(){ + return new Date(NaN).toJSON() !== null || Date.prototype.toJSON.call({toISOString: function(){ return 1; }}) !== 1; + }), 'Date', { + toJSON: function toJSON(key){ + var O = toObject(this) + , pv = toPrimitive(O); + return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString(); + } + }); + +/***/ }, +/* 227 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() + var $export = __webpack_require__(6) + , fails = __webpack_require__(5) + , getTime = Date.prototype.getTime; + + var lz = function(num){ + return num > 9 ? num : '0' + num; + }; + + // PhantomJS / old WebKit has a broken implementations + $export($export.P + $export.F * (fails(function(){ + return new Date(-5e13 - 1).toISOString() != '0385-07-25T07:06:39.999Z'; + }) || !fails(function(){ + new Date(NaN).toISOString(); + })), 'Date', { + toISOString: function toISOString(){ + if(!isFinite(getTime.call(this)))throw RangeError('Invalid time value'); + var d = this + , y = d.getUTCFullYear() + , m = d.getUTCMilliseconds() + , s = y < 0 ? '-' : y > 9999 ? '+' : ''; + return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + + '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) + + 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) + + ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z'; + } + }); + +/***/ }, +/* 228 */ +/***/ function(module, exports, __webpack_require__) { + + var DateProto = Date.prototype + , INVALID_DATE = 'Invalid Date' + , TO_STRING = 'toString' + , $toString = DateProto[TO_STRING] + , getTime = DateProto.getTime; + if(new Date(NaN) + '' != INVALID_DATE){ + __webpack_require__(16)(DateProto, TO_STRING, function toString(){ + var value = getTime.call(this); + return value === value ? $toString.call(this) : INVALID_DATE; + }); + } + +/***/ }, +/* 229 */ +/***/ function(module, exports, __webpack_require__) { + + var TO_PRIMITIVE = __webpack_require__(23)('toPrimitive') + , proto = Date.prototype; + + if(!(TO_PRIMITIVE in proto))__webpack_require__(8)(proto, TO_PRIMITIVE, __webpack_require__(230)); + +/***/ }, +/* 230 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var anObject = __webpack_require__(10) + , toPrimitive = __webpack_require__(14) + , NUMBER = 'number'; + + module.exports = function(hint){ + if(hint !== 'string' && hint !== NUMBER && hint !== 'default')throw TypeError('Incorrect hint'); + return toPrimitive(anObject(this), hint != NUMBER); + }; + +/***/ }, +/* 231 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , $typed = __webpack_require__(232) + , buffer = __webpack_require__(233) + , anObject = __webpack_require__(10) + , toIndex = __webpack_require__(37) + , toLength = __webpack_require__(35) + , isObject = __webpack_require__(11) + , ArrayBuffer = __webpack_require__(2).ArrayBuffer + , speciesConstructor = __webpack_require__(199) + , $ArrayBuffer = buffer.ArrayBuffer + , $DataView = buffer.DataView + , $isView = $typed.ABV && ArrayBuffer.isView + , $slice = $ArrayBuffer.prototype.slice + , VIEW = $typed.VIEW + , ARRAY_BUFFER = 'ArrayBuffer'; + + $export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), {ArrayBuffer: $ArrayBuffer}); + + $export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, { + // 24.1.3.1 ArrayBuffer.isView(arg) + isView: function isView(it){ + return $isView && $isView(it) || isObject(it) && VIEW in it; + } + }); + + $export($export.P + $export.U + $export.F * __webpack_require__(5)(function(){ + return !new $ArrayBuffer(2).slice(1, undefined).byteLength; + }), ARRAY_BUFFER, { + // 24.1.4.3 ArrayBuffer.prototype.slice(start, end) + slice: function slice(start, end){ + if($slice !== undefined && end === undefined)return $slice.call(anObject(this), start); // FF fix + var len = anObject(this).byteLength + , first = toIndex(start, len) + , final = toIndex(end === undefined ? len : end, len) + , result = new (speciesConstructor(this, $ArrayBuffer))(toLength(final - first)) + , viewS = new $DataView(this) + , viewT = new $DataView(result) + , index = 0; + while(first < final){ + viewT.setUint8(index++, viewS.getUint8(first++)); + } return result; + } + }); + + __webpack_require__(186)(ARRAY_BUFFER); + +/***/ }, +/* 232 */ +/***/ function(module, exports, __webpack_require__) { + + var global = __webpack_require__(2) + , hide = __webpack_require__(8) + , uid = __webpack_require__(17) + , TYPED = uid('typed_array') + , VIEW = uid('view') + , ABV = !!(global.ArrayBuffer && global.DataView) + , CONSTR = ABV + , i = 0, l = 9, Typed; + + var TypedArrayConstructors = ( + 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array' + ).split(','); + + while(i < l){ + if(Typed = global[TypedArrayConstructors[i++]]){ + hide(Typed.prototype, TYPED, true); + hide(Typed.prototype, VIEW, true); + } else CONSTR = false; + } + + module.exports = { + ABV: ABV, + CONSTR: CONSTR, + TYPED: TYPED, + VIEW: VIEW + }; + +/***/ }, +/* 233 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var global = __webpack_require__(2) + , DESCRIPTORS = __webpack_require__(4) + , LIBRARY = __webpack_require__(26) + , $typed = __webpack_require__(232) + , hide = __webpack_require__(8) + , redefineAll = __webpack_require__(202) + , fails = __webpack_require__(5) + , anInstance = __webpack_require__(197) + , toInteger = __webpack_require__(36) + , toLength = __webpack_require__(35) + , gOPN = __webpack_require__(48).f + , dP = __webpack_require__(9).f + , arrayFill = __webpack_require__(180) + , setToStringTag = __webpack_require__(22) + , ARRAY_BUFFER = 'ArrayBuffer' + , DATA_VIEW = 'DataView' + , PROTOTYPE = 'prototype' + , WRONG_LENGTH = 'Wrong length!' + , WRONG_INDEX = 'Wrong index!' + , $ArrayBuffer = global[ARRAY_BUFFER] + , $DataView = global[DATA_VIEW] + , Math = global.Math + , RangeError = global.RangeError + , Infinity = global.Infinity + , BaseBuffer = $ArrayBuffer + , abs = Math.abs + , pow = Math.pow + , floor = Math.floor + , log = Math.log + , LN2 = Math.LN2 + , BUFFER = 'buffer' + , BYTE_LENGTH = 'byteLength' + , BYTE_OFFSET = 'byteOffset' + , $BUFFER = DESCRIPTORS ? '_b' : BUFFER + , $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH + , $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET; + + // IEEE754 conversions based on https://github.com/feross/ieee754 + var packIEEE754 = function(value, mLen, nBytes){ + var buffer = Array(nBytes) + , eLen = nBytes * 8 - mLen - 1 + , eMax = (1 << eLen) - 1 + , eBias = eMax >> 1 + , rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0 + , i = 0 + , s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0 + , e, m, c; + value = abs(value) + if(value != value || value === Infinity){ + m = value != value ? 1 : 0; + e = eMax; + } else { + e = floor(log(value) / LN2); + if(value * (c = pow(2, -e)) < 1){ + e--; + c *= 2; + } + if(e + eBias >= 1){ + value += rt / c; + } else { + value += rt * pow(2, 1 - eBias); + } + if(value * c >= 2){ + e++; + c /= 2; + } + if(e + eBias >= eMax){ + m = 0; + e = eMax; + } else if(e + eBias >= 1){ + m = (value * c - 1) * pow(2, mLen); + e = e + eBias; + } else { + m = value * pow(2, eBias - 1) * pow(2, mLen); + e = 0; + } + } + for(; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8); + e = e << mLen | m; + eLen += mLen; + for(; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8); + buffer[--i] |= s * 128; + return buffer; + }; + var unpackIEEE754 = function(buffer, mLen, nBytes){ + var eLen = nBytes * 8 - mLen - 1 + , eMax = (1 << eLen) - 1 + , eBias = eMax >> 1 + , nBits = eLen - 7 + , i = nBytes - 1 + , s = buffer[i--] + , e = s & 127 + , m; + s >>= 7; + for(; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8); + m = e & (1 << -nBits) - 1; + e >>= -nBits; + nBits += mLen; + for(; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8); + if(e === 0){ + e = 1 - eBias; + } else if(e === eMax){ + return m ? NaN : s ? -Infinity : Infinity; + } else { + m = m + pow(2, mLen); + e = e - eBias; + } return (s ? -1 : 1) * m * pow(2, e - mLen); + }; + + var unpackI32 = function(bytes){ + return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0]; + }; + var packI8 = function(it){ + return [it & 0xff]; + }; + var packI16 = function(it){ + return [it & 0xff, it >> 8 & 0xff]; + }; + var packI32 = function(it){ + return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff]; + }; + var packF64 = function(it){ + return packIEEE754(it, 52, 8); + }; + var packF32 = function(it){ + return packIEEE754(it, 23, 4); + }; + + var addGetter = function(C, key, internal){ + dP(C[PROTOTYPE], key, {get: function(){ return this[internal]; }}); + }; + + var get = function(view, bytes, index, isLittleEndian){ + var numIndex = +index + , intIndex = toInteger(numIndex); + if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b + , start = intIndex + view[$OFFSET] + , pack = store.slice(start, start + bytes); + return isLittleEndian ? pack : pack.reverse(); + }; + var set = function(view, bytes, index, conversion, value, isLittleEndian){ + var numIndex = +index + , intIndex = toInteger(numIndex); + if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b + , start = intIndex + view[$OFFSET] + , pack = conversion(+value); + for(var i = 0; i < bytes; i++)store[start + i] = pack[isLittleEndian ? i : bytes - i - 1]; + }; + + var validateArrayBufferArguments = function(that, length){ + anInstance(that, $ArrayBuffer, ARRAY_BUFFER); + var numberLength = +length + , byteLength = toLength(numberLength); + if(numberLength != byteLength)throw RangeError(WRONG_LENGTH); + return byteLength; + }; + + if(!$typed.ABV){ + $ArrayBuffer = function ArrayBuffer(length){ + var byteLength = validateArrayBufferArguments(this, length); + this._b = arrayFill.call(Array(byteLength), 0); + this[$LENGTH] = byteLength; + }; + + $DataView = function DataView(buffer, byteOffset, byteLength){ + anInstance(this, $DataView, DATA_VIEW); + anInstance(buffer, $ArrayBuffer, DATA_VIEW); + var bufferLength = buffer[$LENGTH] + , offset = toInteger(byteOffset); + if(offset < 0 || offset > bufferLength)throw RangeError('Wrong offset!'); + byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); + if(offset + byteLength > bufferLength)throw RangeError(WRONG_LENGTH); + this[$BUFFER] = buffer; + this[$OFFSET] = offset; + this[$LENGTH] = byteLength; + }; + + if(DESCRIPTORS){ + addGetter($ArrayBuffer, BYTE_LENGTH, '_l'); + addGetter($DataView, BUFFER, '_b'); + addGetter($DataView, BYTE_LENGTH, '_l'); + addGetter($DataView, BYTE_OFFSET, '_o'); + } + + redefineAll($DataView[PROTOTYPE], { + getInt8: function getInt8(byteOffset){ + return get(this, 1, byteOffset)[0] << 24 >> 24; + }, + getUint8: function getUint8(byteOffset){ + return get(this, 1, byteOffset)[0]; + }, + getInt16: function getInt16(byteOffset /*, littleEndian */){ + var bytes = get(this, 2, byteOffset, arguments[1]); + return (bytes[1] << 8 | bytes[0]) << 16 >> 16; + }, + getUint16: function getUint16(byteOffset /*, littleEndian */){ + var bytes = get(this, 2, byteOffset, arguments[1]); + return bytes[1] << 8 | bytes[0]; + }, + getInt32: function getInt32(byteOffset /*, littleEndian */){ + return unpackI32(get(this, 4, byteOffset, arguments[1])); + }, + getUint32: function getUint32(byteOffset /*, littleEndian */){ + return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0; + }, + getFloat32: function getFloat32(byteOffset /*, littleEndian */){ + return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4); + }, + getFloat64: function getFloat64(byteOffset /*, littleEndian */){ + return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8); + }, + setInt8: function setInt8(byteOffset, value){ + set(this, 1, byteOffset, packI8, value); + }, + setUint8: function setUint8(byteOffset, value){ + set(this, 1, byteOffset, packI8, value); + }, + setInt16: function setInt16(byteOffset, value /*, littleEndian */){ + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setUint16: function setUint16(byteOffset, value /*, littleEndian */){ + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setInt32: function setInt32(byteOffset, value /*, littleEndian */){ + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setUint32: function setUint32(byteOffset, value /*, littleEndian */){ + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setFloat32: function setFloat32(byteOffset, value /*, littleEndian */){ + set(this, 4, byteOffset, packF32, value, arguments[2]); + }, + setFloat64: function setFloat64(byteOffset, value /*, littleEndian */){ + set(this, 8, byteOffset, packF64, value, arguments[2]); + } + }); + } else { + if(!fails(function(){ + new $ArrayBuffer; // eslint-disable-line no-new + }) || !fails(function(){ + new $ArrayBuffer(.5); // eslint-disable-line no-new + })){ + $ArrayBuffer = function ArrayBuffer(length){ + return new BaseBuffer(validateArrayBufferArguments(this, length)); + }; + var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE]; + for(var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j; ){ + if(!((key = keys[j++]) in $ArrayBuffer))hide($ArrayBuffer, key, BaseBuffer[key]); + }; + if(!LIBRARY)ArrayBufferProto.constructor = $ArrayBuffer; + } + // iOS Safari 7.x bug + var view = new $DataView(new $ArrayBuffer(2)) + , $setInt8 = $DataView[PROTOTYPE].setInt8; + view.setInt8(0, 2147483648); + view.setInt8(1, 2147483649); + if(view.getInt8(0) || !view.getInt8(1))redefineAll($DataView[PROTOTYPE], { + setInt8: function setInt8(byteOffset, value){ + $setInt8.call(this, byteOffset, value << 24 >> 24); + }, + setUint8: function setUint8(byteOffset, value){ + $setInt8.call(this, byteOffset, value << 24 >> 24); + } + }, true); + } + setToStringTag($ArrayBuffer, ARRAY_BUFFER); + setToStringTag($DataView, DATA_VIEW); + hide($DataView[PROTOTYPE], $typed.VIEW, true); + exports[ARRAY_BUFFER] = $ArrayBuffer; + exports[DATA_VIEW] = $DataView; + +/***/ }, +/* 234 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6); + $export($export.G + $export.W + $export.F * !__webpack_require__(232).ABV, { + DataView: __webpack_require__(233).DataView + }); + +/***/ }, +/* 235 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(236)('Int8', 1, function(init){ + return function Int8Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; + }); + +/***/ }, +/* 236 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + if(__webpack_require__(4)){ + var LIBRARY = __webpack_require__(26) + , global = __webpack_require__(2) + , fails = __webpack_require__(5) + , $export = __webpack_require__(6) + , $typed = __webpack_require__(232) + , $buffer = __webpack_require__(233) + , ctx = __webpack_require__(18) + , anInstance = __webpack_require__(197) + , propertyDesc = __webpack_require__(15) + , hide = __webpack_require__(8) + , redefineAll = __webpack_require__(202) + , toInteger = __webpack_require__(36) + , toLength = __webpack_require__(35) + , toIndex = __webpack_require__(37) + , toPrimitive = __webpack_require__(14) + , has = __webpack_require__(3) + , same = __webpack_require__(69) + , classof = __webpack_require__(73) + , isObject = __webpack_require__(11) + , toObject = __webpack_require__(56) + , isArrayIter = __webpack_require__(154) + , create = __webpack_require__(44) + , getPrototypeOf = __webpack_require__(57) + , gOPN = __webpack_require__(48).f + , getIterFn = __webpack_require__(156) + , uid = __webpack_require__(17) + , wks = __webpack_require__(23) + , createArrayMethod = __webpack_require__(164) + , createArrayIncludes = __webpack_require__(34) + , speciesConstructor = __webpack_require__(199) + , ArrayIterators = __webpack_require__(183) + , Iterators = __webpack_require__(135) + , $iterDetect = __webpack_require__(157) + , setSpecies = __webpack_require__(186) + , arrayFill = __webpack_require__(180) + , arrayCopyWithin = __webpack_require__(177) + , $DP = __webpack_require__(9) + , $GOPD = __webpack_require__(49) + , dP = $DP.f + , gOPD = $GOPD.f + , RangeError = global.RangeError + , TypeError = global.TypeError + , Uint8Array = global.Uint8Array + , ARRAY_BUFFER = 'ArrayBuffer' + , SHARED_BUFFER = 'Shared' + ARRAY_BUFFER + , BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT' + , PROTOTYPE = 'prototype' + , ArrayProto = Array[PROTOTYPE] + , $ArrayBuffer = $buffer.ArrayBuffer + , $DataView = $buffer.DataView + , arrayForEach = createArrayMethod(0) + , arrayFilter = createArrayMethod(2) + , arraySome = createArrayMethod(3) + , arrayEvery = createArrayMethod(4) + , arrayFind = createArrayMethod(5) + , arrayFindIndex = createArrayMethod(6) + , arrayIncludes = createArrayIncludes(true) + , arrayIndexOf = createArrayIncludes(false) + , arrayValues = ArrayIterators.values + , arrayKeys = ArrayIterators.keys + , arrayEntries = ArrayIterators.entries + , arrayLastIndexOf = ArrayProto.lastIndexOf + , arrayReduce = ArrayProto.reduce + , arrayReduceRight = ArrayProto.reduceRight + , arrayJoin = ArrayProto.join + , arraySort = ArrayProto.sort + , arraySlice = ArrayProto.slice + , arrayToString = ArrayProto.toString + , arrayToLocaleString = ArrayProto.toLocaleString + , ITERATOR = wks('iterator') + , TAG = wks('toStringTag') + , TYPED_CONSTRUCTOR = uid('typed_constructor') + , DEF_CONSTRUCTOR = uid('def_constructor') + , ALL_CONSTRUCTORS = $typed.CONSTR + , TYPED_ARRAY = $typed.TYPED + , VIEW = $typed.VIEW + , WRONG_LENGTH = 'Wrong length!'; + + var $map = createArrayMethod(1, function(O, length){ + return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); + }); + + var LITTLE_ENDIAN = fails(function(){ + return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; + }); + + var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function(){ + new Uint8Array(1).set({}); + }); + + var strictToLength = function(it, SAME){ + if(it === undefined)throw TypeError(WRONG_LENGTH); + var number = +it + , length = toLength(it); + if(SAME && !same(number, length))throw RangeError(WRONG_LENGTH); + return length; + }; + + var toOffset = function(it, BYTES){ + var offset = toInteger(it); + if(offset < 0 || offset % BYTES)throw RangeError('Wrong offset!'); + return offset; + }; + + var validate = function(it){ + if(isObject(it) && TYPED_ARRAY in it)return it; + throw TypeError(it + ' is not a typed array!'); + }; + + var allocate = function(C, length){ + if(!(isObject(C) && TYPED_CONSTRUCTOR in C)){ + throw TypeError('It is not a typed array constructor!'); + } return new C(length); + }; + + var speciesFromList = function(O, list){ + return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list); + }; + + var fromList = function(C, list){ + var index = 0 + , length = list.length + , result = allocate(C, length); + while(length > index)result[index] = list[index++]; + return result; + }; + + var addGetter = function(it, key, internal){ + dP(it, key, {get: function(){ return this._d[internal]; }}); + }; + + var $from = function from(source /*, mapfn, thisArg */){ + var O = toObject(source) + , aLen = arguments.length + , mapfn = aLen > 1 ? arguments[1] : undefined + , mapping = mapfn !== undefined + , iterFn = getIterFn(O) + , i, length, values, result, step, iterator; + if(iterFn != undefined && !isArrayIter(iterFn)){ + for(iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++){ + values.push(step.value); + } O = values; + } + if(mapping && aLen > 2)mapfn = ctx(mapfn, arguments[2], 2); + for(i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++){ + result[i] = mapping ? mapfn(O[i], i) : O[i]; + } + return result; + }; + + var $of = function of(/*...items*/){ + var index = 0 + , length = arguments.length + , result = allocate(this, length); + while(length > index)result[index] = arguments[index++]; + return result; + }; + + // iOS Safari 6.x fails here + var TO_LOCALE_BUG = !!Uint8Array && fails(function(){ arrayToLocaleString.call(new Uint8Array(1)); }); + + var $toLocaleString = function toLocaleString(){ + return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments); + }; + + var proto = { + copyWithin: function copyWithin(target, start /*, end */){ + return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined); + }, + every: function every(callbackfn /*, thisArg */){ + return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + fill: function fill(value /*, start, end */){ // eslint-disable-line no-unused-vars + return arrayFill.apply(validate(this), arguments); + }, + filter: function filter(callbackfn /*, thisArg */){ + return speciesFromList(this, arrayFilter(validate(this), callbackfn, + arguments.length > 1 ? arguments[1] : undefined)); + }, + find: function find(predicate /*, thisArg */){ + return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + findIndex: function findIndex(predicate /*, thisArg */){ + return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + forEach: function forEach(callbackfn /*, thisArg */){ + arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + indexOf: function indexOf(searchElement /*, fromIndex */){ + return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); + }, + includes: function includes(searchElement /*, fromIndex */){ + return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); + }, + join: function join(separator){ // eslint-disable-line no-unused-vars + return arrayJoin.apply(validate(this), arguments); + }, + lastIndexOf: function lastIndexOf(searchElement /*, fromIndex */){ // eslint-disable-line no-unused-vars + return arrayLastIndexOf.apply(validate(this), arguments); + }, + map: function map(mapfn /*, thisArg */){ + return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined); + }, + reduce: function reduce(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars + return arrayReduce.apply(validate(this), arguments); + }, + reduceRight: function reduceRight(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars + return arrayReduceRight.apply(validate(this), arguments); + }, + reverse: function reverse(){ + var that = this + , length = validate(that).length + , middle = Math.floor(length / 2) + , index = 0 + , value; + while(index < middle){ + value = that[index]; + that[index++] = that[--length]; + that[length] = value; + } return that; + }, + some: function some(callbackfn /*, thisArg */){ + return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + sort: function sort(comparefn){ + return arraySort.call(validate(this), comparefn); + }, + subarray: function subarray(begin, end){ + var O = validate(this) + , length = O.length + , $begin = toIndex(begin, length); + return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( + O.buffer, + O.byteOffset + $begin * O.BYTES_PER_ELEMENT, + toLength((end === undefined ? length : toIndex(end, length)) - $begin) + ); + } + }; + + var $slice = function slice(start, end){ + return speciesFromList(this, arraySlice.call(validate(this), start, end)); + }; + + var $set = function set(arrayLike /*, offset */){ + validate(this); + var offset = toOffset(arguments[1], 1) + , length = this.length + , src = toObject(arrayLike) + , len = toLength(src.length) + , index = 0; + if(len + offset > length)throw RangeError(WRONG_LENGTH); + while(index < len)this[offset + index] = src[index++]; + }; + + var $iterators = { + entries: function entries(){ + return arrayEntries.call(validate(this)); + }, + keys: function keys(){ + return arrayKeys.call(validate(this)); + }, + values: function values(){ + return arrayValues.call(validate(this)); + } + }; + + var isTAIndex = function(target, key){ + return isObject(target) + && target[TYPED_ARRAY] + && typeof key != 'symbol' + && key in target + && String(+key) == String(key); + }; + var $getDesc = function getOwnPropertyDescriptor(target, key){ + return isTAIndex(target, key = toPrimitive(key, true)) + ? propertyDesc(2, target[key]) + : gOPD(target, key); + }; + var $setDesc = function defineProperty(target, key, desc){ + if(isTAIndex(target, key = toPrimitive(key, true)) + && isObject(desc) + && has(desc, 'value') + && !has(desc, 'get') + && !has(desc, 'set') + // TODO: add validation descriptor w/o calling accessors + && !desc.configurable + && (!has(desc, 'writable') || desc.writable) + && (!has(desc, 'enumerable') || desc.enumerable) + ){ + target[key] = desc.value; + return target; + } else return dP(target, key, desc); + }; + + if(!ALL_CONSTRUCTORS){ + $GOPD.f = $getDesc; + $DP.f = $setDesc; + } + + $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', { + getOwnPropertyDescriptor: $getDesc, + defineProperty: $setDesc + }); + + if(fails(function(){ arrayToString.call({}); })){ + arrayToString = arrayToLocaleString = function toString(){ + return arrayJoin.call(this); + } + } + + var $TypedArrayPrototype$ = redefineAll({}, proto); + redefineAll($TypedArrayPrototype$, $iterators); + hide($TypedArrayPrototype$, ITERATOR, $iterators.values); + redefineAll($TypedArrayPrototype$, { + slice: $slice, + set: $set, + constructor: function(){ /* noop */ }, + toString: arrayToString, + toLocaleString: $toLocaleString + }); + addGetter($TypedArrayPrototype$, 'buffer', 'b'); + addGetter($TypedArrayPrototype$, 'byteOffset', 'o'); + addGetter($TypedArrayPrototype$, 'byteLength', 'l'); + addGetter($TypedArrayPrototype$, 'length', 'e'); + dP($TypedArrayPrototype$, TAG, { + get: function(){ return this[TYPED_ARRAY]; } + }); + + module.exports = function(KEY, BYTES, wrapper, CLAMPED){ + CLAMPED = !!CLAMPED; + var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array' + , ISNT_UINT8 = NAME != 'Uint8Array' + , GETTER = 'get' + KEY + , SETTER = 'set' + KEY + , TypedArray = global[NAME] + , Base = TypedArray || {} + , TAC = TypedArray && getPrototypeOf(TypedArray) + , FORCED = !TypedArray || !$typed.ABV + , O = {} + , TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE]; + var getter = function(that, index){ + var data = that._d; + return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN); + }; + var setter = function(that, index, value){ + var data = that._d; + if(CLAMPED)value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff; + data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN); + }; + var addElement = function(that, index){ + dP(that, index, { + get: function(){ + return getter(this, index); + }, + set: function(value){ + return setter(this, index, value); + }, + enumerable: true + }); + }; + if(FORCED){ + TypedArray = wrapper(function(that, data, $offset, $length){ + anInstance(that, TypedArray, NAME, '_d'); + var index = 0 + , offset = 0 + , buffer, byteLength, length, klass; + if(!isObject(data)){ + length = strictToLength(data, true) + byteLength = length * BYTES; + buffer = new $ArrayBuffer(byteLength); + } else if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){ + buffer = data; + offset = toOffset($offset, BYTES); + var $len = data.byteLength; + if($length === undefined){ + if($len % BYTES)throw RangeError(WRONG_LENGTH); + byteLength = $len - offset; + if(byteLength < 0)throw RangeError(WRONG_LENGTH); + } else { + byteLength = toLength($length) * BYTES; + if(byteLength + offset > $len)throw RangeError(WRONG_LENGTH); + } + length = byteLength / BYTES; + } else if(TYPED_ARRAY in data){ + return fromList(TypedArray, data); + } else { + return $from.call(TypedArray, data); + } + hide(that, '_d', { + b: buffer, + o: offset, + l: byteLength, + e: length, + v: new $DataView(buffer) + }); + while(index < length)addElement(that, index++); + }); + TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$); + hide(TypedArrayPrototype, 'constructor', TypedArray); + } else if(!$iterDetect(function(iter){ + // V8 works with iterators, but fails in many other cases + // https://code.google.com/p/v8/issues/detail?id=4552 + new TypedArray(null); // eslint-disable-line no-new + new TypedArray(iter); // eslint-disable-line no-new + }, true)){ + TypedArray = wrapper(function(that, data, $offset, $length){ + anInstance(that, TypedArray, NAME); + var klass; + // `ws` module bug, temporarily remove validation length for Uint8Array + // https://github.com/websockets/ws/pull/645 + if(!isObject(data))return new Base(strictToLength(data, ISNT_UINT8)); + if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){ + return $length !== undefined + ? new Base(data, toOffset($offset, BYTES), $length) + : $offset !== undefined + ? new Base(data, toOffset($offset, BYTES)) + : new Base(data); + } + if(TYPED_ARRAY in data)return fromList(TypedArray, data); + return $from.call(TypedArray, data); + }); + arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function(key){ + if(!(key in TypedArray))hide(TypedArray, key, Base[key]); + }); + TypedArray[PROTOTYPE] = TypedArrayPrototype; + if(!LIBRARY)TypedArrayPrototype.constructor = TypedArray; + } + var $nativeIterator = TypedArrayPrototype[ITERATOR] + , CORRECT_ITER_NAME = !!$nativeIterator && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined) + , $iterator = $iterators.values; + hide(TypedArray, TYPED_CONSTRUCTOR, true); + hide(TypedArrayPrototype, TYPED_ARRAY, NAME); + hide(TypedArrayPrototype, VIEW, true); + hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray); + + if(CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)){ + dP(TypedArrayPrototype, TAG, { + get: function(){ return NAME; } + }); + } + + O[NAME] = TypedArray; + + $export($export.G + $export.W + $export.F * (TypedArray != Base), O); + + $export($export.S, NAME, { + BYTES_PER_ELEMENT: BYTES, + from: $from, + of: $of + }); + + if(!(BYTES_PER_ELEMENT in TypedArrayPrototype))hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); + + $export($export.P, NAME, proto); + + setSpecies(NAME); + + $export($export.P + $export.F * FORCED_SET, NAME, {set: $set}); + + $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); + + $export($export.P + $export.F * (TypedArrayPrototype.toString != arrayToString), NAME, {toString: arrayToString}); + + $export($export.P + $export.F * fails(function(){ + new TypedArray(1).slice(); + }), NAME, {slice: $slice}); + + $export($export.P + $export.F * (fails(function(){ + return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString() + }) || !fails(function(){ + TypedArrayPrototype.toLocaleString.call([1, 2]); + })), NAME, {toLocaleString: $toLocaleString}); + + Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator; + if(!LIBRARY && !CORRECT_ITER_NAME)hide(TypedArrayPrototype, ITERATOR, $iterator); + }; + } else module.exports = function(){ /* empty */ }; + +/***/ }, +/* 237 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(236)('Uint8', 1, function(init){ + return function Uint8Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; + }); + +/***/ }, +/* 238 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(236)('Uint8', 1, function(init){ + return function Uint8ClampedArray(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; + }, true); + +/***/ }, +/* 239 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(236)('Int16', 2, function(init){ + return function Int16Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; + }); + +/***/ }, +/* 240 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(236)('Uint16', 2, function(init){ + return function Uint16Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; + }); + +/***/ }, +/* 241 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(236)('Int32', 4, function(init){ + return function Int32Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; + }); + +/***/ }, +/* 242 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(236)('Uint32', 4, function(init){ + return function Uint32Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; + }); + +/***/ }, +/* 243 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(236)('Float32', 4, function(init){ + return function Float32Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; + }); + +/***/ }, +/* 244 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(236)('Float64', 8, function(init){ + return function Float64Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; + }); + +/***/ }, +/* 245 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // https://github.com/tc39/Array.prototype.includes + var $export = __webpack_require__(6) + , $includes = __webpack_require__(34)(true); + + $export($export.P, 'Array', { + includes: function includes(el /*, fromIndex = 0 */){ + return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); + } + }); + + __webpack_require__(178)('includes'); + +/***/ }, +/* 246 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // https://github.com/mathiasbynens/String.prototype.at + var $export = __webpack_require__(6) + , $at = __webpack_require__(125)(true); + + $export($export.P, 'String', { + at: function at(pos){ + return $at(this, pos); + } + }); + +/***/ }, +/* 247 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // https://github.com/tc39/proposal-string-pad-start-end + var $export = __webpack_require__(6) + , $pad = __webpack_require__(248); + + $export($export.P, 'String', { + padStart: function padStart(maxLength /*, fillString = ' ' */){ + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); + } + }); + +/***/ }, +/* 248 */ +/***/ function(module, exports, __webpack_require__) { + + // https://github.com/tc39/proposal-string-pad-start-end + var toLength = __webpack_require__(35) + , repeat = __webpack_require__(85) + , defined = __webpack_require__(33); + + module.exports = function(that, maxLength, fillString, left){ + var S = String(defined(that)) + , stringLength = S.length + , fillStr = fillString === undefined ? ' ' : String(fillString) + , intMaxLength = toLength(maxLength); + if(intMaxLength <= stringLength || fillStr == '')return S; + var fillLen = intMaxLength - stringLength + , stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length)); + if(stringFiller.length > fillLen)stringFiller = stringFiller.slice(0, fillLen); + return left ? stringFiller + S : S + stringFiller; + }; + + +/***/ }, +/* 249 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // https://github.com/tc39/proposal-string-pad-start-end + var $export = __webpack_require__(6) + , $pad = __webpack_require__(248); + + $export($export.P, 'String', { + padEnd: function padEnd(maxLength /*, fillString = ' ' */){ + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); + } + }); + +/***/ }, +/* 250 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // https://github.com/sebmarkbage/ecmascript-string-left-right-trim + __webpack_require__(81)('trimLeft', function($trim){ + return function trimLeft(){ + return $trim(this, 1); + }; + }, 'trimStart'); + +/***/ }, +/* 251 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // https://github.com/sebmarkbage/ecmascript-string-left-right-trim + __webpack_require__(81)('trimRight', function($trim){ + return function trimRight(){ + return $trim(this, 2); + }; + }, 'trimEnd'); + +/***/ }, +/* 252 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // https://tc39.github.io/String.prototype.matchAll/ + var $export = __webpack_require__(6) + , defined = __webpack_require__(33) + , toLength = __webpack_require__(35) + , isRegExp = __webpack_require__(128) + , getFlags = __webpack_require__(188) + , RegExpProto = RegExp.prototype; + + var $RegExpStringIterator = function(regexp, string){ + this._r = regexp; + this._s = string; + }; + + __webpack_require__(136)($RegExpStringIterator, 'RegExp String', function next(){ + var match = this._r.exec(this._s); + return {value: match, done: match === null}; + }); + + $export($export.P, 'String', { + matchAll: function matchAll(regexp){ + defined(this); + if(!isRegExp(regexp))throw TypeError(regexp + ' is not a regexp!'); + var S = String(this) + , flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp) + , rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags); + rx.lastIndex = toLength(regexp.lastIndex); + return new $RegExpStringIterator(rx, S); + } + }); + +/***/ }, +/* 253 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(25)('asyncIterator'); + +/***/ }, +/* 254 */ +/***/ function(module, exports, __webpack_require__) { + + __webpack_require__(25)('observable'); + +/***/ }, +/* 255 */ +/***/ function(module, exports, __webpack_require__) { + + // https://github.com/tc39/proposal-object-getownpropertydescriptors + var $export = __webpack_require__(6) + , ownKeys = __webpack_require__(221) + , toIObject = __webpack_require__(30) + , gOPD = __webpack_require__(49) + , createProperty = __webpack_require__(155); + + $export($export.S, 'Object', { + getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object){ + var O = toIObject(object) + , getDesc = gOPD.f + , keys = ownKeys(O) + , result = {} + , i = 0 + , key; + while(keys.length > i)createProperty(result, key = keys[i++], getDesc(O, key)); + return result; + } + }); + +/***/ }, +/* 256 */ +/***/ function(module, exports, __webpack_require__) { + + // https://github.com/tc39/proposal-object-values-entries + var $export = __webpack_require__(6) + , $values = __webpack_require__(257)(false); + + $export($export.S, 'Object', { + values: function values(it){ + return $values(it); + } + }); + +/***/ }, +/* 257 */ +/***/ function(module, exports, __webpack_require__) { + + var getKeys = __webpack_require__(28) + , toIObject = __webpack_require__(30) + , isEnum = __webpack_require__(42).f; + module.exports = function(isEntries){ + return function(it){ + var O = toIObject(it) + , keys = getKeys(O) + , length = keys.length + , i = 0 + , result = [] + , key; + while(length > i)if(isEnum.call(O, key = keys[i++])){ + result.push(isEntries ? [key, O[key]] : O[key]); + } return result; + }; + }; + +/***/ }, +/* 258 */ +/***/ function(module, exports, __webpack_require__) { + + // https://github.com/tc39/proposal-object-values-entries + var $export = __webpack_require__(6) + , $entries = __webpack_require__(257)(true); + + $export($export.S, 'Object', { + entries: function entries(it){ + return $entries(it); + } + }); + +/***/ }, +/* 259 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , toObject = __webpack_require__(56) + , aFunction = __webpack_require__(19) + , $defineProperty = __webpack_require__(9); + + // B.2.2.2 Object.prototype.__defineGetter__(P, getter) + __webpack_require__(4) && $export($export.P + __webpack_require__(260), 'Object', { + __defineGetter__: function __defineGetter__(P, getter){ + $defineProperty.f(toObject(this), P, {get: aFunction(getter), enumerable: true, configurable: true}); + } + }); + +/***/ }, +/* 260 */ +/***/ function(module, exports, __webpack_require__) { + + // Forced replacement prototype accessors methods + module.exports = __webpack_require__(26)|| !__webpack_require__(5)(function(){ + var K = Math.random(); + // In FF throws only define methods + __defineSetter__.call(null, K, function(){ /* empty */}); + delete __webpack_require__(2)[K]; + }); + +/***/ }, +/* 261 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , toObject = __webpack_require__(56) + , aFunction = __webpack_require__(19) + , $defineProperty = __webpack_require__(9); + + // B.2.2.3 Object.prototype.__defineSetter__(P, setter) + __webpack_require__(4) && $export($export.P + __webpack_require__(260), 'Object', { + __defineSetter__: function __defineSetter__(P, setter){ + $defineProperty.f(toObject(this), P, {set: aFunction(setter), enumerable: true, configurable: true}); + } + }); + +/***/ }, +/* 262 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , toObject = __webpack_require__(56) + , toPrimitive = __webpack_require__(14) + , getPrototypeOf = __webpack_require__(57) + , getOwnPropertyDescriptor = __webpack_require__(49).f; + + // B.2.2.4 Object.prototype.__lookupGetter__(P) + __webpack_require__(4) && $export($export.P + __webpack_require__(260), 'Object', { + __lookupGetter__: function __lookupGetter__(P){ + var O = toObject(this) + , K = toPrimitive(P, true) + , D; + do { + if(D = getOwnPropertyDescriptor(O, K))return D.get; + } while(O = getPrototypeOf(O)); + } + }); + +/***/ }, +/* 263 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var $export = __webpack_require__(6) + , toObject = __webpack_require__(56) + , toPrimitive = __webpack_require__(14) + , getPrototypeOf = __webpack_require__(57) + , getOwnPropertyDescriptor = __webpack_require__(49).f; + + // B.2.2.5 Object.prototype.__lookupSetter__(P) + __webpack_require__(4) && $export($export.P + __webpack_require__(260), 'Object', { + __lookupSetter__: function __lookupSetter__(P){ + var O = toObject(this) + , K = toPrimitive(P, true) + , D; + do { + if(D = getOwnPropertyDescriptor(O, K))return D.set; + } while(O = getPrototypeOf(O)); + } + }); + +/***/ }, +/* 264 */ +/***/ function(module, exports, __webpack_require__) { + + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var $export = __webpack_require__(6); + + $export($export.P + $export.R, 'Map', {toJSON: __webpack_require__(265)('Map')}); + +/***/ }, +/* 265 */ +/***/ function(module, exports, __webpack_require__) { + + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var classof = __webpack_require__(73) + , from = __webpack_require__(266); + module.exports = function(NAME){ + return function toJSON(){ + if(classof(this) != NAME)throw TypeError(NAME + "#toJSON isn't generic"); + return from(this); + }; + }; + +/***/ }, +/* 266 */ +/***/ function(module, exports, __webpack_require__) { + + var forOf = __webpack_require__(198); + + module.exports = function(iter, ITERATOR){ + var result = []; + forOf(iter, false, result.push, result, ITERATOR); + return result; + }; + + +/***/ }, +/* 267 */ +/***/ function(module, exports, __webpack_require__) { + + // https://github.com/DavidBruant/Map-Set.prototype.toJSON + var $export = __webpack_require__(6); + + $export($export.P + $export.R, 'Set', {toJSON: __webpack_require__(265)('Set')}); + +/***/ }, +/* 268 */ +/***/ function(module, exports, __webpack_require__) { + + // https://github.com/ljharb/proposal-global + var $export = __webpack_require__(6); + + $export($export.S, 'System', {global: __webpack_require__(2)}); + +/***/ }, +/* 269 */ +/***/ function(module, exports, __webpack_require__) { + + // https://github.com/ljharb/proposal-is-error + var $export = __webpack_require__(6) + , cof = __webpack_require__(32); + + $export($export.S, 'Error', { + isError: function isError(it){ + return cof(it) === 'Error'; + } + }); + +/***/ }, +/* 270 */ +/***/ function(module, exports, __webpack_require__) { + + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(6); + + $export($export.S, 'Math', { + iaddh: function iaddh(x0, x1, y0, y1){ + var $x0 = x0 >>> 0 + , $x1 = x1 >>> 0 + , $y0 = y0 >>> 0; + return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0; + } + }); + +/***/ }, +/* 271 */ +/***/ function(module, exports, __webpack_require__) { + + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(6); + + $export($export.S, 'Math', { + isubh: function isubh(x0, x1, y0, y1){ + var $x0 = x0 >>> 0 + , $x1 = x1 >>> 0 + , $y0 = y0 >>> 0; + return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0; + } + }); + +/***/ }, +/* 272 */ +/***/ function(module, exports, __webpack_require__) { + + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(6); + + $export($export.S, 'Math', { + imulh: function imulh(u, v){ + var UINT16 = 0xffff + , $u = +u + , $v = +v + , u0 = $u & UINT16 + , v0 = $v & UINT16 + , u1 = $u >> 16 + , v1 = $v >> 16 + , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); + return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16); + } + }); + +/***/ }, +/* 273 */ +/***/ function(module, exports, __webpack_require__) { + + // https://gist.github.com/BrendanEich/4294d5c212a6d2254703 + var $export = __webpack_require__(6); + + $export($export.S, 'Math', { + umulh: function umulh(u, v){ + var UINT16 = 0xffff + , $u = +u + , $v = +v + , u0 = $u & UINT16 + , v0 = $v & UINT16 + , u1 = $u >>> 16 + , v1 = $v >>> 16 + , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); + return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16); + } + }); + +/***/ }, +/* 274 */ +/***/ function(module, exports, __webpack_require__) { + + var metadata = __webpack_require__(275) + , anObject = __webpack_require__(10) + , toMetaKey = metadata.key + , ordinaryDefineOwnMetadata = metadata.set; + + metadata.exp({defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey){ + ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey)); + }}); + +/***/ }, +/* 275 */ +/***/ function(module, exports, __webpack_require__) { + + var Map = __webpack_require__(203) + , $export = __webpack_require__(6) + , shared = __webpack_require__(21)('metadata') + , store = shared.store || (shared.store = new (__webpack_require__(207))); + + var getOrCreateMetadataMap = function(target, targetKey, create){ + var targetMetadata = store.get(target); + if(!targetMetadata){ + if(!create)return undefined; + store.set(target, targetMetadata = new Map); + } + var keyMetadata = targetMetadata.get(targetKey); + if(!keyMetadata){ + if(!create)return undefined; + targetMetadata.set(targetKey, keyMetadata = new Map); + } return keyMetadata; + }; + var ordinaryHasOwnMetadata = function(MetadataKey, O, P){ + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? false : metadataMap.has(MetadataKey); + }; + var ordinaryGetOwnMetadata = function(MetadataKey, O, P){ + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey); + }; + var ordinaryDefineOwnMetadata = function(MetadataKey, MetadataValue, O, P){ + getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue); + }; + var ordinaryOwnMetadataKeys = function(target, targetKey){ + var metadataMap = getOrCreateMetadataMap(target, targetKey, false) + , keys = []; + if(metadataMap)metadataMap.forEach(function(_, key){ keys.push(key); }); + return keys; + }; + var toMetaKey = function(it){ + return it === undefined || typeof it == 'symbol' ? it : String(it); + }; + var exp = function(O){ + $export($export.S, 'Reflect', O); + }; + + module.exports = { + store: store, + map: getOrCreateMetadataMap, + has: ordinaryHasOwnMetadata, + get: ordinaryGetOwnMetadata, + set: ordinaryDefineOwnMetadata, + keys: ordinaryOwnMetadataKeys, + key: toMetaKey, + exp: exp + }; + +/***/ }, +/* 276 */ +/***/ function(module, exports, __webpack_require__) { + + var metadata = __webpack_require__(275) + , anObject = __webpack_require__(10) + , toMetaKey = metadata.key + , getOrCreateMetadataMap = metadata.map + , store = metadata.store; + + metadata.exp({deleteMetadata: function deleteMetadata(metadataKey, target /*, targetKey */){ + var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]) + , metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false); + if(metadataMap === undefined || !metadataMap['delete'](metadataKey))return false; + if(metadataMap.size)return true; + var targetMetadata = store.get(target); + targetMetadata['delete'](targetKey); + return !!targetMetadata.size || store['delete'](target); + }}); + +/***/ }, +/* 277 */ +/***/ function(module, exports, __webpack_require__) { + + var metadata = __webpack_require__(275) + , anObject = __webpack_require__(10) + , getPrototypeOf = __webpack_require__(57) + , ordinaryHasOwnMetadata = metadata.has + , ordinaryGetOwnMetadata = metadata.get + , toMetaKey = metadata.key; + + var ordinaryGetMetadata = function(MetadataKey, O, P){ + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if(hasOwn)return ordinaryGetOwnMetadata(MetadataKey, O, P); + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined; + }; + + metadata.exp({getMetadata: function getMetadata(metadataKey, target /*, targetKey */){ + return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); + }}); + +/***/ }, +/* 278 */ +/***/ function(module, exports, __webpack_require__) { + + var Set = __webpack_require__(206) + , from = __webpack_require__(266) + , metadata = __webpack_require__(275) + , anObject = __webpack_require__(10) + , getPrototypeOf = __webpack_require__(57) + , ordinaryOwnMetadataKeys = metadata.keys + , toMetaKey = metadata.key; + + var ordinaryMetadataKeys = function(O, P){ + var oKeys = ordinaryOwnMetadataKeys(O, P) + , parent = getPrototypeOf(O); + if(parent === null)return oKeys; + var pKeys = ordinaryMetadataKeys(parent, P); + return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys; + }; + + metadata.exp({getMetadataKeys: function getMetadataKeys(target /*, targetKey */){ + return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); + }}); + +/***/ }, +/* 279 */ +/***/ function(module, exports, __webpack_require__) { + + var metadata = __webpack_require__(275) + , anObject = __webpack_require__(10) + , ordinaryGetOwnMetadata = metadata.get + , toMetaKey = metadata.key; + + metadata.exp({getOwnMetadata: function getOwnMetadata(metadataKey, target /*, targetKey */){ + return ordinaryGetOwnMetadata(metadataKey, anObject(target) + , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); + }}); + +/***/ }, +/* 280 */ +/***/ function(module, exports, __webpack_require__) { + + var metadata = __webpack_require__(275) + , anObject = __webpack_require__(10) + , ordinaryOwnMetadataKeys = metadata.keys + , toMetaKey = metadata.key; + + metadata.exp({getOwnMetadataKeys: function getOwnMetadataKeys(target /*, targetKey */){ + return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); + }}); + +/***/ }, +/* 281 */ +/***/ function(module, exports, __webpack_require__) { + + var metadata = __webpack_require__(275) + , anObject = __webpack_require__(10) + , getPrototypeOf = __webpack_require__(57) + , ordinaryHasOwnMetadata = metadata.has + , toMetaKey = metadata.key; + + var ordinaryHasMetadata = function(MetadataKey, O, P){ + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if(hasOwn)return true; + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false; + }; + + metadata.exp({hasMetadata: function hasMetadata(metadataKey, target /*, targetKey */){ + return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); + }}); + +/***/ }, +/* 282 */ +/***/ function(module, exports, __webpack_require__) { + + var metadata = __webpack_require__(275) + , anObject = __webpack_require__(10) + , ordinaryHasOwnMetadata = metadata.has + , toMetaKey = metadata.key; + + metadata.exp({hasOwnMetadata: function hasOwnMetadata(metadataKey, target /*, targetKey */){ + return ordinaryHasOwnMetadata(metadataKey, anObject(target) + , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); + }}); + +/***/ }, +/* 283 */ +/***/ function(module, exports, __webpack_require__) { + + var metadata = __webpack_require__(275) + , anObject = __webpack_require__(10) + , aFunction = __webpack_require__(19) + , toMetaKey = metadata.key + , ordinaryDefineOwnMetadata = metadata.set; + + metadata.exp({metadata: function metadata(metadataKey, metadataValue){ + return function decorator(target, targetKey){ + ordinaryDefineOwnMetadata( + metadataKey, metadataValue, + (targetKey !== undefined ? anObject : aFunction)(target), + toMetaKey(targetKey) + ); + }; + }}); + +/***/ }, +/* 284 */ +/***/ function(module, exports, __webpack_require__) { + + // https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask + var $export = __webpack_require__(6) + , microtask = __webpack_require__(201)() + , process = __webpack_require__(2).process + , isNode = __webpack_require__(32)(process) == 'process'; + + $export($export.G, { + asap: function asap(fn){ + var domain = isNode && process.domain; + microtask(domain ? domain.bind(fn) : fn); + } + }); + +/***/ }, +/* 285 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + // https://github.com/zenparsing/es-observable + var $export = __webpack_require__(6) + , global = __webpack_require__(2) + , core = __webpack_require__(7) + , microtask = __webpack_require__(201)() + , OBSERVABLE = __webpack_require__(23)('observable') + , aFunction = __webpack_require__(19) + , anObject = __webpack_require__(10) + , anInstance = __webpack_require__(197) + , redefineAll = __webpack_require__(202) + , hide = __webpack_require__(8) + , forOf = __webpack_require__(198) + , RETURN = forOf.RETURN; + + var getMethod = function(fn){ + return fn == null ? undefined : aFunction(fn); + }; + + var cleanupSubscription = function(subscription){ + var cleanup = subscription._c; + if(cleanup){ + subscription._c = undefined; + cleanup(); + } + }; + + var subscriptionClosed = function(subscription){ + return subscription._o === undefined; + }; + + var closeSubscription = function(subscription){ + if(!subscriptionClosed(subscription)){ + subscription._o = undefined; + cleanupSubscription(subscription); + } + }; + + var Subscription = function(observer, subscriber){ + anObject(observer); + this._c = undefined; + this._o = observer; + observer = new SubscriptionObserver(this); + try { + var cleanup = subscriber(observer) + , subscription = cleanup; + if(cleanup != null){ + if(typeof cleanup.unsubscribe === 'function')cleanup = function(){ subscription.unsubscribe(); }; + else aFunction(cleanup); + this._c = cleanup; + } + } catch(e){ + observer.error(e); + return; + } if(subscriptionClosed(this))cleanupSubscription(this); + }; + + Subscription.prototype = redefineAll({}, { + unsubscribe: function unsubscribe(){ closeSubscription(this); } + }); + + var SubscriptionObserver = function(subscription){ + this._s = subscription; + }; + + SubscriptionObserver.prototype = redefineAll({}, { + next: function next(value){ + var subscription = this._s; + if(!subscriptionClosed(subscription)){ + var observer = subscription._o; + try { + var m = getMethod(observer.next); + if(m)return m.call(observer, value); + } catch(e){ + try { + closeSubscription(subscription); + } finally { + throw e; + } + } + } + }, + error: function error(value){ + var subscription = this._s; + if(subscriptionClosed(subscription))throw value; + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.error); + if(!m)throw value; + value = m.call(observer, value); + } catch(e){ + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } cleanupSubscription(subscription); + return value; + }, + complete: function complete(value){ + var subscription = this._s; + if(!subscriptionClosed(subscription)){ + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.complete); + value = m ? m.call(observer, value) : undefined; + } catch(e){ + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } cleanupSubscription(subscription); + return value; + } + } + }); + + var $Observable = function Observable(subscriber){ + anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber); + }; + + redefineAll($Observable.prototype, { + subscribe: function subscribe(observer){ + return new Subscription(observer, this._f); + }, + forEach: function forEach(fn){ + var that = this; + return new (core.Promise || global.Promise)(function(resolve, reject){ + aFunction(fn); + var subscription = that.subscribe({ + next : function(value){ + try { + return fn(value); + } catch(e){ + reject(e); + subscription.unsubscribe(); + } + }, + error: reject, + complete: resolve + }); + }); + } + }); + + redefineAll($Observable, { + from: function from(x){ + var C = typeof this === 'function' ? this : $Observable; + var method = getMethod(anObject(x)[OBSERVABLE]); + if(method){ + var observable = anObject(method.call(x)); + return observable.constructor === C ? observable : new C(function(observer){ + return observable.subscribe(observer); + }); + } + return new C(function(observer){ + var done = false; + microtask(function(){ + if(!done){ + try { + if(forOf(x, false, function(it){ + observer.next(it); + if(done)return RETURN; + }) === RETURN)return; + } catch(e){ + if(done)throw e; + observer.error(e); + return; + } observer.complete(); + } + }); + return function(){ done = true; }; + }); + }, + of: function of(){ + for(var i = 0, l = arguments.length, items = Array(l); i < l;)items[i] = arguments[i++]; + return new (typeof this === 'function' ? this : $Observable)(function(observer){ + var done = false; + microtask(function(){ + if(!done){ + for(var i = 0; i < items.length; ++i){ + observer.next(items[i]); + if(done)return; + } observer.complete(); + } + }); + return function(){ done = true; }; + }); + } + }); + + hide($Observable.prototype, OBSERVABLE, function(){ return this; }); + + $export($export.G, {Observable: $Observable}); + + __webpack_require__(186)('Observable'); + +/***/ }, +/* 286 */ +/***/ function(module, exports, __webpack_require__) { + + var $export = __webpack_require__(6) + , $task = __webpack_require__(200); + $export($export.G + $export.B, { + setImmediate: $task.set, + clearImmediate: $task.clear + }); + +/***/ }, +/* 287 */ +/***/ function(module, exports, __webpack_require__) { + + var $iterators = __webpack_require__(183) + , redefine = __webpack_require__(16) + , global = __webpack_require__(2) + , hide = __webpack_require__(8) + , Iterators = __webpack_require__(135) + , wks = __webpack_require__(23) + , ITERATOR = wks('iterator') + , TO_STRING_TAG = wks('toStringTag') + , ArrayValues = Iterators.Array; + + for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){ + var NAME = collections[i] + , Collection = global[NAME] + , proto = Collection && Collection.prototype + , key; + if(proto){ + if(!proto[ITERATOR])hide(proto, ITERATOR, ArrayValues); + if(!proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = ArrayValues; + for(key in $iterators)if(!proto[key])redefine(proto, key, $iterators[key], true); + } + } + +/***/ }, +/* 288 */ +/***/ function(module, exports, __webpack_require__) { + + // ie9- setTimeout & setInterval additional parameters fix + var global = __webpack_require__(2) + , $export = __webpack_require__(6) + , invoke = __webpack_require__(76) + , partial = __webpack_require__(289) + , navigator = global.navigator + , MSIE = !!navigator && /MSIE .\./.test(navigator.userAgent); // <- dirty ie9- check + var wrap = function(set){ + return MSIE ? function(fn, time /*, ...args */){ + return set(invoke( + partial, + [].slice.call(arguments, 2), + typeof fn == 'function' ? fn : Function(fn) + ), time); + } : set; + }; + $export($export.G + $export.B + $export.F * MSIE, { + setTimeout: wrap(global.setTimeout), + setInterval: wrap(global.setInterval) + }); + +/***/ }, +/* 289 */ +/***/ function(module, exports, __webpack_require__) { + + 'use strict'; + var path = __webpack_require__(290) + , invoke = __webpack_require__(76) + , aFunction = __webpack_require__(19); + module.exports = function(/* ...pargs */){ + var fn = aFunction(this) + , length = arguments.length + , pargs = Array(length) + , i = 0 + , _ = path._ + , holder = false; + while(length > i)if((pargs[i] = arguments[i++]) === _)holder = true; + return function(/* ...args */){ + var that = this + , aLen = arguments.length + , j = 0, k = 0, args; + if(!holder && !aLen)return invoke(fn, pargs, that); + args = pargs.slice(); + if(holder)for(;length > j; j++)if(args[j] === _)args[j] = arguments[k++]; + while(aLen > k)args.push(arguments[k++]); + return invoke(fn, args, that); + }; + }; + +/***/ }, +/* 290 */ +/***/ function(module, exports, __webpack_require__) { + + module.exports = __webpack_require__(2); + +/***/ } +/******/ ]); +// CommonJS export +if(typeof module != 'undefined' && module.exports)module.exports = __e; +// RequireJS export +else if(typeof define == 'function' && define.amd)define(function(){return __e}); +// Export to global object +else __g.core = __e; +}(1, 1); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/client/shim.min.js b/pitfall/pdfkit/node_modules/core-js/client/shim.min.js new file mode 100644 index 00000000..e532c683 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/client/shim.min.js @@ -0,0 +1,10 @@ +/** + * core-js 2.4.1 + * https://github.com/zloirock/core-js + * License: http://rock.mit-license.org + * © 2016 Denis Pushkarev + */ +!function(a,b,c){"use strict";!function(a){function __webpack_require__(c){if(b[c])return b[c].exports;var d=b[c]={exports:{},id:c,loaded:!1};return a[c].call(d.exports,d,d.exports,__webpack_require__),d.loaded=!0,d.exports}var b={};return __webpack_require__.m=a,__webpack_require__.c=b,__webpack_require__.p="",__webpack_require__(0)}([function(a,b,c){c(1),c(50),c(51),c(52),c(54),c(55),c(58),c(59),c(60),c(61),c(62),c(63),c(64),c(65),c(66),c(68),c(70),c(72),c(74),c(77),c(78),c(79),c(83),c(86),c(87),c(88),c(89),c(91),c(92),c(93),c(94),c(95),c(97),c(99),c(100),c(101),c(103),c(104),c(105),c(107),c(108),c(109),c(111),c(112),c(113),c(114),c(115),c(116),c(117),c(118),c(119),c(120),c(121),c(122),c(123),c(124),c(126),c(130),c(131),c(132),c(133),c(137),c(139),c(140),c(141),c(142),c(143),c(144),c(145),c(146),c(147),c(148),c(149),c(150),c(151),c(152),c(158),c(159),c(161),c(162),c(163),c(167),c(168),c(169),c(170),c(171),c(173),c(174),c(175),c(176),c(179),c(181),c(182),c(183),c(185),c(187),c(189),c(190),c(191),c(193),c(194),c(195),c(196),c(203),c(206),c(207),c(209),c(210),c(211),c(212),c(213),c(214),c(215),c(216),c(217),c(218),c(219),c(220),c(222),c(223),c(224),c(225),c(226),c(227),c(228),c(229),c(231),c(234),c(235),c(237),c(238),c(239),c(240),c(241),c(242),c(243),c(244),c(245),c(246),c(247),c(249),c(250),c(251),c(252),c(253),c(254),c(255),c(256),c(258),c(259),c(261),c(262),c(263),c(264),c(267),c(268),c(269),c(270),c(271),c(272),c(273),c(274),c(276),c(277),c(278),c(279),c(280),c(281),c(282),c(283),c(284),c(285),c(286),c(287),a.exports=c(288)},function(a,b,d){var e=d(2),f=d(3),g=d(4),h=d(6),i=d(16),j=d(20).KEY,k=d(5),l=d(21),m=d(22),n=d(17),o=d(23),p=d(24),q=d(25),r=d(27),s=d(40),t=d(43),u=d(10),v=d(30),w=d(14),x=d(15),y=d(44),z=d(47),A=d(49),B=d(9),C=d(28),D=A.f,E=B.f,F=z.f,G=e.Symbol,H=e.JSON,I=H&&H.stringify,J="prototype",K=o("_hidden"),L=o("toPrimitive"),M={}.propertyIsEnumerable,N=l("symbol-registry"),O=l("symbols"),P=l("op-symbols"),Q=Object[J],R="function"==typeof G,S=e.QObject,T=!S||!S[J]||!S[J].findChild,U=g&&k(function(){return 7!=y(E({},"a",{get:function(){return E(this,"a",{value:7}).a}})).a})?function(a,b,c){var d=D(Q,b);d&&delete Q[b],E(a,b,c),d&&a!==Q&&E(Q,b,d)}:E,V=function(a){var b=O[a]=y(G[J]);return b._k=a,b},W=R&&"symbol"==typeof G.iterator?function(a){return"symbol"==typeof a}:function(a){return a instanceof G},X=function defineProperty(a,b,c){return a===Q&&X(P,b,c),u(a),b=w(b,!0),u(c),f(O,b)?(c.enumerable?(f(a,K)&&a[K][b]&&(a[K][b]=!1),c=y(c,{enumerable:x(0,!1)})):(f(a,K)||E(a,K,x(1,{})),a[K][b]=!0),U(a,b,c)):E(a,b,c)},Y=function defineProperties(a,b){u(a);for(var c,d=s(b=v(b)),e=0,f=d.length;f>e;)X(a,c=d[e++],b[c]);return a},Z=function create(a,b){return b===c?y(a):Y(y(a),b)},$=function propertyIsEnumerable(a){var b=M.call(this,a=w(a,!0));return!(this===Q&&f(O,a)&&!f(P,a))&&(!(b||!f(this,a)||!f(O,a)||f(this,K)&&this[K][a])||b)},_=function getOwnPropertyDescriptor(a,b){if(a=v(a),b=w(b,!0),a!==Q||!f(O,b)||f(P,b)){var c=D(a,b);return!c||!f(O,b)||f(a,K)&&a[K][b]||(c.enumerable=!0),c}},aa=function getOwnPropertyNames(a){for(var b,c=F(v(a)),d=[],e=0;c.length>e;)f(O,b=c[e++])||b==K||b==j||d.push(b);return d},ba=function getOwnPropertySymbols(a){for(var b,c=a===Q,d=F(c?P:v(a)),e=[],g=0;d.length>g;)!f(O,b=d[g++])||c&&!f(Q,b)||e.push(O[b]);return e};R||(G=function Symbol(){if(this instanceof G)throw TypeError("Symbol is not a constructor!");var a=n(arguments.length>0?arguments[0]:c),b=function(c){this===Q&&b.call(P,c),f(this,K)&&f(this[K],a)&&(this[K][a]=!1),U(this,a,x(1,c))};return g&&T&&U(Q,a,{configurable:!0,set:b}),V(a)},i(G[J],"toString",function toString(){return this._k}),A.f=_,B.f=X,d(48).f=z.f=aa,d(42).f=$,d(41).f=ba,g&&!d(26)&&i(Q,"propertyIsEnumerable",$,!0),p.f=function(a){return V(o(a))}),h(h.G+h.W+h.F*!R,{Symbol:G});for(var ca="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),da=0;ca.length>da;)o(ca[da++]);for(var ca=C(o.store),da=0;ca.length>da;)q(ca[da++]);h(h.S+h.F*!R,"Symbol",{"for":function(a){return f(N,a+="")?N[a]:N[a]=G(a)},keyFor:function keyFor(a){if(W(a))return r(N,a);throw TypeError(a+" is not a symbol!")},useSetter:function(){T=!0},useSimple:function(){T=!1}}),h(h.S+h.F*!R,"Object",{create:Z,defineProperty:X,defineProperties:Y,getOwnPropertyDescriptor:_,getOwnPropertyNames:aa,getOwnPropertySymbols:ba}),H&&h(h.S+h.F*(!R||k(function(){var a=G();return"[null]"!=I([a])||"{}"!=I({a:a})||"{}"!=I(Object(a))})),"JSON",{stringify:function stringify(a){if(a!==c&&!W(a)){for(var b,d,e=[a],f=1;arguments.length>f;)e.push(arguments[f++]);return b=e[1],"function"==typeof b&&(d=b),!d&&t(b)||(b=function(a,b){if(d&&(b=d.call(this,a,b)),!W(b))return b}),e[1]=b,I.apply(H,e)}}}),G[J][L]||d(8)(G[J],L,G[J].valueOf),m(G,"Symbol"),m(Math,"Math",!0),m(e.JSON,"JSON",!0)},function(a,c){var d=a.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof b&&(b=d)},function(a,b){var c={}.hasOwnProperty;a.exports=function(a,b){return c.call(a,b)}},function(a,b,c){a.exports=!c(5)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(a,b){a.exports=function(a){try{return!!a()}catch(b){return!0}}},function(a,b,d){var e=d(2),f=d(7),g=d(8),h=d(16),i=d(18),j="prototype",k=function(a,b,d){var l,m,n,o,p=a&k.F,q=a&k.G,r=a&k.S,s=a&k.P,t=a&k.B,u=q?e:r?e[b]||(e[b]={}):(e[b]||{})[j],v=q?f:f[b]||(f[b]={}),w=v[j]||(v[j]={});q&&(d=b);for(l in d)m=!p&&u&&u[l]!==c,n=(m?u:d)[l],o=t&&m?i(n,e):s&&"function"==typeof n?i(Function.call,n):n,u&&h(u,l,n,a&k.U),v[l]!=n&&g(v,l,o),s&&w[l]!=n&&(w[l]=n)};e.core=f,k.F=1,k.G=2,k.S=4,k.P=8,k.B=16,k.W=32,k.U=64,k.R=128,a.exports=k},function(b,c){var d=b.exports={version:"2.4.0"};"number"==typeof a&&(a=d)},function(a,b,c){var d=c(9),e=c(15);a.exports=c(4)?function(a,b,c){return d.f(a,b,e(1,c))}:function(a,b,c){return a[b]=c,a}},function(a,b,c){var d=c(10),e=c(12),f=c(14),g=Object.defineProperty;b.f=c(4)?Object.defineProperty:function defineProperty(a,b,c){if(d(a),b=f(b,!0),d(c),e)try{return g(a,b,c)}catch(h){}if("get"in c||"set"in c)throw TypeError("Accessors not supported!");return"value"in c&&(a[b]=c.value),a}},function(a,b,c){var d=c(11);a.exports=function(a){if(!d(a))throw TypeError(a+" is not an object!");return a}},function(a,b){a.exports=function(a){return"object"==typeof a?null!==a:"function"==typeof a}},function(a,b,c){a.exports=!c(4)&&!c(5)(function(){return 7!=Object.defineProperty(c(13)("div"),"a",{get:function(){return 7}}).a})},function(a,b,c){var d=c(11),e=c(2).document,f=d(e)&&d(e.createElement);a.exports=function(a){return f?e.createElement(a):{}}},function(a,b,c){var d=c(11);a.exports=function(a,b){if(!d(a))return a;var c,e;if(b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a)))return e;if("function"==typeof(c=a.valueOf)&&!d(e=c.call(a)))return e;if(!b&&"function"==typeof(c=a.toString)&&!d(e=c.call(a)))return e;throw TypeError("Can't convert object to primitive value")}},function(a,b){a.exports=function(a,b){return{enumerable:!(1&a),configurable:!(2&a),writable:!(4&a),value:b}}},function(a,b,c){var d=c(2),e=c(8),f=c(3),g=c(17)("src"),h="toString",i=Function[h],j=(""+i).split(h);c(7).inspectSource=function(a){return i.call(a)},(a.exports=function(a,b,c,h){var i="function"==typeof c;i&&(f(c,"name")||e(c,"name",b)),a[b]!==c&&(i&&(f(c,g)||e(c,g,a[b]?""+a[b]:j.join(String(b)))),a===d?a[b]=c:h?a[b]?a[b]=c:e(a,b,c):(delete a[b],e(a,b,c)))})(Function.prototype,h,function toString(){return"function"==typeof this&&this[g]||i.call(this)})},function(a,b){var d=0,e=Math.random();a.exports=function(a){return"Symbol(".concat(a===c?"":a,")_",(++d+e).toString(36))}},function(a,b,d){var e=d(19);a.exports=function(a,b,d){if(e(a),b===c)return a;switch(d){case 1:return function(c){return a.call(b,c)};case 2:return function(c,d){return a.call(b,c,d)};case 3:return function(c,d,e){return a.call(b,c,d,e)}}return function(){return a.apply(b,arguments)}}},function(a,b){a.exports=function(a){if("function"!=typeof a)throw TypeError(a+" is not a function!");return a}},function(a,b,c){var d=c(17)("meta"),e=c(11),f=c(3),g=c(9).f,h=0,i=Object.isExtensible||function(){return!0},j=!c(5)(function(){return i(Object.preventExtensions({}))}),k=function(a){g(a,d,{value:{i:"O"+ ++h,w:{}}})},l=function(a,b){if(!e(a))return"symbol"==typeof a?a:("string"==typeof a?"S":"P")+a;if(!f(a,d)){if(!i(a))return"F";if(!b)return"E";k(a)}return a[d].i},m=function(a,b){if(!f(a,d)){if(!i(a))return!0;if(!b)return!1;k(a)}return a[d].w},n=function(a){return j&&o.NEED&&i(a)&&!f(a,d)&&k(a),a},o=a.exports={KEY:d,NEED:!1,fastKey:l,getWeak:m,onFreeze:n}},function(a,b,c){var d=c(2),e="__core-js_shared__",f=d[e]||(d[e]={});a.exports=function(a){return f[a]||(f[a]={})}},function(a,b,c){var d=c(9).f,e=c(3),f=c(23)("toStringTag");a.exports=function(a,b,c){a&&!e(a=c?a:a.prototype,f)&&d(a,f,{configurable:!0,value:b})}},function(a,b,c){var d=c(21)("wks"),e=c(17),f=c(2).Symbol,g="function"==typeof f,h=a.exports=function(a){return d[a]||(d[a]=g&&f[a]||(g?f:e)("Symbol."+a))};h.store=d},function(a,b,c){b.f=c(23)},function(a,b,c){var d=c(2),e=c(7),f=c(26),g=c(24),h=c(9).f;a.exports=function(a){var b=e.Symbol||(e.Symbol=f?{}:d.Symbol||{});"_"==a.charAt(0)||a in b||h(b,a,{value:g.f(a)})}},function(a,b){a.exports=!1},function(a,b,c){var d=c(28),e=c(30);a.exports=function(a,b){for(var c,f=e(a),g=d(f),h=g.length,i=0;h>i;)if(f[c=g[i++]]===b)return c}},function(a,b,c){var d=c(29),e=c(39);a.exports=Object.keys||function keys(a){return d(a,e)}},function(a,b,c){var d=c(3),e=c(30),f=c(34)(!1),g=c(38)("IE_PROTO");a.exports=function(a,b){var c,h=e(a),i=0,j=[];for(c in h)c!=g&&d(h,c)&&j.push(c);for(;b.length>i;)d(h,c=b[i++])&&(~f(j,c)||j.push(c));return j}},function(a,b,c){var d=c(31),e=c(33);a.exports=function(a){return d(e(a))}},function(a,b,c){var d=c(32);a.exports=Object("z").propertyIsEnumerable(0)?Object:function(a){return"String"==d(a)?a.split(""):Object(a)}},function(a,b){var c={}.toString;a.exports=function(a){return c.call(a).slice(8,-1)}},function(a,b){a.exports=function(a){if(a==c)throw TypeError("Can't call method on "+a);return a}},function(a,b,c){var d=c(30),e=c(35),f=c(37);a.exports=function(a){return function(b,c,g){var h,i=d(b),j=e(i.length),k=f(g,j);if(a&&c!=c){for(;j>k;)if(h=i[k++],h!=h)return!0}else for(;j>k;k++)if((a||k in i)&&i[k]===c)return a||k||0;return!a&&-1}}},function(a,b,c){var d=c(36),e=Math.min;a.exports=function(a){return a>0?e(d(a),9007199254740991):0}},function(a,b){var c=Math.ceil,d=Math.floor;a.exports=function(a){return isNaN(a=+a)?0:(a>0?d:c)(a)}},function(a,b,c){var d=c(36),e=Math.max,f=Math.min;a.exports=function(a,b){return a=d(a),a<0?e(a+b,0):f(a,b)}},function(a,b,c){var d=c(21)("keys"),e=c(17);a.exports=function(a){return d[a]||(d[a]=e(a))}},function(a,b){a.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(a,b,c){var d=c(28),e=c(41),f=c(42);a.exports=function(a){var b=d(a),c=e.f;if(c)for(var g,h=c(a),i=f.f,j=0;h.length>j;)i.call(a,g=h[j++])&&b.push(g);return b}},function(a,b){b.f=Object.getOwnPropertySymbols},function(a,b){b.f={}.propertyIsEnumerable},function(a,b,c){var d=c(32);a.exports=Array.isArray||function isArray(a){return"Array"==d(a)}},function(a,b,d){var e=d(10),f=d(45),g=d(39),h=d(38)("IE_PROTO"),i=function(){},j="prototype",k=function(){var a,b=d(13)("iframe"),c=g.length,e="<",f=">";for(b.style.display="none",d(46).appendChild(b),b.src="javascript:",a=b.contentWindow.document,a.open(),a.write(e+"script"+f+"document.F=Object"+e+"/script"+f),a.close(),k=a.F;c--;)delete k[j][g[c]];return k()};a.exports=Object.create||function create(a,b){var d;return null!==a?(i[j]=e(a),d=new i,i[j]=null,d[h]=a):d=k(),b===c?d:f(d,b)}},function(a,b,c){var d=c(9),e=c(10),f=c(28);a.exports=c(4)?Object.defineProperties:function defineProperties(a,b){e(a);for(var c,g=f(b),h=g.length,i=0;h>i;)d.f(a,c=g[i++],b[c]);return a}},function(a,b,c){a.exports=c(2).document&&document.documentElement},function(a,b,c){var d=c(30),e=c(48).f,f={}.toString,g="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],h=function(a){try{return e(a)}catch(b){return g.slice()}};a.exports.f=function getOwnPropertyNames(a){return g&&"[object Window]"==f.call(a)?h(a):e(d(a))}},function(a,b,c){var d=c(29),e=c(39).concat("length","prototype");b.f=Object.getOwnPropertyNames||function getOwnPropertyNames(a){return d(a,e)}},function(a,b,c){var d=c(42),e=c(15),f=c(30),g=c(14),h=c(3),i=c(12),j=Object.getOwnPropertyDescriptor;b.f=c(4)?j:function getOwnPropertyDescriptor(a,b){if(a=f(a),b=g(b,!0),i)try{return j(a,b)}catch(c){}if(h(a,b))return e(!d.f.call(a,b),a[b])}},function(a,b,c){var d=c(6);d(d.S+d.F*!c(4),"Object",{defineProperty:c(9).f})},function(a,b,c){var d=c(6);d(d.S+d.F*!c(4),"Object",{defineProperties:c(45)})},function(a,b,c){var d=c(30),e=c(49).f;c(53)("getOwnPropertyDescriptor",function(){return function getOwnPropertyDescriptor(a,b){return e(d(a),b)}})},function(a,b,c){var d=c(6),e=c(7),f=c(5);a.exports=function(a,b){var c=(e.Object||{})[a]||Object[a],g={};g[a]=b(c),d(d.S+d.F*f(function(){c(1)}),"Object",g)}},function(a,b,c){var d=c(6);d(d.S,"Object",{create:c(44)})},function(a,b,c){var d=c(56),e=c(57);c(53)("getPrototypeOf",function(){return function getPrototypeOf(a){return e(d(a))}})},function(a,b,c){var d=c(33);a.exports=function(a){return Object(d(a))}},function(a,b,c){var d=c(3),e=c(56),f=c(38)("IE_PROTO"),g=Object.prototype;a.exports=Object.getPrototypeOf||function(a){return a=e(a),d(a,f)?a[f]:"function"==typeof a.constructor&&a instanceof a.constructor?a.constructor.prototype:a instanceof Object?g:null}},function(a,b,c){var d=c(56),e=c(28);c(53)("keys",function(){return function keys(a){return e(d(a))}})},function(a,b,c){c(53)("getOwnPropertyNames",function(){return c(47).f})},function(a,b,c){var d=c(11),e=c(20).onFreeze;c(53)("freeze",function(a){return function freeze(b){return a&&d(b)?a(e(b)):b}})},function(a,b,c){var d=c(11),e=c(20).onFreeze;c(53)("seal",function(a){return function seal(b){return a&&d(b)?a(e(b)):b}})},function(a,b,c){var d=c(11),e=c(20).onFreeze;c(53)("preventExtensions",function(a){return function preventExtensions(b){return a&&d(b)?a(e(b)):b}})},function(a,b,c){var d=c(11);c(53)("isFrozen",function(a){return function isFrozen(b){return!d(b)||!!a&&a(b)}})},function(a,b,c){var d=c(11);c(53)("isSealed",function(a){return function isSealed(b){return!d(b)||!!a&&a(b)}})},function(a,b,c){var d=c(11);c(53)("isExtensible",function(a){return function isExtensible(b){return!!d(b)&&(!a||a(b))}})},function(a,b,c){var d=c(6);d(d.S+d.F,"Object",{assign:c(67)})},function(a,b,c){var d=c(28),e=c(41),f=c(42),g=c(56),h=c(31),i=Object.assign;a.exports=!i||c(5)(function(){var a={},b={},c=Symbol(),d="abcdefghijklmnopqrst";return a[c]=7,d.split("").forEach(function(a){b[a]=a}),7!=i({},a)[c]||Object.keys(i({},b)).join("")!=d})?function assign(a,b){for(var c=g(a),i=arguments.length,j=1,k=e.f,l=f.f;i>j;)for(var m,n=h(arguments[j++]),o=k?d(n).concat(k(n)):d(n),p=o.length,q=0;p>q;)l.call(n,m=o[q++])&&(c[m]=n[m]);return c}:i},function(a,b,c){var d=c(6);d(d.S,"Object",{is:c(69)})},function(a,b){a.exports=Object.is||function is(a,b){return a===b?0!==a||1/a===1/b:a!=a&&b!=b}},function(a,b,c){var d=c(6);d(d.S,"Object",{setPrototypeOf:c(71).set})},function(a,b,d){var e=d(11),f=d(10),g=function(a,b){if(f(a),!e(b)&&null!==b)throw TypeError(b+": can't set as prototype!")};a.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(a,b,c){try{c=d(18)(Function.call,d(49).f(Object.prototype,"__proto__").set,2),c(a,[]),b=!(a instanceof Array)}catch(e){b=!0}return function setPrototypeOf(a,d){return g(a,d),b?a.__proto__=d:c(a,d),a}}({},!1):c),check:g}},function(a,b,c){var d=c(73),e={};e[c(23)("toStringTag")]="z",e+""!="[object z]"&&c(16)(Object.prototype,"toString",function toString(){return"[object "+d(this)+"]"},!0)},function(a,b,d){var e=d(32),f=d(23)("toStringTag"),g="Arguments"==e(function(){return arguments}()),h=function(a,b){try{return a[b]}catch(c){}};a.exports=function(a){var b,d,i;return a===c?"Undefined":null===a?"Null":"string"==typeof(d=h(b=Object(a),f))?d:g?e(b):"Object"==(i=e(b))&&"function"==typeof b.callee?"Arguments":i}},function(a,b,c){var d=c(6);d(d.P,"Function",{bind:c(75)})},function(a,b,c){var d=c(19),e=c(11),f=c(76),g=[].slice,h={},i=function(a,b,c){if(!(b in h)){for(var d=[],e=0;e2){b=s?b.trim():m(b,3);var c,d,e,f=b.charCodeAt(0);if(43===f||45===f){if(c=b.charCodeAt(2),88===c||120===c)return NaN}else if(48===f){switch(b.charCodeAt(1)){case 66:case 98:d=2,e=49;break;case 79:case 111:d=8,e=55;break;default:return+b}for(var g,i=b.slice(2),j=0,k=i.length;je)return NaN;return parseInt(i,d)}}return+b};if(!o(" 0o1")||!o("0b1")||o("+0x1")){o=function Number(a){var b=arguments.length<1?0:a,c=this;return c instanceof o&&(r?i(function(){q.valueOf.call(c)}):f(c)!=n)?g(new p(t(b)),c,o):t(b)};for(var u,v=c(4)?j(p):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),w=0;v.length>w;w++)e(p,u=v[w])&&!e(o,u)&&l(o,u,k(p,u));o.prototype=q,q.constructor=o,c(16)(d,n,o)}},function(a,b,c){var d=c(11),e=c(71).set;a.exports=function(a,b,c){var f,g=b.constructor;return g!==c&&"function"==typeof g&&(f=g.prototype)!==c.prototype&&d(f)&&e&&e(a,f),a}},function(a,b,c){var d=c(6),e=c(33),f=c(5),g=c(82),h="["+g+"]",i="​…",j=RegExp("^"+h+h+"*"),k=RegExp(h+h+"*$"),l=function(a,b,c){var e={},h=f(function(){return!!g[a]()||i[a]()!=i}),j=e[a]=h?b(m):g[a];c&&(e[c]=j),d(d.P+d.F*h,"String",e)},m=l.trim=function(a,b){return a=String(e(a)),1&b&&(a=a.replace(j,"")),2&b&&(a=a.replace(k,"")),a};a.exports=l},function(a,b){a.exports="\t\n\x0B\f\r   ᠎              \u2028\u2029\ufeff"},function(a,b,c){var d=c(6),e=c(36),f=c(84),g=c(85),h=1..toFixed,i=Math.floor,j=[0,0,0,0,0,0],k="Number.toFixed: incorrect invocation!",l="0",m=function(a,b){for(var c=-1,d=b;++c<6;)d+=a*j[c],j[c]=d%1e7,d=i(d/1e7)},n=function(a){for(var b=6,c=0;--b>=0;)c+=j[b],j[b]=i(c/a),c=c%a*1e7},o=function(){for(var a=6,b="";--a>=0;)if(""!==b||0===a||0!==j[a]){var c=String(j[a]);b=""===b?c:b+g.call(l,7-c.length)+c}return b},p=function(a,b,c){return 0===b?c:b%2===1?p(a,b-1,c*a):p(a*a,b/2,c)},q=function(a){for(var b=0,c=a;c>=4096;)b+=12,c/=4096;for(;c>=2;)b+=1,c/=2;return b};d(d.P+d.F*(!!h&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!c(5)(function(){h.call({})})),"Number",{toFixed:function toFixed(a){var b,c,d,h,i=f(this,k),j=e(a),r="",s=l;if(j<0||j>20)throw RangeError(k);if(i!=i)return"NaN";if(i<=-1e21||i>=1e21)return String(i);if(i<0&&(r="-",i=-i),i>1e-21)if(b=q(i*p(2,69,1))-69,c=b<0?i*p(2,-b,1):i/p(2,b,1),c*=4503599627370496,b=52-b,b>0){for(m(0,c),d=j;d>=7;)m(1e7,0),d-=7;for(m(p(10,d,1),0),d=b-1;d>=23;)n(1<<23),d-=23;n(1<0?(h=s.length,s=r+(h<=j?"0."+g.call(l,j-h)+s:s.slice(0,h-j)+"."+s.slice(h-j))):s=r+s,s}})},function(a,b,c){var d=c(32);a.exports=function(a,b){if("number"!=typeof a&&"Number"!=d(a))throw TypeError(b);return+a}},function(a,b,c){var d=c(36),e=c(33);a.exports=function repeat(a){var b=String(e(this)),c="",f=d(a);if(f<0||f==1/0)throw RangeError("Count can't be negative");for(;f>0;(f>>>=1)&&(b+=b))1&f&&(c+=b);return c}},function(a,b,d){var e=d(6),f=d(5),g=d(84),h=1..toPrecision;e(e.P+e.F*(f(function(){return"1"!==h.call(1,c)})||!f(function(){h.call({})})),"Number",{toPrecision:function toPrecision(a){var b=g(this,"Number#toPrecision: incorrect invocation!");return a===c?h.call(b):h.call(b,a)}})},function(a,b,c){var d=c(6);d(d.S,"Number",{EPSILON:Math.pow(2,-52)})},function(a,b,c){var d=c(6),e=c(2).isFinite;d(d.S,"Number",{isFinite:function isFinite(a){return"number"==typeof a&&e(a)}})},function(a,b,c){var d=c(6);d(d.S,"Number",{isInteger:c(90)})},function(a,b,c){var d=c(11),e=Math.floor;a.exports=function isInteger(a){return!d(a)&&isFinite(a)&&e(a)===a}},function(a,b,c){var d=c(6);d(d.S,"Number",{isNaN:function isNaN(a){return a!=a}})},function(a,b,c){var d=c(6),e=c(90),f=Math.abs;d(d.S,"Number",{isSafeInteger:function isSafeInteger(a){return e(a)&&f(a)<=9007199254740991}})},function(a,b,c){var d=c(6);d(d.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(a,b,c){var d=c(6);d(d.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(a,b,c){var d=c(6),e=c(96);d(d.S+d.F*(Number.parseFloat!=e),"Number",{parseFloat:e})},function(a,b,c){var d=c(2).parseFloat,e=c(81).trim;a.exports=1/d(c(82)+"-0")!==-(1/0)?function parseFloat(a){var b=e(String(a),3),c=d(b);return 0===c&&"-"==b.charAt(0)?-0:c}:d},function(a,b,c){var d=c(6),e=c(98);d(d.S+d.F*(Number.parseInt!=e),"Number",{parseInt:e})},function(a,b,c){var d=c(2).parseInt,e=c(81).trim,f=c(82),g=/^[\-+]?0[xX]/;a.exports=8!==d(f+"08")||22!==d(f+"0x16")?function parseInt(a,b){var c=e(String(a),3);return d(c,b>>>0||(g.test(c)?16:10))}:d},function(a,b,c){var d=c(6),e=c(98);d(d.G+d.F*(parseInt!=e),{parseInt:e})},function(a,b,c){var d=c(6),e=c(96);d(d.G+d.F*(parseFloat!=e),{parseFloat:e})},function(a,b,c){var d=c(6),e=c(102),f=Math.sqrt,g=Math.acosh;d(d.S+d.F*!(g&&710==Math.floor(g(Number.MAX_VALUE))&&g(1/0)==1/0),"Math",{acosh:function acosh(a){return(a=+a)<1?NaN:a>94906265.62425156?Math.log(a)+Math.LN2:e(a-1+f(a-1)*f(a+1))}})},function(a,b){a.exports=Math.log1p||function log1p(a){return(a=+a)>-1e-8&&a<1e-8?a-a*a/2:Math.log(1+a)}},function(a,b,c){function asinh(a){return isFinite(a=+a)&&0!=a?a<0?-asinh(-a):Math.log(a+Math.sqrt(a*a+1)):a}var d=c(6),e=Math.asinh;d(d.S+d.F*!(e&&1/e(0)>0),"Math",{asinh:asinh})},function(a,b,c){var d=c(6),e=Math.atanh;d(d.S+d.F*!(e&&1/e(-0)<0),"Math",{atanh:function atanh(a){return 0==(a=+a)?a:Math.log((1+a)/(1-a))/2}})},function(a,b,c){var d=c(6),e=c(106);d(d.S,"Math",{cbrt:function cbrt(a){return e(a=+a)*Math.pow(Math.abs(a),1/3)}})},function(a,b){a.exports=Math.sign||function sign(a){return 0==(a=+a)||a!=a?a:a<0?-1:1}},function(a,b,c){var d=c(6);d(d.S,"Math",{clz32:function clz32(a){return(a>>>=0)?31-Math.floor(Math.log(a+.5)*Math.LOG2E):32}})},function(a,b,c){var d=c(6),e=Math.exp;d(d.S,"Math",{cosh:function cosh(a){return(e(a=+a)+e(-a))/2}})},function(a,b,c){var d=c(6),e=c(110);d(d.S+d.F*(e!=Math.expm1),"Math",{expm1:e})},function(a,b){var c=Math.expm1;a.exports=!c||c(10)>22025.465794806718||c(10)<22025.465794806718||c(-2e-17)!=-2e-17?function expm1(a){return 0==(a=+a)?a:a>-1e-6&&a<1e-6?a+a*a/2:Math.exp(a)-1}:c},function(a,b,c){var d=c(6),e=c(106),f=Math.pow,g=f(2,-52),h=f(2,-23),i=f(2,127)*(2-h),j=f(2,-126),k=function(a){return a+1/g-1/g};d(d.S,"Math",{fround:function fround(a){var b,c,d=Math.abs(a),f=e(a);return di||c!=c?f*(1/0):f*c)}})},function(a,b,c){var d=c(6),e=Math.abs;d(d.S,"Math",{hypot:function hypot(a,b){for(var c,d,f=0,g=0,h=arguments.length,i=0;g0?(d=c/i,f+=d*d):f+=c;return i===1/0?1/0:i*Math.sqrt(f)}})},function(a,b,c){var d=c(6),e=Math.imul;d(d.S+d.F*c(5)(function(){return e(4294967295,5)!=-5||2!=e.length}),"Math",{imul:function imul(a,b){var c=65535,d=+a,e=+b,f=c&d,g=c&e;return 0|f*g+((c&d>>>16)*g+f*(c&e>>>16)<<16>>>0)}})},function(a,b,c){var d=c(6);d(d.S,"Math",{log10:function log10(a){return Math.log(a)/Math.LN10}})},function(a,b,c){var d=c(6);d(d.S,"Math",{log1p:c(102)})},function(a,b,c){var d=c(6);d(d.S,"Math",{log2:function log2(a){return Math.log(a)/Math.LN2}})},function(a,b,c){var d=c(6);d(d.S,"Math",{sign:c(106)})},function(a,b,c){var d=c(6),e=c(110),f=Math.exp;d(d.S+d.F*c(5)(function(){return!Math.sinh(-2e-17)!=-2e-17}),"Math",{sinh:function sinh(a){return Math.abs(a=+a)<1?(e(a)-e(-a))/2:(f(a-1)-f(-a-1))*(Math.E/2)}})},function(a,b,c){var d=c(6),e=c(110),f=Math.exp;d(d.S,"Math",{tanh:function tanh(a){var b=e(a=+a),c=e(-a);return b==1/0?1:c==1/0?-1:(b-c)/(f(a)+f(-a))}})},function(a,b,c){var d=c(6);d(d.S,"Math",{trunc:function trunc(a){return(a>0?Math.floor:Math.ceil)(a)}})},function(a,b,c){var d=c(6),e=c(37),f=String.fromCharCode,g=String.fromCodePoint;d(d.S+d.F*(!!g&&1!=g.length),"String",{fromCodePoint:function fromCodePoint(a){for(var b,c=[],d=arguments.length,g=0;d>g;){if(b=+arguments[g++],e(b,1114111)!==b)throw RangeError(b+" is not a valid code point");c.push(b<65536?f(b):f(((b-=65536)>>10)+55296,b%1024+56320))}return c.join("")}})},function(a,b,c){var d=c(6),e=c(30),f=c(35);d(d.S,"String",{raw:function raw(a){for(var b=e(a.raw),c=f(b.length),d=arguments.length,g=[],h=0;c>h;)g.push(String(b[h++])),h=k?a?"":c:(g=i.charCodeAt(j),g<55296||g>56319||j+1===k||(h=i.charCodeAt(j+1))<56320||h>57343?a?i.charAt(j):g:a?i.slice(j,j+2):(g-55296<<10)+(h-56320)+65536)}}},function(a,b,d){var e=d(6),f=d(35),g=d(127),h="endsWith",i=""[h];e(e.P+e.F*d(129)(h),"String",{endsWith:function endsWith(a){var b=g(this,a,h),d=arguments.length>1?arguments[1]:c,e=f(b.length),j=d===c?e:Math.min(f(d),e),k=String(a);return i?i.call(b,k,j):b.slice(j-k.length,j)===k}})},function(a,b,c){var d=c(128),e=c(33);a.exports=function(a,b,c){if(d(b))throw TypeError("String#"+c+" doesn't accept regex!");return String(e(a))}},function(a,b,d){var e=d(11),f=d(32),g=d(23)("match");a.exports=function(a){var b;return e(a)&&((b=a[g])!==c?!!b:"RegExp"==f(a))}},function(a,b,c){var d=c(23)("match");a.exports=function(a){var b=/./;try{"/./"[a](b)}catch(c){try{return b[d]=!1,!"/./"[a](b)}catch(e){}}return!0}},function(a,b,d){var e=d(6),f=d(127),g="includes";e(e.P+e.F*d(129)(g),"String",{includes:function includes(a){return!!~f(this,a,g).indexOf(a,arguments.length>1?arguments[1]:c)}})},function(a,b,c){var d=c(6);d(d.P,"String",{repeat:c(85)})},function(a,b,d){var e=d(6),f=d(35),g=d(127),h="startsWith",i=""[h];e(e.P+e.F*d(129)(h),"String",{startsWith:function startsWith(a){var b=g(this,a,h),d=f(Math.min(arguments.length>1?arguments[1]:c,b.length)),e=String(a);return i?i.call(b,e,d):b.slice(d,d+e.length)===e}})},function(a,b,d){var e=d(125)(!0);d(134)(String,"String",function(a){this._t=String(a),this._i=0},function(){var a,b=this._t,d=this._i;return d>=b.length?{value:c,done:!0}:(a=e(b,d),this._i+=a.length,{value:a,done:!1})})},function(a,b,d){var e=d(26),f=d(6),g=d(16),h=d(8),i=d(3),j=d(135),k=d(136),l=d(22),m=d(57),n=d(23)("iterator"),o=!([].keys&&"next"in[].keys()),p="@@iterator",q="keys",r="values",s=function(){return this};a.exports=function(a,b,d,t,u,v,w){k(d,b,t);var x,y,z,A=function(a){if(!o&&a in E)return E[a];switch(a){case q:return function keys(){return new d(this,a)};case r:return function values(){return new d(this,a)}}return function entries(){return new d(this,a)}},B=b+" Iterator",C=u==r,D=!1,E=a.prototype,F=E[n]||E[p]||u&&E[u],G=F||A(u),H=u?C?A("entries"):G:c,I="Array"==b?E.entries||F:F;if(I&&(z=m(I.call(new a)),z!==Object.prototype&&(l(z,B,!0),e||i(z,n)||h(z,n,s))),C&&F&&F.name!==r&&(D=!0,G=function values(){return F.call(this)}),e&&!w||!o&&!D&&E[n]||h(E,n,G),j[b]=G,j[B]=s,u)if(x={values:C?G:A(r),keys:v?G:A(q),entries:H},w)for(y in x)y in E||g(E,y,x[y]);else f(f.P+f.F*(o||D),b,x);return x}},function(a,b){a.exports={}},function(a,b,c){var d=c(44),e=c(15),f=c(22),g={};c(8)(g,c(23)("iterator"),function(){return this}),a.exports=function(a,b,c){a.prototype=d(g,{next:e(1,c)}),f(a,b+" Iterator")}},function(a,b,c){c(138)("anchor",function(a){return function anchor(b){return a(this,"a","name",b)}})},function(a,b,c){var d=c(6),e=c(5),f=c(33),g=/"/g,h=function(a,b,c,d){var e=String(f(a)),h="<"+b;return""!==c&&(h+=" "+c+'="'+String(d).replace(g,""")+'"'),h+">"+e+""};a.exports=function(a,b){var c={};c[a]=b(h),d(d.P+d.F*e(function(){var b=""[a]('"');return b!==b.toLowerCase()||b.split('"').length>3}),"String",c)}},function(a,b,c){c(138)("big",function(a){return function big(){return a(this,"big","","")}})},function(a,b,c){c(138)("blink",function(a){return function blink(){return a(this,"blink","","")}})},function(a,b,c){c(138)("bold",function(a){return function bold(){return a(this,"b","","")}})},function(a,b,c){c(138)("fixed",function(a){return function fixed(){return a(this,"tt","","")}})},function(a,b,c){c(138)("fontcolor",function(a){return function fontcolor(b){return a(this,"font","color",b)}})},function(a,b,c){c(138)("fontsize",function(a){return function fontsize(b){return a(this,"font","size",b)}})},function(a,b,c){c(138)("italics",function(a){return function italics(){return a(this,"i","","")}})},function(a,b,c){c(138)("link",function(a){return function link(b){return a(this,"a","href",b)}})},function(a,b,c){c(138)("small",function(a){return function small(){return a(this,"small","","")}})},function(a,b,c){c(138)("strike",function(a){return function strike(){return a(this,"strike","","")}})},function(a,b,c){c(138)("sub",function(a){return function sub(){return a(this,"sub","","")}})},function(a,b,c){c(138)("sup",function(a){return function sup(){return a(this,"sup","","")}})},function(a,b,c){var d=c(6);d(d.S,"Array",{isArray:c(43)})},function(a,b,d){var e=d(18),f=d(6),g=d(56),h=d(153),i=d(154),j=d(35),k=d(155),l=d(156);f(f.S+f.F*!d(157)(function(a){Array.from(a)}),"Array",{from:function from(a){var b,d,f,m,n=g(a),o="function"==typeof this?this:Array,p=arguments.length,q=p>1?arguments[1]:c,r=q!==c,s=0,t=l(n);if(r&&(q=e(q,p>2?arguments[2]:c,2)),t==c||o==Array&&i(t))for(b=j(n.length),d=new o(b);b>s;s++)k(d,s,r?q(n[s],s):n[s]);else for(m=t.call(n),d=new o;!(f=m.next()).done;s++)k(d,s,r?h(m,q,[f.value,s],!0):f.value);return d.length=s,d}})},function(a,b,d){var e=d(10);a.exports=function(a,b,d,f){try{return f?b(e(d)[0],d[1]):b(d)}catch(g){var h=a["return"];throw h!==c&&e(h.call(a)),g}}},function(a,b,d){var e=d(135),f=d(23)("iterator"),g=Array.prototype;a.exports=function(a){return a!==c&&(e.Array===a||g[f]===a)}},function(a,b,c){var d=c(9),e=c(15);a.exports=function(a,b,c){b in a?d.f(a,b,e(0,c)):a[b]=c}},function(a,b,d){var e=d(73),f=d(23)("iterator"),g=d(135);a.exports=d(7).getIteratorMethod=function(a){if(a!=c)return a[f]||a["@@iterator"]||g[e(a)]}},function(a,b,c){var d=c(23)("iterator"),e=!1; +try{var f=[7][d]();f["return"]=function(){e=!0},Array.from(f,function(){throw 2})}catch(g){}a.exports=function(a,b){if(!b&&!e)return!1;var c=!1;try{var f=[7],g=f[d]();g.next=function(){return{done:c=!0}},f[d]=function(){return g},a(f)}catch(h){}return c}},function(a,b,c){var d=c(6),e=c(155);d(d.S+d.F*c(5)(function(){function F(){}return!(Array.of.call(F)instanceof F)}),"Array",{of:function of(){for(var a=0,b=arguments.length,c=new("function"==typeof this?this:Array)(b);b>a;)e(c,a,arguments[a++]);return c.length=b,c}})},function(a,b,d){var e=d(6),f=d(30),g=[].join;e(e.P+e.F*(d(31)!=Object||!d(160)(g)),"Array",{join:function join(a){return g.call(f(this),a===c?",":a)}})},function(a,b,c){var d=c(5);a.exports=function(a,b){return!!a&&d(function(){b?a.call(null,function(){},1):a.call(null)})}},function(a,b,d){var e=d(6),f=d(46),g=d(32),h=d(37),i=d(35),j=[].slice;e(e.P+e.F*d(5)(function(){f&&j.call(f)}),"Array",{slice:function slice(a,b){var d=i(this.length),e=g(this);if(b=b===c?d:b,"Array"==e)return j.call(this,a,b);for(var f=h(a,d),k=h(b,d),l=i(k-f),m=Array(l),n=0;nw;w++)if((n||w in t)&&(q=t[w],r=u(q,w,s),a))if(d)x[w]=r;else if(r)switch(a){case 3:return!0;case 5:return q;case 6:return w;case 2:x.push(q)}else if(l)return!1;return m?-1:k||l?l:x}}},function(a,b,c){var d=c(166);a.exports=function(a,b){return new(d(a))(b)}},function(a,b,d){var e=d(11),f=d(43),g=d(23)("species");a.exports=function(a){var b;return f(a)&&(b=a.constructor,"function"!=typeof b||b!==Array&&!f(b.prototype)||(b=c),e(b)&&(b=b[g],null===b&&(b=c))),b===c?Array:b}},function(a,b,c){var d=c(6),e=c(164)(1);d(d.P+d.F*!c(160)([].map,!0),"Array",{map:function map(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(164)(2);d(d.P+d.F*!c(160)([].filter,!0),"Array",{filter:function filter(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(164)(3);d(d.P+d.F*!c(160)([].some,!0),"Array",{some:function some(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(164)(4);d(d.P+d.F*!c(160)([].every,!0),"Array",{every:function every(a){return e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(172);d(d.P+d.F*!c(160)([].reduce,!0),"Array",{reduce:function reduce(a){return e(this,a,arguments.length,arguments[1],!1)}})},function(a,b,c){var d=c(19),e=c(56),f=c(31),g=c(35);a.exports=function(a,b,c,h,i){d(b);var j=e(a),k=f(j),l=g(j.length),m=i?l-1:0,n=i?-1:1;if(c<2)for(;;){if(m in k){h=k[m],m+=n;break}if(m+=n,i?m<0:l<=m)throw TypeError("Reduce of empty array with no initial value")}for(;i?m>=0:l>m;m+=n)m in k&&(h=b(h,k[m],m,j));return h}},function(a,b,c){var d=c(6),e=c(172);d(d.P+d.F*!c(160)([].reduceRight,!0),"Array",{reduceRight:function reduceRight(a){return e(this,a,arguments.length,arguments[1],!0)}})},function(a,b,c){var d=c(6),e=c(34)(!1),f=[].indexOf,g=!!f&&1/[1].indexOf(1,-0)<0;d(d.P+d.F*(g||!c(160)(f)),"Array",{indexOf:function indexOf(a){return g?f.apply(this,arguments)||0:e(this,a,arguments[1])}})},function(a,b,c){var d=c(6),e=c(30),f=c(36),g=c(35),h=[].lastIndexOf,i=!!h&&1/[1].lastIndexOf(1,-0)<0;d(d.P+d.F*(i||!c(160)(h)),"Array",{lastIndexOf:function lastIndexOf(a){if(i)return h.apply(this,arguments)||0;var b=e(this),c=g(b.length),d=c-1;for(arguments.length>1&&(d=Math.min(d,f(arguments[1]))),d<0&&(d=c+d);d>=0;d--)if(d in b&&b[d]===a)return d||0;return-1}})},function(a,b,c){var d=c(6);d(d.P,"Array",{copyWithin:c(177)}),c(178)("copyWithin")},function(a,b,d){var e=d(56),f=d(37),g=d(35);a.exports=[].copyWithin||function copyWithin(a,b){var d=e(this),h=g(d.length),i=f(a,h),j=f(b,h),k=arguments.length>2?arguments[2]:c,l=Math.min((k===c?h:f(k,h))-j,h-i),m=1;for(j0;)j in d?d[i]=d[j]:delete d[i],i+=m,j+=m;return d}},function(a,b,d){var e=d(23)("unscopables"),f=Array.prototype;f[e]==c&&d(8)(f,e,{}),a.exports=function(a){f[e][a]=!0}},function(a,b,c){var d=c(6);d(d.P,"Array",{fill:c(180)}),c(178)("fill")},function(a,b,d){var e=d(56),f=d(37),g=d(35);a.exports=function fill(a){for(var b=e(this),d=g(b.length),h=arguments.length,i=f(h>1?arguments[1]:c,d),j=h>2?arguments[2]:c,k=j===c?d:f(j,d);k>i;)b[i++]=a;return b}},function(a,b,d){var e=d(6),f=d(164)(5),g="find",h=!0;g in[]&&Array(1)[g](function(){h=!1}),e(e.P+e.F*h,"Array",{find:function find(a){return f(this,a,arguments.length>1?arguments[1]:c)}}),d(178)(g)},function(a,b,d){var e=d(6),f=d(164)(6),g="findIndex",h=!0;g in[]&&Array(1)[g](function(){h=!1}),e(e.P+e.F*h,"Array",{findIndex:function findIndex(a){return f(this,a,arguments.length>1?arguments[1]:c)}}),d(178)(g)},function(a,b,d){var e=d(178),f=d(184),g=d(135),h=d(30);a.exports=d(134)(Array,"Array",function(a,b){this._t=h(a),this._i=0,this._k=b},function(){var a=this._t,b=this._k,d=this._i++;return!a||d>=a.length?(this._t=c,f(1)):"keys"==b?f(0,d):"values"==b?f(0,a[d]):f(0,[d,a[d]])},"values"),g.Arguments=g.Array,e("keys"),e("values"),e("entries")},function(a,b){a.exports=function(a,b){return{value:b,done:!!a}}},function(a,b,c){c(186)("Array")},function(a,b,c){var d=c(2),e=c(9),f=c(4),g=c(23)("species");a.exports=function(a){var b=d[a];f&&b&&!b[g]&&e.f(b,g,{configurable:!0,get:function(){return this}})}},function(a,b,d){var e=d(2),f=d(80),g=d(9).f,h=d(48).f,i=d(128),j=d(188),k=e.RegExp,l=k,m=k.prototype,n=/a/g,o=/a/g,p=new k(n)!==n;if(d(4)&&(!p||d(5)(function(){return o[d(23)("match")]=!1,k(n)!=n||k(o)==o||"/a/i"!=k(n,"i")}))){k=function RegExp(a,b){var d=this instanceof k,e=i(a),g=b===c;return!d&&e&&a.constructor===k&&g?a:f(p?new l(e&&!g?a.source:a,b):l((e=a instanceof k)?a.source:a,e&&g?j.call(a):b),d?this:m,k)};for(var q=(function(a){a in k||g(k,a,{configurable:!0,get:function(){return l[a]},set:function(b){l[a]=b}})}),r=h(l),s=0;r.length>s;)q(r[s++]);m.constructor=k,k.prototype=m,d(16)(e,"RegExp",k)}d(186)("RegExp")},function(a,b,c){var d=c(10);a.exports=function(){var a=d(this),b="";return a.global&&(b+="g"),a.ignoreCase&&(b+="i"),a.multiline&&(b+="m"),a.unicode&&(b+="u"),a.sticky&&(b+="y"),b}},function(a,b,d){d(190);var e=d(10),f=d(188),g=d(4),h="toString",i=/./[h],j=function(a){d(16)(RegExp.prototype,h,a,!0)};d(5)(function(){return"/a/b"!=i.call({source:"a",flags:"b"})})?j(function toString(){var a=e(this);return"/".concat(a.source,"/","flags"in a?a.flags:!g&&a instanceof RegExp?f.call(a):c)}):i.name!=h&&j(function toString(){return i.call(this)})},function(a,b,c){c(4)&&"g"!=/./g.flags&&c(9).f(RegExp.prototype,"flags",{configurable:!0,get:c(188)})},function(a,b,d){d(192)("match",1,function(a,b,d){return[function match(d){var e=a(this),f=d==c?c:d[b];return f!==c?f.call(d,e):new RegExp(d)[b](String(e))},d]})},function(a,b,c){var d=c(8),e=c(16),f=c(5),g=c(33),h=c(23);a.exports=function(a,b,c){var i=h(a),j=c(g,i,""[a]),k=j[0],l=j[1];f(function(){var b={};return b[i]=function(){return 7},7!=""[a](b)})&&(e(String.prototype,a,k),d(RegExp.prototype,i,2==b?function(a,b){return l.call(a,this,b)}:function(a){return l.call(a,this)}))}},function(a,b,d){d(192)("replace",2,function(a,b,d){return[function replace(e,f){var g=a(this),h=e==c?c:e[b];return h!==c?h.call(e,g,f):d.call(String(g),e,f)},d]})},function(a,b,d){d(192)("search",1,function(a,b,d){return[function search(d){var e=a(this),f=d==c?c:d[b];return f!==c?f.call(d,e):new RegExp(d)[b](String(e))},d]})},function(a,b,d){d(192)("split",2,function(a,b,e){var f=d(128),g=e,h=[].push,i="split",j="length",k="lastIndex";if("c"=="abbc"[i](/(b)*/)[1]||4!="test"[i](/(?:)/,-1)[j]||2!="ab"[i](/(?:ab)*/)[j]||4!="."[i](/(.?)(.?)/)[j]||"."[i](/()()/)[j]>1||""[i](/.?/)[j]){var l=/()??/.exec("")[1]===c;e=function(a,b){var d=String(this);if(a===c&&0===b)return[];if(!f(a))return g.call(d,a,b);var e,i,m,n,o,p=[],q=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(a.sticky?"y":""),r=0,s=b===c?4294967295:b>>>0,t=new RegExp(a.source,q+"g");for(l||(e=new RegExp("^"+t.source+"$(?!\\s)",q));(i=t.exec(d))&&(m=i.index+i[0][j],!(m>r&&(p.push(d.slice(r,i.index)),!l&&i[j]>1&&i[0].replace(e,function(){for(o=1;o1&&i.index=s)));)t[k]===i.index&&t[k]++;return r===d[j]?!n&&t.test("")||p.push(""):p.push(d.slice(r)),p[j]>s?p.slice(0,s):p}}else"0"[i](c,0)[j]&&(e=function(a,b){return a===c&&0===b?[]:g.call(this,a,b)});return[function split(d,f){var g=a(this),h=d==c?c:d[b];return h!==c?h.call(d,g,f):e.call(String(g),d,f)},e]})},function(a,b,d){var e,f,g,h=d(26),i=d(2),j=d(18),k=d(73),l=d(6),m=d(11),n=d(19),o=d(197),p=d(198),q=d(199),r=d(200).set,s=d(201)(),t="Promise",u=i.TypeError,v=i.process,w=i[t],v=i.process,x="process"==k(v),y=function(){},z=!!function(){try{var a=w.resolve(1),b=(a.constructor={})[d(23)("species")]=function(a){a(y,y)};return(x||"function"==typeof PromiseRejectionEvent)&&a.then(y)instanceof b}catch(c){}}(),A=function(a,b){return a===b||a===w&&b===g},B=function(a){var b;return!(!m(a)||"function"!=typeof(b=a.then))&&b},C=function(a){return A(w,a)?new D(a):new f(a)},D=f=function(a){var b,d;this.promise=new a(function(a,e){if(b!==c||d!==c)throw u("Bad Promise constructor");b=a,d=e}),this.resolve=n(b),this.reject=n(d)},E=function(a){try{a()}catch(b){return{error:b}}},F=function(a,b){if(!a._n){a._n=!0;var c=a._c;s(function(){for(var d=a._v,e=1==a._s,f=0,g=function(b){var c,f,g=e?b.ok:b.fail,h=b.resolve,i=b.reject,j=b.domain;try{g?(e||(2==a._h&&I(a),a._h=1),g===!0?c=d:(j&&j.enter(),c=g(d),j&&j.exit()),c===b.promise?i(u("Promise-chain cycle")):(f=B(c))?f.call(c,h,i):h(c)):i(d)}catch(k){i(k)}};c.length>f;)g(c[f++]);a._c=[],a._n=!1,b&&!a._h&&G(a)})}},G=function(a){r.call(i,function(){var b,d,e,f=a._v;if(H(a)&&(b=E(function(){x?v.emit("unhandledRejection",f,a):(d=i.onunhandledrejection)?d({promise:a,reason:f}):(e=i.console)&&e.error&&e.error("Unhandled promise rejection",f)}),a._h=x||H(a)?2:1),a._a=c,b)throw b.error})},H=function(a){if(1==a._h)return!1;for(var b,c=a._a||a._c,d=0;c.length>d;)if(b=c[d++],b.fail||!H(b.promise))return!1;return!0},I=function(a){r.call(i,function(){var b;x?v.emit("rejectionHandled",a):(b=i.onrejectionhandled)&&b({promise:a,reason:a._v})})},J=function(a){var b=this;b._d||(b._d=!0,b=b._w||b,b._v=a,b._s=2,b._a||(b._a=b._c.slice()),F(b,!0))},K=function(a){var b,c=this;if(!c._d){c._d=!0,c=c._w||c;try{if(c===a)throw u("Promise can't be resolved itself");(b=B(a))?s(function(){var d={_w:c,_d:!1};try{b.call(a,j(K,d,1),j(J,d,1))}catch(e){J.call(d,e)}}):(c._v=a,c._s=1,F(c,!1))}catch(d){J.call({_w:c,_d:!1},d)}}};z||(w=function Promise(a){o(this,w,t,"_h"),n(a),e.call(this);try{a(j(K,this,1),j(J,this,1))}catch(b){J.call(this,b)}},e=function Promise(a){this._c=[],this._a=c,this._s=0,this._d=!1,this._v=c,this._h=0,this._n=!1},e.prototype=d(202)(w.prototype,{then:function then(a,b){var d=C(q(this,w));return d.ok="function"!=typeof a||a,d.fail="function"==typeof b&&b,d.domain=x?v.domain:c,this._c.push(d),this._a&&this._a.push(d),this._s&&F(this,!1),d.promise},"catch":function(a){return this.then(c,a)}}),D=function(){var a=new e;this.promise=a,this.resolve=j(K,a,1),this.reject=j(J,a,1)}),l(l.G+l.W+l.F*!z,{Promise:w}),d(22)(w,t),d(186)(t),g=d(7)[t],l(l.S+l.F*!z,t,{reject:function reject(a){var b=C(this),c=b.reject;return c(a),b.promise}}),l(l.S+l.F*(h||!z),t,{resolve:function resolve(a){if(a instanceof w&&A(a.constructor,this))return a;var b=C(this),c=b.resolve;return c(a),b.promise}}),l(l.S+l.F*!(z&&d(157)(function(a){w.all(a)["catch"](y)})),t,{all:function all(a){var b=this,d=C(b),e=d.resolve,f=d.reject,g=E(function(){var d=[],g=0,h=1;p(a,!1,function(a){var i=g++,j=!1;d.push(c),h++,b.resolve(a).then(function(a){j||(j=!0,d[i]=a,--h||e(d))},f)}),--h||e(d)});return g&&f(g.error),d.promise},race:function race(a){var b=this,c=C(b),d=c.reject,e=E(function(){p(a,!1,function(a){b.resolve(a).then(c.resolve,d)})});return e&&d(e.error),c.promise}})},function(a,b){a.exports=function(a,b,d,e){if(!(a instanceof b)||e!==c&&e in a)throw TypeError(d+": incorrect invocation!");return a}},function(a,b,c){var d=c(18),e=c(153),f=c(154),g=c(10),h=c(35),i=c(156),j={},k={},b=a.exports=function(a,b,c,l,m){var n,o,p,q,r=m?function(){return a}:i(a),s=d(c,l,b?2:1),t=0;if("function"!=typeof r)throw TypeError(a+" is not iterable!");if(f(r)){for(n=h(a.length);n>t;t++)if(q=b?s(g(o=a[t])[0],o[1]):s(a[t]),q===j||q===k)return q}else for(p=r.call(a);!(o=p.next()).done;)if(q=e(p,s,o.value,b),q===j||q===k)return q};b.BREAK=j,b.RETURN=k},function(a,b,d){var e=d(10),f=d(19),g=d(23)("species");a.exports=function(a,b){var d,h=e(a).constructor;return h===c||(d=e(h)[g])==c?b:f(d)}},function(a,b,c){var d,e,f,g=c(18),h=c(76),i=c(46),j=c(13),k=c(2),l=k.process,m=k.setImmediate,n=k.clearImmediate,o=k.MessageChannel,p=0,q={},r="onreadystatechange",s=function(){var a=+this;if(q.hasOwnProperty(a)){var b=q[a];delete q[a],b()}},t=function(a){s.call(a.data)};m&&n||(m=function setImmediate(a){for(var b=[],c=1;arguments.length>c;)b.push(arguments[c++]);return q[++p]=function(){h("function"==typeof a?a:Function(a),b)},d(p),p},n=function clearImmediate(a){delete q[a]},"process"==c(32)(l)?d=function(a){l.nextTick(g(s,a,1))}:o?(e=new o,f=e.port2,e.port1.onmessage=t,d=g(f.postMessage,f,1)):k.addEventListener&&"function"==typeof postMessage&&!k.importScripts?(d=function(a){k.postMessage(a+"","*")},k.addEventListener("message",t,!1)):d=r in j("script")?function(a){i.appendChild(j("script"))[r]=function(){i.removeChild(this),s.call(a)}}:function(a){setTimeout(g(s,a,1),0)}),a.exports={set:m,clear:n}},function(a,b,d){var e=d(2),f=d(200).set,g=e.MutationObserver||e.WebKitMutationObserver,h=e.process,i=e.Promise,j="process"==d(32)(h);a.exports=function(){var a,b,d,k=function(){var e,f;for(j&&(e=h.domain)&&e.exit();a;){f=a.fn,a=a.next;try{f()}catch(g){throw a?d():b=c,g}}b=c,e&&e.enter()};if(j)d=function(){h.nextTick(k)};else if(g){var l=!0,m=document.createTextNode("");new g(k).observe(m,{characterData:!0}),d=function(){m.data=l=!l}}else if(i&&i.resolve){var n=i.resolve();d=function(){n.then(k)}}else d=function(){f.call(e,k)};return function(e){var f={fn:e,next:c};b&&(b.next=f),a||(a=f,d()),b=f}}},function(a,b,c){var d=c(16);a.exports=function(a,b,c){for(var e in b)d(a,e,b[e],c);return a}},function(a,b,d){var e=d(204);a.exports=d(205)("Map",function(a){return function Map(){return a(this,arguments.length>0?arguments[0]:c)}},{get:function get(a){var b=e.getEntry(this,a);return b&&b.v},set:function set(a,b){return e.def(this,0===a?0:a,b)}},e,!0)},function(a,b,d){var e=d(9).f,f=d(44),g=d(202),h=d(18),i=d(197),j=d(33),k=d(198),l=d(134),m=d(184),n=d(186),o=d(4),p=d(20).fastKey,q=o?"_s":"size",r=function(a,b){var c,d=p(b);if("F"!==d)return a._i[d];for(c=a._f;c;c=c.n)if(c.k==b)return c};a.exports={getConstructor:function(a,b,d,l){var m=a(function(a,e){i(a,m,b,"_i"),a._i=f(null),a._f=c,a._l=c,a[q]=0,e!=c&&k(e,d,a[l],a)});return g(m.prototype,{clear:function clear(){for(var a=this,b=a._i,d=a._f;d;d=d.n)d.r=!0,d.p&&(d.p=d.p.n=c),delete b[d.i];a._f=a._l=c,a[q]=0},"delete":function(a){var b=this,c=r(b,a);if(c){var d=c.n,e=c.p;delete b._i[c.i],c.r=!0,e&&(e.n=d),d&&(d.p=e),b._f==c&&(b._f=d),b._l==c&&(b._l=e),b[q]--}return!!c},forEach:function forEach(a){i(this,m,"forEach");for(var b,d=h(a,arguments.length>1?arguments[1]:c,3);b=b?b.n:this._f;)for(d(b.v,b.k,this);b&&b.r;)b=b.p},has:function has(a){return!!r(this,a)}}),o&&e(m.prototype,"size",{get:function(){return j(this[q])}}),m},def:function(a,b,d){var e,f,g=r(a,b);return g?g.v=d:(a._l=g={i:f=p(b,!0),k:b,v:d,p:e=a._l,n:c,r:!1},a._f||(a._f=g),e&&(e.n=g),a[q]++,"F"!==f&&(a._i[f]=g)),a},getEntry:r,setStrong:function(a,b,d){l(a,b,function(a,b){this._t=a,this._k=b,this._l=c},function(){for(var a=this,b=a._k,d=a._l;d&&d.r;)d=d.p;return a._t&&(a._l=d=d?d.n:a._t._f)?"keys"==b?m(0,d.k):"values"==b?m(0,d.v):m(0,[d.k,d.v]):(a._t=c,m(1))},d?"entries":"values",!d,!0),n(b)}}},function(a,b,d){var e=d(2),f=d(6),g=d(16),h=d(202),i=d(20),j=d(198),k=d(197),l=d(11),m=d(5),n=d(157),o=d(22),p=d(80);a.exports=function(a,b,d,q,r,s){var t=e[a],u=t,v=r?"set":"add",w=u&&u.prototype,x={},y=function(a){var b=w[a];g(w,a,"delete"==a?function(a){return!(s&&!l(a))&&b.call(this,0===a?0:a)}:"has"==a?function has(a){return!(s&&!l(a))&&b.call(this,0===a?0:a)}:"get"==a?function get(a){return s&&!l(a)?c:b.call(this,0===a?0:a)}:"add"==a?function add(a){return b.call(this,0===a?0:a),this}:function set(a,c){return b.call(this,0===a?0:a,c),this})};if("function"==typeof u&&(s||w.forEach&&!m(function(){(new u).entries().next()}))){var z=new u,A=z[v](s?{}:-0,1)!=z,B=m(function(){z.has(1)}),C=n(function(a){new u(a)}),D=!s&&m(function(){for(var a=new u,b=5;b--;)a[v](b,b);return!a.has(-0)});C||(u=b(function(b,d){k(b,u,a);var e=p(new t,b,u);return d!=c&&j(d,r,e[v],e),e}),u.prototype=w,w.constructor=u),(B||D)&&(y("delete"),y("has"),r&&y("get")),(D||A)&&y(v),s&&w.clear&&delete w.clear}else u=q.getConstructor(b,a,r,v),h(u.prototype,d),i.NEED=!0;return o(u,a),x[a]=u,f(f.G+f.W+f.F*(u!=t),x),s||q.setStrong(u,a,r),u}},function(a,b,d){var e=d(204);a.exports=d(205)("Set",function(a){return function Set(){return a(this,arguments.length>0?arguments[0]:c)}},{add:function add(a){return e.def(this,a=0===a?0:a,a)}},e)},function(a,b,d){var e,f=d(164)(0),g=d(16),h=d(20),i=d(67),j=d(208),k=d(11),l=h.getWeak,m=Object.isExtensible,n=j.ufstore,o={},p=function(a){return function WeakMap(){return a(this,arguments.length>0?arguments[0]:c)}},q={get:function get(a){if(k(a)){var b=l(a);return b===!0?n(this).get(a):b?b[this._i]:c}},set:function set(a,b){return j.def(this,a,b)}},r=a.exports=d(205)("WeakMap",p,q,j,!0,!0);7!=(new r).set((Object.freeze||Object)(o),7).get(o)&&(e=j.getConstructor(p),i(e.prototype,q),h.NEED=!0,f(["delete","has","get","set"],function(a){var b=r.prototype,c=b[a];g(b,a,function(b,d){if(k(b)&&!m(b)){this._f||(this._f=new e);var f=this._f[a](b,d);return"set"==a?this:f}return c.call(this,b,d)})}))},function(a,b,d){var e=d(202),f=d(20).getWeak,g=d(10),h=d(11),i=d(197),j=d(198),k=d(164),l=d(3),m=k(5),n=k(6),o=0,p=function(a){return a._l||(a._l=new q)},q=function(){this.a=[]},r=function(a,b){return m(a.a,function(a){return a[0]===b})};q.prototype={get:function(a){var b=r(this,a);if(b)return b[1]},has:function(a){return!!r(this,a)},set:function(a,b){var c=r(this,a);c?c[1]=b:this.a.push([a,b])},"delete":function(a){var b=n(this.a,function(b){return b[0]===a});return~b&&this.a.splice(b,1),!!~b}},a.exports={getConstructor:function(a,b,d,g){var k=a(function(a,e){i(a,k,b,"_i"),a._i=o++,a._l=c,e!=c&&j(e,d,a[g],a)});return e(k.prototype,{"delete":function(a){if(!h(a))return!1;var b=f(a);return b===!0?p(this)["delete"](a):b&&l(b,this._i)&&delete b[this._i]},has:function has(a){if(!h(a))return!1;var b=f(a);return b===!0?p(this).has(a):b&&l(b,this._i)}}),k},def:function(a,b,c){var d=f(g(b),!0);return d===!0?p(a).set(b,c):d[a._i]=c,a},ufstore:p}},function(a,b,d){var e=d(208);d(205)("WeakSet",function(a){return function WeakSet(){return a(this,arguments.length>0?arguments[0]:c)}},{add:function add(a){return e.def(this,a,!0)}},e,!1,!0)},function(a,b,c){var d=c(6),e=c(19),f=c(10),g=(c(2).Reflect||{}).apply,h=Function.apply;d(d.S+d.F*!c(5)(function(){g(function(){})}),"Reflect",{apply:function apply(a,b,c){var d=e(a),i=f(c);return g?g(d,b,i):h.call(d,b,i)}})},function(a,b,c){var d=c(6),e=c(44),f=c(19),g=c(10),h=c(11),i=c(5),j=c(75),k=(c(2).Reflect||{}).construct,l=i(function(){function F(){}return!(k(function(){},[],F)instanceof F)}),m=!i(function(){k(function(){})});d(d.S+d.F*(l||m),"Reflect",{construct:function construct(a,b){f(a),g(b);var c=arguments.length<3?a:f(arguments[2]);if(m&&!l)return k(a,b,c);if(a==c){switch(b.length){case 0:return new a;case 1:return new a(b[0]);case 2:return new a(b[0],b[1]);case 3:return new a(b[0],b[1],b[2]);case 4:return new a(b[0],b[1],b[2],b[3])}var d=[null];return d.push.apply(d,b),new(j.apply(a,d))}var i=c.prototype,n=e(h(i)?i:Object.prototype),o=Function.apply.call(a,n,b);return h(o)?o:n}})},function(a,b,c){var d=c(9),e=c(6),f=c(10),g=c(14);e(e.S+e.F*c(5)(function(){Reflect.defineProperty(d.f({},1,{value:1}),1,{value:2})}),"Reflect",{defineProperty:function defineProperty(a,b,c){f(a),b=g(b,!0),f(c);try{return d.f(a,b,c),!0}catch(e){return!1}}})},function(a,b,c){var d=c(6),e=c(49).f,f=c(10);d(d.S,"Reflect",{deleteProperty:function deleteProperty(a,b){var c=e(f(a),b);return!(c&&!c.configurable)&&delete a[b]}})},function(a,b,d){var e=d(6),f=d(10),g=function(a){this._t=f(a),this._i=0;var b,c=this._k=[];for(b in a)c.push(b)};d(136)(g,"Object",function(){var a,b=this,d=b._k;do if(b._i>=d.length)return{value:c,done:!0};while(!((a=d[b._i++])in b._t));return{value:a,done:!1}}),e(e.S,"Reflect",{enumerate:function enumerate(a){return new g(a)}})},function(a,b,d){function get(a,b){var d,h,k=arguments.length<3?a:arguments[2];return j(a)===k?a[b]:(d=e.f(a,b))?g(d,"value")?d.value:d.get!==c?d.get.call(k):c:i(h=f(a))?get(h,b,k):void 0}var e=d(49),f=d(57),g=d(3),h=d(6),i=d(11),j=d(10);h(h.S,"Reflect",{get:get})},function(a,b,c){var d=c(49),e=c(6),f=c(10);e(e.S,"Reflect",{getOwnPropertyDescriptor:function getOwnPropertyDescriptor(a,b){return d.f(f(a),b)}})},function(a,b,c){var d=c(6),e=c(57),f=c(10);d(d.S,"Reflect",{getPrototypeOf:function getPrototypeOf(a){return e(f(a))}})},function(a,b,c){var d=c(6);d(d.S,"Reflect",{has:function has(a,b){return b in a}})},function(a,b,c){var d=c(6),e=c(10),f=Object.isExtensible;d(d.S,"Reflect",{isExtensible:function isExtensible(a){return e(a),!f||f(a)}})},function(a,b,c){var d=c(6);d(d.S,"Reflect",{ownKeys:c(221)})},function(a,b,c){var d=c(48),e=c(41),f=c(10),g=c(2).Reflect;a.exports=g&&g.ownKeys||function ownKeys(a){var b=d.f(f(a)),c=e.f;return c?b.concat(c(a)):b}},function(a,b,c){var d=c(6),e=c(10),f=Object.preventExtensions;d(d.S,"Reflect",{preventExtensions:function preventExtensions(a){e(a);try{return f&&f(a),!0}catch(b){return!1}}})},function(a,b,d){function set(a,b,d){var i,m,n=arguments.length<4?a:arguments[3],o=f.f(k(a),b);if(!o){if(l(m=g(a)))return set(m,b,d,n);o=j(0)}return h(o,"value")?!(o.writable===!1||!l(n))&&(i=f.f(n,b)||j(0),i.value=d,e.f(n,b,i),!0):o.set!==c&&(o.set.call(n,d),!0)}var e=d(9),f=d(49),g=d(57),h=d(3),i=d(6),j=d(15),k=d(10),l=d(11);i(i.S,"Reflect",{set:set})},function(a,b,c){var d=c(6),e=c(71);e&&d(d.S,"Reflect",{setPrototypeOf:function setPrototypeOf(a,b){e.check(a,b);try{return e.set(a,b),!0}catch(c){return!1}}})},function(a,b,c){var d=c(6);d(d.S,"Date",{now:function(){return(new Date).getTime()}})},function(a,b,c){var d=c(6),e=c(56),f=c(14);d(d.P+d.F*c(5)(function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}),"Date",{toJSON:function toJSON(a){var b=e(this),c=f(b);return"number"!=typeof c||isFinite(c)?b.toISOString():null}})},function(a,b,c){var d=c(6),e=c(5),f=Date.prototype.getTime,g=function(a){return a>9?a:"0"+a};d(d.P+d.F*(e(function(){return"0385-07-25T07:06:39.999Z"!=new Date(-5e13-1).toISOString()})||!e(function(){new Date(NaN).toISOString()})),"Date",{toISOString:function toISOString(){if(!isFinite(f.call(this)))throw RangeError("Invalid time value");var a=this,b=a.getUTCFullYear(),c=a.getUTCMilliseconds(),d=b<0?"-":b>9999?"+":"";return d+("00000"+Math.abs(b)).slice(d?-6:-4)+"-"+g(a.getUTCMonth()+1)+"-"+g(a.getUTCDate())+"T"+g(a.getUTCHours())+":"+g(a.getUTCMinutes())+":"+g(a.getUTCSeconds())+"."+(c>99?c:"0"+g(c))+"Z"}})},function(a,b,c){var d=Date.prototype,e="Invalid Date",f="toString",g=d[f],h=d.getTime;new Date(NaN)+""!=e&&c(16)(d,f,function toString(){var a=h.call(this);return a===a?g.call(this):e})},function(a,b,c){var d=c(23)("toPrimitive"),e=Date.prototype;d in e||c(8)(e,d,c(230))},function(a,b,c){var d=c(10),e=c(14),f="number";a.exports=function(a){if("string"!==a&&a!==f&&"default"!==a)throw TypeError("Incorrect hint");return e(d(this),a!=f)}},function(a,b,d){var e=d(6),f=d(232),g=d(233),h=d(10),i=d(37),j=d(35),k=d(11),l=d(2).ArrayBuffer,m=d(199),n=g.ArrayBuffer,o=g.DataView,p=f.ABV&&l.isView,q=n.prototype.slice,r=f.VIEW,s="ArrayBuffer";e(e.G+e.W+e.F*(l!==n),{ArrayBuffer:n}),e(e.S+e.F*!f.CONSTR,s,{isView:function isView(a){return p&&p(a)||k(a)&&r in a}}),e(e.P+e.U+e.F*d(5)(function(){return!new n(2).slice(1,c).byteLength}),s,{slice:function slice(a,b){if(q!==c&&b===c)return q.call(h(this),a);for(var d=h(this).byteLength,e=i(a,d),f=i(b===c?d:b,d),g=new(m(this,n))(j(f-e)),k=new o(this),l=new o(g),p=0;e>1,k=23===b?E(2,-24)-E(2,-77):0,l=0,m=a<0||0===a&&1/a<0?1:0;for(a=D(a),a!=a||a===B?(e=a!=a?1:0,d=i):(d=F(G(a)/H),a*(f=E(2,-d))<1&&(d--,f*=2),a+=d+j>=1?k/f:k*E(2,1-j),a*f>=2&&(d++,f/=2),d+j>=i?(e=0,d=i):d+j>=1?(e=(a*f-1)*E(2,b),d+=j):(e=a*E(2,j-1)*E(2,b),d=0));b>=8;g[l++]=255&e,e/=256,b-=8);for(d=d<0;g[l++]=255&d,d/=256,h-=8);return g[--l]|=128*m,g},P=function(a,b,c){var d,e=8*c-b-1,f=(1<>1,h=e-7,i=c-1,j=a[i--],k=127&j;for(j>>=7;h>0;k=256*k+a[i],i--,h-=8);for(d=k&(1<<-h)-1,k>>=-h,h+=b;h>0;d=256*d+a[i],i--,h-=8);if(0===k)k=1-g;else{if(k===f)return d?NaN:j?-B:B;d+=E(2,b),k-=g}return(j?-1:1)*d*E(2,k-b)},Q=function(a){return a[3]<<24|a[2]<<16|a[1]<<8|a[0]},R=function(a){return[255&a]},S=function(a){return[255&a,a>>8&255]},T=function(a){return[255&a,a>>8&255,a>>16&255,a>>24&255]},U=function(a){return O(a,52,8)},V=function(a){return O(a,23,4)},W=function(a,b,c){p(a[u],b,{get:function(){return this[c]}})},X=function(a,b,c,d){var e=+c,f=m(e);if(e!=f||f<0||f+b>a[M])throw A(w);var g=a[L]._b,h=f+a[N],i=g.slice(h,h+b);return d?i:i.reverse()},Y=function(a,b,c,d,e,f){var g=+c,h=m(g);if(g!=h||h<0||h+b>a[M])throw A(w);for(var i=a[L]._b,j=h+a[N],k=d(+e),l=0;lba;)($=aa[ba++])in x||i(x,$,C[$]);g||(_.constructor=x)}var ca=new y(new x(2)),da=y[u].setInt8;ca.setInt8(0,2147483648),ca.setInt8(1,2147483649),!ca.getInt8(0)&&ca.getInt8(1)||j(y[u],{setInt8:function setInt8(a,b){da.call(this,a,b<<24>>24)},setUint8:function setUint8(a,b){da.call(this,a,b<<24>>24)}},!0)}else x=function ArrayBuffer(a){var b=Z(this,a);this._b=q.call(Array(b),0),this[M]=b},y=function DataView(a,b,d){l(this,y,t),l(a,x,t);var e=a[M],f=m(b);if(f<0||f>e)throw A("Wrong offset!");if(d=d===c?e-f:n(d),f+d>e)throw A(v);this[L]=a,this[N]=f,this[M]=d},f&&(W(x,J,"_l"),W(y,I,"_b"),W(y,J,"_l"),W(y,K,"_o")),j(y[u],{getInt8:function getInt8(a){return X(this,1,a)[0]<<24>>24},getUint8:function getUint8(a){return X(this,1,a)[0]},getInt16:function getInt16(a){var b=X(this,2,a,arguments[1]);return(b[1]<<8|b[0])<<16>>16},getUint16:function getUint16(a){var b=X(this,2,a,arguments[1]);return b[1]<<8|b[0]},getInt32:function getInt32(a){return Q(X(this,4,a,arguments[1]))},getUint32:function getUint32(a){return Q(X(this,4,a,arguments[1]))>>>0},getFloat32:function getFloat32(a){return P(X(this,4,a,arguments[1]),23,4)},getFloat64:function getFloat64(a){return P(X(this,8,a,arguments[1]),52,8)},setInt8:function setInt8(a,b){Y(this,1,a,R,b)},setUint8:function setUint8(a,b){Y(this,1,a,R,b)},setInt16:function setInt16(a,b){Y(this,2,a,S,b,arguments[2])},setUint16:function setUint16(a,b){Y(this,2,a,S,b,arguments[2])},setInt32:function setInt32(a,b){Y(this,4,a,T,b,arguments[2])},setUint32:function setUint32(a,b){Y(this,4,a,T,b,arguments[2])},setFloat32:function setFloat32(a,b){Y(this,4,a,V,b,arguments[2])},setFloat64:function setFloat64(a,b){Y(this,8,a,U,b,arguments[2])}});r(x,s),r(y,t),i(y[u],h.VIEW,!0),b[s]=x,b[t]=y},function(a,b,c){var d=c(6);d(d.G+d.W+d.F*!c(232).ABV,{DataView:c(233).DataView})},function(a,b,c){c(236)("Int8",1,function(a){return function Int8Array(b,c,d){return a(this,b,c,d)}})},function(a,b,d){if(d(4)){var e=d(26),f=d(2),g=d(5),h=d(6),i=d(232),j=d(233),k=d(18),l=d(197),m=d(15),n=d(8),o=d(202),p=d(36),q=d(35),r=d(37),s=d(14),t=d(3),u=d(69),v=d(73),w=d(11),x=d(56),y=d(154),z=d(44),A=d(57),B=d(48).f,C=d(156),D=d(17),E=d(23),F=d(164),G=d(34),H=d(199),I=d(183),J=d(135),K=d(157),L=d(186),M=d(180),N=d(177),O=d(9),P=d(49),Q=O.f,R=P.f,S=f.RangeError,T=f.TypeError,U=f.Uint8Array,V="ArrayBuffer",W="Shared"+V,X="BYTES_PER_ELEMENT",Y="prototype",Z=Array[Y],$=j.ArrayBuffer,_=j.DataView,aa=F(0),ba=F(2),ca=F(3),da=F(4),ea=F(5),fa=F(6),ga=G(!0),ha=G(!1),ia=I.values,ja=I.keys,ka=I.entries,la=Z.lastIndexOf,ma=Z.reduce,na=Z.reduceRight,oa=Z.join,pa=Z.sort,qa=Z.slice,ra=Z.toString,sa=Z.toLocaleString,ta=E("iterator"),ua=E("toStringTag"),va=D("typed_constructor"),wa=D("def_constructor"),xa=i.CONSTR,ya=i.TYPED,za=i.VIEW,Aa="Wrong length!",Ba=F(1,function(a,b){return Ha(H(a,a[wa]),b)}),Ca=g(function(){return 1===new U(new Uint16Array([1]).buffer)[0]}),Da=!!U&&!!U[Y].set&&g(function(){new U(1).set({})}),Ea=function(a,b){if(a===c)throw T(Aa);var d=+a,e=q(a);if(b&&!u(d,e))throw S(Aa);return e},Fa=function(a,b){var c=p(a);if(c<0||c%b)throw S("Wrong offset!");return c},Ga=function(a){if(w(a)&&ya in a)return a;throw T(a+" is not a typed array!")},Ha=function(a,b){if(!(w(a)&&va in a))throw T("It is not a typed array constructor!");return new a(b)},Ia=function(a,b){return Ja(H(a,a[wa]),b)},Ja=function(a,b){for(var c=0,d=b.length,e=Ha(a,d);d>c;)e[c]=b[c++];return e},Ka=function(a,b,c){Q(a,b,{get:function(){return this._d[c]}})},La=function from(a){var b,d,e,f,g,h,i=x(a),j=arguments.length,l=j>1?arguments[1]:c,m=l!==c,n=C(i);if(n!=c&&!y(n)){for(h=n.call(i),e=[],b=0;!(g=h.next()).done;b++)e.push(g.value);i=e}for(m&&j>2&&(l=k(l,arguments[2],2)),b=0,d=q(i.length),f=Ha(this,d);d>b;b++)f[b]=m?l(i[b],b):i[b];return f},Ma=function of(){for(var a=0,b=arguments.length,c=Ha(this,b);b>a;)c[a]=arguments[a++];return c},Na=!!U&&g(function(){sa.call(new U(1))}),Oa=function toLocaleString(){return sa.apply(Na?qa.call(Ga(this)):Ga(this),arguments)},Pa={copyWithin:function copyWithin(a,b){return N.call(Ga(this),a,b,arguments.length>2?arguments[2]:c)},every:function every(a){return da(Ga(this),a,arguments.length>1?arguments[1]:c)},fill:function fill(a){return M.apply(Ga(this),arguments)},filter:function filter(a){return Ia(this,ba(Ga(this),a,arguments.length>1?arguments[1]:c))},find:function find(a){return ea(Ga(this),a,arguments.length>1?arguments[1]:c)},findIndex:function findIndex(a){return fa(Ga(this),a,arguments.length>1?arguments[1]:c)},forEach:function forEach(a){aa(Ga(this),a,arguments.length>1?arguments[1]:c)},indexOf:function indexOf(a){return ha(Ga(this),a,arguments.length>1?arguments[1]:c)},includes:function includes(a){return ga(Ga(this),a,arguments.length>1?arguments[1]:c)},join:function join(a){return oa.apply(Ga(this),arguments)},lastIndexOf:function lastIndexOf(a){ +return la.apply(Ga(this),arguments)},map:function map(a){return Ba(Ga(this),a,arguments.length>1?arguments[1]:c)},reduce:function reduce(a){return ma.apply(Ga(this),arguments)},reduceRight:function reduceRight(a){return na.apply(Ga(this),arguments)},reverse:function reverse(){for(var a,b=this,c=Ga(b).length,d=Math.floor(c/2),e=0;e1?arguments[1]:c)},sort:function sort(a){return pa.call(Ga(this),a)},subarray:function subarray(a,b){var d=Ga(this),e=d.length,f=r(a,e);return new(H(d,d[wa]))(d.buffer,d.byteOffset+f*d.BYTES_PER_ELEMENT,q((b===c?e:r(b,e))-f))}},Qa=function slice(a,b){return Ia(this,qa.call(Ga(this),a,b))},Ra=function set(a){Ga(this);var b=Fa(arguments[1],1),c=this.length,d=x(a),e=q(d.length),f=0;if(e+b>c)throw S(Aa);for(;f255?255:255&d),e.v[p](c*b+e.o,d,Ca)},E=function(a,b){Q(a,b,{get:function(){return C(this,b)},set:function(a){return D(this,b,a)},enumerable:!0})};u?(r=d(function(a,d,e,f){l(a,r,k,"_d");var g,h,i,j,m=0,o=0;if(w(d)){if(!(d instanceof $||(j=v(d))==V||j==W))return ya in d?Ja(r,d):La.call(r,d);g=d,o=Fa(e,b);var p=d.byteLength;if(f===c){if(p%b)throw S(Aa);if(h=p-o,h<0)throw S(Aa)}else if(h=q(f)*b,h+o>p)throw S(Aa);i=h/b}else i=Ea(d,!0),h=i*b,g=new $(h);for(n(a,"_d",{b:g,o:o,l:h,e:i,v:new _(g)});m1?arguments[1]:c)}}),d(178)("includes")},function(a,b,c){var d=c(6),e=c(125)(!0);d(d.P,"String",{at:function at(a){return e(this,a)}})},function(a,b,d){var e=d(6),f=d(248);e(e.P,"String",{padStart:function padStart(a){return f(this,a,arguments.length>1?arguments[1]:c,!0)}})},function(a,b,d){var e=d(35),f=d(85),g=d(33);a.exports=function(a,b,d,h){var i=String(g(a)),j=i.length,k=d===c?" ":String(d),l=e(b);if(l<=j||""==k)return i;var m=l-j,n=f.call(k,Math.ceil(m/k.length));return n.length>m&&(n=n.slice(0,m)),h?n+i:i+n}},function(a,b,d){var e=d(6),f=d(248);e(e.P,"String",{padEnd:function padEnd(a){return f(this,a,arguments.length>1?arguments[1]:c,!1)}})},function(a,b,c){c(81)("trimLeft",function(a){return function trimLeft(){return a(this,1)}},"trimStart")},function(a,b,c){c(81)("trimRight",function(a){return function trimRight(){return a(this,2)}},"trimEnd")},function(a,b,c){var d=c(6),e=c(33),f=c(35),g=c(128),h=c(188),i=RegExp.prototype,j=function(a,b){this._r=a,this._s=b};c(136)(j,"RegExp String",function next(){var a=this._r.exec(this._s);return{value:a,done:null===a}}),d(d.P,"String",{matchAll:function matchAll(a){if(e(this),!g(a))throw TypeError(a+" is not a regexp!");var b=String(this),c="flags"in i?String(a.flags):h.call(a),d=new RegExp(a.source,~c.indexOf("g")?c:"g"+c);return d.lastIndex=f(a.lastIndex),new j(d,b)}})},function(a,b,c){c(25)("asyncIterator")},function(a,b,c){c(25)("observable")},function(a,b,c){var d=c(6),e=c(221),f=c(30),g=c(49),h=c(155);d(d.S,"Object",{getOwnPropertyDescriptors:function getOwnPropertyDescriptors(a){for(var b,c=f(a),d=g.f,i=e(c),j={},k=0;i.length>k;)h(j,b=i[k++],d(c,b));return j}})},function(a,b,c){var d=c(6),e=c(257)(!1);d(d.S,"Object",{values:function values(a){return e(a)}})},function(a,b,c){var d=c(28),e=c(30),f=c(42).f;a.exports=function(a){return function(b){for(var c,g=e(b),h=d(g),i=h.length,j=0,k=[];i>j;)f.call(g,c=h[j++])&&k.push(a?[c,g[c]]:g[c]);return k}}},function(a,b,c){var d=c(6),e=c(257)(!0);d(d.S,"Object",{entries:function entries(a){return e(a)}})},function(a,b,c){var d=c(6),e=c(56),f=c(19),g=c(9);c(4)&&d(d.P+c(260),"Object",{__defineGetter__:function __defineGetter__(a,b){g.f(e(this),a,{get:f(b),enumerable:!0,configurable:!0})}})},function(a,b,c){a.exports=c(26)||!c(5)(function(){var a=Math.random();__defineSetter__.call(null,a,function(){}),delete c(2)[a]})},function(a,b,c){var d=c(6),e=c(56),f=c(19),g=c(9);c(4)&&d(d.P+c(260),"Object",{__defineSetter__:function __defineSetter__(a,b){g.f(e(this),a,{set:f(b),enumerable:!0,configurable:!0})}})},function(a,b,c){var d=c(6),e=c(56),f=c(14),g=c(57),h=c(49).f;c(4)&&d(d.P+c(260),"Object",{__lookupGetter__:function __lookupGetter__(a){var b,c=e(this),d=f(a,!0);do if(b=h(c,d))return b.get;while(c=g(c))}})},function(a,b,c){var d=c(6),e=c(56),f=c(14),g=c(57),h=c(49).f;c(4)&&d(d.P+c(260),"Object",{__lookupSetter__:function __lookupSetter__(a){var b,c=e(this),d=f(a,!0);do if(b=h(c,d))return b.set;while(c=g(c))}})},function(a,b,c){var d=c(6);d(d.P+d.R,"Map",{toJSON:c(265)("Map")})},function(a,b,c){var d=c(73),e=c(266);a.exports=function(a){return function toJSON(){if(d(this)!=a)throw TypeError(a+"#toJSON isn't generic");return e(this)}}},function(a,b,c){var d=c(198);a.exports=function(a,b){var c=[];return d(a,!1,c.push,c,b),c}},function(a,b,c){var d=c(6);d(d.P+d.R,"Set",{toJSON:c(265)("Set")})},function(a,b,c){var d=c(6);d(d.S,"System",{global:c(2)})},function(a,b,c){var d=c(6),e=c(32);d(d.S,"Error",{isError:function isError(a){return"Error"===e(a)}})},function(a,b,c){var d=c(6);d(d.S,"Math",{iaddh:function iaddh(a,b,c,d){var e=a>>>0,f=b>>>0,g=c>>>0;return f+(d>>>0)+((e&g|(e|g)&~(e+g>>>0))>>>31)|0}})},function(a,b,c){var d=c(6);d(d.S,"Math",{isubh:function isubh(a,b,c,d){var e=a>>>0,f=b>>>0,g=c>>>0;return f-(d>>>0)-((~e&g|~(e^g)&e-g>>>0)>>>31)|0}})},function(a,b,c){var d=c(6);d(d.S,"Math",{imulh:function imulh(a,b){var c=65535,d=+a,e=+b,f=d&c,g=e&c,h=d>>16,i=e>>16,j=(h*g>>>0)+(f*g>>>16);return h*i+(j>>16)+((f*i>>>0)+(j&c)>>16)}})},function(a,b,c){var d=c(6);d(d.S,"Math",{umulh:function umulh(a,b){var c=65535,d=+a,e=+b,f=d&c,g=e&c,h=d>>>16,i=e>>>16,j=(h*g>>>0)+(f*g>>>16);return h*i+(j>>>16)+((f*i>>>0)+(j&c)>>>16)}})},function(a,b,c){var d=c(275),e=c(10),f=d.key,g=d.set;d.exp({defineMetadata:function defineMetadata(a,b,c,d){g(a,b,e(c),f(d))}})},function(a,b,d){var e=d(203),f=d(6),g=d(21)("metadata"),h=g.store||(g.store=new(d(207))),i=function(a,b,d){var f=h.get(a);if(!f){if(!d)return c;h.set(a,f=new e)}var g=f.get(b);if(!g){if(!d)return c;f.set(b,g=new e)}return g},j=function(a,b,d){var e=i(b,d,!1);return e!==c&&e.has(a)},k=function(a,b,d){var e=i(b,d,!1);return e===c?c:e.get(a)},l=function(a,b,c,d){i(c,d,!0).set(a,b)},m=function(a,b){var c=i(a,b,!1),d=[];return c&&c.forEach(function(a,b){d.push(b)}),d},n=function(a){return a===c||"symbol"==typeof a?a:String(a)},o=function(a){f(f.S,"Reflect",a)};a.exports={store:h,map:i,has:j,get:k,set:l,keys:m,key:n,exp:o}},function(a,b,d){var e=d(275),f=d(10),g=e.key,h=e.map,i=e.store;e.exp({deleteMetadata:function deleteMetadata(a,b){var d=arguments.length<3?c:g(arguments[2]),e=h(f(b),d,!1);if(e===c||!e["delete"](a))return!1;if(e.size)return!0;var j=i.get(b);return j["delete"](d),!!j.size||i["delete"](b)}})},function(a,b,d){var e=d(275),f=d(10),g=d(57),h=e.has,i=e.get,j=e.key,k=function(a,b,d){var e=h(a,b,d);if(e)return i(a,b,d);var f=g(b);return null!==f?k(a,f,d):c};e.exp({getMetadata:function getMetadata(a,b){return k(a,f(b),arguments.length<3?c:j(arguments[2]))}})},function(a,b,d){var e=d(206),f=d(266),g=d(275),h=d(10),i=d(57),j=g.keys,k=g.key,l=function(a,b){var c=j(a,b),d=i(a);if(null===d)return c;var g=l(d,b);return g.length?c.length?f(new e(c.concat(g))):g:c};g.exp({getMetadataKeys:function getMetadataKeys(a){return l(h(a),arguments.length<2?c:k(arguments[1]))}})},function(a,b,d){var e=d(275),f=d(10),g=e.get,h=e.key;e.exp({getOwnMetadata:function getOwnMetadata(a,b){return g(a,f(b),arguments.length<3?c:h(arguments[2]))}})},function(a,b,d){var e=d(275),f=d(10),g=e.keys,h=e.key;e.exp({getOwnMetadataKeys:function getOwnMetadataKeys(a){return g(f(a),arguments.length<2?c:h(arguments[1]))}})},function(a,b,d){var e=d(275),f=d(10),g=d(57),h=e.has,i=e.key,j=function(a,b,c){var d=h(a,b,c);if(d)return!0;var e=g(b);return null!==e&&j(a,e,c)};e.exp({hasMetadata:function hasMetadata(a,b){return j(a,f(b),arguments.length<3?c:i(arguments[2]))}})},function(a,b,d){var e=d(275),f=d(10),g=e.has,h=e.key;e.exp({hasOwnMetadata:function hasOwnMetadata(a,b){return g(a,f(b),arguments.length<3?c:h(arguments[2]))}})},function(a,b,d){var e=d(275),f=d(10),g=d(19),h=e.key,i=e.set;e.exp({metadata:function metadata(a,b){return function decorator(d,e){i(a,b,(e!==c?f:g)(d),h(e))}}})},function(a,b,c){var d=c(6),e=c(201)(),f=c(2).process,g="process"==c(32)(f);d(d.G,{asap:function asap(a){var b=g&&f.domain;e(b?b.bind(a):a)}})},function(a,b,d){var e=d(6),f=d(2),g=d(7),h=d(201)(),i=d(23)("observable"),j=d(19),k=d(10),l=d(197),m=d(202),n=d(8),o=d(198),p=o.RETURN,q=function(a){return null==a?c:j(a)},r=function(a){var b=a._c;b&&(a._c=c,b())},s=function(a){return a._o===c},t=function(a){s(a)||(a._o=c,r(a))},u=function(a,b){k(a),this._c=c,this._o=a,a=new v(this);try{var d=b(a),e=d;null!=d&&("function"==typeof d.unsubscribe?d=function(){e.unsubscribe()}:j(d),this._c=d)}catch(f){return void a.error(f)}s(this)&&r(this)};u.prototype=m({},{unsubscribe:function unsubscribe(){t(this)}});var v=function(a){this._s=a};v.prototype=m({},{next:function next(a){var b=this._s;if(!s(b)){var c=b._o;try{var d=q(c.next);if(d)return d.call(c,a)}catch(e){try{t(b)}finally{throw e}}}},error:function error(a){var b=this._s;if(s(b))throw a;var d=b._o;b._o=c;try{var e=q(d.error);if(!e)throw a;a=e.call(d,a)}catch(f){try{r(b)}finally{throw f}}return r(b),a},complete:function complete(a){var b=this._s;if(!s(b)){var d=b._o;b._o=c;try{var e=q(d.complete);a=e?e.call(d,a):c}catch(f){try{r(b)}finally{throw f}}return r(b),a}}});var w=function Observable(a){l(this,w,"Observable","_f")._f=j(a)};m(w.prototype,{subscribe:function subscribe(a){return new u(a,this._f)},forEach:function forEach(a){var b=this;return new(g.Promise||f.Promise)(function(c,d){j(a);var e=b.subscribe({next:function(b){try{return a(b)}catch(c){d(c),e.unsubscribe()}},error:d,complete:c})})}}),m(w,{from:function from(a){var b="function"==typeof this?this:w,c=q(k(a)[i]);if(c){var d=k(c.call(a));return d.constructor===b?d:new b(function(a){return d.subscribe(a)})}return new b(function(b){var c=!1;return h(function(){if(!c){try{if(o(a,!1,function(a){if(b.next(a),c)return p})===p)return}catch(d){if(c)throw d;return void b.error(d)}b.complete()}}),function(){c=!0}})},of:function of(){for(var a=0,b=arguments.length,c=Array(b);ag;)(c[g]=arguments[g++])===h&&(i=!0);return function(){var d,f=this,g=arguments.length,j=0,k=0;if(!i&&!g)return e(a,c,f);if(d=c.slice(),i)for(;b>j;j++)d[j]===h&&(d[j]=arguments[k++]);for(;g>k;)d.push(arguments[k++]);return e(a,d,f)}}},function(a,b,c){a.exports=c(2)}]),"undefined"!=typeof module&&module.exports?module.exports=a:"function"==typeof define&&define.amd?define(function(){return a}):b.core=a}(1,1); +//# sourceMappingURL=shim.min.js.map \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/client/shim.min.js.map b/pitfall/pdfkit/node_modules/core-js/client/shim.min.js.map new file mode 100644 index 00000000..dc589561 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/client/shim.min.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["shim.js"],"names":["__e","__g","undefined","modules","__webpack_require__","moduleId","installedModules","exports","module","id","loaded","call","m","c","p","global","has","DESCRIPTORS","$export","redefine","META","KEY","$fails","shared","setToStringTag","uid","wks","wksExt","wksDefine","keyOf","enumKeys","isArray","anObject","toIObject","toPrimitive","createDesc","_create","gOPNExt","$GOPD","$DP","$keys","gOPD","f","dP","gOPN","$Symbol","Symbol","$JSON","JSON","_stringify","stringify","PROTOTYPE","HIDDEN","TO_PRIMITIVE","isEnum","propertyIsEnumerable","SymbolRegistry","AllSymbols","OPSymbols","ObjectProto","Object","USE_NATIVE","QObject","setter","findChild","setSymbolDesc","get","this","value","a","it","key","D","protoDesc","wrap","tag","sym","_k","isSymbol","iterator","$defineProperty","defineProperty","enumerable","$defineProperties","defineProperties","P","keys","i","l","length","$create","create","$propertyIsEnumerable","E","$getOwnPropertyDescriptor","getOwnPropertyDescriptor","$getOwnPropertyNames","getOwnPropertyNames","names","result","push","$getOwnPropertySymbols","getOwnPropertySymbols","IS_OP","TypeError","arguments","$set","configurable","set","toString","name","G","W","F","symbols","split","store","S","for","keyFor","useSetter","useSimple","replacer","$replacer","args","apply","valueOf","Math","window","self","Function","hasOwnProperty","exec","e","core","hide","ctx","type","source","own","out","exp","IS_FORCED","IS_GLOBAL","IS_STATIC","IS_PROTO","IS_BIND","B","target","expProto","U","R","version","object","IE8_DOM_DEFINE","O","Attributes","isObject","document","is","createElement","fn","val","bitmap","writable","SRC","TO_STRING","$toString","TPL","inspectSource","safe","isFunction","join","String","prototype","px","random","concat","aFunction","that","b","setDesc","isExtensible","FREEZE","preventExtensions","setMeta","w","fastKey","getWeak","onFreeze","meta","NEED","SHARED","def","TAG","stat","USE_SYMBOL","$exports","LIBRARY","charAt","getKeys","el","index","enumBugKeys","arrayIndexOf","IE_PROTO","IObject","defined","cof","slice","toLength","toIndex","IS_INCLUDES","$this","fromIndex","toInteger","min","ceil","floor","isNaN","max","gOPS","pIE","getSymbols","Array","arg","dPs","Empty","createDict","iframeDocument","iframe","lt","gt","style","display","appendChild","src","contentWindow","open","write","close","Properties","documentElement","windowNames","getWindowNames","hiddenKeys","fails","toObject","$getPrototypeOf","getPrototypeOf","constructor","$freeze","freeze","$seal","seal","$preventExtensions","$isFrozen","isFrozen","$isSealed","isSealed","$isExtensible","assign","$assign","A","K","forEach","k","T","aLen","j","x","y","setPrototypeOf","check","proto","test","buggy","__proto__","classof","ARG","tryGet","callee","bind","invoke","arraySlice","factories","construct","len","n","partArgs","bound","un","FProto","nameRE","NAME","match","HAS_INSTANCE","FunctionProto","inheritIfRequired","$trim","trim","NUMBER","$Number","Base","BROKEN_COF","TRIM","toNumber","argument","third","radix","maxCode","first","charCodeAt","NaN","code","digits","parseInt","Number","C","spaces","space","non","ltrim","RegExp","rtrim","exporter","ALIAS","FORCE","string","TYPE","replace","aNumberValue","repeat","$toFixed","toFixed","data","ERROR","ZERO","multiply","c2","divide","numToString","s","t","pow","acc","log","x2","fractionDigits","z","RangeError","msg","count","str","res","Infinity","$toPrecision","toPrecision","precision","EPSILON","_isFinite","isFinite","isInteger","number","abs","isSafeInteger","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","$parseFloat","parseFloat","$parseInt","ws","hex","log1p","sqrt","$acosh","acosh","MAX_VALUE","LN2","asinh","$asinh","$atanh","atanh","sign","cbrt","clz32","LOG2E","cosh","$expm1","expm1","EPSILON32","MAX32","MIN32","roundTiesToEven","fround","$abs","$sign","hypot","value1","value2","div","sum","larg","$imul","imul","UINT16","xn","yn","xl","yl","log10","LN10","log2","sinh","tanh","trunc","fromCharCode","$fromCodePoint","fromCodePoint","raw","callSite","tpl","$at","codePointAt","pos","context","ENDS_WITH","$endsWith","endsWith","searchString","endPosition","end","search","isRegExp","MATCH","re","INCLUDES","includes","indexOf","STARTS_WITH","$startsWith","startsWith","iterated","_t","_i","point","done","Iterators","$iterCreate","ITERATOR","BUGGY","FF_ITERATOR","KEYS","VALUES","returnThis","Constructor","next","DEFAULT","IS_SET","FORCED","methods","IteratorPrototype","getMethod","kind","values","entries","DEF_VALUES","VALUES_BUG","$native","$default","$entries","$anyNative","descriptor","createHTML","anchor","quot","attribute","p1","toLowerCase","big","blink","bold","fixed","fontcolor","color","fontsize","size","italics","link","url","small","strike","sub","sup","isArrayIter","createProperty","getIterFn","iter","from","arrayLike","step","mapfn","mapping","iterFn","ret","ArrayProto","getIteratorMethod","SAFE_CLOSING","riter","skipClosing","arr","of","arrayJoin","separator","method","html","begin","klass","start","upTo","cloned","$sort","sort","comparefn","$forEach","STRICT","callbackfn","asc","IS_MAP","IS_FILTER","IS_SOME","IS_EVERY","IS_FIND_INDEX","NO_HOLES","speciesConstructor","original","SPECIES","$map","map","$filter","filter","$some","some","$every","every","$reduce","reduce","memo","isRight","reduceRight","$indexOf","NEGATIVE_ZERO","searchElement","lastIndexOf","copyWithin","to","inc","UNSCOPABLES","fill","endPos","$find","forced","find","findIndex","addToUnscopables","Arguments","$flags","$RegExp","re1","re2","CORRECT_NEW","tiRE","piRE","fiU","proxy","ignoreCase","multiline","unicode","sticky","define","flags","$match","regexp","SYMBOL","fns","strfn","rxfn","REPLACE","$replace","searchValue","replaceValue","SEARCH","$search","SPLIT","$split","_split","$push","$SPLIT","LENGTH","LAST_INDEX","NPCG","limit","separator2","lastIndex","lastLength","output","lastLastIndex","splitLimit","separatorCopy","Internal","GenericPromiseCapability","Wrapper","anInstance","forOf","task","microtask","PROMISE","process","$Promise","isNode","empty","promise","resolve","FakePromise","PromiseRejectionEvent","then","sameConstructor","isThenable","newPromiseCapability","PromiseCapability","reject","$$resolve","$$reject","perform","error","notify","isReject","_n","chain","_c","_v","ok","_s","run","reaction","handler","fail","domain","_h","onHandleUnhandled","enter","exit","onUnhandled","abrupt","console","isUnhandled","emit","onunhandledrejection","reason","_a","onrejectionhandled","$reject","_d","_w","$resolve","wrapper","Promise","executor","err","onFulfilled","onRejected","catch","r","capability","all","iterable","remaining","$index","alreadyCalled","race","forbiddenField","BREAK","RETURN","defer","channel","port","cel","setTask","setImmediate","clearTask","clearImmediate","MessageChannel","counter","queue","ONREADYSTATECHANGE","listener","event","nextTick","port2","port1","onmessage","postMessage","addEventListener","importScripts","removeChild","setTimeout","clear","macrotask","Observer","MutationObserver","WebKitMutationObserver","head","last","flush","parent","toggle","node","createTextNode","observe","characterData","strong","Map","entry","getEntry","v","redefineAll","$iterDefine","setSpecies","SIZE","_f","getConstructor","ADDER","_l","delete","prev","setStrong","$iterDetect","common","IS_WEAK","fixMethod","add","instance","HASNT_CHAINING","THROWS_ON_PRIMITIVES","ACCEPT_ITERABLES","BUGGY_ZERO","$instance","Set","InternalMap","each","weak","uncaughtFrozenStore","ufstore","tmp","WeakMap","$WeakMap","createArrayMethod","$has","arrayFind","arrayFindIndex","UncaughtFrozenStore","findUncaughtFrozen","splice","WeakSet","rApply","Reflect","fApply","thisArgument","argumentsList","L","rConstruct","NEW_TARGET_BUG","ARGS_BUG","Target","newTarget","$args","propertyKey","attributes","deleteProperty","desc","Enumerate","enumerate","receiver","getProto","ownKeys","V","existingDescriptor","ownDesc","setProto","now","Date","getTime","toJSON","toISOString","pv","lz","num","d","getUTCFullYear","getUTCMilliseconds","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","DateProto","INVALID_DATE","hint","$typed","buffer","ArrayBuffer","$ArrayBuffer","$DataView","DataView","$isView","ABV","isView","$slice","VIEW","ARRAY_BUFFER","CONSTR","byteLength","final","viewS","viewT","setUint8","getUint8","Typed","TYPED","TypedArrayConstructors","arrayFill","DATA_VIEW","WRONG_LENGTH","WRONG_INDEX","BaseBuffer","BUFFER","BYTE_LENGTH","BYTE_OFFSET","$BUFFER","$LENGTH","$OFFSET","packIEEE754","mLen","nBytes","eLen","eMax","eBias","rt","unpackIEEE754","nBits","unpackI32","bytes","packI8","packI16","packI32","packF64","packF32","addGetter","internal","view","isLittleEndian","numIndex","intIndex","_b","pack","reverse","conversion","validateArrayBufferArguments","numberLength","ArrayBufferProto","$setInt8","setInt8","getInt8","byteOffset","bufferLength","offset","getInt16","getUint16","getInt32","getUint32","getFloat32","getFloat64","setInt16","setUint16","setInt32","setUint32","setFloat32","setFloat64","init","Int8Array","$buffer","propertyDesc","same","createArrayIncludes","ArrayIterators","arrayCopyWithin","Uint8Array","SHARED_BUFFER","BYTES_PER_ELEMENT","arrayForEach","arrayFilter","arraySome","arrayEvery","arrayIncludes","arrayValues","arrayKeys","arrayEntries","arrayLastIndexOf","arrayReduce","arrayReduceRight","arraySort","arrayToString","arrayToLocaleString","toLocaleString","TYPED_CONSTRUCTOR","DEF_CONSTRUCTOR","ALL_CONSTRUCTORS","TYPED_ARRAY","allocate","LITTLE_ENDIAN","Uint16Array","FORCED_SET","strictToLength","SAME","toOffset","BYTES","validate","speciesFromList","list","fromList","$from","$of","TO_LOCALE_BUG","$toLocaleString","predicate","middle","subarray","$begin","$iterators","isTAIndex","$getDesc","$setDesc","$TypedArrayPrototype$","CLAMPED","ISNT_UINT8","GETTER","SETTER","TypedArray","TAC","TypedArrayPrototype","getter","o","round","addElement","$offset","$length","$len","$nativeIterator","CORRECT_ITER_NAME","$iterator","Uint8ClampedArray","Int16Array","Int32Array","Uint32Array","Float32Array","Float64Array","$includes","at","$pad","padStart","maxLength","fillString","left","stringLength","fillStr","intMaxLength","fillLen","stringFiller","padEnd","trimLeft","trimRight","getFlags","RegExpProto","$RegExpStringIterator","_r","matchAll","rx","getOwnPropertyDescriptors","getDesc","$values","isEntries","__defineGetter__","__defineSetter__","__lookupGetter__","__lookupSetter__","isError","iaddh","x0","x1","y0","y1","$x0","$x1","$y0","isubh","imulh","u","$u","$v","u0","v0","u1","v1","umulh","metadata","toMetaKey","ordinaryDefineOwnMetadata","defineMetadata","metadataKey","metadataValue","targetKey","getOrCreateMetadataMap","targetMetadata","keyMetadata","ordinaryHasOwnMetadata","MetadataKey","metadataMap","ordinaryGetOwnMetadata","MetadataValue","ordinaryOwnMetadataKeys","_","deleteMetadata","ordinaryGetMetadata","hasOwn","getMetadata","ordinaryMetadataKeys","oKeys","pKeys","getMetadataKeys","getOwnMetadata","getOwnMetadataKeys","ordinaryHasMetadata","hasMetadata","hasOwnMetadata","decorator","asap","OBSERVABLE","cleanupSubscription","subscription","cleanup","subscriptionClosed","_o","closeSubscription","Subscription","observer","subscriber","SubscriptionObserver","unsubscribe","complete","$Observable","Observable","subscribe","observable","items","$task","TO_STRING_TAG","ArrayValues","collections","Collection","partial","navigator","MSIE","userAgent","time","setInterval","path","pargs","holder","amd"],"mappings":";;;;;;CAMC,SAASA,EAAKC,EAAKC,GACpB,cACS,SAAUC,GAKT,QAASC,qBAAoBC,GAG5B,GAAGC,EAAiBD,GACnB,MAAOC,GAAiBD,GAAUE,OAGnC,IAAIC,GAASF,EAAiBD,IAC7BE,WACAE,GAAIJ,EACJK,QAAQ,EAUT,OANAP,GAAQE,GAAUM,KAAKH,EAAOD,QAASC,EAAQA,EAAOD,QAASH,qBAG/DI,EAAOE,QAAS,EAGTF,EAAOD,QAvBf,GAAID,KAqCJ,OATAF,qBAAoBQ,EAAIT,EAGxBC,oBAAoBS,EAAIP,EAGxBF,oBAAoBU,EAAI,GAGjBV,oBAAoB,KAK/B,SAASI,EAAQD,EAASH,GAE/BA,EAAoB,GACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,IACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,KACpBA,EAAoB,K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","file":"shim.min.js"} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/core/_.js b/pitfall/pdfkit/node_modules/core-js/core/_.js new file mode 100644 index 00000000..8a99f706 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/core/_.js @@ -0,0 +1,2 @@ +require('../modules/core.function.part'); +module.exports = require('../modules/_core')._; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/core/delay.js b/pitfall/pdfkit/node_modules/core-js/core/delay.js new file mode 100644 index 00000000..18857388 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/core/delay.js @@ -0,0 +1,2 @@ +require('../modules/core.delay'); +module.exports = require('../modules/_core').delay; diff --git a/pitfall/pdfkit/node_modules/core-js/core/dict.js b/pitfall/pdfkit/node_modules/core-js/core/dict.js new file mode 100644 index 00000000..da84a8d8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/core/dict.js @@ -0,0 +1,2 @@ +require('../modules/core.dict'); +module.exports = require('../modules/_core').Dict; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/core/function.js b/pitfall/pdfkit/node_modules/core-js/core/function.js new file mode 100644 index 00000000..3b8d0131 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/core/function.js @@ -0,0 +1,2 @@ +require('../modules/core.function.part'); +module.exports = require('../modules/_core').Function; diff --git a/pitfall/pdfkit/node_modules/core-js/core/index.js b/pitfall/pdfkit/node_modules/core-js/core/index.js new file mode 100644 index 00000000..2b20fd9e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/core/index.js @@ -0,0 +1,15 @@ +require('../modules/core.dict'); +require('../modules/core.get-iterator-method'); +require('../modules/core.get-iterator'); +require('../modules/core.is-iterable'); +require('../modules/core.delay'); +require('../modules/core.function.part'); +require('../modules/core.object.is-object'); +require('../modules/core.object.classof'); +require('../modules/core.object.define'); +require('../modules/core.object.make'); +require('../modules/core.number.iterator'); +require('../modules/core.regexp.escape'); +require('../modules/core.string.escape-html'); +require('../modules/core.string.unescape-html'); +module.exports = require('../modules/_core'); diff --git a/pitfall/pdfkit/node_modules/core-js/core/number.js b/pitfall/pdfkit/node_modules/core-js/core/number.js new file mode 100644 index 00000000..62f632c5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/core/number.js @@ -0,0 +1,2 @@ +require('../modules/core.number.iterator'); +module.exports = require('../modules/_core').Number; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/core/object.js b/pitfall/pdfkit/node_modules/core-js/core/object.js new file mode 100644 index 00000000..04e539c9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/core/object.js @@ -0,0 +1,5 @@ +require('../modules/core.object.is-object'); +require('../modules/core.object.classof'); +require('../modules/core.object.define'); +require('../modules/core.object.make'); +module.exports = require('../modules/_core').Object; diff --git a/pitfall/pdfkit/node_modules/core-js/core/regexp.js b/pitfall/pdfkit/node_modules/core-js/core/regexp.js new file mode 100644 index 00000000..3e04c511 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/core/regexp.js @@ -0,0 +1,2 @@ +require('../modules/core.regexp.escape'); +module.exports = require('../modules/_core').RegExp; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/core/string.js b/pitfall/pdfkit/node_modules/core-js/core/string.js new file mode 100644 index 00000000..8da740c6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/core/string.js @@ -0,0 +1,3 @@ +require('../modules/core.string.escape-html'); +require('../modules/core.string.unescape-html'); +module.exports = require('../modules/_core').String; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/es5/index.js b/pitfall/pdfkit/node_modules/core-js/es5/index.js new file mode 100644 index 00000000..580f1a67 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/es5/index.js @@ -0,0 +1,37 @@ +require('../modules/es6.object.create'); +require('../modules/es6.object.define-property'); +require('../modules/es6.object.define-properties'); +require('../modules/es6.object.get-own-property-descriptor'); +require('../modules/es6.object.get-prototype-of'); +require('../modules/es6.object.keys'); +require('../modules/es6.object.get-own-property-names'); +require('../modules/es6.object.freeze'); +require('../modules/es6.object.seal'); +require('../modules/es6.object.prevent-extensions'); +require('../modules/es6.object.is-frozen'); +require('../modules/es6.object.is-sealed'); +require('../modules/es6.object.is-extensible'); +require('../modules/es6.function.bind'); +require('../modules/es6.array.is-array'); +require('../modules/es6.array.join'); +require('../modules/es6.array.slice'); +require('../modules/es6.array.sort'); +require('../modules/es6.array.for-each'); +require('../modules/es6.array.map'); +require('../modules/es6.array.filter'); +require('../modules/es6.array.some'); +require('../modules/es6.array.every'); +require('../modules/es6.array.reduce'); +require('../modules/es6.array.reduce-right'); +require('../modules/es6.array.index-of'); +require('../modules/es6.array.last-index-of'); +require('../modules/es6.number.to-fixed'); +require('../modules/es6.number.to-precision'); +require('../modules/es6.date.now'); +require('../modules/es6.date.to-iso-string'); +require('../modules/es6.date.to-json'); +require('../modules/es6.parse-int'); +require('../modules/es6.parse-float'); +require('../modules/es6.string.trim'); +require('../modules/es6.regexp.to-string'); +module.exports = require('../modules/_core'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/es6/array.js b/pitfall/pdfkit/node_modules/core-js/es6/array.js new file mode 100644 index 00000000..428d3e8c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/es6/array.js @@ -0,0 +1,23 @@ +require('../modules/es6.string.iterator'); +require('../modules/es6.array.is-array'); +require('../modules/es6.array.from'); +require('../modules/es6.array.of'); +require('../modules/es6.array.join'); +require('../modules/es6.array.slice'); +require('../modules/es6.array.sort'); +require('../modules/es6.array.for-each'); +require('../modules/es6.array.map'); +require('../modules/es6.array.filter'); +require('../modules/es6.array.some'); +require('../modules/es6.array.every'); +require('../modules/es6.array.reduce'); +require('../modules/es6.array.reduce-right'); +require('../modules/es6.array.index-of'); +require('../modules/es6.array.last-index-of'); +require('../modules/es6.array.copy-within'); +require('../modules/es6.array.fill'); +require('../modules/es6.array.find'); +require('../modules/es6.array.find-index'); +require('../modules/es6.array.species'); +require('../modules/es6.array.iterator'); +module.exports = require('../modules/_core').Array; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/es6/date.js b/pitfall/pdfkit/node_modules/core-js/es6/date.js new file mode 100644 index 00000000..dfa3be09 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/es6/date.js @@ -0,0 +1,6 @@ +require('../modules/es6.date.now'); +require('../modules/es6.date.to-json'); +require('../modules/es6.date.to-iso-string'); +require('../modules/es6.date.to-string'); +require('../modules/es6.date.to-primitive'); +module.exports = Date; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/es6/function.js b/pitfall/pdfkit/node_modules/core-js/es6/function.js new file mode 100644 index 00000000..ff685da2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/es6/function.js @@ -0,0 +1,4 @@ +require('../modules/es6.function.bind'); +require('../modules/es6.function.name'); +require('../modules/es6.function.has-instance'); +module.exports = require('../modules/_core').Function; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/es6/index.js b/pitfall/pdfkit/node_modules/core-js/es6/index.js new file mode 100644 index 00000000..59df5092 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/es6/index.js @@ -0,0 +1,138 @@ +require('../modules/es6.symbol'); +require('../modules/es6.object.create'); +require('../modules/es6.object.define-property'); +require('../modules/es6.object.define-properties'); +require('../modules/es6.object.get-own-property-descriptor'); +require('../modules/es6.object.get-prototype-of'); +require('../modules/es6.object.keys'); +require('../modules/es6.object.get-own-property-names'); +require('../modules/es6.object.freeze'); +require('../modules/es6.object.seal'); +require('../modules/es6.object.prevent-extensions'); +require('../modules/es6.object.is-frozen'); +require('../modules/es6.object.is-sealed'); +require('../modules/es6.object.is-extensible'); +require('../modules/es6.object.assign'); +require('../modules/es6.object.is'); +require('../modules/es6.object.set-prototype-of'); +require('../modules/es6.object.to-string'); +require('../modules/es6.function.bind'); +require('../modules/es6.function.name'); +require('../modules/es6.function.has-instance'); +require('../modules/es6.parse-int'); +require('../modules/es6.parse-float'); +require('../modules/es6.number.constructor'); +require('../modules/es6.number.to-fixed'); +require('../modules/es6.number.to-precision'); +require('../modules/es6.number.epsilon'); +require('../modules/es6.number.is-finite'); +require('../modules/es6.number.is-integer'); +require('../modules/es6.number.is-nan'); +require('../modules/es6.number.is-safe-integer'); +require('../modules/es6.number.max-safe-integer'); +require('../modules/es6.number.min-safe-integer'); +require('../modules/es6.number.parse-float'); +require('../modules/es6.number.parse-int'); +require('../modules/es6.math.acosh'); +require('../modules/es6.math.asinh'); +require('../modules/es6.math.atanh'); +require('../modules/es6.math.cbrt'); +require('../modules/es6.math.clz32'); +require('../modules/es6.math.cosh'); +require('../modules/es6.math.expm1'); +require('../modules/es6.math.fround'); +require('../modules/es6.math.hypot'); +require('../modules/es6.math.imul'); +require('../modules/es6.math.log10'); +require('../modules/es6.math.log1p'); +require('../modules/es6.math.log2'); +require('../modules/es6.math.sign'); +require('../modules/es6.math.sinh'); +require('../modules/es6.math.tanh'); +require('../modules/es6.math.trunc'); +require('../modules/es6.string.from-code-point'); +require('../modules/es6.string.raw'); +require('../modules/es6.string.trim'); +require('../modules/es6.string.iterator'); +require('../modules/es6.string.code-point-at'); +require('../modules/es6.string.ends-with'); +require('../modules/es6.string.includes'); +require('../modules/es6.string.repeat'); +require('../modules/es6.string.starts-with'); +require('../modules/es6.string.anchor'); +require('../modules/es6.string.big'); +require('../modules/es6.string.blink'); +require('../modules/es6.string.bold'); +require('../modules/es6.string.fixed'); +require('../modules/es6.string.fontcolor'); +require('../modules/es6.string.fontsize'); +require('../modules/es6.string.italics'); +require('../modules/es6.string.link'); +require('../modules/es6.string.small'); +require('../modules/es6.string.strike'); +require('../modules/es6.string.sub'); +require('../modules/es6.string.sup'); +require('../modules/es6.date.now'); +require('../modules/es6.date.to-json'); +require('../modules/es6.date.to-iso-string'); +require('../modules/es6.date.to-string'); +require('../modules/es6.date.to-primitive'); +require('../modules/es6.array.is-array'); +require('../modules/es6.array.from'); +require('../modules/es6.array.of'); +require('../modules/es6.array.join'); +require('../modules/es6.array.slice'); +require('../modules/es6.array.sort'); +require('../modules/es6.array.for-each'); +require('../modules/es6.array.map'); +require('../modules/es6.array.filter'); +require('../modules/es6.array.some'); +require('../modules/es6.array.every'); +require('../modules/es6.array.reduce'); +require('../modules/es6.array.reduce-right'); +require('../modules/es6.array.index-of'); +require('../modules/es6.array.last-index-of'); +require('../modules/es6.array.copy-within'); +require('../modules/es6.array.fill'); +require('../modules/es6.array.find'); +require('../modules/es6.array.find-index'); +require('../modules/es6.array.species'); +require('../modules/es6.array.iterator'); +require('../modules/es6.regexp.constructor'); +require('../modules/es6.regexp.to-string'); +require('../modules/es6.regexp.flags'); +require('../modules/es6.regexp.match'); +require('../modules/es6.regexp.replace'); +require('../modules/es6.regexp.search'); +require('../modules/es6.regexp.split'); +require('../modules/es6.promise'); +require('../modules/es6.map'); +require('../modules/es6.set'); +require('../modules/es6.weak-map'); +require('../modules/es6.weak-set'); +require('../modules/es6.typed.array-buffer'); +require('../modules/es6.typed.data-view'); +require('../modules/es6.typed.int8-array'); +require('../modules/es6.typed.uint8-array'); +require('../modules/es6.typed.uint8-clamped-array'); +require('../modules/es6.typed.int16-array'); +require('../modules/es6.typed.uint16-array'); +require('../modules/es6.typed.int32-array'); +require('../modules/es6.typed.uint32-array'); +require('../modules/es6.typed.float32-array'); +require('../modules/es6.typed.float64-array'); +require('../modules/es6.reflect.apply'); +require('../modules/es6.reflect.construct'); +require('../modules/es6.reflect.define-property'); +require('../modules/es6.reflect.delete-property'); +require('../modules/es6.reflect.enumerate'); +require('../modules/es6.reflect.get'); +require('../modules/es6.reflect.get-own-property-descriptor'); +require('../modules/es6.reflect.get-prototype-of'); +require('../modules/es6.reflect.has'); +require('../modules/es6.reflect.is-extensible'); +require('../modules/es6.reflect.own-keys'); +require('../modules/es6.reflect.prevent-extensions'); +require('../modules/es6.reflect.set'); +require('../modules/es6.reflect.set-prototype-of'); +module.exports = require('../modules/_core'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/es6/map.js b/pitfall/pdfkit/node_modules/core-js/es6/map.js new file mode 100644 index 00000000..50f04c1f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/es6/map.js @@ -0,0 +1,5 @@ +require('../modules/es6.object.to-string'); +require('../modules/es6.string.iterator'); +require('../modules/web.dom.iterable'); +require('../modules/es6.map'); +module.exports = require('../modules/_core').Map; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/es6/math.js b/pitfall/pdfkit/node_modules/core-js/es6/math.js new file mode 100644 index 00000000..f26b5b29 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/es6/math.js @@ -0,0 +1,18 @@ +require('../modules/es6.math.acosh'); +require('../modules/es6.math.asinh'); +require('../modules/es6.math.atanh'); +require('../modules/es6.math.cbrt'); +require('../modules/es6.math.clz32'); +require('../modules/es6.math.cosh'); +require('../modules/es6.math.expm1'); +require('../modules/es6.math.fround'); +require('../modules/es6.math.hypot'); +require('../modules/es6.math.imul'); +require('../modules/es6.math.log10'); +require('../modules/es6.math.log1p'); +require('../modules/es6.math.log2'); +require('../modules/es6.math.sign'); +require('../modules/es6.math.sinh'); +require('../modules/es6.math.tanh'); +require('../modules/es6.math.trunc'); +module.exports = require('../modules/_core').Math; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/es6/number.js b/pitfall/pdfkit/node_modules/core-js/es6/number.js new file mode 100644 index 00000000..1dafcda4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/es6/number.js @@ -0,0 +1,13 @@ +require('../modules/es6.number.constructor'); +require('../modules/es6.number.to-fixed'); +require('../modules/es6.number.to-precision'); +require('../modules/es6.number.epsilon'); +require('../modules/es6.number.is-finite'); +require('../modules/es6.number.is-integer'); +require('../modules/es6.number.is-nan'); +require('../modules/es6.number.is-safe-integer'); +require('../modules/es6.number.max-safe-integer'); +require('../modules/es6.number.min-safe-integer'); +require('../modules/es6.number.parse-float'); +require('../modules/es6.number.parse-int'); +module.exports = require('../modules/_core').Number; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/es6/object.js b/pitfall/pdfkit/node_modules/core-js/es6/object.js new file mode 100644 index 00000000..aada8c38 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/es6/object.js @@ -0,0 +1,20 @@ +require('../modules/es6.symbol'); +require('../modules/es6.object.create'); +require('../modules/es6.object.define-property'); +require('../modules/es6.object.define-properties'); +require('../modules/es6.object.get-own-property-descriptor'); +require('../modules/es6.object.get-prototype-of'); +require('../modules/es6.object.keys'); +require('../modules/es6.object.get-own-property-names'); +require('../modules/es6.object.freeze'); +require('../modules/es6.object.seal'); +require('../modules/es6.object.prevent-extensions'); +require('../modules/es6.object.is-frozen'); +require('../modules/es6.object.is-sealed'); +require('../modules/es6.object.is-extensible'); +require('../modules/es6.object.assign'); +require('../modules/es6.object.is'); +require('../modules/es6.object.set-prototype-of'); +require('../modules/es6.object.to-string'); + +module.exports = require('../modules/_core').Object; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/es6/parse-float.js b/pitfall/pdfkit/node_modules/core-js/es6/parse-float.js new file mode 100644 index 00000000..dad94ddb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/es6/parse-float.js @@ -0,0 +1,2 @@ +require('../modules/es6.parse-float'); +module.exports = require('../modules/_core').parseFloat; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/es6/parse-int.js b/pitfall/pdfkit/node_modules/core-js/es6/parse-int.js new file mode 100644 index 00000000..08a20996 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/es6/parse-int.js @@ -0,0 +1,2 @@ +require('../modules/es6.parse-int'); +module.exports = require('../modules/_core').parseInt; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/es6/promise.js b/pitfall/pdfkit/node_modules/core-js/es6/promise.js new file mode 100644 index 00000000..c901c859 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/es6/promise.js @@ -0,0 +1,5 @@ +require('../modules/es6.object.to-string'); +require('../modules/es6.string.iterator'); +require('../modules/web.dom.iterable'); +require('../modules/es6.promise'); +module.exports = require('../modules/_core').Promise; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/es6/reflect.js b/pitfall/pdfkit/node_modules/core-js/es6/reflect.js new file mode 100644 index 00000000..18bdb3c2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/es6/reflect.js @@ -0,0 +1,15 @@ +require('../modules/es6.reflect.apply'); +require('../modules/es6.reflect.construct'); +require('../modules/es6.reflect.define-property'); +require('../modules/es6.reflect.delete-property'); +require('../modules/es6.reflect.enumerate'); +require('../modules/es6.reflect.get'); +require('../modules/es6.reflect.get-own-property-descriptor'); +require('../modules/es6.reflect.get-prototype-of'); +require('../modules/es6.reflect.has'); +require('../modules/es6.reflect.is-extensible'); +require('../modules/es6.reflect.own-keys'); +require('../modules/es6.reflect.prevent-extensions'); +require('../modules/es6.reflect.set'); +require('../modules/es6.reflect.set-prototype-of'); +module.exports = require('../modules/_core').Reflect; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/es6/regexp.js b/pitfall/pdfkit/node_modules/core-js/es6/regexp.js new file mode 100644 index 00000000..27cc827f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/es6/regexp.js @@ -0,0 +1,8 @@ +require('../modules/es6.regexp.constructor'); +require('../modules/es6.regexp.to-string'); +require('../modules/es6.regexp.flags'); +require('../modules/es6.regexp.match'); +require('../modules/es6.regexp.replace'); +require('../modules/es6.regexp.search'); +require('../modules/es6.regexp.split'); +module.exports = require('../modules/_core').RegExp; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/es6/set.js b/pitfall/pdfkit/node_modules/core-js/es6/set.js new file mode 100644 index 00000000..2a2557ce --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/es6/set.js @@ -0,0 +1,5 @@ +require('../modules/es6.object.to-string'); +require('../modules/es6.string.iterator'); +require('../modules/web.dom.iterable'); +require('../modules/es6.set'); +module.exports = require('../modules/_core').Set; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/es6/string.js b/pitfall/pdfkit/node_modules/core-js/es6/string.js new file mode 100644 index 00000000..83033621 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/es6/string.js @@ -0,0 +1,27 @@ +require('../modules/es6.string.from-code-point'); +require('../modules/es6.string.raw'); +require('../modules/es6.string.trim'); +require('../modules/es6.string.iterator'); +require('../modules/es6.string.code-point-at'); +require('../modules/es6.string.ends-with'); +require('../modules/es6.string.includes'); +require('../modules/es6.string.repeat'); +require('../modules/es6.string.starts-with'); +require('../modules/es6.string.anchor'); +require('../modules/es6.string.big'); +require('../modules/es6.string.blink'); +require('../modules/es6.string.bold'); +require('../modules/es6.string.fixed'); +require('../modules/es6.string.fontcolor'); +require('../modules/es6.string.fontsize'); +require('../modules/es6.string.italics'); +require('../modules/es6.string.link'); +require('../modules/es6.string.small'); +require('../modules/es6.string.strike'); +require('../modules/es6.string.sub'); +require('../modules/es6.string.sup'); +require('../modules/es6.regexp.match'); +require('../modules/es6.regexp.replace'); +require('../modules/es6.regexp.search'); +require('../modules/es6.regexp.split'); +module.exports = require('../modules/_core').String; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/es6/symbol.js b/pitfall/pdfkit/node_modules/core-js/es6/symbol.js new file mode 100644 index 00000000..e578e3af --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/es6/symbol.js @@ -0,0 +1,3 @@ +require('../modules/es6.symbol'); +require('../modules/es6.object.to-string'); +module.exports = require('../modules/_core').Symbol; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/es6/typed.js b/pitfall/pdfkit/node_modules/core-js/es6/typed.js new file mode 100644 index 00000000..e0364e6c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/es6/typed.js @@ -0,0 +1,13 @@ +require('../modules/es6.typed.array-buffer'); +require('../modules/es6.typed.data-view'); +require('../modules/es6.typed.int8-array'); +require('../modules/es6.typed.uint8-array'); +require('../modules/es6.typed.uint8-clamped-array'); +require('../modules/es6.typed.int16-array'); +require('../modules/es6.typed.uint16-array'); +require('../modules/es6.typed.int32-array'); +require('../modules/es6.typed.uint32-array'); +require('../modules/es6.typed.float32-array'); +require('../modules/es6.typed.float64-array'); +require('../modules/es6.object.to-string'); +module.exports = require('../modules/_core'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/es6/weak-map.js b/pitfall/pdfkit/node_modules/core-js/es6/weak-map.js new file mode 100644 index 00000000..655866c2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/es6/weak-map.js @@ -0,0 +1,4 @@ +require('../modules/es6.object.to-string'); +require('../modules/es6.array.iterator'); +require('../modules/es6.weak-map'); +module.exports = require('../modules/_core').WeakMap; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/es6/weak-set.js b/pitfall/pdfkit/node_modules/core-js/es6/weak-set.js new file mode 100644 index 00000000..eef1af2a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/es6/weak-set.js @@ -0,0 +1,4 @@ +require('../modules/es6.object.to-string'); +require('../modules/web.dom.iterable'); +require('../modules/es6.weak-set'); +module.exports = require('../modules/_core').WeakSet; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/es7/array.js b/pitfall/pdfkit/node_modules/core-js/es7/array.js new file mode 100644 index 00000000..9fb57fa6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/es7/array.js @@ -0,0 +1,2 @@ +require('../modules/es7.array.includes'); +module.exports = require('../modules/_core').Array; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/es7/asap.js b/pitfall/pdfkit/node_modules/core-js/es7/asap.js new file mode 100644 index 00000000..cc90f7e5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/es7/asap.js @@ -0,0 +1,2 @@ +require('../modules/es7.asap'); +module.exports = require('../modules/_core').asap; diff --git a/pitfall/pdfkit/node_modules/core-js/es7/error.js b/pitfall/pdfkit/node_modules/core-js/es7/error.js new file mode 100644 index 00000000..f0bb260b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/es7/error.js @@ -0,0 +1,2 @@ +require('../modules/es7.error.is-error'); +module.exports = require('../modules/_core').Error; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/es7/index.js b/pitfall/pdfkit/node_modules/core-js/es7/index.js new file mode 100644 index 00000000..b8c90b86 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/es7/index.js @@ -0,0 +1,36 @@ +require('../modules/es7.array.includes'); +require('../modules/es7.string.at'); +require('../modules/es7.string.pad-start'); +require('../modules/es7.string.pad-end'); +require('../modules/es7.string.trim-left'); +require('../modules/es7.string.trim-right'); +require('../modules/es7.string.match-all'); +require('../modules/es7.symbol.async-iterator'); +require('../modules/es7.symbol.observable'); +require('../modules/es7.object.get-own-property-descriptors'); +require('../modules/es7.object.values'); +require('../modules/es7.object.entries'); +require('../modules/es7.object.define-getter'); +require('../modules/es7.object.define-setter'); +require('../modules/es7.object.lookup-getter'); +require('../modules/es7.object.lookup-setter'); +require('../modules/es7.map.to-json'); +require('../modules/es7.set.to-json'); +require('../modules/es7.system.global'); +require('../modules/es7.error.is-error'); +require('../modules/es7.math.iaddh'); +require('../modules/es7.math.isubh'); +require('../modules/es7.math.imulh'); +require('../modules/es7.math.umulh'); +require('../modules/es7.reflect.define-metadata'); +require('../modules/es7.reflect.delete-metadata'); +require('../modules/es7.reflect.get-metadata'); +require('../modules/es7.reflect.get-metadata-keys'); +require('../modules/es7.reflect.get-own-metadata'); +require('../modules/es7.reflect.get-own-metadata-keys'); +require('../modules/es7.reflect.has-metadata'); +require('../modules/es7.reflect.has-own-metadata'); +require('../modules/es7.reflect.metadata'); +require('../modules/es7.asap'); +require('../modules/es7.observable'); +module.exports = require('../modules/_core'); diff --git a/pitfall/pdfkit/node_modules/core-js/es7/map.js b/pitfall/pdfkit/node_modules/core-js/es7/map.js new file mode 100644 index 00000000..dfa32fd2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/es7/map.js @@ -0,0 +1,2 @@ +require('../modules/es7.map.to-json'); +module.exports = require('../modules/_core').Map; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/es7/math.js b/pitfall/pdfkit/node_modules/core-js/es7/math.js new file mode 100644 index 00000000..bdb8a81c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/es7/math.js @@ -0,0 +1,5 @@ +require('../modules/es7.math.iaddh'); +require('../modules/es7.math.isubh'); +require('../modules/es7.math.imulh'); +require('../modules/es7.math.umulh'); +module.exports = require('../modules/_core').Math; diff --git a/pitfall/pdfkit/node_modules/core-js/es7/object.js b/pitfall/pdfkit/node_modules/core-js/es7/object.js new file mode 100644 index 00000000..c76b754d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/es7/object.js @@ -0,0 +1,8 @@ +require('../modules/es7.object.get-own-property-descriptors'); +require('../modules/es7.object.values'); +require('../modules/es7.object.entries'); +require('../modules/es7.object.define-getter'); +require('../modules/es7.object.define-setter'); +require('../modules/es7.object.lookup-getter'); +require('../modules/es7.object.lookup-setter'); +module.exports = require('../modules/_core').Object; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/es7/observable.js b/pitfall/pdfkit/node_modules/core-js/es7/observable.js new file mode 100644 index 00000000..05ca51a3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/es7/observable.js @@ -0,0 +1,7 @@ +require('../modules/es6.object.to-string'); +require('../modules/es6.string.iterator'); +require('../modules/web.dom.iterable'); +require('../modules/es6.promise'); +require('../modules/es7.symbol.observable'); +require('../modules/es7.observable'); +module.exports = require('../modules/_core').Observable; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/es7/reflect.js b/pitfall/pdfkit/node_modules/core-js/es7/reflect.js new file mode 100644 index 00000000..f0b69cbb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/es7/reflect.js @@ -0,0 +1,10 @@ +require('../modules/es7.reflect.define-metadata'); +require('../modules/es7.reflect.delete-metadata'); +require('../modules/es7.reflect.get-metadata'); +require('../modules/es7.reflect.get-metadata-keys'); +require('../modules/es7.reflect.get-own-metadata'); +require('../modules/es7.reflect.get-own-metadata-keys'); +require('../modules/es7.reflect.has-metadata'); +require('../modules/es7.reflect.has-own-metadata'); +require('../modules/es7.reflect.metadata'); +module.exports = require('../modules/_core').Reflect; diff --git a/pitfall/pdfkit/node_modules/core-js/es7/set.js b/pitfall/pdfkit/node_modules/core-js/es7/set.js new file mode 100644 index 00000000..b5c19c44 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/es7/set.js @@ -0,0 +1,2 @@ +require('../modules/es7.set.to-json'); +module.exports = require('../modules/_core').Set; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/es7/string.js b/pitfall/pdfkit/node_modules/core-js/es7/string.js new file mode 100644 index 00000000..6e413b4c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/es7/string.js @@ -0,0 +1,7 @@ +require('../modules/es7.string.at'); +require('../modules/es7.string.pad-start'); +require('../modules/es7.string.pad-end'); +require('../modules/es7.string.trim-left'); +require('../modules/es7.string.trim-right'); +require('../modules/es7.string.match-all'); +module.exports = require('../modules/_core').String; diff --git a/pitfall/pdfkit/node_modules/core-js/es7/symbol.js b/pitfall/pdfkit/node_modules/core-js/es7/symbol.js new file mode 100644 index 00000000..14d90eec --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/es7/symbol.js @@ -0,0 +1,3 @@ +require('../modules/es7.symbol.async-iterator'); +require('../modules/es7.symbol.observable'); +module.exports = require('../modules/_core').Symbol; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/es7/system.js b/pitfall/pdfkit/node_modules/core-js/es7/system.js new file mode 100644 index 00000000..6d321c78 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/es7/system.js @@ -0,0 +1,2 @@ +require('../modules/es7.system.global'); +module.exports = require('../modules/_core').System; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/_.js b/pitfall/pdfkit/node_modules/core-js/fn/_.js new file mode 100644 index 00000000..8a99f706 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/_.js @@ -0,0 +1,2 @@ +require('../modules/core.function.part'); +module.exports = require('../modules/_core')._; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/concat.js b/pitfall/pdfkit/node_modules/core-js/fn/array/concat.js new file mode 100644 index 00000000..de4bddf9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/concat.js @@ -0,0 +1,4 @@ +// for a legacy code and future fixes +module.exports = function(){ + return Function.call.apply(Array.prototype.concat, arguments); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/copy-within.js b/pitfall/pdfkit/node_modules/core-js/fn/array/copy-within.js new file mode 100644 index 00000000..89e1de4f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/copy-within.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.copy-within'); +module.exports = require('../../modules/_core').Array.copyWithin; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/entries.js b/pitfall/pdfkit/node_modules/core-js/fn/array/entries.js new file mode 100644 index 00000000..f4feb26c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/entries.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.iterator'); +module.exports = require('../../modules/_core').Array.entries; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/every.js b/pitfall/pdfkit/node_modules/core-js/fn/array/every.js new file mode 100644 index 00000000..168844cc --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/every.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.every'); +module.exports = require('../../modules/_core').Array.every; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/fill.js b/pitfall/pdfkit/node_modules/core-js/fn/array/fill.js new file mode 100644 index 00000000..b23ebfde --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/fill.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.fill'); +module.exports = require('../../modules/_core').Array.fill; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/filter.js b/pitfall/pdfkit/node_modules/core-js/fn/array/filter.js new file mode 100644 index 00000000..0023f0de --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/filter.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.filter'); +module.exports = require('../../modules/_core').Array.filter; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/find-index.js b/pitfall/pdfkit/node_modules/core-js/fn/array/find-index.js new file mode 100644 index 00000000..99e6bf17 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/find-index.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.find-index'); +module.exports = require('../../modules/_core').Array.findIndex; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/find.js b/pitfall/pdfkit/node_modules/core-js/fn/array/find.js new file mode 100644 index 00000000..f146ec22 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/find.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.find'); +module.exports = require('../../modules/_core').Array.find; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/for-each.js b/pitfall/pdfkit/node_modules/core-js/fn/array/for-each.js new file mode 100644 index 00000000..09e235f9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/for-each.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.for-each'); +module.exports = require('../../modules/_core').Array.forEach; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/from.js b/pitfall/pdfkit/node_modules/core-js/fn/array/from.js new file mode 100644 index 00000000..1f323fbc --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/from.js @@ -0,0 +1,3 @@ +require('../../modules/es6.string.iterator'); +require('../../modules/es6.array.from'); +module.exports = require('../../modules/_core').Array.from; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/includes.js b/pitfall/pdfkit/node_modules/core-js/fn/array/includes.js new file mode 100644 index 00000000..851d31fd --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/includes.js @@ -0,0 +1,2 @@ +require('../../modules/es7.array.includes'); +module.exports = require('../../modules/_core').Array.includes; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/index-of.js b/pitfall/pdfkit/node_modules/core-js/fn/array/index-of.js new file mode 100644 index 00000000..9ed82472 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/index-of.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.index-of'); +module.exports = require('../../modules/_core').Array.indexOf; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/index.js b/pitfall/pdfkit/node_modules/core-js/fn/array/index.js new file mode 100644 index 00000000..85bc77bc --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/index.js @@ -0,0 +1,24 @@ +require('../../modules/es6.string.iterator'); +require('../../modules/es6.array.is-array'); +require('../../modules/es6.array.from'); +require('../../modules/es6.array.of'); +require('../../modules/es6.array.join'); +require('../../modules/es6.array.slice'); +require('../../modules/es6.array.sort'); +require('../../modules/es6.array.for-each'); +require('../../modules/es6.array.map'); +require('../../modules/es6.array.filter'); +require('../../modules/es6.array.some'); +require('../../modules/es6.array.every'); +require('../../modules/es6.array.reduce'); +require('../../modules/es6.array.reduce-right'); +require('../../modules/es6.array.index-of'); +require('../../modules/es6.array.last-index-of'); +require('../../modules/es6.array.copy-within'); +require('../../modules/es6.array.fill'); +require('../../modules/es6.array.find'); +require('../../modules/es6.array.find-index'); +require('../../modules/es6.array.species'); +require('../../modules/es6.array.iterator'); +require('../../modules/es7.array.includes'); +module.exports = require('../../modules/_core').Array; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/is-array.js b/pitfall/pdfkit/node_modules/core-js/fn/array/is-array.js new file mode 100644 index 00000000..bbe76719 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/is-array.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.is-array'); +module.exports = require('../../modules/_core').Array.isArray; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/iterator.js b/pitfall/pdfkit/node_modules/core-js/fn/array/iterator.js new file mode 100644 index 00000000..ca93b78a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/iterator.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.iterator'); +module.exports = require('../../modules/_core').Array.values; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/join.js b/pitfall/pdfkit/node_modules/core-js/fn/array/join.js new file mode 100644 index 00000000..9beef18d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/join.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.join'); +module.exports = require('../../modules/_core').Array.join; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/keys.js b/pitfall/pdfkit/node_modules/core-js/fn/array/keys.js new file mode 100644 index 00000000..b44b921f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/keys.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.iterator'); +module.exports = require('../../modules/_core').Array.keys; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/last-index-of.js b/pitfall/pdfkit/node_modules/core-js/fn/array/last-index-of.js new file mode 100644 index 00000000..6dcc98a1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/last-index-of.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.last-index-of'); +module.exports = require('../../modules/_core').Array.lastIndexOf; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/map.js b/pitfall/pdfkit/node_modules/core-js/fn/array/map.js new file mode 100644 index 00000000..14b0f627 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/map.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.map'); +module.exports = require('../../modules/_core').Array.map; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/of.js b/pitfall/pdfkit/node_modules/core-js/fn/array/of.js new file mode 100644 index 00000000..652ee980 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/of.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.of'); +module.exports = require('../../modules/_core').Array.of; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/pop.js b/pitfall/pdfkit/node_modules/core-js/fn/array/pop.js new file mode 100644 index 00000000..b8414f61 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/pop.js @@ -0,0 +1,4 @@ +// for a legacy code and future fixes +module.exports = function(){ + return Function.call.apply(Array.prototype.pop, arguments); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/push.js b/pitfall/pdfkit/node_modules/core-js/fn/array/push.js new file mode 100644 index 00000000..03539009 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/push.js @@ -0,0 +1,4 @@ +// for a legacy code and future fixes +module.exports = function(){ + return Function.call.apply(Array.prototype.push, arguments); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/reduce-right.js b/pitfall/pdfkit/node_modules/core-js/fn/array/reduce-right.js new file mode 100644 index 00000000..1193ecba --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/reduce-right.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.reduce-right'); +module.exports = require('../../modules/_core').Array.reduceRight; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/reduce.js b/pitfall/pdfkit/node_modules/core-js/fn/array/reduce.js new file mode 100644 index 00000000..e2dee913 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/reduce.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.reduce'); +module.exports = require('../../modules/_core').Array.reduce; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/reverse.js b/pitfall/pdfkit/node_modules/core-js/fn/array/reverse.js new file mode 100644 index 00000000..60734293 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/reverse.js @@ -0,0 +1,4 @@ +// for a legacy code and future fixes +module.exports = function(){ + return Function.call.apply(Array.prototype.reverse, arguments); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/shift.js b/pitfall/pdfkit/node_modules/core-js/fn/array/shift.js new file mode 100644 index 00000000..5002a606 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/shift.js @@ -0,0 +1,4 @@ +// for a legacy code and future fixes +module.exports = function(){ + return Function.call.apply(Array.prototype.shift, arguments); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/slice.js b/pitfall/pdfkit/node_modules/core-js/fn/array/slice.js new file mode 100644 index 00000000..4914c2a9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/slice.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.slice'); +module.exports = require('../../modules/_core').Array.slice; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/some.js b/pitfall/pdfkit/node_modules/core-js/fn/array/some.js new file mode 100644 index 00000000..de284006 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/some.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.some'); +module.exports = require('../../modules/_core').Array.some; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/sort.js b/pitfall/pdfkit/node_modules/core-js/fn/array/sort.js new file mode 100644 index 00000000..29b6f3ae --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/sort.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.sort'); +module.exports = require('../../modules/_core').Array.sort; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/splice.js b/pitfall/pdfkit/node_modules/core-js/fn/array/splice.js new file mode 100644 index 00000000..9d0bdbed --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/splice.js @@ -0,0 +1,4 @@ +// for a legacy code and future fixes +module.exports = function(){ + return Function.call.apply(Array.prototype.splice, arguments); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/unshift.js b/pitfall/pdfkit/node_modules/core-js/fn/array/unshift.js new file mode 100644 index 00000000..63fe2dd8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/unshift.js @@ -0,0 +1,4 @@ +// for a legacy code and future fixes +module.exports = function(){ + return Function.call.apply(Array.prototype.unshift, arguments); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/values.js b/pitfall/pdfkit/node_modules/core-js/fn/array/values.js new file mode 100644 index 00000000..ca93b78a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/values.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.iterator'); +module.exports = require('../../modules/_core').Array.values; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/copy-within.js b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/copy-within.js new file mode 100644 index 00000000..62172a9e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/copy-within.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.copy-within'); +module.exports = require('../../../modules/_entry-virtual')('Array').copyWithin; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/entries.js b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/entries.js new file mode 100644 index 00000000..1b198e3c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/entries.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.iterator'); +module.exports = require('../../../modules/_entry-virtual')('Array').entries; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/every.js b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/every.js new file mode 100644 index 00000000..a72e5851 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/every.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.every'); +module.exports = require('../../../modules/_entry-virtual')('Array').every; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/fill.js b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/fill.js new file mode 100644 index 00000000..6018b37b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/fill.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.fill'); +module.exports = require('../../../modules/_entry-virtual')('Array').fill; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/filter.js b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/filter.js new file mode 100644 index 00000000..46a14f1c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/filter.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.filter'); +module.exports = require('../../../modules/_entry-virtual')('Array').filter; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/find-index.js b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/find-index.js new file mode 100644 index 00000000..ef96165f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/find-index.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.find-index'); +module.exports = require('../../../modules/_entry-virtual')('Array').findIndex; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/find.js b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/find.js new file mode 100644 index 00000000..6cffee5b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/find.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.find'); +module.exports = require('../../../modules/_entry-virtual')('Array').find; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/for-each.js b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/for-each.js new file mode 100644 index 00000000..0c3ed449 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/for-each.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.for-each'); +module.exports = require('../../../modules/_entry-virtual')('Array').forEach; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/includes.js b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/includes.js new file mode 100644 index 00000000..bf9031d7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/includes.js @@ -0,0 +1,2 @@ +require('../../../modules/es7.array.includes'); +module.exports = require('../../../modules/_entry-virtual')('Array').includes; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/index-of.js b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/index-of.js new file mode 100644 index 00000000..cf6f36e3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/index-of.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.index-of'); +module.exports = require('../../../modules/_entry-virtual')('Array').indexOf; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/index.js b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/index.js new file mode 100644 index 00000000..ff554a2a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/index.js @@ -0,0 +1,20 @@ +require('../../../modules/es6.array.join'); +require('../../../modules/es6.array.slice'); +require('../../../modules/es6.array.sort'); +require('../../../modules/es6.array.for-each'); +require('../../../modules/es6.array.map'); +require('../../../modules/es6.array.filter'); +require('../../../modules/es6.array.some'); +require('../../../modules/es6.array.every'); +require('../../../modules/es6.array.reduce'); +require('../../../modules/es6.array.reduce-right'); +require('../../../modules/es6.array.index-of'); +require('../../../modules/es6.array.last-index-of'); +require('../../../modules/es6.string.iterator'); +require('../../../modules/es6.array.iterator'); +require('../../../modules/es6.array.copy-within'); +require('../../../modules/es6.array.fill'); +require('../../../modules/es6.array.find'); +require('../../../modules/es6.array.find-index'); +require('../../../modules/es7.array.includes'); +module.exports = require('../../../modules/_entry-virtual')('Array'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/iterator.js b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/iterator.js new file mode 100644 index 00000000..7812b3c9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/iterator.js @@ -0,0 +1,2 @@ +require('../../../modules/core.number.iterator'); +module.exports = require('../../../modules/_iterators').Array; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/join.js b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/join.js new file mode 100644 index 00000000..3f7d5cff --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/join.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.join'); +module.exports = require('../../../modules/_entry-virtual')('Array').join; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/keys.js b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/keys.js new file mode 100644 index 00000000..16c09681 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/keys.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.iterator'); +module.exports = require('../../../modules/_entry-virtual')('Array').keys; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/last-index-of.js b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/last-index-of.js new file mode 100644 index 00000000..cdd79b7d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/last-index-of.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.last-index-of'); +module.exports = require('../../../modules/_entry-virtual')('Array').lastIndexOf; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/map.js b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/map.js new file mode 100644 index 00000000..14bffdac --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/map.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.map'); +module.exports = require('../../../modules/_entry-virtual')('Array').map; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/reduce-right.js b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/reduce-right.js new file mode 100644 index 00000000..61313e8f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/reduce-right.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.reduce-right'); +module.exports = require('../../../modules/_entry-virtual')('Array').reduceRight; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/reduce.js b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/reduce.js new file mode 100644 index 00000000..1b059053 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/reduce.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.reduce'); +module.exports = require('../../../modules/_entry-virtual')('Array').reduce; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/slice.js b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/slice.js new file mode 100644 index 00000000..b28d1abc --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/slice.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.slice'); +module.exports = require('../../../modules/_entry-virtual')('Array').slice; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/some.js b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/some.js new file mode 100644 index 00000000..58c183c5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/some.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.some'); +module.exports = require('../../../modules/_entry-virtual')('Array').some; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/sort.js b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/sort.js new file mode 100644 index 00000000..c8883150 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/sort.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.sort'); +module.exports = require('../../../modules/_entry-virtual')('Array').sort; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/values.js b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/values.js new file mode 100644 index 00000000..7812b3c9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/array/virtual/values.js @@ -0,0 +1,2 @@ +require('../../../modules/core.number.iterator'); +module.exports = require('../../../modules/_iterators').Array; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/asap.js b/pitfall/pdfkit/node_modules/core-js/fn/asap.js new file mode 100644 index 00000000..9d9c80d1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/asap.js @@ -0,0 +1,2 @@ +require('../modules/es7.asap'); +module.exports = require('../modules/_core').asap; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/clear-immediate.js b/pitfall/pdfkit/node_modules/core-js/fn/clear-immediate.js new file mode 100644 index 00000000..86916a06 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/clear-immediate.js @@ -0,0 +1,2 @@ +require('../modules/web.immediate'); +module.exports = require('../modules/_core').clearImmediate; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/date/index.js b/pitfall/pdfkit/node_modules/core-js/fn/date/index.js new file mode 100644 index 00000000..bd9ce0e2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/date/index.js @@ -0,0 +1,6 @@ +require('../../modules/es6.date.now'); +require('../../modules/es6.date.to-json'); +require('../../modules/es6.date.to-iso-string'); +require('../../modules/es6.date.to-string'); +require('../../modules/es6.date.to-primitive'); +module.exports = require('../../modules/_core').Date; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/date/now.js b/pitfall/pdfkit/node_modules/core-js/fn/date/now.js new file mode 100644 index 00000000..c70d37ae --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/date/now.js @@ -0,0 +1,2 @@ +require('../../modules/es6.date.now'); +module.exports = require('../../modules/_core').Date.now; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/date/to-iso-string.js b/pitfall/pdfkit/node_modules/core-js/fn/date/to-iso-string.js new file mode 100644 index 00000000..be4ac218 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/date/to-iso-string.js @@ -0,0 +1,3 @@ +require('../../modules/es6.date.to-json'); +require('../../modules/es6.date.to-iso-string'); +module.exports = require('../../modules/_core').Date.toISOString; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/date/to-json.js b/pitfall/pdfkit/node_modules/core-js/fn/date/to-json.js new file mode 100644 index 00000000..9dc8cc90 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/date/to-json.js @@ -0,0 +1,2 @@ +require('../../modules/es6.date.to-json'); +module.exports = require('../../modules/_core').Date.toJSON; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/date/to-primitive.js b/pitfall/pdfkit/node_modules/core-js/fn/date/to-primitive.js new file mode 100644 index 00000000..4d7471e2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/date/to-primitive.js @@ -0,0 +1,5 @@ +require('../../modules/es6.date.to-primitive'); +var toPrimitive = require('../../modules/_date-to-primitive'); +module.exports = function(it, hint){ + return toPrimitive.call(it, hint); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/date/to-string.js b/pitfall/pdfkit/node_modules/core-js/fn/date/to-string.js new file mode 100644 index 00000000..c39d5522 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/date/to-string.js @@ -0,0 +1,5 @@ +require('../../modules/es6.date.to-string') +var $toString = Date.prototype.toString; +module.exports = function toString(it){ + return $toString.call(it); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/delay.js b/pitfall/pdfkit/node_modules/core-js/fn/delay.js new file mode 100644 index 00000000..18857388 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/delay.js @@ -0,0 +1,2 @@ +require('../modules/core.delay'); +module.exports = require('../modules/_core').delay; diff --git a/pitfall/pdfkit/node_modules/core-js/fn/dict.js b/pitfall/pdfkit/node_modules/core-js/fn/dict.js new file mode 100644 index 00000000..da84a8d8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/dict.js @@ -0,0 +1,2 @@ +require('../modules/core.dict'); +module.exports = require('../modules/_core').Dict; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/dom-collections/index.js b/pitfall/pdfkit/node_modules/core-js/fn/dom-collections/index.js new file mode 100644 index 00000000..3928a09f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/dom-collections/index.js @@ -0,0 +1,8 @@ +require('../../modules/web.dom.iterable'); +var $iterators = require('../../modules/es6.array.iterator'); +module.exports = { + keys: $iterators.keys, + values: $iterators.values, + entries: $iterators.entries, + iterator: $iterators.values +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/dom-collections/iterator.js b/pitfall/pdfkit/node_modules/core-js/fn/dom-collections/iterator.js new file mode 100644 index 00000000..ad983645 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/dom-collections/iterator.js @@ -0,0 +1,2 @@ +require('../../modules/web.dom.iterable'); +module.exports = require('../../modules/_core').Array.values; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/error/index.js b/pitfall/pdfkit/node_modules/core-js/fn/error/index.js new file mode 100644 index 00000000..59571ac2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/error/index.js @@ -0,0 +1,2 @@ +require('../../modules/es7.error.is-error'); +module.exports = require('../../modules/_core').Error; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/error/is-error.js b/pitfall/pdfkit/node_modules/core-js/fn/error/is-error.js new file mode 100644 index 00000000..e15b7201 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/error/is-error.js @@ -0,0 +1,2 @@ +require('../../modules/es7.error.is-error'); +module.exports = require('../../modules/_core').Error.isError; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/function/bind.js b/pitfall/pdfkit/node_modules/core-js/fn/function/bind.js new file mode 100644 index 00000000..38e179e6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/function/bind.js @@ -0,0 +1,2 @@ +require('../../modules/es6.function.bind'); +module.exports = require('../../modules/_core').Function.bind; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/function/has-instance.js b/pitfall/pdfkit/node_modules/core-js/fn/function/has-instance.js new file mode 100644 index 00000000..78397e5f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/function/has-instance.js @@ -0,0 +1,2 @@ +require('../../modules/es6.function.has-instance'); +module.exports = Function[require('../../modules/_wks')('hasInstance')]; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/function/index.js b/pitfall/pdfkit/node_modules/core-js/fn/function/index.js new file mode 100644 index 00000000..206324e8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/function/index.js @@ -0,0 +1,5 @@ +require('../../modules/es6.function.bind'); +require('../../modules/es6.function.name'); +require('../../modules/es6.function.has-instance'); +require('../../modules/core.function.part'); +module.exports = require('../../modules/_core').Function; diff --git a/pitfall/pdfkit/node_modules/core-js/fn/function/name.js b/pitfall/pdfkit/node_modules/core-js/fn/function/name.js new file mode 100644 index 00000000..cb70bf15 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/function/name.js @@ -0,0 +1 @@ +require('../../modules/es6.function.name'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/function/part.js b/pitfall/pdfkit/node_modules/core-js/fn/function/part.js new file mode 100644 index 00000000..926e2cc2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/function/part.js @@ -0,0 +1,2 @@ +require('../../modules/core.function.part'); +module.exports = require('../../modules/_core').Function.part; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/function/virtual/bind.js b/pitfall/pdfkit/node_modules/core-js/fn/function/virtual/bind.js new file mode 100644 index 00000000..0a2f3338 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/function/virtual/bind.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.function.bind'); +module.exports = require('../../../modules/_entry-virtual')('Function').bind; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/function/virtual/index.js b/pitfall/pdfkit/node_modules/core-js/fn/function/virtual/index.js new file mode 100644 index 00000000..f64e2202 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/function/virtual/index.js @@ -0,0 +1,3 @@ +require('../../../modules/es6.function.bind'); +require('../../../modules/core.function.part'); +module.exports = require('../../../modules/_entry-virtual')('Function'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/function/virtual/part.js b/pitfall/pdfkit/node_modules/core-js/fn/function/virtual/part.js new file mode 100644 index 00000000..a382e577 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/function/virtual/part.js @@ -0,0 +1,2 @@ +require('../../../modules/core.function.part'); +module.exports = require('../../../modules/_entry-virtual')('Function').part; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/get-iterator-method.js b/pitfall/pdfkit/node_modules/core-js/fn/get-iterator-method.js new file mode 100644 index 00000000..5543cbbf --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/get-iterator-method.js @@ -0,0 +1,3 @@ +require('../modules/web.dom.iterable'); +require('../modules/es6.string.iterator'); +module.exports = require('../modules/core.get-iterator-method'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/get-iterator.js b/pitfall/pdfkit/node_modules/core-js/fn/get-iterator.js new file mode 100644 index 00000000..762350ff --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/get-iterator.js @@ -0,0 +1,3 @@ +require('../modules/web.dom.iterable'); +require('../modules/es6.string.iterator'); +module.exports = require('../modules/core.get-iterator'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/is-iterable.js b/pitfall/pdfkit/node_modules/core-js/fn/is-iterable.js new file mode 100644 index 00000000..4c654e87 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/is-iterable.js @@ -0,0 +1,3 @@ +require('../modules/web.dom.iterable'); +require('../modules/es6.string.iterator'); +module.exports = require('../modules/core.is-iterable'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/json/index.js b/pitfall/pdfkit/node_modules/core-js/fn/json/index.js new file mode 100644 index 00000000..a6ec3de9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/json/index.js @@ -0,0 +1,2 @@ +var core = require('../../modules/_core'); +module.exports = core.JSON || (core.JSON = {stringify: JSON.stringify}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/json/stringify.js b/pitfall/pdfkit/node_modules/core-js/fn/json/stringify.js new file mode 100644 index 00000000..f0cac86a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/json/stringify.js @@ -0,0 +1,5 @@ +var core = require('../../modules/_core') + , $JSON = core.JSON || (core.JSON = {stringify: JSON.stringify}); +module.exports = function stringify(it){ // eslint-disable-line no-unused-vars + return $JSON.stringify.apply($JSON, arguments); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/map.js b/pitfall/pdfkit/node_modules/core-js/fn/map.js new file mode 100644 index 00000000..16784c60 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/map.js @@ -0,0 +1,6 @@ +require('../modules/es6.object.to-string'); +require('../modules/es6.string.iterator'); +require('../modules/web.dom.iterable'); +require('../modules/es6.map'); +require('../modules/es7.map.to-json'); +module.exports = require('../modules/_core').Map; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/math/acosh.js b/pitfall/pdfkit/node_modules/core-js/fn/math/acosh.js new file mode 100644 index 00000000..9c904c2d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/math/acosh.js @@ -0,0 +1,2 @@ +require('../../modules/es6.math.acosh'); +module.exports = require('../../modules/_core').Math.acosh; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/math/asinh.js b/pitfall/pdfkit/node_modules/core-js/fn/math/asinh.js new file mode 100644 index 00000000..9e209c9d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/math/asinh.js @@ -0,0 +1,2 @@ +require('../../modules/es6.math.asinh'); +module.exports = require('../../modules/_core').Math.asinh; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/math/atanh.js b/pitfall/pdfkit/node_modules/core-js/fn/math/atanh.js new file mode 100644 index 00000000..b116296d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/math/atanh.js @@ -0,0 +1,2 @@ +require('../../modules/es6.math.atanh'); +module.exports = require('../../modules/_core').Math.atanh; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/math/cbrt.js b/pitfall/pdfkit/node_modules/core-js/fn/math/cbrt.js new file mode 100644 index 00000000..6ffec33a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/math/cbrt.js @@ -0,0 +1,2 @@ +require('../../modules/es6.math.cbrt'); +module.exports = require('../../modules/_core').Math.cbrt; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/math/clz32.js b/pitfall/pdfkit/node_modules/core-js/fn/math/clz32.js new file mode 100644 index 00000000..beeaae16 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/math/clz32.js @@ -0,0 +1,2 @@ +require('../../modules/es6.math.clz32'); +module.exports = require('../../modules/_core').Math.clz32; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/math/cosh.js b/pitfall/pdfkit/node_modules/core-js/fn/math/cosh.js new file mode 100644 index 00000000..bf92dc13 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/math/cosh.js @@ -0,0 +1,2 @@ +require('../../modules/es6.math.cosh'); +module.exports = require('../../modules/_core').Math.cosh; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/math/expm1.js b/pitfall/pdfkit/node_modules/core-js/fn/math/expm1.js new file mode 100644 index 00000000..0b30ebb1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/math/expm1.js @@ -0,0 +1,2 @@ +require('../../modules/es6.math.expm1'); +module.exports = require('../../modules/_core').Math.expm1; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/math/fround.js b/pitfall/pdfkit/node_modules/core-js/fn/math/fround.js new file mode 100644 index 00000000..c75a2293 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/math/fround.js @@ -0,0 +1,2 @@ +require('../../modules/es6.math.fround'); +module.exports = require('../../modules/_core').Math.fround; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/math/hypot.js b/pitfall/pdfkit/node_modules/core-js/fn/math/hypot.js new file mode 100644 index 00000000..2126285c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/math/hypot.js @@ -0,0 +1,2 @@ +require('../../modules/es6.math.hypot'); +module.exports = require('../../modules/_core').Math.hypot; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/math/iaddh.js b/pitfall/pdfkit/node_modules/core-js/fn/math/iaddh.js new file mode 100644 index 00000000..cae754ee --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/math/iaddh.js @@ -0,0 +1,2 @@ +require('../../modules/es7.math.iaddh'); +module.exports = require('../../modules/_core').Math.iaddh; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/math/imul.js b/pitfall/pdfkit/node_modules/core-js/fn/math/imul.js new file mode 100644 index 00000000..1f5ce161 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/math/imul.js @@ -0,0 +1,2 @@ +require('../../modules/es6.math.imul'); +module.exports = require('../../modules/_core').Math.imul; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/math/imulh.js b/pitfall/pdfkit/node_modules/core-js/fn/math/imulh.js new file mode 100644 index 00000000..3b47bf8c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/math/imulh.js @@ -0,0 +1,2 @@ +require('../../modules/es7.math.imulh'); +module.exports = require('../../modules/_core').Math.imulh; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/math/index.js b/pitfall/pdfkit/node_modules/core-js/fn/math/index.js new file mode 100644 index 00000000..8a2664b1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/math/index.js @@ -0,0 +1,22 @@ +require('../../modules/es6.math.acosh'); +require('../../modules/es6.math.asinh'); +require('../../modules/es6.math.atanh'); +require('../../modules/es6.math.cbrt'); +require('../../modules/es6.math.clz32'); +require('../../modules/es6.math.cosh'); +require('../../modules/es6.math.expm1'); +require('../../modules/es6.math.fround'); +require('../../modules/es6.math.hypot'); +require('../../modules/es6.math.imul'); +require('../../modules/es6.math.log10'); +require('../../modules/es6.math.log1p'); +require('../../modules/es6.math.log2'); +require('../../modules/es6.math.sign'); +require('../../modules/es6.math.sinh'); +require('../../modules/es6.math.tanh'); +require('../../modules/es6.math.trunc'); +require('../../modules/es7.math.iaddh'); +require('../../modules/es7.math.isubh'); +require('../../modules/es7.math.imulh'); +require('../../modules/es7.math.umulh'); +module.exports = require('../../modules/_core').Math; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/math/isubh.js b/pitfall/pdfkit/node_modules/core-js/fn/math/isubh.js new file mode 100644 index 00000000..e120e423 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/math/isubh.js @@ -0,0 +1,2 @@ +require('../../modules/es7.math.isubh'); +module.exports = require('../../modules/_core').Math.isubh; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/math/log10.js b/pitfall/pdfkit/node_modules/core-js/fn/math/log10.js new file mode 100644 index 00000000..1246e0ae --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/math/log10.js @@ -0,0 +1,2 @@ +require('../../modules/es6.math.log10'); +module.exports = require('../../modules/_core').Math.log10; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/math/log1p.js b/pitfall/pdfkit/node_modules/core-js/fn/math/log1p.js new file mode 100644 index 00000000..047b84c0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/math/log1p.js @@ -0,0 +1,2 @@ +require('../../modules/es6.math.log1p'); +module.exports = require('../../modules/_core').Math.log1p; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/math/log2.js b/pitfall/pdfkit/node_modules/core-js/fn/math/log2.js new file mode 100644 index 00000000..ce3e99c1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/math/log2.js @@ -0,0 +1,2 @@ +require('../../modules/es6.math.log2'); +module.exports = require('../../modules/_core').Math.log2; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/math/sign.js b/pitfall/pdfkit/node_modules/core-js/fn/math/sign.js new file mode 100644 index 00000000..0963ecaf --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/math/sign.js @@ -0,0 +1,2 @@ +require('../../modules/es6.math.sign'); +module.exports = require('../../modules/_core').Math.sign; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/math/sinh.js b/pitfall/pdfkit/node_modules/core-js/fn/math/sinh.js new file mode 100644 index 00000000..c35cb739 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/math/sinh.js @@ -0,0 +1,2 @@ +require('../../modules/es6.math.sinh'); +module.exports = require('../../modules/_core').Math.sinh; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/math/tanh.js b/pitfall/pdfkit/node_modules/core-js/fn/math/tanh.js new file mode 100644 index 00000000..3d1966db --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/math/tanh.js @@ -0,0 +1,2 @@ +require('../../modules/es6.math.tanh'); +module.exports = require('../../modules/_core').Math.tanh; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/math/trunc.js b/pitfall/pdfkit/node_modules/core-js/fn/math/trunc.js new file mode 100644 index 00000000..135b7dcb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/math/trunc.js @@ -0,0 +1,2 @@ +require('../../modules/es6.math.trunc'); +module.exports = require('../../modules/_core').Math.trunc; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/math/umulh.js b/pitfall/pdfkit/node_modules/core-js/fn/math/umulh.js new file mode 100644 index 00000000..d93b9ae0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/math/umulh.js @@ -0,0 +1,2 @@ +require('../../modules/es7.math.umulh'); +module.exports = require('../../modules/_core').Math.umulh; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/number/constructor.js b/pitfall/pdfkit/node_modules/core-js/fn/number/constructor.js new file mode 100644 index 00000000..f488331e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/number/constructor.js @@ -0,0 +1,2 @@ +require('../../modules/es6.number.constructor'); +module.exports = Number; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/number/epsilon.js b/pitfall/pdfkit/node_modules/core-js/fn/number/epsilon.js new file mode 100644 index 00000000..56c93521 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/number/epsilon.js @@ -0,0 +1,2 @@ +require('../../modules/es6.number.epsilon'); +module.exports = Math.pow(2, -52); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/number/index.js b/pitfall/pdfkit/node_modules/core-js/fn/number/index.js new file mode 100644 index 00000000..92890003 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/number/index.js @@ -0,0 +1,14 @@ +require('../../modules/es6.number.constructor'); +require('../../modules/es6.number.epsilon'); +require('../../modules/es6.number.is-finite'); +require('../../modules/es6.number.is-integer'); +require('../../modules/es6.number.is-nan'); +require('../../modules/es6.number.is-safe-integer'); +require('../../modules/es6.number.max-safe-integer'); +require('../../modules/es6.number.min-safe-integer'); +require('../../modules/es6.number.parse-float'); +require('../../modules/es6.number.parse-int'); +require('../../modules/es6.number.to-fixed'); +require('../../modules/es6.number.to-precision'); +require('../../modules/core.number.iterator'); +module.exports = require('../../modules/_core').Number; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/number/is-finite.js b/pitfall/pdfkit/node_modules/core-js/fn/number/is-finite.js new file mode 100644 index 00000000..4ec3706b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/number/is-finite.js @@ -0,0 +1,2 @@ +require('../../modules/es6.number.is-finite'); +module.exports = require('../../modules/_core').Number.isFinite; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/number/is-integer.js b/pitfall/pdfkit/node_modules/core-js/fn/number/is-integer.js new file mode 100644 index 00000000..a3013bff --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/number/is-integer.js @@ -0,0 +1,2 @@ +require('../../modules/es6.number.is-integer'); +module.exports = require('../../modules/_core').Number.isInteger; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/number/is-nan.js b/pitfall/pdfkit/node_modules/core-js/fn/number/is-nan.js new file mode 100644 index 00000000..f23b0266 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/number/is-nan.js @@ -0,0 +1,2 @@ +require('../../modules/es6.number.is-nan'); +module.exports = require('../../modules/_core').Number.isNaN; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/number/is-safe-integer.js b/pitfall/pdfkit/node_modules/core-js/fn/number/is-safe-integer.js new file mode 100644 index 00000000..f68732f5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/number/is-safe-integer.js @@ -0,0 +1,2 @@ +require('../../modules/es6.number.is-safe-integer'); +module.exports = require('../../modules/_core').Number.isSafeInteger; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/number/iterator.js b/pitfall/pdfkit/node_modules/core-js/fn/number/iterator.js new file mode 100644 index 00000000..26feaa1f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/number/iterator.js @@ -0,0 +1,5 @@ +require('../../modules/core.number.iterator'); +var get = require('../../modules/_iterators').Number; +module.exports = function(it){ + return get.call(it); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/number/max-safe-integer.js b/pitfall/pdfkit/node_modules/core-js/fn/number/max-safe-integer.js new file mode 100644 index 00000000..c9b43b04 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/number/max-safe-integer.js @@ -0,0 +1,2 @@ +require('../../modules/es6.number.max-safe-integer'); +module.exports = 0x1fffffffffffff; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/number/min-safe-integer.js b/pitfall/pdfkit/node_modules/core-js/fn/number/min-safe-integer.js new file mode 100644 index 00000000..8b5e0728 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/number/min-safe-integer.js @@ -0,0 +1,2 @@ +require('../../modules/es6.number.min-safe-integer'); +module.exports = -0x1fffffffffffff; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/number/parse-float.js b/pitfall/pdfkit/node_modules/core-js/fn/number/parse-float.js new file mode 100644 index 00000000..62f89774 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/number/parse-float.js @@ -0,0 +1,2 @@ +require('../../modules/es6.number.parse-float'); +module.exports = parseFloat; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/number/parse-int.js b/pitfall/pdfkit/node_modules/core-js/fn/number/parse-int.js new file mode 100644 index 00000000..c197da5b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/number/parse-int.js @@ -0,0 +1,2 @@ +require('../../modules/es6.number.parse-int'); +module.exports = parseInt; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/number/to-fixed.js b/pitfall/pdfkit/node_modules/core-js/fn/number/to-fixed.js new file mode 100644 index 00000000..3a041b0e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/number/to-fixed.js @@ -0,0 +1,2 @@ +require('../../modules/es6.number.to-fixed'); +module.exports = require('../../modules/_core').Number.toFixed; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/number/to-precision.js b/pitfall/pdfkit/node_modules/core-js/fn/number/to-precision.js new file mode 100644 index 00000000..9e85511a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/number/to-precision.js @@ -0,0 +1,2 @@ +require('../../modules/es6.number.to-precision'); +module.exports = require('../../modules/_core').Number.toPrecision; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/number/virtual/index.js b/pitfall/pdfkit/node_modules/core-js/fn/number/virtual/index.js new file mode 100644 index 00000000..42360d32 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/number/virtual/index.js @@ -0,0 +1,4 @@ +require('../../../modules/core.number.iterator'); +var $Number = require('../../../modules/_entry-virtual')('Number'); +$Number.iterator = require('../../../modules/_iterators').Number; +module.exports = $Number; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/number/virtual/iterator.js b/pitfall/pdfkit/node_modules/core-js/fn/number/virtual/iterator.js new file mode 100644 index 00000000..df034996 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/number/virtual/iterator.js @@ -0,0 +1,2 @@ +require('../../../modules/core.number.iterator'); +module.exports = require('../../../modules/_iterators').Number; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/number/virtual/to-fixed.js b/pitfall/pdfkit/node_modules/core-js/fn/number/virtual/to-fixed.js new file mode 100644 index 00000000..b779f15c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/number/virtual/to-fixed.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.number.to-fixed'); +module.exports = require('../../../modules/_entry-virtual')('Number').toFixed; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/number/virtual/to-precision.js b/pitfall/pdfkit/node_modules/core-js/fn/number/virtual/to-precision.js new file mode 100644 index 00000000..0c93fa4a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/number/virtual/to-precision.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.number.to-precision'); +module.exports = require('../../../modules/_entry-virtual')('Number').toPrecision; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/object/assign.js b/pitfall/pdfkit/node_modules/core-js/fn/object/assign.js new file mode 100644 index 00000000..97df6bf4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/object/assign.js @@ -0,0 +1,2 @@ +require('../../modules/es6.object.assign'); +module.exports = require('../../modules/_core').Object.assign; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/object/classof.js b/pitfall/pdfkit/node_modules/core-js/fn/object/classof.js new file mode 100644 index 00000000..993d0480 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/object/classof.js @@ -0,0 +1,2 @@ +require('../../modules/core.object.classof'); +module.exports = require('../../modules/_core').Object.classof; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/object/create.js b/pitfall/pdfkit/node_modules/core-js/fn/object/create.js new file mode 100644 index 00000000..a05ca2fb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/object/create.js @@ -0,0 +1,5 @@ +require('../../modules/es6.object.create'); +var $Object = require('../../modules/_core').Object; +module.exports = function create(P, D){ + return $Object.create(P, D); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/object/define-getter.js b/pitfall/pdfkit/node_modules/core-js/fn/object/define-getter.js new file mode 100644 index 00000000..5dd26070 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/object/define-getter.js @@ -0,0 +1,2 @@ +require('../../modules/es7.object.define-getter'); +module.exports = require('../../modules/_core').Object.__defineGetter__; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/object/define-properties.js b/pitfall/pdfkit/node_modules/core-js/fn/object/define-properties.js new file mode 100644 index 00000000..04160fb3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/object/define-properties.js @@ -0,0 +1,5 @@ +require('../../modules/es6.object.define-properties'); +var $Object = require('../../modules/_core').Object; +module.exports = function defineProperties(T, D){ + return $Object.defineProperties(T, D); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/object/define-property.js b/pitfall/pdfkit/node_modules/core-js/fn/object/define-property.js new file mode 100644 index 00000000..078c56cb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/object/define-property.js @@ -0,0 +1,5 @@ +require('../../modules/es6.object.define-property'); +var $Object = require('../../modules/_core').Object; +module.exports = function defineProperty(it, key, desc){ + return $Object.defineProperty(it, key, desc); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/object/define-setter.js b/pitfall/pdfkit/node_modules/core-js/fn/object/define-setter.js new file mode 100644 index 00000000..b59475f8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/object/define-setter.js @@ -0,0 +1,2 @@ +require('../../modules/es7.object.define-setter'); +module.exports = require('../../modules/_core').Object.__defineSetter__; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/object/define.js b/pitfall/pdfkit/node_modules/core-js/fn/object/define.js new file mode 100644 index 00000000..6ec19e90 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/object/define.js @@ -0,0 +1,2 @@ +require('../../modules/core.object.define'); +module.exports = require('../../modules/_core').Object.define; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/object/entries.js b/pitfall/pdfkit/node_modules/core-js/fn/object/entries.js new file mode 100644 index 00000000..fca1000e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/object/entries.js @@ -0,0 +1,2 @@ +require('../../modules/es7.object.entries'); +module.exports = require('../../modules/_core').Object.entries; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/object/freeze.js b/pitfall/pdfkit/node_modules/core-js/fn/object/freeze.js new file mode 100644 index 00000000..04eac530 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/object/freeze.js @@ -0,0 +1,2 @@ +require('../../modules/es6.object.freeze'); +module.exports = require('../../modules/_core').Object.freeze; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/object/get-own-property-descriptor.js b/pitfall/pdfkit/node_modules/core-js/fn/object/get-own-property-descriptor.js new file mode 100644 index 00000000..7d3f03b8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/object/get-own-property-descriptor.js @@ -0,0 +1,5 @@ +require('../../modules/es6.object.get-own-property-descriptor'); +var $Object = require('../../modules/_core').Object; +module.exports = function getOwnPropertyDescriptor(it, key){ + return $Object.getOwnPropertyDescriptor(it, key); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/object/get-own-property-descriptors.js b/pitfall/pdfkit/node_modules/core-js/fn/object/get-own-property-descriptors.js new file mode 100644 index 00000000..dfeb547c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/object/get-own-property-descriptors.js @@ -0,0 +1,2 @@ +require('../../modules/es7.object.get-own-property-descriptors'); +module.exports = require('../../modules/_core').Object.getOwnPropertyDescriptors; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/object/get-own-property-names.js b/pitfall/pdfkit/node_modules/core-js/fn/object/get-own-property-names.js new file mode 100644 index 00000000..c91ce430 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/object/get-own-property-names.js @@ -0,0 +1,5 @@ +require('../../modules/es6.object.get-own-property-names'); +var $Object = require('../../modules/_core').Object; +module.exports = function getOwnPropertyNames(it){ + return $Object.getOwnPropertyNames(it); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/object/get-own-property-symbols.js b/pitfall/pdfkit/node_modules/core-js/fn/object/get-own-property-symbols.js new file mode 100644 index 00000000..c3f52880 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/object/get-own-property-symbols.js @@ -0,0 +1,2 @@ +require('../../modules/es6.symbol'); +module.exports = require('../../modules/_core').Object.getOwnPropertySymbols; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/object/get-prototype-of.js b/pitfall/pdfkit/node_modules/core-js/fn/object/get-prototype-of.js new file mode 100644 index 00000000..bda93445 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/object/get-prototype-of.js @@ -0,0 +1,2 @@ +require('../../modules/es6.object.get-prototype-of'); +module.exports = require('../../modules/_core').Object.getPrototypeOf; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/object/index.js b/pitfall/pdfkit/node_modules/core-js/fn/object/index.js new file mode 100644 index 00000000..4bd9825b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/object/index.js @@ -0,0 +1,30 @@ +require('../../modules/es6.symbol'); +require('../../modules/es6.object.create'); +require('../../modules/es6.object.define-property'); +require('../../modules/es6.object.define-properties'); +require('../../modules/es6.object.get-own-property-descriptor'); +require('../../modules/es6.object.get-prototype-of'); +require('../../modules/es6.object.keys'); +require('../../modules/es6.object.get-own-property-names'); +require('../../modules/es6.object.freeze'); +require('../../modules/es6.object.seal'); +require('../../modules/es6.object.prevent-extensions'); +require('../../modules/es6.object.is-frozen'); +require('../../modules/es6.object.is-sealed'); +require('../../modules/es6.object.is-extensible'); +require('../../modules/es6.object.assign'); +require('../../modules/es6.object.is'); +require('../../modules/es6.object.set-prototype-of'); +require('../../modules/es6.object.to-string'); +require('../../modules/es7.object.get-own-property-descriptors'); +require('../../modules/es7.object.values'); +require('../../modules/es7.object.entries'); +require('../../modules/es7.object.define-getter'); +require('../../modules/es7.object.define-setter'); +require('../../modules/es7.object.lookup-getter'); +require('../../modules/es7.object.lookup-setter'); +require('../../modules/core.object.is-object'); +require('../../modules/core.object.classof'); +require('../../modules/core.object.define'); +require('../../modules/core.object.make'); +module.exports = require('../../modules/_core').Object; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/object/is-extensible.js b/pitfall/pdfkit/node_modules/core-js/fn/object/is-extensible.js new file mode 100644 index 00000000..43fb0e78 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/object/is-extensible.js @@ -0,0 +1,2 @@ +require('../../modules/es6.object.is-extensible'); +module.exports = require('../../modules/_core').Object.isExtensible; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/object/is-frozen.js b/pitfall/pdfkit/node_modules/core-js/fn/object/is-frozen.js new file mode 100644 index 00000000..cbff2242 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/object/is-frozen.js @@ -0,0 +1,2 @@ +require('../../modules/es6.object.is-frozen'); +module.exports = require('../../modules/_core').Object.isFrozen; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/object/is-object.js b/pitfall/pdfkit/node_modules/core-js/fn/object/is-object.js new file mode 100644 index 00000000..38feeff5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/object/is-object.js @@ -0,0 +1,2 @@ +require('../../modules/core.object.is-object'); +module.exports = require('../../modules/_core').Object.isObject; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/object/is-sealed.js b/pitfall/pdfkit/node_modules/core-js/fn/object/is-sealed.js new file mode 100644 index 00000000..169a8ae7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/object/is-sealed.js @@ -0,0 +1,2 @@ +require('../../modules/es6.object.is-sealed'); +module.exports = require('../../modules/_core').Object.isSealed; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/object/is.js b/pitfall/pdfkit/node_modules/core-js/fn/object/is.js new file mode 100644 index 00000000..6ac9f19e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/object/is.js @@ -0,0 +1,2 @@ +require('../../modules/es6.object.is'); +module.exports = require('../../modules/_core').Object.is; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/object/keys.js b/pitfall/pdfkit/node_modules/core-js/fn/object/keys.js new file mode 100644 index 00000000..8eeb78eb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/object/keys.js @@ -0,0 +1,2 @@ +require('../../modules/es6.object.keys'); +module.exports = require('../../modules/_core').Object.keys; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/object/lookup-getter.js b/pitfall/pdfkit/node_modules/core-js/fn/object/lookup-getter.js new file mode 100644 index 00000000..3f7f674d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/object/lookup-getter.js @@ -0,0 +1,2 @@ +require('../../modules/es7.object.lookup-setter'); +module.exports = require('../../modules/_core').Object.__lookupGetter__; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/object/lookup-setter.js b/pitfall/pdfkit/node_modules/core-js/fn/object/lookup-setter.js new file mode 100644 index 00000000..d18446fe --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/object/lookup-setter.js @@ -0,0 +1,2 @@ +require('../../modules/es7.object.lookup-setter'); +module.exports = require('../../modules/_core').Object.__lookupSetter__; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/object/make.js b/pitfall/pdfkit/node_modules/core-js/fn/object/make.js new file mode 100644 index 00000000..f4d19d12 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/object/make.js @@ -0,0 +1,2 @@ +require('../../modules/core.object.make'); +module.exports = require('../../modules/_core').Object.make; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/object/prevent-extensions.js b/pitfall/pdfkit/node_modules/core-js/fn/object/prevent-extensions.js new file mode 100644 index 00000000..e43be05b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/object/prevent-extensions.js @@ -0,0 +1,2 @@ +require('../../modules/es6.object.prevent-extensions'); +module.exports = require('../../modules/_core').Object.preventExtensions; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/object/seal.js b/pitfall/pdfkit/node_modules/core-js/fn/object/seal.js new file mode 100644 index 00000000..8a56cd7f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/object/seal.js @@ -0,0 +1,2 @@ +require('../../modules/es6.object.seal'); +module.exports = require('../../modules/_core').Object.seal; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/object/set-prototype-of.js b/pitfall/pdfkit/node_modules/core-js/fn/object/set-prototype-of.js new file mode 100644 index 00000000..c25170db --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/object/set-prototype-of.js @@ -0,0 +1,2 @@ +require('../../modules/es6.object.set-prototype-of'); +module.exports = require('../../modules/_core').Object.setPrototypeOf; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/object/values.js b/pitfall/pdfkit/node_modules/core-js/fn/object/values.js new file mode 100644 index 00000000..b50336cf --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/object/values.js @@ -0,0 +1,2 @@ +require('../../modules/es7.object.values'); +module.exports = require('../../modules/_core').Object.values; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/observable.js b/pitfall/pdfkit/node_modules/core-js/fn/observable.js new file mode 100644 index 00000000..05ca51a3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/observable.js @@ -0,0 +1,7 @@ +require('../modules/es6.object.to-string'); +require('../modules/es6.string.iterator'); +require('../modules/web.dom.iterable'); +require('../modules/es6.promise'); +require('../modules/es7.symbol.observable'); +require('../modules/es7.observable'); +module.exports = require('../modules/_core').Observable; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/parse-float.js b/pitfall/pdfkit/node_modules/core-js/fn/parse-float.js new file mode 100644 index 00000000..dad94ddb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/parse-float.js @@ -0,0 +1,2 @@ +require('../modules/es6.parse-float'); +module.exports = require('../modules/_core').parseFloat; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/parse-int.js b/pitfall/pdfkit/node_modules/core-js/fn/parse-int.js new file mode 100644 index 00000000..08a20996 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/parse-int.js @@ -0,0 +1,2 @@ +require('../modules/es6.parse-int'); +module.exports = require('../modules/_core').parseInt; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/promise.js b/pitfall/pdfkit/node_modules/core-js/fn/promise.js new file mode 100644 index 00000000..c901c859 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/promise.js @@ -0,0 +1,5 @@ +require('../modules/es6.object.to-string'); +require('../modules/es6.string.iterator'); +require('../modules/web.dom.iterable'); +require('../modules/es6.promise'); +module.exports = require('../modules/_core').Promise; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/reflect/apply.js b/pitfall/pdfkit/node_modules/core-js/fn/reflect/apply.js new file mode 100644 index 00000000..725b8a69 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/reflect/apply.js @@ -0,0 +1,2 @@ +require('../../modules/es6.reflect.apply'); +module.exports = require('../../modules/_core').Reflect.apply; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/reflect/construct.js b/pitfall/pdfkit/node_modules/core-js/fn/reflect/construct.js new file mode 100644 index 00000000..587725da --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/reflect/construct.js @@ -0,0 +1,2 @@ +require('../../modules/es6.reflect.construct'); +module.exports = require('../../modules/_core').Reflect.construct; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/reflect/define-metadata.js b/pitfall/pdfkit/node_modules/core-js/fn/reflect/define-metadata.js new file mode 100644 index 00000000..c9876ed3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/reflect/define-metadata.js @@ -0,0 +1,2 @@ +require('../../modules/es7.reflect.define-metadata'); +module.exports = require('../../modules/_core').Reflect.defineMetadata; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/reflect/define-property.js b/pitfall/pdfkit/node_modules/core-js/fn/reflect/define-property.js new file mode 100644 index 00000000..c36b4d21 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/reflect/define-property.js @@ -0,0 +1,2 @@ +require('../../modules/es6.reflect.define-property'); +module.exports = require('../../modules/_core').Reflect.defineProperty; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/reflect/delete-metadata.js b/pitfall/pdfkit/node_modules/core-js/fn/reflect/delete-metadata.js new file mode 100644 index 00000000..9bcc0299 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/reflect/delete-metadata.js @@ -0,0 +1,2 @@ +require('../../modules/es7.reflect.delete-metadata'); +module.exports = require('../../modules/_core').Reflect.deleteMetadata; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/reflect/delete-property.js b/pitfall/pdfkit/node_modules/core-js/fn/reflect/delete-property.js new file mode 100644 index 00000000..10b6392f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/reflect/delete-property.js @@ -0,0 +1,2 @@ +require('../../modules/es6.reflect.delete-property'); +module.exports = require('../../modules/_core').Reflect.deleteProperty; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/reflect/enumerate.js b/pitfall/pdfkit/node_modules/core-js/fn/reflect/enumerate.js new file mode 100644 index 00000000..257a21ee --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/reflect/enumerate.js @@ -0,0 +1,2 @@ +require('../../modules/es6.reflect.enumerate'); +module.exports = require('../../modules/_core').Reflect.enumerate; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/reflect/get-metadata-keys.js b/pitfall/pdfkit/node_modules/core-js/fn/reflect/get-metadata-keys.js new file mode 100644 index 00000000..9dbf5ee1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/reflect/get-metadata-keys.js @@ -0,0 +1,2 @@ +require('../../modules/es7.reflect.get-metadata-keys'); +module.exports = require('../../modules/_core').Reflect.getMetadataKeys; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/reflect/get-metadata.js b/pitfall/pdfkit/node_modules/core-js/fn/reflect/get-metadata.js new file mode 100644 index 00000000..3a20839e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/reflect/get-metadata.js @@ -0,0 +1,2 @@ +require('../../modules/es7.reflect.get-metadata'); +module.exports = require('../../modules/_core').Reflect.getMetadata; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/reflect/get-own-metadata-keys.js b/pitfall/pdfkit/node_modules/core-js/fn/reflect/get-own-metadata-keys.js new file mode 100644 index 00000000..2f8c5759 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/reflect/get-own-metadata-keys.js @@ -0,0 +1,2 @@ +require('../../modules/es7.reflect.get-own-metadata-keys'); +module.exports = require('../../modules/_core').Reflect.getOwnMetadataKeys; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/reflect/get-own-metadata.js b/pitfall/pdfkit/node_modules/core-js/fn/reflect/get-own-metadata.js new file mode 100644 index 00000000..68e288dd --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/reflect/get-own-metadata.js @@ -0,0 +1,2 @@ +require('../../modules/es7.reflect.get-own-metadata'); +module.exports = require('../../modules/_core').Reflect.getOwnMetadata; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/reflect/get-own-property-descriptor.js b/pitfall/pdfkit/node_modules/core-js/fn/reflect/get-own-property-descriptor.js new file mode 100644 index 00000000..9e2822fb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/reflect/get-own-property-descriptor.js @@ -0,0 +1,2 @@ +require('../../modules/es6.reflect.get-own-property-descriptor'); +module.exports = require('../../modules/_core').Reflect.getOwnPropertyDescriptor; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/reflect/get-prototype-of.js b/pitfall/pdfkit/node_modules/core-js/fn/reflect/get-prototype-of.js new file mode 100644 index 00000000..48503596 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/reflect/get-prototype-of.js @@ -0,0 +1,2 @@ +require('../../modules/es6.reflect.get-prototype-of'); +module.exports = require('../../modules/_core').Reflect.getPrototypeOf; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/reflect/get.js b/pitfall/pdfkit/node_modules/core-js/fn/reflect/get.js new file mode 100644 index 00000000..9ca903e8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/reflect/get.js @@ -0,0 +1,2 @@ +require('../../modules/es6.reflect.get'); +module.exports = require('../../modules/_core').Reflect.get; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/reflect/has-metadata.js b/pitfall/pdfkit/node_modules/core-js/fn/reflect/has-metadata.js new file mode 100644 index 00000000..f001f437 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/reflect/has-metadata.js @@ -0,0 +1,2 @@ +require('../../modules/es7.reflect.has-metadata'); +module.exports = require('../../modules/_core').Reflect.hasMetadata; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/reflect/has-own-metadata.js b/pitfall/pdfkit/node_modules/core-js/fn/reflect/has-own-metadata.js new file mode 100644 index 00000000..d90935f0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/reflect/has-own-metadata.js @@ -0,0 +1,2 @@ +require('../../modules/es7.reflect.has-own-metadata'); +module.exports = require('../../modules/_core').Reflect.hasOwnMetadata; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/reflect/has.js b/pitfall/pdfkit/node_modules/core-js/fn/reflect/has.js new file mode 100644 index 00000000..8e34933c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/reflect/has.js @@ -0,0 +1,2 @@ +require('../../modules/es6.reflect.has'); +module.exports = require('../../modules/_core').Reflect.has; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/reflect/index.js b/pitfall/pdfkit/node_modules/core-js/fn/reflect/index.js new file mode 100644 index 00000000..a725cef2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/reflect/index.js @@ -0,0 +1,24 @@ +require('../../modules/es6.reflect.apply'); +require('../../modules/es6.reflect.construct'); +require('../../modules/es6.reflect.define-property'); +require('../../modules/es6.reflect.delete-property'); +require('../../modules/es6.reflect.enumerate'); +require('../../modules/es6.reflect.get'); +require('../../modules/es6.reflect.get-own-property-descriptor'); +require('../../modules/es6.reflect.get-prototype-of'); +require('../../modules/es6.reflect.has'); +require('../../modules/es6.reflect.is-extensible'); +require('../../modules/es6.reflect.own-keys'); +require('../../modules/es6.reflect.prevent-extensions'); +require('../../modules/es6.reflect.set'); +require('../../modules/es6.reflect.set-prototype-of'); +require('../../modules/es7.reflect.define-metadata'); +require('../../modules/es7.reflect.delete-metadata'); +require('../../modules/es7.reflect.get-metadata'); +require('../../modules/es7.reflect.get-metadata-keys'); +require('../../modules/es7.reflect.get-own-metadata'); +require('../../modules/es7.reflect.get-own-metadata-keys'); +require('../../modules/es7.reflect.has-metadata'); +require('../../modules/es7.reflect.has-own-metadata'); +require('../../modules/es7.reflect.metadata'); +module.exports = require('../../modules/_core').Reflect; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/reflect/is-extensible.js b/pitfall/pdfkit/node_modules/core-js/fn/reflect/is-extensible.js new file mode 100644 index 00000000..de41d683 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/reflect/is-extensible.js @@ -0,0 +1,2 @@ +require('../../modules/es6.reflect.is-extensible'); +module.exports = require('../../modules/_core').Reflect.isExtensible; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/reflect/metadata.js b/pitfall/pdfkit/node_modules/core-js/fn/reflect/metadata.js new file mode 100644 index 00000000..3f2b8ff6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/reflect/metadata.js @@ -0,0 +1,2 @@ +require('../../modules/es7.reflect.metadata'); +module.exports = require('../../modules/_core').Reflect.metadata; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/reflect/own-keys.js b/pitfall/pdfkit/node_modules/core-js/fn/reflect/own-keys.js new file mode 100644 index 00000000..bfcebc74 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/reflect/own-keys.js @@ -0,0 +1,2 @@ +require('../../modules/es6.reflect.own-keys'); +module.exports = require('../../modules/_core').Reflect.ownKeys; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/reflect/prevent-extensions.js b/pitfall/pdfkit/node_modules/core-js/fn/reflect/prevent-extensions.js new file mode 100644 index 00000000..b346da3b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/reflect/prevent-extensions.js @@ -0,0 +1,2 @@ +require('../../modules/es6.reflect.prevent-extensions'); +module.exports = require('../../modules/_core').Reflect.preventExtensions; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/reflect/set-prototype-of.js b/pitfall/pdfkit/node_modules/core-js/fn/reflect/set-prototype-of.js new file mode 100644 index 00000000..16b74359 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/reflect/set-prototype-of.js @@ -0,0 +1,2 @@ +require('../../modules/es6.reflect.set-prototype-of'); +module.exports = require('../../modules/_core').Reflect.setPrototypeOf; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/reflect/set.js b/pitfall/pdfkit/node_modules/core-js/fn/reflect/set.js new file mode 100644 index 00000000..834929ee --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/reflect/set.js @@ -0,0 +1,2 @@ +require('../../modules/es6.reflect.set'); +module.exports = require('../../modules/_core').Reflect.set; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/regexp/constructor.js b/pitfall/pdfkit/node_modules/core-js/fn/regexp/constructor.js new file mode 100644 index 00000000..90c13513 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/regexp/constructor.js @@ -0,0 +1,2 @@ +require('../../modules/es6.regexp.constructor'); +module.exports = RegExp; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/regexp/escape.js b/pitfall/pdfkit/node_modules/core-js/fn/regexp/escape.js new file mode 100644 index 00000000..d657a7d9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/regexp/escape.js @@ -0,0 +1,2 @@ +require('../../modules/core.regexp.escape'); +module.exports = require('../../modules/_core').RegExp.escape; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/regexp/flags.js b/pitfall/pdfkit/node_modules/core-js/fn/regexp/flags.js new file mode 100644 index 00000000..ef84ddbd --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/regexp/flags.js @@ -0,0 +1,5 @@ +require('../../modules/es6.regexp.flags'); +var flags = require('../../modules/_flags'); +module.exports = function(it){ + return flags.call(it); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/regexp/index.js b/pitfall/pdfkit/node_modules/core-js/fn/regexp/index.js new file mode 100644 index 00000000..61ced0b8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/regexp/index.js @@ -0,0 +1,9 @@ +require('../../modules/es6.regexp.constructor'); +require('../../modules/es6.regexp.to-string'); +require('../../modules/es6.regexp.flags'); +require('../../modules/es6.regexp.match'); +require('../../modules/es6.regexp.replace'); +require('../../modules/es6.regexp.search'); +require('../../modules/es6.regexp.split'); +require('../../modules/core.regexp.escape'); +module.exports = require('../../modules/_core').RegExp; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/regexp/match.js b/pitfall/pdfkit/node_modules/core-js/fn/regexp/match.js new file mode 100644 index 00000000..400d0921 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/regexp/match.js @@ -0,0 +1,5 @@ +require('../../modules/es6.regexp.match'); +var MATCH = require('../../modules/_wks')('match'); +module.exports = function(it, str){ + return RegExp.prototype[MATCH].call(it, str); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/regexp/replace.js b/pitfall/pdfkit/node_modules/core-js/fn/regexp/replace.js new file mode 100644 index 00000000..adde0adf --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/regexp/replace.js @@ -0,0 +1,5 @@ +require('../../modules/es6.regexp.replace'); +var REPLACE = require('../../modules/_wks')('replace'); +module.exports = function(it, str, replacer){ + return RegExp.prototype[REPLACE].call(it, str, replacer); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/regexp/search.js b/pitfall/pdfkit/node_modules/core-js/fn/regexp/search.js new file mode 100644 index 00000000..4e149d05 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/regexp/search.js @@ -0,0 +1,5 @@ +require('../../modules/es6.regexp.search'); +var SEARCH = require('../../modules/_wks')('search'); +module.exports = function(it, str){ + return RegExp.prototype[SEARCH].call(it, str); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/regexp/split.js b/pitfall/pdfkit/node_modules/core-js/fn/regexp/split.js new file mode 100644 index 00000000..b92d09fa --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/regexp/split.js @@ -0,0 +1,5 @@ +require('../../modules/es6.regexp.split'); +var SPLIT = require('../../modules/_wks')('split'); +module.exports = function(it, str, limit){ + return RegExp.prototype[SPLIT].call(it, str, limit); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/regexp/to-string.js b/pitfall/pdfkit/node_modules/core-js/fn/regexp/to-string.js new file mode 100644 index 00000000..29d5d037 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/regexp/to-string.js @@ -0,0 +1,5 @@ +'use strict'; +require('../../modules/es6.regexp.to-string'); +module.exports = function toString(it){ + return RegExp.prototype.toString.call(it); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/set-immediate.js b/pitfall/pdfkit/node_modules/core-js/fn/set-immediate.js new file mode 100644 index 00000000..25083136 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/set-immediate.js @@ -0,0 +1,2 @@ +require('../modules/web.immediate'); +module.exports = require('../modules/_core').setImmediate; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/set-interval.js b/pitfall/pdfkit/node_modules/core-js/fn/set-interval.js new file mode 100644 index 00000000..484447ff --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/set-interval.js @@ -0,0 +1,2 @@ +require('../modules/web.timers'); +module.exports = require('../modules/_core').setInterval; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/set-timeout.js b/pitfall/pdfkit/node_modules/core-js/fn/set-timeout.js new file mode 100644 index 00000000..8ebbb2e4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/set-timeout.js @@ -0,0 +1,2 @@ +require('../modules/web.timers'); +module.exports = require('../modules/_core').setTimeout; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/set.js b/pitfall/pdfkit/node_modules/core-js/fn/set.js new file mode 100644 index 00000000..a8b49652 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/set.js @@ -0,0 +1,6 @@ +require('../modules/es6.object.to-string'); +require('../modules/es6.string.iterator'); +require('../modules/web.dom.iterable'); +require('../modules/es6.set'); +require('../modules/es7.set.to-json'); +module.exports = require('../modules/_core').Set; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/anchor.js b/pitfall/pdfkit/node_modules/core-js/fn/string/anchor.js new file mode 100644 index 00000000..ba4ef813 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/anchor.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.anchor'); +module.exports = require('../../modules/_core').String.anchor; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/at.js b/pitfall/pdfkit/node_modules/core-js/fn/string/at.js new file mode 100644 index 00000000..ab6aec15 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/at.js @@ -0,0 +1,2 @@ +require('../../modules/es7.string.at'); +module.exports = require('../../modules/_core').String.at; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/big.js b/pitfall/pdfkit/node_modules/core-js/fn/string/big.js new file mode 100644 index 00000000..ab707907 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/big.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.big'); +module.exports = require('../../modules/_core').String.big; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/blink.js b/pitfall/pdfkit/node_modules/core-js/fn/string/blink.js new file mode 100644 index 00000000..c748079b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/blink.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.blink'); +module.exports = require('../../modules/_core').String.blink; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/bold.js b/pitfall/pdfkit/node_modules/core-js/fn/string/bold.js new file mode 100644 index 00000000..2d36bda3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/bold.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.bold'); +module.exports = require('../../modules/_core').String.bold; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/code-point-at.js b/pitfall/pdfkit/node_modules/core-js/fn/string/code-point-at.js new file mode 100644 index 00000000..be141e82 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/code-point-at.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.code-point-at'); +module.exports = require('../../modules/_core').String.codePointAt; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/ends-with.js b/pitfall/pdfkit/node_modules/core-js/fn/string/ends-with.js new file mode 100644 index 00000000..5e427753 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/ends-with.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.ends-with'); +module.exports = require('../../modules/_core').String.endsWith; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/escape-html.js b/pitfall/pdfkit/node_modules/core-js/fn/string/escape-html.js new file mode 100644 index 00000000..49176ca6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/escape-html.js @@ -0,0 +1,2 @@ +require('../../modules/core.string.escape-html'); +module.exports = require('../../modules/_core').String.escapeHTML; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/fixed.js b/pitfall/pdfkit/node_modules/core-js/fn/string/fixed.js new file mode 100644 index 00000000..77e233a3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/fixed.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.fixed'); +module.exports = require('../../modules/_core').String.fixed; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/fontcolor.js b/pitfall/pdfkit/node_modules/core-js/fn/string/fontcolor.js new file mode 100644 index 00000000..079235a1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/fontcolor.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.fontcolor'); +module.exports = require('../../modules/_core').String.fontcolor; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/fontsize.js b/pitfall/pdfkit/node_modules/core-js/fn/string/fontsize.js new file mode 100644 index 00000000..8cb2555c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/fontsize.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.fontsize'); +module.exports = require('../../modules/_core').String.fontsize; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/from-code-point.js b/pitfall/pdfkit/node_modules/core-js/fn/string/from-code-point.js new file mode 100644 index 00000000..93fc53ae --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/from-code-point.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.from-code-point'); +module.exports = require('../../modules/_core').String.fromCodePoint; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/includes.js b/pitfall/pdfkit/node_modules/core-js/fn/string/includes.js new file mode 100644 index 00000000..c9736404 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/includes.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.includes'); +module.exports = require('../../modules/_core').String.includes; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/index.js b/pitfall/pdfkit/node_modules/core-js/fn/string/index.js new file mode 100644 index 00000000..6485a9b2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/index.js @@ -0,0 +1,35 @@ +require('../../modules/es6.string.from-code-point'); +require('../../modules/es6.string.raw'); +require('../../modules/es6.string.trim'); +require('../../modules/es6.string.iterator'); +require('../../modules/es6.string.code-point-at'); +require('../../modules/es6.string.ends-with'); +require('../../modules/es6.string.includes'); +require('../../modules/es6.string.repeat'); +require('../../modules/es6.string.starts-with'); +require('../../modules/es6.regexp.match'); +require('../../modules/es6.regexp.replace'); +require('../../modules/es6.regexp.search'); +require('../../modules/es6.regexp.split'); +require('../../modules/es6.string.anchor'); +require('../../modules/es6.string.big'); +require('../../modules/es6.string.blink'); +require('../../modules/es6.string.bold'); +require('../../modules/es6.string.fixed'); +require('../../modules/es6.string.fontcolor'); +require('../../modules/es6.string.fontsize'); +require('../../modules/es6.string.italics'); +require('../../modules/es6.string.link'); +require('../../modules/es6.string.small'); +require('../../modules/es6.string.strike'); +require('../../modules/es6.string.sub'); +require('../../modules/es6.string.sup'); +require('../../modules/es7.string.at'); +require('../../modules/es7.string.pad-start'); +require('../../modules/es7.string.pad-end'); +require('../../modules/es7.string.trim-left'); +require('../../modules/es7.string.trim-right'); +require('../../modules/es7.string.match-all'); +require('../../modules/core.string.escape-html'); +require('../../modules/core.string.unescape-html'); +module.exports = require('../../modules/_core').String; diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/italics.js b/pitfall/pdfkit/node_modules/core-js/fn/string/italics.js new file mode 100644 index 00000000..378450eb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/italics.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.italics'); +module.exports = require('../../modules/_core').String.italics; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/iterator.js b/pitfall/pdfkit/node_modules/core-js/fn/string/iterator.js new file mode 100644 index 00000000..947e7558 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/iterator.js @@ -0,0 +1,5 @@ +require('../../modules/es6.string.iterator'); +var get = require('../../modules/_iterators').String; +module.exports = function(it){ + return get.call(it); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/link.js b/pitfall/pdfkit/node_modules/core-js/fn/string/link.js new file mode 100644 index 00000000..1eb2c6dd --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/link.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.link'); +module.exports = require('../../modules/_core').String.link; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/match-all.js b/pitfall/pdfkit/node_modules/core-js/fn/string/match-all.js new file mode 100644 index 00000000..1a1dfeb6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/match-all.js @@ -0,0 +1,2 @@ +require('../../modules/es7.string.match-all'); +module.exports = require('../../modules/_core').String.matchAll; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/pad-end.js b/pitfall/pdfkit/node_modules/core-js/fn/string/pad-end.js new file mode 100644 index 00000000..23eb9f95 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/pad-end.js @@ -0,0 +1,2 @@ +require('../../modules/es7.string.pad-end'); +module.exports = require('../../modules/_core').String.padEnd; diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/pad-start.js b/pitfall/pdfkit/node_modules/core-js/fn/string/pad-start.js new file mode 100644 index 00000000..ff12739f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/pad-start.js @@ -0,0 +1,2 @@ +require('../../modules/es7.string.pad-start'); +module.exports = require('../../modules/_core').String.padStart; diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/raw.js b/pitfall/pdfkit/node_modules/core-js/fn/string/raw.js new file mode 100644 index 00000000..713550fb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/raw.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.raw'); +module.exports = require('../../modules/_core').String.raw; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/repeat.js b/pitfall/pdfkit/node_modules/core-js/fn/string/repeat.js new file mode 100644 index 00000000..fa75b13e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/repeat.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.repeat'); +module.exports = require('../../modules/_core').String.repeat; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/small.js b/pitfall/pdfkit/node_modules/core-js/fn/string/small.js new file mode 100644 index 00000000..0438290d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/small.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.small'); +module.exports = require('../../modules/_core').String.small; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/starts-with.js b/pitfall/pdfkit/node_modules/core-js/fn/string/starts-with.js new file mode 100644 index 00000000..d62512a3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/starts-with.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.starts-with'); +module.exports = require('../../modules/_core').String.startsWith; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/strike.js b/pitfall/pdfkit/node_modules/core-js/fn/string/strike.js new file mode 100644 index 00000000..b79946c8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/strike.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.strike'); +module.exports = require('../../modules/_core').String.strike; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/sub.js b/pitfall/pdfkit/node_modules/core-js/fn/string/sub.js new file mode 100644 index 00000000..54d0671e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/sub.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.sub'); +module.exports = require('../../modules/_core').String.sub; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/sup.js b/pitfall/pdfkit/node_modules/core-js/fn/string/sup.js new file mode 100644 index 00000000..645e0372 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/sup.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.sup'); +module.exports = require('../../modules/_core').String.sup; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/trim-end.js b/pitfall/pdfkit/node_modules/core-js/fn/string/trim-end.js new file mode 100644 index 00000000..f3bdf6fb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/trim-end.js @@ -0,0 +1,2 @@ +require('../../modules/es7.string.trim-right'); +module.exports = require('../../modules/_core').String.trimRight; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/trim-left.js b/pitfall/pdfkit/node_modules/core-js/fn/string/trim-left.js new file mode 100644 index 00000000..04671d36 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/trim-left.js @@ -0,0 +1,2 @@ +require('../../modules/es7.string.trim-left'); +module.exports = require('../../modules/_core').String.trimLeft; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/trim-right.js b/pitfall/pdfkit/node_modules/core-js/fn/string/trim-right.js new file mode 100644 index 00000000..f3bdf6fb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/trim-right.js @@ -0,0 +1,2 @@ +require('../../modules/es7.string.trim-right'); +module.exports = require('../../modules/_core').String.trimRight; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/trim-start.js b/pitfall/pdfkit/node_modules/core-js/fn/string/trim-start.js new file mode 100644 index 00000000..04671d36 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/trim-start.js @@ -0,0 +1,2 @@ +require('../../modules/es7.string.trim-left'); +module.exports = require('../../modules/_core').String.trimLeft; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/trim.js b/pitfall/pdfkit/node_modules/core-js/fn/string/trim.js new file mode 100644 index 00000000..c536e12e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/trim.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.trim'); +module.exports = require('../../modules/_core').String.trim; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/unescape-html.js b/pitfall/pdfkit/node_modules/core-js/fn/string/unescape-html.js new file mode 100644 index 00000000..7c2c55c8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/unescape-html.js @@ -0,0 +1,2 @@ +require('../../modules/core.string.unescape-html'); +module.exports = require('../../modules/_core').String.unescapeHTML; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/anchor.js b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/anchor.js new file mode 100644 index 00000000..6f74b7e8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/anchor.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.anchor'); +module.exports = require('../../../modules/_entry-virtual')('String').anchor; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/at.js b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/at.js new file mode 100644 index 00000000..3b961438 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/at.js @@ -0,0 +1,2 @@ +require('../../../modules/es7.string.at'); +module.exports = require('../../../modules/_entry-virtual')('String').at; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/big.js b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/big.js new file mode 100644 index 00000000..57ac7d5d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/big.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.big'); +module.exports = require('../../../modules/_entry-virtual')('String').big; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/blink.js b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/blink.js new file mode 100644 index 00000000..5c4cea80 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/blink.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.blink'); +module.exports = require('../../../modules/_entry-virtual')('String').blink; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/bold.js b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/bold.js new file mode 100644 index 00000000..c566bf2d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/bold.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.bold'); +module.exports = require('../../../modules/_entry-virtual')('String').bold; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/code-point-at.js b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/code-point-at.js new file mode 100644 index 00000000..87375219 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/code-point-at.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.code-point-at'); +module.exports = require('../../../modules/_entry-virtual')('String').codePointAt; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/ends-with.js b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/ends-with.js new file mode 100644 index 00000000..90bc6e79 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/ends-with.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.ends-with'); +module.exports = require('../../../modules/_entry-virtual')('String').endsWith; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/escape-html.js b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/escape-html.js new file mode 100644 index 00000000..3342bcec --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/escape-html.js @@ -0,0 +1,2 @@ +require('../../../modules/core.string.escape-html'); +module.exports = require('../../../modules/_entry-virtual')('String').escapeHTML; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/fixed.js b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/fixed.js new file mode 100644 index 00000000..e830654f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/fixed.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.fixed'); +module.exports = require('../../../modules/_entry-virtual')('String').fixed; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/fontcolor.js b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/fontcolor.js new file mode 100644 index 00000000..cfb9b2c0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/fontcolor.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.fontcolor'); +module.exports = require('../../../modules/_entry-virtual')('String').fontcolor; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/fontsize.js b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/fontsize.js new file mode 100644 index 00000000..de8f5161 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/fontsize.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.fontsize'); +module.exports = require('../../../modules/_entry-virtual')('String').fontsize; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/includes.js b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/includes.js new file mode 100644 index 00000000..1e4793d6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/includes.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.includes'); +module.exports = require('../../../modules/_entry-virtual')('String').includes; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/index.js b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/index.js new file mode 100644 index 00000000..0e65d20c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/index.js @@ -0,0 +1,33 @@ +require('../../../modules/es6.string.trim'); +require('../../../modules/es6.string.iterator'); +require('../../../modules/es6.string.code-point-at'); +require('../../../modules/es6.string.ends-with'); +require('../../../modules/es6.string.includes'); +require('../../../modules/es6.string.repeat'); +require('../../../modules/es6.string.starts-with'); +require('../../../modules/es6.regexp.match'); +require('../../../modules/es6.regexp.replace'); +require('../../../modules/es6.regexp.search'); +require('../../../modules/es6.regexp.split'); +require('../../../modules/es6.string.anchor'); +require('../../../modules/es6.string.big'); +require('../../../modules/es6.string.blink'); +require('../../../modules/es6.string.bold'); +require('../../../modules/es6.string.fixed'); +require('../../../modules/es6.string.fontcolor'); +require('../../../modules/es6.string.fontsize'); +require('../../../modules/es6.string.italics'); +require('../../../modules/es6.string.link'); +require('../../../modules/es6.string.small'); +require('../../../modules/es6.string.strike'); +require('../../../modules/es6.string.sub'); +require('../../../modules/es6.string.sup'); +require('../../../modules/es7.string.at'); +require('../../../modules/es7.string.pad-start'); +require('../../../modules/es7.string.pad-end'); +require('../../../modules/es7.string.trim-left'); +require('../../../modules/es7.string.trim-right'); +require('../../../modules/es7.string.match-all'); +require('../../../modules/core.string.escape-html'); +require('../../../modules/core.string.unescape-html'); +module.exports = require('../../../modules/_entry-virtual')('String'); diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/italics.js b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/italics.js new file mode 100644 index 00000000..f8f1d338 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/italics.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.italics'); +module.exports = require('../../../modules/_entry-virtual')('String').italics; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/iterator.js b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/iterator.js new file mode 100644 index 00000000..7efe2f93 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/iterator.js @@ -0,0 +1,2 @@ +require('../../../modules/core.number.iterator'); +module.exports = require('../../../modules/_iterators').String; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/link.js b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/link.js new file mode 100644 index 00000000..4b2eea8a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/link.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.link'); +module.exports = require('../../../modules/_entry-virtual')('String').link; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/match-all.js b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/match-all.js new file mode 100644 index 00000000..9208873a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/match-all.js @@ -0,0 +1,2 @@ +require('../../../modules/es7.string.match-all'); +module.exports = require('../../../modules/_entry-virtual')('String').matchAll; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/pad-end.js b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/pad-end.js new file mode 100644 index 00000000..81e5ac04 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/pad-end.js @@ -0,0 +1,2 @@ +require('../../../modules/es7.string.pad-end'); +module.exports = require('../../../modules/_entry-virtual')('String').padEnd; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/pad-start.js b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/pad-start.js new file mode 100644 index 00000000..54cf3a59 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/pad-start.js @@ -0,0 +1,2 @@ +require('../../../modules/es7.string.pad-start'); +module.exports = require('../../../modules/_entry-virtual')('String').padStart; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/repeat.js b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/repeat.js new file mode 100644 index 00000000..d08cf6a5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/repeat.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.repeat'); +module.exports = require('../../../modules/_entry-virtual')('String').repeat; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/small.js b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/small.js new file mode 100644 index 00000000..201bf9b6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/small.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.small'); +module.exports = require('../../../modules/_entry-virtual')('String').small; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/starts-with.js b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/starts-with.js new file mode 100644 index 00000000..f8897d15 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/starts-with.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.starts-with'); +module.exports = require('../../../modules/_entry-virtual')('String').startsWith; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/strike.js b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/strike.js new file mode 100644 index 00000000..4572db91 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/strike.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.strike'); +module.exports = require('../../../modules/_entry-virtual')('String').strike; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/sub.js b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/sub.js new file mode 100644 index 00000000..a13611ec --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/sub.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.sub'); +module.exports = require('../../../modules/_entry-virtual')('String').sub; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/sup.js b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/sup.js new file mode 100644 index 00000000..07695329 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/sup.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.sup'); +module.exports = require('../../../modules/_entry-virtual')('String').sup; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/trim-end.js b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/trim-end.js new file mode 100644 index 00000000..14c25ac8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/trim-end.js @@ -0,0 +1,2 @@ +require('../../../modules/es7.string.trim-right'); +module.exports = require('../../../modules/_entry-virtual')('String').trimRight; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/trim-left.js b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/trim-left.js new file mode 100644 index 00000000..aabcfb3f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/trim-left.js @@ -0,0 +1,2 @@ +require('../../../modules/es7.string.trim-left'); +module.exports = require('../../../modules/_entry-virtual')('String').trimLeft; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/trim-right.js b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/trim-right.js new file mode 100644 index 00000000..14c25ac8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/trim-right.js @@ -0,0 +1,2 @@ +require('../../../modules/es7.string.trim-right'); +module.exports = require('../../../modules/_entry-virtual')('String').trimRight; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/trim-start.js b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/trim-start.js new file mode 100644 index 00000000..aabcfb3f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/trim-start.js @@ -0,0 +1,2 @@ +require('../../../modules/es7.string.trim-left'); +module.exports = require('../../../modules/_entry-virtual')('String').trimLeft; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/trim.js b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/trim.js new file mode 100644 index 00000000..23fbcbc5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/trim.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.trim'); +module.exports = require('../../../modules/_entry-virtual')('String').trim; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/unescape-html.js b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/unescape-html.js new file mode 100644 index 00000000..51eb59fc --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/string/virtual/unescape-html.js @@ -0,0 +1,2 @@ +require('../../../modules/core.string.unescape-html'); +module.exports = require('../../../modules/_entry-virtual')('String').unescapeHTML; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/symbol/async-iterator.js b/pitfall/pdfkit/node_modules/core-js/fn/symbol/async-iterator.js new file mode 100644 index 00000000..aca10f96 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/symbol/async-iterator.js @@ -0,0 +1,2 @@ +require('../../modules/es7.symbol.async-iterator'); +module.exports = require('../../modules/_wks-ext').f('asyncIterator'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/symbol/for.js b/pitfall/pdfkit/node_modules/core-js/fn/symbol/for.js new file mode 100644 index 00000000..c9e93c13 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/symbol/for.js @@ -0,0 +1,2 @@ +require('../../modules/es6.symbol'); +module.exports = require('../../modules/_core').Symbol['for']; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/symbol/has-instance.js b/pitfall/pdfkit/node_modules/core-js/fn/symbol/has-instance.js new file mode 100644 index 00000000..f3ec9cf6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/symbol/has-instance.js @@ -0,0 +1,2 @@ +require('../../modules/es6.function.has-instance'); +module.exports = require('../../modules/_wks-ext').f('hasInstance'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/symbol/index.js b/pitfall/pdfkit/node_modules/core-js/fn/symbol/index.js new file mode 100644 index 00000000..64c0f5f4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/symbol/index.js @@ -0,0 +1,5 @@ +require('../../modules/es6.symbol'); +require('../../modules/es6.object.to-string'); +require('../../modules/es7.symbol.async-iterator'); +require('../../modules/es7.symbol.observable'); +module.exports = require('../../modules/_core').Symbol; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/symbol/is-concat-spreadable.js b/pitfall/pdfkit/node_modules/core-js/fn/symbol/is-concat-spreadable.js new file mode 100644 index 00000000..49ed7a1d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/symbol/is-concat-spreadable.js @@ -0,0 +1 @@ +module.exports = require('../../modules/_wks-ext').f('isConcatSpreadable'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/symbol/iterator.js b/pitfall/pdfkit/node_modules/core-js/fn/symbol/iterator.js new file mode 100644 index 00000000..50352280 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/symbol/iterator.js @@ -0,0 +1,3 @@ +require('../../modules/es6.string.iterator'); +require('../../modules/web.dom.iterable'); +module.exports = require('../../modules/_wks-ext').f('iterator'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/symbol/key-for.js b/pitfall/pdfkit/node_modules/core-js/fn/symbol/key-for.js new file mode 100644 index 00000000..d9b595ff --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/symbol/key-for.js @@ -0,0 +1,2 @@ +require('../../modules/es6.symbol'); +module.exports = require('../../modules/_core').Symbol.keyFor; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/symbol/match.js b/pitfall/pdfkit/node_modules/core-js/fn/symbol/match.js new file mode 100644 index 00000000..d27db65b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/symbol/match.js @@ -0,0 +1,2 @@ +require('../../modules/es6.regexp.match'); +module.exports = require('../../modules/_wks-ext').f('match'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/symbol/observable.js b/pitfall/pdfkit/node_modules/core-js/fn/symbol/observable.js new file mode 100644 index 00000000..884cebfd --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/symbol/observable.js @@ -0,0 +1,2 @@ +require('../../modules/es7.symbol.observable'); +module.exports = require('../../modules/_wks-ext').f('observable'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/symbol/replace.js b/pitfall/pdfkit/node_modules/core-js/fn/symbol/replace.js new file mode 100644 index 00000000..3ef60f5e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/symbol/replace.js @@ -0,0 +1,2 @@ +require('../../modules/es6.regexp.replace'); +module.exports = require('../../modules/_wks-ext').f('replace'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/symbol/search.js b/pitfall/pdfkit/node_modules/core-js/fn/symbol/search.js new file mode 100644 index 00000000..aee84f9e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/symbol/search.js @@ -0,0 +1,2 @@ +require('../../modules/es6.regexp.search'); +module.exports = require('../../modules/_wks-ext').f('search'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/symbol/species.js b/pitfall/pdfkit/node_modules/core-js/fn/symbol/species.js new file mode 100644 index 00000000..a425eb2d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/symbol/species.js @@ -0,0 +1 @@ +module.exports = require('../../modules/_wks-ext').f('species'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/symbol/split.js b/pitfall/pdfkit/node_modules/core-js/fn/symbol/split.js new file mode 100644 index 00000000..8535932f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/symbol/split.js @@ -0,0 +1,2 @@ +require('../../modules/es6.regexp.split'); +module.exports = require('../../modules/_wks-ext').f('split'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/symbol/to-primitive.js b/pitfall/pdfkit/node_modules/core-js/fn/symbol/to-primitive.js new file mode 100644 index 00000000..20c831b8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/symbol/to-primitive.js @@ -0,0 +1 @@ +module.exports = require('../../modules/_wks-ext').f('toPrimitive'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/symbol/to-string-tag.js b/pitfall/pdfkit/node_modules/core-js/fn/symbol/to-string-tag.js new file mode 100644 index 00000000..101baf27 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/symbol/to-string-tag.js @@ -0,0 +1,2 @@ +require('../../modules/es6.object.to-string'); +module.exports = require('../../modules/_wks-ext').f('toStringTag'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/symbol/unscopables.js b/pitfall/pdfkit/node_modules/core-js/fn/symbol/unscopables.js new file mode 100644 index 00000000..6c4146b2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/symbol/unscopables.js @@ -0,0 +1 @@ +module.exports = require('../../modules/_wks-ext').f('unscopables'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/system/global.js b/pitfall/pdfkit/node_modules/core-js/fn/system/global.js new file mode 100644 index 00000000..c3219d6f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/system/global.js @@ -0,0 +1,2 @@ +require('../../modules/es7.system.global'); +module.exports = require('../../modules/_core').System.global; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/system/index.js b/pitfall/pdfkit/node_modules/core-js/fn/system/index.js new file mode 100644 index 00000000..eae78ddd --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/system/index.js @@ -0,0 +1,2 @@ +require('../../modules/es7.system.global'); +module.exports = require('../../modules/_core').System; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/typed/array-buffer.js b/pitfall/pdfkit/node_modules/core-js/fn/typed/array-buffer.js new file mode 100644 index 00000000..fe08f7f2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/typed/array-buffer.js @@ -0,0 +1,3 @@ +require('../../modules/es6.typed.array-buffer'); +require('../../modules/es6.object.to-string'); +module.exports = require('../../modules/_core').ArrayBuffer; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/typed/data-view.js b/pitfall/pdfkit/node_modules/core-js/fn/typed/data-view.js new file mode 100644 index 00000000..09dbb38a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/typed/data-view.js @@ -0,0 +1,3 @@ +require('../../modules/es6.typed.data-view'); +require('../../modules/es6.object.to-string'); +module.exports = require('../../modules/_core').DataView; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/typed/float32-array.js b/pitfall/pdfkit/node_modules/core-js/fn/typed/float32-array.js new file mode 100644 index 00000000..1191fecb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/typed/float32-array.js @@ -0,0 +1,2 @@ +require('../../modules/es6.typed.float32-array'); +module.exports = require('../../modules/_core').Float32Array; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/typed/float64-array.js b/pitfall/pdfkit/node_modules/core-js/fn/typed/float64-array.js new file mode 100644 index 00000000..6073a682 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/typed/float64-array.js @@ -0,0 +1,2 @@ +require('../../modules/es6.typed.float64-array'); +module.exports = require('../../modules/_core').Float64Array; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/typed/index.js b/pitfall/pdfkit/node_modules/core-js/fn/typed/index.js new file mode 100644 index 00000000..7babe09d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/typed/index.js @@ -0,0 +1,13 @@ +require('../../modules/es6.typed.array-buffer'); +require('../../modules/es6.typed.data-view'); +require('../../modules/es6.typed.int8-array'); +require('../../modules/es6.typed.uint8-array'); +require('../../modules/es6.typed.uint8-clamped-array'); +require('../../modules/es6.typed.int16-array'); +require('../../modules/es6.typed.uint16-array'); +require('../../modules/es6.typed.int32-array'); +require('../../modules/es6.typed.uint32-array'); +require('../../modules/es6.typed.float32-array'); +require('../../modules/es6.typed.float64-array'); +require('../../modules/es6.object.to-string'); +module.exports = require('../../modules/_core'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/typed/int16-array.js b/pitfall/pdfkit/node_modules/core-js/fn/typed/int16-array.js new file mode 100644 index 00000000..0722549d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/typed/int16-array.js @@ -0,0 +1,2 @@ +require('../../modules/es6.typed.int16-array'); +module.exports = require('../../modules/_core').Int16Array; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/typed/int32-array.js b/pitfall/pdfkit/node_modules/core-js/fn/typed/int32-array.js new file mode 100644 index 00000000..13613622 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/typed/int32-array.js @@ -0,0 +1,2 @@ +require('../../modules/es6.typed.int32-array'); +module.exports = require('../../modules/_core').Int32Array; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/typed/int8-array.js b/pitfall/pdfkit/node_modules/core-js/fn/typed/int8-array.js new file mode 100644 index 00000000..edf48c79 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/typed/int8-array.js @@ -0,0 +1,2 @@ +require('../../modules/es6.typed.int8-array'); +module.exports = require('../../modules/_core').Int8Array; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/typed/uint16-array.js b/pitfall/pdfkit/node_modules/core-js/fn/typed/uint16-array.js new file mode 100644 index 00000000..3ff11550 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/typed/uint16-array.js @@ -0,0 +1,2 @@ +require('../../modules/es6.typed.uint16-array'); +module.exports = require('../../modules/_core').Uint16Array; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/typed/uint32-array.js b/pitfall/pdfkit/node_modules/core-js/fn/typed/uint32-array.js new file mode 100644 index 00000000..47bb4c21 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/typed/uint32-array.js @@ -0,0 +1,2 @@ +require('../../modules/es6.typed.uint32-array'); +module.exports = require('../../modules/_core').Uint32Array; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/typed/uint8-array.js b/pitfall/pdfkit/node_modules/core-js/fn/typed/uint8-array.js new file mode 100644 index 00000000..fd8a4b11 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/typed/uint8-array.js @@ -0,0 +1,2 @@ +require('../../modules/es6.typed.uint8-array'); +module.exports = require('../../modules/_core').Uint8Array; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/typed/uint8-clamped-array.js b/pitfall/pdfkit/node_modules/core-js/fn/typed/uint8-clamped-array.js new file mode 100644 index 00000000..c688657c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/typed/uint8-clamped-array.js @@ -0,0 +1,2 @@ +require('../../modules/es6.typed.uint8-clamped-array'); +module.exports = require('../../modules/_core').Uint8ClampedArray; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/weak-map.js b/pitfall/pdfkit/node_modules/core-js/fn/weak-map.js new file mode 100644 index 00000000..00cac1ad --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/weak-map.js @@ -0,0 +1,4 @@ +require('../modules/es6.object.to-string'); +require('../modules/web.dom.iterable'); +require('../modules/es6.weak-map'); +module.exports = require('../modules/_core').WeakMap; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/fn/weak-set.js b/pitfall/pdfkit/node_modules/core-js/fn/weak-set.js new file mode 100644 index 00000000..eef1af2a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/fn/weak-set.js @@ -0,0 +1,4 @@ +require('../modules/es6.object.to-string'); +require('../modules/web.dom.iterable'); +require('../modules/es6.weak-set'); +module.exports = require('../modules/_core').WeakSet; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/index.js b/pitfall/pdfkit/node_modules/core-js/index.js new file mode 100644 index 00000000..78b9e3d4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/index.js @@ -0,0 +1,16 @@ +require('./shim'); +require('./modules/core.dict'); +require('./modules/core.get-iterator-method'); +require('./modules/core.get-iterator'); +require('./modules/core.is-iterable'); +require('./modules/core.delay'); +require('./modules/core.function.part'); +require('./modules/core.object.is-object'); +require('./modules/core.object.classof'); +require('./modules/core.object.define'); +require('./modules/core.object.make'); +require('./modules/core.number.iterator'); +require('./modules/core.regexp.escape'); +require('./modules/core.string.escape-html'); +require('./modules/core.string.unescape-html'); +module.exports = require('./modules/_core'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/core/_.js b/pitfall/pdfkit/node_modules/core-js/library/core/_.js new file mode 100644 index 00000000..8a99f706 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/core/_.js @@ -0,0 +1,2 @@ +require('../modules/core.function.part'); +module.exports = require('../modules/_core')._; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/core/delay.js b/pitfall/pdfkit/node_modules/core-js/library/core/delay.js new file mode 100644 index 00000000..18857388 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/core/delay.js @@ -0,0 +1,2 @@ +require('../modules/core.delay'); +module.exports = require('../modules/_core').delay; diff --git a/pitfall/pdfkit/node_modules/core-js/library/core/dict.js b/pitfall/pdfkit/node_modules/core-js/library/core/dict.js new file mode 100644 index 00000000..da84a8d8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/core/dict.js @@ -0,0 +1,2 @@ +require('../modules/core.dict'); +module.exports = require('../modules/_core').Dict; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/core/function.js b/pitfall/pdfkit/node_modules/core-js/library/core/function.js new file mode 100644 index 00000000..3b8d0131 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/core/function.js @@ -0,0 +1,2 @@ +require('../modules/core.function.part'); +module.exports = require('../modules/_core').Function; diff --git a/pitfall/pdfkit/node_modules/core-js/library/core/index.js b/pitfall/pdfkit/node_modules/core-js/library/core/index.js new file mode 100644 index 00000000..2b20fd9e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/core/index.js @@ -0,0 +1,15 @@ +require('../modules/core.dict'); +require('../modules/core.get-iterator-method'); +require('../modules/core.get-iterator'); +require('../modules/core.is-iterable'); +require('../modules/core.delay'); +require('../modules/core.function.part'); +require('../modules/core.object.is-object'); +require('../modules/core.object.classof'); +require('../modules/core.object.define'); +require('../modules/core.object.make'); +require('../modules/core.number.iterator'); +require('../modules/core.regexp.escape'); +require('../modules/core.string.escape-html'); +require('../modules/core.string.unescape-html'); +module.exports = require('../modules/_core'); diff --git a/pitfall/pdfkit/node_modules/core-js/library/core/number.js b/pitfall/pdfkit/node_modules/core-js/library/core/number.js new file mode 100644 index 00000000..62f632c5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/core/number.js @@ -0,0 +1,2 @@ +require('../modules/core.number.iterator'); +module.exports = require('../modules/_core').Number; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/core/object.js b/pitfall/pdfkit/node_modules/core-js/library/core/object.js new file mode 100644 index 00000000..04e539c9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/core/object.js @@ -0,0 +1,5 @@ +require('../modules/core.object.is-object'); +require('../modules/core.object.classof'); +require('../modules/core.object.define'); +require('../modules/core.object.make'); +module.exports = require('../modules/_core').Object; diff --git a/pitfall/pdfkit/node_modules/core-js/library/core/regexp.js b/pitfall/pdfkit/node_modules/core-js/library/core/regexp.js new file mode 100644 index 00000000..3e04c511 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/core/regexp.js @@ -0,0 +1,2 @@ +require('../modules/core.regexp.escape'); +module.exports = require('../modules/_core').RegExp; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/core/string.js b/pitfall/pdfkit/node_modules/core-js/library/core/string.js new file mode 100644 index 00000000..8da740c6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/core/string.js @@ -0,0 +1,3 @@ +require('../modules/core.string.escape-html'); +require('../modules/core.string.unescape-html'); +module.exports = require('../modules/_core').String; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/es5/index.js b/pitfall/pdfkit/node_modules/core-js/library/es5/index.js new file mode 100644 index 00000000..580f1a67 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/es5/index.js @@ -0,0 +1,37 @@ +require('../modules/es6.object.create'); +require('../modules/es6.object.define-property'); +require('../modules/es6.object.define-properties'); +require('../modules/es6.object.get-own-property-descriptor'); +require('../modules/es6.object.get-prototype-of'); +require('../modules/es6.object.keys'); +require('../modules/es6.object.get-own-property-names'); +require('../modules/es6.object.freeze'); +require('../modules/es6.object.seal'); +require('../modules/es6.object.prevent-extensions'); +require('../modules/es6.object.is-frozen'); +require('../modules/es6.object.is-sealed'); +require('../modules/es6.object.is-extensible'); +require('../modules/es6.function.bind'); +require('../modules/es6.array.is-array'); +require('../modules/es6.array.join'); +require('../modules/es6.array.slice'); +require('../modules/es6.array.sort'); +require('../modules/es6.array.for-each'); +require('../modules/es6.array.map'); +require('../modules/es6.array.filter'); +require('../modules/es6.array.some'); +require('../modules/es6.array.every'); +require('../modules/es6.array.reduce'); +require('../modules/es6.array.reduce-right'); +require('../modules/es6.array.index-of'); +require('../modules/es6.array.last-index-of'); +require('../modules/es6.number.to-fixed'); +require('../modules/es6.number.to-precision'); +require('../modules/es6.date.now'); +require('../modules/es6.date.to-iso-string'); +require('../modules/es6.date.to-json'); +require('../modules/es6.parse-int'); +require('../modules/es6.parse-float'); +require('../modules/es6.string.trim'); +require('../modules/es6.regexp.to-string'); +module.exports = require('../modules/_core'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/es6/array.js b/pitfall/pdfkit/node_modules/core-js/library/es6/array.js new file mode 100644 index 00000000..428d3e8c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/es6/array.js @@ -0,0 +1,23 @@ +require('../modules/es6.string.iterator'); +require('../modules/es6.array.is-array'); +require('../modules/es6.array.from'); +require('../modules/es6.array.of'); +require('../modules/es6.array.join'); +require('../modules/es6.array.slice'); +require('../modules/es6.array.sort'); +require('../modules/es6.array.for-each'); +require('../modules/es6.array.map'); +require('../modules/es6.array.filter'); +require('../modules/es6.array.some'); +require('../modules/es6.array.every'); +require('../modules/es6.array.reduce'); +require('../modules/es6.array.reduce-right'); +require('../modules/es6.array.index-of'); +require('../modules/es6.array.last-index-of'); +require('../modules/es6.array.copy-within'); +require('../modules/es6.array.fill'); +require('../modules/es6.array.find'); +require('../modules/es6.array.find-index'); +require('../modules/es6.array.species'); +require('../modules/es6.array.iterator'); +module.exports = require('../modules/_core').Array; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/es6/date.js b/pitfall/pdfkit/node_modules/core-js/library/es6/date.js new file mode 100644 index 00000000..dfa3be09 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/es6/date.js @@ -0,0 +1,6 @@ +require('../modules/es6.date.now'); +require('../modules/es6.date.to-json'); +require('../modules/es6.date.to-iso-string'); +require('../modules/es6.date.to-string'); +require('../modules/es6.date.to-primitive'); +module.exports = Date; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/es6/function.js b/pitfall/pdfkit/node_modules/core-js/library/es6/function.js new file mode 100644 index 00000000..ff685da2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/es6/function.js @@ -0,0 +1,4 @@ +require('../modules/es6.function.bind'); +require('../modules/es6.function.name'); +require('../modules/es6.function.has-instance'); +module.exports = require('../modules/_core').Function; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/es6/index.js b/pitfall/pdfkit/node_modules/core-js/library/es6/index.js new file mode 100644 index 00000000..59df5092 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/es6/index.js @@ -0,0 +1,138 @@ +require('../modules/es6.symbol'); +require('../modules/es6.object.create'); +require('../modules/es6.object.define-property'); +require('../modules/es6.object.define-properties'); +require('../modules/es6.object.get-own-property-descriptor'); +require('../modules/es6.object.get-prototype-of'); +require('../modules/es6.object.keys'); +require('../modules/es6.object.get-own-property-names'); +require('../modules/es6.object.freeze'); +require('../modules/es6.object.seal'); +require('../modules/es6.object.prevent-extensions'); +require('../modules/es6.object.is-frozen'); +require('../modules/es6.object.is-sealed'); +require('../modules/es6.object.is-extensible'); +require('../modules/es6.object.assign'); +require('../modules/es6.object.is'); +require('../modules/es6.object.set-prototype-of'); +require('../modules/es6.object.to-string'); +require('../modules/es6.function.bind'); +require('../modules/es6.function.name'); +require('../modules/es6.function.has-instance'); +require('../modules/es6.parse-int'); +require('../modules/es6.parse-float'); +require('../modules/es6.number.constructor'); +require('../modules/es6.number.to-fixed'); +require('../modules/es6.number.to-precision'); +require('../modules/es6.number.epsilon'); +require('../modules/es6.number.is-finite'); +require('../modules/es6.number.is-integer'); +require('../modules/es6.number.is-nan'); +require('../modules/es6.number.is-safe-integer'); +require('../modules/es6.number.max-safe-integer'); +require('../modules/es6.number.min-safe-integer'); +require('../modules/es6.number.parse-float'); +require('../modules/es6.number.parse-int'); +require('../modules/es6.math.acosh'); +require('../modules/es6.math.asinh'); +require('../modules/es6.math.atanh'); +require('../modules/es6.math.cbrt'); +require('../modules/es6.math.clz32'); +require('../modules/es6.math.cosh'); +require('../modules/es6.math.expm1'); +require('../modules/es6.math.fround'); +require('../modules/es6.math.hypot'); +require('../modules/es6.math.imul'); +require('../modules/es6.math.log10'); +require('../modules/es6.math.log1p'); +require('../modules/es6.math.log2'); +require('../modules/es6.math.sign'); +require('../modules/es6.math.sinh'); +require('../modules/es6.math.tanh'); +require('../modules/es6.math.trunc'); +require('../modules/es6.string.from-code-point'); +require('../modules/es6.string.raw'); +require('../modules/es6.string.trim'); +require('../modules/es6.string.iterator'); +require('../modules/es6.string.code-point-at'); +require('../modules/es6.string.ends-with'); +require('../modules/es6.string.includes'); +require('../modules/es6.string.repeat'); +require('../modules/es6.string.starts-with'); +require('../modules/es6.string.anchor'); +require('../modules/es6.string.big'); +require('../modules/es6.string.blink'); +require('../modules/es6.string.bold'); +require('../modules/es6.string.fixed'); +require('../modules/es6.string.fontcolor'); +require('../modules/es6.string.fontsize'); +require('../modules/es6.string.italics'); +require('../modules/es6.string.link'); +require('../modules/es6.string.small'); +require('../modules/es6.string.strike'); +require('../modules/es6.string.sub'); +require('../modules/es6.string.sup'); +require('../modules/es6.date.now'); +require('../modules/es6.date.to-json'); +require('../modules/es6.date.to-iso-string'); +require('../modules/es6.date.to-string'); +require('../modules/es6.date.to-primitive'); +require('../modules/es6.array.is-array'); +require('../modules/es6.array.from'); +require('../modules/es6.array.of'); +require('../modules/es6.array.join'); +require('../modules/es6.array.slice'); +require('../modules/es6.array.sort'); +require('../modules/es6.array.for-each'); +require('../modules/es6.array.map'); +require('../modules/es6.array.filter'); +require('../modules/es6.array.some'); +require('../modules/es6.array.every'); +require('../modules/es6.array.reduce'); +require('../modules/es6.array.reduce-right'); +require('../modules/es6.array.index-of'); +require('../modules/es6.array.last-index-of'); +require('../modules/es6.array.copy-within'); +require('../modules/es6.array.fill'); +require('../modules/es6.array.find'); +require('../modules/es6.array.find-index'); +require('../modules/es6.array.species'); +require('../modules/es6.array.iterator'); +require('../modules/es6.regexp.constructor'); +require('../modules/es6.regexp.to-string'); +require('../modules/es6.regexp.flags'); +require('../modules/es6.regexp.match'); +require('../modules/es6.regexp.replace'); +require('../modules/es6.regexp.search'); +require('../modules/es6.regexp.split'); +require('../modules/es6.promise'); +require('../modules/es6.map'); +require('../modules/es6.set'); +require('../modules/es6.weak-map'); +require('../modules/es6.weak-set'); +require('../modules/es6.typed.array-buffer'); +require('../modules/es6.typed.data-view'); +require('../modules/es6.typed.int8-array'); +require('../modules/es6.typed.uint8-array'); +require('../modules/es6.typed.uint8-clamped-array'); +require('../modules/es6.typed.int16-array'); +require('../modules/es6.typed.uint16-array'); +require('../modules/es6.typed.int32-array'); +require('../modules/es6.typed.uint32-array'); +require('../modules/es6.typed.float32-array'); +require('../modules/es6.typed.float64-array'); +require('../modules/es6.reflect.apply'); +require('../modules/es6.reflect.construct'); +require('../modules/es6.reflect.define-property'); +require('../modules/es6.reflect.delete-property'); +require('../modules/es6.reflect.enumerate'); +require('../modules/es6.reflect.get'); +require('../modules/es6.reflect.get-own-property-descriptor'); +require('../modules/es6.reflect.get-prototype-of'); +require('../modules/es6.reflect.has'); +require('../modules/es6.reflect.is-extensible'); +require('../modules/es6.reflect.own-keys'); +require('../modules/es6.reflect.prevent-extensions'); +require('../modules/es6.reflect.set'); +require('../modules/es6.reflect.set-prototype-of'); +module.exports = require('../modules/_core'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/es6/map.js b/pitfall/pdfkit/node_modules/core-js/library/es6/map.js new file mode 100644 index 00000000..50f04c1f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/es6/map.js @@ -0,0 +1,5 @@ +require('../modules/es6.object.to-string'); +require('../modules/es6.string.iterator'); +require('../modules/web.dom.iterable'); +require('../modules/es6.map'); +module.exports = require('../modules/_core').Map; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/es6/math.js b/pitfall/pdfkit/node_modules/core-js/library/es6/math.js new file mode 100644 index 00000000..f26b5b29 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/es6/math.js @@ -0,0 +1,18 @@ +require('../modules/es6.math.acosh'); +require('../modules/es6.math.asinh'); +require('../modules/es6.math.atanh'); +require('../modules/es6.math.cbrt'); +require('../modules/es6.math.clz32'); +require('../modules/es6.math.cosh'); +require('../modules/es6.math.expm1'); +require('../modules/es6.math.fround'); +require('../modules/es6.math.hypot'); +require('../modules/es6.math.imul'); +require('../modules/es6.math.log10'); +require('../modules/es6.math.log1p'); +require('../modules/es6.math.log2'); +require('../modules/es6.math.sign'); +require('../modules/es6.math.sinh'); +require('../modules/es6.math.tanh'); +require('../modules/es6.math.trunc'); +module.exports = require('../modules/_core').Math; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/es6/number.js b/pitfall/pdfkit/node_modules/core-js/library/es6/number.js new file mode 100644 index 00000000..1dafcda4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/es6/number.js @@ -0,0 +1,13 @@ +require('../modules/es6.number.constructor'); +require('../modules/es6.number.to-fixed'); +require('../modules/es6.number.to-precision'); +require('../modules/es6.number.epsilon'); +require('../modules/es6.number.is-finite'); +require('../modules/es6.number.is-integer'); +require('../modules/es6.number.is-nan'); +require('../modules/es6.number.is-safe-integer'); +require('../modules/es6.number.max-safe-integer'); +require('../modules/es6.number.min-safe-integer'); +require('../modules/es6.number.parse-float'); +require('../modules/es6.number.parse-int'); +module.exports = require('../modules/_core').Number; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/es6/object.js b/pitfall/pdfkit/node_modules/core-js/library/es6/object.js new file mode 100644 index 00000000..aada8c38 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/es6/object.js @@ -0,0 +1,20 @@ +require('../modules/es6.symbol'); +require('../modules/es6.object.create'); +require('../modules/es6.object.define-property'); +require('../modules/es6.object.define-properties'); +require('../modules/es6.object.get-own-property-descriptor'); +require('../modules/es6.object.get-prototype-of'); +require('../modules/es6.object.keys'); +require('../modules/es6.object.get-own-property-names'); +require('../modules/es6.object.freeze'); +require('../modules/es6.object.seal'); +require('../modules/es6.object.prevent-extensions'); +require('../modules/es6.object.is-frozen'); +require('../modules/es6.object.is-sealed'); +require('../modules/es6.object.is-extensible'); +require('../modules/es6.object.assign'); +require('../modules/es6.object.is'); +require('../modules/es6.object.set-prototype-of'); +require('../modules/es6.object.to-string'); + +module.exports = require('../modules/_core').Object; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/es6/parse-float.js b/pitfall/pdfkit/node_modules/core-js/library/es6/parse-float.js new file mode 100644 index 00000000..dad94ddb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/es6/parse-float.js @@ -0,0 +1,2 @@ +require('../modules/es6.parse-float'); +module.exports = require('../modules/_core').parseFloat; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/es6/parse-int.js b/pitfall/pdfkit/node_modules/core-js/library/es6/parse-int.js new file mode 100644 index 00000000..08a20996 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/es6/parse-int.js @@ -0,0 +1,2 @@ +require('../modules/es6.parse-int'); +module.exports = require('../modules/_core').parseInt; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/es6/promise.js b/pitfall/pdfkit/node_modules/core-js/library/es6/promise.js new file mode 100644 index 00000000..c901c859 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/es6/promise.js @@ -0,0 +1,5 @@ +require('../modules/es6.object.to-string'); +require('../modules/es6.string.iterator'); +require('../modules/web.dom.iterable'); +require('../modules/es6.promise'); +module.exports = require('../modules/_core').Promise; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/es6/reflect.js b/pitfall/pdfkit/node_modules/core-js/library/es6/reflect.js new file mode 100644 index 00000000..18bdb3c2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/es6/reflect.js @@ -0,0 +1,15 @@ +require('../modules/es6.reflect.apply'); +require('../modules/es6.reflect.construct'); +require('../modules/es6.reflect.define-property'); +require('../modules/es6.reflect.delete-property'); +require('../modules/es6.reflect.enumerate'); +require('../modules/es6.reflect.get'); +require('../modules/es6.reflect.get-own-property-descriptor'); +require('../modules/es6.reflect.get-prototype-of'); +require('../modules/es6.reflect.has'); +require('../modules/es6.reflect.is-extensible'); +require('../modules/es6.reflect.own-keys'); +require('../modules/es6.reflect.prevent-extensions'); +require('../modules/es6.reflect.set'); +require('../modules/es6.reflect.set-prototype-of'); +module.exports = require('../modules/_core').Reflect; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/es6/regexp.js b/pitfall/pdfkit/node_modules/core-js/library/es6/regexp.js new file mode 100644 index 00000000..27cc827f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/es6/regexp.js @@ -0,0 +1,8 @@ +require('../modules/es6.regexp.constructor'); +require('../modules/es6.regexp.to-string'); +require('../modules/es6.regexp.flags'); +require('../modules/es6.regexp.match'); +require('../modules/es6.regexp.replace'); +require('../modules/es6.regexp.search'); +require('../modules/es6.regexp.split'); +module.exports = require('../modules/_core').RegExp; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/es6/set.js b/pitfall/pdfkit/node_modules/core-js/library/es6/set.js new file mode 100644 index 00000000..2a2557ce --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/es6/set.js @@ -0,0 +1,5 @@ +require('../modules/es6.object.to-string'); +require('../modules/es6.string.iterator'); +require('../modules/web.dom.iterable'); +require('../modules/es6.set'); +module.exports = require('../modules/_core').Set; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/es6/string.js b/pitfall/pdfkit/node_modules/core-js/library/es6/string.js new file mode 100644 index 00000000..83033621 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/es6/string.js @@ -0,0 +1,27 @@ +require('../modules/es6.string.from-code-point'); +require('../modules/es6.string.raw'); +require('../modules/es6.string.trim'); +require('../modules/es6.string.iterator'); +require('../modules/es6.string.code-point-at'); +require('../modules/es6.string.ends-with'); +require('../modules/es6.string.includes'); +require('../modules/es6.string.repeat'); +require('../modules/es6.string.starts-with'); +require('../modules/es6.string.anchor'); +require('../modules/es6.string.big'); +require('../modules/es6.string.blink'); +require('../modules/es6.string.bold'); +require('../modules/es6.string.fixed'); +require('../modules/es6.string.fontcolor'); +require('../modules/es6.string.fontsize'); +require('../modules/es6.string.italics'); +require('../modules/es6.string.link'); +require('../modules/es6.string.small'); +require('../modules/es6.string.strike'); +require('../modules/es6.string.sub'); +require('../modules/es6.string.sup'); +require('../modules/es6.regexp.match'); +require('../modules/es6.regexp.replace'); +require('../modules/es6.regexp.search'); +require('../modules/es6.regexp.split'); +module.exports = require('../modules/_core').String; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/es6/symbol.js b/pitfall/pdfkit/node_modules/core-js/library/es6/symbol.js new file mode 100644 index 00000000..e578e3af --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/es6/symbol.js @@ -0,0 +1,3 @@ +require('../modules/es6.symbol'); +require('../modules/es6.object.to-string'); +module.exports = require('../modules/_core').Symbol; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/es6/typed.js b/pitfall/pdfkit/node_modules/core-js/library/es6/typed.js new file mode 100644 index 00000000..e0364e6c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/es6/typed.js @@ -0,0 +1,13 @@ +require('../modules/es6.typed.array-buffer'); +require('../modules/es6.typed.data-view'); +require('../modules/es6.typed.int8-array'); +require('../modules/es6.typed.uint8-array'); +require('../modules/es6.typed.uint8-clamped-array'); +require('../modules/es6.typed.int16-array'); +require('../modules/es6.typed.uint16-array'); +require('../modules/es6.typed.int32-array'); +require('../modules/es6.typed.uint32-array'); +require('../modules/es6.typed.float32-array'); +require('../modules/es6.typed.float64-array'); +require('../modules/es6.object.to-string'); +module.exports = require('../modules/_core'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/es6/weak-map.js b/pitfall/pdfkit/node_modules/core-js/library/es6/weak-map.js new file mode 100644 index 00000000..655866c2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/es6/weak-map.js @@ -0,0 +1,4 @@ +require('../modules/es6.object.to-string'); +require('../modules/es6.array.iterator'); +require('../modules/es6.weak-map'); +module.exports = require('../modules/_core').WeakMap; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/es6/weak-set.js b/pitfall/pdfkit/node_modules/core-js/library/es6/weak-set.js new file mode 100644 index 00000000..eef1af2a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/es6/weak-set.js @@ -0,0 +1,4 @@ +require('../modules/es6.object.to-string'); +require('../modules/web.dom.iterable'); +require('../modules/es6.weak-set'); +module.exports = require('../modules/_core').WeakSet; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/es7/array.js b/pitfall/pdfkit/node_modules/core-js/library/es7/array.js new file mode 100644 index 00000000..9fb57fa6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/es7/array.js @@ -0,0 +1,2 @@ +require('../modules/es7.array.includes'); +module.exports = require('../modules/_core').Array; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/es7/asap.js b/pitfall/pdfkit/node_modules/core-js/library/es7/asap.js new file mode 100644 index 00000000..cc90f7e5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/es7/asap.js @@ -0,0 +1,2 @@ +require('../modules/es7.asap'); +module.exports = require('../modules/_core').asap; diff --git a/pitfall/pdfkit/node_modules/core-js/library/es7/error.js b/pitfall/pdfkit/node_modules/core-js/library/es7/error.js new file mode 100644 index 00000000..f0bb260b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/es7/error.js @@ -0,0 +1,2 @@ +require('../modules/es7.error.is-error'); +module.exports = require('../modules/_core').Error; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/es7/index.js b/pitfall/pdfkit/node_modules/core-js/library/es7/index.js new file mode 100644 index 00000000..b8c90b86 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/es7/index.js @@ -0,0 +1,36 @@ +require('../modules/es7.array.includes'); +require('../modules/es7.string.at'); +require('../modules/es7.string.pad-start'); +require('../modules/es7.string.pad-end'); +require('../modules/es7.string.trim-left'); +require('../modules/es7.string.trim-right'); +require('../modules/es7.string.match-all'); +require('../modules/es7.symbol.async-iterator'); +require('../modules/es7.symbol.observable'); +require('../modules/es7.object.get-own-property-descriptors'); +require('../modules/es7.object.values'); +require('../modules/es7.object.entries'); +require('../modules/es7.object.define-getter'); +require('../modules/es7.object.define-setter'); +require('../modules/es7.object.lookup-getter'); +require('../modules/es7.object.lookup-setter'); +require('../modules/es7.map.to-json'); +require('../modules/es7.set.to-json'); +require('../modules/es7.system.global'); +require('../modules/es7.error.is-error'); +require('../modules/es7.math.iaddh'); +require('../modules/es7.math.isubh'); +require('../modules/es7.math.imulh'); +require('../modules/es7.math.umulh'); +require('../modules/es7.reflect.define-metadata'); +require('../modules/es7.reflect.delete-metadata'); +require('../modules/es7.reflect.get-metadata'); +require('../modules/es7.reflect.get-metadata-keys'); +require('../modules/es7.reflect.get-own-metadata'); +require('../modules/es7.reflect.get-own-metadata-keys'); +require('../modules/es7.reflect.has-metadata'); +require('../modules/es7.reflect.has-own-metadata'); +require('../modules/es7.reflect.metadata'); +require('../modules/es7.asap'); +require('../modules/es7.observable'); +module.exports = require('../modules/_core'); diff --git a/pitfall/pdfkit/node_modules/core-js/library/es7/map.js b/pitfall/pdfkit/node_modules/core-js/library/es7/map.js new file mode 100644 index 00000000..dfa32fd2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/es7/map.js @@ -0,0 +1,2 @@ +require('../modules/es7.map.to-json'); +module.exports = require('../modules/_core').Map; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/es7/math.js b/pitfall/pdfkit/node_modules/core-js/library/es7/math.js new file mode 100644 index 00000000..bdb8a81c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/es7/math.js @@ -0,0 +1,5 @@ +require('../modules/es7.math.iaddh'); +require('../modules/es7.math.isubh'); +require('../modules/es7.math.imulh'); +require('../modules/es7.math.umulh'); +module.exports = require('../modules/_core').Math; diff --git a/pitfall/pdfkit/node_modules/core-js/library/es7/object.js b/pitfall/pdfkit/node_modules/core-js/library/es7/object.js new file mode 100644 index 00000000..c76b754d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/es7/object.js @@ -0,0 +1,8 @@ +require('../modules/es7.object.get-own-property-descriptors'); +require('../modules/es7.object.values'); +require('../modules/es7.object.entries'); +require('../modules/es7.object.define-getter'); +require('../modules/es7.object.define-setter'); +require('../modules/es7.object.lookup-getter'); +require('../modules/es7.object.lookup-setter'); +module.exports = require('../modules/_core').Object; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/es7/observable.js b/pitfall/pdfkit/node_modules/core-js/library/es7/observable.js new file mode 100644 index 00000000..05ca51a3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/es7/observable.js @@ -0,0 +1,7 @@ +require('../modules/es6.object.to-string'); +require('../modules/es6.string.iterator'); +require('../modules/web.dom.iterable'); +require('../modules/es6.promise'); +require('../modules/es7.symbol.observable'); +require('../modules/es7.observable'); +module.exports = require('../modules/_core').Observable; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/es7/reflect.js b/pitfall/pdfkit/node_modules/core-js/library/es7/reflect.js new file mode 100644 index 00000000..f0b69cbb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/es7/reflect.js @@ -0,0 +1,10 @@ +require('../modules/es7.reflect.define-metadata'); +require('../modules/es7.reflect.delete-metadata'); +require('../modules/es7.reflect.get-metadata'); +require('../modules/es7.reflect.get-metadata-keys'); +require('../modules/es7.reflect.get-own-metadata'); +require('../modules/es7.reflect.get-own-metadata-keys'); +require('../modules/es7.reflect.has-metadata'); +require('../modules/es7.reflect.has-own-metadata'); +require('../modules/es7.reflect.metadata'); +module.exports = require('../modules/_core').Reflect; diff --git a/pitfall/pdfkit/node_modules/core-js/library/es7/set.js b/pitfall/pdfkit/node_modules/core-js/library/es7/set.js new file mode 100644 index 00000000..b5c19c44 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/es7/set.js @@ -0,0 +1,2 @@ +require('../modules/es7.set.to-json'); +module.exports = require('../modules/_core').Set; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/es7/string.js b/pitfall/pdfkit/node_modules/core-js/library/es7/string.js new file mode 100644 index 00000000..6e413b4c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/es7/string.js @@ -0,0 +1,7 @@ +require('../modules/es7.string.at'); +require('../modules/es7.string.pad-start'); +require('../modules/es7.string.pad-end'); +require('../modules/es7.string.trim-left'); +require('../modules/es7.string.trim-right'); +require('../modules/es7.string.match-all'); +module.exports = require('../modules/_core').String; diff --git a/pitfall/pdfkit/node_modules/core-js/library/es7/symbol.js b/pitfall/pdfkit/node_modules/core-js/library/es7/symbol.js new file mode 100644 index 00000000..14d90eec --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/es7/symbol.js @@ -0,0 +1,3 @@ +require('../modules/es7.symbol.async-iterator'); +require('../modules/es7.symbol.observable'); +module.exports = require('../modules/_core').Symbol; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/es7/system.js b/pitfall/pdfkit/node_modules/core-js/library/es7/system.js new file mode 100644 index 00000000..6d321c78 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/es7/system.js @@ -0,0 +1,2 @@ +require('../modules/es7.system.global'); +module.exports = require('../modules/_core').System; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/_.js b/pitfall/pdfkit/node_modules/core-js/library/fn/_.js new file mode 100644 index 00000000..8a99f706 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/_.js @@ -0,0 +1,2 @@ +require('../modules/core.function.part'); +module.exports = require('../modules/_core')._; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/concat.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/concat.js new file mode 100644 index 00000000..de4bddf9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/concat.js @@ -0,0 +1,4 @@ +// for a legacy code and future fixes +module.exports = function(){ + return Function.call.apply(Array.prototype.concat, arguments); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/copy-within.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/copy-within.js new file mode 100644 index 00000000..89e1de4f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/copy-within.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.copy-within'); +module.exports = require('../../modules/_core').Array.copyWithin; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/entries.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/entries.js new file mode 100644 index 00000000..f4feb26c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/entries.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.iterator'); +module.exports = require('../../modules/_core').Array.entries; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/every.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/every.js new file mode 100644 index 00000000..168844cc --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/every.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.every'); +module.exports = require('../../modules/_core').Array.every; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/fill.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/fill.js new file mode 100644 index 00000000..b23ebfde --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/fill.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.fill'); +module.exports = require('../../modules/_core').Array.fill; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/filter.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/filter.js new file mode 100644 index 00000000..0023f0de --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/filter.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.filter'); +module.exports = require('../../modules/_core').Array.filter; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/find-index.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/find-index.js new file mode 100644 index 00000000..99e6bf17 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/find-index.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.find-index'); +module.exports = require('../../modules/_core').Array.findIndex; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/find.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/find.js new file mode 100644 index 00000000..f146ec22 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/find.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.find'); +module.exports = require('../../modules/_core').Array.find; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/for-each.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/for-each.js new file mode 100644 index 00000000..09e235f9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/for-each.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.for-each'); +module.exports = require('../../modules/_core').Array.forEach; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/from.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/from.js new file mode 100644 index 00000000..1f323fbc --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/from.js @@ -0,0 +1,3 @@ +require('../../modules/es6.string.iterator'); +require('../../modules/es6.array.from'); +module.exports = require('../../modules/_core').Array.from; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/includes.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/includes.js new file mode 100644 index 00000000..851d31fd --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/includes.js @@ -0,0 +1,2 @@ +require('../../modules/es7.array.includes'); +module.exports = require('../../modules/_core').Array.includes; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/index-of.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/index-of.js new file mode 100644 index 00000000..9ed82472 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/index-of.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.index-of'); +module.exports = require('../../modules/_core').Array.indexOf; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/index.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/index.js new file mode 100644 index 00000000..85bc77bc --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/index.js @@ -0,0 +1,24 @@ +require('../../modules/es6.string.iterator'); +require('../../modules/es6.array.is-array'); +require('../../modules/es6.array.from'); +require('../../modules/es6.array.of'); +require('../../modules/es6.array.join'); +require('../../modules/es6.array.slice'); +require('../../modules/es6.array.sort'); +require('../../modules/es6.array.for-each'); +require('../../modules/es6.array.map'); +require('../../modules/es6.array.filter'); +require('../../modules/es6.array.some'); +require('../../modules/es6.array.every'); +require('../../modules/es6.array.reduce'); +require('../../modules/es6.array.reduce-right'); +require('../../modules/es6.array.index-of'); +require('../../modules/es6.array.last-index-of'); +require('../../modules/es6.array.copy-within'); +require('../../modules/es6.array.fill'); +require('../../modules/es6.array.find'); +require('../../modules/es6.array.find-index'); +require('../../modules/es6.array.species'); +require('../../modules/es6.array.iterator'); +require('../../modules/es7.array.includes'); +module.exports = require('../../modules/_core').Array; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/is-array.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/is-array.js new file mode 100644 index 00000000..bbe76719 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/is-array.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.is-array'); +module.exports = require('../../modules/_core').Array.isArray; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/iterator.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/iterator.js new file mode 100644 index 00000000..ca93b78a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/iterator.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.iterator'); +module.exports = require('../../modules/_core').Array.values; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/join.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/join.js new file mode 100644 index 00000000..9beef18d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/join.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.join'); +module.exports = require('../../modules/_core').Array.join; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/keys.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/keys.js new file mode 100644 index 00000000..b44b921f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/keys.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.iterator'); +module.exports = require('../../modules/_core').Array.keys; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/last-index-of.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/last-index-of.js new file mode 100644 index 00000000..6dcc98a1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/last-index-of.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.last-index-of'); +module.exports = require('../../modules/_core').Array.lastIndexOf; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/map.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/map.js new file mode 100644 index 00000000..14b0f627 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/map.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.map'); +module.exports = require('../../modules/_core').Array.map; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/of.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/of.js new file mode 100644 index 00000000..652ee980 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/of.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.of'); +module.exports = require('../../modules/_core').Array.of; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/pop.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/pop.js new file mode 100644 index 00000000..b8414f61 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/pop.js @@ -0,0 +1,4 @@ +// for a legacy code and future fixes +module.exports = function(){ + return Function.call.apply(Array.prototype.pop, arguments); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/push.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/push.js new file mode 100644 index 00000000..03539009 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/push.js @@ -0,0 +1,4 @@ +// for a legacy code and future fixes +module.exports = function(){ + return Function.call.apply(Array.prototype.push, arguments); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/reduce-right.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/reduce-right.js new file mode 100644 index 00000000..1193ecba --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/reduce-right.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.reduce-right'); +module.exports = require('../../modules/_core').Array.reduceRight; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/reduce.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/reduce.js new file mode 100644 index 00000000..e2dee913 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/reduce.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.reduce'); +module.exports = require('../../modules/_core').Array.reduce; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/reverse.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/reverse.js new file mode 100644 index 00000000..60734293 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/reverse.js @@ -0,0 +1,4 @@ +// for a legacy code and future fixes +module.exports = function(){ + return Function.call.apply(Array.prototype.reverse, arguments); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/shift.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/shift.js new file mode 100644 index 00000000..5002a606 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/shift.js @@ -0,0 +1,4 @@ +// for a legacy code and future fixes +module.exports = function(){ + return Function.call.apply(Array.prototype.shift, arguments); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/slice.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/slice.js new file mode 100644 index 00000000..4914c2a9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/slice.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.slice'); +module.exports = require('../../modules/_core').Array.slice; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/some.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/some.js new file mode 100644 index 00000000..de284006 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/some.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.some'); +module.exports = require('../../modules/_core').Array.some; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/sort.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/sort.js new file mode 100644 index 00000000..29b6f3ae --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/sort.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.sort'); +module.exports = require('../../modules/_core').Array.sort; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/splice.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/splice.js new file mode 100644 index 00000000..9d0bdbed --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/splice.js @@ -0,0 +1,4 @@ +// for a legacy code and future fixes +module.exports = function(){ + return Function.call.apply(Array.prototype.splice, arguments); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/unshift.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/unshift.js new file mode 100644 index 00000000..63fe2dd8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/unshift.js @@ -0,0 +1,4 @@ +// for a legacy code and future fixes +module.exports = function(){ + return Function.call.apply(Array.prototype.unshift, arguments); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/values.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/values.js new file mode 100644 index 00000000..ca93b78a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/values.js @@ -0,0 +1,2 @@ +require('../../modules/es6.array.iterator'); +module.exports = require('../../modules/_core').Array.values; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/copy-within.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/copy-within.js new file mode 100644 index 00000000..62172a9e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/copy-within.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.copy-within'); +module.exports = require('../../../modules/_entry-virtual')('Array').copyWithin; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/entries.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/entries.js new file mode 100644 index 00000000..1b198e3c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/entries.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.iterator'); +module.exports = require('../../../modules/_entry-virtual')('Array').entries; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/every.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/every.js new file mode 100644 index 00000000..a72e5851 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/every.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.every'); +module.exports = require('../../../modules/_entry-virtual')('Array').every; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/fill.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/fill.js new file mode 100644 index 00000000..6018b37b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/fill.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.fill'); +module.exports = require('../../../modules/_entry-virtual')('Array').fill; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/filter.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/filter.js new file mode 100644 index 00000000..46a14f1c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/filter.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.filter'); +module.exports = require('../../../modules/_entry-virtual')('Array').filter; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/find-index.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/find-index.js new file mode 100644 index 00000000..ef96165f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/find-index.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.find-index'); +module.exports = require('../../../modules/_entry-virtual')('Array').findIndex; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/find.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/find.js new file mode 100644 index 00000000..6cffee5b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/find.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.find'); +module.exports = require('../../../modules/_entry-virtual')('Array').find; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/for-each.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/for-each.js new file mode 100644 index 00000000..0c3ed449 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/for-each.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.for-each'); +module.exports = require('../../../modules/_entry-virtual')('Array').forEach; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/includes.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/includes.js new file mode 100644 index 00000000..bf9031d7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/includes.js @@ -0,0 +1,2 @@ +require('../../../modules/es7.array.includes'); +module.exports = require('../../../modules/_entry-virtual')('Array').includes; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/index-of.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/index-of.js new file mode 100644 index 00000000..cf6f36e3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/index-of.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.index-of'); +module.exports = require('../../../modules/_entry-virtual')('Array').indexOf; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/index.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/index.js new file mode 100644 index 00000000..ff554a2a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/index.js @@ -0,0 +1,20 @@ +require('../../../modules/es6.array.join'); +require('../../../modules/es6.array.slice'); +require('../../../modules/es6.array.sort'); +require('../../../modules/es6.array.for-each'); +require('../../../modules/es6.array.map'); +require('../../../modules/es6.array.filter'); +require('../../../modules/es6.array.some'); +require('../../../modules/es6.array.every'); +require('../../../modules/es6.array.reduce'); +require('../../../modules/es6.array.reduce-right'); +require('../../../modules/es6.array.index-of'); +require('../../../modules/es6.array.last-index-of'); +require('../../../modules/es6.string.iterator'); +require('../../../modules/es6.array.iterator'); +require('../../../modules/es6.array.copy-within'); +require('../../../modules/es6.array.fill'); +require('../../../modules/es6.array.find'); +require('../../../modules/es6.array.find-index'); +require('../../../modules/es7.array.includes'); +module.exports = require('../../../modules/_entry-virtual')('Array'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/iterator.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/iterator.js new file mode 100644 index 00000000..7812b3c9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/iterator.js @@ -0,0 +1,2 @@ +require('../../../modules/core.number.iterator'); +module.exports = require('../../../modules/_iterators').Array; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/join.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/join.js new file mode 100644 index 00000000..3f7d5cff --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/join.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.join'); +module.exports = require('../../../modules/_entry-virtual')('Array').join; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/keys.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/keys.js new file mode 100644 index 00000000..16c09681 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/keys.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.iterator'); +module.exports = require('../../../modules/_entry-virtual')('Array').keys; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/last-index-of.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/last-index-of.js new file mode 100644 index 00000000..cdd79b7d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/last-index-of.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.last-index-of'); +module.exports = require('../../../modules/_entry-virtual')('Array').lastIndexOf; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/map.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/map.js new file mode 100644 index 00000000..14bffdac --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/map.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.map'); +module.exports = require('../../../modules/_entry-virtual')('Array').map; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/reduce-right.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/reduce-right.js new file mode 100644 index 00000000..61313e8f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/reduce-right.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.reduce-right'); +module.exports = require('../../../modules/_entry-virtual')('Array').reduceRight; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/reduce.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/reduce.js new file mode 100644 index 00000000..1b059053 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/reduce.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.reduce'); +module.exports = require('../../../modules/_entry-virtual')('Array').reduce; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/slice.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/slice.js new file mode 100644 index 00000000..b28d1abc --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/slice.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.slice'); +module.exports = require('../../../modules/_entry-virtual')('Array').slice; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/some.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/some.js new file mode 100644 index 00000000..58c183c5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/some.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.some'); +module.exports = require('../../../modules/_entry-virtual')('Array').some; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/sort.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/sort.js new file mode 100644 index 00000000..c8883150 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/sort.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.array.sort'); +module.exports = require('../../../modules/_entry-virtual')('Array').sort; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/values.js b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/values.js new file mode 100644 index 00000000..7812b3c9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/array/virtual/values.js @@ -0,0 +1,2 @@ +require('../../../modules/core.number.iterator'); +module.exports = require('../../../modules/_iterators').Array; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/asap.js b/pitfall/pdfkit/node_modules/core-js/library/fn/asap.js new file mode 100644 index 00000000..9d9c80d1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/asap.js @@ -0,0 +1,2 @@ +require('../modules/es7.asap'); +module.exports = require('../modules/_core').asap; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/clear-immediate.js b/pitfall/pdfkit/node_modules/core-js/library/fn/clear-immediate.js new file mode 100644 index 00000000..86916a06 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/clear-immediate.js @@ -0,0 +1,2 @@ +require('../modules/web.immediate'); +module.exports = require('../modules/_core').clearImmediate; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/date/index.js b/pitfall/pdfkit/node_modules/core-js/library/fn/date/index.js new file mode 100644 index 00000000..bd9ce0e2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/date/index.js @@ -0,0 +1,6 @@ +require('../../modules/es6.date.now'); +require('../../modules/es6.date.to-json'); +require('../../modules/es6.date.to-iso-string'); +require('../../modules/es6.date.to-string'); +require('../../modules/es6.date.to-primitive'); +module.exports = require('../../modules/_core').Date; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/date/now.js b/pitfall/pdfkit/node_modules/core-js/library/fn/date/now.js new file mode 100644 index 00000000..c70d37ae --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/date/now.js @@ -0,0 +1,2 @@ +require('../../modules/es6.date.now'); +module.exports = require('../../modules/_core').Date.now; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/date/to-iso-string.js b/pitfall/pdfkit/node_modules/core-js/library/fn/date/to-iso-string.js new file mode 100644 index 00000000..be4ac218 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/date/to-iso-string.js @@ -0,0 +1,3 @@ +require('../../modules/es6.date.to-json'); +require('../../modules/es6.date.to-iso-string'); +module.exports = require('../../modules/_core').Date.toISOString; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/date/to-json.js b/pitfall/pdfkit/node_modules/core-js/library/fn/date/to-json.js new file mode 100644 index 00000000..9dc8cc90 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/date/to-json.js @@ -0,0 +1,2 @@ +require('../../modules/es6.date.to-json'); +module.exports = require('../../modules/_core').Date.toJSON; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/date/to-primitive.js b/pitfall/pdfkit/node_modules/core-js/library/fn/date/to-primitive.js new file mode 100644 index 00000000..4d7471e2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/date/to-primitive.js @@ -0,0 +1,5 @@ +require('../../modules/es6.date.to-primitive'); +var toPrimitive = require('../../modules/_date-to-primitive'); +module.exports = function(it, hint){ + return toPrimitive.call(it, hint); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/date/to-string.js b/pitfall/pdfkit/node_modules/core-js/library/fn/date/to-string.js new file mode 100644 index 00000000..c39d5522 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/date/to-string.js @@ -0,0 +1,5 @@ +require('../../modules/es6.date.to-string') +var $toString = Date.prototype.toString; +module.exports = function toString(it){ + return $toString.call(it); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/delay.js b/pitfall/pdfkit/node_modules/core-js/library/fn/delay.js new file mode 100644 index 00000000..18857388 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/delay.js @@ -0,0 +1,2 @@ +require('../modules/core.delay'); +module.exports = require('../modules/_core').delay; diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/dict.js b/pitfall/pdfkit/node_modules/core-js/library/fn/dict.js new file mode 100644 index 00000000..da84a8d8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/dict.js @@ -0,0 +1,2 @@ +require('../modules/core.dict'); +module.exports = require('../modules/_core').Dict; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/dom-collections/index.js b/pitfall/pdfkit/node_modules/core-js/library/fn/dom-collections/index.js new file mode 100644 index 00000000..3928a09f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/dom-collections/index.js @@ -0,0 +1,8 @@ +require('../../modules/web.dom.iterable'); +var $iterators = require('../../modules/es6.array.iterator'); +module.exports = { + keys: $iterators.keys, + values: $iterators.values, + entries: $iterators.entries, + iterator: $iterators.values +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/dom-collections/iterator.js b/pitfall/pdfkit/node_modules/core-js/library/fn/dom-collections/iterator.js new file mode 100644 index 00000000..ad983645 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/dom-collections/iterator.js @@ -0,0 +1,2 @@ +require('../../modules/web.dom.iterable'); +module.exports = require('../../modules/_core').Array.values; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/error/index.js b/pitfall/pdfkit/node_modules/core-js/library/fn/error/index.js new file mode 100644 index 00000000..59571ac2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/error/index.js @@ -0,0 +1,2 @@ +require('../../modules/es7.error.is-error'); +module.exports = require('../../modules/_core').Error; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/error/is-error.js b/pitfall/pdfkit/node_modules/core-js/library/fn/error/is-error.js new file mode 100644 index 00000000..e15b7201 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/error/is-error.js @@ -0,0 +1,2 @@ +require('../../modules/es7.error.is-error'); +module.exports = require('../../modules/_core').Error.isError; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/function/bind.js b/pitfall/pdfkit/node_modules/core-js/library/fn/function/bind.js new file mode 100644 index 00000000..38e179e6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/function/bind.js @@ -0,0 +1,2 @@ +require('../../modules/es6.function.bind'); +module.exports = require('../../modules/_core').Function.bind; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/function/has-instance.js b/pitfall/pdfkit/node_modules/core-js/library/fn/function/has-instance.js new file mode 100644 index 00000000..78397e5f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/function/has-instance.js @@ -0,0 +1,2 @@ +require('../../modules/es6.function.has-instance'); +module.exports = Function[require('../../modules/_wks')('hasInstance')]; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/function/index.js b/pitfall/pdfkit/node_modules/core-js/library/fn/function/index.js new file mode 100644 index 00000000..206324e8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/function/index.js @@ -0,0 +1,5 @@ +require('../../modules/es6.function.bind'); +require('../../modules/es6.function.name'); +require('../../modules/es6.function.has-instance'); +require('../../modules/core.function.part'); +module.exports = require('../../modules/_core').Function; diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/function/name.js b/pitfall/pdfkit/node_modules/core-js/library/fn/function/name.js new file mode 100644 index 00000000..cb70bf15 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/function/name.js @@ -0,0 +1 @@ +require('../../modules/es6.function.name'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/function/part.js b/pitfall/pdfkit/node_modules/core-js/library/fn/function/part.js new file mode 100644 index 00000000..926e2cc2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/function/part.js @@ -0,0 +1,2 @@ +require('../../modules/core.function.part'); +module.exports = require('../../modules/_core').Function.part; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/function/virtual/bind.js b/pitfall/pdfkit/node_modules/core-js/library/fn/function/virtual/bind.js new file mode 100644 index 00000000..0a2f3338 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/function/virtual/bind.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.function.bind'); +module.exports = require('../../../modules/_entry-virtual')('Function').bind; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/function/virtual/index.js b/pitfall/pdfkit/node_modules/core-js/library/fn/function/virtual/index.js new file mode 100644 index 00000000..f64e2202 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/function/virtual/index.js @@ -0,0 +1,3 @@ +require('../../../modules/es6.function.bind'); +require('../../../modules/core.function.part'); +module.exports = require('../../../modules/_entry-virtual')('Function'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/function/virtual/part.js b/pitfall/pdfkit/node_modules/core-js/library/fn/function/virtual/part.js new file mode 100644 index 00000000..a382e577 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/function/virtual/part.js @@ -0,0 +1,2 @@ +require('../../../modules/core.function.part'); +module.exports = require('../../../modules/_entry-virtual')('Function').part; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/get-iterator-method.js b/pitfall/pdfkit/node_modules/core-js/library/fn/get-iterator-method.js new file mode 100644 index 00000000..5543cbbf --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/get-iterator-method.js @@ -0,0 +1,3 @@ +require('../modules/web.dom.iterable'); +require('../modules/es6.string.iterator'); +module.exports = require('../modules/core.get-iterator-method'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/get-iterator.js b/pitfall/pdfkit/node_modules/core-js/library/fn/get-iterator.js new file mode 100644 index 00000000..762350ff --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/get-iterator.js @@ -0,0 +1,3 @@ +require('../modules/web.dom.iterable'); +require('../modules/es6.string.iterator'); +module.exports = require('../modules/core.get-iterator'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/is-iterable.js b/pitfall/pdfkit/node_modules/core-js/library/fn/is-iterable.js new file mode 100644 index 00000000..4c654e87 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/is-iterable.js @@ -0,0 +1,3 @@ +require('../modules/web.dom.iterable'); +require('../modules/es6.string.iterator'); +module.exports = require('../modules/core.is-iterable'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/json/index.js b/pitfall/pdfkit/node_modules/core-js/library/fn/json/index.js new file mode 100644 index 00000000..a6ec3de9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/json/index.js @@ -0,0 +1,2 @@ +var core = require('../../modules/_core'); +module.exports = core.JSON || (core.JSON = {stringify: JSON.stringify}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/json/stringify.js b/pitfall/pdfkit/node_modules/core-js/library/fn/json/stringify.js new file mode 100644 index 00000000..f0cac86a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/json/stringify.js @@ -0,0 +1,5 @@ +var core = require('../../modules/_core') + , $JSON = core.JSON || (core.JSON = {stringify: JSON.stringify}); +module.exports = function stringify(it){ // eslint-disable-line no-unused-vars + return $JSON.stringify.apply($JSON, arguments); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/map.js b/pitfall/pdfkit/node_modules/core-js/library/fn/map.js new file mode 100644 index 00000000..16784c60 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/map.js @@ -0,0 +1,6 @@ +require('../modules/es6.object.to-string'); +require('../modules/es6.string.iterator'); +require('../modules/web.dom.iterable'); +require('../modules/es6.map'); +require('../modules/es7.map.to-json'); +module.exports = require('../modules/_core').Map; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/math/acosh.js b/pitfall/pdfkit/node_modules/core-js/library/fn/math/acosh.js new file mode 100644 index 00000000..9c904c2d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/math/acosh.js @@ -0,0 +1,2 @@ +require('../../modules/es6.math.acosh'); +module.exports = require('../../modules/_core').Math.acosh; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/math/asinh.js b/pitfall/pdfkit/node_modules/core-js/library/fn/math/asinh.js new file mode 100644 index 00000000..9e209c9d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/math/asinh.js @@ -0,0 +1,2 @@ +require('../../modules/es6.math.asinh'); +module.exports = require('../../modules/_core').Math.asinh; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/math/atanh.js b/pitfall/pdfkit/node_modules/core-js/library/fn/math/atanh.js new file mode 100644 index 00000000..b116296d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/math/atanh.js @@ -0,0 +1,2 @@ +require('../../modules/es6.math.atanh'); +module.exports = require('../../modules/_core').Math.atanh; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/math/cbrt.js b/pitfall/pdfkit/node_modules/core-js/library/fn/math/cbrt.js new file mode 100644 index 00000000..6ffec33a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/math/cbrt.js @@ -0,0 +1,2 @@ +require('../../modules/es6.math.cbrt'); +module.exports = require('../../modules/_core').Math.cbrt; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/math/clz32.js b/pitfall/pdfkit/node_modules/core-js/library/fn/math/clz32.js new file mode 100644 index 00000000..beeaae16 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/math/clz32.js @@ -0,0 +1,2 @@ +require('../../modules/es6.math.clz32'); +module.exports = require('../../modules/_core').Math.clz32; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/math/cosh.js b/pitfall/pdfkit/node_modules/core-js/library/fn/math/cosh.js new file mode 100644 index 00000000..bf92dc13 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/math/cosh.js @@ -0,0 +1,2 @@ +require('../../modules/es6.math.cosh'); +module.exports = require('../../modules/_core').Math.cosh; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/math/expm1.js b/pitfall/pdfkit/node_modules/core-js/library/fn/math/expm1.js new file mode 100644 index 00000000..0b30ebb1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/math/expm1.js @@ -0,0 +1,2 @@ +require('../../modules/es6.math.expm1'); +module.exports = require('../../modules/_core').Math.expm1; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/math/fround.js b/pitfall/pdfkit/node_modules/core-js/library/fn/math/fround.js new file mode 100644 index 00000000..c75a2293 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/math/fround.js @@ -0,0 +1,2 @@ +require('../../modules/es6.math.fround'); +module.exports = require('../../modules/_core').Math.fround; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/math/hypot.js b/pitfall/pdfkit/node_modules/core-js/library/fn/math/hypot.js new file mode 100644 index 00000000..2126285c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/math/hypot.js @@ -0,0 +1,2 @@ +require('../../modules/es6.math.hypot'); +module.exports = require('../../modules/_core').Math.hypot; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/math/iaddh.js b/pitfall/pdfkit/node_modules/core-js/library/fn/math/iaddh.js new file mode 100644 index 00000000..cae754ee --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/math/iaddh.js @@ -0,0 +1,2 @@ +require('../../modules/es7.math.iaddh'); +module.exports = require('../../modules/_core').Math.iaddh; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/math/imul.js b/pitfall/pdfkit/node_modules/core-js/library/fn/math/imul.js new file mode 100644 index 00000000..1f5ce161 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/math/imul.js @@ -0,0 +1,2 @@ +require('../../modules/es6.math.imul'); +module.exports = require('../../modules/_core').Math.imul; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/math/imulh.js b/pitfall/pdfkit/node_modules/core-js/library/fn/math/imulh.js new file mode 100644 index 00000000..3b47bf8c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/math/imulh.js @@ -0,0 +1,2 @@ +require('../../modules/es7.math.imulh'); +module.exports = require('../../modules/_core').Math.imulh; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/math/index.js b/pitfall/pdfkit/node_modules/core-js/library/fn/math/index.js new file mode 100644 index 00000000..8a2664b1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/math/index.js @@ -0,0 +1,22 @@ +require('../../modules/es6.math.acosh'); +require('../../modules/es6.math.asinh'); +require('../../modules/es6.math.atanh'); +require('../../modules/es6.math.cbrt'); +require('../../modules/es6.math.clz32'); +require('../../modules/es6.math.cosh'); +require('../../modules/es6.math.expm1'); +require('../../modules/es6.math.fround'); +require('../../modules/es6.math.hypot'); +require('../../modules/es6.math.imul'); +require('../../modules/es6.math.log10'); +require('../../modules/es6.math.log1p'); +require('../../modules/es6.math.log2'); +require('../../modules/es6.math.sign'); +require('../../modules/es6.math.sinh'); +require('../../modules/es6.math.tanh'); +require('../../modules/es6.math.trunc'); +require('../../modules/es7.math.iaddh'); +require('../../modules/es7.math.isubh'); +require('../../modules/es7.math.imulh'); +require('../../modules/es7.math.umulh'); +module.exports = require('../../modules/_core').Math; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/math/isubh.js b/pitfall/pdfkit/node_modules/core-js/library/fn/math/isubh.js new file mode 100644 index 00000000..e120e423 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/math/isubh.js @@ -0,0 +1,2 @@ +require('../../modules/es7.math.isubh'); +module.exports = require('../../modules/_core').Math.isubh; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/math/log10.js b/pitfall/pdfkit/node_modules/core-js/library/fn/math/log10.js new file mode 100644 index 00000000..1246e0ae --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/math/log10.js @@ -0,0 +1,2 @@ +require('../../modules/es6.math.log10'); +module.exports = require('../../modules/_core').Math.log10; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/math/log1p.js b/pitfall/pdfkit/node_modules/core-js/library/fn/math/log1p.js new file mode 100644 index 00000000..047b84c0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/math/log1p.js @@ -0,0 +1,2 @@ +require('../../modules/es6.math.log1p'); +module.exports = require('../../modules/_core').Math.log1p; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/math/log2.js b/pitfall/pdfkit/node_modules/core-js/library/fn/math/log2.js new file mode 100644 index 00000000..ce3e99c1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/math/log2.js @@ -0,0 +1,2 @@ +require('../../modules/es6.math.log2'); +module.exports = require('../../modules/_core').Math.log2; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/math/sign.js b/pitfall/pdfkit/node_modules/core-js/library/fn/math/sign.js new file mode 100644 index 00000000..0963ecaf --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/math/sign.js @@ -0,0 +1,2 @@ +require('../../modules/es6.math.sign'); +module.exports = require('../../modules/_core').Math.sign; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/math/sinh.js b/pitfall/pdfkit/node_modules/core-js/library/fn/math/sinh.js new file mode 100644 index 00000000..c35cb739 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/math/sinh.js @@ -0,0 +1,2 @@ +require('../../modules/es6.math.sinh'); +module.exports = require('../../modules/_core').Math.sinh; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/math/tanh.js b/pitfall/pdfkit/node_modules/core-js/library/fn/math/tanh.js new file mode 100644 index 00000000..3d1966db --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/math/tanh.js @@ -0,0 +1,2 @@ +require('../../modules/es6.math.tanh'); +module.exports = require('../../modules/_core').Math.tanh; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/math/trunc.js b/pitfall/pdfkit/node_modules/core-js/library/fn/math/trunc.js new file mode 100644 index 00000000..135b7dcb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/math/trunc.js @@ -0,0 +1,2 @@ +require('../../modules/es6.math.trunc'); +module.exports = require('../../modules/_core').Math.trunc; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/math/umulh.js b/pitfall/pdfkit/node_modules/core-js/library/fn/math/umulh.js new file mode 100644 index 00000000..d93b9ae0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/math/umulh.js @@ -0,0 +1,2 @@ +require('../../modules/es7.math.umulh'); +module.exports = require('../../modules/_core').Math.umulh; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/number/constructor.js b/pitfall/pdfkit/node_modules/core-js/library/fn/number/constructor.js new file mode 100644 index 00000000..f488331e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/number/constructor.js @@ -0,0 +1,2 @@ +require('../../modules/es6.number.constructor'); +module.exports = Number; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/number/epsilon.js b/pitfall/pdfkit/node_modules/core-js/library/fn/number/epsilon.js new file mode 100644 index 00000000..56c93521 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/number/epsilon.js @@ -0,0 +1,2 @@ +require('../../modules/es6.number.epsilon'); +module.exports = Math.pow(2, -52); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/number/index.js b/pitfall/pdfkit/node_modules/core-js/library/fn/number/index.js new file mode 100644 index 00000000..92890003 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/number/index.js @@ -0,0 +1,14 @@ +require('../../modules/es6.number.constructor'); +require('../../modules/es6.number.epsilon'); +require('../../modules/es6.number.is-finite'); +require('../../modules/es6.number.is-integer'); +require('../../modules/es6.number.is-nan'); +require('../../modules/es6.number.is-safe-integer'); +require('../../modules/es6.number.max-safe-integer'); +require('../../modules/es6.number.min-safe-integer'); +require('../../modules/es6.number.parse-float'); +require('../../modules/es6.number.parse-int'); +require('../../modules/es6.number.to-fixed'); +require('../../modules/es6.number.to-precision'); +require('../../modules/core.number.iterator'); +module.exports = require('../../modules/_core').Number; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/number/is-finite.js b/pitfall/pdfkit/node_modules/core-js/library/fn/number/is-finite.js new file mode 100644 index 00000000..4ec3706b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/number/is-finite.js @@ -0,0 +1,2 @@ +require('../../modules/es6.number.is-finite'); +module.exports = require('../../modules/_core').Number.isFinite; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/number/is-integer.js b/pitfall/pdfkit/node_modules/core-js/library/fn/number/is-integer.js new file mode 100644 index 00000000..a3013bff --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/number/is-integer.js @@ -0,0 +1,2 @@ +require('../../modules/es6.number.is-integer'); +module.exports = require('../../modules/_core').Number.isInteger; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/number/is-nan.js b/pitfall/pdfkit/node_modules/core-js/library/fn/number/is-nan.js new file mode 100644 index 00000000..f23b0266 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/number/is-nan.js @@ -0,0 +1,2 @@ +require('../../modules/es6.number.is-nan'); +module.exports = require('../../modules/_core').Number.isNaN; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/number/is-safe-integer.js b/pitfall/pdfkit/node_modules/core-js/library/fn/number/is-safe-integer.js new file mode 100644 index 00000000..f68732f5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/number/is-safe-integer.js @@ -0,0 +1,2 @@ +require('../../modules/es6.number.is-safe-integer'); +module.exports = require('../../modules/_core').Number.isSafeInteger; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/number/iterator.js b/pitfall/pdfkit/node_modules/core-js/library/fn/number/iterator.js new file mode 100644 index 00000000..26feaa1f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/number/iterator.js @@ -0,0 +1,5 @@ +require('../../modules/core.number.iterator'); +var get = require('../../modules/_iterators').Number; +module.exports = function(it){ + return get.call(it); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/number/max-safe-integer.js b/pitfall/pdfkit/node_modules/core-js/library/fn/number/max-safe-integer.js new file mode 100644 index 00000000..c9b43b04 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/number/max-safe-integer.js @@ -0,0 +1,2 @@ +require('../../modules/es6.number.max-safe-integer'); +module.exports = 0x1fffffffffffff; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/number/min-safe-integer.js b/pitfall/pdfkit/node_modules/core-js/library/fn/number/min-safe-integer.js new file mode 100644 index 00000000..8b5e0728 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/number/min-safe-integer.js @@ -0,0 +1,2 @@ +require('../../modules/es6.number.min-safe-integer'); +module.exports = -0x1fffffffffffff; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/number/parse-float.js b/pitfall/pdfkit/node_modules/core-js/library/fn/number/parse-float.js new file mode 100644 index 00000000..62f89774 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/number/parse-float.js @@ -0,0 +1,2 @@ +require('../../modules/es6.number.parse-float'); +module.exports = parseFloat; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/number/parse-int.js b/pitfall/pdfkit/node_modules/core-js/library/fn/number/parse-int.js new file mode 100644 index 00000000..c197da5b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/number/parse-int.js @@ -0,0 +1,2 @@ +require('../../modules/es6.number.parse-int'); +module.exports = parseInt; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/number/to-fixed.js b/pitfall/pdfkit/node_modules/core-js/library/fn/number/to-fixed.js new file mode 100644 index 00000000..3a041b0e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/number/to-fixed.js @@ -0,0 +1,2 @@ +require('../../modules/es6.number.to-fixed'); +module.exports = require('../../modules/_core').Number.toFixed; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/number/to-precision.js b/pitfall/pdfkit/node_modules/core-js/library/fn/number/to-precision.js new file mode 100644 index 00000000..9e85511a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/number/to-precision.js @@ -0,0 +1,2 @@ +require('../../modules/es6.number.to-precision'); +module.exports = require('../../modules/_core').Number.toPrecision; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/number/virtual/index.js b/pitfall/pdfkit/node_modules/core-js/library/fn/number/virtual/index.js new file mode 100644 index 00000000..42360d32 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/number/virtual/index.js @@ -0,0 +1,4 @@ +require('../../../modules/core.number.iterator'); +var $Number = require('../../../modules/_entry-virtual')('Number'); +$Number.iterator = require('../../../modules/_iterators').Number; +module.exports = $Number; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/number/virtual/iterator.js b/pitfall/pdfkit/node_modules/core-js/library/fn/number/virtual/iterator.js new file mode 100644 index 00000000..df034996 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/number/virtual/iterator.js @@ -0,0 +1,2 @@ +require('../../../modules/core.number.iterator'); +module.exports = require('../../../modules/_iterators').Number; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/number/virtual/to-fixed.js b/pitfall/pdfkit/node_modules/core-js/library/fn/number/virtual/to-fixed.js new file mode 100644 index 00000000..b779f15c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/number/virtual/to-fixed.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.number.to-fixed'); +module.exports = require('../../../modules/_entry-virtual')('Number').toFixed; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/number/virtual/to-precision.js b/pitfall/pdfkit/node_modules/core-js/library/fn/number/virtual/to-precision.js new file mode 100644 index 00000000..0c93fa4a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/number/virtual/to-precision.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.number.to-precision'); +module.exports = require('../../../modules/_entry-virtual')('Number').toPrecision; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/object/assign.js b/pitfall/pdfkit/node_modules/core-js/library/fn/object/assign.js new file mode 100644 index 00000000..97df6bf4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/object/assign.js @@ -0,0 +1,2 @@ +require('../../modules/es6.object.assign'); +module.exports = require('../../modules/_core').Object.assign; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/object/classof.js b/pitfall/pdfkit/node_modules/core-js/library/fn/object/classof.js new file mode 100644 index 00000000..993d0480 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/object/classof.js @@ -0,0 +1,2 @@ +require('../../modules/core.object.classof'); +module.exports = require('../../modules/_core').Object.classof; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/object/create.js b/pitfall/pdfkit/node_modules/core-js/library/fn/object/create.js new file mode 100644 index 00000000..a05ca2fb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/object/create.js @@ -0,0 +1,5 @@ +require('../../modules/es6.object.create'); +var $Object = require('../../modules/_core').Object; +module.exports = function create(P, D){ + return $Object.create(P, D); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/object/define-getter.js b/pitfall/pdfkit/node_modules/core-js/library/fn/object/define-getter.js new file mode 100644 index 00000000..5dd26070 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/object/define-getter.js @@ -0,0 +1,2 @@ +require('../../modules/es7.object.define-getter'); +module.exports = require('../../modules/_core').Object.__defineGetter__; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/object/define-properties.js b/pitfall/pdfkit/node_modules/core-js/library/fn/object/define-properties.js new file mode 100644 index 00000000..04160fb3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/object/define-properties.js @@ -0,0 +1,5 @@ +require('../../modules/es6.object.define-properties'); +var $Object = require('../../modules/_core').Object; +module.exports = function defineProperties(T, D){ + return $Object.defineProperties(T, D); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/object/define-property.js b/pitfall/pdfkit/node_modules/core-js/library/fn/object/define-property.js new file mode 100644 index 00000000..078c56cb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/object/define-property.js @@ -0,0 +1,5 @@ +require('../../modules/es6.object.define-property'); +var $Object = require('../../modules/_core').Object; +module.exports = function defineProperty(it, key, desc){ + return $Object.defineProperty(it, key, desc); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/object/define-setter.js b/pitfall/pdfkit/node_modules/core-js/library/fn/object/define-setter.js new file mode 100644 index 00000000..b59475f8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/object/define-setter.js @@ -0,0 +1,2 @@ +require('../../modules/es7.object.define-setter'); +module.exports = require('../../modules/_core').Object.__defineSetter__; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/object/define.js b/pitfall/pdfkit/node_modules/core-js/library/fn/object/define.js new file mode 100644 index 00000000..6ec19e90 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/object/define.js @@ -0,0 +1,2 @@ +require('../../modules/core.object.define'); +module.exports = require('../../modules/_core').Object.define; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/object/entries.js b/pitfall/pdfkit/node_modules/core-js/library/fn/object/entries.js new file mode 100644 index 00000000..fca1000e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/object/entries.js @@ -0,0 +1,2 @@ +require('../../modules/es7.object.entries'); +module.exports = require('../../modules/_core').Object.entries; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/object/freeze.js b/pitfall/pdfkit/node_modules/core-js/library/fn/object/freeze.js new file mode 100644 index 00000000..04eac530 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/object/freeze.js @@ -0,0 +1,2 @@ +require('../../modules/es6.object.freeze'); +module.exports = require('../../modules/_core').Object.freeze; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/object/get-own-property-descriptor.js b/pitfall/pdfkit/node_modules/core-js/library/fn/object/get-own-property-descriptor.js new file mode 100644 index 00000000..7d3f03b8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/object/get-own-property-descriptor.js @@ -0,0 +1,5 @@ +require('../../modules/es6.object.get-own-property-descriptor'); +var $Object = require('../../modules/_core').Object; +module.exports = function getOwnPropertyDescriptor(it, key){ + return $Object.getOwnPropertyDescriptor(it, key); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/object/get-own-property-descriptors.js b/pitfall/pdfkit/node_modules/core-js/library/fn/object/get-own-property-descriptors.js new file mode 100644 index 00000000..dfeb547c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/object/get-own-property-descriptors.js @@ -0,0 +1,2 @@ +require('../../modules/es7.object.get-own-property-descriptors'); +module.exports = require('../../modules/_core').Object.getOwnPropertyDescriptors; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/object/get-own-property-names.js b/pitfall/pdfkit/node_modules/core-js/library/fn/object/get-own-property-names.js new file mode 100644 index 00000000..c91ce430 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/object/get-own-property-names.js @@ -0,0 +1,5 @@ +require('../../modules/es6.object.get-own-property-names'); +var $Object = require('../../modules/_core').Object; +module.exports = function getOwnPropertyNames(it){ + return $Object.getOwnPropertyNames(it); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/object/get-own-property-symbols.js b/pitfall/pdfkit/node_modules/core-js/library/fn/object/get-own-property-symbols.js new file mode 100644 index 00000000..c3f52880 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/object/get-own-property-symbols.js @@ -0,0 +1,2 @@ +require('../../modules/es6.symbol'); +module.exports = require('../../modules/_core').Object.getOwnPropertySymbols; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/object/get-prototype-of.js b/pitfall/pdfkit/node_modules/core-js/library/fn/object/get-prototype-of.js new file mode 100644 index 00000000..bda93445 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/object/get-prototype-of.js @@ -0,0 +1,2 @@ +require('../../modules/es6.object.get-prototype-of'); +module.exports = require('../../modules/_core').Object.getPrototypeOf; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/object/index.js b/pitfall/pdfkit/node_modules/core-js/library/fn/object/index.js new file mode 100644 index 00000000..4bd9825b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/object/index.js @@ -0,0 +1,30 @@ +require('../../modules/es6.symbol'); +require('../../modules/es6.object.create'); +require('../../modules/es6.object.define-property'); +require('../../modules/es6.object.define-properties'); +require('../../modules/es6.object.get-own-property-descriptor'); +require('../../modules/es6.object.get-prototype-of'); +require('../../modules/es6.object.keys'); +require('../../modules/es6.object.get-own-property-names'); +require('../../modules/es6.object.freeze'); +require('../../modules/es6.object.seal'); +require('../../modules/es6.object.prevent-extensions'); +require('../../modules/es6.object.is-frozen'); +require('../../modules/es6.object.is-sealed'); +require('../../modules/es6.object.is-extensible'); +require('../../modules/es6.object.assign'); +require('../../modules/es6.object.is'); +require('../../modules/es6.object.set-prototype-of'); +require('../../modules/es6.object.to-string'); +require('../../modules/es7.object.get-own-property-descriptors'); +require('../../modules/es7.object.values'); +require('../../modules/es7.object.entries'); +require('../../modules/es7.object.define-getter'); +require('../../modules/es7.object.define-setter'); +require('../../modules/es7.object.lookup-getter'); +require('../../modules/es7.object.lookup-setter'); +require('../../modules/core.object.is-object'); +require('../../modules/core.object.classof'); +require('../../modules/core.object.define'); +require('../../modules/core.object.make'); +module.exports = require('../../modules/_core').Object; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/object/is-extensible.js b/pitfall/pdfkit/node_modules/core-js/library/fn/object/is-extensible.js new file mode 100644 index 00000000..43fb0e78 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/object/is-extensible.js @@ -0,0 +1,2 @@ +require('../../modules/es6.object.is-extensible'); +module.exports = require('../../modules/_core').Object.isExtensible; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/object/is-frozen.js b/pitfall/pdfkit/node_modules/core-js/library/fn/object/is-frozen.js new file mode 100644 index 00000000..cbff2242 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/object/is-frozen.js @@ -0,0 +1,2 @@ +require('../../modules/es6.object.is-frozen'); +module.exports = require('../../modules/_core').Object.isFrozen; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/object/is-object.js b/pitfall/pdfkit/node_modules/core-js/library/fn/object/is-object.js new file mode 100644 index 00000000..38feeff5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/object/is-object.js @@ -0,0 +1,2 @@ +require('../../modules/core.object.is-object'); +module.exports = require('../../modules/_core').Object.isObject; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/object/is-sealed.js b/pitfall/pdfkit/node_modules/core-js/library/fn/object/is-sealed.js new file mode 100644 index 00000000..169a8ae7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/object/is-sealed.js @@ -0,0 +1,2 @@ +require('../../modules/es6.object.is-sealed'); +module.exports = require('../../modules/_core').Object.isSealed; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/object/is.js b/pitfall/pdfkit/node_modules/core-js/library/fn/object/is.js new file mode 100644 index 00000000..6ac9f19e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/object/is.js @@ -0,0 +1,2 @@ +require('../../modules/es6.object.is'); +module.exports = require('../../modules/_core').Object.is; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/object/keys.js b/pitfall/pdfkit/node_modules/core-js/library/fn/object/keys.js new file mode 100644 index 00000000..8eeb78eb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/object/keys.js @@ -0,0 +1,2 @@ +require('../../modules/es6.object.keys'); +module.exports = require('../../modules/_core').Object.keys; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/object/lookup-getter.js b/pitfall/pdfkit/node_modules/core-js/library/fn/object/lookup-getter.js new file mode 100644 index 00000000..3f7f674d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/object/lookup-getter.js @@ -0,0 +1,2 @@ +require('../../modules/es7.object.lookup-setter'); +module.exports = require('../../modules/_core').Object.__lookupGetter__; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/object/lookup-setter.js b/pitfall/pdfkit/node_modules/core-js/library/fn/object/lookup-setter.js new file mode 100644 index 00000000..d18446fe --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/object/lookup-setter.js @@ -0,0 +1,2 @@ +require('../../modules/es7.object.lookup-setter'); +module.exports = require('../../modules/_core').Object.__lookupSetter__; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/object/make.js b/pitfall/pdfkit/node_modules/core-js/library/fn/object/make.js new file mode 100644 index 00000000..f4d19d12 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/object/make.js @@ -0,0 +1,2 @@ +require('../../modules/core.object.make'); +module.exports = require('../../modules/_core').Object.make; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/object/prevent-extensions.js b/pitfall/pdfkit/node_modules/core-js/library/fn/object/prevent-extensions.js new file mode 100644 index 00000000..e43be05b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/object/prevent-extensions.js @@ -0,0 +1,2 @@ +require('../../modules/es6.object.prevent-extensions'); +module.exports = require('../../modules/_core').Object.preventExtensions; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/object/seal.js b/pitfall/pdfkit/node_modules/core-js/library/fn/object/seal.js new file mode 100644 index 00000000..8a56cd7f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/object/seal.js @@ -0,0 +1,2 @@ +require('../../modules/es6.object.seal'); +module.exports = require('../../modules/_core').Object.seal; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/object/set-prototype-of.js b/pitfall/pdfkit/node_modules/core-js/library/fn/object/set-prototype-of.js new file mode 100644 index 00000000..c25170db --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/object/set-prototype-of.js @@ -0,0 +1,2 @@ +require('../../modules/es6.object.set-prototype-of'); +module.exports = require('../../modules/_core').Object.setPrototypeOf; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/object/values.js b/pitfall/pdfkit/node_modules/core-js/library/fn/object/values.js new file mode 100644 index 00000000..b50336cf --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/object/values.js @@ -0,0 +1,2 @@ +require('../../modules/es7.object.values'); +module.exports = require('../../modules/_core').Object.values; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/observable.js b/pitfall/pdfkit/node_modules/core-js/library/fn/observable.js new file mode 100644 index 00000000..05ca51a3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/observable.js @@ -0,0 +1,7 @@ +require('../modules/es6.object.to-string'); +require('../modules/es6.string.iterator'); +require('../modules/web.dom.iterable'); +require('../modules/es6.promise'); +require('../modules/es7.symbol.observable'); +require('../modules/es7.observable'); +module.exports = require('../modules/_core').Observable; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/parse-float.js b/pitfall/pdfkit/node_modules/core-js/library/fn/parse-float.js new file mode 100644 index 00000000..dad94ddb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/parse-float.js @@ -0,0 +1,2 @@ +require('../modules/es6.parse-float'); +module.exports = require('../modules/_core').parseFloat; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/parse-int.js b/pitfall/pdfkit/node_modules/core-js/library/fn/parse-int.js new file mode 100644 index 00000000..08a20996 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/parse-int.js @@ -0,0 +1,2 @@ +require('../modules/es6.parse-int'); +module.exports = require('../modules/_core').parseInt; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/promise.js b/pitfall/pdfkit/node_modules/core-js/library/fn/promise.js new file mode 100644 index 00000000..c901c859 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/promise.js @@ -0,0 +1,5 @@ +require('../modules/es6.object.to-string'); +require('../modules/es6.string.iterator'); +require('../modules/web.dom.iterable'); +require('../modules/es6.promise'); +module.exports = require('../modules/_core').Promise; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/apply.js b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/apply.js new file mode 100644 index 00000000..725b8a69 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/apply.js @@ -0,0 +1,2 @@ +require('../../modules/es6.reflect.apply'); +module.exports = require('../../modules/_core').Reflect.apply; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/construct.js b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/construct.js new file mode 100644 index 00000000..587725da --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/construct.js @@ -0,0 +1,2 @@ +require('../../modules/es6.reflect.construct'); +module.exports = require('../../modules/_core').Reflect.construct; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/define-metadata.js b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/define-metadata.js new file mode 100644 index 00000000..c9876ed3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/define-metadata.js @@ -0,0 +1,2 @@ +require('../../modules/es7.reflect.define-metadata'); +module.exports = require('../../modules/_core').Reflect.defineMetadata; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/define-property.js b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/define-property.js new file mode 100644 index 00000000..c36b4d21 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/define-property.js @@ -0,0 +1,2 @@ +require('../../modules/es6.reflect.define-property'); +module.exports = require('../../modules/_core').Reflect.defineProperty; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/delete-metadata.js b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/delete-metadata.js new file mode 100644 index 00000000..9bcc0299 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/delete-metadata.js @@ -0,0 +1,2 @@ +require('../../modules/es7.reflect.delete-metadata'); +module.exports = require('../../modules/_core').Reflect.deleteMetadata; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/delete-property.js b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/delete-property.js new file mode 100644 index 00000000..10b6392f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/delete-property.js @@ -0,0 +1,2 @@ +require('../../modules/es6.reflect.delete-property'); +module.exports = require('../../modules/_core').Reflect.deleteProperty; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/enumerate.js b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/enumerate.js new file mode 100644 index 00000000..257a21ee --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/enumerate.js @@ -0,0 +1,2 @@ +require('../../modules/es6.reflect.enumerate'); +module.exports = require('../../modules/_core').Reflect.enumerate; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/get-metadata-keys.js b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/get-metadata-keys.js new file mode 100644 index 00000000..9dbf5ee1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/get-metadata-keys.js @@ -0,0 +1,2 @@ +require('../../modules/es7.reflect.get-metadata-keys'); +module.exports = require('../../modules/_core').Reflect.getMetadataKeys; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/get-metadata.js b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/get-metadata.js new file mode 100644 index 00000000..3a20839e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/get-metadata.js @@ -0,0 +1,2 @@ +require('../../modules/es7.reflect.get-metadata'); +module.exports = require('../../modules/_core').Reflect.getMetadata; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/get-own-metadata-keys.js b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/get-own-metadata-keys.js new file mode 100644 index 00000000..2f8c5759 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/get-own-metadata-keys.js @@ -0,0 +1,2 @@ +require('../../modules/es7.reflect.get-own-metadata-keys'); +module.exports = require('../../modules/_core').Reflect.getOwnMetadataKeys; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/get-own-metadata.js b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/get-own-metadata.js new file mode 100644 index 00000000..68e288dd --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/get-own-metadata.js @@ -0,0 +1,2 @@ +require('../../modules/es7.reflect.get-own-metadata'); +module.exports = require('../../modules/_core').Reflect.getOwnMetadata; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/get-own-property-descriptor.js b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/get-own-property-descriptor.js new file mode 100644 index 00000000..9e2822fb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/get-own-property-descriptor.js @@ -0,0 +1,2 @@ +require('../../modules/es6.reflect.get-own-property-descriptor'); +module.exports = require('../../modules/_core').Reflect.getOwnPropertyDescriptor; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/get-prototype-of.js b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/get-prototype-of.js new file mode 100644 index 00000000..48503596 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/get-prototype-of.js @@ -0,0 +1,2 @@ +require('../../modules/es6.reflect.get-prototype-of'); +module.exports = require('../../modules/_core').Reflect.getPrototypeOf; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/get.js b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/get.js new file mode 100644 index 00000000..9ca903e8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/get.js @@ -0,0 +1,2 @@ +require('../../modules/es6.reflect.get'); +module.exports = require('../../modules/_core').Reflect.get; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/has-metadata.js b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/has-metadata.js new file mode 100644 index 00000000..f001f437 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/has-metadata.js @@ -0,0 +1,2 @@ +require('../../modules/es7.reflect.has-metadata'); +module.exports = require('../../modules/_core').Reflect.hasMetadata; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/has-own-metadata.js b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/has-own-metadata.js new file mode 100644 index 00000000..d90935f0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/has-own-metadata.js @@ -0,0 +1,2 @@ +require('../../modules/es7.reflect.has-own-metadata'); +module.exports = require('../../modules/_core').Reflect.hasOwnMetadata; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/has.js b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/has.js new file mode 100644 index 00000000..8e34933c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/has.js @@ -0,0 +1,2 @@ +require('../../modules/es6.reflect.has'); +module.exports = require('../../modules/_core').Reflect.has; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/index.js b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/index.js new file mode 100644 index 00000000..a725cef2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/index.js @@ -0,0 +1,24 @@ +require('../../modules/es6.reflect.apply'); +require('../../modules/es6.reflect.construct'); +require('../../modules/es6.reflect.define-property'); +require('../../modules/es6.reflect.delete-property'); +require('../../modules/es6.reflect.enumerate'); +require('../../modules/es6.reflect.get'); +require('../../modules/es6.reflect.get-own-property-descriptor'); +require('../../modules/es6.reflect.get-prototype-of'); +require('../../modules/es6.reflect.has'); +require('../../modules/es6.reflect.is-extensible'); +require('../../modules/es6.reflect.own-keys'); +require('../../modules/es6.reflect.prevent-extensions'); +require('../../modules/es6.reflect.set'); +require('../../modules/es6.reflect.set-prototype-of'); +require('../../modules/es7.reflect.define-metadata'); +require('../../modules/es7.reflect.delete-metadata'); +require('../../modules/es7.reflect.get-metadata'); +require('../../modules/es7.reflect.get-metadata-keys'); +require('../../modules/es7.reflect.get-own-metadata'); +require('../../modules/es7.reflect.get-own-metadata-keys'); +require('../../modules/es7.reflect.has-metadata'); +require('../../modules/es7.reflect.has-own-metadata'); +require('../../modules/es7.reflect.metadata'); +module.exports = require('../../modules/_core').Reflect; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/is-extensible.js b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/is-extensible.js new file mode 100644 index 00000000..de41d683 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/is-extensible.js @@ -0,0 +1,2 @@ +require('../../modules/es6.reflect.is-extensible'); +module.exports = require('../../modules/_core').Reflect.isExtensible; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/metadata.js b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/metadata.js new file mode 100644 index 00000000..3f2b8ff6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/metadata.js @@ -0,0 +1,2 @@ +require('../../modules/es7.reflect.metadata'); +module.exports = require('../../modules/_core').Reflect.metadata; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/own-keys.js b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/own-keys.js new file mode 100644 index 00000000..bfcebc74 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/own-keys.js @@ -0,0 +1,2 @@ +require('../../modules/es6.reflect.own-keys'); +module.exports = require('../../modules/_core').Reflect.ownKeys; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/prevent-extensions.js b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/prevent-extensions.js new file mode 100644 index 00000000..b346da3b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/prevent-extensions.js @@ -0,0 +1,2 @@ +require('../../modules/es6.reflect.prevent-extensions'); +module.exports = require('../../modules/_core').Reflect.preventExtensions; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/set-prototype-of.js b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/set-prototype-of.js new file mode 100644 index 00000000..16b74359 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/set-prototype-of.js @@ -0,0 +1,2 @@ +require('../../modules/es6.reflect.set-prototype-of'); +module.exports = require('../../modules/_core').Reflect.setPrototypeOf; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/set.js b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/set.js new file mode 100644 index 00000000..834929ee --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/reflect/set.js @@ -0,0 +1,2 @@ +require('../../modules/es6.reflect.set'); +module.exports = require('../../modules/_core').Reflect.set; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/regexp/constructor.js b/pitfall/pdfkit/node_modules/core-js/library/fn/regexp/constructor.js new file mode 100644 index 00000000..90c13513 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/regexp/constructor.js @@ -0,0 +1,2 @@ +require('../../modules/es6.regexp.constructor'); +module.exports = RegExp; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/regexp/escape.js b/pitfall/pdfkit/node_modules/core-js/library/fn/regexp/escape.js new file mode 100644 index 00000000..d657a7d9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/regexp/escape.js @@ -0,0 +1,2 @@ +require('../../modules/core.regexp.escape'); +module.exports = require('../../modules/_core').RegExp.escape; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/regexp/flags.js b/pitfall/pdfkit/node_modules/core-js/library/fn/regexp/flags.js new file mode 100644 index 00000000..ef84ddbd --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/regexp/flags.js @@ -0,0 +1,5 @@ +require('../../modules/es6.regexp.flags'); +var flags = require('../../modules/_flags'); +module.exports = function(it){ + return flags.call(it); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/regexp/index.js b/pitfall/pdfkit/node_modules/core-js/library/fn/regexp/index.js new file mode 100644 index 00000000..61ced0b8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/regexp/index.js @@ -0,0 +1,9 @@ +require('../../modules/es6.regexp.constructor'); +require('../../modules/es6.regexp.to-string'); +require('../../modules/es6.regexp.flags'); +require('../../modules/es6.regexp.match'); +require('../../modules/es6.regexp.replace'); +require('../../modules/es6.regexp.search'); +require('../../modules/es6.regexp.split'); +require('../../modules/core.regexp.escape'); +module.exports = require('../../modules/_core').RegExp; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/regexp/match.js b/pitfall/pdfkit/node_modules/core-js/library/fn/regexp/match.js new file mode 100644 index 00000000..400d0921 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/regexp/match.js @@ -0,0 +1,5 @@ +require('../../modules/es6.regexp.match'); +var MATCH = require('../../modules/_wks')('match'); +module.exports = function(it, str){ + return RegExp.prototype[MATCH].call(it, str); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/regexp/replace.js b/pitfall/pdfkit/node_modules/core-js/library/fn/regexp/replace.js new file mode 100644 index 00000000..adde0adf --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/regexp/replace.js @@ -0,0 +1,5 @@ +require('../../modules/es6.regexp.replace'); +var REPLACE = require('../../modules/_wks')('replace'); +module.exports = function(it, str, replacer){ + return RegExp.prototype[REPLACE].call(it, str, replacer); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/regexp/search.js b/pitfall/pdfkit/node_modules/core-js/library/fn/regexp/search.js new file mode 100644 index 00000000..4e149d05 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/regexp/search.js @@ -0,0 +1,5 @@ +require('../../modules/es6.regexp.search'); +var SEARCH = require('../../modules/_wks')('search'); +module.exports = function(it, str){ + return RegExp.prototype[SEARCH].call(it, str); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/regexp/split.js b/pitfall/pdfkit/node_modules/core-js/library/fn/regexp/split.js new file mode 100644 index 00000000..b92d09fa --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/regexp/split.js @@ -0,0 +1,5 @@ +require('../../modules/es6.regexp.split'); +var SPLIT = require('../../modules/_wks')('split'); +module.exports = function(it, str, limit){ + return RegExp.prototype[SPLIT].call(it, str, limit); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/regexp/to-string.js b/pitfall/pdfkit/node_modules/core-js/library/fn/regexp/to-string.js new file mode 100644 index 00000000..29d5d037 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/regexp/to-string.js @@ -0,0 +1,5 @@ +'use strict'; +require('../../modules/es6.regexp.to-string'); +module.exports = function toString(it){ + return RegExp.prototype.toString.call(it); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/set-immediate.js b/pitfall/pdfkit/node_modules/core-js/library/fn/set-immediate.js new file mode 100644 index 00000000..25083136 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/set-immediate.js @@ -0,0 +1,2 @@ +require('../modules/web.immediate'); +module.exports = require('../modules/_core').setImmediate; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/set-interval.js b/pitfall/pdfkit/node_modules/core-js/library/fn/set-interval.js new file mode 100644 index 00000000..484447ff --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/set-interval.js @@ -0,0 +1,2 @@ +require('../modules/web.timers'); +module.exports = require('../modules/_core').setInterval; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/set-timeout.js b/pitfall/pdfkit/node_modules/core-js/library/fn/set-timeout.js new file mode 100644 index 00000000..8ebbb2e4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/set-timeout.js @@ -0,0 +1,2 @@ +require('../modules/web.timers'); +module.exports = require('../modules/_core').setTimeout; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/set.js b/pitfall/pdfkit/node_modules/core-js/library/fn/set.js new file mode 100644 index 00000000..a8b49652 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/set.js @@ -0,0 +1,6 @@ +require('../modules/es6.object.to-string'); +require('../modules/es6.string.iterator'); +require('../modules/web.dom.iterable'); +require('../modules/es6.set'); +require('../modules/es7.set.to-json'); +module.exports = require('../modules/_core').Set; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/anchor.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/anchor.js new file mode 100644 index 00000000..ba4ef813 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/anchor.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.anchor'); +module.exports = require('../../modules/_core').String.anchor; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/at.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/at.js new file mode 100644 index 00000000..ab6aec15 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/at.js @@ -0,0 +1,2 @@ +require('../../modules/es7.string.at'); +module.exports = require('../../modules/_core').String.at; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/big.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/big.js new file mode 100644 index 00000000..ab707907 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/big.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.big'); +module.exports = require('../../modules/_core').String.big; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/blink.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/blink.js new file mode 100644 index 00000000..c748079b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/blink.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.blink'); +module.exports = require('../../modules/_core').String.blink; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/bold.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/bold.js new file mode 100644 index 00000000..2d36bda3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/bold.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.bold'); +module.exports = require('../../modules/_core').String.bold; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/code-point-at.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/code-point-at.js new file mode 100644 index 00000000..be141e82 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/code-point-at.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.code-point-at'); +module.exports = require('../../modules/_core').String.codePointAt; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/ends-with.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/ends-with.js new file mode 100644 index 00000000..5e427753 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/ends-with.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.ends-with'); +module.exports = require('../../modules/_core').String.endsWith; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/escape-html.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/escape-html.js new file mode 100644 index 00000000..49176ca6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/escape-html.js @@ -0,0 +1,2 @@ +require('../../modules/core.string.escape-html'); +module.exports = require('../../modules/_core').String.escapeHTML; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/fixed.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/fixed.js new file mode 100644 index 00000000..77e233a3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/fixed.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.fixed'); +module.exports = require('../../modules/_core').String.fixed; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/fontcolor.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/fontcolor.js new file mode 100644 index 00000000..079235a1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/fontcolor.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.fontcolor'); +module.exports = require('../../modules/_core').String.fontcolor; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/fontsize.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/fontsize.js new file mode 100644 index 00000000..8cb2555c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/fontsize.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.fontsize'); +module.exports = require('../../modules/_core').String.fontsize; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/from-code-point.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/from-code-point.js new file mode 100644 index 00000000..93fc53ae --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/from-code-point.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.from-code-point'); +module.exports = require('../../modules/_core').String.fromCodePoint; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/includes.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/includes.js new file mode 100644 index 00000000..c9736404 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/includes.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.includes'); +module.exports = require('../../modules/_core').String.includes; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/index.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/index.js new file mode 100644 index 00000000..6485a9b2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/index.js @@ -0,0 +1,35 @@ +require('../../modules/es6.string.from-code-point'); +require('../../modules/es6.string.raw'); +require('../../modules/es6.string.trim'); +require('../../modules/es6.string.iterator'); +require('../../modules/es6.string.code-point-at'); +require('../../modules/es6.string.ends-with'); +require('../../modules/es6.string.includes'); +require('../../modules/es6.string.repeat'); +require('../../modules/es6.string.starts-with'); +require('../../modules/es6.regexp.match'); +require('../../modules/es6.regexp.replace'); +require('../../modules/es6.regexp.search'); +require('../../modules/es6.regexp.split'); +require('../../modules/es6.string.anchor'); +require('../../modules/es6.string.big'); +require('../../modules/es6.string.blink'); +require('../../modules/es6.string.bold'); +require('../../modules/es6.string.fixed'); +require('../../modules/es6.string.fontcolor'); +require('../../modules/es6.string.fontsize'); +require('../../modules/es6.string.italics'); +require('../../modules/es6.string.link'); +require('../../modules/es6.string.small'); +require('../../modules/es6.string.strike'); +require('../../modules/es6.string.sub'); +require('../../modules/es6.string.sup'); +require('../../modules/es7.string.at'); +require('../../modules/es7.string.pad-start'); +require('../../modules/es7.string.pad-end'); +require('../../modules/es7.string.trim-left'); +require('../../modules/es7.string.trim-right'); +require('../../modules/es7.string.match-all'); +require('../../modules/core.string.escape-html'); +require('../../modules/core.string.unescape-html'); +module.exports = require('../../modules/_core').String; diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/italics.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/italics.js new file mode 100644 index 00000000..378450eb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/italics.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.italics'); +module.exports = require('../../modules/_core').String.italics; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/iterator.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/iterator.js new file mode 100644 index 00000000..947e7558 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/iterator.js @@ -0,0 +1,5 @@ +require('../../modules/es6.string.iterator'); +var get = require('../../modules/_iterators').String; +module.exports = function(it){ + return get.call(it); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/link.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/link.js new file mode 100644 index 00000000..1eb2c6dd --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/link.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.link'); +module.exports = require('../../modules/_core').String.link; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/match-all.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/match-all.js new file mode 100644 index 00000000..1a1dfeb6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/match-all.js @@ -0,0 +1,2 @@ +require('../../modules/es7.string.match-all'); +module.exports = require('../../modules/_core').String.matchAll; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/pad-end.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/pad-end.js new file mode 100644 index 00000000..23eb9f95 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/pad-end.js @@ -0,0 +1,2 @@ +require('../../modules/es7.string.pad-end'); +module.exports = require('../../modules/_core').String.padEnd; diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/pad-start.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/pad-start.js new file mode 100644 index 00000000..ff12739f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/pad-start.js @@ -0,0 +1,2 @@ +require('../../modules/es7.string.pad-start'); +module.exports = require('../../modules/_core').String.padStart; diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/raw.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/raw.js new file mode 100644 index 00000000..713550fb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/raw.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.raw'); +module.exports = require('../../modules/_core').String.raw; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/repeat.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/repeat.js new file mode 100644 index 00000000..fa75b13e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/repeat.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.repeat'); +module.exports = require('../../modules/_core').String.repeat; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/small.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/small.js new file mode 100644 index 00000000..0438290d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/small.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.small'); +module.exports = require('../../modules/_core').String.small; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/starts-with.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/starts-with.js new file mode 100644 index 00000000..d62512a3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/starts-with.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.starts-with'); +module.exports = require('../../modules/_core').String.startsWith; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/strike.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/strike.js new file mode 100644 index 00000000..b79946c8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/strike.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.strike'); +module.exports = require('../../modules/_core').String.strike; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/sub.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/sub.js new file mode 100644 index 00000000..54d0671e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/sub.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.sub'); +module.exports = require('../../modules/_core').String.sub; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/sup.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/sup.js new file mode 100644 index 00000000..645e0372 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/sup.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.sup'); +module.exports = require('../../modules/_core').String.sup; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/trim-end.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/trim-end.js new file mode 100644 index 00000000..f3bdf6fb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/trim-end.js @@ -0,0 +1,2 @@ +require('../../modules/es7.string.trim-right'); +module.exports = require('../../modules/_core').String.trimRight; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/trim-left.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/trim-left.js new file mode 100644 index 00000000..04671d36 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/trim-left.js @@ -0,0 +1,2 @@ +require('../../modules/es7.string.trim-left'); +module.exports = require('../../modules/_core').String.trimLeft; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/trim-right.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/trim-right.js new file mode 100644 index 00000000..f3bdf6fb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/trim-right.js @@ -0,0 +1,2 @@ +require('../../modules/es7.string.trim-right'); +module.exports = require('../../modules/_core').String.trimRight; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/trim-start.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/trim-start.js new file mode 100644 index 00000000..04671d36 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/trim-start.js @@ -0,0 +1,2 @@ +require('../../modules/es7.string.trim-left'); +module.exports = require('../../modules/_core').String.trimLeft; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/trim.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/trim.js new file mode 100644 index 00000000..c536e12e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/trim.js @@ -0,0 +1,2 @@ +require('../../modules/es6.string.trim'); +module.exports = require('../../modules/_core').String.trim; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/unescape-html.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/unescape-html.js new file mode 100644 index 00000000..7c2c55c8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/unescape-html.js @@ -0,0 +1,2 @@ +require('../../modules/core.string.unescape-html'); +module.exports = require('../../modules/_core').String.unescapeHTML; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/anchor.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/anchor.js new file mode 100644 index 00000000..6f74b7e8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/anchor.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.anchor'); +module.exports = require('../../../modules/_entry-virtual')('String').anchor; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/at.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/at.js new file mode 100644 index 00000000..3b961438 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/at.js @@ -0,0 +1,2 @@ +require('../../../modules/es7.string.at'); +module.exports = require('../../../modules/_entry-virtual')('String').at; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/big.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/big.js new file mode 100644 index 00000000..57ac7d5d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/big.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.big'); +module.exports = require('../../../modules/_entry-virtual')('String').big; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/blink.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/blink.js new file mode 100644 index 00000000..5c4cea80 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/blink.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.blink'); +module.exports = require('../../../modules/_entry-virtual')('String').blink; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/bold.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/bold.js new file mode 100644 index 00000000..c566bf2d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/bold.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.bold'); +module.exports = require('../../../modules/_entry-virtual')('String').bold; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/code-point-at.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/code-point-at.js new file mode 100644 index 00000000..87375219 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/code-point-at.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.code-point-at'); +module.exports = require('../../../modules/_entry-virtual')('String').codePointAt; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/ends-with.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/ends-with.js new file mode 100644 index 00000000..90bc6e79 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/ends-with.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.ends-with'); +module.exports = require('../../../modules/_entry-virtual')('String').endsWith; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/escape-html.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/escape-html.js new file mode 100644 index 00000000..3342bcec --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/escape-html.js @@ -0,0 +1,2 @@ +require('../../../modules/core.string.escape-html'); +module.exports = require('../../../modules/_entry-virtual')('String').escapeHTML; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/fixed.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/fixed.js new file mode 100644 index 00000000..e830654f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/fixed.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.fixed'); +module.exports = require('../../../modules/_entry-virtual')('String').fixed; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/fontcolor.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/fontcolor.js new file mode 100644 index 00000000..cfb9b2c0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/fontcolor.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.fontcolor'); +module.exports = require('../../../modules/_entry-virtual')('String').fontcolor; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/fontsize.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/fontsize.js new file mode 100644 index 00000000..de8f5161 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/fontsize.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.fontsize'); +module.exports = require('../../../modules/_entry-virtual')('String').fontsize; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/includes.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/includes.js new file mode 100644 index 00000000..1e4793d6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/includes.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.includes'); +module.exports = require('../../../modules/_entry-virtual')('String').includes; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/index.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/index.js new file mode 100644 index 00000000..0e65d20c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/index.js @@ -0,0 +1,33 @@ +require('../../../modules/es6.string.trim'); +require('../../../modules/es6.string.iterator'); +require('../../../modules/es6.string.code-point-at'); +require('../../../modules/es6.string.ends-with'); +require('../../../modules/es6.string.includes'); +require('../../../modules/es6.string.repeat'); +require('../../../modules/es6.string.starts-with'); +require('../../../modules/es6.regexp.match'); +require('../../../modules/es6.regexp.replace'); +require('../../../modules/es6.regexp.search'); +require('../../../modules/es6.regexp.split'); +require('../../../modules/es6.string.anchor'); +require('../../../modules/es6.string.big'); +require('../../../modules/es6.string.blink'); +require('../../../modules/es6.string.bold'); +require('../../../modules/es6.string.fixed'); +require('../../../modules/es6.string.fontcolor'); +require('../../../modules/es6.string.fontsize'); +require('../../../modules/es6.string.italics'); +require('../../../modules/es6.string.link'); +require('../../../modules/es6.string.small'); +require('../../../modules/es6.string.strike'); +require('../../../modules/es6.string.sub'); +require('../../../modules/es6.string.sup'); +require('../../../modules/es7.string.at'); +require('../../../modules/es7.string.pad-start'); +require('../../../modules/es7.string.pad-end'); +require('../../../modules/es7.string.trim-left'); +require('../../../modules/es7.string.trim-right'); +require('../../../modules/es7.string.match-all'); +require('../../../modules/core.string.escape-html'); +require('../../../modules/core.string.unescape-html'); +module.exports = require('../../../modules/_entry-virtual')('String'); diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/italics.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/italics.js new file mode 100644 index 00000000..f8f1d338 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/italics.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.italics'); +module.exports = require('../../../modules/_entry-virtual')('String').italics; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/iterator.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/iterator.js new file mode 100644 index 00000000..7efe2f93 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/iterator.js @@ -0,0 +1,2 @@ +require('../../../modules/core.number.iterator'); +module.exports = require('../../../modules/_iterators').String; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/link.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/link.js new file mode 100644 index 00000000..4b2eea8a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/link.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.link'); +module.exports = require('../../../modules/_entry-virtual')('String').link; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/match-all.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/match-all.js new file mode 100644 index 00000000..9208873a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/match-all.js @@ -0,0 +1,2 @@ +require('../../../modules/es7.string.match-all'); +module.exports = require('../../../modules/_entry-virtual')('String').matchAll; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/pad-end.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/pad-end.js new file mode 100644 index 00000000..81e5ac04 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/pad-end.js @@ -0,0 +1,2 @@ +require('../../../modules/es7.string.pad-end'); +module.exports = require('../../../modules/_entry-virtual')('String').padEnd; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/pad-start.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/pad-start.js new file mode 100644 index 00000000..54cf3a59 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/pad-start.js @@ -0,0 +1,2 @@ +require('../../../modules/es7.string.pad-start'); +module.exports = require('../../../modules/_entry-virtual')('String').padStart; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/repeat.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/repeat.js new file mode 100644 index 00000000..d08cf6a5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/repeat.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.repeat'); +module.exports = require('../../../modules/_entry-virtual')('String').repeat; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/small.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/small.js new file mode 100644 index 00000000..201bf9b6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/small.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.small'); +module.exports = require('../../../modules/_entry-virtual')('String').small; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/starts-with.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/starts-with.js new file mode 100644 index 00000000..f8897d15 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/starts-with.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.starts-with'); +module.exports = require('../../../modules/_entry-virtual')('String').startsWith; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/strike.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/strike.js new file mode 100644 index 00000000..4572db91 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/strike.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.strike'); +module.exports = require('../../../modules/_entry-virtual')('String').strike; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/sub.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/sub.js new file mode 100644 index 00000000..a13611ec --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/sub.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.sub'); +module.exports = require('../../../modules/_entry-virtual')('String').sub; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/sup.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/sup.js new file mode 100644 index 00000000..07695329 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/sup.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.sup'); +module.exports = require('../../../modules/_entry-virtual')('String').sup; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/trim-end.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/trim-end.js new file mode 100644 index 00000000..14c25ac8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/trim-end.js @@ -0,0 +1,2 @@ +require('../../../modules/es7.string.trim-right'); +module.exports = require('../../../modules/_entry-virtual')('String').trimRight; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/trim-left.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/trim-left.js new file mode 100644 index 00000000..aabcfb3f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/trim-left.js @@ -0,0 +1,2 @@ +require('../../../modules/es7.string.trim-left'); +module.exports = require('../../../modules/_entry-virtual')('String').trimLeft; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/trim-right.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/trim-right.js new file mode 100644 index 00000000..14c25ac8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/trim-right.js @@ -0,0 +1,2 @@ +require('../../../modules/es7.string.trim-right'); +module.exports = require('../../../modules/_entry-virtual')('String').trimRight; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/trim-start.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/trim-start.js new file mode 100644 index 00000000..aabcfb3f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/trim-start.js @@ -0,0 +1,2 @@ +require('../../../modules/es7.string.trim-left'); +module.exports = require('../../../modules/_entry-virtual')('String').trimLeft; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/trim.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/trim.js new file mode 100644 index 00000000..23fbcbc5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/trim.js @@ -0,0 +1,2 @@ +require('../../../modules/es6.string.trim'); +module.exports = require('../../../modules/_entry-virtual')('String').trim; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/unescape-html.js b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/unescape-html.js new file mode 100644 index 00000000..51eb59fc --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/string/virtual/unescape-html.js @@ -0,0 +1,2 @@ +require('../../../modules/core.string.unescape-html'); +module.exports = require('../../../modules/_entry-virtual')('String').unescapeHTML; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/async-iterator.js b/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/async-iterator.js new file mode 100644 index 00000000..aca10f96 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/async-iterator.js @@ -0,0 +1,2 @@ +require('../../modules/es7.symbol.async-iterator'); +module.exports = require('../../modules/_wks-ext').f('asyncIterator'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/for.js b/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/for.js new file mode 100644 index 00000000..c9e93c13 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/for.js @@ -0,0 +1,2 @@ +require('../../modules/es6.symbol'); +module.exports = require('../../modules/_core').Symbol['for']; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/has-instance.js b/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/has-instance.js new file mode 100644 index 00000000..f3ec9cf6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/has-instance.js @@ -0,0 +1,2 @@ +require('../../modules/es6.function.has-instance'); +module.exports = require('../../modules/_wks-ext').f('hasInstance'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/index.js b/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/index.js new file mode 100644 index 00000000..64c0f5f4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/index.js @@ -0,0 +1,5 @@ +require('../../modules/es6.symbol'); +require('../../modules/es6.object.to-string'); +require('../../modules/es7.symbol.async-iterator'); +require('../../modules/es7.symbol.observable'); +module.exports = require('../../modules/_core').Symbol; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/is-concat-spreadable.js b/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/is-concat-spreadable.js new file mode 100644 index 00000000..49ed7a1d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/is-concat-spreadable.js @@ -0,0 +1 @@ +module.exports = require('../../modules/_wks-ext').f('isConcatSpreadable'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/iterator.js b/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/iterator.js new file mode 100644 index 00000000..50352280 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/iterator.js @@ -0,0 +1,3 @@ +require('../../modules/es6.string.iterator'); +require('../../modules/web.dom.iterable'); +module.exports = require('../../modules/_wks-ext').f('iterator'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/key-for.js b/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/key-for.js new file mode 100644 index 00000000..d9b595ff --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/key-for.js @@ -0,0 +1,2 @@ +require('../../modules/es6.symbol'); +module.exports = require('../../modules/_core').Symbol.keyFor; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/match.js b/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/match.js new file mode 100644 index 00000000..d27db65b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/match.js @@ -0,0 +1,2 @@ +require('../../modules/es6.regexp.match'); +module.exports = require('../../modules/_wks-ext').f('match'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/observable.js b/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/observable.js new file mode 100644 index 00000000..884cebfd --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/observable.js @@ -0,0 +1,2 @@ +require('../../modules/es7.symbol.observable'); +module.exports = require('../../modules/_wks-ext').f('observable'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/replace.js b/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/replace.js new file mode 100644 index 00000000..3ef60f5e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/replace.js @@ -0,0 +1,2 @@ +require('../../modules/es6.regexp.replace'); +module.exports = require('../../modules/_wks-ext').f('replace'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/search.js b/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/search.js new file mode 100644 index 00000000..aee84f9e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/search.js @@ -0,0 +1,2 @@ +require('../../modules/es6.regexp.search'); +module.exports = require('../../modules/_wks-ext').f('search'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/species.js b/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/species.js new file mode 100644 index 00000000..a425eb2d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/species.js @@ -0,0 +1 @@ +module.exports = require('../../modules/_wks-ext').f('species'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/split.js b/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/split.js new file mode 100644 index 00000000..8535932f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/split.js @@ -0,0 +1,2 @@ +require('../../modules/es6.regexp.split'); +module.exports = require('../../modules/_wks-ext').f('split'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/to-primitive.js b/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/to-primitive.js new file mode 100644 index 00000000..20c831b8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/to-primitive.js @@ -0,0 +1 @@ +module.exports = require('../../modules/_wks-ext').f('toPrimitive'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/to-string-tag.js b/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/to-string-tag.js new file mode 100644 index 00000000..101baf27 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/to-string-tag.js @@ -0,0 +1,2 @@ +require('../../modules/es6.object.to-string'); +module.exports = require('../../modules/_wks-ext').f('toStringTag'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/unscopables.js b/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/unscopables.js new file mode 100644 index 00000000..6c4146b2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/symbol/unscopables.js @@ -0,0 +1 @@ +module.exports = require('../../modules/_wks-ext').f('unscopables'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/system/global.js b/pitfall/pdfkit/node_modules/core-js/library/fn/system/global.js new file mode 100644 index 00000000..c3219d6f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/system/global.js @@ -0,0 +1,2 @@ +require('../../modules/es7.system.global'); +module.exports = require('../../modules/_core').System.global; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/system/index.js b/pitfall/pdfkit/node_modules/core-js/library/fn/system/index.js new file mode 100644 index 00000000..eae78ddd --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/system/index.js @@ -0,0 +1,2 @@ +require('../../modules/es7.system.global'); +module.exports = require('../../modules/_core').System; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/typed/array-buffer.js b/pitfall/pdfkit/node_modules/core-js/library/fn/typed/array-buffer.js new file mode 100644 index 00000000..fe08f7f2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/typed/array-buffer.js @@ -0,0 +1,3 @@ +require('../../modules/es6.typed.array-buffer'); +require('../../modules/es6.object.to-string'); +module.exports = require('../../modules/_core').ArrayBuffer; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/typed/data-view.js b/pitfall/pdfkit/node_modules/core-js/library/fn/typed/data-view.js new file mode 100644 index 00000000..09dbb38a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/typed/data-view.js @@ -0,0 +1,3 @@ +require('../../modules/es6.typed.data-view'); +require('../../modules/es6.object.to-string'); +module.exports = require('../../modules/_core').DataView; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/typed/float32-array.js b/pitfall/pdfkit/node_modules/core-js/library/fn/typed/float32-array.js new file mode 100644 index 00000000..1191fecb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/typed/float32-array.js @@ -0,0 +1,2 @@ +require('../../modules/es6.typed.float32-array'); +module.exports = require('../../modules/_core').Float32Array; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/typed/float64-array.js b/pitfall/pdfkit/node_modules/core-js/library/fn/typed/float64-array.js new file mode 100644 index 00000000..6073a682 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/typed/float64-array.js @@ -0,0 +1,2 @@ +require('../../modules/es6.typed.float64-array'); +module.exports = require('../../modules/_core').Float64Array; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/typed/index.js b/pitfall/pdfkit/node_modules/core-js/library/fn/typed/index.js new file mode 100644 index 00000000..7babe09d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/typed/index.js @@ -0,0 +1,13 @@ +require('../../modules/es6.typed.array-buffer'); +require('../../modules/es6.typed.data-view'); +require('../../modules/es6.typed.int8-array'); +require('../../modules/es6.typed.uint8-array'); +require('../../modules/es6.typed.uint8-clamped-array'); +require('../../modules/es6.typed.int16-array'); +require('../../modules/es6.typed.uint16-array'); +require('../../modules/es6.typed.int32-array'); +require('../../modules/es6.typed.uint32-array'); +require('../../modules/es6.typed.float32-array'); +require('../../modules/es6.typed.float64-array'); +require('../../modules/es6.object.to-string'); +module.exports = require('../../modules/_core'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/typed/int16-array.js b/pitfall/pdfkit/node_modules/core-js/library/fn/typed/int16-array.js new file mode 100644 index 00000000..0722549d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/typed/int16-array.js @@ -0,0 +1,2 @@ +require('../../modules/es6.typed.int16-array'); +module.exports = require('../../modules/_core').Int16Array; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/typed/int32-array.js b/pitfall/pdfkit/node_modules/core-js/library/fn/typed/int32-array.js new file mode 100644 index 00000000..13613622 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/typed/int32-array.js @@ -0,0 +1,2 @@ +require('../../modules/es6.typed.int32-array'); +module.exports = require('../../modules/_core').Int32Array; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/typed/int8-array.js b/pitfall/pdfkit/node_modules/core-js/library/fn/typed/int8-array.js new file mode 100644 index 00000000..edf48c79 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/typed/int8-array.js @@ -0,0 +1,2 @@ +require('../../modules/es6.typed.int8-array'); +module.exports = require('../../modules/_core').Int8Array; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/typed/uint16-array.js b/pitfall/pdfkit/node_modules/core-js/library/fn/typed/uint16-array.js new file mode 100644 index 00000000..3ff11550 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/typed/uint16-array.js @@ -0,0 +1,2 @@ +require('../../modules/es6.typed.uint16-array'); +module.exports = require('../../modules/_core').Uint16Array; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/typed/uint32-array.js b/pitfall/pdfkit/node_modules/core-js/library/fn/typed/uint32-array.js new file mode 100644 index 00000000..47bb4c21 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/typed/uint32-array.js @@ -0,0 +1,2 @@ +require('../../modules/es6.typed.uint32-array'); +module.exports = require('../../modules/_core').Uint32Array; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/typed/uint8-array.js b/pitfall/pdfkit/node_modules/core-js/library/fn/typed/uint8-array.js new file mode 100644 index 00000000..fd8a4b11 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/typed/uint8-array.js @@ -0,0 +1,2 @@ +require('../../modules/es6.typed.uint8-array'); +module.exports = require('../../modules/_core').Uint8Array; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/typed/uint8-clamped-array.js b/pitfall/pdfkit/node_modules/core-js/library/fn/typed/uint8-clamped-array.js new file mode 100644 index 00000000..c688657c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/typed/uint8-clamped-array.js @@ -0,0 +1,2 @@ +require('../../modules/es6.typed.uint8-clamped-array'); +module.exports = require('../../modules/_core').Uint8ClampedArray; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/weak-map.js b/pitfall/pdfkit/node_modules/core-js/library/fn/weak-map.js new file mode 100644 index 00000000..00cac1ad --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/weak-map.js @@ -0,0 +1,4 @@ +require('../modules/es6.object.to-string'); +require('../modules/web.dom.iterable'); +require('../modules/es6.weak-map'); +module.exports = require('../modules/_core').WeakMap; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/fn/weak-set.js b/pitfall/pdfkit/node_modules/core-js/library/fn/weak-set.js new file mode 100644 index 00000000..eef1af2a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/fn/weak-set.js @@ -0,0 +1,4 @@ +require('../modules/es6.object.to-string'); +require('../modules/web.dom.iterable'); +require('../modules/es6.weak-set'); +module.exports = require('../modules/_core').WeakSet; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/index.js b/pitfall/pdfkit/node_modules/core-js/library/index.js new file mode 100644 index 00000000..78b9e3d4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/index.js @@ -0,0 +1,16 @@ +require('./shim'); +require('./modules/core.dict'); +require('./modules/core.get-iterator-method'); +require('./modules/core.get-iterator'); +require('./modules/core.is-iterable'); +require('./modules/core.delay'); +require('./modules/core.function.part'); +require('./modules/core.object.is-object'); +require('./modules/core.object.classof'); +require('./modules/core.object.define'); +require('./modules/core.object.make'); +require('./modules/core.number.iterator'); +require('./modules/core.regexp.escape'); +require('./modules/core.string.escape-html'); +require('./modules/core.string.unescape-html'); +module.exports = require('./modules/_core'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_a-function.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_a-function.js new file mode 100644 index 00000000..8c35f451 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_a-function.js @@ -0,0 +1,4 @@ +module.exports = function(it){ + if(typeof it != 'function')throw TypeError(it + ' is not a function!'); + return it; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_a-number-value.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_a-number-value.js new file mode 100644 index 00000000..7bcbd7b7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_a-number-value.js @@ -0,0 +1,5 @@ +var cof = require('./_cof'); +module.exports = function(it, msg){ + if(typeof it != 'number' && cof(it) != 'Number')throw TypeError(msg); + return +it; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_add-to-unscopables.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_add-to-unscopables.js new file mode 100644 index 00000000..faf87af3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_add-to-unscopables.js @@ -0,0 +1 @@ +module.exports = function(){ /* empty */ }; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_an-instance.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_an-instance.js new file mode 100644 index 00000000..e4dfad3d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_an-instance.js @@ -0,0 +1,5 @@ +module.exports = function(it, Constructor, name, forbiddenField){ + if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){ + throw TypeError(name + ': incorrect invocation!'); + } return it; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_an-object.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_an-object.js new file mode 100644 index 00000000..59a8a3a3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_an-object.js @@ -0,0 +1,5 @@ +var isObject = require('./_is-object'); +module.exports = function(it){ + if(!isObject(it))throw TypeError(it + ' is not an object!'); + return it; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_array-copy-within.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_array-copy-within.js new file mode 100644 index 00000000..d901a32f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_array-copy-within.js @@ -0,0 +1,26 @@ +// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) +'use strict'; +var toObject = require('./_to-object') + , toIndex = require('./_to-index') + , toLength = require('./_to-length'); + +module.exports = [].copyWithin || function copyWithin(target/*= 0*/, start/*= 0, end = @length*/){ + var O = toObject(this) + , len = toLength(O.length) + , to = toIndex(target, len) + , from = toIndex(start, len) + , end = arguments.length > 2 ? arguments[2] : undefined + , count = Math.min((end === undefined ? len : toIndex(end, len)) - from, len - to) + , inc = 1; + if(from < to && to < from + count){ + inc = -1; + from += count - 1; + to += count - 1; + } + while(count-- > 0){ + if(from in O)O[to] = O[from]; + else delete O[to]; + to += inc; + from += inc; + } return O; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_array-fill.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_array-fill.js new file mode 100644 index 00000000..b21bb7ed --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_array-fill.js @@ -0,0 +1,15 @@ +// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) +'use strict'; +var toObject = require('./_to-object') + , toIndex = require('./_to-index') + , toLength = require('./_to-length'); +module.exports = function fill(value /*, start = 0, end = @length */){ + var O = toObject(this) + , length = toLength(O.length) + , aLen = arguments.length + , index = toIndex(aLen > 1 ? arguments[1] : undefined, length) + , end = aLen > 2 ? arguments[2] : undefined + , endPos = end === undefined ? length : toIndex(end, length); + while(endPos > index)O[index++] = value; + return O; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_array-from-iterable.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_array-from-iterable.js new file mode 100644 index 00000000..b5c454fb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_array-from-iterable.js @@ -0,0 +1,7 @@ +var forOf = require('./_for-of'); + +module.exports = function(iter, ITERATOR){ + var result = []; + forOf(iter, false, result.push, result, ITERATOR); + return result; +}; diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_array-includes.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_array-includes.js new file mode 100644 index 00000000..c70b064d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_array-includes.js @@ -0,0 +1,21 @@ +// false -> Array#indexOf +// true -> Array#includes +var toIObject = require('./_to-iobject') + , toLength = require('./_to-length') + , toIndex = require('./_to-index'); +module.exports = function(IS_INCLUDES){ + return function($this, el, fromIndex){ + var O = toIObject($this) + , length = toLength(O.length) + , index = toIndex(fromIndex, length) + , value; + // Array#includes uses SameValueZero equality algorithm + if(IS_INCLUDES && el != el)while(length > index){ + value = O[index++]; + if(value != value)return true; + // Array#toIndex ignores holes, Array#includes - not + } else for(;length > index; index++)if(IS_INCLUDES || index in O){ + if(O[index] === el)return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_array-methods.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_array-methods.js new file mode 100644 index 00000000..8ffbe116 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_array-methods.js @@ -0,0 +1,44 @@ +// 0 -> Array#forEach +// 1 -> Array#map +// 2 -> Array#filter +// 3 -> Array#some +// 4 -> Array#every +// 5 -> Array#find +// 6 -> Array#findIndex +var ctx = require('./_ctx') + , IObject = require('./_iobject') + , toObject = require('./_to-object') + , toLength = require('./_to-length') + , asc = require('./_array-species-create'); +module.exports = function(TYPE, $create){ + var IS_MAP = TYPE == 1 + , IS_FILTER = TYPE == 2 + , IS_SOME = TYPE == 3 + , IS_EVERY = TYPE == 4 + , IS_FIND_INDEX = TYPE == 6 + , NO_HOLES = TYPE == 5 || IS_FIND_INDEX + , create = $create || asc; + return function($this, callbackfn, that){ + var O = toObject($this) + , self = IObject(O) + , f = ctx(callbackfn, that, 3) + , length = toLength(self.length) + , index = 0 + , result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined + , val, res; + for(;length > index; index++)if(NO_HOLES || index in self){ + val = self[index]; + res = f(val, index, O); + if(TYPE){ + if(IS_MAP)result[index] = res; // map + else if(res)switch(TYPE){ + case 3: return true; // some + case 5: return val; // find + case 6: return index; // findIndex + case 2: result.push(val); // filter + } else if(IS_EVERY)return false; // every + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; + }; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_array-reduce.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_array-reduce.js new file mode 100644 index 00000000..c807d544 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_array-reduce.js @@ -0,0 +1,28 @@ +var aFunction = require('./_a-function') + , toObject = require('./_to-object') + , IObject = require('./_iobject') + , toLength = require('./_to-length'); + +module.exports = function(that, callbackfn, aLen, memo, isRight){ + aFunction(callbackfn); + var O = toObject(that) + , self = IObject(O) + , length = toLength(O.length) + , index = isRight ? length - 1 : 0 + , i = isRight ? -1 : 1; + if(aLen < 2)for(;;){ + if(index in self){ + memo = self[index]; + index += i; + break; + } + index += i; + if(isRight ? index < 0 : length <= index){ + throw TypeError('Reduce of empty array with no initial value'); + } + } + for(;isRight ? index >= 0 : length > index; index += i)if(index in self){ + memo = callbackfn(memo, self[index], index, O); + } + return memo; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_array-species-constructor.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_array-species-constructor.js new file mode 100644 index 00000000..a715389f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_array-species-constructor.js @@ -0,0 +1,16 @@ +var isObject = require('./_is-object') + , isArray = require('./_is-array') + , SPECIES = require('./_wks')('species'); + +module.exports = function(original){ + var C; + if(isArray(original)){ + C = original.constructor; + // cross-realm fallback + if(typeof C == 'function' && (C === Array || isArray(C.prototype)))C = undefined; + if(isObject(C)){ + C = C[SPECIES]; + if(C === null)C = undefined; + } + } return C === undefined ? Array : C; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_array-species-create.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_array-species-create.js new file mode 100644 index 00000000..cbd18bc6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_array-species-create.js @@ -0,0 +1,6 @@ +// 9.4.2.3 ArraySpeciesCreate(originalArray, length) +var speciesConstructor = require('./_array-species-constructor'); + +module.exports = function(original, length){ + return new (speciesConstructor(original))(length); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_bind.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_bind.js new file mode 100644 index 00000000..1f7b0174 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_bind.js @@ -0,0 +1,24 @@ +'use strict'; +var aFunction = require('./_a-function') + , isObject = require('./_is-object') + , invoke = require('./_invoke') + , arraySlice = [].slice + , factories = {}; + +var construct = function(F, len, args){ + if(!(len in factories)){ + for(var n = [], i = 0; i < len; i++)n[i] = 'a[' + i + ']'; + factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); + } return factories[len](F, args); +}; + +module.exports = Function.bind || function bind(that /*, args... */){ + var fn = aFunction(this) + , partArgs = arraySlice.call(arguments, 1); + var bound = function(/* args... */){ + var args = partArgs.concat(arraySlice.call(arguments)); + return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); + }; + if(isObject(fn.prototype))bound.prototype = fn.prototype; + return bound; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_classof.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_classof.js new file mode 100644 index 00000000..dab3a80f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_classof.js @@ -0,0 +1,23 @@ +// getting tag from 19.1.3.6 Object.prototype.toString() +var cof = require('./_cof') + , TAG = require('./_wks')('toStringTag') + // ES3 wrong here + , ARG = cof(function(){ return arguments; }()) == 'Arguments'; + +// fallback for IE11 Script Access Denied error +var tryGet = function(it, key){ + try { + return it[key]; + } catch(e){ /* empty */ } +}; + +module.exports = function(it){ + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T + // builtinTag case + : ARG ? cof(O) + // ES3 arguments fallback + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_cof.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_cof.js new file mode 100644 index 00000000..1dd2779a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_cof.js @@ -0,0 +1,5 @@ +var toString = {}.toString; + +module.exports = function(it){ + return toString.call(it).slice(8, -1); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_collection-strong.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_collection-strong.js new file mode 100644 index 00000000..55e4b615 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_collection-strong.js @@ -0,0 +1,142 @@ +'use strict'; +var dP = require('./_object-dp').f + , create = require('./_object-create') + , redefineAll = require('./_redefine-all') + , ctx = require('./_ctx') + , anInstance = require('./_an-instance') + , defined = require('./_defined') + , forOf = require('./_for-of') + , $iterDefine = require('./_iter-define') + , step = require('./_iter-step') + , setSpecies = require('./_set-species') + , DESCRIPTORS = require('./_descriptors') + , fastKey = require('./_meta').fastKey + , SIZE = DESCRIPTORS ? '_s' : 'size'; + +var getEntry = function(that, key){ + // fast case + var index = fastKey(key), entry; + if(index !== 'F')return that._i[index]; + // frozen object case + for(entry = that._f; entry; entry = entry.n){ + if(entry.k == key)return entry; + } +}; + +module.exports = { + getConstructor: function(wrapper, NAME, IS_MAP, ADDER){ + var C = wrapper(function(that, iterable){ + anInstance(that, C, NAME, '_i'); + that._i = create(null); // index + that._f = undefined; // first entry + that._l = undefined; // last entry + that[SIZE] = 0; // size + if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear(){ + for(var that = this, data = that._i, entry = that._f; entry; entry = entry.n){ + entry.r = true; + if(entry.p)entry.p = entry.p.n = undefined; + delete data[entry.i]; + } + that._f = that._l = undefined; + that[SIZE] = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + 'delete': function(key){ + var that = this + , entry = getEntry(that, key); + if(entry){ + var next = entry.n + , prev = entry.p; + delete that._i[entry.i]; + entry.r = true; + if(prev)prev.n = next; + if(next)next.p = prev; + if(that._f == entry)that._f = next; + if(that._l == entry)that._l = prev; + that[SIZE]--; + } return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach(callbackfn /*, that = undefined */){ + anInstance(this, C, 'forEach'); + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3) + , entry; + while(entry = entry ? entry.n : this._f){ + f(entry.v, entry.k, this); + // revert to the last existing entry + while(entry && entry.r)entry = entry.p; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has(key){ + return !!getEntry(this, key); + } + }); + if(DESCRIPTORS)dP(C.prototype, 'size', { + get: function(){ + return defined(this[SIZE]); + } + }); + return C; + }, + def: function(that, key, value){ + var entry = getEntry(that, key) + , prev, index; + // change existing entry + if(entry){ + entry.v = value; + // create new entry + } else { + that._l = entry = { + i: index = fastKey(key, true), // <- index + k: key, // <- key + v: value, // <- value + p: prev = that._l, // <- previous entry + n: undefined, // <- next entry + r: false // <- removed + }; + if(!that._f)that._f = entry; + if(prev)prev.n = entry; + that[SIZE]++; + // add to index + if(index !== 'F')that._i[index] = entry; + } return that; + }, + getEntry: getEntry, + setStrong: function(C, NAME, IS_MAP){ + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + $iterDefine(C, NAME, function(iterated, kind){ + this._t = iterated; // target + this._k = kind; // kind + this._l = undefined; // previous + }, function(){ + var that = this + , kind = that._k + , entry = that._l; + // revert to the last existing entry + while(entry && entry.r)entry = entry.p; + // get next entry + if(!that._t || !(that._l = entry = entry ? entry.n : that._t._f)){ + // or finish the iteration + that._t = undefined; + return step(1); + } + // return step by kind + if(kind == 'keys' )return step(0, entry.k); + if(kind == 'values')return step(0, entry.v); + return step(0, [entry.k, entry.v]); + }, IS_MAP ? 'entries' : 'values' , !IS_MAP, true); + + // add [@@species], 23.1.2.2, 23.2.2.2 + setSpecies(NAME); + } +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_collection-to-json.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_collection-to-json.js new file mode 100644 index 00000000..ce0282f6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_collection-to-json.js @@ -0,0 +1,9 @@ +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var classof = require('./_classof') + , from = require('./_array-from-iterable'); +module.exports = function(NAME){ + return function toJSON(){ + if(classof(this) != NAME)throw TypeError(NAME + "#toJSON isn't generic"); + return from(this); + }; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_collection-weak.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_collection-weak.js new file mode 100644 index 00000000..a8597e64 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_collection-weak.js @@ -0,0 +1,83 @@ +'use strict'; +var redefineAll = require('./_redefine-all') + , getWeak = require('./_meta').getWeak + , anObject = require('./_an-object') + , isObject = require('./_is-object') + , anInstance = require('./_an-instance') + , forOf = require('./_for-of') + , createArrayMethod = require('./_array-methods') + , $has = require('./_has') + , arrayFind = createArrayMethod(5) + , arrayFindIndex = createArrayMethod(6) + , id = 0; + +// fallback for uncaught frozen keys +var uncaughtFrozenStore = function(that){ + return that._l || (that._l = new UncaughtFrozenStore); +}; +var UncaughtFrozenStore = function(){ + this.a = []; +}; +var findUncaughtFrozen = function(store, key){ + return arrayFind(store.a, function(it){ + return it[0] === key; + }); +}; +UncaughtFrozenStore.prototype = { + get: function(key){ + var entry = findUncaughtFrozen(this, key); + if(entry)return entry[1]; + }, + has: function(key){ + return !!findUncaughtFrozen(this, key); + }, + set: function(key, value){ + var entry = findUncaughtFrozen(this, key); + if(entry)entry[1] = value; + else this.a.push([key, value]); + }, + 'delete': function(key){ + var index = arrayFindIndex(this.a, function(it){ + return it[0] === key; + }); + if(~index)this.a.splice(index, 1); + return !!~index; + } +}; + +module.exports = { + getConstructor: function(wrapper, NAME, IS_MAP, ADDER){ + var C = wrapper(function(that, iterable){ + anInstance(that, C, NAME, '_i'); + that._i = id++; // collection id + that._l = undefined; // leak store for uncaught frozen objects + if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.3.3.2 WeakMap.prototype.delete(key) + // 23.4.3.3 WeakSet.prototype.delete(value) + 'delete': function(key){ + if(!isObject(key))return false; + var data = getWeak(key); + if(data === true)return uncaughtFrozenStore(this)['delete'](key); + return data && $has(data, this._i) && delete data[this._i]; + }, + // 23.3.3.4 WeakMap.prototype.has(key) + // 23.4.3.4 WeakSet.prototype.has(value) + has: function has(key){ + if(!isObject(key))return false; + var data = getWeak(key); + if(data === true)return uncaughtFrozenStore(this).has(key); + return data && $has(data, this._i); + } + }); + return C; + }, + def: function(that, key, value){ + var data = getWeak(anObject(key), true); + if(data === true)uncaughtFrozenStore(that).set(key, value); + else data[that._i] = value; + return that; + }, + ufstore: uncaughtFrozenStore +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_collection.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_collection.js new file mode 100644 index 00000000..0bdd7fcb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_collection.js @@ -0,0 +1,59 @@ +'use strict'; +var global = require('./_global') + , $export = require('./_export') + , meta = require('./_meta') + , fails = require('./_fails') + , hide = require('./_hide') + , redefineAll = require('./_redefine-all') + , forOf = require('./_for-of') + , anInstance = require('./_an-instance') + , isObject = require('./_is-object') + , setToStringTag = require('./_set-to-string-tag') + , dP = require('./_object-dp').f + , each = require('./_array-methods')(0) + , DESCRIPTORS = require('./_descriptors'); + +module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){ + var Base = global[NAME] + , C = Base + , ADDER = IS_MAP ? 'set' : 'add' + , proto = C && C.prototype + , O = {}; + if(!DESCRIPTORS || typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function(){ + new C().entries().next(); + }))){ + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + redefineAll(C.prototype, methods); + meta.NEED = true; + } else { + C = wrapper(function(target, iterable){ + anInstance(target, C, NAME, '_c'); + target._c = new Base; + if(iterable != undefined)forOf(iterable, IS_MAP, target[ADDER], target); + }); + each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','),function(KEY){ + var IS_ADDER = KEY == 'add' || KEY == 'set'; + if(KEY in proto && !(IS_WEAK && KEY == 'clear'))hide(C.prototype, KEY, function(a, b){ + anInstance(this, C, KEY); + if(!IS_ADDER && IS_WEAK && !isObject(a))return KEY == 'get' ? undefined : false; + var result = this._c[KEY](a === 0 ? 0 : a, b); + return IS_ADDER ? this : result; + }); + }); + if('size' in proto)dP(C.prototype, 'size', { + get: function(){ + return this._c.size; + } + }); + } + + setToStringTag(C, NAME); + + O[NAME] = C; + $export($export.G + $export.W + $export.F, O); + + if(!IS_WEAK)common.setStrong(C, NAME, IS_MAP); + + return C; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_core.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_core.js new file mode 100644 index 00000000..23d6aede --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_core.js @@ -0,0 +1,2 @@ +var core = module.exports = {version: '2.4.0'}; +if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_create-property.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_create-property.js new file mode 100644 index 00000000..3d1bf730 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_create-property.js @@ -0,0 +1,8 @@ +'use strict'; +var $defineProperty = require('./_object-dp') + , createDesc = require('./_property-desc'); + +module.exports = function(object, index, value){ + if(index in object)$defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_ctx.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_ctx.js new file mode 100644 index 00000000..b52d85ff --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_ctx.js @@ -0,0 +1,20 @@ +// optional / simple context binding +var aFunction = require('./_a-function'); +module.exports = function(fn, that, length){ + aFunction(fn); + if(that === undefined)return fn; + switch(length){ + case 1: return function(a){ + return fn.call(that, a); + }; + case 2: return function(a, b){ + return fn.call(that, a, b); + }; + case 3: return function(a, b, c){ + return fn.call(that, a, b, c); + }; + } + return function(/* ...args */){ + return fn.apply(that, arguments); + }; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_date-to-primitive.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_date-to-primitive.js new file mode 100644 index 00000000..561079a1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_date-to-primitive.js @@ -0,0 +1,9 @@ +'use strict'; +var anObject = require('./_an-object') + , toPrimitive = require('./_to-primitive') + , NUMBER = 'number'; + +module.exports = function(hint){ + if(hint !== 'string' && hint !== NUMBER && hint !== 'default')throw TypeError('Incorrect hint'); + return toPrimitive(anObject(this), hint != NUMBER); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_defined.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_defined.js new file mode 100644 index 00000000..cfa476b9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_defined.js @@ -0,0 +1,5 @@ +// 7.2.1 RequireObjectCoercible(argument) +module.exports = function(it){ + if(it == undefined)throw TypeError("Can't call method on " + it); + return it; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_descriptors.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_descriptors.js new file mode 100644 index 00000000..6ccb7ee2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_descriptors.js @@ -0,0 +1,4 @@ +// Thank's IE8 for his funny defineProperty +module.exports = !require('./_fails')(function(){ + return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_dom-create.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_dom-create.js new file mode 100644 index 00000000..909b5ff0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_dom-create.js @@ -0,0 +1,7 @@ +var isObject = require('./_is-object') + , document = require('./_global').document + // in old IE typeof document.createElement is 'object' + , is = isObject(document) && isObject(document.createElement); +module.exports = function(it){ + return is ? document.createElement(it) : {}; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_entry-virtual.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_entry-virtual.js new file mode 100644 index 00000000..0ec61272 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_entry-virtual.js @@ -0,0 +1,5 @@ +var core = require('./_core'); +module.exports = function(CONSTRUCTOR){ + var C = core[CONSTRUCTOR]; + return (C.virtual || C.prototype); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_enum-bug-keys.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_enum-bug-keys.js new file mode 100644 index 00000000..928b9fb0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_enum-bug-keys.js @@ -0,0 +1,4 @@ +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_enum-keys.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_enum-keys.js new file mode 100644 index 00000000..3bf8069c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_enum-keys.js @@ -0,0 +1,15 @@ +// all enumerable object keys, includes symbols +var getKeys = require('./_object-keys') + , gOPS = require('./_object-gops') + , pIE = require('./_object-pie'); +module.exports = function(it){ + var result = getKeys(it) + , getSymbols = gOPS.f; + if(getSymbols){ + var symbols = getSymbols(it) + , isEnum = pIE.f + , i = 0 + , key; + while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key); + } return result; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_export.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_export.js new file mode 100644 index 00000000..dc084b4c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_export.js @@ -0,0 +1,61 @@ +var global = require('./_global') + , core = require('./_core') + , ctx = require('./_ctx') + , hide = require('./_hide') + , PROTOTYPE = 'prototype'; + +var $export = function(type, name, source){ + var IS_FORCED = type & $export.F + , IS_GLOBAL = type & $export.G + , IS_STATIC = type & $export.S + , IS_PROTO = type & $export.P + , IS_BIND = type & $export.B + , IS_WRAP = type & $export.W + , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) + , expProto = exports[PROTOTYPE] + , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] + , key, own, out; + if(IS_GLOBAL)source = name; + for(key in source){ + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if(own && key in exports)continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function(C){ + var F = function(a, b, c){ + if(this instanceof C){ + switch(arguments.length){ + case 0: return new C; + case 1: return new C(a); + case 2: return new C(a, b); + } return new C(a, b, c); + } return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if(IS_PROTO){ + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out); + } + } +}; +// type bitmap +$export.F = 1; // forced +$export.G = 2; // global +$export.S = 4; // static +$export.P = 8; // proto +$export.B = 16; // bind +$export.W = 32; // wrap +$export.U = 64; // safe +$export.R = 128; // real proto method for `library` +module.exports = $export; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_fails-is-regexp.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_fails-is-regexp.js new file mode 100644 index 00000000..130436bf --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_fails-is-regexp.js @@ -0,0 +1,12 @@ +var MATCH = require('./_wks')('match'); +module.exports = function(KEY){ + var re = /./; + try { + '/./'[KEY](re); + } catch(e){ + try { + re[MATCH] = false; + return !'/./'[KEY](re); + } catch(f){ /* empty */ } + } return true; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_fails.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_fails.js new file mode 100644 index 00000000..184e5ea8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_fails.js @@ -0,0 +1,7 @@ +module.exports = function(exec){ + try { + return !!exec(); + } catch(e){ + return true; + } +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_fix-re-wks.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_fix-re-wks.js new file mode 100644 index 00000000..d29368ce --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_fix-re-wks.js @@ -0,0 +1,28 @@ +'use strict'; +var hide = require('./_hide') + , redefine = require('./_redefine') + , fails = require('./_fails') + , defined = require('./_defined') + , wks = require('./_wks'); + +module.exports = function(KEY, length, exec){ + var SYMBOL = wks(KEY) + , fns = exec(defined, SYMBOL, ''[KEY]) + , strfn = fns[0] + , rxfn = fns[1]; + if(fails(function(){ + var O = {}; + O[SYMBOL] = function(){ return 7; }; + return ''[KEY](O) != 7; + })){ + redefine(String.prototype, KEY, strfn); + hide(RegExp.prototype, SYMBOL, length == 2 + // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) + // 21.2.5.11 RegExp.prototype[@@split](string, limit) + ? function(string, arg){ return rxfn.call(string, this, arg); } + // 21.2.5.6 RegExp.prototype[@@match](string) + // 21.2.5.9 RegExp.prototype[@@search](string) + : function(string){ return rxfn.call(string, this); } + ); + } +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_flags.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_flags.js new file mode 100644 index 00000000..054f9088 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_flags.js @@ -0,0 +1,13 @@ +'use strict'; +// 21.2.5.3 get RegExp.prototype.flags +var anObject = require('./_an-object'); +module.exports = function(){ + var that = anObject(this) + , result = ''; + if(that.global) result += 'g'; + if(that.ignoreCase) result += 'i'; + if(that.multiline) result += 'm'; + if(that.unicode) result += 'u'; + if(that.sticky) result += 'y'; + return result; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_for-of.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_for-of.js new file mode 100644 index 00000000..b4824fef --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_for-of.js @@ -0,0 +1,25 @@ +var ctx = require('./_ctx') + , call = require('./_iter-call') + , isArrayIter = require('./_is-array-iter') + , anObject = require('./_an-object') + , toLength = require('./_to-length') + , getIterFn = require('./core.get-iterator-method') + , BREAK = {} + , RETURN = {}; +var exports = module.exports = function(iterable, entries, fn, that, ITERATOR){ + var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable) + , f = ctx(fn, that, entries ? 2 : 1) + , index = 0 + , length, step, iterator, result; + if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){ + result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); + if(result === BREAK || result === RETURN)return result; + } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){ + result = call(iterator, f, step.value, entries); + if(result === BREAK || result === RETURN)return result; + } +}; +exports.BREAK = BREAK; +exports.RETURN = RETURN; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_global.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_global.js new file mode 100644 index 00000000..df6efb47 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_global.js @@ -0,0 +1,4 @@ +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); +if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_has.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_has.js new file mode 100644 index 00000000..870b40e7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_has.js @@ -0,0 +1,4 @@ +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function(it, key){ + return hasOwnProperty.call(it, key); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_hide.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_hide.js new file mode 100644 index 00000000..4031e808 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_hide.js @@ -0,0 +1,8 @@ +var dP = require('./_object-dp') + , createDesc = require('./_property-desc'); +module.exports = require('./_descriptors') ? function(object, key, value){ + return dP.f(object, key, createDesc(1, value)); +} : function(object, key, value){ + object[key] = value; + return object; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_html.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_html.js new file mode 100644 index 00000000..98f5142c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_html.js @@ -0,0 +1 @@ +module.exports = require('./_global').document && document.documentElement; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_ie8-dom-define.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_ie8-dom-define.js new file mode 100644 index 00000000..18ffd59d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_ie8-dom-define.js @@ -0,0 +1,3 @@ +module.exports = !require('./_descriptors') && !require('./_fails')(function(){ + return Object.defineProperty(require('./_dom-create')('div'), 'a', {get: function(){ return 7; }}).a != 7; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_inherit-if-required.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_inherit-if-required.js new file mode 100644 index 00000000..d3948405 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_inherit-if-required.js @@ -0,0 +1,8 @@ +var isObject = require('./_is-object') + , setPrototypeOf = require('./_set-proto').set; +module.exports = function(that, target, C){ + var P, S = target.constructor; + if(S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf){ + setPrototypeOf(that, P); + } return that; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_invoke.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_invoke.js new file mode 100644 index 00000000..08e307fd --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_invoke.js @@ -0,0 +1,16 @@ +// fast apply, http://jsperf.lnkit.com/fast-apply/5 +module.exports = function(fn, args, that){ + var un = that === undefined; + switch(args.length){ + case 0: return un ? fn() + : fn.call(that); + case 1: return un ? fn(args[0]) + : fn.call(that, args[0]); + case 2: return un ? fn(args[0], args[1]) + : fn.call(that, args[0], args[1]); + case 3: return un ? fn(args[0], args[1], args[2]) + : fn.call(that, args[0], args[1], args[2]); + case 4: return un ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + } return fn.apply(that, args); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_iobject.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_iobject.js new file mode 100644 index 00000000..b58db489 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_iobject.js @@ -0,0 +1,5 @@ +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = require('./_cof'); +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ + return cof(it) == 'String' ? it.split('') : Object(it); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_is-array-iter.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_is-array-iter.js new file mode 100644 index 00000000..8139d71c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_is-array-iter.js @@ -0,0 +1,8 @@ +// check on default Array iterator +var Iterators = require('./_iterators') + , ITERATOR = require('./_wks')('iterator') + , ArrayProto = Array.prototype; + +module.exports = function(it){ + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_is-array.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_is-array.js new file mode 100644 index 00000000..b4a3a8ed --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_is-array.js @@ -0,0 +1,5 @@ +// 7.2.2 IsArray(argument) +var cof = require('./_cof'); +module.exports = Array.isArray || function isArray(arg){ + return cof(arg) == 'Array'; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_is-integer.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_is-integer.js new file mode 100644 index 00000000..22db67ed --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_is-integer.js @@ -0,0 +1,6 @@ +// 20.1.2.3 Number.isInteger(number) +var isObject = require('./_is-object') + , floor = Math.floor; +module.exports = function isInteger(it){ + return !isObject(it) && isFinite(it) && floor(it) === it; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_is-object.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_is-object.js new file mode 100644 index 00000000..ee694be2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_is-object.js @@ -0,0 +1,3 @@ +module.exports = function(it){ + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_is-regexp.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_is-regexp.js new file mode 100644 index 00000000..55b2c629 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_is-regexp.js @@ -0,0 +1,8 @@ +// 7.2.8 IsRegExp(argument) +var isObject = require('./_is-object') + , cof = require('./_cof') + , MATCH = require('./_wks')('match'); +module.exports = function(it){ + var isRegExp; + return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_iter-call.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_iter-call.js new file mode 100644 index 00000000..e3565ba9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_iter-call.js @@ -0,0 +1,12 @@ +// call something on iterator step with safe closing on error +var anObject = require('./_an-object'); +module.exports = function(iterator, fn, value, entries){ + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch(e){ + var ret = iterator['return']; + if(ret !== undefined)anObject(ret.call(iterator)); + throw e; + } +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_iter-create.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_iter-create.js new file mode 100644 index 00000000..9a9aa4fb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_iter-create.js @@ -0,0 +1,13 @@ +'use strict'; +var create = require('./_object-create') + , descriptor = require('./_property-desc') + , setToStringTag = require('./_set-to-string-tag') + , IteratorPrototype = {}; + +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +require('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function(){ return this; }); + +module.exports = function(Constructor, NAME, next){ + Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)}); + setToStringTag(Constructor, NAME + ' Iterator'); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_iter-define.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_iter-define.js new file mode 100644 index 00000000..f72a5021 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_iter-define.js @@ -0,0 +1,70 @@ +'use strict'; +var LIBRARY = require('./_library') + , $export = require('./_export') + , redefine = require('./_redefine') + , hide = require('./_hide') + , has = require('./_has') + , Iterators = require('./_iterators') + , $iterCreate = require('./_iter-create') + , setToStringTag = require('./_set-to-string-tag') + , getPrototypeOf = require('./_object-gpo') + , ITERATOR = require('./_wks')('iterator') + , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` + , FF_ITERATOR = '@@iterator' + , KEYS = 'keys' + , VALUES = 'values'; + +var returnThis = function(){ return this; }; + +module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){ + $iterCreate(Constructor, NAME, next); + var getMethod = function(kind){ + if(!BUGGY && kind in proto)return proto[kind]; + switch(kind){ + case KEYS: return function keys(){ return new Constructor(this, kind); }; + case VALUES: return function values(){ return new Constructor(this, kind); }; + } return function entries(){ return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator' + , DEF_VALUES = DEFAULT == VALUES + , VALUES_BUG = false + , proto = Base.prototype + , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] + , $default = $native || getMethod(DEFAULT) + , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined + , $anyNative = NAME == 'Array' ? proto.entries || $native : $native + , methods, key, IteratorPrototype; + // Fix native + if($anyNative){ + IteratorPrototype = getPrototypeOf($anyNative.call(new Base)); + if(IteratorPrototype !== Object.prototype){ + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if(DEF_VALUES && $native && $native.name !== VALUES){ + VALUES_BUG = true; + $default = function values(){ return $native.call(this); }; + } + // Define iterator + if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){ + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if(DEFAULT){ + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if(FORCED)for(key in methods){ + if(!(key in proto))redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_iter-detect.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_iter-detect.js new file mode 100644 index 00000000..87c7aecf --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_iter-detect.js @@ -0,0 +1,21 @@ +var ITERATOR = require('./_wks')('iterator') + , SAFE_CLOSING = false; + +try { + var riter = [7][ITERATOR](); + riter['return'] = function(){ SAFE_CLOSING = true; }; + Array.from(riter, function(){ throw 2; }); +} catch(e){ /* empty */ } + +module.exports = function(exec, skipClosing){ + if(!skipClosing && !SAFE_CLOSING)return false; + var safe = false; + try { + var arr = [7] + , iter = arr[ITERATOR](); + iter.next = function(){ return {done: safe = true}; }; + arr[ITERATOR] = function(){ return iter; }; + exec(arr); + } catch(e){ /* empty */ } + return safe; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_iter-step.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_iter-step.js new file mode 100644 index 00000000..6ff0dc51 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_iter-step.js @@ -0,0 +1,3 @@ +module.exports = function(done, value){ + return {value: value, done: !!done}; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_iterators.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_iterators.js new file mode 100644 index 00000000..a0995453 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_iterators.js @@ -0,0 +1 @@ +module.exports = {}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_keyof.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_keyof.js new file mode 100644 index 00000000..7b63229b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_keyof.js @@ -0,0 +1,10 @@ +var getKeys = require('./_object-keys') + , toIObject = require('./_to-iobject'); +module.exports = function(object, el){ + var O = toIObject(object) + , keys = getKeys(O) + , length = keys.length + , index = 0 + , key; + while(length > index)if(O[key = keys[index++]] === el)return key; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_library.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_library.js new file mode 100644 index 00000000..73f737c5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_library.js @@ -0,0 +1 @@ +module.exports = true; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_math-expm1.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_math-expm1.js new file mode 100644 index 00000000..5131aa95 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_math-expm1.js @@ -0,0 +1,10 @@ +// 20.2.2.14 Math.expm1(x) +var $expm1 = Math.expm1; +module.exports = (!$expm1 + // Old FF bug + || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168 + // Tor Browser bug + || $expm1(-2e-17) != -2e-17 +) ? function expm1(x){ + return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1; +} : $expm1; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_math-log1p.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_math-log1p.js new file mode 100644 index 00000000..a92bf463 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_math-log1p.js @@ -0,0 +1,4 @@ +// 20.2.2.20 Math.log1p(x) +module.exports = Math.log1p || function log1p(x){ + return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_math-sign.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_math-sign.js new file mode 100644 index 00000000..a4848df6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_math-sign.js @@ -0,0 +1,4 @@ +// 20.2.2.28 Math.sign(x) +module.exports = Math.sign || function sign(x){ + return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_meta.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_meta.js new file mode 100644 index 00000000..7daca009 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_meta.js @@ -0,0 +1,53 @@ +var META = require('./_uid')('meta') + , isObject = require('./_is-object') + , has = require('./_has') + , setDesc = require('./_object-dp').f + , id = 0; +var isExtensible = Object.isExtensible || function(){ + return true; +}; +var FREEZE = !require('./_fails')(function(){ + return isExtensible(Object.preventExtensions({})); +}); +var setMeta = function(it){ + setDesc(it, META, {value: { + i: 'O' + ++id, // object ID + w: {} // weak collections IDs + }}); +}; +var fastKey = function(it, create){ + // return primitive with prefix + if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if(!has(it, META)){ + // can't set metadata to uncaught frozen object + if(!isExtensible(it))return 'F'; + // not necessary to add metadata + if(!create)return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } return it[META].i; +}; +var getWeak = function(it, create){ + if(!has(it, META)){ + // can't set metadata to uncaught frozen object + if(!isExtensible(it))return true; + // not necessary to add metadata + if(!create)return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } return it[META].w; +}; +// add metadata on freeze-family methods calling +var onFreeze = function(it){ + if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it); + return it; +}; +var meta = module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_metadata.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_metadata.js new file mode 100644 index 00000000..eb5a762d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_metadata.js @@ -0,0 +1,51 @@ +var Map = require('./es6.map') + , $export = require('./_export') + , shared = require('./_shared')('metadata') + , store = shared.store || (shared.store = new (require('./es6.weak-map'))); + +var getOrCreateMetadataMap = function(target, targetKey, create){ + var targetMetadata = store.get(target); + if(!targetMetadata){ + if(!create)return undefined; + store.set(target, targetMetadata = new Map); + } + var keyMetadata = targetMetadata.get(targetKey); + if(!keyMetadata){ + if(!create)return undefined; + targetMetadata.set(targetKey, keyMetadata = new Map); + } return keyMetadata; +}; +var ordinaryHasOwnMetadata = function(MetadataKey, O, P){ + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? false : metadataMap.has(MetadataKey); +}; +var ordinaryGetOwnMetadata = function(MetadataKey, O, P){ + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey); +}; +var ordinaryDefineOwnMetadata = function(MetadataKey, MetadataValue, O, P){ + getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue); +}; +var ordinaryOwnMetadataKeys = function(target, targetKey){ + var metadataMap = getOrCreateMetadataMap(target, targetKey, false) + , keys = []; + if(metadataMap)metadataMap.forEach(function(_, key){ keys.push(key); }); + return keys; +}; +var toMetaKey = function(it){ + return it === undefined || typeof it == 'symbol' ? it : String(it); +}; +var exp = function(O){ + $export($export.S, 'Reflect', O); +}; + +module.exports = { + store: store, + map: getOrCreateMetadataMap, + has: ordinaryHasOwnMetadata, + get: ordinaryGetOwnMetadata, + set: ordinaryDefineOwnMetadata, + keys: ordinaryOwnMetadataKeys, + key: toMetaKey, + exp: exp +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_microtask.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_microtask.js new file mode 100644 index 00000000..b0f2a0df --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_microtask.js @@ -0,0 +1,68 @@ +var global = require('./_global') + , macrotask = require('./_task').set + , Observer = global.MutationObserver || global.WebKitMutationObserver + , process = global.process + , Promise = global.Promise + , isNode = require('./_cof')(process) == 'process'; + +module.exports = function(){ + var head, last, notify; + + var flush = function(){ + var parent, fn; + if(isNode && (parent = process.domain))parent.exit(); + while(head){ + fn = head.fn; + head = head.next; + try { + fn(); + } catch(e){ + if(head)notify(); + else last = undefined; + throw e; + } + } last = undefined; + if(parent)parent.enter(); + }; + + // Node.js + if(isNode){ + notify = function(){ + process.nextTick(flush); + }; + // browsers with MutationObserver + } else if(Observer){ + var toggle = true + , node = document.createTextNode(''); + new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new + notify = function(){ + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if(Promise && Promise.resolve){ + var promise = Promise.resolve(); + notify = function(){ + promise.then(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function(){ + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(global, flush); + }; + } + + return function(fn){ + var task = {fn: fn, next: undefined}; + if(last)last.next = task; + if(!head){ + head = task; + notify(); + } last = task; + }; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_object-assign.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_object-assign.js new file mode 100644 index 00000000..c575aba2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_object-assign.js @@ -0,0 +1,33 @@ +'use strict'; +// 19.1.2.1 Object.assign(target, source, ...) +var getKeys = require('./_object-keys') + , gOPS = require('./_object-gops') + , pIE = require('./_object-pie') + , toObject = require('./_to-object') + , IObject = require('./_iobject') + , $assign = Object.assign; + +// should work with symbols and should have deterministic property order (V8 bug) +module.exports = !$assign || require('./_fails')(function(){ + var A = {} + , B = {} + , S = Symbol() + , K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function(k){ B[k] = k; }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; +}) ? function assign(target, source){ // eslint-disable-line no-unused-vars + var T = toObject(target) + , aLen = arguments.length + , index = 1 + , getSymbols = gOPS.f + , isEnum = pIE.f; + while(aLen > index){ + var S = IObject(arguments[index++]) + , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S) + , length = keys.length + , j = 0 + , key; + while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key]; + } return T; +} : $assign; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_object-create.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_object-create.js new file mode 100644 index 00000000..3379760f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_object-create.js @@ -0,0 +1,41 @@ +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +var anObject = require('./_an-object') + , dPs = require('./_object-dps') + , enumBugKeys = require('./_enum-bug-keys') + , IE_PROTO = require('./_shared-key')('IE_PROTO') + , Empty = function(){ /* empty */ } + , PROTOTYPE = 'prototype'; + +// Create object with fake `null` prototype: use iframe Object with cleared prototype +var createDict = function(){ + // Thrash, waste and sodomy: IE GC bug + var iframe = require('./_dom-create')('iframe') + , i = enumBugKeys.length + , lt = '<' + , gt = '>' + , iframeDocument; + iframe.style.display = 'none'; + require('./_html').appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); +}; + +module.exports = Object.create || function create(O, Properties){ + var result; + if(O !== null){ + Empty[PROTOTYPE] = anObject(O); + result = new Empty; + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); +}; diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_object-define.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_object-define.js new file mode 100644 index 00000000..f246c4e3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_object-define.js @@ -0,0 +1,12 @@ +var dP = require('./_object-dp') + , gOPD = require('./_object-gopd') + , ownKeys = require('./_own-keys') + , toIObject = require('./_to-iobject'); + +module.exports = function define(target, mixin){ + var keys = ownKeys(toIObject(mixin)) + , length = keys.length + , i = 0, key; + while(length > i)dP.f(target, key = keys[i++], gOPD.f(mixin, key)); + return target; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_object-dp.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_object-dp.js new file mode 100644 index 00000000..e7ca8a46 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_object-dp.js @@ -0,0 +1,16 @@ +var anObject = require('./_an-object') + , IE8_DOM_DEFINE = require('./_ie8-dom-define') + , toPrimitive = require('./_to-primitive') + , dP = Object.defineProperty; + +exports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes){ + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if(IE8_DOM_DEFINE)try { + return dP(O, P, Attributes); + } catch(e){ /* empty */ } + if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!'); + if('value' in Attributes)O[P] = Attributes.value; + return O; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_object-dps.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_object-dps.js new file mode 100644 index 00000000..8cd4147a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_object-dps.js @@ -0,0 +1,13 @@ +var dP = require('./_object-dp') + , anObject = require('./_an-object') + , getKeys = require('./_object-keys'); + +module.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties){ + anObject(O); + var keys = getKeys(Properties) + , length = keys.length + , i = 0 + , P; + while(length > i)dP.f(O, P = keys[i++], Properties[P]); + return O; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_object-forced-pam.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_object-forced-pam.js new file mode 100644 index 00000000..668a07dc --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_object-forced-pam.js @@ -0,0 +1,7 @@ +// Forced replacement prototype accessors methods +module.exports = require('./_library')|| !require('./_fails')(function(){ + var K = Math.random(); + // In FF throws only define methods + __defineSetter__.call(null, K, function(){ /* empty */}); + delete require('./_global')[K]; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_object-gopd.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_object-gopd.js new file mode 100644 index 00000000..756206ab --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_object-gopd.js @@ -0,0 +1,16 @@ +var pIE = require('./_object-pie') + , createDesc = require('./_property-desc') + , toIObject = require('./_to-iobject') + , toPrimitive = require('./_to-primitive') + , has = require('./_has') + , IE8_DOM_DEFINE = require('./_ie8-dom-define') + , gOPD = Object.getOwnPropertyDescriptor; + +exports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P){ + O = toIObject(O); + P = toPrimitive(P, true); + if(IE8_DOM_DEFINE)try { + return gOPD(O, P); + } catch(e){ /* empty */ } + if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_object-gopn-ext.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_object-gopn-ext.js new file mode 100644 index 00000000..f4d10b4a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_object-gopn-ext.js @@ -0,0 +1,19 @@ +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +var toIObject = require('./_to-iobject') + , gOPN = require('./_object-gopn').f + , toString = {}.toString; + +var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + +var getWindowNames = function(it){ + try { + return gOPN(it); + } catch(e){ + return windowNames.slice(); + } +}; + +module.exports.f = function getOwnPropertyNames(it){ + return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); +}; diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_object-gopn.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_object-gopn.js new file mode 100644 index 00000000..beebf4da --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_object-gopn.js @@ -0,0 +1,7 @@ +// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) +var $keys = require('./_object-keys-internal') + , hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype'); + +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){ + return $keys(O, hiddenKeys); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_object-gops.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_object-gops.js new file mode 100644 index 00000000..8f93d76b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_object-gops.js @@ -0,0 +1 @@ +exports.f = Object.getOwnPropertySymbols; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_object-gpo.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_object-gpo.js new file mode 100644 index 00000000..535dc6e9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_object-gpo.js @@ -0,0 +1,13 @@ +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) +var has = require('./_has') + , toObject = require('./_to-object') + , IE_PROTO = require('./_shared-key')('IE_PROTO') + , ObjectProto = Object.prototype; + +module.exports = Object.getPrototypeOf || function(O){ + O = toObject(O); + if(has(O, IE_PROTO))return O[IE_PROTO]; + if(typeof O.constructor == 'function' && O instanceof O.constructor){ + return O.constructor.prototype; + } return O instanceof Object ? ObjectProto : null; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_object-keys-internal.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_object-keys-internal.js new file mode 100644 index 00000000..e23481d7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_object-keys-internal.js @@ -0,0 +1,17 @@ +var has = require('./_has') + , toIObject = require('./_to-iobject') + , arrayIndexOf = require('./_array-includes')(false) + , IE_PROTO = require('./_shared-key')('IE_PROTO'); + +module.exports = function(object, names){ + var O = toIObject(object) + , i = 0 + , result = [] + , key; + for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while(names.length > i)if(has(O, key = names[i++])){ + ~arrayIndexOf(result, key) || result.push(key); + } + return result; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_object-keys.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_object-keys.js new file mode 100644 index 00000000..11d4ccee --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_object-keys.js @@ -0,0 +1,7 @@ +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = require('./_object-keys-internal') + , enumBugKeys = require('./_enum-bug-keys'); + +module.exports = Object.keys || function keys(O){ + return $keys(O, enumBugKeys); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_object-pie.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_object-pie.js new file mode 100644 index 00000000..13479a17 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_object-pie.js @@ -0,0 +1 @@ +exports.f = {}.propertyIsEnumerable; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_object-sap.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_object-sap.js new file mode 100644 index 00000000..b76fec5f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_object-sap.js @@ -0,0 +1,10 @@ +// most Object methods by ES6 should accept primitives +var $export = require('./_export') + , core = require('./_core') + , fails = require('./_fails'); +module.exports = function(KEY, exec){ + var fn = (core.Object || {})[KEY] || Object[KEY] + , exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_object-to-array.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_object-to-array.js new file mode 100644 index 00000000..b6fdf05d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_object-to-array.js @@ -0,0 +1,16 @@ +var getKeys = require('./_object-keys') + , toIObject = require('./_to-iobject') + , isEnum = require('./_object-pie').f; +module.exports = function(isEntries){ + return function(it){ + var O = toIObject(it) + , keys = getKeys(O) + , length = keys.length + , i = 0 + , result = [] + , key; + while(length > i)if(isEnum.call(O, key = keys[i++])){ + result.push(isEntries ? [key, O[key]] : O[key]); + } return result; + }; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_own-keys.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_own-keys.js new file mode 100644 index 00000000..045ce3d5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_own-keys.js @@ -0,0 +1,10 @@ +// all object keys, includes non-enumerable and symbols +var gOPN = require('./_object-gopn') + , gOPS = require('./_object-gops') + , anObject = require('./_an-object') + , Reflect = require('./_global').Reflect; +module.exports = Reflect && Reflect.ownKeys || function ownKeys(it){ + var keys = gOPN.f(anObject(it)) + , getSymbols = gOPS.f; + return getSymbols ? keys.concat(getSymbols(it)) : keys; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_parse-float.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_parse-float.js new file mode 100644 index 00000000..3d0e6531 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_parse-float.js @@ -0,0 +1,8 @@ +var $parseFloat = require('./_global').parseFloat + , $trim = require('./_string-trim').trim; + +module.exports = 1 / $parseFloat(require('./_string-ws') + '-0') !== -Infinity ? function parseFloat(str){ + var string = $trim(String(str), 3) + , result = $parseFloat(string); + return result === 0 && string.charAt(0) == '-' ? -0 : result; +} : $parseFloat; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_parse-int.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_parse-int.js new file mode 100644 index 00000000..c23ffc09 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_parse-int.js @@ -0,0 +1,9 @@ +var $parseInt = require('./_global').parseInt + , $trim = require('./_string-trim').trim + , ws = require('./_string-ws') + , hex = /^[\-+]?0[xX]/; + +module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix){ + var string = $trim(String(str), 3); + return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10)); +} : $parseInt; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_partial.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_partial.js new file mode 100644 index 00000000..3d411b70 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_partial.js @@ -0,0 +1,23 @@ +'use strict'; +var path = require('./_path') + , invoke = require('./_invoke') + , aFunction = require('./_a-function'); +module.exports = function(/* ...pargs */){ + var fn = aFunction(this) + , length = arguments.length + , pargs = Array(length) + , i = 0 + , _ = path._ + , holder = false; + while(length > i)if((pargs[i] = arguments[i++]) === _)holder = true; + return function(/* ...args */){ + var that = this + , aLen = arguments.length + , j = 0, k = 0, args; + if(!holder && !aLen)return invoke(fn, pargs, that); + args = pargs.slice(); + if(holder)for(;length > j; j++)if(args[j] === _)args[j] = arguments[k++]; + while(aLen > k)args.push(arguments[k++]); + return invoke(fn, args, that); + }; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_path.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_path.js new file mode 100644 index 00000000..e2b878dc --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_path.js @@ -0,0 +1 @@ +module.exports = require('./_core'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_property-desc.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_property-desc.js new file mode 100644 index 00000000..e3f7ab2d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_property-desc.js @@ -0,0 +1,8 @@ +module.exports = function(bitmap, value){ + return { + enumerable : !(bitmap & 1), + configurable: !(bitmap & 2), + writable : !(bitmap & 4), + value : value + }; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_redefine-all.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_redefine-all.js new file mode 100644 index 00000000..beeb2eaf --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_redefine-all.js @@ -0,0 +1,7 @@ +var hide = require('./_hide'); +module.exports = function(target, src, safe){ + for(var key in src){ + if(safe && target[key])target[key] = src[key]; + else hide(target, key, src[key]); + } return target; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_redefine.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_redefine.js new file mode 100644 index 00000000..6bd64530 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_redefine.js @@ -0,0 +1 @@ +module.exports = require('./_hide'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_replacer.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_replacer.js new file mode 100644 index 00000000..5360a3d3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_replacer.js @@ -0,0 +1,8 @@ +module.exports = function(regExp, replace){ + var replacer = replace === Object(replace) ? function(part){ + return replace[part]; + } : replace; + return function(it){ + return String(it).replace(regExp, replacer); + }; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_same-value.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_same-value.js new file mode 100644 index 00000000..8c2b8c7f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_same-value.js @@ -0,0 +1,4 @@ +// 7.2.9 SameValue(x, y) +module.exports = Object.is || function is(x, y){ + return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_set-proto.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_set-proto.js new file mode 100644 index 00000000..8d5dad3f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_set-proto.js @@ -0,0 +1,25 @@ +// Works with __proto__ only. Old v8 can't work with null proto objects. +/* eslint-disable no-proto */ +var isObject = require('./_is-object') + , anObject = require('./_an-object'); +var check = function(O, proto){ + anObject(O); + if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!"); +}; +module.exports = { + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line + function(test, buggy, set){ + try { + set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2); + set(test, []); + buggy = !(test instanceof Array); + } catch(e){ buggy = true; } + return function setPrototypeOf(O, proto){ + check(O, proto); + if(buggy)O.__proto__ = proto; + else set(O, proto); + return O; + }; + }({}, false) : undefined), + check: check +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_set-species.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_set-species.js new file mode 100644 index 00000000..4320fa51 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_set-species.js @@ -0,0 +1,14 @@ +'use strict'; +var global = require('./_global') + , core = require('./_core') + , dP = require('./_object-dp') + , DESCRIPTORS = require('./_descriptors') + , SPECIES = require('./_wks')('species'); + +module.exports = function(KEY){ + var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; + if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, { + configurable: true, + get: function(){ return this; } + }); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_set-to-string-tag.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_set-to-string-tag.js new file mode 100644 index 00000000..ffbdddab --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_set-to-string-tag.js @@ -0,0 +1,7 @@ +var def = require('./_object-dp').f + , has = require('./_has') + , TAG = require('./_wks')('toStringTag'); + +module.exports = function(it, tag, stat){ + if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag}); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_shared-key.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_shared-key.js new file mode 100644 index 00000000..5ed76349 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_shared-key.js @@ -0,0 +1,5 @@ +var shared = require('./_shared')('keys') + , uid = require('./_uid'); +module.exports = function(key){ + return shared[key] || (shared[key] = uid(key)); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_shared.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_shared.js new file mode 100644 index 00000000..3f9e4c89 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_shared.js @@ -0,0 +1,6 @@ +var global = require('./_global') + , SHARED = '__core-js_shared__' + , store = global[SHARED] || (global[SHARED] = {}); +module.exports = function(key){ + return store[key] || (store[key] = {}); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_species-constructor.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_species-constructor.js new file mode 100644 index 00000000..7a4d1baf --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_species-constructor.js @@ -0,0 +1,8 @@ +// 7.3.20 SpeciesConstructor(O, defaultConstructor) +var anObject = require('./_an-object') + , aFunction = require('./_a-function') + , SPECIES = require('./_wks')('species'); +module.exports = function(O, D){ + var C = anObject(O).constructor, S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_strict-method.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_strict-method.js new file mode 100644 index 00000000..96b6c6e8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_strict-method.js @@ -0,0 +1,7 @@ +var fails = require('./_fails'); + +module.exports = function(method, arg){ + return !!method && fails(function(){ + arg ? method.call(null, function(){}, 1) : method.call(null); + }); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_string-at.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_string-at.js new file mode 100644 index 00000000..ecc0d21c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_string-at.js @@ -0,0 +1,17 @@ +var toInteger = require('./_to-integer') + , defined = require('./_defined'); +// true -> String#at +// false -> String#codePointAt +module.exports = function(TO_STRING){ + return function(that, pos){ + var s = String(defined(that)) + , i = toInteger(pos) + , l = s.length + , a, b; + if(i < 0 || i >= l)return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_string-context.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_string-context.js new file mode 100644 index 00000000..5f513483 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_string-context.js @@ -0,0 +1,8 @@ +// helper for String#{startsWith, endsWith, includes} +var isRegExp = require('./_is-regexp') + , defined = require('./_defined'); + +module.exports = function(that, searchString, NAME){ + if(isRegExp(searchString))throw TypeError('String#' + NAME + " doesn't accept regex!"); + return String(defined(that)); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_string-html.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_string-html.js new file mode 100644 index 00000000..95daf812 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_string-html.js @@ -0,0 +1,19 @@ +var $export = require('./_export') + , fails = require('./_fails') + , defined = require('./_defined') + , quot = /"/g; +// B.2.3.2.1 CreateHTML(string, tag, attribute, value) +var createHTML = function(string, tag, attribute, value) { + var S = String(defined(string)) + , p1 = '<' + tag; + if(attribute !== '')p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; + return p1 + '>' + S + ''; +}; +module.exports = function(NAME, exec){ + var O = {}; + O[NAME] = exec(createHTML); + $export($export.P + $export.F * fails(function(){ + var test = ''[NAME]('"'); + return test !== test.toLowerCase() || test.split('"').length > 3; + }), 'String', O); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_string-pad.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_string-pad.js new file mode 100644 index 00000000..dccd155e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_string-pad.js @@ -0,0 +1,16 @@ +// https://github.com/tc39/proposal-string-pad-start-end +var toLength = require('./_to-length') + , repeat = require('./_string-repeat') + , defined = require('./_defined'); + +module.exports = function(that, maxLength, fillString, left){ + var S = String(defined(that)) + , stringLength = S.length + , fillStr = fillString === undefined ? ' ' : String(fillString) + , intMaxLength = toLength(maxLength); + if(intMaxLength <= stringLength || fillStr == '')return S; + var fillLen = intMaxLength - stringLength + , stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length)); + if(stringFiller.length > fillLen)stringFiller = stringFiller.slice(0, fillLen); + return left ? stringFiller + S : S + stringFiller; +}; diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_string-repeat.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_string-repeat.js new file mode 100644 index 00000000..88fd3a2d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_string-repeat.js @@ -0,0 +1,12 @@ +'use strict'; +var toInteger = require('./_to-integer') + , defined = require('./_defined'); + +module.exports = function repeat(count){ + var str = String(defined(this)) + , res = '' + , n = toInteger(count); + if(n < 0 || n == Infinity)throw RangeError("Count can't be negative"); + for(;n > 0; (n >>>= 1) && (str += str))if(n & 1)res += str; + return res; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_string-trim.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_string-trim.js new file mode 100644 index 00000000..d12de1ce --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_string-trim.js @@ -0,0 +1,30 @@ +var $export = require('./_export') + , defined = require('./_defined') + , fails = require('./_fails') + , spaces = require('./_string-ws') + , space = '[' + spaces + ']' + , non = '\u200b\u0085' + , ltrim = RegExp('^' + space + space + '*') + , rtrim = RegExp(space + space + '*$'); + +var exporter = function(KEY, exec, ALIAS){ + var exp = {}; + var FORCE = fails(function(){ + return !!spaces[KEY]() || non[KEY]() != non; + }); + var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; + if(ALIAS)exp[ALIAS] = fn; + $export($export.P + $export.F * FORCE, 'String', exp); +}; + +// 1 -> String#trimLeft +// 2 -> String#trimRight +// 3 -> String#trim +var trim = exporter.trim = function(string, TYPE){ + string = String(defined(string)); + if(TYPE & 1)string = string.replace(ltrim, ''); + if(TYPE & 2)string = string.replace(rtrim, ''); + return string; +}; + +module.exports = exporter; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_string-ws.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_string-ws.js new file mode 100644 index 00000000..9713d11d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_string-ws.js @@ -0,0 +1,2 @@ +module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_task.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_task.js new file mode 100644 index 00000000..06a73f40 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_task.js @@ -0,0 +1,75 @@ +var ctx = require('./_ctx') + , invoke = require('./_invoke') + , html = require('./_html') + , cel = require('./_dom-create') + , global = require('./_global') + , process = global.process + , setTask = global.setImmediate + , clearTask = global.clearImmediate + , MessageChannel = global.MessageChannel + , counter = 0 + , queue = {} + , ONREADYSTATECHANGE = 'onreadystatechange' + , defer, channel, port; +var run = function(){ + var id = +this; + if(queue.hasOwnProperty(id)){ + var fn = queue[id]; + delete queue[id]; + fn(); + } +}; +var listener = function(event){ + run.call(event.data); +}; +// Node.js 0.9+ & IE10+ has setImmediate, otherwise: +if(!setTask || !clearTask){ + setTask = function setImmediate(fn){ + var args = [], i = 1; + while(arguments.length > i)args.push(arguments[i++]); + queue[++counter] = function(){ + invoke(typeof fn == 'function' ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate(id){ + delete queue[id]; + }; + // Node.js 0.8- + if(require('./_cof')(process) == 'process'){ + defer = function(id){ + process.nextTick(ctx(run, id, 1)); + }; + // Browsers with MessageChannel, includes WebWorkers + } else if(MessageChannel){ + channel = new MessageChannel; + port = channel.port2; + channel.port1.onmessage = listener; + defer = ctx(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){ + defer = function(id){ + global.postMessage(id + '', '*'); + }; + global.addEventListener('message', listener, false); + // IE8- + } else if(ONREADYSTATECHANGE in cel('script')){ + defer = function(id){ + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){ + html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers + } else { + defer = function(id){ + setTimeout(ctx(run, id, 1), 0); + }; + } +} +module.exports = { + set: setTask, + clear: clearTask +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_to-index.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_to-index.js new file mode 100644 index 00000000..4d380ce1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_to-index.js @@ -0,0 +1,7 @@ +var toInteger = require('./_to-integer') + , max = Math.max + , min = Math.min; +module.exports = function(index, length){ + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_to-integer.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_to-integer.js new file mode 100644 index 00000000..f63baaff --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_to-integer.js @@ -0,0 +1,6 @@ +// 7.1.4 ToInteger +var ceil = Math.ceil + , floor = Math.floor; +module.exports = function(it){ + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_to-iobject.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_to-iobject.js new file mode 100644 index 00000000..4eb43462 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_to-iobject.js @@ -0,0 +1,6 @@ +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = require('./_iobject') + , defined = require('./_defined'); +module.exports = function(it){ + return IObject(defined(it)); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_to-length.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_to-length.js new file mode 100644 index 00000000..4099e60b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_to-length.js @@ -0,0 +1,6 @@ +// 7.1.15 ToLength +var toInteger = require('./_to-integer') + , min = Math.min; +module.exports = function(it){ + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_to-object.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_to-object.js new file mode 100644 index 00000000..f2c28b3f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_to-object.js @@ -0,0 +1,5 @@ +// 7.1.13 ToObject(argument) +var defined = require('./_defined'); +module.exports = function(it){ + return Object(defined(it)); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_to-primitive.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_to-primitive.js new file mode 100644 index 00000000..16354eed --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_to-primitive.js @@ -0,0 +1,12 @@ +// 7.1.1 ToPrimitive(input [, PreferredType]) +var isObject = require('./_is-object'); +// instead of the ES6 spec version, we didn't implement @@toPrimitive case +// and the second argument - flag - preferred type is a string +module.exports = function(it, S){ + if(!isObject(it))return it; + var fn, val; + if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; + if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val; + if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; + throw TypeError("Can't convert object to primitive value"); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_typed-array.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_typed-array.js new file mode 100644 index 00000000..b072b23b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_typed-array.js @@ -0,0 +1,479 @@ +'use strict'; +if(require('./_descriptors')){ + var LIBRARY = require('./_library') + , global = require('./_global') + , fails = require('./_fails') + , $export = require('./_export') + , $typed = require('./_typed') + , $buffer = require('./_typed-buffer') + , ctx = require('./_ctx') + , anInstance = require('./_an-instance') + , propertyDesc = require('./_property-desc') + , hide = require('./_hide') + , redefineAll = require('./_redefine-all') + , toInteger = require('./_to-integer') + , toLength = require('./_to-length') + , toIndex = require('./_to-index') + , toPrimitive = require('./_to-primitive') + , has = require('./_has') + , same = require('./_same-value') + , classof = require('./_classof') + , isObject = require('./_is-object') + , toObject = require('./_to-object') + , isArrayIter = require('./_is-array-iter') + , create = require('./_object-create') + , getPrototypeOf = require('./_object-gpo') + , gOPN = require('./_object-gopn').f + , getIterFn = require('./core.get-iterator-method') + , uid = require('./_uid') + , wks = require('./_wks') + , createArrayMethod = require('./_array-methods') + , createArrayIncludes = require('./_array-includes') + , speciesConstructor = require('./_species-constructor') + , ArrayIterators = require('./es6.array.iterator') + , Iterators = require('./_iterators') + , $iterDetect = require('./_iter-detect') + , setSpecies = require('./_set-species') + , arrayFill = require('./_array-fill') + , arrayCopyWithin = require('./_array-copy-within') + , $DP = require('./_object-dp') + , $GOPD = require('./_object-gopd') + , dP = $DP.f + , gOPD = $GOPD.f + , RangeError = global.RangeError + , TypeError = global.TypeError + , Uint8Array = global.Uint8Array + , ARRAY_BUFFER = 'ArrayBuffer' + , SHARED_BUFFER = 'Shared' + ARRAY_BUFFER + , BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT' + , PROTOTYPE = 'prototype' + , ArrayProto = Array[PROTOTYPE] + , $ArrayBuffer = $buffer.ArrayBuffer + , $DataView = $buffer.DataView + , arrayForEach = createArrayMethod(0) + , arrayFilter = createArrayMethod(2) + , arraySome = createArrayMethod(3) + , arrayEvery = createArrayMethod(4) + , arrayFind = createArrayMethod(5) + , arrayFindIndex = createArrayMethod(6) + , arrayIncludes = createArrayIncludes(true) + , arrayIndexOf = createArrayIncludes(false) + , arrayValues = ArrayIterators.values + , arrayKeys = ArrayIterators.keys + , arrayEntries = ArrayIterators.entries + , arrayLastIndexOf = ArrayProto.lastIndexOf + , arrayReduce = ArrayProto.reduce + , arrayReduceRight = ArrayProto.reduceRight + , arrayJoin = ArrayProto.join + , arraySort = ArrayProto.sort + , arraySlice = ArrayProto.slice + , arrayToString = ArrayProto.toString + , arrayToLocaleString = ArrayProto.toLocaleString + , ITERATOR = wks('iterator') + , TAG = wks('toStringTag') + , TYPED_CONSTRUCTOR = uid('typed_constructor') + , DEF_CONSTRUCTOR = uid('def_constructor') + , ALL_CONSTRUCTORS = $typed.CONSTR + , TYPED_ARRAY = $typed.TYPED + , VIEW = $typed.VIEW + , WRONG_LENGTH = 'Wrong length!'; + + var $map = createArrayMethod(1, function(O, length){ + return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); + }); + + var LITTLE_ENDIAN = fails(function(){ + return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; + }); + + var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function(){ + new Uint8Array(1).set({}); + }); + + var strictToLength = function(it, SAME){ + if(it === undefined)throw TypeError(WRONG_LENGTH); + var number = +it + , length = toLength(it); + if(SAME && !same(number, length))throw RangeError(WRONG_LENGTH); + return length; + }; + + var toOffset = function(it, BYTES){ + var offset = toInteger(it); + if(offset < 0 || offset % BYTES)throw RangeError('Wrong offset!'); + return offset; + }; + + var validate = function(it){ + if(isObject(it) && TYPED_ARRAY in it)return it; + throw TypeError(it + ' is not a typed array!'); + }; + + var allocate = function(C, length){ + if(!(isObject(C) && TYPED_CONSTRUCTOR in C)){ + throw TypeError('It is not a typed array constructor!'); + } return new C(length); + }; + + var speciesFromList = function(O, list){ + return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list); + }; + + var fromList = function(C, list){ + var index = 0 + , length = list.length + , result = allocate(C, length); + while(length > index)result[index] = list[index++]; + return result; + }; + + var addGetter = function(it, key, internal){ + dP(it, key, {get: function(){ return this._d[internal]; }}); + }; + + var $from = function from(source /*, mapfn, thisArg */){ + var O = toObject(source) + , aLen = arguments.length + , mapfn = aLen > 1 ? arguments[1] : undefined + , mapping = mapfn !== undefined + , iterFn = getIterFn(O) + , i, length, values, result, step, iterator; + if(iterFn != undefined && !isArrayIter(iterFn)){ + for(iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++){ + values.push(step.value); + } O = values; + } + if(mapping && aLen > 2)mapfn = ctx(mapfn, arguments[2], 2); + for(i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++){ + result[i] = mapping ? mapfn(O[i], i) : O[i]; + } + return result; + }; + + var $of = function of(/*...items*/){ + var index = 0 + , length = arguments.length + , result = allocate(this, length); + while(length > index)result[index] = arguments[index++]; + return result; + }; + + // iOS Safari 6.x fails here + var TO_LOCALE_BUG = !!Uint8Array && fails(function(){ arrayToLocaleString.call(new Uint8Array(1)); }); + + var $toLocaleString = function toLocaleString(){ + return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments); + }; + + var proto = { + copyWithin: function copyWithin(target, start /*, end */){ + return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined); + }, + every: function every(callbackfn /*, thisArg */){ + return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + fill: function fill(value /*, start, end */){ // eslint-disable-line no-unused-vars + return arrayFill.apply(validate(this), arguments); + }, + filter: function filter(callbackfn /*, thisArg */){ + return speciesFromList(this, arrayFilter(validate(this), callbackfn, + arguments.length > 1 ? arguments[1] : undefined)); + }, + find: function find(predicate /*, thisArg */){ + return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + findIndex: function findIndex(predicate /*, thisArg */){ + return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + forEach: function forEach(callbackfn /*, thisArg */){ + arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + indexOf: function indexOf(searchElement /*, fromIndex */){ + return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); + }, + includes: function includes(searchElement /*, fromIndex */){ + return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); + }, + join: function join(separator){ // eslint-disable-line no-unused-vars + return arrayJoin.apply(validate(this), arguments); + }, + lastIndexOf: function lastIndexOf(searchElement /*, fromIndex */){ // eslint-disable-line no-unused-vars + return arrayLastIndexOf.apply(validate(this), arguments); + }, + map: function map(mapfn /*, thisArg */){ + return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined); + }, + reduce: function reduce(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars + return arrayReduce.apply(validate(this), arguments); + }, + reduceRight: function reduceRight(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars + return arrayReduceRight.apply(validate(this), arguments); + }, + reverse: function reverse(){ + var that = this + , length = validate(that).length + , middle = Math.floor(length / 2) + , index = 0 + , value; + while(index < middle){ + value = that[index]; + that[index++] = that[--length]; + that[length] = value; + } return that; + }, + some: function some(callbackfn /*, thisArg */){ + return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + sort: function sort(comparefn){ + return arraySort.call(validate(this), comparefn); + }, + subarray: function subarray(begin, end){ + var O = validate(this) + , length = O.length + , $begin = toIndex(begin, length); + return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( + O.buffer, + O.byteOffset + $begin * O.BYTES_PER_ELEMENT, + toLength((end === undefined ? length : toIndex(end, length)) - $begin) + ); + } + }; + + var $slice = function slice(start, end){ + return speciesFromList(this, arraySlice.call(validate(this), start, end)); + }; + + var $set = function set(arrayLike /*, offset */){ + validate(this); + var offset = toOffset(arguments[1], 1) + , length = this.length + , src = toObject(arrayLike) + , len = toLength(src.length) + , index = 0; + if(len + offset > length)throw RangeError(WRONG_LENGTH); + while(index < len)this[offset + index] = src[index++]; + }; + + var $iterators = { + entries: function entries(){ + return arrayEntries.call(validate(this)); + }, + keys: function keys(){ + return arrayKeys.call(validate(this)); + }, + values: function values(){ + return arrayValues.call(validate(this)); + } + }; + + var isTAIndex = function(target, key){ + return isObject(target) + && target[TYPED_ARRAY] + && typeof key != 'symbol' + && key in target + && String(+key) == String(key); + }; + var $getDesc = function getOwnPropertyDescriptor(target, key){ + return isTAIndex(target, key = toPrimitive(key, true)) + ? propertyDesc(2, target[key]) + : gOPD(target, key); + }; + var $setDesc = function defineProperty(target, key, desc){ + if(isTAIndex(target, key = toPrimitive(key, true)) + && isObject(desc) + && has(desc, 'value') + && !has(desc, 'get') + && !has(desc, 'set') + // TODO: add validation descriptor w/o calling accessors + && !desc.configurable + && (!has(desc, 'writable') || desc.writable) + && (!has(desc, 'enumerable') || desc.enumerable) + ){ + target[key] = desc.value; + return target; + } else return dP(target, key, desc); + }; + + if(!ALL_CONSTRUCTORS){ + $GOPD.f = $getDesc; + $DP.f = $setDesc; + } + + $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', { + getOwnPropertyDescriptor: $getDesc, + defineProperty: $setDesc + }); + + if(fails(function(){ arrayToString.call({}); })){ + arrayToString = arrayToLocaleString = function toString(){ + return arrayJoin.call(this); + } + } + + var $TypedArrayPrototype$ = redefineAll({}, proto); + redefineAll($TypedArrayPrototype$, $iterators); + hide($TypedArrayPrototype$, ITERATOR, $iterators.values); + redefineAll($TypedArrayPrototype$, { + slice: $slice, + set: $set, + constructor: function(){ /* noop */ }, + toString: arrayToString, + toLocaleString: $toLocaleString + }); + addGetter($TypedArrayPrototype$, 'buffer', 'b'); + addGetter($TypedArrayPrototype$, 'byteOffset', 'o'); + addGetter($TypedArrayPrototype$, 'byteLength', 'l'); + addGetter($TypedArrayPrototype$, 'length', 'e'); + dP($TypedArrayPrototype$, TAG, { + get: function(){ return this[TYPED_ARRAY]; } + }); + + module.exports = function(KEY, BYTES, wrapper, CLAMPED){ + CLAMPED = !!CLAMPED; + var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array' + , ISNT_UINT8 = NAME != 'Uint8Array' + , GETTER = 'get' + KEY + , SETTER = 'set' + KEY + , TypedArray = global[NAME] + , Base = TypedArray || {} + , TAC = TypedArray && getPrototypeOf(TypedArray) + , FORCED = !TypedArray || !$typed.ABV + , O = {} + , TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE]; + var getter = function(that, index){ + var data = that._d; + return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN); + }; + var setter = function(that, index, value){ + var data = that._d; + if(CLAMPED)value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff; + data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN); + }; + var addElement = function(that, index){ + dP(that, index, { + get: function(){ + return getter(this, index); + }, + set: function(value){ + return setter(this, index, value); + }, + enumerable: true + }); + }; + if(FORCED){ + TypedArray = wrapper(function(that, data, $offset, $length){ + anInstance(that, TypedArray, NAME, '_d'); + var index = 0 + , offset = 0 + , buffer, byteLength, length, klass; + if(!isObject(data)){ + length = strictToLength(data, true) + byteLength = length * BYTES; + buffer = new $ArrayBuffer(byteLength); + } else if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){ + buffer = data; + offset = toOffset($offset, BYTES); + var $len = data.byteLength; + if($length === undefined){ + if($len % BYTES)throw RangeError(WRONG_LENGTH); + byteLength = $len - offset; + if(byteLength < 0)throw RangeError(WRONG_LENGTH); + } else { + byteLength = toLength($length) * BYTES; + if(byteLength + offset > $len)throw RangeError(WRONG_LENGTH); + } + length = byteLength / BYTES; + } else if(TYPED_ARRAY in data){ + return fromList(TypedArray, data); + } else { + return $from.call(TypedArray, data); + } + hide(that, '_d', { + b: buffer, + o: offset, + l: byteLength, + e: length, + v: new $DataView(buffer) + }); + while(index < length)addElement(that, index++); + }); + TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$); + hide(TypedArrayPrototype, 'constructor', TypedArray); + } else if(!$iterDetect(function(iter){ + // V8 works with iterators, but fails in many other cases + // https://code.google.com/p/v8/issues/detail?id=4552 + new TypedArray(null); // eslint-disable-line no-new + new TypedArray(iter); // eslint-disable-line no-new + }, true)){ + TypedArray = wrapper(function(that, data, $offset, $length){ + anInstance(that, TypedArray, NAME); + var klass; + // `ws` module bug, temporarily remove validation length for Uint8Array + // https://github.com/websockets/ws/pull/645 + if(!isObject(data))return new Base(strictToLength(data, ISNT_UINT8)); + if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){ + return $length !== undefined + ? new Base(data, toOffset($offset, BYTES), $length) + : $offset !== undefined + ? new Base(data, toOffset($offset, BYTES)) + : new Base(data); + } + if(TYPED_ARRAY in data)return fromList(TypedArray, data); + return $from.call(TypedArray, data); + }); + arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function(key){ + if(!(key in TypedArray))hide(TypedArray, key, Base[key]); + }); + TypedArray[PROTOTYPE] = TypedArrayPrototype; + if(!LIBRARY)TypedArrayPrototype.constructor = TypedArray; + } + var $nativeIterator = TypedArrayPrototype[ITERATOR] + , CORRECT_ITER_NAME = !!$nativeIterator && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined) + , $iterator = $iterators.values; + hide(TypedArray, TYPED_CONSTRUCTOR, true); + hide(TypedArrayPrototype, TYPED_ARRAY, NAME); + hide(TypedArrayPrototype, VIEW, true); + hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray); + + if(CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)){ + dP(TypedArrayPrototype, TAG, { + get: function(){ return NAME; } + }); + } + + O[NAME] = TypedArray; + + $export($export.G + $export.W + $export.F * (TypedArray != Base), O); + + $export($export.S, NAME, { + BYTES_PER_ELEMENT: BYTES, + from: $from, + of: $of + }); + + if(!(BYTES_PER_ELEMENT in TypedArrayPrototype))hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); + + $export($export.P, NAME, proto); + + setSpecies(NAME); + + $export($export.P + $export.F * FORCED_SET, NAME, {set: $set}); + + $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); + + $export($export.P + $export.F * (TypedArrayPrototype.toString != arrayToString), NAME, {toString: arrayToString}); + + $export($export.P + $export.F * fails(function(){ + new TypedArray(1).slice(); + }), NAME, {slice: $slice}); + + $export($export.P + $export.F * (fails(function(){ + return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString() + }) || !fails(function(){ + TypedArrayPrototype.toLocaleString.call([1, 2]); + })), NAME, {toLocaleString: $toLocaleString}); + + Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator; + if(!LIBRARY && !CORRECT_ITER_NAME)hide(TypedArrayPrototype, ITERATOR, $iterator); + }; +} else module.exports = function(){ /* empty */ }; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_typed-buffer.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_typed-buffer.js new file mode 100644 index 00000000..2129eea4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_typed-buffer.js @@ -0,0 +1,273 @@ +'use strict'; +var global = require('./_global') + , DESCRIPTORS = require('./_descriptors') + , LIBRARY = require('./_library') + , $typed = require('./_typed') + , hide = require('./_hide') + , redefineAll = require('./_redefine-all') + , fails = require('./_fails') + , anInstance = require('./_an-instance') + , toInteger = require('./_to-integer') + , toLength = require('./_to-length') + , gOPN = require('./_object-gopn').f + , dP = require('./_object-dp').f + , arrayFill = require('./_array-fill') + , setToStringTag = require('./_set-to-string-tag') + , ARRAY_BUFFER = 'ArrayBuffer' + , DATA_VIEW = 'DataView' + , PROTOTYPE = 'prototype' + , WRONG_LENGTH = 'Wrong length!' + , WRONG_INDEX = 'Wrong index!' + , $ArrayBuffer = global[ARRAY_BUFFER] + , $DataView = global[DATA_VIEW] + , Math = global.Math + , RangeError = global.RangeError + , Infinity = global.Infinity + , BaseBuffer = $ArrayBuffer + , abs = Math.abs + , pow = Math.pow + , floor = Math.floor + , log = Math.log + , LN2 = Math.LN2 + , BUFFER = 'buffer' + , BYTE_LENGTH = 'byteLength' + , BYTE_OFFSET = 'byteOffset' + , $BUFFER = DESCRIPTORS ? '_b' : BUFFER + , $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH + , $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET; + +// IEEE754 conversions based on https://github.com/feross/ieee754 +var packIEEE754 = function(value, mLen, nBytes){ + var buffer = Array(nBytes) + , eLen = nBytes * 8 - mLen - 1 + , eMax = (1 << eLen) - 1 + , eBias = eMax >> 1 + , rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0 + , i = 0 + , s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0 + , e, m, c; + value = abs(value) + if(value != value || value === Infinity){ + m = value != value ? 1 : 0; + e = eMax; + } else { + e = floor(log(value) / LN2); + if(value * (c = pow(2, -e)) < 1){ + e--; + c *= 2; + } + if(e + eBias >= 1){ + value += rt / c; + } else { + value += rt * pow(2, 1 - eBias); + } + if(value * c >= 2){ + e++; + c /= 2; + } + if(e + eBias >= eMax){ + m = 0; + e = eMax; + } else if(e + eBias >= 1){ + m = (value * c - 1) * pow(2, mLen); + e = e + eBias; + } else { + m = value * pow(2, eBias - 1) * pow(2, mLen); + e = 0; + } + } + for(; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8); + e = e << mLen | m; + eLen += mLen; + for(; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8); + buffer[--i] |= s * 128; + return buffer; +}; +var unpackIEEE754 = function(buffer, mLen, nBytes){ + var eLen = nBytes * 8 - mLen - 1 + , eMax = (1 << eLen) - 1 + , eBias = eMax >> 1 + , nBits = eLen - 7 + , i = nBytes - 1 + , s = buffer[i--] + , e = s & 127 + , m; + s >>= 7; + for(; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8); + m = e & (1 << -nBits) - 1; + e >>= -nBits; + nBits += mLen; + for(; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8); + if(e === 0){ + e = 1 - eBias; + } else if(e === eMax){ + return m ? NaN : s ? -Infinity : Infinity; + } else { + m = m + pow(2, mLen); + e = e - eBias; + } return (s ? -1 : 1) * m * pow(2, e - mLen); +}; + +var unpackI32 = function(bytes){ + return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0]; +}; +var packI8 = function(it){ + return [it & 0xff]; +}; +var packI16 = function(it){ + return [it & 0xff, it >> 8 & 0xff]; +}; +var packI32 = function(it){ + return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff]; +}; +var packF64 = function(it){ + return packIEEE754(it, 52, 8); +}; +var packF32 = function(it){ + return packIEEE754(it, 23, 4); +}; + +var addGetter = function(C, key, internal){ + dP(C[PROTOTYPE], key, {get: function(){ return this[internal]; }}); +}; + +var get = function(view, bytes, index, isLittleEndian){ + var numIndex = +index + , intIndex = toInteger(numIndex); + if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b + , start = intIndex + view[$OFFSET] + , pack = store.slice(start, start + bytes); + return isLittleEndian ? pack : pack.reverse(); +}; +var set = function(view, bytes, index, conversion, value, isLittleEndian){ + var numIndex = +index + , intIndex = toInteger(numIndex); + if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b + , start = intIndex + view[$OFFSET] + , pack = conversion(+value); + for(var i = 0; i < bytes; i++)store[start + i] = pack[isLittleEndian ? i : bytes - i - 1]; +}; + +var validateArrayBufferArguments = function(that, length){ + anInstance(that, $ArrayBuffer, ARRAY_BUFFER); + var numberLength = +length + , byteLength = toLength(numberLength); + if(numberLength != byteLength)throw RangeError(WRONG_LENGTH); + return byteLength; +}; + +if(!$typed.ABV){ + $ArrayBuffer = function ArrayBuffer(length){ + var byteLength = validateArrayBufferArguments(this, length); + this._b = arrayFill.call(Array(byteLength), 0); + this[$LENGTH] = byteLength; + }; + + $DataView = function DataView(buffer, byteOffset, byteLength){ + anInstance(this, $DataView, DATA_VIEW); + anInstance(buffer, $ArrayBuffer, DATA_VIEW); + var bufferLength = buffer[$LENGTH] + , offset = toInteger(byteOffset); + if(offset < 0 || offset > bufferLength)throw RangeError('Wrong offset!'); + byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); + if(offset + byteLength > bufferLength)throw RangeError(WRONG_LENGTH); + this[$BUFFER] = buffer; + this[$OFFSET] = offset; + this[$LENGTH] = byteLength; + }; + + if(DESCRIPTORS){ + addGetter($ArrayBuffer, BYTE_LENGTH, '_l'); + addGetter($DataView, BUFFER, '_b'); + addGetter($DataView, BYTE_LENGTH, '_l'); + addGetter($DataView, BYTE_OFFSET, '_o'); + } + + redefineAll($DataView[PROTOTYPE], { + getInt8: function getInt8(byteOffset){ + return get(this, 1, byteOffset)[0] << 24 >> 24; + }, + getUint8: function getUint8(byteOffset){ + return get(this, 1, byteOffset)[0]; + }, + getInt16: function getInt16(byteOffset /*, littleEndian */){ + var bytes = get(this, 2, byteOffset, arguments[1]); + return (bytes[1] << 8 | bytes[0]) << 16 >> 16; + }, + getUint16: function getUint16(byteOffset /*, littleEndian */){ + var bytes = get(this, 2, byteOffset, arguments[1]); + return bytes[1] << 8 | bytes[0]; + }, + getInt32: function getInt32(byteOffset /*, littleEndian */){ + return unpackI32(get(this, 4, byteOffset, arguments[1])); + }, + getUint32: function getUint32(byteOffset /*, littleEndian */){ + return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0; + }, + getFloat32: function getFloat32(byteOffset /*, littleEndian */){ + return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4); + }, + getFloat64: function getFloat64(byteOffset /*, littleEndian */){ + return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8); + }, + setInt8: function setInt8(byteOffset, value){ + set(this, 1, byteOffset, packI8, value); + }, + setUint8: function setUint8(byteOffset, value){ + set(this, 1, byteOffset, packI8, value); + }, + setInt16: function setInt16(byteOffset, value /*, littleEndian */){ + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setUint16: function setUint16(byteOffset, value /*, littleEndian */){ + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setInt32: function setInt32(byteOffset, value /*, littleEndian */){ + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setUint32: function setUint32(byteOffset, value /*, littleEndian */){ + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setFloat32: function setFloat32(byteOffset, value /*, littleEndian */){ + set(this, 4, byteOffset, packF32, value, arguments[2]); + }, + setFloat64: function setFloat64(byteOffset, value /*, littleEndian */){ + set(this, 8, byteOffset, packF64, value, arguments[2]); + } + }); +} else { + if(!fails(function(){ + new $ArrayBuffer; // eslint-disable-line no-new + }) || !fails(function(){ + new $ArrayBuffer(.5); // eslint-disable-line no-new + })){ + $ArrayBuffer = function ArrayBuffer(length){ + return new BaseBuffer(validateArrayBufferArguments(this, length)); + }; + var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE]; + for(var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j; ){ + if(!((key = keys[j++]) in $ArrayBuffer))hide($ArrayBuffer, key, BaseBuffer[key]); + }; + if(!LIBRARY)ArrayBufferProto.constructor = $ArrayBuffer; + } + // iOS Safari 7.x bug + var view = new $DataView(new $ArrayBuffer(2)) + , $setInt8 = $DataView[PROTOTYPE].setInt8; + view.setInt8(0, 2147483648); + view.setInt8(1, 2147483649); + if(view.getInt8(0) || !view.getInt8(1))redefineAll($DataView[PROTOTYPE], { + setInt8: function setInt8(byteOffset, value){ + $setInt8.call(this, byteOffset, value << 24 >> 24); + }, + setUint8: function setUint8(byteOffset, value){ + $setInt8.call(this, byteOffset, value << 24 >> 24); + } + }, true); +} +setToStringTag($ArrayBuffer, ARRAY_BUFFER); +setToStringTag($DataView, DATA_VIEW); +hide($DataView[PROTOTYPE], $typed.VIEW, true); +exports[ARRAY_BUFFER] = $ArrayBuffer; +exports[DATA_VIEW] = $DataView; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_typed.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_typed.js new file mode 100644 index 00000000..6ed2ab56 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_typed.js @@ -0,0 +1,26 @@ +var global = require('./_global') + , hide = require('./_hide') + , uid = require('./_uid') + , TYPED = uid('typed_array') + , VIEW = uid('view') + , ABV = !!(global.ArrayBuffer && global.DataView) + , CONSTR = ABV + , i = 0, l = 9, Typed; + +var TypedArrayConstructors = ( + 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array' +).split(','); + +while(i < l){ + if(Typed = global[TypedArrayConstructors[i++]]){ + hide(Typed.prototype, TYPED, true); + hide(Typed.prototype, VIEW, true); + } else CONSTR = false; +} + +module.exports = { + ABV: ABV, + CONSTR: CONSTR, + TYPED: TYPED, + VIEW: VIEW +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_uid.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_uid.js new file mode 100644 index 00000000..3be4196b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_uid.js @@ -0,0 +1,5 @@ +var id = 0 + , px = Math.random(); +module.exports = function(key){ + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_wks-define.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_wks-define.js new file mode 100644 index 00000000..e6960328 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_wks-define.js @@ -0,0 +1,9 @@ +var global = require('./_global') + , core = require('./_core') + , LIBRARY = require('./_library') + , wksExt = require('./_wks-ext') + , defineProperty = require('./_object-dp').f; +module.exports = function(name){ + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)}); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_wks-ext.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_wks-ext.js new file mode 100644 index 00000000..7901def6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_wks-ext.js @@ -0,0 +1 @@ +exports.f = require('./_wks'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/_wks.js b/pitfall/pdfkit/node_modules/core-js/library/modules/_wks.js new file mode 100644 index 00000000..36f7973a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/_wks.js @@ -0,0 +1,11 @@ +var store = require('./_shared')('wks') + , uid = require('./_uid') + , Symbol = require('./_global').Symbol + , USE_SYMBOL = typeof Symbol == 'function'; + +var $exports = module.exports = function(name){ + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); +}; + +$exports.store = store; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/core.delay.js b/pitfall/pdfkit/node_modules/core-js/library/modules/core.delay.js new file mode 100644 index 00000000..ea031be4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/core.delay.js @@ -0,0 +1,12 @@ +var global = require('./_global') + , core = require('./_core') + , $export = require('./_export') + , partial = require('./_partial'); +// https://esdiscuss.org/topic/promise-returning-delay-function +$export($export.G + $export.F, { + delay: function delay(time){ + return new (core.Promise || global.Promise)(function(resolve){ + setTimeout(partial.call(resolve, true), time); + }); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/core.dict.js b/pitfall/pdfkit/node_modules/core-js/library/modules/core.dict.js new file mode 100644 index 00000000..88c54e3d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/core.dict.js @@ -0,0 +1,155 @@ +'use strict'; +var ctx = require('./_ctx') + , $export = require('./_export') + , createDesc = require('./_property-desc') + , assign = require('./_object-assign') + , create = require('./_object-create') + , getPrototypeOf = require('./_object-gpo') + , getKeys = require('./_object-keys') + , dP = require('./_object-dp') + , keyOf = require('./_keyof') + , aFunction = require('./_a-function') + , forOf = require('./_for-of') + , isIterable = require('./core.is-iterable') + , $iterCreate = require('./_iter-create') + , step = require('./_iter-step') + , isObject = require('./_is-object') + , toIObject = require('./_to-iobject') + , DESCRIPTORS = require('./_descriptors') + , has = require('./_has'); + +// 0 -> Dict.forEach +// 1 -> Dict.map +// 2 -> Dict.filter +// 3 -> Dict.some +// 4 -> Dict.every +// 5 -> Dict.find +// 6 -> Dict.findKey +// 7 -> Dict.mapPairs +var createDictMethod = function(TYPE){ + var IS_MAP = TYPE == 1 + , IS_EVERY = TYPE == 4; + return function(object, callbackfn, that /* = undefined */){ + var f = ctx(callbackfn, that, 3) + , O = toIObject(object) + , result = IS_MAP || TYPE == 7 || TYPE == 2 + ? new (typeof this == 'function' ? this : Dict) : undefined + , key, val, res; + for(key in O)if(has(O, key)){ + val = O[key]; + res = f(val, key, object); + if(TYPE){ + if(IS_MAP)result[key] = res; // map + else if(res)switch(TYPE){ + case 2: result[key] = val; break; // filter + case 3: return true; // some + case 5: return val; // find + case 6: return key; // findKey + case 7: result[res[0]] = res[1]; // mapPairs + } else if(IS_EVERY)return false; // every + } + } + return TYPE == 3 || IS_EVERY ? IS_EVERY : result; + }; +}; +var findKey = createDictMethod(6); + +var createDictIter = function(kind){ + return function(it){ + return new DictIterator(it, kind); + }; +}; +var DictIterator = function(iterated, kind){ + this._t = toIObject(iterated); // target + this._a = getKeys(iterated); // keys + this._i = 0; // next index + this._k = kind; // kind +}; +$iterCreate(DictIterator, 'Dict', function(){ + var that = this + , O = that._t + , keys = that._a + , kind = that._k + , key; + do { + if(that._i >= keys.length){ + that._t = undefined; + return step(1); + } + } while(!has(O, key = keys[that._i++])); + if(kind == 'keys' )return step(0, key); + if(kind == 'values')return step(0, O[key]); + return step(0, [key, O[key]]); +}); + +function Dict(iterable){ + var dict = create(null); + if(iterable != undefined){ + if(isIterable(iterable)){ + forOf(iterable, true, function(key, value){ + dict[key] = value; + }); + } else assign(dict, iterable); + } + return dict; +} +Dict.prototype = null; + +function reduce(object, mapfn, init){ + aFunction(mapfn); + var O = toIObject(object) + , keys = getKeys(O) + , length = keys.length + , i = 0 + , memo, key; + if(arguments.length < 3){ + if(!length)throw TypeError('Reduce of empty object with no initial value'); + memo = O[keys[i++]]; + } else memo = Object(init); + while(length > i)if(has(O, key = keys[i++])){ + memo = mapfn(memo, O[key], key, object); + } + return memo; +} + +function includes(object, el){ + return (el == el ? keyOf(object, el) : findKey(object, function(it){ + return it != it; + })) !== undefined; +} + +function get(object, key){ + if(has(object, key))return object[key]; +} +function set(object, key, value){ + if(DESCRIPTORS && key in Object)dP.f(object, key, createDesc(0, value)); + else object[key] = value; + return object; +} + +function isDict(it){ + return isObject(it) && getPrototypeOf(it) === Dict.prototype; +} + +$export($export.G + $export.F, {Dict: Dict}); + +$export($export.S, 'Dict', { + keys: createDictIter('keys'), + values: createDictIter('values'), + entries: createDictIter('entries'), + forEach: createDictMethod(0), + map: createDictMethod(1), + filter: createDictMethod(2), + some: createDictMethod(3), + every: createDictMethod(4), + find: createDictMethod(5), + findKey: findKey, + mapPairs: createDictMethod(7), + reduce: reduce, + keyOf: keyOf, + includes: includes, + has: has, + get: get, + set: set, + isDict: isDict +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/core.function.part.js b/pitfall/pdfkit/node_modules/core-js/library/modules/core.function.part.js new file mode 100644 index 00000000..ce851ff8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/core.function.part.js @@ -0,0 +1,7 @@ +var path = require('./_path') + , $export = require('./_export'); + +// Placeholder +require('./_core')._ = path._ = path._ || {}; + +$export($export.P + $export.F, 'Function', {part: require('./_partial')}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/core.get-iterator-method.js b/pitfall/pdfkit/node_modules/core-js/library/modules/core.get-iterator-method.js new file mode 100644 index 00000000..e2c7ecc3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/core.get-iterator-method.js @@ -0,0 +1,8 @@ +var classof = require('./_classof') + , ITERATOR = require('./_wks')('iterator') + , Iterators = require('./_iterators'); +module.exports = require('./_core').getIteratorMethod = function(it){ + if(it != undefined)return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/core.get-iterator.js b/pitfall/pdfkit/node_modules/core-js/library/modules/core.get-iterator.js new file mode 100644 index 00000000..c292e1ab --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/core.get-iterator.js @@ -0,0 +1,7 @@ +var anObject = require('./_an-object') + , get = require('./core.get-iterator-method'); +module.exports = require('./_core').getIterator = function(it){ + var iterFn = get(it); + if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!'); + return anObject(iterFn.call(it)); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/core.is-iterable.js b/pitfall/pdfkit/node_modules/core-js/library/modules/core.is-iterable.js new file mode 100644 index 00000000..b2b01b6b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/core.is-iterable.js @@ -0,0 +1,9 @@ +var classof = require('./_classof') + , ITERATOR = require('./_wks')('iterator') + , Iterators = require('./_iterators'); +module.exports = require('./_core').isIterable = function(it){ + var O = Object(it); + return O[ITERATOR] !== undefined + || '@@iterator' in O + || Iterators.hasOwnProperty(classof(O)); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/core.number.iterator.js b/pitfall/pdfkit/node_modules/core-js/library/modules/core.number.iterator.js new file mode 100644 index 00000000..9700acba --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/core.number.iterator.js @@ -0,0 +1,9 @@ +'use strict'; +require('./_iter-define')(Number, 'Number', function(iterated){ + this._l = +iterated; + this._i = 0; +}, function(){ + var i = this._i++ + , done = !(i < this._l); + return {done: done, value: done ? undefined : i}; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/core.object.classof.js b/pitfall/pdfkit/node_modules/core-js/library/modules/core.object.classof.js new file mode 100644 index 00000000..342c7371 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/core.object.classof.js @@ -0,0 +1,3 @@ +var $export = require('./_export'); + +$export($export.S + $export.F, 'Object', {classof: require('./_classof')}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/core.object.define.js b/pitfall/pdfkit/node_modules/core-js/library/modules/core.object.define.js new file mode 100644 index 00000000..d60e9a95 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/core.object.define.js @@ -0,0 +1,4 @@ +var $export = require('./_export') + , define = require('./_object-define'); + +$export($export.S + $export.F, 'Object', {define: define}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/core.object.is-object.js b/pitfall/pdfkit/node_modules/core-js/library/modules/core.object.is-object.js new file mode 100644 index 00000000..f2ba059f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/core.object.is-object.js @@ -0,0 +1,3 @@ +var $export = require('./_export'); + +$export($export.S + $export.F, 'Object', {isObject: require('./_is-object')}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/core.object.make.js b/pitfall/pdfkit/node_modules/core-js/library/modules/core.object.make.js new file mode 100644 index 00000000..3d2a2b5f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/core.object.make.js @@ -0,0 +1,9 @@ +var $export = require('./_export') + , define = require('./_object-define') + , create = require('./_object-create'); + +$export($export.S + $export.F, 'Object', { + make: function(proto, mixin){ + return define(create(proto), mixin); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/core.regexp.escape.js b/pitfall/pdfkit/node_modules/core-js/library/modules/core.regexp.escape.js new file mode 100644 index 00000000..54f832ef --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/core.regexp.escape.js @@ -0,0 +1,5 @@ +// https://github.com/benjamingr/RexExp.escape +var $export = require('./_export') + , $re = require('./_replacer')(/[\\^$*+?.()|[\]{}]/g, '\\$&'); + +$export($export.S, 'RegExp', {escape: function escape(it){ return $re(it); }}); diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/core.string.escape-html.js b/pitfall/pdfkit/node_modules/core-js/library/modules/core.string.escape-html.js new file mode 100644 index 00000000..a4b8d2f0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/core.string.escape-html.js @@ -0,0 +1,11 @@ +'use strict'; +var $export = require('./_export'); +var $re = require('./_replacer')(/[&<>"']/g, { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' +}); + +$export($export.P + $export.F, 'String', {escapeHTML: function escapeHTML(){ return $re(this); }}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/core.string.unescape-html.js b/pitfall/pdfkit/node_modules/core-js/library/modules/core.string.unescape-html.js new file mode 100644 index 00000000..413622b9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/core.string.unescape-html.js @@ -0,0 +1,11 @@ +'use strict'; +var $export = require('./_export'); +var $re = require('./_replacer')(/&(?:amp|lt|gt|quot|apos);/g, { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" +}); + +$export($export.P + $export.F, 'String', {unescapeHTML: function unescapeHTML(){ return $re(this); }}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es5.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es5.js new file mode 100644 index 00000000..dd7ebadf --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es5.js @@ -0,0 +1,35 @@ +// This file still here for a legacy code and will be removed in a near time +require('./es6.object.create'); +require('./es6.object.define-property'); +require('./es6.object.define-properties'); +require('./es6.object.get-own-property-descriptor'); +require('./es6.object.get-prototype-of'); +require('./es6.object.keys'); +require('./es6.object.get-own-property-names'); +require('./es6.object.freeze'); +require('./es6.object.seal'); +require('./es6.object.prevent-extensions'); +require('./es6.object.is-frozen'); +require('./es6.object.is-sealed'); +require('./es6.object.is-extensible'); +require('./es6.function.bind'); +require('./es6.array.is-array'); +require('./es6.array.join'); +require('./es6.array.slice'); +require('./es6.array.sort'); +require('./es6.array.for-each'); +require('./es6.array.map'); +require('./es6.array.filter'); +require('./es6.array.some'); +require('./es6.array.every'); +require('./es6.array.reduce'); +require('./es6.array.reduce-right'); +require('./es6.array.index-of'); +require('./es6.array.last-index-of'); +require('./es6.date.now'); +require('./es6.date.to-iso-string'); +require('./es6.date.to-json'); +require('./es6.parse-int'); +require('./es6.parse-float'); +require('./es6.string.trim'); +require('./es6.regexp.to-string'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.copy-within.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.copy-within.js new file mode 100644 index 00000000..027f7550 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.copy-within.js @@ -0,0 +1,6 @@ +// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) +var $export = require('./_export'); + +$export($export.P, 'Array', {copyWithin: require('./_array-copy-within')}); + +require('./_add-to-unscopables')('copyWithin'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.every.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.every.js new file mode 100644 index 00000000..fb067367 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.every.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export') + , $every = require('./_array-methods')(4); + +$export($export.P + $export.F * !require('./_strict-method')([].every, true), 'Array', { + // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) + every: function every(callbackfn /* , thisArg */){ + return $every(this, callbackfn, arguments[1]); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.fill.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.fill.js new file mode 100644 index 00000000..f075c001 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.fill.js @@ -0,0 +1,6 @@ +// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) +var $export = require('./_export'); + +$export($export.P, 'Array', {fill: require('./_array-fill')}); + +require('./_add-to-unscopables')('fill'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.filter.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.filter.js new file mode 100644 index 00000000..f60951d3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.filter.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export') + , $filter = require('./_array-methods')(2); + +$export($export.P + $export.F * !require('./_strict-method')([].filter, true), 'Array', { + // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) + filter: function filter(callbackfn /* , thisArg */){ + return $filter(this, callbackfn, arguments[1]); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.find-index.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.find-index.js new file mode 100644 index 00000000..53090741 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.find-index.js @@ -0,0 +1,14 @@ +'use strict'; +// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) +var $export = require('./_export') + , $find = require('./_array-methods')(6) + , KEY = 'findIndex' + , forced = true; +// Shouldn't skip holes +if(KEY in [])Array(1)[KEY](function(){ forced = false; }); +$export($export.P + $export.F * forced, 'Array', { + findIndex: function findIndex(callbackfn/*, that = undefined */){ + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } +}); +require('./_add-to-unscopables')(KEY); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.find.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.find.js new file mode 100644 index 00000000..90a9acfb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.find.js @@ -0,0 +1,14 @@ +'use strict'; +// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) +var $export = require('./_export') + , $find = require('./_array-methods')(5) + , KEY = 'find' + , forced = true; +// Shouldn't skip holes +if(KEY in [])Array(1)[KEY](function(){ forced = false; }); +$export($export.P + $export.F * forced, 'Array', { + find: function find(callbackfn/*, that = undefined */){ + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } +}); +require('./_add-to-unscopables')(KEY); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.for-each.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.for-each.js new file mode 100644 index 00000000..f814fe4e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.for-each.js @@ -0,0 +1,11 @@ +'use strict'; +var $export = require('./_export') + , $forEach = require('./_array-methods')(0) + , STRICT = require('./_strict-method')([].forEach, true); + +$export($export.P + $export.F * !STRICT, 'Array', { + // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) + forEach: function forEach(callbackfn /* , thisArg */){ + return $forEach(this, callbackfn, arguments[1]); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.from.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.from.js new file mode 100644 index 00000000..69e5d4a6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.from.js @@ -0,0 +1,37 @@ +'use strict'; +var ctx = require('./_ctx') + , $export = require('./_export') + , toObject = require('./_to-object') + , call = require('./_iter-call') + , isArrayIter = require('./_is-array-iter') + , toLength = require('./_to-length') + , createProperty = require('./_create-property') + , getIterFn = require('./core.get-iterator-method'); + +$export($export.S + $export.F * !require('./_iter-detect')(function(iter){ Array.from(iter); }), 'Array', { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){ + var O = toObject(arrayLike) + , C = typeof this == 'function' ? this : Array + , aLen = arguments.length + , mapfn = aLen > 1 ? arguments[1] : undefined + , mapping = mapfn !== undefined + , index = 0 + , iterFn = getIterFn(O) + , length, result, step, iterator; + if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){ + for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){ + createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); + } + } else { + length = toLength(O.length); + for(result = new C(length); length > index; index++){ + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + } +}); diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.index-of.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.index-of.js new file mode 100644 index 00000000..90376315 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.index-of.js @@ -0,0 +1,15 @@ +'use strict'; +var $export = require('./_export') + , $indexOf = require('./_array-includes')(false) + , $native = [].indexOf + , NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($native)), 'Array', { + // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) + indexOf: function indexOf(searchElement /*, fromIndex = 0 */){ + return NEGATIVE_ZERO + // convert -0 to +0 + ? $native.apply(this, arguments) || 0 + : $indexOf(this, searchElement, arguments[1]); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.is-array.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.is-array.js new file mode 100644 index 00000000..cd5d8c19 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.is-array.js @@ -0,0 +1,4 @@ +// 22.1.2.2 / 15.4.3.2 Array.isArray(arg) +var $export = require('./_export'); + +$export($export.S, 'Array', {isArray: require('./_is-array')}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.iterator.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.iterator.js new file mode 100644 index 00000000..100b344d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.iterator.js @@ -0,0 +1,34 @@ +'use strict'; +var addToUnscopables = require('./_add-to-unscopables') + , step = require('./_iter-step') + , Iterators = require('./_iterators') + , toIObject = require('./_to-iobject'); + +// 22.1.3.4 Array.prototype.entries() +// 22.1.3.13 Array.prototype.keys() +// 22.1.3.29 Array.prototype.values() +// 22.1.3.30 Array.prototype[@@iterator]() +module.exports = require('./_iter-define')(Array, 'Array', function(iterated, kind){ + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind +// 22.1.5.2.1 %ArrayIteratorPrototype%.next() +}, function(){ + var O = this._t + , kind = this._k + , index = this._i++; + if(!O || index >= O.length){ + this._t = undefined; + return step(1); + } + if(kind == 'keys' )return step(0, index); + if(kind == 'values')return step(0, O[index]); + return step(0, [index, O[index]]); +}, 'values'); + +// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) +Iterators.Arguments = Iterators.Array; + +addToUnscopables('keys'); +addToUnscopables('values'); +addToUnscopables('entries'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.join.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.join.js new file mode 100644 index 00000000..1bb65653 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.join.js @@ -0,0 +1,12 @@ +'use strict'; +// 22.1.3.13 Array.prototype.join(separator) +var $export = require('./_export') + , toIObject = require('./_to-iobject') + , arrayJoin = [].join; + +// fallback for not array-like strings +$export($export.P + $export.F * (require('./_iobject') != Object || !require('./_strict-method')(arrayJoin)), 'Array', { + join: function join(separator){ + return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.last-index-of.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.last-index-of.js new file mode 100644 index 00000000..75c1eabf --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.last-index-of.js @@ -0,0 +1,22 @@ +'use strict'; +var $export = require('./_export') + , toIObject = require('./_to-iobject') + , toInteger = require('./_to-integer') + , toLength = require('./_to-length') + , $native = [].lastIndexOf + , NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($native)), 'Array', { + // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) + lastIndexOf: function lastIndexOf(searchElement /*, fromIndex = @[*-1] */){ + // convert -0 to +0 + if(NEGATIVE_ZERO)return $native.apply(this, arguments) || 0; + var O = toIObject(this) + , length = toLength(O.length) + , index = length - 1; + if(arguments.length > 1)index = Math.min(index, toInteger(arguments[1])); + if(index < 0)index = length + index; + for(;index >= 0; index--)if(index in O)if(O[index] === searchElement)return index || 0; + return -1; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.map.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.map.js new file mode 100644 index 00000000..f70089f3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.map.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export') + , $map = require('./_array-methods')(1); + +$export($export.P + $export.F * !require('./_strict-method')([].map, true), 'Array', { + // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) + map: function map(callbackfn /* , thisArg */){ + return $map(this, callbackfn, arguments[1]); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.of.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.of.js new file mode 100644 index 00000000..dd4e1f81 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.of.js @@ -0,0 +1,19 @@ +'use strict'; +var $export = require('./_export') + , createProperty = require('./_create-property'); + +// WebKit Array.of isn't generic +$export($export.S + $export.F * require('./_fails')(function(){ + function F(){} + return !(Array.of.call(F) instanceof F); +}), 'Array', { + // 22.1.2.3 Array.of( ...items) + of: function of(/* ...args */){ + var index = 0 + , aLen = arguments.length + , result = new (typeof this == 'function' ? this : Array)(aLen); + while(aLen > index)createProperty(result, index, arguments[index++]); + result.length = aLen; + return result; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.reduce-right.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.reduce-right.js new file mode 100644 index 00000000..0c64d85e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.reduce-right.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export') + , $reduce = require('./_array-reduce'); + +$export($export.P + $export.F * !require('./_strict-method')([].reduceRight, true), 'Array', { + // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) + reduceRight: function reduceRight(callbackfn /* , initialValue */){ + return $reduce(this, callbackfn, arguments.length, arguments[1], true); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.reduce.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.reduce.js new file mode 100644 index 00000000..491f7d25 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.reduce.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export') + , $reduce = require('./_array-reduce'); + +$export($export.P + $export.F * !require('./_strict-method')([].reduce, true), 'Array', { + // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) + reduce: function reduce(callbackfn /* , initialValue */){ + return $reduce(this, callbackfn, arguments.length, arguments[1], false); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.slice.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.slice.js new file mode 100644 index 00000000..610bd399 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.slice.js @@ -0,0 +1,28 @@ +'use strict'; +var $export = require('./_export') + , html = require('./_html') + , cof = require('./_cof') + , toIndex = require('./_to-index') + , toLength = require('./_to-length') + , arraySlice = [].slice; + +// fallback for not array-like ES3 strings and DOM objects +$export($export.P + $export.F * require('./_fails')(function(){ + if(html)arraySlice.call(html); +}), 'Array', { + slice: function slice(begin, end){ + var len = toLength(this.length) + , klass = cof(this); + end = end === undefined ? len : end; + if(klass == 'Array')return arraySlice.call(this, begin, end); + var start = toIndex(begin, len) + , upTo = toIndex(end, len) + , size = toLength(upTo - start) + , cloned = Array(size) + , i = 0; + for(; i < size; i++)cloned[i] = klass == 'String' + ? this.charAt(start + i) + : this[start + i]; + return cloned; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.some.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.some.js new file mode 100644 index 00000000..fa1095ed --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.some.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export') + , $some = require('./_array-methods')(3); + +$export($export.P + $export.F * !require('./_strict-method')([].some, true), 'Array', { + // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) + some: function some(callbackfn /* , thisArg */){ + return $some(this, callbackfn, arguments[1]); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.sort.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.sort.js new file mode 100644 index 00000000..7de1fe77 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.sort.js @@ -0,0 +1,23 @@ +'use strict'; +var $export = require('./_export') + , aFunction = require('./_a-function') + , toObject = require('./_to-object') + , fails = require('./_fails') + , $sort = [].sort + , test = [1, 2, 3]; + +$export($export.P + $export.F * (fails(function(){ + // IE8- + test.sort(undefined); +}) || !fails(function(){ + // V8 bug + test.sort(null); + // Old WebKit +}) || !require('./_strict-method')($sort)), 'Array', { + // 22.1.3.25 Array.prototype.sort(comparefn) + sort: function sort(comparefn){ + return comparefn === undefined + ? $sort.call(toObject(this)) + : $sort.call(toObject(this), aFunction(comparefn)); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.species.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.species.js new file mode 100644 index 00000000..d63c738f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.array.species.js @@ -0,0 +1 @@ +require('./_set-species')('Array'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.date.now.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.date.now.js new file mode 100644 index 00000000..c3ee5fd7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.date.now.js @@ -0,0 +1,4 @@ +// 20.3.3.1 / 15.9.4.4 Date.now() +var $export = require('./_export'); + +$export($export.S, 'Date', {now: function(){ return new Date().getTime(); }}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.date.to-iso-string.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.date.to-iso-string.js new file mode 100644 index 00000000..2426c589 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.date.to-iso-string.js @@ -0,0 +1,28 @@ +'use strict'; +// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() +var $export = require('./_export') + , fails = require('./_fails') + , getTime = Date.prototype.getTime; + +var lz = function(num){ + return num > 9 ? num : '0' + num; +}; + +// PhantomJS / old WebKit has a broken implementations +$export($export.P + $export.F * (fails(function(){ + return new Date(-5e13 - 1).toISOString() != '0385-07-25T07:06:39.999Z'; +}) || !fails(function(){ + new Date(NaN).toISOString(); +})), 'Date', { + toISOString: function toISOString(){ + if(!isFinite(getTime.call(this)))throw RangeError('Invalid time value'); + var d = this + , y = d.getUTCFullYear() + , m = d.getUTCMilliseconds() + , s = y < 0 ? '-' : y > 9999 ? '+' : ''; + return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + + '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) + + 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) + + ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z'; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.date.to-json.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.date.to-json.js new file mode 100644 index 00000000..eb419d03 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.date.to-json.js @@ -0,0 +1,14 @@ +'use strict'; +var $export = require('./_export') + , toObject = require('./_to-object') + , toPrimitive = require('./_to-primitive'); + +$export($export.P + $export.F * require('./_fails')(function(){ + return new Date(NaN).toJSON() !== null || Date.prototype.toJSON.call({toISOString: function(){ return 1; }}) !== 1; +}), 'Date', { + toJSON: function toJSON(key){ + var O = toObject(this) + , pv = toPrimitive(O); + return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString(); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.date.to-primitive.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.date.to-primitive.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.date.to-string.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.date.to-string.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.function.bind.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.function.bind.js new file mode 100644 index 00000000..85f10379 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.function.bind.js @@ -0,0 +1,4 @@ +// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) +var $export = require('./_export'); + +$export($export.P, 'Function', {bind: require('./_bind')}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.function.has-instance.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.function.has-instance.js new file mode 100644 index 00000000..ae294b1f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.function.has-instance.js @@ -0,0 +1,13 @@ +'use strict'; +var isObject = require('./_is-object') + , getPrototypeOf = require('./_object-gpo') + , HAS_INSTANCE = require('./_wks')('hasInstance') + , FunctionProto = Function.prototype; +// 19.2.3.6 Function.prototype[@@hasInstance](V) +if(!(HAS_INSTANCE in FunctionProto))require('./_object-dp').f(FunctionProto, HAS_INSTANCE, {value: function(O){ + if(typeof this != 'function' || !isObject(O))return false; + if(!isObject(this.prototype))return O instanceof this; + // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: + while(O = getPrototypeOf(O))if(this.prototype === O)return true; + return false; +}}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.function.name.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.function.name.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.map.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.map.js new file mode 100644 index 00000000..a166430f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.map.js @@ -0,0 +1,17 @@ +'use strict'; +var strong = require('./_collection-strong'); + +// 23.1 Map Objects +module.exports = require('./_collection')('Map', function(get){ + return function Map(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.1.3.6 Map.prototype.get(key) + get: function get(key){ + var entry = strong.getEntry(this, key); + return entry && entry.v; + }, + // 23.1.3.9 Map.prototype.set(key, value) + set: function set(key, value){ + return strong.def(this, key === 0 ? 0 : key, value); + } +}, strong, true); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.acosh.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.acosh.js new file mode 100644 index 00000000..459f1199 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.acosh.js @@ -0,0 +1,18 @@ +// 20.2.2.3 Math.acosh(x) +var $export = require('./_export') + , log1p = require('./_math-log1p') + , sqrt = Math.sqrt + , $acosh = Math.acosh; + +$export($export.S + $export.F * !($acosh + // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509 + && Math.floor($acosh(Number.MAX_VALUE)) == 710 + // Tor Browser bug: Math.acosh(Infinity) -> NaN + && $acosh(Infinity) == Infinity +), 'Math', { + acosh: function acosh(x){ + return (x = +x) < 1 ? NaN : x > 94906265.62425156 + ? Math.log(x) + Math.LN2 + : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1)); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.asinh.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.asinh.js new file mode 100644 index 00000000..e6a74abb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.asinh.js @@ -0,0 +1,10 @@ +// 20.2.2.5 Math.asinh(x) +var $export = require('./_export') + , $asinh = Math.asinh; + +function asinh(x){ + return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1)); +} + +// Tor Browser bug: Math.asinh(0) -> -0 +$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', {asinh: asinh}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.atanh.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.atanh.js new file mode 100644 index 00000000..94575d9f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.atanh.js @@ -0,0 +1,10 @@ +// 20.2.2.7 Math.atanh(x) +var $export = require('./_export') + , $atanh = Math.atanh; + +// Tor Browser bug: Math.atanh(-0) -> 0 +$export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { + atanh: function atanh(x){ + return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.cbrt.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.cbrt.js new file mode 100644 index 00000000..7ca7daea --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.cbrt.js @@ -0,0 +1,9 @@ +// 20.2.2.9 Math.cbrt(x) +var $export = require('./_export') + , sign = require('./_math-sign'); + +$export($export.S, 'Math', { + cbrt: function cbrt(x){ + return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.clz32.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.clz32.js new file mode 100644 index 00000000..1ec534bd --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.clz32.js @@ -0,0 +1,8 @@ +// 20.2.2.11 Math.clz32(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { + clz32: function clz32(x){ + return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.cosh.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.cosh.js new file mode 100644 index 00000000..4f2b2155 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.cosh.js @@ -0,0 +1,9 @@ +// 20.2.2.12 Math.cosh(x) +var $export = require('./_export') + , exp = Math.exp; + +$export($export.S, 'Math', { + cosh: function cosh(x){ + return (exp(x = +x) + exp(-x)) / 2; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.expm1.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.expm1.js new file mode 100644 index 00000000..9762b7cd --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.expm1.js @@ -0,0 +1,5 @@ +// 20.2.2.14 Math.expm1(x) +var $export = require('./_export') + , $expm1 = require('./_math-expm1'); + +$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', {expm1: $expm1}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.fround.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.fround.js new file mode 100644 index 00000000..01a88862 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.fround.js @@ -0,0 +1,26 @@ +// 20.2.2.16 Math.fround(x) +var $export = require('./_export') + , sign = require('./_math-sign') + , pow = Math.pow + , EPSILON = pow(2, -52) + , EPSILON32 = pow(2, -23) + , MAX32 = pow(2, 127) * (2 - EPSILON32) + , MIN32 = pow(2, -126); + +var roundTiesToEven = function(n){ + return n + 1 / EPSILON - 1 / EPSILON; +}; + + +$export($export.S, 'Math', { + fround: function fround(x){ + var $abs = Math.abs(x) + , $sign = sign(x) + , a, result; + if($abs < MIN32)return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; + a = (1 + EPSILON32 / EPSILON) * $abs; + result = a - (a - $abs); + if(result > MAX32 || result != result)return $sign * Infinity; + return $sign * result; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.hypot.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.hypot.js new file mode 100644 index 00000000..508521b6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.hypot.js @@ -0,0 +1,25 @@ +// 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) +var $export = require('./_export') + , abs = Math.abs; + +$export($export.S, 'Math', { + hypot: function hypot(value1, value2){ // eslint-disable-line no-unused-vars + var sum = 0 + , i = 0 + , aLen = arguments.length + , larg = 0 + , arg, div; + while(i < aLen){ + arg = abs(arguments[i++]); + if(larg < arg){ + div = larg / arg; + sum = sum * div * div + 1; + larg = arg; + } else if(arg > 0){ + div = arg / larg; + sum += div * div; + } else sum += arg; + } + return larg === Infinity ? Infinity : larg * Math.sqrt(sum); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.imul.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.imul.js new file mode 100644 index 00000000..7f4111d2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.imul.js @@ -0,0 +1,17 @@ +// 20.2.2.18 Math.imul(x, y) +var $export = require('./_export') + , $imul = Math.imul; + +// some WebKit versions fails with big numbers, some has wrong arity +$export($export.S + $export.F * require('./_fails')(function(){ + return $imul(0xffffffff, 5) != -5 || $imul.length != 2; +}), 'Math', { + imul: function imul(x, y){ + var UINT16 = 0xffff + , xn = +x + , yn = +y + , xl = UINT16 & xn + , yl = UINT16 & yn; + return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.log10.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.log10.js new file mode 100644 index 00000000..791dfc35 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.log10.js @@ -0,0 +1,8 @@ +// 20.2.2.21 Math.log10(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { + log10: function log10(x){ + return Math.log(x) / Math.LN10; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.log1p.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.log1p.js new file mode 100644 index 00000000..a1de0258 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.log1p.js @@ -0,0 +1,4 @@ +// 20.2.2.20 Math.log1p(x) +var $export = require('./_export'); + +$export($export.S, 'Math', {log1p: require('./_math-log1p')}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.log2.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.log2.js new file mode 100644 index 00000000..c4ba7819 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.log2.js @@ -0,0 +1,8 @@ +// 20.2.2.22 Math.log2(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { + log2: function log2(x){ + return Math.log(x) / Math.LN2; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.sign.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.sign.js new file mode 100644 index 00000000..5dbee6f6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.sign.js @@ -0,0 +1,4 @@ +// 20.2.2.28 Math.sign(x) +var $export = require('./_export'); + +$export($export.S, 'Math', {sign: require('./_math-sign')}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.sinh.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.sinh.js new file mode 100644 index 00000000..5464ae3e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.sinh.js @@ -0,0 +1,15 @@ +// 20.2.2.30 Math.sinh(x) +var $export = require('./_export') + , expm1 = require('./_math-expm1') + , exp = Math.exp; + +// V8 near Chromium 38 has a problem with very small numbers +$export($export.S + $export.F * require('./_fails')(function(){ + return !Math.sinh(-2e-17) != -2e-17; +}), 'Math', { + sinh: function sinh(x){ + return Math.abs(x = +x) < 1 + ? (expm1(x) - expm1(-x)) / 2 + : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.tanh.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.tanh.js new file mode 100644 index 00000000..d2f10778 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.tanh.js @@ -0,0 +1,12 @@ +// 20.2.2.33 Math.tanh(x) +var $export = require('./_export') + , expm1 = require('./_math-expm1') + , exp = Math.exp; + +$export($export.S, 'Math', { + tanh: function tanh(x){ + var a = expm1(x = +x) + , b = expm1(-x); + return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.trunc.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.trunc.js new file mode 100644 index 00000000..2e42563b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.math.trunc.js @@ -0,0 +1,8 @@ +// 20.2.2.34 Math.trunc(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { + trunc: function trunc(it){ + return (it > 0 ? Math.floor : Math.ceil)(it); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.number.constructor.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.number.constructor.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.number.epsilon.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.number.epsilon.js new file mode 100644 index 00000000..d25898cc --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.number.epsilon.js @@ -0,0 +1,4 @@ +// 20.1.2.1 Number.EPSILON +var $export = require('./_export'); + +$export($export.S, 'Number', {EPSILON: Math.pow(2, -52)}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.number.is-finite.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.number.is-finite.js new file mode 100644 index 00000000..c8c42753 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.number.is-finite.js @@ -0,0 +1,9 @@ +// 20.1.2.2 Number.isFinite(number) +var $export = require('./_export') + , _isFinite = require('./_global').isFinite; + +$export($export.S, 'Number', { + isFinite: function isFinite(it){ + return typeof it == 'number' && _isFinite(it); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.number.is-integer.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.number.is-integer.js new file mode 100644 index 00000000..dc0f8f00 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.number.is-integer.js @@ -0,0 +1,4 @@ +// 20.1.2.3 Number.isInteger(number) +var $export = require('./_export'); + +$export($export.S, 'Number', {isInteger: require('./_is-integer')}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.number.is-nan.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.number.is-nan.js new file mode 100644 index 00000000..5fedf825 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.number.is-nan.js @@ -0,0 +1,8 @@ +// 20.1.2.4 Number.isNaN(number) +var $export = require('./_export'); + +$export($export.S, 'Number', { + isNaN: function isNaN(number){ + return number != number; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.number.is-safe-integer.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.number.is-safe-integer.js new file mode 100644 index 00000000..92193e2e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.number.is-safe-integer.js @@ -0,0 +1,10 @@ +// 20.1.2.5 Number.isSafeInteger(number) +var $export = require('./_export') + , isInteger = require('./_is-integer') + , abs = Math.abs; + +$export($export.S, 'Number', { + isSafeInteger: function isSafeInteger(number){ + return isInteger(number) && abs(number) <= 0x1fffffffffffff; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.number.max-safe-integer.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.number.max-safe-integer.js new file mode 100644 index 00000000..b9d7f2a7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.number.max-safe-integer.js @@ -0,0 +1,4 @@ +// 20.1.2.6 Number.MAX_SAFE_INTEGER +var $export = require('./_export'); + +$export($export.S, 'Number', {MAX_SAFE_INTEGER: 0x1fffffffffffff}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.number.min-safe-integer.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.number.min-safe-integer.js new file mode 100644 index 00000000..9a2beeb3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.number.min-safe-integer.js @@ -0,0 +1,4 @@ +// 20.1.2.10 Number.MIN_SAFE_INTEGER +var $export = require('./_export'); + +$export($export.S, 'Number', {MIN_SAFE_INTEGER: -0x1fffffffffffff}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.number.parse-float.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.number.parse-float.js new file mode 100644 index 00000000..7ee14da0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.number.parse-float.js @@ -0,0 +1,4 @@ +var $export = require('./_export') + , $parseFloat = require('./_parse-float'); +// 20.1.2.12 Number.parseFloat(string) +$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', {parseFloat: $parseFloat}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.number.parse-int.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.number.parse-int.js new file mode 100644 index 00000000..59bf1445 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.number.parse-int.js @@ -0,0 +1,4 @@ +var $export = require('./_export') + , $parseInt = require('./_parse-int'); +// 20.1.2.13 Number.parseInt(string, radix) +$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', {parseInt: $parseInt}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.number.to-fixed.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.number.to-fixed.js new file mode 100644 index 00000000..c54970d6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.number.to-fixed.js @@ -0,0 +1,113 @@ +'use strict'; +var $export = require('./_export') + , toInteger = require('./_to-integer') + , aNumberValue = require('./_a-number-value') + , repeat = require('./_string-repeat') + , $toFixed = 1..toFixed + , floor = Math.floor + , data = [0, 0, 0, 0, 0, 0] + , ERROR = 'Number.toFixed: incorrect invocation!' + , ZERO = '0'; + +var multiply = function(n, c){ + var i = -1 + , c2 = c; + while(++i < 6){ + c2 += n * data[i]; + data[i] = c2 % 1e7; + c2 = floor(c2 / 1e7); + } +}; +var divide = function(n){ + var i = 6 + , c = 0; + while(--i >= 0){ + c += data[i]; + data[i] = floor(c / n); + c = (c % n) * 1e7; + } +}; +var numToString = function(){ + var i = 6 + , s = ''; + while(--i >= 0){ + if(s !== '' || i === 0 || data[i] !== 0){ + var t = String(data[i]); + s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t; + } + } return s; +}; +var pow = function(x, n, acc){ + return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); +}; +var log = function(x){ + var n = 0 + , x2 = x; + while(x2 >= 4096){ + n += 12; + x2 /= 4096; + } + while(x2 >= 2){ + n += 1; + x2 /= 2; + } return n; +}; + +$export($export.P + $export.F * (!!$toFixed && ( + 0.00008.toFixed(3) !== '0.000' || + 0.9.toFixed(0) !== '1' || + 1.255.toFixed(2) !== '1.25' || + 1000000000000000128..toFixed(0) !== '1000000000000000128' +) || !require('./_fails')(function(){ + // V8 ~ Android 4.3- + $toFixed.call({}); +})), 'Number', { + toFixed: function toFixed(fractionDigits){ + var x = aNumberValue(this, ERROR) + , f = toInteger(fractionDigits) + , s = '' + , m = ZERO + , e, z, j, k; + if(f < 0 || f > 20)throw RangeError(ERROR); + if(x != x)return 'NaN'; + if(x <= -1e21 || x >= 1e21)return String(x); + if(x < 0){ + s = '-'; + x = -x; + } + if(x > 1e-21){ + e = log(x * pow(2, 69, 1)) - 69; + z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1); + z *= 0x10000000000000; + e = 52 - e; + if(e > 0){ + multiply(0, z); + j = f; + while(j >= 7){ + multiply(1e7, 0); + j -= 7; + } + multiply(pow(10, j, 1), 0); + j = e - 1; + while(j >= 23){ + divide(1 << 23); + j -= 23; + } + divide(1 << j); + multiply(1, 1); + divide(2); + m = numToString(); + } else { + multiply(0, z); + multiply(1 << -e, 0); + m = numToString() + repeat.call(ZERO, f); + } + } + if(f > 0){ + k = m.length; + m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f)); + } else { + m = s + m; + } return m; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.number.to-precision.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.number.to-precision.js new file mode 100644 index 00000000..903dacdf --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.number.to-precision.js @@ -0,0 +1,18 @@ +'use strict'; +var $export = require('./_export') + , $fails = require('./_fails') + , aNumberValue = require('./_a-number-value') + , $toPrecision = 1..toPrecision; + +$export($export.P + $export.F * ($fails(function(){ + // IE7- + return $toPrecision.call(1, undefined) !== '1'; +}) || !$fails(function(){ + // V8 ~ Android 4.3- + $toPrecision.call({}); +})), 'Number', { + toPrecision: function toPrecision(precision){ + var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!'); + return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.assign.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.assign.js new file mode 100644 index 00000000..13eda2cb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.assign.js @@ -0,0 +1,4 @@ +// 19.1.3.1 Object.assign(target, source) +var $export = require('./_export'); + +$export($export.S + $export.F, 'Object', {assign: require('./_object-assign')}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.create.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.create.js new file mode 100644 index 00000000..17e4b284 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.create.js @@ -0,0 +1,3 @@ +var $export = require('./_export') +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +$export($export.S, 'Object', {create: require('./_object-create')}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.define-properties.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.define-properties.js new file mode 100644 index 00000000..183eec6f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.define-properties.js @@ -0,0 +1,3 @@ +var $export = require('./_export'); +// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) +$export($export.S + $export.F * !require('./_descriptors'), 'Object', {defineProperties: require('./_object-dps')}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.define-property.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.define-property.js new file mode 100644 index 00000000..71807cc0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.define-property.js @@ -0,0 +1,3 @@ +var $export = require('./_export'); +// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) +$export($export.S + $export.F * !require('./_descriptors'), 'Object', {defineProperty: require('./_object-dp').f}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.freeze.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.freeze.js new file mode 100644 index 00000000..34b51084 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.freeze.js @@ -0,0 +1,9 @@ +// 19.1.2.5 Object.freeze(O) +var isObject = require('./_is-object') + , meta = require('./_meta').onFreeze; + +require('./_object-sap')('freeze', function($freeze){ + return function freeze(it){ + return $freeze && isObject(it) ? $freeze(meta(it)) : it; + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js new file mode 100644 index 00000000..60c69913 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.get-own-property-descriptor.js @@ -0,0 +1,9 @@ +// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) +var toIObject = require('./_to-iobject') + , $getOwnPropertyDescriptor = require('./_object-gopd').f; + +require('./_object-sap')('getOwnPropertyDescriptor', function(){ + return function getOwnPropertyDescriptor(it, key){ + return $getOwnPropertyDescriptor(toIObject(it), key); + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.get-own-property-names.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.get-own-property-names.js new file mode 100644 index 00000000..91dd110d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.get-own-property-names.js @@ -0,0 +1,4 @@ +// 19.1.2.7 Object.getOwnPropertyNames(O) +require('./_object-sap')('getOwnPropertyNames', function(){ + return require('./_object-gopn-ext').f; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.get-prototype-of.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.get-prototype-of.js new file mode 100644 index 00000000..b124e28f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.get-prototype-of.js @@ -0,0 +1,9 @@ +// 19.1.2.9 Object.getPrototypeOf(O) +var toObject = require('./_to-object') + , $getPrototypeOf = require('./_object-gpo'); + +require('./_object-sap')('getPrototypeOf', function(){ + return function getPrototypeOf(it){ + return $getPrototypeOf(toObject(it)); + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.is-extensible.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.is-extensible.js new file mode 100644 index 00000000..94bf8a81 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.is-extensible.js @@ -0,0 +1,8 @@ +// 19.1.2.11 Object.isExtensible(O) +var isObject = require('./_is-object'); + +require('./_object-sap')('isExtensible', function($isExtensible){ + return function isExtensible(it){ + return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false; + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.is-frozen.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.is-frozen.js new file mode 100644 index 00000000..4bdfd11b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.is-frozen.js @@ -0,0 +1,8 @@ +// 19.1.2.12 Object.isFrozen(O) +var isObject = require('./_is-object'); + +require('./_object-sap')('isFrozen', function($isFrozen){ + return function isFrozen(it){ + return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true; + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.is-sealed.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.is-sealed.js new file mode 100644 index 00000000..d13aa1b0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.is-sealed.js @@ -0,0 +1,8 @@ +// 19.1.2.13 Object.isSealed(O) +var isObject = require('./_is-object'); + +require('./_object-sap')('isSealed', function($isSealed){ + return function isSealed(it){ + return isObject(it) ? $isSealed ? $isSealed(it) : false : true; + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.is.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.is.js new file mode 100644 index 00000000..ad299425 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.is.js @@ -0,0 +1,3 @@ +// 19.1.3.10 Object.is(value1, value2) +var $export = require('./_export'); +$export($export.S, 'Object', {is: require('./_same-value')}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.keys.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.keys.js new file mode 100644 index 00000000..bf76c07d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.keys.js @@ -0,0 +1,9 @@ +// 19.1.2.14 Object.keys(O) +var toObject = require('./_to-object') + , $keys = require('./_object-keys'); + +require('./_object-sap')('keys', function(){ + return function keys(it){ + return $keys(toObject(it)); + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.prevent-extensions.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.prevent-extensions.js new file mode 100644 index 00000000..adaff7a7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.prevent-extensions.js @@ -0,0 +1,9 @@ +// 19.1.2.15 Object.preventExtensions(O) +var isObject = require('./_is-object') + , meta = require('./_meta').onFreeze; + +require('./_object-sap')('preventExtensions', function($preventExtensions){ + return function preventExtensions(it){ + return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.seal.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.seal.js new file mode 100644 index 00000000..d7e4ea95 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.seal.js @@ -0,0 +1,9 @@ +// 19.1.2.17 Object.seal(O) +var isObject = require('./_is-object') + , meta = require('./_meta').onFreeze; + +require('./_object-sap')('seal', function($seal){ + return function seal(it){ + return $seal && isObject(it) ? $seal(meta(it)) : it; + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.set-prototype-of.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.set-prototype-of.js new file mode 100644 index 00000000..5bbe4c06 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.set-prototype-of.js @@ -0,0 +1,3 @@ +// 19.1.3.19 Object.setPrototypeOf(O, proto) +var $export = require('./_export'); +$export($export.S, 'Object', {setPrototypeOf: require('./_set-proto').set}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.to-string.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.object.to-string.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.parse-float.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.parse-float.js new file mode 100644 index 00000000..5201712b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.parse-float.js @@ -0,0 +1,4 @@ +var $export = require('./_export') + , $parseFloat = require('./_parse-float'); +// 18.2.4 parseFloat(string) +$export($export.G + $export.F * (parseFloat != $parseFloat), {parseFloat: $parseFloat}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.parse-int.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.parse-int.js new file mode 100644 index 00000000..5a2bfaff --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.parse-int.js @@ -0,0 +1,4 @@ +var $export = require('./_export') + , $parseInt = require('./_parse-int'); +// 18.2.5 parseInt(string, radix) +$export($export.G + $export.F * (parseInt != $parseInt), {parseInt: $parseInt}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.promise.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.promise.js new file mode 100644 index 00000000..262a93af --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.promise.js @@ -0,0 +1,299 @@ +'use strict'; +var LIBRARY = require('./_library') + , global = require('./_global') + , ctx = require('./_ctx') + , classof = require('./_classof') + , $export = require('./_export') + , isObject = require('./_is-object') + , aFunction = require('./_a-function') + , anInstance = require('./_an-instance') + , forOf = require('./_for-of') + , speciesConstructor = require('./_species-constructor') + , task = require('./_task').set + , microtask = require('./_microtask')() + , PROMISE = 'Promise' + , TypeError = global.TypeError + , process = global.process + , $Promise = global[PROMISE] + , process = global.process + , isNode = classof(process) == 'process' + , empty = function(){ /* empty */ } + , Internal, GenericPromiseCapability, Wrapper; + +var USE_NATIVE = !!function(){ + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1) + , FakePromise = (promise.constructor = {})[require('./_wks')('species')] = function(exec){ exec(empty, empty); }; + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise; + } catch(e){ /* empty */ } +}(); + +// helpers +var sameConstructor = function(a, b){ + // with library wrapper special case + return a === b || a === $Promise && b === Wrapper; +}; +var isThenable = function(it){ + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; +}; +var newPromiseCapability = function(C){ + return sameConstructor($Promise, C) + ? new PromiseCapability(C) + : new GenericPromiseCapability(C); +}; +var PromiseCapability = GenericPromiseCapability = function(C){ + var resolve, reject; + this.promise = new C(function($$resolve, $$reject){ + if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); +}; +var perform = function(exec){ + try { + exec(); + } catch(e){ + return {error: e}; + } +}; +var notify = function(promise, isReject){ + if(promise._n)return; + promise._n = true; + var chain = promise._c; + microtask(function(){ + var value = promise._v + , ok = promise._s == 1 + , i = 0; + var run = function(reaction){ + var handler = ok ? reaction.ok : reaction.fail + , resolve = reaction.resolve + , reject = reaction.reject + , domain = reaction.domain + , result, then; + try { + if(handler){ + if(!ok){ + if(promise._h == 2)onHandleUnhandled(promise); + promise._h = 1; + } + if(handler === true)result = value; + else { + if(domain)domain.enter(); + result = handler(value); + if(domain)domain.exit(); + } + if(result === reaction.promise){ + reject(TypeError('Promise-chain cycle')); + } else if(then = isThenable(result)){ + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch(e){ + reject(e); + } + }; + while(chain.length > i)run(chain[i++]); // variable length - can't use forEach + promise._c = []; + promise._n = false; + if(isReject && !promise._h)onUnhandled(promise); + }); +}; +var onUnhandled = function(promise){ + task.call(global, function(){ + var value = promise._v + , abrupt, handler, console; + if(isUnhandled(promise)){ + abrupt = perform(function(){ + if(isNode){ + process.emit('unhandledRejection', value, promise); + } else if(handler = global.onunhandledrejection){ + handler({promise: promise, reason: value}); + } else if((console = global.console) && console.error){ + console.error('Unhandled promise rejection', value); + } + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } promise._a = undefined; + if(abrupt)throw abrupt.error; + }); +}; +var isUnhandled = function(promise){ + if(promise._h == 1)return false; + var chain = promise._a || promise._c + , i = 0 + , reaction; + while(chain.length > i){ + reaction = chain[i++]; + if(reaction.fail || !isUnhandled(reaction.promise))return false; + } return true; +}; +var onHandleUnhandled = function(promise){ + task.call(global, function(){ + var handler; + if(isNode){ + process.emit('rejectionHandled', promise); + } else if(handler = global.onrejectionhandled){ + handler({promise: promise, reason: promise._v}); + } + }); +}; +var $reject = function(value){ + var promise = this; + if(promise._d)return; + promise._d = true; + promise = promise._w || promise; // unwrap + promise._v = value; + promise._s = 2; + if(!promise._a)promise._a = promise._c.slice(); + notify(promise, true); +}; +var $resolve = function(value){ + var promise = this + , then; + if(promise._d)return; + promise._d = true; + promise = promise._w || promise; // unwrap + try { + if(promise === value)throw TypeError("Promise can't be resolved itself"); + if(then = isThenable(value)){ + microtask(function(){ + var wrapper = {_w: promise, _d: false}; // wrap + try { + then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); + } catch(e){ + $reject.call(wrapper, e); + } + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); + } + } catch(e){ + $reject.call({_w: promise, _d: false}, e); // wrap + } +}; + +// constructor polyfill +if(!USE_NATIVE){ + // 25.4.3.1 Promise(executor) + $Promise = function Promise(executor){ + anInstance(this, $Promise, PROMISE, '_h'); + aFunction(executor); + Internal.call(this); + try { + executor(ctx($resolve, this, 1), ctx($reject, this, 1)); + } catch(err){ + $reject.call(this, err); + } + }; + Internal = function Promise(executor){ + this._c = []; // <- awaiting reactions + this._a = undefined; // <- checked in isUnhandled reactions + this._s = 0; // <- state + this._d = false; // <- done + this._v = undefined; // <- value + this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled + this._n = false; // <- notify + }; + Internal.prototype = require('./_redefine-all')($Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function then(onFulfilled, onRejected){ + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = isNode ? process.domain : undefined; + this._c.push(reaction); + if(this._a)this._a.push(reaction); + if(this._s)notify(this, false); + return reaction.promise; + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + 'catch': function(onRejected){ + return this.then(undefined, onRejected); + } + }); + PromiseCapability = function(){ + var promise = new Internal; + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise}); +require('./_set-to-string-tag')($Promise, PROMISE); +require('./_set-species')(PROMISE); +Wrapper = require('./_core')[PROMISE]; + +// statics +$export($export.S + $export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject(r){ + var capability = newPromiseCapability(this) + , $$reject = capability.reject; + $$reject(r); + return capability.promise; + } +}); +$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve(x){ + // instanceof instead of internal slot check because we should fix it without replacement native Promise core + if(x instanceof $Promise && sameConstructor(x.constructor, this))return x; + var capability = newPromiseCapability(this) + , $$resolve = capability.resolve; + $$resolve(x); + return capability.promise; + } +}); +$export($export.S + $export.F * !(USE_NATIVE && require('./_iter-detect')(function(iter){ + $Promise.all(iter)['catch'](empty); +})), PROMISE, { + // 25.4.4.1 Promise.all(iterable) + all: function all(iterable){ + var C = this + , capability = newPromiseCapability(C) + , resolve = capability.resolve + , reject = capability.reject; + var abrupt = perform(function(){ + var values = [] + , index = 0 + , remaining = 1; + forOf(iterable, false, function(promise){ + var $index = index++ + , alreadyCalled = false; + values.push(undefined); + remaining++; + C.resolve(promise).then(function(value){ + if(alreadyCalled)return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if(abrupt)reject(abrupt.error); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable){ + var C = this + , capability = newPromiseCapability(C) + , reject = capability.reject; + var abrupt = perform(function(){ + forOf(iterable, false, function(promise){ + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if(abrupt)reject(abrupt.error); + return capability.promise; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.apply.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.apply.js new file mode 100644 index 00000000..24ea80f5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.apply.js @@ -0,0 +1,16 @@ +// 26.1.1 Reflect.apply(target, thisArgument, argumentsList) +var $export = require('./_export') + , aFunction = require('./_a-function') + , anObject = require('./_an-object') + , rApply = (require('./_global').Reflect || {}).apply + , fApply = Function.apply; +// MS Edge argumentsList argument is optional +$export($export.S + $export.F * !require('./_fails')(function(){ + rApply(function(){}); +}), 'Reflect', { + apply: function apply(target, thisArgument, argumentsList){ + var T = aFunction(target) + , L = anObject(argumentsList); + return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.construct.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.construct.js new file mode 100644 index 00000000..96483d70 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.construct.js @@ -0,0 +1,47 @@ +// 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) +var $export = require('./_export') + , create = require('./_object-create') + , aFunction = require('./_a-function') + , anObject = require('./_an-object') + , isObject = require('./_is-object') + , fails = require('./_fails') + , bind = require('./_bind') + , rConstruct = (require('./_global').Reflect || {}).construct; + +// MS Edge supports only 2 arguments and argumentsList argument is optional +// FF Nightly sets third argument as `new.target`, but does not create `this` from it +var NEW_TARGET_BUG = fails(function(){ + function F(){} + return !(rConstruct(function(){}, [], F) instanceof F); +}); +var ARGS_BUG = !fails(function(){ + rConstruct(function(){}); +}); + +$export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { + construct: function construct(Target, args /*, newTarget*/){ + aFunction(Target); + anObject(args); + var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); + if(ARGS_BUG && !NEW_TARGET_BUG)return rConstruct(Target, args, newTarget); + if(Target == newTarget){ + // w/o altered newTarget, optimization for 0-4 arguments + switch(args.length){ + case 0: return new Target; + case 1: return new Target(args[0]); + case 2: return new Target(args[0], args[1]); + case 3: return new Target(args[0], args[1], args[2]); + case 4: return new Target(args[0], args[1], args[2], args[3]); + } + // w/o altered newTarget, lot of arguments case + var $args = [null]; + $args.push.apply($args, args); + return new (bind.apply(Target, $args)); + } + // with altered newTarget, not support built-in constructors + var proto = newTarget.prototype + , instance = create(isObject(proto) ? proto : Object.prototype) + , result = Function.apply.call(Target, instance, args); + return isObject(result) ? result : instance; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.define-property.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.define-property.js new file mode 100644 index 00000000..485d43c4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.define-property.js @@ -0,0 +1,22 @@ +// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) +var dP = require('./_object-dp') + , $export = require('./_export') + , anObject = require('./_an-object') + , toPrimitive = require('./_to-primitive'); + +// MS Edge has broken Reflect.defineProperty - throwing instead of returning false +$export($export.S + $export.F * require('./_fails')(function(){ + Reflect.defineProperty(dP.f({}, 1, {value: 1}), 1, {value: 2}); +}), 'Reflect', { + defineProperty: function defineProperty(target, propertyKey, attributes){ + anObject(target); + propertyKey = toPrimitive(propertyKey, true); + anObject(attributes); + try { + dP.f(target, propertyKey, attributes); + return true; + } catch(e){ + return false; + } + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.delete-property.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.delete-property.js new file mode 100644 index 00000000..4e8ce207 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.delete-property.js @@ -0,0 +1,11 @@ +// 26.1.4 Reflect.deleteProperty(target, propertyKey) +var $export = require('./_export') + , gOPD = require('./_object-gopd').f + , anObject = require('./_an-object'); + +$export($export.S, 'Reflect', { + deleteProperty: function deleteProperty(target, propertyKey){ + var desc = gOPD(anObject(target), propertyKey); + return desc && !desc.configurable ? false : delete target[propertyKey]; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.enumerate.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.enumerate.js new file mode 100644 index 00000000..abdb132d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.enumerate.js @@ -0,0 +1,26 @@ +'use strict'; +// 26.1.5 Reflect.enumerate(target) +var $export = require('./_export') + , anObject = require('./_an-object'); +var Enumerate = function(iterated){ + this._t = anObject(iterated); // target + this._i = 0; // next index + var keys = this._k = [] // keys + , key; + for(key in iterated)keys.push(key); +}; +require('./_iter-create')(Enumerate, 'Object', function(){ + var that = this + , keys = that._k + , key; + do { + if(that._i >= keys.length)return {value: undefined, done: true}; + } while(!((key = keys[that._i++]) in that._t)); + return {value: key, done: false}; +}); + +$export($export.S, 'Reflect', { + enumerate: function enumerate(target){ + return new Enumerate(target); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.get-own-property-descriptor.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.get-own-property-descriptor.js new file mode 100644 index 00000000..741a13eb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.get-own-property-descriptor.js @@ -0,0 +1,10 @@ +// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) +var gOPD = require('./_object-gopd') + , $export = require('./_export') + , anObject = require('./_an-object'); + +$export($export.S, 'Reflect', { + getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey){ + return gOPD.f(anObject(target), propertyKey); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.get-prototype-of.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.get-prototype-of.js new file mode 100644 index 00000000..4f912d10 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.get-prototype-of.js @@ -0,0 +1,10 @@ +// 26.1.8 Reflect.getPrototypeOf(target) +var $export = require('./_export') + , getProto = require('./_object-gpo') + , anObject = require('./_an-object'); + +$export($export.S, 'Reflect', { + getPrototypeOf: function getPrototypeOf(target){ + return getProto(anObject(target)); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.get.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.get.js new file mode 100644 index 00000000..f8c39f50 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.get.js @@ -0,0 +1,21 @@ +// 26.1.6 Reflect.get(target, propertyKey [, receiver]) +var gOPD = require('./_object-gopd') + , getPrototypeOf = require('./_object-gpo') + , has = require('./_has') + , $export = require('./_export') + , isObject = require('./_is-object') + , anObject = require('./_an-object'); + +function get(target, propertyKey/*, receiver*/){ + var receiver = arguments.length < 3 ? target : arguments[2] + , desc, proto; + if(anObject(target) === receiver)return target[propertyKey]; + if(desc = gOPD.f(target, propertyKey))return has(desc, 'value') + ? desc.value + : desc.get !== undefined + ? desc.get.call(receiver) + : undefined; + if(isObject(proto = getPrototypeOf(target)))return get(proto, propertyKey, receiver); +} + +$export($export.S, 'Reflect', {get: get}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.has.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.has.js new file mode 100644 index 00000000..bbb6dbcd --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.has.js @@ -0,0 +1,8 @@ +// 26.1.9 Reflect.has(target, propertyKey) +var $export = require('./_export'); + +$export($export.S, 'Reflect', { + has: function has(target, propertyKey){ + return propertyKey in target; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.is-extensible.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.is-extensible.js new file mode 100644 index 00000000..ffbc2848 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.is-extensible.js @@ -0,0 +1,11 @@ +// 26.1.10 Reflect.isExtensible(target) +var $export = require('./_export') + , anObject = require('./_an-object') + , $isExtensible = Object.isExtensible; + +$export($export.S, 'Reflect', { + isExtensible: function isExtensible(target){ + anObject(target); + return $isExtensible ? $isExtensible(target) : true; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.own-keys.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.own-keys.js new file mode 100644 index 00000000..a1e5330c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.own-keys.js @@ -0,0 +1,4 @@ +// 26.1.11 Reflect.ownKeys(target) +var $export = require('./_export'); + +$export($export.S, 'Reflect', {ownKeys: require('./_own-keys')}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.prevent-extensions.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.prevent-extensions.js new file mode 100644 index 00000000..d3dad8ee --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.prevent-extensions.js @@ -0,0 +1,16 @@ +// 26.1.12 Reflect.preventExtensions(target) +var $export = require('./_export') + , anObject = require('./_an-object') + , $preventExtensions = Object.preventExtensions; + +$export($export.S, 'Reflect', { + preventExtensions: function preventExtensions(target){ + anObject(target); + try { + if($preventExtensions)$preventExtensions(target); + return true; + } catch(e){ + return false; + } + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.set-prototype-of.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.set-prototype-of.js new file mode 100644 index 00000000..b79d9b61 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.set-prototype-of.js @@ -0,0 +1,15 @@ +// 26.1.14 Reflect.setPrototypeOf(target, proto) +var $export = require('./_export') + , setProto = require('./_set-proto'); + +if(setProto)$export($export.S, 'Reflect', { + setPrototypeOf: function setPrototypeOf(target, proto){ + setProto.check(target, proto); + try { + setProto.set(target, proto); + return true; + } catch(e){ + return false; + } + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.set.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.set.js new file mode 100644 index 00000000..c6b916a2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.reflect.set.js @@ -0,0 +1,31 @@ +// 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) +var dP = require('./_object-dp') + , gOPD = require('./_object-gopd') + , getPrototypeOf = require('./_object-gpo') + , has = require('./_has') + , $export = require('./_export') + , createDesc = require('./_property-desc') + , anObject = require('./_an-object') + , isObject = require('./_is-object'); + +function set(target, propertyKey, V/*, receiver*/){ + var receiver = arguments.length < 4 ? target : arguments[3] + , ownDesc = gOPD.f(anObject(target), propertyKey) + , existingDescriptor, proto; + if(!ownDesc){ + if(isObject(proto = getPrototypeOf(target))){ + return set(proto, propertyKey, V, receiver); + } + ownDesc = createDesc(0); + } + if(has(ownDesc, 'value')){ + if(ownDesc.writable === false || !isObject(receiver))return false; + existingDescriptor = gOPD.f(receiver, propertyKey) || createDesc(0); + existingDescriptor.value = V; + dP.f(receiver, propertyKey, existingDescriptor); + return true; + } + return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); +} + +$export($export.S, 'Reflect', {set: set}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.regexp.constructor.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.regexp.constructor.js new file mode 100644 index 00000000..7313c52b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.regexp.constructor.js @@ -0,0 +1 @@ +require('./_set-species')('RegExp'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.regexp.flags.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.regexp.flags.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.regexp.match.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.regexp.match.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.regexp.replace.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.regexp.replace.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.regexp.search.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.regexp.search.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.regexp.split.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.regexp.split.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.regexp.to-string.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.regexp.to-string.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.set.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.set.js new file mode 100644 index 00000000..a1880881 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.set.js @@ -0,0 +1,12 @@ +'use strict'; +var strong = require('./_collection-strong'); + +// 23.2 Set Objects +module.exports = require('./_collection')('Set', function(get){ + return function Set(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.2.3.1 Set.prototype.add(value) + add: function add(value){ + return strong.def(this, value = value === 0 ? 0 : value, value); + } +}, strong); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.anchor.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.anchor.js new file mode 100644 index 00000000..65db2521 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.anchor.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.2 String.prototype.anchor(name) +require('./_string-html')('anchor', function(createHTML){ + return function anchor(name){ + return createHTML(this, 'a', 'name', name); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.big.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.big.js new file mode 100644 index 00000000..aeeb1aba --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.big.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.3 String.prototype.big() +require('./_string-html')('big', function(createHTML){ + return function big(){ + return createHTML(this, 'big', '', ''); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.blink.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.blink.js new file mode 100644 index 00000000..aef8da2e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.blink.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.4 String.prototype.blink() +require('./_string-html')('blink', function(createHTML){ + return function blink(){ + return createHTML(this, 'blink', '', ''); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.bold.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.bold.js new file mode 100644 index 00000000..022cdb07 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.bold.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.5 String.prototype.bold() +require('./_string-html')('bold', function(createHTML){ + return function bold(){ + return createHTML(this, 'b', '', ''); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.code-point-at.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.code-point-at.js new file mode 100644 index 00000000..cf544652 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.code-point-at.js @@ -0,0 +1,9 @@ +'use strict'; +var $export = require('./_export') + , $at = require('./_string-at')(false); +$export($export.P, 'String', { + // 21.1.3.3 String.prototype.codePointAt(pos) + codePointAt: function codePointAt(pos){ + return $at(this, pos); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.ends-with.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.ends-with.js new file mode 100644 index 00000000..80baed9a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.ends-with.js @@ -0,0 +1,20 @@ +// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) +'use strict'; +var $export = require('./_export') + , toLength = require('./_to-length') + , context = require('./_string-context') + , ENDS_WITH = 'endsWith' + , $endsWith = ''[ENDS_WITH]; + +$export($export.P + $export.F * require('./_fails-is-regexp')(ENDS_WITH), 'String', { + endsWith: function endsWith(searchString /*, endPosition = @length */){ + var that = context(this, searchString, ENDS_WITH) + , endPosition = arguments.length > 1 ? arguments[1] : undefined + , len = toLength(that.length) + , end = endPosition === undefined ? len : Math.min(toLength(endPosition), len) + , search = String(searchString); + return $endsWith + ? $endsWith.call(that, search, end) + : that.slice(end - search.length, end) === search; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.fixed.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.fixed.js new file mode 100644 index 00000000..d017e202 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.fixed.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.6 String.prototype.fixed() +require('./_string-html')('fixed', function(createHTML){ + return function fixed(){ + return createHTML(this, 'tt', '', ''); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.fontcolor.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.fontcolor.js new file mode 100644 index 00000000..d40711f0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.fontcolor.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.7 String.prototype.fontcolor(color) +require('./_string-html')('fontcolor', function(createHTML){ + return function fontcolor(color){ + return createHTML(this, 'font', 'color', color); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.fontsize.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.fontsize.js new file mode 100644 index 00000000..ba3ff980 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.fontsize.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.8 String.prototype.fontsize(size) +require('./_string-html')('fontsize', function(createHTML){ + return function fontsize(size){ + return createHTML(this, 'font', 'size', size); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.from-code-point.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.from-code-point.js new file mode 100644 index 00000000..c8776d87 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.from-code-point.js @@ -0,0 +1,23 @@ +var $export = require('./_export') + , toIndex = require('./_to-index') + , fromCharCode = String.fromCharCode + , $fromCodePoint = String.fromCodePoint; + +// length should be 1, old FF problem +$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { + // 21.1.2.2 String.fromCodePoint(...codePoints) + fromCodePoint: function fromCodePoint(x){ // eslint-disable-line no-unused-vars + var res = [] + , aLen = arguments.length + , i = 0 + , code; + while(aLen > i){ + code = +arguments[i++]; + if(toIndex(code, 0x10ffff) !== code)throw RangeError(code + ' is not a valid code point'); + res.push(code < 0x10000 + ? fromCharCode(code) + : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00) + ); + } return res.join(''); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.includes.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.includes.js new file mode 100644 index 00000000..c6b4ee2f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.includes.js @@ -0,0 +1,12 @@ +// 21.1.3.7 String.prototype.includes(searchString, position = 0) +'use strict'; +var $export = require('./_export') + , context = require('./_string-context') + , INCLUDES = 'includes'; + +$export($export.P + $export.F * require('./_fails-is-regexp')(INCLUDES), 'String', { + includes: function includes(searchString /*, position = 0 */){ + return !!~context(this, searchString, INCLUDES) + .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.italics.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.italics.js new file mode 100644 index 00000000..d33efd3c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.italics.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.9 String.prototype.italics() +require('./_string-html')('italics', function(createHTML){ + return function italics(){ + return createHTML(this, 'i', '', ''); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.iterator.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.iterator.js new file mode 100644 index 00000000..ac391ee4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.iterator.js @@ -0,0 +1,17 @@ +'use strict'; +var $at = require('./_string-at')(true); + +// 21.1.3.27 String.prototype[@@iterator]() +require('./_iter-define')(String, 'String', function(iterated){ + this._t = String(iterated); // target + this._i = 0; // next index +// 21.1.5.2.1 %StringIteratorPrototype%.next() +}, function(){ + var O = this._t + , index = this._i + , point; + if(index >= O.length)return {value: undefined, done: true}; + point = $at(O, index); + this._i += point.length; + return {value: point, done: false}; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.link.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.link.js new file mode 100644 index 00000000..6a75c18a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.link.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.10 String.prototype.link(url) +require('./_string-html')('link', function(createHTML){ + return function link(url){ + return createHTML(this, 'a', 'href', url); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.raw.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.raw.js new file mode 100644 index 00000000..1016acfa --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.raw.js @@ -0,0 +1,18 @@ +var $export = require('./_export') + , toIObject = require('./_to-iobject') + , toLength = require('./_to-length'); + +$export($export.S, 'String', { + // 21.1.2.4 String.raw(callSite, ...substitutions) + raw: function raw(callSite){ + var tpl = toIObject(callSite.raw) + , len = toLength(tpl.length) + , aLen = arguments.length + , res = [] + , i = 0; + while(len > i){ + res.push(String(tpl[i++])); + if(i < aLen)res.push(String(arguments[i])); + } return res.join(''); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.repeat.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.repeat.js new file mode 100644 index 00000000..a054222d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.repeat.js @@ -0,0 +1,6 @@ +var $export = require('./_export'); + +$export($export.P, 'String', { + // 21.1.3.13 String.prototype.repeat(count) + repeat: require('./_string-repeat') +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.small.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.small.js new file mode 100644 index 00000000..51b1b30d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.small.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.11 String.prototype.small() +require('./_string-html')('small', function(createHTML){ + return function small(){ + return createHTML(this, 'small', '', ''); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.starts-with.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.starts-with.js new file mode 100644 index 00000000..017805f0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.starts-with.js @@ -0,0 +1,18 @@ +// 21.1.3.18 String.prototype.startsWith(searchString [, position ]) +'use strict'; +var $export = require('./_export') + , toLength = require('./_to-length') + , context = require('./_string-context') + , STARTS_WITH = 'startsWith' + , $startsWith = ''[STARTS_WITH]; + +$export($export.P + $export.F * require('./_fails-is-regexp')(STARTS_WITH), 'String', { + startsWith: function startsWith(searchString /*, position = 0 */){ + var that = context(this, searchString, STARTS_WITH) + , index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)) + , search = String(searchString); + return $startsWith + ? $startsWith.call(that, search, index) + : that.slice(index, index + search.length) === search; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.strike.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.strike.js new file mode 100644 index 00000000..c6287d3a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.strike.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.12 String.prototype.strike() +require('./_string-html')('strike', function(createHTML){ + return function strike(){ + return createHTML(this, 'strike', '', ''); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.sub.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.sub.js new file mode 100644 index 00000000..ee18ea7a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.sub.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.13 String.prototype.sub() +require('./_string-html')('sub', function(createHTML){ + return function sub(){ + return createHTML(this, 'sub', '', ''); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.sup.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.sup.js new file mode 100644 index 00000000..a3429988 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.sup.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.14 String.prototype.sup() +require('./_string-html')('sup', function(createHTML){ + return function sup(){ + return createHTML(this, 'sup', '', ''); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.trim.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.trim.js new file mode 100644 index 00000000..35f0fb0b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.string.trim.js @@ -0,0 +1,7 @@ +'use strict'; +// 21.1.3.25 String.prototype.trim() +require('./_string-trim')('trim', function($trim){ + return function trim(){ + return $trim(this, 3); + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.symbol.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.symbol.js new file mode 100644 index 00000000..eae491c5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.symbol.js @@ -0,0 +1,235 @@ +'use strict'; +// ECMAScript 6 symbols shim +var global = require('./_global') + , has = require('./_has') + , DESCRIPTORS = require('./_descriptors') + , $export = require('./_export') + , redefine = require('./_redefine') + , META = require('./_meta').KEY + , $fails = require('./_fails') + , shared = require('./_shared') + , setToStringTag = require('./_set-to-string-tag') + , uid = require('./_uid') + , wks = require('./_wks') + , wksExt = require('./_wks-ext') + , wksDefine = require('./_wks-define') + , keyOf = require('./_keyof') + , enumKeys = require('./_enum-keys') + , isArray = require('./_is-array') + , anObject = require('./_an-object') + , toIObject = require('./_to-iobject') + , toPrimitive = require('./_to-primitive') + , createDesc = require('./_property-desc') + , _create = require('./_object-create') + , gOPNExt = require('./_object-gopn-ext') + , $GOPD = require('./_object-gopd') + , $DP = require('./_object-dp') + , $keys = require('./_object-keys') + , gOPD = $GOPD.f + , dP = $DP.f + , gOPN = gOPNExt.f + , $Symbol = global.Symbol + , $JSON = global.JSON + , _stringify = $JSON && $JSON.stringify + , PROTOTYPE = 'prototype' + , HIDDEN = wks('_hidden') + , TO_PRIMITIVE = wks('toPrimitive') + , isEnum = {}.propertyIsEnumerable + , SymbolRegistry = shared('symbol-registry') + , AllSymbols = shared('symbols') + , OPSymbols = shared('op-symbols') + , ObjectProto = Object[PROTOTYPE] + , USE_NATIVE = typeof $Symbol == 'function' + , QObject = global.QObject; +// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 +var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + +// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 +var setSymbolDesc = DESCRIPTORS && $fails(function(){ + return _create(dP({}, 'a', { + get: function(){ return dP(this, 'a', {value: 7}).a; } + })).a != 7; +}) ? function(it, key, D){ + var protoDesc = gOPD(ObjectProto, key); + if(protoDesc)delete ObjectProto[key]; + dP(it, key, D); + if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc); +} : dP; + +var wrap = function(tag){ + var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); + sym._k = tag; + return sym; +}; + +var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){ + return typeof it == 'symbol'; +} : function(it){ + return it instanceof $Symbol; +}; + +var $defineProperty = function defineProperty(it, key, D){ + if(it === ObjectProto)$defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if(has(AllSymbols, key)){ + if(!D.enumerable){ + if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false; + D = _create(D, {enumerable: createDesc(0, false)}); + } return setSymbolDesc(it, key, D); + } return dP(it, key, D); +}; +var $defineProperties = function defineProperties(it, P){ + anObject(it); + var keys = enumKeys(P = toIObject(P)) + , i = 0 + , l = keys.length + , key; + while(l > i)$defineProperty(it, key = keys[i++], P[key]); + return it; +}; +var $create = function create(it, P){ + return P === undefined ? _create(it) : $defineProperties(_create(it), P); +}; +var $propertyIsEnumerable = function propertyIsEnumerable(key){ + var E = isEnum.call(this, key = toPrimitive(key, true)); + if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false; + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; +}; +var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){ + it = toIObject(it); + key = toPrimitive(key, true); + if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return; + var D = gOPD(it, key); + if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true; + return D; +}; +var $getOwnPropertyNames = function getOwnPropertyNames(it){ + var names = gOPN(toIObject(it)) + , result = [] + , i = 0 + , key; + while(names.length > i){ + if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key); + } return result; +}; +var $getOwnPropertySymbols = function getOwnPropertySymbols(it){ + var IS_OP = it === ObjectProto + , names = gOPN(IS_OP ? OPSymbols : toIObject(it)) + , result = [] + , i = 0 + , key; + while(names.length > i){ + if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]); + } return result; +}; + +// 19.4.1.1 Symbol([description]) +if(!USE_NATIVE){ + $Symbol = function Symbol(){ + if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function(value){ + if(this === ObjectProto)$set.call(OPSymbols, value); + if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set}); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString(){ + return this._k; + }); + + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + require('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames; + require('./_object-pie').f = $propertyIsEnumerable; + require('./_object-gops').f = $getOwnPropertySymbols; + + if(DESCRIPTORS && !require('./_library')){ + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + wksExt.f = function(name){ + return wrap(wks(name)); + } +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol}); + +for(var symbols = ( + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' +).split(','), i = 0; symbols.length > i; )wks(symbols[i++]); + +for(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]); + +$export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + 'for': function(key){ + return has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(key){ + if(isSymbol(key))return keyOf(SymbolRegistry, key); + throw TypeError(key + ' is not a symbol!'); + }, + useSetter: function(){ setter = true; }, + useSimple: function(){ setter = false; } +}); + +$export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols +}); + +// 24.3.2 JSON.stringify(value [, replacer [, space]]) +$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){ + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}'; +})), 'JSON', { + stringify: function stringify(it){ + if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined + var args = [it] + , i = 1 + , replacer, $replacer; + while(arguments.length > i)args.push(arguments[i++]); + replacer = args[1]; + if(typeof replacer == 'function')$replacer = replacer; + if($replacer || !isArray(replacer))replacer = function(key, value){ + if($replacer)value = $replacer.call(this, key, value); + if(!isSymbol(value))return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + } +}); + +// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) +$Symbol[PROTOTYPE][TO_PRIMITIVE] || require('./_hide')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); +// 19.4.3.5 Symbol.prototype[@@toStringTag] +setToStringTag($Symbol, 'Symbol'); +// 20.2.1.9 Math[@@toStringTag] +setToStringTag(Math, 'Math', true); +// 24.3.3 JSON[@@toStringTag] +setToStringTag(global.JSON, 'JSON', true); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.typed.array-buffer.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.typed.array-buffer.js new file mode 100644 index 00000000..9f47082c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.typed.array-buffer.js @@ -0,0 +1,46 @@ +'use strict'; +var $export = require('./_export') + , $typed = require('./_typed') + , buffer = require('./_typed-buffer') + , anObject = require('./_an-object') + , toIndex = require('./_to-index') + , toLength = require('./_to-length') + , isObject = require('./_is-object') + , ArrayBuffer = require('./_global').ArrayBuffer + , speciesConstructor = require('./_species-constructor') + , $ArrayBuffer = buffer.ArrayBuffer + , $DataView = buffer.DataView + , $isView = $typed.ABV && ArrayBuffer.isView + , $slice = $ArrayBuffer.prototype.slice + , VIEW = $typed.VIEW + , ARRAY_BUFFER = 'ArrayBuffer'; + +$export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), {ArrayBuffer: $ArrayBuffer}); + +$export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, { + // 24.1.3.1 ArrayBuffer.isView(arg) + isView: function isView(it){ + return $isView && $isView(it) || isObject(it) && VIEW in it; + } +}); + +$export($export.P + $export.U + $export.F * require('./_fails')(function(){ + return !new $ArrayBuffer(2).slice(1, undefined).byteLength; +}), ARRAY_BUFFER, { + // 24.1.4.3 ArrayBuffer.prototype.slice(start, end) + slice: function slice(start, end){ + if($slice !== undefined && end === undefined)return $slice.call(anObject(this), start); // FF fix + var len = anObject(this).byteLength + , first = toIndex(start, len) + , final = toIndex(end === undefined ? len : end, len) + , result = new (speciesConstructor(this, $ArrayBuffer))(toLength(final - first)) + , viewS = new $DataView(this) + , viewT = new $DataView(result) + , index = 0; + while(first < final){ + viewT.setUint8(index++, viewS.getUint8(first++)); + } return result; + } +}); + +require('./_set-species')(ARRAY_BUFFER); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.typed.data-view.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.typed.data-view.js new file mode 100644 index 00000000..ee7b8812 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.typed.data-view.js @@ -0,0 +1,4 @@ +var $export = require('./_export'); +$export($export.G + $export.W + $export.F * !require('./_typed').ABV, { + DataView: require('./_typed-buffer').DataView +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.typed.float32-array.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.typed.float32-array.js new file mode 100644 index 00000000..2c4c9a69 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.typed.float32-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Float32', 4, function(init){ + return function Float32Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.typed.float64-array.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.typed.float64-array.js new file mode 100644 index 00000000..4b20257f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.typed.float64-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Float64', 8, function(init){ + return function Float64Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.typed.int16-array.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.typed.int16-array.js new file mode 100644 index 00000000..d3f61c56 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.typed.int16-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Int16', 2, function(init){ + return function Int16Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.typed.int32-array.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.typed.int32-array.js new file mode 100644 index 00000000..df47c1bb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.typed.int32-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Int32', 4, function(init){ + return function Int32Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.typed.int8-array.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.typed.int8-array.js new file mode 100644 index 00000000..da4dbf0a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.typed.int8-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Int8', 1, function(init){ + return function Int8Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.typed.uint16-array.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.typed.uint16-array.js new file mode 100644 index 00000000..cb335773 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.typed.uint16-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Uint16', 2, function(init){ + return function Uint16Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.typed.uint32-array.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.typed.uint32-array.js new file mode 100644 index 00000000..41c9e7b8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.typed.uint32-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Uint32', 4, function(init){ + return function Uint32Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.typed.uint8-array.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.typed.uint8-array.js new file mode 100644 index 00000000..f794f86c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.typed.uint8-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Uint8', 1, function(init){ + return function Uint8Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.typed.uint8-clamped-array.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.typed.uint8-clamped-array.js new file mode 100644 index 00000000..b1230479 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.typed.uint8-clamped-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Uint8', 1, function(init){ + return function Uint8ClampedArray(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; +}, true); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.weak-map.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.weak-map.js new file mode 100644 index 00000000..4109db33 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.weak-map.js @@ -0,0 +1,56 @@ +'use strict'; +var each = require('./_array-methods')(0) + , redefine = require('./_redefine') + , meta = require('./_meta') + , assign = require('./_object-assign') + , weak = require('./_collection-weak') + , isObject = require('./_is-object') + , getWeak = meta.getWeak + , isExtensible = Object.isExtensible + , uncaughtFrozenStore = weak.ufstore + , tmp = {} + , InternalMap; + +var wrapper = function(get){ + return function WeakMap(){ + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; +}; + +var methods = { + // 23.3.3.3 WeakMap.prototype.get(key) + get: function get(key){ + if(isObject(key)){ + var data = getWeak(key); + if(data === true)return uncaughtFrozenStore(this).get(key); + return data ? data[this._i] : undefined; + } + }, + // 23.3.3.5 WeakMap.prototype.set(key, value) + set: function set(key, value){ + return weak.def(this, key, value); + } +}; + +// 23.3 WeakMap Objects +var $WeakMap = module.exports = require('./_collection')('WeakMap', wrapper, methods, weak, true, true); + +// IE11 WeakMap frozen keys fix +if(new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7){ + InternalMap = weak.getConstructor(wrapper); + assign(InternalMap.prototype, methods); + meta.NEED = true; + each(['delete', 'has', 'get', 'set'], function(key){ + var proto = $WeakMap.prototype + , method = proto[key]; + redefine(proto, key, function(a, b){ + // store frozen objects on internal weakmap shim + if(isObject(a) && !isExtensible(a)){ + if(!this._f)this._f = new InternalMap; + var result = this._f[key](a, b); + return key == 'set' ? this : result; + // store all the rest on native weakmap + } return method.call(this, a, b); + }); + }); +} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es6.weak-set.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.weak-set.js new file mode 100644 index 00000000..77d01b6b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es6.weak-set.js @@ -0,0 +1,12 @@ +'use strict'; +var weak = require('./_collection-weak'); + +// 23.4 WeakSet Objects +require('./_collection')('WeakSet', function(get){ + return function WeakSet(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.4.3.1 WeakSet.prototype.add(value) + add: function add(value){ + return weak.def(this, value, true); + } +}, weak, false, true); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.array.includes.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.array.includes.js new file mode 100644 index 00000000..6d5b0090 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.array.includes.js @@ -0,0 +1,12 @@ +'use strict'; +// https://github.com/tc39/Array.prototype.includes +var $export = require('./_export') + , $includes = require('./_array-includes')(true); + +$export($export.P, 'Array', { + includes: function includes(el /*, fromIndex = 0 */){ + return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); + } +}); + +require('./_add-to-unscopables')('includes'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.asap.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.asap.js new file mode 100644 index 00000000..b762b49a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.asap.js @@ -0,0 +1,12 @@ +// https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask +var $export = require('./_export') + , microtask = require('./_microtask')() + , process = require('./_global').process + , isNode = require('./_cof')(process) == 'process'; + +$export($export.G, { + asap: function asap(fn){ + var domain = isNode && process.domain; + microtask(domain ? domain.bind(fn) : fn); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.error.is-error.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.error.is-error.js new file mode 100644 index 00000000..d6fe29dc --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.error.is-error.js @@ -0,0 +1,9 @@ +// https://github.com/ljharb/proposal-is-error +var $export = require('./_export') + , cof = require('./_cof'); + +$export($export.S, 'Error', { + isError: function isError(it){ + return cof(it) === 'Error'; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.map.to-json.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.map.to-json.js new file mode 100644 index 00000000..19f9b6d3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.map.to-json.js @@ -0,0 +1,4 @@ +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var $export = require('./_export'); + +$export($export.P + $export.R, 'Map', {toJSON: require('./_collection-to-json')('Map')}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.math.iaddh.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.math.iaddh.js new file mode 100644 index 00000000..bb3f3d38 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.math.iaddh.js @@ -0,0 +1,11 @@ +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = require('./_export'); + +$export($export.S, 'Math', { + iaddh: function iaddh(x0, x1, y0, y1){ + var $x0 = x0 >>> 0 + , $x1 = x1 >>> 0 + , $y0 = y0 >>> 0; + return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.math.imulh.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.math.imulh.js new file mode 100644 index 00000000..a25da686 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.math.imulh.js @@ -0,0 +1,16 @@ +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = require('./_export'); + +$export($export.S, 'Math', { + imulh: function imulh(u, v){ + var UINT16 = 0xffff + , $u = +u + , $v = +v + , u0 = $u & UINT16 + , v0 = $v & UINT16 + , u1 = $u >> 16 + , v1 = $v >> 16 + , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); + return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.math.isubh.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.math.isubh.js new file mode 100644 index 00000000..3814dc29 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.math.isubh.js @@ -0,0 +1,11 @@ +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = require('./_export'); + +$export($export.S, 'Math', { + isubh: function isubh(x0, x1, y0, y1){ + var $x0 = x0 >>> 0 + , $x1 = x1 >>> 0 + , $y0 = y0 >>> 0; + return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.math.umulh.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.math.umulh.js new file mode 100644 index 00000000..0d22cf1b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.math.umulh.js @@ -0,0 +1,16 @@ +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = require('./_export'); + +$export($export.S, 'Math', { + umulh: function umulh(u, v){ + var UINT16 = 0xffff + , $u = +u + , $v = +v + , u0 = $u & UINT16 + , v0 = $v & UINT16 + , u1 = $u >>> 16 + , v1 = $v >>> 16 + , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); + return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.object.define-getter.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.object.define-getter.js new file mode 100644 index 00000000..f206e96a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.object.define-getter.js @@ -0,0 +1,12 @@ +'use strict'; +var $export = require('./_export') + , toObject = require('./_to-object') + , aFunction = require('./_a-function') + , $defineProperty = require('./_object-dp'); + +// B.2.2.2 Object.prototype.__defineGetter__(P, getter) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __defineGetter__: function __defineGetter__(P, getter){ + $defineProperty.f(toObject(this), P, {get: aFunction(getter), enumerable: true, configurable: true}); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.object.define-setter.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.object.define-setter.js new file mode 100644 index 00000000..c0f7b700 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.object.define-setter.js @@ -0,0 +1,12 @@ +'use strict'; +var $export = require('./_export') + , toObject = require('./_to-object') + , aFunction = require('./_a-function') + , $defineProperty = require('./_object-dp'); + +// B.2.2.3 Object.prototype.__defineSetter__(P, setter) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __defineSetter__: function __defineSetter__(P, setter){ + $defineProperty.f(toObject(this), P, {set: aFunction(setter), enumerable: true, configurable: true}); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.object.entries.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.object.entries.js new file mode 100644 index 00000000..cfc049df --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.object.entries.js @@ -0,0 +1,9 @@ +// https://github.com/tc39/proposal-object-values-entries +var $export = require('./_export') + , $entries = require('./_object-to-array')(true); + +$export($export.S, 'Object', { + entries: function entries(it){ + return $entries(it); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.object.enumerable-entries.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.object.enumerable-entries.js new file mode 100644 index 00000000..5daa803b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.object.enumerable-entries.js @@ -0,0 +1,12 @@ +// https://github.com/leobalter/object-enumerables +var $export = require('./_export') + , toObject = require('./_to-object'); + +$export($export.S, 'Object', { + enumerableEntries: function enumerableEntries(O){ + var T = toObject(O) + , properties = []; + for(var key in T)properties.push([key, T[key]]); + return properties; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.object.enumerable-keys.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.object.enumerable-keys.js new file mode 100644 index 00000000..791ec184 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.object.enumerable-keys.js @@ -0,0 +1,12 @@ +// https://github.com/leobalter/object-enumerables +var $export = require('./_export') + , toObject = require('./_to-object'); + +$export($export.S, 'Object', { + enumerableKeys: function enumerableKeys(O){ + var T = toObject(O) + , properties = []; + for(var key in T)properties.push(key); + return properties; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.object.enumerable-values.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.object.enumerable-values.js new file mode 100644 index 00000000..1d1bfaa7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.object.enumerable-values.js @@ -0,0 +1,12 @@ +// https://github.com/leobalter/object-enumerables +var $export = require('./_export') + , toObject = require('./_to-object'); + +$export($export.S, 'Object', { + enumerableValues: function enumerableValues(O){ + var T = toObject(O) + , properties = []; + for(var key in T)properties.push(T[key]); + return properties; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.object.get-own-property-descriptors.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.object.get-own-property-descriptors.js new file mode 100644 index 00000000..0242b7a0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.object.get-own-property-descriptors.js @@ -0,0 +1,19 @@ +// https://github.com/tc39/proposal-object-getownpropertydescriptors +var $export = require('./_export') + , ownKeys = require('./_own-keys') + , toIObject = require('./_to-iobject') + , gOPD = require('./_object-gopd') + , createProperty = require('./_create-property'); + +$export($export.S, 'Object', { + getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object){ + var O = toIObject(object) + , getDesc = gOPD.f + , keys = ownKeys(O) + , result = {} + , i = 0 + , key; + while(keys.length > i)createProperty(result, key = keys[i++], getDesc(O, key)); + return result; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.object.lookup-getter.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.object.lookup-getter.js new file mode 100644 index 00000000..ec140345 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.object.lookup-getter.js @@ -0,0 +1,18 @@ +'use strict'; +var $export = require('./_export') + , toObject = require('./_to-object') + , toPrimitive = require('./_to-primitive') + , getPrototypeOf = require('./_object-gpo') + , getOwnPropertyDescriptor = require('./_object-gopd').f; + +// B.2.2.4 Object.prototype.__lookupGetter__(P) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __lookupGetter__: function __lookupGetter__(P){ + var O = toObject(this) + , K = toPrimitive(P, true) + , D; + do { + if(D = getOwnPropertyDescriptor(O, K))return D.get; + } while(O = getPrototypeOf(O)); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.object.lookup-setter.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.object.lookup-setter.js new file mode 100644 index 00000000..539dda82 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.object.lookup-setter.js @@ -0,0 +1,18 @@ +'use strict'; +var $export = require('./_export') + , toObject = require('./_to-object') + , toPrimitive = require('./_to-primitive') + , getPrototypeOf = require('./_object-gpo') + , getOwnPropertyDescriptor = require('./_object-gopd').f; + +// B.2.2.5 Object.prototype.__lookupSetter__(P) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __lookupSetter__: function __lookupSetter__(P){ + var O = toObject(this) + , K = toPrimitive(P, true) + , D; + do { + if(D = getOwnPropertyDescriptor(O, K))return D.set; + } while(O = getPrototypeOf(O)); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.object.values.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.object.values.js new file mode 100644 index 00000000..42abd640 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.object.values.js @@ -0,0 +1,9 @@ +// https://github.com/tc39/proposal-object-values-entries +var $export = require('./_export') + , $values = require('./_object-to-array')(false); + +$export($export.S, 'Object', { + values: function values(it){ + return $values(it); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.observable.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.observable.js new file mode 100644 index 00000000..e34fa4f2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.observable.js @@ -0,0 +1,199 @@ +'use strict'; +// https://github.com/zenparsing/es-observable +var $export = require('./_export') + , global = require('./_global') + , core = require('./_core') + , microtask = require('./_microtask')() + , OBSERVABLE = require('./_wks')('observable') + , aFunction = require('./_a-function') + , anObject = require('./_an-object') + , anInstance = require('./_an-instance') + , redefineAll = require('./_redefine-all') + , hide = require('./_hide') + , forOf = require('./_for-of') + , RETURN = forOf.RETURN; + +var getMethod = function(fn){ + return fn == null ? undefined : aFunction(fn); +}; + +var cleanupSubscription = function(subscription){ + var cleanup = subscription._c; + if(cleanup){ + subscription._c = undefined; + cleanup(); + } +}; + +var subscriptionClosed = function(subscription){ + return subscription._o === undefined; +}; + +var closeSubscription = function(subscription){ + if(!subscriptionClosed(subscription)){ + subscription._o = undefined; + cleanupSubscription(subscription); + } +}; + +var Subscription = function(observer, subscriber){ + anObject(observer); + this._c = undefined; + this._o = observer; + observer = new SubscriptionObserver(this); + try { + var cleanup = subscriber(observer) + , subscription = cleanup; + if(cleanup != null){ + if(typeof cleanup.unsubscribe === 'function')cleanup = function(){ subscription.unsubscribe(); }; + else aFunction(cleanup); + this._c = cleanup; + } + } catch(e){ + observer.error(e); + return; + } if(subscriptionClosed(this))cleanupSubscription(this); +}; + +Subscription.prototype = redefineAll({}, { + unsubscribe: function unsubscribe(){ closeSubscription(this); } +}); + +var SubscriptionObserver = function(subscription){ + this._s = subscription; +}; + +SubscriptionObserver.prototype = redefineAll({}, { + next: function next(value){ + var subscription = this._s; + if(!subscriptionClosed(subscription)){ + var observer = subscription._o; + try { + var m = getMethod(observer.next); + if(m)return m.call(observer, value); + } catch(e){ + try { + closeSubscription(subscription); + } finally { + throw e; + } + } + } + }, + error: function error(value){ + var subscription = this._s; + if(subscriptionClosed(subscription))throw value; + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.error); + if(!m)throw value; + value = m.call(observer, value); + } catch(e){ + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } cleanupSubscription(subscription); + return value; + }, + complete: function complete(value){ + var subscription = this._s; + if(!subscriptionClosed(subscription)){ + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.complete); + value = m ? m.call(observer, value) : undefined; + } catch(e){ + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } cleanupSubscription(subscription); + return value; + } + } +}); + +var $Observable = function Observable(subscriber){ + anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber); +}; + +redefineAll($Observable.prototype, { + subscribe: function subscribe(observer){ + return new Subscription(observer, this._f); + }, + forEach: function forEach(fn){ + var that = this; + return new (core.Promise || global.Promise)(function(resolve, reject){ + aFunction(fn); + var subscription = that.subscribe({ + next : function(value){ + try { + return fn(value); + } catch(e){ + reject(e); + subscription.unsubscribe(); + } + }, + error: reject, + complete: resolve + }); + }); + } +}); + +redefineAll($Observable, { + from: function from(x){ + var C = typeof this === 'function' ? this : $Observable; + var method = getMethod(anObject(x)[OBSERVABLE]); + if(method){ + var observable = anObject(method.call(x)); + return observable.constructor === C ? observable : new C(function(observer){ + return observable.subscribe(observer); + }); + } + return new C(function(observer){ + var done = false; + microtask(function(){ + if(!done){ + try { + if(forOf(x, false, function(it){ + observer.next(it); + if(done)return RETURN; + }) === RETURN)return; + } catch(e){ + if(done)throw e; + observer.error(e); + return; + } observer.complete(); + } + }); + return function(){ done = true; }; + }); + }, + of: function of(){ + for(var i = 0, l = arguments.length, items = Array(l); i < l;)items[i] = arguments[i++]; + return new (typeof this === 'function' ? this : $Observable)(function(observer){ + var done = false; + microtask(function(){ + if(!done){ + for(var i = 0; i < items.length; ++i){ + observer.next(items[i]); + if(done)return; + } observer.complete(); + } + }); + return function(){ done = true; }; + }); + } +}); + +hide($Observable.prototype, OBSERVABLE, function(){ return this; }); + +$export($export.G, {Observable: $Observable}); + +require('./_set-species')('Observable'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.reflect.define-metadata.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.reflect.define-metadata.js new file mode 100644 index 00000000..c833e431 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.reflect.define-metadata.js @@ -0,0 +1,8 @@ +var metadata = require('./_metadata') + , anObject = require('./_an-object') + , toMetaKey = metadata.key + , ordinaryDefineOwnMetadata = metadata.set; + +metadata.exp({defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey){ + ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey)); +}}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.reflect.delete-metadata.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.reflect.delete-metadata.js new file mode 100644 index 00000000..8a8a8253 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.reflect.delete-metadata.js @@ -0,0 +1,15 @@ +var metadata = require('./_metadata') + , anObject = require('./_an-object') + , toMetaKey = metadata.key + , getOrCreateMetadataMap = metadata.map + , store = metadata.store; + +metadata.exp({deleteMetadata: function deleteMetadata(metadataKey, target /*, targetKey */){ + var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]) + , metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false); + if(metadataMap === undefined || !metadataMap['delete'](metadataKey))return false; + if(metadataMap.size)return true; + var targetMetadata = store.get(target); + targetMetadata['delete'](targetKey); + return !!targetMetadata.size || store['delete'](target); +}}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.reflect.get-metadata-keys.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.reflect.get-metadata-keys.js new file mode 100644 index 00000000..58c4dcc2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.reflect.get-metadata-keys.js @@ -0,0 +1,19 @@ +var Set = require('./es6.set') + , from = require('./_array-from-iterable') + , metadata = require('./_metadata') + , anObject = require('./_an-object') + , getPrototypeOf = require('./_object-gpo') + , ordinaryOwnMetadataKeys = metadata.keys + , toMetaKey = metadata.key; + +var ordinaryMetadataKeys = function(O, P){ + var oKeys = ordinaryOwnMetadataKeys(O, P) + , parent = getPrototypeOf(O); + if(parent === null)return oKeys; + var pKeys = ordinaryMetadataKeys(parent, P); + return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys; +}; + +metadata.exp({getMetadataKeys: function getMetadataKeys(target /*, targetKey */){ + return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); +}}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.reflect.get-metadata.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.reflect.get-metadata.js new file mode 100644 index 00000000..48cd9d67 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.reflect.get-metadata.js @@ -0,0 +1,17 @@ +var metadata = require('./_metadata') + , anObject = require('./_an-object') + , getPrototypeOf = require('./_object-gpo') + , ordinaryHasOwnMetadata = metadata.has + , ordinaryGetOwnMetadata = metadata.get + , toMetaKey = metadata.key; + +var ordinaryGetMetadata = function(MetadataKey, O, P){ + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if(hasOwn)return ordinaryGetOwnMetadata(MetadataKey, O, P); + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined; +}; + +metadata.exp({getMetadata: function getMetadata(metadataKey, target /*, targetKey */){ + return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +}}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.reflect.get-own-metadata-keys.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.reflect.get-own-metadata-keys.js new file mode 100644 index 00000000..93ecfbe5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.reflect.get-own-metadata-keys.js @@ -0,0 +1,8 @@ +var metadata = require('./_metadata') + , anObject = require('./_an-object') + , ordinaryOwnMetadataKeys = metadata.keys + , toMetaKey = metadata.key; + +metadata.exp({getOwnMetadataKeys: function getOwnMetadataKeys(target /*, targetKey */){ + return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); +}}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.reflect.get-own-metadata.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.reflect.get-own-metadata.js new file mode 100644 index 00000000..f1040f91 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.reflect.get-own-metadata.js @@ -0,0 +1,9 @@ +var metadata = require('./_metadata') + , anObject = require('./_an-object') + , ordinaryGetOwnMetadata = metadata.get + , toMetaKey = metadata.key; + +metadata.exp({getOwnMetadata: function getOwnMetadata(metadataKey, target /*, targetKey */){ + return ordinaryGetOwnMetadata(metadataKey, anObject(target) + , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +}}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.reflect.has-metadata.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.reflect.has-metadata.js new file mode 100644 index 00000000..0ff63786 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.reflect.has-metadata.js @@ -0,0 +1,16 @@ +var metadata = require('./_metadata') + , anObject = require('./_an-object') + , getPrototypeOf = require('./_object-gpo') + , ordinaryHasOwnMetadata = metadata.has + , toMetaKey = metadata.key; + +var ordinaryHasMetadata = function(MetadataKey, O, P){ + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if(hasOwn)return true; + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false; +}; + +metadata.exp({hasMetadata: function hasMetadata(metadataKey, target /*, targetKey */){ + return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +}}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.reflect.has-own-metadata.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.reflect.has-own-metadata.js new file mode 100644 index 00000000..d645ea3f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.reflect.has-own-metadata.js @@ -0,0 +1,9 @@ +var metadata = require('./_metadata') + , anObject = require('./_an-object') + , ordinaryHasOwnMetadata = metadata.has + , toMetaKey = metadata.key; + +metadata.exp({hasOwnMetadata: function hasOwnMetadata(metadataKey, target /*, targetKey */){ + return ordinaryHasOwnMetadata(metadataKey, anObject(target) + , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +}}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.reflect.metadata.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.reflect.metadata.js new file mode 100644 index 00000000..3a4e3aee --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.reflect.metadata.js @@ -0,0 +1,15 @@ +var metadata = require('./_metadata') + , anObject = require('./_an-object') + , aFunction = require('./_a-function') + , toMetaKey = metadata.key + , ordinaryDefineOwnMetadata = metadata.set; + +metadata.exp({metadata: function metadata(metadataKey, metadataValue){ + return function decorator(target, targetKey){ + ordinaryDefineOwnMetadata( + metadataKey, metadataValue, + (targetKey !== undefined ? anObject : aFunction)(target), + toMetaKey(targetKey) + ); + }; +}}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.set.to-json.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.set.to-json.js new file mode 100644 index 00000000..fd68cb51 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.set.to-json.js @@ -0,0 +1,4 @@ +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var $export = require('./_export'); + +$export($export.P + $export.R, 'Set', {toJSON: require('./_collection-to-json')('Set')}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.string.at.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.string.at.js new file mode 100644 index 00000000..208654e6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.string.at.js @@ -0,0 +1,10 @@ +'use strict'; +// https://github.com/mathiasbynens/String.prototype.at +var $export = require('./_export') + , $at = require('./_string-at')(true); + +$export($export.P, 'String', { + at: function at(pos){ + return $at(this, pos); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.string.match-all.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.string.match-all.js new file mode 100644 index 00000000..cb0099b3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.string.match-all.js @@ -0,0 +1,30 @@ +'use strict'; +// https://tc39.github.io/String.prototype.matchAll/ +var $export = require('./_export') + , defined = require('./_defined') + , toLength = require('./_to-length') + , isRegExp = require('./_is-regexp') + , getFlags = require('./_flags') + , RegExpProto = RegExp.prototype; + +var $RegExpStringIterator = function(regexp, string){ + this._r = regexp; + this._s = string; +}; + +require('./_iter-create')($RegExpStringIterator, 'RegExp String', function next(){ + var match = this._r.exec(this._s); + return {value: match, done: match === null}; +}); + +$export($export.P, 'String', { + matchAll: function matchAll(regexp){ + defined(this); + if(!isRegExp(regexp))throw TypeError(regexp + ' is not a regexp!'); + var S = String(this) + , flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp) + , rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags); + rx.lastIndex = toLength(regexp.lastIndex); + return new $RegExpStringIterator(rx, S); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.string.pad-end.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.string.pad-end.js new file mode 100644 index 00000000..8483d82f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.string.pad-end.js @@ -0,0 +1,10 @@ +'use strict'; +// https://github.com/tc39/proposal-string-pad-start-end +var $export = require('./_export') + , $pad = require('./_string-pad'); + +$export($export.P, 'String', { + padEnd: function padEnd(maxLength /*, fillString = ' ' */){ + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.string.pad-start.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.string.pad-start.js new file mode 100644 index 00000000..b79b605d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.string.pad-start.js @@ -0,0 +1,10 @@ +'use strict'; +// https://github.com/tc39/proposal-string-pad-start-end +var $export = require('./_export') + , $pad = require('./_string-pad'); + +$export($export.P, 'String', { + padStart: function padStart(maxLength /*, fillString = ' ' */){ + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.string.trim-left.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.string.trim-left.js new file mode 100644 index 00000000..e5845771 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.string.trim-left.js @@ -0,0 +1,7 @@ +'use strict'; +// https://github.com/sebmarkbage/ecmascript-string-left-right-trim +require('./_string-trim')('trimLeft', function($trim){ + return function trimLeft(){ + return $trim(this, 1); + }; +}, 'trimStart'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.string.trim-right.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.string.trim-right.js new file mode 100644 index 00000000..42a9ed33 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.string.trim-right.js @@ -0,0 +1,7 @@ +'use strict'; +// https://github.com/sebmarkbage/ecmascript-string-left-right-trim +require('./_string-trim')('trimRight', function($trim){ + return function trimRight(){ + return $trim(this, 2); + }; +}, 'trimEnd'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.symbol.async-iterator.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.symbol.async-iterator.js new file mode 100644 index 00000000..cf9f74a5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.symbol.async-iterator.js @@ -0,0 +1 @@ +require('./_wks-define')('asyncIterator'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.symbol.observable.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.symbol.observable.js new file mode 100644 index 00000000..0163bca5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.symbol.observable.js @@ -0,0 +1 @@ +require('./_wks-define')('observable'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/es7.system.global.js b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.system.global.js new file mode 100644 index 00000000..8c2ab82d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/es7.system.global.js @@ -0,0 +1,4 @@ +// https://github.com/ljharb/proposal-global +var $export = require('./_export'); + +$export($export.S, 'System', {global: require('./_global')}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/web.dom.iterable.js b/pitfall/pdfkit/node_modules/core-js/library/modules/web.dom.iterable.js new file mode 100644 index 00000000..e56371a9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/web.dom.iterable.js @@ -0,0 +1,13 @@ +require('./es6.array.iterator'); +var global = require('./_global') + , hide = require('./_hide') + , Iterators = require('./_iterators') + , TO_STRING_TAG = require('./_wks')('toStringTag'); + +for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){ + var NAME = collections[i] + , Collection = global[NAME] + , proto = Collection && Collection.prototype; + if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; +} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/web.immediate.js b/pitfall/pdfkit/node_modules/core-js/library/modules/web.immediate.js new file mode 100644 index 00000000..5b946377 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/web.immediate.js @@ -0,0 +1,6 @@ +var $export = require('./_export') + , $task = require('./_task'); +$export($export.G + $export.B, { + setImmediate: $task.set, + clearImmediate: $task.clear +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/modules/web.timers.js b/pitfall/pdfkit/node_modules/core-js/library/modules/web.timers.js new file mode 100644 index 00000000..1a1da57f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/modules/web.timers.js @@ -0,0 +1,20 @@ +// ie9- setTimeout & setInterval additional parameters fix +var global = require('./_global') + , $export = require('./_export') + , invoke = require('./_invoke') + , partial = require('./_partial') + , navigator = global.navigator + , MSIE = !!navigator && /MSIE .\./.test(navigator.userAgent); // <- dirty ie9- check +var wrap = function(set){ + return MSIE ? function(fn, time /*, ...args */){ + return set(invoke( + partial, + [].slice.call(arguments, 2), + typeof fn == 'function' ? fn : Function(fn) + ), time); + } : set; +}; +$export($export.G + $export.B + $export.F * MSIE, { + setTimeout: wrap(global.setTimeout), + setInterval: wrap(global.setInterval) +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/shim.js b/pitfall/pdfkit/node_modules/core-js/library/shim.js new file mode 100644 index 00000000..6db12568 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/shim.js @@ -0,0 +1,176 @@ +require('./modules/es6.symbol'); +require('./modules/es6.object.create'); +require('./modules/es6.object.define-property'); +require('./modules/es6.object.define-properties'); +require('./modules/es6.object.get-own-property-descriptor'); +require('./modules/es6.object.get-prototype-of'); +require('./modules/es6.object.keys'); +require('./modules/es6.object.get-own-property-names'); +require('./modules/es6.object.freeze'); +require('./modules/es6.object.seal'); +require('./modules/es6.object.prevent-extensions'); +require('./modules/es6.object.is-frozen'); +require('./modules/es6.object.is-sealed'); +require('./modules/es6.object.is-extensible'); +require('./modules/es6.object.assign'); +require('./modules/es6.object.is'); +require('./modules/es6.object.set-prototype-of'); +require('./modules/es6.object.to-string'); +require('./modules/es6.function.bind'); +require('./modules/es6.function.name'); +require('./modules/es6.function.has-instance'); +require('./modules/es6.parse-int'); +require('./modules/es6.parse-float'); +require('./modules/es6.number.constructor'); +require('./modules/es6.number.to-fixed'); +require('./modules/es6.number.to-precision'); +require('./modules/es6.number.epsilon'); +require('./modules/es6.number.is-finite'); +require('./modules/es6.number.is-integer'); +require('./modules/es6.number.is-nan'); +require('./modules/es6.number.is-safe-integer'); +require('./modules/es6.number.max-safe-integer'); +require('./modules/es6.number.min-safe-integer'); +require('./modules/es6.number.parse-float'); +require('./modules/es6.number.parse-int'); +require('./modules/es6.math.acosh'); +require('./modules/es6.math.asinh'); +require('./modules/es6.math.atanh'); +require('./modules/es6.math.cbrt'); +require('./modules/es6.math.clz32'); +require('./modules/es6.math.cosh'); +require('./modules/es6.math.expm1'); +require('./modules/es6.math.fround'); +require('./modules/es6.math.hypot'); +require('./modules/es6.math.imul'); +require('./modules/es6.math.log10'); +require('./modules/es6.math.log1p'); +require('./modules/es6.math.log2'); +require('./modules/es6.math.sign'); +require('./modules/es6.math.sinh'); +require('./modules/es6.math.tanh'); +require('./modules/es6.math.trunc'); +require('./modules/es6.string.from-code-point'); +require('./modules/es6.string.raw'); +require('./modules/es6.string.trim'); +require('./modules/es6.string.iterator'); +require('./modules/es6.string.code-point-at'); +require('./modules/es6.string.ends-with'); +require('./modules/es6.string.includes'); +require('./modules/es6.string.repeat'); +require('./modules/es6.string.starts-with'); +require('./modules/es6.string.anchor'); +require('./modules/es6.string.big'); +require('./modules/es6.string.blink'); +require('./modules/es6.string.bold'); +require('./modules/es6.string.fixed'); +require('./modules/es6.string.fontcolor'); +require('./modules/es6.string.fontsize'); +require('./modules/es6.string.italics'); +require('./modules/es6.string.link'); +require('./modules/es6.string.small'); +require('./modules/es6.string.strike'); +require('./modules/es6.string.sub'); +require('./modules/es6.string.sup'); +require('./modules/es6.date.now'); +require('./modules/es6.date.to-json'); +require('./modules/es6.date.to-iso-string'); +require('./modules/es6.date.to-string'); +require('./modules/es6.date.to-primitive'); +require('./modules/es6.array.is-array'); +require('./modules/es6.array.from'); +require('./modules/es6.array.of'); +require('./modules/es6.array.join'); +require('./modules/es6.array.slice'); +require('./modules/es6.array.sort'); +require('./modules/es6.array.for-each'); +require('./modules/es6.array.map'); +require('./modules/es6.array.filter'); +require('./modules/es6.array.some'); +require('./modules/es6.array.every'); +require('./modules/es6.array.reduce'); +require('./modules/es6.array.reduce-right'); +require('./modules/es6.array.index-of'); +require('./modules/es6.array.last-index-of'); +require('./modules/es6.array.copy-within'); +require('./modules/es6.array.fill'); +require('./modules/es6.array.find'); +require('./modules/es6.array.find-index'); +require('./modules/es6.array.species'); +require('./modules/es6.array.iterator'); +require('./modules/es6.regexp.constructor'); +require('./modules/es6.regexp.to-string'); +require('./modules/es6.regexp.flags'); +require('./modules/es6.regexp.match'); +require('./modules/es6.regexp.replace'); +require('./modules/es6.regexp.search'); +require('./modules/es6.regexp.split'); +require('./modules/es6.promise'); +require('./modules/es6.map'); +require('./modules/es6.set'); +require('./modules/es6.weak-map'); +require('./modules/es6.weak-set'); +require('./modules/es6.typed.array-buffer'); +require('./modules/es6.typed.data-view'); +require('./modules/es6.typed.int8-array'); +require('./modules/es6.typed.uint8-array'); +require('./modules/es6.typed.uint8-clamped-array'); +require('./modules/es6.typed.int16-array'); +require('./modules/es6.typed.uint16-array'); +require('./modules/es6.typed.int32-array'); +require('./modules/es6.typed.uint32-array'); +require('./modules/es6.typed.float32-array'); +require('./modules/es6.typed.float64-array'); +require('./modules/es6.reflect.apply'); +require('./modules/es6.reflect.construct'); +require('./modules/es6.reflect.define-property'); +require('./modules/es6.reflect.delete-property'); +require('./modules/es6.reflect.enumerate'); +require('./modules/es6.reflect.get'); +require('./modules/es6.reflect.get-own-property-descriptor'); +require('./modules/es6.reflect.get-prototype-of'); +require('./modules/es6.reflect.has'); +require('./modules/es6.reflect.is-extensible'); +require('./modules/es6.reflect.own-keys'); +require('./modules/es6.reflect.prevent-extensions'); +require('./modules/es6.reflect.set'); +require('./modules/es6.reflect.set-prototype-of'); +require('./modules/es7.array.includes'); +require('./modules/es7.string.at'); +require('./modules/es7.string.pad-start'); +require('./modules/es7.string.pad-end'); +require('./modules/es7.string.trim-left'); +require('./modules/es7.string.trim-right'); +require('./modules/es7.string.match-all'); +require('./modules/es7.symbol.async-iterator'); +require('./modules/es7.symbol.observable'); +require('./modules/es7.object.get-own-property-descriptors'); +require('./modules/es7.object.values'); +require('./modules/es7.object.entries'); +require('./modules/es7.object.define-getter'); +require('./modules/es7.object.define-setter'); +require('./modules/es7.object.lookup-getter'); +require('./modules/es7.object.lookup-setter'); +require('./modules/es7.map.to-json'); +require('./modules/es7.set.to-json'); +require('./modules/es7.system.global'); +require('./modules/es7.error.is-error'); +require('./modules/es7.math.iaddh'); +require('./modules/es7.math.isubh'); +require('./modules/es7.math.imulh'); +require('./modules/es7.math.umulh'); +require('./modules/es7.reflect.define-metadata'); +require('./modules/es7.reflect.delete-metadata'); +require('./modules/es7.reflect.get-metadata'); +require('./modules/es7.reflect.get-metadata-keys'); +require('./modules/es7.reflect.get-own-metadata'); +require('./modules/es7.reflect.get-own-metadata-keys'); +require('./modules/es7.reflect.has-metadata'); +require('./modules/es7.reflect.has-own-metadata'); +require('./modules/es7.reflect.metadata'); +require('./modules/es7.asap'); +require('./modules/es7.observable'); +require('./modules/web.timers'); +require('./modules/web.immediate'); +require('./modules/web.dom.iterable'); +module.exports = require('./modules/_core'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/stage/0.js b/pitfall/pdfkit/node_modules/core-js/library/stage/0.js new file mode 100644 index 00000000..e89a005f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/stage/0.js @@ -0,0 +1,10 @@ +require('../modules/es7.string.at'); +require('../modules/es7.map.to-json'); +require('../modules/es7.set.to-json'); +require('../modules/es7.error.is-error'); +require('../modules/es7.math.iaddh'); +require('../modules/es7.math.isubh'); +require('../modules/es7.math.imulh'); +require('../modules/es7.math.umulh'); +require('../modules/es7.asap'); +module.exports = require('./1'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/stage/1.js b/pitfall/pdfkit/node_modules/core-js/library/stage/1.js new file mode 100644 index 00000000..230fe13a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/stage/1.js @@ -0,0 +1,6 @@ +require('../modules/es7.string.trim-left'); +require('../modules/es7.string.trim-right'); +require('../modules/es7.string.match-all'); +require('../modules/es7.symbol.observable'); +require('../modules/es7.observable'); +module.exports = require('./2'); diff --git a/pitfall/pdfkit/node_modules/core-js/library/stage/2.js b/pitfall/pdfkit/node_modules/core-js/library/stage/2.js new file mode 100644 index 00000000..ba444e1a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/stage/2.js @@ -0,0 +1,3 @@ +require('../modules/es7.system.global'); +require('../modules/es7.symbol.async-iterator'); +module.exports = require('./3'); diff --git a/pitfall/pdfkit/node_modules/core-js/library/stage/3.js b/pitfall/pdfkit/node_modules/core-js/library/stage/3.js new file mode 100644 index 00000000..c1ea400a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/stage/3.js @@ -0,0 +1,4 @@ +require('../modules/es7.object.get-own-property-descriptors'); +require('../modules/es7.string.pad-start'); +require('../modules/es7.string.pad-end'); +module.exports = require('./4'); diff --git a/pitfall/pdfkit/node_modules/core-js/library/stage/4.js b/pitfall/pdfkit/node_modules/core-js/library/stage/4.js new file mode 100644 index 00000000..0fb53ddd --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/stage/4.js @@ -0,0 +1,8 @@ +require('../modules/es7.object.define-getter'); +require('../modules/es7.object.define-setter'); +require('../modules/es7.object.lookup-getter'); +require('../modules/es7.object.lookup-setter'); +require('../modules/es7.object.values'); +require('../modules/es7.object.entries'); +require('../modules/es7.array.includes'); +module.exports = require('../modules/_core'); diff --git a/pitfall/pdfkit/node_modules/core-js/library/stage/index.js b/pitfall/pdfkit/node_modules/core-js/library/stage/index.js new file mode 100644 index 00000000..eb959140 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/stage/index.js @@ -0,0 +1 @@ +module.exports = require('./pre'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/stage/pre.js b/pitfall/pdfkit/node_modules/core-js/library/stage/pre.js new file mode 100644 index 00000000..f3bc54d9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/stage/pre.js @@ -0,0 +1,10 @@ +require('../modules/es7.reflect.define-metadata'); +require('../modules/es7.reflect.delete-metadata'); +require('../modules/es7.reflect.get-metadata'); +require('../modules/es7.reflect.get-metadata-keys'); +require('../modules/es7.reflect.get-own-metadata'); +require('../modules/es7.reflect.get-own-metadata-keys'); +require('../modules/es7.reflect.has-metadata'); +require('../modules/es7.reflect.has-own-metadata'); +require('../modules/es7.reflect.metadata'); +module.exports = require('./0'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/web/dom-collections.js b/pitfall/pdfkit/node_modules/core-js/library/web/dom-collections.js new file mode 100644 index 00000000..2118e3fe --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/web/dom-collections.js @@ -0,0 +1,2 @@ +require('../modules/web.dom.iterable'); +module.exports = require('../modules/_core'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/web/immediate.js b/pitfall/pdfkit/node_modules/core-js/library/web/immediate.js new file mode 100644 index 00000000..244ebb16 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/web/immediate.js @@ -0,0 +1,2 @@ +require('../modules/web.immediate'); +module.exports = require('../modules/_core'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/web/index.js b/pitfall/pdfkit/node_modules/core-js/library/web/index.js new file mode 100644 index 00000000..6687d571 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/web/index.js @@ -0,0 +1,4 @@ +require('../modules/web.timers'); +require('../modules/web.immediate'); +require('../modules/web.dom.iterable'); +module.exports = require('../modules/_core'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/library/web/timers.js b/pitfall/pdfkit/node_modules/core-js/library/web/timers.js new file mode 100644 index 00000000..2c66f438 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/library/web/timers.js @@ -0,0 +1,2 @@ +require('../modules/web.timers'); +module.exports = require('../modules/_core'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_a-function.js b/pitfall/pdfkit/node_modules/core-js/modules/_a-function.js new file mode 100644 index 00000000..8c35f451 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_a-function.js @@ -0,0 +1,4 @@ +module.exports = function(it){ + if(typeof it != 'function')throw TypeError(it + ' is not a function!'); + return it; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_a-number-value.js b/pitfall/pdfkit/node_modules/core-js/modules/_a-number-value.js new file mode 100644 index 00000000..7bcbd7b7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_a-number-value.js @@ -0,0 +1,5 @@ +var cof = require('./_cof'); +module.exports = function(it, msg){ + if(typeof it != 'number' && cof(it) != 'Number')throw TypeError(msg); + return +it; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_add-to-unscopables.js b/pitfall/pdfkit/node_modules/core-js/modules/_add-to-unscopables.js new file mode 100644 index 00000000..0a74baea --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_add-to-unscopables.js @@ -0,0 +1,7 @@ +// 22.1.3.31 Array.prototype[@@unscopables] +var UNSCOPABLES = require('./_wks')('unscopables') + , ArrayProto = Array.prototype; +if(ArrayProto[UNSCOPABLES] == undefined)require('./_hide')(ArrayProto, UNSCOPABLES, {}); +module.exports = function(key){ + ArrayProto[UNSCOPABLES][key] = true; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_an-instance.js b/pitfall/pdfkit/node_modules/core-js/modules/_an-instance.js new file mode 100644 index 00000000..e4dfad3d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_an-instance.js @@ -0,0 +1,5 @@ +module.exports = function(it, Constructor, name, forbiddenField){ + if(!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)){ + throw TypeError(name + ': incorrect invocation!'); + } return it; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_an-object.js b/pitfall/pdfkit/node_modules/core-js/modules/_an-object.js new file mode 100644 index 00000000..59a8a3a3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_an-object.js @@ -0,0 +1,5 @@ +var isObject = require('./_is-object'); +module.exports = function(it){ + if(!isObject(it))throw TypeError(it + ' is not an object!'); + return it; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_array-copy-within.js b/pitfall/pdfkit/node_modules/core-js/modules/_array-copy-within.js new file mode 100644 index 00000000..d901a32f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_array-copy-within.js @@ -0,0 +1,26 @@ +// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) +'use strict'; +var toObject = require('./_to-object') + , toIndex = require('./_to-index') + , toLength = require('./_to-length'); + +module.exports = [].copyWithin || function copyWithin(target/*= 0*/, start/*= 0, end = @length*/){ + var O = toObject(this) + , len = toLength(O.length) + , to = toIndex(target, len) + , from = toIndex(start, len) + , end = arguments.length > 2 ? arguments[2] : undefined + , count = Math.min((end === undefined ? len : toIndex(end, len)) - from, len - to) + , inc = 1; + if(from < to && to < from + count){ + inc = -1; + from += count - 1; + to += count - 1; + } + while(count-- > 0){ + if(from in O)O[to] = O[from]; + else delete O[to]; + to += inc; + from += inc; + } return O; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_array-fill.js b/pitfall/pdfkit/node_modules/core-js/modules/_array-fill.js new file mode 100644 index 00000000..b21bb7ed --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_array-fill.js @@ -0,0 +1,15 @@ +// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) +'use strict'; +var toObject = require('./_to-object') + , toIndex = require('./_to-index') + , toLength = require('./_to-length'); +module.exports = function fill(value /*, start = 0, end = @length */){ + var O = toObject(this) + , length = toLength(O.length) + , aLen = arguments.length + , index = toIndex(aLen > 1 ? arguments[1] : undefined, length) + , end = aLen > 2 ? arguments[2] : undefined + , endPos = end === undefined ? length : toIndex(end, length); + while(endPos > index)O[index++] = value; + return O; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_array-from-iterable.js b/pitfall/pdfkit/node_modules/core-js/modules/_array-from-iterable.js new file mode 100644 index 00000000..b5c454fb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_array-from-iterable.js @@ -0,0 +1,7 @@ +var forOf = require('./_for-of'); + +module.exports = function(iter, ITERATOR){ + var result = []; + forOf(iter, false, result.push, result, ITERATOR); + return result; +}; diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_array-includes.js b/pitfall/pdfkit/node_modules/core-js/modules/_array-includes.js new file mode 100644 index 00000000..c70b064d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_array-includes.js @@ -0,0 +1,21 @@ +// false -> Array#indexOf +// true -> Array#includes +var toIObject = require('./_to-iobject') + , toLength = require('./_to-length') + , toIndex = require('./_to-index'); +module.exports = function(IS_INCLUDES){ + return function($this, el, fromIndex){ + var O = toIObject($this) + , length = toLength(O.length) + , index = toIndex(fromIndex, length) + , value; + // Array#includes uses SameValueZero equality algorithm + if(IS_INCLUDES && el != el)while(length > index){ + value = O[index++]; + if(value != value)return true; + // Array#toIndex ignores holes, Array#includes - not + } else for(;length > index; index++)if(IS_INCLUDES || index in O){ + if(O[index] === el)return IS_INCLUDES || index || 0; + } return !IS_INCLUDES && -1; + }; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_array-methods.js b/pitfall/pdfkit/node_modules/core-js/modules/_array-methods.js new file mode 100644 index 00000000..8ffbe116 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_array-methods.js @@ -0,0 +1,44 @@ +// 0 -> Array#forEach +// 1 -> Array#map +// 2 -> Array#filter +// 3 -> Array#some +// 4 -> Array#every +// 5 -> Array#find +// 6 -> Array#findIndex +var ctx = require('./_ctx') + , IObject = require('./_iobject') + , toObject = require('./_to-object') + , toLength = require('./_to-length') + , asc = require('./_array-species-create'); +module.exports = function(TYPE, $create){ + var IS_MAP = TYPE == 1 + , IS_FILTER = TYPE == 2 + , IS_SOME = TYPE == 3 + , IS_EVERY = TYPE == 4 + , IS_FIND_INDEX = TYPE == 6 + , NO_HOLES = TYPE == 5 || IS_FIND_INDEX + , create = $create || asc; + return function($this, callbackfn, that){ + var O = toObject($this) + , self = IObject(O) + , f = ctx(callbackfn, that, 3) + , length = toLength(self.length) + , index = 0 + , result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined + , val, res; + for(;length > index; index++)if(NO_HOLES || index in self){ + val = self[index]; + res = f(val, index, O); + if(TYPE){ + if(IS_MAP)result[index] = res; // map + else if(res)switch(TYPE){ + case 3: return true; // some + case 5: return val; // find + case 6: return index; // findIndex + case 2: result.push(val); // filter + } else if(IS_EVERY)return false; // every + } + } + return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; + }; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_array-reduce.js b/pitfall/pdfkit/node_modules/core-js/modules/_array-reduce.js new file mode 100644 index 00000000..c807d544 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_array-reduce.js @@ -0,0 +1,28 @@ +var aFunction = require('./_a-function') + , toObject = require('./_to-object') + , IObject = require('./_iobject') + , toLength = require('./_to-length'); + +module.exports = function(that, callbackfn, aLen, memo, isRight){ + aFunction(callbackfn); + var O = toObject(that) + , self = IObject(O) + , length = toLength(O.length) + , index = isRight ? length - 1 : 0 + , i = isRight ? -1 : 1; + if(aLen < 2)for(;;){ + if(index in self){ + memo = self[index]; + index += i; + break; + } + index += i; + if(isRight ? index < 0 : length <= index){ + throw TypeError('Reduce of empty array with no initial value'); + } + } + for(;isRight ? index >= 0 : length > index; index += i)if(index in self){ + memo = callbackfn(memo, self[index], index, O); + } + return memo; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_array-species-constructor.js b/pitfall/pdfkit/node_modules/core-js/modules/_array-species-constructor.js new file mode 100644 index 00000000..a715389f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_array-species-constructor.js @@ -0,0 +1,16 @@ +var isObject = require('./_is-object') + , isArray = require('./_is-array') + , SPECIES = require('./_wks')('species'); + +module.exports = function(original){ + var C; + if(isArray(original)){ + C = original.constructor; + // cross-realm fallback + if(typeof C == 'function' && (C === Array || isArray(C.prototype)))C = undefined; + if(isObject(C)){ + C = C[SPECIES]; + if(C === null)C = undefined; + } + } return C === undefined ? Array : C; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_array-species-create.js b/pitfall/pdfkit/node_modules/core-js/modules/_array-species-create.js new file mode 100644 index 00000000..cbd18bc6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_array-species-create.js @@ -0,0 +1,6 @@ +// 9.4.2.3 ArraySpeciesCreate(originalArray, length) +var speciesConstructor = require('./_array-species-constructor'); + +module.exports = function(original, length){ + return new (speciesConstructor(original))(length); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_bind.js b/pitfall/pdfkit/node_modules/core-js/modules/_bind.js new file mode 100644 index 00000000..1f7b0174 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_bind.js @@ -0,0 +1,24 @@ +'use strict'; +var aFunction = require('./_a-function') + , isObject = require('./_is-object') + , invoke = require('./_invoke') + , arraySlice = [].slice + , factories = {}; + +var construct = function(F, len, args){ + if(!(len in factories)){ + for(var n = [], i = 0; i < len; i++)n[i] = 'a[' + i + ']'; + factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); + } return factories[len](F, args); +}; + +module.exports = Function.bind || function bind(that /*, args... */){ + var fn = aFunction(this) + , partArgs = arraySlice.call(arguments, 1); + var bound = function(/* args... */){ + var args = partArgs.concat(arraySlice.call(arguments)); + return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that); + }; + if(isObject(fn.prototype))bound.prototype = fn.prototype; + return bound; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_classof.js b/pitfall/pdfkit/node_modules/core-js/modules/_classof.js new file mode 100644 index 00000000..dab3a80f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_classof.js @@ -0,0 +1,23 @@ +// getting tag from 19.1.3.6 Object.prototype.toString() +var cof = require('./_cof') + , TAG = require('./_wks')('toStringTag') + // ES3 wrong here + , ARG = cof(function(){ return arguments; }()) == 'Arguments'; + +// fallback for IE11 Script Access Denied error +var tryGet = function(it, key){ + try { + return it[key]; + } catch(e){ /* empty */ } +}; + +module.exports = function(it){ + var O, T, B; + return it === undefined ? 'Undefined' : it === null ? 'Null' + // @@toStringTag case + : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T + // builtinTag case + : ARG ? cof(O) + // ES3 arguments fallback + : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_cof.js b/pitfall/pdfkit/node_modules/core-js/modules/_cof.js new file mode 100644 index 00000000..1dd2779a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_cof.js @@ -0,0 +1,5 @@ +var toString = {}.toString; + +module.exports = function(it){ + return toString.call(it).slice(8, -1); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_collection-strong.js b/pitfall/pdfkit/node_modules/core-js/modules/_collection-strong.js new file mode 100644 index 00000000..55e4b615 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_collection-strong.js @@ -0,0 +1,142 @@ +'use strict'; +var dP = require('./_object-dp').f + , create = require('./_object-create') + , redefineAll = require('./_redefine-all') + , ctx = require('./_ctx') + , anInstance = require('./_an-instance') + , defined = require('./_defined') + , forOf = require('./_for-of') + , $iterDefine = require('./_iter-define') + , step = require('./_iter-step') + , setSpecies = require('./_set-species') + , DESCRIPTORS = require('./_descriptors') + , fastKey = require('./_meta').fastKey + , SIZE = DESCRIPTORS ? '_s' : 'size'; + +var getEntry = function(that, key){ + // fast case + var index = fastKey(key), entry; + if(index !== 'F')return that._i[index]; + // frozen object case + for(entry = that._f; entry; entry = entry.n){ + if(entry.k == key)return entry; + } +}; + +module.exports = { + getConstructor: function(wrapper, NAME, IS_MAP, ADDER){ + var C = wrapper(function(that, iterable){ + anInstance(that, C, NAME, '_i'); + that._i = create(null); // index + that._f = undefined; // first entry + that._l = undefined; // last entry + that[SIZE] = 0; // size + if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.1.3.1 Map.prototype.clear() + // 23.2.3.2 Set.prototype.clear() + clear: function clear(){ + for(var that = this, data = that._i, entry = that._f; entry; entry = entry.n){ + entry.r = true; + if(entry.p)entry.p = entry.p.n = undefined; + delete data[entry.i]; + } + that._f = that._l = undefined; + that[SIZE] = 0; + }, + // 23.1.3.3 Map.prototype.delete(key) + // 23.2.3.4 Set.prototype.delete(value) + 'delete': function(key){ + var that = this + , entry = getEntry(that, key); + if(entry){ + var next = entry.n + , prev = entry.p; + delete that._i[entry.i]; + entry.r = true; + if(prev)prev.n = next; + if(next)next.p = prev; + if(that._f == entry)that._f = next; + if(that._l == entry)that._l = prev; + that[SIZE]--; + } return !!entry; + }, + // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) + // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) + forEach: function forEach(callbackfn /*, that = undefined */){ + anInstance(this, C, 'forEach'); + var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3) + , entry; + while(entry = entry ? entry.n : this._f){ + f(entry.v, entry.k, this); + // revert to the last existing entry + while(entry && entry.r)entry = entry.p; + } + }, + // 23.1.3.7 Map.prototype.has(key) + // 23.2.3.7 Set.prototype.has(value) + has: function has(key){ + return !!getEntry(this, key); + } + }); + if(DESCRIPTORS)dP(C.prototype, 'size', { + get: function(){ + return defined(this[SIZE]); + } + }); + return C; + }, + def: function(that, key, value){ + var entry = getEntry(that, key) + , prev, index; + // change existing entry + if(entry){ + entry.v = value; + // create new entry + } else { + that._l = entry = { + i: index = fastKey(key, true), // <- index + k: key, // <- key + v: value, // <- value + p: prev = that._l, // <- previous entry + n: undefined, // <- next entry + r: false // <- removed + }; + if(!that._f)that._f = entry; + if(prev)prev.n = entry; + that[SIZE]++; + // add to index + if(index !== 'F')that._i[index] = entry; + } return that; + }, + getEntry: getEntry, + setStrong: function(C, NAME, IS_MAP){ + // add .keys, .values, .entries, [@@iterator] + // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 + $iterDefine(C, NAME, function(iterated, kind){ + this._t = iterated; // target + this._k = kind; // kind + this._l = undefined; // previous + }, function(){ + var that = this + , kind = that._k + , entry = that._l; + // revert to the last existing entry + while(entry && entry.r)entry = entry.p; + // get next entry + if(!that._t || !(that._l = entry = entry ? entry.n : that._t._f)){ + // or finish the iteration + that._t = undefined; + return step(1); + } + // return step by kind + if(kind == 'keys' )return step(0, entry.k); + if(kind == 'values')return step(0, entry.v); + return step(0, [entry.k, entry.v]); + }, IS_MAP ? 'entries' : 'values' , !IS_MAP, true); + + // add [@@species], 23.1.2.2, 23.2.2.2 + setSpecies(NAME); + } +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_collection-to-json.js b/pitfall/pdfkit/node_modules/core-js/modules/_collection-to-json.js new file mode 100644 index 00000000..ce0282f6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_collection-to-json.js @@ -0,0 +1,9 @@ +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var classof = require('./_classof') + , from = require('./_array-from-iterable'); +module.exports = function(NAME){ + return function toJSON(){ + if(classof(this) != NAME)throw TypeError(NAME + "#toJSON isn't generic"); + return from(this); + }; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_collection-weak.js b/pitfall/pdfkit/node_modules/core-js/modules/_collection-weak.js new file mode 100644 index 00000000..a8597e64 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_collection-weak.js @@ -0,0 +1,83 @@ +'use strict'; +var redefineAll = require('./_redefine-all') + , getWeak = require('./_meta').getWeak + , anObject = require('./_an-object') + , isObject = require('./_is-object') + , anInstance = require('./_an-instance') + , forOf = require('./_for-of') + , createArrayMethod = require('./_array-methods') + , $has = require('./_has') + , arrayFind = createArrayMethod(5) + , arrayFindIndex = createArrayMethod(6) + , id = 0; + +// fallback for uncaught frozen keys +var uncaughtFrozenStore = function(that){ + return that._l || (that._l = new UncaughtFrozenStore); +}; +var UncaughtFrozenStore = function(){ + this.a = []; +}; +var findUncaughtFrozen = function(store, key){ + return arrayFind(store.a, function(it){ + return it[0] === key; + }); +}; +UncaughtFrozenStore.prototype = { + get: function(key){ + var entry = findUncaughtFrozen(this, key); + if(entry)return entry[1]; + }, + has: function(key){ + return !!findUncaughtFrozen(this, key); + }, + set: function(key, value){ + var entry = findUncaughtFrozen(this, key); + if(entry)entry[1] = value; + else this.a.push([key, value]); + }, + 'delete': function(key){ + var index = arrayFindIndex(this.a, function(it){ + return it[0] === key; + }); + if(~index)this.a.splice(index, 1); + return !!~index; + } +}; + +module.exports = { + getConstructor: function(wrapper, NAME, IS_MAP, ADDER){ + var C = wrapper(function(that, iterable){ + anInstance(that, C, NAME, '_i'); + that._i = id++; // collection id + that._l = undefined; // leak store for uncaught frozen objects + if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); + }); + redefineAll(C.prototype, { + // 23.3.3.2 WeakMap.prototype.delete(key) + // 23.4.3.3 WeakSet.prototype.delete(value) + 'delete': function(key){ + if(!isObject(key))return false; + var data = getWeak(key); + if(data === true)return uncaughtFrozenStore(this)['delete'](key); + return data && $has(data, this._i) && delete data[this._i]; + }, + // 23.3.3.4 WeakMap.prototype.has(key) + // 23.4.3.4 WeakSet.prototype.has(value) + has: function has(key){ + if(!isObject(key))return false; + var data = getWeak(key); + if(data === true)return uncaughtFrozenStore(this).has(key); + return data && $has(data, this._i); + } + }); + return C; + }, + def: function(that, key, value){ + var data = getWeak(anObject(key), true); + if(data === true)uncaughtFrozenStore(that).set(key, value); + else data[that._i] = value; + return that; + }, + ufstore: uncaughtFrozenStore +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_collection.js b/pitfall/pdfkit/node_modules/core-js/modules/_collection.js new file mode 100644 index 00000000..2b183453 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_collection.js @@ -0,0 +1,85 @@ +'use strict'; +var global = require('./_global') + , $export = require('./_export') + , redefine = require('./_redefine') + , redefineAll = require('./_redefine-all') + , meta = require('./_meta') + , forOf = require('./_for-of') + , anInstance = require('./_an-instance') + , isObject = require('./_is-object') + , fails = require('./_fails') + , $iterDetect = require('./_iter-detect') + , setToStringTag = require('./_set-to-string-tag') + , inheritIfRequired = require('./_inherit-if-required'); + +module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){ + var Base = global[NAME] + , C = Base + , ADDER = IS_MAP ? 'set' : 'add' + , proto = C && C.prototype + , O = {}; + var fixMethod = function(KEY){ + var fn = proto[KEY]; + redefine(proto, KEY, + KEY == 'delete' ? function(a){ + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); + } : KEY == 'has' ? function has(a){ + return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); + } : KEY == 'get' ? function get(a){ + return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a); + } : KEY == 'add' ? function add(a){ fn.call(this, a === 0 ? 0 : a); return this; } + : function set(a, b){ fn.call(this, a === 0 ? 0 : a, b); return this; } + ); + }; + if(typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function(){ + new C().entries().next(); + }))){ + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + redefineAll(C.prototype, methods); + meta.NEED = true; + } else { + var instance = new C + // early implementations not supports chaining + , HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance + // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false + , THROWS_ON_PRIMITIVES = fails(function(){ instance.has(1); }) + // most early implementations doesn't supports iterables, most modern - not close it correctly + , ACCEPT_ITERABLES = $iterDetect(function(iter){ new C(iter); }) // eslint-disable-line no-new + // for early implementations -0 and +0 not the same + , BUGGY_ZERO = !IS_WEAK && fails(function(){ + // V8 ~ Chromium 42- fails only with 5+ elements + var $instance = new C() + , index = 5; + while(index--)$instance[ADDER](index, index); + return !$instance.has(-0); + }); + if(!ACCEPT_ITERABLES){ + C = wrapper(function(target, iterable){ + anInstance(target, C, NAME); + var that = inheritIfRequired(new Base, target, C); + if(iterable != undefined)forOf(iterable, IS_MAP, that[ADDER], that); + return that; + }); + C.prototype = proto; + proto.constructor = C; + } + if(THROWS_ON_PRIMITIVES || BUGGY_ZERO){ + fixMethod('delete'); + fixMethod('has'); + IS_MAP && fixMethod('get'); + } + if(BUGGY_ZERO || HASNT_CHAINING)fixMethod(ADDER); + // weak collections should not contains .clear method + if(IS_WEAK && proto.clear)delete proto.clear; + } + + setToStringTag(C, NAME); + + O[NAME] = C; + $export($export.G + $export.W + $export.F * (C != Base), O); + + if(!IS_WEAK)common.setStrong(C, NAME, IS_MAP); + + return C; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_core.js b/pitfall/pdfkit/node_modules/core-js/modules/_core.js new file mode 100644 index 00000000..23d6aede --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_core.js @@ -0,0 +1,2 @@ +var core = module.exports = {version: '2.4.0'}; +if(typeof __e == 'number')__e = core; // eslint-disable-line no-undef \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_create-property.js b/pitfall/pdfkit/node_modules/core-js/modules/_create-property.js new file mode 100644 index 00000000..3d1bf730 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_create-property.js @@ -0,0 +1,8 @@ +'use strict'; +var $defineProperty = require('./_object-dp') + , createDesc = require('./_property-desc'); + +module.exports = function(object, index, value){ + if(index in object)$defineProperty.f(object, index, createDesc(0, value)); + else object[index] = value; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_ctx.js b/pitfall/pdfkit/node_modules/core-js/modules/_ctx.js new file mode 100644 index 00000000..b52d85ff --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_ctx.js @@ -0,0 +1,20 @@ +// optional / simple context binding +var aFunction = require('./_a-function'); +module.exports = function(fn, that, length){ + aFunction(fn); + if(that === undefined)return fn; + switch(length){ + case 1: return function(a){ + return fn.call(that, a); + }; + case 2: return function(a, b){ + return fn.call(that, a, b); + }; + case 3: return function(a, b, c){ + return fn.call(that, a, b, c); + }; + } + return function(/* ...args */){ + return fn.apply(that, arguments); + }; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_date-to-primitive.js b/pitfall/pdfkit/node_modules/core-js/modules/_date-to-primitive.js new file mode 100644 index 00000000..561079a1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_date-to-primitive.js @@ -0,0 +1,9 @@ +'use strict'; +var anObject = require('./_an-object') + , toPrimitive = require('./_to-primitive') + , NUMBER = 'number'; + +module.exports = function(hint){ + if(hint !== 'string' && hint !== NUMBER && hint !== 'default')throw TypeError('Incorrect hint'); + return toPrimitive(anObject(this), hint != NUMBER); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_defined.js b/pitfall/pdfkit/node_modules/core-js/modules/_defined.js new file mode 100644 index 00000000..cfa476b9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_defined.js @@ -0,0 +1,5 @@ +// 7.2.1 RequireObjectCoercible(argument) +module.exports = function(it){ + if(it == undefined)throw TypeError("Can't call method on " + it); + return it; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_descriptors.js b/pitfall/pdfkit/node_modules/core-js/modules/_descriptors.js new file mode 100644 index 00000000..6ccb7ee2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_descriptors.js @@ -0,0 +1,4 @@ +// Thank's IE8 for his funny defineProperty +module.exports = !require('./_fails')(function(){ + return Object.defineProperty({}, 'a', {get: function(){ return 7; }}).a != 7; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_dom-create.js b/pitfall/pdfkit/node_modules/core-js/modules/_dom-create.js new file mode 100644 index 00000000..909b5ff0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_dom-create.js @@ -0,0 +1,7 @@ +var isObject = require('./_is-object') + , document = require('./_global').document + // in old IE typeof document.createElement is 'object' + , is = isObject(document) && isObject(document.createElement); +module.exports = function(it){ + return is ? document.createElement(it) : {}; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_entry-virtual.js b/pitfall/pdfkit/node_modules/core-js/modules/_entry-virtual.js new file mode 100644 index 00000000..0ec61272 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_entry-virtual.js @@ -0,0 +1,5 @@ +var core = require('./_core'); +module.exports = function(CONSTRUCTOR){ + var C = core[CONSTRUCTOR]; + return (C.virtual || C.prototype); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_enum-bug-keys.js b/pitfall/pdfkit/node_modules/core-js/modules/_enum-bug-keys.js new file mode 100644 index 00000000..928b9fb0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_enum-bug-keys.js @@ -0,0 +1,4 @@ +// IE 8- don't enum bug keys +module.exports = ( + 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' +).split(','); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_enum-keys.js b/pitfall/pdfkit/node_modules/core-js/modules/_enum-keys.js new file mode 100644 index 00000000..3bf8069c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_enum-keys.js @@ -0,0 +1,15 @@ +// all enumerable object keys, includes symbols +var getKeys = require('./_object-keys') + , gOPS = require('./_object-gops') + , pIE = require('./_object-pie'); +module.exports = function(it){ + var result = getKeys(it) + , getSymbols = gOPS.f; + if(getSymbols){ + var symbols = getSymbols(it) + , isEnum = pIE.f + , i = 0 + , key; + while(symbols.length > i)if(isEnum.call(it, key = symbols[i++]))result.push(key); + } return result; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_export.js b/pitfall/pdfkit/node_modules/core-js/modules/_export.js new file mode 100644 index 00000000..afddf352 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_export.js @@ -0,0 +1,43 @@ +var global = require('./_global') + , core = require('./_core') + , hide = require('./_hide') + , redefine = require('./_redefine') + , ctx = require('./_ctx') + , PROTOTYPE = 'prototype'; + +var $export = function(type, name, source){ + var IS_FORCED = type & $export.F + , IS_GLOBAL = type & $export.G + , IS_STATIC = type & $export.S + , IS_PROTO = type & $export.P + , IS_BIND = type & $export.B + , target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE] + , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) + , expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}) + , key, own, out, exp; + if(IS_GLOBAL)source = name; + for(key in source){ + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + // export native or passed + out = (own ? target : source)[key]; + // bind timers to global for call from export context + exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // extend global + if(target)redefine(target, key, out, type & $export.U); + // export + if(exports[key] != out)hide(exports, key, exp); + if(IS_PROTO && expProto[key] != out)expProto[key] = out; + } +}; +global.core = core; +// type bitmap +$export.F = 1; // forced +$export.G = 2; // global +$export.S = 4; // static +$export.P = 8; // proto +$export.B = 16; // bind +$export.W = 32; // wrap +$export.U = 64; // safe +$export.R = 128; // real proto method for `library` +module.exports = $export; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_fails-is-regexp.js b/pitfall/pdfkit/node_modules/core-js/modules/_fails-is-regexp.js new file mode 100644 index 00000000..130436bf --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_fails-is-regexp.js @@ -0,0 +1,12 @@ +var MATCH = require('./_wks')('match'); +module.exports = function(KEY){ + var re = /./; + try { + '/./'[KEY](re); + } catch(e){ + try { + re[MATCH] = false; + return !'/./'[KEY](re); + } catch(f){ /* empty */ } + } return true; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_fails.js b/pitfall/pdfkit/node_modules/core-js/modules/_fails.js new file mode 100644 index 00000000..184e5ea8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_fails.js @@ -0,0 +1,7 @@ +module.exports = function(exec){ + try { + return !!exec(); + } catch(e){ + return true; + } +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_fix-re-wks.js b/pitfall/pdfkit/node_modules/core-js/modules/_fix-re-wks.js new file mode 100644 index 00000000..d29368ce --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_fix-re-wks.js @@ -0,0 +1,28 @@ +'use strict'; +var hide = require('./_hide') + , redefine = require('./_redefine') + , fails = require('./_fails') + , defined = require('./_defined') + , wks = require('./_wks'); + +module.exports = function(KEY, length, exec){ + var SYMBOL = wks(KEY) + , fns = exec(defined, SYMBOL, ''[KEY]) + , strfn = fns[0] + , rxfn = fns[1]; + if(fails(function(){ + var O = {}; + O[SYMBOL] = function(){ return 7; }; + return ''[KEY](O) != 7; + })){ + redefine(String.prototype, KEY, strfn); + hide(RegExp.prototype, SYMBOL, length == 2 + // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) + // 21.2.5.11 RegExp.prototype[@@split](string, limit) + ? function(string, arg){ return rxfn.call(string, this, arg); } + // 21.2.5.6 RegExp.prototype[@@match](string) + // 21.2.5.9 RegExp.prototype[@@search](string) + : function(string){ return rxfn.call(string, this); } + ); + } +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_flags.js b/pitfall/pdfkit/node_modules/core-js/modules/_flags.js new file mode 100644 index 00000000..054f9088 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_flags.js @@ -0,0 +1,13 @@ +'use strict'; +// 21.2.5.3 get RegExp.prototype.flags +var anObject = require('./_an-object'); +module.exports = function(){ + var that = anObject(this) + , result = ''; + if(that.global) result += 'g'; + if(that.ignoreCase) result += 'i'; + if(that.multiline) result += 'm'; + if(that.unicode) result += 'u'; + if(that.sticky) result += 'y'; + return result; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_for-of.js b/pitfall/pdfkit/node_modules/core-js/modules/_for-of.js new file mode 100644 index 00000000..b4824fef --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_for-of.js @@ -0,0 +1,25 @@ +var ctx = require('./_ctx') + , call = require('./_iter-call') + , isArrayIter = require('./_is-array-iter') + , anObject = require('./_an-object') + , toLength = require('./_to-length') + , getIterFn = require('./core.get-iterator-method') + , BREAK = {} + , RETURN = {}; +var exports = module.exports = function(iterable, entries, fn, that, ITERATOR){ + var iterFn = ITERATOR ? function(){ return iterable; } : getIterFn(iterable) + , f = ctx(fn, that, entries ? 2 : 1) + , index = 0 + , length, step, iterator, result; + if(typeof iterFn != 'function')throw TypeError(iterable + ' is not iterable!'); + // fast case for arrays with default iterator + if(isArrayIter(iterFn))for(length = toLength(iterable.length); length > index; index++){ + result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); + if(result === BREAK || result === RETURN)return result; + } else for(iterator = iterFn.call(iterable); !(step = iterator.next()).done; ){ + result = call(iterator, f, step.value, entries); + if(result === BREAK || result === RETURN)return result; + } +}; +exports.BREAK = BREAK; +exports.RETURN = RETURN; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_global.js b/pitfall/pdfkit/node_modules/core-js/modules/_global.js new file mode 100644 index 00000000..df6efb47 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_global.js @@ -0,0 +1,4 @@ +// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 +var global = module.exports = typeof window != 'undefined' && window.Math == Math + ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')(); +if(typeof __g == 'number')__g = global; // eslint-disable-line no-undef \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_has.js b/pitfall/pdfkit/node_modules/core-js/modules/_has.js new file mode 100644 index 00000000..870b40e7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_has.js @@ -0,0 +1,4 @@ +var hasOwnProperty = {}.hasOwnProperty; +module.exports = function(it, key){ + return hasOwnProperty.call(it, key); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_hide.js b/pitfall/pdfkit/node_modules/core-js/modules/_hide.js new file mode 100644 index 00000000..4031e808 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_hide.js @@ -0,0 +1,8 @@ +var dP = require('./_object-dp') + , createDesc = require('./_property-desc'); +module.exports = require('./_descriptors') ? function(object, key, value){ + return dP.f(object, key, createDesc(1, value)); +} : function(object, key, value){ + object[key] = value; + return object; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_html.js b/pitfall/pdfkit/node_modules/core-js/modules/_html.js new file mode 100644 index 00000000..98f5142c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_html.js @@ -0,0 +1 @@ +module.exports = require('./_global').document && document.documentElement; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_ie8-dom-define.js b/pitfall/pdfkit/node_modules/core-js/modules/_ie8-dom-define.js new file mode 100644 index 00000000..18ffd59d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_ie8-dom-define.js @@ -0,0 +1,3 @@ +module.exports = !require('./_descriptors') && !require('./_fails')(function(){ + return Object.defineProperty(require('./_dom-create')('div'), 'a', {get: function(){ return 7; }}).a != 7; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_inherit-if-required.js b/pitfall/pdfkit/node_modules/core-js/modules/_inherit-if-required.js new file mode 100644 index 00000000..d3948405 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_inherit-if-required.js @@ -0,0 +1,8 @@ +var isObject = require('./_is-object') + , setPrototypeOf = require('./_set-proto').set; +module.exports = function(that, target, C){ + var P, S = target.constructor; + if(S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf){ + setPrototypeOf(that, P); + } return that; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_invoke.js b/pitfall/pdfkit/node_modules/core-js/modules/_invoke.js new file mode 100644 index 00000000..08e307fd --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_invoke.js @@ -0,0 +1,16 @@ +// fast apply, http://jsperf.lnkit.com/fast-apply/5 +module.exports = function(fn, args, that){ + var un = that === undefined; + switch(args.length){ + case 0: return un ? fn() + : fn.call(that); + case 1: return un ? fn(args[0]) + : fn.call(that, args[0]); + case 2: return un ? fn(args[0], args[1]) + : fn.call(that, args[0], args[1]); + case 3: return un ? fn(args[0], args[1], args[2]) + : fn.call(that, args[0], args[1], args[2]); + case 4: return un ? fn(args[0], args[1], args[2], args[3]) + : fn.call(that, args[0], args[1], args[2], args[3]); + } return fn.apply(that, args); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_iobject.js b/pitfall/pdfkit/node_modules/core-js/modules/_iobject.js new file mode 100644 index 00000000..b58db489 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_iobject.js @@ -0,0 +1,5 @@ +// fallback for non-array-like ES3 and non-enumerable old V8 strings +var cof = require('./_cof'); +module.exports = Object('z').propertyIsEnumerable(0) ? Object : function(it){ + return cof(it) == 'String' ? it.split('') : Object(it); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_is-array-iter.js b/pitfall/pdfkit/node_modules/core-js/modules/_is-array-iter.js new file mode 100644 index 00000000..8139d71c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_is-array-iter.js @@ -0,0 +1,8 @@ +// check on default Array iterator +var Iterators = require('./_iterators') + , ITERATOR = require('./_wks')('iterator') + , ArrayProto = Array.prototype; + +module.exports = function(it){ + return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_is-array.js b/pitfall/pdfkit/node_modules/core-js/modules/_is-array.js new file mode 100644 index 00000000..b4a3a8ed --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_is-array.js @@ -0,0 +1,5 @@ +// 7.2.2 IsArray(argument) +var cof = require('./_cof'); +module.exports = Array.isArray || function isArray(arg){ + return cof(arg) == 'Array'; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_is-integer.js b/pitfall/pdfkit/node_modules/core-js/modules/_is-integer.js new file mode 100644 index 00000000..22db67ed --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_is-integer.js @@ -0,0 +1,6 @@ +// 20.1.2.3 Number.isInteger(number) +var isObject = require('./_is-object') + , floor = Math.floor; +module.exports = function isInteger(it){ + return !isObject(it) && isFinite(it) && floor(it) === it; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_is-object.js b/pitfall/pdfkit/node_modules/core-js/modules/_is-object.js new file mode 100644 index 00000000..ee694be2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_is-object.js @@ -0,0 +1,3 @@ +module.exports = function(it){ + return typeof it === 'object' ? it !== null : typeof it === 'function'; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_is-regexp.js b/pitfall/pdfkit/node_modules/core-js/modules/_is-regexp.js new file mode 100644 index 00000000..55b2c629 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_is-regexp.js @@ -0,0 +1,8 @@ +// 7.2.8 IsRegExp(argument) +var isObject = require('./_is-object') + , cof = require('./_cof') + , MATCH = require('./_wks')('match'); +module.exports = function(it){ + var isRegExp; + return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_iter-call.js b/pitfall/pdfkit/node_modules/core-js/modules/_iter-call.js new file mode 100644 index 00000000..e3565ba9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_iter-call.js @@ -0,0 +1,12 @@ +// call something on iterator step with safe closing on error +var anObject = require('./_an-object'); +module.exports = function(iterator, fn, value, entries){ + try { + return entries ? fn(anObject(value)[0], value[1]) : fn(value); + // 7.4.6 IteratorClose(iterator, completion) + } catch(e){ + var ret = iterator['return']; + if(ret !== undefined)anObject(ret.call(iterator)); + throw e; + } +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_iter-create.js b/pitfall/pdfkit/node_modules/core-js/modules/_iter-create.js new file mode 100644 index 00000000..9a9aa4fb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_iter-create.js @@ -0,0 +1,13 @@ +'use strict'; +var create = require('./_object-create') + , descriptor = require('./_property-desc') + , setToStringTag = require('./_set-to-string-tag') + , IteratorPrototype = {}; + +// 25.1.2.1.1 %IteratorPrototype%[@@iterator]() +require('./_hide')(IteratorPrototype, require('./_wks')('iterator'), function(){ return this; }); + +module.exports = function(Constructor, NAME, next){ + Constructor.prototype = create(IteratorPrototype, {next: descriptor(1, next)}); + setToStringTag(Constructor, NAME + ' Iterator'); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_iter-define.js b/pitfall/pdfkit/node_modules/core-js/modules/_iter-define.js new file mode 100644 index 00000000..f72a5021 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_iter-define.js @@ -0,0 +1,70 @@ +'use strict'; +var LIBRARY = require('./_library') + , $export = require('./_export') + , redefine = require('./_redefine') + , hide = require('./_hide') + , has = require('./_has') + , Iterators = require('./_iterators') + , $iterCreate = require('./_iter-create') + , setToStringTag = require('./_set-to-string-tag') + , getPrototypeOf = require('./_object-gpo') + , ITERATOR = require('./_wks')('iterator') + , BUGGY = !([].keys && 'next' in [].keys()) // Safari has buggy iterators w/o `next` + , FF_ITERATOR = '@@iterator' + , KEYS = 'keys' + , VALUES = 'values'; + +var returnThis = function(){ return this; }; + +module.exports = function(Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED){ + $iterCreate(Constructor, NAME, next); + var getMethod = function(kind){ + if(!BUGGY && kind in proto)return proto[kind]; + switch(kind){ + case KEYS: return function keys(){ return new Constructor(this, kind); }; + case VALUES: return function values(){ return new Constructor(this, kind); }; + } return function entries(){ return new Constructor(this, kind); }; + }; + var TAG = NAME + ' Iterator' + , DEF_VALUES = DEFAULT == VALUES + , VALUES_BUG = false + , proto = Base.prototype + , $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT] + , $default = $native || getMethod(DEFAULT) + , $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined + , $anyNative = NAME == 'Array' ? proto.entries || $native : $native + , methods, key, IteratorPrototype; + // Fix native + if($anyNative){ + IteratorPrototype = getPrototypeOf($anyNative.call(new Base)); + if(IteratorPrototype !== Object.prototype){ + // Set @@toStringTag to native iterators + setToStringTag(IteratorPrototype, TAG, true); + // fix for some old engines + if(!LIBRARY && !has(IteratorPrototype, ITERATOR))hide(IteratorPrototype, ITERATOR, returnThis); + } + } + // fix Array#{values, @@iterator}.name in V8 / FF + if(DEF_VALUES && $native && $native.name !== VALUES){ + VALUES_BUG = true; + $default = function values(){ return $native.call(this); }; + } + // Define iterator + if((!LIBRARY || FORCED) && (BUGGY || VALUES_BUG || !proto[ITERATOR])){ + hide(proto, ITERATOR, $default); + } + // Plug for library + Iterators[NAME] = $default; + Iterators[TAG] = returnThis; + if(DEFAULT){ + methods = { + values: DEF_VALUES ? $default : getMethod(VALUES), + keys: IS_SET ? $default : getMethod(KEYS), + entries: $entries + }; + if(FORCED)for(key in methods){ + if(!(key in proto))redefine(proto, key, methods[key]); + } else $export($export.P + $export.F * (BUGGY || VALUES_BUG), NAME, methods); + } + return methods; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_iter-detect.js b/pitfall/pdfkit/node_modules/core-js/modules/_iter-detect.js new file mode 100644 index 00000000..87c7aecf --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_iter-detect.js @@ -0,0 +1,21 @@ +var ITERATOR = require('./_wks')('iterator') + , SAFE_CLOSING = false; + +try { + var riter = [7][ITERATOR](); + riter['return'] = function(){ SAFE_CLOSING = true; }; + Array.from(riter, function(){ throw 2; }); +} catch(e){ /* empty */ } + +module.exports = function(exec, skipClosing){ + if(!skipClosing && !SAFE_CLOSING)return false; + var safe = false; + try { + var arr = [7] + , iter = arr[ITERATOR](); + iter.next = function(){ return {done: safe = true}; }; + arr[ITERATOR] = function(){ return iter; }; + exec(arr); + } catch(e){ /* empty */ } + return safe; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_iter-step.js b/pitfall/pdfkit/node_modules/core-js/modules/_iter-step.js new file mode 100644 index 00000000..6ff0dc51 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_iter-step.js @@ -0,0 +1,3 @@ +module.exports = function(done, value){ + return {value: value, done: !!done}; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_iterators.js b/pitfall/pdfkit/node_modules/core-js/modules/_iterators.js new file mode 100644 index 00000000..a0995453 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_iterators.js @@ -0,0 +1 @@ +module.exports = {}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_keyof.js b/pitfall/pdfkit/node_modules/core-js/modules/_keyof.js new file mode 100644 index 00000000..7b63229b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_keyof.js @@ -0,0 +1,10 @@ +var getKeys = require('./_object-keys') + , toIObject = require('./_to-iobject'); +module.exports = function(object, el){ + var O = toIObject(object) + , keys = getKeys(O) + , length = keys.length + , index = 0 + , key; + while(length > index)if(O[key = keys[index++]] === el)return key; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_library.js b/pitfall/pdfkit/node_modules/core-js/modules/_library.js new file mode 100644 index 00000000..82e47dd5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_library.js @@ -0,0 +1 @@ +module.exports = false; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_math-expm1.js b/pitfall/pdfkit/node_modules/core-js/modules/_math-expm1.js new file mode 100644 index 00000000..5131aa95 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_math-expm1.js @@ -0,0 +1,10 @@ +// 20.2.2.14 Math.expm1(x) +var $expm1 = Math.expm1; +module.exports = (!$expm1 + // Old FF bug + || $expm1(10) > 22025.465794806719 || $expm1(10) < 22025.4657948067165168 + // Tor Browser bug + || $expm1(-2e-17) != -2e-17 +) ? function expm1(x){ + return (x = +x) == 0 ? x : x > -1e-6 && x < 1e-6 ? x + x * x / 2 : Math.exp(x) - 1; +} : $expm1; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_math-log1p.js b/pitfall/pdfkit/node_modules/core-js/modules/_math-log1p.js new file mode 100644 index 00000000..a92bf463 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_math-log1p.js @@ -0,0 +1,4 @@ +// 20.2.2.20 Math.log1p(x) +module.exports = Math.log1p || function log1p(x){ + return (x = +x) > -1e-8 && x < 1e-8 ? x - x * x / 2 : Math.log(1 + x); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_math-sign.js b/pitfall/pdfkit/node_modules/core-js/modules/_math-sign.js new file mode 100644 index 00000000..a4848df6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_math-sign.js @@ -0,0 +1,4 @@ +// 20.2.2.28 Math.sign(x) +module.exports = Math.sign || function sign(x){ + return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_meta.js b/pitfall/pdfkit/node_modules/core-js/modules/_meta.js new file mode 100644 index 00000000..7daca009 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_meta.js @@ -0,0 +1,53 @@ +var META = require('./_uid')('meta') + , isObject = require('./_is-object') + , has = require('./_has') + , setDesc = require('./_object-dp').f + , id = 0; +var isExtensible = Object.isExtensible || function(){ + return true; +}; +var FREEZE = !require('./_fails')(function(){ + return isExtensible(Object.preventExtensions({})); +}); +var setMeta = function(it){ + setDesc(it, META, {value: { + i: 'O' + ++id, // object ID + w: {} // weak collections IDs + }}); +}; +var fastKey = function(it, create){ + // return primitive with prefix + if(!isObject(it))return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; + if(!has(it, META)){ + // can't set metadata to uncaught frozen object + if(!isExtensible(it))return 'F'; + // not necessary to add metadata + if(!create)return 'E'; + // add missing metadata + setMeta(it); + // return object ID + } return it[META].i; +}; +var getWeak = function(it, create){ + if(!has(it, META)){ + // can't set metadata to uncaught frozen object + if(!isExtensible(it))return true; + // not necessary to add metadata + if(!create)return false; + // add missing metadata + setMeta(it); + // return hash weak collections IDs + } return it[META].w; +}; +// add metadata on freeze-family methods calling +var onFreeze = function(it){ + if(FREEZE && meta.NEED && isExtensible(it) && !has(it, META))setMeta(it); + return it; +}; +var meta = module.exports = { + KEY: META, + NEED: false, + fastKey: fastKey, + getWeak: getWeak, + onFreeze: onFreeze +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_metadata.js b/pitfall/pdfkit/node_modules/core-js/modules/_metadata.js new file mode 100644 index 00000000..eb5a762d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_metadata.js @@ -0,0 +1,51 @@ +var Map = require('./es6.map') + , $export = require('./_export') + , shared = require('./_shared')('metadata') + , store = shared.store || (shared.store = new (require('./es6.weak-map'))); + +var getOrCreateMetadataMap = function(target, targetKey, create){ + var targetMetadata = store.get(target); + if(!targetMetadata){ + if(!create)return undefined; + store.set(target, targetMetadata = new Map); + } + var keyMetadata = targetMetadata.get(targetKey); + if(!keyMetadata){ + if(!create)return undefined; + targetMetadata.set(targetKey, keyMetadata = new Map); + } return keyMetadata; +}; +var ordinaryHasOwnMetadata = function(MetadataKey, O, P){ + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? false : metadataMap.has(MetadataKey); +}; +var ordinaryGetOwnMetadata = function(MetadataKey, O, P){ + var metadataMap = getOrCreateMetadataMap(O, P, false); + return metadataMap === undefined ? undefined : metadataMap.get(MetadataKey); +}; +var ordinaryDefineOwnMetadata = function(MetadataKey, MetadataValue, O, P){ + getOrCreateMetadataMap(O, P, true).set(MetadataKey, MetadataValue); +}; +var ordinaryOwnMetadataKeys = function(target, targetKey){ + var metadataMap = getOrCreateMetadataMap(target, targetKey, false) + , keys = []; + if(metadataMap)metadataMap.forEach(function(_, key){ keys.push(key); }); + return keys; +}; +var toMetaKey = function(it){ + return it === undefined || typeof it == 'symbol' ? it : String(it); +}; +var exp = function(O){ + $export($export.S, 'Reflect', O); +}; + +module.exports = { + store: store, + map: getOrCreateMetadataMap, + has: ordinaryHasOwnMetadata, + get: ordinaryGetOwnMetadata, + set: ordinaryDefineOwnMetadata, + keys: ordinaryOwnMetadataKeys, + key: toMetaKey, + exp: exp +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_microtask.js b/pitfall/pdfkit/node_modules/core-js/modules/_microtask.js new file mode 100644 index 00000000..b0f2a0df --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_microtask.js @@ -0,0 +1,68 @@ +var global = require('./_global') + , macrotask = require('./_task').set + , Observer = global.MutationObserver || global.WebKitMutationObserver + , process = global.process + , Promise = global.Promise + , isNode = require('./_cof')(process) == 'process'; + +module.exports = function(){ + var head, last, notify; + + var flush = function(){ + var parent, fn; + if(isNode && (parent = process.domain))parent.exit(); + while(head){ + fn = head.fn; + head = head.next; + try { + fn(); + } catch(e){ + if(head)notify(); + else last = undefined; + throw e; + } + } last = undefined; + if(parent)parent.enter(); + }; + + // Node.js + if(isNode){ + notify = function(){ + process.nextTick(flush); + }; + // browsers with MutationObserver + } else if(Observer){ + var toggle = true + , node = document.createTextNode(''); + new Observer(flush).observe(node, {characterData: true}); // eslint-disable-line no-new + notify = function(){ + node.data = toggle = !toggle; + }; + // environments with maybe non-completely correct, but existent Promise + } else if(Promise && Promise.resolve){ + var promise = Promise.resolve(); + notify = function(){ + promise.then(flush); + }; + // for other environments - macrotask based on: + // - setImmediate + // - MessageChannel + // - window.postMessag + // - onreadystatechange + // - setTimeout + } else { + notify = function(){ + // strange IE + webpack dev server bug - use .call(global) + macrotask.call(global, flush); + }; + } + + return function(fn){ + var task = {fn: fn, next: undefined}; + if(last)last.next = task; + if(!head){ + head = task; + notify(); + } last = task; + }; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_object-assign.js b/pitfall/pdfkit/node_modules/core-js/modules/_object-assign.js new file mode 100644 index 00000000..c575aba2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_object-assign.js @@ -0,0 +1,33 @@ +'use strict'; +// 19.1.2.1 Object.assign(target, source, ...) +var getKeys = require('./_object-keys') + , gOPS = require('./_object-gops') + , pIE = require('./_object-pie') + , toObject = require('./_to-object') + , IObject = require('./_iobject') + , $assign = Object.assign; + +// should work with symbols and should have deterministic property order (V8 bug) +module.exports = !$assign || require('./_fails')(function(){ + var A = {} + , B = {} + , S = Symbol() + , K = 'abcdefghijklmnopqrst'; + A[S] = 7; + K.split('').forEach(function(k){ B[k] = k; }); + return $assign({}, A)[S] != 7 || Object.keys($assign({}, B)).join('') != K; +}) ? function assign(target, source){ // eslint-disable-line no-unused-vars + var T = toObject(target) + , aLen = arguments.length + , index = 1 + , getSymbols = gOPS.f + , isEnum = pIE.f; + while(aLen > index){ + var S = IObject(arguments[index++]) + , keys = getSymbols ? getKeys(S).concat(getSymbols(S)) : getKeys(S) + , length = keys.length + , j = 0 + , key; + while(length > j)if(isEnum.call(S, key = keys[j++]))T[key] = S[key]; + } return T; +} : $assign; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_object-create.js b/pitfall/pdfkit/node_modules/core-js/modules/_object-create.js new file mode 100644 index 00000000..3379760f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_object-create.js @@ -0,0 +1,41 @@ +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +var anObject = require('./_an-object') + , dPs = require('./_object-dps') + , enumBugKeys = require('./_enum-bug-keys') + , IE_PROTO = require('./_shared-key')('IE_PROTO') + , Empty = function(){ /* empty */ } + , PROTOTYPE = 'prototype'; + +// Create object with fake `null` prototype: use iframe Object with cleared prototype +var createDict = function(){ + // Thrash, waste and sodomy: IE GC bug + var iframe = require('./_dom-create')('iframe') + , i = enumBugKeys.length + , lt = '<' + , gt = '>' + , iframeDocument; + iframe.style.display = 'none'; + require('./_html').appendChild(iframe); + iframe.src = 'javascript:'; // eslint-disable-line no-script-url + // createDict = iframe.contentWindow.Object; + // html.removeChild(iframe); + iframeDocument = iframe.contentWindow.document; + iframeDocument.open(); + iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt); + iframeDocument.close(); + createDict = iframeDocument.F; + while(i--)delete createDict[PROTOTYPE][enumBugKeys[i]]; + return createDict(); +}; + +module.exports = Object.create || function create(O, Properties){ + var result; + if(O !== null){ + Empty[PROTOTYPE] = anObject(O); + result = new Empty; + Empty[PROTOTYPE] = null; + // add "__proto__" for Object.getPrototypeOf polyfill + result[IE_PROTO] = O; + } else result = createDict(); + return Properties === undefined ? result : dPs(result, Properties); +}; diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_object-define.js b/pitfall/pdfkit/node_modules/core-js/modules/_object-define.js new file mode 100644 index 00000000..f246c4e3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_object-define.js @@ -0,0 +1,12 @@ +var dP = require('./_object-dp') + , gOPD = require('./_object-gopd') + , ownKeys = require('./_own-keys') + , toIObject = require('./_to-iobject'); + +module.exports = function define(target, mixin){ + var keys = ownKeys(toIObject(mixin)) + , length = keys.length + , i = 0, key; + while(length > i)dP.f(target, key = keys[i++], gOPD.f(mixin, key)); + return target; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_object-dp.js b/pitfall/pdfkit/node_modules/core-js/modules/_object-dp.js new file mode 100644 index 00000000..e7ca8a46 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_object-dp.js @@ -0,0 +1,16 @@ +var anObject = require('./_an-object') + , IE8_DOM_DEFINE = require('./_ie8-dom-define') + , toPrimitive = require('./_to-primitive') + , dP = Object.defineProperty; + +exports.f = require('./_descriptors') ? Object.defineProperty : function defineProperty(O, P, Attributes){ + anObject(O); + P = toPrimitive(P, true); + anObject(Attributes); + if(IE8_DOM_DEFINE)try { + return dP(O, P, Attributes); + } catch(e){ /* empty */ } + if('get' in Attributes || 'set' in Attributes)throw TypeError('Accessors not supported!'); + if('value' in Attributes)O[P] = Attributes.value; + return O; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_object-dps.js b/pitfall/pdfkit/node_modules/core-js/modules/_object-dps.js new file mode 100644 index 00000000..8cd4147a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_object-dps.js @@ -0,0 +1,13 @@ +var dP = require('./_object-dp') + , anObject = require('./_an-object') + , getKeys = require('./_object-keys'); + +module.exports = require('./_descriptors') ? Object.defineProperties : function defineProperties(O, Properties){ + anObject(O); + var keys = getKeys(Properties) + , length = keys.length + , i = 0 + , P; + while(length > i)dP.f(O, P = keys[i++], Properties[P]); + return O; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_object-forced-pam.js b/pitfall/pdfkit/node_modules/core-js/modules/_object-forced-pam.js new file mode 100644 index 00000000..668a07dc --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_object-forced-pam.js @@ -0,0 +1,7 @@ +// Forced replacement prototype accessors methods +module.exports = require('./_library')|| !require('./_fails')(function(){ + var K = Math.random(); + // In FF throws only define methods + __defineSetter__.call(null, K, function(){ /* empty */}); + delete require('./_global')[K]; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_object-gopd.js b/pitfall/pdfkit/node_modules/core-js/modules/_object-gopd.js new file mode 100644 index 00000000..756206ab --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_object-gopd.js @@ -0,0 +1,16 @@ +var pIE = require('./_object-pie') + , createDesc = require('./_property-desc') + , toIObject = require('./_to-iobject') + , toPrimitive = require('./_to-primitive') + , has = require('./_has') + , IE8_DOM_DEFINE = require('./_ie8-dom-define') + , gOPD = Object.getOwnPropertyDescriptor; + +exports.f = require('./_descriptors') ? gOPD : function getOwnPropertyDescriptor(O, P){ + O = toIObject(O); + P = toPrimitive(P, true); + if(IE8_DOM_DEFINE)try { + return gOPD(O, P); + } catch(e){ /* empty */ } + if(has(O, P))return createDesc(!pIE.f.call(O, P), O[P]); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_object-gopn-ext.js b/pitfall/pdfkit/node_modules/core-js/modules/_object-gopn-ext.js new file mode 100644 index 00000000..f4d10b4a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_object-gopn-ext.js @@ -0,0 +1,19 @@ +// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window +var toIObject = require('./_to-iobject') + , gOPN = require('./_object-gopn').f + , toString = {}.toString; + +var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) : []; + +var getWindowNames = function(it){ + try { + return gOPN(it); + } catch(e){ + return windowNames.slice(); + } +}; + +module.exports.f = function getOwnPropertyNames(it){ + return windowNames && toString.call(it) == '[object Window]' ? getWindowNames(it) : gOPN(toIObject(it)); +}; diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_object-gopn.js b/pitfall/pdfkit/node_modules/core-js/modules/_object-gopn.js new file mode 100644 index 00000000..beebf4da --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_object-gopn.js @@ -0,0 +1,7 @@ +// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O) +var $keys = require('./_object-keys-internal') + , hiddenKeys = require('./_enum-bug-keys').concat('length', 'prototype'); + +exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O){ + return $keys(O, hiddenKeys); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_object-gops.js b/pitfall/pdfkit/node_modules/core-js/modules/_object-gops.js new file mode 100644 index 00000000..8f93d76b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_object-gops.js @@ -0,0 +1 @@ +exports.f = Object.getOwnPropertySymbols; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_object-gpo.js b/pitfall/pdfkit/node_modules/core-js/modules/_object-gpo.js new file mode 100644 index 00000000..535dc6e9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_object-gpo.js @@ -0,0 +1,13 @@ +// 19.1.2.9 / 15.2.3.2 Object.getPrototypeOf(O) +var has = require('./_has') + , toObject = require('./_to-object') + , IE_PROTO = require('./_shared-key')('IE_PROTO') + , ObjectProto = Object.prototype; + +module.exports = Object.getPrototypeOf || function(O){ + O = toObject(O); + if(has(O, IE_PROTO))return O[IE_PROTO]; + if(typeof O.constructor == 'function' && O instanceof O.constructor){ + return O.constructor.prototype; + } return O instanceof Object ? ObjectProto : null; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_object-keys-internal.js b/pitfall/pdfkit/node_modules/core-js/modules/_object-keys-internal.js new file mode 100644 index 00000000..e23481d7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_object-keys-internal.js @@ -0,0 +1,17 @@ +var has = require('./_has') + , toIObject = require('./_to-iobject') + , arrayIndexOf = require('./_array-includes')(false) + , IE_PROTO = require('./_shared-key')('IE_PROTO'); + +module.exports = function(object, names){ + var O = toIObject(object) + , i = 0 + , result = [] + , key; + for(key in O)if(key != IE_PROTO)has(O, key) && result.push(key); + // Don't enum bug & hidden keys + while(names.length > i)if(has(O, key = names[i++])){ + ~arrayIndexOf(result, key) || result.push(key); + } + return result; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_object-keys.js b/pitfall/pdfkit/node_modules/core-js/modules/_object-keys.js new file mode 100644 index 00000000..11d4ccee --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_object-keys.js @@ -0,0 +1,7 @@ +// 19.1.2.14 / 15.2.3.14 Object.keys(O) +var $keys = require('./_object-keys-internal') + , enumBugKeys = require('./_enum-bug-keys'); + +module.exports = Object.keys || function keys(O){ + return $keys(O, enumBugKeys); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_object-pie.js b/pitfall/pdfkit/node_modules/core-js/modules/_object-pie.js new file mode 100644 index 00000000..13479a17 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_object-pie.js @@ -0,0 +1 @@ +exports.f = {}.propertyIsEnumerable; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_object-sap.js b/pitfall/pdfkit/node_modules/core-js/modules/_object-sap.js new file mode 100644 index 00000000..b76fec5f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_object-sap.js @@ -0,0 +1,10 @@ +// most Object methods by ES6 should accept primitives +var $export = require('./_export') + , core = require('./_core') + , fails = require('./_fails'); +module.exports = function(KEY, exec){ + var fn = (core.Object || {})[KEY] || Object[KEY] + , exp = {}; + exp[KEY] = exec(fn); + $export($export.S + $export.F * fails(function(){ fn(1); }), 'Object', exp); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_object-to-array.js b/pitfall/pdfkit/node_modules/core-js/modules/_object-to-array.js new file mode 100644 index 00000000..b6fdf05d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_object-to-array.js @@ -0,0 +1,16 @@ +var getKeys = require('./_object-keys') + , toIObject = require('./_to-iobject') + , isEnum = require('./_object-pie').f; +module.exports = function(isEntries){ + return function(it){ + var O = toIObject(it) + , keys = getKeys(O) + , length = keys.length + , i = 0 + , result = [] + , key; + while(length > i)if(isEnum.call(O, key = keys[i++])){ + result.push(isEntries ? [key, O[key]] : O[key]); + } return result; + }; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_own-keys.js b/pitfall/pdfkit/node_modules/core-js/modules/_own-keys.js new file mode 100644 index 00000000..045ce3d5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_own-keys.js @@ -0,0 +1,10 @@ +// all object keys, includes non-enumerable and symbols +var gOPN = require('./_object-gopn') + , gOPS = require('./_object-gops') + , anObject = require('./_an-object') + , Reflect = require('./_global').Reflect; +module.exports = Reflect && Reflect.ownKeys || function ownKeys(it){ + var keys = gOPN.f(anObject(it)) + , getSymbols = gOPS.f; + return getSymbols ? keys.concat(getSymbols(it)) : keys; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_parse-float.js b/pitfall/pdfkit/node_modules/core-js/modules/_parse-float.js new file mode 100644 index 00000000..3d0e6531 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_parse-float.js @@ -0,0 +1,8 @@ +var $parseFloat = require('./_global').parseFloat + , $trim = require('./_string-trim').trim; + +module.exports = 1 / $parseFloat(require('./_string-ws') + '-0') !== -Infinity ? function parseFloat(str){ + var string = $trim(String(str), 3) + , result = $parseFloat(string); + return result === 0 && string.charAt(0) == '-' ? -0 : result; +} : $parseFloat; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_parse-int.js b/pitfall/pdfkit/node_modules/core-js/modules/_parse-int.js new file mode 100644 index 00000000..c23ffc09 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_parse-int.js @@ -0,0 +1,9 @@ +var $parseInt = require('./_global').parseInt + , $trim = require('./_string-trim').trim + , ws = require('./_string-ws') + , hex = /^[\-+]?0[xX]/; + +module.exports = $parseInt(ws + '08') !== 8 || $parseInt(ws + '0x16') !== 22 ? function parseInt(str, radix){ + var string = $trim(String(str), 3); + return $parseInt(string, (radix >>> 0) || (hex.test(string) ? 16 : 10)); +} : $parseInt; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_partial.js b/pitfall/pdfkit/node_modules/core-js/modules/_partial.js new file mode 100644 index 00000000..3d411b70 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_partial.js @@ -0,0 +1,23 @@ +'use strict'; +var path = require('./_path') + , invoke = require('./_invoke') + , aFunction = require('./_a-function'); +module.exports = function(/* ...pargs */){ + var fn = aFunction(this) + , length = arguments.length + , pargs = Array(length) + , i = 0 + , _ = path._ + , holder = false; + while(length > i)if((pargs[i] = arguments[i++]) === _)holder = true; + return function(/* ...args */){ + var that = this + , aLen = arguments.length + , j = 0, k = 0, args; + if(!holder && !aLen)return invoke(fn, pargs, that); + args = pargs.slice(); + if(holder)for(;length > j; j++)if(args[j] === _)args[j] = arguments[k++]; + while(aLen > k)args.push(arguments[k++]); + return invoke(fn, args, that); + }; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_path.js b/pitfall/pdfkit/node_modules/core-js/modules/_path.js new file mode 100644 index 00000000..d63df9d4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_path.js @@ -0,0 +1 @@ +module.exports = require('./_global'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_property-desc.js b/pitfall/pdfkit/node_modules/core-js/modules/_property-desc.js new file mode 100644 index 00000000..e3f7ab2d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_property-desc.js @@ -0,0 +1,8 @@ +module.exports = function(bitmap, value){ + return { + enumerable : !(bitmap & 1), + configurable: !(bitmap & 2), + writable : !(bitmap & 4), + value : value + }; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_redefine-all.js b/pitfall/pdfkit/node_modules/core-js/modules/_redefine-all.js new file mode 100644 index 00000000..ec1c5f76 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_redefine-all.js @@ -0,0 +1,5 @@ +var redefine = require('./_redefine'); +module.exports = function(target, src, safe){ + for(var key in src)redefine(target, key, src[key], safe); + return target; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_redefine.js b/pitfall/pdfkit/node_modules/core-js/modules/_redefine.js new file mode 100644 index 00000000..8e1bfe06 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_redefine.js @@ -0,0 +1,32 @@ +var global = require('./_global') + , hide = require('./_hide') + , has = require('./_has') + , SRC = require('./_uid')('src') + , TO_STRING = 'toString' + , $toString = Function[TO_STRING] + , TPL = ('' + $toString).split(TO_STRING); + +require('./_core').inspectSource = function(it){ + return $toString.call(it); +}; + +(module.exports = function(O, key, val, safe){ + var isFunction = typeof val == 'function'; + if(isFunction)has(val, 'name') || hide(val, 'name', key); + if(O[key] === val)return; + if(isFunction)has(val, SRC) || hide(val, SRC, O[key] ? '' + O[key] : TPL.join(String(key))); + if(O === global){ + O[key] = val; + } else { + if(!safe){ + delete O[key]; + hide(O, key, val); + } else { + if(O[key])O[key] = val; + else hide(O, key, val); + } + } +// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative +})(Function.prototype, TO_STRING, function toString(){ + return typeof this == 'function' && this[SRC] || $toString.call(this); +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_replacer.js b/pitfall/pdfkit/node_modules/core-js/modules/_replacer.js new file mode 100644 index 00000000..5360a3d3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_replacer.js @@ -0,0 +1,8 @@ +module.exports = function(regExp, replace){ + var replacer = replace === Object(replace) ? function(part){ + return replace[part]; + } : replace; + return function(it){ + return String(it).replace(regExp, replacer); + }; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_same-value.js b/pitfall/pdfkit/node_modules/core-js/modules/_same-value.js new file mode 100644 index 00000000..8c2b8c7f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_same-value.js @@ -0,0 +1,4 @@ +// 7.2.9 SameValue(x, y) +module.exports = Object.is || function is(x, y){ + return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_set-proto.js b/pitfall/pdfkit/node_modules/core-js/modules/_set-proto.js new file mode 100644 index 00000000..8d5dad3f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_set-proto.js @@ -0,0 +1,25 @@ +// Works with __proto__ only. Old v8 can't work with null proto objects. +/* eslint-disable no-proto */ +var isObject = require('./_is-object') + , anObject = require('./_an-object'); +var check = function(O, proto){ + anObject(O); + if(!isObject(proto) && proto !== null)throw TypeError(proto + ": can't set as prototype!"); +}; +module.exports = { + set: Object.setPrototypeOf || ('__proto__' in {} ? // eslint-disable-line + function(test, buggy, set){ + try { + set = require('./_ctx')(Function.call, require('./_object-gopd').f(Object.prototype, '__proto__').set, 2); + set(test, []); + buggy = !(test instanceof Array); + } catch(e){ buggy = true; } + return function setPrototypeOf(O, proto){ + check(O, proto); + if(buggy)O.__proto__ = proto; + else set(O, proto); + return O; + }; + }({}, false) : undefined), + check: check +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_set-species.js b/pitfall/pdfkit/node_modules/core-js/modules/_set-species.js new file mode 100644 index 00000000..a21bd039 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_set-species.js @@ -0,0 +1,13 @@ +'use strict'; +var global = require('./_global') + , dP = require('./_object-dp') + , DESCRIPTORS = require('./_descriptors') + , SPECIES = require('./_wks')('species'); + +module.exports = function(KEY){ + var C = global[KEY]; + if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, { + configurable: true, + get: function(){ return this; } + }); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_set-to-string-tag.js b/pitfall/pdfkit/node_modules/core-js/modules/_set-to-string-tag.js new file mode 100644 index 00000000..ffbdddab --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_set-to-string-tag.js @@ -0,0 +1,7 @@ +var def = require('./_object-dp').f + , has = require('./_has') + , TAG = require('./_wks')('toStringTag'); + +module.exports = function(it, tag, stat){ + if(it && !has(it = stat ? it : it.prototype, TAG))def(it, TAG, {configurable: true, value: tag}); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_shared-key.js b/pitfall/pdfkit/node_modules/core-js/modules/_shared-key.js new file mode 100644 index 00000000..5ed76349 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_shared-key.js @@ -0,0 +1,5 @@ +var shared = require('./_shared')('keys') + , uid = require('./_uid'); +module.exports = function(key){ + return shared[key] || (shared[key] = uid(key)); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_shared.js b/pitfall/pdfkit/node_modules/core-js/modules/_shared.js new file mode 100644 index 00000000..3f9e4c89 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_shared.js @@ -0,0 +1,6 @@ +var global = require('./_global') + , SHARED = '__core-js_shared__' + , store = global[SHARED] || (global[SHARED] = {}); +module.exports = function(key){ + return store[key] || (store[key] = {}); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_species-constructor.js b/pitfall/pdfkit/node_modules/core-js/modules/_species-constructor.js new file mode 100644 index 00000000..7a4d1baf --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_species-constructor.js @@ -0,0 +1,8 @@ +// 7.3.20 SpeciesConstructor(O, defaultConstructor) +var anObject = require('./_an-object') + , aFunction = require('./_a-function') + , SPECIES = require('./_wks')('species'); +module.exports = function(O, D){ + var C = anObject(O).constructor, S; + return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? D : aFunction(S); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_strict-method.js b/pitfall/pdfkit/node_modules/core-js/modules/_strict-method.js new file mode 100644 index 00000000..96b6c6e8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_strict-method.js @@ -0,0 +1,7 @@ +var fails = require('./_fails'); + +module.exports = function(method, arg){ + return !!method && fails(function(){ + arg ? method.call(null, function(){}, 1) : method.call(null); + }); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_string-at.js b/pitfall/pdfkit/node_modules/core-js/modules/_string-at.js new file mode 100644 index 00000000..ecc0d21c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_string-at.js @@ -0,0 +1,17 @@ +var toInteger = require('./_to-integer') + , defined = require('./_defined'); +// true -> String#at +// false -> String#codePointAt +module.exports = function(TO_STRING){ + return function(that, pos){ + var s = String(defined(that)) + , i = toInteger(pos) + , l = s.length + , a, b; + if(i < 0 || i >= l)return TO_STRING ? '' : undefined; + a = s.charCodeAt(i); + return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff + ? TO_STRING ? s.charAt(i) : a + : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; + }; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_string-context.js b/pitfall/pdfkit/node_modules/core-js/modules/_string-context.js new file mode 100644 index 00000000..5f513483 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_string-context.js @@ -0,0 +1,8 @@ +// helper for String#{startsWith, endsWith, includes} +var isRegExp = require('./_is-regexp') + , defined = require('./_defined'); + +module.exports = function(that, searchString, NAME){ + if(isRegExp(searchString))throw TypeError('String#' + NAME + " doesn't accept regex!"); + return String(defined(that)); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_string-html.js b/pitfall/pdfkit/node_modules/core-js/modules/_string-html.js new file mode 100644 index 00000000..95daf812 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_string-html.js @@ -0,0 +1,19 @@ +var $export = require('./_export') + , fails = require('./_fails') + , defined = require('./_defined') + , quot = /"/g; +// B.2.3.2.1 CreateHTML(string, tag, attribute, value) +var createHTML = function(string, tag, attribute, value) { + var S = String(defined(string)) + , p1 = '<' + tag; + if(attribute !== '')p1 += ' ' + attribute + '="' + String(value).replace(quot, '"') + '"'; + return p1 + '>' + S + ''; +}; +module.exports = function(NAME, exec){ + var O = {}; + O[NAME] = exec(createHTML); + $export($export.P + $export.F * fails(function(){ + var test = ''[NAME]('"'); + return test !== test.toLowerCase() || test.split('"').length > 3; + }), 'String', O); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_string-pad.js b/pitfall/pdfkit/node_modules/core-js/modules/_string-pad.js new file mode 100644 index 00000000..dccd155e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_string-pad.js @@ -0,0 +1,16 @@ +// https://github.com/tc39/proposal-string-pad-start-end +var toLength = require('./_to-length') + , repeat = require('./_string-repeat') + , defined = require('./_defined'); + +module.exports = function(that, maxLength, fillString, left){ + var S = String(defined(that)) + , stringLength = S.length + , fillStr = fillString === undefined ? ' ' : String(fillString) + , intMaxLength = toLength(maxLength); + if(intMaxLength <= stringLength || fillStr == '')return S; + var fillLen = intMaxLength - stringLength + , stringFiller = repeat.call(fillStr, Math.ceil(fillLen / fillStr.length)); + if(stringFiller.length > fillLen)stringFiller = stringFiller.slice(0, fillLen); + return left ? stringFiller + S : S + stringFiller; +}; diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_string-repeat.js b/pitfall/pdfkit/node_modules/core-js/modules/_string-repeat.js new file mode 100644 index 00000000..88fd3a2d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_string-repeat.js @@ -0,0 +1,12 @@ +'use strict'; +var toInteger = require('./_to-integer') + , defined = require('./_defined'); + +module.exports = function repeat(count){ + var str = String(defined(this)) + , res = '' + , n = toInteger(count); + if(n < 0 || n == Infinity)throw RangeError("Count can't be negative"); + for(;n > 0; (n >>>= 1) && (str += str))if(n & 1)res += str; + return res; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_string-trim.js b/pitfall/pdfkit/node_modules/core-js/modules/_string-trim.js new file mode 100644 index 00000000..d12de1ce --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_string-trim.js @@ -0,0 +1,30 @@ +var $export = require('./_export') + , defined = require('./_defined') + , fails = require('./_fails') + , spaces = require('./_string-ws') + , space = '[' + spaces + ']' + , non = '\u200b\u0085' + , ltrim = RegExp('^' + space + space + '*') + , rtrim = RegExp(space + space + '*$'); + +var exporter = function(KEY, exec, ALIAS){ + var exp = {}; + var FORCE = fails(function(){ + return !!spaces[KEY]() || non[KEY]() != non; + }); + var fn = exp[KEY] = FORCE ? exec(trim) : spaces[KEY]; + if(ALIAS)exp[ALIAS] = fn; + $export($export.P + $export.F * FORCE, 'String', exp); +}; + +// 1 -> String#trimLeft +// 2 -> String#trimRight +// 3 -> String#trim +var trim = exporter.trim = function(string, TYPE){ + string = String(defined(string)); + if(TYPE & 1)string = string.replace(ltrim, ''); + if(TYPE & 2)string = string.replace(rtrim, ''); + return string; +}; + +module.exports = exporter; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_string-ws.js b/pitfall/pdfkit/node_modules/core-js/modules/_string-ws.js new file mode 100644 index 00000000..9713d11d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_string-ws.js @@ -0,0 +1,2 @@ +module.exports = '\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003' + + '\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_task.js b/pitfall/pdfkit/node_modules/core-js/modules/_task.js new file mode 100644 index 00000000..06a73f40 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_task.js @@ -0,0 +1,75 @@ +var ctx = require('./_ctx') + , invoke = require('./_invoke') + , html = require('./_html') + , cel = require('./_dom-create') + , global = require('./_global') + , process = global.process + , setTask = global.setImmediate + , clearTask = global.clearImmediate + , MessageChannel = global.MessageChannel + , counter = 0 + , queue = {} + , ONREADYSTATECHANGE = 'onreadystatechange' + , defer, channel, port; +var run = function(){ + var id = +this; + if(queue.hasOwnProperty(id)){ + var fn = queue[id]; + delete queue[id]; + fn(); + } +}; +var listener = function(event){ + run.call(event.data); +}; +// Node.js 0.9+ & IE10+ has setImmediate, otherwise: +if(!setTask || !clearTask){ + setTask = function setImmediate(fn){ + var args = [], i = 1; + while(arguments.length > i)args.push(arguments[i++]); + queue[++counter] = function(){ + invoke(typeof fn == 'function' ? fn : Function(fn), args); + }; + defer(counter); + return counter; + }; + clearTask = function clearImmediate(id){ + delete queue[id]; + }; + // Node.js 0.8- + if(require('./_cof')(process) == 'process'){ + defer = function(id){ + process.nextTick(ctx(run, id, 1)); + }; + // Browsers with MessageChannel, includes WebWorkers + } else if(MessageChannel){ + channel = new MessageChannel; + port = channel.port2; + channel.port1.onmessage = listener; + defer = ctx(port.postMessage, port, 1); + // Browsers with postMessage, skip WebWorkers + // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' + } else if(global.addEventListener && typeof postMessage == 'function' && !global.importScripts){ + defer = function(id){ + global.postMessage(id + '', '*'); + }; + global.addEventListener('message', listener, false); + // IE8- + } else if(ONREADYSTATECHANGE in cel('script')){ + defer = function(id){ + html.appendChild(cel('script'))[ONREADYSTATECHANGE] = function(){ + html.removeChild(this); + run.call(id); + }; + }; + // Rest old browsers + } else { + defer = function(id){ + setTimeout(ctx(run, id, 1), 0); + }; + } +} +module.exports = { + set: setTask, + clear: clearTask +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_to-index.js b/pitfall/pdfkit/node_modules/core-js/modules/_to-index.js new file mode 100644 index 00000000..4d380ce1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_to-index.js @@ -0,0 +1,7 @@ +var toInteger = require('./_to-integer') + , max = Math.max + , min = Math.min; +module.exports = function(index, length){ + index = toInteger(index); + return index < 0 ? max(index + length, 0) : min(index, length); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_to-integer.js b/pitfall/pdfkit/node_modules/core-js/modules/_to-integer.js new file mode 100644 index 00000000..f63baaff --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_to-integer.js @@ -0,0 +1,6 @@ +// 7.1.4 ToInteger +var ceil = Math.ceil + , floor = Math.floor; +module.exports = function(it){ + return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_to-iobject.js b/pitfall/pdfkit/node_modules/core-js/modules/_to-iobject.js new file mode 100644 index 00000000..4eb43462 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_to-iobject.js @@ -0,0 +1,6 @@ +// to indexed object, toObject with fallback for non-array-like ES3 strings +var IObject = require('./_iobject') + , defined = require('./_defined'); +module.exports = function(it){ + return IObject(defined(it)); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_to-length.js b/pitfall/pdfkit/node_modules/core-js/modules/_to-length.js new file mode 100644 index 00000000..4099e60b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_to-length.js @@ -0,0 +1,6 @@ +// 7.1.15 ToLength +var toInteger = require('./_to-integer') + , min = Math.min; +module.exports = function(it){ + return it > 0 ? min(toInteger(it), 0x1fffffffffffff) : 0; // pow(2, 53) - 1 == 9007199254740991 +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_to-object.js b/pitfall/pdfkit/node_modules/core-js/modules/_to-object.js new file mode 100644 index 00000000..f2c28b3f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_to-object.js @@ -0,0 +1,5 @@ +// 7.1.13 ToObject(argument) +var defined = require('./_defined'); +module.exports = function(it){ + return Object(defined(it)); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_to-primitive.js b/pitfall/pdfkit/node_modules/core-js/modules/_to-primitive.js new file mode 100644 index 00000000..16354eed --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_to-primitive.js @@ -0,0 +1,12 @@ +// 7.1.1 ToPrimitive(input [, PreferredType]) +var isObject = require('./_is-object'); +// instead of the ES6 spec version, we didn't implement @@toPrimitive case +// and the second argument - flag - preferred type is a string +module.exports = function(it, S){ + if(!isObject(it))return it; + var fn, val; + if(S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; + if(typeof (fn = it.valueOf) == 'function' && !isObject(val = fn.call(it)))return val; + if(!S && typeof (fn = it.toString) == 'function' && !isObject(val = fn.call(it)))return val; + throw TypeError("Can't convert object to primitive value"); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_typed-array.js b/pitfall/pdfkit/node_modules/core-js/modules/_typed-array.js new file mode 100644 index 00000000..b072b23b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_typed-array.js @@ -0,0 +1,479 @@ +'use strict'; +if(require('./_descriptors')){ + var LIBRARY = require('./_library') + , global = require('./_global') + , fails = require('./_fails') + , $export = require('./_export') + , $typed = require('./_typed') + , $buffer = require('./_typed-buffer') + , ctx = require('./_ctx') + , anInstance = require('./_an-instance') + , propertyDesc = require('./_property-desc') + , hide = require('./_hide') + , redefineAll = require('./_redefine-all') + , toInteger = require('./_to-integer') + , toLength = require('./_to-length') + , toIndex = require('./_to-index') + , toPrimitive = require('./_to-primitive') + , has = require('./_has') + , same = require('./_same-value') + , classof = require('./_classof') + , isObject = require('./_is-object') + , toObject = require('./_to-object') + , isArrayIter = require('./_is-array-iter') + , create = require('./_object-create') + , getPrototypeOf = require('./_object-gpo') + , gOPN = require('./_object-gopn').f + , getIterFn = require('./core.get-iterator-method') + , uid = require('./_uid') + , wks = require('./_wks') + , createArrayMethod = require('./_array-methods') + , createArrayIncludes = require('./_array-includes') + , speciesConstructor = require('./_species-constructor') + , ArrayIterators = require('./es6.array.iterator') + , Iterators = require('./_iterators') + , $iterDetect = require('./_iter-detect') + , setSpecies = require('./_set-species') + , arrayFill = require('./_array-fill') + , arrayCopyWithin = require('./_array-copy-within') + , $DP = require('./_object-dp') + , $GOPD = require('./_object-gopd') + , dP = $DP.f + , gOPD = $GOPD.f + , RangeError = global.RangeError + , TypeError = global.TypeError + , Uint8Array = global.Uint8Array + , ARRAY_BUFFER = 'ArrayBuffer' + , SHARED_BUFFER = 'Shared' + ARRAY_BUFFER + , BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT' + , PROTOTYPE = 'prototype' + , ArrayProto = Array[PROTOTYPE] + , $ArrayBuffer = $buffer.ArrayBuffer + , $DataView = $buffer.DataView + , arrayForEach = createArrayMethod(0) + , arrayFilter = createArrayMethod(2) + , arraySome = createArrayMethod(3) + , arrayEvery = createArrayMethod(4) + , arrayFind = createArrayMethod(5) + , arrayFindIndex = createArrayMethod(6) + , arrayIncludes = createArrayIncludes(true) + , arrayIndexOf = createArrayIncludes(false) + , arrayValues = ArrayIterators.values + , arrayKeys = ArrayIterators.keys + , arrayEntries = ArrayIterators.entries + , arrayLastIndexOf = ArrayProto.lastIndexOf + , arrayReduce = ArrayProto.reduce + , arrayReduceRight = ArrayProto.reduceRight + , arrayJoin = ArrayProto.join + , arraySort = ArrayProto.sort + , arraySlice = ArrayProto.slice + , arrayToString = ArrayProto.toString + , arrayToLocaleString = ArrayProto.toLocaleString + , ITERATOR = wks('iterator') + , TAG = wks('toStringTag') + , TYPED_CONSTRUCTOR = uid('typed_constructor') + , DEF_CONSTRUCTOR = uid('def_constructor') + , ALL_CONSTRUCTORS = $typed.CONSTR + , TYPED_ARRAY = $typed.TYPED + , VIEW = $typed.VIEW + , WRONG_LENGTH = 'Wrong length!'; + + var $map = createArrayMethod(1, function(O, length){ + return allocate(speciesConstructor(O, O[DEF_CONSTRUCTOR]), length); + }); + + var LITTLE_ENDIAN = fails(function(){ + return new Uint8Array(new Uint16Array([1]).buffer)[0] === 1; + }); + + var FORCED_SET = !!Uint8Array && !!Uint8Array[PROTOTYPE].set && fails(function(){ + new Uint8Array(1).set({}); + }); + + var strictToLength = function(it, SAME){ + if(it === undefined)throw TypeError(WRONG_LENGTH); + var number = +it + , length = toLength(it); + if(SAME && !same(number, length))throw RangeError(WRONG_LENGTH); + return length; + }; + + var toOffset = function(it, BYTES){ + var offset = toInteger(it); + if(offset < 0 || offset % BYTES)throw RangeError('Wrong offset!'); + return offset; + }; + + var validate = function(it){ + if(isObject(it) && TYPED_ARRAY in it)return it; + throw TypeError(it + ' is not a typed array!'); + }; + + var allocate = function(C, length){ + if(!(isObject(C) && TYPED_CONSTRUCTOR in C)){ + throw TypeError('It is not a typed array constructor!'); + } return new C(length); + }; + + var speciesFromList = function(O, list){ + return fromList(speciesConstructor(O, O[DEF_CONSTRUCTOR]), list); + }; + + var fromList = function(C, list){ + var index = 0 + , length = list.length + , result = allocate(C, length); + while(length > index)result[index] = list[index++]; + return result; + }; + + var addGetter = function(it, key, internal){ + dP(it, key, {get: function(){ return this._d[internal]; }}); + }; + + var $from = function from(source /*, mapfn, thisArg */){ + var O = toObject(source) + , aLen = arguments.length + , mapfn = aLen > 1 ? arguments[1] : undefined + , mapping = mapfn !== undefined + , iterFn = getIterFn(O) + , i, length, values, result, step, iterator; + if(iterFn != undefined && !isArrayIter(iterFn)){ + for(iterator = iterFn.call(O), values = [], i = 0; !(step = iterator.next()).done; i++){ + values.push(step.value); + } O = values; + } + if(mapping && aLen > 2)mapfn = ctx(mapfn, arguments[2], 2); + for(i = 0, length = toLength(O.length), result = allocate(this, length); length > i; i++){ + result[i] = mapping ? mapfn(O[i], i) : O[i]; + } + return result; + }; + + var $of = function of(/*...items*/){ + var index = 0 + , length = arguments.length + , result = allocate(this, length); + while(length > index)result[index] = arguments[index++]; + return result; + }; + + // iOS Safari 6.x fails here + var TO_LOCALE_BUG = !!Uint8Array && fails(function(){ arrayToLocaleString.call(new Uint8Array(1)); }); + + var $toLocaleString = function toLocaleString(){ + return arrayToLocaleString.apply(TO_LOCALE_BUG ? arraySlice.call(validate(this)) : validate(this), arguments); + }; + + var proto = { + copyWithin: function copyWithin(target, start /*, end */){ + return arrayCopyWithin.call(validate(this), target, start, arguments.length > 2 ? arguments[2] : undefined); + }, + every: function every(callbackfn /*, thisArg */){ + return arrayEvery(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + fill: function fill(value /*, start, end */){ // eslint-disable-line no-unused-vars + return arrayFill.apply(validate(this), arguments); + }, + filter: function filter(callbackfn /*, thisArg */){ + return speciesFromList(this, arrayFilter(validate(this), callbackfn, + arguments.length > 1 ? arguments[1] : undefined)); + }, + find: function find(predicate /*, thisArg */){ + return arrayFind(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + findIndex: function findIndex(predicate /*, thisArg */){ + return arrayFindIndex(validate(this), predicate, arguments.length > 1 ? arguments[1] : undefined); + }, + forEach: function forEach(callbackfn /*, thisArg */){ + arrayForEach(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + indexOf: function indexOf(searchElement /*, fromIndex */){ + return arrayIndexOf(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); + }, + includes: function includes(searchElement /*, fromIndex */){ + return arrayIncludes(validate(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); + }, + join: function join(separator){ // eslint-disable-line no-unused-vars + return arrayJoin.apply(validate(this), arguments); + }, + lastIndexOf: function lastIndexOf(searchElement /*, fromIndex */){ // eslint-disable-line no-unused-vars + return arrayLastIndexOf.apply(validate(this), arguments); + }, + map: function map(mapfn /*, thisArg */){ + return $map(validate(this), mapfn, arguments.length > 1 ? arguments[1] : undefined); + }, + reduce: function reduce(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars + return arrayReduce.apply(validate(this), arguments); + }, + reduceRight: function reduceRight(callbackfn /*, initialValue */){ // eslint-disable-line no-unused-vars + return arrayReduceRight.apply(validate(this), arguments); + }, + reverse: function reverse(){ + var that = this + , length = validate(that).length + , middle = Math.floor(length / 2) + , index = 0 + , value; + while(index < middle){ + value = that[index]; + that[index++] = that[--length]; + that[length] = value; + } return that; + }, + some: function some(callbackfn /*, thisArg */){ + return arraySome(validate(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); + }, + sort: function sort(comparefn){ + return arraySort.call(validate(this), comparefn); + }, + subarray: function subarray(begin, end){ + var O = validate(this) + , length = O.length + , $begin = toIndex(begin, length); + return new (speciesConstructor(O, O[DEF_CONSTRUCTOR]))( + O.buffer, + O.byteOffset + $begin * O.BYTES_PER_ELEMENT, + toLength((end === undefined ? length : toIndex(end, length)) - $begin) + ); + } + }; + + var $slice = function slice(start, end){ + return speciesFromList(this, arraySlice.call(validate(this), start, end)); + }; + + var $set = function set(arrayLike /*, offset */){ + validate(this); + var offset = toOffset(arguments[1], 1) + , length = this.length + , src = toObject(arrayLike) + , len = toLength(src.length) + , index = 0; + if(len + offset > length)throw RangeError(WRONG_LENGTH); + while(index < len)this[offset + index] = src[index++]; + }; + + var $iterators = { + entries: function entries(){ + return arrayEntries.call(validate(this)); + }, + keys: function keys(){ + return arrayKeys.call(validate(this)); + }, + values: function values(){ + return arrayValues.call(validate(this)); + } + }; + + var isTAIndex = function(target, key){ + return isObject(target) + && target[TYPED_ARRAY] + && typeof key != 'symbol' + && key in target + && String(+key) == String(key); + }; + var $getDesc = function getOwnPropertyDescriptor(target, key){ + return isTAIndex(target, key = toPrimitive(key, true)) + ? propertyDesc(2, target[key]) + : gOPD(target, key); + }; + var $setDesc = function defineProperty(target, key, desc){ + if(isTAIndex(target, key = toPrimitive(key, true)) + && isObject(desc) + && has(desc, 'value') + && !has(desc, 'get') + && !has(desc, 'set') + // TODO: add validation descriptor w/o calling accessors + && !desc.configurable + && (!has(desc, 'writable') || desc.writable) + && (!has(desc, 'enumerable') || desc.enumerable) + ){ + target[key] = desc.value; + return target; + } else return dP(target, key, desc); + }; + + if(!ALL_CONSTRUCTORS){ + $GOPD.f = $getDesc; + $DP.f = $setDesc; + } + + $export($export.S + $export.F * !ALL_CONSTRUCTORS, 'Object', { + getOwnPropertyDescriptor: $getDesc, + defineProperty: $setDesc + }); + + if(fails(function(){ arrayToString.call({}); })){ + arrayToString = arrayToLocaleString = function toString(){ + return arrayJoin.call(this); + } + } + + var $TypedArrayPrototype$ = redefineAll({}, proto); + redefineAll($TypedArrayPrototype$, $iterators); + hide($TypedArrayPrototype$, ITERATOR, $iterators.values); + redefineAll($TypedArrayPrototype$, { + slice: $slice, + set: $set, + constructor: function(){ /* noop */ }, + toString: arrayToString, + toLocaleString: $toLocaleString + }); + addGetter($TypedArrayPrototype$, 'buffer', 'b'); + addGetter($TypedArrayPrototype$, 'byteOffset', 'o'); + addGetter($TypedArrayPrototype$, 'byteLength', 'l'); + addGetter($TypedArrayPrototype$, 'length', 'e'); + dP($TypedArrayPrototype$, TAG, { + get: function(){ return this[TYPED_ARRAY]; } + }); + + module.exports = function(KEY, BYTES, wrapper, CLAMPED){ + CLAMPED = !!CLAMPED; + var NAME = KEY + (CLAMPED ? 'Clamped' : '') + 'Array' + , ISNT_UINT8 = NAME != 'Uint8Array' + , GETTER = 'get' + KEY + , SETTER = 'set' + KEY + , TypedArray = global[NAME] + , Base = TypedArray || {} + , TAC = TypedArray && getPrototypeOf(TypedArray) + , FORCED = !TypedArray || !$typed.ABV + , O = {} + , TypedArrayPrototype = TypedArray && TypedArray[PROTOTYPE]; + var getter = function(that, index){ + var data = that._d; + return data.v[GETTER](index * BYTES + data.o, LITTLE_ENDIAN); + }; + var setter = function(that, index, value){ + var data = that._d; + if(CLAMPED)value = (value = Math.round(value)) < 0 ? 0 : value > 0xff ? 0xff : value & 0xff; + data.v[SETTER](index * BYTES + data.o, value, LITTLE_ENDIAN); + }; + var addElement = function(that, index){ + dP(that, index, { + get: function(){ + return getter(this, index); + }, + set: function(value){ + return setter(this, index, value); + }, + enumerable: true + }); + }; + if(FORCED){ + TypedArray = wrapper(function(that, data, $offset, $length){ + anInstance(that, TypedArray, NAME, '_d'); + var index = 0 + , offset = 0 + , buffer, byteLength, length, klass; + if(!isObject(data)){ + length = strictToLength(data, true) + byteLength = length * BYTES; + buffer = new $ArrayBuffer(byteLength); + } else if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){ + buffer = data; + offset = toOffset($offset, BYTES); + var $len = data.byteLength; + if($length === undefined){ + if($len % BYTES)throw RangeError(WRONG_LENGTH); + byteLength = $len - offset; + if(byteLength < 0)throw RangeError(WRONG_LENGTH); + } else { + byteLength = toLength($length) * BYTES; + if(byteLength + offset > $len)throw RangeError(WRONG_LENGTH); + } + length = byteLength / BYTES; + } else if(TYPED_ARRAY in data){ + return fromList(TypedArray, data); + } else { + return $from.call(TypedArray, data); + } + hide(that, '_d', { + b: buffer, + o: offset, + l: byteLength, + e: length, + v: new $DataView(buffer) + }); + while(index < length)addElement(that, index++); + }); + TypedArrayPrototype = TypedArray[PROTOTYPE] = create($TypedArrayPrototype$); + hide(TypedArrayPrototype, 'constructor', TypedArray); + } else if(!$iterDetect(function(iter){ + // V8 works with iterators, but fails in many other cases + // https://code.google.com/p/v8/issues/detail?id=4552 + new TypedArray(null); // eslint-disable-line no-new + new TypedArray(iter); // eslint-disable-line no-new + }, true)){ + TypedArray = wrapper(function(that, data, $offset, $length){ + anInstance(that, TypedArray, NAME); + var klass; + // `ws` module bug, temporarily remove validation length for Uint8Array + // https://github.com/websockets/ws/pull/645 + if(!isObject(data))return new Base(strictToLength(data, ISNT_UINT8)); + if(data instanceof $ArrayBuffer || (klass = classof(data)) == ARRAY_BUFFER || klass == SHARED_BUFFER){ + return $length !== undefined + ? new Base(data, toOffset($offset, BYTES), $length) + : $offset !== undefined + ? new Base(data, toOffset($offset, BYTES)) + : new Base(data); + } + if(TYPED_ARRAY in data)return fromList(TypedArray, data); + return $from.call(TypedArray, data); + }); + arrayForEach(TAC !== Function.prototype ? gOPN(Base).concat(gOPN(TAC)) : gOPN(Base), function(key){ + if(!(key in TypedArray))hide(TypedArray, key, Base[key]); + }); + TypedArray[PROTOTYPE] = TypedArrayPrototype; + if(!LIBRARY)TypedArrayPrototype.constructor = TypedArray; + } + var $nativeIterator = TypedArrayPrototype[ITERATOR] + , CORRECT_ITER_NAME = !!$nativeIterator && ($nativeIterator.name == 'values' || $nativeIterator.name == undefined) + , $iterator = $iterators.values; + hide(TypedArray, TYPED_CONSTRUCTOR, true); + hide(TypedArrayPrototype, TYPED_ARRAY, NAME); + hide(TypedArrayPrototype, VIEW, true); + hide(TypedArrayPrototype, DEF_CONSTRUCTOR, TypedArray); + + if(CLAMPED ? new TypedArray(1)[TAG] != NAME : !(TAG in TypedArrayPrototype)){ + dP(TypedArrayPrototype, TAG, { + get: function(){ return NAME; } + }); + } + + O[NAME] = TypedArray; + + $export($export.G + $export.W + $export.F * (TypedArray != Base), O); + + $export($export.S, NAME, { + BYTES_PER_ELEMENT: BYTES, + from: $from, + of: $of + }); + + if(!(BYTES_PER_ELEMENT in TypedArrayPrototype))hide(TypedArrayPrototype, BYTES_PER_ELEMENT, BYTES); + + $export($export.P, NAME, proto); + + setSpecies(NAME); + + $export($export.P + $export.F * FORCED_SET, NAME, {set: $set}); + + $export($export.P + $export.F * !CORRECT_ITER_NAME, NAME, $iterators); + + $export($export.P + $export.F * (TypedArrayPrototype.toString != arrayToString), NAME, {toString: arrayToString}); + + $export($export.P + $export.F * fails(function(){ + new TypedArray(1).slice(); + }), NAME, {slice: $slice}); + + $export($export.P + $export.F * (fails(function(){ + return [1, 2].toLocaleString() != new TypedArray([1, 2]).toLocaleString() + }) || !fails(function(){ + TypedArrayPrototype.toLocaleString.call([1, 2]); + })), NAME, {toLocaleString: $toLocaleString}); + + Iterators[NAME] = CORRECT_ITER_NAME ? $nativeIterator : $iterator; + if(!LIBRARY && !CORRECT_ITER_NAME)hide(TypedArrayPrototype, ITERATOR, $iterator); + }; +} else module.exports = function(){ /* empty */ }; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_typed-buffer.js b/pitfall/pdfkit/node_modules/core-js/modules/_typed-buffer.js new file mode 100644 index 00000000..2129eea4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_typed-buffer.js @@ -0,0 +1,273 @@ +'use strict'; +var global = require('./_global') + , DESCRIPTORS = require('./_descriptors') + , LIBRARY = require('./_library') + , $typed = require('./_typed') + , hide = require('./_hide') + , redefineAll = require('./_redefine-all') + , fails = require('./_fails') + , anInstance = require('./_an-instance') + , toInteger = require('./_to-integer') + , toLength = require('./_to-length') + , gOPN = require('./_object-gopn').f + , dP = require('./_object-dp').f + , arrayFill = require('./_array-fill') + , setToStringTag = require('./_set-to-string-tag') + , ARRAY_BUFFER = 'ArrayBuffer' + , DATA_VIEW = 'DataView' + , PROTOTYPE = 'prototype' + , WRONG_LENGTH = 'Wrong length!' + , WRONG_INDEX = 'Wrong index!' + , $ArrayBuffer = global[ARRAY_BUFFER] + , $DataView = global[DATA_VIEW] + , Math = global.Math + , RangeError = global.RangeError + , Infinity = global.Infinity + , BaseBuffer = $ArrayBuffer + , abs = Math.abs + , pow = Math.pow + , floor = Math.floor + , log = Math.log + , LN2 = Math.LN2 + , BUFFER = 'buffer' + , BYTE_LENGTH = 'byteLength' + , BYTE_OFFSET = 'byteOffset' + , $BUFFER = DESCRIPTORS ? '_b' : BUFFER + , $LENGTH = DESCRIPTORS ? '_l' : BYTE_LENGTH + , $OFFSET = DESCRIPTORS ? '_o' : BYTE_OFFSET; + +// IEEE754 conversions based on https://github.com/feross/ieee754 +var packIEEE754 = function(value, mLen, nBytes){ + var buffer = Array(nBytes) + , eLen = nBytes * 8 - mLen - 1 + , eMax = (1 << eLen) - 1 + , eBias = eMax >> 1 + , rt = mLen === 23 ? pow(2, -24) - pow(2, -77) : 0 + , i = 0 + , s = value < 0 || value === 0 && 1 / value < 0 ? 1 : 0 + , e, m, c; + value = abs(value) + if(value != value || value === Infinity){ + m = value != value ? 1 : 0; + e = eMax; + } else { + e = floor(log(value) / LN2); + if(value * (c = pow(2, -e)) < 1){ + e--; + c *= 2; + } + if(e + eBias >= 1){ + value += rt / c; + } else { + value += rt * pow(2, 1 - eBias); + } + if(value * c >= 2){ + e++; + c /= 2; + } + if(e + eBias >= eMax){ + m = 0; + e = eMax; + } else if(e + eBias >= 1){ + m = (value * c - 1) * pow(2, mLen); + e = e + eBias; + } else { + m = value * pow(2, eBias - 1) * pow(2, mLen); + e = 0; + } + } + for(; mLen >= 8; buffer[i++] = m & 255, m /= 256, mLen -= 8); + e = e << mLen | m; + eLen += mLen; + for(; eLen > 0; buffer[i++] = e & 255, e /= 256, eLen -= 8); + buffer[--i] |= s * 128; + return buffer; +}; +var unpackIEEE754 = function(buffer, mLen, nBytes){ + var eLen = nBytes * 8 - mLen - 1 + , eMax = (1 << eLen) - 1 + , eBias = eMax >> 1 + , nBits = eLen - 7 + , i = nBytes - 1 + , s = buffer[i--] + , e = s & 127 + , m; + s >>= 7; + for(; nBits > 0; e = e * 256 + buffer[i], i--, nBits -= 8); + m = e & (1 << -nBits) - 1; + e >>= -nBits; + nBits += mLen; + for(; nBits > 0; m = m * 256 + buffer[i], i--, nBits -= 8); + if(e === 0){ + e = 1 - eBias; + } else if(e === eMax){ + return m ? NaN : s ? -Infinity : Infinity; + } else { + m = m + pow(2, mLen); + e = e - eBias; + } return (s ? -1 : 1) * m * pow(2, e - mLen); +}; + +var unpackI32 = function(bytes){ + return bytes[3] << 24 | bytes[2] << 16 | bytes[1] << 8 | bytes[0]; +}; +var packI8 = function(it){ + return [it & 0xff]; +}; +var packI16 = function(it){ + return [it & 0xff, it >> 8 & 0xff]; +}; +var packI32 = function(it){ + return [it & 0xff, it >> 8 & 0xff, it >> 16 & 0xff, it >> 24 & 0xff]; +}; +var packF64 = function(it){ + return packIEEE754(it, 52, 8); +}; +var packF32 = function(it){ + return packIEEE754(it, 23, 4); +}; + +var addGetter = function(C, key, internal){ + dP(C[PROTOTYPE], key, {get: function(){ return this[internal]; }}); +}; + +var get = function(view, bytes, index, isLittleEndian){ + var numIndex = +index + , intIndex = toInteger(numIndex); + if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b + , start = intIndex + view[$OFFSET] + , pack = store.slice(start, start + bytes); + return isLittleEndian ? pack : pack.reverse(); +}; +var set = function(view, bytes, index, conversion, value, isLittleEndian){ + var numIndex = +index + , intIndex = toInteger(numIndex); + if(numIndex != intIndex || intIndex < 0 || intIndex + bytes > view[$LENGTH])throw RangeError(WRONG_INDEX); + var store = view[$BUFFER]._b + , start = intIndex + view[$OFFSET] + , pack = conversion(+value); + for(var i = 0; i < bytes; i++)store[start + i] = pack[isLittleEndian ? i : bytes - i - 1]; +}; + +var validateArrayBufferArguments = function(that, length){ + anInstance(that, $ArrayBuffer, ARRAY_BUFFER); + var numberLength = +length + , byteLength = toLength(numberLength); + if(numberLength != byteLength)throw RangeError(WRONG_LENGTH); + return byteLength; +}; + +if(!$typed.ABV){ + $ArrayBuffer = function ArrayBuffer(length){ + var byteLength = validateArrayBufferArguments(this, length); + this._b = arrayFill.call(Array(byteLength), 0); + this[$LENGTH] = byteLength; + }; + + $DataView = function DataView(buffer, byteOffset, byteLength){ + anInstance(this, $DataView, DATA_VIEW); + anInstance(buffer, $ArrayBuffer, DATA_VIEW); + var bufferLength = buffer[$LENGTH] + , offset = toInteger(byteOffset); + if(offset < 0 || offset > bufferLength)throw RangeError('Wrong offset!'); + byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); + if(offset + byteLength > bufferLength)throw RangeError(WRONG_LENGTH); + this[$BUFFER] = buffer; + this[$OFFSET] = offset; + this[$LENGTH] = byteLength; + }; + + if(DESCRIPTORS){ + addGetter($ArrayBuffer, BYTE_LENGTH, '_l'); + addGetter($DataView, BUFFER, '_b'); + addGetter($DataView, BYTE_LENGTH, '_l'); + addGetter($DataView, BYTE_OFFSET, '_o'); + } + + redefineAll($DataView[PROTOTYPE], { + getInt8: function getInt8(byteOffset){ + return get(this, 1, byteOffset)[0] << 24 >> 24; + }, + getUint8: function getUint8(byteOffset){ + return get(this, 1, byteOffset)[0]; + }, + getInt16: function getInt16(byteOffset /*, littleEndian */){ + var bytes = get(this, 2, byteOffset, arguments[1]); + return (bytes[1] << 8 | bytes[0]) << 16 >> 16; + }, + getUint16: function getUint16(byteOffset /*, littleEndian */){ + var bytes = get(this, 2, byteOffset, arguments[1]); + return bytes[1] << 8 | bytes[0]; + }, + getInt32: function getInt32(byteOffset /*, littleEndian */){ + return unpackI32(get(this, 4, byteOffset, arguments[1])); + }, + getUint32: function getUint32(byteOffset /*, littleEndian */){ + return unpackI32(get(this, 4, byteOffset, arguments[1])) >>> 0; + }, + getFloat32: function getFloat32(byteOffset /*, littleEndian */){ + return unpackIEEE754(get(this, 4, byteOffset, arguments[1]), 23, 4); + }, + getFloat64: function getFloat64(byteOffset /*, littleEndian */){ + return unpackIEEE754(get(this, 8, byteOffset, arguments[1]), 52, 8); + }, + setInt8: function setInt8(byteOffset, value){ + set(this, 1, byteOffset, packI8, value); + }, + setUint8: function setUint8(byteOffset, value){ + set(this, 1, byteOffset, packI8, value); + }, + setInt16: function setInt16(byteOffset, value /*, littleEndian */){ + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setUint16: function setUint16(byteOffset, value /*, littleEndian */){ + set(this, 2, byteOffset, packI16, value, arguments[2]); + }, + setInt32: function setInt32(byteOffset, value /*, littleEndian */){ + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setUint32: function setUint32(byteOffset, value /*, littleEndian */){ + set(this, 4, byteOffset, packI32, value, arguments[2]); + }, + setFloat32: function setFloat32(byteOffset, value /*, littleEndian */){ + set(this, 4, byteOffset, packF32, value, arguments[2]); + }, + setFloat64: function setFloat64(byteOffset, value /*, littleEndian */){ + set(this, 8, byteOffset, packF64, value, arguments[2]); + } + }); +} else { + if(!fails(function(){ + new $ArrayBuffer; // eslint-disable-line no-new + }) || !fails(function(){ + new $ArrayBuffer(.5); // eslint-disable-line no-new + })){ + $ArrayBuffer = function ArrayBuffer(length){ + return new BaseBuffer(validateArrayBufferArguments(this, length)); + }; + var ArrayBufferProto = $ArrayBuffer[PROTOTYPE] = BaseBuffer[PROTOTYPE]; + for(var keys = gOPN(BaseBuffer), j = 0, key; keys.length > j; ){ + if(!((key = keys[j++]) in $ArrayBuffer))hide($ArrayBuffer, key, BaseBuffer[key]); + }; + if(!LIBRARY)ArrayBufferProto.constructor = $ArrayBuffer; + } + // iOS Safari 7.x bug + var view = new $DataView(new $ArrayBuffer(2)) + , $setInt8 = $DataView[PROTOTYPE].setInt8; + view.setInt8(0, 2147483648); + view.setInt8(1, 2147483649); + if(view.getInt8(0) || !view.getInt8(1))redefineAll($DataView[PROTOTYPE], { + setInt8: function setInt8(byteOffset, value){ + $setInt8.call(this, byteOffset, value << 24 >> 24); + }, + setUint8: function setUint8(byteOffset, value){ + $setInt8.call(this, byteOffset, value << 24 >> 24); + } + }, true); +} +setToStringTag($ArrayBuffer, ARRAY_BUFFER); +setToStringTag($DataView, DATA_VIEW); +hide($DataView[PROTOTYPE], $typed.VIEW, true); +exports[ARRAY_BUFFER] = $ArrayBuffer; +exports[DATA_VIEW] = $DataView; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_typed.js b/pitfall/pdfkit/node_modules/core-js/modules/_typed.js new file mode 100644 index 00000000..6ed2ab56 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_typed.js @@ -0,0 +1,26 @@ +var global = require('./_global') + , hide = require('./_hide') + , uid = require('./_uid') + , TYPED = uid('typed_array') + , VIEW = uid('view') + , ABV = !!(global.ArrayBuffer && global.DataView) + , CONSTR = ABV + , i = 0, l = 9, Typed; + +var TypedArrayConstructors = ( + 'Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array' +).split(','); + +while(i < l){ + if(Typed = global[TypedArrayConstructors[i++]]){ + hide(Typed.prototype, TYPED, true); + hide(Typed.prototype, VIEW, true); + } else CONSTR = false; +} + +module.exports = { + ABV: ABV, + CONSTR: CONSTR, + TYPED: TYPED, + VIEW: VIEW +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_uid.js b/pitfall/pdfkit/node_modules/core-js/modules/_uid.js new file mode 100644 index 00000000..3be4196b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_uid.js @@ -0,0 +1,5 @@ +var id = 0 + , px = Math.random(); +module.exports = function(key){ + return 'Symbol('.concat(key === undefined ? '' : key, ')_', (++id + px).toString(36)); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_wks-define.js b/pitfall/pdfkit/node_modules/core-js/modules/_wks-define.js new file mode 100644 index 00000000..e6960328 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_wks-define.js @@ -0,0 +1,9 @@ +var global = require('./_global') + , core = require('./_core') + , LIBRARY = require('./_library') + , wksExt = require('./_wks-ext') + , defineProperty = require('./_object-dp').f; +module.exports = function(name){ + var $Symbol = core.Symbol || (core.Symbol = LIBRARY ? {} : global.Symbol || {}); + if(name.charAt(0) != '_' && !(name in $Symbol))defineProperty($Symbol, name, {value: wksExt.f(name)}); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_wks-ext.js b/pitfall/pdfkit/node_modules/core-js/modules/_wks-ext.js new file mode 100644 index 00000000..7901def6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_wks-ext.js @@ -0,0 +1 @@ +exports.f = require('./_wks'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/_wks.js b/pitfall/pdfkit/node_modules/core-js/modules/_wks.js new file mode 100644 index 00000000..36f7973a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/_wks.js @@ -0,0 +1,11 @@ +var store = require('./_shared')('wks') + , uid = require('./_uid') + , Symbol = require('./_global').Symbol + , USE_SYMBOL = typeof Symbol == 'function'; + +var $exports = module.exports = function(name){ + return store[name] || (store[name] = + USE_SYMBOL && Symbol[name] || (USE_SYMBOL ? Symbol : uid)('Symbol.' + name)); +}; + +$exports.store = store; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/core.delay.js b/pitfall/pdfkit/node_modules/core-js/modules/core.delay.js new file mode 100644 index 00000000..ea031be4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/core.delay.js @@ -0,0 +1,12 @@ +var global = require('./_global') + , core = require('./_core') + , $export = require('./_export') + , partial = require('./_partial'); +// https://esdiscuss.org/topic/promise-returning-delay-function +$export($export.G + $export.F, { + delay: function delay(time){ + return new (core.Promise || global.Promise)(function(resolve){ + setTimeout(partial.call(resolve, true), time); + }); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/core.dict.js b/pitfall/pdfkit/node_modules/core-js/modules/core.dict.js new file mode 100644 index 00000000..88c54e3d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/core.dict.js @@ -0,0 +1,155 @@ +'use strict'; +var ctx = require('./_ctx') + , $export = require('./_export') + , createDesc = require('./_property-desc') + , assign = require('./_object-assign') + , create = require('./_object-create') + , getPrototypeOf = require('./_object-gpo') + , getKeys = require('./_object-keys') + , dP = require('./_object-dp') + , keyOf = require('./_keyof') + , aFunction = require('./_a-function') + , forOf = require('./_for-of') + , isIterable = require('./core.is-iterable') + , $iterCreate = require('./_iter-create') + , step = require('./_iter-step') + , isObject = require('./_is-object') + , toIObject = require('./_to-iobject') + , DESCRIPTORS = require('./_descriptors') + , has = require('./_has'); + +// 0 -> Dict.forEach +// 1 -> Dict.map +// 2 -> Dict.filter +// 3 -> Dict.some +// 4 -> Dict.every +// 5 -> Dict.find +// 6 -> Dict.findKey +// 7 -> Dict.mapPairs +var createDictMethod = function(TYPE){ + var IS_MAP = TYPE == 1 + , IS_EVERY = TYPE == 4; + return function(object, callbackfn, that /* = undefined */){ + var f = ctx(callbackfn, that, 3) + , O = toIObject(object) + , result = IS_MAP || TYPE == 7 || TYPE == 2 + ? new (typeof this == 'function' ? this : Dict) : undefined + , key, val, res; + for(key in O)if(has(O, key)){ + val = O[key]; + res = f(val, key, object); + if(TYPE){ + if(IS_MAP)result[key] = res; // map + else if(res)switch(TYPE){ + case 2: result[key] = val; break; // filter + case 3: return true; // some + case 5: return val; // find + case 6: return key; // findKey + case 7: result[res[0]] = res[1]; // mapPairs + } else if(IS_EVERY)return false; // every + } + } + return TYPE == 3 || IS_EVERY ? IS_EVERY : result; + }; +}; +var findKey = createDictMethod(6); + +var createDictIter = function(kind){ + return function(it){ + return new DictIterator(it, kind); + }; +}; +var DictIterator = function(iterated, kind){ + this._t = toIObject(iterated); // target + this._a = getKeys(iterated); // keys + this._i = 0; // next index + this._k = kind; // kind +}; +$iterCreate(DictIterator, 'Dict', function(){ + var that = this + , O = that._t + , keys = that._a + , kind = that._k + , key; + do { + if(that._i >= keys.length){ + that._t = undefined; + return step(1); + } + } while(!has(O, key = keys[that._i++])); + if(kind == 'keys' )return step(0, key); + if(kind == 'values')return step(0, O[key]); + return step(0, [key, O[key]]); +}); + +function Dict(iterable){ + var dict = create(null); + if(iterable != undefined){ + if(isIterable(iterable)){ + forOf(iterable, true, function(key, value){ + dict[key] = value; + }); + } else assign(dict, iterable); + } + return dict; +} +Dict.prototype = null; + +function reduce(object, mapfn, init){ + aFunction(mapfn); + var O = toIObject(object) + , keys = getKeys(O) + , length = keys.length + , i = 0 + , memo, key; + if(arguments.length < 3){ + if(!length)throw TypeError('Reduce of empty object with no initial value'); + memo = O[keys[i++]]; + } else memo = Object(init); + while(length > i)if(has(O, key = keys[i++])){ + memo = mapfn(memo, O[key], key, object); + } + return memo; +} + +function includes(object, el){ + return (el == el ? keyOf(object, el) : findKey(object, function(it){ + return it != it; + })) !== undefined; +} + +function get(object, key){ + if(has(object, key))return object[key]; +} +function set(object, key, value){ + if(DESCRIPTORS && key in Object)dP.f(object, key, createDesc(0, value)); + else object[key] = value; + return object; +} + +function isDict(it){ + return isObject(it) && getPrototypeOf(it) === Dict.prototype; +} + +$export($export.G + $export.F, {Dict: Dict}); + +$export($export.S, 'Dict', { + keys: createDictIter('keys'), + values: createDictIter('values'), + entries: createDictIter('entries'), + forEach: createDictMethod(0), + map: createDictMethod(1), + filter: createDictMethod(2), + some: createDictMethod(3), + every: createDictMethod(4), + find: createDictMethod(5), + findKey: findKey, + mapPairs: createDictMethod(7), + reduce: reduce, + keyOf: keyOf, + includes: includes, + has: has, + get: get, + set: set, + isDict: isDict +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/core.function.part.js b/pitfall/pdfkit/node_modules/core-js/modules/core.function.part.js new file mode 100644 index 00000000..ce851ff8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/core.function.part.js @@ -0,0 +1,7 @@ +var path = require('./_path') + , $export = require('./_export'); + +// Placeholder +require('./_core')._ = path._ = path._ || {}; + +$export($export.P + $export.F, 'Function', {part: require('./_partial')}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/core.get-iterator-method.js b/pitfall/pdfkit/node_modules/core-js/modules/core.get-iterator-method.js new file mode 100644 index 00000000..e2c7ecc3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/core.get-iterator-method.js @@ -0,0 +1,8 @@ +var classof = require('./_classof') + , ITERATOR = require('./_wks')('iterator') + , Iterators = require('./_iterators'); +module.exports = require('./_core').getIteratorMethod = function(it){ + if(it != undefined)return it[ITERATOR] + || it['@@iterator'] + || Iterators[classof(it)]; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/core.get-iterator.js b/pitfall/pdfkit/node_modules/core-js/modules/core.get-iterator.js new file mode 100644 index 00000000..c292e1ab --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/core.get-iterator.js @@ -0,0 +1,7 @@ +var anObject = require('./_an-object') + , get = require('./core.get-iterator-method'); +module.exports = require('./_core').getIterator = function(it){ + var iterFn = get(it); + if(typeof iterFn != 'function')throw TypeError(it + ' is not iterable!'); + return anObject(iterFn.call(it)); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/core.is-iterable.js b/pitfall/pdfkit/node_modules/core-js/modules/core.is-iterable.js new file mode 100644 index 00000000..b2b01b6b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/core.is-iterable.js @@ -0,0 +1,9 @@ +var classof = require('./_classof') + , ITERATOR = require('./_wks')('iterator') + , Iterators = require('./_iterators'); +module.exports = require('./_core').isIterable = function(it){ + var O = Object(it); + return O[ITERATOR] !== undefined + || '@@iterator' in O + || Iterators.hasOwnProperty(classof(O)); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/core.number.iterator.js b/pitfall/pdfkit/node_modules/core-js/modules/core.number.iterator.js new file mode 100644 index 00000000..9700acba --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/core.number.iterator.js @@ -0,0 +1,9 @@ +'use strict'; +require('./_iter-define')(Number, 'Number', function(iterated){ + this._l = +iterated; + this._i = 0; +}, function(){ + var i = this._i++ + , done = !(i < this._l); + return {done: done, value: done ? undefined : i}; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/core.object.classof.js b/pitfall/pdfkit/node_modules/core-js/modules/core.object.classof.js new file mode 100644 index 00000000..342c7371 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/core.object.classof.js @@ -0,0 +1,3 @@ +var $export = require('./_export'); + +$export($export.S + $export.F, 'Object', {classof: require('./_classof')}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/core.object.define.js b/pitfall/pdfkit/node_modules/core-js/modules/core.object.define.js new file mode 100644 index 00000000..d60e9a95 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/core.object.define.js @@ -0,0 +1,4 @@ +var $export = require('./_export') + , define = require('./_object-define'); + +$export($export.S + $export.F, 'Object', {define: define}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/core.object.is-object.js b/pitfall/pdfkit/node_modules/core-js/modules/core.object.is-object.js new file mode 100644 index 00000000..f2ba059f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/core.object.is-object.js @@ -0,0 +1,3 @@ +var $export = require('./_export'); + +$export($export.S + $export.F, 'Object', {isObject: require('./_is-object')}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/core.object.make.js b/pitfall/pdfkit/node_modules/core-js/modules/core.object.make.js new file mode 100644 index 00000000..3d2a2b5f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/core.object.make.js @@ -0,0 +1,9 @@ +var $export = require('./_export') + , define = require('./_object-define') + , create = require('./_object-create'); + +$export($export.S + $export.F, 'Object', { + make: function(proto, mixin){ + return define(create(proto), mixin); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/core.regexp.escape.js b/pitfall/pdfkit/node_modules/core-js/modules/core.regexp.escape.js new file mode 100644 index 00000000..54f832ef --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/core.regexp.escape.js @@ -0,0 +1,5 @@ +// https://github.com/benjamingr/RexExp.escape +var $export = require('./_export') + , $re = require('./_replacer')(/[\\^$*+?.()|[\]{}]/g, '\\$&'); + +$export($export.S, 'RegExp', {escape: function escape(it){ return $re(it); }}); diff --git a/pitfall/pdfkit/node_modules/core-js/modules/core.string.escape-html.js b/pitfall/pdfkit/node_modules/core-js/modules/core.string.escape-html.js new file mode 100644 index 00000000..a4b8d2f0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/core.string.escape-html.js @@ -0,0 +1,11 @@ +'use strict'; +var $export = require('./_export'); +var $re = require('./_replacer')(/[&<>"']/g, { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' +}); + +$export($export.P + $export.F, 'String', {escapeHTML: function escapeHTML(){ return $re(this); }}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/core.string.unescape-html.js b/pitfall/pdfkit/node_modules/core-js/modules/core.string.unescape-html.js new file mode 100644 index 00000000..413622b9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/core.string.unescape-html.js @@ -0,0 +1,11 @@ +'use strict'; +var $export = require('./_export'); +var $re = require('./_replacer')(/&(?:amp|lt|gt|quot|apos);/g, { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + ''': "'" +}); + +$export($export.P + $export.F, 'String', {unescapeHTML: function unescapeHTML(){ return $re(this); }}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es5.js b/pitfall/pdfkit/node_modules/core-js/modules/es5.js new file mode 100644 index 00000000..dd7ebadf --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es5.js @@ -0,0 +1,35 @@ +// This file still here for a legacy code and will be removed in a near time +require('./es6.object.create'); +require('./es6.object.define-property'); +require('./es6.object.define-properties'); +require('./es6.object.get-own-property-descriptor'); +require('./es6.object.get-prototype-of'); +require('./es6.object.keys'); +require('./es6.object.get-own-property-names'); +require('./es6.object.freeze'); +require('./es6.object.seal'); +require('./es6.object.prevent-extensions'); +require('./es6.object.is-frozen'); +require('./es6.object.is-sealed'); +require('./es6.object.is-extensible'); +require('./es6.function.bind'); +require('./es6.array.is-array'); +require('./es6.array.join'); +require('./es6.array.slice'); +require('./es6.array.sort'); +require('./es6.array.for-each'); +require('./es6.array.map'); +require('./es6.array.filter'); +require('./es6.array.some'); +require('./es6.array.every'); +require('./es6.array.reduce'); +require('./es6.array.reduce-right'); +require('./es6.array.index-of'); +require('./es6.array.last-index-of'); +require('./es6.date.now'); +require('./es6.date.to-iso-string'); +require('./es6.date.to-json'); +require('./es6.parse-int'); +require('./es6.parse-float'); +require('./es6.string.trim'); +require('./es6.regexp.to-string'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.array.copy-within.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.copy-within.js new file mode 100644 index 00000000..027f7550 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.copy-within.js @@ -0,0 +1,6 @@ +// 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) +var $export = require('./_export'); + +$export($export.P, 'Array', {copyWithin: require('./_array-copy-within')}); + +require('./_add-to-unscopables')('copyWithin'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.array.every.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.every.js new file mode 100644 index 00000000..fb067367 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.every.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export') + , $every = require('./_array-methods')(4); + +$export($export.P + $export.F * !require('./_strict-method')([].every, true), 'Array', { + // 22.1.3.5 / 15.4.4.16 Array.prototype.every(callbackfn [, thisArg]) + every: function every(callbackfn /* , thisArg */){ + return $every(this, callbackfn, arguments[1]); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.array.fill.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.fill.js new file mode 100644 index 00000000..f075c001 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.fill.js @@ -0,0 +1,6 @@ +// 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) +var $export = require('./_export'); + +$export($export.P, 'Array', {fill: require('./_array-fill')}); + +require('./_add-to-unscopables')('fill'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.array.filter.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.filter.js new file mode 100644 index 00000000..f60951d3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.filter.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export') + , $filter = require('./_array-methods')(2); + +$export($export.P + $export.F * !require('./_strict-method')([].filter, true), 'Array', { + // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg]) + filter: function filter(callbackfn /* , thisArg */){ + return $filter(this, callbackfn, arguments[1]); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.array.find-index.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.find-index.js new file mode 100644 index 00000000..53090741 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.find-index.js @@ -0,0 +1,14 @@ +'use strict'; +// 22.1.3.9 Array.prototype.findIndex(predicate, thisArg = undefined) +var $export = require('./_export') + , $find = require('./_array-methods')(6) + , KEY = 'findIndex' + , forced = true; +// Shouldn't skip holes +if(KEY in [])Array(1)[KEY](function(){ forced = false; }); +$export($export.P + $export.F * forced, 'Array', { + findIndex: function findIndex(callbackfn/*, that = undefined */){ + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } +}); +require('./_add-to-unscopables')(KEY); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.array.find.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.find.js new file mode 100644 index 00000000..90a9acfb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.find.js @@ -0,0 +1,14 @@ +'use strict'; +// 22.1.3.8 Array.prototype.find(predicate, thisArg = undefined) +var $export = require('./_export') + , $find = require('./_array-methods')(5) + , KEY = 'find' + , forced = true; +// Shouldn't skip holes +if(KEY in [])Array(1)[KEY](function(){ forced = false; }); +$export($export.P + $export.F * forced, 'Array', { + find: function find(callbackfn/*, that = undefined */){ + return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); + } +}); +require('./_add-to-unscopables')(KEY); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.array.for-each.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.for-each.js new file mode 100644 index 00000000..f814fe4e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.for-each.js @@ -0,0 +1,11 @@ +'use strict'; +var $export = require('./_export') + , $forEach = require('./_array-methods')(0) + , STRICT = require('./_strict-method')([].forEach, true); + +$export($export.P + $export.F * !STRICT, 'Array', { + // 22.1.3.10 / 15.4.4.18 Array.prototype.forEach(callbackfn [, thisArg]) + forEach: function forEach(callbackfn /* , thisArg */){ + return $forEach(this, callbackfn, arguments[1]); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.array.from.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.from.js new file mode 100644 index 00000000..69e5d4a6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.from.js @@ -0,0 +1,37 @@ +'use strict'; +var ctx = require('./_ctx') + , $export = require('./_export') + , toObject = require('./_to-object') + , call = require('./_iter-call') + , isArrayIter = require('./_is-array-iter') + , toLength = require('./_to-length') + , createProperty = require('./_create-property') + , getIterFn = require('./core.get-iterator-method'); + +$export($export.S + $export.F * !require('./_iter-detect')(function(iter){ Array.from(iter); }), 'Array', { + // 22.1.2.1 Array.from(arrayLike, mapfn = undefined, thisArg = undefined) + from: function from(arrayLike/*, mapfn = undefined, thisArg = undefined*/){ + var O = toObject(arrayLike) + , C = typeof this == 'function' ? this : Array + , aLen = arguments.length + , mapfn = aLen > 1 ? arguments[1] : undefined + , mapping = mapfn !== undefined + , index = 0 + , iterFn = getIterFn(O) + , length, result, step, iterator; + if(mapping)mapfn = ctx(mapfn, aLen > 2 ? arguments[2] : undefined, 2); + // if object isn't iterable or it's array with default iterator - use simple case + if(iterFn != undefined && !(C == Array && isArrayIter(iterFn))){ + for(iterator = iterFn.call(O), result = new C; !(step = iterator.next()).done; index++){ + createProperty(result, index, mapping ? call(iterator, mapfn, [step.value, index], true) : step.value); + } + } else { + length = toLength(O.length); + for(result = new C(length); length > index; index++){ + createProperty(result, index, mapping ? mapfn(O[index], index) : O[index]); + } + } + result.length = index; + return result; + } +}); diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.array.index-of.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.index-of.js new file mode 100644 index 00000000..90376315 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.index-of.js @@ -0,0 +1,15 @@ +'use strict'; +var $export = require('./_export') + , $indexOf = require('./_array-includes')(false) + , $native = [].indexOf + , NEGATIVE_ZERO = !!$native && 1 / [1].indexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($native)), 'Array', { + // 22.1.3.11 / 15.4.4.14 Array.prototype.indexOf(searchElement [, fromIndex]) + indexOf: function indexOf(searchElement /*, fromIndex = 0 */){ + return NEGATIVE_ZERO + // convert -0 to +0 + ? $native.apply(this, arguments) || 0 + : $indexOf(this, searchElement, arguments[1]); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.array.is-array.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.is-array.js new file mode 100644 index 00000000..cd5d8c19 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.is-array.js @@ -0,0 +1,4 @@ +// 22.1.2.2 / 15.4.3.2 Array.isArray(arg) +var $export = require('./_export'); + +$export($export.S, 'Array', {isArray: require('./_is-array')}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.array.iterator.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.iterator.js new file mode 100644 index 00000000..100b344d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.iterator.js @@ -0,0 +1,34 @@ +'use strict'; +var addToUnscopables = require('./_add-to-unscopables') + , step = require('./_iter-step') + , Iterators = require('./_iterators') + , toIObject = require('./_to-iobject'); + +// 22.1.3.4 Array.prototype.entries() +// 22.1.3.13 Array.prototype.keys() +// 22.1.3.29 Array.prototype.values() +// 22.1.3.30 Array.prototype[@@iterator]() +module.exports = require('./_iter-define')(Array, 'Array', function(iterated, kind){ + this._t = toIObject(iterated); // target + this._i = 0; // next index + this._k = kind; // kind +// 22.1.5.2.1 %ArrayIteratorPrototype%.next() +}, function(){ + var O = this._t + , kind = this._k + , index = this._i++; + if(!O || index >= O.length){ + this._t = undefined; + return step(1); + } + if(kind == 'keys' )return step(0, index); + if(kind == 'values')return step(0, O[index]); + return step(0, [index, O[index]]); +}, 'values'); + +// argumentsList[@@iterator] is %ArrayProto_values% (9.4.4.6, 9.4.4.7) +Iterators.Arguments = Iterators.Array; + +addToUnscopables('keys'); +addToUnscopables('values'); +addToUnscopables('entries'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.array.join.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.join.js new file mode 100644 index 00000000..1bb65653 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.join.js @@ -0,0 +1,12 @@ +'use strict'; +// 22.1.3.13 Array.prototype.join(separator) +var $export = require('./_export') + , toIObject = require('./_to-iobject') + , arrayJoin = [].join; + +// fallback for not array-like strings +$export($export.P + $export.F * (require('./_iobject') != Object || !require('./_strict-method')(arrayJoin)), 'Array', { + join: function join(separator){ + return arrayJoin.call(toIObject(this), separator === undefined ? ',' : separator); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.array.last-index-of.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.last-index-of.js new file mode 100644 index 00000000..75c1eabf --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.last-index-of.js @@ -0,0 +1,22 @@ +'use strict'; +var $export = require('./_export') + , toIObject = require('./_to-iobject') + , toInteger = require('./_to-integer') + , toLength = require('./_to-length') + , $native = [].lastIndexOf + , NEGATIVE_ZERO = !!$native && 1 / [1].lastIndexOf(1, -0) < 0; + +$export($export.P + $export.F * (NEGATIVE_ZERO || !require('./_strict-method')($native)), 'Array', { + // 22.1.3.14 / 15.4.4.15 Array.prototype.lastIndexOf(searchElement [, fromIndex]) + lastIndexOf: function lastIndexOf(searchElement /*, fromIndex = @[*-1] */){ + // convert -0 to +0 + if(NEGATIVE_ZERO)return $native.apply(this, arguments) || 0; + var O = toIObject(this) + , length = toLength(O.length) + , index = length - 1; + if(arguments.length > 1)index = Math.min(index, toInteger(arguments[1])); + if(index < 0)index = length + index; + for(;index >= 0; index--)if(index in O)if(O[index] === searchElement)return index || 0; + return -1; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.array.map.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.map.js new file mode 100644 index 00000000..f70089f3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.map.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export') + , $map = require('./_array-methods')(1); + +$export($export.P + $export.F * !require('./_strict-method')([].map, true), 'Array', { + // 22.1.3.15 / 15.4.4.19 Array.prototype.map(callbackfn [, thisArg]) + map: function map(callbackfn /* , thisArg */){ + return $map(this, callbackfn, arguments[1]); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.array.of.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.of.js new file mode 100644 index 00000000..dd4e1f81 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.of.js @@ -0,0 +1,19 @@ +'use strict'; +var $export = require('./_export') + , createProperty = require('./_create-property'); + +// WebKit Array.of isn't generic +$export($export.S + $export.F * require('./_fails')(function(){ + function F(){} + return !(Array.of.call(F) instanceof F); +}), 'Array', { + // 22.1.2.3 Array.of( ...items) + of: function of(/* ...args */){ + var index = 0 + , aLen = arguments.length + , result = new (typeof this == 'function' ? this : Array)(aLen); + while(aLen > index)createProperty(result, index, arguments[index++]); + result.length = aLen; + return result; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.array.reduce-right.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.reduce-right.js new file mode 100644 index 00000000..0c64d85e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.reduce-right.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export') + , $reduce = require('./_array-reduce'); + +$export($export.P + $export.F * !require('./_strict-method')([].reduceRight, true), 'Array', { + // 22.1.3.19 / 15.4.4.22 Array.prototype.reduceRight(callbackfn [, initialValue]) + reduceRight: function reduceRight(callbackfn /* , initialValue */){ + return $reduce(this, callbackfn, arguments.length, arguments[1], true); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.array.reduce.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.reduce.js new file mode 100644 index 00000000..491f7d25 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.reduce.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export') + , $reduce = require('./_array-reduce'); + +$export($export.P + $export.F * !require('./_strict-method')([].reduce, true), 'Array', { + // 22.1.3.18 / 15.4.4.21 Array.prototype.reduce(callbackfn [, initialValue]) + reduce: function reduce(callbackfn /* , initialValue */){ + return $reduce(this, callbackfn, arguments.length, arguments[1], false); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.array.slice.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.slice.js new file mode 100644 index 00000000..610bd399 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.slice.js @@ -0,0 +1,28 @@ +'use strict'; +var $export = require('./_export') + , html = require('./_html') + , cof = require('./_cof') + , toIndex = require('./_to-index') + , toLength = require('./_to-length') + , arraySlice = [].slice; + +// fallback for not array-like ES3 strings and DOM objects +$export($export.P + $export.F * require('./_fails')(function(){ + if(html)arraySlice.call(html); +}), 'Array', { + slice: function slice(begin, end){ + var len = toLength(this.length) + , klass = cof(this); + end = end === undefined ? len : end; + if(klass == 'Array')return arraySlice.call(this, begin, end); + var start = toIndex(begin, len) + , upTo = toIndex(end, len) + , size = toLength(upTo - start) + , cloned = Array(size) + , i = 0; + for(; i < size; i++)cloned[i] = klass == 'String' + ? this.charAt(start + i) + : this[start + i]; + return cloned; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.array.some.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.some.js new file mode 100644 index 00000000..fa1095ed --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.some.js @@ -0,0 +1,10 @@ +'use strict'; +var $export = require('./_export') + , $some = require('./_array-methods')(3); + +$export($export.P + $export.F * !require('./_strict-method')([].some, true), 'Array', { + // 22.1.3.23 / 15.4.4.17 Array.prototype.some(callbackfn [, thisArg]) + some: function some(callbackfn /* , thisArg */){ + return $some(this, callbackfn, arguments[1]); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.array.sort.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.sort.js new file mode 100644 index 00000000..7de1fe77 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.sort.js @@ -0,0 +1,23 @@ +'use strict'; +var $export = require('./_export') + , aFunction = require('./_a-function') + , toObject = require('./_to-object') + , fails = require('./_fails') + , $sort = [].sort + , test = [1, 2, 3]; + +$export($export.P + $export.F * (fails(function(){ + // IE8- + test.sort(undefined); +}) || !fails(function(){ + // V8 bug + test.sort(null); + // Old WebKit +}) || !require('./_strict-method')($sort)), 'Array', { + // 22.1.3.25 Array.prototype.sort(comparefn) + sort: function sort(comparefn){ + return comparefn === undefined + ? $sort.call(toObject(this)) + : $sort.call(toObject(this), aFunction(comparefn)); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.array.species.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.species.js new file mode 100644 index 00000000..d63c738f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.array.species.js @@ -0,0 +1 @@ +require('./_set-species')('Array'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.date.now.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.date.now.js new file mode 100644 index 00000000..c3ee5fd7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.date.now.js @@ -0,0 +1,4 @@ +// 20.3.3.1 / 15.9.4.4 Date.now() +var $export = require('./_export'); + +$export($export.S, 'Date', {now: function(){ return new Date().getTime(); }}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.date.to-iso-string.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.date.to-iso-string.js new file mode 100644 index 00000000..2426c589 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.date.to-iso-string.js @@ -0,0 +1,28 @@ +'use strict'; +// 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() +var $export = require('./_export') + , fails = require('./_fails') + , getTime = Date.prototype.getTime; + +var lz = function(num){ + return num > 9 ? num : '0' + num; +}; + +// PhantomJS / old WebKit has a broken implementations +$export($export.P + $export.F * (fails(function(){ + return new Date(-5e13 - 1).toISOString() != '0385-07-25T07:06:39.999Z'; +}) || !fails(function(){ + new Date(NaN).toISOString(); +})), 'Date', { + toISOString: function toISOString(){ + if(!isFinite(getTime.call(this)))throw RangeError('Invalid time value'); + var d = this + , y = d.getUTCFullYear() + , m = d.getUTCMilliseconds() + , s = y < 0 ? '-' : y > 9999 ? '+' : ''; + return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + + '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) + + 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) + + ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z'; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.date.to-json.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.date.to-json.js new file mode 100644 index 00000000..eb419d03 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.date.to-json.js @@ -0,0 +1,14 @@ +'use strict'; +var $export = require('./_export') + , toObject = require('./_to-object') + , toPrimitive = require('./_to-primitive'); + +$export($export.P + $export.F * require('./_fails')(function(){ + return new Date(NaN).toJSON() !== null || Date.prototype.toJSON.call({toISOString: function(){ return 1; }}) !== 1; +}), 'Date', { + toJSON: function toJSON(key){ + var O = toObject(this) + , pv = toPrimitive(O); + return typeof pv == 'number' && !isFinite(pv) ? null : O.toISOString(); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.date.to-primitive.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.date.to-primitive.js new file mode 100644 index 00000000..15a823d5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.date.to-primitive.js @@ -0,0 +1,4 @@ +var TO_PRIMITIVE = require('./_wks')('toPrimitive') + , proto = Date.prototype; + +if(!(TO_PRIMITIVE in proto))require('./_hide')(proto, TO_PRIMITIVE, require('./_date-to-primitive')); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.date.to-string.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.date.to-string.js new file mode 100644 index 00000000..686e949e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.date.to-string.js @@ -0,0 +1,11 @@ +var DateProto = Date.prototype + , INVALID_DATE = 'Invalid Date' + , TO_STRING = 'toString' + , $toString = DateProto[TO_STRING] + , getTime = DateProto.getTime; +if(new Date(NaN) + '' != INVALID_DATE){ + require('./_redefine')(DateProto, TO_STRING, function toString(){ + var value = getTime.call(this); + return value === value ? $toString.call(this) : INVALID_DATE; + }); +} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.function.bind.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.function.bind.js new file mode 100644 index 00000000..85f10379 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.function.bind.js @@ -0,0 +1,4 @@ +// 19.2.3.2 / 15.3.4.5 Function.prototype.bind(thisArg, args...) +var $export = require('./_export'); + +$export($export.P, 'Function', {bind: require('./_bind')}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.function.has-instance.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.function.has-instance.js new file mode 100644 index 00000000..ae294b1f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.function.has-instance.js @@ -0,0 +1,13 @@ +'use strict'; +var isObject = require('./_is-object') + , getPrototypeOf = require('./_object-gpo') + , HAS_INSTANCE = require('./_wks')('hasInstance') + , FunctionProto = Function.prototype; +// 19.2.3.6 Function.prototype[@@hasInstance](V) +if(!(HAS_INSTANCE in FunctionProto))require('./_object-dp').f(FunctionProto, HAS_INSTANCE, {value: function(O){ + if(typeof this != 'function' || !isObject(O))return false; + if(!isObject(this.prototype))return O instanceof this; + // for environment w/o native `@@hasInstance` logic enough `instanceof`, but add this: + while(O = getPrototypeOf(O))if(this.prototype === O)return true; + return false; +}}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.function.name.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.function.name.js new file mode 100644 index 00000000..f824d86d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.function.name.js @@ -0,0 +1,25 @@ +var dP = require('./_object-dp').f + , createDesc = require('./_property-desc') + , has = require('./_has') + , FProto = Function.prototype + , nameRE = /^\s*function ([^ (]*)/ + , NAME = 'name'; + +var isExtensible = Object.isExtensible || function(){ + return true; +}; + +// 19.2.4.2 name +NAME in FProto || require('./_descriptors') && dP(FProto, NAME, { + configurable: true, + get: function(){ + try { + var that = this + , name = ('' + that).match(nameRE)[1]; + has(that, NAME) || !isExtensible(that) || dP(that, NAME, createDesc(5, name)); + return name; + } catch(e){ + return ''; + } + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.map.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.map.js new file mode 100644 index 00000000..a166430f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.map.js @@ -0,0 +1,17 @@ +'use strict'; +var strong = require('./_collection-strong'); + +// 23.1 Map Objects +module.exports = require('./_collection')('Map', function(get){ + return function Map(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.1.3.6 Map.prototype.get(key) + get: function get(key){ + var entry = strong.getEntry(this, key); + return entry && entry.v; + }, + // 23.1.3.9 Map.prototype.set(key, value) + set: function set(key, value){ + return strong.def(this, key === 0 ? 0 : key, value); + } +}, strong, true); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.math.acosh.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.math.acosh.js new file mode 100644 index 00000000..459f1199 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.math.acosh.js @@ -0,0 +1,18 @@ +// 20.2.2.3 Math.acosh(x) +var $export = require('./_export') + , log1p = require('./_math-log1p') + , sqrt = Math.sqrt + , $acosh = Math.acosh; + +$export($export.S + $export.F * !($acosh + // V8 bug: https://code.google.com/p/v8/issues/detail?id=3509 + && Math.floor($acosh(Number.MAX_VALUE)) == 710 + // Tor Browser bug: Math.acosh(Infinity) -> NaN + && $acosh(Infinity) == Infinity +), 'Math', { + acosh: function acosh(x){ + return (x = +x) < 1 ? NaN : x > 94906265.62425156 + ? Math.log(x) + Math.LN2 + : log1p(x - 1 + sqrt(x - 1) * sqrt(x + 1)); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.math.asinh.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.math.asinh.js new file mode 100644 index 00000000..e6a74abb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.math.asinh.js @@ -0,0 +1,10 @@ +// 20.2.2.5 Math.asinh(x) +var $export = require('./_export') + , $asinh = Math.asinh; + +function asinh(x){ + return !isFinite(x = +x) || x == 0 ? x : x < 0 ? -asinh(-x) : Math.log(x + Math.sqrt(x * x + 1)); +} + +// Tor Browser bug: Math.asinh(0) -> -0 +$export($export.S + $export.F * !($asinh && 1 / $asinh(0) > 0), 'Math', {asinh: asinh}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.math.atanh.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.math.atanh.js new file mode 100644 index 00000000..94575d9f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.math.atanh.js @@ -0,0 +1,10 @@ +// 20.2.2.7 Math.atanh(x) +var $export = require('./_export') + , $atanh = Math.atanh; + +// Tor Browser bug: Math.atanh(-0) -> 0 +$export($export.S + $export.F * !($atanh && 1 / $atanh(-0) < 0), 'Math', { + atanh: function atanh(x){ + return (x = +x) == 0 ? x : Math.log((1 + x) / (1 - x)) / 2; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.math.cbrt.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.math.cbrt.js new file mode 100644 index 00000000..7ca7daea --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.math.cbrt.js @@ -0,0 +1,9 @@ +// 20.2.2.9 Math.cbrt(x) +var $export = require('./_export') + , sign = require('./_math-sign'); + +$export($export.S, 'Math', { + cbrt: function cbrt(x){ + return sign(x = +x) * Math.pow(Math.abs(x), 1 / 3); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.math.clz32.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.math.clz32.js new file mode 100644 index 00000000..1ec534bd --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.math.clz32.js @@ -0,0 +1,8 @@ +// 20.2.2.11 Math.clz32(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { + clz32: function clz32(x){ + return (x >>>= 0) ? 31 - Math.floor(Math.log(x + 0.5) * Math.LOG2E) : 32; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.math.cosh.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.math.cosh.js new file mode 100644 index 00000000..4f2b2155 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.math.cosh.js @@ -0,0 +1,9 @@ +// 20.2.2.12 Math.cosh(x) +var $export = require('./_export') + , exp = Math.exp; + +$export($export.S, 'Math', { + cosh: function cosh(x){ + return (exp(x = +x) + exp(-x)) / 2; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.math.expm1.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.math.expm1.js new file mode 100644 index 00000000..9762b7cd --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.math.expm1.js @@ -0,0 +1,5 @@ +// 20.2.2.14 Math.expm1(x) +var $export = require('./_export') + , $expm1 = require('./_math-expm1'); + +$export($export.S + $export.F * ($expm1 != Math.expm1), 'Math', {expm1: $expm1}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.math.fround.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.math.fround.js new file mode 100644 index 00000000..01a88862 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.math.fround.js @@ -0,0 +1,26 @@ +// 20.2.2.16 Math.fround(x) +var $export = require('./_export') + , sign = require('./_math-sign') + , pow = Math.pow + , EPSILON = pow(2, -52) + , EPSILON32 = pow(2, -23) + , MAX32 = pow(2, 127) * (2 - EPSILON32) + , MIN32 = pow(2, -126); + +var roundTiesToEven = function(n){ + return n + 1 / EPSILON - 1 / EPSILON; +}; + + +$export($export.S, 'Math', { + fround: function fround(x){ + var $abs = Math.abs(x) + , $sign = sign(x) + , a, result; + if($abs < MIN32)return $sign * roundTiesToEven($abs / MIN32 / EPSILON32) * MIN32 * EPSILON32; + a = (1 + EPSILON32 / EPSILON) * $abs; + result = a - (a - $abs); + if(result > MAX32 || result != result)return $sign * Infinity; + return $sign * result; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.math.hypot.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.math.hypot.js new file mode 100644 index 00000000..508521b6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.math.hypot.js @@ -0,0 +1,25 @@ +// 20.2.2.17 Math.hypot([value1[, value2[, … ]]]) +var $export = require('./_export') + , abs = Math.abs; + +$export($export.S, 'Math', { + hypot: function hypot(value1, value2){ // eslint-disable-line no-unused-vars + var sum = 0 + , i = 0 + , aLen = arguments.length + , larg = 0 + , arg, div; + while(i < aLen){ + arg = abs(arguments[i++]); + if(larg < arg){ + div = larg / arg; + sum = sum * div * div + 1; + larg = arg; + } else if(arg > 0){ + div = arg / larg; + sum += div * div; + } else sum += arg; + } + return larg === Infinity ? Infinity : larg * Math.sqrt(sum); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.math.imul.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.math.imul.js new file mode 100644 index 00000000..7f4111d2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.math.imul.js @@ -0,0 +1,17 @@ +// 20.2.2.18 Math.imul(x, y) +var $export = require('./_export') + , $imul = Math.imul; + +// some WebKit versions fails with big numbers, some has wrong arity +$export($export.S + $export.F * require('./_fails')(function(){ + return $imul(0xffffffff, 5) != -5 || $imul.length != 2; +}), 'Math', { + imul: function imul(x, y){ + var UINT16 = 0xffff + , xn = +x + , yn = +y + , xl = UINT16 & xn + , yl = UINT16 & yn; + return 0 | xl * yl + ((UINT16 & xn >>> 16) * yl + xl * (UINT16 & yn >>> 16) << 16 >>> 0); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.math.log10.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.math.log10.js new file mode 100644 index 00000000..791dfc35 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.math.log10.js @@ -0,0 +1,8 @@ +// 20.2.2.21 Math.log10(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { + log10: function log10(x){ + return Math.log(x) / Math.LN10; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.math.log1p.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.math.log1p.js new file mode 100644 index 00000000..a1de0258 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.math.log1p.js @@ -0,0 +1,4 @@ +// 20.2.2.20 Math.log1p(x) +var $export = require('./_export'); + +$export($export.S, 'Math', {log1p: require('./_math-log1p')}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.math.log2.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.math.log2.js new file mode 100644 index 00000000..c4ba7819 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.math.log2.js @@ -0,0 +1,8 @@ +// 20.2.2.22 Math.log2(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { + log2: function log2(x){ + return Math.log(x) / Math.LN2; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.math.sign.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.math.sign.js new file mode 100644 index 00000000..5dbee6f6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.math.sign.js @@ -0,0 +1,4 @@ +// 20.2.2.28 Math.sign(x) +var $export = require('./_export'); + +$export($export.S, 'Math', {sign: require('./_math-sign')}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.math.sinh.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.math.sinh.js new file mode 100644 index 00000000..5464ae3e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.math.sinh.js @@ -0,0 +1,15 @@ +// 20.2.2.30 Math.sinh(x) +var $export = require('./_export') + , expm1 = require('./_math-expm1') + , exp = Math.exp; + +// V8 near Chromium 38 has a problem with very small numbers +$export($export.S + $export.F * require('./_fails')(function(){ + return !Math.sinh(-2e-17) != -2e-17; +}), 'Math', { + sinh: function sinh(x){ + return Math.abs(x = +x) < 1 + ? (expm1(x) - expm1(-x)) / 2 + : (exp(x - 1) - exp(-x - 1)) * (Math.E / 2); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.math.tanh.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.math.tanh.js new file mode 100644 index 00000000..d2f10778 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.math.tanh.js @@ -0,0 +1,12 @@ +// 20.2.2.33 Math.tanh(x) +var $export = require('./_export') + , expm1 = require('./_math-expm1') + , exp = Math.exp; + +$export($export.S, 'Math', { + tanh: function tanh(x){ + var a = expm1(x = +x) + , b = expm1(-x); + return a == Infinity ? 1 : b == Infinity ? -1 : (a - b) / (exp(x) + exp(-x)); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.math.trunc.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.math.trunc.js new file mode 100644 index 00000000..2e42563b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.math.trunc.js @@ -0,0 +1,8 @@ +// 20.2.2.34 Math.trunc(x) +var $export = require('./_export'); + +$export($export.S, 'Math', { + trunc: function trunc(it){ + return (it > 0 ? Math.floor : Math.ceil)(it); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.number.constructor.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.number.constructor.js new file mode 100644 index 00000000..d562365b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.number.constructor.js @@ -0,0 +1,69 @@ +'use strict'; +var global = require('./_global') + , has = require('./_has') + , cof = require('./_cof') + , inheritIfRequired = require('./_inherit-if-required') + , toPrimitive = require('./_to-primitive') + , fails = require('./_fails') + , gOPN = require('./_object-gopn').f + , gOPD = require('./_object-gopd').f + , dP = require('./_object-dp').f + , $trim = require('./_string-trim').trim + , NUMBER = 'Number' + , $Number = global[NUMBER] + , Base = $Number + , proto = $Number.prototype + // Opera ~12 has broken Object#toString + , BROKEN_COF = cof(require('./_object-create')(proto)) == NUMBER + , TRIM = 'trim' in String.prototype; + +// 7.1.3 ToNumber(argument) +var toNumber = function(argument){ + var it = toPrimitive(argument, false); + if(typeof it == 'string' && it.length > 2){ + it = TRIM ? it.trim() : $trim(it, 3); + var first = it.charCodeAt(0) + , third, radix, maxCode; + if(first === 43 || first === 45){ + third = it.charCodeAt(2); + if(third === 88 || third === 120)return NaN; // Number('+0x1') should be NaN, old V8 fix + } else if(first === 48){ + switch(it.charCodeAt(1)){ + case 66 : case 98 : radix = 2; maxCode = 49; break; // fast equal /^0b[01]+$/i + case 79 : case 111 : radix = 8; maxCode = 55; break; // fast equal /^0o[0-7]+$/i + default : return +it; + } + for(var digits = it.slice(2), i = 0, l = digits.length, code; i < l; i++){ + code = digits.charCodeAt(i); + // parseInt parses a string to a first unavailable symbol + // but ToNumber should return NaN if a string contains unavailable symbols + if(code < 48 || code > maxCode)return NaN; + } return parseInt(digits, radix); + } + } return +it; +}; + +if(!$Number(' 0o1') || !$Number('0b1') || $Number('+0x1')){ + $Number = function Number(value){ + var it = arguments.length < 1 ? 0 : value + , that = this; + return that instanceof $Number + // check on 1..constructor(foo) case + && (BROKEN_COF ? fails(function(){ proto.valueOf.call(that); }) : cof(that) != NUMBER) + ? inheritIfRequired(new Base(toNumber(it)), that, $Number) : toNumber(it); + }; + for(var keys = require('./_descriptors') ? gOPN(Base) : ( + // ES3: + 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + + // ES6 (in case, if modules with ES6 Number statics required before): + 'EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,' + + 'MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger' + ).split(','), j = 0, key; keys.length > j; j++){ + if(has(Base, key = keys[j]) && !has($Number, key)){ + dP($Number, key, gOPD(Base, key)); + } + } + $Number.prototype = proto; + proto.constructor = $Number; + require('./_redefine')(global, NUMBER, $Number); +} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.number.epsilon.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.number.epsilon.js new file mode 100644 index 00000000..d25898cc --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.number.epsilon.js @@ -0,0 +1,4 @@ +// 20.1.2.1 Number.EPSILON +var $export = require('./_export'); + +$export($export.S, 'Number', {EPSILON: Math.pow(2, -52)}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.number.is-finite.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.number.is-finite.js new file mode 100644 index 00000000..c8c42753 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.number.is-finite.js @@ -0,0 +1,9 @@ +// 20.1.2.2 Number.isFinite(number) +var $export = require('./_export') + , _isFinite = require('./_global').isFinite; + +$export($export.S, 'Number', { + isFinite: function isFinite(it){ + return typeof it == 'number' && _isFinite(it); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.number.is-integer.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.number.is-integer.js new file mode 100644 index 00000000..dc0f8f00 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.number.is-integer.js @@ -0,0 +1,4 @@ +// 20.1.2.3 Number.isInteger(number) +var $export = require('./_export'); + +$export($export.S, 'Number', {isInteger: require('./_is-integer')}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.number.is-nan.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.number.is-nan.js new file mode 100644 index 00000000..5fedf825 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.number.is-nan.js @@ -0,0 +1,8 @@ +// 20.1.2.4 Number.isNaN(number) +var $export = require('./_export'); + +$export($export.S, 'Number', { + isNaN: function isNaN(number){ + return number != number; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.number.is-safe-integer.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.number.is-safe-integer.js new file mode 100644 index 00000000..92193e2e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.number.is-safe-integer.js @@ -0,0 +1,10 @@ +// 20.1.2.5 Number.isSafeInteger(number) +var $export = require('./_export') + , isInteger = require('./_is-integer') + , abs = Math.abs; + +$export($export.S, 'Number', { + isSafeInteger: function isSafeInteger(number){ + return isInteger(number) && abs(number) <= 0x1fffffffffffff; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.number.max-safe-integer.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.number.max-safe-integer.js new file mode 100644 index 00000000..b9d7f2a7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.number.max-safe-integer.js @@ -0,0 +1,4 @@ +// 20.1.2.6 Number.MAX_SAFE_INTEGER +var $export = require('./_export'); + +$export($export.S, 'Number', {MAX_SAFE_INTEGER: 0x1fffffffffffff}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.number.min-safe-integer.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.number.min-safe-integer.js new file mode 100644 index 00000000..9a2beeb3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.number.min-safe-integer.js @@ -0,0 +1,4 @@ +// 20.1.2.10 Number.MIN_SAFE_INTEGER +var $export = require('./_export'); + +$export($export.S, 'Number', {MIN_SAFE_INTEGER: -0x1fffffffffffff}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.number.parse-float.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.number.parse-float.js new file mode 100644 index 00000000..7ee14da0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.number.parse-float.js @@ -0,0 +1,4 @@ +var $export = require('./_export') + , $parseFloat = require('./_parse-float'); +// 20.1.2.12 Number.parseFloat(string) +$export($export.S + $export.F * (Number.parseFloat != $parseFloat), 'Number', {parseFloat: $parseFloat}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.number.parse-int.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.number.parse-int.js new file mode 100644 index 00000000..59bf1445 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.number.parse-int.js @@ -0,0 +1,4 @@ +var $export = require('./_export') + , $parseInt = require('./_parse-int'); +// 20.1.2.13 Number.parseInt(string, radix) +$export($export.S + $export.F * (Number.parseInt != $parseInt), 'Number', {parseInt: $parseInt}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.number.to-fixed.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.number.to-fixed.js new file mode 100644 index 00000000..c54970d6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.number.to-fixed.js @@ -0,0 +1,113 @@ +'use strict'; +var $export = require('./_export') + , toInteger = require('./_to-integer') + , aNumberValue = require('./_a-number-value') + , repeat = require('./_string-repeat') + , $toFixed = 1..toFixed + , floor = Math.floor + , data = [0, 0, 0, 0, 0, 0] + , ERROR = 'Number.toFixed: incorrect invocation!' + , ZERO = '0'; + +var multiply = function(n, c){ + var i = -1 + , c2 = c; + while(++i < 6){ + c2 += n * data[i]; + data[i] = c2 % 1e7; + c2 = floor(c2 / 1e7); + } +}; +var divide = function(n){ + var i = 6 + , c = 0; + while(--i >= 0){ + c += data[i]; + data[i] = floor(c / n); + c = (c % n) * 1e7; + } +}; +var numToString = function(){ + var i = 6 + , s = ''; + while(--i >= 0){ + if(s !== '' || i === 0 || data[i] !== 0){ + var t = String(data[i]); + s = s === '' ? t : s + repeat.call(ZERO, 7 - t.length) + t; + } + } return s; +}; +var pow = function(x, n, acc){ + return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); +}; +var log = function(x){ + var n = 0 + , x2 = x; + while(x2 >= 4096){ + n += 12; + x2 /= 4096; + } + while(x2 >= 2){ + n += 1; + x2 /= 2; + } return n; +}; + +$export($export.P + $export.F * (!!$toFixed && ( + 0.00008.toFixed(3) !== '0.000' || + 0.9.toFixed(0) !== '1' || + 1.255.toFixed(2) !== '1.25' || + 1000000000000000128..toFixed(0) !== '1000000000000000128' +) || !require('./_fails')(function(){ + // V8 ~ Android 4.3- + $toFixed.call({}); +})), 'Number', { + toFixed: function toFixed(fractionDigits){ + var x = aNumberValue(this, ERROR) + , f = toInteger(fractionDigits) + , s = '' + , m = ZERO + , e, z, j, k; + if(f < 0 || f > 20)throw RangeError(ERROR); + if(x != x)return 'NaN'; + if(x <= -1e21 || x >= 1e21)return String(x); + if(x < 0){ + s = '-'; + x = -x; + } + if(x > 1e-21){ + e = log(x * pow(2, 69, 1)) - 69; + z = e < 0 ? x * pow(2, -e, 1) : x / pow(2, e, 1); + z *= 0x10000000000000; + e = 52 - e; + if(e > 0){ + multiply(0, z); + j = f; + while(j >= 7){ + multiply(1e7, 0); + j -= 7; + } + multiply(pow(10, j, 1), 0); + j = e - 1; + while(j >= 23){ + divide(1 << 23); + j -= 23; + } + divide(1 << j); + multiply(1, 1); + divide(2); + m = numToString(); + } else { + multiply(0, z); + multiply(1 << -e, 0); + m = numToString() + repeat.call(ZERO, f); + } + } + if(f > 0){ + k = m.length; + m = s + (k <= f ? '0.' + repeat.call(ZERO, f - k) + m : m.slice(0, k - f) + '.' + m.slice(k - f)); + } else { + m = s + m; + } return m; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.number.to-precision.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.number.to-precision.js new file mode 100644 index 00000000..903dacdf --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.number.to-precision.js @@ -0,0 +1,18 @@ +'use strict'; +var $export = require('./_export') + , $fails = require('./_fails') + , aNumberValue = require('./_a-number-value') + , $toPrecision = 1..toPrecision; + +$export($export.P + $export.F * ($fails(function(){ + // IE7- + return $toPrecision.call(1, undefined) !== '1'; +}) || !$fails(function(){ + // V8 ~ Android 4.3- + $toPrecision.call({}); +})), 'Number', { + toPrecision: function toPrecision(precision){ + var that = aNumberValue(this, 'Number#toPrecision: incorrect invocation!'); + return precision === undefined ? $toPrecision.call(that) : $toPrecision.call(that, precision); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.object.assign.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.object.assign.js new file mode 100644 index 00000000..13eda2cb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.object.assign.js @@ -0,0 +1,4 @@ +// 19.1.3.1 Object.assign(target, source) +var $export = require('./_export'); + +$export($export.S + $export.F, 'Object', {assign: require('./_object-assign')}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.object.create.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.object.create.js new file mode 100644 index 00000000..17e4b284 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.object.create.js @@ -0,0 +1,3 @@ +var $export = require('./_export') +// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties]) +$export($export.S, 'Object', {create: require('./_object-create')}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.object.define-properties.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.object.define-properties.js new file mode 100644 index 00000000..183eec6f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.object.define-properties.js @@ -0,0 +1,3 @@ +var $export = require('./_export'); +// 19.1.2.3 / 15.2.3.7 Object.defineProperties(O, Properties) +$export($export.S + $export.F * !require('./_descriptors'), 'Object', {defineProperties: require('./_object-dps')}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.object.define-property.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.object.define-property.js new file mode 100644 index 00000000..71807cc0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.object.define-property.js @@ -0,0 +1,3 @@ +var $export = require('./_export'); +// 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes) +$export($export.S + $export.F * !require('./_descriptors'), 'Object', {defineProperty: require('./_object-dp').f}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.object.freeze.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.object.freeze.js new file mode 100644 index 00000000..34b51084 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.object.freeze.js @@ -0,0 +1,9 @@ +// 19.1.2.5 Object.freeze(O) +var isObject = require('./_is-object') + , meta = require('./_meta').onFreeze; + +require('./_object-sap')('freeze', function($freeze){ + return function freeze(it){ + return $freeze && isObject(it) ? $freeze(meta(it)) : it; + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.object.get-own-property-descriptor.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.object.get-own-property-descriptor.js new file mode 100644 index 00000000..60c69913 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.object.get-own-property-descriptor.js @@ -0,0 +1,9 @@ +// 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) +var toIObject = require('./_to-iobject') + , $getOwnPropertyDescriptor = require('./_object-gopd').f; + +require('./_object-sap')('getOwnPropertyDescriptor', function(){ + return function getOwnPropertyDescriptor(it, key){ + return $getOwnPropertyDescriptor(toIObject(it), key); + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.object.get-own-property-names.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.object.get-own-property-names.js new file mode 100644 index 00000000..91dd110d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.object.get-own-property-names.js @@ -0,0 +1,4 @@ +// 19.1.2.7 Object.getOwnPropertyNames(O) +require('./_object-sap')('getOwnPropertyNames', function(){ + return require('./_object-gopn-ext').f; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.object.get-prototype-of.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.object.get-prototype-of.js new file mode 100644 index 00000000..b124e28f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.object.get-prototype-of.js @@ -0,0 +1,9 @@ +// 19.1.2.9 Object.getPrototypeOf(O) +var toObject = require('./_to-object') + , $getPrototypeOf = require('./_object-gpo'); + +require('./_object-sap')('getPrototypeOf', function(){ + return function getPrototypeOf(it){ + return $getPrototypeOf(toObject(it)); + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.object.is-extensible.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.object.is-extensible.js new file mode 100644 index 00000000..94bf8a81 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.object.is-extensible.js @@ -0,0 +1,8 @@ +// 19.1.2.11 Object.isExtensible(O) +var isObject = require('./_is-object'); + +require('./_object-sap')('isExtensible', function($isExtensible){ + return function isExtensible(it){ + return isObject(it) ? $isExtensible ? $isExtensible(it) : true : false; + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.object.is-frozen.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.object.is-frozen.js new file mode 100644 index 00000000..4bdfd11b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.object.is-frozen.js @@ -0,0 +1,8 @@ +// 19.1.2.12 Object.isFrozen(O) +var isObject = require('./_is-object'); + +require('./_object-sap')('isFrozen', function($isFrozen){ + return function isFrozen(it){ + return isObject(it) ? $isFrozen ? $isFrozen(it) : false : true; + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.object.is-sealed.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.object.is-sealed.js new file mode 100644 index 00000000..d13aa1b0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.object.is-sealed.js @@ -0,0 +1,8 @@ +// 19.1.2.13 Object.isSealed(O) +var isObject = require('./_is-object'); + +require('./_object-sap')('isSealed', function($isSealed){ + return function isSealed(it){ + return isObject(it) ? $isSealed ? $isSealed(it) : false : true; + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.object.is.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.object.is.js new file mode 100644 index 00000000..ad299425 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.object.is.js @@ -0,0 +1,3 @@ +// 19.1.3.10 Object.is(value1, value2) +var $export = require('./_export'); +$export($export.S, 'Object', {is: require('./_same-value')}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.object.keys.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.object.keys.js new file mode 100644 index 00000000..bf76c07d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.object.keys.js @@ -0,0 +1,9 @@ +// 19.1.2.14 Object.keys(O) +var toObject = require('./_to-object') + , $keys = require('./_object-keys'); + +require('./_object-sap')('keys', function(){ + return function keys(it){ + return $keys(toObject(it)); + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.object.prevent-extensions.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.object.prevent-extensions.js new file mode 100644 index 00000000..adaff7a7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.object.prevent-extensions.js @@ -0,0 +1,9 @@ +// 19.1.2.15 Object.preventExtensions(O) +var isObject = require('./_is-object') + , meta = require('./_meta').onFreeze; + +require('./_object-sap')('preventExtensions', function($preventExtensions){ + return function preventExtensions(it){ + return $preventExtensions && isObject(it) ? $preventExtensions(meta(it)) : it; + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.object.seal.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.object.seal.js new file mode 100644 index 00000000..d7e4ea95 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.object.seal.js @@ -0,0 +1,9 @@ +// 19.1.2.17 Object.seal(O) +var isObject = require('./_is-object') + , meta = require('./_meta').onFreeze; + +require('./_object-sap')('seal', function($seal){ + return function seal(it){ + return $seal && isObject(it) ? $seal(meta(it)) : it; + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.object.set-prototype-of.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.object.set-prototype-of.js new file mode 100644 index 00000000..5bbe4c06 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.object.set-prototype-of.js @@ -0,0 +1,3 @@ +// 19.1.3.19 Object.setPrototypeOf(O, proto) +var $export = require('./_export'); +$export($export.S, 'Object', {setPrototypeOf: require('./_set-proto').set}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.object.to-string.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.object.to-string.js new file mode 100644 index 00000000..e644a5d1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.object.to-string.js @@ -0,0 +1,10 @@ +'use strict'; +// 19.1.3.6 Object.prototype.toString() +var classof = require('./_classof') + , test = {}; +test[require('./_wks')('toStringTag')] = 'z'; +if(test + '' != '[object z]'){ + require('./_redefine')(Object.prototype, 'toString', function toString(){ + return '[object ' + classof(this) + ']'; + }, true); +} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.parse-float.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.parse-float.js new file mode 100644 index 00000000..5201712b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.parse-float.js @@ -0,0 +1,4 @@ +var $export = require('./_export') + , $parseFloat = require('./_parse-float'); +// 18.2.4 parseFloat(string) +$export($export.G + $export.F * (parseFloat != $parseFloat), {parseFloat: $parseFloat}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.parse-int.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.parse-int.js new file mode 100644 index 00000000..5a2bfaff --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.parse-int.js @@ -0,0 +1,4 @@ +var $export = require('./_export') + , $parseInt = require('./_parse-int'); +// 18.2.5 parseInt(string, radix) +$export($export.G + $export.F * (parseInt != $parseInt), {parseInt: $parseInt}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.promise.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.promise.js new file mode 100644 index 00000000..262a93af --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.promise.js @@ -0,0 +1,299 @@ +'use strict'; +var LIBRARY = require('./_library') + , global = require('./_global') + , ctx = require('./_ctx') + , classof = require('./_classof') + , $export = require('./_export') + , isObject = require('./_is-object') + , aFunction = require('./_a-function') + , anInstance = require('./_an-instance') + , forOf = require('./_for-of') + , speciesConstructor = require('./_species-constructor') + , task = require('./_task').set + , microtask = require('./_microtask')() + , PROMISE = 'Promise' + , TypeError = global.TypeError + , process = global.process + , $Promise = global[PROMISE] + , process = global.process + , isNode = classof(process) == 'process' + , empty = function(){ /* empty */ } + , Internal, GenericPromiseCapability, Wrapper; + +var USE_NATIVE = !!function(){ + try { + // correct subclassing with @@species support + var promise = $Promise.resolve(1) + , FakePromise = (promise.constructor = {})[require('./_wks')('species')] = function(exec){ exec(empty, empty); }; + // unhandled rejections tracking support, NodeJS Promise without it fails @@species test + return (isNode || typeof PromiseRejectionEvent == 'function') && promise.then(empty) instanceof FakePromise; + } catch(e){ /* empty */ } +}(); + +// helpers +var sameConstructor = function(a, b){ + // with library wrapper special case + return a === b || a === $Promise && b === Wrapper; +}; +var isThenable = function(it){ + var then; + return isObject(it) && typeof (then = it.then) == 'function' ? then : false; +}; +var newPromiseCapability = function(C){ + return sameConstructor($Promise, C) + ? new PromiseCapability(C) + : new GenericPromiseCapability(C); +}; +var PromiseCapability = GenericPromiseCapability = function(C){ + var resolve, reject; + this.promise = new C(function($$resolve, $$reject){ + if(resolve !== undefined || reject !== undefined)throw TypeError('Bad Promise constructor'); + resolve = $$resolve; + reject = $$reject; + }); + this.resolve = aFunction(resolve); + this.reject = aFunction(reject); +}; +var perform = function(exec){ + try { + exec(); + } catch(e){ + return {error: e}; + } +}; +var notify = function(promise, isReject){ + if(promise._n)return; + promise._n = true; + var chain = promise._c; + microtask(function(){ + var value = promise._v + , ok = promise._s == 1 + , i = 0; + var run = function(reaction){ + var handler = ok ? reaction.ok : reaction.fail + , resolve = reaction.resolve + , reject = reaction.reject + , domain = reaction.domain + , result, then; + try { + if(handler){ + if(!ok){ + if(promise._h == 2)onHandleUnhandled(promise); + promise._h = 1; + } + if(handler === true)result = value; + else { + if(domain)domain.enter(); + result = handler(value); + if(domain)domain.exit(); + } + if(result === reaction.promise){ + reject(TypeError('Promise-chain cycle')); + } else if(then = isThenable(result)){ + then.call(result, resolve, reject); + } else resolve(result); + } else reject(value); + } catch(e){ + reject(e); + } + }; + while(chain.length > i)run(chain[i++]); // variable length - can't use forEach + promise._c = []; + promise._n = false; + if(isReject && !promise._h)onUnhandled(promise); + }); +}; +var onUnhandled = function(promise){ + task.call(global, function(){ + var value = promise._v + , abrupt, handler, console; + if(isUnhandled(promise)){ + abrupt = perform(function(){ + if(isNode){ + process.emit('unhandledRejection', value, promise); + } else if(handler = global.onunhandledrejection){ + handler({promise: promise, reason: value}); + } else if((console = global.console) && console.error){ + console.error('Unhandled promise rejection', value); + } + }); + // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should + promise._h = isNode || isUnhandled(promise) ? 2 : 1; + } promise._a = undefined; + if(abrupt)throw abrupt.error; + }); +}; +var isUnhandled = function(promise){ + if(promise._h == 1)return false; + var chain = promise._a || promise._c + , i = 0 + , reaction; + while(chain.length > i){ + reaction = chain[i++]; + if(reaction.fail || !isUnhandled(reaction.promise))return false; + } return true; +}; +var onHandleUnhandled = function(promise){ + task.call(global, function(){ + var handler; + if(isNode){ + process.emit('rejectionHandled', promise); + } else if(handler = global.onrejectionhandled){ + handler({promise: promise, reason: promise._v}); + } + }); +}; +var $reject = function(value){ + var promise = this; + if(promise._d)return; + promise._d = true; + promise = promise._w || promise; // unwrap + promise._v = value; + promise._s = 2; + if(!promise._a)promise._a = promise._c.slice(); + notify(promise, true); +}; +var $resolve = function(value){ + var promise = this + , then; + if(promise._d)return; + promise._d = true; + promise = promise._w || promise; // unwrap + try { + if(promise === value)throw TypeError("Promise can't be resolved itself"); + if(then = isThenable(value)){ + microtask(function(){ + var wrapper = {_w: promise, _d: false}; // wrap + try { + then.call(value, ctx($resolve, wrapper, 1), ctx($reject, wrapper, 1)); + } catch(e){ + $reject.call(wrapper, e); + } + }); + } else { + promise._v = value; + promise._s = 1; + notify(promise, false); + } + } catch(e){ + $reject.call({_w: promise, _d: false}, e); // wrap + } +}; + +// constructor polyfill +if(!USE_NATIVE){ + // 25.4.3.1 Promise(executor) + $Promise = function Promise(executor){ + anInstance(this, $Promise, PROMISE, '_h'); + aFunction(executor); + Internal.call(this); + try { + executor(ctx($resolve, this, 1), ctx($reject, this, 1)); + } catch(err){ + $reject.call(this, err); + } + }; + Internal = function Promise(executor){ + this._c = []; // <- awaiting reactions + this._a = undefined; // <- checked in isUnhandled reactions + this._s = 0; // <- state + this._d = false; // <- done + this._v = undefined; // <- value + this._h = 0; // <- rejection state, 0 - default, 1 - handled, 2 - unhandled + this._n = false; // <- notify + }; + Internal.prototype = require('./_redefine-all')($Promise.prototype, { + // 25.4.5.3 Promise.prototype.then(onFulfilled, onRejected) + then: function then(onFulfilled, onRejected){ + var reaction = newPromiseCapability(speciesConstructor(this, $Promise)); + reaction.ok = typeof onFulfilled == 'function' ? onFulfilled : true; + reaction.fail = typeof onRejected == 'function' && onRejected; + reaction.domain = isNode ? process.domain : undefined; + this._c.push(reaction); + if(this._a)this._a.push(reaction); + if(this._s)notify(this, false); + return reaction.promise; + }, + // 25.4.5.1 Promise.prototype.catch(onRejected) + 'catch': function(onRejected){ + return this.then(undefined, onRejected); + } + }); + PromiseCapability = function(){ + var promise = new Internal; + this.promise = promise; + this.resolve = ctx($resolve, promise, 1); + this.reject = ctx($reject, promise, 1); + }; +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, {Promise: $Promise}); +require('./_set-to-string-tag')($Promise, PROMISE); +require('./_set-species')(PROMISE); +Wrapper = require('./_core')[PROMISE]; + +// statics +$export($export.S + $export.F * !USE_NATIVE, PROMISE, { + // 25.4.4.5 Promise.reject(r) + reject: function reject(r){ + var capability = newPromiseCapability(this) + , $$reject = capability.reject; + $$reject(r); + return capability.promise; + } +}); +$export($export.S + $export.F * (LIBRARY || !USE_NATIVE), PROMISE, { + // 25.4.4.6 Promise.resolve(x) + resolve: function resolve(x){ + // instanceof instead of internal slot check because we should fix it without replacement native Promise core + if(x instanceof $Promise && sameConstructor(x.constructor, this))return x; + var capability = newPromiseCapability(this) + , $$resolve = capability.resolve; + $$resolve(x); + return capability.promise; + } +}); +$export($export.S + $export.F * !(USE_NATIVE && require('./_iter-detect')(function(iter){ + $Promise.all(iter)['catch'](empty); +})), PROMISE, { + // 25.4.4.1 Promise.all(iterable) + all: function all(iterable){ + var C = this + , capability = newPromiseCapability(C) + , resolve = capability.resolve + , reject = capability.reject; + var abrupt = perform(function(){ + var values = [] + , index = 0 + , remaining = 1; + forOf(iterable, false, function(promise){ + var $index = index++ + , alreadyCalled = false; + values.push(undefined); + remaining++; + C.resolve(promise).then(function(value){ + if(alreadyCalled)return; + alreadyCalled = true; + values[$index] = value; + --remaining || resolve(values); + }, reject); + }); + --remaining || resolve(values); + }); + if(abrupt)reject(abrupt.error); + return capability.promise; + }, + // 25.4.4.4 Promise.race(iterable) + race: function race(iterable){ + var C = this + , capability = newPromiseCapability(C) + , reject = capability.reject; + var abrupt = perform(function(){ + forOf(iterable, false, function(promise){ + C.resolve(promise).then(capability.resolve, reject); + }); + }); + if(abrupt)reject(abrupt.error); + return capability.promise; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.apply.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.apply.js new file mode 100644 index 00000000..24ea80f5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.apply.js @@ -0,0 +1,16 @@ +// 26.1.1 Reflect.apply(target, thisArgument, argumentsList) +var $export = require('./_export') + , aFunction = require('./_a-function') + , anObject = require('./_an-object') + , rApply = (require('./_global').Reflect || {}).apply + , fApply = Function.apply; +// MS Edge argumentsList argument is optional +$export($export.S + $export.F * !require('./_fails')(function(){ + rApply(function(){}); +}), 'Reflect', { + apply: function apply(target, thisArgument, argumentsList){ + var T = aFunction(target) + , L = anObject(argumentsList); + return rApply ? rApply(T, thisArgument, L) : fApply.call(T, thisArgument, L); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.construct.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.construct.js new file mode 100644 index 00000000..96483d70 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.construct.js @@ -0,0 +1,47 @@ +// 26.1.2 Reflect.construct(target, argumentsList [, newTarget]) +var $export = require('./_export') + , create = require('./_object-create') + , aFunction = require('./_a-function') + , anObject = require('./_an-object') + , isObject = require('./_is-object') + , fails = require('./_fails') + , bind = require('./_bind') + , rConstruct = (require('./_global').Reflect || {}).construct; + +// MS Edge supports only 2 arguments and argumentsList argument is optional +// FF Nightly sets third argument as `new.target`, but does not create `this` from it +var NEW_TARGET_BUG = fails(function(){ + function F(){} + return !(rConstruct(function(){}, [], F) instanceof F); +}); +var ARGS_BUG = !fails(function(){ + rConstruct(function(){}); +}); + +$export($export.S + $export.F * (NEW_TARGET_BUG || ARGS_BUG), 'Reflect', { + construct: function construct(Target, args /*, newTarget*/){ + aFunction(Target); + anObject(args); + var newTarget = arguments.length < 3 ? Target : aFunction(arguments[2]); + if(ARGS_BUG && !NEW_TARGET_BUG)return rConstruct(Target, args, newTarget); + if(Target == newTarget){ + // w/o altered newTarget, optimization for 0-4 arguments + switch(args.length){ + case 0: return new Target; + case 1: return new Target(args[0]); + case 2: return new Target(args[0], args[1]); + case 3: return new Target(args[0], args[1], args[2]); + case 4: return new Target(args[0], args[1], args[2], args[3]); + } + // w/o altered newTarget, lot of arguments case + var $args = [null]; + $args.push.apply($args, args); + return new (bind.apply(Target, $args)); + } + // with altered newTarget, not support built-in constructors + var proto = newTarget.prototype + , instance = create(isObject(proto) ? proto : Object.prototype) + , result = Function.apply.call(Target, instance, args); + return isObject(result) ? result : instance; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.define-property.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.define-property.js new file mode 100644 index 00000000..485d43c4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.define-property.js @@ -0,0 +1,22 @@ +// 26.1.3 Reflect.defineProperty(target, propertyKey, attributes) +var dP = require('./_object-dp') + , $export = require('./_export') + , anObject = require('./_an-object') + , toPrimitive = require('./_to-primitive'); + +// MS Edge has broken Reflect.defineProperty - throwing instead of returning false +$export($export.S + $export.F * require('./_fails')(function(){ + Reflect.defineProperty(dP.f({}, 1, {value: 1}), 1, {value: 2}); +}), 'Reflect', { + defineProperty: function defineProperty(target, propertyKey, attributes){ + anObject(target); + propertyKey = toPrimitive(propertyKey, true); + anObject(attributes); + try { + dP.f(target, propertyKey, attributes); + return true; + } catch(e){ + return false; + } + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.delete-property.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.delete-property.js new file mode 100644 index 00000000..4e8ce207 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.delete-property.js @@ -0,0 +1,11 @@ +// 26.1.4 Reflect.deleteProperty(target, propertyKey) +var $export = require('./_export') + , gOPD = require('./_object-gopd').f + , anObject = require('./_an-object'); + +$export($export.S, 'Reflect', { + deleteProperty: function deleteProperty(target, propertyKey){ + var desc = gOPD(anObject(target), propertyKey); + return desc && !desc.configurable ? false : delete target[propertyKey]; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.enumerate.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.enumerate.js new file mode 100644 index 00000000..abdb132d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.enumerate.js @@ -0,0 +1,26 @@ +'use strict'; +// 26.1.5 Reflect.enumerate(target) +var $export = require('./_export') + , anObject = require('./_an-object'); +var Enumerate = function(iterated){ + this._t = anObject(iterated); // target + this._i = 0; // next index + var keys = this._k = [] // keys + , key; + for(key in iterated)keys.push(key); +}; +require('./_iter-create')(Enumerate, 'Object', function(){ + var that = this + , keys = that._k + , key; + do { + if(that._i >= keys.length)return {value: undefined, done: true}; + } while(!((key = keys[that._i++]) in that._t)); + return {value: key, done: false}; +}); + +$export($export.S, 'Reflect', { + enumerate: function enumerate(target){ + return new Enumerate(target); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.get-own-property-descriptor.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.get-own-property-descriptor.js new file mode 100644 index 00000000..741a13eb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.get-own-property-descriptor.js @@ -0,0 +1,10 @@ +// 26.1.7 Reflect.getOwnPropertyDescriptor(target, propertyKey) +var gOPD = require('./_object-gopd') + , $export = require('./_export') + , anObject = require('./_an-object'); + +$export($export.S, 'Reflect', { + getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target, propertyKey){ + return gOPD.f(anObject(target), propertyKey); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.get-prototype-of.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.get-prototype-of.js new file mode 100644 index 00000000..4f912d10 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.get-prototype-of.js @@ -0,0 +1,10 @@ +// 26.1.8 Reflect.getPrototypeOf(target) +var $export = require('./_export') + , getProto = require('./_object-gpo') + , anObject = require('./_an-object'); + +$export($export.S, 'Reflect', { + getPrototypeOf: function getPrototypeOf(target){ + return getProto(anObject(target)); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.get.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.get.js new file mode 100644 index 00000000..f8c39f50 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.get.js @@ -0,0 +1,21 @@ +// 26.1.6 Reflect.get(target, propertyKey [, receiver]) +var gOPD = require('./_object-gopd') + , getPrototypeOf = require('./_object-gpo') + , has = require('./_has') + , $export = require('./_export') + , isObject = require('./_is-object') + , anObject = require('./_an-object'); + +function get(target, propertyKey/*, receiver*/){ + var receiver = arguments.length < 3 ? target : arguments[2] + , desc, proto; + if(anObject(target) === receiver)return target[propertyKey]; + if(desc = gOPD.f(target, propertyKey))return has(desc, 'value') + ? desc.value + : desc.get !== undefined + ? desc.get.call(receiver) + : undefined; + if(isObject(proto = getPrototypeOf(target)))return get(proto, propertyKey, receiver); +} + +$export($export.S, 'Reflect', {get: get}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.has.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.has.js new file mode 100644 index 00000000..bbb6dbcd --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.has.js @@ -0,0 +1,8 @@ +// 26.1.9 Reflect.has(target, propertyKey) +var $export = require('./_export'); + +$export($export.S, 'Reflect', { + has: function has(target, propertyKey){ + return propertyKey in target; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.is-extensible.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.is-extensible.js new file mode 100644 index 00000000..ffbc2848 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.is-extensible.js @@ -0,0 +1,11 @@ +// 26.1.10 Reflect.isExtensible(target) +var $export = require('./_export') + , anObject = require('./_an-object') + , $isExtensible = Object.isExtensible; + +$export($export.S, 'Reflect', { + isExtensible: function isExtensible(target){ + anObject(target); + return $isExtensible ? $isExtensible(target) : true; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.own-keys.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.own-keys.js new file mode 100644 index 00000000..a1e5330c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.own-keys.js @@ -0,0 +1,4 @@ +// 26.1.11 Reflect.ownKeys(target) +var $export = require('./_export'); + +$export($export.S, 'Reflect', {ownKeys: require('./_own-keys')}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.prevent-extensions.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.prevent-extensions.js new file mode 100644 index 00000000..d3dad8ee --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.prevent-extensions.js @@ -0,0 +1,16 @@ +// 26.1.12 Reflect.preventExtensions(target) +var $export = require('./_export') + , anObject = require('./_an-object') + , $preventExtensions = Object.preventExtensions; + +$export($export.S, 'Reflect', { + preventExtensions: function preventExtensions(target){ + anObject(target); + try { + if($preventExtensions)$preventExtensions(target); + return true; + } catch(e){ + return false; + } + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.set-prototype-of.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.set-prototype-of.js new file mode 100644 index 00000000..b79d9b61 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.set-prototype-of.js @@ -0,0 +1,15 @@ +// 26.1.14 Reflect.setPrototypeOf(target, proto) +var $export = require('./_export') + , setProto = require('./_set-proto'); + +if(setProto)$export($export.S, 'Reflect', { + setPrototypeOf: function setPrototypeOf(target, proto){ + setProto.check(target, proto); + try { + setProto.set(target, proto); + return true; + } catch(e){ + return false; + } + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.set.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.set.js new file mode 100644 index 00000000..c6b916a2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.reflect.set.js @@ -0,0 +1,31 @@ +// 26.1.13 Reflect.set(target, propertyKey, V [, receiver]) +var dP = require('./_object-dp') + , gOPD = require('./_object-gopd') + , getPrototypeOf = require('./_object-gpo') + , has = require('./_has') + , $export = require('./_export') + , createDesc = require('./_property-desc') + , anObject = require('./_an-object') + , isObject = require('./_is-object'); + +function set(target, propertyKey, V/*, receiver*/){ + var receiver = arguments.length < 4 ? target : arguments[3] + , ownDesc = gOPD.f(anObject(target), propertyKey) + , existingDescriptor, proto; + if(!ownDesc){ + if(isObject(proto = getPrototypeOf(target))){ + return set(proto, propertyKey, V, receiver); + } + ownDesc = createDesc(0); + } + if(has(ownDesc, 'value')){ + if(ownDesc.writable === false || !isObject(receiver))return false; + existingDescriptor = gOPD.f(receiver, propertyKey) || createDesc(0); + existingDescriptor.value = V; + dP.f(receiver, propertyKey, existingDescriptor); + return true; + } + return ownDesc.set === undefined ? false : (ownDesc.set.call(receiver, V), true); +} + +$export($export.S, 'Reflect', {set: set}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.regexp.constructor.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.regexp.constructor.js new file mode 100644 index 00000000..93961168 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.regexp.constructor.js @@ -0,0 +1,43 @@ +var global = require('./_global') + , inheritIfRequired = require('./_inherit-if-required') + , dP = require('./_object-dp').f + , gOPN = require('./_object-gopn').f + , isRegExp = require('./_is-regexp') + , $flags = require('./_flags') + , $RegExp = global.RegExp + , Base = $RegExp + , proto = $RegExp.prototype + , re1 = /a/g + , re2 = /a/g + // "new" creates a new object, old webkit buggy here + , CORRECT_NEW = new $RegExp(re1) !== re1; + +if(require('./_descriptors') && (!CORRECT_NEW || require('./_fails')(function(){ + re2[require('./_wks')('match')] = false; + // RegExp constructor can alter flags and IsRegExp works correct with @@match + return $RegExp(re1) != re1 || $RegExp(re2) == re2 || $RegExp(re1, 'i') != '/a/i'; +}))){ + $RegExp = function RegExp(p, f){ + var tiRE = this instanceof $RegExp + , piRE = isRegExp(p) + , fiU = f === undefined; + return !tiRE && piRE && p.constructor === $RegExp && fiU ? p + : inheritIfRequired(CORRECT_NEW + ? new Base(piRE && !fiU ? p.source : p, f) + : Base((piRE = p instanceof $RegExp) ? p.source : p, piRE && fiU ? $flags.call(p) : f) + , tiRE ? this : proto, $RegExp); + }; + var proxy = function(key){ + key in $RegExp || dP($RegExp, key, { + configurable: true, + get: function(){ return Base[key]; }, + set: function(it){ Base[key] = it; } + }); + }; + for(var keys = gOPN(Base), i = 0; keys.length > i; )proxy(keys[i++]); + proto.constructor = $RegExp; + $RegExp.prototype = proto; + require('./_redefine')(global, 'RegExp', $RegExp); +} + +require('./_set-species')('RegExp'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.regexp.flags.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.regexp.flags.js new file mode 100644 index 00000000..33ba86f7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.regexp.flags.js @@ -0,0 +1,5 @@ +// 21.2.5.3 get RegExp.prototype.flags() +if(require('./_descriptors') && /./g.flags != 'g')require('./_object-dp').f(RegExp.prototype, 'flags', { + configurable: true, + get: require('./_flags') +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.regexp.match.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.regexp.match.js new file mode 100644 index 00000000..814d3719 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.regexp.match.js @@ -0,0 +1,10 @@ +// @@match logic +require('./_fix-re-wks')('match', 1, function(defined, MATCH, $match){ + // 21.1.3.11 String.prototype.match(regexp) + return [function match(regexp){ + 'use strict'; + var O = defined(this) + , fn = regexp == undefined ? undefined : regexp[MATCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[MATCH](String(O)); + }, $match]; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.regexp.replace.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.regexp.replace.js new file mode 100644 index 00000000..4f651af3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.regexp.replace.js @@ -0,0 +1,12 @@ +// @@replace logic +require('./_fix-re-wks')('replace', 2, function(defined, REPLACE, $replace){ + // 21.1.3.14 String.prototype.replace(searchValue, replaceValue) + return [function replace(searchValue, replaceValue){ + 'use strict'; + var O = defined(this) + , fn = searchValue == undefined ? undefined : searchValue[REPLACE]; + return fn !== undefined + ? fn.call(searchValue, O, replaceValue) + : $replace.call(String(O), searchValue, replaceValue); + }, $replace]; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.regexp.search.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.regexp.search.js new file mode 100644 index 00000000..7aac5e44 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.regexp.search.js @@ -0,0 +1,10 @@ +// @@search logic +require('./_fix-re-wks')('search', 1, function(defined, SEARCH, $search){ + // 21.1.3.15 String.prototype.search(regexp) + return [function search(regexp){ + 'use strict'; + var O = defined(this) + , fn = regexp == undefined ? undefined : regexp[SEARCH]; + return fn !== undefined ? fn.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O)); + }, $search]; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.regexp.split.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.regexp.split.js new file mode 100644 index 00000000..a991a3fc --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.regexp.split.js @@ -0,0 +1,70 @@ +// @@split logic +require('./_fix-re-wks')('split', 2, function(defined, SPLIT, $split){ + 'use strict'; + var isRegExp = require('./_is-regexp') + , _split = $split + , $push = [].push + , $SPLIT = 'split' + , LENGTH = 'length' + , LAST_INDEX = 'lastIndex'; + if( + 'abbc'[$SPLIT](/(b)*/)[1] == 'c' || + 'test'[$SPLIT](/(?:)/, -1)[LENGTH] != 4 || + 'ab'[$SPLIT](/(?:ab)*/)[LENGTH] != 2 || + '.'[$SPLIT](/(.?)(.?)/)[LENGTH] != 4 || + '.'[$SPLIT](/()()/)[LENGTH] > 1 || + ''[$SPLIT](/.?/)[LENGTH] + ){ + var NPCG = /()??/.exec('')[1] === undefined; // nonparticipating capturing group + // based on es5-shim implementation, need to rework it + $split = function(separator, limit){ + var string = String(this); + if(separator === undefined && limit === 0)return []; + // If `separator` is not a regex, use native split + if(!isRegExp(separator))return _split.call(string, separator, limit); + var output = []; + var flags = (separator.ignoreCase ? 'i' : '') + + (separator.multiline ? 'm' : '') + + (separator.unicode ? 'u' : '') + + (separator.sticky ? 'y' : ''); + var lastLastIndex = 0; + var splitLimit = limit === undefined ? 4294967295 : limit >>> 0; + // Make `global` and avoid `lastIndex` issues by working with a copy + var separatorCopy = new RegExp(separator.source, flags + 'g'); + var separator2, match, lastIndex, lastLength, i; + // Doesn't need flags gy, but they don't hurt + if(!NPCG)separator2 = new RegExp('^' + separatorCopy.source + '$(?!\\s)', flags); + while(match = separatorCopy.exec(string)){ + // `separatorCopy.lastIndex` is not reliable cross-browser + lastIndex = match.index + match[0][LENGTH]; + if(lastIndex > lastLastIndex){ + output.push(string.slice(lastLastIndex, match.index)); + // Fix browsers whose `exec` methods don't consistently return `undefined` for NPCG + if(!NPCG && match[LENGTH] > 1)match[0].replace(separator2, function(){ + for(i = 1; i < arguments[LENGTH] - 2; i++)if(arguments[i] === undefined)match[i] = undefined; + }); + if(match[LENGTH] > 1 && match.index < string[LENGTH])$push.apply(output, match.slice(1)); + lastLength = match[0][LENGTH]; + lastLastIndex = lastIndex; + if(output[LENGTH] >= splitLimit)break; + } + if(separatorCopy[LAST_INDEX] === match.index)separatorCopy[LAST_INDEX]++; // Avoid an infinite loop + } + if(lastLastIndex === string[LENGTH]){ + if(lastLength || !separatorCopy.test(''))output.push(''); + } else output.push(string.slice(lastLastIndex)); + return output[LENGTH] > splitLimit ? output.slice(0, splitLimit) : output; + }; + // Chakra, V8 + } else if('0'[$SPLIT](undefined, 0)[LENGTH]){ + $split = function(separator, limit){ + return separator === undefined && limit === 0 ? [] : _split.call(this, separator, limit); + }; + } + // 21.1.3.17 String.prototype.split(separator, limit) + return [function split(separator, limit){ + var O = defined(this) + , fn = separator == undefined ? undefined : separator[SPLIT]; + return fn !== undefined ? fn.call(separator, O, limit) : $split.call(String(O), separator, limit); + }, $split]; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.regexp.to-string.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.regexp.to-string.js new file mode 100644 index 00000000..699aeff2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.regexp.to-string.js @@ -0,0 +1,25 @@ +'use strict'; +require('./es6.regexp.flags'); +var anObject = require('./_an-object') + , $flags = require('./_flags') + , DESCRIPTORS = require('./_descriptors') + , TO_STRING = 'toString' + , $toString = /./[TO_STRING]; + +var define = function(fn){ + require('./_redefine')(RegExp.prototype, TO_STRING, fn, true); +}; + +// 21.2.5.14 RegExp.prototype.toString() +if(require('./_fails')(function(){ return $toString.call({source: 'a', flags: 'b'}) != '/a/b'; })){ + define(function toString(){ + var R = anObject(this); + return '/'.concat(R.source, '/', + 'flags' in R ? R.flags : !DESCRIPTORS && R instanceof RegExp ? $flags.call(R) : undefined); + }); +// FF44- RegExp#toString has a wrong name +} else if($toString.name != TO_STRING){ + define(function toString(){ + return $toString.call(this); + }); +} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.set.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.set.js new file mode 100644 index 00000000..a1880881 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.set.js @@ -0,0 +1,12 @@ +'use strict'; +var strong = require('./_collection-strong'); + +// 23.2 Set Objects +module.exports = require('./_collection')('Set', function(get){ + return function Set(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.2.3.1 Set.prototype.add(value) + add: function add(value){ + return strong.def(this, value = value === 0 ? 0 : value, value); + } +}, strong); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.string.anchor.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.anchor.js new file mode 100644 index 00000000..65db2521 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.anchor.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.2 String.prototype.anchor(name) +require('./_string-html')('anchor', function(createHTML){ + return function anchor(name){ + return createHTML(this, 'a', 'name', name); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.string.big.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.big.js new file mode 100644 index 00000000..aeeb1aba --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.big.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.3 String.prototype.big() +require('./_string-html')('big', function(createHTML){ + return function big(){ + return createHTML(this, 'big', '', ''); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.string.blink.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.blink.js new file mode 100644 index 00000000..aef8da2e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.blink.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.4 String.prototype.blink() +require('./_string-html')('blink', function(createHTML){ + return function blink(){ + return createHTML(this, 'blink', '', ''); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.string.bold.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.bold.js new file mode 100644 index 00000000..022cdb07 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.bold.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.5 String.prototype.bold() +require('./_string-html')('bold', function(createHTML){ + return function bold(){ + return createHTML(this, 'b', '', ''); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.string.code-point-at.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.code-point-at.js new file mode 100644 index 00000000..cf544652 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.code-point-at.js @@ -0,0 +1,9 @@ +'use strict'; +var $export = require('./_export') + , $at = require('./_string-at')(false); +$export($export.P, 'String', { + // 21.1.3.3 String.prototype.codePointAt(pos) + codePointAt: function codePointAt(pos){ + return $at(this, pos); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.string.ends-with.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.ends-with.js new file mode 100644 index 00000000..80baed9a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.ends-with.js @@ -0,0 +1,20 @@ +// 21.1.3.6 String.prototype.endsWith(searchString [, endPosition]) +'use strict'; +var $export = require('./_export') + , toLength = require('./_to-length') + , context = require('./_string-context') + , ENDS_WITH = 'endsWith' + , $endsWith = ''[ENDS_WITH]; + +$export($export.P + $export.F * require('./_fails-is-regexp')(ENDS_WITH), 'String', { + endsWith: function endsWith(searchString /*, endPosition = @length */){ + var that = context(this, searchString, ENDS_WITH) + , endPosition = arguments.length > 1 ? arguments[1] : undefined + , len = toLength(that.length) + , end = endPosition === undefined ? len : Math.min(toLength(endPosition), len) + , search = String(searchString); + return $endsWith + ? $endsWith.call(that, search, end) + : that.slice(end - search.length, end) === search; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.string.fixed.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.fixed.js new file mode 100644 index 00000000..d017e202 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.fixed.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.6 String.prototype.fixed() +require('./_string-html')('fixed', function(createHTML){ + return function fixed(){ + return createHTML(this, 'tt', '', ''); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.string.fontcolor.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.fontcolor.js new file mode 100644 index 00000000..d40711f0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.fontcolor.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.7 String.prototype.fontcolor(color) +require('./_string-html')('fontcolor', function(createHTML){ + return function fontcolor(color){ + return createHTML(this, 'font', 'color', color); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.string.fontsize.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.fontsize.js new file mode 100644 index 00000000..ba3ff980 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.fontsize.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.8 String.prototype.fontsize(size) +require('./_string-html')('fontsize', function(createHTML){ + return function fontsize(size){ + return createHTML(this, 'font', 'size', size); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.string.from-code-point.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.from-code-point.js new file mode 100644 index 00000000..c8776d87 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.from-code-point.js @@ -0,0 +1,23 @@ +var $export = require('./_export') + , toIndex = require('./_to-index') + , fromCharCode = String.fromCharCode + , $fromCodePoint = String.fromCodePoint; + +// length should be 1, old FF problem +$export($export.S + $export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', { + // 21.1.2.2 String.fromCodePoint(...codePoints) + fromCodePoint: function fromCodePoint(x){ // eslint-disable-line no-unused-vars + var res = [] + , aLen = arguments.length + , i = 0 + , code; + while(aLen > i){ + code = +arguments[i++]; + if(toIndex(code, 0x10ffff) !== code)throw RangeError(code + ' is not a valid code point'); + res.push(code < 0x10000 + ? fromCharCode(code) + : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00) + ); + } return res.join(''); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.string.includes.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.includes.js new file mode 100644 index 00000000..c6b4ee2f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.includes.js @@ -0,0 +1,12 @@ +// 21.1.3.7 String.prototype.includes(searchString, position = 0) +'use strict'; +var $export = require('./_export') + , context = require('./_string-context') + , INCLUDES = 'includes'; + +$export($export.P + $export.F * require('./_fails-is-regexp')(INCLUDES), 'String', { + includes: function includes(searchString /*, position = 0 */){ + return !!~context(this, searchString, INCLUDES) + .indexOf(searchString, arguments.length > 1 ? arguments[1] : undefined); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.string.italics.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.italics.js new file mode 100644 index 00000000..d33efd3c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.italics.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.9 String.prototype.italics() +require('./_string-html')('italics', function(createHTML){ + return function italics(){ + return createHTML(this, 'i', '', ''); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.string.iterator.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.iterator.js new file mode 100644 index 00000000..ac391ee4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.iterator.js @@ -0,0 +1,17 @@ +'use strict'; +var $at = require('./_string-at')(true); + +// 21.1.3.27 String.prototype[@@iterator]() +require('./_iter-define')(String, 'String', function(iterated){ + this._t = String(iterated); // target + this._i = 0; // next index +// 21.1.5.2.1 %StringIteratorPrototype%.next() +}, function(){ + var O = this._t + , index = this._i + , point; + if(index >= O.length)return {value: undefined, done: true}; + point = $at(O, index); + this._i += point.length; + return {value: point, done: false}; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.string.link.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.link.js new file mode 100644 index 00000000..6a75c18a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.link.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.10 String.prototype.link(url) +require('./_string-html')('link', function(createHTML){ + return function link(url){ + return createHTML(this, 'a', 'href', url); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.string.raw.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.raw.js new file mode 100644 index 00000000..1016acfa --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.raw.js @@ -0,0 +1,18 @@ +var $export = require('./_export') + , toIObject = require('./_to-iobject') + , toLength = require('./_to-length'); + +$export($export.S, 'String', { + // 21.1.2.4 String.raw(callSite, ...substitutions) + raw: function raw(callSite){ + var tpl = toIObject(callSite.raw) + , len = toLength(tpl.length) + , aLen = arguments.length + , res = [] + , i = 0; + while(len > i){ + res.push(String(tpl[i++])); + if(i < aLen)res.push(String(arguments[i])); + } return res.join(''); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.string.repeat.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.repeat.js new file mode 100644 index 00000000..a054222d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.repeat.js @@ -0,0 +1,6 @@ +var $export = require('./_export'); + +$export($export.P, 'String', { + // 21.1.3.13 String.prototype.repeat(count) + repeat: require('./_string-repeat') +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.string.small.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.small.js new file mode 100644 index 00000000..51b1b30d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.small.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.11 String.prototype.small() +require('./_string-html')('small', function(createHTML){ + return function small(){ + return createHTML(this, 'small', '', ''); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.string.starts-with.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.starts-with.js new file mode 100644 index 00000000..017805f0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.starts-with.js @@ -0,0 +1,18 @@ +// 21.1.3.18 String.prototype.startsWith(searchString [, position ]) +'use strict'; +var $export = require('./_export') + , toLength = require('./_to-length') + , context = require('./_string-context') + , STARTS_WITH = 'startsWith' + , $startsWith = ''[STARTS_WITH]; + +$export($export.P + $export.F * require('./_fails-is-regexp')(STARTS_WITH), 'String', { + startsWith: function startsWith(searchString /*, position = 0 */){ + var that = context(this, searchString, STARTS_WITH) + , index = toLength(Math.min(arguments.length > 1 ? arguments[1] : undefined, that.length)) + , search = String(searchString); + return $startsWith + ? $startsWith.call(that, search, index) + : that.slice(index, index + search.length) === search; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.string.strike.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.strike.js new file mode 100644 index 00000000..c6287d3a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.strike.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.12 String.prototype.strike() +require('./_string-html')('strike', function(createHTML){ + return function strike(){ + return createHTML(this, 'strike', '', ''); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.string.sub.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.sub.js new file mode 100644 index 00000000..ee18ea7a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.sub.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.13 String.prototype.sub() +require('./_string-html')('sub', function(createHTML){ + return function sub(){ + return createHTML(this, 'sub', '', ''); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.string.sup.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.sup.js new file mode 100644 index 00000000..a3429988 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.sup.js @@ -0,0 +1,7 @@ +'use strict'; +// B.2.3.14 String.prototype.sup() +require('./_string-html')('sup', function(createHTML){ + return function sup(){ + return createHTML(this, 'sup', '', ''); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.string.trim.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.trim.js new file mode 100644 index 00000000..35f0fb0b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.string.trim.js @@ -0,0 +1,7 @@ +'use strict'; +// 21.1.3.25 String.prototype.trim() +require('./_string-trim')('trim', function($trim){ + return function trim(){ + return $trim(this, 3); + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.symbol.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.symbol.js new file mode 100644 index 00000000..eae491c5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.symbol.js @@ -0,0 +1,235 @@ +'use strict'; +// ECMAScript 6 symbols shim +var global = require('./_global') + , has = require('./_has') + , DESCRIPTORS = require('./_descriptors') + , $export = require('./_export') + , redefine = require('./_redefine') + , META = require('./_meta').KEY + , $fails = require('./_fails') + , shared = require('./_shared') + , setToStringTag = require('./_set-to-string-tag') + , uid = require('./_uid') + , wks = require('./_wks') + , wksExt = require('./_wks-ext') + , wksDefine = require('./_wks-define') + , keyOf = require('./_keyof') + , enumKeys = require('./_enum-keys') + , isArray = require('./_is-array') + , anObject = require('./_an-object') + , toIObject = require('./_to-iobject') + , toPrimitive = require('./_to-primitive') + , createDesc = require('./_property-desc') + , _create = require('./_object-create') + , gOPNExt = require('./_object-gopn-ext') + , $GOPD = require('./_object-gopd') + , $DP = require('./_object-dp') + , $keys = require('./_object-keys') + , gOPD = $GOPD.f + , dP = $DP.f + , gOPN = gOPNExt.f + , $Symbol = global.Symbol + , $JSON = global.JSON + , _stringify = $JSON && $JSON.stringify + , PROTOTYPE = 'prototype' + , HIDDEN = wks('_hidden') + , TO_PRIMITIVE = wks('toPrimitive') + , isEnum = {}.propertyIsEnumerable + , SymbolRegistry = shared('symbol-registry') + , AllSymbols = shared('symbols') + , OPSymbols = shared('op-symbols') + , ObjectProto = Object[PROTOTYPE] + , USE_NATIVE = typeof $Symbol == 'function' + , QObject = global.QObject; +// Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 +var setter = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; + +// fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 +var setSymbolDesc = DESCRIPTORS && $fails(function(){ + return _create(dP({}, 'a', { + get: function(){ return dP(this, 'a', {value: 7}).a; } + })).a != 7; +}) ? function(it, key, D){ + var protoDesc = gOPD(ObjectProto, key); + if(protoDesc)delete ObjectProto[key]; + dP(it, key, D); + if(protoDesc && it !== ObjectProto)dP(ObjectProto, key, protoDesc); +} : dP; + +var wrap = function(tag){ + var sym = AllSymbols[tag] = _create($Symbol[PROTOTYPE]); + sym._k = tag; + return sym; +}; + +var isSymbol = USE_NATIVE && typeof $Symbol.iterator == 'symbol' ? function(it){ + return typeof it == 'symbol'; +} : function(it){ + return it instanceof $Symbol; +}; + +var $defineProperty = function defineProperty(it, key, D){ + if(it === ObjectProto)$defineProperty(OPSymbols, key, D); + anObject(it); + key = toPrimitive(key, true); + anObject(D); + if(has(AllSymbols, key)){ + if(!D.enumerable){ + if(!has(it, HIDDEN))dP(it, HIDDEN, createDesc(1, {})); + it[HIDDEN][key] = true; + } else { + if(has(it, HIDDEN) && it[HIDDEN][key])it[HIDDEN][key] = false; + D = _create(D, {enumerable: createDesc(0, false)}); + } return setSymbolDesc(it, key, D); + } return dP(it, key, D); +}; +var $defineProperties = function defineProperties(it, P){ + anObject(it); + var keys = enumKeys(P = toIObject(P)) + , i = 0 + , l = keys.length + , key; + while(l > i)$defineProperty(it, key = keys[i++], P[key]); + return it; +}; +var $create = function create(it, P){ + return P === undefined ? _create(it) : $defineProperties(_create(it), P); +}; +var $propertyIsEnumerable = function propertyIsEnumerable(key){ + var E = isEnum.call(this, key = toPrimitive(key, true)); + if(this === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return false; + return E || !has(this, key) || !has(AllSymbols, key) || has(this, HIDDEN) && this[HIDDEN][key] ? E : true; +}; +var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(it, key){ + it = toIObject(it); + key = toPrimitive(key, true); + if(it === ObjectProto && has(AllSymbols, key) && !has(OPSymbols, key))return; + var D = gOPD(it, key); + if(D && has(AllSymbols, key) && !(has(it, HIDDEN) && it[HIDDEN][key]))D.enumerable = true; + return D; +}; +var $getOwnPropertyNames = function getOwnPropertyNames(it){ + var names = gOPN(toIObject(it)) + , result = [] + , i = 0 + , key; + while(names.length > i){ + if(!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META)result.push(key); + } return result; +}; +var $getOwnPropertySymbols = function getOwnPropertySymbols(it){ + var IS_OP = it === ObjectProto + , names = gOPN(IS_OP ? OPSymbols : toIObject(it)) + , result = [] + , i = 0 + , key; + while(names.length > i){ + if(has(AllSymbols, key = names[i++]) && (IS_OP ? has(ObjectProto, key) : true))result.push(AllSymbols[key]); + } return result; +}; + +// 19.4.1.1 Symbol([description]) +if(!USE_NATIVE){ + $Symbol = function Symbol(){ + if(this instanceof $Symbol)throw TypeError('Symbol is not a constructor!'); + var tag = uid(arguments.length > 0 ? arguments[0] : undefined); + var $set = function(value){ + if(this === ObjectProto)$set.call(OPSymbols, value); + if(has(this, HIDDEN) && has(this[HIDDEN], tag))this[HIDDEN][tag] = false; + setSymbolDesc(this, tag, createDesc(1, value)); + }; + if(DESCRIPTORS && setter)setSymbolDesc(ObjectProto, tag, {configurable: true, set: $set}); + return wrap(tag); + }; + redefine($Symbol[PROTOTYPE], 'toString', function toString(){ + return this._k; + }); + + $GOPD.f = $getOwnPropertyDescriptor; + $DP.f = $defineProperty; + require('./_object-gopn').f = gOPNExt.f = $getOwnPropertyNames; + require('./_object-pie').f = $propertyIsEnumerable; + require('./_object-gops').f = $getOwnPropertySymbols; + + if(DESCRIPTORS && !require('./_library')){ + redefine(ObjectProto, 'propertyIsEnumerable', $propertyIsEnumerable, true); + } + + wksExt.f = function(name){ + return wrap(wks(name)); + } +} + +$export($export.G + $export.W + $export.F * !USE_NATIVE, {Symbol: $Symbol}); + +for(var symbols = ( + // 19.4.2.2, 19.4.2.3, 19.4.2.4, 19.4.2.6, 19.4.2.8, 19.4.2.9, 19.4.2.10, 19.4.2.11, 19.4.2.12, 19.4.2.13, 19.4.2.14 + 'hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables' +).split(','), i = 0; symbols.length > i; )wks(symbols[i++]); + +for(var symbols = $keys(wks.store), i = 0; symbols.length > i; )wksDefine(symbols[i++]); + +$export($export.S + $export.F * !USE_NATIVE, 'Symbol', { + // 19.4.2.1 Symbol.for(key) + 'for': function(key){ + return has(SymbolRegistry, key += '') + ? SymbolRegistry[key] + : SymbolRegistry[key] = $Symbol(key); + }, + // 19.4.2.5 Symbol.keyFor(sym) + keyFor: function keyFor(key){ + if(isSymbol(key))return keyOf(SymbolRegistry, key); + throw TypeError(key + ' is not a symbol!'); + }, + useSetter: function(){ setter = true; }, + useSimple: function(){ setter = false; } +}); + +$export($export.S + $export.F * !USE_NATIVE, 'Object', { + // 19.1.2.2 Object.create(O [, Properties]) + create: $create, + // 19.1.2.4 Object.defineProperty(O, P, Attributes) + defineProperty: $defineProperty, + // 19.1.2.3 Object.defineProperties(O, Properties) + defineProperties: $defineProperties, + // 19.1.2.6 Object.getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptor: $getOwnPropertyDescriptor, + // 19.1.2.7 Object.getOwnPropertyNames(O) + getOwnPropertyNames: $getOwnPropertyNames, + // 19.1.2.8 Object.getOwnPropertySymbols(O) + getOwnPropertySymbols: $getOwnPropertySymbols +}); + +// 24.3.2 JSON.stringify(value [, replacer [, space]]) +$JSON && $export($export.S + $export.F * (!USE_NATIVE || $fails(function(){ + var S = $Symbol(); + // MS Edge converts symbol values to JSON as {} + // WebKit converts symbol values to JSON as null + // V8 throws on boxed symbols + return _stringify([S]) != '[null]' || _stringify({a: S}) != '{}' || _stringify(Object(S)) != '{}'; +})), 'JSON', { + stringify: function stringify(it){ + if(it === undefined || isSymbol(it))return; // IE8 returns string on undefined + var args = [it] + , i = 1 + , replacer, $replacer; + while(arguments.length > i)args.push(arguments[i++]); + replacer = args[1]; + if(typeof replacer == 'function')$replacer = replacer; + if($replacer || !isArray(replacer))replacer = function(key, value){ + if($replacer)value = $replacer.call(this, key, value); + if(!isSymbol(value))return value; + }; + args[1] = replacer; + return _stringify.apply($JSON, args); + } +}); + +// 19.4.3.4 Symbol.prototype[@@toPrimitive](hint) +$Symbol[PROTOTYPE][TO_PRIMITIVE] || require('./_hide')($Symbol[PROTOTYPE], TO_PRIMITIVE, $Symbol[PROTOTYPE].valueOf); +// 19.4.3.5 Symbol.prototype[@@toStringTag] +setToStringTag($Symbol, 'Symbol'); +// 20.2.1.9 Math[@@toStringTag] +setToStringTag(Math, 'Math', true); +// 24.3.3 JSON[@@toStringTag] +setToStringTag(global.JSON, 'JSON', true); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.typed.array-buffer.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.typed.array-buffer.js new file mode 100644 index 00000000..9f47082c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.typed.array-buffer.js @@ -0,0 +1,46 @@ +'use strict'; +var $export = require('./_export') + , $typed = require('./_typed') + , buffer = require('./_typed-buffer') + , anObject = require('./_an-object') + , toIndex = require('./_to-index') + , toLength = require('./_to-length') + , isObject = require('./_is-object') + , ArrayBuffer = require('./_global').ArrayBuffer + , speciesConstructor = require('./_species-constructor') + , $ArrayBuffer = buffer.ArrayBuffer + , $DataView = buffer.DataView + , $isView = $typed.ABV && ArrayBuffer.isView + , $slice = $ArrayBuffer.prototype.slice + , VIEW = $typed.VIEW + , ARRAY_BUFFER = 'ArrayBuffer'; + +$export($export.G + $export.W + $export.F * (ArrayBuffer !== $ArrayBuffer), {ArrayBuffer: $ArrayBuffer}); + +$export($export.S + $export.F * !$typed.CONSTR, ARRAY_BUFFER, { + // 24.1.3.1 ArrayBuffer.isView(arg) + isView: function isView(it){ + return $isView && $isView(it) || isObject(it) && VIEW in it; + } +}); + +$export($export.P + $export.U + $export.F * require('./_fails')(function(){ + return !new $ArrayBuffer(2).slice(1, undefined).byteLength; +}), ARRAY_BUFFER, { + // 24.1.4.3 ArrayBuffer.prototype.slice(start, end) + slice: function slice(start, end){ + if($slice !== undefined && end === undefined)return $slice.call(anObject(this), start); // FF fix + var len = anObject(this).byteLength + , first = toIndex(start, len) + , final = toIndex(end === undefined ? len : end, len) + , result = new (speciesConstructor(this, $ArrayBuffer))(toLength(final - first)) + , viewS = new $DataView(this) + , viewT = new $DataView(result) + , index = 0; + while(first < final){ + viewT.setUint8(index++, viewS.getUint8(first++)); + } return result; + } +}); + +require('./_set-species')(ARRAY_BUFFER); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.typed.data-view.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.typed.data-view.js new file mode 100644 index 00000000..ee7b8812 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.typed.data-view.js @@ -0,0 +1,4 @@ +var $export = require('./_export'); +$export($export.G + $export.W + $export.F * !require('./_typed').ABV, { + DataView: require('./_typed-buffer').DataView +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.typed.float32-array.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.typed.float32-array.js new file mode 100644 index 00000000..2c4c9a69 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.typed.float32-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Float32', 4, function(init){ + return function Float32Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.typed.float64-array.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.typed.float64-array.js new file mode 100644 index 00000000..4b20257f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.typed.float64-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Float64', 8, function(init){ + return function Float64Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.typed.int16-array.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.typed.int16-array.js new file mode 100644 index 00000000..d3f61c56 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.typed.int16-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Int16', 2, function(init){ + return function Int16Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.typed.int32-array.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.typed.int32-array.js new file mode 100644 index 00000000..df47c1bb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.typed.int32-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Int32', 4, function(init){ + return function Int32Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.typed.int8-array.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.typed.int8-array.js new file mode 100644 index 00000000..da4dbf0a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.typed.int8-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Int8', 1, function(init){ + return function Int8Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.typed.uint16-array.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.typed.uint16-array.js new file mode 100644 index 00000000..cb335773 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.typed.uint16-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Uint16', 2, function(init){ + return function Uint16Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.typed.uint32-array.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.typed.uint32-array.js new file mode 100644 index 00000000..41c9e7b8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.typed.uint32-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Uint32', 4, function(init){ + return function Uint32Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.typed.uint8-array.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.typed.uint8-array.js new file mode 100644 index 00000000..f794f86c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.typed.uint8-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Uint8', 1, function(init){ + return function Uint8Array(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.typed.uint8-clamped-array.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.typed.uint8-clamped-array.js new file mode 100644 index 00000000..b1230479 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.typed.uint8-clamped-array.js @@ -0,0 +1,5 @@ +require('./_typed-array')('Uint8', 1, function(init){ + return function Uint8ClampedArray(data, byteOffset, length){ + return init(this, data, byteOffset, length); + }; +}, true); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.weak-map.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.weak-map.js new file mode 100644 index 00000000..4109db33 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.weak-map.js @@ -0,0 +1,56 @@ +'use strict'; +var each = require('./_array-methods')(0) + , redefine = require('./_redefine') + , meta = require('./_meta') + , assign = require('./_object-assign') + , weak = require('./_collection-weak') + , isObject = require('./_is-object') + , getWeak = meta.getWeak + , isExtensible = Object.isExtensible + , uncaughtFrozenStore = weak.ufstore + , tmp = {} + , InternalMap; + +var wrapper = function(get){ + return function WeakMap(){ + return get(this, arguments.length > 0 ? arguments[0] : undefined); + }; +}; + +var methods = { + // 23.3.3.3 WeakMap.prototype.get(key) + get: function get(key){ + if(isObject(key)){ + var data = getWeak(key); + if(data === true)return uncaughtFrozenStore(this).get(key); + return data ? data[this._i] : undefined; + } + }, + // 23.3.3.5 WeakMap.prototype.set(key, value) + set: function set(key, value){ + return weak.def(this, key, value); + } +}; + +// 23.3 WeakMap Objects +var $WeakMap = module.exports = require('./_collection')('WeakMap', wrapper, methods, weak, true, true); + +// IE11 WeakMap frozen keys fix +if(new $WeakMap().set((Object.freeze || Object)(tmp), 7).get(tmp) != 7){ + InternalMap = weak.getConstructor(wrapper); + assign(InternalMap.prototype, methods); + meta.NEED = true; + each(['delete', 'has', 'get', 'set'], function(key){ + var proto = $WeakMap.prototype + , method = proto[key]; + redefine(proto, key, function(a, b){ + // store frozen objects on internal weakmap shim + if(isObject(a) && !isExtensible(a)){ + if(!this._f)this._f = new InternalMap; + var result = this._f[key](a, b); + return key == 'set' ? this : result; + // store all the rest on native weakmap + } return method.call(this, a, b); + }); + }); +} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es6.weak-set.js b/pitfall/pdfkit/node_modules/core-js/modules/es6.weak-set.js new file mode 100644 index 00000000..77d01b6b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es6.weak-set.js @@ -0,0 +1,12 @@ +'use strict'; +var weak = require('./_collection-weak'); + +// 23.4 WeakSet Objects +require('./_collection')('WeakSet', function(get){ + return function WeakSet(){ return get(this, arguments.length > 0 ? arguments[0] : undefined); }; +}, { + // 23.4.3.1 WeakSet.prototype.add(value) + add: function add(value){ + return weak.def(this, value, true); + } +}, weak, false, true); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.array.includes.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.array.includes.js new file mode 100644 index 00000000..6d5b0090 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.array.includes.js @@ -0,0 +1,12 @@ +'use strict'; +// https://github.com/tc39/Array.prototype.includes +var $export = require('./_export') + , $includes = require('./_array-includes')(true); + +$export($export.P, 'Array', { + includes: function includes(el /*, fromIndex = 0 */){ + return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); + } +}); + +require('./_add-to-unscopables')('includes'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.asap.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.asap.js new file mode 100644 index 00000000..b762b49a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.asap.js @@ -0,0 +1,12 @@ +// https://github.com/rwaldron/tc39-notes/blob/master/es6/2014-09/sept-25.md#510-globalasap-for-enqueuing-a-microtask +var $export = require('./_export') + , microtask = require('./_microtask')() + , process = require('./_global').process + , isNode = require('./_cof')(process) == 'process'; + +$export($export.G, { + asap: function asap(fn){ + var domain = isNode && process.domain; + microtask(domain ? domain.bind(fn) : fn); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.error.is-error.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.error.is-error.js new file mode 100644 index 00000000..d6fe29dc --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.error.is-error.js @@ -0,0 +1,9 @@ +// https://github.com/ljharb/proposal-is-error +var $export = require('./_export') + , cof = require('./_cof'); + +$export($export.S, 'Error', { + isError: function isError(it){ + return cof(it) === 'Error'; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.map.to-json.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.map.to-json.js new file mode 100644 index 00000000..19f9b6d3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.map.to-json.js @@ -0,0 +1,4 @@ +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var $export = require('./_export'); + +$export($export.P + $export.R, 'Map', {toJSON: require('./_collection-to-json')('Map')}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.math.iaddh.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.math.iaddh.js new file mode 100644 index 00000000..bb3f3d38 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.math.iaddh.js @@ -0,0 +1,11 @@ +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = require('./_export'); + +$export($export.S, 'Math', { + iaddh: function iaddh(x0, x1, y0, y1){ + var $x0 = x0 >>> 0 + , $x1 = x1 >>> 0 + , $y0 = y0 >>> 0; + return $x1 + (y1 >>> 0) + (($x0 & $y0 | ($x0 | $y0) & ~($x0 + $y0 >>> 0)) >>> 31) | 0; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.math.imulh.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.math.imulh.js new file mode 100644 index 00000000..a25da686 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.math.imulh.js @@ -0,0 +1,16 @@ +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = require('./_export'); + +$export($export.S, 'Math', { + imulh: function imulh(u, v){ + var UINT16 = 0xffff + , $u = +u + , $v = +v + , u0 = $u & UINT16 + , v0 = $v & UINT16 + , u1 = $u >> 16 + , v1 = $v >> 16 + , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); + return u1 * v1 + (t >> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >> 16); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.math.isubh.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.math.isubh.js new file mode 100644 index 00000000..3814dc29 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.math.isubh.js @@ -0,0 +1,11 @@ +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = require('./_export'); + +$export($export.S, 'Math', { + isubh: function isubh(x0, x1, y0, y1){ + var $x0 = x0 >>> 0 + , $x1 = x1 >>> 0 + , $y0 = y0 >>> 0; + return $x1 - (y1 >>> 0) - ((~$x0 & $y0 | ~($x0 ^ $y0) & $x0 - $y0 >>> 0) >>> 31) | 0; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.math.umulh.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.math.umulh.js new file mode 100644 index 00000000..0d22cf1b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.math.umulh.js @@ -0,0 +1,16 @@ +// https://gist.github.com/BrendanEich/4294d5c212a6d2254703 +var $export = require('./_export'); + +$export($export.S, 'Math', { + umulh: function umulh(u, v){ + var UINT16 = 0xffff + , $u = +u + , $v = +v + , u0 = $u & UINT16 + , v0 = $v & UINT16 + , u1 = $u >>> 16 + , v1 = $v >>> 16 + , t = (u1 * v0 >>> 0) + (u0 * v0 >>> 16); + return u1 * v1 + (t >>> 16) + ((u0 * v1 >>> 0) + (t & UINT16) >>> 16); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.object.define-getter.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.object.define-getter.js new file mode 100644 index 00000000..f206e96a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.object.define-getter.js @@ -0,0 +1,12 @@ +'use strict'; +var $export = require('./_export') + , toObject = require('./_to-object') + , aFunction = require('./_a-function') + , $defineProperty = require('./_object-dp'); + +// B.2.2.2 Object.prototype.__defineGetter__(P, getter) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __defineGetter__: function __defineGetter__(P, getter){ + $defineProperty.f(toObject(this), P, {get: aFunction(getter), enumerable: true, configurable: true}); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.object.define-setter.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.object.define-setter.js new file mode 100644 index 00000000..c0f7b700 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.object.define-setter.js @@ -0,0 +1,12 @@ +'use strict'; +var $export = require('./_export') + , toObject = require('./_to-object') + , aFunction = require('./_a-function') + , $defineProperty = require('./_object-dp'); + +// B.2.2.3 Object.prototype.__defineSetter__(P, setter) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __defineSetter__: function __defineSetter__(P, setter){ + $defineProperty.f(toObject(this), P, {set: aFunction(setter), enumerable: true, configurable: true}); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.object.entries.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.object.entries.js new file mode 100644 index 00000000..cfc049df --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.object.entries.js @@ -0,0 +1,9 @@ +// https://github.com/tc39/proposal-object-values-entries +var $export = require('./_export') + , $entries = require('./_object-to-array')(true); + +$export($export.S, 'Object', { + entries: function entries(it){ + return $entries(it); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.object.enumerable-entries.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.object.enumerable-entries.js new file mode 100644 index 00000000..5daa803b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.object.enumerable-entries.js @@ -0,0 +1,12 @@ +// https://github.com/leobalter/object-enumerables +var $export = require('./_export') + , toObject = require('./_to-object'); + +$export($export.S, 'Object', { + enumerableEntries: function enumerableEntries(O){ + var T = toObject(O) + , properties = []; + for(var key in T)properties.push([key, T[key]]); + return properties; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.object.enumerable-keys.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.object.enumerable-keys.js new file mode 100644 index 00000000..791ec184 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.object.enumerable-keys.js @@ -0,0 +1,12 @@ +// https://github.com/leobalter/object-enumerables +var $export = require('./_export') + , toObject = require('./_to-object'); + +$export($export.S, 'Object', { + enumerableKeys: function enumerableKeys(O){ + var T = toObject(O) + , properties = []; + for(var key in T)properties.push(key); + return properties; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.object.enumerable-values.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.object.enumerable-values.js new file mode 100644 index 00000000..1d1bfaa7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.object.enumerable-values.js @@ -0,0 +1,12 @@ +// https://github.com/leobalter/object-enumerables +var $export = require('./_export') + , toObject = require('./_to-object'); + +$export($export.S, 'Object', { + enumerableValues: function enumerableValues(O){ + var T = toObject(O) + , properties = []; + for(var key in T)properties.push(T[key]); + return properties; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.object.get-own-property-descriptors.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.object.get-own-property-descriptors.js new file mode 100644 index 00000000..0242b7a0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.object.get-own-property-descriptors.js @@ -0,0 +1,19 @@ +// https://github.com/tc39/proposal-object-getownpropertydescriptors +var $export = require('./_export') + , ownKeys = require('./_own-keys') + , toIObject = require('./_to-iobject') + , gOPD = require('./_object-gopd') + , createProperty = require('./_create-property'); + +$export($export.S, 'Object', { + getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object){ + var O = toIObject(object) + , getDesc = gOPD.f + , keys = ownKeys(O) + , result = {} + , i = 0 + , key; + while(keys.length > i)createProperty(result, key = keys[i++], getDesc(O, key)); + return result; + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.object.lookup-getter.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.object.lookup-getter.js new file mode 100644 index 00000000..ec140345 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.object.lookup-getter.js @@ -0,0 +1,18 @@ +'use strict'; +var $export = require('./_export') + , toObject = require('./_to-object') + , toPrimitive = require('./_to-primitive') + , getPrototypeOf = require('./_object-gpo') + , getOwnPropertyDescriptor = require('./_object-gopd').f; + +// B.2.2.4 Object.prototype.__lookupGetter__(P) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __lookupGetter__: function __lookupGetter__(P){ + var O = toObject(this) + , K = toPrimitive(P, true) + , D; + do { + if(D = getOwnPropertyDescriptor(O, K))return D.get; + } while(O = getPrototypeOf(O)); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.object.lookup-setter.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.object.lookup-setter.js new file mode 100644 index 00000000..539dda82 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.object.lookup-setter.js @@ -0,0 +1,18 @@ +'use strict'; +var $export = require('./_export') + , toObject = require('./_to-object') + , toPrimitive = require('./_to-primitive') + , getPrototypeOf = require('./_object-gpo') + , getOwnPropertyDescriptor = require('./_object-gopd').f; + +// B.2.2.5 Object.prototype.__lookupSetter__(P) +require('./_descriptors') && $export($export.P + require('./_object-forced-pam'), 'Object', { + __lookupSetter__: function __lookupSetter__(P){ + var O = toObject(this) + , K = toPrimitive(P, true) + , D; + do { + if(D = getOwnPropertyDescriptor(O, K))return D.set; + } while(O = getPrototypeOf(O)); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.object.values.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.object.values.js new file mode 100644 index 00000000..42abd640 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.object.values.js @@ -0,0 +1,9 @@ +// https://github.com/tc39/proposal-object-values-entries +var $export = require('./_export') + , $values = require('./_object-to-array')(false); + +$export($export.S, 'Object', { + values: function values(it){ + return $values(it); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.observable.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.observable.js new file mode 100644 index 00000000..e34fa4f2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.observable.js @@ -0,0 +1,199 @@ +'use strict'; +// https://github.com/zenparsing/es-observable +var $export = require('./_export') + , global = require('./_global') + , core = require('./_core') + , microtask = require('./_microtask')() + , OBSERVABLE = require('./_wks')('observable') + , aFunction = require('./_a-function') + , anObject = require('./_an-object') + , anInstance = require('./_an-instance') + , redefineAll = require('./_redefine-all') + , hide = require('./_hide') + , forOf = require('./_for-of') + , RETURN = forOf.RETURN; + +var getMethod = function(fn){ + return fn == null ? undefined : aFunction(fn); +}; + +var cleanupSubscription = function(subscription){ + var cleanup = subscription._c; + if(cleanup){ + subscription._c = undefined; + cleanup(); + } +}; + +var subscriptionClosed = function(subscription){ + return subscription._o === undefined; +}; + +var closeSubscription = function(subscription){ + if(!subscriptionClosed(subscription)){ + subscription._o = undefined; + cleanupSubscription(subscription); + } +}; + +var Subscription = function(observer, subscriber){ + anObject(observer); + this._c = undefined; + this._o = observer; + observer = new SubscriptionObserver(this); + try { + var cleanup = subscriber(observer) + , subscription = cleanup; + if(cleanup != null){ + if(typeof cleanup.unsubscribe === 'function')cleanup = function(){ subscription.unsubscribe(); }; + else aFunction(cleanup); + this._c = cleanup; + } + } catch(e){ + observer.error(e); + return; + } if(subscriptionClosed(this))cleanupSubscription(this); +}; + +Subscription.prototype = redefineAll({}, { + unsubscribe: function unsubscribe(){ closeSubscription(this); } +}); + +var SubscriptionObserver = function(subscription){ + this._s = subscription; +}; + +SubscriptionObserver.prototype = redefineAll({}, { + next: function next(value){ + var subscription = this._s; + if(!subscriptionClosed(subscription)){ + var observer = subscription._o; + try { + var m = getMethod(observer.next); + if(m)return m.call(observer, value); + } catch(e){ + try { + closeSubscription(subscription); + } finally { + throw e; + } + } + } + }, + error: function error(value){ + var subscription = this._s; + if(subscriptionClosed(subscription))throw value; + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.error); + if(!m)throw value; + value = m.call(observer, value); + } catch(e){ + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } cleanupSubscription(subscription); + return value; + }, + complete: function complete(value){ + var subscription = this._s; + if(!subscriptionClosed(subscription)){ + var observer = subscription._o; + subscription._o = undefined; + try { + var m = getMethod(observer.complete); + value = m ? m.call(observer, value) : undefined; + } catch(e){ + try { + cleanupSubscription(subscription); + } finally { + throw e; + } + } cleanupSubscription(subscription); + return value; + } + } +}); + +var $Observable = function Observable(subscriber){ + anInstance(this, $Observable, 'Observable', '_f')._f = aFunction(subscriber); +}; + +redefineAll($Observable.prototype, { + subscribe: function subscribe(observer){ + return new Subscription(observer, this._f); + }, + forEach: function forEach(fn){ + var that = this; + return new (core.Promise || global.Promise)(function(resolve, reject){ + aFunction(fn); + var subscription = that.subscribe({ + next : function(value){ + try { + return fn(value); + } catch(e){ + reject(e); + subscription.unsubscribe(); + } + }, + error: reject, + complete: resolve + }); + }); + } +}); + +redefineAll($Observable, { + from: function from(x){ + var C = typeof this === 'function' ? this : $Observable; + var method = getMethod(anObject(x)[OBSERVABLE]); + if(method){ + var observable = anObject(method.call(x)); + return observable.constructor === C ? observable : new C(function(observer){ + return observable.subscribe(observer); + }); + } + return new C(function(observer){ + var done = false; + microtask(function(){ + if(!done){ + try { + if(forOf(x, false, function(it){ + observer.next(it); + if(done)return RETURN; + }) === RETURN)return; + } catch(e){ + if(done)throw e; + observer.error(e); + return; + } observer.complete(); + } + }); + return function(){ done = true; }; + }); + }, + of: function of(){ + for(var i = 0, l = arguments.length, items = Array(l); i < l;)items[i] = arguments[i++]; + return new (typeof this === 'function' ? this : $Observable)(function(observer){ + var done = false; + microtask(function(){ + if(!done){ + for(var i = 0; i < items.length; ++i){ + observer.next(items[i]); + if(done)return; + } observer.complete(); + } + }); + return function(){ done = true; }; + }); + } +}); + +hide($Observable.prototype, OBSERVABLE, function(){ return this; }); + +$export($export.G, {Observable: $Observable}); + +require('./_set-species')('Observable'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.reflect.define-metadata.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.reflect.define-metadata.js new file mode 100644 index 00000000..c833e431 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.reflect.define-metadata.js @@ -0,0 +1,8 @@ +var metadata = require('./_metadata') + , anObject = require('./_an-object') + , toMetaKey = metadata.key + , ordinaryDefineOwnMetadata = metadata.set; + +metadata.exp({defineMetadata: function defineMetadata(metadataKey, metadataValue, target, targetKey){ + ordinaryDefineOwnMetadata(metadataKey, metadataValue, anObject(target), toMetaKey(targetKey)); +}}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.reflect.delete-metadata.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.reflect.delete-metadata.js new file mode 100644 index 00000000..8a8a8253 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.reflect.delete-metadata.js @@ -0,0 +1,15 @@ +var metadata = require('./_metadata') + , anObject = require('./_an-object') + , toMetaKey = metadata.key + , getOrCreateMetadataMap = metadata.map + , store = metadata.store; + +metadata.exp({deleteMetadata: function deleteMetadata(metadataKey, target /*, targetKey */){ + var targetKey = arguments.length < 3 ? undefined : toMetaKey(arguments[2]) + , metadataMap = getOrCreateMetadataMap(anObject(target), targetKey, false); + if(metadataMap === undefined || !metadataMap['delete'](metadataKey))return false; + if(metadataMap.size)return true; + var targetMetadata = store.get(target); + targetMetadata['delete'](targetKey); + return !!targetMetadata.size || store['delete'](target); +}}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.reflect.get-metadata-keys.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.reflect.get-metadata-keys.js new file mode 100644 index 00000000..58c4dcc2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.reflect.get-metadata-keys.js @@ -0,0 +1,19 @@ +var Set = require('./es6.set') + , from = require('./_array-from-iterable') + , metadata = require('./_metadata') + , anObject = require('./_an-object') + , getPrototypeOf = require('./_object-gpo') + , ordinaryOwnMetadataKeys = metadata.keys + , toMetaKey = metadata.key; + +var ordinaryMetadataKeys = function(O, P){ + var oKeys = ordinaryOwnMetadataKeys(O, P) + , parent = getPrototypeOf(O); + if(parent === null)return oKeys; + var pKeys = ordinaryMetadataKeys(parent, P); + return pKeys.length ? oKeys.length ? from(new Set(oKeys.concat(pKeys))) : pKeys : oKeys; +}; + +metadata.exp({getMetadataKeys: function getMetadataKeys(target /*, targetKey */){ + return ordinaryMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); +}}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.reflect.get-metadata.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.reflect.get-metadata.js new file mode 100644 index 00000000..48cd9d67 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.reflect.get-metadata.js @@ -0,0 +1,17 @@ +var metadata = require('./_metadata') + , anObject = require('./_an-object') + , getPrototypeOf = require('./_object-gpo') + , ordinaryHasOwnMetadata = metadata.has + , ordinaryGetOwnMetadata = metadata.get + , toMetaKey = metadata.key; + +var ordinaryGetMetadata = function(MetadataKey, O, P){ + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if(hasOwn)return ordinaryGetOwnMetadata(MetadataKey, O, P); + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryGetMetadata(MetadataKey, parent, P) : undefined; +}; + +metadata.exp({getMetadata: function getMetadata(metadataKey, target /*, targetKey */){ + return ordinaryGetMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +}}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.reflect.get-own-metadata-keys.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.reflect.get-own-metadata-keys.js new file mode 100644 index 00000000..93ecfbe5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.reflect.get-own-metadata-keys.js @@ -0,0 +1,8 @@ +var metadata = require('./_metadata') + , anObject = require('./_an-object') + , ordinaryOwnMetadataKeys = metadata.keys + , toMetaKey = metadata.key; + +metadata.exp({getOwnMetadataKeys: function getOwnMetadataKeys(target /*, targetKey */){ + return ordinaryOwnMetadataKeys(anObject(target), arguments.length < 2 ? undefined : toMetaKey(arguments[1])); +}}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.reflect.get-own-metadata.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.reflect.get-own-metadata.js new file mode 100644 index 00000000..f1040f91 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.reflect.get-own-metadata.js @@ -0,0 +1,9 @@ +var metadata = require('./_metadata') + , anObject = require('./_an-object') + , ordinaryGetOwnMetadata = metadata.get + , toMetaKey = metadata.key; + +metadata.exp({getOwnMetadata: function getOwnMetadata(metadataKey, target /*, targetKey */){ + return ordinaryGetOwnMetadata(metadataKey, anObject(target) + , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +}}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.reflect.has-metadata.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.reflect.has-metadata.js new file mode 100644 index 00000000..0ff63786 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.reflect.has-metadata.js @@ -0,0 +1,16 @@ +var metadata = require('./_metadata') + , anObject = require('./_an-object') + , getPrototypeOf = require('./_object-gpo') + , ordinaryHasOwnMetadata = metadata.has + , toMetaKey = metadata.key; + +var ordinaryHasMetadata = function(MetadataKey, O, P){ + var hasOwn = ordinaryHasOwnMetadata(MetadataKey, O, P); + if(hasOwn)return true; + var parent = getPrototypeOf(O); + return parent !== null ? ordinaryHasMetadata(MetadataKey, parent, P) : false; +}; + +metadata.exp({hasMetadata: function hasMetadata(metadataKey, target /*, targetKey */){ + return ordinaryHasMetadata(metadataKey, anObject(target), arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +}}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.reflect.has-own-metadata.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.reflect.has-own-metadata.js new file mode 100644 index 00000000..d645ea3f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.reflect.has-own-metadata.js @@ -0,0 +1,9 @@ +var metadata = require('./_metadata') + , anObject = require('./_an-object') + , ordinaryHasOwnMetadata = metadata.has + , toMetaKey = metadata.key; + +metadata.exp({hasOwnMetadata: function hasOwnMetadata(metadataKey, target /*, targetKey */){ + return ordinaryHasOwnMetadata(metadataKey, anObject(target) + , arguments.length < 3 ? undefined : toMetaKey(arguments[2])); +}}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.reflect.metadata.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.reflect.metadata.js new file mode 100644 index 00000000..3a4e3aee --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.reflect.metadata.js @@ -0,0 +1,15 @@ +var metadata = require('./_metadata') + , anObject = require('./_an-object') + , aFunction = require('./_a-function') + , toMetaKey = metadata.key + , ordinaryDefineOwnMetadata = metadata.set; + +metadata.exp({metadata: function metadata(metadataKey, metadataValue){ + return function decorator(target, targetKey){ + ordinaryDefineOwnMetadata( + metadataKey, metadataValue, + (targetKey !== undefined ? anObject : aFunction)(target), + toMetaKey(targetKey) + ); + }; +}}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.set.to-json.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.set.to-json.js new file mode 100644 index 00000000..fd68cb51 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.set.to-json.js @@ -0,0 +1,4 @@ +// https://github.com/DavidBruant/Map-Set.prototype.toJSON +var $export = require('./_export'); + +$export($export.P + $export.R, 'Set', {toJSON: require('./_collection-to-json')('Set')}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.string.at.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.string.at.js new file mode 100644 index 00000000..208654e6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.string.at.js @@ -0,0 +1,10 @@ +'use strict'; +// https://github.com/mathiasbynens/String.prototype.at +var $export = require('./_export') + , $at = require('./_string-at')(true); + +$export($export.P, 'String', { + at: function at(pos){ + return $at(this, pos); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.string.match-all.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.string.match-all.js new file mode 100644 index 00000000..cb0099b3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.string.match-all.js @@ -0,0 +1,30 @@ +'use strict'; +// https://tc39.github.io/String.prototype.matchAll/ +var $export = require('./_export') + , defined = require('./_defined') + , toLength = require('./_to-length') + , isRegExp = require('./_is-regexp') + , getFlags = require('./_flags') + , RegExpProto = RegExp.prototype; + +var $RegExpStringIterator = function(regexp, string){ + this._r = regexp; + this._s = string; +}; + +require('./_iter-create')($RegExpStringIterator, 'RegExp String', function next(){ + var match = this._r.exec(this._s); + return {value: match, done: match === null}; +}); + +$export($export.P, 'String', { + matchAll: function matchAll(regexp){ + defined(this); + if(!isRegExp(regexp))throw TypeError(regexp + ' is not a regexp!'); + var S = String(this) + , flags = 'flags' in RegExpProto ? String(regexp.flags) : getFlags.call(regexp) + , rx = new RegExp(regexp.source, ~flags.indexOf('g') ? flags : 'g' + flags); + rx.lastIndex = toLength(regexp.lastIndex); + return new $RegExpStringIterator(rx, S); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.string.pad-end.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.string.pad-end.js new file mode 100644 index 00000000..8483d82f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.string.pad-end.js @@ -0,0 +1,10 @@ +'use strict'; +// https://github.com/tc39/proposal-string-pad-start-end +var $export = require('./_export') + , $pad = require('./_string-pad'); + +$export($export.P, 'String', { + padEnd: function padEnd(maxLength /*, fillString = ' ' */){ + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, false); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.string.pad-start.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.string.pad-start.js new file mode 100644 index 00000000..b79b605d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.string.pad-start.js @@ -0,0 +1,10 @@ +'use strict'; +// https://github.com/tc39/proposal-string-pad-start-end +var $export = require('./_export') + , $pad = require('./_string-pad'); + +$export($export.P, 'String', { + padStart: function padStart(maxLength /*, fillString = ' ' */){ + return $pad(this, maxLength, arguments.length > 1 ? arguments[1] : undefined, true); + } +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.string.trim-left.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.string.trim-left.js new file mode 100644 index 00000000..e5845771 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.string.trim-left.js @@ -0,0 +1,7 @@ +'use strict'; +// https://github.com/sebmarkbage/ecmascript-string-left-right-trim +require('./_string-trim')('trimLeft', function($trim){ + return function trimLeft(){ + return $trim(this, 1); + }; +}, 'trimStart'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.string.trim-right.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.string.trim-right.js new file mode 100644 index 00000000..42a9ed33 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.string.trim-right.js @@ -0,0 +1,7 @@ +'use strict'; +// https://github.com/sebmarkbage/ecmascript-string-left-right-trim +require('./_string-trim')('trimRight', function($trim){ + return function trimRight(){ + return $trim(this, 2); + }; +}, 'trimEnd'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.symbol.async-iterator.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.symbol.async-iterator.js new file mode 100644 index 00000000..cf9f74a5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.symbol.async-iterator.js @@ -0,0 +1 @@ +require('./_wks-define')('asyncIterator'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.symbol.observable.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.symbol.observable.js new file mode 100644 index 00000000..0163bca5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.symbol.observable.js @@ -0,0 +1 @@ +require('./_wks-define')('observable'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/es7.system.global.js b/pitfall/pdfkit/node_modules/core-js/modules/es7.system.global.js new file mode 100644 index 00000000..8c2ab82d --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/es7.system.global.js @@ -0,0 +1,4 @@ +// https://github.com/ljharb/proposal-global +var $export = require('./_export'); + +$export($export.S, 'System', {global: require('./_global')}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/library/_add-to-unscopables.js b/pitfall/pdfkit/node_modules/core-js/modules/library/_add-to-unscopables.js new file mode 100644 index 00000000..faf87af3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/library/_add-to-unscopables.js @@ -0,0 +1 @@ +module.exports = function(){ /* empty */ }; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/library/_collection.js b/pitfall/pdfkit/node_modules/core-js/modules/library/_collection.js new file mode 100644 index 00000000..0bdd7fcb --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/library/_collection.js @@ -0,0 +1,59 @@ +'use strict'; +var global = require('./_global') + , $export = require('./_export') + , meta = require('./_meta') + , fails = require('./_fails') + , hide = require('./_hide') + , redefineAll = require('./_redefine-all') + , forOf = require('./_for-of') + , anInstance = require('./_an-instance') + , isObject = require('./_is-object') + , setToStringTag = require('./_set-to-string-tag') + , dP = require('./_object-dp').f + , each = require('./_array-methods')(0) + , DESCRIPTORS = require('./_descriptors'); + +module.exports = function(NAME, wrapper, methods, common, IS_MAP, IS_WEAK){ + var Base = global[NAME] + , C = Base + , ADDER = IS_MAP ? 'set' : 'add' + , proto = C && C.prototype + , O = {}; + if(!DESCRIPTORS || typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function(){ + new C().entries().next(); + }))){ + // create collection constructor + C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); + redefineAll(C.prototype, methods); + meta.NEED = true; + } else { + C = wrapper(function(target, iterable){ + anInstance(target, C, NAME, '_c'); + target._c = new Base; + if(iterable != undefined)forOf(iterable, IS_MAP, target[ADDER], target); + }); + each('add,clear,delete,forEach,get,has,set,keys,values,entries,toJSON'.split(','),function(KEY){ + var IS_ADDER = KEY == 'add' || KEY == 'set'; + if(KEY in proto && !(IS_WEAK && KEY == 'clear'))hide(C.prototype, KEY, function(a, b){ + anInstance(this, C, KEY); + if(!IS_ADDER && IS_WEAK && !isObject(a))return KEY == 'get' ? undefined : false; + var result = this._c[KEY](a === 0 ? 0 : a, b); + return IS_ADDER ? this : result; + }); + }); + if('size' in proto)dP(C.prototype, 'size', { + get: function(){ + return this._c.size; + } + }); + } + + setToStringTag(C, NAME); + + O[NAME] = C; + $export($export.G + $export.W + $export.F, O); + + if(!IS_WEAK)common.setStrong(C, NAME, IS_MAP); + + return C; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/library/_export.js b/pitfall/pdfkit/node_modules/core-js/modules/library/_export.js new file mode 100644 index 00000000..dc084b4c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/library/_export.js @@ -0,0 +1,61 @@ +var global = require('./_global') + , core = require('./_core') + , ctx = require('./_ctx') + , hide = require('./_hide') + , PROTOTYPE = 'prototype'; + +var $export = function(type, name, source){ + var IS_FORCED = type & $export.F + , IS_GLOBAL = type & $export.G + , IS_STATIC = type & $export.S + , IS_PROTO = type & $export.P + , IS_BIND = type & $export.B + , IS_WRAP = type & $export.W + , exports = IS_GLOBAL ? core : core[name] || (core[name] = {}) + , expProto = exports[PROTOTYPE] + , target = IS_GLOBAL ? global : IS_STATIC ? global[name] : (global[name] || {})[PROTOTYPE] + , key, own, out; + if(IS_GLOBAL)source = name; + for(key in source){ + // contains in native + own = !IS_FORCED && target && target[key] !== undefined; + if(own && key in exports)continue; + // export native or passed + out = own ? target[key] : source[key]; + // prevent global pollution for namespaces + exports[key] = IS_GLOBAL && typeof target[key] != 'function' ? source[key] + // bind timers to global for call from export context + : IS_BIND && own ? ctx(out, global) + // wrap global constructors for prevent change them in library + : IS_WRAP && target[key] == out ? (function(C){ + var F = function(a, b, c){ + if(this instanceof C){ + switch(arguments.length){ + case 0: return new C; + case 1: return new C(a); + case 2: return new C(a, b); + } return new C(a, b, c); + } return C.apply(this, arguments); + }; + F[PROTOTYPE] = C[PROTOTYPE]; + return F; + // make static versions for prototype methods + })(out) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; + // export proto methods to core.%CONSTRUCTOR%.methods.%NAME% + if(IS_PROTO){ + (exports.virtual || (exports.virtual = {}))[key] = out; + // export proto methods to core.%CONSTRUCTOR%.prototype.%NAME% + if(type & $export.R && expProto && !expProto[key])hide(expProto, key, out); + } + } +}; +// type bitmap +$export.F = 1; // forced +$export.G = 2; // global +$export.S = 4; // static +$export.P = 8; // proto +$export.B = 16; // bind +$export.W = 32; // wrap +$export.U = 64; // safe +$export.R = 128; // real proto method for `library` +module.exports = $export; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/library/_library.js b/pitfall/pdfkit/node_modules/core-js/modules/library/_library.js new file mode 100644 index 00000000..73f737c5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/library/_library.js @@ -0,0 +1 @@ +module.exports = true; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/library/_path.js b/pitfall/pdfkit/node_modules/core-js/modules/library/_path.js new file mode 100644 index 00000000..e2b878dc --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/library/_path.js @@ -0,0 +1 @@ +module.exports = require('./_core'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/library/_redefine-all.js b/pitfall/pdfkit/node_modules/core-js/modules/library/_redefine-all.js new file mode 100644 index 00000000..beeb2eaf --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/library/_redefine-all.js @@ -0,0 +1,7 @@ +var hide = require('./_hide'); +module.exports = function(target, src, safe){ + for(var key in src){ + if(safe && target[key])target[key] = src[key]; + else hide(target, key, src[key]); + } return target; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/library/_redefine.js b/pitfall/pdfkit/node_modules/core-js/modules/library/_redefine.js new file mode 100644 index 00000000..6bd64530 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/library/_redefine.js @@ -0,0 +1 @@ +module.exports = require('./_hide'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/library/_set-species.js b/pitfall/pdfkit/node_modules/core-js/modules/library/_set-species.js new file mode 100644 index 00000000..4320fa51 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/library/_set-species.js @@ -0,0 +1,14 @@ +'use strict'; +var global = require('./_global') + , core = require('./_core') + , dP = require('./_object-dp') + , DESCRIPTORS = require('./_descriptors') + , SPECIES = require('./_wks')('species'); + +module.exports = function(KEY){ + var C = typeof core[KEY] == 'function' ? core[KEY] : global[KEY]; + if(DESCRIPTORS && C && !C[SPECIES])dP.f(C, SPECIES, { + configurable: true, + get: function(){ return this; } + }); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/library/es6.date.to-primitive.js b/pitfall/pdfkit/node_modules/core-js/modules/library/es6.date.to-primitive.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/core-js/modules/library/es6.date.to-string.js b/pitfall/pdfkit/node_modules/core-js/modules/library/es6.date.to-string.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/core-js/modules/library/es6.function.name.js b/pitfall/pdfkit/node_modules/core-js/modules/library/es6.function.name.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/core-js/modules/library/es6.number.constructor.js b/pitfall/pdfkit/node_modules/core-js/modules/library/es6.number.constructor.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/core-js/modules/library/es6.object.to-string.js b/pitfall/pdfkit/node_modules/core-js/modules/library/es6.object.to-string.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/core-js/modules/library/es6.regexp.constructor.js b/pitfall/pdfkit/node_modules/core-js/modules/library/es6.regexp.constructor.js new file mode 100644 index 00000000..7313c52b --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/library/es6.regexp.constructor.js @@ -0,0 +1 @@ +require('./_set-species')('RegExp'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/library/es6.regexp.flags.js b/pitfall/pdfkit/node_modules/core-js/modules/library/es6.regexp.flags.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/core-js/modules/library/es6.regexp.match.js b/pitfall/pdfkit/node_modules/core-js/modules/library/es6.regexp.match.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/core-js/modules/library/es6.regexp.replace.js b/pitfall/pdfkit/node_modules/core-js/modules/library/es6.regexp.replace.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/core-js/modules/library/es6.regexp.search.js b/pitfall/pdfkit/node_modules/core-js/modules/library/es6.regexp.search.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/core-js/modules/library/es6.regexp.split.js b/pitfall/pdfkit/node_modules/core-js/modules/library/es6.regexp.split.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/core-js/modules/library/es6.regexp.to-string.js b/pitfall/pdfkit/node_modules/core-js/modules/library/es6.regexp.to-string.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/core-js/modules/library/web.dom.iterable.js b/pitfall/pdfkit/node_modules/core-js/modules/library/web.dom.iterable.js new file mode 100644 index 00000000..e56371a9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/library/web.dom.iterable.js @@ -0,0 +1,13 @@ +require('./es6.array.iterator'); +var global = require('./_global') + , hide = require('./_hide') + , Iterators = require('./_iterators') + , TO_STRING_TAG = require('./_wks')('toStringTag'); + +for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){ + var NAME = collections[i] + , Collection = global[NAME] + , proto = Collection && Collection.prototype; + if(proto && !proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = Iterators.Array; +} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/web.dom.iterable.js b/pitfall/pdfkit/node_modules/core-js/modules/web.dom.iterable.js new file mode 100644 index 00000000..a5a4c08e --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/web.dom.iterable.js @@ -0,0 +1,22 @@ +var $iterators = require('./es6.array.iterator') + , redefine = require('./_redefine') + , global = require('./_global') + , hide = require('./_hide') + , Iterators = require('./_iterators') + , wks = require('./_wks') + , ITERATOR = wks('iterator') + , TO_STRING_TAG = wks('toStringTag') + , ArrayValues = Iterators.Array; + +for(var collections = ['NodeList', 'DOMTokenList', 'MediaList', 'StyleSheetList', 'CSSRuleList'], i = 0; i < 5; i++){ + var NAME = collections[i] + , Collection = global[NAME] + , proto = Collection && Collection.prototype + , key; + if(proto){ + if(!proto[ITERATOR])hide(proto, ITERATOR, ArrayValues); + if(!proto[TO_STRING_TAG])hide(proto, TO_STRING_TAG, NAME); + Iterators[NAME] = ArrayValues; + for(key in $iterators)if(!proto[key])redefine(proto, key, $iterators[key], true); + } +} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/web.immediate.js b/pitfall/pdfkit/node_modules/core-js/modules/web.immediate.js new file mode 100644 index 00000000..5b946377 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/web.immediate.js @@ -0,0 +1,6 @@ +var $export = require('./_export') + , $task = require('./_task'); +$export($export.G + $export.B, { + setImmediate: $task.set, + clearImmediate: $task.clear +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/modules/web.timers.js b/pitfall/pdfkit/node_modules/core-js/modules/web.timers.js new file mode 100644 index 00000000..1a1da57f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/modules/web.timers.js @@ -0,0 +1,20 @@ +// ie9- setTimeout & setInterval additional parameters fix +var global = require('./_global') + , $export = require('./_export') + , invoke = require('./_invoke') + , partial = require('./_partial') + , navigator = global.navigator + , MSIE = !!navigator && /MSIE .\./.test(navigator.userAgent); // <- dirty ie9- check +var wrap = function(set){ + return MSIE ? function(fn, time /*, ...args */){ + return set(invoke( + partial, + [].slice.call(arguments, 2), + typeof fn == 'function' ? fn : Function(fn) + ), time); + } : set; +}; +$export($export.G + $export.B + $export.F * MSIE, { + setTimeout: wrap(global.setTimeout), + setInterval: wrap(global.setInterval) +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/package.json b/pitfall/pdfkit/node_modules/core-js/package.json new file mode 100644 index 00000000..c8e01f33 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/package.json @@ -0,0 +1,134 @@ +{ + "_args": [ + [ + { + "raw": "core-js@^2.4.0", + "scope": null, + "escapedName": "core-js", + "name": "core-js", + "rawSpec": "^2.4.0", + "spec": ">=2.4.0 <3.0.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/babel-runtime" + ] + ], + "_from": "core-js@>=2.4.0 <3.0.0", + "_id": "core-js@2.4.1", + "_inCache": true, + "_location": "/core-js", + "_nodeVersion": "6.2.2", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/core-js-2.4.1.tgz_1468791807265_0.5941079026088119" + }, + "_npmUser": { + "name": "zloirock", + "email": "zloirock@zloirock.ru" + }, + "_npmVersion": "3.9.5", + "_phantomChildren": {}, + "_requested": { + "raw": "core-js@^2.4.0", + "scope": null, + "escapedName": "core-js", + "name": "core-js", + "rawSpec": "^2.4.0", + "spec": ">=2.4.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/babel-runtime" + ], + "_resolved": "https://registry.npmjs.org/core-js/-/core-js-2.4.1.tgz", + "_shasum": "4de911e667b0eae9124e34254b53aea6fc618d3e", + "_shrinkwrap": null, + "_spec": "core-js@^2.4.0", + "_where": "/Users/MB/git/pdfkit/node_modules/babel-runtime", + "bugs": { + "url": "https://github.com/zloirock/core-js/issues" + }, + "dependencies": {}, + "description": "Standard library", + "devDependencies": { + "LiveScript": "1.3.x", + "es-observable-tests": "0.2.x", + "eslint": "3.1.x", + "grunt": "1.0.x", + "grunt-cli": "1.2.x", + "grunt-contrib-clean": "1.0.x", + "grunt-contrib-copy": "1.0.x", + "grunt-contrib-uglify": "1.0.x", + "grunt-contrib-watch": "1.0.x", + "grunt-karma": "2.0.x", + "grunt-livescript": "0.6.x", + "karma": "1.1.x", + "karma-chrome-launcher": "1.0.x", + "karma-firefox-launcher": "1.0.x", + "karma-ie-launcher": "1.0.x", + "karma-phantomjs-launcher": "1.0.x", + "karma-qunit": "1.1.x", + "phantomjs-prebuilt": "2.1.x", + "promises-aplus-tests": "2.1.x", + "qunitjs": "2.0.x", + "temp": "0.8.x", + "webpack": "1.13.x" + }, + "directories": {}, + "dist": { + "shasum": "4de911e667b0eae9124e34254b53aea6fc618d3e", + "tarball": "https://registry.npmjs.org/core-js/-/core-js-2.4.1.tgz" + }, + "gitHead": "5e106f64c726edf2849f0babc9096ce6664b7368", + "homepage": "https://github.com/zloirock/core-js#readme", + "keywords": [ + "ES3", + "ECMAScript 3", + "ES5", + "ECMAScript 5", + "ES6", + "ES2015", + "ECMAScript 6", + "ECMAScript 2015", + "ES7", + "ES2016", + "ECMAScript 7", + "ECMAScript 2016", + "Harmony", + "Strawman", + "Map", + "Set", + "WeakMap", + "WeakSet", + "Promise", + "Symbol", + "TypedArray", + "setImmediate", + "Dict", + "polyfill", + "shim" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "zloirock", + "email": "zloirock@zloirock.ru" + } + ], + "name": "core-js", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/zloirock/core-js.git" + }, + "scripts": { + "grunt": "grunt", + "lint": "eslint es5 es6 es7 stage web core fn modules", + "observables-tests": "node tests/observables/adapter && node tests/observables/adapter-library", + "promises-tests": "promises-aplus-tests tests/promises-aplus/adapter", + "test": "npm run lint && npm run grunt livescript client karma:default && npm run grunt library karma:library && npm run promises-tests && npm run observables-tests && lsc tests/commonjs" + }, + "version": "2.4.1" +} diff --git a/pitfall/pdfkit/node_modules/core-js/shim.js b/pitfall/pdfkit/node_modules/core-js/shim.js new file mode 100644 index 00000000..6db12568 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/shim.js @@ -0,0 +1,176 @@ +require('./modules/es6.symbol'); +require('./modules/es6.object.create'); +require('./modules/es6.object.define-property'); +require('./modules/es6.object.define-properties'); +require('./modules/es6.object.get-own-property-descriptor'); +require('./modules/es6.object.get-prototype-of'); +require('./modules/es6.object.keys'); +require('./modules/es6.object.get-own-property-names'); +require('./modules/es6.object.freeze'); +require('./modules/es6.object.seal'); +require('./modules/es6.object.prevent-extensions'); +require('./modules/es6.object.is-frozen'); +require('./modules/es6.object.is-sealed'); +require('./modules/es6.object.is-extensible'); +require('./modules/es6.object.assign'); +require('./modules/es6.object.is'); +require('./modules/es6.object.set-prototype-of'); +require('./modules/es6.object.to-string'); +require('./modules/es6.function.bind'); +require('./modules/es6.function.name'); +require('./modules/es6.function.has-instance'); +require('./modules/es6.parse-int'); +require('./modules/es6.parse-float'); +require('./modules/es6.number.constructor'); +require('./modules/es6.number.to-fixed'); +require('./modules/es6.number.to-precision'); +require('./modules/es6.number.epsilon'); +require('./modules/es6.number.is-finite'); +require('./modules/es6.number.is-integer'); +require('./modules/es6.number.is-nan'); +require('./modules/es6.number.is-safe-integer'); +require('./modules/es6.number.max-safe-integer'); +require('./modules/es6.number.min-safe-integer'); +require('./modules/es6.number.parse-float'); +require('./modules/es6.number.parse-int'); +require('./modules/es6.math.acosh'); +require('./modules/es6.math.asinh'); +require('./modules/es6.math.atanh'); +require('./modules/es6.math.cbrt'); +require('./modules/es6.math.clz32'); +require('./modules/es6.math.cosh'); +require('./modules/es6.math.expm1'); +require('./modules/es6.math.fround'); +require('./modules/es6.math.hypot'); +require('./modules/es6.math.imul'); +require('./modules/es6.math.log10'); +require('./modules/es6.math.log1p'); +require('./modules/es6.math.log2'); +require('./modules/es6.math.sign'); +require('./modules/es6.math.sinh'); +require('./modules/es6.math.tanh'); +require('./modules/es6.math.trunc'); +require('./modules/es6.string.from-code-point'); +require('./modules/es6.string.raw'); +require('./modules/es6.string.trim'); +require('./modules/es6.string.iterator'); +require('./modules/es6.string.code-point-at'); +require('./modules/es6.string.ends-with'); +require('./modules/es6.string.includes'); +require('./modules/es6.string.repeat'); +require('./modules/es6.string.starts-with'); +require('./modules/es6.string.anchor'); +require('./modules/es6.string.big'); +require('./modules/es6.string.blink'); +require('./modules/es6.string.bold'); +require('./modules/es6.string.fixed'); +require('./modules/es6.string.fontcolor'); +require('./modules/es6.string.fontsize'); +require('./modules/es6.string.italics'); +require('./modules/es6.string.link'); +require('./modules/es6.string.small'); +require('./modules/es6.string.strike'); +require('./modules/es6.string.sub'); +require('./modules/es6.string.sup'); +require('./modules/es6.date.now'); +require('./modules/es6.date.to-json'); +require('./modules/es6.date.to-iso-string'); +require('./modules/es6.date.to-string'); +require('./modules/es6.date.to-primitive'); +require('./modules/es6.array.is-array'); +require('./modules/es6.array.from'); +require('./modules/es6.array.of'); +require('./modules/es6.array.join'); +require('./modules/es6.array.slice'); +require('./modules/es6.array.sort'); +require('./modules/es6.array.for-each'); +require('./modules/es6.array.map'); +require('./modules/es6.array.filter'); +require('./modules/es6.array.some'); +require('./modules/es6.array.every'); +require('./modules/es6.array.reduce'); +require('./modules/es6.array.reduce-right'); +require('./modules/es6.array.index-of'); +require('./modules/es6.array.last-index-of'); +require('./modules/es6.array.copy-within'); +require('./modules/es6.array.fill'); +require('./modules/es6.array.find'); +require('./modules/es6.array.find-index'); +require('./modules/es6.array.species'); +require('./modules/es6.array.iterator'); +require('./modules/es6.regexp.constructor'); +require('./modules/es6.regexp.to-string'); +require('./modules/es6.regexp.flags'); +require('./modules/es6.regexp.match'); +require('./modules/es6.regexp.replace'); +require('./modules/es6.regexp.search'); +require('./modules/es6.regexp.split'); +require('./modules/es6.promise'); +require('./modules/es6.map'); +require('./modules/es6.set'); +require('./modules/es6.weak-map'); +require('./modules/es6.weak-set'); +require('./modules/es6.typed.array-buffer'); +require('./modules/es6.typed.data-view'); +require('./modules/es6.typed.int8-array'); +require('./modules/es6.typed.uint8-array'); +require('./modules/es6.typed.uint8-clamped-array'); +require('./modules/es6.typed.int16-array'); +require('./modules/es6.typed.uint16-array'); +require('./modules/es6.typed.int32-array'); +require('./modules/es6.typed.uint32-array'); +require('./modules/es6.typed.float32-array'); +require('./modules/es6.typed.float64-array'); +require('./modules/es6.reflect.apply'); +require('./modules/es6.reflect.construct'); +require('./modules/es6.reflect.define-property'); +require('./modules/es6.reflect.delete-property'); +require('./modules/es6.reflect.enumerate'); +require('./modules/es6.reflect.get'); +require('./modules/es6.reflect.get-own-property-descriptor'); +require('./modules/es6.reflect.get-prototype-of'); +require('./modules/es6.reflect.has'); +require('./modules/es6.reflect.is-extensible'); +require('./modules/es6.reflect.own-keys'); +require('./modules/es6.reflect.prevent-extensions'); +require('./modules/es6.reflect.set'); +require('./modules/es6.reflect.set-prototype-of'); +require('./modules/es7.array.includes'); +require('./modules/es7.string.at'); +require('./modules/es7.string.pad-start'); +require('./modules/es7.string.pad-end'); +require('./modules/es7.string.trim-left'); +require('./modules/es7.string.trim-right'); +require('./modules/es7.string.match-all'); +require('./modules/es7.symbol.async-iterator'); +require('./modules/es7.symbol.observable'); +require('./modules/es7.object.get-own-property-descriptors'); +require('./modules/es7.object.values'); +require('./modules/es7.object.entries'); +require('./modules/es7.object.define-getter'); +require('./modules/es7.object.define-setter'); +require('./modules/es7.object.lookup-getter'); +require('./modules/es7.object.lookup-setter'); +require('./modules/es7.map.to-json'); +require('./modules/es7.set.to-json'); +require('./modules/es7.system.global'); +require('./modules/es7.error.is-error'); +require('./modules/es7.math.iaddh'); +require('./modules/es7.math.isubh'); +require('./modules/es7.math.imulh'); +require('./modules/es7.math.umulh'); +require('./modules/es7.reflect.define-metadata'); +require('./modules/es7.reflect.delete-metadata'); +require('./modules/es7.reflect.get-metadata'); +require('./modules/es7.reflect.get-metadata-keys'); +require('./modules/es7.reflect.get-own-metadata'); +require('./modules/es7.reflect.get-own-metadata-keys'); +require('./modules/es7.reflect.has-metadata'); +require('./modules/es7.reflect.has-own-metadata'); +require('./modules/es7.reflect.metadata'); +require('./modules/es7.asap'); +require('./modules/es7.observable'); +require('./modules/web.timers'); +require('./modules/web.immediate'); +require('./modules/web.dom.iterable'); +module.exports = require('./modules/_core'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/stage/0.js b/pitfall/pdfkit/node_modules/core-js/stage/0.js new file mode 100644 index 00000000..e89a005f --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/stage/0.js @@ -0,0 +1,10 @@ +require('../modules/es7.string.at'); +require('../modules/es7.map.to-json'); +require('../modules/es7.set.to-json'); +require('../modules/es7.error.is-error'); +require('../modules/es7.math.iaddh'); +require('../modules/es7.math.isubh'); +require('../modules/es7.math.imulh'); +require('../modules/es7.math.umulh'); +require('../modules/es7.asap'); +module.exports = require('./1'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/stage/1.js b/pitfall/pdfkit/node_modules/core-js/stage/1.js new file mode 100644 index 00000000..230fe13a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/stage/1.js @@ -0,0 +1,6 @@ +require('../modules/es7.string.trim-left'); +require('../modules/es7.string.trim-right'); +require('../modules/es7.string.match-all'); +require('../modules/es7.symbol.observable'); +require('../modules/es7.observable'); +module.exports = require('./2'); diff --git a/pitfall/pdfkit/node_modules/core-js/stage/2.js b/pitfall/pdfkit/node_modules/core-js/stage/2.js new file mode 100644 index 00000000..ba444e1a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/stage/2.js @@ -0,0 +1,3 @@ +require('../modules/es7.system.global'); +require('../modules/es7.symbol.async-iterator'); +module.exports = require('./3'); diff --git a/pitfall/pdfkit/node_modules/core-js/stage/3.js b/pitfall/pdfkit/node_modules/core-js/stage/3.js new file mode 100644 index 00000000..c1ea400a --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/stage/3.js @@ -0,0 +1,4 @@ +require('../modules/es7.object.get-own-property-descriptors'); +require('../modules/es7.string.pad-start'); +require('../modules/es7.string.pad-end'); +module.exports = require('./4'); diff --git a/pitfall/pdfkit/node_modules/core-js/stage/4.js b/pitfall/pdfkit/node_modules/core-js/stage/4.js new file mode 100644 index 00000000..0fb53ddd --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/stage/4.js @@ -0,0 +1,8 @@ +require('../modules/es7.object.define-getter'); +require('../modules/es7.object.define-setter'); +require('../modules/es7.object.lookup-getter'); +require('../modules/es7.object.lookup-setter'); +require('../modules/es7.object.values'); +require('../modules/es7.object.entries'); +require('../modules/es7.array.includes'); +module.exports = require('../modules/_core'); diff --git a/pitfall/pdfkit/node_modules/core-js/stage/index.js b/pitfall/pdfkit/node_modules/core-js/stage/index.js new file mode 100644 index 00000000..eb959140 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/stage/index.js @@ -0,0 +1 @@ +module.exports = require('./pre'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/stage/pre.js b/pitfall/pdfkit/node_modules/core-js/stage/pre.js new file mode 100644 index 00000000..f3bc54d9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/stage/pre.js @@ -0,0 +1,10 @@ +require('../modules/es7.reflect.define-metadata'); +require('../modules/es7.reflect.delete-metadata'); +require('../modules/es7.reflect.get-metadata'); +require('../modules/es7.reflect.get-metadata-keys'); +require('../modules/es7.reflect.get-own-metadata'); +require('../modules/es7.reflect.get-own-metadata-keys'); +require('../modules/es7.reflect.has-metadata'); +require('../modules/es7.reflect.has-own-metadata'); +require('../modules/es7.reflect.metadata'); +module.exports = require('./0'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/web/dom-collections.js b/pitfall/pdfkit/node_modules/core-js/web/dom-collections.js new file mode 100644 index 00000000..2118e3fe --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/web/dom-collections.js @@ -0,0 +1,2 @@ +require('../modules/web.dom.iterable'); +module.exports = require('../modules/_core'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/web/immediate.js b/pitfall/pdfkit/node_modules/core-js/web/immediate.js new file mode 100644 index 00000000..244ebb16 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/web/immediate.js @@ -0,0 +1,2 @@ +require('../modules/web.immediate'); +module.exports = require('../modules/_core'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/web/index.js b/pitfall/pdfkit/node_modules/core-js/web/index.js new file mode 100644 index 00000000..6687d571 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/web/index.js @@ -0,0 +1,4 @@ +require('../modules/web.timers'); +require('../modules/web.immediate'); +require('../modules/web.dom.iterable'); +module.exports = require('../modules/_core'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-js/web/timers.js b/pitfall/pdfkit/node_modules/core-js/web/timers.js new file mode 100644 index 00000000..2c66f438 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-js/web/timers.js @@ -0,0 +1,2 @@ +require('../modules/web.timers'); +module.exports = require('../modules/_core'); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-util-is/LICENSE b/pitfall/pdfkit/node_modules/core-util-is/LICENSE new file mode 100644 index 00000000..d8d7f943 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-util-is/LICENSE @@ -0,0 +1,19 @@ +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/core-util-is/README.md b/pitfall/pdfkit/node_modules/core-util-is/README.md new file mode 100644 index 00000000..5a76b414 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-util-is/README.md @@ -0,0 +1,3 @@ +# core-util-is + +The `util.is*` functions introduced in Node v0.12. diff --git a/pitfall/pdfkit/node_modules/core-util-is/float.patch b/pitfall/pdfkit/node_modules/core-util-is/float.patch new file mode 100644 index 00000000..a06d5c05 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-util-is/float.patch @@ -0,0 +1,604 @@ +diff --git a/lib/util.js b/lib/util.js +index a03e874..9074e8e 100644 +--- a/lib/util.js ++++ b/lib/util.js +@@ -19,430 +19,6 @@ + // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + // USE OR OTHER DEALINGS IN THE SOFTWARE. + +-var formatRegExp = /%[sdj%]/g; +-exports.format = function(f) { +- if (!isString(f)) { +- var objects = []; +- for (var i = 0; i < arguments.length; i++) { +- objects.push(inspect(arguments[i])); +- } +- return objects.join(' '); +- } +- +- var i = 1; +- var args = arguments; +- var len = args.length; +- var str = String(f).replace(formatRegExp, function(x) { +- if (x === '%%') return '%'; +- if (i >= len) return x; +- switch (x) { +- case '%s': return String(args[i++]); +- case '%d': return Number(args[i++]); +- case '%j': +- try { +- return JSON.stringify(args[i++]); +- } catch (_) { +- return '[Circular]'; +- } +- default: +- return x; +- } +- }); +- for (var x = args[i]; i < len; x = args[++i]) { +- if (isNull(x) || !isObject(x)) { +- str += ' ' + x; +- } else { +- str += ' ' + inspect(x); +- } +- } +- return str; +-}; +- +- +-// Mark that a method should not be used. +-// Returns a modified function which warns once by default. +-// If --no-deprecation is set, then it is a no-op. +-exports.deprecate = function(fn, msg) { +- // Allow for deprecating things in the process of starting up. +- if (isUndefined(global.process)) { +- return function() { +- return exports.deprecate(fn, msg).apply(this, arguments); +- }; +- } +- +- if (process.noDeprecation === true) { +- return fn; +- } +- +- var warned = false; +- function deprecated() { +- if (!warned) { +- if (process.throwDeprecation) { +- throw new Error(msg); +- } else if (process.traceDeprecation) { +- console.trace(msg); +- } else { +- console.error(msg); +- } +- warned = true; +- } +- return fn.apply(this, arguments); +- } +- +- return deprecated; +-}; +- +- +-var debugs = {}; +-var debugEnviron; +-exports.debuglog = function(set) { +- if (isUndefined(debugEnviron)) +- debugEnviron = process.env.NODE_DEBUG || ''; +- set = set.toUpperCase(); +- if (!debugs[set]) { +- if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { +- var pid = process.pid; +- debugs[set] = function() { +- var msg = exports.format.apply(exports, arguments); +- console.error('%s %d: %s', set, pid, msg); +- }; +- } else { +- debugs[set] = function() {}; +- } +- } +- return debugs[set]; +-}; +- +- +-/** +- * Echos the value of a value. Trys to print the value out +- * in the best way possible given the different types. +- * +- * @param {Object} obj The object to print out. +- * @param {Object} opts Optional options object that alters the output. +- */ +-/* legacy: obj, showHidden, depth, colors*/ +-function inspect(obj, opts) { +- // default options +- var ctx = { +- seen: [], +- stylize: stylizeNoColor +- }; +- // legacy... +- if (arguments.length >= 3) ctx.depth = arguments[2]; +- if (arguments.length >= 4) ctx.colors = arguments[3]; +- if (isBoolean(opts)) { +- // legacy... +- ctx.showHidden = opts; +- } else if (opts) { +- // got an "options" object +- exports._extend(ctx, opts); +- } +- // set default options +- if (isUndefined(ctx.showHidden)) ctx.showHidden = false; +- if (isUndefined(ctx.depth)) ctx.depth = 2; +- if (isUndefined(ctx.colors)) ctx.colors = false; +- if (isUndefined(ctx.customInspect)) ctx.customInspect = true; +- if (ctx.colors) ctx.stylize = stylizeWithColor; +- return formatValue(ctx, obj, ctx.depth); +-} +-exports.inspect = inspect; +- +- +-// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics +-inspect.colors = { +- 'bold' : [1, 22], +- 'italic' : [3, 23], +- 'underline' : [4, 24], +- 'inverse' : [7, 27], +- 'white' : [37, 39], +- 'grey' : [90, 39], +- 'black' : [30, 39], +- 'blue' : [34, 39], +- 'cyan' : [36, 39], +- 'green' : [32, 39], +- 'magenta' : [35, 39], +- 'red' : [31, 39], +- 'yellow' : [33, 39] +-}; +- +-// Don't use 'blue' not visible on cmd.exe +-inspect.styles = { +- 'special': 'cyan', +- 'number': 'yellow', +- 'boolean': 'yellow', +- 'undefined': 'grey', +- 'null': 'bold', +- 'string': 'green', +- 'date': 'magenta', +- // "name": intentionally not styling +- 'regexp': 'red' +-}; +- +- +-function stylizeWithColor(str, styleType) { +- var style = inspect.styles[styleType]; +- +- if (style) { +- return '\u001b[' + inspect.colors[style][0] + 'm' + str + +- '\u001b[' + inspect.colors[style][1] + 'm'; +- } else { +- return str; +- } +-} +- +- +-function stylizeNoColor(str, styleType) { +- return str; +-} +- +- +-function arrayToHash(array) { +- var hash = {}; +- +- array.forEach(function(val, idx) { +- hash[val] = true; +- }); +- +- return hash; +-} +- +- +-function formatValue(ctx, value, recurseTimes) { +- // Provide a hook for user-specified inspect functions. +- // Check that value is an object with an inspect function on it +- if (ctx.customInspect && +- value && +- isFunction(value.inspect) && +- // Filter out the util module, it's inspect function is special +- value.inspect !== exports.inspect && +- // Also filter out any prototype objects using the circular check. +- !(value.constructor && value.constructor.prototype === value)) { +- var ret = value.inspect(recurseTimes, ctx); +- if (!isString(ret)) { +- ret = formatValue(ctx, ret, recurseTimes); +- } +- return ret; +- } +- +- // Primitive types cannot have properties +- var primitive = formatPrimitive(ctx, value); +- if (primitive) { +- return primitive; +- } +- +- // Look up the keys of the object. +- var keys = Object.keys(value); +- var visibleKeys = arrayToHash(keys); +- +- if (ctx.showHidden) { +- keys = Object.getOwnPropertyNames(value); +- } +- +- // Some type of object without properties can be shortcutted. +- if (keys.length === 0) { +- if (isFunction(value)) { +- var name = value.name ? ': ' + value.name : ''; +- return ctx.stylize('[Function' + name + ']', 'special'); +- } +- if (isRegExp(value)) { +- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); +- } +- if (isDate(value)) { +- return ctx.stylize(Date.prototype.toString.call(value), 'date'); +- } +- if (isError(value)) { +- return formatError(value); +- } +- } +- +- var base = '', array = false, braces = ['{', '}']; +- +- // Make Array say that they are Array +- if (isArray(value)) { +- array = true; +- braces = ['[', ']']; +- } +- +- // Make functions say that they are functions +- if (isFunction(value)) { +- var n = value.name ? ': ' + value.name : ''; +- base = ' [Function' + n + ']'; +- } +- +- // Make RegExps say that they are RegExps +- if (isRegExp(value)) { +- base = ' ' + RegExp.prototype.toString.call(value); +- } +- +- // Make dates with properties first say the date +- if (isDate(value)) { +- base = ' ' + Date.prototype.toUTCString.call(value); +- } +- +- // Make error with message first say the error +- if (isError(value)) { +- base = ' ' + formatError(value); +- } +- +- if (keys.length === 0 && (!array || value.length == 0)) { +- return braces[0] + base + braces[1]; +- } +- +- if (recurseTimes < 0) { +- if (isRegExp(value)) { +- return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); +- } else { +- return ctx.stylize('[Object]', 'special'); +- } +- } +- +- ctx.seen.push(value); +- +- var output; +- if (array) { +- output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); +- } else { +- output = keys.map(function(key) { +- return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); +- }); +- } +- +- ctx.seen.pop(); +- +- return reduceToSingleString(output, base, braces); +-} +- +- +-function formatPrimitive(ctx, value) { +- if (isUndefined(value)) +- return ctx.stylize('undefined', 'undefined'); +- if (isString(value)) { +- var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') +- .replace(/'/g, "\\'") +- .replace(/\\"/g, '"') + '\''; +- return ctx.stylize(simple, 'string'); +- } +- if (isNumber(value)) { +- // Format -0 as '-0'. Strict equality won't distinguish 0 from -0, +- // so instead we use the fact that 1 / -0 < 0 whereas 1 / 0 > 0 . +- if (value === 0 && 1 / value < 0) +- return ctx.stylize('-0', 'number'); +- return ctx.stylize('' + value, 'number'); +- } +- if (isBoolean(value)) +- return ctx.stylize('' + value, 'boolean'); +- // For some reason typeof null is "object", so special case here. +- if (isNull(value)) +- return ctx.stylize('null', 'null'); +-} +- +- +-function formatError(value) { +- return '[' + Error.prototype.toString.call(value) + ']'; +-} +- +- +-function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { +- var output = []; +- for (var i = 0, l = value.length; i < l; ++i) { +- if (hasOwnProperty(value, String(i))) { +- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, +- String(i), true)); +- } else { +- output.push(''); +- } +- } +- keys.forEach(function(key) { +- if (!key.match(/^\d+$/)) { +- output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, +- key, true)); +- } +- }); +- return output; +-} +- +- +-function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { +- var name, str, desc; +- desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; +- if (desc.get) { +- if (desc.set) { +- str = ctx.stylize('[Getter/Setter]', 'special'); +- } else { +- str = ctx.stylize('[Getter]', 'special'); +- } +- } else { +- if (desc.set) { +- str = ctx.stylize('[Setter]', 'special'); +- } +- } +- if (!hasOwnProperty(visibleKeys, key)) { +- name = '[' + key + ']'; +- } +- if (!str) { +- if (ctx.seen.indexOf(desc.value) < 0) { +- if (isNull(recurseTimes)) { +- str = formatValue(ctx, desc.value, null); +- } else { +- str = formatValue(ctx, desc.value, recurseTimes - 1); +- } +- if (str.indexOf('\n') > -1) { +- if (array) { +- str = str.split('\n').map(function(line) { +- return ' ' + line; +- }).join('\n').substr(2); +- } else { +- str = '\n' + str.split('\n').map(function(line) { +- return ' ' + line; +- }).join('\n'); +- } +- } +- } else { +- str = ctx.stylize('[Circular]', 'special'); +- } +- } +- if (isUndefined(name)) { +- if (array && key.match(/^\d+$/)) { +- return str; +- } +- name = JSON.stringify('' + key); +- if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { +- name = name.substr(1, name.length - 2); +- name = ctx.stylize(name, 'name'); +- } else { +- name = name.replace(/'/g, "\\'") +- .replace(/\\"/g, '"') +- .replace(/(^"|"$)/g, "'"); +- name = ctx.stylize(name, 'string'); +- } +- } +- +- return name + ': ' + str; +-} +- +- +-function reduceToSingleString(output, base, braces) { +- var numLinesEst = 0; +- var length = output.reduce(function(prev, cur) { +- numLinesEst++; +- if (cur.indexOf('\n') >= 0) numLinesEst++; +- return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; +- }, 0); +- +- if (length > 60) { +- return braces[0] + +- (base === '' ? '' : base + '\n ') + +- ' ' + +- output.join(',\n ') + +- ' ' + +- braces[1]; +- } +- +- return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; +-} +- +- + // NOTE: These type checking functions intentionally don't use `instanceof` + // because it is fragile and can be easily faked with `Object.create()`. + function isArray(ar) { +@@ -522,166 +98,10 @@ function isPrimitive(arg) { + exports.isPrimitive = isPrimitive; + + function isBuffer(arg) { +- return arg instanceof Buffer; ++ return Buffer.isBuffer(arg); + } + exports.isBuffer = isBuffer; + + function objectToString(o) { + return Object.prototype.toString.call(o); +-} +- +- +-function pad(n) { +- return n < 10 ? '0' + n.toString(10) : n.toString(10); +-} +- +- +-var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', +- 'Oct', 'Nov', 'Dec']; +- +-// 26 Feb 16:19:34 +-function timestamp() { +- var d = new Date(); +- var time = [pad(d.getHours()), +- pad(d.getMinutes()), +- pad(d.getSeconds())].join(':'); +- return [d.getDate(), months[d.getMonth()], time].join(' '); +-} +- +- +-// log is just a thin wrapper to console.log that prepends a timestamp +-exports.log = function() { +- console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); +-}; +- +- +-/** +- * Inherit the prototype methods from one constructor into another. +- * +- * The Function.prototype.inherits from lang.js rewritten as a standalone +- * function (not on Function.prototype). NOTE: If this file is to be loaded +- * during bootstrapping this function needs to be rewritten using some native +- * functions as prototype setup using normal JavaScript does not work as +- * expected during bootstrapping (see mirror.js in r114903). +- * +- * @param {function} ctor Constructor function which needs to inherit the +- * prototype. +- * @param {function} superCtor Constructor function to inherit prototype from. +- */ +-exports.inherits = function(ctor, superCtor) { +- ctor.super_ = superCtor; +- ctor.prototype = Object.create(superCtor.prototype, { +- constructor: { +- value: ctor, +- enumerable: false, +- writable: true, +- configurable: true +- } +- }); +-}; +- +-exports._extend = function(origin, add) { +- // Don't do anything if add isn't an object +- if (!add || !isObject(add)) return origin; +- +- var keys = Object.keys(add); +- var i = keys.length; +- while (i--) { +- origin[keys[i]] = add[keys[i]]; +- } +- return origin; +-}; +- +-function hasOwnProperty(obj, prop) { +- return Object.prototype.hasOwnProperty.call(obj, prop); +-} +- +- +-// Deprecated old stuff. +- +-exports.p = exports.deprecate(function() { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- console.error(exports.inspect(arguments[i])); +- } +-}, 'util.p: Use console.error() instead'); +- +- +-exports.exec = exports.deprecate(function() { +- return require('child_process').exec.apply(this, arguments); +-}, 'util.exec is now called `child_process.exec`.'); +- +- +-exports.print = exports.deprecate(function() { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- process.stdout.write(String(arguments[i])); +- } +-}, 'util.print: Use console.log instead'); +- +- +-exports.puts = exports.deprecate(function() { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- process.stdout.write(arguments[i] + '\n'); +- } +-}, 'util.puts: Use console.log instead'); +- +- +-exports.debug = exports.deprecate(function(x) { +- process.stderr.write('DEBUG: ' + x + '\n'); +-}, 'util.debug: Use console.error instead'); +- +- +-exports.error = exports.deprecate(function(x) { +- for (var i = 0, len = arguments.length; i < len; ++i) { +- process.stderr.write(arguments[i] + '\n'); +- } +-}, 'util.error: Use console.error instead'); +- +- +-exports.pump = exports.deprecate(function(readStream, writeStream, callback) { +- var callbackCalled = false; +- +- function call(a, b, c) { +- if (callback && !callbackCalled) { +- callback(a, b, c); +- callbackCalled = true; +- } +- } +- +- readStream.addListener('data', function(chunk) { +- if (writeStream.write(chunk) === false) readStream.pause(); +- }); +- +- writeStream.addListener('drain', function() { +- readStream.resume(); +- }); +- +- readStream.addListener('end', function() { +- writeStream.end(); +- }); +- +- readStream.addListener('close', function() { +- call(); +- }); +- +- readStream.addListener('error', function(err) { +- writeStream.end(); +- call(err); +- }); +- +- writeStream.addListener('error', function(err) { +- readStream.destroy(); +- call(err); +- }); +-}, 'util.pump(): Use readableStream.pipe() instead'); +- +- +-var uv; +-exports._errnoException = function(err, syscall) { +- if (isUndefined(uv)) uv = process.binding('uv'); +- var errname = uv.errname(err); +- var e = new Error(syscall + ' ' + errname); +- e.code = errname; +- e.errno = errname; +- e.syscall = syscall; +- return e; +-}; ++} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/core-util-is/lib/util.js b/pitfall/pdfkit/node_modules/core-util-is/lib/util.js new file mode 100644 index 00000000..ff4c851c --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-util-is/lib/util.js @@ -0,0 +1,107 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. + +// NOTE: These type checking functions intentionally don't use `instanceof` +// because it is fragile and can be easily faked with `Object.create()`. + +function isArray(arg) { + if (Array.isArray) { + return Array.isArray(arg); + } + return objectToString(arg) === '[object Array]'; +} +exports.isArray = isArray; + +function isBoolean(arg) { + return typeof arg === 'boolean'; +} +exports.isBoolean = isBoolean; + +function isNull(arg) { + return arg === null; +} +exports.isNull = isNull; + +function isNullOrUndefined(arg) { + return arg == null; +} +exports.isNullOrUndefined = isNullOrUndefined; + +function isNumber(arg) { + return typeof arg === 'number'; +} +exports.isNumber = isNumber; + +function isString(arg) { + return typeof arg === 'string'; +} +exports.isString = isString; + +function isSymbol(arg) { + return typeof arg === 'symbol'; +} +exports.isSymbol = isSymbol; + +function isUndefined(arg) { + return arg === void 0; +} +exports.isUndefined = isUndefined; + +function isRegExp(re) { + return objectToString(re) === '[object RegExp]'; +} +exports.isRegExp = isRegExp; + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} +exports.isObject = isObject; + +function isDate(d) { + return objectToString(d) === '[object Date]'; +} +exports.isDate = isDate; + +function isError(e) { + return (objectToString(e) === '[object Error]' || e instanceof Error); +} +exports.isError = isError; + +function isFunction(arg) { + return typeof arg === 'function'; +} +exports.isFunction = isFunction; + +function isPrimitive(arg) { + return arg === null || + typeof arg === 'boolean' || + typeof arg === 'number' || + typeof arg === 'string' || + typeof arg === 'symbol' || // ES6 symbol + typeof arg === 'undefined'; +} +exports.isPrimitive = isPrimitive; + +exports.isBuffer = Buffer.isBuffer; + +function objectToString(o) { + return Object.prototype.toString.call(o); +} diff --git a/pitfall/pdfkit/node_modules/core-util-is/package.json b/pitfall/pdfkit/node_modules/core-util-is/package.json new file mode 100644 index 00000000..c115ea70 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-util-is/package.json @@ -0,0 +1,107 @@ +{ + "_args": [ + [ + { + "raw": "core-util-is@~1.0.0", + "scope": null, + "escapedName": "core-util-is", + "name": "core-util-is", + "rawSpec": "~1.0.0", + "spec": ">=1.0.0 <1.1.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/readable-stream" + ], + [ + { + "raw": "core-util-is@~1.0.0", + "scope": null, + "escapedName": "core-util-is", + "name": "core-util-is", + "rawSpec": "~1.0.0", + "spec": ">=1.0.0 <1.1.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/readable-stream" + ] + ], + "_from": "core-util-is@~1.0.0", + "_id": "core-util-is@1.0.2", + "_inCache": true, + "_location": "/core-util-is", + "_nodeVersion": "4.0.0", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "_npmVersion": "3.3.2", + "_phantomChildren": {}, + "_requested": { + "raw": "core-util-is@~1.0.0", + "scope": null, + "escapedName": "core-util-is", + "name": "core-util-is", + "rawSpec": "~1.0.0", + "spec": ">=1.0.0 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "/readable-stream", + "/through2/readable-stream" + ], + "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "_shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7", + "_shrinkwrap": null, + "_spec": "core-util-is@~1.0.0", + "_where": "/Users/MB/git/pdfkit/node_modules/readable-stream", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/core-util-is/issues" + }, + "dependencies": {}, + "description": "The `util.is*` functions introduced in Node v0.12.", + "devDependencies": { + "tap": "^2.3.0" + }, + "directories": {}, + "dist": { + "shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7", + "tarball": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz" + }, + "gitHead": "a177da234df5638b363ddc15fa324619a38577c8", + "homepage": "https://github.com/isaacs/core-util-is#readme", + "keywords": [ + "util", + "isBuffer", + "isArray", + "isNumber", + "isString", + "isRegExp", + "isThis", + "isThat", + "polyfill" + ], + "license": "MIT", + "main": "lib/util.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "core-util-is", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/core-util-is.git" + }, + "scripts": { + "test": "tap test.js" + }, + "version": "1.0.2" +} diff --git a/pitfall/pdfkit/node_modules/core-util-is/test.js b/pitfall/pdfkit/node_modules/core-util-is/test.js new file mode 100644 index 00000000..1a490c65 --- /dev/null +++ b/pitfall/pdfkit/node_modules/core-util-is/test.js @@ -0,0 +1,68 @@ +var assert = require('tap'); + +var t = require('./lib/util'); + +assert.equal(t.isArray([]), true); +assert.equal(t.isArray({}), false); + +assert.equal(t.isBoolean(null), false); +assert.equal(t.isBoolean(true), true); +assert.equal(t.isBoolean(false), true); + +assert.equal(t.isNull(null), true); +assert.equal(t.isNull(undefined), false); +assert.equal(t.isNull(false), false); +assert.equal(t.isNull(), false); + +assert.equal(t.isNullOrUndefined(null), true); +assert.equal(t.isNullOrUndefined(undefined), true); +assert.equal(t.isNullOrUndefined(false), false); +assert.equal(t.isNullOrUndefined(), true); + +assert.equal(t.isNumber(null), false); +assert.equal(t.isNumber('1'), false); +assert.equal(t.isNumber(1), true); + +assert.equal(t.isString(null), false); +assert.equal(t.isString('1'), true); +assert.equal(t.isString(1), false); + +assert.equal(t.isSymbol(null), false); +assert.equal(t.isSymbol('1'), false); +assert.equal(t.isSymbol(1), false); +assert.equal(t.isSymbol(Symbol()), true); + +assert.equal(t.isUndefined(null), false); +assert.equal(t.isUndefined(undefined), true); +assert.equal(t.isUndefined(false), false); +assert.equal(t.isUndefined(), true); + +assert.equal(t.isRegExp(null), false); +assert.equal(t.isRegExp('1'), false); +assert.equal(t.isRegExp(new RegExp()), true); + +assert.equal(t.isObject({}), true); +assert.equal(t.isObject([]), true); +assert.equal(t.isObject(new RegExp()), true); +assert.equal(t.isObject(new Date()), true); + +assert.equal(t.isDate(null), false); +assert.equal(t.isDate('1'), false); +assert.equal(t.isDate(new Date()), true); + +assert.equal(t.isError(null), false); +assert.equal(t.isError({ err: true }), false); +assert.equal(t.isError(new Error()), true); + +assert.equal(t.isFunction(null), false); +assert.equal(t.isFunction({ }), false); +assert.equal(t.isFunction(function() {}), true); + +assert.equal(t.isPrimitive(null), true); +assert.equal(t.isPrimitive(''), true); +assert.equal(t.isPrimitive(0), true); +assert.equal(t.isPrimitive(new Date()), false); + +assert.equal(t.isBuffer(null), false); +assert.equal(t.isBuffer({}), false); +assert.equal(t.isBuffer(new Buffer(0)), true); diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/.npmignore b/pitfall/pdfkit/node_modules/crypto-browserify/.npmignore new file mode 100644 index 00000000..3c3629e6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/crypto-browserify/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/.travis.yml b/pitfall/pdfkit/node_modules/crypto-browserify/.travis.yml new file mode 100644 index 00000000..3079f62f --- /dev/null +++ b/pitfall/pdfkit/node_modules/crypto-browserify/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - 0.8 + - "0.10" + diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/LICENSE b/pitfall/pdfkit/node_modules/crypto-browserify/LICENSE new file mode 100644 index 00000000..8abb57d6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/crypto-browserify/LICENSE @@ -0,0 +1,24 @@ +The MIT License + +Copyright (c) 2013 Dominic Tarr + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/example/bundle.js b/pitfall/pdfkit/node_modules/crypto-browserify/example/bundle.js new file mode 100644 index 00000000..02698cc7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/crypto-browserify/example/bundle.js @@ -0,0 +1,637 @@ +var require = function (file, cwd) { + var resolved = require.resolve(file, cwd || '/'); + var mod = require.modules[resolved]; + if (!mod) throw new Error( + 'Failed to resolve module ' + file + ', tried ' + resolved + ); + var res = mod._cached ? mod._cached : mod(); + return res; +} + +require.paths = []; +require.modules = {}; +require.extensions = [".js",".coffee"]; + +require._core = { + 'assert': true, + 'events': true, + 'fs': true, + 'path': true, + 'vm': true +}; + +require.resolve = (function () { + return function (x, cwd) { + if (!cwd) cwd = '/'; + + if (require._core[x]) return x; + var path = require.modules.path(); + cwd = path.resolve('/', cwd); + var y = cwd || '/'; + + if (x.match(/^(?:\.\.?\/|\/)/)) { + var m = loadAsFileSync(path.resolve(y, x)) + || loadAsDirectorySync(path.resolve(y, x)); + if (m) return m; + } + + var n = loadNodeModulesSync(x, y); + if (n) return n; + + throw new Error("Cannot find module '" + x + "'"); + + function loadAsFileSync (x) { + if (require.modules[x]) { + return x; + } + + for (var i = 0; i < require.extensions.length; i++) { + var ext = require.extensions[i]; + if (require.modules[x + ext]) return x + ext; + } + } + + function loadAsDirectorySync (x) { + x = x.replace(/\/+$/, ''); + var pkgfile = x + '/package.json'; + if (require.modules[pkgfile]) { + var pkg = require.modules[pkgfile](); + var b = pkg.browserify; + if (typeof b === 'object' && b.main) { + var m = loadAsFileSync(path.resolve(x, b.main)); + if (m) return m; + } + else if (typeof b === 'string') { + var m = loadAsFileSync(path.resolve(x, b)); + if (m) return m; + } + else if (pkg.main) { + var m = loadAsFileSync(path.resolve(x, pkg.main)); + if (m) return m; + } + } + + return loadAsFileSync(x + '/index'); + } + + function loadNodeModulesSync (x, start) { + var dirs = nodeModulesPathsSync(start); + for (var i = 0; i < dirs.length; i++) { + var dir = dirs[i]; + var m = loadAsFileSync(dir + '/' + x); + if (m) return m; + var n = loadAsDirectorySync(dir + '/' + x); + if (n) return n; + } + + var m = loadAsFileSync(x); + if (m) return m; + } + + function nodeModulesPathsSync (start) { + var parts; + if (start === '/') parts = [ '' ]; + else parts = path.normalize(start).split('/'); + + var dirs = []; + for (var i = parts.length - 1; i >= 0; i--) { + if (parts[i] === 'node_modules') continue; + var dir = parts.slice(0, i + 1).join('/') + '/node_modules'; + dirs.push(dir); + } + + return dirs; + } + }; +})(); + +require.alias = function (from, to) { + var path = require.modules.path(); + var res = null; + try { + res = require.resolve(from + '/package.json', '/'); + } + catch (err) { + res = require.resolve(from, '/'); + } + var basedir = path.dirname(res); + + var keys = (Object.keys || function (obj) { + var res = []; + for (var key in obj) res.push(key) + return res; + })(require.modules); + + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (key.slice(0, basedir.length + 1) === basedir + '/') { + var f = key.slice(basedir.length); + require.modules[to + f] = require.modules[basedir + f]; + } + else if (key === basedir) { + require.modules[to] = require.modules[basedir]; + } + } +}; + +require.define = function (filename, fn) { + var dirname = require._core[filename] + ? '' + : require.modules.path().dirname(filename) + ; + + var require_ = function (file) { + return require(file, dirname) + }; + require_.resolve = function (name) { + return require.resolve(name, dirname); + }; + require_.modules = require.modules; + require_.define = require.define; + var module_ = { exports : {} }; + + require.modules[filename] = function () { + require.modules[filename]._cached = module_.exports; + fn.call( + module_.exports, + require_, + module_, + module_.exports, + dirname, + filename + ); + require.modules[filename]._cached = module_.exports; + return module_.exports; + }; +}; + +if (typeof process === 'undefined') process = {}; + +if (!process.nextTick) process.nextTick = (function () { + var queue = []; + var canPost = typeof window !== 'undefined' + && window.postMessage && window.addEventListener + ; + + if (canPost) { + window.addEventListener('message', function (ev) { + if (ev.source === window && ev.data === 'browserify-tick') { + ev.stopPropagation(); + if (queue.length > 0) { + var fn = queue.shift(); + fn(); + } + } + }, true); + } + + return function (fn) { + if (canPost) { + queue.push(fn); + window.postMessage('browserify-tick', '*'); + } + else setTimeout(fn, 0); + }; +})(); + +if (!process.title) process.title = 'browser'; + +if (!process.binding) process.binding = function (name) { + if (name === 'evals') return require('vm') + else throw new Error('No such module') +}; + +if (!process.cwd) process.cwd = function () { return '.' }; + +if (!process.env) process.env = {}; +if (!process.argv) process.argv = []; + +require.define("path", function (require, module, exports, __dirname, __filename) { +function filter (xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + if (fn(xs[i], i, xs)) res.push(xs[i]); + } + return res; +} + +// resolves . and .. elements in a path array with directory names there +// must be no slashes, empty elements, or device names (c:\) in the array +// (so also no leading and trailing slashes - it does not distinguish +// relative and absolute paths) +function normalizeArray(parts, allowAboveRoot) { + // if the path tries to go above the root, `up` ends up > 0 + var up = 0; + for (var i = parts.length; i >= 0; i--) { + var last = parts[i]; + if (last == '.') { + parts.splice(i, 1); + } else if (last === '..') { + parts.splice(i, 1); + up++; + } else if (up) { + parts.splice(i, 1); + up--; + } + } + + // if the path is allowed to go above the root, restore leading ..s + if (allowAboveRoot) { + for (; up--; up) { + parts.unshift('..'); + } + } + + return parts; +} + +// Regex to split a filename into [*, dir, basename, ext] +// posix version +var splitPathRe = /^(.+\/(?!$)|\/)?((?:.+?)?(\.[^.]*)?)$/; + +// path.resolve([from ...], to) +// posix version +exports.resolve = function() { +var resolvedPath = '', + resolvedAbsolute = false; + +for (var i = arguments.length; i >= -1 && !resolvedAbsolute; i--) { + var path = (i >= 0) + ? arguments[i] + : process.cwd(); + + // Skip empty and invalid entries + if (typeof path !== 'string' || !path) { + continue; + } + + resolvedPath = path + '/' + resolvedPath; + resolvedAbsolute = path.charAt(0) === '/'; +} + +// At this point the path should be resolved to a full absolute path, but +// handle relative paths to be safe (might happen when process.cwd() fails) + +// Normalize the path +resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) { + return !!p; + }), !resolvedAbsolute).join('/'); + + return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; +}; + +// path.normalize(path) +// posix version +exports.normalize = function(path) { +var isAbsolute = path.charAt(0) === '/', + trailingSlash = path.slice(-1) === '/'; + +// Normalize the path +path = normalizeArray(filter(path.split('/'), function(p) { + return !!p; + }), !isAbsolute).join('/'); + + if (!path && !isAbsolute) { + path = '.'; + } + if (path && trailingSlash) { + path += '/'; + } + + return (isAbsolute ? '/' : '') + path; +}; + + +// posix version +exports.join = function() { + var paths = Array.prototype.slice.call(arguments, 0); + return exports.normalize(filter(paths, function(p, index) { + return p && typeof p === 'string'; + }).join('/')); +}; + + +exports.dirname = function(path) { + var dir = splitPathRe.exec(path)[1] || ''; + var isWindows = false; + if (!dir) { + // No dirname + return '.'; + } else if (dir.length === 1 || + (isWindows && dir.length <= 3 && dir.charAt(1) === ':')) { + // It is just a slash or a drive letter with a slash + return dir; + } else { + // It is a full dirname, strip trailing slash + return dir.substring(0, dir.length - 1); + } +}; + + +exports.basename = function(path, ext) { + var f = splitPathRe.exec(path)[2] || ''; + // TODO: make this comparison case-insensitive on windows? + if (ext && f.substr(-1 * ext.length) === ext) { + f = f.substr(0, f.length - ext.length); + } + return f; +}; + + +exports.extname = function(path) { + return splitPathRe.exec(path)[3] || ''; +}; + +}); + +require.define("crypto", function (require, module, exports, __dirname, __filename) { +module.exports = require("crypto-browserify") +}); + +require.define("/node_modules/crypto-browserify/package.json", function (require, module, exports, __dirname, __filename) { +module.exports = {} +}); + +require.define("/node_modules/crypto-browserify/index.js", function (require, module, exports, __dirname, __filename) { +var sha = require('./sha') + +var algorithms = { + sha1: { + hex: sha.hex_sha1, + binary: sha.b64_sha1, + ascii: sha.str_sha1 + } +} + +function error () { + var m = [].slice.call(arguments).join(' ') + throw new Error([ + m, + 'we accept pull requests', + 'http://github.com/dominictarr/crypto-browserify' + ].join('\n')) +} + +exports.createHash = function (alg) { + alg = alg || 'sha1' + if(!algorithms[alg]) + error('algorithm:', alg, 'is not yet supported') + var s = '' + _alg = algorithms[alg] + return { + update: function (data) { + s += data + return this + }, + digest: function (enc) { + enc = enc || 'binary' + var fn + if(!(fn = _alg[enc])) + error('encoding:', enc , 'is not yet supported for algorithm', alg) + var r = fn(s) + s = null //not meant to use the hash after you've called digest. + return r + } + } +} +// the least I can do is make error messages for the rest of the node.js/crypto api. +;['createCredentials' +, 'createHmac' +, 'createCypher' +, 'createCypheriv' +, 'createDecipher' +, 'createDecipheriv' +, 'createSign' +, 'createVerify' +, 'createDeffieHellman', +, 'pbkdf2', +, 'randomBytes' ].forEach(function (name) { + exports[name] = function () { + error('sorry,', name, 'is not implemented yet') + } +}) + +}); + +require.define("/node_modules/crypto-browserify/sha.js", function (require, module, exports, __dirname, __filename) { +/* + * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined + * in FIPS PUB 180-1 + * Version 2.1a Copyright Paul Johnston 2000 - 2002. + * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + * Distributed under the BSD License + * See http://pajhome.org.uk/crypt/md5 for details. + */ + +exports.hex_sha1 = hex_sha1; +exports.b64_sha1 = b64_sha1; +exports.str_sha1 = str_sha1; +exports.hex_hmac_sha1 = hex_hmac_sha1; +exports.b64_hmac_sha1 = b64_hmac_sha1; +exports.str_hmac_sha1 = str_hmac_sha1; + +/* + * Configurable variables. You may need to tweak these to be compatible with + * the server-side, but the defaults work in most cases. + */ +var hexcase = 0; /* hex output format. 0 - lowercase; 1 - uppercase */ +var b64pad = ""; /* base-64 pad character. "=" for strict RFC compliance */ +var chrsz = 8; /* bits per input character. 8 - ASCII; 16 - Unicode */ + +/* + * These are the functions you'll usually want to call + * They take string arguments and return either hex or base-64 encoded strings + */ +function hex_sha1(s){return binb2hex(core_sha1(str2binb(s),s.length * chrsz));} +function b64_sha1(s){return binb2b64(core_sha1(str2binb(s),s.length * chrsz));} +function str_sha1(s){return binb2str(core_sha1(str2binb(s),s.length * chrsz));} +function hex_hmac_sha1(key, data){ return binb2hex(core_hmac_sha1(key, data));} +function b64_hmac_sha1(key, data){ return binb2b64(core_hmac_sha1(key, data));} +function str_hmac_sha1(key, data){ return binb2str(core_hmac_sha1(key, data));} + +/* + * Perform a simple self-test to see if the VM is working + */ +function sha1_vm_test() +{ + return hex_sha1("abc") == "a9993e364706816aba3e25717850c26c9cd0d89d"; +} + +/* + * Calculate the SHA-1 of an array of big-endian words, and a bit length + */ +function core_sha1(x, len) +{ + /* append padding */ + x[len >> 5] |= 0x80 << (24 - len % 32); + x[((len + 64 >> 9) << 4) + 15] = len; + + var w = Array(80); + var a = 1732584193; + var b = -271733879; + var c = -1732584194; + var d = 271733878; + var e = -1009589776; + + for(var i = 0; i < x.length; i += 16) + { + var olda = a; + var oldb = b; + var oldc = c; + var oldd = d; + var olde = e; + + for(var j = 0; j < 80; j++) + { + if(j < 16) w[j] = x[i + j]; + else w[j] = rol(w[j-3] ^ w[j-8] ^ w[j-14] ^ w[j-16], 1); + var t = safe_add(safe_add(rol(a, 5), sha1_ft(j, b, c, d)), + safe_add(safe_add(e, w[j]), sha1_kt(j))); + e = d; + d = c; + c = rol(b, 30); + b = a; + a = t; + } + + a = safe_add(a, olda); + b = safe_add(b, oldb); + c = safe_add(c, oldc); + d = safe_add(d, oldd); + e = safe_add(e, olde); + } + return Array(a, b, c, d, e); + +} + +/* + * Perform the appropriate triplet combination function for the current + * iteration + */ +function sha1_ft(t, b, c, d) +{ + if(t < 20) return (b & c) | ((~b) & d); + if(t < 40) return b ^ c ^ d; + if(t < 60) return (b & c) | (b & d) | (c & d); + return b ^ c ^ d; +} + +/* + * Determine the appropriate additive constant for the current iteration + */ +function sha1_kt(t) +{ + return (t < 20) ? 1518500249 : (t < 40) ? 1859775393 : + (t < 60) ? -1894007588 : -899497514; +} + +/* + * Calculate the HMAC-SHA1 of a key and some data + */ +function core_hmac_sha1(key, data) +{ + var bkey = str2binb(key); + if(bkey.length > 16) bkey = core_sha1(bkey, key.length * chrsz); + + var ipad = Array(16), opad = Array(16); + for(var i = 0; i < 16; i++) + { + ipad[i] = bkey[i] ^ 0x36363636; + opad[i] = bkey[i] ^ 0x5C5C5C5C; + } + + var hash = core_sha1(ipad.concat(str2binb(data)), 512 + data.length * chrsz); + return core_sha1(opad.concat(hash), 512 + 160); +} + +/* + * Add integers, wrapping at 2^32. This uses 16-bit operations internally + * to work around bugs in some JS interpreters. + */ +function safe_add(x, y) +{ + var lsw = (x & 0xFFFF) + (y & 0xFFFF); + var msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return (msw << 16) | (lsw & 0xFFFF); +} + +/* + * Bitwise rotate a 32-bit number to the left. + */ +function rol(num, cnt) +{ + return (num << cnt) | (num >>> (32 - cnt)); +} + +/* + * Convert an 8-bit or 16-bit string to an array of big-endian words + * In 8-bit function, characters >255 have their hi-byte silently ignored. + */ +function str2binb(str) +{ + var bin = Array(); + var mask = (1 << chrsz) - 1; + for(var i = 0; i < str.length * chrsz; i += chrsz) + bin[i>>5] |= (str.charCodeAt(i / chrsz) & mask) << (32 - chrsz - i%32); + return bin; +} + +/* + * Convert an array of big-endian words to a string + */ +function binb2str(bin) +{ + var str = ""; + var mask = (1 << chrsz) - 1; + for(var i = 0; i < bin.length * 32; i += chrsz) + str += String.fromCharCode((bin[i>>5] >>> (32 - chrsz - i%32)) & mask); + return str; +} + +/* + * Convert an array of big-endian words to a hex string. + */ +function binb2hex(binarray) +{ + var hex_tab = hexcase ? "0123456789ABCDEF" : "0123456789abcdef"; + var str = ""; + for(var i = 0; i < binarray.length * 4; i++) + { + str += hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8+4)) & 0xF) + + hex_tab.charAt((binarray[i>>2] >> ((3 - i%4)*8 )) & 0xF); + } + return str; +} + +/* + * Convert an array of big-endian words to a base-64 string + */ +function binb2b64(binarray) +{ + var tab = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; + var str = ""; + for(var i = 0; i < binarray.length * 4; i += 3) + { + var triplet = (((binarray[i >> 2] >> 8 * (3 - i %4)) & 0xFF) << 16) + | (((binarray[i+1 >> 2] >> 8 * (3 - (i+1)%4)) & 0xFF) << 8 ) + | ((binarray[i+2 >> 2] >> 8 * (3 - (i+2)%4)) & 0xFF); + for(var j = 0; j < 4; j++) + { + if(i * 8 + j * 6 > binarray.length * 32) str += b64pad; + else str += tab.charAt((triplet >> 6*(3-j)) & 0x3F); + } + } + return str; +} + + +}); + +require.define("/test.js", function (require, module, exports, __dirname, __filename) { + var crypto = require('crypto') +var abc = crypto.createHash('sha1').update('abc').digest('hex') +console.log(abc) +//require('hello').inlineCall().call2() + +}); +require("/test.js"); diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/example/index.html b/pitfall/pdfkit/node_modules/crypto-browserify/example/index.html new file mode 100644 index 00000000..9d55c6d7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/crypto-browserify/example/index.html @@ -0,0 +1,12 @@ + + + + +
    +  require('crypto').createHash('sha1').update('abc').digest('hex') == ''
    +  
    + + + diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/example/test.js b/pitfall/pdfkit/node_modules/crypto-browserify/example/test.js new file mode 100644 index 00000000..f1b0e4a9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/crypto-browserify/example/test.js @@ -0,0 +1,4 @@ +var crypto = require('crypto') +var abc = crypto.createHash('sha1').update('abc').digest('hex') +console.log(abc) +//require('hello').inlineCall().call2() diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/helpers.js b/pitfall/pdfkit/node_modules/crypto-browserify/helpers.js new file mode 100644 index 00000000..4535e645 --- /dev/null +++ b/pitfall/pdfkit/node_modules/crypto-browserify/helpers.js @@ -0,0 +1,35 @@ +var Buffer = require('buffer').Buffer; +var intSize = 4; +var zeroBuffer = new Buffer(intSize); zeroBuffer.fill(0); +var chrsz = 8; + +function toArray(buf, bigEndian) { + if ((buf.length % intSize) !== 0) { + var len = buf.length + (intSize - (buf.length % intSize)); + buf = Buffer.concat([buf, zeroBuffer], len); + } + + var arr = []; + var fn = bigEndian ? buf.readInt32BE : buf.readInt32LE; + for (var i = 0; i < buf.length; i += intSize) { + arr.push(fn.call(buf, i)); + } + return arr; +} + +function toBuffer(arr, size, bigEndian) { + var buf = new Buffer(size); + var fn = bigEndian ? buf.writeInt32BE : buf.writeInt32LE; + for (var i = 0; i < arr.length; i++) { + fn.call(buf, arr[i], i * 4, true); + } + return buf; +} + +function hash(buf, fn, hashSize, bigEndian) { + if (!Buffer.isBuffer(buf)) buf = new Buffer(buf); + var arr = fn(toArray(buf, bigEndian), buf.length * chrsz); + return toBuffer(arr, hashSize, bigEndian); +} + +module.exports = { hash: hash }; diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/index.js b/pitfall/pdfkit/node_modules/crypto-browserify/index.js new file mode 100644 index 00000000..56fa434a --- /dev/null +++ b/pitfall/pdfkit/node_modules/crypto-browserify/index.js @@ -0,0 +1,97 @@ +var Buffer = require('buffer').Buffer +var sha = require('./sha') +var sha256 = require('./sha256') +var rng = require('./rng') +var md5 = require('./md5') + +var algorithms = { + sha1: sha, + sha256: sha256, + md5: md5 +} + +var blocksize = 64 +var zeroBuffer = new Buffer(blocksize); zeroBuffer.fill(0) +function hmac(fn, key, data) { + if(!Buffer.isBuffer(key)) key = new Buffer(key) + if(!Buffer.isBuffer(data)) data = new Buffer(data) + + if(key.length > blocksize) { + key = fn(key) + } else if(key.length < blocksize) { + key = Buffer.concat([key, zeroBuffer], blocksize) + } + + var ipad = new Buffer(blocksize), opad = new Buffer(blocksize) + for(var i = 0; i < blocksize; i++) { + ipad[i] = key[i] ^ 0x36 + opad[i] = key[i] ^ 0x5C + } + + var hash = fn(Buffer.concat([ipad, data])) + return fn(Buffer.concat([opad, hash])) +} + +function hash(alg, key) { + alg = alg || 'sha1' + var fn = algorithms[alg] + var bufs = [] + var length = 0 + if(!fn) error('algorithm:', alg, 'is not yet supported') + return { + update: function (data) { + if(!Buffer.isBuffer(data)) data = new Buffer(data) + + bufs.push(data) + length += data.length + return this + }, + digest: function (enc) { + var buf = Buffer.concat(bufs) + var r = key ? hmac(fn, key, buf) : fn(buf) + bufs = null + return enc ? r.toString(enc) : r + } + } +} + +function error () { + var m = [].slice.call(arguments).join(' ') + throw new Error([ + m, + 'we accept pull requests', + 'http://github.com/dominictarr/crypto-browserify' + ].join('\n')) +} + +exports.createHash = function (alg) { return hash(alg) } +exports.createHmac = function (alg, key) { return hash(alg, key) } +exports.randomBytes = function(size, callback) { + if (callback && callback.call) { + try { + callback.call(this, undefined, new Buffer(rng(size))) + } catch (err) { callback(err) } + } else { + return new Buffer(rng(size)) + } +} + +function each(a, f) { + for(var i in a) + f(a[i], i) +} + +// the least I can do is make error messages for the rest of the node.js/crypto api. +each(['createCredentials' +, 'createCipher' +, 'createCipheriv' +, 'createDecipher' +, 'createDecipheriv' +, 'createSign' +, 'createVerify' +, 'createDiffieHellman' +, 'pbkdf2'], function (name) { + exports[name] = function () { + error('sorry,', name, 'is not implemented yet') + } +}) diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/md5.js b/pitfall/pdfkit/node_modules/crypto-browserify/md5.js new file mode 100644 index 00000000..50eeb894 --- /dev/null +++ b/pitfall/pdfkit/node_modules/crypto-browserify/md5.js @@ -0,0 +1,163 @@ +/* + * A JavaScript implementation of the RSA Data Security, Inc. MD5 Message + * Digest Algorithm, as defined in RFC 1321. + * Version 2.1 Copyright (C) Paul Johnston 1999 - 2002. + * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + * Distributed under the BSD License + * See http://pajhome.org.uk/crypt/md5 for more info. + */ + +var helpers = require('./helpers'); + +/* + * Perform a simple self-test to see if the VM is working + */ +function md5_vm_test() +{ + return hex_md5("abc") == "900150983cd24fb0d6963f7d28e17f72"; +} + +/* + * Calculate the MD5 of an array of little-endian words, and a bit length + */ +function core_md5(x, len) +{ + /* append padding */ + x[len >> 5] |= 0x80 << ((len) % 32); + x[(((len + 64) >>> 9) << 4) + 14] = len; + + var a = 1732584193; + var b = -271733879; + var c = -1732584194; + var d = 271733878; + + for(var i = 0; i < x.length; i += 16) + { + var olda = a; + var oldb = b; + var oldc = c; + var oldd = d; + + a = md5_ff(a, b, c, d, x[i+ 0], 7 , -680876936); + d = md5_ff(d, a, b, c, x[i+ 1], 12, -389564586); + c = md5_ff(c, d, a, b, x[i+ 2], 17, 606105819); + b = md5_ff(b, c, d, a, x[i+ 3], 22, -1044525330); + a = md5_ff(a, b, c, d, x[i+ 4], 7 , -176418897); + d = md5_ff(d, a, b, c, x[i+ 5], 12, 1200080426); + c = md5_ff(c, d, a, b, x[i+ 6], 17, -1473231341); + b = md5_ff(b, c, d, a, x[i+ 7], 22, -45705983); + a = md5_ff(a, b, c, d, x[i+ 8], 7 , 1770035416); + d = md5_ff(d, a, b, c, x[i+ 9], 12, -1958414417); + c = md5_ff(c, d, a, b, x[i+10], 17, -42063); + b = md5_ff(b, c, d, a, x[i+11], 22, -1990404162); + a = md5_ff(a, b, c, d, x[i+12], 7 , 1804603682); + d = md5_ff(d, a, b, c, x[i+13], 12, -40341101); + c = md5_ff(c, d, a, b, x[i+14], 17, -1502002290); + b = md5_ff(b, c, d, a, x[i+15], 22, 1236535329); + + a = md5_gg(a, b, c, d, x[i+ 1], 5 , -165796510); + d = md5_gg(d, a, b, c, x[i+ 6], 9 , -1069501632); + c = md5_gg(c, d, a, b, x[i+11], 14, 643717713); + b = md5_gg(b, c, d, a, x[i+ 0], 20, -373897302); + a = md5_gg(a, b, c, d, x[i+ 5], 5 , -701558691); + d = md5_gg(d, a, b, c, x[i+10], 9 , 38016083); + c = md5_gg(c, d, a, b, x[i+15], 14, -660478335); + b = md5_gg(b, c, d, a, x[i+ 4], 20, -405537848); + a = md5_gg(a, b, c, d, x[i+ 9], 5 , 568446438); + d = md5_gg(d, a, b, c, x[i+14], 9 , -1019803690); + c = md5_gg(c, d, a, b, x[i+ 3], 14, -187363961); + b = md5_gg(b, c, d, a, x[i+ 8], 20, 1163531501); + a = md5_gg(a, b, c, d, x[i+13], 5 , -1444681467); + d = md5_gg(d, a, b, c, x[i+ 2], 9 , -51403784); + c = md5_gg(c, d, a, b, x[i+ 7], 14, 1735328473); + b = md5_gg(b, c, d, a, x[i+12], 20, -1926607734); + + a = md5_hh(a, b, c, d, x[i+ 5], 4 , -378558); + d = md5_hh(d, a, b, c, x[i+ 8], 11, -2022574463); + c = md5_hh(c, d, a, b, x[i+11], 16, 1839030562); + b = md5_hh(b, c, d, a, x[i+14], 23, -35309556); + a = md5_hh(a, b, c, d, x[i+ 1], 4 , -1530992060); + d = md5_hh(d, a, b, c, x[i+ 4], 11, 1272893353); + c = md5_hh(c, d, a, b, x[i+ 7], 16, -155497632); + b = md5_hh(b, c, d, a, x[i+10], 23, -1094730640); + a = md5_hh(a, b, c, d, x[i+13], 4 , 681279174); + d = md5_hh(d, a, b, c, x[i+ 0], 11, -358537222); + c = md5_hh(c, d, a, b, x[i+ 3], 16, -722521979); + b = md5_hh(b, c, d, a, x[i+ 6], 23, 76029189); + a = md5_hh(a, b, c, d, x[i+ 9], 4 , -640364487); + d = md5_hh(d, a, b, c, x[i+12], 11, -421815835); + c = md5_hh(c, d, a, b, x[i+15], 16, 530742520); + b = md5_hh(b, c, d, a, x[i+ 2], 23, -995338651); + + a = md5_ii(a, b, c, d, x[i+ 0], 6 , -198630844); + d = md5_ii(d, a, b, c, x[i+ 7], 10, 1126891415); + c = md5_ii(c, d, a, b, x[i+14], 15, -1416354905); + b = md5_ii(b, c, d, a, x[i+ 5], 21, -57434055); + a = md5_ii(a, b, c, d, x[i+12], 6 , 1700485571); + d = md5_ii(d, a, b, c, x[i+ 3], 10, -1894986606); + c = md5_ii(c, d, a, b, x[i+10], 15, -1051523); + b = md5_ii(b, c, d, a, x[i+ 1], 21, -2054922799); + a = md5_ii(a, b, c, d, x[i+ 8], 6 , 1873313359); + d = md5_ii(d, a, b, c, x[i+15], 10, -30611744); + c = md5_ii(c, d, a, b, x[i+ 6], 15, -1560198380); + b = md5_ii(b, c, d, a, x[i+13], 21, 1309151649); + a = md5_ii(a, b, c, d, x[i+ 4], 6 , -145523070); + d = md5_ii(d, a, b, c, x[i+11], 10, -1120210379); + c = md5_ii(c, d, a, b, x[i+ 2], 15, 718787259); + b = md5_ii(b, c, d, a, x[i+ 9], 21, -343485551); + + a = safe_add(a, olda); + b = safe_add(b, oldb); + c = safe_add(c, oldc); + d = safe_add(d, oldd); + } + return Array(a, b, c, d); + +} + +/* + * These functions implement the four basic operations the algorithm uses. + */ +function md5_cmn(q, a, b, x, s, t) +{ + return safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s),b); +} +function md5_ff(a, b, c, d, x, s, t) +{ + return md5_cmn((b & c) | ((~b) & d), a, b, x, s, t); +} +function md5_gg(a, b, c, d, x, s, t) +{ + return md5_cmn((b & d) | (c & (~d)), a, b, x, s, t); +} +function md5_hh(a, b, c, d, x, s, t) +{ + return md5_cmn(b ^ c ^ d, a, b, x, s, t); +} +function md5_ii(a, b, c, d, x, s, t) +{ + return md5_cmn(c ^ (b | (~d)), a, b, x, s, t); +} + +/* + * Add integers, wrapping at 2^32. This uses 16-bit operations internally + * to work around bugs in some JS interpreters. + */ +function safe_add(x, y) +{ + var lsw = (x & 0xFFFF) + (y & 0xFFFF); + var msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return (msw << 16) | (lsw & 0xFFFF); +} + +/* + * Bitwise rotate a 32-bit number to the left. + */ +function bit_rol(num, cnt) +{ + return (num << cnt) | (num >>> (32 - cnt)); +} + +module.exports = function md5(buf) { + return helpers.hash(buf, core_md5, 16); +}; diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/package.json b/pitfall/pdfkit/node_modules/crypto-browserify/package.json new file mode 100644 index 00000000..264e91dc --- /dev/null +++ b/pitfall/pdfkit/node_modules/crypto-browserify/package.json @@ -0,0 +1,96 @@ +{ + "_args": [ + [ + { + "raw": "crypto-browserify@~1.0.9", + "scope": null, + "escapedName": "crypto-browserify", + "name": "crypto-browserify", + "rawSpec": "~1.0.9", + "spec": ">=1.0.9 <1.1.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/browserify" + ] + ], + "_from": "crypto-browserify@>=1.0.9 <1.1.0", + "_id": "crypto-browserify@1.0.9", + "_inCache": true, + "_location": "/crypto-browserify", + "_npmUser": { + "name": "dominictarr", + "email": "dominic.tarr@gmail.com" + }, + "_npmVersion": "1.3.11", + "_phantomChildren": {}, + "_requested": { + "raw": "crypto-browserify@~1.0.9", + "scope": null, + "escapedName": "crypto-browserify", + "name": "crypto-browserify", + "rawSpec": "~1.0.9", + "spec": ">=1.0.9 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "/browserify" + ], + "_resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-1.0.9.tgz", + "_shasum": "cc5449685dfb85eb11c9828acc7cb87ab5bbfcc0", + "_shrinkwrap": null, + "_spec": "crypto-browserify@~1.0.9", + "_where": "/Users/MB/git/pdfkit/node_modules/browserify", + "author": { + "name": "Dominic Tarr", + "email": "dominic.tarr@gmail.com", + "url": "dominictarr.com" + }, + "bugs": { + "url": "https://github.com/dominictarr/crypto-browserify/issues" + }, + "dependencies": {}, + "description": "partial implementation of crypto for the browser", + "devDependencies": { + "brfs": "~0.0.8", + "tape": "~1.0.4" + }, + "directories": {}, + "dist": { + "shasum": "cc5449685dfb85eb11c9828acc7cb87ab5bbfcc0", + "tarball": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-1.0.9.tgz" + }, + "engines": { + "node": "*" + }, + "homepage": "https://github.com/dominictarr/crypto-browserify", + "license": "MIT", + "maintainers": [ + { + "name": "dominictarr", + "email": "dominic.tarr@gmail.com" + } + ], + "name": "crypto-browserify", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/dominictarr/crypto-browserify.git" + }, + "scripts": { + "test": "node test/node.js" + }, + "testling": { + "files": "test/browser.js", + "browsers": [ + "ie/8..latest", + "chrome/20..latest", + "firefox/10..latest", + "safari/latest", + "opera/11.0..latest", + "iphone/6", + "ipad/6" + ] + }, + "version": "1.0.9" +} diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/readme.markdown b/pitfall/pdfkit/node_modules/crypto-browserify/readme.markdown new file mode 100644 index 00000000..2ede636c --- /dev/null +++ b/pitfall/pdfkit/node_modules/crypto-browserify/readme.markdown @@ -0,0 +1,20 @@ +# crypto-browserify + +A (partial) port of `crypto` to the browser. + + +[![travis](https://secure.travis-ci.org/dominictarr/crypto-browserify.png?branch=master)](https://travis-ci.org/dominictarr/crypto-browserify) + +[![browser support](http://ci.testling.com/dominictarr/crypto-browserify.png)](http://ci.testling.com/dominictarr/crypto-browserify) + + +Basically, I found some crypto implemented in JS lieing on the internet somewhere +and wrapped it in the part of the `crypto` api that I am currently using. + +In a way that will be compatible with [browserify](https://github.com/substack/node-browserify/). + +I will extend this if I need more features, or if anyone else wants to extend this, +I will add you as a maintainer. + +Provided that you agree that it should replicate the [node.js/crypto](http://nodejs.org/api/crypto.html) api exactly, of course. + diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/rng.js b/pitfall/pdfkit/node_modules/crypto-browserify/rng.js new file mode 100644 index 00000000..bc858e8b --- /dev/null +++ b/pitfall/pdfkit/node_modules/crypto-browserify/rng.js @@ -0,0 +1,31 @@ +// Original code adapted from Robert Kieffer. +// details at https://github.com/broofa/node-uuid +(function() { + var _global = this; + + var mathRNG, whatwgRNG; + + // NOTE: Math.random() does not guarantee "cryptographic quality" + mathRNG = function(size) { + var bytes = new Array(size); + var r; + + for (var i = 0, r; i < size; i++) { + if ((i & 0x03) == 0) r = Math.random() * 0x100000000; + bytes[i] = r >>> ((i & 0x03) << 3) & 0xff; + } + + return bytes; + } + + if (_global.crypto && crypto.getRandomValues) { + whatwgRNG = function(size) { + var bytes = new Uint8Array(size); + crypto.getRandomValues(bytes); + return bytes; + } + } + + module.exports = whatwgRNG || mathRNG; + +}()) diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/sha.js b/pitfall/pdfkit/node_modules/crypto-browserify/sha.js new file mode 100644 index 00000000..8942b628 --- /dev/null +++ b/pitfall/pdfkit/node_modules/crypto-browserify/sha.js @@ -0,0 +1,101 @@ +/* + * A JavaScript implementation of the Secure Hash Algorithm, SHA-1, as defined + * in FIPS PUB 180-1 + * Version 2.1a Copyright Paul Johnston 2000 - 2002. + * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + * Distributed under the BSD License + * See http://pajhome.org.uk/crypt/md5 for details. + */ + +var helpers = require('./helpers'); + +/* + * Calculate the SHA-1 of an array of big-endian words, and a bit length + */ +function core_sha1(x, len) +{ + /* append padding */ + x[len >> 5] |= 0x80 << (24 - len % 32); + x[((len + 64 >> 9) << 4) + 15] = len; + + var w = Array(80); + var a = 1732584193; + var b = -271733879; + var c = -1732584194; + var d = 271733878; + var e = -1009589776; + + for(var i = 0; i < x.length; i += 16) + { + var olda = a; + var oldb = b; + var oldc = c; + var oldd = d; + var olde = e; + + for(var j = 0; j < 80; j++) + { + if(j < 16) w[j] = x[i + j]; + else w[j] = rol(w[j-3] ^ w[j-8] ^ w[j-14] ^ w[j-16], 1); + var t = safe_add(safe_add(rol(a, 5), sha1_ft(j, b, c, d)), + safe_add(safe_add(e, w[j]), sha1_kt(j))); + e = d; + d = c; + c = rol(b, 30); + b = a; + a = t; + } + + a = safe_add(a, olda); + b = safe_add(b, oldb); + c = safe_add(c, oldc); + d = safe_add(d, oldd); + e = safe_add(e, olde); + } + return Array(a, b, c, d, e); + +} + +/* + * Perform the appropriate triplet combination function for the current + * iteration + */ +function sha1_ft(t, b, c, d) +{ + if(t < 20) return (b & c) | ((~b) & d); + if(t < 40) return b ^ c ^ d; + if(t < 60) return (b & c) | (b & d) | (c & d); + return b ^ c ^ d; +} + +/* + * Determine the appropriate additive constant for the current iteration + */ +function sha1_kt(t) +{ + return (t < 20) ? 1518500249 : (t < 40) ? 1859775393 : + (t < 60) ? -1894007588 : -899497514; +} + +/* + * Add integers, wrapping at 2^32. This uses 16-bit operations internally + * to work around bugs in some JS interpreters. + */ +function safe_add(x, y) +{ + var lsw = (x & 0xFFFF) + (y & 0xFFFF); + var msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return (msw << 16) | (lsw & 0xFFFF); +} + +/* + * Bitwise rotate a 32-bit number to the left. + */ +function rol(num, cnt) +{ + return (num << cnt) | (num >>> (32 - cnt)); +} + +module.exports = function sha1(buf) { + return helpers.hash(buf, core_sha1, 20, true); +}; diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/sha256.js b/pitfall/pdfkit/node_modules/crypto-browserify/sha256.js new file mode 100644 index 00000000..954d6850 --- /dev/null +++ b/pitfall/pdfkit/node_modules/crypto-browserify/sha256.js @@ -0,0 +1,79 @@ + +/** + * A JavaScript implementation of the Secure Hash Algorithm, SHA-256, as defined + * in FIPS 180-2 + * Version 2.2-beta Copyright Angel Marin, Paul Johnston 2000 - 2009. + * Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + * + */ + +var helpers = require('./helpers'); + +var safe_add = function(x, y) { + var lsw = (x & 0xFFFF) + (y & 0xFFFF); + var msw = (x >> 16) + (y >> 16) + (lsw >> 16); + return (msw << 16) | (lsw & 0xFFFF); +}; + +var S = function(X, n) { + return (X >>> n) | (X << (32 - n)); +}; + +var R = function(X, n) { + return (X >>> n); +}; + +var Ch = function(x, y, z) { + return ((x & y) ^ ((~x) & z)); +}; + +var Maj = function(x, y, z) { + return ((x & y) ^ (x & z) ^ (y & z)); +}; + +var Sigma0256 = function(x) { + return (S(x, 2) ^ S(x, 13) ^ S(x, 22)); +}; + +var Sigma1256 = function(x) { + return (S(x, 6) ^ S(x, 11) ^ S(x, 25)); +}; + +var Gamma0256 = function(x) { + return (S(x, 7) ^ S(x, 18) ^ R(x, 3)); +}; + +var Gamma1256 = function(x) { + return (S(x, 17) ^ S(x, 19) ^ R(x, 10)); +}; + +var core_sha256 = function(m, l) { + var K = new Array(0x428A2F98,0x71374491,0xB5C0FBCF,0xE9B5DBA5,0x3956C25B,0x59F111F1,0x923F82A4,0xAB1C5ED5,0xD807AA98,0x12835B01,0x243185BE,0x550C7DC3,0x72BE5D74,0x80DEB1FE,0x9BDC06A7,0xC19BF174,0xE49B69C1,0xEFBE4786,0xFC19DC6,0x240CA1CC,0x2DE92C6F,0x4A7484AA,0x5CB0A9DC,0x76F988DA,0x983E5152,0xA831C66D,0xB00327C8,0xBF597FC7,0xC6E00BF3,0xD5A79147,0x6CA6351,0x14292967,0x27B70A85,0x2E1B2138,0x4D2C6DFC,0x53380D13,0x650A7354,0x766A0ABB,0x81C2C92E,0x92722C85,0xA2BFE8A1,0xA81A664B,0xC24B8B70,0xC76C51A3,0xD192E819,0xD6990624,0xF40E3585,0x106AA070,0x19A4C116,0x1E376C08,0x2748774C,0x34B0BCB5,0x391C0CB3,0x4ED8AA4A,0x5B9CCA4F,0x682E6FF3,0x748F82EE,0x78A5636F,0x84C87814,0x8CC70208,0x90BEFFFA,0xA4506CEB,0xBEF9A3F7,0xC67178F2); + var HASH = new Array(0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A, 0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19); + var W = new Array(64); + var a, b, c, d, e, f, g, h, i, j; + var T1, T2; + /* append padding */ + m[l >> 5] |= 0x80 << (24 - l % 32); + m[((l + 64 >> 9) << 4) + 15] = l; + for (var i = 0; i < m.length; i += 16) { + a = HASH[0]; b = HASH[1]; c = HASH[2]; d = HASH[3]; e = HASH[4]; f = HASH[5]; g = HASH[6]; h = HASH[7]; + for (var j = 0; j < 64; j++) { + if (j < 16) { + W[j] = m[j + i]; + } else { + W[j] = safe_add(safe_add(safe_add(Gamma1256(W[j - 2]), W[j - 7]), Gamma0256(W[j - 15])), W[j - 16]); + } + T1 = safe_add(safe_add(safe_add(safe_add(h, Sigma1256(e)), Ch(e, f, g)), K[j]), W[j]); + T2 = safe_add(Sigma0256(a), Maj(a, b, c)); + h = g; g = f; f = e; e = safe_add(d, T1); d = c; c = b; b = a; a = safe_add(T1, T2); + } + HASH[0] = safe_add(a, HASH[0]); HASH[1] = safe_add(b, HASH[1]); HASH[2] = safe_add(c, HASH[2]); HASH[3] = safe_add(d, HASH[3]); + HASH[4] = safe_add(e, HASH[4]); HASH[5] = safe_add(f, HASH[5]); HASH[6] = safe_add(g, HASH[6]); HASH[7] = safe_add(h, HASH[7]); + } + return HASH; +}; + +module.exports = function sha256(buf) { + return helpers.hash(buf, core_sha256, 32, true); +}; diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/browser.js b/pitfall/pdfkit/node_modules/crypto-browserify/test/browser.js new file mode 100644 index 00000000..ccc054bc --- /dev/null +++ b/pitfall/pdfkit/node_modules/crypto-browserify/test/browser.js @@ -0,0 +1,100 @@ +var test = require('tape'); +var Buffer = require('buffer').Buffer; + +var crypto = require('../'); + +var algorithms = ['sha1', 'sha256', 'md5']; +var encodings = ['binary', 'hex', 'base64']; + + +// We can't compare against node's crypto library directly because when +// using testling we only have another version of crypto-browserify to +// check against. So we'll use a cached version of the expected values +// generated by node crypto. +var EXPECTED = {}; + +EXPECTED['sha1-hash-binary'] = atob('qvTGHdzF6KLavt4PO0gs2a6pQ00='); +EXPECTED['sha1-hash-hex'] = 'aaf4c61ddcc5e8a2dabede0f3b482cd9aea9434d'; +EXPECTED['sha1-hash-base64'] = 'qvTGHdzF6KLavt4PO0gs2a6pQ00='; + +EXPECTED['sha256-hash-binary'] = atob('LPJNul+wow4m6DsqxbninhsWHlwfp0JecwQzYpOLmCQ='); +EXPECTED['sha256-hash-hex'] = '2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824'; +EXPECTED['sha256-hash-base64'] = 'LPJNul+wow4m6DsqxbninhsWHlwfp0JecwQzYpOLmCQ='; + +EXPECTED['md5-hash-binary'] = atob('XUFAKrxLKna5cZ2REBfFkg=='); +EXPECTED['md5-hash-hex'] = '5d41402abc4b2a76b9719d911017c592'; +EXPECTED['md5-hash-base64'] = 'XUFAKrxLKna5cZ2REBfFkg=='; + +EXPECTED['sha1-hmac-binary'] = atob('URIFXAX5RPhXVe/FzYlw4ZTp9Fs='); +EXPECTED['sha1-hmac-hex'] = '5112055c05f944f85755efc5cd8970e194e9f45b'; +EXPECTED['sha1-hmac-base64'] = 'URIFXAX5RPhXVe/FzYlw4ZTp9Fs='; + +EXPECTED['sha256-hmac-binary'] = atob('iKqz7ejTrflNJquQ07r9SiCDBww7zOnAFO4EpEOEfAs='); +EXPECTED['sha256-hmac-hex'] = '88aab3ede8d3adf94d26ab90d3bafd4a2083070c3bcce9c014ee04a443847c0b'; +EXPECTED['sha256-hmac-base64'] = 'iKqz7ejTrflNJquQ07r9SiCDBww7zOnAFO4EpEOEfAs='; + +EXPECTED['md5-hmac-binary'] = atob('ut5jhjxh7QsxZYBuzWrO/A=='); +EXPECTED['md5-hmac-hex'] = 'bade63863c61ed0b3165806ecd6acefc'; +EXPECTED['md5-hmac-base64'] = 'ut5jhjxh7QsxZYBuzWrO/A=='; + +EXPECTED['md5-with-binary'] = '27549c8ff29ca52f7957f89c328dbb6d'; +EXPECTED['sha1-with-binary'] = '4fa10dda29053b237b5d9703151c852c61e6d8d7'; +EXPECTED['sha256-with-binary'] = '424ff84246aabc1560a2881b9664108dfe26784c762d930c4ff396c085f4183b'; + +EXPECTED['md5-empty-string'] = 'd41d8cd98f00b204e9800998ecf8427e'; +EXPECTED['sha1-empty-string'] = 'da39a3ee5e6b4b0d3255bfef95601890afd80709'; +EXPECTED['sha256-empty-string'] = 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'; + + +algorithms.forEach(function (algorithm) { + encodings.forEach(function (encoding) { + test(algorithm + ' hash using ' + encoding, function (t) { + t.plan(1); + var actual = crypto.createHash(algorithm).update('hello', 'utf-8').digest(encoding); + var expected = EXPECTED[algorithm + '-hash-' + encoding]; + t.equal(actual, expected); + t.end(); + }); + + test(algorithm + ' hmac using ' + encoding, function (t) { + t.plan(1); + var actual = crypto.createHmac(algorithm, 'secret').update('hello', 'utf-8').digest(encoding); + var expected = EXPECTED[algorithm + '-hmac-' + encoding]; + t.equal(actual, expected); + t.end(); + }); + }); + + test(algorithm + ' with empty string', function (t) { + t.plan(1); + var actual = crypto.createHash(algorithm).update('', 'utf-8').digest('hex'); + var expected = EXPECTED[algorithm + '-empty-string']; + t.equal(actual, expected); + t.end(); + }); + + test(algorithm + ' with raw binary', function (t) { + t.plan(1); + var seed = 'hello'; + for (var i = 0; i < 1000; i++) { + seed = crypto.createHash(algorithm).update(seed).digest('binary'); + } + var actual = crypto.createHash(algorithm).update(seed).digest('hex'); + var expected = EXPECTED[algorithm + '-with-binary']; + t.equal(actual, expected); + t.end(); + }); +}); + + +test('randomBytes', function (t) { + t.plan(5); + t.equal(crypto.randomBytes(10).length, 10); + t.ok(crypto.randomBytes(10) instanceof Buffer); + crypto.randomBytes(10, function(ex, bytes) { + t.error(ex); + t.equal(bytes.length, 10); + t.ok(bytes instanceof Buffer); + t.end(); + }); +}); diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/node.js b/pitfall/pdfkit/node_modules/crypto-browserify/test/node.js new file mode 100644 index 00000000..fb9af5c9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/crypto-browserify/test/node.js @@ -0,0 +1,77 @@ +var test = require('tape'); + +var crypto = require('crypto'); +var cryptoB = require('../'); +var fs = require('fs'); + +function assertSame(name, fn) { + test(name, function (t) { + t.plan(1); + fn(crypto, function (err, expected) { + fn(cryptoB, function (err, actual) { + t.equal(actual, expected); + t.end(); + }); + }); + }); +} + +var algorithms = ['sha1', 'sha256', 'md5']; +var encodings = ['binary', 'hex', 'base64']; + + +algorithms.forEach(function (algorithm) { + encodings.forEach(function (encoding) { + assertSame(algorithm + ' hash using ' + encoding, function (crypto, cb) { + cb(null, crypto.createHash(algorithm).update('hellø', 'utf-8').digest(encoding)); + }) + + assertSame(algorithm + ' hmac using ' + encoding, function (crypto, cb) { + cb(null, crypto.createHmac(algorithm, 'secret').update('hellø', 'utf-8').digest(encoding)) + }) + }); + + assertSame(algorithm + ' with raw binary', function (crypto, cb) { + var seed = 'hellø'; + for (var i = 0; i < 1000; i++) { + seed = crypto.createHash(algorithm).update(new Buffer(seed)).digest('binary'); + } + cb(null, crypto.createHash(algorithm).update(new Buffer(seed)).digest('hex')); + }); + + assertSame(algorithm + ' empty string', function (crypto, cb) { + cb(null, crypto.createHash(algorithm).update('').digest('hex')); + }); +}); + +function pad(n, w) { + n = n + ''; return new Array(w - n.length + 1).join('0') + n; +} + +var vectors = fs.readdirSync(__dirname + '/vectors').sort(). + filter(function (t) { return t.match(/\.dat$/); }). + map(function (t) { return fs.readFileSync(__dirname + '/vectors/' + t); }); + +['md5', 'sha1', 'sha256'].forEach(function (algorithm) { + test(algorithm, function (t) { + function hash(data) { return cryptoB.createHash(algorithm).update(data).digest('hex'); } + + var hashes = fs.readFileSync(__dirname + '/vectors/byte-hashes.' + algorithm).toString().split(/\r?\n/); + t.plan(vectors.length); + for (var i = 0; i < vectors.length; i++) { + t.equal(hash(vectors[i]), hashes[i], 'byte' + pad(i, 4) + '.dat'); + } + }); +}); + +test('randomBytes', function (t) { + t.plan(5); + t.equal(cryptoB.randomBytes(10).length, 10); + t.ok(cryptoB.randomBytes(10) instanceof Buffer); + cryptoB.randomBytes(10, function(ex, bytes) { + t.error(ex); + t.equal(bytes.length, 10); + t.ok(bytes instanceof Buffer); + t.end(); + }); +}); diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/package.json b/pitfall/pdfkit/node_modules/crypto-browserify/test/package.json new file mode 100644 index 00000000..4b435b09 --- /dev/null +++ b/pitfall/pdfkit/node_modules/crypto-browserify/test/package.json @@ -0,0 +1,7 @@ +{ + "browserify": { + "transform": [ + "brfs" + ] + } +} diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/simple.js b/pitfall/pdfkit/node_modules/crypto-browserify/test/simple.js new file mode 100755 index 00000000..34d96b50 --- /dev/null +++ b/pitfall/pdfkit/node_modules/crypto-browserify/test/simple.js @@ -0,0 +1,36 @@ +var test = require("tape") + +var crypto = require('crypto') +var cryptoB = require('../') + +function assertSame (fn) { + test(fn.name, function (t) { + t.plan(1) + fn(crypto, function (err, expected) { + fn(cryptoB, function (err, actual) { + t.equal(actual, expected) + t.end() + }) + }) + }) +} + +assertSame(function sha1 (crypto, cb) { + cb(null, crypto.createHash('sha1').update('hello', 'utf-8').digest('hex')) +}) + +assertSame(function md5(crypto, cb) { + cb(null, crypto.createHash('md5').update('hello', 'utf-8').digest('hex')) +}) + +test('randomBytes', function (t) { + t.plan(5) + t.equal(cryptoB.randomBytes(10).length, 10) + t.ok(cryptoB.randomBytes(10) instanceof Buffer) + cryptoB.randomBytes(10, function(ex, bytes) { + t.error(ex) + t.equal(bytes.length, 10) + t.ok(bytes instanceof Buffer) + t.end() + }) +}) diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/Readme.txt b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/Readme.txt new file mode 100755 index 00000000..99d14c90 --- /dev/null +++ b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/Readme.txt @@ -0,0 +1,25 @@ + +File formats: + +There are two files included for this byte-oriented test. +One file contains the messages and the other file contains the hashes. + +The message files provided use "compact strings" to store the message values. +Compact strings are used to represented the messages in a compact form. +A compact string has the form + z || b || n(1) || n(2) || ... || n(z) +where z>=0 that represents the number of n, b is either 0 or 1, and +each n(i) is a decimal integer representing a positive number. +The length of the compact string is given by the summation of the n(i). + +The compact string is interpreted as the representation of the bit string +consisting of b repeated n(1) times, followed by 1-b repeated n(2) times, +followed by b repeated n(3) times, and so on. + +Example: + M = 5 1 7 13 5 1 2 + where z = 5 and b = 1. Then the compact string M represents the bit string + 1111111000000000000011111011 + where 1 is repeated 7 times, 0 is repeated 13 times, 1 is repeated 5 times, + 0 is repeated 1 time, and 1 is repeated 2 times. + diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte-hashes.md5 b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte-hashes.md5 new file mode 100755 index 00000000..97a913aa --- /dev/null +++ b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte-hashes.md5 @@ -0,0 +1,196 @@ +d41d8cd98f00b204e9800998ecf8427e +c3e97dd6e97fb5125688c97f36720cbe +038701ca277a9d4de87bff428dd30a12 +bc60c6192e361d99b59d47250668a852 +542c3a0ab6b51bc6a88fa7bb567bca3e +e035f9e748a2a09a4fbdcf18c4f58bf1 +3b4cc9226a236742d72578c5915b6c3c +35950208a022baac90056636827158ce +84cedff2ed1b78b395cc8651094f4ce3 +7badf748f4cb700272a72edfea22e9bf +a1bb6e142739dbdb0925747d95e0a1ad +0cd9b72dfdee8efd2e1515f4c5a62284 +ef07c13e75d50578d09052aa21a7cffb +cf3b261af9344bf83b4dd82b30242c78 +530710f65fb98fff8eb927e2938cb8c5 +4e6d73658b27e19d4bb4500625001e39 +c8e5f2f272b1ef88ec62dd0d9d54e902 +031cbf1fb05b4ec09f3c93235d0f49ac +8c0e1400df02ba8c4809b705e5f5e114 +57ec48278e19f71f54c570a5ab306df7 +ecd3dc346a2337b95389a094a031610f +f11d91eae492225cbd82ef356aa96f9f +26bd8b480216c723ce75da98b9bd430c +80999c2d12f623e4f87e0550a8e3523a +00945c1bd739ce389ac24bb93f6f9a85 +7ab55f0bd5dca5b17ecaa7fef73ed87b +e3cedd606ad51dd18532abd3079a3e0c +df5ecc6732e22cc25836398a10222e97 +863b6d9962ee3761bbb9cd8a8367589e +683c9384e29efe82dd3ac847904c28e8 +b3d948e72159ddc9c600d75512c5f115 +ce8633a6cf189b07e022147bbbd0f350 +8df17372eb32a0afa4fc47837262ff61 +62c63ca91890ce6f78a59c0bdb1e7bab +1eda4bb0259a939548ec4ceb39facde4 +c4f37a2c450f2a23322513b372e668a5 +cab8f06436c5ad45f982490215836f4e +3a43bc720714a2a42a73a76085542f86 +03f2f4033b258e6eb1e101f1ed4c24b4 +2ceb33cec5ecad4a50f6bd3a831ae77c +dd808f695d28f93562cfcb164bc3cce4 +01c6d7a87e94bf685205ec8d7c5196af +ef0e93e8928f8bae1b216da8e661fc9b +c8da55117d7d4b7ee8ddc8dc4ba73aa6 +bbfc64583c6d4c2ef4b0358464d4d028 +3bb5864481f2e66387419dd1a168aadc +0d725d3a1d3d97d7b5ea8293bbbf32ba +915eb22a15f7673f983672b6c353b6c8 +13b51da3e8a1422bfd58b79c4e19de64 +e69d6c03102464f22c395f9fa27108de +132fa4cbedaa7bd965b0b5900211be48 +e37ff5d9f14249f327a19dd5296e6c7e +4881a65cf107b1d034ff3ecd64ab9cb4 +547e92d01c0b699cfdf43f91714cfe2d +aa2b3a055b56845f19109f21d3c783f4 +eb1f01cc647ece73b2192537200bb8b9 +1db274ef41b1ad71f713df2b05207e1a +d8b4ec343b4310345efc6da9cee8a2ec +082ee3b2be7910f7350368e395a63d90 +d247c4070ae1de106bcb438a2dacac23 +f8cbc4f3af45befc792679f2b113f1cb +9031006a437019c5dcd987a31731ebd9 +a6b62759ee3883258fbdeeb8b56e6283 +4933898605b4a1b970b674a2dde92292 +f0684ca20de4607232f3e158e81a37f2 +c0b3fdecb3bb7b4ff0c936f378ccb027 +50652123b5e0e51bb5bc3fdde3c6a750 +ed4526ba8226d969f47edbb27b2f1144 +80e6f61dff9da8673fa16dbbdb14d03d +1d52744bf1450d7c5cfdf1f0bbf967c1 +3438a953124960bcc44611923a8844ee +b2f341296dd7aabbd4fd8e011be68a7d +322dba69658a92e9a9ace4d7177fb97d +b94a434a98efa493fbbc989360671bb9 +cd9ce9a01ed810af70999d8ce4c63811 +4c639abb75a0ae0f22c3384cb9c68441 +fe31ffcced1717988c854c2f3492466e +b56d81337f9bbf0d838df831e9b40216 +0be9161adfeb2dd1c3f20338bfb3ec4b +be7b7c9fa1ab09d6578a3f2a82bfafe3 +f6bdc04b4611ddf0aa8403bcb04292f7 +1c7146a10f3c76b0c1dd4af354b14982 +0d3d987f94aee65f84436696bcf33ea4 +1a5c9ac3ee859361ad5477ea792506a3 +e827d60f27e35d8e5b05af748ba897dd +5b7899bf7a6267d9b3b8c82f241a1d7b +6dc9fe740cf4a4b93cb0953a3c2a6026 +27adf814806fd4a51c1ffc84122c5c8a +f74e94ab992c8f27de264993a09ab429 +5eee0f1591d10c159763749ec86b9ecb +46898964a3889615d9f7c22a81e0a0e7 +8fb58d6770971b0f12e40b31ad65b4a9 +eb4ce130268dc13731dcd16ff492d0a9 +23532a54e8005860ad5e77f4e3392827 +07fedc4dc4891d1a90c501a781a666f2 +83e8341035b37dd70a92a6eed5406927 +6c9f7b3b25734d58f21f5050642874a5 +ef661042e6624f4052ce86d8f233d780 +efe794cdfad5cb86656e29854a1f5c92 +e5f19a0045481443bae165f03598a9ba +b8fe8691321edbf308a9d60bb817c6af +f31fdd0f1aef106005e6d29b72229fa1 +239ed45c3cb734db446adfbbe3dab8a1 +2c2303411c7d25617a54106aca18070d +de179c41aca8bcdc388964024948ff8e +ca335b74d59bd50832267d3bf28f81df +dabda7a1cbaa8ea5104c57c8950b703a +076352a22ecea5ebc876812f62c1cb8d +ee0a2bdec712a9413623d8a920714b96 +a927c3a99f2843de4133377c690db9b7 +1fa98cff485549d49799dc8cf987a8af +74013a076a786a26c7e04217bb51031d +a44ca9661e967bb2e98af65277dac72f +d30897726b635548dbfa5cebffd9cd63 +4ad04a250b8029c9a7bf6529ee8793c3 +de41e337d96fd23619121ea709861e1a +18e070fd32cf732b9f37a0083320eec2 +7dd4b27ca8906182f684d0ee4ddb98c4 +70a440a8bd06ff40f6e9135946eb174d +b8d052366e752ce7c803abd24854e934 +8ab9dfff746ce3e62c6e04feb7b48528 +ecfca8b371616efe78e9916dbf825f5b +5f76da828c37fc4edb4557953539c92a +ecad54f76ce3bc233e02fc6fd7f94628 +e8a1cc06bfec7f677f36a693e1342400 +9ad0fe040e44a8e7146c3dd8582b6752 +4e56f978f94cf72158fd4311831b4f9f +3b95686fe49f50006607d5978aaa3efc +fa354daecc45f14b82b0e7e567d24282 +b7c30cf902e74c10e3d5c3af7e854f6b +e9369a7ec98e63186bdae77025cb5519 +57b441e2f3397d2628657e636cd2fc80 +8ae3a1e880ffb884260ec26e8fcd71a5 +eb7d8f9199945e8a1e5c3708da45e08b +d7dd1997c20a1029f9bd0fd1e2d2ed92 +a986ef62ef378583985cf0d0a34d17d0 +ad5bef0d6ad3434f871983ed09aaa43c +326f662a5c18a14d26c3d35131ea4b4e +ea4bf919aebf4add0024d91ee6f640d0 +9cc49e156084d2c757bd6d502bae8309 +9c18d4c75cc02337c277532ecea4b9fa +4159a65b7db275742e998fb855e7b9f3 +df34d37f6b4ef078bd9570efdd8fd2e2 +84d2c12c4f0c28d288464d33a23f227c +17b55bbd4222066960e54182e1e95f0b +75eb69b22793852bc892ce264c421a1e +de4abe78e28e2718200c76237f2ed42f +1149c8fc988799f43f6e5069355e108b +4129891ff13ddd62820f6f3cdbfa95da +c8758df3c9ad4d311516ea39fe734052 +360ddf0b658fd764ef5ae9bf7a8a1a12 +ad054e0e84e2b8e2b02ce4dee7688226 +cb434f8c5fad9793ed142805afa861a0 +83a3d5436f96cb2cb31d929794425f31 +34dde0f0fe7d4fdb359df1fccbf5fcde +7b77219e9549fad49e97c380f7e1f362 +053f4e89ae2355c5cb259d21e85eb9cd +fc45c5118f642cc479e6a550756f1a4e +0138351089a87a2ddc2d98255ce6b8cc +1f3e42daa4b315f2a0e6a530e0cc6976 +aec4974f238a6e04dcb07e20ad861230 +7a27fedaeec41b5832bda3169d76cd05 +154bd1371ae66ad3ab9a9ee6b1324e36 +a4594c9e974eed1fc159cc306dd7378a +431acd1a4a4d6036057c9906da8add5e +f6afe47bdedf075c7e188b2640152cf7 +8bc3bd8625778f64ed7c29698025f292 +51f6bb4db8e6e61cc4333450c6035139 +0baff1c675866bf259d3ac9417a33464 +6e8a56a9a005c6c6239ccbdf48f59aa8 +6565bceb49f962f797f49084f3f819a1 +2267037a7f3e753c653218fcf67ce9c7 +aca1ae6237f498986991565b0307f0da +785bb09a5f25730a3aed4de12da4d9ea +4eb5472f4e5243fcd4a76533789e829a +7d725ae9a8e569f49c56194226b64dee +7396f5d4491e79ec1ac0ce7a105bb233 +aa64644a4877da34e2197c5f2dc375c5 +2165718fc24bf21f1c4e0623c8e8d811 +e1f45852024724f00ced7935e297983a +deac06cde1f6b18a53a2cf0b03998da2 +8371f0970efbc6099c50afbbd4f0e477 +985d909280bc20607f4cb4941ae535f2 +abcdd18a791546544b52c0587dbd6107 +23e8b5a657c962a3e77979859ae1400e +cc4fab29cc180ffa888be396ce6aa6f5 +b553506daedf701ccdc437fbf3e6bbe4 +d707ae093ab94607010ddda09fc8a5a8 +76bdae04521ba996636c4dc431040031 +556c14fd0f3ff7bd6b435bd630e48811 +b500501957d4b8b412ea0102c842dd5e +d18506a74c66e4d8537269c10c783923 +c9b4b691f4d88b7d2b4d5b770b05c8bf +ba915c678f944fe5a480364ddc3382a8 +78134c91a1ffb2e21594daa2c2a932fc +6fc6c8790dfc301ee38b8b63e18def5c diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte-hashes.sha1 b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte-hashes.sha1 new file mode 100755 index 00000000..f251291a --- /dev/null +++ b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte-hashes.sha1 @@ -0,0 +1,196 @@ +da39a3ee5e6b4b0d3255bfef95601890afd80709 +3cdf2936da2fc556bfa533ab1eb59ce710ac80e5 +19c1e2048fa7393cfbf2d310ad8209ec11d996e5 +ca775d8c80faa6f87fa62beca6ca6089d63b56e5 +71ac973d0e4b50ae9e5043ff4d615381120a25a0 +a6b5b9f854cfb76701c3bddbf374b3094ea49cba +d87a0ee74e4b9ad72e6847c87bdeeb3d07844380 +1976b8dd509fe66bf09c9a8d33534d4ef4f63bfd +5a78f439b6db845bb8a558e4ceb106cd7b7ff783 +f871bce62436c1e280357416695ee2ef9b83695c +62b243d1b780e1d31cf1ba2de3f01c72aeea0e47 +1698994a273404848e56e7fda4457b5900de1342 +056f4cdc02791da7ed1eb2303314f7667518deef +9fe2da967bd8441eea1c32df68ddaa9dc1fc8e4b +73a31777b4ace9384efa8bbead45c51a71aba6dd +3f9d7c4e2384eddabff5dd8a31e23de3d03f42ac +4814908f72b93ffd011135bee347de9a08da838f +0978374b67a412a3102c5aa0b10e1a6596fc68eb +44ad6cb618bd935460d46d3f921d87b99ab91c1e +02dc989af265b09cf8485640842128dcf95e9f39 +67507b8d497b35d6e99fc01976d73f54aeca75cf +1eae0373c1317cb60c36a42a867b716039d441f5 +9c3834589e5bffac9f50950e0199b3ec2620bec8 +209f7abc7f3b878ee46cdf3a1fbb9c21c3474f32 +05fc054b00d97753a9b3e2da8fbba3ee808cef22 +0c4980ea3a46c757dfbfc5baa38ac6c8e72ddce7 +96a460d2972d276928b69864445bea353bdcffd2 +f3ef04d8fa8c6fa9850f394a4554c080956fa64b +f2a31d875d1d7b30874d416c4d2ea6baf0ffbafe +f4942d3b9e9588dcfdc6312a84df75d05f111c20 +310207df35b014e4676d30806fa34424813734dd +4da1955b2fa7c7e74e3f47d7360ce530bbf57ca3 +74c4bc5b26fb4a08602d40ccec6c6161b6c11478 +0b103ce297338dfc7395f7715ee47539b556ddb6 +efc72d99e3d2311ce14190c0b726bdc68f4b0821 +660edac0a8f4ce33da0d8dbae597650e97687250 +fe0a55a988b3b93946a63eb36b23785a5e6efc3e +0cbdf2a5781c59f907513147a0de3cc774b54bf3 +663e40fee5a44bfcb1c99ea5935a6b5bc9f583b0 +00162134256952dd9ae6b51efb159b35c3c138c7 +ceb88e4736e354416e2010fc1061b3b53b81664b +a6a2c4b6bcc41ddc67278f3df4d8d0b9dd7784ef +c23d083cd8820b57800a869f5f261d45e02dc55d +e8ac31927b78ddec41a31ca7a44eb7177165e7ab +e864ec5dbab0f9ff6984ab6ad43a8c9b81cc9f9c +cfed6269069417a84d6de2347220f4b858bcd530 +d9217bfb46c96348722c3783d29d4b1a3feda38c +dec24e5554f79697218d317315fa986229ce3350 +83a099df7071437ba5495a5b0bfbfefe1c0ef7f3 +aa3198e30891a83e33ce3bfa0587d86a197d4f80 +9b6acbeb4989cbee7015c7d515a75672ffde3442 +b021eb08a436b02658eaa7ba3c88d49f1219c035 +cae36dab8aea29f62e0855d9cb3cd8e7d39094b1 +02de8ba699f3c1b0cb5ad89a01f2346e630459d7 +88021458847dd39b4495368f7254941859fad44b +91a165295c666fe85c2adbc5a10329daf0cb81a0 +4b31312eaf8b506811151a9dbd162961f7548c4b +3fe70971b20558f7e9bac303ed2bc14bde659a62 +93fb769d5bf49d6c563685954e2aecc024dc02d6 +bc8827c3e614d515e83dea503989dea4fda6ea13 +e83868dbe4a389ab48e61cfc4ed894f32ae112ac +55c95459cde4b33791b4b2bcaaf840930af3f3bd +36bb0e2ba438a3e03214d9ed2b28a4d5c578fcaa +3acbf874199763eba20f3789dfc59572aca4cf33 +86be037c4d509c9202020767d860dab039cadace +51b57d7080a87394eec3eb2e0b242e553f2827c9 +1efbfa78866315ce6a71e457f3a750a38facab41 +57d6cb41aeec20236f365b3a490c61d0cfa39611 +c532cb64b4ba826372bccf2b4b5793d5b88bb715 +15833b5631032663e783686a209c6a2b47a1080e +d04f2043c96e10cd83b574b1e1c217052cd4a6b2 +e8882627c64db743f7db8b4413dd033fc63beb20 +cd2d32286b8867bc124a0af2236fc74be3622199 +019b70d745375091ed5c7b218445ec986d0f5a82 +e5ff5fec1dadbaed02bf2dad4026be6a96b3f2af +6f4e23b3f2e2c068d13921fe4e5e053ffed4e146 +25e179602a575c915067566fba6da930e97f8678 +67ded0e68e235c8a523e051e86108eeb757efbfd +af78536ea83c822796745556d62a3ee82c7be098 +64d7ac52e47834be72455f6c64325f9c358b610d +9d4866baa3639c13e541f250ffa3d8bc157a491f +2e258811961d3eb876f30e7019241a01f9517bec +8e0ebc487146f83bc9077a1630e0fb3ab3c89e63 +ce8953741fff3425d2311fbbf4ab481b669def70 +789d1d2dab52086bd90c0e137e2515ed9c6b59b5 +b76ce7472700dd68d6328b7aa8437fb051d15745 +f218669b596c5ffb0b1c14bd03c467fc873230a0 +1ff3bdbe0d504cb0cdfab17e6c37aba6b3cffded +2f3cbacbb14405a4652ed52793c1814fd8c4fce0 +982c8ab6ce164f481915af59aaed9fff2a391752 +5cd92012d488a07ece0e47901d0e083b6bd93e3f +69603fec02920851d4b3b8782e07b92bb2963009 +3e90f76437b1ea44cf98a08d83ea24cecf6e6191 +34c09f107c42d990eb4881d4bf2dddcab01563ae +474be0e5892eb2382109bfc5e3c8249a9283b03d +a04b4f75051786682483252438f6a75bf4705ec6 +be88a6716083eb50ed9416719d6a247661299383 +c67e38717fee1a5f65ec6c7c7c42afc00cd37f04 +959ac4082388e19e9be5de571c047ef10c174a8d +baa7aa7b7753fa0abdc4a541842b5d238d949f0a +351394dcebc08155d100fcd488578e6ae71d0e9c +ab8be94c5af60d9477ef1252d604e58e27b2a9ee +3429ec74a695fdd3228f152564952308afe0680a +907fa46c029bc67eaa8e4f46e3c2a232f85bd122 +2644c87d1fbbbc0fc8d65f64bca2492da15baae4 +110a3eeb408756e2e81abaf4c5dcd4d4c6afcf6d +cd4fdc35fac7e1adb5de40f47f256ef74d584959 +8e6e273208ac256f9eccf296f3f5a37bc8a0f9f7 +fe0606100bdbc268db39b503e0fdfe3766185828 +6c63c3e58047bcdb35a17f74eeba4e9b14420809 +bcc2bd305f0bcda8cf2d478ef9fe080486cb265f +ce5223fd3dd920a3b666481d5625b16457dcb5e8 +948886776e42e4f5fae1b2d0c906ac3759e3f8b0 +4c12a51fcfe242f832e3d7329304b11b75161efb +c54bdd2050504d92f551d378ad5fc72c9ed03932 +8f53e8fa79ea09fd1b682af5ed1515eca965604c +2d7e17f6294524ce78b33eab72cdd08e5ff6e313 +64582b4b57f782c9302bfe7d07f74aa176627a3a +6d88795b71d3e386bbd1eb830fb9f161ba98869f +86ad34a6463f12cee6de9596aba72f0df1397fd1 +7eb46685a57c0d466152dc339c8122548c757ed1 +e7a98fb0692684054407cc221abc60c199d6f52a +34df1306662206fd0a5fc2969a4beec4eb0197f7 +56cf7ebf08d10f0cb9fe7ee3b63a5c3a02bcb450 +3bae5cb8226642088da760a6f78b0cf8eddea9f1 +6475df681e061fa506672c27cbabfa9aa6ddff62 +79d81991fa4e4957c8062753439dbfd47bbb277d +bae224477b20302e881f5249f52ec6c34da8ecef +ede4deb4293cfe4138c2c056b7c46ff821cc0acc +a771fa5c812bd0c9596d869ec99e4f4ac988b13f +e99d566212bbbceee903946f6100c9c96039a8f4 +b48ce6b1d13903e3925ae0c88cb931388c013f9c +e647d5baf670d4bf3afc0a6b72a2424b0c64f194 +65c1cd932a06b05cd0b43afb3bc7891f6bcef45c +70ffae353a5cd0f8a65a8b2746d0f16281b25ec7 +cc8221f2b829b8cf39646bf46888317c3eb378ea +26accc2d6d51ff7bf3e5895588907765111bb69b +01072915b8e868d9b28e759cf2bc1aea4bb92165 +3016115711d74236adf0c371e47992f87a428598 +bf30417999c1368f008c1f19feca4d18a5e1c3c9 +62ba49087185f2742c26e1c1f4844112178bf673 +e1f6b9536f384dd3098285bbfd495a474140dc5a +b522dae1d67726eba7c4136d4e2f6d6d645ac43e +e9a021c3eb0b9f2c710554d4bf21b19f78e09478 +df13573188f3bf705e697a3e1f580145f2183377 +188835cfe52ecfa0c4135c2825f245dc29973970 +41b615a34ee2cec9d84a91b141cfab115821950b +ab3dd6221d2afe6613b815da1c389eec74aa0337 +0706d414b4aa7fb4a9051aa70d6856a7264054fb +3cbf8151f3a00b1d5a809cbb8c4f3135055a6bd1 +da5d6a0319272bbccea63acfa6799756ffda6840 +fb4429c95f6277b346d3b389413758dfffeedc98 +2c6e30d9c895b42dcccfc84c906ec88c09b20de1 +3de3189a5e19f225cdce254dff23dacd22c61363 +93530a9bc9a817f6922518a73a1505c411d05da2 +e31354345f832d31e05c1b842d405d4bd4588ec8 +3ff76957e80b60cf74d015ad431fca147b3af232 +34ae3b806be143a84dce82e4b830eb7d3d2bac69 +d7447e53d66bb5e4c26e8b41f83efd107bf4adda +77dd2a4482705bc2e9dc96ec0a13395771ac850c +eaa1465db1f59de3f25eb8629602b568e693bb57 +9329d5b40e0dc43aa25fed69a0fa9c211a948411 +e94c0b6aa62aa08c625faf817ddf8f51ec645273 +7ff02b909d82ad668e31e547e0fb66cb8e213771 +5bb3570858fa1744123bac2873b0bb9810f53fa1 +905f43940b3591ce39d1145acb1eca80ab5e43cd +336c79fbd82f33e490c577e3f791c3cbfe842aff +5c6d07a6b44f7a75a64f6ce592f3bae91e022210 +7e0d3e9d33127f4a30eb8d9c134a58409fa8695b +9a5f50dfcfb19286206c229019f0abf25283028c +dca737e269f9d8626d488988c996e06b352c0708 +b8ffc1d4972fce63241e0e77850ac46dde75dbfa +e9c9bf41c8549354151b977003ce1d830be667db +0942908960b54f96cb43452e583f4f9cb66e398a +fce34051c34d4b81b85ddc4b543cde8007e284b3 +61e8916532503627f4024d13884640a46f1d61d4 +f008d5d7853b6a17b7466cd9e18bd135e520faf4 +bd8d2e873cf659b5c77aac1616827ef8a3b1a3b3 +b25a04dd425302ed211a1c2412d2410fa10c63b6 +a404e21588123e0893718b4b44e91414a785b91f +a1e13bc55bf6dad83cf3aabda3287ad68681ea64 +d5fd35ffabed6733c92365929df0fb4cae864d15 +c12e9c280ee9c079e0506ff89f9b20536e0a83ef +e22769dc00748a9bbd6c05bbc8e81f2cd1dc4e2d +f29835a93475740e888e8c14318f3ca45a3c8606 +1a1d77c6d0f97c4b620faa90f3f8644408e4b13d +4ec84870e9bdd25f523c6dfb6edd605052ca4eaa +d689513fed08b80c39b67371959bc4e3fecb0537 +c4fed58f209fc3c34ad19f86a6dacadc86c04d33 +051888c6d00029c176de792b84dece2dc1c74b00 +1a3540bee05518505827954f58b751c475aeece0 +dfa19180359d5a7a38e842f172359caf4208fc05 +7b0fa84ebbcff7d7f4500f73d79660c4a3431b67 +9e886081c9acaad0f97b10810d1de6fcdce6b5f4 +a4d46e4ba0ae4b012f75b1b50d0534d578ae9cb6 +6342b199ee64c7b2c9cbcd4f2dcb65acef51516f diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte-hashes.sha256 b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte-hashes.sha256 new file mode 100644 index 00000000..7332dea2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte-hashes.sha256 @@ -0,0 +1,196 @@ +e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 +09fc96082d34c2dfc1295d92073b5ea1dc8ef8da95f14dfded011ffb96d3e54b +33a633841666a5c291a82bfae65deac5c537d05f9fe926cbb5b7281bf90ad150 +8e2cc699f7e677265069f172d4cba15c146e954d7e4f2a8c176576035275b7a0 +8096d72b968a2dbb7ceee163c1981f7f1ec11ee10051b2dc2a8d7601d4e56971 +2cc06402328f034d1909fa7b95f34cdb5585ce7f9096bc4082c97904921f6304 +99a8d6823b803a8d41ed7c26322b4ac8fdc86ce4457ffaaf8600e99595f1577a +5d73704556bd458af1b90383d98591c1d01894d99b394fb7647d3d0cbd45f9a0 +3b9606c772ea20bf2889732b034f9fd476ceddefe8ec4e3704c5993e38dace1b +b858d7c61b67e1688c267ca83b57dd0947c4e5acc4eb3d130fbd92222b66a9ab +87574390294ef6d212b6d8c44ebd5c88e932036dadd0b827c6cb25cd120bfdf6 +afe90242f095e967523c12333b0093d4e532a0db0f27dcc25d44d23ffb62094b +55731252db2418c49f15d7f0f146c6506589f016a82c72cf8a6276ac6bd123c7 +c2e0ed603bfa67292b78a29264e409a2e0c98482cdb59cf4fe7cafff69853d11 +517f007a8b65d4197411c35b14edb1340490a9be7a6c66b8c827b1e101a05b5c +76c977fdc97261cd0956ce1319476d314bc57d8691c7884cd0a7ff3cf825c31f +f10c26637ea8ca2d0898fa661f087f13f174fe0ca1c91862ce3b6127c3430f51 +679b95521601c0ba63ce882046abd7a8cdb8e78d5c0ee9f38c21dc47ca846195 +af369f2162152e43847b4d0c595dcf2d27059563909425f37928bc01090f2f34 +7e1f6f080a60c402bb9c39578f75afc148a0746c656ca243f75038b82304bdf5 +8d6df02738597d95e2eb9e870d4177339728d9ab8b8d61aa96f0b6d1b5ad6efd +d0a9699291dead3f6fba3b648c28537a04caea4b96b145802c06125a17c3faba +d504026213b322cbcb0dbadd6a1fc6c708825019da9bac7aec973f750cbf2d3d +66c1a2578b41c3a200296e85d4d30a1876f8ca5cb941ffb1420e04d8e37149a5 +b8a87b047350912e4861e4aab7d1046d5372797ecea81d187f8e2c117db535dd +8d2b52d4d4074d471d037cdf9eeb13c18ef9ce4949fce00d106ef0880f2db5ed +3d182e9928b2433c94255452170e59e3f4cca3dd29ea2e9b01e94e89da595393 +17c3f5d88ed7f3f62be0e28913357d65916389c1633db8fb62b92e14230d3611 +93788128441c894247bd9ccd6fc8af146c0ee76cdbe4e1c5a8dfa81dd0c338b4 +c7855ac54d2c5767273eec327efe39fdb3bad74121bdd8d2065484268727539e +d1e1f2aca9cfe8c6460f576661190a8008705ef13207c4c7200a2d6b0605f519 +b1843454b0258016558abdbd899319c1fd12d03e0c3d9e882da03de9cb981777 +2834dcb6957b97fdde61b532d151ee4482bface8714fe36cd072b4783765901d +47d61de59879013f64eb78fa8f6c8b906f7d25b8e1c3ca888f32421749c0d042 +855fc59aa873328501ab0b1ce9c60a7d5582662c725605ebe02b64a13e34b3bc +e05939e8ff4ed77a11522dde249a74841c54970d984e0bb6f77ac64f1fa313b0 +078778fed0e382da5d7dd36f585e1f1aa9b92d4caf20b85c0f6dd346de8d3998 +263140810ae46430e19ac1a4a98b6204b63031b282ecb28594bd837268104308 +ed39f65ea0e6cd8fb39bc5d94a1554dfd0002733e01618161d58a7b7dc8be834 +89830272d1fd54040f9329a39c7f491f15eea851095e0bd2d0bb412baeda7445 +c9b63e8ac2e87494f98c9ece5d74f4540090c286166efdaedc6d59a0f623e5f8 +509e6b7dacb70bfa62f3964eba990b9c576fd2485c1040fefc8eab5f07269f4d +8bb7546f64ce1cab770407de791ab25f7bfbac3e071810310ee674c2824e59ac +ac5bf3cad821e7ad8b2ed7bbfbaaa5e7abb30606afd8ed5d6a18a0d0eba343d3 +f7995f433d17bee25f44c918de82eb147b3bfef24045ff8fb17ffedf559e06b7 +2c465ddc53e88894a2279e30b9e6feb064c66b15dcf5a38722f5c92d65a84bab +b0ced82dc52c4f9b1dec098a80a23a4a711f3a8c9c3684f0761b0e8a29ba560a +f8dce75572495bc241288c07246acf7a157d462a9c01d1491618f073e57f47e2 +46d89d780f178334d19e02c41d5af2e265e2190896dce94822b99c19adc3ff6f +968954bafff8e2a118d3aedffc6283b30efddbac0af2245195c2a32a665a5d54 +33f78a8a6adc466fed41020fa799aa537cc1c1bb4e938c06a1baec97f7b3c26c +5f7f49d1c307363de95d450b558275f8d5a6780ee47246268e6729f7733e535a +9f126c6e07ed2744cef5de1f468b2ed1c51a13ec3c8351935b9656458a3dc40f +b8e3d23621cb02bcae060bdf5b6b7db1f024651f98ec63766c20b7883bc033d2 +689c608602d5e5d37a0285eeb5006d97addd7c2b8e006770fad588eff621c971 +17c6f0073c4f92d5eedda57ca2506aa6002695c6b7bf12e4dbf4dd1a7fbceb08 +504472bf96d0a3da1098dacacac48886d1ab92929187de95c7f42eab9907801d +ad3a49ab7ad5b69182301d9ef971feab72f770f4d9f60f6db308ffea746db005 +5cdcb342f26857e8db5ac97a89da6197759adf384ab241a8112795241983238f +4ec9883c8ad72131c79f14e4f1e75042a61100a5bc290fc344ee3c2adc99c143 +375c64eb3361f34b4d89078fa95d082c74bced92436aa3d50031839375d6473e +8a0a36538da941bea6c614b2c038424588d8d2505039f70cbff291d4f0f9f6a1 +a4dd6338174ebeda6a25b88d754fa5b95cad27902eb0bc8321b76db62efb1abc +a644092a1de8e05e17908ce565d55fcf39e30585565d96bf1c13eeb9f3401803 +7697b1435a5bdc094038469fc5268615cbe94641b2165bee62466426ab414c97 +62f249a85b14b477e764e63e9821d3f44dd2c745293f3586eff976266311a39f +eb2c75aa7330a6589d09f58231d1218e4124ba49b7b0c5245a76a5101d136449 +90c096f9852990cf0fcfbd36ffeb577b4d106d66e9c7a18abdc6f7a3b1ddbab1 +327b0e47ba3bc200579ac67ac38968e0df655e2d22ffe3adf238f7ac9029a1de +bdf4ef8fcafbe13b772ca217eef56a316210e71f69cd943433087c68d9a67bb9 +72c955a5adaf9e49d565342b41b36ee5ab9b5a394d003b804e4e361a46bda571 +cbd287d6a6707e2cdc8e63a29f758facbdab375bb252183d3af877dea8d25260 +7aa856fd19741a16ec634b1f653cfd5ac224278652e0b0a2903e274be20a048f +8410cdb01c659f05741fd29469d0dbb0251b4fd8e708abeec4a879047fba7c37 +b5f811baf9c441d04f010f76bcd7eae80c5bb249a40ce37436f0a0296849b8ab +9be38d9ac8a9c30e8a5e86e3ede291b23bb381ee41dc662421e394f6b8b9881e +ef45cac2d6f325a523c40a989f5554e152f8d65cbd22d35824d1f28378658432 +8e3d126f3a316e0ec49741a3ae6215e29c4acaee364272b7087d9b766579e00c +a43ee360b1dc90c573bef4145e1d4557166d7cce6ea1ed33e0cbd909643c3621 +5396745f9645dad55b732efde57de49c2ae40624fee192579014dc2b79d814d5 +b617be050dedb47be64d82dc19e3d84b6799b5bada18944df5417759a85e445e +17d5520a82dd7c945de6a92200d036cd95bb16330f0f95df802d23e90c8e5c2c +b71e5a677801057ec719ae2655732720644bc8f999a8698876c92e4323d4ae0f +80c6a41efdfe452d1ad6f3b0d5eb31b962c332a9bb7e4f7ee6f4aaa18a3b81d4 +32ae8512b486d4523ca7a630556758655a5cff12aa5cfcb8dc5e65b21a257f4a +0f14c68ffe8c26e9d2ecdd5ea8027b6549b3e8742023ffbdc7547227cc27ec2c +85dff510ebd3f1fa617a2273ed67ef5abe4774cfe95657fe380e75b25090664d +7a852eb3b59ad350c9d47adf1ce0812d06866cca8e1f2c65c893e7952a62eea4 +49cfe8b6302a2d45b866a26c4940d777df4f588ebe1bafeb275a8a03a1eeb0aa +e6e49ebcd83acd3a9ec0b100e26c4d82388eb9378ecfcbf967a31c4951ad0c01 +9edf4d38cdd6e73e857f1ec91132499e7f930d2cdee6b3583a8f062ff7e9d848 +768dbebcd6aa66337810b7457964c63322904e9242229e5d98b808799f7f4cd4 +867a5ab42d15f9843d67438db495a8a581eddd39c3753f3d203225b60eaa9a3e +d7acd8d042b8c6802f6d9262055a6e296f3254674745f18cd1b21244e1acb9f0 +fe781c4d49e73ca9f82389b6d58f3def857cffe624acfb6a2a5a8e9559623f37 +96fb72ddb440bb1f00dbafc97768f9890effcc172fcc395de4f2a19318c46c86 +b63555a77fefcadecfa88a770e70f1d51d46ae68fc672ad4770804495eb1b867 +161d1a609fdeb2fa425761bf0b751dfd25e7a0a02995920921f99f63331b76d9 +c80931a1263d7f192937eea3e453006b19525ed981314ec3fd561d256e8e135d +a3b6ba9a5cba6071a99b1a43454053bfc3e6d1338ccf0063d5d71247a6b57566 +7d057dc07ed5a7c11590262a0a18c8cd614a029ca12fe08bfedc87307b5f65b9 +0b7744d3394c04618e6376cd450cc3fc81586493ab5081a9b3b155938d98563c +e8d1ea7154ec53c175761311295f69037865db32ec22976b6ddb981d226760ad +40aa287bdf661317439fa5ffa77cc9fa9ca3df504aae74b0ba83b2fbebbaac83 +ee2e8fb7206e2e8fdae91afcc3e903d534b304069f232c68f53407cfc6d0bbae +b940c011eaef2b772ba03659581d525e0b6148f9c59cb7120db55ce18bf6d695 +9574545ba02bd75bb1dcf038884bf9d7892bc017215308f01ebba7932c014a62 +da685c53ddf810225507141759e3c74ffeaa1c5eecbe150386a83027e7014077 +5c0769369e4fb9f9d9e599612923554fb2f1e6d87eaeed283f6106845b66b532 +19056a3d33ebe1b84a100c27fc72d0265ceeb9c573d7942a4d44983238d34ea7 +8a5e6e6cae30d4283fd70af96d9c53d8ea45ca48892d313981fe208b1384f0dc +880992dadfeccb31f289522214209eb87f41fea5fd3155ab274e9a6fdc6f9f64 +ea7a2b0e780fc6dc8843643a2bc18a17226a1bb3d9e1467cf0be2201decce2c7 +2077395cd7562dd5e9965ea620cedf32c805f50f748c4ee6e82af960c5ce2d66 +2dbdc632baa5d0831808518beb80e3737de5bbec3dd0438e75dd30b2ea7fbb90 +ced4cf34982e0abbef40e876659544c4ed01f1975351490984aaa429fef321b0 +69339b4534eecca329ef2af397ede2a882d7e315a871dd2b781b8e0f4277ee66 +79cfbb9b52e573e22cd3427ec258d69e2d19fd27de15df96ca9006ccebe7b58e +1203d54626871bccfa8abb8bbd740b9af3c7266bc8490a210074d7f2b0806ae8 +0c15140d3b5e4b180b0b1517a51fa08f82458c02185ef2bc59fae37543ef9011 +ab71b18daceecc7c8fde7cf5f77eacf118262d760bcd383dd7bfa2170895d518 +fa3174d3432fe38241a34a8387811b54c3d0f183468cef5cd6d3fb325b270b66 +c13fd9ed22d33aa45f73748782e4dbb835d180dc0662e160c0a6c445c76f0c72 +b88a842dc14c41c2b5bd74e48fdd2bd0d43cfeea1eb9b154bebfc4f03d8a102d +45ba1056e49828a0385b0b5f9e4933905973f15b2713fee1c1755e2a7a3e8d79 +a0d7d4fda9435ef292b761aed2c9fea576519437a824e96150a4324dcc757605 +7906439843a1c1758c232182eaa66d5e6bd5ad2fbc0157fdc5438e1038966dc4 +35e5a6c17906646cf15c2bed4884129b5134eb2b411400e4d8797126f51a4cb7 +d19ddbd98476519a07cd8917b95eb609e5b50e8088ad68cd7426e8139d5bffc2 +cafea6a1183ca8934867692684194ce9903b375a8036c4c5deb8fb379c3423cb +7e4734ce7e22a515bfe60e296640dec121a089f75034240408fe7be2ed9e5c87 +b09436c29cc3823c434a4689bb67a73a49164bd23ab40c4e04ed99320fd138d2 +d6752f5e2738cbaa2e154b749216babc990297af411dfa2b66c9f942480ff4b9 +0f0cc4994a2a88f58cc38afdf61ff43952473c437d235cec426139c8f43ffb5a +eb9dd875ecf9ec930b1482b8a50c337d48b31590f99cdfb80bbdd160ad4fb49b +ec7435c1c8e3eb1de2871cdc797bff6969b863e5b9fb005b3a7af4ff96680c63 +e5afd502015d80bb43ab7f92f138b35ce5fafa980c5fba78412ffcfa281f9d8d +14e7975021e84497b4daf367f6861c79820308883c4e1254c038a7458a3f2913 +bcefd79629a6d7a8afbf0c8ccfc2c5889f627989e71c3a212d900e3015e460fa +74661206cb19ec00619e1fcdcae443486adfa69a564672c9ee9f48f8ea35d5b2 +341bf4dff841088f3b902c2471b67b49498bda5c045e9befd58af93ade0a8df8 +e5239ecec9ea7737f614ebab502df1248c0a9a0183fc70441fd9ac88040846ce +58e09b4047770bc998b86a4191b7a11eec6fc65bd5e5d0fb6f30d4b7ee0cd683 +9e01666f3284aec585338d0b452aa1712b9d1392c4a265a2ecfc9dc4cadd002b +33aa52b6be6991965ae18124232f108ec7b400528e848e5d8a8d7cf75783ee19 +f854ce37a0821dee06b616d2e86383271c91e09328f884dfef2107712d267601 +a58035c4921e7114b97fde8d4cf04224971d49fc6b23ed5d61a29e133684c809 +4d8963b832c44bab059a206f162890fff4eafd71e535a03609a67fe3c31de9e3 +6ebf98b52fc3c4e77257d176b47d10729baeec4066a9bc78a89d7d02af7ab2cf +366cd811c075198d1749db7075c4c333b6f347b64e44b3744ef28a3957a0feb1 +712157d7d59011c4bf1ee690217f4b0f855816e9bbee6b6aff277b9645340c9a +1dc0a697f2a7c1da301b256e6822879f212beb56fbc7fe1b8e877ccd964c132a +6fb0514a46f06be4bc3798ae82fa6cf14103926f1969b3d70910a9c5d9589e58 +9731a6c8ef6c4d601781f231e5b17c0a5194495d5b01b27aefbb4cd857c0c7d1 +b18a49b7c4114fb94d16ffdce1e1677e6bde99bba443936af10cbedca6eeaf2a +ce197d61ddae42c8b8447aa698b3e7e5d51d9f0cd2034bc64f1a9d1b2b18e3cd +7d9a3aebb470990abb92303f0c2ce5d6c38f9a2198d8f1ae8ab7fbbbf007cc7d +e52d8c79b31f45d4894e0948089da5fc236d33dd79a80d2304043e8c234cf88c +b1870cae9e54cbe8ddd74782c98f6c9ec6eeb835e2765252530d71779685d4ea +69850fe71261572f61d56863a7dc12aeda7931225d0eafb5b7b45aef7b6c8586 +18fdfb38e4f516734cef5de8cba84a54a17cdaf13228621dfcd806c5e822eccd +9db6e6591134181c2c19bbc57f24e11ea161165cde584e1f58c4df2fb5ee8c88 +86eafcaf23edfef66753d664eaa7813b5a16d1abc01a95f74ae88a02e42cadfb +7be29e433c7e17875c71eea08d10ada5a17eea25ead94d41cb1711e8fd204c06 +c1f98aac0cfc98f30c3fa13fb8011b2a1d553e6c03edb8e2a35f47574237fc64 +981571f9393463f49cd5352c024a8998d7b139bc8aec7a512101edb18a7e0954 +8628162a5c9d34c94e60027175f819e98a356832a3d3898a7f11b95e171e2a73 +1c4530860ec79ab73b141a7e64b0de775192a002fa2f3832b6c24972797d5161 +d97097c16c4d0cf169e61cde78e807cd318b8938992066bfe4e266e14146fbba +3a18179cf693d234a8aa913b7362505533b414d60bf7eaf02427157759defaba +8ee61f98cea2659f5ab9d8ec444de3b3e843ab02baa7806e96230a64dee93774 +bc69420ce99aa58de5d5c9ae32c3528b02546347e8f85dca651187142bc2a40b +79b2d4da202168d2c6f7dbff6dba414f71e405731a287a23b58af903f9b1c770 +068c65431e6010461cd77e3d2859fbc978857d1195dc1506ab1b5c9344e1099f +918a1d14de8c5fa363fb3137cf5014020646a1a2235f78ef3ed0d034c74f5761 +ef88b649d012178186dcf0244835232b5b7392e0c1f8f141f5107e9ead559e74 +326f14fc54954b73d704935b213dc797311f7c8fcd88c238c8ab767286dc3f94 +0087e37129b9a2d58b0987a218a3c1be67cb1e08142cbcf889aa617ca3e4640d +93294033c9de9361a3c6cc0df539e2e459f6d2babbbc0623859e18af0d0ccf4e +49640215294d9263bc464538c3c29e42edea637d1427c2f04ebcd828d6fcb480 +ce5cfa5b3b0485805cf5bcc8c24594a6b6fec9249698d317ce20bc84d857eafe +c9ac43870e02c7b36bb1e7ba3ce2e234507c0076f8a77494f268777edf5ebffc +30eb195e3aad4c288af76c66e26c6096f5f7de1b56b43d638ab7119d73cfd214 +338225e3b94025d2b327d72ed3d763a66856e1d1ebcb632bc4d8752000ad9966 +69b6cc0729b2d2877d46a08f3c251ae18f043949a33797c3027668b23c969d68 +3d35c10650a2da8413a2a11b8e7fb891af5da3a9763584caa6cd71bbe68de6ba +baf3bcf323f3e5b91649eeb5f1be977a8bd91915a66297a22fdb1a906d1a7e53 +7fd9b3abc4684e6f8ee591bbac5a36c5060bb09ef7899690416e5300cc14fcd3 +429e454c0cd5d874d7887f8f8def3390a6e54af783c102af6bc3c75c62f3661f +0987d19048e10b925bcf394dfffcf259fc1a15e403673a80bfd4e7fd4f43cef0 +fc774a081d9c93d52bb6a8d99a06ccd7bf32a10154d302524b8c5c5dc1b2969f +6c6afa35f1aad6301dfde6c4ababe2da47d92033a9a41e84ca6f00e5eb29bc60 +1e858dd15069f54478023c4d8518cd5aa814fb15c9eb8df45c44efbb050587ed +5d73820315ebd00f0e419a7fe418ff109664add82a68387daffff4239a2c1b23 +f7f4721be31524d014bacf105b06bacc4bdb953bc04d5a048e1fd4ddc395667e +426cbfa5a10024c4f5deae9146222146c2d75a5bf13e8215c04d7dd17f455743 diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0000.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0000.dat new file mode 100755 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0001.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0001.dat new file mode 100755 index 00000000..6f4f765e --- /dev/null +++ b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0001.dat @@ -0,0 +1 @@ +$ \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0002.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0002.dat new file mode 100755 index 00000000..26136c54 --- /dev/null +++ b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0002.dat @@ -0,0 +1 @@ +p \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0003.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0003.dat new file mode 100755 index 00000000..d3b14687 --- /dev/null +++ b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0003.dat @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0004.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0004.dat new file mode 100755 index 00000000..f00c5781 --- /dev/null +++ b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0004.dat @@ -0,0 +1 @@ +8x \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0005.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0005.dat new file mode 100755 index 00000000..9b3ac324 --- /dev/null +++ b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0005.dat @@ -0,0 +1 @@ +> \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0006.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0006.dat new file mode 100755 index 00000000..611a56b0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0006.dat @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0007.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0007.dat new file mode 100755 index 00000000..0af0f7ae --- /dev/null +++ b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0007.dat @@ -0,0 +1 @@ +q \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0008.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0008.dat new file mode 100755 index 00000000..90e3f795 --- /dev/null +++ b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0008.dat @@ -0,0 +1 @@ +|`< \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0009.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0009.dat new file mode 100755 index 00000000..6012eb5d --- /dev/null +++ b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0009.dat @@ -0,0 +1 @@ +?` \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0010.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0010.dat new file mode 100755 index 00000000..ebe52630 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0010.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0011.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0011.dat new file mode 100755 index 00000000..bc046e15 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0011.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0012.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0012.dat new file mode 100755 index 00000000..3464653d --- /dev/null +++ b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0012.dat @@ -0,0 +1 @@ +0 \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0013.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0013.dat new file mode 100755 index 00000000..648b68f2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0013.dat @@ -0,0 +1 @@ +A \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0014.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0014.dat new file mode 100755 index 00000000..b19f4100 --- /dev/null +++ b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0014.dat @@ -0,0 +1 @@ +G`0< \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0015.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0015.dat new file mode 100755 index 00000000..1e4de6c1 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0015.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0016.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0016.dat new file mode 100755 index 00000000..7c461836 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0016.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0017.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0017.dat new file mode 100755 index 00000000..5b457038 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0017.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0018.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0018.dat new file mode 100755 index 00000000..47c17ed4 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0018.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0019.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0019.dat new file mode 100755 index 00000000..4ed952ac Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0019.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0020.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0020.dat new file mode 100755 index 00000000..a7387d70 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0020.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0021.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0021.dat new file mode 100755 index 00000000..a330c33d Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0021.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0022.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0022.dat new file mode 100755 index 00000000..70bdf45e Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0022.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0023.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0023.dat new file mode 100755 index 00000000..895cec62 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0023.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0024.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0024.dat new file mode 100755 index 00000000..37ab0ba8 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0024.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0025.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0025.dat new file mode 100755 index 00000000..c5773a5b Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0025.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0026.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0026.dat new file mode 100755 index 00000000..04b568d3 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0026.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0027.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0027.dat new file mode 100755 index 00000000..b068ef30 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0027.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0028.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0028.dat new file mode 100755 index 00000000..98bc2d9f Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0028.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0029.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0029.dat new file mode 100755 index 00000000..97bfc3d2 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0029.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0030.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0030.dat new file mode 100755 index 00000000..25f09c04 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0030.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0031.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0031.dat new file mode 100755 index 00000000..988f3ace Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0031.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0032.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0032.dat new file mode 100755 index 00000000..f31fdcb0 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0032.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0033.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0033.dat new file mode 100755 index 00000000..396509b3 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0033.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0034.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0034.dat new file mode 100755 index 00000000..55c11cbf Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0034.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0035.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0035.dat new file mode 100755 index 00000000..cedccf77 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0035.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0036.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0036.dat new file mode 100755 index 00000000..f597deb2 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0036.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0037.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0037.dat new file mode 100755 index 00000000..6bcc7ebd Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0037.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0038.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0038.dat new file mode 100755 index 00000000..48e731d1 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0038.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0039.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0039.dat new file mode 100755 index 00000000..5ebdf8c6 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0039.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0040.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0040.dat new file mode 100755 index 00000000..4ee03078 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0040.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0041.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0041.dat new file mode 100755 index 00000000..1f7c8259 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0041.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0042.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0042.dat new file mode 100755 index 00000000..9c9044f9 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0042.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0043.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0043.dat new file mode 100755 index 00000000..57218616 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0043.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0044.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0044.dat new file mode 100755 index 00000000..963f6a80 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0044.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0045.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0045.dat new file mode 100755 index 00000000..8bd9b41a Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0045.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0046.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0046.dat new file mode 100755 index 00000000..47ecdd2e Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0046.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0047.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0047.dat new file mode 100755 index 00000000..9d1116f6 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0047.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0048.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0048.dat new file mode 100755 index 00000000..13f3bd74 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0048.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0049.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0049.dat new file mode 100755 index 00000000..5d6a89db Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0049.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0050.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0050.dat new file mode 100755 index 00000000..1dcf3abc Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0050.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0051.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0051.dat new file mode 100755 index 00000000..f9c54997 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0051.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0052.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0052.dat new file mode 100755 index 00000000..31af0d4c Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0052.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0053.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0053.dat new file mode 100755 index 00000000..79876b8d Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0053.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0054.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0054.dat new file mode 100755 index 00000000..89373a1c Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0054.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0055.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0055.dat new file mode 100755 index 00000000..fb225eb1 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0055.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0056.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0056.dat new file mode 100755 index 00000000..d0bee1cf Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0056.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0057.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0057.dat new file mode 100755 index 00000000..e13d4de1 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0057.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0058.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0058.dat new file mode 100755 index 00000000..011f9fc1 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0058.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0059.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0059.dat new file mode 100755 index 00000000..372e4610 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0059.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0060.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0060.dat new file mode 100755 index 00000000..48cce5b3 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0060.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0061.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0061.dat new file mode 100755 index 00000000..814eed27 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0061.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0062.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0062.dat new file mode 100755 index 00000000..039ee6a5 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0062.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0063.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0063.dat new file mode 100755 index 00000000..a7f3d9c8 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0063.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0064.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0064.dat new file mode 100755 index 00000000..5f46b83e Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0064.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0065.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0065.dat new file mode 100755 index 00000000..1bf5eda5 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0065.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0066.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0066.dat new file mode 100755 index 00000000..0d9dda40 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0066.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0067.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0067.dat new file mode 100755 index 00000000..7b2b9951 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0067.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0068.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0068.dat new file mode 100755 index 00000000..2c673263 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0068.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0069.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0069.dat new file mode 100755 index 00000000..5609f91c Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0069.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0070.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0070.dat new file mode 100755 index 00000000..13620c83 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0070.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0071.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0071.dat new file mode 100755 index 00000000..0644e65c Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0071.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0072.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0072.dat new file mode 100755 index 00000000..6fa76cc4 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0072.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0073.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0073.dat new file mode 100755 index 00000000..2a7b1700 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0073.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0074.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0074.dat new file mode 100755 index 00000000..516f7e24 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0074.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0075.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0075.dat new file mode 100755 index 00000000..fda8bbcd Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0075.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0076.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0076.dat new file mode 100755 index 00000000..c311f890 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0076.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0077.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0077.dat new file mode 100755 index 00000000..88a1675a Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0077.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0078.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0078.dat new file mode 100755 index 00000000..bc597107 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0078.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0079.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0079.dat new file mode 100755 index 00000000..bb83930f Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0079.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0080.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0080.dat new file mode 100755 index 00000000..cd8620bb Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0080.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0081.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0081.dat new file mode 100755 index 00000000..3ec89536 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0081.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0082.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0082.dat new file mode 100755 index 00000000..a7f1edc7 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0082.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0083.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0083.dat new file mode 100755 index 00000000..7ab631cb Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0083.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0084.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0084.dat new file mode 100755 index 00000000..32ba3e33 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0084.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0085.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0085.dat new file mode 100755 index 00000000..e2f3c4b2 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0085.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0086.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0086.dat new file mode 100755 index 00000000..b2093aa3 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0086.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0087.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0087.dat new file mode 100755 index 00000000..c289f0d8 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0087.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0088.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0088.dat new file mode 100755 index 00000000..839cc695 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0088.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0089.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0089.dat new file mode 100755 index 00000000..990cc8ea Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0089.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0090.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0090.dat new file mode 100755 index 00000000..689939cc Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0090.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0091.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0091.dat new file mode 100755 index 00000000..47dd878c Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0091.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0092.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0092.dat new file mode 100755 index 00000000..cd092f61 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0092.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0093.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0093.dat new file mode 100755 index 00000000..0c4a5ebe Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0093.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0094.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0094.dat new file mode 100755 index 00000000..650f3d00 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0094.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0095.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0095.dat new file mode 100755 index 00000000..37723e4c Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0095.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0096.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0096.dat new file mode 100755 index 00000000..d200428c Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0096.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0097.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0097.dat new file mode 100755 index 00000000..11cec37e Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0097.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0098.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0098.dat new file mode 100755 index 00000000..33d8657b Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0098.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0099.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0099.dat new file mode 100755 index 00000000..4a333158 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0099.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0100.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0100.dat new file mode 100755 index 00000000..12b6aa46 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0100.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0101.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0101.dat new file mode 100755 index 00000000..620966b1 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0101.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0102.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0102.dat new file mode 100755 index 00000000..12de2a59 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0102.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0103.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0103.dat new file mode 100755 index 00000000..f1f74fbe Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0103.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0104.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0104.dat new file mode 100755 index 00000000..1a7557f7 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0104.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0105.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0105.dat new file mode 100755 index 00000000..c021ab79 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0105.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0106.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0106.dat new file mode 100755 index 00000000..db0552b0 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0106.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0107.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0107.dat new file mode 100755 index 00000000..f656eb37 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0107.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0108.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0108.dat new file mode 100755 index 00000000..cb499457 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0108.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0109.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0109.dat new file mode 100755 index 00000000..90bd802c Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0109.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0110.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0110.dat new file mode 100755 index 00000000..e114f9e9 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0110.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0111.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0111.dat new file mode 100755 index 00000000..17ee790a Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0111.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0112.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0112.dat new file mode 100755 index 00000000..5b5507e5 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0112.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0113.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0113.dat new file mode 100755 index 00000000..31bcd321 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0113.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0114.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0114.dat new file mode 100755 index 00000000..14cf88e1 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0114.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0115.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0115.dat new file mode 100755 index 00000000..939a09c0 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0115.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0116.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0116.dat new file mode 100755 index 00000000..defa29c1 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0116.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0117.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0117.dat new file mode 100755 index 00000000..68c1e9c2 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0117.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0118.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0118.dat new file mode 100755 index 00000000..83d18dc2 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0118.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0119.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0119.dat new file mode 100755 index 00000000..d697b627 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0119.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0120.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0120.dat new file mode 100755 index 00000000..b6bdfb84 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0120.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0121.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0121.dat new file mode 100755 index 00000000..c8c5a60f Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0121.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0122.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0122.dat new file mode 100755 index 00000000..d8cae0d0 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0122.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0123.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0123.dat new file mode 100755 index 00000000..1c41f962 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0123.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0124.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0124.dat new file mode 100755 index 00000000..7821c665 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0124.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0125.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0125.dat new file mode 100755 index 00000000..8a426aab Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0125.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0126.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0126.dat new file mode 100755 index 00000000..76ff47a4 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0126.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0127.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0127.dat new file mode 100755 index 00000000..77a04819 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0127.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0128.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0128.dat new file mode 100755 index 00000000..6227f74f Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0128.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0129.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0129.dat new file mode 100755 index 00000000..4ce3fd49 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0129.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0130.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0130.dat new file mode 100755 index 00000000..c413d094 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0130.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0131.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0131.dat new file mode 100755 index 00000000..8f74a106 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0131.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0132.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0132.dat new file mode 100755 index 00000000..34f48584 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0132.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0133.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0133.dat new file mode 100755 index 00000000..a0331397 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0133.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0134.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0134.dat new file mode 100755 index 00000000..66cd42d8 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0134.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0135.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0135.dat new file mode 100755 index 00000000..66758ce6 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0135.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0136.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0136.dat new file mode 100755 index 00000000..6e7cddc9 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0136.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0137.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0137.dat new file mode 100755 index 00000000..18dffd1d Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0137.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0138.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0138.dat new file mode 100755 index 00000000..40797906 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0138.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0139.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0139.dat new file mode 100755 index 00000000..f076de65 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0139.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0140.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0140.dat new file mode 100755 index 00000000..07b7bf9a Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0140.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0141.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0141.dat new file mode 100755 index 00000000..22a8ca06 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0141.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0142.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0142.dat new file mode 100755 index 00000000..fa95449c Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0142.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0143.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0143.dat new file mode 100755 index 00000000..907d2de8 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0143.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0144.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0144.dat new file mode 100755 index 00000000..7f4c0914 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0144.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0145.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0145.dat new file mode 100755 index 00000000..b20f4aba Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0145.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0146.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0146.dat new file mode 100755 index 00000000..c04174bf Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0146.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0147.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0147.dat new file mode 100755 index 00000000..3c84c27a Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0147.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0148.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0148.dat new file mode 100755 index 00000000..e11058ce Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0148.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0149.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0149.dat new file mode 100755 index 00000000..a058ae23 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0149.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0150.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0150.dat new file mode 100755 index 00000000..64c12319 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0150.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0151.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0151.dat new file mode 100755 index 00000000..58b85ad5 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0151.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0152.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0152.dat new file mode 100755 index 00000000..4db244f3 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0152.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0153.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0153.dat new file mode 100755 index 00000000..bc275931 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0153.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0154.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0154.dat new file mode 100755 index 00000000..be5e0a4a Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0154.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0155.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0155.dat new file mode 100755 index 00000000..eaf5f968 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0155.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0156.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0156.dat new file mode 100755 index 00000000..8ac675fc Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0156.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0157.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0157.dat new file mode 100755 index 00000000..c742c47c Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0157.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0158.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0158.dat new file mode 100755 index 00000000..2998df47 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0158.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0159.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0159.dat new file mode 100755 index 00000000..87d68a41 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0159.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0160.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0160.dat new file mode 100755 index 00000000..668a3834 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0160.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0161.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0161.dat new file mode 100755 index 00000000..22968e03 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0161.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0162.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0162.dat new file mode 100755 index 00000000..cca9a818 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0162.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0163.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0163.dat new file mode 100755 index 00000000..2f62067c Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0163.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0164.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0164.dat new file mode 100755 index 00000000..a7f5981c Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0164.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0165.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0165.dat new file mode 100755 index 00000000..eb72edb7 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0165.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0166.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0166.dat new file mode 100755 index 00000000..c6baf33a Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0166.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0167.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0167.dat new file mode 100755 index 00000000..b10d7461 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0167.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0168.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0168.dat new file mode 100755 index 00000000..10293119 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0168.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0169.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0169.dat new file mode 100755 index 00000000..caf4906f Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0169.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0170.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0170.dat new file mode 100755 index 00000000..40beda0c Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0170.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0171.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0171.dat new file mode 100755 index 00000000..a3b06865 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0171.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0172.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0172.dat new file mode 100755 index 00000000..d10b1848 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0172.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0173.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0173.dat new file mode 100755 index 00000000..b9d784e4 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0173.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0174.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0174.dat new file mode 100755 index 00000000..0754a294 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0174.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0175.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0175.dat new file mode 100755 index 00000000..5c37de27 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0175.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0176.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0176.dat new file mode 100755 index 00000000..a189735f Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0176.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0177.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0177.dat new file mode 100755 index 00000000..bbb0311c Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0177.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0178.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0178.dat new file mode 100755 index 00000000..01ab4f4b Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0178.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0179.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0179.dat new file mode 100755 index 00000000..baa00b60 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0179.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0180.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0180.dat new file mode 100755 index 00000000..157703c7 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0180.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0181.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0181.dat new file mode 100755 index 00000000..2c08362b Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0181.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0182.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0182.dat new file mode 100755 index 00000000..935f5740 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0182.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0183.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0183.dat new file mode 100755 index 00000000..7f76afe5 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0183.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0184.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0184.dat new file mode 100755 index 00000000..2ccd7d4b Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0184.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0185.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0185.dat new file mode 100755 index 00000000..e6f94440 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0185.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0186.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0186.dat new file mode 100755 index 00000000..f89a5489 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0186.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0187.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0187.dat new file mode 100755 index 00000000..8b2326d5 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0187.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0188.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0188.dat new file mode 100755 index 00000000..be3ef386 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0188.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0189.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0189.dat new file mode 100755 index 00000000..01061cee Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0189.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0190.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0190.dat new file mode 100755 index 00000000..5df1d2e0 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0190.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0191.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0191.dat new file mode 100755 index 00000000..9b23e570 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0191.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0192.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0192.dat new file mode 100755 index 00000000..3e1b7309 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0192.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0193.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0193.dat new file mode 100755 index 00000000..1c538767 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0193.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0194.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0194.dat new file mode 100755 index 00000000..12e1e1f1 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0194.dat differ diff --git a/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0195.dat b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0195.dat new file mode 100755 index 00000000..b858c0e9 Binary files /dev/null and b/pitfall/pdfkit/node_modules/crypto-browserify/test/vectors/byte0195.dat differ diff --git a/pitfall/pdfkit/node_modules/css-parse/.npmignore b/pitfall/pdfkit/node_modules/css-parse/.npmignore new file mode 100644 index 00000000..4a3c398e --- /dev/null +++ b/pitfall/pdfkit/node_modules/css-parse/.npmignore @@ -0,0 +1,6 @@ +support +test +examples +*.sock +test.css +test.js diff --git a/pitfall/pdfkit/node_modules/css-parse/History.md b/pitfall/pdfkit/node_modules/css-parse/History.md new file mode 100644 index 00000000..5276aab4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/css-parse/History.md @@ -0,0 +1,30 @@ + +1.0.4 / 2012-09-17 +================== + + * fix keyframes float percentages + * fix an issue with comments containing slashes. + +1.0.3 / 2012-09-01 +================== + + * add component support + * fix unquoted data uris [rstacruz] + * fix keyframe names with no whitespace [rstacruz] + * fix excess semicolon support [rstacruz] + +1.0.2 / 2012-09-01 +================== + + * fix IE property hack support [rstacruz] + * fix quoted strings in declarations [rstacruz] + +1.0.1 / 2012-07-26 +================== + + * change "selector" to "selectors" array + +1.0.0 / 2010-01-03 +================== + + * Initial release diff --git a/pitfall/pdfkit/node_modules/css-parse/Makefile b/pitfall/pdfkit/node_modules/css-parse/Makefile new file mode 100644 index 00000000..4e9c8d36 --- /dev/null +++ b/pitfall/pdfkit/node_modules/css-parse/Makefile @@ -0,0 +1,7 @@ + +test: + @./node_modules/.bin/mocha \ + --require should \ + --reporter spec + +.PHONY: test \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/css-parse/Readme.md b/pitfall/pdfkit/node_modules/css-parse/Readme.md new file mode 100644 index 00000000..fde74a5b --- /dev/null +++ b/pitfall/pdfkit/node_modules/css-parse/Readme.md @@ -0,0 +1,62 @@ + +# css-parse + + CSS parser. + +## Example + +js: + +```js +var parse = require('css-parse') +parse('tobi { name: "tobi" }') +``` + +object returned: + +```json +{ + "stylesheet": { + "rules": [ + { + "selectors": ["tobi"], + "declarations": [ + { + "property": "name", + "value": "tobi" + } + ] + } + ] + } +} +``` + +## Performance + + Parsed 15,000 lines of CSS (2mb) in 40ms on my macbook air. + +## License + +(The MIT License) + +Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/css-parse/component.json b/pitfall/pdfkit/node_modules/css-parse/component.json new file mode 100644 index 00000000..234ebbea --- /dev/null +++ b/pitfall/pdfkit/node_modules/css-parse/component.json @@ -0,0 +1,8 @@ +{ + "name": "css-parse", + "repo": "visionmedia/node-css-parse", + "version": "1.0.3", + "description": "CSS parser", + "keywords": ["css", "parser", "stylesheet"], + "scripts": ["index.js"] +} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/css-parse/index.js b/pitfall/pdfkit/node_modules/css-parse/index.js new file mode 100644 index 00000000..3ed278fa --- /dev/null +++ b/pitfall/pdfkit/node_modules/css-parse/index.js @@ -0,0 +1,265 @@ + +module.exports = function(css){ + + /** + * Parse stylesheet. + */ + + function stylesheet() { + return { stylesheet: { rules: rules() }}; + } + + /** + * Opening brace. + */ + + function open() { + return match(/^{\s*/); + } + + /** + * Closing brace. + */ + + function close() { + return match(/^}\s*/); + } + + /** + * Parse ruleset. + */ + + function rules() { + var node; + var rules = []; + whitespace(); + comments(); + while (css[0] != '}' && (node = atrule() || rule())) { + comments(); + rules.push(node); + } + return rules; + } + + /** + * Match `re` and return captures. + */ + + function match(re) { + var m = re.exec(css); + if (!m) return; + css = css.slice(m[0].length); + return m; + } + + /** + * Parse whitespace. + */ + + function whitespace() { + match(/^\s*/); + } + + /** + * Parse comments; + */ + + function comments() { + while (comment()) ; + } + + /** + * Parse comment. + */ + + function comment() { + if ('/' == css[0] && '*' == css[1]) { + var i = 2; + while ('*' != css[i] || '/' != css[i + 1]) ++i; + i += 2; + css = css.slice(i); + whitespace(); + return true; + } + } + + /** + * Parse selector. + */ + + function selector() { + var m = match(/^([^{]+)/); + if (!m) return; + return m[0].trim().split(/\s*,\s*/); + } + + /** + * Parse declaration. + */ + + function declaration() { + // prop + var prop = match(/^(\*?[-\w]+)\s*/); + if (!prop) return; + prop = prop[0]; + + // : + if (!match(/^:\s*/)) return; + + // val + var val = match(/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^\)]*?\)|[^};])+)\s*/); + if (!val) return; + val = val[0].trim(); + + // ; + match(/^[;\s]*/); + + return { property: prop, value: val }; + } + + /** + * Parse keyframe. + */ + + function keyframe() { + var m; + var vals = []; + + while (m = match(/^(from|to|\d+%|\.\d+%|\d+\.\d+%)\s*/)) { + vals.push(m[1]); + match(/^,\s*/); + } + + if (!vals.length) return; + + return { + values: vals, + declarations: declarations() + }; + } + + /** + * Parse keyframes. + */ + + function keyframes() { + var m = match(/^@([-\w]+)?keyframes */); + if (!m) return; + var vendor = m[1]; + + // identifier + var m = match(/^([-\w]+)\s*/); + if (!m) return; + var name = m[1]; + + if (!open()) return; + comments(); + + var frame; + var frames = []; + while (frame = keyframe()) { + frames.push(frame); + comments(); + } + + if (!close()) return; + + return { + name: name, + vendor: vendor, + keyframes: frames + }; + } + + /** + * Parse media. + */ + + function media() { + var m = match(/^@media *([^{]+)/); + if (!m) return; + var media = m[1].trim(); + + if (!open()) return; + comments(); + + var style = rules(); + + if (!close()) return; + + return { media: media, rules: style }; + } + + /** + * Parse import + */ + + function atimport() { + return _atrule('import') + } + + /** + * Parse charset + */ + + function atcharset() { + return _atrule('charset'); + } + + /** + * Parse non-block at-rules + */ + + function _atrule(name) { + var m = match(new RegExp('^@' + name + ' *([^;\\n]+);\\s*')); + if (!m) return; + var ret = {} + ret[name] = m[1].trim(); + return ret; + } + + /** + * Parse declarations. + */ + + function declarations() { + var decls = []; + + if (!open()) return; + comments(); + + // declarations + var decl; + while (decl = declaration()) { + decls.push(decl); + comments(); + } + + if (!close()) return; + return decls; + } + + /** + * Parse at rule. + */ + + function atrule() { + return keyframes() + || media() + || atimport() + || atcharset(); + } + + /** + * Parse rule. + */ + + function rule() { + var sel = selector(); + if (!sel) return; + comments(); + return { selectors: sel, declarations: declarations() }; + } + + return stylesheet(); +}; diff --git a/pitfall/pdfkit/node_modules/css-parse/package.json b/pitfall/pdfkit/node_modules/css-parse/package.json new file mode 100644 index 00000000..990c21f4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/css-parse/package.json @@ -0,0 +1,74 @@ +{ + "_args": [ + [ + { + "raw": "css-parse@1.0.4", + "scope": null, + "escapedName": "css-parse", + "name": "css-parse", + "rawSpec": "1.0.4", + "spec": "1.0.4", + "type": "version" + }, + "/Users/MB/git/pdfkit/node_modules/css" + ] + ], + "_from": "css-parse@1.0.4", + "_id": "css-parse@1.0.4", + "_inCache": true, + "_location": "/css-parse", + "_npmUser": { + "name": "tjholowaychuk", + "email": "tj@vision-media.ca" + }, + "_npmVersion": "1.1.61", + "_phantomChildren": {}, + "_requested": { + "raw": "css-parse@1.0.4", + "scope": null, + "escapedName": "css-parse", + "name": "css-parse", + "rawSpec": "1.0.4", + "spec": "1.0.4", + "type": "version" + }, + "_requiredBy": [ + "/css" + ], + "_resolved": "https://registry.npmjs.org/css-parse/-/css-parse-1.0.4.tgz", + "_shasum": "38b0503fbf9da9f54e9c1dbda60e145c77117bdd", + "_shrinkwrap": null, + "_spec": "css-parse@1.0.4", + "_where": "/Users/MB/git/pdfkit/node_modules/css", + "author": { + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca" + }, + "dependencies": {}, + "description": "CSS parser", + "devDependencies": { + "mocha": "*", + "should": "*" + }, + "directories": {}, + "dist": { + "shasum": "38b0503fbf9da9f54e9c1dbda60e145c77117bdd", + "tarball": "https://registry.npmjs.org/css-parse/-/css-parse-1.0.4.tgz" + }, + "keywords": [ + "css", + "parser", + "stylesheet" + ], + "main": "index", + "maintainers": [ + { + "name": "tjholowaychuk", + "email": "tj@vision-media.ca" + } + ], + "name": "css-parse", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "version": "1.0.4" +} diff --git a/pitfall/pdfkit/node_modules/css-stringify/.npmignore b/pitfall/pdfkit/node_modules/css-stringify/.npmignore new file mode 100644 index 00000000..4a3c398e --- /dev/null +++ b/pitfall/pdfkit/node_modules/css-stringify/.npmignore @@ -0,0 +1,6 @@ +support +test +examples +*.sock +test.css +test.js diff --git a/pitfall/pdfkit/node_modules/css-stringify/History.md b/pitfall/pdfkit/node_modules/css-stringify/History.md new file mode 100644 index 00000000..a6ff960f --- /dev/null +++ b/pitfall/pdfkit/node_modules/css-stringify/History.md @@ -0,0 +1,30 @@ + +1.0.5 / 2013-03-15 +================== + + * fix indentation of multiple selectors in @media. Closes #11 + +1.0.4 / 2012-11-15 +================== + + * fix indentation + +1.0.3 / 2012-09-04 +================== + + * add __@charset__ support [rstacruz] + +1.0.2 / 2012-09-01 +================== + + * add component support + +1.0.1 / 2012-07-26 +================== + + * add "selectors" array support + +0.0.1 / 2010-01-03 +================== + + * Initial release diff --git a/pitfall/pdfkit/node_modules/css-stringify/Makefile b/pitfall/pdfkit/node_modules/css-stringify/Makefile new file mode 100644 index 00000000..4e9c8d36 --- /dev/null +++ b/pitfall/pdfkit/node_modules/css-stringify/Makefile @@ -0,0 +1,7 @@ + +test: + @./node_modules/.bin/mocha \ + --require should \ + --reporter spec + +.PHONY: test \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/css-stringify/Readme.md b/pitfall/pdfkit/node_modules/css-stringify/Readme.md new file mode 100644 index 00000000..a36e7803 --- /dev/null +++ b/pitfall/pdfkit/node_modules/css-stringify/Readme.md @@ -0,0 +1,33 @@ + +# css-stringify + + CSS compiler using the AST provided by [css-parse](https://github.com/visionmedia/css-parse). + +## Performance + + Formats 15,000 lines of CSS (2mb) in 23ms on my macbook air. + +## License + +(The MIT License) + +Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/css-stringify/component.json b/pitfall/pdfkit/node_modules/css-stringify/component.json new file mode 100644 index 00000000..259baef0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/css-stringify/component.json @@ -0,0 +1,8 @@ +{ + "name": "css-stringify", + "repo": "visionmedia/css-stringify", + "version": "1.0.5", + "description": "CSS compiler", + "keywords": ["css", "stringify", "stylesheet"], + "scripts": ["index.js"] +} diff --git a/pitfall/pdfkit/node_modules/css-stringify/index.js b/pitfall/pdfkit/node_modules/css-stringify/index.js new file mode 100644 index 00000000..f528e41e --- /dev/null +++ b/pitfall/pdfkit/node_modules/css-stringify/index.js @@ -0,0 +1,182 @@ + +/** + * Stringfy the given AST `node`. + * + * @param {Object} node + * @param {Object} options + * @return {String} + * @api public + */ + +module.exports = function(node, options){ + return new Compiler(options).compile(node); +}; + +/** + * Initialize a new `Compiler`. + */ + +function Compiler(options) { + options = options || {}; + this.compress = options.compress; + this.indentation = options.indent; +} + +/** + * Compile `node`. + */ + +Compiler.prototype.compile = function(node){ + return node.stylesheet.rules.map(this.visit, this) + .join(this.compress ? '' : '\n\n'); +}; + +/** + * Visit `node`. + */ + +Compiler.prototype.visit = function(node){ + if (node.charset) return this.charset(node); + if (node.keyframes) return this.keyframes(node); + if (node.media) return this.media(node); + if (node.import) return this.import(node); + return this.rule(node); +}; + +/** + * Visit import node. + */ + +Compiler.prototype.import = function(node){ + return '@import ' + node.import + ';'; +}; + +/** + * Visit media node. + */ + +Compiler.prototype.media = function(node){ + if (this.compress) { + return '@media ' + + node.media + + '{' + + node.rules.map(this.visit, this).join('') + + '}'; + } + + return '@media ' + + node.media + + ' {\n' + + this.indent(1) + + node.rules.map(this.visit, this).join('\n\n') + + this.indent(-1) + + '\n}'; +}; + +/** + * Visit charset node. + */ + +Compiler.prototype.charset = function(node){ + if (this.compress) { + return '@charset ' + node.charset + ';'; + } + + return '@charset ' + node.charset + ';\n'; +}; + +/** + * Visit keyframes node. + */ + +Compiler.prototype.keyframes = function(node){ + if (this.compress) { + return '@' + + (node.vendor || '') + + 'keyframes ' + + node.name + + '{' + + node.keyframes.map(this.keyframe, this).join('') + + '}'; + } + + return '@' + + (node.vendor || '') + + 'keyframes ' + + node.name + + ' {\n' + + this.indent(1) + + node.keyframes.map(this.keyframe, this).join('\n') + + this.indent(-1) + + '}'; +}; + +/** + * Visit keyframe node. + */ + +Compiler.prototype.keyframe = function(node){ + if (this.compress) { + return node.values.join(',') + + '{' + + node.declarations.map(this.declaration, this).join(';') + + '}'; + } + + return this.indent() + + node.values.join(', ') + + ' {\n' + + this.indent(1) + + node.declarations.map(this.declaration, this).join(';\n') + + this.indent(-1) + + '\n' + this.indent() + '}\n'; +}; + +/** + * Visit rule node. + */ + +Compiler.prototype.rule = function(node){ + var indent = this.indent(); + + if (this.compress) { + return node.selectors.join(',') + + '{' + + node.declarations.map(this.declaration, this).join(';') + + '}'; + } + + return node.selectors.map(function(s){ return indent + s }).join(',\n') + + ' {\n' + + this.indent(1) + + node.declarations.map(this.declaration, this).join(';\n') + + this.indent(-1) + + '\n' + this.indent() + '}'; +}; + +/** + * Visit declaration node. + */ + +Compiler.prototype.declaration = function(node){ + if (this.compress) { + return node.property + ':' + node.value; + } + + return this.indent() + node.property + ': ' + node.value; +}; + +/** + * Increase, decrease or return current indentation. + */ + +Compiler.prototype.indent = function(level) { + this.level = this.level || 1; + + if (null != level) { + this.level += level; + return ''; + } + + return Array(this.level).join(this.indentation || ' '); +}; diff --git a/pitfall/pdfkit/node_modules/css-stringify/package.json b/pitfall/pdfkit/node_modules/css-stringify/package.json new file mode 100644 index 00000000..65ca2557 --- /dev/null +++ b/pitfall/pdfkit/node_modules/css-stringify/package.json @@ -0,0 +1,75 @@ +{ + "_args": [ + [ + { + "raw": "css-stringify@1.0.5", + "scope": null, + "escapedName": "css-stringify", + "name": "css-stringify", + "rawSpec": "1.0.5", + "spec": "1.0.5", + "type": "version" + }, + "/Users/MB/git/pdfkit/node_modules/css" + ] + ], + "_from": "css-stringify@1.0.5", + "_id": "css-stringify@1.0.5", + "_inCache": true, + "_location": "/css-stringify", + "_npmUser": { + "name": "tjholowaychuk", + "email": "tj@vision-media.ca" + }, + "_npmVersion": "1.2.14", + "_phantomChildren": {}, + "_requested": { + "raw": "css-stringify@1.0.5", + "scope": null, + "escapedName": "css-stringify", + "name": "css-stringify", + "rawSpec": "1.0.5", + "spec": "1.0.5", + "type": "version" + }, + "_requiredBy": [ + "/css" + ], + "_resolved": "https://registry.npmjs.org/css-stringify/-/css-stringify-1.0.5.tgz", + "_shasum": "b0d042946db2953bb9d292900a6cb5f6d0122031", + "_shrinkwrap": null, + "_spec": "css-stringify@1.0.5", + "_where": "/Users/MB/git/pdfkit/node_modules/css", + "author": { + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca" + }, + "dependencies": {}, + "description": "CSS compiler", + "devDependencies": { + "css-parse": "1.0.3", + "mocha": "*", + "should": "*" + }, + "directories": {}, + "dist": { + "shasum": "b0d042946db2953bb9d292900a6cb5f6d0122031", + "tarball": "https://registry.npmjs.org/css-stringify/-/css-stringify-1.0.5.tgz" + }, + "keywords": [ + "css", + "stringify", + "stylesheet" + ], + "main": "index", + "maintainers": [ + { + "name": "tjholowaychuk", + "email": "tj@vision-media.ca" + } + ], + "name": "css-stringify", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "version": "1.0.5" +} diff --git a/pitfall/pdfkit/node_modules/css/.npmignore b/pitfall/pdfkit/node_modules/css/.npmignore new file mode 100644 index 00000000..f1250e58 --- /dev/null +++ b/pitfall/pdfkit/node_modules/css/.npmignore @@ -0,0 +1,4 @@ +support +test +examples +*.sock diff --git a/pitfall/pdfkit/node_modules/css/History.md b/pitfall/pdfkit/node_modules/css/History.md new file mode 100644 index 00000000..93b15c2f --- /dev/null +++ b/pitfall/pdfkit/node_modules/css/History.md @@ -0,0 +1,20 @@ + +1.0.7 / 2012-11-21 +================== + + * fix component.json + +1.0.4 / 2012-11-15 +================== + + * update css-stringify + +1.0.3 / 2012-09-01 +================== + + * add component support + +0.0.1 / 2010-01-03 +================== + + * Initial release diff --git a/pitfall/pdfkit/node_modules/css/Makefile b/pitfall/pdfkit/node_modules/css/Makefile new file mode 100644 index 00000000..f13b4a78 --- /dev/null +++ b/pitfall/pdfkit/node_modules/css/Makefile @@ -0,0 +1,8 @@ + +test: + @node test + +benchmark: + @node benchmark + +.PHONY: test benchmark \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/css/Readme.md b/pitfall/pdfkit/node_modules/css/Readme.md new file mode 100644 index 00000000..cf578dfe --- /dev/null +++ b/pitfall/pdfkit/node_modules/css/Readme.md @@ -0,0 +1,77 @@ + +# css + + CSS parser / stringifier using [css-parse](https://github.com/visionmedia/css-parse) and [css-stringify](https://github.com/visionmedia/css-stringify). + +## Installation + + $ npm install css + +## Example + +js: + +```js +var css = require('css') +var obj = css.parse('tobi { name: "tobi" }') +css.stringify(obj); +``` + +object returned by `.parse()`: + +```json +{ + "stylesheet": { + "rules": [ + { + "selector": "tobi", + "declarations": [ + { + "property": "name", + "value": "tobi" + } + ] + } + ] + } +} +``` + +string returned by `.stringify(ast)`: + +```css +tobi { + name: tobi; +} +``` + +string returned by `.stringify(ast, { compress: true })`: + +```css +tobi{name:tobi} +``` + +## License + +(The MIT License) + +Copyright (c) 2012 TJ Holowaychuk <tj@vision-media.ca> + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/css/benchmark.js b/pitfall/pdfkit/node_modules/css/benchmark.js new file mode 100644 index 00000000..dec711dc --- /dev/null +++ b/pitfall/pdfkit/node_modules/css/benchmark.js @@ -0,0 +1,36 @@ + +var css = require('./') + , fs = require('fs') + , read = fs.readFileSync + , str = read('examples/ui.css', 'utf8'); + +var n = 5000; +var ops = 200; +var t = process.hrtime(t); +var results = []; + +while (n--) { + css.stringify(css.parse(str)); + if (n % ops == 0) { + t = process.hrtime(t); + var ms = t[1] / 1000 / 1000; + var persec = (ops * (1000 / ms) | 0); + results.push(persec); + process.stdout.write('\r [' + persec + ' ops/s] [' + n + ']'); + t = process.hrtime(); + } +} + +function sum(arr) { + return arr.reduce(function(sum, n){ + return sum + n; + }); +} + +function mean(arr) { + return sum(arr) / arr.length | 0; +} + +console.log(); +console.log(' avg: %d ops/s', mean(results)); +console.log(' size: %d kb', (str.length / 1024).toFixed(2)); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/css/component.json b/pitfall/pdfkit/node_modules/css/component.json new file mode 100644 index 00000000..27691659 --- /dev/null +++ b/pitfall/pdfkit/node_modules/css/component.json @@ -0,0 +1,13 @@ +{ + "name": "css", + "version": "1.0.8", + "description": "CSS parser / stringifier using css-parse and css-stringify", + "keywords": ["css", "parser", "stylesheet"], + "dependencies": { + "visionmedia/css-parse": "*", + "visionmedia/css-stringify": "*" + }, + "scripts": [ + "index.js" + ] +} diff --git a/pitfall/pdfkit/node_modules/css/index.js b/pitfall/pdfkit/node_modules/css/index.js new file mode 100644 index 00000000..19ec91a1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/css/index.js @@ -0,0 +1,3 @@ + +exports.parse = require('css-parse'); +exports.stringify = require('css-stringify'); diff --git a/pitfall/pdfkit/node_modules/css/package.json b/pitfall/pdfkit/node_modules/css/package.json new file mode 100644 index 00000000..674ac761 --- /dev/null +++ b/pitfall/pdfkit/node_modules/css/package.json @@ -0,0 +1,74 @@ +{ + "_args": [ + [ + { + "raw": "css@~1.0.8", + "scope": null, + "escapedName": "css", + "name": "css", + "rawSpec": "~1.0.8", + "spec": ">=1.0.8 <1.1.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/transformers" + ] + ], + "_from": "css@>=1.0.8 <1.1.0", + "_id": "css@1.0.8", + "_inCache": true, + "_location": "/css", + "_npmUser": { + "name": "tjholowaychuk", + "email": "tj@vision-media.ca" + }, + "_npmVersion": "1.2.14", + "_phantomChildren": {}, + "_requested": { + "raw": "css@~1.0.8", + "scope": null, + "escapedName": "css", + "name": "css", + "rawSpec": "~1.0.8", + "spec": ">=1.0.8 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "/transformers" + ], + "_resolved": "https://registry.npmjs.org/css/-/css-1.0.8.tgz", + "_shasum": "9386811ca82bccc9ee7fb5a732b1e2a317c8a3e7", + "_shrinkwrap": null, + "_spec": "css@~1.0.8", + "_where": "/Users/MB/git/pdfkit/node_modules/transformers", + "author": { + "name": "TJ Holowaychuk", + "email": "tj@vision-media.ca" + }, + "dependencies": { + "css-parse": "1.0.4", + "css-stringify": "1.0.5" + }, + "description": "CSS parser / stringifier using css-parse and css-stringify", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "9386811ca82bccc9ee7fb5a732b1e2a317c8a3e7", + "tarball": "https://registry.npmjs.org/css/-/css-1.0.8.tgz" + }, + "keywords": [ + "css", + "parser", + "stylesheet" + ], + "main": "index", + "maintainers": [ + { + "name": "tjholowaychuk", + "email": "tj@vision-media.ca" + } + ], + "name": "css", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "version": "1.0.8" +} diff --git a/pitfall/pdfkit/node_modules/css/test.js b/pitfall/pdfkit/node_modules/css/test.js new file mode 100644 index 00000000..3e1b4d3f --- /dev/null +++ b/pitfall/pdfkit/node_modules/css/test.js @@ -0,0 +1,6 @@ + +var css = require('./') + , assert = require('assert'); + +assert(css.parse); +assert(css.stringify); diff --git a/pitfall/pdfkit/node_modules/decamelize/index.js b/pitfall/pdfkit/node_modules/decamelize/index.js new file mode 100644 index 00000000..8d5bab7e --- /dev/null +++ b/pitfall/pdfkit/node_modules/decamelize/index.js @@ -0,0 +1,13 @@ +'use strict'; +module.exports = function (str, sep) { + if (typeof str !== 'string') { + throw new TypeError('Expected a string'); + } + + sep = typeof sep === 'undefined' ? '_' : sep; + + return str + .replace(/([a-z\d])([A-Z])/g, '$1' + sep + '$2') + .replace(/([A-Z]+)([A-Z][a-z\d]+)/g, '$1' + sep + '$2') + .toLowerCase(); +}; diff --git a/pitfall/pdfkit/node_modules/decamelize/license b/pitfall/pdfkit/node_modules/decamelize/license new file mode 100644 index 00000000..654d0bfe --- /dev/null +++ b/pitfall/pdfkit/node_modules/decamelize/license @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/decamelize/package.json b/pitfall/pdfkit/node_modules/decamelize/package.json new file mode 100644 index 00000000..5b4f655b --- /dev/null +++ b/pitfall/pdfkit/node_modules/decamelize/package.json @@ -0,0 +1,106 @@ +{ + "_args": [ + [ + { + "raw": "decamelize@^1.0.0", + "scope": null, + "escapedName": "decamelize", + "name": "decamelize", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/yargs" + ] + ], + "_from": "decamelize@>=1.0.0 <2.0.0", + "_id": "decamelize@1.2.0", + "_inCache": true, + "_location": "/decamelize", + "_nodeVersion": "4.3.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/decamelize-1.2.0.tgz_1457167749082_0.9810893186368048" + }, + "_npmUser": { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + }, + "_npmVersion": "3.8.0", + "_phantomChildren": {}, + "_requested": { + "raw": "decamelize@^1.0.0", + "scope": null, + "escapedName": "decamelize", + "name": "decamelize", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/yargs" + ], + "_resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "_shasum": "f6534d15148269b20352e7bee26f501f9a191290", + "_shrinkwrap": null, + "_spec": "decamelize@^1.0.0", + "_where": "/Users/MB/git/pdfkit/node_modules/yargs", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "bugs": { + "url": "https://github.com/sindresorhus/decamelize/issues" + }, + "dependencies": {}, + "description": "Convert a camelized string into a lowercased one with a custom separator: unicornRainbow → unicorn_rainbow", + "devDependencies": { + "ava": "*", + "xo": "*" + }, + "directories": {}, + "dist": { + "shasum": "f6534d15148269b20352e7bee26f501f9a191290", + "tarball": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "files": [ + "index.js" + ], + "gitHead": "95980ab6fb44c40eaca7792bdf93aff7c210c805", + "homepage": "https://github.com/sindresorhus/decamelize#readme", + "keywords": [ + "decamelize", + "decamelcase", + "camelcase", + "lowercase", + "case", + "dash", + "hyphen", + "string", + "str", + "text", + "convert" + ], + "license": "MIT", + "maintainers": [ + { + "name": "sindresorhus", + "email": "sindresorhus@gmail.com" + } + ], + "name": "decamelize", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/sindresorhus/decamelize.git" + }, + "scripts": { + "test": "xo && ava" + }, + "version": "1.2.0" +} diff --git a/pitfall/pdfkit/node_modules/decamelize/readme.md b/pitfall/pdfkit/node_modules/decamelize/readme.md new file mode 100644 index 00000000..624c7ee5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/decamelize/readme.md @@ -0,0 +1,48 @@ +# decamelize [![Build Status](https://travis-ci.org/sindresorhus/decamelize.svg?branch=master)](https://travis-ci.org/sindresorhus/decamelize) + +> Convert a camelized string into a lowercased one with a custom separator
    +> Example: `unicornRainbow` → `unicorn_rainbow` + + +## Install + +``` +$ npm install --save decamelize +``` + + +## Usage + +```js +const decamelize = require('decamelize'); + +decamelize('unicornRainbow'); +//=> 'unicorn_rainbow' + +decamelize('unicornRainbow', '-'); +//=> 'unicorn-rainbow' +``` + + +## API + +### decamelize(input, [separator]) + +#### input + +Type: `string` + +#### separator + +Type: `string`
    +Default: `_` + + +## Related + +See [`camelcase`](https://github.com/sindresorhus/camelcase) for the inverse. + + +## License + +MIT © [Sindre Sorhus](https://sindresorhus.com) diff --git a/pitfall/pdfkit/node_modules/deep-equal/.travis.yml b/pitfall/pdfkit/node_modules/deep-equal/.travis.yml new file mode 100644 index 00000000..4af02b3d --- /dev/null +++ b/pitfall/pdfkit/node_modules/deep-equal/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +node_js: + - '0.8' + - '0.10' + - '0.12' + - 'iojs' +before_install: + - npm install -g npm@latest diff --git a/pitfall/pdfkit/node_modules/deep-equal/LICENSE b/pitfall/pdfkit/node_modules/deep-equal/LICENSE new file mode 100644 index 00000000..ee27ba4b --- /dev/null +++ b/pitfall/pdfkit/node_modules/deep-equal/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/deep-equal/example/cmp.js b/pitfall/pdfkit/node_modules/deep-equal/example/cmp.js new file mode 100644 index 00000000..67014b88 --- /dev/null +++ b/pitfall/pdfkit/node_modules/deep-equal/example/cmp.js @@ -0,0 +1,11 @@ +var equal = require('../'); +console.dir([ + equal( + { a : [ 2, 3 ], b : [ 4 ] }, + { a : [ 2, 3 ], b : [ 4 ] } + ), + equal( + { x : 5, y : [6] }, + { x : 5, y : 6 } + ) +]); diff --git a/pitfall/pdfkit/node_modules/deep-equal/index.js b/pitfall/pdfkit/node_modules/deep-equal/index.js new file mode 100644 index 00000000..0772f8c7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/deep-equal/index.js @@ -0,0 +1,94 @@ +var pSlice = Array.prototype.slice; +var objectKeys = require('./lib/keys.js'); +var isArguments = require('./lib/is_arguments.js'); + +var deepEqual = module.exports = function (actual, expected, opts) { + if (!opts) opts = {}; + // 7.1. All identical values are equivalent, as determined by ===. + if (actual === expected) { + return true; + + } else if (actual instanceof Date && expected instanceof Date) { + return actual.getTime() === expected.getTime(); + + // 7.3. Other pairs that do not both pass typeof value == 'object', + // equivalence is determined by ==. + } else if (!actual || !expected || typeof actual != 'object' && typeof expected != 'object') { + return opts.strict ? actual === expected : actual == expected; + + // 7.4. For all other Object pairs, including Array objects, equivalence is + // determined by having the same number of owned properties (as verified + // with Object.prototype.hasOwnProperty.call), the same set of keys + // (although not necessarily the same order), equivalent values for every + // corresponding key, and an identical 'prototype' property. Note: this + // accounts for both named and indexed properties on Arrays. + } else { + return objEquiv(actual, expected, opts); + } +} + +function isUndefinedOrNull(value) { + return value === null || value === undefined; +} + +function isBuffer (x) { + if (!x || typeof x !== 'object' || typeof x.length !== 'number') return false; + if (typeof x.copy !== 'function' || typeof x.slice !== 'function') { + return false; + } + if (x.length > 0 && typeof x[0] !== 'number') return false; + return true; +} + +function objEquiv(a, b, opts) { + var i, key; + if (isUndefinedOrNull(a) || isUndefinedOrNull(b)) + return false; + // an identical 'prototype' property. + if (a.prototype !== b.prototype) return false; + //~~~I've managed to break Object.keys through screwy arguments passing. + // Converting to array solves the problem. + if (isArguments(a)) { + if (!isArguments(b)) { + return false; + } + a = pSlice.call(a); + b = pSlice.call(b); + return deepEqual(a, b, opts); + } + if (isBuffer(a)) { + if (!isBuffer(b)) { + return false; + } + if (a.length !== b.length) return false; + for (i = 0; i < a.length; i++) { + if (a[i] !== b[i]) return false; + } + return true; + } + try { + var ka = objectKeys(a), + kb = objectKeys(b); + } catch (e) {//happens when one is a string literal and the other isn't + return false; + } + // having the same number of owned properties (keys incorporates + // hasOwnProperty) + if (ka.length != kb.length) + return false; + //the same set of keys (although not necessarily the same order), + ka.sort(); + kb.sort(); + //~~~cheap key test + for (i = ka.length - 1; i >= 0; i--) { + if (ka[i] != kb[i]) + return false; + } + //equivalent values for every corresponding key, and + //~~~possibly expensive deep test + for (i = ka.length - 1; i >= 0; i--) { + key = ka[i]; + if (!deepEqual(a[key], b[key], opts)) return false; + } + return typeof a === typeof b; +} diff --git a/pitfall/pdfkit/node_modules/deep-equal/lib/is_arguments.js b/pitfall/pdfkit/node_modules/deep-equal/lib/is_arguments.js new file mode 100644 index 00000000..1ff150fc --- /dev/null +++ b/pitfall/pdfkit/node_modules/deep-equal/lib/is_arguments.js @@ -0,0 +1,20 @@ +var supportsArgumentsClass = (function(){ + return Object.prototype.toString.call(arguments) +})() == '[object Arguments]'; + +exports = module.exports = supportsArgumentsClass ? supported : unsupported; + +exports.supported = supported; +function supported(object) { + return Object.prototype.toString.call(object) == '[object Arguments]'; +}; + +exports.unsupported = unsupported; +function unsupported(object){ + return object && + typeof object == 'object' && + typeof object.length == 'number' && + Object.prototype.hasOwnProperty.call(object, 'callee') && + !Object.prototype.propertyIsEnumerable.call(object, 'callee') || + false; +}; diff --git a/pitfall/pdfkit/node_modules/deep-equal/lib/keys.js b/pitfall/pdfkit/node_modules/deep-equal/lib/keys.js new file mode 100644 index 00000000..13af263f --- /dev/null +++ b/pitfall/pdfkit/node_modules/deep-equal/lib/keys.js @@ -0,0 +1,9 @@ +exports = module.exports = typeof Object.keys === 'function' + ? Object.keys : shim; + +exports.shim = shim; +function shim (obj) { + var keys = []; + for (var key in obj) keys.push(key); + return keys; +} diff --git a/pitfall/pdfkit/node_modules/deep-equal/package.json b/pitfall/pdfkit/node_modules/deep-equal/package.json new file mode 100644 index 00000000..8064e182 --- /dev/null +++ b/pitfall/pdfkit/node_modules/deep-equal/package.json @@ -0,0 +1,118 @@ +{ + "_args": [ + [ + { + "raw": "deep-equal@^1.0.0", + "scope": null, + "escapedName": "deep-equal", + "name": "deep-equal", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/fontkit" + ] + ], + "_from": "deep-equal@>=1.0.0 <2.0.0", + "_id": "deep-equal@1.0.1", + "_inCache": true, + "_location": "/deep-equal", + "_nodeVersion": "2.4.0", + "_npmUser": { + "name": "substack", + "email": "substack@gmail.com" + }, + "_npmVersion": "3.2.2", + "_phantomChildren": {}, + "_requested": { + "raw": "deep-equal@^1.0.0", + "scope": null, + "escapedName": "deep-equal", + "name": "deep-equal", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fontkit" + ], + "_resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", + "_shasum": "f5d260292b660e084eff4cdbc9f08ad3247448b5", + "_shrinkwrap": null, + "_spec": "deep-equal@^1.0.0", + "_where": "/Users/MB/git/pdfkit/node_modules/fontkit", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/substack/node-deep-equal/issues" + }, + "dependencies": {}, + "description": "node's assert.deepEqual algorithm", + "devDependencies": { + "tape": "^3.5.0" + }, + "directories": { + "lib": ".", + "example": "example", + "test": "test" + }, + "dist": { + "shasum": "f5d260292b660e084eff4cdbc9f08ad3247448b5", + "tarball": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz" + }, + "gitHead": "59c511f5aeae19e3dd1de054077a789d7302be34", + "homepage": "https://github.com/substack/node-deep-equal#readme", + "keywords": [ + "equality", + "equal", + "compare" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "name": "deep-equal", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/substack/node-deep-equal.git" + }, + "scripts": { + "test": "tape test/*.js" + }, + "testling": { + "files": "test/*.js", + "browsers": { + "ie": [ + 6, + 7, + 8, + 9 + ], + "ff": [ + 3.5, + 10, + 15 + ], + "chrome": [ + 10, + 22 + ], + "safari": [ + 5.1 + ], + "opera": [ + 12 + ] + } + }, + "version": "1.0.1" +} diff --git a/pitfall/pdfkit/node_modules/deep-equal/readme.markdown b/pitfall/pdfkit/node_modules/deep-equal/readme.markdown new file mode 100644 index 00000000..f489c2a3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/deep-equal/readme.markdown @@ -0,0 +1,61 @@ +# deep-equal + +Node's `assert.deepEqual() algorithm` as a standalone module. + +This module is around [5 times faster](https://gist.github.com/2790507) +than wrapping `assert.deepEqual()` in a `try/catch`. + +[![browser support](https://ci.testling.com/substack/node-deep-equal.png)](https://ci.testling.com/substack/node-deep-equal) + +[![build status](https://secure.travis-ci.org/substack/node-deep-equal.png)](https://travis-ci.org/substack/node-deep-equal) + +# example + +``` js +var equal = require('deep-equal'); +console.dir([ + equal( + { a : [ 2, 3 ], b : [ 4 ] }, + { a : [ 2, 3 ], b : [ 4 ] } + ), + equal( + { x : 5, y : [6] }, + { x : 5, y : 6 } + ) +]); +``` + +# methods + +``` js +var deepEqual = require('deep-equal') +``` + +## deepEqual(a, b, opts) + +Compare objects `a` and `b`, returning whether they are equal according to a +recursive equality algorithm. + +If `opts.strict` is `true`, use strict equality (`===`) to compare leaf nodes. +The default is to use coercive equality (`==`) because that's how +`assert.deepEqual()` works by default. + +# install + +With [npm](http://npmjs.org) do: + +``` +npm install deep-equal +``` + +# test + +With [npm](http://npmjs.org) do: + +``` +npm test +``` + +# license + +MIT. Derived largely from node's assert module. diff --git a/pitfall/pdfkit/node_modules/deep-equal/test/cmp.js b/pitfall/pdfkit/node_modules/deep-equal/test/cmp.js new file mode 100644 index 00000000..2aab5f96 --- /dev/null +++ b/pitfall/pdfkit/node_modules/deep-equal/test/cmp.js @@ -0,0 +1,95 @@ +var test = require('tape'); +var equal = require('../'); +var isArguments = require('../lib/is_arguments.js'); +var objectKeys = require('../lib/keys.js'); + +test('equal', function (t) { + t.ok(equal( + { a : [ 2, 3 ], b : [ 4 ] }, + { a : [ 2, 3 ], b : [ 4 ] } + )); + t.end(); +}); + +test('not equal', function (t) { + t.notOk(equal( + { x : 5, y : [6] }, + { x : 5, y : 6 } + )); + t.end(); +}); + +test('nested nulls', function (t) { + t.ok(equal([ null, null, null ], [ null, null, null ])); + t.end(); +}); + +test('strict equal', function (t) { + t.notOk(equal( + [ { a: 3 }, { b: 4 } ], + [ { a: '3' }, { b: '4' } ], + { strict: true } + )); + t.end(); +}); + +test('non-objects', function (t) { + t.ok(equal(3, 3)); + t.ok(equal('beep', 'beep')); + t.ok(equal('3', 3)); + t.notOk(equal('3', 3, { strict: true })); + t.notOk(equal('3', [3])); + t.end(); +}); + +test('arguments class', function (t) { + t.ok(equal( + (function(){return arguments})(1,2,3), + (function(){return arguments})(1,2,3), + "compares arguments" + )); + t.notOk(equal( + (function(){return arguments})(1,2,3), + [1,2,3], + "differenciates array and arguments" + )); + t.end(); +}); + +test('test the arguments shim', function (t) { + t.ok(isArguments.supported((function(){return arguments})())); + t.notOk(isArguments.supported([1,2,3])); + + t.ok(isArguments.unsupported((function(){return arguments})())); + t.notOk(isArguments.unsupported([1,2,3])); + + t.end(); +}); + +test('test the keys shim', function (t) { + t.deepEqual(objectKeys.shim({ a: 1, b : 2 }), [ 'a', 'b' ]); + t.end(); +}); + +test('dates', function (t) { + var d0 = new Date(1387585278000); + var d1 = new Date('Fri Dec 20 2013 16:21:18 GMT-0800 (PST)'); + t.ok(equal(d0, d1)); + t.end(); +}); + +test('buffers', function (t) { + t.ok(equal(Buffer('xyz'), Buffer('xyz'))); + t.end(); +}); + +test('booleans and arrays', function (t) { + t.notOk(equal(true, [])); + t.end(); +}) + +test('null == undefined', function (t) { + t.ok(equal(null, undefined)) + t.notOk(equal(null, undefined, { strict: true })) + t.end() +}) diff --git a/pitfall/pdfkit/node_modules/defined/.travis.yml b/pitfall/pdfkit/node_modules/defined/.travis.yml new file mode 100644 index 00000000..895dbd36 --- /dev/null +++ b/pitfall/pdfkit/node_modules/defined/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.6 + - 0.8 diff --git a/pitfall/pdfkit/node_modules/defined/LICENSE b/pitfall/pdfkit/node_modules/defined/LICENSE new file mode 100644 index 00000000..ee27ba4b --- /dev/null +++ b/pitfall/pdfkit/node_modules/defined/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/defined/example/defined.js b/pitfall/pdfkit/node_modules/defined/example/defined.js new file mode 100644 index 00000000..7b5d982f --- /dev/null +++ b/pitfall/pdfkit/node_modules/defined/example/defined.js @@ -0,0 +1,4 @@ +var defined = require('../'); +var opts = { y : false, w : 4 }; +var x = defined(opts.x, opts.y, opts.w, 8); +console.log(x); diff --git a/pitfall/pdfkit/node_modules/defined/index.js b/pitfall/pdfkit/node_modules/defined/index.js new file mode 100644 index 00000000..f8a22198 --- /dev/null +++ b/pitfall/pdfkit/node_modules/defined/index.js @@ -0,0 +1,5 @@ +module.exports = function () { + for (var i = 0; i < arguments.length; i++) { + if (arguments[i] !== undefined) return arguments[i]; + } +}; diff --git a/pitfall/pdfkit/node_modules/defined/package.json b/pitfall/pdfkit/node_modules/defined/package.json new file mode 100644 index 00000000..396995e5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/defined/package.json @@ -0,0 +1,93 @@ +{ + "_args": [ + [ + { + "raw": "defined@~0.0.0", + "scope": null, + "escapedName": "defined", + "name": "defined", + "rawSpec": "~0.0.0", + "spec": ">=0.0.0 <0.1.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/browserify" + ] + ], + "_from": "defined@>=0.0.0 <0.1.0", + "_id": "defined@0.0.0", + "_inCache": true, + "_location": "/defined", + "_npmUser": { + "name": "substack", + "email": "mail@substack.net" + }, + "_npmVersion": "1.1.59", + "_phantomChildren": {}, + "_requested": { + "raw": "defined@~0.0.0", + "scope": null, + "escapedName": "defined", + "name": "defined", + "rawSpec": "~0.0.0", + "spec": ">=0.0.0 <0.1.0", + "type": "range" + }, + "_requiredBy": [ + "/browserify" + ], + "_resolved": "https://registry.npmjs.org/defined/-/defined-0.0.0.tgz", + "_shasum": "f35eea7d705e933baf13b2f03b3f83d921403b3e", + "_shrinkwrap": null, + "_spec": "defined@~0.0.0", + "_where": "/Users/MB/git/pdfkit/node_modules/browserify", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/substack/defined/issues" + }, + "dependencies": {}, + "description": "return the first argument that is `!== undefined`", + "devDependencies": { + "tap": "~0.3.0", + "tape": "~0.0.2" + }, + "directories": { + "example": "example", + "test": "test" + }, + "dist": { + "shasum": "f35eea7d705e933baf13b2f03b3f83d921403b3e", + "tarball": "https://registry.npmjs.org/defined/-/defined-0.0.0.tgz" + }, + "homepage": "https://github.com/substack/defined", + "keywords": [ + "undefined", + "short-circuit", + "||", + "or", + "//", + "defined-or" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "name": "defined", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/substack/defined.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "0.0.0" +} diff --git a/pitfall/pdfkit/node_modules/defined/readme.markdown b/pitfall/pdfkit/node_modules/defined/readme.markdown new file mode 100644 index 00000000..2280351f --- /dev/null +++ b/pitfall/pdfkit/node_modules/defined/readme.markdown @@ -0,0 +1,51 @@ +# defined + +return the first argument that is `!== undefined` + +[![build status](https://secure.travis-ci.org/substack/defined.png)](http://travis-ci.org/substack/defined) + +Most of the time when I chain together `||`s, I actually just want the first +item that is not `undefined`, not the first non-falsy item. + +This module is like the defined-or (`//`) operator in perl 5.10+. + +# example + +``` js +var defined = require('defined'); +var opts = { y : false, w : 4 }; +var x = defined(opts.x, opts.y, opts.w, 100); +console.log(x); +``` + +``` +$ node example/defined.js +false +``` + +The return value is `false` because `false` is the first item that is +`!== undefined`. + +# methods + +``` js +var defined = require('defined') +``` + +## var x = defined(a, b, c...) + +Return the first item in the argument list `a, b, c...` that is `!== undefined`. + +If all the items are `=== undefined`, return undefined. + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install defined +``` + +# license + +MIT diff --git a/pitfall/pdfkit/node_modules/defined/test/def.js b/pitfall/pdfkit/node_modules/defined/test/def.js new file mode 100644 index 00000000..48da5171 --- /dev/null +++ b/pitfall/pdfkit/node_modules/defined/test/def.js @@ -0,0 +1,22 @@ +var defined = require('../'); +var test = require('tape'); + +test('defined-or', function (t) { + var u = undefined; + + t.equal(defined(), u, 'empty arguments'); + t.equal(defined(u), u, '1 undefined'); + t.equal(defined(u, u), u, '2 undefined'); + t.equal(defined(u, u, u, u), u, '4 undefineds'); + + t.equal(defined(undefined, false, true), false, 'false[0]'); + t.equal(defined(false, true), false, 'false[1]'); + t.equal(defined(undefined, 0, true), 0, 'zero[0]'); + t.equal(defined(0, true), 0, 'zero[1]'); + + t.equal(defined(3, undefined, 4), 3, 'first arg'); + t.equal(defined(undefined, 3, 4), 3, 'second arg'); + t.equal(defined(undefined, undefined, 3), 3, 'third arg'); + + t.end(); +}); diff --git a/pitfall/pdfkit/node_modules/deps-sort/LICENSE b/pitfall/pdfkit/node_modules/deps-sort/LICENSE new file mode 100644 index 00000000..ee27ba4b --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/deps-sort/bin/cmd.js b/pitfall/pdfkit/node_modules/deps-sort/bin/cmd.js new file mode 100755 index 00000000..002e85e7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/bin/cmd.js @@ -0,0 +1,10 @@ +#!/usr/bin/env node + +var argv = require('minimist')(process.argv.slice(2)); +var JSONStream = require('JSONStream'); + +var sort = require('../')(argv); +var parse = JSONStream.parse([ true ]); +var stringify = JSONStream.stringify(); + +process.stdin.pipe(parse).pipe(sort).pipe(stringify).pipe(process.stdout); diff --git a/pitfall/pdfkit/node_modules/deps-sort/example/sort.js b/pitfall/pdfkit/node_modules/deps-sort/example/sort.js new file mode 100644 index 00000000..cfc00754 --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/example/sort.js @@ -0,0 +1,6 @@ +var sort = require('../')(); +var JSONStream = require('JSONStream'); +var parse = JSONStream.parse([ true ]); +var stringify = JSONStream.stringify(); + +process.stdin.pipe(parse).pipe(sort).pipe(stringify).pipe(process.stdout); diff --git a/pitfall/pdfkit/node_modules/deps-sort/index.js b/pitfall/pdfkit/node_modules/deps-sort/index.js new file mode 100644 index 00000000..d0107170 --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/index.js @@ -0,0 +1,40 @@ +var through = require('through'); + +module.exports = function (opts) { + if (!opts) opts = {}; + + var rows = []; + return through(write, end); + + function write (row) { rows.push(row) } + + function end () { + var tr = this; + rows.sort(cmp); + + if (opts.index) { + var index = {}; + rows.forEach(function (row, ix) { + row.index = ix + 1; + index[row.id] = ix + 1; + }); + rows.forEach(function (row) { + row.indexDeps = {}; + Object.keys(row.deps).forEach(function (key) { + row.indexDeps[key] = index[row.deps[key]]; + }); + tr.queue(row); + }); + } + else { + rows.forEach(function (row) { + tr.queue(row); + }); + } + tr.queue(null); + } + + function cmp (a, b) { + return a.id + a.hash < b.id + b.hash ? -1 : 1; + } +}; diff --git a/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/.npmignore b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/.npmignore new file mode 100644 index 00000000..a9a9d586 --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/.npmignore @@ -0,0 +1,2 @@ +node_modules/* +node_modules diff --git a/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/.travis.yml b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/.travis.yml new file mode 100644 index 00000000..cc4dba29 --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.8" + - "0.10" diff --git a/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/LICENSE.APACHE2 b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/LICENSE.APACHE2 new file mode 100644 index 00000000..6366c047 --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/LICENSE.APACHE2 @@ -0,0 +1,15 @@ +Apache License, Version 2.0 + +Copyright (c) 2011 Dominic Tarr + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/LICENSE.MIT b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/LICENSE.MIT new file mode 100644 index 00000000..6eafbd73 --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/LICENSE.MIT @@ -0,0 +1,24 @@ +The MIT License + +Copyright (c) 2011 Dominic Tarr + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/examples/all_docs.js b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/examples/all_docs.js new file mode 100644 index 00000000..fa87fe52 --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/examples/all_docs.js @@ -0,0 +1,13 @@ +var request = require('request') + , JSONStream = require('JSONStream') + , es = require('event-stream') + +var parser = JSONStream.parse(['rows', true]) //emit parts that match this path (any element of the rows array) + , req = request({url: 'http://isaacs.couchone.com/registry/_all_docs'}) + , logger = es.mapSync(function (data) { //create a stream that logs to stderr, + console.error(data) + return data + }) + +req.pipe(parser) +parser.pipe(logger) diff --git a/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/index.js b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/index.js new file mode 100644 index 00000000..8707f95b --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/index.js @@ -0,0 +1,180 @@ +var Parser = require('jsonparse') + , Stream = require('stream').Stream + , through = require('through') + +/* + + the value of this.stack that creationix's jsonparse has is weird. + + it makes this code ugly, but his problem is way harder that mine, + so i'll forgive him. + +*/ + +exports.parse = function (path) { + + var parser = new Parser() + var stream = through(function (chunk) { + if('string' === typeof chunk) { + if (process.browser) { + var buf = new Array(chunk.length) + for (var i = 0; i < chunk.length; i++) buf[i] = chunk.charCodeAt(i) + chunk = new Int32Array(buf) + } else { + chunk = new Buffer(chunk) + } + } + parser.write(chunk) + }, + function (data) { + if(data) + stream.write(data) + stream.queue(null) + }) + + if('string' === typeof path) + path = path.split('.').map(function (e) { + return e === '*' ? true : e + }) + + + var count = 0, _key + if(!path || !path.length) + path = null + + parser.onValue = function () { + if(!this.root && this.stack.length == 1){ + stream.root = this.value + } + if(!path || this.stack.length !== path.length) + return + var _path = [] + for( var i = 0; i < (path.length - 1); i++) { + var key = path[i] + var c = this.stack[1 + (+i)] + + if(!c) { + return + } + var m = check(key, c.key) + _path.push(c.key) + + if(!m) + return + + } + var c = this + + var key = path[path.length - 1] + var m = check(key, c.key) + if(!m) + return + _path.push(c.key) + + count ++ + stream.queue(this.value[this.key]) + delete this.value[this.key] + + } + parser._onToken = parser.onToken; + + parser.onToken = function (token, value) { + parser._onToken(token, value); + if (this.stack.length === 0) { + if (stream.root) { + if(!path) + stream.queue(stream.root) + stream.emit('root', stream.root, count) + count = 0; + stream.root = null; + } + } + } + + parser.onError = function (err) { + stream.emit('error', err) + } + + + return stream +} + +function check (x, y) { + if ('string' === typeof x) + return y == x + else if (x && 'function' === typeof x.exec) + return x.exec(y) + else if ('boolean' === typeof x) + return x + else if ('function' === typeof x) + return x(y) + return false +} + +exports.stringify = function (op, sep, cl) { + if (op === false){ + op = '' + sep = '\n' + cl = '' + } else if (op == null) { + + op = '[\n' + sep = '\n,\n' + cl = '\n]\n' + + } + + //else, what ever you like + + var stream + , first = true + , anyData = false + stream = through(function (data) { + anyData = true + var json = JSON.stringify(data) + if(first) { first = false ; stream.queue(op + json)} + else stream.queue(sep + json) + }, + function (data) { + if(!anyData) + stream.queue(op) + stream.queue(cl) + stream.queue(null) + }) + + return stream +} + +exports.stringifyObject = function (op, sep, cl) { + if (op === false){ + op = '' + sep = '\n' + cl = '' + } else if (op == null) { + + op = '{\n' + sep = '\n,\n' + cl = '\n}\n' + + } + + //else, what ever you like + + var stream = new Stream () + , first = true + , anyData = false + stream = through(function (data) { + anyData = true + var json = JSON.stringify(data[0]) + ':' + JSON.stringify(data[1]) + if(first) { first = false ; stream.queue(op + json)} + else stream.queue(sep + json) + }, + function (data) { + if(!anyData) stream.queue(op) + stream.queue(cl) + + stream.queue(null) + }) + + return stream +} diff --git a/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/node_modules/through/.travis.yml b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/node_modules/through/.travis.yml new file mode 100644 index 00000000..895dbd36 --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/node_modules/through/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.6 + - 0.8 diff --git a/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/node_modules/through/LICENSE.APACHE2 b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/node_modules/through/LICENSE.APACHE2 new file mode 100644 index 00000000..6366c047 --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/node_modules/through/LICENSE.APACHE2 @@ -0,0 +1,15 @@ +Apache License, Version 2.0 + +Copyright (c) 2011 Dominic Tarr + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/node_modules/through/LICENSE.MIT b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/node_modules/through/LICENSE.MIT new file mode 100644 index 00000000..6eafbd73 --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/node_modules/through/LICENSE.MIT @@ -0,0 +1,24 @@ +The MIT License + +Copyright (c) 2011 Dominic Tarr + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/node_modules/through/index.js b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/node_modules/through/index.js new file mode 100644 index 00000000..d9165607 --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/node_modules/through/index.js @@ -0,0 +1,103 @@ +var Stream = require('stream') + +// through +// +// a stream that does nothing but re-emit the input. +// useful for aggregating a series of changing but not ending streams into one stream) + + + +exports = module.exports = through +through.through = through + +//create a readable writable stream. + +function through (write, end) { + write = write || function (data) { this.queue(data) } + end = end || function () { this.queue(null) } + + var ended = false, destroyed = false, buffer = [] + var stream = new Stream() + stream.readable = stream.writable = true + stream.paused = false + + stream.write = function (data) { + write.call(this, data) + return !stream.paused + } + + function drain() { + while(buffer.length && !stream.paused) { + var data = buffer.shift() + if(null === data) + return stream.emit('end') + else + stream.emit('data', data) + } + } + + stream.queue = stream.push = function (data) { + buffer.push(data) + drain() + return stream + } + + //this will be registered as the first 'end' listener + //must call destroy next tick, to make sure we're after any + //stream piped from here. + //this is only a problem if end is not emitted synchronously. + //a nicer way to do this is to make sure this is the last listener for 'end' + + stream.on('end', function () { + stream.readable = false + if(!stream.writable) + process.nextTick(function () { + stream.destroy() + }) + }) + + function _end () { + stream.writable = false + end.call(stream) + if(!stream.readable) + stream.destroy() + } + + stream.end = function (data) { + if(ended) return + ended = true + if(arguments.length) stream.write(data) + _end() // will emit or queue + return stream + } + + stream.destroy = function () { + if(destroyed) return + destroyed = true + ended = true + buffer.length = 0 + stream.writable = stream.readable = false + stream.emit('close') + return stream + } + + stream.pause = function () { + if(stream.paused) return + stream.paused = true + stream.emit('pause') + return stream + } + stream.resume = function () { + if(stream.paused) { + stream.paused = false + } + drain() + //may have become paused again, + //as drain emits 'data'. + if(!stream.paused) + stream.emit('drain') + return stream + } + return stream +} + diff --git a/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/node_modules/through/package.json b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/node_modules/through/package.json new file mode 100644 index 00000000..a15869d9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/node_modules/through/package.json @@ -0,0 +1,97 @@ +{ + "_args": [ + [ + { + "raw": "through@~2.2.7", + "scope": null, + "escapedName": "through", + "name": "through", + "rawSpec": "~2.2.7", + "spec": ">=2.2.7 <2.3.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/deps-sort/node_modules/JSONStream" + ] + ], + "_from": "through@>=2.2.7 <2.3.0", + "_id": "through@2.2.7", + "_inCache": true, + "_location": "/deps-sort/JSONStream/through", + "_npmUser": { + "name": "dominictarr", + "email": "dominic.tarr@gmail.com" + }, + "_npmVersion": "1.2.3", + "_phantomChildren": {}, + "_requested": { + "raw": "through@~2.2.7", + "scope": null, + "escapedName": "through", + "name": "through", + "rawSpec": "~2.2.7", + "spec": ">=2.2.7 <2.3.0", + "type": "range" + }, + "_requiredBy": [ + "/deps-sort/JSONStream" + ], + "_resolved": "https://registry.npmjs.org/through/-/through-2.2.7.tgz", + "_shasum": "6e8e21200191d4eb6a99f6f010df46aa1c6eb2bd", + "_shrinkwrap": null, + "_spec": "through@~2.2.7", + "_where": "/Users/MB/git/pdfkit/node_modules/deps-sort/node_modules/JSONStream", + "author": { + "name": "Dominic Tarr", + "email": "dominic.tarr@gmail.com", + "url": "dominictarr.com" + }, + "bugs": { + "url": "https://github.com/dominictarr/through/issues" + }, + "dependencies": {}, + "description": "simplified stream contruction", + "devDependencies": { + "stream-spec": "~0.3.5", + "tape": "~0.2.2" + }, + "directories": {}, + "dist": { + "shasum": "6e8e21200191d4eb6a99f6f010df46aa1c6eb2bd", + "tarball": "https://registry.npmjs.org/through/-/through-2.2.7.tgz" + }, + "homepage": "http://github.com/dominictarr/through", + "keywords": [ + "stream", + "streams", + "user-streams", + "pipe" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "dominictarr", + "email": "dominic.tarr@gmail.com" + } + ], + "name": "through", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/dominictarr/through.git" + }, + "scripts": { + "test": "set -e; for t in test/*.js; do node $t; done" + }, + "testling": { + "browsers": [ + "ie/8..latest", + "ff/15..latest", + "chrome/20..latest", + "safari/5.1..latest" + ], + "files": "test/*.js" + }, + "version": "2.2.7" +} diff --git a/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/node_modules/through/readme.markdown b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/node_modules/through/readme.markdown new file mode 100644 index 00000000..870fdd1d --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/node_modules/through/readme.markdown @@ -0,0 +1,43 @@ +#through + +[![build status](https://secure.travis-ci.org/dominictarr/through.png)](http://travis-ci.org/dominictarr/through) + +Easy way to create a `Stream` that is both `readable` and `writable`. + +* Pass in optional `write` and `end` methods. +* `through` takes care of pause/resume logic if you use `this.queue(data)` instead of `this.emit('data', data)`. +* Use `this.pause()` and `this.resume()` to manage flow. +* Check `this.paused` to see current flow state. (write always returns `!this.paused`). + +This function is the basis for most of the synchronous streams in +[event-stream](http://github.com/dominictarr/event-stream). + +``` js +var through = require('through') + +through(function write(data) { + this.queue(data) //data *must* not be null + }, + function end () { //optional + this.queue(null) + }) +``` + +Or, can also be used _without_ buffering on pause, use `this.emit('data', data)`, +and this.emit('end') + +``` js +var through = require('through') + +through(function write(data) { + this.emit('data', data) + //this.pause() + }, + function end () { //optional + this.emit('end') + }) +``` + +## License + +MIT / Apache2 diff --git a/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/node_modules/through/test/buffering.js b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/node_modules/through/test/buffering.js new file mode 100644 index 00000000..b0084bfc --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/node_modules/through/test/buffering.js @@ -0,0 +1,71 @@ +var test = require('tape') +var through = require('../') + +// must emit end before close. + +test('buffering', function(assert) { + var ts = through(function (data) { + this.queue(data) + }, function () { + this.queue(null) + }) + + var ended = false, actual = [] + + ts.on('data', actual.push.bind(actual)) + ts.on('end', function () { + ended = true + }) + + ts.write(1) + ts.write(2) + ts.write(3) + assert.deepEqual(actual, [1, 2, 3]) + ts.pause() + ts.write(4) + ts.write(5) + ts.write(6) + assert.deepEqual(actual, [1, 2, 3]) + ts.resume() + assert.deepEqual(actual, [1, 2, 3, 4, 5, 6]) + ts.pause() + ts.end() + assert.ok(!ended) + ts.resume() + assert.ok(ended) + assert.end() +}) + +test('buffering has data in queue, when ends', function (assert) { + + /* + * If stream ends while paused with data in the queue, + * stream should still emit end after all data is written + * on resume. + */ + + var ts = through(function (data) { + this.queue(data) + }, function () { + this.queue(null) + }) + + var ended = false, actual = [] + + ts.on('data', actual.push.bind(actual)) + ts.on('end', function () { + ended = true + }) + + ts.pause() + ts.write(1) + ts.write(2) + ts.write(3) + ts.end() + assert.deepEqual(actual, [], 'no data written yet, still paused') + assert.ok(!ended, 'end not emitted yet, still paused') + ts.resume() + assert.deepEqual(actual, [1, 2, 3], 'resumed, all data should be delivered') + assert.ok(ended, 'end should be emitted once all data was delivered') + assert.end(); +}) diff --git a/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/node_modules/through/test/end.js b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/node_modules/through/test/end.js new file mode 100644 index 00000000..73216676 --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/node_modules/through/test/end.js @@ -0,0 +1,26 @@ +var test = require('tape') +var through = require('../') + +// must emit end before close. + +test('end before close', function (assert) { + var ts = through() + var ended = false, closed = false + + ts.on('end', function () { + assert.ok(!closed) + ended = true + }) + ts.on('close', function () { + assert.ok(ended) + closed = true + }) + + ts.write(1) + ts.write(2) + ts.write(3) + ts.end() + assert.ok(ended) + assert.ok(closed) + assert.end() +}) diff --git a/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/node_modules/through/test/index.js b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/node_modules/through/test/index.js new file mode 100644 index 00000000..33e33f96 --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/node_modules/through/test/index.js @@ -0,0 +1,114 @@ + +var test = require('tape') +var spec = require('stream-spec') +var through = require('../') + +/* + I'm using these two functions, and not streams and pipe + so there is less to break. if this test fails it must be + the implementation of _through_ +*/ + +function write(array, stream) { + array = array.slice() + function next() { + while(array.length) + if(stream.write(array.shift()) === false) + return stream.once('drain', next) + + stream.end() + } + + next() +} + +function read(stream, callback) { + var actual = [] + stream.on('data', function (data) { + actual.push(data) + }) + stream.once('end', function () { + callback(null, actual) + }) + stream.once('error', function (err) { + callback(err) + }) +} + +test('simple defaults', function(assert) { + + var l = 1000 + , expected = [] + + while(l--) expected.push(l * Math.random()) + + var t = through() + spec(t) + .through() + .pausable() + .validateOnExit() + + read(t, function (err, actual) { + assert.ifError(err) + assert.deepEqual(actual, expected) + assert.end() + }) + + write(expected, t) +}); + +test('simple functions', function(assert) { + + var l = 1000 + , expected = [] + + while(l--) expected.push(l * Math.random()) + + var t = through(function (data) { + this.emit('data', data*2) + }) + spec(t) + .through() + .pausable() + .validateOnExit() + + read(t, function (err, actual) { + assert.ifError(err) + assert.deepEqual(actual, expected.map(function (data) { + return data*2 + })) + assert.end() + }) + + write(expected, t) +}) + +test('pauses', function(assert) { + + var l = 1000 + , expected = [] + + while(l--) expected.push(l) //Math.random()) + + var t = through() + spec(t) + .through() + .pausable() + .validateOnExit() + + t.on('data', function () { + if(Math.random() > 0.1) return + t.pause() + process.nextTick(function () { + t.resume() + }) + }) + + read(t, function (err, actual) { + assert.ifError(err) + assert.deepEqual(actual, expected) + assert.end() + }) + + write(expected, t) +}) diff --git a/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/package.json b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/package.json new file mode 100644 index 00000000..b1a01e6d --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/package.json @@ -0,0 +1,90 @@ +{ + "_args": [ + [ + { + "raw": "JSONStream@~0.6.4", + "scope": null, + "escapedName": "JSONStream", + "name": "JSONStream", + "rawSpec": "~0.6.4", + "spec": ">=0.6.4 <0.7.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/deps-sort" + ] + ], + "_from": "JSONStream@>=0.6.4 <0.7.0", + "_id": "JSONStream@0.6.4", + "_inCache": true, + "_location": "/deps-sort/JSONStream", + "_npmUser": { + "name": "dominictarr", + "email": "dominic.tarr@gmail.com" + }, + "_npmVersion": "1.2.3", + "_phantomChildren": {}, + "_requested": { + "raw": "JSONStream@~0.6.4", + "scope": null, + "escapedName": "JSONStream", + "name": "JSONStream", + "rawSpec": "~0.6.4", + "spec": ">=0.6.4 <0.7.0", + "type": "range" + }, + "_requiredBy": [ + "/deps-sort" + ], + "_resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-0.6.4.tgz", + "_shasum": "4b2c8063f8f512787b2375f7ee9db69208fa2dcb", + "_shrinkwrap": null, + "_spec": "JSONStream@~0.6.4", + "_where": "/Users/MB/git/pdfkit/node_modules/deps-sort", + "author": { + "name": "Dominic Tarr", + "email": "dominic.tarr@gmail.com", + "url": "http://bit.ly/dominictarr" + }, + "bugs": { + "url": "https://github.com/dominictarr/JSONStream/issues" + }, + "dependencies": { + "jsonparse": "0.0.5", + "through": "~2.2.7" + }, + "description": "rawStream.pipe(JSONStream.parse()).pipe(streamOfObjects)", + "devDependencies": { + "assertions": "~2.2.2", + "event-stream": "~0.7.0", + "it-is": "~1", + "render": "~0.1.1", + "tape": "~0.2.2", + "trees": "~0.0.3" + }, + "directories": {}, + "dist": { + "shasum": "4b2c8063f8f512787b2375f7ee9db69208fa2dcb", + "tarball": "https://registry.npmjs.org/JSONStream/-/JSONStream-0.6.4.tgz" + }, + "engines": { + "node": "*" + }, + "homepage": "http://github.com/dominictarr/JSONStream", + "maintainers": [ + { + "name": "dominictarr", + "email": "dominic.tarr@gmail.com" + } + ], + "name": "JSONStream", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/dominictarr/JSONStream.git" + }, + "scripts": { + "test": "set -e; for t in test/*.js; do echo '***' $t '***'; node $t; done" + }, + "version": "0.6.4" +} diff --git a/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/readme.markdown b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/readme.markdown new file mode 100644 index 00000000..dc23a0fe --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/readme.markdown @@ -0,0 +1,141 @@ +# JSONStream + +streaming JSON.parse and stringify + + + +## example + +``` js + +var request = require('request') + , JSONStream = require('JSONStream') + , es = require('event-stream') + +var parser = JSONStream.parse(['rows', true]) + , req = request({url: 'http://isaacs.couchone.com/registry/_all_docs'}) + , logger = es.mapSync(function (data) { + console.error(data) + return data + }) + + request({url: 'http://isaacs.couchone.com/registry/_all_docs'}) + .pipe(JSONStream.parse('rows.*')) + .pipe(es.mapSync(function (data) { + console.error(data) + return data + })) +``` + +## JSONStream.parse(path) + +parse stream of values that match a path + +``` js + JSONStream.parse('rows.*.doc') +``` + +If your keys have keys that include `.` or `*` etc, use an array instead. +`['row', true, /^doc/]`. + +If you use an array, `RegExp`s, booleans, and/or functions. +any object that matches the path will be emitted as 'data' (and `pipe`d down stream) + +If `path` is empty or null, no 'data' events are emitted. + +### Example + +query a couchdb view: + +``` bash +curl -sS localhost:5984/tests/_all_docs&include_docs=true +``` +you will get something like this: + +``` js +{"total_rows":129,"offset":0,"rows":[ + { "id":"change1_0.6995461115147918" + , "key":"change1_0.6995461115147918" + , "value":{"rev":"1-e240bae28c7bb3667f02760f6398d508"} + , "doc":{ + "_id": "change1_0.6995461115147918" + , "_rev": "1-e240bae28c7bb3667f02760f6398d508","hello":1} + }, + { "id":"change2_0.6995461115147918" + , "key":"change2_0.6995461115147918" + , "value":{"rev":"1-13677d36b98c0c075145bb8975105153"} + , "doc":{ + "_id":"change2_0.6995461115147918" + , "_rev":"1-13677d36b98c0c075145bb8975105153" + , "hello":2 + } + }, +]} + +``` + +we are probably most interested in the `rows.*.docs` + +create a `Stream` that parses the documents from the feed like this: + +``` js +var stream = JSONStream.parse(['rows', true, 'doc']) //rows, ANYTHING, doc + +stream.on('data', function(data) { + console.log('received:', data); +}); + +stream.on('root', function(root, count) { + if (!count) { + console.log('no matches found:', root); + } +}); +``` +awesome! + +## JSONStream.stringify(open, sep, close) + +Create a writable stream. + +you may pass in custom `open`, `close`, and `seperator` strings. +But, by default, `JSONStream.stringify()` will create an array, +(with default options `open='[\n', sep='\n,\n', close='\n]\n'`) + +If you call `JSONStream.stringify(false)` +the elements will only be seperated by a newline. + +If you only write one item this will be valid JSON. + +If you write many items, +you can use a `RegExp` to split it into valid chunks. + +## JSONStream.stringifyObject(open, sep, close) + +Very much like `JSONStream.stringify`, +but creates a writable stream for objects instead of arrays. + +Accordingly, `open='{\n', sep='\n,\n', close='\n}\n'`. + +When you `.write()` to the stream you must supply an array with `[ key, data ]` +as the first argument. + +## numbers + +There are occasional problems parsing and unparsing very precise numbers. + +I have opened an issue here: + +https://github.com/creationix/jsonparse/issues/2 + ++1 + +## Acknowlegements + +this module depends on https://github.com/creationix/jsonparse +by Tim Caswell +and also thanks to Florent Jaby for teaching me about parsing with: +https://github.com/Floby/node-json-streams + +## license + +MIT / APACHE2 diff --git a/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/bool.js b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/bool.js new file mode 100644 index 00000000..6c386d60 --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/bool.js @@ -0,0 +1,41 @@ + +var fs = require ('fs') + , join = require('path').join + , file = join(__dirname, 'fixtures','all_npm.json') + , JSONStream = require('../') + , it = require('it-is').style('colour') + + function randomObj () { + return ( + Math.random () < 0.4 + ? {hello: 'eonuhckmqjk', + whatever: 236515, + lies: true, + nothing: [null], +// stuff: [Math.random(),Math.random(),Math.random()] + } + : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]] + ) + } + +var expected = [] + , stringify = JSONStream.stringify() + , es = require('event-stream') + , stringified = '' + , called = 0 + , count = 10 + , ended = false + +while (count --) + expected.push(randomObj()) + + es.connect( + es.readArray(expected), + stringify, + JSONStream.parse([true]), + es.writeArray(function (err, lines) { + + it(lines).has(expected) + console.error('PASSED') + }) + ) diff --git a/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/destroy_missing.js b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/destroy_missing.js new file mode 100644 index 00000000..315fdc83 --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/destroy_missing.js @@ -0,0 +1,27 @@ +var fs = require ('fs'); +var net = require('net'); +var join = require('path').join; +var file = join(__dirname, 'fixtures','all_npm.json'); +var JSONStream = require('../'); + + +var server = net.createServer(function(client) { + var parser = JSONStream.parse([]); + parser.on('end', function() { + console.log('close') + console.error('PASSED'); + server.close(); + }); + client.pipe(parser); + var n = 4 + client.on('data', function () { + if(--n) return + client.end(); + }) +}); +server.listen(9999); + + +var client = net.connect({ port : 9999 }, function() { + fs.createReadStream(file).pipe(client).on('data', console.log) //.resume(); +}); diff --git a/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/empty.js b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/empty.js new file mode 100644 index 00000000..19e888c1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/empty.js @@ -0,0 +1,44 @@ +var JSONStream = require('../') + , stream = require('stream') + , it = require('it-is') + +var output = [ [], [] ] + +var parser1 = JSONStream.parse(['docs', /./]) +parser1.on('data', function(data) { + output[0].push(data) +}) + +var parser2 = JSONStream.parse(['docs', /./]) +parser2.on('data', function(data) { + output[1].push(data) +}) + +var pending = 2 +function onend () { + if (--pending > 0) return + it(output).deepEqual([ + [], [{hello: 'world'}] + ]) + console.error('PASSED') +} +parser1.on('end', onend) +parser2.on('end', onend) + +function makeReadableStream() { + var readStream = new stream.Stream() + readStream.readable = true + readStream.write = function (data) { this.emit('data', data) } + readStream.end = function (data) { this.emit('end') } + return readStream +} + +var emptyArray = makeReadableStream() +emptyArray.pipe(parser1) +emptyArray.write('{"docs":[]}') +emptyArray.end() + +var objectArray = makeReadableStream() +objectArray.pipe(parser2) +objectArray.write('{"docs":[{"hello":"world"}]}') +objectArray.end() diff --git a/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/fixtures/all_npm.json b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/fixtures/all_npm.json new file mode 100644 index 00000000..6303ea2f --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/fixtures/all_npm.json @@ -0,0 +1,4030 @@ +{"total_rows":4028,"offset":0,"rows":[ +{"id":"","key":"","value":{"rev":"1-2f11e026763c10730d8b19ba5dce7565"}}, +{"id":"3scale","key":"3scale","value":{"rev":"3-db3d574bf0ecdfdf627afeaa21b4bdaa"}}, +{"id":"7digital-api","key":"7digital-api","value":{"rev":"20-21d11832780e2368aabc946598a41dd5"}}, +{"id":"AMD","key":"AMD","value":{"rev":"7-3b4305a9c786ab4c5ce611e7f0de0aca"}}, +{"id":"AriesNode","key":"AriesNode","value":{"rev":"3-9d88392bca6582c5c54784927dbfdee6"}}, +{"id":"Array.prototype.forEachAsync","key":"Array.prototype.forEachAsync","value":{"rev":"3-85696441ba6bef77cc1e7de7b073110e"}}, +{"id":"Babel","key":"Babel","value":{"rev":"5-9d8370c6ac6fd9cd3d530f26a9379814"}}, +{"id":"Blaggie-System","key":"Blaggie-System","value":{"rev":"3-47782b1e5cbfa425170192799510e148"}}, +{"id":"Blob","key":"Blob","value":{"rev":"3-cf5fb5d69da4dd00bc4f2be8870ca698"}}, +{"id":"BlobBuilder","key":"BlobBuilder","value":{"rev":"3-eb977ff1713a915384fac994f9d8fa7c"}}, +{"id":"Buffer","key":"Buffer","value":{"rev":"3-549594b58e83d6d07bb219e73de558e5"}}, +{"id":"CLI-UI","key":"CLI-UI","value":{"rev":"5-5912625f27b4bdfb4d3eed16726c48a8"}}, +{"id":"CLoader","key":"CLoader","value":{"rev":"1-ad3c317ddf3497e73ab41cb1ddbc6ba8"}}, +{"id":"CM1","key":"CM1","value":{"rev":"15-a325a2dc28bc6967a1a14beed86f3b80"}}, +{"id":"CONFIGURATOR","key":"CONFIGURATOR","value":{"rev":"3-c76bf9282a75cc4d3fb349e831ccb8a5"}}, +{"id":"Cashew","key":"Cashew","value":{"rev":"7-6a74dc51dbecc47d2c15bfb7d056a20f"}}, +{"id":"Class","key":"Class","value":{"rev":"5-958c6365f76a60a8b3dafbbd9730ac7e"}}, +{"id":"ClassLoader","key":"ClassLoader","value":{"rev":"3-27fe8faa8a1d60d639f87af52826ed47"}}, +{"id":"ClearSilver","key":"ClearSilver","value":{"rev":"3-f3e54eb9ce64fc6a090186e61f15ed0b"}}, +{"id":"Couch-cleaner","key":"Couch-cleaner","value":{"rev":"3-fc77270917d967a4e2e8637cfa9f0fe0"}}, +{"id":"CouchCover","key":"CouchCover","value":{"rev":"15-3b2d87d314f57272a5c27c42bbb3eaf9"}}, +{"id":"DOM-js","key":"DOM-js","value":{"rev":"8-748cdc96566a7b65bbd0b12be2eeb386"}}, +{"id":"DOMBuilder","key":"DOMBuilder","value":{"rev":"19-41a518f2ce16fabc0241535ccd967300"}}, +{"id":"DateZ","key":"DateZ","value":{"rev":"15-69d8115a9bd521e614eaad3cf2611264"}}, +{"id":"Dateselect","key":"Dateselect","value":{"rev":"3-6511567a876d8fe15724bbc7f247214c"}}, +{"id":"Deferred","key":"Deferred","value":{"rev":"3-c61dfc4a0d1bd3e9f35c7182f161f1f2"}}, +{"id":"DeskSet","key":"DeskSet","value":{"rev":"5-359bf760718898ff3591eb366e336cf9"}}, +{"id":"Estro","key":"Estro","value":{"rev":"11-97192e2d0327469bb30f814963db6dff"}}, +{"id":"EventProxy.js","key":"EventProxy.js","value":{"rev":"5-106696b56c6959cec4bfd37f406ee60a"}}, +{"id":"EventServer","key":"EventServer","value":{"rev":"3-59d174119435e99e2affe0c4ba7caae0"}}, +{"id":"Expressive","key":"Expressive","value":{"rev":"3-7eae0ea010eb9014b28108e814918eac"}}, +{"id":"F","key":"F","value":{"rev":"12-91a3db69527b46cf43e36b7ec64a4336"}}, +{"id":"Faker","key":"Faker","value":{"rev":"9-77951c352cb6f9a0b824be620a8fa40d"}}, +{"id":"FastLegS","key":"FastLegS","value":{"rev":"27-4399791981235021a36c94bb9e9b52b5"}}, +{"id":"Fayer","key":"Fayer","value":{"rev":"7-7e4974ff2716329375f9711bcabef701"}}, +{"id":"File","key":"File","value":{"rev":"3-45e353a984038bc48248dfc32b18f9a8"}}, +{"id":"FileError","key":"FileError","value":{"rev":"3-bb4b03a2548e3c229e2c7e92242946c3"}}, +{"id":"FileList","key":"FileList","value":{"rev":"3-ec4a3fc91794ef7fdd3fe88b19cec7b0"}}, +{"id":"FileReader","key":"FileReader","value":{"rev":"7-e81b58a2d8a765ae4781b41bbfadb4cb"}}, +{"id":"FileSaver","key":"FileSaver","value":{"rev":"3-476dcb3f63f4d10feee08d41a8128cb8"}}, +{"id":"FileWriter","key":"FileWriter","value":{"rev":"3-f2fcdbc4938de480cce2e8e8416a93dd"}}, +{"id":"FileWriterSync","key":"FileWriterSync","value":{"rev":"3-9494c3fe7a1230238f37a724ec10895b"}}, +{"id":"FormData","key":"FormData","value":{"rev":"3-8872d717575f7090107a96d81583f6fe"}}, +{"id":"Frenchpress","key":"Frenchpress","value":{"rev":"3-6d916fc15b9e77535771578f96c47c52"}}, +{"id":"FreshDocs","key":"FreshDocs","value":{"rev":"5-f1f3e76c85267faf21d06d911cc6c203"}}, +{"id":"Google_Plus_API","key":"Google_Plus_API","value":{"rev":"3-3302bc9846726d996a45daee3dc5922c"}}, +{"id":"Gord","key":"Gord","value":{"rev":"11-32fddef1453773ac7270ba0e7c83f727"}}, +{"id":"Graph","key":"Graph","value":{"rev":"7-c346edea4f90e3e18d50a62473868cf4"}}, +{"id":"GridFS","key":"GridFS","value":{"rev":"27-4fc649aaa007fddec4947bdb7111560f"}}, +{"id":"Haraka","key":"Haraka","value":{"rev":"39-ee8f890521c1579b3cc779c8ebe03480"}}, +{"id":"Index","key":"Index","value":{"rev":"29-d8f4881c1544bf51dea1927e87ebb3f3"}}, +{"id":"JS-Entities","key":"JS-Entities","value":{"rev":"7-905636d8b46f273210233b60063d079b"}}, +{"id":"JSLint-commonJS","key":"JSLint-commonJS","value":{"rev":"3-759a81f82af7055e85ee89c9707c9609"}}, +{"id":"JSON","key":"JSON","value":{"rev":"3-7966a79067c34fb5de2e62c796f67341"}}, +{"id":"JSONPath","key":"JSONPath","value":{"rev":"7-58789d57ae366a5b0ae4b36837f15d59"}}, +{"id":"JSONSelect","key":"JSONSelect","value":{"rev":"9-5b0730da91eeb52e8f54da516367dc0f"}}, +{"id":"JSONloops","key":"JSONloops","value":{"rev":"3-3d4a1f8bfcfd778ab7def54155324331"}}, +{"id":"JSPP","key":"JSPP","value":{"rev":"7-af09a2bb193b3ff44775e8fbb7d4f522"}}, +{"id":"JSV","key":"JSV","value":{"rev":"3-41a7af86909046111be8ee9b56b077c8"}}, +{"id":"Jody","key":"Jody","value":{"rev":"43-70c1cf40e93cd8ce53249e5295d6b159"}}, +{"id":"Journaling-Hash","key":"Journaling-Hash","value":{"rev":"3-ac676eecb40a4dff301c671fa4bb6be9"}}, +{"id":"Kahana","key":"Kahana","value":{"rev":"33-1cb7e291ae02cee4e8105509571223f5"}}, +{"id":"LazyBoy","key":"LazyBoy","value":{"rev":"13-20a8894e3a957f184f5ae2a3e709551c"}}, +{"id":"Lingo","key":"Lingo","value":{"rev":"9-1af9a6df616e601f09c8cec07ccad1ae"}}, +{"id":"Loggy","key":"Loggy","value":{"rev":"33-e115c25163ab468314eedbe497d1c51e"}}, +{"id":"MeCab","key":"MeCab","value":{"rev":"4-2687176c7b878930e812a534976a6988"}}, +{"id":"Mercury","key":"Mercury","value":{"rev":"3-09a6bff1332ed829bd2c37bfec244a41"}}, +{"id":"Mu","key":"Mu","value":{"rev":"7-28e6ab82c402c3a75fe0f79dea846b97"}}, +{"id":"N","key":"N","value":{"rev":"7-e265046b5bdd299b2cad1584083ce2d5"}}, +{"id":"NORRIS","key":"NORRIS","value":{"rev":"3-4b5b23b09118582c44414f8d480619e6"}}, +{"id":"NetOS","key":"NetOS","value":{"rev":"3-3f943f87a24c11e6dd8c265469914e80"}}, +{"id":"NewBase60","key":"NewBase60","value":{"rev":"3-fd84758db79870e82917d358c6673f32"}}, +{"id":"NoCR","key":"NoCR","value":{"rev":"3-8f6cddd528f2d6045e3dda6006fb6948"}}, +{"id":"NodObjC","key":"NodObjC","value":{"rev":"15-ea6ab2df532c90fcefe5a428950bfdbb"}}, +{"id":"Node-JavaScript-Preprocessor","key":"Node-JavaScript-Preprocessor","value":{"rev":"13-4662b5ad742caaa467ec5d6c8e77b1e5"}}, +{"id":"NodeInterval","key":"NodeInterval","value":{"rev":"3-dc3446db2e0cd5be29a3c07942dba66d"}}, +{"id":"NodeSSH","key":"NodeSSH","value":{"rev":"3-45530fae5a69c44a6dd92357910f4212"}}, +{"id":"Nonsense","key":"Nonsense","value":{"rev":"3-9d86191475bc76dc3dd496d4dfe5d94e"}}, +{"id":"NormAndVal","key":"NormAndVal","value":{"rev":"9-d3b3d6ffd046292f4733aa5f3eb7be61"}}, +{"id":"Olive","key":"Olive","value":{"rev":"5-67f3057f09cae5104f09472db1d215aa"}}, +{"id":"OnCollect","key":"OnCollect","value":{"rev":"16-6dbe3afd04f123dda87bb1e21cdfd776"}}, +{"id":"PJsonCouch","key":"PJsonCouch","value":{"rev":"3-be9588f49d85094c36288eb63f8236b3"}}, +{"id":"PMInject","key":"PMInject","value":{"rev":"5-da518047d8273dbf3b3c05ea25e77836"}}, +{"id":"PanPG","key":"PanPG","value":{"rev":"13-beb54225a6b1be4c157434c28adca016"}}, +{"id":"PerfDriver","key":"PerfDriver","value":{"rev":"2-b448fb2f407f341b8df7032f29e4920f"}}, +{"id":"PostgresClient","key":"PostgresClient","value":{"rev":"8-2baec6847f8ad7dcf24b7d61a4034163"}}, +{"id":"QuickWeb","key":"QuickWeb","value":{"rev":"13-d388df9c484021ecd75bc9650d659a67"}}, +{"id":"R.js","key":"R.js","value":{"rev":"3-3f154b95ec6fc744f95a29750f16667e"}}, +{"id":"R2","key":"R2","value":{"rev":"11-f5ccff6f108f6b928caafb62b80d1056"}}, +{"id":"Reston","key":"Reston","value":{"rev":"5-9d234010f32f593edafc04620f3cf2bd"}}, +{"id":"Sardines","key":"Sardines","value":{"rev":"5-d7d3d2269420e21c2c62b86ff5a0021e"}}, +{"id":"SessionWebSocket","key":"SessionWebSocket","value":{"rev":"8-d9fc9beaf90057aefeb701addd7fc845"}}, +{"id":"Sheet","key":"Sheet","value":{"rev":"8-c827c713564e4ae5a17988ffea520d0d"}}, +{"id":"Spec_My_Node","key":"Spec_My_Node","value":{"rev":"8-fa58408e9d9736d9c6fa8daf5d632106"}}, +{"id":"Spot","key":"Spot","value":{"rev":"3-6b6c2131451fed28fb57c924c4fa44cc"}}, +{"id":"Sslac","key":"Sslac","value":{"rev":"3-70a2215cc7505729254aa6fa1d9a25d9"}}, +{"id":"StaticServer","key":"StaticServer","value":{"rev":"3-6f5433177ef4d76a52f01c093117a532"}}, +{"id":"StringScanner","key":"StringScanner","value":{"rev":"3-e85d0646c25ec477c1c45538712d3a38"}}, +{"id":"Structr","key":"Structr","value":{"rev":"3-449720001801cff5831c2cc0e0f1fcf8"}}, +{"id":"Templ8","key":"Templ8","value":{"rev":"11-4e6edb250bc250df20b2d557ca7f6589"}}, +{"id":"Template","key":"Template","value":{"rev":"6-1f055c73524d2b7e82eb6c225bd4b8e0"}}, +{"id":"Thimble","key":"Thimble","value":{"rev":"3-8499b261206f2f2e9acf92d8a4e54afb"}}, +{"id":"Toji","key":"Toji","value":{"rev":"96-511e171ad9f32a9264c2cdf01accacfb"}}, +{"id":"TwigJS","key":"TwigJS","value":{"rev":"3-1aaefc6d6895d7d4824174d410a747b9"}}, +{"id":"UkGeoTool","key":"UkGeoTool","value":{"rev":"5-e84291128e12f66cebb972a60c1d710f"}}, +{"id":"Vector","key":"Vector","value":{"rev":"3-bf5dc97abe7cf1057260b70638175a96"}}, +{"id":"_design/app","key":"_design/app","value":{"rev":"421-b1661d854599a58d0904d68aa44d8b63"}}, +{"id":"_design/ui","key":"_design/ui","value":{"rev":"78-db00aeb91a59a326e38e2bef7f1126cf"}}, +{"id":"aaronblohowiak-plugify-js","key":"aaronblohowiak-plugify-js","value":{"rev":"3-0272c269eacd0c86bfc1711566922577"}}, +{"id":"aaronblohowiak-uglify-js","key":"aaronblohowiak-uglify-js","value":{"rev":"3-77844a6def6ec428d75caa0846c95502"}}, +{"id":"aasm-js","key":"aasm-js","value":{"rev":"3-01a48108d55909575440d9e0ef114f37"}}, +{"id":"abbrev","key":"abbrev","value":{"rev":"16-e17a2b6c7360955b950edf2cb2ef1602"}}, +{"id":"abhispeak","key":"abhispeak","value":{"rev":"5-9889431f68ec10212db3be91796608e2"}}, +{"id":"ace","key":"ace","value":{"rev":"3-e8d267de6c17ebaa82c2869aff983c74"}}, +{"id":"acl","key":"acl","value":{"rev":"13-87c131a1801dc50840a177be73ce1c37"}}, +{"id":"active-client","key":"active-client","value":{"rev":"5-0ca16ae2e48a3ba9de2f6830a8c2d3a0"}}, +{"id":"activenode-monitor","key":"activenode-monitor","value":{"rev":"9-2634fa446379c39475d0ce4183fb92f2"}}, +{"id":"activeobject","key":"activeobject","value":{"rev":"43-6d73e28412612aaee37771e3ab292c3d"}}, +{"id":"actor","key":"actor","value":{"rev":"3-f6b84acd7d2e689b860e3142a18cd460"}}, +{"id":"actors","key":"actors","value":{"rev":"3-6df913bbe5b99968a2e71ae4ef07b2d2"}}, +{"id":"addTimeout","key":"addTimeout","value":{"rev":"15-e5170f0597fe8cf5ed0b54b7e6f2cde1"}}, +{"id":"addressable","key":"addressable","value":{"rev":"27-0c74fde458d92e4b93a29317da15bb3c"}}, +{"id":"aejs","key":"aejs","value":{"rev":"7-4928e2ce6151067cd6c585c0ba3e0bc3"}}, +{"id":"aenoa-supervisor","key":"aenoa-supervisor","value":{"rev":"7-6d399675981e76cfdfb9144bc2f7fb6d"}}, +{"id":"after","key":"after","value":{"rev":"9-baee7683ff54182cf7544cc05b0a4ad7"}}, +{"id":"ahr","key":"ahr","value":{"rev":"27-4ed272c516f3f2f9310e4f0ef28254e9"}}, +{"id":"ahr.browser","key":"ahr.browser","value":{"rev":"3-f7226aab4a1a3ab5f77379f92aae87f9"}}, +{"id":"ahr.browser.jsonp","key":"ahr.browser.jsonp","value":{"rev":"3-abed17143cf5e3c451c3d7da457e6f5b"}}, +{"id":"ahr.browser.request","key":"ahr.browser.request","value":{"rev":"7-fafd7b079d0415f388b64a20509a270b"}}, +{"id":"ahr.node","key":"ahr.node","value":{"rev":"17-f487a4a9896bd3876a11f9dfa1c639a7"}}, +{"id":"ahr.options","key":"ahr.options","value":{"rev":"13-904a4cea763a4455f7b2ae0abba18b8d"}}, +{"id":"ahr.utils","key":"ahr.utils","value":{"rev":"3-5f7b4104ea280d1fd36370c8f3356ead"}}, +{"id":"ahr2","key":"ahr2","value":{"rev":"87-ddf57f3ee158dcd23b2df330e2883a1d"}}, +{"id":"ain","key":"ain","value":{"rev":"7-d840736668fb36e9be3c26a68c5cd411"}}, +{"id":"ain-tcp","key":"ain-tcp","value":{"rev":"11-d18a1780bced8981d1d9dbd262ac4045"}}, +{"id":"ain2","key":"ain2","value":{"rev":"5-0b67879174f5f0a06448c7c737d98b5e"}}, +{"id":"airbrake","key":"airbrake","value":{"rev":"33-4bb9f822162e0c930c31b7f961938dc9"}}, +{"id":"ajaxrunner","key":"ajaxrunner","value":{"rev":"2-17e6a5de4f0339f4e6ce0b7681d0ba0c"}}, +{"id":"ajs","key":"ajs","value":{"rev":"13-063a29dec829fdaf4ca63d622137d1c6"}}, +{"id":"ajs-xgettext","key":"ajs-xgettext","value":{"rev":"3-cd4bbcc1c9d87fa7119d3bbbca99b793"}}, +{"id":"akismet","key":"akismet","value":{"rev":"13-a144e15dd6c2b13177572e80a526edd1"}}, +{"id":"alfred","key":"alfred","value":{"rev":"45-9a69041b18d2587c016b1b1deccdb2ce"}}, +{"id":"alfred-bcrypt","key":"alfred-bcrypt","value":{"rev":"11-7ed10ef318e5515d1ef7c040818ddb22"}}, +{"id":"algorithm","key":"algorithm","value":{"rev":"3-9ec0b38298cc15b0f295152de8763358"}}, +{"id":"algorithm-js","key":"algorithm-js","value":{"rev":"9-dd7496b7ec2e3b23cc7bb182ae3aac6d"}}, +{"id":"alists","key":"alists","value":{"rev":"5-22cc13c86d84081a826ac79a0ae5cda3"}}, +{"id":"altshift","key":"altshift","value":{"rev":"53-1c51d8657f271f390503a6fe988d09db"}}, +{"id":"amazon-ses","key":"amazon-ses","value":{"rev":"5-c175d60de2232a5664666a80832269e5"}}, +{"id":"ambrosia","key":"ambrosia","value":{"rev":"3-8c648ec7393cf842838c20e2c5d9bce4"}}, +{"id":"amd","key":"amd","value":{"rev":"3-d78c4df97a577af598a7def2a38379fa"}}, +{"id":"amionline","key":"amionline","value":{"rev":"3-a62887a632523700402b0f4ebb896812"}}, +{"id":"amo-version-reduce","key":"amo-version-reduce","value":{"rev":"3-05f6956269e5e921ca3486d3d6ea74b0"}}, +{"id":"amqp","key":"amqp","value":{"rev":"17-ee62d2b8248f8eb13f3369422d66df26"}}, +{"id":"amqpsnoop","key":"amqpsnoop","value":{"rev":"3-36a1c45647bcfb2f56cf68dbc24b0426"}}, +{"id":"ams","key":"ams","value":{"rev":"40-1c0cc53ad942d2fd23c89618263befc8"}}, +{"id":"amulet","key":"amulet","value":{"rev":"7-d1ed71811e45652799982e4f2e9ffb36"}}, +{"id":"anachronism","key":"anachronism","value":{"rev":"11-468bdb40f9a5aa146bae3c1c6253d0e1"}}, +{"id":"analytics","key":"analytics","value":{"rev":"3-a143ccdd863b5f7dbee4d2f7732390b3"}}, +{"id":"ann","key":"ann","value":{"rev":"9-41f00594d6216c439f05f7116a697cac"}}, +{"id":"ansi-color","key":"ansi-color","value":{"rev":"6-d6f02b32525c1909d5134afa20f470de"}}, +{"id":"ansi-font","key":"ansi-font","value":{"rev":"3-b039661ad9b6aa7baf34741b449c4420"}}, +{"id":"ant","key":"ant","value":{"rev":"3-35a64e0b7f6eb63a90c32971694b0d93"}}, +{"id":"anvil.js","key":"anvil.js","value":{"rev":"19-290c82075f0a9ad764cdf6dc5c558e0f"}}, +{"id":"aop","key":"aop","value":{"rev":"7-5963506c9e7912aa56fda065c56fd472"}}, +{"id":"ap","key":"ap","value":{"rev":"3-f525b5b490a1ada4452f46307bf92d08"}}, +{"id":"apac","key":"apac","value":{"rev":"12-945d0313a84797b4c3df19da4bec14d4"}}, +{"id":"aparser","key":"aparser","value":{"rev":"5-cb35cfc9184ace6642413dad97e49dca"}}, +{"id":"api-easy","key":"api-easy","value":{"rev":"15-2ab5eefef1377ff217cb020e80343d65"}}, +{"id":"api.js","key":"api.js","value":{"rev":"5-a14b8112fbda17022c80356a010de59a"}}, +{"id":"api_request","key":"api_request","value":{"rev":"3-8531e71f5cf2f3f811684269132d72d4"}}, +{"id":"apimaker","key":"apimaker","value":{"rev":"3-bdbd4a2ebf5b67276d89ea73eaa20025"}}, +{"id":"apn","key":"apn","value":{"rev":"30-0513d27341f587b39db54300c380921f"}}, +{"id":"app","key":"app","value":{"rev":"3-d349ddb47167f60c03d259649569e002"}}, +{"id":"app.js","key":"app.js","value":{"rev":"3-bff3646634daccfd964b4bbe510acb25"}}, +{"id":"append","key":"append","value":{"rev":"7-53e2f4ab2a69dc0c5e92f10a154998b6"}}, +{"id":"applescript","key":"applescript","value":{"rev":"10-ef5ab30ccd660dc71fb89e173f30994a"}}, +{"id":"appzone","key":"appzone","value":{"rev":"21-fb27e24d460677fe9c7eda0d9fb1fead"}}, +{"id":"apricot","key":"apricot","value":{"rev":"14-b55361574a0715f78afc76ddf6125845"}}, +{"id":"arcane","key":"arcane","value":{"rev":"3-f846c96e890ed6150d4271c93cc05a24"}}, +{"id":"archetype","key":"archetype","value":{"rev":"3-441336def3b7aade89c8c1c19a84f56d"}}, +{"id":"ardrone","key":"ardrone","value":{"rev":"8-540e95b796da734366a89bb06dc430c5"}}, +{"id":"ardrone-web","key":"ardrone-web","value":{"rev":"3-8a53cc85a95be20cd44921347e82bbe4"}}, +{"id":"arduino","key":"arduino","value":{"rev":"3-22f6359c47412d086d50dc7f1a994139"}}, +{"id":"argon","key":"argon","value":{"rev":"3-ba12426ce67fac01273310cb3909b855"}}, +{"id":"argparse","key":"argparse","value":{"rev":"8-5e841e38cca6cfc3fe1d1f507a7f47ee"}}, +{"id":"argparser","key":"argparser","value":{"rev":"19-b8793bfc005dd84e1213ee53ae56206d"}}, +{"id":"argsparser","key":"argsparser","value":{"rev":"26-d31eca2f41546172763af629fc50631f"}}, +{"id":"argtype","key":"argtype","value":{"rev":"10-96a7d23e571d56cf598472115bcac571"}}, +{"id":"arguments","key":"arguments","value":{"rev":"7-767de2797f41702690bef5928ec7c6e9"}}, +{"id":"armory","key":"armory","value":{"rev":"41-ea0f7bd0868c11fc9986fa708e11e071"}}, +{"id":"armrest","key":"armrest","value":{"rev":"3-bbe40b6320b6328211be33425bed20c8"}}, +{"id":"arnold","key":"arnold","value":{"rev":"3-4896fc8d02b8623f47a024f0dbfa44bf"}}, +{"id":"arouter","key":"arouter","value":{"rev":"7-55cab1f7128df54f27be94039a8d8dc5"}}, +{"id":"array-promise","key":"array-promise","value":{"rev":"3-e2184561ee65de64c2dfeb57955c758f"}}, +{"id":"arrayemitter","key":"arrayemitter","value":{"rev":"3-d64c917ac1095bfcbf173dac88d3d148"}}, +{"id":"asEvented","key":"asEvented","value":{"rev":"3-2ad3693b49d4d9dc9a11c669033a356e"}}, +{"id":"asciimo","key":"asciimo","value":{"rev":"12-50130f5ac2ef4d95df190be2c8ede893"}}, +{"id":"asereje","key":"asereje","value":{"rev":"15-84853499f89a87109ddf47ba692323ba"}}, +{"id":"ash","key":"ash","value":{"rev":"6-3697a3aee708bece8a08c7e0d1010476"}}, +{"id":"ask","key":"ask","value":{"rev":"3-321bbc3837d749b5d97bff251693a825"}}, +{"id":"asn1","key":"asn1","value":{"rev":"13-e681a814a4a1439a22b19e141b45006f"}}, +{"id":"aspsms","key":"aspsms","value":{"rev":"9-7b82d722bdac29a4da8c88b642ad64f2"}}, +{"id":"assert","key":"assert","value":{"rev":"3-85480762f5cb0be2cb85f80918257189"}}, +{"id":"assertions","key":"assertions","value":{"rev":"9-d797d4c09aa994556c7d5fdb4e86fe1b"}}, +{"id":"assertn","key":"assertn","value":{"rev":"6-080a4fb5d2700a6850d56b58c6f6ee9e"}}, +{"id":"assertvanish","key":"assertvanish","value":{"rev":"13-3b0b555ff77c1bfc2fe2642d50879648"}}, +{"id":"asset","key":"asset","value":{"rev":"33-cb70b68e0e05e9c9a18b3d89f1bb43fc"}}, +{"id":"assetgraph","key":"assetgraph","value":{"rev":"82-7853d644e64741b46fdd29a997ec4852"}}, +{"id":"assetgraph-builder","key":"assetgraph-builder","value":{"rev":"61-1ed98d95f3589050037851edde760a01"}}, +{"id":"assetgraph-sprite","key":"assetgraph-sprite","value":{"rev":"15-351b5fd9e50a3dda8580d014383423e0"}}, +{"id":"assets-expander","key":"assets-expander","value":{"rev":"11-f9e1197b773d0031dd015f1d871b87c6"}}, +{"id":"assets-packager","key":"assets-packager","value":{"rev":"13-51f7d2d57ed35be6aff2cc2aa2fa74db"}}, +{"id":"assoc","key":"assoc","value":{"rev":"9-07098388f501da16bf6afe6c9babefd5"}}, +{"id":"ast-inlining","key":"ast-inlining","value":{"rev":"5-02e7e2c3a06ed81ddc61980f778ac413"}}, +{"id":"ast-transformer","key":"ast-transformer","value":{"rev":"5-b4020bb763b8839afa8d3ac0d54a6f26"}}, +{"id":"astar","key":"astar","value":{"rev":"3-3df8c56c64c3863ef0650c0c74e2801b"}}, +{"id":"aster","key":"aster","value":{"rev":"7-b187c1270d3924f5ee04044e579d2df9"}}, +{"id":"asterisk-manager","key":"asterisk-manager","value":{"rev":"3-7fbf4294dafee04cc17cca4692c09c33"}}, +{"id":"astrolin","key":"astrolin","value":{"rev":"3-30ac515a2388e7dc22b25c15346f6d7e"}}, +{"id":"asyn","key":"asyn","value":{"rev":"3-51996b0197c21e85858559045c1481b7"}}, +{"id":"async","key":"async","value":{"rev":"26-73aea795f46345a7e65d89ec75dff2f1"}}, +{"id":"async-array","key":"async-array","value":{"rev":"17-3ef5faff03333aa5b2a733ef36118066"}}, +{"id":"async-chain","key":"async-chain","value":{"rev":"9-10ec3e50b01567390d55973494e36d43"}}, +{"id":"async-ejs","key":"async-ejs","value":{"rev":"19-6f0e6e0eeb3cdb4c816ea427d8288d7d"}}, +{"id":"async-fs","key":"async-fs","value":{"rev":"3-b96906283d345604f784dfcdbeb21a63"}}, +{"id":"async-it","key":"async-it","value":{"rev":"7-6aed4439df25989cfa040fa4b5dd4ff2"}}, +{"id":"async-json","key":"async-json","value":{"rev":"5-589d5b6665d00c5bffb99bb142cac5d0"}}, +{"id":"async-memoizer","key":"async-memoizer","value":{"rev":"9-01d56f4dff95e61a39dab5ebee49d5dc"}}, +{"id":"async-object","key":"async-object","value":{"rev":"21-1bf28b0f8a7d875b54126437f3539f9b"}}, +{"id":"asyncEJS","key":"asyncEJS","value":{"rev":"3-28b1c94255381f23a4d4f52366255937"}}, +{"id":"async_testing","key":"async_testing","value":{"rev":"14-0275d8b608d8644dfe8d68a81fa07e98"}}, +{"id":"asyncevents","key":"asyncevents","value":{"rev":"3-de104847994365dcab5042db2b46fb84"}}, +{"id":"asyncify","key":"asyncify","value":{"rev":"3-3f6deb82ee1c6cb25e83a48fe6379b75"}}, +{"id":"asyncjs","key":"asyncjs","value":{"rev":"27-15903d7351f80ed37cb069aedbfc26cc"}}, +{"id":"asynct","key":"asynct","value":{"rev":"5-6be002b3e005d2d53b80fff32ccbd2ac"}}, +{"id":"at_scheduler","key":"at_scheduler","value":{"rev":"3-5587061c90218d2e99b6e22d5b488b0b"}}, +{"id":"atbar","key":"atbar","value":{"rev":"19-e9e906d4874afd4d8bf2d8349ed46dff"}}, +{"id":"atob","key":"atob","value":{"rev":"3-bc907d10dd2cfc940de586dc090451da"}}, +{"id":"audiolib","key":"audiolib","value":{"rev":"17-cb2f55ff50061081b440f0605cf0450c"}}, +{"id":"audit_couchdb","key":"audit_couchdb","value":{"rev":"24-6e620895b454b345b2aed13db847c237"}}, +{"id":"auditor","key":"auditor","value":{"rev":"11-c4df509d40650c015943dd90315a12c0"}}, +{"id":"authnet_cim","key":"authnet_cim","value":{"rev":"7-f02bbd206ac2b8c05255bcd8171ac1eb"}}, +{"id":"autocomplete","key":"autocomplete","value":{"rev":"3-f2773bca040d5abcd0536dbebe5847bf"}}, +{"id":"autodafe","key":"autodafe","value":{"rev":"7-a75262b53a9dd1a25693adecde7206d7"}}, +{"id":"autolint","key":"autolint","value":{"rev":"7-07f885902d72b52678fcc57aa4b9c592"}}, +{"id":"autoload","key":"autoload","value":{"rev":"5-9247704d9a992a175e3ae49f4af757d0"}}, +{"id":"autoloader","key":"autoloader","value":{"rev":"11-293c20c34d0c81fac5c06b699576b1fe"}}, +{"id":"auton","key":"auton","value":{"rev":"25-4fcb7a62b607b7929b62a9b792afef55"}}, +{"id":"autoreleasepool","key":"autoreleasepool","value":{"rev":"5-5d2798bf74bbec583cc6f19127e3c89e"}}, +{"id":"autorequire","key":"autorequire","value":{"rev":"9-564a46b355532fcec24db0afc99daed5"}}, +{"id":"autotest","key":"autotest","value":{"rev":"7-e319995dd0e1fbd935c14c46b1234f77"}}, +{"id":"awesome","key":"awesome","value":{"rev":"15-4458b746e4722214bd26ea15e453288e"}}, +{"id":"aws","key":"aws","value":{"rev":"14-9a8f0989be29034d3fa5c66c594b649b"}}, +{"id":"aws-js","key":"aws-js","value":{"rev":"6-c61d87b8ad948cd065d2ca222808c209"}}, +{"id":"aws-lib","key":"aws-lib","value":{"rev":"36-9733e215c03d185a860574600a8feb14"}}, +{"id":"aws2js","key":"aws2js","value":{"rev":"35-42498f44a5ae7d4f3c84096b435d0e0b"}}, +{"id":"azure","key":"azure","value":{"rev":"5-2c4e05bd842d3dcfa419f4d2b67121e2"}}, +{"id":"b64","key":"b64","value":{"rev":"3-e5e727a46df4c8aad38acd117d717140"}}, +{"id":"b64url","key":"b64url","value":{"rev":"9-ab3b017f00a53b0078261254704c30ba"}}, +{"id":"ba","key":"ba","value":{"rev":"11-3cec7ec9a566fe95fbeb34271538d60a"}}, +{"id":"babelweb","key":"babelweb","value":{"rev":"11-8e6a2fe00822cec15573cdda48b6d0a0"}}, +{"id":"backbone","key":"backbone","value":{"rev":"37-79b95355f8af59bf9131e14d52b68edc"}}, +{"id":"backbone-browserify","key":"backbone-browserify","value":{"rev":"3-f25dac0b05a7f7aa5dbc0f4a1ad97969"}}, +{"id":"backbone-celtra","key":"backbone-celtra","value":{"rev":"3-775a5ebb25c1cd84723add52774ece84"}}, +{"id":"backbone-couch","key":"backbone-couch","value":{"rev":"8-548327b3cd7ee7a4144c9070377be5f6"}}, +{"id":"backbone-cradle","key":"backbone-cradle","value":{"rev":"3-b9bc220ec48b05eed1d4d77a746b10db"}}, +{"id":"backbone-dirty","key":"backbone-dirty","value":{"rev":"21-fa0f688cc95a85c0fc440733f09243b5"}}, +{"id":"backbone-dnode","key":"backbone-dnode","value":{"rev":"65-3212d3aa3284efb3bc0732bac71b5a2e"}}, +{"id":"backbone-proxy","key":"backbone-proxy","value":{"rev":"3-3602cb984bdd266516a3145663f9a5c6"}}, +{"id":"backbone-redis","key":"backbone-redis","value":{"rev":"9-2e3f6a9e095b00ccec9aa19b3fbc65eb"}}, +{"id":"backbone-rel","key":"backbone-rel","value":{"rev":"5-f9773dc85f1c502e61c163a22d2f74aa"}}, +{"id":"backbone-simpledb","key":"backbone-simpledb","value":{"rev":"5-a815128e1e3593696f666f8b3da36d78"}}, +{"id":"backbone-stash","key":"backbone-stash","value":{"rev":"19-8d3cc5f9ed28f9a56856154e2b4e7f78"}}, +{"id":"backplane","key":"backplane","value":{"rev":"7-f69188dac21e007b09efe1b5b3575087"}}, +{"id":"backport-0.4","key":"backport-0.4","value":{"rev":"11-25e15f01f1ef9e626433a82284bc00d6"}}, +{"id":"backuptweets","key":"backuptweets","value":{"rev":"3-68712682aada41082d3ae36c03c8f899"}}, +{"id":"bake","key":"bake","value":{"rev":"113-ce13508ba2b4f15aa4df06d796aa4573"}}, +{"id":"bal-util","key":"bal-util","value":{"rev":"31-b818725a5af131c89ec66b9fdebf2122"}}, +{"id":"balancer","key":"balancer","value":{"rev":"7-63dcb4327081a8ec4d6c51a21253cb4b"}}, +{"id":"bancroft","key":"bancroft","value":{"rev":"11-8fa3370a4615a0ed4ba411b05c0285f4"}}, +{"id":"bandcamp","key":"bandcamp","value":{"rev":"41-f2fee472d63257fdba9e5fa8ad570ee8"}}, +{"id":"banner","key":"banner","value":{"rev":"19-89a447e2136b2fabddbad84abcd63a27"}}, +{"id":"banzai-docstore-couchdb","key":"banzai-docstore-couchdb","value":{"rev":"5-950c115737d634e2f48ee1c772788321"}}, +{"id":"banzai-redis","key":"banzai-redis","value":{"rev":"3-446f29e0819fd79c810fdfa8ce05bdcf"}}, +{"id":"banzai-statestore-couchdb","key":"banzai-statestore-couchdb","value":{"rev":"5-c965442821741ce6f20e266fe43aea4a"}}, +{"id":"banzai-statestore-mem","key":"banzai-statestore-mem","value":{"rev":"3-a0891a1a2344922d91781c332ed26528"}}, +{"id":"bar","key":"bar","value":{"rev":"7-fbb44a76cb023e6a8941f15576cf190b"}}, +{"id":"barc","key":"barc","value":{"rev":"7-dfe352b410782543d6b1aea292f123eb"}}, +{"id":"barista","key":"barista","value":{"rev":"9-d3f3c776453ba69a81947f34d7cc3cbf"}}, +{"id":"bark","key":"bark","value":{"rev":"20-fc1a94f80cfa199c16aa075e940e06dc"}}, +{"id":"barricane-db","key":"barricane-db","value":{"rev":"3-450947b9a05047fe195f76a69a3144e8"}}, +{"id":"base-converter","key":"base-converter","value":{"rev":"7-1b49b01df111176b89343ad56ac68d5c"}}, +{"id":"base32","key":"base32","value":{"rev":"11-d686c54c9de557681356e74b83d916e8"}}, +{"id":"base64","key":"base64","value":{"rev":"24-bd713c3d7e96fad180263ed7563c595e"}}, +{"id":"bash","key":"bash","value":{"rev":"3-86a1c61babfa47da0ebc14c2f4e59a6a"}}, +{"id":"basic-auth","key":"basic-auth","value":{"rev":"3-472a87af27264ae81bd4394d70792e55"}}, +{"id":"basicFFmpeg","key":"basicFFmpeg","value":{"rev":"15-3e87a41c543bde1e6f7c49d021fda62f"}}, +{"id":"basicauth","key":"basicauth","value":{"rev":"3-15d95a05b6f5e7b6d7261f87c4eb73de"}}, +{"id":"basil-cookie","key":"basil-cookie","value":{"rev":"11-fff96b263f31b9d017e3cf59bf6fb23f"}}, +{"id":"batik","key":"batik","value":{"rev":"7-a19ce28cbbf54649fa225ed5474eff02"}}, +{"id":"batman","key":"batman","value":{"rev":"15-6af5469bf143790cbb4af196824c9e95"}}, +{"id":"batteries","key":"batteries","value":{"rev":"13-656c68fe887f4af3ef1e720e64275f4e"}}, +{"id":"bbcode","key":"bbcode","value":{"rev":"5-e79a8b62125f8a3a1751bf7bd8875f33"}}, +{"id":"bcrypt","key":"bcrypt","value":{"rev":"31-db8496d1239362a97a26f1e5eeb8a733"}}, +{"id":"beaconpush","key":"beaconpush","value":{"rev":"3-956fcd87a6d3f9d5b9775d47e36aa3e5"}}, +{"id":"bean","key":"bean","value":{"rev":"56-151c1558e15016205e65bd515eab9ee0"}}, +{"id":"bean.database.mongo","key":"bean.database.mongo","value":{"rev":"3-ede73166710137cbf570385b7e8f17fe"}}, +{"id":"beandocs","key":"beandocs","value":{"rev":"3-9f7492984c95b69ca1ad30d40223f117"}}, +{"id":"beanpole","key":"beanpole","value":{"rev":"53-565a78a2304405cdc9f4a6b6101160fa"}}, +{"id":"beanprep","key":"beanprep","value":{"rev":"3-bd387f0072514b8e44131671f9aad1b0"}}, +{"id":"beans","key":"beans","value":{"rev":"54-7f6d40a2a5bf228fe3547cce43edaa63"}}, +{"id":"beanstalk_client","key":"beanstalk_client","value":{"rev":"6-13c8c80aa6469b5dcf20d65909289383"}}, +{"id":"beanstalk_worker","key":"beanstalk_worker","value":{"rev":"6-45500991db97ed5a18ea96f3621bf99f"}}, +{"id":"beantest","key":"beantest","value":{"rev":"7-52d8160a0c0420c7d659b2ee10f26644"}}, +{"id":"beatit","key":"beatit","value":{"rev":"7-c0ba5f95b0601dcb628e4820555cc252"}}, +{"id":"beatport","key":"beatport","value":{"rev":"5-3b186b633ceea7f047e1df91e7b683a5"}}, +{"id":"beautifyjs","key":"beautifyjs","value":{"rev":"3-89ce050152aca0727c099060229ddc73"}}, +{"id":"beaver","key":"beaver","value":{"rev":"17-3b56116e8e40205e8efcedefee0319e3"}}, +{"id":"beeline","key":"beeline","value":{"rev":"11-92a4bd9524cc7aec3106efcacff6faed"}}, +{"id":"beet","key":"beet","value":{"rev":"95-3c9d9de63c363319b2201ac83bc0ee7d"}}, +{"id":"begin","key":"begin","value":{"rev":"3-b32a5eb1b9475353b37f90813ed89dce"}}, +{"id":"begin.js","key":"begin.js","value":{"rev":"7-9156869392a448595bf3e5723fcb7b57"}}, +{"id":"bejesus-api","key":"bejesus-api","value":{"rev":"11-6b42f8ffc370c494d01481b64536e91e"}}, +{"id":"bejesus-cli","key":"bejesus-cli","value":{"rev":"31-5fbbfe5ec1f6a0a7a3fafdf69230434a"}}, +{"id":"bem","key":"bem","value":{"rev":"22-c0e0f8d9e92b355246fd15058199b73c"}}, +{"id":"ben","key":"ben","value":{"rev":"3-debe52552a86f1e71895dd5d32add585"}}, +{"id":"bench","key":"bench","value":{"rev":"14-20987e1becf3acd1bd1833b04712c87c"}}, +{"id":"bencher","key":"bencher","value":{"rev":"3-08866a8fdcf180582b43690bbbf21087"}}, +{"id":"benchmark","key":"benchmark","value":{"rev":"219-0669bc24f3f2918d93369bb0d801abf3"}}, +{"id":"bencode","key":"bencode","value":{"rev":"8-7b9eff4c1658fb3a054ebc6f50e6edcd"}}, +{"id":"beseda","key":"beseda","value":{"rev":"49-5cc8c4e9bb3e836de7db58c3adf9a5bb"}}, +{"id":"bf","key":"bf","value":{"rev":"14-d81312e1bf4f7202b801b4343199aa55"}}, +{"id":"biggie-router","key":"biggie-router","value":{"rev":"42-56a546a78d5abd4402183b3d300d563e"}}, +{"id":"bigint","key":"bigint","value":{"rev":"58-02f368567849596219d6a0e87d9bc6b9"}}, +{"id":"bignumber","key":"bignumber","value":{"rev":"3-6e372428992a767e0a991ec3f39b8343"}}, +{"id":"binary","key":"binary","value":{"rev":"47-947aa2f5238a68e34b164ef7e50ece28"}}, +{"id":"binarySearch","key":"binarySearch","value":{"rev":"15-93a3d2f9c2690457023b5ae5f3d00446"}}, +{"id":"bind","key":"bind","value":{"rev":"9-b74d0af83e90a2655e564ab64bf1d27d"}}, +{"id":"binpack","key":"binpack","value":{"rev":"7-3dc67a64e0ef01f3aa59441c5150e04f"}}, +{"id":"bintrees","key":"bintrees","value":{"rev":"12-507fcd92f447f81842cba08cacb425cf"}}, +{"id":"bisection","key":"bisection","value":{"rev":"5-f785ea3bbd8fcc7cd9381d20417b87bb"}}, +{"id":"bison","key":"bison","value":{"rev":"12-e663b2ef96650b3b5a0cc36524e1b94a"}}, +{"id":"bitcoder","key":"bitcoder","value":{"rev":"8-19c957d6b845f4d7ad531951c971e03d"}}, +{"id":"bitcoin","key":"bitcoin","value":{"rev":"13-af88a28c02ab146622743c4c1c32e87b"}}, +{"id":"bitcoin-impl","key":"bitcoin-impl","value":{"rev":"8-99068f1d259e3c75209a6bd08e3e06a2"}}, +{"id":"bitcoin-p2p","key":"bitcoin-p2p","value":{"rev":"25-6df0283eb6e419bc3a1571f17721b100"}}, +{"id":"bitcoinjs-mongoose","key":"bitcoinjs-mongoose","value":{"rev":"3-57e239b31e218693f8cf3cf1cf098437"}}, +{"id":"bitly","key":"bitly","value":{"rev":"8-d6bfac8338e223fe62538954d2e9246a"}}, +{"id":"bitly.node","key":"bitly.node","value":{"rev":"3-15329b7a77633e0dae2c720e592420fb"}}, +{"id":"biwascheme","key":"biwascheme","value":{"rev":"3-37a85eed1bd2d4ee85ef1e100e7ebe8f"}}, +{"id":"black","key":"black","value":{"rev":"3-e07ae2273357da5894f4b7cdf1b20560"}}, +{"id":"black_coffee","key":"black_coffee","value":{"rev":"3-c5c764cf550ad3c831a085509f64cdfb"}}, +{"id":"bleach","key":"bleach","value":{"rev":"5-ef3ab7e761a6903eb70da1550a07e53d"}}, +{"id":"blend","key":"blend","value":{"rev":"16-c5dd075b3ede45f91056b4b768b2bfe8"}}, +{"id":"bless","key":"bless","value":{"rev":"29-1b9bc6f17acd144f51a297e4bdccfe0e"}}, +{"id":"blitz","key":"blitz","value":{"rev":"5-8bf6786f6fd7dbc0570ba21f803f35e6"}}, +{"id":"blo","key":"blo","value":{"rev":"5-9e752ea37438ea026e88a7aa7e7a91ba"}}, +{"id":"blog","key":"blog","value":{"rev":"13-80fc7b11d73e23ca7e518d271d1836ee"}}, +{"id":"blogmate","key":"blogmate","value":{"rev":"11-e503081be9290647c841aa8c04eb6e70"}}, +{"id":"bloodmoney","key":"bloodmoney","value":{"rev":"3-859b0235de3a29bf241323a31f9aa730"}}, +{"id":"bloom","key":"bloom","value":{"rev":"15-c609882b29d61a771d7dbf17f43016ad"}}, +{"id":"blue","key":"blue","value":{"rev":"6-e84221f7286dffbfda6f8abc6306064c"}}, +{"id":"bluemold","key":"bluemold","value":{"rev":"11-f48528b642b5d38d7c02b03622117fa7"}}, +{"id":"bn-lang","key":"bn-lang","value":{"rev":"3-266f186334f69448a940081589e82b04"}}, +{"id":"bn-lang-util","key":"bn-lang-util","value":{"rev":"3-0bc44f1d7d3746120dd835bfb685e229"}}, +{"id":"bn-log","key":"bn-log","value":{"rev":"5-db81a8a978071efd24b45e350e8b8954"}}, +{"id":"bn-template","key":"bn-template","value":{"rev":"3-604e77465ab1dc7e17f3b325089651ec"}}, +{"id":"bn-time","key":"bn-time","value":{"rev":"3-9c33587e783a98e1ccea409cacd5bbfb"}}, +{"id":"bn-unit","key":"bn-unit","value":{"rev":"3-5f35e3fd446241f682231bedcf846c0a"}}, +{"id":"bncode","key":"bncode","value":{"rev":"7-915a1759135a9837954c0ead58bf8e5a"}}, +{"id":"bnf","key":"bnf","value":{"rev":"5-4fe80fcafcc7a263f28b8dc62093bd8d"}}, +{"id":"bob","key":"bob","value":{"rev":"9-9ceeb581263c04793a2231b3726ab22b"}}, +{"id":"bogart","key":"bogart","value":{"rev":"30-70aed6f0827d2bd09963afddcad7a34a"}}, +{"id":"boil","key":"boil","value":{"rev":"3-7ab0fc3b831c591fd15711c27a6f5de0"}}, +{"id":"bolt","key":"bolt","value":{"rev":"3-138dfbdea2ab53ca714ca51494d32610"}}, +{"id":"bones","key":"bones","value":{"rev":"70-c74f0845c167cd755250fc7b4b9b40c2"}}, +{"id":"bones-admin","key":"bones-admin","value":{"rev":"11-2cdfe738d66aacff8569712a279c041d"}}, +{"id":"bones-auth","key":"bones-auth","value":{"rev":"35-2224f95bf3521809ce805ff215d2856c"}}, +{"id":"bones-document","key":"bones-document","value":{"rev":"13-95971fed1f47005c282e0fa60498e31c"}}, +{"id":"bonsai","key":"bonsai","value":{"rev":"3-67eb8935492d4ae9182a7ec74c1f36a6"}}, +{"id":"bonzo","key":"bonzo","value":{"rev":"142-7c5680b0f841c2263f06e96eb5237825"}}, +{"id":"bookbu","key":"bookbu","value":{"rev":"3-d9a104bccc67eae8a5dc6f0f4c3ba5fc"}}, +{"id":"bootstrap","key":"bootstrap","value":{"rev":"17-7a62dbe5e3323beb47165f13265f1a96"}}, +{"id":"borschik","key":"borschik","value":{"rev":"7-2570b5d6555a031394a55ff054797cb9"}}, +{"id":"bots","key":"bots","value":{"rev":"9-df43539c13d2996d9e32dff848615e8a"}}, +{"id":"bounce","key":"bounce","value":{"rev":"8-a3e424b2be1379743e9628c726facaa8"}}, +{"id":"bowser","key":"bowser","value":{"rev":"11-23ecc98edf5fde63fda626bb03da597f"}}, +{"id":"box2d","key":"box2d","value":{"rev":"6-5c920e9829764cbf904b9a59474c1672"}}, +{"id":"box2dnode","key":"box2dnode","value":{"rev":"3-12ffe24dcc1478ea0008c60c4ef7118f"}}, +{"id":"boxcar","key":"boxcar","value":{"rev":"5-a9ba953c547585285559d0e05c16e29e"}}, +{"id":"boxer","key":"boxer","value":{"rev":"8-60c49ff8574d5a47616796ad991463ad"}}, +{"id":"bracket-matcher","key":"bracket-matcher","value":{"rev":"27-a01c946c69665629e212a0f702be1b38"}}, +{"id":"brain","key":"brain","value":{"rev":"24-3aba33914e0f823505c69ef01361681b"}}, +{"id":"brainfuck","key":"brainfuck","value":{"rev":"7-adf33477ffe8640c9fdd6a0f8b349953"}}, +{"id":"brains","key":"brains","value":{"rev":"3-d7e7a95ea742f9b42fefb594c67c726a"}}, +{"id":"braintree","key":"braintree","value":{"rev":"14-eabe1c3e4e7cfd1f521f4bfd337611f7"}}, +{"id":"brazilnut","key":"brazilnut","value":{"rev":"3-4163b5a5598a8905c1283db9d260e5cc"}}, +{"id":"brazln","key":"brazln","value":{"rev":"29-15895bb5b193552826c196efe084caf2"}}, +{"id":"bread","key":"bread","value":{"rev":"9-093c9dd71fffb9a5b1c9eb8ac3e2a9b0"}}, +{"id":"breakfast","key":"breakfast","value":{"rev":"3-231e3046ede5e35e272dfab4a379015d"}}, +{"id":"brequire","key":"brequire","value":{"rev":"18-58b386e08541b222238aa12a13119fd9"}}, +{"id":"bricks","key":"bricks","value":{"rev":"15-f72e6c858c5bceb00cc34a16d52a7b59"}}, +{"id":"bricks-analytics","key":"bricks-analytics","value":{"rev":"3-dc2b6d2157c5039a4c36ceda46761b37"}}, +{"id":"bricks-compress","key":"bricks-compress","value":{"rev":"5-580eeecaa30c210502f42c5e184344a3"}}, +{"id":"bricks-rewrite","key":"bricks-rewrite","value":{"rev":"5-7a141aacaa3fd706b97847c6e8f9830a"}}, +{"id":"brokenbin","key":"brokenbin","value":{"rev":"5-bbc7a1c9628ed9f49b6d23e80c242852"}}, +{"id":"broker","key":"broker","value":{"rev":"9-756a097b948756e4bd7609b6f83a0847"}}, +{"id":"browscap","key":"browscap","value":{"rev":"12-c6fed16796d1ad84913f2617c66f0c7b"}}, +{"id":"browser-require","key":"browser-require","value":{"rev":"27-99f61fb3036ebc643282625649cc674f"}}, +{"id":"browserify","key":"browserify","value":{"rev":"163-c307ee153caf2160e5c32abd58898139"}}, +{"id":"browserjet","key":"browserjet","value":{"rev":"3-a386ab8911c410362eb8fceab5a998fe"}}, +{"id":"brt","key":"brt","value":{"rev":"3-b8452659a92039571ff1f877c8f874c7"}}, +{"id":"brunch","key":"brunch","value":{"rev":"113-64ae44857425c5d860d36f38ab3cf797"}}, +{"id":"brushes.js","key":"brushes.js","value":{"rev":"3-e28bd6597b949d84965a788928738f53"}}, +{"id":"bson","key":"bson","value":{"rev":"50-9d9db515dd9d2a4d873d186f324767a5"}}, +{"id":"btc-ex-api","key":"btc-ex-api","value":{"rev":"3-cabbf284cb01af79ee183d8023106762"}}, +{"id":"btoa","key":"btoa","value":{"rev":"3-b4a124b3650a746b8da9c9f93f386bac"}}, +{"id":"btoa-atob","key":"btoa-atob","value":{"rev":"3-baac60a3f04487333cc0364301220a53"}}, +{"id":"bucket","key":"bucket","value":{"rev":"3-5c2da8f67e29de1c29adbf51ad7d7299"}}, +{"id":"buffalo","key":"buffalo","value":{"rev":"9-6c763d939d775a255c65ba8dcf0d5372"}}, +{"id":"bufferjs","key":"bufferjs","value":{"rev":"13-b6e09e35ec822714d3ec485ac2010272"}}, +{"id":"bufferlib","key":"bufferlib","value":{"rev":"16-d48d96815fc7709d6b7d0a8bfc67f053"}}, +{"id":"bufferlist","key":"bufferlist","value":{"rev":"18-6fcedc10ffbca1afdc866e208d2f906a"}}, +{"id":"buffers","key":"buffers","value":{"rev":"11-3a70ec2da112befdc65b8c02772b8c44"}}, +{"id":"bufferstream","key":"bufferstream","value":{"rev":"82-6f82c5affb3906ebbaa0b116baf73c54"}}, +{"id":"buffertools","key":"buffertools","value":{"rev":"20-68f90e224f81fab81295f9079dc3c0fc"}}, +{"id":"buffoon","key":"buffoon","value":{"rev":"9-1cdc1cbced94691e836d4266eed7c143"}}, +{"id":"builder","key":"builder","value":{"rev":"25-b9679e2aaffec1ac6d59fdd259d9590c"}}, +{"id":"buildr","key":"buildr","value":{"rev":"69-cb3a756903a6322c6f9f4dd1c384a607"}}, +{"id":"bumper","key":"bumper","value":{"rev":"3-1e8d17aa3b29815e4069294cc9ce572c"}}, +{"id":"bundle","key":"bundle","value":{"rev":"39-46fde9cd841bce1fbdd92f6a1235c308"}}, +{"id":"bunker","key":"bunker","value":{"rev":"7-ed993a296fa0b8d3c3a7cd759d6f371e"}}, +{"id":"burari","key":"burari","value":{"rev":"11-08b61073d6ad0ef0c7449a574dc8f54b"}}, +{"id":"burrito","key":"burrito","value":{"rev":"38-3f3b109972720647f5412f3a2478859b"}}, +{"id":"busbuddy","key":"busbuddy","value":{"rev":"5-298ec29f6307351cf7a19bceebe957c7"}}, +{"id":"buster","key":"buster","value":{"rev":"9-870a6e9638806adde2f40105900cd4b3"}}, +{"id":"buster-args","key":"buster-args","value":{"rev":"7-9b189c602e437a505625dbf7fef5dead"}}, +{"id":"buster-assertions","key":"buster-assertions","value":{"rev":"5-fa34a8a5e7cf4dd08c2d02c39de3b563"}}, +{"id":"buster-cli","key":"buster-cli","value":{"rev":"5-b1a85006e41dbf74313253c571e63874"}}, +{"id":"buster-client","key":"buster-client","value":{"rev":"5-340637ec63b54bb01c1313a78db01945"}}, +{"id":"buster-configuration","key":"buster-configuration","value":{"rev":"3-a12e7ff172562b513534fc26be00aaed"}}, +{"id":"buster-core","key":"buster-core","value":{"rev":"5-871df160645e6684111a8fd02ff0eee9"}}, +{"id":"buster-evented-logger","key":"buster-evented-logger","value":{"rev":"5-c46681e6275a76723e3bc834555dbe32"}}, +{"id":"buster-format","key":"buster-format","value":{"rev":"5-e193e90436c7f941739b82adad86bdd8"}}, +{"id":"buster-module-loader","key":"buster-module-loader","value":{"rev":"5-4148b61f8b718e6181aa6054664a7c44"}}, +{"id":"buster-multicast","key":"buster-multicast","value":{"rev":"3-79480b5be761d243b274cb1e77375afc"}}, +{"id":"buster-promise","key":"buster-promise","value":{"rev":"5-b50030957fbd70e65576faa9c541b739"}}, +{"id":"buster-script-loader","key":"buster-script-loader","value":{"rev":"3-85af28b5bc4e647f27514fede19a144e"}}, +{"id":"buster-server","key":"buster-server","value":{"rev":"7-57b8b43047504818322018d2bbfee1f1"}}, +{"id":"buster-static","key":"buster-static","value":{"rev":"3-018c89d1524f7823934087f18dab9047"}}, +{"id":"buster-terminal","key":"buster-terminal","value":{"rev":"5-2c54c30ffa4a2d4b061e4c38e6b9b0e7"}}, +{"id":"buster-test","key":"buster-test","value":{"rev":"5-f7ee9c9f3b379e0ad5aa03d07581ad6f"}}, +{"id":"buster-test-cli","key":"buster-test-cli","value":{"rev":"9-c207974d20e95029cad5fa4c9435d152"}}, +{"id":"buster-user-agent-parser","key":"buster-user-agent-parser","value":{"rev":"5-7883085a203b3047b28ad08361219d1d"}}, +{"id":"buster-util","key":"buster-util","value":{"rev":"3-81977275a9c467ad79bb7e3f2b1caaa8"}}, +{"id":"butler","key":"butler","value":{"rev":"7-c964c4d213da6b0de2492ee57514d0f8"}}, +{"id":"byline","key":"byline","value":{"rev":"9-0b236ed5986c20136c0d581a244d52ac"}}, +{"id":"bz","key":"bz","value":{"rev":"7-d2a463b259c4e09dc9a79ddee9575ca0"}}, +{"id":"c2dm","key":"c2dm","value":{"rev":"11-a1e6a6643506bed3e1443155706aa5fe"}}, +{"id":"cabin","key":"cabin","value":{"rev":"7-df81ef56f0bb085d381c36600496dc57"}}, +{"id":"caboose","key":"caboose","value":{"rev":"49-7226441f91b63fb5c3ac240bd99d142a"}}, +{"id":"caboose-authentication","key":"caboose-authentication","value":{"rev":"3-9c71a9d7315fdea7d5f52fe52ecef118"}}, +{"id":"caboose-model","key":"caboose-model","value":{"rev":"3-967426d5acb8bb70e133f0052075dc1b"}}, +{"id":"cache2file","key":"cache2file","value":{"rev":"17-ac9caec611a38e1752d91f8cc80cfb04"}}, +{"id":"caching","key":"caching","value":{"rev":"11-06041aaaa46b63ed36843685cac63245"}}, +{"id":"calais","key":"calais","value":{"rev":"11-f8ac2064ca45dd5b7db7ea099cd61dfb"}}, +{"id":"calc","key":"calc","value":{"rev":"3-bead9c5b0bee34e44e7c04aa2bf9cd68"}}, +{"id":"calipso","key":"calipso","value":{"rev":"87-b562676045a66a3ec702591c67a9635e"}}, +{"id":"caman","key":"caman","value":{"rev":"15-4b97c73f0ac101c68335de2937483893"}}, +{"id":"camanjs","key":"camanjs","value":{"rev":"3-2856bbdf7a1d454929b4a80b119e3da0"}}, +{"id":"camelot","key":"camelot","value":{"rev":"7-8e257c5213861ecbd229ee737a3a8bb4"}}, +{"id":"campusbooks","key":"campusbooks","value":{"rev":"18-489be33c6ac2d6cbcf93355f2b129389"}}, +{"id":"canvas","key":"canvas","value":{"rev":"78-27dbf5b6e0a25ba5886d485fd897d701"}}, +{"id":"canvasutil","key":"canvasutil","value":{"rev":"7-0b87a370d673886efb7763aaf500b744"}}, +{"id":"capoo","key":"capoo","value":{"rev":"9-136a3ddf489228d5f4b504b1da619447"}}, +{"id":"capsule","key":"capsule","value":{"rev":"19-ad3c9ba0af71a84228e6dd360017f379"}}, +{"id":"capt","key":"capt","value":{"rev":"13-0805d789000fb2e361103a5e62379196"}}, +{"id":"carena","key":"carena","value":{"rev":"10-d38e8c336a0dbb8091514f638b22b96b"}}, +{"id":"carrier","key":"carrier","value":{"rev":"20-b2b4a0560d40eeac617000e9e22a9e9d"}}, +{"id":"cart","key":"cart","value":{"rev":"12-493e79c6fa0b099626e90da79a69f1e5"}}, +{"id":"carto","key":"carto","value":{"rev":"45-8eab07e2fac57396dd62af5805062387"}}, +{"id":"caruso","key":"caruso","value":{"rev":"5-d58e22212b0bcebbab4b42adc68799aa"}}, +{"id":"cas","key":"cas","value":{"rev":"3-82a93160eb9add99bde1599e55d18fd8"}}, +{"id":"cas-auth","key":"cas-auth","value":{"rev":"3-b02f77c198050b99f1df18f637e77c10"}}, +{"id":"cas-client","key":"cas-client","value":{"rev":"3-ca69e32a3053bc680d1dddc57271483b"}}, +{"id":"cashew","key":"cashew","value":{"rev":"7-9e81cde34263adad6949875c4b33ee99"}}, +{"id":"cassandra","key":"cassandra","value":{"rev":"3-8617ef73fdc73d02ecec74d31f98e463"}}, +{"id":"cassandra-client","key":"cassandra-client","value":{"rev":"19-aa1aef5d203be5b0eac678284f1a979f"}}, +{"id":"casset","key":"casset","value":{"rev":"3-2052c7feb5b89c77aaa279c8b50126ce"}}, +{"id":"castaneum","key":"castaneum","value":{"rev":"26-4dc55ba2482cca4230b4bc77ecb5b70d"}}, +{"id":"cat","key":"cat","value":{"rev":"3-75f20119b363b85c1a8433e26b86c943"}}, +{"id":"catchjs","key":"catchjs","value":{"rev":"3-ffda7eff7613de37f629dc7a831ffda1"}}, +{"id":"caterpillar","key":"caterpillar","value":{"rev":"5-bc003e3af33240e67b4c3042f308b7da"}}, +{"id":"causeeffect","key":"causeeffect","value":{"rev":"9-7e4e25bff656170c97cb0cce1b2ab6ca"}}, +{"id":"cayenne","key":"cayenne","value":{"rev":"5-2797f561467b41cc45804e5498917800"}}, +{"id":"ccn4bnode","key":"ccn4bnode","value":{"rev":"17-96f55189e5c98f0fa8200e403a04eb39"}}, +{"id":"ccnq3_config","key":"ccnq3_config","value":{"rev":"21-40345771769a9cadff4af9113b8124c2"}}, +{"id":"ccnq3_logger","key":"ccnq3_logger","value":{"rev":"5-4aa168dc24425938a29cf9ac456158d7"}}, +{"id":"ccnq3_portal","key":"ccnq3_portal","value":{"rev":"17-84e629ec1eaba1722327ccb9dddb05cf"}}, +{"id":"ccnq3_roles","key":"ccnq3_roles","value":{"rev":"43-97de74b08b1af103da8905533a84b749"}}, +{"id":"ccss","key":"ccss","value":{"rev":"11-b9beb506410ea81581ba4c7dfe9b2a7d"}}, +{"id":"cdb","key":"cdb","value":{"rev":"13-d7b6f609f069dc738912b405aac558ab"}}, +{"id":"cdb_changes","key":"cdb_changes","value":{"rev":"13-1dc99b096cb91c276332b651396789e8"}}, +{"id":"celeri","key":"celeri","value":{"rev":"17-b19294619ef6c2056f3bf6641e8945c2"}}, +{"id":"celery","key":"celery","value":{"rev":"5-bdfccd483cf30c4c10c5ec0963de1248"}}, +{"id":"cempl8","key":"cempl8","value":{"rev":"21-bb9547b78a1548fe11dc1d5b816b6da1"}}, +{"id":"cfg","key":"cfg","value":{"rev":"3-85c7651bb8f16b057e60a46946eb95af"}}, +{"id":"cgi","key":"cgi","value":{"rev":"17-7ceac458c7f141d4fbbf05d267a72aa8"}}, +{"id":"chain","key":"chain","value":{"rev":"9-b0f175c5ad0173bcb7e11e58b02a7394"}}, +{"id":"chain-gang","key":"chain-gang","value":{"rev":"22-b0e6841a344b65530ea2a83a038e5aa6"}}, +{"id":"chainer","key":"chainer","value":{"rev":"15-8c6a565035225a1dcca0177e92ccf42d"}}, +{"id":"chainify","key":"chainify","value":{"rev":"3-0926790f18a0016a9943cfb4830e0187"}}, +{"id":"chains","key":"chains","value":{"rev":"5-d9e1ac38056e2638e38d9a7c415929c6"}}, +{"id":"chainsaw","key":"chainsaw","value":{"rev":"24-82e078efbbc59f798d29a0259481012e"}}, +{"id":"changelog","key":"changelog","value":{"rev":"27-317e473de0bf596b273a9dadecea126d"}}, +{"id":"channel-server","key":"channel-server","value":{"rev":"3-3c882f7e61686e8a124b5198c638a18e"}}, +{"id":"channels","key":"channels","value":{"rev":"5-0b532f054886d9094cb98493ee0a7a16"}}, +{"id":"chaos","key":"chaos","value":{"rev":"40-7caa4459d398f5ec30fea91d087f0d71"}}, +{"id":"chard","key":"chard","value":{"rev":"3-f2de35f7a390ea86ac0eb78bf720d0de"}}, +{"id":"charenc","key":"charenc","value":{"rev":"3-092036302311a8f5779b800c98170b5b"}}, +{"id":"chargify","key":"chargify","value":{"rev":"5-e3f29f2816b04c26ca047d345928e2c1"}}, +{"id":"charm","key":"charm","value":{"rev":"13-3e7e7b5babc1efc472e3ce62eec2c0c7"}}, +{"id":"chat-server","key":"chat-server","value":{"rev":"7-c73b785372474e083fb8f3e9690761da"}}, +{"id":"chatroom","key":"chatroom","value":{"rev":"3-f4fa8330b7eb277d11407f968bffb6a2"}}, +{"id":"chatspire","key":"chatspire","value":{"rev":"3-081e167e3f7c1982ab1b7fc3679cb87c"}}, +{"id":"checkip","key":"checkip","value":{"rev":"3-b31d58a160a4a3fe2f14cfbf2217949e"}}, +{"id":"cheddar-getter","key":"cheddar-getter","value":{"rev":"3-d675ec138ea704df127fabab6a52a8dc"}}, +{"id":"chess","key":"chess","value":{"rev":"3-8b15268c8b0fb500dcbc83b259e7fb88"}}, +{"id":"chessathome-worker","key":"chessathome-worker","value":{"rev":"7-cdfd411554c35ba7a52e54f7744bed35"}}, +{"id":"chirkut.js","key":"chirkut.js","value":{"rev":"3-c0e515eee0f719c5261a43e692a3585c"}}, +{"id":"chiron","key":"chiron","value":{"rev":"6-ccb575e432c1c1981fc34b4e27329c85"}}, +{"id":"chopper","key":"chopper","value":{"rev":"5-168681c58c2a50796676dea73dc5398b"}}, +{"id":"choreographer","key":"choreographer","value":{"rev":"14-b0159823becdf0b4552967293968b2a8"}}, +{"id":"chromic","key":"chromic","value":{"rev":"3-c4ca0bb1f951db96c727241092afa9cd"}}, +{"id":"chrono","key":"chrono","value":{"rev":"9-6399d715df1a2f4696f89f2ab5d4d83a"}}, +{"id":"chuck","key":"chuck","value":{"rev":"3-71f2ee071d4b6fb2af3b8b828c51d8ab"}}, +{"id":"chunkedstream","key":"chunkedstream","value":{"rev":"3-b145ed7d1abd94ac44343413e4f823e7"}}, +{"id":"cider","key":"cider","value":{"rev":"10-dc20cd3eac9470e96911dcf75ac6492b"}}, +{"id":"cinch","key":"cinch","value":{"rev":"5-086af7f72caefb57284e4101cbe3c905"}}, +{"id":"cipherpipe","key":"cipherpipe","value":{"rev":"5-0b5590f808415a7297de6d45947d911f"}}, +{"id":"cjson","key":"cjson","value":{"rev":"25-02e3d327b48e77dc0f9e070ce9454ac2"}}, +{"id":"ck","key":"ck","value":{"rev":"3-f482385f5392a49353d8ba5eb9c7afef"}}, +{"id":"ckup","key":"ckup","value":{"rev":"26-90a76ec0cdf951dc2ea6058098407ee2"}}, +{"id":"class","key":"class","value":{"rev":"6-e2805f7d87586a66fb5fd170cf74b3b0"}}, +{"id":"class-42","key":"class-42","value":{"rev":"3-14c988567a2c78a857f15c9661bd6430"}}, +{"id":"class-js","key":"class-js","value":{"rev":"5-792fd04288a651dad87bc47eb91c2042"}}, +{"id":"classify","key":"classify","value":{"rev":"23-35eb336c350446f5ed49069df151dbb7"}}, +{"id":"clean-css","key":"clean-css","value":{"rev":"13-e30ea1007f6c5bb49e07276228b8a960"}}, +{"id":"clearInterval","key":"clearInterval","value":{"rev":"3-a49fa235d3dc14d28a3d15f8db291986"}}, +{"id":"clearTimeout","key":"clearTimeout","value":{"rev":"3-e838bd25adc825112922913c1a35b934"}}, +{"id":"cli","key":"cli","value":{"rev":"65-9e79c37c12d21b9b9114093de0773c54"}}, +{"id":"cli-color","key":"cli-color","value":{"rev":"9-0a8e775e713b1351f6a6648748dd16ec"}}, +{"id":"cli-table","key":"cli-table","value":{"rev":"3-9e447a8bb392fb7d9c534445a650e328"}}, +{"id":"clickatell","key":"clickatell","value":{"rev":"3-31f1a66d08a789976919df0c9280de88"}}, +{"id":"clicktime","key":"clicktime","value":{"rev":"9-697a99f5f704bfebbb454df47c9c472a"}}, +{"id":"clientexpress","key":"clientexpress","value":{"rev":"3-9b07041cd7b0c3967c4625ac74c9b50c"}}, +{"id":"cliff","key":"cliff","value":{"rev":"15-ef9ef25dbad08c0e346388522d94c5c3"}}, +{"id":"clip","key":"clip","value":{"rev":"21-c3936e566feebfe0beddb0bbb686c00d"}}, +{"id":"clock","key":"clock","value":{"rev":"5-19bc51841d41408b4446c0862487dc5e"}}, +{"id":"clog","key":"clog","value":{"rev":"5-1610fe2c0f435d2694a1707ee15cd11e"}}, +{"id":"clone","key":"clone","value":{"rev":"11-099d07f38381b54902c4cf5b93671ed4"}}, +{"id":"closure","key":"closure","value":{"rev":"7-9c2ac6b6ec9f14d12d10bfbfad58ec14"}}, +{"id":"closure-compiler","key":"closure-compiler","value":{"rev":"8-b3d2f9e3287dd33094a35d797d6beaf2"}}, +{"id":"cloud","key":"cloud","value":{"rev":"27-407c7aa77d3d4a6cc903d18b383de8b8"}}, +{"id":"cloud9","key":"cloud9","value":{"rev":"71-4af631e3fa2eb28058cb0d18ef3a6a3e"}}, +{"id":"cloudcontrol","key":"cloudcontrol","value":{"rev":"15-2df57385aa9bd92f7ed81e6892e23696"}}, +{"id":"cloudfiles","key":"cloudfiles","value":{"rev":"30-01f84ebda1d8f151b3e467590329960c"}}, +{"id":"cloudfoundry","key":"cloudfoundry","value":{"rev":"3-66fafd3d6b1353b1699d35e634686ab6"}}, +{"id":"cloudmailin","key":"cloudmailin","value":{"rev":"3-a4e3e4d457f5a18261bb8df145cfb418"}}, +{"id":"cloudnode-cli","key":"cloudnode-cli","value":{"rev":"17-3a80f7855ce618f7aee68bd693ed485b"}}, +{"id":"cloudservers","key":"cloudservers","value":{"rev":"42-6bc34f7e34f84a24078b43a609e96c59"}}, +{"id":"clucene","key":"clucene","value":{"rev":"37-3d613f12a857b8fe22fbf420bcca0dc3"}}, +{"id":"cluster","key":"cluster","value":{"rev":"83-63fb7a468d95502f94ea45208ba0a890"}}, +{"id":"cluster-isolatable","key":"cluster-isolatable","value":{"rev":"5-6af883cea9ab1c90bb126d8b3be2d156"}}, +{"id":"cluster-live","key":"cluster-live","value":{"rev":"7-549d19e9727f460c7de48f93b92e9bb3"}}, +{"id":"cluster-log","key":"cluster-log","value":{"rev":"7-9c47854df8ec911e679743185668a5f7"}}, +{"id":"cluster-loggly","key":"cluster-loggly","value":{"rev":"3-e1f7e331282d7b8317ce55e0fce7f934"}}, +{"id":"cluster-mail","key":"cluster-mail","value":{"rev":"9-dc18c5c1b2b265f3d531b92467b6cc35"}}, +{"id":"cluster-responsetimes","key":"cluster-responsetimes","value":{"rev":"3-c9e16daee15eb84910493264e973275c"}}, +{"id":"cluster-socket.io","key":"cluster-socket.io","value":{"rev":"7-29032f0b42575e9fe183a0af92191132"}}, +{"id":"cluster.exception","key":"cluster.exception","value":{"rev":"3-10856526e2f61e3000d62b12abd750e3"}}, +{"id":"clutch","key":"clutch","value":{"rev":"8-50283f7263c430cdd1d293c033571012"}}, +{"id":"cm1-route","key":"cm1-route","value":{"rev":"13-40e72b5a4277b500c98c966bcd2a8a86"}}, +{"id":"cmd","key":"cmd","value":{"rev":"9-9168fcd96fb1ba9449050162023f3570"}}, +{"id":"cmdopt","key":"cmdopt","value":{"rev":"3-85677533e299bf195e78942929cf9839"}}, +{"id":"cmp","key":"cmp","value":{"rev":"5-b10f873b78eb64e406fe55bd001ae0fa"}}, +{"id":"cmudict","key":"cmudict","value":{"rev":"3-cd028380bba917d5ed2be7a8d3b3b0b7"}}, +{"id":"cnlogger","key":"cnlogger","value":{"rev":"9-dbe7e0e50d25ca5ae939fe999c3c562b"}}, +{"id":"coa","key":"coa","value":{"rev":"11-ff4e634fbebd3f80b9461ebe58b3f64e"}}, +{"id":"cobra","key":"cobra","value":{"rev":"5-a3e0963830d350f4a7e91b438caf9117"}}, +{"id":"cockpit","key":"cockpit","value":{"rev":"3-1757b37245ee990999e4456b9a6b963e"}}, +{"id":"coco","key":"coco","value":{"rev":"104-eabc4d7096295c2156144a7581d89b35"}}, +{"id":"cocos2d","key":"cocos2d","value":{"rev":"19-88a5c75ceb6e7667665c056d174f5f1a"}}, +{"id":"codem-transcode","key":"codem-transcode","value":{"rev":"9-1faa2657d53271ccc44cce27de723e99"}}, +{"id":"codepad","key":"codepad","value":{"rev":"5-094ddce74dc057dc0a4d423d6d2fbc3a"}}, +{"id":"codetube","key":"codetube","value":{"rev":"3-819794145f199330e724864db70da53b"}}, +{"id":"coerce","key":"coerce","value":{"rev":"3-e7d392d497c0b8491b89fcbbd1a5a89f"}}, +{"id":"coffee-conf","key":"coffee-conf","value":{"rev":"3-883bc4767d70810ece2fdf1ccae883de"}}, +{"id":"coffee-css","key":"coffee-css","value":{"rev":"11-66ca197173751389b24945f020f198f9"}}, +{"id":"coffee-echonest","key":"coffee-echonest","value":{"rev":"3-3cd0e2b77103e334eccf6cf4168f39b2"}}, +{"id":"coffee-machine","key":"coffee-machine","value":{"rev":"9-02deb4d27fd5d56002ead122e9bb213e"}}, +{"id":"coffee-new","key":"coffee-new","value":{"rev":"67-0664b0f289030c38d113070fd26f4f71"}}, +{"id":"coffee-resque","key":"coffee-resque","value":{"rev":"22-5b022809317d3a873be900f1a697c5eb"}}, +{"id":"coffee-resque-retry","key":"coffee-resque-retry","value":{"rev":"29-1fb64819a4a21ebb4d774d9d4108e419"}}, +{"id":"coffee-revup","key":"coffee-revup","value":{"rev":"3-23aafa258bcdcf2bb68d143d61383551"}}, +{"id":"coffee-script","key":"coffee-script","value":{"rev":"60-a6c3739655f43953bd86283776586b95"}}, +{"id":"coffee-son","key":"coffee-son","value":{"rev":"3-84a81e7e24c8cb23293940fc1b87adfe"}}, +{"id":"coffee-toaster","key":"coffee-toaster","value":{"rev":"17-d43d7276c08b526c229c78b7d5acd6cc"}}, +{"id":"coffee-watcher","key":"coffee-watcher","value":{"rev":"3-3d861a748f0928c789cbdb8ff62b6091"}}, +{"id":"coffee-world","key":"coffee-world","value":{"rev":"15-46dc320f94fa64c39e183224ec59f47a"}}, +{"id":"coffee4clients","key":"coffee4clients","value":{"rev":"15-58fba7dd10bced0411cfe546b9336145"}}, +{"id":"coffeeapp","key":"coffeeapp","value":{"rev":"48-bece0a26b78afc18cd37d577f90369d9"}}, +{"id":"coffeebot","key":"coffeebot","value":{"rev":"3-a9007053f25a4c13b324f0ac7066803e"}}, +{"id":"coffeedoc","key":"coffeedoc","value":{"rev":"21-a955faafafd10375baf3101ad2c142d0"}}, +{"id":"coffeegrinder","key":"coffeegrinder","value":{"rev":"9-6e725aad7fd39cd38f41c743ef8a7563"}}, +{"id":"coffeekup","key":"coffeekup","value":{"rev":"35-9b1eecdb7b13d3e75cdc7b1045cf910a"}}, +{"id":"coffeemaker","key":"coffeemaker","value":{"rev":"9-4c5e665aa2a5b4efa2b7d077d0a4f9c1"}}, +{"id":"coffeemate","key":"coffeemate","value":{"rev":"71-03d0221fb495f2dc6732009884027b47"}}, +{"id":"coffeepack","key":"coffeepack","value":{"rev":"3-bbf0e27cb4865392164e7ab33f131d58"}}, +{"id":"coffeeq","key":"coffeeq","value":{"rev":"9-4e38e9742a0b9d7b308565729fbfd123"}}, +{"id":"coffeescript-growl","key":"coffeescript-growl","value":{"rev":"7-2bc1f93c4aad5fa8fb4bcfd1b3ecc279"}}, +{"id":"coffeescript-notify","key":"coffeescript-notify","value":{"rev":"3-8aeb31f8e892d3fefa421ff28a1b3de9"}}, +{"id":"collectd","key":"collectd","value":{"rev":"5-3d4c84b0363aa9c078157d82695557a1"}}, +{"id":"collection","key":"collection","value":{"rev":"3-a47e1fe91b9eebb3e75954e350ec2ca3"}}, +{"id":"collection_functions","key":"collection_functions","value":{"rev":"3-7366c721008062373ec924a409415189"}}, +{"id":"collections","key":"collections","value":{"rev":"3-0237a40d08a0da36c2dd01ce73a89bb2"}}, +{"id":"color","key":"color","value":{"rev":"15-4898b2cd9744feb3249ba10828c186f8"}}, +{"id":"color-convert","key":"color-convert","value":{"rev":"7-2ccb47c7f07a47286d9a2f39383d28f0"}}, +{"id":"color-string","key":"color-string","value":{"rev":"5-9a6336f420e001e301a15b88b0103696"}}, +{"id":"colorize","key":"colorize","value":{"rev":"3-ff380385edacc0c46e4c7b5c05302576"}}, +{"id":"colors","key":"colors","value":{"rev":"8-7c7fb9c5af038c978f0868c7706fe145"}}, +{"id":"colour-extractor","key":"colour-extractor","value":{"rev":"3-62e96a84c6adf23f438b5aac76c7b257"}}, +{"id":"coloured","key":"coloured","value":{"rev":"8-c5295f2d5a8fc08e93d180a4e64f8d38"}}, +{"id":"coloured-log","key":"coloured-log","value":{"rev":"14-8627a3625959443acad71e2c23dfc582"}}, +{"id":"comb","key":"comb","value":{"rev":"5-7f201b621ae9a890c7f5a31867eba3e9"}}, +{"id":"combine","key":"combine","value":{"rev":"14-bed33cd4389a2e4bb826a0516c6ae307"}}, +{"id":"combined-stream","key":"combined-stream","value":{"rev":"13-678f560200ac2835b9026e9e2b955cb0"}}, +{"id":"combiner","key":"combiner","value":{"rev":"3-5e7f133c8c14958eaf9e92bd79ae8ee1"}}, +{"id":"combohandler","key":"combohandler","value":{"rev":"7-d7e1a402f0066caa6756a8866de81dd9"}}, +{"id":"combyne","key":"combyne","value":{"rev":"23-05ebee9666a769e32600bc5548d10ce9"}}, +{"id":"comfy","key":"comfy","value":{"rev":"5-8bfe55bc16611dfe51a184b8f3eb31c1"}}, +{"id":"command-parser","key":"command-parser","value":{"rev":"5-8a5c3ed6dfa0fa55cc71b32cf52332fc"}}, +{"id":"commander","key":"commander","value":{"rev":"11-9dd16c00844d464bf66c101a57075401"}}, +{"id":"commando","key":"commando","value":{"rev":"3-e159f1890f3771dfd6e04f4d984f26f3"}}, +{"id":"common","key":"common","value":{"rev":"16-94eafcf104c0c7d1090e668ddcc12a5f"}}, +{"id":"common-exception","key":"common-exception","value":{"rev":"7-bd46358014299da814691c835548ef21"}}, +{"id":"common-node","key":"common-node","value":{"rev":"5-b2c4bef0e7022d5d453661a9c43497a8"}}, +{"id":"common-pool","key":"common-pool","value":{"rev":"5-c495fa945361ba4fdfb2ee8733d791b4"}}, +{"id":"common-utils","key":"common-utils","value":{"rev":"3-e5a047f118fc304281d2bc5e9ab18e62"}}, +{"id":"commondir","key":"commondir","value":{"rev":"3-ea49874d12eeb9adf28ca28989dfb5a9"}}, +{"id":"commonjs","key":"commonjs","value":{"rev":"6-39fcd0de1ec265890cf063effd0672e3"}}, +{"id":"commonjs-utils","key":"commonjs-utils","value":{"rev":"6-c0266a91dbd0a43effb7d30da5d9f35c"}}, +{"id":"commonkv","key":"commonkv","value":{"rev":"3-90b2fe4c79e263b044303706c4d5485a"}}, +{"id":"commons","key":"commons","value":{"rev":"6-0ecb654aa2bd17cf9519f86d354f8a50"}}, +{"id":"complete","key":"complete","value":{"rev":"7-acde8cba7677747d09c3d53ff165754e"}}, +{"id":"complex-search","key":"complex-search","value":{"rev":"5-c80b2c7f049f333bde89435f3de497ca"}}, +{"id":"compose","key":"compose","value":{"rev":"1-cf8a97d6ead3bef056d85daec5d36c70"}}, +{"id":"composer","key":"composer","value":{"rev":"6-1deb43725051f845efd4a7c8e68aa6d6"}}, +{"id":"compress","key":"compress","value":{"rev":"17-f0aacce1356f807b51e083490fb353bd"}}, +{"id":"compress-buffer","key":"compress-buffer","value":{"rev":"12-2886014c7f2541f4ddff9f0f55f4c171"}}, +{"id":"compress-ds","key":"compress-ds","value":{"rev":"5-9e4c6931edf104443353594ef50aa127"}}, +{"id":"compressor","key":"compressor","value":{"rev":"3-ee8ad155a98e1483d899ebcf82d5fb63"}}, +{"id":"concrete","key":"concrete","value":{"rev":"5-bc70bbffb7c6fe9e8c399db578fb3bae"}}, +{"id":"condo","key":"condo","value":{"rev":"9-5f03d58ee7dc29465defa3758f3b138a"}}, +{"id":"conductor","key":"conductor","value":{"rev":"8-1878afadcda7398063de6286c2d2c5c1"}}, +{"id":"conf","key":"conf","value":{"rev":"11-dcf0f6a93827d1b143cb1d0858f2be4a"}}, +{"id":"config","key":"config","value":{"rev":"37-2b741a1e6951a74b7f1de0d0547418a0"}}, +{"id":"config-loader","key":"config-loader","value":{"rev":"3-708cc96d1206de46fb450eb57ca07b0d"}}, +{"id":"configurator","key":"configurator","value":{"rev":"5-b31ad9731741d19f28241f6af5b41fee"}}, +{"id":"confu","key":"confu","value":{"rev":"7-c46f82c4aa9a17db6530b00669461eaf"}}, +{"id":"confy","key":"confy","value":{"rev":"3-893b33743830a0318dc99b1788aa92ee"}}, +{"id":"connect","key":"connect","value":{"rev":"151-8b5617fc6ece6c125b5f628936159bd6"}}, +{"id":"connect-access-control","key":"connect-access-control","value":{"rev":"3-ccf5fb09533d41eb0b564eb1caecf910"}}, +{"id":"connect-airbrake","key":"connect-airbrake","value":{"rev":"5-19db5e5828977540814d09f9eb7f028f"}}, +{"id":"connect-analytics","key":"connect-analytics","value":{"rev":"3-6f71c8b08ed9f5762c1a4425c196fb2a"}}, +{"id":"connect-app-cache","key":"connect-app-cache","value":{"rev":"27-3e69452dfe51cc907f8b188aede1bda8"}}, +{"id":"connect-assetmanager","key":"connect-assetmanager","value":{"rev":"46-f2a8834d2749e0c069cee06244e7501c"}}, +{"id":"connect-assetmanager-handlers","key":"connect-assetmanager-handlers","value":{"rev":"38-8b93821fcf46f20bbad4319fb39302c1"}}, +{"id":"connect-assets","key":"connect-assets","value":{"rev":"33-7ec2940217e29a9514d20cfd49af10f5"}}, +{"id":"connect-auth","key":"connect-auth","value":{"rev":"36-5640e82f3e2773e44ce47b0687436305"}}, +{"id":"connect-cache","key":"connect-cache","value":{"rev":"11-efe1f0ab00c181b1a4dece446ef13a90"}}, +{"id":"connect-coffee","key":"connect-coffee","value":{"rev":"3-3d4ebcfe083c9e5a5d587090f1bb4d65"}}, +{"id":"connect-conneg","key":"connect-conneg","value":{"rev":"3-bc3e04e65cf1f5233a38cc846e9a4a75"}}, +{"id":"connect-cookie-session","key":"connect-cookie-session","value":{"rev":"3-f48ca73aa1ce1111a2c962d219b59c1a"}}, +{"id":"connect-cors","key":"connect-cors","value":{"rev":"10-5bc9e3759671a0157fdc307872d38844"}}, +{"id":"connect-couchdb","key":"connect-couchdb","value":{"rev":"9-9adb6d24c7fb6de58bafe6d06fb4a230"}}, +{"id":"connect-cradle","key":"connect-cradle","value":{"rev":"5-0e5e32e00a9b98eff1ab010173d26ffb"}}, +{"id":"connect-docco","key":"connect-docco","value":{"rev":"9-c8e379f9a89db53f8921895ac4e87ed6"}}, +{"id":"connect-dojo","key":"connect-dojo","value":{"rev":"17-f323c634536b9b948ad9607f4ca0847f"}}, +{"id":"connect-esi","key":"connect-esi","value":{"rev":"45-01de7506d405856586ea77cb14022192"}}, +{"id":"connect-facebook","key":"connect-facebook","value":{"rev":"3-bf77eb01c0476e607b25bc9d93416b7e"}}, +{"id":"connect-force-domain","key":"connect-force-domain","value":{"rev":"5-a65755f93aaea8a21c7ce7dd4734dca0"}}, +{"id":"connect-form","key":"connect-form","value":{"rev":"16-fa786af79f062a05ecdf3e7cf48317e2"}}, +{"id":"connect-geoip","key":"connect-geoip","value":{"rev":"3-d87f93bcac58aa7904886a8fb6c45899"}}, +{"id":"connect-googleapps","key":"connect-googleapps","value":{"rev":"13-49c5c6c6724b21eea9a8eaae2165978d"}}, +{"id":"connect-gzip","key":"connect-gzip","value":{"rev":"7-2e1d4bb887c1ddda278fc8465ee5645b"}}, +{"id":"connect-heroku-redis","key":"connect-heroku-redis","value":{"rev":"13-92da2be67451e5f55f6fbe3672c86dc4"}}, +{"id":"connect-i18n","key":"connect-i18n","value":{"rev":"8-09d47d7c220770fc80d1b6fd87ffcd07"}}, +{"id":"connect-identity","key":"connect-identity","value":{"rev":"8-8eb9e21bbf80045e0243720955d6070f"}}, +{"id":"connect-image-resizer","key":"connect-image-resizer","value":{"rev":"7-5f82563f87145f3cc06086afe3a14a62"}}, +{"id":"connect-index","key":"connect-index","value":{"rev":"3-8b8373334079eb26c8735b39483889a0"}}, +{"id":"connect-jsonp","key":"connect-jsonp","value":{"rev":"16-9e80af455e490710f06039d3c0025840"}}, +{"id":"connect-jsonrpc","key":"connect-jsonrpc","value":{"rev":"6-6556800f0bef6ae5eb10496d751048e7"}}, +{"id":"connect-kyoto","key":"connect-kyoto","value":{"rev":"5-8f6a9e9b24d1a71c786645402f509645"}}, +{"id":"connect-less","key":"connect-less","value":{"rev":"3-461ed9a80b462b978a81d5bcee6f3665"}}, +{"id":"connect-load-balance","key":"connect-load-balance","value":{"rev":"3-e74bff5fb47d1490c05a9cc4339af347"}}, +{"id":"connect-memcached","key":"connect-memcached","value":{"rev":"3-5fc92b7f9fb5bcfb364a27e6f052bcc7"}}, +{"id":"connect-mongo","key":"connect-mongo","value":{"rev":"13-c3869bc7337b2f1ee6b9b3364993f321"}}, +{"id":"connect-mongodb","key":"connect-mongodb","value":{"rev":"30-30cb932839ce16e4e496f5a33fdd720a"}}, +{"id":"connect-mongoose","key":"connect-mongoose","value":{"rev":"3-48a5b329e4cfa885442d43bbd1d0db46"}}, +{"id":"connect-mongoose-session","key":"connect-mongoose-session","value":{"rev":"3-6692b8e1225d5cd6a2daabd61cecb1cd"}}, +{"id":"connect-mysql-session","key":"connect-mysql-session","value":{"rev":"9-930abd0279ef7f447e75c95b3e71be12"}}, +{"id":"connect-no-www","key":"connect-no-www","value":{"rev":"3-33bed7417bc8a5e8efc74ce132c33158"}}, +{"id":"connect-notifo","key":"connect-notifo","value":{"rev":"3-4681f8c5a7dfd35aee9634e809c41804"}}, +{"id":"connect-parameter-router","key":"connect-parameter-router","value":{"rev":"3-f435f06d556c208d43ef05c64bcddceb"}}, +{"id":"connect-pg","key":"connect-pg","value":{"rev":"11-d84c53d8f1c24adfc266e7a031dddf0d"}}, +{"id":"connect-proxy","key":"connect-proxy","value":{"rev":"7-a691ff57a9affeab47c54d17dbe613cb"}}, +{"id":"connect-queryparser","key":"connect-queryparser","value":{"rev":"3-bb35a7f3f75297a63bf942a63b842698"}}, +{"id":"connect-redis","key":"connect-redis","value":{"rev":"40-4faa12962b14da49380de2bb183176f9"}}, +{"id":"connect-restreamer","key":"connect-restreamer","value":{"rev":"3-08e637ca685cc63b2b4f9722c763c105"}}, +{"id":"connect-riak","key":"connect-riak","value":{"rev":"5-3268c29a54e430a3f8adb33570afafdb"}}, +{"id":"connect-rpx","key":"connect-rpx","value":{"rev":"28-acc7bb4200c1d30f359151f0a715162c"}}, +{"id":"connect-security","key":"connect-security","value":{"rev":"16-fecd20f486a8ea4d557119af5b5a2960"}}, +{"id":"connect-select","key":"connect-select","value":{"rev":"5-5ca28ec800419e4cb3e97395a6b96153"}}, +{"id":"connect-session-mongo","key":"connect-session-mongo","value":{"rev":"9-9e6a26dfbb9c13a9d6f4060a1895730a"}}, +{"id":"connect-session-redis-store","key":"connect-session-redis-store","value":{"rev":"8-fecfed6e17476eaada5cfe7740d43893"}}, +{"id":"connect-sessionvoc","key":"connect-sessionvoc","value":{"rev":"13-57b6e6ea2158e3b7136054839662ea3d"}}, +{"id":"connect-spdy","key":"connect-spdy","value":{"rev":"11-f9eefd7303295d77d317cba78d299130"}}, +{"id":"connect-sts","key":"connect-sts","value":{"rev":"9-8e3fd563c04ce14b824fc4da42efb70e"}}, +{"id":"connect-timeout","key":"connect-timeout","value":{"rev":"4-6f5f8d97480c16c7acb05fe82400bbc7"}}, +{"id":"connect-unstable","key":"connect-unstable","value":{"rev":"3-1d3a4edc52f005d8cb4d557485095314"}}, +{"id":"connect-wormhole","key":"connect-wormhole","value":{"rev":"3-f33b15acc686bd9ad0c6df716529009f"}}, +{"id":"connect-xcors","key":"connect-xcors","value":{"rev":"7-f8e1cd6805a8779bbd6bb2c1000649fb"}}, +{"id":"connect_facebook","key":"connect_facebook","value":{"rev":"3-b3001d71f619836a009c53c816ce36ed"}}, +{"id":"connect_json","key":"connect_json","value":{"rev":"3-dd0df74291f80f45b4314d56192c19c5"}}, +{"id":"connectables","key":"connectables","value":{"rev":"3-f6e9f8f13883a523b4ea6035281f541b"}}, +{"id":"conseq","key":"conseq","value":{"rev":"3-890d340704322630e7a724333f394c70"}}, +{"id":"consistent-hashing","key":"consistent-hashing","value":{"rev":"3-fcef5d4479d926560cf1bc900f746f2a"}}, +{"id":"console","key":"console","value":{"rev":"3-1e0449b07c840eeac6b536e2552844f4"}}, +{"id":"console.log","key":"console.log","value":{"rev":"9-d608afe50e732ca453365befcb87bad5"}}, +{"id":"consolemark","key":"consolemark","value":{"rev":"13-320f003fc2c3cec909ab3e9c3bce9743"}}, +{"id":"construct","key":"construct","value":{"rev":"3-75bdc809ee0572172e6acff537af7d9b"}}, +{"id":"context","key":"context","value":{"rev":"3-86b1a6a0f77ef86d4d9ccfff47ceaf6a"}}, +{"id":"contextify","key":"contextify","value":{"rev":"9-547b8019ef66e0d1c84fe00be832e750"}}, +{"id":"contract","key":"contract","value":{"rev":"3-d09e775c2c1e297b6cbbfcd5efbae3c7"}}, +{"id":"contracts","key":"contracts","value":{"rev":"13-3fd75c77e688937734f51cf97f10dd7d"}}, +{"id":"control","key":"control","value":{"rev":"31-7abf0cb81d19761f3ff59917e56ecedf"}}, +{"id":"controljs","key":"controljs","value":{"rev":"3-a8e80f93e389ca07509fa7addd6cb805"}}, +{"id":"convert","key":"convert","value":{"rev":"3-6c962b92274bcbe82b82a30806559d47"}}, +{"id":"conway","key":"conway","value":{"rev":"5-93ce24976e7dd5ba02fe4addb2b44267"}}, +{"id":"cookie","key":"cookie","value":{"rev":"14-946d98bf46e940d13ca485148b1bd609"}}, +{"id":"cookie-sessions","key":"cookie-sessions","value":{"rev":"8-4b399ac8cc4baea15f6c5e7ac94399f0"}}, +{"id":"cookiejar","key":"cookiejar","value":{"rev":"20-220b41a4c2a8f2b7b14aafece7dcc1b5"}}, +{"id":"cookies","key":"cookies","value":{"rev":"15-b3b35c32a99ed79accc724685d131d18"}}, +{"id":"cool","key":"cool","value":{"rev":"3-007d1123eb2dc52cf845d625f7ccf198"}}, +{"id":"coolmonitor","key":"coolmonitor","value":{"rev":"3-69c3779c596527f63e49c5e507dff1e1"}}, +{"id":"coop","key":"coop","value":{"rev":"9-39dee3260858cf8c079f31bdf02cea1d"}}, +{"id":"coordinator","key":"coordinator","value":{"rev":"32-9d92f2033a041d5c40f8e1018d512755"}}, +{"id":"core-utils","key":"core-utils","value":{"rev":"9-98f2412938a67d83e53e76a26b5601e0"}}, +{"id":"cornify","key":"cornify","value":{"rev":"6-6913172d09c52f9e8dc0ea19ec49972c"}}, +{"id":"corpus","key":"corpus","value":{"rev":"3-a357e7779f8d4ec020b755c71dd1e57b"}}, +{"id":"corrector","key":"corrector","value":{"rev":"3-ef3cf99fc59a581aee3590bdb8615269"}}, +{"id":"cosmos","key":"cosmos","value":{"rev":"3-3eb292c59758fb5215f22739fa9531ce"}}, +{"id":"couch-ar","key":"couch-ar","value":{"rev":"25-f106d2965ab74b25b18328ca44ca4a02"}}, +{"id":"couch-cleaner","key":"couch-cleaner","value":{"rev":"15-74e61ef98a770d76be4c7e7571d18381"}}, +{"id":"couch-client","key":"couch-client","value":{"rev":"10-94945ebd3e17f509fcc71fb6c6ef5d35"}}, +{"id":"couch-session","key":"couch-session","value":{"rev":"4-c73dea41ceed26a2a0bde9a9c8ffffc4"}}, +{"id":"couch-sqlite","key":"couch-sqlite","value":{"rev":"3-3e420fe6623542475595aa7e55a4e4bd"}}, +{"id":"couch-stream","key":"couch-stream","value":{"rev":"5-911704fc984bc49acce1e10adefff7ff"}}, +{"id":"couchapp","key":"couchapp","value":{"rev":"16-ded0f4742bb3f5fd42ec8f9c6b21ae8e"}}, +{"id":"couchcmd","key":"couchcmd","value":{"rev":"3-651ea2b435e031481b5d3d968bd3d1eb"}}, +{"id":"couchdb","key":"couchdb","value":{"rev":"12-8abcfd649751226c10edf7cf0508a09f"}}, +{"id":"couchdb-api","key":"couchdb-api","value":{"rev":"23-f2c82f08f52f266df7ac2aa709615244"}}, +{"id":"couchdb-tmp","key":"couchdb-tmp","value":{"rev":"3-9a695fb4ba352f3be2d57c5995718520"}}, +{"id":"couchdev","key":"couchdev","value":{"rev":"3-50a0ca3ed0395dd72de62a1b96619e66"}}, +{"id":"couchlegs","key":"couchlegs","value":{"rev":"5-be78e7922ad4ff86dbe5c17a87fdf4f1"}}, +{"id":"couchtato","key":"couchtato","value":{"rev":"11-15a1ce8de9a8cf1e81d96de6afbb4f45"}}, +{"id":"couchy","key":"couchy","value":{"rev":"13-0a52b2712fb8447f213866612e3ccbf7"}}, +{"id":"courier","key":"courier","value":{"rev":"17-eb94fe01aeaad43805f4bce21d23bcba"}}, +{"id":"coverage","key":"coverage","value":{"rev":"10-a333448996d0b0d420168d1b5748db32"}}, +{"id":"coverage_testing","key":"coverage_testing","value":{"rev":"3-62834678206fae7911401aa86ec1a85e"}}, +{"id":"cqs","key":"cqs","value":{"rev":"6-0dad8b969c70abccc27a146a99399533"}}, +{"id":"crab","key":"crab","value":{"rev":"9-599fc7757f0c9efbe3889f30981ebe93"}}, +{"id":"cradle","key":"cradle","value":{"rev":"60-8fb414b66cb07b4bae59c0316d5c45b4"}}, +{"id":"cradle-fixed","key":"cradle-fixed","value":{"rev":"4-589afffa26fca22244ad2038abb77dc5"}}, +{"id":"cradle-init","key":"cradle-init","value":{"rev":"13-499d63592141f1e200616952bbdea015"}}, +{"id":"crawler","key":"crawler","value":{"rev":"5-ec4a8d77f90d86d17d6d14d631360188"}}, +{"id":"crc","key":"crc","value":{"rev":"3-25ab83f8b1333e6d4e4e5fb286682422"}}, +{"id":"creatary","key":"creatary","value":{"rev":"3-770ad84ecb2e2a3994637d419384740d"}}, +{"id":"createsend","key":"createsend","value":{"rev":"7-19885346e4d7a01ac2e9ad70ea0e822a"}}, +{"id":"creationix","key":"creationix","value":{"rev":"61-7ede1759afbd41e8b4dedc348b72202e"}}, +{"id":"creek","key":"creek","value":{"rev":"33-4f511aa4dd379e04bba7ac333744325e"}}, +{"id":"cron","key":"cron","value":{"rev":"12-8d794edb5f9b7cb6322acaef1c848043"}}, +{"id":"cron2","key":"cron2","value":{"rev":"13-bae2f1b02ffcbb0e77bde6c33b566f80"}}, +{"id":"crontab","key":"crontab","value":{"rev":"36-14d26bf316289fb4841940eee2932f37"}}, +{"id":"crossroads","key":"crossroads","value":{"rev":"7-d73d51cde30f24caad91e6a3c5b420f2"}}, +{"id":"crowdflower","key":"crowdflower","value":{"rev":"3-16c2dfc9fd505f75068f75bd19e3d227"}}, +{"id":"cruvee","key":"cruvee","value":{"rev":"3-979ccf0286b1701e9e7483a10451d975"}}, +{"id":"crypt","key":"crypt","value":{"rev":"3-031b338129bebc3749b42fb3d442fc4b"}}, +{"id":"crypto","key":"crypto","value":{"rev":"3-66a444b64481c85987dd3f22c32e0630"}}, +{"id":"csj","key":"csj","value":{"rev":"3-bc3133c7a0a8827e89aa03897b81d177"}}, +{"id":"cson","key":"cson","value":{"rev":"7-3ac3e1e10572e74e58874cfe3200eb87"}}, +{"id":"csrf-express","key":"csrf-express","value":{"rev":"3-4cc36d88e8ad10b9c2cc8a7318f0abd3"}}, +{"id":"css-crawler","key":"css-crawler","value":{"rev":"13-4739c7bf1decc72d7682b53303f93ec6"}}, +{"id":"css-smasher","key":"css-smasher","value":{"rev":"3-631128f966135c97d648efa3eadf7bfb"}}, +{"id":"css-sourcery","key":"css-sourcery","value":{"rev":"3-571343da3a09af7de473d29ed7dd788b"}}, +{"id":"css2json","key":"css2json","value":{"rev":"5-fb6d84c1da4a9391fa05d782860fe7c4"}}, +{"id":"csskeeper","key":"csskeeper","value":{"rev":"5-ea667a572832ea515b044d4b87ea7d98"}}, +{"id":"csslike","key":"csslike","value":{"rev":"3-6e957cce81f6e790f8562526d907ad94"}}, +{"id":"csslint","key":"csslint","value":{"rev":"19-b1e973274a0a6b8eb81b4d715a249612"}}, +{"id":"cssmin","key":"cssmin","value":{"rev":"10-4bb4280ec56f110c43abe01189f95818"}}, +{"id":"csso","key":"csso","value":{"rev":"17-ccfe2a72d377919b07973bbb1d19b8f2"}}, +{"id":"cssom","key":"cssom","value":{"rev":"3-f96b884b63b4c04bac18b8d9c0a4c4cb"}}, +{"id":"cssp","key":"cssp","value":{"rev":"5-abf69f9ff99b7d0bf2731a5b5da0897c"}}, +{"id":"cssunminifier","key":"cssunminifier","value":{"rev":"3-7bb0c27006af682af92d1969fcb4fa73"}}, +{"id":"cssutils","key":"cssutils","value":{"rev":"3-4759f9db3b8eac0964e36f5229260526"}}, +{"id":"csv","key":"csv","value":{"rev":"21-0420554e9c08e001063cfb0a69a48255"}}, +{"id":"csv2mongo","key":"csv2mongo","value":{"rev":"9-373f11c05e5d1744c3187d9aaeaae0ab"}}, +{"id":"csvutils","key":"csvutils","value":{"rev":"15-84aa82e56b49cd425a059c8f0735a23c"}}, +{"id":"ctrlflow","key":"ctrlflow","value":{"rev":"33-0b817baf6c744dc17b83d5d8ab1ba74e"}}, +{"id":"ctrlflow_tests","key":"ctrlflow_tests","value":{"rev":"3-d9ed35503d27b0736c59669eecb4c4fe"}}, +{"id":"ctype","key":"ctype","value":{"rev":"9-c5cc231475f23a01682d0b1a3b6e49c2"}}, +{"id":"cube","key":"cube","value":{"rev":"5-40320a20d260e082f5c4ca508659b4d1"}}, +{"id":"cucumber","key":"cucumber","value":{"rev":"11-8489af0361b6981cf9001a0403815936"}}, +{"id":"cucumis","key":"cucumis","value":{"rev":"33-6dc38f1161fae3efa2a89c8288b6e040"}}, +{"id":"cucumis-rm","key":"cucumis-rm","value":{"rev":"3-6179249ad15166f8d77eb136b3fa87ca"}}, +{"id":"cupcake","key":"cupcake","value":{"rev":"15-1dd13a85415a366942e7f0a3de06aa2a"}}, +{"id":"curator","key":"curator","value":{"rev":"19-d798ab7fbca11ba0e9c6c40c0a2f9440"}}, +{"id":"curl","key":"curl","value":{"rev":"11-ac7143ac07c64ea169ba7d4e58be232a"}}, +{"id":"curly","key":"curly","value":{"rev":"30-0248a5563b6e96457315ad0cc2fe22c1"}}, +{"id":"curry","key":"curry","value":{"rev":"11-ce13fa80e84eb25d9cf76cf4162a634e"}}, +{"id":"cursory","key":"cursory","value":{"rev":"3-ea2f4b1b47caf38460402d1a565c18b8"}}, +{"id":"d-utils","key":"d-utils","value":{"rev":"37-699ad471caa28183d75c06f0f2aab41c"}}, +{"id":"d3","key":"d3","value":{"rev":"5-4d867844bd7dce21b34cd7283bb9cad4"}}, +{"id":"d3bench","key":"d3bench","value":{"rev":"3-617cc625bfd91c175d037bfcace9c4e9"}}, +{"id":"daemon","key":"daemon","value":{"rev":"11-8654f90bc609ca2c3ec260c7d6b7793e"}}, +{"id":"daemon-tools","key":"daemon-tools","value":{"rev":"18-8197fce2054de67925e6f2c3fa3cd90a"}}, +{"id":"daimyo","key":"daimyo","value":{"rev":"25-531b0b0afdc5ae3d41b4131da40af6cf"}}, +{"id":"daleth","key":"daleth","value":{"rev":"7-4824619205289ba237ef2a4dc1fba1ec"}}, +{"id":"dali","key":"dali","value":{"rev":"9-037c4c76f739ecb537a064c07d3c63e3"}}, +{"id":"damncomma","key":"damncomma","value":{"rev":"3-b1472eada01efb8a12d521e5a248834b"}}, +{"id":"dana","key":"dana","value":{"rev":"3-2a3c0ff58a6d13fedd17e1d192080e59"}}, +{"id":"dandy","key":"dandy","value":{"rev":"9-f4ae43659dd812a010b0333bf8e5a282"}}, +{"id":"dash","key":"dash","value":{"rev":"5-698513f86165f429a5f55320d5a700f0"}}, +{"id":"dash-fu","key":"dash-fu","value":{"rev":"3-848e99a544f9f78f311c7ebfc5a172c4"}}, +{"id":"dashboard","key":"dashboard","value":{"rev":"3-71844d1fc1140b7533f9e57740d2b666"}}, +{"id":"data","key":"data","value":{"rev":"23-b594e2bd1ffef1cda8b7e94dbf15ad5b"}}, +{"id":"data-layer","key":"data-layer","value":{"rev":"9-9205d35cc6eaf1067ee0cec1b421d749"}}, +{"id":"data-page","key":"data-page","value":{"rev":"3-d7a3346a788a0c07132e50585db11c99"}}, +{"id":"data-section","key":"data-section","value":{"rev":"9-d3fff313977667c53cbadb134d993412"}}, +{"id":"data-uuid","key":"data-uuid","value":{"rev":"8-24001fe9f37c4cc7ac01079ee4767363"}}, +{"id":"data-visitor","key":"data-visitor","value":{"rev":"6-7fe5da9d118fab27157dba97050c6487"}}, +{"id":"database-cleaner","key":"database-cleaner","value":{"rev":"19-4bdfc8b324e95e6da9f72e7b7b708b98"}}, +{"id":"datapool","key":"datapool","value":{"rev":"3-f99c93ca812d2f4725bbaea99122832c"}}, +{"id":"datasift","key":"datasift","value":{"rev":"3-6de3ae25c9a99f651101e191595bcf64"}}, +{"id":"date","key":"date","value":{"rev":"9-b334fc6450d093de40a664a4a835cfc4"}}, +{"id":"date-utils","key":"date-utils","value":{"rev":"31-7be8fcf1919564a8fb7223a86a5954ac"}}, +{"id":"dateformat","key":"dateformat","value":{"rev":"11-5b924e1d29056a0ef9b89b9d7984d5c4"}}, +{"id":"dateformatjs","key":"dateformatjs","value":{"rev":"3-4c50a38ecc493535ee2570a838673937"}}, +{"id":"datejs","key":"datejs","value":{"rev":"5-f47e3e6532817f822aa910b59a45717c"}}, +{"id":"dateselect","key":"dateselect","value":{"rev":"3-ce58def02fd8c8feda8c6f2004726f97"}}, +{"id":"datetime","key":"datetime","value":{"rev":"7-14227b0677eb93b8eb519db47f46bf36"}}, +{"id":"db","key":"db","value":{"rev":"3-636e9ea922a85c92bc11aa9691a2e67f"}}, +{"id":"db-drizzle","key":"db-drizzle","value":{"rev":"157-955f74f49ac4236df317e227c08afaa3"}}, +{"id":"db-mysql","key":"db-mysql","value":{"rev":"224-e596a18d9af33ff1fbcf085a9f4f56fd"}}, +{"id":"db-oracle","key":"db-oracle","value":{"rev":"13-a1e2924d87b4badfddeccf6581525b08"}}, +{"id":"dcrypt","key":"dcrypt","value":{"rev":"29-a144a609bef5004781df901440d67b2d"}}, +{"id":"decafscript","key":"decafscript","value":{"rev":"3-f3a239dc7d503c900fc9854603d716e6"}}, +{"id":"decimal","key":"decimal","value":{"rev":"3-614ed56d4d6c5eb7883d8fd215705a12"}}, +{"id":"decimaljson","key":"decimaljson","value":{"rev":"9-7cb23f4b2b1168b1a213f1eefc85fa51"}}, +{"id":"deck","key":"deck","value":{"rev":"7-da422df97f13c7d84e8f3690c1e1ca32"}}, +{"id":"deckard","key":"deckard","value":{"rev":"3-85e0cd76cdd88ff60a617239060d6f46"}}, +{"id":"deckem","key":"deckem","value":{"rev":"9-03ca75ea35960ccd5779b4cfa8cfb9f9"}}, +{"id":"defensio","key":"defensio","value":{"rev":"5-0ad0ae70b4e184626d914cc4005ee34c"}}, +{"id":"defer","key":"defer","value":{"rev":"3-8d003c96f4263a26b7955e251cddbd95"}}, +{"id":"deferrable","key":"deferrable","value":{"rev":"8-3ae57ce4391105962d09ad619d4c4670"}}, +{"id":"deferred","key":"deferred","value":{"rev":"17-9cee7948dbdf7b6dcc00bbdc60041dd0"}}, +{"id":"define","key":"define","value":{"rev":"45-9d422f2ac5ab693f881df85898d68e3a"}}, +{"id":"deflate","key":"deflate","value":{"rev":"10-3ebe2b87e09f4ae51857cae02e1af788"}}, +{"id":"degrees","key":"degrees","value":{"rev":"5-707c57cfa3e589e8059fe9860cc0c10b"}}, +{"id":"deimos","key":"deimos","value":{"rev":"11-6481696be774d14254fe7c427107dc2a"}}, +{"id":"deja","key":"deja","value":{"rev":"47-bde4457402db895aad46198433842668"}}, +{"id":"delayed-stream","key":"delayed-stream","value":{"rev":"13-f6ca393b08582350f78c5c66f183489b"}}, +{"id":"delegator","key":"delegator","value":{"rev":"3-650651749c1df44ef544c919fae74f82"}}, +{"id":"dep-graph","key":"dep-graph","value":{"rev":"3-e404af87822756da52754e2cc5c576b1"}}, +{"id":"dependency-promise","key":"dependency-promise","value":{"rev":"11-1cc2be8465d736ec8f3cc8940ab22823"}}, +{"id":"depends","key":"depends","value":{"rev":"30-adc9604bbd8117592f82eee923d8703e"}}, +{"id":"deploy","key":"deploy","value":{"rev":"3-82020957528bd0bdd675bed9ac4e4cc5"}}, +{"id":"deployjs","key":"deployjs","value":{"rev":"5-a3e99a5ed81d4b1ad44b6477e6a5a985"}}, +{"id":"deputy-client","key":"deputy-client","value":{"rev":"3-31fd224b301ec0f073df7afa790050ec"}}, +{"id":"deputy-server","key":"deputy-server","value":{"rev":"3-0d790cce82aadfd2b8f39a6b056f2792"}}, +{"id":"derby","key":"derby","value":{"rev":"40-b642048a1a639d77ab139160a4da0fd2"}}, +{"id":"des","key":"des","value":{"rev":"24-fcbdc086e657aef356b75433b3e65ab6"}}, +{"id":"descent","key":"descent","value":{"rev":"7-9cc259b25fc688597fc7efaa516d03c6"}}, +{"id":"describe","key":"describe","value":{"rev":"6-788c7f2feaf2e88f4b1179976b273744"}}, +{"id":"deserver","key":"deserver","value":{"rev":"5-da8083694e89b8434123fe7482a3cc7e"}}, +{"id":"detect","key":"detect","value":{"rev":"3-c27f258d39d7905c2b92383809bb5988"}}, +{"id":"detective","key":"detective","value":{"rev":"9-d6cfa0c6389783cdc9c9ffa9e4082c64"}}, +{"id":"dev","key":"dev","value":{"rev":"23-5c2ce4a4f6a4f24d3cff3b7db997d8bc"}}, +{"id":"dev-warnings","key":"dev-warnings","value":{"rev":"5-5a7d7f36d09893df96441be8b09e41d6"}}, +{"id":"dhcpjs","key":"dhcpjs","value":{"rev":"3-1bc01bd612f3ab1fce178c979aa34e43"}}, +{"id":"dht","key":"dht","value":{"rev":"3-40c0b909b6c0e2305e19d10cea1881b0"}}, +{"id":"dht-bencode","key":"dht-bencode","value":{"rev":"5-88a1da8de312a54097507d72a049f0f3"}}, +{"id":"dialect","key":"dialect","value":{"rev":"18-db7928ce4756eea35db1732d4f2ebc88"}}, +{"id":"dialect-http","key":"dialect-http","value":{"rev":"19-23a927d28cb43733dbd05294134a5b8c"}}, +{"id":"dicks","key":"dicks","value":{"rev":"11-ba64897899e336d366ffd4b68cac99f5"}}, +{"id":"diff","key":"diff","value":{"rev":"13-1a88acb0369ab8ae096a2323d65a2811"}}, +{"id":"diff_match_patch","key":"diff_match_patch","value":{"rev":"8-2f6f467e483b23b217a2047e4aded850"}}, +{"id":"diffbot","key":"diffbot","value":{"rev":"3-8cb8e34af89cb477a5da52e3fd9a13f7"}}, +{"id":"digest","key":"digest","value":{"rev":"7-bc6fb9e68c83197381b0d9ac7db16c1c"}}, +{"id":"dir","key":"dir","value":{"rev":"7-574462bb241a39eeffe6c5184d40c57a"}}, +{"id":"dir-watcher","key":"dir-watcher","value":{"rev":"31-1a3ca4d6aa8aa32c619efad5fbfce494"}}, +{"id":"dir2html","key":"dir2html","value":{"rev":"5-b4bfb2916c2d94c85aa75ffa29ad1af4"}}, +{"id":"directive","key":"directive","value":{"rev":"3-3373f02b8762cb1505c8f8cbcc50d3d4"}}, +{"id":"dirsum","key":"dirsum","value":{"rev":"5-8545445faaa41d2225ec7ff226a10750"}}, +{"id":"dirty","key":"dirty","value":{"rev":"13-d636ea0d1ed35560c0bc7272965c1a6f"}}, +{"id":"dirty-uuid","key":"dirty-uuid","value":{"rev":"5-65acdfda886afca65ae52f0ac21ce1b2"}}, +{"id":"discogs","key":"discogs","value":{"rev":"21-839410e6bf3bee1435ff837daaeaf9f8"}}, +{"id":"discount","key":"discount","value":{"rev":"13-a8fb2a8f668ac0a55fffada1ea94a4b7"}}, +{"id":"discovery","key":"discovery","value":{"rev":"3-46f4496224d132e56cbc702df403219d"}}, +{"id":"diskcache","key":"diskcache","value":{"rev":"23-7b14ad41fc199184fb939828e9122099"}}, +{"id":"dispatch","key":"dispatch","value":{"rev":"6-e72cc7b2bcc97faf897ae4e4fa3ec681"}}, +{"id":"distribute.it","key":"distribute.it","value":{"rev":"12-0978757eb25d22117af675806cf6eef2"}}, +{"id":"dive","key":"dive","value":{"rev":"21-9cbd1281c5a3c2dae0cc0407863f3336"}}, +{"id":"diveSync","key":"diveSync","value":{"rev":"3-015ec4803903106bf24cb4f17cedee68"}}, +{"id":"dk-assets","key":"dk-assets","value":{"rev":"3-25d9b6ac727caf1e227e6436af835d03"}}, +{"id":"dk-core","key":"dk-core","value":{"rev":"3-0b6a2f4dfc0484a3908159a897920bae"}}, +{"id":"dk-couchdb","key":"dk-couchdb","value":{"rev":"3-cc9ef511f9ed46be9d7099f10b1ee776"}}, +{"id":"dk-model","key":"dk-model","value":{"rev":"3-3a61006be57d304724c049e4dcf2fc9b"}}, +{"id":"dk-model-couchdb","key":"dk-model-couchdb","value":{"rev":"3-5163def21660db8428e623909bbfcb4d"}}, +{"id":"dk-routes","key":"dk-routes","value":{"rev":"3-4563357f850248d7d0fb37f9bdcb893b"}}, +{"id":"dk-server","key":"dk-server","value":{"rev":"3-9aef13fc5814785c9805b26828e8d114"}}, +{"id":"dk-template","key":"dk-template","value":{"rev":"3-809c94776252441129705fbe1d93e752"}}, +{"id":"dk-transport","key":"dk-transport","value":{"rev":"3-9271da6f86079027535179b743d0d4c3"}}, +{"id":"dk-websockets","key":"dk-websockets","value":{"rev":"3-426b44c04180d6caf7cf765f03fc52c2"}}, +{"id":"dnet-index-proxy","key":"dnet-index-proxy","value":{"rev":"51-1f3cf4f534c154369d5e774a8f599106"}}, +{"id":"dnode","key":"dnode","value":{"rev":"129-68db10c25c23d635dc828aa698d1279e"}}, +{"id":"dnode-ez","key":"dnode-ez","value":{"rev":"17-75877eab5cf3976b8876c49afd2f7e38"}}, +{"id":"dnode-protocol","key":"dnode-protocol","value":{"rev":"23-fb28f8e1180e6aa44fa564e0d55b3d1e"}}, +{"id":"dnode-smoothiecharts","key":"dnode-smoothiecharts","value":{"rev":"3-d1483028e5768527c2786b9ed5d76463"}}, +{"id":"dnode-stack","key":"dnode-stack","value":{"rev":"9-c1ad8ce01282ce4fa72b5993c580e58e"}}, +{"id":"dnode-worker","key":"dnode-worker","value":{"rev":"3-4c73c0d7ed225197fd8fb0555eaf1152"}}, +{"id":"dns-server","key":"dns-server","value":{"rev":"3-4858a1773da514fea68eac6d9d39f69e"}}, +{"id":"dns-srv","key":"dns-srv","value":{"rev":"12-867c769437fa0ad8a83306aa9e2a158e"}}, +{"id":"doc","key":"doc","value":{"rev":"5-2c077b3fd3b6efa4e927b66f1390e4ea"}}, +{"id":"doc.md","key":"doc.md","value":{"rev":"7-8e8e51be4956550388699222b2e039e7"}}, +{"id":"docco","key":"docco","value":{"rev":"18-891bde1584809c3b1f40fef9961b4f28"}}, +{"id":"docdown","key":"docdown","value":{"rev":"5-fcf5be2ab6ceaed76c1980b462359057"}}, +{"id":"docket","key":"docket","value":{"rev":"13-a4969e0fb17af8dba7df178e364161c2"}}, +{"id":"docpad","key":"docpad","value":{"rev":"77-a478ac8c7ac86e304f9213380ea4b550"}}, +{"id":"docs","key":"docs","value":{"rev":"3-6b1fae9738a3327a3a3be826c0981c3a"}}, +{"id":"dojo-node","key":"dojo-node","value":{"rev":"13-e0dc12e9ce8ab3f40b228c2af8c41064"}}, +{"id":"dom","key":"dom","value":{"rev":"3-cecd9285d0d5b1cab0f18350aac1b2b0"}}, +{"id":"dom-js","key":"dom-js","value":{"rev":"8-dd20e8b23028f4541668501650b52a71"}}, +{"id":"dom-js-ns","key":"dom-js-ns","value":{"rev":"3-787567fc1d6f4ca7e853215a4307b593"}}, +{"id":"domjs","key":"domjs","value":{"rev":"3-d2d05a20dccb57fb6db7da08916c6c0f"}}, +{"id":"doml","key":"doml","value":{"rev":"11-c3b49c50906d9875b546413e4acd1b38"}}, +{"id":"domo","key":"domo","value":{"rev":"3-a4321e6c0c688f773068365b44b08b6b"}}, +{"id":"domready","key":"domready","value":{"rev":"46-21c6b137bbed79ddbff31fdf0ef7d61f"}}, +{"id":"donkey","key":"donkey","value":{"rev":"3-1454aa878654886e8495ebb060aa10f7"}}, +{"id":"dot","key":"dot","value":{"rev":"19-b6d2d53cb9ae1a608a0956aeb8092578"}}, +{"id":"dotaccess","key":"dotaccess","value":{"rev":"13-63ddef6740e84f4517f7dd1bb0d68c56"}}, +{"id":"douche","key":"douche","value":{"rev":"3-6a200f908ccfc9ae549e80209e117cbf"}}, +{"id":"dox","key":"dox","value":{"rev":"10-856cc6bf3dc7c44e028173fea8323c24"}}, +{"id":"drag","key":"drag","value":{"rev":"9-00f27e241269c3df1d71e45b698e9b3b"}}, +{"id":"drain","key":"drain","value":{"rev":"3-8827a0ee7ed74b948bf56d5a33455fc8"}}, +{"id":"drawback","key":"drawback","value":{"rev":"74-dd356b3e55175525317e53c24979a431"}}, +{"id":"drev","key":"drev","value":{"rev":"9-43529419a69529dd7af9a83985aab1f2"}}, +{"id":"drews-mixins","key":"drews-mixins","value":{"rev":"17-63373bae6525859bddfc8d6ad19bdb06"}}, +{"id":"drnu","key":"drnu","value":{"rev":"3-b9b14b2241ded1e52a92fc4225b4ddc5"}}, +{"id":"dropbox","key":"dropbox","value":{"rev":"19-2cb7a40d253621fdfa96f23b96e42ecb"}}, +{"id":"drtoms-nodehelpers","key":"drtoms-nodehelpers","value":{"rev":"3-be0a75cdd7c2d49b1ec4ad1d2c3bc911"}}, +{"id":"drty","key":"drty","value":{"rev":"3-56eabd39b9badfa0af601c5cc64cee2c"}}, +{"id":"drty-facebook","key":"drty-facebook","value":{"rev":"3-fd07af7fb87d7f1d35e13f458a02c127"}}, +{"id":"drumkit","key":"drumkit","value":{"rev":"3-f3cdacef51453d3ac630759aff2a8b58"}}, +{"id":"drupal","key":"drupal","value":{"rev":"13-13835b1e1c8a0e8f0b0e8479640a8d7e"}}, +{"id":"dryice","key":"dryice","value":{"rev":"15-9990fdbde5475a8dbdcc055cb08d654d"}}, +{"id":"dryml","key":"dryml","value":{"rev":"33-483ff8cc3ab1431790cc2587c0bce989"}}, +{"id":"ds","key":"ds","value":{"rev":"9-743274a1d0143927851af07ff0f86d8d"}}, +{"id":"dt","key":"dt","value":{"rev":"3-ab59016f28e182c763b78ba49a59191c"}}, +{"id":"dtl","key":"dtl","value":{"rev":"11-415b4aeec93f096523569615e80f1be1"}}, +{"id":"dtrace-provider","key":"dtrace-provider","value":{"rev":"12-7f01510bd2b1d543f11e3dc02d98ab69"}}, +{"id":"dtrejo","key":"dtrejo","value":{"rev":"3-85f5bb2b9faec499e6aa77fe22e6e3ec"}}, +{"id":"dude","key":"dude","value":{"rev":"3-006528c1efd98312991273ba6ee45f7b"}}, +{"id":"dunce","key":"dunce","value":{"rev":"3-fa4fa5cafdfd1d86c650746f60b7bc0e"}}, +{"id":"duostack","key":"duostack","value":{"rev":"15-47824bdf6e32f49f64014e75421dc42e"}}, +{"id":"duplex-stream","key":"duplex-stream","value":{"rev":"3-2d0e12876e7ad4e5d3ea5520dcbad861"}}, +{"id":"durilka","key":"durilka","value":{"rev":"15-54400496515c8625e8bedf19f8a41cad"}}, +{"id":"dust","key":"dust","value":{"rev":"18-9bc9cae2e48c54f4389e9fce5dfc021e"}}, +{"id":"dustfs","key":"dustfs","value":{"rev":"5-944770c24f06989f3fc62427f2ddebc4"}}, +{"id":"dx","key":"dx","value":{"rev":"3-6000afd60be07d9ff91e7231a388f22f"}}, +{"id":"dynamic","key":"dynamic","value":{"rev":"3-33b83464ed56eb33c052a13dfb709c9c"}}, +{"id":"dynobj","key":"dynobj","value":{"rev":"5-3eb168dae1f9c20369fa1d5ae45f9021"}}, +{"id":"each","key":"each","value":{"rev":"3-5063799b0afcbb61378b1d605660a864"}}, +{"id":"ears","key":"ears","value":{"rev":"11-e77cd2b865409be7ba2e072e98b1c8a1"}}, +{"id":"easey","key":"easey","value":{"rev":"3-a380d8d945e03f55732ae8769cd6dbbf"}}, +{"id":"easy","key":"easy","value":{"rev":"3-73b836a34beafa31cdd8129fe158bf6e"}}, +{"id":"easy-oauth","key":"easy-oauth","value":{"rev":"5-2c1db698e61d77f99633042113099528"}}, +{"id":"easyfs","key":"easyfs","value":{"rev":"3-b807671a77c2a8cc27a9f1aa20ff74c0"}}, +{"id":"easyhash","key":"easyhash","value":{"rev":"3-2eeb24098bc4d201766dcc92dc7325f7"}}, +{"id":"easyrss","key":"easyrss","value":{"rev":"9-1687a54348670ef9ca387ea7ec87f0be"}}, +{"id":"ebnf-diagram","key":"ebnf-diagram","value":{"rev":"3-704e4605bf933b281a6821259a531055"}}, +{"id":"ec2","key":"ec2","value":{"rev":"22-25e562ae8898807c7b4c696c809cf387"}}, +{"id":"echo","key":"echo","value":{"rev":"19-75c2421f623ecc9fe2771f3658589ce8"}}, +{"id":"eco","key":"eco","value":{"rev":"14-b4db836928c91cbf22628cc65ca94f56"}}, +{"id":"ed","key":"ed","value":{"rev":"3-bed9b8225e83a02241d48254077a7df4"}}, +{"id":"edate","key":"edate","value":{"rev":"3-5ec1441ffe3b56d5d01561003b9844f2"}}, +{"id":"eden","key":"eden","value":{"rev":"35-9aa2ff880c2d4f45e3da881b15e58d0a"}}, +{"id":"eio","key":"eio","value":{"rev":"5-e6dd895635596d826ccdf4439761d5fa"}}, +{"id":"ejs","key":"ejs","value":{"rev":"30-c7b020b6cb8ee2626f47db21fc5fedb4"}}, +{"id":"ejs-ext","key":"ejs-ext","value":{"rev":"15-820393685191bbed37938acb7af5885e"}}, +{"id":"elastical","key":"elastical","value":{"rev":"3-c652af043bc4256a29a87e3de9b78093"}}, +{"id":"elasticsearchclient","key":"elasticsearchclient","value":{"rev":"33-bcb59deb7d9d56737a6946c56830ae6b"}}, +{"id":"elastiseahclient","key":"elastiseahclient","value":{"rev":"3-c4e525605859e249f04fb07d31739002"}}, +{"id":"elementtree","key":"elementtree","value":{"rev":"3-ef2017fe67ae425253de911c2f219d31"}}, +{"id":"elf-logger","key":"elf-logger","value":{"rev":"6-98d61588cfc171611568cf86004aa2e1"}}, +{"id":"elk","key":"elk","value":{"rev":"25-8b92241d0218c6593a7dc8a8cc69b7ce"}}, +{"id":"elucidata-build-tools","key":"elucidata-build-tools","value":{"rev":"7-0ad3de708aaac2eebfcfce273bfe6edf"}}, +{"id":"email","key":"email","value":{"rev":"16-110ae6a99ab3e37f4edd9357c03d78c2"}}, +{"id":"email-verificationtoken","key":"email-verificationtoken","value":{"rev":"7-ef37672bc6e9ee806ecc22fd5257ae03"}}, +{"id":"emailjs","key":"emailjs","value":{"rev":"31-0dd24f9aba8d96e9493e55e8345f3d21"}}, +{"id":"embedly","key":"embedly","value":{"rev":"21-47838d8015e9b927c56a7bd52c52e4fc"}}, +{"id":"emile","key":"emile","value":{"rev":"11-05d4715964b5bf2e1fd98096cb7ccc83"}}, +{"id":"emit.io","key":"emit.io","value":{"rev":"3-faacb1c30bb92c06a55a44bb027a9475"}}, +{"id":"emre","key":"emre","value":{"rev":"3-5686f4782f1f5171fff83b662ce68802"}}, +{"id":"encrypt","key":"encrypt","value":{"rev":"3-77e2e2007b452f7fcdfa9e8696a188f5"}}, +{"id":"ender","key":"ender","value":{"rev":"95-89b8c6ccfcaf3eb56f5dbe48bf3c2e24"}}, +{"id":"ender-dragdealer","key":"ender-dragdealer","value":{"rev":"9-e12bb3492614f20fe5781f20e3bb17dc"}}, +{"id":"ender-fermata","key":"ender-fermata","value":{"rev":"3-e52d772042852408ae070b361c247068"}}, +{"id":"ender-fittext","key":"ender-fittext","value":{"rev":"5-e46f5a384d790ea6f65a5f8b9e43bac6"}}, +{"id":"ender-flowplayer","key":"ender-flowplayer","value":{"rev":"3-87267072fb566112315254fdf6547500"}}, +{"id":"ender-js","key":"ender-js","value":{"rev":"80-aa18576f782e3aa14c2ba7ba05658a30"}}, +{"id":"ender-json","key":"ender-json","value":{"rev":"3-5606608389aef832e4d4ecaa6c088a94"}}, +{"id":"ender-lettering","key":"ender-lettering","value":{"rev":"3-6fc6ad3869fad6374a1de69ba4e9301d"}}, +{"id":"ender-modules","key":"ender-modules","value":{"rev":"5-2bbb354d6219b5e13e6c897c562b8c83"}}, +{"id":"ender-poke","key":"ender-poke","value":{"rev":"5-3afa2fd690ebc4f2d75125b2c57e2a43"}}, +{"id":"ender-test","key":"ender-test","value":{"rev":"5-f8e90a951e5ad58199e53645067fad0c"}}, +{"id":"ender-tipsy","key":"ender-tipsy","value":{"rev":"5-cefd04c5d89707dfe31023702328d417"}}, +{"id":"ender-tween","key":"ender-tween","value":{"rev":"13-035312bb47bb3d29e7157932d4d29dcb"}}, +{"id":"ender-vows","key":"ender-vows","value":{"rev":"5-d48e088816d71779a80a74c43cd61b80"}}, +{"id":"ender-wallet","key":"ender-wallet","value":{"rev":"21-93723cd24fbf14d0f58f2ee41df9910d"}}, +{"id":"endtable","key":"endtable","value":{"rev":"36-8febf1be0120d867f9ff90e5c5058ef9"}}, +{"id":"enhance-css","key":"enhance-css","value":{"rev":"7-ae1cf6dee7d3116103781edaa7d47ba4"}}, +{"id":"ensure","key":"ensure","value":{"rev":"27-47e0874d1823188965a02a41abb61739"}}, +{"id":"ent","key":"ent","value":{"rev":"9-51924cd76fabcc4a244db66d65d48eff"}}, +{"id":"entropy","key":"entropy","value":{"rev":"17-84bfbbc0689b3b55e4fa3881888f0c12"}}, +{"id":"enumerable","key":"enumerable","value":{"rev":"3-d31bfcaca3b53eacc9ce09983efffe35"}}, +{"id":"envious","key":"envious","value":{"rev":"3-08d1e6d9c25c4e2350a0dd6759a27426"}}, +{"id":"environ","key":"environ","value":{"rev":"5-6f78def4743dfbeb77c1cb62d41eb671"}}, +{"id":"epub","key":"epub","value":{"rev":"3-5c3604eab851bce0a6ac66db6a6ce77a"}}, +{"id":"erlang","key":"erlang","value":{"rev":"3-3bd8e8e8ed416a32567475d984028b65"}}, +{"id":"err","key":"err","value":{"rev":"11-61d11f26b47d29ef819136214830f24c"}}, +{"id":"errbacker","key":"errbacker","value":{"rev":"5-0ad6d62207abb9822118ae69d0b9181d"}}, +{"id":"es5","key":"es5","value":{"rev":"3-5497cb0c821f3e17234c09ab0e67e1de"}}, +{"id":"es5-basic","key":"es5-basic","value":{"rev":"9-2ff708ae54ae223923cb810f799bfb2d"}}, +{"id":"es5-ext","key":"es5-ext","value":{"rev":"21-04537d704412a631596beeba4d534b33"}}, +{"id":"es5-shim","key":"es5-shim","value":{"rev":"34-3c4c40a6dab9ff137d1a7d4349d72c5b"}}, +{"id":"es5-shimify","key":"es5-shimify","value":{"rev":"3-f85700407e9c129d22b45c15700c82f1"}}, +{"id":"esc","key":"esc","value":{"rev":"5-42911775f391330f361105b8a0cefe47"}}, +{"id":"escaperoute","key":"escaperoute","value":{"rev":"18-e1372f35e6dcdb353b8c11e3c7e2f3b4"}}, +{"id":"escort","key":"escort","value":{"rev":"27-bf43341e15d565c9f67dd3300dc57734"}}, +{"id":"escrito","key":"escrito","value":{"rev":"5-c39d5b373486327b2e13670f921a2c7b"}}, +{"id":"esl","key":"esl","value":{"rev":"9-562ff6239a3b9910989bdf04746fa9d1"}}, +{"id":"espresso","key":"espresso","value":{"rev":"75-4c3692f1e92ea841e2d04338f4f2432e"}}, +{"id":"esproxy","key":"esproxy","value":{"rev":"7-be629dc6e1428f0fdb22fdbe7ab2ee99"}}, +{"id":"etch-a-sketch","key":"etch-a-sketch","value":{"rev":"3-a4e23b8e9f298d4844d6bff0a9688e53"}}, +{"id":"etherpad-lite-client","key":"etherpad-lite-client","value":{"rev":"55-58ca439a697db64ee66652da2d327fcb"}}, +{"id":"etsy","key":"etsy","value":{"rev":"5-1b795b360c28261f11c07d849637047c"}}, +{"id":"eve","key":"eve","value":{"rev":"3-16e72b336a1f354f4dfc8fa783fa2e72"}}, +{"id":"event-emitter","key":"event-emitter","value":{"rev":"5-15fe3e2e19b206929b815909737b15ac"}}, +{"id":"event-queue","key":"event-queue","value":{"rev":"12-200cd3bcd8e0b35bc4b15c1d8b6161e2"}}, +{"id":"event-stream","key":"event-stream","value":{"rev":"15-811a6329b5820d998731a604accf83db"}}, +{"id":"eventable","key":"eventable","value":{"rev":"3-08e9cd94a9aae280f406d043039e545e"}}, +{"id":"eventbrite","key":"eventbrite","value":{"rev":"13-cac3c9bda2da1c7b115de04264bb440f"}}, +{"id":"evented","key":"evented","value":{"rev":"6-ade6271c40a19aab6c4e3bb18b0987b6"}}, +{"id":"evented-twitter","key":"evented-twitter","value":{"rev":"6-3ebb7327022d6d6a8c49d684febb236b"}}, +{"id":"eventedsocket","key":"eventedsocket","value":{"rev":"59-cd2158c47b676a58ca3064a42c5274f7"}}, +{"id":"eventemitter","key":"eventemitter","value":{"rev":"5-7766fd7ebc44d52efbd0e7088e2321ec"}}, +{"id":"eventemitter2","key":"eventemitter2","value":{"rev":"41-927ce7996d4056a21f543e1f928f9699"}}, +{"id":"eventful","key":"eventful","value":{"rev":"7-9505f3c621f50addf02a457cfcc8ae78"}}, +{"id":"eventhub","key":"eventhub","value":{"rev":"15-5390d210a4d3ba079dd6e26bda652caa"}}, +{"id":"eventpipe","key":"eventpipe","value":{"rev":"7-41f0f93a9dcea477f08782af28e5b0f1"}}, +{"id":"events","key":"events","value":{"rev":"12-e3ead8eac62799cb299c139687135289"}}, +{"id":"events.io","key":"events.io","value":{"rev":"3-56c6955024cbb1765a1f9f37d8a739a4"}}, +{"id":"events.node","key":"events.node","value":{"rev":"3-e072f9c457fd8a3882ccd41ce52c5d00"}}, +{"id":"eventstream","key":"eventstream","value":{"rev":"5-a578a3a2a62d50631b3fb4d44a058bd1"}}, +{"id":"eventvat","key":"eventvat","value":{"rev":"3-e26d7fe8a226c7bc7f9e55abf1630e9c"}}, +{"id":"everyauth","key":"everyauth","value":{"rev":"107-a621f3028a230f9f3ade6a4e729a9a38"}}, +{"id":"ewdDOM","key":"ewdDOM","value":{"rev":"7-28188ec27fe011bf7fcb330a5fc90b55"}}, +{"id":"ewdGateway","key":"ewdGateway","value":{"rev":"7-81fe5ec1a3e920894b560fbf96160258"}}, +{"id":"exceptional","key":"exceptional","value":{"rev":"5-5842d306b2cf084c4e7c2ecb1d715280"}}, +{"id":"exceptional-node","key":"exceptional-node","value":{"rev":"5-3385b42af0a6ea8a943cb686d5789b0c"}}, +{"id":"executor","key":"executor","value":{"rev":"3-aee4f949a4d140a439965e137200c4fb"}}, +{"id":"exif","key":"exif","value":{"rev":"3-da6fd2bd837633f673b325231c164a0f"}}, +{"id":"expanda","key":"expanda","value":{"rev":"3-dcbc59c5db0017d25748ec8094aeeb0a"}}, +{"id":"express","key":"express","value":{"rev":"157-24ef0cdd4ba6c6697c66f3e78bc777bb"}}, +{"id":"express-aid","key":"express-aid","value":{"rev":"21-6d3831e93b823f800e6a22eb08aa41d6"}}, +{"id":"express-app-bootstrap","key":"express-app-bootstrap","value":{"rev":"3-4b5a256bef5ca3bd41b0958f594907b9"}}, +{"id":"express-asset","key":"express-asset","value":{"rev":"3-7d5e23bc753851c576e429e7901301d9"}}, +{"id":"express-blocks","key":"express-blocks","value":{"rev":"7-305b6e046355c8e7a4bb0f1f225092ef"}}, +{"id":"express-cache","key":"express-cache","value":{"rev":"5-eebbea6c0e5db5fd4c12847933c853e1"}}, +{"id":"express-chromeframe","key":"express-chromeframe","value":{"rev":"5-1bb72d30b7a1f00d3eaf248285942d5e"}}, +{"id":"express-coffee","key":"express-coffee","value":{"rev":"39-14eff195c9352c6c3898befb3d613807"}}, +{"id":"express-config","key":"express-config","value":{"rev":"3-27ea0d27e20afa9ece375878aab846ed"}}, +{"id":"express-configure","key":"express-configure","value":{"rev":"7-46bd636c0b56dfcfa4f1ee46b43d6ca0"}}, +{"id":"express-contrib","key":"express-contrib","value":{"rev":"20-472c93fefe0a9a6440a76b2c843b2e0e"}}, +{"id":"express-controllers","key":"express-controllers","value":{"rev":"3-296d54f3b5bf26bfa057cd8c5f0a11ea"}}, +{"id":"express-controllers-new","key":"express-controllers-new","value":{"rev":"15-11f73e4a8ab935987a3b8f132d80afa5"}}, +{"id":"express-cross-site","key":"express-cross-site","value":{"rev":"11-b76814fdd58a616b3cafe6e97f3c7c98"}}, +{"id":"express-csrf","key":"express-csrf","value":{"rev":"20-2a79f0fdc65ed91120e7417a5cf8ce6c"}}, +{"id":"express-custom-errors","key":"express-custom-errors","value":{"rev":"6-bd131169ccac73fa3766195147e34404"}}, +{"id":"express-dialect","key":"express-dialect","value":{"rev":"34-1fbc5baf7ea464abbadcfaf3c1971660"}}, +{"id":"express-dust","key":"express-dust","value":{"rev":"5-33a1d8dd9c113d6fb8f1818c8a749c1b"}}, +{"id":"express-expose","key":"express-expose","value":{"rev":"7-f8757d8bf8d3fac8395ee8ce5117a895"}}, +{"id":"express-extras","key":"express-extras","value":{"rev":"6-53c7bfc68a41043eb5e11321673a2c48"}}, +{"id":"express-form","key":"express-form","value":{"rev":"27-533598a1bd5a0e9b8d694f5b38228c6c"}}, +{"id":"express-helpers","key":"express-helpers","value":{"rev":"3-7b9123b0ea6b840bb5a6e4da9c28308c"}}, +{"id":"express-livejade","key":"express-livejade","value":{"rev":"9-1320996d4ed3db352a2c853226880a17"}}, +{"id":"express-logger","key":"express-logger","value":{"rev":"5-c485b1020742310a313cac87abdde67b"}}, +{"id":"express-messages","key":"express-messages","value":{"rev":"5-f6225b906d0ac33ba1bfc5409b227edb"}}, +{"id":"express-messages-bootstrap","key":"express-messages-bootstrap","value":{"rev":"5-fb8fc70c1cbd6df0e07b2e0148bdf8bf"}}, +{"id":"express-mongoose","key":"express-mongoose","value":{"rev":"29-2d6907a23c8c3bbfdf9b6f9b6b3c00e3"}}, +{"id":"express-mvc-bootstrap","key":"express-mvc-bootstrap","value":{"rev":"15-c53ecb696af1d34ff94efe5ab5d89287"}}, +{"id":"express-namespace","key":"express-namespace","value":{"rev":"7-d209feb707821b06426aed233295df75"}}, +{"id":"express-on-railway","key":"express-on-railway","value":{"rev":"7-784b533cbf29930d04039bafb2c03cc0"}}, +{"id":"express-params","key":"express-params","value":{"rev":"3-13f0ed9c17d10fd01d1ff869e625c91f"}}, +{"id":"express-resource","key":"express-resource","value":{"rev":"13-cca556327152588a87112c6bf2613bc9"}}, +{"id":"express-rewrite","key":"express-rewrite","value":{"rev":"7-c76ca2616eb6e70209ace6499f5b961a"}}, +{"id":"express-route-util","key":"express-route-util","value":{"rev":"9-4b7bad7e8ab3bf71daf85362b47ec8be"}}, +{"id":"express-rpx","key":"express-rpx","value":{"rev":"9-54d48f5e24174500c73f07d97a7d3f9f"}}, +{"id":"express-session-mongo","key":"express-session-mongo","value":{"rev":"3-850cf5b42f65a6f27af6edf1ad1aa966"}}, +{"id":"express-session-mongo-russp","key":"express-session-mongo-russp","value":{"rev":"7-441e8afcd466a4cbb5e65a1949190f97"}}, +{"id":"express-session-redis","key":"express-session-redis","value":{"rev":"6-5f4f16092a0706d2daef89470d6971e6"}}, +{"id":"express-share","key":"express-share","value":{"rev":"5-f5327a97738e9c8e6e05a51cb7153f82"}}, +{"id":"express-spdy","key":"express-spdy","value":{"rev":"11-2634f388338c45b2d6f020d2a6739ba1"}}, +{"id":"express-template-override","key":"express-template-override","value":{"rev":"5-758cf2eb0c9cbc32f205c4ba2ece24f9"}}, +{"id":"express-trace","key":"express-trace","value":{"rev":"5-ba59571f8881e02e2b297ed9ffb4e48c"}}, +{"id":"express-unstable","key":"express-unstable","value":{"rev":"3-06467336e1610ba9915401df26c936c1"}}, +{"id":"express-validate","key":"express-validate","value":{"rev":"15-b63bd9b18fadfc2345d0a10a7a2fb2e7"}}, +{"id":"express-view-helpers","key":"express-view-helpers","value":{"rev":"7-4d07ba11f81788783c6f9fd48fdf8834"}}, +{"id":"express-with-ease","key":"express-with-ease","value":{"rev":"3-604d9176a4a03f9f7c74679604c7bbf9"}}, +{"id":"express-wormhole","key":"express-wormhole","value":{"rev":"3-7e06cf63b070e0f54b2aa71b48db9a40"}}, +{"id":"expresso","key":"expresso","value":{"rev":"79-a27b6ef2f9e7bb9f85da34f728d124a8"}}, +{"id":"expressobdd","key":"expressobdd","value":{"rev":"5-e8cae7a17a9e8c1779c08abedc674e03"}}, +{"id":"ext","key":"ext","value":{"rev":"6-8790c06324c5f057b1713ba420e8bf27"}}, +{"id":"extend","key":"extend","value":{"rev":"3-934d0de77bbaefb1b52ec18a17f46d7d"}}, +{"id":"extendables","key":"extendables","value":{"rev":"11-e4db9b62a4047e95fb4d7f88e351a14e"}}, +{"id":"extjs-node","key":"extjs-node","value":{"rev":"3-2b2033dbbf0b99d41e876498886b0995"}}, +{"id":"extractcontent","key":"extractcontent","value":{"rev":"6-ad70764c834ecd3414cbc15dbda317c3"}}, +{"id":"extractor","key":"extractor","value":{"rev":"9-f95bde04bb8db37350c9cc95c5578c03"}}, +{"id":"extx-layout","key":"extx-layout","value":{"rev":"3-f6bbc3a923ebce17f62cbf382b096ac7"}}, +{"id":"extx-reference-slot","key":"extx-reference-slot","value":{"rev":"14-b1b92573492f7239144693ee9e1d1aac"}}, +{"id":"extx-shotenjin","key":"extx-shotenjin","value":{"rev":"5-c641121ba57fb960d8db766511ecf6cd"}}, +{"id":"eyes","key":"eyes","value":{"rev":"16-fab6b201646fb12986e396c33a7cd428"}}, +{"id":"f","key":"f","value":{"rev":"3-23b73ffafbe5b56b6a0736db6a7256a6"}}, +{"id":"f-core","key":"f-core","value":{"rev":"3-9a6898e007acf48d956f0a70ff07a273"}}, +{"id":"f7u12rl","key":"f7u12rl","value":{"rev":"3-7b5e15d106db8b7f8784b27f7d2c9bdc"}}, +{"id":"fab","key":"fab","value":{"rev":"10-149dec0b653ce481af013c63fec125e8"}}, +{"id":"fab.accept","key":"fab.accept","value":{"rev":"6-d6b08e7054d823906c6c64c92b008d3a"}}, +{"id":"fab.static","key":"fab.static","value":{"rev":"6-5bdb6db53223bb5203ba91a5b2b87566"}}, +{"id":"fabric","key":"fabric","value":{"rev":"15-30e99e486c58962c049bea54e00b7cb9"}}, +{"id":"face-detect","key":"face-detect","value":{"rev":"3-d4d3f1a894c807f79ba541d2f2ed630d"}}, +{"id":"facebook","key":"facebook","value":{"rev":"17-e241999000e34aed62ee0f9f358bfd06"}}, +{"id":"facebook-api","key":"facebook-api","value":{"rev":"5-cb9d07b2eba18d8fb960768d69f80326"}}, +{"id":"facebook-client","key":"facebook-client","value":{"rev":"17-84c106420b183ca791b0c80fd8c3fe00"}}, +{"id":"facebook-connect","key":"facebook-connect","value":{"rev":"6-471f28bb12928e32610d02c0b03aa972"}}, +{"id":"facebook-express","key":"facebook-express","value":{"rev":"11-6e6d98b8252907b05c41aac7e0418f4e"}}, +{"id":"facebook-graph","key":"facebook-graph","value":{"rev":"9-c92149825fef42ad76bcffdd232cc9a5"}}, +{"id":"facebook-graph-client","key":"facebook-graph-client","value":{"rev":"10-c3136a2b2e5c5d80b78404a4102af7b5"}}, +{"id":"facebook-js","key":"facebook-js","value":{"rev":"22-dd9d916550ebccb71e451acbd7a4b315"}}, +{"id":"facebook-realtime-graph","key":"facebook-realtime-graph","value":{"rev":"6-c4fe01ac036585394cd59f01c6fc7df1"}}, +{"id":"facebook-sdk","key":"facebook-sdk","value":{"rev":"21-77daf7eba51bb913e54381995718e13d"}}, +{"id":"facebook-session-cookie","key":"facebook-session-cookie","value":{"rev":"9-70e14cac759dacadacb0af17387ab230"}}, +{"id":"facebook-signed-request","key":"facebook-signed-request","value":{"rev":"5-11cb36123a94e37fff6a7efd6f7d88b9"}}, +{"id":"facebook.node","key":"facebook.node","value":{"rev":"3-f6760795e71c1d5734ae34f9288d02be"}}, +{"id":"factory-worker","key":"factory-worker","value":{"rev":"7-1c365b3dd92b12573d00c08b090e01ae"}}, +{"id":"fake","key":"fake","value":{"rev":"25-2d1ae2299168d95edb8d115fb7961c8e"}}, +{"id":"fake-queue","key":"fake-queue","value":{"rev":"7-d6970de6141c1345c6ad3cd1586cfe7b"}}, +{"id":"fakedb","key":"fakedb","value":{"rev":"34-889fb5c9fa328b536f9deb138ff125b1"}}, +{"id":"fakeweb","key":"fakeweb","value":{"rev":"3-7fb1394b4bac70f9ab26e60b1864b41f"}}, +{"id":"fanfeedr","key":"fanfeedr","value":{"rev":"22-de3d485ad60c8642eda260afe5620973"}}, +{"id":"fantomex","key":"fantomex","value":{"rev":"3-79b26bcf9aa365485ed8131c474bf6f8"}}, +{"id":"far","key":"far","value":{"rev":"19-c8d9f1e8bc12a31cb27bef3ed44759ce"}}, +{"id":"farm","key":"farm","value":{"rev":"31-ab77f7f48b24bf6f0388b926d2ac370b"}}, +{"id":"fast-detective","key":"fast-detective","value":{"rev":"5-b0b6c8901458f3f07044d4266db0aa52"}}, +{"id":"fast-msgpack-rpc","key":"fast-msgpack-rpc","value":{"rev":"7-b2dfd3d331459382fe1e8166288ffef6"}}, +{"id":"fast-or-slow","key":"fast-or-slow","value":{"rev":"13-4118190cd6a0185af8ea9b381ee2bc98"}}, +{"id":"fast-stats","key":"fast-stats","value":{"rev":"3-15cdd56d9efa38f08ff20ca731867d4d"}}, +{"id":"fastcgi-stream","key":"fastcgi-stream","value":{"rev":"5-99c0c4dfc7a874e1af71e5ef3ac95ba4"}}, +{"id":"faye","key":"faye","value":{"rev":"30-49b7d05534c35527972a4d5e07ac8895"}}, +{"id":"faye-service","key":"faye-service","value":{"rev":"3-bad8bf6722461627eac7d0141e09b3f7"}}, +{"id":"fe-fu","key":"fe-fu","value":{"rev":"21-f3cb04870621ce40da8ffa009686bdeb"}}, +{"id":"feed-tables","key":"feed-tables","value":{"rev":"9-4410bad138f4df570e7be37bb17209b3"}}, +{"id":"feedBum","key":"feedBum","value":{"rev":"3-b4ff9edffb0c5c33c4ed40f60a12611a"}}, +{"id":"feedparser","key":"feedparser","value":{"rev":"5-eb2c32e00832ed7036eb1b87d2eea33e"}}, +{"id":"feral","key":"feral","value":{"rev":"19-0b512b6301a26ca5502710254bd5a9ba"}}, +{"id":"fermata","key":"fermata","value":{"rev":"25-eeafa3e5b769a38b8a1065c0a66e0653"}}, +{"id":"ferret","key":"ferret","value":{"rev":"9-7ab6b29cb0cad9855d927855c2a27bff"}}, +{"id":"ffmpeg-node","key":"ffmpeg-node","value":{"rev":"3-e55011ecb147f599475a12b10724a583"}}, +{"id":"ffmpeg2theora","key":"ffmpeg2theora","value":{"rev":"13-05d2f83dbbb90e832176ebb7fdc2ae2e"}}, +{"id":"fiberize","key":"fiberize","value":{"rev":"5-dfb978d6b88db702f68a13e363fb21af"}}, +{"id":"fibers","key":"fibers","value":{"rev":"71-4b22dbb449839723ed9b0d533339c764"}}, +{"id":"fibers-promise","key":"fibers-promise","value":{"rev":"9-3a9977528f8df079969d4ae48db7a0a7"}}, +{"id":"fidel","key":"fidel","value":{"rev":"37-370838ed9984cfe6807114b5fef789e6"}}, +{"id":"fig","key":"fig","value":{"rev":"7-24acf90e7d06dc8b83adb02b5776de3c"}}, +{"id":"file","key":"file","value":{"rev":"6-1131008db6855f20969413be7cc2e968"}}, +{"id":"file-api","key":"file-api","value":{"rev":"9-a9cc8f3de14eef5bba86a80f6705651c"}}, +{"id":"fileify","key":"fileify","value":{"rev":"17-50603c037d5e3a0a405ff4af3e71211f"}}, +{"id":"filepad","key":"filepad","value":{"rev":"23-8c4b2c04151723033523369c42144cc9"}}, +{"id":"filerepl","key":"filerepl","value":{"rev":"5-94999cc91621e08f96ded7423ed6d6f0"}}, +{"id":"fileset","key":"fileset","value":{"rev":"3-ea6a9f45aaa5e65279463041ee629dbe"}}, +{"id":"filestore","key":"filestore","value":{"rev":"9-6cce7c9cd2b2b11d12905885933ad25a"}}, +{"id":"filesystem-composer","key":"filesystem-composer","value":{"rev":"34-f1d04d711909f3683c1d00cd4ab7ca47"}}, +{"id":"fileutils","key":"fileutils","value":{"rev":"3-88876b61c9d0a915f95ce0f258e5ce51"}}, +{"id":"filter","key":"filter","value":{"rev":"3-4032087a5cf2de3dd164c95454a2ab05"}}, +{"id":"filter-chain","key":"filter-chain","value":{"rev":"5-c522429dc83ccc7dde4eaf5409070332"}}, +{"id":"fin","key":"fin","value":{"rev":"23-77cf12e84eb62958b40aa08fdcbb259d"}}, +{"id":"fin-id","key":"fin-id","value":{"rev":"3-9f85ee1e426d4bdad5904002a6d9342c"}}, +{"id":"finance","key":"finance","value":{"rev":"3-cf97ddb6af3f6601bfb1e49a600f56af"}}, +{"id":"finder","key":"finder","value":{"rev":"13-65767fe51799a397ddd9b348ead12ed2"}}, +{"id":"findit","key":"findit","value":{"rev":"15-435e4168208548a2853f6efcd4529de3"}}, +{"id":"fingerprint","key":"fingerprint","value":{"rev":"3-c40e2169260010cac472e688c392ea3d"}}, +{"id":"finjector","key":"finjector","value":{"rev":"5-646da199b0b336d20e421ef6ad613e90"}}, +{"id":"firebird","key":"firebird","value":{"rev":"5-7e7ec03bc00e562f5f7afc7cad76da77"}}, +{"id":"firmata","key":"firmata","value":{"rev":"20-f3cbde43ce2677a208bcf3599af5b670"}}, +{"id":"first","key":"first","value":{"rev":"3-c647f6fc1353a1c7b49f5e6cd1905b1e"}}, +{"id":"fishback","key":"fishback","value":{"rev":"19-27a0fdc8c3abe4d61fff9c7a098f3fd9"}}, +{"id":"fitbit-js","key":"fitbit-js","value":{"rev":"3-62fe0869ddefd2949d8c1e568f994c93"}}, +{"id":"fix","key":"fix","value":{"rev":"17-4a79db9924922da010df71e5194bcac6"}}, +{"id":"flagpoll","key":"flagpoll","value":{"rev":"3-0eb7b98e2a0061233aa5228eb7348dff"}}, +{"id":"flags","key":"flags","value":{"rev":"3-594f0ec2e903ac74556d1c1f7c6cca3b"}}, +{"id":"flexcache","key":"flexcache","value":{"rev":"11-e1e4eeaa0793d95056a857bec04282ae"}}, +{"id":"flickr-conduit","key":"flickr-conduit","value":{"rev":"7-d3b2b610171589db68809c3ec3bf2bcb"}}, +{"id":"flickr-js","key":"flickr-js","value":{"rev":"5-66c8e8a00ad0a906f632ff99cf490163"}}, +{"id":"flickr-reflection","key":"flickr-reflection","value":{"rev":"6-3c34c3ac904b6d6f26182807fbb95c5e"}}, +{"id":"flo","key":"flo","value":{"rev":"3-ce440035f0ec9a10575b1c8fab0c77da"}}, +{"id":"flow","key":"flow","value":{"rev":"6-95841a07c96f664d49d1af35373b3dbc"}}, +{"id":"flowcontrol","key":"flowcontrol","value":{"rev":"3-093bbbc7496072d9ecb136a826680366"}}, +{"id":"flowjs","key":"flowjs","value":{"rev":"3-403fc9e107ec70fe06236c27e70451c7"}}, +{"id":"fluent-ffmpeg","key":"fluent-ffmpeg","value":{"rev":"33-5982779d5f55a5915f0f8b0353f1fe2a"}}, +{"id":"flume-rpc","key":"flume-rpc","value":{"rev":"7-4214a2db407a3e64f036facbdd34df91"}}, +{"id":"flux","key":"flux","value":{"rev":"3-1ad83106af7ee83547c797246bd2c8b1"}}, +{"id":"fly","key":"fly","value":{"rev":"9-0a45b1b97f56ba0faf4af4777b473fad"}}, +{"id":"fn","key":"fn","value":{"rev":"5-110bab5d623b3628e413d972e040ed26"}}, +{"id":"fnProxy","key":"fnProxy","value":{"rev":"3-db1c90e5a06992ed290c679ac6dbff6a"}}, +{"id":"follow","key":"follow","value":{"rev":"3-44256c802b4576fcbae1264e9b824e6a"}}, +{"id":"fomatto","key":"fomatto","value":{"rev":"7-31ce5c9eba7f084ccab2dc5994796f2d"}}, +{"id":"foounit","key":"foounit","value":{"rev":"20-caf9cd90d6c94d19be0b3a9c9cb33ee0"}}, +{"id":"forEachAsync","key":"forEachAsync","value":{"rev":"3-d9cd8021ea9d5014583327752a9d01c4"}}, +{"id":"forever","key":"forever","value":{"rev":"99-90060d5d1754b1bf749e5278a2a4516b"}}, +{"id":"forge","key":"forge","value":{"rev":"9-0d9d59fd2d47a804e600aaef538ebbbf"}}, +{"id":"fork","key":"fork","value":{"rev":"13-f355105e07608de5ae2f3e7c0817af52"}}, +{"id":"forker","key":"forker","value":{"rev":"11-9717e2e3fa60b46df08261d936d9e5d7"}}, +{"id":"form-data","key":"form-data","value":{"rev":"3-5750e73f7a0902ec2fafee1db6d2e6f6"}}, +{"id":"form-validator","key":"form-validator","value":{"rev":"25-7d016b35895dc58ffd0bbe54fd9be241"}}, +{"id":"form2json","key":"form2json","value":{"rev":"8-7501dd9b43b9fbb7194b94e647816e5e"}}, +{"id":"formaline","key":"formaline","value":{"rev":"3-2d45fbb3e83b7e77bde0456607e6f1e3"}}, +{"id":"format","key":"format","value":{"rev":"7-5dddc67c10de521ef06a7a07bb3f7e2e"}}, +{"id":"formatdate","key":"formatdate","value":{"rev":"3-6d522e3196fe3b438fcc4aed0f7cf690"}}, +{"id":"formidable","key":"formidable","value":{"rev":"87-d27408b00793fee36f6632a895372590"}}, +{"id":"forms","key":"forms","value":{"rev":"6-253e032f07979b79c2e7dfa01be085dc"}}, +{"id":"forrst","key":"forrst","value":{"rev":"3-ef553ff1b6383bab0f81f062cdebac53"}}, +{"id":"fortumo","key":"fortumo","value":{"rev":"6-def3d146b29b6104019c513ce20bb61f"}}, +{"id":"foss-credits","key":"foss-credits","value":{"rev":"3-c824326e289e093406b2de4efef70cb7"}}, +{"id":"foss-credits-collection","key":"foss-credits-collection","value":{"rev":"17-de4ffca51768a36c8fb1b9c2bc66c80f"}}, +{"id":"foursquareonnode","key":"foursquareonnode","value":{"rev":"5-a4f0a1ed5d3be3056f10f0e9517efa83"}}, +{"id":"fraggle","key":"fraggle","value":{"rev":"7-b9383baf96bcdbd4022b4b887e4a3729"}}, +{"id":"framework","key":"framework","value":{"rev":"3-afb19a9598a0d50320b4f1faab1ae2c6"}}, +{"id":"frameworkjs","key":"frameworkjs","value":{"rev":"7-cd418da3272c1e8349126e442ed15dbd"}}, +{"id":"frank","key":"frank","value":{"rev":"12-98031fb56f1c89dfc7888f5d8ca7f0a9"}}, +{"id":"freakset","key":"freakset","value":{"rev":"21-ba60d0840bfa3da2c8713c3c2e6856a0"}}, +{"id":"freckle","key":"freckle","value":{"rev":"3-8e2e9a07b2650fbbd0a598b948ef993b"}}, +{"id":"freebase","key":"freebase","value":{"rev":"7-a1daf1cc2259b886f574f5c902eebcf4"}}, +{"id":"freecontrol","key":"freecontrol","value":{"rev":"6-7a51776b8764f406573d5192bab36adf"}}, +{"id":"freestyle","key":"freestyle","value":{"rev":"9-100f9e9d3504d6e1c6a2d47651c70f51"}}, +{"id":"frenchpress","key":"frenchpress","value":{"rev":"9-306d6ac21837879b8040d7f9aa69fc20"}}, +{"id":"fs-boot","key":"fs-boot","value":{"rev":"20-72b44b403767aa486bf1dc987c750733"}}, +{"id":"fs-ext","key":"fs-ext","value":{"rev":"10-3360831c3852590a762f8f82525c025e"}}, +{"id":"fsevents","key":"fsevents","value":{"rev":"6-bb994f41842e144cf43249fdf6bf51e1"}}, +{"id":"fsext","key":"fsext","value":{"rev":"9-a1507d84e91ddf26ffaa76016253b4fe"}}, +{"id":"fsh","key":"fsh","value":{"rev":"5-1e3784b2df1c1a28b81f27907945f48b"}}, +{"id":"fsm","key":"fsm","value":{"rev":"5-b113be7b30b2a2c9089edcb6fa4c15d3"}}, +{"id":"fswatch","key":"fswatch","value":{"rev":"11-287eea565c9562161eb8969d765bb191"}}, +{"id":"ftp","key":"ftp","value":{"rev":"5-751e312520c29e76f7d79c648248c56c"}}, +{"id":"ftp-get","key":"ftp-get","value":{"rev":"27-1e908bd075a0743dbb1d30eff06485e2"}}, +{"id":"fugue","key":"fugue","value":{"rev":"81-0c08e67e8deb4b5b677fe19f8362dbd8"}}, +{"id":"fullauto","key":"fullauto","value":{"rev":"9-ef915156026dabded5a4a76c5a751916"}}, +{"id":"fun","key":"fun","value":{"rev":"12-8396e3583e206dbf90bbea4316976f66"}}, +{"id":"functional","key":"functional","value":{"rev":"5-955979028270f5d3749bdf86b4d2c925"}}, +{"id":"functools","key":"functools","value":{"rev":"5-42ba84ce365bf8c0aaf3e5e6c369920b"}}, +{"id":"funk","key":"funk","value":{"rev":"14-67440a9b2118d8f44358bf3b17590243"}}, +{"id":"fusion","key":"fusion","value":{"rev":"19-64983fc6e5496c836be26e5fbc8527d1"}}, +{"id":"fusker","key":"fusker","value":{"rev":"48-58f05561c65ad288a78fa7210f146ba1"}}, +{"id":"future","key":"future","value":{"rev":"3-0ca60d8ae330e40ef6cf8c17a421d668"}}, +{"id":"futures","key":"futures","value":{"rev":"44-8a2aaf0f40cf84c9475824d9cec006ad"}}, +{"id":"fuzzy_file_finder","key":"fuzzy_file_finder","value":{"rev":"8-ee555aae1d433e60166d2af1d72ac6b9"}}, +{"id":"fuzzylogic","key":"fuzzylogic","value":{"rev":"8-596a8f4744d1dabcb8eb6466d9980fca"}}, +{"id":"fxs","key":"fxs","value":{"rev":"3-d3cb81151b0ddd9a4a5934fb63ffff75"}}, +{"id":"g","key":"g","value":{"rev":"3-55742a045425a9b4c9fe0e8925fad048"}}, +{"id":"g.raphael","key":"g.raphael","value":{"rev":"4-190d0235dc08f783dda77b3ecb60b11a"}}, +{"id":"ga","key":"ga","value":{"rev":"3-c47d516ac5e6de8ef7ef9d16fabcf6c7"}}, +{"id":"galletita","key":"galletita","value":{"rev":"3-aa7a01c3362a01794f36e7aa9664b850"}}, +{"id":"game","key":"game","value":{"rev":"3-0f1539e4717a2780205d98ef6ec0886d"}}, +{"id":"gamina","key":"gamina","value":{"rev":"15-871f4970f1e87b7c8ad361456001c76f"}}, +{"id":"gang-bang","key":"gang-bang","value":{"rev":"6-f565cb7027a8ca109481df49a6d41114"}}, +{"id":"gapserver","key":"gapserver","value":{"rev":"9-b25eb0eefc21e407cba596a0946cb3a0"}}, +{"id":"garbage","key":"garbage","value":{"rev":"3-80f4097d5f1f2c75f509430a11c8a15e"}}, +{"id":"gaseous","key":"gaseous","value":{"rev":"3-8021582ab9dde42d235193e6067be72d"}}, +{"id":"gaudium","key":"gaudium","value":{"rev":"11-7d612f1c5d921180ccf1c162fe2c7446"}}, +{"id":"gauss","key":"gauss","value":{"rev":"3-8fd18b2d7a223372f190797e4270a535"}}, +{"id":"gcli","key":"gcli","value":{"rev":"3-210404347cc643e924cec678d0195099"}}, +{"id":"gcw2html","key":"gcw2html","value":{"rev":"3-2aff7bff7981f2f9800c5f65812aa0a6"}}, +{"id":"gd","key":"gd","value":{"rev":"4-ac5a662e709a2993ed1fd1cbf7c4d7b4"}}, +{"id":"gdata","key":"gdata","value":{"rev":"3-c6b3a95064a1e1e0bb74f248ab4e73c4"}}, +{"id":"gdata-js","key":"gdata-js","value":{"rev":"17-0959500a4000d7058d8116af1e01b0d9"}}, +{"id":"gearman","key":"gearman","value":{"rev":"8-ac9fb7af75421ca2988d6098dbfd4c7c"}}, +{"id":"gearnode","key":"gearnode","value":{"rev":"7-8e40ec257984e887e2ff5948a6dde04e"}}, +{"id":"geck","key":"geck","value":{"rev":"161-c8117106ef58a6d7d21920df80159eab"}}, +{"id":"geddy","key":"geddy","value":{"rev":"13-da16f903aca1ec1f47086fa250b58abb"}}, +{"id":"gen","key":"gen","value":{"rev":"3-849005c8b8294c2a811ff4eccdedf436"}}, +{"id":"generic-function","key":"generic-function","value":{"rev":"5-dc046f58f96119225efb17ea5334a60f"}}, +{"id":"generic-pool","key":"generic-pool","value":{"rev":"18-65ff988620293fe7ffbd0891745c3ded"}}, +{"id":"genji","key":"genji","value":{"rev":"49-4c72bcaa57572ad0d43a1b7e9e5a963a"}}, +{"id":"genstatic","key":"genstatic","value":{"rev":"19-4278d0766226af4db924bb0f6b127699"}}, +{"id":"gently","key":"gently","value":{"rev":"24-c9a3ba6b6fd183ee1b5dda569122e978"}}, +{"id":"genx","key":"genx","value":{"rev":"7-f0c0ff65e08e045e8dd1bfcb25ca48d4"}}, +{"id":"geo","key":"geo","value":{"rev":"7-fa2a79f7260b849c277735503a8622e9"}}, +{"id":"geo-distance","key":"geo-distance","value":{"rev":"7-819a30e9b4776e4416fe9510ca79cd93"}}, +{"id":"geocoder","key":"geocoder","value":{"rev":"15-736e627571ad8dba3a9d0da1ae019c35"}}, +{"id":"geohash","key":"geohash","value":{"rev":"6-b9e62c804abe565425a8e6a01354407a"}}, +{"id":"geoip","key":"geoip","value":{"rev":"231-e5aa7acd5fb44833a67f96476b4fac49"}}, +{"id":"geoip-lite","key":"geoip-lite","value":{"rev":"9-efd916135c056406ede1ad0fe15534fa"}}, +{"id":"geojs","key":"geojs","value":{"rev":"35-b0f97b7c72397d6eb714602dc1121183"}}, +{"id":"geolib","key":"geolib","value":{"rev":"3-923a8622d1bd97c22f71ed6537ba5062"}}, +{"id":"geonode","key":"geonode","value":{"rev":"35-c2060653af72123f2f9994fca1c86d70"}}, +{"id":"geoutils","key":"geoutils","value":{"rev":"6-2df101fcbb01849533b2fbc80dc0eb7a"}}, +{"id":"gerbil","key":"gerbil","value":{"rev":"3-b5961044bda490a34085ca826aeb3022"}}, +{"id":"gerenuk","key":"gerenuk","value":{"rev":"13-4e45a640bcbadc3112e105ec5b60b907"}}, +{"id":"get","key":"get","value":{"rev":"18-dd215d673f19bbd8b321a7dd63e004e8"}}, +{"id":"getopt","key":"getopt","value":{"rev":"3-454354e4557d5e7205410acc95c9baae"}}, +{"id":"getrusage","key":"getrusage","value":{"rev":"8-d6ef24793b8e4c46f3cdd14937cbabe1"}}, +{"id":"gettext","key":"gettext","value":{"rev":"3-4c12268a4cab64ec4ef3ac8c9ec7912b"}}, +{"id":"getz","key":"getz","value":{"rev":"9-f3f43934139c9af6ddfb8b91e9a121ba"}}, +{"id":"gevorg.me","key":"gevorg.me","value":{"rev":"33-700502b8ca7041bf8d29368069cac365"}}, +{"id":"gex","key":"gex","value":{"rev":"3-105824d7a3f9c2ac7313f284c3f81d22"}}, +{"id":"gexode","key":"gexode","value":{"rev":"3-4a3552eae4ff3ba4443f9371a1ab4b2e"}}, +{"id":"gfx","key":"gfx","value":{"rev":"8-1f6c90bc3819c3b237e8d1f28ad1b136"}}, +{"id":"gherkin","key":"gherkin","value":{"rev":"77-6e835c8107bb4c7c8ad1fa072ac12c20"}}, +{"id":"ghm","key":"ghm","value":{"rev":"3-c440ae39832a575087ff1920b33c275b"}}, +{"id":"gif","key":"gif","value":{"rev":"14-e65638621d05b99ffe71b18097f29134"}}, +{"id":"gimme","key":"gimme","value":{"rev":"7-caab8354fe257fc307f8597e34ede547"}}, +{"id":"gist","key":"gist","value":{"rev":"11-eea7ea1adf3cde3a0804d2e1b0d6f7d6"}}, +{"id":"gista","key":"gista","value":{"rev":"23-48b8c374cfb8fc4e8310f3469cead6d5"}}, +{"id":"gisty","key":"gisty","value":{"rev":"5-1a898d0816f4129ab9a0d3f03ff9feb4"}}, +{"id":"git","key":"git","value":{"rev":"39-1f77df3ebeec9aae47ae8df56de6757f"}}, +{"id":"git-fs","key":"git-fs","value":{"rev":"14-7d365cddff5029a9d11fa8778a7296d2"}}, +{"id":"gitProvider","key":"gitProvider","value":{"rev":"9-c704ae702ef27bb57c0efd279a464e28"}}, +{"id":"github","key":"github","value":{"rev":"16-9345138ca7507c12be4a817b1abfeef6"}}, +{"id":"github-flavored-markdown","key":"github-flavored-markdown","value":{"rev":"3-f12043eb2969aff51db742b13d329446"}}, +{"id":"gitteh","key":"gitteh","value":{"rev":"39-88b00491fd4ce3294b8cdf61b9708383"}}, +{"id":"gitter","key":"gitter","value":{"rev":"16-88d7ef1ab6a7e751ca2cf6b50894deb4"}}, +{"id":"gittyup","key":"gittyup","value":{"rev":"37-ed6030c1acdd8b989ac34cd10d6dfd1e"}}, +{"id":"gitweb","key":"gitweb","value":{"rev":"9-5331e94c6df9ee7724cde3738a0c6230"}}, +{"id":"gitwiki","key":"gitwiki","value":{"rev":"9-0f167a3a87bce7f3e941136a06e91810"}}, +{"id":"gizmo","key":"gizmo","value":{"rev":"5-1da4da8d66690457c0bf743473b755f6"}}, +{"id":"gleak","key":"gleak","value":{"rev":"17-d44a968b32e4fdc7d27bacb146391422"}}, +{"id":"glob","key":"glob","value":{"rev":"203-4a79e232cf6684a48ccb9134a6ce938c"}}, +{"id":"glob-trie.js","key":"glob-trie.js","value":{"rev":"7-bff534e3aba8f6333fa5ea871b070de2"}}, +{"id":"global","key":"global","value":{"rev":"3-f15b0c9ae0ea9508890bff25c8e0f795"}}, +{"id":"globalize","key":"globalize","value":{"rev":"5-33d10c33fb24af273104f66098e246c4"}}, +{"id":"glossary","key":"glossary","value":{"rev":"3-5e143d09d22a01eb2ee742ceb3e18f6e"}}, +{"id":"glossy","key":"glossy","value":{"rev":"9-f31e00844e8be49e5812fe64a6f1e1cc"}}, +{"id":"gm","key":"gm","value":{"rev":"28-669722d34a3dc29c8c0b27abd73493a1"}}, +{"id":"gnarly","key":"gnarly","value":{"rev":"3-796f5df3483f304cb404cc7ac7702512"}}, +{"id":"gnomenotify","key":"gnomenotify","value":{"rev":"9-bc066c0556ad4a20e7a7ae58cdc4cf91"}}, +{"id":"gofer","key":"gofer","value":{"rev":"15-3fc77ce34e95ffecd12d3854a1bb2da9"}}, +{"id":"goo.gl","key":"goo.gl","value":{"rev":"37-eac7c44d33cc42c618372f0bdd4365c2"}}, +{"id":"goodreads","key":"goodreads","value":{"rev":"5-acd9fe24139aa8b81b26431dce9954aa"}}, +{"id":"goog","key":"goog","value":{"rev":"13-c964ecfcef4d20c8c7d7526323257c04"}}, +{"id":"googl","key":"googl","value":{"rev":"8-2d4d80ef0c5f93400ec2ec8ef80de433"}}, +{"id":"google-openid","key":"google-openid","value":{"rev":"19-380884ba97e3d6fc48c8c7db3dc0e91b"}}, +{"id":"google-spreadsheets","key":"google-spreadsheets","value":{"rev":"3-f640ef136c4b5e90210c2d5d43102b38"}}, +{"id":"google-voice","key":"google-voice","value":{"rev":"37-2e1c3cba3455852f26b0ccaf1fed7125"}}, +{"id":"googleanalytics","key":"googleanalytics","value":{"rev":"8-1d3e470ce4aacadb0418dd125887813d"}}, +{"id":"googleclientlogin","key":"googleclientlogin","value":{"rev":"23-5de8ee62c0ddbc63a001a36a6afe730e"}}, +{"id":"googlediff","key":"googlediff","value":{"rev":"3-438a2f0758e9770a157ae4cce9b6f49e"}}, +{"id":"googlemaps","key":"googlemaps","value":{"rev":"18-bc939560c587711f3d96f3caadd65a7f"}}, +{"id":"googleplus-scraper","key":"googleplus-scraper","value":{"rev":"7-598ea99bd64f4ad69cccb74095abae59"}}, +{"id":"googlereaderauth","key":"googlereaderauth","value":{"rev":"5-cd0eb8ca36ea78620af0fce270339a7b"}}, +{"id":"googlesets","key":"googlesets","value":{"rev":"5-1b2e597e903c080182b3306d63278fd9"}}, +{"id":"googleweather","key":"googleweather","value":{"rev":"3-6bfdaaeedb8a712ee3e89a8ed27508eb"}}, +{"id":"gopostal.node","key":"gopostal.node","value":{"rev":"3-14ff3a655dc3680c9e8e2751ebe294bc"}}, +{"id":"gowallan","key":"gowallan","value":{"rev":"3-23adc9c01a6b309eada47602fdc8ed90"}}, +{"id":"gowiththeflow","key":"gowiththeflow","value":{"rev":"3-52bb6cf6294f67ba5a892db4666d3790"}}, +{"id":"gpg","key":"gpg","value":{"rev":"5-0ca2b5af23e108a4f44f367992a75fed"}}, +{"id":"graceful-fs","key":"graceful-fs","value":{"rev":"3-01e9f7d1c0f6e6a611a60ee84de1f5cc"}}, +{"id":"gracie","key":"gracie","value":{"rev":"3-aa0f7c01a33c7c1e9a49b86886ef5255"}}, +{"id":"graff","key":"graff","value":{"rev":"7-5ab558cb24e30abd67f2a1dbf47cd639"}}, +{"id":"graft","key":"graft","value":{"rev":"3-7419de38b249b891bf7998bcdd2bf557"}}, +{"id":"grain","key":"grain","value":{"rev":"3-e57cbf02121970da230964ddbfd31432"}}, +{"id":"grainstore","key":"grainstore","value":{"rev":"19-5f9c5bb13b2c9ac4e6a05aec33aeb7c5"}}, +{"id":"graph","key":"graph","value":{"rev":"7-909d2fefcc84b5dd1512b60d631ea4e5"}}, +{"id":"graphquire","key":"graphquire","value":{"rev":"27-246e798f80b3310419644302405d68ad"}}, +{"id":"graphviz","key":"graphviz","value":{"rev":"8-3b79341eaf3f67f91bce7c88c08b9f0d"}}, +{"id":"grasshopper","key":"grasshopper","value":{"rev":"45-4002406990476b74dac5108bd19c4274"}}, +{"id":"gravatar","key":"gravatar","value":{"rev":"11-0164b7ac97e8a477b4e8791eae2e7fea"}}, +{"id":"grave","key":"grave","value":{"rev":"3-136f6378b956bc5dd9773250f8813038"}}, +{"id":"gravity","key":"gravity","value":{"rev":"5-dd40fcee1a769ce786337e9536d24244"}}, +{"id":"graylog","key":"graylog","value":{"rev":"5-abcff9cd91ff20e36f8a70a3f2de658b"}}, +{"id":"greg","key":"greg","value":{"rev":"5-ececb0a3bb552b6da4f66b8bf6f75cf0"}}, +{"id":"gridcentric","key":"gridcentric","value":{"rev":"4-4378e1c280e18b5aaabd23038b80d76c"}}, +{"id":"gridly","key":"gridly","value":{"rev":"3-86e878756b493da8f66cbd633a15f821"}}, +{"id":"grinder","key":"grinder","value":{"rev":"9-0aaeecf0c81b1c9c93a924c5eb0bff45"}}, +{"id":"grir.am","key":"grir.am","value":{"rev":"3-3ec153c764af1c26b50fefa437318c5a"}}, +{"id":"groundcrew","key":"groundcrew","value":{"rev":"3-9e9ed9b1c70c00c432f36bb853fa21a0"}}, +{"id":"groupie","key":"groupie","value":{"rev":"6-b5e3f0891a7e8811d6112b24bd5a46b4"}}, +{"id":"groupon","key":"groupon","value":{"rev":"21-8b74723c153695f4ed4917575abcca8f"}}, +{"id":"growing-file","key":"growing-file","value":{"rev":"7-995b233a1add5b9ea80aec7ac3f60dc5"}}, +{"id":"growl","key":"growl","value":{"rev":"10-4be41ae10ec96e1334dccdcdced12fe3"}}, +{"id":"gsl","key":"gsl","value":{"rev":"49-3367acfb521b30d3ddb9b80305009553"}}, +{"id":"gss","key":"gss","value":{"rev":"3-e4cffbbbc4536d952d13d46376d899b7"}}, +{"id":"guards","key":"guards","value":{"rev":"8-d7318d3d9dc842ab41e6ef5b88f9d37f"}}, +{"id":"guardtime","key":"guardtime","value":{"rev":"3-5a2942efabab100ffb3dc0fa3b581b7a"}}, +{"id":"guava","key":"guava","value":{"rev":"11-d9390d298b503f0ffb8e3ba92eeb9759"}}, +{"id":"guid","key":"guid","value":{"rev":"16-d99e725bbbf97a326833858767b7ed08"}}, +{"id":"gumbo","key":"gumbo","value":{"rev":"31-727cf5a3b7d8590fff871f27da114d9d"}}, +{"id":"gunther","key":"gunther","value":{"rev":"9-f95c89128412208d16acd3e615844115"}}, +{"id":"gzbz2","key":"gzbz2","value":{"rev":"3-e1844b1b3a7881a0c8dc0dd4edcc11ca"}}, +{"id":"gzip","key":"gzip","value":{"rev":"17-37afa05944f055d6f43ddc87c1b163c2"}}, +{"id":"gzip-stack","key":"gzip-stack","value":{"rev":"8-cf455d60277832c60ee622d198c0c51a"}}, +{"id":"gzippo","key":"gzippo","value":{"rev":"15-6416c13ecbbe1c5cd3e30adf4112ead7"}}, +{"id":"h5eb","key":"h5eb","value":{"rev":"3-11ed2566fa4b8a01ff63a720c94574cd"}}, +{"id":"hack","key":"hack","value":{"rev":"3-70f536dd46719e8201a6ac5cc96231f6"}}, +{"id":"hack.io","key":"hack.io","value":{"rev":"18-128305614e7fd6b461248bf3bfdd7ab7"}}, +{"id":"hacktor","key":"hacktor","value":{"rev":"3-51b438df35ba8a955d434ab25a4dad67"}}, +{"id":"haibu","key":"haibu","value":{"rev":"99-b29b8c37be42f90985c6d433d53c8679"}}, +{"id":"haibu-carapace","key":"haibu-carapace","value":{"rev":"22-9a89b2f495e533d0f93e4ee34121e48c"}}, +{"id":"haibu-nginx","key":"haibu-nginx","value":{"rev":"7-e176128dc6dbb0d7f5f33369edf1f7ee"}}, +{"id":"halfstreamxml","key":"halfstreamxml","value":{"rev":"7-5c0f3defa6ba921f8edb564584553df4"}}, +{"id":"ham","key":"ham","value":{"rev":"3-1500dc495cade7334f6a051f2758f748"}}, +{"id":"haml","key":"haml","value":{"rev":"15-a93e7762c7d43469a06519472497fd93"}}, +{"id":"haml-edge","key":"haml-edge","value":{"rev":"5-c4e44a73263ac9b7e632375de7e43d7c"}}, +{"id":"hamljs","key":"hamljs","value":{"rev":"10-a01c7214b69992352bde44938418ebf4"}}, +{"id":"hamljs-coffee","key":"hamljs-coffee","value":{"rev":"3-c2733c8ff38f5676075b84cd7f3d8684"}}, +{"id":"handlebars","key":"handlebars","value":{"rev":"4-0e21906b78605f7a1d5ec7cb4c7d35d7"}}, +{"id":"hanging-gardens","key":"hanging-gardens","value":{"rev":"27-3244e37f08bea0e31759e9f38983f59a"}}, +{"id":"hanging_gardens_registry","key":"hanging_gardens_registry","value":{"rev":"17-d87aa3a26f91dc314f02c686672a5ec6"}}, +{"id":"hapi","key":"hapi","value":{"rev":"3-ed721fe9aae4a459fe0945dabd7d680a"}}, +{"id":"harmony","key":"harmony","value":{"rev":"3-d6c9d6acc29d29c97c75c77f7c8e1390"}}, +{"id":"hascan","key":"hascan","value":{"rev":"13-a7ab15c72f464b013cbc55dc426543ca"}}, +{"id":"hash_ring","key":"hash_ring","value":{"rev":"12-0f072b1dd1fd93ae2f2b79f5ea72074d"}}, +{"id":"hashbangify","key":"hashbangify","value":{"rev":"5-738e0cf99649d41c19d3449c0e9a1cbf"}}, +{"id":"hashish","key":"hashish","value":{"rev":"9-62c5e74355458e1ead819d87151b7d38"}}, +{"id":"hashkeys","key":"hashkeys","value":{"rev":"3-490809bdb61f930f0d9f370eaadf36ea"}}, +{"id":"hashlib","key":"hashlib","value":{"rev":"7-1f19c9d6062ff22ed2e963204a1bd405"}}, +{"id":"hashring","key":"hashring","value":{"rev":"11-4c9f2b1ba7931c8bab310f4ecaf91419"}}, +{"id":"hashtable","key":"hashtable","value":{"rev":"7-2aaf2667cbdb74eb8da61e2e138059ca"}}, +{"id":"hat","key":"hat","value":{"rev":"9-6f37874d9703eab62dc875e2373837a8"}}, +{"id":"hbase","key":"hbase","value":{"rev":"20-7ca92712de26ffb18d275a21696aa263"}}, +{"id":"hbase-thrift","key":"hbase-thrift","value":{"rev":"7-39afb33a4e61cc2b3dc94f0c7fd32c65"}}, +{"id":"hbs","key":"hbs","value":{"rev":"29-aa2676e6790c5716f84f128dcd03e797"}}, +{"id":"header-stack","key":"header-stack","value":{"rev":"13-7ad1ccf3c454d77029c000ceb18ce5ab"}}, +{"id":"headers","key":"headers","value":{"rev":"13-04f8f5f25e2dd9890f6b2f120adf297a"}}, +{"id":"healthety","key":"healthety","value":{"rev":"60-07c67c22ee2a13d0ad675739d1814a6d"}}, +{"id":"heatmap","key":"heatmap","value":{"rev":"9-c53f4656d9517f184df7aea9226c1765"}}, +{"id":"heavy-flow","key":"heavy-flow","value":{"rev":"5-0b9188334339e7372b364a7fc730c639"}}, +{"id":"heckle","key":"heckle","value":{"rev":"13-b462abef7b9d1471ed8fb8f23af463e0"}}, +{"id":"helium","key":"helium","value":{"rev":"3-4d6ce9618c1be522268944240873f53e"}}, +{"id":"hello-world","key":"hello-world","value":{"rev":"3-e87f287308a209491c011064a87100b7"}}, +{"id":"hello.io","key":"hello.io","value":{"rev":"3-39b78278fa638495522edc7a84f6a52e"}}, +{"id":"helloworld","key":"helloworld","value":{"rev":"3-8f163aebdcf7d8761709bdbb634c3689"}}, +{"id":"helpers","key":"helpers","value":{"rev":"3-67d75b1c8e5ad2a268dd4ea191d4754b"}}, +{"id":"helpful","key":"helpful","value":{"rev":"41-e11bed25d5a0ca7e7ad116d5a339ec2a"}}, +{"id":"hem","key":"hem","value":{"rev":"27-042fc9d4b96f20112cd943e019e54d20"}}, +{"id":"hempwick","key":"hempwick","value":{"rev":"11-de1f6f0f23937d9f33286e12ee877540"}}, +{"id":"heritable","key":"heritable","value":{"rev":"13-1468ff92063251a037bbe80ee987a9c3"}}, +{"id":"hermes-raw-client","key":"hermes-raw-client","value":{"rev":"11-5d143c371cb8353612badc72be1917ff"}}, +{"id":"heru","key":"heru","value":{"rev":"3-d124a20939e30e2a3c08f7104b2a1a5c"}}, +{"id":"hexdump","key":"hexdump","value":{"rev":"3-c455710ca80662969ccbca3acc081cb8"}}, +{"id":"hexy","key":"hexy","value":{"rev":"16-5142b0461622436daa2e476d252770f2"}}, +{"id":"highlight","key":"highlight","value":{"rev":"9-4b172b7aef6f40d768f022b2ba4e6748"}}, +{"id":"highlight.js","key":"highlight.js","value":{"rev":"5-16c1ebd28d5f2e781e666c6ee013c30c"}}, +{"id":"hiker","key":"hiker","value":{"rev":"9-89d1ce978b349f1f0df262655299d83c"}}, +{"id":"hipchat","key":"hipchat","value":{"rev":"3-73118782367d474af0f6410290df5f7f"}}, +{"id":"hipchat-js","key":"hipchat-js","value":{"rev":"3-253b83875d3e18e9c89333bc377183c3"}}, +{"id":"hiredis","key":"hiredis","value":{"rev":"46-29ceb03860efbd4b3b995247f27f78b9"}}, +{"id":"hive","key":"hive","value":{"rev":"15-40a4c6fcfa3b80007a18ef4ede80075b"}}, +{"id":"hive-cache","key":"hive-cache","value":{"rev":"3-36b10607b68586fccbfeb856412bd6bf"}}, +{"id":"hoard","key":"hoard","value":{"rev":"13-75d4c484095e2e38ac63a65bd9fd7f4b"}}, +{"id":"hook","key":"hook","value":{"rev":"7-2f1e375058e2b1fa61d3651f6d57a6f8"}}, +{"id":"hook.io","key":"hook.io","value":{"rev":"63-9fac4fb8337d1953963d47144f806f72"}}, +{"id":"hook.io-browser","key":"hook.io-browser","value":{"rev":"3-7e04347d80adc03eb5637b7e4b8ca58b"}}, +{"id":"hook.io-couch","key":"hook.io-couch","value":{"rev":"3-ce0eb281d1ba21aa1caca3a52553a07b"}}, +{"id":"hook.io-cron","key":"hook.io-cron","value":{"rev":"15-50deedc2051ce65bca8a42048154139c"}}, +{"id":"hook.io-helloworld","key":"hook.io-helloworld","value":{"rev":"23-ef5cf0cec9045d28d846a7b0872874e4"}}, +{"id":"hook.io-irc","key":"hook.io-irc","value":{"rev":"5-39c7ac5e192aef34b87af791fa77ee04"}}, +{"id":"hook.io-logger","key":"hook.io-logger","value":{"rev":"13-9e3208ea8eacfe5378cd791f2377d06d"}}, +{"id":"hook.io-mailer","key":"hook.io-mailer","value":{"rev":"9-d9415d53dc086102024cf7400fdfb7a2"}}, +{"id":"hook.io-pinger","key":"hook.io-pinger","value":{"rev":"17-860ab3a892284b91999f86c3882e2ff5"}}, +{"id":"hook.io-repl","key":"hook.io-repl","value":{"rev":"13-c0d430ccdfd197e4746c46d2814b6d92"}}, +{"id":"hook.io-request","key":"hook.io-request","value":{"rev":"13-f0e8d167d59917d90266f921e3ef7c64"}}, +{"id":"hook.io-sitemonitor","key":"hook.io-sitemonitor","value":{"rev":"8-725ea7deb9cb1031eabdc4fd798308ff"}}, +{"id":"hook.io-twilio","key":"hook.io-twilio","value":{"rev":"11-6b2e231307f6174861aa5dcddad264b3"}}, +{"id":"hook.io-twitter","key":"hook.io-twitter","value":{"rev":"3-59296395b22e661e7e5c141c4c7be46d"}}, +{"id":"hook.io-webhook","key":"hook.io-webhook","value":{"rev":"15-b27e51b63c8ec70616c66061d949f388"}}, +{"id":"hook.io-webserver","key":"hook.io-webserver","value":{"rev":"29-eb6bff70736648427329eba08b5f55c3"}}, +{"id":"hook.io-ws","key":"hook.io-ws","value":{"rev":"4-a85578068b54560ef663a7ecfea2731f"}}, +{"id":"hooks","key":"hooks","value":{"rev":"33-6640fb0c27903af6b6ae7b7c41d79e01"}}, +{"id":"hoptoad-notifier","key":"hoptoad-notifier","value":{"rev":"16-8249cb753a3626f2bf2664024ae7a5ee"}}, +{"id":"horaa","key":"horaa","value":{"rev":"5-099e5d6486d10944e10b584eb3f6e924"}}, +{"id":"hornet","key":"hornet","value":{"rev":"22-8c40d7ba4ca832b951e6d5db165f3305"}}, +{"id":"horseman","key":"horseman","value":{"rev":"11-7228e0f84c2036669a218710c22f72c0"}}, +{"id":"hostify","key":"hostify","value":{"rev":"11-8c1a2e73f8b9474a6c26121688c28dc7"}}, +{"id":"hostinfo","key":"hostinfo","value":{"rev":"5-c8d638f40ccf94f4083430966d25e787"}}, +{"id":"hostip","key":"hostip","value":{"rev":"3-d4fd628b94e1f913d97ec1746d96f2a0"}}, +{"id":"hostname","key":"hostname","value":{"rev":"7-55fefb3c37990bbcad3d98684d17f38f"}}, +{"id":"hotnode","key":"hotnode","value":{"rev":"16-d7dad5de3ffc2ca6a04f74686aeb0e4b"}}, +{"id":"howmuchtime","key":"howmuchtime","value":{"rev":"3-351ce870ae6e2c21a798169d074e2a3f"}}, +{"id":"hstore","key":"hstore","value":{"rev":"3-55ab4d359c2fc8725829038e3adb7571"}}, +{"id":"hsume2-socket.io","key":"hsume2-socket.io","value":{"rev":"5-4b537247ae9999c285c802cc36457598"}}, +{"id":"htdoc","key":"htdoc","value":{"rev":"3-80ef9e3202b0d96b79435a2bc90bc899"}}, +{"id":"html","key":"html","value":{"rev":"3-92c4af7de329c92ff2e0be5c13020e78"}}, +{"id":"html-minifier","key":"html-minifier","value":{"rev":"7-2441ed004e2a6e7f1c42003ec03277ec"}}, +{"id":"html-sourcery","key":"html-sourcery","value":{"rev":"11-7ce1d4aa2e1d319fa108b02fb294d4ce"}}, +{"id":"html2coffeekup","key":"html2coffeekup","value":{"rev":"13-bae4a70411f6f549c281c69835fe3276"}}, +{"id":"html2coffeekup-bal","key":"html2coffeekup-bal","value":{"rev":"5-0663ac1339d72932004130b668c949f0"}}, +{"id":"html2jade","key":"html2jade","value":{"rev":"11-e50f504c5c847d7ffcde7328c2ade4fb"}}, +{"id":"html5","key":"html5","value":{"rev":"46-ca85ea99accaf1dc9ded4e2e3aa429c6"}}, +{"id":"html5edit","key":"html5edit","value":{"rev":"10-0383296c33ada4d356740f29121eeb9f"}}, +{"id":"htmlKompressor","key":"htmlKompressor","value":{"rev":"13-95a3afe7f7cfe02e089e41588b937fb1"}}, +{"id":"htmlkup","key":"htmlkup","value":{"rev":"27-5b0115636f38886ae0a40e5f52e2bfdd"}}, +{"id":"htmlparser","key":"htmlparser","value":{"rev":"14-52b2196c1456d821d47bb1d2779b2433"}}, +{"id":"htmlparser2","key":"htmlparser2","value":{"rev":"3-9bc0b807acd913999dfc949b3160a3db"}}, +{"id":"htracr","key":"htracr","value":{"rev":"27-384d0522328e625978b97d8eae8d942d"}}, +{"id":"http","key":"http","value":{"rev":"3-f197d1b599cb9da720d3dd58d9813ace"}}, +{"id":"http-agent","key":"http-agent","value":{"rev":"10-1715dd3a7adccf55bd6637d78bd345d1"}}, +{"id":"http-auth","key":"http-auth","value":{"rev":"3-21636d4430be18a5c6c42e5cb622c2e0"}}, +{"id":"http-basic-auth","key":"http-basic-auth","value":{"rev":"6-0a77e99ce8e31558d5917bd684fa2c9a"}}, +{"id":"http-browserify","key":"http-browserify","value":{"rev":"3-4f720b4af628ed8b5fb22839c1f91f4d"}}, +{"id":"http-console","key":"http-console","value":{"rev":"43-a20cbefed77bcae7de461922286a1f04"}}, +{"id":"http-digest","key":"http-digest","value":{"rev":"6-e0164885dcad21ab6150d537af0edd92"}}, +{"id":"http-digest-auth","key":"http-digest-auth","value":{"rev":"7-613ac841b808fd04e272e050fd5a45ac"}}, +{"id":"http-get","key":"http-get","value":{"rev":"39-b7cfeb2b572d4ecf695493e0886869f4"}}, +{"id":"http-load","key":"http-load","value":{"rev":"3-8c64f4972ff59e89fee041adde99b8ba"}}, +{"id":"http-proxy","key":"http-proxy","value":{"rev":"97-5b8af88886c8c047a9862bf62f6b9294"}}, +{"id":"http-proxy-backward","key":"http-proxy-backward","value":{"rev":"2-4433b04a41e8adade3f6b6b2b939df4b"}}, +{"id":"http-proxy-glimpse","key":"http-proxy-glimpse","value":{"rev":"3-a3e9791d4d9bfef5929ca55d874df18b"}}, +{"id":"http-proxy-no-line-184-error","key":"http-proxy-no-line-184-error","value":{"rev":"3-7e20a990820976d8c6d27c312cc5a67c"}}, +{"id":"http-proxy-selective","key":"http-proxy-selective","value":{"rev":"12-6e273fcd008afeceb6737345c46e1024"}}, +{"id":"http-recorder","key":"http-recorder","value":{"rev":"3-26dd0bc4f5c0bf922db1875e995d025f"}}, +{"id":"http-request-provider","key":"http-request-provider","value":{"rev":"6-436b69971dd1735ac3e41571375f2d15"}}, +{"id":"http-server","key":"http-server","value":{"rev":"21-1b80b6558692afd08c36629b0ecdc18c"}}, +{"id":"http-signature","key":"http-signature","value":{"rev":"9-49ca63427b535f2d18182d92427bc5b6"}}, +{"id":"http-stack","key":"http-stack","value":{"rev":"9-51614060741d6c85a7fd4c714ed1a9b2"}}, +{"id":"http-status","key":"http-status","value":{"rev":"5-1ec72fecc62a41d6f180d15c95e81270"}}, +{"id":"http_compat","key":"http_compat","value":{"rev":"3-88244d4b0fd08a3140fa1b2e8b1b152c"}}, +{"id":"http_router","key":"http_router","value":{"rev":"23-ad52b58b6bfc96d6d4e8215e0c31b294"}}, +{"id":"http_trace","key":"http_trace","value":{"rev":"7-d8024b5e41540e4240120ffefae523e4"}}, +{"id":"httpd","key":"httpd","value":{"rev":"3-9e2a19f007a6a487cdb752f4b8249657"}}, +{"id":"httpmock","key":"httpmock","value":{"rev":"3-b6966ba8ee2c31b0e7729fc59bb00ccf"}}, +{"id":"https-proxied","key":"https-proxied","value":{"rev":"5-f63a4c663d372502b0dcd4997e759e66"}}, +{"id":"httpu","key":"httpu","value":{"rev":"5-88a5b2bac8391d91673fc83d4cfd32df"}}, +{"id":"hungarian-magic","key":"hungarian-magic","value":{"rev":"4-9eae750ac6f30b6687d9a031353f5217"}}, +{"id":"huntergatherer","key":"huntergatherer","value":{"rev":"9-5c9d833a134cfaa901d89dce93f5b013"}}, +{"id":"hxp","key":"hxp","value":{"rev":"8-1f52ba766491826bdc6517c6cc508b2c"}}, +{"id":"hyde","key":"hyde","value":{"rev":"3-5763db65cab423404752b1a6354a7a6c"}}, +{"id":"hydra","key":"hydra","value":{"rev":"8-8bb4ed249fe0f9cdb8b11e492b646b88"}}, +{"id":"hyperpublic","key":"hyperpublic","value":{"rev":"11-5738162f3dbf95803dcb3fb28efd8740"}}, +{"id":"i18n","key":"i18n","value":{"rev":"7-f0d6b3c72ecd34dde02d805041eca996"}}, +{"id":"ical","key":"ical","value":{"rev":"13-baf448be48ab83ec9b3fb8bf83fbb9a1"}}, +{"id":"icalendar","key":"icalendar","value":{"rev":"5-78dd8fd8ed2c219ec56ad26a0727cf76"}}, +{"id":"icecap","key":"icecap","value":{"rev":"9-88d6865078a5e6e1ff998e2e73e593f3"}}, +{"id":"icecapdjs","key":"icecapdjs","value":{"rev":"11-d8e3c718a230d49caa3b5f76cfff7ce9"}}, +{"id":"icecast-stack","key":"icecast-stack","value":{"rev":"9-13b8da6ae373152ab0c8560e2f442af0"}}, +{"id":"ichabod","key":"ichabod","value":{"rev":"19-d0f02ffba80661398ceb80a7e0cbbfe6"}}, +{"id":"icing","key":"icing","value":{"rev":"11-84815e78828190fbaa52d6b93c75cb4f"}}, +{"id":"ico","key":"ico","value":{"rev":"3-5727a35c1df453bfdfa6a03e49725adf"}}, +{"id":"iconv","key":"iconv","value":{"rev":"18-5f5b3193268f1fa099e0112b3e033ffc"}}, +{"id":"iconv-jp","key":"iconv-jp","value":{"rev":"3-660b8f2def930263d2931cae2dcc401d"}}, +{"id":"id3","key":"id3","value":{"rev":"8-afe68aede872cae7b404aaa01c0108a5"}}, +{"id":"idea","key":"idea","value":{"rev":"9-a126c0e52206c51dcf972cf53af0bc32"}}, +{"id":"idiomatic-console","key":"idiomatic-console","value":{"rev":"25-67696c16bf79d1cc8caf4df62677c3ec"}}, +{"id":"idiomatic-stdio","key":"idiomatic-stdio","value":{"rev":"15-9d74c9a8872b1f7c41d6c671d7a14b7d"}}, +{"id":"iglob","key":"iglob","value":{"rev":"6-b8a3518cb67cad20c89f37892a2346a5"}}, +{"id":"ignite","key":"ignite","value":{"rev":"19-06daa730a70f69dc3a0d6d4984905c61"}}, +{"id":"iles-forked-irc-js","key":"iles-forked-irc-js","value":{"rev":"7-eb446f4e0db856e00351a5da2fa20616"}}, +{"id":"image","key":"image","value":{"rev":"8-5f7811db33c210eb38e1880f7cc433f2"}}, +{"id":"imageable","key":"imageable","value":{"rev":"61-9f7e03d3d990d34802f1e9c8019dbbfa"}}, +{"id":"imageinfo","key":"imageinfo","value":{"rev":"11-9bde1a1f0801d94539a4b70b61614849"}}, +{"id":"imagemagick","key":"imagemagick","value":{"rev":"10-b1a1ea405940fecf487da94b733e8c29"}}, +{"id":"imagick","key":"imagick","value":{"rev":"3-21d51d8a265a705881dadbc0c9f7c016"}}, +{"id":"imap","key":"imap","value":{"rev":"13-6a59045496c80b474652d2584edd4acb"}}, +{"id":"imbot","key":"imbot","value":{"rev":"11-0d8075eff5e5ec354683f396378fd101"}}, +{"id":"imdb","key":"imdb","value":{"rev":"7-2bba884d0e8804f4a7e0883abd47b0a7"}}, +{"id":"imgur","key":"imgur","value":{"rev":"3-30c0e5fddc1be3398ba5f7eee1a251d7"}}, +{"id":"impact","key":"impact","value":{"rev":"7-d3390690f11c6f9dcca9f240a7bedfef"}}, +{"id":"imsi","key":"imsi","value":{"rev":"3-0aa9a01c9c79b17afae3684b7b920ced"}}, +{"id":"index","key":"index","value":{"rev":"13-ad5d8d7dfad64512a12db4d820229c07"}}, +{"id":"indexer","key":"indexer","value":{"rev":"9-b0173ce9ad9fa1b80037fa8e33a8ce12"}}, +{"id":"inflect","key":"inflect","value":{"rev":"17-9e5ea2826fe08bd950cf7e22d73371bd"}}, +{"id":"inflectjs","key":"inflectjs","value":{"rev":"3-c59db027b72be720899b4a280ac2518f"}}, +{"id":"inflector","key":"inflector","value":{"rev":"3-191ff29d3b5ed8ef6877032a1d01d864"}}, +{"id":"inheritance","key":"inheritance","value":{"rev":"3-450a1e68bd2d8f16abe7001491abb6a8"}}, +{"id":"inherits","key":"inherits","value":{"rev":"3-284f97a7ae4f777bfabe721b66de07fa"}}, +{"id":"ini","key":"ini","value":{"rev":"5-142c8f9125fbace57689e2837deb1883"}}, +{"id":"iniparser","key":"iniparser","value":{"rev":"14-1053c59ef3d50a46356be45576885c49"}}, +{"id":"inireader","key":"inireader","value":{"rev":"15-9cdc485b18bff6397f5fec45befda402"}}, +{"id":"init","key":"init","value":{"rev":"5-b81610ad72864417dab49f7a3f29cc9f"}}, +{"id":"inject","key":"inject","value":{"rev":"5-82bddb6b4f21ddaa0137fedc8913d60e"}}, +{"id":"inliner","key":"inliner","value":{"rev":"45-8a1c3e8f78438f06865b3237d6c5339a"}}, +{"id":"inode","key":"inode","value":{"rev":"7-118ffafc62dcef5bbeb14e4328c68ab3"}}, +{"id":"inotify","key":"inotify","value":{"rev":"18-03d7b1a318bd283e0185b414b48dd602"}}, +{"id":"inotify-plusplus","key":"inotify-plusplus","value":{"rev":"10-0e0ce9065a62e5e21ee5bb53fac61a6d"}}, +{"id":"inspect","key":"inspect","value":{"rev":"5-b5f18717e29caec3399abe5e4ce7a269"}}, +{"id":"instagram","key":"instagram","value":{"rev":"5-decddf3737a1764518b6a7ce600d720d"}}, +{"id":"instagram-node-lib","key":"instagram-node-lib","value":{"rev":"13-8be77f1180b6afd9066834b3f5ee8de5"}}, +{"id":"instant-styleguide","key":"instant-styleguide","value":{"rev":"9-66c02118993621376ad0b7396db435b3"}}, +{"id":"intercept","key":"intercept","value":{"rev":"9-f5622744c576405516a427b4636ee864"}}, +{"id":"interface","key":"interface","value":{"rev":"10-13806252722402bd18d88533056a863b"}}, +{"id":"interleave","key":"interleave","value":{"rev":"25-69bc136937604863748a029fb88e3605"}}, +{"id":"interstate","key":"interstate","value":{"rev":"3-3bb4a6c35ca765f88a10b9fab6307c59"}}, +{"id":"intervals","key":"intervals","value":{"rev":"21-89b71bd55b8d5f6b670d69fc5b9f847f"}}, +{"id":"intestine","key":"intestine","value":{"rev":"3-66a5531e06865ed9c966d95437ba1371"}}, +{"id":"ios7crypt","key":"ios7crypt","value":{"rev":"7-a2d309a2c074e5c1c456e2b56cbcfd17"}}, +{"id":"iostat","key":"iostat","value":{"rev":"11-f0849c0072e76701b435aa769a614e82"}}, +{"id":"ip2cc","key":"ip2cc","value":{"rev":"9-2c282606fd08d469184a272a2108639c"}}, +{"id":"ipaddr.js","key":"ipaddr.js","value":{"rev":"5-1017fd5342840745614701476ed7e6c4"}}, +{"id":"iptables","key":"iptables","value":{"rev":"7-23e56ef5d7bf0ee8f5bd0e38bde8aae3"}}, +{"id":"iptrie","key":"iptrie","value":{"rev":"4-10317b0e073befe9601e9dc308dc361a"}}, +{"id":"ipv6","key":"ipv6","value":{"rev":"6-85e937f3d79e44dbb76264c7aaaa140f"}}, +{"id":"iqengines","key":"iqengines","value":{"rev":"3-8bdbd32e9dc35b77d80a31edae235178"}}, +{"id":"irc","key":"irc","value":{"rev":"8-ed30964f57b99b1b2f2104cc5e269618"}}, +{"id":"irc-colors","key":"irc-colors","value":{"rev":"9-7ddb19db9a553567aae86bd97f1dcdfc"}}, +{"id":"irc-js","key":"irc-js","value":{"rev":"58-1c898cea420aee60283edb4fadceb90e"}}, +{"id":"ircat.js","key":"ircat.js","value":{"rev":"6-f25f20953ce96697c033315d250615d0"}}, +{"id":"ircbot","key":"ircbot","value":{"rev":"9-85a4a6f88836fc031855736676b10dec"}}, +{"id":"irccd","key":"irccd","value":{"rev":"3-bf598ae8b6af63be41852ae8199416f4"}}, +{"id":"ircd","key":"ircd","value":{"rev":"7-3ba7fc2183d32ee1e58e63092d7e82bb"}}, +{"id":"ircdjs","key":"ircdjs","value":{"rev":"15-8fcdff2bf29cf24c3bbc4b461e6cbe9f"}}, +{"id":"irclog","key":"irclog","value":{"rev":"3-79a99bd8048dd98a93c747a1426aabde"}}, +{"id":"ircrpc","key":"ircrpc","value":{"rev":"5-278bec6fc5519fdbd152ea4fa35dc58c"}}, +{"id":"irrklang","key":"irrklang","value":{"rev":"3-65936dfabf7777027069343c2e72b32e"}}, +{"id":"isaacs","key":"isaacs","value":{"rev":"7-c55a41054056f502bc580bc6819d9d1f"}}, +{"id":"isbn","key":"isbn","value":{"rev":"3-51e784ded2e3ec9ef9b382fecd1c26a1"}}, +{"id":"iscroll","key":"iscroll","value":{"rev":"4-4f6635793806507665503605e7c180f0"}}, +{"id":"isodate","key":"isodate","value":{"rev":"7-ea4b1f77e9557b153264f68fd18a9f23"}}, +{"id":"it-is","key":"it-is","value":{"rev":"14-7617f5831c308d1c4ef914bc5dc30fa7"}}, +{"id":"iterator","key":"iterator","value":{"rev":"3-e6f70367a55cabbb89589f2a88be9ab0"}}, +{"id":"itunes","key":"itunes","value":{"rev":"7-47d151c372d70d0bc311141749c84d5a"}}, +{"id":"iws","key":"iws","value":{"rev":"3-dc7b4d18565b79d3e14aa691e5e632f4"}}, +{"id":"jQuery","key":"jQuery","value":{"rev":"29-f913933259b4ec5f4c5ea63466a4bb08"}}, +{"id":"jWorkflow","key":"jWorkflow","value":{"rev":"7-582cd7aa62085ec807117138b6439550"}}, +{"id":"jaCodeMap","key":"jaCodeMap","value":{"rev":"7-28efcbf4146977bdf1e594e0982ec097"}}, +{"id":"jaaulde-cookies","key":"jaaulde-cookies","value":{"rev":"3-d5b5a75f9cabbebb2804f0b4ae93d0c5"}}, +{"id":"jacker","key":"jacker","value":{"rev":"3-888174c7e3e2a5d241f2844257cf1b10"}}, +{"id":"jade","key":"jade","value":{"rev":"144-318a9d9f63906dc3da1ef7c1ee6420b5"}}, +{"id":"jade-browser","key":"jade-browser","value":{"rev":"9-0ae6b9e321cf04e3ca8fbfe0e38f4d9e"}}, +{"id":"jade-client-connect","key":"jade-client-connect","value":{"rev":"5-96dbafafa31187dd7f829af54432de8e"}}, +{"id":"jade-ext","key":"jade-ext","value":{"rev":"9-aac9a58a4e07d82bc496bcc4241d1be0"}}, +{"id":"jade-i18n","key":"jade-i18n","value":{"rev":"23-76a21a41b5376e10c083672dccf7fc62"}}, +{"id":"jade-serial","key":"jade-serial","value":{"rev":"3-5ec712e1d8cd8d5af20ae3e62ee92854"}}, +{"id":"jadedown","key":"jadedown","value":{"rev":"11-0d16ce847d6afac2939eebcb24a7216c"}}, +{"id":"jadeify","key":"jadeify","value":{"rev":"17-4322b68bb5a7e81e839edabbc8c405a4"}}, +{"id":"jadevu","key":"jadevu","value":{"rev":"15-1fd8557a6db3c23f267de76835f9ee65"}}, +{"id":"jah","key":"jah","value":{"rev":"3-f29704037a1cffe2b08abb4283bee4a4"}}, +{"id":"jake","key":"jake","value":{"rev":"36-5cb64b1c5a89ac53eb4d09d66a5b10e1"}}, +{"id":"jammit-express","key":"jammit-express","value":{"rev":"6-e3dfa928114a2721fe9b8882d284f759"}}, +{"id":"janrain","key":"janrain","value":{"rev":"5-9554501be76fb3a472076858d1abbcd5"}}, +{"id":"janrain-api","key":"janrain-api","value":{"rev":"3-f45a65c695f4c72fdd1bf3593d8aa796"}}, +{"id":"jaque","key":"jaque","value":{"rev":"32-7f269a70c67beefc53ba1684bff5a57b"}}, +{"id":"jar","key":"jar","value":{"rev":"3-7fe0ab4aa3a2ccc5d50853f118e7aeb5"}}, +{"id":"jarvis","key":"jarvis","value":{"rev":"3-fb203b29b397a0b12c1ae56240624e3d"}}, +{"id":"jarvis-test","key":"jarvis-test","value":{"rev":"5-9537ddae8291e6dad03bc0e6acc9ac80"}}, +{"id":"jasbin","key":"jasbin","value":{"rev":"25-ae22f276406ac8bb4293d78595ce02ad"}}, +{"id":"jasmine-dom","key":"jasmine-dom","value":{"rev":"17-686de4c573f507c30ff72c6671dc3d93"}}, +{"id":"jasmine-jquery","key":"jasmine-jquery","value":{"rev":"7-86c077497a367bcd9ea96d5ab8137394"}}, +{"id":"jasmine-node","key":"jasmine-node","value":{"rev":"27-4c544c41c69d2b3cb60b9953d1c46d54"}}, +{"id":"jasmine-reporters","key":"jasmine-reporters","value":{"rev":"3-21ba522ae38402848d5a66d3d4d9a2b3"}}, +{"id":"jasmine-runner","key":"jasmine-runner","value":{"rev":"23-7458777b7a6785efc878cfd40ccb99d8"}}, +{"id":"jasminy","key":"jasminy","value":{"rev":"3-ce76023bac40c5f690cba59d430fd083"}}, +{"id":"jason","key":"jason","value":{"rev":"15-394a59963c579ed5db37fada4d082b5c"}}, +{"id":"javiary","key":"javiary","value":{"rev":"5-661be61fd0f47c9609b7d148e298e2fc"}}, +{"id":"jazz","key":"jazz","value":{"rev":"12-d11d602c1240b134b0593425911242fc"}}, +{"id":"jdoc","key":"jdoc","value":{"rev":"3-0c61fdd6b367a9acac710e553927b290"}}, +{"id":"jeesh","key":"jeesh","value":{"rev":"13-23b4e1ecf9ca76685bf7f1bfc6c076f1"}}, +{"id":"jellyfish","key":"jellyfish","value":{"rev":"25-7fef81f9b5ef5d4abbcecb030a433a72"}}, +{"id":"jen","key":"jen","value":{"rev":"3-ab1b07453318b7e0254e1dadbee7868f"}}, +{"id":"jerk","key":"jerk","value":{"rev":"34-e31f26d5e3b700d0a3e5f5a5acf0d381"}}, +{"id":"jessie","key":"jessie","value":{"rev":"19-829b932e57204f3b7833b34f75d6bf2a"}}, +{"id":"jezebel","key":"jezebel","value":{"rev":"15-b67c259e160390064da69a512382e06f"}}, +{"id":"jimi","key":"jimi","value":{"rev":"10-cc4a8325d6b847362a422304a0057231"}}, +{"id":"jinjs","key":"jinjs","value":{"rev":"37-38fcf1989f1b251a35e4ff725118f55e"}}, +{"id":"jinkies","key":"jinkies","value":{"rev":"30-73fec0e854aa31bcbf3ae1ca04462b22"}}, +{"id":"jison","key":"jison","value":{"rev":"52-d03c6f5e2bdd7624d39d93ec5e88c383"}}, +{"id":"jitsu","key":"jitsu","value":{"rev":"164-95083f8275f0bf2834f62027569b4da2"}}, +{"id":"jitter","key":"jitter","value":{"rev":"16-3f7b183aa7922615f4b5b2fb46653477"}}, +{"id":"jj","key":"jj","value":{"rev":"21-1b3f97e9725e1241c96a884c85dc4e30"}}, +{"id":"jjw","key":"jjw","value":{"rev":"13-835c632dfc5df7dd37860bd0b2c1cb38"}}, +{"id":"jkwery","key":"jkwery","value":{"rev":"11-212429c9c9e1872d4e278da055b5ae0a"}}, +{"id":"jmen","key":"jmen","value":{"rev":"3-a0b67d5b84a077061d3fed2ddbf2c6a8"}}, +{"id":"jobmanager","key":"jobmanager","value":{"rev":"15-1a589ede5f10d1ea2f33f1bb91f9b3aa"}}, +{"id":"jobs","key":"jobs","value":{"rev":"12-3072b6164c5dca8fa9d24021719048ff"}}, +{"id":"jobvite","key":"jobvite","value":{"rev":"56-3d69b0e6d91722ef4908b4fe26bb5432"}}, +{"id":"jodoc","key":"jodoc","value":{"rev":"3-7b05c6d7b4c9a9fa85d3348948d2d52d"}}, +{"id":"johnny-mnemonic","key":"johnny-mnemonic","value":{"rev":"3-e8749d4be597f002aae720011b7c9273"}}, +{"id":"join","key":"join","value":{"rev":"5-ab92491dc83b5e8ed5f0cc49e306d5d5"}}, +{"id":"jolokia-client","key":"jolokia-client","value":{"rev":"26-1f93cb53f4a870b94540cdbf7627b1c4"}}, +{"id":"joo","key":"joo","value":{"rev":"11-e0d4a97eceacdd13769bc5f56e059aa7"}}, +{"id":"jools","key":"jools","value":{"rev":"3-9da332d524a117c4d72a58bb45fa34fd"}}, +{"id":"joose","key":"joose","value":{"rev":"22-ef8a1895680ad2f9c1cd73cd1afbb58e"}}, +{"id":"joosex-attribute","key":"joosex-attribute","value":{"rev":"18-119df97dba1ba2631c94d49e3142bbd7"}}, +{"id":"joosex-bridge-ext","key":"joosex-bridge-ext","value":{"rev":"20-5ad2168291aad2cf021df0a3eb103538"}}, +{"id":"joosex-class-simpleconstructor","key":"joosex-class-simpleconstructor","value":{"rev":"6-f71e02e44f611550374ad9f5d0c37fdf"}}, +{"id":"joosex-class-singleton","key":"joosex-class-singleton","value":{"rev":"6-3ba6b8644722b29febe384a368c18aab"}}, +{"id":"joosex-cps","key":"joosex-cps","value":{"rev":"20-493c65faf1ec59416bae475529c51cd4"}}, +{"id":"joosex-meta-lazy","key":"joosex-meta-lazy","value":{"rev":"13-ef8bc4e57006cfcecd72a344d8dc9da6"}}, +{"id":"joosex-namespace-depended","key":"joosex-namespace-depended","value":{"rev":"22-8a38a21f8564470b96082177e81f3db6"}}, +{"id":"joosex-observable","key":"joosex-observable","value":{"rev":"7-52e7018931e5465920bb6feab88aa468"}}, +{"id":"joosex-role-parameterized","key":"joosex-role-parameterized","value":{"rev":"6-65aa4fa4967c4fbe06357ccda5e6f810"}}, +{"id":"joosex-simplerequest","key":"joosex-simplerequest","value":{"rev":"10-12d105b60b8b3ca3a3626ca0ec53892d"}}, +{"id":"josp","key":"josp","value":{"rev":"3-c4fa8445a0d96037e00fe96d007bcf0c"}}, +{"id":"jot","key":"jot","value":{"rev":"3-8fab571ce3ad993f3594f3c2e0fc6915"}}, +{"id":"journey","key":"journey","value":{"rev":"40-efe1fa6c8d735592077c9a24b3b56a03"}}, +{"id":"jpeg","key":"jpeg","value":{"rev":"8-ab437fbaf88f32a7fb625a0b27521292"}}, +{"id":"jq","key":"jq","value":{"rev":"3-9d83287aa9e6aab25590fac9adbab968"}}, +{"id":"jqNode","key":"jqNode","value":{"rev":"3-fcaf2c47aba5637a4a23c64b6fc778cf"}}, +{"id":"jqbuild","key":"jqbuild","value":{"rev":"3-960edcea36784aa9ca135cd922e0cb9b"}}, +{"id":"jqserve","key":"jqserve","value":{"rev":"3-39272c5479aabaafe66ffa26a6eb3bb5"}}, +{"id":"jqtpl","key":"jqtpl","value":{"rev":"54-ce2b62ced4644d5fe24c3a8ebcb4d528"}}, +{"id":"jquajax","key":"jquajax","value":{"rev":"3-a079cb8f3a686faaafe420760e77a330"}}, +{"id":"jquery","key":"jquery","value":{"rev":"27-60fd58bba99d044ffe6e140bafd72595"}}, +{"id":"jquery-browserify","key":"jquery-browserify","value":{"rev":"9-a4e9afd657f3c632229afa356382f6a4"}}, +{"id":"jquery-deferred","key":"jquery-deferred","value":{"rev":"5-0fd0cec51f7424a50f0dba3cbe74fd58"}}, +{"id":"jquery-drive","key":"jquery-drive","value":{"rev":"3-8474f192fed5c5094e56bc91f5e8a0f8"}}, +{"id":"jquery-mousewheel","key":"jquery-mousewheel","value":{"rev":"3-cff81086cf651e52377a8d5052b09d64"}}, +{"id":"jquery-placeholdize","key":"jquery-placeholdize","value":{"rev":"3-7acc3fbda1b8daabce18876d2b4675e3"}}, +{"id":"jquery-tmpl-jst","key":"jquery-tmpl-jst","value":{"rev":"13-575031eb2f2b1e4c5562e195fce0bc93"}}, +{"id":"jquery.effects.blind","key":"jquery.effects.blind","value":{"rev":"3-5f3bec5913edf1bfcee267891f6204e2"}}, +{"id":"jquery.effects.bounce","key":"jquery.effects.bounce","value":{"rev":"3-245b2e7d9a1295dd0f7d568b8087190d"}}, +{"id":"jquery.effects.clip","key":"jquery.effects.clip","value":{"rev":"3-7aa63a590b6d90d5ea20e21c8dda675d"}}, +{"id":"jquery.effects.core","key":"jquery.effects.core","value":{"rev":"3-dd2fa270d8aea21104c2c92d6b06500d"}}, +{"id":"jquery.effects.drop","key":"jquery.effects.drop","value":{"rev":"3-8d0e30016e99460063a9a9000ce7b032"}}, +{"id":"jquery.effects.explode","key":"jquery.effects.explode","value":{"rev":"3-3d5e3bb2fb451f7eeaeb72b6743b6e6c"}}, +{"id":"jquery.effects.fade","key":"jquery.effects.fade","value":{"rev":"3-f362c762053eb278b5db5f92e248c3a5"}}, +{"id":"jquery.effects.fold","key":"jquery.effects.fold","value":{"rev":"3-c7d823c2b25c4f1e6a1801f4b1bc7a2c"}}, +{"id":"jquery.effects.highlight","key":"jquery.effects.highlight","value":{"rev":"3-44ef3c62a6b829382bffa6393cd31ed9"}}, +{"id":"jquery.effects.pulsate","key":"jquery.effects.pulsate","value":{"rev":"3-3cad87635cecc2602d40682cf669d2fe"}}, +{"id":"jquery.effects.scale","key":"jquery.effects.scale","value":{"rev":"3-2c8df02eeed343088e2253d84064a219"}}, +{"id":"jquery.effects.shake","key":"jquery.effects.shake","value":{"rev":"3-d63ab567d484311744d848b520a720c7"}}, +{"id":"jquery.effects.slide","key":"jquery.effects.slide","value":{"rev":"3-9eb5d1075d67045a8fa305e596981934"}}, +{"id":"jquery.effects.transfer","key":"jquery.effects.transfer","value":{"rev":"3-371bc87350ede6da53a40468b63200a9"}}, +{"id":"jquery.tmpl","key":"jquery.tmpl","value":{"rev":"5-75efd6c8c0ce030f2da12b984f9dfe6c"}}, +{"id":"jquery.ui.accordion","key":"jquery.ui.accordion","value":{"rev":"3-964ee7d6c50f31e7db6631da28e2261a"}}, +{"id":"jquery.ui.autocomplete","key":"jquery.ui.autocomplete","value":{"rev":"3-950d240629d142eab5e07c2776e39bcc"}}, +{"id":"jquery.ui.button","key":"jquery.ui.button","value":{"rev":"3-a1c7f3eeb9298ac0c116d75a176a6d17"}}, +{"id":"jquery.ui.core","key":"jquery.ui.core","value":{"rev":"3-b7ba340b7304a304f85c4d13438d1195"}}, +{"id":"jquery.ui.datepicker","key":"jquery.ui.datepicker","value":{"rev":"3-5b76579057f1b870959a06ab833f1972"}}, +{"id":"jquery.ui.dialog","key":"jquery.ui.dialog","value":{"rev":"3-0c314cee86bf67298759efcfd47246f6"}}, +{"id":"jquery.ui.draggable","key":"jquery.ui.draggable","value":{"rev":"3-b7a15d2bdbcdc6f0f3cd6e4522f9f1f3"}}, +{"id":"jquery.ui.droppable","key":"jquery.ui.droppable","value":{"rev":"3-86d8a1558f5e9383b271b4d968ba081d"}}, +{"id":"jquery.ui.mouse","key":"jquery.ui.mouse","value":{"rev":"3-ccb88d773c452c778c694f9f551cb816"}}, +{"id":"jquery.ui.position","key":"jquery.ui.position","value":{"rev":"3-c49c13b38592a363585600b7af54d977"}}, +{"id":"jquery.ui.progressbar","key":"jquery.ui.progressbar","value":{"rev":"3-b28dfadab64f9548b828c42bf870fcc9"}}, +{"id":"jquery.ui.resizable","key":"jquery.ui.resizable","value":{"rev":"3-aa356230544cbe8ab8dc5fab08cc0fa7"}}, +{"id":"jquery.ui.selectable","key":"jquery.ui.selectable","value":{"rev":"3-6b11846c104d580556e40eb5194c45f2"}}, +{"id":"jquery.ui.slider","key":"jquery.ui.slider","value":{"rev":"3-e8550b76bf58a9cbeca9ea91eb763257"}}, +{"id":"jquery.ui.sortable","key":"jquery.ui.sortable","value":{"rev":"3-1ddd981bd720f055fbd5bb1d06df55ad"}}, +{"id":"jquery.ui.tabs","key":"jquery.ui.tabs","value":{"rev":"3-e0514383f4d920b9dc23ef7a7ea4d8af"}}, +{"id":"jquery.ui.widget","key":"jquery.ui.widget","value":{"rev":"3-3a0800fa067c12d013168f74acf21e6d"}}, +{"id":"jqueryify","key":"jqueryify","value":{"rev":"3-2655cf6a45795a8bd138a464e6c18f04"}}, +{"id":"jrep","key":"jrep","value":{"rev":"3-edbcf6931b8a2b3f550727d8b839acc3"}}, +{"id":"js-beautify-node","key":"js-beautify-node","value":{"rev":"3-401cd1c130aaec2c090b578fe8db6290"}}, +{"id":"js-class","key":"js-class","value":{"rev":"5-a63fbb0136dcd602feee72e70674d5db"}}, +{"id":"js-jango","key":"js-jango","value":{"rev":"3-af4e4a7844791617e66a40a1c403bb98"}}, +{"id":"js-loader","key":"js-loader","value":{"rev":"13-8d9729495c1692e47d2cd923e839b4c8"}}, +{"id":"js-manager","key":"js-manager","value":{"rev":"5-6d384a2ce4737f13d417f85689c3c372"}}, +{"id":"js-nts","key":"js-nts","value":{"rev":"3-7d921611b567d2d890bc983c343558ef"}}, +{"id":"js-openstack","key":"js-openstack","value":{"rev":"11-d56996be276fbe6162573575932b1cba"}}, +{"id":"js-select","key":"js-select","value":{"rev":"9-9d20f6d86d9e6f8a84191346288b76ed"}}, +{"id":"js.io","key":"js.io","value":{"rev":"3-c5e16e13372ba592ccf2ac86ee007a1f"}}, +{"id":"js2","key":"js2","value":{"rev":"35-2dc694e48b67252d8787f5e889a07430"}}, +{"id":"js2coffee","key":"js2coffee","value":{"rev":"19-8eeafa894dcc0dc306b02e728543511e"}}, +{"id":"jsDAV","key":"jsDAV","value":{"rev":"11-4ab1935d98372503439b054daef2e78e"}}, +{"id":"jsDump","key":"jsDump","value":{"rev":"5-32d6e4032bd114245356970f0b76a58a"}}, +{"id":"jsSourceCodeParser","key":"jsSourceCodeParser","value":{"rev":"3-78c5e8624ab25fca99a7bb6cd9be402b"}}, +{"id":"jsapp","key":"jsapp","value":{"rev":"3-6758eb2743cc22f723a6612b34c8d943"}}, +{"id":"jscc-node","key":"jscc-node","value":{"rev":"3-5f52dc20dc2a188bc32e7219c9d2f225"}}, +{"id":"jscheckstyle","key":"jscheckstyle","value":{"rev":"5-82021f06a1bd824ac195e0ab8a3b598c"}}, +{"id":"jsclass","key":"jsclass","value":{"rev":"9-2a0656b9497c5a8208a0fefa5aae3350"}}, +{"id":"jsconfig","key":"jsconfig","value":{"rev":"3-b1afef99468f81eff319453623135a56"}}, +{"id":"jscssp","key":"jscssp","value":{"rev":"6-413ad0701e6dbb412e8a01aadb6672c4"}}, +{"id":"jsdata","key":"jsdata","value":{"rev":"5-53f8b26f28291dccfdff8f14e7f4c44c"}}, +{"id":"jsdeferred","key":"jsdeferred","value":{"rev":"8-bc238b921a1fa465503722756a98e9b7"}}, +{"id":"jsdoc","key":"jsdoc","value":{"rev":"3-386eb47a2761a1ad025996232751fba9"}}, +{"id":"jsdog","key":"jsdog","value":{"rev":"11-d4a523898a7c474b5c7b8cb8b24bafe8"}}, +{"id":"jsdom","key":"jsdom","value":{"rev":"63-86bc6b9d8bfdb99b793ac959e126f7ff"}}, +{"id":"jsftp","key":"jsftp","value":{"rev":"35-89cd772521d7ac3cead71c602ddeb819"}}, +{"id":"jsgi","key":"jsgi","value":{"rev":"20-dbef9d8dfb5c9bf1a3b6014159bb305a"}}, +{"id":"jsgi-node","key":"jsgi-node","value":{"rev":"1-8ec0892e521754aaf88684714d306af9"}}, +{"id":"jsgrep","key":"jsgrep","value":{"rev":"7-be19445481acdbbb684fdc2425d88d08"}}, +{"id":"jshelpers","key":"jshelpers","value":{"rev":"11-9509dcdd48bc494de76cae66217ebedb"}}, +{"id":"jshint","key":"jshint","value":{"rev":"34-ed2e7ea0e849126bd9821b86f23b7314"}}, +{"id":"jshint-autofix","key":"jshint-autofix","value":{"rev":"9-abbb3622aa8a47a8890dbbaab0009b6d"}}, +{"id":"jshint-mode","key":"jshint-mode","value":{"rev":"5-06ec066819b93c7ae6782c755a0e2125"}}, +{"id":"jshint-runner","key":"jshint-runner","value":{"rev":"7-6fc8a15e387a4e81e300a54a86a3a240"}}, +{"id":"jshtml","key":"jshtml","value":{"rev":"5-d3e96c31cf1cd2fcf7743defc1631c3a"}}, +{"id":"jsinc","key":"jsinc","value":{"rev":"9-0e4dc3ba04b440085a79d6001232abfc"}}, +{"id":"jslint","key":"jslint","value":{"rev":"10-ab451352333b5f3d29c6cdbab49187dd"}}, +{"id":"jslint-core","key":"jslint-core","value":{"rev":"3-1f874d8cca07b6f007bc80c23ba15e2e"}}, +{"id":"jslint-strict","key":"jslint-strict","value":{"rev":"8-3d694a0f3079691da1866de16f290ea2"}}, +{"id":"jslinux","key":"jslinux","value":{"rev":"13-033cb60c7867aae599863323a97f45c0"}}, +{"id":"jslitmus","key":"jslitmus","value":{"rev":"6-d3f3f82ea1a376acc2b24c69da003409"}}, +{"id":"jsmeter","key":"jsmeter","value":{"rev":"5-7838bb9b970cbaa29a48802c508fd091"}}, +{"id":"jsmin","key":"jsmin","value":{"rev":"6-002ad1b385915e60f895b5e52492fb94"}}, +{"id":"json","key":"json","value":{"rev":"39-1d24fb8c3bdf0ac533bfc52e74420adc"}}, +{"id":"json-browser","key":"json-browser","value":{"rev":"6-883f051c1297cf631adba1c855ff2e13"}}, +{"id":"json-builder","key":"json-builder","value":{"rev":"5-e7a996ff1ef89114ce2ab6de9b653af8"}}, +{"id":"json-command","key":"json-command","value":{"rev":"16-8239cb65563720c42da5562d3a031b09"}}, +{"id":"json-fu","key":"json-fu","value":{"rev":"5-7933c35711cb9d7673d7514fe495c56d"}}, +{"id":"json-line-protocol","key":"json-line-protocol","value":{"rev":"7-98de63467d154b40a029391af8a26042"}}, +{"id":"json-object","key":"json-object","value":{"rev":"7-534cd9680c386c5b9800848755698f2b"}}, +{"id":"json-ref","key":"json-ref","value":{"rev":"3-cd09776d166c3f77013e429737c7e1e9"}}, +{"id":"json-san","key":"json-san","value":{"rev":"7-8683abde23232c1d84266e7a2d5c4527"}}, +{"id":"json-schema","key":"json-schema","value":{"rev":"1-2f323062e7ec80d2ff765da43c7aaa7d"}}, +{"id":"json-sockets","key":"json-sockets","value":{"rev":"26-bfef71c0d9fb4d56010b05f47f142748"}}, +{"id":"json-storage","key":"json-storage","value":{"rev":"3-46139e3a54c0a27e67820df2c7e87dbf"}}, +{"id":"json-storage-model","key":"json-storage-model","value":{"rev":"3-8b77044e192791613cf92b2f3317357f"}}, +{"id":"json-streamify","key":"json-streamify","value":{"rev":"5-d98cd72265fba652481eef6baa980f46"}}, +{"id":"json-streams","key":"json-streams","value":{"rev":"3-e07fc5ca24b33145c8aacf9995d46723"}}, +{"id":"json-tables","key":"json-tables","value":{"rev":"3-37a652b54880487e66ffeee6822b945b"}}, +{"id":"json-template","key":"json-template","value":{"rev":"3-9ee3a101c60ea682fb88759b2df837e4"}}, +{"id":"json2","key":"json2","value":{"rev":"12-bc3d411db772e0947ca58a54c2084073"}}, +{"id":"json2ify","key":"json2ify","value":{"rev":"3-c2d6677cc35e4668c97cf6800a4728d8"}}, +{"id":"json2xml","key":"json2xml","value":{"rev":"3-e955b994479362685e2197b39909dea2"}}, +{"id":"json_req","key":"json_req","value":{"rev":"15-14520bc890cbb0ab4c142b59bf21c9f1"}}, +{"id":"jsonapi","key":"jsonapi","value":{"rev":"11-2b27aaca5643d6a5b3ab38721cf6342f"}}, +{"id":"jsonconfig","key":"jsonconfig","value":{"rev":"5-0072bb54cb0ae5b13eee4f1657ba6a29"}}, +{"id":"jsond","key":"jsond","value":{"rev":"13-7c3622aeb147dae4698608ee32d81b45"}}, +{"id":"jsondate","key":"jsondate","value":{"rev":"3-1da5d30ee1cf7c6d9605a446efd91478"}}, +{"id":"jsonds","key":"jsonds","value":{"rev":"9-af2867869a46787e58c337e700dbf0dd"}}, +{"id":"jsonds2","key":"jsonds2","value":{"rev":"3-e7ed9647cc1ba72e59b625840358c7ca"}}, +{"id":"jsonfiles","key":"jsonfiles","value":{"rev":"3-5e643ba75c401f653f505e7938540d83"}}, +{"id":"jsonify","key":"jsonify","value":{"rev":"3-91207fd1bc11668be7906f74992de6bb"}}, +{"id":"jsonize","key":"jsonize","value":{"rev":"3-4881031480a5326d9f5966189170db25"}}, +{"id":"jsonlint","key":"jsonlint","value":{"rev":"11-88d3c1c395846e7687f410e0dc405469"}}, +{"id":"jsonml","key":"jsonml","value":{"rev":"3-9990d9515fa554b5c7ff8bf8c7bb3308"}}, +{"id":"jsonparse","key":"jsonparse","value":{"rev":"3-569962847a5fd9d65fdf91af9e3e87a5"}}, +{"id":"jsonpointer","key":"jsonpointer","value":{"rev":"5-0310a11e82e9e22a4e5239dee2bc2213"}}, +{"id":"jsonprettify","key":"jsonprettify","value":{"rev":"3-173ae677f2110dfff8cb17dd2b4c68de"}}, +{"id":"jsonreq","key":"jsonreq","value":{"rev":"5-84b47d8c528ea7efa9aae113e5ff53cf"}}, +{"id":"jsonrpc","key":"jsonrpc","value":{"rev":"10-e40ff49715537320cbbbde67378f099e"}}, +{"id":"jsonrpc-ws","key":"jsonrpc-ws","value":{"rev":"7-73c385f3d35dadbdc87927f6a751e3ca"}}, +{"id":"jsonrpc2","key":"jsonrpc2","value":{"rev":"13-71efdea4f551d3a2550fcf5355ea8c8c"}}, +{"id":"jsontool","key":"jsontool","value":{"rev":"14-44bc979d3a8dc9295c825def01e533b4"}}, +{"id":"jsontoxml","key":"jsontoxml","value":{"rev":"8-2640fd26237ab4a45450748d392dd2d2"}}, +{"id":"jsontry","key":"jsontry","value":{"rev":"3-adb3f32f86419ac4b589ce41ab253952"}}, +{"id":"jsorm-i18n","key":"jsorm-i18n","value":{"rev":"3-54347174039512616ed76cc9a37605ea"}}, +{"id":"jsorm-utilities","key":"jsorm-utilities","value":{"rev":"3-187fc9f86ed8d32ebcb6c451fa7cc3c4"}}, +{"id":"jspack","key":"jspack","value":{"rev":"3-84955792d8b57fc301968daf674bace7"}}, +{"id":"jspkg","key":"jspkg","value":{"rev":"5-f5471c37554dad3492021490a70a1190"}}, +{"id":"jspp","key":"jspp","value":{"rev":"8-7607018fa48586f685dda17d77d0999b"}}, +{"id":"jss","key":"jss","value":{"rev":"20-4517b1daeda4f878debddc9f23347f00"}}, +{"id":"jst","key":"jst","value":{"rev":"27-8372bf5c052b6bd6e28f5d2c89b47e49"}}, +{"id":"jstestdriver","key":"jstestdriver","value":{"rev":"3-d26b172af33d6c45fc3dc96b96865714"}}, +{"id":"jstoxml","key":"jstoxml","value":{"rev":"15-c26b77ed5228500238c7b21a3dbdbbb7"}}, +{"id":"jsup","key":"jsup","value":{"rev":"3-54eb8598ae1a49bd1540e482a44a6abc"}}, +{"id":"jthon","key":"jthon","value":{"rev":"5-d578940ac32497839ff48d3f6205e9e2"}}, +{"id":"juggernaut","key":"juggernaut","value":{"rev":"20-15d33218943b9ec64b642e2a4a05e4b8"}}, +{"id":"juggernaut-yoomee","key":"juggernaut-yoomee","value":{"rev":"7-a58d429e46aac76260e236c64d20ff02"}}, +{"id":"jump","key":"jump","value":{"rev":"19-d47e23c31dc623b54e60004b08f6f624"}}, +{"id":"jumprope","key":"jumprope","value":{"rev":"5-98d4e2452f14d3b0996f04882b07d674"}}, +{"id":"junction","key":"junction","value":{"rev":"3-2b73ea17d862b1e95039141e98e53268"}}, +{"id":"jus-config","key":"jus-config","value":{"rev":"5-d2da00317dceb712d82dbfc776122dbe"}}, +{"id":"jus-i18n","key":"jus-i18n","value":{"rev":"3-d146cfc5f3c9aee769390ed921836b6e"}}, +{"id":"jus-task","key":"jus-task","value":{"rev":"13-d127de2a102eef2eb0d1b67810ecd558"}}, +{"id":"justtest","key":"justtest","value":{"rev":"17-467ee4ca606f0447a0c458550552fd0a"}}, +{"id":"jute","key":"jute","value":{"rev":"99-158d262e9126de5026bbfeb3168d9277"}}, +{"id":"jwt","key":"jwt","value":{"rev":"3-4cb8a706d1bc3c300bdadeba781c7bc4"}}, +{"id":"kaffeine","key":"kaffeine","value":{"rev":"47-261825b8d8cdf168387c6a275682dd0b"}}, +{"id":"kafka","key":"kafka","value":{"rev":"9-7465d4092e6322d0b744f017be8ffcea"}}, +{"id":"kahan","key":"kahan","value":{"rev":"5-107bb2dcdb51faaa00aef1e37eff91eb"}}, +{"id":"kahve-ansi","key":"kahve-ansi","value":{"rev":"5-a86d9a3ea56362fa81c8ee9f1ef8f2ef"}}, +{"id":"kahve-cake","key":"kahve-cake","value":{"rev":"3-873b4e553c4ba417c888aadce3b800f6"}}, +{"id":"kahve-classmethod","key":"kahve-classmethod","value":{"rev":"3-08e0a5786edc15539cc6746fe6c65bec"}}, +{"id":"kahve-exception","key":"kahve-exception","value":{"rev":"3-fb9d839cfdc069271cbc10fa27a87f3c"}}, +{"id":"kahve-progress","key":"kahve-progress","value":{"rev":"3-d2fcdd99793a0c3c3a314afb067a3701"}}, +{"id":"kanso","key":"kanso","value":{"rev":"41-2b18ab56cc86313daa840b7b3f63b318"}}, +{"id":"kaph","key":"kaph","value":{"rev":"7-c24622e38cf23bac67459bfe5a0edd63"}}, +{"id":"karait","key":"karait","value":{"rev":"9-a4abc4bc11c747448c4884cb714737c9"}}, +{"id":"kasabi","key":"kasabi","value":{"rev":"3-36cb65aef11d181c532f4549d58944e6"}}, +{"id":"kassit","key":"kassit","value":{"rev":"27-6fafe5122a4dda542a34ba18dddfc9ea"}}, +{"id":"kdtree","key":"kdtree","value":{"rev":"9-177bf5018be1f177d302af1d746b0462"}}, +{"id":"keeper","key":"keeper","value":{"rev":"13-43ce24b6e1fb8ac23c58a78e3e92d137"}}, +{"id":"kestrel","key":"kestrel","value":{"rev":"3-1303ae0617ed1076eed022176c78b0c4"}}, +{"id":"kettle","key":"kettle","value":{"rev":"3-385c10c43df484666148e796840e72c7"}}, +{"id":"keyed_list","key":"keyed_list","value":{"rev":"5-c98d8bc8619300da1a09098bb298bf16"}}, +{"id":"keyframely","key":"keyframely","value":{"rev":"5-586380d2258a099d8fa4748f2688b571"}}, +{"id":"keygrip","key":"keygrip","value":{"rev":"18-4178954fb4f0e26407851104876f1a03"}}, +{"id":"keyjson","key":"keyjson","value":{"rev":"5-96ab1d8b6fa77864883b657360070af4"}}, +{"id":"keymaster","key":"keymaster","value":{"rev":"8-e7eb722489b02991943e9934b8155162"}}, +{"id":"keys","key":"keys","value":{"rev":"12-8b34b8f593667f0c23f1841edb5b6fa3"}}, +{"id":"keysym","key":"keysym","value":{"rev":"13-ec57906511f8f2f896a9e81dc206ea77"}}, +{"id":"keyx","key":"keyx","value":{"rev":"3-80dc49b56e3ba1d280298c36afa2a82c"}}, +{"id":"khronos","key":"khronos","value":{"rev":"3-1a3772db2725c4c3098d5cf4ca2189a4"}}, +{"id":"kindred","key":"kindred","value":{"rev":"5-99c7f4f06e4a47e476f9d75737f719d7"}}, +{"id":"kiokujs","key":"kiokujs","value":{"rev":"8-4b96a9bc1866f58bb263b310e64df403"}}, +{"id":"kiokujs-backend-batch","key":"kiokujs-backend-batch","value":{"rev":"3-4739de0f2e0c01581ce0b02638d3df02"}}, +{"id":"kiokujs-backend-couchdb","key":"kiokujs-backend-couchdb","value":{"rev":"8-53e830e0a7e8ea810883c00ce79bfeef"}}, +{"id":"kiss.js","key":"kiss.js","value":{"rev":"11-7c9b1d7e2faee25ade6f1cad1bb261d9"}}, +{"id":"kissy","key":"kissy","value":{"rev":"8-3f8f7c169a3e84df6a7f68315f13b3ba"}}, +{"id":"kitkat","key":"kitkat","value":{"rev":"41-5f2600e4e1c503f63702c74195ff3361"}}, +{"id":"kitkat-express","key":"kitkat-express","value":{"rev":"3-91ef779ed9acdad1ca6f776e10a70246"}}, +{"id":"kizzy","key":"kizzy","value":{"rev":"5-f281b9e4037eda414f918ec9021e28c9"}}, +{"id":"kjs","key":"kjs","value":{"rev":"3-2ee03262f843e497161f1aef500dd229"}}, +{"id":"kju","key":"kju","value":{"rev":"5-0a7de1cd26864c85a22c7727c660d441"}}, +{"id":"klass","key":"klass","value":{"rev":"39-61491ef3824772d5ef33f7ea04219461"}}, +{"id":"klout-js","key":"klout-js","value":{"rev":"8-8d99f6dad9c21cb5da0d64fefef8c6d6"}}, +{"id":"knid","key":"knid","value":{"rev":"7-2cbfae088155da1044b568584cd296df"}}, +{"id":"knox","key":"knox","value":{"rev":"19-3c42553bd201b23a6bc15fdd073dad17"}}, +{"id":"knox-stream","key":"knox-stream","value":{"rev":"17-e40275f926b6ed645e4ef04caf8e5df4"}}, +{"id":"kns","key":"kns","value":{"rev":"9-5da1a89ad8c08f4b10cd715036200da3"}}, +{"id":"ko","key":"ko","value":{"rev":"9-9df2853d0e9ed9f7740f53291d0035dd"}}, +{"id":"koala","key":"koala","value":{"rev":"8-9e3fea91917f6d8cfb5aae22115e132f"}}, +{"id":"kohai","key":"kohai","value":{"rev":"3-1721a193589459fa077fea809fd7c9a9"}}, +{"id":"koku","key":"koku","value":{"rev":"5-414736980e0e70d90cd7f29b175fb18c"}}, +{"id":"komainu","key":"komainu","value":{"rev":"5-0f1a8f132fe58385e989dd4f93aefa26"}}, +{"id":"komodo-scheme","key":"komodo-scheme","value":{"rev":"3-97d1bd27f069684c491012e079fd82c4"}}, +{"id":"konphyg","key":"konphyg","value":{"rev":"7-e5fc03d6ddf39f2e0723291800bf0d43"}}, +{"id":"kranium","key":"kranium","value":{"rev":"3-4a78d2eb28e949a55b0dbd2ab00cecaf"}}, +{"id":"kue","key":"kue","value":{"rev":"21-053b32204d89a3067c5a90ca62ede08c"}}, +{"id":"kyatchi","key":"kyatchi","value":{"rev":"21-8dfbbe498f3740a2869c82e4ab4522d1"}}, +{"id":"kyoto","key":"kyoto","value":{"rev":"15-b9acdad89d56c71b6f427a443c16f85f"}}, +{"id":"kyoto-client","key":"kyoto-client","value":{"rev":"11-7fb392ee23ce64a48ae5638d713f4fbd"}}, +{"id":"kyoto-tycoon","key":"kyoto-tycoon","value":{"rev":"18-81ece8df26dbd9986efe1d97d935bec2"}}, +{"id":"kyuri","key":"kyuri","value":{"rev":"9-bedd4c087bd7bf612bde5e862d8b91bb"}}, +{"id":"labBuilder","key":"labBuilder","value":{"rev":"11-37f85b5325f1ccf25193c8b737823185"}}, +{"id":"laconic","key":"laconic","value":{"rev":"3-f5b7b9ac113fe7d32cbf4cb0d01c3052"}}, +{"id":"languagedetect","key":"languagedetect","value":{"rev":"3-ac487c034a3470ebd47b54614ea848f9"}}, +{"id":"lastfm","key":"lastfm","value":{"rev":"52-5af213489ca6ecdf2afc851c4642b082"}}, +{"id":"layers","key":"layers","value":{"rev":"7-62cd47d9645faa588c635dab2fbd2ef0"}}, +{"id":"lazy","key":"lazy","value":{"rev":"18-9b5ccdc9c3a970ec4c2b63b6f882da6a"}}, +{"id":"lazy-image","key":"lazy-image","value":{"rev":"5-34a6bc95017c50b3cb69981c7343e5da"}}, +{"id":"lazyBum","key":"lazyBum","value":{"rev":"15-03da6d744ba8cce7efca88ccb7e18c4d"}}, +{"id":"lazyprop","key":"lazyprop","value":{"rev":"14-82b4bcf318094a7950390f03e2fec252"}}, +{"id":"ldapjs","key":"ldapjs","value":{"rev":"11-e2b28e11a0aebe37b758d8f1ed61dd57"}}, +{"id":"ldapjs-riak","key":"ldapjs-riak","value":{"rev":"7-005413a1d4e371663626a3cca200c7e0"}}, +{"id":"ldifgrep","key":"ldifgrep","value":{"rev":"3-e4f06821a3444abbcd3c0c26300dcdda"}}, +{"id":"leaf","key":"leaf","value":{"rev":"8-0ccf5cdd1b59717b53375fe4bf044ec3"}}, +{"id":"lean","key":"lean","value":{"rev":"3-32dbbc771a3f1f6697c21c5d6c516967"}}, +{"id":"leche","key":"leche","value":{"rev":"7-0f5e19052ae1e3cb25ff2aa73271ae4f"}}, +{"id":"leche.spice.io","key":"leche.spice.io","value":{"rev":"3-07db415fdb746873f211e8155ecdf232"}}, +{"id":"less","key":"less","value":{"rev":"37-160fe5ea5dba44f02defdb8ec8c647d5"}}, +{"id":"less-bal","key":"less-bal","value":{"rev":"3-d50532c7c46013a62d06a0e54f8846ce"}}, +{"id":"less4clients","key":"less4clients","value":{"rev":"5-343d2973a166801681c856558d975ddf"}}, +{"id":"lessup","key":"lessup","value":{"rev":"9-a2e7627ef1b493fe82308d019ae481ac"}}, +{"id":"lessweb","key":"lessweb","value":{"rev":"9-e21794e578884c228dbed7c5d6128a41"}}, +{"id":"leveldb","key":"leveldb","value":{"rev":"11-3809e846a7a5ff883d17263288664195"}}, +{"id":"levenshtein","key":"levenshtein","value":{"rev":"6-44d27b6a6bc407772cafc29af485854f"}}, +{"id":"lib","key":"lib","value":{"rev":"5-a95272f11e927888c8b711503fce670b"}}, +{"id":"libdtrace","key":"libdtrace","value":{"rev":"8-4d4f72b2349154da514700f576e34564"}}, +{"id":"liberator","key":"liberator","value":{"rev":"15-b702710ccb3b45e41e9e2f3ebb6375ae"}}, +{"id":"libirc","key":"libirc","value":{"rev":"3-05b125de0c179dd311129aac2e1c8047"}}, +{"id":"liblzg","key":"liblzg","value":{"rev":"5-445ed45dc3cd166a299f85f6149aa098"}}, +{"id":"libnotify","key":"libnotify","value":{"rev":"10-c6723206898865e4828e963f5acc005e"}}, +{"id":"libxml-to-js","key":"libxml-to-js","value":{"rev":"33-64d3152875d33d6feffd618152bc41df"}}, +{"id":"libxmlext","key":"libxmlext","value":{"rev":"3-6a896dacba6f25fbca9b79d4143aaa9a"}}, +{"id":"libxmljs","key":"libxmljs","value":{"rev":"17-4b2949b53d9ecde79a99361774c1144b"}}, +{"id":"libxpm","key":"libxpm","value":{"rev":"3-c03efe75832c4416ceee5d72be12a8ef"}}, +{"id":"libyaml","key":"libyaml","value":{"rev":"5-f279bde715345a4e81d43c1d798ee608"}}, +{"id":"lift","key":"lift","value":{"rev":"21-61dcb771e5e0dc03fa327120d440ccda"}}, +{"id":"light-traits","key":"light-traits","value":{"rev":"26-b35c49550f9380fd462d57c64d51540f"}}, +{"id":"lightnode","key":"lightnode","value":{"rev":"3-ce37ccbf6a6546d4fa500e0eff84e882"}}, +{"id":"limestone","key":"limestone","value":{"rev":"3-d6f76ae98e4189db4ddfa8e15b4cdea9"}}, +{"id":"limited-file","key":"limited-file","value":{"rev":"3-c1d78250965b541836a70d3e867c694f"}}, +{"id":"lin","key":"lin","value":{"rev":"17-0a26ea2a603df0d14a9c40aad96bfb5e"}}, +{"id":"line-parser","key":"line-parser","value":{"rev":"7-84047425699f5a8a8836f4f2e63777bc"}}, +{"id":"line-reader","key":"line-reader","value":{"rev":"9-d2a7cb3a9793149e643490dc16a1eb50"}}, +{"id":"linebuffer","key":"linebuffer","value":{"rev":"12-8e79075aa213ceb49b28e0af7b3f3861"}}, +{"id":"lines","key":"lines","value":{"rev":"9-01a0565f47c3816919ca75bf77539df5"}}, +{"id":"lines-adapter","key":"lines-adapter","value":{"rev":"23-f287561e42a841c00bbf94bc8741bebc"}}, +{"id":"linestream","key":"linestream","value":{"rev":"5-18c2be87653ecf20407ed70eeb601ae7"}}, +{"id":"lingo","key":"lingo","value":{"rev":"10-b3d62b203c4af108feeaf0e32b2a4186"}}, +{"id":"link","key":"link","value":{"rev":"15-7570cea23333dbe3df11fd71171e6226"}}, +{"id":"linkedin-js","key":"linkedin-js","value":{"rev":"22-1bb1f392a9838684076b422840cf98eb"}}, +{"id":"linkscape","key":"linkscape","value":{"rev":"5-7272f50a54b1db015ce6d1e79eeedad7"}}, +{"id":"linkshare","key":"linkshare","value":{"rev":"3-634c4a18a217f77ccd6b89a9a2473d2a"}}, +{"id":"linode-api","key":"linode-api","value":{"rev":"13-2b43281ec86206312a2c387c9fc2c49f"}}, +{"id":"lint","key":"lint","value":{"rev":"49-fb76fddeb3ca609e5cac75fb0b0ec216"}}, +{"id":"linter","key":"linter","value":{"rev":"18-0fc884c96350f860cf2695f615572dba"}}, +{"id":"lintnode","key":"lintnode","value":{"rev":"8-b70bca986d7bde759521d0693dbc28b8"}}, +{"id":"linux-util","key":"linux-util","value":{"rev":"9-d049e8375e9c50b7f2b6268172d79734"}}, +{"id":"liquid","key":"liquid","value":{"rev":"3-353fa3c93ddf1951e3a75d60e6e8757b"}}, +{"id":"liquor","key":"liquor","value":{"rev":"3-4ee78e69a4a400a4de3491b0954947e7"}}, +{"id":"listener","key":"listener","value":{"rev":"5-02b5858d36aa99dcc5fc03c9274c94ee"}}, +{"id":"litmus","key":"litmus","value":{"rev":"9-7e403d052483301d025e9d09b4e7a9dd"}}, +{"id":"littering","key":"littering","value":{"rev":"5-9026438311ffc18d369bfa886c120bcd"}}, +{"id":"live-twitter-map","key":"live-twitter-map","value":{"rev":"3-45a40054bbab23374a4f1743c8bd711d"}}, +{"id":"livereload","key":"livereload","value":{"rev":"5-11ff486b4014ec1998705dbd396e96f2"}}, +{"id":"load","key":"load","value":{"rev":"7-2fff87aeb91d74bc57c134ee2cf0d65b"}}, +{"id":"loadbuilder","key":"loadbuilder","value":{"rev":"9-fa9c5cb13b3af03f9d9fbf5064fa0e0f"}}, +{"id":"loadit","key":"loadit","value":{"rev":"3-51bee062ed0d985757c6ae24929fa74e"}}, +{"id":"local-cdn","key":"local-cdn","value":{"rev":"9-9c2931766a559cf036318583455456e6"}}, +{"id":"localStorage","key":"localStorage","value":{"rev":"3-455fbe195db27131789b5d59db4504b0"}}, +{"id":"locales","key":"locales","value":{"rev":"5-bee452772e2070ec07af0dd86d6dbc41"}}, +{"id":"localhose","key":"localhose","value":{"rev":"9-3a2f63ecbed2e31400ca7515fd020a77"}}, +{"id":"localhost","key":"localhost","value":{"rev":"3-c6c4f6b5688cbe62865010099c9f461f"}}, +{"id":"localhostapp","key":"localhostapp","value":{"rev":"3-17884c4847c549e07e0c881fdf60d01f"}}, +{"id":"localize","key":"localize","value":{"rev":"7-1f83adb6d1eefcf7222a05f489b5db10"}}, +{"id":"location","key":"location","value":{"rev":"3-cc6fbf77b4ade80312bd95fde4e00015"}}, +{"id":"lockfile","key":"lockfile","value":{"rev":"3-4b4b79c2b0f09cc516db1a9d581c5038"}}, +{"id":"lode","key":"lode","value":{"rev":"15-5062a9a0863770d172097c5074a2bdae"}}, +{"id":"log","key":"log","value":{"rev":"12-0aa7922459ff8397764956c56a106930"}}, +{"id":"log-buddy","key":"log-buddy","value":{"rev":"3-64c6d4927d1d235d927f09c16c874e06"}}, +{"id":"log-watcher","key":"log-watcher","value":{"rev":"3-70f8727054c8e4104f835930578f4ee1"}}, +{"id":"log4js","key":"log4js","value":{"rev":"38-137b28e6e96515da7a6399cae86795dc"}}, +{"id":"log4js-amqp","key":"log4js-amqp","value":{"rev":"3-90530c28ef63d4598c12dfcf450929c0"}}, +{"id":"log5","key":"log5","value":{"rev":"17-920e3765dcfdc31bddf13de6895122b3"}}, +{"id":"logbot","key":"logbot","value":{"rev":"3-234eedc70b5474c713832e642f4dc3b4"}}, +{"id":"logger","key":"logger","value":{"rev":"3-5eef338fb5e845a81452fbb22e582aa7"}}, +{"id":"logging","key":"logging","value":{"rev":"22-99d320792c5445bd04699c4cf19edd89"}}, +{"id":"logging-system","key":"logging-system","value":{"rev":"5-5eda9d0b1d04256f5f44abe51cd14626"}}, +{"id":"loggly","key":"loggly","value":{"rev":"49-944a404e188327431a404e5713691a8c"}}, +{"id":"login","key":"login","value":{"rev":"44-7c450fe861230a5121ff294bcd6f97c9"}}, +{"id":"logly","key":"logly","value":{"rev":"7-832fe9af1cd8bfed84a065822cec398a"}}, +{"id":"logmagic","key":"logmagic","value":{"rev":"11-5d2c7dd32ba55e5ab85127be09723ef8"}}, +{"id":"logmonger","key":"logmonger","value":{"rev":"3-07a101d795f43f7af668210660274a7b"}}, +{"id":"lokki","key":"lokki","value":{"rev":"3-f6efcce38029ea0b4889707764088540"}}, +{"id":"long-stack-traces","key":"long-stack-traces","value":{"rev":"7-4b2fe23359b29e188cb2b8936b63891a"}}, +{"id":"loom","key":"loom","value":{"rev":"3-6348ab890611154da4881a0b351b0cb5"}}, +{"id":"loop","key":"loop","value":{"rev":"3-a56e9a6144f573092bb441106b370e0c"}}, +{"id":"looseleaf","key":"looseleaf","value":{"rev":"57-46ef6f055a40c34c714e3e9b9fe5d4cd"}}, +{"id":"lovely","key":"lovely","value":{"rev":"21-f577923512458f02f48ef59eebe55176"}}, +{"id":"lpd","key":"lpd","value":{"rev":"3-433711ae25002f67aa339380668fd491"}}, +{"id":"lpd-printers","key":"lpd-printers","value":{"rev":"3-47060e6c05fb4aad227d36f6e7941227"}}, +{"id":"lru-cache","key":"lru-cache","value":{"rev":"10-23c5e7423fe315745ef924f58c36e119"}}, +{"id":"ls-r","key":"ls-r","value":{"rev":"7-a769b11a06fae8ff439fe7eeb0806b5e"}}, +{"id":"lsof","key":"lsof","value":{"rev":"5-82aa3bcf23b8026a95e469b6188938f9"}}, +{"id":"ltx","key":"ltx","value":{"rev":"21-89ca85a9ce0c9fc13b20c0f1131168b0"}}, +{"id":"lucky-server","key":"lucky-server","value":{"rev":"3-a50d87239166f0ffc374368463f96b07"}}, +{"id":"lunapark","key":"lunapark","value":{"rev":"3-841d197f404da2e63d69b0c2132d87db"}}, +{"id":"lunchbot","key":"lunchbot","value":{"rev":"3-5d8984bef249e3d9e271560b5753f4cf"}}, +{"id":"lw-nun","key":"lw-nun","value":{"rev":"3-b686f89361b7b405e4581db6c60145ed"}}, +{"id":"lw-sass","key":"lw-sass","value":{"rev":"3-e46f90e0c8eab0c8c5d5eb8cf2a9a6da"}}, +{"id":"lwes","key":"lwes","value":{"rev":"3-939bb87efcbede1c1a70de881686fbce"}}, +{"id":"lwink","key":"lwink","value":{"rev":"3-1c432fafe4809e8d4a7e6214123ae452"}}, +{"id":"lzma","key":"lzma","value":{"rev":"3-31dc39414531e329b42b3a4ea0292c43"}}, +{"id":"m1node","key":"m1node","value":{"rev":"11-b34d55bdbc6f65b1814e77fab4a7e823"}}, +{"id":"m1test","key":"m1test","value":{"rev":"3-815ce56949e41e120082632629439eac"}}, +{"id":"m2node","key":"m2node","value":{"rev":"7-f50ec5578d995dd6a0a38e1049604bfc"}}, +{"id":"m2pdb","key":"m2pdb","value":{"rev":"3-ee798ac17c8c554484aceae2f77a826b"}}, +{"id":"m3u","key":"m3u","value":{"rev":"5-7ca6d768e0aed5b88dd45c943ca9ffa0"}}, +{"id":"mac","key":"mac","value":{"rev":"21-db5883c390108ff9ba46660c78b18b6c"}}, +{"id":"macchiato","key":"macchiato","value":{"rev":"5-0df1c87029e6005577fd8fd5cdb25947"}}, +{"id":"macgyver","key":"macgyver","value":{"rev":"3-f517699102b7bd696d8197d7ce57afb9"}}, +{"id":"macros","key":"macros","value":{"rev":"3-8356bcc0d1b1bd3879eeb880b2f3330b"}}, +{"id":"macrotest","key":"macrotest","value":{"rev":"10-2c6ceffb38f8ce5b0f382dbb02720d70"}}, +{"id":"maddy","key":"maddy","value":{"rev":"9-93d59c65c3f44aa6ed43dc986dd73ca5"}}, +{"id":"madmimi-node","key":"madmimi-node","value":{"rev":"11-257e1b1bd5ee5194a7052542952b8b7a"}}, +{"id":"maga","key":"maga","value":{"rev":"24-c69734f9fc138788db741b862f889583"}}, +{"id":"magic","key":"magic","value":{"rev":"34-aed787cc30ab86c95f547b9555d6a381"}}, +{"id":"magic-templates","key":"magic-templates","value":{"rev":"3-89546e9a038150cf419b4b15a84fd2aa"}}, +{"id":"magickal","key":"magickal","value":{"rev":"3-e9ed74bb90df0a52564d47aed0451ce7"}}, +{"id":"mai","key":"mai","value":{"rev":"5-f3561fe6de2bd25201250ddb6dcf9f01"}}, +{"id":"mail","key":"mail","value":{"rev":"14-9ae558552e6a7c11017f118a71c072e9"}}, +{"id":"mail-stack","key":"mail-stack","value":{"rev":"5-c82567203540076cf4878ea1ab197b52"}}, +{"id":"mailbox","key":"mailbox","value":{"rev":"12-0b582e127dd7cf669de16ec36f8056a4"}}, +{"id":"mailchimp","key":"mailchimp","value":{"rev":"23-3d9328ee938b7940322351254ea54877"}}, +{"id":"mailer","key":"mailer","value":{"rev":"40-7b251b758f9dba4667a3127195ea0380"}}, +{"id":"mailer-bal","key":"mailer-bal","value":{"rev":"3-fc8265b1905ea37638309d7c10852050"}}, +{"id":"mailer-fixed","key":"mailer-fixed","value":{"rev":"13-3004df43c62eb64ed5fb0306b019fe66"}}, +{"id":"mailgun","key":"mailgun","value":{"rev":"25-29de1adb355636822dc21fef51f37aed"}}, +{"id":"mailparser","key":"mailparser","value":{"rev":"14-7142e4168046418afc4a76d1b330f302"}}, +{"id":"mailto-parser","key":"mailto-parser","value":{"rev":"3-f8dea7b60c0e993211f81a86dcf5b18d"}}, +{"id":"makeerror","key":"makeerror","value":{"rev":"17-ceb9789357d80467c9ae75caa64ca8ac"}}, +{"id":"malt","key":"malt","value":{"rev":"7-e5e76a842eb0764a5ebe57290b629097"}}, +{"id":"mango","key":"mango","value":{"rev":"7-6224e74a3132e54f294f62998ed9127f"}}, +{"id":"map-reduce","key":"map-reduce","value":{"rev":"11-a81d8bdc6dae7e7b76d5df74fff40ae1"}}, +{"id":"mapnik","key":"mapnik","value":{"rev":"64-693f5b957b7faf361c2cc2a22747ebf7"}}, +{"id":"maptail","key":"maptail","value":{"rev":"14-8334618ddc20006a5f77ff35b172c152"}}, +{"id":"marak","key":"marak","value":{"rev":"3-27be187af00fc97501035dfb97a11ecf"}}, +{"id":"markdoc","key":"markdoc","value":{"rev":"13-23becdeda44b26ee54c9aaa31457e4ba"}}, +{"id":"markdom","key":"markdom","value":{"rev":"10-3c0df12e4f4a2e675d0f0fde48aa425f"}}, +{"id":"markdown","key":"markdown","value":{"rev":"19-88e02c28ce0179be900bf9e6aadc070f"}}, +{"id":"markdown-js","key":"markdown-js","value":{"rev":"6-964647c2509850358f70f4e23670fbeb"}}, +{"id":"markdown-wiki","key":"markdown-wiki","value":{"rev":"6-ce35fb0612a463db5852c5d3dcc7fdd3"}}, +{"id":"markdown2html","key":"markdown2html","value":{"rev":"3-549babe5d9497785fa8b9305c81d7214"}}, +{"id":"marked","key":"marked","value":{"rev":"21-9371df65f63131c9f24e8805db99a7d9"}}, +{"id":"markov","key":"markov","value":{"rev":"13-9ab795448c54ef87851f1392d6f3671a"}}, +{"id":"maryjane","key":"maryjane","value":{"rev":"3-e2e6cce443850b5df1554bf851d16760"}}, +{"id":"massagist","key":"massagist","value":{"rev":"11-cac3a103aecb4ff3f0f607aca2b1d3fb"}}, +{"id":"masson","key":"masson","value":{"rev":"10-87a5e6fd05bd4b8697fa3fa636238c20"}}, +{"id":"masstransit","key":"masstransit","value":{"rev":"11-74898c746e541ff1a00438017ee66d4a"}}, +{"id":"matchmaker","key":"matchmaker","value":{"rev":"3-192db6fb162bdf84fa3e858092fd3e20"}}, +{"id":"math","key":"math","value":{"rev":"5-16a74d8639e44a5ccb265ab1a3b7703b"}}, +{"id":"math-lexer","key":"math-lexer","value":{"rev":"19-54b42374b0090eeee50f39cb35f2eb40"}}, +{"id":"matrices","key":"matrices","value":{"rev":"43-06d64271a5148f89d649645712f8971f"}}, +{"id":"matrix","key":"matrix","value":{"rev":"3-77cff57242445cf3d76313b72bbc38f4"}}, +{"id":"matrixlib","key":"matrixlib","value":{"rev":"11-b3c105a5e5be1835183e7965d04825d9"}}, +{"id":"matterhorn","key":"matterhorn","value":{"rev":"9-a310dba2ea054bdce65e6df2f6ae85e5"}}, +{"id":"matterhorn-dust","key":"matterhorn-dust","value":{"rev":"3-2fb311986d62cf9f180aa76038ebf7b3"}}, +{"id":"matterhorn-gui","key":"matterhorn-gui","value":{"rev":"3-7921b46c9bff3ee82e4b32bc0a0a977d"}}, +{"id":"matterhorn-prng","key":"matterhorn-prng","value":{"rev":"3-c33fd59c1f1d24fb423553ec242e444b"}}, +{"id":"matterhorn-standard","key":"matterhorn-standard","value":{"rev":"13-0aaab6ecf55cdad6f773736da968afba"}}, +{"id":"matterhorn-state","key":"matterhorn-state","value":{"rev":"3-0ba8fd8a4c644b18aff34f1aef95db33"}}, +{"id":"matterhorn-user","key":"matterhorn-user","value":{"rev":"17-e42dc37a5cb24710803b3bd8dee7484d"}}, +{"id":"matterhorn-view","key":"matterhorn-view","value":{"rev":"3-b39042d665f5912d02e724d33d129a97"}}, +{"id":"mbtiles","key":"mbtiles","value":{"rev":"41-b92035d0ec8f47850734c4bb995baf7d"}}, +{"id":"mcast","key":"mcast","value":{"rev":"8-559b2b09cfa34cb88c16ae72ec90d28a"}}, +{"id":"md5","key":"md5","value":{"rev":"3-43d600c70f6442d3878c447585bf43bf"}}, +{"id":"mdgram","key":"mdgram","value":{"rev":"15-4d65cf0d5edef976de9a612c0cde0907"}}, +{"id":"mdns","key":"mdns","value":{"rev":"11-8b6789c3779fce7f019f9f10c625147a"}}, +{"id":"mecab-binding","key":"mecab-binding","value":{"rev":"3-3395763d23a3f8e3e00ba75cb988f9b4"}}, +{"id":"mechanize","key":"mechanize","value":{"rev":"5-94b72f43e270aa24c00e283fa52ba398"}}, +{"id":"mediatags","key":"mediatags","value":{"rev":"3-d5ea41e140fbbc821590cfefdbd016a5"}}, +{"id":"mediator","key":"mediator","value":{"rev":"3-42aac2225b47f72f97001107a3d242f5"}}, +{"id":"memcache","key":"memcache","value":{"rev":"5-aebcc4babe11b654afd3cede51e945ec"}}, +{"id":"memcached","key":"memcached","value":{"rev":"9-7c46464425c78681a8e6767ef9993c4c"}}, +{"id":"memcouchd","key":"memcouchd","value":{"rev":"3-b57b9fb4f6c60604f616c2f70456b4d6"}}, +{"id":"meme","key":"meme","value":{"rev":"11-53fcb51e1d8f8908b95f0fa12788e9aa"}}, +{"id":"memo","key":"memo","value":{"rev":"9-3a9ca97227ed19cacdacf10ed193ee8b"}}, +{"id":"memoize","key":"memoize","value":{"rev":"15-44bdd127c49035c8bd781a9299c103c2"}}, +{"id":"memoizer","key":"memoizer","value":{"rev":"9-d9a147e8c8a58fd7e8f139dc902592a6"}}, +{"id":"memorystream","key":"memorystream","value":{"rev":"9-6d0656067790e158f3c4628968ed70d3"}}, +{"id":"memstore","key":"memstore","value":{"rev":"5-03dcac59882c8a434e4c2fe2ac354941"}}, +{"id":"mercury","key":"mercury","value":{"rev":"3-147af865af6f7924f44f14f4b5c14dac"}}, +{"id":"mersenne","key":"mersenne","value":{"rev":"7-d8ae550eb8d0deaa1fd60f86351cb548"}}, +{"id":"meryl","key":"meryl","value":{"rev":"23-2c0e3fad99005109c584530e303bc5bf"}}, +{"id":"mesh","key":"mesh","value":{"rev":"5-f3ea4aef5b3f169eab8b518e5044c950"}}, +{"id":"meta-promise","key":"meta-promise","value":{"rev":"5-0badf85ab432341e6256252463468b89"}}, +{"id":"meta-test","key":"meta-test","value":{"rev":"49-92df2922499960ac750ce96d861ddd7e"}}, +{"id":"meta_code","key":"meta_code","value":{"rev":"7-9b4313c0c52a09c788464f1fea05baf7"}}, +{"id":"metamanager","key":"metamanager","value":{"rev":"5-dbb0312dad15416d540eb3d860fbf205"}}, +{"id":"metaweblog","key":"metaweblog","value":{"rev":"3-d3ab090ec27242e220412d6413e388ee"}}, +{"id":"metric","key":"metric","value":{"rev":"3-8a706db5b518421ad640a75e65cb4be9"}}, +{"id":"metrics","key":"metrics","value":{"rev":"13-62e5627c1ca5e6d3b3bde8d17e675298"}}, +{"id":"metrics-broker","key":"metrics-broker","value":{"rev":"15-0fdf57ea4ec84aa1f905f53b4975e72d"}}, +{"id":"mhash","key":"mhash","value":{"rev":"3-f00d65dc939474a5c508d37a327e5074"}}, +{"id":"micro","key":"micro","value":{"rev":"17-882c0ecf34ddaef5c673c547ae80b80b"}}, +{"id":"microcache","key":"microcache","value":{"rev":"3-ef75e04bc6e86d14f93ad9c429503bd9"}}, +{"id":"microevent","key":"microevent","value":{"rev":"3-9c0369289b62873ef6e8624eef724d15"}}, +{"id":"microtest","key":"microtest","value":{"rev":"11-11afdadfb15c1db030768ce52f34de1a"}}, +{"id":"microtime","key":"microtime","value":{"rev":"20-5f75e87316cbb5f7a4be09142cd755e5"}}, +{"id":"middlefiddle","key":"middlefiddle","value":{"rev":"13-bb94c05d75c24bdeb23a4637c7ecf55e"}}, +{"id":"middleware","key":"middleware","value":{"rev":"5-80937a4c620fcc2a5532bf064ec0837b"}}, +{"id":"midi","key":"midi","value":{"rev":"9-96da6599a84a761430adfd41deb3969a"}}, +{"id":"midi-js","key":"midi-js","value":{"rev":"11-1d174af1352e3d37f6ec0df32d56ce1a"}}, +{"id":"migrate","key":"migrate","value":{"rev":"13-7493879fb60a31b9e2a9ad19e94bfef6"}}, +{"id":"mikronode","key":"mikronode","value":{"rev":"31-1edae4ffbdb74c43ea584a7757dacc9b"}}, +{"id":"milk","key":"milk","value":{"rev":"21-81fb117817ed2e4c19e16dc310c09735"}}, +{"id":"millstone","key":"millstone","value":{"rev":"29-73d54de4b4de313b0fec4edfaec741a4"}}, +{"id":"mime","key":"mime","value":{"rev":"33-de72b641474458cb21006dea6a524ceb"}}, +{"id":"mime-magic","key":"mime-magic","value":{"rev":"13-2df6b966d7f29d5ee2dd2e1028d825b1"}}, +{"id":"mimelib","key":"mimelib","value":{"rev":"9-7994cf0fe3007329b9397f4e08481487"}}, +{"id":"mimelib-noiconv","key":"mimelib-noiconv","value":{"rev":"5-c84995d4b2bbe786080c9b54227b5bb4"}}, +{"id":"mimeograph","key":"mimeograph","value":{"rev":"37-bead083230f48f354f3ccac35e11afc0"}}, +{"id":"mimeparse","key":"mimeparse","value":{"rev":"8-5ca7e6702fe7f1f37ed31b05e82f4a87"}}, +{"id":"mingy","key":"mingy","value":{"rev":"19-09b19690c55abc1e940374e25e9a0d26"}}, +{"id":"mini-lzo-wrapper","key":"mini-lzo-wrapper","value":{"rev":"4-d751d61f481363a2786ac0312893dfca"}}, +{"id":"miniee","key":"miniee","value":{"rev":"5-be0833a9f15382695f861a990f3d6108"}}, +{"id":"minifyjs","key":"minifyjs","value":{"rev":"13-f255df8c7567440bc4c0f8eaf04a18c6"}}, +{"id":"minimal","key":"minimal","value":{"rev":"5-6be6b3454d30c59a30f9ee8af0ee606c"}}, +{"id":"minimal-test","key":"minimal-test","value":{"rev":"15-65dca2c1ee27090264577cc8b93983cb"}}, +{"id":"minimatch","key":"minimatch","value":{"rev":"11-449e570c76f4e6015c3dc90f080f8c47"}}, +{"id":"minirpc","key":"minirpc","value":{"rev":"10-e85b92273a97fa86e20faef7a3b50518"}}, +{"id":"ministore","key":"ministore","value":{"rev":"11-f131868141ccd0851bb91800c86dfff1"}}, +{"id":"minitest","key":"minitest","value":{"rev":"13-c92e32499a25ff2d7e484fbbcabe1081"}}, +{"id":"miniweb","key":"miniweb","value":{"rev":"3-e8c413a77e24891138eaa9e73cb08715"}}, +{"id":"minj","key":"minj","value":{"rev":"9-ccf50caf8e38b0fc2508f01a63f80510"}}, +{"id":"minotaur","key":"minotaur","value":{"rev":"29-6d048956b26e8a213f6ccc96027bacde"}}, +{"id":"mirror","key":"mirror","value":{"rev":"21-01bdd78ff03ca3f8f99fce104baab9f9"}}, +{"id":"misao-chan","key":"misao-chan","value":{"rev":"13-f032690f0897fc4a1dc12f1e03926627"}}, +{"id":"mite.node","key":"mite.node","value":{"rev":"13-0bfb15c4a6f172991756660b29869dd4"}}, +{"id":"mixable","key":"mixable","value":{"rev":"3-bc518ab862a6ceacc48952b9bec7d61a"}}, +{"id":"mixin","key":"mixin","value":{"rev":"3-3a7ae89345d21ceaf545d93b20caf2f2"}}, +{"id":"mixinjs","key":"mixinjs","value":{"rev":"3-064173d86b243316ef1b6c5743a60bf9"}}, +{"id":"mixpanel","key":"mixpanel","value":{"rev":"7-f742248bfbfc480658c4c46f7ab7a74a"}}, +{"id":"mixpanel-api","key":"mixpanel-api","value":{"rev":"5-61a3fa28921887344d1af339917e147a"}}, +{"id":"mixpanel_api","key":"mixpanel_api","value":{"rev":"3-11939b6fd20b80bf9537380875bf3996"}}, +{"id":"mjoe","key":"mjoe","value":{"rev":"3-8b3549cd6edcc03112217370b071b076"}}, +{"id":"mjsunit.runner","key":"mjsunit.runner","value":{"rev":"12-94c779b555069ca5fb0bc9688515673e"}}, +{"id":"mkdir","key":"mkdir","value":{"rev":"3-e8fd61b35638f1f3a65d36f09344ff28"}}, +{"id":"mkdirp","key":"mkdirp","value":{"rev":"15-c8eacf17b336ea98d1d9960f02362cbf"}}, +{"id":"mmap","key":"mmap","value":{"rev":"16-df335eb3257dfbd2fb0de341970d2656"}}, +{"id":"mmikulicic-thrift","key":"mmikulicic-thrift","value":{"rev":"3-f4a9f7a97bf50e966d1184fba423a07f"}}, +{"id":"mmmodel","key":"mmmodel","value":{"rev":"7-00d61723742a325aaaa6955ba52cef60"}}, +{"id":"mmodel","key":"mmodel","value":{"rev":"3-717309af27d6c5d98ed188c9c9438a37"}}, +{"id":"mmseg","key":"mmseg","value":{"rev":"17-794d553e67d6023ca3d58dd99fe1da15"}}, +{"id":"mobilize","key":"mobilize","value":{"rev":"25-8a657ec0accf8db2e8d7b935931ab77b"}}, +{"id":"mock","key":"mock","value":{"rev":"3-d8805bff4796462750071cddd3f75ea7"}}, +{"id":"mock-request","key":"mock-request","value":{"rev":"7-4ac4814c23f0899b1100d5f0617e40f4"}}, +{"id":"mock-request-response","key":"mock-request-response","value":{"rev":"5-fe1566c9881039a92a80e0e82a95f096"}}, +{"id":"mocket","key":"mocket","value":{"rev":"13-9001879cd3cb6f52f3b2d85fb14b8f9b"}}, +{"id":"modbus-stack","key":"modbus-stack","value":{"rev":"7-50c56e74d9cb02c5d936b0b44c54f621"}}, +{"id":"model","key":"model","value":{"rev":"3-174181c2f314f35fc289b7a921ba4d39"}}, +{"id":"models","key":"models","value":{"rev":"8-6cc2748edfd96679f9bb3596864874a9"}}, +{"id":"modestmaps","key":"modestmaps","value":{"rev":"8-79265968137a2327f98bfc6943a84da9"}}, +{"id":"modjewel","key":"modjewel","value":{"rev":"3-73efc7b9dc24d82cab1de249896193fd"}}, +{"id":"modlr","key":"modlr","value":{"rev":"17-ccf16db98ab6ccb95e005b3bb76dba64"}}, +{"id":"module-grapher","key":"module-grapher","value":{"rev":"19-b6ba30b41e29fc01d4b679a643f030e5"}}, +{"id":"modulr","key":"modulr","value":{"rev":"15-8e8ffd75c6c6149206de4ce0c2aefad7"}}, +{"id":"mogile","key":"mogile","value":{"rev":"5-79a8af20dbe6bff166ac2197a3998b0c"}}, +{"id":"mojo","key":"mojo","value":{"rev":"25-1d9c26d6afd6ea77253f220d86d60307"}}, +{"id":"monad","key":"monad","value":{"rev":"10-cf20354900b7e67d94c342feb06a1eb9"}}, +{"id":"mongeese","key":"mongeese","value":{"rev":"3-f4b319d98f9f73fb17cd3ebc7fc86412"}}, +{"id":"mongo-pool","key":"mongo-pool","value":{"rev":"3-215481828e69fd874b5938a79a7e0934"}}, +{"id":"mongodb","key":"mongodb","value":{"rev":"147-3dc09965e762787f34131a8739297383"}}, +{"id":"mongodb-async","key":"mongodb-async","value":{"rev":"7-ba9097bdc86b72885fa5a9ebb49a64d0"}}, +{"id":"mongodb-provider","key":"mongodb-provider","value":{"rev":"5-5523643b403e969e0b80c57db08cb9d3"}}, +{"id":"mongodb-rest","key":"mongodb-rest","value":{"rev":"36-60b4abc4a22f31de09407cc7cdd0834f"}}, +{"id":"mongodb-wrapper","key":"mongodb-wrapper","value":{"rev":"13-7a6c5eaff36ede45211aa80f3a506cfe"}}, +{"id":"mongodb_heroku","key":"mongodb_heroku","value":{"rev":"3-05947c1e06e1f8860c7809b063a8d1a0"}}, +{"id":"mongode","key":"mongode","value":{"rev":"11-faa14f050da4a165e2568d413a6b8bc0"}}, +{"id":"mongojs","key":"mongojs","value":{"rev":"26-a628eb51534ffcdd97c1a940d460a52c"}}, +{"id":"mongolia","key":"mongolia","value":{"rev":"76-711c39de0e152e224d4118c9b0de834f"}}, +{"id":"mongolian","key":"mongolian","value":{"rev":"44-3773671b31c406a18cb9f5a1764ebee4"}}, +{"id":"mongoose","key":"mongoose","value":{"rev":"181-03a8aa7f691cbd987995bf6e3354e0f5"}}, +{"id":"mongoose-admin","key":"mongoose-admin","value":{"rev":"7-59078ad5a345e9e66574346d3e70f9ad"}}, +{"id":"mongoose-auth","key":"mongoose-auth","value":{"rev":"49-87c79f3a6164c438a53b7629be87ae5d"}}, +{"id":"mongoose-autoincr","key":"mongoose-autoincr","value":{"rev":"3-9c4dd7c3fdcd8621166665a68fccb602"}}, +{"id":"mongoose-closures","key":"mongoose-closures","value":{"rev":"3-2ff9cff790f387f2236a2c7382ebb55b"}}, +{"id":"mongoose-crypt","key":"mongoose-crypt","value":{"rev":"3-d77ffbf250e39fcc290ad37824fe2236"}}, +{"id":"mongoose-dbref","key":"mongoose-dbref","value":{"rev":"29-02090b9904fd6f5ce72afcfa729f7c96"}}, +{"id":"mongoose-flatmatcher","key":"mongoose-flatmatcher","value":{"rev":"5-4f0565901e8b588cc562ae457ad975a6"}}, +{"id":"mongoose-helpers","key":"mongoose-helpers","value":{"rev":"3-3a57e9819e24c9b0f5b5eabe41037092"}}, +{"id":"mongoose-joins","key":"mongoose-joins","value":{"rev":"3-9bae444730a329473421f50cba1c86a7"}}, +{"id":"mongoose-misc","key":"mongoose-misc","value":{"rev":"3-bcd7f3f450cf6ed233d042ac574409ce"}}, +{"id":"mongoose-relationships","key":"mongoose-relationships","value":{"rev":"9-6155a276b162ec6593b8542f0f769024"}}, +{"id":"mongoose-rest","key":"mongoose-rest","value":{"rev":"29-054330c035adf842ab34423215995113"}}, +{"id":"mongoose-spatial","key":"mongoose-spatial","value":{"rev":"3-88660dabd485edcaa29a2ea01afb90bd"}}, +{"id":"mongoose-temporal","key":"mongoose-temporal","value":{"rev":"3-1dd736395fe9be95498e588df502b7bb"}}, +{"id":"mongoose-types","key":"mongoose-types","value":{"rev":"13-8126458b91ef1bf46e582042f5dbd015"}}, +{"id":"mongoose-units","key":"mongoose-units","value":{"rev":"3-5fcdb7aedb1d5cff6e18ee1352c3d0f7"}}, +{"id":"mongoq","key":"mongoq","value":{"rev":"11-2060d674d5f8a964e800ed4470b92587"}}, +{"id":"mongoskin","key":"mongoskin","value":{"rev":"13-5a7bfacd9e9b95ec469f389751e7e435"}}, +{"id":"mongous","key":"mongous","value":{"rev":"3-4d98b4a4bfdd6d9f46342002a69d8d3a"}}, +{"id":"mongrel2","key":"mongrel2","value":{"rev":"3-93156356e478f30fc32455054e384b80"}}, +{"id":"monguava","key":"monguava","value":{"rev":"9-69ec50128220aba3e16128a4be2799c0"}}, +{"id":"mongueue","key":"mongueue","value":{"rev":"9-fc8d9df5bf15f5a25f68cf58866f11fe"}}, +{"id":"moniker","key":"moniker","value":{"rev":"5-a139616b725ddfdd1db6a376fb6584f7"}}, +{"id":"monitor","key":"monitor","value":{"rev":"56-44d2b8b7dec04b3f320f7dc4a1704c53"}}, +{"id":"monome","key":"monome","value":{"rev":"3-2776736715cbfc045bf7b42e70ccda9c"}}, +{"id":"monomi","key":"monomi","value":{"rev":"6-b6b745441f157cc40c846d23cd14297a"}}, +{"id":"moof","key":"moof","value":{"rev":"13-822b4ebf873b720bd4c7e16fcbbbbb3d"}}, +{"id":"moonshado","key":"moonshado","value":{"rev":"3-b54de1aef733c8fa118fa7cf6af2fb9b"}}, +{"id":"moose","key":"moose","value":{"rev":"5-e11c8b7c09826e3431ed3408ee874779"}}, +{"id":"mootools","key":"mootools","value":{"rev":"9-39f5535072748ccd3cf0212ef4c3d4fa"}}, +{"id":"mootools-array","key":"mootools-array","value":{"rev":"3-d1354704a9fe922d969c2bf718e0dc53"}}, +{"id":"mootools-browser","key":"mootools-browser","value":{"rev":"3-ce0946b357b6ddecc128febef2c5d720"}}, +{"id":"mootools-class","key":"mootools-class","value":{"rev":"3-0ea815d28b61f3880087e3f4b8668354"}}, +{"id":"mootools-class-extras","key":"mootools-class-extras","value":{"rev":"3-575796745bd169c35f4fc0019bb36b76"}}, +{"id":"mootools-client","key":"mootools-client","value":{"rev":"3-b658c331f629f80bfe17c3e6ed44c525"}}, +{"id":"mootools-cookie","key":"mootools-cookie","value":{"rev":"3-af93588531e5a52c76a8e7a4eac3612a"}}, +{"id":"mootools-core","key":"mootools-core","value":{"rev":"3-01b1678fc56d94d29566b7853ad56059"}}, +{"id":"mootools-domready","key":"mootools-domready","value":{"rev":"3-0fc6620e2c8f7d107816cace9c099633"}}, +{"id":"mootools-element","key":"mootools-element","value":{"rev":"3-bac857c1701c91207d1ec6d1eb002d07"}}, +{"id":"mootools-element-dimensions","key":"mootools-element-dimensions","value":{"rev":"3-d82df62b3e97122ad0a7668efb7ba776"}}, +{"id":"mootools-element-event","key":"mootools-element-event","value":{"rev":"3-a30380151989ca31851cf751fcd55e9a"}}, +{"id":"mootools-element-style","key":"mootools-element-style","value":{"rev":"3-6103fa8551a21dc592e410dc7df647f8"}}, +{"id":"mootools-event","key":"mootools-event","value":{"rev":"3-7327279ec157de8c47f3ee24615ead95"}}, +{"id":"mootools-function","key":"mootools-function","value":{"rev":"3-eb3ee17acf40d6cc05463cb88edc6f5e"}}, +{"id":"mootools-fx","key":"mootools-fx","value":{"rev":"3-757ab6c8423e8c434d1ee783ea28cdb5"}}, +{"id":"mootools-fx-css","key":"mootools-fx-css","value":{"rev":"3-8eb0cf468c826b9c485835fab94837e7"}}, +{"id":"mootools-fx-morph","key":"mootools-fx-morph","value":{"rev":"3-b91310f8a81221592970fe7632bd9f7a"}}, +{"id":"mootools-fx-transitions","key":"mootools-fx-transitions","value":{"rev":"3-a1ecde35dfbb80f3a6062005758bb934"}}, +{"id":"mootools-fx-tween","key":"mootools-fx-tween","value":{"rev":"3-39497defbffdf463932cc9f00cde8d5d"}}, +{"id":"mootools-json","key":"mootools-json","value":{"rev":"3-69deb6679a5d1d49f22e19834ae07c32"}}, +{"id":"mootools-more","key":"mootools-more","value":{"rev":"3-d8f46ce319ca0e3deb5fc04ad5f73cb9"}}, +{"id":"mootools-number","key":"mootools-number","value":{"rev":"3-9f4494883ac39f93734fea9af6ef2fc5"}}, +{"id":"mootools-object","key":"mootools-object","value":{"rev":"3-c9632dfa793ab4d9ad4b68a2e27f09fc"}}, +{"id":"mootools-request","key":"mootools-request","value":{"rev":"3-663e5472f351eea3b7488ee441bc6a61"}}, +{"id":"mootools-request-html","key":"mootools-request-html","value":{"rev":"3-0ab9576c11a564d44b3c3ca3ef3dc240"}}, +{"id":"mootools-request-json","key":"mootools-request-json","value":{"rev":"3-c0359201c94ba1684ea6336e35cd70c2"}}, +{"id":"mootools-server","key":"mootools-server","value":{"rev":"3-98e89499f6eab137bbab053a3932a526"}}, +{"id":"mootools-slick-finder","key":"mootools-slick-finder","value":{"rev":"3-9a5820e90d6ea2d797268f3c60a9f177"}}, +{"id":"mootools-slick-parser","key":"mootools-slick-parser","value":{"rev":"3-d4e6b1673e6e2a6bcc66bf4988b2994d"}}, +{"id":"mootools-string","key":"mootools-string","value":{"rev":"3-2fda1c7915295df62e547018a7f05916"}}, +{"id":"mootools-swiff","key":"mootools-swiff","value":{"rev":"3-f0edeead85f3d48cf2af2ca35a4e67a5"}}, +{"id":"mootools.js","key":"mootools.js","value":{"rev":"3-085e50e3529d19e1d6ad630027ba51dc"}}, +{"id":"morestreams","key":"morestreams","value":{"rev":"7-3d0145c2cfb9429dfdcfa872998c9fe8"}}, +{"id":"morpheus","key":"morpheus","value":{"rev":"45-04335640f709335d1828523425a87909"}}, +{"id":"morton","key":"morton","value":{"rev":"11-abd787350e21bef65c1c6776e40a0753"}}, +{"id":"mothermayi","key":"mothermayi","value":{"rev":"5-2c46f9873efd19f543def5eeda0a05f1"}}, +{"id":"mountable-proxy","key":"mountable-proxy","value":{"rev":"7-3b91bd0707447885676727ad183bb051"}}, +{"id":"move","key":"move","value":{"rev":"69-ce11c235c78de6d6184a86aaa93769eb"}}, +{"id":"moviesearch","key":"moviesearch","value":{"rev":"3-72e77965a44264dfdd5af23e4a36d2ce"}}, +{"id":"mp","key":"mp","value":{"rev":"3-47899fb2bdaf21dda16abd037b325c3b"}}, +{"id":"mpdsocket","key":"mpdsocket","value":{"rev":"3-2dd4c9bb019f3f491c55364be7a56229"}}, +{"id":"mrcolor","key":"mrcolor","value":{"rev":"3-4695b11798a65c61714b8f236a40936c"}}, +{"id":"msgbus","key":"msgbus","value":{"rev":"27-a5d861b55c933842226d4e536820ec99"}}, +{"id":"msgme","key":"msgme","value":{"rev":"3-d1968af1234a2059eb3d84eb76cdaa4e"}}, +{"id":"msgpack","key":"msgpack","value":{"rev":"9-ecf7469392d87460ddebef2dd369b0e5"}}, +{"id":"msgpack-0.4","key":"msgpack-0.4","value":{"rev":"3-5d509ddba6c53ed6b8dfe4afb1d1661d"}}, +{"id":"msgpack2","key":"msgpack2","value":{"rev":"4-63b8f3ccf35498eb5c8bd9b8d683179b"}}, +{"id":"mu","key":"mu","value":{"rev":"7-7a8ce1cba5d6d98e696c4e633aa081fa"}}, +{"id":"mu2","key":"mu2","value":{"rev":"3-4ade1c5b1496c720312beae1822da9de"}}, +{"id":"mud","key":"mud","value":{"rev":"66-56e1b1a1e5af14c3df0520c58358e7cd"}}, +{"id":"muffin","key":"muffin","value":{"rev":"22-210c45a888fe1f095becdcf11876a2bc"}}, +{"id":"multi-node","key":"multi-node","value":{"rev":"1-224161d875f0e1cbf4b1e249603c670a"}}, +{"id":"multicast-eventemitter","key":"multicast-eventemitter","value":{"rev":"13-ede3e677d6e21bbfe42aad1b549a137c"}}, +{"id":"multimeter","key":"multimeter","value":{"rev":"7-847f45a6f592a8410a77d3e5efb5cbf3"}}, +{"id":"multipart-stack","key":"multipart-stack","value":{"rev":"9-85aaa2ed2180d3124d1dcd346955b672"}}, +{"id":"muse","key":"muse","value":{"rev":"3-d6bbc06df2e359d6ef285f9da2bd0efd"}}, +{"id":"musicmetadata","key":"musicmetadata","value":{"rev":"21-957bf986aa9d0db02175ea1d79293909"}}, +{"id":"mustache","key":"mustache","value":{"rev":"6-7f8458f2b52de5b37004b105c0f39e62"}}, +{"id":"mustachio","key":"mustachio","value":{"rev":"9-6ed3f41613f886128acd18b73b55439f"}}, +{"id":"mutex","key":"mutex","value":{"rev":"3-de95bdff3dd00271361067b5d70ea03b"}}, +{"id":"muzak","key":"muzak","value":{"rev":"9-5ff968ffadebe957b72a8b77b538b71c"}}, +{"id":"mvc","key":"mvc","value":{"rev":"52-7c954b6c3b90b1b734d8e8c3d2d34f5e"}}, +{"id":"mvc.coffee","key":"mvc.coffee","value":{"rev":"3-f203564ed70c0284455e7f96ea61fdb7"}}, +{"id":"mypackage","key":"mypackage","value":{"rev":"3-49cc95fb2e5ac8ee3dbbab1de451c0d1"}}, +{"id":"mypakege","key":"mypakege","value":{"rev":"3-e74d7dc2c2518304ff1700cf295eb823"}}, +{"id":"myrtle-parser","key":"myrtle-parser","value":{"rev":"3-9089c1a2f3c3a24f0bce3941bc1d534d"}}, +{"id":"mysql","key":"mysql","value":{"rev":"30-a8dc68eb056cb6f69fae2423c1337474"}}, +{"id":"mysql-activerecord","key":"mysql-activerecord","value":{"rev":"17-9d21d0b10a5c84f6cacfd8d2236f9887"}}, +{"id":"mysql-client","key":"mysql-client","value":{"rev":"5-cc877218864c319d17f179e49bf58c99"}}, +{"id":"mysql-helper","key":"mysql-helper","value":{"rev":"3-c6f3b9f00cd9fee675aa2a9942cc336a"}}, +{"id":"mysql-libmysqlclient","key":"mysql-libmysqlclient","value":{"rev":"38-51c08e24257b99bf5591232016ada8ab"}}, +{"id":"mysql-native","key":"mysql-native","value":{"rev":"12-0592fbf66c55e6e9db6a75c97be088c3"}}, +{"id":"mysql-native-prerelease","key":"mysql-native-prerelease","value":{"rev":"7-b1a6f3fc41f6c152f3b178e13f91b5c4"}}, +{"id":"mysql-oil","key":"mysql-oil","value":{"rev":"9-70c07b9c552ff592be8ca89ea6efa408"}}, +{"id":"mysql-pool","key":"mysql-pool","value":{"rev":"15-41f510c45174b6c887856120ce3d5a3b"}}, +{"id":"mysql-simple","key":"mysql-simple","value":{"rev":"13-7ee13f035e8ebcbc27f6fe910058aee9"}}, +{"id":"n","key":"n","value":{"rev":"31-bfaed5022beae2177a090c4c8fce82a4"}}, +{"id":"n-ext","key":"n-ext","value":{"rev":"3-5ad67a300f8e88ef1dd58983c9061bc1"}}, +{"id":"n-pubsub","key":"n-pubsub","value":{"rev":"3-af990bcbf9f94554365788b81715d3b4"}}, +{"id":"n-rest","key":"n-rest","value":{"rev":"7-42f1d92f9229f126a1b063ca27bfc85b"}}, +{"id":"n-util","key":"n-util","value":{"rev":"6-d0c59c7412408bc94e20de4d22396d79"}}, +{"id":"nMemcached","key":"nMemcached","value":{"rev":"3-be350fd46624a1cac0052231101e0594"}}, +{"id":"nStoreSession","key":"nStoreSession","value":{"rev":"3-a3452cddd2b9ff8edb6d46999fa5b0eb"}}, +{"id":"nTPL","key":"nTPL","value":{"rev":"41-16a54848286364d894906333b0c1bb2c"}}, +{"id":"nTunes","key":"nTunes","value":{"rev":"18-76bc566a504100507056316fe8d3cc35"}}, +{"id":"nabe","key":"nabe","value":{"rev":"13-dc93f35018e84a23ace4d5114fa1bb28"}}, +{"id":"nack","key":"nack","value":{"rev":"118-f629c8c208c76fa0c2ce66d21f927ee4"}}, +{"id":"nagari","key":"nagari","value":{"rev":"11-cb200690c6d606d8597178e492b54cde"}}, +{"id":"nailplate","key":"nailplate","value":{"rev":"11-e1532c42d9d83fc32942dec0b87df587"}}, +{"id":"nails","key":"nails","value":{"rev":"12-f472bf005c4a4c2b49fb0118b109bef1"}}, +{"id":"nake","key":"nake","value":{"rev":"11-250933df55fbe7bb19e34a84ed23ca3e"}}, +{"id":"named-routes","key":"named-routes","value":{"rev":"6-ffbdd4caa74a30e87aa6dbb36f2b967c"}}, +{"id":"namespace","key":"namespace","value":{"rev":"7-89e2850e14206af13f26441e75289878"}}, +{"id":"namespaces","key":"namespaces","value":{"rev":"11-7a9b3d2537438211021a472035109f3c"}}, +{"id":"nami","key":"nami","value":{"rev":"29-3d44b1338222a4d994d4030868a94ea8"}}, +{"id":"nano","key":"nano","value":{"rev":"105-50efc49a8f6424706af554872002c014"}}, +{"id":"nanostate","key":"nanostate","value":{"rev":"9-1664d985e8cdbf16e150ba6ba4d79ae5"}}, +{"id":"narcissus","key":"narcissus","value":{"rev":"3-46581eeceff566bd191a14dec7b337f6"}}, +{"id":"nariya","key":"nariya","value":{"rev":"13-d83b8b6162397b154a4b59553be225e9"}}, +{"id":"narrativ","key":"narrativ","value":{"rev":"9-ef215eff6bf222425f73d23e507f7ff3"}}, +{"id":"narrow","key":"narrow","value":{"rev":"5-c6963048ba02adaf819dc51815fa0015"}}, +{"id":"narwhal","key":"narwhal","value":{"rev":"6-13bf3f87e6cfb1e57662cc3e3be450fc"}}, +{"id":"narwhal-lib","key":"narwhal-lib","value":{"rev":"6-4722d9b35fed59a2e8f7345a1eb6769d"}}, +{"id":"nat","key":"nat","value":{"rev":"3-da0906c08792043546f98ace8ce59a78"}}, +{"id":"native2ascii","key":"native2ascii","value":{"rev":"3-9afd51209d67303a8ee807ff862e31fc"}}, +{"id":"nativeUtil","key":"nativeUtil","value":{"rev":"7-6e3e9757b436ebcee35a20e633c08d60"}}, +{"id":"natives","key":"natives","value":{"rev":"24-6c4269c9c7cfb52571bd2c94fa26efc6"}}, +{"id":"natural","key":"natural","value":{"rev":"110-fc92701ad8525f45fbdb5863959ca03c"}}, +{"id":"naturalsort","key":"naturalsort","value":{"rev":"3-4321f5e432aee224af0fee9e4fb901ff"}}, +{"id":"nave","key":"nave","value":{"rev":"29-79baa66065fa9075764cc3e5da2edaef"}}, +{"id":"navigator","key":"navigator","value":{"rev":"3-f2f4f5376afb10753006f40bd49689c3"}}, +{"id":"nbs-api","key":"nbs-api","value":{"rev":"3-94949b1f0797369abc0752482268ef08"}}, +{"id":"nbt","key":"nbt","value":{"rev":"3-b711b9db76f64449df7f43c659ad8e7f"}}, +{"id":"nclosure","key":"nclosure","value":{"rev":"9-042b39740a39f0556d0dc2c0990b7fa8"}}, +{"id":"nclosureultimate","key":"nclosureultimate","value":{"rev":"3-61ff4bc480239304c459374c9a5f5754"}}, +{"id":"nconf","key":"nconf","value":{"rev":"65-8d8c0d2c6d5d9d526b8a3f325f68eca1"}}, +{"id":"nconf-redis","key":"nconf-redis","value":{"rev":"5-21ae138633b20cb29ed49b9fcd425e10"}}, +{"id":"ncp","key":"ncp","value":{"rev":"23-6441091c6c27ecb5b99f5781299a2192"}}, +{"id":"ncss","key":"ncss","value":{"rev":"9-1d2330e0fdbc40f0810747c2b156ecf2"}}, +{"id":"ncurses","key":"ncurses","value":{"rev":"12-bb059ea6fee12ca77f1fbb7bb6dd9447"}}, +{"id":"ndb","key":"ndb","value":{"rev":"15-b3e826f68a57095413666e9fe74589da"}}, +{"id":"ndistro","key":"ndistro","value":{"rev":"3-fcda3c018d11000b2903ad7104b60b35"}}, +{"id":"ndns","key":"ndns","value":{"rev":"5-1aeaaca119be44af7a83207d76f263fc"}}, +{"id":"nebulog","key":"nebulog","value":{"rev":"3-1863b0ce17cc0f07a50532a830194254"}}, +{"id":"neco","key":"neco","value":{"rev":"43-e830913302b52012ab63177ecf292822"}}, +{"id":"ned","key":"ned","value":{"rev":"15-4230c69fb52dfddfd65526dcfe5c4ec6"}}, +{"id":"nedis","key":"nedis","value":{"rev":"7-d49e329dca586d1a3569266f0595c9ad"}}, +{"id":"neko","key":"neko","value":{"rev":"60-13aa87d2278c3a734733cff2a34a7970"}}, +{"id":"neo4j","key":"neo4j","value":{"rev":"7-dde7066eac32a405df95ccf9c50c8ae7"}}, +{"id":"nerve","key":"nerve","value":{"rev":"3-2c47b79586d7930aabf9325ca88ad7e8"}}, +{"id":"nest","key":"nest","value":{"rev":"23-560d67971e9acddacf087608306def24"}}, +{"id":"nestableflow","key":"nestableflow","value":{"rev":"5-ee8af667a84d333fcc8092c89f4189c3"}}, +{"id":"nestor","key":"nestor","value":{"rev":"3-f1affbc37be3bf4e337365bd172578dc"}}, +{"id":"net","key":"net","value":{"rev":"3-895103ee532ef31396d9c06764df1ed8"}}, +{"id":"netiface","key":"netiface","value":{"rev":"3-885c94284fd3a9601afe291ab68aca84"}}, +{"id":"netpool","key":"netpool","value":{"rev":"3-dadfd09b9eb7ef73e2bff34a381de207"}}, +{"id":"netstring","key":"netstring","value":{"rev":"9-d26e7bf4a3ce5eb91bb1889d362f71e6"}}, +{"id":"neuron","key":"neuron","value":{"rev":"11-edaed50492368ff39eaf7d2004d7f4d8"}}, +{"id":"new","key":"new","value":{"rev":"3-7789b37104d8161b7ccf898a9cda1fc6"}}, +{"id":"newforms","key":"newforms","value":{"rev":"9-2a87cb74477d210fcb1d0c3e3e236f03"}}, +{"id":"nexpect","key":"nexpect","value":{"rev":"15-e7127f41b9f3ec45185ede7bab7b4acd"}}, +{"id":"next","key":"next","value":{"rev":"13-de5e62125b72e48ea142a55a3817589c"}}, +{"id":"nextrip","key":"nextrip","value":{"rev":"5-1ac8103552967af98d3de452ef81a94f"}}, +{"id":"nexttick","key":"nexttick","value":{"rev":"9-c7ec279e713ea8483d33c31871aea0db"}}, +{"id":"ngen","key":"ngen","value":{"rev":"9-972980a439c34851d67e4f61a96c2632"}}, +{"id":"ngen-basicexample","key":"ngen-basicexample","value":{"rev":"3-897763c230081d320586bcadfa84499f"}}, +{"id":"ngeohash","key":"ngeohash","value":{"rev":"5-9ca0c06066bc798e934db35cad99453e"}}, +{"id":"ngist","key":"ngist","value":{"rev":"7-592c24e72708219ed1eb078ddff95ab6"}}, +{"id":"ngram","key":"ngram","value":{"rev":"5-00e6b24dc178bdeb49b1ac8cb09f6e77"}}, +{"id":"ngrep","key":"ngrep","value":{"rev":"3-49c1a3839b12083280475177c1a16e38"}}, +{"id":"nhp-body-restreamer","key":"nhp-body-restreamer","value":{"rev":"1-8a4e5e23ae681a3f8be9afb613648230"}}, +{"id":"nhttpd","key":"nhttpd","value":{"rev":"3-cdc73384e1a1a4666e813ff52f2f5e4f"}}, +{"id":"nib","key":"nib","value":{"rev":"25-d67d5a294ba5b8953472cf936b97e13d"}}, +{"id":"nicetime","key":"nicetime","value":{"rev":"3-39fdba269d712064dc1e02a7ab846821"}}, +{"id":"nicknack","key":"nicknack","value":{"rev":"5-7b5477b63f782d0a510b0c15d2824f20"}}, +{"id":"nide","key":"nide","value":{"rev":"9-74f642fced47c934f9bae29f04d17a46"}}, +{"id":"nih-op","key":"nih-op","value":{"rev":"3-6e649b45964f84cb04340ab7f0a36a1c"}}, +{"id":"nimble","key":"nimble","value":{"rev":"5-867b808dd80eab33e5f22f55bb5a7376"}}, +{"id":"ninjs","key":"ninjs","value":{"rev":"3-f59997cc4bacb2d9d9852f955d15199e"}}, +{"id":"ninotify","key":"ninotify","value":{"rev":"3-a0f3c7cbbe7ccf5d547551aa062cc8b5"}}, +{"id":"nirc","key":"nirc","value":{"rev":"3-28197984656939a5a93a77c0a1605406"}}, +{"id":"nithub","key":"nithub","value":{"rev":"3-eaa85e6ac6668a304e4e4a565c54f57d"}}, +{"id":"nix","key":"nix","value":{"rev":"12-7b338b03c0e110aeb348551b14796ff1"}}, +{"id":"nko","key":"nko","value":{"rev":"39-2bf94b2bc279b8cf847bfc7668029d37"}}, +{"id":"nlog","key":"nlog","value":{"rev":"3-ae469820484ca33f346001dcb7b63a2d"}}, +{"id":"nlog4js","key":"nlog4js","value":{"rev":"3-bc17a61a9023d64e192d249144e69f02"}}, +{"id":"nlogger","key":"nlogger","value":{"rev":"11-1e48fc9a5a4214d9e56db6c6b63f1eeb"}}, +{"id":"nmd","key":"nmd","value":{"rev":"27-2dcb60d0258a9cea838f7cc4e0922f90"}}, +{"id":"nntp","key":"nntp","value":{"rev":"5-c86b189e366b9a6a428f9a2ee88dccf1"}}, +{"id":"no.de","key":"no.de","value":{"rev":"10-0dc855fd6b0b36a710b473b2720b22c0"}}, +{"id":"nobj","key":"nobj","value":{"rev":"3-0b4a46b91b70117306a9888202117223"}}, +{"id":"noblemachine","key":"noblemachine","value":{"rev":"3-06fec410fe0c7328e06eec50b4fa5d9a"}}, +{"id":"noblerecord","key":"noblerecord","value":{"rev":"5-22f24c4285bd405785588480bb2bc324"}}, +{"id":"nock","key":"nock","value":{"rev":"5-f94423d37dbdf41001ec097f20635271"}}, +{"id":"nocr-mongo","key":"nocr-mongo","value":{"rev":"5-ce6335ed276187cc38c30cb5872d3d83"}}, +{"id":"nodast","key":"nodast","value":{"rev":"3-1c563107f2d77b79a8f0d0b8ba7041f5"}}, +{"id":"node-api","key":"node-api","value":{"rev":"3-b69cefec93d9f73256acf9fb9edeebd6"}}, +{"id":"node-apidoc","key":"node-apidoc","value":{"rev":"6-cd26945e959403fcbee8ba542e14e667"}}, +{"id":"node-app-reloader","key":"node-app-reloader","value":{"rev":"5-e08cac7656afd6c124f8e2a9b9d6fdd3"}}, +{"id":"node-arse","key":"node-arse","value":{"rev":"9-b643c828541739a5fa972c801f81b212"}}, +{"id":"node-assert-extras","key":"node-assert-extras","value":{"rev":"3-3498e17b996ffc42a29d46c9699a3b52"}}, +{"id":"node-assert-lint-free","key":"node-assert-lint-free","value":{"rev":"5-852130ba6bafc703657b833343bc5646"}}, +{"id":"node-asset","key":"node-asset","value":{"rev":"18-f7cf59be8e0d015a43d05807a1ed9c0c"}}, +{"id":"node-awesm","key":"node-awesm","value":{"rev":"3-539c10145541ac5efc4dd295767b2abc"}}, +{"id":"node-backbone-couch","key":"node-backbone-couch","value":{"rev":"19-c4d8e93436b60e098c81cc0fe50f960c"}}, +{"id":"node-base64","key":"node-base64","value":{"rev":"11-da10a7157fd9e139b48bc8d9e44a98fa"}}, +{"id":"node-bj","key":"node-bj","value":{"rev":"3-5cd21fa259199870d1917574cd167396"}}, +{"id":"node-bosh-stress-tool","key":"node-bosh-stress-tool","value":{"rev":"3-36afc4b47e570964b7f8d705e1d47732"}}, +{"id":"node-brainfuck","key":"node-brainfuck","value":{"rev":"5-c7a6f703a97a409670005cab52664629"}}, +{"id":"node-build","key":"node-build","value":{"rev":"10-4f2f137fb4ef032f9dca3e3c64c15270"}}, +{"id":"node-casa","key":"node-casa","value":{"rev":"3-3f80a478aa47620bfc0c64cc6f140d98"}}, +{"id":"node-ccl","key":"node-ccl","value":{"rev":"13-00498b820cc4cadce8cc5b7b76e30b0f"}}, +{"id":"node-chain","key":"node-chain","value":{"rev":"6-b543f421ac63eeedc667b3395e7b8971"}}, +{"id":"node-child-process-manager","key":"node-child-process-manager","value":{"rev":"36-befb1a0eeac02ad400e2aaa8a076a053"}}, +{"id":"node-chirpstream","key":"node-chirpstream","value":{"rev":"10-f20e404f9ae5d43dfb6bcee15bd9affe"}}, +{"id":"node-clone","key":"node-clone","value":{"rev":"5-5ace5d51179d0e642bf9085b3bbf999b"}}, +{"id":"node-cloudwatch","key":"node-cloudwatch","value":{"rev":"3-7f9d1e075fcc3bd3e7849acd893371d5"}}, +{"id":"node-combine","key":"node-combine","value":{"rev":"3-51891c3c7769ff11a243c89c7e537907"}}, +{"id":"node-compat","key":"node-compat","value":{"rev":"9-24fce8e15eed3e193832b1c93a482d15"}}, +{"id":"node-config","key":"node-config","value":{"rev":"6-8821f6b46347e57258e62e1be841c186"}}, +{"id":"node-crocodoc","key":"node-crocodoc","value":{"rev":"5-ad4436f633f37fe3248dce93777fc26e"}}, +{"id":"node-csv","key":"node-csv","value":{"rev":"10-cd15d347b595f1d9d1fd30b483c52724"}}, +{"id":"node-date","key":"node-date","value":{"rev":"3-a5b41cab3247e12f2beaf1e0b1ffadfa"}}, +{"id":"node-dbi","key":"node-dbi","value":{"rev":"27-96e1df6fdefbae77bfa02eda64c3e3b9"}}, +{"id":"node-debug-proxy","key":"node-debug-proxy","value":{"rev":"9-c00a14832cdd5ee4d489eb41a3d0d621"}}, +{"id":"node-dep","key":"node-dep","value":{"rev":"15-378dedd3f0b3e54329c00c675b19401c"}}, +{"id":"node-dev","key":"node-dev","value":{"rev":"48-6a98f38078fe5678d6c2fb48aec3c1c3"}}, +{"id":"node-downloader","key":"node-downloader","value":{"rev":"3-a541126c56c48681571e5e998c481343"}}, +{"id":"node-evented","key":"node-evented","value":{"rev":"6-a6ce8ab39e01cc0262c80d4bf08fc333"}}, +{"id":"node-exception-notifier","key":"node-exception-notifier","value":{"rev":"3-cebc02c45dace4852f8032adaa4e3c9c"}}, +{"id":"node-expat","key":"node-expat","value":{"rev":"33-261d85273a0a551e7815f835a933d5eb"}}, +{"id":"node-expect","key":"node-expect","value":{"rev":"7-5ba4539adfd3ba95dab21bb5bc0a5193"}}, +{"id":"node-express-boilerplate","key":"node-express-boilerplate","value":{"rev":"3-972f51d1ff9493e48d7cf508461f1114"}}, +{"id":"node-extjs","key":"node-extjs","value":{"rev":"7-33143616b4590523b4e1549dd8ffa991"}}, +{"id":"node-extjs4","key":"node-extjs4","value":{"rev":"3-8e5033aed477629a6fb9812466a90cfd"}}, +{"id":"node-fakeweb","key":"node-fakeweb","value":{"rev":"5-f01377fa6d03461cbe77f41b73577cf4"}}, +{"id":"node-fb","key":"node-fb","value":{"rev":"3-bc5f301a60e475de7c614837d3f9f35a"}}, +{"id":"node-fb-signed-request","key":"node-fb-signed-request","value":{"rev":"3-33c8f043bb947b63a84089d633d68f8e"}}, +{"id":"node-fects","key":"node-fects","value":{"rev":"3-151b7b895b74b24a87792fac34735814"}}, +{"id":"node-ffi","key":"node-ffi","value":{"rev":"22-25cf229f0ad4102333b2b13e03054ac5"}}, +{"id":"node-filter","key":"node-filter","value":{"rev":"3-0e6a86b4abb65df3594e5c93ab04bd31"}}, +{"id":"node-foursquare","key":"node-foursquare","value":{"rev":"25-549bbb0c2b4f96b2c5e6a5f642e8481d"}}, +{"id":"node-fs","key":"node-fs","value":{"rev":"5-14050cbc3887141f6b0e1e7d62736a63"}}, +{"id":"node-fs-synchronize","key":"node-fs-synchronize","value":{"rev":"11-6341e79f3391a9e1daa651a5932c8795"}}, +{"id":"node-gd","key":"node-gd","value":{"rev":"11-2ede7f4af38f062b86cc32bb0125e1bf"}}, +{"id":"node-geocode","key":"node-geocode","value":{"rev":"6-505af45c7ce679ac6738b495cc6b03c2"}}, +{"id":"node-get","key":"node-get","value":{"rev":"9-906945005a594ea1f05d4ad23170a83f"}}, +{"id":"node-gettext","key":"node-gettext","value":{"rev":"5-532ea4b528108b4c8387ddfc8fa690b2"}}, +{"id":"node-gist","key":"node-gist","value":{"rev":"11-3495a499c9496d01235676f429660424"}}, +{"id":"node-glbse","key":"node-glbse","value":{"rev":"5-69a537189610c69cc549f415431b181a"}}, +{"id":"node-google-sql","key":"node-google-sql","value":{"rev":"7-bfe20d25a4423651ecdff3f5054a6946"}}, +{"id":"node-gravatar","key":"node-gravatar","value":{"rev":"6-8265fc1ad003fd8a7383244c92abb346"}}, +{"id":"node-handlersocket","key":"node-handlersocket","value":{"rev":"16-f1dc0246559748a842dd0e1919c569ae"}}, +{"id":"node-hdfs","key":"node-hdfs","value":{"rev":"3-d460fba8ff515660de34cb216223c569"}}, +{"id":"node-hipchat","key":"node-hipchat","value":{"rev":"3-9d16738bf70f9e37565727e671ffe551"}}, +{"id":"node-hive","key":"node-hive","value":{"rev":"31-5eef1fa77a39e4bdacd8fa85ec2ce698"}}, +{"id":"node-html-encoder","key":"node-html-encoder","value":{"rev":"3-75f92e741a3b15eb56e3c4513feaca6d"}}, +{"id":"node-i3","key":"node-i3","value":{"rev":"3-5c489f43aeb06054b02ad3706183599c"}}, +{"id":"node-indextank","key":"node-indextank","value":{"rev":"5-235a17fce46c73c8b5abc4cf5f964385"}}, +{"id":"node-inherit","key":"node-inherit","value":{"rev":"3-099c0acf9c889eea94faaf64067bfc52"}}, +{"id":"node-inspector","key":"node-inspector","value":{"rev":"34-ca9fa856cf32a737d1ecccb759aaf5e1"}}, +{"id":"node-int64","key":"node-int64","value":{"rev":"11-50b92b5b65adf17e673b4d15df643ed4"}}, +{"id":"node-ip-lib","key":"node-ip-lib","value":{"rev":"3-2fe72f7b78cbc1739c71c7cfaec9fbcd"}}, +{"id":"node-iplookup","key":"node-iplookup","value":{"rev":"10-ba8474624dd852a46303d32ff0556883"}}, +{"id":"node-jdownloader","key":"node-jdownloader","value":{"rev":"3-b015035cfb8540568da5deb55b35248c"}}, +{"id":"node-jslint-all","key":"node-jslint-all","value":{"rev":"5-582f4a31160d3700731fa39771702896"}}, +{"id":"node-jsonengine","key":"node-jsonengine","value":{"rev":"3-6e429c32e42b205f3ed1ea1f48d67cbc"}}, +{"id":"node-khtml","key":"node-khtml","value":{"rev":"39-db8e8eea569657fc7de6300172a6a8a7"}}, +{"id":"node-linkshare","key":"node-linkshare","value":{"rev":"35-acc18a5d584b828bb2bd4f32bbcde98c"}}, +{"id":"node-log","key":"node-log","value":{"rev":"17-79cecc66227b4fb3a2ae04b7dac17cc2"}}, +{"id":"node-logentries","key":"node-logentries","value":{"rev":"3-0f640d5ff489a6904f4a8c18fb5f7e9c"}}, +{"id":"node-logger","key":"node-logger","value":{"rev":"3-75084f98359586bdd254e57ea5915d37"}}, +{"id":"node-logging","key":"node-logging","value":{"rev":"15-af01bc2b6128150787c85c8df1dae642"}}, +{"id":"node-mailer","key":"node-mailer","value":{"rev":"5-5b88675f05efe2836126336c880bd841"}}, +{"id":"node-mailgun","key":"node-mailgun","value":{"rev":"5-4bcfb7bf5163748b87c1b9ed429ed178"}}, +{"id":"node-markdown","key":"node-markdown","value":{"rev":"6-67137da4014f22f656aaefd9dfa2801b"}}, +{"id":"node-mdbm","key":"node-mdbm","value":{"rev":"22-3006800b042cf7d4b0b391c278405143"}}, +{"id":"node-minify","key":"node-minify","value":{"rev":"13-e853813d4b6519b168965979b8ccccdd"}}, +{"id":"node-mug","key":"node-mug","value":{"rev":"3-f7567ffac536bfa7eb5a7e3da7a0efa0"}}, +{"id":"node-mvc","key":"node-mvc","value":{"rev":"3-74f7c07b2991fcddb27afd2889b6db4e"}}, +{"id":"node-mwire","key":"node-mwire","value":{"rev":"26-79d7982748f42b9e07ab293447b167ec"}}, +{"id":"node-mynix-feed","key":"node-mynix-feed","value":{"rev":"3-59d4a624b3831bbab6ee99be2f84e568"}}, +{"id":"node-nether","key":"node-nether","value":{"rev":"3-0fbefe710fe0d74262bfa25f6b4e1baf"}}, +{"id":"node-nude","key":"node-nude","value":{"rev":"3-600abb219646299ac602fa51fa260f37"}}, +{"id":"node-nxt","key":"node-nxt","value":{"rev":"3-8ce48601c2b0164e2b125259a0c97d45"}}, +{"id":"node-oauth","key":"node-oauth","value":{"rev":"3-aa6cd61f44d74118bafa5408900c4984"}}, +{"id":"node-opencalais","key":"node-opencalais","value":{"rev":"13-a3c0b882aca7207ce36f107e40a0ce50"}}, +{"id":"node-props","key":"node-props","value":{"rev":"7-e400cee08cc9abdc1f1ce4f262a04b05"}}, +{"id":"node-proxy","key":"node-proxy","value":{"rev":"20-ce722bf45c84a7d925b8b7433e786ed6"}}, +{"id":"node-pusher","key":"node-pusher","value":{"rev":"3-7cc7cd5bffaf3b11c44438611beeba98"}}, +{"id":"node-putio","key":"node-putio","value":{"rev":"3-8a1fc6362fdcf16217cdb6846e419b4c"}}, +{"id":"node-raphael","key":"node-raphael","value":{"rev":"25-e419d98a12ace18a40d94a9e8e32cdd4"}}, +{"id":"node-rapleaf","key":"node-rapleaf","value":{"rev":"11-c849c8c8635e4eb2f81bd7810b7693fd"}}, +{"id":"node-rats","key":"node-rats","value":{"rev":"3-dca544587f3121148fe02410032cf726"}}, +{"id":"node-rdf2json","key":"node-rdf2json","value":{"rev":"3-bde382dc2fcb40986c5ac41643d44543"}}, +{"id":"node-recurly","key":"node-recurly","value":{"rev":"11-79cab9ccee7c1ddb83791e8de41c72f5"}}, +{"id":"node-redis","key":"node-redis","value":{"rev":"13-12adf3a3e986675637fa47b176f527e3"}}, +{"id":"node-redis-mapper","key":"node-redis-mapper","value":{"rev":"5-53ba8f67cc82dbf1d127fc7359353f32"}}, +{"id":"node-redis-monitor","key":"node-redis-monitor","value":{"rev":"3-79bcba76241d7c7dbc4b18d90a9d59e3"}}, +{"id":"node-restclient","key":"node-restclient","value":{"rev":"6-5844eba19bc465a8f75b6e94c061350f"}}, +{"id":"node-restclient2","key":"node-restclient2","value":{"rev":"5-950de911f7bde7900dfe5b324f49818c"}}, +{"id":"node-runner","key":"node-runner","value":{"rev":"3-e9a9e6bd10d2ab1aed8b401b04fadc7b"}}, +{"id":"node-sc-setup","key":"node-sc-setup","value":{"rev":"3-e89c496e03c48d8574ccaf61c9ed4fca"}}, +{"id":"node-schedule","key":"node-schedule","value":{"rev":"9-ae12fa59226f1c9b7257b8a2d71373b4"}}, +{"id":"node-sdlmixer","key":"node-sdlmixer","value":{"rev":"8-489d85278d6564b6a4e94990edcb0527"}}, +{"id":"node-secure","key":"node-secure","value":{"rev":"3-73673522a4bb5f853d55e535f0934803"}}, +{"id":"node-sendgrid","key":"node-sendgrid","value":{"rev":"9-4662c31304ca4ee4e702bd3a54ea7824"}}, +{"id":"node-sizzle","key":"node-sizzle","value":{"rev":"6-c08c24d9d769d3716e5c4e3441740eb2"}}, +{"id":"node-soap-client","key":"node-soap-client","value":{"rev":"9-35ff34a4a5af569de6a2e89d1b35b69a"}}, +{"id":"node-spec","key":"node-spec","value":{"rev":"9-92e99ca74b9a09a8ae2eb7382ef511ef"}}, +{"id":"node-static","key":"node-static","value":{"rev":"10-11b0480fcd416db3d3d4041f43a55290"}}, +{"id":"node-static-maccman","key":"node-static-maccman","value":{"rev":"3-49e256728b14c85776b74f2bd912eb42"}}, +{"id":"node-statsd","key":"node-statsd","value":{"rev":"5-08d3e6b4b2ed1d0b7916e9952f55573c"}}, +{"id":"node-statsd-instrument","key":"node-statsd-instrument","value":{"rev":"3-c3cd3315e1edcc91096830392f439305"}}, +{"id":"node-std","key":"node-std","value":{"rev":"3-f99be0f03be4175d546823799bb590d3"}}, +{"id":"node-store","key":"node-store","value":{"rev":"3-7cb6bf13de9550b869c768f464fd0f65"}}, +{"id":"node-stringprep","key":"node-stringprep","value":{"rev":"13-9b08baa97042f71c5c8e9e2fdcc2c300"}}, +{"id":"node-synapse","key":"node-synapse","value":{"rev":"3-c46c47099eb2792f4a57fdfd789520ca"}}, +{"id":"node-syslog","key":"node-syslog","value":{"rev":"23-34f7df06ba88d9f897b7e00404db7187"}}, +{"id":"node-t","key":"node-t","value":{"rev":"3-042225eff3208ba9add61a9f79d90871"}}, +{"id":"node-taobao","key":"node-taobao","value":{"rev":"7-c988ace74806b2e2f55e162f54ba1a2c"}}, +{"id":"node-term-ui","key":"node-term-ui","value":{"rev":"5-210310014b19ce26c5e3e840a8a0549e"}}, +{"id":"node-tiny","key":"node-tiny","value":{"rev":"7-df05ab471f25ca4532d80c83106944d7"}}, +{"id":"node-tmpl","key":"node-tmpl","value":{"rev":"3-6fcfa960da8eb72a5e3087559d3fe206"}}, +{"id":"node-twilio","key":"node-twilio","value":{"rev":"11-af69e600109d38c77eadbcec4bee4782"}}, +{"id":"node-twitter-mailer","key":"node-twitter-mailer","value":{"rev":"7-f915b76d834cb162c91816abc30cee5f"}}, +{"id":"node-usb","key":"node-usb","value":{"rev":"3-0c3837307f86a80427800f1b45aa5862"}}, +{"id":"node-uuid","key":"node-uuid","value":{"rev":"6-642efa619ad8a6476a44a5c6158e7a36"}}, +{"id":"node-vapor.js","key":"node-vapor.js","value":{"rev":"3-d293284cc415b2906533e91db13ee748"}}, +{"id":"node-version","key":"node-version","value":{"rev":"3-433b1529a6aa3d619314e461e978d2b6"}}, +{"id":"node-webapp","key":"node-webapp","value":{"rev":"11-65411bfd8eaf19d3539238360d904d43"}}, +{"id":"node-wiki","key":"node-wiki","value":{"rev":"5-22b0177c9a5e4dc1f72d36bb83c746d0"}}, +{"id":"node-wkhtml","key":"node-wkhtml","value":{"rev":"5-a8fa203720442b443d558670c9750548"}}, +{"id":"node-xerces","key":"node-xerces","value":{"rev":"3-de6d82ec712af997b7aae451277667f0"}}, +{"id":"node-xml","key":"node-xml","value":{"rev":"3-e14a52dcd04302aea7dd6943cf6dd886"}}, +{"id":"node-xmpp","key":"node-xmpp","value":{"rev":"36-031eb5e830ed2e2027ee4ee7f861cf81"}}, +{"id":"node-xmpp-bosh","key":"node-xmpp-bosh","value":{"rev":"85-f7f8b699b6fda74fc27c621466915bd1"}}, +{"id":"node-xmpp-via-bosh","key":"node-xmpp-via-bosh","value":{"rev":"3-5f5fee9e42ae8ce8f42d55c31808c969"}}, +{"id":"node.io","key":"node.io","value":{"rev":"224-e99561d454a7676d10875e1b06ba44c7"}}, +{"id":"node.io-min","key":"node.io-min","value":{"rev":"3-e8389bdcfa55c68ae9698794d9089ce4"}}, +{"id":"node.isbn","key":"node.isbn","value":{"rev":"3-76aa84f3c49a54b6c901f440af35192d"}}, +{"id":"node.uptime","key":"node.uptime","value":{"rev":"5-cfc2c1c1460d000eab4e1a28506e6d29"}}, +{"id":"node3p","key":"node3p","value":{"rev":"14-b1931b8aa96227854d78965cc4301168"}}, +{"id":"node3p-web","key":"node3p-web","value":{"rev":"12-bc783ee1e493e80b7e7a3c2fce39f55e"}}, +{"id":"nodeBase","key":"nodeBase","value":{"rev":"39-4d9ae0f18e0bca7192901422d85e85c7"}}, +{"id":"nodeCgi","key":"nodeCgi","value":{"rev":"9-bb65e71ee63551e519f49434f2ae1cd7"}}, +{"id":"nodeDocs","key":"nodeDocs","value":{"rev":"3-0c6e714d3e6d5c2cc9482444680fb3ca"}}, +{"id":"nodePhpSessions","key":"nodePhpSessions","value":{"rev":"3-5063b38582deaca9cacdc029db97c2b1"}}, +{"id":"node_bsdiff","key":"node_bsdiff","value":{"rev":"5-e244ef36755a2b6534ce50fa1ee5ee6e"}}, +{"id":"node_hash","key":"node_hash","value":{"rev":"3-cdce2fcc2c18fcd25e16be8e52add891"}}, +{"id":"node_util","key":"node_util","value":{"rev":"3-cde723ee2311cf48f7cf0a3bc3484f9a"}}, +{"id":"node_xslt","key":"node_xslt","value":{"rev":"3-f12035155aee31d1749204fdca2aee10"}}, +{"id":"nodec","key":"nodec","value":{"rev":"3-dba2af2d5b98a71964abb4328512b9e1"}}, +{"id":"nodefm","key":"nodefm","value":{"rev":"3-c652a95d30318a371736515feab649f9"}}, +{"id":"nodegit","key":"nodegit","value":{"rev":"31-92a2cea0d1c92086c920bc007f5a3f16"}}, +{"id":"nodeib","key":"nodeib","value":{"rev":"3-e67d779007817597ca36e8b821f38e6a"}}, +{"id":"nodeinfo","key":"nodeinfo","value":{"rev":"53-61bf0f48662dc2e04cde38a2b897c211"}}, +{"id":"nodejitsu-client","key":"nodejitsu-client","value":{"rev":"3-4fa613f888ebe249aff7b03aa9b8d7ef"}}, +{"id":"nodejs-intro","key":"nodejs-intro","value":{"rev":"4-c75f03e80b597f734f4466e62ecebfeb"}}, +{"id":"nodejs-tvrage","key":"nodejs-tvrage","value":{"rev":"9-88bb3b5d23652ebdb7186a30bc3be43f"}}, +{"id":"nodejs.be-cli","key":"nodejs.be-cli","value":{"rev":"3-d8f23777f9b18101f2d2dc5aa618a703"}}, +{"id":"nodeler","key":"nodeler","value":{"rev":"9-00760d261ea75164a5709109011afb25"}}, +{"id":"nodelint","key":"nodelint","value":{"rev":"8-31502553d4bb099ba519fb331cccdd63"}}, +{"id":"nodeload","key":"nodeload","value":{"rev":"12-f02626475b59ebe67a864a114c99ff9b"}}, +{"id":"nodemachine","key":"nodemachine","value":{"rev":"8-5342324502e677e35aefef17dc08c8db"}}, +{"id":"nodemailer","key":"nodemailer","value":{"rev":"63-d39a5143b06fa79edcb81252d6329861"}}, +{"id":"nodemock","key":"nodemock","value":{"rev":"33-7095334209b39c8e1482374bee1b712a"}}, +{"id":"nodemon","key":"nodemon","value":{"rev":"42-4f40ba2299ef4ae613a384a48e4045fa"}}, +{"id":"nodepad","key":"nodepad","value":{"rev":"5-93718cc67e97c89f45b753c1caef07e4"}}, +{"id":"nodepal","key":"nodepal","value":{"rev":"5-e53372a5081b3753993ee98299ecd550"}}, +{"id":"nodepie","key":"nodepie","value":{"rev":"21-a44a6d3575758ed591e13831a5420758"}}, +{"id":"nodepress","key":"nodepress","value":{"rev":"3-f17616b9ae61e15d1d219cb87ac5a63a"}}, +{"id":"noderelict","key":"noderelict","value":{"rev":"23-0ca0997e3ef112e9393ae8ccef63f1ee"}}, +{"id":"noderpc","key":"noderpc","value":{"rev":"27-7efb6365916b403c3aa4e1c766de75a2"}}, +{"id":"nodespec","key":"nodespec","value":{"rev":"3-69f357577e52e9fd096ac88a1e7e3445"}}, +{"id":"nodespy","key":"nodespy","value":{"rev":"3-ad33e14db2bcaf61bf99d3e8915da5ee"}}, +{"id":"nodestalker","key":"nodestalker","value":{"rev":"5-080eba88a3625ecf7935ec5e9d2db6e9"}}, +{"id":"nodester-api","key":"nodester-api","value":{"rev":"39-52046dbcdf4447bbb85aecc92086ae1d"}}, +{"id":"nodester-cli","key":"nodester-cli","value":{"rev":"89-6de3d724a974c1dd3b632417f8b01267"}}, +{"id":"nodetk","key":"nodetk","value":{"rev":"11-265d267335e7603249e1af9441700f2f"}}, +{"id":"nodeunit","key":"nodeunit","value":{"rev":"40-d1cc6c06f878fb0b86779186314bc193"}}, +{"id":"nodeunit-coverage","key":"nodeunit-coverage","value":{"rev":"3-29853918351e75e3f6f93acd97e2942f"}}, +{"id":"nodeunit-dsl","key":"nodeunit-dsl","value":{"rev":"6-91be44077bc80c942f86f0ac28a69c5e"}}, +{"id":"nodevlc","key":"nodevlc","value":{"rev":"3-e151577d3e1ba2f58db465d94ebcb1c1"}}, +{"id":"nodevore","key":"nodevore","value":{"rev":"3-ac73b3bc33e2f934776dda359869ddcf"}}, +{"id":"nodewatch","key":"nodewatch","value":{"rev":"9-267bfe1324c51993865dc41b09aee6dc"}}, +{"id":"nodewii","key":"nodewii","value":{"rev":"9-716b3faa8957c1aea337540402ae7f43"}}, +{"id":"nodie","key":"nodie","value":{"rev":"3-cc29702a2e7e295cfe583a05fb77b530"}}, +{"id":"nodify","key":"nodify","value":{"rev":"10-87fadf6bf262882bd71ab7e759b29949"}}, +{"id":"nodrrr","key":"nodrrr","value":{"rev":"3-75937f4ffb722a67d6c5a67663366854"}}, +{"id":"nodules","key":"nodules","value":{"rev":"8-2c6ec430f26ff7ef171e80b7b5e990c2"}}, +{"id":"nodysentary","key":"nodysentary","value":{"rev":"3-7574fc8e12b1271c2eb1c66026f702cb"}}, +{"id":"nohm","key":"nohm","value":{"rev":"45-09dcf4df92734b3c51c8df3c3b374b0b"}}, +{"id":"noid","key":"noid","value":{"rev":"5-ac31e001806789e80a7ffc64f2914eb4"}}, +{"id":"nolife","key":"nolife","value":{"rev":"7-cfd4fe84b1062303cefb83167ea48bba"}}, +{"id":"nolog","key":"nolog","value":{"rev":"9-6e82819b801f5d7ec6773596d5d2efb2"}}, +{"id":"nomnom","key":"nomnom","value":{"rev":"34-bf66753d1d155820cfacfc7fa7a830c9"}}, +{"id":"nomplate","key":"nomplate","value":{"rev":"9-6ea21ee9568421a60cb80637c4c6cb48"}}, +{"id":"nonogo","key":"nonogo","value":{"rev":"5-8307413f9a3da913f9818c4f2d951519"}}, +{"id":"noode","key":"noode","value":{"rev":"7-454df50a7cbd03c46a9951cb1ddbe1c6"}}, +{"id":"noodle","key":"noodle","value":{"rev":"7-163745527770de0de8e7e9d59fc3888c"}}, +{"id":"noop","key":"noop","value":{"rev":"5-ed9fd66573ed1186e66b4c2bc16192cb"}}, +{"id":"nope","key":"nope","value":{"rev":"3-7088ffb62b8e06261527cbfa69cb94c5"}}, +{"id":"nopro","key":"nopro","value":{"rev":"11-6c4aeafe6329821b2259ef11414481dd"}}, +{"id":"nopt","key":"nopt","value":{"rev":"23-cce441940b6f129cab94a359ddb8b3e4"}}, +{"id":"norm","key":"norm","value":{"rev":"9-2bf26c3803fdc3bb6319e490cae3b625"}}, +{"id":"norq","key":"norq","value":{"rev":"3-b1a80ad1aa4ccc493ac25da22b0f0697"}}, +{"id":"norris","key":"norris","value":{"rev":"3-a341286d9e83fa392c1ce6b764d0aace"}}, +{"id":"norris-ioc","key":"norris-ioc","value":{"rev":"15-d022f159229d89ce60fc2a15d71eac59"}}, +{"id":"norris-tester","key":"norris-tester","value":{"rev":"3-fc2f34c9373bbdf5a1cd9cfbaff21f83"}}, +{"id":"northwatcher","key":"northwatcher","value":{"rev":"13-edab28a123f0100e12f96c9828428a8a"}}, +{"id":"nosey","key":"nosey","value":{"rev":"4-10a22f27dd9f2a40acf035a7d250c661"}}, +{"id":"nosql-thin","key":"nosql-thin","value":{"rev":"6-604169cacf303b5278064f68b884090b"}}, +{"id":"notch","key":"notch","value":{"rev":"3-5b720089f0f9cfdbbbea8677216eeee5"}}, +{"id":"notes","key":"notes","value":{"rev":"3-5dfbd6ec33c69c0f1b619dd65d9e7a56"}}, +{"id":"nothing","key":"nothing","value":{"rev":"3-8b44e10efd7d6504755c0c4bd1043814"}}, +{"id":"notifications","key":"notifications","value":{"rev":"3-a68448bca7ea2d3d3ce43e4d03cd76c6"}}, +{"id":"notifo","key":"notifo","value":{"rev":"8-0bc13ea6135adfa80c5fac497a2ddeda"}}, +{"id":"notify","key":"notify","value":{"rev":"3-da00942576bcb5fab594186f80d4575a"}}, +{"id":"notify-send","key":"notify-send","value":{"rev":"7-89f5c6bc656d51577e3997b9f90d0454"}}, +{"id":"nova","key":"nova","value":{"rev":"3-4e136f35b7d5b85816c17496c6c0e382"}}, +{"id":"now","key":"now","value":{"rev":"84-dbfde18b3f6fe79dd3637b6da34b78cf"}}, +{"id":"now-bal","key":"now-bal","value":{"rev":"3-c769bcdd45a93095f68c2de54f35543f"}}, +{"id":"nowpad","key":"nowpad","value":{"rev":"51-8d90c49031f79a9d31eb4ed6f39609b6"}}, +{"id":"nowww","key":"nowww","value":{"rev":"3-541994af2e579b376d2037f4e34f31d8"}}, +{"id":"noxmox","key":"noxmox","value":{"rev":"9-4ac8b1529dced329cac0976b9ca9eed0"}}, +{"id":"nozzle","key":"nozzle","value":{"rev":"23-e60444326d11a5b57c208de548c325e8"}}, +{"id":"npm","key":"npm","value":{"rev":"665-71d13d024c846b2ee85ed054fcfcb242"}}, +{"id":"npm-deploy","key":"npm-deploy","value":{"rev":"23-751e9d3c2edac0fd9916b0e886414ef2"}}, +{"id":"npm-dev-install","key":"npm-dev-install","value":{"rev":"3-7a08e11a59758329ba8dc4e781ea9993"}}, +{"id":"npm-docsite","key":"npm-docsite","value":{"rev":"3-5ed4f1ffea02487ab9ea24cfa0196f76"}}, +{"id":"npm-github-service","key":"npm-github-service","value":{"rev":"8-6891bc055b499e088fc79a7f94b6a4ec"}}, +{"id":"npm-intro-slides","key":"npm-intro-slides","value":{"rev":"8-e95f28475662cb8f70f4cb48baaa9d27"}}, +{"id":"npm-monitor","key":"npm-monitor","value":{"rev":"7-4e3209ea893fe37c0e516fe21de2d8ad"}}, +{"id":"npm-remapper","key":"npm-remapper","value":{"rev":"3-69163475ee93f32faac3f934e772b6c7"}}, +{"id":"npm-tweets","key":"npm-tweets","value":{"rev":"9-86064412a8aa02d813b20d2e49d78d84"}}, +{"id":"npm-wrapper","key":"npm-wrapper","value":{"rev":"3-59c4d372b84f6e91dbe48a220511dfd5"}}, +{"id":"npm2debian","key":"npm2debian","value":{"rev":"3-3cf2f471f3bfbc613176c7c780a6aad6"}}, +{"id":"npmcount","key":"npmcount","value":{"rev":"5-59c55b09d9c2cc7da217cab3b0ea642c"}}, +{"id":"npmdep","key":"npmdep","value":{"rev":"9-78184ad3b841e5c91bbfa29ff722778a"}}, +{"id":"npmtop","key":"npmtop","value":{"rev":"19-2754af894829f22d6edb3a17a64cdf1e"}}, +{"id":"nquery","key":"nquery","value":{"rev":"9-461fb0c9bcc3c15e0696dc2e99807c98"}}, +{"id":"nrecipe","key":"nrecipe","value":{"rev":"15-a96b6b0134a7625eb4eb236b4bf3fbf3"}}, +{"id":"nserver","key":"nserver","value":{"rev":"5-ea895373c340dd8d9119f3f549990048"}}, +{"id":"nserver-util","key":"nserver-util","value":{"rev":"5-5e14eb0bc9f7ab0eac04c5699c6bb328"}}, +{"id":"nssocket","key":"nssocket","value":{"rev":"51-6aac1d5dd0aa7629b3619b3085d63c04"}}, +{"id":"nstore","key":"nstore","value":{"rev":"28-6e2639829539b7315040487dfa5c79af"}}, +{"id":"nstore-cache","key":"nstore-cache","value":{"rev":"3-453ed78dcbe68b31ff675f4d94b47c4a"}}, +{"id":"nstore-query","key":"nstore-query","value":{"rev":"3-39f46992dd278824db641a37ec5546f5"}}, +{"id":"ntodo","key":"ntodo","value":{"rev":"7-e214da8bbed2d3e40bdaec77d7a49831"}}, +{"id":"ntp","key":"ntp","value":{"rev":"5-5ee2b25e8f3bca06d1cc4ce3b25cac42"}}, +{"id":"nts","key":"nts","value":{"rev":"7-ecaf47f8af1f77de791d1d1fa9bab88e"}}, +{"id":"nttpd","key":"nttpd","value":{"rev":"21-cda7aa0f1db126428f6ca01d44b4d209"}}, +{"id":"ntwitter","key":"ntwitter","value":{"rev":"11-732c6f34137c942bc98967170b2f83fc"}}, +{"id":"nub","key":"nub","value":{"rev":"3-932ecf56889fa43584687dbb2cf4aa91"}}, +{"id":"nubnub","key":"nubnub","value":{"rev":"6-93a5267209e1aa869521a5952cbb1828"}}, +{"id":"null","key":"null","value":{"rev":"3-ae8247cfa9553d23a229993cfc8436c5"}}, +{"id":"numb","key":"numb","value":{"rev":"5-594cd9e8e8e4262ddb3ddd80e8084b62"}}, +{"id":"nun","key":"nun","value":{"rev":"8-3bd8b37ed85c1a5da211bd0d5766848e"}}, +{"id":"nunz","key":"nunz","value":{"rev":"3-040f033943158be495f6b0da1a0c0344"}}, +{"id":"nurl","key":"nurl","value":{"rev":"11-6c4ee6fc5c5119c56f2fd8ad8a0cb928"}}, +{"id":"nutil","key":"nutil","value":{"rev":"3-7785a1d4651dcfe78c874848f41d1348"}}, +{"id":"nutils","key":"nutils","value":{"rev":"13-889624db0c155fc2f0b501bba47e55ec"}}, +{"id":"nuvem","key":"nuvem","value":{"rev":"23-054b9b1240f4741f561ef0bb3197bdf8"}}, +{"id":"nvm","key":"nvm","value":{"rev":"28-251b7eb3429a00099b37810d05accd47"}}, +{"id":"nwm","key":"nwm","value":{"rev":"3-fe9274106aac9e67eea734159477acaf"}}, +{"id":"nx","key":"nx","value":{"rev":"55-7ad32fcb34ec25f841ddd0e5857375c7"}}, +{"id":"nx-core","key":"nx-core","value":{"rev":"33-a7bc62348591bae89fff82057bede1ab"}}, +{"id":"nx-daemon","key":"nx-daemon","value":{"rev":"3-7b86a87654c9e32746a4d36d7c527182"}}, +{"id":"nyaatorrents","key":"nyaatorrents","value":{"rev":"5-8600707a1e84f617bd5468b5c9179202"}}, +{"id":"nyala","key":"nyala","value":{"rev":"17-23c908297a37c47f9f09977f4cf101ff"}}, +{"id":"nyam","key":"nyam","value":{"rev":"17-697b5f17fe67630bc9494184146c12f1"}}, +{"id":"nyancat","key":"nyancat","value":{"rev":"13-84c18d007db41b40e9145bdc049b0a00"}}, +{"id":"nymph","key":"nymph","value":{"rev":"5-3a5d7a75d32f7a71bf4ec131f71484d8"}}, +{"id":"o3-xml","key":"o3-xml","value":{"rev":"3-cc4df881333805600467563f80b5216c"}}, +{"id":"oahu","key":"oahu","value":{"rev":"3-e789fc2098292518cb33606c73bfeca4"}}, +{"id":"oauth","key":"oauth","value":{"rev":"38-36b99063db7dc302b70d932e9bbafc24"}}, +{"id":"oauth-client","key":"oauth-client","value":{"rev":"12-ae097c9580ddcd5ca938b169486a63c6"}}, +{"id":"oauth-server","key":"oauth-server","value":{"rev":"7-ea931e31eaffaa843be61ffc89f29da7"}}, +{"id":"oauth2","key":"oauth2","value":{"rev":"3-4fce73fdc95580f397afeaf1bbd596bb"}}, +{"id":"oauth2-client","key":"oauth2-client","value":{"rev":"7-b5bd019159112384abc2087b2f8cb4f7"}}, +{"id":"oauth2-provider","key":"oauth2-provider","value":{"rev":"3-acd8f23b8c1c47b19838424b64618c70"}}, +{"id":"oauth2-server","key":"oauth2-server","value":{"rev":"11-316baa7e754053d0153086d0748b07c5"}}, +{"id":"obj_diff","key":"obj_diff","value":{"rev":"3-9289e14caaec4bb6aa64aa1be547db3b"}}, +{"id":"object-additions","key":"object-additions","value":{"rev":"3-11f03ae5afe00ad2be034fb313ce71a9"}}, +{"id":"object-proxy","key":"object-proxy","value":{"rev":"3-4d531308fc97bac6f6f9acd1e8f5b53a"}}, +{"id":"object-sync","key":"object-sync","value":{"rev":"5-6628fff49d65c96edc9d7a2e13db8d6d"}}, +{"id":"observer","key":"observer","value":{"rev":"3-a48052671a59b1c7874b4462e375664d"}}, +{"id":"octo.io","key":"octo.io","value":{"rev":"7-5692104396299695416ecb8548e53541"}}, +{"id":"octopus","key":"octopus","value":{"rev":"3-0a286abf59ba7232210e24a371902e7b"}}, +{"id":"odbc","key":"odbc","value":{"rev":"3-8550f0b183b229e41f3cb947bad9b059"}}, +{"id":"odot","key":"odot","value":{"rev":"13-3954b69c1a560a71fe58ab0c5c1072ba"}}, +{"id":"offliner","key":"offliner","value":{"rev":"3-9b58041cbd7b0365e04fec61c192c9b2"}}, +{"id":"ofxer","key":"ofxer","value":{"rev":"11-f8a79e1f27c92368ca1198ad37fbe83e"}}, +{"id":"ogre","key":"ogre","value":{"rev":"35-ea9c78c1d5b1761f059bb97ea568b23d"}}, +{"id":"oi.tekcos","key":"oi.tekcos","value":{"rev":"5-fdca9adb54acea3f91567082b107dde9"}}, +{"id":"oktest","key":"oktest","value":{"rev":"3-3b40312743a3eb1d8541ceee3ecfeace"}}, +{"id":"omcc","key":"omcc","value":{"rev":"3-19718e77bf82945c3ca7a3cdfb91188c"}}, +{"id":"omegle","key":"omegle","value":{"rev":"3-507ba8a51afbe2ff078e3e96712b7286"}}, +{"id":"ometa","key":"ometa","value":{"rev":"10-457fa17de89e1012ce812af3a53f4035"}}, +{"id":"ometa-highlighter","key":"ometa-highlighter","value":{"rev":"21-d18470d6d9a93bc7383c7d8ace22ad1d"}}, +{"id":"ometajs","key":"ometajs","value":{"rev":"20-c7e8c32926f2523e40e4a7ba2297192c"}}, +{"id":"onion","key":"onion","value":{"rev":"3-b46c000c8ff0b06f5f0028d268bc5c94"}}, +{"id":"onvalid","key":"onvalid","value":{"rev":"3-090bc1cf1418545b84db0fceb0846293"}}, +{"id":"oo","key":"oo","value":{"rev":"7-2297a18cdbcf29ad4867a2159912c04e"}}, +{"id":"oop","key":"oop","value":{"rev":"7-45fab8bae343e805d0c1863149dc20df"}}, +{"id":"op","key":"op","value":{"rev":"13-4efb059757caaecc18d5110b44266b35"}}, +{"id":"open-uri","key":"open-uri","value":{"rev":"21-023a00f26ecd89e278136fbb417ae9c3"}}, +{"id":"open.core","key":"open.core","value":{"rev":"35-f578db4e41dd4ae9128e3be574cf7b14"}}, +{"id":"open311","key":"open311","value":{"rev":"13-bb023a45d3c3988022d2fef809de8d98"}}, +{"id":"openid","key":"openid","value":{"rev":"29-b3c8a0e76d99ddb80c98d2aad5586771"}}, +{"id":"openlayers","key":"openlayers","value":{"rev":"3-602c34468c9be326e95be327b58d599b"}}, +{"id":"opentok","key":"opentok","value":{"rev":"5-5f4749f1763d45141d0272c1dbe6249a"}}, +{"id":"opentsdb-dashboard","key":"opentsdb-dashboard","value":{"rev":"3-2e0c5ccf3c9cfce17c20370c93283707"}}, +{"id":"opower-jobs","key":"opower-jobs","value":{"rev":"16-1602139f92e58d88178f21f1b3e0939f"}}, +{"id":"optimist","key":"optimist","value":{"rev":"64-ca3e5085acf135169d79949c25d84690"}}, +{"id":"optparse","key":"optparse","value":{"rev":"6-0200c34395f982ae3b80f4d18cb14483"}}, +{"id":"opts","key":"opts","value":{"rev":"8-ce2a0e31de55a1e02d5bbff66c4e8794"}}, +{"id":"orchestra","key":"orchestra","value":{"rev":"9-52ca98cddb51a2a43ec02338192c44fc"}}, +{"id":"orchid","key":"orchid","value":{"rev":"49-af9635443671ed769e4efa691b8ca84a"}}, +{"id":"orderly","key":"orderly","value":{"rev":"3-9ccc42d45b64278c9ffb1e64fc4f0d62"}}, +{"id":"orgsync.live","key":"orgsync.live","value":{"rev":"3-4dffc8ac43931364f59b9cb534acbaef"}}, +{"id":"orm","key":"orm","value":{"rev":"21-f3e7d89239364559d306110580bbb08f"}}, +{"id":"ormnomnom","key":"ormnomnom","value":{"rev":"15-0aacfbb5b7b580d76e9ecf5214a1d5ed"}}, +{"id":"orona","key":"orona","value":{"rev":"8-62d4ba1bf49098a140a2b85f80ebb103"}}, +{"id":"osc4node","key":"osc4node","value":{"rev":"3-0910613e78065f78b61142b35986e8b3"}}, +{"id":"oscar","key":"oscar","value":{"rev":"3-f5d2d39a67c67441bc2135cdaf2b47f8"}}, +{"id":"osrandom","key":"osrandom","value":{"rev":"3-026016691a5ad068543503e5e7ce6a84"}}, +{"id":"ossp-uuid","key":"ossp-uuid","value":{"rev":"10-8b7e1fba847d7cc9aa4f4c8813ebe6aa"}}, +{"id":"ostatus","key":"ostatus","value":{"rev":"3-76e0ec8c61c6df15c964197b722e24e7"}}, +{"id":"ostrich","key":"ostrich","value":{"rev":"3-637e0821e5ccfd0f6b1261b22c168c8d"}}, +{"id":"otk","key":"otk","value":{"rev":"5-2dc24e159cc618f43e573561286c4dcd"}}, +{"id":"ourl","key":"ourl","value":{"rev":"5-a3945e59e33faac96c75b508ef7fa1fb"}}, +{"id":"oursql","key":"oursql","value":{"rev":"21-bc53ab462155fa0aedbe605255fb9988"}}, +{"id":"out","key":"out","value":{"rev":"5-eb261f940b6382e2689210a58bc1b440"}}, +{"id":"overload","key":"overload","value":{"rev":"10-b88919e5654bef4922029afad4f1d519"}}, +{"id":"ox","key":"ox","value":{"rev":"3-0ca445370b4f76a93f2181ad113956d9"}}, +{"id":"pachube","key":"pachube","value":{"rev":"10-386ac6be925bab307b5d545516fb18ef"}}, +{"id":"pachube-stream","key":"pachube-stream","value":{"rev":"13-176dadcc5c516420fb3feb1f964739e0"}}, +{"id":"pack","key":"pack","value":{"rev":"29-8f8c511d95d1fb322c1a6d7965ef8f29"}}, +{"id":"packagebohrer","key":"packagebohrer","value":{"rev":"3-507358253a945a74c49cc169ad0bf5a2"}}, +{"id":"packer","key":"packer","value":{"rev":"9-23410d893d47418731e236cfcfcfbf03"}}, +{"id":"packet","key":"packet","value":{"rev":"8-1b366f97d599c455dcbbe4339da7cf9e"}}, +{"id":"pacote-sam-egenial","key":"pacote-sam-egenial","value":{"rev":"3-b967db1b9fceb9a937f3520efd89f479"}}, +{"id":"pacoteegenial","key":"pacoteegenial","value":{"rev":"3-9cfe8518b885bfd9a44ed38814f7d623"}}, +{"id":"pact","key":"pact","value":{"rev":"7-82996c1a0c8e9a5e9df959d4ad37085e"}}, +{"id":"pad","key":"pad","value":{"rev":"3-eef6147f09b662cff95c946f2b065da5"}}, +{"id":"paddle","key":"paddle","value":{"rev":"3-fedd0156b9a0dadb5e9b0f1cfab508fd"}}, +{"id":"padlock","key":"padlock","value":{"rev":"9-3a9e378fbe8e3817da7999f675af227e"}}, +{"id":"pagen","key":"pagen","value":{"rev":"9-9aac56724039c38dcdf7f6d5cbb4911c"}}, +{"id":"paginate-js","key":"paginate-js","value":{"rev":"5-995269155152db396662c59b67e9e93d"}}, +{"id":"pairtree","key":"pairtree","value":{"rev":"3-0361529e6c91271e2a61f3d7fd44366e"}}, +{"id":"palsu-app","key":"palsu-app","value":{"rev":"3-73f1fd9ae35e3769efc9c1aa25ec6da7"}}, +{"id":"pam","key":"pam","value":{"rev":"3-77b5bd15962e1c8be1980b33fd3b9737"}}, +{"id":"panache","key":"panache","value":{"rev":"25-749d2034f7f9179c2266cf896bb4abb0"}}, +{"id":"panic","key":"panic","value":{"rev":"7-068b22be54ca8ae7b03eb153c2ea849a"}}, +{"id":"pantry","key":"pantry","value":{"rev":"33-3896f0fc165092f6cabb2949be3952c4"}}, +{"id":"paper-keys","key":"paper-keys","value":{"rev":"3-729378943040ae01d59f07bb536309b7"}}, +{"id":"paperboy","key":"paperboy","value":{"rev":"8-db2d51c2793b4ffc82a1ae928c813aae"}}, +{"id":"paperserve","key":"paperserve","value":{"rev":"6-8509fb68217199a3eb74f223b1e2bee5"}}, +{"id":"parall","key":"parall","value":{"rev":"5-279d7105a425e136f6101250e8f81a14"}}, +{"id":"parallel","key":"parallel","value":{"rev":"14-f1294b3b840cfb26095107110b6720ec"}}, +{"id":"paramon","key":"paramon","value":{"rev":"3-37e599e924beb509c894c992cf72791b"}}, +{"id":"parannus","key":"parannus","value":{"rev":"7-7541f1ed13553261330b9e1c4706f112"}}, +{"id":"parasite","key":"parasite","value":{"rev":"13-83c26181bb92cddb8ff76bc154a50210"}}, +{"id":"parrot","key":"parrot","value":{"rev":"3-527d1cb4b5be0e252dc92a087d380f17"}}, +{"id":"parseUri","key":"parseUri","value":{"rev":"3-3b60b1fd6d8109279b5d0cfbdb89b343"}}, +{"id":"parseopt","key":"parseopt","value":{"rev":"10-065f1acaf02c94f0684f75fefc2fd1ec"}}, +{"id":"parser","key":"parser","value":{"rev":"5-f661f0b7ede9b6d3e0de259ed20759b1"}}, +{"id":"parser_email","key":"parser_email","value":{"rev":"12-63333860c62f2a9c9d6b0b7549bf1cdc"}}, +{"id":"parstream","key":"parstream","value":{"rev":"3-ef7e8ffc8ce1e7d951e37f85bfd445ab"}}, +{"id":"parted","key":"parted","value":{"rev":"9-250e4524994036bc92915b6760d62d8a"}}, +{"id":"partial","key":"partial","value":{"rev":"7-208411e6191275a4193755ee86834716"}}, +{"id":"party","key":"party","value":{"rev":"5-9337d8dc5e163f0300394f533ab1ecdf"}}, +{"id":"pashua","key":"pashua","value":{"rev":"3-b752778010f4e20f662a3d8f0f57b18b"}}, +{"id":"pass","key":"pass","value":{"rev":"3-66a2d55d93eae8535451f12965578db8"}}, +{"id":"passthru","key":"passthru","value":{"rev":"9-3c8f0b20f1a16976f3645a6f7411b56a"}}, +{"id":"passwd","key":"passwd","value":{"rev":"19-44ac384382a042faaa1f3b111786c831"}}, +{"id":"password","key":"password","value":{"rev":"9-0793f6a8d09076f25cde7c9e528eddec"}}, +{"id":"password-hash","key":"password-hash","value":{"rev":"9-590c62e275ad577c6f8ddbf5ba4579cc"}}, +{"id":"path","key":"path","value":{"rev":"3-3ec064cf3f3a85cb59528654c5bd938f"}}, +{"id":"pathjs","key":"pathjs","value":{"rev":"5-d5e1b1a63e711cae3ac79a3b1033b609"}}, +{"id":"pathname","key":"pathname","value":{"rev":"9-16f2c1473454900ce18a217b2ea52c57"}}, +{"id":"paths","key":"paths","value":{"rev":"3-fa47b7c1d533a7d9f4bbaffc5fb89905"}}, +{"id":"patr","key":"patr","value":{"rev":"7-7bcd37586389178b9f23d33c1d7a0292"}}, +{"id":"pattern","key":"pattern","value":{"rev":"36-3ded826185c384af535dcd428af3f626"}}, +{"id":"payment-paypal-payflowpro","key":"payment-paypal-payflowpro","value":{"rev":"14-d8814a1d8bba57a6ecf8027064adc7ad"}}, +{"id":"paynode","key":"paynode","value":{"rev":"16-16084e61db66ac18fdbf95a51d31c09a"}}, +{"id":"payos","key":"payos","value":{"rev":"3-373695bd80c454b32b83a5eba6044261"}}, +{"id":"paypal-ipn","key":"paypal-ipn","value":{"rev":"5-ef32291f9f8371b20509db3acee722f6"}}, +{"id":"pcap","key":"pcap","value":{"rev":"46-8ae9e919221102581d6bb848dc67b84b"}}, +{"id":"pd","key":"pd","value":{"rev":"7-82146739c4c0eb4e49e40aa80a29cc0a"}}, +{"id":"pdf","key":"pdf","value":{"rev":"6-5c6b6a133e1b3ce894ebb1a49090216c"}}, +{"id":"pdfcrowd","key":"pdfcrowd","value":{"rev":"5-026b4611b50374487bfd64fd3e0d562c"}}, +{"id":"pdfkit","key":"pdfkit","value":{"rev":"13-2fd34c03225a87dfd8057c85a83f3c50"}}, +{"id":"pdflatex","key":"pdflatex","value":{"rev":"3-bbbf61f09ebe4c49ca0aff8019611660"}}, +{"id":"pdl","key":"pdl","value":{"rev":"3-4c41bf12e901ee15bdca468db8c89102"}}, +{"id":"peanut","key":"peanut","value":{"rev":"55-b797121dbbcba1219934284ef56abb8a"}}, +{"id":"pebble","key":"pebble","value":{"rev":"21-3cd08362123260a2e96d96d80e723805"}}, +{"id":"pecode","key":"pecode","value":{"rev":"3-611f5e8c61bbf4467b84da954ebdd521"}}, +{"id":"pegjs","key":"pegjs","value":{"rev":"11-091040d16433014d1da895e32ac0f6a9"}}, +{"id":"per-second","key":"per-second","value":{"rev":"5-e1593b3f7008ab5e1c3cae86f39ba3f3"}}, +{"id":"permafrost","key":"permafrost","value":{"rev":"9-494cbc9a2f43a60b57f23c5f5b12270d"}}, +{"id":"perry","key":"perry","value":{"rev":"41-15aed7a778fc729ad62fdfb231c50774"}}, +{"id":"persistencejs","key":"persistencejs","value":{"rev":"20-2585af3f15f0a4a7395e937237124596"}}, +{"id":"pg","key":"pg","value":{"rev":"142-48de452fb8a84022ed7cae8ec2ebdaf6"}}, +{"id":"phonetap","key":"phonetap","value":{"rev":"7-2cc7d3c2a09518ad9b0fe816c6a99125"}}, +{"id":"php-autotest","key":"php-autotest","value":{"rev":"3-04470b38b259187729af574dd3dc1f97"}}, +{"id":"phpass","key":"phpass","value":{"rev":"3-66f4bec659bf45b312022bb047b18696"}}, +{"id":"piano","key":"piano","value":{"rev":"3-0bab6b5409e4305c87a775e96a2b7ad3"}}, +{"id":"picard","key":"picard","value":{"rev":"5-7676e6ad6d5154fdc016b001465891f3"}}, +{"id":"picardForTynt","key":"picardForTynt","value":{"rev":"3-09d205b790bd5022b69ec4ad54bad770"}}, +{"id":"pid","key":"pid","value":{"rev":"3-0ba7439d599b9d613461794c3892d479"}}, +{"id":"pieshop","key":"pieshop","value":{"rev":"12-7851afe1bbc20de5d054fe93b071f849"}}, +{"id":"pig","key":"pig","value":{"rev":"3-8e6968a7b64635fed1bad12c39d7a46a"}}, +{"id":"pigeons","key":"pigeons","value":{"rev":"53-8df70420d3c845cf0159b3f25d0aab90"}}, +{"id":"piles","key":"piles","value":{"rev":"3-140cb1e83b5a939ecd429b09886132ef"}}, +{"id":"pillar","key":"pillar","value":{"rev":"6-83c81550187f6d00e11dd9955c1c94b7"}}, +{"id":"pilot","key":"pilot","value":{"rev":"3-073ed1a083cbd4c2aa2561f19e5935ea"}}, +{"id":"pinboard","key":"pinboard","value":{"rev":"3-1020cab02a1183acdf82e1f7620dc1e0"}}, +{"id":"pinf-loader-js","key":"pinf-loader-js","value":{"rev":"5-709ba9c86fb4de906bd7bbca53771f0f"}}, +{"id":"pinf-loader-js-demos-npmpackage","key":"pinf-loader-js-demos-npmpackage","value":{"rev":"3-860569d98c83e59185cff356e56b10a6"}}, +{"id":"pingback","key":"pingback","value":{"rev":"5-5d0a05d65a14f6837b0deae16c550bec"}}, +{"id":"pingdom","key":"pingdom","value":{"rev":"11-f299d6e99122a9fa1497bfd166dadd02"}}, +{"id":"pintpay","key":"pintpay","value":{"rev":"3-eba9c4059283adec6b1ab017284c1f17"}}, +{"id":"pipe","key":"pipe","value":{"rev":"5-d202bf317c10a52ac817b5c1a4ce4c88"}}, +{"id":"pipe_utils","key":"pipe_utils","value":{"rev":"13-521857c99eb76bba849a22240308e584"}}, +{"id":"pipegram","key":"pipegram","value":{"rev":"3-1449333c81dd658d5de9eebf36c07709"}}, +{"id":"pipeline-surveyor","key":"pipeline-surveyor","value":{"rev":"11-464db89b17e7b44800088ec4a263d92e"}}, +{"id":"pipes","key":"pipes","value":{"rev":"99-8320636ff840a61d82d9c257a2e0ed48"}}, +{"id":"pipes-cellar","key":"pipes-cellar","value":{"rev":"27-e035e58a3d82e50842d766bb97ea3ed9"}}, +{"id":"pipes-cohort","key":"pipes-cohort","value":{"rev":"9-88fc0971e01516873396e44974874903"}}, +{"id":"piton-entity","key":"piton-entity","value":{"rev":"31-86254212066019f09d67dfd58524bd75"}}, +{"id":"piton-http-utils","key":"piton-http-utils","value":{"rev":"3-6cf6aa0c655ff6118d53e62e3b970745"}}, +{"id":"piton-mixin","key":"piton-mixin","value":{"rev":"3-7b7737004e53e04f7f95ba5850eb5e70"}}, +{"id":"piton-pipe","key":"piton-pipe","value":{"rev":"3-8d7df4e53f620ef2f24e9fc8b24f0238"}}, +{"id":"piton-simplate","key":"piton-simplate","value":{"rev":"3-9ac00835d3de59d535cdd2347011cdc9"}}, +{"id":"piton-string-utils","key":"piton-string-utils","value":{"rev":"3-ecab73993d764dfb378161ea730dbbd5"}}, +{"id":"piton-validity","key":"piton-validity","value":{"rev":"13-1766651d69e3e075bf2c66b174b66026"}}, +{"id":"pixel-ping","key":"pixel-ping","value":{"rev":"11-38d717c927e13306e8ff9032785b50f2"}}, +{"id":"pixelcloud","key":"pixelcloud","value":{"rev":"7-0897d734157b52dece8f86cde7be19d4"}}, +{"id":"pixiedust","key":"pixiedust","value":{"rev":"3-6b932dee4b6feeed2f797de5d0066f8a"}}, +{"id":"pkginfo","key":"pkginfo","value":{"rev":"13-3ee42503d6672812960a965d4f3a1bc2"}}, +{"id":"pksqlite","key":"pksqlite","value":{"rev":"13-095e7d7d0258b71491c39d0e8c4f19be"}}, +{"id":"plants.js","key":"plants.js","value":{"rev":"3-e3ef3a16f637787e84c100a9b9ec3b08"}}, +{"id":"plate","key":"plate","value":{"rev":"20-92ba0729b2edc931f28870fe7f2ca95a"}}, +{"id":"platform","key":"platform","value":{"rev":"4-be465a1d21be066c96e30a42b8602177"}}, +{"id":"platformjs","key":"platformjs","value":{"rev":"35-5c510fa0c90492fd1d0f0fc078460018"}}, +{"id":"platoon","key":"platoon","value":{"rev":"28-e0e0c5f852eadacac5a652860167aa11"}}, +{"id":"play","key":"play","value":{"rev":"5-17f7cf7cf5d1c21c7392f3c43473098d"}}, +{"id":"plist","key":"plist","value":{"rev":"10-2a23864923aeed93fb8e25c4b5b2e97e"}}, +{"id":"png","key":"png","value":{"rev":"14-9cc7aeaf0c036c9a880bcee5cd46229a"}}, +{"id":"png-guts","key":"png-guts","value":{"rev":"5-a29c7c686f9d08990ce29632bf59ef90"}}, +{"id":"policyfile","key":"policyfile","value":{"rev":"21-4a9229cca4bcac10f730f296f7118548"}}, +{"id":"polla","key":"polla","value":{"rev":"27-9af5a575961a4dddb6bef482c168c756"}}, +{"id":"poly","key":"poly","value":{"rev":"3-7f7fe29d9f0ec4fcbf8481c797b20455"}}, +{"id":"polyglot","key":"polyglot","value":{"rev":"3-9306e246d1f8b954b41bef76e3e81291"}}, +{"id":"pool","key":"pool","value":{"rev":"10-f364b59aa8a9076a17cd94251dd013ab"}}, +{"id":"poolr","key":"poolr","value":{"rev":"5-cacfbeaa7aaca40c1a41218e8ac8b732"}}, +{"id":"pop","key":"pop","value":{"rev":"41-8edd9ef2f34a90bf0ec5e8eb0e51e644"}}, +{"id":"pop-disqus","key":"pop-disqus","value":{"rev":"3-4a8272e6a8453ed2d754397dc8b349bb"}}, +{"id":"pop-ga","key":"pop-ga","value":{"rev":"3-5beaf7b355d46b3872043b97696ee693"}}, +{"id":"pop-gallery","key":"pop-gallery","value":{"rev":"3-1a88920ff930b8ce51cd50fcfe62675e"}}, +{"id":"pop3-client","key":"pop3-client","value":{"rev":"3-be8c314b0479d9d98384e2ff36d7f207"}}, +{"id":"poplib","key":"poplib","value":{"rev":"7-ab64c5c35269aee897b0904b4548096b"}}, +{"id":"porter-stemmer","key":"porter-stemmer","value":{"rev":"5-724a7b1d635b95a14c9ecd9d2f32487d"}}, +{"id":"portfinder","key":"portfinder","value":{"rev":"5-cdf36d1c666bbdae500817fa39b9c2bd"}}, +{"id":"portscanner","key":"portscanner","value":{"rev":"3-773c1923b6f3b914bd801476efcfdf64"}}, +{"id":"pos","key":"pos","value":{"rev":"3-1c1a27020560341ecd1b54d0e3cfaf2a"}}, +{"id":"posix-getopt","key":"posix-getopt","value":{"rev":"3-819b69724575b65fe25cf1c768e1b1c6"}}, +{"id":"postageapp","key":"postageapp","value":{"rev":"9-f5735237f7e6f0b467770e28e84c56db"}}, +{"id":"postal","key":"postal","value":{"rev":"19-dd70aeab4ae98ccf3d9f203dff9ccf37"}}, +{"id":"posterous","key":"posterous","value":{"rev":"3-6f8a9e7cae8a26f021653f2c27b0c67f"}}, +{"id":"postgres","key":"postgres","value":{"rev":"6-e8844a47c83ff3ef0a1ee7038b2046b2"}}, +{"id":"postgres-js","key":"postgres-js","value":{"rev":"3-bbe27a49ee9f8ae8789660e178d6459d"}}, +{"id":"postman","key":"postman","value":{"rev":"5-548538583f2e7ad448adae27f9a801e5"}}, +{"id":"postmark","key":"postmark","value":{"rev":"24-a6c61b346329e499d4a4a37dbfa446a2"}}, +{"id":"postmark-api","key":"postmark-api","value":{"rev":"3-79973af301aa820fc18c2c9d418adcd7"}}, +{"id":"postmessage","key":"postmessage","value":{"rev":"5-854bdb27c2a1af5b629b01f7d69691fe"}}, +{"id":"postpie","key":"postpie","value":{"rev":"10-88527e2731cd07a3b8ddec2608682700"}}, +{"id":"postprocess","key":"postprocess","value":{"rev":"5-513ecd54bf8df0ae73d2a50c717fd939"}}, +{"id":"potato","key":"potato","value":{"rev":"3-0f4cab343859692bf619e79cd9cc5be1"}}, +{"id":"pour","key":"pour","value":{"rev":"7-272bee63c5f19d12102198a23a4af902"}}, +{"id":"pow","key":"pow","value":{"rev":"22-58b557cd71ec0e95eef51dfd900e4736"}}, +{"id":"precious","key":"precious","value":{"rev":"19-b370292b258bcbca02c5d8861ebee0bb"}}, +{"id":"predicate","key":"predicate","value":{"rev":"3-1c6d1871fe71bc61457483793eecf7f9"}}, +{"id":"prefer","key":"prefer","value":{"rev":"11-236b9d16cd019e1d9af41e745bfed754"}}, +{"id":"prenup","key":"prenup","value":{"rev":"3-4c56ddf1ee22cd90c85963209736bc75"}}, +{"id":"pretty-json","key":"pretty-json","value":{"rev":"5-2dbb22fc9573c19e64725ac331a8d59c"}}, +{"id":"prettyfy","key":"prettyfy","value":{"rev":"3-fc7e39aad63a42533d4ac6d6bfa32325"}}, +{"id":"prick","key":"prick","value":{"rev":"10-71a02e1be02df2af0e6a958099be565a"}}, +{"id":"printf","key":"printf","value":{"rev":"5-2896b8bf90df19d4a432153211ca3a7e"}}, +{"id":"pro","key":"pro","value":{"rev":"5-e98adaf2f741e00953bbb942bbeb14d2"}}, +{"id":"probe_couchdb","key":"probe_couchdb","value":{"rev":"28-86f8918a3e64608f8009280fb28a983d"}}, +{"id":"process","key":"process","value":{"rev":"3-6865fc075d8083afd8e2aa266512447c"}}, +{"id":"procfile","key":"procfile","value":{"rev":"3-22dbb2289f5fb3060a8f7833b50116a4"}}, +{"id":"profile","key":"profile","value":{"rev":"29-5afee07fe4c334d9836fda1df51e1f2d"}}, +{"id":"profilejs","key":"profilejs","value":{"rev":"9-128c2b0e09624ee69a915cff20cdf359"}}, +{"id":"profiler","key":"profiler","value":{"rev":"13-4f1582fad93cac11daad5d5a67565e4f"}}, +{"id":"progress","key":"progress","value":{"rev":"7-bba60bc39153fa0fbf5e909b6df213b0"}}, +{"id":"progress-bar","key":"progress-bar","value":{"rev":"5-616721d3856b8e5a374f247404d6ab29"}}, +{"id":"progressify","key":"progressify","value":{"rev":"5-0379cbed5adc2c3f3ac6adf0307ec11d"}}, +{"id":"proj4js","key":"proj4js","value":{"rev":"5-7d209ce230f6a2d5931800acef436a06"}}, +{"id":"projectwatch","key":"projectwatch","value":{"rev":"15-d0eca46ffc3d9e18a51db2d772fa2778"}}, +{"id":"promise","key":"promise","value":{"rev":"3-1409350eb10aa9055ed13a5b59f0abc3"}}, +{"id":"promised-fs","key":"promised-fs","value":{"rev":"28-1d3e0dd1884e1c39a5d5e2d35bb1f911"}}, +{"id":"promised-http","key":"promised-http","value":{"rev":"8-3f8d560c800ddd44a617bf7d7c688392"}}, +{"id":"promised-io","key":"promised-io","value":{"rev":"11-e9a280e85c021cd8b77e524aac50fafb"}}, +{"id":"promised-traits","key":"promised-traits","value":{"rev":"14-62d0ac59d4ac1c6db99c0273020565ea"}}, +{"id":"promised-utils","key":"promised-utils","value":{"rev":"20-0c2488685eb8999c40ee5e7cfa4fd75d"}}, +{"id":"prompt","key":"prompt","value":{"rev":"32-d52a524c147e34c1258facab69660cc2"}}, +{"id":"props","key":"props","value":{"rev":"17-8c4c0bf1b69087510612c8d5ccbfbfeb"}}, +{"id":"proserver","key":"proserver","value":{"rev":"3-4b0a001404171eb0f6f3e5d73a35fcb1"}}, +{"id":"protege","key":"protege","value":{"rev":"150-9790c23d7b7eb5fb94cd5b8048bdbf10"}}, +{"id":"proto","key":"proto","value":{"rev":"6-29fe2869f34e2737b0cc2a0dbba8e397"}}, +{"id":"proto-list","key":"proto-list","value":{"rev":"3-0f64ff29a4a410d5e03a57125374b87b"}}, +{"id":"protobuf-stream","key":"protobuf-stream","value":{"rev":"3-950e621ce7eef306eff5f932a9c4cbae"}}, +{"id":"protodiv","key":"protodiv","value":{"rev":"9-ed8d84033943934eadf5d95dfd4d8eca"}}, +{"id":"proton","key":"proton","value":{"rev":"19-8ad32d57a3e71df786ff41ef8c7281f2"}}, +{"id":"protoparse","key":"protoparse","value":{"rev":"3-9fbcc3b26220f974d4b9c9c883a0260b"}}, +{"id":"prototype","key":"prototype","value":{"rev":"5-2a672703595e65f5d731a967b43655a7"}}, +{"id":"prowl","key":"prowl","value":{"rev":"5-ec480caa5a7db4f1ec2ce22d5eb1dad8"}}, +{"id":"prowler","key":"prowler","value":{"rev":"3-09747704f78c7c123fb1c719c4996924"}}, +{"id":"prox","key":"prox","value":{"rev":"5-0ac5f893b270a819d91f0c6581aca2a8"}}, +{"id":"proxify","key":"proxify","value":{"rev":"3-d24a979b708645328476bd42bd5aaba8"}}, +{"id":"proxino","key":"proxino","value":{"rev":"7-894cc6d453af00e5e39ebc8f0b0abe3a"}}, +{"id":"proxio","key":"proxio","value":{"rev":"55-a1b2744054b3dc3adc2f7f67d2c026a4"}}, +{"id":"proxy","key":"proxy","value":{"rev":"3-c6dd1a8b58e0ed7ac983c89c05ee987d"}}, +{"id":"proxy-by-url","key":"proxy-by-url","value":{"rev":"5-acfcf47f3575cea6594513ff459c5f2c"}}, +{"id":"pseudo","key":"pseudo","value":{"rev":"11-4d894a335036d96cdb9bb19f7b857293"}}, +{"id":"psk","key":"psk","value":{"rev":"17-375055bf6315476a37b5fadcdcb6b149"}}, +{"id":"pty","key":"pty","value":{"rev":"8-0b3ea0287fd23f882da27dabce4e3230"}}, +{"id":"pub-mix","key":"pub-mix","value":{"rev":"3-2c455b249167cbf6b1a6ea761bf119f4"}}, +{"id":"pubjs","key":"pubjs","value":{"rev":"3-a0ceab8bc6ec019dfcf9a8e16756bea0"}}, +{"id":"publicsuffix","key":"publicsuffix","value":{"rev":"8-1592f0714595c0ca0433272c60afc733"}}, +{"id":"publisher","key":"publisher","value":{"rev":"13-f2c8722f14732245d3ca8842fe5b7661"}}, +{"id":"pubnub-client","key":"pubnub-client","value":{"rev":"8-6e511a6dd2b7feb6cefe410facd61f53"}}, +{"id":"pubsub","key":"pubsub","value":{"rev":"11-6c6270bf95af417fb766c05f66b2cc9e"}}, +{"id":"pubsub.io","key":"pubsub.io","value":{"rev":"24-9686fe9ae3356966dffee99f53eaad2c"}}, +{"id":"pubsubd","key":"pubsubd","value":{"rev":"3-b1ff2fa958bd450933735162e9615449"}}, +{"id":"pulley","key":"pulley","value":{"rev":"13-f81ed698175ffd0b5b19357a623b8f15"}}, +{"id":"pulse","key":"pulse","value":{"rev":"9-da4bdabb6d7c189d05c8d6c64713e4ac"}}, +{"id":"pulverizr","key":"pulverizr","value":{"rev":"16-ffd4db4d2b1bfbd0b6ac794dca9e728e"}}, +{"id":"pulverizr-bal","key":"pulverizr-bal","value":{"rev":"5-dba279d07f3ed72990d10f11c5d10792"}}, +{"id":"punycode","key":"punycode","value":{"rev":"3-c0df35bb32d1490a4816161974610682"}}, +{"id":"puppy","key":"puppy","value":{"rev":"3-355fb490dba55efdf8840e2769cb7f41"}}, +{"id":"pure","key":"pure","value":{"rev":"7-b2da0d64ea12cea63bed940222bb36df"}}, +{"id":"purpose","key":"purpose","value":{"rev":"3-ef30ac479535bd603954c27ecb5d564a"}}, +{"id":"push-it","key":"push-it","value":{"rev":"35-2640be8ca8938768836520ce5fc7fff2"}}, +{"id":"pusher","key":"pusher","value":{"rev":"5-eb363d1e0ea2c59fd92a07ea642c5d03"}}, +{"id":"pusher-pipe","key":"pusher-pipe","value":{"rev":"11-11ab87d1288a8c7d11545fdab56616f6"}}, +{"id":"pushinator","key":"pushinator","value":{"rev":"15-6b2c37931bc9438e029a6af0cf97091c"}}, +{"id":"put","key":"put","value":{"rev":"12-4b05a7cdfdb24a980597b38781457cf5"}}, +{"id":"put-selector","key":"put-selector","value":{"rev":"1-1a9b3b8b5a44485b93966503370978aa"}}, +{"id":"putio","key":"putio","value":{"rev":"3-973b65e855e1cd0d3cc685542263cc55"}}, +{"id":"pwilang","key":"pwilang","value":{"rev":"43-49ad04f5abbdd9c5b16ec0271ab17520"}}, +{"id":"py","key":"py","value":{"rev":"3-aade832559d0fab88116aa794e3a9f35"}}, +{"id":"pygments","key":"pygments","value":{"rev":"3-2b2c96f39bdcb9ff38eb7d4bac7c90ba"}}, +{"id":"python","key":"python","value":{"rev":"15-706af811b5544a4aacc6ad1e9863e369"}}, +{"id":"q","key":"q","value":{"rev":"80-fd2397ad465750240d0f22a0abc53de5"}}, +{"id":"q-comm","key":"q-comm","value":{"rev":"17-972994947f097fdcffcfcb2277c966ce"}}, +{"id":"q-fs","key":"q-fs","value":{"rev":"68-958b01dd5bdc4da5ba3c1cd02c85fc0e"}}, +{"id":"q-http","key":"q-http","value":{"rev":"26-42a7db91b650386d920f52afe3e9161f"}}, +{"id":"q-io","key":"q-io","value":{"rev":"20-79f7b3d43bcbd53cc57b6531426738e2"}}, +{"id":"q-io-buffer","key":"q-io-buffer","value":{"rev":"5-05528d9a527da73357991bec449a1b76"}}, +{"id":"q-require","key":"q-require","value":{"rev":"12-e3fc0388e4d3e6d8a15274c3cc239712"}}, +{"id":"q-util","key":"q-util","value":{"rev":"10-94e0c392e70fec942aee0f024e5c090f"}}, +{"id":"qbox","key":"qbox","value":{"rev":"17-88f9148881ede94ae9dcbf4e1980aa69"}}, +{"id":"qfi","key":"qfi","value":{"rev":"3-a6052f02aec10f17085b09e4f9da1ce0"}}, +{"id":"qjscl","key":"qjscl","value":{"rev":"11-def1631b117a53cab5fd38ffec28d727"}}, +{"id":"qooxdoo","key":"qooxdoo","value":{"rev":"5-720d33ec2de3623d6535b3bdc8041d81"}}, +{"id":"qoper8","key":"qoper8","value":{"rev":"11-48fa2ec116bec46d64161e35b0f0cd86"}}, +{"id":"qq","key":"qq","value":{"rev":"23-6f7a5f158364bbf2e90a0c6eb1fbf8a9"}}, +{"id":"qqwry","key":"qqwry","value":{"rev":"10-bf0d6cc2420bdad92a1104c184e7e045"}}, +{"id":"qr","key":"qr","value":{"rev":"11-0a0120b7ec22bbcf76ff1d78fd4a7689"}}, +{"id":"qrcode","key":"qrcode","value":{"rev":"11-b578b6a76bffe996a0390e3d886b79bb"}}, +{"id":"qs","key":"qs","value":{"rev":"23-3da45c8c8a5eb33d45360d92b6072d37"}}, +{"id":"quack-array","key":"quack-array","value":{"rev":"5-6b676aa6273e4515ab5e7bfee1c331e0"}}, +{"id":"quadprog","key":"quadprog","value":{"rev":"7-c0ceeeb12735f334e8c7940ac1f0a896"}}, +{"id":"quadraticon","key":"quadraticon","value":{"rev":"66-1da88ea871e6f90967b9f65c0204309d"}}, +{"id":"quasi","key":"quasi","value":{"rev":"3-6fe0faa91d849938d8c92f91b0828395"}}, +{"id":"query","key":"query","value":{"rev":"13-635ff8d88c6a3f9d92f9ef465b14fb82"}}, +{"id":"query-engine","key":"query-engine","value":{"rev":"21-66feaee07df9fa1f625ac797e8f6b90b"}}, +{"id":"querystring","key":"querystring","value":{"rev":"5-2b509239fafba56319137bfbe1e9eeb7"}}, +{"id":"queue","key":"queue","value":{"rev":"3-5c4af574e5056f7e6ceb9bfefc1c632d"}}, +{"id":"queuelib","key":"queuelib","value":{"rev":"61-87c2abc94a5ad40af8193fac9a1d9f7e"}}, +{"id":"quickcheck","key":"quickcheck","value":{"rev":"7-64e6c1e9efc08a89abe3d01c414d1411"}}, +{"id":"quickserve","key":"quickserve","value":{"rev":"3-9c19f8ad7daf06182f42b8c7063b531f"}}, +{"id":"quip","key":"quip","value":{"rev":"8-0624055f5056f72bc719340c95e5111a"}}, +{"id":"qunit","key":"qunit","value":{"rev":"37-6e7fefdaffab8fc5fb92a391da227c38"}}, +{"id":"qunit-tap","key":"qunit-tap","value":{"rev":"22-0266cd1b5bb7cbab89fa52642f0e8277"}}, +{"id":"qwery","key":"qwery","value":{"rev":"66-29f9b44da544a3a9b4537a85ceace7c8"}}, +{"id":"qwery-mobile","key":"qwery-mobile","value":{"rev":"5-182264ca68c30519bf0d29cf1e15854b"}}, +{"id":"raZerdummy","key":"raZerdummy","value":{"rev":"7-1fa549e0cff60795b49cbd3732f32175"}}, +{"id":"rabbit.js","key":"rabbit.js","value":{"rev":"3-dbcd5cd590576673c65b34c44ff06bec"}}, +{"id":"rabblescay","key":"rabblescay","value":{"rev":"5-3fea196ffd581a842a24ab7bb2118fe2"}}, +{"id":"racer","key":"racer","value":{"rev":"51-41c65689a335d70fa6b55b9706b9c0fe"}}, +{"id":"radcouchdb","key":"radcouchdb","value":{"rev":"3-64ccb4d0acb2b11cbb1d3fcef5f9a68e"}}, +{"id":"radio-stream","key":"radio-stream","value":{"rev":"6-c5f80a0bef7bbaacdd22d92da3d09244"}}, +{"id":"railway","key":"railway","value":{"rev":"74-5ce92a45c7d11540b0e2b5a8455361ce"}}, +{"id":"railway-mailer","key":"railway-mailer","value":{"rev":"3-8df2fbe4af4d3b1f12557d8397bf0548"}}, +{"id":"railway-twitter","key":"railway-twitter","value":{"rev":"3-df984f182bb323052e36876e8e3a066c"}}, +{"id":"rand","key":"rand","value":{"rev":"11-abb69107c390e2a6dcec64cb72f36096"}}, +{"id":"random","key":"random","value":{"rev":"7-32550b221f3549b67f379c1c2dbc5c57"}}, +{"id":"random-data","key":"random-data","value":{"rev":"5-ae651ea36724105b8677ae489082ab4d"}}, +{"id":"range","key":"range","value":{"rev":"3-1d3925f30ffa6b5f3494d507fcef3aa1"}}, +{"id":"ranger","key":"ranger","value":{"rev":"17-6135a9a9d83cbd3945f1ce991f276cb8"}}, +{"id":"rap-battle","key":"rap-battle","value":{"rev":"3-6960516c0d27906bb9343805a5eb0e45"}}, +{"id":"raphael","key":"raphael","value":{"rev":"7-012f159593a82e4587ea024a5d4fbe41"}}, +{"id":"raphael-zoom","key":"raphael-zoom","value":{"rev":"3-aaab74bebbeb4241cade4f4d3c9b130e"}}, +{"id":"rapid","key":"rapid","value":{"rev":"8-ae0b05388c7904fc88c743e3dcde1d9d"}}, +{"id":"rasputin","key":"rasputin","value":{"rev":"3-87cdd9bd591606f4b8439e7a76681c7b"}}, +{"id":"rate-limiter","key":"rate-limiter","value":{"rev":"3-24cd20fef83ce02f17dd383b72f5f125"}}, +{"id":"rats","key":"rats","value":{"rev":"3-1ff1efb311451a17789da910eaf59fb6"}}, +{"id":"raydash","key":"raydash","value":{"rev":"7-96c345beb3564d2789d209d1fe695857"}}, +{"id":"rbytes","key":"rbytes","value":{"rev":"13-cf09d91347a646f590070e516f0c9bc9"}}, +{"id":"rdf","key":"rdf","value":{"rev":"3-9a5012d1fc10da762dbe285d0b317499"}}, +{"id":"rdf-raptor-parser","key":"rdf-raptor-parser","value":{"rev":"11-25c61e4d57cf67ee8a5afb6dfcf193e3"}}, +{"id":"rdfstore","key":"rdfstore","value":{"rev":"41-4499a73efc48ad07234e56fd4e27e4e0"}}, +{"id":"rdio","key":"rdio","value":{"rev":"5-fa20a8ab818a6150e38e9bb7744968f9"}}, +{"id":"rdx","key":"rdx","value":{"rev":"3-e1db5ee3aad06edd9eadcdaa8aaba149"}}, +{"id":"rea","key":"rea","value":{"rev":"3-f17ceeb35337bc9ccf9cb440d5c4dfaf"}}, +{"id":"read-files","key":"read-files","value":{"rev":"3-e08fac4abcdbc7312beb0362ff4427b4"}}, +{"id":"readability","key":"readability","value":{"rev":"3-475601a3d99d696763872c52bce6a155"}}, +{"id":"readabilitySAX","key":"readabilitySAX","value":{"rev":"19-83277777f3f721be26aca28c66227b01"}}, +{"id":"ready.js","key":"ready.js","value":{"rev":"39-8e309b8b274722c051c67f90885571e8"}}, +{"id":"readyjslint","key":"readyjslint","value":{"rev":"3-0a3742129bfbe07d47fcfb9ff67d39b2"}}, +{"id":"recaptcha","key":"recaptcha","value":{"rev":"8-8895926476be014fbe08b301294bf37b"}}, +{"id":"recaptcha-async","key":"recaptcha-async","value":{"rev":"9-3033260389f8afdb5351974119b78ca2"}}, +{"id":"recline","key":"recline","value":{"rev":"189-b56ab8c7791201dccf4aea2532189f1d"}}, +{"id":"recon","key":"recon","value":{"rev":"13-79cbddefb00fec6895342d18609cadb1"}}, +{"id":"reconf","key":"reconf","value":{"rev":"5-0596988db2cf9bf5921502a2aab24ade"}}, +{"id":"redback","key":"redback","value":{"rev":"37-03b390f69cacf42a46e393b7cf297d09"}}, +{"id":"rede","key":"rede","value":{"rev":"3-ee74c2fd990c7780dc823e22a9c3bef2"}}, +{"id":"redecard","key":"redecard","value":{"rev":"13-7dec5a50c34132a2f20f0f143d6b5215"}}, +{"id":"redim","key":"redim","value":{"rev":"15-91c9fd560d1ce87d210b461c52a6d258"}}, +{"id":"redis","key":"redis","value":{"rev":"98-ec237259e8ef5c42a76ff260be50f8fd"}}, +{"id":"redis-channels","key":"redis-channels","value":{"rev":"3-8efc40a25fd18c1c9c41bbaeedb0b22f"}}, +{"id":"redis-client","key":"redis-client","value":{"rev":"3-3376054236e651e7dfcf91be8632fd0e"}}, +{"id":"redis-completer","key":"redis-completer","value":{"rev":"11-9e5bf1f8d37df681e7896252809188d3"}}, +{"id":"redis-keyspace","key":"redis-keyspace","value":{"rev":"25-245f2375741eb3e574dfce9f2da2b687"}}, +{"id":"redis-lua","key":"redis-lua","value":{"rev":"7-81f3dd3a4601271818f15278f495717a"}}, +{"id":"redis-namespace","key":"redis-namespace","value":{"rev":"3-ddf52a172db190fe788aad4116b1cb29"}}, +{"id":"redis-node","key":"redis-node","value":{"rev":"24-7a1e9098d8b5a42a99ca71a01b0d7672"}}, +{"id":"redis-queue","key":"redis-queue","value":{"rev":"3-9896587800c4b98ff291b74210c16b6e"}}, +{"id":"redis-session-store","key":"redis-session-store","value":{"rev":"3-2229501ecf817f9ca60ff2c7721ddd73"}}, +{"id":"redis-tag","key":"redis-tag","value":{"rev":"9-6713e8e91a38613cfef09d7b40f4df71"}}, +{"id":"redis-url","key":"redis-url","value":{"rev":"5-f53545a0039b512a2f7afd4ba2e08773"}}, +{"id":"redis-user","key":"redis-user","value":{"rev":"11-a8c0f6d40cbfbb6183a46e121f31ec06"}}, +{"id":"redis2json","key":"redis2json","value":{"rev":"5-dd96f78f8db0bf695346c95c2ead1307"}}, +{"id":"redis_objects","key":"redis_objects","value":{"rev":"3-499fe6dd07e7a3839111b1892b97f54c"}}, +{"id":"redisev","key":"redisev","value":{"rev":"3-8e857dbe2341292c6e170a7bfe3fa81b"}}, +{"id":"redisfs","key":"redisfs","value":{"rev":"69-d9c90256d32348fdca7a4e646ab4d551"}}, +{"id":"redisify","key":"redisify","value":{"rev":"3-03fce3095b4129e71280d278f11121ba"}}, +{"id":"rediskit","key":"rediskit","value":{"rev":"5-6a0324708f45d884a492cbc408137059"}}, +{"id":"redisql","key":"redisql","value":{"rev":"6-b31802eb37910cb74bd3c9f7b477c025"}}, +{"id":"redmark","key":"redmark","value":{"rev":"5-8724ab00513b6bd7ddfdcd3cc2e0a4e8"}}, +{"id":"redmess","key":"redmess","value":{"rev":"13-14f58666444993ce899cd2260cdc9140"}}, +{"id":"redobj","key":"redobj","value":{"rev":"7-7ebbeffc306f4f7ff9b53ee57e1a250e"}}, +{"id":"redpack","key":"redpack","value":{"rev":"73-58b3fb3bcadf7d80fbe97d9e82d4928b"}}, +{"id":"reds","key":"reds","value":{"rev":"9-baebb36b92887d93fd79785a8c1e6355"}}, +{"id":"reed","key":"reed","value":{"rev":"45-5580f319dc3b5bfb66612ed5c7e17337"}}, +{"id":"reflect","key":"reflect","value":{"rev":"18-b590003cd55332160a5e5327e806e851"}}, +{"id":"reflect-builder","key":"reflect-builder","value":{"rev":"3-453d618b263f9452c0b6bbab0a701f49"}}, +{"id":"reflect-next","key":"reflect-next","value":{"rev":"9-4f2b27a38985d81e906e824321af7713"}}, +{"id":"reflect-tree-builder","key":"reflect-tree-builder","value":{"rev":"5-5f801f53e126dc8a72e13b1417904ce6"}}, +{"id":"reflect-unbuilder","key":"reflect-unbuilder","value":{"rev":"5-f36fd4182fd465a743198b5188697db9"}}, +{"id":"reflectjs","key":"reflectjs","value":{"rev":"3-e03bdb411ffcdd901b896a1cf43eea69"}}, +{"id":"reflex","key":"reflex","value":{"rev":"3-e8bb6b6de906265114b22036832ef650"}}, +{"id":"refmate","key":"refmate","value":{"rev":"3-7d44c45a2eb39236ad2071c84dc0fbba"}}, +{"id":"regext","key":"regext","value":{"rev":"4-97ca5c25fd2f3dc4bd1f3aa821d06f0f"}}, +{"id":"reid-yui3","key":"reid-yui3","value":{"rev":"5-cab8f6e22dfa9b9c508a5dd312bf56b0"}}, +{"id":"rel","key":"rel","value":{"rev":"7-f447870ac7a078f742e4295896646241"}}, +{"id":"relative-date","key":"relative-date","value":{"rev":"5-d0fa11f8100da888cbcce6e96d76b2e4"}}, +{"id":"reloadOnUpdate","key":"reloadOnUpdate","value":{"rev":"9-e7d4c215578b779b2f888381d398bd79"}}, +{"id":"reloaded","key":"reloaded","value":{"rev":"3-dba828b9ab73fc7ce8e47f98068bce8c"}}, +{"id":"remap","key":"remap","value":{"rev":"5-825ac1783df84aba3255c1d39f32ac00"}}, +{"id":"remedial","key":"remedial","value":{"rev":"17-9bb17db015e96db3c833f84d9dbd972a"}}, +{"id":"remote-console","key":"remote-console","value":{"rev":"6-104bae3ba9e4b0a8f772d0b8dc37007e"}}, +{"id":"remote_js","key":"remote_js","value":{"rev":"3-6c0e3058c33113346c037c59206ac0ec"}}, +{"id":"render","key":"render","value":{"rev":"27-fc8be4e9c50e49fb42df83e9446a1f58"}}, +{"id":"renode","key":"renode","value":{"rev":"11-107a3e15a987393157b47125487af296"}}, +{"id":"reparse","key":"reparse","value":{"rev":"10-210ec92e82f5a8515f45d20c7fa2f164"}}, +{"id":"repl","key":"repl","value":{"rev":"3-295279fe20b9ac54b2a235a6bc7013aa"}}, +{"id":"repl-edit","key":"repl-edit","value":{"rev":"18-eb2e604ab8bb65685376459beb417a31"}}, +{"id":"repl-utils","key":"repl-utils","value":{"rev":"7-fc31547ecb53e7e36610cdb68bcec582"}}, +{"id":"replace","key":"replace","value":{"rev":"17-a8976fcdbeb08e27ee2f0fc69ccd7c9d"}}, +{"id":"replica","key":"replica","value":{"rev":"3-f9dae960f91e8dc594f43b004f516d5f"}}, +{"id":"replicate","key":"replicate","value":{"rev":"3-3d6e52af6ff36c02139f619c7e5599c6"}}, +{"id":"replique","key":"replique","value":{"rev":"5-72d990b7d9ce9ff107d96be17490226a"}}, +{"id":"req2","key":"req2","value":{"rev":"3-712151f335b25b5bdef428982d77d0e0"}}, +{"id":"reqhooks","key":"reqhooks","value":{"rev":"17-2f0f0b73545bb1936f449a1ec4a28011"}}, +{"id":"request","key":"request","value":{"rev":"55-0d0b00eecde877ca5cd4ad9e0badc4d1"}}, +{"id":"require","key":"require","value":{"rev":"15-59e9fa05a9de52ee2a818c045736452b"}}, +{"id":"require-analyzer","key":"require-analyzer","value":{"rev":"72-f759f0cdc352df317df29791bfe451f1"}}, +{"id":"require-kiss","key":"require-kiss","value":{"rev":"5-f7ef9d7beda584e9c95635a281a01587"}}, +{"id":"require-like","key":"require-like","value":{"rev":"7-29d5de79e7ff14bb02da954bd9a2ee33"}}, +{"id":"requireincontext","key":"requireincontext","value":{"rev":"5-988ff7c27a21e527ceeb50cbedc8d1b0"}}, +{"id":"requirejs","key":"requirejs","value":{"rev":"3-e609bc91d12d698a17aa51bb50a50509"}}, +{"id":"requirejson","key":"requirejson","value":{"rev":"3-2b8173e58d08034a53a3226c464b1dc8"}}, +{"id":"reqwest","key":"reqwest","value":{"rev":"57-5aa2c1ed17b1e3630859bcad85559e6a"}}, +{"id":"resig-class","key":"resig-class","value":{"rev":"3-16b1a2cdb3224f2043708436dbac4395"}}, +{"id":"resistance","key":"resistance","value":{"rev":"9-9cacbf5fa8318419b4751034a511b8c1"}}, +{"id":"resmin","key":"resmin","value":{"rev":"17-a9c8ded5073118748d765784ca4ea069"}}, +{"id":"resolve","key":"resolve","value":{"rev":"11-bba3470bc93a617ccf9fb6c12097c793"}}, +{"id":"resource-router","key":"resource-router","value":{"rev":"13-7b2991958da4d7701c51537192ca756c"}}, +{"id":"resourcer","key":"resourcer","value":{"rev":"3-4e8b5493d6fcdf147f53d3aaa731a509"}}, +{"id":"response","key":"response","value":{"rev":"3-c5cadf4e5dd90dc1022b92a67853b0f8"}}, +{"id":"resque","key":"resque","value":{"rev":"12-e2f5e1bc3e53ac0a992d1a7da7da0d14"}}, +{"id":"rest-in-node","key":"rest-in-node","value":{"rev":"3-41d1ba925857302211bd0bf9d19975f9"}}, +{"id":"rest-mongo","key":"rest-mongo","value":{"rev":"3-583d2a4b672d6d7e7ad26d0b6df20b45"}}, +{"id":"rest.node","key":"rest.node","value":{"rev":"3-2ed59ba9dcc97123632dfdfaea2559ed"}}, +{"id":"restalytics","key":"restalytics","value":{"rev":"11-5fb3cd8e95b37f1725922fa6fbb146e0"}}, +{"id":"restarter","key":"restarter","value":{"rev":"52-ab0a4fe59128b8848ffd88f9756d0049"}}, +{"id":"restartr","key":"restartr","value":{"rev":"12-d3b86e43e7df7697293db65bb1a1ae65"}}, +{"id":"restify","key":"restify","value":{"rev":"132-054bdc85bebc6221a07dda186238b4c3"}}, +{"id":"restler","key":"restler","value":{"rev":"13-f5392d9dd22e34ce3bcc307c51c889b3"}}, +{"id":"restler-aaronblohowiak","key":"restler-aaronblohowiak","value":{"rev":"8-28b231eceb667153e10effcb1ebeb989"}}, +{"id":"restmvc.js","key":"restmvc.js","value":{"rev":"25-d57b550754437580c447adf612c87d9a"}}, +{"id":"resware","key":"resware","value":{"rev":"9-a5ecbc53fefb280c5d1e3efd822704ff"}}, +{"id":"retrie","key":"retrie","value":{"rev":"7-28ea803ad6b119928ac792cbc8f475c9"}}, +{"id":"retro","key":"retro","value":{"rev":"3-94c3aec940e28869554cbb8449d9369e"}}, +{"id":"retry","key":"retry","value":{"rev":"19-89f3ef664c6fa48ff33a0b9f7e798f15"}}, +{"id":"reut","key":"reut","value":{"rev":"23-d745dd7f8606275848a299ad7c38ceb7"}}, +{"id":"rewrite","key":"rewrite","value":{"rev":"3-5cb91fd831d0913e89354f53b875137d"}}, +{"id":"rex","key":"rex","value":{"rev":"39-59025e6947e5f197f124d24a5393865f"}}, +{"id":"rfb","key":"rfb","value":{"rev":"34-db6e684ac9366a0e3658a508a2187ae1"}}, +{"id":"rhyme","key":"rhyme","value":{"rev":"7-27347762f3f5bfa07307da4e476c2d52"}}, +{"id":"riak-js","key":"riak-js","value":{"rev":"55-11d4ee4beb566946f3968abdf1c4b0ef"}}, +{"id":"riakqp","key":"riakqp","value":{"rev":"7-83f562e6907431fcee56a9408ac6d2c1"}}, +{"id":"rightjs","key":"rightjs","value":{"rev":"9-d53ae4c4f5af3bbbe18d7c879e5bdd1b"}}, +{"id":"rimraf","key":"rimraf","value":{"rev":"17-3ddc3f3f36618712e5f4f27511836e7a"}}, +{"id":"rio","key":"rio","value":{"rev":"11-7c6249c241392b51b9142ca1b228dd4e"}}, +{"id":"ristretto","key":"ristretto","value":{"rev":"3-beb22d7a575e066781f1fd702c4572d7"}}, +{"id":"roast","key":"roast","value":{"rev":"32-17cb066823afab1656196a2fe81246cb"}}, +{"id":"robb","key":"robb","value":{"rev":"5-472ed7ba7928131d86a05fcae89b9f93"}}, +{"id":"robots","key":"robots","value":{"rev":"9-afac82b944045c82acb710cc98c7311d"}}, +{"id":"robotskirt","key":"robotskirt","value":{"rev":"63-29a66420951812d421bf6728f67e710c"}}, +{"id":"robotstxt","key":"robotstxt","value":{"rev":"25-1e01cac90f4570d35ab20232feaeebfa"}}, +{"id":"rocket","key":"rocket","value":{"rev":"27-b0f1ff02e70b237bcf6a5b46aa9b74df"}}, +{"id":"roil","key":"roil","value":{"rev":"48-6b00c09b576fe195546bd031763c0d79"}}, +{"id":"roll","key":"roll","value":{"rev":"5-d3fed9271132eb6c954b3ac6c7ffccf0"}}, +{"id":"rollin","key":"rollin","value":{"rev":"3-bd461bc810c12cfcea94109ba9a2ab39"}}, +{"id":"ron","key":"ron","value":{"rev":"5-913645180d29f377506bcd5292d3cb49"}}, +{"id":"rondo","key":"rondo","value":{"rev":"3-9bed539bbaa0cb978f5c1b711d70cd50"}}, +{"id":"ronn","key":"ronn","value":{"rev":"12-b1b1a1d47376fd11053e2b81fe772c4c"}}, +{"id":"rot13","key":"rot13","value":{"rev":"10-a41e8b581812f02ca1a593f6da0c52dc"}}, +{"id":"router","key":"router","value":{"rev":"26-a7883048759715134710d68f179da18b"}}, +{"id":"routes","key":"routes","value":{"rev":"3-d841826cfd365d8f383a9c4f4288933c"}}, +{"id":"rpc","key":"rpc","value":{"rev":"5-5896f380115a7a606cd7cbbc6d113f05"}}, +{"id":"rpc-socket","key":"rpc-socket","value":{"rev":"17-8743dc1a1f5ba391fc5c7d432cc6eeba"}}, +{"id":"rq","key":"rq","value":{"rev":"7-ba263671c3a3b52851dc7d5e6bd4ef8c"}}, +{"id":"rql","key":"rql","value":{"rev":"1-ac5ec10ed5e41a10a289f26aff4def5a"}}, +{"id":"rqueue","key":"rqueue","value":{"rev":"12-042898704386874c70d0ffaeea6ebc78"}}, +{"id":"rrd","key":"rrd","value":{"rev":"9-488adf135cf29cd4725865a8f25a57ba"}}, +{"id":"rsa","key":"rsa","value":{"rev":"8-7d6f981d72322028c3bebb7141252e98"}}, +{"id":"rss","key":"rss","value":{"rev":"3-0a97b20a0a9051876d779af7663880bd"}}, +{"id":"rssee","key":"rssee","value":{"rev":"9-da2599eae68e50c1695fd7f8fcba2b30"}}, +{"id":"rumba","key":"rumba","value":{"rev":"3-7a3827fa6eca2d02d3189cbad38dd6ca"}}, +{"id":"run","key":"run","value":{"rev":"9-0145abb61e6107a3507624928db461da"}}, +{"id":"runforcover","key":"runforcover","value":{"rev":"3-a36b00ea747c98c7cd7afebf1e1b203c"}}, +{"id":"runlol","key":"runlol","value":{"rev":"3-3c97684baaa3d5b31ca404e8a616fe41"}}, +{"id":"runner","key":"runner","value":{"rev":"11-b7ceeedf7b0dde19c809642f1537723a"}}, +{"id":"runways","key":"runways","value":{"rev":"5-f216f5fa6af7ccc7566cdd06cf424980"}}, +{"id":"rw-translate","key":"rw-translate","value":{"rev":"3-16d2beb17a27713e10459ce368c5d087"}}, +{"id":"rx","key":"rx","value":{"rev":"5-ea2a04ecf38963f8a99b7a408b45af31"}}, +{"id":"rzr","key":"rzr","value":{"rev":"4-6a137fa752709531f2715de5a213b326"}}, +{"id":"s-tpl","key":"s-tpl","value":{"rev":"3-1533cf9657cfe669a25da96b6a655f5c"}}, +{"id":"s3-post","key":"s3-post","value":{"rev":"9-ad3b268bc6754852086b50c2f465c02c"}}, +{"id":"safis","key":"safis","value":{"rev":"3-f1494d0dae2b7dfd60beba5a72412ad2"}}, +{"id":"saiga","key":"saiga","value":{"rev":"22-0c67e8cf8f4b6e8ea30552ffc57d222a"}}, +{"id":"sailthru-client","key":"sailthru-client","value":{"rev":"7-1c9c236050868fb8dec4a34ded2436d3"}}, +{"id":"saimonmoore-cradle","key":"saimonmoore-cradle","value":{"rev":"3-5059616ab0f0f10e1c2d164f686e127e"}}, +{"id":"salesforce","key":"salesforce","value":{"rev":"7-f88cbf517b1fb900358c97b2c049960f"}}, +{"id":"sam","key":"sam","value":{"rev":"7-d7e24d2e94411a17cbedfbd8083fd878"}}, +{"id":"sandbox","key":"sandbox","value":{"rev":"10-0b51bed24e0842f99744dcf5d79346a6"}}, +{"id":"sandboxed-module","key":"sandboxed-module","value":{"rev":"15-bf8fa69d15ae8416d534e3025a16d87d"}}, +{"id":"sanitizer","key":"sanitizer","value":{"rev":"32-6ea8f4c77cd17253c27d0d87e0790678"}}, +{"id":"sapnwrfc","key":"sapnwrfc","value":{"rev":"3-0bc717109ffcd5265ae24f00416a0281"}}, +{"id":"sardines","key":"sardines","value":{"rev":"7-82712731b5af112ca43b9e3fe9975bb0"}}, +{"id":"sargam","key":"sargam","value":{"rev":"3-6b4c70f4b2bcd2add43704bf40c44507"}}, +{"id":"sasl","key":"sasl","value":{"rev":"4-44a6e12b561b112a574ec9e0c4a8843f"}}, +{"id":"sass","key":"sass","value":{"rev":"14-46bcee5423a1efe22f039e116bb7a77c"}}, +{"id":"satisfic","key":"satisfic","value":{"rev":"3-c6e9a2e65a0e55868cea708bcf7b11cf"}}, +{"id":"sax","key":"sax","value":{"rev":"30-58c5dd2c3367522974406bbf29204a40"}}, +{"id":"say","key":"say","value":{"rev":"10-95f31672af6166ea9099d92706c49ed1"}}, +{"id":"sayndo","key":"sayndo","value":{"rev":"51-fd93715c5ff0fcaa68e4e13c2b51ba61"}}, +{"id":"sc-handlebars","key":"sc-handlebars","value":{"rev":"3-b424c3a66fd0e538b068c6046f404084"}}, +{"id":"scgi-server","key":"scgi-server","value":{"rev":"9-3364b5c39985ea8f3468b6abb53d5ea6"}}, +{"id":"scheduler","key":"scheduler","value":{"rev":"25-72bc526bb49b0dd42ad5917d38ea3b18"}}, +{"id":"schema","key":"schema","value":{"rev":"21-166410ae972449965dfa1ce615971168"}}, +{"id":"schema-builder","key":"schema-builder","value":{"rev":"3-bce4612e1e5e6a8a85f16326d3810145"}}, +{"id":"schema-org","key":"schema-org","value":{"rev":"15-59b3b654de0380669d0dcd7573c3b7a1"}}, +{"id":"scone","key":"scone","value":{"rev":"15-85ed2dd4894e896ca1c942322753b76b"}}, +{"id":"scooj","key":"scooj","value":{"rev":"3-1be2074aeba4df60594c03f3e59c7734"}}, +{"id":"scope","key":"scope","value":{"rev":"65-9d7eb8c5fc6c54d8e2c49f4b4b4f5166"}}, +{"id":"scope-provider","key":"scope-provider","value":{"rev":"22-2c25a0b260fd18236d5245c8250d990e"}}, +{"id":"scoped-http-client","key":"scoped-http-client","value":{"rev":"3-afa954fe6d1c8b64a1240b77292d99b5"}}, +{"id":"scottbot","key":"scottbot","value":{"rev":"3-d812ddb4af49976c391f14aeecf93180"}}, +{"id":"scraper","key":"scraper","value":{"rev":"19-e2166b3de2b33d7e6baa04c704887fa6"}}, +{"id":"scrapinode","key":"scrapinode","value":{"rev":"15-ae5bf5085d8c4d5390f7c313b0ad13d2"}}, +{"id":"scrappy-do","key":"scrappy-do","value":{"rev":"3-868f5d299da401112e3ed9976194f1ee"}}, +{"id":"scrapr","key":"scrapr","value":{"rev":"3-d700714a56e8f8b8e9b3bc94274f4a24"}}, +{"id":"scrawl","key":"scrawl","value":{"rev":"3-a70a2905b9a1d2f28eb379c14363955f"}}, +{"id":"scribe","key":"scribe","value":{"rev":"5-4cefaaf869ba8e6ae0257e5705532fbe"}}, +{"id":"scriptTools","key":"scriptTools","value":{"rev":"7-1b66b7f02f2f659ae224057afac60bcf"}}, +{"id":"scriptbroadcast","key":"scriptbroadcast","value":{"rev":"10-3cdc4dae471445b7e08e6fc37c2481e6"}}, +{"id":"scriptjs","key":"scriptjs","value":{"rev":"38-9a522df4f0707d47c904f6781fd97ff6"}}, +{"id":"scrowser","key":"scrowser","value":{"rev":"3-a76938b1f84db0793941dba1f84f4c2f"}}, +{"id":"scss","key":"scss","value":{"rev":"10-49a4ad40eca3c797add57986c74e100b"}}, +{"id":"scylla","key":"scylla","value":{"rev":"10-2c5a1efed63c0ac3a3e75861ee323af4"}}, +{"id":"sdl","key":"sdl","value":{"rev":"40-3df0824da620098c0253b5330c6b0c5c"}}, +{"id":"sdlmixer","key":"sdlmixer","value":{"rev":"4-91455739802a98a5549f6c2b8118758d"}}, +{"id":"search","key":"search","value":{"rev":"9-8f696da412a6ccd07c3b8f22cec315cb"}}, +{"id":"searchjs","key":"searchjs","value":{"rev":"3-59418ce307d41de5649dfc158be51adf"}}, +{"id":"searchparser","key":"searchparser","value":{"rev":"3-a84719692ee33c88f3419f033b839f7a"}}, +{"id":"sechash","key":"sechash","value":{"rev":"11-20db8651628dcf6e8cbbc9bf9b2c4f12"}}, +{"id":"secret","key":"secret","value":{"rev":"7-ac44b38fa32b3f5ebc8fd03b02ec69ec"}}, +{"id":"seedrandom","key":"seedrandom","value":{"rev":"3-becb92de803208672887fc22a1a33694"}}, +{"id":"seek","key":"seek","value":{"rev":"3-d778b8d56582e15d409e2346b86caa53"}}, +{"id":"sel","key":"sel","value":{"rev":"19-94c8bc0872d2da7eab2b35daff7a3b5d"}}, +{"id":"select","key":"select","value":{"rev":"5-43593bfec39caaf1a0bc1fedc96d0dce"}}, +{"id":"selenium","key":"selenium","value":{"rev":"3-8ae8ac7a491b813fd011671e0d494f20"}}, +{"id":"selfish","key":"selfish","value":{"rev":"17-827856c3f3b9a3fdd1758477a24bf706"}}, +{"id":"selleck","key":"selleck","value":{"rev":"13-b8325fcdb383397041e4a408b40d708c"}}, +{"id":"semver","key":"semver","value":{"rev":"25-b2aea0cc920a9981cd429442a3fd62f6"}}, +{"id":"sendgrid","key":"sendgrid","value":{"rev":"3-047e2ad730390bac7cf72b7fc3856c1c"}}, +{"id":"sendgrid-api","key":"sendgrid-api","value":{"rev":"5-6e951b0d60a1b7c778fbf548d4e3aed8"}}, +{"id":"sendgrid-web","key":"sendgrid-web","value":{"rev":"3-dc77d2dbcedfcbe4e497958a2a070cfd"}}, +{"id":"sentry","key":"sentry","value":{"rev":"7-57af332354cbd37ce1c743b424b27dd0"}}, +{"id":"seq","key":"seq","value":{"rev":"77-33a8f54017402835c8542945a5c0a443"}}, +{"id":"sequelize","key":"sequelize","value":{"rev":"63-4c28ad13b73549aad7edc57378b21854"}}, +{"id":"sequence","key":"sequence","value":{"rev":"3-914f8010dc12aec0749ddb719f5ac82d"}}, +{"id":"sequencer","key":"sequencer","value":{"rev":"7-d83e687509678c0f5bcf15e5297677c0"}}, +{"id":"sequent","key":"sequent","value":{"rev":"3-cc6f26ab708c7681fa7d9e3bc15d19c0"}}, +{"id":"serializer","key":"serializer","value":{"rev":"7-a0d13120e2d5cfaa6e453b085280fa08"}}, +{"id":"serialport","key":"serialport","value":{"rev":"32-dc365d057a4f46e9f140dc36d6cc825a"}}, +{"id":"serialportify","key":"serialportify","value":{"rev":"3-1bf4ad9c5ebb5d96ca91fc03a10b5443"}}, +{"id":"serialq","key":"serialq","value":{"rev":"3-5897fcd0fca7d8312e61dbcb93790a71"}}, +{"id":"series","key":"series","value":{"rev":"11-0374191f646c277c51602ebe73033b6a"}}, +{"id":"serve","key":"serve","value":{"rev":"11-560c0c1bdeb3348c7a7d18265d27988e"}}, +{"id":"servedir","key":"servedir","value":{"rev":"18-17cffd8d8326b26e7d9319c79d601dda"}}, +{"id":"server-backbone-redis","key":"server-backbone-redis","value":{"rev":"13-c56419457002aa4fa23b142634882594"}}, +{"id":"server-tracker","key":"server-tracker","value":{"rev":"21-f620e295079a8b0acd29fa1a1469100c"}}, +{"id":"service","key":"service","value":{"rev":"11-07533f9e5e854248c0a1d99e911fa419"}}, +{"id":"sesame","key":"sesame","value":{"rev":"19-1e7ad5d030566f4c67027cc5925a2bdb"}}, +{"id":"sesh","key":"sesh","value":{"rev":"4-1682b3ced38e95f2a11a2f545a820bd5"}}, +{"id":"session","key":"session","value":{"rev":"6-a798bf4cd7d127d0111da7cdc3e058a4"}}, +{"id":"session-mongoose","key":"session-mongoose","value":{"rev":"3-b089c8d365d7de3e659cfa7080697dba"}}, +{"id":"sessionvoc-client","key":"sessionvoc-client","value":{"rev":"23-0f9ed8cd4af55f2aae17cb841247b818"}}, +{"id":"set","key":"set","value":{"rev":"3-a285b30a9c1545b427ebd882bc53d8b2"}}, +{"id":"setInterval","key":"setInterval","value":{"rev":"3-0557f666d05223391466547f52cfff42"}}, +{"id":"setTimeout","key":"setTimeout","value":{"rev":"3-e3c059c93763967ddff5974471f227f8"}}, +{"id":"setochka","key":"setochka","value":{"rev":"3-d559e24618b4fc2d5fc4ef44bccb68be"}}, +{"id":"settings","key":"settings","value":{"rev":"5-4af85bb564a330886c79682d2f1d927c"}}, +{"id":"sexy","key":"sexy","value":{"rev":"7-e57fa6bca5d89be86467786fb9f9b997"}}, +{"id":"sexy-args","key":"sexy-args","value":{"rev":"3-715d7d57234220bd79c78772d2566355"}}, +{"id":"sfaClient","key":"sfaClient","value":{"rev":"3-5d9ddd6ea05d7ef366dbf4f66dd4f642"}}, +{"id":"sfml","key":"sfml","value":{"rev":"10-766c876cd1cc220f776e2fa3c1d9efbb"}}, +{"id":"sh","key":"sh","value":{"rev":"5-3ce779be28550e831cf3c0140477376c"}}, +{"id":"sha1","key":"sha1","value":{"rev":"3-66d4b67ace9c65ae8f03d6dd0647ff6b"}}, +{"id":"sha1_file","key":"sha1_file","value":{"rev":"7-eb25e9c5f470a1b80c1697a952a1c5ed"}}, +{"id":"shadows","key":"shadows","value":{"rev":"5-d6a1a21871c733f34495592307ab7961"}}, +{"id":"share","key":"share","value":{"rev":"15-ef81a004f0e115040dcc1510f6302fa9"}}, +{"id":"shared-views","key":"shared-views","value":{"rev":"11-2c83145e6deb3493e44805c92b58929e"}}, +{"id":"sharedjs","key":"sharedjs","value":{"rev":"9-d43a861b02aa88ae22810f9771d774ec"}}, +{"id":"shell","key":"shell","value":{"rev":"39-7e2042bd6f485b827d53f5f727164d6f"}}, +{"id":"shelld","key":"shelld","value":{"rev":"3-118a62ff31d85e61b78bbd97333a7330"}}, +{"id":"shimify","key":"shimify","value":{"rev":"3-dde4d45bcbd2f6f7faaeb7f8c31d5e8b"}}, +{"id":"ship","key":"ship","value":{"rev":"3-5f294fc3841c901d6cea7f3862625d95"}}, +{"id":"shmakowiki","key":"shmakowiki","value":{"rev":"15-079ae4595d1ddf019d22d3d0ac49a188"}}, +{"id":"shorten","key":"shorten","value":{"rev":"3-ed1395b35faf4639e25dacbb038cf237"}}, +{"id":"shorttag","key":"shorttag","value":{"rev":"5-21d15e4cb8b62aeefe23edc99ff768ec"}}, +{"id":"shorturl","key":"shorturl","value":{"rev":"5-58f78b2a5318ec7da8a5f88739f2796b"}}, +{"id":"shorty","key":"shorty","value":{"rev":"9-17f804ff6e94295549cca6fd534b89de"}}, +{"id":"shotenjin","key":"shotenjin","value":{"rev":"3-91a7864d216a931095e9999133d3c41f"}}, +{"id":"should","key":"should","value":{"rev":"19-ed561071d434f319080fa5d0f647dd93"}}, +{"id":"shovel","key":"shovel","value":{"rev":"5-0168a02a8fa8d7856a5f4a5c18706724"}}, +{"id":"showdown","key":"showdown","value":{"rev":"3-7be5479804451db3faed968fa428af56"}}, +{"id":"shredder","key":"shredder","value":{"rev":"3-93e12ab8822ba5fe86d662f124a8ad1a"}}, +{"id":"shrtn","key":"shrtn","value":{"rev":"19-5883692283903e3166b478b98bcad999"}}, +{"id":"shuffle","key":"shuffle","value":{"rev":"3-71c96da1843abb468649ab0806e6b9d3"}}, +{"id":"sibilant","key":"sibilant","value":{"rev":"18-4dcb400eb9ed9cb1c7826d155807f6d0"}}, +{"id":"sideline","key":"sideline","value":{"rev":"15-84f284a9277718bf90f68dc9351500ae"}}, +{"id":"siesta","key":"siesta","value":{"rev":"5-ff99a009e6e5897c6322237c51d0a142"}}, +{"id":"sign","key":"sign","value":{"rev":"3-2cf70313707c6a046a6ceca61431ea5e"}}, +{"id":"signals","key":"signals","value":{"rev":"7-c756190260cd3ea43e6d44e4722164cb"}}, +{"id":"signature","key":"signature","value":{"rev":"3-fb7552c27ace0f9321ec7438057a37bf"}}, +{"id":"signed-request","key":"signed-request","value":{"rev":"13-9f1563535dcc1a83338a7375d8240f35"}}, +{"id":"signer","key":"signer","value":{"rev":"5-32c9909da2c4dfb284b858164c03cfe0"}}, +{"id":"simple-class","key":"simple-class","value":{"rev":"3-92c6eea4b3a6169db9d62b12f66268cb"}}, +{"id":"simple-ffmpeg","key":"simple-ffmpeg","value":{"rev":"9-b6dd4fe162803e6db434d71035637993"}}, +{"id":"simple-logger","key":"simple-logger","value":{"rev":"5-52b4c957b3671375547d623c6a9444be"}}, +{"id":"simple-mime","key":"simple-mime","value":{"rev":"9-34e4b1dcc26047b64459d924abab65cc"}}, +{"id":"simple-proxy","key":"simple-proxy","value":{"rev":"9-ad6cd76215717527dc6b226e1219e98e"}}, +{"id":"simple-rest-client","key":"simple-rest-client","value":{"rev":"3-8331b3ae49b52720adf2b72d5da0353d"}}, +{"id":"simple-schedule","key":"simple-schedule","value":{"rev":"7-432d3803e1cf9ab5830923a30fd312e0"}}, +{"id":"simple-server","key":"simple-server","value":{"rev":"25-d4d8ba53d3829f4ca51545a3c23a1244"}}, +{"id":"simple-settings","key":"simple-settings","value":{"rev":"3-497d7c5422f764f3738b3ef303ff9737"}}, +{"id":"simple-static","key":"simple-static","value":{"rev":"3-64c9cf84e5140d4285e451357ac83df5"}}, +{"id":"simple-xml-writer","key":"simple-xml-writer","value":{"rev":"3-d1ca18252c341b4430ab6e1240b5f571"}}, +{"id":"simple-xmpp","key":"simple-xmpp","value":{"rev":"11-b4c10de5e4e12a81c4486206d7fb6b40"}}, +{"id":"simple_pubsub","key":"simple_pubsub","value":{"rev":"9-22ae79856ca25b152f104e5d8bc93f12"}}, +{"id":"simpledb","key":"simpledb","value":{"rev":"13-6bf111aa18bffd86e65fd996525a6113"}}, +{"id":"simplegeo","key":"simplegeo","value":{"rev":"8-eb684eea019ae7e5fa0c087a9747367e"}}, +{"id":"simplegeo-client","key":"simplegeo-client","value":{"rev":"7-b2c976bbf8c145c6b0e1744630548084"}}, +{"id":"simplegeo-thrift","key":"simplegeo-thrift","value":{"rev":"3-bf6ddf40c020889fe28630217f38a442"}}, +{"id":"simplelogger","key":"simplelogger","value":{"rev":"3-36634d2543faecdeccc962422d149ffc"}}, +{"id":"simplesets","key":"simplesets","value":{"rev":"26-48fc18f94744c9b288945844b7cc9196"}}, +{"id":"simplesmtp","key":"simplesmtp","value":{"rev":"6-0952f0c5f43a8e94b11355774bbbe9e8"}}, +{"id":"simplydb","key":"simplydb","value":{"rev":"5-34659bf97bbb40f0ec4a3af14107dc31"}}, +{"id":"sin","key":"sin","value":{"rev":"6-0e8bd66b3e2c8c91efef14a3ddc79c53"}}, +{"id":"sink","key":"sink","value":{"rev":"8-4c49709009dfb5719935dba568a3398e"}}, +{"id":"sink-test","key":"sink-test","value":{"rev":"18-411afcb398102f245e92f2ce91897d3e"}}, +{"id":"sinon","key":"sinon","value":{"rev":"19-fa38010bb1bbed437273e1296660d598"}}, +{"id":"sinon-buster","key":"sinon-buster","value":{"rev":"5-a456f0e21b3edb647ad11179cd02354b"}}, +{"id":"sinon-nodeunit","key":"sinon-nodeunit","value":{"rev":"7-d60aa76cc41a6c9d9db4e8ae268b7b3c"}}, +{"id":"sip","key":"sip","value":{"rev":"17-02be6fb014d41fe66ab22ff2ae60a5b8"}}, +{"id":"sitemap","key":"sitemap","value":{"rev":"13-a6d1c830fdc8942c317c1ebe00efbb6d"}}, +{"id":"sizlate","key":"sizlate","value":{"rev":"3-a86c680c681299045f9aabecb99dc161"}}, +{"id":"sizzle","key":"sizzle","value":{"rev":"5-f00e18a80fb8a4f6bdbf11735e265720"}}, +{"id":"sk","key":"sk","value":{"rev":"33-b0b894d02b0211dae08baadfd84b46c2"}}, +{"id":"skeleton","key":"skeleton","value":{"rev":"5-3559721c222b99cd3f56acaaf706992f"}}, +{"id":"skillet","key":"skillet","value":{"rev":"3-0d6bbe21952f85967a5e12425691ee50"}}, +{"id":"skull.io","key":"skull.io","value":{"rev":"3-082e9d58f24ac59144fc130f6b54927e"}}, +{"id":"slang","key":"slang","value":{"rev":"7-3cd6390e3421f677e4e1b00fdf2d3ee1"}}, +{"id":"sleepless","key":"sleepless","value":{"rev":"5-1482568719534caf17f12daf0130ae0d"}}, +{"id":"sleepylib","key":"sleepylib","value":{"rev":"3-60e851f120e34b0726eb50a38b1e27e2"}}, +{"id":"sleight","key":"sleight","value":{"rev":"3-a0f16b17befee698b172074f84daf44c"}}, +{"id":"slick","key":"slick","value":{"rev":"3-596b7b7cf7b8881c55327e8bcf373700"}}, +{"id":"slickback","key":"slickback","value":{"rev":"9-c036e7393d0f9a463a263f287f3bcefd"}}, +{"id":"slide","key":"slide","value":{"rev":"14-83ade7490da699cf0ed99cec818ce3cd"}}, +{"id":"slippers","key":"slippers","value":{"rev":"5-0d657ed5fca4c0ed8b51c6d7f6eac08a"}}, +{"id":"slug","key":"slug","value":{"rev":"3-046a5bd74cc1edce30faa3b6ab239652"}}, +{"id":"slugr","key":"slugr","value":{"rev":"39-ac346964f547433fe34e637de682f81a"}}, +{"id":"smartdc","key":"smartdc","value":{"rev":"31-8c9db85e4548007a0ef87b7286229952"}}, +{"id":"smoosh","key":"smoosh","value":{"rev":"34-ba1c140a173ff8d1f9cdbe5e5addcc43"}}, +{"id":"smores","key":"smores","value":{"rev":"17-1aef1fa2e1675093c5aaf33436d83f5a"}}, +{"id":"smpp","key":"smpp","value":{"rev":"5-9be31b75aee4db09cfe5a2ceef4bea13"}}, +{"id":"smsified","key":"smsified","value":{"rev":"13-bb97eae0bbb6f4d5c4f2f391cd20e891"}}, +{"id":"smtp","key":"smtp","value":{"rev":"20-c3de67c5d0b3c4493293d9f55adb21ad"}}, +{"id":"smtpc","key":"smtpc","value":{"rev":"11-7c4e1207be6eb06350221af0134e8bd7"}}, +{"id":"smtpclient","key":"smtpclient","value":{"rev":"3-ba61ad5f0fd3fdd382e505abcde8c24e"}}, +{"id":"snake","key":"snake","value":{"rev":"15-384892bf8a5ebf222f6fe0ae321aaaa4"}}, +{"id":"snappy","key":"snappy","value":{"rev":"11-94f2d59347c10cc41b6f4a2dd2b0f15e"}}, +{"id":"sng","key":"sng","value":{"rev":"41-a1d3c6253dec5da8b3134ba3505924f5"}}, +{"id":"snip","key":"snip","value":{"rev":"3-cc51d232fff6a7d7b24588bd98e5613b"}}, +{"id":"snipes","key":"snipes","value":{"rev":"3-12af12ca83e15d056969ec76a3cc2ef0"}}, +{"id":"snippets","key":"snippets","value":{"rev":"13-d19c8a99287ec721d56ef9efdf3ce729"}}, +{"id":"snorkel","key":"snorkel","value":{"rev":"11-bc7ba5d1465c7d1ba71479087292615e"}}, +{"id":"snowball","key":"snowball","value":{"rev":"3-76cfbdb9f379ac635874b76d7ee2fd3b"}}, +{"id":"snpp","key":"snpp","value":{"rev":"8-4f10a9f2bff48e348303d8a143afaa6c"}}, +{"id":"snsclient","key":"snsclient","value":{"rev":"3-302ce1c7132a36ef909ce534a509e27f"}}, +{"id":"soap","key":"soap","value":{"rev":"7-10f361a406dfee3074adac0cea127d87"}}, +{"id":"socket-push","key":"socket-push","value":{"rev":"22-196553953d58d92c288678b1dcd49ba7"}}, +{"id":"socket-twitchat","key":"socket-twitchat","value":{"rev":"11-9b159a4610ea444eaae39baa3bf05280"}}, +{"id":"socket.io","key":"socket.io","value":{"rev":"95-c29c929613dd95aa5aea8a5e14f2573f"}}, +{"id":"socket.io-client","key":"socket.io-client","value":{"rev":"33-a3c79d917bb038f0ca72f9cb27180a66"}}, +{"id":"socket.io-cluster","key":"socket.io-cluster","value":{"rev":"5-83bdaf79d2243eaf3a59b45fc604dc1a"}}, +{"id":"socket.io-connect","key":"socket.io-connect","value":{"rev":"17-62f00efc3bff3a1b549cc5e346da996f"}}, +{"id":"socket.io-context","key":"socket.io-context","value":{"rev":"42-a029996765557776d72690db1f14c1fa"}}, +{"id":"socket.io-ender","key":"socket.io-ender","value":{"rev":"9-c4523af5f5cc815ee69c325c1e29ede4"}}, +{"id":"socket.io-juggernaut","key":"socket.io-juggernaut","value":{"rev":"6-b8b97b2df2c186f24487e027278ec975"}}, +{"id":"socket.io-sessions","key":"socket.io-sessions","value":{"rev":"11-2151ee14eb29543811a9e567bcf6811a"}}, +{"id":"socketstream","key":"socketstream","value":{"rev":"29-b198d27ad6a3c4f9b63bc467e85a54a3"}}, +{"id":"sockjs","key":"sockjs","value":{"rev":"21-a8d6534c55e8b3e33cf06516b59aa408"}}, +{"id":"socksified","key":"socksified","value":{"rev":"3-92350ec9889b8db9c3d34bdbc41b1f7b"}}, +{"id":"soda","key":"soda","value":{"rev":"24-04987191e2c4241fbfaf78263c83d121"}}, +{"id":"soda-runner","key":"soda-runner","value":{"rev":"5-da4e8078a7666404d2a5ab3267a5ef75"}}, +{"id":"sodn","key":"sodn","value":{"rev":"3-3ee6350723c54aad792c769947c6b05e"}}, +{"id":"sofa","key":"sofa","value":{"rev":"7-2f8ffd47ce19e6fb7e1ea2e02076955d"}}, +{"id":"solder","key":"solder","value":{"rev":"10-8f7ad0a60c2716ce65658047c4ae5361"}}, +{"id":"solr","key":"solr","value":{"rev":"11-56a295dff56d9f2a4a7293257ca793a4"}}, +{"id":"solr-client","key":"solr-client","value":{"rev":"7-a296273d32224eb241343cb98ded7b82"}}, +{"id":"sones","key":"sones","value":{"rev":"3-9ddbbdc44f3501917e701d3304eb91a5"}}, +{"id":"song","key":"song","value":{"rev":"7-967aa3a58702b3470996cd8e63b1b18d"}}, +{"id":"sorted","key":"sorted","value":{"rev":"3-47b6ec0f744aa04929d48a7d3d10f581"}}, +{"id":"sosumi","key":"sosumi","value":{"rev":"10-8c3980beb3d7c48d4cccf44a8d1d5ff7"}}, +{"id":"soundcloud","key":"soundcloud","value":{"rev":"7-9ee76aecd3d1946731a1173185796864"}}, +{"id":"soupselect","key":"soupselect","value":{"rev":"12-5fea60f4e52117a8212aa7add6c34278"}}, +{"id":"source","key":"source","value":{"rev":"7-57d6cae0530c7cba4a3932f0df129f20"}}, +{"id":"source-map","key":"source-map","value":{"rev":"6-7da8d2ccc104fa30a93ee165975f28e8"}}, +{"id":"spacesocket","key":"spacesocket","value":{"rev":"6-d1679084b0917f86d6c4e3ac89a89809"}}, +{"id":"spark","key":"spark","value":{"rev":"12-64d44ebde2a4b48aed3bc7814c63e773"}}, +{"id":"spark2","key":"spark2","value":{"rev":"28-918548a309f0d18eebd5c64966376959"}}, +{"id":"sparql","key":"sparql","value":{"rev":"3-8eec87fe9fcb4d07aef214858eada777"}}, +{"id":"sparql-orm","key":"sparql-orm","value":{"rev":"3-b2a7efa5622b0b478fdca3f9050800cc"}}, +{"id":"spatial","key":"spatial","value":{"rev":"3-d09d40af02a9c9e5150500cc66d75f8d"}}, +{"id":"spawn","key":"spawn","value":{"rev":"3-f882c01cf1bb538f5f4be78769e1b097"}}, +{"id":"spdy","key":"spdy","value":{"rev":"13-1fbf077bbb8bc87d5058648c0c66288b"}}, +{"id":"spec","key":"spec","value":{"rev":"15-1074d3a8b8332fcc1059fbb5c4f69a7a"}}, +{"id":"speck","key":"speck","value":{"rev":"21-652b0670953ba79e548f4e5d9ce3d923"}}, +{"id":"spectrum","key":"spectrum","value":{"rev":"28-21fb9eeffe2e63a5383371a44a58a1ad"}}, +{"id":"speller","key":"speller","value":{"rev":"6-91e03f89b09338cf8f38d2e64c1778ce"}}, +{"id":"sphericalmercator","key":"sphericalmercator","value":{"rev":"9-3affc61ae0d64854d77829da5414bbc5"}}, +{"id":"spider","key":"spider","value":{"rev":"3-cd04679891875dfb2bf67613514238eb"}}, +{"id":"spider-tdd","key":"spider-tdd","value":{"rev":"3-d95b6d680d053a063e6fab3fdae16261"}}, +{"id":"spine","key":"spine","value":{"rev":"9-2a5cd4733be1d78376814e78966d885a"}}, +{"id":"spine.app","key":"spine.app","value":{"rev":"43-1044b31d4c53ff5c741a16d49291b321"}}, +{"id":"spine.mobile","key":"spine.mobile","value":{"rev":"19-220f64c212a5f22b27d597e299263490"}}, +{"id":"split_er","key":"split_er","value":{"rev":"3-3419662807bf16f7b5b53998a4759246"}}, +{"id":"spludo","key":"spludo","value":{"rev":"14-d41915fcd1b50553f5b9e706b41d2894"}}, +{"id":"spm","key":"spm","value":{"rev":"9-28d6699288d580807091aafdf78dd479"}}, +{"id":"spore","key":"spore","value":{"rev":"44-1c50fb0e6f7c3447f34b1927c976201f"}}, +{"id":"spork","key":"spork","value":{"rev":"3-e90976749b649b88ab83b59785dba101"}}, +{"id":"spotify","key":"spotify","value":{"rev":"3-90c74506a69e08a41feeb23541ac0b4f"}}, +{"id":"spotify-metadata","key":"spotify-metadata","value":{"rev":"3-a546d3e59e40ec0be5d8524f3a1e7a60"}}, +{"id":"spotlight","key":"spotlight","value":{"rev":"3-bead50ac8f53311d539a420c74ea23e2"}}, +{"id":"spread","key":"spread","value":{"rev":"3-ad7bf6d948043fc6dd47a6fcec7da294"}}, +{"id":"spreadsheet","key":"spreadsheet","value":{"rev":"11-94030e23cc9c8e515c1f340656aea031"}}, +{"id":"spreadsheets","key":"spreadsheets","value":{"rev":"3-6563c479735b1b6599bf9602fa65ff38"}}, +{"id":"sprintf","key":"sprintf","value":{"rev":"10-56c5bc7a19ecf8dd92e24d4dca081059"}}, +{"id":"spruce","key":"spruce","value":{"rev":"7-1ea45ef3c5412dd2a6c1fe7b2a083d68"}}, +{"id":"spy","key":"spy","value":{"rev":"3-f5546fdbbec80ba97756d0d1fefa7923"}}, +{"id":"sql","key":"sql","value":{"rev":"5-6c41452f684418ba521666e977f46e54"}}, +{"id":"sqlite","key":"sqlite","value":{"rev":"9-18761259920b497360f581ff8051dcbb"}}, +{"id":"sqlite3","key":"sqlite3","value":{"rev":"51-f9c99537afd9826819c5f40105e50987"}}, +{"id":"sqlmw","key":"sqlmw","value":{"rev":"17-b05b0b089c0f3b1185f96dc19bf61cf5"}}, +{"id":"squeeze","key":"squeeze","value":{"rev":"6-5e517be339d9aa409cedfcc11d1883b1"}}, +{"id":"squish","key":"squish","value":{"rev":"15-2334d8412df59ddd2fce60c1f77954c7"}}, +{"id":"sqwish","key":"sqwish","value":{"rev":"28-cc159dd5fd420432a7724c46456f4958"}}, +{"id":"srand","key":"srand","value":{"rev":"16-22f98b1b1a208c22dfbe95aa889cd08e"}}, +{"id":"srcds","key":"srcds","value":{"rev":"3-bd79da47d36662609c0c75c713874fd1"}}, +{"id":"srs","key":"srs","value":{"rev":"32-c8c961ea10fc60fc428bddff133a8aba"}}, +{"id":"sserve","key":"sserve","value":{"rev":"3-957457395e2c61c20bcb727fc19fc4d4"}}, +{"id":"ssh","key":"ssh","value":{"rev":"3-c7dda694daa7ca1e264b494400edfa18"}}, +{"id":"ssh-agent","key":"ssh-agent","value":{"rev":"3-dbc87102ed1f17b7253a1901976dfa9d"}}, +{"id":"sshmq","key":"sshmq","value":{"rev":"3-052f36ca47cddf069a1700fc79a08930"}}, +{"id":"stache","key":"stache","value":{"rev":"11-9bb0239153147939a25fd20184f20fc6"}}, +{"id":"stack","key":"stack","value":{"rev":"7-e18abdce80008ac9e2feb66f3407fe67"}}, +{"id":"stack-trace","key":"stack-trace","value":{"rev":"13-9fe20c5a3e34a5e4472c6f4fdea86efc"}}, +{"id":"stack.static","key":"stack.static","value":{"rev":"7-ad064faf6255a632cefa71a6ff3c47f3"}}, +{"id":"stack2","key":"stack2","value":{"rev":"3-e5f8ea94c0dd2b4c7f5d3941d689622b"}}, +{"id":"stackedy","key":"stackedy","value":{"rev":"25-f988787b9b5720dece8ae3cb83a2bc12"}}, +{"id":"stage","key":"stage","value":{"rev":"7-d2931fcb473f63320067c3e75638924e"}}, +{"id":"stalker","key":"stalker","value":{"rev":"19-ece35be8695846fc766a71c0022d4ff7"}}, +{"id":"startupify","key":"startupify","value":{"rev":"11-3c87ef5e9ee33122cf3515a63b22c52a"}}, +{"id":"stash","key":"stash","value":{"rev":"10-41239a1df74b69fe7bb3e360f9a35ad1"}}, +{"id":"statechart","key":"statechart","value":{"rev":"6-97e6947b5bbaf14bdb55efa6dfa5e19c"}}, +{"id":"stately","key":"stately","value":{"rev":"6-f8a257cd9fdd84947ff2cf7357afc88b"}}, +{"id":"stathat","key":"stathat","value":{"rev":"3-b79b7bd50bb1e4dcc1301424104a5b36"}}, +{"id":"station","key":"station","value":{"rev":"5-92e6387138b1ee10976bd92dd48ea818"}}, +{"id":"statistics","key":"statistics","value":{"rev":"3-a1c3a03d833c6f02fde403950790e9b4"}}, +{"id":"stats","key":"stats","value":{"rev":"13-fe513ea6b3b5b6b31935fd3464ec5d3b"}}, +{"id":"std","key":"std","value":{"rev":"55-58a4f182c3f51996a0d60a6f575cfefd"}}, +{"id":"steam","key":"steam","value":{"rev":"5-bffdf677d2d1ae3e8236892e68a3dd66"}}, +{"id":"stem","key":"stem","value":{"rev":"36-4f1c38eff671ede0241038017a810132"}}, +{"id":"step","key":"step","value":{"rev":"8-048d7707a45af3a7824a478d296cc467"}}, +{"id":"stepc","key":"stepc","value":{"rev":"3-be85de2c02f4889fdf77fda791feefea"}}, +{"id":"stepper","key":"stepper","value":{"rev":"9-cc54000dc973835c38e139b30cbb10cc"}}, +{"id":"steps","key":"steps","value":{"rev":"5-3561591b425e1fff52dc397f9688feae"}}, +{"id":"stextile","key":"stextile","value":{"rev":"29-9a8b6de917df01d322847f112dcadadf"}}, +{"id":"stitch","key":"stitch","value":{"rev":"13-8a50e4a4f015d1afe346aa6b6c8646bd"}}, +{"id":"stitchup","key":"stitchup","value":{"rev":"7-fe14604e3a8b82f62c38d0cb3ccce61e"}}, +{"id":"stomp","key":"stomp","value":{"rev":"15-e0430c0be74cd20c5204b571999922f7"}}, +{"id":"stopwords","key":"stopwords","value":{"rev":"3-2dd9fade030cfcce85848c5b3b4116fc"}}, +{"id":"store","key":"store","value":{"rev":"9-5537cc0f4827044504e8dae9617c9347"}}, +{"id":"store.js","key":"store.js","value":{"rev":"22-116c9a6194703ea98512d89ec5865e3d"}}, +{"id":"stories","key":"stories","value":{"rev":"11-244ca52d0a41f70bc4dfa0aca0f82a40"}}, +{"id":"storify","key":"storify","value":{"rev":"5-605b197219e916df561dd7722af97e2e"}}, +{"id":"storify-templates","key":"storify-templates","value":{"rev":"3-0960756aa963cee21b679a59cef114a1"}}, +{"id":"storm","key":"storm","value":{"rev":"3-9052e6af8528d1bc0d96021dfa21dd3e"}}, +{"id":"stove","key":"stove","value":{"rev":"17-01c9f0e87398e6bfa03a764e89295e00"}}, +{"id":"str.js","key":"str.js","value":{"rev":"9-301f54edeebde3c5084c3a8071e2aa09"}}, +{"id":"strack","key":"strack","value":{"rev":"10-5acf78ae6a417a82b49c221d606b8fed"}}, +{"id":"strappy","key":"strappy","value":{"rev":"3-fb63a899ff82c0f1142518cc263dd632"}}, +{"id":"strata","key":"strata","value":{"rev":"31-de615eccbda796e2bea405c2806ec792"}}, +{"id":"stream-buffers","key":"stream-buffers","value":{"rev":"7-d8fae628da43d377dd4e982f5bf7b09b"}}, +{"id":"stream-handler","key":"stream-handler","value":{"rev":"7-333eb7dcf2aeb550f948ee2162b21be2"}}, +{"id":"stream-stack","key":"stream-stack","value":{"rev":"22-a70979df042e2ff760b2d900259c84a1"}}, +{"id":"streamer","key":"streamer","value":{"rev":"17-dd16e62ada55311a793fbf7963a920f3"}}, +{"id":"streamlib","key":"streamlib","value":{"rev":"3-5125b1e6a92290f8d7f5fdad71e13fc2"}}, +{"id":"streamline","key":"streamline","value":{"rev":"152-0931f5697340c62e05dcd1a741afd38f"}}, +{"id":"streamline-streams","key":"streamline-streams","value":{"rev":"3-3224030ecfbf5a8ac5d218ab56dee545"}}, +{"id":"streamline-util","key":"streamline-util","value":{"rev":"3-a8047ecf37b985ec836c552fd2bcbf78"}}, +{"id":"streamlogger","key":"streamlogger","value":{"rev":"3-43f93a109774591f1409b0b86c363623"}}, +{"id":"streamlogger-fixed","key":"streamlogger-fixed","value":{"rev":"3-6e48de9e269b4f5bf979c560190b0680"}}, +{"id":"strftime","key":"strftime","value":{"rev":"25-74130d5c9cbf91025ce91f0463a9b1b5"}}, +{"id":"string-color","key":"string-color","value":{"rev":"3-9f336bf06bd80b2d2338c216099421c7"}}, +{"id":"strscan","key":"strscan","value":{"rev":"8-3e0d182a8d0c786754c555c0ac12e9d9"}}, +{"id":"strtok","key":"strtok","value":{"rev":"8-a1a1da7946d62fabb6cca56fc218654b"}}, +{"id":"struct","key":"struct","value":{"rev":"3-ff0f9cb336df73a5a19a38e17633583c"}}, +{"id":"structr","key":"structr","value":{"rev":"21-69b3672dab234d0effec5a72a2b1791c"}}, +{"id":"sty","key":"sty","value":{"rev":"9-ce5691388abc3ccaff23030bff190914"}}, +{"id":"style","key":"style","value":{"rev":"7-342569887fb53caddc60d745706cd66e"}}, +{"id":"style-compile","key":"style-compile","value":{"rev":"5-6f8b86c94c5344ec280a28f025691996"}}, +{"id":"styleless","key":"styleless","value":{"rev":"5-c236b81c38193ad71d7ed7c5b571995d"}}, +{"id":"stylewriter","key":"stylewriter","value":{"rev":"3-25a3f83252b220d8db0aa70c8fc1da4f"}}, +{"id":"stylus","key":"stylus","value":{"rev":"135-8b69084f50a95c297d1044e48b39a6c9"}}, +{"id":"stylus-blueprint","key":"stylus-blueprint","value":{"rev":"5-50ec59a9fa161ca68dac765f2281c13e"}}, +{"id":"stylus-sprite","key":"stylus-sprite","value":{"rev":"27-db597a75467baaad94de287494e9c21e"}}, +{"id":"styout","key":"styout","value":{"rev":"9-9d9460bb9bfa253ed0b5fbeb27f7710a"}}, +{"id":"sugar","key":"sugar","value":{"rev":"5-2722426edc51a7703f5c37306b03a8c4"}}, +{"id":"sugardoll","key":"sugardoll","value":{"rev":"16-cfadf4e7108357297be180a3868130db"}}, +{"id":"suger-pod","key":"suger-pod","value":{"rev":"5-c812b763cf6cdd218c6a18e1a4e2a4ac"}}, +{"id":"sunny","key":"sunny","value":{"rev":"3-c26b62eef1eeeeef58a7ea9373df3b39"}}, +{"id":"superagent","key":"superagent","value":{"rev":"3-1b32cc8372b7713f973bb1e044e6a86f"}}, +{"id":"supermarket","key":"supermarket","value":{"rev":"20-afa8a26ecec3069717c8ca7e5811cc31"}}, +{"id":"supershabam-websocket","key":"supershabam-websocket","value":{"rev":"7-513117fb37b3ab7cdaeeae31589e212e"}}, +{"id":"supervisor","key":"supervisor","value":{"rev":"16-2c6c141d018ef8927acee79f31d466ff"}}, +{"id":"supervisord","key":"supervisord","value":{"rev":"7-359ba115e5e10b5c95ef1a7562ad7a45"}}, +{"id":"svg2jadepartial","key":"svg2jadepartial","value":{"rev":"9-4a6260dd5d7c14801e8012e3ba7510f5"}}, +{"id":"swake","key":"swake","value":{"rev":"5-6f780362f0317427752d87cc5c640021"}}, +{"id":"swarm","key":"swarm","value":{"rev":"43-f1a963a0aeb043bf69529a82798b3afc"}}, +{"id":"sweet","key":"sweet","value":{"rev":"5-333f4d3529f65ce53b037cc282e3671d"}}, +{"id":"swig","key":"swig","value":{"rev":"29-53294b9d4f350192cf65817692092bfa"}}, +{"id":"switchback","key":"switchback","value":{"rev":"3-e117371d415f4a3d4ad30e78f5ec28bf"}}, +{"id":"switchboard","key":"switchboard","value":{"rev":"3-504d6c1e45165c54fbb1d3025d5120d7"}}, +{"id":"swiz","key":"swiz","value":{"rev":"82-cfb7840376b57896fba469e5c6ff3786"}}, +{"id":"swizec-bitly","key":"swizec-bitly","value":{"rev":"3-a705807238b8ef3ff2d008910bc350c3"}}, +{"id":"sws","key":"sws","value":{"rev":"5-bc5e8558bde6c2ae971abdd448a006d2"}}, +{"id":"symbie","key":"symbie","value":{"rev":"5-3184f869ed386341a4cdc35d85efb62a"}}, +{"id":"symbox","key":"symbox","value":{"rev":"5-eed33350cbb763726335ef1df74a6591"}}, +{"id":"synapse","key":"synapse","value":{"rev":"3-a9672d5159c0268babbfb94d7554d4bb"}}, +{"id":"sync","key":"sync","value":{"rev":"65-89fa6b8ab2df135d57e0bba4e921ad3b"}}, +{"id":"synchro","key":"synchro","value":{"rev":"21-6a881704308298f1894509a5b59287ae"}}, +{"id":"synchronous","key":"synchronous","value":{"rev":"7-bf89d61f001d994429e0fd12c26c2676"}}, +{"id":"syncler","key":"syncler","value":{"rev":"2-12870522e069945fc12f7d0f612700ee"}}, +{"id":"syncrepl","key":"syncrepl","value":{"rev":"5-e9234a1d8a529bc0d1b01c3b77c69c30"}}, +{"id":"synct","key":"synct","value":{"rev":"3-3664581b69e6f40dabc90525217f46cd"}}, +{"id":"syndicate","key":"syndicate","value":{"rev":"7-1db2b05d6b3e55fa622c3c26df7f9cad"}}, +{"id":"syslog","key":"syslog","value":{"rev":"5-d52fbc739505a2a194faf9a32da39d23"}}, +{"id":"syslog-node","key":"syslog-node","value":{"rev":"15-039177b9c516fd8d0b31faf92aa73f6f"}}, +{"id":"system","key":"system","value":{"rev":"18-33152371e0696a853ddb8b2234a6dfea"}}, +{"id":"taazr-uglify","key":"taazr-uglify","value":{"rev":"7-5c63dc75aa7c973df102c298291be8a5"}}, +{"id":"table","key":"table","value":{"rev":"9-a8a46ddf3a7cab63a0228303305cc32e"}}, +{"id":"tache.io","key":"tache.io","value":{"rev":"7-5639c70dc56b0a6333b568af377bb216"}}, +{"id":"taco","key":"taco","value":{"rev":"3-97cfbd54b4053c9e01e18af7c3902d1a"}}, +{"id":"tad","key":"tad","value":{"rev":"3-529ebda7291e24ae020d5c2931ba22cd"}}, +{"id":"tafa-misc-util","key":"tafa-misc-util","value":{"rev":"19-52984b66029c7d5cc78d3e2ae88c98d6"}}, +{"id":"tag","key":"tag","value":{"rev":"3-80b0d526b10a26f41fe73978843a07b9"}}, +{"id":"taglib","key":"taglib","value":{"rev":"3-efd2e6bc818bf3b385df40dfae506fa5"}}, +{"id":"tail","key":"tail","value":{"rev":"21-09bce80ad6aa4b01c6a70825fd141fd4"}}, +{"id":"tails","key":"tails","value":{"rev":"14-3ba6976831b1388e14235622ab001681"}}, +{"id":"tamejs","key":"tamejs","value":{"rev":"39-9a3657941df3bd24c43b5473e9f3b4c8"}}, +{"id":"taobao-js-api","key":"taobao-js-api","value":{"rev":"7-d46c8b48364b823dabf808f2b30e1eb8"}}, +{"id":"tap","key":"tap","value":{"rev":"35-1b8e553cf848f5ab27711efa0e74a033"}}, +{"id":"tap-assert","key":"tap-assert","value":{"rev":"19-f2960c64bcfa6ce4ed73e870d8d9e3fa"}}, +{"id":"tap-consumer","key":"tap-consumer","value":{"rev":"3-3e38aafb6d2d840bdb20818efbc75df4"}}, +{"id":"tap-global-harness","key":"tap-global-harness","value":{"rev":"3-f32589814daf8c1816c1f5a24de4ad12"}}, +{"id":"tap-harness","key":"tap-harness","value":{"rev":"7-a5af01384152c452abc11d4e641e6157"}}, +{"id":"tap-producer","key":"tap-producer","value":{"rev":"3-2db67a9541c37c912d4de2576bb3caa0"}}, +{"id":"tap-results","key":"tap-results","value":{"rev":"5-b8800525438965e38dc586e6b5cb142d"}}, +{"id":"tap-runner","key":"tap-runner","value":{"rev":"11-3975c0f5044530b61158a029899f4c03"}}, +{"id":"tap-test","key":"tap-test","value":{"rev":"5-0a3bba26b6b94dae8b7f59712335ee98"}}, +{"id":"tar","key":"tar","value":{"rev":"6-94226dd7add6ae6a1e68088360a466e4"}}, +{"id":"tar-async","key":"tar-async","value":{"rev":"37-d6579d43c1ee2f41205f28b0cde5da23"}}, +{"id":"tar-js","key":"tar-js","value":{"rev":"5-6826f2aad965fb532c7403964ce80d85"}}, +{"id":"task","key":"task","value":{"rev":"3-81f72759a5b64dff88a01a4838cc4a23"}}, +{"id":"task-extjs","key":"task-extjs","value":{"rev":"14-c9ba76374805425c332e0c66725e885c"}}, +{"id":"task-joose-nodejs","key":"task-joose-nodejs","value":{"rev":"20-6b8e4d24323d3240d5ee790d00c0d96a"}}, +{"id":"task-joose-stable","key":"task-joose-stable","value":{"rev":"32-026eada52cd5dd17a680359daec4917a"}}, +{"id":"tasks","key":"tasks","value":{"rev":"5-84e8f83d0c6ec27b4f05057c48063d62"}}, +{"id":"tav","key":"tav","value":{"rev":"3-da9899817edd20f0c73ad09bdf540cc6"}}, +{"id":"taxman","key":"taxman","value":{"rev":"5-9b9c68db8a1c8efedad800026cb23ae4"}}, +{"id":"tbone","key":"tbone","value":{"rev":"3-5789b010d0b1f1c663750c894fb5c570"}}, +{"id":"tcp-proxy","key":"tcp-proxy","value":{"rev":"3-118c6dc26d11537cf157fe2f28b05af5"}}, +{"id":"teamgrowl","key":"teamgrowl","value":{"rev":"8-3d13200b3bfeeace0787f9f9f027216d"}}, +{"id":"teamgrowl-server","key":"teamgrowl-server","value":{"rev":"8-a14dc4a26c2c06a4d9509eaff6e24735"}}, +{"id":"telehash","key":"telehash","value":{"rev":"6-4fae3629c1e7e111ba3e486b39a29913"}}, +{"id":"telemail","key":"telemail","value":{"rev":"3-60928460428265fc8002ca61c7f23abe"}}, +{"id":"telemetry","key":"telemetry","value":{"rev":"5-1be1d37ef62dc786b0a0f0d2d7984eb1"}}, +{"id":"teleport","key":"teleport","value":{"rev":"36-5b55a43ba83f4fe1a547c04e29139c3d"}}, +{"id":"teleport-dashboard","key":"teleport-dashboard","value":{"rev":"7-4cbc728d7a3052848a721fcdd92dda30"}}, +{"id":"teleport-site","key":"teleport-site","value":{"rev":"3-aeb8c0a93b7b0bcd7a30fe33bf23808c"}}, +{"id":"telnet","key":"telnet","value":{"rev":"11-7a587104b94ce135315c7540eb3493f6"}}, +{"id":"telnet-protocol","key":"telnet-protocol","value":{"rev":"3-8fcee2ed02c2e603c48e51e90ae78a00"}}, +{"id":"temp","key":"temp","value":{"rev":"6-91ef505da0a0860a13c0eb1a5d2531e6"}}, +{"id":"tempPath","key":"tempPath","value":{"rev":"3-34f2c1937d97207245986c344136547c"}}, +{"id":"tempis","key":"tempis","value":{"rev":"3-b2c0989068cc8125a519d19b9c79ffb6"}}, +{"id":"template","key":"template","value":{"rev":"6-d0088c6a5a7610570920db0f5c950bf9"}}, +{"id":"template-engine","key":"template-engine","value":{"rev":"3-3746216e1e2e456dbb0fd2f9070c1619"}}, +{"id":"tengwar","key":"tengwar","value":{"rev":"3-645a00f03e1e9546631ac22c37e1f3b4"}}, +{"id":"tenjin","key":"tenjin","value":{"rev":"5-0925c7535455266125b7730296c66356"}}, +{"id":"teriaki","key":"teriaki","value":{"rev":"3-d3c17f70d8697c03f43a7eae75f8c089"}}, +{"id":"terminal","key":"terminal","value":{"rev":"11-0e024d173ee3c28432877c0c5f633f19"}}, +{"id":"termspeak","key":"termspeak","value":{"rev":"7-fdfc93dd7d0d65fe502cabca191d8496"}}, +{"id":"termutil","key":"termutil","value":{"rev":"5-bccf8377ff28bc1f07f8b4b44d1e2335"}}, +{"id":"test","key":"test","value":{"rev":"38-129620013bbd3ec13617c403b02b52f1"}}, +{"id":"test-cmd","key":"test-cmd","value":{"rev":"35-7dd417a80390c2c124c66273ae33bd07"}}, +{"id":"test-helper","key":"test-helper","value":{"rev":"3-7b29af65825fc46d0603a39cdc6c95b4"}}, +{"id":"test-report","key":"test-report","value":{"rev":"5-e51cd1069b6cc442707f0861b35851be"}}, +{"id":"test-report-view","key":"test-report-view","value":{"rev":"3-9ba670940a8235eaef9b957dde6379af"}}, +{"id":"test-run","key":"test-run","value":{"rev":"20-6de89383602e6843d9376a78778bec19"}}, +{"id":"test_it","key":"test_it","value":{"rev":"5-be5cd436b9145398fa88c15c1269b102"}}, +{"id":"testbed","key":"testbed","value":{"rev":"2-db233788f7e516f227fac439d9450ef4"}}, +{"id":"testharness","key":"testharness","value":{"rev":"46-787468cb68ec31b442327639dcc0a4e5"}}, +{"id":"testingey","key":"testingey","value":{"rev":"17-a7ad6a9ff5721ae449876f6448d6f22f"}}, +{"id":"testnode","key":"testnode","value":{"rev":"9-cb63c450b241806e2271cd56fe502395"}}, +{"id":"testosterone","key":"testosterone","value":{"rev":"35-278e8af2b59bb6caf56728c67f720c37"}}, +{"id":"testqueue","key":"testqueue","value":{"rev":"3-59c574aeb345ef2d6e207a342be3f497"}}, +{"id":"testrunner","key":"testrunner","value":{"rev":"7-152e7d4a97f6cf6f00e22140e1969664"}}, +{"id":"testy","key":"testy","value":{"rev":"5-e8f4c9f4a799b6f8ab4effc21c3073a0"}}, +{"id":"text","key":"text","value":{"rev":"6-58a79b0db4968d6ad233898744a75351"}}, +{"id":"textareaserver","key":"textareaserver","value":{"rev":"3-f032b1397eb5e6369e1ac0ad1e78f466"}}, +{"id":"textile","key":"textile","value":{"rev":"6-2a8db66876f0119883449012c9c54c47"}}, +{"id":"textual","key":"textual","value":{"rev":"3-0ad9d5d3403b239185bad403625fed19"}}, +{"id":"tf2logparser","key":"tf2logparser","value":{"rev":"5-ffbc427b95ffeeb013dc13fa2b9621e3"}}, +{"id":"tfe-express","key":"tfe-express","value":{"rev":"3-b68ac01185885bcd22fa430ddb97e757"}}, +{"id":"tfidf","key":"tfidf","value":{"rev":"13-988808af905397dc103a0edf8c7c8a9f"}}, +{"id":"theBasics","key":"theBasics","value":{"rev":"7-9ebef2e59e1bd2fb3544ed16e1dc627b"}}, +{"id":"thefunlanguage.com","key":"thefunlanguage.com","value":{"rev":"3-25d56a3a4f639af23bb058db541bffe0"}}, +{"id":"thelinuxlich-docco","key":"thelinuxlich-docco","value":{"rev":"7-2ac0969da67ead2fa8bc0b21880b1d6b"}}, +{"id":"thelinuxlich-vogue","key":"thelinuxlich-vogue","value":{"rev":"5-ebc0a28cf0ae447b7ebdafc51c460bc0"}}, +{"id":"thepusher","key":"thepusher","value":{"rev":"5-b80cce6f81b1cae7373cd802df34c05c"}}, +{"id":"thetvdb","key":"thetvdb","value":{"rev":"3-a3a017a90b752d8158bf6dfcbcfdf250"}}, +{"id":"thirty-two","key":"thirty-two","value":{"rev":"3-1d4761ba7c4fa475e0c69e9c96d6ac04"}}, +{"id":"thoonk","key":"thoonk","value":{"rev":"15-c62c90d7e9072d96302d3a534ce943bb"}}, +{"id":"thrift","key":"thrift","value":{"rev":"14-447a41c9b655ec06e8e4854d5a55523a"}}, +{"id":"throttle","key":"throttle","value":{"rev":"3-8a3b3c657c49ede67c883806fbfb4df6"}}, +{"id":"thyme","key":"thyme","value":{"rev":"5-f06104f10d43a2b4cbcc7621ed45eacf"}}, +{"id":"tiamat","key":"tiamat","value":{"rev":"44-810633d6cd5edaa0510fe0f38c02ad58"}}, +{"id":"tictoc","key":"tictoc","value":{"rev":"3-0be6cf95d4466595376dadd0fc08bd95"}}, +{"id":"tidy","key":"tidy","value":{"rev":"3-25116d4dcf6765ef2a09711ecc1e03c9"}}, +{"id":"tiers","key":"tiers","value":{"rev":"3-ffaa8ffe472fe703de8f0bbeb8af5621"}}, +{"id":"tilejson","key":"tilejson","value":{"rev":"5-76b990dd945fb412ed00a96edc86b59d"}}, +{"id":"tilelive","key":"tilelive","value":{"rev":"57-9283e846e77263ed6e7299680d6b4b06"}}, +{"id":"tilelive-mapnik","key":"tilelive-mapnik","value":{"rev":"31-30f871ede46789fc6a36f427a1a99fff"}}, +{"id":"tilemill","key":"tilemill","value":{"rev":"19-7b884c9d707dd34f21cb71e88b45fc73"}}, +{"id":"tilestream","key":"tilestream","value":{"rev":"76-3a29ba96ecdb6c860c211ae8f2d909a9"}}, +{"id":"timbits","key":"timbits","value":{"rev":"59-b48dde4a210ec9fb4c33c07a52bce61e"}}, +{"id":"time","key":"time","value":{"rev":"51-907f587206e6a27803a3570e42650adc"}}, +{"id":"timeTraveller","key":"timeTraveller","value":{"rev":"7-389de8c8e86daea495d14aeb2b77df38"}}, +{"id":"timeout","key":"timeout","value":{"rev":"11-8e53dedecfaf6c4f1086eb0f43c71325"}}, +{"id":"timer","key":"timer","value":{"rev":"5-a8bcbb898a807e6662b54ac988fb967b"}}, +{"id":"timerjs","key":"timerjs","value":{"rev":"3-7d24eb268746fdb6b5e9be93bec93f1b"}}, +{"id":"timespan","key":"timespan","value":{"rev":"12-315b2793cbf28a18cea36e97a3c8a55f"}}, +{"id":"timezone","key":"timezone","value":{"rev":"35-2741d5d3b68a953d4cb3a596bc2bc15e"}}, +{"id":"tiny","key":"tiny","value":{"rev":"9-a61d26d02ce39381f7e865ad82494692"}}, +{"id":"tld","key":"tld","value":{"rev":"3-5ce4b4e48a11413ad8a1f3bfd0d0b778"}}, +{"id":"tldextract","key":"tldextract","value":{"rev":"7-620962e27145bd9fc17dc406c38b0c32"}}, +{"id":"tmp","key":"tmp","value":{"rev":"23-20f5c14244d58f35bd3e970f5f65cc32"}}, +{"id":"tmpl","key":"tmpl","value":{"rev":"5-5894c206e15fa58ab9415706b9d53f1f"}}, +{"id":"tmpl-precompile","key":"tmpl-precompile","value":{"rev":"15-3db34b681596b258cae1dae8cc24119d"}}, +{"id":"tmppckg","key":"tmppckg","value":{"rev":"11-b3a13e1280eb9cbef182c1f3f24bd570"}}, +{"id":"tnetstrings","key":"tnetstrings","value":{"rev":"3-d6b8ed2390a3e38138cb01b82d820079"}}, +{"id":"toDataURL","key":"toDataURL","value":{"rev":"3-1ea3cb62666b37343089bb9ef48fbace"}}, +{"id":"toYaml","key":"toYaml","value":{"rev":"11-3c629e3859c70d57b1ae51b2ac459011"}}, +{"id":"tob","key":"tob","value":{"rev":"7-376c174d06a675855406cfcdcacf61f5"}}, +{"id":"tobi","key":"tobi","value":{"rev":"50-d8749ac3739b042afe82657802bc3ba8"}}, +{"id":"toddick","key":"toddick","value":{"rev":"13-db528ef519f57b8c1d752ad7270b4d05"}}, +{"id":"tokenizer","key":"tokenizer","value":{"rev":"5-f6524fafb16059b66074cd04bf248a03"}}, +{"id":"tokyotosho","key":"tokyotosho","value":{"rev":"5-7432e0207165d9c165fd73d2a23410d6"}}, +{"id":"tolang","key":"tolang","value":{"rev":"7-65dbdf56b039f680e61a1e1d7feb9fb1"}}, +{"id":"toolkit","key":"toolkit","value":{"rev":"13-58075a57a6069dc39f98e72d473a0c30"}}, +{"id":"tools","key":"tools","value":{"rev":"3-ba301d25cfc6ad71dd68c811ea97fa01"}}, +{"id":"topcube","key":"topcube","value":{"rev":"29-736b3816d410f626dbc4da663acb05aa"}}, +{"id":"torrent-search","key":"torrent-search","value":{"rev":"7-7dd48fac0c1f99f34fad7da365085b6c"}}, +{"id":"tosource","key":"tosource","value":{"rev":"5-13483e2c11b07611c26b37f2e76a0bf3"}}, +{"id":"tplcpl","key":"tplcpl","value":{"rev":"15-8ba1e6d14ad6b8eb71b703e22054ac0a"}}, +{"id":"tracejs","key":"tracejs","value":{"rev":"23-1ffec83afc19855bcbed8049a009a910"}}, +{"id":"traceur","key":"traceur","value":{"rev":"9-a48f7e4cb1fb452125d81c62c8ab628b"}}, +{"id":"traceurl","key":"traceurl","value":{"rev":"21-e016db44a86b124ea00411f155d884d4"}}, +{"id":"tracey","key":"tracey","value":{"rev":"5-76699aab64e89271cbb7df80a00d3583"}}, +{"id":"tracy","key":"tracy","value":{"rev":"5-412f78082ba6f4c3c7d5328cf66d2e10"}}, +{"id":"traits","key":"traits","value":{"rev":"10-3a37dbec4b78518c00c577f5e286a9b9"}}, +{"id":"tramp","key":"tramp","value":{"rev":"5-3b6d27b8b432b925b7c9fc088e84d8e4"}}, +{"id":"transcode","key":"transcode","value":{"rev":"6-a6494707bd94b5e6d1aa9df3dbcf8d7c"}}, +{"id":"transformer","key":"transformer","value":{"rev":"15-7738ac7c02f03d64f73610fbf7ed92a6"}}, +{"id":"transformjs","key":"transformjs","value":{"rev":"5-f1ab667c430838e1d3238e1f878998e2"}}, +{"id":"transitive","key":"transitive","value":{"rev":"43-841de40a5e3434bd51a1c8f19891f982"}}, +{"id":"translate","key":"translate","value":{"rev":"12-f3ddbbada2f109843c5422d83dd7a203"}}, +{"id":"transliteration.ua","key":"transliteration.ua","value":{"rev":"3-f847c62d8749904fc7de6abe075e619a"}}, +{"id":"transmission","key":"transmission","value":{"rev":"9-587eaa395430036f17b175bc439eabb6"}}, +{"id":"transmogrify","key":"transmogrify","value":{"rev":"5-3e415cd9420c66551cccc0aa91b11d98"}}, +{"id":"transporter","key":"transporter","value":{"rev":"6-698b696890bf01d751e9962bd86cfe7e"}}, +{"id":"traverse","key":"traverse","value":{"rev":"60-9432066ab44fbb0e913227dc62c953d9"}}, +{"id":"traverser","key":"traverser","value":{"rev":"11-1d50662f13134868a1df5019d99bf038"}}, +{"id":"treeeater","key":"treeeater","value":{"rev":"56-2c8a9fd3e842b221ab8da59c6d847327"}}, +{"id":"treelib","key":"treelib","value":{"rev":"13-212ccc836a943c8b2a5342b65ab9edf3"}}, +{"id":"trees","key":"trees","value":{"rev":"3-3ee9e9cf3fd8aa985e32b3d9586a7c0e"}}, +{"id":"trentm-datetime","key":"trentm-datetime","value":{"rev":"3-740a291379ddf97bda2aaf2ff0e1654d"}}, +{"id":"trentm-git","key":"trentm-git","value":{"rev":"3-b81ce3764a45e5d0862488fab9fac486"}}, +{"id":"trentm-hashlib","key":"trentm-hashlib","value":{"rev":"3-4b4175b6a8702bdb9c1fe5ac4786761b"}}, +{"id":"trial","key":"trial","value":{"rev":"3-cf77f189409517495dd8259f86e0620e"}}, +{"id":"trie","key":"trie","value":{"rev":"3-6cc3c209cf4aae5a4f92e1ca38c4c54c"}}, +{"id":"trollop","key":"trollop","value":{"rev":"6-75076593614c9cd51d61a76f73d2c5b5"}}, +{"id":"trollscript","key":"trollscript","value":{"rev":"5-fcf646075c5be575b9174f84d08fbb37"}}, +{"id":"trollscriptjs","key":"trollscriptjs","value":{"rev":"3-1dfd1acd3d15c0bd18ea407e3933b621"}}, +{"id":"tropo-webapi","key":"tropo-webapi","value":{"rev":"11-5106730dbd79167df38812ffaa912ded"}}, +{"id":"tropo-webapi-node","key":"tropo-webapi-node","value":{"rev":"15-483c64bcbf1dcadaea30e78d7bc3ebbc"}}, +{"id":"trundle","key":"trundle","value":{"rev":"3-2af32ed348fdedebd1077891bb22a756"}}, +{"id":"trust-reverse-proxy","key":"trust-reverse-proxy","value":{"rev":"6-ba5bed0849617e0390f0e24750bf5747"}}, +{"id":"trying","key":"trying","value":{"rev":"3-43b417160b178c710e0d85af6b3d56e7"}}, +{"id":"ttapi","key":"ttapi","value":{"rev":"51-727e47d8b383b387a498711c07ce4de6"}}, +{"id":"tubbs","key":"tubbs","value":{"rev":"7-b386e59f2205b22615a376f5ddee3eb0"}}, +{"id":"tuild","key":"tuild","value":{"rev":"13-4a2b92f95a0ee342c060974ce7a0021d"}}, +{"id":"tumbler","key":"tumbler","value":{"rev":"5-ff16653ab92d0af5e70d9caa88f3b7ed"}}, +{"id":"tumbler-sprite","key":"tumbler-sprite","value":{"rev":"3-604d25b7bb9e32b92cadd75aeb23997c"}}, +{"id":"tumblr","key":"tumblr","value":{"rev":"9-14d160f1f2854330fba300b3ea233893"}}, +{"id":"tumblr2","key":"tumblr2","value":{"rev":"7-29bb5d86501cdbcef889289fe7f4b51e"}}, +{"id":"tumblrrr","key":"tumblrrr","value":{"rev":"10-0c50379fbab7b39766e1a61379c39964"}}, +{"id":"tunguska","key":"tunguska","value":{"rev":"1-a6b24d2c2a5a9f091a9b6f13bac66927"}}, +{"id":"tupalocomapi","key":"tupalocomapi","value":{"rev":"3-a1cdf85a08784f62c2ec440a1ed90ad4"}}, +{"id":"turing","key":"turing","value":{"rev":"5-4ba083c8343718acb9450d96551b65c0"}}, +{"id":"tutti","key":"tutti","value":{"rev":"21-929cc205b3d8bc68f86aa63578e0af95"}}, +{"id":"tuttiserver","key":"tuttiserver","value":{"rev":"39-b3fe7cbaf2d43458dae061f37aa5ae18"}}, +{"id":"tuttiterm","key":"tuttiterm","value":{"rev":"7-6c0e9e7f6f137de0ee7c886351fdf373"}}, +{"id":"tvister","key":"tvister","value":{"rev":"7-963eab682ab09922a44fbca50c0ec019"}}, +{"id":"twbot","key":"twbot","value":{"rev":"15-923625f516566c977975b3da3d4bc46b"}}, +{"id":"tweasy","key":"tweasy","value":{"rev":"10-7215063e5729b1c114ef73f07a1368d3"}}, +{"id":"tweeter.js","key":"tweeter.js","value":{"rev":"3-bc8437157c11cf32eec168d7c71037bb"}}, +{"id":"tweetstream","key":"tweetstream","value":{"rev":"6-81a6bf2a3e29208e1c4c65a3958ee5d8"}}, +{"id":"twerk","key":"twerk","value":{"rev":"5-01cbfddf9ad25a67ff1e45ec39acb780"}}, +{"id":"twerp","key":"twerp","value":{"rev":"23-1b4726d1fef030a3dde6fae2cdfbb687"}}, +{"id":"twigjs","key":"twigjs","value":{"rev":"7-07b90e2c35c5c81d394b29086507de04"}}, +{"id":"twilio","key":"twilio","value":{"rev":"20-68d5439ecb1774226025e6f9125bbb86"}}, +{"id":"twilio-node","key":"twilio-node","value":{"rev":"13-84d31c2dc202df3924ed399289cbc1fc"}}, +{"id":"twiliode","key":"twiliode","value":{"rev":"3-6cbe432dd6c6d94d8a4faa6e0ea47dd3"}}, +{"id":"twill","key":"twill","value":{"rev":"5-3a0caf9c0e83ab732ae8ae61f4f17830"}}, +{"id":"twisted-deferred","key":"twisted-deferred","value":{"rev":"9-f35acecb8736d96582e1f9b62dd4ae47"}}, +{"id":"twitpic","key":"twitpic","value":{"rev":"11-55b11432a09edeec1189024f26a48153"}}, +{"id":"twitter","key":"twitter","value":{"rev":"60-9ad6368932c8a74ea5bd10dda993d74d"}}, +{"id":"twitter-client","key":"twitter-client","value":{"rev":"11-dc3da9e1724cf00aa86c1e7823cfd919"}}, +{"id":"twitter-connect","key":"twitter-connect","value":{"rev":"12-969292347a4251d121566169236a3091"}}, +{"id":"twitter-js","key":"twitter-js","value":{"rev":"24-251d0c54749e86bd544a15290e311370"}}, +{"id":"twitter-node","key":"twitter-node","value":{"rev":"12-a7ed6c69f05204de2e258f46230a05b6"}}, +{"id":"twitter-text","key":"twitter-text","value":{"rev":"16-978bda8ec4eaf68213d0ee54242feefa"}}, +{"id":"type","key":"type","value":{"rev":"3-c5b8b87cde9e27277302cb5cb6d00f85"}}, +{"id":"typecheck","key":"typecheck","value":{"rev":"5-79723661620bb0fb254bc7f888d6e937"}}, +{"id":"typed-array","key":"typed-array","value":{"rev":"3-89ac91e2a51a9e5872515d5a83691e83"}}, +{"id":"typhoon","key":"typhoon","value":{"rev":"23-2027c96b8fd971332848594f3b0526cb"}}, +{"id":"typogr","key":"typogr","value":{"rev":"13-2dfe00f08ee13e6b00a99df0a8f96718"}}, +{"id":"ua-parser","key":"ua-parser","value":{"rev":"14-d1a018354a583dba4506bdc0c04a416b"}}, +{"id":"uberblic","key":"uberblic","value":{"rev":"5-500704ed73f255eb5b86ad0a5e158bc9"}}, +{"id":"ucengine","key":"ucengine","value":{"rev":"5-1e8a91c813e39b6f1b9f988431bb65c8"}}, +{"id":"udon","key":"udon","value":{"rev":"3-9a819e835f88fc91272b6366c70d83c0"}}, +{"id":"ueberDB","key":"ueberDB","value":{"rev":"85-fa700e5a64efaf2e71de843d7175606c"}}, +{"id":"uglify-js","key":"uglify-js","value":{"rev":"30-9ac97132a90f94b0a3aadcd96ed51890"}}, +{"id":"uglify-js-middleware","key":"uglify-js-middleware","value":{"rev":"5-47bd98d7f1118f5cab617310d4022eb4"}}, +{"id":"uglifycss","key":"uglifycss","value":{"rev":"3-4eefc4632e6e61ec999e93a1e26e0c83"}}, +{"id":"ui","key":"ui","value":{"rev":"27-b6439c8fcb5feb1d8f722ac5a91727c0"}}, +{"id":"ukijs","key":"ukijs","value":{"rev":"13-a0d7b143104e6cc0760cbe7e61c4f293"}}, +{"id":"umecob","key":"umecob","value":{"rev":"19-960fef8b8b8468ee69096173baa63232"}}, +{"id":"underscore","key":"underscore","value":{"rev":"29-419857a1b0dc08311717d1f6066218b8"}}, +{"id":"underscore-data","key":"underscore-data","value":{"rev":"17-e763dd42ea6e4ab71bc442e9966e50e4"}}, +{"id":"underscore.date","key":"underscore.date","value":{"rev":"11-a1b5870b855d49a3bd37823a736e9f93"}}, +{"id":"underscore.inspector","key":"underscore.inspector","value":{"rev":"7-04d67b5bfe387391d461b11c6ddda231"}}, +{"id":"underscore.string","key":"underscore.string","value":{"rev":"31-4100a9e1f1d7e8dde007cc6736073e88"}}, +{"id":"underscorem","key":"underscorem","value":{"rev":"5-181dd113e62482020122e6a68f80cdc1"}}, +{"id":"underscorex","key":"underscorex","value":{"rev":"8-76b82cffecd4304822fbc346e6cebc1b"}}, +{"id":"underscorify","key":"underscorify","value":{"rev":"3-7bb03dccba21d30c50328e7d4878704e"}}, +{"id":"unicode","key":"unicode","value":{"rev":"45-2fc73b36aad2661e5bb2e703e62a6f71"}}, +{"id":"unicoder","key":"unicoder","value":{"rev":"3-6f6571d361217af7fea7c224ca8a1149"}}, +{"id":"unit","key":"unit","value":{"rev":"5-68847eeb11474765cf73f1e21ca4b839"}}, +{"id":"unite","key":"unite","value":{"rev":"3-a8812f4e77d1d1a9dc67c327d8e75b47"}}, +{"id":"unittest-jslint","key":"unittest-jslint","value":{"rev":"3-c371c63c7b68a32357becb7b6a02d048"}}, +{"id":"unixlib","key":"unixlib","value":{"rev":"3-41f4c2859ca92951cf40556faa4eacdb"}}, +{"id":"unlimit","key":"unlimit","value":{"rev":"3-f42d98066e6ebbc23ef67499845ac020"}}, +{"id":"unrequire","key":"unrequire","value":{"rev":"17-bc75241891ae005eb52844222daf8f97"}}, +{"id":"unshortener","key":"unshortener","value":{"rev":"15-0851cb8bc3c378c37a3df9760067a109"}}, +{"id":"unused","key":"unused","value":{"rev":"3-362e713349c4a5541564fa2de33d01ba"}}, +{"id":"upload","key":"upload","value":{"rev":"3-63aedcfb335754c3bca1675c4add51c4"}}, +{"id":"ups_node","key":"ups_node","value":{"rev":"15-fa6d0be3831ee09420fb703c4d508534"}}, +{"id":"upy","key":"upy","value":{"rev":"5-dab63054d02be71f9c2709659974a5e1"}}, +{"id":"uri","key":"uri","value":{"rev":"3-5baaa12433cff7539b1d39c0c7f62853"}}, +{"id":"uri-parser","key":"uri-parser","value":{"rev":"3-d7e81b08e8b3f6f5ac8c6b4220228529"}}, +{"id":"url","key":"url","value":{"rev":"3-0dfd5ec2904cb1f645fa7449dbb0ce52"}}, +{"id":"url-expander","key":"url-expander","value":{"rev":"21-73bf9fa3c98b15d5ef0ed9815d862953"}}, +{"id":"urllib","key":"urllib","value":{"rev":"5-b015944526c15589a1504d398dcb598a"}}, +{"id":"urn-parser","key":"urn-parser","value":{"rev":"3-08a35a166790ecf88729befd4ebc7bf1"}}, +{"id":"useless","key":"useless","value":{"rev":"3-9d7b7ab9d4811847ed6e99ce2226d687"}}, +{"id":"user-agent","key":"user-agent","value":{"rev":"16-ac00f085795346421242e3d4d75523ad"}}, +{"id":"useragent","key":"useragent","value":{"rev":"7-3184d8aba5540e6596da9e3635ee3c24"}}, +{"id":"useragent_parser","key":"useragent_parser","value":{"rev":"3-730427aba3f0825fd28850e96b1613d4"}}, +{"id":"utf7","key":"utf7","value":{"rev":"3-ad56e4c9ac5a509ff568a3cdf0ed074f"}}, +{"id":"utf8","key":"utf8","value":{"rev":"3-c530cad759dd6e4e471338a71a307434"}}, +{"id":"util","key":"util","value":{"rev":"3-0e55e3466bc3ea6aeda6384639e842c3"}}, +{"id":"utility-belt","key":"utility-belt","value":{"rev":"3-8de401b41ef742b3c0a144b99099771f"}}, +{"id":"utml","key":"utml","value":{"rev":"5-5f0f3de6f787056bd124ca98716fbc19"}}, +{"id":"uubench","key":"uubench","value":{"rev":"6-b6cb0756e35ce998b61bb9a6ea0f5732"}}, +{"id":"uuid","key":"uuid","value":{"rev":"13-3f014b236668ec5eb49d0a17ad54d397"}}, +{"id":"uuid-lib","key":"uuid-lib","value":{"rev":"3-3de40495439e240b5a41875c19c65b1a"}}, +{"id":"uuid-pure","key":"uuid-pure","value":{"rev":"19-b94e9f434901fe0a0bbfdfa06f785874"}}, +{"id":"uuid.js","key":"uuid.js","value":{"rev":"8-3232a97c9f4a2b601d207488350df01b"}}, +{"id":"v8-profiler","key":"v8-profiler","value":{"rev":"12-790c90391bcbec136e316e57b30a845c"}}, +{"id":"valentine","key":"valentine","value":{"rev":"35-dd4b0642aacaf833e1119fc42bb6e9df"}}, +{"id":"validate-json","key":"validate-json","value":{"rev":"5-6a71fb36b102b3a4c5f6cc35012518b3"}}, +{"id":"validations","key":"validations","value":{"rev":"5-7272c97d35e3269813d91f1ea06e7217"}}, +{"id":"validator","key":"validator","value":{"rev":"45-9983ff692c291143ba670b613e07ddab"}}, +{"id":"vanilla","key":"vanilla","value":{"rev":"3-2e1d05af0873386b7cd6d432f1e76217"}}, +{"id":"vapor","key":"vapor","value":{"rev":"1-e1f86f03c94a4b90bca347408dbc56ff"}}, +{"id":"vargs","key":"vargs","value":{"rev":"6-9e389cfd648034dd469348112eedb23b"}}, +{"id":"vash","key":"vash","value":{"rev":"9-85ade8b7249a0e8230e8f0aaf1c34e2a"}}, +{"id":"vbench","key":"vbench","value":{"rev":"3-059528251a566c6ac363e236212448ce"}}, +{"id":"vendor.js","key":"vendor.js","value":{"rev":"5-264b0f8a771cad113be6919b6004ff95"}}, +{"id":"ventstatus","key":"ventstatus","value":{"rev":"3-16aa39e22b149b23b64317991415f92c"}}, +{"id":"version-compare","key":"version-compare","value":{"rev":"3-a8d6eea31572fe973ddd98c0a8097bc6"}}, +{"id":"vertica","key":"vertica","value":{"rev":"37-035d50183c3ad3056db0d7a13c20005d"}}, +{"id":"vhost","key":"vhost","value":{"rev":"9-53bbdba14dae631a49e782d169e4fc5a"}}, +{"id":"vice","key":"vice","value":{"rev":"5-0f74600349f4540b1b104d4ebfec1309"}}, +{"id":"video","key":"video","value":{"rev":"10-65c0b603047188fe2b07cbd2e1c93fe7"}}, +{"id":"vie","key":"vie","value":{"rev":"5-94e23770c5a0510480a0bae07d846ebc"}}, +{"id":"view","key":"view","value":{"rev":"21-a2abdfc54ab732a906347090c68564a5"}}, +{"id":"vigilante","key":"vigilante","value":{"rev":"30-951541a8b2fc2364bb1ccd7cfae56482"}}, +{"id":"villain","key":"villain","value":{"rev":"10-8dbfc5db42230d8813e6cc61af14d575"}}, +{"id":"vine","key":"vine","value":{"rev":"17-e7ac5d190cacf0f2d17d27e37b2b9f5f"}}, +{"id":"vipe","key":"vipe","value":{"rev":"3-78996531221e08292b9ca3de6e19d578"}}, +{"id":"viralheat","key":"viralheat","value":{"rev":"3-b928ce797fd5955c766b6b7e9e9c8f54"}}, +{"id":"viralheat-sentiment","key":"viralheat-sentiment","value":{"rev":"3-5d083e0d141ecf36e06c7c2885b01b5c"}}, +{"id":"virustotal.js","key":"virustotal.js","value":{"rev":"3-074be49f7e877b154a2144ef844f78e9"}}, +{"id":"vk","key":"vk","value":{"rev":"9-48f53ea9ebe68c9d3af45eb601c71006"}}, +{"id":"vmcjs","key":"vmcjs","value":{"rev":"5-44d8dd906fa3530d2bfc2dfee7f498d4"}}, +{"id":"vogue","key":"vogue","value":{"rev":"38-891354d18638a26d5b5ba95933faae0e"}}, +{"id":"vogue-dtrejo","key":"vogue-dtrejo","value":{"rev":"3-3ef8d57d3b5c0aca297fe38c9040954f"}}, +{"id":"votizen-logger","key":"votizen-logger","value":{"rev":"4-ba0837a28693aba346fab885a3a8f315"}}, +{"id":"vows","key":"vows","value":{"rev":"80-43d6a81c184c06d73e692358e913821e"}}, +{"id":"vows-bdd","key":"vows-bdd","value":{"rev":"3-dc2a7013dd94b0b65a3ed3a8b69b680e"}}, +{"id":"vows-ext","key":"vows-ext","value":{"rev":"49-079067a01a681ca7df4dfaae74adb3fb"}}, +{"id":"vows-fluent","key":"vows-fluent","value":{"rev":"23-67625a035cedf90c8fed73722465ecea"}}, +{"id":"vows-is","key":"vows-is","value":{"rev":"68-45a13df422d08ab00cc8f785b6411741"}}, +{"id":"voyeur","key":"voyeur","value":{"rev":"5-56fe23f95df6ff648b67f1a9baf10d41"}}, +{"id":"vws.pubsub","key":"vws.pubsub","value":{"rev":"5-609497d66ab6a76c5201904e41b95715"}}, +{"id":"wabtools","key":"wabtools","value":{"rev":"7-b24cd7262720a29f59da103b7110325d"}}, +{"id":"wadey-ranger","key":"wadey-ranger","value":{"rev":"17-a0541bad0880ffc199e8b2ef4c80ddb8"}}, +{"id":"wagner","key":"wagner","value":{"rev":"3-4b76219928f409b7124e02c0518d6cb6"}}, +{"id":"wait","key":"wait","value":{"rev":"3-7f8a5f9c8e86da4f219353ae778868a9"}}, +{"id":"waiter","key":"waiter","value":{"rev":"5-680176b06719c9a8499725b0a617cdc9"}}, +{"id":"waitlist","key":"waitlist","value":{"rev":"17-f3b2a4cf58b940c3839debda23c12b8e"}}, +{"id":"wake_on_lan","key":"wake_on_lan","value":{"rev":"6-1295bb5c618495b74626aaaa1c644d32"}}, +{"id":"walk","key":"walk","value":{"rev":"22-c05e1e1252a59b1048a0b6464631d08b"}}, +{"id":"walker","key":"walker","value":{"rev":"18-e8a20efc286234fb20789dc68cd04cd1"}}, +{"id":"warp","key":"warp","value":{"rev":"19-c7f17d40291984cd27f1d57fe764a5d2"}}, +{"id":"watch","key":"watch","value":{"rev":"18-3bc43d36ea1dbf69b93d4ea3d9534d44"}}, +{"id":"watch-less","key":"watch-less","value":{"rev":"5-f69a778ee58c681ad3b24a766576c016"}}, +{"id":"watch-tree","key":"watch-tree","value":{"rev":"5-316b60e474c3ae6e97f7cdb06b65af78"}}, +{"id":"watch.js","key":"watch.js","value":{"rev":"11-8c02c7429f90ca5e756a131d85bd5a32"}}, +{"id":"watch_dir","key":"watch_dir","value":{"rev":"5-df0a592508e1e13f5d24c2863733a8b9"}}, +{"id":"watchable","key":"watchable","value":{"rev":"3-f8694ff0c3add9a1310f0980e24ea23b"}}, +{"id":"watchersto","key":"watchersto","value":{"rev":"5-06665e682f58f61831d41d08b4ea12e7"}}, +{"id":"watchman","key":"watchman","value":{"rev":"11-956ad2175d0c5b52e82988a697474244"}}, +{"id":"watchn","key":"watchn","value":{"rev":"15-9685afa8b501f8cd7e068beed1264cfe"}}, +{"id":"wave","key":"wave","value":{"rev":"7-d13054ac592b3b4f81147b6bc7a91ea1"}}, +{"id":"wax","key":"wax","value":{"rev":"71-2e8877b0b6df27c1375dcd7f6bbdb4b7"}}, +{"id":"waz-storage-js","key":"waz-storage-js","value":{"rev":"15-1aaa07353c3d25f5794fa004a23c4dfa"}}, +{"id":"wd","key":"wd","value":{"rev":"19-20c4ee8b83057ece691f9669e288059e"}}, +{"id":"weak","key":"weak","value":{"rev":"3-b774b8be74f33c843df631aa07854104"}}, +{"id":"web","key":"web","value":{"rev":"3-c571dee306020f6f92c7a3150e8023b1"}}, +{"id":"webapp","key":"webapp","value":{"rev":"5-60525be5734cf1d02a77508e5f46bafa"}}, +{"id":"webfonts","key":"webfonts","value":{"rev":"5-d7be242801702fd1eb728385b8982107"}}, +{"id":"webgenjs","key":"webgenjs","value":{"rev":"3-ac6be47eedcbb2561babdb9495d60f29"}}, +{"id":"webgl","key":"webgl","value":{"rev":"18-21cd40f6c7e4943a2d858ed813d3c45d"}}, +{"id":"webhookit-comment","key":"webhookit-comment","value":{"rev":"5-1fbed3d75bf485433bdcac4fac625eab"}}, +{"id":"webhookit-ejs","key":"webhookit-ejs","value":{"rev":"5-9b76f543e9c0941d0245cb3bfd2cc64e"}}, +{"id":"webhookit-email","key":"webhookit-email","value":{"rev":"5-d472fde4f101d55d029a29777bbdb952"}}, +{"id":"webhookit-http","key":"webhookit-http","value":{"rev":"13-9f6f05cdb03f45a2227b9cd820565e63"}}, +{"id":"webhookit-jsonparse","key":"webhookit-jsonparse","value":{"rev":"3-6d49bf8a9849130d9bbc5b0d6fb0bf67"}}, +{"id":"webhookit-jsonpath","key":"webhookit-jsonpath","value":{"rev":"5-7acaf50267274584dca1cc5c1e77ce2e"}}, +{"id":"webhookit-objectbuilder","key":"webhookit-objectbuilder","value":{"rev":"5-e63fb26621929f3ab8d8519556116b30"}}, +{"id":"webhookit-soupselect","key":"webhookit-soupselect","value":{"rev":"9-726f2f4794437632032058bc81e6ee5d"}}, +{"id":"webhookit-xml2js","key":"webhookit-xml2js","value":{"rev":"3-ec959e474ecb3a163f2991767594a60e"}}, +{"id":"webhookit-yql","key":"webhookit-yql","value":{"rev":"9-c6ae87a8cc55d33901485ee7c3895ef8"}}, +{"id":"webify","key":"webify","value":{"rev":"3-86810874abf2274d1387ee748987b627"}}, +{"id":"webjs","key":"webjs","value":{"rev":"103-593a1e4e69d8db6284ecf4fce01b4668"}}, +{"id":"webmake","key":"webmake","value":{"rev":"13-f6588093a487212a151d1c00c26de7b4"}}, +{"id":"webmetrics","key":"webmetrics","value":{"rev":"3-44a428fd2ecb1b1bf50c33157750dd16"}}, +{"id":"webrepl","key":"webrepl","value":{"rev":"21-d6dcdbb59186092d9a0f1977c69394a5"}}, +{"id":"webservice","key":"webservice","value":{"rev":"18-05038f1cf997cff1ed81e783485680aa"}}, +{"id":"webshell","key":"webshell","value":{"rev":"3-05c431cf961a9dbaee1dfd95237e189a"}}, +{"id":"websocket","key":"websocket","value":{"rev":"33-7c20d55a88f187d7b398525824159f67"}}, +{"id":"websocket-client","key":"websocket-client","value":{"rev":"12-26a3530b9e6d465f472c791db01c9fc3"}}, +{"id":"websocket-protocol","key":"websocket-protocol","value":{"rev":"3-e52a8496f70686c289087149aee8b359"}}, +{"id":"websocket-server","key":"websocket-server","value":{"rev":"46-9f69e2f9408eb196b3a1aa990e5b5ac2"}}, +{"id":"websockets","key":"websockets","value":{"rev":"3-5535fcb4ae144909f021ee067eec7b2a"}}, +{"id":"webworker","key":"webworker","value":{"rev":"16-f7a4c758b176c6e464c93b6a9f79283b"}}, +{"id":"weibo","key":"weibo","value":{"rev":"21-8a50310389b2f43d8a7cb14e138eb122"}}, +{"id":"weld","key":"weld","value":{"rev":"7-16601ac41d79b3a01e4d2615035376ed"}}, +{"id":"whatlang","key":"whatlang","value":{"rev":"5-f7b10a0f8c3b6579c81d1d1222aeccd7"}}, +{"id":"wheat","key":"wheat","value":{"rev":"16-f6a97282f521edb7f2b0e5edc9577ce0"}}, +{"id":"which","key":"which","value":{"rev":"7-e5fdcb208715f2201d3911caf8a67042"}}, +{"id":"whiskers","key":"whiskers","value":{"rev":"9-2cfd73cebeaf8ce3cb1591e825380621"}}, +{"id":"whiskey","key":"whiskey","value":{"rev":"49-55367718b9067ff2bcb7fbb89327587b"}}, +{"id":"whisperjs","key":"whisperjs","value":{"rev":"19-e2182c72ea24b8c40e12b0c1027eb60d"}}, +{"id":"wikimapia","key":"wikimapia","value":{"rev":"11-8d1a314e8c827236e21e0aabc6e5efd9"}}, +{"id":"wikiminute","key":"wikiminute","value":{"rev":"11-d031a2c7d41bcecb52ac9c7bb5e75e8e"}}, +{"id":"wikiwym","key":"wikiwym","value":{"rev":"3-c0fd4c9b6b93b3a8b14021c2ebae5b0c"}}, +{"id":"wiky","key":"wiky","value":{"rev":"6-be49acce152652e9219a32da1dfd01ea"}}, +{"id":"wildfile","key":"wildfile","value":{"rev":"9-16a05032f890f07c72a5f48c3a6ffbc0"}}, +{"id":"willful.js","key":"willful.js","value":{"rev":"3-3bb957b0a5fc1b4b6c15bace7e8f5902"}}, +{"id":"wilson","key":"wilson","value":{"rev":"14-d4bf88484f1b1cf86b07f4b74f26991d"}}, +{"id":"window","key":"window","value":{"rev":"3-ea84e74fd5556ff662ff47f40522cfa2"}}, +{"id":"windshaft","key":"windshaft","value":{"rev":"21-1d31e4eb7482d15b97c919a4b051ea9c"}}, +{"id":"windtunnel","key":"windtunnel","value":{"rev":"5-0d2ef7faed1b221a3eaa581480adad64"}}, +{"id":"wingrr","key":"wingrr","value":{"rev":"9-a599fad3e0c74895aa266c61805b76cb"}}, +{"id":"wings","key":"wings","value":{"rev":"3-cfcfd262d905cd3be1d1bae82fafd9f0"}}, +{"id":"winston","key":"winston","value":{"rev":"111-13acba5a9ba6d4f19469acb4122d72ea"}}, +{"id":"winston-amqp","key":"winston-amqp","value":{"rev":"5-61408e1dde45f974a995dd27905b8831"}}, +{"id":"winston-mongodb","key":"winston-mongodb","value":{"rev":"9-ae755237a8faa8f5a0b92029c236691a"}}, +{"id":"winston-redis","key":"winston-redis","value":{"rev":"3-1fb861edc109ed5cbd735320124ba103"}}, +{"id":"winston-riak","key":"winston-riak","value":{"rev":"15-3f2923a73386524d851244ace1bece98"}}, +{"id":"winston-syslog","key":"winston-syslog","value":{"rev":"9-7f256bd63aebec19edea47f80de21dfd"}}, +{"id":"winstoon","key":"winstoon","value":{"rev":"9-d719ca7abfeeaa468d1b431c24836089"}}, +{"id":"wirez","key":"wirez","value":{"rev":"5-5c5d0768485ed11c2b80a8a6a3699c39"}}, +{"id":"wobot","key":"wobot","value":{"rev":"9-176ed86fd9d94a7e94efb782c7512533"}}, +{"id":"word-generator","key":"word-generator","value":{"rev":"5-a2c67f11474a8925eb67f04369ac068a"}}, +{"id":"wordnik","key":"wordnik","value":{"rev":"3-4e371fbf7063ced50bbe726079fda1ec"}}, +{"id":"wordpress-auth","key":"wordpress-auth","value":{"rev":"5-05eef01542e00a88418d2885efb4c9ad"}}, +{"id":"wordwrap","key":"wordwrap","value":{"rev":"5-a728ce2cdeab69b71d40fe7c1c41d7c1"}}, +{"id":"wordy","key":"wordy","value":{"rev":"3-bc220ca3dbd008aee932c551cfbdcc6b"}}, +{"id":"worker","key":"worker","value":{"rev":"6-3b03aa764c9fac66ec5c1773e9abc43b"}}, +{"id":"worker-pool","key":"worker-pool","value":{"rev":"3-e3550e704b48f5799a4cc02af7d27355"}}, +{"id":"workflow","key":"workflow","value":{"rev":"3-817c6c77cbb2f332ea9bdddf3b565c00"}}, +{"id":"workhorse","key":"workhorse","value":{"rev":"30-c39ae2ddd867a137073a289c1709f229"}}, +{"id":"world-db","key":"world-db","value":{"rev":"6-eaef1beb6abbebd3e903a28a7f46aa81"}}, +{"id":"worm","key":"worm","value":{"rev":"7-00db15dc9cfd48777cce32fb93e1df6b"}}, +{"id":"wormhole","key":"wormhole","value":{"rev":"37-21e2db062666040c477a7042fc2ffc9d"}}, +{"id":"wrap","key":"wrap","value":{"rev":"3-aded14c091b730813bd24d92cae45cd6"}}, +{"id":"wrench","key":"wrench","value":{"rev":"12-57d3da63e34e59e1f5d1b3bde471e31f"}}, +{"id":"wsclient","key":"wsclient","value":{"rev":"17-f962faf4f6c9d4eda9111e90b2d0735d"}}, +{"id":"wscomm","key":"wscomm","value":{"rev":"47-80affda45da523e57c87b8d43ef73ec9"}}, +{"id":"wsscraper","key":"wsscraper","value":{"rev":"3-94a84fe9b3df46b8d6ad4851e389dae1"}}, +{"id":"wu","key":"wu","value":{"rev":"4-f307d3a00e7a1212b7949bcb96161088"}}, +{"id":"wunderapi","key":"wunderapi","value":{"rev":"17-31e3b991e97931022992b97f9441b9af"}}, +{"id":"wurfl-client","key":"wurfl-client","value":{"rev":"3-a8c3e454d6d9c9b23b7290eb64866e80"}}, +{"id":"wwwdude","key":"wwwdude","value":{"rev":"19-eb8192461b8864af59740f9b44e168ca"}}, +{"id":"x","key":"x","value":{"rev":"9-10403358980aba239b7a9af78175589d"}}, +{"id":"x-core","key":"x-core","value":{"rev":"13-f04b063855da231539d1945a35802d9e"}}, +{"id":"x11","key":"x11","value":{"rev":"5-e5b1435c0aa29207c90fdeaa87570bb7"}}, +{"id":"xappy-async_testing","key":"xappy-async_testing","value":{"rev":"3-747c934540267492b0e6d3bb6d65964c"}}, +{"id":"xappy-pg","key":"xappy-pg","value":{"rev":"4-119e8f93af1e4976900441ec5e3bb0b9"}}, +{"id":"xcbjs","key":"xcbjs","value":{"rev":"3-095a693f9ac7b4e2c319f79d95eb3e95"}}, +{"id":"xemplar","key":"xemplar","value":{"rev":"9-2ccde68ffac8e66aa8013b98d82ff20c"}}, +{"id":"xfer","key":"xfer","value":{"rev":"3-c1875506ed132c6a2b5e7d7eaff9df14"}}, +{"id":"xjs","key":"xjs","value":{"rev":"11-05d5cd002298894ed582a9f5bff5a762"}}, +{"id":"xjst","key":"xjst","value":{"rev":"11-68774970fc7f413ff620fb0d50d8a1d9"}}, +{"id":"xkcdbot","key":"xkcdbot","value":{"rev":"3-7cc9affb442c9ae4c7a109a0b72c2600"}}, +{"id":"xml","key":"xml","value":{"rev":"12-0d1a69f11767de47bfc4a0fce566e36e"}}, +{"id":"xml-markup","key":"xml-markup","value":{"rev":"6-100a92d1f7fe9444e285365dce8203de"}}, +{"id":"xml-simple","key":"xml-simple","value":{"rev":"3-d60e388df5b65128a5e000381643dd31"}}, +{"id":"xml-stream","key":"xml-stream","value":{"rev":"13-44d6ee47e00c91735e908e69c5dffc6b"}}, +{"id":"xml2js","key":"xml2js","value":{"rev":"27-434297bcd9db7628c57fcc9bbbe2671e"}}, +{"id":"xml2js-expat","key":"xml2js-expat","value":{"rev":"15-a8c5c0ba64584d07ed94c0a14dc55fe8"}}, +{"id":"xml2json","key":"xml2json","value":{"rev":"17-fa740417285834be1aa4d95e1ed6d9b9"}}, +{"id":"xmlbuilder","key":"xmlbuilder","value":{"rev":"32-63e3be32dda07c6e998866cddd8a879e"}}, +{"id":"xmlhttprequest","key":"xmlhttprequest","value":{"rev":"9-570fba8bfd5b0958c258cee7309c4b54"}}, +{"id":"xmlrpc","key":"xmlrpc","value":{"rev":"15-ae062e34a965e7543d4fd7b6c3f29cb7"}}, +{"id":"xmpp-client","key":"xmpp-client","value":{"rev":"6-2d123b4666b5deda71f071295cfca793"}}, +{"id":"xmpp-muc","key":"xmpp-muc","value":{"rev":"6-d95b8bca67f406a281a27aa4d89f6f46"}}, +{"id":"xmpp-server","key":"xmpp-server","value":{"rev":"9-44374bc3398cc74f2a36ff973fa0d35f"}}, +{"id":"xp","key":"xp","value":{"rev":"7-781a5e1da74332f25c441f627cd0b4ea"}}, +{"id":"xregexp","key":"xregexp","value":{"rev":"3-c34025fdeb13c18389e737a4b3d4ddf7"}}, +{"id":"xsd","key":"xsd","value":{"rev":"5-566590ccb8923453175a3f1f3b6cbf24"}}, +{"id":"ya-csv","key":"ya-csv","value":{"rev":"28-d485b812914b3c3f5d7e9c4bcee0c3ea"}}, +{"id":"yabble","key":"yabble","value":{"rev":"5-5370a53003a122fe40a16ed2b0e5cead"}}, +{"id":"yaconfig","key":"yaconfig","value":{"rev":"3-f82a452260b010cc5128818741c46017"}}, +{"id":"yah","key":"yah","value":{"rev":"3-cfc0c10f85a9e3076247ca350077e90f"}}, +{"id":"yajet","key":"yajet","value":{"rev":"5-6f7f24335436c84081adf0bbb020b151"}}, +{"id":"yajl","key":"yajl","value":{"rev":"3-8ac011e5a00368aad8d58d95a64c7254"}}, +{"id":"yaml","key":"yaml","value":{"rev":"16-732e5cb6dc10eefeb7dae959e677fb5b"}}, +{"id":"yaml-config","key":"yaml-config","value":{"rev":"3-fb817000005d48526a106ecda5ac5435"}}, +{"id":"yamlish","key":"yamlish","value":{"rev":"3-604fb4f1de9d5aa5ed48432c7db4a8a1"}}, +{"id":"yamlparser","key":"yamlparser","value":{"rev":"13-130a82262c7f742c2a1e26fc58983503"}}, +{"id":"yammer-js","key":"yammer-js","value":{"rev":"3-16ec240ab0b26fa9f0513ada8c769c1f"}}, +{"id":"yanc","key":"yanc","value":{"rev":"15-33d713f0dee42efe8306e6b2a43fe336"}}, +{"id":"yanlibs","key":"yanlibs","value":{"rev":"3-e481217d43b9f79b80e22538eabadabc"}}, +{"id":"yanop","key":"yanop","value":{"rev":"5-6c407ce6f1c18b6bac37ad5945ff8fed"}}, +{"id":"yanx","key":"yanx","value":{"rev":"6-f4c4d255526eaa922baa498f37d38fe0"}}, +{"id":"yasession","key":"yasession","value":{"rev":"7-6e2598123d41b33535b88e99eb87828f"}}, +{"id":"yelp","key":"yelp","value":{"rev":"3-5c769f488a65addba313ff3b6256c365"}}, +{"id":"yeti","key":"yeti","value":{"rev":"50-65338f573ed8f799ec9b1c9bd2643e34"}}, +{"id":"youtube","key":"youtube","value":{"rev":"7-5020698499af8946e9578864a21f6ac5"}}, +{"id":"youtube-dl","key":"youtube-dl","value":{"rev":"76-a42f09b7bf87e7e6157d5d9835cca8a7"}}, +{"id":"youtube-js","key":"youtube-js","value":{"rev":"5-e2d798a185490ad98cb57c2641c4658e"}}, +{"id":"yproject","key":"yproject","value":{"rev":"7-70cb1624de9e8321c67f1f348dc80ff4"}}, +{"id":"yql","key":"yql","value":{"rev":"18-d19123b254abfb097648c4a242513fd3"}}, +{"id":"yubico","key":"yubico","value":{"rev":"9-0e2bd84479a68e1f12c89800a4049053"}}, +{"id":"yui-cli","key":"yui-cli","value":{"rev":"7-0186f7278da8734861109799b9123197"}}, +{"id":"yui-compressor","key":"yui-compressor","value":{"rev":"12-5804d78bb24bb2d3555ca2e28ecc6b70"}}, +{"id":"yui-repl","key":"yui-repl","value":{"rev":"25-9b202e835a46a07be931e6529a4ccb61"}}, +{"id":"yui3","key":"yui3","value":{"rev":"93-4decc441f19acf0ab5abd1a81e3cbb40"}}, +{"id":"yui3-2in3","key":"yui3-2in3","value":{"rev":"10-dc0429fe818aceeca80d075613c9547a"}}, +{"id":"yui3-bare","key":"yui3-bare","value":{"rev":"33-60779e2088efe782b437ecc053c01e2f"}}, +{"id":"yui3-base","key":"yui3-base","value":{"rev":"33-89017bb5dfde621fc7d179f2939e3d1b"}}, +{"id":"yui3-core","key":"yui3-core","value":{"rev":"17-3759fa0072e24f4bb29e22144cb3dda3"}}, +{"id":"yui3-gallery","key":"yui3-gallery","value":{"rev":"38-9ce6f7a60b2f815337767249d1827951"}}, +{"id":"yui3-mocha","key":"yui3-mocha","value":{"rev":"3-83ff9c42a37f63de0c132ce6cb1ad282"}}, +{"id":"yuitest","key":"yuitest","value":{"rev":"17-b5dd4ad4e82b6b310d7a6e9103570779"}}, +{"id":"zap","key":"zap","value":{"rev":"15-9b9b7c6badb0a9fd9d469934e9be12c0"}}, +{"id":"zappa","key":"zappa","value":{"rev":"26-d193767b488e778db41455924001b1fb"}}, +{"id":"zen","key":"zen","value":{"rev":"7-23a260d4379816a5c931c2e823bda1ae"}}, +{"id":"zeppelin","key":"zeppelin","value":{"rev":"7-9db2e313fe323749e259be91edcdee8e"}}, +{"id":"zeromq","key":"zeromq","value":{"rev":"24-7cb4cec19fb3a03871900ac3558fcbef"}}, +{"id":"zest","key":"zest","value":{"rev":"5-080a2a69a93d66fcaae0da7ddaa9ceab"}}, +{"id":"zest-js","key":"zest-js","value":{"rev":"5-541454063618fa3a9d6f44e0147ea622"}}, +{"id":"zip","key":"zip","value":{"rev":"11-443da314322b6a1a93b40a38124610f2"}}, +{"id":"zipfile","key":"zipfile","value":{"rev":"32-e846d29fc615e8fbc610f44653a1e085"}}, +{"id":"zipper","key":"zipper","value":{"rev":"5-cde0a4a7f03c139dcd779f3ede55bd0e"}}, +{"id":"zippy","key":"zippy","value":{"rev":"7-3906ca62dd8020e9673a7c229944bd3f"}}, +{"id":"zipwith","key":"zipwith","value":{"rev":"3-58c50c6220d6493047f8333c5db22cc9"}}, +{"id":"zlib","key":"zlib","value":{"rev":"27-e0443f2d9a0c9db31f86a6c5b9ba78ba"}}, +{"id":"zlib-sync","key":"zlib-sync","value":{"rev":"3-b17a39dd23b3455d35ffd862004ed677"}}, +{"id":"zlibcontext","key":"zlibcontext","value":{"rev":"11-1c0c6b34e87adab1b6d5ee60be6a608c"}}, +{"id":"zlibstream","key":"zlibstream","value":{"rev":"5-44e30d87de9aaaa975c64d8dcdcd1a94"}}, +{"id":"zmq","key":"zmq","value":{"rev":"7-eae5d939fcdb7be5edfb328aefeaba4e"}}, +{"id":"zo","key":"zo","value":{"rev":"5-956f084373731805e5871f4716049529"}}, +{"id":"zombie","key":"zombie","value":{"rev":"109-9eec325353a47bfcc32a94719bf147da"}}, +{"id":"zombie-https","key":"zombie-https","value":{"rev":"3-6aff25d319be319343882575acef4890"}}, +{"id":"zoneinfo","key":"zoneinfo","value":{"rev":"15-d95d2041324d961fe26a0217cf485511"}}, +{"id":"zookeeper","key":"zookeeper","value":{"rev":"11-5a5ed278a01e4b508ffa6e9a02059898"}}, +{"id":"zoom","key":"zoom","value":{"rev":"3-9d0277ad580d64c9a4d48a40d22976f0"}}, +{"id":"zsock","key":"zsock","value":{"rev":"16-4f975b91f0f9c2d2a2501e362401c368"}}, +{"id":"zutil","key":"zutil","value":{"rev":"9-3e7bc6520008b4fcd5ee6eb9e8e5adf5"}} +]} diff --git a/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/fn.js b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/fn.js new file mode 100644 index 00000000..4acc6726 --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/fn.js @@ -0,0 +1,39 @@ + + +var fs = require ('fs') + , join = require('path').join + , file = join(__dirname, 'fixtures','all_npm.json') + , JSONStream = require('../') + , it = require('it-is') + +function fn (s) { + return !isNaN(parseInt(s, 10)) +} + +var expected = JSON.parse(fs.readFileSync(file)) + , parser = JSONStream.parse(['rows', fn]) + , called = 0 + , ended = false + , parsed = [] + +fs.createReadStream(file).pipe(parser) + +parser.on('data', function (data) { + called ++ + it.has({ + id: it.typeof('string'), + value: {rev: it.typeof('string')}, + key:it.typeof('string') + }) + parsed.push(data) +}) + +parser.on('end', function () { + ended = true +}) + +process.on('exit', function () { + it(called).equal(expected.rows.length) + it(parsed).deepEqual(expected.rows) + console.error('PASSED') +}) diff --git a/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/gen.js b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/gen.js new file mode 100644 index 00000000..9bafb2cb --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/gen.js @@ -0,0 +1,132 @@ +var fs = require('fs') +var JSONStream = require('../') +var file = process.argv[2] || '/tmp/JSONStream-test-large.json' +var size = Number(process.argv[3] || 100000) +if(process.title != 'browser') +require('tape')('out of mem', function (t) { + +////////////////////////////////////////////////////// +// Produces a random number between arg1 and arg2 +////////////////////////////////////////////////////// +var randomNumber = function (min, max) { + var number = Math.floor(Math.random() * (max - min + 1) + min); + return number; +}; + +////////////////////////////////////////////////////// +// Produces a random string of a length between arg1 and arg2 +////////////////////////////////////////////////////// +var randomString = function (min, max) { + + // add several spaces to increase chanses of creating 'words' + var chars = ' 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; + var result = ''; + + var randomLength = randomNumber(min, max); + + for (var i = randomLength; i > 0; --i) { + result += chars[Math.round(Math.random() * (chars.length - 1))]; + } + return result; +}; + +////////////////////////////////////////////////////// +// Produces a random JSON document, as a string +////////////////////////////////////////////////////// +var randomJsonDoc = function () { + + var doc = { + "CrashOccurenceID": randomNumber(10000, 50000), + "CrashID": randomNumber(1000, 10000), + "SiteName": randomString(10, 25), + "MachineName": randomString(10, 25), + "Date": randomString(26, 26), + "ProcessDuration": randomString(18, 18), + "ThreadIdentityName": null, + "WindowsIdentityName": randomString(15, 40), + "OperatingSystemName": randomString(35, 65), + "DetailedExceptionInformation": randomString(100, 800) + }; + + doc = JSON.stringify(doc); + doc = doc.replace(/\,/g, ',\n'); // add new lines after each attribute + return doc; +}; + +////////////////////////////////////////////////////// +// generates test data +////////////////////////////////////////////////////// +var generateTestData = function (cb) { + + console.log('generating large data file...'); + + var stream = fs.createWriteStream(file, { + encoding: 'utf8' + }); + + var i = 0; + var max = size; + var writing = false + var split = ',\n'; + var doc = randomJsonDoc(); + stream.write('['); + + function write () { + if(writing) return + writing = true + while(++i < max) { + if(Math.random() < 0.001) + console.log('generate..', i + ' / ' + size) + if(!stream.write(doc + split)) { + writing = false + return stream.once('drain', write) + } + } + stream.write(doc + ']') + stream.end(); + console.log('END') + } + write() + stream.on('close', cb) +}; + +////////////////////////////////////////////////////// +// Shows that parsing 100000 instances using JSONStream fails +// +// After several seconds, you will get this crash +// FATAL ERROR: JS Allocation failed - process out of memory +////////////////////////////////////////////////////// +var testJSONStreamParse_causesOutOfMem = function (done) { + var items = 0 + console.log('parsing data files using JSONStream...'); + + var parser = JSONStream.parse([true]); + var stream = fs.createReadStream(file); + stream = stream.pipe(parser); + + stream.on('data', function (data) { + items ++ + if(Math.random() < 0.001) console.log(items, '...') + + }); + + stream.on('end', function () { + t.equal(items, size) + t.end() + }); + +}; + +////////////////////////////////////////////////////// +// main +////////////////////////////////////////////////////// + +fs.stat(file, function (err, stat) { + console.log(stat) + if(err) + generateTestData(testJSONStreamParse_causesOutOfMem); + else + testJSONStreamParse_causesOutOfMem() +}) + +}) diff --git a/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/multiple_objects.js b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/multiple_objects.js new file mode 100644 index 00000000..b1c8f91b --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/multiple_objects.js @@ -0,0 +1,42 @@ +var fs = require ('fs'); +var net = require('net'); +var join = require('path').join; +var file = join(__dirname, 'fixtures','all_npm.json'); +var it = require('it-is'); +var JSONStream = require('../'); + +var str = fs.readFileSync(file); + +var datas = {} + +var server = net.createServer(function(client) { + var root_calls = 0; + var data_calls = 0; + var parser = JSONStream.parse(['rows', true, 'key']); + parser.on('root', function(root, count) { + ++ root_calls; + }); + + parser.on('data', function(data) { + ++ data_calls; + datas[data] = (datas[data] || 0) + 1 + it(data).typeof('string') + }); + + parser.on('end', function() { + console.log('END') + var min = Infinity + for (var d in datas) + min = min > datas[d] ? datas[d] : min + it(root_calls).equal(3); + it(min).equal(3); + server.close(); + }); + client.pipe(parser); +}); +server.listen(9999); + +var client = net.connect({ port : 9999 }, function() { + var msgs = str + ' ' + str + '\n\n' + str + client.end(msgs); +}); diff --git a/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/multiple_objects_error.js b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/multiple_objects_error.js new file mode 100644 index 00000000..980423b6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/multiple_objects_error.js @@ -0,0 +1,35 @@ +var fs = require ('fs'); +var net = require('net'); +var join = require('path').join; +var file = join(__dirname, 'fixtures','all_npm.json'); +var it = require('it-is'); +var JSONStream = require('../'); + +var str = fs.readFileSync(file); + +var server = net.createServer(function(client) { + var root_calls = 0; + var data_calls = 0; + var parser = JSONStream.parse(); + parser.on('root', function(root, count) { + ++ root_calls; + it(root_calls).notEqual(2); + }); + + parser.on('error', function(err) { + console.log(err); + server.close(); + }); + + parser.on('end', function() { + console.log('END'); + server.close(); + }); + client.pipe(parser); +}); +server.listen(9999); + +var client = net.connect({ port : 9999 }, function() { + var msgs = str + '}'; + client.end(msgs); +}); diff --git a/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/parsejson.js b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/parsejson.js new file mode 100644 index 00000000..02798871 --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/parsejson.js @@ -0,0 +1,28 @@ + + +/* + sometimes jsonparse changes numbers slightly. +*/ + +var r = Math.random() + , Parser = require('jsonparse') + , p = new Parser() + , assert = require('assert') + , times = 20 +while (times --) { + + assert.equal(JSON.parse(JSON.stringify(r)), r, 'core JSON') + + p.onValue = function (v) { + console.error('parsed', v) + assert.equal( + String(v).slice(0,12), + String(r).slice(0,12) + ) + } + console.error('correct', r) + p.write (new Buffer(JSON.stringify([r]))) + + + +} diff --git a/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/stringify.js b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/stringify.js new file mode 100644 index 00000000..b6de85ed --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/stringify.js @@ -0,0 +1,41 @@ + +var fs = require ('fs') + , join = require('path').join + , file = join(__dirname, 'fixtures','all_npm.json') + , JSONStream = require('../') + , it = require('it-is').style('colour') + + function randomObj () { + return ( + Math.random () < 0.4 + ? {hello: 'eonuhckmqjk', + whatever: 236515, + lies: true, + nothing: [null], + stuff: [Math.random(),Math.random(),Math.random()] + } + : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]] + ) + } + +var expected = [] + , stringify = JSONStream.stringify() + , es = require('event-stream') + , stringified = '' + , called = 0 + , count = 10 + , ended = false + +while (count --) + expected.push(randomObj()) + + es.connect( + es.readArray(expected), + stringify, + //JSONStream.parse([/./]), + es.writeArray(function (err, lines) { + + it(JSON.parse(lines.join(''))).deepEqual(expected) + console.error('PASSED') + }) + ) diff --git a/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/stringify_object.js b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/stringify_object.js new file mode 100644 index 00000000..9490115a --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/stringify_object.js @@ -0,0 +1,47 @@ + +var fs = require ('fs') + , join = require('path').join + , file = join(__dirname, 'fixtures','all_npm.json') + , JSONStream = require('../') + , it = require('it-is').style('colour') + , es = require('event-stream') + , pending = 10 + , passed = true + + function randomObj () { + return ( + Math.random () < 0.4 + ? {hello: 'eonuhckmqjk', + whatever: 236515, + lies: true, + nothing: [null], + stuff: [Math.random(),Math.random(),Math.random()] + } + : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]] + ) + } + +for (var ix = 0; ix < pending; ix++) (function (count) { + var expected = {} + , stringify = JSONStream.stringifyObject() + + es.connect( + stringify, + es.writeArray(function (err, lines) { + it(JSON.parse(lines.join(''))).deepEqual(expected) + if (--pending === 0) { + console.error('PASSED') + } + }) + ) + + while (count --) { + var key = Math.random().toString(16).slice(2) + expected[key] = randomObj() + stringify.write([ key, expected[key] ]) + } + + process.nextTick(function () { + stringify.end() + }) +})(ix) diff --git a/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/test.js b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/test.js new file mode 100644 index 00000000..8ea7c2e1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/test.js @@ -0,0 +1,35 @@ + + +var fs = require ('fs') + , join = require('path').join + , file = join(__dirname, 'fixtures','all_npm.json') + , JSONStream = require('../') + , it = require('it-is') + +var expected = JSON.parse(fs.readFileSync(file)) + , parser = JSONStream.parse(['rows', /\d+/ /*, 'value'*/]) + , called = 0 + , ended = false + , parsed = [] + +fs.createReadStream(file).pipe(parser) + +parser.on('data', function (data) { + called ++ + it.has({ + id: it.typeof('string'), + value: {rev: it.typeof('string')}, + key:it.typeof('string') + }) + parsed.push(data) +}) + +parser.on('end', function () { + ended = true +}) + +process.on('exit', function () { + it(called).equal(expected.rows.length) + it(parsed).deepEqual(expected.rows) + console.error('PASSED') +}) diff --git a/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/test2.js b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/test2.js new file mode 100644 index 00000000..d09df7be --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/test2.js @@ -0,0 +1,29 @@ + + +var fs = require ('fs') + , join = require('path').join + , file = join(__dirname, '..','package.json') + , JSONStream = require('../') + , it = require('it-is') + +var expected = JSON.parse(fs.readFileSync(file)) + , parser = JSONStream.parse([]) + , called = 0 + , ended = false + , parsed = [] + +fs.createReadStream(file).pipe(parser) + +parser.on('data', function (data) { + called ++ + it(data).deepEqual(expected) +}) + +parser.on('end', function () { + ended = true +}) + +process.on('exit', function () { + it(called).equal(1) + console.error('PASSED') +}) \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/two-ways.js b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/two-ways.js new file mode 100644 index 00000000..8f3b89c8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/node_modules/JSONStream/test/two-ways.js @@ -0,0 +1,41 @@ + +var fs = require ('fs') + , join = require('path').join + , file = join(__dirname, 'fixtures','all_npm.json') + , JSONStream = require('../') + , it = require('it-is').style('colour') + + function randomObj () { + return ( + Math.random () < 0.4 + ? {hello: 'eonuhckmqjk', + whatever: 236515, + lies: true, + nothing: [null], +// stuff: [Math.random(),Math.random(),Math.random()] + } + : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]] + ) + } + +var expected = [] + , stringify = JSONStream.stringify() + , es = require('event-stream') + , stringified = '' + , called = 0 + , count = 10 + , ended = false + +while (count --) + expected.push(randomObj()) + + es.connect( + es.readArray(expected), + stringify, + JSONStream.parse([/./]), + es.writeArray(function (err, lines) { + + it(lines).has(expected) + console.error('PASSED') + }) + ) diff --git a/pitfall/pdfkit/node_modules/deps-sort/package.json b/pitfall/pdfkit/node_modules/deps-sort/package.json new file mode 100644 index 00000000..14833b76 --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/package.json @@ -0,0 +1,100 @@ +{ + "_args": [ + [ + { + "raw": "deps-sort@~0.1.1", + "scope": null, + "escapedName": "deps-sort", + "name": "deps-sort", + "rawSpec": "~0.1.1", + "spec": ">=0.1.1 <0.2.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/browserify" + ] + ], + "_from": "deps-sort@>=0.1.1 <0.2.0", + "_id": "deps-sort@0.1.2", + "_inCache": true, + "_location": "/deps-sort", + "_npmUser": { + "name": "substack", + "email": "mail@substack.net" + }, + "_npmVersion": "1.4.3", + "_phantomChildren": { + "jsonparse": "0.0.5" + }, + "_requested": { + "raw": "deps-sort@~0.1.1", + "scope": null, + "escapedName": "deps-sort", + "name": "deps-sort", + "rawSpec": "~0.1.1", + "spec": ">=0.1.1 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "/browserify" + ], + "_resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-0.1.2.tgz", + "_shasum": "daa2fb614a17c9637d801e2f55339ae370f3611a", + "_shrinkwrap": null, + "_spec": "deps-sort@~0.1.1", + "_where": "/Users/MB/git/pdfkit/node_modules/browserify", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "bin": { + "deps-sort": "bin/cmd.js" + }, + "bugs": { + "url": "https://github.com/substack/deps-sort/issues" + }, + "dependencies": { + "JSONStream": "~0.6.4", + "minimist": "~0.0.1", + "through": "~2.3.4" + }, + "description": "sort module-deps output for deterministic browserify bundles", + "devDependencies": { + "tap": "~0.4.0" + }, + "directories": {}, + "dist": { + "shasum": "daa2fb614a17c9637d801e2f55339ae370f3611a", + "tarball": "https://registry.npmjs.org/deps-sort/-/deps-sort-0.1.2.tgz" + }, + "homepage": "https://github.com/substack/deps-sort", + "keywords": [ + "dependency", + "graph", + "browser", + "browserify", + "module-deps", + "browser-pack", + "sorted", + "determinism" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "name": "deps-sort", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/substack/deps-sort.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "0.1.2" +} diff --git a/pitfall/pdfkit/node_modules/deps-sort/readme.markdown b/pitfall/pdfkit/node_modules/deps-sort/readme.markdown new file mode 100644 index 00000000..c3fe9c3d --- /dev/null +++ b/pitfall/pdfkit/node_modules/deps-sort/readme.markdown @@ -0,0 +1,72 @@ +# deps-sort + +sort [module-deps](https://npmjs.org/package/module-deps) output for deterministic +browserify bundles + +# example + +## command-line + +``` +$ for((i=0;i<5;i++)); do module-deps main.js | deps-sort | browser-pack | md5sum; done +e9e630de2c62953140357db0444c3c3a - +e9e630de2c62953140357db0444c3c3a - +e9e630de2c62953140357db0444c3c3a - +e9e630de2c62953140357db0444c3c3a - +e9e630de2c62953140357db0444c3c3a - +``` + +or using `browserify --deps` on a [voxeljs](http://voxeljs.com/) project: + +``` +$ for((i=0;i<5;i++)); do browserify --deps browser.js | deps-sort | browser-pack | md5sum; done +fb418c74b53ba2e4cef7d01808b848e6 - +fb418c74b53ba2e4cef7d01808b848e6 - +fb418c74b53ba2e4cef7d01808b848e6 - +fb418c74b53ba2e4cef7d01808b848e6 - +fb418c74b53ba2e4cef7d01808b848e6 - +``` + +## api + +To use this module programmatically, write streaming object data and read +streaming object data: + +``` js +var sort = require('../')(); +var JSONStream = require('JSONStream'); +var parse = JSONStream.parse([ true ]); +var stringify = JSONStream.stringify(); + +process.stdin.pipe(parse).pipe(sort).pipe(stringify).pipe(process.stdout); +``` + +# methods + +``` js +var depsSort = require('deps-sort'); +``` + +## var stream = depsSort(opts) + +Return a new through `stream` that should get written +[module-deps](https://npmjs.org/package/module-deps) objects and will output +sorted objects. + +`opts` can be: + +* `opts.index` - when true, for each module-deps row, insert `row.index` with +the numeric index and `row.indexDeps` like `row.deps` but mapping require +strings to row indices + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install deps-sort +``` + +# license + +MIT diff --git a/pitfall/pdfkit/node_modules/derequire/.npmignore b/pitfall/pdfkit/node_modules/derequire/.npmignore new file mode 100644 index 00000000..bbd0f0f7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/.npmignore @@ -0,0 +1,4 @@ +node_modules +.DS_Store +~* +coverage \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/derequire/index.js b/pitfall/pdfkit/node_modules/derequire/index.js new file mode 100644 index 00000000..02f86e35 --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/index.js @@ -0,0 +1,44 @@ +'use strict'; +var estraverse = require('estraverse'); +var esprima = require('esprima-fb'); +var esrefactor = require('esrefactor'); + +var requireRegexp = /require.*\(.*['"]/m; +function testParse (code) { + try{ + return esprima.parse(code,{range:true}); + }catch(e){} +} +function rename(code, tokenTo, tokenFrom) { + if (!requireRegexp.test(code)) return code; + + tokenTo = tokenTo || '_dereq_'; + tokenFrom = tokenFrom || 'require'; + if(tokenTo.length !== tokenFrom.length){ + throw new Error('bad stuff will happen if you try to change tokens of different length'); + } + var inCode = '!function(){'+code+'\n;}'; + var ast = testParse(inCode); + if(!ast){ + return code; + } + var ctx = new esrefactor.Context(inCode); + + estraverse.traverse(ast,{ + enter:function(node, parent) { + var test = + parent && + (parent.type === 'FunctionDeclaration' || parent.type === 'FunctionExpression') && + node.name === tokenFrom && + node.type === 'Identifier'; + if(test){ + ctx._code = ctx.rename(ctx.identify(node.range[0]), tokenTo); + } + } + }); + return ctx._code.slice(12, -3); +} + + + +module.exports = rename; diff --git a/pitfall/pdfkit/node_modules/derequire/node_modules/.bin/esparse b/pitfall/pdfkit/node_modules/derequire/node_modules/.bin/esparse new file mode 120000 index 00000000..936ac782 --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/node_modules/.bin/esparse @@ -0,0 +1 @@ +../esprima-fb/bin/esparse.js \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/derequire/node_modules/.bin/esvalidate b/pitfall/pdfkit/node_modules/derequire/node_modules/.bin/esvalidate new file mode 120000 index 00000000..85487158 --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/node_modules/.bin/esvalidate @@ -0,0 +1 @@ +../esprima-fb/bin/esvalidate.js \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/.eslintrc b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/.eslintrc new file mode 100644 index 00000000..c05d570f --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/.eslintrc @@ -0,0 +1,92 @@ +{ + "env": { + "browser": true, + "node": true, + "amd": true + }, + + "rules": { + "no-alert": 2, + "no-caller": 2, + "no-bitwise": 0, + "no-catch-shadow": 2, + "no-console": 2, + "no-comma-dangle": 2, + "no-control-regex": 2, + "no-debugger": 2, + "no-div-regex": 2, + "no-dupe-keys": 2, + "no-else-return": 2, + "no-empty": 2, + "no-empty-class": 2, + "no-eq-null": 2, + "no-eval": 2, + "no-ex-assign": 2, + "no-func-assign": 0, + "no-floating-decimal": 2, + "no-implied-eval": 2, + "no-with": 2, + "no-fallthrough": 2, + "no-global-strict": 2, + "no-unreachable": 2, + "no-undef": 2, + "no-undef-init": 2, + "no-unused-expressions": 0, + "no-octal": 2, + "no-octal-escape": 2, + "no-obj-calls": 2, + "no-multi-str": 2, + "no-new-wrappers": 2, + "no-new": 2, + "no-new-func": 2, + "no-native-reassign": 2, + "no-plusplus": 0, + "no-delete-var": 2, + "no-return-assign": 2, + "no-new-array": 2, + "no-new-object": 2, + "no-label-var": 2, + "no-ternary": 0, + "no-self-compare": 2, + "no-sync": 2, + "no-underscore-dangle": 2, + "no-loop-func": 2, + "no-empty-label": 2, + "no-unused-vars": 0, + "no-script-url": 2, + "no-proto": 2, + "no-iterator": 2, + "no-mixed-requires": [0, false], + "no-wrap-func": 2, + "no-shadow": 2, + "no-use-before-define": 0, + "no-redeclare": 2, + + "brace-style": 0, + "block-scoped-var": 0, + "camelcase": 2, + "complexity": [0, 11], + "consistent-this": [0, "that"], + "curly": 2, + "dot-notation": 2, + "eqeqeq": 2, + "guard-for-in": 0, + "max-depth": [0, 4], + "max-len": [0, 80, 4], + "max-params": [0, 3], + "max-statements": [0, 10], + "new-cap": 2, + "new-parens": 2, + "one-var": 0, + "quotes": [2, "single"], + "quote-props": 0, + "radix": 0, + "regex-spaces": 2, + "semi": 2, + "strict": 2, + "unnecessary-strict": 0, + "use-isnan": 2, + "wrap-iife": 2, + "wrap-regex": 0 + } +} diff --git a/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/.npmignore b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/.npmignore new file mode 100644 index 00000000..88dc4e81 --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/.npmignore @@ -0,0 +1,8 @@ +.git +.travis.yml +/node_modules/ +/assets/ +/coverage/ +/demo/ +/test/3rdparty +/tools/ diff --git a/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/ChangeLog b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/ChangeLog new file mode 100644 index 00000000..84a6d6a7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/ChangeLog @@ -0,0 +1,17 @@ +2012-11-02: Version 1.0.2 + + Improvement: + + * Fix esvalidate JUnit output upon a syntax error (issue 374) + +2012-10-28: Version 1.0.1 + + Improvements: + + * esvalidate understands shebang in a Unix shell script (issue 361) + * esvalidate treats fatal parsing failure as an error (issue 361) + * Reduce Node.js package via .npmignore (issue 362) + +2012-10-22: Version 1.0.0 + + Initial release. diff --git a/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/LICENSE.BSD b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/LICENSE.BSD new file mode 100644 index 00000000..3e580c35 --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/LICENSE.BSD @@ -0,0 +1,19 @@ +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/README.md b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/README.md new file mode 100644 index 00000000..afaf6d15 --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/README.md @@ -0,0 +1,24 @@ +**Esprima** ([esprima.org](http://esprima.org), BSD license) is a high performance, +standard-compliant [ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm) +parser written in ECMAScript (also popularly known as +[JavaScript](http://en.wikipedia.org/wiki/JavaScript>JavaScript)). +Esprima is created and maintained by [Ariya Hidayat](http://twitter.com/ariyahidayat), +with the help of [many contributors](https://github.com/ariya/esprima/contributors). + +### Features + +- Full support for ECMAScript 5.1 ([ECMA-262](http://www.ecma-international.org/publications/standards/Ecma-262.htm)) +- Sensible [syntax tree format](http://esprima.org/doc/index.html#ast) compatible with Mozilla +[Parser AST](https://developer.mozilla.org/en/SpiderMonkey/Parser_API) +- Optional tracking of syntax node location (index-based and line-column) +- Heavily tested (> 600 [unit tests](http://esprima.org/test/) with solid statement and branch coverage) +- Experimental support for ES6/Harmony (module, class, destructuring, ...) + +Esprima serves as a **building block** for some JavaScript +language tools, from [code instrumentation](http://esprima.org/demo/functiontrace.html) +to [editor autocompletion](http://esprima.org/demo/autocomplete.html). + +Esprima runs on many popular web browsers, as well as other ECMAScript platforms such as +[Rhino](http://www.mozilla.org/rhino) and [Node.js](https://npmjs.org/package/esprima). + +For more information, check the web site [esprima.org](http://esprima.org). diff --git a/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/bin/esparse.js b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/bin/esparse.js new file mode 100755 index 00000000..3e7bb81e --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/bin/esparse.js @@ -0,0 +1,117 @@ +#!/usr/bin/env node +/* + Copyright (C) 2012 Ariya Hidayat + Copyright (C) 2011 Ariya Hidayat + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*jslint sloppy:true node:true rhino:true */ + +var fs, esprima, fname, content, options, syntax; + +if (typeof require === 'function') { + fs = require('fs'); + esprima = require('esprima'); +} else if (typeof load === 'function') { + try { + load('esprima.js'); + } catch (e) { + load('../esprima.js'); + } +} + +// Shims to Node.js objects when running under Rhino. +if (typeof console === 'undefined' && typeof process === 'undefined') { + console = { log: print }; + fs = { readFileSync: readFile }; + process = { argv: arguments, exit: quit }; + process.argv.unshift('esparse.js'); + process.argv.unshift('rhino'); +} + +function showUsage() { + console.log('Usage:'); + console.log(' esparse [options] file.js'); + console.log(); + console.log('Available options:'); + console.log(); + console.log(' --comment Gather all line and block comments in an array'); + console.log(' --loc Include line-column location info for each syntax node'); + console.log(' --range Include index-based range for each syntax node'); + console.log(' --raw Display the raw value of literals'); + console.log(' --tokens List all tokens in an array'); + console.log(' --tolerant Tolerate errors on a best-effort basis (experimental)'); + console.log(' -v, --version Shows program version'); + console.log(); + process.exit(1); +} + +if (process.argv.length <= 2) { + showUsage(); +} + +options = {}; + +process.argv.splice(2).forEach(function (entry) { + + if (entry === '-h' || entry === '--help') { + showUsage(); + } else if (entry === '-v' || entry === '--version') { + console.log('ECMAScript Parser (using Esprima version', esprima.version, ')'); + console.log(); + process.exit(0); + } else if (entry === '--comment') { + options.comment = true; + } else if (entry === '--loc') { + options.loc = true; + } else if (entry === '--range') { + options.range = true; + } else if (entry === '--raw') { + options.raw = true; + } else if (entry === '--tokens') { + options.tokens = true; + } else if (entry === '--tolerant') { + options.tolerant = true; + } else if (entry.slice(0, 2) === '--') { + console.log('Error: unknown option ' + entry + '.'); + process.exit(1); + } else if (typeof fname === 'string') { + console.log('Error: more than one input file.'); + process.exit(1); + } else { + fname = entry; + } +}); + +if (typeof fname !== 'string') { + console.log('Error: no input file.'); + process.exit(1); +} + +try { + content = fs.readFileSync(fname, 'utf-8'); + syntax = esprima.parse(content, options); + console.log(JSON.stringify(syntax, null, 4)); +} catch (e) { + console.log('Error: ' + e.message); + process.exit(1); +} diff --git a/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/bin/esvalidate.js b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/bin/esvalidate.js new file mode 100755 index 00000000..dddd8a2a --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/bin/esvalidate.js @@ -0,0 +1,199 @@ +#!/usr/bin/env node +/* + Copyright (C) 2012 Ariya Hidayat + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*jslint sloppy:true plusplus:true node:true rhino:true */ +/*global phantom:true */ + +var fs, system, esprima, options, fnames, count; + +if (typeof esprima === 'undefined') { + // PhantomJS can only require() relative files + if (typeof phantom === 'object') { + fs = require('fs'); + system = require('system'); + esprima = require('./esprima'); + } else if (typeof require === 'function') { + fs = require('fs'); + esprima = require('esprima'); + } else if (typeof load === 'function') { + try { + load('esprima.js'); + } catch (e) { + load('../esprima.js'); + } + } +} + +// Shims to Node.js objects when running under PhantomJS 1.7+. +if (typeof phantom === 'object') { + fs.readFileSync = fs.read; + process = { + argv: [].slice.call(system.args), + exit: phantom.exit + }; + process.argv.unshift('phantomjs'); +} + +// Shims to Node.js objects when running under Rhino. +if (typeof console === 'undefined' && typeof process === 'undefined') { + console = { log: print }; + fs = { readFileSync: readFile }; + process = { argv: arguments, exit: quit }; + process.argv.unshift('esvalidate.js'); + process.argv.unshift('rhino'); +} + +function showUsage() { + console.log('Usage:'); + console.log(' esvalidate [options] file.js'); + console.log(); + console.log('Available options:'); + console.log(); + console.log(' --format=type Set the report format, plain (default) or junit'); + console.log(' -v, --version Print program version'); + console.log(); + process.exit(1); +} + +if (process.argv.length <= 2) { + showUsage(); +} + +options = { + format: 'plain' +}; + +fnames = []; + +process.argv.splice(2).forEach(function (entry) { + + if (entry === '-h' || entry === '--help') { + showUsage(); + } else if (entry === '-v' || entry === '--version') { + console.log('ECMAScript Validator (using Esprima version', esprima.version, ')'); + console.log(); + process.exit(0); + } else if (entry.slice(0, 9) === '--format=') { + options.format = entry.slice(9); + if (options.format !== 'plain' && options.format !== 'junit') { + console.log('Error: unknown report format ' + options.format + '.'); + process.exit(1); + } + } else if (entry.slice(0, 2) === '--') { + console.log('Error: unknown option ' + entry + '.'); + process.exit(1); + } else { + fnames.push(entry); + } +}); + +if (fnames.length === 0) { + console.log('Error: no input file.'); + process.exit(1); +} + +if (options.format === 'junit') { + console.log(''); + console.log(''); +} + +count = 0; +fnames.forEach(function (fname) { + var content, timestamp, syntax, name; + try { + content = fs.readFileSync(fname, 'utf-8'); + + if (content[0] === '#' && content[1] === '!') { + content = '//' + content.substr(2, content.length); + } + + timestamp = Date.now(); + syntax = esprima.parse(content, { tolerant: true }); + + if (options.format === 'junit') { + + name = fname; + if (name.lastIndexOf('/') >= 0) { + name = name.slice(name.lastIndexOf('/') + 1); + } + + console.log(''); + + syntax.errors.forEach(function (error) { + var msg = error.message; + msg = msg.replace(/^Line\ [0-9]*\:\ /, ''); + console.log(' '); + console.log(' ' + + error.message + '(' + name + ':' + error.lineNumber + ')' + + ''); + console.log(' '); + }); + + console.log(''); + + } else if (options.format === 'plain') { + + syntax.errors.forEach(function (error) { + var msg = error.message; + msg = msg.replace(/^Line\ [0-9]*\:\ /, ''); + msg = fname + ':' + error.lineNumber + ': ' + msg; + console.log(msg); + ++count; + }); + + } + } catch (e) { + ++count; + if (options.format === 'junit') { + console.log(''); + console.log(' '); + console.log(' ' + + e.message + '(' + fname + ((e.lineNumber) ? ':' + e.lineNumber : '') + + ')'); + console.log(' '); + console.log(''); + } else { + console.log('Error: ' + e.message); + } + } +}); + +if (options.format === 'junit') { + console.log(''); +} + +if (count > 0) { + process.exit(1); +} + +if (count === 0 && typeof phantom === 'object') { + process.exit(0); +} diff --git a/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/component.json b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/component.json new file mode 100644 index 00000000..319c2503 --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/component.json @@ -0,0 +1,14 @@ +{ + "name": "esprima", + "version": "1.1.0-dev-harmony", + "main": "./esprima.js", + "dependencies": {}, + "repository": { + "type": "git", + "url": "http://github.com/ariya/esprima.git" + }, + "licenses": [{ + "type": "BSD", + "url": "http://github.com/ariya/esprima/raw/master/LICENSE.BSD" + }] +} diff --git a/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/doc/index.html b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/doc/index.html new file mode 100644 index 00000000..5cf026e5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/doc/index.html @@ -0,0 +1,480 @@ + + + + + + + Esprima Documentation + + + + + + + + + + + +
    + + +
    +
    +

    Documentation on using Esprima

    +
    +
    + + +
    +
    + +

    Basic Usage

    + +

    Esprima runs on web browsers (IE 6+, Firefox 1+, Safari 3+, Chrome 1+, Konqueror 4.6+, Opera 8+) as well as +Rhino and Node.js.

    + +
    In a web browser
    + +

    Just include the source file:

    + +
    +<script src="esprima.js"></script>
    +
    + +

    The module esprima will be available as part of the global window object:

    + +
    +var syntax = esprima.parse('var answer = 42');
    +
    + +

    Since Esprima supports AMD (Asynchronous Module Definition), it can be loaded via a module loader such as RequireJS:

    + +
    +require(['esprima'], function (parser) {
    +    // Do something with parser, e.g.
    +    var syntax = parser.parse('var answer = 42');
    +    console.log(JSON.stringify(syntax, null, 4));
    +});
    +
    + +

    Since Esprima is available as a Bower component, it can be installed with:

    + +
    +bower install esprima
    +
    + +

    Obviously, it can be used with Yeoman as well:

    + +
    +yeoman install esprima
    +
    + +
    With Node.js
    + +

    Esprima is available as a Node.js package, install it using npm:

    + +
    +npm install esprima
    +
    + +

    Load the module with require and use it:

    + +
    +var esprima = require('esprima');
    +console.log(JSON.stringify(esprima.parse('var answer = 42'), null, 4));
    +
    + +
    With Rhino
    + +

    Load the source file from another script:

    + +
    +load('/path/to/esprima.js');
    +
    + +

    The module esprima will be available as part of the global object:

    + +
    +var syntax = esprima.parse('42');
    +print(JSON.stringify(syntax, null, 2));
    +
    + +
    Parsing Interface
    + +

    Basic usage: + +

    +esprima.parse(code, options);
    +
    + +

    The output of the parser is the syntax tree formatted in JSON, see the following Syntax Tree Format section.

    + +

    Available options so far (by default, every option false):

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    OptionWhen set to true
    locNodes have line and column-based location info
    rangeNodes have an index-based location range (array)
    rawLiterals have extra property which stores the verbatim source
    tokensAn extra array containing all found tokens
    commentAn extra array containing all line and block comments
    tolerantAn extra array containing all errors found, + attempts to continue parsing when an error is encountered
    + + +

    The easiest way to see the different output based on various option settings is to use the online parser demo. + +

    Note: In version > 1.0, raw is ignored since literals always include the verbatim source.

    + +

    Examples

    + +
    Detect Nested Ternary Conditionals
    + +

    The script detectnestedternary.js in the examples/ subdirectory is using Esprima to look for a ternary conditional, i.e. operator ?:, which is immediately followed (in one of its code paths) by another ternary conditional. The script can be invoked from the command-line with Node.js:

    + +
    +node detectnestedternary.js /some/path
    +
    + +

    An example code fragment which will be flagged by this script as having a nested ternary conditional:

    + +
    +var str = (age < 1) ? "baby" :
    +    (age < 5) ? "toddler" :
    +    (age < 18) ? "child": "adult";
    +
    + +

    which will yield the following report:

    + +
    +  Line 1 : Nested ternary for "age < 1"
    +  Line 2 : Nested ternary for "age < 5"
    +
    + +
    Find Possible Boolean Traps
    + +

    The script findbooleantrap.js in the examples/ subdirectory is using Esprima to detect some possible cases of Boolean trap, i.e. the use of Boolean literal which may lead to ambiguities and lack of readability. The script can be invoked from command-line with Node.js:

    + +
    +node findbooleantrap.js /some/path
    +
    + +It will search for all files (recursively) in the given path, try to parse each file, and then look for signs of Boolean traps: + +
      +
    • Literal used with a non-setter function (assumption: setter starts with the "set" prefix):
    • +
      this.refresh(true);
      +
    • Literal used with a function whose name may have a double-negative interpretation:
    • +
      item.setHidden(false);
      +
    • Two different literals in a single function call:
    • +
      element.stop(true, false);
      +
    • Multiple literals in a single function invocation:
    • +
      event.initKeyEvent("keypress", true, true, null, null,
      +    false, false, false, false, 9, 0);
      +
    • Ambiguous Boolean literal as the last argument:
    • +
      return getSomething(obj, false);
      +
    + +For some more info, read also the blog post on Boolean trap. + +

    Syntax Tree Format

    + +

    The output of the parser is expected to be compatible with Mozilla SpiderMonkey Parser API. +The best way to understand various different constructs is the online parser demo which shows the syntax tree (formatted with JSON.stringify) corresponding to the typed code. + +The simplest example is as follows. If the following code is executed: + +

    +esprima.parse('var answer = 42;');
    +
    + +then the return value will be (JSON formatted): + +
    +{
    +    type: 'Program',
    +    body: [
    +        {
    +            type: 'VariableDeclaration',
    +            declarations: [
    +                {
    +                    type: 'AssignmentExpression',
    +                    operator: =,
    +                    left: {
    +                        type: 'Identifier',
    +                        name: 'answer'
    +                    },
    +                    right: {
    +                        type: 'Literal',
    +                        value: 42
    +                    }
    +                }
    +            ]
    +        }
    +    ]
    +}
    +
    + +

    Contribution Guide

    + +
    Guidelines
    + +

    Contributors are mandated to follow the guides described in the following sections. Any contribution which do not conform to the guides may be rejected.

    + +

    Laundry list

    + +

    Before creating pull requests, make sure the following applies.

    + +

    There is a corresponding issue. If there is no issue yet, create one in the issue tracker.

    + +

    The commit log links the corresponding issue (usually as the last line).

    + +

    No functional regression. Run all unit tests.

    + +

    No coverage regression. Run the code coverage analysis.

    + +

    Each commit must be granular. Big changes should be splitted into smaller commits.

    + +

    Write understandable code. No need to be too terse (or even obfuscated).

    + +

    JSLint does not complain.

    + +

    A new feature must be accompanied with unit tests. No compromise.

    + +

    A new feature should not cause performance loss. Verify with the benchmark tests.

    + +

    Performance improvement should be backed up by actual conclusive speed-up in the benchmark suite.

    + +

    Coding style

    + +

    Indentation is 4 spaces.

    + +

    Open curly brace is at the end of the line.

    + +

    String literal uses single quote (') and not double quote (").

    + +

    Commit message

    + +

    Bad:

    + +
    +    Fix a problem with Firefox.
    +
    + +

    The above commit is too short and useless in the long term.

    + +

    Good:

    + +
    +    Add support for labeled statement.
    +
    +    It is covered in ECMAScript Language Specification Section 12.12.
    +    This also fixes parsing MooTools and JSLint code.
    +
    +    Running the benchmarks suite show negligible performance loss.
    +
    +    http://code.google.com/p/esprima/issues/detail?id=10
    +    http://code.google.com/p/esprima/issues/detail?id=15
    +    http://code.google.com/p/esprima/issues/detail?id=16
    +
    + +

    Important aspects:

    + +
      +
    • The first line is the short description, useful for per-line commit view and thus keep it under 80 characters.
    • +
    • The next paragraphs should provide more explanation (if needed).
    • +
    • Describe the testing situation (new unit/benchmark test, change in performance, etc).
    • +
    • Put the link to the issues for cross-ref.
    • +
    + +

    Baseline syntax tree as the expected result

    + +

    The test suite contains a collection of a pair of code and its syntax tree. To generate the syntax tree suitably formatted for the test fixture, use the included helper script tools/generate-test-fixture.js (with Node.js), e.g.: + +

    +node tools/generate-test-fixture.js "var answer = 42"
    +
    + +The syntax tree will be printed out to the console. This can be used in the test fixture. + +
    Test Workflow
    + +

    Before running the tests, prepare the tools via:

    + +
    +npm install
    +
    + +

    Unit tests

    + +

    Browser-based unit testing is available by opening test/index.html in the source tree. The online version is esprima.org/test.

    + +

    Command-line testing using Node.js:

    + +
    npm test
    + +

    Code coverage test

    + +

    Note: you need to use Node.js 0.6 or later version.

    + +

    Install istanbul:

    + +
    sudo npm install -g istanbul
    + +

    Run it in Esprima source tree:

    + +
    istanbul cover test/runner.js
    + +

    To get the detailed report, open coverage/lcov-report/index.html file and choose esprima.js from the list.

    + +

    Benchmark tests

    + +

    Available by opening test/benchmarks.html in the source tree. The online version is esprima.org/test/benchmarks.html.

    + +

    Note: Because the corpus is fetched via XML HTTP Request, the benchmarks test needs to be served via a web server and not local file.

    + +

    It is important to run this with various browsers to cover different JavaScript engines.

    + +

    Command-line benchmark using Node.js:

    + +
    node test/benchmark.js
    + +

    Command-line benchmark using V8 shell:

    + +
    /path/to/v8/shell test/benchmark.js
    + +

    Speed comparison tests

    + +

    Available by opening test/compare.html. The online version is esprima.org/test/compare.html.

    + +

    Note: Because the corpus is fetched via XML HTTP Request, the benchmarks test needs to be served via a web server and not local file.

    + +

    Warning: Since each parser has a different format for the syntax tree, the speed is not fully comparable (the cost of constructing different result is not taken into account). These tests exist only to ensure that Esprima parser is not ridiculously slow, e.g. one magnitude slower compare to other parsers.

    + +

    License

    + +

    Copyright (C) 2012, 2011 Ariya Hidayat and other contributors.

    + +

    Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

    +
      +
    • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    • +
    • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    • +
    + +

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

    + +
    + + +
    + + + + + + diff --git a/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/esprima.js b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/esprima.js new file mode 100644 index 00000000..834c9ad9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/esprima.js @@ -0,0 +1,6306 @@ +/* + Copyright (C) 2013 Ariya Hidayat + Copyright (C) 2013 Thaddee Tyl + Copyright (C) 2012 Ariya Hidayat + Copyright (C) 2012 Mathias Bynens + Copyright (C) 2012 Joost-Wim Boekesteijn + Copyright (C) 2012 Kris Kowal + Copyright (C) 2012 Yusuke Suzuki + Copyright (C) 2012 Arpad Borsos + Copyright (C) 2011 Ariya Hidayat + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*jslint bitwise:true plusplus:true */ +/*global esprima:true, define:true, exports:true, window: true, +throwError: true, generateStatement: true, peek: true, +parseAssignmentExpression: true, parseBlock: true, +parseClassExpression: true, parseClassDeclaration: true, parseExpression: true, +parseForStatement: true, +parseFunctionDeclaration: true, parseFunctionExpression: true, +parseFunctionSourceElements: true, parseVariableIdentifier: true, +parseImportSpecifier: true, +parseLeftHandSideExpression: true, parseParams: true, validateParam: true, +parseSpreadOrAssignmentExpression: true, +parseStatement: true, parseSourceElement: true, parseModuleBlock: true, parseConciseBody: true, +advanceXJSChild: true, isXJSIdentifierStart: true, isXJSIdentifierPart: true, +scanXJSStringLiteral: true, scanXJSIdentifier: true, +parseXJSAttributeValue: true, parseXJSChild: true, parseXJSElement: true, parseXJSExpressionContainer: true, parseXJSEmptyExpression: true, +parseTypeAnnotation: true, parseTypeAnnotatableIdentifier: true, +parseYieldExpression: true +*/ + +(function (root, factory) { + 'use strict'; + + // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, + // Rhino, and plain browser loading. + if (typeof define === 'function' && define.amd) { + define(['exports'], factory); + } else if (typeof exports !== 'undefined') { + factory(exports); + } else { + factory((root.esprima = {})); + } +}(this, function (exports) { + 'use strict'; + + var Token, + TokenName, + FnExprTokens, + Syntax, + PropertyKind, + Messages, + Regex, + SyntaxTreeDelegate, + XHTMLEntities, + ClassPropertyType, + source, + strict, + index, + lineNumber, + lineStart, + length, + delegate, + lookahead, + state, + extra; + + Token = { + BooleanLiteral: 1, + EOF: 2, + Identifier: 3, + Keyword: 4, + NullLiteral: 5, + NumericLiteral: 6, + Punctuator: 7, + StringLiteral: 8, + RegularExpression: 9, + Template: 10, + XJSIdentifier: 11, + XJSText: 12 + }; + + TokenName = {}; + TokenName[Token.BooleanLiteral] = 'Boolean'; + TokenName[Token.EOF] = ''; + TokenName[Token.Identifier] = 'Identifier'; + TokenName[Token.Keyword] = 'Keyword'; + TokenName[Token.NullLiteral] = 'Null'; + TokenName[Token.NumericLiteral] = 'Numeric'; + TokenName[Token.Punctuator] = 'Punctuator'; + TokenName[Token.StringLiteral] = 'String'; + TokenName[Token.XJSIdentifier] = 'XJSIdentifier'; + TokenName[Token.XJSText] = 'XJSText'; + TokenName[Token.RegularExpression] = 'RegularExpression'; + + // A function following one of those tokens is an expression. + FnExprTokens = ['(', '{', '[', 'in', 'typeof', 'instanceof', 'new', + 'return', 'case', 'delete', 'throw', 'void', + // assignment operators + '=', '+=', '-=', '*=', '/=', '%=', '<<=', '>>=', '>>>=', + '&=', '|=', '^=', ',', + // binary/unary operators + '+', '-', '*', '/', '%', '++', '--', '<<', '>>', '>>>', '&', + '|', '^', '!', '~', '&&', '||', '?', ':', '===', '==', '>=', + '<=', '<', '>', '!=', '!==']; + + Syntax = { + ArrayExpression: 'ArrayExpression', + ArrayPattern: 'ArrayPattern', + ArrowFunctionExpression: 'ArrowFunctionExpression', + AssignmentExpression: 'AssignmentExpression', + BinaryExpression: 'BinaryExpression', + BlockStatement: 'BlockStatement', + BreakStatement: 'BreakStatement', + CallExpression: 'CallExpression', + CatchClause: 'CatchClause', + ClassBody: 'ClassBody', + ClassDeclaration: 'ClassDeclaration', + ClassExpression: 'ClassExpression', + ClassHeritage: 'ClassHeritage', + ComprehensionBlock: 'ComprehensionBlock', + ComprehensionExpression: 'ComprehensionExpression', + ConditionalExpression: 'ConditionalExpression', + ContinueStatement: 'ContinueStatement', + DebuggerStatement: 'DebuggerStatement', + DoWhileStatement: 'DoWhileStatement', + EmptyStatement: 'EmptyStatement', + ExportDeclaration: 'ExportDeclaration', + ExportBatchSpecifier: 'ExportBatchSpecifier', + ExportSpecifier: 'ExportSpecifier', + ExpressionStatement: 'ExpressionStatement', + ForInStatement: 'ForInStatement', + ForOfStatement: 'ForOfStatement', + ForStatement: 'ForStatement', + FunctionDeclaration: 'FunctionDeclaration', + FunctionExpression: 'FunctionExpression', + Identifier: 'Identifier', + IfStatement: 'IfStatement', + ImportDeclaration: 'ImportDeclaration', + ImportSpecifier: 'ImportSpecifier', + LabeledStatement: 'LabeledStatement', + Literal: 'Literal', + LogicalExpression: 'LogicalExpression', + MemberExpression: 'MemberExpression', + MethodDefinition: 'MethodDefinition', + ModuleDeclaration: 'ModuleDeclaration', + NewExpression: 'NewExpression', + ObjectExpression: 'ObjectExpression', + ObjectPattern: 'ObjectPattern', + Program: 'Program', + Property: 'Property', + ReturnStatement: 'ReturnStatement', + SequenceExpression: 'SequenceExpression', + SpreadElement: 'SpreadElement', + SwitchCase: 'SwitchCase', + SwitchStatement: 'SwitchStatement', + TaggedTemplateExpression: 'TaggedTemplateExpression', + TemplateElement: 'TemplateElement', + TemplateLiteral: 'TemplateLiteral', + ThisExpression: 'ThisExpression', + ThrowStatement: 'ThrowStatement', + TryStatement: 'TryStatement', + TypeAnnotatedIdentifier: 'TypeAnnotatedIdentifier', + TypeAnnotation: 'TypeAnnotation', + UnaryExpression: 'UnaryExpression', + UpdateExpression: 'UpdateExpression', + VariableDeclaration: 'VariableDeclaration', + VariableDeclarator: 'VariableDeclarator', + WhileStatement: 'WhileStatement', + WithStatement: 'WithStatement', + XJSIdentifier: 'XJSIdentifier', + XJSEmptyExpression: 'XJSEmptyExpression', + XJSExpressionContainer: 'XJSExpressionContainer', + XJSElement: 'XJSElement', + XJSClosingElement: 'XJSClosingElement', + XJSOpeningElement: 'XJSOpeningElement', + XJSAttribute: 'XJSAttribute', + XJSText: 'XJSText', + YieldExpression: 'YieldExpression' + }; + + PropertyKind = { + Data: 1, + Get: 2, + Set: 4 + }; + + ClassPropertyType = { + 'static': 'static', + prototype: 'prototype' + }; + + // Error messages should be identical to V8. + Messages = { + UnexpectedToken: 'Unexpected token %0', + UnexpectedNumber: 'Unexpected number', + UnexpectedString: 'Unexpected string', + UnexpectedIdentifier: 'Unexpected identifier', + UnexpectedReserved: 'Unexpected reserved word', + UnexpectedTemplate: 'Unexpected quasi %0', + UnexpectedEOS: 'Unexpected end of input', + NewlineAfterThrow: 'Illegal newline after throw', + InvalidRegExp: 'Invalid regular expression', + UnterminatedRegExp: 'Invalid regular expression: missing /', + InvalidLHSInAssignment: 'Invalid left-hand side in assignment', + InvalidLHSInFormalsList: 'Invalid left-hand side in formals list', + InvalidLHSInForIn: 'Invalid left-hand side in for-in', + MultipleDefaultsInSwitch: 'More than one default clause in switch statement', + NoCatchOrFinally: 'Missing catch or finally after try', + UnknownLabel: 'Undefined label \'%0\'', + Redeclaration: '%0 \'%1\' has already been declared', + IllegalContinue: 'Illegal continue statement', + IllegalBreak: 'Illegal break statement', + IllegalDuplicateClassProperty: 'Illegal duplicate property in class definition', + IllegalReturn: 'Illegal return statement', + IllegalYield: 'Illegal yield expression', + IllegalSpread: 'Illegal spread element', + StrictModeWith: 'Strict mode code may not include a with statement', + StrictCatchVariable: 'Catch variable may not be eval or arguments in strict mode', + StrictVarName: 'Variable name may not be eval or arguments in strict mode', + StrictParamName: 'Parameter name eval or arguments is not allowed in strict mode', + StrictParamDupe: 'Strict mode function may not have duplicate parameter names', + ParameterAfterRestParameter: 'Rest parameter must be final parameter of an argument list', + DefaultRestParameter: 'Rest parameter can not have a default value', + ElementAfterSpreadElement: 'Spread must be the final element of an element list', + ObjectPatternAsRestParameter: 'Invalid rest parameter', + ObjectPatternAsSpread: 'Invalid spread argument', + StrictFunctionName: 'Function name may not be eval or arguments in strict mode', + StrictOctalLiteral: 'Octal literals are not allowed in strict mode.', + StrictDelete: 'Delete of an unqualified identifier in strict mode.', + StrictDuplicateProperty: 'Duplicate data property in object literal not allowed in strict mode', + AccessorDataProperty: 'Object literal may not have data and accessor property with the same name', + AccessorGetSet: 'Object literal may not have multiple get/set accessors with the same name', + StrictLHSAssignment: 'Assignment to eval or arguments is not allowed in strict mode', + StrictLHSPostfix: 'Postfix increment/decrement may not have eval or arguments operand in strict mode', + StrictLHSPrefix: 'Prefix increment/decrement may not have eval or arguments operand in strict mode', + StrictReservedWord: 'Use of future reserved word in strict mode', + NewlineAfterModule: 'Illegal newline after module', + NoFromAfterImport: 'Missing from after import', + InvalidModuleSpecifier: 'Invalid module specifier', + NestedModule: 'Module declaration can not be nested', + NoYieldInGenerator: 'Missing yield in generator', + NoUnintializedConst: 'Const must be initialized', + ComprehensionRequiresBlock: 'Comprehension must have at least one block', + ComprehensionError: 'Comprehension Error', + EachNotAllowed: 'Each is not supported', + InvalidXJSTagName: 'XJS tag name can not be empty', + InvalidXJSAttributeValue: 'XJS value should be either an expression or a quoted XJS text', + ExpectedXJSClosingTag: 'Expected corresponding XJS closing tag for %0' + }; + + // See also tools/generate-unicode-regex.py. + Regex = { + NonAsciiIdentifierStart: new RegExp('[\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]'), + NonAsciiIdentifierPart: new RegExp('[\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0300-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u0483-\u0487\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u05d0-\u05ea\u05f0-\u05f2\u0610-\u061a\u0620-\u0669\u066e-\u06d3\u06d5-\u06dc\u06df-\u06e8\u06ea-\u06fc\u06ff\u0710-\u074a\u074d-\u07b1\u07c0-\u07f5\u07fa\u0800-\u082d\u0840-\u085b\u08a0\u08a2-\u08ac\u08e4-\u08fe\u0900-\u0963\u0966-\u096f\u0971-\u0977\u0979-\u097f\u0981-\u0983\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bc-\u09c4\u09c7\u09c8\u09cb-\u09ce\u09d7\u09dc\u09dd\u09df-\u09e3\u09e6-\u09f1\u0a01-\u0a03\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a59-\u0a5c\u0a5e\u0a66-\u0a75\u0a81-\u0a83\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abc-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ad0\u0ae0-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3c-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5c\u0b5d\u0b5f-\u0b63\u0b66-\u0b6f\u0b71\u0b82\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd0\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c58\u0c59\u0c60-\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbc-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0cde\u0ce0-\u0ce3\u0ce6-\u0cef\u0cf1\u0cf2\u0d02\u0d03\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d-\u0d44\u0d46-\u0d48\u0d4a-\u0d4e\u0d57\u0d60-\u0d63\u0d66-\u0d6f\u0d7a-\u0d7f\u0d82\u0d83\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e01-\u0e3a\u0e40-\u0e4e\u0e50-\u0e59\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb9\u0ebb-\u0ebd\u0ec0-\u0ec4\u0ec6\u0ec8-\u0ecd\u0ed0-\u0ed9\u0edc-\u0edf\u0f00\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e-\u0f47\u0f49-\u0f6c\u0f71-\u0f84\u0f86-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1049\u1050-\u109d\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u135d-\u135f\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176c\u176e-\u1770\u1772\u1773\u1780-\u17d3\u17d7\u17dc\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1820-\u1877\u1880-\u18aa\u18b0-\u18f5\u1900-\u191c\u1920-\u192b\u1930-\u193b\u1946-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u19d0-\u19d9\u1a00-\u1a1b\u1a20-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1aa7\u1b00-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1bf3\u1c00-\u1c37\u1c40-\u1c49\u1c4d-\u1c7d\u1cd0-\u1cd2\u1cd4-\u1cf6\u1d00-\u1de6\u1dfc-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u200c\u200d\u203f\u2040\u2054\u2071\u207f\u2090-\u209c\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d7f-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2de0-\u2dff\u2e2f\u3005-\u3007\u3021-\u302f\u3031-\u3035\u3038-\u303c\u3041-\u3096\u3099\u309a\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua62b\ua640-\ua66f\ua674-\ua67d\ua67f-\ua697\ua69f-\ua6f1\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua827\ua840-\ua873\ua880-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f7\ua8fb\ua900-\ua92d\ua930-\ua953\ua960-\ua97c\ua980-\ua9c0\ua9cf-\ua9d9\uaa00-\uaa36\uaa40-\uaa4d\uaa50-\uaa59\uaa60-\uaa76\uaa7a\uaa7b\uaa80-\uaac2\uaadb-\uaadd\uaae0-\uaaef\uaaf2-\uaaf6\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabea\uabec\uabed\uabf0-\uabf9\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\ufe70-\ufe74\ufe76-\ufefc\uff10-\uff19\uff21-\uff3a\uff3f\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]') + }; + + // Ensure the condition is true, otherwise throw an error. + // This is only to have a better contract semantic, i.e. another safety net + // to catch a logic error. The condition shall be fulfilled in normal case. + // Do NOT use this to enforce a certain condition on any user input. + + function assert(condition, message) { + if (!condition) { + throw new Error('ASSERT: ' + message); + } + } + + function isDecimalDigit(ch) { + return (ch >= 48 && ch <= 57); // 0..9 + } + + function isHexDigit(ch) { + return '0123456789abcdefABCDEF'.indexOf(ch) >= 0; + } + + function isOctalDigit(ch) { + return '01234567'.indexOf(ch) >= 0; + } + + + // 7.2 White Space + + function isWhiteSpace(ch) { + return (ch === 32) || // space + (ch === 9) || // tab + (ch === 0xB) || + (ch === 0xC) || + (ch === 0xA0) || + (ch >= 0x1680 && '\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\uFEFF'.indexOf(String.fromCharCode(ch)) > 0); + } + + // 7.3 Line Terminators + + function isLineTerminator(ch) { + return (ch === 10) || (ch === 13) || (ch === 0x2028) || (ch === 0x2029); + } + + // 7.6 Identifier Names and Identifiers + + function isIdentifierStart(ch) { + return (ch === 36) || (ch === 95) || // $ (dollar) and _ (underscore) + (ch >= 65 && ch <= 90) || // A..Z + (ch >= 97 && ch <= 122) || // a..z + (ch === 92) || // \ (backslash) + ((ch >= 0x80) && Regex.NonAsciiIdentifierStart.test(String.fromCharCode(ch))); + } + + function isIdentifierPart(ch) { + return (ch === 36) || (ch === 95) || // $ (dollar) and _ (underscore) + (ch >= 65 && ch <= 90) || // A..Z + (ch >= 97 && ch <= 122) || // a..z + (ch >= 48 && ch <= 57) || // 0..9 + (ch === 92) || // \ (backslash) + ((ch >= 0x80) && Regex.NonAsciiIdentifierPart.test(String.fromCharCode(ch))); + } + + // 7.6.1.2 Future Reserved Words + + function isFutureReservedWord(id) { + switch (id) { + case 'class': + case 'enum': + case 'export': + case 'extends': + case 'import': + case 'super': + return true; + default: + return false; + } + } + + function isStrictModeReservedWord(id) { + switch (id) { + case 'implements': + case 'interface': + case 'package': + case 'private': + case 'protected': + case 'public': + case 'static': + case 'yield': + case 'let': + return true; + default: + return false; + } + } + + function isRestrictedWord(id) { + return id === 'eval' || id === 'arguments'; + } + + // 7.6.1.1 Keywords + + function isKeyword(id) { + if (strict && isStrictModeReservedWord(id)) { + return true; + } + + // 'const' is specialized as Keyword in V8. + // 'yield' and 'let' are for compatiblity with SpiderMonkey and ES.next. + // Some others are from future reserved words. + + switch (id.length) { + case 2: + return (id === 'if') || (id === 'in') || (id === 'do'); + case 3: + return (id === 'var') || (id === 'for') || (id === 'new') || + (id === 'try') || (id === 'let'); + case 4: + return (id === 'this') || (id === 'else') || (id === 'case') || + (id === 'void') || (id === 'with') || (id === 'enum'); + case 5: + return (id === 'while') || (id === 'break') || (id === 'catch') || + (id === 'throw') || (id === 'const') || (id === 'yield') || + (id === 'class') || (id === 'super'); + case 6: + return (id === 'return') || (id === 'typeof') || (id === 'delete') || + (id === 'switch') || (id === 'export') || (id === 'import'); + case 7: + return (id === 'default') || (id === 'finally') || (id === 'extends'); + case 8: + return (id === 'function') || (id === 'continue') || (id === 'debugger'); + case 10: + return (id === 'instanceof'); + default: + return false; + } + } + + // 7.4 Comments + + function skipComment() { + var ch, blockComment, lineComment; + + blockComment = false; + lineComment = false; + + while (index < length) { + ch = source.charCodeAt(index); + + if (lineComment) { + ++index; + if (isLineTerminator(ch)) { + lineComment = false; + if (ch === 13 && source.charCodeAt(index) === 10) { + ++index; + } + ++lineNumber; + lineStart = index; + } + } else if (blockComment) { + if (isLineTerminator(ch)) { + if (ch === 13 && source.charCodeAt(index + 1) === 10) { + ++index; + } + ++lineNumber; + ++index; + lineStart = index; + if (index >= length) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } else { + ch = source.charCodeAt(index++); + if (index >= length) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + // Block comment ends with '*/' (char #42, char #47). + if (ch === 42) { + ch = source.charCodeAt(index); + if (ch === 47) { + ++index; + blockComment = false; + } + } + } + } else if (ch === 47) { + ch = source.charCodeAt(index + 1); + // Line comment starts with '//' (char #47, char #47). + if (ch === 47) { + index += 2; + lineComment = true; + } else if (ch === 42) { + // Block comment starts with '/*' (char #47, char #42). + index += 2; + blockComment = true; + if (index >= length) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } else { + break; + } + } else if (isWhiteSpace(ch)) { + ++index; + } else if (isLineTerminator(ch)) { + ++index; + if (ch === 13 && source.charCodeAt(index) === 10) { + ++index; + } + ++lineNumber; + lineStart = index; + } else { + break; + } + } + } + + function scanHexEscape(prefix) { + var i, len, ch, code = 0; + + len = (prefix === 'u') ? 4 : 2; + for (i = 0; i < len; ++i) { + if (index < length && isHexDigit(source[index])) { + ch = source[index++]; + code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase()); + } else { + return ''; + } + } + return String.fromCharCode(code); + } + + function scanUnicodeCodePointEscape() { + var ch, code, cu1, cu2; + + ch = source[index]; + code = 0; + + // At least, one hex digit is required. + if (ch === '}') { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + while (index < length) { + ch = source[index++]; + if (!isHexDigit(ch)) { + break; + } + code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase()); + } + + if (code > 0x10FFFF || ch !== '}') { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + // UTF-16 Encoding + if (code <= 0xFFFF) { + return String.fromCharCode(code); + } + cu1 = ((code - 0x10000) >> 10) + 0xD800; + cu2 = ((code - 0x10000) & 1023) + 0xDC00; + return String.fromCharCode(cu1, cu2); + } + + function getEscapedIdentifier() { + var ch, id; + + ch = source.charCodeAt(index++); + id = String.fromCharCode(ch); + + // '\u' (char #92, char #117) denotes an escaped character. + if (ch === 92) { + if (source.charCodeAt(index) !== 117) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + ++index; + ch = scanHexEscape('u'); + if (!ch || ch === '\\' || !isIdentifierStart(ch.charCodeAt(0))) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + id = ch; + } + + while (index < length) { + ch = source.charCodeAt(index); + if (!isIdentifierPart(ch)) { + break; + } + ++index; + id += String.fromCharCode(ch); + + // '\u' (char #92, char #117) denotes an escaped character. + if (ch === 92) { + id = id.substr(0, id.length - 1); + if (source.charCodeAt(index) !== 117) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + ++index; + ch = scanHexEscape('u'); + if (!ch || ch === '\\' || !isIdentifierPart(ch.charCodeAt(0))) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + id += ch; + } + } + + return id; + } + + function getIdentifier() { + var start, ch; + + start = index++; + while (index < length) { + ch = source.charCodeAt(index); + if (ch === 92) { + // Blackslash (char #92) marks Unicode escape sequence. + index = start; + return getEscapedIdentifier(); + } + if (isIdentifierPart(ch)) { + ++index; + } else { + break; + } + } + + return source.slice(start, index); + } + + function scanIdentifier() { + var start, id, type; + + start = index; + + // Backslash (char #92) starts an escaped character. + id = (source.charCodeAt(index) === 92) ? getEscapedIdentifier() : getIdentifier(); + + // There is no keyword or literal with only one character. + // Thus, it must be an identifier. + if (id.length === 1) { + type = Token.Identifier; + } else if (isKeyword(id)) { + type = Token.Keyword; + } else if (id === 'null') { + type = Token.NullLiteral; + } else if (id === 'true' || id === 'false') { + type = Token.BooleanLiteral; + } else { + type = Token.Identifier; + } + + return { + type: type, + value: id, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + + // 7.7 Punctuators + + function scanPunctuator() { + var start = index, + code = source.charCodeAt(index), + code2, + ch1 = source[index], + ch2, + ch3, + ch4; + + switch (code) { + // Check for most common single-character punctuators. + case 40: // ( open bracket + case 41: // ) close bracket + case 59: // ; semicolon + case 44: // , comma + case 123: // { open curly brace + case 125: // } close curly brace + case 91: // [ + case 93: // ] + case 58: // : + case 63: // ? + case 126: // ~ + ++index; + if (extra.tokenize) { + if (code === 40) { + extra.openParenToken = extra.tokens.length; + } else if (code === 123) { + extra.openCurlyToken = extra.tokens.length; + } + } + return { + type: Token.Punctuator, + value: String.fromCharCode(code), + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + + default: + code2 = source.charCodeAt(index + 1); + + // '=' (char #61) marks an assignment or comparison operator. + if (code2 === 61) { + switch (code) { + case 37: // % + case 38: // & + case 42: // *: + case 43: // + + case 45: // - + case 47: // / + case 60: // < + case 62: // > + case 94: // ^ + case 124: // | + index += 2; + return { + type: Token.Punctuator, + value: String.fromCharCode(code) + String.fromCharCode(code2), + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + + case 33: // ! + case 61: // = + index += 2; + + // !== and === + if (source.charCodeAt(index) === 61) { + ++index; + } + return { + type: Token.Punctuator, + value: source.slice(start, index), + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + default: + break; + } + } + break; + } + + // Peek more characters. + + ch2 = source[index + 1]; + ch3 = source[index + 2]; + ch4 = source[index + 3]; + + // 4-character punctuator: >>>= + + if (ch1 === '>' && ch2 === '>' && ch3 === '>') { + if (ch4 === '=') { + index += 4; + return { + type: Token.Punctuator, + value: '>>>=', + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + } + + // 3-character punctuators: === !== >>> <<= >>= + + if (ch1 === '>' && ch2 === '>' && ch3 === '>') { + index += 3; + return { + type: Token.Punctuator, + value: '>>>', + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + if (ch1 === '<' && ch2 === '<' && ch3 === '=') { + index += 3; + return { + type: Token.Punctuator, + value: '<<=', + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + if (ch1 === '>' && ch2 === '>' && ch3 === '=') { + index += 3; + return { + type: Token.Punctuator, + value: '>>=', + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + if (ch1 === '.' && ch2 === '.' && ch3 === '.') { + index += 3; + return { + type: Token.Punctuator, + value: '...', + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + // Other 2-character punctuators: ++ -- << >> && || + + if (ch1 === ch2 && ('+-<>&|'.indexOf(ch1) >= 0)) { + index += 2; + return { + type: Token.Punctuator, + value: ch1 + ch2, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + if (ch1 === '=' && ch2 === '>') { + index += 2; + return { + type: Token.Punctuator, + value: '=>', + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + if ('<>=!+-*%&|^/'.indexOf(ch1) >= 0) { + ++index; + return { + type: Token.Punctuator, + value: ch1, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + if (ch1 === '.') { + ++index; + return { + type: Token.Punctuator, + value: ch1, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + // 7.8.3 Numeric Literals + + function scanHexLiteral(start) { + var number = ''; + + while (index < length) { + if (!isHexDigit(source[index])) { + break; + } + number += source[index++]; + } + + if (number.length === 0) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + if (isIdentifierStart(source.charCodeAt(index))) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + return { + type: Token.NumericLiteral, + value: parseInt('0x' + number, 16), + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + function scanOctalLiteral(prefix, start) { + var number, octal; + + if (isOctalDigit(prefix)) { + octal = true; + number = '0' + source[index++]; + } else { + octal = false; + ++index; + number = ''; + } + + while (index < length) { + if (!isOctalDigit(source[index])) { + break; + } + number += source[index++]; + } + + if (!octal && number.length === 0) { + // only 0o or 0O + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + if (isIdentifierStart(source.charCodeAt(index)) || isDecimalDigit(source.charCodeAt(index))) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + return { + type: Token.NumericLiteral, + value: parseInt(number, 8), + octal: octal, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + function scanNumericLiteral() { + var number, start, ch, octal; + + ch = source[index]; + assert(isDecimalDigit(ch.charCodeAt(0)) || (ch === '.'), + 'Numeric literal must start with a decimal digit or a decimal point'); + + start = index; + number = ''; + if (ch !== '.') { + number = source[index++]; + ch = source[index]; + + // Hex number starts with '0x'. + // Octal number starts with '0'. + // Octal number in ES6 starts with '0o'. + // Binary number in ES6 starts with '0b'. + if (number === '0') { + if (ch === 'x' || ch === 'X') { + ++index; + return scanHexLiteral(start); + } + if (ch === 'b' || ch === 'B') { + ++index; + number = ''; + + while (index < length) { + ch = source[index]; + if (ch !== '0' && ch !== '1') { + break; + } + number += source[index++]; + } + + if (number.length === 0) { + // only 0b or 0B + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + if (index < length) { + ch = source.charCodeAt(index); + if (isIdentifierStart(ch) || isDecimalDigit(ch)) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } + return { + type: Token.NumericLiteral, + value: parseInt(number, 2), + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + if (ch === 'o' || ch === 'O' || isOctalDigit(ch)) { + return scanOctalLiteral(ch, start); + } + // decimal number starts with '0' such as '09' is illegal. + if (ch && isDecimalDigit(ch.charCodeAt(0))) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } + + while (isDecimalDigit(source.charCodeAt(index))) { + number += source[index++]; + } + ch = source[index]; + } + + if (ch === '.') { + number += source[index++]; + while (isDecimalDigit(source.charCodeAt(index))) { + number += source[index++]; + } + ch = source[index]; + } + + if (ch === 'e' || ch === 'E') { + number += source[index++]; + + ch = source[index]; + if (ch === '+' || ch === '-') { + number += source[index++]; + } + if (isDecimalDigit(source.charCodeAt(index))) { + while (isDecimalDigit(source.charCodeAt(index))) { + number += source[index++]; + } + } else { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } + + if (isIdentifierStart(source.charCodeAt(index))) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + return { + type: Token.NumericLiteral, + value: parseFloat(number), + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + // 7.8.4 String Literals + + function scanStringLiteral() { + var str = '', quote, start, ch, code, unescaped, restore, octal = false; + + quote = source[index]; + assert((quote === '\'' || quote === '"'), + 'String literal must starts with a quote'); + + start = index; + ++index; + + while (index < length) { + ch = source[index++]; + + if (ch === quote) { + quote = ''; + break; + } else if (ch === '\\') { + ch = source[index++]; + if (!ch || !isLineTerminator(ch.charCodeAt(0))) { + switch (ch) { + case 'n': + str += '\n'; + break; + case 'r': + str += '\r'; + break; + case 't': + str += '\t'; + break; + case 'u': + case 'x': + if (source[index] === '{') { + ++index; + str += scanUnicodeCodePointEscape(); + } else { + restore = index; + unescaped = scanHexEscape(ch); + if (unescaped) { + str += unescaped; + } else { + index = restore; + str += ch; + } + } + break; + case 'b': + str += '\b'; + break; + case 'f': + str += '\f'; + break; + case 'v': + str += '\x0B'; + break; + + default: + if (isOctalDigit(ch)) { + code = '01234567'.indexOf(ch); + + // \0 is not octal escape sequence + if (code !== 0) { + octal = true; + } + + if (index < length && isOctalDigit(source[index])) { + octal = true; + code = code * 8 + '01234567'.indexOf(source[index++]); + + // 3 digits are only allowed when string starts + // with 0, 1, 2, 3 + if ('0123'.indexOf(ch) >= 0 && + index < length && + isOctalDigit(source[index])) { + code = code * 8 + '01234567'.indexOf(source[index++]); + } + } + str += String.fromCharCode(code); + } else { + str += ch; + } + break; + } + } else { + ++lineNumber; + if (ch === '\r' && source[index] === '\n') { + ++index; + } + } + } else if (isLineTerminator(ch.charCodeAt(0))) { + break; + } else { + str += ch; + } + } + + if (quote !== '') { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + return { + type: Token.StringLiteral, + value: str, + octal: octal, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + function scanTemplate() { + var cooked = '', ch, start, terminated, tail, restore, unescaped, code, octal; + + terminated = false; + tail = false; + start = index; + + ++index; + + while (index < length) { + ch = source[index++]; + if (ch === '`') { + tail = true; + terminated = true; + break; + } else if (ch === '$') { + if (source[index] === '{') { + ++index; + terminated = true; + break; + } + cooked += ch; + } else if (ch === '\\') { + ch = source[index++]; + if (!isLineTerminator(ch.charCodeAt(0))) { + switch (ch) { + case 'n': + cooked += '\n'; + break; + case 'r': + cooked += '\r'; + break; + case 't': + cooked += '\t'; + break; + case 'u': + case 'x': + if (source[index] === '{') { + ++index; + cooked += scanUnicodeCodePointEscape(); + } else { + restore = index; + unescaped = scanHexEscape(ch); + if (unescaped) { + cooked += unescaped; + } else { + index = restore; + cooked += ch; + } + } + break; + case 'b': + cooked += '\b'; + break; + case 'f': + cooked += '\f'; + break; + case 'v': + cooked += '\v'; + break; + + default: + if (isOctalDigit(ch)) { + code = '01234567'.indexOf(ch); + + // \0 is not octal escape sequence + if (code !== 0) { + octal = true; + } + + if (index < length && isOctalDigit(source[index])) { + octal = true; + code = code * 8 + '01234567'.indexOf(source[index++]); + + // 3 digits are only allowed when string starts + // with 0, 1, 2, 3 + if ('0123'.indexOf(ch) >= 0 && + index < length && + isOctalDigit(source[index])) { + code = code * 8 + '01234567'.indexOf(source[index++]); + } + } + cooked += String.fromCharCode(code); + } else { + cooked += ch; + } + break; + } + } else { + ++lineNumber; + if (ch === '\r' && source[index] === '\n') { + ++index; + } + } + } else if (isLineTerminator(ch.charCodeAt(0))) { + ++lineNumber; + if (ch === '\r' && source[index] === '\n') { + ++index; + } + cooked += '\n'; + } else { + cooked += ch; + } + } + + if (!terminated) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + return { + type: Token.Template, + value: { + cooked: cooked, + raw: source.slice(start + 1, index - ((tail) ? 1 : 2)) + }, + tail: tail, + octal: octal, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + function scanTemplateElement(option) { + var startsWith, template; + + lookahead = null; + skipComment(); + + startsWith = (option.head) ? '`' : '}'; + + if (source[index] !== startsWith) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + template = scanTemplate(); + + peek(); + + return template; + } + + function scanRegExp() { + var str, ch, start, pattern, flags, value, classMarker = false, restore, terminated = false; + + lookahead = null; + skipComment(); + + start = index; + ch = source[index]; + assert(ch === '/', 'Regular expression literal must start with a slash'); + str = source[index++]; + + while (index < length) { + ch = source[index++]; + str += ch; + if (classMarker) { + if (ch === ']') { + classMarker = false; + } + } else { + if (ch === '\\') { + ch = source[index++]; + // ECMA-262 7.8.5 + if (isLineTerminator(ch.charCodeAt(0))) { + throwError({}, Messages.UnterminatedRegExp); + } + str += ch; + } else if (ch === '/') { + terminated = true; + break; + } else if (ch === '[') { + classMarker = true; + } else if (isLineTerminator(ch.charCodeAt(0))) { + throwError({}, Messages.UnterminatedRegExp); + } + } + } + + if (!terminated) { + throwError({}, Messages.UnterminatedRegExp); + } + + // Exclude leading and trailing slash. + pattern = str.substr(1, str.length - 2); + + flags = ''; + while (index < length) { + ch = source[index]; + if (!isIdentifierPart(ch.charCodeAt(0))) { + break; + } + + ++index; + if (ch === '\\' && index < length) { + ch = source[index]; + if (ch === 'u') { + ++index; + restore = index; + ch = scanHexEscape('u'); + if (ch) { + flags += ch; + for (str += '\\u'; restore < index; ++restore) { + str += source[restore]; + } + } else { + index = restore; + flags += 'u'; + str += '\\u'; + } + } else { + str += '\\'; + } + } else { + flags += ch; + str += ch; + } + } + + try { + value = new RegExp(pattern, flags); + } catch (e) { + throwError({}, Messages.InvalidRegExp); + } + + peek(); + + + if (extra.tokenize) { + return { + type: Token.RegularExpression, + value: value, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + return { + literal: str, + value: value, + range: [start, index] + }; + } + + function isIdentifierName(token) { + return token.type === Token.Identifier || + token.type === Token.Keyword || + token.type === Token.BooleanLiteral || + token.type === Token.NullLiteral; + } + + function advanceSlash() { + var prevToken, + checkToken; + // Using the following algorithm: + // https://github.com/mozilla/sweet.js/wiki/design + prevToken = extra.tokens[extra.tokens.length - 1]; + if (!prevToken) { + // Nothing before that: it cannot be a division. + return scanRegExp(); + } + if (prevToken.type === 'Punctuator') { + if (prevToken.value === ')') { + checkToken = extra.tokens[extra.openParenToken - 1]; + if (checkToken && + checkToken.type === 'Keyword' && + (checkToken.value === 'if' || + checkToken.value === 'while' || + checkToken.value === 'for' || + checkToken.value === 'with')) { + return scanRegExp(); + } + return scanPunctuator(); + } + if (prevToken.value === '}') { + // Dividing a function by anything makes little sense, + // but we have to check for that. + if (extra.tokens[extra.openCurlyToken - 3] && + extra.tokens[extra.openCurlyToken - 3].type === 'Keyword') { + // Anonymous function. + checkToken = extra.tokens[extra.openCurlyToken - 4]; + if (!checkToken) { + return scanPunctuator(); + } + } else if (extra.tokens[extra.openCurlyToken - 4] && + extra.tokens[extra.openCurlyToken - 4].type === 'Keyword') { + // Named function. + checkToken = extra.tokens[extra.openCurlyToken - 5]; + if (!checkToken) { + return scanRegExp(); + } + } else { + return scanPunctuator(); + } + // checkToken determines whether the function is + // a declaration or an expression. + if (FnExprTokens.indexOf(checkToken.value) >= 0) { + // It is an expression. + return scanPunctuator(); + } + // It is a declaration. + return scanRegExp(); + } + return scanRegExp(); + } + if (prevToken.type === 'Keyword') { + return scanRegExp(); + } + return scanPunctuator(); + } + + function advance() { + var ch; + + if (!state.inXJSChild) { + skipComment(); + } + + if (index >= length) { + return { + type: Token.EOF, + lineNumber: lineNumber, + lineStart: lineStart, + range: [index, index] + }; + } + + if (state.inXJSChild) { + return advanceXJSChild(); + } + + ch = source.charCodeAt(index); + + // Very common: ( and ) and ; + if (ch === 40 || ch === 41 || ch === 58) { + return scanPunctuator(); + } + + // String literal starts with single quote (#39) or double quote (#34). + if (ch === 39 || ch === 34) { + if (state.inXJSTag) { + return scanXJSStringLiteral(); + } + return scanStringLiteral(); + } + + if (state.inXJSTag && isXJSIdentifierStart(ch)) { + return scanXJSIdentifier(); + } + + if (ch === 96) { + return scanTemplate(); + } + if (isIdentifierStart(ch)) { + return scanIdentifier(); + } + + // Dot (.) char #46 can also start a floating-point number, hence the need + // to check the next character. + if (ch === 46) { + if (isDecimalDigit(source.charCodeAt(index + 1))) { + return scanNumericLiteral(); + } + return scanPunctuator(); + } + + if (isDecimalDigit(ch)) { + return scanNumericLiteral(); + } + + // Slash (/) char #47 can also start a regex. + if (extra.tokenize && ch === 47) { + return advanceSlash(); + } + + return scanPunctuator(); + } + + function lex() { + var token; + + token = lookahead; + index = token.range[1]; + lineNumber = token.lineNumber; + lineStart = token.lineStart; + + lookahead = advance(); + + index = token.range[1]; + lineNumber = token.lineNumber; + lineStart = token.lineStart; + + return token; + } + + function peek() { + var pos, line, start; + + pos = index; + line = lineNumber; + start = lineStart; + lookahead = advance(); + index = pos; + lineNumber = line; + lineStart = start; + } + + function lookahead2() { + var adv, pos, line, start, result; + + // If we are collecting the tokens, don't grab the next one yet. + adv = (typeof extra.advance === 'function') ? extra.advance : advance; + + pos = index; + line = lineNumber; + start = lineStart; + + // Scan for the next immediate token. + if (lookahead === null) { + lookahead = adv(); + } + index = lookahead.range[1]; + lineNumber = lookahead.lineNumber; + lineStart = lookahead.lineStart; + + // Grab the token right after. + result = adv(); + index = pos; + lineNumber = line; + lineStart = start; + + return result; + } + + SyntaxTreeDelegate = { + + name: 'SyntaxTree', + + postProcess: function (node) { + return node; + }, + + createArrayExpression: function (elements) { + return { + type: Syntax.ArrayExpression, + elements: elements + }; + }, + + createAssignmentExpression: function (operator, left, right) { + return { + type: Syntax.AssignmentExpression, + operator: operator, + left: left, + right: right + }; + }, + + createBinaryExpression: function (operator, left, right) { + var type = (operator === '||' || operator === '&&') ? Syntax.LogicalExpression : + Syntax.BinaryExpression; + return { + type: type, + operator: operator, + left: left, + right: right + }; + }, + + createBlockStatement: function (body) { + return { + type: Syntax.BlockStatement, + body: body + }; + }, + + createBreakStatement: function (label) { + return { + type: Syntax.BreakStatement, + label: label + }; + }, + + createCallExpression: function (callee, args) { + return { + type: Syntax.CallExpression, + callee: callee, + 'arguments': args + }; + }, + + createCatchClause: function (param, body) { + return { + type: Syntax.CatchClause, + param: param, + body: body + }; + }, + + createConditionalExpression: function (test, consequent, alternate) { + return { + type: Syntax.ConditionalExpression, + test: test, + consequent: consequent, + alternate: alternate + }; + }, + + createContinueStatement: function (label) { + return { + type: Syntax.ContinueStatement, + label: label + }; + }, + + createDebuggerStatement: function () { + return { + type: Syntax.DebuggerStatement + }; + }, + + createDoWhileStatement: function (body, test) { + return { + type: Syntax.DoWhileStatement, + body: body, + test: test + }; + }, + + createEmptyStatement: function () { + return { + type: Syntax.EmptyStatement + }; + }, + + createExpressionStatement: function (expression) { + return { + type: Syntax.ExpressionStatement, + expression: expression + }; + }, + + createForStatement: function (init, test, update, body) { + return { + type: Syntax.ForStatement, + init: init, + test: test, + update: update, + body: body + }; + }, + + createForInStatement: function (left, right, body) { + return { + type: Syntax.ForInStatement, + left: left, + right: right, + body: body, + each: false + }; + }, + + createForOfStatement: function (left, right, body) { + return { + type: Syntax.ForOfStatement, + left: left, + right: right, + body: body + }; + }, + + createFunctionDeclaration: function (id, params, defaults, body, rest, generator, expression, + returnType) { + return { + type: Syntax.FunctionDeclaration, + id: id, + params: params, + defaults: defaults, + body: body, + rest: rest, + generator: generator, + expression: expression, + returnType: returnType + }; + }, + + createFunctionExpression: function (id, params, defaults, body, rest, generator, expression, + returnType) { + return { + type: Syntax.FunctionExpression, + id: id, + params: params, + defaults: defaults, + body: body, + rest: rest, + generator: generator, + expression: expression, + returnType: returnType + }; + }, + + createIdentifier: function (name) { + return { + type: Syntax.Identifier, + name: name, + // Only here to initialize the shape of the object to ensure + // that the 'typeAnnotation' key is ordered before others that + // are added later (like 'loc' and 'range'). This just helps + // keep the shape of Identifier nodes consistent with everything + // else. + typeAnnotation: undefined + }; + }, + + createTypeAnnotation: function (typeIdentifier, paramTypes, returnType, nullable) { + return { + type: Syntax.TypeAnnotation, + id: typeIdentifier, + paramTypes: paramTypes, + returnType: returnType, + nullable: nullable + }; + }, + + createTypeAnnotatedIdentifier: function (identifier, annotation) { + return { + type: Syntax.TypeAnnotatedIdentifier, + id: identifier, + annotation: annotation + }; + }, + + createXJSAttribute: function (name, value) { + return { + type: Syntax.XJSAttribute, + name: name, + value: value + }; + }, + + createXJSIdentifier: function (name, namespace) { + return { + type: Syntax.XJSIdentifier, + name: name, + namespace: namespace + }; + }, + + createXJSElement: function (openingElement, closingElement, children) { + return { + type: Syntax.XJSElement, + openingElement: openingElement, + closingElement: closingElement, + children: children + }; + }, + + createXJSEmptyExpression: function () { + return { + type: Syntax.XJSEmptyExpression + }; + }, + + createXJSExpressionContainer: function (expression) { + return { + type: Syntax.XJSExpressionContainer, + expression: expression + }; + }, + + createXJSOpeningElement: function (name, attributes, selfClosing) { + return { + type: Syntax.XJSOpeningElement, + name: name, + selfClosing: selfClosing, + attributes: attributes + }; + }, + + createXJSClosingElement: function (name) { + return { + type: Syntax.XJSClosingElement, + name: name + }; + }, + + createIfStatement: function (test, consequent, alternate) { + return { + type: Syntax.IfStatement, + test: test, + consequent: consequent, + alternate: alternate + }; + }, + + createLabeledStatement: function (label, body) { + return { + type: Syntax.LabeledStatement, + label: label, + body: body + }; + }, + + createLiteral: function (token) { + return { + type: Syntax.Literal, + value: token.value, + raw: source.slice(token.range[0], token.range[1]) + }; + }, + + createMemberExpression: function (accessor, object, property) { + return { + type: Syntax.MemberExpression, + computed: accessor === '[', + object: object, + property: property + }; + }, + + createNewExpression: function (callee, args) { + return { + type: Syntax.NewExpression, + callee: callee, + 'arguments': args + }; + }, + + createObjectExpression: function (properties) { + return { + type: Syntax.ObjectExpression, + properties: properties + }; + }, + + createPostfixExpression: function (operator, argument) { + return { + type: Syntax.UpdateExpression, + operator: operator, + argument: argument, + prefix: false + }; + }, + + createProgram: function (body) { + return { + type: Syntax.Program, + body: body + }; + }, + + createProperty: function (kind, key, value, method, shorthand) { + return { + type: Syntax.Property, + key: key, + value: value, + kind: kind, + method: method, + shorthand: shorthand + }; + }, + + createReturnStatement: function (argument) { + return { + type: Syntax.ReturnStatement, + argument: argument + }; + }, + + createSequenceExpression: function (expressions) { + return { + type: Syntax.SequenceExpression, + expressions: expressions + }; + }, + + createSwitchCase: function (test, consequent) { + return { + type: Syntax.SwitchCase, + test: test, + consequent: consequent + }; + }, + + createSwitchStatement: function (discriminant, cases) { + return { + type: Syntax.SwitchStatement, + discriminant: discriminant, + cases: cases + }; + }, + + createThisExpression: function () { + return { + type: Syntax.ThisExpression + }; + }, + + createThrowStatement: function (argument) { + return { + type: Syntax.ThrowStatement, + argument: argument + }; + }, + + createTryStatement: function (block, guardedHandlers, handlers, finalizer) { + return { + type: Syntax.TryStatement, + block: block, + guardedHandlers: guardedHandlers, + handlers: handlers, + finalizer: finalizer + }; + }, + + createUnaryExpression: function (operator, argument) { + if (operator === '++' || operator === '--') { + return { + type: Syntax.UpdateExpression, + operator: operator, + argument: argument, + prefix: true + }; + } + return { + type: Syntax.UnaryExpression, + operator: operator, + argument: argument + }; + }, + + createVariableDeclaration: function (declarations, kind) { + return { + type: Syntax.VariableDeclaration, + declarations: declarations, + kind: kind + }; + }, + + createVariableDeclarator: function (id, init) { + return { + type: Syntax.VariableDeclarator, + id: id, + init: init + }; + }, + + createWhileStatement: function (test, body) { + return { + type: Syntax.WhileStatement, + test: test, + body: body + }; + }, + + createWithStatement: function (object, body) { + return { + type: Syntax.WithStatement, + object: object, + body: body + }; + }, + + createTemplateElement: function (value, tail) { + return { + type: Syntax.TemplateElement, + value: value, + tail: tail + }; + }, + + createTemplateLiteral: function (quasis, expressions) { + return { + type: Syntax.TemplateLiteral, + quasis: quasis, + expressions: expressions + }; + }, + + createSpreadElement: function (argument) { + return { + type: Syntax.SpreadElement, + argument: argument + }; + }, + + createTaggedTemplateExpression: function (tag, quasi) { + return { + type: Syntax.TaggedTemplateExpression, + tag: tag, + quasi: quasi + }; + }, + + createArrowFunctionExpression: function (params, defaults, body, rest, expression) { + return { + type: Syntax.ArrowFunctionExpression, + id: null, + params: params, + defaults: defaults, + body: body, + rest: rest, + generator: false, + expression: expression + }; + }, + + createMethodDefinition: function (propertyType, kind, key, value) { + return { + type: Syntax.MethodDefinition, + key: key, + value: value, + kind: kind, + 'static': propertyType === ClassPropertyType.static + }; + }, + + createClassBody: function (body) { + return { + type: Syntax.ClassBody, + body: body + }; + }, + + createClassExpression: function (id, superClass, body) { + return { + type: Syntax.ClassExpression, + id: id, + superClass: superClass, + body: body + }; + }, + + createClassDeclaration: function (id, superClass, body) { + return { + type: Syntax.ClassDeclaration, + id: id, + superClass: superClass, + body: body + }; + }, + + createExportSpecifier: function (id, name) { + return { + type: Syntax.ExportSpecifier, + id: id, + name: name + }; + }, + + createExportBatchSpecifier: function () { + return { + type: Syntax.ExportBatchSpecifier + }; + }, + + createExportDeclaration: function (declaration, specifiers, source) { + return { + type: Syntax.ExportDeclaration, + declaration: declaration, + specifiers: specifiers, + source: source + }; + }, + + createImportSpecifier: function (id, name) { + return { + type: Syntax.ImportSpecifier, + id: id, + name: name + }; + }, + + createImportDeclaration: function (specifiers, kind, source) { + return { + type: Syntax.ImportDeclaration, + specifiers: specifiers, + kind: kind, + source: source + }; + }, + + createYieldExpression: function (argument, delegate) { + return { + type: Syntax.YieldExpression, + argument: argument, + delegate: delegate + }; + }, + + createModuleDeclaration: function (id, source, body) { + return { + type: Syntax.ModuleDeclaration, + id: id, + source: source, + body: body + }; + } + + + }; + + // Return true if there is a line terminator before the next token. + + function peekLineTerminator() { + var pos, line, start, found; + + pos = index; + line = lineNumber; + start = lineStart; + skipComment(); + found = lineNumber !== line; + index = pos; + lineNumber = line; + lineStart = start; + + return found; + } + + // Throw an exception + + function throwError(token, messageFormat) { + var error, + args = Array.prototype.slice.call(arguments, 2), + msg = messageFormat.replace( + /%(\d)/g, + function (whole, index) { + assert(index < args.length, 'Message reference must be in range'); + return args[index]; + } + ); + + if (typeof token.lineNumber === 'number') { + error = new Error('Line ' + token.lineNumber + ': ' + msg); + error.index = token.range[0]; + error.lineNumber = token.lineNumber; + error.column = token.range[0] - lineStart + 1; + } else { + error = new Error('Line ' + lineNumber + ': ' + msg); + error.index = index; + error.lineNumber = lineNumber; + error.column = index - lineStart + 1; + } + + error.description = msg; + throw error; + } + + function throwErrorTolerant() { + try { + throwError.apply(null, arguments); + } catch (e) { + if (extra.errors) { + extra.errors.push(e); + } else { + throw e; + } + } + } + + + // Throw an exception because of the token. + + function throwUnexpected(token) { + if (token.type === Token.EOF) { + throwError(token, Messages.UnexpectedEOS); + } + + if (token.type === Token.NumericLiteral) { + throwError(token, Messages.UnexpectedNumber); + } + + if (token.type === Token.StringLiteral || token.type === Token.XJSText) { + throwError(token, Messages.UnexpectedString); + } + + if (token.type === Token.Identifier) { + throwError(token, Messages.UnexpectedIdentifier); + } + + if (token.type === Token.Keyword) { + if (isFutureReservedWord(token.value)) { + throwError(token, Messages.UnexpectedReserved); + } else if (strict && isStrictModeReservedWord(token.value)) { + throwErrorTolerant(token, Messages.StrictReservedWord); + return; + } + throwError(token, Messages.UnexpectedToken, token.value); + } + + if (token.type === Token.Template) { + throwError(token, Messages.UnexpectedTemplate, token.value.raw); + } + + // BooleanLiteral, NullLiteral, or Punctuator. + throwError(token, Messages.UnexpectedToken, token.value); + } + + // Expect the next token to match the specified punctuator. + // If not, an exception will be thrown. + + function expect(value) { + var token = lex(); + if (token.type !== Token.Punctuator || token.value !== value) { + throwUnexpected(token); + } + } + + // Expect the next token to match the specified keyword. + // If not, an exception will be thrown. + + function expectKeyword(keyword) { + var token = lex(); + if (token.type !== Token.Keyword || token.value !== keyword) { + throwUnexpected(token); + } + } + + // Return true if the next token matches the specified punctuator. + + function match(value) { + return lookahead.type === Token.Punctuator && lookahead.value === value; + } + + // Return true if the next token matches the specified keyword + + function matchKeyword(keyword) { + return lookahead.type === Token.Keyword && lookahead.value === keyword; + } + + + // Return true if the next token matches the specified contextual keyword + + function matchContextualKeyword(keyword) { + return lookahead.type === Token.Identifier && lookahead.value === keyword; + } + + // Return true if the next token is an assignment operator + + function matchAssign() { + var op; + + if (lookahead.type !== Token.Punctuator) { + return false; + } + op = lookahead.value; + return op === '=' || + op === '*=' || + op === '/=' || + op === '%=' || + op === '+=' || + op === '-=' || + op === '<<=' || + op === '>>=' || + op === '>>>=' || + op === '&=' || + op === '^=' || + op === '|='; + } + + function consumeSemicolon() { + var line; + + // Catch the very common case first: immediately a semicolon (char #59). + if (source.charCodeAt(index) === 59) { + lex(); + return; + } + + line = lineNumber; + skipComment(); + if (lineNumber !== line) { + return; + } + + if (match(';')) { + lex(); + return; + } + + if (lookahead.type !== Token.EOF && !match('}')) { + throwUnexpected(lookahead); + } + } + + // Return true if provided expression is LeftHandSideExpression + + function isLeftHandSide(expr) { + return expr.type === Syntax.Identifier || expr.type === Syntax.MemberExpression; + } + + function isAssignableLeftHandSide(expr) { + return isLeftHandSide(expr) || expr.type === Syntax.ObjectPattern || expr.type === Syntax.ArrayPattern; + } + + // 11.1.4 Array Initialiser + + function parseArrayInitialiser() { + var elements = [], blocks = [], filter = null, tmp, possiblecomprehension = true, body; + + expect('['); + while (!match(']')) { + if (lookahead.value === 'for' && + lookahead.type === Token.Keyword) { + if (!possiblecomprehension) { + throwError({}, Messages.ComprehensionError); + } + matchKeyword('for'); + tmp = parseForStatement({ignoreBody: true}); + tmp.of = tmp.type === Syntax.ForOfStatement; + tmp.type = Syntax.ComprehensionBlock; + if (tmp.left.kind) { // can't be let or const + throwError({}, Messages.ComprehensionError); + } + blocks.push(tmp); + } else if (lookahead.value === 'if' && + lookahead.type === Token.Keyword) { + if (!possiblecomprehension) { + throwError({}, Messages.ComprehensionError); + } + expectKeyword('if'); + expect('('); + filter = parseExpression(); + expect(')'); + } else if (lookahead.value === ',' && + lookahead.type === Token.Punctuator) { + possiblecomprehension = false; // no longer allowed. + lex(); + elements.push(null); + } else { + tmp = parseSpreadOrAssignmentExpression(); + elements.push(tmp); + if (tmp && tmp.type === Syntax.SpreadElement) { + if (!match(']')) { + throwError({}, Messages.ElementAfterSpreadElement); + } + } else if (!(match(']') || matchKeyword('for') || matchKeyword('if'))) { + expect(','); // this lexes. + possiblecomprehension = false; + } + } + } + + expect(']'); + + if (filter && !blocks.length) { + throwError({}, Messages.ComprehensionRequiresBlock); + } + + if (blocks.length) { + if (elements.length !== 1) { + throwError({}, Messages.ComprehensionError); + } + return { + type: Syntax.ComprehensionExpression, + filter: filter, + blocks: blocks, + body: elements[0] + }; + } + return delegate.createArrayExpression(elements); + } + + // 11.1.5 Object Initialiser + + function parsePropertyFunction(options) { + var previousStrict, previousYieldAllowed, params, defaults, body; + + previousStrict = strict; + previousYieldAllowed = state.yieldAllowed; + state.yieldAllowed = options.generator; + params = options.params || []; + defaults = options.defaults || []; + + body = parseConciseBody(); + if (options.name && strict && isRestrictedWord(params[0].name)) { + throwErrorTolerant(options.name, Messages.StrictParamName); + } + if (state.yieldAllowed && !state.yieldFound) { + throwErrorTolerant({}, Messages.NoYieldInGenerator); + } + strict = previousStrict; + state.yieldAllowed = previousYieldAllowed; + + return delegate.createFunctionExpression(null, params, defaults, body, options.rest || null, options.generator, body.type !== Syntax.BlockStatement, + options.returnTypeAnnotation); + } + + + function parsePropertyMethodFunction(options) { + var previousStrict, tmp, method; + + previousStrict = strict; + strict = true; + + tmp = parseParams(); + + if (tmp.stricted) { + throwErrorTolerant(tmp.stricted, tmp.message); + } + + + method = parsePropertyFunction({ + params: tmp.params, + defaults: tmp.defaults, + rest: tmp.rest, + generator: options.generator, + returnTypeAnnotation: tmp.returnTypeAnnotation + }); + + strict = previousStrict; + + return method; + } + + + function parseObjectPropertyKey() { + var token = lex(); + + // Note: This function is called only from parseObjectProperty(), where + // EOF and Punctuator tokens are already filtered out. + + if (token.type === Token.StringLiteral || token.type === Token.NumericLiteral) { + if (strict && token.octal) { + throwErrorTolerant(token, Messages.StrictOctalLiteral); + } + return delegate.createLiteral(token); + } + + return delegate.createIdentifier(token.value); + } + + function parseObjectProperty() { + var token, key, id, value, param; + + token = lookahead; + + if (token.type === Token.Identifier) { + + id = parseObjectPropertyKey(); + + // Property Assignment: Getter and Setter. + + if (token.value === 'get' && !(match(':') || match('('))) { + key = parseObjectPropertyKey(); + expect('('); + expect(')'); + return delegate.createProperty('get', key, parsePropertyFunction({ generator: false }), false, false); + } + if (token.value === 'set' && !(match(':') || match('('))) { + key = parseObjectPropertyKey(); + expect('('); + token = lookahead; + param = [ parseTypeAnnotatableIdentifier() ]; + expect(')'); + return delegate.createProperty('set', key, parsePropertyFunction({ params: param, generator: false, name: token }), false, false); + } + if (match(':')) { + lex(); + return delegate.createProperty('init', id, parseAssignmentExpression(), false, false); + } + if (match('(')) { + return delegate.createProperty('init', id, parsePropertyMethodFunction({ generator: false }), true, false); + } + return delegate.createProperty('init', id, id, false, true); + } + if (token.type === Token.EOF || token.type === Token.Punctuator) { + if (!match('*')) { + throwUnexpected(token); + } + lex(); + + id = parseObjectPropertyKey(); + + if (!match('(')) { + throwUnexpected(lex()); + } + + return delegate.createProperty('init', id, parsePropertyMethodFunction({ generator: true }), true, false); + } + key = parseObjectPropertyKey(); + if (match(':')) { + lex(); + return delegate.createProperty('init', key, parseAssignmentExpression(), false, false); + } + if (match('(')) { + return delegate.createProperty('init', key, parsePropertyMethodFunction({ generator: false }), true, false); + } + throwUnexpected(lex()); + } + + function parseObjectInitialiser() { + var properties = [], property, name, key, kind, map = {}, toString = String; + + expect('{'); + + while (!match('}')) { + property = parseObjectProperty(); + + if (property.key.type === Syntax.Identifier) { + name = property.key.name; + } else { + name = toString(property.key.value); + } + kind = (property.kind === 'init') ? PropertyKind.Data : (property.kind === 'get') ? PropertyKind.Get : PropertyKind.Set; + + key = '$' + name; + if (Object.prototype.hasOwnProperty.call(map, key)) { + if (map[key] === PropertyKind.Data) { + if (strict && kind === PropertyKind.Data) { + throwErrorTolerant({}, Messages.StrictDuplicateProperty); + } else if (kind !== PropertyKind.Data) { + throwErrorTolerant({}, Messages.AccessorDataProperty); + } + } else { + if (kind === PropertyKind.Data) { + throwErrorTolerant({}, Messages.AccessorDataProperty); + } else if (map[key] & kind) { + throwErrorTolerant({}, Messages.AccessorGetSet); + } + } + map[key] |= kind; + } else { + map[key] = kind; + } + + properties.push(property); + + if (!match('}')) { + expect(','); + } + } + + expect('}'); + + return delegate.createObjectExpression(properties); + } + + function parseTemplateElement(option) { + var token = scanTemplateElement(option); + if (strict && token.octal) { + throwError(token, Messages.StrictOctalLiteral); + } + return delegate.createTemplateElement({ raw: token.value.raw, cooked: token.value.cooked }, token.tail); + } + + function parseTemplateLiteral() { + var quasi, quasis, expressions; + + quasi = parseTemplateElement({ head: true }); + quasis = [ quasi ]; + expressions = []; + + while (!quasi.tail) { + expressions.push(parseExpression()); + quasi = parseTemplateElement({ head: false }); + quasis.push(quasi); + } + + return delegate.createTemplateLiteral(quasis, expressions); + } + + // 11.1.6 The Grouping Operator + + function parseGroupExpression() { + var expr; + + expect('('); + + ++state.parenthesizedCount; + + expr = parseExpression(); + + expect(')'); + + return expr; + } + + + // 11.1 Primary Expressions + + function parsePrimaryExpression() { + var type, token; + + token = lookahead; + type = lookahead.type; + + if (type === Token.Identifier) { + lex(); + return delegate.createIdentifier(token.value); + } + + if (type === Token.StringLiteral || type === Token.NumericLiteral) { + if (strict && lookahead.octal) { + throwErrorTolerant(lookahead, Messages.StrictOctalLiteral); + } + return delegate.createLiteral(lex()); + } + + if (type === Token.Keyword) { + if (matchKeyword('this')) { + lex(); + return delegate.createThisExpression(); + } + + if (matchKeyword('function')) { + return parseFunctionExpression(); + } + + if (matchKeyword('class')) { + return parseClassExpression(); + } + + if (matchKeyword('super')) { + lex(); + return delegate.createIdentifier('super'); + } + } + + if (type === Token.BooleanLiteral) { + token = lex(); + token.value = (token.value === 'true'); + return delegate.createLiteral(token); + } + + if (type === Token.NullLiteral) { + token = lex(); + token.value = null; + return delegate.createLiteral(token); + } + + if (match('[')) { + return parseArrayInitialiser(); + } + + if (match('{')) { + return parseObjectInitialiser(); + } + + if (match('(')) { + return parseGroupExpression(); + } + + if (match('/') || match('/=')) { + return delegate.createLiteral(scanRegExp()); + } + + if (type === Token.Template) { + return parseTemplateLiteral(); + } + + if (match('<')) { + return parseXJSElement(); + } + + return throwUnexpected(lex()); + } + + // 11.2 Left-Hand-Side Expressions + + function parseArguments() { + var args = [], arg; + + expect('('); + + if (!match(')')) { + while (index < length) { + arg = parseSpreadOrAssignmentExpression(); + args.push(arg); + + if (match(')')) { + break; + } else if (arg.type === Syntax.SpreadElement) { + throwError({}, Messages.ElementAfterSpreadElement); + } + + expect(','); + } + } + + expect(')'); + + return args; + } + + function parseSpreadOrAssignmentExpression() { + if (match('...')) { + lex(); + return delegate.createSpreadElement(parseAssignmentExpression()); + } + return parseAssignmentExpression(); + } + + function parseNonComputedProperty() { + var token = lex(); + + if (!isIdentifierName(token)) { + throwUnexpected(token); + } + + return delegate.createIdentifier(token.value); + } + + function parseNonComputedMember() { + expect('.'); + + return parseNonComputedProperty(); + } + + function parseComputedMember() { + var expr; + + expect('['); + + expr = parseExpression(); + + expect(']'); + + return expr; + } + + function parseNewExpression() { + var callee, args; + + expectKeyword('new'); + callee = parseLeftHandSideExpression(); + args = match('(') ? parseArguments() : []; + + return delegate.createNewExpression(callee, args); + } + + function parseLeftHandSideExpressionAllowCall() { + var expr, args, property; + + expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression(); + + while (match('.') || match('[') || match('(') || lookahead.type === Token.Template) { + if (match('(')) { + args = parseArguments(); + expr = delegate.createCallExpression(expr, args); + } else if (match('[')) { + expr = delegate.createMemberExpression('[', expr, parseComputedMember()); + } else if (match('.')) { + expr = delegate.createMemberExpression('.', expr, parseNonComputedMember()); + } else { + expr = delegate.createTaggedTemplateExpression(expr, parseTemplateLiteral()); + } + } + + return expr; + } + + + function parseLeftHandSideExpression() { + var expr, property; + + expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression(); + + while (match('.') || match('[') || lookahead.type === Token.Template) { + if (match('[')) { + expr = delegate.createMemberExpression('[', expr, parseComputedMember()); + } else if (match('.')) { + expr = delegate.createMemberExpression('.', expr, parseNonComputedMember()); + } else { + expr = delegate.createTaggedTemplateExpression(expr, parseTemplateLiteral()); + } + } + + return expr; + } + + // 11.3 Postfix Expressions + + function parsePostfixExpression() { + var expr = parseLeftHandSideExpressionAllowCall(), + token = lookahead; + + if (lookahead.type !== Token.Punctuator) { + return expr; + } + + if ((match('++') || match('--')) && !peekLineTerminator()) { + // 11.3.1, 11.3.2 + if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { + throwErrorTolerant({}, Messages.StrictLHSPostfix); + } + + if (!isLeftHandSide(expr)) { + throwError({}, Messages.InvalidLHSInAssignment); + } + + token = lex(); + expr = delegate.createPostfixExpression(token.value, expr); + } + + return expr; + } + + // 11.4 Unary Operators + + function parseUnaryExpression() { + var token, expr; + + if (lookahead.type !== Token.Punctuator && lookahead.type !== Token.Keyword) { + return parsePostfixExpression(); + } + + if (match('++') || match('--')) { + token = lex(); + expr = parseUnaryExpression(); + // 11.4.4, 11.4.5 + if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { + throwErrorTolerant({}, Messages.StrictLHSPrefix); + } + + if (!isLeftHandSide(expr)) { + throwError({}, Messages.InvalidLHSInAssignment); + } + + return delegate.createUnaryExpression(token.value, expr); + } + + if (match('+') || match('-') || match('~') || match('!')) { + token = lex(); + expr = parseUnaryExpression(); + return delegate.createUnaryExpression(token.value, expr); + } + + if (matchKeyword('delete') || matchKeyword('void') || matchKeyword('typeof')) { + token = lex(); + expr = parseUnaryExpression(); + expr = delegate.createUnaryExpression(token.value, expr); + if (strict && expr.operator === 'delete' && expr.argument.type === Syntax.Identifier) { + throwErrorTolerant({}, Messages.StrictDelete); + } + return expr; + } + + return parsePostfixExpression(); + } + + function binaryPrecedence(token, allowIn) { + var prec = 0; + + if (token.type !== Token.Punctuator && token.type !== Token.Keyword) { + return 0; + } + + switch (token.value) { + case '||': + prec = 1; + break; + + case '&&': + prec = 2; + break; + + case '|': + prec = 3; + break; + + case '^': + prec = 4; + break; + + case '&': + prec = 5; + break; + + case '==': + case '!=': + case '===': + case '!==': + prec = 6; + break; + + case '<': + case '>': + case '<=': + case '>=': + case 'instanceof': + prec = 7; + break; + + case 'in': + prec = allowIn ? 7 : 0; + break; + + case '<<': + case '>>': + case '>>>': + prec = 8; + break; + + case '+': + case '-': + prec = 9; + break; + + case '*': + case '/': + case '%': + prec = 11; + break; + + default: + break; + } + + return prec; + } + + // 11.5 Multiplicative Operators + // 11.6 Additive Operators + // 11.7 Bitwise Shift Operators + // 11.8 Relational Operators + // 11.9 Equality Operators + // 11.10 Binary Bitwise Operators + // 11.11 Binary Logical Operators + + function parseBinaryExpression() { + var expr, token, prec, previousAllowIn, stack, right, operator, left, i; + + previousAllowIn = state.allowIn; + state.allowIn = true; + + expr = parseUnaryExpression(); + + token = lookahead; + prec = binaryPrecedence(token, previousAllowIn); + if (prec === 0) { + return expr; + } + token.prec = prec; + lex(); + + stack = [expr, token, parseUnaryExpression()]; + + while ((prec = binaryPrecedence(lookahead, previousAllowIn)) > 0) { + + // Reduce: make a binary expression from the three topmost entries. + while ((stack.length > 2) && (prec <= stack[stack.length - 2].prec)) { + right = stack.pop(); + operator = stack.pop().value; + left = stack.pop(); + stack.push(delegate.createBinaryExpression(operator, left, right)); + } + + // Shift. + token = lex(); + token.prec = prec; + stack.push(token); + stack.push(parseUnaryExpression()); + } + + state.allowIn = previousAllowIn; + + // Final reduce to clean-up the stack. + i = stack.length - 1; + expr = stack[i]; + while (i > 1) { + expr = delegate.createBinaryExpression(stack[i - 1].value, stack[i - 2], expr); + i -= 2; + } + return expr; + } + + + // 11.12 Conditional Operator + + function parseConditionalExpression() { + var expr, previousAllowIn, consequent, alternate; + + expr = parseBinaryExpression(); + + if (match('?')) { + lex(); + previousAllowIn = state.allowIn; + state.allowIn = true; + consequent = parseAssignmentExpression(); + state.allowIn = previousAllowIn; + expect(':'); + alternate = parseAssignmentExpression(); + + expr = delegate.createConditionalExpression(expr, consequent, alternate); + } + + return expr; + } + + // 11.13 Assignment Operators + + function reinterpretAsAssignmentBindingPattern(expr) { + var i, len, property, element; + + if (expr.type === Syntax.ObjectExpression) { + expr.type = Syntax.ObjectPattern; + for (i = 0, len = expr.properties.length; i < len; i += 1) { + property = expr.properties[i]; + if (property.kind !== 'init') { + throwError({}, Messages.InvalidLHSInAssignment); + } + reinterpretAsAssignmentBindingPattern(property.value); + } + } else if (expr.type === Syntax.ArrayExpression) { + expr.type = Syntax.ArrayPattern; + for (i = 0, len = expr.elements.length; i < len; i += 1) { + element = expr.elements[i]; + if (element) { + reinterpretAsAssignmentBindingPattern(element); + } + } + } else if (expr.type === Syntax.Identifier) { + if (isRestrictedWord(expr.name)) { + throwError({}, Messages.InvalidLHSInAssignment); + } + } else if (expr.type === Syntax.SpreadElement) { + reinterpretAsAssignmentBindingPattern(expr.argument); + if (expr.argument.type === Syntax.ObjectPattern) { + throwError({}, Messages.ObjectPatternAsSpread); + } + } else { + if (expr.type !== Syntax.MemberExpression && expr.type !== Syntax.CallExpression && expr.type !== Syntax.NewExpression) { + throwError({}, Messages.InvalidLHSInAssignment); + } + } + } + + + function reinterpretAsDestructuredParameter(options, expr) { + var i, len, property, element; + + if (expr.type === Syntax.ObjectExpression) { + expr.type = Syntax.ObjectPattern; + for (i = 0, len = expr.properties.length; i < len; i += 1) { + property = expr.properties[i]; + if (property.kind !== 'init') { + throwError({}, Messages.InvalidLHSInFormalsList); + } + reinterpretAsDestructuredParameter(options, property.value); + } + } else if (expr.type === Syntax.ArrayExpression) { + expr.type = Syntax.ArrayPattern; + for (i = 0, len = expr.elements.length; i < len; i += 1) { + element = expr.elements[i]; + if (element) { + reinterpretAsDestructuredParameter(options, element); + } + } + } else if (expr.type === Syntax.Identifier) { + validateParam(options, expr, expr.name); + } else { + if (expr.type !== Syntax.MemberExpression) { + throwError({}, Messages.InvalidLHSInFormalsList); + } + } + } + + function reinterpretAsCoverFormalsList(expressions) { + var i, len, param, params, defaults, defaultCount, options, rest; + + params = []; + defaults = []; + defaultCount = 0; + rest = null; + options = { + paramSet: {} + }; + + for (i = 0, len = expressions.length; i < len; i += 1) { + param = expressions[i]; + if (param.type === Syntax.Identifier) { + params.push(param); + defaults.push(null); + validateParam(options, param, param.name); + } else if (param.type === Syntax.ObjectExpression || param.type === Syntax.ArrayExpression) { + reinterpretAsDestructuredParameter(options, param); + params.push(param); + defaults.push(null); + } else if (param.type === Syntax.SpreadElement) { + assert(i === len - 1, 'It is guaranteed that SpreadElement is last element by parseExpression'); + reinterpretAsDestructuredParameter(options, param.argument); + rest = param.argument; + } else if (param.type === Syntax.AssignmentExpression) { + params.push(param.left); + defaults.push(param.right); + ++defaultCount; + validateParam(options, param.left, param.left.name); + } else { + return null; + } + } + + if (options.message === Messages.StrictParamDupe) { + throwError( + strict ? options.stricted : options.firstRestricted, + options.message + ); + } + + if (defaultCount === 0) { + defaults = []; + } + + return { + params: params, + defaults: defaults, + rest: rest, + stricted: options.stricted, + firstRestricted: options.firstRestricted, + message: options.message + }; + } + + function parseArrowFunctionExpression(options) { + var previousStrict, previousYieldAllowed, body; + + expect('=>'); + + previousStrict = strict; + previousYieldAllowed = state.yieldAllowed; + state.yieldAllowed = false; + body = parseConciseBody(); + + if (strict && options.firstRestricted) { + throwError(options.firstRestricted, options.message); + } + if (strict && options.stricted) { + throwErrorTolerant(options.stricted, options.message); + } + + strict = previousStrict; + state.yieldAllowed = previousYieldAllowed; + + return delegate.createArrowFunctionExpression(options.params, options.defaults, body, options.rest, body.type !== Syntax.BlockStatement); + } + + function parseAssignmentExpression() { + var expr, token, params, oldParenthesizedCount; + + if (matchKeyword('yield')) { + return parseYieldExpression(); + } + + oldParenthesizedCount = state.parenthesizedCount; + + if (match('(')) { + token = lookahead2(); + if ((token.type === Token.Punctuator && token.value === ')') || token.value === '...') { + params = parseParams(); + if (!match('=>')) { + throwUnexpected(lex()); + } + return parseArrowFunctionExpression(params); + } + } + + token = lookahead; + expr = parseConditionalExpression(); + + if (match('=>') && + (state.parenthesizedCount === oldParenthesizedCount || + state.parenthesizedCount === (oldParenthesizedCount + 1))) { + if (expr.type === Syntax.Identifier) { + params = reinterpretAsCoverFormalsList([ expr ]); + } else if (expr.type === Syntax.SequenceExpression) { + params = reinterpretAsCoverFormalsList(expr.expressions); + } + if (params) { + return parseArrowFunctionExpression(params); + } + } + + if (matchAssign()) { + // 11.13.1 + if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { + throwErrorTolerant(token, Messages.StrictLHSAssignment); + } + + // ES.next draf 11.13 Runtime Semantics step 1 + if (match('=') && (expr.type === Syntax.ObjectExpression || expr.type === Syntax.ArrayExpression)) { + reinterpretAsAssignmentBindingPattern(expr); + } else if (!isLeftHandSide(expr)) { + throwError({}, Messages.InvalidLHSInAssignment); + } + + expr = delegate.createAssignmentExpression(lex().value, expr, parseAssignmentExpression()); + } + + return expr; + } + + // 11.14 Comma Operator + + function parseExpression() { + var expr, expressions, sequence, coverFormalsList, spreadFound, oldParenthesizedCount; + + oldParenthesizedCount = state.parenthesizedCount; + + expr = parseAssignmentExpression(); + expressions = [ expr ]; + + if (match(',')) { + while (index < length) { + if (!match(',')) { + break; + } + + lex(); + expr = parseSpreadOrAssignmentExpression(); + expressions.push(expr); + + if (expr.type === Syntax.SpreadElement) { + spreadFound = true; + if (!match(')')) { + throwError({}, Messages.ElementAfterSpreadElement); + } + break; + } + } + + sequence = delegate.createSequenceExpression(expressions); + } + + if (match('=>')) { + // Do not allow nested parentheses on the LHS of the =>. + if (state.parenthesizedCount === oldParenthesizedCount || state.parenthesizedCount === (oldParenthesizedCount + 1)) { + expr = expr.type === Syntax.SequenceExpression ? expr.expressions : expressions; + coverFormalsList = reinterpretAsCoverFormalsList(expr); + if (coverFormalsList) { + return parseArrowFunctionExpression(coverFormalsList); + } + } + throwUnexpected(lex()); + } + + if (spreadFound && lookahead2().value !== '=>') { + throwError({}, Messages.IllegalSpread); + } + + return sequence || expr; + } + + // 12.1 Block + + function parseStatementList() { + var list = [], + statement; + + while (index < length) { + if (match('}')) { + break; + } + statement = parseSourceElement(); + if (typeof statement === 'undefined') { + break; + } + list.push(statement); + } + + return list; + } + + function parseBlock() { + var block; + + expect('{'); + + block = parseStatementList(); + + expect('}'); + + return delegate.createBlockStatement(block); + } + + // 12.2 Variable Statement + + function parseTypeAnnotation(dontExpectColon) { + var typeIdentifier = null, paramTypes = null, returnType = null, + nullable = false; + + if (!dontExpectColon) { + expect(':'); + } + + if (match('?')) { + lex(); + nullable = true; + } + + if (lookahead.type === Token.Identifier) { + typeIdentifier = parseVariableIdentifier(); + } + + if (match('(')) { + lex(); + paramTypes = []; + while (lookahead.type === Token.Identifier || match('?')) { + paramTypes.push(parseTypeAnnotation(true)); + if (!match(')')) { + expect(','); + } + } + expect(')'); + expect('=>'); + + if (matchKeyword('void')) { + lex(); + } else { + returnType = parseTypeAnnotation(true); + } + } + + return delegate.createTypeAnnotation( + typeIdentifier, + paramTypes, + returnType, + nullable + ); + } + + function parseVariableIdentifier() { + var token = lex(); + + if (token.type !== Token.Identifier) { + throwUnexpected(token); + } + + return delegate.createIdentifier(token.value); + } + + function parseTypeAnnotatableIdentifier() { + var ident = parseVariableIdentifier(); + + if (match(':')) { + return delegate.createTypeAnnotatedIdentifier(ident, parseTypeAnnotation()); + } + + return ident; + } + + function parseVariableDeclaration(kind) { + var id, + init = null; + if (match('{')) { + id = parseObjectInitialiser(); + reinterpretAsAssignmentBindingPattern(id); + } else if (match('[')) { + id = parseArrayInitialiser(); + reinterpretAsAssignmentBindingPattern(id); + } else { + id = state.allowKeyword ? parseNonComputedProperty() : parseTypeAnnotatableIdentifier(); + // 12.2.1 + if (strict && isRestrictedWord(id.name)) { + throwErrorTolerant({}, Messages.StrictVarName); + } + } + + if (kind === 'const') { + if (!match('=')) { + throwError({}, Messages.NoUnintializedConst); + } + expect('='); + init = parseAssignmentExpression(); + } else if (match('=')) { + lex(); + init = parseAssignmentExpression(); + } + + return delegate.createVariableDeclarator(id, init); + } + + function parseVariableDeclarationList(kind) { + var list = []; + + do { + list.push(parseVariableDeclaration(kind)); + if (!match(',')) { + break; + } + lex(); + } while (index < length); + + return list; + } + + function parseVariableStatement() { + var declarations; + + expectKeyword('var'); + + declarations = parseVariableDeclarationList(); + + consumeSemicolon(); + + return delegate.createVariableDeclaration(declarations, 'var'); + } + + // kind may be `const` or `let` + // Both are experimental and not in the specification yet. + // see http://wiki.ecmascript.org/doku.php?id=harmony:const + // and http://wiki.ecmascript.org/doku.php?id=harmony:let + function parseConstLetDeclaration(kind) { + var declarations; + + expectKeyword(kind); + + declarations = parseVariableDeclarationList(kind); + + consumeSemicolon(); + + return delegate.createVariableDeclaration(declarations, kind); + } + + // http://wiki.ecmascript.org/doku.php?id=harmony:modules + + function parseModuleDeclaration() { + var id, src, body; + + lex(); // 'module' + + if (peekLineTerminator()) { + throwError({}, Messages.NewlineAfterModule); + } + + switch (lookahead.type) { + + case Token.StringLiteral: + id = parsePrimaryExpression(); + body = parseModuleBlock(); + src = null; + break; + + case Token.Identifier: + id = parseVariableIdentifier(); + body = null; + if (!matchContextualKeyword('from')) { + throwUnexpected(lex()); + } + lex(); + src = parsePrimaryExpression(); + if (src.type !== Syntax.Literal) { + throwError({}, Messages.InvalidModuleSpecifier); + } + break; + } + + consumeSemicolon(); + return delegate.createModuleDeclaration(id, src, body); + } + + function parseExportBatchSpecifier() { + expect('*'); + return delegate.createExportBatchSpecifier(); + } + + function parseExportSpecifier() { + var id, name = null; + + id = parseVariableIdentifier(); + if (matchContextualKeyword('as')) { + lex(); + name = parseNonComputedProperty(); + } + + return delegate.createExportSpecifier(id, name); + } + + function parseExportDeclaration() { + var previousAllowKeyword, decl, def, src, specifiers; + + expectKeyword('export'); + + if (lookahead.type === Token.Keyword) { + switch (lookahead.value) { + case 'let': + case 'const': + case 'var': + case 'class': + case 'function': + return delegate.createExportDeclaration(parseSourceElement(), null, null); + } + } + + if (isIdentifierName(lookahead)) { + previousAllowKeyword = state.allowKeyword; + state.allowKeyword = true; + decl = parseVariableDeclarationList('let'); + state.allowKeyword = previousAllowKeyword; + return delegate.createExportDeclaration(decl, null, null); + } + + specifiers = []; + src = null; + + if (match('*')) { + specifiers.push(parseExportBatchSpecifier()); + } else { + expect('{'); + do { + specifiers.push(parseExportSpecifier()); + } while (match(',') && lex()); + expect('}'); + } + + if (matchContextualKeyword('from')) { + lex(); + src = parsePrimaryExpression(); + if (src.type !== Syntax.Literal) { + throwError({}, Messages.InvalidModuleSpecifier); + } + } + + consumeSemicolon(); + + return delegate.createExportDeclaration(null, specifiers, src); + } + + function parseImportDeclaration() { + var specifiers, kind, src; + + expectKeyword('import'); + specifiers = []; + + if (isIdentifierName(lookahead)) { + kind = 'default'; + specifiers.push(parseImportSpecifier()); + + if (!matchContextualKeyword('from')) { + throwError({}, Messages.NoFromAfterImport); + } + lex(); + } else if (match('{')) { + kind = 'named'; + lex(); + do { + specifiers.push(parseImportSpecifier()); + } while (match(',') && lex()); + expect('}'); + + if (!matchContextualKeyword('from')) { + throwError({}, Messages.NoFromAfterImport); + } + lex(); + } + + src = parsePrimaryExpression(); + if (src.type !== Syntax.Literal) { + throwError({}, Messages.InvalidModuleSpecifier); + } + + consumeSemicolon(); + + return delegate.createImportDeclaration(specifiers, kind, src); + } + + function parseImportSpecifier() { + var id, name = null; + + id = parseNonComputedProperty(); + if (matchContextualKeyword('as')) { + lex(); + name = parseVariableIdentifier(); + } + + return delegate.createImportSpecifier(id, name); + } + + // 12.3 Empty Statement + + function parseEmptyStatement() { + expect(';'); + return delegate.createEmptyStatement(); + } + + // 12.4 Expression Statement + + function parseExpressionStatement() { + var expr = parseExpression(); + consumeSemicolon(); + return delegate.createExpressionStatement(expr); + } + + // 12.5 If statement + + function parseIfStatement() { + var test, consequent, alternate; + + expectKeyword('if'); + + expect('('); + + test = parseExpression(); + + expect(')'); + + consequent = parseStatement(); + + if (matchKeyword('else')) { + lex(); + alternate = parseStatement(); + } else { + alternate = null; + } + + return delegate.createIfStatement(test, consequent, alternate); + } + + // 12.6 Iteration Statements + + function parseDoWhileStatement() { + var body, test, oldInIteration; + + expectKeyword('do'); + + oldInIteration = state.inIteration; + state.inIteration = true; + + body = parseStatement(); + + state.inIteration = oldInIteration; + + expectKeyword('while'); + + expect('('); + + test = parseExpression(); + + expect(')'); + + if (match(';')) { + lex(); + } + + return delegate.createDoWhileStatement(body, test); + } + + function parseWhileStatement() { + var test, body, oldInIteration; + + expectKeyword('while'); + + expect('('); + + test = parseExpression(); + + expect(')'); + + oldInIteration = state.inIteration; + state.inIteration = true; + + body = parseStatement(); + + state.inIteration = oldInIteration; + + return delegate.createWhileStatement(test, body); + } + + function parseForVariableDeclaration() { + var token = lex(), + declarations = parseVariableDeclarationList(); + + return delegate.createVariableDeclaration(declarations, token.value); + } + + function parseForStatement(opts) { + var init, test, update, left, right, body, operator, oldInIteration; + init = test = update = null; + expectKeyword('for'); + + // http://wiki.ecmascript.org/doku.php?id=proposals:iterators_and_generators&s=each + if (matchContextualKeyword('each')) { + throwError({}, Messages.EachNotAllowed); + } + + expect('('); + + if (match(';')) { + lex(); + } else { + if (matchKeyword('var') || matchKeyword('let') || matchKeyword('const')) { + state.allowIn = false; + init = parseForVariableDeclaration(); + state.allowIn = true; + + if (init.declarations.length === 1) { + if (matchKeyword('in') || matchContextualKeyword('of')) { + operator = lookahead; + if (!((operator.value === 'in' || init.kind !== 'var') && init.declarations[0].init)) { + lex(); + left = init; + right = parseExpression(); + init = null; + } + } + } + } else { + state.allowIn = false; + init = parseExpression(); + state.allowIn = true; + + if (matchContextualKeyword('of')) { + operator = lex(); + left = init; + right = parseExpression(); + init = null; + } else if (matchKeyword('in')) { + // LeftHandSideExpression + if (!isAssignableLeftHandSide(init)) { + throwError({}, Messages.InvalidLHSInForIn); + } + operator = lex(); + left = init; + right = parseExpression(); + init = null; + } + } + + if (typeof left === 'undefined') { + expect(';'); + } + } + + if (typeof left === 'undefined') { + + if (!match(';')) { + test = parseExpression(); + } + expect(';'); + + if (!match(')')) { + update = parseExpression(); + } + } + + expect(')'); + + oldInIteration = state.inIteration; + state.inIteration = true; + + if (!(opts !== undefined && opts.ignoreBody)) { + body = parseStatement(); + } + + state.inIteration = oldInIteration; + + if (typeof left === 'undefined') { + return delegate.createForStatement(init, test, update, body); + } + + if (operator.value === 'in') { + return delegate.createForInStatement(left, right, body); + } + return delegate.createForOfStatement(left, right, body); + } + + // 12.7 The continue statement + + function parseContinueStatement() { + var label = null, key; + + expectKeyword('continue'); + + // Optimize the most common form: 'continue;'. + if (source.charCodeAt(index) === 59) { + lex(); + + if (!state.inIteration) { + throwError({}, Messages.IllegalContinue); + } + + return delegate.createContinueStatement(null); + } + + if (peekLineTerminator()) { + if (!state.inIteration) { + throwError({}, Messages.IllegalContinue); + } + + return delegate.createContinueStatement(null); + } + + if (lookahead.type === Token.Identifier) { + label = parseVariableIdentifier(); + + key = '$' + label.name; + if (!Object.prototype.hasOwnProperty.call(state.labelSet, key)) { + throwError({}, Messages.UnknownLabel, label.name); + } + } + + consumeSemicolon(); + + if (label === null && !state.inIteration) { + throwError({}, Messages.IllegalContinue); + } + + return delegate.createContinueStatement(label); + } + + // 12.8 The break statement + + function parseBreakStatement() { + var label = null, key; + + expectKeyword('break'); + + // Catch the very common case first: immediately a semicolon (char #59). + if (source.charCodeAt(index) === 59) { + lex(); + + if (!(state.inIteration || state.inSwitch)) { + throwError({}, Messages.IllegalBreak); + } + + return delegate.createBreakStatement(null); + } + + if (peekLineTerminator()) { + if (!(state.inIteration || state.inSwitch)) { + throwError({}, Messages.IllegalBreak); + } + + return delegate.createBreakStatement(null); + } + + if (lookahead.type === Token.Identifier) { + label = parseVariableIdentifier(); + + key = '$' + label.name; + if (!Object.prototype.hasOwnProperty.call(state.labelSet, key)) { + throwError({}, Messages.UnknownLabel, label.name); + } + } + + consumeSemicolon(); + + if (label === null && !(state.inIteration || state.inSwitch)) { + throwError({}, Messages.IllegalBreak); + } + + return delegate.createBreakStatement(label); + } + + // 12.9 The return statement + + function parseReturnStatement() { + var argument = null; + + expectKeyword('return'); + + if (!state.inFunctionBody) { + throwErrorTolerant({}, Messages.IllegalReturn); + } + + // 'return' followed by a space and an identifier is very common. + if (source.charCodeAt(index) === 32) { + if (isIdentifierStart(source.charCodeAt(index + 1))) { + argument = parseExpression(); + consumeSemicolon(); + return delegate.createReturnStatement(argument); + } + } + + if (peekLineTerminator()) { + return delegate.createReturnStatement(null); + } + + if (!match(';')) { + if (!match('}') && lookahead.type !== Token.EOF) { + argument = parseExpression(); + } + } + + consumeSemicolon(); + + return delegate.createReturnStatement(argument); + } + + // 12.10 The with statement + + function parseWithStatement() { + var object, body; + + if (strict) { + throwErrorTolerant({}, Messages.StrictModeWith); + } + + expectKeyword('with'); + + expect('('); + + object = parseExpression(); + + expect(')'); + + body = parseStatement(); + + return delegate.createWithStatement(object, body); + } + + // 12.10 The swith statement + + function parseSwitchCase() { + var test, + consequent = [], + sourceElement; + + if (matchKeyword('default')) { + lex(); + test = null; + } else { + expectKeyword('case'); + test = parseExpression(); + } + expect(':'); + + while (index < length) { + if (match('}') || matchKeyword('default') || matchKeyword('case')) { + break; + } + sourceElement = parseSourceElement(); + if (typeof sourceElement === 'undefined') { + break; + } + consequent.push(sourceElement); + } + + return delegate.createSwitchCase(test, consequent); + } + + function parseSwitchStatement() { + var discriminant, cases, clause, oldInSwitch, defaultFound; + + expectKeyword('switch'); + + expect('('); + + discriminant = parseExpression(); + + expect(')'); + + expect('{'); + + cases = []; + + if (match('}')) { + lex(); + return delegate.createSwitchStatement(discriminant, cases); + } + + oldInSwitch = state.inSwitch; + state.inSwitch = true; + defaultFound = false; + + while (index < length) { + if (match('}')) { + break; + } + clause = parseSwitchCase(); + if (clause.test === null) { + if (defaultFound) { + throwError({}, Messages.MultipleDefaultsInSwitch); + } + defaultFound = true; + } + cases.push(clause); + } + + state.inSwitch = oldInSwitch; + + expect('}'); + + return delegate.createSwitchStatement(discriminant, cases); + } + + // 12.13 The throw statement + + function parseThrowStatement() { + var argument; + + expectKeyword('throw'); + + if (peekLineTerminator()) { + throwError({}, Messages.NewlineAfterThrow); + } + + argument = parseExpression(); + + consumeSemicolon(); + + return delegate.createThrowStatement(argument); + } + + // 12.14 The try statement + + function parseCatchClause() { + var param, body; + + expectKeyword('catch'); + + expect('('); + if (match(')')) { + throwUnexpected(lookahead); + } + + param = parseExpression(); + // 12.14.1 + if (strict && param.type === Syntax.Identifier && isRestrictedWord(param.name)) { + throwErrorTolerant({}, Messages.StrictCatchVariable); + } + + expect(')'); + body = parseBlock(); + return delegate.createCatchClause(param, body); + } + + function parseTryStatement() { + var block, handlers = [], finalizer = null; + + expectKeyword('try'); + + block = parseBlock(); + + if (matchKeyword('catch')) { + handlers.push(parseCatchClause()); + } + + if (matchKeyword('finally')) { + lex(); + finalizer = parseBlock(); + } + + if (handlers.length === 0 && !finalizer) { + throwError({}, Messages.NoCatchOrFinally); + } + + return delegate.createTryStatement(block, [], handlers, finalizer); + } + + // 12.15 The debugger statement + + function parseDebuggerStatement() { + expectKeyword('debugger'); + + consumeSemicolon(); + + return delegate.createDebuggerStatement(); + } + + // 12 Statements + + function parseStatement() { + var type = lookahead.type, + expr, + labeledBody, + key; + + if (type === Token.EOF) { + throwUnexpected(lookahead); + } + + if (type === Token.Punctuator) { + switch (lookahead.value) { + case ';': + return parseEmptyStatement(); + case '{': + return parseBlock(); + case '(': + return parseExpressionStatement(); + default: + break; + } + } + + if (type === Token.Keyword) { + switch (lookahead.value) { + case 'break': + return parseBreakStatement(); + case 'continue': + return parseContinueStatement(); + case 'debugger': + return parseDebuggerStatement(); + case 'do': + return parseDoWhileStatement(); + case 'for': + return parseForStatement(); + case 'function': + return parseFunctionDeclaration(); + case 'class': + return parseClassDeclaration(); + case 'if': + return parseIfStatement(); + case 'return': + return parseReturnStatement(); + case 'switch': + return parseSwitchStatement(); + case 'throw': + return parseThrowStatement(); + case 'try': + return parseTryStatement(); + case 'var': + return parseVariableStatement(); + case 'while': + return parseWhileStatement(); + case 'with': + return parseWithStatement(); + default: + break; + } + } + + expr = parseExpression(); + + // 12.12 Labelled Statements + if ((expr.type === Syntax.Identifier) && match(':')) { + lex(); + + key = '$' + expr.name; + if (Object.prototype.hasOwnProperty.call(state.labelSet, key)) { + throwError({}, Messages.Redeclaration, 'Label', expr.name); + } + + state.labelSet[key] = true; + labeledBody = parseStatement(); + delete state.labelSet[key]; + return delegate.createLabeledStatement(expr, labeledBody); + } + + consumeSemicolon(); + + return delegate.createExpressionStatement(expr); + } + + // 13 Function Definition + + function parseConciseBody() { + if (match('{')) { + return parseFunctionSourceElements(); + } + return parseAssignmentExpression(); + } + + function parseFunctionSourceElements() { + var sourceElement, sourceElements = [], token, directive, firstRestricted, + oldLabelSet, oldInIteration, oldInSwitch, oldInFunctionBody, oldParenthesizedCount; + + expect('{'); + + while (index < length) { + if (lookahead.type !== Token.StringLiteral) { + break; + } + token = lookahead; + + sourceElement = parseSourceElement(); + sourceElements.push(sourceElement); + if (sourceElement.expression.type !== Syntax.Literal) { + // this is not directive + break; + } + directive = source.slice(token.range[0] + 1, token.range[1] - 1); + if (directive === 'use strict') { + strict = true; + if (firstRestricted) { + throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral); + } + } else { + if (!firstRestricted && token.octal) { + firstRestricted = token; + } + } + } + + oldLabelSet = state.labelSet; + oldInIteration = state.inIteration; + oldInSwitch = state.inSwitch; + oldInFunctionBody = state.inFunctionBody; + oldParenthesizedCount = state.parenthesizedCount; + + state.labelSet = {}; + state.inIteration = false; + state.inSwitch = false; + state.inFunctionBody = true; + state.parenthesizedCount = 0; + + while (index < length) { + if (match('}')) { + break; + } + sourceElement = parseSourceElement(); + if (typeof sourceElement === 'undefined') { + break; + } + sourceElements.push(sourceElement); + } + + expect('}'); + + state.labelSet = oldLabelSet; + state.inIteration = oldInIteration; + state.inSwitch = oldInSwitch; + state.inFunctionBody = oldInFunctionBody; + state.parenthesizedCount = oldParenthesizedCount; + + return delegate.createBlockStatement(sourceElements); + } + + function validateParam(options, param, name) { + var key = '$' + name; + if (strict) { + if (isRestrictedWord(name)) { + options.stricted = param; + options.message = Messages.StrictParamName; + } + if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) { + options.stricted = param; + options.message = Messages.StrictParamDupe; + } + } else if (!options.firstRestricted) { + if (isRestrictedWord(name)) { + options.firstRestricted = param; + options.message = Messages.StrictParamName; + } else if (isStrictModeReservedWord(name)) { + options.firstRestricted = param; + options.message = Messages.StrictReservedWord; + } else if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) { + options.firstRestricted = param; + options.message = Messages.StrictParamDupe; + } + } + options.paramSet[key] = true; + } + + function parseParam(options) { + var token, rest, param, def; + + token = lookahead; + if (token.value === '...') { + token = lex(); + rest = true; + } + + if (match('[')) { + param = parseArrayInitialiser(); + reinterpretAsDestructuredParameter(options, param); + } else if (match('{')) { + if (rest) { + throwError({}, Messages.ObjectPatternAsRestParameter); + } + param = parseObjectInitialiser(); + reinterpretAsDestructuredParameter(options, param); + } else { + // Typing rest params is awkward, so punting on that for now + param = rest + ? parseVariableIdentifier() + : parseTypeAnnotatableIdentifier(); + validateParam(options, token, token.value); + if (match('=')) { + if (rest) { + throwErrorTolerant(lookahead, Messages.DefaultRestParameter); + } + lex(); + def = parseAssignmentExpression(); + ++options.defaultCount; + } + } + + if (rest) { + if (!match(')')) { + throwError({}, Messages.ParameterAfterRestParameter); + } + options.rest = param; + return false; + } + + options.params.push(param); + options.defaults.push(def); + return !match(')'); + } + + function parseParams(firstRestricted) { + var options; + + options = { + params: [], + defaultCount: 0, + defaults: [], + rest: null, + firstRestricted: firstRestricted + }; + + expect('('); + + if (!match(')')) { + options.paramSet = {}; + while (index < length) { + if (!parseParam(options)) { + break; + } + expect(','); + } + } + + expect(')'); + + if (options.defaultCount === 0) { + options.defaults = []; + } + + if (match(':')) { + options.returnTypeAnnotation = parseTypeAnnotation(); + } + + return options; + } + + function parseFunctionDeclaration() { + var id, body, token, tmp, firstRestricted, message, previousStrict, previousYieldAllowed, generator; + + expectKeyword('function'); + + generator = false; + if (match('*')) { + lex(); + generator = true; + } + + token = lookahead; + + id = parseVariableIdentifier(); + + if (strict) { + if (isRestrictedWord(token.value)) { + throwErrorTolerant(token, Messages.StrictFunctionName); + } + } else { + if (isRestrictedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictFunctionName; + } else if (isStrictModeReservedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictReservedWord; + } + } + + tmp = parseParams(firstRestricted); + firstRestricted = tmp.firstRestricted; + if (tmp.message) { + message = tmp.message; + } + + previousStrict = strict; + previousYieldAllowed = state.yieldAllowed; + state.yieldAllowed = generator; + + body = parseFunctionSourceElements(); + + if (strict && firstRestricted) { + throwError(firstRestricted, message); + } + if (strict && tmp.stricted) { + throwErrorTolerant(tmp.stricted, message); + } + if (state.yieldAllowed && !state.yieldFound) { + throwErrorTolerant({}, Messages.NoYieldInGenerator); + } + strict = previousStrict; + state.yieldAllowed = previousYieldAllowed; + + return delegate.createFunctionDeclaration(id, tmp.params, tmp.defaults, body, tmp.rest, generator, false, + tmp.returnTypeAnnotation); + } + + function parseFunctionExpression() { + var token, id = null, firstRestricted, message, tmp, body, previousStrict, previousYieldAllowed, generator; + + expectKeyword('function'); + + generator = false; + + if (match('*')) { + lex(); + generator = true; + } + + if (!match('(')) { + token = lookahead; + id = parseVariableIdentifier(); + if (strict) { + if (isRestrictedWord(token.value)) { + throwErrorTolerant(token, Messages.StrictFunctionName); + } + } else { + if (isRestrictedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictFunctionName; + } else if (isStrictModeReservedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictReservedWord; + } + } + } + + tmp = parseParams(firstRestricted); + firstRestricted = tmp.firstRestricted; + if (tmp.message) { + message = tmp.message; + } + + previousStrict = strict; + previousYieldAllowed = state.yieldAllowed; + state.yieldAllowed = generator; + + body = parseFunctionSourceElements(); + + if (strict && firstRestricted) { + throwError(firstRestricted, message); + } + if (strict && tmp.stricted) { + throwErrorTolerant(tmp.stricted, message); + } + if (state.yieldAllowed && !state.yieldFound) { + throwErrorTolerant({}, Messages.NoYieldInGenerator); + } + strict = previousStrict; + state.yieldAllowed = previousYieldAllowed; + + return delegate.createFunctionExpression(id, tmp.params, tmp.defaults, body, tmp.rest, generator, false, + tmp.returnTypeAnnotation); + } + + function parseYieldExpression() { + var delegateFlag, expr; + + expectKeyword('yield'); + + if (!state.yieldAllowed) { + throwErrorTolerant({}, Messages.IllegalYield); + } + + delegateFlag = false; + if (match('*')) { + lex(); + delegateFlag = true; + } + + expr = parseAssignmentExpression(); + state.yieldFound = true; + + return delegate.createYieldExpression(expr, delegateFlag); + } + + // 14 Classes + + function parseMethodDefinition(existingPropNames) { + var token, key, param, propType, isValidDuplicateProp = false; + + if (lookahead.value === 'static') { + propType = ClassPropertyType.static; + lex(); + } else { + propType = ClassPropertyType.prototype; + } + + if (match('*')) { + lex(); + return delegate.createMethodDefinition( + propType, + '', + parseObjectPropertyKey(), + parsePropertyMethodFunction({ generator: true }) + ); + } + + token = lookahead; + key = parseObjectPropertyKey(); + + if (token.value === 'get' && !match('(')) { + key = parseObjectPropertyKey(); + + // It is a syntax error if any other properties have a name + // duplicating this one unless they are a setter + if (existingPropNames[propType].hasOwnProperty(key.name)) { + isValidDuplicateProp = + // There isn't already a getter for this prop + existingPropNames[propType][key.name].get === undefined + // There isn't already a data prop by this name + && existingPropNames[propType][key.name].data === undefined + // The only existing prop by this name is a setter + && existingPropNames[propType][key.name].set !== undefined; + if (!isValidDuplicateProp) { + throwError(key, Messages.IllegalDuplicateClassProperty); + } + } else { + existingPropNames[propType][key.name] = {}; + } + existingPropNames[propType][key.name].get = true; + + expect('('); + expect(')'); + return delegate.createMethodDefinition( + propType, + 'get', + key, + parsePropertyFunction({ generator: false }) + ); + } + if (token.value === 'set' && !match('(')) { + key = parseObjectPropertyKey(); + + // It is a syntax error if any other properties have a name + // duplicating this one unless they are a getter + if (existingPropNames[propType].hasOwnProperty(key.name)) { + isValidDuplicateProp = + // There isn't already a setter for this prop + existingPropNames[propType][key.name].set === undefined + // There isn't already a data prop by this name + && existingPropNames[propType][key.name].data === undefined + // The only existing prop by this name is a getter + && existingPropNames[propType][key.name].get !== undefined; + if (!isValidDuplicateProp) { + throwError(key, Messages.IllegalDuplicateClassProperty); + } + } else { + existingPropNames[propType][key.name] = {}; + } + existingPropNames[propType][key.name].set = true; + + expect('('); + token = lookahead; + param = [ parseTypeAnnotatableIdentifier() ]; + expect(')'); + return delegate.createMethodDefinition( + propType, + 'set', + key, + parsePropertyFunction({ params: param, generator: false, name: token }) + ); + } + + // It is a syntax error if any other properties have the same name as a + // non-getter, non-setter method + if (existingPropNames[propType].hasOwnProperty(key.name)) { + throwError(key, Messages.IllegalDuplicateClassProperty); + } else { + existingPropNames[propType][key.name] = {}; + } + existingPropNames[propType][key.name].data = true; + + return delegate.createMethodDefinition( + propType, + '', + key, + parsePropertyMethodFunction({ generator: false }) + ); + } + + function parseClassElement(existingProps) { + if (match(';')) { + lex(); + return; + } + return parseMethodDefinition(existingProps); + } + + function parseClassBody() { + var classElement, classElements = [], existingProps = {}; + + existingProps[ClassPropertyType.static] = {}; + existingProps[ClassPropertyType.prototype] = {}; + + expect('{'); + + while (index < length) { + if (match('}')) { + break; + } + classElement = parseClassElement(existingProps); + + if (typeof classElement !== 'undefined') { + classElements.push(classElement); + } + } + + expect('}'); + + return delegate.createClassBody(classElements); + } + + function parseClassExpression() { + var id, previousYieldAllowed, superClass = null; + + expectKeyword('class'); + + if (!matchKeyword('extends') && !match('{')) { + id = parseVariableIdentifier(); + } + + if (matchKeyword('extends')) { + expectKeyword('extends'); + previousYieldAllowed = state.yieldAllowed; + state.yieldAllowed = false; + superClass = parseAssignmentExpression(); + state.yieldAllowed = previousYieldAllowed; + } + + return delegate.createClassExpression(id, superClass, parseClassBody()); + } + + function parseClassDeclaration() { + var id, previousYieldAllowed, superClass = null; + + expectKeyword('class'); + + id = parseVariableIdentifier(); + + if (matchKeyword('extends')) { + expectKeyword('extends'); + previousYieldAllowed = state.yieldAllowed; + state.yieldAllowed = false; + superClass = parseAssignmentExpression(); + state.yieldAllowed = previousYieldAllowed; + } + + return delegate.createClassDeclaration(id, superClass, parseClassBody()); + } + + // 15 Program + + function matchModuleDeclaration() { + var id; + if (matchContextualKeyword('module')) { + id = lookahead2(); + return id.type === Token.StringLiteral || id.type === Token.Identifier; + } + return false; + } + + function parseSourceElement() { + if (lookahead.type === Token.Keyword) { + switch (lookahead.value) { + case 'const': + case 'let': + return parseConstLetDeclaration(lookahead.value); + case 'function': + return parseFunctionDeclaration(); + case 'export': + return parseExportDeclaration(); + case 'import': + return parseImportDeclaration(); + default: + return parseStatement(); + } + } + + if (matchModuleDeclaration()) { + throwError({}, Messages.NestedModule); + } + + if (lookahead.type !== Token.EOF) { + return parseStatement(); + } + } + + function parseProgramElement() { + if (lookahead.type === Token.Keyword) { + switch (lookahead.value) { + case 'export': + return parseExportDeclaration(); + case 'import': + return parseImportDeclaration(); + } + } + + if (matchModuleDeclaration()) { + return parseModuleDeclaration(); + } + + return parseSourceElement(); + } + + function parseProgramElements() { + var sourceElement, sourceElements = [], token, directive, firstRestricted; + + while (index < length) { + token = lookahead; + if (token.type !== Token.StringLiteral) { + break; + } + + sourceElement = parseProgramElement(); + sourceElements.push(sourceElement); + if (sourceElement.expression.type !== Syntax.Literal) { + // this is not directive + break; + } + directive = source.slice(token.range[0] + 1, token.range[1] - 1); + if (directive === 'use strict') { + strict = true; + if (firstRestricted) { + throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral); + } + } else { + if (!firstRestricted && token.octal) { + firstRestricted = token; + } + } + } + + while (index < length) { + sourceElement = parseProgramElement(); + if (typeof sourceElement === 'undefined') { + break; + } + sourceElements.push(sourceElement); + } + return sourceElements; + } + + function parseModuleElement() { + return parseSourceElement(); + } + + function parseModuleElements() { + var list = [], + statement; + + while (index < length) { + if (match('}')) { + break; + } + statement = parseModuleElement(); + if (typeof statement === 'undefined') { + break; + } + list.push(statement); + } + + return list; + } + + function parseModuleBlock() { + var block; + + expect('{'); + + block = parseModuleElements(); + + expect('}'); + + return delegate.createBlockStatement(block); + } + + function parseProgram() { + var body; + strict = false; + peek(); + body = parseProgramElements(); + return delegate.createProgram(body); + } + + // The following functions are needed only when the option to preserve + // the comments is active. + + function addComment(type, value, start, end, loc) { + assert(typeof start === 'number', 'Comment must have valid position'); + + // Because the way the actual token is scanned, often the comments + // (if any) are skipped twice during the lexical analysis. + // Thus, we need to skip adding a comment if the comment array already + // handled it. + if (extra.comments.length > 0) { + if (extra.comments[extra.comments.length - 1].range[1] > start) { + return; + } + } + + extra.comments.push({ + type: type, + value: value, + range: [start, end], + loc: loc + }); + } + + function scanComment() { + var comment, ch, loc, start, blockComment, lineComment; + + comment = ''; + blockComment = false; + lineComment = false; + + while (index < length) { + ch = source[index]; + + if (lineComment) { + ch = source[index++]; + if (isLineTerminator(ch.charCodeAt(0))) { + loc.end = { + line: lineNumber, + column: index - lineStart - 1 + }; + lineComment = false; + addComment('Line', comment, start, index - 1, loc); + if (ch === '\r' && source[index] === '\n') { + ++index; + } + ++lineNumber; + lineStart = index; + comment = ''; + } else if (index >= length) { + lineComment = false; + comment += ch; + loc.end = { + line: lineNumber, + column: length - lineStart + }; + addComment('Line', comment, start, length, loc); + } else { + comment += ch; + } + } else if (blockComment) { + if (isLineTerminator(ch.charCodeAt(0))) { + if (ch === '\r' && source[index + 1] === '\n') { + ++index; + comment += '\r\n'; + } else { + comment += ch; + } + ++lineNumber; + ++index; + lineStart = index; + if (index >= length) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } else { + ch = source[index++]; + if (index >= length) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + comment += ch; + if (ch === '*') { + ch = source[index]; + if (ch === '/') { + comment = comment.substr(0, comment.length - 1); + blockComment = false; + ++index; + loc.end = { + line: lineNumber, + column: index - lineStart + }; + addComment('Block', comment, start, index, loc); + comment = ''; + } + } + } + } else if (ch === '/') { + ch = source[index + 1]; + if (ch === '/') { + loc = { + start: { + line: lineNumber, + column: index - lineStart + } + }; + start = index; + index += 2; + lineComment = true; + if (index >= length) { + loc.end = { + line: lineNumber, + column: index - lineStart + }; + lineComment = false; + addComment('Line', comment, start, index, loc); + } + } else if (ch === '*') { + start = index; + index += 2; + blockComment = true; + loc = { + start: { + line: lineNumber, + column: index - lineStart - 2 + } + }; + if (index >= length) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } else { + break; + } + } else if (isWhiteSpace(ch.charCodeAt(0))) { + ++index; + } else if (isLineTerminator(ch.charCodeAt(0))) { + ++index; + if (ch === '\r' && source[index] === '\n') { + ++index; + } + ++lineNumber; + lineStart = index; + } else { + break; + } + } + } + + function filterCommentLocation() { + var i, entry, comment, comments = []; + + for (i = 0; i < extra.comments.length; ++i) { + entry = extra.comments[i]; + comment = { + type: entry.type, + value: entry.value + }; + if (extra.range) { + comment.range = entry.range; + } + if (extra.loc) { + comment.loc = entry.loc; + } + comments.push(comment); + } + + extra.comments = comments; + } + + // 16 XJS + + XHTMLEntities = { + quot: '\u0022', + amp: '&', + apos: "\u0027", + lt: "<", + gt: ">", + nbsp: "\u00A0", + iexcl: "\u00A1", + cent: "\u00A2", + pound: "\u00A3", + curren: "\u00A4", + yen: "\u00A5", + brvbar: "\u00A6", + sect: "\u00A7", + uml: "\u00A8", + copy: "\u00A9", + ordf: "\u00AA", + laquo: "\u00AB", + not: "\u00AC", + shy: "\u00AD", + reg: "\u00AE", + macr: "\u00AF", + deg: "\u00B0", + plusmn: "\u00B1", + sup2: "\u00B2", + sup3: "\u00B3", + acute: "\u00B4", + micro: "\u00B5", + para: "\u00B6", + middot: "\u00B7", + cedil: "\u00B8", + sup1: "\u00B9", + ordm: "\u00BA", + raquo: "\u00BB", + frac14: "\u00BC", + frac12: "\u00BD", + frac34: "\u00BE", + iquest: "\u00BF", + Agrave: "\u00C0", + Aacute: "\u00C1", + Acirc: "\u00C2", + Atilde: "\u00C3", + Auml: "\u00C4", + Aring: "\u00C5", + AElig: "\u00C6", + Ccedil: "\u00C7", + Egrave: "\u00C8", + Eacute: "\u00C9", + Ecirc: "\u00CA", + Euml: "\u00CB", + Igrave: "\u00CC", + Iacute: "\u00CD", + Icirc: "\u00CE", + Iuml: "\u00CF", + ETH: "\u00D0", + Ntilde: "\u00D1", + Ograve: "\u00D2", + Oacute: "\u00D3", + Ocirc: "\u00D4", + Otilde: "\u00D5", + Ouml: "\u00D6", + times: "\u00D7", + Oslash: "\u00D8", + Ugrave: "\u00D9", + Uacute: "\u00DA", + Ucirc: "\u00DB", + Uuml: "\u00DC", + Yacute: "\u00DD", + THORN: "\u00DE", + szlig: "\u00DF", + agrave: "\u00E0", + aacute: "\u00E1", + acirc: "\u00E2", + atilde: "\u00E3", + auml: "\u00E4", + aring: "\u00E5", + aelig: "\u00E6", + ccedil: "\u00E7", + egrave: "\u00E8", + eacute: "\u00E9", + ecirc: "\u00EA", + euml: "\u00EB", + igrave: "\u00EC", + iacute: "\u00ED", + icirc: "\u00EE", + iuml: "\u00EF", + eth: "\u00F0", + ntilde: "\u00F1", + ograve: "\u00F2", + oacute: "\u00F3", + ocirc: "\u00F4", + otilde: "\u00F5", + ouml: "\u00F6", + divide: "\u00F7", + oslash: "\u00F8", + ugrave: "\u00F9", + uacute: "\u00FA", + ucirc: "\u00FB", + uuml: "\u00FC", + yacute: "\u00FD", + thorn: "\u00FE", + yuml: "\u00FF", + OElig: "\u0152", + oelig: "\u0153", + Scaron: "\u0160", + scaron: "\u0161", + Yuml: "\u0178", + fnof: "\u0192", + circ: "\u02C6", + tilde: "\u02DC", + Alpha: "\u0391", + Beta: "\u0392", + Gamma: "\u0393", + Delta: "\u0394", + Epsilon: "\u0395", + Zeta: "\u0396", + Eta: "\u0397", + Theta: "\u0398", + Iota: "\u0399", + Kappa: "\u039A", + Lambda: "\u039B", + Mu: "\u039C", + Nu: "\u039D", + Xi: "\u039E", + Omicron: "\u039F", + Pi: "\u03A0", + Rho: "\u03A1", + Sigma: "\u03A3", + Tau: "\u03A4", + Upsilon: "\u03A5", + Phi: "\u03A6", + Chi: "\u03A7", + Psi: "\u03A8", + Omega: "\u03A9", + alpha: "\u03B1", + beta: "\u03B2", + gamma: "\u03B3", + delta: "\u03B4", + epsilon: "\u03B5", + zeta: "\u03B6", + eta: "\u03B7", + theta: "\u03B8", + iota: "\u03B9", + kappa: "\u03BA", + lambda: "\u03BB", + mu: "\u03BC", + nu: "\u03BD", + xi: "\u03BE", + omicron: "\u03BF", + pi: "\u03C0", + rho: "\u03C1", + sigmaf: "\u03C2", + sigma: "\u03C3", + tau: "\u03C4", + upsilon: "\u03C5", + phi: "\u03C6", + chi: "\u03C7", + psi: "\u03C8", + omega: "\u03C9", + thetasym: "\u03D1", + upsih: "\u03D2", + piv: "\u03D6", + ensp: "\u2002", + emsp: "\u2003", + thinsp: "\u2009", + zwnj: "\u200C", + zwj: "\u200D", + lrm: "\u200E", + rlm: "\u200F", + ndash: "\u2013", + mdash: "\u2014", + lsquo: "\u2018", + rsquo: "\u2019", + sbquo: "\u201A", + ldquo: "\u201C", + rdquo: "\u201D", + bdquo: "\u201E", + dagger: "\u2020", + Dagger: "\u2021", + bull: "\u2022", + hellip: "\u2026", + permil: "\u2030", + prime: "\u2032", + Prime: "\u2033", + lsaquo: "\u2039", + rsaquo: "\u203A", + oline: "\u203E", + frasl: "\u2044", + euro: "\u20AC", + image: "\u2111", + weierp: "\u2118", + real: "\u211C", + trade: "\u2122", + alefsym: "\u2135", + larr: "\u2190", + uarr: "\u2191", + rarr: "\u2192", + darr: "\u2193", + harr: "\u2194", + crarr: "\u21B5", + lArr: "\u21D0", + uArr: "\u21D1", + rArr: "\u21D2", + dArr: "\u21D3", + hArr: "\u21D4", + forall: "\u2200", + part: "\u2202", + exist: "\u2203", + empty: "\u2205", + nabla: "\u2207", + isin: "\u2208", + notin: "\u2209", + ni: "\u220B", + prod: "\u220F", + sum: "\u2211", + minus: "\u2212", + lowast: "\u2217", + radic: "\u221A", + prop: "\u221D", + infin: "\u221E", + ang: "\u2220", + and: "\u2227", + or: "\u2228", + cap: "\u2229", + cup: "\u222A", + "int": "\u222B", + there4: "\u2234", + sim: "\u223C", + cong: "\u2245", + asymp: "\u2248", + ne: "\u2260", + equiv: "\u2261", + le: "\u2264", + ge: "\u2265", + sub: "\u2282", + sup: "\u2283", + nsub: "\u2284", + sube: "\u2286", + supe: "\u2287", + oplus: "\u2295", + otimes: "\u2297", + perp: "\u22A5", + sdot: "\u22C5", + lceil: "\u2308", + rceil: "\u2309", + lfloor: "\u230A", + rfloor: "\u230B", + lang: "\u2329", + rang: "\u232A", + loz: "\u25CA", + spades: "\u2660", + clubs: "\u2663", + hearts: "\u2665", + diams: "\u2666" + }; + + function isXJSIdentifierStart(ch) { + // exclude backslash (\) + return (ch !== 92) && isIdentifierStart(ch); + } + + function isXJSIdentifierPart(ch) { + // exclude backslash (\) and add hyphen (-) + return (ch !== 92) && (ch === 45 || isIdentifierPart(ch)); + } + + function scanXJSIdentifier() { + var ch, start, id = '', namespace; + + start = index; + while (index < length) { + ch = source.charCodeAt(index); + if (!isXJSIdentifierPart(ch)) { + break; + } + id += source[index++]; + } + + if (ch === 58) { // : + ++index; + namespace = id; + id = ''; + + while (index < length) { + ch = source.charCodeAt(index); + if (!isXJSIdentifierPart(ch)) { + break; + } + id += source[index++]; + } + } + + if (!id) { + throwError({}, Messages.InvalidXJSTagName); + } + + return { + type: Token.XJSIdentifier, + value: id, + namespace: namespace, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + function scanXJSEntity() { + var ch, str = '', count = 0, entity; + ch = source[index]; + assert(ch === '&', 'Entity must start with an ampersand'); + index++; + while (index < length && count++ < 10) { + ch = source[index++]; + if (ch === ';') { + break; + } + str += ch; + } + + if (str[0] === '#' && str[1] === 'x') { + entity = String.fromCharCode(parseInt(str.substr(2), 16)); + } else if (str[0] === '#') { + entity = String.fromCharCode(parseInt(str.substr(1), 10)); + } else { + entity = XHTMLEntities[str]; + } + return entity; + } + + function scanXJSText(stopChars) { + var ch, str = '', start; + start = index; + while (index < length) { + ch = source[index]; + if (stopChars.indexOf(ch) !== -1) { + break; + } + if (ch === '&') { + str += scanXJSEntity(); + } else { + ch = source[index++]; + if (isLineTerminator(ch.charCodeAt(0))) { + ++lineNumber; + lineStart = index; + } + str += ch; + } + } + return { + type: Token.XJSText, + value: str, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + function scanXJSStringLiteral() { + var innerToken, quote, start; + + quote = source[index]; + assert((quote === '\'' || quote === '"'), + 'String literal must starts with a quote'); + + start = index; + ++index; + + innerToken = scanXJSText([quote]); + + if (quote !== source[index]) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + ++index; + + innerToken.range = [start, index]; + + return innerToken; + } + + /** + * Between XJS opening and closing tags (e.g. HERE), anything that + * is not another XJS tag and is not an expression wrapped by {} is text. + */ + function advanceXJSChild() { + var ch = source.charCodeAt(index); + + // { (123) and < (60) + if (ch !== 123 && ch !== 60) { + return scanXJSText(['<', '{']); + } + + return scanPunctuator(); + } + + function parseXJSIdentifier() { + var token; + + if (lookahead.type !== Token.XJSIdentifier) { + throwUnexpected(lookahead); + } + + token = lex(); + return delegate.createXJSIdentifier(token.value, token.namespace); + } + + function parseXJSAttributeValue() { + var value; + if (match('{')) { + value = parseXJSExpressionContainer(); + if (value.expression.type === Syntax.XJSEmptyExpression) { + throwError( + value, + 'XJS attributes must only be assigned a non-empty ' + + 'expression' + ); + } + } else if (match('<')) { + value = parseXJSElement(); + } else if (lookahead.type === Token.XJSText) { + value = delegate.createLiteral(lex()); + } else { + throwError({}, Messages.InvalidXJSAttributeValue); + } + return value; + } + + function parseXJSEmptyExpression() { + while (source.charAt(index) !== '}') { + index++; + } + return delegate.createXJSEmptyExpression(); + } + + function parseXJSExpressionContainer() { + var expression, origInXJSChild, origInXJSTag; + + origInXJSChild = state.inXJSChild; + origInXJSTag = state.inXJSTag; + state.inXJSChild = false; + state.inXJSTag = false; + + expect('{'); + + if (match('}')) { + expression = parseXJSEmptyExpression(); + } else { + expression = parseExpression(); + } + + state.inXJSChild = origInXJSChild; + state.inXJSTag = origInXJSTag; + + expect('}'); + + return delegate.createXJSExpressionContainer(expression); + } + + function parseXJSAttribute() { + var token, name, value; + + name = parseXJSIdentifier(); + + // HTML empty attribute + if (match('=')) { + lex(); + return delegate.createXJSAttribute(name, parseXJSAttributeValue()); + } + + return delegate.createXJSAttribute(name); + } + + function parseXJSChild() { + var token; + if (match('{')) { + token = parseXJSExpressionContainer(); + } else if (lookahead.type === Token.XJSText) { + token = delegate.createLiteral(lex()); + } else { + token = parseXJSElement(); + } + return token; + } + + function parseXJSClosingElement() { + var name, origInXJSChild, origInXJSTag; + origInXJSChild = state.inXJSChild; + origInXJSTag = state.inXJSTag; + state.inXJSChild = false; + state.inXJSTag = true; + expect('<'); + expect('/'); + name = parseXJSIdentifier(); + // Because advance() (called by lex() called by expect()) expects there + // to be a valid token after >, it needs to know whether to look for a + // standard JS token or an XJS text node + state.inXJSChild = origInXJSChild; + state.inXJSTag = origInXJSTag; + expect('>'); + return delegate.createXJSClosingElement(name); + } + + function parseXJSOpeningElement() { + var name, attribute, attributes = [], selfClosing = false, origInXJSChild, origInXJSTag; + + origInXJSChild = state.inXJSChild; + origInXJSTag = state.inXJSTag; + state.inXJSChild = false; + state.inXJSTag = true; + + expect('<'); + + name = parseXJSIdentifier(); + + while (index < length && + lookahead.value !== '/' && + lookahead.value !== '>') { + attributes.push(parseXJSAttribute()); + } + + state.inXJSTag = origInXJSTag; + + if (lookahead.value === '/') { + expect('/'); + // Because advance() (called by lex() called by expect()) expects + // there to be a valid token after >, it needs to know whether to + // look for a standard JS token or an XJS text node + state.inXJSChild = origInXJSChild; + expect('>'); + selfClosing = true; + } else { + state.inXJSChild = true; + expect('>'); + } + return delegate.createXJSOpeningElement(name, attributes, selfClosing); + } + + function parseXJSElement() { + var openingElement, closingElement, children = [], origInXJSChild, origInXJSTag; + + origInXJSChild = state.inXJSChild; + origInXJSTag = state.inXJSTag; + openingElement = parseXJSOpeningElement(); + + if (!openingElement.selfClosing) { + while (index < length) { + state.inXJSChild = false; // Call lookahead2() with inXJSChild = false because 0) { + token = extra.tokens[extra.tokens.length - 1]; + if (token.range[0] === pos && token.type === 'Punctuator') { + if (token.value === '/' || token.value === '/=') { + extra.tokens.pop(); + } + } + } + + extra.tokens.push({ + type: 'RegularExpression', + value: regex.literal, + range: [pos, index], + loc: loc + }); + } + + return regex; + } + + function filterTokenLocation() { + var i, entry, token, tokens = []; + + for (i = 0; i < extra.tokens.length; ++i) { + entry = extra.tokens[i]; + token = { + type: entry.type, + value: entry.value + }; + if (extra.range) { + token.range = entry.range; + } + if (extra.loc) { + token.loc = entry.loc; + } + tokens.push(token); + } + + extra.tokens = tokens; + } + + function LocationMarker() { + this.range = [index, index]; + this.loc = { + start: { + line: lineNumber, + column: index - lineStart + }, + end: { + line: lineNumber, + column: index - lineStart + } + }; + } + + LocationMarker.prototype = { + constructor: LocationMarker, + + end: function () { + this.range[1] = index; + this.loc.end.line = lineNumber; + this.loc.end.column = index - lineStart; + }, + + applyGroup: function (node) { + if (extra.range) { + node.groupRange = [this.range[0], this.range[1]]; + } + if (extra.loc) { + node.groupLoc = { + start: { + line: this.loc.start.line, + column: this.loc.start.column + }, + end: { + line: this.loc.end.line, + column: this.loc.end.column + } + }; + node = delegate.postProcess(node); + } + }, + + apply: function (node) { + var nodeType = typeof node; + assert(nodeType === 'object', + 'Applying location marker to an unexpected node type: ' + + nodeType); + + if (extra.range) { + node.range = [this.range[0], this.range[1]]; + } + if (extra.loc) { + node.loc = { + start: { + line: this.loc.start.line, + column: this.loc.start.column + }, + end: { + line: this.loc.end.line, + column: this.loc.end.column + } + }; + node = delegate.postProcess(node); + } + } + }; + + function createLocationMarker() { + return new LocationMarker(); + } + + function trackGroupExpression() { + var marker, expr; + + skipComment(); + marker = createLocationMarker(); + expect('('); + + ++state.parenthesizedCount; + expr = parseExpression(); + + expect(')'); + marker.end(); + marker.applyGroup(expr); + + return expr; + } + + function trackLeftHandSideExpression() { + var marker, expr; + + skipComment(); + marker = createLocationMarker(); + + expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression(); + + while (match('.') || match('[') || lookahead.type === Token.Template) { + if (match('[')) { + expr = delegate.createMemberExpression('[', expr, parseComputedMember()); + marker.end(); + marker.apply(expr); + } else if (match('.')) { + expr = delegate.createMemberExpression('.', expr, parseNonComputedMember()); + marker.end(); + marker.apply(expr); + } else { + expr = delegate.createTaggedTemplateExpression(expr, parseTemplateLiteral()); + marker.end(); + marker.apply(expr); + } + } + + return expr; + } + + function trackLeftHandSideExpressionAllowCall() { + var marker, expr, args; + + skipComment(); + marker = createLocationMarker(); + + expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression(); + + while (match('.') || match('[') || match('(') || lookahead.type === Token.Template) { + if (match('(')) { + args = parseArguments(); + expr = delegate.createCallExpression(expr, args); + marker.end(); + marker.apply(expr); + } else if (match('[')) { + expr = delegate.createMemberExpression('[', expr, parseComputedMember()); + marker.end(); + marker.apply(expr); + } else if (match('.')) { + expr = delegate.createMemberExpression('.', expr, parseNonComputedMember()); + marker.end(); + marker.apply(expr); + } else { + expr = delegate.createTaggedTemplateExpression(expr, parseTemplateLiteral()); + marker.end(); + marker.apply(expr); + } + } + + return expr; + } + + function filterGroup(node) { + var n, i, entry; + + n = (Object.prototype.toString.apply(node) === '[object Array]') ? [] : {}; + for (i in node) { + if (node.hasOwnProperty(i) && i !== 'groupRange' && i !== 'groupLoc') { + entry = node[i]; + if (entry === null || typeof entry !== 'object' || entry instanceof RegExp) { + n[i] = entry; + } else { + n[i] = filterGroup(entry); + } + } + } + return n; + } + + function wrapTrackingFunction(range, loc, preserveWhitespace) { + + return function (parseFunction) { + + function isBinary(node) { + return node.type === Syntax.LogicalExpression || + node.type === Syntax.BinaryExpression; + } + + function visit(node) { + var start, end; + + if (isBinary(node.left)) { + visit(node.left); + } + if (isBinary(node.right)) { + visit(node.right); + } + + if (range) { + if (node.left.groupRange || node.right.groupRange) { + start = node.left.groupRange ? node.left.groupRange[0] : node.left.range[0]; + end = node.right.groupRange ? node.right.groupRange[1] : node.right.range[1]; + node.range = [start, end]; + } else if (typeof node.range === 'undefined') { + start = node.left.range[0]; + end = node.right.range[1]; + node.range = [start, end]; + } + } + if (loc) { + if (node.left.groupLoc || node.right.groupLoc) { + start = node.left.groupLoc ? node.left.groupLoc.start : node.left.loc.start; + end = node.right.groupLoc ? node.right.groupLoc.end : node.right.loc.end; + node.loc = { + start: start, + end: end + }; + node = delegate.postProcess(node); + } else if (typeof node.loc === 'undefined') { + node.loc = { + start: node.left.loc.start, + end: node.right.loc.end + }; + node = delegate.postProcess(node); + } + } + } + + return function () { + var marker, node; + + if (!preserveWhitespace) { + skipComment(); + } + + marker = createLocationMarker(); + node = parseFunction.apply(null, arguments); + marker.end(); + + if (range && typeof node.range === 'undefined') { + marker.apply(node); + } + + if (loc && typeof node.loc === 'undefined') { + marker.apply(node); + } + + if (isBinary(node)) { + visit(node); + } + + return node; + }; + }; + } + + function patch() { + + var wrapTracking, wrapTrackingPreserveWhitespace; + + if (extra.comments) { + extra.skipComment = skipComment; + skipComment = scanComment; + } + + if (extra.range || extra.loc) { + + extra.parseGroupExpression = parseGroupExpression; + extra.parseLeftHandSideExpression = parseLeftHandSideExpression; + extra.parseLeftHandSideExpressionAllowCall = parseLeftHandSideExpressionAllowCall; + parseGroupExpression = trackGroupExpression; + parseLeftHandSideExpression = trackLeftHandSideExpression; + parseLeftHandSideExpressionAllowCall = trackLeftHandSideExpressionAllowCall; + + wrapTracking = wrapTrackingFunction(extra.range, extra.loc); + wrapTrackingPreserveWhitespace = + wrapTrackingFunction(extra.range, extra.loc, true); + + extra.parseArrayInitialiser = parseArrayInitialiser; + extra.parseAssignmentExpression = parseAssignmentExpression; + extra.parseBinaryExpression = parseBinaryExpression; + extra.parseBlock = parseBlock; + extra.parseFunctionSourceElements = parseFunctionSourceElements; + extra.parseCatchClause = parseCatchClause; + extra.parseComputedMember = parseComputedMember; + extra.parseConditionalExpression = parseConditionalExpression; + extra.parseConstLetDeclaration = parseConstLetDeclaration; + extra.parseExportBatchSpecifier = parseExportBatchSpecifier; + extra.parseExportDeclaration = parseExportDeclaration; + extra.parseExportSpecifier = parseExportSpecifier; + extra.parseExpression = parseExpression; + extra.parseForVariableDeclaration = parseForVariableDeclaration; + extra.parseFunctionDeclaration = parseFunctionDeclaration; + extra.parseFunctionExpression = parseFunctionExpression; + extra.parseParams = parseParams; + extra.parseImportDeclaration = parseImportDeclaration; + extra.parseImportSpecifier = parseImportSpecifier; + extra.parseModuleDeclaration = parseModuleDeclaration; + extra.parseModuleBlock = parseModuleBlock; + extra.parseNewExpression = parseNewExpression; + extra.parseNonComputedProperty = parseNonComputedProperty; + extra.parseObjectInitialiser = parseObjectInitialiser; + extra.parseObjectProperty = parseObjectProperty; + extra.parseObjectPropertyKey = parseObjectPropertyKey; + extra.parsePostfixExpression = parsePostfixExpression; + extra.parsePrimaryExpression = parsePrimaryExpression; + extra.parseProgram = parseProgram; + extra.parsePropertyFunction = parsePropertyFunction; + extra.parseSpreadOrAssignmentExpression = parseSpreadOrAssignmentExpression; + extra.parseTemplateElement = parseTemplateElement; + extra.parseTemplateLiteral = parseTemplateLiteral; + extra.parseTypeAnnotatableIdentifier = parseTypeAnnotatableIdentifier; + extra.parseTypeAnnotation = parseTypeAnnotation; + extra.parseStatement = parseStatement; + extra.parseSwitchCase = parseSwitchCase; + extra.parseUnaryExpression = parseUnaryExpression; + extra.parseVariableDeclaration = parseVariableDeclaration; + extra.parseVariableIdentifier = parseVariableIdentifier; + extra.parseMethodDefinition = parseMethodDefinition; + extra.parseClassDeclaration = parseClassDeclaration; + extra.parseClassExpression = parseClassExpression; + extra.parseClassBody = parseClassBody; + extra.parseXJSIdentifier = parseXJSIdentifier; + extra.parseXJSChild = parseXJSChild; + extra.parseXJSAttribute = parseXJSAttribute; + extra.parseXJSAttributeValue = parseXJSAttributeValue; + extra.parseXJSExpressionContainer = parseXJSExpressionContainer; + extra.parseXJSEmptyExpression = parseXJSEmptyExpression; + extra.parseXJSElement = parseXJSElement; + extra.parseXJSClosingElement = parseXJSClosingElement; + extra.parseXJSOpeningElement = parseXJSOpeningElement; + + parseArrayInitialiser = wrapTracking(extra.parseArrayInitialiser); + parseAssignmentExpression = wrapTracking(extra.parseAssignmentExpression); + parseBinaryExpression = wrapTracking(extra.parseBinaryExpression); + parseBlock = wrapTracking(extra.parseBlock); + parseFunctionSourceElements = wrapTracking(extra.parseFunctionSourceElements); + parseCatchClause = wrapTracking(extra.parseCatchClause); + parseComputedMember = wrapTracking(extra.parseComputedMember); + parseConditionalExpression = wrapTracking(extra.parseConditionalExpression); + parseConstLetDeclaration = wrapTracking(extra.parseConstLetDeclaration); + parseExportBatchSpecifier = wrapTracking(parseExportBatchSpecifier); + parseExportDeclaration = wrapTracking(parseExportDeclaration); + parseExportSpecifier = wrapTracking(parseExportSpecifier); + parseExpression = wrapTracking(extra.parseExpression); + parseForVariableDeclaration = wrapTracking(extra.parseForVariableDeclaration); + parseFunctionDeclaration = wrapTracking(extra.parseFunctionDeclaration); + parseFunctionExpression = wrapTracking(extra.parseFunctionExpression); + parseParams = wrapTracking(extra.parseParams); + parseImportDeclaration = wrapTracking(extra.parseImportDeclaration); + parseImportSpecifier = wrapTracking(extra.parseImportSpecifier); + parseModuleDeclaration = wrapTracking(extra.parseModuleDeclaration); + parseModuleBlock = wrapTracking(extra.parseModuleBlock); + parseLeftHandSideExpression = wrapTracking(parseLeftHandSideExpression); + parseNewExpression = wrapTracking(extra.parseNewExpression); + parseNonComputedProperty = wrapTracking(extra.parseNonComputedProperty); + parseObjectInitialiser = wrapTracking(extra.parseObjectInitialiser); + parseObjectProperty = wrapTracking(extra.parseObjectProperty); + parseObjectPropertyKey = wrapTracking(extra.parseObjectPropertyKey); + parsePostfixExpression = wrapTracking(extra.parsePostfixExpression); + parsePrimaryExpression = wrapTracking(extra.parsePrimaryExpression); + parseProgram = wrapTracking(extra.parseProgram); + parsePropertyFunction = wrapTracking(extra.parsePropertyFunction); + parseTemplateElement = wrapTracking(extra.parseTemplateElement); + parseTemplateLiteral = wrapTracking(extra.parseTemplateLiteral); + parseTypeAnnotatableIdentifier = wrapTracking(extra.parseTypeAnnotatableIdentifier); + parseTypeAnnotation = wrapTracking(extra.parseTypeAnnotation); + parseSpreadOrAssignmentExpression = wrapTracking(extra.parseSpreadOrAssignmentExpression); + parseStatement = wrapTracking(extra.parseStatement); + parseSwitchCase = wrapTracking(extra.parseSwitchCase); + parseUnaryExpression = wrapTracking(extra.parseUnaryExpression); + parseVariableDeclaration = wrapTracking(extra.parseVariableDeclaration); + parseVariableIdentifier = wrapTracking(extra.parseVariableIdentifier); + parseMethodDefinition = wrapTracking(extra.parseMethodDefinition); + parseClassDeclaration = wrapTracking(extra.parseClassDeclaration); + parseClassExpression = wrapTracking(extra.parseClassExpression); + parseClassBody = wrapTracking(extra.parseClassBody); + parseXJSIdentifier = wrapTracking(extra.parseXJSIdentifier); + parseXJSChild = wrapTrackingPreserveWhitespace(extra.parseXJSChild); + parseXJSAttribute = wrapTracking(extra.parseXJSAttribute); + parseXJSAttributeValue = wrapTracking(extra.parseXJSAttributeValue); + parseXJSExpressionContainer = wrapTracking(extra.parseXJSExpressionContainer); + parseXJSEmptyExpression = wrapTrackingPreserveWhitespace(extra.parseXJSEmptyExpression); + parseXJSElement = wrapTracking(extra.parseXJSElement); + parseXJSClosingElement = wrapTracking(extra.parseXJSClosingElement); + parseXJSOpeningElement = wrapTracking(extra.parseXJSOpeningElement); + } + + if (typeof extra.tokens !== 'undefined') { + extra.advance = advance; + extra.scanRegExp = scanRegExp; + + advance = collectToken; + scanRegExp = collectRegex; + } + } + + function unpatch() { + if (typeof extra.skipComment === 'function') { + skipComment = extra.skipComment; + } + + if (extra.range || extra.loc) { + parseArrayInitialiser = extra.parseArrayInitialiser; + parseAssignmentExpression = extra.parseAssignmentExpression; + parseBinaryExpression = extra.parseBinaryExpression; + parseBlock = extra.parseBlock; + parseFunctionSourceElements = extra.parseFunctionSourceElements; + parseCatchClause = extra.parseCatchClause; + parseComputedMember = extra.parseComputedMember; + parseConditionalExpression = extra.parseConditionalExpression; + parseConstLetDeclaration = extra.parseConstLetDeclaration; + parseExportBatchSpecifier = extra.parseExportBatchSpecifier; + parseExportDeclaration = extra.parseExportDeclaration; + parseExportSpecifier = extra.parseExportSpecifier; + parseExpression = extra.parseExpression; + parseForVariableDeclaration = extra.parseForVariableDeclaration; + parseFunctionDeclaration = extra.parseFunctionDeclaration; + parseFunctionExpression = extra.parseFunctionExpression; + parseImportDeclaration = extra.parseImportDeclaration; + parseImportSpecifier = extra.parseImportSpecifier; + parseGroupExpression = extra.parseGroupExpression; + parseLeftHandSideExpression = extra.parseLeftHandSideExpression; + parseLeftHandSideExpressionAllowCall = extra.parseLeftHandSideExpressionAllowCall; + parseModuleDeclaration = extra.parseModuleDeclaration; + parseModuleBlock = extra.parseModuleBlock; + parseNewExpression = extra.parseNewExpression; + parseNonComputedProperty = extra.parseNonComputedProperty; + parseObjectInitialiser = extra.parseObjectInitialiser; + parseObjectProperty = extra.parseObjectProperty; + parseObjectPropertyKey = extra.parseObjectPropertyKey; + parsePostfixExpression = extra.parsePostfixExpression; + parsePrimaryExpression = extra.parsePrimaryExpression; + parseProgram = extra.parseProgram; + parsePropertyFunction = extra.parsePropertyFunction; + parseTemplateElement = extra.parseTemplateElement; + parseTemplateLiteral = extra.parseTemplateLiteral; + parseTypeAnnotatableIdentifier = extra.parseTypeAnnotatableIdentifier; + parseTypeAnnotation = extra.parseTypeAnnotation; + parseSpreadOrAssignmentExpression = extra.parseSpreadOrAssignmentExpression; + parseStatement = extra.parseStatement; + parseSwitchCase = extra.parseSwitchCase; + parseUnaryExpression = extra.parseUnaryExpression; + parseVariableDeclaration = extra.parseVariableDeclaration; + parseVariableIdentifier = extra.parseVariableIdentifier; + parseMethodDefinition = extra.parseMethodDefinition; + parseClassDeclaration = extra.parseClassDeclaration; + parseClassExpression = extra.parseClassExpression; + parseClassBody = extra.parseClassBody; + parseXJSIdentifier = extra.parseXJSIdentifier; + parseXJSChild = extra.parseXJSChild; + parseXJSAttribute = extra.parseXJSAttribute; + parseXJSAttributeValue = extra.parseXJSAttributeValue; + parseXJSExpressionContainer = extra.parseXJSExpressionContainer; + parseXJSEmptyExpression = extra.parseXJSEmptyExpression; + parseXJSElement = extra.parseXJSElement; + parseXJSClosingElement = extra.parseXJSClosingElement; + parseXJSOpeningElement = extra.parseXJSOpeningElement; + } + + if (typeof extra.scanRegExp === 'function') { + advance = extra.advance; + scanRegExp = extra.scanRegExp; + } + } + + // This is used to modify the delegate. + + function extend(object, properties) { + var entry, result = {}; + + for (entry in object) { + if (object.hasOwnProperty(entry)) { + result[entry] = object[entry]; + } + } + + for (entry in properties) { + if (properties.hasOwnProperty(entry)) { + result[entry] = properties[entry]; + } + } + + return result; + } + + function tokenize(code, options) { + var toString, + token, + tokens; + + toString = String; + if (typeof code !== 'string' && !(code instanceof String)) { + code = toString(code); + } + + delegate = SyntaxTreeDelegate; + source = code; + index = 0; + lineNumber = (source.length > 0) ? 1 : 0; + lineStart = 0; + length = source.length; + lookahead = null; + state = { + allowKeyword: true, + allowIn: true, + labelSet: {}, + inFunctionBody: false, + inIteration: false, + inSwitch: false + }; + + extra = {}; + + // Options matching. + options = options || {}; + + // Of course we collect tokens here. + options.tokens = true; + extra.tokens = []; + extra.tokenize = true; + // The following two fields are necessary to compute the Regex tokens. + extra.openParenToken = -1; + extra.openCurlyToken = -1; + + extra.range = (typeof options.range === 'boolean') && options.range; + extra.loc = (typeof options.loc === 'boolean') && options.loc; + + if (typeof options.comment === 'boolean' && options.comment) { + extra.comments = []; + } + if (typeof options.tolerant === 'boolean' && options.tolerant) { + extra.errors = []; + } + + if (length > 0) { + if (typeof source[0] === 'undefined') { + // Try first to convert to a string. This is good as fast path + // for old IE which understands string indexing for string + // literals only and not for string object. + if (code instanceof String) { + source = code.valueOf(); + } + } + } + + patch(); + + try { + peek(); + if (lookahead.type === Token.EOF) { + return extra.tokens; + } + + token = lex(); + while (lookahead.type !== Token.EOF) { + try { + token = lex(); + } catch (lexError) { + token = lookahead; + if (extra.errors) { + extra.errors.push(lexError); + // We have to break on the first error + // to avoid infinite loops. + break; + } else { + throw lexError; + } + } + } + + filterTokenLocation(); + tokens = extra.tokens; + if (typeof extra.comments !== 'undefined') { + filterCommentLocation(); + tokens.comments = extra.comments; + } + if (typeof extra.errors !== 'undefined') { + tokens.errors = extra.errors; + } + } catch (e) { + throw e; + } finally { + unpatch(); + extra = {}; + } + return tokens; + } + + function parse(code, options) { + var program, toString; + + toString = String; + if (typeof code !== 'string' && !(code instanceof String)) { + code = toString(code); + } + + delegate = SyntaxTreeDelegate; + source = code; + index = 0; + lineNumber = (source.length > 0) ? 1 : 0; + lineStart = 0; + length = source.length; + lookahead = null; + state = { + allowKeyword: false, + allowIn: true, + labelSet: {}, + parenthesizedCount: 0, + inFunctionBody: false, + inIteration: false, + inSwitch: false, + inXJSChild: false, + inXJSTag: false, + yieldAllowed: false, + yieldFound: false + }; + + extra = {}; + if (typeof options !== 'undefined') { + extra.range = (typeof options.range === 'boolean') && options.range; + extra.loc = (typeof options.loc === 'boolean') && options.loc; + + if (extra.loc && options.source !== null && options.source !== undefined) { + delegate = extend(delegate, { + 'postProcess': function (node) { + node.loc.source = toString(options.source); + return node; + } + }); + } + + if (typeof options.tokens === 'boolean' && options.tokens) { + extra.tokens = []; + } + if (typeof options.comment === 'boolean' && options.comment) { + extra.comments = []; + } + if (typeof options.tolerant === 'boolean' && options.tolerant) { + extra.errors = []; + } + } + + if (length > 0) { + if (typeof source[0] === 'undefined') { + // Try first to convert to a string. This is good as fast path + // for old IE which understands string indexing for string + // literals only and not for string object. + if (code instanceof String) { + source = code.valueOf(); + } + } + } + + patch(); + try { + program = parseProgram(); + if (typeof extra.comments !== 'undefined') { + filterCommentLocation(); + program.comments = extra.comments; + } + if (typeof extra.tokens !== 'undefined') { + filterTokenLocation(); + program.tokens = extra.tokens; + } + if (typeof extra.errors !== 'undefined') { + program.errors = extra.errors; + } + if (extra.range || extra.loc) { + program.body = filterGroup(program.body); + } + } catch (e) { + throw e; + } finally { + unpatch(); + extra = {}; + } + + return program; + } + + // Sync with *.json manifests. + exports.version = '1.1.0-dev-harmony'; + + exports.tokenize = tokenize; + + exports.parse = parse; + + // Deep copy. + exports.Syntax = (function () { + var name, types = {}; + + if (typeof Object.create === 'function') { + types = Object.create(null); + } + + for (name in Syntax) { + if (Syntax.hasOwnProperty(name)) { + types[name] = Syntax[name]; + } + } + + if (typeof Object.freeze === 'function') { + Object.freeze(types); + } + + return types; + }()); + +})); +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/examples/detectnestedternary.js b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/examples/detectnestedternary.js new file mode 100644 index 00000000..f144955d --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/examples/detectnestedternary.js @@ -0,0 +1,106 @@ +// Usage: node detectnestedternary.js /path/to/some/directory +// For more details, please read http://esprima.org/doc/#nestedternary + +/*jslint node:true sloppy:true plusplus:true */ + +var fs = require('fs'), + esprima = require('../esprima'), + dirname = process.argv[2]; + + +// Executes visitor on the object and its children (recursively). +function traverse(object, visitor) { + var key, child; + + visitor.call(null, object); + for (key in object) { + if (object.hasOwnProperty(key)) { + child = object[key]; + if (typeof child === 'object' && child !== null) { + traverse(child, visitor); + } + } + } +} + +// http://stackoverflow.com/q/5827612/ +function walk(dir, done) { + var results = []; + fs.readdir(dir, function (err, list) { + if (err) { + return done(err); + } + var i = 0; + (function next() { + var file = list[i++]; + if (!file) { + return done(null, results); + } + file = dir + '/' + file; + fs.stat(file, function (err, stat) { + if (stat && stat.isDirectory()) { + walk(file, function (err, res) { + results = results.concat(res); + next(); + }); + } else { + results.push(file); + next(); + } + }); + }()); + }); +} + +walk(dirname, function (err, results) { + if (err) { + console.log('Error', err); + return; + } + + results.forEach(function (filename) { + var shortname, first, content, syntax; + + shortname = filename; + first = true; + + if (shortname.substr(0, dirname.length) === dirname) { + shortname = shortname.substr(dirname.length + 1, shortname.length); + } + + function report(node, problem) { + if (first === true) { + console.log(shortname + ': '); + first = false; + } + console.log(' Line', node.loc.start.line, ':', problem); + } + + function checkConditional(node) { + var condition; + + if (node.consequent.type === 'ConditionalExpression' || + node.alternate.type === 'ConditionalExpression') { + + condition = content.substring(node.test.range[0], node.test.range[1]); + if (condition.length > 20) { + condition = condition.substring(0, 20) + '...'; + } + condition = '"' + condition + '"'; + report(node, 'Nested ternary for ' + condition); + } + } + + try { + content = fs.readFileSync(filename, 'utf-8'); + syntax = esprima.parse(content, { tolerant: true, loc: true, range: true }); + traverse(syntax, function (node) { + if (node.type === 'ConditionalExpression') { + checkConditional(node); + } + }); + } catch (e) { + } + + }); +}); diff --git a/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/examples/findbooleantrap.js b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/examples/findbooleantrap.js new file mode 100644 index 00000000..dc6d1d9c --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/examples/findbooleantrap.js @@ -0,0 +1,173 @@ +// Usage: node findbooleantrap.js /path/to/some/directory +// For more details, please read http://esprima.org/doc/#booleantrap. + +/*jslint node:true sloppy:true plusplus:true */ + +var fs = require('fs'), + esprima = require('../esprima'), + dirname = process.argv[2], + doubleNegativeList = []; + + +// Black-list of terms with double-negative meaning. +doubleNegativeList = [ + 'hidden', + 'caseinsensitive', + 'disabled' +]; + + +// Executes visitor on the object and its children (recursively). +function traverse(object, visitor) { + var key, child; + + if (visitor.call(null, object) === false) { + return; + } + for (key in object) { + if (object.hasOwnProperty(key)) { + child = object[key]; + if (typeof child === 'object' && child !== null) { + traverse(child, visitor); + } + } + } +} + +// http://stackoverflow.com/q/5827612/ +function walk(dir, done) { + var results = []; + fs.readdir(dir, function (err, list) { + if (err) { + return done(err); + } + var i = 0; + (function next() { + var file = list[i++]; + if (!file) { + return done(null, results); + } + file = dir + '/' + file; + fs.stat(file, function (err, stat) { + if (stat && stat.isDirectory()) { + walk(file, function (err, res) { + results = results.concat(res); + next(); + }); + } else { + results.push(file); + next(); + } + }); + }()); + }); +} + +walk(dirname, function (err, results) { + if (err) { + console.log('Error', err); + return; + } + + results.forEach(function (filename) { + var shortname, first, content, syntax; + + shortname = filename; + first = true; + + if (shortname.substr(0, dirname.length) === dirname) { + shortname = shortname.substr(dirname.length + 1, shortname.length); + } + + function getFunctionName(node) { + if (node.callee.type === 'Identifier') { + return node.callee.name; + } + if (node.callee.type === 'MemberExpression') { + return node.callee.property.name; + } + } + + function report(node, problem) { + if (first === true) { + console.log(shortname + ': '); + first = false; + } + console.log(' Line', node.loc.start.line, 'in function', + getFunctionName(node) + ':', problem); + } + + function checkSingleArgument(node) { + var args = node['arguments'], + functionName = getFunctionName(node); + + if ((args.length !== 1) || (typeof args[0].value !== 'boolean')) { + return; + } + + // Check if the method is a setter, i.e. starts with 'set', + // e.g. 'setEnabled(false)'. + if (functionName.substr(0, 3) !== 'set') { + report(node, 'Boolean literal with a non-setter function'); + } + + // Does it contain a term with double-negative meaning? + doubleNegativeList.forEach(function (term) { + if (functionName.toLowerCase().indexOf(term.toLowerCase()) >= 0) { + report(node, 'Boolean literal with confusing double-negative'); + } + }); + } + + function checkMultipleArguments(node) { + var args = node['arguments'], + literalCount = 0; + + args.forEach(function (arg) { + if (typeof arg.value === 'boolean') { + literalCount++; + } + }); + + // At least two arguments must be Boolean literals. + if (literalCount >= 2) { + + // Check for two different Boolean literals in one call. + if (literalCount === 2 && args.length === 2) { + if (args[0].value !== args[1].value) { + report(node, 'Confusing true vs false'); + return; + } + } + + report(node, 'Multiple Boolean literals'); + } + } + + function checkLastArgument(node) { + var args = node['arguments']; + + if (args.length < 2) { + return; + } + + if (typeof args[args.length - 1].value === 'boolean') { + report(node, 'Ambiguous Boolean literal as the last argument'); + } + } + + try { + content = fs.readFileSync(filename, 'utf-8'); + syntax = esprima.parse(content, { tolerant: true, loc: true }); + traverse(syntax, function (node) { + if (node.type === 'CallExpression') { + checkSingleArgument(node); + checkLastArgument(node); + checkMultipleArguments(node); + } + }); + } catch (e) { + } + + }); +}); diff --git a/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/examples/tokendist.js b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/examples/tokendist.js new file mode 100644 index 00000000..bdd7761c --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/examples/tokendist.js @@ -0,0 +1,33 @@ +/*jslint node:true */ +var fs = require('fs'), + esprima = require('../esprima'), + files = process.argv.splice(2), + histogram, + type; + +histogram = { + Boolean: 0, + Identifier: 0, + Keyword: 0, + Null: 0, + Numeric: 0, + Punctuator: 0, + RegularExpression: 0, + String: 0 +}; + +files.forEach(function (filename) { + 'use strict'; + var content = fs.readFileSync(filename, 'utf-8'), + tokens = esprima.parse(content, { tokens: true }).tokens; + + tokens.forEach(function (token) { + histogram[token.type] += 1; + }); +}); + +for (type in histogram) { + if (histogram.hasOwnProperty(type)) { + console.log(type, histogram[type]); + } +} diff --git a/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/index.html b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/index.html new file mode 100644 index 00000000..4d412ab1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/index.html @@ -0,0 +1,136 @@ + + + + + + + Esprima + + + + + + + + + + + +
    +
    +

    ECMAScript parsing infrastructure for multipurpose analysis

    +
    +
    + + +
    +
    +

    Esprima is a high performance, standard-compliant + ECMAScript parser written in ECMAScript (also popularly known as + JavaScript).

    + +
    +
    +

    Features

    +
      +
    • Full support for ECMAScript 5.1 (ECMA-262)
    • +
    • Sensible syntax tree format, compatible with Mozilla Parser AST
    • +
    • Optional tracking of syntax node location (index-based and line-column)
    • +
    • Heavily tested (> 600 tests with solid statement and branch coverage)
    • +
    • Experimental support for ES6/Harmony (module, class, destructuring, ...)
    • +
    +

    +

    Esprima serves as an important building block for some JavaScript language tools, + from code instrumentation to editor autocompletion.

    + Autocomplete

    +
    +
    +
    + +
    +
    +

    Once the full syntax tree is obtained, various static code analysis + can be applied to give an insight to the code: + syntax visualization, + code validation, + editing autocomplete (with type inferencing) + and many others.

    +
    +
    +

    Regenerating the code from the syntax tree permits a few different types of code transformation, + from a simple rewriting (with specific formatting) to + a more complicated minification.

    +
    +

    Esprima runs on many popular web browsers, as well as other ECMAScript platforms such as + Rhino and + Node.js. It is distributed under the + BSD license.

    +
    +
    + + + + + + diff --git a/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/package.json b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/package.json new file mode 100644 index 00000000..a6487dd9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/package.json @@ -0,0 +1,107 @@ +{ + "_args": [ + [ + { + "raw": "esprima-fb@^3001.1.0-dev-harmony-fb", + "scope": null, + "escapedName": "esprima-fb", + "name": "esprima-fb", + "rawSpec": "^3001.1.0-dev-harmony-fb", + "spec": ">=3001.1.0-dev-harmony-fb <3002.0.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/derequire" + ] + ], + "_from": "esprima-fb@>=3001.1.0-dev-harmony-fb <3002.0.0", + "_id": "esprima-fb@3001.1.0-dev-harmony-fb", + "_inCache": true, + "_location": "/derequire/esprima-fb", + "_npmUser": { + "name": "jeffmo", + "email": "jeff@anafx.com" + }, + "_npmVersion": "1.2.32", + "_phantomChildren": {}, + "_requested": { + "raw": "esprima-fb@^3001.1.0-dev-harmony-fb", + "scope": null, + "escapedName": "esprima-fb", + "name": "esprima-fb", + "rawSpec": "^3001.1.0-dev-harmony-fb", + "spec": ">=3001.1.0-dev-harmony-fb <3002.0.0", + "type": "range" + }, + "_requiredBy": [ + "/derequire" + ], + "_resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-3001.0001.0000-dev-harmony-fb.tgz", + "_shasum": "b77d37abcd38ea0b77426bb8bc2922ce6b426411", + "_shrinkwrap": null, + "_spec": "esprima-fb@^3001.1.0-dev-harmony-fb", + "_where": "/Users/MB/git/pdfkit/node_modules/derequire", + "bin": { + "esparse": "./bin/esparse.js", + "esvalidate": "./bin/esvalidate.js" + }, + "bugs": { + "url": "https://github.com/facebook/esprima/issues" + }, + "dependencies": {}, + "description": "Facebook-specific fork of the esprima project", + "devDependencies": { + "complexity-report": "~0.6.1", + "eslint": "~0.1.0", + "istanbul": "~0.1.27", + "jslint": "~0.1.9", + "json-diff": "~0.3.1", + "regenerate": "~0.5.4", + "unicode-6.3.0": "~0.1.0" + }, + "directories": {}, + "dist": { + "shasum": "b77d37abcd38ea0b77426bb8bc2922ce6b426411", + "tarball": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-3001.0001.0000-dev-harmony-fb.tgz" + }, + "engines": { + "node": ">=0.4.0" + }, + "homepage": "https://github.com/facebook/esprima/tree/fb-harmony", + "licenses": [ + { + "type": "BSD", + "url": "http://github.com/facebook/esprima/raw/master/LICENSE.BSD" + } + ], + "main": "esprima.js", + "maintainers": [ + { + "name": "jeffmo", + "email": "jeff@anafx.com" + }, + { + "name": "zpao", + "email": "paul@oshannessy.com" + } + ], + "name": "esprima-fb", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/facebook/esprima.git" + }, + "scripts": { + "analyze-complexity": "node tools/list-complexity.js", + "analyze-coverage": "node node_modules/istanbul/lib/cli.js cover test/runner.js", + "benchmark": "node test/benchmarks.js", + "benchmark-quick": "node test/benchmarks.js quick", + "check-complexity": "node node_modules/complexity-report/src/cli.js --maxcc 31 --silent -l -w esprima.js", + "check-coverage": "node node_modules/istanbul/lib/cli.js check-coverage --statement -8 --branch -28 --function 99.69", + "complexity": "npm run-script analyze-complexity && npm run-script check-complexity", + "coverage": "npm run-script analyze-coverage && npm run-script check-coverage", + "lint": "node tools/check-version.js && node_modules/eslint/bin/eslint.js esprima.js && node_modules/jslint/bin/jslint.js esprima.js", + "test": "npm run-script lint && node test/run.js && npm run-script coverage && npm run-script complexity" + }, + "version": "3001.1.0-dev-harmony-fb" +} diff --git a/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/benchmarks.html b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/benchmarks.html new file mode 100644 index 00000000..1a196b61 --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/benchmarks.html @@ -0,0 +1,128 @@ + + + + + + + Esprima: Benchmarks + + + + + + + + + + + + +
    +
    +

    Benchmarks show the true speed

    +
    +
    + + +
    +
    + +

    + + +

    + +

    +
    Please wait...
    + +
    + +
    +
    +

    Note: On a modern machine and up-to-date web browsers, +the full benchmarks suite takes ~1 minute. +For the quick benchmarks, the running time is only ~15 seconds.

    +

    Version being tested: .

    +
    +

    Time measurement is carried out using Benchmark.js.

    +
    +
    + + + + + + + + + + + + diff --git a/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/benchmarks.js b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/benchmarks.js new file mode 100644 index 00000000..6ed60ae4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/benchmarks.js @@ -0,0 +1,334 @@ +/* + Copyright (C) 2012 Yusuke Suzuki + Copyright (C) 2011 Ariya Hidayat + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + + +/*jslint browser: true node: true */ +/*global load:true, print:true */ +var setupBenchmarks, + fullFixture, + quickFixture; + +fullFixture = [ + 'Underscore 1.4.1', + 'Backbone 0.9.2', + 'CodeMirror 2.34', + 'MooTools 1.4.1', + 'jQuery 1.8.2', + 'jQuery.Mobile 1.2.0', + 'Angular 1.0.2', + 'three.js r51' +]; + +quickFixture = [ + 'Backbone 0.9.2', + 'jQuery 1.8.2', + 'Angular 1.0.2' +]; + +function slug(name) { + 'use strict'; + return name.toLowerCase().replace(/\.js/g, 'js').replace(/\s/g, '-'); +} + +function kb(bytes) { + 'use strict'; + return (bytes / 1024).toFixed(1); +} + +if (typeof window !== 'undefined') { + // Run all tests in a browser environment. + setupBenchmarks = function () { + 'use strict'; + + function id(i) { + return document.getElementById(i); + } + + function setText(id, str) { + var el = document.getElementById(id); + if (typeof el.innerText === 'string') { + el.innerText = str; + } else { + el.textContent = str; + } + } + + function enableRunButtons() { + id('runquick').disabled = false; + id('runfull').disabled = false; + } + + function disableRunButtons() { + id('runquick').disabled = true; + id('runfull').disabled = true; + } + + function createTable() { + var str = '', + index, + test, + name; + + str += ''; + str += ''; + str += ''; + str += ''; + for (index = 0; index < fullFixture.length; index += 1) { + test = fullFixture[index]; + name = slug(test); + str += ''; + str += ''; + str += ''; + str += ''; + str += ''; + str += ''; + } + str += ''; + str += ''; + str += ''; + str += ''; + str += ''; + str += '
    SourceSize (KiB)Time (ms)Variance
    ' + test + '
    Total
    '; + + id('result').innerHTML = str; + } + + function loadTests() { + + var index = 0, + totalSize = 0; + + function load(test, callback) { + var xhr = new XMLHttpRequest(), + src = '3rdparty/' + test + '.js'; + + window.data = window.data || {}; + window.data[test] = ''; + + try { + xhr.timeout = 30000; + xhr.open('GET', src, true); + + xhr.ontimeout = function () { + setText('status', 'Error: time out while loading ' + test); + callback.apply(); + }; + + xhr.onreadystatechange = function () { + var success = false, + size = 0; + + if (this.readyState === XMLHttpRequest.DONE) { + if (this.status === 200) { + window.data[test] = this.responseText; + size = this.responseText.length; + totalSize += size; + success = true; + } + } + + if (success) { + setText(test + '-size', kb(size)); + } else { + setText('status', 'Please wait. Error loading ' + src); + setText(test + '-size', 'Error'); + } + + callback.apply(); + }; + + xhr.send(null); + } catch (e) { + setText('status', 'Please wait. Error loading ' + src); + callback.apply(); + } + } + + function loadNextTest() { + var test; + + if (index < fullFixture.length) { + test = fullFixture[index]; + index += 1; + setText('status', 'Please wait. Loading ' + test + + ' (' + index + ' of ' + fullFixture.length + ')'); + window.setTimeout(function () { + load(slug(test), loadNextTest); + }, 100); + } else { + setText('total-size', kb(totalSize)); + setText('status', 'Ready.'); + enableRunButtons(); + } + } + + loadNextTest(); + } + + function runBenchmarks(suite) { + + var index = 0, + totalTime = 0; + + function reset() { + var i, name; + for (i = 0; i < fullFixture.length; i += 1) { + name = slug(fullFixture[i]); + setText(name + '-time', ''); + setText(name + '-variance', ''); + } + setText('total-time', ''); + } + + function run() { + var el, test, source, benchmark; + + if (index >= suite.length) { + setText('total-time', (1000 * totalTime).toFixed(1)); + setText('status', 'Ready.'); + enableRunButtons(); + return; + } + + test = slug(suite[index]); + el = id(test); + source = window.data[test]; + setText(test + '-time', 'Running...'); + + // Force the result to be held in this array, thus defeating any + // possible "dead core elimination" optimization. + window.tree = []; + + benchmark = new window.Benchmark(test, function (o) { + var syntax = window.esprima.parse(source); + window.tree.push(syntax.body.length); + }, { + 'onComplete': function () { + setText(this.name + '-time', (1000 * this.stats.mean).toFixed(1)); + setText(this.name + '-variance', (1000 * this.stats.variance).toFixed(1)); + totalTime += this.stats.mean; + } + }); + + window.setTimeout(function () { + benchmark.run(); + index += 1; + window.setTimeout(run, 211); + }, 211); + } + + + disableRunButtons(); + setText('status', 'Please wait. Running benchmarks...'); + + reset(); + run(); + } + + id('runquick').onclick = function () { + runBenchmarks(quickFixture); + }; + + id('runfull').onclick = function () { + runBenchmarks(fullFixture); + }; + + setText('benchmarkjs-version', ' version ' + window.Benchmark.version); + setText('version', window.esprima.version); + + createTable(); + disableRunButtons(); + loadTests(); + }; +} else { + + (function (global) { + 'use strict'; + var Benchmark, + esprima, + dirname, + option, + fs, + readFileSync, + log; + + if (typeof require === 'undefined') { + dirname = 'test'; + load(dirname + '/3rdparty/benchmark.js'); + + load(dirname + '/../esprima.js'); + + Benchmark = global.Benchmark; + esprima = global.esprima; + readFileSync = global.read; + log = print; + } else { + Benchmark = require('./3rdparty/benchmark'); + esprima = require('../esprima'); + fs = require('fs'); + option = process.argv[2]; + readFileSync = function readFileSync(filename) { + return fs.readFileSync(filename, 'utf-8'); + }; + dirname = __dirname; + log = console.log.bind(console); + } + + function runTests(tests) { + var index, + tree = [], + totalTime = 0, + totalSize = 0; + + tests.reduce(function (suite, filename) { + var source = readFileSync(dirname + '/3rdparty/' + slug(filename) + '.js'), + size = source.length; + totalSize += size; + return suite.add(filename, function () { + var syntax = esprima.parse(source); + tree.push(syntax.body.length); + }, { + 'onComplete': function (event, bench) { + log(this.name + + ' size ' + kb(size) + + ' time ' + (1000 * this.stats.mean).toFixed(1) + + ' variance ' + (1000 * 1000 * this.stats.variance).toFixed(1)); + totalTime += this.stats.mean; + } + }); + }, new Benchmark.Suite()).on('complete', function () { + log('Total size ' + kb(totalSize) + + ' time ' + (1000 * totalTime).toFixed(1)); + }).run(); + } + + if (option === 'quick') { + runTests(quickFixture); + } else { + runTests(fullFixture); + } + }(this)); +} +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/compare.html b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/compare.html new file mode 100644 index 00000000..5176647f --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/compare.html @@ -0,0 +1,140 @@ + + + + + + + Esprima: Speed Comparisons + + + + + + + + + + + + + + + + + +
    +
    +

    Speed Comparison keeps everything in perspective

    +
    +
    + + +
    +
    + +

    +

    +

    + +

    Please wait...

    +

    +

    Warning: Since each parser may have a different format for the syntax tree, the speed is not fully comparable (the cost of constructing different result is obviously varying). These tests exist only to ensure that Esprima parser is not ridiculously slow compare to other parsers.

    + + +
    + +
    +
    + +

    More comparison variants will be added in the near future.

    +

    Esprima version: .

    +
    +

    parse-js is the parser used in UglifyJS v1. It's a JavaScript port of the Common LISP version. This test uses parse-js from UglifyJS version 1.3.2 (June 26 2012).

    + +

    Acorn is a compact stand-alone JavaScript parser. This test uses Acorn revision 48bbcd94 (dated Oct 19 2012).

    + +

    Time measurement is carried out using Benchmark.js.

    +
    +
    + + + + + + + + + + + + diff --git a/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/compare.js b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/compare.js new file mode 100644 index 00000000..62a5f444 --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/compare.js @@ -0,0 +1,328 @@ +/* + Copyright (C) 2012 Ariya Hidayat + Copyright (C) 2011 Ariya Hidayat + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*jslint browser: true node: true */ +/*global load:true, print:true */ +var setupBenchmarks, + parsers, + fixtureList, + suite; + +parsers = [ + 'Esprima', + 'parse-js', + 'Acorn' +]; + +fixtureList = [ + 'Underscore 1.4.1', + 'Backbone 0.9.2', + 'CodeMirror 2.34', + 'jQuery 1.8.2' +]; + +function slug(name) { + 'use strict'; + return name.toLowerCase().replace(/\.js/g, 'js').replace(/\s/g, '-'); +} + +function kb(bytes) { + 'use strict'; + return (bytes / 1024).toFixed(1); +} + +function inject(fname) { + 'use strict'; + var head = document.getElementsByTagName('head')[0], + script = document.createElement('script'); + + script.src = fname; + script.type = 'text/javascript'; + head.appendChild(script); +} + +if (typeof window !== 'undefined') { + + // Run all tests in a browser environment. + setupBenchmarks = function () { + 'use strict'; + + function id(i) { + return document.getElementById(i); + } + + function setText(id, str) { + var el = document.getElementById(id); + if (typeof el.innerText === 'string') { + el.innerText = str; + } else { + el.textContent = str; + } + } + + function enableRunButtons() { + id('run').disabled = false; + } + + function disableRunButtons() { + id('run').disabled = true; + } + + function createTable() { + var str = '', + i, + index, + test, + name; + + str += ''; + str += ''; + for (i = 0; i < parsers.length; i += 1) { + str += ''; + } + str += ''; + str += ''; + for (index = 0; index < fixtureList.length; index += 1) { + test = fixtureList[index]; + name = slug(test); + str += ''; + str += ''; + if (window.data && window.data[name]) { + str += ''; + } else { + str += ''; + } + for (i = 0; i < parsers.length; i += 1) { + str += ''; + } + str += ''; + } + str += ''; + str += ''; + for (i = 0; i < parsers.length; i += 1) { + str += ''; + } + str += ''; + str += ''; + str += '
    SourceSize (KiB)' + parsers[i] + '
    ' + test + '' + kb(window.data[name].length) + '
    Total
    '; + + id('result').innerHTML = str; + } + + function loadFixtures() { + + var index = 0, + totalSize = 0; + + function load(test, callback) { + var xhr = new XMLHttpRequest(), + src = '3rdparty/' + test + '.js'; + + window.data = window.data || {}; + window.data[test] = ''; + + try { + xhr.timeout = 30000; + xhr.open('GET', src, true); + + xhr.ontimeout = function () { + setText('status', 'Error: time out while loading ' + test); + callback.apply(); + }; + + xhr.onreadystatechange = function () { + var success = false, + size = 0; + + if (this.readyState === XMLHttpRequest.DONE) { + if (this.status === 200) { + window.data[test] = this.responseText; + size = this.responseText.length; + totalSize += size; + success = true; + } + } + + if (success) { + setText(test + '-size', kb(size)); + } else { + setText('status', 'Please wait. Error loading ' + src); + setText(test + '-size', 'Error'); + } + + callback.apply(); + }; + + xhr.send(null); + } catch (e) { + setText('status', 'Please wait. Error loading ' + src); + callback.apply(); + } + } + + function loadNextTest() { + var test; + + if (index < fixtureList.length) { + test = fixtureList[index]; + index += 1; + setText('status', 'Please wait. Loading ' + test + + ' (' + index + ' of ' + fixtureList.length + ')'); + window.setTimeout(function () { + load(slug(test), loadNextTest); + }, 100); + } else { + setText('total-size', kb(totalSize)); + setText('status', 'Ready.'); + enableRunButtons(); + } + } + + loadNextTest(); + } + + function setupParser() { + var i, j; + + suite = []; + for (i = 0; i < fixtureList.length; i += 1) { + for (j = 0; j < parsers.length; j += 1) { + suite.push({ + fixture: fixtureList[i], + parser: parsers[j] + }); + } + } + + createTable(); + } + + function runBenchmarks() { + + var index = 0, + totalTime = {}; + + function reset() { + var i, name; + for (i = 0; i < suite.length; i += 1) { + name = slug(suite[i].fixture) + '-' + slug(suite[i].parser); + setText(name + '-time', ''); + } + } + + function run() { + var fixture, parser, test, source, fn, benchmark; + + if (index >= suite.length) { + setText('status', 'Ready.'); + enableRunButtons(); + return; + } + + fixture = suite[index].fixture; + parser = suite[index].parser; + + source = window.data[slug(fixture)]; + + test = slug(fixture) + '-' + slug(parser); + setText(test + '-time', 'Running...'); + + setText('status', 'Please wait. Parsing ' + fixture + '...'); + + // Force the result to be held in this array, thus defeating any + // possible "dead code elimination" optimization. + window.tree = []; + + switch (parser) { + case 'Esprima': + fn = function () { + var syntax = window.esprima.parse(source); + window.tree.push(syntax.body.length); + }; + break; + + case 'parse-js': + fn = function () { + var syntax = window.parseJS.parse(source); + window.tree.push(syntax.length); + }; + break; + + case 'Acorn': + fn = function () { + var syntax = window.acorn.parse(source); + window.tree.push(syntax.body.length); + }; + break; + + default: + throw 'Unknown parser type ' + parser; + } + + benchmark = new window.Benchmark(test, fn, { + 'onComplete': function () { + setText(this.name + '-time', (1000 * this.stats.mean).toFixed(1)); + if (!totalTime[parser]) { + totalTime[parser] = this.stats.mean; + } else { + totalTime[parser] += this.stats.mean; + } + setText(slug(parser) + '-total', (1000 * totalTime[parser]).toFixed(1)); + } + }); + + window.setTimeout(function () { + benchmark.run(); + index += 1; + window.setTimeout(run, 211); + }, 211); + } + + + disableRunButtons(); + setText('status', 'Please wait. Running benchmarks...'); + + reset(); + run(); + } + + id('run').onclick = function () { + runBenchmarks(); + }; + + setText('benchmarkjs-version', ' version ' + window.Benchmark.version); + setText('version', window.esprima.version); + + setupParser(); + createTable(); + + disableRunButtons(); + loadFixtures(); + }; +} else { + // TODO + console.log('Not implemented yet!'); +} +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/compat.html b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/compat.html new file mode 100644 index 00000000..d9cd577c --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/compat.html @@ -0,0 +1,115 @@ + + + + + + + Esprima: Compatibility Tests + + + + + + + + + + + +
    +
    +

    Compatibility keeps everyone happy

    +
    +
    + + +
    +
    +
    +
    + +
    +
    Please wait...
    +
    +

    The following tests are to ensure that the syntax tree is compatible to +that produced by Mozilla SpiderMonkey + Parser reflection.

    +

    Version being tested: .

    +
    +
    +
    + + + + + + + + + + + diff --git a/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/compat.js b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/compat.js new file mode 100644 index 00000000..d9b05240 --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/compat.js @@ -0,0 +1,241 @@ +/* + Copyright (C) 2012 Joost-Wim Boekesteijn + Copyright (C) 2011 Ariya Hidayat + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*jslint node: true */ +/*global document: true, window:true, esprima: true, testReflect: true */ + +var runTests; + +function getContext(esprima, reportCase, reportFailure) { + 'use strict'; + + var Reflect, Pattern; + + // Maps Mozilla Reflect object to our Esprima parser. + Reflect = { + parse: function (code) { + var result; + + reportCase(code); + + try { + result = esprima.parse(code); + } catch (error) { + result = error; + } + + return result; + } + }; + + // This is used by Reflect test suite to match a syntax tree. + Pattern = function (obj) { + var pattern; + + // Poor man's deep object cloning. + pattern = JSON.parse(JSON.stringify(obj)); + + // Special handling for regular expression literal since we need to + // convert it to a string literal, otherwise it will be decoded + // as object "{}" and the regular expression would be lost. + if (obj.type && obj.type === 'Literal') { + if (obj.value instanceof RegExp) { + pattern = { + type: obj.type, + value: obj.value.toString() + }; + } + } + + // Special handling for branch statement because SpiderMonkey + // prefers to put the 'alternate' property before 'consequent'. + if (obj.type && obj.type === 'IfStatement') { + pattern = { + type: pattern.type, + test: pattern.test, + consequent: pattern.consequent, + alternate: pattern.alternate + }; + } + + // Special handling for do while statement because SpiderMonkey + // prefers to put the 'test' property before 'body'. + if (obj.type && obj.type === 'DoWhileStatement') { + pattern = { + type: pattern.type, + body: pattern.body, + test: pattern.test + }; + } + + function adjustRegexLiteralAndRaw(key, value) { + if (key === 'value' && value instanceof RegExp) { + value = value.toString(); + } else if (key === 'raw' && typeof value === "string") { + // Ignore Esprima-specific 'raw' property. + return undefined; + } + return value; + } + + if (obj.type && (obj.type === 'Program')) { + pattern.assert = function (tree) { + var actual, expected; + actual = JSON.stringify(tree, adjustRegexLiteralAndRaw, 4); + expected = JSON.stringify(obj, null, 4); + + if (expected !== actual) { + reportFailure(expected, actual); + } + }; + } + + return pattern; + }; + + return { + Reflect: Reflect, + Pattern: Pattern + }; +} + +if (typeof window !== 'undefined') { + // Run all tests in a browser environment. + runTests = function () { + 'use strict'; + + var total = 0, + failures = 0; + + function setText(el, str) { + if (typeof el.innerText === 'string') { + el.innerText = str; + } else { + el.textContent = str; + } + } + + function reportCase(code) { + var report, e; + report = document.getElementById('report'); + e = document.createElement('pre'); + e.setAttribute('class', 'code'); + setText(e, code); + report.appendChild(e); + total += 1; + } + + function reportFailure(expected, actual) { + var report, e; + + failures += 1; + + report = document.getElementById('report'); + + e = document.createElement('p'); + setText(e, 'Expected'); + report.appendChild(e); + + e = document.createElement('pre'); + e.setAttribute('class', 'expected'); + setText(e, expected); + report.appendChild(e); + + e = document.createElement('p'); + setText(e, 'Actual'); + report.appendChild(e); + + e = document.createElement('pre'); + e.setAttribute('class', 'actual'); + setText(e, actual); + report.appendChild(e); + } + + setText(document.getElementById('version'), esprima.version); + + window.setTimeout(function () { + var tick, context = getContext(esprima, reportCase, reportFailure); + + tick = new Date(); + testReflect(context.Reflect, context.Pattern); + tick = (new Date()) - tick; + + if (failures > 0) { + document.getElementById('status').className = 'alert-box alert'; + setText(document.getElementById('status'), total + ' tests. ' + + 'Failures: ' + failures + '. ' + tick + ' ms'); + } else { + document.getElementById('status').className = 'alert-box success'; + setText(document.getElementById('status'), total + ' tests. ' + + 'No failure. ' + tick + ' ms'); + } + }, 11); + }; +} else { + (function (global) { + 'use strict'; + var esprima = require('../esprima'), + tick, + total = 0, + failures = [], + header, + current, + context; + + function reportCase(code) { + total += 1; + current = code; + } + + function reportFailure(expected, actual) { + failures.push({ + source: current, + expected: expected.toString(), + actual: actual.toString() + }); + } + + context = getContext(esprima, reportCase, reportFailure); + + tick = new Date(); + require('./reflect').testReflect(context.Reflect, context.Pattern); + tick = (new Date()) - tick; + + header = total + ' tests. ' + failures.length + ' failures. ' + + tick + ' ms'; + if (failures.length) { + console.error(header); + failures.forEach(function (failure) { + console.error(failure.source + ': Expected\n ' + + failure.expected.split('\n').join('\n ') + + '\nto match\n ' + failure.actual); + }); + } else { + console.log(header); + } + process.exit(failures.length === 0 ? 0 : 1); + }(this)); +} +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/coverage.html b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/coverage.html new file mode 100644 index 00000000..d5075939 --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/coverage.html @@ -0,0 +1,110 @@ + + + + + + + Esprima: Unit Tests + + + + + + + + + + + + +
    +
    +

    Coverage Analysis ensures systematic exercise of the parser

    +
    +
    + + +
    +
    +

    Note: This is not a live (in-browser) code coverage report. +The analysis is offline +(using Istanbul).

    + + +
    +
    + + + + + + + + + + + diff --git a/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/esprima.js.html b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/esprima.js.html new file mode 100644 index 00000000..e7f00f54 --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/esprima.js.html @@ -0,0 +1,11752 @@ + + + + Code coverage report for esprima/esprima.js + + + + + + + + +
    +

    Code coverage report for esprima/esprima.js

    +

    + + Statements: 99.72% (1760 / 1765)      + + + Branches: 98.49% (1107 / 1124)      + + + Functions: 100% (154 / 154)      + + + Lines: 99.72% (1760 / 1765)      + +

    +
    +
    +
    
    +
    +
    1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +319 +320 +321 +322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 +431 +432 +433 +434 +435 +436 +437 +438 +439 +440 +441 +442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462 +463 +464 +465 +466 +467 +468 +469 +470 +471 +472 +473 +474 +475 +476 +477 +478 +479 +480 +481 +482 +483 +484 +485 +486 +487 +488 +489 +490 +491 +492 +493 +494 +495 +496 +497 +498 +499 +500 +501 +502 +503 +504 +505 +506 +507 +508 +509 +510 +511 +512 +513 +514 +515 +516 +517 +518 +519 +520 +521 +522 +523 +524 +525 +526 +527 +528 +529 +530 +531 +532 +533 +534 +535 +536 +537 +538 +539 +540 +541 +542 +543 +544 +545 +546 +547 +548 +549 +550 +551 +552 +553 +554 +555 +556 +557 +558 +559 +560 +561 +562 +563 +564 +565 +566 +567 +568 +569 +570 +571 +572 +573 +574 +575 +576 +577 +578 +579 +580 +581 +582 +583 +584 +585 +586 +587 +588 +589 +590 +591 +592 +593 +594 +595 +596 +597 +598 +599 +600 +601 +602 +603 +604 +605 +606 +607 +608 +609 +610 +611 +612 +613 +614 +615 +616 +617 +618 +619 +620 +621 +622 +623 +624 +625 +626 +627 +628 +629 +630 +631 +632 +633 +634 +635 +636 +637 +638 +639 +640 +641 +642 +643 +644 +645 +646 +647 +648 +649 +650 +651 +652 +653 +654 +655 +656 +657 +658 +659 +660 +661 +662 +663 +664 +665 +666 +667 +668 +669 +670 +671 +672 +673 +674 +675 +676 +677 +678 +679 +680 +681 +682 +683 +684 +685 +686 +687 +688 +689 +690 +691 +692 +693 +694 +695 +696 +697 +698 +699 +700 +701 +702 +703 +704 +705 +706 +707 +708 +709 +710 +711 +712 +713 +714 +715 +716 +717 +718 +719 +720 +721 +722 +723 +724 +725 +726 +727 +728 +729 +730 +731 +732 +733 +734 +735 +736 +737 +738 +739 +740 +741 +742 +743 +744 +745 +746 +747 +748 +749 +750 +751 +752 +753 +754 +755 +756 +757 +758 +759 +760 +761 +762 +763 +764 +765 +766 +767 +768 +769 +770 +771 +772 +773 +774 +775 +776 +777 +778 +779 +780 +781 +782 +783 +784 +785 +786 +787 +788 +789 +790 +791 +792 +793 +794 +795 +796 +797 +798 +799 +800 +801 +802 +803 +804 +805 +806 +807 +808 +809 +810 +811 +812 +813 +814 +815 +816 +817 +818 +819 +820 +821 +822 +823 +824 +825 +826 +827 +828 +829 +830 +831 +832 +833 +834 +835 +836 +837 +838 +839 +840 +841 +842 +843 +844 +845 +846 +847 +848 +849 +850 +851 +852 +853 +854 +855 +856 +857 +858 +859 +860 +861 +862 +863 +864 +865 +866 +867 +868 +869 +870 +871 +872 +873 +874 +875 +876 +877 +878 +879 +880 +881 +882 +883 +884 +885 +886 +887 +888 +889 +890 +891 +892 +893 +894 +895 +896 +897 +898 +899 +900 +901 +902 +903 +904 +905 +906 +907 +908 +909 +910 +911 +912 +913 +914 +915 +916 +917 +918 +919 +920 +921 +922 +923 +924 +925 +926 +927 +928 +929 +930 +931 +932 +933 +934 +935 +936 +937 +938 +939 +940 +941 +942 +943 +944 +945 +946 +947 +948 +949 +950 +951 +952 +953 +954 +955 +956 +957 +958 +959 +960 +961 +962 +963 +964 +965 +966 +967 +968 +969 +970 +971 +972 +973 +974 +975 +976 +977 +978 +979 +980 +981 +982 +983 +984 +985 +986 +987 +988 +989 +990 +991 +992 +993 +994 +995 +996 +997 +998 +999 +1000 +1001 +1002 +1003 +1004 +1005 +1006 +1007 +1008 +1009 +1010 +1011 +1012 +1013 +1014 +1015 +1016 +1017 +1018 +1019 +1020 +1021 +1022 +1023 +1024 +1025 +1026 +1027 +1028 +1029 +1030 +1031 +1032 +1033 +1034 +1035 +1036 +1037 +1038 +1039 +1040 +1041 +1042 +1043 +1044 +1045 +1046 +1047 +1048 +1049 +1050 +1051 +1052 +1053 +1054 +1055 +1056 +1057 +1058 +1059 +1060 +1061 +1062 +1063 +1064 +1065 +1066 +1067 +1068 +1069 +1070 +1071 +1072 +1073 +1074 +1075 +1076 +1077 +1078 +1079 +1080 +1081 +1082 +1083 +1084 +1085 +1086 +1087 +1088 +1089 +1090 +1091 +1092 +1093 +1094 +1095 +1096 +1097 +1098 +1099 +1100 +1101 +1102 +1103 +1104 +1105 +1106 +1107 +1108 +1109 +1110 +1111 +1112 +1113 +1114 +1115 +1116 +1117 +1118 +1119 +1120 +1121 +1122 +1123 +1124 +1125 +1126 +1127 +1128 +1129 +1130 +1131 +1132 +1133 +1134 +1135 +1136 +1137 +1138 +1139 +1140 +1141 +1142 +1143 +1144 +1145 +1146 +1147 +1148 +1149 +1150 +1151 +1152 +1153 +1154 +1155 +1156 +1157 +1158 +1159 +1160 +1161 +1162 +1163 +1164 +1165 +1166 +1167 +1168 +1169 +1170 +1171 +1172 +1173 +1174 +1175 +1176 +1177 +1178 +1179 +1180 +1181 +1182 +1183 +1184 +1185 +1186 +1187 +1188 +1189 +1190 +1191 +1192 +1193 +1194 +1195 +1196 +1197 +1198 +1199 +1200 +1201 +1202 +1203 +1204 +1205 +1206 +1207 +1208 +1209 +1210 +1211 +1212 +1213 +1214 +1215 +1216 +1217 +1218 +1219 +1220 +1221 +1222 +1223 +1224 +1225 +1226 +1227 +1228 +1229 +1230 +1231 +1232 +1233 +1234 +1235 +1236 +1237 +1238 +1239 +1240 +1241 +1242 +1243 +1244 +1245 +1246 +1247 +1248 +1249 +1250 +1251 +1252 +1253 +1254 +1255 +1256 +1257 +1258 +1259 +1260 +1261 +1262 +1263 +1264 +1265 +1266 +1267 +1268 +1269 +1270 +1271 +1272 +1273 +1274 +1275 +1276 +1277 +1278 +1279 +1280 +1281 +1282 +1283 +1284 +1285 +1286 +1287 +1288 +1289 +1290 +1291 +1292 +1293 +1294 +1295 +1296 +1297 +1298 +1299 +1300 +1301 +1302 +1303 +1304 +1305 +1306 +1307 +1308 +1309 +1310 +1311 +1312 +1313 +1314 +1315 +1316 +1317 +1318 +1319 +1320 +1321 +1322 +1323 +1324 +1325 +1326 +1327 +1328 +1329 +1330 +1331 +1332 +1333 +1334 +1335 +1336 +1337 +1338 +1339 +1340 +1341 +1342 +1343 +1344 +1345 +1346 +1347 +1348 +1349 +1350 +1351 +1352 +1353 +1354 +1355 +1356 +1357 +1358 +1359 +1360 +1361 +1362 +1363 +1364 +1365 +1366 +1367 +1368 +1369 +1370 +1371 +1372 +1373 +1374 +1375 +1376 +1377 +1378 +1379 +1380 +1381 +1382 +1383 +1384 +1385 +1386 +1387 +1388 +1389 +1390 +1391 +1392 +1393 +1394 +1395 +1396 +1397 +1398 +1399 +1400 +1401 +1402 +1403 +1404 +1405 +1406 +1407 +1408 +1409 +1410 +1411 +1412 +1413 +1414 +1415 +1416 +1417 +1418 +1419 +1420 +1421 +1422 +1423 +1424 +1425 +1426 +1427 +1428 +1429 +1430 +1431 +1432 +1433 +1434 +1435 +1436 +1437 +1438 +1439 +1440 +1441 +1442 +1443 +1444 +1445 +1446 +1447 +1448 +1449 +1450 +1451 +1452 +1453 +1454 +1455 +1456 +1457 +1458 +1459 +1460 +1461 +1462 +1463 +1464 +1465 +1466 +1467 +1468 +1469 +1470 +1471 +1472 +1473 +1474 +1475 +1476 +1477 +1478 +1479 +1480 +1481 +1482 +1483 +1484 +1485 +1486 +1487 +1488 +1489 +1490 +1491 +1492 +1493 +1494 +1495 +1496 +1497 +1498 +1499 +1500 +1501 +1502 +1503 +1504 +1505 +1506 +1507 +1508 +1509 +1510 +1511 +1512 +1513 +1514 +1515 +1516 +1517 +1518 +1519 +1520 +1521 +1522 +1523 +1524 +1525 +1526 +1527 +1528 +1529 +1530 +1531 +1532 +1533 +1534 +1535 +1536 +1537 +1538 +1539 +1540 +1541 +1542 +1543 +1544 +1545 +1546 +1547 +1548 +1549 +1550 +1551 +1552 +1553 +1554 +1555 +1556 +1557 +1558 +1559 +1560 +1561 +1562 +1563 +1564 +1565 +1566 +1567 +1568 +1569 +1570 +1571 +1572 +1573 +1574 +1575 +1576 +1577 +1578 +1579 +1580 +1581 +1582 +1583 +1584 +1585 +1586 +1587 +1588 +1589 +1590 +1591 +1592 +1593 +1594 +1595 +1596 +1597 +1598 +1599 +1600 +1601 +1602 +1603 +1604 +1605 +1606 +1607 +1608 +1609 +1610 +1611 +1612 +1613 +1614 +1615 +1616 +1617 +1618 +1619 +1620 +1621 +1622 +1623 +1624 +1625 +1626 +1627 +1628 +1629 +1630 +1631 +1632 +1633 +1634 +1635 +1636 +1637 +1638 +1639 +1640 +1641 +1642 +1643 +1644 +1645 +1646 +1647 +1648 +1649 +1650 +1651 +1652 +1653 +1654 +1655 +1656 +1657 +1658 +1659 +1660 +1661 +1662 +1663 +1664 +1665 +1666 +1667 +1668 +1669 +1670 +1671 +1672 +1673 +1674 +1675 +1676 +1677 +1678 +1679 +1680 +1681 +1682 +1683 +1684 +1685 +1686 +1687 +1688 +1689 +1690 +1691 +1692 +1693 +1694 +1695 +1696 +1697 +1698 +1699 +1700 +1701 +1702 +1703 +1704 +1705 +1706 +1707 +1708 +1709 +1710 +1711 +1712 +1713 +1714 +1715 +1716 +1717 +1718 +1719 +1720 +1721 +1722 +1723 +1724 +1725 +1726 +1727 +1728 +1729 +1730 +1731 +1732 +1733 +1734 +1735 +1736 +1737 +1738 +1739 +1740 +1741 +1742 +1743 +1744 +1745 +1746 +1747 +1748 +1749 +1750 +1751 +1752 +1753 +1754 +1755 +1756 +1757 +1758 +1759 +1760 +1761 +1762 +1763 +1764 +1765 +1766 +1767 +1768 +1769 +1770 +1771 +1772 +1773 +1774 +1775 +1776 +1777 +1778 +1779 +1780 +1781 +1782 +1783 +1784 +1785 +1786 +1787 +1788 +1789 +1790 +1791 +1792 +1793 +1794 +1795 +1796 +1797 +1798 +1799 +1800 +1801 +1802 +1803 +1804 +1805 +1806 +1807 +1808 +1809 +1810 +1811 +1812 +1813 +1814 +1815 +1816 +1817 +1818 +1819 +1820 +1821 +1822 +1823 +1824 +1825 +1826 +1827 +1828 +1829 +1830 +1831 +1832 +1833 +1834 +1835 +1836 +1837 +1838 +1839 +1840 +1841 +1842 +1843 +1844 +1845 +1846 +1847 +1848 +1849 +1850 +1851 +1852 +1853 +1854 +1855 +1856 +1857 +1858 +1859 +1860 +1861 +1862 +1863 +1864 +1865 +1866 +1867 +1868 +1869 +1870 +1871 +1872 +1873 +1874 +1875 +1876 +1877 +1878 +1879 +1880 +1881 +1882 +1883 +1884 +1885 +1886 +1887 +1888 +1889 +1890 +1891 +1892 +1893 +1894 +1895 +1896 +1897 +1898 +1899 +1900 +1901 +1902 +1903 +1904 +1905 +1906 +1907 +1908 +1909 +1910 +1911 +1912 +1913 +1914 +1915 +1916 +1917 +1918 +1919 +1920 +1921 +1922 +1923 +1924 +1925 +1926 +1927 +1928 +1929 +1930 +1931 +1932 +1933 +1934 +1935 +1936 +1937 +1938 +1939 +1940 +1941 +1942 +1943 +1944 +1945 +1946 +1947 +1948 +1949 +1950 +1951 +1952 +1953 +1954 +1955 +1956 +1957 +1958 +1959 +1960 +1961 +1962 +1963 +1964 +1965 +1966 +1967 +1968 +1969 +1970 +1971 +1972 +1973 +1974 +1975 +1976 +1977 +1978 +1979 +1980 +1981 +1982 +1983 +1984 +1985 +1986 +1987 +1988 +1989 +1990 +1991 +1992 +1993 +1994 +1995 +1996 +1997 +1998 +1999 +2000 +2001 +2002 +2003 +2004 +2005 +2006 +2007 +2008 +2009 +2010 +2011 +2012 +2013 +2014 +2015 +2016 +2017 +2018 +2019 +2020 +2021 +2022 +2023 +2024 +2025 +2026 +2027 +2028 +2029 +2030 +2031 +2032 +2033 +2034 +2035 +2036 +2037 +2038 +2039 +2040 +2041 +2042 +2043 +2044 +2045 +2046 +2047 +2048 +2049 +2050 +2051 +2052 +2053 +2054 +2055 +2056 +2057 +2058 +2059 +2060 +2061 +2062 +2063 +2064 +2065 +2066 +2067 +2068 +2069 +2070 +2071 +2072 +2073 +2074 +2075 +2076 +2077 +2078 +2079 +2080 +2081 +2082 +2083 +2084 +2085 +2086 +2087 +2088 +2089 +2090 +2091 +2092 +2093 +2094 +2095 +2096 +2097 +2098 +2099 +2100 +2101 +2102 +2103 +2104 +2105 +2106 +2107 +2108 +2109 +2110 +2111 +2112 +2113 +2114 +2115 +2116 +2117 +2118 +2119 +2120 +2121 +2122 +2123 +2124 +2125 +2126 +2127 +2128 +2129 +2130 +2131 +2132 +2133 +2134 +2135 +2136 +2137 +2138 +2139 +2140 +2141 +2142 +2143 +2144 +2145 +2146 +2147 +2148 +2149 +2150 +2151 +2152 +2153 +2154 +2155 +2156 +2157 +2158 +2159 +2160 +2161 +2162 +2163 +2164 +2165 +2166 +2167 +2168 +2169 +2170 +2171 +2172 +2173 +2174 +2175 +2176 +2177 +2178 +2179 +2180 +2181 +2182 +2183 +2184 +2185 +2186 +2187 +2188 +2189 +2190 +2191 +2192 +2193 +2194 +2195 +2196 +2197 +2198 +2199 +2200 +2201 +2202 +2203 +2204 +2205 +2206 +2207 +2208 +2209 +2210 +2211 +2212 +2213 +2214 +2215 +2216 +2217 +2218 +2219 +2220 +2221 +2222 +2223 +2224 +2225 +2226 +2227 +2228 +2229 +2230 +2231 +2232 +2233 +2234 +2235 +2236 +2237 +2238 +2239 +2240 +2241 +2242 +2243 +2244 +2245 +2246 +2247 +2248 +2249 +2250 +2251 +2252 +2253 +2254 +2255 +2256 +2257 +2258 +2259 +2260 +2261 +2262 +2263 +2264 +2265 +2266 +2267 +2268 +2269 +2270 +2271 +2272 +2273 +2274 +2275 +2276 +2277 +2278 +2279 +2280 +2281 +2282 +2283 +2284 +2285 +2286 +2287 +2288 +2289 +2290 +2291 +2292 +2293 +2294 +2295 +2296 +2297 +2298 +2299 +2300 +2301 +2302 +2303 +2304 +2305 +2306 +2307 +2308 +2309 +2310 +2311 +2312 +2313 +2314 +2315 +2316 +2317 +2318 +2319 +2320 +2321 +2322 +2323 +2324 +2325 +2326 +2327 +2328 +2329 +2330 +2331 +2332 +2333 +2334 +2335 +2336 +2337 +2338 +2339 +2340 +2341 +2342 +2343 +2344 +2345 +2346 +2347 +2348 +2349 +2350 +2351 +2352 +2353 +2354 +2355 +2356 +2357 +2358 +2359 +2360 +2361 +2362 +2363 +2364 +2365 +2366 +2367 +2368 +2369 +2370 +2371 +2372 +2373 +2374 +2375 +2376 +2377 +2378 +2379 +2380 +2381 +2382 +2383 +2384 +2385 +2386 +2387 +2388 +2389 +2390 +2391 +2392 +2393 +2394 +2395 +2396 +2397 +2398 +2399 +2400 +2401 +2402 +2403 +2404 +2405 +2406 +2407 +2408 +2409 +2410 +2411 +2412 +2413 +2414 +2415 +2416 +2417 +2418 +2419 +2420 +2421 +2422 +2423 +2424 +2425 +2426 +2427 +2428 +2429 +2430 +2431 +2432 +2433 +2434 +2435 +2436 +2437 +2438 +2439 +2440 +2441 +2442 +2443 +2444 +2445 +2446 +2447 +2448 +2449 +2450 +2451 +2452 +2453 +2454 +2455 +2456 +2457 +2458 +2459 +2460 +2461 +2462 +2463 +2464 +2465 +2466 +2467 +2468 +2469 +2470 +2471 +2472 +2473 +2474 +2475 +2476 +2477 +2478 +2479 +2480 +2481 +2482 +2483 +2484 +2485 +2486 +2487 +2488 +2489 +2490 +2491 +2492 +2493 +2494 +2495 +2496 +2497 +2498 +2499 +2500 +2501 +2502 +2503 +2504 +2505 +2506 +2507 +2508 +2509 +2510 +2511 +2512 +2513 +2514 +2515 +2516 +2517 +2518 +2519 +2520 +2521 +2522 +2523 +2524 +2525 +2526 +2527 +2528 +2529 +2530 +2531 +2532 +2533 +2534 +2535 +2536 +2537 +2538 +2539 +2540 +2541 +2542 +2543 +2544 +2545 +2546 +2547 +2548 +2549 +2550 +2551 +2552 +2553 +2554 +2555 +2556 +2557 +2558 +2559 +2560 +2561 +2562 +2563 +2564 +2565 +2566 +2567 +2568 +2569 +2570 +2571 +2572 +2573 +2574 +2575 +2576 +2577 +2578 +2579 +2580 +2581 +2582 +2583 +2584 +2585 +2586 +2587 +2588 +2589 +2590 +2591 +2592 +2593 +2594 +2595 +2596 +2597 +2598 +2599 +2600 +2601 +2602 +2603 +2604 +2605 +2606 +2607 +2608 +2609 +2610 +2611 +2612 +2613 +2614 +2615 +2616 +2617 +2618 +2619 +2620 +2621 +2622 +2623 +2624 +2625 +2626 +2627 +2628 +2629 +2630 +2631 +2632 +2633 +2634 +2635 +2636 +2637 +2638 +2639 +2640 +2641 +2642 +2643 +2644 +2645 +2646 +2647 +2648 +2649 +2650 +2651 +2652 +2653 +2654 +2655 +2656 +2657 +2658 +2659 +2660 +2661 +2662 +2663 +2664 +2665 +2666 +2667 +2668 +2669 +2670 +2671 +2672 +2673 +2674 +2675 +2676 +2677 +2678 +2679 +2680 +2681 +2682 +2683 +2684 +2685 +2686 +2687 +2688 +2689 +2690 +2691 +2692 +2693 +2694 +2695 +2696 +2697 +2698 +2699 +2700 +2701 +2702 +2703 +2704 +2705 +2706 +2707 +2708 +2709 +2710 +2711 +2712 +2713 +2714 +2715 +2716 +2717 +2718 +2719 +2720 +2721 +2722 +2723 +2724 +2725 +2726 +2727 +2728 +2729 +2730 +2731 +2732 +2733 +2734 +2735 +2736 +2737 +2738 +2739 +2740 +2741 +2742 +2743 +2744 +2745 +2746 +2747 +2748 +2749 +2750 +2751 +2752 +2753 +2754 +2755 +2756 +2757 +2758 +2759 +2760 +2761 +2762 +2763 +2764 +2765 +2766 +2767 +2768 +2769 +2770 +2771 +2772 +2773 +2774 +2775 +2776 +2777 +2778 +2779 +2780 +2781 +2782 +2783 +2784 +2785 +2786 +2787 +2788 +2789 +2790 +2791 +2792 +2793 +2794 +2795 +2796 +2797 +2798 +2799 +2800 +2801 +2802 +2803 +2804 +2805 +2806 +2807 +2808 +2809 +2810 +2811 +2812 +2813 +2814 +2815 +2816 +2817 +2818 +2819 +2820 +2821 +2822 +2823 +2824 +2825 +2826 +2827 +2828 +2829 +2830 +2831 +2832 +2833 +2834 +2835 +2836 +2837 +2838 +2839 +2840 +2841 +2842 +2843 +2844 +2845 +2846 +2847 +2848 +2849 +2850 +2851 +2852 +2853 +2854 +2855 +2856 +2857 +2858 +2859 +2860 +2861 +2862 +2863 +2864 +2865 +2866 +2867 +2868 +2869 +2870 +2871 +2872 +2873 +2874 +2875 +2876 +2877 +2878 +2879 +2880 +2881 +2882 +2883 +2884 +2885 +2886 +2887 +2888 +2889 +2890 +2891 +2892 +2893 +2894 +2895 +2896 +2897 +2898 +2899 +2900 +2901 +2902 +2903 +2904 +2905 +2906 +2907 +2908 +2909 +2910 +2911 +2912 +2913 +2914 +2915 +2916 +2917 +2918 +2919 +2920 +2921 +2922 +2923 +2924 +2925 +2926 +2927 +2928 +2929 +2930 +2931 +2932 +2933 +2934 +2935 +2936 +2937 +2938 +2939 +2940 +2941 +2942 +2943 +2944 +2945 +2946 +2947 +2948 +2949 +2950 +2951 +2952 +2953 +2954 +2955 +2956 +2957 +2958 +2959 +2960 +2961 +2962 +2963 +2964 +2965 +2966 +2967 +2968 +2969 +2970 +2971 +2972 +2973 +2974 +2975 +2976 +2977 +2978 +2979 +2980 +2981 +2982 +2983 +2984 +2985 +2986 +2987 +2988 +2989 +2990 +2991 +2992 +2993 +2994 +2995 +2996 +2997 +2998 +2999 +3000 +3001 +3002 +3003 +3004 +3005 +3006 +3007 +3008 +3009 +3010 +3011 +3012 +3013 +3014 +3015 +3016 +3017 +3018 +3019 +3020 +3021 +3022 +3023 +3024 +3025 +3026 +3027 +3028 +3029 +3030 +3031 +3032 +3033 +3034 +3035 +3036 +3037 +3038 +3039 +3040 +3041 +3042 +3043 +3044 +3045 +3046 +3047 +3048 +3049 +3050 +3051 +3052 +3053 +3054 +3055 +3056 +3057 +3058 +3059 +3060 +3061 +3062 +3063 +3064 +3065 +3066 +3067 +3068 +3069 +3070 +3071 +3072 +3073 +3074 +3075 +3076 +3077 +3078 +3079 +3080 +3081 +3082 +3083 +3084 +3085 +3086 +3087 +3088 +3089 +3090 +3091 +3092 +3093 +3094 +3095 +3096 +3097 +3098 +3099 +3100 +3101 +3102 +3103 +3104 +3105 +3106 +3107 +3108 +3109 +3110 +3111 +3112 +3113 +3114 +3115 +3116 +3117 +3118 +3119 +3120 +3121 +3122 +3123 +3124 +3125 +3126 +3127 +3128 +3129 +3130 +3131 +3132 +3133 +3134 +3135 +3136 +3137 +3138 +3139 +3140 +3141 +3142 +3143 +3144 +3145 +3146 +3147 +3148 +3149 +3150 +3151 +3152 +3153 +3154 +3155 +3156 +3157 +3158 +3159 +3160 +3161 +3162 +3163 +3164 +3165 +3166 +3167 +3168 +3169 +3170 +3171 +3172 +3173 +3174 +3175 +3176 +3177 +3178 +3179 +3180 +3181 +3182 +3183 +3184 +3185 +3186 +3187 +3188 +3189 +3190 +3191 +3192 +3193 +3194 +3195 +3196 +3197 +3198 +3199 +3200 +3201 +3202 +3203 +3204 +3205 +3206 +3207 +3208 +3209 +3210 +3211 +3212 +3213 +3214 +3215 +3216 +3217 +3218 +3219 +3220 +3221 +3222 +3223 +3224 +3225 +3226 +3227 +3228 +3229 +3230 +3231 +3232 +3233 +3234 +3235 +3236 +3237 +3238 +3239 +3240 +3241 +3242 +3243 +3244 +3245 +3246 +3247 +3248 +3249 +3250 +3251 +3252 +3253 +3254 +3255 +3256 +3257 +3258 +3259 +3260 +3261 +3262 +3263 +3264 +3265 +3266 +3267 +3268 +3269 +3270 +3271 +3272 +3273 +3274 +3275 +3276 +3277 +3278 +3279 +3280 +3281 +3282 +3283 +3284 +3285 +3286 +3287 +3288 +3289 +3290 +3291 +3292 +3293 +3294 +3295 +3296 +3297 +3298 +3299 +3300 +3301 +3302 +3303 +3304 +3305 +3306 +3307 +3308 +3309 +3310 +3311 +3312 +3313 +3314 +3315 +3316 +3317 +3318 +3319 +3320 +3321 +3322 +3323 +3324 +3325 +3326 +3327 +3328 +3329 +3330 +3331 +3332 +3333 +3334 +3335 +3336 +3337 +3338 +3339 +3340 +3341 +3342 +3343 +3344 +3345 +3346 +3347 +3348 +3349 +3350 +3351 +3352 +3353 +3354 +3355 +3356 +3357 +3358 +3359 +3360 +3361 +3362 +3363 +3364 +3365 +3366 +3367 +3368 +3369 +3370 +3371 +3372 +3373 +3374 +3375 +3376 +3377 +3378 +3379 +3380 +3381 +3382 +3383 +3384 +3385 +3386 +3387 +3388 +3389 +3390 +3391 +3392 +3393 +3394 +3395 +3396 +3397 +3398 +3399 +3400 +3401 +3402 +3403 +3404 +3405 +3406 +3407 +3408 +3409 +3410 +3411 +3412 +3413 +3414 +3415 +3416 +3417 +3418 +3419 +3420 +3421 +3422 +3423 +3424 +3425 +3426 +3427 +3428 +3429 +3430 +3431 +3432 +3433 +3434 +3435 +3436 +3437 +3438 +3439 +3440 +3441 +3442 +3443 +3444 +3445 +3446 +3447 +3448 +3449 +3450 +3451 +3452 +3453 +3454 +3455 +3456 +3457 +3458 +3459 +3460 +3461 +3462 +3463 +3464 +3465 +3466 +3467 +3468 +3469 +3470 +3471 +3472 +3473 +3474 +3475 +3476 +3477 +3478 +3479 +3480 +3481 +3482 +3483 +3484 +3485 +3486 +3487 +3488 +3489 +3490 +3491 +3492 +3493 +3494 +3495 +3496 +3497 +3498 +3499 +3500 +3501 +3502 +3503 +3504 +3505 +3506 +3507 +3508 +3509 +3510 +3511 +3512 +3513 +3514 +3515 +3516 +3517 +3518 +3519 +3520 +3521 +3522 +3523 +3524 +3525 +3526 +3527 +3528 +3529 +3530 +3531 +3532 +3533 +3534 +3535 +3536 +3537 +3538 +3539 +3540 +3541 +3542 +3543 +3544 +3545 +3546 +3547 +3548 +3549 +3550 +3551 +3552 +3553 +3554 +3555 +3556 +3557 +3558 +3559 +3560 +3561 +3562 +3563 +3564 +3565 +3566 +3567 +3568 +3569 +3570 +3571 +3572 +3573 +3574 +3575 +3576 +3577 +3578 +3579 +3580 +3581 +3582 +3583 +3584 +3585 +3586 +3587 +3588 +3589 +3590 +3591 +3592 +3593 +3594 +3595 +3596 +3597 +3598 +3599 +3600 +3601 +3602 +3603 +3604 +3605 +3606 +3607 +3608 +3609 +3610 +3611 +3612 +3613 +3614 +3615 +3616 +3617 +3618 +3619 +3620 +3621 +3622 +3623 +3624 +3625 +3626 +3627 +3628 +3629 +3630 +3631 +3632 +3633 +3634 +3635 +3636 +3637 +3638 +3639 +3640 +3641 +3642 +3643 +3644 +3645 +3646 +3647 +3648 +3649 +3650 +3651 +3652 +3653 +3654 +3655 +3656 +3657 +3658 +3659 +3660 +3661 +3662 +3663 +3664 +3665 +3666 +3667 +3668 +3669 +3670 +3671 +3672 +3673 +3674 +3675 +3676 +3677 +3678 +3679 +3680 +3681 +3682 +3683 +3684 +3685 +3686 +3687 +3688 +3689 +3690 +3691 +3692 +3693 +3694 +3695 +3696 +3697 +3698 +3699 +3700 +3701 +3702 +3703 +3704 +3705 +3706 +3707 +3708 +3709 +3710 +3711 +3712 +3713 +3714 +3715 +3716 +3717 +3718 +3719 +3720 +3721 +3722 +3723 +3724 +3725 +3726 +3727 +3728 +3729 +3730 +3731 +3732 +3733 +3734 +3735 +3736 +3737 +3738 +3739 +3740 +3741 +3742 +3743 +3744 +3745 +3746 +3747 +3748 +3749 +3750 +3751 +3752 +3753 +3754 +3755 +3756 +3757 +3758 +3759 +3760 +3761 +3762 +3763 +3764 +3765 +3766 +3767 +3768 +3769 +3770 +3771 +3772 +3773 +3774 +3775 +3776 +3777 +3778 +3779 +3780 +3781 +3782 +3783 +3784 +3785 +3786 +3787 +3788 +3789 +3790 +3791 +3792 +3793 +3794 +3795 +3796 +3797 +3798 +3799 +3800 +3801 +3802 +3803 +3804 +3805 +3806 +3807 +3808 +3809 +3810 +3811 +3812 +3813 +3814 +3815 +3816 +3817 +3818  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +1 +  +  +  +1 +  +1 +1 +  +  +  +  +1 +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +1 +1 +1 +1 +1 +1 +1 +1 +1 +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +1 +1568 +  +  +  +  +1 +5969 +  +  +1 +224 +  +  +1 +266 +  +  +  +  +  +1 +32604 +  +  +  +  +  +  +  +  +  +1 +32068 +  +  +  +  +1 +9111 +  +  +  +  +  +  +1 +16161 +  +  +  +  +  +  +  +  +  +1 +88 +  +  +  +  +  +  +4 +  +84 +  +  +  +1 +632 +  +  +  +  +  +  +  +  +  +108 +  +524 +  +  +  +1 +611 +  +  +  +  +1 +2798 +44 +  +  +  +  +  +  +2754 +  +177 +  +572 +  +  +381 +  +  +609 +  +  +  +131 +  +  +99 +  +579 +  +12 +  +194 +  +  +  +  +  +1 +24482 +  +24482 +24482 +  +24482 +29971 +  +29971 +318 +318 +39 +39 +2 +  +39 +39 +  +29653 +1020 +64 +2 +  +64 +64 +64 +64 +2 +  +  +956 +956 +8 +  +  +948 +62 +62 +56 +56 +  +  +  +28633 +371 +  +371 +39 +39 +332 +  +68 +68 +68 +2 +  +  +264 +  +28262 +5934 +22328 +117 +117 +2 +  +117 +117 +  +22211 +  +  +  +  +1 +59 +  +59 +59 +174 +152 +152 +  +22 +  +  +37 +  +  +1 +48 +  +48 +48 +  +  +48 +29 +8 +  +21 +21 +21 +12 +  +9 +  +  +28 +28 +28 +3 +  +25 +25 +  +  +25 +19 +19 +4 +  +15 +15 +15 +12 +  +3 +  +  +  +12 +  +  +1 +4174 +  +4174 +4174 +16103 +16103 +  +19 +19 +  +16084 +12235 +  +3849 +  +  +  +4155 +  +  +1 +4203 +  +4203 +  +  +4203 +  +  +  +4167 +1369 +2798 +1440 +1358 +24 +1334 +153 +  +1181 +  +  +4167 +  +  +  +  +  +  +  +  +  +  +  +1 +6341 +  +  +  +  +  +  +  +6341 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +5418 +5418 +  +  +  +  +  +  +  +  +923 +  +  +923 +52 +  +  +  +  +  +  +  +  +  +  +33 +33 +  +  +  +  +  +  +  +  +  +15 +  +  +15 +6 +  +15 +  +  +  +  +  +  +  +4 +  +  +875 +  +  +  +  +875 +875 +875 +  +  +  +875 +9 +3 +3 +  +  +  +  +  +  +  +  +  +  +  +872 +6 +6 +  +  +  +  +  +  +  +  +866 +3 +3 +  +  +  +  +  +  +  +  +863 +3 +3 +  +  +  +  +  +  +  +  +  +  +860 +167 +167 +  +  +  +  +  +  +  +  +693 +677 +677 +  +  +  +  +  +  +  +  +16 +  +  +  +  +1 +611 +  +611 +611 +  +  +611 +611 +611 +608 +608 +  +  +  +608 +102 +32 +32 +62 +62 +7 +  +55 +  +  +32 +  +4 +  +  +28 +7 +7 +4 +  +  +24 +  +  +  +  +  +  +  +70 +29 +29 +41 +41 +20 +  +21 +  +  +29 +20 +20 +8 +  +  +21 +  +  +  +  +  +  +  +  +  +  +41 +4 +  +  +  +543 +733 +419 +419 +  +314 +  +  +  +546 +12 +12 +78 +6 +6 +  +72 +  +  +  +546 +28 +  +28 +28 +20 +  +  +28 +28 +12 +12 +21 +3 +3 +  +18 +  +  +16 +16 +12 +  +16 +  +  +  +530 +391 +16 +  +  +  +514 +  +  +  +  +  +  +  +  +  +  +1 +471 +  +471 +471 +  +  +471 +471 +  +471 +4864 +  +4864 +455 +455 +4409 +121 +121 +115 +  +6 +6 +  +3 +3 +  +3 +3 +  +  +16 +16 +16 +6 +  +10 +10 +  +16 +  +3 +3 +  +3 +3 +  +3 +3 +  +  +78 +62 +  +  +62 +47 +  +  +62 +21 +21 +  +  +  +21 +  +  +12 +  +  +62 +  +16 +  +78 +  +  +6 +6 +3 +  +  +4288 +8 +  +4280 +  +  +  +471 +16 +  +  +455 +  +  +  +  +  +  +  +  +  +1 +51 +  +51 +51 +  +51 +51 +51 +51 +  +51 +247 +247 +247 +112 +25 +  +  +135 +7 +  +7 +4 +  +3 +128 +35 +35 +93 +25 +68 +4 +  +  +  +  +43 +8 +  +  +  +35 +  +35 +35 +42 +42 +3 +  +  +39 +39 +10 +10 +7 +7 +7 +7 +3 +3 +12 +  +  +4 +4 +4 +  +  +3 +  +  +29 +29 +  +  +  +35 +35 +  +8 +  +  +27 +  +27 +  +  +  +  +  +  +1 +67 +  +  +  +  +  +1 +13035 +  +13035 +  +13011 +1385 +  +  +  +  +  +  +  +11626 +  +  +11626 +2496 +  +  +  +9130 +471 +  +  +8659 +4203 +  +  +  +  +4456 +78 +3 +  +75 +  +  +4378 +608 +  +  +3770 +  +  +1 +11067 +  +11067 +11067 +11067 +11067 +  +11067 +  +11059 +11059 +11059 +  +11059 +  +  +1 +1968 +  +1968 +1968 +1968 +1968 +1832 +1832 +1832 +  +  +1 +  +  +  +  +42 +  +  +  +  +  +  +221 +  +  +  +  +  +  +  +  +308 +  +308 +  +  +  +  +  +  +  +  +486 +  +  +  +  +  +  +36 +  +  +  +  +  +  +138 +  +  +  +  +  +  +  +22 +  +  +  +  +  +  +  +6 +  +  +  +  +  +  +  +  +24 +  +  +  +  +  +  +3 +  +  +  +  +  +12 +  +  +  +  +  +  +  +54 +  +  +  +  +  +1289 +  +  +  +  +  +  +30 +  +  +  +  +  +  +  +  +  +15 +  +  +  +  +  +  +  +  +  +47 +  +  +  +  +  +  +  +  +  +  +  +  +158 +  +  +  +  +  +  +  +  +  +  +  +  +2578 +  +  +  +  +  +  +18 +  +  +  +  +  +  +  +  +27 +  +  +  +  +  +  +  +1114 +  +  +  +  +  +  +  +75 +  +  +  +  +  +  +  +  +34 +  +  +  +  +  +  +  +106 +  +  +  +  +  +  +40 +  +  +  +  +  +  +  +  +1093 +  +  +  +  +  +  +214 +  +  +  +  +  +  +  +  +32 +  +  +  +  +  +  +6 +  +  +  +  +  +  +20 +  +  +  +  +  +  +  +12 +  +  +  +  +  +  +  +3 +  +  +  +  +  +18 +  +  +  +  +  +  +25 +  +  +  +  +  +  +  +  +  +63 +28 +  +  +  +  +  +  +35 +  +  +  +  +  +  +  +127 +  +  +  +  +  +  +  +180 +  +  +  +  +  +  +  +54 +  +  +  +  +  +  +  +11 +  +  +  +  +  +  +  +  +  +1 +211 +  +211 +211 +211 +211 +211 +211 +211 +211 +  +211 +  +  +  +  +1 +916 +  +  +  +  +336 +336 +  +  +  +916 +506 +506 +506 +506 +  +410 +410 +410 +410 +  +  +916 +916 +  +  +1 +300 +300 +  +300 +68 +  +232 +  +  +  +  +  +  +  +1 +312 +80 +  +  +232 +16 +  +  +216 +4 +  +  +212 +4 +  +  +208 +88 +4 +84 +44 +4 +  +40 +  +  +  +120 +  +  +  +  +  +1 +4378 +4378 +56 +  +  +  +  +  +  +1 +1225 +1225 +4 +  +  +  +  +  +1 +28095 +  +  +  +  +1 +6064 +  +  +  +  +1 +2367 +  +2367 +824 +  +1543 +1543 +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +1504 +  +  +1504 +552 +552 +  +  +952 +952 +952 +27 +  +  +925 +3 +3 +  +  +922 +28 +  +  +  +  +  +1 +356 +  +  +  +  +1 +50 +  +50 +  +50 +48 +13 +13 +  +35 +  +27 +21 +  +  +  +  +42 +  +42 +  +  +  +  +1 +105 +  +105 +105 +105 +10 +  +97 +97 +  +  +1 +355 +  +  +  +  +355 +28 +10 +  +20 +  +  +327 +  +  +1 +254 +  +254 +  +254 +  +218 +  +  +  +218 +53 +53 +53 +53 +53 +  +165 +56 +56 +56 +56 +4 +  +52 +52 +52 +44 +  +109 +109 +97 +  +36 +8 +  +28 +20 +20 +20 +  +  +  +1 +202 +  +202 +  +202 +254 +  +214 +194 +  +20 +  +214 +  +214 +214 +54 +27 +14 +13 +10 +  +  +27 +14 +13 +10 +  +  +14 +  +160 +  +  +174 +  +174 +78 +  +  +  +106 +  +106 +  +  +  +  +1 +168 +  +168 +  +168 +  +28 +  +28 +  +  +  +  +  +1 +3183 +  +3183 +  +3183 +1373 +  +  +1810 +962 +14 +  +950 +  +  +848 +144 +3 +3 +  +  +141 +129 +  +  +  +716 +113 +113 +113 +  +  +603 +4 +4 +4 +  +  +599 +50 +  +  +549 +202 +  +  +347 +216 +  +  +131 +51 +  +  +80 +  +  +  +  +1 +158 +  +158 +  +158 +60 +73 +69 +56 +  +13 +  +  +  +154 +  +154 +  +  +1 +67 +  +67 +4 +  +  +63 +  +  +1 +67 +  +67 +  +  +1 +12 +  +12 +  +12 +  +12 +  +12 +  +  +1 +34 +  +34 +34 +34 +  +34 +  +  +1 +1743 +  +1743 +  +1311 +89 +62 +58 +27 +3 +3 +  +24 +20 +  +  +  +1303 +  +  +  +1 +14 +  +14 +  +14 +2 +1 +1 +  +1 +1 +  +  +  +14 +  +  +  +  +1 +3183 +  +2743 +821 +  +  +1922 +  +64 +20 +  +  +48 +8 +  +  +40 +40 +  +  +1898 +  +  +  +  +1 +3270 +  +3270 +2440 +  +  +830 +52 +52 +  +52 +20 +  +  +36 +8 +  +  +28 +  +  +778 +20 +20 +20 +  +  +758 +15 +15 +15 +15 +6 +  +11 +  +  +743 +  +  +1 +2691 +  +2691 +789 +  +  +1902 +  +18 +18 +  +  +18 +18 +  +  +21 +21 +  +  +18 +18 +  +  +18 +18 +  +  +  +  +  +15 +15 +  +  +  +  +  +  +39 +39 +  +  +31 +31 +  +  +  +  +21 +21 +  +  +  +92 +92 +  +  +  +  +54 +54 +  +  +1557 +  +  +1902 +  +  +  +  +  +  +  +  +  +  +1 +2859 +  +2859 +2859 +  +2859 +  +2383 +2383 +2383 +2161 +  +222 +222 +  +222 +  +206 +  +  +102 +54 +54 +54 +54 +  +  +  +102 +102 +102 +102 +  +  +206 +  +  +206 +206 +206 +254 +254 +  +206 +  +  +  +  +  +1 +2859 +  +2859 +  +2367 +6 +6 +6 +6 +6 +6 +6 +  +6 +  +  +2367 +  +  +  +  +1 +2859 +  +2859 +2859 +  +2367 +  +257 +20 +  +  +  +237 +12 +  +  +229 +229 +221 +  +  +2110 +  +  +  +  +1 +2240 +  +1756 +6 +  +6 +9 +3 +  +6 +6 +  +  +  +1756 +  +  +  +  +1 +229 +  +  +229 +401 +181 +  +220 +184 +4 +  +180 +  +  +193 +  +  +1 +229 +  +229 +  +229 +  +193 +  +181 +  +  +  +  +1 +915 +  +915 +100 +  +  +819 +  +  +1 +276 +  +  +  +216 +12 +  +  +208 +31 +19 +177 +120 +116 +  +  +180 +  +  +1 +223 +  +223 +276 +180 +127 +  +53 +  +  +127 +  +  +1 +157 +  +157 +  +157 +  +81 +  +81 +  +  +  +  +  +  +1 +41 +  +41 +  +41 +  +21 +  +21 +  +  +  +  +1 +54 +54 +  +  +  +  +1 +198 +58 +58 +  +  +  +  +1 +38 +  +38 +  +38 +  +34 +  +34 +  +34 +  +22 +7 +7 +  +15 +  +  +18 +  +  +  +  +1 +20 +  +20 +  +20 +20 +  +20 +  +16 +  +16 +  +12 +  +12 +  +12 +  +12 +3 +  +  +12 +  +  +1 +86 +  +86 +  +86 +  +86 +  +86 +  +86 +86 +  +86 +  +54 +  +54 +  +  +1 +25 +  +  +25 +  +  +1 +69 +  +69 +  +69 +  +69 +  +69 +13 +  +56 +25 +25 +25 +  +25 +12 +12 +12 +12 +  +  +31 +31 +31 +  +31 +  +15 +12 +  +  +3 +3 +3 +3 +  +  +  +44 +29 +  +  +  +49 +  +34 +9 +  +34 +  +34 +6 +  +  +  +49 +  +49 +49 +  +49 +  +45 +  +45 +  +  +  +  +  +  +1 +52 +  +52 +  +  +52 +11 +  +11 +8 +  +  +3 +  +  +41 +13 +4 +  +  +9 +  +  +28 +17 +  +17 +17 +8 +  +  +  +20 +  +16 +4 +  +  +12 +  +  +  +  +1 +60 +  +60 +  +  +60 +10 +  +10 +4 +  +  +6 +  +  +50 +13 +4 +  +  +9 +  +  +37 +23 +  +23 +23 +8 +  +  +  +29 +  +25 +4 +  +  +21 +  +  +  +  +1 +36 +  +36 +  +36 +6 +  +  +  +32 +21 +12 +12 +12 +  +  +  +20 +9 +  +  +11 +8 +3 +  +  +  +11 +  +11 +  +  +  +  +1 +19 +  +19 +6 +  +  +15 +  +15 +  +15 +  +15 +  +15 +  +11 +  +  +  +  +1 +24 +  +  +  +24 +15 +15 +  +9 +9 +  +24 +  +24 +42 +20 +  +22 +18 +  +  +20 +  +  +1 +20 +  +20 +  +20 +  +20 +  +20 +  +20 +  +20 +3 +3 +  +  +17 +  +17 +17 +17 +  +17 +33 +9 +  +24 +20 +11 +4 +  +7 +  +16 +  +  +9 +  +9 +  +9 +  +  +  +  +1 +30 +  +30 +  +30 +4 +  +  +26 +  +18 +  +18 +  +  +  +  +1 +34 +  +34 +  +34 +34 +4 +  +  +30 +  +30 +12 +  +  +22 +22 +22 +  +  +1 +41 +  +41 +  +41 +  +41 +34 +  +  +29 +6 +6 +  +  +29 +4 +  +  +25 +  +  +  +  +1 +3 +  +3 +  +3 +  +  +  +  +1 +2576 +  +  +  +  +2576 +24 +  +  +2552 +548 +  +54 +  +160 +  +198 +  +136 +  +  +  +2140 +685 +  +60 +  +52 +  +3 +  +20 +  +69 +  +3 +  +38 +  +36 +  +20 +  +30 +  +41 +  +157 +  +86 +  +19 +  +51 +  +  +  +1506 +  +  +1310 +59 +  +59 +59 +8 +  +  +51 +51 +27 +27 +  +  +1251 +  +1231 +  +  +  +  +1 +513 +  +  +513 +  +513 +780 +494 +  +286 +  +286 +278 +278 +  +3 +  +275 +275 +261 +261 +10 +  +  +14 +10 +  +  +  +  +497 +497 +497 +497 +  +497 +497 +497 +497 +  +497 +590 +305 +  +285 +97 +4 +  +93 +  +  +309 +  +305 +305 +305 +305 +  +305 +  +  +1 +424 +424 +  +424 +111 +111 +144 +144 +128 +128 +52 +20 +20 +  +52 +16 +16 +  +76 +68 +16 +16 +52 +12 +12 +40 +14 +14 +  +  +128 +128 +128 +95 +  +33 +  +  +  +408 +  +408 +  +  +  +  +  +  +  +1 +335 +  +335 +335 +335 +315 +40 +12 +  +  +275 +25 +25 +250 +4 +4 +  +  +  +307 +291 +291 +291 +291 +49 +  +  +291 +291 +107 +44 +  +63 +22 +  +47 +  +47 +  +  +1 +129 +  +129 +  +129 +68 +68 +68 +32 +16 +  +  +36 +14 +14 +22 +4 +4 +  +  +  +  +117 +117 +117 +117 +117 +29 +  +  +117 +117 +93 +24 +  +69 +14 +  +61 +  +61 +  +  +  +  +1 +2677 +981 +  +  +41 +  +332 +  +608 +  +  +  +1696 +1684 +  +  +  +1 +1805 +  +1805 +1874 +1874 +1728 +  +  +146 +146 +146 +  +3 +  +143 +143 +80 +80 +6 +  +  +63 +30 +  +  +  +  +1801 +1740 +1032 +4 +  +1028 +  +1093 +  +  +1 +1941 +1941 +1941 +1805 +1093 +  +  +  +  +  +1 +99 +  +  +  +  +  +99 +31 +22 +  +  +  +77 +  +  +  +  +  +  +  +1 +3357 +  +3357 +3357 +3357 +  +3357 +5299 +  +5299 +391 +391 +29 +  +  +  +29 +29 +29 +2 +  +29 +29 +29 +362 +9 +9 +9 +  +  +  +9 +  +353 +  +4908 +431 +34 +5 +5 +  +29 +  +34 +34 +34 +34 +2 +  +  +397 +397 +8 +  +389 +389 +64 +64 +58 +58 +58 +58 +  +  +  +58 +58 +  +  +  +4477 +135 +135 +41 +  +  +  +  +  +41 +41 +41 +41 +3 +  +  +  +3 +3 +  +94 +70 +70 +70 +70 +  +  +  +  +  +70 +2 +  +  +24 +  +4342 +1242 +3100 +39 +39 +2 +  +39 +39 +  +3061 +  +  +  +  +1 +54 +  +54 +63 +63 +  +  +  +63 +38 +  +63 +36 +  +63 +  +  +54 +  +  +1 +168 +  +168 +168 +168 +  +  +  +  +  +  +168 +168 +  +  +  +  +168 +123 +123 +123 +  +  +  +  +  +  +  +168 +  +  +1 +24 +  +24 +  +24 +24 +  +  +  +  +  +  +24 +24 +  +  +  +  +  +24 +24 +24 +24 +24 +  +  +  +  +24 +  +  +  +  +  +  +24 +  +  +1 +45 +  +45 +123 +123 +  +  +  +123 +72 +  +123 +72 +  +123 +  +  +45 +  +  +1 +13398 +  +13398 +13398 +  +  +  +  +  +  +  +  +  +  +13398 +12068 +12068 +12068 +  +  +13398 +48 +48 +  +48 +48 +  +  +  +  +  +  +  +  +  +  +  +  +13398 +4598 +4574 +  +4598 +4574 +  +  +  +  +  +  +  +  +  +  +  +  +13398 +  +  +1 +48 +  +48 +48 +48 +  +48 +  +48 +  +48 +48 +  +48 +  +  +1 +20 +  +20 +20 +  +20 +  +20 +4 +2 +2 +2 +2 +  +2 +2 +2 +2 +  +  +  +20 +  +  +1 +1440 +  +1440 +1440 +  +1440 +  +1440 +126 +80 +80 +80 +80 +46 +6 +6 +6 +6 +  +40 +40 +40 +40 +  +  +  +1440 +  +  +1 +20890 +  +20890 +20890 +50620 +50524 +50524 +30380 +  +20144 +  +  +  +20890 +  +  +1 +  +746 +  +19396 +13442 +  +  +  +19396 +776 +  +776 +152 +  +776 +128 +  +  +776 +776 +24 +24 +24 +752 +66 +66 +66 +  +  +776 +776 +24 +24 +24 +  +  +  +752 +66 +  +  +  +  +  +  +  +19396 +11890 +  +11890 +  +11890 +11890 +11890 +  +11890 +4444 +  +  +11890 +24 +  +  +11890 +496 +  +  +11890 +  +  +  +  +1 +  +1941 +  +1941 +478 +478 +  +  +1941 +  +746 +746 +746 +746 +746 +746 +  +746 +  +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +  +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +  +  +1941 +45 +45 +  +45 +45 +  +  +  +1 +1941 +478 +  +  +1941 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +  +  +1941 +45 +45 +  +  +  +1 +1941 +  +1941 +1941 +7 +  +  +1941 +1941 +1941 +1941 +1941 +1941 +1941 +1941 +  +  +  +  +  +  +  +1941 +1941 +1933 +1933 +  +1933 +45 +  +1933 +478 +  +1933 +68 +  +  +  +1941 +1938 +  +  +  +  +  +  +  +  +  +1941 +1941 +1941 +1093 +54 +54 +  +1093 +45 +45 +  +1093 +68 +  +1093 +746 +  +  +848 +  +1941 +1941 +  +  +1093 +  +  +  +1 +  +1 +  +  +1 +1 +  +1 +1 +  +  +1 +40 +40 +  +  +  +1 +1 +  +  +1 +  +  +  +  + 
    /*
    +  Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com>
    +  Copyright (C) 2012 Mathias Bynens <mathias@qiwi.be>
    +  Copyright (C) 2012 Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl>
    +  Copyright (C) 2012 Kris Kowal <kris.kowal@cixar.com>
    +  Copyright (C) 2012 Yusuke Suzuki <utatane.tea@gmail.com>
    +  Copyright (C) 2012 Arpad Borsos <arpad.borsos@googlemail.com>
    +  Copyright (C) 2011 Ariya Hidayat <ariya.hidayat@gmail.com>
    + 
    +  Redistribution and use in source and binary forms, with or without
    +  modification, are permitted provided that the following conditions are met:
    + 
    +    * Redistributions of source code must retain the above copyright
    +      notice, this list of conditions and the following disclaimer.
    +    * Redistributions in binary form must reproduce the above copyright
    +      notice, this list of conditions and the following disclaimer in the
    +      documentation and/or other materials provided with the distribution.
    + 
    +  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    +  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    +  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    +  ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
    +  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
    +  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    +  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    +  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    +  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    +  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    +*/
    + 
    +/*jslint bitwise:true plusplus:true */
    +/*global esprima:true, define:true, exports:true, window: true,
    +throwError: true, generateStatement: true, peek: true,
    +parseAssignmentExpression: true, parseBlock: true, parseExpression: true,
    +parseFunctionDeclaration: true, parseFunctionExpression: true,
    +parseFunctionSourceElements: true, parseVariableIdentifier: true,
    +parseLeftHandSideExpression: true,
    +parseStatement: true, parseSourceElement: true */
    + 
    +(function (root, factory) {
    +    'use strict';
    + 
    +    // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js,
    +    // Rhino, and plain browser loading.
    +    Iif (typeof define === 'function' && define.amd) {
    +        define(['exports'], factory);
    +    } else Eif (typeof exports !== 'undefined') {
    +        factory(exports);
    +    } else {
    +        factory((root.esprima = {}));
    +    }
    +}(this, function (exports) {
    +    'use strict';
    + 
    +    var Token,
    +        TokenName,
    +        Syntax,
    +        PropertyKind,
    +        Messages,
    +        Regex,
    +        SyntaxTreeDelegate,
    +        source,
    +        strict,
    +        index,
    +        lineNumber,
    +        lineStart,
    +        length,
    +        delegate,
    +        lookahead,
    +        state,
    +        extra;
    + 
    +    Token = {
    +        BooleanLiteral: 1,
    +        EOF: 2,
    +        Identifier: 3,
    +        Keyword: 4,
    +        NullLiteral: 5,
    +        NumericLiteral: 6,
    +        Punctuator: 7,
    +        StringLiteral: 8
    +    };
    + 
    +    TokenName = {};
    +    TokenName[Token.BooleanLiteral] = 'Boolean';
    +    TokenName[Token.EOF] = '<end>';
    +    TokenName[Token.Identifier] = 'Identifier';
    +    TokenName[Token.Keyword] = 'Keyword';
    +    TokenName[Token.NullLiteral] = 'Null';
    +    TokenName[Token.NumericLiteral] = 'Numeric';
    +    TokenName[Token.Punctuator] = 'Punctuator';
    +    TokenName[Token.StringLiteral] = 'String';
    + 
    +    Syntax = {
    +        AssignmentExpression: 'AssignmentExpression',
    +        ArrayExpression: 'ArrayExpression',
    +        BlockStatement: 'BlockStatement',
    +        BinaryExpression: 'BinaryExpression',
    +        BreakStatement: 'BreakStatement',
    +        CallExpression: 'CallExpression',
    +        CatchClause: 'CatchClause',
    +        ConditionalExpression: 'ConditionalExpression',
    +        ContinueStatement: 'ContinueStatement',
    +        DoWhileStatement: 'DoWhileStatement',
    +        DebuggerStatement: 'DebuggerStatement',
    +        EmptyStatement: 'EmptyStatement',
    +        ExpressionStatement: 'ExpressionStatement',
    +        ForStatement: 'ForStatement',
    +        ForInStatement: 'ForInStatement',
    +        FunctionDeclaration: 'FunctionDeclaration',
    +        FunctionExpression: 'FunctionExpression',
    +        Identifier: 'Identifier',
    +        IfStatement: 'IfStatement',
    +        Literal: 'Literal',
    +        LabeledStatement: 'LabeledStatement',
    +        LogicalExpression: 'LogicalExpression',
    +        MemberExpression: 'MemberExpression',
    +        NewExpression: 'NewExpression',
    +        ObjectExpression: 'ObjectExpression',
    +        Program: 'Program',
    +        Property: 'Property',
    +        ReturnStatement: 'ReturnStatement',
    +        SequenceExpression: 'SequenceExpression',
    +        SwitchStatement: 'SwitchStatement',
    +        SwitchCase: 'SwitchCase',
    +        ThisExpression: 'ThisExpression',
    +        ThrowStatement: 'ThrowStatement',
    +        TryStatement: 'TryStatement',
    +        UnaryExpression: 'UnaryExpression',
    +        UpdateExpression: 'UpdateExpression',
    +        VariableDeclaration: 'VariableDeclaration',
    +        VariableDeclarator: 'VariableDeclarator',
    +        WhileStatement: 'WhileStatement',
    +        WithStatement: 'WithStatement'
    +    };
    + 
    +    PropertyKind = {
    +        Data: 1,
    +        Get: 2,
    +        Set: 4
    +    };
    + 
    +    // Error messages should be identical to V8.
    +    Messages = {
    +        UnexpectedToken:  'Unexpected token %0',
    +        UnexpectedNumber:  'Unexpected number',
    +        UnexpectedString:  'Unexpected string',
    +        UnexpectedIdentifier:  'Unexpected identifier',
    +        UnexpectedReserved:  'Unexpected reserved word',
    +        UnexpectedEOS:  'Unexpected end of input',
    +        NewlineAfterThrow:  'Illegal newline after throw',
    +        InvalidRegExp: 'Invalid regular expression',
    +        UnterminatedRegExp:  'Invalid regular expression: missing /',
    +        InvalidLHSInAssignment:  'Invalid left-hand side in assignment',
    +        InvalidLHSInForIn:  'Invalid left-hand side in for-in',
    +        MultipleDefaultsInSwitch: 'More than one default clause in switch statement',
    +        NoCatchOrFinally:  'Missing catch or finally after try',
    +        UnknownLabel: 'Undefined label \'%0\'',
    +        Redeclaration: '%0 \'%1\' has already been declared',
    +        IllegalContinue: 'Illegal continue statement',
    +        IllegalBreak: 'Illegal break statement',
    +        IllegalReturn: 'Illegal return statement',
    +        StrictModeWith:  'Strict mode code may not include a with statement',
    +        StrictCatchVariable:  'Catch variable may not be eval or arguments in strict mode',
    +        StrictVarName:  'Variable name may not be eval or arguments in strict mode',
    +        StrictParamName:  'Parameter name eval or arguments is not allowed in strict mode',
    +        StrictParamDupe: 'Strict mode function may not have duplicate parameter names',
    +        StrictFunctionName:  'Function name may not be eval or arguments in strict mode',
    +        StrictOctalLiteral:  'Octal literals are not allowed in strict mode.',
    +        StrictDelete:  'Delete of an unqualified identifier in strict mode.',
    +        StrictDuplicateProperty:  'Duplicate data property in object literal not allowed in strict mode',
    +        AccessorDataProperty:  'Object literal may not have data and accessor property with the same name',
    +        AccessorGetSet:  'Object literal may not have multiple get/set accessors with the same name',
    +        StrictLHSAssignment:  'Assignment to eval or arguments is not allowed in strict mode',
    +        StrictLHSPostfix:  'Postfix increment/decrement may not have eval or arguments operand in strict mode',
    +        StrictLHSPrefix:  'Prefix increment/decrement may not have eval or arguments operand in strict mode',
    +        StrictReservedWord:  'Use of future reserved word in strict mode'
    +    };
    + 
    +    // See also tools/generate-unicode-regex.py.
    +    Regex = {
    +        NonAsciiIdentifierStart: new RegExp('[\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]'),
    +        NonAsciiIdentifierPart: new RegExp('[\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0300-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u0483-\u0487\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u05d0-\u05ea\u05f0-\u05f2\u0610-\u061a\u0620-\u0669\u066e-\u06d3\u06d5-\u06dc\u06df-\u06e8\u06ea-\u06fc\u06ff\u0710-\u074a\u074d-\u07b1\u07c0-\u07f5\u07fa\u0800-\u082d\u0840-\u085b\u08a0\u08a2-\u08ac\u08e4-\u08fe\u0900-\u0963\u0966-\u096f\u0971-\u0977\u0979-\u097f\u0981-\u0983\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bc-\u09c4\u09c7\u09c8\u09cb-\u09ce\u09d7\u09dc\u09dd\u09df-\u09e3\u09e6-\u09f1\u0a01-\u0a03\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a59-\u0a5c\u0a5e\u0a66-\u0a75\u0a81-\u0a83\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abc-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ad0\u0ae0-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3c-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5c\u0b5d\u0b5f-\u0b63\u0b66-\u0b6f\u0b71\u0b82\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd0\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c58\u0c59\u0c60-\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbc-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0cde\u0ce0-\u0ce3\u0ce6-\u0cef\u0cf1\u0cf2\u0d02\u0d03\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d-\u0d44\u0d46-\u0d48\u0d4a-\u0d4e\u0d57\u0d60-\u0d63\u0d66-\u0d6f\u0d7a-\u0d7f\u0d82\u0d83\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e01-\u0e3a\u0e40-\u0e4e\u0e50-\u0e59\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb9\u0ebb-\u0ebd\u0ec0-\u0ec4\u0ec6\u0ec8-\u0ecd\u0ed0-\u0ed9\u0edc-\u0edf\u0f00\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e-\u0f47\u0f49-\u0f6c\u0f71-\u0f84\u0f86-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1049\u1050-\u109d\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u135d-\u135f\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176c\u176e-\u1770\u1772\u1773\u1780-\u17d3\u17d7\u17dc\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1820-\u1877\u1880-\u18aa\u18b0-\u18f5\u1900-\u191c\u1920-\u192b\u1930-\u193b\u1946-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u19d0-\u19d9\u1a00-\u1a1b\u1a20-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1aa7\u1b00-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1bf3\u1c00-\u1c37\u1c40-\u1c49\u1c4d-\u1c7d\u1cd0-\u1cd2\u1cd4-\u1cf6\u1d00-\u1de6\u1dfc-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u200c\u200d\u203f\u2040\u2054\u2071\u207f\u2090-\u209c\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d7f-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2de0-\u2dff\u2e2f\u3005-\u3007\u3021-\u302f\u3031-\u3035\u3038-\u303c\u3041-\u3096\u3099\u309a\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua62b\ua640-\ua66f\ua674-\ua67d\ua67f-\ua697\ua69f-\ua6f1\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua827\ua840-\ua873\ua880-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f7\ua8fb\ua900-\ua92d\ua930-\ua953\ua960-\ua97c\ua980-\ua9c0\ua9cf-\ua9d9\uaa00-\uaa36\uaa40-\uaa4d\uaa50-\uaa59\uaa60-\uaa76\uaa7a\uaa7b\uaa80-\uaac2\uaadb-\uaadd\uaae0-\uaaef\uaaf2-\uaaf6\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabea\uabec\uabed\uabf0-\uabf9\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\ufe70-\ufe74\ufe76-\ufefc\uff10-\uff19\uff21-\uff3a\uff3f\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]')
    +    };
    + 
    +    // Ensure the condition is true, otherwise throw an error.
    +    // This is only to have a better contract semantic, i.e. another safety net
    +    // to catch a logic error. The condition shall be fulfilled in normal case.
    +    // Do NOT use this to enforce a certain condition on any user input.
    + 
    +    function assert(condition, message) {
    +        Iif (!condition) {
    +            throw new Error('ASSERT: ' + message);
    +        }
    +    }
    + 
    +    function isDecimalDigit(ch) {
    +        return (ch >= 48 && ch <= 57);   // 0..9
    +    }
    + 
    +    function isHexDigit(ch) {
    +        return '0123456789abcdefABCDEF'.indexOf(ch) >= 0;
    +    }
    + 
    +    function isOctalDigit(ch) {
    +        return '01234567'.indexOf(ch) >= 0;
    +    }
    + 
    + 
    +    // 7.2 White Space
    + 
    +    function isWhiteSpace(ch) {
    +        return (ch === 32) ||  // space
    +            (ch === 9) ||      // tab
    +            (ch === 0xB) ||
    +            (ch === 0xC) ||
    +            (ch === 0xA0) ||
    +            (ch >= 0x1680 && '\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\uFEFF'.indexOf(String.fromCharCode(ch)) > 0);
    +    }
    + 
    +    // 7.3 Line Terminators
    + 
    +    function isLineTerminator(ch) {
    +        return (ch === 10) || (ch === 13) || (ch === 0x2028) || (ch === 0x2029);
    +    }
    + 
    +    // 7.6 Identifier Names and Identifiers
    + 
    +    function isIdentifierStart(ch) {
    +        return (ch === 36) || (ch === 95) ||  // $ (dollar) and _ (underscore)
    +            (ch >= 65 && ch <= 90) ||         // A..Z
    +            (ch >= 97 && ch <= 122) ||        // a..z
    +            (ch === 92) ||                    // \ (backslash)
    +            ((ch >= 0x80) && Regex.NonAsciiIdentifierStart.test(String.fromCharCode(ch)));
    +    }
    + 
    +    function isIdentifierPart(ch) {
    +        return (ch === 36) || (ch === 95) ||  // $ (dollar) and _ (underscore)
    +            (ch >= 65 && ch <= 90) ||         // A..Z
    +            (ch >= 97 && ch <= 122) ||        // a..z
    +            (ch >= 48 && ch <= 57) ||         // 0..9
    +            (ch === 92) ||                    // \ (backslash)
    +            ((ch >= 0x80) && Regex.NonAsciiIdentifierPart.test(String.fromCharCode(ch)));
    +    }
    + 
    +    // 7.6.1.2 Future Reserved Words
    + 
    +    function isFutureReservedWord(id) {
    +        switch (id) {
    +        case 'class':
    +        case 'enum':
    +        case 'export':
    +        case 'extends':
    +        case 'import':
    +        case 'super':
    +            return true;
    +        default:
    +            return false;
    +        }
    +    }
    + 
    +    function isStrictModeReservedWord(id) {
    +        switch (id) {
    +        case 'implements':
    +        case 'interface':
    +        case 'package':
    +        case 'private':
    +        case 'protected':
    +        case 'public':
    +        case 'static':
    +        case 'yield':
    +        case 'let':
    +            return true;
    +        default:
    +            return false;
    +        }
    +    }
    + 
    +    function isRestrictedWord(id) {
    +        return id === 'eval' || id === 'arguments';
    +    }
    + 
    +    // 7.6.1.1 Keywords
    + 
    +    function isKeyword(id) {
    +        if (strict && isStrictModeReservedWord(id)) {
    +            return true;
    +        }
    + 
    +        // 'const' is specialized as Keyword in V8.
    +        // 'yield' and 'let' are for compatiblity with SpiderMonkey and ES.next.
    +        // Some others are from future reserved words.
    + 
    +        switch (id.length) {
    +        case 2:
    +            return (id === 'if') || (id === 'in') || (id === 'do');
    +        case 3:
    +            return (id === 'var') || (id === 'for') || (id === 'new') ||
    +                (id === 'try') || (id === 'let');
    +        case 4:
    +            return (id === 'this') || (id === 'else') || (id === 'case') ||
    +                (id === 'void') || (id === 'with') || (id === 'enum');
    +        case 5:
    +            return (id === 'while') || (id === 'break') || (id === 'catch') ||
    +                (id === 'throw') || (id === 'const') || (id === 'yield') ||
    +                (id === 'class') || (id === 'super');
    +        case 6:
    +            return (id === 'return') || (id === 'typeof') || (id === 'delete') ||
    +                (id === 'switch') || (id === 'export') || (id === 'import');
    +        case 7:
    +            return (id === 'default') || (id === 'finally') || (id === 'extends');
    +        case 8:
    +            return (id === 'function') || (id === 'continue') || (id === 'debugger');
    +        case 10:
    +            return (id === 'instanceof');
    +        default:
    +            return false;
    +        }
    +    }
    + 
    +    // 7.4 Comments
    + 
    +    function skipComment() {
    +        var ch, blockComment, lineComment;
    + 
    +        blockComment = false;
    +        lineComment = false;
    + 
    +        while (index < length) {
    +            ch = source.charCodeAt(index);
    + 
    +            if (lineComment) {
    +                ++index;
    +                if (isLineTerminator(ch)) {
    +                    lineComment = false;
    +                    if (ch === 13 && source.charCodeAt(index) === 10) {
    +                        ++index;
    +                    }
    +                    ++lineNumber;
    +                    lineStart = index;
    +                }
    +            } else if (blockComment) {
    +                if (isLineTerminator(ch)) {
    +                    if (ch === 13 && source.charCodeAt(index + 1) === 10) {
    +                        ++index;
    +                    }
    +                    ++lineNumber;
    +                    ++index;
    +                    lineStart = index;
    +                    if (index >= length) {
    +                        throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +                    }
    +                } else {
    +                    ch = source.charCodeAt(index++);
    +                    if (index >= length) {
    +                        throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +                    }
    +                    // Block comment ends with '*/' (char #42, char #47).
    +                    if (ch === 42) {
    +                        ch = source.charCodeAt(index);
    +                        if (ch === 47) {
    +                            ++index;
    +                            blockComment = false;
    +                        }
    +                    }
    +                }
    +            } else if (ch === 47) {
    +                ch = source.charCodeAt(index + 1);
    +                // Line comment starts with '//' (char #47, char #47).
    +                if (ch === 47) {
    +                    index += 2;
    +                    lineComment = true;
    +                } else if (ch === 42) {
    +                    // Block comment starts with '/*' (char #47, char #42).
    +                    index += 2;
    +                    blockComment = true;
    +                    if (index >= length) {
    +                        throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +                    }
    +                } else {
    +                    break;
    +                }
    +            } else if (isWhiteSpace(ch)) {
    +                ++index;
    +            } else if (isLineTerminator(ch)) {
    +                ++index;
    +                if (ch === 13 && source.charCodeAt(index) === 10) {
    +                    ++index;
    +                }
    +                ++lineNumber;
    +                lineStart = index;
    +            } else {
    +                break;
    +            }
    +        }
    +    }
    + 
    +    function scanHexEscape(prefix) {
    +        var i, len, ch, code = 0;
    + 
    +        len = (prefix === 'u') ? 4 : 2;
    +        for (i = 0; i < len; ++i) {
    +            if (index < length && isHexDigit(source[index])) {
    +                ch = source[index++];
    +                code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase());
    +            } else {
    +                return '';
    +            }
    +        }
    +        return String.fromCharCode(code);
    +    }
    + 
    +    function getEscapedIdentifier() {
    +        var ch, id;
    + 
    +        ch = source.charCodeAt(index++);
    +        id = String.fromCharCode(ch);
    + 
    +        // '\u' (char #92, char #117) denotes an escaped character.
    +        if (ch === 92) {
    +            if (source.charCodeAt(index) !== 117) {
    +                throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +            }
    +            ++index;
    +            ch = scanHexEscape('u');
    +            if (!ch || ch === '\\' || !isIdentifierStart(ch.charCodeAt(0))) {
    +                throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +            }
    +            id = ch;
    +        }
    + 
    +        while (index < length) {
    +            ch = source.charCodeAt(index);
    +            if (!isIdentifierPart(ch)) {
    +                break;
    +            }
    +            ++index;
    +            id += String.fromCharCode(ch);
    + 
    +            // '\u' (char #92, char #117) denotes an escaped character.
    +            if (ch === 92) {
    +                id = id.substr(0, id.length - 1);
    +                if (source.charCodeAt(index) !== 117) {
    +                    throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +                }
    +                ++index;
    +                ch = scanHexEscape('u');
    +                if (!ch || ch === '\\' || !isIdentifierPart(ch.charCodeAt(0))) {
    +                    throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +                }
    +                id += ch;
    +            }
    +        }
    + 
    +        return id;
    +    }
    + 
    +    function getIdentifier() {
    +        var start, ch;
    + 
    +        start = index++;
    +        while (index < length) {
    +            ch = source.charCodeAt(index);
    +            if (ch === 92) {
    +                // Blackslash (char #92) marks Unicode escape sequence.
    +                index = start;
    +                return getEscapedIdentifier();
    +            }
    +            if (isIdentifierPart(ch)) {
    +                ++index;
    +            } else {
    +                break;
    +            }
    +        }
    + 
    +        return source.slice(start, index);
    +    }
    + 
    +    function scanIdentifier() {
    +        var start, id, type;
    + 
    +        start = index;
    + 
    +        // Backslash (char #92) starts an escaped character.
    +        id = (source.charCodeAt(index) === 92) ? getEscapedIdentifier() : getIdentifier();
    + 
    +        // There is no keyword or literal with only one character.
    +        // Thus, it must be an identifier.
    +        if (id.length === 1) {
    +            type = Token.Identifier;
    +        } else if (isKeyword(id)) {
    +            type = Token.Keyword;
    +        } else if (id === 'null') {
    +            type = Token.NullLiteral;
    +        } else if (id === 'true' || id === 'false') {
    +            type = Token.BooleanLiteral;
    +        } else {
    +            type = Token.Identifier;
    +        }
    + 
    +        return {
    +            type: type,
    +            value: id,
    +            lineNumber: lineNumber,
    +            lineStart: lineStart,
    +            range: [start, index]
    +        };
    +    }
    + 
    + 
    +    // 7.7 Punctuators
    + 
    +    function scanPunctuator() {
    +        var start = index,
    +            code = source.charCodeAt(index),
    +            code2,
    +            ch1 = source[index],
    +            ch2,
    +            ch3,
    +            ch4;
    + 
    +        switch (code) {
    + 
    +        // Check for most common single-character punctuators.
    +        case 46:   // . dot
    +        case 40:   // ( open bracket
    +        case 41:   // ) close bracket
    +        case 59:   // ; semicolon
    +        case 44:   // , comma
    +        case 123:  // { open curly brace
    +        case 125:  // } close curly brace
    +        case 91:   // [
    +        case 93:   // ]
    +        case 58:   // :
    +        case 63:   // ?
    +        case 126:  // ~
    +            ++index;
    +            return {
    +                type: Token.Punctuator,
    +                value: String.fromCharCode(code),
    +                lineNumber: lineNumber,
    +                lineStart: lineStart,
    +                range: [start, index]
    +            };
    + 
    +        default:
    +            code2 = source.charCodeAt(index + 1);
    + 
    +            // '=' (char #61) marks an assignment or comparison operator.
    +            if (code2 === 61) {
    +                switch (code) {
    +                case 37:  // %
    +                case 38:  // &
    +                case 42:  // *:
    +                case 43:  // +
    +                case 45:  // -
    +                case 47:  // /
    +                case 60:  // <
    +                case 62:  // >
    +                case 94:  // ^
    +                case 124: // |
    +                    index += 2;
    +                    return {
    +                        type: Token.Punctuator,
    +                        value: String.fromCharCode(code) + String.fromCharCode(code2),
    +                        lineNumber: lineNumber,
    +                        lineStart: lineStart,
    +                        range: [start, index]
    +                    };
    + 
    +                case 33: // !
    +                case 61: // =
    +                    index += 2;
    + 
    +                    // !== and ===
    +                    if (source.charCodeAt(index) === 61) {
    +                        ++index;
    +                    }
    +                    return {
    +                        type: Token.Punctuator,
    +                        value: source.slice(start, index),
    +                        lineNumber: lineNumber,
    +                        lineStart: lineStart,
    +                        range: [start, index]
    +                    };
    +                default:
    +                    break;
    +                }
    +            }
    +            break;
    +        }
    + 
    +        // Peek more characters.
    + 
    +        ch2 = source[index + 1];
    +        ch3 = source[index + 2];
    +        ch4 = source[index + 3];
    + 
    +        // 4-character punctuator: >>>=
    + 
    +        if (ch1 === '>' && ch2 === '>' && ch3 === '>') {
    +            if (ch4 === '=') {
    +                index += 4;
    +                return {
    +                    type: Token.Punctuator,
    +                    value: '>>>=',
    +                    lineNumber: lineNumber,
    +                    lineStart: lineStart,
    +                    range: [start, index]
    +                };
    +            }
    +        }
    + 
    +        // 3-character punctuators: === !== >>> <<= >>=
    + 
    +        if (ch1 === '>' && ch2 === '>' && ch3 === '>') {
    +            index += 3;
    +            return {
    +                type: Token.Punctuator,
    +                value: '>>>',
    +                lineNumber: lineNumber,
    +                lineStart: lineStart,
    +                range: [start, index]
    +            };
    +        }
    + 
    +        if (ch1 === '<' && ch2 === '<' && ch3 === '=') {
    +            index += 3;
    +            return {
    +                type: Token.Punctuator,
    +                value: '<<=',
    +                lineNumber: lineNumber,
    +                lineStart: lineStart,
    +                range: [start, index]
    +            };
    +        }
    + 
    +        if (ch1 === '>' && ch2 === '>' && ch3 === '=') {
    +            index += 3;
    +            return {
    +                type: Token.Punctuator,
    +                value: '>>=',
    +                lineNumber: lineNumber,
    +                lineStart: lineStart,
    +                range: [start, index]
    +            };
    +        }
    + 
    +        // Other 2-character punctuators: ++ -- << >> && ||
    + 
    +        if (ch1 === ch2 && ('+-<>&|'.indexOf(ch1) >= 0)) {
    +            index += 2;
    +            return {
    +                type: Token.Punctuator,
    +                value: ch1 + ch2,
    +                lineNumber: lineNumber,
    +                lineStart: lineStart,
    +                range: [start, index]
    +            };
    +        }
    + 
    +        if ('<>=!+-*%&|^/'.indexOf(ch1) >= 0) {
    +            ++index;
    +            return {
    +                type: Token.Punctuator,
    +                value: ch1,
    +                lineNumber: lineNumber,
    +                lineStart: lineStart,
    +                range: [start, index]
    +            };
    +        }
    + 
    +        throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +    }
    + 
    +    // 7.8.3 Numeric Literals
    + 
    +    function scanNumericLiteral() {
    +        var number, start, ch;
    + 
    +        ch = source[index];
    +        assert(isDecimalDigit(ch.charCodeAt(0)) || (ch === '.'),
    +            'Numeric literal must start with a decimal digit or a decimal point');
    + 
    +        start = index;
    +        number = '';
    +        if (ch !== '.') {
    +            number = source[index++];
    +            ch = source[index];
    + 
    +            // Hex number starts with '0x'.
    +            // Octal number starts with '0'.
    +            if (number === '0') {
    +                if (ch === 'x' || ch === 'X') {
    +                    number += source[index++];
    +                    while (index < length) {
    +                        ch = source[index];
    +                        if (!isHexDigit(ch)) {
    +                            break;
    +                        }
    +                        number += source[index++];
    +                    }
    + 
    +                    if (number.length <= 2) {
    +                        // only 0x
    +                        throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +                    }
    + 
    +                    if (index < length) {
    +                        ch = source[index];
    +                        if (isIdentifierStart(ch.charCodeAt(0))) {
    +                            throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +                        }
    +                    }
    +                    return {
    +                        type: Token.NumericLiteral,
    +                        value: parseInt(number, 16),
    +                        lineNumber: lineNumber,
    +                        lineStart: lineStart,
    +                        range: [start, index]
    +                    };
    +                }
    +                if (isOctalDigit(ch)) {
    +                    number += source[index++];
    +                    while (index < length) {
    +                        ch = source[index];
    +                        if (!isOctalDigit(ch)) {
    +                            break;
    +                        }
    +                        number += source[index++];
    +                    }
    + 
    +                    if (index < length) {
    +                        ch = source.charCodeAt(index);
    +                        if (isIdentifierStart(ch) || isDecimalDigit(ch)) {
    +                            throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +                        }
    +                    }
    +                    return {
    +                        type: Token.NumericLiteral,
    +                        value: parseInt(number, 8),
    +                        octal: true,
    +                        lineNumber: lineNumber,
    +                        lineStart: lineStart,
    +                        range: [start, index]
    +                    };
    +                }
    + 
    +                // decimal number starts with '0' such as '09' is illegal.
    +                if (ch && isDecimalDigit(ch.charCodeAt(0))) {
    +                    throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +                }
    +            }
    + 
    +            while (index < length) {
    +                if (!isDecimalDigit(source.charCodeAt(index))) {
    +                    ch = source[index];
    +                    break;
    +                }
    +                number += source[index++];
    +            }
    +        }
    + 
    +        if (ch === '.') {
    +            number += source[index++];
    +            while (index < length) {
    +                if (!isDecimalDigit(source.charCodeAt(index))) {
    +                    ch = source[index];
    +                    break;
    +                }
    +                number += source[index++];
    +            }
    +        }
    + 
    +        if (ch === 'e' || ch === 'E') {
    +            number += source[index++];
    + 
    +            ch = source[index];
    +            if (ch === '+' || ch === '-') {
    +                number += source[index++];
    +            }
    + 
    +            ch = source[index];
    +            if (ch && isDecimalDigit(ch.charCodeAt(0))) {
    +                number += source[index++];
    +                while (index < length) {
    +                    if (!isDecimalDigit(source.charCodeAt(index))) {
    +                        ch = source[index];
    +                        break;
    +                    }
    +                    number += source[index++];
    +                }
    +            } else {
    +                ch = 'character ' + ch;
    +                if (index >= length) {
    +                    ch = '<end>';
    +                }
    +                throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +            }
    +        }
    + 
    +        if (index < length) {
    +            if (isIdentifierStart(source.charCodeAt(index))) {
    +                throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +            }
    +        }
    + 
    +        return {
    +            type: Token.NumericLiteral,
    +            value: parseFloat(number),
    +            lineNumber: lineNumber,
    +            lineStart: lineStart,
    +            range: [start, index]
    +        };
    +    }
    + 
    +    // 7.8.4 String Literals
    + 
    +    function scanStringLiteral() {
    +        var str = '', quote, start, ch, code, unescaped, restore, octal = false;
    + 
    +        quote = source[index];
    +        assert((quote === '\'' || quote === '"'),
    +            'String literal must starts with a quote');
    + 
    +        start = index;
    +        ++index;
    + 
    +        while (index < length) {
    +            ch = source[index++];
    + 
    +            if (ch === quote) {
    +                quote = '';
    +                break;
    +            } else if (ch === '\\') {
    +                ch = source[index++];
    +                if (!ch || !isLineTerminator(ch.charCodeAt(0))) {
    +                    switch (ch) {
    +                    case 'n':
    +                        str += '\n';
    +                        break;
    +                    case 'r':
    +                        str += '\r';
    +                        break;
    +                    case 't':
    +                        str += '\t';
    +                        break;
    +                    case 'u':
    +                    case 'x':
    +                        restore = index;
    +                        unescaped = scanHexEscape(ch);
    +                        if (unescaped) {
    +                            str += unescaped;
    +                        } else {
    +                            index = restore;
    +                            str += ch;
    +                        }
    +                        break;
    +                    case 'b':
    +                        str += '\b';
    +                        break;
    +                    case 'f':
    +                        str += '\f';
    +                        break;
    +                    case 'v':
    +                        str += '\v';
    +                        break;
    + 
    +                    default:
    +                        if (isOctalDigit(ch)) {
    +                            code = '01234567'.indexOf(ch);
    + 
    +                            // \0 is not octal escape sequence
    +                            if (code !== 0) {
    +                                octal = true;
    +                            }
    + 
    +                            if (index < length && isOctalDigit(source[index])) {
    +                                octal = true;
    +                                code = code * 8 + '01234567'.indexOf(source[index++]);
    + 
    +                                // 3 digits are only allowed when string starts
    +                                // with 0, 1, 2, 3
    +                                if ('0123'.indexOf(ch) >= 0 &&
    +                                        index < length &&
    +                                        isOctalDigit(source[index])) {
    +                                    code = code * 8 + '01234567'.indexOf(source[index++]);
    +                                }
    +                            }
    +                            str += String.fromCharCode(code);
    +                        } else {
    +                            str += ch;
    +                        }
    +                        break;
    +                    }
    +                } else {
    +                    ++lineNumber;
    +                    if (ch ===  '\r' && source[index] === '\n') {
    +                        ++index;
    +                    }
    +                }
    +            } else if (isLineTerminator(ch.charCodeAt(0))) {
    +                break;
    +            } else {
    +                str += ch;
    +            }
    +        }
    + 
    +        if (quote !== '') {
    +            throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +        }
    + 
    +        return {
    +            type: Token.StringLiteral,
    +            value: str,
    +            octal: octal,
    +            lineNumber: lineNumber,
    +            lineStart: lineStart,
    +            range: [start, index]
    +        };
    +    }
    + 
    +    function scanRegExp() {
    +        var str, ch, start, pattern, flags, value, classMarker = false, restore, terminated = false;
    + 
    +        lookahead = null;
    +        skipComment();
    + 
    +        start = index;
    +        ch = source[index];
    +        assert(ch === '/', 'Regular expression literal must start with a slash');
    +        str = source[index++];
    + 
    +        while (index < length) {
    +            ch = source[index++];
    +            str += ch;
    +            if (classMarker) {
    +                if (ch === ']') {
    +                    classMarker = false;
    +                }
    +            } else {
    +                if (ch === '\\') {
    +                    ch = source[index++];
    +                    // ECMA-262 7.8.5
    +                    if (isLineTerminator(ch.charCodeAt(0))) {
    +                        throwError({}, Messages.UnterminatedRegExp);
    +                    }
    +                    str += ch;
    +                } else if (ch === '/') {
    +                    terminated = true;
    +                    break;
    +                } else if (ch === '[') {
    +                    classMarker = true;
    +                } else if (isLineTerminator(ch.charCodeAt(0))) {
    +                    throwError({}, Messages.UnterminatedRegExp);
    +                }
    +            }
    +        }
    + 
    +        if (!terminated) {
    +            throwError({}, Messages.UnterminatedRegExp);
    +        }
    + 
    +        // Exclude leading and trailing slash.
    +        pattern = str.substr(1, str.length - 2);
    + 
    +        flags = '';
    +        while (index < length) {
    +            ch = source[index];
    +            if (!isIdentifierPart(ch.charCodeAt(0))) {
    +                break;
    +            }
    + 
    +            ++index;
    +            if (ch === '\\' && index < length) {
    +                ch = source[index];
    +                if (ch === 'u') {
    +                    ++index;
    +                    restore = index;
    +                    ch = scanHexEscape('u');
    +                    if (ch) {
    +                        flags += ch;
    +                        for (str += '\\u'; restore < index; ++restore) {
    +                            str += source[restore];
    +                        }
    +                    } else {
    +                        index = restore;
    +                        flags += 'u';
    +                        str += '\\u';
    +                    }
    +                } else {
    +                    str += '\\';
    +                }
    +            } else {
    +                flags += ch;
    +                str += ch;
    +            }
    +        }
    + 
    +        try {
    +            value = new RegExp(pattern, flags);
    +        } catch (e) {
    +            throwError({}, Messages.InvalidRegExp);
    +        }
    + 
    +        peek();
    + 
    +        return {
    +            literal: str,
    +            value: value,
    +            range: [start, index]
    +        };
    +    }
    + 
    +    function isIdentifierName(token) {
    +        return token.type === Token.Identifier ||
    +            token.type === Token.Keyword ||
    +            token.type === Token.BooleanLiteral ||
    +            token.type === Token.NullLiteral;
    +    }
    + 
    +    function advance() {
    +        var ch;
    + 
    +        skipComment();
    + 
    +        if (index >= length) {
    +            return {
    +                type: Token.EOF,
    +                lineNumber: lineNumber,
    +                lineStart: lineStart,
    +                range: [index, index]
    +            };
    +        }
    + 
    +        ch = source.charCodeAt(index);
    + 
    +        // Very common: ( and ) and ;
    +        if (ch === 40 || ch === 41 || ch === 58) {
    +            return scanPunctuator();
    +        }
    + 
    +        // String literal starts with single quote (#39) or double quote (#34).
    +        if (ch === 39 || ch === 34) {
    +            return scanStringLiteral();
    +        }
    + 
    +        if (isIdentifierStart(ch)) {
    +            return scanIdentifier();
    +        }
    + 
    +        // Dot (.) char #46 can also start a floating-point number, hence the need
    +        // to check the next character.
    +        if (ch === 46) {
    +            if (isDecimalDigit(source.charCodeAt(index + 1))) {
    +                return scanNumericLiteral();
    +            }
    +            return scanPunctuator();
    +        }
    + 
    +        if (isDecimalDigit(ch)) {
    +            return scanNumericLiteral();
    +        }
    + 
    +        return scanPunctuator();
    +    }
    + 
    +    function lex() {
    +        var token;
    + 
    +        token = lookahead;
    +        index = token.range[1];
    +        lineNumber = token.lineNumber;
    +        lineStart = token.lineStart;
    + 
    +        lookahead = advance();
    + 
    +        index = token.range[1];
    +        lineNumber = token.lineNumber;
    +        lineStart = token.lineStart;
    + 
    +        return token;
    +    }
    + 
    +    function peek() {
    +        var pos, line, start;
    + 
    +        pos = index;
    +        line = lineNumber;
    +        start = lineStart;
    +        lookahead = advance();
    +        index = pos;
    +        lineNumber = line;
    +        lineStart = start;
    +    }
    + 
    +    SyntaxTreeDelegate = {
    + 
    +        name: 'SyntaxTree',
    + 
    +        createArrayExpression: function (elements) {
    +            return {
    +                type: Syntax.ArrayExpression,
    +                elements: elements
    +            };
    +        },
    + 
    +        createAssignmentExpression: function (operator, left, right) {
    +            return {
    +                type: Syntax.AssignmentExpression,
    +                operator: operator,
    +                left: left,
    +                right: right
    +            };
    +        },
    + 
    +        createBinaryExpression: function (operator, left, right) {
    +            var type = (operator === '||' || operator === '&&') ? Syntax.LogicalExpression :
    +                        Syntax.BinaryExpression;
    +            return {
    +                type: type,
    +                operator: operator,
    +                left: left,
    +                right: right
    +            };
    +        },
    + 
    +        createBlockStatement: function (body) {
    +            return {
    +                type: Syntax.BlockStatement,
    +                body: body
    +            };
    +        },
    + 
    +        createBreakStatement: function (label) {
    +            return {
    +                type: Syntax.BreakStatement,
    +                label: label
    +            };
    +        },
    + 
    +        createCallExpression: function (callee, args) {
    +            return {
    +                type: Syntax.CallExpression,
    +                callee: callee,
    +                'arguments': args
    +            };
    +        },
    + 
    +        createCatchClause: function (param, body) {
    +            return {
    +                type: Syntax.CatchClause,
    +                param: param,
    +                body: body
    +            };
    +        },
    + 
    +        createConditionalExpression: function (test, consequent, alternate) {
    +            return {
    +                type: Syntax.ConditionalExpression,
    +                test: test,
    +                consequent: consequent,
    +                alternate: alternate
    +            };
    +        },
    + 
    +        createContinueStatement: function (label) {
    +            return {
    +                type: Syntax.ContinueStatement,
    +                label: label
    +            };
    +        },
    + 
    +        createDebuggerStatement: function () {
    +            return {
    +                type: Syntax.DebuggerStatement
    +            };
    +        },
    + 
    +        createDoWhileStatement: function (body, test) {
    +            return {
    +                type: Syntax.DoWhileStatement,
    +                body: body,
    +                test: test
    +            };
    +        },
    + 
    +        createEmptyStatement: function () {
    +            return {
    +                type: Syntax.EmptyStatement
    +            };
    +        },
    + 
    +        createExpressionStatement: function (expression) {
    +            return {
    +                type: Syntax.ExpressionStatement,
    +                expression: expression
    +            };
    +        },
    + 
    +        createForStatement: function (init, test, update, body) {
    +            return {
    +                type: Syntax.ForStatement,
    +                init: init,
    +                test: test,
    +                update: update,
    +                body: body
    +            };
    +        },
    + 
    +        createForInStatement: function (left, right, body) {
    +            return {
    +                type: Syntax.ForInStatement,
    +                left: left,
    +                right: right,
    +                body: body,
    +                each: false
    +            };
    +        },
    + 
    +        createFunctionDeclaration: function (id, params, defaults, body) {
    +            return {
    +                type: Syntax.FunctionDeclaration,
    +                id: id,
    +                params: params,
    +                defaults: defaults,
    +                body: body,
    +                rest: null,
    +                generator: false,
    +                expression: false
    +            };
    +        },
    + 
    +        createFunctionExpression: function (id, params, defaults, body) {
    +            return {
    +                type: Syntax.FunctionExpression,
    +                id: id,
    +                params: params,
    +                defaults: defaults,
    +                body: body,
    +                rest: null,
    +                generator: false,
    +                expression: false
    +            };
    +        },
    + 
    +        createIdentifier: function (name) {
    +            return {
    +                type: Syntax.Identifier,
    +                name: name
    +            };
    +        },
    + 
    +        createIfStatement: function (test, consequent, alternate) {
    +            return {
    +                type: Syntax.IfStatement,
    +                test: test,
    +                consequent: consequent,
    +                alternate: alternate
    +            };
    +        },
    + 
    +        createLabeledStatement: function (label, body) {
    +            return {
    +                type: Syntax.LabeledStatement,
    +                label: label,
    +                body: body
    +            };
    +        },
    + 
    +        createLiteral: function (token) {
    +            return {
    +                type: Syntax.Literal,
    +                value: token.value,
    +                raw: source.slice(token.range[0], token.range[1])
    +            };
    +        },
    + 
    +        createMemberExpression: function (accessor, object, property) {
    +            return {
    +                type: Syntax.MemberExpression,
    +                computed: accessor === '[',
    +                object: object,
    +                property: property
    +            };
    +        },
    + 
    +        createNewExpression: function (callee, args) {
    +            return {
    +                type: Syntax.NewExpression,
    +                callee: callee,
    +                'arguments': args
    +            };
    +        },
    + 
    +        createObjectExpression: function (properties) {
    +            return {
    +                type: Syntax.ObjectExpression,
    +                properties: properties
    +            };
    +        },
    + 
    +        createPostfixExpression: function (operator, argument) {
    +            return {
    +                type: Syntax.UpdateExpression,
    +                operator: operator,
    +                argument: argument,
    +                prefix: false
    +            };
    +        },
    + 
    +        createProgram: function (body) {
    +            return {
    +                type: Syntax.Program,
    +                body: body
    +            };
    +        },
    + 
    +        createProperty: function (kind, key, value) {
    +            return {
    +                type: Syntax.Property,
    +                key: key,
    +                value: value,
    +                kind: kind
    +            };
    +        },
    + 
    +        createReturnStatement: function (argument) {
    +            return {
    +                type: Syntax.ReturnStatement,
    +                argument: argument
    +            };
    +        },
    + 
    +        createSequenceExpression: function (expressions) {
    +            return {
    +                type: Syntax.SequenceExpression,
    +                expressions: expressions
    +            };
    +        },
    + 
    +        createSwitchCase: function (test, consequent) {
    +            return {
    +                type: Syntax.SwitchCase,
    +                test: test,
    +                consequent: consequent
    +            };
    +        },
    + 
    +        createSwitchStatement: function (discriminant, cases) {
    +            return {
    +                type: Syntax.SwitchStatement,
    +                discriminant: discriminant,
    +                cases: cases
    +            };
    +        },
    + 
    +        createThisExpression: function () {
    +            return {
    +                type: Syntax.ThisExpression
    +            };
    +        },
    + 
    +        createThrowStatement: function (argument) {
    +            return {
    +                type: Syntax.ThrowStatement,
    +                argument: argument
    +            };
    +        },
    + 
    +        createTryStatement: function (block, guardedHandlers, handlers, finalizer) {
    +            return {
    +                type: Syntax.TryStatement,
    +                block: block,
    +                guardedHandlers: guardedHandlers,
    +                handlers: handlers,
    +                finalizer: finalizer
    +            };
    +        },
    + 
    +        createUnaryExpression: function (operator, argument) {
    +            if (operator === '++' || operator === '--') {
    +                return {
    +                    type: Syntax.UpdateExpression,
    +                    operator: operator,
    +                    argument: argument,
    +                    prefix: true
    +                };
    +            }
    +            return {
    +                type: Syntax.UnaryExpression,
    +                operator: operator,
    +                argument: argument
    +            };
    +        },
    + 
    +        createVariableDeclaration: function (declarations, kind) {
    +            return {
    +                type: Syntax.VariableDeclaration,
    +                declarations: declarations,
    +                kind: kind
    +            };
    +        },
    + 
    +        createVariableDeclarator: function (id, init) {
    +            return {
    +                type: Syntax.VariableDeclarator,
    +                id: id,
    +                init: init
    +            };
    +        },
    + 
    +        createWhileStatement: function (test, body) {
    +            return {
    +                type: Syntax.WhileStatement,
    +                test: test,
    +                body: body
    +            };
    +        },
    + 
    +        createWithStatement: function (object, body) {
    +            return {
    +                type: Syntax.WithStatement,
    +                object: object,
    +                body: body
    +            };
    +        }
    +    };
    + 
    +    // Return true if there is a line terminator before the next token.
    + 
    +    function peekLineTerminator() {
    +        var pos, line, start, found;
    + 
    +        pos = index;
    +        line = lineNumber;
    +        start = lineStart;
    +        skipComment();
    +        found = lineNumber !== line;
    +        index = pos;
    +        lineNumber = line;
    +        lineStart = start;
    + 
    +        return found;
    +    }
    + 
    +    // Throw an exception
    + 
    +    function throwError(token, messageFormat) {
    +        var error,
    +            args = Array.prototype.slice.call(arguments, 2),
    +            msg = messageFormat.replace(
    +                /%(\d)/g,
    +                function (whole, index) {
    +                    assert(index < args.length, 'Message reference must be in range');
    +                    return args[index];
    +                }
    +            );
    + 
    +        if (typeof token.lineNumber === 'number') {
    +            error = new Error('Line ' + token.lineNumber + ': ' + msg);
    +            error.index = token.range[0];
    +            error.lineNumber = token.lineNumber;
    +            error.column = token.range[0] - lineStart + 1;
    +        } else {
    +            error = new Error('Line ' + lineNumber + ': ' + msg);
    +            error.index = index;
    +            error.lineNumber = lineNumber;
    +            error.column = index - lineStart + 1;
    +        }
    + 
    +        error.description = msg;
    +        throw error;
    +    }
    + 
    +    function throwErrorTolerant() {
    +        try {
    +            throwError.apply(null, arguments);
    +        } catch (e) {
    +            if (extra.errors) {
    +                extra.errors.push(e);
    +            } else {
    +                throw e;
    +            }
    +        }
    +    }
    + 
    + 
    +    // Throw an exception because of the token.
    + 
    +    function throwUnexpected(token) {
    +        if (token.type === Token.EOF) {
    +            throwError(token, Messages.UnexpectedEOS);
    +        }
    + 
    +        if (token.type === Token.NumericLiteral) {
    +            throwError(token, Messages.UnexpectedNumber);
    +        }
    + 
    +        if (token.type === Token.StringLiteral) {
    +            throwError(token, Messages.UnexpectedString);
    +        }
    + 
    +        if (token.type === Token.Identifier) {
    +            throwError(token, Messages.UnexpectedIdentifier);
    +        }
    + 
    +        if (token.type === Token.Keyword) {
    +            if (isFutureReservedWord(token.value)) {
    +                throwError(token, Messages.UnexpectedReserved);
    +            } else if (strict && isStrictModeReservedWord(token.value)) {
    +                throwErrorTolerant(token, Messages.StrictReservedWord);
    +                return;
    +            }
    +            throwError(token, Messages.UnexpectedToken, token.value);
    +        }
    + 
    +        // BooleanLiteral, NullLiteral, or Punctuator.
    +        throwError(token, Messages.UnexpectedToken, token.value);
    +    }
    + 
    +    // Expect the next token to match the specified punctuator.
    +    // If not, an exception will be thrown.
    + 
    +    function expect(value) {
    +        var token = lex();
    +        if (token.type !== Token.Punctuator || token.value !== value) {
    +            throwUnexpected(token);
    +        }
    +    }
    + 
    +    // Expect the next token to match the specified keyword.
    +    // If not, an exception will be thrown.
    + 
    +    function expectKeyword(keyword) {
    +        var token = lex();
    +        if (token.type !== Token.Keyword || token.value !== keyword) {
    +            throwUnexpected(token);
    +        }
    +    }
    + 
    +    // Return true if the next token matches the specified punctuator.
    + 
    +    function match(value) {
    +        return lookahead.type === Token.Punctuator && lookahead.value === value;
    +    }
    + 
    +    // Return true if the next token matches the specified keyword
    + 
    +    function matchKeyword(keyword) {
    +        return lookahead.type === Token.Keyword && lookahead.value === keyword;
    +    }
    + 
    +    // Return true if the next token is an assignment operator
    + 
    +    function matchAssign() {
    +        var op;
    + 
    +        if (lookahead.type !== Token.Punctuator) {
    +            return false;
    +        }
    +        op = lookahead.value;
    +        return op === '=' ||
    +            op === '*=' ||
    +            op === '/=' ||
    +            op === '%=' ||
    +            op === '+=' ||
    +            op === '-=' ||
    +            op === '<<=' ||
    +            op === '>>=' ||
    +            op === '>>>=' ||
    +            op === '&=' ||
    +            op === '^=' ||
    +            op === '|=';
    +    }
    + 
    +    function consumeSemicolon() {
    +        var line;
    + 
    +        // Catch the very common case first: immediately a semicolon (char #59).
    +        if (source.charCodeAt(index) === 59) {
    +            lex();
    +            return;
    +        }
    + 
    +        line = lineNumber;
    +        skipComment();
    +        if (lineNumber !== line) {
    +            return;
    +        }
    + 
    +        if (match(';')) {
    +            lex();
    +            return;
    +        }
    + 
    +        if (lookahead.type !== Token.EOF && !match('}')) {
    +            throwUnexpected(lookahead);
    +        }
    +    }
    + 
    +    // Return true if provided expression is LeftHandSideExpression
    + 
    +    function isLeftHandSide(expr) {
    +        return expr.type === Syntax.Identifier || expr.type === Syntax.MemberExpression;
    +    }
    + 
    +    // 11.1.4 Array Initialiser
    + 
    +    function parseArrayInitialiser() {
    +        var elements = [];
    + 
    +        expect('[');
    + 
    +        while (!match(']')) {
    +            if (match(',')) {
    +                lex();
    +                elements.push(null);
    +            } else {
    +                elements.push(parseAssignmentExpression());
    + 
    +                if (!match(']')) {
    +                    expect(',');
    +                }
    +            }
    +        }
    + 
    +        expect(']');
    + 
    +        return delegate.createArrayExpression(elements);
    +    }
    + 
    +    // 11.1.5 Object Initialiser
    + 
    +    function parsePropertyFunction(param, first) {
    +        var previousStrict, body;
    + 
    +        previousStrict = strict;
    +        body = parseFunctionSourceElements();
    +        if (first && strict && isRestrictedWord(param[0].name)) {
    +            throwErrorTolerant(first, Messages.StrictParamName);
    +        }
    +        strict = previousStrict;
    +        return delegate.createFunctionExpression(null, param, [], body);
    +    }
    + 
    +    function parseObjectPropertyKey() {
    +        var token = lex();
    + 
    +        // Note: This function is called only from parseObjectProperty(), where
    +        // EOF and Punctuator tokens are already filtered out.
    + 
    +        if (token.type === Token.StringLiteral || token.type === Token.NumericLiteral) {
    +            if (strict && token.octal) {
    +                throwErrorTolerant(token, Messages.StrictOctalLiteral);
    +            }
    +            return delegate.createLiteral(token);
    +        }
    + 
    +        return delegate.createIdentifier(token.value);
    +    }
    + 
    +    function parseObjectProperty() {
    +        var token, key, id, value, param;
    + 
    +        token = lookahead;
    + 
    +        if (token.type === Token.Identifier) {
    + 
    +            id = parseObjectPropertyKey();
    + 
    +            // Property Assignment: Getter and Setter.
    + 
    +            if (token.value === 'get' && !match(':')) {
    +                key = parseObjectPropertyKey();
    +                expect('(');
    +                expect(')');
    +                value = parsePropertyFunction([]);
    +                return delegate.createProperty('get', key, value);
    +            }
    +            if (token.value === 'set' && !match(':')) {
    +                key = parseObjectPropertyKey();
    +                expect('(');
    +                token = lookahead;
    +                if (token.type !== Token.Identifier) {
    +                    throwUnexpected(lex());
    +                }
    +                param = [ parseVariableIdentifier() ];
    +                expect(')');
    +                value = parsePropertyFunction(param, token);
    +                return delegate.createProperty('set', key, value);
    +            }
    +            expect(':');
    +            value = parseAssignmentExpression();
    +            return delegate.createProperty('init', id, value);
    +        }
    +        if (token.type === Token.EOF || token.type === Token.Punctuator) {
    +            throwUnexpected(token);
    +        } else {
    +            key = parseObjectPropertyKey();
    +            expect(':');
    +            value = parseAssignmentExpression();
    +            return delegate.createProperty('init', key, value);
    +        }
    +    }
    + 
    +    function parseObjectInitialiser() {
    +        var properties = [], property, name, key, kind, map = {}, toString = String;
    + 
    +        expect('{');
    + 
    +        while (!match('}')) {
    +            property = parseObjectProperty();
    + 
    +            if (property.key.type === Syntax.Identifier) {
    +                name = property.key.name;
    +            } else {
    +                name = toString(property.key.value);
    +            }
    +            kind = (property.kind === 'init') ? PropertyKind.Data : (property.kind === 'get') ? PropertyKind.Get : PropertyKind.Set;
    + 
    +            key = '$' + name;
    +            if (Object.prototype.hasOwnProperty.call(map, key)) {
    +                if (map[key] === PropertyKind.Data) {
    +                    if (strict && kind === PropertyKind.Data) {
    +                        throwErrorTolerant({}, Messages.StrictDuplicateProperty);
    +                    } else if (kind !== PropertyKind.Data) {
    +                        throwErrorTolerant({}, Messages.AccessorDataProperty);
    +                    }
    +                } else {
    +                    if (kind === PropertyKind.Data) {
    +                        throwErrorTolerant({}, Messages.AccessorDataProperty);
    +                    } else if (map[key] & kind) {
    +                        throwErrorTolerant({}, Messages.AccessorGetSet);
    +                    }
    +                }
    +                map[key] |= kind;
    +            } else {
    +                map[key] = kind;
    +            }
    + 
    +            properties.push(property);
    + 
    +            if (!match('}')) {
    +                expect(',');
    +            }
    +        }
    + 
    +        expect('}');
    + 
    +        return delegate.createObjectExpression(properties);
    +    }
    + 
    +    // 11.1.6 The Grouping Operator
    + 
    +    function parseGroupExpression() {
    +        var expr;
    + 
    +        expect('(');
    + 
    +        expr = parseExpression();
    + 
    +        expect(')');
    + 
    +        return expr;
    +    }
    + 
    + 
    +    // 11.1 Primary Expressions
    + 
    +    function parsePrimaryExpression() {
    +        var type, token;
    + 
    +        type = lookahead.type;
    + 
    +        if (type === Token.Identifier) {
    +            return delegate.createIdentifier(lex().value);
    +        }
    + 
    +        if (type === Token.StringLiteral || type === Token.NumericLiteral) {
    +            if (strict && lookahead.octal) {
    +                throwErrorTolerant(lookahead, Messages.StrictOctalLiteral);
    +            }
    +            return delegate.createLiteral(lex());
    +        }
    + 
    +        if (type === Token.Keyword) {
    +            if (matchKeyword('this')) {
    +                lex();
    +                return delegate.createThisExpression();
    +            }
    + 
    +            if (matchKeyword('function')) {
    +                return parseFunctionExpression();
    +            }
    +        }
    + 
    +        if (type === Token.BooleanLiteral) {
    +            token = lex();
    +            token.value = (token.value === 'true');
    +            return delegate.createLiteral(token);
    +        }
    + 
    +        if (type === Token.NullLiteral) {
    +            token = lex();
    +            token.value = null;
    +            return delegate.createLiteral(token);
    +        }
    + 
    +        if (match('[')) {
    +            return parseArrayInitialiser();
    +        }
    + 
    +        if (match('{')) {
    +            return parseObjectInitialiser();
    +        }
    + 
    +        if (match('(')) {
    +            return parseGroupExpression();
    +        }
    + 
    +        if (match('/') || match('/=')) {
    +            return delegate.createLiteral(scanRegExp());
    +        }
    + 
    +        return throwUnexpected(lex());
    +    }
    + 
    +    // 11.2 Left-Hand-Side Expressions
    + 
    +    function parseArguments() {
    +        var args = [];
    + 
    +        expect('(');
    + 
    +        if (!match(')')) {
    +            while (index < length) {
    +                args.push(parseAssignmentExpression());
    +                if (match(')')) {
    +                    break;
    +                }
    +                expect(',');
    +            }
    +        }
    + 
    +        expect(')');
    + 
    +        return args;
    +    }
    + 
    +    function parseNonComputedProperty() {
    +        var token = lex();
    + 
    +        if (!isIdentifierName(token)) {
    +            throwUnexpected(token);
    +        }
    + 
    +        return delegate.createIdentifier(token.value);
    +    }
    + 
    +    function parseNonComputedMember() {
    +        expect('.');
    + 
    +        return parseNonComputedProperty();
    +    }
    + 
    +    function parseComputedMember() {
    +        var expr;
    + 
    +        expect('[');
    + 
    +        expr = parseExpression();
    + 
    +        expect(']');
    + 
    +        return expr;
    +    }
    + 
    +    function parseNewExpression() {
    +        var callee, args;
    + 
    +        expectKeyword('new');
    +        callee = parseLeftHandSideExpression();
    +        args = match('(') ? parseArguments() : [];
    + 
    +        return delegate.createNewExpression(callee, args);
    +    }
    + 
    +    function parseLeftHandSideExpressionAllowCall() {
    +        var expr, args, property;
    + 
    +        expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression();
    + 
    +        while (match('.') || match('[') || match('(')) {
    +            if (match('(')) {
    +                args = parseArguments();
    +                expr = delegate.createCallExpression(expr, args);
    +            } else if (match('[')) {
    +                property = parseComputedMember();
    +                expr = delegate.createMemberExpression('[', expr, property);
    +            } else {
    +                property = parseNonComputedMember();
    +                expr = delegate.createMemberExpression('.', expr, property);
    +            }
    +        }
    + 
    +        return expr;
    +    }
    + 
    + 
    +    function parseLeftHandSideExpression() {
    +        var expr, property;
    + 
    +        expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression();
    + 
    +        while (match('.') || match('[')) {
    +            if (match('[')) {
    +                property = parseComputedMember();
    +                expr = delegate.createMemberExpression('[', expr, property);
    +            } else {
    +                property = parseNonComputedMember();
    +                expr = delegate.createMemberExpression('.', expr, property);
    +            }
    +        }
    + 
    +        return expr;
    +    }
    + 
    +    // 11.3 Postfix Expressions
    + 
    +    function parsePostfixExpression() {
    +        var expr = parseLeftHandSideExpressionAllowCall(), token;
    + 
    +        if (lookahead.type !== Token.Punctuator) {
    +            return expr;
    +        }
    + 
    +        if ((match('++') || match('--')) && !peekLineTerminator()) {
    +            // 11.3.1, 11.3.2
    +            if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) {
    +                throwErrorTolerant({}, Messages.StrictLHSPostfix);
    +            }
    + 
    +            if (!isLeftHandSide(expr)) {
    +                throwError({}, Messages.InvalidLHSInAssignment);
    +            }
    + 
    +            token = lex();
    +            expr = delegate.createPostfixExpression(token.value, expr);
    +        }
    + 
    +        return expr;
    +    }
    + 
    +    // 11.4 Unary Operators
    + 
    +    function parseUnaryExpression() {
    +        var token, expr;
    + 
    +        if (lookahead.type !== Token.Punctuator && lookahead.type !== Token.Keyword) {
    +            return parsePostfixExpression();
    +        }
    + 
    +        if (match('++') || match('--')) {
    +            token = lex();
    +            expr = parseUnaryExpression();
    +            // 11.4.4, 11.4.5
    +            if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) {
    +                throwErrorTolerant({}, Messages.StrictLHSPrefix);
    +            }
    + 
    +            if (!isLeftHandSide(expr)) {
    +                throwError({}, Messages.InvalidLHSInAssignment);
    +            }
    + 
    +            return delegate.createUnaryExpression(token.value, expr);
    +        }
    + 
    +        if (match('+') || match('-') || match('~') || match('!')) {
    +            token = lex();
    +            expr = parseUnaryExpression();
    +            return delegate.createUnaryExpression(token.value, expr);
    +        }
    + 
    +        if (matchKeyword('delete') || matchKeyword('void') || matchKeyword('typeof')) {
    +            token = lex();
    +            expr = parseUnaryExpression();
    +            expr = delegate.createUnaryExpression(token.value, expr);
    +            if (strict && expr.operator === 'delete' && expr.argument.type === Syntax.Identifier) {
    +                throwErrorTolerant({}, Messages.StrictDelete);
    +            }
    +            return expr;
    +        }
    + 
    +        return parsePostfixExpression();
    +    }
    + 
    +    function binaryPrecedence(token, allowIn) {
    +        var prec = 0;
    + 
    +        if (token.type !== Token.Punctuator && token.type !== Token.Keyword) {
    +            return 0;
    +        }
    + 
    +        switch (token.value) {
    +        case '||':
    +            prec = 1;
    +            break;
    + 
    +        case '&&':
    +            prec = 2;
    +            break;
    + 
    +        case '|':
    +            prec = 3;
    +            break;
    + 
    +        case '^':
    +            prec = 4;
    +            break;
    + 
    +        case '&':
    +            prec = 5;
    +            break;
    + 
    +        case '==':
    +        case '!=':
    +        case '===':
    +        case '!==':
    +            prec = 6;
    +            break;
    + 
    +        case '<':
    +        case '>':
    +        case '<=':
    +        case '>=':
    +        case 'instanceof':
    +            prec = 7;
    +            break;
    + 
    +        case 'in':
    +            prec = allowIn ? 7 : 0;
    +            break;
    + 
    +        case '<<':
    +        case '>>':
    +        case '>>>':
    +            prec = 8;
    +            break;
    + 
    +        case '+':
    +        case '-':
    +            prec = 9;
    +            break;
    + 
    +        case '*':
    +        case '/':
    +        case '%':
    +            prec = 11;
    +            break;
    + 
    +        default:
    +            break;
    +        }
    + 
    +        return prec;
    +    }
    + 
    +    // 11.5 Multiplicative Operators
    +    // 11.6 Additive Operators
    +    // 11.7 Bitwise Shift Operators
    +    // 11.8 Relational Operators
    +    // 11.9 Equality Operators
    +    // 11.10 Binary Bitwise Operators
    +    // 11.11 Binary Logical Operators
    + 
    +    function parseBinaryExpression() {
    +        var expr, token, prec, previousAllowIn, stack, right, operator, left, i;
    + 
    +        previousAllowIn = state.allowIn;
    +        state.allowIn = true;
    + 
    +        expr = parseUnaryExpression();
    + 
    +        token = lookahead;
    +        prec = binaryPrecedence(token, previousAllowIn);
    +        if (prec === 0) {
    +            return expr;
    +        }
    +        token.prec = prec;
    +        lex();
    + 
    +        stack = [expr, token, parseUnaryExpression()];
    + 
    +        while ((prec = binaryPrecedence(lookahead, previousAllowIn)) > 0) {
    + 
    +            // Reduce: make a binary expression from the three topmost entries.
    +            while ((stack.length > 2) && (prec <= stack[stack.length - 2].prec)) {
    +                right = stack.pop();
    +                operator = stack.pop().value;
    +                left = stack.pop();
    +                stack.push(delegate.createBinaryExpression(operator, left, right));
    +            }
    + 
    +            // Shift.
    +            token = lex();
    +            token.prec = prec;
    +            stack.push(token);
    +            stack.push(parseUnaryExpression());
    +        }
    + 
    +        state.allowIn = previousAllowIn;
    + 
    +        // Final reduce to clean-up the stack.
    +        i = stack.length - 1;
    +        expr = stack[i];
    +        while (i > 1) {
    +            expr = delegate.createBinaryExpression(stack[i - 1].value, stack[i - 2], expr);
    +            i -= 2;
    +        }
    +        return expr;
    +    }
    + 
    + 
    +    // 11.12 Conditional Operator
    + 
    +    function parseConditionalExpression() {
    +        var expr, previousAllowIn, consequent, alternate;
    + 
    +        expr = parseBinaryExpression();
    + 
    +        if (match('?')) {
    +            lex();
    +            previousAllowIn = state.allowIn;
    +            state.allowIn = true;
    +            consequent = parseAssignmentExpression();
    +            state.allowIn = previousAllowIn;
    +            expect(':');
    +            alternate = parseAssignmentExpression();
    + 
    +            expr = delegate.createConditionalExpression(expr, consequent, alternate);
    +        }
    + 
    +        return expr;
    +    }
    + 
    +    // 11.13 Assignment Operators
    + 
    +    function parseAssignmentExpression() {
    +        var token, left, right;
    + 
    +        token = lookahead;
    +        left = parseConditionalExpression();
    + 
    +        if (matchAssign()) {
    +            // LeftHandSideExpression
    +            if (!isLeftHandSide(left)) {
    +                throwError({}, Messages.InvalidLHSInAssignment);
    +            }
    + 
    +            // 11.13.1
    +            if (strict && left.type === Syntax.Identifier && isRestrictedWord(left.name)) {
    +                throwErrorTolerant(token, Messages.StrictLHSAssignment);
    +            }
    + 
    +            token = lex();
    +            right = parseAssignmentExpression();
    +            return delegate.createAssignmentExpression(token.value, left, right);
    +        }
    + 
    +        return left;
    +    }
    + 
    +    // 11.14 Comma Operator
    + 
    +    function parseExpression() {
    +        var expr = parseAssignmentExpression();
    + 
    +        if (match(',')) {
    +            expr = delegate.createSequenceExpression([ expr ]);
    + 
    +            while (index < length) {
    +                if (!match(',')) {
    +                    break;
    +                }
    +                lex();
    +                expr.expressions.push(parseAssignmentExpression());
    +            }
    + 
    +        }
    +        return expr;
    +    }
    + 
    +    // 12.1 Block
    + 
    +    function parseStatementList() {
    +        var list = [],
    +            statement;
    + 
    +        while (index < length) {
    +            if (match('}')) {
    +                break;
    +            }
    +            statement = parseSourceElement();
    +            if (typeof statement === 'undefined') {
    +                break;
    +            }
    +            list.push(statement);
    +        }
    + 
    +        return list;
    +    }
    + 
    +    function parseBlock() {
    +        var block;
    + 
    +        expect('{');
    + 
    +        block = parseStatementList();
    + 
    +        expect('}');
    + 
    +        return delegate.createBlockStatement(block);
    +    }
    + 
    +    // 12.2 Variable Statement
    + 
    +    function parseVariableIdentifier() {
    +        var token = lex();
    + 
    +        if (token.type !== Token.Identifier) {
    +            throwUnexpected(token);
    +        }
    + 
    +        return delegate.createIdentifier(token.value);
    +    }
    + 
    +    function parseVariableDeclaration(kind) {
    +        var id = parseVariableIdentifier(),
    +            init = null;
    + 
    +        // 12.2.1
    +        if (strict && isRestrictedWord(id.name)) {
    +            throwErrorTolerant({}, Messages.StrictVarName);
    +        }
    + 
    +        if (kind === 'const') {
    +            expect('=');
    +            init = parseAssignmentExpression();
    +        } else if (match('=')) {
    +            lex();
    +            init = parseAssignmentExpression();
    +        }
    + 
    +        return delegate.createVariableDeclarator(id, init);
    +    }
    + 
    +    function parseVariableDeclarationList(kind) {
    +        var list = [];
    + 
    +        do {
    +            list.push(parseVariableDeclaration(kind));
    +            if (!match(',')) {
    +                break;
    +            }
    +            lex();
    +        } while (index < length);
    + 
    +        return list;
    +    }
    + 
    +    function parseVariableStatement() {
    +        var declarations;
    + 
    +        expectKeyword('var');
    + 
    +        declarations = parseVariableDeclarationList();
    + 
    +        consumeSemicolon();
    + 
    +        return delegate.createVariableDeclaration(declarations, 'var');
    +    }
    + 
    +    // kind may be `const` or `let`
    +    // Both are experimental and not in the specification yet.
    +    // see http://wiki.ecmascript.org/doku.php?id=harmony:const
    +    // and http://wiki.ecmascript.org/doku.php?id=harmony:let
    +    function parseConstLetDeclaration(kind) {
    +        var declarations;
    + 
    +        expectKeyword(kind);
    + 
    +        declarations = parseVariableDeclarationList(kind);
    + 
    +        consumeSemicolon();
    + 
    +        return delegate.createVariableDeclaration(declarations, kind);
    +    }
    + 
    +    // 12.3 Empty Statement
    + 
    +    function parseEmptyStatement() {
    +        expect(';');
    +        return delegate.createEmptyStatement();
    +    }
    + 
    +    // 12.4 Expression Statement
    + 
    +    function parseExpressionStatement() {
    +        var expr = parseExpression();
    +        consumeSemicolon();
    +        return delegate.createExpressionStatement(expr);
    +    }
    + 
    +    // 12.5 If statement
    + 
    +    function parseIfStatement() {
    +        var test, consequent, alternate;
    + 
    +        expectKeyword('if');
    + 
    +        expect('(');
    + 
    +        test = parseExpression();
    + 
    +        expect(')');
    + 
    +        consequent = parseStatement();
    + 
    +        if (matchKeyword('else')) {
    +            lex();
    +            alternate = parseStatement();
    +        } else {
    +            alternate = null;
    +        }
    + 
    +        return delegate.createIfStatement(test, consequent, alternate);
    +    }
    + 
    +    // 12.6 Iteration Statements
    + 
    +    function parseDoWhileStatement() {
    +        var body, test, oldInIteration;
    + 
    +        expectKeyword('do');
    + 
    +        oldInIteration = state.inIteration;
    +        state.inIteration = true;
    + 
    +        body = parseStatement();
    + 
    +        state.inIteration = oldInIteration;
    + 
    +        expectKeyword('while');
    + 
    +        expect('(');
    + 
    +        test = parseExpression();
    + 
    +        expect(')');
    + 
    +        if (match(';')) {
    +            lex();
    +        }
    + 
    +        return delegate.createDoWhileStatement(body, test);
    +    }
    + 
    +    function parseWhileStatement() {
    +        var test, body, oldInIteration;
    + 
    +        expectKeyword('while');
    + 
    +        expect('(');
    + 
    +        test = parseExpression();
    + 
    +        expect(')');
    + 
    +        oldInIteration = state.inIteration;
    +        state.inIteration = true;
    + 
    +        body = parseStatement();
    + 
    +        state.inIteration = oldInIteration;
    + 
    +        return delegate.createWhileStatement(test, body);
    +    }
    + 
    +    function parseForVariableDeclaration() {
    +        var token = lex(),
    +            declarations = parseVariableDeclarationList();
    + 
    +        return delegate.createVariableDeclaration(declarations, token.value);
    +    }
    + 
    +    function parseForStatement() {
    +        var init, test, update, left, right, body, oldInIteration;
    + 
    +        init = test = update = null;
    + 
    +        expectKeyword('for');
    + 
    +        expect('(');
    + 
    +        if (match(';')) {
    +            lex();
    +        } else {
    +            if (matchKeyword('var') || matchKeyword('let')) {
    +                state.allowIn = false;
    +                init = parseForVariableDeclaration();
    +                state.allowIn = true;
    + 
    +                if (init.declarations.length === 1 && matchKeyword('in')) {
    +                    lex();
    +                    left = init;
    +                    right = parseExpression();
    +                    init = null;
    +                }
    +            } else {
    +                state.allowIn = false;
    +                init = parseExpression();
    +                state.allowIn = true;
    + 
    +                if (matchKeyword('in')) {
    +                    // LeftHandSideExpression
    +                    if (!isLeftHandSide(init)) {
    +                        throwError({}, Messages.InvalidLHSInForIn);
    +                    }
    + 
    +                    lex();
    +                    left = init;
    +                    right = parseExpression();
    +                    init = null;
    +                }
    +            }
    + 
    +            if (typeof left === 'undefined') {
    +                expect(';');
    +            }
    +        }
    + 
    +        if (typeof left === 'undefined') {
    + 
    +            if (!match(';')) {
    +                test = parseExpression();
    +            }
    +            expect(';');
    + 
    +            if (!match(')')) {
    +                update = parseExpression();
    +            }
    +        }
    + 
    +        expect(')');
    + 
    +        oldInIteration = state.inIteration;
    +        state.inIteration = true;
    + 
    +        body = parseStatement();
    + 
    +        state.inIteration = oldInIteration;
    + 
    +        return (typeof left === 'undefined') ?
    +                delegate.createForStatement(init, test, update, body) :
    +                delegate.createForInStatement(left, right, body);
    +    }
    + 
    +    // 12.7 The continue statement
    + 
    +    function parseContinueStatement() {
    +        var label = null, key;
    + 
    +        expectKeyword('continue');
    + 
    +        // Optimize the most common form: 'continue;'.
    +        if (source.charCodeAt(index) === 59) {
    +            lex();
    + 
    +            if (!state.inIteration) {
    +                throwError({}, Messages.IllegalContinue);
    +            }
    + 
    +            return delegate.createContinueStatement(null);
    +        }
    + 
    +        if (peekLineTerminator()) {
    +            if (!state.inIteration) {
    +                throwError({}, Messages.IllegalContinue);
    +            }
    + 
    +            return delegate.createContinueStatement(null);
    +        }
    + 
    +        if (lookahead.type === Token.Identifier) {
    +            label = parseVariableIdentifier();
    + 
    +            key = '$' + label.name;
    +            if (!Object.prototype.hasOwnProperty.call(state.labelSet, key)) {
    +                throwError({}, Messages.UnknownLabel, label.name);
    +            }
    +        }
    + 
    +        consumeSemicolon();
    + 
    +        if (label === null && !state.inIteration) {
    +            throwError({}, Messages.IllegalContinue);
    +        }
    + 
    +        return delegate.createContinueStatement(label);
    +    }
    + 
    +    // 12.8 The break statement
    + 
    +    function parseBreakStatement() {
    +        var label = null, key;
    + 
    +        expectKeyword('break');
    + 
    +        // Catch the very common case first: immediately a semicolon (char #59).
    +        if (source.charCodeAt(index) === 59) {
    +            lex();
    + 
    +            if (!(state.inIteration || state.inSwitch)) {
    +                throwError({}, Messages.IllegalBreak);
    +            }
    + 
    +            return delegate.createBreakStatement(null);
    +        }
    + 
    +        if (peekLineTerminator()) {
    +            if (!(state.inIteration || state.inSwitch)) {
    +                throwError({}, Messages.IllegalBreak);
    +            }
    + 
    +            return delegate.createBreakStatement(null);
    +        }
    + 
    +        if (lookahead.type === Token.Identifier) {
    +            label = parseVariableIdentifier();
    + 
    +            key = '$' + label.name;
    +            if (!Object.prototype.hasOwnProperty.call(state.labelSet, key)) {
    +                throwError({}, Messages.UnknownLabel, label.name);
    +            }
    +        }
    + 
    +        consumeSemicolon();
    + 
    +        if (label === null && !(state.inIteration || state.inSwitch)) {
    +            throwError({}, Messages.IllegalBreak);
    +        }
    + 
    +        return delegate.createBreakStatement(label);
    +    }
    + 
    +    // 12.9 The return statement
    + 
    +    function parseReturnStatement() {
    +        var argument = null;
    + 
    +        expectKeyword('return');
    + 
    +        if (!state.inFunctionBody) {
    +            throwErrorTolerant({}, Messages.IllegalReturn);
    +        }
    + 
    +        // 'return' followed by a space and an identifier is very common.
    +        if (source.charCodeAt(index) === 32) {
    +            if (isIdentifierStart(source.charCodeAt(index + 1))) {
    +                argument = parseExpression();
    +                consumeSemicolon();
    +                return delegate.createReturnStatement(argument);
    +            }
    +        }
    + 
    +        if (peekLineTerminator()) {
    +            return delegate.createReturnStatement(null);
    +        }
    + 
    +        if (!match(';')) {
    +            if (!match('}') && lookahead.type !== Token.EOF) {
    +                argument = parseExpression();
    +            }
    +        }
    + 
    +        consumeSemicolon();
    + 
    +        return delegate.createReturnStatement(argument);
    +    }
    + 
    +    // 12.10 The with statement
    + 
    +    function parseWithStatement() {
    +        var object, body;
    + 
    +        if (strict) {
    +            throwErrorTolerant({}, Messages.StrictModeWith);
    +        }
    + 
    +        expectKeyword('with');
    + 
    +        expect('(');
    + 
    +        object = parseExpression();
    + 
    +        expect(')');
    + 
    +        body = parseStatement();
    + 
    +        return delegate.createWithStatement(object, body);
    +    }
    + 
    +    // 12.10 The swith statement
    + 
    +    function parseSwitchCase() {
    +        var test,
    +            consequent = [],
    +            statement;
    + 
    +        if (matchKeyword('default')) {
    +            lex();
    +            test = null;
    +        } else {
    +            expectKeyword('case');
    +            test = parseExpression();
    +        }
    +        expect(':');
    + 
    +        while (index < length) {
    +            if (match('}') || matchKeyword('default') || matchKeyword('case')) {
    +                break;
    +            }
    +            statement = parseStatement();
    +            consequent.push(statement);
    +        }
    + 
    +        return delegate.createSwitchCase(test, consequent);
    +    }
    + 
    +    function parseSwitchStatement() {
    +        var discriminant, cases, clause, oldInSwitch, defaultFound;
    + 
    +        expectKeyword('switch');
    + 
    +        expect('(');
    + 
    +        discriminant = parseExpression();
    + 
    +        expect(')');
    + 
    +        expect('{');
    + 
    +        if (match('}')) {
    +            lex();
    +            return delegate.createSwitchStatement(discriminant);
    +        }
    + 
    +        cases = [];
    + 
    +        oldInSwitch = state.inSwitch;
    +        state.inSwitch = true;
    +        defaultFound = false;
    + 
    +        while (index < length) {
    +            if (match('}')) {
    +                break;
    +            }
    +            clause = parseSwitchCase();
    +            if (clause.test === null) {
    +                if (defaultFound) {
    +                    throwError({}, Messages.MultipleDefaultsInSwitch);
    +                }
    +                defaultFound = true;
    +            }
    +            cases.push(clause);
    +        }
    + 
    +        state.inSwitch = oldInSwitch;
    + 
    +        expect('}');
    + 
    +        return delegate.createSwitchStatement(discriminant, cases);
    +    }
    + 
    +    // 12.13 The throw statement
    + 
    +    function parseThrowStatement() {
    +        var argument;
    + 
    +        expectKeyword('throw');
    + 
    +        if (peekLineTerminator()) {
    +            throwError({}, Messages.NewlineAfterThrow);
    +        }
    + 
    +        argument = parseExpression();
    + 
    +        consumeSemicolon();
    + 
    +        return delegate.createThrowStatement(argument);
    +    }
    + 
    +    // 12.14 The try statement
    + 
    +    function parseCatchClause() {
    +        var param, body;
    + 
    +        expectKeyword('catch');
    + 
    +        expect('(');
    +        if (match(')')) {
    +            throwUnexpected(lookahead);
    +        }
    + 
    +        param = parseExpression();
    +        // 12.14.1
    +        if (strict && param.type === Syntax.Identifier && isRestrictedWord(param.name)) {
    +            throwErrorTolerant({}, Messages.StrictCatchVariable);
    +        }
    + 
    +        expect(')');
    +        body = parseBlock();
    +        return delegate.createCatchClause(param, body);
    +    }
    + 
    +    function parseTryStatement() {
    +        var block, handlers = [], finalizer = null;
    + 
    +        expectKeyword('try');
    + 
    +        block = parseBlock();
    + 
    +        if (matchKeyword('catch')) {
    +            handlers.push(parseCatchClause());
    +        }
    + 
    +        if (matchKeyword('finally')) {
    +            lex();
    +            finalizer = parseBlock();
    +        }
    + 
    +        if (handlers.length === 0 && !finalizer) {
    +            throwError({}, Messages.NoCatchOrFinally);
    +        }
    + 
    +        return delegate.createTryStatement(block, [], handlers, finalizer);
    +    }
    + 
    +    // 12.15 The debugger statement
    + 
    +    function parseDebuggerStatement() {
    +        expectKeyword('debugger');
    + 
    +        consumeSemicolon();
    + 
    +        return delegate.createDebuggerStatement();
    +    }
    + 
    +    // 12 Statements
    + 
    +    function parseStatement() {
    +        var type = lookahead.type,
    +            expr,
    +            labeledBody,
    +            key;
    + 
    +        if (type === Token.EOF) {
    +            throwUnexpected(lookahead);
    +        }
    + 
    +        if (type === Token.Punctuator) {
    +            switch (lookahead.value) {
    +            case ';':
    +                return parseEmptyStatement();
    +            case '{':
    +                return parseBlock();
    +            case '(':
    +                return parseExpressionStatement();
    +            default:
    +                break;
    +            }
    +        }
    + 
    +        if (type === Token.Keyword) {
    +            switch (lookahead.value) {
    +            case 'break':
    +                return parseBreakStatement();
    +            case 'continue':
    +                return parseContinueStatement();
    +            case 'debugger':
    +                return parseDebuggerStatement();
    +            case 'do':
    +                return parseDoWhileStatement();
    +            case 'for':
    +                return parseForStatement();
    +            case 'function':
    +                return parseFunctionDeclaration();
    +            case 'if':
    +                return parseIfStatement();
    +            case 'return':
    +                return parseReturnStatement();
    +            case 'switch':
    +                return parseSwitchStatement();
    +            case 'throw':
    +                return parseThrowStatement();
    +            case 'try':
    +                return parseTryStatement();
    +            case 'var':
    +                return parseVariableStatement();
    +            case 'while':
    +                return parseWhileStatement();
    +            case 'with':
    +                return parseWithStatement();
    +            default:
    +                break;
    +            }
    +        }
    + 
    +        expr = parseExpression();
    + 
    +        // 12.12 Labelled Statements
    +        if ((expr.type === Syntax.Identifier) && match(':')) {
    +            lex();
    + 
    +            key = '$' + expr.name;
    +            if (Object.prototype.hasOwnProperty.call(state.labelSet, key)) {
    +                throwError({}, Messages.Redeclaration, 'Label', expr.name);
    +            }
    + 
    +            state.labelSet[key] = true;
    +            labeledBody = parseStatement();
    +            delete state.labelSet[key];
    +            return delegate.createLabeledStatement(expr, labeledBody);
    +        }
    + 
    +        consumeSemicolon();
    + 
    +        return delegate.createExpressionStatement(expr);
    +    }
    + 
    +    // 13 Function Definition
    + 
    +    function parseFunctionSourceElements() {
    +        var sourceElement, sourceElements = [], token, directive, firstRestricted,
    +            oldLabelSet, oldInIteration, oldInSwitch, oldInFunctionBody;
    + 
    +        expect('{');
    + 
    +        while (index < length) {
    +            if (lookahead.type !== Token.StringLiteral) {
    +                break;
    +            }
    +            token = lookahead;
    + 
    +            sourceElement = parseSourceElement();
    +            sourceElements.push(sourceElement);
    +            if (sourceElement.expression.type !== Syntax.Literal) {
    +                // this is not directive
    +                break;
    +            }
    +            directive = source.slice(token.range[0] + 1, token.range[1] - 1);
    +            if (directive === 'use strict') {
    +                strict = true;
    +                if (firstRestricted) {
    +                    throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral);
    +                }
    +            } else {
    +                if (!firstRestricted && token.octal) {
    +                    firstRestricted = token;
    +                }
    +            }
    +        }
    + 
    +        oldLabelSet = state.labelSet;
    +        oldInIteration = state.inIteration;
    +        oldInSwitch = state.inSwitch;
    +        oldInFunctionBody = state.inFunctionBody;
    + 
    +        state.labelSet = {};
    +        state.inIteration = false;
    +        state.inSwitch = false;
    +        state.inFunctionBody = true;
    + 
    +        while (index < length) {
    +            if (match('}')) {
    +                break;
    +            }
    +            sourceElement = parseSourceElement();
    +            if (typeof sourceElement === 'undefined') {
    +                break;
    +            }
    +            sourceElements.push(sourceElement);
    +        }
    + 
    +        expect('}');
    + 
    +        state.labelSet = oldLabelSet;
    +        state.inIteration = oldInIteration;
    +        state.inSwitch = oldInSwitch;
    +        state.inFunctionBody = oldInFunctionBody;
    + 
    +        return delegate.createBlockStatement(sourceElements);
    +    }
    + 
    +    function parseParams(firstRestricted) {
    +        var param, params = [], token, stricted, paramSet, key, message;
    +        expect('(');
    + 
    +        if (!match(')')) {
    +            paramSet = {};
    +            while (index < length) {
    +                token = lookahead;
    +                param = parseVariableIdentifier();
    +                key = '$' + token.value;
    +                if (strict) {
    +                    if (isRestrictedWord(token.value)) {
    +                        stricted = token;
    +                        message = Messages.StrictParamName;
    +                    }
    +                    if (Object.prototype.hasOwnProperty.call(paramSet, key)) {
    +                        stricted = token;
    +                        message = Messages.StrictParamDupe;
    +                    }
    +                } else if (!firstRestricted) {
    +                    if (isRestrictedWord(token.value)) {
    +                        firstRestricted = token;
    +                        message = Messages.StrictParamName;
    +                    } else if (isStrictModeReservedWord(token.value)) {
    +                        firstRestricted = token;
    +                        message = Messages.StrictReservedWord;
    +                    } else if (Object.prototype.hasOwnProperty.call(paramSet, key)) {
    +                        firstRestricted = token;
    +                        message = Messages.StrictParamDupe;
    +                    }
    +                }
    +                params.push(param);
    +                paramSet[key] = true;
    +                if (match(')')) {
    +                    break;
    +                }
    +                expect(',');
    +            }
    +        }
    + 
    +        expect(')');
    + 
    +        return {
    +            params: params,
    +            stricted: stricted,
    +            firstRestricted: firstRestricted,
    +            message: message
    +        };
    +    }
    + 
    +    function parseFunctionDeclaration() {
    +        var id, params = [], body, token, stricted, tmp, firstRestricted, message, previousStrict;
    + 
    +        expectKeyword('function');
    +        token = lookahead;
    +        id = parseVariableIdentifier();
    +        if (strict) {
    +            if (isRestrictedWord(token.value)) {
    +                throwErrorTolerant(token, Messages.StrictFunctionName);
    +            }
    +        } else {
    +            if (isRestrictedWord(token.value)) {
    +                firstRestricted = token;
    +                message = Messages.StrictFunctionName;
    +            } else if (isStrictModeReservedWord(token.value)) {
    +                firstRestricted = token;
    +                message = Messages.StrictReservedWord;
    +            }
    +        }
    + 
    +        tmp = parseParams(firstRestricted);
    +        params = tmp.params;
    +        stricted = tmp.stricted;
    +        firstRestricted = tmp.firstRestricted;
    +        if (tmp.message) {
    +            message = tmp.message;
    +        }
    + 
    +        previousStrict = strict;
    +        body = parseFunctionSourceElements();
    +        if (strict && firstRestricted) {
    +            throwError(firstRestricted, message);
    +        }
    +        if (strict && stricted) {
    +            throwErrorTolerant(stricted, message);
    +        }
    +        strict = previousStrict;
    + 
    +        return delegate.createFunctionDeclaration(id, params, [], body);
    +    }
    + 
    +    function parseFunctionExpression() {
    +        var token, id = null, stricted, firstRestricted, message, tmp, params = [], body, previousStrict;
    + 
    +        expectKeyword('function');
    + 
    +        if (!match('(')) {
    +            token = lookahead;
    +            id = parseVariableIdentifier();
    +            if (strict) {
    +                if (isRestrictedWord(token.value)) {
    +                    throwErrorTolerant(token, Messages.StrictFunctionName);
    +                }
    +            } else {
    +                if (isRestrictedWord(token.value)) {
    +                    firstRestricted = token;
    +                    message = Messages.StrictFunctionName;
    +                } else if (isStrictModeReservedWord(token.value)) {
    +                    firstRestricted = token;
    +                    message = Messages.StrictReservedWord;
    +                }
    +            }
    +        }
    + 
    +        tmp = parseParams(firstRestricted);
    +        params = tmp.params;
    +        stricted = tmp.stricted;
    +        firstRestricted = tmp.firstRestricted;
    +        if (tmp.message) {
    +            message = tmp.message;
    +        }
    + 
    +        previousStrict = strict;
    +        body = parseFunctionSourceElements();
    +        if (strict && firstRestricted) {
    +            throwError(firstRestricted, message);
    +        }
    +        if (strict && stricted) {
    +            throwErrorTolerant(stricted, message);
    +        }
    +        strict = previousStrict;
    + 
    +        return delegate.createFunctionExpression(id, params, [], body);
    +    }
    + 
    +    // 14 Program
    + 
    +    function parseSourceElement() {
    +        if (lookahead.type === Token.Keyword) {
    +            switch (lookahead.value) {
    +            case 'const':
    +            case 'let':
    +                return parseConstLetDeclaration(lookahead.value);
    +            case 'function':
    +                return parseFunctionDeclaration();
    +            default:
    +                return parseStatement();
    +            }
    +        }
    + 
    +        if (lookahead.type !== Token.EOF) {
    +            return parseStatement();
    +        }
    +    }
    + 
    +    function parseSourceElements() {
    +        var sourceElement, sourceElements = [], token, directive, firstRestricted;
    + 
    +        while (index < length) {
    +            token = lookahead;
    +            if (token.type !== Token.StringLiteral) {
    +                break;
    +            }
    + 
    +            sourceElement = parseSourceElement();
    +            sourceElements.push(sourceElement);
    +            if (sourceElement.expression.type !== Syntax.Literal) {
    +                // this is not directive
    +                break;
    +            }
    +            directive = source.slice(token.range[0] + 1, token.range[1] - 1);
    +            if (directive === 'use strict') {
    +                strict = true;
    +                if (firstRestricted) {
    +                    throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral);
    +                }
    +            } else {
    +                if (!firstRestricted && token.octal) {
    +                    firstRestricted = token;
    +                }
    +            }
    +        }
    + 
    +        while (index < length) {
    +            sourceElement = parseSourceElement();
    +            if (typeof sourceElement === 'undefined') {
    +                break;
    +            }
    +            sourceElements.push(sourceElement);
    +        }
    +        return sourceElements;
    +    }
    + 
    +    function parseProgram() {
    +        var body;
    +        strict = false;
    +        peek();
    +        body = parseSourceElements();
    +        return delegate.createProgram(body);
    +    }
    + 
    +    // The following functions are needed only when the option to preserve
    +    // the comments is active.
    + 
    +    function addComment(type, value, start, end, loc) {
    +        assert(typeof start === 'number', 'Comment must have valid position');
    + 
    +        // Because the way the actual token is scanned, often the comments
    +        // (if any) are skipped twice during the lexical analysis.
    +        // Thus, we need to skip adding a comment if the comment array already
    +        // handled it.
    +        if (extra.comments.length > 0) {
    +            if (extra.comments[extra.comments.length - 1].range[1] > start) {
    +                return;
    +            }
    +        }
    + 
    +        extra.comments.push({
    +            type: type,
    +            value: value,
    +            range: [start, end],
    +            loc: loc
    +        });
    +    }
    + 
    +    function scanComment() {
    +        var comment, ch, loc, start, blockComment, lineComment;
    + 
    +        comment = '';
    +        blockComment = false;
    +        lineComment = false;
    + 
    +        while (index < length) {
    +            ch = source[index];
    + 
    +            if (lineComment) {
    +                ch = source[index++];
    +                if (isLineTerminator(ch.charCodeAt(0))) {
    +                    loc.end = {
    +                        line: lineNumber,
    +                        column: index - lineStart - 1
    +                    };
    +                    lineComment = false;
    +                    addComment('Line', comment, start, index - 1, loc);
    +                    if (ch === '\r' && source[index] === '\n') {
    +                        ++index;
    +                    }
    +                    ++lineNumber;
    +                    lineStart = index;
    +                    comment = '';
    +                } else if (index >= length) {
    +                    lineComment = false;
    +                    comment += ch;
    +                    loc.end = {
    +                        line: lineNumber,
    +                        column: length - lineStart
    +                    };
    +                    addComment('Line', comment, start, length, loc);
    +                } else {
    +                    comment += ch;
    +                }
    +            } else if (blockComment) {
    +                if (isLineTerminator(ch.charCodeAt(0))) {
    +                    if (ch === '\r' && source[index + 1] === '\n') {
    +                        ++index;
    +                        comment += '\r\n';
    +                    } else {
    +                        comment += ch;
    +                    }
    +                    ++lineNumber;
    +                    ++index;
    +                    lineStart = index;
    +                    if (index >= length) {
    +                        throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +                    }
    +                } else {
    +                    ch = source[index++];
    +                    if (index >= length) {
    +                        throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +                    }
    +                    comment += ch;
    +                    if (ch === '*') {
    +                        ch = source[index];
    +                        if (ch === '/') {
    +                            comment = comment.substr(0, comment.length - 1);
    +                            blockComment = false;
    +                            ++index;
    +                            loc.end = {
    +                                line: lineNumber,
    +                                column: index - lineStart
    +                            };
    +                            addComment('Block', comment, start, index, loc);
    +                            comment = '';
    +                        }
    +                    }
    +                }
    +            } else if (ch === '/') {
    +                ch = source[index + 1];
    +                if (ch === '/') {
    +                    loc = {
    +                        start: {
    +                            line: lineNumber,
    +                            column: index - lineStart
    +                        }
    +                    };
    +                    start = index;
    +                    index += 2;
    +                    lineComment = true;
    +                    if (index >= length) {
    +                        loc.end = {
    +                            line: lineNumber,
    +                            column: index - lineStart
    +                        };
    +                        lineComment = false;
    +                        addComment('Line', comment, start, index, loc);
    +                    }
    +                } else if (ch === '*') {
    +                    start = index;
    +                    index += 2;
    +                    blockComment = true;
    +                    loc = {
    +                        start: {
    +                            line: lineNumber,
    +                            column: index - lineStart - 2
    +                        }
    +                    };
    +                    if (index >= length) {
    +                        throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +                    }
    +                } else {
    +                    break;
    +                }
    +            } else if (isWhiteSpace(ch.charCodeAt(0))) {
    +                ++index;
    +            } else if (isLineTerminator(ch.charCodeAt(0))) {
    +                ++index;
    +                if (ch ===  '\r' && source[index] === '\n') {
    +                    ++index;
    +                }
    +                ++lineNumber;
    +                lineStart = index;
    +            } else {
    +                break;
    +            }
    +        }
    +    }
    + 
    +    function filterCommentLocation() {
    +        var i, entry, comment, comments = [];
    + 
    +        for (i = 0; i < extra.comments.length; ++i) {
    +            entry = extra.comments[i];
    +            comment = {
    +                type: entry.type,
    +                value: entry.value
    +            };
    +            if (extra.range) {
    +                comment.range = entry.range;
    +            }
    +            if (extra.loc) {
    +                comment.loc = entry.loc;
    +            }
    +            comments.push(comment);
    +        }
    + 
    +        extra.comments = comments;
    +    }
    + 
    +    function collectToken() {
    +        var start, loc, token, range, value;
    + 
    +        skipComment();
    +        start = index;
    +        loc = {
    +            start: {
    +                line: lineNumber,
    +                column: index - lineStart
    +            }
    +        };
    + 
    +        token = extra.advance();
    +        loc.end = {
    +            line: lineNumber,
    +            column: index - lineStart
    +        };
    + 
    +        if (token.type !== Token.EOF) {
    +            range = [token.range[0], token.range[1]];
    +            value = source.slice(token.range[0], token.range[1]);
    +            extra.tokens.push({
    +                type: TokenName[token.type],
    +                value: value,
    +                range: range,
    +                loc: loc
    +            });
    +        }
    + 
    +        return token;
    +    }
    + 
    +    function collectRegex() {
    +        var pos, loc, regex, token;
    + 
    +        skipComment();
    + 
    +        pos = index;
    +        loc = {
    +            start: {
    +                line: lineNumber,
    +                column: index - lineStart
    +            }
    +        };
    + 
    +        regex = extra.scanRegExp();
    +        loc.end = {
    +            line: lineNumber,
    +            column: index - lineStart
    +        };
    + 
    +        // Pop the previous token, which is likely '/' or '/='
    +        Eif (extra.tokens.length > 0) {
    +            token = extra.tokens[extra.tokens.length - 1];
    +            Eif (token.range[0] === pos && token.type === 'Punctuator') {
    +                Eif (token.value === '/' || token.value === '/=') {
    +                    extra.tokens.pop();
    +                }
    +            }
    +        }
    + 
    +        extra.tokens.push({
    +            type: 'RegularExpression',
    +            value: regex.literal,
    +            range: [pos, index],
    +            loc: loc
    +        });
    + 
    +        return regex;
    +    }
    + 
    +    function filterTokenLocation() {
    +        var i, entry, token, tokens = [];
    + 
    +        for (i = 0; i < extra.tokens.length; ++i) {
    +            entry = extra.tokens[i];
    +            token = {
    +                type: entry.type,
    +                value: entry.value
    +            };
    +            if (extra.range) {
    +                token.range = entry.range;
    +            }
    +            if (extra.loc) {
    +                token.loc = entry.loc;
    +            }
    +            tokens.push(token);
    +        }
    + 
    +        extra.tokens = tokens;
    +    }
    + 
    +    function createLocationMarker() {
    +        var marker = {};
    + 
    +        marker.range = [index, index];
    +        marker.loc = {
    +            start: {
    +                line: lineNumber,
    +                column: index - lineStart
    +            },
    +            end: {
    +                line: lineNumber,
    +                column: index - lineStart
    +            }
    +        };
    + 
    +        marker.end = function () {
    +            this.range[1] = index;
    +            this.loc.end.line = lineNumber;
    +            this.loc.end.column = index - lineStart;
    +        };
    + 
    +        marker.applyGroup = function (node) {
    +            Eif (extra.range) {
    +                node.groupRange = [this.range[0], this.range[1]];
    +            }
    +            Eif (extra.loc) {
    +                node.groupLoc = {
    +                    start: {
    +                        line: this.loc.start.line,
    +                        column: this.loc.start.column
    +                    },
    +                    end: {
    +                        line: this.loc.end.line,
    +                        column: this.loc.end.column
    +                    }
    +                };
    +            }
    +        };
    + 
    +        marker.apply = function (node) {
    +            if (extra.range) {
    +                node.range = [this.range[0], this.range[1]];
    +            }
    +            if (extra.loc) {
    +                node.loc = {
    +                    start: {
    +                        line: this.loc.start.line,
    +                        column: this.loc.start.column
    +                    },
    +                    end: {
    +                        line: this.loc.end.line,
    +                        column: this.loc.end.column
    +                    }
    +                };
    +            }
    +        };
    + 
    +        return marker;
    +    }
    + 
    +    function trackGroupExpression() {
    +        var marker, expr;
    + 
    +        skipComment();
    +        marker = createLocationMarker();
    +        expect('(');
    + 
    +        expr = parseExpression();
    + 
    +        expect(')');
    + 
    +        marker.end();
    +        marker.applyGroup(expr);
    + 
    +        return expr;
    +    }
    + 
    +    function trackLeftHandSideExpression() {
    +        var marker, expr, property;
    + 
    +        skipComment();
    +        marker = createLocationMarker();
    + 
    +        expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression();
    + 
    +        while (match('.') || match('[')) {
    +            if (match('[')) {
    +                property = parseComputedMember();
    +                expr = delegate.createMemberExpression('[', expr, property);
    +                marker.end();
    +                marker.apply(expr);
    +            } else {
    +                property = parseNonComputedMember();
    +                expr = delegate.createMemberExpression('.', expr, property);
    +                marker.end();
    +                marker.apply(expr);
    +            }
    +        }
    + 
    +        return expr;
    +    }
    + 
    +    function trackLeftHandSideExpressionAllowCall() {
    +        var marker, expr, args, property;
    + 
    +        skipComment();
    +        marker = createLocationMarker();
    + 
    +        expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression();
    + 
    +        while (match('.') || match('[') || match('(')) {
    +            if (match('(')) {
    +                args = parseArguments();
    +                expr = delegate.createCallExpression(expr, args);
    +                marker.end();
    +                marker.apply(expr);
    +            } else if (match('[')) {
    +                property = parseComputedMember();
    +                expr = delegate.createMemberExpression('[', expr, property);
    +                marker.end();
    +                marker.apply(expr);
    +            } else {
    +                property = parseNonComputedMember();
    +                expr = delegate.createMemberExpression('.', expr, property);
    +                marker.end();
    +                marker.apply(expr);
    +            }
    +        }
    + 
    +        return expr;
    +    }
    + 
    +    function filterGroup(node) {
    +        var n, i, entry;
    + 
    +        n = (Object.prototype.toString.apply(node) === '[object Array]') ? [] : {};
    +        for (i in node) {
    +            if (node.hasOwnProperty(i) && i !== 'groupRange' && i !== 'groupLoc') {
    +                entry = node[i];
    +                if (entry === null || typeof entry !== 'object' || entry instanceof RegExp) {
    +                    n[i] = entry;
    +                } else {
    +                    n[i] = filterGroup(entry);
    +                }
    +            }
    +        }
    +        return n;
    +    }
    + 
    +    function wrapTrackingFunction(range, loc) {
    + 
    +        return function (parseFunction) {
    + 
    +            function isBinary(node) {
    +                return node.type === Syntax.LogicalExpression ||
    +                    node.type === Syntax.BinaryExpression;
    +            }
    + 
    +            function visit(node) {
    +                var start, end;
    + 
    +                if (isBinary(node.left)) {
    +                    visit(node.left);
    +                }
    +                if (isBinary(node.right)) {
    +                    visit(node.right);
    +                }
    + 
    +                Eif (range) {
    +                    if (node.left.groupRange || node.right.groupRange) {
    +                        start = node.left.groupRange ? node.left.groupRange[0] : node.left.range[0];
    +                        end = node.right.groupRange ? node.right.groupRange[1] : node.right.range[1];
    +                        node.range = [start, end];
    +                    } else if (typeof node.range === 'undefined') {
    +                        start = node.left.range[0];
    +                        end = node.right.range[1];
    +                        node.range = [start, end];
    +                    }
    +                }
    +                Eif (loc) {
    +                    if (node.left.groupLoc || node.right.groupLoc) {
    +                        start = node.left.groupLoc ? node.left.groupLoc.start : node.left.loc.start;
    +                        end = node.right.groupLoc ? node.right.groupLoc.end : node.right.loc.end;
    +                        node.loc = {
    +                            start: start,
    +                            end: end
    +                        };
    +                    } else if (typeof node.loc === 'undefined') {
    +                        node.loc = {
    +                            start: node.left.loc.start,
    +                            end: node.right.loc.end
    +                        };
    +                    }
    +                }
    +            }
    + 
    +            return function () {
    +                var marker, node;
    + 
    +                skipComment();
    + 
    +                marker = createLocationMarker();
    +                node = parseFunction.apply(null, arguments);
    +                marker.end();
    + 
    +                if (range && typeof node.range === 'undefined') {
    +                    marker.apply(node);
    +                }
    + 
    +                if (loc && typeof node.loc === 'undefined') {
    +                    marker.apply(node);
    +                }
    + 
    +                if (isBinary(node)) {
    +                    visit(node);
    +                }
    + 
    +                return node;
    +            };
    +        };
    +    }
    + 
    +    function patch() {
    + 
    +        var wrapTracking;
    + 
    +        if (extra.comments) {
    +            extra.skipComment = skipComment;
    +            skipComment = scanComment;
    +        }
    + 
    +        if (extra.range || extra.loc) {
    + 
    +            extra.parseGroupExpression = parseGroupExpression;
    +            extra.parseLeftHandSideExpression = parseLeftHandSideExpression;
    +            extra.parseLeftHandSideExpressionAllowCall = parseLeftHandSideExpressionAllowCall;
    +            parseGroupExpression = trackGroupExpression;
    +            parseLeftHandSideExpression = trackLeftHandSideExpression;
    +            parseLeftHandSideExpressionAllowCall = trackLeftHandSideExpressionAllowCall;
    + 
    +            wrapTracking = wrapTrackingFunction(extra.range, extra.loc);
    + 
    +            extra.parseAssignmentExpression = parseAssignmentExpression;
    +            extra.parseBinaryExpression = parseBinaryExpression;
    +            extra.parseBlock = parseBlock;
    +            extra.parseFunctionSourceElements = parseFunctionSourceElements;
    +            extra.parseCatchClause = parseCatchClause;
    +            extra.parseComputedMember = parseComputedMember;
    +            extra.parseConditionalExpression = parseConditionalExpression;
    +            extra.parseConstLetDeclaration = parseConstLetDeclaration;
    +            extra.parseExpression = parseExpression;
    +            extra.parseForVariableDeclaration = parseForVariableDeclaration;
    +            extra.parseFunctionDeclaration = parseFunctionDeclaration;
    +            extra.parseFunctionExpression = parseFunctionExpression;
    +            extra.parseNewExpression = parseNewExpression;
    +            extra.parseNonComputedProperty = parseNonComputedProperty;
    +            extra.parseObjectProperty = parseObjectProperty;
    +            extra.parseObjectPropertyKey = parseObjectPropertyKey;
    +            extra.parsePostfixExpression = parsePostfixExpression;
    +            extra.parsePrimaryExpression = parsePrimaryExpression;
    +            extra.parseProgram = parseProgram;
    +            extra.parsePropertyFunction = parsePropertyFunction;
    +            extra.parseStatement = parseStatement;
    +            extra.parseSwitchCase = parseSwitchCase;
    +            extra.parseUnaryExpression = parseUnaryExpression;
    +            extra.parseVariableDeclaration = parseVariableDeclaration;
    +            extra.parseVariableIdentifier = parseVariableIdentifier;
    + 
    +            parseAssignmentExpression = wrapTracking(extra.parseAssignmentExpression);
    +            parseBinaryExpression = wrapTracking(extra.parseBinaryExpression);
    +            parseBlock = wrapTracking(extra.parseBlock);
    +            parseFunctionSourceElements = wrapTracking(extra.parseFunctionSourceElements);
    +            parseCatchClause = wrapTracking(extra.parseCatchClause);
    +            parseComputedMember = wrapTracking(extra.parseComputedMember);
    +            parseConditionalExpression = wrapTracking(extra.parseConditionalExpression);
    +            parseConstLetDeclaration = wrapTracking(extra.parseConstLetDeclaration);
    +            parseExpression = wrapTracking(extra.parseExpression);
    +            parseForVariableDeclaration = wrapTracking(extra.parseForVariableDeclaration);
    +            parseFunctionDeclaration = wrapTracking(extra.parseFunctionDeclaration);
    +            parseFunctionExpression = wrapTracking(extra.parseFunctionExpression);
    +            parseLeftHandSideExpression = wrapTracking(parseLeftHandSideExpression);
    +            parseNewExpression = wrapTracking(extra.parseNewExpression);
    +            parseNonComputedProperty = wrapTracking(extra.parseNonComputedProperty);
    +            parseObjectProperty = wrapTracking(extra.parseObjectProperty);
    +            parseObjectPropertyKey = wrapTracking(extra.parseObjectPropertyKey);
    +            parsePostfixExpression = wrapTracking(extra.parsePostfixExpression);
    +            parsePrimaryExpression = wrapTracking(extra.parsePrimaryExpression);
    +            parseProgram = wrapTracking(extra.parseProgram);
    +            parsePropertyFunction = wrapTracking(extra.parsePropertyFunction);
    +            parseStatement = wrapTracking(extra.parseStatement);
    +            parseSwitchCase = wrapTracking(extra.parseSwitchCase);
    +            parseUnaryExpression = wrapTracking(extra.parseUnaryExpression);
    +            parseVariableDeclaration = wrapTracking(extra.parseVariableDeclaration);
    +            parseVariableIdentifier = wrapTracking(extra.parseVariableIdentifier);
    +        }
    + 
    +        if (typeof extra.tokens !== 'undefined') {
    +            extra.advance = advance;
    +            extra.scanRegExp = scanRegExp;
    + 
    +            advance = collectToken;
    +            scanRegExp = collectRegex;
    +        }
    +    }
    + 
    +    function unpatch() {
    +        if (typeof extra.skipComment === 'function') {
    +            skipComment = extra.skipComment;
    +        }
    + 
    +        if (extra.range || extra.loc) {
    +            parseAssignmentExpression = extra.parseAssignmentExpression;
    +            parseBinaryExpression = extra.parseBinaryExpression;
    +            parseBlock = extra.parseBlock;
    +            parseFunctionSourceElements = extra.parseFunctionSourceElements;
    +            parseCatchClause = extra.parseCatchClause;
    +            parseComputedMember = extra.parseComputedMember;
    +            parseConditionalExpression = extra.parseConditionalExpression;
    +            parseConstLetDeclaration = extra.parseConstLetDeclaration;
    +            parseExpression = extra.parseExpression;
    +            parseForVariableDeclaration = extra.parseForVariableDeclaration;
    +            parseFunctionDeclaration = extra.parseFunctionDeclaration;
    +            parseFunctionExpression = extra.parseFunctionExpression;
    +            parseGroupExpression = extra.parseGroupExpression;
    +            parseLeftHandSideExpression = extra.parseLeftHandSideExpression;
    +            parseLeftHandSideExpressionAllowCall = extra.parseLeftHandSideExpressionAllowCall;
    +            parseNewExpression = extra.parseNewExpression;
    +            parseNonComputedProperty = extra.parseNonComputedProperty;
    +            parseObjectProperty = extra.parseObjectProperty;
    +            parseObjectPropertyKey = extra.parseObjectPropertyKey;
    +            parsePrimaryExpression = extra.parsePrimaryExpression;
    +            parsePostfixExpression = extra.parsePostfixExpression;
    +            parseProgram = extra.parseProgram;
    +            parsePropertyFunction = extra.parsePropertyFunction;
    +            parseStatement = extra.parseStatement;
    +            parseSwitchCase = extra.parseSwitchCase;
    +            parseUnaryExpression = extra.parseUnaryExpression;
    +            parseVariableDeclaration = extra.parseVariableDeclaration;
    +            parseVariableIdentifier = extra.parseVariableIdentifier;
    +        }
    + 
    +        if (typeof extra.scanRegExp === 'function') {
    +            advance = extra.advance;
    +            scanRegExp = extra.scanRegExp;
    +        }
    +    }
    + 
    +    function parse(code, options) {
    +        var program, toString;
    + 
    +        toString = String;
    +        if (typeof code !== 'string' && !(code instanceof String)) {
    +            code = toString(code);
    +        }
    + 
    +        delegate = SyntaxTreeDelegate;
    +        source = code;
    +        index = 0;
    +        lineNumber = (source.length > 0) ? 1 : 0;
    +        lineStart = 0;
    +        length = source.length;
    +        lookahead = null;
    +        state = {
    +            allowIn: true,
    +            labelSet: {},
    +            inFunctionBody: false,
    +            inIteration: false,
    +            inSwitch: false
    +        };
    + 
    +        extra = {};
    +        if (typeof options !== 'undefined') {
    +            extra.range = (typeof options.range === 'boolean') && options.range;
    +            extra.loc = (typeof options.loc === 'boolean') && options.loc;
    + 
    +            if (typeof options.tokens === 'boolean' && options.tokens) {
    +                extra.tokens = [];
    +            }
    +            if (typeof options.comment === 'boolean' && options.comment) {
    +                extra.comments = [];
    +            }
    +            if (typeof options.tolerant === 'boolean' && options.tolerant) {
    +                extra.errors = [];
    +            }
    +        }
    + 
    +        if (length > 0) {
    +            Iif (typeof source[0] === 'undefined') {
    +                // Try first to convert to a string. This is good as fast path
    +                // for old IE which understands string indexing for string
    +                // literals only and not for string object.
    +                if (code instanceof String) {
    +                    source = code.valueOf();
    +                }
    +            }
    +        }
    + 
    +        patch();
    +        try {
    +            program = parseProgram();
    +            if (typeof extra.comments !== 'undefined') {
    +                filterCommentLocation();
    +                program.comments = extra.comments;
    +            }
    +            if (typeof extra.tokens !== 'undefined') {
    +                filterTokenLocation();
    +                program.tokens = extra.tokens;
    +            }
    +            if (typeof extra.errors !== 'undefined') {
    +                program.errors = extra.errors;
    +            }
    +            if (extra.range || extra.loc) {
    +                program.body = filterGroup(program.body);
    +            }
    +        } catch (e) {
    +            throw e;
    +        } finally {
    +            unpatch();
    +            extra = {};
    +        }
    + 
    +        return program;
    +    }
    + 
    +    // Sync with package.json and component.json.
    +    exports.version = '1.1.0-dev';
    + 
    +    exports.parse = parse;
    + 
    +    // Deep copy.
    +    exports.Syntax = (function () {
    +        var name, types = {};
    + 
    +        Eif (typeof Object.create === 'function') {
    +            types = Object.create(null);
    +        }
    + 
    +        for (name in Syntax) {
    +            Eif (Syntax.hasOwnProperty(name)) {
    +                types[name] = Syntax[name];
    +            }
    +        }
    + 
    +        Eif (typeof Object.freeze === 'function') {
    +            Object.freeze(types);
    +        }
    + 
    +        return types;
    +    }());
    + 
    +}));
    +/* vim: set sw=4 ts=4 et tw=80 : */
    + 
    + +
    + + + + + + + + diff --git a/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/fbtest.js b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/fbtest.js new file mode 100644 index 00000000..6570cbf8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/fbtest.js @@ -0,0 +1,3124 @@ +var testFixture; + +var fbTestFixture = { + 'XJS': { + '': { + type: "ExpressionStatement", + expression: { + type: "XJSElement", + openingElement: { + type: "XJSOpeningElement", + name: { + type: "XJSIdentifier", + name: "a", + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + selfClosing: true, + attributes: [], + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + children: [], + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + '': { + type: "ExpressionStatement", + expression: { + type: "XJSElement", + openingElement: { + type: "XJSOpeningElement", + name: { + type: "XJSIdentifier", + name: "a", + namespace: "n", + range: [1, 4], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 4 } + } + }, + selfClosing: true, + attributes: [ + { + type: "XJSAttribute", + name: { + type: "XJSIdentifier", + name: "v", + namespace: "n", + range: [5, 8], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 8 } + } + }, + range: [5, 8], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 8 } + } + } + ], + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + children: [], + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + ' {value} ': { + type: "ExpressionStatement", + expression: { + type: "XJSElement", + openingElement: { + type: "XJSOpeningElement", + name: { + type: "XJSIdentifier", + name: "a", + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + selfClosing: false, + attributes: [ + { + type: "XJSAttribute", + name: { + type: "XJSIdentifier", + name: "foo", + namespace: "n", + range: [3, 8], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 8 } + } + }, + value: { + type: "Literal", + value: "bar", + raw: "\"bar\"", + range: [9, 14], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 14 } + } + }, + range: [3, 14], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 14 } + } + } + ], + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + closingElement: { + type: "XJSClosingElement", + name: { + type: "XJSIdentifier", + name: "a", + range: [38, 39], + loc: { + start: { line: 1, column: 38 }, + end: { line: 1, column: 39 } + } + }, + range: [36, 40], + loc: { + start: { line: 1, column: 36 }, + end: { line: 1, column: 40 } + } + }, + children: [ + { + type: "Literal", + value: " ", + raw: " ", + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }, + { + type: "XJSExpressionContainer", + expression: { + type: "Identifier", + name: "value", + range: [17, 22], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 22 } + } + }, + range: [16, 23], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 23 } + } + }, + { + type: "Literal", + value: " ", + raw: " ", + range: [23, 24], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 24 } + } + }, + { + type: "XJSElement", + openingElement: { + type: "XJSOpeningElement", + name: { + type: "XJSIdentifier", + name: "b", + range: [25, 26], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 26 } + } + }, + selfClosing: false, + attributes: [], + range: [24, 27], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 27 } + } + }, + closingElement: { + type: "XJSClosingElement", + name: { + type: "XJSIdentifier", + name: "b", + range: [34, 35], + loc: { + start: { line: 1, column: 34 }, + end: { line: 1, column: 35 } + } + }, + range: [32, 36], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 36 } + } + }, + children: [ + { + type: "XJSElement", + openingElement: { + type: "XJSOpeningElement", + name: { + type: "XJSIdentifier", + name: "c", + range: [28, 29], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 29 } + } + }, + selfClosing: true, + attributes: [], + range: [27, 32], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 32 } + } + }, + children: [], + range: [27, 32], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 32 } + } + } + ], + range: [24, 36], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 36 } + } + } + ], + range: [0, 40], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 40 } + } + }, + range: [0, 40], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 40 } + } + }, + '': { + type: "ExpressionStatement", + expression: { + type: "XJSElement", + openingElement: { + type: "XJSOpeningElement", + name: { + type: "XJSIdentifier", + name: "a", + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + selfClosing: true, + attributes: [ + { + type: "XJSAttribute", + name: { + type: "XJSIdentifier", + name: "b", + range: [3, 4], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 4 } + } + }, + value: { + type: "XJSExpressionContainer", + expression: { + type: "Literal", + value: " ", + raw: "\" \"", + range: [6, 9], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 9 } + } + }, + range: [5, 10], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 10 } + } + }, + range: [3, 10], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 10 } + } + }, + { + type: "XJSAttribute", + name: { + type: "XJSIdentifier", + name: "c", + range: [11, 12], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 12 } + } + }, + value: { + type: "Literal", + value: " ", + raw: "\" \"", + range: [13, 16], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 16 } + } + }, + range: [11, 16], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 16 } + } + }, + { + type: "XJSAttribute", + name: { + type: "XJSIdentifier", + name: "d", + range: [17, 18], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 18 } + } + }, + value: { + type: "Literal", + value: "&", + raw: "\"&\"", + range: [19, 26], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 26 } + } + }, + range: [17, 26], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 26 } + } + } + ], + range: [0, 29], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 29 } + } + }, + children: [], + range: [0, 29], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 29 } + } + }, + range: [0, 29], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 29 } + } + }, + '': { + type: "ExpressionStatement", + expression: { + type: "XJSElement", + openingElement: { + type: "XJSOpeningElement", + name: { + type: "XJSIdentifier", + name: "a", + range: [ + 1, + 2 + ], + loc: { + start: { + line: 1, + column: 1 + }, + end: { + line: 1, + column: 2 + } + } + }, + selfClosing: true, + attributes: [], + range: [ + 0, + 5 + ], + loc: { + start: { + line: 1, + column: 0 + }, + end: { + line: 2, + column: 2 + } + } + }, + children: [], + range: [ + 0, + 5 + ], + loc: { + start: { + line: 1, + column: 0 + }, + end: { + line: 2, + column: 2 + } + } + }, + range: [ + 0, + 5 + ], + loc: { + start: { + line: 1, + column: 0 + }, + end: { + line: 2, + column: 2 + } + } + }, + '<日本語>': { + type: "ExpressionStatement", + expression: { + type: "XJSElement", + openingElement: { + type: "XJSOpeningElement", + name: { + type: "XJSIdentifier", + name: "日本語", + range: [ + 1, + 4 + ], + loc: { + start: { + line: 1, + column: 1 + }, + end: { + line: 1, + column: 4 + } + } + }, + selfClosing: false, + attributes: [], + range: [ + 0, + 5 + ], + loc: { + start: { + line: 1, + column: 0 + }, + end: { + line: 1, + column: 5 + } + } + }, + closingElement: { + type: "XJSClosingElement", + name: { + type: "XJSIdentifier", + name: "日本語", + range: [ + 7, + 10 + ], + loc: { + start: { + line: 1, + column: 7 + }, + end: { + line: 1, + column: 10 + } + } + }, + range: [ + 5, + 11 + ], + loc: { + start: { + line: 1, + column: 5 + }, + end: { + line: 1, + column: 11 + } + } + }, + children: [], + range: [ + 0, + 11 + ], + loc: { + start: { + line: 1, + column: 0 + }, + end: { + line: 1, + column: 11 + } + } + }, + range: [ + 0, + 11 + ], + loc: { + start: { + line: 1, + column: 0 + }, + end: { + line: 1, + column: 11 + } + } + }, + + '\nbar\nbaz\n': { + type: "ExpressionStatement", + expression: { + type: "XJSElement", + openingElement: { + type: "XJSOpeningElement", + name: { + type: "XJSIdentifier", + name: "AbC-def", + range: [ + 1, + 8 + ], + loc: { + start: { + line: 1, + column: 1 + }, + end: { + line: 1, + column: 8 + } + } + }, + selfClosing: false, + attributes: [ + { + type: "XJSAttribute", + name: { + type: "XJSIdentifier", + name: "test", + range: [ + 11, + 15 + ], + loc: { + start: { + line: 2, + column: 2 + }, + end: { + line: 2, + column: 6 + } + } + }, + value: { + type: "Literal", + value: "&&", + raw: "\"&&\"", + range: [ + 16, + 31 + ], + loc: { + start: { + line: 2, + column: 7 + }, + end: { + line: 2, + column: 22 + } + } + }, + range: [ + 11, + 31 + ], + loc: { + start: { + line: 2, + column: 2 + }, + end: { + line: 2, + column: 22 + } + } + } + ], + range: [ + 0, + 32 + ], + loc: { + start: { + line: 1, + column: 0 + }, + end: { + line: 2, + column: 23 + } + } + }, + closingElement: { + type: "XJSClosingElement", + name: { + type: "XJSIdentifier", + name: "AbC-def", + range: [ + 43, + 50 + ], + loc: { + start: { + line: 5, + column: 2 + }, + end: { + line: 5, + column: 9 + } + } + }, + range: [ + 41, + 51 + ], + loc: { + start: { + line: 5, + column: 0 + }, + end: { + line: 5, + column: 10 + } + } + }, + children: [ + { + type: "Literal", + value: "\nbar\nbaz\n", + raw: "\nbar\nbaz\n", + range: [ + 32, + 41 + ], + loc: { + start: { + line: 2, + column: 23 + }, + end: { + line: 5, + column: 0 + } + } + } + ], + range: [ + 0, + 51 + ], + loc: { + start: { + line: 1, + column: 0 + }, + end: { + line: 5, + column: 10 + } + } + }, + range: [ + 0, + 51 + ], + loc: { + start: { + line: 1, + column: 0 + }, + end: { + line: 5, + column: 10 + } + } + }, + + ' : } />': { + type: "ExpressionStatement", + expression: { + type: "XJSElement", + openingElement: { + type: "XJSOpeningElement", + name: { + type: "XJSIdentifier", + name: "a", + range: [ + 1, + 2 + ], + loc: { + start: { + line: 1, + column: 1 + }, + end: { + line: 1, + column: 2 + } + } + }, + selfClosing: true, + attributes: [ + { + type: "XJSAttribute", + name: { + type: "XJSIdentifier", + name: "b", + range: [ + 3, + 4 + ], + loc: { + start: { + line: 1, + column: 3 + }, + end: { + line: 1, + column: 4 + } + } + }, + value: { + type: "XJSExpressionContainer", + expression: { + type: "ConditionalExpression", + test: { + type: "Identifier", + name: "x", + range: [ + 6, + 7 + ], + loc: { + start: { + line: 1, + column: 6 + }, + end: { + line: 1, + column: 7 + } + } + }, + consequent: { + type: "XJSElement", + openingElement: { + type: "XJSOpeningElement", + name: { + type: "XJSIdentifier", + name: "c", + range: [ + 11, + 12 + ], + loc: { + start: { + line: 1, + column: 11 + }, + end: { + line: 1, + column: 12 + } + } + }, + selfClosing: true, + attributes: [], + range: [ + 10, + 15 + ], + loc: { + start: { + line: 1, + column: 10 + }, + end: { + line: 1, + column: 15 + } + } + }, + children: [], + range: [ + 10, + 15 + ], + loc: { + start: { + line: 1, + column: 10 + }, + end: { + line: 1, + column: 15 + } + } + }, + alternate: { + type: "XJSElement", + openingElement: { + type: "XJSOpeningElement", + name: { + type: "XJSIdentifier", + name: "d", + range: [ + 19, + 20 + ], + loc: { + start: { + line: 1, + column: 19 + }, + end: { + line: 1, + column: 20 + } + } + }, + selfClosing: true, + attributes: [], + range: [ + 18, + 23 + ], + loc: { + start: { + line: 1, + column: 18 + }, + end: { + line: 1, + column: 23 + } + } + }, + children: [], + range: [ + 18, + 23 + ], + loc: { + start: { + line: 1, + column: 18 + }, + end: { + line: 1, + column: 23 + } + } + }, + range: [ + 6, + 23 + ], + loc: { + start: { + line: 1, + column: 6 + }, + end: { + line: 1, + column: 23 + } + } + }, + range: [ + 5, + 24 + ], + loc: { + start: { + line: 1, + column: 5 + }, + end: { + line: 1, + column: 24 + } + } + }, + range: [ + 3, + 24 + ], + loc: { + start: { + line: 1, + column: 3 + }, + end: { + line: 1, + column: 24 + } + } + } + ], + range: [ + 0, + 27 + ], + loc: { + start: { + line: 1, + column: 0 + }, + end: { + line: 1, + column: 27 + } + } + }, + children: [], + range: [ + 0, + 27 + ], + loc: { + start: { + line: 1, + column: 0 + }, + end: { + line: 1, + column: 27 + } + } + }, + range: [ + 0, + 27 + ], + loc: { + start: { + line: 1, + column: 0 + }, + end: { + line: 1, + column: 27 + } + } + }, + + '{}': { + type: 'ExpressionStatement', + expression: { + type: 'XJSElement', + openingElement: { + type: 'XJSOpeningElement', + name: { + type: 'XJSIdentifier', + name: 'a', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + selfClosing: false, + attributes: [], + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + closingElement: { + type: 'XJSClosingElement', + name: { + type: 'XJSIdentifier', + name: 'a', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + range: [5, 9], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 9 } + } + }, + children: [{ + type: 'XJSExpressionContainer', + expression: { + type: 'XJSEmptyExpression', + range: [4, 4], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 4 } + } + }, + range: [3, 5], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 5 } + } + }], + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + '{/* this is a comment */}': { + type: 'ExpressionStatement', + expression: { + type: 'XJSElement', + openingElement: { + type: 'XJSOpeningElement', + name: { + type: 'XJSIdentifier', + name: 'a', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + selfClosing: false, + attributes: [], + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + closingElement: { + type: 'XJSClosingElement', + name: { + type: 'XJSIdentifier', + name: 'a', + range: [30, 31], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 31 } + } + }, + range: [28, 32], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 32 } + } + }, + children: [{ + type: 'XJSExpressionContainer', + expression: { + type: 'XJSEmptyExpression', + range: [4, 27], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 27 } + } + }, + range: [3, 28], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 28 } + } + }], + range: [0, 32], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 32 } + } + }, + range: [0, 32], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 32 } + } + }, + + '
    @test content
    ': { + type: 'ExpressionStatement', + expression: { + type: 'XJSElement', + openingElement: { + type: 'XJSOpeningElement', + name: { + type: 'XJSIdentifier', + name: 'div', + range: [1, 4], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 4 } + } + }, + selfClosing: false, + attributes: [], + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + closingElement: { + type: 'XJSClosingElement', + name: { + type: 'XJSIdentifier', + name: 'div', + range: [20, 23], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 23 } + } + }, + range: [18, 24], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 24 } + } + }, + children: [{ + type: 'Literal', + value: '@test content', + raw: '@test content', + range: [5, 18], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 18 } + } + }], + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + + '

    7x invalid-js-identifier
    ': { + type: 'ExpressionStatement', + expression: { + type: 'XJSElement', + openingElement: { + type: 'XJSOpeningElement', + name: { + type: 'XJSIdentifier', + name: 'div', + range: [ + 1, + 4 + ], + loc: { + start: { + line: 1, + column: 1 + }, + end: { + line: 1, + column: 4 + } + } + }, + selfClosing: false, + attributes: [], + range: [ + 0, + 5 + ], + loc: { + start: { + line: 1, + column: 0 + }, + end: { + line: 1, + column: 5 + } + } + }, + closingElement: { + type: 'XJSClosingElement', + name: { + type: 'XJSIdentifier', + name: 'div', + range: [ + 37, + 40 + ], + loc: { + start: { + line: 1, + column: 37 + }, + end: { + line: 1, + column: 40 + } + } + }, + range: [ + 35, + 41 + ], + loc: { + start: { + line: 1, + column: 35 + }, + end: { + line: 1, + column: 41 + } + } + }, + children: [{ + type: 'XJSElement', + openingElement: { + type: 'XJSOpeningElement', + name: { + type: 'XJSIdentifier', + name: 'br', + range: [ + 6, + 8 + ], + loc: { + start: { + line: 1, + column: 6 + }, + end: { + line: 1, + column: 8 + } + } + }, + selfClosing: true, + attributes: [], + range: [ + 5, + 11 + ], + loc: { + start: { + line: 1, + column: 5 + }, + end: { + line: 1, + column: 11 + } + } + }, + children: [], + range: [ + 5, + 11 + ], + loc: { + start: { + line: 1, + column: 5 + }, + end: { + line: 1, + column: 11 + } + } + }, { + type: 'Literal', + value: '7x invalid-js-identifier', + raw: '7x invalid-js-identifier', + range: [ + 11, + 35 + ], + loc: { + start: { + line: 1, + column: 11 + }, + end: { + line: 1, + column: 35 + } + } + }], + range: [ + 0, + 41 + ], + loc: { + start: { + line: 1, + column: 0 + }, + end: { + line: 1, + column: 41 + } + } + }, + range: [ + 0, + 41 + ], + loc: { + start: { + line: 1, + column: 0 + }, + end: { + line: 1, + column: 41 + } + } + }, + + ' right=monkeys /> gorillas />': { + "type": "ExpressionStatement", + "expression": { + "type": "XJSElement", + "openingElement": { + "type": "XJSOpeningElement", + "name": { + "type": "XJSIdentifier", + "name": "LeftRight", + "range": [ + 1, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 10 + } + } + }, + "selfClosing": true, + "attributes": [ + { + "type": "XJSAttribute", + "name": { + "type": "XJSIdentifier", + "name": "left", + "range": [ + 11, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + "value": { + "type": "XJSElement", + "openingElement": { + "type": "XJSOpeningElement", + "name": { + "type": "XJSIdentifier", + "name": "a", + "range": [ + 17, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + "selfClosing": true, + "attributes": [], + "range": [ + 16, + 21 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 21 + } + } + }, + "children": [], + "range": [ + 16, + 21 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 21 + } + } + }, + "range": [ + 11, + 21 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 21 + } + } + }, + { + "type": "XJSAttribute", + "name": { + "type": "XJSIdentifier", + "name": "right", + "range": [ + 22, + 27 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 27 + } + } + }, + "value": { + "type": "XJSElement", + "openingElement": { + "type": "XJSOpeningElement", + "name": { + "type": "XJSIdentifier", + "name": "b", + "range": [ + 29, + 30 + ], + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 30 + } + } + }, + "selfClosing": false, + "attributes": [], + "range": [ + 28, + 31 + ], + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 31 + } + } + }, + "closingElement": { + "type": "XJSClosingElement", + "name": { + "type": "XJSIdentifier", + "name": "b", + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 1, + "column": 52 + }, + "end": { + "line": 1, + "column": 53 + } + } + }, + "range": [ + 50, + 54 + ], + "loc": { + "start": { + "line": 1, + "column": 50 + }, + "end": { + "line": 1, + "column": 54 + } + } + }, + "children": [ + { + "type": "Literal", + "value": "monkeys /> gorillas", + "raw": "monkeys /> gorillas", + "range": [ + 31, + 50 + ], + "loc": { + "start": { + "line": 1, + "column": 31 + }, + "end": { + "line": 1, + "column": 50 + } + } + } + ], + "range": [ + 28, + 54 + ], + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 54 + } + } + }, + "range": [ + 22, + 54 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 54 + } + } + } + ], + "range": [ + 0, + 57 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 57 + } + } + }, + "children": [], + "range": [ + 0, + 57 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 57 + } + } + }, + "range": [ + 0, + 57 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 57 + } + } + } + }, + + 'Invalid XJS Syntax': { + '': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Unexpected token /', + description: 'Unexpected token /' + }, + + '': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: XJS tag name can not be empty' + }, + + '<:a />': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Unexpected token :', + description: 'Unexpected token :' + }, + + '': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: XJS value should be either an expression or a quoted XJS text' + }, + + '': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected end of input' + }, + + '': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Expected corresponding XJS closing tag for a' + }, + + '': { + index: 9, + lineNumber: 1, + column: 10, + message: "Error: Line 1: Expected corresponding XJS closing tag for a:b", + }, + + '': { + index: 8, + lineNumber: 1, + column: 9, + message: 'Error: Line 1: Unexpected end of input' + }, + + '': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: XJS attributes must only be assigned a non-empty expression' + }, + + '{"str";}': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token ;', + description: 'Unexpected token ;' + }, + + '': { + index: 19, + lineNumber: 1, + column: 20, + message: 'Error: Line 1: Unexpected token ,', + description: 'Unexpected token ,' + }, + + '
    ': { + index: 14, + lineNumber: 1, + column: 15, + message: 'Error: Line 1: Unexpected string', + description: 'Unexpected string' + } + }, + + 'Type Annotations': { + 'function foo(numVal: number){}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'foo', + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + params: [{ + type: 'TypeAnnotatedIdentifier', + id: { + type: 'Identifier', + name: 'numVal', + range: [13, 19], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 19 } + } + }, + annotation: { + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'number', + range: [21, 27], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 27 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [19, 27], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 27 } + } + }, + range: [13, 27], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 27 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [28, 30], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 30 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 30], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 30 } + } + }, + + 'function foo(numVal: number, strVal: string){}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'foo', + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + params: [{ + type: 'TypeAnnotatedIdentifier', + id: { + type: 'Identifier', + name: 'numVal', + range: [13, 19], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 19 } + } + }, + annotation: { + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'number', + range: [21, 27], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 27 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [19, 27], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 27 } + } + }, + range: [13, 27], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 27 } + } + }, { + type: 'TypeAnnotatedIdentifier', + id: { + type: 'Identifier', + name: 'strVal', + range: [29, 35], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 35 } + } + }, + annotation: { + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'string', + range: [37, 43], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 43 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [35, 43], + loc: { + start: { line: 1, column: 35 }, + end: { line: 1, column: 43 } + } + }, + range: [29, 43], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 43 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [44, 46], + loc: { + start: { line: 1, column: 44 }, + end: { line: 1, column: 46 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 46], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 46 } + } + }, + + 'function foo(numVal: number, untypedVal){}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'foo', + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + params: [{ + type: 'TypeAnnotatedIdentifier', + id: { + type: 'Identifier', + name: 'numVal', + range: [13, 19], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 19 } + } + }, + annotation: { + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'number', + range: [21, 27], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 27 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [19, 27], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 27 } + } + }, + range: [13, 27], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 27 } + } + }, { + type: 'Identifier', + name: 'untypedVal', + range: [29, 39], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 39 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [40, 42], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 42 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 42], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 42 } + } + }, + + 'function foo(untypedVal, numVal: number){}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'foo', + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + params: [{ + type: 'Identifier', + name: 'untypedVal', + range: [13, 23], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 23 } + } + }, { + type: 'TypeAnnotatedIdentifier', + id: { + type: 'Identifier', + name: 'numVal', + range: [25, 31], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 31 } + } + }, + annotation: { + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'number', + range: [33, 39], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 39 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [31, 39], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 39 } + } + }, + range: [25, 39], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 39 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [40, 42], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 42 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 42], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 42 } + } + }, + + 'function foo(nullableNum: ?number){}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'foo', + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + params: [{ + type: 'TypeAnnotatedIdentifier', + id: { + type: 'Identifier', + name: 'nullableNum', + range: [13, 24], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 24 } + } + }, + annotation: { + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'number', + range: [27, 33], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 33 } + } + }, + paramTypes: null, + returnType: null, + nullable: true, + range: [24, 33], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 33 } + } + }, + range: [13, 33], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 33 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [34, 36], + loc: { + start: { line: 1, column: 34 }, + end: { line: 1, column: 36 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + } + }, + + 'function foo(callback: () => void){}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'foo', + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + params: [{ + type: 'TypeAnnotatedIdentifier', + id: { + type: 'Identifier', + name: 'callback', + range: [13, 21], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 21 } + } + }, + annotation: { + type: 'TypeAnnotation', + id: null, + paramTypes: [], + returnType: null, + nullable: false, + range: [21, 33], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 33 } + } + }, + range: [13, 33], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 33 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [34, 36], + loc: { + start: { line: 1, column: 34 }, + end: { line: 1, column: 36 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + } + }, + + 'function foo(callback: () => number){}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'foo', + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + params: [{ + type: 'TypeAnnotatedIdentifier', + id: { + type: 'Identifier', + name: 'callback', + range: [13, 21], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 21 } + } + }, + annotation: { + type: 'TypeAnnotation', + id: null, + paramTypes: [], + returnType: { + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'number', + range: [29, 35], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 35 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [29, 35], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 35 } + } + }, + nullable: false, + range: [21, 35], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 35 } + } + }, + range: [13, 35], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 35 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [36, 38], + loc: { + start: { line: 1, column: 36 }, + end: { line: 1, column: 38 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + } + }, + + 'function foo(callback: (bool) => number){}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'foo', + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + params: [{ + type: 'TypeAnnotatedIdentifier', + id: { + type: 'Identifier', + name: 'callback', + range: [13, 21], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 21 } + } + }, + annotation: { + type: 'TypeAnnotation', + id: null, + paramTypes: [{ + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'bool', + range: [24, 28], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 28 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [24, 28], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 28 } + } + }], + returnType: { + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'number', + range: [33, 39], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 39 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [33, 39], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 39 } + } + }, + nullable: false, + range: [21, 39], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 39 } + } + }, + range: [13, 39], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 39 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [40, 42], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 42 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 42], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 42 } + } + }, + + 'function foo(callback: (bool, string) => number){}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'foo', + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + params: [{ + type: 'TypeAnnotatedIdentifier', + id: { + type: 'Identifier', + name: 'callback', + range: [13, 21], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 21 } + } + }, + annotation: { + type: 'TypeAnnotation', + id: null, + paramTypes: [{ + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'bool', + range: [24, 28], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 28 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [24, 28], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 28 } + } + }, { + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'string', + range: [30, 36], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 36 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [30, 36], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 36 } + } + }], + returnType: { + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'number', + range: [41, 47], + loc: { + start: { line: 1, column: 41 }, + end: { line: 1, column: 47 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [41, 47], + loc: { + start: { line: 1, column: 41 }, + end: { line: 1, column: 47 } + } + }, + nullable: false, + range: [21, 47], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 47 } + } + }, + range: [13, 47], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 47 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [48, 50], + loc: { + start: { line: 1, column: 48 }, + end: { line: 1, column: 50 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 50], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 50 } + } + }, + + 'function foo():number{}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'foo', + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [21, 23], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 23 } + } + }, + rest: null, + generator: false, + expression: false, + returnType: { + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'number', + range: [15, 21], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 21 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [14, 21], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 23], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 23 } + } + }, + + 'function foo():() => void{}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'foo', + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [25, 27], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 27 } + } + }, + rest: null, + generator: false, + expression: false, + returnType: { + type: 'TypeAnnotation', + id: null, + paramTypes: [], + returnType: null, + nullable: false, + range: [14, 25], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 25 } + } + }, + range: [0, 27], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + }, + + 'function foo():(bool) => number{}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'foo', + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [31, 33], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 33 } + } + }, + rest: null, + generator: false, + expression: false, + returnType: { + type: 'TypeAnnotation', + id: null, + paramTypes: [{ + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'bool', + range: [16, 20], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 20 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [16, 20], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 20 } + } + }], + returnType: { + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'number', + range: [25, 31], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 31 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [25, 31], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 31 } + } + }, + nullable: false, + range: [14, 31], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 31 } + } + }, + range: [0, 33], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 33 } + } + }, + + 'a={set fooProp(value:number){}}': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'a', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'fooProp', + range: [7, 14], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 14 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'TypeAnnotatedIdentifier', + id: { + type: 'Identifier', + name: 'value', + range: [15, 20], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 20 } + } + }, + annotation: { + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'number', + range: [21, 27], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 27 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [20, 27], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 27 } + } + }, + range: [15, 27], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 27 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [28, 30], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 30 } + } + }, + rest: null, + generator: false, + expression: false, + range: [28, 30], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 30 } + } + }, + kind: 'set', + method: false, + shorthand: false, + range: [3, 30], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 30 } + } + }], + range: [2, 31], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 31 } + } + }, + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + } + }, + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + } + }, + + 'class Foo {set fooProp(value:number){}}': { + type: 'ClassDeclaration', + id: { + type: 'Identifier', + name: 'Foo', + range: [6, 9], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 9 } + } + }, + superClass: null, + body: { + type: 'ClassBody', + body: [{ + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'fooProp', + range: [15, 22], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 22 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'TypeAnnotatedIdentifier', + id: { + type: 'Identifier', + name: 'value', + range: [23, 28], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 28 } + } + }, + annotation: { + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'number', + range: [29, 35], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 35 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [28, 35], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 35 } + } + }, + range: [23, 35], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 35 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [36, 38], + loc: { + start: { line: 1, column: 36 }, + end: { line: 1, column: 38 } + } + }, + rest: null, + generator: false, + expression: false, + range: [36, 38], + loc: { + start: { line: 1, column: 36 }, + end: { line: 1, column: 38 } + } + }, + kind: 'set', + 'static': false, + range: [11, 38], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 38 } + } + }], + range: [10, 39], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 39 } + } + }, + range: [0, 39], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 39 } + } + }, + + 'var numVal:number;': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'TypeAnnotatedIdentifier', + id: { + type: 'Identifier', + name: 'numVal', + range: [4, 10], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 10 } + } + }, + annotation: { + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'number', + range: [11, 17], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 17 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [10, 17], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 17 } + } + }, + range: [4, 17], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 17 } + } + }, + init: null, + range: [4, 17], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 17 } + } + }], + kind: 'var', + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + + 'var numVal:number = otherNumVal;': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'TypeAnnotatedIdentifier', + id: { + type: 'Identifier', + name: 'numVal', + range: [4, 10], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 10 } + } + }, + annotation: { + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'number', + range: [11, 17], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 17 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [10, 17], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 17 } + } + }, + range: [4, 17], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 17 } + } + }, + init: { + type: 'Identifier', + name: 'otherNumVal', + range: [20, 31], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 31 } + } + }, + range: [4, 31], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 31 } + } + }], + kind: 'var', + range: [0, 32], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 32 } + } + } + } +}; + +// Merge fbTestFixture in to testFixture + +(function () { + + 'use strict'; + + var i, fixtures; + + for (i in fbTestFixture) { + if (fbTestFixture.hasOwnProperty(i)) { + fixtures = fbTestFixture[i]; + if (i !== 'Syntax' && testFixture.hasOwnProperty(i)) { + throw new Error('FB test should not replace existing test for ' + i); + } + testFixture[i] = fixtures; + } + } + +}()); diff --git a/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/harmonytest.js b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/harmonytest.js new file mode 100644 index 00000000..6a22eb94 --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/harmonytest.js @@ -0,0 +1,12518 @@ +/* + Copyright (C) 2012 Ariya Hidayat + Copyright (C) 2012 Joost-Wim Boekesteijn + Copyright (C) 2012 Yusuke Suzuki + Copyright (C) 2012 Arpad Borsos + Copyright (C) 2011 Ariya Hidayat + Copyright (C) 2011 Yusuke Suzuki + Copyright (C) 2011 Arpad Borsos + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +var testFixture; + +var harmonyTestFixture = { + + 'ES6 Unicode Code Point Escape Sequence': { + + '"\\u{714E}\\u{8336}"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: '煎茶', + raw: '"\\u{714E}\\u{8336}"', + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + + '"\\u{20BB7}\\u{91CE}\\u{5BB6}"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: '\ud842\udfb7\u91ce\u5bb6', + raw: '"\\u{20BB7}\\u{91CE}\\u{5BB6}"', + range: [0, 27], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + }, + range: [0, 27], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + } + }, + + // ECMAScript 6th Syntax, 7.8.3 Numeric Literals + + 'ES6: Numeric Literal': { + + '00': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0, + raw: '00', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + + '0o0': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0, + raw: '0o0', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + 'function test() {\'use strict\'; 0o0; }': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'test', + range: [9, 13], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 13 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '\'use strict\'', + range: [17, 29], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 29 } + } + }, + range: [17, 30], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 30 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0, + raw: '0o0', + range: [31, 34], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 34 } + } + }, + range: [31, 35], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 35 } + } + }], + range: [16, 37], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 37 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 37], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 37 } + } + }, + + '0o2': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 2, + raw: '0o2', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + '0o12': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 10, + raw: '0o12', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + + '0O0': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0, + raw: '0O0', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + 'function test() {\'use strict\'; 0O0; }': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'test', + range: [9, 13], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 13 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '\'use strict\'', + range: [17, 29], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 29 } + } + }, + range: [17, 30], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 30 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0, + raw: '0O0', + range: [31, 34], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 34 } + } + }, + range: [31, 35], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 35 } + } + }], + range: [16, 37], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 37 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 37], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 37 } + } + }, + + '0O2': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 2, + raw: '0O2', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + '0O12': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 10, + raw: '0O12', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + + + '0b0': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0, + raw: '0b0', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + '0b1': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 1, + raw: '0b1', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + '0b10': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 2, + raw: '0b10', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + + '0B0': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0, + raw: '0B0', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + '0B1': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 1, + raw: '0B1', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + '0B10': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 2, + raw: '0B10', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + } + + }, + + // ECMAScript 6th Syntax, 11.1. 9 Template Literals + + 'ES6 Template Strings': { + '`42`': { + type: 'ExpressionStatement', + expression: { + type: 'TemplateLiteral', + quasis: [{ + type: 'TemplateElement', + value: { + raw: '42', + cooked: '42' + }, + tail: true, + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }], + expressions: [], + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + + 'raw`42`': { + type: 'ExpressionStatement', + expression: { + type: 'TaggedTemplateExpression', + tag: { + type: 'Identifier', + name: 'raw', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + quasi: { + type: 'TemplateLiteral', + quasis: [{ + type: 'TemplateElement', + value: { + raw: '42', + cooked: '42' + }, + tail: true, + range: [3, 7], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 7 } + } + }], + expressions: [], + range: [3, 7], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'raw`hello ${name}`': { + type: 'ExpressionStatement', + expression: { + type: 'TaggedTemplateExpression', + tag: { + type: 'Identifier', + name: 'raw', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + quasi: { + type: 'TemplateLiteral', + quasis: [{ + type: 'TemplateElement', + value: { + raw: 'hello ', + cooked: 'hello ' + }, + tail: false, + range: [3, 12], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 12 } + } + }, { + type: 'TemplateElement', + value: { + raw: '', + cooked: '' + }, + tail: true, + range: [16, 18], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 18 } + } + }], + expressions: [{ + type: 'Identifier', + name: 'name', + range: [12, 16], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 16 } + } + }], + range: [3, 18], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 18 } + } + }, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + + '`$`': { + type: 'ExpressionStatement', + expression: { + type: 'TemplateLiteral', + quasis: [{ + type: 'TemplateElement', + value: { + raw: '$', + cooked: '$' + }, + tail: true, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }], + expressions: [], + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + '`\\n\\r\\b\\v\\t\\f\\\n\\\r\n`': { + type: 'ExpressionStatement', + expression: { + type: 'TemplateLiteral', + quasis: [{ + type: 'TemplateElement', + value: { + raw: '\\n\\r\\b\\v\\t\\f\\\n\\\r\n', + cooked: '\n\r\b\v\t\f' + }, + tail: true, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 3, column: 19 } + } + }], + expressions: [], + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 3, column: 19 } + } + }, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 3, column: 19 } + } + }, + + '`\n\r\n`': { + type: 'ExpressionStatement', + expression: { + type: 'TemplateLiteral', + quasis: [{ + type: 'TemplateElement', + value: { + raw: '\n\r\n', + cooked: '\n\n' + }, + tail: true, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 3, column: 5 } + } + }], + expressions: [], + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 3, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 3, column: 5 } + } + }, + + '`\\u{000042}\\u0042\\x42\\u0\\102\\A`': { + type: 'ExpressionStatement', + expression: { + type: 'TemplateLiteral', + quasis: [{ + type: 'TemplateElement', + value: { + raw: '\\u{000042}\\u0042\\x42\\u0\\102\\A', + cooked: 'BBBu0BA' + }, + tail: true, + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + } + }], + expressions: [], + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + } + }, + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + } + }, + + 'new raw`42`': { + type: 'ExpressionStatement', + expression: { + type: 'NewExpression', + callee: { + type: 'TaggedTemplateExpression', + tag: { + type: 'Identifier', + name: 'raw', + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + quasi: { + type: 'TemplateLiteral', + quasis: [{ + type: 'TemplateElement', + value: { + raw: '42', + cooked: '42' + }, + tail: true, + range: [7, 11], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 11 } + } + }], + expressions: [], + range: [7, 11], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 11 } + } + }, + range: [4, 11], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 11 } + } + }, + 'arguments': [], + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + } + + }, + + + // ECMAScript 6th Syntax, 12.11 The switch statement + + 'ES6: Switch Case Declaration': { + + 'switch (answer) { case 42: let t = 42; break; }': { + type: 'SwitchStatement', + discriminant: { + type: 'Identifier', + name: 'answer', + range: [8, 14], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 14 } + } + }, + cases: [{ + type: 'SwitchCase', + test: { + type: 'Literal', + value: 42, + raw: '42', + range: [23, 25], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 25 } + } + }, + consequent: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 't', + range: [31, 32], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 32 } + } + }, + init: { + type: 'Literal', + value: 42, + raw: '42', + range: [35, 37], + loc: { + start: { line: 1, column: 35 }, + end: { line: 1, column: 37 } + } + }, + range: [31, 37], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 37 } + } + }], + kind: 'let', + range: [27, 38], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 38 } + } + }, { + type: 'BreakStatement', + label: null, + range: [39, 45], + loc: { + start: { line: 1, column: 39 }, + end: { line: 1, column: 45 } + } + }], + range: [18, 45], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 45 } + } + }], + range: [0, 47], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 47 } + } + } + }, + + // ECMAScript 6th Syntax, 13.2 Arrow Function Definitions + + 'ES6: Arrow Function': { + '() => "test"': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'Literal', + value: 'test', + raw: '"test"', + range: [6, 12], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 12 } + } + }, + rest: null, + generator: false, + expression: true, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + + 'e => "test"': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'e', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }], + defaults: [], + body: { + type: 'Literal', + value: 'test', + raw: '"test"', + range: [5, 11], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 11 } + } + }, + rest: null, + generator: false, + expression: true, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + + '(e) => "test"': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'e', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }], + defaults: [], + body: { + type: 'Literal', + value: 'test', + raw: '"test"', + range: [7, 13], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 13 } + } + }, + rest: null, + generator: false, + expression: true, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + + '(a, b) => "test"': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'a', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, { + type: 'Identifier', + name: 'b', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }], + defaults: [], + body: { + type: 'Literal', + value: 'test', + raw: '"test"', + range: [10, 16], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 16 } + } + }, + rest: null, + generator: false, + expression: true, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + 'e => { 42; }': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'e', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [7, 9], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 9 } + } + }, + range: [7, 10], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 10 } + } + }], + range: [5, 12], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 12 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + + 'e => ({ property: 42 })': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'e', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }], + defaults: [], + body: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'property', + range: [8, 16], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 16 } + } + }, + value: { + type: 'Literal', + value: 42, + raw: '42', + range: [18, 20], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 20 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [8, 20], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 20 } + } + }], + range: [6, 22], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 22 } + } + }, + rest: null, + generator: false, + expression: true, + range: [0, 23], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 23 } + } + }, + range: [0, 23], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 23 } + } + }, + + // Not an object! + 'e => { label: 42 }': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'e', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'LabeledStatement', + label: { + type: 'Identifier', + name: 'label', + range: [7, 12], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 12 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [14, 16], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 16 } + } + }, + range: [14, 17], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 17 } + } + }, + range: [7, 17], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 17 } + } + }], + range: [5, 18], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 18 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + + '(a, b) => { 42; }': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'a', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, { + type: 'Identifier', + name: 'b', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [12, 14], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 14 } + } + }, + range: [12, 15], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 15 } + } + }], + range: [10, 17], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 17 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + + '([a, , b]) => 42': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [2, 3], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 3 } + } + }, null, { + type: 'Identifier', + name: 'b', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }], + range: [1, 9], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 9 } + } + }], + defaults: [], + body: { + type: 'Literal', + value: 42, + raw: '42', + range: [14, 16], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 16 } + } + }, + rest: null, + generator: false, + expression: true, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + '([a.a]) => 42': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'ArrayPattern', + elements: [{ + type: 'MemberExpression', + computed: false, + object: { + type: 'Identifier', + name: 'a', + range: [2, 3], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 3 } + } + }, + property: { + type: 'Identifier', + name: 'a', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [2, 5], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 5 } + } + }], + range: [1, 6], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 6 } + } + }], + defaults: [], + body: { + type: 'Literal', + value: 42, + raw: '42', + range: [11, 13], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 13 } + } + }, + rest: null, + generator: false, + expression: true, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + + '(x=1) => x * x': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'x', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }], + defaults: [{ + type: 'Literal', + value: 1, + raw: '1', + range: [3, 4], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 4 } + } + }], + body: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'Identifier', + name: 'x', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + right: { + type: 'Identifier', + name: 'x', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }, + range: [9, 14], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 14 } + } + }, + rest: null, + generator: false, + expression: true, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + // not strict mode, using eval + 'eval => 42': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'eval', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }], + defaults: [], + body: { + type: 'Literal', + value: 42, + raw: '42', + range: [8, 10], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 10 } + } + }, + rest: null, + generator: false, + expression: true, + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + }, + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + }, + + // not strict mode, using arguments + 'arguments => 42': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'arguments', + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }], + defaults: [], + body: { + type: 'Literal', + value: 42, + raw: '42', + range: [13, 15], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 15 } + } + }, + rest: null, + generator: false, + expression: true, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + + // not strict mode, using octals + '(a) => 00': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'a', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }], + defaults: [], + body: { + type: 'Literal', + value: 0, + raw: '00', + range: [7, 9], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 9 } + } + }, + rest: null, + generator: false, + expression: true, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + // not strict mode, using eval, IsSimpleParameterList is true + '(eval, a) => 42': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'eval', + range: [1, 5], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 5 } + } + }, { + type: 'Identifier', + name: 'a', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }], + defaults: [], + body: { + type: 'Literal', + value: 42, + raw: '42', + range: [13, 15], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 15 } + } + }, + rest: null, + generator: false, + expression: true, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + + // not strict mode, assigning to eval + '(eval = 10) => 42': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'eval', + range: [1, 5], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 5 } + } + }], + defaults: [{ + type: 'Literal', + value: 10, + raw: '10', + range: [8, 10], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 10 } + } + }], + body: { + type: 'Literal', + value: 42, + raw: '42', + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + rest: null, + generator: false, + expression: true, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + + // not strict mode, using eval, IsSimpleParameterList is false + '(eval, a = 10) => 42': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'eval', + range: [1, 5], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 5 } + } + }, { + type: 'Identifier', + name: 'a', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }], + defaults: [null, { + type: 'Literal', + value: 10, + raw: '10', + range: [11, 13], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 13 } + } + }], + body: { + type: 'Literal', + value: 42, + raw: '42', + range: [18, 20], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 20 } + } + }, + rest: null, + generator: false, + expression: true, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + + '(x => x)': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'x', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }], + defaults: [], + body: { + type: 'Identifier', + name: 'x', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + rest: null, + generator: false, + expression: true, + range: [1, 7], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + + 'x => y => 42': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }], + defaults: [], + body: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }], + defaults: [], + body: { + type: 'Literal', + value: 42, + raw: '42', + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + rest: null, + generator: false, + expression: true, + range: [5, 12], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 12 } + } + }, + rest: null, + generator: false, + expression: true, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + + '(x) => ((y, z) => (x, y, z))': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'x', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }], + defaults: [], + body: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'y', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, { + type: 'Identifier', + name: 'z', + range: [12, 13], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 13 } + } + }], + defaults: [], + body: { + type: 'SequenceExpression', + expressions: [{ + type: 'Identifier', + name: 'x', + range: [19, 20], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 20 } + } + }, { + type: 'Identifier', + name: 'y', + range: [22, 23], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 23 } + } + }, { + type: 'Identifier', + name: 'z', + range: [25, 26], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 26 } + } + }], + range: [19, 26], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 26 } + } + }, + rest: null, + generator: false, + expression: true, + range: [8, 27], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 27 } + } + }, + rest: null, + generator: false, + expression: true, + range: [0, 28], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 28 } + } + }, + range: [0, 28], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 28 } + } + }, + + 'foo(() => {})': { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'foo', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + 'arguments': [{ + type: 'ArrowFunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + rest: null, + generator: false, + expression: false, + range: [4, 12], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 12 } + } + }], + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + + 'foo((x, y) => {})': { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'foo', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + 'arguments': [{ + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'x', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, { + type: 'Identifier', + name: 'y', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [14, 16], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 16 } + } + }, + rest: null, + generator: false, + expression: false, + range: [4, 16], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 16 } + } + }], + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + } + + }, + + + // ECMAScript 6th Syntax, 13.13 Method Definitions + + 'ES6: Method Definition': { + + 'x = { method() { } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'method', + range: [6, 12], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 12 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [15, 18], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 18 } + } + }, + rest: null, + generator: false, + expression: false, + range: [15, 18], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 18 } + } + }, + kind: 'init', + method: true, + shorthand: false, + range: [6, 18], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 18 } + } + }], + range: [4, 20], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 20 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + + 'x = { method(test) { } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'method', + range: [6, 12], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 12 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'test', + range: [13, 17], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 17 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [19, 22], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 22 } + } + }, + rest: null, + generator: false, + expression: false, + range: [19, 22], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 22 } + } + }, + kind: 'init', + method: true, + shorthand: false, + range: [6, 22], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 22 } + } + }], + range: [4, 24], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 24 } + } + }, + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + + 'x = { \'method\'() { } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Literal', + value: 'method', + raw: '\'method\'', + range: [6, 14], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 14 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [17, 20], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 20 } + } + }, + rest: null, + generator: false, + expression: false, + range: [17, 20], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 20 } + } + }, + kind: 'init', + method: true, + shorthand: false, + range: [6, 20], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 20 } + } + }], + range: [4, 22], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + + 'x = { get() { } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'get', + range: [6, 9], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 9 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [12, 15], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 15 } + } + }, + rest: null, + generator: false, + expression: false, + range: [12, 15], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 15 } + } + }, + kind: 'init', + method: true, + shorthand: false, + range: [6, 15], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 15 } + } + }], + range: [4, 17], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + + 'x = { set() { } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'set', + range: [6, 9], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 9 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [12, 15], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 15 } + } + }, + rest: null, + generator: false, + expression: false, + range: [12, 15], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 15 } + } + }, + kind: 'init', + method: true, + shorthand: false, + range: [6, 15], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 15 } + } + }], + range: [4, 17], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + + 'x = { method() 42 }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'method', + range: [6, 12], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 12 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'Literal', + value: 42, + raw: '42', + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + rest: null, + generator: false, + expression: true, + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + kind: 'init', + method: true, + shorthand: false, + range: [6, 17], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 17 } + } + }], + range: [4, 19], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 19 } + } + }, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + + 'x = { get method() 42 }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'method', + range: [10, 16], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 16 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'Literal', + value: 42, + raw: '42', + range: [19, 21], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 21 } + } + }, + rest: null, + generator: false, + expression: true, + range: [19, 21], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 21 } + } + }, + kind: 'get', + method: false, + shorthand: false, + range: [6, 21], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 21 } + } + }], + range: [4, 23], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 23 } + } + }, + range: [0, 23], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 23 } + } + }, + range: [0, 23], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 23 } + } + }, + + 'x = { set method(val) v = val }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'method', + range: [10, 16], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 16 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'val', + range: [17, 20], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 20 } + } + }], + defaults: [], + body: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'v', + range: [22, 23], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 23 } + } + }, + right: { + type: 'Identifier', + name: 'val', + range: [26, 29], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 29 } + } + }, + range: [22, 29], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 29 } + } + }, + rest: null, + generator: false, + expression: true, + range: [22, 29], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 29 } + } + }, + kind: 'set', + method: false, + shorthand: false, + range: [6, 29], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 29 } + } + }], + range: [4, 31], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 31 } + } + }, + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + } + }, + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + } + } + + }, + + 'Array Comprehension': { + + '[[x,b,c] for (x in []) for (b in []) if (b && c)]' : { + type: 'ExpressionStatement', + expression: { + type: 'ComprehensionExpression', + filter: { + type: 'LogicalExpression', + operator: '&&', + left: { + type: 'Identifier', + name: 'b', + range: [41, 42], + loc: { + start: { line: 1, column: 41 }, + end: { line: 1, column: 42 } + } + }, + right: { + type: 'Identifier', + name: 'c', + range: [46, 47], + loc: { + start: { line: 1, column: 46 }, + end: { line: 1, column: 47 } + } + }, + range: [41, 47], + loc: { + start: { line: 1, column: 41 }, + end: { line: 1, column: 47 } + } + }, + blocks: [{ + type: 'ComprehensionBlock', + left: { + type: 'Identifier', + name: 'x', + range: [14, 15], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 15 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [19, 21], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 21 } + } + }, + each: false, + of: false + }, { + type: 'ComprehensionBlock', + left: { + type: 'Identifier', + name: 'b', + range: [28, 29], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 29 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [33, 35], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 35 } + } + }, + each: false, + of: false + }], + body: { + type: 'ArrayExpression', + elements: [{ + type: 'Identifier', + name: 'x', + range: [2, 3], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 3 } + } + }, { + type: 'Identifier', + name: 'b', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, { + type: 'Identifier', + name: 'c', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }], + range: [1, 8], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 49], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 49 } + } + }, + range: [0, 49], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 49 } + } + }, + + '[x for (a in [])]' : { + type: 'ExpressionStatement', + expression: { + type: 'ComprehensionExpression', + filter: null, + blocks: [{ + type: 'ComprehensionBlock', + left: { + type: 'Identifier', + name: 'a', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [13, 15], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 15 } + } + }, + each: false, + of: false + }], + body: { + type: 'Identifier', + name: 'x', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + + '[1 for (x in [])]' : { + type: 'ExpressionStatement', + expression: { + type: 'ComprehensionExpression', + filter: null, + blocks: [{ + type: 'ComprehensionBlock', + left: { + type: 'Identifier', + name: 'x', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [13, 15], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 15 } + } + }, + each: false, + of: false + }], + body: { + type: 'Literal', + value: 1, + raw: '1', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + + '[(x,1) for (x in [])]' : { + type: 'ExpressionStatement', + expression: { + type: 'ComprehensionExpression', + filter: null, + blocks: [{ + type: 'ComprehensionBlock', + left: { + type: 'Identifier', + name: 'x', + range: [12, 13], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 13 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [17, 19], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 19 } + } + }, + each: false, + of: false + }], + body: { + type: 'SequenceExpression', + expressions: [{ + type: 'Identifier', + name: 'x', + range: [2, 3], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 3 } + } + }, { + type: 'Literal', + value: 1, + raw: '1', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }], + range: [2, 5], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + + + '[x for (x of array)]': { + type: 'ExpressionStatement', + expression: { + type: 'ComprehensionExpression', + filter: null, + blocks: [{ + type: 'ComprehensionBlock', + left: { + type: 'Identifier', + name: 'x', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + right: { + type: 'Identifier', + name: 'array', + range: [13, 18], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 18 } + } + }, + of: true + }], + body: { + type: 'Identifier', + name: 'x', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + + '[x for (x of array) for (y of array2) if (x === test)]': { + type: 'ExpressionStatement', + expression: { + type: 'ComprehensionExpression', + filter: { + type: 'BinaryExpression', + operator: '===', + left: { + type: 'Identifier', + name: 'x', + range: [42, 43], + loc: { + start: { line: 1, column: 42 }, + end: { line: 1, column: 43 } + } + }, + right: { + type: 'Identifier', + name: 'test', + range: [48, 52], + loc: { + start: { line: 1, column: 48 }, + end: { line: 1, column: 52 } + } + }, + range: [42, 52], + loc: { + start: { line: 1, column: 42 }, + end: { line: 1, column: 52 } + } + }, + blocks: [{ + type: 'ComprehensionBlock', + left: { + type: 'Identifier', + name: 'x', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + right: { + type: 'Identifier', + name: 'array', + range: [13, 18], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 18 } + } + }, + of: true + }, { + type: 'ComprehensionBlock', + left: { + type: 'Identifier', + name: 'y', + range: [25, 26], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 26 } + } + }, + right: { + type: 'Identifier', + name: 'array2', + range: [30, 36], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 36 } + } + }, + of: true + }], + body: { + type: 'Identifier', + name: 'x', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 54], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 54 } + } + }, + range: [0, 54], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 54 } + } + } + + }, + + // http://wiki.ecmascript.org/doku.php?id=harmony:object_literals#object_literal_property_value_shorthand + + 'Harmony: Object Literal Property Value Shorthand': { + + 'x = { y, z }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'y', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + value: { + type: 'Identifier', + name: 'y', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'z', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + value: { + type: 'Identifier', + name: 'z', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }], + range: [4, 12], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + } + + }, + + // http://wiki.ecmascript.org/doku.php?id=harmony:destructuring + + 'Harmony: Destructuring': { + + '[a, b] = [b, a]': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, { + type: 'Identifier', + name: 'b', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }], + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + right: { + type: 'ArrayExpression', + elements: [{ + type: 'Identifier', + name: 'b', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, { + type: 'Identifier', + name: 'a', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }], + range: [9, 15], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + + '({ responseText: text }) = res': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'responseText', + range: [3, 15], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 15 } + } + }, + value: { + type: 'Identifier', + name: 'text', + range: [17, 21], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 21 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [3, 21], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 21 } + } + }], + range: [1, 23], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 23 } + } + }, + right: { + type: 'Identifier', + name: 'res', + range: [27, 30], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 30 } + } + }, + range: [0, 30], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 30 } + } + }, + range: [0, 30], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 30 } + } + }, + + 'const {a} = {}': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + value: { + type: 'Identifier', + name: 'a', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }], + range: [6, 9], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 9 } + } + }, + init: { + type: 'ObjectExpression', + properties: [], + range: [12, 14], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 14 } + } + }, + range: [6, 14], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 14 } + } + }], + kind: 'const', + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + 'const [a] = []': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }], + range: [6, 9], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 9 } + } + }, + init: { + type: 'ArrayExpression', + elements: [], + range: [12, 14], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 14 } + } + }, + range: [6, 14], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 14 } + } + }], + kind: 'const', + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + 'let {a} = {}': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + value: { + type: 'Identifier', + name: 'a', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }], + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + init: { + type: 'ObjectExpression', + properties: [], + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + range: [4, 12], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 12 } + } + }], + kind: 'let', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + + 'let [a] = []': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }], + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + init: { + type: 'ArrayExpression', + elements: [], + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + range: [4, 12], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 12 } + } + }], + kind: 'let', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + + 'var {a} = {}': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + value: { + type: 'Identifier', + name: 'a', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }], + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + init: { + type: 'ObjectExpression', + properties: [], + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + range: [4, 12], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 12 } + } + }], + kind: 'var', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + + 'var [a] = []': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }], + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + init: { + type: 'ArrayExpression', + elements: [], + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + range: [4, 12], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 12 } + } + }], + kind: 'var', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + + 'const {a:b} = {}': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + value: { + type: 'Identifier', + name: 'b', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [7, 10], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 10 } + } + }], + range: [6, 11], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 11 } + } + }, + init: { + type: 'ObjectExpression', + properties: [], + range: [14, 16], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 16 } + } + }, + range: [6, 16], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 16 } + } + }], + kind: 'const', + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + 'let {a:b} = {}': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + value: { + type: 'Identifier', + name: 'b', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [5, 8], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 8 } + } + }], + range: [4, 9], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 9 } + } + }, + init: { + type: 'ObjectExpression', + properties: [], + range: [12, 14], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 14 } + } + }, + range: [4, 14], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 14 } + } + }], + kind: 'let', + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + 'var {a:b} = {}': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + value: { + type: 'Identifier', + name: 'b', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [5, 8], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 8 } + } + }], + range: [4, 9], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 9 } + } + }, + init: { + type: 'ObjectExpression', + properties: [], + range: [12, 14], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 14 } + } + }, + range: [4, 14], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 14 } + } + }], + kind: 'var', + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + } + + + }, + + // http://wiki.ecmascript.org/doku.php?id=harmony:modules + + 'Harmony: Modules': { + + 'module "crypto" {}': { + type: 'ModuleDeclaration', + id: { + type: 'Literal', + value: 'crypto', + raw: '"crypto"', + range: [7, 15], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 15 } + } + }, + source: null, + body: { + type: 'BlockStatement', + body: [], + range: [16, 18], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 18 } + } + }, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + + 'module crypto from "crypto";': { + type: 'ModuleDeclaration', + id: { + type: 'Identifier', + name: 'crypto', + range: [7, 13], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 13 } + } + }, + source: { + type: 'Literal', + value: 'crypto', + raw: '"crypto"', + range: [19, 27], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 27 } + } + }, + body: null, + range: [0, 28], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 28 } + } + }, + + 'module "crypto/e" {}': { + type: 'ModuleDeclaration', + id: { + type: 'Literal', + value: 'crypto/e', + raw: '"crypto/e"', + range: [7, 17], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 17 } + } + }, + source: null, + body: { + type: 'BlockStatement', + body: [], + range: [18, 20], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 20 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + + 'export var document': { + type: 'ExportDeclaration', + declaration: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'document', + range: [ 11, 19 ], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 19 } + } + }, + init: null, + range: [ 11, 19 ], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 19 } + } + }], + kind: 'var', + range: [ 7, 19 ], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 19 } + } + }, + specifiers: null, + source: null, + range: [ 0, 19 ], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + + 'export var document = { }': { + type: 'ExportDeclaration', + declaration: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'document', + range: [ 11, 19 ], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 19 } + } + }, + init: { + type: 'ObjectExpression', + properties: [], + range: [ 22, 25 ], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 25 } + } + }, + range: [ 11, 25 ], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 25 } + } + }], + kind: 'var', + range: [ 7, 25 ], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 25 } + } + }, + specifiers: null, + source: null, + range: [ 0, 25 ], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 25 } + } + }, + + 'export let document': { + type: 'ExportDeclaration', + declaration: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'document', + range: [ 11, 19 ], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 19 } + } + }, + init: null, + range: [ 11, 19 ], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 19 } + } + }], + kind: 'let', + range: [ 7, 19 ], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 19 } + } + }, + specifiers: null, + source: null, + range: [ 0, 19 ], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + + 'export let document = { }': { + type: 'ExportDeclaration', + declaration: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'document', + range: [ 11, 19 ], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 19 } + } + }, + init: { + type: 'ObjectExpression', + properties: [], + range: [ 22, 25 ], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 25 } + } + }, + range: [ 11, 25 ], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 25 } + } + }], + kind: 'let', + range: [ 7, 25 ], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 25 } + } + }, + specifiers: null, + source: null, + range: [ 0, 25 ], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 25 } + } + }, + + 'export const document = { }': { + type: 'ExportDeclaration', + declaration: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'document', + range: [ 13, 21 ], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 21 } + } + }, + init: { + type: 'ObjectExpression', + properties: [], + range: [ 24, 27 ], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 27 } + } + }, + range: [ 13, 27 ], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 27 } + } + }], + kind: 'const', + range: [ 7, 27 ], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 27 } + } + }, + specifiers: null, + source: null, + range: [ 0, 27 ], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + }, + + 'export function parse() { }': { + type: 'ExportDeclaration', + declaration: { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'parse', + range: [ 16, 21 ], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 21 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [ 24, 27 ], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 27 } + } + }, + rest: null, + generator: false, + expression: false, + range: [ 7, 27 ], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 27 } + } + }, + specifiers: null, + source: null, + range: [ 0, 27 ], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + }, + + 'export class Class {}': { + type: 'ExportDeclaration', + declaration: { + type: 'ClassDeclaration', + id: { + type: 'Identifier', + name: 'Class', + range: [ 13, 18 ], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 18 } + } + }, + superClass: null, + body: { + type: 'ClassBody', + body: [], + range: [ 19, 21 ], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 21 } + } + }, + range: [ 7, 21 ], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 21 } + } + }, + specifiers: null, + source: null, + range: [ 0, 21 ], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + + 'export default = 42': { + type: 'ExportDeclaration', + declaration: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'default', + range: [7, 14], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 14 } + } + }, + init: { + type: 'Literal', + value: 42, + raw: '42', + range: [17, 19], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 19 } + } + }, + range: [7, 19], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 19 } + } + }], + specifiers: null, + source: null, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + + 'export *': { + type: 'ExportDeclaration', + declaration: null, + specifiers: [{ + type: 'ExportBatchSpecifier', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }], + source: null, + range: [ 0, 8 ], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + + 'export * from "crypto"': { + type: 'ExportDeclaration', + declaration: null, + specifiers: [{ + type: 'ExportBatchSpecifier', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }], + source: { + type: 'Literal', + value: 'crypto', + raw: '"crypto"', + range: [14, 22], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + + 'export { encrypt }': { + type: 'ExportDeclaration', + declaration: null, + specifiers: [{ + type: 'ExportSpecifier', + id: { + type: 'Identifier', + name: 'encrypt', + range: [9, 16], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 16 } + } + }, + name: null, + range: [9, 16], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 16 } + } + }], + source: null, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + + 'export { encrypt, decrypt }': { + type: 'ExportDeclaration', + declaration: null, + specifiers: [{ + type: 'ExportSpecifier', + id: { + type: 'Identifier', + name: 'encrypt', + range: [9, 16], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 16 } + } + }, + name: null, + range: [9, 16], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 16 } + } + }, { + type: 'ExportSpecifier', + id: { + type: 'Identifier', + name: 'decrypt', + range: [18, 25], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 25 } + } + }, + name: null, + range: [18, 25], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 25 } + } + }], + source: null, + range: [0, 27], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + }, + + 'export { encrypt as default }': { + type: 'ExportDeclaration', + declaration: null, + specifiers: [{ + type: 'ExportSpecifier', + id: { + type: 'Identifier', + name: 'encrypt', + range: [9, 16], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 16 } + } + }, + name: { + type: 'Identifier', + name: 'default', + range: [20, 27], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 27 } + } + }, + range: [9, 27], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 27 } + } + }], + source: null, + range: [0, 29], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 29 } + } + }, + + 'export { encrypt, decrypt as dec }': { + type: 'ExportDeclaration', + declaration: null, + specifiers: [{ + type: 'ExportSpecifier', + id: { + type: 'Identifier', + name: 'encrypt', + range: [9, 16], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 16 } + } + }, + name: null, + range: [9, 16], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 16 } + } + }, { + type: 'ExportSpecifier', + id: { + type: 'Identifier', + name: 'decrypt', + range: [18, 25], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 25 } + } + }, + name: { + type: 'Identifier', + name: 'dec', + range: [29, 32], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 32 } + } + }, + range: [18, 32], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 32 } + } + }], + source: null, + range: [0, 34], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 34 } + } + }, + + 'module "lib" { export var document }': { + type: 'ModuleDeclaration', + id: { + type: 'Literal', + value: 'lib', + raw: '"lib"', + range: [7, 12], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 12 } + } + }, + source: null, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExportDeclaration', + declaration: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'document', + range: [26, 34], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 34 } + } + }, + init: null, + range: [26, 34], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 34 } + } + }], + kind: 'var', + range: [22, 35], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 35 } + } + }, + specifiers: null, + source: null, + range: [15, 35], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 35 } + } + }], + range: [13, 36], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 36 } + } + }, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + } + }, + + 'module "lib" { export var document = { } }': { + type: 'ModuleDeclaration', + id: { + type: 'Literal', + value: 'lib', + raw: '"lib"', + range: [7, 12], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 12 } + } + }, + source: null, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExportDeclaration', + declaration: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'document', + range: [26, 34], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 34 } + } + }, + init: { + type: 'ObjectExpression', + properties: [], + range: [37, 40], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 40 } + } + }, + range: [26, 40], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 40 } + } + }], + kind: 'var', + range: [22, 41], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 41 } + } + }, + specifiers: null, + source: null, + range: [15, 41], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 41 } + } + }], + range: [13, 42], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 42 } + } + }, + range: [0, 42], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 42 } + } + }, + + 'module "lib" { export let document }': { + type: 'ModuleDeclaration', + id: { + type: 'Literal', + value: 'lib', + raw: '"lib"', + range: [7, 12], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 12 } + } + }, + source: null, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExportDeclaration', + declaration: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'document', + range: [26, 34], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 34 } + } + }, + init: null, + range: [26, 34], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 34 } + } + }], + kind: 'let', + range: [22, 35], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 35 } + } + }, + specifiers: null, + source: null, + range: [15, 35], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 35 } + } + }], + range: [13, 36], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 36 } + } + }, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + } + }, + + 'module "lib" { export let document = { } }': { + type: 'ModuleDeclaration', + id: { + type: 'Literal', + value: 'lib', + raw: '"lib"', + range: [7, 12], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 12 } + } + }, + source: null, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExportDeclaration', + declaration: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'document', + range: [26, 34], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 34 } + } + }, + init: { + type: 'ObjectExpression', + properties: [], + range: [37, 40], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 40 } + } + }, + range: [26, 40], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 40 } + } + }], + kind: 'let', + range: [22, 41], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 41 } + } + }, + specifiers: null, + source: null, + range: [15, 41], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 41 } + } + }], + range: [13, 42], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 42 } + } + }, + range: [0, 42], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 42 } + } + }, + + 'module "lib" { export const document = { } }': { + type: 'ModuleDeclaration', + id: { + type: 'Literal', + value: 'lib', + raw: '"lib"', + range: [7, 12], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 12 } + } + }, + source: null, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExportDeclaration', + declaration: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'document', + range: [28, 36], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 36 } + } + }, + init: { + type: 'ObjectExpression', + properties: [], + range: [39, 42], + loc: { + start: { line: 1, column: 39 }, + end: { line: 1, column: 42 } + } + }, + range: [28, 42], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 42 } + } + }], + kind: 'const', + range: [22, 43], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 43 } + } + }, + specifiers: null, + source: null, + range: [15, 43], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 43 } + } + }], + range: [13, 44], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 44 } + } + }, + range: [0, 44], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 44 } + } + }, + + 'module "lib" { export function parse() { } }': { + type: 'ModuleDeclaration', + id: { + type: 'Literal', + value: 'lib', + raw: '"lib"', + range: [7, 12], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 12 } + } + }, + source: null, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExportDeclaration', + declaration: { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'parse', + range: [31, 36], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 36 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [39, 42], + loc: { + start: { line: 1, column: 39 }, + end: { line: 1, column: 42 } + } + }, + rest: null, + generator: false, + expression: false, + range: [22, 42], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 42 } + } + }, + specifiers: null, + source: null, + range: [15, 42], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 42 } + } + }], + range: [13, 44], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 44 } + } + }, + range: [0, 44], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 44 } + } + }, + + 'module "lib" { export class Class {} }': { + type: 'ModuleDeclaration', + id: { + type: 'Literal', + value: 'lib', + raw: '"lib"', + range: [7, 12], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 12 } + } + }, + source: null, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExportDeclaration', + declaration: { + type: 'ClassDeclaration', + id: { + type: 'Identifier', + name: 'Class', + range: [28, 33], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 33 } + } + }, + superClass: null, + body: { + type: 'ClassBody', + body: [], + range: [34, 36], + loc: { + start: { line: 1, column: 34 }, + end: { line: 1, column: 36 } + } + }, + range: [22, 36], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 36 } + } + }, + specifiers: null, + source: null, + range: [15, 36], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 36 } + } + }], + range: [13, 38], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 38 } + } + }, + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + } + }, + + 'module "lib" { export * }': { + type: 'ModuleDeclaration', + id: { + type: 'Literal', + value: 'lib', + raw: '"lib"', + range: [7, 12], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 12 } + } + }, + source: null, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExportDeclaration', + declaration: null, + specifiers: [{ + type: 'ExportBatchSpecifier', + range: [22, 23], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 23 } + } + }], + source: null, + range: [15, 24], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 24 } + } + }], + range: [13, 25], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 25 } + } + }, + range: [0, 25], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 25 } + } + }, + + 'module "security" { export * from "crypto" }': { + type: 'ModuleDeclaration', + id: { + type: 'Literal', + value: 'security', + raw: '"security"', + range: [7, 17], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 17 } + } + }, + source: null, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExportDeclaration', + declaration: null, + specifiers: [{ + type: 'ExportBatchSpecifier', + range: [27, 28], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 28 } + } + }], + source: { + type: 'Literal', + value: 'crypto', + raw: '"crypto"', + range: [34, 42], + loc: { + start: { line: 1, column: 34 }, + end: { line: 1, column: 42 } + } + }, + range: [20, 43], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 43 } + } + }], + range: [18, 44], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 44 } + } + }, + range: [0, 44], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 44 } + } + }, + + 'module "crypto" { export { encrypt } }': { + type: 'ModuleDeclaration', + id: { + type: 'Literal', + value: 'crypto', + raw: '"crypto"', + range: [7, 15], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 15 } + } + }, + source: null, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExportDeclaration', + declaration: null, + specifiers: [{ + type: 'ExportSpecifier', + id: { + type: 'Identifier', + name: 'encrypt', + range: [27, 34], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 34 } + } + }, + name: null, + range: [27, 34], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 34 } + } + }], + source: null, + range: [18, 37], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 37 } + } + }], + range: [16, 38], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 38 } + } + }, + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + } + }, + + 'module "crypto" { export { encrypt, decrypt } }': { + type: 'ModuleDeclaration', + id: { + type: 'Literal', + value: 'crypto', + raw: '"crypto"', + range: [7, 15], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 15 } + } + }, + source: null, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExportDeclaration', + declaration: null, + specifiers: [{ + type: 'ExportSpecifier', + id: { + type: 'Identifier', + name: 'encrypt', + range: [27, 34], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 34 } + } + }, + name: null, + range: [27, 34], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 34 } + } + }, { + type: 'ExportSpecifier', + id: { + type: 'Identifier', + name: 'decrypt', + range: [36, 43], + loc: { + start: { line: 1, column: 36 }, + end: { line: 1, column: 43 } + } + }, + name: null, + range: [36, 43], + loc: { + start: { line: 1, column: 36 }, + end: { line: 1, column: 43 } + } + }], + source: null, + range: [18, 46], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 46 } + } + }], + range: [16, 47], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 47 } + } + }, + range: [0, 47], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 47 } + } + }, + + 'module "crypto" { export { encrypt, decrypt as dec } }': { + type: 'ModuleDeclaration', + id: { + type: 'Literal', + value: 'crypto', + raw: '"crypto"', + range: [7, 15], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 15 } + } + }, + source: null, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExportDeclaration', + declaration: null, + specifiers: [{ + type: 'ExportSpecifier', + id: { + type: 'Identifier', + name: 'encrypt', + range: [27, 34], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 34 } + } + }, + name: null, + range: [27, 34], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 34 } + } + }, { + type: 'ExportSpecifier', + id: { + type: 'Identifier', + name: 'decrypt', + range: [36, 43], + loc: { + start: { line: 1, column: 36 }, + end: { line: 1, column: 43 } + } + }, + name: { + type: 'Identifier', + name: 'dec', + range: [47, 50], + loc: { + start: { line: 1, column: 47 }, + end: { line: 1, column: 50 } + } + }, + range: [36, 50], + loc: { + start: { line: 1, column: 36 }, + end: { line: 1, column: 50 } + } + }], + source: null, + range: [18, 53], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 53 } + } + }], + range: [16, 54], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 54 } + } + }, + range: [0, 54], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 54 } + } + }, + + 'import "jquery"': { + type: 'ImportDeclaration', + specifiers: [], + source: { + type: 'Literal', + value: 'jquery', + raw: '"jquery"', + range: [7, 15], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + + 'import $ from "jquery"': { + type: 'ImportDeclaration', + specifiers: [{ + type: 'ImportSpecifier', + id: { + type: 'Identifier', + name: '$', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + name: null, + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }], + kind: 'default', + source: { + type: 'Literal', + value: 'jquery', + raw: '"jquery"', + range: [14, 22], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + + 'import { encrypt, decrypt } from "crypto"': { + type: 'ImportDeclaration', + specifiers: [{ + type: 'ImportSpecifier', + id: { + type: 'Identifier', + name: 'encrypt', + range: [9, 16], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 16 } + } + }, + name: null, + range: [9, 16], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 16 } + } + }, { + type: 'ImportSpecifier', + id: { + type: 'Identifier', + name: 'decrypt', + range: [18, 25], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 25 } + } + }, + name: null, + range: [18, 25], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 25 } + } + }], + kind: 'named', + source: { + type: 'Literal', + value: 'crypto', + raw: '"crypto"', + range: [33, 41], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 41 } + } + }, + range: [0, 41], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 41 } + } + }, + + 'import { encrypt as enc } from "crypto"': { + type: 'ImportDeclaration', + specifiers: [{ + type: 'ImportSpecifier', + id: { + type: 'Identifier', + name: 'encrypt', + range: [9, 16], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 16 } + } + }, + name: { + type: 'Identifier', + name: 'enc', + range: [20, 23], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 23 } + } + }, + range: [9, 23], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 23 } + } + }], + kind: 'named', + source: { + type: 'Literal', + value: 'crypto', + raw: '"crypto"', + range: [31, 39], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 39 } + } + }, + range: [0, 39], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 39 } + } + }, + + 'import { decrypt, encrypt as enc } from "crypto"': { + type: 'ImportDeclaration', + specifiers: [{ + type: 'ImportSpecifier', + id: { + type: 'Identifier', + name: 'decrypt', + range: [9, 16], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 16 } + } + }, + name: null, + range: [9, 16], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 16 } + } + }, { + type: 'ImportSpecifier', + id: { + type: 'Identifier', + name: 'encrypt', + range: [18, 25], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 25 } + } + }, + name: { + type: 'Identifier', + name: 'enc', + range: [29, 32], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 32 } + } + }, + range: [18, 32], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 32 } + } + }], + kind: 'named', + source: { + type: 'Literal', + value: 'crypto', + raw: '"crypto"', + range: [40, 48], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 48 } + } + }, + range: [0, 48], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 48 } + } + }, + + 'import default from "foo"': { + type: 'ImportDeclaration', + specifiers: [{ + type: 'ImportSpecifier', + id: { + type: 'Identifier', + name: 'default', + range: [7, 14], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 14 } + } + }, + name: null, + range: [7, 14], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 14 } + } + }], + kind: 'default', + source: { + type: 'Literal', + value: 'foo', + raw: '"foo"', + range: [20, 25], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 25 } + } + }, + range: [0, 25], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 25 } + } + }, + + 'import { null as nil } from "bar"': { + type: 'ImportDeclaration', + specifiers: [{ + type: 'ImportSpecifier', + id: { + type: 'Identifier', + name: 'null', + range: [9, 13], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 13 } + } + }, + name: { + type: 'Identifier', + name: 'nil', + range: [17, 20], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 20 } + } + }, + range: [9, 20], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 20 } + } + }], + kind: 'named', + source: { + type: 'Literal', + value: 'bar', + raw: '"bar"', + range: [28, 33], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 33 } + } + }, + range: [0, 33], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 33 } + } + }, + + 'module "security" { import "cryto" }': { + type: 'ModuleDeclaration', + id: { + type: 'Literal', + value: 'security', + raw: '"security"', + range: [7, 17], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 17 } + } + }, + source: null, + body: { + type: 'BlockStatement', + body: [{ + type: 'ImportDeclaration', + specifiers: [], + source: { + type: 'Literal', + value: 'cryto', + raw: '"cryto"', + range: [27, 34], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 34 } + } + }, + range: [20, 35], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 35 } + } + }], + range: [18, 36], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 36 } + } + }, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + } + }, + + 'module()': { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'module', + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + 'arguments': [], + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + + 'module "foo" { module() }': { + type: 'ModuleDeclaration', + id: { + type: 'Literal', + value: 'foo', + raw: '"foo"', + range: [7, 12], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 12 } + } + }, + source: null, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'module', + range: [15, 21], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 21 } + } + }, + 'arguments': [], + range: [15, 23], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 23 } + } + }, + range: [15, 24], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 24 } + } + }], + range: [13, 25], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 25 } + } + }, + range: [0, 25], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 25 } + } + } + + }, + + + // http://wiki.ecmascript.org/doku.php?id=harmony:generators + + 'Harmony: Yield Expression': { + '(function* () { yield v })': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'YieldExpression', + argument: { + type: 'Identifier', + name: 'v', + range: [22, 23], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 23 } + } + }, + delegate: false, + range: [16, 23], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 23 } + } + }, + range: [16, 24], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 24 } + } + }], + range: [14, 25], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 25 } + } + }, + rest: null, + generator: true, + expression: false, + range: [1, 25], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 25 } + } + }, + range: [0, 26], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 26 } + } + }, + + '(function* () { yield *v })': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'YieldExpression', + argument: { + type: 'Identifier', + name: 'v', + range: [23, 24], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 24 } + } + }, + delegate: true, + range: [16, 24], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 24 } + } + }, + range: [16, 25], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 25 } + } + }], + range: [14, 26], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 26 } + } + }, + rest: null, + generator: true, + expression: false, + range: [1, 26], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 26 } + } + }, + range: [0, 27], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + }, + + 'function* test () { yield *v }': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'test', + range: [10, 14], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 14} + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'YieldExpression', + argument: { + type: 'Identifier', + name: 'v', + range: [27, 28], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 28 } + } + }, + delegate: true, + range: [20, 28], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 28 } + } + }, + range: [20, 29], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 29 } + } + }], + range: [18, 30], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 30 } + } + }, + rest: null, + generator: true, + expression: false, + range: [0, 30], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 30 } + } + }, + + 'var x = { *test () { yield *v } };': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'test', + range: [11, 15], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 15 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'YieldExpression', + argument: { + type: 'Identifier', + name: 'v', + range: [28, 29], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 29 } + } + }, + delegate: true, + range: [21, 29], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 29 } + } + }, + range: [21, 30], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 30 } + } + }], + range: [19, 31], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 31 } + } + }, + rest: null, + generator: true, + expression: false, + range: [19, 31], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 31 } + } + }, + kind: 'init', + method: true, + shorthand: false, + range: [10, 31], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 31 } + } + }], + range: [8, 33], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 33 } + } + }, + range: [4, 33], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 33 } + } + }], + kind: 'var', + range: [0, 34], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 34 } + } + }, + + 'function* t() {}': { + type: 'Program', + body: [{ + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 't', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [14, 16], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 16 } + } + }, + rest: null, + generator: true, + expression: false, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }], + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + }, + errors: [{ + index: 16, + lineNumber: 1, + column: 17, + message: 'Error: Line 1: Missing yield in generator' + }] + }, + + '(function* () { yield yield 10 })': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'YieldExpression', + argument: { + type: 'YieldExpression', + argument: { + type: 'Literal', + value: 10, + raw: '10', + range: [28, 30], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 30 } + } + }, + delegate: false, + range: [22, 30], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 30 } + } + }, + delegate: false, + range: [16, 30], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 30 } + } + }, + range: [16, 31], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 31 } + } + }], + range: [14, 32], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 32 } + } + }, + rest: null, + generator: true, + expression: false, + range: [1, 32], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 32 } + } + }, + range: [0, 33], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 33 } + } + } + + }, + + + + // http://wiki.ecmascript.org/doku.php?id=harmony:iterators + + 'Harmony: Iterators': { + + 'for(x of list) process(x);': { + type: 'ForOfStatement', + left: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'list', + range: [9, 13], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 13 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'process', + range: [15, 22], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 22 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'x', + range: [23, 24], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 24 } + } + }], + range: [15, 25], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 25 } + } + }, + range: [15, 26], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 26 } + } + }, + range: [0, 26], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 26 } + } + }, + + 'for (var x of list) process(x);': { + type: 'ForOfStatement', + left: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + init: null, + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }], + kind: 'var', + range: [5, 10], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 10 } + } + }, + right: { + type: 'Identifier', + name: 'list', + range: [14, 18], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 18 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'process', + range: [20, 27], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 27 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'x', + range: [28, 29], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 29 } + } + }], + range: [20, 30], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 30 } + } + }, + range: [20, 31], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 31 } + } + }, + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + } + }, + + 'for (var x = 42 of list) process(x);': { + type: 'ForOfStatement', + left: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + init: { + type: 'Literal', + value: 42, + raw: '42', + range: [13, 15], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 15 } + } + }, + range: [9, 15], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 15 } + } + }], + kind: 'var', + range: [5, 15], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 15 } + } + }, + right: { + type: 'Identifier', + name: 'list', + range: [19, 23], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 23 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'process', + range: [25, 32], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 32 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'x', + range: [33, 34], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 34 } + } + }], + range: [25, 35], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 35 } + } + }, + range: [25, 36], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 36 } + } + }, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + } + }, + + 'for (let x of list) process(x);': { + type: 'ForOfStatement', + left: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + init: null, + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }], + kind: 'let', + range: [5, 10], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 10 } + } + }, + right: { + type: 'Identifier', + name: 'list', + range: [14, 18], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 18 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'process', + range: [20, 27], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 27 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'x', + range: [28, 29], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 29 } + } + }], + range: [20, 30], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 30 } + } + }, + range: [20, 31], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 31 } + } + }, + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + } + } + + }, + + + // http://wiki.ecmascript.org/doku.php?id=strawman:maximally_minimal_classes + + 'Harmony: Class (strawman)': { + + 'var A = class extends B {}': { + type: "VariableDeclaration", + declarations: [ + { + type: "VariableDeclarator", + id: { + type: "Identifier", + name: "A", + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: { + type: "ClassExpression", + superClass: { + type: "Identifier", + name: "B", + range: [22, 23], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 23 } + } + }, + body: { + type: "ClassBody", + body: [], + range: [24, 26], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 26 } + } + }, + range: [8, 26], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 26 } + } + }, + range: [4, 26], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 26 } + } + } + ], + kind: "var", + range: [0, 26], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 26 } + } + }, + + 'class A extends class B extends C {} {}': { + type: "ClassDeclaration", + id: { + type: "Identifier", + name: "A", + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: { + type: "ClassExpression", + id: { + type: "Identifier", + name: "B", + range: [22, 23], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 23 } + } + }, + superClass: null, + body: { + type: "ClassBody", + body: [], + range: [34, 36], + loc: { + start: { line: 1, column: 34 }, + end: { line: 1, column: 36 } + } + }, + superClass: { + type: "Identifier", + name: "C", + range: [32, 33], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 33 } + } + }, + range: [16, 36], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 36 } + } + }, + body: { + type: "ClassBody", + body: [], + range: [37, 39], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 39 } + } + }, + range: [0, 39], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 39 } + } + }, + + 'class A {get() {}}': { + type: "ClassDeclaration", + id: { + type: "Identifier", + name: "A", + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: null, + body: { + type: "ClassBody", + body: [ + { + type: "MethodDefinition", + key: { + type: "Identifier", + name: "get", + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + value: { + type: "FunctionExpression", + id: null, + params: [], + defaults: [], + body: { + type: "BlockStatement", + body: [], + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + rest: null, + generator: false, + expression: false, + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + kind: "", + 'static': false, + range: [9, 17], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 17 } + } + } + ], + range: [8, 18], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 18 } + } + }, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + + 'class A { static get() {}}': { + type: 'ClassDeclaration', + id: { + type: 'Identifier', + name: 'A', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: null, + body: { + type: 'ClassBody', + body: [{ + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'get', + range: [17, 20], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 20 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [23, 25], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 25 } + } + }, + rest: null, + generator: false, + expression: false, + range: [23, 25], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 25 } + } + }, + kind: '', + 'static': true, + range: [10, 25], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 25 } + } + }], + range: [8, 26], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 26 } + } + }, + range: [0, 26], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 26 } + } + }, + + 'class A extends B {get foo() {}}': { + type: "ClassDeclaration", + id: { + type: "Identifier", + name: "A", + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: { + type: "Identifier", + name: "B", + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }, + body: { + type: "ClassBody", + body: [{ + type: "MethodDefinition", + key: { + type: "Identifier", + name: "foo", + range: [23, 26], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 26 } + } + }, + value: { + type: "FunctionExpression", + id: null, + params: [], + defaults: [], + body: { + type: "BlockStatement", + body: [], + range: [29, 31], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 31 } + } + }, + rest: null, + generator: false, + expression: false, + range: [29, 31], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 31 } + } + }, + kind: "get", + 'static': false, + range: [19, 31], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 31 } + } + }], + range: [18, 32], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 32 } + } + }, + range: [0, 32], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 32 } + } + }, + + 'class A extends B { static get foo() {}}': { + type: 'ClassDeclaration', + id: { + type: 'Identifier', + name: 'A', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: { + type: 'Identifier', + name: 'B', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }, + body: { + type: 'ClassBody', + body: [{ + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'foo', + range: [31, 34], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 34 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [37, 39], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 39 } + } + }, + rest: null, + generator: false, + expression: false, + range: [37, 39], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 39 } + } + }, + kind: 'get', + 'static': true, + range: [20, 39], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 39 } + } + }], + range: [18, 40], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 40 } + } + }, + range: [0, 40], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 40 } + } + }, + + 'class A {set a(v) {}}': { + type: "ClassDeclaration", + id: { + type: "Identifier", + name: "A", + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: null, + body: { + type: "ClassBody", + body: [ + { + type: "MethodDefinition", + key: { + type: 'Identifier', + name: 'a', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }, + value: { + type: "FunctionExpression", + id: null, + params: [{ + type: 'Identifier', + name: 'v', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }], + defaults: [], + body: { + type: "BlockStatement", + body: [], + range: [18, 20], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 20 } + } + }, + rest: null, + generator: false, + expression: false, + range: [18, 20], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 20 } + } + }, + kind: "set", + 'static': false, + range: [9, 20], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 20 } + } + } + ], + range: [8, 21], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + + 'class A { static set a(v) {}}': { + type: 'ClassDeclaration', + id: { + type: 'Identifier', + name: 'A', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: null, + body: { + type: 'ClassBody', + body: [{ + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'a', + range: [21, 22], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 22 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'v', + range: [23, 24], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 24 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [26, 28], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 28 } + } + }, + rest: null, + generator: false, + expression: false, + range: [26, 28], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 28 } + } + }, + kind: 'set', + 'static': true, + range: [10, 28], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 28 } + } + }], + range: [8, 29], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 29 } + } + }, + range: [0, 29], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 29 } + } + }, + + 'class A {set(v) {};}': { + type: "ClassDeclaration", + id: { + type: "Identifier", + name: "A", + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: null, + body: { + type: "ClassBody", + body: [ + { + type: "MethodDefinition", + key: { + type: "Identifier", + name: "set", + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + value: { + type: "FunctionExpression", + id: null, + params: [{ + type: 'Identifier', + name: 'v', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }], + defaults: [], + body: { + type: "BlockStatement", + body: [], + range: [16, 18], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 18 } + } + }, + rest: null, + generator: false, + expression: false, + range: [16, 18], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 18 } + } + }, + kind: "", + 'static': false, + range: [9, 18], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 18 } + } + } + ], + range: [8, 20], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 20 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + + 'class A { static set(v) {};}': { + type: 'ClassDeclaration', + id: { + type: 'Identifier', + name: 'A', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: null, + body: { + type: 'ClassBody', + body: [{ + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'set', + range: [17, 20], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 20 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'v', + range: [21, 22], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 22 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [24, 26], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 26 } + } + }, + rest: null, + generator: false, + expression: false, + range: [24, 26], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 26 } + } + }, + kind: '', + 'static': true, + range: [10, 26], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 26 } + } + }], + range: [8, 28], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 28 } + } + }, + range: [0, 28], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 28 } + } + }, + + 'class A {*gen(v) { yield v; }}': { + type: "ClassDeclaration", + id: { + type: "Identifier", + name: "A", + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: null, + body: { + type: "ClassBody", + body: [ + { + type: "MethodDefinition", + key: { + type: "Identifier", + name: "gen", + range: [10, 13], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 13 } + } + }, + value: { + type: "FunctionExpression", + id: null, + params: [{ + type: 'Identifier', + name: 'v', + range: [14, 15], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 15 } + } + }], + defaults: [], + body: { + type: "BlockStatement", + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'YieldExpression', + argument: { + type: 'Identifier', + name: 'v', + range: [25, 26], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 26 } + } + }, + delegate: false, + range: [19, 26], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 26 } + } + }, + range: [19, 27], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 27 } + } + }], + range: [17, 29], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 29 } + } + }, + rest: null, + generator: true, + expression: false, + range: [17, 29], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 29 } + } + }, + kind: "", + 'static': false, + range: [9, 29], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 29 } + } + } + ], + range: [8, 30], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 30 } + } + }, + range: [0, 30], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 30 } + } + }, + + 'class A { static *gen(v) { yield v; }}': { + type: 'ClassDeclaration', + id: { + type: 'Identifier', + name: 'A', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: null, + body: { + type: 'ClassBody', + body: [{ + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'gen', + range: [18, 21], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 21 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'v', + range: [22, 23], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 23 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'YieldExpression', + argument: { + type: 'Identifier', + name: 'v', + range: [33, 34], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 34 } + } + }, + delegate: false, + range: [27, 34], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 34 } + } + }, + range: [27, 35], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 35 } + } + }], + range: [25, 37], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 37 } + } + }, + rest: null, + generator: true, + expression: false, + range: [25, 37], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 37 } + } + }, + kind: '', + 'static': true, + range: [10, 37], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 37 } + } + }], + range: [8, 38], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 38 } + } + }, + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + } + }, + + '"use strict"; (class A {constructor() { super() }})': { + type: "Program", + body: [ + { + type: "ExpressionStatement", + expression: { + type: "Literal", + value: "use strict", + raw: "\"use strict\"", + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + { + type: "ExpressionStatement", + expression: { + type: "ClassExpression", + id: { + type: "Identifier", + name: "A", + range: [21, 22], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 22 } + } + }, + superClass: null, + body: { + type: "ClassBody", + body: [ + { + type: "MethodDefinition", + key: { + type: "Identifier", + name: "constructor", + range: [24, 35], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 35 } + } + }, + value: { + type: "FunctionExpression", + id: null, + params: [], + defaults: [], + body: { + type: "BlockStatement", + body: [ + { + type: "ExpressionStatement", + expression: { + type: "CallExpression", + callee: { + type: "Identifier", + name: "super", + range: [40, 45], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 45 } + } + }, + 'arguments': [], + range: [40, 47], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 47 } + } + }, + range: [40, 48], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 48 } + } + } + ], + range: [38, 49], + loc: { + start: { line: 1, column: 38 }, + end: { line: 1, column: 49 } + } + }, + rest: null, + generator: false, + expression: false, + range: [38, 49], + loc: { + start: { line: 1, column: 38 }, + end: { line: 1, column: 49 } + } + }, + kind: "", + 'static': false, + range: [24, 49], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 49 } + } + } + ], + range: [23, 50], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 50 } + } + }, + range: [15, 50], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 50 } + } + }, + range: [14, 51], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 51 } + } + } + ], + range: [0, 51], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 51 } + }, + comments: [] + }, + + 'class A {static foo() {}}': { + type: 'ClassDeclaration', + id: { + type: 'Identifier', + name: 'A', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7} + } + }, + superClass: null, + body: { + type: 'ClassBody', + body: [{ + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'foo', + range: [16, 19], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 19 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [22, 24], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 24} + } + }, + rest: null, + generator: false, + expression: false, + range: [22, 24], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 24 } + } + }, + kind: '', + 'static': true, + range: [9, 24], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 24 } + } + }], + range: [8, 25], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 25 } + } + }, + range: [0, 25], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 25 } + } + }, + + 'class A {foo() {} static bar() {}}': { + type: 'ClassDeclaration', + id: { + type: 'Identifier', + name: 'A', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: null, + body: { + type: 'ClassBody', + body: [{ + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'foo', + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + rest: null, + generator: false, + expression: false, + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + kind: '', + 'static': false, + range: [9, 17], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 17 } + } + }, { + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'bar', + range: [25, 28], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 28 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [31, 33], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 33 } + } + }, + rest: null, + generator: false, + expression: false, + range: [31, 33], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 33 } + } + }, + kind: '', + 'static': true, + range: [18, 33], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 33 } + } + }], + range: [8, 34], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 34 } + } + }, + range: [0, 34], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 34 } + } + }, + + '"use strict"; (class A { static constructor() { super() }})': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'ClassExpression', + id: { + type: 'Identifier', + name: 'A', + range: [21, 22], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 22 } + } + }, + superClass: null, + body: { + type: 'ClassBody', + body: [{ + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'constructor', + range: [32, 43], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 43 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'super', + range: [48, 53], + loc: { + start: { line: 1, column: 48 }, + end: { line: 1, column: 53 } + } + }, + 'arguments': [], + range: [48, 55], + loc: { + start: { line: 1, column: 48 }, + end: { line: 1, column: 55 } + } + }, + range: [48, 56], + loc: { + start: { line: 1, column: 48 }, + end: { line: 1, column: 56 } + } + }], + range: [46, 57], + loc: { + start: { line: 1, column: 46 }, + end: { line: 1, column: 57 } + } + }, + rest: null, + generator: false, + expression: false, + range: [46, 57], + loc: { + start: { line: 1, column: 46 }, + end: { line: 1, column: 57 } + } + }, + kind: '', + 'static': true, + range: [25, 57], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 57 } + } + }], + range: [23, 58], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 58 } + } + }, + range: [15, 58], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 58 } + } + }, + range: [14, 59], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 59 } + } + }], + range: [0, 59], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 59 } + }, + comments: [] + }, + + 'class A { foo() {} bar() {}}': { + type: 'ClassDeclaration', + id: { + type: 'Identifier', + name: 'A', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: null, + body: { + type: 'ClassBody', + body: [{ + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'foo', + range: [10, 13], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 13 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [16, 18], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 18 } + } + }, + rest: null, + generator: false, + expression: false, + range: [16, 18], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 18 } + } + }, + kind: '', + 'static': false, + range: [10, 18], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 18 } + } + }, { + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'bar', + range: [19, 22], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 22 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [25, 27], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 27 } + } + }, + rest: null, + generator: false, + expression: false, + range: [25, 27], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 27 } + } + }, + kind: '', + 'static': false, + range: [19, 27], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 27 } + } + }], + range: [8, 28], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 28 } + } + }, + range: [0, 28], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 28 } + } + }, + + 'class A { get foo() {} set foo(v) {}}': { + type: 'ClassDeclaration', + id: { + type: 'Identifier', + name: 'A', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: null, + body: { + type: 'ClassBody', + body: [{ + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'foo', + range: [14, 17], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 17 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [20, 22], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 22 } + } + }, + rest: null, + generator: false, + expression: false, + range: [20, 22], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 22 } + } + }, + kind: 'get', + 'static': false, + range: [10, 22], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 22 } + } + }, { + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'foo', + range: [27, 30], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 30 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'v', + range: [31, 32], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 32 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [34, 36], + loc: { + start: { line: 1, column: 34 }, + end: { line: 1, column: 36 } + } + }, + rest: null, + generator: false, + expression: false, + range: [34, 36], + loc: { + start: { line: 1, column: 34 }, + end: { line: 1, column: 36 } + } + }, + kind: 'set', + 'static': false, + range: [23, 36], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 36 } + } + }], + range: [8, 37], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 37 } + } + }, + range: [0, 37], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 37 } + } + }, + + 'class A { static get foo() {} get foo() {}}': { + type: 'ClassDeclaration', + id: { + type: 'Identifier', + name: 'A', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: null, + body: { + type: 'ClassBody', + body: [{ + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'foo', + range: [21, 24], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 24 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [27, 29], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 29 } + } + }, + rest: null, + generator: false, + expression: false, + range: [27, 29], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 29 } + } + }, + kind: 'get', + 'static': true, + range: [10, 29], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 29 } + } + }, { + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'foo', + range: [34, 37], + loc: { + start: { line: 1, column: 34 }, + end: { line: 1, column: 37 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [40, 42], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 42 } + } + }, + rest: null, + generator: false, + expression: false, + range: [40, 42], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 42 } + } + }, + kind: 'get', + 'static': false, + range: [30, 42], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 42 } + } + }], + range: [8, 43], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 43 } + } + }, + range: [0, 43], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 43 } + } + }, + + 'class A { static get foo() {} static get bar() {} }': { + type: 'ClassDeclaration', + id: { + type: 'Identifier', + name: 'A', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: null, + body: { + type: 'ClassBody', + body: [{ + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'foo', + range: [21, 24], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 24 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [27, 29], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 29 } + } + }, + rest: null, + generator: false, + expression: false, + range: [27, 29], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 29 } + } + }, + kind: 'get', + 'static': true, + range: [10, 29], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 29 } + } + }, { + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'bar', + range: [41, 44], + loc: { + start: { line: 1, column: 41 }, + end: { line: 1, column: 44 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [47, 49], + loc: { + start: { line: 1, column: 47 }, + end: { line: 1, column: 49 } + } + }, + rest: null, + generator: false, + expression: false, + range: [47, 49], + loc: { + start: { line: 1, column: 47 }, + end: { line: 1, column: 49 } + } + }, + kind: 'get', + 'static': true, + range: [30, 49], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 49 } + } + }], + range: [8, 51], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 51 } + } + }, + range: [0, 51], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 51 } + } + }, + + 'class A { static get foo() {} static set foo(v) {} get foo() {} set foo(v) {}}': { + type: 'ClassDeclaration', + id: { + type: 'Identifier', + name: 'A', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: null, + body: { + type: 'ClassBody', + body: [{ + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'foo', + range: [21, 24], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 24 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [27, 29], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 29 } + } + }, + rest: null, + generator: false, + expression: false, + range: [27, 29], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 29 } + } + }, + kind: 'get', + 'static': true, + range: [10, 29], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 29 } + } + }, { + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'foo', + range: [41, 44], + loc: { + start: { line: 1, column: 41 }, + end: { line: 1, column: 44 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'v', + range: [45, 46], + loc: { + start: { line: 1, column: 45 }, + end: { line: 1, column: 46 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [48, 50], + loc: { + start: { line: 1, column: 48 }, + end: { line: 1, column: 50 } + } + }, + rest: null, + generator: false, + expression: false, + range: [48, 50], + loc: { + start: { line: 1, column: 48 }, + end: { line: 1, column: 50 } + } + }, + kind: 'set', + 'static': true, + range: [30, 50], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 50 } + } + }, { + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'foo', + range: [55, 58], + loc: { + start: { line: 1, column: 55 }, + end: { line: 1, column: 58 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [61, 63], + loc: { + start: { line: 1, column: 61 }, + end: { line: 1, column: 63 } + } + }, + rest: null, + generator: false, + expression: false, + range: [61, 63], + loc: { + start: { line: 1, column: 61 }, + end: { line: 1, column: 63 } + } + }, + kind: 'get', + 'static': false, + range: [51, 63], + loc: { + start: { line: 1, column: 51 }, + end: { line: 1, column: 63 } + } + }, { + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'foo', + range: [68, 71], + loc: { + start: { line: 1, column: 68 }, + end: { line: 1, column: 71 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'v', + range: [72, 73], + loc: { + start: { line: 1, column: 72 }, + end: { line: 1, column: 73 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [75, 77], + loc: { + start: { line: 1, column: 75 }, + end: { line: 1, column: 77 } + } + }, + rest: null, + generator: false, + expression: false, + range: [75, 77], + loc: { + start: { line: 1, column: 75 }, + end: { line: 1, column: 77 } + } + }, + kind: 'set', + 'static': false, + range: [64, 77], + loc: { + start: { line: 1, column: 64 }, + end: { line: 1, column: 77 } + } + }], + range: [8, 78], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 78 } + } + }, + range: [0, 78], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 78 } + } + }, + + 'class A { set foo(v) {} get foo() {} }': { + type: 'ClassDeclaration', + id: { + type: 'Identifier', + name: 'A', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: null, + body: { + type: 'ClassBody', + body: [{ + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'foo', + range: [14, 17], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 17 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'v', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [21, 23], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 23 } + } + }, + rest: null, + generator: false, + expression: false, + range: [21, 23], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 23 } + } + }, + kind: 'set', + 'static': false, + range: [10, 23], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 23 } + } + }, { + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'foo', + range: [28, 31], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 31 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [34, 36], + loc: { + start: { line: 1, column: 34 }, + end: { line: 1, column: 36 } + } + }, + rest: null, + generator: false, + expression: false, + range: [34, 36], + loc: { + start: { line: 1, column: 34 }, + end: { line: 1, column: 36 } + } + }, + kind: 'get', + 'static': false, + range: [24, 36], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 36 } + } + }], + range: [8, 38], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 38 } + } + }, + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + } + }, + + 'class A { get foo() {} get foo() {} }': { + index: 30, + lineNumber: 1, + column: 31, + message: 'Error: Line 1: Illegal duplicate property in class definition', + description: 'Illegal duplicate property in class definition' + }, + + 'class A { set foo(v) {} set foo(v) {} }': { + index: 31, + lineNumber: 1, + column: 32, + message: 'Error: Line 1: Illegal duplicate property in class definition', + description: 'Illegal duplicate property in class definition' + }, + + 'class A { get foo() {} foo() {} }': { + index: 26, + lineNumber: 1, + column: 27, + message: 'Error: Line 1: Illegal duplicate property in class definition', + description: 'Illegal duplicate property in class definition' + }, + + 'class A { foo() {} get foo() {} }': { + index: 26, + lineNumber: 1, + column: 27, + message: 'Error: Line 1: Illegal duplicate property in class definition', + description: 'Illegal duplicate property in class definition' + }, + + 'class A { set foo(v) {} foo() {} }': { + index: 27, + lineNumber: 1, + column: 28, + message: 'Error: Line 1: Illegal duplicate property in class definition', + description: 'Illegal duplicate property in class definition' + }, + + 'class A { foo() {} set foo(v) {} }': { + index: 26, + lineNumber: 1, + column: 27, + message: 'Error: Line 1: Illegal duplicate property in class definition', + description: 'Illegal duplicate property in class definition' + }, + + }, + + 'ES6: Default parameters': { + + 'x = function(y = 1) {}': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'y', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }], + defaults: [{ + type: 'Literal', + value: 1, + raw: '1', + range: [17, 18], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 18 } + } + }], + body: { + type: 'BlockStatement', + body: [], + range: [20, 22], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 22 } + } + }, + rest: null, + generator: false, + expression: false, + range: [4, 22], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + + 'function f(a = 1) {}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'f', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + params: [{ + type: 'Identifier', + name: 'a', + range: [11, 12], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 12 } + } + }], + defaults: [{ + type: 'Literal', + value: 1, + raw: '1', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }], + body: { + type: 'BlockStatement', + body: [], + range: [18, 20], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 20 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + + 'x = { f: function(a=1) {} }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'f', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'a', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }], + defaults: [{ + type: 'Literal', + value: 1, + raw: '1', + range: [20, 21], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 21 } + } + }], + body: { + type: 'BlockStatement', + body: [], + range: [23, 25], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 25 } + } + }, + rest: null, + generator: false, + expression: false, + range: [9, 25], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 25 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [6, 25], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 25 } + } + }], + range: [4, 27], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 27 } + } + }, + range: [0, 27], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + }, + range: [0, 27], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + }, + + 'x = { f(a=1) {} }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'f', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'a', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }], + defaults: [{ + type: 'Literal', + value: 1, + raw: '1', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }], + body: { + type: 'BlockStatement', + body: [], + range: [13, 15], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 15 } + } + }, + rest: null, + generator: false, + expression: false, + range: [13, 15], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 15 } + } + }, + kind: 'init', + method: true, + shorthand: false, + range: [6, 15], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 15 } + } + }], + range: [4, 17], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + } + + }, + + // ECMAScript 6th Syntax, 13 - Rest parameters + // http://wiki.ecmascript.org/doku.php?id=harmony:rest_parameters + 'ES6: Rest parameters': { + 'function f(a, ...b) {}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'f', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + params: [{ + type: 'Identifier', + name: 'a', + range: [11, 12], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 12 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [20, 22], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 22 } + } + }, + rest: { + type: 'Identifier', + name: 'b', + range: [17, 18], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 18 } + } + }, + generator: false, + expression: false, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + } + }, + + 'ES6: Destructured Parameters': { + + 'function x([ a, b ]){}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'x', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + params: [{ + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }, { + type: 'Identifier', + name: 'b', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }], + range: [11, 19], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 19 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [20, 22], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 22 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + + 'function x({ a, b }){}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'x', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + params: [{ + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }, + value: { + type: 'Identifier', + name: 'a', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'b', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }, + value: { + type: 'Identifier', + name: 'b', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }], + range: [11, 19], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 19 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [20, 22], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 22 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + + + 'function x(a, { a }){}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'x', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + params: [{ + type: 'Identifier', + name: 'a', + range: [11, 12], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 12 } + } + }, { + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }, + value: { + type: 'Identifier', + name: 'a', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }], + range: [14, 19], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 19 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [20, 22], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 22 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + + 'function x(...[ a, b ]){}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'x', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [23, 25], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 25 } + } + }, + rest: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }, { + type: 'Identifier', + name: 'b', + range: [19, 20], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 20 } + } + }], + range: [14, 22], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 22 } + } + }, + generator: false, + expression: false, + range: [0, 25], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 25 } + } + }, + + 'function x({ a: { w, x }, b: [y, z] }, ...[a, b, c]){}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'x', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + params: [{ + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }, + value: { + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'w', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }, + value: { + type: 'Identifier', + name: 'w', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'x', + range: [21, 22], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 22 } + } + }, + value: { + type: 'Identifier', + name: 'x', + range: [21, 22], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 22 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [21, 22], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 22 } + } + }], + range: [16, 24], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 24 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [13, 24], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 24 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'b', + range: [26, 27], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 27 } + } + }, + value: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'y', + range: [30, 31], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 31 } + } + }, { + type: 'Identifier', + name: 'z', + range: [33, 34], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 34 } + } + }], + range: [29, 35], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 35 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [26, 35], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 35 } + } + }], + range: [11, 37], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 37 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [52, 54], + loc: { + start: { line: 1, column: 52 }, + end: { line: 1, column: 54 } + } + }, + rest: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [43, 44], + loc: { + start: { line: 1, column: 43 }, + end: { line: 1, column: 44 } + } + }, { + type: 'Identifier', + name: 'b', + range: [46, 47], + loc: { + start: { line: 1, column: 46 }, + end: { line: 1, column: 47 } + } + }, { + type: 'Identifier', + name: 'c', + range: [49, 50], + loc: { + start: { line: 1, column: 49 }, + end: { line: 1, column: 50 } + } + }], + range: [42, 51], + loc: { + start: { line: 1, column: 42 }, + end: { line: 1, column: 51 } + } + }, + generator: false, + expression: false, + range: [0, 54], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 54 } + } + }, + + '(function x([ a, b ]){})': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'x', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + params: [{ + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [14, 15], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 15 } + } + }, { + type: 'Identifier', + name: 'b', + range: [17, 18], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 18 } + } + }], + range: [12, 20], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 20 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [21, 23], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 23 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 23], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 23 } + } + }, + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + + '(function x({ a, b }){})': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'x', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + params: [{ + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [14, 15], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 15 } + } + }, + value: { + type: 'Identifier', + name: 'a', + range: [14, 15], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 15 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [14, 15], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 15 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'b', + range: [17, 18], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 18 } + } + }, + value: { + type: 'Identifier', + name: 'b', + range: [17, 18], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 18 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [17, 18], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 18 } + } + }], + range: [12, 20], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 20 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [21, 23], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 23 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 23], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 23 } + } + }, + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + + '(function x(...[ a, b ]){})': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'x', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [24, 26], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 26 } + } + }, + rest: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [17, 18], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 18 } + } + }, { + type: 'Identifier', + name: 'b', + range: [20, 21], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 21 } + } + }], + range: [15, 23], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 23 } + } + }, + generator: false, + expression: false, + range: [1, 26], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 26 } + } + }, + range: [0, 27], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + }, + + '(function x({ a: { w, x }, b: [y, z] }, ...[a, b, c]){})': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'x', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + params: [{ + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [14, 15], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 15 } + } + }, + value: { + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'w', + range: [19, 20], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 20 } + } + }, + value: { + type: 'Identifier', + name: 'w', + range: [19, 20], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 20 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [19, 20], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 20 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'x', + range: [22, 23], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 23 } + } + }, + value: { + type: 'Identifier', + name: 'x', + range: [22, 23], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 23 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [22, 23], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 23 } + } + }], + range: [17, 25], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 25 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [14, 25], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 25 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'b', + range: [27, 28], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 28 } + } + }, + value: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'y', + range: [31, 32], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 32 } + } + }, { + type: 'Identifier', + name: 'z', + range: [34, 35], + loc: { + start: { line: 1, column: 34 }, + end: { line: 1, column: 35 } + } + }], + range: [30, 36], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 36 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [27, 36], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 36 } + } + }], + range: [12, 38], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 38 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [53, 55], + loc: { + start: { line: 1, column: 53 }, + end: { line: 1, column: 55 } + } + }, + rest: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [44, 45], + loc: { + start: { line: 1, column: 44 }, + end: { line: 1, column: 45 } + } + }, { + type: 'Identifier', + name: 'b', + range: [47, 48], + loc: { + start: { line: 1, column: 47 }, + end: { line: 1, column: 48 } + } + }, { + type: 'Identifier', + name: 'c', + range: [50, 51], + loc: { + start: { line: 1, column: 50 }, + end: { line: 1, column: 51 } + } + }], + range: [43, 52], + loc: { + start: { line: 1, column: 43 }, + end: { line: 1, column: 52 } + } + }, + generator: false, + expression: false, + range: [1, 55], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 55 } + } + }, + range: [0, 56], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 56 } + } + }, + + '({ x([ a, b ]){} })': { + type: 'ExpressionStatement', + expression: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'x', + range: [3, 4], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 4 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, { + type: 'Identifier', + name: 'b', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }], + range: [5, 13], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 13 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [14, 16], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 16 } + } + }, + rest: null, + generator: false, + expression: false, + range: [14, 16], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 16 } + } + }, + kind: 'init', + method: true, + shorthand: false, + range: [3, 16], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 16 } + } + }], + range: [1, 18], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 18 } + } + }, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + + '({ x(...[ a, b ]){} })': { + type: 'ExpressionStatement', + expression: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'x', + range: [3, 4], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 4 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [17, 19], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 19 } + } + }, + rest: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, { + type: 'Identifier', + name: 'b', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }], + range: [8, 16], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 16 } + } + }, + generator: false, + expression: false, + range: [17, 19], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 19 } + } + }, + kind: 'init', + method: true, + shorthand: false, + range: [3, 19], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 19 } + } + }], + range: [1, 21], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + + '({ x({ a: { w, x }, b: [y, z] }, ...[a, b, c]){} })': { + type: 'ExpressionStatement', + expression: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'x', + range: [3, 4], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 4 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + value: { + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'w', + range: [12, 13], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 13 } + } + }, + value: { + type: 'Identifier', + name: 'w', + range: [12, 13], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 13 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [12, 13], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 13 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'x', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }, + value: { + type: 'Identifier', + name: 'x', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }], + range: [10, 18], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 18 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [7, 18], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 18 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'b', + range: [20, 21], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 21 } + } + }, + value: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'y', + range: [24, 25], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 25 } + } + }, { + type: 'Identifier', + name: 'z', + range: [27, 28], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 28 } + } + }], + range: [23, 29], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 29 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [20, 29], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 29 } + } + }], + range: [5, 31], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 31 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [46, 48], + loc: { + start: { line: 1, column: 46 }, + end: { line: 1, column: 48 } + } + }, + rest: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [37, 38], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 38 } + } + }, { + type: 'Identifier', + name: 'b', + range: [40, 41], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 41 } + } + }, { + type: 'Identifier', + name: 'c', + range: [43, 44], + loc: { + start: { line: 1, column: 43 }, + end: { line: 1, column: 44 } + } + }], + range: [36, 45], + loc: { + start: { line: 1, column: 36 }, + end: { line: 1, column: 45 } + } + }, + generator: false, + expression: false, + range: [46, 48], + loc: { + start: { line: 1, column: 46 }, + end: { line: 1, column: 48 } + } + }, + kind: 'init', + method: true, + shorthand: false, + range: [3, 48], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 48 } + } + }], + range: [1, 50], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 50 } + } + }, + range: [0, 51], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 51 } + } + }, + + '(...a) => {}': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + rest: { + type: 'Identifier', + name: 'a', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + generator: false, + expression: false, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + '(a, ...b) => {}': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'a', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [13, 15], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 15 } + } + }, + rest: { + type: 'Identifier', + name: 'b', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + generator: false, + expression: false, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + + '({ a }) => {}': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [3, 4], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 4 } + } + }, + value: { + type: 'Identifier', + name: 'a', + range: [3, 4], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 4 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [3, 4], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 4 } + } + }], + range: [1, 6], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 6 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [11, 13], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 13 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + + '({ a }, ...b) => {}': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [3, 4], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 4 } + } + }, + value: { + type: 'Identifier', + name: 'a', + range: [3, 4], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 4 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [3, 4], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 4 } + } + }], + range: [1, 6], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 6 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [17, 19], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 19 } + } + }, + rest: { + type: 'Identifier', + name: 'b', + range: [11, 12], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 12 } + } + }, + generator: false, + expression: false, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + '(...[a, b]) => {}': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + rest: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, { + type: 'Identifier', + name: 'b', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }], + range: [4, 10], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 10 } + } + }, + generator: false, + expression: false, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + '(a, ...[b]) => {}': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'a', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + rest: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'b', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }], + range: [7, 10], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 10 } + } + }, + generator: false, + expression: false, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + '({ a: [a, b] }, ...c) => {}': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [3, 4], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 4 } + } + }, + value: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, { + type: 'Identifier', + name: 'b', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }], + range: [6, 12], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 12 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [3, 12], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 12 } + } + }], + range: [1, 14], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 14 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [25, 27], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 27 } + } + }, + rest: { + type: 'Identifier', + name: 'c', + range: [19, 20], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 20 } + } + }, + generator: false, + expression: false, + range: [0, 27], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + }, + range: [0, 27], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + }, + '({ a: b, c }, [d, e], ...f) => {}': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [3, 4], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 4 } + } + }, + value: { + type: 'Identifier', + name: 'b', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [3, 7], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 7 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'c', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + value: { + type: 'Identifier', + name: 'c', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }], + range: [1, 12], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 12 } + } + }, { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'd', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }, { + type: 'Identifier', + name: 'e', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }], + range: [14, 20], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 20 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [31, 33], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 33 } + } + }, + rest: { + type: 'Identifier', + name: 'f', + range: [25, 26], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 26 } + } + }, + generator: false, + expression: false, + range: [0, 33], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 33 } + } + }, + range: [0, 33], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 33 } + } + } + + }, + + 'ES6: SpreadElement': { + '[...a] = b': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'ArrayPattern', + elements: [{ + type: 'SpreadElement', + argument: { + type: 'Identifier', + name: 'a', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [1, 5], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 5 } + } + }], + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + right: { + type: 'Identifier', + name: 'b', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + }, + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + }, + + '[a, ...b] = c': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, { + type: 'SpreadElement', + argument: { + type: 'Identifier', + name: 'b', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + range: [4, 8], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 8 } + } + }], + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + right: { + type: 'Identifier', + name: 'c', + range: [12, 13], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + + '[{ a, b }, ...c] = d': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'ArrayPattern', + elements: [{ + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [3, 4], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 4 } + } + }, + value: { + type: 'Identifier', + name: 'a', + range: [3, 4], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 4 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [3, 4], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 4 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'b', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + value: { + type: 'Identifier', + name: 'b', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }], + range: [1, 9], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 9 } + } + }, { + type: 'SpreadElement', + argument: { + type: 'Identifier', + name: 'c', + range: [14, 15], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 15 } + } + }, + range: [11, 15], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 15 } + } + }], + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + right: { + type: 'Identifier', + name: 'd', + range: [19, 20], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 20 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + + '[a, ...[b, c]] = d': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, { + type: 'SpreadElement', + argument: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'b', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, { + type: 'Identifier', + name: 'c', + range: [11, 12], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 12 } + } + }], + range: [7, 13], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 13 } + } + }, + range: [4, 13], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 13 } + } + }], + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + right: { + type: 'Identifier', + name: 'd', + range: [17, 18], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 18 } + } + }, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + + 'var [...a] = b': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'ArrayPattern', + elements: [{ + type: 'SpreadElement', + argument: { + type: 'Identifier', + name: 'a', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [5, 9], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 9 } + } + }], + range: [4, 10], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 10 } + } + }, + init: { + type: 'Identifier', + name: 'b', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }, + range: [4, 14], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 14 } + } + }], + kind: 'var', + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + 'var [a, ...b] = c': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, { + type: 'SpreadElement', + argument: { + type: 'Identifier', + name: 'b', + range: [11, 12], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 12 } + } + }, + range: [8, 12], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 12 } + } + }], + range: [4, 13], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 13 } + } + }, + init: { + type: 'Identifier', + name: 'c', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }, + range: [4, 17], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 17 } + } + }], + kind: 'var', + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + + 'var [{ a, b }, ...c] = d': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'ArrayPattern', + elements: [{ + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + value: { + type: 'Identifier', + name: 'a', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'b', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + value: { + type: 'Identifier', + name: 'b', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }], + range: [5, 13], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 13 } + } + }, { + type: 'SpreadElement', + argument: { + type: 'Identifier', + name: 'c', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }, + range: [15, 19], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 19 } + } + }], + range: [4, 20], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 20 } + } + }, + init: { + type: 'Identifier', + name: 'd', + range: [23, 24], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 24 } + } + }, + range: [4, 24], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 24 } + } + }], + kind: 'var', + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + + 'var [a, ...[b, c]] = d': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, { + type: 'SpreadElement', + argument: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'b', + range: [12, 13], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 13 } + } + }, { + type: 'Identifier', + name: 'c', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }], + range: [11, 17], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 17 } + } + }, + range: [8, 17], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 17 } + } + }], + range: [4, 18], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 18 } + } + }, + init: { + type: 'Identifier', + name: 'd', + range: [21, 22], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 22 } + } + }, + range: [4, 22], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 22 } + } + }], + kind: 'var', + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + + 'func(...a)': { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'func', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + 'arguments': [{ + type: 'SpreadElement', + argument: { + type: 'Identifier', + name: 'a', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [5, 9], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 9 } + } + }], + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + }, + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + }, + + 'func(a, ...b)': { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'func', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'a', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, { + type: 'SpreadElement', + argument: { + type: 'Identifier', + name: 'b', + range: [11, 12], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 12 } + } + }, + range: [8, 12], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 12 } + } + }], + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + } + }, + + + 'Harmony Invalid syntax': { + + '0o': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0o1a': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0o9': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0o18': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0O': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0O1a': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0O9': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0O18': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0b': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0b1a': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0b9': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0b18': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0b12': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0B': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0B1a': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0B9': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0B18': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0B12': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '"\\u{110000}"': { + index: 11, + lineNumber: 1, + column: 12, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '"\\u{}"': { + index: 4, + lineNumber: 1, + column: 5, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '"\\u{FFFF"': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '"\\u{FFZ}"': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '[v] += ary': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + '[2] = 42': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + '({ obj:20 }) = 42': { + index: 12, + lineNumber: 1, + column: 13, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + '( { get x() {} } ) = 0': { + index: 18, + lineNumber: 1, + column: 19, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + 'x \n is y': { + index: 7, + lineNumber: 2, + column: 5, + message: 'Error: Line 2: Unexpected identifier' + }, + + 'x \n isnt y': { + index: 9, + lineNumber: 2, + column: 7, + message: 'Error: Line 2: Unexpected identifier' + }, + + 'function default() {}': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token default' + }, + + 'function hello() {\'use strict\'; ({ i: 10, s(eval) { } }); }': { + index: 44, + lineNumber: 1, + column: 45, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + 'function a() { "use strict"; ({ b(t, t) { } }); }': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' + }, + + 'var super': { + index: 4, + lineNumber: 1, + column: 5, + message: 'Error: Line 1: Unexpected reserved word' + }, + + 'var default': { + index: 4, + lineNumber: 1, + column: 5, + message: 'Error: Line 1: Unexpected token default' + }, + + 'let default': { + index: 4, + lineNumber: 1, + column: 5, + message: 'Error: Line 1: Unexpected token default' + }, + + 'const default': { + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Unexpected token default' + }, + + + + '({ v: eval }) = obj': { + index: 13, + lineNumber: 1, + column: 14, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + '({ v: arguments }) = obj': { + index: 18, + lineNumber: 1, + column: 19, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + 'for (var i = function() { return 10 in [] } in list) process(x);': { + index: 44, + lineNumber: 1, + column: 45, + message: 'Error: Line 1: Unexpected token in' + }, + + 'for (let x = 42 in list) process(x);': { + index: 16, + lineNumber: 1, + column: 17, + message: 'Error: Line 1: Unexpected token in' + }, + + 'for (let x = 42 of list) process(x);': { + index: 16, + lineNumber: 1, + column: 17, + message: 'Error: Line 1: Unexpected identifier' + }, + + 'module\n"crypto" {}': { + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Illegal newline after module' + }, + + 'module foo from bar': { + index: 19, + lineNumber: 1, + column: 20, + message: 'Error: Line 1: Invalid module specifier' + }, + + 'module 42': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Unexpected number' + }, + + 'module foo bar': { + index: 11, + lineNumber: 1, + column: 12, + message: 'Error: Line 1: Unexpected identifier' + }, + + 'module "crypto" { module "e" {} }': { + index: 17, + lineNumber: 1, + column: 18, + message: 'Error: Line 1: Module declaration can not be nested' + }, + + 'module "x" { export * from foo }': { + index: 30, + lineNumber: 1, + column: 31, + message: 'Error: Line 1: Invalid module specifier' + }, + + 'import foo': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Missing from after import' + }, + + 'import { foo, bar }': { + index: 19, + lineNumber: 1, + column: 20, + message: 'Error: Line 1: Missing from after import' + }, + + 'import foo from bar': { + index: 19, + lineNumber: 1, + column: 20, + message: 'Error: Line 1: Invalid module specifier' + }, + + '((a)) => 42': { + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Unexpected token =>' + }, + + '(a, (b)) => 42': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token =>' + }, + + '"use strict"; (eval = 10) => 42': { + index: 15, + lineNumber: 1, + column: 16, + message: 'Error: Line 1: Assignment to eval or arguments is not allowed in strict mode' + }, + + // strict mode, using eval when IsSimpleParameterList is true + '"use strict"; eval => 42': { + index: 24, + lineNumber: 1, + column: 25, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + // strict mode, using arguments when IsSimpleParameterList is true + '"use strict"; arguments => 42': { + index: 29, + lineNumber: 1, + column: 30, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + // strict mode, using eval when IsSimpleParameterList is true + '"use strict"; (eval, a) => 42': { + index: 29, + lineNumber: 1, + column: 30, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + // strict mode, using arguments when IsSimpleParameterList is true + '"use strict"; (arguments, a) => 42': { + index: 34, + lineNumber: 1, + column: 35, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + // strict mode, using eval when IsSimpleParameterList is false + '"use strict"; (eval, a = 10) => 42': { + index: 34, + lineNumber: 1, + column: 35, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + '(a, a) => 42': { + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' + }, + + '"use strict"; (a, a) => 42': { + index: 20, + lineNumber: 1, + column: 21, + message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' + }, + + '"use strict"; (a) => 00': { + index: 21, + lineNumber: 1, + column: 22, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }, + + '() <= 42': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token <=' + }, + + '(10) => 00': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Unexpected token =>' + }, + + '(10, 20) => 00': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token =>' + }, + + 'yield v': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Illegal yield expression' + }, + + 'yield 10': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Illegal yield expression' + }, + + 'yield* 10': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Illegal yield expression' + }, + + 'e => yield* 10': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Illegal yield expression' + }, + + '(function () { yield 10 })': { + index: 20, + lineNumber: 1, + column: 21, + message: 'Error: Line 1: Illegal yield expression' + }, + + '(function () { yield* 10 })': { + index: 20, + lineNumber: 1, + column: 21, + message: 'Error: Line 1: Illegal yield expression' + }, + + '(function* () { })': { + index: 17, + lineNumber: 1, + column: 18, + message: 'Error: Line 1: Missing yield in generator' + }, + + 'function* test () { }': { + index: 21, + lineNumber: 1, + column: 22, + message: 'Error: Line 1: Missing yield in generator' + }, + + 'var obj = { *test() { } }': { + index: 23, + lineNumber: 1, + column: 24, + message: 'Error: Line 1: Missing yield in generator' + }, + + 'var obj = { *test** }': { + index: 17, + lineNumber: 1, + column: 18, + message: 'Error: Line 1: Unexpected token *' + }, + + 'class A extends yield B { }': { + index: 21, + lineNumber: 1, + column: 22, + message: 'Error: Line 1: Illegal yield expression' + }, + + 'class default': { + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Unexpected token default' + }, + + '`test': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + 'switch `test`': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Unexpected quasi test' + }, + + '`hello ${10 `test`': { + index: 18, + lineNumber: 1, + column: 19, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '`hello ${10;test`': { + index: 11, + lineNumber: 1, + column: 12, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + 'function a() 1 // expression closure is not supported': { + index: 13, + lineNumber: 1, + column: 14, + message: 'Error: Line 1: Unexpected number' + }, + + '[a,b if (a)] // (a,b)': { + index: 4, + lineNumber: 1, + column: 5, + message: 'Error: Line 1: Comprehension Error' + }, + + 'for each (let x in {}) {};': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Each is not supported' + }, + + '[x for (let x in [])]': { + index: 20, + lineNumber: 1, + column: 21, + message: 'Error: Line 1: Comprehension Error' + }, + + '[x for (const x in [])]': { + index: 22, + lineNumber: 1, + column: 23, + message: 'Error: Line 1: Comprehension Error' + }, + + '[x for (var x in [])]': { + index: 20, + lineNumber: 1, + column: 21, + message: 'Error: Line 1: Comprehension Error' + }, + + '[a,b for (a in [])] // (a,b) ': { + index: 4, + lineNumber: 1, + column: 5, + message: 'Error: Line 1: Comprehension Error' + }, + + '[x if (x)] // block required': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Comprehension must have at least one block' + }, + + 'var a = [x if (x)]': { + index: 18, + lineNumber: 1, + column: 19, + message: 'Error: Line 1: Comprehension must have at least one block' + }, + + '[for (x in [])] // no espression': { + index: 15, + lineNumber: 1, + column: 16, + message: 'Error: Line 1: Comprehension Error' + }, + + '({ "chance" }) = obj': { + index: 12, + lineNumber: 1, + column: 13, + message: 'Error: Line 1: Unexpected token }' + }, + + '({ 42 }) = obj': { + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Unexpected token }' + }, + + 'function f(a, ...b, c)': { + index: 18, + lineNumber: 1, + column: 19, + message: 'Error: Line 1: Rest parameter must be final parameter of an argument list' + }, + + 'function f(a, ...b = 0)': { + index: 19, + lineNumber: 1, + column: 20, + message: 'Error: Line 1: Rest parameter can not have a default value' + }, + + 'function x(...{ a }){}': { + index: 14, + lineNumber: 1, + column: 15, + message: 'Error: Line 1: Invalid rest parameter' + }, + + '"use strict"; function x(a, { a }){}': { + index: 36, + lineNumber: 1, + column: 37, + message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' + }, + + '"use strict"; function x({ b: { a } }, [{ b: { a } }]){}': { + index: 56, + lineNumber: 1, + column: 57, + message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' + }, + + '"use strict"; function x(a, ...[a]){}': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' + }, + + '(...a, b) => {}': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Rest parameter must be final parameter of an argument list' + }, + + '([ 5 ]) => {}': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Invalid left-hand side in formals list' + }, + + '({ 5 }) => {}': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Unexpected token }' + }, + + '(...[ 5 ]) => {}': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Invalid left-hand side in formals list' + }, + + '[...{ a }] = b': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Invalid spread argument' + }, + + '[...a, b] = c': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Spread must be the final element of an element list' + }, + + 'func(...a, b)': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Spread must be the final element of an element list' + }, + + '({ t(eval) { "use strict"; } });': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + '"use strict"; `${test}\\02`;': { + index: 21, + lineNumber: 1, + column: 22, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }, + + '[...a, ] = b': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Spread must be the final element of an element list' + }, + + 'if (b,...a, );': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Spread must be the final element of an element list' + }, + + '(b, ...a)': { + index: 8, + lineNumber: 1, + column: 9, + message: 'Error: Line 1: Illegal spread element' + }, + + 'module "Universe" { ; ; ': { + index: 26, + lineNumber: 1, + column: 27, + message: 'Error: Line 1: Unexpected end of input' + }, + + 'switch (cond) { case 10: let a = 20; ': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Unexpected end of input' + }, + + '"use strict"; (eval) => 42': { + index: 26, + lineNumber: 1, + column: 27, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + '(eval) => { "use strict"; 42 }': { + index: 30, + lineNumber: 1, + column: 31, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + '({ get test() { } }) => 42': { + index: 20, + lineNumber: 1, + column: 21, + message: 'Error: Line 1: Invalid left-hand side in formals list' + } + + } +}; + +// Merge both test fixtures. + +(function () { + + 'use strict'; + + var i, fixtures; + + for (i in harmonyTestFixture) { + if (harmonyTestFixture.hasOwnProperty(i)) { + fixtures = harmonyTestFixture[i]; + if (i !== 'Syntax' && testFixture.hasOwnProperty(i)) { + throw new Error('Harmony test should not replace existing test for ' + i); + } + testFixture[i] = fixtures; + } + } + +}()); diff --git a/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/index.html b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/index.html new file mode 100644 index 00000000..3ded48da --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/index.html @@ -0,0 +1,115 @@ + + + + + + + Esprima: Unit Tests + + + + + + + + + + + +
    +
    +

    Unit Tests ensures the correct implementation

    +
    +
    + + +
    +
    +
    +
    + +
    +
    Please wait...
    +
    +

    A software project is only as good as its QA workflow. This set of unit tests + makes sure that no regression is ever sneaked in.

    +

    Version being tested: .

    +
    +
    +
    + + + + + + + + + + + + diff --git a/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/module.html b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/module.html new file mode 100644 index 00000000..a952a156 --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/module.html @@ -0,0 +1,112 @@ + + + + + + + Esprima: Module Loading Test + + + + + + + + + + + +
    +
    +

    Module Loading works also web browsers

    +
    +
    + + +
    +
    +
    +
    + +
    +
    Please wait...
    +
    +

    The following tests are to ensure that Esprima can be loaded using AMD (Asynchronous Module Definition) loader such as RequireJS.

    +
    +
    +
    + + + + + + + + + + + diff --git a/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/module.js b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/module.js new file mode 100644 index 00000000..637fbc12 --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/module.js @@ -0,0 +1,131 @@ +/*jslint browser:true plusplus:true */ +/*global require:true */ +function runTests() { + 'use strict'; + + function setText(el, str) { + if (typeof el.innerText === 'string') { + el.innerText = str; + } else { + el.textContent = str; + } + } + + function reportSuccess(code) { + var report, e; + report = document.getElementById('report'); + e = document.createElement('pre'); + e.setAttribute('class', 'code'); + setText(e, code); + report.appendChild(e); + } + + function reportFailure(code, expected, actual) { + var report, e; + + report = document.getElementById('report'); + + e = document.createElement('pre'); + e.setAttribute('class', 'code'); + setText(e, code); + report.appendChild(e); + + e = document.createElement('p'); + setText(e, 'Expected type: ' + expected); + report.appendChild(e); + + e = document.createElement('p'); + setText(e, 'Actual type: ' + actual); + report.appendChild(e); + } + + + require(['../esprima'], function (ESParser) { + var tick, total, failures, obj, variable, variables, i, entry, entries; + + // We check only the type of some members of ESParser. + variables = { + 'version': 'string', + 'parse': 'function', + 'Syntax': 'object', + 'Syntax.AssignmentExpression': 'string', + 'Syntax.ArrayExpression': 'string', + 'Syntax.BlockStatement': 'string', + 'Syntax.BinaryExpression': 'string', + 'Syntax.BreakStatement': 'string', + 'Syntax.CallExpression': 'string', + 'Syntax.CatchClause': 'string', + 'Syntax.ConditionalExpression': 'string', + 'Syntax.ContinueStatement': 'string', + 'Syntax.DoWhileStatement': 'string', + 'Syntax.DebuggerStatement': 'string', + 'Syntax.EmptyStatement': 'string', + 'Syntax.ExpressionStatement': 'string', + 'Syntax.ForStatement': 'string', + 'Syntax.ForInStatement': 'string', + 'Syntax.FunctionDeclaration': 'string', + 'Syntax.FunctionExpression': 'string', + 'Syntax.Identifier': 'string', + 'Syntax.IfStatement': 'string', + 'Syntax.Literal': 'string', + 'Syntax.LabeledStatement': 'string', + 'Syntax.LogicalExpression': 'string', + 'Syntax.MemberExpression': 'string', + 'Syntax.NewExpression': 'string', + 'Syntax.ObjectExpression': 'string', + 'Syntax.Program': 'string', + 'Syntax.Property': 'string', + 'Syntax.ReturnStatement': 'string', + 'Syntax.SequenceExpression': 'string', + 'Syntax.SwitchStatement': 'string', + 'Syntax.SwitchCase': 'string', + 'Syntax.ThisExpression': 'string', + 'Syntax.ThrowStatement': 'string', + 'Syntax.TryStatement': 'string', + 'Syntax.UnaryExpression': 'string', + 'Syntax.UpdateExpression': 'string', + 'Syntax.VariableDeclaration': 'string', + 'Syntax.VariableDeclarator': 'string', + 'Syntax.WhileStatement': 'string', + 'Syntax.WithStatement': 'string' + }; + + total = failures = 0; + tick = new Date(); + + for (variable in variables) { + if (variables.hasOwnProperty(variable)) { + entries = variable.split('.'); + obj = ESParser; + for (i = 0; i < entries.length; ++i) { + entry = entries[i]; + if (typeof obj[entry] !== 'undefined') { + obj = obj[entry]; + } else { + obj = undefined; + break; + } + } + total++; + if (typeof obj === variables[variable]) { + reportSuccess(variable); + } else { + failures++; + reportFailure(variable, variables[variable], typeof obj); + } + } + } + + tick = (new Date()) - tick; + + if (failures > 0) { + document.getElementById('status').className = 'alert-box alert'; + setText(document.getElementById('status'), total + ' tests. ' + + 'Failures: ' + failures + '. ' + tick + ' ms'); + } else { + document.getElementById('status').className = 'alert-box success'; + setText(document.getElementById('status'), total + ' tests. ' + + 'No failure. ' + tick + ' ms'); + } + }); +} diff --git a/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/reflect.js b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/reflect.js new file mode 100644 index 00000000..19c597f1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/reflect.js @@ -0,0 +1,421 @@ +// This is modified from Mozilla Reflect.parse test suite (the file is located +// at js/src/tests/js1_8_5/extensions/reflect-parse.js in the source tree). +// +// Some notable changes: +// * Removed unsupported features (destructuring, let, comprehensions...). +// * Removed tests for E4X (ECMAScript for XML). +// * Removed everything related to builder. +// * Enclosed every 'Pattern' construct with a scope. +// * Removed the test for bug 632030 and bug 632024. + +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ + +(function (exports) { + +function testReflect(Reflect, Pattern) { + +function program(elts) { return Pattern({ type: "Program", body: elts }) } +function exprStmt(expr) { return Pattern({ type: "ExpressionStatement", expression: expr }) } +function throwStmt(expr) { return Pattern({ type: "ThrowStatement", argument: expr }) } +function returnStmt(expr) { return Pattern({ type: "ReturnStatement", argument: expr }) } +function yieldExpr(expr) { return Pattern({ type: "YieldExpression", argument: expr }) } +function lit(val) { return Pattern({ type: "Literal", value: val }) } +var thisExpr = Pattern({ type: "ThisExpression" }); +function funDecl(id, params, body) { return Pattern({ type: "FunctionDeclaration", + id: id, + params: params, + defaults: [], + body: body, + rest: null, + generator: false, + expression: false + }) } +function genFunDecl(id, params, body) { return Pattern({ type: "FunctionDeclaration", + id: id, + params: params, + defaults: [], + body: body, + rest: null, + generator: true, + expression: false + }) } +function declarator(id, init) { return Pattern({ type: "VariableDeclarator", id: id, init: init }) } +function varDecl(decls) { return Pattern({ type: "VariableDeclaration", declarations: decls, kind: "var" }) } +function letDecl(decls) { return Pattern({ type: "VariableDeclaration", declarations: decls, kind: "let" }) } +function constDecl(decls) { return Pattern({ type: "VariableDeclaration", declarations: decls, kind: "const" }) } +function ident(name) { return Pattern({ type: "Identifier", name: name }) } +function dotExpr(obj, id) { return Pattern({ type: "MemberExpression", computed: false, object: obj, property: id }) } +function memExpr(obj, id) { return Pattern({ type: "MemberExpression", computed: true, object: obj, property: id }) } +function forStmt(init, test, update, body) { return Pattern({ type: "ForStatement", init: init, test: test, update: update, body: body }) } +function forInStmt(lhs, rhs, body) { return Pattern({ type: "ForInStatement", left: lhs, right: rhs, body: body, each: false }) } +function forEachInStmt(lhs, rhs, body) { return Pattern({ type: "ForInStatement", left: lhs, right: rhs, body: body, each: true }) } +function breakStmt(lab) { return Pattern({ type: "BreakStatement", label: lab }) } +function continueStmt(lab) { return Pattern({ type: "ContinueStatement", label: lab }) } +function blockStmt(body) { return Pattern({ type: "BlockStatement", body: body }) } +var emptyStmt = Pattern({ type: "EmptyStatement" }); +function ifStmt(test, cons, alt) { return Pattern({ type: "IfStatement", test: test, alternate: alt, consequent: cons }) } +function labStmt(lab, stmt) { return Pattern({ type: "LabeledStatement", label: lab, body: stmt }) } +function withStmt(obj, stmt) { return Pattern({ type: "WithStatement", object: obj, body: stmt }) } +function whileStmt(test, stmt) { return Pattern({ type: "WhileStatement", test: test, body: stmt }) } +function doStmt(stmt, test) { return Pattern({ type: "DoWhileStatement", test: test, body: stmt }) } +function switchStmt(disc, cases) { return Pattern({ type: "SwitchStatement", discriminant: disc, cases: cases }) } +function caseClause(test, stmts) { return Pattern({ type: "SwitchCase", test: test, consequent: stmts }) } +function defaultClause(stmts) { return Pattern({ type: "SwitchCase", test: null, consequent: stmts }) } +function catchClause(id, guard, body) { if (guard) { return Pattern({ type: "GuardedCatchClause", param: id, guard: guard, body: body }) } else { return Pattern({ type: "CatchClause", param: id, body: body }) } } +function tryStmt(body, guarded, catches, fin) { return Pattern({ type: "TryStatement", block: body, guardedHandlers: guarded, handlers: catches, finalizer: fin }) } +function letStmt(head, body) { return Pattern({ type: "LetStatement", head: head, body: body }) } +function funExpr(id, args, body, gen) { return Pattern({ type: "FunctionExpression", + id: id, + params: args, + defaults: [], + body: body, + rest: null, + generator: false, + expression: false + }) } +function genFunExpr(id, args, body) { return Pattern({ type: "FunctionExpression", + id: id, + params: args, + defaults: [], + body: body, + rest: null, + generator: true, + expression: false + }) } + +function unExpr(op, arg) { return Pattern({ type: "UnaryExpression", operator: op, argument: arg }) } +function binExpr(op, left, right) { return Pattern({ type: "BinaryExpression", operator: op, left: left, right: right }) } +function aExpr(op, left, right) { return Pattern({ type: "AssignmentExpression", operator: op, left: left, right: right }) } +function updExpr(op, arg, prefix) { return Pattern({ type: "UpdateExpression", operator: op, argument: arg, prefix: prefix }) } +function logExpr(op, left, right) { return Pattern({ type: "LogicalExpression", operator: op, left: left, right: right }) } + +function condExpr(test, cons, alt) { return Pattern({ type: "ConditionalExpression", test: test, consequent: cons, alternate: alt }) } +function seqExpr(exprs) { return Pattern({ type: "SequenceExpression", expressions: exprs }) } +function newExpr(callee, args) { return Pattern({ type: "NewExpression", callee: callee, arguments: args }) } +function callExpr(callee, args) { return Pattern({ type: "CallExpression", callee: callee, arguments: args }) } +function arrExpr(elts) { return Pattern({ type: "ArrayExpression", elements: elts }) } +function objExpr(elts) { return Pattern({ type: "ObjectExpression", properties: elts }) } +function objProp(key, value, kind) { return Pattern({ type: "Property", key: key, value: value, kind: kind, method: false, shorthand: false }) } + +function arrPatt(elts) { return Pattern({ type: "ArrayPattern", elements: elts }) } +function objPatt(elts) { return Pattern({ type: "ObjectPattern", properties: elts }) } + +function localSrc(src) { return "(function(){ " + src + " })" } +function localPatt(patt) { return program([exprStmt(funExpr(null, [], blockStmt([patt])))]) } +function blockSrc(src) { return "(function(){ { " + src + " } })" } +function blockPatt(patt) { return program([exprStmt(funExpr(null, [], blockStmt([blockStmt([patt])])))]) } + +function assertBlockStmt(src, patt) { + blockPatt(patt).assert(Reflect.parse(blockSrc(src))); +} + +function assertBlockExpr(src, patt) { + assertBlockStmt(src, exprStmt(patt)); +} + +function assertBlockDecl(src, patt, builder) { + blockPatt(patt).assert(Reflect.parse(blockSrc(src), {builder: builder})); +} + +function assertLocalStmt(src, patt) { + localPatt(patt).assert(Reflect.parse(localSrc(src))); +} + +function assertLocalExpr(src, patt) { + assertLocalStmt(src, exprStmt(patt)); +} + +function assertLocalDecl(src, patt) { + localPatt(patt).assert(Reflect.parse(localSrc(src))); +} + +function assertGlobalStmt(src, patt, builder) { + program([patt]).assert(Reflect.parse(src, {builder: builder})); +} + +function assertGlobalExpr(src, patt, builder) { + program([exprStmt(patt)]).assert(Reflect.parse(src, {builder: builder})); + //assertStmt(src, exprStmt(patt)); +} + +function assertGlobalDecl(src, patt) { + program([patt]).assert(Reflect.parse(src)); +} + +function assertProg(src, patt) { + program(patt).assert(Reflect.parse(src)); +} + +function assertStmt(src, patt) { + assertLocalStmt(src, patt); + assertGlobalStmt(src, patt); + assertBlockStmt(src, patt); +} + +function assertExpr(src, patt) { + assertLocalExpr(src, patt); + assertGlobalExpr(src, patt); + assertBlockExpr(src, patt); +} + +function assertDecl(src, patt) { + assertLocalDecl(src, patt); + assertGlobalDecl(src, patt); + assertBlockDecl(src, patt); +} + +function assertError(src, errorType) { + try { + Reflect.parse(src); + } catch (e) { + return; + } + throw new Error("expected " + errorType.name + " for " + uneval(src)); +} + + +// general tests + +// NB: These are useful but for now jit-test doesn't do I/O reliably. + +//program(_).assert(Reflect.parse(snarf('data/flapjax.txt'))); +//program(_).assert(Reflect.parse(snarf('data/jquery-1.4.2.txt'))); +//program(_).assert(Reflect.parse(snarf('data/prototype.js'))); +//program(_).assert(Reflect.parse(snarf('data/dojo.js.uncompressed.js'))); +//program(_).assert(Reflect.parse(snarf('data/mootools-1.2.4-core-nc.js'))); + + +// declarations + +assertDecl("var x = 1, y = 2, z = 3", + varDecl([declarator(ident("x"), lit(1)), + declarator(ident("y"), lit(2)), + declarator(ident("z"), lit(3))])); +assertDecl("var x, y, z", + varDecl([declarator(ident("x"), null), + declarator(ident("y"), null), + declarator(ident("z"), null)])); +assertDecl("function foo() { }", + funDecl(ident("foo"), [], blockStmt([]))); +assertDecl("function foo() { return 42 }", + funDecl(ident("foo"), [], blockStmt([returnStmt(lit(42))]))); + + +// Bug 591437: rebound args have their defs turned into uses +assertDecl("function f(a) { function a() { } }", + funDecl(ident("f"), [ident("a")], blockStmt([funDecl(ident("a"), [], blockStmt([]))]))); +assertDecl("function f(a,b,c) { function b() { } }", + funDecl(ident("f"), [ident("a"),ident("b"),ident("c")], blockStmt([funDecl(ident("b"), [], blockStmt([]))]))); + +// expressions + +assertExpr("true", lit(true)); +assertExpr("false", lit(false)); +assertExpr("42", lit(42)); +assertExpr("(/asdf/)", lit(/asdf/)); +assertExpr("this", thisExpr); +assertExpr("foo", ident("foo")); +assertExpr("foo.bar", dotExpr(ident("foo"), ident("bar"))); +assertExpr("foo[bar]", memExpr(ident("foo"), ident("bar"))); +assertExpr("(function(){})", funExpr(null, [], blockStmt([]))); +assertExpr("(function f() {})", funExpr(ident("f"), [], blockStmt([]))); +assertExpr("(function f(x,y,z) {})", funExpr(ident("f"), [ident("x"),ident("y"),ident("z")], blockStmt([]))); +assertExpr("(++x)", updExpr("++", ident("x"), true)); +assertExpr("(x++)", updExpr("++", ident("x"), false)); +assertExpr("(+x)", unExpr("+", ident("x"))); +assertExpr("(-x)", unExpr("-", ident("x"))); +assertExpr("(!x)", unExpr("!", ident("x"))); +assertExpr("(~x)", unExpr("~", ident("x"))); +assertExpr("(delete x)", unExpr("delete", ident("x"))); +assertExpr("(typeof x)", unExpr("typeof", ident("x"))); +assertExpr("(void x)", unExpr("void", ident("x"))); +assertExpr("(x == y)", binExpr("==", ident("x"), ident("y"))); +assertExpr("(x != y)", binExpr("!=", ident("x"), ident("y"))); +assertExpr("(x === y)", binExpr("===", ident("x"), ident("y"))); +assertExpr("(x !== y)", binExpr("!==", ident("x"), ident("y"))); +assertExpr("(x < y)", binExpr("<", ident("x"), ident("y"))); +assertExpr("(x <= y)", binExpr("<=", ident("x"), ident("y"))); +assertExpr("(x > y)", binExpr(">", ident("x"), ident("y"))); +assertExpr("(x >= y)", binExpr(">=", ident("x"), ident("y"))); +assertExpr("(x << y)", binExpr("<<", ident("x"), ident("y"))); +assertExpr("(x >> y)", binExpr(">>", ident("x"), ident("y"))); +assertExpr("(x >>> y)", binExpr(">>>", ident("x"), ident("y"))); +assertExpr("(x + y)", binExpr("+", ident("x"), ident("y"))); +assertExpr("(w + x + y + z)", binExpr("+", binExpr("+", binExpr("+", ident("w"), ident("x")), ident("y")), ident("z"))); +assertExpr("(x - y)", binExpr("-", ident("x"), ident("y"))); +assertExpr("(w - x - y - z)", binExpr("-", binExpr("-", binExpr("-", ident("w"), ident("x")), ident("y")), ident("z"))); +assertExpr("(x * y)", binExpr("*", ident("x"), ident("y"))); +assertExpr("(x / y)", binExpr("/", ident("x"), ident("y"))); +assertExpr("(x % y)", binExpr("%", ident("x"), ident("y"))); +assertExpr("(x | y)", binExpr("|", ident("x"), ident("y"))); +assertExpr("(x ^ y)", binExpr("^", ident("x"), ident("y"))); +assertExpr("(x & y)", binExpr("&", ident("x"), ident("y"))); +assertExpr("(x in y)", binExpr("in", ident("x"), ident("y"))); +assertExpr("(x instanceof y)", binExpr("instanceof", ident("x"), ident("y"))); +assertExpr("(x = y)", aExpr("=", ident("x"), ident("y"))); +assertExpr("(x += y)", aExpr("+=", ident("x"), ident("y"))); +assertExpr("(x -= y)", aExpr("-=", ident("x"), ident("y"))); +assertExpr("(x *= y)", aExpr("*=", ident("x"), ident("y"))); +assertExpr("(x /= y)", aExpr("/=", ident("x"), ident("y"))); +assertExpr("(x %= y)", aExpr("%=", ident("x"), ident("y"))); +assertExpr("(x <<= y)", aExpr("<<=", ident("x"), ident("y"))); +assertExpr("(x >>= y)", aExpr(">>=", ident("x"), ident("y"))); +assertExpr("(x >>>= y)", aExpr(">>>=", ident("x"), ident("y"))); +assertExpr("(x |= y)", aExpr("|=", ident("x"), ident("y"))); +assertExpr("(x ^= y)", aExpr("^=", ident("x"), ident("y"))); +assertExpr("(x &= y)", aExpr("&=", ident("x"), ident("y"))); +assertExpr("(x || y)", logExpr("||", ident("x"), ident("y"))); +assertExpr("(x && y)", logExpr("&&", ident("x"), ident("y"))); +assertExpr("(w || x || y || z)", logExpr("||", logExpr("||", logExpr("||", ident("w"), ident("x")), ident("y")), ident("z"))) +assertExpr("(x ? y : z)", condExpr(ident("x"), ident("y"), ident("z"))); +assertExpr("(x,y)", seqExpr([ident("x"),ident("y")])) +assertExpr("(x,y,z)", seqExpr([ident("x"),ident("y"),ident("z")])) +assertExpr("(a,b,c,d,e,f,g)", seqExpr([ident("a"),ident("b"),ident("c"),ident("d"),ident("e"),ident("f"),ident("g")])); +assertExpr("(new Object)", newExpr(ident("Object"), [])); +assertExpr("(new Object())", newExpr(ident("Object"), [])); +assertExpr("(new Object(42))", newExpr(ident("Object"), [lit(42)])); +assertExpr("(new Object(1,2,3))", newExpr(ident("Object"), [lit(1),lit(2),lit(3)])); +assertExpr("(String())", callExpr(ident("String"), [])); +assertExpr("(String(42))", callExpr(ident("String"), [lit(42)])); +assertExpr("(String(1,2,3))", callExpr(ident("String"), [lit(1),lit(2),lit(3)])); +assertExpr("[]", arrExpr([])); +assertExpr("[1]", arrExpr([lit(1)])); +assertExpr("[1,2]", arrExpr([lit(1),lit(2)])); +assertExpr("[1,2,3]", arrExpr([lit(1),lit(2),lit(3)])); +assertExpr("[1,,2,3]", arrExpr([lit(1),,lit(2),lit(3)])); +assertExpr("[1,,,2,3]", arrExpr([lit(1),,,lit(2),lit(3)])); +assertExpr("[1,,,2,,3]", arrExpr([lit(1),,,lit(2),,lit(3)])); +assertExpr("[1,,,2,,,3]", arrExpr([lit(1),,,lit(2),,,lit(3)])); +assertExpr("[,1,2,3]", arrExpr([,lit(1),lit(2),lit(3)])); +assertExpr("[,,1,2,3]", arrExpr([,,lit(1),lit(2),lit(3)])); +assertExpr("[,,,1,2,3]", arrExpr([,,,lit(1),lit(2),lit(3)])); +assertExpr("[,,,1,2,3,]", arrExpr([,,,lit(1),lit(2),lit(3)])); +assertExpr("[,,,1,2,3,,]", arrExpr([,,,lit(1),lit(2),lit(3),undefined])); +assertExpr("[,,,1,2,3,,,]", arrExpr([,,,lit(1),lit(2),lit(3),undefined,undefined])); +assertExpr("[,,,,,]", arrExpr([undefined,undefined,undefined,undefined,undefined])); +assertExpr("({})", objExpr([])); +assertExpr("({x:1})", objExpr([objProp(ident("x"), lit(1), "init")])); +assertExpr("({x:1, y:2})", objExpr([objProp(ident("x"), lit(1), "init"), + objProp(ident("y"), lit(2), "init")])); +assertExpr("({x:1, y:2, z:3})", objExpr([objProp(ident("x"), lit(1), "init"), + objProp(ident("y"), lit(2), "init"), + objProp(ident("z"), lit(3), "init") ])); +assertExpr("({x:1, 'y':2, z:3})", objExpr([objProp(ident("x"), lit(1), "init"), + objProp(lit("y"), lit(2), "init"), + objProp(ident("z"), lit(3), "init") ])); +assertExpr("({'x':1, 'y':2, z:3})", objExpr([objProp(lit("x"), lit(1), "init"), + objProp(lit("y"), lit(2), "init"), + objProp(ident("z"), lit(3), "init") ])); +assertExpr("({'x':1, 'y':2, 3:3})", objExpr([objProp(lit("x"), lit(1), "init"), + objProp(lit("y"), lit(2), "init"), + objProp(lit(3), lit(3), "init") ])); + +// Bug 571617: eliminate constant-folding +assertExpr("2 + 3", binExpr("+", lit(2), lit(3))); + +// Bug 632026: constant-folding +assertExpr("typeof(0?0:a)", unExpr("typeof", condExpr(lit(0), lit(0), ident("a")))); + +// Bug 632056: constant-folding +program([exprStmt(ident("f")), + ifStmt(lit(1), + funDecl(ident("f"), [], blockStmt([])), + null)]).assert(Reflect.parse("f; if (1) function f(){}")); + +// statements + +assertStmt("throw 42", throwStmt(lit(42))); +assertStmt("for (;;) break", forStmt(null, null, null, breakStmt(null))); +assertStmt("for (x; y; z) break", forStmt(ident("x"), ident("y"), ident("z"), breakStmt(null))); +assertStmt("for (var x; y; z) break", forStmt(varDecl([declarator(ident("x"), null)]), ident("y"), ident("z"), breakStmt(null))); +assertStmt("for (var x = 42; y; z) break", forStmt(varDecl([declarator(ident("x"), lit(42))]), ident("y"), ident("z"), breakStmt(null))); +assertStmt("for (x; ; z) break", forStmt(ident("x"), null, ident("z"), breakStmt(null))); +assertStmt("for (var x; ; z) break", forStmt(varDecl([declarator(ident("x"), null)]), null, ident("z"), breakStmt(null))); +assertStmt("for (var x = 42; ; z) break", forStmt(varDecl([declarator(ident("x"), lit(42))]), null, ident("z"), breakStmt(null))); +assertStmt("for (x; y; ) break", forStmt(ident("x"), ident("y"), null, breakStmt(null))); +assertStmt("for (var x; y; ) break", forStmt(varDecl([declarator(ident("x"), null)]), ident("y"), null, breakStmt(null))); +assertStmt("for (var x = 42; y; ) break", forStmt(varDecl([declarator(ident("x"),lit(42))]), ident("y"), null, breakStmt(null))); +assertStmt("for (var x in y) break", forInStmt(varDecl([declarator(ident("x"),null)]), ident("y"), breakStmt(null))); +assertStmt("for (x in y) break", forInStmt(ident("x"), ident("y"), breakStmt(null))); +assertStmt("{ }", blockStmt([])); +assertStmt("{ throw 1; throw 2; throw 3; }", blockStmt([ throwStmt(lit(1)), throwStmt(lit(2)), throwStmt(lit(3))])); +assertStmt(";", emptyStmt); +assertStmt("if (foo) throw 42;", ifStmt(ident("foo"), throwStmt(lit(42)), null)); +assertStmt("if (foo) throw 42; else true;", ifStmt(ident("foo"), throwStmt(lit(42)), exprStmt(lit(true)))); +assertStmt("if (foo) { throw 1; throw 2; throw 3; }", + ifStmt(ident("foo"), + blockStmt([throwStmt(lit(1)), throwStmt(lit(2)), throwStmt(lit(3))]), + null)); +assertStmt("if (foo) { throw 1; throw 2; throw 3; } else true;", + ifStmt(ident("foo"), + blockStmt([throwStmt(lit(1)), throwStmt(lit(2)), throwStmt(lit(3))]), + exprStmt(lit(true)))); +assertStmt("foo: for(;;) break foo;", labStmt(ident("foo"), forStmt(null, null, null, breakStmt(ident("foo"))))); +assertStmt("foo: for(;;) continue foo;", labStmt(ident("foo"), forStmt(null, null, null, continueStmt(ident("foo"))))); +assertStmt("with (obj) { }", withStmt(ident("obj"), blockStmt([]))); +assertStmt("with (obj) { obj; }", withStmt(ident("obj"), blockStmt([exprStmt(ident("obj"))]))); +assertStmt("while (foo) { }", whileStmt(ident("foo"), blockStmt([]))); +assertStmt("while (foo) { foo; }", whileStmt(ident("foo"), blockStmt([exprStmt(ident("foo"))]))); +assertStmt("do { } while (foo);", doStmt(blockStmt([]), ident("foo"))); +assertStmt("do { foo; } while (foo)", doStmt(blockStmt([exprStmt(ident("foo"))]), ident("foo"))); +assertStmt("switch (foo) { case 1: 1; break; case 2: 2; break; default: 3; }", + switchStmt(ident("foo"), + [ caseClause(lit(1), [ exprStmt(lit(1)), breakStmt(null) ]), + caseClause(lit(2), [ exprStmt(lit(2)), breakStmt(null) ]), + defaultClause([ exprStmt(lit(3)) ]) ])); +assertStmt("switch (foo) { case 1: 1; break; case 2: 2; break; default: 3; case 42: 42; }", + switchStmt(ident("foo"), + [ caseClause(lit(1), [ exprStmt(lit(1)), breakStmt(null) ]), + caseClause(lit(2), [ exprStmt(lit(2)), breakStmt(null) ]), + defaultClause([ exprStmt(lit(3)) ]), + caseClause(lit(42), [ exprStmt(lit(42)) ]) ])); +assertStmt("try { } catch (e) { }", + tryStmt(blockStmt([]), + [], + [ catchClause(ident("e"), null, blockStmt([])) ], + null)); +assertStmt("try { } catch (e) { } finally { }", + tryStmt(blockStmt([]), + [], + [ catchClause(ident("e"), null, blockStmt([])) ], + blockStmt([]))); +assertStmt("try { } finally { }", + tryStmt(blockStmt([]), + [], + [], + blockStmt([]))); + +// redeclarations (TOK_NAME nodes with lexdef) + +assertStmt("function f() { function g() { } function g() { } }", + funDecl(ident("f"), [], blockStmt([funDecl(ident("g"), [], blockStmt([])), + funDecl(ident("g"), [], blockStmt([]))]))); + +assertStmt("function f() { function g() { } function g() { return 42 } }", + funDecl(ident("f"), [], blockStmt([funDecl(ident("g"), [], blockStmt([])), + funDecl(ident("g"), [], blockStmt([returnStmt(lit(42))]))]))); + +assertStmt("function f() { var x = 42; var x = 43; }", + funDecl(ident("f"), [], blockStmt([varDecl([declarator(ident("x"),lit(42))]), + varDecl([declarator(ident("x"),lit(43))])]))); + +// getters and setters + + assertExpr("({ get x() { return 42 } })", + objExpr([ objProp(ident("x"), + funExpr(null, [], blockStmt([returnStmt(lit(42))])), + "get" ) ])); + assertExpr("({ set x(v) { return 42 } })", + objExpr([ objProp(ident("x"), + funExpr(null, [ident("v")], blockStmt([returnStmt(lit(42))])), + "set" ) ])); + +} + +exports.testReflect = testReflect; + +}(typeof exports === 'undefined' ? this : exports)); diff --git a/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/run.js b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/run.js new file mode 100644 index 00000000..32ca3faa --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/run.js @@ -0,0 +1,66 @@ +/* + Copyright (C) 2012 Yusuke Suzuki + Copyright (C) 2012 Ariya Hidayat + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*jslint node:true */ + +(function () { + 'use strict'; + + var child = require('child_process'), + nodejs = '"' + process.execPath + '"', + ret = 0, + suites, + index; + + suites = [ + 'runner', + 'compat' + ]; + + function nextTest() { + var suite = suites[index]; + + if (index < suites.length) { + child.exec(nodejs + ' ./test/' + suite + '.js', function (err, stdout, stderr) { + if (stdout) { + process.stdout.write(suite + ': ' + stdout); + } + if (stderr) { + process.stderr.write(suite + ': ' + stderr); + } + if (err) { + ret = err.code; + } + index += 1; + nextTest(); + }); + } else { + process.exit(ret); + } + } + + index = 0; + nextTest(); +}()); diff --git a/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/runner.js b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/runner.js new file mode 100644 index 00000000..919e898d --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/runner.js @@ -0,0 +1,445 @@ +/* + Copyright (C) 2012 Ariya Hidayat + Copyright (C) 2012 Joost-Wim Boekesteijn + Copyright (C) 2012 Yusuke Suzuki + Copyright (C) 2012 Arpad Borsos + Copyright (C) 2011 Ariya Hidayat + Copyright (C) 2011 Yusuke Suzuki + Copyright (C) 2011 Arpad Borsos + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*jslint browser:true node:true */ +/*global esprima:true, testFixture:true */ + +var runTests; + +// Special handling for regular expression literal since we need to +// convert it to a string literal, otherwise it will be decoded +// as object "{}" and the regular expression would be lost. +function adjustRegexLiteral(key, value) { + 'use strict'; + if (key === 'value' && value instanceof RegExp) { + value = value.toString(); + } + return value; +} + +function NotMatchingError(expected, actual) { + 'use strict'; + Error.call(this, 'Expected '); + this.expected = expected; + this.actual = actual; +} +NotMatchingError.prototype = new Error(); + +function errorToObject(e) { + 'use strict'; + var msg = e.toString(); + + // Opera 9.64 produces an non-standard string in toString(). + if (msg.substr(0, 6) !== 'Error:') { + if (typeof e.message === 'string') { + msg = 'Error: ' + e.message; + } + } + + return { + index: e.index, + lineNumber: e.lineNumber, + column: e.column, + message: msg + }; +} + +function testParse(esprima, code, syntax) { + 'use strict'; + var expected, tree, actual, options, StringObject, i, len, err; + + // alias, so that JSLint does not complain. + StringObject = String; + + options = { + comment: (typeof syntax.comments !== 'undefined'), + range: true, + loc: true, + tokens: (typeof syntax.tokens !== 'undefined'), + raw: true, + tolerant: (typeof syntax.errors !== 'undefined'), + source: null + }; + + if (typeof syntax.tokens !== 'undefined') { + if (syntax.tokens.length > 0) { + options.range = (typeof syntax.tokens[0].range !== 'undefined'); + options.loc = (typeof syntax.tokens[0].loc !== 'undefined'); + } + } + + if (typeof syntax.comments !== 'undefined') { + if (syntax.comments.length > 0) { + options.range = (typeof syntax.comments[0].range !== 'undefined'); + options.loc = (typeof syntax.comments[0].loc !== 'undefined'); + } + } + + if (options.loc) { + options.source = syntax.loc.source; + } + + expected = JSON.stringify(syntax, null, 4); + try { + tree = esprima.parse(code, options); + tree = (options.comment || options.tokens || options.tolerant) ? tree : tree.body[0]; + + if (options.tolerant) { + for (i = 0, len = tree.errors.length; i < len; i += 1) { + tree.errors[i] = errorToObject(tree.errors[i]); + } + } + + actual = JSON.stringify(tree, adjustRegexLiteral, 4); + + // Only to ensure that there is no error when using string object. + esprima.parse(new StringObject(code), options); + + } catch (e) { + throw new NotMatchingError(expected, e.toString()); + } + if (expected !== actual) { + throw new NotMatchingError(expected, actual); + } + + function filter(key, value) { + if (key === 'value' && value instanceof RegExp) { + value = value.toString(); + } + return (key === 'loc' || key === 'range') ? undefined : value; + } + + if (options.tolerant) { + return; + } + + + // Check again without any location info. + options.range = false; + options.loc = false; + expected = JSON.stringify(syntax, filter, 4); + try { + tree = esprima.parse(code, options); + tree = (options.comment || options.tokens) ? tree : tree.body[0]; + + if (options.tolerant) { + for (i = 0, len = tree.errors.length; i < len; i += 1) { + tree.errors[i] = errorToObject(tree.errors[i]); + } + } + + actual = JSON.stringify(tree, filter, 4); + } catch (e) { + throw new NotMatchingError(expected, e.toString()); + } + if (expected !== actual) { + throw new NotMatchingError(expected, actual); + } +} + +function testTokenize(esprima, code, tokens) { + 'use strict'; + var options, expected, actual, tree; + + options = { + comment: true, + tolerant: true, + loc: true, + range: true + }; + + expected = JSON.stringify(tokens, null, 4); + + try { + tree = esprima.tokenize(code, options); + actual = JSON.stringify(tree, null, 4); + } catch (e) { + throw new NotMatchingError(expected, e.toString()); + } + if (expected !== actual) { + throw new NotMatchingError(expected, actual); + } +} + +function testError(esprima, code, exception) { + 'use strict'; + var i, options, expected, actual, err, handleInvalidRegexFlag, tokenize; + + // Different parsing options should give the same error. + options = [ + {}, + { comment: true }, + { raw: true }, + { raw: true, comment: true } + ]; + + // If handleInvalidRegexFlag is true, an invalid flag in a regular expression + // will throw an exception. In some old version V8, this is not the case + // and hence handleInvalidRegexFlag is false. + handleInvalidRegexFlag = false; + try { + 'test'.match(new RegExp('[a-z]', 'x')); + } catch (e) { + handleInvalidRegexFlag = true; + } + + exception.description = exception.message.replace(/Error: Line [0-9]+: /, ''); + + if (exception.tokenize) { + tokenize = true; + exception.tokenize = undefined; + } + expected = JSON.stringify(exception); + + for (i = 0; i < options.length; i += 1) { + + try { + if (tokenize) { + esprima.tokenize(code, options[i]) + } else { + esprima.parse(code, options[i]); + } + } catch (e) { + err = errorToObject(e); + err.description = e.description; + actual = JSON.stringify(err); + } + + if (expected !== actual) { + + // Compensate for old V8 which does not handle invalid flag. + if (exception.message.indexOf('Invalid regular expression') > 0) { + if (typeof actual === 'undefined' && !handleInvalidRegexFlag) { + return; + } + } + + throw new NotMatchingError(expected, actual); + } + + } +} + +function testAPI(esprima, code, result) { + 'use strict'; + var expected, res, actual; + + expected = JSON.stringify(result.result, null, 4); + try { + if (typeof result.property !== 'undefined') { + res = esprima[result.property]; + } else { + res = esprima[result.call].apply(esprima, result.args); + } + actual = JSON.stringify(res, adjustRegexLiteral, 4); + } catch (e) { + throw new NotMatchingError(expected, e.toString()); + } + if (expected !== actual) { + throw new NotMatchingError(expected, actual); + } +} + +function runTest(esprima, code, result) { + 'use strict'; + if (result.hasOwnProperty('lineNumber')) { + testError(esprima, code, result); + } else if (result.hasOwnProperty('result')) { + testAPI(esprima, code, result); + } else if (result instanceof Array) { + testTokenize(esprima, code, result); + } else { + testParse(esprima, code, result); + } +} + +if (typeof window !== 'undefined') { + // Run all tests in a browser environment. + runTests = function () { + 'use strict'; + var total = 0, + failures = 0, + category, + fixture, + source, + tick, + expected, + index, + len; + + function setText(el, str) { + if (typeof el.innerText === 'string') { + el.innerText = str; + } else { + el.textContent = str; + } + } + + function startCategory(category) { + var report, e; + report = document.getElementById('report'); + e = document.createElement('h4'); + setText(e, category); + report.appendChild(e); + } + + function reportSuccess(code) { + var report, e; + report = document.getElementById('report'); + e = document.createElement('pre'); + e.setAttribute('class', 'code'); + setText(e, code); + report.appendChild(e); + } + + function reportFailure(code, expected, actual) { + var report, e; + + report = document.getElementById('report'); + + e = document.createElement('p'); + setText(e, 'Code:'); + report.appendChild(e); + + e = document.createElement('pre'); + e.setAttribute('class', 'code'); + setText(e, code); + report.appendChild(e); + + e = document.createElement('p'); + setText(e, 'Expected'); + report.appendChild(e); + + e = document.createElement('pre'); + e.setAttribute('class', 'expected'); + setText(e, expected); + report.appendChild(e); + + e = document.createElement('p'); + setText(e, 'Actual'); + report.appendChild(e); + + e = document.createElement('pre'); + e.setAttribute('class', 'actual'); + setText(e, actual); + report.appendChild(e); + } + + setText(document.getElementById('version'), esprima.version); + + tick = new Date(); + for (category in testFixture) { + if (testFixture.hasOwnProperty(category)) { + startCategory(category); + fixture = testFixture[category]; + for (source in fixture) { + if (fixture.hasOwnProperty(source)) { + expected = fixture[source]; + total += 1; + try { + runTest(esprima, source, expected); + reportSuccess(source, JSON.stringify(expected, null, 4)); + } catch (e) { + failures += 1; + reportFailure(source, e.expected, e.actual); + } + } + } + } + } + tick = (new Date()) - tick; + + if (failures > 0) { + document.getElementById('status').className = 'alert-box alert'; + setText(document.getElementById('status'), total + ' tests. ' + + 'Failures: ' + failures + '. ' + tick + ' ms.'); + } else { + document.getElementById('status').className = 'alert-box success'; + setText(document.getElementById('status'), total + ' tests. ' + + 'No failure. ' + tick + ' ms.'); + } + }; +} else { + (function () { + 'use strict'; + + var esprima = require('../esprima'), + vm = require('vm'), + fs = require('fs'), + diff = require('json-diff').diffString, + total = 0, + failures = [], + tick = new Date(), + expected, + header; + + vm.runInThisContext(fs.readFileSync(__dirname + '/test.js', 'utf-8')); + vm.runInThisContext(fs.readFileSync(__dirname + '/harmonytest.js', 'utf-8')); + vm.runInThisContext(fs.readFileSync(__dirname + '/fbtest.js', 'utf-8')); + + Object.keys(testFixture).forEach(function (category) { + Object.keys(testFixture[category]).forEach(function (source) { + total += 1; + expected = testFixture[category][source]; + try { + runTest(esprima, source, expected); + } catch (e) { + e.source = source; + failures.push(e); + } + }); + }); + tick = (new Date()) - tick; + + header = total + ' tests. ' + failures.length + ' failures. ' + + tick + ' ms'; + if (failures.length) { + console.error(header); + failures.forEach(function (failure) { + try { + var expectedObject = JSON.parse(failure.expected); + var actualObject = JSON.parse(failure.actual); + + console.error(failure.source + ': Expected\n ' + + failure.expected.split('\n').join('\n ') + + '\nto match\n ' + failure.actual + '\nDiff:\n' + + diff(expectedObject, actualObject)); + } catch (ex) { + console.error(failure.source + ': Expected\n ' + + failure.expected.split('\n').join('\n ') + + '\nto match\n ' + failure.actual); + } + }); + } else { + console.log(header); + } + process.exit(failures.length === 0 ? 0 : 1); + }()); +} diff --git a/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/test.js b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/test.js new file mode 100644 index 00000000..547afaba --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/node_modules/esprima-fb/test/test.js @@ -0,0 +1,22331 @@ +/* + Copyright (C) 2012 Ariya Hidayat + Copyright (C) 2012 Joost-Wim Boekesteijn + Copyright (C) 2012 Yusuke Suzuki + Copyright (C) 2012 Arpad Borsos + Copyright (C) 2011 Ariya Hidayat + Copyright (C) 2011 Yusuke Suzuki + Copyright (C) 2011 Arpad Borsos + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +var testFixture = { + + 'Primary Expression': { + + 'this\n': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'ThisExpression', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 0 } + } + }], + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 0 } + }, + tokens: [{ + type: 'Keyword', + value: 'this', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }] + }, + + 'null\n': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: null, + raw: 'null', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 0 } + } + }], + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 0 } + }, + tokens: [{ + type: 'Null', + value: 'null', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }] + }, + + '\n 42\n\n': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [5, 7], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + } + }, + range: [5, 9], + loc: { + start: { line: 2, column: 4 }, + end: { line: 4, column: 0 } + } + }], + range: [5, 9], + loc: { + start: { line: 2, column: 4 }, + end: { line: 4, column: 0 } + }, + tokens: [{ + type: 'Numeric', + value: '42', + range: [5, 7], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + } + }] + }, + + '(1 + 2 ) * 3': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'Literal', + value: 1, + raw: '1', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + right: { + type: 'Literal', + value: 2, + raw: '2', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [1, 6], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 6 } + } + }, + right: { + type: 'Literal', + value: 3, + raw: '3', + range: [11, 12], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + } + + }, + + 'Grouping Operator': { + + '(1) + (2 ) + 3': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'Literal', + value: 1, + raw: '1', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + right: { + type: 'Literal', + value: 2, + raw: '2', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + right: { + type: 'Literal', + value: 3, + raw: '3', + range: [14, 15], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + + '4 + 5 << (6)': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '<<', + left: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'Literal', + value: 4, + raw: '4', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 5, + raw: '5', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Literal', + value: 6, + raw: '6', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + } + + }, + + 'Array Initializer': { + + 'x = []': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [4, 6], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }], + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + }, + tokens: [{ + type: 'Identifier', + value: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, { + type: 'Punctuator', + value: '=', + range: [2, 3], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 3 } + } + }, { + type: 'Punctuator', + value: '[', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, { + type: 'Punctuator', + value: ']', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }] + }, + + 'x = [ ]': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'x = [ 42 ]': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ArrayExpression', + elements: [{ + type: 'Literal', + value: 42, + raw: '42', + range: [6, 8], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 8 } + } + }], + range: [4, 10], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 10 } + } + }, + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + }, + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + }, + + 'x = [ 42, ]': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ArrayExpression', + elements: [{ + type: 'Literal', + value: 42, + raw: '42', + range: [6, 8], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 8 } + } + }], + range: [4, 11], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + + 'x = [ ,, 42 ]': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ArrayExpression', + elements: [ + null, + null, + { + type: 'Literal', + value: 42, + raw: '42', + range: [9, 11], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 11 } + } + }], + range: [4, 13], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + + 'x = [ 1, 2, 3, ]': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ArrayExpression', + elements: [{ + type: 'Literal', + value: 1, + raw: '1', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, { + type: 'Literal', + value: 2, + raw: '2', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, { + type: 'Literal', + value: 3, + raw: '3', + range: [12, 13], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 13 } + } + }], + range: [4, 16], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + 'x = [ 1, 2,, 3, ]': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ArrayExpression', + elements: [{ + type: 'Literal', + value: 1, + raw: '1', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, { + type: 'Literal', + value: 2, + raw: '2', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, null, { + type: 'Literal', + value: 3, + raw: '3', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }], + range: [4, 17], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + + 'x = [ "finally", "for" ]': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ArrayExpression', + elements: [{ + type: 'Literal', + value: 'finally', + raw: '"finally"', + range: [6, 15], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 15 } + } + }, { + type: 'Literal', + value: 'for', + raw: '"for"', + range: [17, 22], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 22 } + } + }], + range: [4, 24], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 24 } + } + }, + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + + '日本語 = []': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: '日本語', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [6, 8], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + + 'T\u203F = []': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'T\u203F', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'T\u200C = []': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'T\u200C', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'T\u200D = []': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'T\u200D', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + '\u2163\u2161 = []': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: '\u2163\u2161', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + '\u2163\u2161\u200A=\u2009[]': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: '\u2163\u2161', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + '[",", "second"]': { + type: 'ExpressionStatement', + expression: { + type: 'ArrayExpression', + elements: [{ + type: 'Literal', + value: ',', + raw: '","', + range: [1, 4], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 4 } + } + }, { + type: 'Literal', + value: 'second', + raw: '"second"', + range: [6, 14], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 14 } + } + }], + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + + '["notAToken", "if"]': { + type: 'ExpressionStatement', + expression: { + type: 'ArrayExpression', + elements: [{ + type: 'Literal', + value: 'notAToken', + raw: '"notAToken"', + range: [1, 12], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 12 } + } + }, { + type: 'Literal', + value: 'if', + raw: '"if"', + range: [14, 18], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 18 } + } + }], + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + } + }, + + 'Object Initializer': { + + 'x = {}': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [], + range: [4, 6], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'x = { }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [], + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'x = { answer: 42 }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'answer', + range: [6, 12], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 12 } + } + }, + value: { + type: 'Literal', + value: 42, + raw: '42', + range: [14, 16], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 16 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [6, 16], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 16 } + } + }], + range: [4, 18], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 18 } + } + }, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + + 'x = { if: 42 }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'if', + range: [6, 8], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 8 } + } + }, + value: { + type: 'Literal', + value: 42, + raw: '42', + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [6, 12], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 12 } + } + }], + range: [4, 14], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + 'x = { true: 42 }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'true', + range: [6, 10], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 10 } + } + }, + value: { + type: 'Literal', + value: 42, + raw: '42', + range: [12, 14], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 14 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [6, 14], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 14 } + } + }], + range: [4, 16], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + 'x = { false: 42 }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'false', + range: [6, 11], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 11 } + } + }, + value: { + type: 'Literal', + value: 42, + raw: '42', + range: [13, 15], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 15 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [6, 15], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 15 } + } + }], + range: [4, 17], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + + 'x = { null: 42 }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'null', + range: [6, 10], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 10 } + } + }, + value: { + type: 'Literal', + value: 42, + raw: '42', + range: [12, 14], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 14 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [6, 14], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 14 } + } + }], + range: [4, 16], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + 'x = { "answer": 42 }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Literal', + value: 'answer', + raw: '"answer"', + range: [6, 14], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 14 } + } + }, + value: { + type: 'Literal', + value: 42, + raw: '42', + range: [16, 18], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 18 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [6, 18], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 18 } + } + }], + range: [4, 20], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 20 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + + 'x = { x: 1, x: 2 }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [ + { + type: 'Property', + key: { + type: 'Identifier', + name: 'x', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + value: { + type: 'Literal', + value: 1, + raw: '1', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [6, 10], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 10 } + } + }, + { + type: 'Property', + key: { + type: 'Identifier', + name: 'x', + range: [12, 13], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 13 } + } + }, + value: { + type: 'Literal', + value: 2, + raw: '2', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [12, 16], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 16 } + } + } + ], + range: [4, 18], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 18 } + } + }, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + + 'x = { get width() { return m_width } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'width', + range: [10, 15], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 15 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ReturnStatement', + argument: { + type: 'Identifier', + name: 'm_width', + range: [27, 34], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 34 } + } + }, + range: [20, 35], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 35 } + } + }], + range: [18, 36], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 36 } + } + }, + rest: null, + generator: false, + expression: false, + range: [18, 36], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 36 } + } + }, + kind: 'get', + method: false, + shorthand: false, + range: [6, 36], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 36 } + } + }], + range: [4, 38], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 38 } + } + }, + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + } + }, + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + } + }, + + 'x = { get undef() {} }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'undef', + range: [10, 15], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 15 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [18, 20], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 20 } + } + }, + rest: null, + generator: false, + expression: false, + range: [18, 20], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 20 } + } + }, + kind: 'get', + method: false, + shorthand: false, + range: [6, 20], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 20 } + } + }], + range: [4, 22], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + + 'x = { get if() {} }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'if', + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + rest: null, + generator: false, + expression: false, + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + kind: 'get', + method: false, + shorthand: false, + range: [6, 17], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 17 } + } + }], + range: [4, 19], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 19 } + } + }, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + + 'x = { get true() {} }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'true', + range: [10, 14], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 14 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [17, 19], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 19 } + } + }, + rest: null, + generator: false, + expression: false, + range: [17, 19], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 19 } + } + }, + kind: 'get', + method: false, + shorthand: false, + range: [6, 19], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 19 } + } + }], + range: [4, 21], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + + 'x = { get false() {} }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'false', + range: [10, 15], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 15 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [18, 20], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 20 } + } + }, + rest: null, + generator: false, + expression: false, + range: [18, 20], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 20 } + } + }, + kind: 'get', + method: false, + shorthand: false, + range: [6, 20], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 20 } + } + }], + range: [4, 22], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + + 'x = { get null() {} }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'null', + range: [10, 14], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 14 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [17, 19], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 19 } + } + }, + rest: null, + generator: false, + expression: false, + range: [17, 19], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 19 } + } + }, + kind: 'get', + method: false, + shorthand: false, + range: [6, 19], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 19 } + } + }], + range: [4, 21], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + + 'x = { get "undef"() {} }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Literal', + value: 'undef', + raw: '"undef"', + range: [10, 17], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 17 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [20, 22], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 22 } + } + }, + rest: null, + generator: false, + expression: false, + range: [20, 22], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 22 } + } + }, + kind: 'get', + method: false, + shorthand: false, + range: [6, 22], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 22 } + } + }], + range: [4, 24], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 24 } + } + }, + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + + 'x = { get 10() {} }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Literal', + value: 10, + raw: '10', + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + rest: null, + generator: false, + expression: false, + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + kind: 'get', + method: false, + shorthand: false, + range: [6, 17], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 17 } + } + }], + range: [4, 19], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 19 } + } + }, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + + 'x = { set width(w) { m_width = w } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'width', + range: [10, 15], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 15 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'w', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'm_width', + range: [21, 28], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 28 } + } + }, + right: { + type: 'Identifier', + name: 'w', + range: [31, 32], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 32 } + } + }, + range: [21, 32], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 32 } + } + }, + range: [21, 33], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 33 } + } + }], + range: [19, 34], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 34 } + } + }, + rest: null, + generator: false, + expression: false, + range: [19, 34], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 34 } + } + }, + kind: 'set', + method: false, + shorthand: false, + range: [6, 34], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 34 } + } + }], + range: [4, 36], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 36 } + } + }, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + } + }, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + } + }, + + 'x = { set if(w) { m_if = w } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'if', + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'w', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'm_if', + range: [18, 22], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 22 } + } + }, + right: { + type: 'Identifier', + name: 'w', + range: [25, 26], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 26 } + } + }, + range: [18, 26], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 26 } + } + }, + range: [18, 27], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 27 } + } + }], + range: [16, 28], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 28 } + } + }, + rest: null, + generator: false, + expression: false, + range: [16, 28], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 28 } + } + }, + kind: 'set', + method: false, + shorthand: false, + range: [6, 28], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 28 } + } + }], + range: [4, 30], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 30 } + } + }, + range: [0, 30], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 30 } + } + }, + range: [0, 30], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 30 } + } + }, + + 'x = { set true(w) { m_true = w } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'true', + range: [10, 14], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 14 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'w', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'm_true', + range: [20, 26], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 26 } + } + }, + right: { + type: 'Identifier', + name: 'w', + range: [29, 30], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 30 } + } + }, + range: [20, 30], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 30 } + } + }, + range: [20, 31], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 31 } + } + }], + range: [18, 32], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 32 } + } + }, + rest: null, + generator: false, + expression: false, + range: [18, 32], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 32 } + } + }, + kind: 'set', + method: false, + shorthand: false, + range: [6, 32], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 32 } + } + }], + range: [4, 34], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 34 } + } + }, + range: [0, 34], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 34 } + } + }, + range: [0, 34], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 34 } + } + }, + + 'x = { set false(w) { m_false = w } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'false', + range: [10, 15], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 15 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'w', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'm_false', + range: [21, 28], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 28 } + } + }, + right: { + type: 'Identifier', + name: 'w', + range: [31, 32], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 32 } + } + }, + range: [21, 32], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 32 } + } + }, + range: [21, 33], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 33 } + } + }], + range: [19, 34], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 34 } + } + }, + rest: null, + generator: false, + expression: false, + range: [19, 34], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 34 } + } + }, + kind: 'set', + method: false, + shorthand: false, + range: [6, 34], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 34 } + } + }], + range: [4, 36], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 36 } + } + }, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + } + }, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + } + }, + + 'x = { set null(w) { m_null = w } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'null', + range: [10, 14], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 14 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'w', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'm_null', + range: [20, 26], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 26 } + } + }, + right: { + type: 'Identifier', + name: 'w', + range: [29, 30], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 30 } + } + }, + range: [20, 30], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 30 } + } + }, + range: [20, 31], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 31 } + } + }], + range: [18, 32], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 32 } + } + }, + rest: null, + generator: false, + expression: false, + range: [18, 32], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 32 } + } + }, + kind: 'set', + method: false, + shorthand: false, + range: [6, 32], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 32 } + } + }], + range: [4, 34], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 34 } + } + }, + range: [0, 34], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 34 } + } + }, + range: [0, 34], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 34 } + } + }, + + 'x = { set "null"(w) { m_null = w } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Literal', + value: 'null', + raw: '"null"', + range: [10, 16], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 16 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'w', + range: [17, 18], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 18 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'm_null', + range: [22, 28], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 28 } + } + }, + right: { + type: 'Identifier', + name: 'w', + range: [31, 32], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 32 } + } + }, + range: [22, 32], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 32 } + } + }, + range: [22, 33], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 33 } + } + }], + range: [20, 34], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 34 } + } + }, + rest: null, + generator: false, + expression: false, + range: [20, 34], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 34 } + } + }, + kind: 'set', + method: false, + shorthand: false, + range: [6, 34], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 34 } + } + }], + range: [4, 36], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 36 } + } + }, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + } + }, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + } + }, + + 'x = { set 10(w) { m_null = w } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Literal', + value: 10, + raw: '10', + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'w', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'm_null', + range: [18, 24], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 24 } + } + }, + right: { + type: 'Identifier', + name: 'w', + range: [27, 28], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 28 } + } + }, + range: [18, 28], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 28 } + } + }, + range: [18, 29], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 29 } + } + }], + range: [16, 30], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 30 } + } + }, + rest: null, + generator: false, + expression: false, + range: [16, 30], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 30 } + } + }, + kind: 'set', + method: false, + shorthand: false, + range: [6, 30], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 30 } + } + }], + range: [4, 32], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 32 } + } + }, + range: [0, 32], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 32 } + } + }, + range: [0, 32], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 32 } + } + }, + + 'x = { get: 42 }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'get', + range: [6, 9], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 9 } + } + }, + value: { + type: 'Literal', + value: 42, + raw: '42', + range: [11, 13], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 13 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [6, 13], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 13 } + } + }], + range: [4, 15], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + + 'x = { set: 43 }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'set', + range: [6, 9], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 9 } + } + }, + value: { + type: 'Literal', + value: 43, + raw: '43', + range: [11, 13], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 13 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [6, 13], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 13 } + } + }], + range: [4, 15], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + + 'x = { __proto__: 2 }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: '__proto__', + range: [6, 15], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 15 } + } + }, + value: { + type: 'Literal', + value: 2, + raw: '2', + range: [17, 18], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 18 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [6, 18], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 18 } + } + }], + range: [4, 20], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 20 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + + 'x = {"__proto__": 2 }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Literal', + value: '__proto__', + raw: '"__proto__"', + range: [5, 16], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 16 } + } + }, + value: { + type: 'Literal', + value: 2, + raw: '2', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [5, 19], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 19 } + } + }], + range: [4, 21], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + + 'x = { get width() { return m_width }, set width(width) { m_width = width; } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'width', + range: [10, 15], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 15 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ReturnStatement', + argument: { + type: 'Identifier', + name: 'm_width', + range: [27, 34], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 34 } + } + }, + range: [20, 35], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 35 } + } + }], + range: [18, 36], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 36 } + } + }, + rest: null, + generator: false, + expression: false, + range: [18, 36], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 36 } + } + }, + kind: 'get', + method: false, + shorthand: false, + range: [6, 36], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 36 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'width', + range: [42, 47], + loc: { + start: { line: 1, column: 42 }, + end: { line: 1, column: 47 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'width', + range: [48, 53], + loc: { + start: { line: 1, column: 48 }, + end: { line: 1, column: 53 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'm_width', + range: [57, 64], + loc: { + start: { line: 1, column: 57 }, + end: { line: 1, column: 64 } + } + }, + right: { + type: 'Identifier', + name: 'width', + range: [67, 72], + loc: { + start: { line: 1, column: 67 }, + end: { line: 1, column: 72 } + } + }, + range: [57, 72], + loc: { + start: { line: 1, column: 57 }, + end: { line: 1, column: 72 } + } + }, + range: [57, 73], + loc: { + start: { line: 1, column: 57 }, + end: { line: 1, column: 73 } + } + }], + range: [55, 75], + loc: { + start: { line: 1, column: 55 }, + end: { line: 1, column: 75 } + } + }, + rest: null, + generator: false, + expression: false, + range: [55, 75], + loc: { + start: { line: 1, column: 55 }, + end: { line: 1, column: 75 } + } + }, + kind: 'set', + method: false, + shorthand: false, + range: [38, 75], + loc: { + start: { line: 1, column: 38 }, + end: { line: 1, column: 75 } + } + }], + range: [4, 77], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 77 } + } + }, + range: [0, 77], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 77 } + } + }, + range: [0, 77], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 77 } + } + } + + + }, + + 'Comments': { + + '/* block comment */ 42': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [20, 22], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 22 } + } + }, + range: [20, 22], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 22 } + } + }, + + '42 /*The*/ /*Answer*/': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }], + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + }, + comments: [{ + type: 'Block', + value: 'The', + range: [3, 10], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 10 } + } + }, { + type: 'Block', + value: 'Answer', + range: [11, 21], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 21 } + } + }] + }, + + '42 /*the*/ /*answer*/': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [0, 2] + }, + range: [0, 21] + }], + range: [0, 21], + comments: [{ + type: 'Block', + value: 'the', + range: [3, 10] + }, { + type: 'Block', + value: 'answer', + range: [11, 21] + }] + }, + + '42 /* the * answer */': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + + '42 /* The * answer */': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }], + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + }, + comments: [{ + type: 'Block', + value: ' The * answer ', + range: [3, 21], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 21 } + } + }] + }, + + '/* multiline\ncomment\nshould\nbe\nignored */ 42': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [42, 44], + loc: { + start: { line: 5, column: 11 }, + end: { line: 5, column: 13 } + } + }, + range: [42, 44], + loc: { + start: { line: 5, column: 11 }, + end: { line: 5, column: 13 } + } + }, + + '/*a\r\nb*/ 42': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [9, 11], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + } + }, + range: [9, 11], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + } + }], + range: [9, 11], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + }, + comments: [{ + type: 'Block', + value: 'a\r\nb', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 3 } + } + }] + }, + + '/*a\rb*/ 42': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [8, 10], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + } + }, + range: [8, 10], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + } + }], + range: [8, 10], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + }, + comments: [{ + type: 'Block', + value: 'a\rb', + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 3 } + } + }] + }, + + '/*a\nb*/ 42': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [8, 10], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + } + }, + range: [8, 10], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + } + }], + range: [8, 10], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + }, + comments: [{ + type: 'Block', + value: 'a\nb', + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 3 } + } + }] + }, + + '/*a\nc*/ 42': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + } + }, + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + } + }], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + }, + comments: [{ + type: 'Block', + value: 'a\nc', + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 3 } + } + }] + }, + + '// line comment\n42': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [16, 18], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 2 } + } + }, + range: [16, 18], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 2 } + } + }, + + '42 // line comment': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }], + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + }, + comments: [{ + type: 'Line', + value: ' line comment', + range: [3, 18], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 18 } + } + }] + }, + + '// Hello, world!\n42': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [17, 19], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 2 } + } + }, + range: [17, 19], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 2 } + } + }], + range: [17, 19], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 2 } + }, + comments: [{ + type: 'Line', + value: ' Hello, world!', + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }] + }, + + '// Hello, world!\n': { + type: 'Program', + body: [], + range: [17, 17], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 0 } + }, + comments: [{ + type: 'Line', + value: ' Hello, world!', + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }] + }, + + '// Hallo, world!\n': { + type: 'Program', + body: [], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 0 } + }, + comments: [{ + type: 'Line', + value: ' Hallo, world!', + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }] + }, + + '//\n42': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [3, 5], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 2 } + } + }, + range: [3, 5], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 2 } + } + }], + range: [3, 5], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 2 } + }, + comments: [{ + type: 'Line', + value: '', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }] + }, + + '//': { + type: 'Program', + body: [], + range: [2, 2], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 2 } + }, + comments: [{ + type: 'Line', + value: '', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }] + }, + + '// ': { + type: 'Program', + body: [], + range: [3, 3], + comments: [{ + type: 'Line', + value: ' ', + range: [0, 3] + }] + }, + + '/**/42': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [4, 6], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 6 } + } + }, + range: [4, 6], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 6 } + } + }], + range: [4, 6], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 6 } + }, + comments: [{ + type: 'Block', + value: '', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }] + }, + + '// Hello, world!\n\n// Another hello\n42': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [37, 39], + loc: { + start: { line: 4, column: 0 }, + end: { line: 4, column: 2 } + } + }, + range: [37, 39], + loc: { + start: { line: 4, column: 0 }, + end: { line: 4, column: 2 } + } + }], + range: [37, 39], + loc: { + start: { line: 4, column: 0 }, + end: { line: 4, column: 2 } + }, + comments: [{ + type: 'Line', + value: ' Hello, world!', + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, { + type: 'Line', + value: ' Another hello', + range: [18, 36], + loc: { + start: { line: 3, column: 0 }, + end: { line: 3, column: 18 } + } + }] + }, + + 'if (x) { // Some comment\ndoThat(); }': { + type: 'Program', + body: [{ + type: 'IfStatement', + test: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + consequent: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'doThat', + range: [25, 31], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 6 } + } + }, + 'arguments': [], + range: [25, 33], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 8 } + } + }, + range: [25, 34], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 9 } + } + }], + range: [7, 36], + loc: { + start: { line: 1, column: 7 }, + end: { line: 2, column: 11 } + } + }, + alternate: null, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 11 } + } + }], + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 11 } + }, + comments: [{ + type: 'Line', + value: ' Some comment', + range: [9, 24], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 24 } + } + }] + }, + + 'switch (answer) { case 42: /* perfect */ bingo() }': { + type: 'Program', + body: [{ + type: 'SwitchStatement', + discriminant: { + type: 'Identifier', + name: 'answer', + range: [8, 14], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 14 } + } + }, + cases: [{ + type: 'SwitchCase', + test: { + type: 'Literal', + value: 42, + raw: '42', + range: [23, 25], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 25 } + } + }, + consequent: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'bingo', + range: [41, 46], + loc: { + start: { line: 1, column: 41 }, + end: { line: 1, column: 46 } + } + }, + 'arguments': [], + range: [41, 48], + loc: { + start: { line: 1, column: 41 }, + end: { line: 1, column: 48 } + } + }, + range: [41, 49], + loc: { + start: { line: 1, column: 41 }, + end: { line: 1, column: 49 } + } + }], + range: [18, 49], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 49 } + } + }], + range: [0, 50], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 50 } + } + }], + range: [0, 50], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 50 } + }, + comments: [{ + type: 'Block', + value: ' perfect ', + range: [27, 40], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 40 } + } + }] + } + + }, + + 'Numeric Literals': { + + '0': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0, + raw: '0', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + + '42': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + + '3': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 3, + raw: '3', + range: [0, 1] + }, + range: [0, 1] + }], + range: [0, 1], + tokens: [{ + type: 'Numeric', + value: '3', + range: [0, 1] + }] + }, + + '5': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 5, + raw: '5', + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + }, + tokens: [{ + type: 'Numeric', + value: '5', + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }] + }, + + '.14': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0.14, + raw: '.14', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + '3.14159': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 3.14159, + raw: '3.14159', + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + '6.02214179e+23': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 6.02214179e+23, + raw: '6.02214179e+23', + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + '1.492417830e-10': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 1.49241783e-10, + raw: '1.492417830e-10', + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + + '0x0': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0, + raw: '0x0', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + '0x0;': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0, + raw: '0x0', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + + '0e+100 ': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0, + raw: '0e+100', + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + '0e+100': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0, + raw: '0e+100', + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + '0xabc': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0xabc, + raw: '0xabc', + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + '0xdef': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0xdef, + raw: '0xdef', + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + '0X1A': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0x1A, + raw: '0X1A', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + + '0x10': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0x10, + raw: '0x10', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + + '0x100': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0x100, + raw: '0x100', + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + '0X04': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0X04, + raw: '0X04', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + + '02': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 2, + raw: '02', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + + '012': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 10, + raw: '012', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + '0012': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 10, + raw: '0012', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + } + + }, + + 'String Literals': { + + '"Hello"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello', + raw: '"Hello"', + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + '"\\n\\r\\t\\v\\b\\f\\\\\\\'\\"\\0"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: '\n\r\t\x0B\b\f\\\'"\x00', + raw: '"\\n\\r\\t\\v\\b\\f\\\\\\\'\\"\\0"', + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + + '"\\u0061"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'a', + raw: '"\\u0061"', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + + '"\\x61"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'a', + raw: '"\\x61"', + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + '"\\u00"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'u00', + raw: '"\\u00"', + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + '"\\xt"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'xt', + raw: '"\\xt"', + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + '"Hello\\nworld"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello\nworld', + raw: '"Hello\\nworld"', + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + '"Hello\\\nworld"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Helloworld', + raw: '"Hello\\\nworld"', + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 14 } + } + }, + + '"Hello\\02World"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello\u0002World', + raw: '"Hello\\02World"', + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + + '"Hello\\012World"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello\u000AWorld', + raw: '"Hello\\012World"', + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + '"Hello\\122World"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello\122World', + raw: '"Hello\\122World"', + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + '"Hello\\0122World"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello\u000A2World', + raw: '"Hello\\0122World"', + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + + '"Hello\\312World"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello\u00CAWorld', + raw: '"Hello\\312World"', + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + '"Hello\\412World"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello\412World', + raw: '"Hello\\412World"', + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + '"Hello\\812World"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello812World', + raw: '"Hello\\812World"', + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + '"Hello\\712World"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello\712World', + raw: '"Hello\\712World"', + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + '"Hello\\0World"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello\u0000World', + raw: '"Hello\\0World"', + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + '"Hello\\\r\nworld"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Helloworld', + raw: '"Hello\\\r\nworld"', + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 15 } + } + }, + + '"Hello\\1World"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello\u0001World', + raw: '"Hello\\1World"', + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + } + }, + + 'Regular Expression Literals': { + + 'var x = /[a-z]/i': { + type: 'Program', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: { + type: 'Literal', + value: '/[a-z]/i', + raw: '/[a-z]/i', + range: [8, 16], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 16 } + } + }, + range: [4, 16], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 16 } + } + }], + kind: 'var', + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }], + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + }, + tokens: [{ + type: 'Keyword', + value: 'var', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, { + type: 'Identifier', + value: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, { + type: 'Punctuator', + value: '=', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, { + type: 'RegularExpression', + value: '/[a-z]/i', + range: [8, 16], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 16 } + } + }] + }, + + 'var x = /[x-z]/i': { + type: 'Program', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5] + }, + init: { + type: 'Literal', + value: '/[x-z]/i', + raw: '/[x-z]/i', + range: [8, 16] + }, + range: [4, 16] + }], + kind: 'var', + range: [0, 16] + }], + range: [0, 16], + tokens: [{ + type: 'Keyword', + value: 'var', + range: [0, 3] + }, { + type: 'Identifier', + value: 'x', + range: [4, 5] + }, { + type: 'Punctuator', + value: '=', + range: [6, 7] + }, { + type: 'RegularExpression', + value: '/[x-z]/i', + range: [8, 16] + }] + }, + + 'var x = /[a-c]/i': { + type: 'Program', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: { + type: 'Literal', + value: '/[a-c]/i', + raw: '/[a-c]/i', + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 16 } + } + }, + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 16 } + } + }], + kind: 'var', + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + }, + tokens: [{ + type: 'Keyword', + value: 'var', + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, { + type: 'Identifier', + value: 'x', + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, { + type: 'Punctuator', + value: '=', + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, { + type: 'RegularExpression', + value: '/[a-c]/i', + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 16 } + } + }] + }, + + 'var x = /[P QR]/i': { + type: 'Program', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: { + type: 'Literal', + value: '/[P QR]/i', + raw: '/[P QR]/i', + range: [8, 17], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 17 } + } + }, + range: [4, 17], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 17 } + } + }], + kind: 'var', + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }], + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + }, + tokens: [{ + type: 'Keyword', + value: 'var', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, { + type: 'Identifier', + value: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, { + type: 'Punctuator', + value: '=', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, { + type: 'RegularExpression', + value: '/[P QR]/i', + range: [8, 17], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 17 } + } + }] + }, + + 'var x = /foo\\/bar/': { + type: 'Program', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: { + type: 'Literal', + value: '/foo\\/bar/', + raw: '/foo\\/bar/', + range: [8, 18], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 18 } + } + }, + range: [4, 18], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 18 } + } + }], + kind: 'var', + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }], + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + }, + tokens: [{ + type: 'Keyword', + value: 'var', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, { + type: 'Identifier', + value: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, { + type: 'Punctuator', + value: '=', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, { + type: 'RegularExpression', + value: '/foo\\/bar/', + range: [8, 18], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 18 } + } + }] + }, + + 'var x = /=([^=\\s])+/g': { + type: 'Program', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: { + type: 'Literal', + value: '/=([^=\\s])+/g', + raw: '/=([^=\\s])+/g', + range: [8, 21], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 21 } + } + }, + range: [4, 21], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 21 } + } + }], + kind: 'var', + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }], + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + }, + tokens: [{ + type: 'Keyword', + value: 'var', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, { + type: 'Identifier', + value: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, { + type: 'Punctuator', + value: '=', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, { + type: 'RegularExpression', + value: '/=([^=\\s])+/g', + range: [8, 21], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 21 } + } + }] + }, + + 'var x = /[P QR]/\\u0067': { + type: 'Program', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: { + type: 'Literal', + value: '/[P QR]/g', + raw: '/[P QR]/\\u0067', + range: [8, 22], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 22 } + } + }, + range: [4, 22], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 22 } + } + }], + kind: 'var', + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }], + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + }, + tokens: [{ + type: 'Keyword', + value: 'var', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, { + type: 'Identifier', + value: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, { + type: 'Punctuator', + value: '=', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, { + type: 'RegularExpression', + value: '/[P QR]/\\u0067', + range: [8, 22], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 22 } + } + }] + }, + + 'var x = /[P QR]/\\g': { + type: 'Program', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: { + type: 'Literal', + value: '/[P QR]/g', + raw: '/[P QR]/\\g', + range: [8, 18], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 18 } + } + }, + range: [4, 18], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 18 } + } + }], + kind: 'var', + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }], + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + }, + tokens: [{ + type: 'Keyword', + value: 'var', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, { + type: 'Identifier', + value: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, { + type: 'Punctuator', + value: '=', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, { + type: 'RegularExpression', + value: '/[P QR]/\\g', + range: [8, 18], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 18 } + } + }] + }, + + 'var x = /42/g.test': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: { + type: 'MemberExpression', + computed: false, + object: { + type: 'Literal', + value: '/42/g', + raw: '/42/g', + range: [8, 13], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 13 } + } + }, + property: { + type: 'Identifier', + name: 'test', + range: [14, 18], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 18 } + } + }, + range: [8, 18], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 18 } + } + }, + range: [4, 18], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 18 } + } + }], + kind: 'var', + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + } + + }, + + 'Left-Hand-Side Expression': { + + 'new Button': { + type: 'ExpressionStatement', + expression: { + type: 'NewExpression', + callee: { + type: 'Identifier', + name: 'Button', + range: [4, 10], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 10 } + } + }, + 'arguments': [], + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + }, + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + }, + + 'new Button()': { + type: 'ExpressionStatement', + expression: { + type: 'NewExpression', + callee: { + type: 'Identifier', + name: 'Button', + range: [4, 10], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 10 } + } + }, + 'arguments': [], + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + + 'new new foo': { + type: 'ExpressionStatement', + expression: { + type: 'NewExpression', + callee: { + type: 'NewExpression', + callee: { + type: 'Identifier', + name: 'foo', + range: [8, 11], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 11 } + } + }, + 'arguments': [], + range: [4, 11], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 11 } + } + }, + 'arguments': [], + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + + 'new new foo()': { + type: 'ExpressionStatement', + expression: { + type: 'NewExpression', + callee: { + type: 'NewExpression', + callee: { + type: 'Identifier', + name: 'foo', + range: [8, 11], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 11 } + } + }, + 'arguments': [], + range: [4, 13], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 13 } + } + }, + 'arguments': [], + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + + 'new foo().bar()': { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'MemberExpression', + computed: false, + object: { + type: 'NewExpression', + callee: { + type: 'Identifier', + name: 'foo', + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + 'arguments': [], + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + property: { + type: 'Identifier', + name: 'bar', + range: [10, 13], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + 'arguments': [], + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + + 'new foo[bar]': { + type: 'ExpressionStatement', + expression: { + type: 'NewExpression', + callee: { + type: 'MemberExpression', + computed: true, + object: { + type: 'Identifier', + name: 'foo', + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + property: { + type: 'Identifier', + name: 'bar', + range: [8, 11], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 11 } + } + }, + range: [4, 12], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 12 } + } + }, + 'arguments': [], + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + + 'new foo.bar()': { + type: 'ExpressionStatement', + expression: { + type: 'NewExpression', + callee: { + type: 'MemberExpression', + computed: false, + object: { + type: 'Identifier', + name: 'foo', + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + property: { + type: 'Identifier', + name: 'bar', + range: [8, 11], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 11 } + } + }, + range: [4, 11], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 11 } + } + }, + 'arguments': [], + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + + '( new foo).bar()': { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'MemberExpression', + computed: false, + object: { + type: 'NewExpression', + callee: { + type: 'Identifier', + name: 'foo', + range: [6, 9], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 9 } + } + }, + 'arguments': [], + range: [2, 9], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 9 } + } + }, + property: { + type: 'Identifier', + name: 'bar', + range: [11, 14], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + 'arguments': [], + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + 'foo(bar, baz)': { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'foo', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'bar', + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, { + type: 'Identifier', + name: 'baz', + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }], + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + + '( foo )()': { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'foo', + range: [5, 8], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 8 } + } + }, + 'arguments': [], + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + + 'universe.milkyway': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: false, + object: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + property: { + type: 'Identifier', + name: 'milkyway', + range: [9, 17], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + + 'universe.milkyway.solarsystem': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: false, + object: { + type: 'MemberExpression', + computed: false, + object: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + property: { + type: 'Identifier', + name: 'milkyway', + range: [9, 17], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + property: { + type: 'Identifier', + name: 'solarsystem', + range: [18, 29], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 29 } + } + }, + range: [0, 29], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 29 } + } + }, + range: [0, 29], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 29 } + } + }, + + 'universe.milkyway.solarsystem.Earth': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: false, + object: { + type: 'MemberExpression', + computed: false, + object: { + type: 'MemberExpression', + computed: false, + object: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + property: { + type: 'Identifier', + name: 'milkyway', + range: [9, 17], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + property: { + type: 'Identifier', + name: 'solarsystem', + range: [18, 29], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 29 } + } + }, + range: [0, 29], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 29 } + } + }, + property: { + type: 'Identifier', + name: 'Earth', + range: [30, 35], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 35 } + } + }, + range: [0, 35], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 35 } + } + }, + range: [0, 35], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 35 } + } + }, + + 'universe[galaxyName, otherUselessName]': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: true, + object: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + property: { + type: 'SequenceExpression', + expressions: [{ + type: 'Identifier', + name: 'galaxyName', + range: [9, 19], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 19 } + } + }, { + type: 'Identifier', + name: 'otherUselessName', + range: [21, 37], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 37 } + } + }], + range: [9, 37], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 37 } + } + }, + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + } + }, + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + } + }, + + 'universe[galaxyName]': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: true, + object: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + property: { + type: 'Identifier', + name: 'galaxyName', + range: [9, 19], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 19 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + + 'universe[42].galaxies': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: false, + object: { + type: 'MemberExpression', + computed: true, + object: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + property: { + type: 'Literal', + value: 42, + raw: '42', + range: [9, 11], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + property: { + type: 'Identifier', + name: 'galaxies', + range: [13, 21], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + + 'universe(42).galaxies': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: false, + object: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + 'arguments': [{ + type: 'Literal', + value: 42, + raw: '42', + range: [9, 11], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 11 } + } + }], + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + property: { + type: 'Identifier', + name: 'galaxies', + range: [13, 21], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + + 'universe(42).galaxies(14, 3, 77).milkyway': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: false, + object: { + type: 'CallExpression', + callee: { + type: 'MemberExpression', + computed: false, + object: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + 'arguments': [{ + type: 'Literal', + value: 42, + raw: '42', + range: [9, 11], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 11 } + } + }], + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + property: { + type: 'Identifier', + name: 'galaxies', + range: [13, 21], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + 'arguments': [{ + type: 'Literal', + value: 14, + raw: '14', + range: [22, 24], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 24 } + } + }, { + type: 'Literal', + value: 3, + raw: '3', + range: [26, 27], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 27 } + } + }, { + type: 'Literal', + value: 77, + raw: '77', + range: [29, 31], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 31 } + } + }], + range: [0, 32], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 32 } + } + }, + property: { + type: 'Identifier', + name: 'milkyway', + range: [33, 41], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 41 } + } + }, + range: [0, 41], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 41 } + } + }, + range: [0, 41], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 41 } + } + }, + + 'earth.asia.Indonesia.prepareForElection(2014)': { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'MemberExpression', + computed: false, + object: { + type: 'MemberExpression', + computed: false, + object: { + type: 'MemberExpression', + computed: false, + object: { + type: 'Identifier', + name: 'earth', + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + property: { + type: 'Identifier', + name: 'asia', + range: [6, 10], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 10 } + } + }, + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + }, + property: { + type: 'Identifier', + name: 'Indonesia', + range: [11, 20], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 20 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + property: { + type: 'Identifier', + name: 'prepareForElection', + range: [21, 39], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 39 } + } + }, + range: [0, 39], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 39 } + } + }, + 'arguments': [{ + type: 'Literal', + value: 2014, + raw: '2014', + range: [40, 44], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 44 } + } + }], + range: [0, 45], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 45 } + } + }, + range: [0, 45], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 45 } + } + }, + + 'universe.if': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: false, + object: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + property: { + type: 'Identifier', + name: 'if', + range: [9, 11], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + + 'universe.true': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: false, + object: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + property: { + type: 'Identifier', + name: 'true', + range: [9, 13], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + + 'universe.false': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: false, + object: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + property: { + type: 'Identifier', + name: 'false', + range: [9, 14], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + 'universe.null': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: false, + object: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + property: { + type: 'Identifier', + name: 'null', + range: [9, 13], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + } + + }, + + 'Postfix Expressions': { + + 'x++': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + prefix: false, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + 'x--': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '--', + argument: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + prefix: false, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + 'eval++': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'eval', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + prefix: false, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'eval--': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '--', + argument: { + type: 'Identifier', + name: 'eval', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + prefix: false, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'arguments++': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'arguments', + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + prefix: false, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + + 'arguments--': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '--', + argument: { + type: 'Identifier', + name: 'arguments', + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + prefix: false, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + } + + }, + + 'Unary Operators': { + + '++x': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'x', + range: [2, 3], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 3 } + } + }, + prefix: true, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + '--x': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '--', + argument: { + type: 'Identifier', + name: 'x', + range: [2, 3], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 3 } + } + }, + prefix: true, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + '++eval': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'eval', + range: [2, 6], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 6 } + } + }, + prefix: true, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + '--eval': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '--', + argument: { + type: 'Identifier', + name: 'eval', + range: [2, 6], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 6 } + } + }, + prefix: true, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + '++arguments': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'arguments', + range: [2, 11], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 11 } + } + }, + prefix: true, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + + '--arguments': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '--', + argument: { + type: 'Identifier', + name: 'arguments', + range: [2, 11], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 11 } + } + }, + prefix: true, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + + '+x': { + type: 'ExpressionStatement', + expression: { + type: 'UnaryExpression', + operator: '+', + argument: { + type: 'Identifier', + name: 'x', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + + '-x': { + type: 'ExpressionStatement', + expression: { + type: 'UnaryExpression', + operator: '-', + argument: { + type: 'Identifier', + name: 'x', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + + '~x': { + type: 'ExpressionStatement', + expression: { + type: 'UnaryExpression', + operator: '~', + argument: { + type: 'Identifier', + name: 'x', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + + '!x': { + type: 'ExpressionStatement', + expression: { + type: 'UnaryExpression', + operator: '!', + argument: { + type: 'Identifier', + name: 'x', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + + 'void x': { + type: 'ExpressionStatement', + expression: { + type: 'UnaryExpression', + operator: 'void', + argument: { + type: 'Identifier', + name: 'x', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'delete x': { + type: 'ExpressionStatement', + expression: { + type: 'UnaryExpression', + operator: 'delete', + argument: { + type: 'Identifier', + name: 'x', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + + 'typeof x': { + type: 'ExpressionStatement', + expression: { + type: 'UnaryExpression', + operator: 'typeof', + argument: { + type: 'Identifier', + name: 'x', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + } + + }, + + 'Multiplicative Operators': { + + 'x * y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + 'x / y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '/', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + 'x % y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '%', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + } + + }, + + 'Additive Operators': { + + 'x + y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + 'x - y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '-', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + '"use strict" + 42': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + } + + }, + + 'Bitwise Shift Operator': { + + 'x << y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '<<', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'x >> y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '>>', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'x >>> y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '>>>', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + } + + }, + + 'Relational Operators': { + + 'x < y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '<', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + 'x > y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '>', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + 'x <= y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '<=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'x >= y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '>=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'x in y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: 'in', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'x instanceof y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: 'instanceof', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + 'x < y < z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '<', + left: { + type: 'BinaryExpression', + operator: '<', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + } + + }, + + 'Equality Operators': { + + 'x == y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '==', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'x != y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '!=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'x === y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '===', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'x !== y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '!==', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + } + + }, + + 'Binary Bitwise Operators': { + + 'x & y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '&', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + 'x ^ y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '^', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + 'x | y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '|', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + } + + }, + + 'Binary Expressions': { + + 'x + y + z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x - y + z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'BinaryExpression', + operator: '-', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x + y - z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '-', + left: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x - y - z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '-', + left: { + type: 'BinaryExpression', + operator: '-', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x + y * z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [4, 9], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x + y / z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'BinaryExpression', + operator: '/', + left: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [4, 9], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x - y % z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '-', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'BinaryExpression', + operator: '%', + left: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [4, 9], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x * y * z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x * y / z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '/', + left: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x * y % z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '%', + left: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x % y * z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'BinaryExpression', + operator: '%', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x << y << z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '<<', + left: { + type: 'BinaryExpression', + operator: '<<', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + + 'x | y | z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '|', + left: { + type: 'BinaryExpression', + operator: '|', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x & y & z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '&', + left: { + type: 'BinaryExpression', + operator: '&', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x ^ y ^ z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '^', + left: { + type: 'BinaryExpression', + operator: '^', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x & y | z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '|', + left: { + type: 'BinaryExpression', + operator: '&', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x | y ^ z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '|', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'BinaryExpression', + operator: '^', + left: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [4, 9], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x | y & z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '|', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'BinaryExpression', + operator: '&', + left: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [4, 9], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + } + + }, + + 'Binary Logical Operators': { + + 'x || y': { + type: 'ExpressionStatement', + expression: { + type: 'LogicalExpression', + operator: '||', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'x && y': { + type: 'ExpressionStatement', + expression: { + type: 'LogicalExpression', + operator: '&&', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'x || y || z': { + type: 'ExpressionStatement', + expression: { + type: 'LogicalExpression', + operator: '||', + left: { + type: 'LogicalExpression', + operator: '||', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + + 'x && y && z': { + type: 'ExpressionStatement', + expression: { + type: 'LogicalExpression', + operator: '&&', + left: { + type: 'LogicalExpression', + operator: '&&', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + + 'x || y && z': { + type: 'ExpressionStatement', + expression: { + type: 'LogicalExpression', + operator: '||', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'LogicalExpression', + operator: '&&', + left: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + range: [5, 11], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + + 'x || y ^ z': { + type: 'ExpressionStatement', + expression: { + type: 'LogicalExpression', + operator: '||', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'BinaryExpression', + operator: '^', + left: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + range: [5, 10], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 10 } + } + }, + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + }, + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + } + + }, + + 'Conditional Operator': { + + 'y ? 1 : 2': { + type: 'ExpressionStatement', + expression: { + type: 'ConditionalExpression', + test: { + type: 'Identifier', + name: 'y', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + consequent: { + type: 'Literal', + value: 1, + raw: '1', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + alternate: { + type: 'Literal', + value: 2, + raw: '2', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x && y ? 1 : 2': { + type: 'ExpressionStatement', + expression: { + type: 'ConditionalExpression', + test: { + type: 'LogicalExpression', + operator: '&&', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + consequent: { + type: 'Literal', + value: 1, + raw: '1', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + alternate: { + type: 'Literal', + value: 2, + raw: '2', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + } + + }, + + 'Assignment Operators': { + + 'x = 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [4, 6], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'eval = 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'eval', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [7, 9], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'arguments = 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'arguments', + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [12, 14], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + 'x *= 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '*=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'x /= 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '/=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'x %= 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '%=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'x += 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '+=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'x -= 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '-=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'x <<= 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '<<=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [6, 8], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + + 'x >>= 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '>>=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [6, 8], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + + 'x >>>= 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '>>>=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [7, 9], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x &= 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '&=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'x ^= 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '^=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'x |= 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '|=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + } + + }, + + 'Complex Expression': { + + 'a || b && c | d ^ e & f == g < h >>> i + j * k': { + type: 'ExpressionStatement', + expression: { + type: 'LogicalExpression', + operator: '||', + left: { + type: 'Identifier', + name: 'a', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'LogicalExpression', + operator: '&&', + left: { + type: 'Identifier', + name: 'b', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + right: { + type: 'BinaryExpression', + operator: '|', + left: { + type: 'Identifier', + name: 'c', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + right: { + type: 'BinaryExpression', + operator: '^', + left: { + type: 'Identifier', + name: 'd', + range: [14, 15], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 15 } + } + }, + right: { + type: 'BinaryExpression', + operator: '&', + left: { + type: 'Identifier', + name: 'e', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }, + right: { + type: 'BinaryExpression', + operator: '==', + left: { + type: 'Identifier', + name: 'f', + range: [22, 23], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 23 } + } + }, + right: { + type: 'BinaryExpression', + operator: '<', + left: { + type: 'Identifier', + name: 'g', + range: [27, 28], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 28 } + } + }, + right: { + type: 'BinaryExpression', + operator: '>>>', + left: { + type: 'Identifier', + name: 'h', + range: [31, 32], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 32 } + } + }, + right: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'Identifier', + name: 'i', + range: [37, 38], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 38 } + } + }, + right: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'Identifier', + name: 'j', + range: [41, 42], + loc: { + start: { line: 1, column: 41 }, + end: { line: 1, column: 42 } + } + }, + right: { + type: 'Identifier', + name: 'k', + range: [45, 46], + loc: { + start: { line: 1, column: 45 }, + end: { line: 1, column: 46 } + } + }, + range: [41, 46], + loc: { + start: { line: 1, column: 41 }, + end: { line: 1, column: 46 } + } + }, + range: [37, 46], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 46 } + } + }, + range: [31, 46], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 46 } + } + }, + range: [27, 46], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 46 } + } + }, + range: [22, 46], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 46 } + } + }, + range: [18, 46], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 46 } + } + }, + range: [14, 46], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 46 } + } + }, + range: [10, 46], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 46 } + } + }, + range: [5, 46], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 46 } + } + }, + range: [0, 46], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 46 } + } + }, + range: [0, 46], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 46 } + } + } + + }, + + 'Block': { + + '{ foo }': { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'foo', + range: [2, 5], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 5 } + } + }, + range: [2, 6], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 6 } + } + }], + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + '{ doThis(); doThat(); }': { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'doThis', + range: [2, 8], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 8 } + } + }, + 'arguments': [], + range: [2, 10], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 10 } + } + }, + range: [2, 11], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 11 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'doThat', + range: [12, 18], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 18 } + } + }, + 'arguments': [], + range: [12, 20], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 20 } + } + }, + range: [12, 21], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 21 } + } + }], + range: [0, 23], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 23 } + } + }, + + '{}': { + type: 'BlockStatement', + body: [], + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + } + + }, + + 'Variable Statement': { + + 'var x': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: null, + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }], + kind: 'var', + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + 'var x, y;': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: null, + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'y', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + init: null, + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }], + kind: 'var', + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'var x = 42': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: { + type: 'Literal', + value: 42, + raw: '42', + range: [8, 10], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 10 } + } + }, + range: [4, 10], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 10 } + } + }], + kind: 'var', + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + }, + + 'var eval = 42, arguments = 42': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'eval', + range: [4, 8], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 8 } + } + }, + init: { + type: 'Literal', + value: 42, + raw: '42', + range: [11, 13], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 13 } + } + }, + range: [4, 13], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 13 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'arguments', + range: [15, 24], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 24 } + } + }, + init: { + type: 'Literal', + value: 42, + raw: '42', + range: [27, 29], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 29 } + } + }, + range: [15, 29], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 29 } + } + }], + kind: 'var', + range: [0, 29], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 29 } + } + }, + + 'var x = 14, y = 3, z = 1977': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: { + type: 'Literal', + value: 14, + raw: '14', + range: [8, 10], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 10 } + } + }, + range: [4, 10], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 10 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'y', + range: [12, 13], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 13 } + } + }, + init: { + type: 'Literal', + value: 3, + raw: '3', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }, + range: [12, 17], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 17 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'z', + range: [19, 20], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 20 } + } + }, + init: { + type: 'Literal', + value: 1977, + raw: '1977', + range: [23, 27], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 27 } + } + }, + range: [19, 27], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 27 } + } + }], + kind: 'var', + range: [0, 27], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + }, + + 'var implements, interface, package': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'implements', + range: [4, 14], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 14 } + } + }, + init: null, + range: [4, 14], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 14 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'interface', + range: [16, 25], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 25 } + } + }, + init: null, + range: [16, 25], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 25 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'package', + range: [27, 34], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 34 } + } + }, + init: null, + range: [27, 34], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 34 } + } + }], + kind: 'var', + range: [0, 34], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 34 } + } + }, + + 'var private, protected, public, static': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'private', + range: [4, 11], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 11 } + } + }, + init: null, + range: [4, 11], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 11 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'protected', + range: [13, 22], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 22 } + } + }, + init: null, + range: [13, 22], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 22 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'public', + range: [24, 30], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 30 } + } + }, + init: null, + range: [24, 30], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 30 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'static', + range: [32, 38], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 38 } + } + }, + init: null, + range: [32, 38], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 38 } + } + }], + kind: 'var', + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + } + } + + }, + + 'Let Statement': { + + 'let x': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: null, + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }], + kind: 'let', + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + '{ let x }': { + type: 'BlockStatement', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + init: null, + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }], + kind: 'let', + range: [2, 8], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 8 } + } + }], + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + '{ let x = 42 }': { + type: 'BlockStatement', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + init: { + type: 'Literal', + value: 42, + raw: '42', + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + range: [6, 12], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 12 } + } + }], + kind: 'let', + range: [2, 13], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 13 } + } + }], + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + '{ let x = 14, y = 3, z = 1977 }': { + type: 'BlockStatement', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + init: { + type: 'Literal', + value: 14, + raw: '14', + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + range: [6, 12], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 12 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'y', + range: [14, 15], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 15 } + } + }, + init: { + type: 'Literal', + value: 3, + raw: '3', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }, + range: [14, 19], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 19 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'z', + range: [21, 22], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 22 } + } + }, + init: { + type: 'Literal', + value: 1977, + raw: '1977', + range: [25, 29], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 29 } + } + }, + range: [21, 29], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 29 } + } + }], + kind: 'let', + range: [2, 30], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 30 } + } + }], + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + } + } + + }, + + 'Const Statement': { + + 'const x = 42': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + init: { + type: 'Literal', + value: 42, + raw: '42', + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + range: [6, 12], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 12 } + } + }], + kind: 'const', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + + '{ const x = 42 }': { + type: 'BlockStatement', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + init: { + type: 'Literal', + value: 42, + raw: '42', + range: [12, 14], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 14 } + } + }, + range: [8, 14], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 14 } + } + }], + kind: 'const', + range: [2, 15], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 15 } + } + }], + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + '{ const x = 14, y = 3, z = 1977 }': { + type: 'BlockStatement', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + init: { + type: 'Literal', + value: 14, + raw: '14', + range: [12, 14], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 14 } + } + }, + range: [8, 14], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 14 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'y', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }, + init: { + type: 'Literal', + value: 3, + raw: '3', + range: [20, 21], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 21 } + } + }, + range: [16, 21], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 21 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'z', + range: [23, 24], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 24 } + } + }, + init: { + type: 'Literal', + value: 1977, + raw: '1977', + range: [27, 31], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 31 } + } + }, + range: [23, 31], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 31 } + } + }], + kind: 'const', + range: [2, 32], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 32 } + } + }], + range: [0, 33], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 33 } + } + } + + }, + + 'Empty Statement': { + + ';': { + type: 'EmptyStatement', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + } + + }, + + 'Expression Statement': { + + 'x': { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + + 'x, y': { + type: 'ExpressionStatement', + expression: { + type: 'SequenceExpression', + expressions: [{ + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, { + type: 'Identifier', + name: 'y', + range: [3, 4], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 4 } + } + }], + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + + '\\u0061': { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'a', + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'a\\u0061': { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'aa', + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + '\\u0061a': { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'aa', + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + '\\u0061a ': { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'aa', + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + } + }, + + 'If Statement': { + + 'if (morning) goodMorning()': { + type: 'IfStatement', + test: { + type: 'Identifier', + name: 'morning', + range: [4, 11], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 11 } + } + }, + consequent: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'goodMorning', + range: [13, 24], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 24 } + } + }, + 'arguments': [], + range: [13, 26], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 26 } + } + }, + range: [13, 26], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 26 } + } + }, + alternate: null, + range: [0, 26], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 26 } + } + }, + + 'if (morning) (function(){})': { + type: 'IfStatement', + test: { + type: 'Identifier', + name: 'morning', + range: [4, 11], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 11 } + } + }, + consequent: { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [24, 26], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 26 } + } + }, + rest: null, + generator: false, + expression: false, + range: [14, 26], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 26 } + } + }, + range: [13, 27], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 27 } + } + }, + alternate: null, + range: [0, 27], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + }, + + 'if (morning) var x = 0;': { + type: 'IfStatement', + test: { + type: 'Identifier', + name: 'morning', + range: [4, 11], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 11 } + } + }, + consequent: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [17, 18], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 18 } + } + }, + init: { + type: 'Literal', + value: 0, + raw: '0', + range: [21, 22], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 22 } + } + }, + range: [17, 22], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 22 } + } + }], + kind: 'var', + range: [13, 23], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 23 } + } + }, + alternate: null, + range: [0, 23], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 23 } + } + }, + + 'if (morning) function a(){}': { + type: 'IfStatement', + test: { + type: 'Identifier', + name: 'morning', + range: [4, 11], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 11 } + } + }, + consequent: { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'a', + range: [22, 23], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 23 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [25, 27], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 27 } + } + }, + rest: null, + generator: false, + expression: false, + range: [13, 27], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 27 } + } + }, + alternate: null, + range: [0, 27], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + }, + + 'if (morning) goodMorning(); else goodDay()': { + type: 'IfStatement', + test: { + type: 'Identifier', + name: 'morning', + range: [4, 11], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 11 } + } + }, + consequent: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'goodMorning', + range: [13, 24], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 24 } + } + }, + 'arguments': [], + range: [13, 26], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 26 } + } + }, + range: [13, 27], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 27 } + } + }, + alternate: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'goodDay', + range: [33, 40], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 40 } + } + }, + 'arguments': [], + range: [33, 42], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 42 } + } + }, + range: [33, 42], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 42 } + } + }, + range: [0, 42], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 42 } + } + } + + }, + + 'Iteration Statements': { + + 'do keep(); while (true)': { + type: 'DoWhileStatement', + body: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'keep', + range: [3, 7], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 7 } + } + }, + 'arguments': [], + range: [3, 9], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 9 } + } + }, + range: [3, 10], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 10 } + } + }, + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [18, 22], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 23], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 23 } + } + }, + + 'do keep(); while (true);': { + type: 'DoWhileStatement', + body: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'keep', + range: [3, 7], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 7 } + } + }, + 'arguments': [], + range: [3, 9], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 9 } + } + }, + range: [3, 10], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 10 } + } + }, + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [18, 22], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + + 'do { x++; y--; } while (x < 10)': { + type: 'DoWhileStatement', + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'x', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + prefix: false, + range: [5, 8], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 8 } + } + }, + range: [5, 9], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 9 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '--', + argument: { + type: 'Identifier', + name: 'y', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + prefix: false, + range: [10, 13], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 13 } + } + }, + range: [10, 14], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 14 } + } + }], + range: [3, 16], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 16 } + } + }, + test: { + type: 'BinaryExpression', + operator: '<', + left: { + type: 'Identifier', + name: 'x', + range: [24, 25], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 25 } + } + }, + right: { + type: 'Literal', + value: 10, + raw: '10', + range: [28, 30], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 30 } + } + }, + range: [24, 30], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 30 } + } + }, + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + } + }, + + '{ do { } while (false) false }': { + type: 'BlockStatement', + body: [{ + type: 'DoWhileStatement', + body: { + type: 'BlockStatement', + body: [], + range: [5, 8], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 8 } + } + }, + test: { + type: 'Literal', + value: false, + raw: 'false', + range: [16, 21], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 21 } + } + }, + range: [2, 22], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 22 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: false, + raw: 'false', + range: [23, 28], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 28 } + } + }, + range: [23, 29], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 29 } + } + }], + range: [0, 30], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 30 } + } + }, + + 'while (true) doSomething()': { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [7, 11], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 11 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'doSomething', + range: [13, 24], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 24 } + } + }, + 'arguments': [], + range: [13, 26], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 26 } + } + }, + range: [13, 26], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 26 } + } + }, + range: [0, 26], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 26 } + } + }, + + 'while (x < 10) { x++; y--; }': { + type: 'WhileStatement', + test: { + type: 'BinaryExpression', + operator: '<', + left: { + type: 'Identifier', + name: 'x', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + right: { + type: 'Literal', + value: 10, + raw: '10', + range: [11, 13], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 13 } + } + }, + range: [7, 13], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 13 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'x', + range: [17, 18], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 18 } + } + }, + prefix: false, + range: [17, 20], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 20 } + } + }, + range: [17, 21], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 21 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '--', + argument: { + type: 'Identifier', + name: 'y', + range: [22, 23], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 23 } + } + }, + prefix: false, + range: [22, 25], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 25 } + } + }, + range: [22, 26], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 26 } + } + }], + range: [15, 28], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 28 } + } + }, + range: [0, 28], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 28 } + } + }, + + 'for(;;);': { + type: 'ForStatement', + init: null, + test: null, + update: null, + body: { + type: 'EmptyStatement', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + + 'for(;;){}': { + type: 'ForStatement', + init: null, + test: null, + update: null, + body: { + type: 'BlockStatement', + body: [], + range: [7, 9], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'for(x = 0;;);': { + type: 'ForStatement', + init: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Literal', + value: 0, + raw: '0', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [4, 9], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 9 } + } + }, + test: null, + update: null, + body: { + type: 'EmptyStatement', + range: [12, 13], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + + 'for(var x = 0;;);': { + type: 'ForStatement', + init: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + init: { + type: 'Literal', + value: 0, + raw: '0', + range: [12, 13], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 13 } + } + }, + range: [8, 13], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 13 } + } + }], + kind: 'var', + range: [4, 13], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 13 } + } + }, + test: null, + update: null, + body: { + type: 'EmptyStatement', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + + 'for(let x = 0;;);': { + type: 'ForStatement', + init: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + init: { + type: 'Literal', + value: 0, + raw: '0', + range: [12, 13], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 13 } + } + }, + range: [8, 13], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 13 } + } + }], + kind: 'let', + range: [4, 13], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 13 } + } + }, + test: null, + update: null, + body: { + type: 'EmptyStatement', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + + 'for(var x = 0, y = 1;;);': { + type: 'ForStatement', + init: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + init: { + type: 'Literal', + value: 0, + raw: '0', + range: [12, 13], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 13 } + } + }, + range: [8, 13], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 13 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'y', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }, + init: { + type: 'Literal', + value: 1, + raw: '1', + range: [19, 20], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 20 } + } + }, + range: [15, 20], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 20 } + } + }], + kind: 'var', + range: [4, 20], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 20 } + } + }, + test: null, + update: null, + body: { + type: 'EmptyStatement', + range: [23, 24], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 24 } + } + }, + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + + 'for(x = 0; x < 42;);': { + type: 'ForStatement', + init: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Literal', + value: 0, + raw: '0', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [4, 9], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 9 } + } + }, + test: { + type: 'BinaryExpression', + operator: '<', + left: { + type: 'Identifier', + name: 'x', + range: [11, 12], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 12 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + range: [11, 17], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 17 } + } + }, + update: null, + body: { + type: 'EmptyStatement', + range: [19, 20], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 20 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + + 'for(x = 0; x < 42; x++);': { + type: 'ForStatement', + init: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Literal', + value: 0, + raw: '0', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [4, 9], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 9 } + } + }, + test: { + type: 'BinaryExpression', + operator: '<', + left: { + type: 'Identifier', + name: 'x', + range: [11, 12], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 12 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + range: [11, 17], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 17 } + } + }, + update: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'x', + range: [19, 20], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 20 } + } + }, + prefix: false, + range: [19, 22], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 22 } + } + }, + body: { + type: 'EmptyStatement', + range: [23, 24], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 24 } + } + }, + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + + 'for(x = 0; x < 42; x++) process(x);': { + type: 'ForStatement', + init: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Literal', + value: 0, + raw: '0', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [4, 9], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 9 } + } + }, + test: { + type: 'BinaryExpression', + operator: '<', + left: { + type: 'Identifier', + name: 'x', + range: [11, 12], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 12 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + range: [11, 17], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 17 } + } + }, + update: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'x', + range: [19, 20], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 20 } + } + }, + prefix: false, + range: [19, 22], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 22 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'process', + range: [24, 31], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 31 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'x', + range: [32, 33], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 33 } + } + }], + range: [24, 34], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 34 } + } + }, + range: [24, 35], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 35 } + } + }, + range: [0, 35], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 35 } + } + }, + + 'for(x in list) process(x);': { + type: 'ForInStatement', + left: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'list', + range: [9, 13], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 13 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'process', + range: [15, 22], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 22 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'x', + range: [23, 24], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 24 } + } + }], + range: [15, 25], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 25 } + } + }, + range: [15, 26], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 26 } + } + }, + each: false, + range: [0, 26], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 26 } + } + }, + + 'for (var x in list) process(x);': { + type: 'ForInStatement', + left: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + init: null, + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }], + kind: 'var', + range: [5, 10], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 10 } + } + }, + right: { + type: 'Identifier', + name: 'list', + range: [14, 18], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 18 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'process', + range: [20, 27], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 27 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'x', + range: [28, 29], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 29 } + } + }], + range: [20, 30], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 30 } + } + }, + range: [20, 31], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 31 } + } + }, + each: false, + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + } + }, + + 'for (let x in list) process(x);': { + type: 'ForInStatement', + left: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + init: null, + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }], + kind: 'let', + range: [5, 10], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 10 } + } + }, + right: { + type: 'Identifier', + name: 'list', + range: [14, 18], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 18 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'process', + range: [20, 27], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 27 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'x', + range: [28, 29], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 29 } + } + }], + range: [20, 30], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 30 } + } + }, + range: [20, 31], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 31 } + } + }, + each: false, + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + } + }, + + 'for (var i = function() { return 10 in [] } of list) process(x);': { + type: 'ForOfStatement', + left: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'i', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + init: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ReturnStatement', + argument: { + type: 'BinaryExpression', + operator: 'in', + left: { + type: 'Literal', + value: 10, + raw: '10', + range: [33, 35], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 35 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [39, 41], + loc: { + start: { line: 1, column: 39 }, + end: { line: 1, column: 41 } + } + }, + range: [33, 41], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 41 } + } + }, + range: [26, 42], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 42 } + } + }], + range: [24, 43], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 43 } + } + }, + rest: null, + generator: false, + expression: false, + range: [13, 43], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 43 } + } + }, + range: [9, 43], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 43 } + } + }], + kind: 'var', + range: [5, 43], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 43 } + } + }, + right: { + type: 'Identifier', + name: 'list', + range: [47, 51], + loc: { + start: { line: 1, column: 47 }, + end: { line: 1, column: 51 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'process', + range: [53, 60], + loc: { + start: { line: 1, column: 53 }, + end: { line: 1, column: 60 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'x', + range: [61, 62], + loc: { + start: { line: 1, column: 61 }, + end: { line: 1, column: 62 } + } + }], + range: [53, 63], + loc: { + start: { line: 1, column: 53 }, + end: { line: 1, column: 63 } + } + }, + range: [53, 64], + loc: { + start: { line: 1, column: 53 }, + end: { line: 1, column: 64 } + } + }, + range: [0, 64], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 64 } + } + } + + }, + + 'continue statement': { + + 'while (true) { continue; }': { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [7, 11], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 11 } + } + }, + body: { + type: 'BlockStatement', + body: [ + { + type: 'ContinueStatement', + label: null, + range: [15, 24], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 24 } + } + } + ], + range: [13, 26], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 26 } + } + }, + range: [0, 26], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 26 } + } + }, + + 'while (true) { continue }': { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [7, 11], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 11 } + } + }, + body: { + type: 'BlockStatement', + body: [ + { + type: 'ContinueStatement', + label: null, + range: [15, 24], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 24 } + } + } + ], + range: [13, 25], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 25 } + } + }, + range: [0, 25], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 25 } + } + }, + + 'done: while (true) { continue done }': { + type: 'LabeledStatement', + label: { + type: 'Identifier', + name: 'done', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + body: { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [13, 17], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 17 } + } + }, + body: { + type: 'BlockStatement', + body: [ + { + type: 'ContinueStatement', + label: { + type: 'Identifier', + name: 'done', + range: [30, 34], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 34 } + } + }, + range: [21, 35], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 35 } + } + } + ], + range: [19, 36], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 36 } + } + }, + range: [6, 36], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 36 } + } + }, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + } + }, + + 'done: while (true) { continue done; }': { + type: 'LabeledStatement', + label: { + type: 'Identifier', + name: 'done', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + body: { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [13, 17], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 17 } + } + }, + body: { + type: 'BlockStatement', + body: [ + { + type: 'ContinueStatement', + label: { + type: 'Identifier', + name: 'done', + range: [30, 34], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 34 } + } + }, + range: [21, 35], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 35 } + } + } + ], + range: [19, 37], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 37 } + } + }, + range: [6, 37], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 37 } + } + }, + range: [0, 37], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 37 } + } + }, + + '__proto__: while (true) { continue __proto__; }': { + type: 'LabeledStatement', + label: { + type: 'Identifier', + name: '__proto__', + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + body: { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [18, 22], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 22 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'ContinueStatement', + label: { + type: 'Identifier', + name: '__proto__', + range: [35, 44], + loc: { + start: { line: 1, column: 35 }, + end: { line: 1, column: 44 } + } + }, + range: [26, 45], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 45 } + } + }], + range: [24, 47], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 47 } + } + }, + range: [11, 47], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 47 } + } + }, + range: [0, 47], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 47 } + } + } + + }, + + 'break statement': { + + 'while (true) { break }': { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [7, 11], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 11 } + } + }, + body: { + type: 'BlockStatement', + body: [ + { + type: 'BreakStatement', + label: null, + range: [15, 21], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 21 } + } + } + ], + range: [13, 22], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + + 'done: while (true) { break done }': { + type: 'LabeledStatement', + label: { + type: 'Identifier', + name: 'done', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + body: { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [13, 17], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 17 } + } + }, + body: { + type: 'BlockStatement', + body: [ + { + type: 'BreakStatement', + label: { + type: 'Identifier', + name: 'done', + range: [27, 31], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 31 } + } + }, + range: [21, 32], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 32 } + } + } + ], + range: [19, 33], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 33 } + } + }, + range: [6, 33], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 33 } + } + }, + range: [0, 33], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 33 } + } + }, + + 'done: while (true) { break done; }': { + type: 'LabeledStatement', + label: { + type: 'Identifier', + name: 'done', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + body: { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [13, 17], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 17 } + } + }, + body: { + type: 'BlockStatement', + body: [ + { + type: 'BreakStatement', + label: { + type: 'Identifier', + name: 'done', + range: [27, 31], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 31 } + } + }, + range: [21, 32], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 32 } + } + } + ], + range: [19, 34], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 34 } + } + }, + range: [6, 34], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 34 } + } + }, + range: [0, 34], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 34 } + } + }, + + '__proto__: while (true) { break __proto__; }': { + type: 'LabeledStatement', + label: { + type: 'Identifier', + name: '__proto__', + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + body: { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [18, 22], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 22 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'BreakStatement', + label: { + type: 'Identifier', + name: '__proto__', + range: [32, 41], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 41 } + } + }, + range: [26, 42], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 42 } + } + }], + range: [24, 44], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 44 } + } + }, + range: [11, 44], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 44 } + } + }, + range: [0, 44], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 44 } + } + } + + }, + + 'return statement': { + + '(function(){ return })': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [ + { + type: 'ReturnStatement', + argument: null, + range: [13, 20], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 20 } + } + } + ], + range: [11, 21], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 21 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 21], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + + '(function(){ return; })': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [ + { + type: 'ReturnStatement', + argument: null, + range: [13, 20], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 20 } + } + } + ], + range: [11, 22], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 22 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 22], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 23], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 23 } + } + }, + + '(function(){ return x; })': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [ + { + type: 'ReturnStatement', + argument: { + type: 'Identifier', + name: 'x', + range: [20, 21], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 21 } + } + }, + range: [13, 22], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 22 } + } + } + ], + range: [11, 24], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 24 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 24], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 24 } + } + }, + range: [0, 25], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 25 } + } + }, + + '(function(){ return x * y })': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [ + { + type: 'ReturnStatement', + argument: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'Identifier', + name: 'x', + range: [20, 21], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 21 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [24, 25], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 25 } + } + }, + range: [20, 25], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 25 } + } + }, + range: [13, 26], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 26 } + } + } + ], + range: [11, 27], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 27 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 27], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 27 } + } + }, + range: [0, 28], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 28 } + } + } + }, + + 'with statement': { + + 'with (x) foo = bar': { + type: 'WithStatement', + object: { + type: 'Identifier', + name: 'x', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'foo', + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + right: { + type: 'Identifier', + name: 'bar', + range: [15, 18], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 18 } + } + }, + range: [9, 18], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 18 } + } + }, + range: [9, 18], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 18 } + } + }, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + + 'with (x) foo = bar;': { + type: 'WithStatement', + object: { + type: 'Identifier', + name: 'x', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'foo', + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + right: { + type: 'Identifier', + name: 'bar', + range: [15, 18], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 18 } + } + }, + range: [9, 18], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 18 } + } + }, + range: [9, 19], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 19 } + } + }, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + + 'with (x) { foo = bar }': { + type: 'WithStatement', + object: { + type: 'Identifier', + name: 'x', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'foo', + range: [11, 14], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 14 } + } + }, + right: { + type: 'Identifier', + name: 'bar', + range: [17, 20], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 20 } + } + }, + range: [11, 20], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 20 } + } + }, + range: [11, 21], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 21 } + } + }], + range: [9, 22], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + } + + }, + + 'switch statement': { + + 'switch (x) {}': { + type: 'SwitchStatement', + discriminant: { + type: 'Identifier', + name: 'x', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + cases:[], + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + + 'switch (answer) { case 42: hi(); break; }': { + type: 'SwitchStatement', + discriminant: { + type: 'Identifier', + name: 'answer', + range: [8, 14], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 14 } + } + }, + cases: [{ + type: 'SwitchCase', + test: { + type: 'Literal', + value: 42, + raw: '42', + range: [23, 25], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 25 } + } + }, + consequent: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'hi', + range: [27, 29], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 29 } + } + }, + 'arguments': [], + range: [27, 31], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 31 } + } + }, + range: [27, 32], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 32 } + } + }, { + type: 'BreakStatement', + label: null, + range: [33, 39], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 39 } + } + }], + range: [18, 39], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 39 } + } + }], + range: [0, 41], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 41 } + } + }, + + 'switch (answer) { case 42: hi(); break; default: break }': { + type: 'SwitchStatement', + discriminant: { + type: 'Identifier', + name: 'answer', + range: [8, 14], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 14 } + } + }, + cases: [{ + type: 'SwitchCase', + test: { + type: 'Literal', + value: 42, + raw: '42', + range: [23, 25], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 25 } + } + }, + consequent: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'hi', + range: [27, 29], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 29 } + } + }, + 'arguments': [], + range: [27, 31], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 31 } + } + }, + range: [27, 32], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 32 } + } + }, { + type: 'BreakStatement', + label: null, + range: [33, 39], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 39 } + } + }], + range: [18, 39], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 39 } + } + }, { + type: 'SwitchCase', + test: null, + consequent: [{ + type: 'BreakStatement', + label: null, + range: [49, 55], + loc: { + start: { line: 1, column: 49 }, + end: { line: 1, column: 55 } + } + }], + range: [40, 55], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 55 } + } + }], + range: [0, 56], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 56 } + } + } + + }, + + 'Labelled Statements': { + + 'start: for (;;) break start': { + type: 'LabeledStatement', + label: { + type: 'Identifier', + name: 'start', + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + body: { + type: 'ForStatement', + init: null, + test: null, + update: null, + body: { + type: 'BreakStatement', + label: { + type: 'Identifier', + name: 'start', + range: [22, 27], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 27 } + } + }, + range: [16, 27], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 27 } + } + }, + range: [7, 27], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 27 } + } + }, + range: [0, 27], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + }, + + 'start: while (true) break start': { + type: 'LabeledStatement', + label: { + type: 'Identifier', + name: 'start', + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + body: { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [14, 18], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 18 } + } + }, + body: { + type: 'BreakStatement', + label: { + type: 'Identifier', + name: 'start', + range: [26, 31], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 31 } + } + }, + range: [20, 31], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 31 } + } + }, + range: [7, 31], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 31 } + } + }, + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + } + }, + + '__proto__: test': { + type: 'LabeledStatement', + label: { + type: 'Identifier', + name: '__proto__', + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'test', + range: [11, 15], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 15 } + } + }, + range: [11, 15], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + } + + }, + + 'throw statement': { + + 'throw x;': { + type: 'ThrowStatement', + argument: { + type: 'Identifier', + name: 'x', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + + 'throw x * y': { + type: 'ThrowStatement', + argument: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'Identifier', + name: 'x', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + range: [6, 11], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + + 'throw { message: "Error" }': { + type: 'ThrowStatement', + argument: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'message', + range: [8, 15], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 15 } + } + }, + value: { + type: 'Literal', + value: 'Error', + raw: '"Error"', + range: [17, 24], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 24 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [8, 24], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 24 } + } + }], + range: [6, 26], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 26 } + } + }, + range: [0, 26], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 26 } + } + } + + }, + + 'try statement': { + + 'try { } catch (e) { }': { + type: 'TryStatement', + block: { + type: 'BlockStatement', + body: [], + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + guardedHandlers: [], + handlers: [{ + type: 'CatchClause', + param: { + type: 'Identifier', + name: 'e', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }, + body: { + type: 'BlockStatement', + body: [], + range: [18, 21], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 21 } + } + }, + range: [8, 21], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 21 } + } + }], + finalizer: null, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + + 'try { } catch (eval) { }': { + type: 'TryStatement', + block: { + type: 'BlockStatement', + body: [], + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + guardedHandlers: [], + handlers: [{ + type: 'CatchClause', + param: { + type: 'Identifier', + name: 'eval', + range: [15, 19], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 19 } + } + }, + body: { + type: 'BlockStatement', + body: [], + range: [21, 24], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 24 } + } + }, + range: [8, 24], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 24 } + } + }], + finalizer: null, + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + + 'try { } catch (arguments) { }': { + type: 'TryStatement', + block: { + type: 'BlockStatement', + body: [], + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + guardedHandlers: [], + handlers: [{ + type: 'CatchClause', + param: { + type: 'Identifier', + name: 'arguments', + range: [15, 24], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 24 } + } + }, + body: { + type: 'BlockStatement', + body: [], + range: [26, 29], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 29 } + } + }, + range: [8, 29], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 29 } + } + }], + finalizer: null, + range: [0, 29], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 29 } + } + }, + + 'try { } catch (e) { say(e) }': { + type: 'TryStatement', + block: { + type: 'BlockStatement', + body: [], + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + guardedHandlers: [], + handlers: [{ + type: 'CatchClause', + param: { + type: 'Identifier', + name: 'e', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'say', + range: [20, 23], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 23 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'e', + range: [24, 25], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 25 } + } + }], + range: [20, 26], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 26 } + } + }, + range: [20, 27], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 27 } + } + }], + range: [18, 28], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 28 } + } + }, + range: [8, 28], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 28 } + } + }], + finalizer: null, + range: [0, 28], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 28 } + } + }, + + 'try { } finally { cleanup(stuff) }': { + type: 'TryStatement', + block: { + type: 'BlockStatement', + body: [], + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + guardedHandlers: [], + handlers: [], + finalizer: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'cleanup', + range: [18, 25], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 25 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'stuff', + range: [26, 31], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 31 } + } + }], + range: [18, 32], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 32 } + } + }, + range: [18, 33], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 33 } + } + }], + range: [16, 34], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 34 } + } + }, + range: [0, 34], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 34 } + } + }, + + 'try { doThat(); } catch (e) { say(e) }': { + type: 'TryStatement', + block: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'doThat', + range: [6, 12], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 12 } + } + }, + 'arguments': [], + range: [6, 14], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 14 } + } + }, + range: [6, 15], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 15 } + } + }], + range: [4, 17], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 17 } + } + }, + guardedHandlers: [], + handlers: [{ + type: 'CatchClause', + param: { + type: 'Identifier', + name: 'e', + range: [25, 26], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 26 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'say', + range: [30, 33], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 33 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'e', + range: [34, 35], + loc: { + start: { line: 1, column: 34 }, + end: { line: 1, column: 35 } + } + }], + range: [30, 36], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 36 } + } + }, + range: [30, 37], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 37 } + } + }], + range: [28, 38], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 38 } + } + }, + range: [18, 38], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 38 } + } + }], + finalizer: null, + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + } + }, + + 'try { doThat(); } catch (e) { say(e) } finally { cleanup(stuff) }': { + type: 'TryStatement', + block: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'doThat', + range: [6, 12], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 12 } + } + }, + 'arguments': [], + range: [6, 14], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 14 } + } + }, + range: [6, 15], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 15 } + } + }], + range: [4, 17], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 17 } + } + }, + guardedHandlers: [], + handlers: [{ + type: 'CatchClause', + param: { + type: 'Identifier', + name: 'e', + range: [25, 26], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 26 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'say', + range: [30, 33], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 33 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'e', + range: [34, 35], + loc: { + start: { line: 1, column: 34 }, + end: { line: 1, column: 35 } + } + }], + range: [30, 36], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 36 } + } + }, + range: [30, 37], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 37 } + } + }], + range: [28, 38], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 38 } + } + }, + range: [18, 38], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 38 } + } + }], + finalizer: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'cleanup', + range: [49, 56], + loc: { + start: { line: 1, column: 49 }, + end: { line: 1, column: 56 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'stuff', + range: [57, 62], + loc: { + start: { line: 1, column: 57 }, + end: { line: 1, column: 62 } + } + }], + range: [49, 63], + loc: { + start: { line: 1, column: 49 }, + end: { line: 1, column: 63 } + } + }, + range: [49, 64], + loc: { + start: { line: 1, column: 49 }, + end: { line: 1, column: 64 } + } + }], + range: [47, 65], + loc: { + start: { line: 1, column: 47 }, + end: { line: 1, column: 65 } + } + }, + range: [0, 65], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 65 } + } + } + + }, + + 'debugger statement': { + + 'debugger;': { + type: 'DebuggerStatement', + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + } + + }, + + 'Function Definition': { + + 'function hello() { sayHi(); }': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'hello', + range: [9, 14], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 14 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'sayHi', + range: [19, 24], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 24 } + } + }, + 'arguments': [], + range: [19, 26], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 26 } + } + }, + range: [19, 27], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 27 } + } + }], + range: [17, 29], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 29 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 29], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 29 } + } + }, + + 'function eval() { }': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'eval', + range: [9, 13], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 13 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [16, 19], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 19 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + + 'function arguments() { }': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'arguments', + range: [9, 18], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 18 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [21, 24], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 24 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + + 'function test(t, t) { }': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'test', + range: [9, 13], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 13 } + } + }, + params: [{ + type: 'Identifier', + name: 't', + range: [14, 15], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 15 } + } + }, { + type: 'Identifier', + name: 't', + range: [17, 18], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 18 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [20, 23], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 23 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 23], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 23 } + } + }, + + '(function test(t, t) { })': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'test', + range: [10, 14], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 14 } + } + }, + params: [{ + type: 'Identifier', + name: 't', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }, { + type: 'Identifier', + name: 't', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [21, 24], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 24 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 24], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 24 } + } + }, + range: [0, 25], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 25 } + } + }, + + 'function eval() { function inner() { "use strict" } }': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'eval', + range: [9, 13], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 13 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'inner', + range: [27, 32], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 32 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '\"use strict\"', + range: [37, 49], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 49 } + } + }, + range: [37, 50], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 50 } + } + }], + range: [35, 51], + loc: { + start: { line: 1, column: 35 }, + end: { line: 1, column: 51 } + } + }, + rest: null, + generator: false, + expression: false, + range: [18, 51], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 51 } + } + }], + range: [16, 53], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 53 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 53], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 53 } + } + }, + + 'function hello(a) { sayHi(); }': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'hello', + range: [9, 14], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 14 } + } + }, + params: [{ + type: 'Identifier', + name: 'a', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'sayHi', + range: [20, 25], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 25 } + } + }, + 'arguments': [], + range: [20, 27], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 27 } + } + }, + range: [20, 28], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 28 } + } + }], + range: [18, 30], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 30 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 30], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 30 } + } + }, + + 'function hello(a, b) { sayHi(); }': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'hello', + range: [9, 14], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 14 } + } + }, + params: [{ + type: 'Identifier', + name: 'a', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }, { + type: 'Identifier', + name: 'b', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'sayHi', + range: [23, 28], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 28 } + } + }, + 'arguments': [], + range: [23, 30], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 30 } + } + }, + range: [23, 31], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 31 } + } + }], + range: [21, 33], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 33 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 33], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 33 } + } + }, + + 'var hi = function() { sayHi() };': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'hi', + range: [4, 6], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 6 } + } + }, + init: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'sayHi', + range: [22, 27], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 27 } + } + }, + 'arguments': [], + range: [22, 29], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 29 } + } + }, + range: [22, 30], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 30 } + } + }], + range: [20, 31], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 31 } + } + }, + rest: null, + generator: false, + expression: false, + range: [9, 31], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 31 } + } + }, + range: [4, 31], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 31 } + } + }], + kind: 'var', + range: [0, 32], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 32 } + } + }, + + 'var hi = function eval() { };': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'hi', + range: [4, 6], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 6 } + } + }, + init: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'eval', + range: [18, 22], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 22 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [25, 28], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 28 } + } + }, + rest: null, + generator: false, + expression: false, + range: [9, 28], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 28 } + } + }, + range: [4, 28], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 28 } + } + }], + kind: 'var', + range: [0, 29], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 29 } + } + }, + + 'var hi = function arguments() { };': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'hi', + range: [4, 6], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 6 } + } + }, + init: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'arguments', + range: [18, 27], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 27 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [30, 33], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 33 } + } + }, + rest: null, + generator: false, + expression: false, + range: [9, 33], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 33 } + } + }, + range: [4, 33], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 33 } + } + }], + kind: 'var', + range: [0, 34], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 34 } + } + }, + + 'var hello = function hi() { sayHi() };': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'hello', + range: [4, 9], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 9 } + } + }, + init: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'hi', + range: [21, 23], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 23 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'sayHi', + range: [28, 33], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 33 } + } + }, + 'arguments': [], + range: [28, 35], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 35 } + } + }, + range: [28, 36], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 36 } + } + }], + range: [26, 37], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 37 } + } + }, + rest: null, + generator: false, + expression: false, + range: [12, 37], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 37 } + } + }, + range: [4, 37], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 37 } + } + }], + kind: 'var', + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + } + }, + + '(function(){})': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [11, 13], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 13 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 13], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + 'function universe(__proto__) { }': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'universe', + range: [9, 17], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 17 } + } + }, + params: [{ + type: 'Identifier', + name: '__proto__', + range: [18, 27], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 27 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [29, 32], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 32 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 32], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 32 } + } + }, + + 'function test() { "use strict" + 42; }': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'test', + range: [9, 13], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 13 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [18, 30], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 30 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [33, 35], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 35 } + } + }, + range: [18, 35], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 35 } + } + }, + range: [18, 36], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 36 } + } + }], + range: [16, 38], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 38 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + } + } + + }, + + 'Automatic semicolon insertion': { + + '{ x\n++y }': { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'x', + range: [2, 3], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 3 } + } + }, + range: [2, 4], + loc: { + start: { line: 1, column: 2 }, + end: { line: 2, column: 0 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'y', + range: [6, 7], + loc: { + start: { line: 2, column: 2 }, + end: { line: 2, column: 3 } + } + }, + prefix: true, + range: [4, 7], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 3 } + } + }, + range: [4, 8], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 4 } + } + }], + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 5 } + } + }, + + '{ x\n--y }': { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'x', + range: [2, 3], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 3 } + } + }, + range: [2, 4], + loc: { + start: { line: 1, column: 2 }, + end: { line: 2, column: 0 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '--', + argument: { + type: 'Identifier', + name: 'y', + range: [6, 7], + loc: { + start: { line: 2, column: 2 }, + end: { line: 2, column: 3 } + } + }, + prefix: true, + range: [4, 7], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 3 } + } + }, + range: [4, 8], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 4 } + } + }], + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 5 } + } + }, + + 'var x /* comment */;': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: null, + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }], + kind: 'var', + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + + '{ var x = 14, y = 3\nz; }': { + type: 'BlockStatement', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + init: { + type: 'Literal', + value: 14, + raw: '14', + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + range: [6, 12], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 12 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'y', + range: [14, 15], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 15 } + } + }, + init: { + type: 'Literal', + value: 3, + raw: '3', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }, + range: [14, 19], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 19 } + } + }], + kind: 'var', + range: [2, 20], + loc: { + start: { line: 1, column: 2 }, + end: { line: 2, column: 0 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'z', + range: [20, 21], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 1 } + } + }, + range: [20, 22], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 2 } + } + }], + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 4 } + } + }, + + 'while (true) { continue\nthere; }': { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [7, 11], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 11 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'ContinueStatement', + label: null, + range: [15, 23], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 23 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'there', + range: [24, 29], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 5 } + } + }, + range: [24, 30], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 6 } + } + }], + range: [13, 32], + loc: { + start: { line: 1, column: 13 }, + end: { line: 2, column: 8 } + } + }, + range: [0, 32], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 8 } + } + }, + + 'while (true) { continue // Comment\nthere; }': { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [7, 11], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 11 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'ContinueStatement', + label: null, + range: [15, 23], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 23 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'there', + range: [35, 40], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 5 } + } + }, + range: [35, 41], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 6 } + } + }], + range: [13, 43], + loc: { + start: { line: 1, column: 13 }, + end: { line: 2, column: 8 } + } + }, + range: [0, 43], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 8 } + } + }, + + 'while (true) { continue /* Multiline\nComment */there; }': { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [7, 11], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 11 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'ContinueStatement', + label: null, + range: [15, 23], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 23 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'there', + range: [47, 52], + loc: { + start: { line: 2, column: 10 }, + end: { line: 2, column: 15 } + } + }, + range: [47, 53], + loc: { + start: { line: 2, column: 10 }, + end: { line: 2, column: 16 } + } + }], + range: [13, 55], + loc: { + start: { line: 1, column: 13 }, + end: { line: 2, column: 18 } + } + }, + range: [0, 55], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 18 } + } + }, + + 'while (true) { break\nthere; }': { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [7, 11], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 11 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'BreakStatement', + label: null, + range: [15, 20], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 20 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'there', + range: [21, 26], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 5 } + } + }, + range: [21, 27], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 6 } + } + }], + range: [13, 29], + loc: { + start: { line: 1, column: 13 }, + end: { line: 2, column: 8 } + } + }, + range: [0, 29], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 8 } + } + }, + + 'while (true) { break // Comment\nthere; }': { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [7, 11], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 11 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'BreakStatement', + label: null, + range: [15, 20], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 20 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'there', + range: [32, 37], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 5 } + } + }, + range: [32, 38], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 6 } + } + }], + range: [13, 40], + loc: { + start: { line: 1, column: 13 }, + end: { line: 2, column: 8 } + } + }, + range: [0, 40], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 8 } + } + }, + + 'while (true) { break /* Multiline\nComment */there; }': { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [7, 11], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 11 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'BreakStatement', + label: null, + range: [15, 20], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 20 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'there', + range: [44, 49], + loc: { + start: { line: 2, column: 10 }, + end: { line: 2, column: 15 } + } + }, + range: [44, 50], + loc: { + start: { line: 2, column: 10 }, + end: { line: 2, column: 16 } + } + }], + range: [13, 52], + loc: { + start: { line: 1, column: 13 }, + end: { line: 2, column: 18 } + } + }, + range: [0, 52], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 18 } + } + }, + + '(function(){ return\nx; })': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [ + { + type: 'ReturnStatement', + argument: null, + range: [13, 19], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 19 } + } + }, + { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'x', + range: [20, 21], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 1 } + } + }, + range: [20, 22], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 2 } + } + } + ], + range: [11, 24], + loc: { + start: { line: 1, column: 11 }, + end: { line: 2, column: 4 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 24], + loc: { + start: { line: 1, column: 1 }, + end: { line: 2, column: 4 } + } + }, + range: [0, 25], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 5 } + } + }, + + '(function(){ return // Comment\nx; })': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [ + { + type: 'ReturnStatement', + argument: null, + range: [13, 19], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 19 } + } + }, + { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'x', + range: [31, 32], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 1 } + } + }, + range: [31, 33], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 2 } + } + } + ], + range: [11, 35], + loc: { + start: { line: 1, column: 11 }, + end: { line: 2, column: 4 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 35], + loc: { + start: { line: 1, column: 1 }, + end: { line: 2, column: 4 } + } + }, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 5 } + } + }, + + '(function(){ return/* Multiline\nComment */x; })': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [ + { + type: 'ReturnStatement', + argument: null, + range: [13, 19], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 19 } + } + }, + { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'x', + range: [42, 43], + loc: { + start: { line: 2, column: 10 }, + end: { line: 2, column: 11 } + } + }, + range: [42, 44], + loc: { + start: { line: 2, column: 10 }, + end: { line: 2, column: 12 } + } + } + ], + range: [11, 46], + loc: { + start: { line: 1, column: 11 }, + end: { line: 2, column: 14 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 46], + loc: { + start: { line: 1, column: 1 }, + end: { line: 2, column: 14 } + } + }, + range: [0, 47], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 15 } + } + }, + + '{ throw error\nerror; }': { + type: 'BlockStatement', + body: [{ + type: 'ThrowStatement', + argument: { + type: 'Identifier', + name: 'error', + range: [8, 13], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 13 } + } + }, + range: [2, 14], + loc: { + start: { line: 1, column: 2 }, + end: { line: 2, column: 0 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'error', + range: [14, 19], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 5 } + } + }, + range: [14, 20], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 6 } + } + }], + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 8 } + } + }, + + '{ throw error// Comment\nerror; }': { + type: 'BlockStatement', + body: [{ + type: 'ThrowStatement', + argument: { + type: 'Identifier', + name: 'error', + range: [8, 13], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 13 } + } + }, + range: [2, 24], + loc: { + start: { line: 1, column: 2 }, + end: { line: 2, column: 0 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'error', + range: [24, 29], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 5 } + } + }, + range: [24, 30], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 6 } + } + }], + range: [0, 32], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 8 } + } + }, + + '{ throw error/* Multiline\nComment */error; }': { + type: 'BlockStatement', + body: [{ + type: 'ThrowStatement', + argument: { + type: 'Identifier', + name: 'error', + range: [8, 13], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 13 } + } + }, + range: [2, 36], + loc: { + start: { line: 1, column: 2 }, + end: { line: 2, column: 10 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'error', + range: [36, 41], + loc: { + start: { line: 2, column: 10 }, + end: { line: 2, column: 15 } + } + }, + range: [36, 42], + loc: { + start: { line: 2, column: 10 }, + end: { line: 2, column: 16 } + } + }], + range: [0, 44], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 18 } + } + } + + }, + + 'Source elements': { + + '': { + type: 'Program', + body: [], + range: [0, 0], + loc: { + start: { line: 0, column: 0 }, + end: { line: 0, column: 0 } + }, + tokens: [] + } + }, + + 'Source option': { + 'x + y - z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '-', + left: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 }, + source: '42.js' + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 }, + source: '42.js' + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 }, + source: '42.js' + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 }, + source: '42.js' + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 }, + source: '42.js' + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 }, + source: '42.js' + } + }, + + 'a + (b < (c * d)) + e': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'Identifier', + name: 'a', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 }, + source: '42.js' + } + }, + right: { + type: 'BinaryExpression', + operator: '<', + left: { + type: 'Identifier', + name: 'b', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 }, + source: '42.js' + } + }, + right: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'Identifier', + name: 'c', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 }, + source: '42.js' + } + }, + right: { + type: 'Identifier', + name: 'd', + range: [14, 15], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 15 }, + source: '42.js' + } + }, + range: [10, 15], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 15 }, + source: '42.js' + } + }, + range: [5, 16], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 16 }, + source: '42.js' + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 }, + source: '42.js' + } + }, + right: { + type: 'Identifier', + name: 'e', + range: [20, 21], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 21 }, + source: '42.js' + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 }, + source: '42.js' + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 }, + source: '42.js' + } + } + + }, + + + 'Invalid syntax': { + + '{': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Unexpected end of input' + }, + + '}': { + index: 0, + lineNumber: 1, + column: 1, + message: 'Error: Line 1: Unexpected token }' + }, + + '3ea': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '3in []': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '3e': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '3e+': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '3e-': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '3x': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '3x0': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0x': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '09': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '018': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '01a': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '3in[]': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0x3in[]': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '"Hello\nWorld"': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + 'x\\': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + 'x\\u005c': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + 'x\\u002a': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + 'var x = /(s/g': { + index: 13, + lineNumber: 1, + column: 14, + message: 'Error: Line 1: Invalid regular expression' + }, + + 'a\\u': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '\\ua': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '/': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Invalid regular expression: missing /' + }, + + '/test': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Invalid regular expression: missing /' + }, + + 'var x = /[a-z]/\\ux': { + index: 18, + lineNumber: 1, + column: 19, + message: 'Error: Line 1: Invalid regular expression' + }, + + '3 = 4': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + 'func() = 4': { + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + '(1 + 1) = 10': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + '1++': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + '1--': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + '++1': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + '--1': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + 'for((1 + 1) in list) process(x);': { + index: 11, + lineNumber: 1, + column: 12, + message: 'Error: Line 1: Invalid left-hand side in for-in' + }, + + '[': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Unexpected end of input' + }, + + '[,': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected end of input' + }, + + '1 + {': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Unexpected end of input' + }, + + '1 + { t:t ': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Unexpected end of input' + }, + + '1 + { t:t,': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Unexpected end of input' + }, + + 'var x = /\n/': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Invalid regular expression: missing /' + }, + + 'var x = "\n': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + 'var if = 42': { + index: 4, + lineNumber: 1, + column: 5, + message: 'Error: Line 1: Unexpected token if' + }, + + 'i #= 42': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + 'i + 2 = 42': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + '+i = 42': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + '1 + (': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Unexpected end of input' + }, + + '\n\n\n{': { + index: 4, + lineNumber: 4, + column: 2, + message: 'Error: Line 4: Unexpected end of input' + }, + + '\n/* Some multiline\ncomment */\n)': { + index: 30, + lineNumber: 4, + column: 1, + message: 'Error: Line 4: Unexpected token )' + }, + + '{ set 1 }': { + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Unexpected number' + }, + + '{ get 2 }': { + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Unexpected number' + }, + + '({ set: s(if) { } })': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Unexpected token if' + }, + + '({ set s(.) { } })': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token .' + }, + + '({ set: s() { } })': { + index: 12, + lineNumber: 1, + column: 13, + message: 'Error: Line 1: Unexpected token {' + }, + + '({ set: s(a, b) { } })': { + index: 16, + lineNumber: 1, + column: 17, + message: 'Error: Line 1: Unexpected token {' + }, + + '({ get: g(d) { } })': { + index: 13, + lineNumber: 1, + column: 14, + message: 'Error: Line 1: Unexpected token {' + }, + + '({ get i() { }, i: 42 })': { + index: 21, + lineNumber: 1, + column: 22, + message: 'Error: Line 1: Object literal may not have data and accessor property with the same name' + }, + + '({ i: 42, get i() { } })': { + index: 21, + lineNumber: 1, + column: 22, + message: 'Error: Line 1: Object literal may not have data and accessor property with the same name' + }, + + '({ set i(x) { }, i: 42 })': { + index: 22, + lineNumber: 1, + column: 23, + message: 'Error: Line 1: Object literal may not have data and accessor property with the same name' + }, + + '({ i: 42, set i(x) { } })': { + index: 22, + lineNumber: 1, + column: 23, + message: 'Error: Line 1: Object literal may not have data and accessor property with the same name' + }, + + '({ get i() { }, get i() { } })': { + index: 27, + lineNumber: 1, + column: 28, + message: 'Error: Line 1: Object literal may not have multiple get/set accessors with the same name' + }, + + '({ set i(x) { }, set i(x) { } })': { + index: 29, + lineNumber: 1, + column: 30, + message: 'Error: Line 1: Object literal may not have multiple get/set accessors with the same name' + }, + + 'function t(if) { }': { + index: 11, + lineNumber: 1, + column: 12, + message: 'Error: Line 1: Unexpected token if' + }, + + 'function t(true) { }': { + index: 11, + lineNumber: 1, + column: 12, + message: 'Error: Line 1: Unexpected token true' + }, + + 'function t(false) { }': { + index: 11, + lineNumber: 1, + column: 12, + message: 'Error: Line 1: Unexpected token false' + }, + + 'function t(null) { }': { + index: 11, + lineNumber: 1, + column: 12, + message: 'Error: Line 1: Unexpected token null' + }, + + 'function null() { }': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token null' + }, + + 'function true() { }': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token true' + }, + + 'function false() { }': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token false' + }, + + 'function if() { }': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token if' + }, + + 'a b;': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected identifier' + }, + + 'if.a;': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token .' + }, + + 'a if;': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token if' + }, + + 'a class;': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected reserved word' + }, + + 'break\n': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Illegal break statement' + }, + + 'break 1;': { + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Unexpected number' + }, + + 'continue\n': { + index: 8, + lineNumber: 1, + column: 9, + message: 'Error: Line 1: Illegal continue statement' + }, + + 'continue 2;': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected number' + }, + + 'throw': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Unexpected end of input' + }, + + 'throw;': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Unexpected token ;' + }, + + 'throw\n': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Illegal newline after throw' + }, + + 'for (var i, i2 in {});': { + index: 15, + lineNumber: 1, + column: 16, + message: 'Error: Line 1: Unexpected token in' + }, + + 'for ((i in {}));': { + index: 14, + lineNumber: 1, + column: 15, + message: 'Error: Line 1: Unexpected token )' + }, + + 'for (i + 1 in {});': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Invalid left-hand side in for-in' + }, + + 'for (+i in {});': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Invalid left-hand side in for-in' + }, + + 'if(false)': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected end of input' + }, + + 'if(false) doThis(); else': { + index: 24, + lineNumber: 1, + column: 25, + message: 'Error: Line 1: Unexpected end of input' + }, + + 'do': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected end of input' + }, + + 'while(false)': { + index: 12, + lineNumber: 1, + column: 13, + message: 'Error: Line 1: Unexpected end of input' + }, + + 'for(;;)': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Unexpected end of input' + }, + + 'with(x)': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Unexpected end of input' + }, + + 'try { }': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Missing catch or finally after try' + }, + + '\u203F = 10': { + index: 0, + lineNumber: 1, + column: 1, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + 'const x = 12, y;': { + index: 15, + lineNumber: 1, + column: 16, + message: 'Error: Line 1: Const must be initialized' + }, + + 'const x, y = 12;': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Const must be initialized' + }, + + 'const x;': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Const must be initialized' + }, + + 'if(true) let a = 1;': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token let' + }, + + 'if(true) const a = 1;': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token const' + }, + + 'switch (c) { default: default: }': { + index: 30, + lineNumber: 1, + column: 31, + message: 'Error: Line 1: More than one default clause in switch statement' + }, + + 'new X()."s"': { + index: 8, + lineNumber: 1, + column: 9, + message: 'Error: Line 1: Unexpected string' + }, + + '/*': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '/*\n\n\n': { + index: 5, + lineNumber: 4, + column: 1, + message: 'Error: Line 4: Unexpected token ILLEGAL' + }, + + '/**': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '/*\n\n*': { + index: 5, + lineNumber: 3, + column: 2, + message: 'Error: Line 3: Unexpected token ILLEGAL' + }, + + '/*hello': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '/*hello *': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '\n]': { + index: 1, + lineNumber: 2, + column: 1, + message: 'Error: Line 2: Unexpected token ]' + }, + + '\r]': { + index: 1, + lineNumber: 2, + column: 1, + message: 'Error: Line 2: Unexpected token ]' + }, + + '\r\n]': { + index: 2, + lineNumber: 2, + column: 1, + message: 'Error: Line 2: Unexpected token ]' + }, + + '\n\r]': { + index: 2, + lineNumber: 3, + column: 1, + message: 'Error: Line 3: Unexpected token ]' + }, + + '//\r\n]': { + index: 4, + lineNumber: 2, + column: 1, + message: 'Error: Line 2: Unexpected token ]' + }, + + '//\n\r]': { + index: 4, + lineNumber: 3, + column: 1, + message: 'Error: Line 3: Unexpected token ]' + }, + + '/a\\\n/': { + index: 4, + lineNumber: 1, + column: 5, + message: 'Error: Line 1: Invalid regular expression: missing /' + }, + + '//\r \n]': { + index: 5, + lineNumber: 3, + column: 1, + message: 'Error: Line 3: Unexpected token ]' + }, + + '/*\r\n*/]': { + index: 6, + lineNumber: 2, + column: 3, + message: 'Error: Line 2: Unexpected token ]' + }, + + '/*\n\r*/]': { + index: 6, + lineNumber: 3, + column: 3, + message: 'Error: Line 3: Unexpected token ]' + }, + + '/*\r \n*/]': { + index: 7, + lineNumber: 3, + column: 3, + message: 'Error: Line 3: Unexpected token ]' + }, + + '\\\\': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '\\u005c': { + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + + '\\x': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '\\u0000': { + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '\u200C = []': { + index: 0, + lineNumber: 1, + column: 1, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '\u200D = []': { + index: 0, + lineNumber: 1, + column: 1, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '"\\': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '"\\u': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + 'try { } catch() {}': { + index: 14, + lineNumber: 1, + column: 15, + message: 'Error: Line 1: Unexpected token )' + }, + + 'return': { + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Illegal return statement' + }, + + 'break': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Illegal break statement' + }, + + 'continue': { + index: 8, + lineNumber: 1, + column: 9, + message: 'Error: Line 1: Illegal continue statement' + }, + + 'switch (x) { default: continue; }': { + index: 31, + lineNumber: 1, + column: 32, + message: 'Error: Line 1: Illegal continue statement' + }, + + 'do { x } *': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token *' + }, + + 'while (true) { break x; }': { + index: 22, + lineNumber: 1, + column: 23, + message: 'Error: Line 1: Undefined label \'x\'' + }, + + 'while (true) { continue x; }': { + index: 25, + lineNumber: 1, + column: 26, + message: 'Error: Line 1: Undefined label \'x\'' + }, + + 'x: while (true) { (function () { break x; }); }': { + index: 40, + lineNumber: 1, + column: 41, + message: 'Error: Line 1: Undefined label \'x\'' + }, + + 'x: while (true) { (function () { continue x; }); }': { + index: 43, + lineNumber: 1, + column: 44, + message: 'Error: Line 1: Undefined label \'x\'' + }, + + 'x: while (true) { (function () { break; }); }': { + index: 39, + lineNumber: 1, + column: 40, + message: 'Error: Line 1: Illegal break statement' + }, + + 'x: while (true) { (function () { continue; }); }': { + index: 42, + lineNumber: 1, + column: 43, + message: 'Error: Line 1: Illegal continue statement' + }, + + 'x: while (true) { x: while (true) { } }': { + index: 20, + lineNumber: 1, + column: 21, + message: 'Error: Line 1: Label \'x\' has already been declared' + }, + + '(function () { \'use strict\'; delete i; }())': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Delete of an unqualified identifier in strict mode.' + }, + + '(function () { \'use strict\'; with (i); }())': { + index: 28, + lineNumber: 1, + column: 29, + message: 'Error: Line 1: Strict mode code may not include a with statement' + }, + + 'function hello() {\'use strict\'; ({ i: 42, i: 42 }) }': { + index: 47, + lineNumber: 1, + column: 48, + message: 'Error: Line 1: Duplicate data property in object literal not allowed in strict mode' + }, + + 'function hello() {\'use strict\'; ({ hasOwnProperty: 42, hasOwnProperty: 42 }) }': { + index: 73, + lineNumber: 1, + column: 74, + message: 'Error: Line 1: Duplicate data property in object literal not allowed in strict mode' + }, + + 'function hello() {\'use strict\'; var eval = 10; }': { + index: 40, + lineNumber: 1, + column: 41, + message: 'Error: Line 1: Variable name may not be eval or arguments in strict mode' + }, + + 'function hello() {\'use strict\'; var arguments = 10; }': { + index: 45, + lineNumber: 1, + column: 46, + message: 'Error: Line 1: Variable name may not be eval or arguments in strict mode' + }, + + 'function hello() {\'use strict\'; try { } catch (eval) { } }': { + index: 51, + lineNumber: 1, + column: 52, + message: 'Error: Line 1: Catch variable may not be eval or arguments in strict mode' + }, + + 'function hello() {\'use strict\'; try { } catch (arguments) { } }': { + index: 56, + lineNumber: 1, + column: 57, + message: 'Error: Line 1: Catch variable may not be eval or arguments in strict mode' + }, + + 'function hello() {\'use strict\'; eval = 10; }': { + index: 32, + lineNumber: 1, + column: 33, + message: 'Error: Line 1: Assignment to eval or arguments is not allowed in strict mode' + }, + + 'function hello() {\'use strict\'; arguments = 10; }': { + index: 32, + lineNumber: 1, + column: 33, + message: 'Error: Line 1: Assignment to eval or arguments is not allowed in strict mode' + }, + + 'function hello() {\'use strict\'; ++eval; }': { + index: 38, + lineNumber: 1, + column: 39, + message: 'Error: Line 1: Prefix increment/decrement may not have eval or arguments operand in strict mode' + }, + + 'function hello() {\'use strict\'; --eval; }': { + index: 38, + lineNumber: 1, + column: 39, + message: 'Error: Line 1: Prefix increment/decrement may not have eval or arguments operand in strict mode' + }, + + 'function hello() {\'use strict\'; ++arguments; }': { + index: 43, + lineNumber: 1, + column: 44, + message: 'Error: Line 1: Prefix increment/decrement may not have eval or arguments operand in strict mode' + }, + + 'function hello() {\'use strict\'; --arguments; }': { + index: 43, + lineNumber: 1, + column: 44, + message: 'Error: Line 1: Prefix increment/decrement may not have eval or arguments operand in strict mode' + }, + + 'function hello() {\'use strict\'; eval++; }': { + index: 36, + lineNumber: 1, + column: 37, + message: 'Error: Line 1: Postfix increment/decrement may not have eval or arguments operand in strict mode' + }, + + 'function hello() {\'use strict\'; eval--; }': { + index: 36, + lineNumber: 1, + column: 37, + message: 'Error: Line 1: Postfix increment/decrement may not have eval or arguments operand in strict mode' + }, + + 'function hello() {\'use strict\'; arguments++; }': { + index: 41, + lineNumber: 1, + column: 42, + message: 'Error: Line 1: Postfix increment/decrement may not have eval or arguments operand in strict mode' + }, + + 'function hello() {\'use strict\'; arguments--; }': { + index: 41, + lineNumber: 1, + column: 42, + message: 'Error: Line 1: Postfix increment/decrement may not have eval or arguments operand in strict mode' + }, + + 'function hello() {\'use strict\'; function eval() { } }': { + index: 41, + lineNumber: 1, + column: 42, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }, + + 'function hello() {\'use strict\'; function arguments() { } }': { + index: 41, + lineNumber: 1, + column: 42, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }, + + 'function eval() {\'use strict\'; }': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }, + + 'function arguments() {\'use strict\'; }': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }, + + 'function hello() {\'use strict\'; (function eval() { }()) }': { + index: 42, + lineNumber: 1, + column: 43, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }, + + 'function hello() {\'use strict\'; (function arguments() { }()) }': { + index: 42, + lineNumber: 1, + column: 43, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }, + + '(function eval() {\'use strict\'; })()': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }, + + '(function arguments() {\'use strict\'; })()': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }, + + 'function hello() {\'use strict\'; ({ s: function eval() { } }); }': { + index: 47, + lineNumber: 1, + column: 48, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }, + + '(function package() {\'use strict\'; })()': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function hello() {\'use strict\'; ({ i: 10, set s(eval) { } }); }': { + index: 48, + lineNumber: 1, + column: 49, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + 'function hello() {\'use strict\'; ({ set s(eval) { } }); }': { + index: 41, + lineNumber: 1, + column: 42, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + 'function hello() {\'use strict\'; ({ s: function s(eval) { } }); }': { + index: 49, + lineNumber: 1, + column: 50, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + 'function hello(eval) {\'use strict\';}': { + index: 15, + lineNumber: 1, + column: 16, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + 'function hello(arguments) {\'use strict\';}': { + index: 15, + lineNumber: 1, + column: 16, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + 'function hello() { \'use strict\'; function inner(eval) {} }': { + index: 48, + lineNumber: 1, + column: 49, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + 'function hello() { \'use strict\'; function inner(arguments) {} }': { + index: 48, + lineNumber: 1, + column: 49, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + ' "\\1"; \'use strict\';': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }, + + 'function hello() { \'use strict\'; "\\1"; }': { + index: 33, + lineNumber: 1, + column: 34, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }, + + 'function hello() { \'use strict\'; 021; }': { + index: 33, + lineNumber: 1, + column: 34, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }, + + 'function hello() { \'use strict\'; ({ "\\1": 42 }); }': { + index: 36, + lineNumber: 1, + column: 37, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }, + + 'function hello() { \'use strict\'; ({ 021: 42 }); }': { + index: 36, + lineNumber: 1, + column: 37, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }, + + 'function hello() { "octal directive\\1"; "use strict"; }': { + index: 19, + lineNumber: 1, + column: 20, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }, + + 'function hello() { "octal directive\\1"; "octal directive\\2"; "use strict"; }': { + index: 19, + lineNumber: 1, + column: 20, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }, + + 'function hello() { "use strict"; function inner() { "octal directive\\1"; } }': { + index: 52, + lineNumber: 1, + column: 53, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }, + + 'function hello() { "use strict"; var implements; }': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function hello() { "use strict"; var interface; }': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function hello() { "use strict"; var package; }': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function hello() { "use strict"; var private; }': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function hello() { "use strict"; var protected; }': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function hello() { "use strict"; var public; }': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function hello() { "use strict"; var static; }': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function hello() { "use strict"; var yield; }': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function hello() { "use strict"; var let; }': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function hello(static) { "use strict"; }': { + index: 15, + lineNumber: 1, + column: 16, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function static() { "use strict"; }': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function eval(a) { "use strict"; }': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }, + + 'function arguments(a) { "use strict"; }': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }, + + 'var yield': { + index: 4, + lineNumber: 1, + column: 5, + message: 'Error: Line 1: Unexpected token yield' + }, + + 'var let': { + index: 4, + lineNumber: 1, + column: 5, + message: 'Error: Line 1: Unexpected token let' + }, + + '"use strict"; function static() { }': { + index: 23, + lineNumber: 1, + column: 24, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function a(t, t) { "use strict"; }': { + index: 14, + lineNumber: 1, + column: 15, + message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' + }, + + 'function a(eval) { "use strict"; }': { + index: 11, + lineNumber: 1, + column: 12, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + 'function a(package) { "use strict"; }': { + index: 11, + lineNumber: 1, + column: 12, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function a() { "use strict"; function b(t, t) { }; }': { + index: 43, + lineNumber: 1, + column: 44, + message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' + }, + + '(function a(t, t) { "use strict"; })': { + index: 15, + lineNumber: 1, + column: 16, + message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' + }, + + 'function a() { "use strict"; (function b(t, t) { }); }': { + index: 44, + lineNumber: 1, + column: 45, + message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' + }, + + '(function a(eval) { "use strict"; })': { + index: 12, + lineNumber: 1, + column: 13, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + '(function a(package) { "use strict"; })': { + index: 12, + lineNumber: 1, + column: 13, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + '__proto__: __proto__: 42;': { + index: 21, + lineNumber: 1, + column: 22, + message: 'Error: Line 1: Label \'__proto__\' has already been declared' + }, + + '"use strict"; function t(__proto__, __proto__) { }': { + index: 36, + lineNumber: 1, + column: 37, + message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' + }, + + '"use strict"; x = { __proto__: 42, __proto__: 43 }': { + index: 48, + lineNumber: 1, + column: 49, + message: 'Error: Line 1: Duplicate data property in object literal not allowed in strict mode' + }, + + '"use strict"; x = { get __proto__() { }, __proto__: 43 }': { + index: 54, + lineNumber: 1, + column: 55, + message: 'Error: Line 1: Object literal may not have data and accessor property with the same name' + }, + + 'var': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected end of input' + }, + + 'let': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected end of input' + }, + + 'const': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Unexpected end of input' + }, + + '{ ; ; ': { + index: 8, + lineNumber: 1, + column: 9, + message: 'Error: Line 1: Unexpected end of input' + }, + + 'function t() { ; ; ': { + index: 21, + lineNumber: 1, + column: 22, + message: 'Error: Line 1: Unexpected end of input' + } + + }, + + 'Tokenize': { + 'tokenize(/42/)': [ + { + "type": "Identifier", + "value": "tokenize", + "range": [ + 0, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 8, + 9 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 13, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + { + "type": "RegularExpression", + "value": "/42/", + "range": [ + 9, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 13, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + } + } + ], + + 'if (false) { /42/ }': [ + { + "type": "Keyword", + "value": "if", + "range": [ + 0, + 2 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 3, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + { + "type": "Boolean", + "value": "false", + "range": [ + 4, + 9 + ], + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 9, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 11, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 18, + 19 + ], + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 19 + } + } + }, + { + "type": "RegularExpression", + "value": "/42/", + "range": [ + 13, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 18, + 19 + ], + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 19 + } + } + } + ], + + 'with (false) /42/': [ + { + "type": "Keyword", + "value": "with", + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "Boolean", + "value": "false", + "range": [ + 6, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 11, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "RegularExpression", + "value": "/42/", + "range": [ + 13, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 17 + } + } + } + ], + + '(false) /42/': [ + { + "type": "Punctuator", + "value": "(", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "Boolean", + "value": "false", + "range": [ + 1, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 6, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 8, + 9 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 9 + } + } + }, + { + "type": "Numeric", + "value": "42", + "range": [ + 9, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 11, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + } + } + } + ], + + 'function f(){} /42/': [ + { + "type": "Keyword", + "value": "function", + "range": [ + 0, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Identifier", + "value": "f", + "range": [ + 9, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 10, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 11, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 12, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 13, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + { + "type": "RegularExpression", + "value": "/42/", + "range": [ + 15, + 19 + ], + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 19 + } + } + } + ], + + 'function(){} /42': [ + { + "type": "Keyword", + "value": "function", + "range": [ + 0, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 8, + 9 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 9, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 10, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 11, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 13, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + { + "type": "Numeric", + "value": "42", + "range": [ + 14, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 16 + } + } + } + ], + + '{} /42': [ + { + "type": "Punctuator", + "value": "{", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 1, + 2 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 3, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + { + "type": "Numeric", + "value": "42", + "range": [ + 4, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 6 + } + } + } + ], + + '[function(){} /42]': [ + { + "type": "Punctuator", + "value": "[", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "Keyword", + "value": "function", + "range": [ + 1, + 9 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 9, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 10, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 11, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 12, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + { + "type": "Numeric", + "value": "42", + "range": [ + 15, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 17, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 18 + } + } + } + ], + + ';function f(){} /42/': [ + { + "type": "Punctuator", + "value": ";", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "Keyword", + "value": "function", + "range": [ + 1, + 9 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 9 + } + } + }, + { + "type": "Identifier", + "value": "f", + "range": [ + 10, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 11, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 12, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 13, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + { + "type": "RegularExpression", + "value": "/42/", + "range": [ + 16, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 20 + } + } + } + ], + + 'void /42/': [ + { + "type": "Keyword", + "value": "void", + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + { + "type": "RegularExpression", + "value": "/42/", + "range": [ + 5, + 9 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 9 + } + } + } + ], + + '/42/': [ + { + "type": "RegularExpression", + "value": "/42/", + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + } + ], + + 'foo[/42]': [ + { + "type": "Identifier", + "value": "foo", + "range": [ + 0, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 3, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 4 + } + } + } + ], + + '': [], + + '/42': { + tokenize: true, + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Invalid regular expression: missing /' + }, + + 'foo[/42': { + tokenize: true, + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Invalid regular expression: missing /' + } + + }, + + 'API': { + 'parse()': { + call: 'parse', + args: [], + result: { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'undefined' + } + }] + } + }, + + 'parse(null)': { + call: 'parse', + args: [null], + result: { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: null, + raw: 'null' + } + }] + } + }, + + 'parse(42)': { + call: 'parse', + args: [42], + result: { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42' + } + }] + } + }, + + 'parse(true)': { + call: 'parse', + args: [true], + result: { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: true, + raw: 'true' + } + }] + } + }, + + 'parse(undefined)': { + call: 'parse', + args: [void 0], + result: { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'undefined' + } + }] + } + }, + + 'parse(new String("test"))': { + call: 'parse', + args: [new String('test')], + result: { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'test' + } + }] + } + }, + + 'parse(new Number(42))': { + call: 'parse', + args: [new Number(42)], + result: { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42' + } + }] + } + }, + + 'parse(new Boolean(true))': { + call: 'parse', + args: [new Boolean(true)], + result: { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: true, + raw: 'true' + } + }] + } + }, + + 'Syntax': { + property: 'Syntax', + result: { + ArrayExpression: 'ArrayExpression', + ArrayPattern: 'ArrayPattern', + ArrowFunctionExpression: 'ArrowFunctionExpression', + AssignmentExpression: 'AssignmentExpression', + BinaryExpression: 'BinaryExpression', + BlockStatement: 'BlockStatement', + BreakStatement: 'BreakStatement', + CallExpression: 'CallExpression', + CatchClause: 'CatchClause', + ClassBody: 'ClassBody', + ClassDeclaration: 'ClassDeclaration', + ClassExpression: 'ClassExpression', + ClassHeritage: 'ClassHeritage', + ComprehensionBlock: 'ComprehensionBlock', + ComprehensionExpression: 'ComprehensionExpression', + ConditionalExpression: 'ConditionalExpression', + ContinueStatement: 'ContinueStatement', + DebuggerStatement: 'DebuggerStatement', + DoWhileStatement: 'DoWhileStatement', + EmptyStatement: 'EmptyStatement', + ExportDeclaration: 'ExportDeclaration', + ExportBatchSpecifier: 'ExportBatchSpecifier', + ExportSpecifier: 'ExportSpecifier', + ExpressionStatement: 'ExpressionStatement', + ForInStatement: 'ForInStatement', + ForOfStatement: 'ForOfStatement', + ForStatement: 'ForStatement', + FunctionDeclaration: 'FunctionDeclaration', + FunctionExpression: 'FunctionExpression', + Identifier: 'Identifier', + IfStatement: 'IfStatement', + ImportDeclaration: 'ImportDeclaration', + ImportSpecifier: 'ImportSpecifier', + LabeledStatement: 'LabeledStatement', + Literal: 'Literal', + LogicalExpression: 'LogicalExpression', + MemberExpression: 'MemberExpression', + MethodDefinition: 'MethodDefinition', + ModuleDeclaration: 'ModuleDeclaration', + NewExpression: 'NewExpression', + ObjectExpression: 'ObjectExpression', + ObjectPattern: 'ObjectPattern', + Program: 'Program', + Property: 'Property', + ReturnStatement: 'ReturnStatement', + SequenceExpression: 'SequenceExpression', + SpreadElement: 'SpreadElement', + SwitchCase: 'SwitchCase', + SwitchStatement: 'SwitchStatement', + TaggedTemplateExpression: 'TaggedTemplateExpression', + TemplateElement: 'TemplateElement', + TemplateLiteral: 'TemplateLiteral', + ThisExpression: 'ThisExpression', + ThrowStatement: 'ThrowStatement', + TryStatement: 'TryStatement', + TypeAnnotatedIdentifier: 'TypeAnnotatedIdentifier', + TypeAnnotation: 'TypeAnnotation', + UnaryExpression: 'UnaryExpression', + UpdateExpression: 'UpdateExpression', + VariableDeclaration: 'VariableDeclaration', + VariableDeclarator: 'VariableDeclarator', + WhileStatement: 'WhileStatement', + WithStatement: 'WithStatement', + XJSIdentifier: 'XJSIdentifier', + XJSEmptyExpression: "XJSEmptyExpression", + XJSExpressionContainer: "XJSExpressionContainer", + XJSElement: 'XJSElement', + XJSClosingElement: 'XJSClosingElement', + XJSOpeningElement: 'XJSOpeningElement', + XJSAttribute: "XJSAttribute", + XJSText: 'XJSText', + YieldExpression: 'YieldExpression' + } + }, + + 'tokenize()': { + call: 'tokenize', + args: [], + result: [{ + type: 'Identifier', + value: 'undefined' + }] + }, + + 'tokenize(null)': { + call: 'tokenize', + args: [null], + result: [{ + type: 'Null', + value: 'null' + }] + }, + + 'tokenize(42)': { + call: 'tokenize', + args: [42], + result: [{ + type: 'Numeric', + value: '42' + }] + }, + + 'tokenize(true)': { + call: 'tokenize', + args: [true], + result: [{ + type: 'Boolean', + value: 'true' + }] + }, + + 'tokenize(undefined)': { + call: 'tokenize', + args: [void 0], + result: [{ + type: 'Identifier', + value: 'undefined' + }] + }, + + 'tokenize(new String("test"))': { + call: 'tokenize', + args: [new String('test')], + result: [{ + type: 'Identifier', + value: 'test' + }] + }, + + 'tokenize(new Number(42))': { + call: 'tokenize', + args: [new Number(42)], + result: [{ + type: 'Numeric', + value: '42' + }] + }, + + 'tokenize(new Boolean(true))': { + call: 'tokenize', + args: [new Boolean(true)], + result: [{ + type: 'Boolean', + value: 'true' + }] + }, + + }, + + 'Tolerant parse': { + 'return': { + type: 'Program', + body: [{ + type: 'ReturnStatement', + 'argument': null, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }], + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + }, + errors: [{ + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Illegal return statement' + }] + }, + + '(function () { \'use strict\'; with (i); }())': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '\'use strict\'', + range: [15, 27], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 27 } + } + }, + range: [15, 28], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 28 } + } + }, { + type: 'WithStatement', + object: { + type: 'Identifier', + name: 'i', + range: [35, 36], + loc: { + start: { line: 1, column: 35 }, + end: { line: 1, column: 36 } + } + }, + body: { + type: 'EmptyStatement', + range: [37, 38], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 38 } + } + }, + range: [29, 38], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 38 } + } + }], + range: [13, 40], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 40 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 40], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 40 } + } + }, + 'arguments': [], + range: [1, 42], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 42 } + } + }, + range: [0, 43], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 43 } + } + }], + range: [0, 43], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 43 } + }, + errors: [{ + index: 29, + lineNumber: 1, + column: 30, + message: 'Error: Line 1: Strict mode code may not include a with statement' + }] + }, + + '(function () { \'use strict\'; 021 }())': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '\'use strict\'', + range: [15, 27], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 27 } + } + }, + range: [15, 28], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 28 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 17, + raw: "021", + range: [29, 32], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 32 } + } + }, + range: [29, 33], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 33 } + } + }], + range: [13, 34], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 34 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 34], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 34 } + } + }, + 'arguments': [], + range: [1, 36], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 36 } + } + }, + range: [0, 37], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 37 } + } + }], + range: [0, 37], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 37 } + }, + errors: [{ + index: 29, + lineNumber: 1, + column: 30, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }] + }, + + '"use strict"; delete x': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'UnaryExpression', + operator: 'delete', + argument: { + type: 'Identifier', + name: 'x', + range: [21, 22], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 22 } + } + }, + range: [14, 22], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 22 } + } + }, + range: [14, 22], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 22 } + } + }], + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + }, + errors: [{ + index: 22, + lineNumber: 1, + column: 23, + message: 'Error: Line 1: Delete of an unqualified identifier in strict mode.' + }] + }, + + '"use strict"; try {} catch (eval) {}': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'TryStatement', + block: { + type: 'BlockStatement', + body: [], + range: [18, 20], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 20 } + } + }, + guardedHandlers: [], + handlers: [{ + type: 'CatchClause', + param: { + type: 'Identifier', + name: 'eval', + range: [28, 32], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 32 } + } + }, + body: { + type: 'BlockStatement', + body: [], + range: [34, 36], + loc: { + start: { line: 1, column: 34 }, + end: { line: 1, column: 36 } + } + }, + range: [21, 36], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 36 } + } + }], + finalizer: null, + range: [14, 36], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 36 } + } + }], + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + }, + errors: [{ + index: 32, + lineNumber: 1, + column: 33, + message: 'Error: Line 1: Catch variable may not be eval or arguments in strict mode' + }] + }, + + '"use strict"; try {} catch (arguments) {}': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'TryStatement', + block: { + type: 'BlockStatement', + body: [], + range: [18, 20], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 20 } + } + }, + guardedHandlers: [], + handlers: [{ + type: 'CatchClause', + param: { + type: 'Identifier', + name: 'arguments', + range: [28, 37], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 37 } + } + }, + body: { + type: 'BlockStatement', + body: [], + range: [39, 41], + loc: { + start: { line: 1, column: 39 }, + end: { line: 1, column: 41 } + } + }, + range: [21, 41], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 41 } + } + }], + finalizer: null, + range: [14, 41], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 41 } + } + }], + range: [0, 41], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 41 } + }, + errors: [{ + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Catch variable may not be eval or arguments in strict mode' + }] + }, + + '"use strict"; var eval;': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'eval', + range: [18, 22], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 22 } + } + }, + init: null, + range: [18, 22], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 22 } + } + }], + kind: 'var', + range: [14, 23], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 23 } + } + }], + range: [0, 23], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 23 } + }, + errors: [{ + index: 22, + lineNumber: 1, + column: 23, + message: 'Error: Line 1: Variable name may not be eval or arguments in strict mode' + }] + }, + + '"use strict"; var arguments;': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'arguments', + range: [18, 27], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 27 } + } + }, + init: null, + range: [18, 27], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 27 } + } + }], + kind: 'var', + range: [14, 28], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 28 } + } + }], + range: [0, 28], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 28 } + }, + errors: [{ + index: 27, + lineNumber: 1, + column: 28, + message: 'Error: Line 1: Variable name may not be eval or arguments in strict mode' + }] + }, + + '"use strict"; eval = 0;': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'eval', + range: [14, 18], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 18 } + } + }, + right: { + type: 'Literal', + value: 0, + raw: '0', + range: [21, 22], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 22 } + } + }, + range: [14, 22], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 22 } + } + }, + range: [14, 23], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 23 } + } + }], + range: [0, 23], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 23 } + }, + errors: [{ + index: 14, + lineNumber: 1, + column: 15, + message: 'Error: Line 1: Assignment to eval or arguments is not allowed in strict mode' + }] + }, + + '"use strict"; eval++;': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'eval', + range: [14, 18], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 18 } + } + }, + prefix: false, + range: [14, 20], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 20 } + } + }, + range: [14, 21], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 21 } + } + }], + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + }, + errors: [{ + index: 18, + lineNumber: 1, + column: 19, + message: 'Error: Line 1: Postfix increment/decrement may not have eval or arguments operand in strict mode' + }] + }, + + '"use strict"; --eval;': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '--', + argument: { + type: 'Identifier', + name: 'eval', + range: [16, 20], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 20 } + } + }, + prefix: true, + range: [14, 20], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 20 } + } + }, + range: [14, 21], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 21 } + } + }], + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + }, + errors: [{ + index: 20, + lineNumber: 1, + column: 21, + message: 'Error: Line 1: Prefix increment/decrement may not have eval or arguments operand in strict mode' + }] + }, + + '"use strict"; arguments = 0;': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'arguments', + range: [14, 23], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 23 } + } + }, + right: { + type: 'Literal', + value: 0, + raw: '0', + range: [26, 27], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 27 } + } + }, + range: [14, 27], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 27 } + } + }, + range: [14, 28], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 28 } + } + }], + range: [0, 28], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 28 } + }, + errors: [{ + index: 14, + lineNumber: 1, + column: 15, + message: 'Error: Line 1: Assignment to eval or arguments is not allowed in strict mode' + }] + }, + + '"use strict"; arguments--;': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '--', + argument: { + type: 'Identifier', + name: 'arguments', + range: [14, 23], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 23 } + } + }, + prefix: false, + range: [14, 25], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 25 } + } + }, + range: [14, 26], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 26 } + } + }], + range: [0, 26], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 26 } + }, + errors: [{ + index: 23, + lineNumber: 1, + column: 24, + message: 'Error: Line 1: Postfix increment/decrement may not have eval or arguments operand in strict mode' + }] + }, + + '"use strict"; ++arguments;': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'arguments', + range: [16, 25], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 25 } + } + }, + prefix: true, + range: [14, 25], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 25 } + } + }, + range: [14, 26], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 26 } + } + }], + range: [0, 26], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 26 } + }, + errors: [{ + index: 25, + lineNumber: 1, + column: 26, + message: 'Error: Line 1: Prefix increment/decrement may not have eval or arguments operand in strict mode' + }] + }, + + + '"use strict";x={y:1,y:1}': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'y', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }, + value: { + type: 'Literal', + value: 1, + raw: '1', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [16, 19], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 19 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'y', + range: [20, 21], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 21 } + } + }, + value: { + type: 'Literal', + value: 1, + raw: '1', + range: [22, 23], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 23 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [20, 23], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 23 } + } + }], + range: [15, 24], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 24 } + } + }, + range: [13, 24], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 24 } + } + }, + range: [13, 24], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 24 } + } + }], + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + }, + errors: [{ + index: 23, + lineNumber: 1, + column: 24, + message: 'Error: Line 1: Duplicate data property in object literal not allowed in strict mode' + }] + }, + + '"use strict"; function eval() {};': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'eval', + range: [23, 27], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 27 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [30, 32], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 32 } + } + }, + rest: null, + generator: false, + expression: false, + range: [14, 32], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 32 } + } + }, { + type: 'EmptyStatement', + range: [32, 33], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 33 } + } + }], + range: [0, 33], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 33 } + }, + errors: [{ + index: 23, + lineNumber: 1, + column: 24, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }] + }, + + '"use strict"; function arguments() {};': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'arguments', + range: [23, 32], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 32 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [35, 37], + loc: { + start: { line: 1, column: 35 }, + end: { line: 1, column: 37 } + } + }, + rest: null, + generator: false, + expression: false, + range: [14, 37], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 37 } + } + }, { + type: 'EmptyStatement', + range: [37, 38], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 38 } + } + }], + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + }, + errors: [{ + index: 23, + lineNumber: 1, + column: 24, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }] + }, + + '"use strict"; function interface() {};': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'interface', + range: [23, 32], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 32 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [35, 37], + loc: { + start: { line: 1, column: 35 }, + end: { line: 1, column: 37 } + } + }, + rest: null, + generator: false, + expression: false, + range: [14, 37], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 37 } + } + }, { + type: 'EmptyStatement', + range: [37, 38], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 38 } + } + }], + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + }, + errors: [{ + index: 23, + lineNumber: 1, + column: 24, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }] + }, + + '"use strict"; (function eval() {});': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'eval', + range: [24, 28], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 28 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [31, 33], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 33 } + } + }, + rest: null, + generator: false, + expression: false, + range: [15, 33], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 33 } + } + }, + range: [14, 35], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 35 } + } + }], + range: [0, 35], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 35 } + }, + errors: [{ + index: 24, + lineNumber: 1, + column: 25, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }] + }, + + '"use strict"; (function arguments() {});': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'arguments', + range: [24, 33], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 33 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [36, 38], + loc: { + start: { line: 1, column: 36 }, + end: { line: 1, column: 38 } + } + }, + rest: null, + generator: false, + expression: false, + range: [15, 38], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 38 } + } + }, + range: [14, 40], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 40 } + } + }], + range: [0, 40], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 40 } + }, + errors: [{ + index: 24, + lineNumber: 1, + column: 25, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }] + }, + + '"use strict"; (function interface() {});': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'interface', + range: [24, 33], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 33 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [36, 38], + loc: { + start: { line: 1, column: 36 }, + end: { line: 1, column: 38 } + } + }, + rest: null, + generator: false, + expression: false, + range: [15, 38], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 38 } + } + }, + range: [14, 40], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 40 } + } + }], + range: [0, 40], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 40 } + }, + errors: [{ + index: 24, + lineNumber: 1, + column: 25, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }] + }, + + '"use strict"; function f(eval) {};': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'f', + range: [23, 24], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 24 } + } + }, + params: [{ + type: 'Identifier', + name: 'eval', + range: [25, 29], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 29 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [31, 33], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 33 } + } + }, + rest: null, + generator: false, + expression: false, + range: [14, 33], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 33 } + } + }, { + type: 'EmptyStatement', + range: [33, 34], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 34 } + } + }], + range: [0, 34], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 34 } + }, + errors: [{ + index: 25, + lineNumber: 1, + column: 26, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }] + }, + + '"use strict"; function f(arguments) {};': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'f', + range: [23, 24], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 24 } + } + }, + params: [{ + type: 'Identifier', + name: 'arguments', + range: [25, 34], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 34 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [36, 38], + loc: { + start: { line: 1, column: 36 }, + end: { line: 1, column: 38 } + } + }, + rest: null, + generator: false, + expression: false, + range: [14, 38], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 38 } + } + }, { + type: 'EmptyStatement', + range: [38, 39], + loc: { + start: { line: 1, column: 38 }, + end: { line: 1, column: 39 } + } + }], + range: [0, 39], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 39 } + }, + errors: [{ + index: 25, + lineNumber: 1, + column: 26, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }] + }, + + '"use strict"; function f(foo, foo) {};': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'f', + range: [23, 24], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 24 } + } + }, + params: [{ + type: 'Identifier', + name: 'foo', + range: [25, 28], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 28 } + } + }, { + type: 'Identifier', + name: 'foo', + range: [31, 34], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 34 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [36, 38], + loc: { + start: { line: 1, column: 36 }, + end: { line: 1, column: 38 } + } + }, + rest: null, + generator: false, + expression: false, + range: [14, 38], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 38 } + } + }, { + type: 'EmptyStatement', + range: [38, 39], + loc: { + start: { line: 1, column: 38 }, + end: { line: 1, column: 39 } + } + }], + range: [0, 39], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 39 } + }, + errors: [{ + index: 31, + lineNumber: 1, + column: 32, + message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' + }] + }, + + '"use strict"; (function f(eval) {});': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'f', + range: [24, 25], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 25 } + } + }, + params: [{ + type: 'Identifier', + name: 'eval', + range: [26, 30], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 30 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [32, 34], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 34 } + } + }, + rest: null, + generator: false, + expression: false, + range: [15, 34], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 34 } + } + }, + range: [14, 36], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 36 } + } + }], + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + }, + errors: [{ + index: 26, + lineNumber: 1, + column: 27, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }] + }, + + + '"use strict"; (function f(arguments) {});': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'f', + range: [24, 25], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 25 } + } + }, + params: [{ + type: 'Identifier', + name: 'arguments', + range: [26, 35], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 35 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [37, 39], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 39 } + } + }, + rest: null, + generator: false, + expression: false, + range: [15, 39], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 39 } + } + }, + range: [14, 41], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 41 } + } + }], + range: [0, 41], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 41 } + }, + errors: [{ + index: 26, + lineNumber: 1, + column: 27, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }] + }, + + '"use strict"; (function f(foo, foo) {});': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'f', + range: [24, 25], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 25 } + } + }, + params: [{ + type: 'Identifier', + name: 'foo', + range: [26, 29], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 29 } + } + }, { + type: 'Identifier', + name: 'foo', + range: [32, 35], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 35 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [37, 39], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 39 } + } + }, + rest: null, + generator: false, + expression: false, + range: [15, 39], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 39 } + } + }, + range: [14, 41], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 41 } + } + }], + range: [0, 41], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 41 } + }, + errors: [{ + index: 32, + lineNumber: 1, + column: 33, + message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' + }] + }, + + '"use strict"; x = { set f(eval) {} }' : { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [14, 15], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 15 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'f', + range: [24, 25], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 25 } + } + }, + value : { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'eval', + range: [26, 30], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 30 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [32, 34], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 34 } + } + }, + rest: null, + generator: false, + expression: false, + range: [32, 34], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 34 } + } + }, + kind: 'set', + method: false, + shorthand: false, + range: [20, 34], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 34 } + } + }], + range: [18, 36], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 36 } + } + }, + range: [14, 36], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 36 } + } + }, + range: [14, 36], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 36 } + } + }], + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + }, + errors: [{ + index: 26, + lineNumber: 1, + column: 27, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }] + }, + + 'function hello() { "octal directive\\1"; "use strict"; }': { + type: 'Program', + body: [{ + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'hello', + range: [9, 14], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 14 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'octal directive\u0001', + raw: '"octal directive\\1"', + range: [19, 38], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 38 } + } + }, + range: [19, 39], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 39 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [40, 52], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 52 } + } + }, + range: [40, 53], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 53 } + } + }], + range: [17, 55], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 55 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 55], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 55 } + } + }], + range: [0, 55], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 55 } + }, + errors: [{ + index: 19, + lineNumber: 1, + column: 20, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }] + }, + + '"\\1"; \'use strict\';': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: '\u0001', + raw: '"\\1"', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '\'use strict\'', + range: [6, 18], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 18 } + } + }, + range: [6, 19], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 19 } + } + }], + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + }, + errors: [{ + index: 0, + lineNumber: 1, + column: 1, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }] + }, + + '"use strict"; var x = { 014: 3}': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }, + init: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Literal', + value: 12, + raw: '014', + range: [24, 27], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 27 } + } + }, + value: { + type: 'Literal', + value: 3, + raw: '3', + range: [29, 30], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 30 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [24, 30], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 30 } + } + }], + range: [22, 31], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 31 } + } + }, + range: [18, 31], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 31 } + } + }], + kind: 'var', + range: [14, 31], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 31 } + } + }], + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + }, + errors: [{ + index: 24, + lineNumber: 1, + column: 25, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }] + }, + + '"use strict"; var x = { get i() {}, get i() {} }': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }, + init: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'i', + range: [28, 29], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 29 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [32, 34], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 34 } + } + }, + rest: null, + generator: false, + expression: false, + range: [32, 34], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 34 } + } + }, + kind: 'get', + method: false, + shorthand: false, + range: [24, 34], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 34 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'i', + range: [40, 41], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 41 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [44, 46], + loc: { + start: { line: 1, column: 44 }, + end: { line: 1, column: 46 } + } + }, + rest: null, + generator: false, + expression: false, + range: [44, 46], + loc: { + start: { line: 1, column: 44 }, + end: { line: 1, column: 46 } + } + }, + kind: 'get', + method: false, + shorthand: false, + range: [36, 46], + loc: { + start: { line: 1, column: 36 }, + end: { line: 1, column: 46 } + } + }], + range: [22, 48], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 48 } + } + }, + range: [18, 48], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 48 } + } + }], + kind: 'var', + range: [14, 48], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 48 } + } + }], + range: [0, 48], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 48 } + }, + errors: [{ + index: 46, + lineNumber: 1, + column: 47, + message: 'Error: Line 1: Object literal may not have multiple get/set accessors with the same name' + }] + }, + + '"use strict"; var x = { i: 42, get i() {} }': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }, + init: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'i', + range: [24, 25], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 25 } + } + }, + value: { + type: 'Literal', + value: 42, + raw: '42', + range: [27, 29], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 29 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [24, 29], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 29 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'i', + range: [35, 36], + loc: { + start: { line: 1, column: 35 }, + end: { line: 1, column: 36 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [39, 41], + loc: { + start: { line: 1, column: 39 }, + end: { line: 1, column: 41 } + } + }, + rest: null, + generator: false, + expression: false, + range: [39, 41], + loc: { + start: { line: 1, column: 39 }, + end: { line: 1, column: 41 } + } + }, + kind: 'get', + method: false, + shorthand: false, + range: [31, 41], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 41 } + } + }], + range: [22, 43], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 43 } + } + }, + range: [18, 43], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 43 } + } + }], + kind: 'var', + range: [14, 43], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 43 } + } + }], + range: [0, 43], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 43 } + }, + errors: [{ + index: 41, + lineNumber: 1, + column: 42, + message: 'Error: Line 1: Object literal may not have data and accessor property with the same name' + }] + }, + + '"use strict"; var x = { set i(x) {}, i: 42 }': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }, + init: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'i', + range: [28, 29], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 29 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'x', + range: [30, 31], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 31 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [33, 35], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 35 } + } + }, + rest: null, + generator: false, + expression: false, + range: [33, 35], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 35 } + } + }, + kind: 'set', + method: false, + shorthand: false, + range: [24, 35], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 35 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'i', + range: [37, 38], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 38 } + } + }, + value: { + type: 'Literal', + value: 42, + raw: '42', + range: [40, 42], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 42 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [37, 42], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 42 } + } + }], + range: [22, 44], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 44 } + } + }, + range: [18, 44], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 44 } + } + }], + kind: 'var', + range: [14, 44], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 44 } + } + }], + range: [0, 44], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 44 } + }, + errors: [{ + index: 42, + lineNumber: 1, + column: 43, + message: 'Error: Line 1: Object literal may not have data and accessor property with the same name' + }] + + + } + + + }, +}; diff --git a/pitfall/pdfkit/node_modules/derequire/package.json b/pitfall/pdfkit/node_modules/derequire/package.json new file mode 100644 index 00000000..d4e30705 --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/package.json @@ -0,0 +1,85 @@ +{ + "_args": [ + [ + { + "raw": "derequire@~0.8.0", + "scope": null, + "escapedName": "derequire", + "name": "derequire", + "rawSpec": "~0.8.0", + "spec": ">=0.8.0 <0.9.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/browserify" + ] + ], + "_from": "derequire@>=0.8.0 <0.9.0", + "_id": "derequire@0.8.0", + "_inCache": true, + "_location": "/derequire", + "_npmUser": { + "name": "cwmma", + "email": "calvin.metcalf@gmail.com" + }, + "_npmVersion": "1.4.3", + "_phantomChildren": {}, + "_requested": { + "raw": "derequire@~0.8.0", + "scope": null, + "escapedName": "derequire", + "name": "derequire", + "rawSpec": "~0.8.0", + "spec": ">=0.8.0 <0.9.0", + "type": "range" + }, + "_requiredBy": [ + "/browserify" + ], + "_resolved": "https://registry.npmjs.org/derequire/-/derequire-0.8.0.tgz", + "_shasum": "c1f7f1da2cede44adede047378f03f444e9c4c0d", + "_shrinkwrap": null, + "_spec": "derequire@~0.8.0", + "_where": "/Users/MB/git/pdfkit/node_modules/browserify", + "author": { + "name": "Calvin Metcalf" + }, + "bugs": { + "url": "https://github.com/calvinmetcalf/derequire/issues" + }, + "dependencies": { + "esprima-fb": "^3001.1.0-dev-harmony-fb", + "esrefactor": "~0.1.0", + "estraverse": "~1.5.0" + }, + "description": "remove requires", + "devDependencies": { + "chai": "~1.8.1", + "istanbul": "~0.2.1", + "mocha": "~1.16.2" + }, + "directories": {}, + "dist": { + "shasum": "c1f7f1da2cede44adede047378f03f444e9c4c0d", + "tarball": "https://registry.npmjs.org/derequire/-/derequire-0.8.0.tgz" + }, + "homepage": "https://github.com/calvinmetcalf/derequire", + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "cwmma", + "email": "calvin.metcalf@gmail.com" + } + ], + "name": "derequire", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/calvinmetcalf/derequire.git" + }, + "scripts": { + "test": "istanbul test ./node_modules/mocha/bin/_mocha test/test.js" + }, + "version": "0.8.0" +} diff --git a/pitfall/pdfkit/node_modules/derequire/readme.md b/pitfall/pdfkit/node_modules/derequire/readme.md new file mode 100644 index 00000000..d6f48a6f --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/readme.md @@ -0,0 +1,15 @@ +derequire +==== + +```bash +npm install derequire +``` + +```javascript +var derequire = require('derequire'); +var transformedCode = derequire(code, /*tokenTo=*/'_dereq_', /*tokenFrom=*/'require'); +``` + +takes a string of code and replaces all instances of the identifier `tokenFrom` (default 'require') and replaces them with tokenTo (default '\_dereq\_') but only if they are functional arguments and subsequent uses of said argument, then returnes the code. + +__Note:__ in order to avoid quite a few headaches the token you're changing from and the token you're changing to need to be the same length. diff --git a/pitfall/pdfkit/node_modules/derequire/test/cjs-lazy.js b/pitfall/pdfkit/node_modules/derequire/test/cjs-lazy.js new file mode 100644 index 00000000..10a1d07c --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/test/cjs-lazy.js @@ -0,0 +1,6 @@ +(function (require) { + var jQuery; + if (!jQuery && typeof require === 'function') { + jQuery = something('jquery'); + } +})() diff --git a/pitfall/pdfkit/node_modules/derequire/test/cjs-smartass.dereq.js b/pitfall/pdfkit/node_modules/derequire/test/cjs-smartass.dereq.js new file mode 100644 index 00000000..f0815176 --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/test/cjs-smartass.dereq.js @@ -0,0 +1,6 @@ +(function (_dereq_) { + var jQuery; + if (!jQuery && typeof _dereq_ === 'function') { + jQuery = _dereq_('jquery'); + } +})() diff --git a/pitfall/pdfkit/node_modules/derequire/test/cjs-smartass.js b/pitfall/pdfkit/node_modules/derequire/test/cjs-smartass.js new file mode 100644 index 00000000..82e8abb6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/test/cjs-smartass.js @@ -0,0 +1,6 @@ +(function (require) { + var jQuery; + if (!jQuery && typeof require === 'function') { + jQuery = require('jquery'); + } +})() diff --git a/pitfall/pdfkit/node_modules/derequire/test/pouchdb.dereq.js b/pitfall/pdfkit/node_modules/derequire/test/pouchdb.dereq.js new file mode 100644 index 00000000..28d17231 --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/test/pouchdb.dereq.js @@ -0,0 +1,5892 @@ +!function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):"undefined"!=typeof window?window.PouchDB=e():"undefined"!=typeof global?global.PouchDB=e():"undefined"!=typeof self&&(self.PouchDB=e())}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o max_height) { + candidates.push(rev); + } + }); + + merge.traverseRevTree(rev_tree, function (isLeaf, pos, revHash, ctx, opts) { + var rev = pos + '-' + revHash; + if (opts.status === 'available' && candidates.indexOf(rev) !== -1) { + opts.status = 'missing'; + revs.push(rev); + } + }); + customApi._doCompaction(docId, rev_tree, revs, callback); + }); + } + + // compact the whole database using single document + // compaction + api.compact = function (opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + api.changes({complete: function (err, res) { + if (err) { + call(callback); // TODO: silently fail + return; + } + var count = res.results.length; + if (!count) { + call(callback); + return; + } + res.results.forEach(function (row) { + compactDocument(row.id, 0, function () { + count--; + if (!count) { + call(callback); + } + }); + }); + }}); + }; + + /* Begin api wrappers. Specific functionality to storage belongs in the _[method] */ + api.get = function (id, opts, callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('get', arguments); + return; + } + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + + var leaves = []; + function finishOpenRevs() { + var result = []; + var count = leaves.length; + if (!count) { + return call(callback, null, result); + } + // order with open_revs is unspecified + leaves.forEach(function (leaf) { + api.get(id, {rev: leaf, revs: opts.revs}, function (err, doc) { + if (!err) { + result.push({ok: doc}); + } else { + result.push({missing: leaf}); + } + count--; + if (!count) { + call(callback, null, result); + } + }); + }); + } + + if (opts.open_revs) { + if (opts.open_revs === "all") { + customApi._getRevisionTree(id, function (err, rev_tree) { + if (err) { + // if there's no such document we should treat this + // situation the same way as if revision tree was empty + rev_tree = []; + } + leaves = merge.collectLeaves(rev_tree).map(function (leaf) { + return leaf.rev; + }); + finishOpenRevs(); + }); + } else { + if (Array.isArray(opts.open_revs)) { + leaves = opts.open_revs; + for (var i = 0; i < leaves.length; i++) { + var l = leaves[i]; + // looks like it's the only thing couchdb checks + if (!(typeof(l) === "string" && /^\d+-/.test(l))) { + return call(callback, errors.error(errors.BAD_REQUEST, + "Invalid rev format")); + } + } + finishOpenRevs(); + } else { + return call(callback, errors.error(errors.UNKNOWN_ERROR, + 'function_clause')); + } + } + return; // open_revs does not like other options + } + + return customApi._get(id, opts, function (err, result) { + if (err) { + return call(callback, err); + } + + var doc = result.doc; + var metadata = result.metadata; + var ctx = result.ctx; + + if (opts.conflicts) { + var conflicts = merge.collectConflicts(metadata); + if (conflicts.length) { + doc._conflicts = conflicts; + } + } + + if (opts.revs || opts.revs_info) { + var paths = merge.rootToLeaf(metadata.rev_tree); + var path = arrayFirst(paths, function (arr) { + return arr.ids.map(function (x) { return x.id; }) + .indexOf(doc._rev.split('-')[1]) !== -1; + }); + + path.ids.splice(path.ids.map(function (x) {return x.id; }) + .indexOf(doc._rev.split('-')[1]) + 1); + path.ids.reverse(); + + if (opts.revs) { + doc._revisions = { + start: (path.pos + path.ids.length) - 1, + ids: path.ids.map(function (rev) { + return rev.id; + }) + }; + } + if (opts.revs_info) { + var pos = path.pos + path.ids.length; + doc._revs_info = path.ids.map(function (rev) { + pos--; + return { + rev: pos + '-' + rev.id, + status: rev.opts.status + }; + }); + } + } + + if (opts.local_seq) { + doc._local_seq = result.metadata.seq; + } + + if (opts.attachments && doc._attachments) { + var attachments = doc._attachments; + var count = Object.keys(attachments).length; + if (count === 0) { + return call(callback, null, doc); + } + Object.keys(attachments).forEach(function (key) { + customApi._getAttachment(attachments[key], {encode: true, ctx: ctx}, function (err, data) { + doc._attachments[key].data = data; + if (!--count) { + call(callback, null, doc); + } + }); + }); + } else { + if (doc._attachments) { + for (var key in doc._attachments) { + doc._attachments[key].stub = true; + } + } + call(callback, null, doc); + } + }); + }; + + api.getAttachment = function (docId, attachmentId, opts, callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('getAttachment', arguments); + return; + } + if (opts instanceof Function) { + callback = opts; + opts = {}; + } + customApi._get(docId, opts, function (err, res) { + if (err) { + return call(callback, err); + } + if (res.doc._attachments && res.doc._attachments[attachmentId]) { + opts.ctx = res.ctx; + customApi._getAttachment(res.doc._attachments[attachmentId], opts, callback); + } else { + return call(callback, errors.MISSING_DOC); + } + }); + }; + + api.allDocs = function (opts, callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('allDocs', arguments); + return; + } + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + if ('keys' in opts) { + if ('startkey' in opts) { + call(callback, errors.error(errors.QUERY_PARSE_ERROR, + 'Query parameter `start_key` is not compatible with multi-get' + )); + return; + } + if ('endkey' in opts) { + call(callback, errors.error(errors.QUERY_PARSE_ERROR, + 'Query parameter `end_key` is not compatible with multi-get' + )); + return; + } + } + if (typeof opts.skip === 'undefined') { + opts.skip = 0; + } + + return customApi._allDocs(opts, callback); + }; + + function processChange(doc, metadata, opts) { + var changeList = [{rev: doc._rev}]; + if (opts.style === 'all_docs') { + changeList = merge.collectLeaves(metadata.rev_tree) + .map(function (x) { return {rev: x.rev}; }); + } + var change = { + id: metadata.id, + changes: changeList, + doc: doc + }; + + if (utils.isDeleted(metadata, doc._rev)) { + change.deleted = true; + } + if (opts.conflicts) { + change.doc._conflicts = merge.collectConflicts(metadata); + if (!change.doc._conflicts.length) { + delete change.doc._conflicts; + } + } + return change; + } + api.changes = function (opts) { + if (!api.taskqueue.ready()) { + var task = api.taskqueue.addTask('changes', arguments); + return { + cancel: function () { + if (task.task) { + return task.task.cancel(); + } + if (Pouch.DEBUG) { + //console.log('Cancel Changes Feed'); + } + task.parameters[0].aborted = true; + } + }; + } + opts = utils.extend(true, {}, opts); + opts.processChange = processChange; + + if (!opts.since) { + opts.since = 0; + } + if (opts.since === 'latest') { + var changes; + api.info(function (err, info) { + if (!opts.aborted) { + opts.since = info.update_seq - 1; + api.changes(opts); + } + }); + // Return a method to cancel this method from processing any more + return { + cancel: function () { + if (changes) { + return changes.cancel(); + } + if (Pouch.DEBUG) { + //console.log('Cancel Changes Feed'); + } + opts.aborted = true; + } + }; + } + + if (opts.filter && typeof opts.filter === 'string') { + if (opts.filter === '_view') { + if (opts.view && typeof opts.view === 'string') { + // fetch a view from a design doc, make it behave like a filter + var viewName = opts.view.split('/'); + api.get('_design/' + viewName[0], function (err, ddoc) { + if (ddoc && ddoc.views && ddoc.views[viewName[1]]) { + /*jshint evil: true */ + var filter = eval('(function () {' + + ' return function (doc) {' + + ' var emitted = false;' + + ' var emit = function (a, b) {' + + ' emitted = true;' + + ' };' + + ' var view = ' + ddoc.views[viewName[1]].map + ';' + + ' view(doc);' + + ' if (emitted) {' + + ' return true;' + + ' }' + + ' }' + + '})()'); + if (!opts.aborted) { + opts.filter = filter; + api.changes(opts); + } + } else { + var msg = ddoc.views ? 'missing json key: ' + viewName[1] : + 'missing json key: views'; + err = err || errors.error(errors.MISSING_DOC, msg); + utils.call(opts.complete, err); + } + }); + } else { + var err = errors.error(errors.BAD_REQUEST, + '`view` filter parameter is not provided.'); + utils.call(opts.complete, err); + } + } else { + // fetch a filter from a design doc + var filterName = opts.filter.split('/'); + api.get('_design/' + filterName[0], function (err, ddoc) { + if (ddoc && ddoc.filters && ddoc.filters[filterName[1]]) { + /*jshint evil: true */ + var filter = eval('(function () { return ' + + ddoc.filters[filterName[1]] + ' })()'); + if (!opts.aborted) { + opts.filter = filter; + api.changes(opts); + } + } else { + var msg = (ddoc && ddoc.filters) ? 'missing json key: ' + filterName[1] + : 'missing json key: filters'; + err = err || errors.error(errors.MISSING_DOC, msg); + utils.call(opts.complete, err); + } + }); + } + // Return a method to cancel this method from processing any more + return { + cancel: function () { + if (Pouch.DEBUG) { + console.log('Cancel Changes Feed'); + } + opts.aborted = true; + } + }; + } + + if (!('descending' in opts)) { + opts.descending = false; + } + + // 0 and 1 should return 1 document + opts.limit = opts.limit === 0 ? 1 : opts.limit; + return customApi._changes(opts); + }; + + api.close = function (callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('close', arguments); + return; + } + return customApi._close(callback); + }; + + api.info = function (callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('info', arguments); + return; + } + return customApi._info(callback); + }; + + api.id = function () { + return customApi._id(); + }; + + api.type = function () { + return (typeof customApi._type === 'function') ? customApi._type() : opts.adapter; + }; + + api.bulkDocs = function (req, opts, callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('bulkDocs', arguments); + return; + } + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + if (!opts) { + opts = {}; + } else { + opts = utils.extend(true, {}, opts); + } + + if (!req || !req.docs || req.docs.length < 1) { + return call(callback, errors.MISSING_BULK_DOCS); + } + + if (!Array.isArray(req.docs)) { + return call(callback, errors.QUERY_PARSE_ERROR); + } + + for (var i = 0; i < req.docs.length; ++i) { + if (typeof req.docs[i] !== 'object' || Array.isArray(req.docs[i])) { + return call(callback, errors.NOT_AN_OBJECT); + } + } + + req = utils.extend(true, {}, req); + if (!('new_edits' in opts)) { + opts.new_edits = true; + } + + return customApi._bulkDocs(req, opts, autoCompact(callback)); + }; + + /* End Wrappers */ + var taskqueue = {}; + + taskqueue.ready = false; + taskqueue.queue = []; + + api.taskqueue = {}; + + api.taskqueue.execute = function (db) { + if (taskqueue.ready) { + taskqueue.queue.forEach(function (d) { + d.task = db[d.name].apply(null, d.parameters); + }); + } + }; + + api.taskqueue.ready = function () { + if (arguments.length === 0) { + return taskqueue.ready; + } + taskqueue.ready = arguments[0]; + }; + + api.taskqueue.addTask = function (name, parameters) { + var task = { name: name, parameters: parameters }; + taskqueue.queue.push(task); + return task; + }; + + api.replicate = {}; + + api.replicate.from = function (url, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + return Pouch.replicate(url, customApi, opts, callback); + }; + + api.replicate.to = function (dbName, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + return Pouch.replicate(customApi, dbName, opts, callback); + }; + + for (var j in api) { + if (!customApi.hasOwnProperty(j)) { + customApi[j] = api[j]; + } + } + + // Http adapter can skip setup so we force the db to be ready and execute any jobs + if (opts.skipSetup) { + api.taskqueue.ready(true); + api.taskqueue.execute(api); + } + + if (utils.isCordova()) { + //to inform websql adapter that we can use api + cordova.fireWindowEvent(opts.name + "_pouch", {}); + } + return customApi; + }; +}; + +},{"./deps/errors":8,"./merge":13,"./utils":16}],2:[function(_dereq_,module,exports){ +"use strict"; + +var utils = _dereq_('../utils'); +var errors = _dereq_('../deps/errors'); + +// parseUri 1.2.2 +// (c) Steven Levithan +// MIT License +function parseUri(str) { + var o = parseUri.options; + var m = o.parser[o.strictMode ? "strict" : "loose"].exec(str); + var uri = {}; + var i = 14; + + while (i--) { + uri[o.key[i]] = m[i] || ""; + } + + uri[o.q.name] = {}; + uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) { + if ($1) { + uri[o.q.name][$1] = $2; + } + }); + + return uri; +} + +function encodeDocId(id) { + if (/^_(design|local)/.test(id)) { + return id; + } + return encodeURIComponent(id); +} + +parseUri.options = { + strictMode: false, + key: ["source", "protocol", "authority", "userInfo", "user", "password", "host", + "port", "relative", "path", "directory", "file", "query", "anchor"], + q: { + name: "queryKey", + parser: /(?:^|&)([^&=]*)=?([^&]*)/g + }, + parser: { + strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/, + loose: /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/ + } +}; + +// Get all the information you possibly can about the URI given by name and +// return it as a suitable object. +function getHost(name, opts) { + // If the given name contains "http:" + if (/http(s?):/.test(name)) { + // Prase the URI into all its little bits + var uri = parseUri(name); + + // Store the fact that it is a remote URI + uri.remote = true; + + // Store the user and password as a separate auth object + if (uri.user || uri.password) { + uri.auth = {username: uri.user, password: uri.password}; + } + + // Split the path part of the URI into parts using '/' as the delimiter + // after removing any leading '/' and any trailing '/' + var parts = uri.path.replace(/(^\/|\/$)/g, '').split('/'); + + // Store the first part as the database name and remove it from the parts + // array + uri.db = parts.pop(); + + // Restore the path by joining all the remaining parts (all the parts + // except for the database name) with '/'s + uri.path = parts.join('/'); + opts = opts || {}; + uri.headers = opts.headers || {}; + + if (opts.auth || uri.auth) { + var nAuth = opts.auth || uri.auth; + var token = utils.btoa(nAuth.username + ':' + nAuth.password); + uri.headers.Authorization = 'Basic ' + token; + } + + if (opts.headers) { + uri.headers = opts.headers; + } + + return uri; + } + + // If the given name does not contain 'http:' then return a very basic object + // with no host, the current path, the given name as the database name and no + // username/password + return {host: '', path: '/', db: name, auth: false}; +} + +// Generate a URL with the host data given by opts and the given path +function genDBUrl(opts, path) { + // If the host is remote + if (opts.remote) { + // If the host already has a path, then we need to have a path delimiter + // Otherwise, the path delimiter is the empty string + var pathDel = !opts.path ? '' : '/'; + + // Return the URL made up of all the host's information and the given path + return opts.protocol + '://' + opts.host + ':' + opts.port + '/' + + opts.path + pathDel + opts.db + '/' + path; + } + + // If the host is not remote, then return the URL made up of just the + // database name and the given path + return '/' + opts.db + '/' + path; +} + +// Generate a URL with the host data given by opts and the given path +function genUrl(opts, path) { + if (opts.remote) { + // If the host already has a path, then we need to have a path delimiter + // Otherwise, the path delimiter is the empty string + var pathDel = !opts.path ? '' : '/'; + + // If the host already has a path, then we need to have a path delimiter + // Otherwise, the path delimiter is the empty string + return opts.protocol + '://' + opts.host + ':' + opts.port + '/' + opts.path + pathDel + path; + } + + return '/' + path; +} + +// Implements the PouchDB API for dealing with CouchDB instances over HTTP +function HttpPouch(opts, callback) { + + // Parse the URI given by opts.name into an easy-to-use object + var host = getHost(opts.name, opts); + + // Generate the database URL based on the host + var db_url = genDBUrl(host, ''); + + // The functions that will be publically available for HttpPouch + var api = {}; + var ajaxOpts = opts.ajax || {}; + function ajax(options, callback) { + return utils.ajax(utils.extend({}, ajaxOpts, options), callback); + } + var uuids = { + list: [], + get: function (opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {count: 10}; + } + var cb = function (err, body) { + if (err || !('uuids' in body)) { + utils.call(callback, err || errors.UNKNOWN_ERROR); + } else { + uuids.list = uuids.list.concat(body.uuids); + utils.call(callback, null, "OK"); + } + }; + var params = '?count=' + opts.count; + ajax({ + headers: host.headers, + method: 'GET', + url: genUrl(host, '_uuids') + params + }, cb); + } + }; + + // Create a new CouchDB database based on the given opts + var createDB = function () { + ajax({headers: host.headers, method: 'PUT', url: db_url}, function (err, ret) { + // If we get an "Unauthorized" error + if (err && err.status === 401) { + // Test if the database already exists + ajax({headers: host.headers, method: 'HEAD', url: db_url}, function (err, ret) { + // If there is still an error + if (err) { + // Give the error to the callback to deal with + utils.call(callback, err); + } else { + // Continue as if there had been no errors + utils.call(callback, null, api); + } + }); + // If there were no errros or if the only error is "Precondition Failed" + // (note: "Precondition Failed" occurs when we try to create a database + // that already exists) + } else if (!err || err.status === 412) { + // Continue as if there had been no errors + utils.call(callback, null, api); + } else { + utils.call(callback, errors.UNKNOWN_ERROR); + } + }); + }; + if (!opts.skipSetup) { + ajax({headers: host.headers, method: 'GET', url: db_url}, function (err, ret) { + //check if the db exists + if (err) { + if (err.status === 404) { + //if it doesn't, create it + createDB(); + } else { + utils.call(callback, err); + } + } else { + //go do stuff with the db + utils.call(callback, null, api); + } + }); + } + + api.type = function () { + return 'http'; + }; + + // The HttpPouch's ID is its URL + api.id = function () { + return genDBUrl(host, ''); + }; + + api.request = function (options, callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('request', arguments); + return; + } + options.headers = host.headers; + options.url = genDBUrl(host, options.url); + ajax(options, callback); + }; + + // Sends a POST request to the host calling the couchdb _compact function + // version: The version of CouchDB it is running + api.compact = function (opts, callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('compact', arguments); + return; + } + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + ajax({ + headers: host.headers, + url: genDBUrl(host, '_compact'), + method: 'POST' + }, function () { + function ping() { + api.info(function (err, res) { + if (!res.compact_running) { + utils.call(callback, null); + } else { + setTimeout(ping, opts.interval || 200); + } + }); + } + // Ping the http if it's finished compaction + if (typeof callback === "function") { + ping(); + } + }); + }; + + // Calls GET on the host, which gets back a JSON string containing + // couchdb: A welcome string + // version: The version of CouchDB it is running + api.info = function (callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('info', arguments); + return; + } + ajax({ + headers: host.headers, + method: 'GET', + url: genDBUrl(host, '') + }, callback); + }; + + // Get the document with the given id from the database given by host. + // The id could be solely the _id in the database, or it may be a + // _design/ID or _local/ID path + api.get = function (id, opts, callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('get', arguments); + return; + } + // If no options were given, set the callback to the second parameter + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + + if (opts.auto_encode === undefined) { + opts.auto_encode = true; + } + + // List of parameters to add to the GET request + var params = []; + + // If it exists, add the opts.revs value to the list of parameters. + // If revs=true then the resulting JSON will include a field + // _revisions containing an array of the revision IDs. + if (opts.revs) { + params.push('revs=true'); + } + + // If it exists, add the opts.revs_info value to the list of parameters. + // If revs_info=true then the resulting JSON will include the field + // _revs_info containing an array of objects in which each object + // representing an available revision. + if (opts.revs_info) { + params.push('revs_info=true'); + } + + if (opts.local_seq) { + params.push('local_seq=true'); + } + // If it exists, add the opts.open_revs value to the list of parameters. + // If open_revs=all then the resulting JSON will include all the leaf + // revisions. If open_revs=["rev1", "rev2",...] then the resulting JSON + // will contain an array of objects containing data of all revisions + if (opts.open_revs) { + if (opts.open_revs !== "all") { + opts.open_revs = JSON.stringify(opts.open_revs); + } + params.push('open_revs=' + opts.open_revs); + } + + // If it exists, add the opts.attachments value to the list of parameters. + // If attachments=true the resulting JSON will include the base64-encoded + // contents in the "data" property of each attachment. + if (opts.attachments) { + params.push('attachments=true'); + } + + // If it exists, add the opts.rev value to the list of parameters. + // If rev is given a revision number then get the specified revision. + if (opts.rev) { + params.push('rev=' + opts.rev); + } + + // If it exists, add the opts.conflicts value to the list of parameters. + // If conflicts=true then the resulting JSON will include the field + // _conflicts containing all the conflicting revisions. + if (opts.conflicts) { + params.push('conflicts=' + opts.conflicts); + } + + // Format the list of parameters into a valid URI query string + params = params.join('&'); + params = params === '' ? '' : '?' + params; + + if (opts.auto_encode) { + id = encodeDocId(id); + } + + // Set the options for the ajax call + var options = { + headers: host.headers, + method: 'GET', + url: genDBUrl(host, id + params) + }; + + // If the given id contains at least one '/' and the part before the '/' + // is NOT "_design" and is NOT "_local" + // OR + // If the given id contains at least two '/' and the part before the first + // '/' is "_design". + // TODO This second condition seems strange since if parts[0] === '_design' + // then we already know that parts[0] !== '_local'. + var parts = id.split('/'); + if ((parts.length > 1 && parts[0] !== '_design' && parts[0] !== '_local') || + (parts.length > 2 && parts[0] === '_design' && parts[0] !== '_local')) { + // Binary is expected back from the server + options.binary = true; + } + + // Get the document + ajax(options, function (err, doc, xhr) { + // If the document does not exist, send an error to the callback + if (err) { + return utils.call(callback, err); + } + + // Send the document to the callback + utils.call(callback, null, doc, xhr); + }); + }; + + // Delete the document given by doc from the database given by host. + api.remove = function (doc, opts, callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('remove', arguments); + return; + } + // If no options were given, set the callback to be the second parameter + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + + // Delete the document + ajax({ + headers: host.headers, + method: 'DELETE', + url: genDBUrl(host, encodeDocId(doc._id)) + '?rev=' + doc._rev + }, callback); + }; + + // Get the attachment + api.getAttachment = function (docId, attachmentId, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + if (opts.auto_encode === undefined) { + opts.auto_encode = true; + } + if (opts.auto_encode) { + docId = encodeDocId(docId); + } + opts.auto_encode = false; + api.get(docId + '/' + attachmentId, opts, callback); + }; + + // Remove the attachment given by the id and rev + api.removeAttachment = function (docId, attachmentId, rev, callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('removeAttachment', arguments); + return; + } + ajax({ + headers: host.headers, + method: 'DELETE', + url: genDBUrl(host, encodeDocId(docId) + '/' + attachmentId) + '?rev=' + rev + }, callback); + }; + + // Add the attachment given by blob and its contentType property + // to the document with the given id, the revision given by rev, and + // add it to the database given by host. + api.putAttachment = function (docId, attachmentId, rev, blob, type, callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('putAttachment', arguments); + return; + } + if (typeof type === 'function') { + callback = type; + type = blob; + blob = rev; + rev = null; + } + if (typeof type === 'undefined') { + type = blob; + blob = rev; + rev = null; + } + var id = encodeDocId(docId) + '/' + attachmentId; + var url = genDBUrl(host, id); + if (rev) { + url += '?rev=' + rev; + } + + var opts = { + headers: host.headers, + method: 'PUT', + url: url, + processData: false, + body: blob, + timeout: 60000 + }; + opts.headers['Content-Type'] = type; + // Add the attachment + ajax(opts, callback); + }; + + // Add the document given by doc (in JSON string format) to the database + // given by host. This fails if the doc has no _id field. + api.put = function (doc, opts, callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('put', arguments); + return; + } + // If no options were given, set the callback to be the second parameter + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + if (typeof doc !== 'object') { + return utils.call(callback, errors.NOT_AN_OBJECT); + } + if (!utils.isValidId(doc._id)) { + return utils.call(callback, errors.MISSING_ID); + } + + // List of parameter to add to the PUT request + var params = []; + + // If it exists, add the opts.new_edits value to the list of parameters. + // If new_edits = false then the database will NOT assign this document a + // new revision number + if (opts && typeof opts.new_edits !== 'undefined') { + params.push('new_edits=' + opts.new_edits); + } + + // Format the list of parameters into a valid URI query string + params = params.join('&'); + if (params !== '') { + params = '?' + params; + } + + // Add the document + ajax({ + headers: host.headers, + method: 'PUT', + url: genDBUrl(host, encodeDocId(doc._id)) + params, + body: doc + }, callback); + }; + + // Add the document given by doc (in JSON string format) to the database + // given by host. This does not assume that doc is a new document (i.e. does not + // have a _id or a _rev field. + api.post = function (doc, opts, callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('post', arguments); + return; + } + // If no options were given, set the callback to be the second parameter + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + if (typeof doc !== 'object') { + return utils.call(callback, errors.NOT_AN_OBJECT); + } + if (! ("_id" in doc)) { + if (uuids.list.length > 0) { + doc._id = uuids.list.pop(); + api.put(doc, opts, callback); + } else { + uuids.get(function (err, resp) { + if (err) { + return utils.call(callback, errors.UNKNOWN_ERROR); + } + doc._id = uuids.list.pop(); + api.put(doc, opts, callback); + }); + } + } else { + api.put(doc, opts, callback); + } + }; + + // Update/create multiple documents given by req in the database + // given by host. + api.bulkDocs = function (req, opts, callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('bulkDocs', arguments); + return; + } + // If no options were given, set the callback to be the second parameter + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + if (!opts) { + opts = {}; + } + + // If opts.new_edits exists add it to the document data to be + // send to the database. + // If new_edits=false then it prevents the database from creating + // new revision numbers for the documents. Instead it just uses + // the old ones. This is used in database replication. + if (typeof opts.new_edits !== 'undefined') { + req.new_edits = opts.new_edits; + } + + // Update/create the documents + ajax({ + headers: host.headers, + method: 'POST', + url: genDBUrl(host, '_bulk_docs'), + body: req + }, callback); + }; + + // Get a listing of the documents in the database given + // by host and ordered by increasing id. + api.allDocs = function (opts, callback) { + // If no options were given, set the callback to be the second parameter + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('allDocs', arguments); + return; + } + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + + // List of parameters to add to the GET request + var params = []; + var body; + var method = 'GET'; + + // TODO I don't see conflicts as a valid parameter for a + // _all_docs request (see http://wiki.apache.org/couchdb/HTTP_Document_API#all_docs) + if (opts.conflicts) { + params.push('conflicts=true'); + } + + // If opts.descending is truthy add it to params + if (opts.descending) { + params.push('descending=true'); + } + + // If opts.include_docs exists, add the include_docs value to the + // list of parameters. + // If include_docs=true then include the associated document with each + // result. + if (opts.include_docs) { + params.push('include_docs=true'); + } + + // If opts.startkey exists, add the startkey value to the list of + // parameters. + // If startkey is given then the returned list of documents will + // start with the document whose id is startkey. + if (opts.startkey) { + params.push('startkey=' + + encodeURIComponent(JSON.stringify(opts.startkey))); + } + + // If opts.endkey exists, add the endkey value to the list of parameters. + // If endkey is given then the returned list of docuemnts will + // end with the document whose id is endkey. + if (opts.endkey) { + params.push('endkey=' + encodeURIComponent(JSON.stringify(opts.endkey))); + } + + // If opts.limit exists, add the limit value to the parameter list. + if (opts.limit) { + params.push('limit=' + opts.limit); + } + + if (typeof opts.skip !== 'undefined') { + params.push('skip=' + opts.skip); + } + + // Format the list of parameters into a valid URI query string + params = params.join('&'); + if (params !== '') { + params = '?' + params; + } + + // If keys are supplied, issue a POST request to circumvent GET query string limits + // see http://wiki.apache.org/couchdb/HTTP_view_API#Querying_Options + if (typeof opts.keys !== 'undefined') { + method = 'POST'; + body = JSON.stringify({keys: opts.keys}); + } + + // Get the document listing + ajax({ + headers: host.headers, + method: method, + url: genDBUrl(host, '_all_docs' + params), + body: body + }, callback); + }; + + // Get a list of changes made to documents in the database given by host. + // TODO According to the README, there should be two other methods here, + // api.changes.addListener and api.changes.removeListener. + api.changes = function (opts) { + + // We internally page the results of a changes request, this means + // if there is a large set of changes to be returned we can start + // processing them quicker instead of waiting on the entire + // set of changes to return and attempting to process them at once + var CHANGES_LIMIT = 25; + + if (!api.taskqueue.ready()) { + var task = api.taskqueue.addTask('changes', arguments); + return { + cancel: function () { + if (task.task) { + return task.task.cancel(); + } + //console.log(db_url + ': Cancel Changes Feed'); + task.parameters[0].aborted = true; + } + }; + } + + if (opts.since === 'latest') { + var changes; + api.info(function (err, info) { + if (!opts.aborted) { + opts.since = info.update_seq; + changes = api.changes(opts); + } + }); + // Return a method to cancel this method from processing any more + return { + cancel: function () { + if (changes) { + return changes.cancel(); + } + //console.log(db_url + ': Cancel Changes Feed'); + opts.aborted = true; + } + }; + } + + //console.log(db_url + ': Start Changes Feed: continuous=' + opts.continuous); + + var params = {}; + var limit = (typeof opts.limit !== 'undefined') ? opts.limit : false; + if (limit === 0) { + limit = 1; + } + // + var leftToFetch = limit; + + if (opts.style) { + params.style = opts.style; + } + + if (opts.include_docs || opts.filter && typeof opts.filter === 'function') { + params.include_docs = true; + } + + if (opts.continuous) { + params.feed = 'longpoll'; + } + + if (opts.conflicts) { + params.conflicts = true; + } + + if (opts.descending) { + params.descending = true; + } + + if (opts.filter && typeof opts.filter === 'string') { + params.filter = opts.filter; + if (opts.filter === '_view' && opts.view && typeof opts.view === 'string') { + params.view = opts.view; + } + } + + // If opts.query_params exists, pass it through to the changes request. + // These parameters may be used by the filter on the source database. + if (opts.query_params && typeof opts.query_params === 'object') { + for (var param_name in opts.query_params) { + if (opts.query_params.hasOwnProperty(param_name)) { + params[param_name] = opts.query_params[param_name]; + } + } + } + + var xhr; + var lastFetchedSeq; + var remoteLastSeq; + var pagingCount; + + // Get all the changes starting wtih the one immediately after the + // sequence number given by since. + var fetch = function (since, callback) { + params.since = since; + if (!opts.continuous && !pagingCount) { + pagingCount = remoteLastSeq; + } + params.limit = (!limit || leftToFetch > CHANGES_LIMIT) ? + CHANGES_LIMIT : leftToFetch; + + var paramStr = '?' + Object.keys(params).map(function (k) { + return k + '=' + params[k]; + }).join('&'); + + // Set the options for the ajax call + var xhrOpts = { + headers: host.headers, + method: 'GET', + url: genDBUrl(host, '_changes' + paramStr), + // _changes can take a long time to generate, especially when filtered + timeout: null + }; + lastFetchedSeq = since; + + if (opts.aborted) { + return; + } + + // Get the changes + xhr = ajax(xhrOpts, callback); + }; + + // If opts.since exists, get all the changes from the sequence + // number given by opts.since. Otherwise, get all the changes + // from the sequence number 0. + var fetchTimeout = 10; + var fetchRetryCount = 0; + + var results = {results: []}; + + var fetched = function (err, res) { + // If the result of the ajax call (res) contains changes (res.results) + if (res && res.results) { + results.last_seq = res.last_seq; + // For each change + var req = {}; + req.query = opts.query_params; + res.results = res.results.filter(function (c) { + leftToFetch--; + var ret = utils.filterChange(opts)(c); + if (ret) { + results.results.push(c); + utils.call(opts.onChange, c); + } + return ret; + }); + } else if (err) { + // In case of an error, stop listening for changes and call opts.complete + opts.aborted = true; + utils.call(opts.complete, err, null); + } + + // The changes feed may have timed out with no results + // if so reuse last update sequence + if (res && res.last_seq) { + lastFetchedSeq = res.last_seq; + } + + var resultsLength = res && res.results.length || 0; + + pagingCount -= CHANGES_LIMIT; + + var finished = (limit && leftToFetch <= 0) || + (res && !resultsLength && pagingCount <= 0) || + (resultsLength && res.last_seq === remoteLastSeq) || + (opts.descending && lastFetchedSeq !== 0); + + if (opts.continuous || !finished) { + // Increase retry delay exponentially as long as errors persist + if (err) { + fetchRetryCount += 1; + } else { + fetchRetryCount = 0; + } + var timeoutMultiplier = 1 << fetchRetryCount; + var retryWait = fetchTimeout * timeoutMultiplier; + var maximumWait = opts.maximumWait || 30000; + + if (retryWait > maximumWait) { + utils.call(opts.complete, err || errors.UNKNOWN_ERROR, null); + } + + // Queue a call to fetch again with the newest sequence number + setTimeout(function () { fetch(lastFetchedSeq, fetched); }, retryWait); + } else { + // We're done, call the callback + utils.call(opts.complete, null, results); + } + }; + + // If we arent doing a continuous changes request we need to know + // the current update_seq so we know when to stop processing the + // changes + if (opts.continuous) { + fetch(opts.since || 0, fetched); + } else { + api.info(function (err, res) { + if (err) { + return utils.call(opts.complete, err); + } + remoteLastSeq = res.update_seq; + fetch(opts.since || 0, fetched); + }); + } + + // Return a method to cancel this method from processing any more + return { + cancel: function () { + //console.log(db_url + ': Cancel Changes Feed'); + opts.aborted = true; + xhr.abort(); + } + }; + }; + + // Given a set of document/revision IDs (given by req), tets the subset of + // those that do NOT correspond to revisions stored in the database. + // See http://wiki.apache.org/couchdb/HttpPostRevsDiff + api.revsDiff = function (req, opts, callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('revsDiff', arguments); + return; + } + // If no options were given, set the callback to be the second parameter + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + + // Get the missing document/revision IDs + ajax({ + headers: host.headers, + method: 'POST', + url: genDBUrl(host, '_revs_diff'), + body: req + }, function (err, res) { + utils.call(callback, err, res); + }); + }; + + api.close = function (callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('close', arguments); + return; + } + utils.call(callback, null); + }; + + api.replicateOnServer = function (target, opts, promise) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('replicateOnServer', arguments); + return promise; + } + + var targetHost = getHost(target.id()); + var params = { + source: host.db, + target: targetHost.protocol === host.protocol && targetHost.authority === host.authority ? targetHost.db : targetHost.source + }; + + if (opts.continuous) { + params.continuous = true; + } + + if (opts.create_target) { + params.create_target = true; + } + + if (opts.doc_ids) { + params.doc_ids = opts.doc_ids; + } + + if (opts.filter && typeof opts.filter === 'string') { + params.filter = opts.filter; + } + + if (opts.query_params) { + params.query_params = opts.query_params; + } + + var result = {}; + var repOpts = { + headers: host.headers, + method: 'POST', + url: host.protocol + '://' + host.host + (host.port === 80 ? '' : (':' + host.port)) + '/_replicate', + body: params + }; + var xhr; + promise.cancel = function () { + this.cancelled = true; + if (xhr && !result.ok) { + xhr.abort(); + } + if (result._local_id) { + repOpts.body = { + replication_id: result._local_id + }; + } + repOpts.body.cancel = true; + ajax(repOpts, function (err, resp, xhr) { + // If the replication cancel request fails, send an error to the callback + if (err) { + return utils.call(callback, err); + } + // Send the replication cancel result to the complete callback + utils.call(opts.complete, null, result, xhr); + }); + }; + + if (promise.cancelled) { + return; + } + + xhr = ajax(repOpts, function (err, resp, xhr) { + // If the replication fails, send an error to the callback + if (err) { + return utils.call(callback, err); + } + + result.ok = true; + + // Provided by CouchDB from 1.2.0 onward to cancel replication + if (resp._local_id) { + result._local_id = resp._local_id; + } + + // Send the replication result to the complete callback + utils.call(opts.complete, null, resp, xhr); + }); + }; + + return api; +} + +// Delete the HttpPouch specified by the given name. +HttpPouch.destroy = function (name, opts, callback) { + var host = getHost(name, opts); + opts = opts || {}; + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + opts.headers = host.headers; + opts.method = 'DELETE'; + opts.url = genDBUrl(host, ''); + utils.ajax(opts, callback); +}; + +// HttpPouch is a valid adapter. +HttpPouch.valid = function () { + return true; +}; + +module.exports = HttpPouch; + +},{"../deps/errors":8,"../utils":16}],3:[function(_dereq_,module,exports){ +'use strict'; + +var utils = _dereq_('../utils'); +var merge = _dereq_('../merge'); +var errors = _dereq_('../deps/errors'); +function idbError(callback) { + return function (event) { + utils.call(callback, errors.error(errors.IDB_ERROR, event.target, event.type)); + }; +} + +function IdbPouch(opts, callback) { + + // IndexedDB requires a versioned database structure, this is going to make + // it hard to dynamically create object stores if we needed to for things + // like views + var POUCH_VERSION = 1; + + // The object stores created for each database + // DOC_STORE stores the document meta data, its revision history and state + var DOC_STORE = 'document-store'; + // BY_SEQ_STORE stores a particular version of a document, keyed by its + // sequence id + var BY_SEQ_STORE = 'by-sequence'; + // Where we store attachments + var ATTACH_STORE = 'attach-store'; + // Where we store meta data + var META_STORE = 'meta-store'; + // Where we detect blob support + var DETECT_BLOB_SUPPORT_STORE = 'detect-blob-support'; + + + var name = opts.name; + var req = window.indexedDB.open(name, POUCH_VERSION); + + if (!('openReqList' in IdbPouch)) { + IdbPouch.openReqList = {}; + } + IdbPouch.openReqList[name] = req; + + var blobSupport = null; + + var instanceId = null; + var api = {}; + var idb = null; + + req.onupgradeneeded = function (e) { + var db = e.target.result; + var currentVersion = e.oldVersion; + while (currentVersion !== e.newVersion) { + if (currentVersion === 0) { + createSchema(db); + } + currentVersion++; + } + }; + + function createSchema(db) { + db.createObjectStore(DOC_STORE, {keyPath : 'id'}) + .createIndex('seq', 'seq', {unique: true}); + db.createObjectStore(BY_SEQ_STORE, {autoIncrement : true}) + .createIndex('_doc_id_rev', '_doc_id_rev', {unique: true}); + db.createObjectStore(ATTACH_STORE, {keyPath: 'digest'}); + db.createObjectStore(META_STORE, {keyPath: 'id', autoIncrement: false}); + db.createObjectStore(DETECT_BLOB_SUPPORT_STORE); + } + + // From http://stackoverflow.com/questions/14967647/encode-decode-image-with-base64-breaks-image (2013-04-21) + function fixBinary(bin) { + var length = bin.length; + var buf = new ArrayBuffer(length); + var arr = new Uint8Array(buf); + for (var i = 0; i < length; i++) { + arr[i] = bin.charCodeAt(i); + } + return buf; + } + + req.onsuccess = function (e) { + + idb = e.target.result; + + idb.onversionchange = function () { + idb.close(); + }; + + var txn = idb.transaction([META_STORE, DETECT_BLOB_SUPPORT_STORE], + 'readwrite'); + + var req = txn.objectStore(META_STORE).get(META_STORE); + + req.onsuccess = function (e) { + var meta = e.target.result || {id: META_STORE}; + if (name + '_id' in meta) { + instanceId = meta[name + '_id']; + } else { + instanceId = utils.uuid(); + meta[name + '_id'] = instanceId; + txn.objectStore(META_STORE).put(meta); + } + + // detect blob support + try { + txn.objectStore(DETECT_BLOB_SUPPORT_STORE).put(utils.createBlob(), "key"); + blobSupport = true; + } catch (err) { + blobSupport = false; + } finally { + utils.call(callback, null, api); + } + }; + }; + + req.onerror = idbError(callback); + + api.type = function () { + return 'idb'; + }; + + // Each database needs a unique id so that we can store the sequence + // checkpoint without having other databases confuse itself. + api.id = function idb_id() { + return instanceId; + }; + + api._bulkDocs = function idb_bulkDocs(req, opts, callback) { + var newEdits = opts.new_edits; + var userDocs = req.docs; + // Parse the docs, give them a sequence number for the result + var docInfos = userDocs.map(function (doc, i) { + var newDoc = utils.parseDoc(doc, newEdits); + newDoc._bulk_seq = i; + return newDoc; + }); + + var docInfoErrors = docInfos.filter(function (docInfo) { + return docInfo.error; + }); + if (docInfoErrors.length) { + return utils.call(callback, docInfoErrors[0]); + } + + var results = []; + var docsWritten = 0; + + function writeMetaData(e) { + var meta = e.target.result; + meta.updateSeq = (meta.updateSeq || 0) + docsWritten; + txn.objectStore(META_STORE).put(meta); + } + + function processDocs() { + if (!docInfos.length) { + txn.objectStore(META_STORE).get(META_STORE).onsuccess = writeMetaData; + return; + } + var currentDoc = docInfos.shift(); + var req = txn.objectStore(DOC_STORE).get(currentDoc.metadata.id); + req.onsuccess = function process_docRead(event) { + var oldDoc = event.target.result; + if (!oldDoc) { + insertDoc(currentDoc); + } else { + updateDoc(oldDoc, currentDoc); + } + }; + } + + function complete(event) { + var aresults = []; + results.sort(sortByBulkSeq); + results.forEach(function (result) { + delete result._bulk_seq; + if (result.error) { + aresults.push(result); + return; + } + var metadata = result.metadata; + var rev = merge.winningRev(metadata); + + aresults.push({ + ok: true, + id: metadata.id, + rev: rev + }); + + if (utils.isLocalId(metadata.id)) { + return; + } + + IdbPouch.Changes.notify(name); + IdbPouch.Changes.notifyLocalWindows(name); + }); + utils.call(callback, null, aresults); + } + + function preprocessAttachment(att, finish) { + if (att.stub) { + return finish(); + } + if (typeof att.data === 'string') { + var data; + try { + data = atob(att.data); + } catch (e) { + var err = errors.error(errors.BAD_ARG, + "Attachments need to be base64 encoded"); + return utils.call(callback, err); + } + att.digest = 'md5-' + utils.Crypto.MD5(data); + if (blobSupport) { + var type = att.content_type; + data = fixBinary(data); + att.data = utils.createBlob([data], {type: type}); + } + return finish(); + } + var reader = new FileReader(); + reader.onloadend = function (e) { + att.digest = 'md5-' + utils.Crypto.MD5(this.result); + if (!blobSupport) { + att.data = btoa(this.result); + } + finish(); + }; + reader.readAsBinaryString(att.data); + } + + function preprocessAttachments(callback) { + if (!docInfos.length) { + return callback(); + } + + var docv = 0; + docInfos.forEach(function (docInfo) { + var attachments = docInfo.data && docInfo.data._attachments ? + Object.keys(docInfo.data._attachments) : []; + + if (!attachments.length) { + return done(); + } + + var recv = 0; + function attachmentProcessed() { + recv++; + if (recv === attachments.length) { + done(); + } + } + + for (var key in docInfo.data._attachments) { + preprocessAttachment(docInfo.data._attachments[key], attachmentProcessed); + } + }); + + function done() { + docv++; + if (docInfos.length === docv) { + callback(); + } + } + } + + function writeDoc(docInfo, callback) { + var err = null; + var recv = 0; + docInfo.data._id = docInfo.metadata.id; + docInfo.data._rev = docInfo.metadata.rev; + + docsWritten++; + + if (utils.isDeleted(docInfo.metadata, docInfo.metadata.rev)) { + docInfo.data._deleted = true; + } + + var attachments = docInfo.data._attachments ? + Object.keys(docInfo.data._attachments) : []; + + function collectResults(attachmentErr) { + if (!err) { + if (attachmentErr) { + err = attachmentErr; + utils.call(callback, err); + } else if (recv === attachments.length) { + finish(); + } + } + } + + function attachmentSaved(err) { + recv++; + collectResults(err); + } + + for (var key in docInfo.data._attachments) { + if (!docInfo.data._attachments[key].stub) { + var data = docInfo.data._attachments[key].data; + delete docInfo.data._attachments[key].data; + var digest = docInfo.data._attachments[key].digest; + saveAttachment(docInfo, digest, data, attachmentSaved); + } else { + recv++; + collectResults(); + } + } + + function finish() { + docInfo.data._doc_id_rev = docInfo.data._id + "::" + docInfo.data._rev; + var dataReq = txn.objectStore(BY_SEQ_STORE).put(docInfo.data); + dataReq.onsuccess = function (e) { + //console.log(name + ': Wrote Document ', docInfo.metadata.id); + docInfo.metadata.seq = e.target.result; + // Current _rev is calculated from _rev_tree on read + delete docInfo.metadata.rev; + var metaDataReq = txn.objectStore(DOC_STORE).put(docInfo.metadata); + metaDataReq.onsuccess = function () { + results.push(docInfo); + utils.call(callback); + }; + }; + } + + if (!attachments.length) { + finish(); + } + } + + function updateDoc(oldDoc, docInfo) { + var merged = merge.merge(oldDoc.rev_tree, docInfo.metadata.rev_tree[0], 1000); + var wasPreviouslyDeleted = utils.isDeleted(oldDoc); + var inConflict = (wasPreviouslyDeleted && + utils.isDeleted(docInfo.metadata)) || + (!wasPreviouslyDeleted && newEdits && merged.conflicts !== 'new_leaf'); + + if (inConflict) { + results.push(makeErr(errors.REV_CONFLICT, docInfo._bulk_seq)); + return processDocs(); + } + + docInfo.metadata.rev_tree = merged.tree; + writeDoc(docInfo, processDocs); + } + + function insertDoc(docInfo) { + // Cant insert new deleted documents + if ('was_delete' in opts && utils.isDeleted(docInfo.metadata)) { + results.push(errors.MISSING_DOC); + return processDocs(); + } + writeDoc(docInfo, processDocs); + } + + // Insert sequence number into the error so we can sort later + function makeErr(err, seq) { + err._bulk_seq = seq; + return err; + } + + function saveAttachment(docInfo, digest, data, callback) { + var objectStore = txn.objectStore(ATTACH_STORE); + var getReq = objectStore.get(digest).onsuccess = function (e) { + var originalRefs = e.target.result && e.target.result.refs || {}; + var ref = [docInfo.metadata.id, docInfo.metadata.rev].join('@'); + var newAtt = { + digest: digest, + body: data, + refs: originalRefs + }; + newAtt.refs[ref] = true; + var putReq = objectStore.put(newAtt).onsuccess = function (e) { + utils.call(callback); + }; + }; + } + + var txn; + preprocessAttachments(function () { + txn = idb.transaction([DOC_STORE, BY_SEQ_STORE, ATTACH_STORE, META_STORE], + 'readwrite'); + txn.onerror = idbError(callback); + txn.ontimeout = idbError(callback); + txn.oncomplete = complete; + + processDocs(); + }); + }; + + function sortByBulkSeq(a, b) { + return a._bulk_seq - b._bulk_seq; + } + + // First we look up the metadata in the ids database, then we fetch the + // current revision(s) from the by sequence store + api._get = function idb_get(id, opts, callback) { + var doc; + var metadata; + var err; + var txn; + if (opts.ctx) { + txn = opts.ctx; + } else { + txn = idb.transaction([DOC_STORE, BY_SEQ_STORE, ATTACH_STORE], 'readonly'); + } + + function finish() { + utils.call(callback, err, {doc: doc, metadata: metadata, ctx: txn}); + } + + txn.objectStore(DOC_STORE).get(id).onsuccess = function (e) { + metadata = e.target.result; + // we can determine the result here if: + // 1. there is no such document + // 2. the document is deleted and we don't ask about specific rev + // When we ask with opts.rev we expect the answer to be either + // doc (possibly with _deleted=true) or missing error + if (!metadata) { + err = errors.MISSING_DOC; + return finish(); + } + if (utils.isDeleted(metadata) && !opts.rev) { + err = errors.error(errors.MISSING_DOC, "deleted"); + return finish(); + } + + var rev = merge.winningRev(metadata); + var key = metadata.id + '::' + (opts.rev ? opts.rev : rev); + var index = txn.objectStore(BY_SEQ_STORE).index('_doc_id_rev'); + + index.get(key).onsuccess = function (e) { + doc = e.target.result; + if (doc && doc._doc_id_rev) { + delete(doc._doc_id_rev); + } + if (!doc) { + err = errors.MISSING_DOC; + return finish(); + } + finish(); + }; + }; + }; + + api._getAttachment = function (attachment, opts, callback) { + var result; + var txn; + if (opts.ctx) { + txn = opts.ctx; + } else { + txn = idb.transaction([DOC_STORE, BY_SEQ_STORE, ATTACH_STORE], 'readonly'); + } + var digest = attachment.digest; + var type = attachment.content_type; + + txn.objectStore(ATTACH_STORE).get(digest).onsuccess = function (e) { + var data = e.target.result.body; + if (opts.encode) { + if (blobSupport) { + var reader = new FileReader(); + reader.onloadend = function (e) { + result = btoa(this.result); + utils.call(callback, null, result); + }; + reader.readAsBinaryString(data); + } else { + result = data; + utils.call(callback, null, result); + } + } else { + if (blobSupport) { + result = data; + } else { + data = fixBinary(atob(data)); + result = utils.createBlob([data], {type: type}); + } + utils.call(callback, null, result); + } + }; + }; + + api._allDocs = function idb_allDocs(opts, callback) { + var start = 'startkey' in opts ? opts.startkey : false; + var end = 'endkey' in opts ? opts.endkey : false; + + var descending = 'descending' in opts ? opts.descending : false; + descending = descending ? 'prev' : null; + + var keyRange = start && end ? window.IDBKeyRange.bound(start, end) + : start ? window.IDBKeyRange.lowerBound(start) + : end ? window.IDBKeyRange.upperBound(end) : null; + + var transaction = idb.transaction([DOC_STORE, BY_SEQ_STORE], 'readonly'); + transaction.oncomplete = function () { + if ('keys' in opts) { + opts.keys.forEach(function (key) { + if (key in resultsMap) { + results.push(resultsMap[key]); + } else { + results.push({"key": key, "error": "not_found"}); + } + }); + if (opts.descending) { + results.reverse(); + } + } + utils.call(callback, null, { + total_rows: results.length, + offset: opts.skip, + rows: ('limit' in opts) ? results.slice(opts.skip, opts.limit + opts.skip) : + (opts.skip > 0) ? results.slice(opts.skip) : results + }); + }; + + var oStore = transaction.objectStore(DOC_STORE); + var oCursor = descending ? oStore.openCursor(keyRange, descending) + : oStore.openCursor(keyRange); + var results = []; + var resultsMap = {}; + oCursor.onsuccess = function (e) { + if (!e.target.result) { + return; + } + var cursor = e.target.result; + var metadata = cursor.value; + // If opts.keys is set we want to filter here only those docs with + // key in opts.keys. With no performance tests it is difficult to + // guess if iteration with filter is faster than many single requests + function allDocsInner(metadata, data) { + if (utils.isLocalId(metadata.id)) { + return cursor['continue'](); + } + var doc = { + id: metadata.id, + key: metadata.id, + value: { + rev: merge.winningRev(metadata) + } + }; + if (opts.include_docs) { + doc.doc = data; + doc.doc._rev = merge.winningRev(metadata); + if (doc.doc._doc_id_rev) { + delete(doc.doc._doc_id_rev); + } + if (opts.conflicts) { + doc.doc._conflicts = merge.collectConflicts(metadata); + } + for (var att in doc.doc._attachments) { + doc.doc._attachments[att].stub = true; + } + } + if ('keys' in opts) { + if (opts.keys.indexOf(metadata.id) > -1) { + if (utils.isDeleted(metadata)) { + doc.value.deleted = true; + doc.doc = null; + } + resultsMap[doc.id] = doc; + } + } else { + if (!utils.isDeleted(metadata)) { + results.push(doc); + } + } + cursor['continue'](); + } + + if (!opts.include_docs) { + allDocsInner(metadata); + } else { + var index = transaction.objectStore(BY_SEQ_STORE).index('_doc_id_rev'); + var mainRev = merge.winningRev(metadata); + var key = metadata.id + "::" + mainRev; + index.get(key).onsuccess = function (event) { + allDocsInner(cursor.value, event.target.result); + }; + } + }; + }; + + api._info = function idb_info(callback) { + var count = 0; + var update_seq = 0; + var txn = idb.transaction([DOC_STORE, META_STORE], 'readonly'); + + function fetchUpdateSeq(e) { + update_seq = e.target.result && e.target.result.updateSeq || 0; + } + + function countDocs(e) { + var cursor = e.target.result; + if (!cursor) { + txn.objectStore(META_STORE).get(META_STORE).onsuccess = fetchUpdateSeq; + return; + } + if (cursor.value.deleted !== true) { + count++; + } + cursor['continue'](); + } + + txn.oncomplete = function () { + callback(null, { + db_name: name, + doc_count: count, + update_seq: update_seq + }); + }; + + txn.objectStore(DOC_STORE).openCursor().onsuccess = countDocs; + }; + + api._changes = function idb_changes(opts) { + //console.log(name + ': Start Changes Feed: continuous=' + opts.continuous); + + if (opts.continuous) { + var id = name + ':' + utils.uuid(); + opts.cancelled = false; + IdbPouch.Changes.addListener(name, id, api, opts); + IdbPouch.Changes.notify(name); + return { + cancel: function () { + //console.log(name + ': Cancel Changes Feed'); + opts.cancelled = true; + IdbPouch.Changes.removeListener(name, id); + } + }; + } + + var descending = opts.descending ? 'prev' : null; + var last_seq = 0; + + // Ignore the `since` parameter when `descending` is true + opts.since = opts.since && !descending ? opts.since : 0; + + var results = [], resultIndices = {}, dedupResults = []; + var txn; + + function fetchChanges() { + txn = idb.transaction([DOC_STORE, BY_SEQ_STORE]); + txn.oncomplete = onTxnComplete; + + var req; + + if (descending) { + req = txn.objectStore(BY_SEQ_STORE) + .openCursor(window.IDBKeyRange.lowerBound(opts.since, true), descending); + } else { + req = txn.objectStore(BY_SEQ_STORE) + .openCursor(window.IDBKeyRange.lowerBound(opts.since, true)); + } + + req.onsuccess = onsuccess; + req.onerror = onerror; + } + + fetchChanges(); + + function onsuccess(event) { + if (!event.target.result) { + // Filter out null results casued by deduping + for (var i = 0, l = results.length; i < l; i++) { + var result = results[i]; + if (result) { + dedupResults.push(result); + } + } + return false; + } + + var cursor = event.target.result; + + // Try to pre-emptively dedup to save us a bunch of idb calls + var changeId = cursor.value._id; + var changeIdIndex = resultIndices[changeId]; + if (changeIdIndex !== undefined) { + results[changeIdIndex].seq = cursor.key; + // update so it has the later sequence number + results.push(results[changeIdIndex]); + results[changeIdIndex] = null; + resultIndices[changeId] = results.length - 1; + return cursor['continue'](); + } + + var index = txn.objectStore(DOC_STORE); + index.get(cursor.value._id).onsuccess = function (event) { + var metadata = event.target.result; + if (utils.isLocalId(metadata.id)) { + return cursor['continue'](); + } + + if (last_seq < metadata.seq) { + last_seq = metadata.seq; + } + + var mainRev = merge.winningRev(metadata); + var key = metadata.id + "::" + mainRev; + var index = txn.objectStore(BY_SEQ_STORE).index('_doc_id_rev'); + index.get(key).onsuccess = function (docevent) { + var doc = docevent.target.result; + delete doc['_doc_id_rev']; + + doc._rev = mainRev; + var change = opts.processChange(doc, metadata, opts); + change.seq = cursor.key; + + // Dedupe the changes feed + var changeId = change.id, changeIdIndex = resultIndices[changeId]; + if (changeIdIndex !== undefined) { + results[changeIdIndex] = null; + } + results.push(change); + resultIndices[changeId] = results.length - 1; + cursor['continue'](); + }; + }; + } + + function onTxnComplete() { + utils.processChanges(opts, dedupResults, last_seq); + } + + function onerror(error) { + // TODO: shouldn't we pass some params here? + utils.call(opts.complete); + } + }; + + api._close = function (callback) { + if (idb === null) { + return utils.call(callback, errors.NOT_OPEN); + } + + // https://developer.mozilla.org/en-US/docs/IndexedDB/IDBDatabase#close + // "Returns immediately and closes the connection in a separate thread..." + idb.close(); + utils.call(callback, null); + }; + + api._getRevisionTree = function (docId, callback) { + var txn = idb.transaction([DOC_STORE], 'readonly'); + var req = txn.objectStore(DOC_STORE).get(docId); + req.onsuccess = function (event) { + var doc = event.target.result; + if (!doc) { + utils.call(callback, errors.MISSING_DOC); + } else { + utils.call(callback, null, doc.rev_tree); + } + }; + }; + + // This function removes revisions of document docId + // which are listed in revs and sets this document + // revision to to rev_tree + api._doCompaction = function (docId, rev_tree, revs, callback) { + var txn = idb.transaction([DOC_STORE, BY_SEQ_STORE], 'readwrite'); + + var index = txn.objectStore(DOC_STORE); + index.get(docId).onsuccess = function (event) { + var metadata = event.target.result; + metadata.rev_tree = rev_tree; + + var count = revs.length; + revs.forEach(function (rev) { + var index = txn.objectStore(BY_SEQ_STORE).index('_doc_id_rev'); + var key = docId + "::" + rev; + index.getKey(key).onsuccess = function (e) { + var seq = e.target.result; + if (!seq) { + return; + } + var req = txn.objectStore(BY_SEQ_STORE)['delete'](seq); + + count--; + if (!count) { + txn.objectStore(DOC_STORE).put(metadata); + } + }; + }); + }; + txn.oncomplete = function () { + utils.call(callback); + }; + }; + + return api; +} + +IdbPouch.valid = function idb_valid() { + return typeof window !== 'undefined' && !!window.indexedDB; +}; + +IdbPouch.destroy = function idb_destroy(name, opts, callback) { + if (!('openReqList' in IdbPouch)) { + IdbPouch.openReqList = {}; + } + IdbPouch.Changes.clearListeners(name); + + //Close open request for "name" database to fix ie delay. + if (IdbPouch.openReqList[name] && IdbPouch.openReqList[name].result) { + IdbPouch.openReqList[name].result.close(); + } + var req = window.indexedDB.deleteDatabase(name); + + req.onsuccess = function () { + //Remove open request from the list. + if (IdbPouch.openReqList[name]) { + IdbPouch.openReqList[name] = null; + } + utils.call(callback, null); + }; + + req.onerror = idbError(callback); +}; + +IdbPouch.Changes = new utils.Changes(); + +module.exports = IdbPouch; + +},{"../deps/errors":8,"../merge":13,"../utils":16}],4:[function(_dereq_,module,exports){ +'use strict'; + +var utils = _dereq_('../utils'); +var merge = _dereq_('../merge'); +var errors = _dereq_('../deps/errors'); +function quote(str) { + return "'" + str + "'"; +} + +function openDB() { + if (typeof window !== 'undefined') { + if (window.navigator && window.navigator.sqlitePlugin && window.navigator.sqlitePlugin.openDatabase) { + return navigator.sqlitePlugin.openDatabase.apply(navigator.sqlitePlugin, arguments); + } else if (window.sqlitePlugin && window.sqlitePlugin.openDatabase) { + return window.sqlitePlugin.openDatabase.apply(window.sqlitePlugin, arguments); + } else { + return window.openDatabase.apply(window, arguments); + } + } +} + +var POUCH_VERSION = 1; +var POUCH_SIZE = 5 * 1024 * 1024; + +// The object stores created for each database +// DOC_STORE stores the document meta data, its revision history and state +var DOC_STORE = quote('document-store'); +// BY_SEQ_STORE stores a particular version of a document, keyed by its +// sequence id +var BY_SEQ_STORE = quote('by-sequence'); +// Where we store attachments +var ATTACH_STORE = quote('attach-store'); +var META_STORE = quote('metadata-store'); + +function unknownError(callback) { + return function (event) { + utils.call(callback, { + status: 500, + error: event.type, + reason: event.target + }); + }; +} +function idbError(callback) { + return function (event) { + utils.call(callback, errors.error(errors.WSQ_ERROR, event.target, event.type)); + }; +} +function webSqlPouch(opts, callback) { + + var api = {}; + var instanceId = null; + var name = opts.name; + + var db = openDB(name, POUCH_VERSION, name, POUCH_SIZE); + if (!db) { + return utils.call(callback, errors.UNKNOWN_ERROR); + } + + function dbCreated() { + callback(null, api); + } + + function setup() { + db.transaction(function (tx) { + var meta = 'CREATE TABLE IF NOT EXISTS ' + META_STORE + + ' (update_seq, dbid)'; + var attach = 'CREATE TABLE IF NOT EXISTS ' + ATTACH_STORE + + ' (digest, json, body BLOB)'; + var doc = 'CREATE TABLE IF NOT EXISTS ' + DOC_STORE + + ' (id unique, seq, json, winningseq)'; + var seq = 'CREATE TABLE IF NOT EXISTS ' + BY_SEQ_STORE + + ' (seq INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, doc_id_rev UNIQUE, json)'; + + tx.executeSql(attach); + tx.executeSql(doc); + tx.executeSql(seq); + tx.executeSql(meta); + + var updateseq = 'SELECT update_seq FROM ' + META_STORE; + tx.executeSql(updateseq, [], function (tx, result) { + if (!result.rows.length) { + var initSeq = 'INSERT INTO ' + META_STORE + ' (update_seq) VALUES (?)'; + tx.executeSql(initSeq, [0]); + return; + } + }); + + var dbid = 'SELECT dbid FROM ' + META_STORE + ' WHERE dbid IS NOT NULL'; + tx.executeSql(dbid, [], function (tx, result) { + if (!result.rows.length) { + var initDb = 'UPDATE ' + META_STORE + ' SET dbid=?'; + instanceId = utils.uuid(); + tx.executeSql(initDb, [instanceId]); + return; + } + instanceId = result.rows.item(0).dbid; + }); + }, unknownError(callback), dbCreated); + } + if (utils.isCordova() && typeof window !== 'undefined') { + //to wait until custom api is made in pouch.adapters before doing setup + window.addEventListener(name + '_pouch', function cordova_init() { + window.removeEventListener(name + '_pouch', cordova_init, false); + setup(); + }, false); + } else { + setup(); + } + + + api.type = function () { + return 'websql'; + }; + + api.id = function () { + return instanceId; + }; + + api._info = function (callback) { + db.transaction(function (tx) { + var sql = 'SELECT COUNT(id) AS count FROM ' + DOC_STORE; + tx.executeSql(sql, [], function (tx, result) { + var doc_count = result.rows.item(0).count; + var updateseq = 'SELECT update_seq FROM ' + META_STORE; + tx.executeSql(updateseq, [], function (tx, result) { + var update_seq = result.rows.item(0).update_seq; + callback(null, { + db_name: name, + doc_count: doc_count, + update_seq: update_seq + }); + }); + }); + }); + }; + + api._bulkDocs = function (req, opts, callback) { + + var newEdits = opts.new_edits; + var userDocs = req.docs; + var docsWritten = 0; + + // Parse the docs, give them a sequence number for the result + var docInfos = userDocs.map(function (doc, i) { + var newDoc = utils.parseDoc(doc, newEdits); + newDoc._bulk_seq = i; + return newDoc; + }); + + var docInfoErrors = docInfos.filter(function (docInfo) { + return docInfo.error; + }); + if (docInfoErrors.length) { + return utils.call(callback, docInfoErrors[0]); + } + + var tx; + var results = []; + var fetchedDocs = {}; + + function sortByBulkSeq(a, b) { + return a._bulk_seq - b._bulk_seq; + } + + function complete(event) { + var aresults = []; + results.sort(sortByBulkSeq); + results.forEach(function (result) { + delete result._bulk_seq; + if (result.error) { + aresults.push(result); + return; + } + var metadata = result.metadata; + var rev = merge.winningRev(metadata); + + aresults.push({ + ok: true, + id: metadata.id, + rev: rev + }); + + if (utils.isLocalId(metadata.id)) { + return; + } + + docsWritten++; + + webSqlPouch.Changes.notify(name); + webSqlPouch.Changes.notifyLocalWindows(name); + }); + + var updateseq = 'SELECT update_seq FROM ' + META_STORE; + tx.executeSql(updateseq, [], function (tx, result) { + var update_seq = result.rows.item(0).update_seq + docsWritten; + var sql = 'UPDATE ' + META_STORE + ' SET update_seq=?'; + tx.executeSql(sql, [update_seq], function () { + utils.call(callback, null, aresults); + }); + }); + } + + function preprocessAttachment(att, finish) { + if (att.stub) { + return finish(); + } + if (typeof att.data === 'string') { + try { + att.data = atob(att.data); + } catch (e) { + var err = errors.error(errors.BAD_ARG, + "Attachments need to be base64 encoded"); + return utils.call(callback, err); + } + att.digest = 'md5-' + utils.Crypto.MD5(att.data); + return finish(); + } + var reader = new FileReader(); + reader.onloadend = function (e) { + att.data = this.result; + att.digest = 'md5-' + utils.Crypto.MD5(this.result); + finish(); + }; + reader.readAsBinaryString(att.data); + } + + function preprocessAttachments(callback) { + if (!docInfos.length) { + return callback(); + } + + var docv = 0; + var recv = 0; + + docInfos.forEach(function (docInfo) { + var attachments = docInfo.data && docInfo.data._attachments ? + Object.keys(docInfo.data._attachments) : []; + + if (!attachments.length) { + return done(); + } + + function processedAttachment() { + recv++; + if (recv === attachments.length) { + done(); + } + } + + for (var key in docInfo.data._attachments) { + preprocessAttachment(docInfo.data._attachments[key], processedAttachment); + } + }); + + function done() { + docv++; + if (docInfos.length === docv) { + callback(); + } + } + } + + function writeDoc(docInfo, callback, isUpdate) { + + function finish() { + var data = docInfo.data; + var sql = 'INSERT INTO ' + BY_SEQ_STORE + ' (doc_id_rev, json) VALUES (?, ?);'; + tx.executeSql(sql, [data._id + "::" + data._rev, + JSON.stringify(data)], dataWritten); + } + + function collectResults(attachmentErr) { + if (!err) { + if (attachmentErr) { + err = attachmentErr; + utils.call(callback, err); + } else if (recv === attachments.length) { + finish(); + } + } + } + + var err = null; + var recv = 0; + + docInfo.data._id = docInfo.metadata.id; + docInfo.data._rev = docInfo.metadata.rev; + + if (utils.isDeleted(docInfo.metadata, docInfo.metadata.rev)) { + docInfo.data._deleted = true; + } + + var attachments = docInfo.data._attachments ? + Object.keys(docInfo.data._attachments) : []; + + function attachmentSaved(err) { + recv++; + collectResults(err); + } + + for (var key in docInfo.data._attachments) { + if (!docInfo.data._attachments[key].stub) { + var data = docInfo.data._attachments[key].data; + delete docInfo.data._attachments[key].data; + var digest = docInfo.data._attachments[key].digest; + saveAttachment(docInfo, digest, data, attachmentSaved); + } else { + recv++; + collectResults(); + } + } + + if (!attachments.length) { + finish(); + } + + function dataWritten(tx, result) { + var seq = docInfo.metadata.seq = result.insertId; + delete docInfo.metadata.rev; + + var mainRev = merge.winningRev(docInfo.metadata); + + var sql = isUpdate ? + 'UPDATE ' + DOC_STORE + ' SET seq=?, json=?, winningseq=(SELECT seq FROM ' + + BY_SEQ_STORE + ' WHERE doc_id_rev=?) WHERE id=?' : + 'INSERT INTO ' + DOC_STORE + ' (id, seq, winningseq, json) VALUES (?, ?, ?, ?);'; + var metadataStr = JSON.stringify(docInfo.metadata); + var key = docInfo.metadata.id + "::" + mainRev; + var params = isUpdate ? + [seq, metadataStr, key, docInfo.metadata.id] : + [docInfo.metadata.id, seq, seq, metadataStr]; + tx.executeSql(sql, params, function (tx, result) { + results.push(docInfo); + utils.call(callback, null); + }); + } + } + + function updateDoc(oldDoc, docInfo) { + var merged = merge.merge(oldDoc.rev_tree, docInfo.metadata.rev_tree[0], 1000); + var inConflict = (utils.isDeleted(oldDoc) && + utils.isDeleted(docInfo.metadata)) || + (!utils.isDeleted(oldDoc) && + newEdits && merged.conflicts !== 'new_leaf'); + + if (inConflict) { + results.push(makeErr(errors.REV_CONFLICT, docInfo._bulk_seq)); + return processDocs(); + } + + docInfo.metadata.rev_tree = merged.tree; + writeDoc(docInfo, processDocs, true); + } + + function insertDoc(docInfo) { + // Cant insert new deleted documents + if ('was_delete' in opts && utils.isDeleted(docInfo.metadata)) { + results.push(errors.MISSING_DOC); + return processDocs(); + } + writeDoc(docInfo, processDocs, false); + } + + function processDocs() { + if (!docInfos.length) { + return complete(); + } + var currentDoc = docInfos.shift(); + var id = currentDoc.metadata.id; + if (id in fetchedDocs) { + updateDoc(fetchedDocs[id], currentDoc); + } else { + // if we have newEdits=false then we can update the same + // document twice in a single bulk docs call + fetchedDocs[id] = currentDoc.metadata; + insertDoc(currentDoc); + } + } + + // Insert sequence number into the error so we can sort later + function makeErr(err, seq) { + err._bulk_seq = seq; + return err; + } + + function saveAttachment(docInfo, digest, data, callback) { + var ref = [docInfo.metadata.id, docInfo.metadata.rev].join('@'); + var newAtt = {digest: digest}; + var sql = 'SELECT digest, json FROM ' + ATTACH_STORE + ' WHERE digest=?'; + tx.executeSql(sql, [digest], function (tx, result) { + if (!result.rows.length) { + newAtt.refs = {}; + newAtt.refs[ref] = true; + sql = 'INSERT INTO ' + ATTACH_STORE + '(digest, json, body) VALUES (?, ?, ?)'; + tx.executeSql(sql, [digest, JSON.stringify(newAtt), data], function () { + utils.call(callback, null); + }); + } else { + newAtt.refs = JSON.parse(result.rows.item(0).json).refs; + sql = 'UPDATE ' + ATTACH_STORE + ' SET json=?, body=? WHERE digest=?'; + tx.executeSql(sql, [JSON.stringify(newAtt), data, digest], function () { + utils.call(callback, null); + }); + } + }); + } + + function metadataFetched(tx, results) { + for (var j = 0; j < results.rows.length; j++) { + var row = results.rows.item(j); + fetchedDocs[row.id] = JSON.parse(row.json); + } + processDocs(); + } + + preprocessAttachments(function () { + db.transaction(function (txn) { + tx = txn; + var ids = '(' + docInfos.map(function (d) { + return quote(d.metadata.id); + }).join(',') + ')'; + var sql = 'SELECT * FROM ' + DOC_STORE + ' WHERE id IN ' + ids; + tx.executeSql(sql, [], metadataFetched); + }, unknownError(callback)); + }); + }; + + api._get = function (id, opts, callback) { + var doc; + var metadata; + var err; + if (!opts.ctx) { + db.transaction(function (txn) { + opts.ctx = txn; + api._get(id, opts, callback); + }); + return; + } + var tx = opts.ctx; + + function finish() { + utils.call(callback, err, {doc: doc, metadata: metadata, ctx: tx}); + } + + var sql = 'SELECT * FROM ' + DOC_STORE + ' WHERE id=?'; + tx.executeSql(sql, [id], function (a, results) { + if (!results.rows.length) { + err = errors.MISSING_DOC; + return finish(); + } + metadata = JSON.parse(results.rows.item(0).json); + if (utils.isDeleted(metadata) && !opts.rev) { + err = errors.error(errors.MISSING_DOC, "deleted"); + return finish(); + } + + var rev = merge.winningRev(metadata); + var key = opts.rev ? opts.rev : rev; + key = metadata.id + '::' + key; + var sql = 'SELECT * FROM ' + BY_SEQ_STORE + ' WHERE doc_id_rev=?'; + tx.executeSql(sql, [key], function (tx, results) { + if (!results.rows.length) { + err = errors.MISSING_DOC; + return finish(); + } + doc = JSON.parse(results.rows.item(0).json); + + finish(); + }); + }); + }; + + function makeRevs(arr) { + return arr.map(function (x) { return {rev: x.rev}; }); + } + + api._allDocs = function (opts, callback) { + var results = []; + var resultsMap = {}; + var start = 'startkey' in opts ? opts.startkey : false; + var end = 'endkey' in opts ? opts.endkey : false; + var descending = 'descending' in opts ? opts.descending : false; + var sql = 'SELECT ' + DOC_STORE + '.id, ' + BY_SEQ_STORE + '.seq, ' + + BY_SEQ_STORE + '.json AS data, ' + DOC_STORE + '.json AS metadata FROM ' + + BY_SEQ_STORE + ' JOIN ' + DOC_STORE + ' ON ' + BY_SEQ_STORE + '.seq = ' + + DOC_STORE + '.winningseq'; + + var sqlArgs = []; + if ('keys' in opts) { + sql += ' WHERE ' + DOC_STORE + '.id IN (' + opts.keys.map(function () { + return '?'; + }).join(',') + ')'; + sqlArgs = sqlArgs.concat(opts.keys); + } else { + if (start) { + sql += ' WHERE ' + DOC_STORE + '.id >= ?'; + sqlArgs.push(start); + } + if (end) { + sql += (start ? ' AND ' : ' WHERE ') + DOC_STORE + '.id <= ?'; + sqlArgs.push(end); + } + sql += ' ORDER BY ' + DOC_STORE + '.id ' + (descending ? 'DESC' : 'ASC'); + } + + db.transaction(function (tx) { + tx.executeSql(sql, sqlArgs, function (tx, result) { + for (var i = 0, l = result.rows.length; i < l; i++) { + var doc = result.rows.item(i); + var metadata = JSON.parse(doc.metadata); + var data = JSON.parse(doc.data); + if (!(utils.isLocalId(metadata.id))) { + doc = { + id: metadata.id, + key: metadata.id, + value: {rev: merge.winningRev(metadata)} + }; + if (opts.include_docs) { + doc.doc = data; + doc.doc._rev = merge.winningRev(metadata); + if (opts.conflicts) { + doc.doc._conflicts = merge.collectConflicts(metadata); + } + for (var att in doc.doc._attachments) { + doc.doc._attachments[att].stub = true; + } + } + if ('keys' in opts) { + if (opts.keys.indexOf(metadata.id) > -1) { + if (utils.isDeleted(metadata)) { + doc.value.deleted = true; + doc.doc = null; + } + resultsMap[doc.id] = doc; + } + } else { + if (!utils.isDeleted(metadata)) { + results.push(doc); + } + } + } + } + }); + }, unknownError(callback), function () { + if ('keys' in opts) { + opts.keys.forEach(function (key) { + if (key in resultsMap) { + results.push(resultsMap[key]); + } else { + results.push({"key": key, "error": "not_found"}); + } + }); + if (opts.descending) { + results.reverse(); + } + } + utils.call(callback, null, { + total_rows: results.length, + offset: opts.skip, + rows: ('limit' in opts) ? results.slice(opts.skip, opts.limit + opts.skip) : + (opts.skip > 0) ? results.slice(opts.skip) : results + }); + }); + }; + + api._changes = function idb_changes(opts) { + + + //console.log(name + ': Start Changes Feed: continuous=' + opts.continuous); + + + if (opts.continuous) { + var id = name + ':' + utils.uuid(); + opts.cancelled = false; + webSqlPouch.Changes.addListener(name, id, api, opts); + webSqlPouch.Changes.notify(name); + return { + cancel: function () { + //console.log(name + ': Cancel Changes Feed'); + opts.cancelled = true; + webSqlPouch.Changes.removeListener(name, id); + } + }; + } + + var descending = opts.descending; + + // Ignore the `since` parameter when `descending` is true + opts.since = opts.since && !descending ? opts.since : 0; + + var results = []; + var txn; + + function fetchChanges() { + var sql = 'SELECT ' + DOC_STORE + '.id, ' + BY_SEQ_STORE + '.seq, ' + + BY_SEQ_STORE + '.json AS data, ' + DOC_STORE + '.json AS metadata FROM ' + + BY_SEQ_STORE + ' JOIN ' + DOC_STORE + ' ON ' + BY_SEQ_STORE + '.seq = ' + + DOC_STORE + '.winningseq WHERE ' + DOC_STORE + '.seq > ' + opts.since + + ' ORDER BY ' + DOC_STORE + '.seq ' + (descending ? 'DESC' : 'ASC'); + + db.transaction(function (tx) { + tx.executeSql(sql, [], function (tx, result) { + var last_seq = 0; + for (var i = 0, l = result.rows.length; i < l; i++) { + var res = result.rows.item(i); + var metadata = JSON.parse(res.metadata); + if (!utils.isLocalId(metadata.id)) { + if (last_seq < res.seq) { + last_seq = res.seq; + } + var doc = JSON.parse(res.data); + var change = opts.processChange(doc, metadata, opts); + change.seq = res.seq; + + results.push(change); + } + } + utils.processChanges(opts, results, last_seq); + }); + }); + } + + fetchChanges(); + }; + + api._close = function (callback) { + //WebSQL databases do not need to be closed + utils.call(callback, null); + }; + + api._getAttachment = function (attachment, opts, callback) { + var res; + var tx = opts.ctx; + var digest = attachment.digest; + var type = attachment.content_type; + var sql = 'SELECT body FROM ' + ATTACH_STORE + ' WHERE digest=?'; + tx.executeSql(sql, [digest], function (tx, result) { + var data = result.rows.item(0).body; + if (opts.encode) { + res = btoa(data); + } else { + res = utils.createBlob([data], {type: type}); + } + utils.call(callback, null, res); + }); + }; + + api._getRevisionTree = function (docId, callback) { + db.transaction(function (tx) { + var sql = 'SELECT json AS metadata FROM ' + DOC_STORE + ' WHERE id = ?'; + tx.executeSql(sql, [docId], function (tx, result) { + if (!result.rows.length) { + utils.call(callback, errors.MISSING_DOC); + } else { + var data = JSON.parse(result.rows.item(0).metadata); + utils.call(callback, null, data.rev_tree); + } + }); + }); + }; + + api._doCompaction = function (docId, rev_tree, revs, callback) { + db.transaction(function (tx) { + var sql = 'SELECT json AS metadata FROM ' + DOC_STORE + ' WHERE id = ?'; + tx.executeSql(sql, [docId], function (tx, result) { + if (!result.rows.length) { + return utils.call(callback); + } + var metadata = JSON.parse(result.rows.item(0).metadata); + metadata.rev_tree = rev_tree; + + var sql = 'DELETE FROM ' + BY_SEQ_STORE + ' WHERE doc_id_rev IN (' + + revs.map(function (rev) {return quote(docId + '::' + rev); }).join(',') + ')'; + + tx.executeSql(sql, [], function (tx, result) { + var sql = 'UPDATE ' + DOC_STORE + ' SET json = ? WHERE id = ?'; + + tx.executeSql(sql, [JSON.stringify(metadata), docId], function (tx, result) { + callback(); + }); + }); + }); + }); + }; + + return api; +} + +webSqlPouch.valid = function () { + if (typeof window !== 'undefined') { + if (window.navigator && window.navigator.sqlitePlugin && window.navigator.sqlitePlugin.openDatabase) { + return true; + } else if (window.sqlitePlugin && window.sqlitePlugin.openDatabase) { + return true; + } else if (window.openDatabase) { + return true; + } + } + return false; +}; + +webSqlPouch.destroy = function (name, opts, callback) { + var db = openDB(name, POUCH_VERSION, name, POUCH_SIZE); + db.transaction(function (tx) { + tx.executeSql('DROP TABLE IF EXISTS ' + DOC_STORE, []); + tx.executeSql('DROP TABLE IF EXISTS ' + BY_SEQ_STORE, []); + tx.executeSql('DROP TABLE IF EXISTS ' + ATTACH_STORE, []); + tx.executeSql('DROP TABLE IF EXISTS ' + META_STORE, []); + }, unknownError(callback), function () { + utils.call(callback, null); + }); +}; + +webSqlPouch.Changes = new utils.Changes(); + +module.exports = webSqlPouch; + +},{"../deps/errors":8,"../merge":13,"../utils":16}],5:[function(_dereq_,module,exports){ +"use strict"; + +var Adapter = _dereq_('./adapter')(PouchDB); +function PouchDB(name, opts, callback) { + + if (!(this instanceof PouchDB)) { + return new PouchDB(name, opts, callback); + } + + if (typeof opts === 'function' || typeof opts === 'undefined') { + callback = opts; + opts = {}; + } + + if (typeof name === 'object') { + opts = name; + name = undefined; + } + + if (typeof callback === 'undefined') { + callback = function () {}; + } + + var originalName = opts.name || name; + var backend = PouchDB.parseAdapter(originalName); + + opts.originalName = originalName; + opts.name = backend.name; + opts.adapter = opts.adapter || backend.adapter; + + if (!PouchDB.adapters[opts.adapter]) { + throw 'Adapter is missing'; + } + + if (!PouchDB.adapters[opts.adapter].valid()) { + throw 'Invalid Adapter'; + } + + var adapter = new Adapter(opts, function (err, db) { + if (err) { + if (callback) { + callback(err); + } + return; + } + + for (var plugin in PouchDB.plugins) { + // In future these will likely need to be async to allow the plugin + // to initialise + var pluginObj = PouchDB.plugins[plugin](db); + for (var api in pluginObj) { + // We let things like the http adapter use its own implementation + // as it shares a lot of code + if (!(api in db)) { + db[api] = pluginObj[api]; + } + } + } + db.taskqueue.ready(true); + db.taskqueue.execute(db); + callback(null, db); + }); + for (var j in adapter) { + this[j] = adapter[j]; + } + for (var plugin in PouchDB.plugins) { + // In future these will likely need to be async to allow the plugin + // to initialise + var pluginObj = PouchDB.plugins[plugin](this); + for (var api in pluginObj) { + // We let things like the http adapter use its own implementation + // as it shares a lot of code + if (!(api in this)) { + this[api] = pluginObj[api]; + } + } + } +} + +module.exports = PouchDB; +},{"./adapter":1}],6:[function(_dereq_,module,exports){ +var process=_dereq_("__browserify_process");"use strict"; + +var request = _dereq_('request'); +var extend = _dereq_('./extend.js'); +var createBlob = _dereq_('./blob.js'); +var errors = _dereq_('./errors'); + +function ajax(options, callback) { + + if (typeof options === "function") { + callback = options; + options = {}; + } + + function call(fun) { + /* jshint validthis: true */ + var args = Array.prototype.slice.call(arguments, 1); + if (typeof fun === typeof Function) { + fun.apply(this, args); + } + } + + var defaultOptions = { + method : "GET", + headers: {}, + json: true, + processData: true, + timeout: 10000 + }; + + options = extend(true, defaultOptions, options); + + function onSuccess(obj, resp, cb) { + if (!options.binary && !options.json && options.processData && + typeof obj !== 'string') { + obj = JSON.stringify(obj); + } else if (!options.binary && options.json && typeof obj === 'string') { + try { + obj = JSON.parse(obj); + } catch (e) { + // Probably a malformed JSON from server + call(cb, e); + return; + } + } + if (Array.isArray(obj)) { + obj = obj.map(function (v) { + var obj; + if (v.ok) { + return v; + } else if (v.error && v.error === 'conflict') { + obj = errors.REV_CONFLICT; + obj.id = v.id; + return obj; + } else if (v.missing) { + obj = errors.MISSING_DOC; + obj.missing = v.missing; + return obj; + } + }); + } + call(cb, null, obj, resp); + } + + function onError(err, cb) { + var errParsed, errObj, errType, key; + try { + errParsed = JSON.parse(err.responseText); + //would prefer not to have a try/catch clause + for (key in errors) { + if (errors[key].name === errParsed.error) { + errType = errors[key]; + break; + } + } + errType = errType || errors.UNKNOWN_ERROR; + errObj = errors.error(errType, errParsed.reason); + } catch (e) { + errObj = errors.error(errors.UNKNOWN_ERROR); + } + call(cb, errObj); + } + + if (process.browser && typeof XMLHttpRequest !== 'undefined') { + var timer, timedout = false; + var xhr = new XMLHttpRequest(); + + xhr.open(options.method, options.url); + xhr.withCredentials = true; + + if (options.json) { + options.headers.Accept = 'application/json'; + options.headers['Content-Type'] = options.headers['Content-Type'] || + 'application/json'; + if (options.body && options.processData && typeof options.body !== "string") { + options.body = JSON.stringify(options.body); + } + } + + if (options.binary) { + xhr.responseType = 'arraybuffer'; + } + + var createCookie = function (name, value, days) { + var expires = ""; + if (days) { + var date = new Date(); + date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); + expires = "; expires=" + date.toGMTString(); + } + document.cookie = name + "=" + value + expires + "; path=/"; + }; + + for (var key in options.headers) { + if (key === 'Cookie') { + var cookie = options.headers[key].split('='); + createCookie(cookie[0], cookie[1], 10); + } else { + xhr.setRequestHeader(key, options.headers[key]); + } + } + + if (!("body" in options)) { + options.body = null; + } + + var abortReq = function () { + timedout = true; + xhr.abort(); + call(onError, xhr, callback); + }; + + xhr.onreadystatechange = function () { + if (xhr.readyState !== 4 || timedout) { + return; + } + clearTimeout(timer); + if (xhr.status >= 200 && xhr.status < 300) { + var data; + if (options.binary) { + data = createBlob([xhr.response || ''], { + type: xhr.getResponseHeader('Content-Type') + }); + } else { + data = xhr.responseText; + } + call(onSuccess, data, xhr, callback); + } else { + call(onError, xhr, callback); + } + }; + + if (options.timeout > 0) { + timer = setTimeout(abortReq, options.timeout); + xhr.upload.onprogress = xhr.onprogress = function () { + clearTimeout(timer); + timer = setTimeout(abortReq, options.timeout); + }; + } + xhr.send(options.body); + return {abort: abortReq}; + + } else { + + if (options.json) { + if (!options.binary) { + options.headers.Accept = 'application/json'; + } + options.headers['Content-Type'] = options.headers['Content-Type'] || + 'application/json'; + } + + if (options.binary) { + options.encoding = null; + options.json = false; + } + + if (!options.processData) { + options.json = false; + } + + return request(options, function (err, response, body) { + if (err) { + err.status = response ? response.statusCode : 400; + return call(onError, err, callback); + } + var error; + var content_type = response.headers['content-type']; + var data = (body || ''); + + // CouchDB doesn't always return the right content-type for JSON data, so + // we check for ^{ and }$ (ignoring leading/trailing whitespace) + if (!options.binary && (options.json || !options.processData) && + typeof data !== 'object' && + (/json/.test(content_type) || + (/^[\s]*\{/.test(data) && /\}[\s]*$/.test(data)))) { + data = JSON.parse(data); + } + + if (response.statusCode >= 200 && response.statusCode < 300) { + call(onSuccess, data, response, callback); + } + else { + if (options.binary) { + data = JSON.parse(data.toString()); + } + if (data.reason === 'missing') { + error = errors.MISSING_DOC; + } else if (data.reason === 'no_db_file') { + error = errors.error(errors.DB_MISSING, data.reason); + } else if (data.error === 'conflict') { + error = errors.REV_CONFLICT; + } else { + error = errors.error(errors.UNKNOWN_ERROR, data.reason, data.error); + } + error.status = response.statusCode; + call(callback, error); + } + }); + } +} + +module.exports = ajax; + +},{"./blob.js":7,"./errors":8,"./extend.js":9,"__browserify_process":19,"request":18}],7:[function(_dereq_,module,exports){ +"use strict"; + +//Abstracts constructing a Blob object, so it also works in older +//browsers that don't support the native Blob constructor. (i.e. +//old QtWebKit versions, at least). +function createBlob(parts, properties) { + parts = parts || []; + properties = properties || {}; + try { + return new Blob(parts, properties); + } catch (e) { + if (e.name !== "TypeError") { + throw e; + } + var BlobBuilder = window.BlobBuilder || window.MSBlobBuilder || window.MozBlobBuilder || window.WebKitBlobBuilder; + var builder = new BlobBuilder(); + for (var i = 0; i < parts.length; i += 1) { + builder.append(parts[i]); + } + return builder.getBlob(properties.type); + } +} + +module.exports = createBlob; + + +},{}],8:[function(_dereq_,module,exports){ +"use strict"; + +function PouchError(opts) { + this.status = opts.status; + this.name = opts.error; + this.message = opts.reason; + this.error = true; +} +PouchError.prototype = new Error(); + + +exports.MISSING_BULK_DOCS = new PouchError({ + status: 400, + error: 'bad_request', + reason: "Missing JSON list of 'docs'" +}); +exports.MISSING_DOC = new PouchError({ + status: 404, + error: 'not_found', + reason: 'missing' +}); +exports.REV_CONFLICT = new PouchError({ + status: 409, + error: 'conflict', + reason: 'Document update conflict' +}); +exports.INVALID_ID = new PouchError({ + status: 400, + error: 'invalid_id', + reason: '_id field must contain a string' +}); +exports.MISSING_ID = new PouchError({ + status: 412, + error: 'missing_id', + reason: '_id is required for puts' +}); +exports.RESERVED_ID = new PouchError({ + status: 400, + error: 'bad_request', + reason: 'Only reserved document ids may start with underscore.' +}); +exports.NOT_OPEN = new PouchError({ + status: 412, + error: 'precondition_failed', + reason: 'Database not open so cannot close' +}); +exports.UNKNOWN_ERROR = new PouchError({ + status: 500, + error: 'unknown_error', + reason: 'Database encountered an unknown error' +}); +exports.BAD_ARG = new PouchError({ + status: 500, + error: 'badarg', + reason: 'Some query argument is invalid' +}); +exports.INVALID_REQUEST = new PouchError({ + status: 400, + error: 'invalid_request', + reason: 'Request was invalid' +}); +exports.QUERY_PARSE_ERROR = new PouchError({ + status: 400, + error: 'query_parse_error', + reason: 'Some query parameter is invalid' +}); +exports.DOC_VALIDATION = new PouchError({ + status: 500, + error: 'doc_validation', + reason: 'Bad special document member' +}); +exports.BAD_REQUEST = new PouchError({ + status: 400, + error: 'bad_request', + reason: 'Something wrong with the request' +}); +exports.NOT_AN_OBJECT = new PouchError({ + status: 400, + error: 'bad_request', + reason: 'Document must be a JSON object' +}); +exports.DB_MISSING = new PouchError({ + status: 404, + error: 'not_found', + reason: 'Database not found' +}); +exports.IDB_ERROR = new PouchError({ + status: 500, + error: 'indexed_db_went_bad', + reason: 'unknown' +}); +exports.WSQ_ERROR = new PouchError({ + status: 500, + error: 'web_sql_went_bad', + reason: 'unknown' +}); +exports.LDB_ERROR = new PouchError({ + status: 500, + error: 'levelDB_went_went_bad', + reason: 'unknown' +}); +exports.error = function (error, reason, name) { + function CustomPouchError(msg) { + this.message = reason; + if (name) { + this.name = name; + } + } + CustomPouchError.prototype = error; + return new CustomPouchError(reason); +}; +},{}],9:[function(_dereq_,module,exports){ +"use strict"; + +// Extends method +// (taken from http://code.jquery.com/jquery-1.9.0.js) +// Populate the class2type map +var class2type = {}; + +var types = ["Boolean", "Number", "String", "Function", "Array", "Date", "RegExp", "Object", "Error"]; +for (var i = 0; i < types.length; i++) { + var typename = types[i]; + class2type["[object " + typename + "]"] = typename.toLowerCase(); +} + +var core_toString = class2type.toString; +var core_hasOwn = class2type.hasOwnProperty; + +function type(obj) { + if (obj === null) { + return String(obj); + } + return typeof obj === "object" || typeof obj === "function" ? + class2type[core_toString.call(obj)] || "object" : + typeof obj; +} + +function isWindow(obj) { + return obj !== null && obj === obj.window; +} + +function isPlainObject(obj) { + // Must be an Object. + // Because of IE, we also have to check the presence of the constructor property. + // Make sure that DOM nodes and window objects don't pass through, as well + if (!obj || type(obj) !== "object" || obj.nodeType || isWindow(obj)) { + return false; + } + + try { + // Not own constructor property must be Object + if (obj.constructor && + !core_hasOwn.call(obj, "constructor") && + !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf")) { + return false; + } + } catch ( e ) { + // IE8,9 Will throw exceptions on certain host objects #9897 + return false; + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + var key; + for (key in obj) {} + + return key === undefined || core_hasOwn.call(obj, key); +} + + +function isFunction(obj) { + return type(obj) === "function"; +} + +var isArray = Array.isArray || function (obj) { + return type(obj) === "array"; +}; + +function extend() { + var options, name, src, copy, copyIsArray, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if (typeof target === "boolean") { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if (typeof target !== "object" && !isFunction(target)) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if (length === i) { + /* jshint validthis: true */ + target = this; + --i; + } + + for (; i < length; i++) { + // Only deal with non-null/undefined values + if ((options = arguments[i]) != null) { + // Extend the base object + for (name in options) { + src = target[name]; + copy = options[name]; + + // Prevent never-ending loop + if (target === copy) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) { + if (copyIsArray) { + copyIsArray = false; + clone = src && isArray(src) ? src : []; + + } else { + clone = src && isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[name] = extend(deep, clone, copy); + + // Don't bring in undefined values + } else if (copy !== undefined) { + if (!(isArray(options) && isFunction(copy))) { + target[name] = copy; + } + } + } + } + } + + // Return the modified object + return target; +} + + +module.exports = extend; + + +},{}],10:[function(_dereq_,module,exports){ +var process=_dereq_("__browserify_process");"use strict"; + +/** +* +* MD5 (Message-Digest Algorithm) +* +* For original source see http://www.webtoolkit.info/ +* Download: 15.02.2009 from http://www.webtoolkit.info/javascript-md5.html +* +* Licensed under CC-BY 2.0 License +* (http://creativecommons.org/licenses/by/2.0/uk/) +* +**/ +var crypto = _dereq_('crypto'); + +exports.MD5 = function (string) { + if (!process.browser) { + return crypto.createHash('md5').update(string).digest('hex'); + } + function rotateLeft(lValue, iShiftBits) { + return (lValue<>>(32 - iShiftBits)); + } + + function addUnsigned(lX, lY) { + var lX4, lY4, lX8, lY8, lResult; + lX8 = (lX & 0x80000000); + lY8 = (lY & 0x80000000); + lX4 = (lX & 0x40000000); + lY4 = (lY & 0x40000000); + lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF); + if (lX4 & lY4) { + return (lResult ^ 0x80000000 ^ lX8 ^ lY8); + } + if (lX4 | lY4) { + if (lResult & 0x40000000) { + return (lResult ^ 0xC0000000 ^ lX8 ^ lY8); + } else { + return (lResult ^ 0x40000000 ^ lX8 ^ lY8); + } + } else { + return (lResult ^ lX8 ^ lY8); + } + } + + function f(x, y, z) { return (x & y) | ((~x) & z); } + function g(x, y, z) { return (x & z) | (y & (~z)); } + function h(x, y, z) { return (x ^ y ^ z); } + function i(x, y, z) { return (y ^ (x | (~z))); } + + function ff(a, b, c, d, x, s, ac) { + a = addUnsigned(a, addUnsigned(addUnsigned(f(b, c, d), x), ac)); + return addUnsigned(rotateLeft(a, s), b); + } + + function gg(a, b, c, d, x, s, ac) { + a = addUnsigned(a, addUnsigned(addUnsigned(g(b, c, d), x), ac)); + return addUnsigned(rotateLeft(a, s), b); + } + + function hh(a, b, c, d, x, s, ac) { + a = addUnsigned(a, addUnsigned(addUnsigned(h(b, c, d), x), ac)); + return addUnsigned(rotateLeft(a, s), b); + } + + function ii(a, b, c, d, x, s, ac) { + a = addUnsigned(a, addUnsigned(addUnsigned(i(b, c, d), x), ac)); + return addUnsigned(rotateLeft(a, s), b); + } + + function convertToWordArray(string) { + var lWordCount; + var lMessageLength = string.length; + var lNumberOfWords_temp1 = lMessageLength + 8; + var lNumberOfWords_temp2 = (lNumberOfWords_temp1 - (lNumberOfWords_temp1 % 64)) / 64; + var lNumberOfWords = (lNumberOfWords_temp2 + 1) * 16; + var lWordArray = new Array(lNumberOfWords - 1); + var lBytePosition = 0; + var lByteCount = 0; + while (lByteCount < lMessageLength) { + lWordCount = (lByteCount - (lByteCount % 4)) / 4; + lBytePosition = (lByteCount % 4) * 8; + lWordArray[lWordCount] = (lWordArray[lWordCount] | (string.charCodeAt(lByteCount)<>>29; + return lWordArray; + } + + function wordToHex(lValue) { + var wordToHexValue = "", wordToHexValue_temp = "", lByte, lCount; + for (lCount = 0;lCount <= 3;lCount++) { + lByte = (lValue>>>(lCount * 8)) & 255; + wordToHexValue_temp = "0" + lByte.toString(16); + wordToHexValue = wordToHexValue + wordToHexValue_temp.substr(wordToHexValue_temp.length - 2, 2); + } + return wordToHexValue; + } + + //** function Utf8Encode(string) removed. Aready defined in pidcrypt_utils.js + + var x = []; + var k, AA, BB, CC, DD, a, b, c, d; + var S11 = 7, S12 = 12, S13 = 17, S14 = 22; + var S21 = 5, S22 = 9, S23 = 14, S24 = 20; + var S31 = 4, S32 = 11, S33 = 16, S34 = 23; + var S41 = 6, S42 = 10, S43 = 15, S44 = 21; + + // string = Utf8Encode(string); #function call removed + + x = convertToWordArray(string); + + a = 0x67452301; + b = 0xEFCDAB89; + c = 0x98BADCFE; + d = 0x10325476; + + for (k = 0;k < x.length;k += 16) { + AA = a; + BB = b; + CC = c; + DD = d; + a = ff(a, b, c, d, x[k + 0], S11, 0xD76AA478); + d = ff(d, a, b, c, x[k + 1], S12, 0xE8C7B756); + c = ff(c, d, a, b, x[k + 2], S13, 0x242070DB); + b = ff(b, c, d, a, x[k + 3], S14, 0xC1BDCEEE); + a = ff(a, b, c, d, x[k + 4], S11, 0xF57C0FAF); + d = ff(d, a, b, c, x[k + 5], S12, 0x4787C62A); + c = ff(c, d, a, b, x[k + 6], S13, 0xA8304613); + b = ff(b, c, d, a, x[k + 7], S14, 0xFD469501); + a = ff(a, b, c, d, x[k + 8], S11, 0x698098D8); + d = ff(d, a, b, c, x[k + 9], S12, 0x8B44F7AF); + c = ff(c, d, a, b, x[k + 10], S13, 0xFFFF5BB1); + b = ff(b, c, d, a, x[k + 11], S14, 0x895CD7BE); + a = ff(a, b, c, d, x[k + 12], S11, 0x6B901122); + d = ff(d, a, b, c, x[k + 13], S12, 0xFD987193); + c = ff(c, d, a, b, x[k + 14], S13, 0xA679438E); + b = ff(b, c, d, a, x[k + 15], S14, 0x49B40821); + a = gg(a, b, c, d, x[k + 1], S21, 0xF61E2562); + d = gg(d, a, b, c, x[k + 6], S22, 0xC040B340); + c = gg(c, d, a, b, x[k + 11], S23, 0x265E5A51); + b = gg(b, c, d, a, x[k + 0], S24, 0xE9B6C7AA); + a = gg(a, b, c, d, x[k + 5], S21, 0xD62F105D); + d = gg(d, a, b, c, x[k + 10], S22, 0x2441453); + c = gg(c, d, a, b, x[k + 15], S23, 0xD8A1E681); + b = gg(b, c, d, a, x[k + 4], S24, 0xE7D3FBC8); + a = gg(a, b, c, d, x[k + 9], S21, 0x21E1CDE6); + d = gg(d, a, b, c, x[k + 14], S22, 0xC33707D6); + c = gg(c, d, a, b, x[k + 3], S23, 0xF4D50D87); + b = gg(b, c, d, a, x[k + 8], S24, 0x455A14ED); + a = gg(a, b, c, d, x[k + 13], S21, 0xA9E3E905); + d = gg(d, a, b, c, x[k + 2], S22, 0xFCEFA3F8); + c = gg(c, d, a, b, x[k + 7], S23, 0x676F02D9); + b = gg(b, c, d, a, x[k + 12], S24, 0x8D2A4C8A); + a = hh(a, b, c, d, x[k + 5], S31, 0xFFFA3942); + d = hh(d, a, b, c, x[k + 8], S32, 0x8771F681); + c = hh(c, d, a, b, x[k + 11], S33, 0x6D9D6122); + b = hh(b, c, d, a, x[k + 14], S34, 0xFDE5380C); + a = hh(a, b, c, d, x[k + 1], S31, 0xA4BEEA44); + d = hh(d, a, b, c, x[k + 4], S32, 0x4BDECFA9); + c = hh(c, d, a, b, x[k + 7], S33, 0xF6BB4B60); + b = hh(b, c, d, a, x[k + 10], S34, 0xBEBFBC70); + a = hh(a, b, c, d, x[k + 13], S31, 0x289B7EC6); + d = hh(d, a, b, c, x[k + 0], S32, 0xEAA127FA); + c = hh(c, d, a, b, x[k + 3], S33, 0xD4EF3085); + b = hh(b, c, d, a, x[k + 6], S34, 0x4881D05); + a = hh(a, b, c, d, x[k + 9], S31, 0xD9D4D039); + d = hh(d, a, b, c, x[k + 12], S32, 0xE6DB99E5); + c = hh(c, d, a, b, x[k + 15], S33, 0x1FA27CF8); + b = hh(b, c, d, a, x[k + 2], S34, 0xC4AC5665); + a = ii(a, b, c, d, x[k + 0], S41, 0xF4292244); + d = ii(d, a, b, c, x[k + 7], S42, 0x432AFF97); + c = ii(c, d, a, b, x[k + 14], S43, 0xAB9423A7); + b = ii(b, c, d, a, x[k + 5], S44, 0xFC93A039); + a = ii(a, b, c, d, x[k + 12], S41, 0x655B59C3); + d = ii(d, a, b, c, x[k + 3], S42, 0x8F0CCC92); + c = ii(c, d, a, b, x[k + 10], S43, 0xFFEFF47D); + b = ii(b, c, d, a, x[k + 1], S44, 0x85845DD1); + a = ii(a, b, c, d, x[k + 8], S41, 0x6FA87E4F); + d = ii(d, a, b, c, x[k + 15], S42, 0xFE2CE6E0); + c = ii(c, d, a, b, x[k + 6], S43, 0xA3014314); + b = ii(b, c, d, a, x[k + 13], S44, 0x4E0811A1); + a = ii(a, b, c, d, x[k + 4], S41, 0xF7537E82); + d = ii(d, a, b, c, x[k + 11], S42, 0xBD3AF235); + c = ii(c, d, a, b, x[k + 2], S43, 0x2AD7D2BB); + b = ii(b, c, d, a, x[k + 9], S44, 0xEB86D391); + a = addUnsigned(a, AA); + b = addUnsigned(b, BB); + c = addUnsigned(c, CC); + d = addUnsigned(d, DD); + } + var temp = wordToHex(a) + wordToHex(b) + wordToHex(c) + wordToHex(d); + return temp.toLowerCase(); +}; +},{"__browserify_process":19,"crypto":18}],11:[function(_dereq_,module,exports){ +"use strict"; + +// BEGIN Math.uuid.js + +/*! +Math.uuid.js (v1.4) +http://www.broofa.com +mailto:robert@broofa.com + +Copyright (c) 2010 Robert Kieffer +Dual licensed under the MIT and GPL licenses. +*/ + +/* + * Generate a random uuid. + * + * USAGE: Math.uuid(length, radix) + * length - the desired number of characters + * radix - the number of allowable values for each character. + * + * EXAMPLES: + * // No arguments - returns RFC4122, version 4 ID + * >>> Math.uuid() + * "92329D39-6F5C-4520-ABFC-AAB64544E172" + * + * // One argument - returns ID of the specified length + * >>> Math.uuid(15) // 15 character ID (default base=62) + * "VcydxgltxrVZSTV" + * + * // Two arguments - returns ID of the specified length, and radix. (Radix must be <= 62) + * >>> Math.uuid(8, 2) // 8 character ID (base=2) + * "01001010" + * >>> Math.uuid(8, 10) // 8 character ID (base=10) + * "47473046" + * >>> Math.uuid(8, 16) // 8 character ID (base=16) + * "098F4D35" + */ + + +function uuid(len, radix) { + var chars = uuid.CHARS; + var uuidInner = []; + var i; + + radix = radix || chars.length; + + if (len) { + // Compact form + for (i = 0; i < len; i++) { + uuidInner[i] = chars[0 | Math.random() * radix]; + } + } else { + // rfc4122, version 4 form + var r; + + // rfc4122 requires these characters + uuidInner[8] = uuidInner[13] = uuidInner[18] = uuidInner[23] = '-'; + uuidInner[14] = '4'; + + // Fill in random data. At i==19 set the high bits of clock sequence as + // per rfc4122, sec. 4.1.5 + for (i = 0; i < 36; i++) { + if (!uuidInner[i]) { + r = 0 | Math.random() * 16; + uuidInner[i] = chars[(i === 19) ? (r & 0x3) | 0x8 : r]; + } + } + } + + return uuidInner.join(''); +} + +uuid.CHARS = ( + '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' + + 'abcdefghijklmnopqrstuvwxyz' +).split(''); + +module.exports = uuid; + + +},{}],12:[function(_dereq_,module,exports){ +var process=_dereq_("__browserify_process");"use strict"; + +var PouchDB = _dereq_('./setup'); + +module.exports = PouchDB; + +PouchDB.ajax = _dereq_('./deps/ajax'); +PouchDB.extend = _dereq_('./deps/extend'); +PouchDB.utils = _dereq_('./utils'); +PouchDB.Errors = _dereq_('./deps/errors'); +PouchDB.replicate = _dereq_('./replicate').replicate; +PouchDB.version = _dereq_('./version'); +var httpAdapter = _dereq_('./adapters/http'); +PouchDB.adapter('http', httpAdapter); +PouchDB.adapter('https', httpAdapter); + +PouchDB.adapter('idb', _dereq_('./adapters/idb')); +PouchDB.adapter('websql', _dereq_('./adapters/websql')); +PouchDB.plugin('mapreduce', _dereq_('pouchdb-mapreduce')); + +if (!process.browser) { + var ldbAdapter = _dereq_('./adapters/leveldb'); + PouchDB.adapter('ldb', ldbAdapter); + PouchDB.adapter('leveldb', ldbAdapter); +} + +},{"./adapters/http":2,"./adapters/idb":3,"./adapters/leveldb":18,"./adapters/websql":4,"./deps/ajax":6,"./deps/errors":8,"./deps/extend":9,"./replicate":14,"./setup":15,"./utils":16,"./version":17,"__browserify_process":19,"pouchdb-mapreduce":20}],13:[function(_dereq_,module,exports){ +'use strict'; + +var extend = _dereq_('./deps/extend'); + + +// for a better overview of what this is doing, read: +// https://github.com/apache/couchdb/blob/master/src/couchdb/couch_key_tree.erl +// +// But for a quick intro, CouchDB uses a revision tree to store a documents +// history, A -> B -> C, when a document has conflicts, that is a branch in the +// tree, A -> (B1 | B2 -> C), We store these as a nested array in the format +// +// KeyTree = [Path ... ] +// Path = {pos: position_from_root, ids: Tree} +// Tree = [Key, Opts, [Tree, ...]], in particular single node: [Key, []] + +// Turn a path as a flat array into a tree with a single branch +function pathToTree(path) { + var doc = path.shift(); + var root = [doc.id, doc.opts, []]; + var leaf = root; + var nleaf; + + while (path.length) { + doc = path.shift(); + nleaf = [doc.id, doc.opts, []]; + leaf[2].push(nleaf); + leaf = nleaf; + } + return root; +} + +// Merge two trees together +// The roots of tree1 and tree2 must be the same revision +function mergeTree(in_tree1, in_tree2) { + var queue = [{tree1: in_tree1, tree2: in_tree2}]; + var conflicts = false; + while (queue.length > 0) { + var item = queue.pop(); + var tree1 = item.tree1; + var tree2 = item.tree2; + + if (tree1[1].status || tree2[1].status) { + tree1[1].status = (tree1[1].status === 'available' || + tree2[1].status === 'available') ? 'available' : 'missing'; + } + + for (var i = 0; i < tree2[2].length; i++) { + if (!tree1[2][0]) { + conflicts = 'new_leaf'; + tree1[2][0] = tree2[2][i]; + continue; + } + + var merged = false; + for (var j = 0; j < tree1[2].length; j++) { + if (tree1[2][j][0] === tree2[2][i][0]) { + queue.push({tree1: tree1[2][j], tree2: tree2[2][i]}); + merged = true; + } + } + if (!merged) { + conflicts = 'new_branch'; + tree1[2].push(tree2[2][i]); + tree1[2].sort(); + } + } + } + return {conflicts: conflicts, tree: in_tree1}; +} + +function doMerge(tree, path, dontExpand) { + var restree = []; + var conflicts = false; + var merged = false; + var res, branch; + + if (!tree.length) { + return {tree: [path], conflicts: 'new_leaf'}; + } + + tree.forEach(function (branch) { + if (branch.pos === path.pos && branch.ids[0] === path.ids[0]) { + // Paths start at the same position and have the same root, so they need + // merged + res = mergeTree(branch.ids, path.ids); + restree.push({pos: branch.pos, ids: res.tree}); + conflicts = conflicts || res.conflicts; + merged = true; + } else if (dontExpand !== true) { + // The paths start at a different position, take the earliest path and + // traverse up until it as at the same point from root as the path we want to + // merge. If the keys match we return the longer path with the other merged + // After stemming we dont want to expand the trees + + var t1 = branch.pos < path.pos ? branch : path; + var t2 = branch.pos < path.pos ? path : branch; + var diff = t2.pos - t1.pos; + + var candidateParents = []; + + var trees = []; + trees.push({ids: t1.ids, diff: diff, parent: null, parentIdx: null}); + while (trees.length > 0) { + var item = trees.pop(); + if (item.diff === 0) { + if (item.ids[0] === t2.ids[0]) { + candidateParents.push(item); + } + continue; + } + if (!item.ids) { + continue; + } + /*jshint loopfunc:true */ + item.ids[2].forEach(function (el, idx) { + trees.push({ids: el, diff: item.diff - 1, parent: item.ids, parentIdx: idx}); + }); + } + + var el = candidateParents[0]; + + if (!el) { + restree.push(branch); + } else { + res = mergeTree(el.ids, t2.ids); + el.parent[2][el.parentIdx] = res.tree; + restree.push({pos: t1.pos, ids: t1.ids}); + conflicts = conflicts || res.conflicts; + merged = true; + } + } else { + restree.push(branch); + } + }); + + // We didnt find + if (!merged) { + restree.push(path); + } + + restree.sort(function (a, b) { + return a.pos - b.pos; + }); + + return { + tree: restree, + conflicts: conflicts || 'internal_node' + }; +} + +// To ensure we dont grow the revision tree infinitely, we stem old revisions +function stem(tree, depth) { + // First we break out the tree into a complete list of root to leaf paths, + // we cut off the start of the path and generate a new set of flat trees + var stemmedPaths = PouchMerge.rootToLeaf(tree).map(function (path) { + var stemmed = path.ids.slice(-depth); + return { + pos: path.pos + (path.ids.length - stemmed.length), + ids: pathToTree(stemmed) + }; + }); + // Then we remerge all those flat trees together, ensuring that we dont + // connect trees that would go beyond the depth limit + return stemmedPaths.reduce(function (prev, current, i, arr) { + return doMerge(prev, current, true).tree; + }, [stemmedPaths.shift()]); +} + +var PouchMerge = {}; + +PouchMerge.merge = function (tree, path, depth) { + // Ugh, nicer way to not modify arguments in place? + tree = extend(true, [], tree); + path = extend(true, {}, path); + var newTree = doMerge(tree, path); + return { + tree: stem(newTree.tree, depth), + conflicts: newTree.conflicts + }; +}; + +// We fetch all leafs of the revision tree, and sort them based on tree length +// and whether they were deleted, undeleted documents with the longest revision +// tree (most edits) win +// The final sort algorithm is slightly documented in a sidebar here: +// http://guide.couchdb.org/draft/conflicts.html +PouchMerge.winningRev = function (metadata) { + var leafs = []; + PouchMerge.traverseRevTree(metadata.rev_tree, + function (isLeaf, pos, id, something, opts) { + if (isLeaf) { + leafs.push({pos: pos, id: id, deleted: !!opts.deleted}); + } + }); + leafs.sort(function (a, b) { + if (a.deleted !== b.deleted) { + return a.deleted > b.deleted ? 1 : -1; + } + if (a.pos !== b.pos) { + return b.pos - a.pos; + } + return a.id < b.id ? 1 : -1; + }); + + return leafs[0].pos + '-' + leafs[0].id; +}; + +// Pretty much all below can be combined into a higher order function to +// traverse revisions +// The return value from the callback will be passed as context to all +// children of that node +PouchMerge.traverseRevTree = function (revs, callback) { + var toVisit = []; + + revs.forEach(function (tree) { + toVisit.push({pos: tree.pos, ids: tree.ids}); + }); + while (toVisit.length > 0) { + var node = toVisit.pop(); + var pos = node.pos; + var tree = node.ids; + var newCtx = callback(tree[2].length === 0, pos, tree[0], node.ctx, tree[1]); + /*jshint loopfunc: true */ + tree[2].forEach(function (branch) { + toVisit.push({pos: pos + 1, ids: branch, ctx: newCtx}); + }); + } +}; + +PouchMerge.collectLeaves = function (revs) { + var leaves = []; + PouchMerge.traverseRevTree(revs, function (isLeaf, pos, id, acc, opts) { + if (isLeaf) { + leaves.unshift({rev: pos + "-" + id, pos: pos, opts: opts}); + } + }); + leaves.sort(function (a, b) { + return b.pos - a.pos; + }); + leaves.map(function (leaf) { delete leaf.pos; }); + return leaves; +}; + +// returns revs of all conflicts that is leaves such that +// 1. are not deleted and +// 2. are different than winning revision +PouchMerge.collectConflicts = function (metadata) { + var win = PouchMerge.winningRev(metadata); + var leaves = PouchMerge.collectLeaves(metadata.rev_tree); + var conflicts = []; + leaves.forEach(function (leaf) { + if (leaf.rev !== win && !leaf.opts.deleted) { + conflicts.push(leaf.rev); + } + }); + return conflicts; +}; + +PouchMerge.rootToLeaf = function (tree) { + var paths = []; + PouchMerge.traverseRevTree(tree, function (isLeaf, pos, id, history, opts) { + history = history ? history.slice(0) : []; + history.push({id: id, opts: opts}); + if (isLeaf) { + var rootPos = pos + 1 - history.length; + paths.unshift({pos: rootPos, ids: history}); + } + return history; + }); + return paths; +}; + + +module.exports = PouchMerge; + +},{"./deps/extend":9}],14:[function(_dereq_,module,exports){ +var process=_dereq_("__browserify_process");'use strict'; + +var PouchUtils = _dereq_('./utils'); +var Pouch = _dereq_('./index'); + +// We create a basic promise so the caller can cancel the replication possibly +// before we have actually started listening to changes etc +function Promise() { + var that = this; + this.cancelled = false; + this.cancel = function () { + that.cancelled = true; + }; +} + +// The RequestManager ensures that only one database request is active at +// at time, it ensures we dont max out simultaneous HTTP requests and makes +// the replication process easier to reason about + +function RequestManager(promise) { + var queue = []; + var api = {}; + var processing = false; + + // Add a new request to the queue, if we arent currently processing anything + // then process it immediately + api.enqueue = function (fun, args) { + queue.push({fun: fun, args: args}); + if (!processing) { + api.process(); + } + }; + + // Process the next request + api.process = function () { + if (processing || !queue.length || promise.cancelled) { + return; + } + processing = true; + var task = queue.shift(); + process.nextTick(function () { + task.fun.apply(null, task.args); + }); + }; + + // We need to be notified whenever a request is complete to process + // the next request + api.notifyRequestComplete = function () { + processing = false; + api.process(); + }; + + return api; +} + +// TODO: check CouchDB's replication id generation, generate a unique id particular +// to this replication + +function genReplicationId(src, target, opts) { + var filterFun = opts.filter ? opts.filter.toString() : ''; + return '_local/' + PouchUtils.Crypto.MD5(src.id() + target.id() + filterFun); +} + +// A checkpoint lets us restart replications from when they were last cancelled + +function fetchCheckpoint(src, target, id, callback) { + target.get(id, function (err, targetDoc) { + if (err && err.status === 404) { + callback(null, 0); + } else if (err) { + callback(err); + } else { + src.get(id, function (err, sourceDoc) { + if (err && err.status === 404 || (!err && (targetDoc.last_seq !== sourceDoc.last_seq))) { + callback(null, 0); + } else if (err) { + callback(err); + } else { + callback(null, sourceDoc.last_seq); + } + }); + } + }); +} + +function writeCheckpoint(src, target, id, checkpoint, callback) { + function updateCheckpoint(db, callback) { + db.get(id, function (err, doc) { + if (err && err.status === 404) { + doc = {_id: id}; + } + doc.last_seq = checkpoint; + db.put(doc, callback); + }); + } + updateCheckpoint(target, function (err, doc) { + updateCheckpoint(src, function (err, doc) { + callback(); + }); + }); +} + +function replicate(src, target, opts, promise) { + + var requests = new RequestManager(promise); + var writeQueue = []; + var repId = genReplicationId(src, target, opts); + var results = []; + var completed = false; + var pendingRevs = 0; + var last_seq = 0; + var continuous = opts.continuous || false; + var doc_ids = opts.doc_ids; + var result = { + ok: true, + start_time: new Date(), + docs_read: 0, + docs_written: 0 + }; + + function docsWritten(err, res, len) { + if (opts.onChange) { + for (var i = 0; i < len; i++) { + /*jshint validthis:true */ + opts.onChange.apply(this, [result]); + } + } + pendingRevs -= len; + result.docs_written += len; + + writeCheckpoint(src, target, repId, last_seq, function (err, res) { + requests.notifyRequestComplete(); + isCompleted(); + }); + } + + function writeDocs() { + if (!writeQueue.length) { + return requests.notifyRequestComplete(); + } + var len = writeQueue.length; + target.bulkDocs({docs: writeQueue}, {new_edits: false}, function (err, res) { + docsWritten(err, res, len); + }); + writeQueue = []; + } + + function eachRev(id, rev) { + src.get(id, {revs: true, rev: rev, attachments: true}, function (err, doc) { + result.docs_read++; + requests.notifyRequestComplete(); + writeQueue.push(doc); + requests.enqueue(writeDocs); + }); + } + + function onRevsDiff(diffCounts) { + return function (err, diffs) { + requests.notifyRequestComplete(); + if (err) { + if (continuous) { + promise.cancel(); + } + PouchUtils.call(opts.complete, err, null); + return; + } + + // We already have all diffs passed in `diffCounts` + if (Object.keys(diffs).length === 0) { + for (var docid in diffCounts) { + pendingRevs -= diffCounts[docid]; + } + isCompleted(); + return; + } + + var _enqueuer = function (rev) { + requests.enqueue(eachRev, [id, rev]); + }; + + for (var id in diffs) { + var diffsAlreadyHere = diffCounts[id] - diffs[id].missing.length; + pendingRevs -= diffsAlreadyHere; + diffs[id].missing.forEach(_enqueuer); + } + }; + } + + function fetchRevsDiff(diff, diffCounts) { + target.revsDiff(diff, onRevsDiff(diffCounts)); + } + + function onChange(change) { + last_seq = change.seq; + results.push(change); + var diff = {}; + diff[change.id] = change.changes.map(function (x) { return x.rev; }); + var counts = {}; + counts[change.id] = change.changes.length; + pendingRevs += change.changes.length; + requests.enqueue(fetchRevsDiff, [diff, counts]); + } + + function complete() { + completed = true; + isCompleted(); + } + + function isCompleted() { + if (completed && pendingRevs === 0) { + result.end_time = new Date(); + PouchUtils.call(opts.complete, null, result); + } + } + + fetchCheckpoint(src, target, repId, function (err, checkpoint) { + + if (err) { + return PouchUtils.call(opts.complete, err); + } + + last_seq = checkpoint; + + // Was the replication cancelled by the caller before it had a chance + // to start. Shouldnt we be calling complete? + if (promise.cancelled) { + return; + } + + var repOpts = { + continuous: continuous, + since: last_seq, + style: 'all_docs', + onChange: onChange, + complete: complete, + doc_ids: doc_ids + }; + + if (opts.filter) { + repOpts.filter = opts.filter; + } + + if (opts.query_params) { + repOpts.query_params = opts.query_params; + } + + var changes = src.changes(repOpts); + + if (opts.continuous) { + var cancel = promise.cancel; + promise.cancel = function () { + cancel(); + changes.cancel(); + }; + } + }); + +} + +function toPouch(db, callback) { + if (typeof db === 'string') { + return new Pouch(db, callback); + } + callback(null, db); +} + +exports.replicate = function (src, target, opts, callback) { + if (opts instanceof Function) { + callback = opts; + opts = {}; + } + if (opts === undefined) { + opts = {}; + } + if (!opts.complete) { + opts.complete = callback; + } + var replicateRet = new Promise(); + toPouch(src, function (err, src) { + if (err) { + return PouchUtils.call(callback, err); + } + toPouch(target, function (err, target) { + if (err) { + return PouchUtils.call(callback, err); + } + if (opts.server) { + if (typeof src.replicateOnServer !== 'function') { + return PouchUtils.call(callback, { error: 'Server replication not supported for ' + src.type() + ' adapter' }); + } + if (src.type() !== target.type()) { + return PouchUtils.call(callback, { error: 'Server replication for different adapter types (' + src.type() + ' and ' + target.type() + ') is not supported' }); + } + src.replicateOnServer(target, opts, replicateRet); + } else { + replicate(src, target, opts, replicateRet); + } + }); + }); + return replicateRet; +}; + +},{"./index":12,"./utils":16,"__browserify_process":19}],15:[function(_dereq_,module,exports){ +"use strict"; + +var PouchDB = _dereq_("./constructor"); + +PouchDB.adapters = {}; +PouchDB.plugins = {}; + +PouchDB.prefix = '_pouch_'; + +PouchDB.parseAdapter = function (name) { + var match = name.match(/([a-z\-]*):\/\/(.*)/); + var adapter; + if (match) { + // the http adapter expects the fully qualified name + name = /http(s?)/.test(match[1]) ? match[1] + '://' + match[2] : match[2]; + adapter = match[1]; + if (!PouchDB.adapters[adapter].valid()) { + throw 'Invalid adapter'; + } + return {name: name, adapter: match[1]}; + } + + var preferredAdapters = ['idb', 'leveldb', 'websql']; + for (var i = 0; i < preferredAdapters.length; ++i) { + if (preferredAdapters[i] in PouchDB.adapters) { + adapter = PouchDB.adapters[preferredAdapters[i]]; + var use_prefix = 'use_prefix' in adapter ? adapter.use_prefix : true; + + return { + name: use_prefix ? PouchDB.prefix + name : name, + adapter: preferredAdapters[i] + }; + } + } + + throw 'No valid adapter found'; +}; + +PouchDB.destroy = function (name, opts, callback) { + if (typeof opts === 'function' || typeof opts === 'undefined') { + callback = opts; + opts = {}; + } + + if (typeof name === 'object') { + opts = name; + name = undefined; + } + + if (typeof callback === 'undefined') { + callback = function () {}; + } + var backend = PouchDB.parseAdapter(opts.name || name); + var dbName = backend.name; + + var cb = function (err, response) { + if (err) { + callback(err); + return; + } + + for (var plugin in PouchDB.plugins) { + PouchDB.plugins[plugin]._delete(dbName); + } + //console.log(dbName + ': Delete Database'); + + // call destroy method of the particular adaptor + PouchDB.adapters[backend.adapter].destroy(dbName, opts, callback); + }; + + // remove PouchDB from allDBs + PouchDB.removeFromAllDbs(backend, cb); +}; + +PouchDB.removeFromAllDbs = function (opts, callback) { + // Only execute function if flag is enabled + if (!PouchDB.enableAllDbs) { + callback(); + return; + } + + // skip http and https adaptors for allDbs + var adapter = opts.adapter; + if (adapter === "http" || adapter === "https") { + callback(); + return; + } + + // remove db from PouchDB.ALL_DBS + new PouchDB(PouchDB.allDBName(opts.adapter), function (err, db) { + if (err) { + // don't fail when allDbs fail + //console.error(err); + callback(); + return; + } + // check if db has been registered in PouchDB.ALL_DBS + var dbname = PouchDB.dbName(opts.adapter, opts.name); + db.get(dbname, function (err, doc) { + if (err) { + callback(); + } else { + db.remove(doc, function (err, response) { + if (err) { + //console.error(err); + } + callback(); + }); + } + }); + }); + +}; + +PouchDB.adapter = function (id, obj) { + if (obj.valid()) { + PouchDB.adapters[id] = obj; + } +}; + +PouchDB.plugin = function (id, obj) { + PouchDB.plugins[id] = obj; +}; + +// flag to toggle allDbs (off by default) +PouchDB.enableAllDbs = false; + +// name of database used to keep track of databases +PouchDB.ALL_DBS = "_allDbs"; +PouchDB.dbName = function (adapter, name) { + return [adapter, "-", name].join(''); +}; +PouchDB.realDBName = function (adapter, name) { + return [adapter, "://", name].join(''); +}; +PouchDB.allDBName = function (adapter) { + return [adapter, "://", PouchDB.prefix + PouchDB.ALL_DBS].join(''); +}; + +PouchDB.open = function (opts, callback) { + // Only register pouch with allDbs if flag is enabled + if (!PouchDB.enableAllDbs) { + callback(); + return; + } + + var adapter = opts.adapter; + // skip http and https adaptors for allDbs + if (adapter === "http" || adapter === "https") { + callback(); + return; + } + + new PouchDB(PouchDB.allDBName(adapter), function (err, db) { + if (err) { + // don't fail when allDb registration fails + //console.error(err); + callback(); + return; + } + + // check if db has been registered in PouchDB.ALL_DBS + var dbname = PouchDB.dbName(adapter, opts.name); + db.get(dbname, function (err, response) { + if (err && err.status === 404) { + db.put({ + _id: dbname, + dbname: opts.originalName + }, function (err) { + if (err) { + //console.error(err); + } + + callback(); + }); + } else { + callback(); + } + }); + }); +}; + +PouchDB.allDbs = function (callback) { + var accumulate = function (adapters, all_dbs) { + if (adapters.length === 0) { + // remove duplicates + var result = []; + all_dbs.forEach(function (doc) { + var exists = result.some(function (db) { + return db.id === doc.id; + }); + + if (!exists) { + result.push(doc); + } + }); + + // return an array of dbname + callback(null, result.map(function (row) { + return row.doc.dbname; + })); + return; + } + + var adapter = adapters.shift(); + + // skip http and https adaptors for allDbs + if (adapter === "http" || adapter === "https") { + accumulate(adapters, all_dbs); + return; + } + + new PouchDB(PouchDB.allDBName(adapter), function (err, db) { + if (err) { + callback(err); + return; + } + db.allDocs({include_docs: true}, function (err, response) { + if (err) { + callback(err); + return; + } + + // append from current adapter rows + all_dbs.unshift.apply(all_dbs, response.rows); + + // code to clear allDbs. + // response.rows.forEach(function (row) { + // db.remove(row.doc, function () { + // //console.log(arguments); + // }); + // }); + + // recurse + accumulate(adapters, all_dbs); + }); + }); + }; + var adapters = Object.keys(PouchDB.adapters); + accumulate(adapters, []); +}; + +module.exports = PouchDB; + +},{"./constructor":5}],16:[function(_dereq_,module,exports){ +/*jshint strict: false */ +/*global chrome */ + +var merge = _dereq_('./merge'); +exports.extend = _dereq_('./deps/extend'); +exports.ajax = _dereq_('./deps/ajax'); +exports.createBlob = _dereq_('./deps/blob'); +var uuid = _dereq_('./deps/uuid'); +exports.Crypto = _dereq_('./deps/md5.js'); +var buffer = _dereq_('./deps/buffer'); +var errors = _dereq_('./deps/errors'); + +// List of top level reserved words for doc +var reservedWords = [ + '_id', + '_rev', + '_attachments', + '_deleted', + '_revisions', + '_revs_info', + '_conflicts', + '_deleted_conflicts', + '_local_seq', + '_rev_tree' +]; +exports.uuids = function (count, options) { + + if (typeof(options) !== 'object') { + options = {}; + } + + var length = options.length; + var radix = options.radix; + var uuids = []; + + while (uuids.push(uuid(length, radix)) < count) { } + + return uuids; +}; + +// Give back one UUID +exports.uuid = function (options) { + return exports.uuids(1, options)[0]; +}; +// Determine id an ID is valid +// - invalid IDs begin with an underescore that does not begin '_design' or '_local' +// - any other string value is a valid id +exports.isValidId = function (id) { + if (!id || (typeof id !== 'string')) { + return false; + } + if (/^_/.test(id)) { + return (/^_(design|local)/).test(id); + } + return true; +}; + +function isChromeApp() { + return (typeof chrome !== "undefined" && + typeof chrome.storage !== "undefined" && + typeof chrome.storage.local !== "undefined"); +} + +// Pretty dumb name for a function, just wraps callback calls so we dont +// to if (callback) callback() everywhere +exports.call = function (fun) { + if (typeof fun === typeof Function) { + var args = Array.prototype.slice.call(arguments, 1); + fun.apply(this, args); + } +}; + +exports.isLocalId = function (id) { + return (/^_local/).test(id); +}; + +// check if a specific revision of a doc has been deleted +// - metadata: the metadata object from the doc store +// - rev: (optional) the revision to check. defaults to winning revision +exports.isDeleted = function (metadata, rev) { + if (!rev) { + rev = merge.winningRev(metadata); + } + if (rev.indexOf('-') >= 0) { + rev = rev.split('-')[1]; + } + var deleted = false; + merge.traverseRevTree(metadata.rev_tree, function (isLeaf, pos, id, acc, opts) { + if (id === rev) { + deleted = !!opts.deleted; + } + }); + + return deleted; +}; + +exports.filterChange = function (opts) { + return function (change) { + var req = {}; + var hasFilter = opts.filter && typeof opts.filter === 'function'; + + req.query = opts.query_params; + if (opts.filter && hasFilter && !opts.filter.call(this, change.doc, req)) { + return false; + } + if (opts.doc_ids && opts.doc_ids.indexOf(change.id) === -1) { + return false; + } + if (!opts.include_docs) { + delete change.doc; + } else { + for (var att in change.doc._attachments) { + change.doc._attachments[att].stub = true; + } + } + return true; + }; +}; + +exports.processChanges = function (opts, changes, last_seq) { + // TODO: we should try to filter and limit as soon as possible + changes = changes.filter(exports.filterChange(opts)); + if (opts.limit) { + if (opts.limit < changes.length) { + changes.length = opts.limit; + } + } + changes.forEach(function (change) { + exports.call(opts.onChange, change); + }); + exports.call(opts.complete, null, {results: changes, last_seq: last_seq}); +}; + +// Preprocess documents, parse their revisions, assign an id and a +// revision for new writes that are missing them, etc +exports.parseDoc = function (doc, newEdits) { + var error = null; + var nRevNum; + var newRevId; + var revInfo; + var opts = {status: 'available'}; + if (doc._deleted) { + opts.deleted = true; + } + + if (newEdits) { + if (!doc._id) { + doc._id = exports.uuid(); + } + newRevId = exports.uuid({length: 32, radix: 16}).toLowerCase(); + if (doc._rev) { + revInfo = /^(\d+)-(.+)$/.exec(doc._rev); + if (!revInfo) { + throw "invalid value for property '_rev'"; + } + doc._rev_tree = [{ + pos: parseInt(revInfo[1], 10), + ids: [revInfo[2], {status: 'missing'}, [[newRevId, opts, []]]] + }]; + nRevNum = parseInt(revInfo[1], 10) + 1; + } else { + doc._rev_tree = [{ + pos: 1, + ids : [newRevId, opts, []] + }]; + nRevNum = 1; + } + } else { + if (doc._revisions) { + doc._rev_tree = [{ + pos: doc._revisions.start - doc._revisions.ids.length + 1, + ids: doc._revisions.ids.reduce(function (acc, x) { + if (acc === null) { + return [x, opts, []]; + } else { + return [x, {status: 'missing'}, [acc]]; + } + }, null) + }]; + nRevNum = doc._revisions.start; + newRevId = doc._revisions.ids[0]; + } + if (!doc._rev_tree) { + revInfo = /^(\d+)-(.+)$/.exec(doc._rev); + if (!revInfo) { + return errors.BAD_ARG; + } + nRevNum = parseInt(revInfo[1], 10); + newRevId = revInfo[2]; + doc._rev_tree = [{ + pos: parseInt(revInfo[1], 10), + ids: [revInfo[2], opts, []] + }]; + } + } + + if (typeof doc._id !== 'string') { + error = errors.INVALID_ID; + } + else if (!exports.isValidId(doc._id)) { + error = errors.RESERVED_ID; + } + + for (var key in doc) { + if (doc.hasOwnProperty(key) && key[0] === '_' && reservedWords.indexOf(key) === -1) { + error = exports.extend({}, errors.DOC_VALIDATION); + error.reason += ': ' + key; + } + } + + doc._id = decodeURIComponent(doc._id); + doc._rev = [nRevNum, newRevId].join('-'); + + if (error) { + return error; + } + + return Object.keys(doc).reduce(function (acc, key) { + if (/^_/.test(key) && key !== '_attachments') { + acc.metadata[key.slice(1)] = doc[key]; + } else { + acc.data[key] = doc[key]; + } + return acc; + }, {metadata : {}, data : {}}); +}; + +exports.isCordova = function () { + return (typeof cordova !== "undefined" || + typeof PhoneGap !== "undefined" || + typeof phonegap !== "undefined"); +}; + +exports.Changes = function () { + + var api = {}; + var listeners = {}; + + if (isChromeApp()) { + chrome.storage.onChanged.addListener(function (e) { + // make sure it's event addressed to us + if (e.db_name != null) { + api.notify(e.db_name.newValue);//object only has oldValue, newValue members + } + }); + } else if (typeof window !== 'undefined') { + window.addEventListener("storage", function (e) { + api.notify(e.key); + }); + } + + api.addListener = function (db_name, id, db, opts) { + if (!listeners[db_name]) { + listeners[db_name] = {}; + } + listeners[db_name][id] = { + db: db, + opts: opts + }; + }; + + api.removeListener = function (db_name, id) { + if (listeners[db_name]) { + delete listeners[db_name][id]; + } + }; + + api.clearListeners = function (db_name) { + delete listeners[db_name]; + }; + + api.notifyLocalWindows = function (db_name) { + //do a useless change on a storage thing + //in order to get other windows's listeners to activate + if (!isChromeApp()) { + localStorage[db_name] = (localStorage[db_name] === "a") ? "b" : "a"; + } else { + chrome.storage.local.set({db_name: db_name}); + } + }; + + api.notify = function (db_name) { + if (!listeners[db_name]) { return; } + + Object.keys(listeners[db_name]).forEach(function (i) { + var opts = listeners[db_name][i].opts; + listeners[db_name][i].db.changes({ + include_docs: opts.include_docs, + conflicts: opts.conflicts, + continuous: false, + descending: false, + filter: opts.filter, + view: opts.view, + since: opts.since, + query_params: opts.query_params, + onChange: function (c) { + if (c.seq > opts.since && !opts.cancelled) { + opts.since = c.seq; + exports.call(opts.onChange, c); + } + } + }); + }); + }; + + return api; +}; + +if (typeof window === 'undefined' || !('atob' in window)) { + exports.atob = function (str) { + var base64 = new buffer(str, 'base64'); + // Node.js will just skip the characters it can't encode instead of + // throwing and exception + if (base64.toString('base64') !== str) { + throw ("Cannot base64 encode full string"); + } + return base64.toString('binary'); + }; +} else { + exports.atob = function (str) { + return atob(str); + }; +} + +if (typeof window === 'undefined' || !('btoa' in window)) { + exports.btoa = function (str) { + return new buffer(str, 'binary').toString('base64'); + }; +} else { + exports.btoa = function (str) { + return btoa(str); + }; +} + + +module.exports = exports; + +},{"./deps/ajax":6,"./deps/blob":7,"./deps/buffer":18,"./deps/errors":8,"./deps/extend":9,"./deps/md5.js":10,"./deps/uuid":11,"./merge":13}],17:[function(_dereq_,module,exports){ +module.exports = '1.1.0'; + +},{}],18:[function(_dereq_,module,exports){ + +},{}],19:[function(_dereq_,module,exports){ +// shim for using process in browser + +var process = module.exports = {}; + +process.nextTick = (function () { + var canSetImmediate = typeof window !== 'undefined' + && window.setImmediate; + var canPost = typeof window !== 'undefined' + && window.postMessage && window.addEventListener + ; + + if (canSetImmediate) { + return function (f) { return window.setImmediate(f) }; + } + + if (canPost) { + var queue = []; + window.addEventListener('message', function (ev) { + var source = ev.source; + if ((source === window || source === null) && ev.data === 'process-tick') { + ev.stopPropagation(); + if (queue.length > 0) { + var fn = queue.shift(); + fn(); + } + } + }, true); + + return function nextTick(fn) { + queue.push(fn); + window.postMessage('process-tick', '*'); + }; + } + + return function nextTick(fn) { + setTimeout(fn, 0); + }; +})(); + +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +} + +// TODO(shtylman) +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; + +},{}],20:[function(_dereq_,module,exports){ +/*global Pouch: true, pouchCollate: true */ + +"use strict"; + +var pouchCollate = _dereq_('pouchdb-collate'); + +// This is the first implementation of a basic plugin, we register the +// plugin object with pouch and it is mixin'd to each database created +// (regardless of adapter), adapters can override plugins by providing +// their own implementation. functions on the plugin object that start +// with _ are reserved function that are called by pouchdb for special +// notifications. + +// If we wanted to store incremental views we can do it here by listening +// to the changes feed (keeping track of our last update_seq between page loads) +// and storing the result of the map function (possibly using the upcoming +// extracted adapter functions) + + + +function MapReduce(db) { + if(!(this instanceof MapReduce)){ + return new MapReduce(db); + } + function viewQuery(fun, options) { + if (!options.complete) { + return; + } + + if (!options.skip) { + options.skip = 0; + } + + if (!fun.reduce) { + options.reduce = false; + } + + function sum(values) { + return values.reduce(function (a, b) { return a + b; }, 0); + } + + var builtInReduce = { + "_sum": function (keys, values){ + return sum(values); + }, + + "_count": function (keys, values, rereduce){ + if (rereduce){ + return sum(values); + } else { + return values.length; + } + }, + + "_stats": function (keys, values, rereduce) { + return { + 'sum': sum(values), + 'min': Math.min.apply(null, values), + 'max': Math.max.apply(null, values), + 'count': values.length, + 'sumsqr': (function () { + var _sumsqr = 0; + for(var idx in values) { + if (typeof values[idx] === 'number') { + _sumsqr += values[idx] * values[idx]; + } + } + return _sumsqr; + })() + }; + } + }; + + var results = []; + var current = null; + var num_started= 0; + var completed= false; + + function emit(key, val) { + var viewRow = { + id: current.doc._id, + key: key, + value: val + }; + + if (options.startkey && pouchCollate(key, options.startkey) < 0) return; + if (options.endkey && pouchCollate(key, options.endkey) > 0) return; + if (typeof options.key !== 'undefined' && pouchCollate(key, options.key) !== 0) return; + + num_started++; + if (options.include_docs) { + //in this special case, join on _id (issue #106) + if (val && typeof val === 'object' && val._id){ + db.get(val._id, + function (_, joined_doc){ + if (joined_doc) { + viewRow.doc = joined_doc; + } + results.push(viewRow); + checkComplete(); + }); + return; + } else { + viewRow.doc = current.doc; + } + } + results.push(viewRow); + }; + + // ugly way to make sure references to 'emit' in map/reduce bind to the + // above emit + eval('fun.map = ' + fun.map.toString() + ';'); + if (fun.reduce) { + if (builtInReduce[fun.reduce]) { + fun.reduce = builtInReduce[fun.reduce]; + } + + eval('fun.reduce = ' + fun.reduce.toString() + ';'); + } + + //only proceed once all documents are mapped and joined + function checkComplete() { + if (completed && results.length == num_started){ + results.sort(function (a, b) { + return pouchCollate(a.key, b.key); + }); + if (options.descending) { + results.reverse(); + } + if (options.reduce === false) { + return options.complete(null, { + total_rows: results.length, + offset: options.skip, + rows: ('limit' in options) ? results.slice(options.skip, options.limit + options.skip) : + (options.skip > 0) ? results.slice(options.skip) : results + }); + } + + var groups = []; + results.forEach(function (e) { + var last = groups[groups.length-1] || null; + if (last && pouchCollate(last.key[0][0], e.key) === 0) { + last.key.push([e.key, e.id]); + last.value.push(e.value); + return; + } + groups.push({key: [[e.key, e.id]], value: [e.value]}); + }); + groups.forEach(function (e) { + e.value = fun.reduce(e.key, e.value); + e.value = (typeof e.value === 'undefined') ? null : e.value; + e.key = e.key[0][0]; + }); + + options.complete(null, { + total_rows: groups.length, + offset: options.skip, + rows: ('limit' in options) ? groups.slice(options.skip, options.limit + options.skip) : + (options.skip > 0) ? groups.slice(options.skip) : groups + }); + } + }; + + db.changes({ + conflicts: true, + include_docs: true, + onChange: function (doc) { + if (!('deleted' in doc)) { + current = {doc: doc.doc}; + fun.map.call(this, doc.doc); + } + }, + complete: function () { + completed= true; + checkComplete(); + } + }); + } + + function httpQuery(fun, opts, callback) { + + // List of parameters to add to the PUT request + var params = []; + var body = undefined; + var method = 'GET'; + + // If opts.reduce exists and is defined, then add it to the list + // of parameters. + // If reduce=false then the results are that of only the map function + // not the final result of map and reduce. + if (typeof opts.reduce !== 'undefined') { + params.push('reduce=' + opts.reduce); + } + if (typeof opts.include_docs !== 'undefined') { + params.push('include_docs=' + opts.include_docs); + } + if (typeof opts.limit !== 'undefined') { + params.push('limit=' + opts.limit); + } + if (typeof opts.descending !== 'undefined') { + params.push('descending=' + opts.descending); + } + if (typeof opts.startkey !== 'undefined') { + params.push('startkey=' + encodeURIComponent(JSON.stringify(opts.startkey))); + } + if (typeof opts.endkey !== 'undefined') { + params.push('endkey=' + encodeURIComponent(JSON.stringify(opts.endkey))); + } + if (typeof opts.key !== 'undefined') { + params.push('key=' + encodeURIComponent(JSON.stringify(opts.key))); + } + if (typeof opts.group !== 'undefined') { + params.push('group=' + opts.group); + } + if (typeof opts.group_level !== 'undefined') { + params.push('group_level=' + opts.group_level); + } + if (typeof opts.skip !== 'undefined') { + params.push('skip=' + opts.skip); + } + + // If keys are supplied, issue a POST request to circumvent GET query string limits + // see http://wiki.apache.org/couchdb/HTTP_view_API#Querying_Options + if (typeof opts.keys !== 'undefined') { + method = 'POST'; + body = JSON.stringify({keys:opts.keys}); + } + + // Format the list of parameters into a valid URI query string + params = params.join('&'); + params = params === '' ? '' : '?' + params; + + // We are referencing a query defined in the design doc + if (typeof fun === 'string') { + var parts = fun.split('/'); + db.request({ + method: method, + url: '_design/' + parts[0] + '/_view/' + parts[1] + params, + body: body + }, callback); + return; + } + + // We are using a temporary view, terrible for performance but good for testing + var queryObject = JSON.parse(JSON.stringify(fun, function (key, val) { + if (typeof val === 'function') { + return val + ''; // implicitly `toString` it + } + return val; + })); + + db.request({ + method:'POST', + url: '_temp_view' + params, + body: queryObject + }, callback); + } + + this.query = function(fun, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + + if (callback) { + opts.complete = callback; + } + + if (db.type() === 'http') { + if (typeof fun === 'function'){ + return httpQuery({map: fun}, opts, callback); + } + return httpQuery(fun, opts, callback); + } + + if (typeof fun === 'object') { + return viewQuery(fun, opts); + } + + if (typeof fun === 'function') { + return viewQuery({map: fun}, opts); + } + + var parts = fun.split('/'); + db.get('_design/' + parts[0], function (err, doc) { + if (err) { + if (callback) callback(err); + return; + } + + if (!doc.views[parts[1]]) { + if (callback) callback({ error: 'not_found', reason: 'missing_named_view' }); + return; + } + + viewQuery({ + map: doc.views[parts[1]].map, + reduce: doc.views[parts[1]].reduce + }, opts); + }); + } + +}; + +// Deletion is a noop since we dont store the results of the view +MapReduce._delete = function () { }; +module.exports = MapReduce; + +},{"pouchdb-collate":21}],21:[function(_dereq_,module,exports){ +'use strict'; + +function arrayCollate(a, b) { + var len = Math.min(a.length, b.length); + for (var i = 0; i < len; i++) { + var sort = pouchCollate(a[i], b[i]); + if (sort !== 0) { + return sort; + } + } + return (a.length === b.length) ? 0 : + (a.length > b.length) ? 1 : -1; +} +function stringCollate(a, b) { + // See: https://github.com/daleharvey/pouchdb/issues/40 + // This is incompatible with the CouchDB implementation, but its the + // best we can do for now + return (a === b) ? 0 : ((a > b) ? 1 : -1); +} +function objectCollate(a, b) { + var ak = Object.keys(a), bk = Object.keys(b); + var len = Math.min(ak.length, bk.length); + for (var i = 0; i < len; i++) { + // First sort the keys + var sort = pouchCollate(ak[i], bk[i]); + if (sort !== 0) { + return sort; + } + // if the keys are equal sort the values + sort = pouchCollate(a[ak[i]], b[bk[i]]); + if (sort !== 0) { + return sort; + } + + } + return (ak.length === bk.length) ? 0 : + (ak.length > bk.length) ? 1 : -1; +} +// The collation is defined by erlangs ordered terms +// the atoms null, true, false come first, then numbers, strings, +// arrays, then objects +function collationIndex(x) { + var id = ['boolean', 'number', 'string', 'object']; + if (id.indexOf(typeof x) !== -1) { + if (x === null) { + return 1; + } + return id.indexOf(typeof x) + 2; + } + if (Array.isArray(x)) { + return 4.5; + } + if (typeof x === 'undefined') { + // CouchDB indexes both null/undefined as null + return 1; + } +} +module.exports = pouchCollate; +function pouchCollate(a, b) { + var ai = collationIndex(a); + var bi = collationIndex(b); + if ((ai - bi) !== 0) { + return ai - bi; + } + if (a === null || typeof a === 'undefined') { + return 0; + } + if (typeof a === 'number') { + return a - b; + } + if (typeof a === 'boolean') { + return a === b ? 0 : (a < b ? -1 : 1); + } + if (typeof a === 'string') { + return stringCollate(a, b); + } + if (Array.isArray(a)) { + return arrayCollate(a, b); + } + if (typeof a === 'object') { + return objectCollate(a, b); + } +};; +},{}]},{},[12]) +(12) +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/derequire/test/pouchdb.js b/pitfall/pdfkit/node_modules/derequire/test/pouchdb.js new file mode 100644 index 00000000..a8b2606d --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/test/pouchdb.js @@ -0,0 +1,5892 @@ +!function(e){"object"==typeof exports?module.exports=e():"function"==typeof define&&define.amd?define(e):"undefined"!=typeof window?window.PouchDB=e():"undefined"!=typeof global?global.PouchDB=e():"undefined"!=typeof self&&(self.PouchDB=e())}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o max_height) { + candidates.push(rev); + } + }); + + merge.traverseRevTree(rev_tree, function (isLeaf, pos, revHash, ctx, opts) { + var rev = pos + '-' + revHash; + if (opts.status === 'available' && candidates.indexOf(rev) !== -1) { + opts.status = 'missing'; + revs.push(rev); + } + }); + customApi._doCompaction(docId, rev_tree, revs, callback); + }); + } + + // compact the whole database using single document + // compaction + api.compact = function (opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + api.changes({complete: function (err, res) { + if (err) { + call(callback); // TODO: silently fail + return; + } + var count = res.results.length; + if (!count) { + call(callback); + return; + } + res.results.forEach(function (row) { + compactDocument(row.id, 0, function () { + count--; + if (!count) { + call(callback); + } + }); + }); + }}); + }; + + /* Begin api wrappers. Specific functionality to storage belongs in the _[method] */ + api.get = function (id, opts, callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('get', arguments); + return; + } + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + + var leaves = []; + function finishOpenRevs() { + var result = []; + var count = leaves.length; + if (!count) { + return call(callback, null, result); + } + // order with open_revs is unspecified + leaves.forEach(function (leaf) { + api.get(id, {rev: leaf, revs: opts.revs}, function (err, doc) { + if (!err) { + result.push({ok: doc}); + } else { + result.push({missing: leaf}); + } + count--; + if (!count) { + call(callback, null, result); + } + }); + }); + } + + if (opts.open_revs) { + if (opts.open_revs === "all") { + customApi._getRevisionTree(id, function (err, rev_tree) { + if (err) { + // if there's no such document we should treat this + // situation the same way as if revision tree was empty + rev_tree = []; + } + leaves = merge.collectLeaves(rev_tree).map(function (leaf) { + return leaf.rev; + }); + finishOpenRevs(); + }); + } else { + if (Array.isArray(opts.open_revs)) { + leaves = opts.open_revs; + for (var i = 0; i < leaves.length; i++) { + var l = leaves[i]; + // looks like it's the only thing couchdb checks + if (!(typeof(l) === "string" && /^\d+-/.test(l))) { + return call(callback, errors.error(errors.BAD_REQUEST, + "Invalid rev format")); + } + } + finishOpenRevs(); + } else { + return call(callback, errors.error(errors.UNKNOWN_ERROR, + 'function_clause')); + } + } + return; // open_revs does not like other options + } + + return customApi._get(id, opts, function (err, result) { + if (err) { + return call(callback, err); + } + + var doc = result.doc; + var metadata = result.metadata; + var ctx = result.ctx; + + if (opts.conflicts) { + var conflicts = merge.collectConflicts(metadata); + if (conflicts.length) { + doc._conflicts = conflicts; + } + } + + if (opts.revs || opts.revs_info) { + var paths = merge.rootToLeaf(metadata.rev_tree); + var path = arrayFirst(paths, function (arr) { + return arr.ids.map(function (x) { return x.id; }) + .indexOf(doc._rev.split('-')[1]) !== -1; + }); + + path.ids.splice(path.ids.map(function (x) {return x.id; }) + .indexOf(doc._rev.split('-')[1]) + 1); + path.ids.reverse(); + + if (opts.revs) { + doc._revisions = { + start: (path.pos + path.ids.length) - 1, + ids: path.ids.map(function (rev) { + return rev.id; + }) + }; + } + if (opts.revs_info) { + var pos = path.pos + path.ids.length; + doc._revs_info = path.ids.map(function (rev) { + pos--; + return { + rev: pos + '-' + rev.id, + status: rev.opts.status + }; + }); + } + } + + if (opts.local_seq) { + doc._local_seq = result.metadata.seq; + } + + if (opts.attachments && doc._attachments) { + var attachments = doc._attachments; + var count = Object.keys(attachments).length; + if (count === 0) { + return call(callback, null, doc); + } + Object.keys(attachments).forEach(function (key) { + customApi._getAttachment(attachments[key], {encode: true, ctx: ctx}, function (err, data) { + doc._attachments[key].data = data; + if (!--count) { + call(callback, null, doc); + } + }); + }); + } else { + if (doc._attachments) { + for (var key in doc._attachments) { + doc._attachments[key].stub = true; + } + } + call(callback, null, doc); + } + }); + }; + + api.getAttachment = function (docId, attachmentId, opts, callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('getAttachment', arguments); + return; + } + if (opts instanceof Function) { + callback = opts; + opts = {}; + } + customApi._get(docId, opts, function (err, res) { + if (err) { + return call(callback, err); + } + if (res.doc._attachments && res.doc._attachments[attachmentId]) { + opts.ctx = res.ctx; + customApi._getAttachment(res.doc._attachments[attachmentId], opts, callback); + } else { + return call(callback, errors.MISSING_DOC); + } + }); + }; + + api.allDocs = function (opts, callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('allDocs', arguments); + return; + } + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + if ('keys' in opts) { + if ('startkey' in opts) { + call(callback, errors.error(errors.QUERY_PARSE_ERROR, + 'Query parameter `start_key` is not compatible with multi-get' + )); + return; + } + if ('endkey' in opts) { + call(callback, errors.error(errors.QUERY_PARSE_ERROR, + 'Query parameter `end_key` is not compatible with multi-get' + )); + return; + } + } + if (typeof opts.skip === 'undefined') { + opts.skip = 0; + } + + return customApi._allDocs(opts, callback); + }; + + function processChange(doc, metadata, opts) { + var changeList = [{rev: doc._rev}]; + if (opts.style === 'all_docs') { + changeList = merge.collectLeaves(metadata.rev_tree) + .map(function (x) { return {rev: x.rev}; }); + } + var change = { + id: metadata.id, + changes: changeList, + doc: doc + }; + + if (utils.isDeleted(metadata, doc._rev)) { + change.deleted = true; + } + if (opts.conflicts) { + change.doc._conflicts = merge.collectConflicts(metadata); + if (!change.doc._conflicts.length) { + delete change.doc._conflicts; + } + } + return change; + } + api.changes = function (opts) { + if (!api.taskqueue.ready()) { + var task = api.taskqueue.addTask('changes', arguments); + return { + cancel: function () { + if (task.task) { + return task.task.cancel(); + } + if (Pouch.DEBUG) { + //console.log('Cancel Changes Feed'); + } + task.parameters[0].aborted = true; + } + }; + } + opts = utils.extend(true, {}, opts); + opts.processChange = processChange; + + if (!opts.since) { + opts.since = 0; + } + if (opts.since === 'latest') { + var changes; + api.info(function (err, info) { + if (!opts.aborted) { + opts.since = info.update_seq - 1; + api.changes(opts); + } + }); + // Return a method to cancel this method from processing any more + return { + cancel: function () { + if (changes) { + return changes.cancel(); + } + if (Pouch.DEBUG) { + //console.log('Cancel Changes Feed'); + } + opts.aborted = true; + } + }; + } + + if (opts.filter && typeof opts.filter === 'string') { + if (opts.filter === '_view') { + if (opts.view && typeof opts.view === 'string') { + // fetch a view from a design doc, make it behave like a filter + var viewName = opts.view.split('/'); + api.get('_design/' + viewName[0], function (err, ddoc) { + if (ddoc && ddoc.views && ddoc.views[viewName[1]]) { + /*jshint evil: true */ + var filter = eval('(function () {' + + ' return function (doc) {' + + ' var emitted = false;' + + ' var emit = function (a, b) {' + + ' emitted = true;' + + ' };' + + ' var view = ' + ddoc.views[viewName[1]].map + ';' + + ' view(doc);' + + ' if (emitted) {' + + ' return true;' + + ' }' + + ' }' + + '})()'); + if (!opts.aborted) { + opts.filter = filter; + api.changes(opts); + } + } else { + var msg = ddoc.views ? 'missing json key: ' + viewName[1] : + 'missing json key: views'; + err = err || errors.error(errors.MISSING_DOC, msg); + utils.call(opts.complete, err); + } + }); + } else { + var err = errors.error(errors.BAD_REQUEST, + '`view` filter parameter is not provided.'); + utils.call(opts.complete, err); + } + } else { + // fetch a filter from a design doc + var filterName = opts.filter.split('/'); + api.get('_design/' + filterName[0], function (err, ddoc) { + if (ddoc && ddoc.filters && ddoc.filters[filterName[1]]) { + /*jshint evil: true */ + var filter = eval('(function () { return ' + + ddoc.filters[filterName[1]] + ' })()'); + if (!opts.aborted) { + opts.filter = filter; + api.changes(opts); + } + } else { + var msg = (ddoc && ddoc.filters) ? 'missing json key: ' + filterName[1] + : 'missing json key: filters'; + err = err || errors.error(errors.MISSING_DOC, msg); + utils.call(opts.complete, err); + } + }); + } + // Return a method to cancel this method from processing any more + return { + cancel: function () { + if (Pouch.DEBUG) { + console.log('Cancel Changes Feed'); + } + opts.aborted = true; + } + }; + } + + if (!('descending' in opts)) { + opts.descending = false; + } + + // 0 and 1 should return 1 document + opts.limit = opts.limit === 0 ? 1 : opts.limit; + return customApi._changes(opts); + }; + + api.close = function (callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('close', arguments); + return; + } + return customApi._close(callback); + }; + + api.info = function (callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('info', arguments); + return; + } + return customApi._info(callback); + }; + + api.id = function () { + return customApi._id(); + }; + + api.type = function () { + return (typeof customApi._type === 'function') ? customApi._type() : opts.adapter; + }; + + api.bulkDocs = function (req, opts, callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('bulkDocs', arguments); + return; + } + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + if (!opts) { + opts = {}; + } else { + opts = utils.extend(true, {}, opts); + } + + if (!req || !req.docs || req.docs.length < 1) { + return call(callback, errors.MISSING_BULK_DOCS); + } + + if (!Array.isArray(req.docs)) { + return call(callback, errors.QUERY_PARSE_ERROR); + } + + for (var i = 0; i < req.docs.length; ++i) { + if (typeof req.docs[i] !== 'object' || Array.isArray(req.docs[i])) { + return call(callback, errors.NOT_AN_OBJECT); + } + } + + req = utils.extend(true, {}, req); + if (!('new_edits' in opts)) { + opts.new_edits = true; + } + + return customApi._bulkDocs(req, opts, autoCompact(callback)); + }; + + /* End Wrappers */ + var taskqueue = {}; + + taskqueue.ready = false; + taskqueue.queue = []; + + api.taskqueue = {}; + + api.taskqueue.execute = function (db) { + if (taskqueue.ready) { + taskqueue.queue.forEach(function (d) { + d.task = db[d.name].apply(null, d.parameters); + }); + } + }; + + api.taskqueue.ready = function () { + if (arguments.length === 0) { + return taskqueue.ready; + } + taskqueue.ready = arguments[0]; + }; + + api.taskqueue.addTask = function (name, parameters) { + var task = { name: name, parameters: parameters }; + taskqueue.queue.push(task); + return task; + }; + + api.replicate = {}; + + api.replicate.from = function (url, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + return Pouch.replicate(url, customApi, opts, callback); + }; + + api.replicate.to = function (dbName, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + return Pouch.replicate(customApi, dbName, opts, callback); + }; + + for (var j in api) { + if (!customApi.hasOwnProperty(j)) { + customApi[j] = api[j]; + } + } + + // Http adapter can skip setup so we force the db to be ready and execute any jobs + if (opts.skipSetup) { + api.taskqueue.ready(true); + api.taskqueue.execute(api); + } + + if (utils.isCordova()) { + //to inform websql adapter that we can use api + cordova.fireWindowEvent(opts.name + "_pouch", {}); + } + return customApi; + }; +}; + +},{"./deps/errors":8,"./merge":13,"./utils":16}],2:[function(require,module,exports){ +"use strict"; + +var utils = require('../utils'); +var errors = require('../deps/errors'); + +// parseUri 1.2.2 +// (c) Steven Levithan +// MIT License +function parseUri(str) { + var o = parseUri.options; + var m = o.parser[o.strictMode ? "strict" : "loose"].exec(str); + var uri = {}; + var i = 14; + + while (i--) { + uri[o.key[i]] = m[i] || ""; + } + + uri[o.q.name] = {}; + uri[o.key[12]].replace(o.q.parser, function ($0, $1, $2) { + if ($1) { + uri[o.q.name][$1] = $2; + } + }); + + return uri; +} + +function encodeDocId(id) { + if (/^_(design|local)/.test(id)) { + return id; + } + return encodeURIComponent(id); +} + +parseUri.options = { + strictMode: false, + key: ["source", "protocol", "authority", "userInfo", "user", "password", "host", + "port", "relative", "path", "directory", "file", "query", "anchor"], + q: { + name: "queryKey", + parser: /(?:^|&)([^&=]*)=?([^&]*)/g + }, + parser: { + strict: /^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/, + loose: /^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/ + } +}; + +// Get all the information you possibly can about the URI given by name and +// return it as a suitable object. +function getHost(name, opts) { + // If the given name contains "http:" + if (/http(s?):/.test(name)) { + // Prase the URI into all its little bits + var uri = parseUri(name); + + // Store the fact that it is a remote URI + uri.remote = true; + + // Store the user and password as a separate auth object + if (uri.user || uri.password) { + uri.auth = {username: uri.user, password: uri.password}; + } + + // Split the path part of the URI into parts using '/' as the delimiter + // after removing any leading '/' and any trailing '/' + var parts = uri.path.replace(/(^\/|\/$)/g, '').split('/'); + + // Store the first part as the database name and remove it from the parts + // array + uri.db = parts.pop(); + + // Restore the path by joining all the remaining parts (all the parts + // except for the database name) with '/'s + uri.path = parts.join('/'); + opts = opts || {}; + uri.headers = opts.headers || {}; + + if (opts.auth || uri.auth) { + var nAuth = opts.auth || uri.auth; + var token = utils.btoa(nAuth.username + ':' + nAuth.password); + uri.headers.Authorization = 'Basic ' + token; + } + + if (opts.headers) { + uri.headers = opts.headers; + } + + return uri; + } + + // If the given name does not contain 'http:' then return a very basic object + // with no host, the current path, the given name as the database name and no + // username/password + return {host: '', path: '/', db: name, auth: false}; +} + +// Generate a URL with the host data given by opts and the given path +function genDBUrl(opts, path) { + // If the host is remote + if (opts.remote) { + // If the host already has a path, then we need to have a path delimiter + // Otherwise, the path delimiter is the empty string + var pathDel = !opts.path ? '' : '/'; + + // Return the URL made up of all the host's information and the given path + return opts.protocol + '://' + opts.host + ':' + opts.port + '/' + + opts.path + pathDel + opts.db + '/' + path; + } + + // If the host is not remote, then return the URL made up of just the + // database name and the given path + return '/' + opts.db + '/' + path; +} + +// Generate a URL with the host data given by opts and the given path +function genUrl(opts, path) { + if (opts.remote) { + // If the host already has a path, then we need to have a path delimiter + // Otherwise, the path delimiter is the empty string + var pathDel = !opts.path ? '' : '/'; + + // If the host already has a path, then we need to have a path delimiter + // Otherwise, the path delimiter is the empty string + return opts.protocol + '://' + opts.host + ':' + opts.port + '/' + opts.path + pathDel + path; + } + + return '/' + path; +} + +// Implements the PouchDB API for dealing with CouchDB instances over HTTP +function HttpPouch(opts, callback) { + + // Parse the URI given by opts.name into an easy-to-use object + var host = getHost(opts.name, opts); + + // Generate the database URL based on the host + var db_url = genDBUrl(host, ''); + + // The functions that will be publically available for HttpPouch + var api = {}; + var ajaxOpts = opts.ajax || {}; + function ajax(options, callback) { + return utils.ajax(utils.extend({}, ajaxOpts, options), callback); + } + var uuids = { + list: [], + get: function (opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {count: 10}; + } + var cb = function (err, body) { + if (err || !('uuids' in body)) { + utils.call(callback, err || errors.UNKNOWN_ERROR); + } else { + uuids.list = uuids.list.concat(body.uuids); + utils.call(callback, null, "OK"); + } + }; + var params = '?count=' + opts.count; + ajax({ + headers: host.headers, + method: 'GET', + url: genUrl(host, '_uuids') + params + }, cb); + } + }; + + // Create a new CouchDB database based on the given opts + var createDB = function () { + ajax({headers: host.headers, method: 'PUT', url: db_url}, function (err, ret) { + // If we get an "Unauthorized" error + if (err && err.status === 401) { + // Test if the database already exists + ajax({headers: host.headers, method: 'HEAD', url: db_url}, function (err, ret) { + // If there is still an error + if (err) { + // Give the error to the callback to deal with + utils.call(callback, err); + } else { + // Continue as if there had been no errors + utils.call(callback, null, api); + } + }); + // If there were no errros or if the only error is "Precondition Failed" + // (note: "Precondition Failed" occurs when we try to create a database + // that already exists) + } else if (!err || err.status === 412) { + // Continue as if there had been no errors + utils.call(callback, null, api); + } else { + utils.call(callback, errors.UNKNOWN_ERROR); + } + }); + }; + if (!opts.skipSetup) { + ajax({headers: host.headers, method: 'GET', url: db_url}, function (err, ret) { + //check if the db exists + if (err) { + if (err.status === 404) { + //if it doesn't, create it + createDB(); + } else { + utils.call(callback, err); + } + } else { + //go do stuff with the db + utils.call(callback, null, api); + } + }); + } + + api.type = function () { + return 'http'; + }; + + // The HttpPouch's ID is its URL + api.id = function () { + return genDBUrl(host, ''); + }; + + api.request = function (options, callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('request', arguments); + return; + } + options.headers = host.headers; + options.url = genDBUrl(host, options.url); + ajax(options, callback); + }; + + // Sends a POST request to the host calling the couchdb _compact function + // version: The version of CouchDB it is running + api.compact = function (opts, callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('compact', arguments); + return; + } + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + ajax({ + headers: host.headers, + url: genDBUrl(host, '_compact'), + method: 'POST' + }, function () { + function ping() { + api.info(function (err, res) { + if (!res.compact_running) { + utils.call(callback, null); + } else { + setTimeout(ping, opts.interval || 200); + } + }); + } + // Ping the http if it's finished compaction + if (typeof callback === "function") { + ping(); + } + }); + }; + + // Calls GET on the host, which gets back a JSON string containing + // couchdb: A welcome string + // version: The version of CouchDB it is running + api.info = function (callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('info', arguments); + return; + } + ajax({ + headers: host.headers, + method: 'GET', + url: genDBUrl(host, '') + }, callback); + }; + + // Get the document with the given id from the database given by host. + // The id could be solely the _id in the database, or it may be a + // _design/ID or _local/ID path + api.get = function (id, opts, callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('get', arguments); + return; + } + // If no options were given, set the callback to the second parameter + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + + if (opts.auto_encode === undefined) { + opts.auto_encode = true; + } + + // List of parameters to add to the GET request + var params = []; + + // If it exists, add the opts.revs value to the list of parameters. + // If revs=true then the resulting JSON will include a field + // _revisions containing an array of the revision IDs. + if (opts.revs) { + params.push('revs=true'); + } + + // If it exists, add the opts.revs_info value to the list of parameters. + // If revs_info=true then the resulting JSON will include the field + // _revs_info containing an array of objects in which each object + // representing an available revision. + if (opts.revs_info) { + params.push('revs_info=true'); + } + + if (opts.local_seq) { + params.push('local_seq=true'); + } + // If it exists, add the opts.open_revs value to the list of parameters. + // If open_revs=all then the resulting JSON will include all the leaf + // revisions. If open_revs=["rev1", "rev2",...] then the resulting JSON + // will contain an array of objects containing data of all revisions + if (opts.open_revs) { + if (opts.open_revs !== "all") { + opts.open_revs = JSON.stringify(opts.open_revs); + } + params.push('open_revs=' + opts.open_revs); + } + + // If it exists, add the opts.attachments value to the list of parameters. + // If attachments=true the resulting JSON will include the base64-encoded + // contents in the "data" property of each attachment. + if (opts.attachments) { + params.push('attachments=true'); + } + + // If it exists, add the opts.rev value to the list of parameters. + // If rev is given a revision number then get the specified revision. + if (opts.rev) { + params.push('rev=' + opts.rev); + } + + // If it exists, add the opts.conflicts value to the list of parameters. + // If conflicts=true then the resulting JSON will include the field + // _conflicts containing all the conflicting revisions. + if (opts.conflicts) { + params.push('conflicts=' + opts.conflicts); + } + + // Format the list of parameters into a valid URI query string + params = params.join('&'); + params = params === '' ? '' : '?' + params; + + if (opts.auto_encode) { + id = encodeDocId(id); + } + + // Set the options for the ajax call + var options = { + headers: host.headers, + method: 'GET', + url: genDBUrl(host, id + params) + }; + + // If the given id contains at least one '/' and the part before the '/' + // is NOT "_design" and is NOT "_local" + // OR + // If the given id contains at least two '/' and the part before the first + // '/' is "_design". + // TODO This second condition seems strange since if parts[0] === '_design' + // then we already know that parts[0] !== '_local'. + var parts = id.split('/'); + if ((parts.length > 1 && parts[0] !== '_design' && parts[0] !== '_local') || + (parts.length > 2 && parts[0] === '_design' && parts[0] !== '_local')) { + // Binary is expected back from the server + options.binary = true; + } + + // Get the document + ajax(options, function (err, doc, xhr) { + // If the document does not exist, send an error to the callback + if (err) { + return utils.call(callback, err); + } + + // Send the document to the callback + utils.call(callback, null, doc, xhr); + }); + }; + + // Delete the document given by doc from the database given by host. + api.remove = function (doc, opts, callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('remove', arguments); + return; + } + // If no options were given, set the callback to be the second parameter + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + + // Delete the document + ajax({ + headers: host.headers, + method: 'DELETE', + url: genDBUrl(host, encodeDocId(doc._id)) + '?rev=' + doc._rev + }, callback); + }; + + // Get the attachment + api.getAttachment = function (docId, attachmentId, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + if (opts.auto_encode === undefined) { + opts.auto_encode = true; + } + if (opts.auto_encode) { + docId = encodeDocId(docId); + } + opts.auto_encode = false; + api.get(docId + '/' + attachmentId, opts, callback); + }; + + // Remove the attachment given by the id and rev + api.removeAttachment = function (docId, attachmentId, rev, callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('removeAttachment', arguments); + return; + } + ajax({ + headers: host.headers, + method: 'DELETE', + url: genDBUrl(host, encodeDocId(docId) + '/' + attachmentId) + '?rev=' + rev + }, callback); + }; + + // Add the attachment given by blob and its contentType property + // to the document with the given id, the revision given by rev, and + // add it to the database given by host. + api.putAttachment = function (docId, attachmentId, rev, blob, type, callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('putAttachment', arguments); + return; + } + if (typeof type === 'function') { + callback = type; + type = blob; + blob = rev; + rev = null; + } + if (typeof type === 'undefined') { + type = blob; + blob = rev; + rev = null; + } + var id = encodeDocId(docId) + '/' + attachmentId; + var url = genDBUrl(host, id); + if (rev) { + url += '?rev=' + rev; + } + + var opts = { + headers: host.headers, + method: 'PUT', + url: url, + processData: false, + body: blob, + timeout: 60000 + }; + opts.headers['Content-Type'] = type; + // Add the attachment + ajax(opts, callback); + }; + + // Add the document given by doc (in JSON string format) to the database + // given by host. This fails if the doc has no _id field. + api.put = function (doc, opts, callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('put', arguments); + return; + } + // If no options were given, set the callback to be the second parameter + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + if (typeof doc !== 'object') { + return utils.call(callback, errors.NOT_AN_OBJECT); + } + if (!utils.isValidId(doc._id)) { + return utils.call(callback, errors.MISSING_ID); + } + + // List of parameter to add to the PUT request + var params = []; + + // If it exists, add the opts.new_edits value to the list of parameters. + // If new_edits = false then the database will NOT assign this document a + // new revision number + if (opts && typeof opts.new_edits !== 'undefined') { + params.push('new_edits=' + opts.new_edits); + } + + // Format the list of parameters into a valid URI query string + params = params.join('&'); + if (params !== '') { + params = '?' + params; + } + + // Add the document + ajax({ + headers: host.headers, + method: 'PUT', + url: genDBUrl(host, encodeDocId(doc._id)) + params, + body: doc + }, callback); + }; + + // Add the document given by doc (in JSON string format) to the database + // given by host. This does not assume that doc is a new document (i.e. does not + // have a _id or a _rev field. + api.post = function (doc, opts, callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('post', arguments); + return; + } + // If no options were given, set the callback to be the second parameter + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + if (typeof doc !== 'object') { + return utils.call(callback, errors.NOT_AN_OBJECT); + } + if (! ("_id" in doc)) { + if (uuids.list.length > 0) { + doc._id = uuids.list.pop(); + api.put(doc, opts, callback); + } else { + uuids.get(function (err, resp) { + if (err) { + return utils.call(callback, errors.UNKNOWN_ERROR); + } + doc._id = uuids.list.pop(); + api.put(doc, opts, callback); + }); + } + } else { + api.put(doc, opts, callback); + } + }; + + // Update/create multiple documents given by req in the database + // given by host. + api.bulkDocs = function (req, opts, callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('bulkDocs', arguments); + return; + } + // If no options were given, set the callback to be the second parameter + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + if (!opts) { + opts = {}; + } + + // If opts.new_edits exists add it to the document data to be + // send to the database. + // If new_edits=false then it prevents the database from creating + // new revision numbers for the documents. Instead it just uses + // the old ones. This is used in database replication. + if (typeof opts.new_edits !== 'undefined') { + req.new_edits = opts.new_edits; + } + + // Update/create the documents + ajax({ + headers: host.headers, + method: 'POST', + url: genDBUrl(host, '_bulk_docs'), + body: req + }, callback); + }; + + // Get a listing of the documents in the database given + // by host and ordered by increasing id. + api.allDocs = function (opts, callback) { + // If no options were given, set the callback to be the second parameter + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('allDocs', arguments); + return; + } + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + + // List of parameters to add to the GET request + var params = []; + var body; + var method = 'GET'; + + // TODO I don't see conflicts as a valid parameter for a + // _all_docs request (see http://wiki.apache.org/couchdb/HTTP_Document_API#all_docs) + if (opts.conflicts) { + params.push('conflicts=true'); + } + + // If opts.descending is truthy add it to params + if (opts.descending) { + params.push('descending=true'); + } + + // If opts.include_docs exists, add the include_docs value to the + // list of parameters. + // If include_docs=true then include the associated document with each + // result. + if (opts.include_docs) { + params.push('include_docs=true'); + } + + // If opts.startkey exists, add the startkey value to the list of + // parameters. + // If startkey is given then the returned list of documents will + // start with the document whose id is startkey. + if (opts.startkey) { + params.push('startkey=' + + encodeURIComponent(JSON.stringify(opts.startkey))); + } + + // If opts.endkey exists, add the endkey value to the list of parameters. + // If endkey is given then the returned list of docuemnts will + // end with the document whose id is endkey. + if (opts.endkey) { + params.push('endkey=' + encodeURIComponent(JSON.stringify(opts.endkey))); + } + + // If opts.limit exists, add the limit value to the parameter list. + if (opts.limit) { + params.push('limit=' + opts.limit); + } + + if (typeof opts.skip !== 'undefined') { + params.push('skip=' + opts.skip); + } + + // Format the list of parameters into a valid URI query string + params = params.join('&'); + if (params !== '') { + params = '?' + params; + } + + // If keys are supplied, issue a POST request to circumvent GET query string limits + // see http://wiki.apache.org/couchdb/HTTP_view_API#Querying_Options + if (typeof opts.keys !== 'undefined') { + method = 'POST'; + body = JSON.stringify({keys: opts.keys}); + } + + // Get the document listing + ajax({ + headers: host.headers, + method: method, + url: genDBUrl(host, '_all_docs' + params), + body: body + }, callback); + }; + + // Get a list of changes made to documents in the database given by host. + // TODO According to the README, there should be two other methods here, + // api.changes.addListener and api.changes.removeListener. + api.changes = function (opts) { + + // We internally page the results of a changes request, this means + // if there is a large set of changes to be returned we can start + // processing them quicker instead of waiting on the entire + // set of changes to return and attempting to process them at once + var CHANGES_LIMIT = 25; + + if (!api.taskqueue.ready()) { + var task = api.taskqueue.addTask('changes', arguments); + return { + cancel: function () { + if (task.task) { + return task.task.cancel(); + } + //console.log(db_url + ': Cancel Changes Feed'); + task.parameters[0].aborted = true; + } + }; + } + + if (opts.since === 'latest') { + var changes; + api.info(function (err, info) { + if (!opts.aborted) { + opts.since = info.update_seq; + changes = api.changes(opts); + } + }); + // Return a method to cancel this method from processing any more + return { + cancel: function () { + if (changes) { + return changes.cancel(); + } + //console.log(db_url + ': Cancel Changes Feed'); + opts.aborted = true; + } + }; + } + + //console.log(db_url + ': Start Changes Feed: continuous=' + opts.continuous); + + var params = {}; + var limit = (typeof opts.limit !== 'undefined') ? opts.limit : false; + if (limit === 0) { + limit = 1; + } + // + var leftToFetch = limit; + + if (opts.style) { + params.style = opts.style; + } + + if (opts.include_docs || opts.filter && typeof opts.filter === 'function') { + params.include_docs = true; + } + + if (opts.continuous) { + params.feed = 'longpoll'; + } + + if (opts.conflicts) { + params.conflicts = true; + } + + if (opts.descending) { + params.descending = true; + } + + if (opts.filter && typeof opts.filter === 'string') { + params.filter = opts.filter; + if (opts.filter === '_view' && opts.view && typeof opts.view === 'string') { + params.view = opts.view; + } + } + + // If opts.query_params exists, pass it through to the changes request. + // These parameters may be used by the filter on the source database. + if (opts.query_params && typeof opts.query_params === 'object') { + for (var param_name in opts.query_params) { + if (opts.query_params.hasOwnProperty(param_name)) { + params[param_name] = opts.query_params[param_name]; + } + } + } + + var xhr; + var lastFetchedSeq; + var remoteLastSeq; + var pagingCount; + + // Get all the changes starting wtih the one immediately after the + // sequence number given by since. + var fetch = function (since, callback) { + params.since = since; + if (!opts.continuous && !pagingCount) { + pagingCount = remoteLastSeq; + } + params.limit = (!limit || leftToFetch > CHANGES_LIMIT) ? + CHANGES_LIMIT : leftToFetch; + + var paramStr = '?' + Object.keys(params).map(function (k) { + return k + '=' + params[k]; + }).join('&'); + + // Set the options for the ajax call + var xhrOpts = { + headers: host.headers, + method: 'GET', + url: genDBUrl(host, '_changes' + paramStr), + // _changes can take a long time to generate, especially when filtered + timeout: null + }; + lastFetchedSeq = since; + + if (opts.aborted) { + return; + } + + // Get the changes + xhr = ajax(xhrOpts, callback); + }; + + // If opts.since exists, get all the changes from the sequence + // number given by opts.since. Otherwise, get all the changes + // from the sequence number 0. + var fetchTimeout = 10; + var fetchRetryCount = 0; + + var results = {results: []}; + + var fetched = function (err, res) { + // If the result of the ajax call (res) contains changes (res.results) + if (res && res.results) { + results.last_seq = res.last_seq; + // For each change + var req = {}; + req.query = opts.query_params; + res.results = res.results.filter(function (c) { + leftToFetch--; + var ret = utils.filterChange(opts)(c); + if (ret) { + results.results.push(c); + utils.call(opts.onChange, c); + } + return ret; + }); + } else if (err) { + // In case of an error, stop listening for changes and call opts.complete + opts.aborted = true; + utils.call(opts.complete, err, null); + } + + // The changes feed may have timed out with no results + // if so reuse last update sequence + if (res && res.last_seq) { + lastFetchedSeq = res.last_seq; + } + + var resultsLength = res && res.results.length || 0; + + pagingCount -= CHANGES_LIMIT; + + var finished = (limit && leftToFetch <= 0) || + (res && !resultsLength && pagingCount <= 0) || + (resultsLength && res.last_seq === remoteLastSeq) || + (opts.descending && lastFetchedSeq !== 0); + + if (opts.continuous || !finished) { + // Increase retry delay exponentially as long as errors persist + if (err) { + fetchRetryCount += 1; + } else { + fetchRetryCount = 0; + } + var timeoutMultiplier = 1 << fetchRetryCount; + var retryWait = fetchTimeout * timeoutMultiplier; + var maximumWait = opts.maximumWait || 30000; + + if (retryWait > maximumWait) { + utils.call(opts.complete, err || errors.UNKNOWN_ERROR, null); + } + + // Queue a call to fetch again with the newest sequence number + setTimeout(function () { fetch(lastFetchedSeq, fetched); }, retryWait); + } else { + // We're done, call the callback + utils.call(opts.complete, null, results); + } + }; + + // If we arent doing a continuous changes request we need to know + // the current update_seq so we know when to stop processing the + // changes + if (opts.continuous) { + fetch(opts.since || 0, fetched); + } else { + api.info(function (err, res) { + if (err) { + return utils.call(opts.complete, err); + } + remoteLastSeq = res.update_seq; + fetch(opts.since || 0, fetched); + }); + } + + // Return a method to cancel this method from processing any more + return { + cancel: function () { + //console.log(db_url + ': Cancel Changes Feed'); + opts.aborted = true; + xhr.abort(); + } + }; + }; + + // Given a set of document/revision IDs (given by req), tets the subset of + // those that do NOT correspond to revisions stored in the database. + // See http://wiki.apache.org/couchdb/HttpPostRevsDiff + api.revsDiff = function (req, opts, callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('revsDiff', arguments); + return; + } + // If no options were given, set the callback to be the second parameter + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + + // Get the missing document/revision IDs + ajax({ + headers: host.headers, + method: 'POST', + url: genDBUrl(host, '_revs_diff'), + body: req + }, function (err, res) { + utils.call(callback, err, res); + }); + }; + + api.close = function (callback) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('close', arguments); + return; + } + utils.call(callback, null); + }; + + api.replicateOnServer = function (target, opts, promise) { + if (!api.taskqueue.ready()) { + api.taskqueue.addTask('replicateOnServer', arguments); + return promise; + } + + var targetHost = getHost(target.id()); + var params = { + source: host.db, + target: targetHost.protocol === host.protocol && targetHost.authority === host.authority ? targetHost.db : targetHost.source + }; + + if (opts.continuous) { + params.continuous = true; + } + + if (opts.create_target) { + params.create_target = true; + } + + if (opts.doc_ids) { + params.doc_ids = opts.doc_ids; + } + + if (opts.filter && typeof opts.filter === 'string') { + params.filter = opts.filter; + } + + if (opts.query_params) { + params.query_params = opts.query_params; + } + + var result = {}; + var repOpts = { + headers: host.headers, + method: 'POST', + url: host.protocol + '://' + host.host + (host.port === 80 ? '' : (':' + host.port)) + '/_replicate', + body: params + }; + var xhr; + promise.cancel = function () { + this.cancelled = true; + if (xhr && !result.ok) { + xhr.abort(); + } + if (result._local_id) { + repOpts.body = { + replication_id: result._local_id + }; + } + repOpts.body.cancel = true; + ajax(repOpts, function (err, resp, xhr) { + // If the replication cancel request fails, send an error to the callback + if (err) { + return utils.call(callback, err); + } + // Send the replication cancel result to the complete callback + utils.call(opts.complete, null, result, xhr); + }); + }; + + if (promise.cancelled) { + return; + } + + xhr = ajax(repOpts, function (err, resp, xhr) { + // If the replication fails, send an error to the callback + if (err) { + return utils.call(callback, err); + } + + result.ok = true; + + // Provided by CouchDB from 1.2.0 onward to cancel replication + if (resp._local_id) { + result._local_id = resp._local_id; + } + + // Send the replication result to the complete callback + utils.call(opts.complete, null, resp, xhr); + }); + }; + + return api; +} + +// Delete the HttpPouch specified by the given name. +HttpPouch.destroy = function (name, opts, callback) { + var host = getHost(name, opts); + opts = opts || {}; + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + opts.headers = host.headers; + opts.method = 'DELETE'; + opts.url = genDBUrl(host, ''); + utils.ajax(opts, callback); +}; + +// HttpPouch is a valid adapter. +HttpPouch.valid = function () { + return true; +}; + +module.exports = HttpPouch; + +},{"../deps/errors":8,"../utils":16}],3:[function(require,module,exports){ +'use strict'; + +var utils = require('../utils'); +var merge = require('../merge'); +var errors = require('../deps/errors'); +function idbError(callback) { + return function (event) { + utils.call(callback, errors.error(errors.IDB_ERROR, event.target, event.type)); + }; +} + +function IdbPouch(opts, callback) { + + // IndexedDB requires a versioned database structure, this is going to make + // it hard to dynamically create object stores if we needed to for things + // like views + var POUCH_VERSION = 1; + + // The object stores created for each database + // DOC_STORE stores the document meta data, its revision history and state + var DOC_STORE = 'document-store'; + // BY_SEQ_STORE stores a particular version of a document, keyed by its + // sequence id + var BY_SEQ_STORE = 'by-sequence'; + // Where we store attachments + var ATTACH_STORE = 'attach-store'; + // Where we store meta data + var META_STORE = 'meta-store'; + // Where we detect blob support + var DETECT_BLOB_SUPPORT_STORE = 'detect-blob-support'; + + + var name = opts.name; + var req = window.indexedDB.open(name, POUCH_VERSION); + + if (!('openReqList' in IdbPouch)) { + IdbPouch.openReqList = {}; + } + IdbPouch.openReqList[name] = req; + + var blobSupport = null; + + var instanceId = null; + var api = {}; + var idb = null; + + req.onupgradeneeded = function (e) { + var db = e.target.result; + var currentVersion = e.oldVersion; + while (currentVersion !== e.newVersion) { + if (currentVersion === 0) { + createSchema(db); + } + currentVersion++; + } + }; + + function createSchema(db) { + db.createObjectStore(DOC_STORE, {keyPath : 'id'}) + .createIndex('seq', 'seq', {unique: true}); + db.createObjectStore(BY_SEQ_STORE, {autoIncrement : true}) + .createIndex('_doc_id_rev', '_doc_id_rev', {unique: true}); + db.createObjectStore(ATTACH_STORE, {keyPath: 'digest'}); + db.createObjectStore(META_STORE, {keyPath: 'id', autoIncrement: false}); + db.createObjectStore(DETECT_BLOB_SUPPORT_STORE); + } + + // From http://stackoverflow.com/questions/14967647/encode-decode-image-with-base64-breaks-image (2013-04-21) + function fixBinary(bin) { + var length = bin.length; + var buf = new ArrayBuffer(length); + var arr = new Uint8Array(buf); + for (var i = 0; i < length; i++) { + arr[i] = bin.charCodeAt(i); + } + return buf; + } + + req.onsuccess = function (e) { + + idb = e.target.result; + + idb.onversionchange = function () { + idb.close(); + }; + + var txn = idb.transaction([META_STORE, DETECT_BLOB_SUPPORT_STORE], + 'readwrite'); + + var req = txn.objectStore(META_STORE).get(META_STORE); + + req.onsuccess = function (e) { + var meta = e.target.result || {id: META_STORE}; + if (name + '_id' in meta) { + instanceId = meta[name + '_id']; + } else { + instanceId = utils.uuid(); + meta[name + '_id'] = instanceId; + txn.objectStore(META_STORE).put(meta); + } + + // detect blob support + try { + txn.objectStore(DETECT_BLOB_SUPPORT_STORE).put(utils.createBlob(), "key"); + blobSupport = true; + } catch (err) { + blobSupport = false; + } finally { + utils.call(callback, null, api); + } + }; + }; + + req.onerror = idbError(callback); + + api.type = function () { + return 'idb'; + }; + + // Each database needs a unique id so that we can store the sequence + // checkpoint without having other databases confuse itself. + api.id = function idb_id() { + return instanceId; + }; + + api._bulkDocs = function idb_bulkDocs(req, opts, callback) { + var newEdits = opts.new_edits; + var userDocs = req.docs; + // Parse the docs, give them a sequence number for the result + var docInfos = userDocs.map(function (doc, i) { + var newDoc = utils.parseDoc(doc, newEdits); + newDoc._bulk_seq = i; + return newDoc; + }); + + var docInfoErrors = docInfos.filter(function (docInfo) { + return docInfo.error; + }); + if (docInfoErrors.length) { + return utils.call(callback, docInfoErrors[0]); + } + + var results = []; + var docsWritten = 0; + + function writeMetaData(e) { + var meta = e.target.result; + meta.updateSeq = (meta.updateSeq || 0) + docsWritten; + txn.objectStore(META_STORE).put(meta); + } + + function processDocs() { + if (!docInfos.length) { + txn.objectStore(META_STORE).get(META_STORE).onsuccess = writeMetaData; + return; + } + var currentDoc = docInfos.shift(); + var req = txn.objectStore(DOC_STORE).get(currentDoc.metadata.id); + req.onsuccess = function process_docRead(event) { + var oldDoc = event.target.result; + if (!oldDoc) { + insertDoc(currentDoc); + } else { + updateDoc(oldDoc, currentDoc); + } + }; + } + + function complete(event) { + var aresults = []; + results.sort(sortByBulkSeq); + results.forEach(function (result) { + delete result._bulk_seq; + if (result.error) { + aresults.push(result); + return; + } + var metadata = result.metadata; + var rev = merge.winningRev(metadata); + + aresults.push({ + ok: true, + id: metadata.id, + rev: rev + }); + + if (utils.isLocalId(metadata.id)) { + return; + } + + IdbPouch.Changes.notify(name); + IdbPouch.Changes.notifyLocalWindows(name); + }); + utils.call(callback, null, aresults); + } + + function preprocessAttachment(att, finish) { + if (att.stub) { + return finish(); + } + if (typeof att.data === 'string') { + var data; + try { + data = atob(att.data); + } catch (e) { + var err = errors.error(errors.BAD_ARG, + "Attachments need to be base64 encoded"); + return utils.call(callback, err); + } + att.digest = 'md5-' + utils.Crypto.MD5(data); + if (blobSupport) { + var type = att.content_type; + data = fixBinary(data); + att.data = utils.createBlob([data], {type: type}); + } + return finish(); + } + var reader = new FileReader(); + reader.onloadend = function (e) { + att.digest = 'md5-' + utils.Crypto.MD5(this.result); + if (!blobSupport) { + att.data = btoa(this.result); + } + finish(); + }; + reader.readAsBinaryString(att.data); + } + + function preprocessAttachments(callback) { + if (!docInfos.length) { + return callback(); + } + + var docv = 0; + docInfos.forEach(function (docInfo) { + var attachments = docInfo.data && docInfo.data._attachments ? + Object.keys(docInfo.data._attachments) : []; + + if (!attachments.length) { + return done(); + } + + var recv = 0; + function attachmentProcessed() { + recv++; + if (recv === attachments.length) { + done(); + } + } + + for (var key in docInfo.data._attachments) { + preprocessAttachment(docInfo.data._attachments[key], attachmentProcessed); + } + }); + + function done() { + docv++; + if (docInfos.length === docv) { + callback(); + } + } + } + + function writeDoc(docInfo, callback) { + var err = null; + var recv = 0; + docInfo.data._id = docInfo.metadata.id; + docInfo.data._rev = docInfo.metadata.rev; + + docsWritten++; + + if (utils.isDeleted(docInfo.metadata, docInfo.metadata.rev)) { + docInfo.data._deleted = true; + } + + var attachments = docInfo.data._attachments ? + Object.keys(docInfo.data._attachments) : []; + + function collectResults(attachmentErr) { + if (!err) { + if (attachmentErr) { + err = attachmentErr; + utils.call(callback, err); + } else if (recv === attachments.length) { + finish(); + } + } + } + + function attachmentSaved(err) { + recv++; + collectResults(err); + } + + for (var key in docInfo.data._attachments) { + if (!docInfo.data._attachments[key].stub) { + var data = docInfo.data._attachments[key].data; + delete docInfo.data._attachments[key].data; + var digest = docInfo.data._attachments[key].digest; + saveAttachment(docInfo, digest, data, attachmentSaved); + } else { + recv++; + collectResults(); + } + } + + function finish() { + docInfo.data._doc_id_rev = docInfo.data._id + "::" + docInfo.data._rev; + var dataReq = txn.objectStore(BY_SEQ_STORE).put(docInfo.data); + dataReq.onsuccess = function (e) { + //console.log(name + ': Wrote Document ', docInfo.metadata.id); + docInfo.metadata.seq = e.target.result; + // Current _rev is calculated from _rev_tree on read + delete docInfo.metadata.rev; + var metaDataReq = txn.objectStore(DOC_STORE).put(docInfo.metadata); + metaDataReq.onsuccess = function () { + results.push(docInfo); + utils.call(callback); + }; + }; + } + + if (!attachments.length) { + finish(); + } + } + + function updateDoc(oldDoc, docInfo) { + var merged = merge.merge(oldDoc.rev_tree, docInfo.metadata.rev_tree[0], 1000); + var wasPreviouslyDeleted = utils.isDeleted(oldDoc); + var inConflict = (wasPreviouslyDeleted && + utils.isDeleted(docInfo.metadata)) || + (!wasPreviouslyDeleted && newEdits && merged.conflicts !== 'new_leaf'); + + if (inConflict) { + results.push(makeErr(errors.REV_CONFLICT, docInfo._bulk_seq)); + return processDocs(); + } + + docInfo.metadata.rev_tree = merged.tree; + writeDoc(docInfo, processDocs); + } + + function insertDoc(docInfo) { + // Cant insert new deleted documents + if ('was_delete' in opts && utils.isDeleted(docInfo.metadata)) { + results.push(errors.MISSING_DOC); + return processDocs(); + } + writeDoc(docInfo, processDocs); + } + + // Insert sequence number into the error so we can sort later + function makeErr(err, seq) { + err._bulk_seq = seq; + return err; + } + + function saveAttachment(docInfo, digest, data, callback) { + var objectStore = txn.objectStore(ATTACH_STORE); + var getReq = objectStore.get(digest).onsuccess = function (e) { + var originalRefs = e.target.result && e.target.result.refs || {}; + var ref = [docInfo.metadata.id, docInfo.metadata.rev].join('@'); + var newAtt = { + digest: digest, + body: data, + refs: originalRefs + }; + newAtt.refs[ref] = true; + var putReq = objectStore.put(newAtt).onsuccess = function (e) { + utils.call(callback); + }; + }; + } + + var txn; + preprocessAttachments(function () { + txn = idb.transaction([DOC_STORE, BY_SEQ_STORE, ATTACH_STORE, META_STORE], + 'readwrite'); + txn.onerror = idbError(callback); + txn.ontimeout = idbError(callback); + txn.oncomplete = complete; + + processDocs(); + }); + }; + + function sortByBulkSeq(a, b) { + return a._bulk_seq - b._bulk_seq; + } + + // First we look up the metadata in the ids database, then we fetch the + // current revision(s) from the by sequence store + api._get = function idb_get(id, opts, callback) { + var doc; + var metadata; + var err; + var txn; + if (opts.ctx) { + txn = opts.ctx; + } else { + txn = idb.transaction([DOC_STORE, BY_SEQ_STORE, ATTACH_STORE], 'readonly'); + } + + function finish() { + utils.call(callback, err, {doc: doc, metadata: metadata, ctx: txn}); + } + + txn.objectStore(DOC_STORE).get(id).onsuccess = function (e) { + metadata = e.target.result; + // we can determine the result here if: + // 1. there is no such document + // 2. the document is deleted and we don't ask about specific rev + // When we ask with opts.rev we expect the answer to be either + // doc (possibly with _deleted=true) or missing error + if (!metadata) { + err = errors.MISSING_DOC; + return finish(); + } + if (utils.isDeleted(metadata) && !opts.rev) { + err = errors.error(errors.MISSING_DOC, "deleted"); + return finish(); + } + + var rev = merge.winningRev(metadata); + var key = metadata.id + '::' + (opts.rev ? opts.rev : rev); + var index = txn.objectStore(BY_SEQ_STORE).index('_doc_id_rev'); + + index.get(key).onsuccess = function (e) { + doc = e.target.result; + if (doc && doc._doc_id_rev) { + delete(doc._doc_id_rev); + } + if (!doc) { + err = errors.MISSING_DOC; + return finish(); + } + finish(); + }; + }; + }; + + api._getAttachment = function (attachment, opts, callback) { + var result; + var txn; + if (opts.ctx) { + txn = opts.ctx; + } else { + txn = idb.transaction([DOC_STORE, BY_SEQ_STORE, ATTACH_STORE], 'readonly'); + } + var digest = attachment.digest; + var type = attachment.content_type; + + txn.objectStore(ATTACH_STORE).get(digest).onsuccess = function (e) { + var data = e.target.result.body; + if (opts.encode) { + if (blobSupport) { + var reader = new FileReader(); + reader.onloadend = function (e) { + result = btoa(this.result); + utils.call(callback, null, result); + }; + reader.readAsBinaryString(data); + } else { + result = data; + utils.call(callback, null, result); + } + } else { + if (blobSupport) { + result = data; + } else { + data = fixBinary(atob(data)); + result = utils.createBlob([data], {type: type}); + } + utils.call(callback, null, result); + } + }; + }; + + api._allDocs = function idb_allDocs(opts, callback) { + var start = 'startkey' in opts ? opts.startkey : false; + var end = 'endkey' in opts ? opts.endkey : false; + + var descending = 'descending' in opts ? opts.descending : false; + descending = descending ? 'prev' : null; + + var keyRange = start && end ? window.IDBKeyRange.bound(start, end) + : start ? window.IDBKeyRange.lowerBound(start) + : end ? window.IDBKeyRange.upperBound(end) : null; + + var transaction = idb.transaction([DOC_STORE, BY_SEQ_STORE], 'readonly'); + transaction.oncomplete = function () { + if ('keys' in opts) { + opts.keys.forEach(function (key) { + if (key in resultsMap) { + results.push(resultsMap[key]); + } else { + results.push({"key": key, "error": "not_found"}); + } + }); + if (opts.descending) { + results.reverse(); + } + } + utils.call(callback, null, { + total_rows: results.length, + offset: opts.skip, + rows: ('limit' in opts) ? results.slice(opts.skip, opts.limit + opts.skip) : + (opts.skip > 0) ? results.slice(opts.skip) : results + }); + }; + + var oStore = transaction.objectStore(DOC_STORE); + var oCursor = descending ? oStore.openCursor(keyRange, descending) + : oStore.openCursor(keyRange); + var results = []; + var resultsMap = {}; + oCursor.onsuccess = function (e) { + if (!e.target.result) { + return; + } + var cursor = e.target.result; + var metadata = cursor.value; + // If opts.keys is set we want to filter here only those docs with + // key in opts.keys. With no performance tests it is difficult to + // guess if iteration with filter is faster than many single requests + function allDocsInner(metadata, data) { + if (utils.isLocalId(metadata.id)) { + return cursor['continue'](); + } + var doc = { + id: metadata.id, + key: metadata.id, + value: { + rev: merge.winningRev(metadata) + } + }; + if (opts.include_docs) { + doc.doc = data; + doc.doc._rev = merge.winningRev(metadata); + if (doc.doc._doc_id_rev) { + delete(doc.doc._doc_id_rev); + } + if (opts.conflicts) { + doc.doc._conflicts = merge.collectConflicts(metadata); + } + for (var att in doc.doc._attachments) { + doc.doc._attachments[att].stub = true; + } + } + if ('keys' in opts) { + if (opts.keys.indexOf(metadata.id) > -1) { + if (utils.isDeleted(metadata)) { + doc.value.deleted = true; + doc.doc = null; + } + resultsMap[doc.id] = doc; + } + } else { + if (!utils.isDeleted(metadata)) { + results.push(doc); + } + } + cursor['continue'](); + } + + if (!opts.include_docs) { + allDocsInner(metadata); + } else { + var index = transaction.objectStore(BY_SEQ_STORE).index('_doc_id_rev'); + var mainRev = merge.winningRev(metadata); + var key = metadata.id + "::" + mainRev; + index.get(key).onsuccess = function (event) { + allDocsInner(cursor.value, event.target.result); + }; + } + }; + }; + + api._info = function idb_info(callback) { + var count = 0; + var update_seq = 0; + var txn = idb.transaction([DOC_STORE, META_STORE], 'readonly'); + + function fetchUpdateSeq(e) { + update_seq = e.target.result && e.target.result.updateSeq || 0; + } + + function countDocs(e) { + var cursor = e.target.result; + if (!cursor) { + txn.objectStore(META_STORE).get(META_STORE).onsuccess = fetchUpdateSeq; + return; + } + if (cursor.value.deleted !== true) { + count++; + } + cursor['continue'](); + } + + txn.oncomplete = function () { + callback(null, { + db_name: name, + doc_count: count, + update_seq: update_seq + }); + }; + + txn.objectStore(DOC_STORE).openCursor().onsuccess = countDocs; + }; + + api._changes = function idb_changes(opts) { + //console.log(name + ': Start Changes Feed: continuous=' + opts.continuous); + + if (opts.continuous) { + var id = name + ':' + utils.uuid(); + opts.cancelled = false; + IdbPouch.Changes.addListener(name, id, api, opts); + IdbPouch.Changes.notify(name); + return { + cancel: function () { + //console.log(name + ': Cancel Changes Feed'); + opts.cancelled = true; + IdbPouch.Changes.removeListener(name, id); + } + }; + } + + var descending = opts.descending ? 'prev' : null; + var last_seq = 0; + + // Ignore the `since` parameter when `descending` is true + opts.since = opts.since && !descending ? opts.since : 0; + + var results = [], resultIndices = {}, dedupResults = []; + var txn; + + function fetchChanges() { + txn = idb.transaction([DOC_STORE, BY_SEQ_STORE]); + txn.oncomplete = onTxnComplete; + + var req; + + if (descending) { + req = txn.objectStore(BY_SEQ_STORE) + .openCursor(window.IDBKeyRange.lowerBound(opts.since, true), descending); + } else { + req = txn.objectStore(BY_SEQ_STORE) + .openCursor(window.IDBKeyRange.lowerBound(opts.since, true)); + } + + req.onsuccess = onsuccess; + req.onerror = onerror; + } + + fetchChanges(); + + function onsuccess(event) { + if (!event.target.result) { + // Filter out null results casued by deduping + for (var i = 0, l = results.length; i < l; i++) { + var result = results[i]; + if (result) { + dedupResults.push(result); + } + } + return false; + } + + var cursor = event.target.result; + + // Try to pre-emptively dedup to save us a bunch of idb calls + var changeId = cursor.value._id; + var changeIdIndex = resultIndices[changeId]; + if (changeIdIndex !== undefined) { + results[changeIdIndex].seq = cursor.key; + // update so it has the later sequence number + results.push(results[changeIdIndex]); + results[changeIdIndex] = null; + resultIndices[changeId] = results.length - 1; + return cursor['continue'](); + } + + var index = txn.objectStore(DOC_STORE); + index.get(cursor.value._id).onsuccess = function (event) { + var metadata = event.target.result; + if (utils.isLocalId(metadata.id)) { + return cursor['continue'](); + } + + if (last_seq < metadata.seq) { + last_seq = metadata.seq; + } + + var mainRev = merge.winningRev(metadata); + var key = metadata.id + "::" + mainRev; + var index = txn.objectStore(BY_SEQ_STORE).index('_doc_id_rev'); + index.get(key).onsuccess = function (docevent) { + var doc = docevent.target.result; + delete doc['_doc_id_rev']; + + doc._rev = mainRev; + var change = opts.processChange(doc, metadata, opts); + change.seq = cursor.key; + + // Dedupe the changes feed + var changeId = change.id, changeIdIndex = resultIndices[changeId]; + if (changeIdIndex !== undefined) { + results[changeIdIndex] = null; + } + results.push(change); + resultIndices[changeId] = results.length - 1; + cursor['continue'](); + }; + }; + } + + function onTxnComplete() { + utils.processChanges(opts, dedupResults, last_seq); + } + + function onerror(error) { + // TODO: shouldn't we pass some params here? + utils.call(opts.complete); + } + }; + + api._close = function (callback) { + if (idb === null) { + return utils.call(callback, errors.NOT_OPEN); + } + + // https://developer.mozilla.org/en-US/docs/IndexedDB/IDBDatabase#close + // "Returns immediately and closes the connection in a separate thread..." + idb.close(); + utils.call(callback, null); + }; + + api._getRevisionTree = function (docId, callback) { + var txn = idb.transaction([DOC_STORE], 'readonly'); + var req = txn.objectStore(DOC_STORE).get(docId); + req.onsuccess = function (event) { + var doc = event.target.result; + if (!doc) { + utils.call(callback, errors.MISSING_DOC); + } else { + utils.call(callback, null, doc.rev_tree); + } + }; + }; + + // This function removes revisions of document docId + // which are listed in revs and sets this document + // revision to to rev_tree + api._doCompaction = function (docId, rev_tree, revs, callback) { + var txn = idb.transaction([DOC_STORE, BY_SEQ_STORE], 'readwrite'); + + var index = txn.objectStore(DOC_STORE); + index.get(docId).onsuccess = function (event) { + var metadata = event.target.result; + metadata.rev_tree = rev_tree; + + var count = revs.length; + revs.forEach(function (rev) { + var index = txn.objectStore(BY_SEQ_STORE).index('_doc_id_rev'); + var key = docId + "::" + rev; + index.getKey(key).onsuccess = function (e) { + var seq = e.target.result; + if (!seq) { + return; + } + var req = txn.objectStore(BY_SEQ_STORE)['delete'](seq); + + count--; + if (!count) { + txn.objectStore(DOC_STORE).put(metadata); + } + }; + }); + }; + txn.oncomplete = function () { + utils.call(callback); + }; + }; + + return api; +} + +IdbPouch.valid = function idb_valid() { + return typeof window !== 'undefined' && !!window.indexedDB; +}; + +IdbPouch.destroy = function idb_destroy(name, opts, callback) { + if (!('openReqList' in IdbPouch)) { + IdbPouch.openReqList = {}; + } + IdbPouch.Changes.clearListeners(name); + + //Close open request for "name" database to fix ie delay. + if (IdbPouch.openReqList[name] && IdbPouch.openReqList[name].result) { + IdbPouch.openReqList[name].result.close(); + } + var req = window.indexedDB.deleteDatabase(name); + + req.onsuccess = function () { + //Remove open request from the list. + if (IdbPouch.openReqList[name]) { + IdbPouch.openReqList[name] = null; + } + utils.call(callback, null); + }; + + req.onerror = idbError(callback); +}; + +IdbPouch.Changes = new utils.Changes(); + +module.exports = IdbPouch; + +},{"../deps/errors":8,"../merge":13,"../utils":16}],4:[function(require,module,exports){ +'use strict'; + +var utils = require('../utils'); +var merge = require('../merge'); +var errors = require('../deps/errors'); +function quote(str) { + return "'" + str + "'"; +} + +function openDB() { + if (typeof window !== 'undefined') { + if (window.navigator && window.navigator.sqlitePlugin && window.navigator.sqlitePlugin.openDatabase) { + return navigator.sqlitePlugin.openDatabase.apply(navigator.sqlitePlugin, arguments); + } else if (window.sqlitePlugin && window.sqlitePlugin.openDatabase) { + return window.sqlitePlugin.openDatabase.apply(window.sqlitePlugin, arguments); + } else { + return window.openDatabase.apply(window, arguments); + } + } +} + +var POUCH_VERSION = 1; +var POUCH_SIZE = 5 * 1024 * 1024; + +// The object stores created for each database +// DOC_STORE stores the document meta data, its revision history and state +var DOC_STORE = quote('document-store'); +// BY_SEQ_STORE stores a particular version of a document, keyed by its +// sequence id +var BY_SEQ_STORE = quote('by-sequence'); +// Where we store attachments +var ATTACH_STORE = quote('attach-store'); +var META_STORE = quote('metadata-store'); + +function unknownError(callback) { + return function (event) { + utils.call(callback, { + status: 500, + error: event.type, + reason: event.target + }); + }; +} +function idbError(callback) { + return function (event) { + utils.call(callback, errors.error(errors.WSQ_ERROR, event.target, event.type)); + }; +} +function webSqlPouch(opts, callback) { + + var api = {}; + var instanceId = null; + var name = opts.name; + + var db = openDB(name, POUCH_VERSION, name, POUCH_SIZE); + if (!db) { + return utils.call(callback, errors.UNKNOWN_ERROR); + } + + function dbCreated() { + callback(null, api); + } + + function setup() { + db.transaction(function (tx) { + var meta = 'CREATE TABLE IF NOT EXISTS ' + META_STORE + + ' (update_seq, dbid)'; + var attach = 'CREATE TABLE IF NOT EXISTS ' + ATTACH_STORE + + ' (digest, json, body BLOB)'; + var doc = 'CREATE TABLE IF NOT EXISTS ' + DOC_STORE + + ' (id unique, seq, json, winningseq)'; + var seq = 'CREATE TABLE IF NOT EXISTS ' + BY_SEQ_STORE + + ' (seq INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, doc_id_rev UNIQUE, json)'; + + tx.executeSql(attach); + tx.executeSql(doc); + tx.executeSql(seq); + tx.executeSql(meta); + + var updateseq = 'SELECT update_seq FROM ' + META_STORE; + tx.executeSql(updateseq, [], function (tx, result) { + if (!result.rows.length) { + var initSeq = 'INSERT INTO ' + META_STORE + ' (update_seq) VALUES (?)'; + tx.executeSql(initSeq, [0]); + return; + } + }); + + var dbid = 'SELECT dbid FROM ' + META_STORE + ' WHERE dbid IS NOT NULL'; + tx.executeSql(dbid, [], function (tx, result) { + if (!result.rows.length) { + var initDb = 'UPDATE ' + META_STORE + ' SET dbid=?'; + instanceId = utils.uuid(); + tx.executeSql(initDb, [instanceId]); + return; + } + instanceId = result.rows.item(0).dbid; + }); + }, unknownError(callback), dbCreated); + } + if (utils.isCordova() && typeof window !== 'undefined') { + //to wait until custom api is made in pouch.adapters before doing setup + window.addEventListener(name + '_pouch', function cordova_init() { + window.removeEventListener(name + '_pouch', cordova_init, false); + setup(); + }, false); + } else { + setup(); + } + + + api.type = function () { + return 'websql'; + }; + + api.id = function () { + return instanceId; + }; + + api._info = function (callback) { + db.transaction(function (tx) { + var sql = 'SELECT COUNT(id) AS count FROM ' + DOC_STORE; + tx.executeSql(sql, [], function (tx, result) { + var doc_count = result.rows.item(0).count; + var updateseq = 'SELECT update_seq FROM ' + META_STORE; + tx.executeSql(updateseq, [], function (tx, result) { + var update_seq = result.rows.item(0).update_seq; + callback(null, { + db_name: name, + doc_count: doc_count, + update_seq: update_seq + }); + }); + }); + }); + }; + + api._bulkDocs = function (req, opts, callback) { + + var newEdits = opts.new_edits; + var userDocs = req.docs; + var docsWritten = 0; + + // Parse the docs, give them a sequence number for the result + var docInfos = userDocs.map(function (doc, i) { + var newDoc = utils.parseDoc(doc, newEdits); + newDoc._bulk_seq = i; + return newDoc; + }); + + var docInfoErrors = docInfos.filter(function (docInfo) { + return docInfo.error; + }); + if (docInfoErrors.length) { + return utils.call(callback, docInfoErrors[0]); + } + + var tx; + var results = []; + var fetchedDocs = {}; + + function sortByBulkSeq(a, b) { + return a._bulk_seq - b._bulk_seq; + } + + function complete(event) { + var aresults = []; + results.sort(sortByBulkSeq); + results.forEach(function (result) { + delete result._bulk_seq; + if (result.error) { + aresults.push(result); + return; + } + var metadata = result.metadata; + var rev = merge.winningRev(metadata); + + aresults.push({ + ok: true, + id: metadata.id, + rev: rev + }); + + if (utils.isLocalId(metadata.id)) { + return; + } + + docsWritten++; + + webSqlPouch.Changes.notify(name); + webSqlPouch.Changes.notifyLocalWindows(name); + }); + + var updateseq = 'SELECT update_seq FROM ' + META_STORE; + tx.executeSql(updateseq, [], function (tx, result) { + var update_seq = result.rows.item(0).update_seq + docsWritten; + var sql = 'UPDATE ' + META_STORE + ' SET update_seq=?'; + tx.executeSql(sql, [update_seq], function () { + utils.call(callback, null, aresults); + }); + }); + } + + function preprocessAttachment(att, finish) { + if (att.stub) { + return finish(); + } + if (typeof att.data === 'string') { + try { + att.data = atob(att.data); + } catch (e) { + var err = errors.error(errors.BAD_ARG, + "Attachments need to be base64 encoded"); + return utils.call(callback, err); + } + att.digest = 'md5-' + utils.Crypto.MD5(att.data); + return finish(); + } + var reader = new FileReader(); + reader.onloadend = function (e) { + att.data = this.result; + att.digest = 'md5-' + utils.Crypto.MD5(this.result); + finish(); + }; + reader.readAsBinaryString(att.data); + } + + function preprocessAttachments(callback) { + if (!docInfos.length) { + return callback(); + } + + var docv = 0; + var recv = 0; + + docInfos.forEach(function (docInfo) { + var attachments = docInfo.data && docInfo.data._attachments ? + Object.keys(docInfo.data._attachments) : []; + + if (!attachments.length) { + return done(); + } + + function processedAttachment() { + recv++; + if (recv === attachments.length) { + done(); + } + } + + for (var key in docInfo.data._attachments) { + preprocessAttachment(docInfo.data._attachments[key], processedAttachment); + } + }); + + function done() { + docv++; + if (docInfos.length === docv) { + callback(); + } + } + } + + function writeDoc(docInfo, callback, isUpdate) { + + function finish() { + var data = docInfo.data; + var sql = 'INSERT INTO ' + BY_SEQ_STORE + ' (doc_id_rev, json) VALUES (?, ?);'; + tx.executeSql(sql, [data._id + "::" + data._rev, + JSON.stringify(data)], dataWritten); + } + + function collectResults(attachmentErr) { + if (!err) { + if (attachmentErr) { + err = attachmentErr; + utils.call(callback, err); + } else if (recv === attachments.length) { + finish(); + } + } + } + + var err = null; + var recv = 0; + + docInfo.data._id = docInfo.metadata.id; + docInfo.data._rev = docInfo.metadata.rev; + + if (utils.isDeleted(docInfo.metadata, docInfo.metadata.rev)) { + docInfo.data._deleted = true; + } + + var attachments = docInfo.data._attachments ? + Object.keys(docInfo.data._attachments) : []; + + function attachmentSaved(err) { + recv++; + collectResults(err); + } + + for (var key in docInfo.data._attachments) { + if (!docInfo.data._attachments[key].stub) { + var data = docInfo.data._attachments[key].data; + delete docInfo.data._attachments[key].data; + var digest = docInfo.data._attachments[key].digest; + saveAttachment(docInfo, digest, data, attachmentSaved); + } else { + recv++; + collectResults(); + } + } + + if (!attachments.length) { + finish(); + } + + function dataWritten(tx, result) { + var seq = docInfo.metadata.seq = result.insertId; + delete docInfo.metadata.rev; + + var mainRev = merge.winningRev(docInfo.metadata); + + var sql = isUpdate ? + 'UPDATE ' + DOC_STORE + ' SET seq=?, json=?, winningseq=(SELECT seq FROM ' + + BY_SEQ_STORE + ' WHERE doc_id_rev=?) WHERE id=?' : + 'INSERT INTO ' + DOC_STORE + ' (id, seq, winningseq, json) VALUES (?, ?, ?, ?);'; + var metadataStr = JSON.stringify(docInfo.metadata); + var key = docInfo.metadata.id + "::" + mainRev; + var params = isUpdate ? + [seq, metadataStr, key, docInfo.metadata.id] : + [docInfo.metadata.id, seq, seq, metadataStr]; + tx.executeSql(sql, params, function (tx, result) { + results.push(docInfo); + utils.call(callback, null); + }); + } + } + + function updateDoc(oldDoc, docInfo) { + var merged = merge.merge(oldDoc.rev_tree, docInfo.metadata.rev_tree[0], 1000); + var inConflict = (utils.isDeleted(oldDoc) && + utils.isDeleted(docInfo.metadata)) || + (!utils.isDeleted(oldDoc) && + newEdits && merged.conflicts !== 'new_leaf'); + + if (inConflict) { + results.push(makeErr(errors.REV_CONFLICT, docInfo._bulk_seq)); + return processDocs(); + } + + docInfo.metadata.rev_tree = merged.tree; + writeDoc(docInfo, processDocs, true); + } + + function insertDoc(docInfo) { + // Cant insert new deleted documents + if ('was_delete' in opts && utils.isDeleted(docInfo.metadata)) { + results.push(errors.MISSING_DOC); + return processDocs(); + } + writeDoc(docInfo, processDocs, false); + } + + function processDocs() { + if (!docInfos.length) { + return complete(); + } + var currentDoc = docInfos.shift(); + var id = currentDoc.metadata.id; + if (id in fetchedDocs) { + updateDoc(fetchedDocs[id], currentDoc); + } else { + // if we have newEdits=false then we can update the same + // document twice in a single bulk docs call + fetchedDocs[id] = currentDoc.metadata; + insertDoc(currentDoc); + } + } + + // Insert sequence number into the error so we can sort later + function makeErr(err, seq) { + err._bulk_seq = seq; + return err; + } + + function saveAttachment(docInfo, digest, data, callback) { + var ref = [docInfo.metadata.id, docInfo.metadata.rev].join('@'); + var newAtt = {digest: digest}; + var sql = 'SELECT digest, json FROM ' + ATTACH_STORE + ' WHERE digest=?'; + tx.executeSql(sql, [digest], function (tx, result) { + if (!result.rows.length) { + newAtt.refs = {}; + newAtt.refs[ref] = true; + sql = 'INSERT INTO ' + ATTACH_STORE + '(digest, json, body) VALUES (?, ?, ?)'; + tx.executeSql(sql, [digest, JSON.stringify(newAtt), data], function () { + utils.call(callback, null); + }); + } else { + newAtt.refs = JSON.parse(result.rows.item(0).json).refs; + sql = 'UPDATE ' + ATTACH_STORE + ' SET json=?, body=? WHERE digest=?'; + tx.executeSql(sql, [JSON.stringify(newAtt), data, digest], function () { + utils.call(callback, null); + }); + } + }); + } + + function metadataFetched(tx, results) { + for (var j = 0; j < results.rows.length; j++) { + var row = results.rows.item(j); + fetchedDocs[row.id] = JSON.parse(row.json); + } + processDocs(); + } + + preprocessAttachments(function () { + db.transaction(function (txn) { + tx = txn; + var ids = '(' + docInfos.map(function (d) { + return quote(d.metadata.id); + }).join(',') + ')'; + var sql = 'SELECT * FROM ' + DOC_STORE + ' WHERE id IN ' + ids; + tx.executeSql(sql, [], metadataFetched); + }, unknownError(callback)); + }); + }; + + api._get = function (id, opts, callback) { + var doc; + var metadata; + var err; + if (!opts.ctx) { + db.transaction(function (txn) { + opts.ctx = txn; + api._get(id, opts, callback); + }); + return; + } + var tx = opts.ctx; + + function finish() { + utils.call(callback, err, {doc: doc, metadata: metadata, ctx: tx}); + } + + var sql = 'SELECT * FROM ' + DOC_STORE + ' WHERE id=?'; + tx.executeSql(sql, [id], function (a, results) { + if (!results.rows.length) { + err = errors.MISSING_DOC; + return finish(); + } + metadata = JSON.parse(results.rows.item(0).json); + if (utils.isDeleted(metadata) && !opts.rev) { + err = errors.error(errors.MISSING_DOC, "deleted"); + return finish(); + } + + var rev = merge.winningRev(metadata); + var key = opts.rev ? opts.rev : rev; + key = metadata.id + '::' + key; + var sql = 'SELECT * FROM ' + BY_SEQ_STORE + ' WHERE doc_id_rev=?'; + tx.executeSql(sql, [key], function (tx, results) { + if (!results.rows.length) { + err = errors.MISSING_DOC; + return finish(); + } + doc = JSON.parse(results.rows.item(0).json); + + finish(); + }); + }); + }; + + function makeRevs(arr) { + return arr.map(function (x) { return {rev: x.rev}; }); + } + + api._allDocs = function (opts, callback) { + var results = []; + var resultsMap = {}; + var start = 'startkey' in opts ? opts.startkey : false; + var end = 'endkey' in opts ? opts.endkey : false; + var descending = 'descending' in opts ? opts.descending : false; + var sql = 'SELECT ' + DOC_STORE + '.id, ' + BY_SEQ_STORE + '.seq, ' + + BY_SEQ_STORE + '.json AS data, ' + DOC_STORE + '.json AS metadata FROM ' + + BY_SEQ_STORE + ' JOIN ' + DOC_STORE + ' ON ' + BY_SEQ_STORE + '.seq = ' + + DOC_STORE + '.winningseq'; + + var sqlArgs = []; + if ('keys' in opts) { + sql += ' WHERE ' + DOC_STORE + '.id IN (' + opts.keys.map(function () { + return '?'; + }).join(',') + ')'; + sqlArgs = sqlArgs.concat(opts.keys); + } else { + if (start) { + sql += ' WHERE ' + DOC_STORE + '.id >= ?'; + sqlArgs.push(start); + } + if (end) { + sql += (start ? ' AND ' : ' WHERE ') + DOC_STORE + '.id <= ?'; + sqlArgs.push(end); + } + sql += ' ORDER BY ' + DOC_STORE + '.id ' + (descending ? 'DESC' : 'ASC'); + } + + db.transaction(function (tx) { + tx.executeSql(sql, sqlArgs, function (tx, result) { + for (var i = 0, l = result.rows.length; i < l; i++) { + var doc = result.rows.item(i); + var metadata = JSON.parse(doc.metadata); + var data = JSON.parse(doc.data); + if (!(utils.isLocalId(metadata.id))) { + doc = { + id: metadata.id, + key: metadata.id, + value: {rev: merge.winningRev(metadata)} + }; + if (opts.include_docs) { + doc.doc = data; + doc.doc._rev = merge.winningRev(metadata); + if (opts.conflicts) { + doc.doc._conflicts = merge.collectConflicts(metadata); + } + for (var att in doc.doc._attachments) { + doc.doc._attachments[att].stub = true; + } + } + if ('keys' in opts) { + if (opts.keys.indexOf(metadata.id) > -1) { + if (utils.isDeleted(metadata)) { + doc.value.deleted = true; + doc.doc = null; + } + resultsMap[doc.id] = doc; + } + } else { + if (!utils.isDeleted(metadata)) { + results.push(doc); + } + } + } + } + }); + }, unknownError(callback), function () { + if ('keys' in opts) { + opts.keys.forEach(function (key) { + if (key in resultsMap) { + results.push(resultsMap[key]); + } else { + results.push({"key": key, "error": "not_found"}); + } + }); + if (opts.descending) { + results.reverse(); + } + } + utils.call(callback, null, { + total_rows: results.length, + offset: opts.skip, + rows: ('limit' in opts) ? results.slice(opts.skip, opts.limit + opts.skip) : + (opts.skip > 0) ? results.slice(opts.skip) : results + }); + }); + }; + + api._changes = function idb_changes(opts) { + + + //console.log(name + ': Start Changes Feed: continuous=' + opts.continuous); + + + if (opts.continuous) { + var id = name + ':' + utils.uuid(); + opts.cancelled = false; + webSqlPouch.Changes.addListener(name, id, api, opts); + webSqlPouch.Changes.notify(name); + return { + cancel: function () { + //console.log(name + ': Cancel Changes Feed'); + opts.cancelled = true; + webSqlPouch.Changes.removeListener(name, id); + } + }; + } + + var descending = opts.descending; + + // Ignore the `since` parameter when `descending` is true + opts.since = opts.since && !descending ? opts.since : 0; + + var results = []; + var txn; + + function fetchChanges() { + var sql = 'SELECT ' + DOC_STORE + '.id, ' + BY_SEQ_STORE + '.seq, ' + + BY_SEQ_STORE + '.json AS data, ' + DOC_STORE + '.json AS metadata FROM ' + + BY_SEQ_STORE + ' JOIN ' + DOC_STORE + ' ON ' + BY_SEQ_STORE + '.seq = ' + + DOC_STORE + '.winningseq WHERE ' + DOC_STORE + '.seq > ' + opts.since + + ' ORDER BY ' + DOC_STORE + '.seq ' + (descending ? 'DESC' : 'ASC'); + + db.transaction(function (tx) { + tx.executeSql(sql, [], function (tx, result) { + var last_seq = 0; + for (var i = 0, l = result.rows.length; i < l; i++) { + var res = result.rows.item(i); + var metadata = JSON.parse(res.metadata); + if (!utils.isLocalId(metadata.id)) { + if (last_seq < res.seq) { + last_seq = res.seq; + } + var doc = JSON.parse(res.data); + var change = opts.processChange(doc, metadata, opts); + change.seq = res.seq; + + results.push(change); + } + } + utils.processChanges(opts, results, last_seq); + }); + }); + } + + fetchChanges(); + }; + + api._close = function (callback) { + //WebSQL databases do not need to be closed + utils.call(callback, null); + }; + + api._getAttachment = function (attachment, opts, callback) { + var res; + var tx = opts.ctx; + var digest = attachment.digest; + var type = attachment.content_type; + var sql = 'SELECT body FROM ' + ATTACH_STORE + ' WHERE digest=?'; + tx.executeSql(sql, [digest], function (tx, result) { + var data = result.rows.item(0).body; + if (opts.encode) { + res = btoa(data); + } else { + res = utils.createBlob([data], {type: type}); + } + utils.call(callback, null, res); + }); + }; + + api._getRevisionTree = function (docId, callback) { + db.transaction(function (tx) { + var sql = 'SELECT json AS metadata FROM ' + DOC_STORE + ' WHERE id = ?'; + tx.executeSql(sql, [docId], function (tx, result) { + if (!result.rows.length) { + utils.call(callback, errors.MISSING_DOC); + } else { + var data = JSON.parse(result.rows.item(0).metadata); + utils.call(callback, null, data.rev_tree); + } + }); + }); + }; + + api._doCompaction = function (docId, rev_tree, revs, callback) { + db.transaction(function (tx) { + var sql = 'SELECT json AS metadata FROM ' + DOC_STORE + ' WHERE id = ?'; + tx.executeSql(sql, [docId], function (tx, result) { + if (!result.rows.length) { + return utils.call(callback); + } + var metadata = JSON.parse(result.rows.item(0).metadata); + metadata.rev_tree = rev_tree; + + var sql = 'DELETE FROM ' + BY_SEQ_STORE + ' WHERE doc_id_rev IN (' + + revs.map(function (rev) {return quote(docId + '::' + rev); }).join(',') + ')'; + + tx.executeSql(sql, [], function (tx, result) { + var sql = 'UPDATE ' + DOC_STORE + ' SET json = ? WHERE id = ?'; + + tx.executeSql(sql, [JSON.stringify(metadata), docId], function (tx, result) { + callback(); + }); + }); + }); + }); + }; + + return api; +} + +webSqlPouch.valid = function () { + if (typeof window !== 'undefined') { + if (window.navigator && window.navigator.sqlitePlugin && window.navigator.sqlitePlugin.openDatabase) { + return true; + } else if (window.sqlitePlugin && window.sqlitePlugin.openDatabase) { + return true; + } else if (window.openDatabase) { + return true; + } + } + return false; +}; + +webSqlPouch.destroy = function (name, opts, callback) { + var db = openDB(name, POUCH_VERSION, name, POUCH_SIZE); + db.transaction(function (tx) { + tx.executeSql('DROP TABLE IF EXISTS ' + DOC_STORE, []); + tx.executeSql('DROP TABLE IF EXISTS ' + BY_SEQ_STORE, []); + tx.executeSql('DROP TABLE IF EXISTS ' + ATTACH_STORE, []); + tx.executeSql('DROP TABLE IF EXISTS ' + META_STORE, []); + }, unknownError(callback), function () { + utils.call(callback, null); + }); +}; + +webSqlPouch.Changes = new utils.Changes(); + +module.exports = webSqlPouch; + +},{"../deps/errors":8,"../merge":13,"../utils":16}],5:[function(require,module,exports){ +"use strict"; + +var Adapter = require('./adapter')(PouchDB); +function PouchDB(name, opts, callback) { + + if (!(this instanceof PouchDB)) { + return new PouchDB(name, opts, callback); + } + + if (typeof opts === 'function' || typeof opts === 'undefined') { + callback = opts; + opts = {}; + } + + if (typeof name === 'object') { + opts = name; + name = undefined; + } + + if (typeof callback === 'undefined') { + callback = function () {}; + } + + var originalName = opts.name || name; + var backend = PouchDB.parseAdapter(originalName); + + opts.originalName = originalName; + opts.name = backend.name; + opts.adapter = opts.adapter || backend.adapter; + + if (!PouchDB.adapters[opts.adapter]) { + throw 'Adapter is missing'; + } + + if (!PouchDB.adapters[opts.adapter].valid()) { + throw 'Invalid Adapter'; + } + + var adapter = new Adapter(opts, function (err, db) { + if (err) { + if (callback) { + callback(err); + } + return; + } + + for (var plugin in PouchDB.plugins) { + // In future these will likely need to be async to allow the plugin + // to initialise + var pluginObj = PouchDB.plugins[plugin](db); + for (var api in pluginObj) { + // We let things like the http adapter use its own implementation + // as it shares a lot of code + if (!(api in db)) { + db[api] = pluginObj[api]; + } + } + } + db.taskqueue.ready(true); + db.taskqueue.execute(db); + callback(null, db); + }); + for (var j in adapter) { + this[j] = adapter[j]; + } + for (var plugin in PouchDB.plugins) { + // In future these will likely need to be async to allow the plugin + // to initialise + var pluginObj = PouchDB.plugins[plugin](this); + for (var api in pluginObj) { + // We let things like the http adapter use its own implementation + // as it shares a lot of code + if (!(api in this)) { + this[api] = pluginObj[api]; + } + } + } +} + +module.exports = PouchDB; +},{"./adapter":1}],6:[function(require,module,exports){ +var process=require("__browserify_process");"use strict"; + +var request = require('request'); +var extend = require('./extend.js'); +var createBlob = require('./blob.js'); +var errors = require('./errors'); + +function ajax(options, callback) { + + if (typeof options === "function") { + callback = options; + options = {}; + } + + function call(fun) { + /* jshint validthis: true */ + var args = Array.prototype.slice.call(arguments, 1); + if (typeof fun === typeof Function) { + fun.apply(this, args); + } + } + + var defaultOptions = { + method : "GET", + headers: {}, + json: true, + processData: true, + timeout: 10000 + }; + + options = extend(true, defaultOptions, options); + + function onSuccess(obj, resp, cb) { + if (!options.binary && !options.json && options.processData && + typeof obj !== 'string') { + obj = JSON.stringify(obj); + } else if (!options.binary && options.json && typeof obj === 'string') { + try { + obj = JSON.parse(obj); + } catch (e) { + // Probably a malformed JSON from server + call(cb, e); + return; + } + } + if (Array.isArray(obj)) { + obj = obj.map(function (v) { + var obj; + if (v.ok) { + return v; + } else if (v.error && v.error === 'conflict') { + obj = errors.REV_CONFLICT; + obj.id = v.id; + return obj; + } else if (v.missing) { + obj = errors.MISSING_DOC; + obj.missing = v.missing; + return obj; + } + }); + } + call(cb, null, obj, resp); + } + + function onError(err, cb) { + var errParsed, errObj, errType, key; + try { + errParsed = JSON.parse(err.responseText); + //would prefer not to have a try/catch clause + for (key in errors) { + if (errors[key].name === errParsed.error) { + errType = errors[key]; + break; + } + } + errType = errType || errors.UNKNOWN_ERROR; + errObj = errors.error(errType, errParsed.reason); + } catch (e) { + errObj = errors.error(errors.UNKNOWN_ERROR); + } + call(cb, errObj); + } + + if (process.browser && typeof XMLHttpRequest !== 'undefined') { + var timer, timedout = false; + var xhr = new XMLHttpRequest(); + + xhr.open(options.method, options.url); + xhr.withCredentials = true; + + if (options.json) { + options.headers.Accept = 'application/json'; + options.headers['Content-Type'] = options.headers['Content-Type'] || + 'application/json'; + if (options.body && options.processData && typeof options.body !== "string") { + options.body = JSON.stringify(options.body); + } + } + + if (options.binary) { + xhr.responseType = 'arraybuffer'; + } + + var createCookie = function (name, value, days) { + var expires = ""; + if (days) { + var date = new Date(); + date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)); + expires = "; expires=" + date.toGMTString(); + } + document.cookie = name + "=" + value + expires + "; path=/"; + }; + + for (var key in options.headers) { + if (key === 'Cookie') { + var cookie = options.headers[key].split('='); + createCookie(cookie[0], cookie[1], 10); + } else { + xhr.setRequestHeader(key, options.headers[key]); + } + } + + if (!("body" in options)) { + options.body = null; + } + + var abortReq = function () { + timedout = true; + xhr.abort(); + call(onError, xhr, callback); + }; + + xhr.onreadystatechange = function () { + if (xhr.readyState !== 4 || timedout) { + return; + } + clearTimeout(timer); + if (xhr.status >= 200 && xhr.status < 300) { + var data; + if (options.binary) { + data = createBlob([xhr.response || ''], { + type: xhr.getResponseHeader('Content-Type') + }); + } else { + data = xhr.responseText; + } + call(onSuccess, data, xhr, callback); + } else { + call(onError, xhr, callback); + } + }; + + if (options.timeout > 0) { + timer = setTimeout(abortReq, options.timeout); + xhr.upload.onprogress = xhr.onprogress = function () { + clearTimeout(timer); + timer = setTimeout(abortReq, options.timeout); + }; + } + xhr.send(options.body); + return {abort: abortReq}; + + } else { + + if (options.json) { + if (!options.binary) { + options.headers.Accept = 'application/json'; + } + options.headers['Content-Type'] = options.headers['Content-Type'] || + 'application/json'; + } + + if (options.binary) { + options.encoding = null; + options.json = false; + } + + if (!options.processData) { + options.json = false; + } + + return request(options, function (err, response, body) { + if (err) { + err.status = response ? response.statusCode : 400; + return call(onError, err, callback); + } + var error; + var content_type = response.headers['content-type']; + var data = (body || ''); + + // CouchDB doesn't always return the right content-type for JSON data, so + // we check for ^{ and }$ (ignoring leading/trailing whitespace) + if (!options.binary && (options.json || !options.processData) && + typeof data !== 'object' && + (/json/.test(content_type) || + (/^[\s]*\{/.test(data) && /\}[\s]*$/.test(data)))) { + data = JSON.parse(data); + } + + if (response.statusCode >= 200 && response.statusCode < 300) { + call(onSuccess, data, response, callback); + } + else { + if (options.binary) { + data = JSON.parse(data.toString()); + } + if (data.reason === 'missing') { + error = errors.MISSING_DOC; + } else if (data.reason === 'no_db_file') { + error = errors.error(errors.DB_MISSING, data.reason); + } else if (data.error === 'conflict') { + error = errors.REV_CONFLICT; + } else { + error = errors.error(errors.UNKNOWN_ERROR, data.reason, data.error); + } + error.status = response.statusCode; + call(callback, error); + } + }); + } +} + +module.exports = ajax; + +},{"./blob.js":7,"./errors":8,"./extend.js":9,"__browserify_process":19,"request":18}],7:[function(require,module,exports){ +"use strict"; + +//Abstracts constructing a Blob object, so it also works in older +//browsers that don't support the native Blob constructor. (i.e. +//old QtWebKit versions, at least). +function createBlob(parts, properties) { + parts = parts || []; + properties = properties || {}; + try { + return new Blob(parts, properties); + } catch (e) { + if (e.name !== "TypeError") { + throw e; + } + var BlobBuilder = window.BlobBuilder || window.MSBlobBuilder || window.MozBlobBuilder || window.WebKitBlobBuilder; + var builder = new BlobBuilder(); + for (var i = 0; i < parts.length; i += 1) { + builder.append(parts[i]); + } + return builder.getBlob(properties.type); + } +} + +module.exports = createBlob; + + +},{}],8:[function(require,module,exports){ +"use strict"; + +function PouchError(opts) { + this.status = opts.status; + this.name = opts.error; + this.message = opts.reason; + this.error = true; +} +PouchError.prototype = new Error(); + + +exports.MISSING_BULK_DOCS = new PouchError({ + status: 400, + error: 'bad_request', + reason: "Missing JSON list of 'docs'" +}); +exports.MISSING_DOC = new PouchError({ + status: 404, + error: 'not_found', + reason: 'missing' +}); +exports.REV_CONFLICT = new PouchError({ + status: 409, + error: 'conflict', + reason: 'Document update conflict' +}); +exports.INVALID_ID = new PouchError({ + status: 400, + error: 'invalid_id', + reason: '_id field must contain a string' +}); +exports.MISSING_ID = new PouchError({ + status: 412, + error: 'missing_id', + reason: '_id is required for puts' +}); +exports.RESERVED_ID = new PouchError({ + status: 400, + error: 'bad_request', + reason: 'Only reserved document ids may start with underscore.' +}); +exports.NOT_OPEN = new PouchError({ + status: 412, + error: 'precondition_failed', + reason: 'Database not open so cannot close' +}); +exports.UNKNOWN_ERROR = new PouchError({ + status: 500, + error: 'unknown_error', + reason: 'Database encountered an unknown error' +}); +exports.BAD_ARG = new PouchError({ + status: 500, + error: 'badarg', + reason: 'Some query argument is invalid' +}); +exports.INVALID_REQUEST = new PouchError({ + status: 400, + error: 'invalid_request', + reason: 'Request was invalid' +}); +exports.QUERY_PARSE_ERROR = new PouchError({ + status: 400, + error: 'query_parse_error', + reason: 'Some query parameter is invalid' +}); +exports.DOC_VALIDATION = new PouchError({ + status: 500, + error: 'doc_validation', + reason: 'Bad special document member' +}); +exports.BAD_REQUEST = new PouchError({ + status: 400, + error: 'bad_request', + reason: 'Something wrong with the request' +}); +exports.NOT_AN_OBJECT = new PouchError({ + status: 400, + error: 'bad_request', + reason: 'Document must be a JSON object' +}); +exports.DB_MISSING = new PouchError({ + status: 404, + error: 'not_found', + reason: 'Database not found' +}); +exports.IDB_ERROR = new PouchError({ + status: 500, + error: 'indexed_db_went_bad', + reason: 'unknown' +}); +exports.WSQ_ERROR = new PouchError({ + status: 500, + error: 'web_sql_went_bad', + reason: 'unknown' +}); +exports.LDB_ERROR = new PouchError({ + status: 500, + error: 'levelDB_went_went_bad', + reason: 'unknown' +}); +exports.error = function (error, reason, name) { + function CustomPouchError(msg) { + this.message = reason; + if (name) { + this.name = name; + } + } + CustomPouchError.prototype = error; + return new CustomPouchError(reason); +}; +},{}],9:[function(require,module,exports){ +"use strict"; + +// Extends method +// (taken from http://code.jquery.com/jquery-1.9.0.js) +// Populate the class2type map +var class2type = {}; + +var types = ["Boolean", "Number", "String", "Function", "Array", "Date", "RegExp", "Object", "Error"]; +for (var i = 0; i < types.length; i++) { + var typename = types[i]; + class2type["[object " + typename + "]"] = typename.toLowerCase(); +} + +var core_toString = class2type.toString; +var core_hasOwn = class2type.hasOwnProperty; + +function type(obj) { + if (obj === null) { + return String(obj); + } + return typeof obj === "object" || typeof obj === "function" ? + class2type[core_toString.call(obj)] || "object" : + typeof obj; +} + +function isWindow(obj) { + return obj !== null && obj === obj.window; +} + +function isPlainObject(obj) { + // Must be an Object. + // Because of IE, we also have to check the presence of the constructor property. + // Make sure that DOM nodes and window objects don't pass through, as well + if (!obj || type(obj) !== "object" || obj.nodeType || isWindow(obj)) { + return false; + } + + try { + // Not own constructor property must be Object + if (obj.constructor && + !core_hasOwn.call(obj, "constructor") && + !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf")) { + return false; + } + } catch ( e ) { + // IE8,9 Will throw exceptions on certain host objects #9897 + return false; + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + var key; + for (key in obj) {} + + return key === undefined || core_hasOwn.call(obj, key); +} + + +function isFunction(obj) { + return type(obj) === "function"; +} + +var isArray = Array.isArray || function (obj) { + return type(obj) === "array"; +}; + +function extend() { + var options, name, src, copy, copyIsArray, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if (typeof target === "boolean") { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if (typeof target !== "object" && !isFunction(target)) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if (length === i) { + /* jshint validthis: true */ + target = this; + --i; + } + + for (; i < length; i++) { + // Only deal with non-null/undefined values + if ((options = arguments[i]) != null) { + // Extend the base object + for (name in options) { + src = target[name]; + copy = options[name]; + + // Prevent never-ending loop + if (target === copy) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if (deep && copy && (isPlainObject(copy) || (copyIsArray = isArray(copy)))) { + if (copyIsArray) { + copyIsArray = false; + clone = src && isArray(src) ? src : []; + + } else { + clone = src && isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[name] = extend(deep, clone, copy); + + // Don't bring in undefined values + } else if (copy !== undefined) { + if (!(isArray(options) && isFunction(copy))) { + target[name] = copy; + } + } + } + } + } + + // Return the modified object + return target; +} + + +module.exports = extend; + + +},{}],10:[function(require,module,exports){ +var process=require("__browserify_process");"use strict"; + +/** +* +* MD5 (Message-Digest Algorithm) +* +* For original source see http://www.webtoolkit.info/ +* Download: 15.02.2009 from http://www.webtoolkit.info/javascript-md5.html +* +* Licensed under CC-BY 2.0 License +* (http://creativecommons.org/licenses/by/2.0/uk/) +* +**/ +var crypto = require('crypto'); + +exports.MD5 = function (string) { + if (!process.browser) { + return crypto.createHash('md5').update(string).digest('hex'); + } + function rotateLeft(lValue, iShiftBits) { + return (lValue<>>(32 - iShiftBits)); + } + + function addUnsigned(lX, lY) { + var lX4, lY4, lX8, lY8, lResult; + lX8 = (lX & 0x80000000); + lY8 = (lY & 0x80000000); + lX4 = (lX & 0x40000000); + lY4 = (lY & 0x40000000); + lResult = (lX & 0x3FFFFFFF) + (lY & 0x3FFFFFFF); + if (lX4 & lY4) { + return (lResult ^ 0x80000000 ^ lX8 ^ lY8); + } + if (lX4 | lY4) { + if (lResult & 0x40000000) { + return (lResult ^ 0xC0000000 ^ lX8 ^ lY8); + } else { + return (lResult ^ 0x40000000 ^ lX8 ^ lY8); + } + } else { + return (lResult ^ lX8 ^ lY8); + } + } + + function f(x, y, z) { return (x & y) | ((~x) & z); } + function g(x, y, z) { return (x & z) | (y & (~z)); } + function h(x, y, z) { return (x ^ y ^ z); } + function i(x, y, z) { return (y ^ (x | (~z))); } + + function ff(a, b, c, d, x, s, ac) { + a = addUnsigned(a, addUnsigned(addUnsigned(f(b, c, d), x), ac)); + return addUnsigned(rotateLeft(a, s), b); + } + + function gg(a, b, c, d, x, s, ac) { + a = addUnsigned(a, addUnsigned(addUnsigned(g(b, c, d), x), ac)); + return addUnsigned(rotateLeft(a, s), b); + } + + function hh(a, b, c, d, x, s, ac) { + a = addUnsigned(a, addUnsigned(addUnsigned(h(b, c, d), x), ac)); + return addUnsigned(rotateLeft(a, s), b); + } + + function ii(a, b, c, d, x, s, ac) { + a = addUnsigned(a, addUnsigned(addUnsigned(i(b, c, d), x), ac)); + return addUnsigned(rotateLeft(a, s), b); + } + + function convertToWordArray(string) { + var lWordCount; + var lMessageLength = string.length; + var lNumberOfWords_temp1 = lMessageLength + 8; + var lNumberOfWords_temp2 = (lNumberOfWords_temp1 - (lNumberOfWords_temp1 % 64)) / 64; + var lNumberOfWords = (lNumberOfWords_temp2 + 1) * 16; + var lWordArray = new Array(lNumberOfWords - 1); + var lBytePosition = 0; + var lByteCount = 0; + while (lByteCount < lMessageLength) { + lWordCount = (lByteCount - (lByteCount % 4)) / 4; + lBytePosition = (lByteCount % 4) * 8; + lWordArray[lWordCount] = (lWordArray[lWordCount] | (string.charCodeAt(lByteCount)<>>29; + return lWordArray; + } + + function wordToHex(lValue) { + var wordToHexValue = "", wordToHexValue_temp = "", lByte, lCount; + for (lCount = 0;lCount <= 3;lCount++) { + lByte = (lValue>>>(lCount * 8)) & 255; + wordToHexValue_temp = "0" + lByte.toString(16); + wordToHexValue = wordToHexValue + wordToHexValue_temp.substr(wordToHexValue_temp.length - 2, 2); + } + return wordToHexValue; + } + + //** function Utf8Encode(string) removed. Aready defined in pidcrypt_utils.js + + var x = []; + var k, AA, BB, CC, DD, a, b, c, d; + var S11 = 7, S12 = 12, S13 = 17, S14 = 22; + var S21 = 5, S22 = 9, S23 = 14, S24 = 20; + var S31 = 4, S32 = 11, S33 = 16, S34 = 23; + var S41 = 6, S42 = 10, S43 = 15, S44 = 21; + + // string = Utf8Encode(string); #function call removed + + x = convertToWordArray(string); + + a = 0x67452301; + b = 0xEFCDAB89; + c = 0x98BADCFE; + d = 0x10325476; + + for (k = 0;k < x.length;k += 16) { + AA = a; + BB = b; + CC = c; + DD = d; + a = ff(a, b, c, d, x[k + 0], S11, 0xD76AA478); + d = ff(d, a, b, c, x[k + 1], S12, 0xE8C7B756); + c = ff(c, d, a, b, x[k + 2], S13, 0x242070DB); + b = ff(b, c, d, a, x[k + 3], S14, 0xC1BDCEEE); + a = ff(a, b, c, d, x[k + 4], S11, 0xF57C0FAF); + d = ff(d, a, b, c, x[k + 5], S12, 0x4787C62A); + c = ff(c, d, a, b, x[k + 6], S13, 0xA8304613); + b = ff(b, c, d, a, x[k + 7], S14, 0xFD469501); + a = ff(a, b, c, d, x[k + 8], S11, 0x698098D8); + d = ff(d, a, b, c, x[k + 9], S12, 0x8B44F7AF); + c = ff(c, d, a, b, x[k + 10], S13, 0xFFFF5BB1); + b = ff(b, c, d, a, x[k + 11], S14, 0x895CD7BE); + a = ff(a, b, c, d, x[k + 12], S11, 0x6B901122); + d = ff(d, a, b, c, x[k + 13], S12, 0xFD987193); + c = ff(c, d, a, b, x[k + 14], S13, 0xA679438E); + b = ff(b, c, d, a, x[k + 15], S14, 0x49B40821); + a = gg(a, b, c, d, x[k + 1], S21, 0xF61E2562); + d = gg(d, a, b, c, x[k + 6], S22, 0xC040B340); + c = gg(c, d, a, b, x[k + 11], S23, 0x265E5A51); + b = gg(b, c, d, a, x[k + 0], S24, 0xE9B6C7AA); + a = gg(a, b, c, d, x[k + 5], S21, 0xD62F105D); + d = gg(d, a, b, c, x[k + 10], S22, 0x2441453); + c = gg(c, d, a, b, x[k + 15], S23, 0xD8A1E681); + b = gg(b, c, d, a, x[k + 4], S24, 0xE7D3FBC8); + a = gg(a, b, c, d, x[k + 9], S21, 0x21E1CDE6); + d = gg(d, a, b, c, x[k + 14], S22, 0xC33707D6); + c = gg(c, d, a, b, x[k + 3], S23, 0xF4D50D87); + b = gg(b, c, d, a, x[k + 8], S24, 0x455A14ED); + a = gg(a, b, c, d, x[k + 13], S21, 0xA9E3E905); + d = gg(d, a, b, c, x[k + 2], S22, 0xFCEFA3F8); + c = gg(c, d, a, b, x[k + 7], S23, 0x676F02D9); + b = gg(b, c, d, a, x[k + 12], S24, 0x8D2A4C8A); + a = hh(a, b, c, d, x[k + 5], S31, 0xFFFA3942); + d = hh(d, a, b, c, x[k + 8], S32, 0x8771F681); + c = hh(c, d, a, b, x[k + 11], S33, 0x6D9D6122); + b = hh(b, c, d, a, x[k + 14], S34, 0xFDE5380C); + a = hh(a, b, c, d, x[k + 1], S31, 0xA4BEEA44); + d = hh(d, a, b, c, x[k + 4], S32, 0x4BDECFA9); + c = hh(c, d, a, b, x[k + 7], S33, 0xF6BB4B60); + b = hh(b, c, d, a, x[k + 10], S34, 0xBEBFBC70); + a = hh(a, b, c, d, x[k + 13], S31, 0x289B7EC6); + d = hh(d, a, b, c, x[k + 0], S32, 0xEAA127FA); + c = hh(c, d, a, b, x[k + 3], S33, 0xD4EF3085); + b = hh(b, c, d, a, x[k + 6], S34, 0x4881D05); + a = hh(a, b, c, d, x[k + 9], S31, 0xD9D4D039); + d = hh(d, a, b, c, x[k + 12], S32, 0xE6DB99E5); + c = hh(c, d, a, b, x[k + 15], S33, 0x1FA27CF8); + b = hh(b, c, d, a, x[k + 2], S34, 0xC4AC5665); + a = ii(a, b, c, d, x[k + 0], S41, 0xF4292244); + d = ii(d, a, b, c, x[k + 7], S42, 0x432AFF97); + c = ii(c, d, a, b, x[k + 14], S43, 0xAB9423A7); + b = ii(b, c, d, a, x[k + 5], S44, 0xFC93A039); + a = ii(a, b, c, d, x[k + 12], S41, 0x655B59C3); + d = ii(d, a, b, c, x[k + 3], S42, 0x8F0CCC92); + c = ii(c, d, a, b, x[k + 10], S43, 0xFFEFF47D); + b = ii(b, c, d, a, x[k + 1], S44, 0x85845DD1); + a = ii(a, b, c, d, x[k + 8], S41, 0x6FA87E4F); + d = ii(d, a, b, c, x[k + 15], S42, 0xFE2CE6E0); + c = ii(c, d, a, b, x[k + 6], S43, 0xA3014314); + b = ii(b, c, d, a, x[k + 13], S44, 0x4E0811A1); + a = ii(a, b, c, d, x[k + 4], S41, 0xF7537E82); + d = ii(d, a, b, c, x[k + 11], S42, 0xBD3AF235); + c = ii(c, d, a, b, x[k + 2], S43, 0x2AD7D2BB); + b = ii(b, c, d, a, x[k + 9], S44, 0xEB86D391); + a = addUnsigned(a, AA); + b = addUnsigned(b, BB); + c = addUnsigned(c, CC); + d = addUnsigned(d, DD); + } + var temp = wordToHex(a) + wordToHex(b) + wordToHex(c) + wordToHex(d); + return temp.toLowerCase(); +}; +},{"__browserify_process":19,"crypto":18}],11:[function(require,module,exports){ +"use strict"; + +// BEGIN Math.uuid.js + +/*! +Math.uuid.js (v1.4) +http://www.broofa.com +mailto:robert@broofa.com + +Copyright (c) 2010 Robert Kieffer +Dual licensed under the MIT and GPL licenses. +*/ + +/* + * Generate a random uuid. + * + * USAGE: Math.uuid(length, radix) + * length - the desired number of characters + * radix - the number of allowable values for each character. + * + * EXAMPLES: + * // No arguments - returns RFC4122, version 4 ID + * >>> Math.uuid() + * "92329D39-6F5C-4520-ABFC-AAB64544E172" + * + * // One argument - returns ID of the specified length + * >>> Math.uuid(15) // 15 character ID (default base=62) + * "VcydxgltxrVZSTV" + * + * // Two arguments - returns ID of the specified length, and radix. (Radix must be <= 62) + * >>> Math.uuid(8, 2) // 8 character ID (base=2) + * "01001010" + * >>> Math.uuid(8, 10) // 8 character ID (base=10) + * "47473046" + * >>> Math.uuid(8, 16) // 8 character ID (base=16) + * "098F4D35" + */ + + +function uuid(len, radix) { + var chars = uuid.CHARS; + var uuidInner = []; + var i; + + radix = radix || chars.length; + + if (len) { + // Compact form + for (i = 0; i < len; i++) { + uuidInner[i] = chars[0 | Math.random() * radix]; + } + } else { + // rfc4122, version 4 form + var r; + + // rfc4122 requires these characters + uuidInner[8] = uuidInner[13] = uuidInner[18] = uuidInner[23] = '-'; + uuidInner[14] = '4'; + + // Fill in random data. At i==19 set the high bits of clock sequence as + // per rfc4122, sec. 4.1.5 + for (i = 0; i < 36; i++) { + if (!uuidInner[i]) { + r = 0 | Math.random() * 16; + uuidInner[i] = chars[(i === 19) ? (r & 0x3) | 0x8 : r]; + } + } + } + + return uuidInner.join(''); +} + +uuid.CHARS = ( + '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ' + + 'abcdefghijklmnopqrstuvwxyz' +).split(''); + +module.exports = uuid; + + +},{}],12:[function(require,module,exports){ +var process=require("__browserify_process");"use strict"; + +var PouchDB = require('./setup'); + +module.exports = PouchDB; + +PouchDB.ajax = require('./deps/ajax'); +PouchDB.extend = require('./deps/extend'); +PouchDB.utils = require('./utils'); +PouchDB.Errors = require('./deps/errors'); +PouchDB.replicate = require('./replicate').replicate; +PouchDB.version = require('./version'); +var httpAdapter = require('./adapters/http'); +PouchDB.adapter('http', httpAdapter); +PouchDB.adapter('https', httpAdapter); + +PouchDB.adapter('idb', require('./adapters/idb')); +PouchDB.adapter('websql', require('./adapters/websql')); +PouchDB.plugin('mapreduce', require('pouchdb-mapreduce')); + +if (!process.browser) { + var ldbAdapter = require('./adapters/leveldb'); + PouchDB.adapter('ldb', ldbAdapter); + PouchDB.adapter('leveldb', ldbAdapter); +} + +},{"./adapters/http":2,"./adapters/idb":3,"./adapters/leveldb":18,"./adapters/websql":4,"./deps/ajax":6,"./deps/errors":8,"./deps/extend":9,"./replicate":14,"./setup":15,"./utils":16,"./version":17,"__browserify_process":19,"pouchdb-mapreduce":20}],13:[function(require,module,exports){ +'use strict'; + +var extend = require('./deps/extend'); + + +// for a better overview of what this is doing, read: +// https://github.com/apache/couchdb/blob/master/src/couchdb/couch_key_tree.erl +// +// But for a quick intro, CouchDB uses a revision tree to store a documents +// history, A -> B -> C, when a document has conflicts, that is a branch in the +// tree, A -> (B1 | B2 -> C), We store these as a nested array in the format +// +// KeyTree = [Path ... ] +// Path = {pos: position_from_root, ids: Tree} +// Tree = [Key, Opts, [Tree, ...]], in particular single node: [Key, []] + +// Turn a path as a flat array into a tree with a single branch +function pathToTree(path) { + var doc = path.shift(); + var root = [doc.id, doc.opts, []]; + var leaf = root; + var nleaf; + + while (path.length) { + doc = path.shift(); + nleaf = [doc.id, doc.opts, []]; + leaf[2].push(nleaf); + leaf = nleaf; + } + return root; +} + +// Merge two trees together +// The roots of tree1 and tree2 must be the same revision +function mergeTree(in_tree1, in_tree2) { + var queue = [{tree1: in_tree1, tree2: in_tree2}]; + var conflicts = false; + while (queue.length > 0) { + var item = queue.pop(); + var tree1 = item.tree1; + var tree2 = item.tree2; + + if (tree1[1].status || tree2[1].status) { + tree1[1].status = (tree1[1].status === 'available' || + tree2[1].status === 'available') ? 'available' : 'missing'; + } + + for (var i = 0; i < tree2[2].length; i++) { + if (!tree1[2][0]) { + conflicts = 'new_leaf'; + tree1[2][0] = tree2[2][i]; + continue; + } + + var merged = false; + for (var j = 0; j < tree1[2].length; j++) { + if (tree1[2][j][0] === tree2[2][i][0]) { + queue.push({tree1: tree1[2][j], tree2: tree2[2][i]}); + merged = true; + } + } + if (!merged) { + conflicts = 'new_branch'; + tree1[2].push(tree2[2][i]); + tree1[2].sort(); + } + } + } + return {conflicts: conflicts, tree: in_tree1}; +} + +function doMerge(tree, path, dontExpand) { + var restree = []; + var conflicts = false; + var merged = false; + var res, branch; + + if (!tree.length) { + return {tree: [path], conflicts: 'new_leaf'}; + } + + tree.forEach(function (branch) { + if (branch.pos === path.pos && branch.ids[0] === path.ids[0]) { + // Paths start at the same position and have the same root, so they need + // merged + res = mergeTree(branch.ids, path.ids); + restree.push({pos: branch.pos, ids: res.tree}); + conflicts = conflicts || res.conflicts; + merged = true; + } else if (dontExpand !== true) { + // The paths start at a different position, take the earliest path and + // traverse up until it as at the same point from root as the path we want to + // merge. If the keys match we return the longer path with the other merged + // After stemming we dont want to expand the trees + + var t1 = branch.pos < path.pos ? branch : path; + var t2 = branch.pos < path.pos ? path : branch; + var diff = t2.pos - t1.pos; + + var candidateParents = []; + + var trees = []; + trees.push({ids: t1.ids, diff: diff, parent: null, parentIdx: null}); + while (trees.length > 0) { + var item = trees.pop(); + if (item.diff === 0) { + if (item.ids[0] === t2.ids[0]) { + candidateParents.push(item); + } + continue; + } + if (!item.ids) { + continue; + } + /*jshint loopfunc:true */ + item.ids[2].forEach(function (el, idx) { + trees.push({ids: el, diff: item.diff - 1, parent: item.ids, parentIdx: idx}); + }); + } + + var el = candidateParents[0]; + + if (!el) { + restree.push(branch); + } else { + res = mergeTree(el.ids, t2.ids); + el.parent[2][el.parentIdx] = res.tree; + restree.push({pos: t1.pos, ids: t1.ids}); + conflicts = conflicts || res.conflicts; + merged = true; + } + } else { + restree.push(branch); + } + }); + + // We didnt find + if (!merged) { + restree.push(path); + } + + restree.sort(function (a, b) { + return a.pos - b.pos; + }); + + return { + tree: restree, + conflicts: conflicts || 'internal_node' + }; +} + +// To ensure we dont grow the revision tree infinitely, we stem old revisions +function stem(tree, depth) { + // First we break out the tree into a complete list of root to leaf paths, + // we cut off the start of the path and generate a new set of flat trees + var stemmedPaths = PouchMerge.rootToLeaf(tree).map(function (path) { + var stemmed = path.ids.slice(-depth); + return { + pos: path.pos + (path.ids.length - stemmed.length), + ids: pathToTree(stemmed) + }; + }); + // Then we remerge all those flat trees together, ensuring that we dont + // connect trees that would go beyond the depth limit + return stemmedPaths.reduce(function (prev, current, i, arr) { + return doMerge(prev, current, true).tree; + }, [stemmedPaths.shift()]); +} + +var PouchMerge = {}; + +PouchMerge.merge = function (tree, path, depth) { + // Ugh, nicer way to not modify arguments in place? + tree = extend(true, [], tree); + path = extend(true, {}, path); + var newTree = doMerge(tree, path); + return { + tree: stem(newTree.tree, depth), + conflicts: newTree.conflicts + }; +}; + +// We fetch all leafs of the revision tree, and sort them based on tree length +// and whether they were deleted, undeleted documents with the longest revision +// tree (most edits) win +// The final sort algorithm is slightly documented in a sidebar here: +// http://guide.couchdb.org/draft/conflicts.html +PouchMerge.winningRev = function (metadata) { + var leafs = []; + PouchMerge.traverseRevTree(metadata.rev_tree, + function (isLeaf, pos, id, something, opts) { + if (isLeaf) { + leafs.push({pos: pos, id: id, deleted: !!opts.deleted}); + } + }); + leafs.sort(function (a, b) { + if (a.deleted !== b.deleted) { + return a.deleted > b.deleted ? 1 : -1; + } + if (a.pos !== b.pos) { + return b.pos - a.pos; + } + return a.id < b.id ? 1 : -1; + }); + + return leafs[0].pos + '-' + leafs[0].id; +}; + +// Pretty much all below can be combined into a higher order function to +// traverse revisions +// The return value from the callback will be passed as context to all +// children of that node +PouchMerge.traverseRevTree = function (revs, callback) { + var toVisit = []; + + revs.forEach(function (tree) { + toVisit.push({pos: tree.pos, ids: tree.ids}); + }); + while (toVisit.length > 0) { + var node = toVisit.pop(); + var pos = node.pos; + var tree = node.ids; + var newCtx = callback(tree[2].length === 0, pos, tree[0], node.ctx, tree[1]); + /*jshint loopfunc: true */ + tree[2].forEach(function (branch) { + toVisit.push({pos: pos + 1, ids: branch, ctx: newCtx}); + }); + } +}; + +PouchMerge.collectLeaves = function (revs) { + var leaves = []; + PouchMerge.traverseRevTree(revs, function (isLeaf, pos, id, acc, opts) { + if (isLeaf) { + leaves.unshift({rev: pos + "-" + id, pos: pos, opts: opts}); + } + }); + leaves.sort(function (a, b) { + return b.pos - a.pos; + }); + leaves.map(function (leaf) { delete leaf.pos; }); + return leaves; +}; + +// returns revs of all conflicts that is leaves such that +// 1. are not deleted and +// 2. are different than winning revision +PouchMerge.collectConflicts = function (metadata) { + var win = PouchMerge.winningRev(metadata); + var leaves = PouchMerge.collectLeaves(metadata.rev_tree); + var conflicts = []; + leaves.forEach(function (leaf) { + if (leaf.rev !== win && !leaf.opts.deleted) { + conflicts.push(leaf.rev); + } + }); + return conflicts; +}; + +PouchMerge.rootToLeaf = function (tree) { + var paths = []; + PouchMerge.traverseRevTree(tree, function (isLeaf, pos, id, history, opts) { + history = history ? history.slice(0) : []; + history.push({id: id, opts: opts}); + if (isLeaf) { + var rootPos = pos + 1 - history.length; + paths.unshift({pos: rootPos, ids: history}); + } + return history; + }); + return paths; +}; + + +module.exports = PouchMerge; + +},{"./deps/extend":9}],14:[function(require,module,exports){ +var process=require("__browserify_process");'use strict'; + +var PouchUtils = require('./utils'); +var Pouch = require('./index'); + +// We create a basic promise so the caller can cancel the replication possibly +// before we have actually started listening to changes etc +function Promise() { + var that = this; + this.cancelled = false; + this.cancel = function () { + that.cancelled = true; + }; +} + +// The RequestManager ensures that only one database request is active at +// at time, it ensures we dont max out simultaneous HTTP requests and makes +// the replication process easier to reason about + +function RequestManager(promise) { + var queue = []; + var api = {}; + var processing = false; + + // Add a new request to the queue, if we arent currently processing anything + // then process it immediately + api.enqueue = function (fun, args) { + queue.push({fun: fun, args: args}); + if (!processing) { + api.process(); + } + }; + + // Process the next request + api.process = function () { + if (processing || !queue.length || promise.cancelled) { + return; + } + processing = true; + var task = queue.shift(); + process.nextTick(function () { + task.fun.apply(null, task.args); + }); + }; + + // We need to be notified whenever a request is complete to process + // the next request + api.notifyRequestComplete = function () { + processing = false; + api.process(); + }; + + return api; +} + +// TODO: check CouchDB's replication id generation, generate a unique id particular +// to this replication + +function genReplicationId(src, target, opts) { + var filterFun = opts.filter ? opts.filter.toString() : ''; + return '_local/' + PouchUtils.Crypto.MD5(src.id() + target.id() + filterFun); +} + +// A checkpoint lets us restart replications from when they were last cancelled + +function fetchCheckpoint(src, target, id, callback) { + target.get(id, function (err, targetDoc) { + if (err && err.status === 404) { + callback(null, 0); + } else if (err) { + callback(err); + } else { + src.get(id, function (err, sourceDoc) { + if (err && err.status === 404 || (!err && (targetDoc.last_seq !== sourceDoc.last_seq))) { + callback(null, 0); + } else if (err) { + callback(err); + } else { + callback(null, sourceDoc.last_seq); + } + }); + } + }); +} + +function writeCheckpoint(src, target, id, checkpoint, callback) { + function updateCheckpoint(db, callback) { + db.get(id, function (err, doc) { + if (err && err.status === 404) { + doc = {_id: id}; + } + doc.last_seq = checkpoint; + db.put(doc, callback); + }); + } + updateCheckpoint(target, function (err, doc) { + updateCheckpoint(src, function (err, doc) { + callback(); + }); + }); +} + +function replicate(src, target, opts, promise) { + + var requests = new RequestManager(promise); + var writeQueue = []; + var repId = genReplicationId(src, target, opts); + var results = []; + var completed = false; + var pendingRevs = 0; + var last_seq = 0; + var continuous = opts.continuous || false; + var doc_ids = opts.doc_ids; + var result = { + ok: true, + start_time: new Date(), + docs_read: 0, + docs_written: 0 + }; + + function docsWritten(err, res, len) { + if (opts.onChange) { + for (var i = 0; i < len; i++) { + /*jshint validthis:true */ + opts.onChange.apply(this, [result]); + } + } + pendingRevs -= len; + result.docs_written += len; + + writeCheckpoint(src, target, repId, last_seq, function (err, res) { + requests.notifyRequestComplete(); + isCompleted(); + }); + } + + function writeDocs() { + if (!writeQueue.length) { + return requests.notifyRequestComplete(); + } + var len = writeQueue.length; + target.bulkDocs({docs: writeQueue}, {new_edits: false}, function (err, res) { + docsWritten(err, res, len); + }); + writeQueue = []; + } + + function eachRev(id, rev) { + src.get(id, {revs: true, rev: rev, attachments: true}, function (err, doc) { + result.docs_read++; + requests.notifyRequestComplete(); + writeQueue.push(doc); + requests.enqueue(writeDocs); + }); + } + + function onRevsDiff(diffCounts) { + return function (err, diffs) { + requests.notifyRequestComplete(); + if (err) { + if (continuous) { + promise.cancel(); + } + PouchUtils.call(opts.complete, err, null); + return; + } + + // We already have all diffs passed in `diffCounts` + if (Object.keys(diffs).length === 0) { + for (var docid in diffCounts) { + pendingRevs -= diffCounts[docid]; + } + isCompleted(); + return; + } + + var _enqueuer = function (rev) { + requests.enqueue(eachRev, [id, rev]); + }; + + for (var id in diffs) { + var diffsAlreadyHere = diffCounts[id] - diffs[id].missing.length; + pendingRevs -= diffsAlreadyHere; + diffs[id].missing.forEach(_enqueuer); + } + }; + } + + function fetchRevsDiff(diff, diffCounts) { + target.revsDiff(diff, onRevsDiff(diffCounts)); + } + + function onChange(change) { + last_seq = change.seq; + results.push(change); + var diff = {}; + diff[change.id] = change.changes.map(function (x) { return x.rev; }); + var counts = {}; + counts[change.id] = change.changes.length; + pendingRevs += change.changes.length; + requests.enqueue(fetchRevsDiff, [diff, counts]); + } + + function complete() { + completed = true; + isCompleted(); + } + + function isCompleted() { + if (completed && pendingRevs === 0) { + result.end_time = new Date(); + PouchUtils.call(opts.complete, null, result); + } + } + + fetchCheckpoint(src, target, repId, function (err, checkpoint) { + + if (err) { + return PouchUtils.call(opts.complete, err); + } + + last_seq = checkpoint; + + // Was the replication cancelled by the caller before it had a chance + // to start. Shouldnt we be calling complete? + if (promise.cancelled) { + return; + } + + var repOpts = { + continuous: continuous, + since: last_seq, + style: 'all_docs', + onChange: onChange, + complete: complete, + doc_ids: doc_ids + }; + + if (opts.filter) { + repOpts.filter = opts.filter; + } + + if (opts.query_params) { + repOpts.query_params = opts.query_params; + } + + var changes = src.changes(repOpts); + + if (opts.continuous) { + var cancel = promise.cancel; + promise.cancel = function () { + cancel(); + changes.cancel(); + }; + } + }); + +} + +function toPouch(db, callback) { + if (typeof db === 'string') { + return new Pouch(db, callback); + } + callback(null, db); +} + +exports.replicate = function (src, target, opts, callback) { + if (opts instanceof Function) { + callback = opts; + opts = {}; + } + if (opts === undefined) { + opts = {}; + } + if (!opts.complete) { + opts.complete = callback; + } + var replicateRet = new Promise(); + toPouch(src, function (err, src) { + if (err) { + return PouchUtils.call(callback, err); + } + toPouch(target, function (err, target) { + if (err) { + return PouchUtils.call(callback, err); + } + if (opts.server) { + if (typeof src.replicateOnServer !== 'function') { + return PouchUtils.call(callback, { error: 'Server replication not supported for ' + src.type() + ' adapter' }); + } + if (src.type() !== target.type()) { + return PouchUtils.call(callback, { error: 'Server replication for different adapter types (' + src.type() + ' and ' + target.type() + ') is not supported' }); + } + src.replicateOnServer(target, opts, replicateRet); + } else { + replicate(src, target, opts, replicateRet); + } + }); + }); + return replicateRet; +}; + +},{"./index":12,"./utils":16,"__browserify_process":19}],15:[function(require,module,exports){ +"use strict"; + +var PouchDB = require("./constructor"); + +PouchDB.adapters = {}; +PouchDB.plugins = {}; + +PouchDB.prefix = '_pouch_'; + +PouchDB.parseAdapter = function (name) { + var match = name.match(/([a-z\-]*):\/\/(.*)/); + var adapter; + if (match) { + // the http adapter expects the fully qualified name + name = /http(s?)/.test(match[1]) ? match[1] + '://' + match[2] : match[2]; + adapter = match[1]; + if (!PouchDB.adapters[adapter].valid()) { + throw 'Invalid adapter'; + } + return {name: name, adapter: match[1]}; + } + + var preferredAdapters = ['idb', 'leveldb', 'websql']; + for (var i = 0; i < preferredAdapters.length; ++i) { + if (preferredAdapters[i] in PouchDB.adapters) { + adapter = PouchDB.adapters[preferredAdapters[i]]; + var use_prefix = 'use_prefix' in adapter ? adapter.use_prefix : true; + + return { + name: use_prefix ? PouchDB.prefix + name : name, + adapter: preferredAdapters[i] + }; + } + } + + throw 'No valid adapter found'; +}; + +PouchDB.destroy = function (name, opts, callback) { + if (typeof opts === 'function' || typeof opts === 'undefined') { + callback = opts; + opts = {}; + } + + if (typeof name === 'object') { + opts = name; + name = undefined; + } + + if (typeof callback === 'undefined') { + callback = function () {}; + } + var backend = PouchDB.parseAdapter(opts.name || name); + var dbName = backend.name; + + var cb = function (err, response) { + if (err) { + callback(err); + return; + } + + for (var plugin in PouchDB.plugins) { + PouchDB.plugins[plugin]._delete(dbName); + } + //console.log(dbName + ': Delete Database'); + + // call destroy method of the particular adaptor + PouchDB.adapters[backend.adapter].destroy(dbName, opts, callback); + }; + + // remove PouchDB from allDBs + PouchDB.removeFromAllDbs(backend, cb); +}; + +PouchDB.removeFromAllDbs = function (opts, callback) { + // Only execute function if flag is enabled + if (!PouchDB.enableAllDbs) { + callback(); + return; + } + + // skip http and https adaptors for allDbs + var adapter = opts.adapter; + if (adapter === "http" || adapter === "https") { + callback(); + return; + } + + // remove db from PouchDB.ALL_DBS + new PouchDB(PouchDB.allDBName(opts.adapter), function (err, db) { + if (err) { + // don't fail when allDbs fail + //console.error(err); + callback(); + return; + } + // check if db has been registered in PouchDB.ALL_DBS + var dbname = PouchDB.dbName(opts.adapter, opts.name); + db.get(dbname, function (err, doc) { + if (err) { + callback(); + } else { + db.remove(doc, function (err, response) { + if (err) { + //console.error(err); + } + callback(); + }); + } + }); + }); + +}; + +PouchDB.adapter = function (id, obj) { + if (obj.valid()) { + PouchDB.adapters[id] = obj; + } +}; + +PouchDB.plugin = function (id, obj) { + PouchDB.plugins[id] = obj; +}; + +// flag to toggle allDbs (off by default) +PouchDB.enableAllDbs = false; + +// name of database used to keep track of databases +PouchDB.ALL_DBS = "_allDbs"; +PouchDB.dbName = function (adapter, name) { + return [adapter, "-", name].join(''); +}; +PouchDB.realDBName = function (adapter, name) { + return [adapter, "://", name].join(''); +}; +PouchDB.allDBName = function (adapter) { + return [adapter, "://", PouchDB.prefix + PouchDB.ALL_DBS].join(''); +}; + +PouchDB.open = function (opts, callback) { + // Only register pouch with allDbs if flag is enabled + if (!PouchDB.enableAllDbs) { + callback(); + return; + } + + var adapter = opts.adapter; + // skip http and https adaptors for allDbs + if (adapter === "http" || adapter === "https") { + callback(); + return; + } + + new PouchDB(PouchDB.allDBName(adapter), function (err, db) { + if (err) { + // don't fail when allDb registration fails + //console.error(err); + callback(); + return; + } + + // check if db has been registered in PouchDB.ALL_DBS + var dbname = PouchDB.dbName(adapter, opts.name); + db.get(dbname, function (err, response) { + if (err && err.status === 404) { + db.put({ + _id: dbname, + dbname: opts.originalName + }, function (err) { + if (err) { + //console.error(err); + } + + callback(); + }); + } else { + callback(); + } + }); + }); +}; + +PouchDB.allDbs = function (callback) { + var accumulate = function (adapters, all_dbs) { + if (adapters.length === 0) { + // remove duplicates + var result = []; + all_dbs.forEach(function (doc) { + var exists = result.some(function (db) { + return db.id === doc.id; + }); + + if (!exists) { + result.push(doc); + } + }); + + // return an array of dbname + callback(null, result.map(function (row) { + return row.doc.dbname; + })); + return; + } + + var adapter = adapters.shift(); + + // skip http and https adaptors for allDbs + if (adapter === "http" || adapter === "https") { + accumulate(adapters, all_dbs); + return; + } + + new PouchDB(PouchDB.allDBName(adapter), function (err, db) { + if (err) { + callback(err); + return; + } + db.allDocs({include_docs: true}, function (err, response) { + if (err) { + callback(err); + return; + } + + // append from current adapter rows + all_dbs.unshift.apply(all_dbs, response.rows); + + // code to clear allDbs. + // response.rows.forEach(function (row) { + // db.remove(row.doc, function () { + // //console.log(arguments); + // }); + // }); + + // recurse + accumulate(adapters, all_dbs); + }); + }); + }; + var adapters = Object.keys(PouchDB.adapters); + accumulate(adapters, []); +}; + +module.exports = PouchDB; + +},{"./constructor":5}],16:[function(require,module,exports){ +/*jshint strict: false */ +/*global chrome */ + +var merge = require('./merge'); +exports.extend = require('./deps/extend'); +exports.ajax = require('./deps/ajax'); +exports.createBlob = require('./deps/blob'); +var uuid = require('./deps/uuid'); +exports.Crypto = require('./deps/md5.js'); +var buffer = require('./deps/buffer'); +var errors = require('./deps/errors'); + +// List of top level reserved words for doc +var reservedWords = [ + '_id', + '_rev', + '_attachments', + '_deleted', + '_revisions', + '_revs_info', + '_conflicts', + '_deleted_conflicts', + '_local_seq', + '_rev_tree' +]; +exports.uuids = function (count, options) { + + if (typeof(options) !== 'object') { + options = {}; + } + + var length = options.length; + var radix = options.radix; + var uuids = []; + + while (uuids.push(uuid(length, radix)) < count) { } + + return uuids; +}; + +// Give back one UUID +exports.uuid = function (options) { + return exports.uuids(1, options)[0]; +}; +// Determine id an ID is valid +// - invalid IDs begin with an underescore that does not begin '_design' or '_local' +// - any other string value is a valid id +exports.isValidId = function (id) { + if (!id || (typeof id !== 'string')) { + return false; + } + if (/^_/.test(id)) { + return (/^_(design|local)/).test(id); + } + return true; +}; + +function isChromeApp() { + return (typeof chrome !== "undefined" && + typeof chrome.storage !== "undefined" && + typeof chrome.storage.local !== "undefined"); +} + +// Pretty dumb name for a function, just wraps callback calls so we dont +// to if (callback) callback() everywhere +exports.call = function (fun) { + if (typeof fun === typeof Function) { + var args = Array.prototype.slice.call(arguments, 1); + fun.apply(this, args); + } +}; + +exports.isLocalId = function (id) { + return (/^_local/).test(id); +}; + +// check if a specific revision of a doc has been deleted +// - metadata: the metadata object from the doc store +// - rev: (optional) the revision to check. defaults to winning revision +exports.isDeleted = function (metadata, rev) { + if (!rev) { + rev = merge.winningRev(metadata); + } + if (rev.indexOf('-') >= 0) { + rev = rev.split('-')[1]; + } + var deleted = false; + merge.traverseRevTree(metadata.rev_tree, function (isLeaf, pos, id, acc, opts) { + if (id === rev) { + deleted = !!opts.deleted; + } + }); + + return deleted; +}; + +exports.filterChange = function (opts) { + return function (change) { + var req = {}; + var hasFilter = opts.filter && typeof opts.filter === 'function'; + + req.query = opts.query_params; + if (opts.filter && hasFilter && !opts.filter.call(this, change.doc, req)) { + return false; + } + if (opts.doc_ids && opts.doc_ids.indexOf(change.id) === -1) { + return false; + } + if (!opts.include_docs) { + delete change.doc; + } else { + for (var att in change.doc._attachments) { + change.doc._attachments[att].stub = true; + } + } + return true; + }; +}; + +exports.processChanges = function (opts, changes, last_seq) { + // TODO: we should try to filter and limit as soon as possible + changes = changes.filter(exports.filterChange(opts)); + if (opts.limit) { + if (opts.limit < changes.length) { + changes.length = opts.limit; + } + } + changes.forEach(function (change) { + exports.call(opts.onChange, change); + }); + exports.call(opts.complete, null, {results: changes, last_seq: last_seq}); +}; + +// Preprocess documents, parse their revisions, assign an id and a +// revision for new writes that are missing them, etc +exports.parseDoc = function (doc, newEdits) { + var error = null; + var nRevNum; + var newRevId; + var revInfo; + var opts = {status: 'available'}; + if (doc._deleted) { + opts.deleted = true; + } + + if (newEdits) { + if (!doc._id) { + doc._id = exports.uuid(); + } + newRevId = exports.uuid({length: 32, radix: 16}).toLowerCase(); + if (doc._rev) { + revInfo = /^(\d+)-(.+)$/.exec(doc._rev); + if (!revInfo) { + throw "invalid value for property '_rev'"; + } + doc._rev_tree = [{ + pos: parseInt(revInfo[1], 10), + ids: [revInfo[2], {status: 'missing'}, [[newRevId, opts, []]]] + }]; + nRevNum = parseInt(revInfo[1], 10) + 1; + } else { + doc._rev_tree = [{ + pos: 1, + ids : [newRevId, opts, []] + }]; + nRevNum = 1; + } + } else { + if (doc._revisions) { + doc._rev_tree = [{ + pos: doc._revisions.start - doc._revisions.ids.length + 1, + ids: doc._revisions.ids.reduce(function (acc, x) { + if (acc === null) { + return [x, opts, []]; + } else { + return [x, {status: 'missing'}, [acc]]; + } + }, null) + }]; + nRevNum = doc._revisions.start; + newRevId = doc._revisions.ids[0]; + } + if (!doc._rev_tree) { + revInfo = /^(\d+)-(.+)$/.exec(doc._rev); + if (!revInfo) { + return errors.BAD_ARG; + } + nRevNum = parseInt(revInfo[1], 10); + newRevId = revInfo[2]; + doc._rev_tree = [{ + pos: parseInt(revInfo[1], 10), + ids: [revInfo[2], opts, []] + }]; + } + } + + if (typeof doc._id !== 'string') { + error = errors.INVALID_ID; + } + else if (!exports.isValidId(doc._id)) { + error = errors.RESERVED_ID; + } + + for (var key in doc) { + if (doc.hasOwnProperty(key) && key[0] === '_' && reservedWords.indexOf(key) === -1) { + error = exports.extend({}, errors.DOC_VALIDATION); + error.reason += ': ' + key; + } + } + + doc._id = decodeURIComponent(doc._id); + doc._rev = [nRevNum, newRevId].join('-'); + + if (error) { + return error; + } + + return Object.keys(doc).reduce(function (acc, key) { + if (/^_/.test(key) && key !== '_attachments') { + acc.metadata[key.slice(1)] = doc[key]; + } else { + acc.data[key] = doc[key]; + } + return acc; + }, {metadata : {}, data : {}}); +}; + +exports.isCordova = function () { + return (typeof cordova !== "undefined" || + typeof PhoneGap !== "undefined" || + typeof phonegap !== "undefined"); +}; + +exports.Changes = function () { + + var api = {}; + var listeners = {}; + + if (isChromeApp()) { + chrome.storage.onChanged.addListener(function (e) { + // make sure it's event addressed to us + if (e.db_name != null) { + api.notify(e.db_name.newValue);//object only has oldValue, newValue members + } + }); + } else if (typeof window !== 'undefined') { + window.addEventListener("storage", function (e) { + api.notify(e.key); + }); + } + + api.addListener = function (db_name, id, db, opts) { + if (!listeners[db_name]) { + listeners[db_name] = {}; + } + listeners[db_name][id] = { + db: db, + opts: opts + }; + }; + + api.removeListener = function (db_name, id) { + if (listeners[db_name]) { + delete listeners[db_name][id]; + } + }; + + api.clearListeners = function (db_name) { + delete listeners[db_name]; + }; + + api.notifyLocalWindows = function (db_name) { + //do a useless change on a storage thing + //in order to get other windows's listeners to activate + if (!isChromeApp()) { + localStorage[db_name] = (localStorage[db_name] === "a") ? "b" : "a"; + } else { + chrome.storage.local.set({db_name: db_name}); + } + }; + + api.notify = function (db_name) { + if (!listeners[db_name]) { return; } + + Object.keys(listeners[db_name]).forEach(function (i) { + var opts = listeners[db_name][i].opts; + listeners[db_name][i].db.changes({ + include_docs: opts.include_docs, + conflicts: opts.conflicts, + continuous: false, + descending: false, + filter: opts.filter, + view: opts.view, + since: opts.since, + query_params: opts.query_params, + onChange: function (c) { + if (c.seq > opts.since && !opts.cancelled) { + opts.since = c.seq; + exports.call(opts.onChange, c); + } + } + }); + }); + }; + + return api; +}; + +if (typeof window === 'undefined' || !('atob' in window)) { + exports.atob = function (str) { + var base64 = new buffer(str, 'base64'); + // Node.js will just skip the characters it can't encode instead of + // throwing and exception + if (base64.toString('base64') !== str) { + throw ("Cannot base64 encode full string"); + } + return base64.toString('binary'); + }; +} else { + exports.atob = function (str) { + return atob(str); + }; +} + +if (typeof window === 'undefined' || !('btoa' in window)) { + exports.btoa = function (str) { + return new buffer(str, 'binary').toString('base64'); + }; +} else { + exports.btoa = function (str) { + return btoa(str); + }; +} + + +module.exports = exports; + +},{"./deps/ajax":6,"./deps/blob":7,"./deps/buffer":18,"./deps/errors":8,"./deps/extend":9,"./deps/md5.js":10,"./deps/uuid":11,"./merge":13}],17:[function(require,module,exports){ +module.exports = '1.1.0'; + +},{}],18:[function(require,module,exports){ + +},{}],19:[function(require,module,exports){ +// shim for using process in browser + +var process = module.exports = {}; + +process.nextTick = (function () { + var canSetImmediate = typeof window !== 'undefined' + && window.setImmediate; + var canPost = typeof window !== 'undefined' + && window.postMessage && window.addEventListener + ; + + if (canSetImmediate) { + return function (f) { return window.setImmediate(f) }; + } + + if (canPost) { + var queue = []; + window.addEventListener('message', function (ev) { + var source = ev.source; + if ((source === window || source === null) && ev.data === 'process-tick') { + ev.stopPropagation(); + if (queue.length > 0) { + var fn = queue.shift(); + fn(); + } + } + }, true); + + return function nextTick(fn) { + queue.push(fn); + window.postMessage('process-tick', '*'); + }; + } + + return function nextTick(fn) { + setTimeout(fn, 0); + }; +})(); + +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +} + +// TODO(shtylman) +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; + +},{}],20:[function(require,module,exports){ +/*global Pouch: true, pouchCollate: true */ + +"use strict"; + +var pouchCollate = require('pouchdb-collate'); + +// This is the first implementation of a basic plugin, we register the +// plugin object with pouch and it is mixin'd to each database created +// (regardless of adapter), adapters can override plugins by providing +// their own implementation. functions on the plugin object that start +// with _ are reserved function that are called by pouchdb for special +// notifications. + +// If we wanted to store incremental views we can do it here by listening +// to the changes feed (keeping track of our last update_seq between page loads) +// and storing the result of the map function (possibly using the upcoming +// extracted adapter functions) + + + +function MapReduce(db) { + if(!(this instanceof MapReduce)){ + return new MapReduce(db); + } + function viewQuery(fun, options) { + if (!options.complete) { + return; + } + + if (!options.skip) { + options.skip = 0; + } + + if (!fun.reduce) { + options.reduce = false; + } + + function sum(values) { + return values.reduce(function (a, b) { return a + b; }, 0); + } + + var builtInReduce = { + "_sum": function (keys, values){ + return sum(values); + }, + + "_count": function (keys, values, rereduce){ + if (rereduce){ + return sum(values); + } else { + return values.length; + } + }, + + "_stats": function (keys, values, rereduce) { + return { + 'sum': sum(values), + 'min': Math.min.apply(null, values), + 'max': Math.max.apply(null, values), + 'count': values.length, + 'sumsqr': (function () { + var _sumsqr = 0; + for(var idx in values) { + if (typeof values[idx] === 'number') { + _sumsqr += values[idx] * values[idx]; + } + } + return _sumsqr; + })() + }; + } + }; + + var results = []; + var current = null; + var num_started= 0; + var completed= false; + + function emit(key, val) { + var viewRow = { + id: current.doc._id, + key: key, + value: val + }; + + if (options.startkey && pouchCollate(key, options.startkey) < 0) return; + if (options.endkey && pouchCollate(key, options.endkey) > 0) return; + if (typeof options.key !== 'undefined' && pouchCollate(key, options.key) !== 0) return; + + num_started++; + if (options.include_docs) { + //in this special case, join on _id (issue #106) + if (val && typeof val === 'object' && val._id){ + db.get(val._id, + function (_, joined_doc){ + if (joined_doc) { + viewRow.doc = joined_doc; + } + results.push(viewRow); + checkComplete(); + }); + return; + } else { + viewRow.doc = current.doc; + } + } + results.push(viewRow); + }; + + // ugly way to make sure references to 'emit' in map/reduce bind to the + // above emit + eval('fun.map = ' + fun.map.toString() + ';'); + if (fun.reduce) { + if (builtInReduce[fun.reduce]) { + fun.reduce = builtInReduce[fun.reduce]; + } + + eval('fun.reduce = ' + fun.reduce.toString() + ';'); + } + + //only proceed once all documents are mapped and joined + function checkComplete() { + if (completed && results.length == num_started){ + results.sort(function (a, b) { + return pouchCollate(a.key, b.key); + }); + if (options.descending) { + results.reverse(); + } + if (options.reduce === false) { + return options.complete(null, { + total_rows: results.length, + offset: options.skip, + rows: ('limit' in options) ? results.slice(options.skip, options.limit + options.skip) : + (options.skip > 0) ? results.slice(options.skip) : results + }); + } + + var groups = []; + results.forEach(function (e) { + var last = groups[groups.length-1] || null; + if (last && pouchCollate(last.key[0][0], e.key) === 0) { + last.key.push([e.key, e.id]); + last.value.push(e.value); + return; + } + groups.push({key: [[e.key, e.id]], value: [e.value]}); + }); + groups.forEach(function (e) { + e.value = fun.reduce(e.key, e.value); + e.value = (typeof e.value === 'undefined') ? null : e.value; + e.key = e.key[0][0]; + }); + + options.complete(null, { + total_rows: groups.length, + offset: options.skip, + rows: ('limit' in options) ? groups.slice(options.skip, options.limit + options.skip) : + (options.skip > 0) ? groups.slice(options.skip) : groups + }); + } + }; + + db.changes({ + conflicts: true, + include_docs: true, + onChange: function (doc) { + if (!('deleted' in doc)) { + current = {doc: doc.doc}; + fun.map.call(this, doc.doc); + } + }, + complete: function () { + completed= true; + checkComplete(); + } + }); + } + + function httpQuery(fun, opts, callback) { + + // List of parameters to add to the PUT request + var params = []; + var body = undefined; + var method = 'GET'; + + // If opts.reduce exists and is defined, then add it to the list + // of parameters. + // If reduce=false then the results are that of only the map function + // not the final result of map and reduce. + if (typeof opts.reduce !== 'undefined') { + params.push('reduce=' + opts.reduce); + } + if (typeof opts.include_docs !== 'undefined') { + params.push('include_docs=' + opts.include_docs); + } + if (typeof opts.limit !== 'undefined') { + params.push('limit=' + opts.limit); + } + if (typeof opts.descending !== 'undefined') { + params.push('descending=' + opts.descending); + } + if (typeof opts.startkey !== 'undefined') { + params.push('startkey=' + encodeURIComponent(JSON.stringify(opts.startkey))); + } + if (typeof opts.endkey !== 'undefined') { + params.push('endkey=' + encodeURIComponent(JSON.stringify(opts.endkey))); + } + if (typeof opts.key !== 'undefined') { + params.push('key=' + encodeURIComponent(JSON.stringify(opts.key))); + } + if (typeof opts.group !== 'undefined') { + params.push('group=' + opts.group); + } + if (typeof opts.group_level !== 'undefined') { + params.push('group_level=' + opts.group_level); + } + if (typeof opts.skip !== 'undefined') { + params.push('skip=' + opts.skip); + } + + // If keys are supplied, issue a POST request to circumvent GET query string limits + // see http://wiki.apache.org/couchdb/HTTP_view_API#Querying_Options + if (typeof opts.keys !== 'undefined') { + method = 'POST'; + body = JSON.stringify({keys:opts.keys}); + } + + // Format the list of parameters into a valid URI query string + params = params.join('&'); + params = params === '' ? '' : '?' + params; + + // We are referencing a query defined in the design doc + if (typeof fun === 'string') { + var parts = fun.split('/'); + db.request({ + method: method, + url: '_design/' + parts[0] + '/_view/' + parts[1] + params, + body: body + }, callback); + return; + } + + // We are using a temporary view, terrible for performance but good for testing + var queryObject = JSON.parse(JSON.stringify(fun, function (key, val) { + if (typeof val === 'function') { + return val + ''; // implicitly `toString` it + } + return val; + })); + + db.request({ + method:'POST', + url: '_temp_view' + params, + body: queryObject + }, callback); + } + + this.query = function(fun, opts, callback) { + if (typeof opts === 'function') { + callback = opts; + opts = {}; + } + + if (callback) { + opts.complete = callback; + } + + if (db.type() === 'http') { + if (typeof fun === 'function'){ + return httpQuery({map: fun}, opts, callback); + } + return httpQuery(fun, opts, callback); + } + + if (typeof fun === 'object') { + return viewQuery(fun, opts); + } + + if (typeof fun === 'function') { + return viewQuery({map: fun}, opts); + } + + var parts = fun.split('/'); + db.get('_design/' + parts[0], function (err, doc) { + if (err) { + if (callback) callback(err); + return; + } + + if (!doc.views[parts[1]]) { + if (callback) callback({ error: 'not_found', reason: 'missing_named_view' }); + return; + } + + viewQuery({ + map: doc.views[parts[1]].map, + reduce: doc.views[parts[1]].reduce + }, opts); + }); + } + +}; + +// Deletion is a noop since we dont store the results of the view +MapReduce._delete = function () { }; +module.exports = MapReduce; + +},{"pouchdb-collate":21}],21:[function(require,module,exports){ +'use strict'; + +function arrayCollate(a, b) { + var len = Math.min(a.length, b.length); + for (var i = 0; i < len; i++) { + var sort = pouchCollate(a[i], b[i]); + if (sort !== 0) { + return sort; + } + } + return (a.length === b.length) ? 0 : + (a.length > b.length) ? 1 : -1; +} +function stringCollate(a, b) { + // See: https://github.com/daleharvey/pouchdb/issues/40 + // This is incompatible with the CouchDB implementation, but its the + // best we can do for now + return (a === b) ? 0 : ((a > b) ? 1 : -1); +} +function objectCollate(a, b) { + var ak = Object.keys(a), bk = Object.keys(b); + var len = Math.min(ak.length, bk.length); + for (var i = 0; i < len; i++) { + // First sort the keys + var sort = pouchCollate(ak[i], bk[i]); + if (sort !== 0) { + return sort; + } + // if the keys are equal sort the values + sort = pouchCollate(a[ak[i]], b[bk[i]]); + if (sort !== 0) { + return sort; + } + + } + return (ak.length === bk.length) ? 0 : + (ak.length > bk.length) ? 1 : -1; +} +// The collation is defined by erlangs ordered terms +// the atoms null, true, false come first, then numbers, strings, +// arrays, then objects +function collationIndex(x) { + var id = ['boolean', 'number', 'string', 'object']; + if (id.indexOf(typeof x) !== -1) { + if (x === null) { + return 1; + } + return id.indexOf(typeof x) + 2; + } + if (Array.isArray(x)) { + return 4.5; + } + if (typeof x === 'undefined') { + // CouchDB indexes both null/undefined as null + return 1; + } +} +module.exports = pouchCollate; +function pouchCollate(a, b) { + var ai = collationIndex(a); + var bi = collationIndex(b); + if ((ai - bi) !== 0) { + return ai - bi; + } + if (a === null || typeof a === 'undefined') { + return 0; + } + if (typeof a === 'number') { + return a - b; + } + if (typeof a === 'boolean') { + return a === b ? 0 : (a < b ? -1 : 1); + } + if (typeof a === 'string') { + return stringCollate(a, b); + } + if (Array.isArray(a)) { + return arrayCollate(a, b); + } + if (typeof a === 'object') { + return objectCollate(a, b); + } +};; +},{}]},{},[12]) +(12) +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/derequire/test/test.js b/pitfall/pdfkit/node_modules/derequire/test/test.js new file mode 100644 index 00000000..e7cc9883 --- /dev/null +++ b/pitfall/pdfkit/node_modules/derequire/test/test.js @@ -0,0 +1,83 @@ +var should = require('chai').should(); +var derequire = require('../'); +var fs = require("fs"); +var crypto = require('crypto'); +function hash(data){ + return crypto.createHash('sha512').update(data).digest('base64'); +} +var compare = hash(fs.readFileSync('./test/pouchdb.dereq.js', {encoding: 'utf8'})); +var compareCjsSmartass = fs.readFileSync('./test/cjs-smartass.dereq.js', {encoding: 'utf8'}); +var compareCjslazy = fs.readFileSync('./test/cjs-lazy.js', {encoding: 'utf8'}); +describe('derequire', function(){ + it('should work', function(){ + var exampleText = "var x=function(require,module,exports){var process=require(\"__browserify_process\");var requireText = \"require\";}"; + derequire(exampleText).should.equal("var x=function(_dereq_,module,exports){var process=_dereq_(\"__browserify_process\");var requireText = \"require\";}"); + }); + it('should only replace arguments and calls',function(){ + var exampleText = "function x(require,module,exports){var process=require(\"__browserify_process\");var requireText = {}; requireText.require = \"require\";(function(){var require = 'blah';}())}"; + derequire(exampleText).should.equal("function x(_dereq_,module,exports){var process=_dereq_(\"__browserify_process\");var requireText = {}; requireText.require = \"require\";(function(){var require = 'blah';}())}"); + }); + it('should handle top level return statments', function(){ + var exampleText = 'return (function(require){return require();}(function(){return "sentinel";}));'; + derequire(exampleText).should.equal('return (function(_dereq_){return _dereq_();}(function(){return "sentinel";}));'); + }); + it('should work with a comment on the end', function(){ + var exampleText = 'var x=function(require,module,exports){var process=require("__browserify_process");var requireText = "require";}//lala'; + derequire(exampleText).should.equal('var x=function(_dereq_,module,exports){var process=_dereq_("__browserify_process");var requireText = "require";}//lala'); + }); + it('should work with whitespace inside require statement', function(){ + var exampleText = 'var x=function(require,module,exports){var process=require( "__browserify_process" )}'; + derequire(exampleText).should.equal('var x=function(_dereq_,module,exports){var process=_dereq_( "__browserify_process" )}'); + }); + it('should work with single quoted requires', function(){ + var exampleText = 'var x=function(require,module,exports){var process=require(\'__browserify_process\')}'; + derequire(exampleText).should.equal('var x=function(_dereq_,module,exports){var process=_dereq_(\'__browserify_process\')}'); + }); + it('should throw an error if you try to change things of different sizes', function(){ + should.throw(function(){ + derequire('require("x")', 'lalalalla', 'la'); + }); + }); + it("should return notthe code back if it can't parse it", function(){ + derequire("/*").should.equal("/*"); + }); + it("should return the code back if it can't parse it and it has a require", function(){ + derequire("/*require('").should.equal("/*require('"); + }); + it('should work on something big', function(done){ + fs.readFile('./test/pouchdb.js', {encoding:'utf8'}, function(err, data){ + if(err){ + return done(err); + } + var transformed = derequire(data); + hash(transformed).should.equal(compare); + done(); + }); + }); + it('should not fail on attribute lookups', function(){ + var txt = 'var x=function(require,module,exports){' + + 'var W=require("stream").Writable;' + + '}' + ; + var expected = 'var x=function(_dereq_,module,exports){' + + 'var W=_dereq_("stream").Writable;' + + '}' + ; + derequire(txt).should.equal(expected); + }); + it('should fix cjs-smartassery', function (done){ + fs.readFile('./test/cjs-smartass.js', {encoding:'utf8'}, function(err, data){ + if(err){ + return done(err); + } + var transformed = derequire(data); + transformed.should.equal(compareCjsSmartass); + done(); + }); + + }); + it('should fix not fix cjs-lazy', function (){ + derequire(compareCjslazy).should.equal(compareCjslazy); + }); + +}); diff --git a/pitfall/pdfkit/node_modules/detective/.npmignore b/pitfall/pdfkit/node_modules/detective/.npmignore new file mode 100644 index 00000000..3c3629e6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/pitfall/pdfkit/node_modules/detective/.travis.yml b/pitfall/pdfkit/node_modules/detective/.travis.yml new file mode 100644 index 00000000..09d3ef37 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.8 + - 0.10 diff --git a/pitfall/pdfkit/node_modules/detective/LICENSE b/pitfall/pdfkit/node_modules/detective/LICENSE new file mode 100644 index 00000000..ee27ba4b --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/detective/example/strings.js b/pitfall/pdfkit/node_modules/detective/example/strings.js new file mode 100644 index 00000000..b9cc58fb --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/example/strings.js @@ -0,0 +1,6 @@ +var detective = require('../'); +var fs = require('fs'); + +var src = fs.readFileSync(__dirname + '/strings_src.js'); +var requires = detective(src); +console.dir(requires); diff --git a/pitfall/pdfkit/node_modules/detective/example/strings_src.js b/pitfall/pdfkit/node_modules/detective/example/strings_src.js new file mode 100644 index 00000000..88d08327 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/example/strings_src.js @@ -0,0 +1,3 @@ +var a = require('a'); +var b = require('b'); +var c = require('c'); diff --git a/pitfall/pdfkit/node_modules/detective/index.js b/pitfall/pdfkit/node_modules/detective/index.js new file mode 100644 index 00000000..e474814c --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/index.js @@ -0,0 +1,70 @@ +var esprima = require('esprima-fb'); +var escodegen = require('escodegen'); + +var traverse = function (node, cb) { + if (Array.isArray(node)) { + node.forEach(function (x) { + if(x != null) { + x.parent = node; + traverse(x, cb); + } + }); + } + else if (node && typeof node === 'object') { + cb(node); + + Object.keys(node).forEach(function (key) { + if (key === 'parent' || !node[key]) return; + node[key].parent = node; + traverse(node[key], cb); + }); + } +}; + +var walk = function (src, opts, cb) { + var ast = esprima.parse(src, opts); + traverse(ast, cb); +}; + +var exports = module.exports = function (src, opts) { + return exports.find(src, opts).strings; +}; + +exports.find = function (src, opts) { + if (!opts) opts = {}; + opts.parse = opts.parse || {}; + opts.parse.tolerant = true; + + var word = opts.word === undefined ? 'require' : opts.word; + if (typeof src !== 'string') src = String(src); + src = src.replace(/^#![^\n]*\n/, ''); + + var isRequire = opts.isRequire || function (node) { + var c = node.callee; + return c + && node.type === 'CallExpression' + && c.type === 'Identifier' + && c.name === word + ; + } + + var modules = { strings : [], expressions : [] }; + if (opts.nodes) modules.nodes = []; + + if (src.indexOf(word) == -1) return modules; + + walk(src, opts.parse, function (node) { + if (!isRequire(node)) return; + if (node.arguments.length) { + if (node.arguments[0].type === 'Literal') { + modules.strings.push(node.arguments[0].value); + } + else { + modules.expressions.push(escodegen.generate(node.arguments[0])); + } + } + if (opts.nodes) modules.nodes.push(node); + }); + + return modules; +}; diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/.bin/escodegen b/pitfall/pdfkit/node_modules/detective/node_modules/.bin/escodegen new file mode 120000 index 00000000..01a7c325 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/.bin/escodegen @@ -0,0 +1 @@ +../escodegen/bin/escodegen.js \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/.bin/esgenerate b/pitfall/pdfkit/node_modules/detective/node_modules/.bin/esgenerate new file mode 120000 index 00000000..7d0293e6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/.bin/esgenerate @@ -0,0 +1 @@ +../escodegen/bin/esgenerate.js \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/.bin/esparse b/pitfall/pdfkit/node_modules/detective/node_modules/.bin/esparse new file mode 120000 index 00000000..936ac782 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/.bin/esparse @@ -0,0 +1 @@ +../esprima-fb/bin/esparse.js \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/.bin/esvalidate b/pitfall/pdfkit/node_modules/detective/node_modules/.bin/esvalidate new file mode 120000 index 00000000..85487158 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/.bin/esvalidate @@ -0,0 +1 @@ +../esprima-fb/bin/esvalidate.js \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/escodegen/.jshintrc b/pitfall/pdfkit/node_modules/detective/node_modules/escodegen/.jshintrc new file mode 100644 index 00000000..71a3a9a2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/escodegen/.jshintrc @@ -0,0 +1,20 @@ +{ + "curly": true, + "eqeqeq": true, + "immed": true, + "indent": 4, + "eqnull": true, + "latedef": true, + "noarg": true, + "noempty": true, + "quotmark": "single", + "undef": true, + "unused": "vars", + "strict": true, + "trailing": true, + "validthis": true, + + "onevar": true, + + "node": true +} diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/escodegen/Gruntfile.js b/pitfall/pdfkit/node_modules/detective/node_modules/escodegen/Gruntfile.js new file mode 100644 index 00000000..cdfeac2f --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/escodegen/Gruntfile.js @@ -0,0 +1,60 @@ +/* + Copyright (C) 2013 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +module.exports = function (grunt) { + 'use strict'; + + grunt.initConfig({ + jshint: { + all: [ + 'Gruntfile.js', + 'escodegen.js' + ], + options: { + jshintrc: '.jshintrc', + force: false + } + }, + mochaTest: { + test: { + options: { + reporter: 'spec' + }, + src: ['test/*.js'] + } + } + }); + + + // load tasks + grunt.loadNpmTasks('grunt-contrib-jshint'); + grunt.loadNpmTasks('grunt-mocha-test'); + + // alias + grunt.registerTask('test', 'mochaTest'); + grunt.registerTask('lint', 'jshint'); + grunt.registerTask('travis', ['lint', 'test']); + grunt.registerTask('default','travis'); +}; +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/escodegen/LICENSE.BSD b/pitfall/pdfkit/node_modules/detective/node_modules/escodegen/LICENSE.BSD new file mode 100644 index 00000000..3e580c35 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/escodegen/LICENSE.BSD @@ -0,0 +1,19 @@ +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/escodegen/LICENSE.source-map b/pitfall/pdfkit/node_modules/detective/node_modules/escodegen/LICENSE.source-map new file mode 100644 index 00000000..259c59ff --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/escodegen/LICENSE.source-map @@ -0,0 +1,27 @@ +Copyright (c) 2009-2011, Mozilla Foundation and contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the names of the Mozilla Foundation nor the names of project + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/escodegen/README.md b/pitfall/pdfkit/node_modules/detective/node_modules/escodegen/README.md new file mode 100644 index 00000000..5237652e --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/escodegen/README.md @@ -0,0 +1,97 @@ + +### Escodegen [![Build Status](https://secure.travis-ci.org/Constellation/escodegen.png)](http://travis-ci.org/Constellation/escodegen) [![Build Status](https://drone.io/github.com/Constellation/escodegen/status.png)](https://drone.io/github.com/Constellation/escodegen/latest) + +Escodegen ([escodegen](http://github.com/Constellation/escodegen)) is +[ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm) +(also popularly known as [JavaScript](http://en.wikipedia.org/wiki/JavaScript>JavaScript)) +code generator from [Parser API](https://developer.mozilla.org/en/SpiderMonkey/Parser_API) AST. +See [online generator demo](http://constellation.github.com/escodegen/demo/index.html). + + +### Install + +Escodegen can be used in a web browser: + + + +escodegen.browser.js is found in tagged-revision. See Tags on GitHub. + +Or in a Node.js application via the package manager: + + npm install escodegen + +### Usage + +A simple example: the program + + escodegen.generate({ + type: 'BinaryExpression', + operator: '+', + left: { type: 'Literal', value: 40 }, + right: { type: 'Literal', value: 2 } + }); + +produces the string `'40 + 2'` + +See the [API page](https://github.com/Constellation/escodegen/wiki/API) for +options. To run the tests, execute `npm test` in the root directory. + +### License + +#### Escodegen + +Copyright (C) 2012 [Yusuke Suzuki](http://github.com/Constellation) + (twitter: [@Constellation](http://twitter.com/Constellation)) and other contributors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#### source-map + +SourceNodeMocks has a limited interface of mozilla/source-map SourceNode implementations. + +Copyright (c) 2009-2011, Mozilla Foundation and contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the names of the Mozilla Foundation nor the names of project + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/escodegen/bin/escodegen.js b/pitfall/pdfkit/node_modules/detective/node_modules/escodegen/bin/escodegen.js new file mode 100755 index 00000000..783fb939 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/escodegen/bin/escodegen.js @@ -0,0 +1,45 @@ +#!/usr/bin/env node +/* + Copyright (C) 2012 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*jslint sloppy:true node:true */ + +var fs = require('fs'), + path = require('path'), + root = path.join(path.dirname(fs.realpathSync(__filename)), '..'), + esprima = require('esprima'), + escodegen = require(root), + files = process.argv.splice(2); + +if (files.length === 0) { + console.log('Usage:'); + console.log(' escodegen file.js'); + process.exit(1); +} + +files.forEach(function (filename) { + var content = fs.readFileSync(filename, 'utf-8'); + console.log(escodegen.generate(esprima.parse(content))); +}); +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/escodegen/bin/esgenerate.js b/pitfall/pdfkit/node_modules/detective/node_modules/escodegen/bin/esgenerate.js new file mode 100755 index 00000000..b27daa7c --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/escodegen/bin/esgenerate.js @@ -0,0 +1,45 @@ +#!/usr/bin/env node +/* + Copyright (C) 2012 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*jslint sloppy:true node:true */ + +var fs = require('fs'), + path = require('path'), + root = path.join(path.dirname(fs.realpathSync(__filename)), '..'), + esprima = require('esprima'), + escodegen = require(root), + files = process.argv.splice(2); + +if (files.length === 0) { + console.log('Usage:'); + console.log(' esgenerate file.json'); + process.exit(1); +} + +files.forEach(function (filename) { + var content = fs.readFileSync(filename, 'utf-8'); + console.log(escodegen.generate(JSON.parse(content))); +}); +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/escodegen/component.json b/pitfall/pdfkit/node_modules/detective/node_modules/escodegen/component.json new file mode 100644 index 00000000..b8ffa267 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/escodegen/component.json @@ -0,0 +1,57 @@ +{ + "name": "escodegen", + "description": "ECMAScript code generator", + "homepage": "http://github.com/Constellation/escodegen", + "main": "escodegen.js", + "bin": { + "esgenerate": "./bin/esgenerate.js", + "escodegen": "./bin/escodegen.js" + }, + "version": "1.1.0", + "engines": { + "node": ">=0.4.0" + }, + "maintainers": [ + { + "name": "Yusuke Suzuki", + "email": "utatane.tea@gmail.com", + "web": "http://github.com/Constellation" + } + ], + "repository": { + "type": "git", + "url": "http://github.com/Constellation/escodegen.git" + }, + "dependencies": { + "estraverse": "~1.5.0", + "esprima": "~1.0.4", + "esutils": "~1.0.0" + }, + "optionalDependencies": {}, + "devDependencies": { + "esprima-moz": "*", + "commonjs-everywhere": "~0.8.0", + "q": "*", + "bower": "*", + "semver": "*", + "chai": "~1.7.2", + "grunt-contrib-jshint": "~0.5.0", + "grunt-cli": "~0.1.9", + "grunt": "~0.4.1", + "grunt-mocha-test": "~0.6.2" + }, + "licenses": [ + { + "type": "BSD", + "url": "http://github.com/Constellation/escodegen/raw/master/LICENSE.BSD" + } + ], + "scripts": { + "test": "grunt travis", + "unit-test": "grunt test", + "lint": "grunt lint", + "release": "node tools/release.js", + "build-min": "./node_modules/.bin/cjsify -ma path: tools/entry-point.js > escodegen.browser.min.js", + "build": "./node_modules/.bin/cjsify -a path: tools/entry-point.js > escodegen.browser.js" + } +} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/escodegen/escodegen.browser.min.js b/pitfall/pdfkit/node_modules/detective/node_modules/escodegen/escodegen.browser.min.js new file mode 100644 index 00000000..ccc04230 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/escodegen/escodegen.browser.min.js @@ -0,0 +1 @@ +(function(b){function a(b,d){if({}.hasOwnProperty.call(a.cache,b))return a.cache[b];var e=a.resolve(b);if(!e)throw new Error('Failed to resolve module '+b);var c={id:b,require:a,filename:b,exports:{},loaded:!1,parent:d,children:[]};d&&d.children.push(c);var f=b.slice(0,b.lastIndexOf('/')+1);return a.cache[b]=c.exports,e.call(c.exports,c,c.exports,f,b),c.loaded=!0,a.cache[b]=c.exports}a.modules={},a.cache={},a.resolve=function(b){return{}.hasOwnProperty.call(a.modules,b)?a.modules[b]:void 0},a.define=function(b,c){a.modules[b]=c};var c=function(a){return a='/',{title:'browser',version:'v0.10.24',browser:!0,env:{},argv:[],nextTick:b.setImmediate||function(a){setTimeout(a,0)},cwd:function(){return a},chdir:function(b){a=b}}}();a.define('/tools/entry-point.js',function(c,d,e,f){!function(){'use strict';b.escodegen=a('/escodegen.js',c),escodegen.browser=!0}()}),a.define('/escodegen.js',function(d,c,e,f){!function(e,f,V,D,N,p,A,m,x,v,G,O,E,Q,k,h,J,P,C,M,n,K,w,S,U){'use strict';function L(){return{indent:null,base:null,parse:null,comment:!1,format:{indent:{style:' ',base:0,adjustMultilineComment:!1},newline:'\n',space:' ',json:!1,renumber:!1,hexadecimal:!1,quotes:'single',escapeless:!1,compact:!1,parentheses:!0,semicolons:!0,safeConcatenation:!1},moz:{comprehensionExpressionStartsWithAssignment:!1,starlessGenerator:!1,parenthesizedComprehensionBlock:!1},sourceMap:null,sourceMapRoot:null,sourceMapWithCode:!1,directive:!1,verbatim:null}}function H(b,a){var c='';for(a|=0;a>0;a>>>=1,b+=b)a&1&&(c+=b);return c}function $(a){return/[\r\n]/g.test(a)}function q(b){var a=b.length;return a&&p.code.isLineTerminator(b.charCodeAt(a-1))}function I(b,d){function e(a){return typeof a==='object'&&a instanceof Object&&!(a instanceof RegExp)}var a,c;for(a in d)d.hasOwnProperty(a)&&(c=d[a],e(c)?e(b[a])?I(b[a],c):b[a]=I({},c):b[a]=c);return b}function a0(c){var b,e,a,f,d;if(c!==c)throw new Error('Numeric literal whose value is NaN');if(c<0||c===0&&1/c<0)throw new Error('Numeric literal whose value is negative');if(c===1/0)return v?'null':G?'1e400':'1e+400';if(b=''+c,!G||b.length<3)return b;e=b.indexOf('.'),!v&&b.charCodeAt(0)===48&&e===1&&(e=0,b=b.slice(1)),a=b,b=b.replace('e+','e'),f=0,(d=a.indexOf('e'))>0&&(f=+a.slice(d+1),a=a.slice(0,d)),e>=0&&(f-=a.length-e-1,a=+(a.slice(0,e)+a.slice(e+1))+''),d=0;while(a.charCodeAt(a.length+d-1)===48)--d;return d!==0&&(f-=d,a=a.slice(0,d)),f!==0&&(a+='e'+f),(a.length1e12&&Math.floor(c)===c&&(a='0x'+c.toString(16)).length255?a+='u'+'0000'.slice(c.length)+c:b===0&&!p.code.isDecimalDigit(d)?a+='0':b===11?a+='x0B':a+='x'+'00'.slice(c.length)+c;break}return a}function a5(b){var a='\\';switch(b){case 92:a+='\\';break;case 10:a+='n';break;case 13:a+='r';break;case 8232:a+='u2028';break;case 8233:a+='u2029';break;default:throw new Error('Incorrectly classified character')}return a}function Y(d){var a,e,c,b;for(b=E==='double'?'"':"'",a=0,e=d.length;a=32&&a<=126)){b+=a4(a,d.charCodeAt(c+1));continue}b+=String.fromCharCode(a)}if(e=!(E==='double'||E==='auto'&&i=0;--a)if(p.code.isLineTerminator(b.charCodeAt(a)))break;return b.length-1-a}function X(k,i){var b,a,e,g,d,c,f,h;for(b=k.split(/\r\n|[\r\n]/),c=Number.MAX_VALUE,a=1,e=b.length;ad&&(c=d)}for(i!==void 0?(f=m,b[1][c]==='*'&&(i+=' '),m=i):(c&1&&--c,f=m),a=1,e=b.length;a0){for(i=a,d=b.leadingComments[0],a=[],C&&b.type===e.Program&&b.body.length===0&&a.push('\n'),a.push(F(d)),q(j(a).toString())||a.push('\n'),c=1,f=b.leadingComments.length;c'),b.expression?(a.push(h),d=g(b.body,{precedence:f.Assignment,allowIn:!0,allowCall:!0}),d.toString().charAt(0)==='{'&&(d=['(',d,')']),a.push(d)):a.push(r(b.body,!1,!0)),a}function g(b,x){var a,t,D,A,d,r,H,c,v,C,y,L,w,E,I,F,G;if(t=x.precedence,w=x.allowIn,E=x.allowCall,D=b.type||x.type,n.verbatim&&b.hasOwnProperty(n.verbatim))return a1(b,x);switch(D){case e.SequenceExpression:a=[];w|=f.Sequence0){for(a.push('('),d=0;d=2&&c.charCodeAt(0)===48)&&a.push('.')),a.push('.',B(b.property)));a=s(a,f.Member,t);break;case e.UnaryExpression:c=g(b.argument,{precedence:f.Unary,allowIn:!0,allowCall:!0});h===''?a=i(b.operator,c):(a=[b.operator],b.operator.length>2?a=i(a,c):(y=j(a).toString(),C=y.charCodeAt(y.length-1),L=c.toString().charCodeAt(0),(C===43||C===45)&&C===L||p.code.isIdentifierPart(C)&&p.code.isIdentifierPart(L)?a.push(u(),c):a.push(c)));a=s(a,f.Unary,t);break;case e.YieldExpression:b.delegate?a='yield*':a='yield';b.argument&&(a=i(a,g(b.argument,{precedence:f.Yield,allowIn:!0,allowCall:!0})));a=s(a,f.Yield,t);break;case e.UpdateExpression:b.prefix?a=s([b.operator,g(b.argument,{precedence:f.Unary,allowIn:!0,allowCall:!0})],f.Unary,t):a=s([g(b.argument,{precedence:f.Postfix,allowIn:!0,allowCall:!0}),b.operator],f.Postfix,t);break;case e.FunctionExpression:G=b.generator&&!n.moz.starlessGenerator;a=G?'function*':'function';b.id?a=[a,G?h:u(),B(b.id),z(b)]:a=[a+h,z(b)];break;case e.ArrayPattern:case e.ArrayExpression:if(!b.elements.length){a='[]';break}v=b.elements.length>1;a=['[',v?k:''];o(function(c){for(d=0,r=b.elements.length;d1;o(function(){c=g(b.properties[0],{precedence:f.Sequence,allowIn:!0,allowCall:!0,type:e.Property})});if(!(v||$(j(c).toString()))){a=['{',h,c,h,'}'];break}o(function(h){if(a=['{',k,h,c],v)for(a.push(','+k),d=1,r=b.properties.length;d0||n.moz.comprehensionExpressionStartsWithAssignment?a=i(a,c):a.push(c)});b.filter&&(a=i(a,'if'+h),c=g(b.filter,{precedence:f.Sequence,allowIn:!0,allowCall:!0}),n.moz.parenthesizedComprehensionBlock?a=i(a,['(',c,')']):a=i(a,c));n.moz.comprehensionExpressionStartsWithAssignment||(c=g(b.body,{precedence:f.Assignment,allowIn:!0,allowCall:!0}),a=i(a,c));a.push(D===e.GeneratorExpression?')':']');break;case e.ComprehensionBlock:b.left.type===e.VariableDeclaration?c=[b.left.kind,u(),l(b.left.declarations[0],{allowIn:!1})]:c=g(b.left,{precedence:f.Call,allowIn:!0,allowCall:!0});c=i(c,b.of?'of':'in');c=i(c,g(b.right,{precedence:f.Sequence,allowIn:!0,allowCall:!0}));n.moz.parenthesizedComprehensionBlock?a=['for'+h+'(',c,')']:a=i('for'+h,c);break;default:throw new Error('Unknown expression type: '+b.type)}return j(a,b)}function l(b,x){var c,d,a,v,s,F,D,p,m,E;s=!0,m=';',F=!1,D=!1,x&&(s=x.allowIn===undefined||x.allowIn,!P&&x.semicolonOptional===!0&&(m=''),F=x.functionBody,D=x.directiveContext);switch(b.type){case e.BlockStatement:a=['{',k];o(function(){for(c=0,d=b.body.length;c=0||M&&D&&b.expression.type===e.Literal&&typeof b.expression.value==='string'?a=['(',a,')'+m]:a.push(m);break;case e.VariableDeclarator:b.init?a=[g(b.id,{precedence:f.Assignment,allowIn:s,allowCall:!0}),h,'=',h,g(b.init,{precedence:f.Assignment,allowIn:s,allowCall:!0})]:a=T(b.id,{precedence:f.Assignment,allowIn:s});break;case e.VariableDeclaration:a=[b.kind];b.declarations.length===1&&b.declarations[0].init&&b.declarations[0].init.type===e.FunctionExpression?a.push(u(),l(b.declarations[0],{allowIn:s})):o(function(){for(v=b.declarations[0],n.comment&&v.leadingComments?a.push('\n',t(l(v,{allowIn:s}))):a.push(u(),l(v,{allowIn:s})),c=1,d=b.declarations.length;c0?'\n':''];for(c=0;c':f.Relational,'<=':f.Relational,'>=':f.Relational,'in':f.Relational,'instanceof':f.Relational,'<<':f.BitwiseSHIFT,'>>':f.BitwiseSHIFT,'>>>':f.BitwiseSHIFT,'+':f.Additive,'-':f.Additive,'*':f.Multiplicative,'%':f.Multiplicative,'/':f.Multiplicative},A=Array.isArray,A||(A=function a(a){return Object.prototype.toString.call(a)==='[object Array]'}),S={indent:{style:'',base:0},renumber:!0,hexadecimal:!0,quotes:'auto',escapeless:!0,compact:!0,parentheses:!1,semicolons:!1},U=L().format,c.version=a('/package.json',d).version,c.generate=a2,c.attachComments=N.attachComments,c.browser=!1,c.FORMAT_MINIFY=S,c.FORMAT_DEFAULTS=U}()}),a.define('/package.json',function(a,b,c,d){a.exports={name:'escodegen',description:'ECMAScript code generator',homepage:'http://github.com/Constellation/escodegen',main:'escodegen.js',bin:{esgenerate:'./bin/esgenerate.js',escodegen:'./bin/escodegen.js'},version:'1.1.0',engines:{node:'>=0.4.0'},maintainers:[{name:'Yusuke Suzuki',email:'utatane.tea@gmail.com',web:'http://github.com/Constellation'}],repository:{type:'git',url:'http://github.com/Constellation/escodegen.git'},dependencies:{esprima:'~1.0.4',estraverse:'~1.5.0',esutils:'~1.0.0'},optionalDependencies:{'source-map':'~0.1.30'},devDependencies:{'esprima-moz':'*','commonjs-everywhere':'~0.8.0',q:'*',bower:'*',semver:'*',chai:'~1.7.2','grunt-contrib-jshint':'~0.5.0','grunt-cli':'~0.1.9',grunt:'~0.4.1','grunt-mocha-test':'~0.6.2'},licenses:[{type:'BSD',url:'http://github.com/Constellation/escodegen/raw/master/LICENSE.BSD'}],scripts:{test:'grunt travis','unit-test':'grunt test',lint:'grunt lint',release:'node tools/release.js','build-min':'./node_modules/.bin/cjsify -ma path: tools/entry-point.js > escodegen.browser.min.js',build:'./node_modules/.bin/cjsify -a path: tools/entry-point.js > escodegen.browser.js'}}}),a.define('/node_modules/source-map/lib/source-map.js',function(b,c,d,e){c.SourceMapGenerator=a('/node_modules/source-map/lib/source-map/source-map-generator.js',b).SourceMapGenerator,c.SourceMapConsumer=a('/node_modules/source-map/lib/source-map/source-map-consumer.js',b).SourceMapConsumer,c.SourceNode=a('/node_modules/source-map/lib/source-map/source-node.js',b).SourceNode}),a.define('/node_modules/source-map/lib/source-map/source-node.js',function(c,d,e,f){if(typeof b!=='function')var b=a('/node_modules/source-map/node_modules/amdefine/amdefine.js',c)(c,a);b(function(c,f,d){function a(a,b,c,d,e){this.children=[],this.sourceContents={},this.line=a===undefined?null:a,this.column=b===undefined?null:b,this.source=c===undefined?null:c,this.name=e===undefined?null:e,d!=null&&this.add(d)}var e=c('/node_modules/source-map/lib/source-map/source-map-generator.js',d).SourceMapGenerator,b=c('/node_modules/source-map/lib/source-map/util.js',d);a.fromStringWithSourceMap=function b(i,g){function h(b,c){b===null||b.source===undefined?d.add(c):d.add(new a(b.originalLine,b.originalColumn,b.source,c,b.name))}var d=new a,b=i.split('\n'),e=1,c=0,f=null;return g.eachMapping(function(a){if(f===null){while(e=0;c--)this.prepend(b[c]);else if(b instanceof a||typeof b==='string')this.children.unshift(b);else throw new TypeError('Expected a SourceNode, string, or an array of SourceNodes and strings. Got '+b);return this},a.prototype.walk=function b(d){var b;for(var c=0,e=this.children.length;c0){for(a=[],b=0;bb)-(a0&&(b.splice(a-1,2),a-=2)}function j(b,c){var a;return b&&b.charAt(0)==='.'&&c&&(a=c.split('/'),a=a.slice(0,a.length-1),a=a.concat(b.split('/')),q(a),b=a.join('/')),b}function p(a){return function(b){return j(b,a)}}function o(c){function a(a){b[c]=a}return a.fromText=function(a,b){throw new Error('amdefine does not implement load.fromText')},a}function m(c,h,l){var m,f,a,j;if(c)f=b[c]={},a={id:c,uri:d,exports:f},m=g(i,f,a,c);else{if(k)throw new Error('amdefine with no module ID cannot be called more than once per file.');k=!0,f=e.exports,a=e,m=g(i,f,a,e.id)}h&&(h=h.map(function(a){return m(a)})),typeof l==='function'?j=l.apply(a.exports,h):j=l,j!==undefined&&(a.exports=j,c&&(b[c]=a.exports))}function l(b,a,c){Array.isArray(b)?(c=a,a=b,b=undefined):typeof b!=='string'&&(c=b,b=a=undefined),a&&!Array.isArray(a)&&(c=a,a=undefined),a||(a=['require','exports','module']),b?f[b]=[b,a,c]:m(b,a,c)}var f={},b={},k=!1,n=a('path',e),g,h;return g=function(b,d,a,e){function f(f,g){if(typeof f==='string')return h(b,d,a,f,e);f=f.map(function(c){return h(b,d,a,c,e)}),c.nextTick(function(){g.apply(null,f)})}return f.toUrl=function(b){return b.indexOf('.')===0?j(b,n.dirname(a.filename)):b},f},i=i||function a(){return e.require.apply(e,arguments)},h=function(d,e,i,a,c){var k=a.indexOf('!'),n=a,q,l;if(k===-1)if(a=j(a,c),a==='require')return g(d,e,i,c);else if(a==='exports')return e;else if(a==='module')return i;else if(b.hasOwnProperty(a))return b[a];else if(f[a])return m.apply(null,f[a]),b[a];else if(d)return d(n);else throw new Error('No module with ID: '+a);else return q=a.substring(0,k),a=a.substring(k+1,a.length),l=h(d,e,i,q,c),l.normalize?a=l.normalize(a,p(c)):a=j(a,c),b[a]?b[a]:(l.load(a,g(d,e,i,c),o(a),{}),b[a])},l.require=function(a){return b[a]?b[a]:f[a]?(m.apply(null,f[a]),b[a]):void 0},l.amd={},l}b.exports=e}),a.define('/node_modules/source-map/lib/source-map/source-map-generator.js',function(c,d,e,f){if(typeof b!=='function')var b=a('/node_modules/source-map/node_modules/amdefine/amdefine.js',c)(c,a);b(function(e,g,f){function b(b){this._file=a.getArg(b,'file'),this._sourceRoot=a.getArg(b,'sourceRoot',null),this._sources=new d,this._names=new d,this._mappings=[],this._sourcesContents=null}var c=e('/node_modules/source-map/lib/source-map/base64-vlq.js',f),a=e('/node_modules/source-map/lib/source-map/util.js',f),d=e('/node_modules/source-map/lib/source-map/array-set.js',f).ArraySet;b.prototype._version=3,b.fromSourceMap=function c(c){var d=c.sourceRoot,e=new b({file:c.file,sourceRoot:d});return c.eachMapping(function(b){var c={generated:{line:b.generatedLine,column:b.generatedColumn}};b.source&&(c.source=b.source,d&&(c.source=a.relative(d,c.source)),c.original={line:b.originalLine,column:b.originalColumn},b.name&&(c.name=b.name)),e.addMapping(c)}),c.sources.forEach(function(b){var a=c.sourceContentFor(b);a&&e.setSourceContent(b,a)}),e},b.prototype.addMapping=function b(e){var f=a.getArg(e,'generated'),b=a.getArg(e,'original',null),c=a.getArg(e,'source',null),d=a.getArg(e,'name',null);this._validateMapping(f,b,c,d),c&&!this._sources.has(c)&&this._sources.add(c),d&&!this._names.has(d)&&this._names.add(d),this._mappings.push({generatedLine:f.line,generatedColumn:f.column,originalLine:b!=null&&b.line,originalColumn:b!=null&&b.column,source:c,name:d})},b.prototype.setSourceContent=function b(d,c){var b=d;this._sourceRoot&&(b=a.relative(this._sourceRoot,b)),c!==null?(this._sourcesContents||(this._sourcesContents={}),this._sourcesContents[a.toSetString(b)]=c):(delete this._sourcesContents[a.toSetString(b)],Object.keys(this._sourcesContents).length===0&&(this._sourcesContents=null))},b.prototype.applySourceMap=function b(e,c){c||(c=e.file);var b=this._sourceRoot;b&&(c=a.relative(b,c));var f=new d,g=new d;this._mappings.forEach(function(d){if(d.source===c&&d.originalLine){var h=e.originalPositionFor({line:d.originalLine,column:d.originalColumn});h.source!==null&&(b?d.source=a.relative(b,h.source):d.source=h.source,d.originalLine=h.line,d.originalColumn=h.column,h.name!==null&&d.name!==null&&(d.name=h.name))}var i=d.source;i&&!f.has(i)&&f.add(i);var j=d.name;j&&!g.has(j)&&g.add(j)},this),this._sources=f,this._names=g,e.sources.forEach(function(c){var d=e.sourceContentFor(c);d&&(b&&(c=a.relative(b,c)),this.setSourceContent(c,d))},this)},b.prototype._validateMapping=function a(a,b,c,d){if(a&&'line'in a&&'column'in a&&a.line>0&&a.column>=0&&!b&&!c&&!d)return;else if(a&&'line'in a&&'column'in a&&b&&'line'in b&&'column'in b&&a.line>0&&a.column>=0&&b.line>0&&b.column>=0&&c)return;else throw new Error('Invalid mapping: '+JSON.stringify({generated:a,source:c,orginal:b,name:d}))},b.prototype._serializeMappings=function b(){var g=0,f=1,i=0,j=0,h=0,k=0,d='',b;this._mappings.sort(a.compareByGeneratedPositions);for(var e=0,l=this._mappings.length;e0){if(!a.compareByGeneratedPositions(b,this._mappings[e-1]))continue;d+=','}d+=c.encode(b.generatedColumn-g),g=b.generatedColumn,b.source&&(d+=c.encode(this._sources.indexOf(b.source)-k),k=this._sources.indexOf(b.source),d+=c.encode(b.originalLine-1-j),j=b.originalLine-1,d+=c.encode(b.originalColumn-i),i=b.originalColumn,b.name&&(d+=c.encode(this._names.indexOf(b.name)-h),h=this._names.indexOf(b.name)))}return d},b.prototype._generateSourcesContent=function b(c,b){return c.map(function(c){if(!this._sourcesContents)return null;b&&(c=a.relative(b,c));var d=a.toSetString(c);return Object.prototype.hasOwnProperty.call(this._sourcesContents,d)?this._sourcesContents[d]:null},this)},b.prototype.toJSON=function a(){var a={version:this._version,file:this._file,sources:this._sources.toArray(),names:this._names.toArray(),mappings:this._serializeMappings()};return this._sourceRoot&&(a.sourceRoot=this._sourceRoot),this._sourcesContents&&(a.sourcesContent=this._generateSourcesContent(a.sources,a.sourceRoot)),a},b.prototype.toString=function a(){return JSON.stringify(this)},g.SourceMapGenerator=b})}),a.define('/node_modules/source-map/lib/source-map/array-set.js',function(c,d,e,f){if(typeof b!=='function')var b=a('/node_modules/source-map/node_modules/amdefine/amdefine.js',c)(c,a);b(function(c,d,e){function a(){this._array=[],this._set={}}var b=c('/node_modules/source-map/lib/source-map/util.js',e);a.fromArray=function b(d,f){var c=new a;for(var b=0,e=d.length;b=0&&a>1;return c?-a:a}var c=j('/node_modules/source-map/lib/source-map/base64.js',h),a=5,d=1<>>=a,d>0&&(g|=b),f+=c.encode(g);while(d>0);return f},f.decode=function d(h){var d=0,k=h.length,i=0,j=0,l,f;do{if(d>=k)throw new Error('Expected more digits in base 64 VLQ value.');f=c.decode(h.charAt(d++)),l=!!(f&b),f&=e,i+=f<0)if(b.charAt(0)===';')i++,b=b.slice(1),g=0;else if(b.charAt(0)===',')b=b.slice(1);else{if(e={},e.generatedLine=i,d=c.decode(b),e.generatedColumn=g+d.value,g=e.generatedColumn,b=d.rest,b.length>0&&!f.test(b.charAt(0))){if(d=c.decode(b),e.source=this._sources.at(j+d.value),j+=d.value,b=d.rest,b.length===0||f.test(b.charAt(0)))throw new Error('Found a source, but no line and column');if(d=c.decode(b),e.originalLine=h+d.value,h=e.originalLine,e.originalLine+=1,b=d.rest,b.length===0||f.test(b.charAt(0)))throw new Error('Found a source and line, but no column');d=c.decode(b),e.originalColumn=l+d.value,l=e.originalColumn,b=d.rest,b.length>0&&!f.test(b.charAt(0))&&(d=c.decode(b),e.name=this._names.at(k+d.value),k+=d.value,b=d.rest)}this.__generatedMappings.push(e),typeof e.originalLine==='number'&&this.__originalMappings.push(e)}this.__originalMappings.sort(a.compareByOriginalPositions)},b.prototype._findMapping=function a(a,d,b,c,e){if(a[b]<=0)throw new TypeError('Line must be greater than or equal to 1, got '+a[b]);if(a[c]<0)throw new TypeError('Column must be greater than or equal to 0, got '+a[c]);return g.search(a,d,e)},b.prototype.originalPositionFor=function b(d){var e={generatedLine:a.getArg(d,'line'),generatedColumn:a.getArg(d,'column')},b=this._findMapping(e,this._generatedMappings,'generatedLine','generatedColumn',a.compareByGeneratedPositions);if(b){var c=a.getArg(b,'source',null);return c&&this.sourceRoot&&(c=a.join(this.sourceRoot,c)),{source:c,line:a.getArg(b,'originalLine',null),column:a.getArg(b,'originalColumn',null),name:a.getArg(b,'name',null)}}return{source:null,line:null,column:null,name:null}},b.prototype.sourceContentFor=function b(b){if(!this.sourcesContent)return null;if(this.sourceRoot&&(b=a.relative(this.sourceRoot,b)),this._sources.has(b))return this.sourcesContent[this._sources.indexOf(b)];var c;if(this.sourceRoot&&(c=a.urlParse(this.sourceRoot))){var d=b.replace(/^file:\/\//,'');if(c.scheme=='file'&&this._sources.has(d))return this.sourcesContent[this._sources.indexOf(d)];if((!c.path||c.path=='/')&&this._sources.has('/'+b))return this.sourcesContent[this._sources.indexOf('/'+b)]}throw new Error('"'+b+'" is not in the SourceMap.')},b.prototype.generatedPositionFor=function b(d){var b={source:a.getArg(d,'source'),originalLine:a.getArg(d,'line'),originalColumn:a.getArg(d,'column')};this.sourceRoot&&(b.source=a.relative(this.sourceRoot,b.source));var c=this._findMapping(b,this._originalMappings,'originalLine','originalColumn',a.compareByOriginalPositions);return c?{line:a.getArg(c,'generatedLine',null),column:a.getArg(c,'generatedColumn',null)}:{line:null,column:null}},b.GENERATED_ORDER=1,b.ORIGINAL_ORDER=2,b.prototype.eachMapping=function c(g,h,i){var e=h||null,f=i||b.GENERATED_ORDER,c;switch(f){case b.GENERATED_ORDER:c=this._generatedMappings;break;case b.ORIGINAL_ORDER:c=this._originalMappings;break;default:throw new Error('Unknown order of iteration.')}var d=this.sourceRoot;c.map(function(b){var c=b.source;return c&&d&&(c=a.join(d,c)),{source:c,generatedLine:b.generatedLine,generatedColumn:b.generatedColumn,originalLine:b.originalLine,originalColumn:b.originalColumn,name:b.name}}).forEach(g,e)},h.SourceMapConsumer=b})}),a.define('/node_modules/source-map/lib/source-map/binary-search.js',function(c,d,e,f){if(typeof b!=='function')var b=a('/node_modules/source-map/node_modules/amdefine/amdefine.js',c)(c,a);b(function(c,b,d){function a(c,e,f,d,g){var b=Math.floor((e-c)/2)+c,h=g(f,d[b],!0);return h===0?d[b]:h>0?e-b>1?a(b,e,f,d,g):d[b]:b-c>1?a(c,b,f,d,g):c<0?null:d[c]}b.search=function b(c,b,d){return b.length>0?a(-1,b.length,c,b,d):null}})}),a.define('/node_modules/esutils/lib/utils.js',function(b,c,d,e){!function(){'use strict';c.code=a('/node_modules/esutils/lib/code.js',b),c.keyword=a('/node_modules/esutils/lib/keyword.js',b)}()}),a.define('/node_modules/esutils/lib/keyword.js',function(b,c,d,e){!function(c){'use strict';function e(a){switch(a){case'implements':case'interface':case'package':case'private':case'protected':case'public':case'static':case'let':return!0;default:return!1}}function f(a,b){return!b&&a==='yield'?!1:d(a,b)}function d(a,b){if(b&&e(a))return!0;switch(a.length){case 2:return a==='if'||a==='in'||a==='do';case 3:return a==='var'||a==='for'||a==='new'||a==='try';case 4:return a==='this'||a==='else'||a==='case'||a==='void'||a==='with'||a==='enum';case 5:return a==='while'||a==='break'||a==='catch'||a==='throw'||a==='const'||a==='yield'||a==='class'||a==='super';case 6:return a==='return'||a==='typeof'||a==='delete'||a==='switch'||a==='export'||a==='import';case 7:return a==='default'||a==='finally'||a==='extends';case 8:return a==='function'||a==='continue'||a==='debugger';case 10:return a==='instanceof';default:return!1}}function g(a){return a==='eval'||a==='arguments'}function h(b){var d,e,a;if(b.length===0)return!1;if(a=b.charCodeAt(0),!c.isIdentifierStart(a)||a===92)return!1;for(d=1,e=b.length;d=48&&a<=57}function d(a){return c(a)||97<=a&&a<=102||65<=a&&a<=70}function e(a){return a>=48&&a<=55}function f(a){return a===32||a===9||a===11||a===12||a===160||a>=5760&&[5760,6158,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(a)>=0}function g(a){return a===10||a===13||a===8232||a===8233}function h(a){return a===36||a===95||a>=65&&a<=90||a>=97&&a<=122||a===92||a>=128&&b.NonAsciiIdentifierStart.test(String.fromCharCode(a))}function i(a){return a===36||a===95||a>=65&&a<=90||a>=97&&a<=122||a>=48&&a<=57||a===92||a>=128&&b.NonAsciiIdentifierPart.test(String.fromCharCode(a))}b={NonAsciiIdentifierStart:new RegExp('[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠࢢ-ࢬऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꪀ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]'),NonAsciiIdentifierPart:new RegExp('[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԧԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠࢢ-ࢬࣤ-ࣾऀ-ॣ०-९ॱ-ॷॹ-ॿঁ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఁ-ఃఅ-ఌఎ-ఐఒ-నప-ళవ-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಂಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲംഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤜᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶᴀ-ᷦ᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚗꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞓꞠ-Ɦꟸ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺꩻꪀ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︦︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]')},a.exports={isDecimalDigit:c,isHexDigit:d,isOctalDigit:e,isWhiteSpace:f,isLineTerminator:g,isIdentifierStart:h,isIdentifierPart:i}}()}),a.define('/node_modules/estraverse/estraverse.js',function(b,a,c,d){!function(c,b){'use strict';typeof define==='function'&&define.amd?define(['exports'],b):a!==void 0?b(a):b(c.estraverse={})}(this,function(e){'use strict';function m(){}function l(d){var c={},a,b;for(a in d)d.hasOwnProperty(a)&&(b=d[a],typeof b==='object'&&b!==null?c[a]=l(b):c[a]=b);return c}function s(b){var c={},a;for(a in b)b.hasOwnProperty(a)&&(c[a]=b[a]);return c}function r(e,f){var b,a,c,d;a=e.length,c=0;while(a)b=a>>>1,d=c+b,f(e[d])?a=b:(c=d+1,a-=b+1);return c}function q(e,f){var b,a,c,d;a=e.length,c=0;while(a)b=a>>>1,d=c+b,f(e[d])?(c=d+1,a-=b+1):a=b;return c}function h(a,b){this.parent=a,this.key=b}function d(a,b,c,d){this.node=a,this.path=b,this.wrap=c,this.ref=d}function b(){}function k(c,d){var a=new b;return a.traverse(c,d)}function p(c,d){var a=new b;return a.replace(c,d)}function n(a,c){var b;return b=r(c,function b(b){return b.range[0]>a.range[0]}),a.extendedRange=[a.range[0],a.range[1]],b!==c.length&&(a.extendedRange[1]=c[b].range[0]),b-=1,b>=0&&(a.extendedRange[0]=c[b].range[1]),a}function o(d,e,i){var a=[],h,g,c,b;if(!d.range)throw new Error('attachComments needs range information');if(!i.length){if(e.length){for(c=0,g=e.length;cc.range[0])break;d.extendedRange[1]===c.range[0]?(c.leadingComments||(c.leadingComments=[]),c.leadingComments.push(d),a.splice(b,1)):b+=1}return b===a.length?f.Break:a[b].extendedRange[0]>c.range[1]?f.Skip:void 0}}),b=0,k(d,{leave:function(c){var d;while(bc.range[1]?f.Skip:void 0}}),d}var i,g,f,j,a,c;i={AssignmentExpression:'AssignmentExpression',ArrayExpression:'ArrayExpression',ArrayPattern:'ArrayPattern',ArrowFunctionExpression:'ArrowFunctionExpression',BlockStatement:'BlockStatement',BinaryExpression:'BinaryExpression',BreakStatement:'BreakStatement',CallExpression:'CallExpression',CatchClause:'CatchClause',ClassBody:'ClassBody',ClassDeclaration:'ClassDeclaration',ClassExpression:'ClassExpression',ConditionalExpression:'ConditionalExpression',ContinueStatement:'ContinueStatement',DebuggerStatement:'DebuggerStatement',DirectiveStatement:'DirectiveStatement',DoWhileStatement:'DoWhileStatement',EmptyStatement:'EmptyStatement',ExpressionStatement:'ExpressionStatement',ForStatement:'ForStatement',ForInStatement:'ForInStatement',FunctionDeclaration:'FunctionDeclaration',FunctionExpression:'FunctionExpression',Identifier:'Identifier',IfStatement:'IfStatement',Literal:'Literal',LabeledStatement:'LabeledStatement',LogicalExpression:'LogicalExpression',MemberExpression:'MemberExpression',MethodDefinition:'MethodDefinition',NewExpression:'NewExpression',ObjectExpression:'ObjectExpression',ObjectPattern:'ObjectPattern',Program:'Program',Property:'Property',ReturnStatement:'ReturnStatement',SequenceExpression:'SequenceExpression',SwitchStatement:'SwitchStatement',SwitchCase:'SwitchCase',ThisExpression:'ThisExpression',ThrowStatement:'ThrowStatement',TryStatement:'TryStatement',UnaryExpression:'UnaryExpression',UpdateExpression:'UpdateExpression',VariableDeclaration:'VariableDeclaration',VariableDeclarator:'VariableDeclarator',WhileStatement:'WhileStatement',WithStatement:'WithStatement',YieldExpression:'YieldExpression'},g=Array.isArray,g||(g=function a(a){return Object.prototype.toString.call(a)==='[object Array]'}),m(s),m(q),j={AssignmentExpression:['left','right'],ArrayExpression:['elements'],ArrayPattern:['elements'],ArrowFunctionExpression:['params','defaults','rest','body'],BlockStatement:['body'],BinaryExpression:['left','right'],BreakStatement:['label'],CallExpression:['callee','arguments'],CatchClause:['param','body'],ClassBody:['body'],ClassDeclaration:['id','body','superClass'],ClassExpression:['id','body','superClass'],ConditionalExpression:['test','consequent','alternate'],ContinueStatement:['label'],DebuggerStatement:[],DirectiveStatement:[],DoWhileStatement:['body','test'],EmptyStatement:[],ExpressionStatement:['expression'],ForStatement:['init','test','update','body'],ForInStatement:['left','right','body'],FunctionDeclaration:['id','params','defaults','rest','body'],FunctionExpression:['id','params','defaults','rest','body'],Identifier:[],IfStatement:['test','consequent','alternate'],Literal:[],LabeledStatement:['label','body'],LogicalExpression:['left','right'],MemberExpression:['object','property'],MethodDefinition:['key','value'],NewExpression:['callee','arguments'],ObjectExpression:['properties'],ObjectPattern:['properties'],Program:['body'],Property:['key','value'],ReturnStatement:['argument'],SequenceExpression:['expressions'],SwitchStatement:['discriminant','cases'],SwitchCase:['test','consequent'],ThisExpression:[],ThrowStatement:['argument'],TryStatement:['block','handlers','handler','guardedHandlers','finalizer'],UnaryExpression:['argument'],UpdateExpression:['argument'],VariableDeclaration:['declarations'],VariableDeclarator:['id','init'],WhileStatement:['test','body'],WithStatement:['object','body'],YieldExpression:['argument']},a={},c={},f={Break:a,Skip:c},h.prototype.replace=function a(a){this.parent[this.key]=a},b.prototype.path=function a(){function d(c,a){if(g(a))for(b=0,f=a.length;b=0){if(l=p[o],e=s[l],!e)continue;if(!g(e)){f.push(new d(e,l,null,null));continue}h=e.length;while((h-=1)>=0){if(!e[h])continue;(m===i.ObjectExpression||m===i.ObjectPattern)&&'properties'===p[o]?b=new d(e[h],[l,h],'Property',null):b=new d(e[h],[l,h],null,null),f.push(b)}}}}},b.prototype.replace=function b(t,u){var l,q,n,s,e,b,p,k,r,f,v,o,m;this.__initialize(t,u),v={},l=this.__worklist,q=this.__leavelist,o={root:t},b=new d(t,null,null,new h(o,'root')),l.push(b),q.push(b);while(l.length){if(b=l.pop(),b===v){if(b=q.pop(),e=this.__execute(u.leave,b),e!==undefined&&e!==a&&e!==c&&b.ref.replace(e),this.__state===a||e===a)return o.root;continue}if(e=this.__execute(u.enter,b),e!==undefined&&e!==a&&e!==c&&(b.ref.replace(e),b.node=e),this.__state===a||e===a)return o.root;if(n=b.node,!n)continue;if(l.push(v),q.push(b),this.__state===c||e===c)continue;s=b.wrap||n.type,r=j[s],p=r.length;while((p-=1)>=0){if(m=r[p],f=n[m],!f)continue;if(!g(f)){l.push(new d(f,m,null,new h(n,m)));continue}k=f.length;while((k-=1)>=0){if(!f[k])continue;s===i.ObjectExpression&&'properties'===r[p]?b=new d(f[k],[m,k],'Property',new h(f,k)):b=new d(f[k],[m,k],null,new h(f,k)),l.push(b)}}}return o.root},e.version='1.3.3-dev',e.Syntax=i,e.traverse=k,e.replace=p,e.attachComments=o,e.VisitorKeys=j,e.VisitorOption=f,e.Controller=b})}),a('/tools/entry-point.js')}.call(this,this)) diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/escodegen/escodegen.js b/pitfall/pdfkit/node_modules/detective/node_modules/escodegen/escodegen.js new file mode 100644 index 00000000..5da0a677 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/escodegen/escodegen.js @@ -0,0 +1,2153 @@ +/* + Copyright (C) 2012-2013 Yusuke Suzuki + Copyright (C) 2012-2013 Michael Ficarra + Copyright (C) 2012-2013 Mathias Bynens + Copyright (C) 2013 Irakli Gozalishvili + Copyright (C) 2012 Robert Gust-Bardon + Copyright (C) 2012 John Freeman + Copyright (C) 2011-2012 Ariya Hidayat + Copyright (C) 2012 Joost-Wim Boekesteijn + Copyright (C) 2012 Kris Kowal + Copyright (C) 2012 Arpad Borsos + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*global exports:true, generateStatement:true, generateExpression:true, require:true, global:true*/ +(function () { + 'use strict'; + + var Syntax, + Precedence, + BinaryPrecedence, + SourceNode, + estraverse, + esutils, + isArray, + base, + indent, + json, + renumber, + hexadecimal, + quotes, + escapeless, + newline, + space, + parentheses, + semicolons, + safeConcatenation, + directive, + extra, + parse, + sourceMap, + FORMAT_MINIFY, + FORMAT_DEFAULTS; + + estraverse = require('estraverse'); + esutils = require('esutils'); + + Syntax = { + AssignmentExpression: 'AssignmentExpression', + ArrayExpression: 'ArrayExpression', + ArrayPattern: 'ArrayPattern', + ArrowFunctionExpression: 'ArrowFunctionExpression', + BlockStatement: 'BlockStatement', + BinaryExpression: 'BinaryExpression', + BreakStatement: 'BreakStatement', + CallExpression: 'CallExpression', + CatchClause: 'CatchClause', + ComprehensionBlock: 'ComprehensionBlock', + ComprehensionExpression: 'ComprehensionExpression', + ConditionalExpression: 'ConditionalExpression', + ContinueStatement: 'ContinueStatement', + DirectiveStatement: 'DirectiveStatement', + DoWhileStatement: 'DoWhileStatement', + DebuggerStatement: 'DebuggerStatement', + EmptyStatement: 'EmptyStatement', + ExportDeclaration: 'ExportDeclaration', + ExpressionStatement: 'ExpressionStatement', + ForStatement: 'ForStatement', + ForInStatement: 'ForInStatement', + FunctionDeclaration: 'FunctionDeclaration', + FunctionExpression: 'FunctionExpression', + GeneratorExpression: 'GeneratorExpression', + Identifier: 'Identifier', + IfStatement: 'IfStatement', + Literal: 'Literal', + LabeledStatement: 'LabeledStatement', + LogicalExpression: 'LogicalExpression', + MemberExpression: 'MemberExpression', + NewExpression: 'NewExpression', + ObjectExpression: 'ObjectExpression', + ObjectPattern: 'ObjectPattern', + Program: 'Program', + Property: 'Property', + ReturnStatement: 'ReturnStatement', + SequenceExpression: 'SequenceExpression', + SwitchStatement: 'SwitchStatement', + SwitchCase: 'SwitchCase', + ThisExpression: 'ThisExpression', + ThrowStatement: 'ThrowStatement', + TryStatement: 'TryStatement', + UnaryExpression: 'UnaryExpression', + UpdateExpression: 'UpdateExpression', + VariableDeclaration: 'VariableDeclaration', + VariableDeclarator: 'VariableDeclarator', + WhileStatement: 'WhileStatement', + WithStatement: 'WithStatement', + YieldExpression: 'YieldExpression' + }; + + Precedence = { + Sequence: 0, + Yield: 1, + Assignment: 1, + Conditional: 2, + ArrowFunction: 2, + LogicalOR: 3, + LogicalAND: 4, + BitwiseOR: 5, + BitwiseXOR: 6, + BitwiseAND: 7, + Equality: 8, + Relational: 9, + BitwiseSHIFT: 10, + Additive: 11, + Multiplicative: 12, + Unary: 13, + Postfix: 14, + Call: 15, + New: 16, + Member: 17, + Primary: 18 + }; + + BinaryPrecedence = { + '||': Precedence.LogicalOR, + '&&': Precedence.LogicalAND, + '|': Precedence.BitwiseOR, + '^': Precedence.BitwiseXOR, + '&': Precedence.BitwiseAND, + '==': Precedence.Equality, + '!=': Precedence.Equality, + '===': Precedence.Equality, + '!==': Precedence.Equality, + 'is': Precedence.Equality, + 'isnt': Precedence.Equality, + '<': Precedence.Relational, + '>': Precedence.Relational, + '<=': Precedence.Relational, + '>=': Precedence.Relational, + 'in': Precedence.Relational, + 'instanceof': Precedence.Relational, + '<<': Precedence.BitwiseSHIFT, + '>>': Precedence.BitwiseSHIFT, + '>>>': Precedence.BitwiseSHIFT, + '+': Precedence.Additive, + '-': Precedence.Additive, + '*': Precedence.Multiplicative, + '%': Precedence.Multiplicative, + '/': Precedence.Multiplicative + }; + + function getDefaultOptions() { + // default options + return { + indent: null, + base: null, + parse: null, + comment: false, + format: { + indent: { + style: ' ', + base: 0, + adjustMultilineComment: false + }, + newline: '\n', + space: ' ', + json: false, + renumber: false, + hexadecimal: false, + quotes: 'single', + escapeless: false, + compact: false, + parentheses: true, + semicolons: true, + safeConcatenation: false + }, + moz: { + comprehensionExpressionStartsWithAssignment: false, + starlessGenerator: false, + parenthesizedComprehensionBlock: false + }, + sourceMap: null, + sourceMapRoot: null, + sourceMapWithCode: false, + directive: false, + verbatim: null + }; + } + + function stringRepeat(str, num) { + var result = ''; + + for (num |= 0; num > 0; num >>>= 1, str += str) { + if (num & 1) { + result += str; + } + } + + return result; + } + + isArray = Array.isArray; + if (!isArray) { + isArray = function isArray(array) { + return Object.prototype.toString.call(array) === '[object Array]'; + }; + } + + function hasLineTerminator(str) { + return (/[\r\n]/g).test(str); + } + + function endsWithLineTerminator(str) { + var len = str.length; + return len && esutils.code.isLineTerminator(str.charCodeAt(len - 1)); + } + + function updateDeeply(target, override) { + var key, val; + + function isHashObject(target) { + return typeof target === 'object' && target instanceof Object && !(target instanceof RegExp); + } + + for (key in override) { + if (override.hasOwnProperty(key)) { + val = override[key]; + if (isHashObject(val)) { + if (isHashObject(target[key])) { + updateDeeply(target[key], val); + } else { + target[key] = updateDeeply({}, val); + } + } else { + target[key] = val; + } + } + } + return target; + } + + function generateNumber(value) { + var result, point, temp, exponent, pos; + + if (value !== value) { + throw new Error('Numeric literal whose value is NaN'); + } + if (value < 0 || (value === 0 && 1 / value < 0)) { + throw new Error('Numeric literal whose value is negative'); + } + + if (value === 1 / 0) { + return json ? 'null' : renumber ? '1e400' : '1e+400'; + } + + result = '' + value; + if (!renumber || result.length < 3) { + return result; + } + + point = result.indexOf('.'); + if (!json && result.charCodeAt(0) === 0x30 /* 0 */ && point === 1) { + point = 0; + result = result.slice(1); + } + temp = result; + result = result.replace('e+', 'e'); + exponent = 0; + if ((pos = temp.indexOf('e')) > 0) { + exponent = +temp.slice(pos + 1); + temp = temp.slice(0, pos); + } + if (point >= 0) { + exponent -= temp.length - point - 1; + temp = +(temp.slice(0, point) + temp.slice(point + 1)) + ''; + } + pos = 0; + while (temp.charCodeAt(temp.length + pos - 1) === 0x30 /* 0 */) { + --pos; + } + if (pos !== 0) { + exponent -= pos; + temp = temp.slice(0, pos); + } + if (exponent !== 0) { + temp += 'e' + exponent; + } + if ((temp.length < result.length || + (hexadecimal && value > 1e12 && Math.floor(value) === value && (temp = '0x' + value.toString(16)).length < result.length)) && + +temp === value) { + result = temp; + } + + return result; + } + + // Generate valid RegExp expression. + // This function is based on https://github.com/Constellation/iv Engine + + function escapeRegExpCharacter(ch, previousIsBackslash) { + // not handling '\' and handling \u2028 or \u2029 to unicode escape sequence + if ((ch & ~1) === 0x2028) { + return (previousIsBackslash ? 'u' : '\\u') + ((ch === 0x2028) ? '2028' : '2029'); + } else if (ch === 10 || ch === 13) { // \n, \r + return (previousIsBackslash ? '' : '\\') + ((ch === 10) ? 'n' : 'r'); + } + return String.fromCharCode(ch); + } + + function generateRegExp(reg) { + var match, result, flags, i, iz, ch, characterInBrack, previousIsBackslash; + + result = reg.toString(); + + if (reg.source) { + // extract flag from toString result + match = result.match(/\/([^/]*)$/); + if (!match) { + return result; + } + + flags = match[1]; + result = ''; + + characterInBrack = false; + previousIsBackslash = false; + for (i = 0, iz = reg.source.length; i < iz; ++i) { + ch = reg.source.charCodeAt(i); + + if (!previousIsBackslash) { + if (characterInBrack) { + if (ch === 93) { // ] + characterInBrack = false; + } + } else { + if (ch === 47) { // / + result += '\\'; + } else if (ch === 91) { // [ + characterInBrack = true; + } + } + result += escapeRegExpCharacter(ch, previousIsBackslash); + previousIsBackslash = ch === 92; // \ + } else { + // if new RegExp("\\\n') is provided, create /\n/ + result += escapeRegExpCharacter(ch, previousIsBackslash); + // prevent like /\\[/]/ + previousIsBackslash = false; + } + } + + return '/' + result + '/' + flags; + } + + return result; + } + + function escapeAllowedCharacter(code, next) { + var hex, result = '\\'; + + switch (code) { + case 0x08 /* \b */: + result += 'b'; + break; + case 0x0C /* \f */: + result += 'f'; + break; + case 0x09 /* \t */: + result += 't'; + break; + default: + hex = code.toString(16).toUpperCase(); + if (json || code > 0xFF) { + result += 'u' + '0000'.slice(hex.length) + hex; + } else if (code === 0x0000 && !esutils.code.isDecimalDigit(next)) { + result += '0'; + } else if (code === 0x000B /* \v */) { // '\v' + result += 'x0B'; + } else { + result += 'x' + '00'.slice(hex.length) + hex; + } + break; + } + + return result; + } + + function escapeDisallowedCharacter(code) { + var result = '\\'; + switch (code) { + case 0x5C /* \ */: + result += '\\'; + break; + case 0x0A /* \n */: + result += 'n'; + break; + case 0x0D /* \r */: + result += 'r'; + break; + case 0x2028: + result += 'u2028'; + break; + case 0x2029: + result += 'u2029'; + break; + default: + throw new Error('Incorrectly classified character'); + } + + return result; + } + + function escapeDirective(str) { + var i, iz, code, quote; + + quote = quotes === 'double' ? '"' : '\''; + for (i = 0, iz = str.length; i < iz; ++i) { + code = str.charCodeAt(i); + if (code === 0x27 /* ' */) { + quote = '"'; + break; + } else if (code === 0x22 /* " */) { + quote = '\''; + break; + } else if (code === 0x5C /* \ */) { + ++i; + } + } + + return quote + str + quote; + } + + function escapeString(str) { + var result = '', i, len, code, singleQuotes = 0, doubleQuotes = 0, single, quote; + + for (i = 0, len = str.length; i < len; ++i) { + code = str.charCodeAt(i); + if (code === 0x27 /* ' */) { + ++singleQuotes; + } else if (code === 0x22 /* " */) { + ++doubleQuotes; + } else if (code === 0x2F /* / */ && json) { + result += '\\'; + } else if (esutils.code.isLineTerminator(code) || code === 0x5C /* \ */) { + result += escapeDisallowedCharacter(code); + continue; + } else if ((json && code < 0x20 /* SP */) || !(json || escapeless || (code >= 0x20 /* SP */ && code <= 0x7E /* ~ */))) { + result += escapeAllowedCharacter(code, str.charCodeAt(i + 1)); + continue; + } + result += String.fromCharCode(code); + } + + single = !(quotes === 'double' || (quotes === 'auto' && doubleQuotes < singleQuotes)); + quote = single ? '\'' : '"'; + + if (!(single ? singleQuotes : doubleQuotes)) { + return quote + result + quote; + } + + str = result; + result = quote; + + for (i = 0, len = str.length; i < len; ++i) { + code = str.charCodeAt(i); + if ((code === 0x27 /* ' */ && single) || (code === 0x22 /* " */ && !single)) { + result += '\\'; + } + result += String.fromCharCode(code); + } + + return result + quote; + } + + /** + * flatten an array to a string, where the array can contain + * either strings or nested arrays + */ + function flattenToString(arr) { + var i, iz, elem, result = ''; + for (i = 0, iz = arr.length; i < iz; ++i) { + elem = arr[i]; + result += isArray(elem) ? flattenToString(elem) : elem; + } + return result; + } + + /** + * convert generated to a SourceNode when source maps are enabled. + */ + function toSourceNodeWhenNeeded(generated, node) { + if (!sourceMap) { + // with no source maps, generated is either an + // array or a string. if an array, flatten it. + // if a string, just return it + if (isArray(generated)) { + return flattenToString(generated); + } else { + return generated; + } + } + if (node == null) { + if (generated instanceof SourceNode) { + return generated; + } else { + node = {}; + } + } + if (node.loc == null) { + return new SourceNode(null, null, sourceMap, generated, node.name || null); + } + return new SourceNode(node.loc.start.line, node.loc.start.column, (sourceMap === true ? node.loc.source || null : sourceMap), generated, node.name || null); + } + + function noEmptySpace() { + return (space) ? space : ' '; + } + + function join(left, right) { + var leftSource = toSourceNodeWhenNeeded(left).toString(), + rightSource = toSourceNodeWhenNeeded(right).toString(), + leftCharCode = leftSource.charCodeAt(leftSource.length - 1), + rightCharCode = rightSource.charCodeAt(0); + + if ((leftCharCode === 0x2B /* + */ || leftCharCode === 0x2D /* - */) && leftCharCode === rightCharCode || + esutils.code.isIdentifierPart(leftCharCode) && esutils.code.isIdentifierPart(rightCharCode) || + leftCharCode === 0x2F /* / */ && rightCharCode === 0x69 /* i */) { // infix word operators all start with `i` + return [left, noEmptySpace(), right]; + } else if (esutils.code.isWhiteSpace(leftCharCode) || esutils.code.isLineTerminator(leftCharCode) || + esutils.code.isWhiteSpace(rightCharCode) || esutils.code.isLineTerminator(rightCharCode)) { + return [left, right]; + } + return [left, space, right]; + } + + function addIndent(stmt) { + return [base, stmt]; + } + + function withIndent(fn) { + var previousBase, result; + previousBase = base; + base += indent; + result = fn.call(this, base); + base = previousBase; + return result; + } + + function calculateSpaces(str) { + var i; + for (i = str.length - 1; i >= 0; --i) { + if (esutils.code.isLineTerminator(str.charCodeAt(i))) { + break; + } + } + return (str.length - 1) - i; + } + + function adjustMultilineComment(value, specialBase) { + var array, i, len, line, j, spaces, previousBase, sn; + + array = value.split(/\r\n|[\r\n]/); + spaces = Number.MAX_VALUE; + + // first line doesn't have indentation + for (i = 1, len = array.length; i < len; ++i) { + line = array[i]; + j = 0; + while (j < line.length && esutils.code.isWhiteSpace(line.charCodeAt(j))) { + ++j; + } + if (spaces > j) { + spaces = j; + } + } + + if (typeof specialBase !== 'undefined') { + // pattern like + // { + // var t = 20; /* + // * this is comment + // */ + // } + previousBase = base; + if (array[1][spaces] === '*') { + specialBase += ' '; + } + base = specialBase; + } else { + if (spaces & 1) { + // /* + // * + // */ + // If spaces are odd number, above pattern is considered. + // We waste 1 space. + --spaces; + } + previousBase = base; + } + + for (i = 1, len = array.length; i < len; ++i) { + sn = toSourceNodeWhenNeeded(addIndent(array[i].slice(spaces))); + array[i] = sourceMap ? sn.join('') : sn; + } + + base = previousBase; + + return array.join('\n'); + } + + function generateComment(comment, specialBase) { + if (comment.type === 'Line') { + if (endsWithLineTerminator(comment.value)) { + return '//' + comment.value; + } else { + // Always use LineTerminator + return '//' + comment.value + '\n'; + } + } + if (extra.format.indent.adjustMultilineComment && /[\n\r]/.test(comment.value)) { + return adjustMultilineComment('/*' + comment.value + '*/', specialBase); + } + return '/*' + comment.value + '*/'; + } + + function addCommentsToStatement(stmt, result) { + var i, len, comment, save, tailingToStatement, specialBase, fragment; + + if (stmt.leadingComments && stmt.leadingComments.length > 0) { + save = result; + + comment = stmt.leadingComments[0]; + result = []; + if (safeConcatenation && stmt.type === Syntax.Program && stmt.body.length === 0) { + result.push('\n'); + } + result.push(generateComment(comment)); + if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) { + result.push('\n'); + } + + for (i = 1, len = stmt.leadingComments.length; i < len; ++i) { + comment = stmt.leadingComments[i]; + fragment = [generateComment(comment)]; + if (!endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) { + fragment.push('\n'); + } + result.push(addIndent(fragment)); + } + + result.push(addIndent(save)); + } + + if (stmt.trailingComments) { + tailingToStatement = !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()); + specialBase = stringRepeat(' ', calculateSpaces(toSourceNodeWhenNeeded([base, result, indent]).toString())); + for (i = 0, len = stmt.trailingComments.length; i < len; ++i) { + comment = stmt.trailingComments[i]; + if (tailingToStatement) { + // We assume target like following script + // + // var t = 20; /** + // * This is comment of t + // */ + if (i === 0) { + // first case + result = [result, indent]; + } else { + result = [result, specialBase]; + } + result.push(generateComment(comment, specialBase)); + } else { + result = [result, addIndent(generateComment(comment))]; + } + if (i !== len - 1 && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) { + result = [result, '\n']; + } + } + } + + return result; + } + + function parenthesize(text, current, should) { + if (current < should) { + return ['(', text, ')']; + } + return text; + } + + function maybeBlock(stmt, semicolonOptional, functionBody) { + var result, noLeadingComment; + + noLeadingComment = !extra.comment || !stmt.leadingComments; + + if (stmt.type === Syntax.BlockStatement && noLeadingComment) { + return [space, generateStatement(stmt, { functionBody: functionBody })]; + } + + if (stmt.type === Syntax.EmptyStatement && noLeadingComment) { + return ';'; + } + + withIndent(function () { + result = [newline, addIndent(generateStatement(stmt, { semicolonOptional: semicolonOptional, functionBody: functionBody }))]; + }); + + return result; + } + + function maybeBlockSuffix(stmt, result) { + var ends = endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString()); + if (stmt.type === Syntax.BlockStatement && (!extra.comment || !stmt.leadingComments) && !ends) { + return [result, space]; + } + if (ends) { + return [result, base]; + } + return [result, newline, base]; + } + + function generateVerbatim(expr, option) { + var i, result; + result = expr[extra.verbatim].split(/\r\n|\n/); + for (i = 1; i < result.length; i++) { + result[i] = newline + base + result[i]; + } + + result = parenthesize(result, Precedence.Sequence, option.precedence); + return toSourceNodeWhenNeeded(result, expr); + } + + function generateIdentifier(node) { + return toSourceNodeWhenNeeded(node.name, node); + } + + function generatePattern(node, options) { + var result; + + if (node.type === Syntax.Identifier) { + result = generateIdentifier(node); + } else { + result = generateExpression(node, { + precedence: options.precedence, + allowIn: options.allowIn, + allowCall: true + }); + } + + return result; + } + + function generateFunctionBody(node) { + var result, i, len, expr, arrow; + + arrow = node.type === Syntax.ArrowFunctionExpression; + + if (arrow && node.params.length === 1 && node.params[0].type === Syntax.Identifier) { + // arg => { } case + result = [generateIdentifier(node.params[0])]; + } else { + result = ['(']; + for (i = 0, len = node.params.length; i < len; ++i) { + result.push(generatePattern(node.params[i], { + precedence: Precedence.Assignment, + allowIn: true + })); + if (i + 1 < len) { + result.push(',' + space); + } + } + result.push(')'); + } + + if (arrow) { + result.push(space, '=>'); + } + + if (node.expression) { + result.push(space); + expr = generateExpression(node.body, { + precedence: Precedence.Assignment, + allowIn: true, + allowCall: true + }); + if (expr.toString().charAt(0) === '{') { + expr = ['(', expr, ')']; + } + result.push(expr); + } else { + result.push(maybeBlock(node.body, false, true)); + } + return result; + } + + function generateExpression(expr, option) { + var result, + precedence, + type, + currentPrecedence, + i, + len, + raw, + fragment, + multiline, + leftCharCode, + leftSource, + rightCharCode, + allowIn, + allowCall, + allowUnparenthesizedNew, + property, + isGenerator; + + precedence = option.precedence; + allowIn = option.allowIn; + allowCall = option.allowCall; + type = expr.type || option.type; + + if (extra.verbatim && expr.hasOwnProperty(extra.verbatim)) { + return generateVerbatim(expr, option); + } + + switch (type) { + case Syntax.SequenceExpression: + result = []; + allowIn |= (Precedence.Sequence < precedence); + for (i = 0, len = expr.expressions.length; i < len; ++i) { + result.push(generateExpression(expr.expressions[i], { + precedence: Precedence.Assignment, + allowIn: allowIn, + allowCall: true + })); + if (i + 1 < len) { + result.push(',' + space); + } + } + result = parenthesize(result, Precedence.Sequence, precedence); + break; + + case Syntax.AssignmentExpression: + allowIn |= (Precedence.Assignment < precedence); + result = parenthesize( + [ + generateExpression(expr.left, { + precedence: Precedence.Call, + allowIn: allowIn, + allowCall: true + }), + space + expr.operator + space, + generateExpression(expr.right, { + precedence: Precedence.Assignment, + allowIn: allowIn, + allowCall: true + }) + ], + Precedence.Assignment, + precedence + ); + break; + + case Syntax.ArrowFunctionExpression: + allowIn |= (Precedence.ArrowFunction < precedence); + result = parenthesize(generateFunctionBody(expr), Precedence.ArrowFunction, precedence); + break; + + case Syntax.ConditionalExpression: + allowIn |= (Precedence.Conditional < precedence); + result = parenthesize( + [ + generateExpression(expr.test, { + precedence: Precedence.LogicalOR, + allowIn: allowIn, + allowCall: true + }), + space + '?' + space, + generateExpression(expr.consequent, { + precedence: Precedence.Assignment, + allowIn: allowIn, + allowCall: true + }), + space + ':' + space, + generateExpression(expr.alternate, { + precedence: Precedence.Assignment, + allowIn: allowIn, + allowCall: true + }) + ], + Precedence.Conditional, + precedence + ); + break; + + case Syntax.LogicalExpression: + case Syntax.BinaryExpression: + currentPrecedence = BinaryPrecedence[expr.operator]; + + allowIn |= (currentPrecedence < precedence); + + fragment = generateExpression(expr.left, { + precedence: currentPrecedence, + allowIn: allowIn, + allowCall: true + }); + + leftSource = fragment.toString(); + + if (leftSource.charCodeAt(leftSource.length - 1) === 0x2F /* / */ && esutils.code.isIdentifierPart(expr.operator.charCodeAt(0))) { + result = [fragment, noEmptySpace(), expr.operator]; + } else { + result = join(fragment, expr.operator); + } + + fragment = generateExpression(expr.right, { + precedence: currentPrecedence + 1, + allowIn: allowIn, + allowCall: true + }); + + if (expr.operator === '/' && fragment.toString().charAt(0) === '/' || + expr.operator.slice(-1) === '<' && fragment.toString().slice(0, 3) === '!--') { + // If '/' concats with '/' or `<` concats with `!--`, it is interpreted as comment start + result.push(noEmptySpace(), fragment); + } else { + result = join(result, fragment); + } + + if (expr.operator === 'in' && !allowIn) { + result = ['(', result, ')']; + } else { + result = parenthesize(result, currentPrecedence, precedence); + } + + break; + + case Syntax.CallExpression: + result = [generateExpression(expr.callee, { + precedence: Precedence.Call, + allowIn: true, + allowCall: true, + allowUnparenthesizedNew: false + })]; + + result.push('('); + for (i = 0, len = expr['arguments'].length; i < len; ++i) { + result.push(generateExpression(expr['arguments'][i], { + precedence: Precedence.Assignment, + allowIn: true, + allowCall: true + })); + if (i + 1 < len) { + result.push(',' + space); + } + } + result.push(')'); + + if (!allowCall) { + result = ['(', result, ')']; + } else { + result = parenthesize(result, Precedence.Call, precedence); + } + break; + + case Syntax.NewExpression: + len = expr['arguments'].length; + allowUnparenthesizedNew = option.allowUnparenthesizedNew === undefined || option.allowUnparenthesizedNew; + + result = join( + 'new', + generateExpression(expr.callee, { + precedence: Precedence.New, + allowIn: true, + allowCall: false, + allowUnparenthesizedNew: allowUnparenthesizedNew && !parentheses && len === 0 + }) + ); + + if (!allowUnparenthesizedNew || parentheses || len > 0) { + result.push('('); + for (i = 0; i < len; ++i) { + result.push(generateExpression(expr['arguments'][i], { + precedence: Precedence.Assignment, + allowIn: true, + allowCall: true + })); + if (i + 1 < len) { + result.push(',' + space); + } + } + result.push(')'); + } + + result = parenthesize(result, Precedence.New, precedence); + break; + + case Syntax.MemberExpression: + result = [generateExpression(expr.object, { + precedence: Precedence.Call, + allowIn: true, + allowCall: allowCall, + allowUnparenthesizedNew: false + })]; + + if (expr.computed) { + result.push('[', generateExpression(expr.property, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: allowCall + }), ']'); + } else { + if (expr.object.type === Syntax.Literal && typeof expr.object.value === 'number') { + fragment = toSourceNodeWhenNeeded(result).toString(); + // When the following conditions are all true, + // 1. No floating point + // 2. Don't have exponents + // 3. The last character is a decimal digit + // 4. Not hexadecimal OR octal number literal + // we should add a floating point. + if ( + fragment.indexOf('.') < 0 && + !/[eExX]/.test(fragment) && + esutils.code.isDecimalDigit(fragment.charCodeAt(fragment.length - 1)) && + !(fragment.length >= 2 && fragment.charCodeAt(0) === 48) // '0' + ) { + result.push('.'); + } + } + result.push('.', generateIdentifier(expr.property)); + } + + result = parenthesize(result, Precedence.Member, precedence); + break; + + case Syntax.UnaryExpression: + fragment = generateExpression(expr.argument, { + precedence: Precedence.Unary, + allowIn: true, + allowCall: true + }); + + if (space === '') { + result = join(expr.operator, fragment); + } else { + result = [expr.operator]; + if (expr.operator.length > 2) { + // delete, void, typeof + // get `typeof []`, not `typeof[]` + result = join(result, fragment); + } else { + // Prevent inserting spaces between operator and argument if it is unnecessary + // like, `!cond` + leftSource = toSourceNodeWhenNeeded(result).toString(); + leftCharCode = leftSource.charCodeAt(leftSource.length - 1); + rightCharCode = fragment.toString().charCodeAt(0); + + if (((leftCharCode === 0x2B /* + */ || leftCharCode === 0x2D /* - */) && leftCharCode === rightCharCode) || + (esutils.code.isIdentifierPart(leftCharCode) && esutils.code.isIdentifierPart(rightCharCode))) { + result.push(noEmptySpace(), fragment); + } else { + result.push(fragment); + } + } + } + result = parenthesize(result, Precedence.Unary, precedence); + break; + + case Syntax.YieldExpression: + if (expr.delegate) { + result = 'yield*'; + } else { + result = 'yield'; + } + if (expr.argument) { + result = join( + result, + generateExpression(expr.argument, { + precedence: Precedence.Yield, + allowIn: true, + allowCall: true + }) + ); + } + result = parenthesize(result, Precedence.Yield, precedence); + break; + + case Syntax.UpdateExpression: + if (expr.prefix) { + result = parenthesize( + [ + expr.operator, + generateExpression(expr.argument, { + precedence: Precedence.Unary, + allowIn: true, + allowCall: true + }) + ], + Precedence.Unary, + precedence + ); + } else { + result = parenthesize( + [ + generateExpression(expr.argument, { + precedence: Precedence.Postfix, + allowIn: true, + allowCall: true + }), + expr.operator + ], + Precedence.Postfix, + precedence + ); + } + break; + + case Syntax.FunctionExpression: + isGenerator = expr.generator && !extra.moz.starlessGenerator; + result = isGenerator ? 'function*' : 'function'; + + if (expr.id) { + result = [result, (isGenerator) ? space : noEmptySpace(), + generateIdentifier(expr.id), + generateFunctionBody(expr)]; + } else { + result = [result + space, generateFunctionBody(expr)]; + } + + break; + + case Syntax.ArrayPattern: + case Syntax.ArrayExpression: + if (!expr.elements.length) { + result = '[]'; + break; + } + multiline = expr.elements.length > 1; + result = ['[', multiline ? newline : '']; + withIndent(function (indent) { + for (i = 0, len = expr.elements.length; i < len; ++i) { + if (!expr.elements[i]) { + if (multiline) { + result.push(indent); + } + if (i + 1 === len) { + result.push(','); + } + } else { + result.push(multiline ? indent : '', generateExpression(expr.elements[i], { + precedence: Precedence.Assignment, + allowIn: true, + allowCall: true + })); + } + if (i + 1 < len) { + result.push(',' + (multiline ? newline : space)); + } + } + }); + if (multiline && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) { + result.push(newline); + } + result.push(multiline ? base : '', ']'); + break; + + case Syntax.Property: + if (expr.kind === 'get' || expr.kind === 'set') { + result = [ + expr.kind, noEmptySpace(), + generateExpression(expr.key, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }), + generateFunctionBody(expr.value) + ]; + } else { + if (expr.shorthand) { + result = generateExpression(expr.key, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }); + } else if (expr.method) { + result = []; + if (expr.value.generator) { + result.push('*'); + } + result.push(generateExpression(expr.key, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }), generateFunctionBody(expr.value)); + } else { + result = [ + generateExpression(expr.key, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }), + ':' + space, + generateExpression(expr.value, { + precedence: Precedence.Assignment, + allowIn: true, + allowCall: true + }) + ]; + } + } + break; + + case Syntax.ObjectExpression: + if (!expr.properties.length) { + result = '{}'; + break; + } + multiline = expr.properties.length > 1; + + withIndent(function () { + fragment = generateExpression(expr.properties[0], { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true, + type: Syntax.Property + }); + }); + + if (!multiline) { + // issues 4 + // Do not transform from + // dejavu.Class.declare({ + // method2: function () {} + // }); + // to + // dejavu.Class.declare({method2: function () { + // }}); + if (!hasLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) { + result = [ '{', space, fragment, space, '}' ]; + break; + } + } + + withIndent(function (indent) { + result = [ '{', newline, indent, fragment ]; + + if (multiline) { + result.push(',' + newline); + for (i = 1, len = expr.properties.length; i < len; ++i) { + result.push(indent, generateExpression(expr.properties[i], { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true, + type: Syntax.Property + })); + if (i + 1 < len) { + result.push(',' + newline); + } + } + } + }); + + if (!endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) { + result.push(newline); + } + result.push(base, '}'); + break; + + case Syntax.ObjectPattern: + if (!expr.properties.length) { + result = '{}'; + break; + } + + multiline = false; + if (expr.properties.length === 1) { + property = expr.properties[0]; + if (property.value.type !== Syntax.Identifier) { + multiline = true; + } + } else { + for (i = 0, len = expr.properties.length; i < len; ++i) { + property = expr.properties[i]; + if (!property.shorthand) { + multiline = true; + break; + } + } + } + result = ['{', multiline ? newline : '' ]; + + withIndent(function (indent) { + for (i = 0, len = expr.properties.length; i < len; ++i) { + result.push(multiline ? indent : '', generateExpression(expr.properties[i], { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + })); + if (i + 1 < len) { + result.push(',' + (multiline ? newline : space)); + } + } + }); + + if (multiline && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) { + result.push(newline); + } + result.push(multiline ? base : '', '}'); + break; + + case Syntax.ThisExpression: + result = 'this'; + break; + + case Syntax.Identifier: + result = generateIdentifier(expr); + break; + + case Syntax.Literal: + if (expr.hasOwnProperty('raw') && parse) { + try { + raw = parse(expr.raw).body[0].expression; + if (raw.type === Syntax.Literal) { + if (raw.value === expr.value) { + result = expr.raw; + break; + } + } + } catch (e) { + // not use raw property + } + } + + if (expr.value === null) { + result = 'null'; + break; + } + + if (typeof expr.value === 'string') { + result = escapeString(expr.value); + break; + } + + if (typeof expr.value === 'number') { + result = generateNumber(expr.value); + break; + } + + if (typeof expr.value === 'boolean') { + result = expr.value ? 'true' : 'false'; + break; + } + + result = generateRegExp(expr.value); + break; + + case Syntax.GeneratorExpression: + case Syntax.ComprehensionExpression: + // GeneratorExpression should be parenthesized with (...), ComprehensionExpression with [...] + // Due to https://bugzilla.mozilla.org/show_bug.cgi?id=883468 position of expr.body can differ in Spidermonkey and ES6 + result = (type === Syntax.GeneratorExpression) ? ['('] : ['[']; + + if (extra.moz.comprehensionExpressionStartsWithAssignment) { + fragment = generateExpression(expr.body, { + precedence: Precedence.Assignment, + allowIn: true, + allowCall: true + }); + + result.push(fragment); + } + + if (expr.blocks) { + withIndent(function () { + for (i = 0, len = expr.blocks.length; i < len; ++i) { + fragment = generateExpression(expr.blocks[i], { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }); + + if (i > 0 || extra.moz.comprehensionExpressionStartsWithAssignment) { + result = join(result, fragment); + } else { + result.push(fragment); + } + } + }); + } + + if (expr.filter) { + result = join(result, 'if' + space); + fragment = generateExpression(expr.filter, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }); + if (extra.moz.parenthesizedComprehensionBlock) { + result = join(result, [ '(', fragment, ')' ]); + } else { + result = join(result, fragment); + } + } + + if (!extra.moz.comprehensionExpressionStartsWithAssignment) { + fragment = generateExpression(expr.body, { + precedence: Precedence.Assignment, + allowIn: true, + allowCall: true + }); + + result = join(result, fragment); + } + + result.push((type === Syntax.GeneratorExpression) ? ')' : ']'); + break; + + case Syntax.ComprehensionBlock: + if (expr.left.type === Syntax.VariableDeclaration) { + fragment = [ + expr.left.kind, noEmptySpace(), + generateStatement(expr.left.declarations[0], { + allowIn: false + }) + ]; + } else { + fragment = generateExpression(expr.left, { + precedence: Precedence.Call, + allowIn: true, + allowCall: true + }); + } + + fragment = join(fragment, expr.of ? 'of' : 'in'); + fragment = join(fragment, generateExpression(expr.right, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + })); + + if (extra.moz.parenthesizedComprehensionBlock) { + result = [ 'for' + space + '(', fragment, ')' ]; + } else { + result = join('for' + space, fragment); + } + break; + + default: + throw new Error('Unknown expression type: ' + expr.type); + } + + return toSourceNodeWhenNeeded(result, expr); + } + + function generateStatement(stmt, option) { + var i, + len, + result, + node, + allowIn, + functionBody, + directiveContext, + fragment, + semicolon, + isGenerator; + + allowIn = true; + semicolon = ';'; + functionBody = false; + directiveContext = false; + if (option) { + allowIn = option.allowIn === undefined || option.allowIn; + if (!semicolons && option.semicolonOptional === true) { + semicolon = ''; + } + functionBody = option.functionBody; + directiveContext = option.directiveContext; + } + + switch (stmt.type) { + case Syntax.BlockStatement: + result = ['{', newline]; + + withIndent(function () { + for (i = 0, len = stmt.body.length; i < len; ++i) { + fragment = addIndent(generateStatement(stmt.body[i], { + semicolonOptional: i === len - 1, + directiveContext: functionBody + })); + result.push(fragment); + if (!endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) { + result.push(newline); + } + } + }); + + result.push(addIndent('}')); + break; + + case Syntax.BreakStatement: + if (stmt.label) { + result = 'break ' + stmt.label.name + semicolon; + } else { + result = 'break' + semicolon; + } + break; + + case Syntax.ContinueStatement: + if (stmt.label) { + result = 'continue ' + stmt.label.name + semicolon; + } else { + result = 'continue' + semicolon; + } + break; + + case Syntax.DirectiveStatement: + if (stmt.raw) { + result = stmt.raw + semicolon; + } else { + result = escapeDirective(stmt.directive) + semicolon; + } + break; + + case Syntax.DoWhileStatement: + // Because `do 42 while (cond)` is Syntax Error. We need semicolon. + result = join('do', maybeBlock(stmt.body)); + result = maybeBlockSuffix(stmt.body, result); + result = join(result, [ + 'while' + space + '(', + generateExpression(stmt.test, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }), + ')' + semicolon + ]); + break; + + case Syntax.CatchClause: + withIndent(function () { + var guard; + + result = [ + 'catch' + space + '(', + generateExpression(stmt.param, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }), + ')' + ]; + + if (stmt.guard) { + guard = generateExpression(stmt.guard, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }); + + result.splice(2, 0, ' if ', guard); + } + }); + result.push(maybeBlock(stmt.body)); + break; + + case Syntax.DebuggerStatement: + result = 'debugger' + semicolon; + break; + + case Syntax.EmptyStatement: + result = ';'; + break; + + case Syntax.ExportDeclaration: + result = 'export '; + if (stmt.declaration) { + // FunctionDeclaration or VariableDeclaration + result = [result, generateStatement(stmt.declaration, { semicolonOptional: semicolon === '' })]; + break; + } + break; + + case Syntax.ExpressionStatement: + result = [generateExpression(stmt.expression, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + })]; + // 12.4 '{', 'function' is not allowed in this position. + // wrap expression with parentheses + fragment = toSourceNodeWhenNeeded(result).toString(); + if (fragment.charAt(0) === '{' || // ObjectExpression + (fragment.slice(0, 8) === 'function' && '* ('.indexOf(fragment.charAt(8)) >= 0) || // function or generator + (directive && directiveContext && stmt.expression.type === Syntax.Literal && typeof stmt.expression.value === 'string')) { + result = ['(', result, ')' + semicolon]; + } else { + result.push(semicolon); + } + break; + + case Syntax.VariableDeclarator: + if (stmt.init) { + result = [ + generateExpression(stmt.id, { + precedence: Precedence.Assignment, + allowIn: allowIn, + allowCall: true + }), + space, + '=', + space, + generateExpression(stmt.init, { + precedence: Precedence.Assignment, + allowIn: allowIn, + allowCall: true + }) + ]; + } else { + result = generatePattern(stmt.id, { + precedence: Precedence.Assignment, + allowIn: allowIn + }); + } + break; + + case Syntax.VariableDeclaration: + result = [stmt.kind]; + // special path for + // var x = function () { + // }; + if (stmt.declarations.length === 1 && stmt.declarations[0].init && + stmt.declarations[0].init.type === Syntax.FunctionExpression) { + result.push(noEmptySpace(), generateStatement(stmt.declarations[0], { + allowIn: allowIn + })); + } else { + // VariableDeclarator is typed as Statement, + // but joined with comma (not LineTerminator). + // So if comment is attached to target node, we should specialize. + withIndent(function () { + node = stmt.declarations[0]; + if (extra.comment && node.leadingComments) { + result.push('\n', addIndent(generateStatement(node, { + allowIn: allowIn + }))); + } else { + result.push(noEmptySpace(), generateStatement(node, { + allowIn: allowIn + })); + } + + for (i = 1, len = stmt.declarations.length; i < len; ++i) { + node = stmt.declarations[i]; + if (extra.comment && node.leadingComments) { + result.push(',' + newline, addIndent(generateStatement(node, { + allowIn: allowIn + }))); + } else { + result.push(',' + space, generateStatement(node, { + allowIn: allowIn + })); + } + } + }); + } + result.push(semicolon); + break; + + case Syntax.ThrowStatement: + result = [join( + 'throw', + generateExpression(stmt.argument, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }) + ), semicolon]; + break; + + case Syntax.TryStatement: + result = ['try', maybeBlock(stmt.block)]; + result = maybeBlockSuffix(stmt.block, result); + + if (stmt.handlers) { + // old interface + for (i = 0, len = stmt.handlers.length; i < len; ++i) { + result = join(result, generateStatement(stmt.handlers[i])); + if (stmt.finalizer || i + 1 !== len) { + result = maybeBlockSuffix(stmt.handlers[i].body, result); + } + } + } else { + stmt.guardedHandlers = stmt.guardedHandlers || []; + + for (i = 0, len = stmt.guardedHandlers.length; i < len; ++i) { + result = join(result, generateStatement(stmt.guardedHandlers[i])); + if (stmt.finalizer || i + 1 !== len) { + result = maybeBlockSuffix(stmt.guardedHandlers[i].body, result); + } + } + + // new interface + if (stmt.handler) { + if (isArray(stmt.handler)) { + for (i = 0, len = stmt.handler.length; i < len; ++i) { + result = join(result, generateStatement(stmt.handler[i])); + if (stmt.finalizer || i + 1 !== len) { + result = maybeBlockSuffix(stmt.handler[i].body, result); + } + } + } else { + result = join(result, generateStatement(stmt.handler)); + if (stmt.finalizer) { + result = maybeBlockSuffix(stmt.handler.body, result); + } + } + } + } + if (stmt.finalizer) { + result = join(result, ['finally', maybeBlock(stmt.finalizer)]); + } + break; + + case Syntax.SwitchStatement: + withIndent(function () { + result = [ + 'switch' + space + '(', + generateExpression(stmt.discriminant, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }), + ')' + space + '{' + newline + ]; + }); + if (stmt.cases) { + for (i = 0, len = stmt.cases.length; i < len; ++i) { + fragment = addIndent(generateStatement(stmt.cases[i], {semicolonOptional: i === len - 1})); + result.push(fragment); + if (!endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) { + result.push(newline); + } + } + } + result.push(addIndent('}')); + break; + + case Syntax.SwitchCase: + withIndent(function () { + if (stmt.test) { + result = [ + join('case', generateExpression(stmt.test, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + })), + ':' + ]; + } else { + result = ['default:']; + } + + i = 0; + len = stmt.consequent.length; + if (len && stmt.consequent[0].type === Syntax.BlockStatement) { + fragment = maybeBlock(stmt.consequent[0]); + result.push(fragment); + i = 1; + } + + if (i !== len && !endsWithLineTerminator(toSourceNodeWhenNeeded(result).toString())) { + result.push(newline); + } + + for (; i < len; ++i) { + fragment = addIndent(generateStatement(stmt.consequent[i], {semicolonOptional: i === len - 1 && semicolon === ''})); + result.push(fragment); + if (i + 1 !== len && !endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) { + result.push(newline); + } + } + }); + break; + + case Syntax.IfStatement: + withIndent(function () { + result = [ + 'if' + space + '(', + generateExpression(stmt.test, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }), + ')' + ]; + }); + if (stmt.alternate) { + result.push(maybeBlock(stmt.consequent)); + result = maybeBlockSuffix(stmt.consequent, result); + if (stmt.alternate.type === Syntax.IfStatement) { + result = join(result, ['else ', generateStatement(stmt.alternate, {semicolonOptional: semicolon === ''})]); + } else { + result = join(result, join('else', maybeBlock(stmt.alternate, semicolon === ''))); + } + } else { + result.push(maybeBlock(stmt.consequent, semicolon === '')); + } + break; + + case Syntax.ForStatement: + withIndent(function () { + result = ['for' + space + '(']; + if (stmt.init) { + if (stmt.init.type === Syntax.VariableDeclaration) { + result.push(generateStatement(stmt.init, {allowIn: false})); + } else { + result.push(generateExpression(stmt.init, { + precedence: Precedence.Sequence, + allowIn: false, + allowCall: true + }), ';'); + } + } else { + result.push(';'); + } + + if (stmt.test) { + result.push(space, generateExpression(stmt.test, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }), ';'); + } else { + result.push(';'); + } + + if (stmt.update) { + result.push(space, generateExpression(stmt.update, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }), ')'); + } else { + result.push(')'); + } + }); + + result.push(maybeBlock(stmt.body, semicolon === '')); + break; + + case Syntax.ForInStatement: + result = ['for' + space + '(']; + withIndent(function () { + if (stmt.left.type === Syntax.VariableDeclaration) { + withIndent(function () { + result.push(stmt.left.kind + noEmptySpace(), generateStatement(stmt.left.declarations[0], { + allowIn: false + })); + }); + } else { + result.push(generateExpression(stmt.left, { + precedence: Precedence.Call, + allowIn: true, + allowCall: true + })); + } + + result = join(result, 'in'); + result = [join( + result, + generateExpression(stmt.right, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }) + ), ')']; + }); + result.push(maybeBlock(stmt.body, semicolon === '')); + break; + + case Syntax.LabeledStatement: + result = [stmt.label.name + ':', maybeBlock(stmt.body, semicolon === '')]; + break; + + case Syntax.Program: + len = stmt.body.length; + result = [safeConcatenation && len > 0 ? '\n' : '']; + for (i = 0; i < len; ++i) { + fragment = addIndent( + generateStatement(stmt.body[i], { + semicolonOptional: !safeConcatenation && i === len - 1, + directiveContext: true + }) + ); + result.push(fragment); + if (i + 1 < len && !endsWithLineTerminator(toSourceNodeWhenNeeded(fragment).toString())) { + result.push(newline); + } + } + break; + + case Syntax.FunctionDeclaration: + isGenerator = stmt.generator && !extra.moz.starlessGenerator; + result = [ + (isGenerator ? 'function*' : 'function'), + (isGenerator ? space : noEmptySpace()), + generateIdentifier(stmt.id), + generateFunctionBody(stmt) + ]; + break; + + case Syntax.ReturnStatement: + if (stmt.argument) { + result = [join( + 'return', + generateExpression(stmt.argument, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }) + ), semicolon]; + } else { + result = ['return' + semicolon]; + } + break; + + case Syntax.WhileStatement: + withIndent(function () { + result = [ + 'while' + space + '(', + generateExpression(stmt.test, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }), + ')' + ]; + }); + result.push(maybeBlock(stmt.body, semicolon === '')); + break; + + case Syntax.WithStatement: + withIndent(function () { + result = [ + 'with' + space + '(', + generateExpression(stmt.object, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }), + ')' + ]; + }); + result.push(maybeBlock(stmt.body, semicolon === '')); + break; + + default: + throw new Error('Unknown statement type: ' + stmt.type); + } + + // Attach comments + + if (extra.comment) { + result = addCommentsToStatement(stmt, result); + } + + fragment = toSourceNodeWhenNeeded(result).toString(); + if (stmt.type === Syntax.Program && !safeConcatenation && newline === '' && fragment.charAt(fragment.length - 1) === '\n') { + result = sourceMap ? toSourceNodeWhenNeeded(result).replaceRight(/\s+$/, '') : fragment.replace(/\s+$/, ''); + } + + return toSourceNodeWhenNeeded(result, stmt); + } + + function generate(node, options) { + var defaultOptions = getDefaultOptions(), result, pair; + + if (options != null) { + // Obsolete options + // + // `options.indent` + // `options.base` + // + // Instead of them, we can use `option.format.indent`. + if (typeof options.indent === 'string') { + defaultOptions.format.indent.style = options.indent; + } + if (typeof options.base === 'number') { + defaultOptions.format.indent.base = options.base; + } + options = updateDeeply(defaultOptions, options); + indent = options.format.indent.style; + if (typeof options.base === 'string') { + base = options.base; + } else { + base = stringRepeat(indent, options.format.indent.base); + } + } else { + options = defaultOptions; + indent = options.format.indent.style; + base = stringRepeat(indent, options.format.indent.base); + } + json = options.format.json; + renumber = options.format.renumber; + hexadecimal = json ? false : options.format.hexadecimal; + quotes = json ? 'double' : options.format.quotes; + escapeless = options.format.escapeless; + newline = options.format.newline; + space = options.format.space; + if (options.format.compact) { + newline = space = indent = base = ''; + } + parentheses = options.format.parentheses; + semicolons = options.format.semicolons; + safeConcatenation = options.format.safeConcatenation; + directive = options.directive; + parse = json ? null : options.parse; + sourceMap = options.sourceMap; + extra = options; + + if (sourceMap) { + if (!exports.browser) { + // We assume environment is node.js + // And prevent from including source-map by browserify + SourceNode = require('source-map').SourceNode; + } else { + SourceNode = global.sourceMap.SourceNode; + } + } + + switch (node.type) { + case Syntax.BlockStatement: + case Syntax.BreakStatement: + case Syntax.CatchClause: + case Syntax.ContinueStatement: + case Syntax.DirectiveStatement: + case Syntax.DoWhileStatement: + case Syntax.DebuggerStatement: + case Syntax.EmptyStatement: + case Syntax.ExpressionStatement: + case Syntax.ForStatement: + case Syntax.ForInStatement: + case Syntax.FunctionDeclaration: + case Syntax.IfStatement: + case Syntax.LabeledStatement: + case Syntax.Program: + case Syntax.ReturnStatement: + case Syntax.SwitchStatement: + case Syntax.SwitchCase: + case Syntax.ThrowStatement: + case Syntax.TryStatement: + case Syntax.VariableDeclaration: + case Syntax.VariableDeclarator: + case Syntax.WhileStatement: + case Syntax.WithStatement: + result = generateStatement(node); + break; + + case Syntax.AssignmentExpression: + case Syntax.ArrayExpression: + case Syntax.ArrayPattern: + case Syntax.BinaryExpression: + case Syntax.CallExpression: + case Syntax.ConditionalExpression: + case Syntax.FunctionExpression: + case Syntax.Identifier: + case Syntax.Literal: + case Syntax.LogicalExpression: + case Syntax.MemberExpression: + case Syntax.NewExpression: + case Syntax.ObjectExpression: + case Syntax.ObjectPattern: + case Syntax.Property: + case Syntax.SequenceExpression: + case Syntax.ThisExpression: + case Syntax.UnaryExpression: + case Syntax.UpdateExpression: + case Syntax.YieldExpression: + + result = generateExpression(node, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }); + break; + + default: + throw new Error('Unknown node type: ' + node.type); + } + + if (!sourceMap) { + return result.toString(); + } + + + pair = result.toStringWithSourceMap({ + file: options.file, + sourceRoot: options.sourceMapRoot + }); + + if (options.sourceContent) { + pair.map.setSourceContent(options.sourceMap, + options.sourceContent); + } + + if (options.sourceMapWithCode) { + return pair; + } + + return pair.map.toString(); + } + + FORMAT_MINIFY = { + indent: { + style: '', + base: 0 + }, + renumber: true, + hexadecimal: true, + quotes: 'auto', + escapeless: true, + compact: true, + parentheses: false, + semicolons: false + }; + + FORMAT_DEFAULTS = getDefaultOptions().format; + + exports.version = require('./package.json').version; + exports.generate = generate; + exports.attachComments = estraverse.attachComments; + exports.browser = false; + exports.FORMAT_MINIFY = FORMAT_MINIFY; + exports.FORMAT_DEFAULTS = FORMAT_DEFAULTS; +}()); +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/escodegen/package.json b/pitfall/pdfkit/node_modules/detective/node_modules/escodegen/package.json new file mode 100644 index 00000000..317dafa6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/escodegen/package.json @@ -0,0 +1,109 @@ +{ + "_args": [ + [ + { + "raw": "escodegen@~1.1.0", + "scope": null, + "escapedName": "escodegen", + "name": "escodegen", + "rawSpec": "~1.1.0", + "spec": ">=1.1.0 <1.2.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/detective" + ] + ], + "_from": "escodegen@>=1.1.0 <1.2.0", + "_id": "escodegen@1.1.0", + "_inCache": true, + "_location": "/detective/escodegen", + "_npmUser": { + "name": "constellation", + "email": "utatane.tea@gmail.com" + }, + "_npmVersion": "1.3.21", + "_phantomChildren": {}, + "_requested": { + "raw": "escodegen@~1.1.0", + "scope": null, + "escapedName": "escodegen", + "name": "escodegen", + "rawSpec": "~1.1.0", + "spec": ">=1.1.0 <1.2.0", + "type": "range" + }, + "_requiredBy": [ + "/detective" + ], + "_resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.1.0.tgz", + "_shasum": "c663923f6e20aad48d0c0fa49f31c6d4f49360cf", + "_shrinkwrap": null, + "_spec": "escodegen@~1.1.0", + "_where": "/Users/MB/git/pdfkit/node_modules/detective", + "bin": { + "esgenerate": "./bin/esgenerate.js", + "escodegen": "./bin/escodegen.js" + }, + "bugs": { + "url": "https://github.com/Constellation/escodegen/issues" + }, + "dependencies": { + "esprima": "~1.0.4", + "estraverse": "~1.5.0", + "esutils": "~1.0.0", + "source-map": "~0.1.30" + }, + "description": "ECMAScript code generator", + "devDependencies": { + "bower": "*", + "chai": "~1.7.2", + "commonjs-everywhere": "~0.8.0", + "esprima-moz": "*", + "grunt": "~0.4.1", + "grunt-cli": "~0.1.9", + "grunt-contrib-jshint": "~0.5.0", + "grunt-mocha-test": "~0.6.2", + "q": "*", + "semver": "*" + }, + "directories": {}, + "dist": { + "shasum": "c663923f6e20aad48d0c0fa49f31c6d4f49360cf", + "tarball": "https://registry.npmjs.org/escodegen/-/escodegen-1.1.0.tgz" + }, + "engines": { + "node": ">=0.4.0" + }, + "homepage": "http://github.com/Constellation/escodegen", + "licenses": [ + { + "type": "BSD", + "url": "http://github.com/Constellation/escodegen/raw/master/LICENSE.BSD" + } + ], + "main": "escodegen.js", + "maintainers": [ + { + "name": "constellation", + "email": "utatane.tea@gmail.com" + } + ], + "name": "escodegen", + "optionalDependencies": { + "source-map": "~0.1.30" + }, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/Constellation/escodegen.git" + }, + "scripts": { + "build": "./node_modules/.bin/cjsify -a path: tools/entry-point.js > escodegen.browser.js", + "build-min": "./node_modules/.bin/cjsify -ma path: tools/entry-point.js > escodegen.browser.min.js", + "lint": "grunt lint", + "release": "node tools/release.js", + "test": "grunt travis", + "unit-test": "grunt test" + }, + "version": "1.1.0" +} diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/.eslintrc b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/.eslintrc new file mode 100644 index 00000000..c05d570f --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/.eslintrc @@ -0,0 +1,92 @@ +{ + "env": { + "browser": true, + "node": true, + "amd": true + }, + + "rules": { + "no-alert": 2, + "no-caller": 2, + "no-bitwise": 0, + "no-catch-shadow": 2, + "no-console": 2, + "no-comma-dangle": 2, + "no-control-regex": 2, + "no-debugger": 2, + "no-div-regex": 2, + "no-dupe-keys": 2, + "no-else-return": 2, + "no-empty": 2, + "no-empty-class": 2, + "no-eq-null": 2, + "no-eval": 2, + "no-ex-assign": 2, + "no-func-assign": 0, + "no-floating-decimal": 2, + "no-implied-eval": 2, + "no-with": 2, + "no-fallthrough": 2, + "no-global-strict": 2, + "no-unreachable": 2, + "no-undef": 2, + "no-undef-init": 2, + "no-unused-expressions": 0, + "no-octal": 2, + "no-octal-escape": 2, + "no-obj-calls": 2, + "no-multi-str": 2, + "no-new-wrappers": 2, + "no-new": 2, + "no-new-func": 2, + "no-native-reassign": 2, + "no-plusplus": 0, + "no-delete-var": 2, + "no-return-assign": 2, + "no-new-array": 2, + "no-new-object": 2, + "no-label-var": 2, + "no-ternary": 0, + "no-self-compare": 2, + "no-sync": 2, + "no-underscore-dangle": 2, + "no-loop-func": 2, + "no-empty-label": 2, + "no-unused-vars": 0, + "no-script-url": 2, + "no-proto": 2, + "no-iterator": 2, + "no-mixed-requires": [0, false], + "no-wrap-func": 2, + "no-shadow": 2, + "no-use-before-define": 0, + "no-redeclare": 2, + + "brace-style": 0, + "block-scoped-var": 0, + "camelcase": 2, + "complexity": [0, 11], + "consistent-this": [0, "that"], + "curly": 2, + "dot-notation": 2, + "eqeqeq": 2, + "guard-for-in": 0, + "max-depth": [0, 4], + "max-len": [0, 80, 4], + "max-params": [0, 3], + "max-statements": [0, 10], + "new-cap": 2, + "new-parens": 2, + "one-var": 0, + "quotes": [2, "single"], + "quote-props": 0, + "radix": 0, + "regex-spaces": 2, + "semi": 2, + "strict": 2, + "unnecessary-strict": 0, + "use-isnan": 2, + "wrap-iife": 2, + "wrap-regex": 0 + } +} diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/.npmignore b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/.npmignore new file mode 100644 index 00000000..88dc4e81 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/.npmignore @@ -0,0 +1,8 @@ +.git +.travis.yml +/node_modules/ +/assets/ +/coverage/ +/demo/ +/test/3rdparty +/tools/ diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/ChangeLog b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/ChangeLog new file mode 100644 index 00000000..84a6d6a7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/ChangeLog @@ -0,0 +1,17 @@ +2012-11-02: Version 1.0.2 + + Improvement: + + * Fix esvalidate JUnit output upon a syntax error (issue 374) + +2012-10-28: Version 1.0.1 + + Improvements: + + * esvalidate understands shebang in a Unix shell script (issue 361) + * esvalidate treats fatal parsing failure as an error (issue 361) + * Reduce Node.js package via .npmignore (issue 362) + +2012-10-22: Version 1.0.0 + + Initial release. diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/LICENSE.BSD b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/LICENSE.BSD new file mode 100644 index 00000000..3e580c35 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/LICENSE.BSD @@ -0,0 +1,19 @@ +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/README.md b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/README.md new file mode 100644 index 00000000..afaf6d15 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/README.md @@ -0,0 +1,24 @@ +**Esprima** ([esprima.org](http://esprima.org), BSD license) is a high performance, +standard-compliant [ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm) +parser written in ECMAScript (also popularly known as +[JavaScript](http://en.wikipedia.org/wiki/JavaScript>JavaScript)). +Esprima is created and maintained by [Ariya Hidayat](http://twitter.com/ariyahidayat), +with the help of [many contributors](https://github.com/ariya/esprima/contributors). + +### Features + +- Full support for ECMAScript 5.1 ([ECMA-262](http://www.ecma-international.org/publications/standards/Ecma-262.htm)) +- Sensible [syntax tree format](http://esprima.org/doc/index.html#ast) compatible with Mozilla +[Parser AST](https://developer.mozilla.org/en/SpiderMonkey/Parser_API) +- Optional tracking of syntax node location (index-based and line-column) +- Heavily tested (> 600 [unit tests](http://esprima.org/test/) with solid statement and branch coverage) +- Experimental support for ES6/Harmony (module, class, destructuring, ...) + +Esprima serves as a **building block** for some JavaScript +language tools, from [code instrumentation](http://esprima.org/demo/functiontrace.html) +to [editor autocompletion](http://esprima.org/demo/autocomplete.html). + +Esprima runs on many popular web browsers, as well as other ECMAScript platforms such as +[Rhino](http://www.mozilla.org/rhino) and [Node.js](https://npmjs.org/package/esprima). + +For more information, check the web site [esprima.org](http://esprima.org). diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/bin/esparse.js b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/bin/esparse.js new file mode 100755 index 00000000..3e7bb81e --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/bin/esparse.js @@ -0,0 +1,117 @@ +#!/usr/bin/env node +/* + Copyright (C) 2012 Ariya Hidayat + Copyright (C) 2011 Ariya Hidayat + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*jslint sloppy:true node:true rhino:true */ + +var fs, esprima, fname, content, options, syntax; + +if (typeof require === 'function') { + fs = require('fs'); + esprima = require('esprima'); +} else if (typeof load === 'function') { + try { + load('esprima.js'); + } catch (e) { + load('../esprima.js'); + } +} + +// Shims to Node.js objects when running under Rhino. +if (typeof console === 'undefined' && typeof process === 'undefined') { + console = { log: print }; + fs = { readFileSync: readFile }; + process = { argv: arguments, exit: quit }; + process.argv.unshift('esparse.js'); + process.argv.unshift('rhino'); +} + +function showUsage() { + console.log('Usage:'); + console.log(' esparse [options] file.js'); + console.log(); + console.log('Available options:'); + console.log(); + console.log(' --comment Gather all line and block comments in an array'); + console.log(' --loc Include line-column location info for each syntax node'); + console.log(' --range Include index-based range for each syntax node'); + console.log(' --raw Display the raw value of literals'); + console.log(' --tokens List all tokens in an array'); + console.log(' --tolerant Tolerate errors on a best-effort basis (experimental)'); + console.log(' -v, --version Shows program version'); + console.log(); + process.exit(1); +} + +if (process.argv.length <= 2) { + showUsage(); +} + +options = {}; + +process.argv.splice(2).forEach(function (entry) { + + if (entry === '-h' || entry === '--help') { + showUsage(); + } else if (entry === '-v' || entry === '--version') { + console.log('ECMAScript Parser (using Esprima version', esprima.version, ')'); + console.log(); + process.exit(0); + } else if (entry === '--comment') { + options.comment = true; + } else if (entry === '--loc') { + options.loc = true; + } else if (entry === '--range') { + options.range = true; + } else if (entry === '--raw') { + options.raw = true; + } else if (entry === '--tokens') { + options.tokens = true; + } else if (entry === '--tolerant') { + options.tolerant = true; + } else if (entry.slice(0, 2) === '--') { + console.log('Error: unknown option ' + entry + '.'); + process.exit(1); + } else if (typeof fname === 'string') { + console.log('Error: more than one input file.'); + process.exit(1); + } else { + fname = entry; + } +}); + +if (typeof fname !== 'string') { + console.log('Error: no input file.'); + process.exit(1); +} + +try { + content = fs.readFileSync(fname, 'utf-8'); + syntax = esprima.parse(content, options); + console.log(JSON.stringify(syntax, null, 4)); +} catch (e) { + console.log('Error: ' + e.message); + process.exit(1); +} diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/bin/esvalidate.js b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/bin/esvalidate.js new file mode 100755 index 00000000..dddd8a2a --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/bin/esvalidate.js @@ -0,0 +1,199 @@ +#!/usr/bin/env node +/* + Copyright (C) 2012 Ariya Hidayat + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*jslint sloppy:true plusplus:true node:true rhino:true */ +/*global phantom:true */ + +var fs, system, esprima, options, fnames, count; + +if (typeof esprima === 'undefined') { + // PhantomJS can only require() relative files + if (typeof phantom === 'object') { + fs = require('fs'); + system = require('system'); + esprima = require('./esprima'); + } else if (typeof require === 'function') { + fs = require('fs'); + esprima = require('esprima'); + } else if (typeof load === 'function') { + try { + load('esprima.js'); + } catch (e) { + load('../esprima.js'); + } + } +} + +// Shims to Node.js objects when running under PhantomJS 1.7+. +if (typeof phantom === 'object') { + fs.readFileSync = fs.read; + process = { + argv: [].slice.call(system.args), + exit: phantom.exit + }; + process.argv.unshift('phantomjs'); +} + +// Shims to Node.js objects when running under Rhino. +if (typeof console === 'undefined' && typeof process === 'undefined') { + console = { log: print }; + fs = { readFileSync: readFile }; + process = { argv: arguments, exit: quit }; + process.argv.unshift('esvalidate.js'); + process.argv.unshift('rhino'); +} + +function showUsage() { + console.log('Usage:'); + console.log(' esvalidate [options] file.js'); + console.log(); + console.log('Available options:'); + console.log(); + console.log(' --format=type Set the report format, plain (default) or junit'); + console.log(' -v, --version Print program version'); + console.log(); + process.exit(1); +} + +if (process.argv.length <= 2) { + showUsage(); +} + +options = { + format: 'plain' +}; + +fnames = []; + +process.argv.splice(2).forEach(function (entry) { + + if (entry === '-h' || entry === '--help') { + showUsage(); + } else if (entry === '-v' || entry === '--version') { + console.log('ECMAScript Validator (using Esprima version', esprima.version, ')'); + console.log(); + process.exit(0); + } else if (entry.slice(0, 9) === '--format=') { + options.format = entry.slice(9); + if (options.format !== 'plain' && options.format !== 'junit') { + console.log('Error: unknown report format ' + options.format + '.'); + process.exit(1); + } + } else if (entry.slice(0, 2) === '--') { + console.log('Error: unknown option ' + entry + '.'); + process.exit(1); + } else { + fnames.push(entry); + } +}); + +if (fnames.length === 0) { + console.log('Error: no input file.'); + process.exit(1); +} + +if (options.format === 'junit') { + console.log(''); + console.log(''); +} + +count = 0; +fnames.forEach(function (fname) { + var content, timestamp, syntax, name; + try { + content = fs.readFileSync(fname, 'utf-8'); + + if (content[0] === '#' && content[1] === '!') { + content = '//' + content.substr(2, content.length); + } + + timestamp = Date.now(); + syntax = esprima.parse(content, { tolerant: true }); + + if (options.format === 'junit') { + + name = fname; + if (name.lastIndexOf('/') >= 0) { + name = name.slice(name.lastIndexOf('/') + 1); + } + + console.log(''); + + syntax.errors.forEach(function (error) { + var msg = error.message; + msg = msg.replace(/^Line\ [0-9]*\:\ /, ''); + console.log(' '); + console.log(' ' + + error.message + '(' + name + ':' + error.lineNumber + ')' + + ''); + console.log(' '); + }); + + console.log(''); + + } else if (options.format === 'plain') { + + syntax.errors.forEach(function (error) { + var msg = error.message; + msg = msg.replace(/^Line\ [0-9]*\:\ /, ''); + msg = fname + ':' + error.lineNumber + ': ' + msg; + console.log(msg); + ++count; + }); + + } + } catch (e) { + ++count; + if (options.format === 'junit') { + console.log(''); + console.log(' '); + console.log(' ' + + e.message + '(' + fname + ((e.lineNumber) ? ':' + e.lineNumber : '') + + ')'); + console.log(' '); + console.log(''); + } else { + console.log('Error: ' + e.message); + } + } +}); + +if (options.format === 'junit') { + console.log(''); +} + +if (count > 0) { + process.exit(1); +} + +if (count === 0 && typeof phantom === 'object') { + process.exit(0); +} diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/component.json b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/component.json new file mode 100644 index 00000000..319c2503 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/component.json @@ -0,0 +1,14 @@ +{ + "name": "esprima", + "version": "1.1.0-dev-harmony", + "main": "./esprima.js", + "dependencies": {}, + "repository": { + "type": "git", + "url": "http://github.com/ariya/esprima.git" + }, + "licenses": [{ + "type": "BSD", + "url": "http://github.com/ariya/esprima/raw/master/LICENSE.BSD" + }] +} diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/doc/index.html b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/doc/index.html new file mode 100644 index 00000000..5cf026e5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/doc/index.html @@ -0,0 +1,480 @@ + + + + + + + Esprima Documentation + + + + + + + + + + + + + + +
    +
    +

    Documentation on using Esprima

    +
    +
    + + +
    +
    + +

    Basic Usage

    + +

    Esprima runs on web browsers (IE 6+, Firefox 1+, Safari 3+, Chrome 1+, Konqueror 4.6+, Opera 8+) as well as +Rhino and Node.js.

    + +
    In a web browser
    + +

    Just include the source file:

    + +
    +<script src="esprima.js"></script>
    +
    + +

    The module esprima will be available as part of the global window object:

    + +
    +var syntax = esprima.parse('var answer = 42');
    +
    + +

    Since Esprima supports AMD (Asynchronous Module Definition), it can be loaded via a module loader such as RequireJS:

    + +
    +require(['esprima'], function (parser) {
    +    // Do something with parser, e.g.
    +    var syntax = parser.parse('var answer = 42');
    +    console.log(JSON.stringify(syntax, null, 4));
    +});
    +
    + +

    Since Esprima is available as a Bower component, it can be installed with:

    + +
    +bower install esprima
    +
    + +

    Obviously, it can be used with Yeoman as well:

    + +
    +yeoman install esprima
    +
    + +
    With Node.js
    + +

    Esprima is available as a Node.js package, install it using npm:

    + +
    +npm install esprima
    +
    + +

    Load the module with require and use it:

    + +
    +var esprima = require('esprima');
    +console.log(JSON.stringify(esprima.parse('var answer = 42'), null, 4));
    +
    + +
    With Rhino
    + +

    Load the source file from another script:

    + +
    +load('/path/to/esprima.js');
    +
    + +

    The module esprima will be available as part of the global object:

    + +
    +var syntax = esprima.parse('42');
    +print(JSON.stringify(syntax, null, 2));
    +
    + +
    Parsing Interface
    + +

    Basic usage: + +

    +esprima.parse(code, options);
    +
    + +

    The output of the parser is the syntax tree formatted in JSON, see the following Syntax Tree Format section.

    + +

    Available options so far (by default, every option false):

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    OptionWhen set to true
    locNodes have line and column-based location info
    rangeNodes have an index-based location range (array)
    rawLiterals have extra property which stores the verbatim source
    tokensAn extra array containing all found tokens
    commentAn extra array containing all line and block comments
    tolerantAn extra array containing all errors found, + attempts to continue parsing when an error is encountered
    + + +

    The easiest way to see the different output based on various option settings is to use the online parser demo. + +

    Note: In version > 1.0, raw is ignored since literals always include the verbatim source.

    + +

    Examples

    + +
    Detect Nested Ternary Conditionals
    + +

    The script detectnestedternary.js in the examples/ subdirectory is using Esprima to look for a ternary conditional, i.e. operator ?:, which is immediately followed (in one of its code paths) by another ternary conditional. The script can be invoked from the command-line with Node.js:

    + +
    +node detectnestedternary.js /some/path
    +
    + +

    An example code fragment which will be flagged by this script as having a nested ternary conditional:

    + +
    +var str = (age < 1) ? "baby" :
    +    (age < 5) ? "toddler" :
    +    (age < 18) ? "child": "adult";
    +
    + +

    which will yield the following report:

    + +
    +  Line 1 : Nested ternary for "age < 1"
    +  Line 2 : Nested ternary for "age < 5"
    +
    + +
    Find Possible Boolean Traps
    + +

    The script findbooleantrap.js in the examples/ subdirectory is using Esprima to detect some possible cases of Boolean trap, i.e. the use of Boolean literal which may lead to ambiguities and lack of readability. The script can be invoked from command-line with Node.js:

    + +
    +node findbooleantrap.js /some/path
    +
    + +It will search for all files (recursively) in the given path, try to parse each file, and then look for signs of Boolean traps: + +
      +
    • Literal used with a non-setter function (assumption: setter starts with the "set" prefix):
    • +
      this.refresh(true);
      +
    • Literal used with a function whose name may have a double-negative interpretation:
    • +
      item.setHidden(false);
      +
    • Two different literals in a single function call:
    • +
      element.stop(true, false);
      +
    • Multiple literals in a single function invocation:
    • +
      event.initKeyEvent("keypress", true, true, null, null,
      +    false, false, false, false, 9, 0);
      +
    • Ambiguous Boolean literal as the last argument:
    • +
      return getSomething(obj, false);
      +
    + +For some more info, read also the blog post on Boolean trap. + +

    Syntax Tree Format

    + +

    The output of the parser is expected to be compatible with Mozilla SpiderMonkey Parser API. +The best way to understand various different constructs is the online parser demo which shows the syntax tree (formatted with JSON.stringify) corresponding to the typed code. + +The simplest example is as follows. If the following code is executed: + +

    +esprima.parse('var answer = 42;');
    +
    + +then the return value will be (JSON formatted): + +
    +{
    +    type: 'Program',
    +    body: [
    +        {
    +            type: 'VariableDeclaration',
    +            declarations: [
    +                {
    +                    type: 'AssignmentExpression',
    +                    operator: =,
    +                    left: {
    +                        type: 'Identifier',
    +                        name: 'answer'
    +                    },
    +                    right: {
    +                        type: 'Literal',
    +                        value: 42
    +                    }
    +                }
    +            ]
    +        }
    +    ]
    +}
    +
    + +

    Contribution Guide

    + +
    Guidelines
    + +

    Contributors are mandated to follow the guides described in the following sections. Any contribution which do not conform to the guides may be rejected.

    + +

    Laundry list

    + +

    Before creating pull requests, make sure the following applies.

    + +

    There is a corresponding issue. If there is no issue yet, create one in the issue tracker.

    + +

    The commit log links the corresponding issue (usually as the last line).

    + +

    No functional regression. Run all unit tests.

    + +

    No coverage regression. Run the code coverage analysis.

    + +

    Each commit must be granular. Big changes should be splitted into smaller commits.

    + +

    Write understandable code. No need to be too terse (or even obfuscated).

    + +

    JSLint does not complain.

    + +

    A new feature must be accompanied with unit tests. No compromise.

    + +

    A new feature should not cause performance loss. Verify with the benchmark tests.

    + +

    Performance improvement should be backed up by actual conclusive speed-up in the benchmark suite.

    + +

    Coding style

    + +

    Indentation is 4 spaces.

    + +

    Open curly brace is at the end of the line.

    + +

    String literal uses single quote (') and not double quote (").

    + +

    Commit message

    + +

    Bad:

    + +
    +    Fix a problem with Firefox.
    +
    + +

    The above commit is too short and useless in the long term.

    + +

    Good:

    + +
    +    Add support for labeled statement.
    +
    +    It is covered in ECMAScript Language Specification Section 12.12.
    +    This also fixes parsing MooTools and JSLint code.
    +
    +    Running the benchmarks suite show negligible performance loss.
    +
    +    http://code.google.com/p/esprima/issues/detail?id=10
    +    http://code.google.com/p/esprima/issues/detail?id=15
    +    http://code.google.com/p/esprima/issues/detail?id=16
    +
    + +

    Important aspects:

    + +
      +
    • The first line is the short description, useful for per-line commit view and thus keep it under 80 characters.
    • +
    • The next paragraphs should provide more explanation (if needed).
    • +
    • Describe the testing situation (new unit/benchmark test, change in performance, etc).
    • +
    • Put the link to the issues for cross-ref.
    • +
    + +

    Baseline syntax tree as the expected result

    + +

    The test suite contains a collection of a pair of code and its syntax tree. To generate the syntax tree suitably formatted for the test fixture, use the included helper script tools/generate-test-fixture.js (with Node.js), e.g.: + +

    +node tools/generate-test-fixture.js "var answer = 42"
    +
    + +The syntax tree will be printed out to the console. This can be used in the test fixture. + +
    Test Workflow
    + +

    Before running the tests, prepare the tools via:

    + +
    +npm install
    +
    + +

    Unit tests

    + +

    Browser-based unit testing is available by opening test/index.html in the source tree. The online version is esprima.org/test.

    + +

    Command-line testing using Node.js:

    + +
    npm test
    + +

    Code coverage test

    + +

    Note: you need to use Node.js 0.6 or later version.

    + +

    Install istanbul:

    + +
    sudo npm install -g istanbul
    + +

    Run it in Esprima source tree:

    + +
    istanbul cover test/runner.js
    + +

    To get the detailed report, open coverage/lcov-report/index.html file and choose esprima.js from the list.

    + +

    Benchmark tests

    + +

    Available by opening test/benchmarks.html in the source tree. The online version is esprima.org/test/benchmarks.html.

    + +

    Note: Because the corpus is fetched via XML HTTP Request, the benchmarks test needs to be served via a web server and not local file.

    + +

    It is important to run this with various browsers to cover different JavaScript engines.

    + +

    Command-line benchmark using Node.js:

    + +
    node test/benchmark.js
    + +

    Command-line benchmark using V8 shell:

    + +
    /path/to/v8/shell test/benchmark.js
    + +

    Speed comparison tests

    + +

    Available by opening test/compare.html. The online version is esprima.org/test/compare.html.

    + +

    Note: Because the corpus is fetched via XML HTTP Request, the benchmarks test needs to be served via a web server and not local file.

    + +

    Warning: Since each parser has a different format for the syntax tree, the speed is not fully comparable (the cost of constructing different result is not taken into account). These tests exist only to ensure that Esprima parser is not ridiculously slow, e.g. one magnitude slower compare to other parsers.

    + +

    License

    + +

    Copyright (C) 2012, 2011 Ariya Hidayat and other contributors.

    + +

    Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

    +
      +
    • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    • +
    • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
    • +
    + +

    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

    + +
    + + +
    + + + + + + diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/esprima.js b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/esprima.js new file mode 100644 index 00000000..834c9ad9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/esprima.js @@ -0,0 +1,6306 @@ +/* + Copyright (C) 2013 Ariya Hidayat + Copyright (C) 2013 Thaddee Tyl + Copyright (C) 2012 Ariya Hidayat + Copyright (C) 2012 Mathias Bynens + Copyright (C) 2012 Joost-Wim Boekesteijn + Copyright (C) 2012 Kris Kowal + Copyright (C) 2012 Yusuke Suzuki + Copyright (C) 2012 Arpad Borsos + Copyright (C) 2011 Ariya Hidayat + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*jslint bitwise:true plusplus:true */ +/*global esprima:true, define:true, exports:true, window: true, +throwError: true, generateStatement: true, peek: true, +parseAssignmentExpression: true, parseBlock: true, +parseClassExpression: true, parseClassDeclaration: true, parseExpression: true, +parseForStatement: true, +parseFunctionDeclaration: true, parseFunctionExpression: true, +parseFunctionSourceElements: true, parseVariableIdentifier: true, +parseImportSpecifier: true, +parseLeftHandSideExpression: true, parseParams: true, validateParam: true, +parseSpreadOrAssignmentExpression: true, +parseStatement: true, parseSourceElement: true, parseModuleBlock: true, parseConciseBody: true, +advanceXJSChild: true, isXJSIdentifierStart: true, isXJSIdentifierPart: true, +scanXJSStringLiteral: true, scanXJSIdentifier: true, +parseXJSAttributeValue: true, parseXJSChild: true, parseXJSElement: true, parseXJSExpressionContainer: true, parseXJSEmptyExpression: true, +parseTypeAnnotation: true, parseTypeAnnotatableIdentifier: true, +parseYieldExpression: true +*/ + +(function (root, factory) { + 'use strict'; + + // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, + // Rhino, and plain browser loading. + if (typeof define === 'function' && define.amd) { + define(['exports'], factory); + } else if (typeof exports !== 'undefined') { + factory(exports); + } else { + factory((root.esprima = {})); + } +}(this, function (exports) { + 'use strict'; + + var Token, + TokenName, + FnExprTokens, + Syntax, + PropertyKind, + Messages, + Regex, + SyntaxTreeDelegate, + XHTMLEntities, + ClassPropertyType, + source, + strict, + index, + lineNumber, + lineStart, + length, + delegate, + lookahead, + state, + extra; + + Token = { + BooleanLiteral: 1, + EOF: 2, + Identifier: 3, + Keyword: 4, + NullLiteral: 5, + NumericLiteral: 6, + Punctuator: 7, + StringLiteral: 8, + RegularExpression: 9, + Template: 10, + XJSIdentifier: 11, + XJSText: 12 + }; + + TokenName = {}; + TokenName[Token.BooleanLiteral] = 'Boolean'; + TokenName[Token.EOF] = ''; + TokenName[Token.Identifier] = 'Identifier'; + TokenName[Token.Keyword] = 'Keyword'; + TokenName[Token.NullLiteral] = 'Null'; + TokenName[Token.NumericLiteral] = 'Numeric'; + TokenName[Token.Punctuator] = 'Punctuator'; + TokenName[Token.StringLiteral] = 'String'; + TokenName[Token.XJSIdentifier] = 'XJSIdentifier'; + TokenName[Token.XJSText] = 'XJSText'; + TokenName[Token.RegularExpression] = 'RegularExpression'; + + // A function following one of those tokens is an expression. + FnExprTokens = ['(', '{', '[', 'in', 'typeof', 'instanceof', 'new', + 'return', 'case', 'delete', 'throw', 'void', + // assignment operators + '=', '+=', '-=', '*=', '/=', '%=', '<<=', '>>=', '>>>=', + '&=', '|=', '^=', ',', + // binary/unary operators + '+', '-', '*', '/', '%', '++', '--', '<<', '>>', '>>>', '&', + '|', '^', '!', '~', '&&', '||', '?', ':', '===', '==', '>=', + '<=', '<', '>', '!=', '!==']; + + Syntax = { + ArrayExpression: 'ArrayExpression', + ArrayPattern: 'ArrayPattern', + ArrowFunctionExpression: 'ArrowFunctionExpression', + AssignmentExpression: 'AssignmentExpression', + BinaryExpression: 'BinaryExpression', + BlockStatement: 'BlockStatement', + BreakStatement: 'BreakStatement', + CallExpression: 'CallExpression', + CatchClause: 'CatchClause', + ClassBody: 'ClassBody', + ClassDeclaration: 'ClassDeclaration', + ClassExpression: 'ClassExpression', + ClassHeritage: 'ClassHeritage', + ComprehensionBlock: 'ComprehensionBlock', + ComprehensionExpression: 'ComprehensionExpression', + ConditionalExpression: 'ConditionalExpression', + ContinueStatement: 'ContinueStatement', + DebuggerStatement: 'DebuggerStatement', + DoWhileStatement: 'DoWhileStatement', + EmptyStatement: 'EmptyStatement', + ExportDeclaration: 'ExportDeclaration', + ExportBatchSpecifier: 'ExportBatchSpecifier', + ExportSpecifier: 'ExportSpecifier', + ExpressionStatement: 'ExpressionStatement', + ForInStatement: 'ForInStatement', + ForOfStatement: 'ForOfStatement', + ForStatement: 'ForStatement', + FunctionDeclaration: 'FunctionDeclaration', + FunctionExpression: 'FunctionExpression', + Identifier: 'Identifier', + IfStatement: 'IfStatement', + ImportDeclaration: 'ImportDeclaration', + ImportSpecifier: 'ImportSpecifier', + LabeledStatement: 'LabeledStatement', + Literal: 'Literal', + LogicalExpression: 'LogicalExpression', + MemberExpression: 'MemberExpression', + MethodDefinition: 'MethodDefinition', + ModuleDeclaration: 'ModuleDeclaration', + NewExpression: 'NewExpression', + ObjectExpression: 'ObjectExpression', + ObjectPattern: 'ObjectPattern', + Program: 'Program', + Property: 'Property', + ReturnStatement: 'ReturnStatement', + SequenceExpression: 'SequenceExpression', + SpreadElement: 'SpreadElement', + SwitchCase: 'SwitchCase', + SwitchStatement: 'SwitchStatement', + TaggedTemplateExpression: 'TaggedTemplateExpression', + TemplateElement: 'TemplateElement', + TemplateLiteral: 'TemplateLiteral', + ThisExpression: 'ThisExpression', + ThrowStatement: 'ThrowStatement', + TryStatement: 'TryStatement', + TypeAnnotatedIdentifier: 'TypeAnnotatedIdentifier', + TypeAnnotation: 'TypeAnnotation', + UnaryExpression: 'UnaryExpression', + UpdateExpression: 'UpdateExpression', + VariableDeclaration: 'VariableDeclaration', + VariableDeclarator: 'VariableDeclarator', + WhileStatement: 'WhileStatement', + WithStatement: 'WithStatement', + XJSIdentifier: 'XJSIdentifier', + XJSEmptyExpression: 'XJSEmptyExpression', + XJSExpressionContainer: 'XJSExpressionContainer', + XJSElement: 'XJSElement', + XJSClosingElement: 'XJSClosingElement', + XJSOpeningElement: 'XJSOpeningElement', + XJSAttribute: 'XJSAttribute', + XJSText: 'XJSText', + YieldExpression: 'YieldExpression' + }; + + PropertyKind = { + Data: 1, + Get: 2, + Set: 4 + }; + + ClassPropertyType = { + 'static': 'static', + prototype: 'prototype' + }; + + // Error messages should be identical to V8. + Messages = { + UnexpectedToken: 'Unexpected token %0', + UnexpectedNumber: 'Unexpected number', + UnexpectedString: 'Unexpected string', + UnexpectedIdentifier: 'Unexpected identifier', + UnexpectedReserved: 'Unexpected reserved word', + UnexpectedTemplate: 'Unexpected quasi %0', + UnexpectedEOS: 'Unexpected end of input', + NewlineAfterThrow: 'Illegal newline after throw', + InvalidRegExp: 'Invalid regular expression', + UnterminatedRegExp: 'Invalid regular expression: missing /', + InvalidLHSInAssignment: 'Invalid left-hand side in assignment', + InvalidLHSInFormalsList: 'Invalid left-hand side in formals list', + InvalidLHSInForIn: 'Invalid left-hand side in for-in', + MultipleDefaultsInSwitch: 'More than one default clause in switch statement', + NoCatchOrFinally: 'Missing catch or finally after try', + UnknownLabel: 'Undefined label \'%0\'', + Redeclaration: '%0 \'%1\' has already been declared', + IllegalContinue: 'Illegal continue statement', + IllegalBreak: 'Illegal break statement', + IllegalDuplicateClassProperty: 'Illegal duplicate property in class definition', + IllegalReturn: 'Illegal return statement', + IllegalYield: 'Illegal yield expression', + IllegalSpread: 'Illegal spread element', + StrictModeWith: 'Strict mode code may not include a with statement', + StrictCatchVariable: 'Catch variable may not be eval or arguments in strict mode', + StrictVarName: 'Variable name may not be eval or arguments in strict mode', + StrictParamName: 'Parameter name eval or arguments is not allowed in strict mode', + StrictParamDupe: 'Strict mode function may not have duplicate parameter names', + ParameterAfterRestParameter: 'Rest parameter must be final parameter of an argument list', + DefaultRestParameter: 'Rest parameter can not have a default value', + ElementAfterSpreadElement: 'Spread must be the final element of an element list', + ObjectPatternAsRestParameter: 'Invalid rest parameter', + ObjectPatternAsSpread: 'Invalid spread argument', + StrictFunctionName: 'Function name may not be eval or arguments in strict mode', + StrictOctalLiteral: 'Octal literals are not allowed in strict mode.', + StrictDelete: 'Delete of an unqualified identifier in strict mode.', + StrictDuplicateProperty: 'Duplicate data property in object literal not allowed in strict mode', + AccessorDataProperty: 'Object literal may not have data and accessor property with the same name', + AccessorGetSet: 'Object literal may not have multiple get/set accessors with the same name', + StrictLHSAssignment: 'Assignment to eval or arguments is not allowed in strict mode', + StrictLHSPostfix: 'Postfix increment/decrement may not have eval or arguments operand in strict mode', + StrictLHSPrefix: 'Prefix increment/decrement may not have eval or arguments operand in strict mode', + StrictReservedWord: 'Use of future reserved word in strict mode', + NewlineAfterModule: 'Illegal newline after module', + NoFromAfterImport: 'Missing from after import', + InvalidModuleSpecifier: 'Invalid module specifier', + NestedModule: 'Module declaration can not be nested', + NoYieldInGenerator: 'Missing yield in generator', + NoUnintializedConst: 'Const must be initialized', + ComprehensionRequiresBlock: 'Comprehension must have at least one block', + ComprehensionError: 'Comprehension Error', + EachNotAllowed: 'Each is not supported', + InvalidXJSTagName: 'XJS tag name can not be empty', + InvalidXJSAttributeValue: 'XJS value should be either an expression or a quoted XJS text', + ExpectedXJSClosingTag: 'Expected corresponding XJS closing tag for %0' + }; + + // See also tools/generate-unicode-regex.py. + Regex = { + NonAsciiIdentifierStart: new RegExp('[\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]'), + NonAsciiIdentifierPart: new RegExp('[\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0300-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u0483-\u0487\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u05d0-\u05ea\u05f0-\u05f2\u0610-\u061a\u0620-\u0669\u066e-\u06d3\u06d5-\u06dc\u06df-\u06e8\u06ea-\u06fc\u06ff\u0710-\u074a\u074d-\u07b1\u07c0-\u07f5\u07fa\u0800-\u082d\u0840-\u085b\u08a0\u08a2-\u08ac\u08e4-\u08fe\u0900-\u0963\u0966-\u096f\u0971-\u0977\u0979-\u097f\u0981-\u0983\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bc-\u09c4\u09c7\u09c8\u09cb-\u09ce\u09d7\u09dc\u09dd\u09df-\u09e3\u09e6-\u09f1\u0a01-\u0a03\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a59-\u0a5c\u0a5e\u0a66-\u0a75\u0a81-\u0a83\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abc-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ad0\u0ae0-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3c-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5c\u0b5d\u0b5f-\u0b63\u0b66-\u0b6f\u0b71\u0b82\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd0\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c58\u0c59\u0c60-\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbc-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0cde\u0ce0-\u0ce3\u0ce6-\u0cef\u0cf1\u0cf2\u0d02\u0d03\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d-\u0d44\u0d46-\u0d48\u0d4a-\u0d4e\u0d57\u0d60-\u0d63\u0d66-\u0d6f\u0d7a-\u0d7f\u0d82\u0d83\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e01-\u0e3a\u0e40-\u0e4e\u0e50-\u0e59\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb9\u0ebb-\u0ebd\u0ec0-\u0ec4\u0ec6\u0ec8-\u0ecd\u0ed0-\u0ed9\u0edc-\u0edf\u0f00\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e-\u0f47\u0f49-\u0f6c\u0f71-\u0f84\u0f86-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1049\u1050-\u109d\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u135d-\u135f\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176c\u176e-\u1770\u1772\u1773\u1780-\u17d3\u17d7\u17dc\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1820-\u1877\u1880-\u18aa\u18b0-\u18f5\u1900-\u191c\u1920-\u192b\u1930-\u193b\u1946-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u19d0-\u19d9\u1a00-\u1a1b\u1a20-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1aa7\u1b00-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1bf3\u1c00-\u1c37\u1c40-\u1c49\u1c4d-\u1c7d\u1cd0-\u1cd2\u1cd4-\u1cf6\u1d00-\u1de6\u1dfc-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u200c\u200d\u203f\u2040\u2054\u2071\u207f\u2090-\u209c\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d7f-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2de0-\u2dff\u2e2f\u3005-\u3007\u3021-\u302f\u3031-\u3035\u3038-\u303c\u3041-\u3096\u3099\u309a\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua62b\ua640-\ua66f\ua674-\ua67d\ua67f-\ua697\ua69f-\ua6f1\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua827\ua840-\ua873\ua880-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f7\ua8fb\ua900-\ua92d\ua930-\ua953\ua960-\ua97c\ua980-\ua9c0\ua9cf-\ua9d9\uaa00-\uaa36\uaa40-\uaa4d\uaa50-\uaa59\uaa60-\uaa76\uaa7a\uaa7b\uaa80-\uaac2\uaadb-\uaadd\uaae0-\uaaef\uaaf2-\uaaf6\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabea\uabec\uabed\uabf0-\uabf9\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\ufe70-\ufe74\ufe76-\ufefc\uff10-\uff19\uff21-\uff3a\uff3f\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]') + }; + + // Ensure the condition is true, otherwise throw an error. + // This is only to have a better contract semantic, i.e. another safety net + // to catch a logic error. The condition shall be fulfilled in normal case. + // Do NOT use this to enforce a certain condition on any user input. + + function assert(condition, message) { + if (!condition) { + throw new Error('ASSERT: ' + message); + } + } + + function isDecimalDigit(ch) { + return (ch >= 48 && ch <= 57); // 0..9 + } + + function isHexDigit(ch) { + return '0123456789abcdefABCDEF'.indexOf(ch) >= 0; + } + + function isOctalDigit(ch) { + return '01234567'.indexOf(ch) >= 0; + } + + + // 7.2 White Space + + function isWhiteSpace(ch) { + return (ch === 32) || // space + (ch === 9) || // tab + (ch === 0xB) || + (ch === 0xC) || + (ch === 0xA0) || + (ch >= 0x1680 && '\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\uFEFF'.indexOf(String.fromCharCode(ch)) > 0); + } + + // 7.3 Line Terminators + + function isLineTerminator(ch) { + return (ch === 10) || (ch === 13) || (ch === 0x2028) || (ch === 0x2029); + } + + // 7.6 Identifier Names and Identifiers + + function isIdentifierStart(ch) { + return (ch === 36) || (ch === 95) || // $ (dollar) and _ (underscore) + (ch >= 65 && ch <= 90) || // A..Z + (ch >= 97 && ch <= 122) || // a..z + (ch === 92) || // \ (backslash) + ((ch >= 0x80) && Regex.NonAsciiIdentifierStart.test(String.fromCharCode(ch))); + } + + function isIdentifierPart(ch) { + return (ch === 36) || (ch === 95) || // $ (dollar) and _ (underscore) + (ch >= 65 && ch <= 90) || // A..Z + (ch >= 97 && ch <= 122) || // a..z + (ch >= 48 && ch <= 57) || // 0..9 + (ch === 92) || // \ (backslash) + ((ch >= 0x80) && Regex.NonAsciiIdentifierPart.test(String.fromCharCode(ch))); + } + + // 7.6.1.2 Future Reserved Words + + function isFutureReservedWord(id) { + switch (id) { + case 'class': + case 'enum': + case 'export': + case 'extends': + case 'import': + case 'super': + return true; + default: + return false; + } + } + + function isStrictModeReservedWord(id) { + switch (id) { + case 'implements': + case 'interface': + case 'package': + case 'private': + case 'protected': + case 'public': + case 'static': + case 'yield': + case 'let': + return true; + default: + return false; + } + } + + function isRestrictedWord(id) { + return id === 'eval' || id === 'arguments'; + } + + // 7.6.1.1 Keywords + + function isKeyword(id) { + if (strict && isStrictModeReservedWord(id)) { + return true; + } + + // 'const' is specialized as Keyword in V8. + // 'yield' and 'let' are for compatiblity with SpiderMonkey and ES.next. + // Some others are from future reserved words. + + switch (id.length) { + case 2: + return (id === 'if') || (id === 'in') || (id === 'do'); + case 3: + return (id === 'var') || (id === 'for') || (id === 'new') || + (id === 'try') || (id === 'let'); + case 4: + return (id === 'this') || (id === 'else') || (id === 'case') || + (id === 'void') || (id === 'with') || (id === 'enum'); + case 5: + return (id === 'while') || (id === 'break') || (id === 'catch') || + (id === 'throw') || (id === 'const') || (id === 'yield') || + (id === 'class') || (id === 'super'); + case 6: + return (id === 'return') || (id === 'typeof') || (id === 'delete') || + (id === 'switch') || (id === 'export') || (id === 'import'); + case 7: + return (id === 'default') || (id === 'finally') || (id === 'extends'); + case 8: + return (id === 'function') || (id === 'continue') || (id === 'debugger'); + case 10: + return (id === 'instanceof'); + default: + return false; + } + } + + // 7.4 Comments + + function skipComment() { + var ch, blockComment, lineComment; + + blockComment = false; + lineComment = false; + + while (index < length) { + ch = source.charCodeAt(index); + + if (lineComment) { + ++index; + if (isLineTerminator(ch)) { + lineComment = false; + if (ch === 13 && source.charCodeAt(index) === 10) { + ++index; + } + ++lineNumber; + lineStart = index; + } + } else if (blockComment) { + if (isLineTerminator(ch)) { + if (ch === 13 && source.charCodeAt(index + 1) === 10) { + ++index; + } + ++lineNumber; + ++index; + lineStart = index; + if (index >= length) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } else { + ch = source.charCodeAt(index++); + if (index >= length) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + // Block comment ends with '*/' (char #42, char #47). + if (ch === 42) { + ch = source.charCodeAt(index); + if (ch === 47) { + ++index; + blockComment = false; + } + } + } + } else if (ch === 47) { + ch = source.charCodeAt(index + 1); + // Line comment starts with '//' (char #47, char #47). + if (ch === 47) { + index += 2; + lineComment = true; + } else if (ch === 42) { + // Block comment starts with '/*' (char #47, char #42). + index += 2; + blockComment = true; + if (index >= length) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } else { + break; + } + } else if (isWhiteSpace(ch)) { + ++index; + } else if (isLineTerminator(ch)) { + ++index; + if (ch === 13 && source.charCodeAt(index) === 10) { + ++index; + } + ++lineNumber; + lineStart = index; + } else { + break; + } + } + } + + function scanHexEscape(prefix) { + var i, len, ch, code = 0; + + len = (prefix === 'u') ? 4 : 2; + for (i = 0; i < len; ++i) { + if (index < length && isHexDigit(source[index])) { + ch = source[index++]; + code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase()); + } else { + return ''; + } + } + return String.fromCharCode(code); + } + + function scanUnicodeCodePointEscape() { + var ch, code, cu1, cu2; + + ch = source[index]; + code = 0; + + // At least, one hex digit is required. + if (ch === '}') { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + while (index < length) { + ch = source[index++]; + if (!isHexDigit(ch)) { + break; + } + code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase()); + } + + if (code > 0x10FFFF || ch !== '}') { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + // UTF-16 Encoding + if (code <= 0xFFFF) { + return String.fromCharCode(code); + } + cu1 = ((code - 0x10000) >> 10) + 0xD800; + cu2 = ((code - 0x10000) & 1023) + 0xDC00; + return String.fromCharCode(cu1, cu2); + } + + function getEscapedIdentifier() { + var ch, id; + + ch = source.charCodeAt(index++); + id = String.fromCharCode(ch); + + // '\u' (char #92, char #117) denotes an escaped character. + if (ch === 92) { + if (source.charCodeAt(index) !== 117) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + ++index; + ch = scanHexEscape('u'); + if (!ch || ch === '\\' || !isIdentifierStart(ch.charCodeAt(0))) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + id = ch; + } + + while (index < length) { + ch = source.charCodeAt(index); + if (!isIdentifierPart(ch)) { + break; + } + ++index; + id += String.fromCharCode(ch); + + // '\u' (char #92, char #117) denotes an escaped character. + if (ch === 92) { + id = id.substr(0, id.length - 1); + if (source.charCodeAt(index) !== 117) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + ++index; + ch = scanHexEscape('u'); + if (!ch || ch === '\\' || !isIdentifierPart(ch.charCodeAt(0))) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + id += ch; + } + } + + return id; + } + + function getIdentifier() { + var start, ch; + + start = index++; + while (index < length) { + ch = source.charCodeAt(index); + if (ch === 92) { + // Blackslash (char #92) marks Unicode escape sequence. + index = start; + return getEscapedIdentifier(); + } + if (isIdentifierPart(ch)) { + ++index; + } else { + break; + } + } + + return source.slice(start, index); + } + + function scanIdentifier() { + var start, id, type; + + start = index; + + // Backslash (char #92) starts an escaped character. + id = (source.charCodeAt(index) === 92) ? getEscapedIdentifier() : getIdentifier(); + + // There is no keyword or literal with only one character. + // Thus, it must be an identifier. + if (id.length === 1) { + type = Token.Identifier; + } else if (isKeyword(id)) { + type = Token.Keyword; + } else if (id === 'null') { + type = Token.NullLiteral; + } else if (id === 'true' || id === 'false') { + type = Token.BooleanLiteral; + } else { + type = Token.Identifier; + } + + return { + type: type, + value: id, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + + // 7.7 Punctuators + + function scanPunctuator() { + var start = index, + code = source.charCodeAt(index), + code2, + ch1 = source[index], + ch2, + ch3, + ch4; + + switch (code) { + // Check for most common single-character punctuators. + case 40: // ( open bracket + case 41: // ) close bracket + case 59: // ; semicolon + case 44: // , comma + case 123: // { open curly brace + case 125: // } close curly brace + case 91: // [ + case 93: // ] + case 58: // : + case 63: // ? + case 126: // ~ + ++index; + if (extra.tokenize) { + if (code === 40) { + extra.openParenToken = extra.tokens.length; + } else if (code === 123) { + extra.openCurlyToken = extra.tokens.length; + } + } + return { + type: Token.Punctuator, + value: String.fromCharCode(code), + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + + default: + code2 = source.charCodeAt(index + 1); + + // '=' (char #61) marks an assignment or comparison operator. + if (code2 === 61) { + switch (code) { + case 37: // % + case 38: // & + case 42: // *: + case 43: // + + case 45: // - + case 47: // / + case 60: // < + case 62: // > + case 94: // ^ + case 124: // | + index += 2; + return { + type: Token.Punctuator, + value: String.fromCharCode(code) + String.fromCharCode(code2), + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + + case 33: // ! + case 61: // = + index += 2; + + // !== and === + if (source.charCodeAt(index) === 61) { + ++index; + } + return { + type: Token.Punctuator, + value: source.slice(start, index), + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + default: + break; + } + } + break; + } + + // Peek more characters. + + ch2 = source[index + 1]; + ch3 = source[index + 2]; + ch4 = source[index + 3]; + + // 4-character punctuator: >>>= + + if (ch1 === '>' && ch2 === '>' && ch3 === '>') { + if (ch4 === '=') { + index += 4; + return { + type: Token.Punctuator, + value: '>>>=', + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + } + + // 3-character punctuators: === !== >>> <<= >>= + + if (ch1 === '>' && ch2 === '>' && ch3 === '>') { + index += 3; + return { + type: Token.Punctuator, + value: '>>>', + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + if (ch1 === '<' && ch2 === '<' && ch3 === '=') { + index += 3; + return { + type: Token.Punctuator, + value: '<<=', + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + if (ch1 === '>' && ch2 === '>' && ch3 === '=') { + index += 3; + return { + type: Token.Punctuator, + value: '>>=', + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + if (ch1 === '.' && ch2 === '.' && ch3 === '.') { + index += 3; + return { + type: Token.Punctuator, + value: '...', + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + // Other 2-character punctuators: ++ -- << >> && || + + if (ch1 === ch2 && ('+-<>&|'.indexOf(ch1) >= 0)) { + index += 2; + return { + type: Token.Punctuator, + value: ch1 + ch2, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + if (ch1 === '=' && ch2 === '>') { + index += 2; + return { + type: Token.Punctuator, + value: '=>', + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + if ('<>=!+-*%&|^/'.indexOf(ch1) >= 0) { + ++index; + return { + type: Token.Punctuator, + value: ch1, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + if (ch1 === '.') { + ++index; + return { + type: Token.Punctuator, + value: ch1, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + // 7.8.3 Numeric Literals + + function scanHexLiteral(start) { + var number = ''; + + while (index < length) { + if (!isHexDigit(source[index])) { + break; + } + number += source[index++]; + } + + if (number.length === 0) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + if (isIdentifierStart(source.charCodeAt(index))) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + return { + type: Token.NumericLiteral, + value: parseInt('0x' + number, 16), + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + function scanOctalLiteral(prefix, start) { + var number, octal; + + if (isOctalDigit(prefix)) { + octal = true; + number = '0' + source[index++]; + } else { + octal = false; + ++index; + number = ''; + } + + while (index < length) { + if (!isOctalDigit(source[index])) { + break; + } + number += source[index++]; + } + + if (!octal && number.length === 0) { + // only 0o or 0O + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + if (isIdentifierStart(source.charCodeAt(index)) || isDecimalDigit(source.charCodeAt(index))) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + return { + type: Token.NumericLiteral, + value: parseInt(number, 8), + octal: octal, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + function scanNumericLiteral() { + var number, start, ch, octal; + + ch = source[index]; + assert(isDecimalDigit(ch.charCodeAt(0)) || (ch === '.'), + 'Numeric literal must start with a decimal digit or a decimal point'); + + start = index; + number = ''; + if (ch !== '.') { + number = source[index++]; + ch = source[index]; + + // Hex number starts with '0x'. + // Octal number starts with '0'. + // Octal number in ES6 starts with '0o'. + // Binary number in ES6 starts with '0b'. + if (number === '0') { + if (ch === 'x' || ch === 'X') { + ++index; + return scanHexLiteral(start); + } + if (ch === 'b' || ch === 'B') { + ++index; + number = ''; + + while (index < length) { + ch = source[index]; + if (ch !== '0' && ch !== '1') { + break; + } + number += source[index++]; + } + + if (number.length === 0) { + // only 0b or 0B + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + if (index < length) { + ch = source.charCodeAt(index); + if (isIdentifierStart(ch) || isDecimalDigit(ch)) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } + return { + type: Token.NumericLiteral, + value: parseInt(number, 2), + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + if (ch === 'o' || ch === 'O' || isOctalDigit(ch)) { + return scanOctalLiteral(ch, start); + } + // decimal number starts with '0' such as '09' is illegal. + if (ch && isDecimalDigit(ch.charCodeAt(0))) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } + + while (isDecimalDigit(source.charCodeAt(index))) { + number += source[index++]; + } + ch = source[index]; + } + + if (ch === '.') { + number += source[index++]; + while (isDecimalDigit(source.charCodeAt(index))) { + number += source[index++]; + } + ch = source[index]; + } + + if (ch === 'e' || ch === 'E') { + number += source[index++]; + + ch = source[index]; + if (ch === '+' || ch === '-') { + number += source[index++]; + } + if (isDecimalDigit(source.charCodeAt(index))) { + while (isDecimalDigit(source.charCodeAt(index))) { + number += source[index++]; + } + } else { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } + + if (isIdentifierStart(source.charCodeAt(index))) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + return { + type: Token.NumericLiteral, + value: parseFloat(number), + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + // 7.8.4 String Literals + + function scanStringLiteral() { + var str = '', quote, start, ch, code, unescaped, restore, octal = false; + + quote = source[index]; + assert((quote === '\'' || quote === '"'), + 'String literal must starts with a quote'); + + start = index; + ++index; + + while (index < length) { + ch = source[index++]; + + if (ch === quote) { + quote = ''; + break; + } else if (ch === '\\') { + ch = source[index++]; + if (!ch || !isLineTerminator(ch.charCodeAt(0))) { + switch (ch) { + case 'n': + str += '\n'; + break; + case 'r': + str += '\r'; + break; + case 't': + str += '\t'; + break; + case 'u': + case 'x': + if (source[index] === '{') { + ++index; + str += scanUnicodeCodePointEscape(); + } else { + restore = index; + unescaped = scanHexEscape(ch); + if (unescaped) { + str += unescaped; + } else { + index = restore; + str += ch; + } + } + break; + case 'b': + str += '\b'; + break; + case 'f': + str += '\f'; + break; + case 'v': + str += '\x0B'; + break; + + default: + if (isOctalDigit(ch)) { + code = '01234567'.indexOf(ch); + + // \0 is not octal escape sequence + if (code !== 0) { + octal = true; + } + + if (index < length && isOctalDigit(source[index])) { + octal = true; + code = code * 8 + '01234567'.indexOf(source[index++]); + + // 3 digits are only allowed when string starts + // with 0, 1, 2, 3 + if ('0123'.indexOf(ch) >= 0 && + index < length && + isOctalDigit(source[index])) { + code = code * 8 + '01234567'.indexOf(source[index++]); + } + } + str += String.fromCharCode(code); + } else { + str += ch; + } + break; + } + } else { + ++lineNumber; + if (ch === '\r' && source[index] === '\n') { + ++index; + } + } + } else if (isLineTerminator(ch.charCodeAt(0))) { + break; + } else { + str += ch; + } + } + + if (quote !== '') { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + return { + type: Token.StringLiteral, + value: str, + octal: octal, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + function scanTemplate() { + var cooked = '', ch, start, terminated, tail, restore, unescaped, code, octal; + + terminated = false; + tail = false; + start = index; + + ++index; + + while (index < length) { + ch = source[index++]; + if (ch === '`') { + tail = true; + terminated = true; + break; + } else if (ch === '$') { + if (source[index] === '{') { + ++index; + terminated = true; + break; + } + cooked += ch; + } else if (ch === '\\') { + ch = source[index++]; + if (!isLineTerminator(ch.charCodeAt(0))) { + switch (ch) { + case 'n': + cooked += '\n'; + break; + case 'r': + cooked += '\r'; + break; + case 't': + cooked += '\t'; + break; + case 'u': + case 'x': + if (source[index] === '{') { + ++index; + cooked += scanUnicodeCodePointEscape(); + } else { + restore = index; + unescaped = scanHexEscape(ch); + if (unescaped) { + cooked += unescaped; + } else { + index = restore; + cooked += ch; + } + } + break; + case 'b': + cooked += '\b'; + break; + case 'f': + cooked += '\f'; + break; + case 'v': + cooked += '\v'; + break; + + default: + if (isOctalDigit(ch)) { + code = '01234567'.indexOf(ch); + + // \0 is not octal escape sequence + if (code !== 0) { + octal = true; + } + + if (index < length && isOctalDigit(source[index])) { + octal = true; + code = code * 8 + '01234567'.indexOf(source[index++]); + + // 3 digits are only allowed when string starts + // with 0, 1, 2, 3 + if ('0123'.indexOf(ch) >= 0 && + index < length && + isOctalDigit(source[index])) { + code = code * 8 + '01234567'.indexOf(source[index++]); + } + } + cooked += String.fromCharCode(code); + } else { + cooked += ch; + } + break; + } + } else { + ++lineNumber; + if (ch === '\r' && source[index] === '\n') { + ++index; + } + } + } else if (isLineTerminator(ch.charCodeAt(0))) { + ++lineNumber; + if (ch === '\r' && source[index] === '\n') { + ++index; + } + cooked += '\n'; + } else { + cooked += ch; + } + } + + if (!terminated) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + return { + type: Token.Template, + value: { + cooked: cooked, + raw: source.slice(start + 1, index - ((tail) ? 1 : 2)) + }, + tail: tail, + octal: octal, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + function scanTemplateElement(option) { + var startsWith, template; + + lookahead = null; + skipComment(); + + startsWith = (option.head) ? '`' : '}'; + + if (source[index] !== startsWith) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + template = scanTemplate(); + + peek(); + + return template; + } + + function scanRegExp() { + var str, ch, start, pattern, flags, value, classMarker = false, restore, terminated = false; + + lookahead = null; + skipComment(); + + start = index; + ch = source[index]; + assert(ch === '/', 'Regular expression literal must start with a slash'); + str = source[index++]; + + while (index < length) { + ch = source[index++]; + str += ch; + if (classMarker) { + if (ch === ']') { + classMarker = false; + } + } else { + if (ch === '\\') { + ch = source[index++]; + // ECMA-262 7.8.5 + if (isLineTerminator(ch.charCodeAt(0))) { + throwError({}, Messages.UnterminatedRegExp); + } + str += ch; + } else if (ch === '/') { + terminated = true; + break; + } else if (ch === '[') { + classMarker = true; + } else if (isLineTerminator(ch.charCodeAt(0))) { + throwError({}, Messages.UnterminatedRegExp); + } + } + } + + if (!terminated) { + throwError({}, Messages.UnterminatedRegExp); + } + + // Exclude leading and trailing slash. + pattern = str.substr(1, str.length - 2); + + flags = ''; + while (index < length) { + ch = source[index]; + if (!isIdentifierPart(ch.charCodeAt(0))) { + break; + } + + ++index; + if (ch === '\\' && index < length) { + ch = source[index]; + if (ch === 'u') { + ++index; + restore = index; + ch = scanHexEscape('u'); + if (ch) { + flags += ch; + for (str += '\\u'; restore < index; ++restore) { + str += source[restore]; + } + } else { + index = restore; + flags += 'u'; + str += '\\u'; + } + } else { + str += '\\'; + } + } else { + flags += ch; + str += ch; + } + } + + try { + value = new RegExp(pattern, flags); + } catch (e) { + throwError({}, Messages.InvalidRegExp); + } + + peek(); + + + if (extra.tokenize) { + return { + type: Token.RegularExpression, + value: value, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + return { + literal: str, + value: value, + range: [start, index] + }; + } + + function isIdentifierName(token) { + return token.type === Token.Identifier || + token.type === Token.Keyword || + token.type === Token.BooleanLiteral || + token.type === Token.NullLiteral; + } + + function advanceSlash() { + var prevToken, + checkToken; + // Using the following algorithm: + // https://github.com/mozilla/sweet.js/wiki/design + prevToken = extra.tokens[extra.tokens.length - 1]; + if (!prevToken) { + // Nothing before that: it cannot be a division. + return scanRegExp(); + } + if (prevToken.type === 'Punctuator') { + if (prevToken.value === ')') { + checkToken = extra.tokens[extra.openParenToken - 1]; + if (checkToken && + checkToken.type === 'Keyword' && + (checkToken.value === 'if' || + checkToken.value === 'while' || + checkToken.value === 'for' || + checkToken.value === 'with')) { + return scanRegExp(); + } + return scanPunctuator(); + } + if (prevToken.value === '}') { + // Dividing a function by anything makes little sense, + // but we have to check for that. + if (extra.tokens[extra.openCurlyToken - 3] && + extra.tokens[extra.openCurlyToken - 3].type === 'Keyword') { + // Anonymous function. + checkToken = extra.tokens[extra.openCurlyToken - 4]; + if (!checkToken) { + return scanPunctuator(); + } + } else if (extra.tokens[extra.openCurlyToken - 4] && + extra.tokens[extra.openCurlyToken - 4].type === 'Keyword') { + // Named function. + checkToken = extra.tokens[extra.openCurlyToken - 5]; + if (!checkToken) { + return scanRegExp(); + } + } else { + return scanPunctuator(); + } + // checkToken determines whether the function is + // a declaration or an expression. + if (FnExprTokens.indexOf(checkToken.value) >= 0) { + // It is an expression. + return scanPunctuator(); + } + // It is a declaration. + return scanRegExp(); + } + return scanRegExp(); + } + if (prevToken.type === 'Keyword') { + return scanRegExp(); + } + return scanPunctuator(); + } + + function advance() { + var ch; + + if (!state.inXJSChild) { + skipComment(); + } + + if (index >= length) { + return { + type: Token.EOF, + lineNumber: lineNumber, + lineStart: lineStart, + range: [index, index] + }; + } + + if (state.inXJSChild) { + return advanceXJSChild(); + } + + ch = source.charCodeAt(index); + + // Very common: ( and ) and ; + if (ch === 40 || ch === 41 || ch === 58) { + return scanPunctuator(); + } + + // String literal starts with single quote (#39) or double quote (#34). + if (ch === 39 || ch === 34) { + if (state.inXJSTag) { + return scanXJSStringLiteral(); + } + return scanStringLiteral(); + } + + if (state.inXJSTag && isXJSIdentifierStart(ch)) { + return scanXJSIdentifier(); + } + + if (ch === 96) { + return scanTemplate(); + } + if (isIdentifierStart(ch)) { + return scanIdentifier(); + } + + // Dot (.) char #46 can also start a floating-point number, hence the need + // to check the next character. + if (ch === 46) { + if (isDecimalDigit(source.charCodeAt(index + 1))) { + return scanNumericLiteral(); + } + return scanPunctuator(); + } + + if (isDecimalDigit(ch)) { + return scanNumericLiteral(); + } + + // Slash (/) char #47 can also start a regex. + if (extra.tokenize && ch === 47) { + return advanceSlash(); + } + + return scanPunctuator(); + } + + function lex() { + var token; + + token = lookahead; + index = token.range[1]; + lineNumber = token.lineNumber; + lineStart = token.lineStart; + + lookahead = advance(); + + index = token.range[1]; + lineNumber = token.lineNumber; + lineStart = token.lineStart; + + return token; + } + + function peek() { + var pos, line, start; + + pos = index; + line = lineNumber; + start = lineStart; + lookahead = advance(); + index = pos; + lineNumber = line; + lineStart = start; + } + + function lookahead2() { + var adv, pos, line, start, result; + + // If we are collecting the tokens, don't grab the next one yet. + adv = (typeof extra.advance === 'function') ? extra.advance : advance; + + pos = index; + line = lineNumber; + start = lineStart; + + // Scan for the next immediate token. + if (lookahead === null) { + lookahead = adv(); + } + index = lookahead.range[1]; + lineNumber = lookahead.lineNumber; + lineStart = lookahead.lineStart; + + // Grab the token right after. + result = adv(); + index = pos; + lineNumber = line; + lineStart = start; + + return result; + } + + SyntaxTreeDelegate = { + + name: 'SyntaxTree', + + postProcess: function (node) { + return node; + }, + + createArrayExpression: function (elements) { + return { + type: Syntax.ArrayExpression, + elements: elements + }; + }, + + createAssignmentExpression: function (operator, left, right) { + return { + type: Syntax.AssignmentExpression, + operator: operator, + left: left, + right: right + }; + }, + + createBinaryExpression: function (operator, left, right) { + var type = (operator === '||' || operator === '&&') ? Syntax.LogicalExpression : + Syntax.BinaryExpression; + return { + type: type, + operator: operator, + left: left, + right: right + }; + }, + + createBlockStatement: function (body) { + return { + type: Syntax.BlockStatement, + body: body + }; + }, + + createBreakStatement: function (label) { + return { + type: Syntax.BreakStatement, + label: label + }; + }, + + createCallExpression: function (callee, args) { + return { + type: Syntax.CallExpression, + callee: callee, + 'arguments': args + }; + }, + + createCatchClause: function (param, body) { + return { + type: Syntax.CatchClause, + param: param, + body: body + }; + }, + + createConditionalExpression: function (test, consequent, alternate) { + return { + type: Syntax.ConditionalExpression, + test: test, + consequent: consequent, + alternate: alternate + }; + }, + + createContinueStatement: function (label) { + return { + type: Syntax.ContinueStatement, + label: label + }; + }, + + createDebuggerStatement: function () { + return { + type: Syntax.DebuggerStatement + }; + }, + + createDoWhileStatement: function (body, test) { + return { + type: Syntax.DoWhileStatement, + body: body, + test: test + }; + }, + + createEmptyStatement: function () { + return { + type: Syntax.EmptyStatement + }; + }, + + createExpressionStatement: function (expression) { + return { + type: Syntax.ExpressionStatement, + expression: expression + }; + }, + + createForStatement: function (init, test, update, body) { + return { + type: Syntax.ForStatement, + init: init, + test: test, + update: update, + body: body + }; + }, + + createForInStatement: function (left, right, body) { + return { + type: Syntax.ForInStatement, + left: left, + right: right, + body: body, + each: false + }; + }, + + createForOfStatement: function (left, right, body) { + return { + type: Syntax.ForOfStatement, + left: left, + right: right, + body: body + }; + }, + + createFunctionDeclaration: function (id, params, defaults, body, rest, generator, expression, + returnType) { + return { + type: Syntax.FunctionDeclaration, + id: id, + params: params, + defaults: defaults, + body: body, + rest: rest, + generator: generator, + expression: expression, + returnType: returnType + }; + }, + + createFunctionExpression: function (id, params, defaults, body, rest, generator, expression, + returnType) { + return { + type: Syntax.FunctionExpression, + id: id, + params: params, + defaults: defaults, + body: body, + rest: rest, + generator: generator, + expression: expression, + returnType: returnType + }; + }, + + createIdentifier: function (name) { + return { + type: Syntax.Identifier, + name: name, + // Only here to initialize the shape of the object to ensure + // that the 'typeAnnotation' key is ordered before others that + // are added later (like 'loc' and 'range'). This just helps + // keep the shape of Identifier nodes consistent with everything + // else. + typeAnnotation: undefined + }; + }, + + createTypeAnnotation: function (typeIdentifier, paramTypes, returnType, nullable) { + return { + type: Syntax.TypeAnnotation, + id: typeIdentifier, + paramTypes: paramTypes, + returnType: returnType, + nullable: nullable + }; + }, + + createTypeAnnotatedIdentifier: function (identifier, annotation) { + return { + type: Syntax.TypeAnnotatedIdentifier, + id: identifier, + annotation: annotation + }; + }, + + createXJSAttribute: function (name, value) { + return { + type: Syntax.XJSAttribute, + name: name, + value: value + }; + }, + + createXJSIdentifier: function (name, namespace) { + return { + type: Syntax.XJSIdentifier, + name: name, + namespace: namespace + }; + }, + + createXJSElement: function (openingElement, closingElement, children) { + return { + type: Syntax.XJSElement, + openingElement: openingElement, + closingElement: closingElement, + children: children + }; + }, + + createXJSEmptyExpression: function () { + return { + type: Syntax.XJSEmptyExpression + }; + }, + + createXJSExpressionContainer: function (expression) { + return { + type: Syntax.XJSExpressionContainer, + expression: expression + }; + }, + + createXJSOpeningElement: function (name, attributes, selfClosing) { + return { + type: Syntax.XJSOpeningElement, + name: name, + selfClosing: selfClosing, + attributes: attributes + }; + }, + + createXJSClosingElement: function (name) { + return { + type: Syntax.XJSClosingElement, + name: name + }; + }, + + createIfStatement: function (test, consequent, alternate) { + return { + type: Syntax.IfStatement, + test: test, + consequent: consequent, + alternate: alternate + }; + }, + + createLabeledStatement: function (label, body) { + return { + type: Syntax.LabeledStatement, + label: label, + body: body + }; + }, + + createLiteral: function (token) { + return { + type: Syntax.Literal, + value: token.value, + raw: source.slice(token.range[0], token.range[1]) + }; + }, + + createMemberExpression: function (accessor, object, property) { + return { + type: Syntax.MemberExpression, + computed: accessor === '[', + object: object, + property: property + }; + }, + + createNewExpression: function (callee, args) { + return { + type: Syntax.NewExpression, + callee: callee, + 'arguments': args + }; + }, + + createObjectExpression: function (properties) { + return { + type: Syntax.ObjectExpression, + properties: properties + }; + }, + + createPostfixExpression: function (operator, argument) { + return { + type: Syntax.UpdateExpression, + operator: operator, + argument: argument, + prefix: false + }; + }, + + createProgram: function (body) { + return { + type: Syntax.Program, + body: body + }; + }, + + createProperty: function (kind, key, value, method, shorthand) { + return { + type: Syntax.Property, + key: key, + value: value, + kind: kind, + method: method, + shorthand: shorthand + }; + }, + + createReturnStatement: function (argument) { + return { + type: Syntax.ReturnStatement, + argument: argument + }; + }, + + createSequenceExpression: function (expressions) { + return { + type: Syntax.SequenceExpression, + expressions: expressions + }; + }, + + createSwitchCase: function (test, consequent) { + return { + type: Syntax.SwitchCase, + test: test, + consequent: consequent + }; + }, + + createSwitchStatement: function (discriminant, cases) { + return { + type: Syntax.SwitchStatement, + discriminant: discriminant, + cases: cases + }; + }, + + createThisExpression: function () { + return { + type: Syntax.ThisExpression + }; + }, + + createThrowStatement: function (argument) { + return { + type: Syntax.ThrowStatement, + argument: argument + }; + }, + + createTryStatement: function (block, guardedHandlers, handlers, finalizer) { + return { + type: Syntax.TryStatement, + block: block, + guardedHandlers: guardedHandlers, + handlers: handlers, + finalizer: finalizer + }; + }, + + createUnaryExpression: function (operator, argument) { + if (operator === '++' || operator === '--') { + return { + type: Syntax.UpdateExpression, + operator: operator, + argument: argument, + prefix: true + }; + } + return { + type: Syntax.UnaryExpression, + operator: operator, + argument: argument + }; + }, + + createVariableDeclaration: function (declarations, kind) { + return { + type: Syntax.VariableDeclaration, + declarations: declarations, + kind: kind + }; + }, + + createVariableDeclarator: function (id, init) { + return { + type: Syntax.VariableDeclarator, + id: id, + init: init + }; + }, + + createWhileStatement: function (test, body) { + return { + type: Syntax.WhileStatement, + test: test, + body: body + }; + }, + + createWithStatement: function (object, body) { + return { + type: Syntax.WithStatement, + object: object, + body: body + }; + }, + + createTemplateElement: function (value, tail) { + return { + type: Syntax.TemplateElement, + value: value, + tail: tail + }; + }, + + createTemplateLiteral: function (quasis, expressions) { + return { + type: Syntax.TemplateLiteral, + quasis: quasis, + expressions: expressions + }; + }, + + createSpreadElement: function (argument) { + return { + type: Syntax.SpreadElement, + argument: argument + }; + }, + + createTaggedTemplateExpression: function (tag, quasi) { + return { + type: Syntax.TaggedTemplateExpression, + tag: tag, + quasi: quasi + }; + }, + + createArrowFunctionExpression: function (params, defaults, body, rest, expression) { + return { + type: Syntax.ArrowFunctionExpression, + id: null, + params: params, + defaults: defaults, + body: body, + rest: rest, + generator: false, + expression: expression + }; + }, + + createMethodDefinition: function (propertyType, kind, key, value) { + return { + type: Syntax.MethodDefinition, + key: key, + value: value, + kind: kind, + 'static': propertyType === ClassPropertyType.static + }; + }, + + createClassBody: function (body) { + return { + type: Syntax.ClassBody, + body: body + }; + }, + + createClassExpression: function (id, superClass, body) { + return { + type: Syntax.ClassExpression, + id: id, + superClass: superClass, + body: body + }; + }, + + createClassDeclaration: function (id, superClass, body) { + return { + type: Syntax.ClassDeclaration, + id: id, + superClass: superClass, + body: body + }; + }, + + createExportSpecifier: function (id, name) { + return { + type: Syntax.ExportSpecifier, + id: id, + name: name + }; + }, + + createExportBatchSpecifier: function () { + return { + type: Syntax.ExportBatchSpecifier + }; + }, + + createExportDeclaration: function (declaration, specifiers, source) { + return { + type: Syntax.ExportDeclaration, + declaration: declaration, + specifiers: specifiers, + source: source + }; + }, + + createImportSpecifier: function (id, name) { + return { + type: Syntax.ImportSpecifier, + id: id, + name: name + }; + }, + + createImportDeclaration: function (specifiers, kind, source) { + return { + type: Syntax.ImportDeclaration, + specifiers: specifiers, + kind: kind, + source: source + }; + }, + + createYieldExpression: function (argument, delegate) { + return { + type: Syntax.YieldExpression, + argument: argument, + delegate: delegate + }; + }, + + createModuleDeclaration: function (id, source, body) { + return { + type: Syntax.ModuleDeclaration, + id: id, + source: source, + body: body + }; + } + + + }; + + // Return true if there is a line terminator before the next token. + + function peekLineTerminator() { + var pos, line, start, found; + + pos = index; + line = lineNumber; + start = lineStart; + skipComment(); + found = lineNumber !== line; + index = pos; + lineNumber = line; + lineStart = start; + + return found; + } + + // Throw an exception + + function throwError(token, messageFormat) { + var error, + args = Array.prototype.slice.call(arguments, 2), + msg = messageFormat.replace( + /%(\d)/g, + function (whole, index) { + assert(index < args.length, 'Message reference must be in range'); + return args[index]; + } + ); + + if (typeof token.lineNumber === 'number') { + error = new Error('Line ' + token.lineNumber + ': ' + msg); + error.index = token.range[0]; + error.lineNumber = token.lineNumber; + error.column = token.range[0] - lineStart + 1; + } else { + error = new Error('Line ' + lineNumber + ': ' + msg); + error.index = index; + error.lineNumber = lineNumber; + error.column = index - lineStart + 1; + } + + error.description = msg; + throw error; + } + + function throwErrorTolerant() { + try { + throwError.apply(null, arguments); + } catch (e) { + if (extra.errors) { + extra.errors.push(e); + } else { + throw e; + } + } + } + + + // Throw an exception because of the token. + + function throwUnexpected(token) { + if (token.type === Token.EOF) { + throwError(token, Messages.UnexpectedEOS); + } + + if (token.type === Token.NumericLiteral) { + throwError(token, Messages.UnexpectedNumber); + } + + if (token.type === Token.StringLiteral || token.type === Token.XJSText) { + throwError(token, Messages.UnexpectedString); + } + + if (token.type === Token.Identifier) { + throwError(token, Messages.UnexpectedIdentifier); + } + + if (token.type === Token.Keyword) { + if (isFutureReservedWord(token.value)) { + throwError(token, Messages.UnexpectedReserved); + } else if (strict && isStrictModeReservedWord(token.value)) { + throwErrorTolerant(token, Messages.StrictReservedWord); + return; + } + throwError(token, Messages.UnexpectedToken, token.value); + } + + if (token.type === Token.Template) { + throwError(token, Messages.UnexpectedTemplate, token.value.raw); + } + + // BooleanLiteral, NullLiteral, or Punctuator. + throwError(token, Messages.UnexpectedToken, token.value); + } + + // Expect the next token to match the specified punctuator. + // If not, an exception will be thrown. + + function expect(value) { + var token = lex(); + if (token.type !== Token.Punctuator || token.value !== value) { + throwUnexpected(token); + } + } + + // Expect the next token to match the specified keyword. + // If not, an exception will be thrown. + + function expectKeyword(keyword) { + var token = lex(); + if (token.type !== Token.Keyword || token.value !== keyword) { + throwUnexpected(token); + } + } + + // Return true if the next token matches the specified punctuator. + + function match(value) { + return lookahead.type === Token.Punctuator && lookahead.value === value; + } + + // Return true if the next token matches the specified keyword + + function matchKeyword(keyword) { + return lookahead.type === Token.Keyword && lookahead.value === keyword; + } + + + // Return true if the next token matches the specified contextual keyword + + function matchContextualKeyword(keyword) { + return lookahead.type === Token.Identifier && lookahead.value === keyword; + } + + // Return true if the next token is an assignment operator + + function matchAssign() { + var op; + + if (lookahead.type !== Token.Punctuator) { + return false; + } + op = lookahead.value; + return op === '=' || + op === '*=' || + op === '/=' || + op === '%=' || + op === '+=' || + op === '-=' || + op === '<<=' || + op === '>>=' || + op === '>>>=' || + op === '&=' || + op === '^=' || + op === '|='; + } + + function consumeSemicolon() { + var line; + + // Catch the very common case first: immediately a semicolon (char #59). + if (source.charCodeAt(index) === 59) { + lex(); + return; + } + + line = lineNumber; + skipComment(); + if (lineNumber !== line) { + return; + } + + if (match(';')) { + lex(); + return; + } + + if (lookahead.type !== Token.EOF && !match('}')) { + throwUnexpected(lookahead); + } + } + + // Return true if provided expression is LeftHandSideExpression + + function isLeftHandSide(expr) { + return expr.type === Syntax.Identifier || expr.type === Syntax.MemberExpression; + } + + function isAssignableLeftHandSide(expr) { + return isLeftHandSide(expr) || expr.type === Syntax.ObjectPattern || expr.type === Syntax.ArrayPattern; + } + + // 11.1.4 Array Initialiser + + function parseArrayInitialiser() { + var elements = [], blocks = [], filter = null, tmp, possiblecomprehension = true, body; + + expect('['); + while (!match(']')) { + if (lookahead.value === 'for' && + lookahead.type === Token.Keyword) { + if (!possiblecomprehension) { + throwError({}, Messages.ComprehensionError); + } + matchKeyword('for'); + tmp = parseForStatement({ignoreBody: true}); + tmp.of = tmp.type === Syntax.ForOfStatement; + tmp.type = Syntax.ComprehensionBlock; + if (tmp.left.kind) { // can't be let or const + throwError({}, Messages.ComprehensionError); + } + blocks.push(tmp); + } else if (lookahead.value === 'if' && + lookahead.type === Token.Keyword) { + if (!possiblecomprehension) { + throwError({}, Messages.ComprehensionError); + } + expectKeyword('if'); + expect('('); + filter = parseExpression(); + expect(')'); + } else if (lookahead.value === ',' && + lookahead.type === Token.Punctuator) { + possiblecomprehension = false; // no longer allowed. + lex(); + elements.push(null); + } else { + tmp = parseSpreadOrAssignmentExpression(); + elements.push(tmp); + if (tmp && tmp.type === Syntax.SpreadElement) { + if (!match(']')) { + throwError({}, Messages.ElementAfterSpreadElement); + } + } else if (!(match(']') || matchKeyword('for') || matchKeyword('if'))) { + expect(','); // this lexes. + possiblecomprehension = false; + } + } + } + + expect(']'); + + if (filter && !blocks.length) { + throwError({}, Messages.ComprehensionRequiresBlock); + } + + if (blocks.length) { + if (elements.length !== 1) { + throwError({}, Messages.ComprehensionError); + } + return { + type: Syntax.ComprehensionExpression, + filter: filter, + blocks: blocks, + body: elements[0] + }; + } + return delegate.createArrayExpression(elements); + } + + // 11.1.5 Object Initialiser + + function parsePropertyFunction(options) { + var previousStrict, previousYieldAllowed, params, defaults, body; + + previousStrict = strict; + previousYieldAllowed = state.yieldAllowed; + state.yieldAllowed = options.generator; + params = options.params || []; + defaults = options.defaults || []; + + body = parseConciseBody(); + if (options.name && strict && isRestrictedWord(params[0].name)) { + throwErrorTolerant(options.name, Messages.StrictParamName); + } + if (state.yieldAllowed && !state.yieldFound) { + throwErrorTolerant({}, Messages.NoYieldInGenerator); + } + strict = previousStrict; + state.yieldAllowed = previousYieldAllowed; + + return delegate.createFunctionExpression(null, params, defaults, body, options.rest || null, options.generator, body.type !== Syntax.BlockStatement, + options.returnTypeAnnotation); + } + + + function parsePropertyMethodFunction(options) { + var previousStrict, tmp, method; + + previousStrict = strict; + strict = true; + + tmp = parseParams(); + + if (tmp.stricted) { + throwErrorTolerant(tmp.stricted, tmp.message); + } + + + method = parsePropertyFunction({ + params: tmp.params, + defaults: tmp.defaults, + rest: tmp.rest, + generator: options.generator, + returnTypeAnnotation: tmp.returnTypeAnnotation + }); + + strict = previousStrict; + + return method; + } + + + function parseObjectPropertyKey() { + var token = lex(); + + // Note: This function is called only from parseObjectProperty(), where + // EOF and Punctuator tokens are already filtered out. + + if (token.type === Token.StringLiteral || token.type === Token.NumericLiteral) { + if (strict && token.octal) { + throwErrorTolerant(token, Messages.StrictOctalLiteral); + } + return delegate.createLiteral(token); + } + + return delegate.createIdentifier(token.value); + } + + function parseObjectProperty() { + var token, key, id, value, param; + + token = lookahead; + + if (token.type === Token.Identifier) { + + id = parseObjectPropertyKey(); + + // Property Assignment: Getter and Setter. + + if (token.value === 'get' && !(match(':') || match('('))) { + key = parseObjectPropertyKey(); + expect('('); + expect(')'); + return delegate.createProperty('get', key, parsePropertyFunction({ generator: false }), false, false); + } + if (token.value === 'set' && !(match(':') || match('('))) { + key = parseObjectPropertyKey(); + expect('('); + token = lookahead; + param = [ parseTypeAnnotatableIdentifier() ]; + expect(')'); + return delegate.createProperty('set', key, parsePropertyFunction({ params: param, generator: false, name: token }), false, false); + } + if (match(':')) { + lex(); + return delegate.createProperty('init', id, parseAssignmentExpression(), false, false); + } + if (match('(')) { + return delegate.createProperty('init', id, parsePropertyMethodFunction({ generator: false }), true, false); + } + return delegate.createProperty('init', id, id, false, true); + } + if (token.type === Token.EOF || token.type === Token.Punctuator) { + if (!match('*')) { + throwUnexpected(token); + } + lex(); + + id = parseObjectPropertyKey(); + + if (!match('(')) { + throwUnexpected(lex()); + } + + return delegate.createProperty('init', id, parsePropertyMethodFunction({ generator: true }), true, false); + } + key = parseObjectPropertyKey(); + if (match(':')) { + lex(); + return delegate.createProperty('init', key, parseAssignmentExpression(), false, false); + } + if (match('(')) { + return delegate.createProperty('init', key, parsePropertyMethodFunction({ generator: false }), true, false); + } + throwUnexpected(lex()); + } + + function parseObjectInitialiser() { + var properties = [], property, name, key, kind, map = {}, toString = String; + + expect('{'); + + while (!match('}')) { + property = parseObjectProperty(); + + if (property.key.type === Syntax.Identifier) { + name = property.key.name; + } else { + name = toString(property.key.value); + } + kind = (property.kind === 'init') ? PropertyKind.Data : (property.kind === 'get') ? PropertyKind.Get : PropertyKind.Set; + + key = '$' + name; + if (Object.prototype.hasOwnProperty.call(map, key)) { + if (map[key] === PropertyKind.Data) { + if (strict && kind === PropertyKind.Data) { + throwErrorTolerant({}, Messages.StrictDuplicateProperty); + } else if (kind !== PropertyKind.Data) { + throwErrorTolerant({}, Messages.AccessorDataProperty); + } + } else { + if (kind === PropertyKind.Data) { + throwErrorTolerant({}, Messages.AccessorDataProperty); + } else if (map[key] & kind) { + throwErrorTolerant({}, Messages.AccessorGetSet); + } + } + map[key] |= kind; + } else { + map[key] = kind; + } + + properties.push(property); + + if (!match('}')) { + expect(','); + } + } + + expect('}'); + + return delegate.createObjectExpression(properties); + } + + function parseTemplateElement(option) { + var token = scanTemplateElement(option); + if (strict && token.octal) { + throwError(token, Messages.StrictOctalLiteral); + } + return delegate.createTemplateElement({ raw: token.value.raw, cooked: token.value.cooked }, token.tail); + } + + function parseTemplateLiteral() { + var quasi, quasis, expressions; + + quasi = parseTemplateElement({ head: true }); + quasis = [ quasi ]; + expressions = []; + + while (!quasi.tail) { + expressions.push(parseExpression()); + quasi = parseTemplateElement({ head: false }); + quasis.push(quasi); + } + + return delegate.createTemplateLiteral(quasis, expressions); + } + + // 11.1.6 The Grouping Operator + + function parseGroupExpression() { + var expr; + + expect('('); + + ++state.parenthesizedCount; + + expr = parseExpression(); + + expect(')'); + + return expr; + } + + + // 11.1 Primary Expressions + + function parsePrimaryExpression() { + var type, token; + + token = lookahead; + type = lookahead.type; + + if (type === Token.Identifier) { + lex(); + return delegate.createIdentifier(token.value); + } + + if (type === Token.StringLiteral || type === Token.NumericLiteral) { + if (strict && lookahead.octal) { + throwErrorTolerant(lookahead, Messages.StrictOctalLiteral); + } + return delegate.createLiteral(lex()); + } + + if (type === Token.Keyword) { + if (matchKeyword('this')) { + lex(); + return delegate.createThisExpression(); + } + + if (matchKeyword('function')) { + return parseFunctionExpression(); + } + + if (matchKeyword('class')) { + return parseClassExpression(); + } + + if (matchKeyword('super')) { + lex(); + return delegate.createIdentifier('super'); + } + } + + if (type === Token.BooleanLiteral) { + token = lex(); + token.value = (token.value === 'true'); + return delegate.createLiteral(token); + } + + if (type === Token.NullLiteral) { + token = lex(); + token.value = null; + return delegate.createLiteral(token); + } + + if (match('[')) { + return parseArrayInitialiser(); + } + + if (match('{')) { + return parseObjectInitialiser(); + } + + if (match('(')) { + return parseGroupExpression(); + } + + if (match('/') || match('/=')) { + return delegate.createLiteral(scanRegExp()); + } + + if (type === Token.Template) { + return parseTemplateLiteral(); + } + + if (match('<')) { + return parseXJSElement(); + } + + return throwUnexpected(lex()); + } + + // 11.2 Left-Hand-Side Expressions + + function parseArguments() { + var args = [], arg; + + expect('('); + + if (!match(')')) { + while (index < length) { + arg = parseSpreadOrAssignmentExpression(); + args.push(arg); + + if (match(')')) { + break; + } else if (arg.type === Syntax.SpreadElement) { + throwError({}, Messages.ElementAfterSpreadElement); + } + + expect(','); + } + } + + expect(')'); + + return args; + } + + function parseSpreadOrAssignmentExpression() { + if (match('...')) { + lex(); + return delegate.createSpreadElement(parseAssignmentExpression()); + } + return parseAssignmentExpression(); + } + + function parseNonComputedProperty() { + var token = lex(); + + if (!isIdentifierName(token)) { + throwUnexpected(token); + } + + return delegate.createIdentifier(token.value); + } + + function parseNonComputedMember() { + expect('.'); + + return parseNonComputedProperty(); + } + + function parseComputedMember() { + var expr; + + expect('['); + + expr = parseExpression(); + + expect(']'); + + return expr; + } + + function parseNewExpression() { + var callee, args; + + expectKeyword('new'); + callee = parseLeftHandSideExpression(); + args = match('(') ? parseArguments() : []; + + return delegate.createNewExpression(callee, args); + } + + function parseLeftHandSideExpressionAllowCall() { + var expr, args, property; + + expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression(); + + while (match('.') || match('[') || match('(') || lookahead.type === Token.Template) { + if (match('(')) { + args = parseArguments(); + expr = delegate.createCallExpression(expr, args); + } else if (match('[')) { + expr = delegate.createMemberExpression('[', expr, parseComputedMember()); + } else if (match('.')) { + expr = delegate.createMemberExpression('.', expr, parseNonComputedMember()); + } else { + expr = delegate.createTaggedTemplateExpression(expr, parseTemplateLiteral()); + } + } + + return expr; + } + + + function parseLeftHandSideExpression() { + var expr, property; + + expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression(); + + while (match('.') || match('[') || lookahead.type === Token.Template) { + if (match('[')) { + expr = delegate.createMemberExpression('[', expr, parseComputedMember()); + } else if (match('.')) { + expr = delegate.createMemberExpression('.', expr, parseNonComputedMember()); + } else { + expr = delegate.createTaggedTemplateExpression(expr, parseTemplateLiteral()); + } + } + + return expr; + } + + // 11.3 Postfix Expressions + + function parsePostfixExpression() { + var expr = parseLeftHandSideExpressionAllowCall(), + token = lookahead; + + if (lookahead.type !== Token.Punctuator) { + return expr; + } + + if ((match('++') || match('--')) && !peekLineTerminator()) { + // 11.3.1, 11.3.2 + if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { + throwErrorTolerant({}, Messages.StrictLHSPostfix); + } + + if (!isLeftHandSide(expr)) { + throwError({}, Messages.InvalidLHSInAssignment); + } + + token = lex(); + expr = delegate.createPostfixExpression(token.value, expr); + } + + return expr; + } + + // 11.4 Unary Operators + + function parseUnaryExpression() { + var token, expr; + + if (lookahead.type !== Token.Punctuator && lookahead.type !== Token.Keyword) { + return parsePostfixExpression(); + } + + if (match('++') || match('--')) { + token = lex(); + expr = parseUnaryExpression(); + // 11.4.4, 11.4.5 + if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { + throwErrorTolerant({}, Messages.StrictLHSPrefix); + } + + if (!isLeftHandSide(expr)) { + throwError({}, Messages.InvalidLHSInAssignment); + } + + return delegate.createUnaryExpression(token.value, expr); + } + + if (match('+') || match('-') || match('~') || match('!')) { + token = lex(); + expr = parseUnaryExpression(); + return delegate.createUnaryExpression(token.value, expr); + } + + if (matchKeyword('delete') || matchKeyword('void') || matchKeyword('typeof')) { + token = lex(); + expr = parseUnaryExpression(); + expr = delegate.createUnaryExpression(token.value, expr); + if (strict && expr.operator === 'delete' && expr.argument.type === Syntax.Identifier) { + throwErrorTolerant({}, Messages.StrictDelete); + } + return expr; + } + + return parsePostfixExpression(); + } + + function binaryPrecedence(token, allowIn) { + var prec = 0; + + if (token.type !== Token.Punctuator && token.type !== Token.Keyword) { + return 0; + } + + switch (token.value) { + case '||': + prec = 1; + break; + + case '&&': + prec = 2; + break; + + case '|': + prec = 3; + break; + + case '^': + prec = 4; + break; + + case '&': + prec = 5; + break; + + case '==': + case '!=': + case '===': + case '!==': + prec = 6; + break; + + case '<': + case '>': + case '<=': + case '>=': + case 'instanceof': + prec = 7; + break; + + case 'in': + prec = allowIn ? 7 : 0; + break; + + case '<<': + case '>>': + case '>>>': + prec = 8; + break; + + case '+': + case '-': + prec = 9; + break; + + case '*': + case '/': + case '%': + prec = 11; + break; + + default: + break; + } + + return prec; + } + + // 11.5 Multiplicative Operators + // 11.6 Additive Operators + // 11.7 Bitwise Shift Operators + // 11.8 Relational Operators + // 11.9 Equality Operators + // 11.10 Binary Bitwise Operators + // 11.11 Binary Logical Operators + + function parseBinaryExpression() { + var expr, token, prec, previousAllowIn, stack, right, operator, left, i; + + previousAllowIn = state.allowIn; + state.allowIn = true; + + expr = parseUnaryExpression(); + + token = lookahead; + prec = binaryPrecedence(token, previousAllowIn); + if (prec === 0) { + return expr; + } + token.prec = prec; + lex(); + + stack = [expr, token, parseUnaryExpression()]; + + while ((prec = binaryPrecedence(lookahead, previousAllowIn)) > 0) { + + // Reduce: make a binary expression from the three topmost entries. + while ((stack.length > 2) && (prec <= stack[stack.length - 2].prec)) { + right = stack.pop(); + operator = stack.pop().value; + left = stack.pop(); + stack.push(delegate.createBinaryExpression(operator, left, right)); + } + + // Shift. + token = lex(); + token.prec = prec; + stack.push(token); + stack.push(parseUnaryExpression()); + } + + state.allowIn = previousAllowIn; + + // Final reduce to clean-up the stack. + i = stack.length - 1; + expr = stack[i]; + while (i > 1) { + expr = delegate.createBinaryExpression(stack[i - 1].value, stack[i - 2], expr); + i -= 2; + } + return expr; + } + + + // 11.12 Conditional Operator + + function parseConditionalExpression() { + var expr, previousAllowIn, consequent, alternate; + + expr = parseBinaryExpression(); + + if (match('?')) { + lex(); + previousAllowIn = state.allowIn; + state.allowIn = true; + consequent = parseAssignmentExpression(); + state.allowIn = previousAllowIn; + expect(':'); + alternate = parseAssignmentExpression(); + + expr = delegate.createConditionalExpression(expr, consequent, alternate); + } + + return expr; + } + + // 11.13 Assignment Operators + + function reinterpretAsAssignmentBindingPattern(expr) { + var i, len, property, element; + + if (expr.type === Syntax.ObjectExpression) { + expr.type = Syntax.ObjectPattern; + for (i = 0, len = expr.properties.length; i < len; i += 1) { + property = expr.properties[i]; + if (property.kind !== 'init') { + throwError({}, Messages.InvalidLHSInAssignment); + } + reinterpretAsAssignmentBindingPattern(property.value); + } + } else if (expr.type === Syntax.ArrayExpression) { + expr.type = Syntax.ArrayPattern; + for (i = 0, len = expr.elements.length; i < len; i += 1) { + element = expr.elements[i]; + if (element) { + reinterpretAsAssignmentBindingPattern(element); + } + } + } else if (expr.type === Syntax.Identifier) { + if (isRestrictedWord(expr.name)) { + throwError({}, Messages.InvalidLHSInAssignment); + } + } else if (expr.type === Syntax.SpreadElement) { + reinterpretAsAssignmentBindingPattern(expr.argument); + if (expr.argument.type === Syntax.ObjectPattern) { + throwError({}, Messages.ObjectPatternAsSpread); + } + } else { + if (expr.type !== Syntax.MemberExpression && expr.type !== Syntax.CallExpression && expr.type !== Syntax.NewExpression) { + throwError({}, Messages.InvalidLHSInAssignment); + } + } + } + + + function reinterpretAsDestructuredParameter(options, expr) { + var i, len, property, element; + + if (expr.type === Syntax.ObjectExpression) { + expr.type = Syntax.ObjectPattern; + for (i = 0, len = expr.properties.length; i < len; i += 1) { + property = expr.properties[i]; + if (property.kind !== 'init') { + throwError({}, Messages.InvalidLHSInFormalsList); + } + reinterpretAsDestructuredParameter(options, property.value); + } + } else if (expr.type === Syntax.ArrayExpression) { + expr.type = Syntax.ArrayPattern; + for (i = 0, len = expr.elements.length; i < len; i += 1) { + element = expr.elements[i]; + if (element) { + reinterpretAsDestructuredParameter(options, element); + } + } + } else if (expr.type === Syntax.Identifier) { + validateParam(options, expr, expr.name); + } else { + if (expr.type !== Syntax.MemberExpression) { + throwError({}, Messages.InvalidLHSInFormalsList); + } + } + } + + function reinterpretAsCoverFormalsList(expressions) { + var i, len, param, params, defaults, defaultCount, options, rest; + + params = []; + defaults = []; + defaultCount = 0; + rest = null; + options = { + paramSet: {} + }; + + for (i = 0, len = expressions.length; i < len; i += 1) { + param = expressions[i]; + if (param.type === Syntax.Identifier) { + params.push(param); + defaults.push(null); + validateParam(options, param, param.name); + } else if (param.type === Syntax.ObjectExpression || param.type === Syntax.ArrayExpression) { + reinterpretAsDestructuredParameter(options, param); + params.push(param); + defaults.push(null); + } else if (param.type === Syntax.SpreadElement) { + assert(i === len - 1, 'It is guaranteed that SpreadElement is last element by parseExpression'); + reinterpretAsDestructuredParameter(options, param.argument); + rest = param.argument; + } else if (param.type === Syntax.AssignmentExpression) { + params.push(param.left); + defaults.push(param.right); + ++defaultCount; + validateParam(options, param.left, param.left.name); + } else { + return null; + } + } + + if (options.message === Messages.StrictParamDupe) { + throwError( + strict ? options.stricted : options.firstRestricted, + options.message + ); + } + + if (defaultCount === 0) { + defaults = []; + } + + return { + params: params, + defaults: defaults, + rest: rest, + stricted: options.stricted, + firstRestricted: options.firstRestricted, + message: options.message + }; + } + + function parseArrowFunctionExpression(options) { + var previousStrict, previousYieldAllowed, body; + + expect('=>'); + + previousStrict = strict; + previousYieldAllowed = state.yieldAllowed; + state.yieldAllowed = false; + body = parseConciseBody(); + + if (strict && options.firstRestricted) { + throwError(options.firstRestricted, options.message); + } + if (strict && options.stricted) { + throwErrorTolerant(options.stricted, options.message); + } + + strict = previousStrict; + state.yieldAllowed = previousYieldAllowed; + + return delegate.createArrowFunctionExpression(options.params, options.defaults, body, options.rest, body.type !== Syntax.BlockStatement); + } + + function parseAssignmentExpression() { + var expr, token, params, oldParenthesizedCount; + + if (matchKeyword('yield')) { + return parseYieldExpression(); + } + + oldParenthesizedCount = state.parenthesizedCount; + + if (match('(')) { + token = lookahead2(); + if ((token.type === Token.Punctuator && token.value === ')') || token.value === '...') { + params = parseParams(); + if (!match('=>')) { + throwUnexpected(lex()); + } + return parseArrowFunctionExpression(params); + } + } + + token = lookahead; + expr = parseConditionalExpression(); + + if (match('=>') && + (state.parenthesizedCount === oldParenthesizedCount || + state.parenthesizedCount === (oldParenthesizedCount + 1))) { + if (expr.type === Syntax.Identifier) { + params = reinterpretAsCoverFormalsList([ expr ]); + } else if (expr.type === Syntax.SequenceExpression) { + params = reinterpretAsCoverFormalsList(expr.expressions); + } + if (params) { + return parseArrowFunctionExpression(params); + } + } + + if (matchAssign()) { + // 11.13.1 + if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { + throwErrorTolerant(token, Messages.StrictLHSAssignment); + } + + // ES.next draf 11.13 Runtime Semantics step 1 + if (match('=') && (expr.type === Syntax.ObjectExpression || expr.type === Syntax.ArrayExpression)) { + reinterpretAsAssignmentBindingPattern(expr); + } else if (!isLeftHandSide(expr)) { + throwError({}, Messages.InvalidLHSInAssignment); + } + + expr = delegate.createAssignmentExpression(lex().value, expr, parseAssignmentExpression()); + } + + return expr; + } + + // 11.14 Comma Operator + + function parseExpression() { + var expr, expressions, sequence, coverFormalsList, spreadFound, oldParenthesizedCount; + + oldParenthesizedCount = state.parenthesizedCount; + + expr = parseAssignmentExpression(); + expressions = [ expr ]; + + if (match(',')) { + while (index < length) { + if (!match(',')) { + break; + } + + lex(); + expr = parseSpreadOrAssignmentExpression(); + expressions.push(expr); + + if (expr.type === Syntax.SpreadElement) { + spreadFound = true; + if (!match(')')) { + throwError({}, Messages.ElementAfterSpreadElement); + } + break; + } + } + + sequence = delegate.createSequenceExpression(expressions); + } + + if (match('=>')) { + // Do not allow nested parentheses on the LHS of the =>. + if (state.parenthesizedCount === oldParenthesizedCount || state.parenthesizedCount === (oldParenthesizedCount + 1)) { + expr = expr.type === Syntax.SequenceExpression ? expr.expressions : expressions; + coverFormalsList = reinterpretAsCoverFormalsList(expr); + if (coverFormalsList) { + return parseArrowFunctionExpression(coverFormalsList); + } + } + throwUnexpected(lex()); + } + + if (spreadFound && lookahead2().value !== '=>') { + throwError({}, Messages.IllegalSpread); + } + + return sequence || expr; + } + + // 12.1 Block + + function parseStatementList() { + var list = [], + statement; + + while (index < length) { + if (match('}')) { + break; + } + statement = parseSourceElement(); + if (typeof statement === 'undefined') { + break; + } + list.push(statement); + } + + return list; + } + + function parseBlock() { + var block; + + expect('{'); + + block = parseStatementList(); + + expect('}'); + + return delegate.createBlockStatement(block); + } + + // 12.2 Variable Statement + + function parseTypeAnnotation(dontExpectColon) { + var typeIdentifier = null, paramTypes = null, returnType = null, + nullable = false; + + if (!dontExpectColon) { + expect(':'); + } + + if (match('?')) { + lex(); + nullable = true; + } + + if (lookahead.type === Token.Identifier) { + typeIdentifier = parseVariableIdentifier(); + } + + if (match('(')) { + lex(); + paramTypes = []; + while (lookahead.type === Token.Identifier || match('?')) { + paramTypes.push(parseTypeAnnotation(true)); + if (!match(')')) { + expect(','); + } + } + expect(')'); + expect('=>'); + + if (matchKeyword('void')) { + lex(); + } else { + returnType = parseTypeAnnotation(true); + } + } + + return delegate.createTypeAnnotation( + typeIdentifier, + paramTypes, + returnType, + nullable + ); + } + + function parseVariableIdentifier() { + var token = lex(); + + if (token.type !== Token.Identifier) { + throwUnexpected(token); + } + + return delegate.createIdentifier(token.value); + } + + function parseTypeAnnotatableIdentifier() { + var ident = parseVariableIdentifier(); + + if (match(':')) { + return delegate.createTypeAnnotatedIdentifier(ident, parseTypeAnnotation()); + } + + return ident; + } + + function parseVariableDeclaration(kind) { + var id, + init = null; + if (match('{')) { + id = parseObjectInitialiser(); + reinterpretAsAssignmentBindingPattern(id); + } else if (match('[')) { + id = parseArrayInitialiser(); + reinterpretAsAssignmentBindingPattern(id); + } else { + id = state.allowKeyword ? parseNonComputedProperty() : parseTypeAnnotatableIdentifier(); + // 12.2.1 + if (strict && isRestrictedWord(id.name)) { + throwErrorTolerant({}, Messages.StrictVarName); + } + } + + if (kind === 'const') { + if (!match('=')) { + throwError({}, Messages.NoUnintializedConst); + } + expect('='); + init = parseAssignmentExpression(); + } else if (match('=')) { + lex(); + init = parseAssignmentExpression(); + } + + return delegate.createVariableDeclarator(id, init); + } + + function parseVariableDeclarationList(kind) { + var list = []; + + do { + list.push(parseVariableDeclaration(kind)); + if (!match(',')) { + break; + } + lex(); + } while (index < length); + + return list; + } + + function parseVariableStatement() { + var declarations; + + expectKeyword('var'); + + declarations = parseVariableDeclarationList(); + + consumeSemicolon(); + + return delegate.createVariableDeclaration(declarations, 'var'); + } + + // kind may be `const` or `let` + // Both are experimental and not in the specification yet. + // see http://wiki.ecmascript.org/doku.php?id=harmony:const + // and http://wiki.ecmascript.org/doku.php?id=harmony:let + function parseConstLetDeclaration(kind) { + var declarations; + + expectKeyword(kind); + + declarations = parseVariableDeclarationList(kind); + + consumeSemicolon(); + + return delegate.createVariableDeclaration(declarations, kind); + } + + // http://wiki.ecmascript.org/doku.php?id=harmony:modules + + function parseModuleDeclaration() { + var id, src, body; + + lex(); // 'module' + + if (peekLineTerminator()) { + throwError({}, Messages.NewlineAfterModule); + } + + switch (lookahead.type) { + + case Token.StringLiteral: + id = parsePrimaryExpression(); + body = parseModuleBlock(); + src = null; + break; + + case Token.Identifier: + id = parseVariableIdentifier(); + body = null; + if (!matchContextualKeyword('from')) { + throwUnexpected(lex()); + } + lex(); + src = parsePrimaryExpression(); + if (src.type !== Syntax.Literal) { + throwError({}, Messages.InvalidModuleSpecifier); + } + break; + } + + consumeSemicolon(); + return delegate.createModuleDeclaration(id, src, body); + } + + function parseExportBatchSpecifier() { + expect('*'); + return delegate.createExportBatchSpecifier(); + } + + function parseExportSpecifier() { + var id, name = null; + + id = parseVariableIdentifier(); + if (matchContextualKeyword('as')) { + lex(); + name = parseNonComputedProperty(); + } + + return delegate.createExportSpecifier(id, name); + } + + function parseExportDeclaration() { + var previousAllowKeyword, decl, def, src, specifiers; + + expectKeyword('export'); + + if (lookahead.type === Token.Keyword) { + switch (lookahead.value) { + case 'let': + case 'const': + case 'var': + case 'class': + case 'function': + return delegate.createExportDeclaration(parseSourceElement(), null, null); + } + } + + if (isIdentifierName(lookahead)) { + previousAllowKeyword = state.allowKeyword; + state.allowKeyword = true; + decl = parseVariableDeclarationList('let'); + state.allowKeyword = previousAllowKeyword; + return delegate.createExportDeclaration(decl, null, null); + } + + specifiers = []; + src = null; + + if (match('*')) { + specifiers.push(parseExportBatchSpecifier()); + } else { + expect('{'); + do { + specifiers.push(parseExportSpecifier()); + } while (match(',') && lex()); + expect('}'); + } + + if (matchContextualKeyword('from')) { + lex(); + src = parsePrimaryExpression(); + if (src.type !== Syntax.Literal) { + throwError({}, Messages.InvalidModuleSpecifier); + } + } + + consumeSemicolon(); + + return delegate.createExportDeclaration(null, specifiers, src); + } + + function parseImportDeclaration() { + var specifiers, kind, src; + + expectKeyword('import'); + specifiers = []; + + if (isIdentifierName(lookahead)) { + kind = 'default'; + specifiers.push(parseImportSpecifier()); + + if (!matchContextualKeyword('from')) { + throwError({}, Messages.NoFromAfterImport); + } + lex(); + } else if (match('{')) { + kind = 'named'; + lex(); + do { + specifiers.push(parseImportSpecifier()); + } while (match(',') && lex()); + expect('}'); + + if (!matchContextualKeyword('from')) { + throwError({}, Messages.NoFromAfterImport); + } + lex(); + } + + src = parsePrimaryExpression(); + if (src.type !== Syntax.Literal) { + throwError({}, Messages.InvalidModuleSpecifier); + } + + consumeSemicolon(); + + return delegate.createImportDeclaration(specifiers, kind, src); + } + + function parseImportSpecifier() { + var id, name = null; + + id = parseNonComputedProperty(); + if (matchContextualKeyword('as')) { + lex(); + name = parseVariableIdentifier(); + } + + return delegate.createImportSpecifier(id, name); + } + + // 12.3 Empty Statement + + function parseEmptyStatement() { + expect(';'); + return delegate.createEmptyStatement(); + } + + // 12.4 Expression Statement + + function parseExpressionStatement() { + var expr = parseExpression(); + consumeSemicolon(); + return delegate.createExpressionStatement(expr); + } + + // 12.5 If statement + + function parseIfStatement() { + var test, consequent, alternate; + + expectKeyword('if'); + + expect('('); + + test = parseExpression(); + + expect(')'); + + consequent = parseStatement(); + + if (matchKeyword('else')) { + lex(); + alternate = parseStatement(); + } else { + alternate = null; + } + + return delegate.createIfStatement(test, consequent, alternate); + } + + // 12.6 Iteration Statements + + function parseDoWhileStatement() { + var body, test, oldInIteration; + + expectKeyword('do'); + + oldInIteration = state.inIteration; + state.inIteration = true; + + body = parseStatement(); + + state.inIteration = oldInIteration; + + expectKeyword('while'); + + expect('('); + + test = parseExpression(); + + expect(')'); + + if (match(';')) { + lex(); + } + + return delegate.createDoWhileStatement(body, test); + } + + function parseWhileStatement() { + var test, body, oldInIteration; + + expectKeyword('while'); + + expect('('); + + test = parseExpression(); + + expect(')'); + + oldInIteration = state.inIteration; + state.inIteration = true; + + body = parseStatement(); + + state.inIteration = oldInIteration; + + return delegate.createWhileStatement(test, body); + } + + function parseForVariableDeclaration() { + var token = lex(), + declarations = parseVariableDeclarationList(); + + return delegate.createVariableDeclaration(declarations, token.value); + } + + function parseForStatement(opts) { + var init, test, update, left, right, body, operator, oldInIteration; + init = test = update = null; + expectKeyword('for'); + + // http://wiki.ecmascript.org/doku.php?id=proposals:iterators_and_generators&s=each + if (matchContextualKeyword('each')) { + throwError({}, Messages.EachNotAllowed); + } + + expect('('); + + if (match(';')) { + lex(); + } else { + if (matchKeyword('var') || matchKeyword('let') || matchKeyword('const')) { + state.allowIn = false; + init = parseForVariableDeclaration(); + state.allowIn = true; + + if (init.declarations.length === 1) { + if (matchKeyword('in') || matchContextualKeyword('of')) { + operator = lookahead; + if (!((operator.value === 'in' || init.kind !== 'var') && init.declarations[0].init)) { + lex(); + left = init; + right = parseExpression(); + init = null; + } + } + } + } else { + state.allowIn = false; + init = parseExpression(); + state.allowIn = true; + + if (matchContextualKeyword('of')) { + operator = lex(); + left = init; + right = parseExpression(); + init = null; + } else if (matchKeyword('in')) { + // LeftHandSideExpression + if (!isAssignableLeftHandSide(init)) { + throwError({}, Messages.InvalidLHSInForIn); + } + operator = lex(); + left = init; + right = parseExpression(); + init = null; + } + } + + if (typeof left === 'undefined') { + expect(';'); + } + } + + if (typeof left === 'undefined') { + + if (!match(';')) { + test = parseExpression(); + } + expect(';'); + + if (!match(')')) { + update = parseExpression(); + } + } + + expect(')'); + + oldInIteration = state.inIteration; + state.inIteration = true; + + if (!(opts !== undefined && opts.ignoreBody)) { + body = parseStatement(); + } + + state.inIteration = oldInIteration; + + if (typeof left === 'undefined') { + return delegate.createForStatement(init, test, update, body); + } + + if (operator.value === 'in') { + return delegate.createForInStatement(left, right, body); + } + return delegate.createForOfStatement(left, right, body); + } + + // 12.7 The continue statement + + function parseContinueStatement() { + var label = null, key; + + expectKeyword('continue'); + + // Optimize the most common form: 'continue;'. + if (source.charCodeAt(index) === 59) { + lex(); + + if (!state.inIteration) { + throwError({}, Messages.IllegalContinue); + } + + return delegate.createContinueStatement(null); + } + + if (peekLineTerminator()) { + if (!state.inIteration) { + throwError({}, Messages.IllegalContinue); + } + + return delegate.createContinueStatement(null); + } + + if (lookahead.type === Token.Identifier) { + label = parseVariableIdentifier(); + + key = '$' + label.name; + if (!Object.prototype.hasOwnProperty.call(state.labelSet, key)) { + throwError({}, Messages.UnknownLabel, label.name); + } + } + + consumeSemicolon(); + + if (label === null && !state.inIteration) { + throwError({}, Messages.IllegalContinue); + } + + return delegate.createContinueStatement(label); + } + + // 12.8 The break statement + + function parseBreakStatement() { + var label = null, key; + + expectKeyword('break'); + + // Catch the very common case first: immediately a semicolon (char #59). + if (source.charCodeAt(index) === 59) { + lex(); + + if (!(state.inIteration || state.inSwitch)) { + throwError({}, Messages.IllegalBreak); + } + + return delegate.createBreakStatement(null); + } + + if (peekLineTerminator()) { + if (!(state.inIteration || state.inSwitch)) { + throwError({}, Messages.IllegalBreak); + } + + return delegate.createBreakStatement(null); + } + + if (lookahead.type === Token.Identifier) { + label = parseVariableIdentifier(); + + key = '$' + label.name; + if (!Object.prototype.hasOwnProperty.call(state.labelSet, key)) { + throwError({}, Messages.UnknownLabel, label.name); + } + } + + consumeSemicolon(); + + if (label === null && !(state.inIteration || state.inSwitch)) { + throwError({}, Messages.IllegalBreak); + } + + return delegate.createBreakStatement(label); + } + + // 12.9 The return statement + + function parseReturnStatement() { + var argument = null; + + expectKeyword('return'); + + if (!state.inFunctionBody) { + throwErrorTolerant({}, Messages.IllegalReturn); + } + + // 'return' followed by a space and an identifier is very common. + if (source.charCodeAt(index) === 32) { + if (isIdentifierStart(source.charCodeAt(index + 1))) { + argument = parseExpression(); + consumeSemicolon(); + return delegate.createReturnStatement(argument); + } + } + + if (peekLineTerminator()) { + return delegate.createReturnStatement(null); + } + + if (!match(';')) { + if (!match('}') && lookahead.type !== Token.EOF) { + argument = parseExpression(); + } + } + + consumeSemicolon(); + + return delegate.createReturnStatement(argument); + } + + // 12.10 The with statement + + function parseWithStatement() { + var object, body; + + if (strict) { + throwErrorTolerant({}, Messages.StrictModeWith); + } + + expectKeyword('with'); + + expect('('); + + object = parseExpression(); + + expect(')'); + + body = parseStatement(); + + return delegate.createWithStatement(object, body); + } + + // 12.10 The swith statement + + function parseSwitchCase() { + var test, + consequent = [], + sourceElement; + + if (matchKeyword('default')) { + lex(); + test = null; + } else { + expectKeyword('case'); + test = parseExpression(); + } + expect(':'); + + while (index < length) { + if (match('}') || matchKeyword('default') || matchKeyword('case')) { + break; + } + sourceElement = parseSourceElement(); + if (typeof sourceElement === 'undefined') { + break; + } + consequent.push(sourceElement); + } + + return delegate.createSwitchCase(test, consequent); + } + + function parseSwitchStatement() { + var discriminant, cases, clause, oldInSwitch, defaultFound; + + expectKeyword('switch'); + + expect('('); + + discriminant = parseExpression(); + + expect(')'); + + expect('{'); + + cases = []; + + if (match('}')) { + lex(); + return delegate.createSwitchStatement(discriminant, cases); + } + + oldInSwitch = state.inSwitch; + state.inSwitch = true; + defaultFound = false; + + while (index < length) { + if (match('}')) { + break; + } + clause = parseSwitchCase(); + if (clause.test === null) { + if (defaultFound) { + throwError({}, Messages.MultipleDefaultsInSwitch); + } + defaultFound = true; + } + cases.push(clause); + } + + state.inSwitch = oldInSwitch; + + expect('}'); + + return delegate.createSwitchStatement(discriminant, cases); + } + + // 12.13 The throw statement + + function parseThrowStatement() { + var argument; + + expectKeyword('throw'); + + if (peekLineTerminator()) { + throwError({}, Messages.NewlineAfterThrow); + } + + argument = parseExpression(); + + consumeSemicolon(); + + return delegate.createThrowStatement(argument); + } + + // 12.14 The try statement + + function parseCatchClause() { + var param, body; + + expectKeyword('catch'); + + expect('('); + if (match(')')) { + throwUnexpected(lookahead); + } + + param = parseExpression(); + // 12.14.1 + if (strict && param.type === Syntax.Identifier && isRestrictedWord(param.name)) { + throwErrorTolerant({}, Messages.StrictCatchVariable); + } + + expect(')'); + body = parseBlock(); + return delegate.createCatchClause(param, body); + } + + function parseTryStatement() { + var block, handlers = [], finalizer = null; + + expectKeyword('try'); + + block = parseBlock(); + + if (matchKeyword('catch')) { + handlers.push(parseCatchClause()); + } + + if (matchKeyword('finally')) { + lex(); + finalizer = parseBlock(); + } + + if (handlers.length === 0 && !finalizer) { + throwError({}, Messages.NoCatchOrFinally); + } + + return delegate.createTryStatement(block, [], handlers, finalizer); + } + + // 12.15 The debugger statement + + function parseDebuggerStatement() { + expectKeyword('debugger'); + + consumeSemicolon(); + + return delegate.createDebuggerStatement(); + } + + // 12 Statements + + function parseStatement() { + var type = lookahead.type, + expr, + labeledBody, + key; + + if (type === Token.EOF) { + throwUnexpected(lookahead); + } + + if (type === Token.Punctuator) { + switch (lookahead.value) { + case ';': + return parseEmptyStatement(); + case '{': + return parseBlock(); + case '(': + return parseExpressionStatement(); + default: + break; + } + } + + if (type === Token.Keyword) { + switch (lookahead.value) { + case 'break': + return parseBreakStatement(); + case 'continue': + return parseContinueStatement(); + case 'debugger': + return parseDebuggerStatement(); + case 'do': + return parseDoWhileStatement(); + case 'for': + return parseForStatement(); + case 'function': + return parseFunctionDeclaration(); + case 'class': + return parseClassDeclaration(); + case 'if': + return parseIfStatement(); + case 'return': + return parseReturnStatement(); + case 'switch': + return parseSwitchStatement(); + case 'throw': + return parseThrowStatement(); + case 'try': + return parseTryStatement(); + case 'var': + return parseVariableStatement(); + case 'while': + return parseWhileStatement(); + case 'with': + return parseWithStatement(); + default: + break; + } + } + + expr = parseExpression(); + + // 12.12 Labelled Statements + if ((expr.type === Syntax.Identifier) && match(':')) { + lex(); + + key = '$' + expr.name; + if (Object.prototype.hasOwnProperty.call(state.labelSet, key)) { + throwError({}, Messages.Redeclaration, 'Label', expr.name); + } + + state.labelSet[key] = true; + labeledBody = parseStatement(); + delete state.labelSet[key]; + return delegate.createLabeledStatement(expr, labeledBody); + } + + consumeSemicolon(); + + return delegate.createExpressionStatement(expr); + } + + // 13 Function Definition + + function parseConciseBody() { + if (match('{')) { + return parseFunctionSourceElements(); + } + return parseAssignmentExpression(); + } + + function parseFunctionSourceElements() { + var sourceElement, sourceElements = [], token, directive, firstRestricted, + oldLabelSet, oldInIteration, oldInSwitch, oldInFunctionBody, oldParenthesizedCount; + + expect('{'); + + while (index < length) { + if (lookahead.type !== Token.StringLiteral) { + break; + } + token = lookahead; + + sourceElement = parseSourceElement(); + sourceElements.push(sourceElement); + if (sourceElement.expression.type !== Syntax.Literal) { + // this is not directive + break; + } + directive = source.slice(token.range[0] + 1, token.range[1] - 1); + if (directive === 'use strict') { + strict = true; + if (firstRestricted) { + throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral); + } + } else { + if (!firstRestricted && token.octal) { + firstRestricted = token; + } + } + } + + oldLabelSet = state.labelSet; + oldInIteration = state.inIteration; + oldInSwitch = state.inSwitch; + oldInFunctionBody = state.inFunctionBody; + oldParenthesizedCount = state.parenthesizedCount; + + state.labelSet = {}; + state.inIteration = false; + state.inSwitch = false; + state.inFunctionBody = true; + state.parenthesizedCount = 0; + + while (index < length) { + if (match('}')) { + break; + } + sourceElement = parseSourceElement(); + if (typeof sourceElement === 'undefined') { + break; + } + sourceElements.push(sourceElement); + } + + expect('}'); + + state.labelSet = oldLabelSet; + state.inIteration = oldInIteration; + state.inSwitch = oldInSwitch; + state.inFunctionBody = oldInFunctionBody; + state.parenthesizedCount = oldParenthesizedCount; + + return delegate.createBlockStatement(sourceElements); + } + + function validateParam(options, param, name) { + var key = '$' + name; + if (strict) { + if (isRestrictedWord(name)) { + options.stricted = param; + options.message = Messages.StrictParamName; + } + if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) { + options.stricted = param; + options.message = Messages.StrictParamDupe; + } + } else if (!options.firstRestricted) { + if (isRestrictedWord(name)) { + options.firstRestricted = param; + options.message = Messages.StrictParamName; + } else if (isStrictModeReservedWord(name)) { + options.firstRestricted = param; + options.message = Messages.StrictReservedWord; + } else if (Object.prototype.hasOwnProperty.call(options.paramSet, key)) { + options.firstRestricted = param; + options.message = Messages.StrictParamDupe; + } + } + options.paramSet[key] = true; + } + + function parseParam(options) { + var token, rest, param, def; + + token = lookahead; + if (token.value === '...') { + token = lex(); + rest = true; + } + + if (match('[')) { + param = parseArrayInitialiser(); + reinterpretAsDestructuredParameter(options, param); + } else if (match('{')) { + if (rest) { + throwError({}, Messages.ObjectPatternAsRestParameter); + } + param = parseObjectInitialiser(); + reinterpretAsDestructuredParameter(options, param); + } else { + // Typing rest params is awkward, so punting on that for now + param = rest + ? parseVariableIdentifier() + : parseTypeAnnotatableIdentifier(); + validateParam(options, token, token.value); + if (match('=')) { + if (rest) { + throwErrorTolerant(lookahead, Messages.DefaultRestParameter); + } + lex(); + def = parseAssignmentExpression(); + ++options.defaultCount; + } + } + + if (rest) { + if (!match(')')) { + throwError({}, Messages.ParameterAfterRestParameter); + } + options.rest = param; + return false; + } + + options.params.push(param); + options.defaults.push(def); + return !match(')'); + } + + function parseParams(firstRestricted) { + var options; + + options = { + params: [], + defaultCount: 0, + defaults: [], + rest: null, + firstRestricted: firstRestricted + }; + + expect('('); + + if (!match(')')) { + options.paramSet = {}; + while (index < length) { + if (!parseParam(options)) { + break; + } + expect(','); + } + } + + expect(')'); + + if (options.defaultCount === 0) { + options.defaults = []; + } + + if (match(':')) { + options.returnTypeAnnotation = parseTypeAnnotation(); + } + + return options; + } + + function parseFunctionDeclaration() { + var id, body, token, tmp, firstRestricted, message, previousStrict, previousYieldAllowed, generator; + + expectKeyword('function'); + + generator = false; + if (match('*')) { + lex(); + generator = true; + } + + token = lookahead; + + id = parseVariableIdentifier(); + + if (strict) { + if (isRestrictedWord(token.value)) { + throwErrorTolerant(token, Messages.StrictFunctionName); + } + } else { + if (isRestrictedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictFunctionName; + } else if (isStrictModeReservedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictReservedWord; + } + } + + tmp = parseParams(firstRestricted); + firstRestricted = tmp.firstRestricted; + if (tmp.message) { + message = tmp.message; + } + + previousStrict = strict; + previousYieldAllowed = state.yieldAllowed; + state.yieldAllowed = generator; + + body = parseFunctionSourceElements(); + + if (strict && firstRestricted) { + throwError(firstRestricted, message); + } + if (strict && tmp.stricted) { + throwErrorTolerant(tmp.stricted, message); + } + if (state.yieldAllowed && !state.yieldFound) { + throwErrorTolerant({}, Messages.NoYieldInGenerator); + } + strict = previousStrict; + state.yieldAllowed = previousYieldAllowed; + + return delegate.createFunctionDeclaration(id, tmp.params, tmp.defaults, body, tmp.rest, generator, false, + tmp.returnTypeAnnotation); + } + + function parseFunctionExpression() { + var token, id = null, firstRestricted, message, tmp, body, previousStrict, previousYieldAllowed, generator; + + expectKeyword('function'); + + generator = false; + + if (match('*')) { + lex(); + generator = true; + } + + if (!match('(')) { + token = lookahead; + id = parseVariableIdentifier(); + if (strict) { + if (isRestrictedWord(token.value)) { + throwErrorTolerant(token, Messages.StrictFunctionName); + } + } else { + if (isRestrictedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictFunctionName; + } else if (isStrictModeReservedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictReservedWord; + } + } + } + + tmp = parseParams(firstRestricted); + firstRestricted = tmp.firstRestricted; + if (tmp.message) { + message = tmp.message; + } + + previousStrict = strict; + previousYieldAllowed = state.yieldAllowed; + state.yieldAllowed = generator; + + body = parseFunctionSourceElements(); + + if (strict && firstRestricted) { + throwError(firstRestricted, message); + } + if (strict && tmp.stricted) { + throwErrorTolerant(tmp.stricted, message); + } + if (state.yieldAllowed && !state.yieldFound) { + throwErrorTolerant({}, Messages.NoYieldInGenerator); + } + strict = previousStrict; + state.yieldAllowed = previousYieldAllowed; + + return delegate.createFunctionExpression(id, tmp.params, tmp.defaults, body, tmp.rest, generator, false, + tmp.returnTypeAnnotation); + } + + function parseYieldExpression() { + var delegateFlag, expr; + + expectKeyword('yield'); + + if (!state.yieldAllowed) { + throwErrorTolerant({}, Messages.IllegalYield); + } + + delegateFlag = false; + if (match('*')) { + lex(); + delegateFlag = true; + } + + expr = parseAssignmentExpression(); + state.yieldFound = true; + + return delegate.createYieldExpression(expr, delegateFlag); + } + + // 14 Classes + + function parseMethodDefinition(existingPropNames) { + var token, key, param, propType, isValidDuplicateProp = false; + + if (lookahead.value === 'static') { + propType = ClassPropertyType.static; + lex(); + } else { + propType = ClassPropertyType.prototype; + } + + if (match('*')) { + lex(); + return delegate.createMethodDefinition( + propType, + '', + parseObjectPropertyKey(), + parsePropertyMethodFunction({ generator: true }) + ); + } + + token = lookahead; + key = parseObjectPropertyKey(); + + if (token.value === 'get' && !match('(')) { + key = parseObjectPropertyKey(); + + // It is a syntax error if any other properties have a name + // duplicating this one unless they are a setter + if (existingPropNames[propType].hasOwnProperty(key.name)) { + isValidDuplicateProp = + // There isn't already a getter for this prop + existingPropNames[propType][key.name].get === undefined + // There isn't already a data prop by this name + && existingPropNames[propType][key.name].data === undefined + // The only existing prop by this name is a setter + && existingPropNames[propType][key.name].set !== undefined; + if (!isValidDuplicateProp) { + throwError(key, Messages.IllegalDuplicateClassProperty); + } + } else { + existingPropNames[propType][key.name] = {}; + } + existingPropNames[propType][key.name].get = true; + + expect('('); + expect(')'); + return delegate.createMethodDefinition( + propType, + 'get', + key, + parsePropertyFunction({ generator: false }) + ); + } + if (token.value === 'set' && !match('(')) { + key = parseObjectPropertyKey(); + + // It is a syntax error if any other properties have a name + // duplicating this one unless they are a getter + if (existingPropNames[propType].hasOwnProperty(key.name)) { + isValidDuplicateProp = + // There isn't already a setter for this prop + existingPropNames[propType][key.name].set === undefined + // There isn't already a data prop by this name + && existingPropNames[propType][key.name].data === undefined + // The only existing prop by this name is a getter + && existingPropNames[propType][key.name].get !== undefined; + if (!isValidDuplicateProp) { + throwError(key, Messages.IllegalDuplicateClassProperty); + } + } else { + existingPropNames[propType][key.name] = {}; + } + existingPropNames[propType][key.name].set = true; + + expect('('); + token = lookahead; + param = [ parseTypeAnnotatableIdentifier() ]; + expect(')'); + return delegate.createMethodDefinition( + propType, + 'set', + key, + parsePropertyFunction({ params: param, generator: false, name: token }) + ); + } + + // It is a syntax error if any other properties have the same name as a + // non-getter, non-setter method + if (existingPropNames[propType].hasOwnProperty(key.name)) { + throwError(key, Messages.IllegalDuplicateClassProperty); + } else { + existingPropNames[propType][key.name] = {}; + } + existingPropNames[propType][key.name].data = true; + + return delegate.createMethodDefinition( + propType, + '', + key, + parsePropertyMethodFunction({ generator: false }) + ); + } + + function parseClassElement(existingProps) { + if (match(';')) { + lex(); + return; + } + return parseMethodDefinition(existingProps); + } + + function parseClassBody() { + var classElement, classElements = [], existingProps = {}; + + existingProps[ClassPropertyType.static] = {}; + existingProps[ClassPropertyType.prototype] = {}; + + expect('{'); + + while (index < length) { + if (match('}')) { + break; + } + classElement = parseClassElement(existingProps); + + if (typeof classElement !== 'undefined') { + classElements.push(classElement); + } + } + + expect('}'); + + return delegate.createClassBody(classElements); + } + + function parseClassExpression() { + var id, previousYieldAllowed, superClass = null; + + expectKeyword('class'); + + if (!matchKeyword('extends') && !match('{')) { + id = parseVariableIdentifier(); + } + + if (matchKeyword('extends')) { + expectKeyword('extends'); + previousYieldAllowed = state.yieldAllowed; + state.yieldAllowed = false; + superClass = parseAssignmentExpression(); + state.yieldAllowed = previousYieldAllowed; + } + + return delegate.createClassExpression(id, superClass, parseClassBody()); + } + + function parseClassDeclaration() { + var id, previousYieldAllowed, superClass = null; + + expectKeyword('class'); + + id = parseVariableIdentifier(); + + if (matchKeyword('extends')) { + expectKeyword('extends'); + previousYieldAllowed = state.yieldAllowed; + state.yieldAllowed = false; + superClass = parseAssignmentExpression(); + state.yieldAllowed = previousYieldAllowed; + } + + return delegate.createClassDeclaration(id, superClass, parseClassBody()); + } + + // 15 Program + + function matchModuleDeclaration() { + var id; + if (matchContextualKeyword('module')) { + id = lookahead2(); + return id.type === Token.StringLiteral || id.type === Token.Identifier; + } + return false; + } + + function parseSourceElement() { + if (lookahead.type === Token.Keyword) { + switch (lookahead.value) { + case 'const': + case 'let': + return parseConstLetDeclaration(lookahead.value); + case 'function': + return parseFunctionDeclaration(); + case 'export': + return parseExportDeclaration(); + case 'import': + return parseImportDeclaration(); + default: + return parseStatement(); + } + } + + if (matchModuleDeclaration()) { + throwError({}, Messages.NestedModule); + } + + if (lookahead.type !== Token.EOF) { + return parseStatement(); + } + } + + function parseProgramElement() { + if (lookahead.type === Token.Keyword) { + switch (lookahead.value) { + case 'export': + return parseExportDeclaration(); + case 'import': + return parseImportDeclaration(); + } + } + + if (matchModuleDeclaration()) { + return parseModuleDeclaration(); + } + + return parseSourceElement(); + } + + function parseProgramElements() { + var sourceElement, sourceElements = [], token, directive, firstRestricted; + + while (index < length) { + token = lookahead; + if (token.type !== Token.StringLiteral) { + break; + } + + sourceElement = parseProgramElement(); + sourceElements.push(sourceElement); + if (sourceElement.expression.type !== Syntax.Literal) { + // this is not directive + break; + } + directive = source.slice(token.range[0] + 1, token.range[1] - 1); + if (directive === 'use strict') { + strict = true; + if (firstRestricted) { + throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral); + } + } else { + if (!firstRestricted && token.octal) { + firstRestricted = token; + } + } + } + + while (index < length) { + sourceElement = parseProgramElement(); + if (typeof sourceElement === 'undefined') { + break; + } + sourceElements.push(sourceElement); + } + return sourceElements; + } + + function parseModuleElement() { + return parseSourceElement(); + } + + function parseModuleElements() { + var list = [], + statement; + + while (index < length) { + if (match('}')) { + break; + } + statement = parseModuleElement(); + if (typeof statement === 'undefined') { + break; + } + list.push(statement); + } + + return list; + } + + function parseModuleBlock() { + var block; + + expect('{'); + + block = parseModuleElements(); + + expect('}'); + + return delegate.createBlockStatement(block); + } + + function parseProgram() { + var body; + strict = false; + peek(); + body = parseProgramElements(); + return delegate.createProgram(body); + } + + // The following functions are needed only when the option to preserve + // the comments is active. + + function addComment(type, value, start, end, loc) { + assert(typeof start === 'number', 'Comment must have valid position'); + + // Because the way the actual token is scanned, often the comments + // (if any) are skipped twice during the lexical analysis. + // Thus, we need to skip adding a comment if the comment array already + // handled it. + if (extra.comments.length > 0) { + if (extra.comments[extra.comments.length - 1].range[1] > start) { + return; + } + } + + extra.comments.push({ + type: type, + value: value, + range: [start, end], + loc: loc + }); + } + + function scanComment() { + var comment, ch, loc, start, blockComment, lineComment; + + comment = ''; + blockComment = false; + lineComment = false; + + while (index < length) { + ch = source[index]; + + if (lineComment) { + ch = source[index++]; + if (isLineTerminator(ch.charCodeAt(0))) { + loc.end = { + line: lineNumber, + column: index - lineStart - 1 + }; + lineComment = false; + addComment('Line', comment, start, index - 1, loc); + if (ch === '\r' && source[index] === '\n') { + ++index; + } + ++lineNumber; + lineStart = index; + comment = ''; + } else if (index >= length) { + lineComment = false; + comment += ch; + loc.end = { + line: lineNumber, + column: length - lineStart + }; + addComment('Line', comment, start, length, loc); + } else { + comment += ch; + } + } else if (blockComment) { + if (isLineTerminator(ch.charCodeAt(0))) { + if (ch === '\r' && source[index + 1] === '\n') { + ++index; + comment += '\r\n'; + } else { + comment += ch; + } + ++lineNumber; + ++index; + lineStart = index; + if (index >= length) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } else { + ch = source[index++]; + if (index >= length) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + comment += ch; + if (ch === '*') { + ch = source[index]; + if (ch === '/') { + comment = comment.substr(0, comment.length - 1); + blockComment = false; + ++index; + loc.end = { + line: lineNumber, + column: index - lineStart + }; + addComment('Block', comment, start, index, loc); + comment = ''; + } + } + } + } else if (ch === '/') { + ch = source[index + 1]; + if (ch === '/') { + loc = { + start: { + line: lineNumber, + column: index - lineStart + } + }; + start = index; + index += 2; + lineComment = true; + if (index >= length) { + loc.end = { + line: lineNumber, + column: index - lineStart + }; + lineComment = false; + addComment('Line', comment, start, index, loc); + } + } else if (ch === '*') { + start = index; + index += 2; + blockComment = true; + loc = { + start: { + line: lineNumber, + column: index - lineStart - 2 + } + }; + if (index >= length) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } else { + break; + } + } else if (isWhiteSpace(ch.charCodeAt(0))) { + ++index; + } else if (isLineTerminator(ch.charCodeAt(0))) { + ++index; + if (ch === '\r' && source[index] === '\n') { + ++index; + } + ++lineNumber; + lineStart = index; + } else { + break; + } + } + } + + function filterCommentLocation() { + var i, entry, comment, comments = []; + + for (i = 0; i < extra.comments.length; ++i) { + entry = extra.comments[i]; + comment = { + type: entry.type, + value: entry.value + }; + if (extra.range) { + comment.range = entry.range; + } + if (extra.loc) { + comment.loc = entry.loc; + } + comments.push(comment); + } + + extra.comments = comments; + } + + // 16 XJS + + XHTMLEntities = { + quot: '\u0022', + amp: '&', + apos: "\u0027", + lt: "<", + gt: ">", + nbsp: "\u00A0", + iexcl: "\u00A1", + cent: "\u00A2", + pound: "\u00A3", + curren: "\u00A4", + yen: "\u00A5", + brvbar: "\u00A6", + sect: "\u00A7", + uml: "\u00A8", + copy: "\u00A9", + ordf: "\u00AA", + laquo: "\u00AB", + not: "\u00AC", + shy: "\u00AD", + reg: "\u00AE", + macr: "\u00AF", + deg: "\u00B0", + plusmn: "\u00B1", + sup2: "\u00B2", + sup3: "\u00B3", + acute: "\u00B4", + micro: "\u00B5", + para: "\u00B6", + middot: "\u00B7", + cedil: "\u00B8", + sup1: "\u00B9", + ordm: "\u00BA", + raquo: "\u00BB", + frac14: "\u00BC", + frac12: "\u00BD", + frac34: "\u00BE", + iquest: "\u00BF", + Agrave: "\u00C0", + Aacute: "\u00C1", + Acirc: "\u00C2", + Atilde: "\u00C3", + Auml: "\u00C4", + Aring: "\u00C5", + AElig: "\u00C6", + Ccedil: "\u00C7", + Egrave: "\u00C8", + Eacute: "\u00C9", + Ecirc: "\u00CA", + Euml: "\u00CB", + Igrave: "\u00CC", + Iacute: "\u00CD", + Icirc: "\u00CE", + Iuml: "\u00CF", + ETH: "\u00D0", + Ntilde: "\u00D1", + Ograve: "\u00D2", + Oacute: "\u00D3", + Ocirc: "\u00D4", + Otilde: "\u00D5", + Ouml: "\u00D6", + times: "\u00D7", + Oslash: "\u00D8", + Ugrave: "\u00D9", + Uacute: "\u00DA", + Ucirc: "\u00DB", + Uuml: "\u00DC", + Yacute: "\u00DD", + THORN: "\u00DE", + szlig: "\u00DF", + agrave: "\u00E0", + aacute: "\u00E1", + acirc: "\u00E2", + atilde: "\u00E3", + auml: "\u00E4", + aring: "\u00E5", + aelig: "\u00E6", + ccedil: "\u00E7", + egrave: "\u00E8", + eacute: "\u00E9", + ecirc: "\u00EA", + euml: "\u00EB", + igrave: "\u00EC", + iacute: "\u00ED", + icirc: "\u00EE", + iuml: "\u00EF", + eth: "\u00F0", + ntilde: "\u00F1", + ograve: "\u00F2", + oacute: "\u00F3", + ocirc: "\u00F4", + otilde: "\u00F5", + ouml: "\u00F6", + divide: "\u00F7", + oslash: "\u00F8", + ugrave: "\u00F9", + uacute: "\u00FA", + ucirc: "\u00FB", + uuml: "\u00FC", + yacute: "\u00FD", + thorn: "\u00FE", + yuml: "\u00FF", + OElig: "\u0152", + oelig: "\u0153", + Scaron: "\u0160", + scaron: "\u0161", + Yuml: "\u0178", + fnof: "\u0192", + circ: "\u02C6", + tilde: "\u02DC", + Alpha: "\u0391", + Beta: "\u0392", + Gamma: "\u0393", + Delta: "\u0394", + Epsilon: "\u0395", + Zeta: "\u0396", + Eta: "\u0397", + Theta: "\u0398", + Iota: "\u0399", + Kappa: "\u039A", + Lambda: "\u039B", + Mu: "\u039C", + Nu: "\u039D", + Xi: "\u039E", + Omicron: "\u039F", + Pi: "\u03A0", + Rho: "\u03A1", + Sigma: "\u03A3", + Tau: "\u03A4", + Upsilon: "\u03A5", + Phi: "\u03A6", + Chi: "\u03A7", + Psi: "\u03A8", + Omega: "\u03A9", + alpha: "\u03B1", + beta: "\u03B2", + gamma: "\u03B3", + delta: "\u03B4", + epsilon: "\u03B5", + zeta: "\u03B6", + eta: "\u03B7", + theta: "\u03B8", + iota: "\u03B9", + kappa: "\u03BA", + lambda: "\u03BB", + mu: "\u03BC", + nu: "\u03BD", + xi: "\u03BE", + omicron: "\u03BF", + pi: "\u03C0", + rho: "\u03C1", + sigmaf: "\u03C2", + sigma: "\u03C3", + tau: "\u03C4", + upsilon: "\u03C5", + phi: "\u03C6", + chi: "\u03C7", + psi: "\u03C8", + omega: "\u03C9", + thetasym: "\u03D1", + upsih: "\u03D2", + piv: "\u03D6", + ensp: "\u2002", + emsp: "\u2003", + thinsp: "\u2009", + zwnj: "\u200C", + zwj: "\u200D", + lrm: "\u200E", + rlm: "\u200F", + ndash: "\u2013", + mdash: "\u2014", + lsquo: "\u2018", + rsquo: "\u2019", + sbquo: "\u201A", + ldquo: "\u201C", + rdquo: "\u201D", + bdquo: "\u201E", + dagger: "\u2020", + Dagger: "\u2021", + bull: "\u2022", + hellip: "\u2026", + permil: "\u2030", + prime: "\u2032", + Prime: "\u2033", + lsaquo: "\u2039", + rsaquo: "\u203A", + oline: "\u203E", + frasl: "\u2044", + euro: "\u20AC", + image: "\u2111", + weierp: "\u2118", + real: "\u211C", + trade: "\u2122", + alefsym: "\u2135", + larr: "\u2190", + uarr: "\u2191", + rarr: "\u2192", + darr: "\u2193", + harr: "\u2194", + crarr: "\u21B5", + lArr: "\u21D0", + uArr: "\u21D1", + rArr: "\u21D2", + dArr: "\u21D3", + hArr: "\u21D4", + forall: "\u2200", + part: "\u2202", + exist: "\u2203", + empty: "\u2205", + nabla: "\u2207", + isin: "\u2208", + notin: "\u2209", + ni: "\u220B", + prod: "\u220F", + sum: "\u2211", + minus: "\u2212", + lowast: "\u2217", + radic: "\u221A", + prop: "\u221D", + infin: "\u221E", + ang: "\u2220", + and: "\u2227", + or: "\u2228", + cap: "\u2229", + cup: "\u222A", + "int": "\u222B", + there4: "\u2234", + sim: "\u223C", + cong: "\u2245", + asymp: "\u2248", + ne: "\u2260", + equiv: "\u2261", + le: "\u2264", + ge: "\u2265", + sub: "\u2282", + sup: "\u2283", + nsub: "\u2284", + sube: "\u2286", + supe: "\u2287", + oplus: "\u2295", + otimes: "\u2297", + perp: "\u22A5", + sdot: "\u22C5", + lceil: "\u2308", + rceil: "\u2309", + lfloor: "\u230A", + rfloor: "\u230B", + lang: "\u2329", + rang: "\u232A", + loz: "\u25CA", + spades: "\u2660", + clubs: "\u2663", + hearts: "\u2665", + diams: "\u2666" + }; + + function isXJSIdentifierStart(ch) { + // exclude backslash (\) + return (ch !== 92) && isIdentifierStart(ch); + } + + function isXJSIdentifierPart(ch) { + // exclude backslash (\) and add hyphen (-) + return (ch !== 92) && (ch === 45 || isIdentifierPart(ch)); + } + + function scanXJSIdentifier() { + var ch, start, id = '', namespace; + + start = index; + while (index < length) { + ch = source.charCodeAt(index); + if (!isXJSIdentifierPart(ch)) { + break; + } + id += source[index++]; + } + + if (ch === 58) { // : + ++index; + namespace = id; + id = ''; + + while (index < length) { + ch = source.charCodeAt(index); + if (!isXJSIdentifierPart(ch)) { + break; + } + id += source[index++]; + } + } + + if (!id) { + throwError({}, Messages.InvalidXJSTagName); + } + + return { + type: Token.XJSIdentifier, + value: id, + namespace: namespace, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + function scanXJSEntity() { + var ch, str = '', count = 0, entity; + ch = source[index]; + assert(ch === '&', 'Entity must start with an ampersand'); + index++; + while (index < length && count++ < 10) { + ch = source[index++]; + if (ch === ';') { + break; + } + str += ch; + } + + if (str[0] === '#' && str[1] === 'x') { + entity = String.fromCharCode(parseInt(str.substr(2), 16)); + } else if (str[0] === '#') { + entity = String.fromCharCode(parseInt(str.substr(1), 10)); + } else { + entity = XHTMLEntities[str]; + } + return entity; + } + + function scanXJSText(stopChars) { + var ch, str = '', start; + start = index; + while (index < length) { + ch = source[index]; + if (stopChars.indexOf(ch) !== -1) { + break; + } + if (ch === '&') { + str += scanXJSEntity(); + } else { + ch = source[index++]; + if (isLineTerminator(ch.charCodeAt(0))) { + ++lineNumber; + lineStart = index; + } + str += ch; + } + } + return { + type: Token.XJSText, + value: str, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + function scanXJSStringLiteral() { + var innerToken, quote, start; + + quote = source[index]; + assert((quote === '\'' || quote === '"'), + 'String literal must starts with a quote'); + + start = index; + ++index; + + innerToken = scanXJSText([quote]); + + if (quote !== source[index]) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + ++index; + + innerToken.range = [start, index]; + + return innerToken; + } + + /** + * Between XJS opening and closing tags (e.g. HERE), anything that + * is not another XJS tag and is not an expression wrapped by {} is text. + */ + function advanceXJSChild() { + var ch = source.charCodeAt(index); + + // { (123) and < (60) + if (ch !== 123 && ch !== 60) { + return scanXJSText(['<', '{']); + } + + return scanPunctuator(); + } + + function parseXJSIdentifier() { + var token; + + if (lookahead.type !== Token.XJSIdentifier) { + throwUnexpected(lookahead); + } + + token = lex(); + return delegate.createXJSIdentifier(token.value, token.namespace); + } + + function parseXJSAttributeValue() { + var value; + if (match('{')) { + value = parseXJSExpressionContainer(); + if (value.expression.type === Syntax.XJSEmptyExpression) { + throwError( + value, + 'XJS attributes must only be assigned a non-empty ' + + 'expression' + ); + } + } else if (match('<')) { + value = parseXJSElement(); + } else if (lookahead.type === Token.XJSText) { + value = delegate.createLiteral(lex()); + } else { + throwError({}, Messages.InvalidXJSAttributeValue); + } + return value; + } + + function parseXJSEmptyExpression() { + while (source.charAt(index) !== '}') { + index++; + } + return delegate.createXJSEmptyExpression(); + } + + function parseXJSExpressionContainer() { + var expression, origInXJSChild, origInXJSTag; + + origInXJSChild = state.inXJSChild; + origInXJSTag = state.inXJSTag; + state.inXJSChild = false; + state.inXJSTag = false; + + expect('{'); + + if (match('}')) { + expression = parseXJSEmptyExpression(); + } else { + expression = parseExpression(); + } + + state.inXJSChild = origInXJSChild; + state.inXJSTag = origInXJSTag; + + expect('}'); + + return delegate.createXJSExpressionContainer(expression); + } + + function parseXJSAttribute() { + var token, name, value; + + name = parseXJSIdentifier(); + + // HTML empty attribute + if (match('=')) { + lex(); + return delegate.createXJSAttribute(name, parseXJSAttributeValue()); + } + + return delegate.createXJSAttribute(name); + } + + function parseXJSChild() { + var token; + if (match('{')) { + token = parseXJSExpressionContainer(); + } else if (lookahead.type === Token.XJSText) { + token = delegate.createLiteral(lex()); + } else { + token = parseXJSElement(); + } + return token; + } + + function parseXJSClosingElement() { + var name, origInXJSChild, origInXJSTag; + origInXJSChild = state.inXJSChild; + origInXJSTag = state.inXJSTag; + state.inXJSChild = false; + state.inXJSTag = true; + expect('<'); + expect('/'); + name = parseXJSIdentifier(); + // Because advance() (called by lex() called by expect()) expects there + // to be a valid token after >, it needs to know whether to look for a + // standard JS token or an XJS text node + state.inXJSChild = origInXJSChild; + state.inXJSTag = origInXJSTag; + expect('>'); + return delegate.createXJSClosingElement(name); + } + + function parseXJSOpeningElement() { + var name, attribute, attributes = [], selfClosing = false, origInXJSChild, origInXJSTag; + + origInXJSChild = state.inXJSChild; + origInXJSTag = state.inXJSTag; + state.inXJSChild = false; + state.inXJSTag = true; + + expect('<'); + + name = parseXJSIdentifier(); + + while (index < length && + lookahead.value !== '/' && + lookahead.value !== '>') { + attributes.push(parseXJSAttribute()); + } + + state.inXJSTag = origInXJSTag; + + if (lookahead.value === '/') { + expect('/'); + // Because advance() (called by lex() called by expect()) expects + // there to be a valid token after >, it needs to know whether to + // look for a standard JS token or an XJS text node + state.inXJSChild = origInXJSChild; + expect('>'); + selfClosing = true; + } else { + state.inXJSChild = true; + expect('>'); + } + return delegate.createXJSOpeningElement(name, attributes, selfClosing); + } + + function parseXJSElement() { + var openingElement, closingElement, children = [], origInXJSChild, origInXJSTag; + + origInXJSChild = state.inXJSChild; + origInXJSTag = state.inXJSTag; + openingElement = parseXJSOpeningElement(); + + if (!openingElement.selfClosing) { + while (index < length) { + state.inXJSChild = false; // Call lookahead2() with inXJSChild = false because 0) { + token = extra.tokens[extra.tokens.length - 1]; + if (token.range[0] === pos && token.type === 'Punctuator') { + if (token.value === '/' || token.value === '/=') { + extra.tokens.pop(); + } + } + } + + extra.tokens.push({ + type: 'RegularExpression', + value: regex.literal, + range: [pos, index], + loc: loc + }); + } + + return regex; + } + + function filterTokenLocation() { + var i, entry, token, tokens = []; + + for (i = 0; i < extra.tokens.length; ++i) { + entry = extra.tokens[i]; + token = { + type: entry.type, + value: entry.value + }; + if (extra.range) { + token.range = entry.range; + } + if (extra.loc) { + token.loc = entry.loc; + } + tokens.push(token); + } + + extra.tokens = tokens; + } + + function LocationMarker() { + this.range = [index, index]; + this.loc = { + start: { + line: lineNumber, + column: index - lineStart + }, + end: { + line: lineNumber, + column: index - lineStart + } + }; + } + + LocationMarker.prototype = { + constructor: LocationMarker, + + end: function () { + this.range[1] = index; + this.loc.end.line = lineNumber; + this.loc.end.column = index - lineStart; + }, + + applyGroup: function (node) { + if (extra.range) { + node.groupRange = [this.range[0], this.range[1]]; + } + if (extra.loc) { + node.groupLoc = { + start: { + line: this.loc.start.line, + column: this.loc.start.column + }, + end: { + line: this.loc.end.line, + column: this.loc.end.column + } + }; + node = delegate.postProcess(node); + } + }, + + apply: function (node) { + var nodeType = typeof node; + assert(nodeType === 'object', + 'Applying location marker to an unexpected node type: ' + + nodeType); + + if (extra.range) { + node.range = [this.range[0], this.range[1]]; + } + if (extra.loc) { + node.loc = { + start: { + line: this.loc.start.line, + column: this.loc.start.column + }, + end: { + line: this.loc.end.line, + column: this.loc.end.column + } + }; + node = delegate.postProcess(node); + } + } + }; + + function createLocationMarker() { + return new LocationMarker(); + } + + function trackGroupExpression() { + var marker, expr; + + skipComment(); + marker = createLocationMarker(); + expect('('); + + ++state.parenthesizedCount; + expr = parseExpression(); + + expect(')'); + marker.end(); + marker.applyGroup(expr); + + return expr; + } + + function trackLeftHandSideExpression() { + var marker, expr; + + skipComment(); + marker = createLocationMarker(); + + expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression(); + + while (match('.') || match('[') || lookahead.type === Token.Template) { + if (match('[')) { + expr = delegate.createMemberExpression('[', expr, parseComputedMember()); + marker.end(); + marker.apply(expr); + } else if (match('.')) { + expr = delegate.createMemberExpression('.', expr, parseNonComputedMember()); + marker.end(); + marker.apply(expr); + } else { + expr = delegate.createTaggedTemplateExpression(expr, parseTemplateLiteral()); + marker.end(); + marker.apply(expr); + } + } + + return expr; + } + + function trackLeftHandSideExpressionAllowCall() { + var marker, expr, args; + + skipComment(); + marker = createLocationMarker(); + + expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression(); + + while (match('.') || match('[') || match('(') || lookahead.type === Token.Template) { + if (match('(')) { + args = parseArguments(); + expr = delegate.createCallExpression(expr, args); + marker.end(); + marker.apply(expr); + } else if (match('[')) { + expr = delegate.createMemberExpression('[', expr, parseComputedMember()); + marker.end(); + marker.apply(expr); + } else if (match('.')) { + expr = delegate.createMemberExpression('.', expr, parseNonComputedMember()); + marker.end(); + marker.apply(expr); + } else { + expr = delegate.createTaggedTemplateExpression(expr, parseTemplateLiteral()); + marker.end(); + marker.apply(expr); + } + } + + return expr; + } + + function filterGroup(node) { + var n, i, entry; + + n = (Object.prototype.toString.apply(node) === '[object Array]') ? [] : {}; + for (i in node) { + if (node.hasOwnProperty(i) && i !== 'groupRange' && i !== 'groupLoc') { + entry = node[i]; + if (entry === null || typeof entry !== 'object' || entry instanceof RegExp) { + n[i] = entry; + } else { + n[i] = filterGroup(entry); + } + } + } + return n; + } + + function wrapTrackingFunction(range, loc, preserveWhitespace) { + + return function (parseFunction) { + + function isBinary(node) { + return node.type === Syntax.LogicalExpression || + node.type === Syntax.BinaryExpression; + } + + function visit(node) { + var start, end; + + if (isBinary(node.left)) { + visit(node.left); + } + if (isBinary(node.right)) { + visit(node.right); + } + + if (range) { + if (node.left.groupRange || node.right.groupRange) { + start = node.left.groupRange ? node.left.groupRange[0] : node.left.range[0]; + end = node.right.groupRange ? node.right.groupRange[1] : node.right.range[1]; + node.range = [start, end]; + } else if (typeof node.range === 'undefined') { + start = node.left.range[0]; + end = node.right.range[1]; + node.range = [start, end]; + } + } + if (loc) { + if (node.left.groupLoc || node.right.groupLoc) { + start = node.left.groupLoc ? node.left.groupLoc.start : node.left.loc.start; + end = node.right.groupLoc ? node.right.groupLoc.end : node.right.loc.end; + node.loc = { + start: start, + end: end + }; + node = delegate.postProcess(node); + } else if (typeof node.loc === 'undefined') { + node.loc = { + start: node.left.loc.start, + end: node.right.loc.end + }; + node = delegate.postProcess(node); + } + } + } + + return function () { + var marker, node; + + if (!preserveWhitespace) { + skipComment(); + } + + marker = createLocationMarker(); + node = parseFunction.apply(null, arguments); + marker.end(); + + if (range && typeof node.range === 'undefined') { + marker.apply(node); + } + + if (loc && typeof node.loc === 'undefined') { + marker.apply(node); + } + + if (isBinary(node)) { + visit(node); + } + + return node; + }; + }; + } + + function patch() { + + var wrapTracking, wrapTrackingPreserveWhitespace; + + if (extra.comments) { + extra.skipComment = skipComment; + skipComment = scanComment; + } + + if (extra.range || extra.loc) { + + extra.parseGroupExpression = parseGroupExpression; + extra.parseLeftHandSideExpression = parseLeftHandSideExpression; + extra.parseLeftHandSideExpressionAllowCall = parseLeftHandSideExpressionAllowCall; + parseGroupExpression = trackGroupExpression; + parseLeftHandSideExpression = trackLeftHandSideExpression; + parseLeftHandSideExpressionAllowCall = trackLeftHandSideExpressionAllowCall; + + wrapTracking = wrapTrackingFunction(extra.range, extra.loc); + wrapTrackingPreserveWhitespace = + wrapTrackingFunction(extra.range, extra.loc, true); + + extra.parseArrayInitialiser = parseArrayInitialiser; + extra.parseAssignmentExpression = parseAssignmentExpression; + extra.parseBinaryExpression = parseBinaryExpression; + extra.parseBlock = parseBlock; + extra.parseFunctionSourceElements = parseFunctionSourceElements; + extra.parseCatchClause = parseCatchClause; + extra.parseComputedMember = parseComputedMember; + extra.parseConditionalExpression = parseConditionalExpression; + extra.parseConstLetDeclaration = parseConstLetDeclaration; + extra.parseExportBatchSpecifier = parseExportBatchSpecifier; + extra.parseExportDeclaration = parseExportDeclaration; + extra.parseExportSpecifier = parseExportSpecifier; + extra.parseExpression = parseExpression; + extra.parseForVariableDeclaration = parseForVariableDeclaration; + extra.parseFunctionDeclaration = parseFunctionDeclaration; + extra.parseFunctionExpression = parseFunctionExpression; + extra.parseParams = parseParams; + extra.parseImportDeclaration = parseImportDeclaration; + extra.parseImportSpecifier = parseImportSpecifier; + extra.parseModuleDeclaration = parseModuleDeclaration; + extra.parseModuleBlock = parseModuleBlock; + extra.parseNewExpression = parseNewExpression; + extra.parseNonComputedProperty = parseNonComputedProperty; + extra.parseObjectInitialiser = parseObjectInitialiser; + extra.parseObjectProperty = parseObjectProperty; + extra.parseObjectPropertyKey = parseObjectPropertyKey; + extra.parsePostfixExpression = parsePostfixExpression; + extra.parsePrimaryExpression = parsePrimaryExpression; + extra.parseProgram = parseProgram; + extra.parsePropertyFunction = parsePropertyFunction; + extra.parseSpreadOrAssignmentExpression = parseSpreadOrAssignmentExpression; + extra.parseTemplateElement = parseTemplateElement; + extra.parseTemplateLiteral = parseTemplateLiteral; + extra.parseTypeAnnotatableIdentifier = parseTypeAnnotatableIdentifier; + extra.parseTypeAnnotation = parseTypeAnnotation; + extra.parseStatement = parseStatement; + extra.parseSwitchCase = parseSwitchCase; + extra.parseUnaryExpression = parseUnaryExpression; + extra.parseVariableDeclaration = parseVariableDeclaration; + extra.parseVariableIdentifier = parseVariableIdentifier; + extra.parseMethodDefinition = parseMethodDefinition; + extra.parseClassDeclaration = parseClassDeclaration; + extra.parseClassExpression = parseClassExpression; + extra.parseClassBody = parseClassBody; + extra.parseXJSIdentifier = parseXJSIdentifier; + extra.parseXJSChild = parseXJSChild; + extra.parseXJSAttribute = parseXJSAttribute; + extra.parseXJSAttributeValue = parseXJSAttributeValue; + extra.parseXJSExpressionContainer = parseXJSExpressionContainer; + extra.parseXJSEmptyExpression = parseXJSEmptyExpression; + extra.parseXJSElement = parseXJSElement; + extra.parseXJSClosingElement = parseXJSClosingElement; + extra.parseXJSOpeningElement = parseXJSOpeningElement; + + parseArrayInitialiser = wrapTracking(extra.parseArrayInitialiser); + parseAssignmentExpression = wrapTracking(extra.parseAssignmentExpression); + parseBinaryExpression = wrapTracking(extra.parseBinaryExpression); + parseBlock = wrapTracking(extra.parseBlock); + parseFunctionSourceElements = wrapTracking(extra.parseFunctionSourceElements); + parseCatchClause = wrapTracking(extra.parseCatchClause); + parseComputedMember = wrapTracking(extra.parseComputedMember); + parseConditionalExpression = wrapTracking(extra.parseConditionalExpression); + parseConstLetDeclaration = wrapTracking(extra.parseConstLetDeclaration); + parseExportBatchSpecifier = wrapTracking(parseExportBatchSpecifier); + parseExportDeclaration = wrapTracking(parseExportDeclaration); + parseExportSpecifier = wrapTracking(parseExportSpecifier); + parseExpression = wrapTracking(extra.parseExpression); + parseForVariableDeclaration = wrapTracking(extra.parseForVariableDeclaration); + parseFunctionDeclaration = wrapTracking(extra.parseFunctionDeclaration); + parseFunctionExpression = wrapTracking(extra.parseFunctionExpression); + parseParams = wrapTracking(extra.parseParams); + parseImportDeclaration = wrapTracking(extra.parseImportDeclaration); + parseImportSpecifier = wrapTracking(extra.parseImportSpecifier); + parseModuleDeclaration = wrapTracking(extra.parseModuleDeclaration); + parseModuleBlock = wrapTracking(extra.parseModuleBlock); + parseLeftHandSideExpression = wrapTracking(parseLeftHandSideExpression); + parseNewExpression = wrapTracking(extra.parseNewExpression); + parseNonComputedProperty = wrapTracking(extra.parseNonComputedProperty); + parseObjectInitialiser = wrapTracking(extra.parseObjectInitialiser); + parseObjectProperty = wrapTracking(extra.parseObjectProperty); + parseObjectPropertyKey = wrapTracking(extra.parseObjectPropertyKey); + parsePostfixExpression = wrapTracking(extra.parsePostfixExpression); + parsePrimaryExpression = wrapTracking(extra.parsePrimaryExpression); + parseProgram = wrapTracking(extra.parseProgram); + parsePropertyFunction = wrapTracking(extra.parsePropertyFunction); + parseTemplateElement = wrapTracking(extra.parseTemplateElement); + parseTemplateLiteral = wrapTracking(extra.parseTemplateLiteral); + parseTypeAnnotatableIdentifier = wrapTracking(extra.parseTypeAnnotatableIdentifier); + parseTypeAnnotation = wrapTracking(extra.parseTypeAnnotation); + parseSpreadOrAssignmentExpression = wrapTracking(extra.parseSpreadOrAssignmentExpression); + parseStatement = wrapTracking(extra.parseStatement); + parseSwitchCase = wrapTracking(extra.parseSwitchCase); + parseUnaryExpression = wrapTracking(extra.parseUnaryExpression); + parseVariableDeclaration = wrapTracking(extra.parseVariableDeclaration); + parseVariableIdentifier = wrapTracking(extra.parseVariableIdentifier); + parseMethodDefinition = wrapTracking(extra.parseMethodDefinition); + parseClassDeclaration = wrapTracking(extra.parseClassDeclaration); + parseClassExpression = wrapTracking(extra.parseClassExpression); + parseClassBody = wrapTracking(extra.parseClassBody); + parseXJSIdentifier = wrapTracking(extra.parseXJSIdentifier); + parseXJSChild = wrapTrackingPreserveWhitespace(extra.parseXJSChild); + parseXJSAttribute = wrapTracking(extra.parseXJSAttribute); + parseXJSAttributeValue = wrapTracking(extra.parseXJSAttributeValue); + parseXJSExpressionContainer = wrapTracking(extra.parseXJSExpressionContainer); + parseXJSEmptyExpression = wrapTrackingPreserveWhitespace(extra.parseXJSEmptyExpression); + parseXJSElement = wrapTracking(extra.parseXJSElement); + parseXJSClosingElement = wrapTracking(extra.parseXJSClosingElement); + parseXJSOpeningElement = wrapTracking(extra.parseXJSOpeningElement); + } + + if (typeof extra.tokens !== 'undefined') { + extra.advance = advance; + extra.scanRegExp = scanRegExp; + + advance = collectToken; + scanRegExp = collectRegex; + } + } + + function unpatch() { + if (typeof extra.skipComment === 'function') { + skipComment = extra.skipComment; + } + + if (extra.range || extra.loc) { + parseArrayInitialiser = extra.parseArrayInitialiser; + parseAssignmentExpression = extra.parseAssignmentExpression; + parseBinaryExpression = extra.parseBinaryExpression; + parseBlock = extra.parseBlock; + parseFunctionSourceElements = extra.parseFunctionSourceElements; + parseCatchClause = extra.parseCatchClause; + parseComputedMember = extra.parseComputedMember; + parseConditionalExpression = extra.parseConditionalExpression; + parseConstLetDeclaration = extra.parseConstLetDeclaration; + parseExportBatchSpecifier = extra.parseExportBatchSpecifier; + parseExportDeclaration = extra.parseExportDeclaration; + parseExportSpecifier = extra.parseExportSpecifier; + parseExpression = extra.parseExpression; + parseForVariableDeclaration = extra.parseForVariableDeclaration; + parseFunctionDeclaration = extra.parseFunctionDeclaration; + parseFunctionExpression = extra.parseFunctionExpression; + parseImportDeclaration = extra.parseImportDeclaration; + parseImportSpecifier = extra.parseImportSpecifier; + parseGroupExpression = extra.parseGroupExpression; + parseLeftHandSideExpression = extra.parseLeftHandSideExpression; + parseLeftHandSideExpressionAllowCall = extra.parseLeftHandSideExpressionAllowCall; + parseModuleDeclaration = extra.parseModuleDeclaration; + parseModuleBlock = extra.parseModuleBlock; + parseNewExpression = extra.parseNewExpression; + parseNonComputedProperty = extra.parseNonComputedProperty; + parseObjectInitialiser = extra.parseObjectInitialiser; + parseObjectProperty = extra.parseObjectProperty; + parseObjectPropertyKey = extra.parseObjectPropertyKey; + parsePostfixExpression = extra.parsePostfixExpression; + parsePrimaryExpression = extra.parsePrimaryExpression; + parseProgram = extra.parseProgram; + parsePropertyFunction = extra.parsePropertyFunction; + parseTemplateElement = extra.parseTemplateElement; + parseTemplateLiteral = extra.parseTemplateLiteral; + parseTypeAnnotatableIdentifier = extra.parseTypeAnnotatableIdentifier; + parseTypeAnnotation = extra.parseTypeAnnotation; + parseSpreadOrAssignmentExpression = extra.parseSpreadOrAssignmentExpression; + parseStatement = extra.parseStatement; + parseSwitchCase = extra.parseSwitchCase; + parseUnaryExpression = extra.parseUnaryExpression; + parseVariableDeclaration = extra.parseVariableDeclaration; + parseVariableIdentifier = extra.parseVariableIdentifier; + parseMethodDefinition = extra.parseMethodDefinition; + parseClassDeclaration = extra.parseClassDeclaration; + parseClassExpression = extra.parseClassExpression; + parseClassBody = extra.parseClassBody; + parseXJSIdentifier = extra.parseXJSIdentifier; + parseXJSChild = extra.parseXJSChild; + parseXJSAttribute = extra.parseXJSAttribute; + parseXJSAttributeValue = extra.parseXJSAttributeValue; + parseXJSExpressionContainer = extra.parseXJSExpressionContainer; + parseXJSEmptyExpression = extra.parseXJSEmptyExpression; + parseXJSElement = extra.parseXJSElement; + parseXJSClosingElement = extra.parseXJSClosingElement; + parseXJSOpeningElement = extra.parseXJSOpeningElement; + } + + if (typeof extra.scanRegExp === 'function') { + advance = extra.advance; + scanRegExp = extra.scanRegExp; + } + } + + // This is used to modify the delegate. + + function extend(object, properties) { + var entry, result = {}; + + for (entry in object) { + if (object.hasOwnProperty(entry)) { + result[entry] = object[entry]; + } + } + + for (entry in properties) { + if (properties.hasOwnProperty(entry)) { + result[entry] = properties[entry]; + } + } + + return result; + } + + function tokenize(code, options) { + var toString, + token, + tokens; + + toString = String; + if (typeof code !== 'string' && !(code instanceof String)) { + code = toString(code); + } + + delegate = SyntaxTreeDelegate; + source = code; + index = 0; + lineNumber = (source.length > 0) ? 1 : 0; + lineStart = 0; + length = source.length; + lookahead = null; + state = { + allowKeyword: true, + allowIn: true, + labelSet: {}, + inFunctionBody: false, + inIteration: false, + inSwitch: false + }; + + extra = {}; + + // Options matching. + options = options || {}; + + // Of course we collect tokens here. + options.tokens = true; + extra.tokens = []; + extra.tokenize = true; + // The following two fields are necessary to compute the Regex tokens. + extra.openParenToken = -1; + extra.openCurlyToken = -1; + + extra.range = (typeof options.range === 'boolean') && options.range; + extra.loc = (typeof options.loc === 'boolean') && options.loc; + + if (typeof options.comment === 'boolean' && options.comment) { + extra.comments = []; + } + if (typeof options.tolerant === 'boolean' && options.tolerant) { + extra.errors = []; + } + + if (length > 0) { + if (typeof source[0] === 'undefined') { + // Try first to convert to a string. This is good as fast path + // for old IE which understands string indexing for string + // literals only and not for string object. + if (code instanceof String) { + source = code.valueOf(); + } + } + } + + patch(); + + try { + peek(); + if (lookahead.type === Token.EOF) { + return extra.tokens; + } + + token = lex(); + while (lookahead.type !== Token.EOF) { + try { + token = lex(); + } catch (lexError) { + token = lookahead; + if (extra.errors) { + extra.errors.push(lexError); + // We have to break on the first error + // to avoid infinite loops. + break; + } else { + throw lexError; + } + } + } + + filterTokenLocation(); + tokens = extra.tokens; + if (typeof extra.comments !== 'undefined') { + filterCommentLocation(); + tokens.comments = extra.comments; + } + if (typeof extra.errors !== 'undefined') { + tokens.errors = extra.errors; + } + } catch (e) { + throw e; + } finally { + unpatch(); + extra = {}; + } + return tokens; + } + + function parse(code, options) { + var program, toString; + + toString = String; + if (typeof code !== 'string' && !(code instanceof String)) { + code = toString(code); + } + + delegate = SyntaxTreeDelegate; + source = code; + index = 0; + lineNumber = (source.length > 0) ? 1 : 0; + lineStart = 0; + length = source.length; + lookahead = null; + state = { + allowKeyword: false, + allowIn: true, + labelSet: {}, + parenthesizedCount: 0, + inFunctionBody: false, + inIteration: false, + inSwitch: false, + inXJSChild: false, + inXJSTag: false, + yieldAllowed: false, + yieldFound: false + }; + + extra = {}; + if (typeof options !== 'undefined') { + extra.range = (typeof options.range === 'boolean') && options.range; + extra.loc = (typeof options.loc === 'boolean') && options.loc; + + if (extra.loc && options.source !== null && options.source !== undefined) { + delegate = extend(delegate, { + 'postProcess': function (node) { + node.loc.source = toString(options.source); + return node; + } + }); + } + + if (typeof options.tokens === 'boolean' && options.tokens) { + extra.tokens = []; + } + if (typeof options.comment === 'boolean' && options.comment) { + extra.comments = []; + } + if (typeof options.tolerant === 'boolean' && options.tolerant) { + extra.errors = []; + } + } + + if (length > 0) { + if (typeof source[0] === 'undefined') { + // Try first to convert to a string. This is good as fast path + // for old IE which understands string indexing for string + // literals only and not for string object. + if (code instanceof String) { + source = code.valueOf(); + } + } + } + + patch(); + try { + program = parseProgram(); + if (typeof extra.comments !== 'undefined') { + filterCommentLocation(); + program.comments = extra.comments; + } + if (typeof extra.tokens !== 'undefined') { + filterTokenLocation(); + program.tokens = extra.tokens; + } + if (typeof extra.errors !== 'undefined') { + program.errors = extra.errors; + } + if (extra.range || extra.loc) { + program.body = filterGroup(program.body); + } + } catch (e) { + throw e; + } finally { + unpatch(); + extra = {}; + } + + return program; + } + + // Sync with *.json manifests. + exports.version = '1.1.0-dev-harmony'; + + exports.tokenize = tokenize; + + exports.parse = parse; + + // Deep copy. + exports.Syntax = (function () { + var name, types = {}; + + if (typeof Object.create === 'function') { + types = Object.create(null); + } + + for (name in Syntax) { + if (Syntax.hasOwnProperty(name)) { + types[name] = Syntax[name]; + } + } + + if (typeof Object.freeze === 'function') { + Object.freeze(types); + } + + return types; + }()); + +})); +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/examples/detectnestedternary.js b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/examples/detectnestedternary.js new file mode 100644 index 00000000..f144955d --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/examples/detectnestedternary.js @@ -0,0 +1,106 @@ +// Usage: node detectnestedternary.js /path/to/some/directory +// For more details, please read http://esprima.org/doc/#nestedternary + +/*jslint node:true sloppy:true plusplus:true */ + +var fs = require('fs'), + esprima = require('../esprima'), + dirname = process.argv[2]; + + +// Executes visitor on the object and its children (recursively). +function traverse(object, visitor) { + var key, child; + + visitor.call(null, object); + for (key in object) { + if (object.hasOwnProperty(key)) { + child = object[key]; + if (typeof child === 'object' && child !== null) { + traverse(child, visitor); + } + } + } +} + +// http://stackoverflow.com/q/5827612/ +function walk(dir, done) { + var results = []; + fs.readdir(dir, function (err, list) { + if (err) { + return done(err); + } + var i = 0; + (function next() { + var file = list[i++]; + if (!file) { + return done(null, results); + } + file = dir + '/' + file; + fs.stat(file, function (err, stat) { + if (stat && stat.isDirectory()) { + walk(file, function (err, res) { + results = results.concat(res); + next(); + }); + } else { + results.push(file); + next(); + } + }); + }()); + }); +} + +walk(dirname, function (err, results) { + if (err) { + console.log('Error', err); + return; + } + + results.forEach(function (filename) { + var shortname, first, content, syntax; + + shortname = filename; + first = true; + + if (shortname.substr(0, dirname.length) === dirname) { + shortname = shortname.substr(dirname.length + 1, shortname.length); + } + + function report(node, problem) { + if (first === true) { + console.log(shortname + ': '); + first = false; + } + console.log(' Line', node.loc.start.line, ':', problem); + } + + function checkConditional(node) { + var condition; + + if (node.consequent.type === 'ConditionalExpression' || + node.alternate.type === 'ConditionalExpression') { + + condition = content.substring(node.test.range[0], node.test.range[1]); + if (condition.length > 20) { + condition = condition.substring(0, 20) + '...'; + } + condition = '"' + condition + '"'; + report(node, 'Nested ternary for ' + condition); + } + } + + try { + content = fs.readFileSync(filename, 'utf-8'); + syntax = esprima.parse(content, { tolerant: true, loc: true, range: true }); + traverse(syntax, function (node) { + if (node.type === 'ConditionalExpression') { + checkConditional(node); + } + }); + } catch (e) { + } + + }); +}); diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/examples/findbooleantrap.js b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/examples/findbooleantrap.js new file mode 100644 index 00000000..dc6d1d9c --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/examples/findbooleantrap.js @@ -0,0 +1,173 @@ +// Usage: node findbooleantrap.js /path/to/some/directory +// For more details, please read http://esprima.org/doc/#booleantrap. + +/*jslint node:true sloppy:true plusplus:true */ + +var fs = require('fs'), + esprima = require('../esprima'), + dirname = process.argv[2], + doubleNegativeList = []; + + +// Black-list of terms with double-negative meaning. +doubleNegativeList = [ + 'hidden', + 'caseinsensitive', + 'disabled' +]; + + +// Executes visitor on the object and its children (recursively). +function traverse(object, visitor) { + var key, child; + + if (visitor.call(null, object) === false) { + return; + } + for (key in object) { + if (object.hasOwnProperty(key)) { + child = object[key]; + if (typeof child === 'object' && child !== null) { + traverse(child, visitor); + } + } + } +} + +// http://stackoverflow.com/q/5827612/ +function walk(dir, done) { + var results = []; + fs.readdir(dir, function (err, list) { + if (err) { + return done(err); + } + var i = 0; + (function next() { + var file = list[i++]; + if (!file) { + return done(null, results); + } + file = dir + '/' + file; + fs.stat(file, function (err, stat) { + if (stat && stat.isDirectory()) { + walk(file, function (err, res) { + results = results.concat(res); + next(); + }); + } else { + results.push(file); + next(); + } + }); + }()); + }); +} + +walk(dirname, function (err, results) { + if (err) { + console.log('Error', err); + return; + } + + results.forEach(function (filename) { + var shortname, first, content, syntax; + + shortname = filename; + first = true; + + if (shortname.substr(0, dirname.length) === dirname) { + shortname = shortname.substr(dirname.length + 1, shortname.length); + } + + function getFunctionName(node) { + if (node.callee.type === 'Identifier') { + return node.callee.name; + } + if (node.callee.type === 'MemberExpression') { + return node.callee.property.name; + } + } + + function report(node, problem) { + if (first === true) { + console.log(shortname + ': '); + first = false; + } + console.log(' Line', node.loc.start.line, 'in function', + getFunctionName(node) + ':', problem); + } + + function checkSingleArgument(node) { + var args = node['arguments'], + functionName = getFunctionName(node); + + if ((args.length !== 1) || (typeof args[0].value !== 'boolean')) { + return; + } + + // Check if the method is a setter, i.e. starts with 'set', + // e.g. 'setEnabled(false)'. + if (functionName.substr(0, 3) !== 'set') { + report(node, 'Boolean literal with a non-setter function'); + } + + // Does it contain a term with double-negative meaning? + doubleNegativeList.forEach(function (term) { + if (functionName.toLowerCase().indexOf(term.toLowerCase()) >= 0) { + report(node, 'Boolean literal with confusing double-negative'); + } + }); + } + + function checkMultipleArguments(node) { + var args = node['arguments'], + literalCount = 0; + + args.forEach(function (arg) { + if (typeof arg.value === 'boolean') { + literalCount++; + } + }); + + // At least two arguments must be Boolean literals. + if (literalCount >= 2) { + + // Check for two different Boolean literals in one call. + if (literalCount === 2 && args.length === 2) { + if (args[0].value !== args[1].value) { + report(node, 'Confusing true vs false'); + return; + } + } + + report(node, 'Multiple Boolean literals'); + } + } + + function checkLastArgument(node) { + var args = node['arguments']; + + if (args.length < 2) { + return; + } + + if (typeof args[args.length - 1].value === 'boolean') { + report(node, 'Ambiguous Boolean literal as the last argument'); + } + } + + try { + content = fs.readFileSync(filename, 'utf-8'); + syntax = esprima.parse(content, { tolerant: true, loc: true }); + traverse(syntax, function (node) { + if (node.type === 'CallExpression') { + checkSingleArgument(node); + checkLastArgument(node); + checkMultipleArguments(node); + } + }); + } catch (e) { + } + + }); +}); diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/examples/tokendist.js b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/examples/tokendist.js new file mode 100644 index 00000000..bdd7761c --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/examples/tokendist.js @@ -0,0 +1,33 @@ +/*jslint node:true */ +var fs = require('fs'), + esprima = require('../esprima'), + files = process.argv.splice(2), + histogram, + type; + +histogram = { + Boolean: 0, + Identifier: 0, + Keyword: 0, + Null: 0, + Numeric: 0, + Punctuator: 0, + RegularExpression: 0, + String: 0 +}; + +files.forEach(function (filename) { + 'use strict'; + var content = fs.readFileSync(filename, 'utf-8'), + tokens = esprima.parse(content, { tokens: true }).tokens; + + tokens.forEach(function (token) { + histogram[token.type] += 1; + }); +}); + +for (type in histogram) { + if (histogram.hasOwnProperty(type)) { + console.log(type, histogram[type]); + } +} diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/index.html b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/index.html new file mode 100644 index 00000000..4d412ab1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/index.html @@ -0,0 +1,136 @@ + + + + + + + Esprima + + + + + + + + + + + +
    +
    +

    ECMAScript parsing infrastructure for multipurpose analysis

    +
    +
    + + +
    +
    +

    Esprima is a high performance, standard-compliant + ECMAScript parser written in ECMAScript (also popularly known as + JavaScript).

    + +
    +
    +

    Features

    +
      +
    • Full support for ECMAScript 5.1 (ECMA-262)
    • +
    • Sensible syntax tree format, compatible with Mozilla Parser AST
    • +
    • Optional tracking of syntax node location (index-based and line-column)
    • +
    • Heavily tested (> 600 tests with solid statement and branch coverage)
    • +
    • Experimental support for ES6/Harmony (module, class, destructuring, ...)
    • +
    +

    +

    Esprima serves as an important building block for some JavaScript language tools, + from code instrumentation to editor autocompletion.

    + Autocomplete

    +
    +
    +
    + +
    +
    +

    Once the full syntax tree is obtained, various static code analysis + can be applied to give an insight to the code: + syntax visualization, + code validation, + editing autocomplete (with type inferencing) + and many others.

    +
    +
    +

    Regenerating the code from the syntax tree permits a few different types of code transformation, + from a simple rewriting (with specific formatting) to + a more complicated minification.

    +
    +

    Esprima runs on many popular web browsers, as well as other ECMAScript platforms such as + Rhino and + Node.js. It is distributed under the + BSD license.

    +
    +
    + + + + + + diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/package.json b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/package.json new file mode 100644 index 00000000..8c39cd16 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/package.json @@ -0,0 +1,119 @@ +{ + "_args": [ + [ + { + "raw": "esprima-fb@^3001.1.0-dev-harmony-fb", + "scope": null, + "escapedName": "esprima-fb", + "name": "esprima-fb", + "rawSpec": "^3001.1.0-dev-harmony-fb", + "spec": ">=3001.1.0-dev-harmony-fb <3002.0.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/derequire" + ], + [ + { + "raw": "esprima-fb@3001.1.0-dev-harmony-fb", + "scope": null, + "escapedName": "esprima-fb", + "name": "esprima-fb", + "rawSpec": "3001.1.0-dev-harmony-fb", + "spec": "3001.1.0-dev-harmony-fb", + "type": "version" + }, + "/Users/MB/git/pdfkit/node_modules/detective" + ] + ], + "_from": "esprima-fb@3001.1.0-dev-harmony-fb", + "_id": "esprima-fb@3001.1.0-dev-harmony-fb", + "_inCache": true, + "_location": "/detective/esprima-fb", + "_npmUser": { + "name": "jeffmo", + "email": "jeff@anafx.com" + }, + "_npmVersion": "1.2.32", + "_phantomChildren": {}, + "_requested": { + "raw": "esprima-fb@3001.1.0-dev-harmony-fb", + "scope": null, + "escapedName": "esprima-fb", + "name": "esprima-fb", + "rawSpec": "3001.1.0-dev-harmony-fb", + "spec": "3001.1.0-dev-harmony-fb", + "type": "version" + }, + "_requiredBy": [ + "/detective" + ], + "_resolved": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-3001.0001.0000-dev-harmony-fb.tgz", + "_shasum": "b77d37abcd38ea0b77426bb8bc2922ce6b426411", + "_shrinkwrap": null, + "_spec": "esprima-fb@3001.1.0-dev-harmony-fb", + "_where": "/Users/MB/git/pdfkit/node_modules/detective", + "bin": { + "esparse": "./bin/esparse.js", + "esvalidate": "./bin/esvalidate.js" + }, + "bugs": { + "url": "https://github.com/facebook/esprima/issues" + }, + "dependencies": {}, + "description": "Facebook-specific fork of the esprima project", + "devDependencies": { + "complexity-report": "~0.6.1", + "eslint": "~0.1.0", + "istanbul": "~0.1.27", + "jslint": "~0.1.9", + "json-diff": "~0.3.1", + "regenerate": "~0.5.4", + "unicode-6.3.0": "~0.1.0" + }, + "directories": {}, + "dist": { + "shasum": "b77d37abcd38ea0b77426bb8bc2922ce6b426411", + "tarball": "https://registry.npmjs.org/esprima-fb/-/esprima-fb-3001.0001.0000-dev-harmony-fb.tgz" + }, + "engines": { + "node": ">=0.4.0" + }, + "homepage": "https://github.com/facebook/esprima/tree/fb-harmony", + "licenses": [ + { + "type": "BSD", + "url": "http://github.com/facebook/esprima/raw/master/LICENSE.BSD" + } + ], + "main": "esprima.js", + "maintainers": [ + { + "name": "jeffmo", + "email": "jeff@anafx.com" + }, + { + "name": "zpao", + "email": "paul@oshannessy.com" + } + ], + "name": "esprima-fb", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/facebook/esprima.git" + }, + "scripts": { + "analyze-complexity": "node tools/list-complexity.js", + "analyze-coverage": "node node_modules/istanbul/lib/cli.js cover test/runner.js", + "benchmark": "node test/benchmarks.js", + "benchmark-quick": "node test/benchmarks.js quick", + "check-complexity": "node node_modules/complexity-report/src/cli.js --maxcc 31 --silent -l -w esprima.js", + "check-coverage": "node node_modules/istanbul/lib/cli.js check-coverage --statement -8 --branch -28 --function 99.69", + "complexity": "npm run-script analyze-complexity && npm run-script check-complexity", + "coverage": "npm run-script analyze-coverage && npm run-script check-coverage", + "lint": "node tools/check-version.js && node_modules/eslint/bin/eslint.js esprima.js && node_modules/jslint/bin/jslint.js esprima.js", + "test": "npm run-script lint && node test/run.js && npm run-script coverage && npm run-script complexity" + }, + "version": "3001.1.0-dev-harmony-fb" +} diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/benchmarks.html b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/benchmarks.html new file mode 100644 index 00000000..1a196b61 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/benchmarks.html @@ -0,0 +1,128 @@ + + + + + + + Esprima: Benchmarks + + + + + + + + + + + + +
    +
    +

    Benchmarks show the true speed

    +
    +
    + + +
    +
    + +

    + + +

    + +

    +
    Please wait...
    + +
    + +
    +
    +

    Note: On a modern machine and up-to-date web browsers, +the full benchmarks suite takes ~1 minute. +For the quick benchmarks, the running time is only ~15 seconds.

    +

    Version being tested: .

    +
    +

    Time measurement is carried out using Benchmark.js.

    +
    +
    + + + + + + + + + + + + diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/benchmarks.js b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/benchmarks.js new file mode 100644 index 00000000..6ed60ae4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/benchmarks.js @@ -0,0 +1,334 @@ +/* + Copyright (C) 2012 Yusuke Suzuki + Copyright (C) 2011 Ariya Hidayat + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + + +/*jslint browser: true node: true */ +/*global load:true, print:true */ +var setupBenchmarks, + fullFixture, + quickFixture; + +fullFixture = [ + 'Underscore 1.4.1', + 'Backbone 0.9.2', + 'CodeMirror 2.34', + 'MooTools 1.4.1', + 'jQuery 1.8.2', + 'jQuery.Mobile 1.2.0', + 'Angular 1.0.2', + 'three.js r51' +]; + +quickFixture = [ + 'Backbone 0.9.2', + 'jQuery 1.8.2', + 'Angular 1.0.2' +]; + +function slug(name) { + 'use strict'; + return name.toLowerCase().replace(/\.js/g, 'js').replace(/\s/g, '-'); +} + +function kb(bytes) { + 'use strict'; + return (bytes / 1024).toFixed(1); +} + +if (typeof window !== 'undefined') { + // Run all tests in a browser environment. + setupBenchmarks = function () { + 'use strict'; + + function id(i) { + return document.getElementById(i); + } + + function setText(id, str) { + var el = document.getElementById(id); + if (typeof el.innerText === 'string') { + el.innerText = str; + } else { + el.textContent = str; + } + } + + function enableRunButtons() { + id('runquick').disabled = false; + id('runfull').disabled = false; + } + + function disableRunButtons() { + id('runquick').disabled = true; + id('runfull').disabled = true; + } + + function createTable() { + var str = '', + index, + test, + name; + + str += ''; + str += ''; + str += ''; + str += ''; + for (index = 0; index < fullFixture.length; index += 1) { + test = fullFixture[index]; + name = slug(test); + str += ''; + str += ''; + str += ''; + str += ''; + str += ''; + str += ''; + } + str += ''; + str += ''; + str += ''; + str += ''; + str += ''; + str += '
    SourceSize (KiB)Time (ms)Variance
    ' + test + '
    Total
    '; + + id('result').innerHTML = str; + } + + function loadTests() { + + var index = 0, + totalSize = 0; + + function load(test, callback) { + var xhr = new XMLHttpRequest(), + src = '3rdparty/' + test + '.js'; + + window.data = window.data || {}; + window.data[test] = ''; + + try { + xhr.timeout = 30000; + xhr.open('GET', src, true); + + xhr.ontimeout = function () { + setText('status', 'Error: time out while loading ' + test); + callback.apply(); + }; + + xhr.onreadystatechange = function () { + var success = false, + size = 0; + + if (this.readyState === XMLHttpRequest.DONE) { + if (this.status === 200) { + window.data[test] = this.responseText; + size = this.responseText.length; + totalSize += size; + success = true; + } + } + + if (success) { + setText(test + '-size', kb(size)); + } else { + setText('status', 'Please wait. Error loading ' + src); + setText(test + '-size', 'Error'); + } + + callback.apply(); + }; + + xhr.send(null); + } catch (e) { + setText('status', 'Please wait. Error loading ' + src); + callback.apply(); + } + } + + function loadNextTest() { + var test; + + if (index < fullFixture.length) { + test = fullFixture[index]; + index += 1; + setText('status', 'Please wait. Loading ' + test + + ' (' + index + ' of ' + fullFixture.length + ')'); + window.setTimeout(function () { + load(slug(test), loadNextTest); + }, 100); + } else { + setText('total-size', kb(totalSize)); + setText('status', 'Ready.'); + enableRunButtons(); + } + } + + loadNextTest(); + } + + function runBenchmarks(suite) { + + var index = 0, + totalTime = 0; + + function reset() { + var i, name; + for (i = 0; i < fullFixture.length; i += 1) { + name = slug(fullFixture[i]); + setText(name + '-time', ''); + setText(name + '-variance', ''); + } + setText('total-time', ''); + } + + function run() { + var el, test, source, benchmark; + + if (index >= suite.length) { + setText('total-time', (1000 * totalTime).toFixed(1)); + setText('status', 'Ready.'); + enableRunButtons(); + return; + } + + test = slug(suite[index]); + el = id(test); + source = window.data[test]; + setText(test + '-time', 'Running...'); + + // Force the result to be held in this array, thus defeating any + // possible "dead core elimination" optimization. + window.tree = []; + + benchmark = new window.Benchmark(test, function (o) { + var syntax = window.esprima.parse(source); + window.tree.push(syntax.body.length); + }, { + 'onComplete': function () { + setText(this.name + '-time', (1000 * this.stats.mean).toFixed(1)); + setText(this.name + '-variance', (1000 * this.stats.variance).toFixed(1)); + totalTime += this.stats.mean; + } + }); + + window.setTimeout(function () { + benchmark.run(); + index += 1; + window.setTimeout(run, 211); + }, 211); + } + + + disableRunButtons(); + setText('status', 'Please wait. Running benchmarks...'); + + reset(); + run(); + } + + id('runquick').onclick = function () { + runBenchmarks(quickFixture); + }; + + id('runfull').onclick = function () { + runBenchmarks(fullFixture); + }; + + setText('benchmarkjs-version', ' version ' + window.Benchmark.version); + setText('version', window.esprima.version); + + createTable(); + disableRunButtons(); + loadTests(); + }; +} else { + + (function (global) { + 'use strict'; + var Benchmark, + esprima, + dirname, + option, + fs, + readFileSync, + log; + + if (typeof require === 'undefined') { + dirname = 'test'; + load(dirname + '/3rdparty/benchmark.js'); + + load(dirname + '/../esprima.js'); + + Benchmark = global.Benchmark; + esprima = global.esprima; + readFileSync = global.read; + log = print; + } else { + Benchmark = require('./3rdparty/benchmark'); + esprima = require('../esprima'); + fs = require('fs'); + option = process.argv[2]; + readFileSync = function readFileSync(filename) { + return fs.readFileSync(filename, 'utf-8'); + }; + dirname = __dirname; + log = console.log.bind(console); + } + + function runTests(tests) { + var index, + tree = [], + totalTime = 0, + totalSize = 0; + + tests.reduce(function (suite, filename) { + var source = readFileSync(dirname + '/3rdparty/' + slug(filename) + '.js'), + size = source.length; + totalSize += size; + return suite.add(filename, function () { + var syntax = esprima.parse(source); + tree.push(syntax.body.length); + }, { + 'onComplete': function (event, bench) { + log(this.name + + ' size ' + kb(size) + + ' time ' + (1000 * this.stats.mean).toFixed(1) + + ' variance ' + (1000 * 1000 * this.stats.variance).toFixed(1)); + totalTime += this.stats.mean; + } + }); + }, new Benchmark.Suite()).on('complete', function () { + log('Total size ' + kb(totalSize) + + ' time ' + (1000 * totalTime).toFixed(1)); + }).run(); + } + + if (option === 'quick') { + runTests(quickFixture); + } else { + runTests(fullFixture); + } + }(this)); +} +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/compare.html b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/compare.html new file mode 100644 index 00000000..5176647f --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/compare.html @@ -0,0 +1,140 @@ + + + + + + + Esprima: Speed Comparisons + + + + + + + + + + + + + + + + + +
    +
    +

    Speed Comparison keeps everything in perspective

    +
    +
    + + +
    +
    + +

    +

    +

    + +

    Please wait...

    +

    +

    Warning: Since each parser may have a different format for the syntax tree, the speed is not fully comparable (the cost of constructing different result is obviously varying). These tests exist only to ensure that Esprima parser is not ridiculously slow compare to other parsers.

    + + +
    + +
    +
    + +

    More comparison variants will be added in the near future.

    +

    Esprima version: .

    +
    +

    parse-js is the parser used in UglifyJS v1. It's a JavaScript port of the Common LISP version. This test uses parse-js from UglifyJS version 1.3.2 (June 26 2012).

    + +

    Acorn is a compact stand-alone JavaScript parser. This test uses Acorn revision 48bbcd94 (dated Oct 19 2012).

    + +

    Time measurement is carried out using Benchmark.js.

    +
    +
    + + + + + + + + + + + + diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/compare.js b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/compare.js new file mode 100644 index 00000000..62a5f444 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/compare.js @@ -0,0 +1,328 @@ +/* + Copyright (C) 2012 Ariya Hidayat + Copyright (C) 2011 Ariya Hidayat + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*jslint browser: true node: true */ +/*global load:true, print:true */ +var setupBenchmarks, + parsers, + fixtureList, + suite; + +parsers = [ + 'Esprima', + 'parse-js', + 'Acorn' +]; + +fixtureList = [ + 'Underscore 1.4.1', + 'Backbone 0.9.2', + 'CodeMirror 2.34', + 'jQuery 1.8.2' +]; + +function slug(name) { + 'use strict'; + return name.toLowerCase().replace(/\.js/g, 'js').replace(/\s/g, '-'); +} + +function kb(bytes) { + 'use strict'; + return (bytes / 1024).toFixed(1); +} + +function inject(fname) { + 'use strict'; + var head = document.getElementsByTagName('head')[0], + script = document.createElement('script'); + + script.src = fname; + script.type = 'text/javascript'; + head.appendChild(script); +} + +if (typeof window !== 'undefined') { + + // Run all tests in a browser environment. + setupBenchmarks = function () { + 'use strict'; + + function id(i) { + return document.getElementById(i); + } + + function setText(id, str) { + var el = document.getElementById(id); + if (typeof el.innerText === 'string') { + el.innerText = str; + } else { + el.textContent = str; + } + } + + function enableRunButtons() { + id('run').disabled = false; + } + + function disableRunButtons() { + id('run').disabled = true; + } + + function createTable() { + var str = '', + i, + index, + test, + name; + + str += ''; + str += ''; + for (i = 0; i < parsers.length; i += 1) { + str += ''; + } + str += ''; + str += ''; + for (index = 0; index < fixtureList.length; index += 1) { + test = fixtureList[index]; + name = slug(test); + str += ''; + str += ''; + if (window.data && window.data[name]) { + str += ''; + } else { + str += ''; + } + for (i = 0; i < parsers.length; i += 1) { + str += ''; + } + str += ''; + } + str += ''; + str += ''; + for (i = 0; i < parsers.length; i += 1) { + str += ''; + } + str += ''; + str += ''; + str += '
    SourceSize (KiB)' + parsers[i] + '
    ' + test + '' + kb(window.data[name].length) + '
    Total
    '; + + id('result').innerHTML = str; + } + + function loadFixtures() { + + var index = 0, + totalSize = 0; + + function load(test, callback) { + var xhr = new XMLHttpRequest(), + src = '3rdparty/' + test + '.js'; + + window.data = window.data || {}; + window.data[test] = ''; + + try { + xhr.timeout = 30000; + xhr.open('GET', src, true); + + xhr.ontimeout = function () { + setText('status', 'Error: time out while loading ' + test); + callback.apply(); + }; + + xhr.onreadystatechange = function () { + var success = false, + size = 0; + + if (this.readyState === XMLHttpRequest.DONE) { + if (this.status === 200) { + window.data[test] = this.responseText; + size = this.responseText.length; + totalSize += size; + success = true; + } + } + + if (success) { + setText(test + '-size', kb(size)); + } else { + setText('status', 'Please wait. Error loading ' + src); + setText(test + '-size', 'Error'); + } + + callback.apply(); + }; + + xhr.send(null); + } catch (e) { + setText('status', 'Please wait. Error loading ' + src); + callback.apply(); + } + } + + function loadNextTest() { + var test; + + if (index < fixtureList.length) { + test = fixtureList[index]; + index += 1; + setText('status', 'Please wait. Loading ' + test + + ' (' + index + ' of ' + fixtureList.length + ')'); + window.setTimeout(function () { + load(slug(test), loadNextTest); + }, 100); + } else { + setText('total-size', kb(totalSize)); + setText('status', 'Ready.'); + enableRunButtons(); + } + } + + loadNextTest(); + } + + function setupParser() { + var i, j; + + suite = []; + for (i = 0; i < fixtureList.length; i += 1) { + for (j = 0; j < parsers.length; j += 1) { + suite.push({ + fixture: fixtureList[i], + parser: parsers[j] + }); + } + } + + createTable(); + } + + function runBenchmarks() { + + var index = 0, + totalTime = {}; + + function reset() { + var i, name; + for (i = 0; i < suite.length; i += 1) { + name = slug(suite[i].fixture) + '-' + slug(suite[i].parser); + setText(name + '-time', ''); + } + } + + function run() { + var fixture, parser, test, source, fn, benchmark; + + if (index >= suite.length) { + setText('status', 'Ready.'); + enableRunButtons(); + return; + } + + fixture = suite[index].fixture; + parser = suite[index].parser; + + source = window.data[slug(fixture)]; + + test = slug(fixture) + '-' + slug(parser); + setText(test + '-time', 'Running...'); + + setText('status', 'Please wait. Parsing ' + fixture + '...'); + + // Force the result to be held in this array, thus defeating any + // possible "dead code elimination" optimization. + window.tree = []; + + switch (parser) { + case 'Esprima': + fn = function () { + var syntax = window.esprima.parse(source); + window.tree.push(syntax.body.length); + }; + break; + + case 'parse-js': + fn = function () { + var syntax = window.parseJS.parse(source); + window.tree.push(syntax.length); + }; + break; + + case 'Acorn': + fn = function () { + var syntax = window.acorn.parse(source); + window.tree.push(syntax.body.length); + }; + break; + + default: + throw 'Unknown parser type ' + parser; + } + + benchmark = new window.Benchmark(test, fn, { + 'onComplete': function () { + setText(this.name + '-time', (1000 * this.stats.mean).toFixed(1)); + if (!totalTime[parser]) { + totalTime[parser] = this.stats.mean; + } else { + totalTime[parser] += this.stats.mean; + } + setText(slug(parser) + '-total', (1000 * totalTime[parser]).toFixed(1)); + } + }); + + window.setTimeout(function () { + benchmark.run(); + index += 1; + window.setTimeout(run, 211); + }, 211); + } + + + disableRunButtons(); + setText('status', 'Please wait. Running benchmarks...'); + + reset(); + run(); + } + + id('run').onclick = function () { + runBenchmarks(); + }; + + setText('benchmarkjs-version', ' version ' + window.Benchmark.version); + setText('version', window.esprima.version); + + setupParser(); + createTable(); + + disableRunButtons(); + loadFixtures(); + }; +} else { + // TODO + console.log('Not implemented yet!'); +} +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/compat.html b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/compat.html new file mode 100644 index 00000000..d9cd577c --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/compat.html @@ -0,0 +1,115 @@ + + + + + + + Esprima: Compatibility Tests + + + + + + + + + + + +
    +
    +

    Compatibility keeps everyone happy

    +
    +
    + + +
    +
    +
    +
    + +
    +
    Please wait...
    +
    +

    The following tests are to ensure that the syntax tree is compatible to +that produced by Mozilla SpiderMonkey + Parser reflection.

    +

    Version being tested: .

    +
    +
    +
    + + + + + + + + + + + diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/compat.js b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/compat.js new file mode 100644 index 00000000..d9b05240 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/compat.js @@ -0,0 +1,241 @@ +/* + Copyright (C) 2012 Joost-Wim Boekesteijn + Copyright (C) 2011 Ariya Hidayat + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*jslint node: true */ +/*global document: true, window:true, esprima: true, testReflect: true */ + +var runTests; + +function getContext(esprima, reportCase, reportFailure) { + 'use strict'; + + var Reflect, Pattern; + + // Maps Mozilla Reflect object to our Esprima parser. + Reflect = { + parse: function (code) { + var result; + + reportCase(code); + + try { + result = esprima.parse(code); + } catch (error) { + result = error; + } + + return result; + } + }; + + // This is used by Reflect test suite to match a syntax tree. + Pattern = function (obj) { + var pattern; + + // Poor man's deep object cloning. + pattern = JSON.parse(JSON.stringify(obj)); + + // Special handling for regular expression literal since we need to + // convert it to a string literal, otherwise it will be decoded + // as object "{}" and the regular expression would be lost. + if (obj.type && obj.type === 'Literal') { + if (obj.value instanceof RegExp) { + pattern = { + type: obj.type, + value: obj.value.toString() + }; + } + } + + // Special handling for branch statement because SpiderMonkey + // prefers to put the 'alternate' property before 'consequent'. + if (obj.type && obj.type === 'IfStatement') { + pattern = { + type: pattern.type, + test: pattern.test, + consequent: pattern.consequent, + alternate: pattern.alternate + }; + } + + // Special handling for do while statement because SpiderMonkey + // prefers to put the 'test' property before 'body'. + if (obj.type && obj.type === 'DoWhileStatement') { + pattern = { + type: pattern.type, + body: pattern.body, + test: pattern.test + }; + } + + function adjustRegexLiteralAndRaw(key, value) { + if (key === 'value' && value instanceof RegExp) { + value = value.toString(); + } else if (key === 'raw' && typeof value === "string") { + // Ignore Esprima-specific 'raw' property. + return undefined; + } + return value; + } + + if (obj.type && (obj.type === 'Program')) { + pattern.assert = function (tree) { + var actual, expected; + actual = JSON.stringify(tree, adjustRegexLiteralAndRaw, 4); + expected = JSON.stringify(obj, null, 4); + + if (expected !== actual) { + reportFailure(expected, actual); + } + }; + } + + return pattern; + }; + + return { + Reflect: Reflect, + Pattern: Pattern + }; +} + +if (typeof window !== 'undefined') { + // Run all tests in a browser environment. + runTests = function () { + 'use strict'; + + var total = 0, + failures = 0; + + function setText(el, str) { + if (typeof el.innerText === 'string') { + el.innerText = str; + } else { + el.textContent = str; + } + } + + function reportCase(code) { + var report, e; + report = document.getElementById('report'); + e = document.createElement('pre'); + e.setAttribute('class', 'code'); + setText(e, code); + report.appendChild(e); + total += 1; + } + + function reportFailure(expected, actual) { + var report, e; + + failures += 1; + + report = document.getElementById('report'); + + e = document.createElement('p'); + setText(e, 'Expected'); + report.appendChild(e); + + e = document.createElement('pre'); + e.setAttribute('class', 'expected'); + setText(e, expected); + report.appendChild(e); + + e = document.createElement('p'); + setText(e, 'Actual'); + report.appendChild(e); + + e = document.createElement('pre'); + e.setAttribute('class', 'actual'); + setText(e, actual); + report.appendChild(e); + } + + setText(document.getElementById('version'), esprima.version); + + window.setTimeout(function () { + var tick, context = getContext(esprima, reportCase, reportFailure); + + tick = new Date(); + testReflect(context.Reflect, context.Pattern); + tick = (new Date()) - tick; + + if (failures > 0) { + document.getElementById('status').className = 'alert-box alert'; + setText(document.getElementById('status'), total + ' tests. ' + + 'Failures: ' + failures + '. ' + tick + ' ms'); + } else { + document.getElementById('status').className = 'alert-box success'; + setText(document.getElementById('status'), total + ' tests. ' + + 'No failure. ' + tick + ' ms'); + } + }, 11); + }; +} else { + (function (global) { + 'use strict'; + var esprima = require('../esprima'), + tick, + total = 0, + failures = [], + header, + current, + context; + + function reportCase(code) { + total += 1; + current = code; + } + + function reportFailure(expected, actual) { + failures.push({ + source: current, + expected: expected.toString(), + actual: actual.toString() + }); + } + + context = getContext(esprima, reportCase, reportFailure); + + tick = new Date(); + require('./reflect').testReflect(context.Reflect, context.Pattern); + tick = (new Date()) - tick; + + header = total + ' tests. ' + failures.length + ' failures. ' + + tick + ' ms'; + if (failures.length) { + console.error(header); + failures.forEach(function (failure) { + console.error(failure.source + ': Expected\n ' + + failure.expected.split('\n').join('\n ') + + '\nto match\n ' + failure.actual); + }); + } else { + console.log(header); + } + process.exit(failures.length === 0 ? 0 : 1); + }(this)); +} +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/coverage.html b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/coverage.html new file mode 100644 index 00000000..d5075939 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/coverage.html @@ -0,0 +1,110 @@ + + + + + + + Esprima: Unit Tests + + + + + + + + + + + + +
    +
    +

    Coverage Analysis ensures systematic exercise of the parser

    +
    +
    + + +
    +
    +

    Note: This is not a live (in-browser) code coverage report. +The analysis is offline +(using Istanbul).

    + + +
    +
    + + + + + + + + + + + diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/esprima.js.html b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/esprima.js.html new file mode 100644 index 00000000..e7f00f54 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/esprima.js.html @@ -0,0 +1,11752 @@ + + + + Code coverage report for esprima/esprima.js + + + + + + + + +
    +

    Code coverage report for esprima/esprima.js

    +

    + + Statements: 99.72% (1760 / 1765)      + + + Branches: 98.49% (1107 / 1124)      + + + Functions: 100% (154 / 154)      + + + Lines: 99.72% (1760 / 1765)      + +

    +
    +
    +
    
    +
    +
    1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +319 +320 +321 +322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 +431 +432 +433 +434 +435 +436 +437 +438 +439 +440 +441 +442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462 +463 +464 +465 +466 +467 +468 +469 +470 +471 +472 +473 +474 +475 +476 +477 +478 +479 +480 +481 +482 +483 +484 +485 +486 +487 +488 +489 +490 +491 +492 +493 +494 +495 +496 +497 +498 +499 +500 +501 +502 +503 +504 +505 +506 +507 +508 +509 +510 +511 +512 +513 +514 +515 +516 +517 +518 +519 +520 +521 +522 +523 +524 +525 +526 +527 +528 +529 +530 +531 +532 +533 +534 +535 +536 +537 +538 +539 +540 +541 +542 +543 +544 +545 +546 +547 +548 +549 +550 +551 +552 +553 +554 +555 +556 +557 +558 +559 +560 +561 +562 +563 +564 +565 +566 +567 +568 +569 +570 +571 +572 +573 +574 +575 +576 +577 +578 +579 +580 +581 +582 +583 +584 +585 +586 +587 +588 +589 +590 +591 +592 +593 +594 +595 +596 +597 +598 +599 +600 +601 +602 +603 +604 +605 +606 +607 +608 +609 +610 +611 +612 +613 +614 +615 +616 +617 +618 +619 +620 +621 +622 +623 +624 +625 +626 +627 +628 +629 +630 +631 +632 +633 +634 +635 +636 +637 +638 +639 +640 +641 +642 +643 +644 +645 +646 +647 +648 +649 +650 +651 +652 +653 +654 +655 +656 +657 +658 +659 +660 +661 +662 +663 +664 +665 +666 +667 +668 +669 +670 +671 +672 +673 +674 +675 +676 +677 +678 +679 +680 +681 +682 +683 +684 +685 +686 +687 +688 +689 +690 +691 +692 +693 +694 +695 +696 +697 +698 +699 +700 +701 +702 +703 +704 +705 +706 +707 +708 +709 +710 +711 +712 +713 +714 +715 +716 +717 +718 +719 +720 +721 +722 +723 +724 +725 +726 +727 +728 +729 +730 +731 +732 +733 +734 +735 +736 +737 +738 +739 +740 +741 +742 +743 +744 +745 +746 +747 +748 +749 +750 +751 +752 +753 +754 +755 +756 +757 +758 +759 +760 +761 +762 +763 +764 +765 +766 +767 +768 +769 +770 +771 +772 +773 +774 +775 +776 +777 +778 +779 +780 +781 +782 +783 +784 +785 +786 +787 +788 +789 +790 +791 +792 +793 +794 +795 +796 +797 +798 +799 +800 +801 +802 +803 +804 +805 +806 +807 +808 +809 +810 +811 +812 +813 +814 +815 +816 +817 +818 +819 +820 +821 +822 +823 +824 +825 +826 +827 +828 +829 +830 +831 +832 +833 +834 +835 +836 +837 +838 +839 +840 +841 +842 +843 +844 +845 +846 +847 +848 +849 +850 +851 +852 +853 +854 +855 +856 +857 +858 +859 +860 +861 +862 +863 +864 +865 +866 +867 +868 +869 +870 +871 +872 +873 +874 +875 +876 +877 +878 +879 +880 +881 +882 +883 +884 +885 +886 +887 +888 +889 +890 +891 +892 +893 +894 +895 +896 +897 +898 +899 +900 +901 +902 +903 +904 +905 +906 +907 +908 +909 +910 +911 +912 +913 +914 +915 +916 +917 +918 +919 +920 +921 +922 +923 +924 +925 +926 +927 +928 +929 +930 +931 +932 +933 +934 +935 +936 +937 +938 +939 +940 +941 +942 +943 +944 +945 +946 +947 +948 +949 +950 +951 +952 +953 +954 +955 +956 +957 +958 +959 +960 +961 +962 +963 +964 +965 +966 +967 +968 +969 +970 +971 +972 +973 +974 +975 +976 +977 +978 +979 +980 +981 +982 +983 +984 +985 +986 +987 +988 +989 +990 +991 +992 +993 +994 +995 +996 +997 +998 +999 +1000 +1001 +1002 +1003 +1004 +1005 +1006 +1007 +1008 +1009 +1010 +1011 +1012 +1013 +1014 +1015 +1016 +1017 +1018 +1019 +1020 +1021 +1022 +1023 +1024 +1025 +1026 +1027 +1028 +1029 +1030 +1031 +1032 +1033 +1034 +1035 +1036 +1037 +1038 +1039 +1040 +1041 +1042 +1043 +1044 +1045 +1046 +1047 +1048 +1049 +1050 +1051 +1052 +1053 +1054 +1055 +1056 +1057 +1058 +1059 +1060 +1061 +1062 +1063 +1064 +1065 +1066 +1067 +1068 +1069 +1070 +1071 +1072 +1073 +1074 +1075 +1076 +1077 +1078 +1079 +1080 +1081 +1082 +1083 +1084 +1085 +1086 +1087 +1088 +1089 +1090 +1091 +1092 +1093 +1094 +1095 +1096 +1097 +1098 +1099 +1100 +1101 +1102 +1103 +1104 +1105 +1106 +1107 +1108 +1109 +1110 +1111 +1112 +1113 +1114 +1115 +1116 +1117 +1118 +1119 +1120 +1121 +1122 +1123 +1124 +1125 +1126 +1127 +1128 +1129 +1130 +1131 +1132 +1133 +1134 +1135 +1136 +1137 +1138 +1139 +1140 +1141 +1142 +1143 +1144 +1145 +1146 +1147 +1148 +1149 +1150 +1151 +1152 +1153 +1154 +1155 +1156 +1157 +1158 +1159 +1160 +1161 +1162 +1163 +1164 +1165 +1166 +1167 +1168 +1169 +1170 +1171 +1172 +1173 +1174 +1175 +1176 +1177 +1178 +1179 +1180 +1181 +1182 +1183 +1184 +1185 +1186 +1187 +1188 +1189 +1190 +1191 +1192 +1193 +1194 +1195 +1196 +1197 +1198 +1199 +1200 +1201 +1202 +1203 +1204 +1205 +1206 +1207 +1208 +1209 +1210 +1211 +1212 +1213 +1214 +1215 +1216 +1217 +1218 +1219 +1220 +1221 +1222 +1223 +1224 +1225 +1226 +1227 +1228 +1229 +1230 +1231 +1232 +1233 +1234 +1235 +1236 +1237 +1238 +1239 +1240 +1241 +1242 +1243 +1244 +1245 +1246 +1247 +1248 +1249 +1250 +1251 +1252 +1253 +1254 +1255 +1256 +1257 +1258 +1259 +1260 +1261 +1262 +1263 +1264 +1265 +1266 +1267 +1268 +1269 +1270 +1271 +1272 +1273 +1274 +1275 +1276 +1277 +1278 +1279 +1280 +1281 +1282 +1283 +1284 +1285 +1286 +1287 +1288 +1289 +1290 +1291 +1292 +1293 +1294 +1295 +1296 +1297 +1298 +1299 +1300 +1301 +1302 +1303 +1304 +1305 +1306 +1307 +1308 +1309 +1310 +1311 +1312 +1313 +1314 +1315 +1316 +1317 +1318 +1319 +1320 +1321 +1322 +1323 +1324 +1325 +1326 +1327 +1328 +1329 +1330 +1331 +1332 +1333 +1334 +1335 +1336 +1337 +1338 +1339 +1340 +1341 +1342 +1343 +1344 +1345 +1346 +1347 +1348 +1349 +1350 +1351 +1352 +1353 +1354 +1355 +1356 +1357 +1358 +1359 +1360 +1361 +1362 +1363 +1364 +1365 +1366 +1367 +1368 +1369 +1370 +1371 +1372 +1373 +1374 +1375 +1376 +1377 +1378 +1379 +1380 +1381 +1382 +1383 +1384 +1385 +1386 +1387 +1388 +1389 +1390 +1391 +1392 +1393 +1394 +1395 +1396 +1397 +1398 +1399 +1400 +1401 +1402 +1403 +1404 +1405 +1406 +1407 +1408 +1409 +1410 +1411 +1412 +1413 +1414 +1415 +1416 +1417 +1418 +1419 +1420 +1421 +1422 +1423 +1424 +1425 +1426 +1427 +1428 +1429 +1430 +1431 +1432 +1433 +1434 +1435 +1436 +1437 +1438 +1439 +1440 +1441 +1442 +1443 +1444 +1445 +1446 +1447 +1448 +1449 +1450 +1451 +1452 +1453 +1454 +1455 +1456 +1457 +1458 +1459 +1460 +1461 +1462 +1463 +1464 +1465 +1466 +1467 +1468 +1469 +1470 +1471 +1472 +1473 +1474 +1475 +1476 +1477 +1478 +1479 +1480 +1481 +1482 +1483 +1484 +1485 +1486 +1487 +1488 +1489 +1490 +1491 +1492 +1493 +1494 +1495 +1496 +1497 +1498 +1499 +1500 +1501 +1502 +1503 +1504 +1505 +1506 +1507 +1508 +1509 +1510 +1511 +1512 +1513 +1514 +1515 +1516 +1517 +1518 +1519 +1520 +1521 +1522 +1523 +1524 +1525 +1526 +1527 +1528 +1529 +1530 +1531 +1532 +1533 +1534 +1535 +1536 +1537 +1538 +1539 +1540 +1541 +1542 +1543 +1544 +1545 +1546 +1547 +1548 +1549 +1550 +1551 +1552 +1553 +1554 +1555 +1556 +1557 +1558 +1559 +1560 +1561 +1562 +1563 +1564 +1565 +1566 +1567 +1568 +1569 +1570 +1571 +1572 +1573 +1574 +1575 +1576 +1577 +1578 +1579 +1580 +1581 +1582 +1583 +1584 +1585 +1586 +1587 +1588 +1589 +1590 +1591 +1592 +1593 +1594 +1595 +1596 +1597 +1598 +1599 +1600 +1601 +1602 +1603 +1604 +1605 +1606 +1607 +1608 +1609 +1610 +1611 +1612 +1613 +1614 +1615 +1616 +1617 +1618 +1619 +1620 +1621 +1622 +1623 +1624 +1625 +1626 +1627 +1628 +1629 +1630 +1631 +1632 +1633 +1634 +1635 +1636 +1637 +1638 +1639 +1640 +1641 +1642 +1643 +1644 +1645 +1646 +1647 +1648 +1649 +1650 +1651 +1652 +1653 +1654 +1655 +1656 +1657 +1658 +1659 +1660 +1661 +1662 +1663 +1664 +1665 +1666 +1667 +1668 +1669 +1670 +1671 +1672 +1673 +1674 +1675 +1676 +1677 +1678 +1679 +1680 +1681 +1682 +1683 +1684 +1685 +1686 +1687 +1688 +1689 +1690 +1691 +1692 +1693 +1694 +1695 +1696 +1697 +1698 +1699 +1700 +1701 +1702 +1703 +1704 +1705 +1706 +1707 +1708 +1709 +1710 +1711 +1712 +1713 +1714 +1715 +1716 +1717 +1718 +1719 +1720 +1721 +1722 +1723 +1724 +1725 +1726 +1727 +1728 +1729 +1730 +1731 +1732 +1733 +1734 +1735 +1736 +1737 +1738 +1739 +1740 +1741 +1742 +1743 +1744 +1745 +1746 +1747 +1748 +1749 +1750 +1751 +1752 +1753 +1754 +1755 +1756 +1757 +1758 +1759 +1760 +1761 +1762 +1763 +1764 +1765 +1766 +1767 +1768 +1769 +1770 +1771 +1772 +1773 +1774 +1775 +1776 +1777 +1778 +1779 +1780 +1781 +1782 +1783 +1784 +1785 +1786 +1787 +1788 +1789 +1790 +1791 +1792 +1793 +1794 +1795 +1796 +1797 +1798 +1799 +1800 +1801 +1802 +1803 +1804 +1805 +1806 +1807 +1808 +1809 +1810 +1811 +1812 +1813 +1814 +1815 +1816 +1817 +1818 +1819 +1820 +1821 +1822 +1823 +1824 +1825 +1826 +1827 +1828 +1829 +1830 +1831 +1832 +1833 +1834 +1835 +1836 +1837 +1838 +1839 +1840 +1841 +1842 +1843 +1844 +1845 +1846 +1847 +1848 +1849 +1850 +1851 +1852 +1853 +1854 +1855 +1856 +1857 +1858 +1859 +1860 +1861 +1862 +1863 +1864 +1865 +1866 +1867 +1868 +1869 +1870 +1871 +1872 +1873 +1874 +1875 +1876 +1877 +1878 +1879 +1880 +1881 +1882 +1883 +1884 +1885 +1886 +1887 +1888 +1889 +1890 +1891 +1892 +1893 +1894 +1895 +1896 +1897 +1898 +1899 +1900 +1901 +1902 +1903 +1904 +1905 +1906 +1907 +1908 +1909 +1910 +1911 +1912 +1913 +1914 +1915 +1916 +1917 +1918 +1919 +1920 +1921 +1922 +1923 +1924 +1925 +1926 +1927 +1928 +1929 +1930 +1931 +1932 +1933 +1934 +1935 +1936 +1937 +1938 +1939 +1940 +1941 +1942 +1943 +1944 +1945 +1946 +1947 +1948 +1949 +1950 +1951 +1952 +1953 +1954 +1955 +1956 +1957 +1958 +1959 +1960 +1961 +1962 +1963 +1964 +1965 +1966 +1967 +1968 +1969 +1970 +1971 +1972 +1973 +1974 +1975 +1976 +1977 +1978 +1979 +1980 +1981 +1982 +1983 +1984 +1985 +1986 +1987 +1988 +1989 +1990 +1991 +1992 +1993 +1994 +1995 +1996 +1997 +1998 +1999 +2000 +2001 +2002 +2003 +2004 +2005 +2006 +2007 +2008 +2009 +2010 +2011 +2012 +2013 +2014 +2015 +2016 +2017 +2018 +2019 +2020 +2021 +2022 +2023 +2024 +2025 +2026 +2027 +2028 +2029 +2030 +2031 +2032 +2033 +2034 +2035 +2036 +2037 +2038 +2039 +2040 +2041 +2042 +2043 +2044 +2045 +2046 +2047 +2048 +2049 +2050 +2051 +2052 +2053 +2054 +2055 +2056 +2057 +2058 +2059 +2060 +2061 +2062 +2063 +2064 +2065 +2066 +2067 +2068 +2069 +2070 +2071 +2072 +2073 +2074 +2075 +2076 +2077 +2078 +2079 +2080 +2081 +2082 +2083 +2084 +2085 +2086 +2087 +2088 +2089 +2090 +2091 +2092 +2093 +2094 +2095 +2096 +2097 +2098 +2099 +2100 +2101 +2102 +2103 +2104 +2105 +2106 +2107 +2108 +2109 +2110 +2111 +2112 +2113 +2114 +2115 +2116 +2117 +2118 +2119 +2120 +2121 +2122 +2123 +2124 +2125 +2126 +2127 +2128 +2129 +2130 +2131 +2132 +2133 +2134 +2135 +2136 +2137 +2138 +2139 +2140 +2141 +2142 +2143 +2144 +2145 +2146 +2147 +2148 +2149 +2150 +2151 +2152 +2153 +2154 +2155 +2156 +2157 +2158 +2159 +2160 +2161 +2162 +2163 +2164 +2165 +2166 +2167 +2168 +2169 +2170 +2171 +2172 +2173 +2174 +2175 +2176 +2177 +2178 +2179 +2180 +2181 +2182 +2183 +2184 +2185 +2186 +2187 +2188 +2189 +2190 +2191 +2192 +2193 +2194 +2195 +2196 +2197 +2198 +2199 +2200 +2201 +2202 +2203 +2204 +2205 +2206 +2207 +2208 +2209 +2210 +2211 +2212 +2213 +2214 +2215 +2216 +2217 +2218 +2219 +2220 +2221 +2222 +2223 +2224 +2225 +2226 +2227 +2228 +2229 +2230 +2231 +2232 +2233 +2234 +2235 +2236 +2237 +2238 +2239 +2240 +2241 +2242 +2243 +2244 +2245 +2246 +2247 +2248 +2249 +2250 +2251 +2252 +2253 +2254 +2255 +2256 +2257 +2258 +2259 +2260 +2261 +2262 +2263 +2264 +2265 +2266 +2267 +2268 +2269 +2270 +2271 +2272 +2273 +2274 +2275 +2276 +2277 +2278 +2279 +2280 +2281 +2282 +2283 +2284 +2285 +2286 +2287 +2288 +2289 +2290 +2291 +2292 +2293 +2294 +2295 +2296 +2297 +2298 +2299 +2300 +2301 +2302 +2303 +2304 +2305 +2306 +2307 +2308 +2309 +2310 +2311 +2312 +2313 +2314 +2315 +2316 +2317 +2318 +2319 +2320 +2321 +2322 +2323 +2324 +2325 +2326 +2327 +2328 +2329 +2330 +2331 +2332 +2333 +2334 +2335 +2336 +2337 +2338 +2339 +2340 +2341 +2342 +2343 +2344 +2345 +2346 +2347 +2348 +2349 +2350 +2351 +2352 +2353 +2354 +2355 +2356 +2357 +2358 +2359 +2360 +2361 +2362 +2363 +2364 +2365 +2366 +2367 +2368 +2369 +2370 +2371 +2372 +2373 +2374 +2375 +2376 +2377 +2378 +2379 +2380 +2381 +2382 +2383 +2384 +2385 +2386 +2387 +2388 +2389 +2390 +2391 +2392 +2393 +2394 +2395 +2396 +2397 +2398 +2399 +2400 +2401 +2402 +2403 +2404 +2405 +2406 +2407 +2408 +2409 +2410 +2411 +2412 +2413 +2414 +2415 +2416 +2417 +2418 +2419 +2420 +2421 +2422 +2423 +2424 +2425 +2426 +2427 +2428 +2429 +2430 +2431 +2432 +2433 +2434 +2435 +2436 +2437 +2438 +2439 +2440 +2441 +2442 +2443 +2444 +2445 +2446 +2447 +2448 +2449 +2450 +2451 +2452 +2453 +2454 +2455 +2456 +2457 +2458 +2459 +2460 +2461 +2462 +2463 +2464 +2465 +2466 +2467 +2468 +2469 +2470 +2471 +2472 +2473 +2474 +2475 +2476 +2477 +2478 +2479 +2480 +2481 +2482 +2483 +2484 +2485 +2486 +2487 +2488 +2489 +2490 +2491 +2492 +2493 +2494 +2495 +2496 +2497 +2498 +2499 +2500 +2501 +2502 +2503 +2504 +2505 +2506 +2507 +2508 +2509 +2510 +2511 +2512 +2513 +2514 +2515 +2516 +2517 +2518 +2519 +2520 +2521 +2522 +2523 +2524 +2525 +2526 +2527 +2528 +2529 +2530 +2531 +2532 +2533 +2534 +2535 +2536 +2537 +2538 +2539 +2540 +2541 +2542 +2543 +2544 +2545 +2546 +2547 +2548 +2549 +2550 +2551 +2552 +2553 +2554 +2555 +2556 +2557 +2558 +2559 +2560 +2561 +2562 +2563 +2564 +2565 +2566 +2567 +2568 +2569 +2570 +2571 +2572 +2573 +2574 +2575 +2576 +2577 +2578 +2579 +2580 +2581 +2582 +2583 +2584 +2585 +2586 +2587 +2588 +2589 +2590 +2591 +2592 +2593 +2594 +2595 +2596 +2597 +2598 +2599 +2600 +2601 +2602 +2603 +2604 +2605 +2606 +2607 +2608 +2609 +2610 +2611 +2612 +2613 +2614 +2615 +2616 +2617 +2618 +2619 +2620 +2621 +2622 +2623 +2624 +2625 +2626 +2627 +2628 +2629 +2630 +2631 +2632 +2633 +2634 +2635 +2636 +2637 +2638 +2639 +2640 +2641 +2642 +2643 +2644 +2645 +2646 +2647 +2648 +2649 +2650 +2651 +2652 +2653 +2654 +2655 +2656 +2657 +2658 +2659 +2660 +2661 +2662 +2663 +2664 +2665 +2666 +2667 +2668 +2669 +2670 +2671 +2672 +2673 +2674 +2675 +2676 +2677 +2678 +2679 +2680 +2681 +2682 +2683 +2684 +2685 +2686 +2687 +2688 +2689 +2690 +2691 +2692 +2693 +2694 +2695 +2696 +2697 +2698 +2699 +2700 +2701 +2702 +2703 +2704 +2705 +2706 +2707 +2708 +2709 +2710 +2711 +2712 +2713 +2714 +2715 +2716 +2717 +2718 +2719 +2720 +2721 +2722 +2723 +2724 +2725 +2726 +2727 +2728 +2729 +2730 +2731 +2732 +2733 +2734 +2735 +2736 +2737 +2738 +2739 +2740 +2741 +2742 +2743 +2744 +2745 +2746 +2747 +2748 +2749 +2750 +2751 +2752 +2753 +2754 +2755 +2756 +2757 +2758 +2759 +2760 +2761 +2762 +2763 +2764 +2765 +2766 +2767 +2768 +2769 +2770 +2771 +2772 +2773 +2774 +2775 +2776 +2777 +2778 +2779 +2780 +2781 +2782 +2783 +2784 +2785 +2786 +2787 +2788 +2789 +2790 +2791 +2792 +2793 +2794 +2795 +2796 +2797 +2798 +2799 +2800 +2801 +2802 +2803 +2804 +2805 +2806 +2807 +2808 +2809 +2810 +2811 +2812 +2813 +2814 +2815 +2816 +2817 +2818 +2819 +2820 +2821 +2822 +2823 +2824 +2825 +2826 +2827 +2828 +2829 +2830 +2831 +2832 +2833 +2834 +2835 +2836 +2837 +2838 +2839 +2840 +2841 +2842 +2843 +2844 +2845 +2846 +2847 +2848 +2849 +2850 +2851 +2852 +2853 +2854 +2855 +2856 +2857 +2858 +2859 +2860 +2861 +2862 +2863 +2864 +2865 +2866 +2867 +2868 +2869 +2870 +2871 +2872 +2873 +2874 +2875 +2876 +2877 +2878 +2879 +2880 +2881 +2882 +2883 +2884 +2885 +2886 +2887 +2888 +2889 +2890 +2891 +2892 +2893 +2894 +2895 +2896 +2897 +2898 +2899 +2900 +2901 +2902 +2903 +2904 +2905 +2906 +2907 +2908 +2909 +2910 +2911 +2912 +2913 +2914 +2915 +2916 +2917 +2918 +2919 +2920 +2921 +2922 +2923 +2924 +2925 +2926 +2927 +2928 +2929 +2930 +2931 +2932 +2933 +2934 +2935 +2936 +2937 +2938 +2939 +2940 +2941 +2942 +2943 +2944 +2945 +2946 +2947 +2948 +2949 +2950 +2951 +2952 +2953 +2954 +2955 +2956 +2957 +2958 +2959 +2960 +2961 +2962 +2963 +2964 +2965 +2966 +2967 +2968 +2969 +2970 +2971 +2972 +2973 +2974 +2975 +2976 +2977 +2978 +2979 +2980 +2981 +2982 +2983 +2984 +2985 +2986 +2987 +2988 +2989 +2990 +2991 +2992 +2993 +2994 +2995 +2996 +2997 +2998 +2999 +3000 +3001 +3002 +3003 +3004 +3005 +3006 +3007 +3008 +3009 +3010 +3011 +3012 +3013 +3014 +3015 +3016 +3017 +3018 +3019 +3020 +3021 +3022 +3023 +3024 +3025 +3026 +3027 +3028 +3029 +3030 +3031 +3032 +3033 +3034 +3035 +3036 +3037 +3038 +3039 +3040 +3041 +3042 +3043 +3044 +3045 +3046 +3047 +3048 +3049 +3050 +3051 +3052 +3053 +3054 +3055 +3056 +3057 +3058 +3059 +3060 +3061 +3062 +3063 +3064 +3065 +3066 +3067 +3068 +3069 +3070 +3071 +3072 +3073 +3074 +3075 +3076 +3077 +3078 +3079 +3080 +3081 +3082 +3083 +3084 +3085 +3086 +3087 +3088 +3089 +3090 +3091 +3092 +3093 +3094 +3095 +3096 +3097 +3098 +3099 +3100 +3101 +3102 +3103 +3104 +3105 +3106 +3107 +3108 +3109 +3110 +3111 +3112 +3113 +3114 +3115 +3116 +3117 +3118 +3119 +3120 +3121 +3122 +3123 +3124 +3125 +3126 +3127 +3128 +3129 +3130 +3131 +3132 +3133 +3134 +3135 +3136 +3137 +3138 +3139 +3140 +3141 +3142 +3143 +3144 +3145 +3146 +3147 +3148 +3149 +3150 +3151 +3152 +3153 +3154 +3155 +3156 +3157 +3158 +3159 +3160 +3161 +3162 +3163 +3164 +3165 +3166 +3167 +3168 +3169 +3170 +3171 +3172 +3173 +3174 +3175 +3176 +3177 +3178 +3179 +3180 +3181 +3182 +3183 +3184 +3185 +3186 +3187 +3188 +3189 +3190 +3191 +3192 +3193 +3194 +3195 +3196 +3197 +3198 +3199 +3200 +3201 +3202 +3203 +3204 +3205 +3206 +3207 +3208 +3209 +3210 +3211 +3212 +3213 +3214 +3215 +3216 +3217 +3218 +3219 +3220 +3221 +3222 +3223 +3224 +3225 +3226 +3227 +3228 +3229 +3230 +3231 +3232 +3233 +3234 +3235 +3236 +3237 +3238 +3239 +3240 +3241 +3242 +3243 +3244 +3245 +3246 +3247 +3248 +3249 +3250 +3251 +3252 +3253 +3254 +3255 +3256 +3257 +3258 +3259 +3260 +3261 +3262 +3263 +3264 +3265 +3266 +3267 +3268 +3269 +3270 +3271 +3272 +3273 +3274 +3275 +3276 +3277 +3278 +3279 +3280 +3281 +3282 +3283 +3284 +3285 +3286 +3287 +3288 +3289 +3290 +3291 +3292 +3293 +3294 +3295 +3296 +3297 +3298 +3299 +3300 +3301 +3302 +3303 +3304 +3305 +3306 +3307 +3308 +3309 +3310 +3311 +3312 +3313 +3314 +3315 +3316 +3317 +3318 +3319 +3320 +3321 +3322 +3323 +3324 +3325 +3326 +3327 +3328 +3329 +3330 +3331 +3332 +3333 +3334 +3335 +3336 +3337 +3338 +3339 +3340 +3341 +3342 +3343 +3344 +3345 +3346 +3347 +3348 +3349 +3350 +3351 +3352 +3353 +3354 +3355 +3356 +3357 +3358 +3359 +3360 +3361 +3362 +3363 +3364 +3365 +3366 +3367 +3368 +3369 +3370 +3371 +3372 +3373 +3374 +3375 +3376 +3377 +3378 +3379 +3380 +3381 +3382 +3383 +3384 +3385 +3386 +3387 +3388 +3389 +3390 +3391 +3392 +3393 +3394 +3395 +3396 +3397 +3398 +3399 +3400 +3401 +3402 +3403 +3404 +3405 +3406 +3407 +3408 +3409 +3410 +3411 +3412 +3413 +3414 +3415 +3416 +3417 +3418 +3419 +3420 +3421 +3422 +3423 +3424 +3425 +3426 +3427 +3428 +3429 +3430 +3431 +3432 +3433 +3434 +3435 +3436 +3437 +3438 +3439 +3440 +3441 +3442 +3443 +3444 +3445 +3446 +3447 +3448 +3449 +3450 +3451 +3452 +3453 +3454 +3455 +3456 +3457 +3458 +3459 +3460 +3461 +3462 +3463 +3464 +3465 +3466 +3467 +3468 +3469 +3470 +3471 +3472 +3473 +3474 +3475 +3476 +3477 +3478 +3479 +3480 +3481 +3482 +3483 +3484 +3485 +3486 +3487 +3488 +3489 +3490 +3491 +3492 +3493 +3494 +3495 +3496 +3497 +3498 +3499 +3500 +3501 +3502 +3503 +3504 +3505 +3506 +3507 +3508 +3509 +3510 +3511 +3512 +3513 +3514 +3515 +3516 +3517 +3518 +3519 +3520 +3521 +3522 +3523 +3524 +3525 +3526 +3527 +3528 +3529 +3530 +3531 +3532 +3533 +3534 +3535 +3536 +3537 +3538 +3539 +3540 +3541 +3542 +3543 +3544 +3545 +3546 +3547 +3548 +3549 +3550 +3551 +3552 +3553 +3554 +3555 +3556 +3557 +3558 +3559 +3560 +3561 +3562 +3563 +3564 +3565 +3566 +3567 +3568 +3569 +3570 +3571 +3572 +3573 +3574 +3575 +3576 +3577 +3578 +3579 +3580 +3581 +3582 +3583 +3584 +3585 +3586 +3587 +3588 +3589 +3590 +3591 +3592 +3593 +3594 +3595 +3596 +3597 +3598 +3599 +3600 +3601 +3602 +3603 +3604 +3605 +3606 +3607 +3608 +3609 +3610 +3611 +3612 +3613 +3614 +3615 +3616 +3617 +3618 +3619 +3620 +3621 +3622 +3623 +3624 +3625 +3626 +3627 +3628 +3629 +3630 +3631 +3632 +3633 +3634 +3635 +3636 +3637 +3638 +3639 +3640 +3641 +3642 +3643 +3644 +3645 +3646 +3647 +3648 +3649 +3650 +3651 +3652 +3653 +3654 +3655 +3656 +3657 +3658 +3659 +3660 +3661 +3662 +3663 +3664 +3665 +3666 +3667 +3668 +3669 +3670 +3671 +3672 +3673 +3674 +3675 +3676 +3677 +3678 +3679 +3680 +3681 +3682 +3683 +3684 +3685 +3686 +3687 +3688 +3689 +3690 +3691 +3692 +3693 +3694 +3695 +3696 +3697 +3698 +3699 +3700 +3701 +3702 +3703 +3704 +3705 +3706 +3707 +3708 +3709 +3710 +3711 +3712 +3713 +3714 +3715 +3716 +3717 +3718 +3719 +3720 +3721 +3722 +3723 +3724 +3725 +3726 +3727 +3728 +3729 +3730 +3731 +3732 +3733 +3734 +3735 +3736 +3737 +3738 +3739 +3740 +3741 +3742 +3743 +3744 +3745 +3746 +3747 +3748 +3749 +3750 +3751 +3752 +3753 +3754 +3755 +3756 +3757 +3758 +3759 +3760 +3761 +3762 +3763 +3764 +3765 +3766 +3767 +3768 +3769 +3770 +3771 +3772 +3773 +3774 +3775 +3776 +3777 +3778 +3779 +3780 +3781 +3782 +3783 +3784 +3785 +3786 +3787 +3788 +3789 +3790 +3791 +3792 +3793 +3794 +3795 +3796 +3797 +3798 +3799 +3800 +3801 +3802 +3803 +3804 +3805 +3806 +3807 +3808 +3809 +3810 +3811 +3812 +3813 +3814 +3815 +3816 +3817 +3818  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +1 +  +  +  +1 +  +1 +1 +  +  +  +  +1 +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +1 +1 +1 +1 +1 +1 +1 +1 +1 +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +  +  +  +  +  +  +  +  +  +1 +1568 +  +  +  +  +1 +5969 +  +  +1 +224 +  +  +1 +266 +  +  +  +  +  +1 +32604 +  +  +  +  +  +  +  +  +  +1 +32068 +  +  +  +  +1 +9111 +  +  +  +  +  +  +1 +16161 +  +  +  +  +  +  +  +  +  +1 +88 +  +  +  +  +  +  +4 +  +84 +  +  +  +1 +632 +  +  +  +  +  +  +  +  +  +108 +  +524 +  +  +  +1 +611 +  +  +  +  +1 +2798 +44 +  +  +  +  +  +  +2754 +  +177 +  +572 +  +  +381 +  +  +609 +  +  +  +131 +  +  +99 +  +579 +  +12 +  +194 +  +  +  +  +  +1 +24482 +  +24482 +24482 +  +24482 +29971 +  +29971 +318 +318 +39 +39 +2 +  +39 +39 +  +29653 +1020 +64 +2 +  +64 +64 +64 +64 +2 +  +  +956 +956 +8 +  +  +948 +62 +62 +56 +56 +  +  +  +28633 +371 +  +371 +39 +39 +332 +  +68 +68 +68 +2 +  +  +264 +  +28262 +5934 +22328 +117 +117 +2 +  +117 +117 +  +22211 +  +  +  +  +1 +59 +  +59 +59 +174 +152 +152 +  +22 +  +  +37 +  +  +1 +48 +  +48 +48 +  +  +48 +29 +8 +  +21 +21 +21 +12 +  +9 +  +  +28 +28 +28 +3 +  +25 +25 +  +  +25 +19 +19 +4 +  +15 +15 +15 +12 +  +3 +  +  +  +12 +  +  +1 +4174 +  +4174 +4174 +16103 +16103 +  +19 +19 +  +16084 +12235 +  +3849 +  +  +  +4155 +  +  +1 +4203 +  +4203 +  +  +4203 +  +  +  +4167 +1369 +2798 +1440 +1358 +24 +1334 +153 +  +1181 +  +  +4167 +  +  +  +  +  +  +  +  +  +  +  +1 +6341 +  +  +  +  +  +  +  +6341 +  +  +  +  +  +  +  +  +  +  +  +  +  +  +5418 +5418 +  +  +  +  +  +  +  +  +923 +  +  +923 +52 +  +  +  +  +  +  +  +  +  +  +33 +33 +  +  +  +  +  +  +  +  +  +15 +  +  +15 +6 +  +15 +  +  +  +  +  +  +  +4 +  +  +875 +  +  +  +  +875 +875 +875 +  +  +  +875 +9 +3 +3 +  +  +  +  +  +  +  +  +  +  +  +872 +6 +6 +  +  +  +  +  +  +  +  +866 +3 +3 +  +  +  +  +  +  +  +  +863 +3 +3 +  +  +  +  +  +  +  +  +  +  +860 +167 +167 +  +  +  +  +  +  +  +  +693 +677 +677 +  +  +  +  +  +  +  +  +16 +  +  +  +  +1 +611 +  +611 +611 +  +  +611 +611 +611 +608 +608 +  +  +  +608 +102 +32 +32 +62 +62 +7 +  +55 +  +  +32 +  +4 +  +  +28 +7 +7 +4 +  +  +24 +  +  +  +  +  +  +  +70 +29 +29 +41 +41 +20 +  +21 +  +  +29 +20 +20 +8 +  +  +21 +  +  +  +  +  +  +  +  +  +  +41 +4 +  +  +  +543 +733 +419 +419 +  +314 +  +  +  +546 +12 +12 +78 +6 +6 +  +72 +  +  +  +546 +28 +  +28 +28 +20 +  +  +28 +28 +12 +12 +21 +3 +3 +  +18 +  +  +16 +16 +12 +  +16 +  +  +  +530 +391 +16 +  +  +  +514 +  +  +  +  +  +  +  +  +  +  +1 +471 +  +471 +471 +  +  +471 +471 +  +471 +4864 +  +4864 +455 +455 +4409 +121 +121 +115 +  +6 +6 +  +3 +3 +  +3 +3 +  +  +16 +16 +16 +6 +  +10 +10 +  +16 +  +3 +3 +  +3 +3 +  +3 +3 +  +  +78 +62 +  +  +62 +47 +  +  +62 +21 +21 +  +  +  +21 +  +  +12 +  +  +62 +  +16 +  +78 +  +  +6 +6 +3 +  +  +4288 +8 +  +4280 +  +  +  +471 +16 +  +  +455 +  +  +  +  +  +  +  +  +  +1 +51 +  +51 +51 +  +51 +51 +51 +51 +  +51 +247 +247 +247 +112 +25 +  +  +135 +7 +  +7 +4 +  +3 +128 +35 +35 +93 +25 +68 +4 +  +  +  +  +43 +8 +  +  +  +35 +  +35 +35 +42 +42 +3 +  +  +39 +39 +10 +10 +7 +7 +7 +7 +3 +3 +12 +  +  +4 +4 +4 +  +  +3 +  +  +29 +29 +  +  +  +35 +35 +  +8 +  +  +27 +  +27 +  +  +  +  +  +  +1 +67 +  +  +  +  +  +1 +13035 +  +13035 +  +13011 +1385 +  +  +  +  +  +  +  +11626 +  +  +11626 +2496 +  +  +  +9130 +471 +  +  +8659 +4203 +  +  +  +  +4456 +78 +3 +  +75 +  +  +4378 +608 +  +  +3770 +  +  +1 +11067 +  +11067 +11067 +11067 +11067 +  +11067 +  +11059 +11059 +11059 +  +11059 +  +  +1 +1968 +  +1968 +1968 +1968 +1968 +1832 +1832 +1832 +  +  +1 +  +  +  +  +42 +  +  +  +  +  +  +221 +  +  +  +  +  +  +  +  +308 +  +308 +  +  +  +  +  +  +  +  +486 +  +  +  +  +  +  +36 +  +  +  +  +  +  +138 +  +  +  +  +  +  +  +22 +  +  +  +  +  +  +  +6 +  +  +  +  +  +  +  +  +24 +  +  +  +  +  +  +3 +  +  +  +  +  +12 +  +  +  +  +  +  +  +54 +  +  +  +  +  +1289 +  +  +  +  +  +  +30 +  +  +  +  +  +  +  +  +  +15 +  +  +  +  +  +  +  +  +  +47 +  +  +  +  +  +  +  +  +  +  +  +  +158 +  +  +  +  +  +  +  +  +  +  +  +  +2578 +  +  +  +  +  +  +18 +  +  +  +  +  +  +  +  +27 +  +  +  +  +  +  +  +1114 +  +  +  +  +  +  +  +75 +  +  +  +  +  +  +  +  +34 +  +  +  +  +  +  +  +106 +  +  +  +  +  +  +40 +  +  +  +  +  +  +  +  +1093 +  +  +  +  +  +  +214 +  +  +  +  +  +  +  +  +32 +  +  +  +  +  +  +6 +  +  +  +  +  +  +20 +  +  +  +  +  +  +  +12 +  +  +  +  +  +  +  +3 +  +  +  +  +  +18 +  +  +  +  +  +  +25 +  +  +  +  +  +  +  +  +  +63 +28 +  +  +  +  +  +  +35 +  +  +  +  +  +  +  +127 +  +  +  +  +  +  +  +180 +  +  +  +  +  +  +  +54 +  +  +  +  +  +  +  +11 +  +  +  +  +  +  +  +  +  +1 +211 +  +211 +211 +211 +211 +211 +211 +211 +211 +  +211 +  +  +  +  +1 +916 +  +  +  +  +336 +336 +  +  +  +916 +506 +506 +506 +506 +  +410 +410 +410 +410 +  +  +916 +916 +  +  +1 +300 +300 +  +300 +68 +  +232 +  +  +  +  +  +  +  +1 +312 +80 +  +  +232 +16 +  +  +216 +4 +  +  +212 +4 +  +  +208 +88 +4 +84 +44 +4 +  +40 +  +  +  +120 +  +  +  +  +  +1 +4378 +4378 +56 +  +  +  +  +  +  +1 +1225 +1225 +4 +  +  +  +  +  +1 +28095 +  +  +  +  +1 +6064 +  +  +  +  +1 +2367 +  +2367 +824 +  +1543 +1543 +  +  +  +  +  +  +  +  +  +  +  +  +  +1 +1504 +  +  +1504 +552 +552 +  +  +952 +952 +952 +27 +  +  +925 +3 +3 +  +  +922 +28 +  +  +  +  +  +1 +356 +  +  +  +  +1 +50 +  +50 +  +50 +48 +13 +13 +  +35 +  +27 +21 +  +  +  +  +42 +  +42 +  +  +  +  +1 +105 +  +105 +105 +105 +10 +  +97 +97 +  +  +1 +355 +  +  +  +  +355 +28 +10 +  +20 +  +  +327 +  +  +1 +254 +  +254 +  +254 +  +218 +  +  +  +218 +53 +53 +53 +53 +53 +  +165 +56 +56 +56 +56 +4 +  +52 +52 +52 +44 +  +109 +109 +97 +  +36 +8 +  +28 +20 +20 +20 +  +  +  +1 +202 +  +202 +  +202 +254 +  +214 +194 +  +20 +  +214 +  +214 +214 +54 +27 +14 +13 +10 +  +  +27 +14 +13 +10 +  +  +14 +  +160 +  +  +174 +  +174 +78 +  +  +  +106 +  +106 +  +  +  +  +1 +168 +  +168 +  +168 +  +28 +  +28 +  +  +  +  +  +1 +3183 +  +3183 +  +3183 +1373 +  +  +1810 +962 +14 +  +950 +  +  +848 +144 +3 +3 +  +  +141 +129 +  +  +  +716 +113 +113 +113 +  +  +603 +4 +4 +4 +  +  +599 +50 +  +  +549 +202 +  +  +347 +216 +  +  +131 +51 +  +  +80 +  +  +  +  +1 +158 +  +158 +  +158 +60 +73 +69 +56 +  +13 +  +  +  +154 +  +154 +  +  +1 +67 +  +67 +4 +  +  +63 +  +  +1 +67 +  +67 +  +  +1 +12 +  +12 +  +12 +  +12 +  +12 +  +  +1 +34 +  +34 +34 +34 +  +34 +  +  +1 +1743 +  +1743 +  +1311 +89 +62 +58 +27 +3 +3 +  +24 +20 +  +  +  +1303 +  +  +  +1 +14 +  +14 +  +14 +2 +1 +1 +  +1 +1 +  +  +  +14 +  +  +  +  +1 +3183 +  +2743 +821 +  +  +1922 +  +64 +20 +  +  +48 +8 +  +  +40 +40 +  +  +1898 +  +  +  +  +1 +3270 +  +3270 +2440 +  +  +830 +52 +52 +  +52 +20 +  +  +36 +8 +  +  +28 +  +  +778 +20 +20 +20 +  +  +758 +15 +15 +15 +15 +6 +  +11 +  +  +743 +  +  +1 +2691 +  +2691 +789 +  +  +1902 +  +18 +18 +  +  +18 +18 +  +  +21 +21 +  +  +18 +18 +  +  +18 +18 +  +  +  +  +  +15 +15 +  +  +  +  +  +  +39 +39 +  +  +31 +31 +  +  +  +  +21 +21 +  +  +  +92 +92 +  +  +  +  +54 +54 +  +  +1557 +  +  +1902 +  +  +  +  +  +  +  +  +  +  +1 +2859 +  +2859 +2859 +  +2859 +  +2383 +2383 +2383 +2161 +  +222 +222 +  +222 +  +206 +  +  +102 +54 +54 +54 +54 +  +  +  +102 +102 +102 +102 +  +  +206 +  +  +206 +206 +206 +254 +254 +  +206 +  +  +  +  +  +1 +2859 +  +2859 +  +2367 +6 +6 +6 +6 +6 +6 +6 +  +6 +  +  +2367 +  +  +  +  +1 +2859 +  +2859 +2859 +  +2367 +  +257 +20 +  +  +  +237 +12 +  +  +229 +229 +221 +  +  +2110 +  +  +  +  +1 +2240 +  +1756 +6 +  +6 +9 +3 +  +6 +6 +  +  +  +1756 +  +  +  +  +1 +229 +  +  +229 +401 +181 +  +220 +184 +4 +  +180 +  +  +193 +  +  +1 +229 +  +229 +  +229 +  +193 +  +181 +  +  +  +  +1 +915 +  +915 +100 +  +  +819 +  +  +1 +276 +  +  +  +216 +12 +  +  +208 +31 +19 +177 +120 +116 +  +  +180 +  +  +1 +223 +  +223 +276 +180 +127 +  +53 +  +  +127 +  +  +1 +157 +  +157 +  +157 +  +81 +  +81 +  +  +  +  +  +  +1 +41 +  +41 +  +41 +  +21 +  +21 +  +  +  +  +1 +54 +54 +  +  +  +  +1 +198 +58 +58 +  +  +  +  +1 +38 +  +38 +  +38 +  +34 +  +34 +  +34 +  +22 +7 +7 +  +15 +  +  +18 +  +  +  +  +1 +20 +  +20 +  +20 +20 +  +20 +  +16 +  +16 +  +12 +  +12 +  +12 +  +12 +3 +  +  +12 +  +  +1 +86 +  +86 +  +86 +  +86 +  +86 +  +86 +86 +  +86 +  +54 +  +54 +  +  +1 +25 +  +  +25 +  +  +1 +69 +  +69 +  +69 +  +69 +  +69 +13 +  +56 +25 +25 +25 +  +25 +12 +12 +12 +12 +  +  +31 +31 +31 +  +31 +  +15 +12 +  +  +3 +3 +3 +3 +  +  +  +44 +29 +  +  +  +49 +  +34 +9 +  +34 +  +34 +6 +  +  +  +49 +  +49 +49 +  +49 +  +45 +  +45 +  +  +  +  +  +  +1 +52 +  +52 +  +  +52 +11 +  +11 +8 +  +  +3 +  +  +41 +13 +4 +  +  +9 +  +  +28 +17 +  +17 +17 +8 +  +  +  +20 +  +16 +4 +  +  +12 +  +  +  +  +1 +60 +  +60 +  +  +60 +10 +  +10 +4 +  +  +6 +  +  +50 +13 +4 +  +  +9 +  +  +37 +23 +  +23 +23 +8 +  +  +  +29 +  +25 +4 +  +  +21 +  +  +  +  +1 +36 +  +36 +  +36 +6 +  +  +  +32 +21 +12 +12 +12 +  +  +  +20 +9 +  +  +11 +8 +3 +  +  +  +11 +  +11 +  +  +  +  +1 +19 +  +19 +6 +  +  +15 +  +15 +  +15 +  +15 +  +15 +  +11 +  +  +  +  +1 +24 +  +  +  +24 +15 +15 +  +9 +9 +  +24 +  +24 +42 +20 +  +22 +18 +  +  +20 +  +  +1 +20 +  +20 +  +20 +  +20 +  +20 +  +20 +  +20 +3 +3 +  +  +17 +  +17 +17 +17 +  +17 +33 +9 +  +24 +20 +11 +4 +  +7 +  +16 +  +  +9 +  +9 +  +9 +  +  +  +  +1 +30 +  +30 +  +30 +4 +  +  +26 +  +18 +  +18 +  +  +  +  +1 +34 +  +34 +  +34 +34 +4 +  +  +30 +  +30 +12 +  +  +22 +22 +22 +  +  +1 +41 +  +41 +  +41 +  +41 +34 +  +  +29 +6 +6 +  +  +29 +4 +  +  +25 +  +  +  +  +1 +3 +  +3 +  +3 +  +  +  +  +1 +2576 +  +  +  +  +2576 +24 +  +  +2552 +548 +  +54 +  +160 +  +198 +  +136 +  +  +  +2140 +685 +  +60 +  +52 +  +3 +  +20 +  +69 +  +3 +  +38 +  +36 +  +20 +  +30 +  +41 +  +157 +  +86 +  +19 +  +51 +  +  +  +1506 +  +  +1310 +59 +  +59 +59 +8 +  +  +51 +51 +27 +27 +  +  +1251 +  +1231 +  +  +  +  +1 +513 +  +  +513 +  +513 +780 +494 +  +286 +  +286 +278 +278 +  +3 +  +275 +275 +261 +261 +10 +  +  +14 +10 +  +  +  +  +497 +497 +497 +497 +  +497 +497 +497 +497 +  +497 +590 +305 +  +285 +97 +4 +  +93 +  +  +309 +  +305 +305 +305 +305 +  +305 +  +  +1 +424 +424 +  +424 +111 +111 +144 +144 +128 +128 +52 +20 +20 +  +52 +16 +16 +  +76 +68 +16 +16 +52 +12 +12 +40 +14 +14 +  +  +128 +128 +128 +95 +  +33 +  +  +  +408 +  +408 +  +  +  +  +  +  +  +1 +335 +  +335 +335 +335 +315 +40 +12 +  +  +275 +25 +25 +250 +4 +4 +  +  +  +307 +291 +291 +291 +291 +49 +  +  +291 +291 +107 +44 +  +63 +22 +  +47 +  +47 +  +  +1 +129 +  +129 +  +129 +68 +68 +68 +32 +16 +  +  +36 +14 +14 +22 +4 +4 +  +  +  +  +117 +117 +117 +117 +117 +29 +  +  +117 +117 +93 +24 +  +69 +14 +  +61 +  +61 +  +  +  +  +1 +2677 +981 +  +  +41 +  +332 +  +608 +  +  +  +1696 +1684 +  +  +  +1 +1805 +  +1805 +1874 +1874 +1728 +  +  +146 +146 +146 +  +3 +  +143 +143 +80 +80 +6 +  +  +63 +30 +  +  +  +  +1801 +1740 +1032 +4 +  +1028 +  +1093 +  +  +1 +1941 +1941 +1941 +1805 +1093 +  +  +  +  +  +1 +99 +  +  +  +  +  +99 +31 +22 +  +  +  +77 +  +  +  +  +  +  +  +1 +3357 +  +3357 +3357 +3357 +  +3357 +5299 +  +5299 +391 +391 +29 +  +  +  +29 +29 +29 +2 +  +29 +29 +29 +362 +9 +9 +9 +  +  +  +9 +  +353 +  +4908 +431 +34 +5 +5 +  +29 +  +34 +34 +34 +34 +2 +  +  +397 +397 +8 +  +389 +389 +64 +64 +58 +58 +58 +58 +  +  +  +58 +58 +  +  +  +4477 +135 +135 +41 +  +  +  +  +  +41 +41 +41 +41 +3 +  +  +  +3 +3 +  +94 +70 +70 +70 +70 +  +  +  +  +  +70 +2 +  +  +24 +  +4342 +1242 +3100 +39 +39 +2 +  +39 +39 +  +3061 +  +  +  +  +1 +54 +  +54 +63 +63 +  +  +  +63 +38 +  +63 +36 +  +63 +  +  +54 +  +  +1 +168 +  +168 +168 +168 +  +  +  +  +  +  +168 +168 +  +  +  +  +168 +123 +123 +123 +  +  +  +  +  +  +  +168 +  +  +1 +24 +  +24 +  +24 +24 +  +  +  +  +  +  +24 +24 +  +  +  +  +  +24 +24 +24 +24 +24 +  +  +  +  +24 +  +  +  +  +  +  +24 +  +  +1 +45 +  +45 +123 +123 +  +  +  +123 +72 +  +123 +72 +  +123 +  +  +45 +  +  +1 +13398 +  +13398 +13398 +  +  +  +  +  +  +  +  +  +  +13398 +12068 +12068 +12068 +  +  +13398 +48 +48 +  +48 +48 +  +  +  +  +  +  +  +  +  +  +  +  +13398 +4598 +4574 +  +4598 +4574 +  +  +  +  +  +  +  +  +  +  +  +  +13398 +  +  +1 +48 +  +48 +48 +48 +  +48 +  +48 +  +48 +48 +  +48 +  +  +1 +20 +  +20 +20 +  +20 +  +20 +4 +2 +2 +2 +2 +  +2 +2 +2 +2 +  +  +  +20 +  +  +1 +1440 +  +1440 +1440 +  +1440 +  +1440 +126 +80 +80 +80 +80 +46 +6 +6 +6 +6 +  +40 +40 +40 +40 +  +  +  +1440 +  +  +1 +20890 +  +20890 +20890 +50620 +50524 +50524 +30380 +  +20144 +  +  +  +20890 +  +  +1 +  +746 +  +19396 +13442 +  +  +  +19396 +776 +  +776 +152 +  +776 +128 +  +  +776 +776 +24 +24 +24 +752 +66 +66 +66 +  +  +776 +776 +24 +24 +24 +  +  +  +752 +66 +  +  +  +  +  +  +  +19396 +11890 +  +11890 +  +11890 +11890 +11890 +  +11890 +4444 +  +  +11890 +24 +  +  +11890 +496 +  +  +11890 +  +  +  +  +1 +  +1941 +  +1941 +478 +478 +  +  +1941 +  +746 +746 +746 +746 +746 +746 +  +746 +  +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +  +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +  +  +1941 +45 +45 +  +45 +45 +  +  +  +1 +1941 +478 +  +  +1941 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +746 +  +  +1941 +45 +45 +  +  +  +1 +1941 +  +1941 +1941 +7 +  +  +1941 +1941 +1941 +1941 +1941 +1941 +1941 +1941 +  +  +  +  +  +  +  +1941 +1941 +1933 +1933 +  +1933 +45 +  +1933 +478 +  +1933 +68 +  +  +  +1941 +1938 +  +  +  +  +  +  +  +  +  +1941 +1941 +1941 +1093 +54 +54 +  +1093 +45 +45 +  +1093 +68 +  +1093 +746 +  +  +848 +  +1941 +1941 +  +  +1093 +  +  +  +1 +  +1 +  +  +1 +1 +  +1 +1 +  +  +1 +40 +40 +  +  +  +1 +1 +  +  +1 +  +  +  +  + 
    /*
    +  Copyright (C) 2012 Ariya Hidayat <ariya.hidayat@gmail.com>
    +  Copyright (C) 2012 Mathias Bynens <mathias@qiwi.be>
    +  Copyright (C) 2012 Joost-Wim Boekesteijn <joost-wim@boekesteijn.nl>
    +  Copyright (C) 2012 Kris Kowal <kris.kowal@cixar.com>
    +  Copyright (C) 2012 Yusuke Suzuki <utatane.tea@gmail.com>
    +  Copyright (C) 2012 Arpad Borsos <arpad.borsos@googlemail.com>
    +  Copyright (C) 2011 Ariya Hidayat <ariya.hidayat@gmail.com>
    + 
    +  Redistribution and use in source and binary forms, with or without
    +  modification, are permitted provided that the following conditions are met:
    + 
    +    * Redistributions of source code must retain the above copyright
    +      notice, this list of conditions and the following disclaimer.
    +    * Redistributions in binary form must reproduce the above copyright
    +      notice, this list of conditions and the following disclaimer in the
    +      documentation and/or other materials provided with the distribution.
    + 
    +  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
    +  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
    +  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
    +  ARE DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
    +  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
    +  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
    +  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    +  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
    +  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
    +  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    +*/
    + 
    +/*jslint bitwise:true plusplus:true */
    +/*global esprima:true, define:true, exports:true, window: true,
    +throwError: true, generateStatement: true, peek: true,
    +parseAssignmentExpression: true, parseBlock: true, parseExpression: true,
    +parseFunctionDeclaration: true, parseFunctionExpression: true,
    +parseFunctionSourceElements: true, parseVariableIdentifier: true,
    +parseLeftHandSideExpression: true,
    +parseStatement: true, parseSourceElement: true */
    + 
    +(function (root, factory) {
    +    'use strict';
    + 
    +    // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js,
    +    // Rhino, and plain browser loading.
    +    Iif (typeof define === 'function' && define.amd) {
    +        define(['exports'], factory);
    +    } else Eif (typeof exports !== 'undefined') {
    +        factory(exports);
    +    } else {
    +        factory((root.esprima = {}));
    +    }
    +}(this, function (exports) {
    +    'use strict';
    + 
    +    var Token,
    +        TokenName,
    +        Syntax,
    +        PropertyKind,
    +        Messages,
    +        Regex,
    +        SyntaxTreeDelegate,
    +        source,
    +        strict,
    +        index,
    +        lineNumber,
    +        lineStart,
    +        length,
    +        delegate,
    +        lookahead,
    +        state,
    +        extra;
    + 
    +    Token = {
    +        BooleanLiteral: 1,
    +        EOF: 2,
    +        Identifier: 3,
    +        Keyword: 4,
    +        NullLiteral: 5,
    +        NumericLiteral: 6,
    +        Punctuator: 7,
    +        StringLiteral: 8
    +    };
    + 
    +    TokenName = {};
    +    TokenName[Token.BooleanLiteral] = 'Boolean';
    +    TokenName[Token.EOF] = '<end>';
    +    TokenName[Token.Identifier] = 'Identifier';
    +    TokenName[Token.Keyword] = 'Keyword';
    +    TokenName[Token.NullLiteral] = 'Null';
    +    TokenName[Token.NumericLiteral] = 'Numeric';
    +    TokenName[Token.Punctuator] = 'Punctuator';
    +    TokenName[Token.StringLiteral] = 'String';
    + 
    +    Syntax = {
    +        AssignmentExpression: 'AssignmentExpression',
    +        ArrayExpression: 'ArrayExpression',
    +        BlockStatement: 'BlockStatement',
    +        BinaryExpression: 'BinaryExpression',
    +        BreakStatement: 'BreakStatement',
    +        CallExpression: 'CallExpression',
    +        CatchClause: 'CatchClause',
    +        ConditionalExpression: 'ConditionalExpression',
    +        ContinueStatement: 'ContinueStatement',
    +        DoWhileStatement: 'DoWhileStatement',
    +        DebuggerStatement: 'DebuggerStatement',
    +        EmptyStatement: 'EmptyStatement',
    +        ExpressionStatement: 'ExpressionStatement',
    +        ForStatement: 'ForStatement',
    +        ForInStatement: 'ForInStatement',
    +        FunctionDeclaration: 'FunctionDeclaration',
    +        FunctionExpression: 'FunctionExpression',
    +        Identifier: 'Identifier',
    +        IfStatement: 'IfStatement',
    +        Literal: 'Literal',
    +        LabeledStatement: 'LabeledStatement',
    +        LogicalExpression: 'LogicalExpression',
    +        MemberExpression: 'MemberExpression',
    +        NewExpression: 'NewExpression',
    +        ObjectExpression: 'ObjectExpression',
    +        Program: 'Program',
    +        Property: 'Property',
    +        ReturnStatement: 'ReturnStatement',
    +        SequenceExpression: 'SequenceExpression',
    +        SwitchStatement: 'SwitchStatement',
    +        SwitchCase: 'SwitchCase',
    +        ThisExpression: 'ThisExpression',
    +        ThrowStatement: 'ThrowStatement',
    +        TryStatement: 'TryStatement',
    +        UnaryExpression: 'UnaryExpression',
    +        UpdateExpression: 'UpdateExpression',
    +        VariableDeclaration: 'VariableDeclaration',
    +        VariableDeclarator: 'VariableDeclarator',
    +        WhileStatement: 'WhileStatement',
    +        WithStatement: 'WithStatement'
    +    };
    + 
    +    PropertyKind = {
    +        Data: 1,
    +        Get: 2,
    +        Set: 4
    +    };
    + 
    +    // Error messages should be identical to V8.
    +    Messages = {
    +        UnexpectedToken:  'Unexpected token %0',
    +        UnexpectedNumber:  'Unexpected number',
    +        UnexpectedString:  'Unexpected string',
    +        UnexpectedIdentifier:  'Unexpected identifier',
    +        UnexpectedReserved:  'Unexpected reserved word',
    +        UnexpectedEOS:  'Unexpected end of input',
    +        NewlineAfterThrow:  'Illegal newline after throw',
    +        InvalidRegExp: 'Invalid regular expression',
    +        UnterminatedRegExp:  'Invalid regular expression: missing /',
    +        InvalidLHSInAssignment:  'Invalid left-hand side in assignment',
    +        InvalidLHSInForIn:  'Invalid left-hand side in for-in',
    +        MultipleDefaultsInSwitch: 'More than one default clause in switch statement',
    +        NoCatchOrFinally:  'Missing catch or finally after try',
    +        UnknownLabel: 'Undefined label \'%0\'',
    +        Redeclaration: '%0 \'%1\' has already been declared',
    +        IllegalContinue: 'Illegal continue statement',
    +        IllegalBreak: 'Illegal break statement',
    +        IllegalReturn: 'Illegal return statement',
    +        StrictModeWith:  'Strict mode code may not include a with statement',
    +        StrictCatchVariable:  'Catch variable may not be eval or arguments in strict mode',
    +        StrictVarName:  'Variable name may not be eval or arguments in strict mode',
    +        StrictParamName:  'Parameter name eval or arguments is not allowed in strict mode',
    +        StrictParamDupe: 'Strict mode function may not have duplicate parameter names',
    +        StrictFunctionName:  'Function name may not be eval or arguments in strict mode',
    +        StrictOctalLiteral:  'Octal literals are not allowed in strict mode.',
    +        StrictDelete:  'Delete of an unqualified identifier in strict mode.',
    +        StrictDuplicateProperty:  'Duplicate data property in object literal not allowed in strict mode',
    +        AccessorDataProperty:  'Object literal may not have data and accessor property with the same name',
    +        AccessorGetSet:  'Object literal may not have multiple get/set accessors with the same name',
    +        StrictLHSAssignment:  'Assignment to eval or arguments is not allowed in strict mode',
    +        StrictLHSPostfix:  'Postfix increment/decrement may not have eval or arguments operand in strict mode',
    +        StrictLHSPrefix:  'Prefix increment/decrement may not have eval or arguments operand in strict mode',
    +        StrictReservedWord:  'Use of future reserved word in strict mode'
    +    };
    + 
    +    // See also tools/generate-unicode-regex.py.
    +    Regex = {
    +        NonAsciiIdentifierStart: new RegExp('[\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]'),
    +        NonAsciiIdentifierPart: new RegExp('[\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0300-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u0483-\u0487\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u05d0-\u05ea\u05f0-\u05f2\u0610-\u061a\u0620-\u0669\u066e-\u06d3\u06d5-\u06dc\u06df-\u06e8\u06ea-\u06fc\u06ff\u0710-\u074a\u074d-\u07b1\u07c0-\u07f5\u07fa\u0800-\u082d\u0840-\u085b\u08a0\u08a2-\u08ac\u08e4-\u08fe\u0900-\u0963\u0966-\u096f\u0971-\u0977\u0979-\u097f\u0981-\u0983\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bc-\u09c4\u09c7\u09c8\u09cb-\u09ce\u09d7\u09dc\u09dd\u09df-\u09e3\u09e6-\u09f1\u0a01-\u0a03\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a59-\u0a5c\u0a5e\u0a66-\u0a75\u0a81-\u0a83\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abc-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ad0\u0ae0-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3c-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5c\u0b5d\u0b5f-\u0b63\u0b66-\u0b6f\u0b71\u0b82\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd0\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c58\u0c59\u0c60-\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbc-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0cde\u0ce0-\u0ce3\u0ce6-\u0cef\u0cf1\u0cf2\u0d02\u0d03\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d-\u0d44\u0d46-\u0d48\u0d4a-\u0d4e\u0d57\u0d60-\u0d63\u0d66-\u0d6f\u0d7a-\u0d7f\u0d82\u0d83\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e01-\u0e3a\u0e40-\u0e4e\u0e50-\u0e59\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb9\u0ebb-\u0ebd\u0ec0-\u0ec4\u0ec6\u0ec8-\u0ecd\u0ed0-\u0ed9\u0edc-\u0edf\u0f00\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e-\u0f47\u0f49-\u0f6c\u0f71-\u0f84\u0f86-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1049\u1050-\u109d\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u135d-\u135f\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176c\u176e-\u1770\u1772\u1773\u1780-\u17d3\u17d7\u17dc\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1820-\u1877\u1880-\u18aa\u18b0-\u18f5\u1900-\u191c\u1920-\u192b\u1930-\u193b\u1946-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u19d0-\u19d9\u1a00-\u1a1b\u1a20-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1aa7\u1b00-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1bf3\u1c00-\u1c37\u1c40-\u1c49\u1c4d-\u1c7d\u1cd0-\u1cd2\u1cd4-\u1cf6\u1d00-\u1de6\u1dfc-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u200c\u200d\u203f\u2040\u2054\u2071\u207f\u2090-\u209c\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d7f-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2de0-\u2dff\u2e2f\u3005-\u3007\u3021-\u302f\u3031-\u3035\u3038-\u303c\u3041-\u3096\u3099\u309a\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua62b\ua640-\ua66f\ua674-\ua67d\ua67f-\ua697\ua69f-\ua6f1\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua827\ua840-\ua873\ua880-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f7\ua8fb\ua900-\ua92d\ua930-\ua953\ua960-\ua97c\ua980-\ua9c0\ua9cf-\ua9d9\uaa00-\uaa36\uaa40-\uaa4d\uaa50-\uaa59\uaa60-\uaa76\uaa7a\uaa7b\uaa80-\uaac2\uaadb-\uaadd\uaae0-\uaaef\uaaf2-\uaaf6\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabea\uabec\uabed\uabf0-\uabf9\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\ufe70-\ufe74\ufe76-\ufefc\uff10-\uff19\uff21-\uff3a\uff3f\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]')
    +    };
    + 
    +    // Ensure the condition is true, otherwise throw an error.
    +    // This is only to have a better contract semantic, i.e. another safety net
    +    // to catch a logic error. The condition shall be fulfilled in normal case.
    +    // Do NOT use this to enforce a certain condition on any user input.
    + 
    +    function assert(condition, message) {
    +        Iif (!condition) {
    +            throw new Error('ASSERT: ' + message);
    +        }
    +    }
    + 
    +    function isDecimalDigit(ch) {
    +        return (ch >= 48 && ch <= 57);   // 0..9
    +    }
    + 
    +    function isHexDigit(ch) {
    +        return '0123456789abcdefABCDEF'.indexOf(ch) >= 0;
    +    }
    + 
    +    function isOctalDigit(ch) {
    +        return '01234567'.indexOf(ch) >= 0;
    +    }
    + 
    + 
    +    // 7.2 White Space
    + 
    +    function isWhiteSpace(ch) {
    +        return (ch === 32) ||  // space
    +            (ch === 9) ||      // tab
    +            (ch === 0xB) ||
    +            (ch === 0xC) ||
    +            (ch === 0xA0) ||
    +            (ch >= 0x1680 && '\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\uFEFF'.indexOf(String.fromCharCode(ch)) > 0);
    +    }
    + 
    +    // 7.3 Line Terminators
    + 
    +    function isLineTerminator(ch) {
    +        return (ch === 10) || (ch === 13) || (ch === 0x2028) || (ch === 0x2029);
    +    }
    + 
    +    // 7.6 Identifier Names and Identifiers
    + 
    +    function isIdentifierStart(ch) {
    +        return (ch === 36) || (ch === 95) ||  // $ (dollar) and _ (underscore)
    +            (ch >= 65 && ch <= 90) ||         // A..Z
    +            (ch >= 97 && ch <= 122) ||        // a..z
    +            (ch === 92) ||                    // \ (backslash)
    +            ((ch >= 0x80) && Regex.NonAsciiIdentifierStart.test(String.fromCharCode(ch)));
    +    }
    + 
    +    function isIdentifierPart(ch) {
    +        return (ch === 36) || (ch === 95) ||  // $ (dollar) and _ (underscore)
    +            (ch >= 65 && ch <= 90) ||         // A..Z
    +            (ch >= 97 && ch <= 122) ||        // a..z
    +            (ch >= 48 && ch <= 57) ||         // 0..9
    +            (ch === 92) ||                    // \ (backslash)
    +            ((ch >= 0x80) && Regex.NonAsciiIdentifierPart.test(String.fromCharCode(ch)));
    +    }
    + 
    +    // 7.6.1.2 Future Reserved Words
    + 
    +    function isFutureReservedWord(id) {
    +        switch (id) {
    +        case 'class':
    +        case 'enum':
    +        case 'export':
    +        case 'extends':
    +        case 'import':
    +        case 'super':
    +            return true;
    +        default:
    +            return false;
    +        }
    +    }
    + 
    +    function isStrictModeReservedWord(id) {
    +        switch (id) {
    +        case 'implements':
    +        case 'interface':
    +        case 'package':
    +        case 'private':
    +        case 'protected':
    +        case 'public':
    +        case 'static':
    +        case 'yield':
    +        case 'let':
    +            return true;
    +        default:
    +            return false;
    +        }
    +    }
    + 
    +    function isRestrictedWord(id) {
    +        return id === 'eval' || id === 'arguments';
    +    }
    + 
    +    // 7.6.1.1 Keywords
    + 
    +    function isKeyword(id) {
    +        if (strict && isStrictModeReservedWord(id)) {
    +            return true;
    +        }
    + 
    +        // 'const' is specialized as Keyword in V8.
    +        // 'yield' and 'let' are for compatiblity with SpiderMonkey and ES.next.
    +        // Some others are from future reserved words.
    + 
    +        switch (id.length) {
    +        case 2:
    +            return (id === 'if') || (id === 'in') || (id === 'do');
    +        case 3:
    +            return (id === 'var') || (id === 'for') || (id === 'new') ||
    +                (id === 'try') || (id === 'let');
    +        case 4:
    +            return (id === 'this') || (id === 'else') || (id === 'case') ||
    +                (id === 'void') || (id === 'with') || (id === 'enum');
    +        case 5:
    +            return (id === 'while') || (id === 'break') || (id === 'catch') ||
    +                (id === 'throw') || (id === 'const') || (id === 'yield') ||
    +                (id === 'class') || (id === 'super');
    +        case 6:
    +            return (id === 'return') || (id === 'typeof') || (id === 'delete') ||
    +                (id === 'switch') || (id === 'export') || (id === 'import');
    +        case 7:
    +            return (id === 'default') || (id === 'finally') || (id === 'extends');
    +        case 8:
    +            return (id === 'function') || (id === 'continue') || (id === 'debugger');
    +        case 10:
    +            return (id === 'instanceof');
    +        default:
    +            return false;
    +        }
    +    }
    + 
    +    // 7.4 Comments
    + 
    +    function skipComment() {
    +        var ch, blockComment, lineComment;
    + 
    +        blockComment = false;
    +        lineComment = false;
    + 
    +        while (index < length) {
    +            ch = source.charCodeAt(index);
    + 
    +            if (lineComment) {
    +                ++index;
    +                if (isLineTerminator(ch)) {
    +                    lineComment = false;
    +                    if (ch === 13 && source.charCodeAt(index) === 10) {
    +                        ++index;
    +                    }
    +                    ++lineNumber;
    +                    lineStart = index;
    +                }
    +            } else if (blockComment) {
    +                if (isLineTerminator(ch)) {
    +                    if (ch === 13 && source.charCodeAt(index + 1) === 10) {
    +                        ++index;
    +                    }
    +                    ++lineNumber;
    +                    ++index;
    +                    lineStart = index;
    +                    if (index >= length) {
    +                        throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +                    }
    +                } else {
    +                    ch = source.charCodeAt(index++);
    +                    if (index >= length) {
    +                        throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +                    }
    +                    // Block comment ends with '*/' (char #42, char #47).
    +                    if (ch === 42) {
    +                        ch = source.charCodeAt(index);
    +                        if (ch === 47) {
    +                            ++index;
    +                            blockComment = false;
    +                        }
    +                    }
    +                }
    +            } else if (ch === 47) {
    +                ch = source.charCodeAt(index + 1);
    +                // Line comment starts with '//' (char #47, char #47).
    +                if (ch === 47) {
    +                    index += 2;
    +                    lineComment = true;
    +                } else if (ch === 42) {
    +                    // Block comment starts with '/*' (char #47, char #42).
    +                    index += 2;
    +                    blockComment = true;
    +                    if (index >= length) {
    +                        throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +                    }
    +                } else {
    +                    break;
    +                }
    +            } else if (isWhiteSpace(ch)) {
    +                ++index;
    +            } else if (isLineTerminator(ch)) {
    +                ++index;
    +                if (ch === 13 && source.charCodeAt(index) === 10) {
    +                    ++index;
    +                }
    +                ++lineNumber;
    +                lineStart = index;
    +            } else {
    +                break;
    +            }
    +        }
    +    }
    + 
    +    function scanHexEscape(prefix) {
    +        var i, len, ch, code = 0;
    + 
    +        len = (prefix === 'u') ? 4 : 2;
    +        for (i = 0; i < len; ++i) {
    +            if (index < length && isHexDigit(source[index])) {
    +                ch = source[index++];
    +                code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase());
    +            } else {
    +                return '';
    +            }
    +        }
    +        return String.fromCharCode(code);
    +    }
    + 
    +    function getEscapedIdentifier() {
    +        var ch, id;
    + 
    +        ch = source.charCodeAt(index++);
    +        id = String.fromCharCode(ch);
    + 
    +        // '\u' (char #92, char #117) denotes an escaped character.
    +        if (ch === 92) {
    +            if (source.charCodeAt(index) !== 117) {
    +                throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +            }
    +            ++index;
    +            ch = scanHexEscape('u');
    +            if (!ch || ch === '\\' || !isIdentifierStart(ch.charCodeAt(0))) {
    +                throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +            }
    +            id = ch;
    +        }
    + 
    +        while (index < length) {
    +            ch = source.charCodeAt(index);
    +            if (!isIdentifierPart(ch)) {
    +                break;
    +            }
    +            ++index;
    +            id += String.fromCharCode(ch);
    + 
    +            // '\u' (char #92, char #117) denotes an escaped character.
    +            if (ch === 92) {
    +                id = id.substr(0, id.length - 1);
    +                if (source.charCodeAt(index) !== 117) {
    +                    throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +                }
    +                ++index;
    +                ch = scanHexEscape('u');
    +                if (!ch || ch === '\\' || !isIdentifierPart(ch.charCodeAt(0))) {
    +                    throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +                }
    +                id += ch;
    +            }
    +        }
    + 
    +        return id;
    +    }
    + 
    +    function getIdentifier() {
    +        var start, ch;
    + 
    +        start = index++;
    +        while (index < length) {
    +            ch = source.charCodeAt(index);
    +            if (ch === 92) {
    +                // Blackslash (char #92) marks Unicode escape sequence.
    +                index = start;
    +                return getEscapedIdentifier();
    +            }
    +            if (isIdentifierPart(ch)) {
    +                ++index;
    +            } else {
    +                break;
    +            }
    +        }
    + 
    +        return source.slice(start, index);
    +    }
    + 
    +    function scanIdentifier() {
    +        var start, id, type;
    + 
    +        start = index;
    + 
    +        // Backslash (char #92) starts an escaped character.
    +        id = (source.charCodeAt(index) === 92) ? getEscapedIdentifier() : getIdentifier();
    + 
    +        // There is no keyword or literal with only one character.
    +        // Thus, it must be an identifier.
    +        if (id.length === 1) {
    +            type = Token.Identifier;
    +        } else if (isKeyword(id)) {
    +            type = Token.Keyword;
    +        } else if (id === 'null') {
    +            type = Token.NullLiteral;
    +        } else if (id === 'true' || id === 'false') {
    +            type = Token.BooleanLiteral;
    +        } else {
    +            type = Token.Identifier;
    +        }
    + 
    +        return {
    +            type: type,
    +            value: id,
    +            lineNumber: lineNumber,
    +            lineStart: lineStart,
    +            range: [start, index]
    +        };
    +    }
    + 
    + 
    +    // 7.7 Punctuators
    + 
    +    function scanPunctuator() {
    +        var start = index,
    +            code = source.charCodeAt(index),
    +            code2,
    +            ch1 = source[index],
    +            ch2,
    +            ch3,
    +            ch4;
    + 
    +        switch (code) {
    + 
    +        // Check for most common single-character punctuators.
    +        case 46:   // . dot
    +        case 40:   // ( open bracket
    +        case 41:   // ) close bracket
    +        case 59:   // ; semicolon
    +        case 44:   // , comma
    +        case 123:  // { open curly brace
    +        case 125:  // } close curly brace
    +        case 91:   // [
    +        case 93:   // ]
    +        case 58:   // :
    +        case 63:   // ?
    +        case 126:  // ~
    +            ++index;
    +            return {
    +                type: Token.Punctuator,
    +                value: String.fromCharCode(code),
    +                lineNumber: lineNumber,
    +                lineStart: lineStart,
    +                range: [start, index]
    +            };
    + 
    +        default:
    +            code2 = source.charCodeAt(index + 1);
    + 
    +            // '=' (char #61) marks an assignment or comparison operator.
    +            if (code2 === 61) {
    +                switch (code) {
    +                case 37:  // %
    +                case 38:  // &
    +                case 42:  // *:
    +                case 43:  // +
    +                case 45:  // -
    +                case 47:  // /
    +                case 60:  // <
    +                case 62:  // >
    +                case 94:  // ^
    +                case 124: // |
    +                    index += 2;
    +                    return {
    +                        type: Token.Punctuator,
    +                        value: String.fromCharCode(code) + String.fromCharCode(code2),
    +                        lineNumber: lineNumber,
    +                        lineStart: lineStart,
    +                        range: [start, index]
    +                    };
    + 
    +                case 33: // !
    +                case 61: // =
    +                    index += 2;
    + 
    +                    // !== and ===
    +                    if (source.charCodeAt(index) === 61) {
    +                        ++index;
    +                    }
    +                    return {
    +                        type: Token.Punctuator,
    +                        value: source.slice(start, index),
    +                        lineNumber: lineNumber,
    +                        lineStart: lineStart,
    +                        range: [start, index]
    +                    };
    +                default:
    +                    break;
    +                }
    +            }
    +            break;
    +        }
    + 
    +        // Peek more characters.
    + 
    +        ch2 = source[index + 1];
    +        ch3 = source[index + 2];
    +        ch4 = source[index + 3];
    + 
    +        // 4-character punctuator: >>>=
    + 
    +        if (ch1 === '>' && ch2 === '>' && ch3 === '>') {
    +            if (ch4 === '=') {
    +                index += 4;
    +                return {
    +                    type: Token.Punctuator,
    +                    value: '>>>=',
    +                    lineNumber: lineNumber,
    +                    lineStart: lineStart,
    +                    range: [start, index]
    +                };
    +            }
    +        }
    + 
    +        // 3-character punctuators: === !== >>> <<= >>=
    + 
    +        if (ch1 === '>' && ch2 === '>' && ch3 === '>') {
    +            index += 3;
    +            return {
    +                type: Token.Punctuator,
    +                value: '>>>',
    +                lineNumber: lineNumber,
    +                lineStart: lineStart,
    +                range: [start, index]
    +            };
    +        }
    + 
    +        if (ch1 === '<' && ch2 === '<' && ch3 === '=') {
    +            index += 3;
    +            return {
    +                type: Token.Punctuator,
    +                value: '<<=',
    +                lineNumber: lineNumber,
    +                lineStart: lineStart,
    +                range: [start, index]
    +            };
    +        }
    + 
    +        if (ch1 === '>' && ch2 === '>' && ch3 === '=') {
    +            index += 3;
    +            return {
    +                type: Token.Punctuator,
    +                value: '>>=',
    +                lineNumber: lineNumber,
    +                lineStart: lineStart,
    +                range: [start, index]
    +            };
    +        }
    + 
    +        // Other 2-character punctuators: ++ -- << >> && ||
    + 
    +        if (ch1 === ch2 && ('+-<>&|'.indexOf(ch1) >= 0)) {
    +            index += 2;
    +            return {
    +                type: Token.Punctuator,
    +                value: ch1 + ch2,
    +                lineNumber: lineNumber,
    +                lineStart: lineStart,
    +                range: [start, index]
    +            };
    +        }
    + 
    +        if ('<>=!+-*%&|^/'.indexOf(ch1) >= 0) {
    +            ++index;
    +            return {
    +                type: Token.Punctuator,
    +                value: ch1,
    +                lineNumber: lineNumber,
    +                lineStart: lineStart,
    +                range: [start, index]
    +            };
    +        }
    + 
    +        throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +    }
    + 
    +    // 7.8.3 Numeric Literals
    + 
    +    function scanNumericLiteral() {
    +        var number, start, ch;
    + 
    +        ch = source[index];
    +        assert(isDecimalDigit(ch.charCodeAt(0)) || (ch === '.'),
    +            'Numeric literal must start with a decimal digit or a decimal point');
    + 
    +        start = index;
    +        number = '';
    +        if (ch !== '.') {
    +            number = source[index++];
    +            ch = source[index];
    + 
    +            // Hex number starts with '0x'.
    +            // Octal number starts with '0'.
    +            if (number === '0') {
    +                if (ch === 'x' || ch === 'X') {
    +                    number += source[index++];
    +                    while (index < length) {
    +                        ch = source[index];
    +                        if (!isHexDigit(ch)) {
    +                            break;
    +                        }
    +                        number += source[index++];
    +                    }
    + 
    +                    if (number.length <= 2) {
    +                        // only 0x
    +                        throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +                    }
    + 
    +                    if (index < length) {
    +                        ch = source[index];
    +                        if (isIdentifierStart(ch.charCodeAt(0))) {
    +                            throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +                        }
    +                    }
    +                    return {
    +                        type: Token.NumericLiteral,
    +                        value: parseInt(number, 16),
    +                        lineNumber: lineNumber,
    +                        lineStart: lineStart,
    +                        range: [start, index]
    +                    };
    +                }
    +                if (isOctalDigit(ch)) {
    +                    number += source[index++];
    +                    while (index < length) {
    +                        ch = source[index];
    +                        if (!isOctalDigit(ch)) {
    +                            break;
    +                        }
    +                        number += source[index++];
    +                    }
    + 
    +                    if (index < length) {
    +                        ch = source.charCodeAt(index);
    +                        if (isIdentifierStart(ch) || isDecimalDigit(ch)) {
    +                            throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +                        }
    +                    }
    +                    return {
    +                        type: Token.NumericLiteral,
    +                        value: parseInt(number, 8),
    +                        octal: true,
    +                        lineNumber: lineNumber,
    +                        lineStart: lineStart,
    +                        range: [start, index]
    +                    };
    +                }
    + 
    +                // decimal number starts with '0' such as '09' is illegal.
    +                if (ch && isDecimalDigit(ch.charCodeAt(0))) {
    +                    throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +                }
    +            }
    + 
    +            while (index < length) {
    +                if (!isDecimalDigit(source.charCodeAt(index))) {
    +                    ch = source[index];
    +                    break;
    +                }
    +                number += source[index++];
    +            }
    +        }
    + 
    +        if (ch === '.') {
    +            number += source[index++];
    +            while (index < length) {
    +                if (!isDecimalDigit(source.charCodeAt(index))) {
    +                    ch = source[index];
    +                    break;
    +                }
    +                number += source[index++];
    +            }
    +        }
    + 
    +        if (ch === 'e' || ch === 'E') {
    +            number += source[index++];
    + 
    +            ch = source[index];
    +            if (ch === '+' || ch === '-') {
    +                number += source[index++];
    +            }
    + 
    +            ch = source[index];
    +            if (ch && isDecimalDigit(ch.charCodeAt(0))) {
    +                number += source[index++];
    +                while (index < length) {
    +                    if (!isDecimalDigit(source.charCodeAt(index))) {
    +                        ch = source[index];
    +                        break;
    +                    }
    +                    number += source[index++];
    +                }
    +            } else {
    +                ch = 'character ' + ch;
    +                if (index >= length) {
    +                    ch = '<end>';
    +                }
    +                throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +            }
    +        }
    + 
    +        if (index < length) {
    +            if (isIdentifierStart(source.charCodeAt(index))) {
    +                throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +            }
    +        }
    + 
    +        return {
    +            type: Token.NumericLiteral,
    +            value: parseFloat(number),
    +            lineNumber: lineNumber,
    +            lineStart: lineStart,
    +            range: [start, index]
    +        };
    +    }
    + 
    +    // 7.8.4 String Literals
    + 
    +    function scanStringLiteral() {
    +        var str = '', quote, start, ch, code, unescaped, restore, octal = false;
    + 
    +        quote = source[index];
    +        assert((quote === '\'' || quote === '"'),
    +            'String literal must starts with a quote');
    + 
    +        start = index;
    +        ++index;
    + 
    +        while (index < length) {
    +            ch = source[index++];
    + 
    +            if (ch === quote) {
    +                quote = '';
    +                break;
    +            } else if (ch === '\\') {
    +                ch = source[index++];
    +                if (!ch || !isLineTerminator(ch.charCodeAt(0))) {
    +                    switch (ch) {
    +                    case 'n':
    +                        str += '\n';
    +                        break;
    +                    case 'r':
    +                        str += '\r';
    +                        break;
    +                    case 't':
    +                        str += '\t';
    +                        break;
    +                    case 'u':
    +                    case 'x':
    +                        restore = index;
    +                        unescaped = scanHexEscape(ch);
    +                        if (unescaped) {
    +                            str += unescaped;
    +                        } else {
    +                            index = restore;
    +                            str += ch;
    +                        }
    +                        break;
    +                    case 'b':
    +                        str += '\b';
    +                        break;
    +                    case 'f':
    +                        str += '\f';
    +                        break;
    +                    case 'v':
    +                        str += '\v';
    +                        break;
    + 
    +                    default:
    +                        if (isOctalDigit(ch)) {
    +                            code = '01234567'.indexOf(ch);
    + 
    +                            // \0 is not octal escape sequence
    +                            if (code !== 0) {
    +                                octal = true;
    +                            }
    + 
    +                            if (index < length && isOctalDigit(source[index])) {
    +                                octal = true;
    +                                code = code * 8 + '01234567'.indexOf(source[index++]);
    + 
    +                                // 3 digits are only allowed when string starts
    +                                // with 0, 1, 2, 3
    +                                if ('0123'.indexOf(ch) >= 0 &&
    +                                        index < length &&
    +                                        isOctalDigit(source[index])) {
    +                                    code = code * 8 + '01234567'.indexOf(source[index++]);
    +                                }
    +                            }
    +                            str += String.fromCharCode(code);
    +                        } else {
    +                            str += ch;
    +                        }
    +                        break;
    +                    }
    +                } else {
    +                    ++lineNumber;
    +                    if (ch ===  '\r' && source[index] === '\n') {
    +                        ++index;
    +                    }
    +                }
    +            } else if (isLineTerminator(ch.charCodeAt(0))) {
    +                break;
    +            } else {
    +                str += ch;
    +            }
    +        }
    + 
    +        if (quote !== '') {
    +            throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +        }
    + 
    +        return {
    +            type: Token.StringLiteral,
    +            value: str,
    +            octal: octal,
    +            lineNumber: lineNumber,
    +            lineStart: lineStart,
    +            range: [start, index]
    +        };
    +    }
    + 
    +    function scanRegExp() {
    +        var str, ch, start, pattern, flags, value, classMarker = false, restore, terminated = false;
    + 
    +        lookahead = null;
    +        skipComment();
    + 
    +        start = index;
    +        ch = source[index];
    +        assert(ch === '/', 'Regular expression literal must start with a slash');
    +        str = source[index++];
    + 
    +        while (index < length) {
    +            ch = source[index++];
    +            str += ch;
    +            if (classMarker) {
    +                if (ch === ']') {
    +                    classMarker = false;
    +                }
    +            } else {
    +                if (ch === '\\') {
    +                    ch = source[index++];
    +                    // ECMA-262 7.8.5
    +                    if (isLineTerminator(ch.charCodeAt(0))) {
    +                        throwError({}, Messages.UnterminatedRegExp);
    +                    }
    +                    str += ch;
    +                } else if (ch === '/') {
    +                    terminated = true;
    +                    break;
    +                } else if (ch === '[') {
    +                    classMarker = true;
    +                } else if (isLineTerminator(ch.charCodeAt(0))) {
    +                    throwError({}, Messages.UnterminatedRegExp);
    +                }
    +            }
    +        }
    + 
    +        if (!terminated) {
    +            throwError({}, Messages.UnterminatedRegExp);
    +        }
    + 
    +        // Exclude leading and trailing slash.
    +        pattern = str.substr(1, str.length - 2);
    + 
    +        flags = '';
    +        while (index < length) {
    +            ch = source[index];
    +            if (!isIdentifierPart(ch.charCodeAt(0))) {
    +                break;
    +            }
    + 
    +            ++index;
    +            if (ch === '\\' && index < length) {
    +                ch = source[index];
    +                if (ch === 'u') {
    +                    ++index;
    +                    restore = index;
    +                    ch = scanHexEscape('u');
    +                    if (ch) {
    +                        flags += ch;
    +                        for (str += '\\u'; restore < index; ++restore) {
    +                            str += source[restore];
    +                        }
    +                    } else {
    +                        index = restore;
    +                        flags += 'u';
    +                        str += '\\u';
    +                    }
    +                } else {
    +                    str += '\\';
    +                }
    +            } else {
    +                flags += ch;
    +                str += ch;
    +            }
    +        }
    + 
    +        try {
    +            value = new RegExp(pattern, flags);
    +        } catch (e) {
    +            throwError({}, Messages.InvalidRegExp);
    +        }
    + 
    +        peek();
    + 
    +        return {
    +            literal: str,
    +            value: value,
    +            range: [start, index]
    +        };
    +    }
    + 
    +    function isIdentifierName(token) {
    +        return token.type === Token.Identifier ||
    +            token.type === Token.Keyword ||
    +            token.type === Token.BooleanLiteral ||
    +            token.type === Token.NullLiteral;
    +    }
    + 
    +    function advance() {
    +        var ch;
    + 
    +        skipComment();
    + 
    +        if (index >= length) {
    +            return {
    +                type: Token.EOF,
    +                lineNumber: lineNumber,
    +                lineStart: lineStart,
    +                range: [index, index]
    +            };
    +        }
    + 
    +        ch = source.charCodeAt(index);
    + 
    +        // Very common: ( and ) and ;
    +        if (ch === 40 || ch === 41 || ch === 58) {
    +            return scanPunctuator();
    +        }
    + 
    +        // String literal starts with single quote (#39) or double quote (#34).
    +        if (ch === 39 || ch === 34) {
    +            return scanStringLiteral();
    +        }
    + 
    +        if (isIdentifierStart(ch)) {
    +            return scanIdentifier();
    +        }
    + 
    +        // Dot (.) char #46 can also start a floating-point number, hence the need
    +        // to check the next character.
    +        if (ch === 46) {
    +            if (isDecimalDigit(source.charCodeAt(index + 1))) {
    +                return scanNumericLiteral();
    +            }
    +            return scanPunctuator();
    +        }
    + 
    +        if (isDecimalDigit(ch)) {
    +            return scanNumericLiteral();
    +        }
    + 
    +        return scanPunctuator();
    +    }
    + 
    +    function lex() {
    +        var token;
    + 
    +        token = lookahead;
    +        index = token.range[1];
    +        lineNumber = token.lineNumber;
    +        lineStart = token.lineStart;
    + 
    +        lookahead = advance();
    + 
    +        index = token.range[1];
    +        lineNumber = token.lineNumber;
    +        lineStart = token.lineStart;
    + 
    +        return token;
    +    }
    + 
    +    function peek() {
    +        var pos, line, start;
    + 
    +        pos = index;
    +        line = lineNumber;
    +        start = lineStart;
    +        lookahead = advance();
    +        index = pos;
    +        lineNumber = line;
    +        lineStart = start;
    +    }
    + 
    +    SyntaxTreeDelegate = {
    + 
    +        name: 'SyntaxTree',
    + 
    +        createArrayExpression: function (elements) {
    +            return {
    +                type: Syntax.ArrayExpression,
    +                elements: elements
    +            };
    +        },
    + 
    +        createAssignmentExpression: function (operator, left, right) {
    +            return {
    +                type: Syntax.AssignmentExpression,
    +                operator: operator,
    +                left: left,
    +                right: right
    +            };
    +        },
    + 
    +        createBinaryExpression: function (operator, left, right) {
    +            var type = (operator === '||' || operator === '&&') ? Syntax.LogicalExpression :
    +                        Syntax.BinaryExpression;
    +            return {
    +                type: type,
    +                operator: operator,
    +                left: left,
    +                right: right
    +            };
    +        },
    + 
    +        createBlockStatement: function (body) {
    +            return {
    +                type: Syntax.BlockStatement,
    +                body: body
    +            };
    +        },
    + 
    +        createBreakStatement: function (label) {
    +            return {
    +                type: Syntax.BreakStatement,
    +                label: label
    +            };
    +        },
    + 
    +        createCallExpression: function (callee, args) {
    +            return {
    +                type: Syntax.CallExpression,
    +                callee: callee,
    +                'arguments': args
    +            };
    +        },
    + 
    +        createCatchClause: function (param, body) {
    +            return {
    +                type: Syntax.CatchClause,
    +                param: param,
    +                body: body
    +            };
    +        },
    + 
    +        createConditionalExpression: function (test, consequent, alternate) {
    +            return {
    +                type: Syntax.ConditionalExpression,
    +                test: test,
    +                consequent: consequent,
    +                alternate: alternate
    +            };
    +        },
    + 
    +        createContinueStatement: function (label) {
    +            return {
    +                type: Syntax.ContinueStatement,
    +                label: label
    +            };
    +        },
    + 
    +        createDebuggerStatement: function () {
    +            return {
    +                type: Syntax.DebuggerStatement
    +            };
    +        },
    + 
    +        createDoWhileStatement: function (body, test) {
    +            return {
    +                type: Syntax.DoWhileStatement,
    +                body: body,
    +                test: test
    +            };
    +        },
    + 
    +        createEmptyStatement: function () {
    +            return {
    +                type: Syntax.EmptyStatement
    +            };
    +        },
    + 
    +        createExpressionStatement: function (expression) {
    +            return {
    +                type: Syntax.ExpressionStatement,
    +                expression: expression
    +            };
    +        },
    + 
    +        createForStatement: function (init, test, update, body) {
    +            return {
    +                type: Syntax.ForStatement,
    +                init: init,
    +                test: test,
    +                update: update,
    +                body: body
    +            };
    +        },
    + 
    +        createForInStatement: function (left, right, body) {
    +            return {
    +                type: Syntax.ForInStatement,
    +                left: left,
    +                right: right,
    +                body: body,
    +                each: false
    +            };
    +        },
    + 
    +        createFunctionDeclaration: function (id, params, defaults, body) {
    +            return {
    +                type: Syntax.FunctionDeclaration,
    +                id: id,
    +                params: params,
    +                defaults: defaults,
    +                body: body,
    +                rest: null,
    +                generator: false,
    +                expression: false
    +            };
    +        },
    + 
    +        createFunctionExpression: function (id, params, defaults, body) {
    +            return {
    +                type: Syntax.FunctionExpression,
    +                id: id,
    +                params: params,
    +                defaults: defaults,
    +                body: body,
    +                rest: null,
    +                generator: false,
    +                expression: false
    +            };
    +        },
    + 
    +        createIdentifier: function (name) {
    +            return {
    +                type: Syntax.Identifier,
    +                name: name
    +            };
    +        },
    + 
    +        createIfStatement: function (test, consequent, alternate) {
    +            return {
    +                type: Syntax.IfStatement,
    +                test: test,
    +                consequent: consequent,
    +                alternate: alternate
    +            };
    +        },
    + 
    +        createLabeledStatement: function (label, body) {
    +            return {
    +                type: Syntax.LabeledStatement,
    +                label: label,
    +                body: body
    +            };
    +        },
    + 
    +        createLiteral: function (token) {
    +            return {
    +                type: Syntax.Literal,
    +                value: token.value,
    +                raw: source.slice(token.range[0], token.range[1])
    +            };
    +        },
    + 
    +        createMemberExpression: function (accessor, object, property) {
    +            return {
    +                type: Syntax.MemberExpression,
    +                computed: accessor === '[',
    +                object: object,
    +                property: property
    +            };
    +        },
    + 
    +        createNewExpression: function (callee, args) {
    +            return {
    +                type: Syntax.NewExpression,
    +                callee: callee,
    +                'arguments': args
    +            };
    +        },
    + 
    +        createObjectExpression: function (properties) {
    +            return {
    +                type: Syntax.ObjectExpression,
    +                properties: properties
    +            };
    +        },
    + 
    +        createPostfixExpression: function (operator, argument) {
    +            return {
    +                type: Syntax.UpdateExpression,
    +                operator: operator,
    +                argument: argument,
    +                prefix: false
    +            };
    +        },
    + 
    +        createProgram: function (body) {
    +            return {
    +                type: Syntax.Program,
    +                body: body
    +            };
    +        },
    + 
    +        createProperty: function (kind, key, value) {
    +            return {
    +                type: Syntax.Property,
    +                key: key,
    +                value: value,
    +                kind: kind
    +            };
    +        },
    + 
    +        createReturnStatement: function (argument) {
    +            return {
    +                type: Syntax.ReturnStatement,
    +                argument: argument
    +            };
    +        },
    + 
    +        createSequenceExpression: function (expressions) {
    +            return {
    +                type: Syntax.SequenceExpression,
    +                expressions: expressions
    +            };
    +        },
    + 
    +        createSwitchCase: function (test, consequent) {
    +            return {
    +                type: Syntax.SwitchCase,
    +                test: test,
    +                consequent: consequent
    +            };
    +        },
    + 
    +        createSwitchStatement: function (discriminant, cases) {
    +            return {
    +                type: Syntax.SwitchStatement,
    +                discriminant: discriminant,
    +                cases: cases
    +            };
    +        },
    + 
    +        createThisExpression: function () {
    +            return {
    +                type: Syntax.ThisExpression
    +            };
    +        },
    + 
    +        createThrowStatement: function (argument) {
    +            return {
    +                type: Syntax.ThrowStatement,
    +                argument: argument
    +            };
    +        },
    + 
    +        createTryStatement: function (block, guardedHandlers, handlers, finalizer) {
    +            return {
    +                type: Syntax.TryStatement,
    +                block: block,
    +                guardedHandlers: guardedHandlers,
    +                handlers: handlers,
    +                finalizer: finalizer
    +            };
    +        },
    + 
    +        createUnaryExpression: function (operator, argument) {
    +            if (operator === '++' || operator === '--') {
    +                return {
    +                    type: Syntax.UpdateExpression,
    +                    operator: operator,
    +                    argument: argument,
    +                    prefix: true
    +                };
    +            }
    +            return {
    +                type: Syntax.UnaryExpression,
    +                operator: operator,
    +                argument: argument
    +            };
    +        },
    + 
    +        createVariableDeclaration: function (declarations, kind) {
    +            return {
    +                type: Syntax.VariableDeclaration,
    +                declarations: declarations,
    +                kind: kind
    +            };
    +        },
    + 
    +        createVariableDeclarator: function (id, init) {
    +            return {
    +                type: Syntax.VariableDeclarator,
    +                id: id,
    +                init: init
    +            };
    +        },
    + 
    +        createWhileStatement: function (test, body) {
    +            return {
    +                type: Syntax.WhileStatement,
    +                test: test,
    +                body: body
    +            };
    +        },
    + 
    +        createWithStatement: function (object, body) {
    +            return {
    +                type: Syntax.WithStatement,
    +                object: object,
    +                body: body
    +            };
    +        }
    +    };
    + 
    +    // Return true if there is a line terminator before the next token.
    + 
    +    function peekLineTerminator() {
    +        var pos, line, start, found;
    + 
    +        pos = index;
    +        line = lineNumber;
    +        start = lineStart;
    +        skipComment();
    +        found = lineNumber !== line;
    +        index = pos;
    +        lineNumber = line;
    +        lineStart = start;
    + 
    +        return found;
    +    }
    + 
    +    // Throw an exception
    + 
    +    function throwError(token, messageFormat) {
    +        var error,
    +            args = Array.prototype.slice.call(arguments, 2),
    +            msg = messageFormat.replace(
    +                /%(\d)/g,
    +                function (whole, index) {
    +                    assert(index < args.length, 'Message reference must be in range');
    +                    return args[index];
    +                }
    +            );
    + 
    +        if (typeof token.lineNumber === 'number') {
    +            error = new Error('Line ' + token.lineNumber + ': ' + msg);
    +            error.index = token.range[0];
    +            error.lineNumber = token.lineNumber;
    +            error.column = token.range[0] - lineStart + 1;
    +        } else {
    +            error = new Error('Line ' + lineNumber + ': ' + msg);
    +            error.index = index;
    +            error.lineNumber = lineNumber;
    +            error.column = index - lineStart + 1;
    +        }
    + 
    +        error.description = msg;
    +        throw error;
    +    }
    + 
    +    function throwErrorTolerant() {
    +        try {
    +            throwError.apply(null, arguments);
    +        } catch (e) {
    +            if (extra.errors) {
    +                extra.errors.push(e);
    +            } else {
    +                throw e;
    +            }
    +        }
    +    }
    + 
    + 
    +    // Throw an exception because of the token.
    + 
    +    function throwUnexpected(token) {
    +        if (token.type === Token.EOF) {
    +            throwError(token, Messages.UnexpectedEOS);
    +        }
    + 
    +        if (token.type === Token.NumericLiteral) {
    +            throwError(token, Messages.UnexpectedNumber);
    +        }
    + 
    +        if (token.type === Token.StringLiteral) {
    +            throwError(token, Messages.UnexpectedString);
    +        }
    + 
    +        if (token.type === Token.Identifier) {
    +            throwError(token, Messages.UnexpectedIdentifier);
    +        }
    + 
    +        if (token.type === Token.Keyword) {
    +            if (isFutureReservedWord(token.value)) {
    +                throwError(token, Messages.UnexpectedReserved);
    +            } else if (strict && isStrictModeReservedWord(token.value)) {
    +                throwErrorTolerant(token, Messages.StrictReservedWord);
    +                return;
    +            }
    +            throwError(token, Messages.UnexpectedToken, token.value);
    +        }
    + 
    +        // BooleanLiteral, NullLiteral, or Punctuator.
    +        throwError(token, Messages.UnexpectedToken, token.value);
    +    }
    + 
    +    // Expect the next token to match the specified punctuator.
    +    // If not, an exception will be thrown.
    + 
    +    function expect(value) {
    +        var token = lex();
    +        if (token.type !== Token.Punctuator || token.value !== value) {
    +            throwUnexpected(token);
    +        }
    +    }
    + 
    +    // Expect the next token to match the specified keyword.
    +    // If not, an exception will be thrown.
    + 
    +    function expectKeyword(keyword) {
    +        var token = lex();
    +        if (token.type !== Token.Keyword || token.value !== keyword) {
    +            throwUnexpected(token);
    +        }
    +    }
    + 
    +    // Return true if the next token matches the specified punctuator.
    + 
    +    function match(value) {
    +        return lookahead.type === Token.Punctuator && lookahead.value === value;
    +    }
    + 
    +    // Return true if the next token matches the specified keyword
    + 
    +    function matchKeyword(keyword) {
    +        return lookahead.type === Token.Keyword && lookahead.value === keyword;
    +    }
    + 
    +    // Return true if the next token is an assignment operator
    + 
    +    function matchAssign() {
    +        var op;
    + 
    +        if (lookahead.type !== Token.Punctuator) {
    +            return false;
    +        }
    +        op = lookahead.value;
    +        return op === '=' ||
    +            op === '*=' ||
    +            op === '/=' ||
    +            op === '%=' ||
    +            op === '+=' ||
    +            op === '-=' ||
    +            op === '<<=' ||
    +            op === '>>=' ||
    +            op === '>>>=' ||
    +            op === '&=' ||
    +            op === '^=' ||
    +            op === '|=';
    +    }
    + 
    +    function consumeSemicolon() {
    +        var line;
    + 
    +        // Catch the very common case first: immediately a semicolon (char #59).
    +        if (source.charCodeAt(index) === 59) {
    +            lex();
    +            return;
    +        }
    + 
    +        line = lineNumber;
    +        skipComment();
    +        if (lineNumber !== line) {
    +            return;
    +        }
    + 
    +        if (match(';')) {
    +            lex();
    +            return;
    +        }
    + 
    +        if (lookahead.type !== Token.EOF && !match('}')) {
    +            throwUnexpected(lookahead);
    +        }
    +    }
    + 
    +    // Return true if provided expression is LeftHandSideExpression
    + 
    +    function isLeftHandSide(expr) {
    +        return expr.type === Syntax.Identifier || expr.type === Syntax.MemberExpression;
    +    }
    + 
    +    // 11.1.4 Array Initialiser
    + 
    +    function parseArrayInitialiser() {
    +        var elements = [];
    + 
    +        expect('[');
    + 
    +        while (!match(']')) {
    +            if (match(',')) {
    +                lex();
    +                elements.push(null);
    +            } else {
    +                elements.push(parseAssignmentExpression());
    + 
    +                if (!match(']')) {
    +                    expect(',');
    +                }
    +            }
    +        }
    + 
    +        expect(']');
    + 
    +        return delegate.createArrayExpression(elements);
    +    }
    + 
    +    // 11.1.5 Object Initialiser
    + 
    +    function parsePropertyFunction(param, first) {
    +        var previousStrict, body;
    + 
    +        previousStrict = strict;
    +        body = parseFunctionSourceElements();
    +        if (first && strict && isRestrictedWord(param[0].name)) {
    +            throwErrorTolerant(first, Messages.StrictParamName);
    +        }
    +        strict = previousStrict;
    +        return delegate.createFunctionExpression(null, param, [], body);
    +    }
    + 
    +    function parseObjectPropertyKey() {
    +        var token = lex();
    + 
    +        // Note: This function is called only from parseObjectProperty(), where
    +        // EOF and Punctuator tokens are already filtered out.
    + 
    +        if (token.type === Token.StringLiteral || token.type === Token.NumericLiteral) {
    +            if (strict && token.octal) {
    +                throwErrorTolerant(token, Messages.StrictOctalLiteral);
    +            }
    +            return delegate.createLiteral(token);
    +        }
    + 
    +        return delegate.createIdentifier(token.value);
    +    }
    + 
    +    function parseObjectProperty() {
    +        var token, key, id, value, param;
    + 
    +        token = lookahead;
    + 
    +        if (token.type === Token.Identifier) {
    + 
    +            id = parseObjectPropertyKey();
    + 
    +            // Property Assignment: Getter and Setter.
    + 
    +            if (token.value === 'get' && !match(':')) {
    +                key = parseObjectPropertyKey();
    +                expect('(');
    +                expect(')');
    +                value = parsePropertyFunction([]);
    +                return delegate.createProperty('get', key, value);
    +            }
    +            if (token.value === 'set' && !match(':')) {
    +                key = parseObjectPropertyKey();
    +                expect('(');
    +                token = lookahead;
    +                if (token.type !== Token.Identifier) {
    +                    throwUnexpected(lex());
    +                }
    +                param = [ parseVariableIdentifier() ];
    +                expect(')');
    +                value = parsePropertyFunction(param, token);
    +                return delegate.createProperty('set', key, value);
    +            }
    +            expect(':');
    +            value = parseAssignmentExpression();
    +            return delegate.createProperty('init', id, value);
    +        }
    +        if (token.type === Token.EOF || token.type === Token.Punctuator) {
    +            throwUnexpected(token);
    +        } else {
    +            key = parseObjectPropertyKey();
    +            expect(':');
    +            value = parseAssignmentExpression();
    +            return delegate.createProperty('init', key, value);
    +        }
    +    }
    + 
    +    function parseObjectInitialiser() {
    +        var properties = [], property, name, key, kind, map = {}, toString = String;
    + 
    +        expect('{');
    + 
    +        while (!match('}')) {
    +            property = parseObjectProperty();
    + 
    +            if (property.key.type === Syntax.Identifier) {
    +                name = property.key.name;
    +            } else {
    +                name = toString(property.key.value);
    +            }
    +            kind = (property.kind === 'init') ? PropertyKind.Data : (property.kind === 'get') ? PropertyKind.Get : PropertyKind.Set;
    + 
    +            key = '$' + name;
    +            if (Object.prototype.hasOwnProperty.call(map, key)) {
    +                if (map[key] === PropertyKind.Data) {
    +                    if (strict && kind === PropertyKind.Data) {
    +                        throwErrorTolerant({}, Messages.StrictDuplicateProperty);
    +                    } else if (kind !== PropertyKind.Data) {
    +                        throwErrorTolerant({}, Messages.AccessorDataProperty);
    +                    }
    +                } else {
    +                    if (kind === PropertyKind.Data) {
    +                        throwErrorTolerant({}, Messages.AccessorDataProperty);
    +                    } else if (map[key] & kind) {
    +                        throwErrorTolerant({}, Messages.AccessorGetSet);
    +                    }
    +                }
    +                map[key] |= kind;
    +            } else {
    +                map[key] = kind;
    +            }
    + 
    +            properties.push(property);
    + 
    +            if (!match('}')) {
    +                expect(',');
    +            }
    +        }
    + 
    +        expect('}');
    + 
    +        return delegate.createObjectExpression(properties);
    +    }
    + 
    +    // 11.1.6 The Grouping Operator
    + 
    +    function parseGroupExpression() {
    +        var expr;
    + 
    +        expect('(');
    + 
    +        expr = parseExpression();
    + 
    +        expect(')');
    + 
    +        return expr;
    +    }
    + 
    + 
    +    // 11.1 Primary Expressions
    + 
    +    function parsePrimaryExpression() {
    +        var type, token;
    + 
    +        type = lookahead.type;
    + 
    +        if (type === Token.Identifier) {
    +            return delegate.createIdentifier(lex().value);
    +        }
    + 
    +        if (type === Token.StringLiteral || type === Token.NumericLiteral) {
    +            if (strict && lookahead.octal) {
    +                throwErrorTolerant(lookahead, Messages.StrictOctalLiteral);
    +            }
    +            return delegate.createLiteral(lex());
    +        }
    + 
    +        if (type === Token.Keyword) {
    +            if (matchKeyword('this')) {
    +                lex();
    +                return delegate.createThisExpression();
    +            }
    + 
    +            if (matchKeyword('function')) {
    +                return parseFunctionExpression();
    +            }
    +        }
    + 
    +        if (type === Token.BooleanLiteral) {
    +            token = lex();
    +            token.value = (token.value === 'true');
    +            return delegate.createLiteral(token);
    +        }
    + 
    +        if (type === Token.NullLiteral) {
    +            token = lex();
    +            token.value = null;
    +            return delegate.createLiteral(token);
    +        }
    + 
    +        if (match('[')) {
    +            return parseArrayInitialiser();
    +        }
    + 
    +        if (match('{')) {
    +            return parseObjectInitialiser();
    +        }
    + 
    +        if (match('(')) {
    +            return parseGroupExpression();
    +        }
    + 
    +        if (match('/') || match('/=')) {
    +            return delegate.createLiteral(scanRegExp());
    +        }
    + 
    +        return throwUnexpected(lex());
    +    }
    + 
    +    // 11.2 Left-Hand-Side Expressions
    + 
    +    function parseArguments() {
    +        var args = [];
    + 
    +        expect('(');
    + 
    +        if (!match(')')) {
    +            while (index < length) {
    +                args.push(parseAssignmentExpression());
    +                if (match(')')) {
    +                    break;
    +                }
    +                expect(',');
    +            }
    +        }
    + 
    +        expect(')');
    + 
    +        return args;
    +    }
    + 
    +    function parseNonComputedProperty() {
    +        var token = lex();
    + 
    +        if (!isIdentifierName(token)) {
    +            throwUnexpected(token);
    +        }
    + 
    +        return delegate.createIdentifier(token.value);
    +    }
    + 
    +    function parseNonComputedMember() {
    +        expect('.');
    + 
    +        return parseNonComputedProperty();
    +    }
    + 
    +    function parseComputedMember() {
    +        var expr;
    + 
    +        expect('[');
    + 
    +        expr = parseExpression();
    + 
    +        expect(']');
    + 
    +        return expr;
    +    }
    + 
    +    function parseNewExpression() {
    +        var callee, args;
    + 
    +        expectKeyword('new');
    +        callee = parseLeftHandSideExpression();
    +        args = match('(') ? parseArguments() : [];
    + 
    +        return delegate.createNewExpression(callee, args);
    +    }
    + 
    +    function parseLeftHandSideExpressionAllowCall() {
    +        var expr, args, property;
    + 
    +        expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression();
    + 
    +        while (match('.') || match('[') || match('(')) {
    +            if (match('(')) {
    +                args = parseArguments();
    +                expr = delegate.createCallExpression(expr, args);
    +            } else if (match('[')) {
    +                property = parseComputedMember();
    +                expr = delegate.createMemberExpression('[', expr, property);
    +            } else {
    +                property = parseNonComputedMember();
    +                expr = delegate.createMemberExpression('.', expr, property);
    +            }
    +        }
    + 
    +        return expr;
    +    }
    + 
    + 
    +    function parseLeftHandSideExpression() {
    +        var expr, property;
    + 
    +        expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression();
    + 
    +        while (match('.') || match('[')) {
    +            if (match('[')) {
    +                property = parseComputedMember();
    +                expr = delegate.createMemberExpression('[', expr, property);
    +            } else {
    +                property = parseNonComputedMember();
    +                expr = delegate.createMemberExpression('.', expr, property);
    +            }
    +        }
    + 
    +        return expr;
    +    }
    + 
    +    // 11.3 Postfix Expressions
    + 
    +    function parsePostfixExpression() {
    +        var expr = parseLeftHandSideExpressionAllowCall(), token;
    + 
    +        if (lookahead.type !== Token.Punctuator) {
    +            return expr;
    +        }
    + 
    +        if ((match('++') || match('--')) && !peekLineTerminator()) {
    +            // 11.3.1, 11.3.2
    +            if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) {
    +                throwErrorTolerant({}, Messages.StrictLHSPostfix);
    +            }
    + 
    +            if (!isLeftHandSide(expr)) {
    +                throwError({}, Messages.InvalidLHSInAssignment);
    +            }
    + 
    +            token = lex();
    +            expr = delegate.createPostfixExpression(token.value, expr);
    +        }
    + 
    +        return expr;
    +    }
    + 
    +    // 11.4 Unary Operators
    + 
    +    function parseUnaryExpression() {
    +        var token, expr;
    + 
    +        if (lookahead.type !== Token.Punctuator && lookahead.type !== Token.Keyword) {
    +            return parsePostfixExpression();
    +        }
    + 
    +        if (match('++') || match('--')) {
    +            token = lex();
    +            expr = parseUnaryExpression();
    +            // 11.4.4, 11.4.5
    +            if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) {
    +                throwErrorTolerant({}, Messages.StrictLHSPrefix);
    +            }
    + 
    +            if (!isLeftHandSide(expr)) {
    +                throwError({}, Messages.InvalidLHSInAssignment);
    +            }
    + 
    +            return delegate.createUnaryExpression(token.value, expr);
    +        }
    + 
    +        if (match('+') || match('-') || match('~') || match('!')) {
    +            token = lex();
    +            expr = parseUnaryExpression();
    +            return delegate.createUnaryExpression(token.value, expr);
    +        }
    + 
    +        if (matchKeyword('delete') || matchKeyword('void') || matchKeyword('typeof')) {
    +            token = lex();
    +            expr = parseUnaryExpression();
    +            expr = delegate.createUnaryExpression(token.value, expr);
    +            if (strict && expr.operator === 'delete' && expr.argument.type === Syntax.Identifier) {
    +                throwErrorTolerant({}, Messages.StrictDelete);
    +            }
    +            return expr;
    +        }
    + 
    +        return parsePostfixExpression();
    +    }
    + 
    +    function binaryPrecedence(token, allowIn) {
    +        var prec = 0;
    + 
    +        if (token.type !== Token.Punctuator && token.type !== Token.Keyword) {
    +            return 0;
    +        }
    + 
    +        switch (token.value) {
    +        case '||':
    +            prec = 1;
    +            break;
    + 
    +        case '&&':
    +            prec = 2;
    +            break;
    + 
    +        case '|':
    +            prec = 3;
    +            break;
    + 
    +        case '^':
    +            prec = 4;
    +            break;
    + 
    +        case '&':
    +            prec = 5;
    +            break;
    + 
    +        case '==':
    +        case '!=':
    +        case '===':
    +        case '!==':
    +            prec = 6;
    +            break;
    + 
    +        case '<':
    +        case '>':
    +        case '<=':
    +        case '>=':
    +        case 'instanceof':
    +            prec = 7;
    +            break;
    + 
    +        case 'in':
    +            prec = allowIn ? 7 : 0;
    +            break;
    + 
    +        case '<<':
    +        case '>>':
    +        case '>>>':
    +            prec = 8;
    +            break;
    + 
    +        case '+':
    +        case '-':
    +            prec = 9;
    +            break;
    + 
    +        case '*':
    +        case '/':
    +        case '%':
    +            prec = 11;
    +            break;
    + 
    +        default:
    +            break;
    +        }
    + 
    +        return prec;
    +    }
    + 
    +    // 11.5 Multiplicative Operators
    +    // 11.6 Additive Operators
    +    // 11.7 Bitwise Shift Operators
    +    // 11.8 Relational Operators
    +    // 11.9 Equality Operators
    +    // 11.10 Binary Bitwise Operators
    +    // 11.11 Binary Logical Operators
    + 
    +    function parseBinaryExpression() {
    +        var expr, token, prec, previousAllowIn, stack, right, operator, left, i;
    + 
    +        previousAllowIn = state.allowIn;
    +        state.allowIn = true;
    + 
    +        expr = parseUnaryExpression();
    + 
    +        token = lookahead;
    +        prec = binaryPrecedence(token, previousAllowIn);
    +        if (prec === 0) {
    +            return expr;
    +        }
    +        token.prec = prec;
    +        lex();
    + 
    +        stack = [expr, token, parseUnaryExpression()];
    + 
    +        while ((prec = binaryPrecedence(lookahead, previousAllowIn)) > 0) {
    + 
    +            // Reduce: make a binary expression from the three topmost entries.
    +            while ((stack.length > 2) && (prec <= stack[stack.length - 2].prec)) {
    +                right = stack.pop();
    +                operator = stack.pop().value;
    +                left = stack.pop();
    +                stack.push(delegate.createBinaryExpression(operator, left, right));
    +            }
    + 
    +            // Shift.
    +            token = lex();
    +            token.prec = prec;
    +            stack.push(token);
    +            stack.push(parseUnaryExpression());
    +        }
    + 
    +        state.allowIn = previousAllowIn;
    + 
    +        // Final reduce to clean-up the stack.
    +        i = stack.length - 1;
    +        expr = stack[i];
    +        while (i > 1) {
    +            expr = delegate.createBinaryExpression(stack[i - 1].value, stack[i - 2], expr);
    +            i -= 2;
    +        }
    +        return expr;
    +    }
    + 
    + 
    +    // 11.12 Conditional Operator
    + 
    +    function parseConditionalExpression() {
    +        var expr, previousAllowIn, consequent, alternate;
    + 
    +        expr = parseBinaryExpression();
    + 
    +        if (match('?')) {
    +            lex();
    +            previousAllowIn = state.allowIn;
    +            state.allowIn = true;
    +            consequent = parseAssignmentExpression();
    +            state.allowIn = previousAllowIn;
    +            expect(':');
    +            alternate = parseAssignmentExpression();
    + 
    +            expr = delegate.createConditionalExpression(expr, consequent, alternate);
    +        }
    + 
    +        return expr;
    +    }
    + 
    +    // 11.13 Assignment Operators
    + 
    +    function parseAssignmentExpression() {
    +        var token, left, right;
    + 
    +        token = lookahead;
    +        left = parseConditionalExpression();
    + 
    +        if (matchAssign()) {
    +            // LeftHandSideExpression
    +            if (!isLeftHandSide(left)) {
    +                throwError({}, Messages.InvalidLHSInAssignment);
    +            }
    + 
    +            // 11.13.1
    +            if (strict && left.type === Syntax.Identifier && isRestrictedWord(left.name)) {
    +                throwErrorTolerant(token, Messages.StrictLHSAssignment);
    +            }
    + 
    +            token = lex();
    +            right = parseAssignmentExpression();
    +            return delegate.createAssignmentExpression(token.value, left, right);
    +        }
    + 
    +        return left;
    +    }
    + 
    +    // 11.14 Comma Operator
    + 
    +    function parseExpression() {
    +        var expr = parseAssignmentExpression();
    + 
    +        if (match(',')) {
    +            expr = delegate.createSequenceExpression([ expr ]);
    + 
    +            while (index < length) {
    +                if (!match(',')) {
    +                    break;
    +                }
    +                lex();
    +                expr.expressions.push(parseAssignmentExpression());
    +            }
    + 
    +        }
    +        return expr;
    +    }
    + 
    +    // 12.1 Block
    + 
    +    function parseStatementList() {
    +        var list = [],
    +            statement;
    + 
    +        while (index < length) {
    +            if (match('}')) {
    +                break;
    +            }
    +            statement = parseSourceElement();
    +            if (typeof statement === 'undefined') {
    +                break;
    +            }
    +            list.push(statement);
    +        }
    + 
    +        return list;
    +    }
    + 
    +    function parseBlock() {
    +        var block;
    + 
    +        expect('{');
    + 
    +        block = parseStatementList();
    + 
    +        expect('}');
    + 
    +        return delegate.createBlockStatement(block);
    +    }
    + 
    +    // 12.2 Variable Statement
    + 
    +    function parseVariableIdentifier() {
    +        var token = lex();
    + 
    +        if (token.type !== Token.Identifier) {
    +            throwUnexpected(token);
    +        }
    + 
    +        return delegate.createIdentifier(token.value);
    +    }
    + 
    +    function parseVariableDeclaration(kind) {
    +        var id = parseVariableIdentifier(),
    +            init = null;
    + 
    +        // 12.2.1
    +        if (strict && isRestrictedWord(id.name)) {
    +            throwErrorTolerant({}, Messages.StrictVarName);
    +        }
    + 
    +        if (kind === 'const') {
    +            expect('=');
    +            init = parseAssignmentExpression();
    +        } else if (match('=')) {
    +            lex();
    +            init = parseAssignmentExpression();
    +        }
    + 
    +        return delegate.createVariableDeclarator(id, init);
    +    }
    + 
    +    function parseVariableDeclarationList(kind) {
    +        var list = [];
    + 
    +        do {
    +            list.push(parseVariableDeclaration(kind));
    +            if (!match(',')) {
    +                break;
    +            }
    +            lex();
    +        } while (index < length);
    + 
    +        return list;
    +    }
    + 
    +    function parseVariableStatement() {
    +        var declarations;
    + 
    +        expectKeyword('var');
    + 
    +        declarations = parseVariableDeclarationList();
    + 
    +        consumeSemicolon();
    + 
    +        return delegate.createVariableDeclaration(declarations, 'var');
    +    }
    + 
    +    // kind may be `const` or `let`
    +    // Both are experimental and not in the specification yet.
    +    // see http://wiki.ecmascript.org/doku.php?id=harmony:const
    +    // and http://wiki.ecmascript.org/doku.php?id=harmony:let
    +    function parseConstLetDeclaration(kind) {
    +        var declarations;
    + 
    +        expectKeyword(kind);
    + 
    +        declarations = parseVariableDeclarationList(kind);
    + 
    +        consumeSemicolon();
    + 
    +        return delegate.createVariableDeclaration(declarations, kind);
    +    }
    + 
    +    // 12.3 Empty Statement
    + 
    +    function parseEmptyStatement() {
    +        expect(';');
    +        return delegate.createEmptyStatement();
    +    }
    + 
    +    // 12.4 Expression Statement
    + 
    +    function parseExpressionStatement() {
    +        var expr = parseExpression();
    +        consumeSemicolon();
    +        return delegate.createExpressionStatement(expr);
    +    }
    + 
    +    // 12.5 If statement
    + 
    +    function parseIfStatement() {
    +        var test, consequent, alternate;
    + 
    +        expectKeyword('if');
    + 
    +        expect('(');
    + 
    +        test = parseExpression();
    + 
    +        expect(')');
    + 
    +        consequent = parseStatement();
    + 
    +        if (matchKeyword('else')) {
    +            lex();
    +            alternate = parseStatement();
    +        } else {
    +            alternate = null;
    +        }
    + 
    +        return delegate.createIfStatement(test, consequent, alternate);
    +    }
    + 
    +    // 12.6 Iteration Statements
    + 
    +    function parseDoWhileStatement() {
    +        var body, test, oldInIteration;
    + 
    +        expectKeyword('do');
    + 
    +        oldInIteration = state.inIteration;
    +        state.inIteration = true;
    + 
    +        body = parseStatement();
    + 
    +        state.inIteration = oldInIteration;
    + 
    +        expectKeyword('while');
    + 
    +        expect('(');
    + 
    +        test = parseExpression();
    + 
    +        expect(')');
    + 
    +        if (match(';')) {
    +            lex();
    +        }
    + 
    +        return delegate.createDoWhileStatement(body, test);
    +    }
    + 
    +    function parseWhileStatement() {
    +        var test, body, oldInIteration;
    + 
    +        expectKeyword('while');
    + 
    +        expect('(');
    + 
    +        test = parseExpression();
    + 
    +        expect(')');
    + 
    +        oldInIteration = state.inIteration;
    +        state.inIteration = true;
    + 
    +        body = parseStatement();
    + 
    +        state.inIteration = oldInIteration;
    + 
    +        return delegate.createWhileStatement(test, body);
    +    }
    + 
    +    function parseForVariableDeclaration() {
    +        var token = lex(),
    +            declarations = parseVariableDeclarationList();
    + 
    +        return delegate.createVariableDeclaration(declarations, token.value);
    +    }
    + 
    +    function parseForStatement() {
    +        var init, test, update, left, right, body, oldInIteration;
    + 
    +        init = test = update = null;
    + 
    +        expectKeyword('for');
    + 
    +        expect('(');
    + 
    +        if (match(';')) {
    +            lex();
    +        } else {
    +            if (matchKeyword('var') || matchKeyword('let')) {
    +                state.allowIn = false;
    +                init = parseForVariableDeclaration();
    +                state.allowIn = true;
    + 
    +                if (init.declarations.length === 1 && matchKeyword('in')) {
    +                    lex();
    +                    left = init;
    +                    right = parseExpression();
    +                    init = null;
    +                }
    +            } else {
    +                state.allowIn = false;
    +                init = parseExpression();
    +                state.allowIn = true;
    + 
    +                if (matchKeyword('in')) {
    +                    // LeftHandSideExpression
    +                    if (!isLeftHandSide(init)) {
    +                        throwError({}, Messages.InvalidLHSInForIn);
    +                    }
    + 
    +                    lex();
    +                    left = init;
    +                    right = parseExpression();
    +                    init = null;
    +                }
    +            }
    + 
    +            if (typeof left === 'undefined') {
    +                expect(';');
    +            }
    +        }
    + 
    +        if (typeof left === 'undefined') {
    + 
    +            if (!match(';')) {
    +                test = parseExpression();
    +            }
    +            expect(';');
    + 
    +            if (!match(')')) {
    +                update = parseExpression();
    +            }
    +        }
    + 
    +        expect(')');
    + 
    +        oldInIteration = state.inIteration;
    +        state.inIteration = true;
    + 
    +        body = parseStatement();
    + 
    +        state.inIteration = oldInIteration;
    + 
    +        return (typeof left === 'undefined') ?
    +                delegate.createForStatement(init, test, update, body) :
    +                delegate.createForInStatement(left, right, body);
    +    }
    + 
    +    // 12.7 The continue statement
    + 
    +    function parseContinueStatement() {
    +        var label = null, key;
    + 
    +        expectKeyword('continue');
    + 
    +        // Optimize the most common form: 'continue;'.
    +        if (source.charCodeAt(index) === 59) {
    +            lex();
    + 
    +            if (!state.inIteration) {
    +                throwError({}, Messages.IllegalContinue);
    +            }
    + 
    +            return delegate.createContinueStatement(null);
    +        }
    + 
    +        if (peekLineTerminator()) {
    +            if (!state.inIteration) {
    +                throwError({}, Messages.IllegalContinue);
    +            }
    + 
    +            return delegate.createContinueStatement(null);
    +        }
    + 
    +        if (lookahead.type === Token.Identifier) {
    +            label = parseVariableIdentifier();
    + 
    +            key = '$' + label.name;
    +            if (!Object.prototype.hasOwnProperty.call(state.labelSet, key)) {
    +                throwError({}, Messages.UnknownLabel, label.name);
    +            }
    +        }
    + 
    +        consumeSemicolon();
    + 
    +        if (label === null && !state.inIteration) {
    +            throwError({}, Messages.IllegalContinue);
    +        }
    + 
    +        return delegate.createContinueStatement(label);
    +    }
    + 
    +    // 12.8 The break statement
    + 
    +    function parseBreakStatement() {
    +        var label = null, key;
    + 
    +        expectKeyword('break');
    + 
    +        // Catch the very common case first: immediately a semicolon (char #59).
    +        if (source.charCodeAt(index) === 59) {
    +            lex();
    + 
    +            if (!(state.inIteration || state.inSwitch)) {
    +                throwError({}, Messages.IllegalBreak);
    +            }
    + 
    +            return delegate.createBreakStatement(null);
    +        }
    + 
    +        if (peekLineTerminator()) {
    +            if (!(state.inIteration || state.inSwitch)) {
    +                throwError({}, Messages.IllegalBreak);
    +            }
    + 
    +            return delegate.createBreakStatement(null);
    +        }
    + 
    +        if (lookahead.type === Token.Identifier) {
    +            label = parseVariableIdentifier();
    + 
    +            key = '$' + label.name;
    +            if (!Object.prototype.hasOwnProperty.call(state.labelSet, key)) {
    +                throwError({}, Messages.UnknownLabel, label.name);
    +            }
    +        }
    + 
    +        consumeSemicolon();
    + 
    +        if (label === null && !(state.inIteration || state.inSwitch)) {
    +            throwError({}, Messages.IllegalBreak);
    +        }
    + 
    +        return delegate.createBreakStatement(label);
    +    }
    + 
    +    // 12.9 The return statement
    + 
    +    function parseReturnStatement() {
    +        var argument = null;
    + 
    +        expectKeyword('return');
    + 
    +        if (!state.inFunctionBody) {
    +            throwErrorTolerant({}, Messages.IllegalReturn);
    +        }
    + 
    +        // 'return' followed by a space and an identifier is very common.
    +        if (source.charCodeAt(index) === 32) {
    +            if (isIdentifierStart(source.charCodeAt(index + 1))) {
    +                argument = parseExpression();
    +                consumeSemicolon();
    +                return delegate.createReturnStatement(argument);
    +            }
    +        }
    + 
    +        if (peekLineTerminator()) {
    +            return delegate.createReturnStatement(null);
    +        }
    + 
    +        if (!match(';')) {
    +            if (!match('}') && lookahead.type !== Token.EOF) {
    +                argument = parseExpression();
    +            }
    +        }
    + 
    +        consumeSemicolon();
    + 
    +        return delegate.createReturnStatement(argument);
    +    }
    + 
    +    // 12.10 The with statement
    + 
    +    function parseWithStatement() {
    +        var object, body;
    + 
    +        if (strict) {
    +            throwErrorTolerant({}, Messages.StrictModeWith);
    +        }
    + 
    +        expectKeyword('with');
    + 
    +        expect('(');
    + 
    +        object = parseExpression();
    + 
    +        expect(')');
    + 
    +        body = parseStatement();
    + 
    +        return delegate.createWithStatement(object, body);
    +    }
    + 
    +    // 12.10 The swith statement
    + 
    +    function parseSwitchCase() {
    +        var test,
    +            consequent = [],
    +            statement;
    + 
    +        if (matchKeyword('default')) {
    +            lex();
    +            test = null;
    +        } else {
    +            expectKeyword('case');
    +            test = parseExpression();
    +        }
    +        expect(':');
    + 
    +        while (index < length) {
    +            if (match('}') || matchKeyword('default') || matchKeyword('case')) {
    +                break;
    +            }
    +            statement = parseStatement();
    +            consequent.push(statement);
    +        }
    + 
    +        return delegate.createSwitchCase(test, consequent);
    +    }
    + 
    +    function parseSwitchStatement() {
    +        var discriminant, cases, clause, oldInSwitch, defaultFound;
    + 
    +        expectKeyword('switch');
    + 
    +        expect('(');
    + 
    +        discriminant = parseExpression();
    + 
    +        expect(')');
    + 
    +        expect('{');
    + 
    +        if (match('}')) {
    +            lex();
    +            return delegate.createSwitchStatement(discriminant);
    +        }
    + 
    +        cases = [];
    + 
    +        oldInSwitch = state.inSwitch;
    +        state.inSwitch = true;
    +        defaultFound = false;
    + 
    +        while (index < length) {
    +            if (match('}')) {
    +                break;
    +            }
    +            clause = parseSwitchCase();
    +            if (clause.test === null) {
    +                if (defaultFound) {
    +                    throwError({}, Messages.MultipleDefaultsInSwitch);
    +                }
    +                defaultFound = true;
    +            }
    +            cases.push(clause);
    +        }
    + 
    +        state.inSwitch = oldInSwitch;
    + 
    +        expect('}');
    + 
    +        return delegate.createSwitchStatement(discriminant, cases);
    +    }
    + 
    +    // 12.13 The throw statement
    + 
    +    function parseThrowStatement() {
    +        var argument;
    + 
    +        expectKeyword('throw');
    + 
    +        if (peekLineTerminator()) {
    +            throwError({}, Messages.NewlineAfterThrow);
    +        }
    + 
    +        argument = parseExpression();
    + 
    +        consumeSemicolon();
    + 
    +        return delegate.createThrowStatement(argument);
    +    }
    + 
    +    // 12.14 The try statement
    + 
    +    function parseCatchClause() {
    +        var param, body;
    + 
    +        expectKeyword('catch');
    + 
    +        expect('(');
    +        if (match(')')) {
    +            throwUnexpected(lookahead);
    +        }
    + 
    +        param = parseExpression();
    +        // 12.14.1
    +        if (strict && param.type === Syntax.Identifier && isRestrictedWord(param.name)) {
    +            throwErrorTolerant({}, Messages.StrictCatchVariable);
    +        }
    + 
    +        expect(')');
    +        body = parseBlock();
    +        return delegate.createCatchClause(param, body);
    +    }
    + 
    +    function parseTryStatement() {
    +        var block, handlers = [], finalizer = null;
    + 
    +        expectKeyword('try');
    + 
    +        block = parseBlock();
    + 
    +        if (matchKeyword('catch')) {
    +            handlers.push(parseCatchClause());
    +        }
    + 
    +        if (matchKeyword('finally')) {
    +            lex();
    +            finalizer = parseBlock();
    +        }
    + 
    +        if (handlers.length === 0 && !finalizer) {
    +            throwError({}, Messages.NoCatchOrFinally);
    +        }
    + 
    +        return delegate.createTryStatement(block, [], handlers, finalizer);
    +    }
    + 
    +    // 12.15 The debugger statement
    + 
    +    function parseDebuggerStatement() {
    +        expectKeyword('debugger');
    + 
    +        consumeSemicolon();
    + 
    +        return delegate.createDebuggerStatement();
    +    }
    + 
    +    // 12 Statements
    + 
    +    function parseStatement() {
    +        var type = lookahead.type,
    +            expr,
    +            labeledBody,
    +            key;
    + 
    +        if (type === Token.EOF) {
    +            throwUnexpected(lookahead);
    +        }
    + 
    +        if (type === Token.Punctuator) {
    +            switch (lookahead.value) {
    +            case ';':
    +                return parseEmptyStatement();
    +            case '{':
    +                return parseBlock();
    +            case '(':
    +                return parseExpressionStatement();
    +            default:
    +                break;
    +            }
    +        }
    + 
    +        if (type === Token.Keyword) {
    +            switch (lookahead.value) {
    +            case 'break':
    +                return parseBreakStatement();
    +            case 'continue':
    +                return parseContinueStatement();
    +            case 'debugger':
    +                return parseDebuggerStatement();
    +            case 'do':
    +                return parseDoWhileStatement();
    +            case 'for':
    +                return parseForStatement();
    +            case 'function':
    +                return parseFunctionDeclaration();
    +            case 'if':
    +                return parseIfStatement();
    +            case 'return':
    +                return parseReturnStatement();
    +            case 'switch':
    +                return parseSwitchStatement();
    +            case 'throw':
    +                return parseThrowStatement();
    +            case 'try':
    +                return parseTryStatement();
    +            case 'var':
    +                return parseVariableStatement();
    +            case 'while':
    +                return parseWhileStatement();
    +            case 'with':
    +                return parseWithStatement();
    +            default:
    +                break;
    +            }
    +        }
    + 
    +        expr = parseExpression();
    + 
    +        // 12.12 Labelled Statements
    +        if ((expr.type === Syntax.Identifier) && match(':')) {
    +            lex();
    + 
    +            key = '$' + expr.name;
    +            if (Object.prototype.hasOwnProperty.call(state.labelSet, key)) {
    +                throwError({}, Messages.Redeclaration, 'Label', expr.name);
    +            }
    + 
    +            state.labelSet[key] = true;
    +            labeledBody = parseStatement();
    +            delete state.labelSet[key];
    +            return delegate.createLabeledStatement(expr, labeledBody);
    +        }
    + 
    +        consumeSemicolon();
    + 
    +        return delegate.createExpressionStatement(expr);
    +    }
    + 
    +    // 13 Function Definition
    + 
    +    function parseFunctionSourceElements() {
    +        var sourceElement, sourceElements = [], token, directive, firstRestricted,
    +            oldLabelSet, oldInIteration, oldInSwitch, oldInFunctionBody;
    + 
    +        expect('{');
    + 
    +        while (index < length) {
    +            if (lookahead.type !== Token.StringLiteral) {
    +                break;
    +            }
    +            token = lookahead;
    + 
    +            sourceElement = parseSourceElement();
    +            sourceElements.push(sourceElement);
    +            if (sourceElement.expression.type !== Syntax.Literal) {
    +                // this is not directive
    +                break;
    +            }
    +            directive = source.slice(token.range[0] + 1, token.range[1] - 1);
    +            if (directive === 'use strict') {
    +                strict = true;
    +                if (firstRestricted) {
    +                    throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral);
    +                }
    +            } else {
    +                if (!firstRestricted && token.octal) {
    +                    firstRestricted = token;
    +                }
    +            }
    +        }
    + 
    +        oldLabelSet = state.labelSet;
    +        oldInIteration = state.inIteration;
    +        oldInSwitch = state.inSwitch;
    +        oldInFunctionBody = state.inFunctionBody;
    + 
    +        state.labelSet = {};
    +        state.inIteration = false;
    +        state.inSwitch = false;
    +        state.inFunctionBody = true;
    + 
    +        while (index < length) {
    +            if (match('}')) {
    +                break;
    +            }
    +            sourceElement = parseSourceElement();
    +            if (typeof sourceElement === 'undefined') {
    +                break;
    +            }
    +            sourceElements.push(sourceElement);
    +        }
    + 
    +        expect('}');
    + 
    +        state.labelSet = oldLabelSet;
    +        state.inIteration = oldInIteration;
    +        state.inSwitch = oldInSwitch;
    +        state.inFunctionBody = oldInFunctionBody;
    + 
    +        return delegate.createBlockStatement(sourceElements);
    +    }
    + 
    +    function parseParams(firstRestricted) {
    +        var param, params = [], token, stricted, paramSet, key, message;
    +        expect('(');
    + 
    +        if (!match(')')) {
    +            paramSet = {};
    +            while (index < length) {
    +                token = lookahead;
    +                param = parseVariableIdentifier();
    +                key = '$' + token.value;
    +                if (strict) {
    +                    if (isRestrictedWord(token.value)) {
    +                        stricted = token;
    +                        message = Messages.StrictParamName;
    +                    }
    +                    if (Object.prototype.hasOwnProperty.call(paramSet, key)) {
    +                        stricted = token;
    +                        message = Messages.StrictParamDupe;
    +                    }
    +                } else if (!firstRestricted) {
    +                    if (isRestrictedWord(token.value)) {
    +                        firstRestricted = token;
    +                        message = Messages.StrictParamName;
    +                    } else if (isStrictModeReservedWord(token.value)) {
    +                        firstRestricted = token;
    +                        message = Messages.StrictReservedWord;
    +                    } else if (Object.prototype.hasOwnProperty.call(paramSet, key)) {
    +                        firstRestricted = token;
    +                        message = Messages.StrictParamDupe;
    +                    }
    +                }
    +                params.push(param);
    +                paramSet[key] = true;
    +                if (match(')')) {
    +                    break;
    +                }
    +                expect(',');
    +            }
    +        }
    + 
    +        expect(')');
    + 
    +        return {
    +            params: params,
    +            stricted: stricted,
    +            firstRestricted: firstRestricted,
    +            message: message
    +        };
    +    }
    + 
    +    function parseFunctionDeclaration() {
    +        var id, params = [], body, token, stricted, tmp, firstRestricted, message, previousStrict;
    + 
    +        expectKeyword('function');
    +        token = lookahead;
    +        id = parseVariableIdentifier();
    +        if (strict) {
    +            if (isRestrictedWord(token.value)) {
    +                throwErrorTolerant(token, Messages.StrictFunctionName);
    +            }
    +        } else {
    +            if (isRestrictedWord(token.value)) {
    +                firstRestricted = token;
    +                message = Messages.StrictFunctionName;
    +            } else if (isStrictModeReservedWord(token.value)) {
    +                firstRestricted = token;
    +                message = Messages.StrictReservedWord;
    +            }
    +        }
    + 
    +        tmp = parseParams(firstRestricted);
    +        params = tmp.params;
    +        stricted = tmp.stricted;
    +        firstRestricted = tmp.firstRestricted;
    +        if (tmp.message) {
    +            message = tmp.message;
    +        }
    + 
    +        previousStrict = strict;
    +        body = parseFunctionSourceElements();
    +        if (strict && firstRestricted) {
    +            throwError(firstRestricted, message);
    +        }
    +        if (strict && stricted) {
    +            throwErrorTolerant(stricted, message);
    +        }
    +        strict = previousStrict;
    + 
    +        return delegate.createFunctionDeclaration(id, params, [], body);
    +    }
    + 
    +    function parseFunctionExpression() {
    +        var token, id = null, stricted, firstRestricted, message, tmp, params = [], body, previousStrict;
    + 
    +        expectKeyword('function');
    + 
    +        if (!match('(')) {
    +            token = lookahead;
    +            id = parseVariableIdentifier();
    +            if (strict) {
    +                if (isRestrictedWord(token.value)) {
    +                    throwErrorTolerant(token, Messages.StrictFunctionName);
    +                }
    +            } else {
    +                if (isRestrictedWord(token.value)) {
    +                    firstRestricted = token;
    +                    message = Messages.StrictFunctionName;
    +                } else if (isStrictModeReservedWord(token.value)) {
    +                    firstRestricted = token;
    +                    message = Messages.StrictReservedWord;
    +                }
    +            }
    +        }
    + 
    +        tmp = parseParams(firstRestricted);
    +        params = tmp.params;
    +        stricted = tmp.stricted;
    +        firstRestricted = tmp.firstRestricted;
    +        if (tmp.message) {
    +            message = tmp.message;
    +        }
    + 
    +        previousStrict = strict;
    +        body = parseFunctionSourceElements();
    +        if (strict && firstRestricted) {
    +            throwError(firstRestricted, message);
    +        }
    +        if (strict && stricted) {
    +            throwErrorTolerant(stricted, message);
    +        }
    +        strict = previousStrict;
    + 
    +        return delegate.createFunctionExpression(id, params, [], body);
    +    }
    + 
    +    // 14 Program
    + 
    +    function parseSourceElement() {
    +        if (lookahead.type === Token.Keyword) {
    +            switch (lookahead.value) {
    +            case 'const':
    +            case 'let':
    +                return parseConstLetDeclaration(lookahead.value);
    +            case 'function':
    +                return parseFunctionDeclaration();
    +            default:
    +                return parseStatement();
    +            }
    +        }
    + 
    +        if (lookahead.type !== Token.EOF) {
    +            return parseStatement();
    +        }
    +    }
    + 
    +    function parseSourceElements() {
    +        var sourceElement, sourceElements = [], token, directive, firstRestricted;
    + 
    +        while (index < length) {
    +            token = lookahead;
    +            if (token.type !== Token.StringLiteral) {
    +                break;
    +            }
    + 
    +            sourceElement = parseSourceElement();
    +            sourceElements.push(sourceElement);
    +            if (sourceElement.expression.type !== Syntax.Literal) {
    +                // this is not directive
    +                break;
    +            }
    +            directive = source.slice(token.range[0] + 1, token.range[1] - 1);
    +            if (directive === 'use strict') {
    +                strict = true;
    +                if (firstRestricted) {
    +                    throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral);
    +                }
    +            } else {
    +                if (!firstRestricted && token.octal) {
    +                    firstRestricted = token;
    +                }
    +            }
    +        }
    + 
    +        while (index < length) {
    +            sourceElement = parseSourceElement();
    +            if (typeof sourceElement === 'undefined') {
    +                break;
    +            }
    +            sourceElements.push(sourceElement);
    +        }
    +        return sourceElements;
    +    }
    + 
    +    function parseProgram() {
    +        var body;
    +        strict = false;
    +        peek();
    +        body = parseSourceElements();
    +        return delegate.createProgram(body);
    +    }
    + 
    +    // The following functions are needed only when the option to preserve
    +    // the comments is active.
    + 
    +    function addComment(type, value, start, end, loc) {
    +        assert(typeof start === 'number', 'Comment must have valid position');
    + 
    +        // Because the way the actual token is scanned, often the comments
    +        // (if any) are skipped twice during the lexical analysis.
    +        // Thus, we need to skip adding a comment if the comment array already
    +        // handled it.
    +        if (extra.comments.length > 0) {
    +            if (extra.comments[extra.comments.length - 1].range[1] > start) {
    +                return;
    +            }
    +        }
    + 
    +        extra.comments.push({
    +            type: type,
    +            value: value,
    +            range: [start, end],
    +            loc: loc
    +        });
    +    }
    + 
    +    function scanComment() {
    +        var comment, ch, loc, start, blockComment, lineComment;
    + 
    +        comment = '';
    +        blockComment = false;
    +        lineComment = false;
    + 
    +        while (index < length) {
    +            ch = source[index];
    + 
    +            if (lineComment) {
    +                ch = source[index++];
    +                if (isLineTerminator(ch.charCodeAt(0))) {
    +                    loc.end = {
    +                        line: lineNumber,
    +                        column: index - lineStart - 1
    +                    };
    +                    lineComment = false;
    +                    addComment('Line', comment, start, index - 1, loc);
    +                    if (ch === '\r' && source[index] === '\n') {
    +                        ++index;
    +                    }
    +                    ++lineNumber;
    +                    lineStart = index;
    +                    comment = '';
    +                } else if (index >= length) {
    +                    lineComment = false;
    +                    comment += ch;
    +                    loc.end = {
    +                        line: lineNumber,
    +                        column: length - lineStart
    +                    };
    +                    addComment('Line', comment, start, length, loc);
    +                } else {
    +                    comment += ch;
    +                }
    +            } else if (blockComment) {
    +                if (isLineTerminator(ch.charCodeAt(0))) {
    +                    if (ch === '\r' && source[index + 1] === '\n') {
    +                        ++index;
    +                        comment += '\r\n';
    +                    } else {
    +                        comment += ch;
    +                    }
    +                    ++lineNumber;
    +                    ++index;
    +                    lineStart = index;
    +                    if (index >= length) {
    +                        throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +                    }
    +                } else {
    +                    ch = source[index++];
    +                    if (index >= length) {
    +                        throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +                    }
    +                    comment += ch;
    +                    if (ch === '*') {
    +                        ch = source[index];
    +                        if (ch === '/') {
    +                            comment = comment.substr(0, comment.length - 1);
    +                            blockComment = false;
    +                            ++index;
    +                            loc.end = {
    +                                line: lineNumber,
    +                                column: index - lineStart
    +                            };
    +                            addComment('Block', comment, start, index, loc);
    +                            comment = '';
    +                        }
    +                    }
    +                }
    +            } else if (ch === '/') {
    +                ch = source[index + 1];
    +                if (ch === '/') {
    +                    loc = {
    +                        start: {
    +                            line: lineNumber,
    +                            column: index - lineStart
    +                        }
    +                    };
    +                    start = index;
    +                    index += 2;
    +                    lineComment = true;
    +                    if (index >= length) {
    +                        loc.end = {
    +                            line: lineNumber,
    +                            column: index - lineStart
    +                        };
    +                        lineComment = false;
    +                        addComment('Line', comment, start, index, loc);
    +                    }
    +                } else if (ch === '*') {
    +                    start = index;
    +                    index += 2;
    +                    blockComment = true;
    +                    loc = {
    +                        start: {
    +                            line: lineNumber,
    +                            column: index - lineStart - 2
    +                        }
    +                    };
    +                    if (index >= length) {
    +                        throwError({}, Messages.UnexpectedToken, 'ILLEGAL');
    +                    }
    +                } else {
    +                    break;
    +                }
    +            } else if (isWhiteSpace(ch.charCodeAt(0))) {
    +                ++index;
    +            } else if (isLineTerminator(ch.charCodeAt(0))) {
    +                ++index;
    +                if (ch ===  '\r' && source[index] === '\n') {
    +                    ++index;
    +                }
    +                ++lineNumber;
    +                lineStart = index;
    +            } else {
    +                break;
    +            }
    +        }
    +    }
    + 
    +    function filterCommentLocation() {
    +        var i, entry, comment, comments = [];
    + 
    +        for (i = 0; i < extra.comments.length; ++i) {
    +            entry = extra.comments[i];
    +            comment = {
    +                type: entry.type,
    +                value: entry.value
    +            };
    +            if (extra.range) {
    +                comment.range = entry.range;
    +            }
    +            if (extra.loc) {
    +                comment.loc = entry.loc;
    +            }
    +            comments.push(comment);
    +        }
    + 
    +        extra.comments = comments;
    +    }
    + 
    +    function collectToken() {
    +        var start, loc, token, range, value;
    + 
    +        skipComment();
    +        start = index;
    +        loc = {
    +            start: {
    +                line: lineNumber,
    +                column: index - lineStart
    +            }
    +        };
    + 
    +        token = extra.advance();
    +        loc.end = {
    +            line: lineNumber,
    +            column: index - lineStart
    +        };
    + 
    +        if (token.type !== Token.EOF) {
    +            range = [token.range[0], token.range[1]];
    +            value = source.slice(token.range[0], token.range[1]);
    +            extra.tokens.push({
    +                type: TokenName[token.type],
    +                value: value,
    +                range: range,
    +                loc: loc
    +            });
    +        }
    + 
    +        return token;
    +    }
    + 
    +    function collectRegex() {
    +        var pos, loc, regex, token;
    + 
    +        skipComment();
    + 
    +        pos = index;
    +        loc = {
    +            start: {
    +                line: lineNumber,
    +                column: index - lineStart
    +            }
    +        };
    + 
    +        regex = extra.scanRegExp();
    +        loc.end = {
    +            line: lineNumber,
    +            column: index - lineStart
    +        };
    + 
    +        // Pop the previous token, which is likely '/' or '/='
    +        Eif (extra.tokens.length > 0) {
    +            token = extra.tokens[extra.tokens.length - 1];
    +            Eif (token.range[0] === pos && token.type === 'Punctuator') {
    +                Eif (token.value === '/' || token.value === '/=') {
    +                    extra.tokens.pop();
    +                }
    +            }
    +        }
    + 
    +        extra.tokens.push({
    +            type: 'RegularExpression',
    +            value: regex.literal,
    +            range: [pos, index],
    +            loc: loc
    +        });
    + 
    +        return regex;
    +    }
    + 
    +    function filterTokenLocation() {
    +        var i, entry, token, tokens = [];
    + 
    +        for (i = 0; i < extra.tokens.length; ++i) {
    +            entry = extra.tokens[i];
    +            token = {
    +                type: entry.type,
    +                value: entry.value
    +            };
    +            if (extra.range) {
    +                token.range = entry.range;
    +            }
    +            if (extra.loc) {
    +                token.loc = entry.loc;
    +            }
    +            tokens.push(token);
    +        }
    + 
    +        extra.tokens = tokens;
    +    }
    + 
    +    function createLocationMarker() {
    +        var marker = {};
    + 
    +        marker.range = [index, index];
    +        marker.loc = {
    +            start: {
    +                line: lineNumber,
    +                column: index - lineStart
    +            },
    +            end: {
    +                line: lineNumber,
    +                column: index - lineStart
    +            }
    +        };
    + 
    +        marker.end = function () {
    +            this.range[1] = index;
    +            this.loc.end.line = lineNumber;
    +            this.loc.end.column = index - lineStart;
    +        };
    + 
    +        marker.applyGroup = function (node) {
    +            Eif (extra.range) {
    +                node.groupRange = [this.range[0], this.range[1]];
    +            }
    +            Eif (extra.loc) {
    +                node.groupLoc = {
    +                    start: {
    +                        line: this.loc.start.line,
    +                        column: this.loc.start.column
    +                    },
    +                    end: {
    +                        line: this.loc.end.line,
    +                        column: this.loc.end.column
    +                    }
    +                };
    +            }
    +        };
    + 
    +        marker.apply = function (node) {
    +            if (extra.range) {
    +                node.range = [this.range[0], this.range[1]];
    +            }
    +            if (extra.loc) {
    +                node.loc = {
    +                    start: {
    +                        line: this.loc.start.line,
    +                        column: this.loc.start.column
    +                    },
    +                    end: {
    +                        line: this.loc.end.line,
    +                        column: this.loc.end.column
    +                    }
    +                };
    +            }
    +        };
    + 
    +        return marker;
    +    }
    + 
    +    function trackGroupExpression() {
    +        var marker, expr;
    + 
    +        skipComment();
    +        marker = createLocationMarker();
    +        expect('(');
    + 
    +        expr = parseExpression();
    + 
    +        expect(')');
    + 
    +        marker.end();
    +        marker.applyGroup(expr);
    + 
    +        return expr;
    +    }
    + 
    +    function trackLeftHandSideExpression() {
    +        var marker, expr, property;
    + 
    +        skipComment();
    +        marker = createLocationMarker();
    + 
    +        expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression();
    + 
    +        while (match('.') || match('[')) {
    +            if (match('[')) {
    +                property = parseComputedMember();
    +                expr = delegate.createMemberExpression('[', expr, property);
    +                marker.end();
    +                marker.apply(expr);
    +            } else {
    +                property = parseNonComputedMember();
    +                expr = delegate.createMemberExpression('.', expr, property);
    +                marker.end();
    +                marker.apply(expr);
    +            }
    +        }
    + 
    +        return expr;
    +    }
    + 
    +    function trackLeftHandSideExpressionAllowCall() {
    +        var marker, expr, args, property;
    + 
    +        skipComment();
    +        marker = createLocationMarker();
    + 
    +        expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression();
    + 
    +        while (match('.') || match('[') || match('(')) {
    +            if (match('(')) {
    +                args = parseArguments();
    +                expr = delegate.createCallExpression(expr, args);
    +                marker.end();
    +                marker.apply(expr);
    +            } else if (match('[')) {
    +                property = parseComputedMember();
    +                expr = delegate.createMemberExpression('[', expr, property);
    +                marker.end();
    +                marker.apply(expr);
    +            } else {
    +                property = parseNonComputedMember();
    +                expr = delegate.createMemberExpression('.', expr, property);
    +                marker.end();
    +                marker.apply(expr);
    +            }
    +        }
    + 
    +        return expr;
    +    }
    + 
    +    function filterGroup(node) {
    +        var n, i, entry;
    + 
    +        n = (Object.prototype.toString.apply(node) === '[object Array]') ? [] : {};
    +        for (i in node) {
    +            if (node.hasOwnProperty(i) && i !== 'groupRange' && i !== 'groupLoc') {
    +                entry = node[i];
    +                if (entry === null || typeof entry !== 'object' || entry instanceof RegExp) {
    +                    n[i] = entry;
    +                } else {
    +                    n[i] = filterGroup(entry);
    +                }
    +            }
    +        }
    +        return n;
    +    }
    + 
    +    function wrapTrackingFunction(range, loc) {
    + 
    +        return function (parseFunction) {
    + 
    +            function isBinary(node) {
    +                return node.type === Syntax.LogicalExpression ||
    +                    node.type === Syntax.BinaryExpression;
    +            }
    + 
    +            function visit(node) {
    +                var start, end;
    + 
    +                if (isBinary(node.left)) {
    +                    visit(node.left);
    +                }
    +                if (isBinary(node.right)) {
    +                    visit(node.right);
    +                }
    + 
    +                Eif (range) {
    +                    if (node.left.groupRange || node.right.groupRange) {
    +                        start = node.left.groupRange ? node.left.groupRange[0] : node.left.range[0];
    +                        end = node.right.groupRange ? node.right.groupRange[1] : node.right.range[1];
    +                        node.range = [start, end];
    +                    } else if (typeof node.range === 'undefined') {
    +                        start = node.left.range[0];
    +                        end = node.right.range[1];
    +                        node.range = [start, end];
    +                    }
    +                }
    +                Eif (loc) {
    +                    if (node.left.groupLoc || node.right.groupLoc) {
    +                        start = node.left.groupLoc ? node.left.groupLoc.start : node.left.loc.start;
    +                        end = node.right.groupLoc ? node.right.groupLoc.end : node.right.loc.end;
    +                        node.loc = {
    +                            start: start,
    +                            end: end
    +                        };
    +                    } else if (typeof node.loc === 'undefined') {
    +                        node.loc = {
    +                            start: node.left.loc.start,
    +                            end: node.right.loc.end
    +                        };
    +                    }
    +                }
    +            }
    + 
    +            return function () {
    +                var marker, node;
    + 
    +                skipComment();
    + 
    +                marker = createLocationMarker();
    +                node = parseFunction.apply(null, arguments);
    +                marker.end();
    + 
    +                if (range && typeof node.range === 'undefined') {
    +                    marker.apply(node);
    +                }
    + 
    +                if (loc && typeof node.loc === 'undefined') {
    +                    marker.apply(node);
    +                }
    + 
    +                if (isBinary(node)) {
    +                    visit(node);
    +                }
    + 
    +                return node;
    +            };
    +        };
    +    }
    + 
    +    function patch() {
    + 
    +        var wrapTracking;
    + 
    +        if (extra.comments) {
    +            extra.skipComment = skipComment;
    +            skipComment = scanComment;
    +        }
    + 
    +        if (extra.range || extra.loc) {
    + 
    +            extra.parseGroupExpression = parseGroupExpression;
    +            extra.parseLeftHandSideExpression = parseLeftHandSideExpression;
    +            extra.parseLeftHandSideExpressionAllowCall = parseLeftHandSideExpressionAllowCall;
    +            parseGroupExpression = trackGroupExpression;
    +            parseLeftHandSideExpression = trackLeftHandSideExpression;
    +            parseLeftHandSideExpressionAllowCall = trackLeftHandSideExpressionAllowCall;
    + 
    +            wrapTracking = wrapTrackingFunction(extra.range, extra.loc);
    + 
    +            extra.parseAssignmentExpression = parseAssignmentExpression;
    +            extra.parseBinaryExpression = parseBinaryExpression;
    +            extra.parseBlock = parseBlock;
    +            extra.parseFunctionSourceElements = parseFunctionSourceElements;
    +            extra.parseCatchClause = parseCatchClause;
    +            extra.parseComputedMember = parseComputedMember;
    +            extra.parseConditionalExpression = parseConditionalExpression;
    +            extra.parseConstLetDeclaration = parseConstLetDeclaration;
    +            extra.parseExpression = parseExpression;
    +            extra.parseForVariableDeclaration = parseForVariableDeclaration;
    +            extra.parseFunctionDeclaration = parseFunctionDeclaration;
    +            extra.parseFunctionExpression = parseFunctionExpression;
    +            extra.parseNewExpression = parseNewExpression;
    +            extra.parseNonComputedProperty = parseNonComputedProperty;
    +            extra.parseObjectProperty = parseObjectProperty;
    +            extra.parseObjectPropertyKey = parseObjectPropertyKey;
    +            extra.parsePostfixExpression = parsePostfixExpression;
    +            extra.parsePrimaryExpression = parsePrimaryExpression;
    +            extra.parseProgram = parseProgram;
    +            extra.parsePropertyFunction = parsePropertyFunction;
    +            extra.parseStatement = parseStatement;
    +            extra.parseSwitchCase = parseSwitchCase;
    +            extra.parseUnaryExpression = parseUnaryExpression;
    +            extra.parseVariableDeclaration = parseVariableDeclaration;
    +            extra.parseVariableIdentifier = parseVariableIdentifier;
    + 
    +            parseAssignmentExpression = wrapTracking(extra.parseAssignmentExpression);
    +            parseBinaryExpression = wrapTracking(extra.parseBinaryExpression);
    +            parseBlock = wrapTracking(extra.parseBlock);
    +            parseFunctionSourceElements = wrapTracking(extra.parseFunctionSourceElements);
    +            parseCatchClause = wrapTracking(extra.parseCatchClause);
    +            parseComputedMember = wrapTracking(extra.parseComputedMember);
    +            parseConditionalExpression = wrapTracking(extra.parseConditionalExpression);
    +            parseConstLetDeclaration = wrapTracking(extra.parseConstLetDeclaration);
    +            parseExpression = wrapTracking(extra.parseExpression);
    +            parseForVariableDeclaration = wrapTracking(extra.parseForVariableDeclaration);
    +            parseFunctionDeclaration = wrapTracking(extra.parseFunctionDeclaration);
    +            parseFunctionExpression = wrapTracking(extra.parseFunctionExpression);
    +            parseLeftHandSideExpression = wrapTracking(parseLeftHandSideExpression);
    +            parseNewExpression = wrapTracking(extra.parseNewExpression);
    +            parseNonComputedProperty = wrapTracking(extra.parseNonComputedProperty);
    +            parseObjectProperty = wrapTracking(extra.parseObjectProperty);
    +            parseObjectPropertyKey = wrapTracking(extra.parseObjectPropertyKey);
    +            parsePostfixExpression = wrapTracking(extra.parsePostfixExpression);
    +            parsePrimaryExpression = wrapTracking(extra.parsePrimaryExpression);
    +            parseProgram = wrapTracking(extra.parseProgram);
    +            parsePropertyFunction = wrapTracking(extra.parsePropertyFunction);
    +            parseStatement = wrapTracking(extra.parseStatement);
    +            parseSwitchCase = wrapTracking(extra.parseSwitchCase);
    +            parseUnaryExpression = wrapTracking(extra.parseUnaryExpression);
    +            parseVariableDeclaration = wrapTracking(extra.parseVariableDeclaration);
    +            parseVariableIdentifier = wrapTracking(extra.parseVariableIdentifier);
    +        }
    + 
    +        if (typeof extra.tokens !== 'undefined') {
    +            extra.advance = advance;
    +            extra.scanRegExp = scanRegExp;
    + 
    +            advance = collectToken;
    +            scanRegExp = collectRegex;
    +        }
    +    }
    + 
    +    function unpatch() {
    +        if (typeof extra.skipComment === 'function') {
    +            skipComment = extra.skipComment;
    +        }
    + 
    +        if (extra.range || extra.loc) {
    +            parseAssignmentExpression = extra.parseAssignmentExpression;
    +            parseBinaryExpression = extra.parseBinaryExpression;
    +            parseBlock = extra.parseBlock;
    +            parseFunctionSourceElements = extra.parseFunctionSourceElements;
    +            parseCatchClause = extra.parseCatchClause;
    +            parseComputedMember = extra.parseComputedMember;
    +            parseConditionalExpression = extra.parseConditionalExpression;
    +            parseConstLetDeclaration = extra.parseConstLetDeclaration;
    +            parseExpression = extra.parseExpression;
    +            parseForVariableDeclaration = extra.parseForVariableDeclaration;
    +            parseFunctionDeclaration = extra.parseFunctionDeclaration;
    +            parseFunctionExpression = extra.parseFunctionExpression;
    +            parseGroupExpression = extra.parseGroupExpression;
    +            parseLeftHandSideExpression = extra.parseLeftHandSideExpression;
    +            parseLeftHandSideExpressionAllowCall = extra.parseLeftHandSideExpressionAllowCall;
    +            parseNewExpression = extra.parseNewExpression;
    +            parseNonComputedProperty = extra.parseNonComputedProperty;
    +            parseObjectProperty = extra.parseObjectProperty;
    +            parseObjectPropertyKey = extra.parseObjectPropertyKey;
    +            parsePrimaryExpression = extra.parsePrimaryExpression;
    +            parsePostfixExpression = extra.parsePostfixExpression;
    +            parseProgram = extra.parseProgram;
    +            parsePropertyFunction = extra.parsePropertyFunction;
    +            parseStatement = extra.parseStatement;
    +            parseSwitchCase = extra.parseSwitchCase;
    +            parseUnaryExpression = extra.parseUnaryExpression;
    +            parseVariableDeclaration = extra.parseVariableDeclaration;
    +            parseVariableIdentifier = extra.parseVariableIdentifier;
    +        }
    + 
    +        if (typeof extra.scanRegExp === 'function') {
    +            advance = extra.advance;
    +            scanRegExp = extra.scanRegExp;
    +        }
    +    }
    + 
    +    function parse(code, options) {
    +        var program, toString;
    + 
    +        toString = String;
    +        if (typeof code !== 'string' && !(code instanceof String)) {
    +            code = toString(code);
    +        }
    + 
    +        delegate = SyntaxTreeDelegate;
    +        source = code;
    +        index = 0;
    +        lineNumber = (source.length > 0) ? 1 : 0;
    +        lineStart = 0;
    +        length = source.length;
    +        lookahead = null;
    +        state = {
    +            allowIn: true,
    +            labelSet: {},
    +            inFunctionBody: false,
    +            inIteration: false,
    +            inSwitch: false
    +        };
    + 
    +        extra = {};
    +        if (typeof options !== 'undefined') {
    +            extra.range = (typeof options.range === 'boolean') && options.range;
    +            extra.loc = (typeof options.loc === 'boolean') && options.loc;
    + 
    +            if (typeof options.tokens === 'boolean' && options.tokens) {
    +                extra.tokens = [];
    +            }
    +            if (typeof options.comment === 'boolean' && options.comment) {
    +                extra.comments = [];
    +            }
    +            if (typeof options.tolerant === 'boolean' && options.tolerant) {
    +                extra.errors = [];
    +            }
    +        }
    + 
    +        if (length > 0) {
    +            Iif (typeof source[0] === 'undefined') {
    +                // Try first to convert to a string. This is good as fast path
    +                // for old IE which understands string indexing for string
    +                // literals only and not for string object.
    +                if (code instanceof String) {
    +                    source = code.valueOf();
    +                }
    +            }
    +        }
    + 
    +        patch();
    +        try {
    +            program = parseProgram();
    +            if (typeof extra.comments !== 'undefined') {
    +                filterCommentLocation();
    +                program.comments = extra.comments;
    +            }
    +            if (typeof extra.tokens !== 'undefined') {
    +                filterTokenLocation();
    +                program.tokens = extra.tokens;
    +            }
    +            if (typeof extra.errors !== 'undefined') {
    +                program.errors = extra.errors;
    +            }
    +            if (extra.range || extra.loc) {
    +                program.body = filterGroup(program.body);
    +            }
    +        } catch (e) {
    +            throw e;
    +        } finally {
    +            unpatch();
    +            extra = {};
    +        }
    + 
    +        return program;
    +    }
    + 
    +    // Sync with package.json and component.json.
    +    exports.version = '1.1.0-dev';
    + 
    +    exports.parse = parse;
    + 
    +    // Deep copy.
    +    exports.Syntax = (function () {
    +        var name, types = {};
    + 
    +        Eif (typeof Object.create === 'function') {
    +            types = Object.create(null);
    +        }
    + 
    +        for (name in Syntax) {
    +            Eif (Syntax.hasOwnProperty(name)) {
    +                types[name] = Syntax[name];
    +            }
    +        }
    + 
    +        Eif (typeof Object.freeze === 'function') {
    +            Object.freeze(types);
    +        }
    + 
    +        return types;
    +    }());
    + 
    +}));
    +/* vim: set sw=4 ts=4 et tw=80 : */
    + 
    + +
    + + + + + + + + diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/fbtest.js b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/fbtest.js new file mode 100644 index 00000000..6570cbf8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/fbtest.js @@ -0,0 +1,3124 @@ +var testFixture; + +var fbTestFixture = { + 'XJS': { + '': { + type: "ExpressionStatement", + expression: { + type: "XJSElement", + openingElement: { + type: "XJSOpeningElement", + name: { + type: "XJSIdentifier", + name: "a", + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + selfClosing: true, + attributes: [], + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + children: [], + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + '': { + type: "ExpressionStatement", + expression: { + type: "XJSElement", + openingElement: { + type: "XJSOpeningElement", + name: { + type: "XJSIdentifier", + name: "a", + namespace: "n", + range: [1, 4], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 4 } + } + }, + selfClosing: true, + attributes: [ + { + type: "XJSAttribute", + name: { + type: "XJSIdentifier", + name: "v", + namespace: "n", + range: [5, 8], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 8 } + } + }, + range: [5, 8], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 8 } + } + } + ], + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + children: [], + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + ' {value} ': { + type: "ExpressionStatement", + expression: { + type: "XJSElement", + openingElement: { + type: "XJSOpeningElement", + name: { + type: "XJSIdentifier", + name: "a", + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + selfClosing: false, + attributes: [ + { + type: "XJSAttribute", + name: { + type: "XJSIdentifier", + name: "foo", + namespace: "n", + range: [3, 8], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 8 } + } + }, + value: { + type: "Literal", + value: "bar", + raw: "\"bar\"", + range: [9, 14], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 14 } + } + }, + range: [3, 14], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 14 } + } + } + ], + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + closingElement: { + type: "XJSClosingElement", + name: { + type: "XJSIdentifier", + name: "a", + range: [38, 39], + loc: { + start: { line: 1, column: 38 }, + end: { line: 1, column: 39 } + } + }, + range: [36, 40], + loc: { + start: { line: 1, column: 36 }, + end: { line: 1, column: 40 } + } + }, + children: [ + { + type: "Literal", + value: " ", + raw: " ", + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }, + { + type: "XJSExpressionContainer", + expression: { + type: "Identifier", + name: "value", + range: [17, 22], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 22 } + } + }, + range: [16, 23], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 23 } + } + }, + { + type: "Literal", + value: " ", + raw: " ", + range: [23, 24], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 24 } + } + }, + { + type: "XJSElement", + openingElement: { + type: "XJSOpeningElement", + name: { + type: "XJSIdentifier", + name: "b", + range: [25, 26], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 26 } + } + }, + selfClosing: false, + attributes: [], + range: [24, 27], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 27 } + } + }, + closingElement: { + type: "XJSClosingElement", + name: { + type: "XJSIdentifier", + name: "b", + range: [34, 35], + loc: { + start: { line: 1, column: 34 }, + end: { line: 1, column: 35 } + } + }, + range: [32, 36], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 36 } + } + }, + children: [ + { + type: "XJSElement", + openingElement: { + type: "XJSOpeningElement", + name: { + type: "XJSIdentifier", + name: "c", + range: [28, 29], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 29 } + } + }, + selfClosing: true, + attributes: [], + range: [27, 32], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 32 } + } + }, + children: [], + range: [27, 32], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 32 } + } + } + ], + range: [24, 36], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 36 } + } + } + ], + range: [0, 40], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 40 } + } + }, + range: [0, 40], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 40 } + } + }, + '': { + type: "ExpressionStatement", + expression: { + type: "XJSElement", + openingElement: { + type: "XJSOpeningElement", + name: { + type: "XJSIdentifier", + name: "a", + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + selfClosing: true, + attributes: [ + { + type: "XJSAttribute", + name: { + type: "XJSIdentifier", + name: "b", + range: [3, 4], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 4 } + } + }, + value: { + type: "XJSExpressionContainer", + expression: { + type: "Literal", + value: " ", + raw: "\" \"", + range: [6, 9], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 9 } + } + }, + range: [5, 10], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 10 } + } + }, + range: [3, 10], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 10 } + } + }, + { + type: "XJSAttribute", + name: { + type: "XJSIdentifier", + name: "c", + range: [11, 12], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 12 } + } + }, + value: { + type: "Literal", + value: " ", + raw: "\" \"", + range: [13, 16], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 16 } + } + }, + range: [11, 16], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 16 } + } + }, + { + type: "XJSAttribute", + name: { + type: "XJSIdentifier", + name: "d", + range: [17, 18], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 18 } + } + }, + value: { + type: "Literal", + value: "&", + raw: "\"&\"", + range: [19, 26], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 26 } + } + }, + range: [17, 26], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 26 } + } + } + ], + range: [0, 29], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 29 } + } + }, + children: [], + range: [0, 29], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 29 } + } + }, + range: [0, 29], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 29 } + } + }, + '': { + type: "ExpressionStatement", + expression: { + type: "XJSElement", + openingElement: { + type: "XJSOpeningElement", + name: { + type: "XJSIdentifier", + name: "a", + range: [ + 1, + 2 + ], + loc: { + start: { + line: 1, + column: 1 + }, + end: { + line: 1, + column: 2 + } + } + }, + selfClosing: true, + attributes: [], + range: [ + 0, + 5 + ], + loc: { + start: { + line: 1, + column: 0 + }, + end: { + line: 2, + column: 2 + } + } + }, + children: [], + range: [ + 0, + 5 + ], + loc: { + start: { + line: 1, + column: 0 + }, + end: { + line: 2, + column: 2 + } + } + }, + range: [ + 0, + 5 + ], + loc: { + start: { + line: 1, + column: 0 + }, + end: { + line: 2, + column: 2 + } + } + }, + '<日本語>': { + type: "ExpressionStatement", + expression: { + type: "XJSElement", + openingElement: { + type: "XJSOpeningElement", + name: { + type: "XJSIdentifier", + name: "日本語", + range: [ + 1, + 4 + ], + loc: { + start: { + line: 1, + column: 1 + }, + end: { + line: 1, + column: 4 + } + } + }, + selfClosing: false, + attributes: [], + range: [ + 0, + 5 + ], + loc: { + start: { + line: 1, + column: 0 + }, + end: { + line: 1, + column: 5 + } + } + }, + closingElement: { + type: "XJSClosingElement", + name: { + type: "XJSIdentifier", + name: "日本語", + range: [ + 7, + 10 + ], + loc: { + start: { + line: 1, + column: 7 + }, + end: { + line: 1, + column: 10 + } + } + }, + range: [ + 5, + 11 + ], + loc: { + start: { + line: 1, + column: 5 + }, + end: { + line: 1, + column: 11 + } + } + }, + children: [], + range: [ + 0, + 11 + ], + loc: { + start: { + line: 1, + column: 0 + }, + end: { + line: 1, + column: 11 + } + } + }, + range: [ + 0, + 11 + ], + loc: { + start: { + line: 1, + column: 0 + }, + end: { + line: 1, + column: 11 + } + } + }, + + '\nbar\nbaz\n': { + type: "ExpressionStatement", + expression: { + type: "XJSElement", + openingElement: { + type: "XJSOpeningElement", + name: { + type: "XJSIdentifier", + name: "AbC-def", + range: [ + 1, + 8 + ], + loc: { + start: { + line: 1, + column: 1 + }, + end: { + line: 1, + column: 8 + } + } + }, + selfClosing: false, + attributes: [ + { + type: "XJSAttribute", + name: { + type: "XJSIdentifier", + name: "test", + range: [ + 11, + 15 + ], + loc: { + start: { + line: 2, + column: 2 + }, + end: { + line: 2, + column: 6 + } + } + }, + value: { + type: "Literal", + value: "&&", + raw: "\"&&\"", + range: [ + 16, + 31 + ], + loc: { + start: { + line: 2, + column: 7 + }, + end: { + line: 2, + column: 22 + } + } + }, + range: [ + 11, + 31 + ], + loc: { + start: { + line: 2, + column: 2 + }, + end: { + line: 2, + column: 22 + } + } + } + ], + range: [ + 0, + 32 + ], + loc: { + start: { + line: 1, + column: 0 + }, + end: { + line: 2, + column: 23 + } + } + }, + closingElement: { + type: "XJSClosingElement", + name: { + type: "XJSIdentifier", + name: "AbC-def", + range: [ + 43, + 50 + ], + loc: { + start: { + line: 5, + column: 2 + }, + end: { + line: 5, + column: 9 + } + } + }, + range: [ + 41, + 51 + ], + loc: { + start: { + line: 5, + column: 0 + }, + end: { + line: 5, + column: 10 + } + } + }, + children: [ + { + type: "Literal", + value: "\nbar\nbaz\n", + raw: "\nbar\nbaz\n", + range: [ + 32, + 41 + ], + loc: { + start: { + line: 2, + column: 23 + }, + end: { + line: 5, + column: 0 + } + } + } + ], + range: [ + 0, + 51 + ], + loc: { + start: { + line: 1, + column: 0 + }, + end: { + line: 5, + column: 10 + } + } + }, + range: [ + 0, + 51 + ], + loc: { + start: { + line: 1, + column: 0 + }, + end: { + line: 5, + column: 10 + } + } + }, + + ' : } />': { + type: "ExpressionStatement", + expression: { + type: "XJSElement", + openingElement: { + type: "XJSOpeningElement", + name: { + type: "XJSIdentifier", + name: "a", + range: [ + 1, + 2 + ], + loc: { + start: { + line: 1, + column: 1 + }, + end: { + line: 1, + column: 2 + } + } + }, + selfClosing: true, + attributes: [ + { + type: "XJSAttribute", + name: { + type: "XJSIdentifier", + name: "b", + range: [ + 3, + 4 + ], + loc: { + start: { + line: 1, + column: 3 + }, + end: { + line: 1, + column: 4 + } + } + }, + value: { + type: "XJSExpressionContainer", + expression: { + type: "ConditionalExpression", + test: { + type: "Identifier", + name: "x", + range: [ + 6, + 7 + ], + loc: { + start: { + line: 1, + column: 6 + }, + end: { + line: 1, + column: 7 + } + } + }, + consequent: { + type: "XJSElement", + openingElement: { + type: "XJSOpeningElement", + name: { + type: "XJSIdentifier", + name: "c", + range: [ + 11, + 12 + ], + loc: { + start: { + line: 1, + column: 11 + }, + end: { + line: 1, + column: 12 + } + } + }, + selfClosing: true, + attributes: [], + range: [ + 10, + 15 + ], + loc: { + start: { + line: 1, + column: 10 + }, + end: { + line: 1, + column: 15 + } + } + }, + children: [], + range: [ + 10, + 15 + ], + loc: { + start: { + line: 1, + column: 10 + }, + end: { + line: 1, + column: 15 + } + } + }, + alternate: { + type: "XJSElement", + openingElement: { + type: "XJSOpeningElement", + name: { + type: "XJSIdentifier", + name: "d", + range: [ + 19, + 20 + ], + loc: { + start: { + line: 1, + column: 19 + }, + end: { + line: 1, + column: 20 + } + } + }, + selfClosing: true, + attributes: [], + range: [ + 18, + 23 + ], + loc: { + start: { + line: 1, + column: 18 + }, + end: { + line: 1, + column: 23 + } + } + }, + children: [], + range: [ + 18, + 23 + ], + loc: { + start: { + line: 1, + column: 18 + }, + end: { + line: 1, + column: 23 + } + } + }, + range: [ + 6, + 23 + ], + loc: { + start: { + line: 1, + column: 6 + }, + end: { + line: 1, + column: 23 + } + } + }, + range: [ + 5, + 24 + ], + loc: { + start: { + line: 1, + column: 5 + }, + end: { + line: 1, + column: 24 + } + } + }, + range: [ + 3, + 24 + ], + loc: { + start: { + line: 1, + column: 3 + }, + end: { + line: 1, + column: 24 + } + } + } + ], + range: [ + 0, + 27 + ], + loc: { + start: { + line: 1, + column: 0 + }, + end: { + line: 1, + column: 27 + } + } + }, + children: [], + range: [ + 0, + 27 + ], + loc: { + start: { + line: 1, + column: 0 + }, + end: { + line: 1, + column: 27 + } + } + }, + range: [ + 0, + 27 + ], + loc: { + start: { + line: 1, + column: 0 + }, + end: { + line: 1, + column: 27 + } + } + }, + + '{}': { + type: 'ExpressionStatement', + expression: { + type: 'XJSElement', + openingElement: { + type: 'XJSOpeningElement', + name: { + type: 'XJSIdentifier', + name: 'a', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + selfClosing: false, + attributes: [], + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + closingElement: { + type: 'XJSClosingElement', + name: { + type: 'XJSIdentifier', + name: 'a', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + range: [5, 9], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 9 } + } + }, + children: [{ + type: 'XJSExpressionContainer', + expression: { + type: 'XJSEmptyExpression', + range: [4, 4], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 4 } + } + }, + range: [3, 5], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 5 } + } + }], + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + '{/* this is a comment */}': { + type: 'ExpressionStatement', + expression: { + type: 'XJSElement', + openingElement: { + type: 'XJSOpeningElement', + name: { + type: 'XJSIdentifier', + name: 'a', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + selfClosing: false, + attributes: [], + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + closingElement: { + type: 'XJSClosingElement', + name: { + type: 'XJSIdentifier', + name: 'a', + range: [30, 31], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 31 } + } + }, + range: [28, 32], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 32 } + } + }, + children: [{ + type: 'XJSExpressionContainer', + expression: { + type: 'XJSEmptyExpression', + range: [4, 27], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 27 } + } + }, + range: [3, 28], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 28 } + } + }], + range: [0, 32], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 32 } + } + }, + range: [0, 32], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 32 } + } + }, + + '
    @test content
    ': { + type: 'ExpressionStatement', + expression: { + type: 'XJSElement', + openingElement: { + type: 'XJSOpeningElement', + name: { + type: 'XJSIdentifier', + name: 'div', + range: [1, 4], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 4 } + } + }, + selfClosing: false, + attributes: [], + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + closingElement: { + type: 'XJSClosingElement', + name: { + type: 'XJSIdentifier', + name: 'div', + range: [20, 23], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 23 } + } + }, + range: [18, 24], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 24 } + } + }, + children: [{ + type: 'Literal', + value: '@test content', + raw: '@test content', + range: [5, 18], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 18 } + } + }], + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + + '

    7x invalid-js-identifier
    ': { + type: 'ExpressionStatement', + expression: { + type: 'XJSElement', + openingElement: { + type: 'XJSOpeningElement', + name: { + type: 'XJSIdentifier', + name: 'div', + range: [ + 1, + 4 + ], + loc: { + start: { + line: 1, + column: 1 + }, + end: { + line: 1, + column: 4 + } + } + }, + selfClosing: false, + attributes: [], + range: [ + 0, + 5 + ], + loc: { + start: { + line: 1, + column: 0 + }, + end: { + line: 1, + column: 5 + } + } + }, + closingElement: { + type: 'XJSClosingElement', + name: { + type: 'XJSIdentifier', + name: 'div', + range: [ + 37, + 40 + ], + loc: { + start: { + line: 1, + column: 37 + }, + end: { + line: 1, + column: 40 + } + } + }, + range: [ + 35, + 41 + ], + loc: { + start: { + line: 1, + column: 35 + }, + end: { + line: 1, + column: 41 + } + } + }, + children: [{ + type: 'XJSElement', + openingElement: { + type: 'XJSOpeningElement', + name: { + type: 'XJSIdentifier', + name: 'br', + range: [ + 6, + 8 + ], + loc: { + start: { + line: 1, + column: 6 + }, + end: { + line: 1, + column: 8 + } + } + }, + selfClosing: true, + attributes: [], + range: [ + 5, + 11 + ], + loc: { + start: { + line: 1, + column: 5 + }, + end: { + line: 1, + column: 11 + } + } + }, + children: [], + range: [ + 5, + 11 + ], + loc: { + start: { + line: 1, + column: 5 + }, + end: { + line: 1, + column: 11 + } + } + }, { + type: 'Literal', + value: '7x invalid-js-identifier', + raw: '7x invalid-js-identifier', + range: [ + 11, + 35 + ], + loc: { + start: { + line: 1, + column: 11 + }, + end: { + line: 1, + column: 35 + } + } + }], + range: [ + 0, + 41 + ], + loc: { + start: { + line: 1, + column: 0 + }, + end: { + line: 1, + column: 41 + } + } + }, + range: [ + 0, + 41 + ], + loc: { + start: { + line: 1, + column: 0 + }, + end: { + line: 1, + column: 41 + } + } + }, + + ' right=monkeys /> gorillas />': { + "type": "ExpressionStatement", + "expression": { + "type": "XJSElement", + "openingElement": { + "type": "XJSOpeningElement", + "name": { + "type": "XJSIdentifier", + "name": "LeftRight", + "range": [ + 1, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 10 + } + } + }, + "selfClosing": true, + "attributes": [ + { + "type": "XJSAttribute", + "name": { + "type": "XJSIdentifier", + "name": "left", + "range": [ + 11, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + "value": { + "type": "XJSElement", + "openingElement": { + "type": "XJSOpeningElement", + "name": { + "type": "XJSIdentifier", + "name": "a", + "range": [ + 17, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 18 + } + } + }, + "selfClosing": true, + "attributes": [], + "range": [ + 16, + 21 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 21 + } + } + }, + "children": [], + "range": [ + 16, + 21 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 21 + } + } + }, + "range": [ + 11, + 21 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 21 + } + } + }, + { + "type": "XJSAttribute", + "name": { + "type": "XJSIdentifier", + "name": "right", + "range": [ + 22, + 27 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 27 + } + } + }, + "value": { + "type": "XJSElement", + "openingElement": { + "type": "XJSOpeningElement", + "name": { + "type": "XJSIdentifier", + "name": "b", + "range": [ + 29, + 30 + ], + "loc": { + "start": { + "line": 1, + "column": 29 + }, + "end": { + "line": 1, + "column": 30 + } + } + }, + "selfClosing": false, + "attributes": [], + "range": [ + 28, + 31 + ], + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 31 + } + } + }, + "closingElement": { + "type": "XJSClosingElement", + "name": { + "type": "XJSIdentifier", + "name": "b", + "range": [ + 52, + 53 + ], + "loc": { + "start": { + "line": 1, + "column": 52 + }, + "end": { + "line": 1, + "column": 53 + } + } + }, + "range": [ + 50, + 54 + ], + "loc": { + "start": { + "line": 1, + "column": 50 + }, + "end": { + "line": 1, + "column": 54 + } + } + }, + "children": [ + { + "type": "Literal", + "value": "monkeys /> gorillas", + "raw": "monkeys /> gorillas", + "range": [ + 31, + 50 + ], + "loc": { + "start": { + "line": 1, + "column": 31 + }, + "end": { + "line": 1, + "column": 50 + } + } + } + ], + "range": [ + 28, + 54 + ], + "loc": { + "start": { + "line": 1, + "column": 28 + }, + "end": { + "line": 1, + "column": 54 + } + } + }, + "range": [ + 22, + 54 + ], + "loc": { + "start": { + "line": 1, + "column": 22 + }, + "end": { + "line": 1, + "column": 54 + } + } + } + ], + "range": [ + 0, + 57 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 57 + } + } + }, + "children": [], + "range": [ + 0, + 57 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 57 + } + } + }, + "range": [ + 0, + 57 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 57 + } + } + } + }, + + 'Invalid XJS Syntax': { + '': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Unexpected token /', + description: 'Unexpected token /' + }, + + '': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: XJS tag name can not be empty' + }, + + '<:a />': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Unexpected token :', + description: 'Unexpected token :' + }, + + '': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: XJS value should be either an expression or a quoted XJS text' + }, + + '': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected end of input' + }, + + '': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Expected corresponding XJS closing tag for a' + }, + + '': { + index: 9, + lineNumber: 1, + column: 10, + message: "Error: Line 1: Expected corresponding XJS closing tag for a:b", + }, + + '': { + index: 8, + lineNumber: 1, + column: 9, + message: 'Error: Line 1: Unexpected end of input' + }, + + '': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: XJS attributes must only be assigned a non-empty expression' + }, + + '{"str";}': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token ;', + description: 'Unexpected token ;' + }, + + '': { + index: 19, + lineNumber: 1, + column: 20, + message: 'Error: Line 1: Unexpected token ,', + description: 'Unexpected token ,' + }, + + '
    ': { + index: 14, + lineNumber: 1, + column: 15, + message: 'Error: Line 1: Unexpected string', + description: 'Unexpected string' + } + }, + + 'Type Annotations': { + 'function foo(numVal: number){}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'foo', + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + params: [{ + type: 'TypeAnnotatedIdentifier', + id: { + type: 'Identifier', + name: 'numVal', + range: [13, 19], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 19 } + } + }, + annotation: { + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'number', + range: [21, 27], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 27 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [19, 27], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 27 } + } + }, + range: [13, 27], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 27 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [28, 30], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 30 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 30], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 30 } + } + }, + + 'function foo(numVal: number, strVal: string){}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'foo', + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + params: [{ + type: 'TypeAnnotatedIdentifier', + id: { + type: 'Identifier', + name: 'numVal', + range: [13, 19], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 19 } + } + }, + annotation: { + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'number', + range: [21, 27], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 27 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [19, 27], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 27 } + } + }, + range: [13, 27], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 27 } + } + }, { + type: 'TypeAnnotatedIdentifier', + id: { + type: 'Identifier', + name: 'strVal', + range: [29, 35], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 35 } + } + }, + annotation: { + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'string', + range: [37, 43], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 43 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [35, 43], + loc: { + start: { line: 1, column: 35 }, + end: { line: 1, column: 43 } + } + }, + range: [29, 43], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 43 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [44, 46], + loc: { + start: { line: 1, column: 44 }, + end: { line: 1, column: 46 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 46], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 46 } + } + }, + + 'function foo(numVal: number, untypedVal){}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'foo', + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + params: [{ + type: 'TypeAnnotatedIdentifier', + id: { + type: 'Identifier', + name: 'numVal', + range: [13, 19], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 19 } + } + }, + annotation: { + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'number', + range: [21, 27], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 27 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [19, 27], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 27 } + } + }, + range: [13, 27], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 27 } + } + }, { + type: 'Identifier', + name: 'untypedVal', + range: [29, 39], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 39 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [40, 42], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 42 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 42], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 42 } + } + }, + + 'function foo(untypedVal, numVal: number){}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'foo', + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + params: [{ + type: 'Identifier', + name: 'untypedVal', + range: [13, 23], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 23 } + } + }, { + type: 'TypeAnnotatedIdentifier', + id: { + type: 'Identifier', + name: 'numVal', + range: [25, 31], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 31 } + } + }, + annotation: { + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'number', + range: [33, 39], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 39 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [31, 39], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 39 } + } + }, + range: [25, 39], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 39 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [40, 42], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 42 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 42], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 42 } + } + }, + + 'function foo(nullableNum: ?number){}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'foo', + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + params: [{ + type: 'TypeAnnotatedIdentifier', + id: { + type: 'Identifier', + name: 'nullableNum', + range: [13, 24], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 24 } + } + }, + annotation: { + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'number', + range: [27, 33], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 33 } + } + }, + paramTypes: null, + returnType: null, + nullable: true, + range: [24, 33], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 33 } + } + }, + range: [13, 33], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 33 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [34, 36], + loc: { + start: { line: 1, column: 34 }, + end: { line: 1, column: 36 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + } + }, + + 'function foo(callback: () => void){}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'foo', + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + params: [{ + type: 'TypeAnnotatedIdentifier', + id: { + type: 'Identifier', + name: 'callback', + range: [13, 21], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 21 } + } + }, + annotation: { + type: 'TypeAnnotation', + id: null, + paramTypes: [], + returnType: null, + nullable: false, + range: [21, 33], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 33 } + } + }, + range: [13, 33], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 33 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [34, 36], + loc: { + start: { line: 1, column: 34 }, + end: { line: 1, column: 36 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + } + }, + + 'function foo(callback: () => number){}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'foo', + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + params: [{ + type: 'TypeAnnotatedIdentifier', + id: { + type: 'Identifier', + name: 'callback', + range: [13, 21], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 21 } + } + }, + annotation: { + type: 'TypeAnnotation', + id: null, + paramTypes: [], + returnType: { + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'number', + range: [29, 35], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 35 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [29, 35], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 35 } + } + }, + nullable: false, + range: [21, 35], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 35 } + } + }, + range: [13, 35], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 35 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [36, 38], + loc: { + start: { line: 1, column: 36 }, + end: { line: 1, column: 38 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + } + }, + + 'function foo(callback: (bool) => number){}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'foo', + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + params: [{ + type: 'TypeAnnotatedIdentifier', + id: { + type: 'Identifier', + name: 'callback', + range: [13, 21], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 21 } + } + }, + annotation: { + type: 'TypeAnnotation', + id: null, + paramTypes: [{ + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'bool', + range: [24, 28], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 28 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [24, 28], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 28 } + } + }], + returnType: { + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'number', + range: [33, 39], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 39 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [33, 39], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 39 } + } + }, + nullable: false, + range: [21, 39], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 39 } + } + }, + range: [13, 39], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 39 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [40, 42], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 42 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 42], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 42 } + } + }, + + 'function foo(callback: (bool, string) => number){}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'foo', + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + params: [{ + type: 'TypeAnnotatedIdentifier', + id: { + type: 'Identifier', + name: 'callback', + range: [13, 21], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 21 } + } + }, + annotation: { + type: 'TypeAnnotation', + id: null, + paramTypes: [{ + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'bool', + range: [24, 28], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 28 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [24, 28], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 28 } + } + }, { + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'string', + range: [30, 36], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 36 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [30, 36], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 36 } + } + }], + returnType: { + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'number', + range: [41, 47], + loc: { + start: { line: 1, column: 41 }, + end: { line: 1, column: 47 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [41, 47], + loc: { + start: { line: 1, column: 41 }, + end: { line: 1, column: 47 } + } + }, + nullable: false, + range: [21, 47], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 47 } + } + }, + range: [13, 47], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 47 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [48, 50], + loc: { + start: { line: 1, column: 48 }, + end: { line: 1, column: 50 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 50], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 50 } + } + }, + + 'function foo():number{}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'foo', + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [21, 23], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 23 } + } + }, + rest: null, + generator: false, + expression: false, + returnType: { + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'number', + range: [15, 21], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 21 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [14, 21], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 23], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 23 } + } + }, + + 'function foo():() => void{}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'foo', + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [25, 27], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 27 } + } + }, + rest: null, + generator: false, + expression: false, + returnType: { + type: 'TypeAnnotation', + id: null, + paramTypes: [], + returnType: null, + nullable: false, + range: [14, 25], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 25 } + } + }, + range: [0, 27], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + }, + + 'function foo():(bool) => number{}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'foo', + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [31, 33], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 33 } + } + }, + rest: null, + generator: false, + expression: false, + returnType: { + type: 'TypeAnnotation', + id: null, + paramTypes: [{ + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'bool', + range: [16, 20], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 20 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [16, 20], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 20 } + } + }], + returnType: { + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'number', + range: [25, 31], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 31 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [25, 31], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 31 } + } + }, + nullable: false, + range: [14, 31], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 31 } + } + }, + range: [0, 33], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 33 } + } + }, + + 'a={set fooProp(value:number){}}': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'a', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'fooProp', + range: [7, 14], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 14 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'TypeAnnotatedIdentifier', + id: { + type: 'Identifier', + name: 'value', + range: [15, 20], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 20 } + } + }, + annotation: { + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'number', + range: [21, 27], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 27 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [20, 27], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 27 } + } + }, + range: [15, 27], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 27 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [28, 30], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 30 } + } + }, + rest: null, + generator: false, + expression: false, + range: [28, 30], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 30 } + } + }, + kind: 'set', + method: false, + shorthand: false, + range: [3, 30], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 30 } + } + }], + range: [2, 31], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 31 } + } + }, + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + } + }, + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + } + }, + + 'class Foo {set fooProp(value:number){}}': { + type: 'ClassDeclaration', + id: { + type: 'Identifier', + name: 'Foo', + range: [6, 9], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 9 } + } + }, + superClass: null, + body: { + type: 'ClassBody', + body: [{ + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'fooProp', + range: [15, 22], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 22 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'TypeAnnotatedIdentifier', + id: { + type: 'Identifier', + name: 'value', + range: [23, 28], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 28 } + } + }, + annotation: { + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'number', + range: [29, 35], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 35 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [28, 35], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 35 } + } + }, + range: [23, 35], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 35 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [36, 38], + loc: { + start: { line: 1, column: 36 }, + end: { line: 1, column: 38 } + } + }, + rest: null, + generator: false, + expression: false, + range: [36, 38], + loc: { + start: { line: 1, column: 36 }, + end: { line: 1, column: 38 } + } + }, + kind: 'set', + 'static': false, + range: [11, 38], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 38 } + } + }], + range: [10, 39], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 39 } + } + }, + range: [0, 39], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 39 } + } + }, + + 'var numVal:number;': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'TypeAnnotatedIdentifier', + id: { + type: 'Identifier', + name: 'numVal', + range: [4, 10], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 10 } + } + }, + annotation: { + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'number', + range: [11, 17], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 17 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [10, 17], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 17 } + } + }, + range: [4, 17], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 17 } + } + }, + init: null, + range: [4, 17], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 17 } + } + }], + kind: 'var', + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + + 'var numVal:number = otherNumVal;': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'TypeAnnotatedIdentifier', + id: { + type: 'Identifier', + name: 'numVal', + range: [4, 10], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 10 } + } + }, + annotation: { + type: 'TypeAnnotation', + id: { + type: 'Identifier', + name: 'number', + range: [11, 17], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 17 } + } + }, + paramTypes: null, + returnType: null, + nullable: false, + range: [10, 17], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 17 } + } + }, + range: [4, 17], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 17 } + } + }, + init: { + type: 'Identifier', + name: 'otherNumVal', + range: [20, 31], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 31 } + } + }, + range: [4, 31], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 31 } + } + }], + kind: 'var', + range: [0, 32], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 32 } + } + } + } +}; + +// Merge fbTestFixture in to testFixture + +(function () { + + 'use strict'; + + var i, fixtures; + + for (i in fbTestFixture) { + if (fbTestFixture.hasOwnProperty(i)) { + fixtures = fbTestFixture[i]; + if (i !== 'Syntax' && testFixture.hasOwnProperty(i)) { + throw new Error('FB test should not replace existing test for ' + i); + } + testFixture[i] = fixtures; + } + } + +}()); diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/harmonytest.js b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/harmonytest.js new file mode 100644 index 00000000..6a22eb94 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/harmonytest.js @@ -0,0 +1,12518 @@ +/* + Copyright (C) 2012 Ariya Hidayat + Copyright (C) 2012 Joost-Wim Boekesteijn + Copyright (C) 2012 Yusuke Suzuki + Copyright (C) 2012 Arpad Borsos + Copyright (C) 2011 Ariya Hidayat + Copyright (C) 2011 Yusuke Suzuki + Copyright (C) 2011 Arpad Borsos + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +var testFixture; + +var harmonyTestFixture = { + + 'ES6 Unicode Code Point Escape Sequence': { + + '"\\u{714E}\\u{8336}"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: '煎茶', + raw: '"\\u{714E}\\u{8336}"', + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + + '"\\u{20BB7}\\u{91CE}\\u{5BB6}"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: '\ud842\udfb7\u91ce\u5bb6', + raw: '"\\u{20BB7}\\u{91CE}\\u{5BB6}"', + range: [0, 27], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + }, + range: [0, 27], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + } + }, + + // ECMAScript 6th Syntax, 7.8.3 Numeric Literals + + 'ES6: Numeric Literal': { + + '00': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0, + raw: '00', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + + '0o0': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0, + raw: '0o0', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + 'function test() {\'use strict\'; 0o0; }': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'test', + range: [9, 13], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 13 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '\'use strict\'', + range: [17, 29], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 29 } + } + }, + range: [17, 30], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 30 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0, + raw: '0o0', + range: [31, 34], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 34 } + } + }, + range: [31, 35], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 35 } + } + }], + range: [16, 37], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 37 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 37], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 37 } + } + }, + + '0o2': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 2, + raw: '0o2', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + '0o12': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 10, + raw: '0o12', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + + '0O0': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0, + raw: '0O0', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + 'function test() {\'use strict\'; 0O0; }': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'test', + range: [9, 13], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 13 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '\'use strict\'', + range: [17, 29], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 29 } + } + }, + range: [17, 30], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 30 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0, + raw: '0O0', + range: [31, 34], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 34 } + } + }, + range: [31, 35], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 35 } + } + }], + range: [16, 37], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 37 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 37], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 37 } + } + }, + + '0O2': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 2, + raw: '0O2', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + '0O12': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 10, + raw: '0O12', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + + + '0b0': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0, + raw: '0b0', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + '0b1': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 1, + raw: '0b1', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + '0b10': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 2, + raw: '0b10', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + + '0B0': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0, + raw: '0B0', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + '0B1': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 1, + raw: '0B1', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + '0B10': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 2, + raw: '0B10', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + } + + }, + + // ECMAScript 6th Syntax, 11.1. 9 Template Literals + + 'ES6 Template Strings': { + '`42`': { + type: 'ExpressionStatement', + expression: { + type: 'TemplateLiteral', + quasis: [{ + type: 'TemplateElement', + value: { + raw: '42', + cooked: '42' + }, + tail: true, + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }], + expressions: [], + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + + 'raw`42`': { + type: 'ExpressionStatement', + expression: { + type: 'TaggedTemplateExpression', + tag: { + type: 'Identifier', + name: 'raw', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + quasi: { + type: 'TemplateLiteral', + quasis: [{ + type: 'TemplateElement', + value: { + raw: '42', + cooked: '42' + }, + tail: true, + range: [3, 7], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 7 } + } + }], + expressions: [], + range: [3, 7], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'raw`hello ${name}`': { + type: 'ExpressionStatement', + expression: { + type: 'TaggedTemplateExpression', + tag: { + type: 'Identifier', + name: 'raw', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + quasi: { + type: 'TemplateLiteral', + quasis: [{ + type: 'TemplateElement', + value: { + raw: 'hello ', + cooked: 'hello ' + }, + tail: false, + range: [3, 12], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 12 } + } + }, { + type: 'TemplateElement', + value: { + raw: '', + cooked: '' + }, + tail: true, + range: [16, 18], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 18 } + } + }], + expressions: [{ + type: 'Identifier', + name: 'name', + range: [12, 16], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 16 } + } + }], + range: [3, 18], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 18 } + } + }, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + + '`$`': { + type: 'ExpressionStatement', + expression: { + type: 'TemplateLiteral', + quasis: [{ + type: 'TemplateElement', + value: { + raw: '$', + cooked: '$' + }, + tail: true, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }], + expressions: [], + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + '`\\n\\r\\b\\v\\t\\f\\\n\\\r\n`': { + type: 'ExpressionStatement', + expression: { + type: 'TemplateLiteral', + quasis: [{ + type: 'TemplateElement', + value: { + raw: '\\n\\r\\b\\v\\t\\f\\\n\\\r\n', + cooked: '\n\r\b\v\t\f' + }, + tail: true, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 3, column: 19 } + } + }], + expressions: [], + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 3, column: 19 } + } + }, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 3, column: 19 } + } + }, + + '`\n\r\n`': { + type: 'ExpressionStatement', + expression: { + type: 'TemplateLiteral', + quasis: [{ + type: 'TemplateElement', + value: { + raw: '\n\r\n', + cooked: '\n\n' + }, + tail: true, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 3, column: 5 } + } + }], + expressions: [], + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 3, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 3, column: 5 } + } + }, + + '`\\u{000042}\\u0042\\x42\\u0\\102\\A`': { + type: 'ExpressionStatement', + expression: { + type: 'TemplateLiteral', + quasis: [{ + type: 'TemplateElement', + value: { + raw: '\\u{000042}\\u0042\\x42\\u0\\102\\A', + cooked: 'BBBu0BA' + }, + tail: true, + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + } + }], + expressions: [], + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + } + }, + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + } + }, + + 'new raw`42`': { + type: 'ExpressionStatement', + expression: { + type: 'NewExpression', + callee: { + type: 'TaggedTemplateExpression', + tag: { + type: 'Identifier', + name: 'raw', + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + quasi: { + type: 'TemplateLiteral', + quasis: [{ + type: 'TemplateElement', + value: { + raw: '42', + cooked: '42' + }, + tail: true, + range: [7, 11], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 11 } + } + }], + expressions: [], + range: [7, 11], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 11 } + } + }, + range: [4, 11], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 11 } + } + }, + 'arguments': [], + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + } + + }, + + + // ECMAScript 6th Syntax, 12.11 The switch statement + + 'ES6: Switch Case Declaration': { + + 'switch (answer) { case 42: let t = 42; break; }': { + type: 'SwitchStatement', + discriminant: { + type: 'Identifier', + name: 'answer', + range: [8, 14], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 14 } + } + }, + cases: [{ + type: 'SwitchCase', + test: { + type: 'Literal', + value: 42, + raw: '42', + range: [23, 25], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 25 } + } + }, + consequent: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 't', + range: [31, 32], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 32 } + } + }, + init: { + type: 'Literal', + value: 42, + raw: '42', + range: [35, 37], + loc: { + start: { line: 1, column: 35 }, + end: { line: 1, column: 37 } + } + }, + range: [31, 37], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 37 } + } + }], + kind: 'let', + range: [27, 38], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 38 } + } + }, { + type: 'BreakStatement', + label: null, + range: [39, 45], + loc: { + start: { line: 1, column: 39 }, + end: { line: 1, column: 45 } + } + }], + range: [18, 45], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 45 } + } + }], + range: [0, 47], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 47 } + } + } + }, + + // ECMAScript 6th Syntax, 13.2 Arrow Function Definitions + + 'ES6: Arrow Function': { + '() => "test"': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'Literal', + value: 'test', + raw: '"test"', + range: [6, 12], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 12 } + } + }, + rest: null, + generator: false, + expression: true, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + + 'e => "test"': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'e', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }], + defaults: [], + body: { + type: 'Literal', + value: 'test', + raw: '"test"', + range: [5, 11], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 11 } + } + }, + rest: null, + generator: false, + expression: true, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + + '(e) => "test"': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'e', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }], + defaults: [], + body: { + type: 'Literal', + value: 'test', + raw: '"test"', + range: [7, 13], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 13 } + } + }, + rest: null, + generator: false, + expression: true, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + + '(a, b) => "test"': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'a', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, { + type: 'Identifier', + name: 'b', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }], + defaults: [], + body: { + type: 'Literal', + value: 'test', + raw: '"test"', + range: [10, 16], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 16 } + } + }, + rest: null, + generator: false, + expression: true, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + 'e => { 42; }': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'e', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [7, 9], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 9 } + } + }, + range: [7, 10], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 10 } + } + }], + range: [5, 12], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 12 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + + 'e => ({ property: 42 })': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'e', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }], + defaults: [], + body: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'property', + range: [8, 16], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 16 } + } + }, + value: { + type: 'Literal', + value: 42, + raw: '42', + range: [18, 20], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 20 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [8, 20], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 20 } + } + }], + range: [6, 22], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 22 } + } + }, + rest: null, + generator: false, + expression: true, + range: [0, 23], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 23 } + } + }, + range: [0, 23], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 23 } + } + }, + + // Not an object! + 'e => { label: 42 }': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'e', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'LabeledStatement', + label: { + type: 'Identifier', + name: 'label', + range: [7, 12], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 12 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [14, 16], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 16 } + } + }, + range: [14, 17], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 17 } + } + }, + range: [7, 17], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 17 } + } + }], + range: [5, 18], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 18 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + + '(a, b) => { 42; }': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'a', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, { + type: 'Identifier', + name: 'b', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [12, 14], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 14 } + } + }, + range: [12, 15], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 15 } + } + }], + range: [10, 17], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 17 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + + '([a, , b]) => 42': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [2, 3], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 3 } + } + }, null, { + type: 'Identifier', + name: 'b', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }], + range: [1, 9], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 9 } + } + }], + defaults: [], + body: { + type: 'Literal', + value: 42, + raw: '42', + range: [14, 16], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 16 } + } + }, + rest: null, + generator: false, + expression: true, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + '([a.a]) => 42': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'ArrayPattern', + elements: [{ + type: 'MemberExpression', + computed: false, + object: { + type: 'Identifier', + name: 'a', + range: [2, 3], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 3 } + } + }, + property: { + type: 'Identifier', + name: 'a', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [2, 5], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 5 } + } + }], + range: [1, 6], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 6 } + } + }], + defaults: [], + body: { + type: 'Literal', + value: 42, + raw: '42', + range: [11, 13], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 13 } + } + }, + rest: null, + generator: false, + expression: true, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + + '(x=1) => x * x': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'x', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }], + defaults: [{ + type: 'Literal', + value: 1, + raw: '1', + range: [3, 4], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 4 } + } + }], + body: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'Identifier', + name: 'x', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + right: { + type: 'Identifier', + name: 'x', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }, + range: [9, 14], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 14 } + } + }, + rest: null, + generator: false, + expression: true, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + // not strict mode, using eval + 'eval => 42': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'eval', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }], + defaults: [], + body: { + type: 'Literal', + value: 42, + raw: '42', + range: [8, 10], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 10 } + } + }, + rest: null, + generator: false, + expression: true, + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + }, + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + }, + + // not strict mode, using arguments + 'arguments => 42': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'arguments', + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }], + defaults: [], + body: { + type: 'Literal', + value: 42, + raw: '42', + range: [13, 15], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 15 } + } + }, + rest: null, + generator: false, + expression: true, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + + // not strict mode, using octals + '(a) => 00': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'a', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }], + defaults: [], + body: { + type: 'Literal', + value: 0, + raw: '00', + range: [7, 9], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 9 } + } + }, + rest: null, + generator: false, + expression: true, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + // not strict mode, using eval, IsSimpleParameterList is true + '(eval, a) => 42': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'eval', + range: [1, 5], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 5 } + } + }, { + type: 'Identifier', + name: 'a', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }], + defaults: [], + body: { + type: 'Literal', + value: 42, + raw: '42', + range: [13, 15], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 15 } + } + }, + rest: null, + generator: false, + expression: true, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + + // not strict mode, assigning to eval + '(eval = 10) => 42': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'eval', + range: [1, 5], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 5 } + } + }], + defaults: [{ + type: 'Literal', + value: 10, + raw: '10', + range: [8, 10], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 10 } + } + }], + body: { + type: 'Literal', + value: 42, + raw: '42', + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + rest: null, + generator: false, + expression: true, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + + // not strict mode, using eval, IsSimpleParameterList is false + '(eval, a = 10) => 42': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'eval', + range: [1, 5], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 5 } + } + }, { + type: 'Identifier', + name: 'a', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }], + defaults: [null, { + type: 'Literal', + value: 10, + raw: '10', + range: [11, 13], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 13 } + } + }], + body: { + type: 'Literal', + value: 42, + raw: '42', + range: [18, 20], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 20 } + } + }, + rest: null, + generator: false, + expression: true, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + + '(x => x)': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'x', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }], + defaults: [], + body: { + type: 'Identifier', + name: 'x', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + rest: null, + generator: false, + expression: true, + range: [1, 7], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + + 'x => y => 42': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }], + defaults: [], + body: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }], + defaults: [], + body: { + type: 'Literal', + value: 42, + raw: '42', + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + rest: null, + generator: false, + expression: true, + range: [5, 12], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 12 } + } + }, + rest: null, + generator: false, + expression: true, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + + '(x) => ((y, z) => (x, y, z))': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'x', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }], + defaults: [], + body: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'y', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, { + type: 'Identifier', + name: 'z', + range: [12, 13], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 13 } + } + }], + defaults: [], + body: { + type: 'SequenceExpression', + expressions: [{ + type: 'Identifier', + name: 'x', + range: [19, 20], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 20 } + } + }, { + type: 'Identifier', + name: 'y', + range: [22, 23], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 23 } + } + }, { + type: 'Identifier', + name: 'z', + range: [25, 26], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 26 } + } + }], + range: [19, 26], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 26 } + } + }, + rest: null, + generator: false, + expression: true, + range: [8, 27], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 27 } + } + }, + rest: null, + generator: false, + expression: true, + range: [0, 28], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 28 } + } + }, + range: [0, 28], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 28 } + } + }, + + 'foo(() => {})': { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'foo', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + 'arguments': [{ + type: 'ArrowFunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + rest: null, + generator: false, + expression: false, + range: [4, 12], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 12 } + } + }], + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + + 'foo((x, y) => {})': { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'foo', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + 'arguments': [{ + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'x', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, { + type: 'Identifier', + name: 'y', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [14, 16], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 16 } + } + }, + rest: null, + generator: false, + expression: false, + range: [4, 16], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 16 } + } + }], + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + } + + }, + + + // ECMAScript 6th Syntax, 13.13 Method Definitions + + 'ES6: Method Definition': { + + 'x = { method() { } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'method', + range: [6, 12], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 12 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [15, 18], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 18 } + } + }, + rest: null, + generator: false, + expression: false, + range: [15, 18], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 18 } + } + }, + kind: 'init', + method: true, + shorthand: false, + range: [6, 18], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 18 } + } + }], + range: [4, 20], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 20 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + + 'x = { method(test) { } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'method', + range: [6, 12], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 12 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'test', + range: [13, 17], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 17 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [19, 22], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 22 } + } + }, + rest: null, + generator: false, + expression: false, + range: [19, 22], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 22 } + } + }, + kind: 'init', + method: true, + shorthand: false, + range: [6, 22], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 22 } + } + }], + range: [4, 24], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 24 } + } + }, + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + + 'x = { \'method\'() { } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Literal', + value: 'method', + raw: '\'method\'', + range: [6, 14], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 14 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [17, 20], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 20 } + } + }, + rest: null, + generator: false, + expression: false, + range: [17, 20], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 20 } + } + }, + kind: 'init', + method: true, + shorthand: false, + range: [6, 20], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 20 } + } + }], + range: [4, 22], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + + 'x = { get() { } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'get', + range: [6, 9], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 9 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [12, 15], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 15 } + } + }, + rest: null, + generator: false, + expression: false, + range: [12, 15], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 15 } + } + }, + kind: 'init', + method: true, + shorthand: false, + range: [6, 15], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 15 } + } + }], + range: [4, 17], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + + 'x = { set() { } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'set', + range: [6, 9], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 9 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [12, 15], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 15 } + } + }, + rest: null, + generator: false, + expression: false, + range: [12, 15], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 15 } + } + }, + kind: 'init', + method: true, + shorthand: false, + range: [6, 15], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 15 } + } + }], + range: [4, 17], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + + 'x = { method() 42 }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'method', + range: [6, 12], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 12 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'Literal', + value: 42, + raw: '42', + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + rest: null, + generator: false, + expression: true, + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + kind: 'init', + method: true, + shorthand: false, + range: [6, 17], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 17 } + } + }], + range: [4, 19], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 19 } + } + }, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + + 'x = { get method() 42 }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'method', + range: [10, 16], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 16 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'Literal', + value: 42, + raw: '42', + range: [19, 21], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 21 } + } + }, + rest: null, + generator: false, + expression: true, + range: [19, 21], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 21 } + } + }, + kind: 'get', + method: false, + shorthand: false, + range: [6, 21], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 21 } + } + }], + range: [4, 23], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 23 } + } + }, + range: [0, 23], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 23 } + } + }, + range: [0, 23], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 23 } + } + }, + + 'x = { set method(val) v = val }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'method', + range: [10, 16], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 16 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'val', + range: [17, 20], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 20 } + } + }], + defaults: [], + body: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'v', + range: [22, 23], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 23 } + } + }, + right: { + type: 'Identifier', + name: 'val', + range: [26, 29], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 29 } + } + }, + range: [22, 29], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 29 } + } + }, + rest: null, + generator: false, + expression: true, + range: [22, 29], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 29 } + } + }, + kind: 'set', + method: false, + shorthand: false, + range: [6, 29], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 29 } + } + }], + range: [4, 31], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 31 } + } + }, + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + } + }, + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + } + } + + }, + + 'Array Comprehension': { + + '[[x,b,c] for (x in []) for (b in []) if (b && c)]' : { + type: 'ExpressionStatement', + expression: { + type: 'ComprehensionExpression', + filter: { + type: 'LogicalExpression', + operator: '&&', + left: { + type: 'Identifier', + name: 'b', + range: [41, 42], + loc: { + start: { line: 1, column: 41 }, + end: { line: 1, column: 42 } + } + }, + right: { + type: 'Identifier', + name: 'c', + range: [46, 47], + loc: { + start: { line: 1, column: 46 }, + end: { line: 1, column: 47 } + } + }, + range: [41, 47], + loc: { + start: { line: 1, column: 41 }, + end: { line: 1, column: 47 } + } + }, + blocks: [{ + type: 'ComprehensionBlock', + left: { + type: 'Identifier', + name: 'x', + range: [14, 15], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 15 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [19, 21], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 21 } + } + }, + each: false, + of: false + }, { + type: 'ComprehensionBlock', + left: { + type: 'Identifier', + name: 'b', + range: [28, 29], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 29 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [33, 35], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 35 } + } + }, + each: false, + of: false + }], + body: { + type: 'ArrayExpression', + elements: [{ + type: 'Identifier', + name: 'x', + range: [2, 3], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 3 } + } + }, { + type: 'Identifier', + name: 'b', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, { + type: 'Identifier', + name: 'c', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }], + range: [1, 8], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 49], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 49 } + } + }, + range: [0, 49], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 49 } + } + }, + + '[x for (a in [])]' : { + type: 'ExpressionStatement', + expression: { + type: 'ComprehensionExpression', + filter: null, + blocks: [{ + type: 'ComprehensionBlock', + left: { + type: 'Identifier', + name: 'a', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [13, 15], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 15 } + } + }, + each: false, + of: false + }], + body: { + type: 'Identifier', + name: 'x', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + + '[1 for (x in [])]' : { + type: 'ExpressionStatement', + expression: { + type: 'ComprehensionExpression', + filter: null, + blocks: [{ + type: 'ComprehensionBlock', + left: { + type: 'Identifier', + name: 'x', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [13, 15], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 15 } + } + }, + each: false, + of: false + }], + body: { + type: 'Literal', + value: 1, + raw: '1', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + + '[(x,1) for (x in [])]' : { + type: 'ExpressionStatement', + expression: { + type: 'ComprehensionExpression', + filter: null, + blocks: [{ + type: 'ComprehensionBlock', + left: { + type: 'Identifier', + name: 'x', + range: [12, 13], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 13 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [17, 19], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 19 } + } + }, + each: false, + of: false + }], + body: { + type: 'SequenceExpression', + expressions: [{ + type: 'Identifier', + name: 'x', + range: [2, 3], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 3 } + } + }, { + type: 'Literal', + value: 1, + raw: '1', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }], + range: [2, 5], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + + + '[x for (x of array)]': { + type: 'ExpressionStatement', + expression: { + type: 'ComprehensionExpression', + filter: null, + blocks: [{ + type: 'ComprehensionBlock', + left: { + type: 'Identifier', + name: 'x', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + right: { + type: 'Identifier', + name: 'array', + range: [13, 18], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 18 } + } + }, + of: true + }], + body: { + type: 'Identifier', + name: 'x', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + + '[x for (x of array) for (y of array2) if (x === test)]': { + type: 'ExpressionStatement', + expression: { + type: 'ComprehensionExpression', + filter: { + type: 'BinaryExpression', + operator: '===', + left: { + type: 'Identifier', + name: 'x', + range: [42, 43], + loc: { + start: { line: 1, column: 42 }, + end: { line: 1, column: 43 } + } + }, + right: { + type: 'Identifier', + name: 'test', + range: [48, 52], + loc: { + start: { line: 1, column: 48 }, + end: { line: 1, column: 52 } + } + }, + range: [42, 52], + loc: { + start: { line: 1, column: 42 }, + end: { line: 1, column: 52 } + } + }, + blocks: [{ + type: 'ComprehensionBlock', + left: { + type: 'Identifier', + name: 'x', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + right: { + type: 'Identifier', + name: 'array', + range: [13, 18], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 18 } + } + }, + of: true + }, { + type: 'ComprehensionBlock', + left: { + type: 'Identifier', + name: 'y', + range: [25, 26], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 26 } + } + }, + right: { + type: 'Identifier', + name: 'array2', + range: [30, 36], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 36 } + } + }, + of: true + }], + body: { + type: 'Identifier', + name: 'x', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 54], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 54 } + } + }, + range: [0, 54], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 54 } + } + } + + }, + + // http://wiki.ecmascript.org/doku.php?id=harmony:object_literals#object_literal_property_value_shorthand + + 'Harmony: Object Literal Property Value Shorthand': { + + 'x = { y, z }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'y', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + value: { + type: 'Identifier', + name: 'y', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'z', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + value: { + type: 'Identifier', + name: 'z', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }], + range: [4, 12], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + } + + }, + + // http://wiki.ecmascript.org/doku.php?id=harmony:destructuring + + 'Harmony: Destructuring': { + + '[a, b] = [b, a]': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, { + type: 'Identifier', + name: 'b', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }], + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + right: { + type: 'ArrayExpression', + elements: [{ + type: 'Identifier', + name: 'b', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, { + type: 'Identifier', + name: 'a', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }], + range: [9, 15], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + + '({ responseText: text }) = res': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'responseText', + range: [3, 15], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 15 } + } + }, + value: { + type: 'Identifier', + name: 'text', + range: [17, 21], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 21 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [3, 21], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 21 } + } + }], + range: [1, 23], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 23 } + } + }, + right: { + type: 'Identifier', + name: 'res', + range: [27, 30], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 30 } + } + }, + range: [0, 30], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 30 } + } + }, + range: [0, 30], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 30 } + } + }, + + 'const {a} = {}': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + value: { + type: 'Identifier', + name: 'a', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }], + range: [6, 9], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 9 } + } + }, + init: { + type: 'ObjectExpression', + properties: [], + range: [12, 14], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 14 } + } + }, + range: [6, 14], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 14 } + } + }], + kind: 'const', + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + 'const [a] = []': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }], + range: [6, 9], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 9 } + } + }, + init: { + type: 'ArrayExpression', + elements: [], + range: [12, 14], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 14 } + } + }, + range: [6, 14], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 14 } + } + }], + kind: 'const', + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + 'let {a} = {}': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + value: { + type: 'Identifier', + name: 'a', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }], + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + init: { + type: 'ObjectExpression', + properties: [], + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + range: [4, 12], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 12 } + } + }], + kind: 'let', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + + 'let [a] = []': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }], + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + init: { + type: 'ArrayExpression', + elements: [], + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + range: [4, 12], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 12 } + } + }], + kind: 'let', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + + 'var {a} = {}': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + value: { + type: 'Identifier', + name: 'a', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }], + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + init: { + type: 'ObjectExpression', + properties: [], + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + range: [4, 12], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 12 } + } + }], + kind: 'var', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + + 'var [a] = []': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }], + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + init: { + type: 'ArrayExpression', + elements: [], + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + range: [4, 12], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 12 } + } + }], + kind: 'var', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + + 'const {a:b} = {}': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + value: { + type: 'Identifier', + name: 'b', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [7, 10], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 10 } + } + }], + range: [6, 11], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 11 } + } + }, + init: { + type: 'ObjectExpression', + properties: [], + range: [14, 16], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 16 } + } + }, + range: [6, 16], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 16 } + } + }], + kind: 'const', + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + 'let {a:b} = {}': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + value: { + type: 'Identifier', + name: 'b', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [5, 8], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 8 } + } + }], + range: [4, 9], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 9 } + } + }, + init: { + type: 'ObjectExpression', + properties: [], + range: [12, 14], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 14 } + } + }, + range: [4, 14], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 14 } + } + }], + kind: 'let', + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + 'var {a:b} = {}': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + value: { + type: 'Identifier', + name: 'b', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [5, 8], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 8 } + } + }], + range: [4, 9], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 9 } + } + }, + init: { + type: 'ObjectExpression', + properties: [], + range: [12, 14], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 14 } + } + }, + range: [4, 14], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 14 } + } + }], + kind: 'var', + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + } + + + }, + + // http://wiki.ecmascript.org/doku.php?id=harmony:modules + + 'Harmony: Modules': { + + 'module "crypto" {}': { + type: 'ModuleDeclaration', + id: { + type: 'Literal', + value: 'crypto', + raw: '"crypto"', + range: [7, 15], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 15 } + } + }, + source: null, + body: { + type: 'BlockStatement', + body: [], + range: [16, 18], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 18 } + } + }, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + + 'module crypto from "crypto";': { + type: 'ModuleDeclaration', + id: { + type: 'Identifier', + name: 'crypto', + range: [7, 13], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 13 } + } + }, + source: { + type: 'Literal', + value: 'crypto', + raw: '"crypto"', + range: [19, 27], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 27 } + } + }, + body: null, + range: [0, 28], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 28 } + } + }, + + 'module "crypto/e" {}': { + type: 'ModuleDeclaration', + id: { + type: 'Literal', + value: 'crypto/e', + raw: '"crypto/e"', + range: [7, 17], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 17 } + } + }, + source: null, + body: { + type: 'BlockStatement', + body: [], + range: [18, 20], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 20 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + + 'export var document': { + type: 'ExportDeclaration', + declaration: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'document', + range: [ 11, 19 ], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 19 } + } + }, + init: null, + range: [ 11, 19 ], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 19 } + } + }], + kind: 'var', + range: [ 7, 19 ], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 19 } + } + }, + specifiers: null, + source: null, + range: [ 0, 19 ], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + + 'export var document = { }': { + type: 'ExportDeclaration', + declaration: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'document', + range: [ 11, 19 ], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 19 } + } + }, + init: { + type: 'ObjectExpression', + properties: [], + range: [ 22, 25 ], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 25 } + } + }, + range: [ 11, 25 ], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 25 } + } + }], + kind: 'var', + range: [ 7, 25 ], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 25 } + } + }, + specifiers: null, + source: null, + range: [ 0, 25 ], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 25 } + } + }, + + 'export let document': { + type: 'ExportDeclaration', + declaration: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'document', + range: [ 11, 19 ], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 19 } + } + }, + init: null, + range: [ 11, 19 ], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 19 } + } + }], + kind: 'let', + range: [ 7, 19 ], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 19 } + } + }, + specifiers: null, + source: null, + range: [ 0, 19 ], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + + 'export let document = { }': { + type: 'ExportDeclaration', + declaration: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'document', + range: [ 11, 19 ], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 19 } + } + }, + init: { + type: 'ObjectExpression', + properties: [], + range: [ 22, 25 ], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 25 } + } + }, + range: [ 11, 25 ], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 25 } + } + }], + kind: 'let', + range: [ 7, 25 ], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 25 } + } + }, + specifiers: null, + source: null, + range: [ 0, 25 ], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 25 } + } + }, + + 'export const document = { }': { + type: 'ExportDeclaration', + declaration: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'document', + range: [ 13, 21 ], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 21 } + } + }, + init: { + type: 'ObjectExpression', + properties: [], + range: [ 24, 27 ], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 27 } + } + }, + range: [ 13, 27 ], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 27 } + } + }], + kind: 'const', + range: [ 7, 27 ], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 27 } + } + }, + specifiers: null, + source: null, + range: [ 0, 27 ], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + }, + + 'export function parse() { }': { + type: 'ExportDeclaration', + declaration: { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'parse', + range: [ 16, 21 ], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 21 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [ 24, 27 ], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 27 } + } + }, + rest: null, + generator: false, + expression: false, + range: [ 7, 27 ], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 27 } + } + }, + specifiers: null, + source: null, + range: [ 0, 27 ], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + }, + + 'export class Class {}': { + type: 'ExportDeclaration', + declaration: { + type: 'ClassDeclaration', + id: { + type: 'Identifier', + name: 'Class', + range: [ 13, 18 ], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 18 } + } + }, + superClass: null, + body: { + type: 'ClassBody', + body: [], + range: [ 19, 21 ], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 21 } + } + }, + range: [ 7, 21 ], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 21 } + } + }, + specifiers: null, + source: null, + range: [ 0, 21 ], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + + 'export default = 42': { + type: 'ExportDeclaration', + declaration: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'default', + range: [7, 14], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 14 } + } + }, + init: { + type: 'Literal', + value: 42, + raw: '42', + range: [17, 19], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 19 } + } + }, + range: [7, 19], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 19 } + } + }], + specifiers: null, + source: null, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + + 'export *': { + type: 'ExportDeclaration', + declaration: null, + specifiers: [{ + type: 'ExportBatchSpecifier', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }], + source: null, + range: [ 0, 8 ], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + + 'export * from "crypto"': { + type: 'ExportDeclaration', + declaration: null, + specifiers: [{ + type: 'ExportBatchSpecifier', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }], + source: { + type: 'Literal', + value: 'crypto', + raw: '"crypto"', + range: [14, 22], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + + 'export { encrypt }': { + type: 'ExportDeclaration', + declaration: null, + specifiers: [{ + type: 'ExportSpecifier', + id: { + type: 'Identifier', + name: 'encrypt', + range: [9, 16], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 16 } + } + }, + name: null, + range: [9, 16], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 16 } + } + }], + source: null, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + + 'export { encrypt, decrypt }': { + type: 'ExportDeclaration', + declaration: null, + specifiers: [{ + type: 'ExportSpecifier', + id: { + type: 'Identifier', + name: 'encrypt', + range: [9, 16], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 16 } + } + }, + name: null, + range: [9, 16], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 16 } + } + }, { + type: 'ExportSpecifier', + id: { + type: 'Identifier', + name: 'decrypt', + range: [18, 25], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 25 } + } + }, + name: null, + range: [18, 25], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 25 } + } + }], + source: null, + range: [0, 27], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + }, + + 'export { encrypt as default }': { + type: 'ExportDeclaration', + declaration: null, + specifiers: [{ + type: 'ExportSpecifier', + id: { + type: 'Identifier', + name: 'encrypt', + range: [9, 16], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 16 } + } + }, + name: { + type: 'Identifier', + name: 'default', + range: [20, 27], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 27 } + } + }, + range: [9, 27], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 27 } + } + }], + source: null, + range: [0, 29], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 29 } + } + }, + + 'export { encrypt, decrypt as dec }': { + type: 'ExportDeclaration', + declaration: null, + specifiers: [{ + type: 'ExportSpecifier', + id: { + type: 'Identifier', + name: 'encrypt', + range: [9, 16], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 16 } + } + }, + name: null, + range: [9, 16], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 16 } + } + }, { + type: 'ExportSpecifier', + id: { + type: 'Identifier', + name: 'decrypt', + range: [18, 25], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 25 } + } + }, + name: { + type: 'Identifier', + name: 'dec', + range: [29, 32], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 32 } + } + }, + range: [18, 32], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 32 } + } + }], + source: null, + range: [0, 34], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 34 } + } + }, + + 'module "lib" { export var document }': { + type: 'ModuleDeclaration', + id: { + type: 'Literal', + value: 'lib', + raw: '"lib"', + range: [7, 12], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 12 } + } + }, + source: null, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExportDeclaration', + declaration: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'document', + range: [26, 34], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 34 } + } + }, + init: null, + range: [26, 34], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 34 } + } + }], + kind: 'var', + range: [22, 35], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 35 } + } + }, + specifiers: null, + source: null, + range: [15, 35], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 35 } + } + }], + range: [13, 36], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 36 } + } + }, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + } + }, + + 'module "lib" { export var document = { } }': { + type: 'ModuleDeclaration', + id: { + type: 'Literal', + value: 'lib', + raw: '"lib"', + range: [7, 12], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 12 } + } + }, + source: null, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExportDeclaration', + declaration: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'document', + range: [26, 34], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 34 } + } + }, + init: { + type: 'ObjectExpression', + properties: [], + range: [37, 40], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 40 } + } + }, + range: [26, 40], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 40 } + } + }], + kind: 'var', + range: [22, 41], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 41 } + } + }, + specifiers: null, + source: null, + range: [15, 41], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 41 } + } + }], + range: [13, 42], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 42 } + } + }, + range: [0, 42], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 42 } + } + }, + + 'module "lib" { export let document }': { + type: 'ModuleDeclaration', + id: { + type: 'Literal', + value: 'lib', + raw: '"lib"', + range: [7, 12], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 12 } + } + }, + source: null, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExportDeclaration', + declaration: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'document', + range: [26, 34], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 34 } + } + }, + init: null, + range: [26, 34], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 34 } + } + }], + kind: 'let', + range: [22, 35], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 35 } + } + }, + specifiers: null, + source: null, + range: [15, 35], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 35 } + } + }], + range: [13, 36], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 36 } + } + }, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + } + }, + + 'module "lib" { export let document = { } }': { + type: 'ModuleDeclaration', + id: { + type: 'Literal', + value: 'lib', + raw: '"lib"', + range: [7, 12], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 12 } + } + }, + source: null, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExportDeclaration', + declaration: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'document', + range: [26, 34], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 34 } + } + }, + init: { + type: 'ObjectExpression', + properties: [], + range: [37, 40], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 40 } + } + }, + range: [26, 40], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 40 } + } + }], + kind: 'let', + range: [22, 41], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 41 } + } + }, + specifiers: null, + source: null, + range: [15, 41], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 41 } + } + }], + range: [13, 42], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 42 } + } + }, + range: [0, 42], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 42 } + } + }, + + 'module "lib" { export const document = { } }': { + type: 'ModuleDeclaration', + id: { + type: 'Literal', + value: 'lib', + raw: '"lib"', + range: [7, 12], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 12 } + } + }, + source: null, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExportDeclaration', + declaration: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'document', + range: [28, 36], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 36 } + } + }, + init: { + type: 'ObjectExpression', + properties: [], + range: [39, 42], + loc: { + start: { line: 1, column: 39 }, + end: { line: 1, column: 42 } + } + }, + range: [28, 42], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 42 } + } + }], + kind: 'const', + range: [22, 43], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 43 } + } + }, + specifiers: null, + source: null, + range: [15, 43], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 43 } + } + }], + range: [13, 44], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 44 } + } + }, + range: [0, 44], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 44 } + } + }, + + 'module "lib" { export function parse() { } }': { + type: 'ModuleDeclaration', + id: { + type: 'Literal', + value: 'lib', + raw: '"lib"', + range: [7, 12], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 12 } + } + }, + source: null, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExportDeclaration', + declaration: { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'parse', + range: [31, 36], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 36 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [39, 42], + loc: { + start: { line: 1, column: 39 }, + end: { line: 1, column: 42 } + } + }, + rest: null, + generator: false, + expression: false, + range: [22, 42], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 42 } + } + }, + specifiers: null, + source: null, + range: [15, 42], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 42 } + } + }], + range: [13, 44], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 44 } + } + }, + range: [0, 44], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 44 } + } + }, + + 'module "lib" { export class Class {} }': { + type: 'ModuleDeclaration', + id: { + type: 'Literal', + value: 'lib', + raw: '"lib"', + range: [7, 12], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 12 } + } + }, + source: null, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExportDeclaration', + declaration: { + type: 'ClassDeclaration', + id: { + type: 'Identifier', + name: 'Class', + range: [28, 33], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 33 } + } + }, + superClass: null, + body: { + type: 'ClassBody', + body: [], + range: [34, 36], + loc: { + start: { line: 1, column: 34 }, + end: { line: 1, column: 36 } + } + }, + range: [22, 36], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 36 } + } + }, + specifiers: null, + source: null, + range: [15, 36], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 36 } + } + }], + range: [13, 38], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 38 } + } + }, + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + } + }, + + 'module "lib" { export * }': { + type: 'ModuleDeclaration', + id: { + type: 'Literal', + value: 'lib', + raw: '"lib"', + range: [7, 12], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 12 } + } + }, + source: null, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExportDeclaration', + declaration: null, + specifiers: [{ + type: 'ExportBatchSpecifier', + range: [22, 23], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 23 } + } + }], + source: null, + range: [15, 24], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 24 } + } + }], + range: [13, 25], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 25 } + } + }, + range: [0, 25], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 25 } + } + }, + + 'module "security" { export * from "crypto" }': { + type: 'ModuleDeclaration', + id: { + type: 'Literal', + value: 'security', + raw: '"security"', + range: [7, 17], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 17 } + } + }, + source: null, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExportDeclaration', + declaration: null, + specifiers: [{ + type: 'ExportBatchSpecifier', + range: [27, 28], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 28 } + } + }], + source: { + type: 'Literal', + value: 'crypto', + raw: '"crypto"', + range: [34, 42], + loc: { + start: { line: 1, column: 34 }, + end: { line: 1, column: 42 } + } + }, + range: [20, 43], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 43 } + } + }], + range: [18, 44], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 44 } + } + }, + range: [0, 44], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 44 } + } + }, + + 'module "crypto" { export { encrypt } }': { + type: 'ModuleDeclaration', + id: { + type: 'Literal', + value: 'crypto', + raw: '"crypto"', + range: [7, 15], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 15 } + } + }, + source: null, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExportDeclaration', + declaration: null, + specifiers: [{ + type: 'ExportSpecifier', + id: { + type: 'Identifier', + name: 'encrypt', + range: [27, 34], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 34 } + } + }, + name: null, + range: [27, 34], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 34 } + } + }], + source: null, + range: [18, 37], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 37 } + } + }], + range: [16, 38], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 38 } + } + }, + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + } + }, + + 'module "crypto" { export { encrypt, decrypt } }': { + type: 'ModuleDeclaration', + id: { + type: 'Literal', + value: 'crypto', + raw: '"crypto"', + range: [7, 15], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 15 } + } + }, + source: null, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExportDeclaration', + declaration: null, + specifiers: [{ + type: 'ExportSpecifier', + id: { + type: 'Identifier', + name: 'encrypt', + range: [27, 34], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 34 } + } + }, + name: null, + range: [27, 34], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 34 } + } + }, { + type: 'ExportSpecifier', + id: { + type: 'Identifier', + name: 'decrypt', + range: [36, 43], + loc: { + start: { line: 1, column: 36 }, + end: { line: 1, column: 43 } + } + }, + name: null, + range: [36, 43], + loc: { + start: { line: 1, column: 36 }, + end: { line: 1, column: 43 } + } + }], + source: null, + range: [18, 46], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 46 } + } + }], + range: [16, 47], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 47 } + } + }, + range: [0, 47], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 47 } + } + }, + + 'module "crypto" { export { encrypt, decrypt as dec } }': { + type: 'ModuleDeclaration', + id: { + type: 'Literal', + value: 'crypto', + raw: '"crypto"', + range: [7, 15], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 15 } + } + }, + source: null, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExportDeclaration', + declaration: null, + specifiers: [{ + type: 'ExportSpecifier', + id: { + type: 'Identifier', + name: 'encrypt', + range: [27, 34], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 34 } + } + }, + name: null, + range: [27, 34], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 34 } + } + }, { + type: 'ExportSpecifier', + id: { + type: 'Identifier', + name: 'decrypt', + range: [36, 43], + loc: { + start: { line: 1, column: 36 }, + end: { line: 1, column: 43 } + } + }, + name: { + type: 'Identifier', + name: 'dec', + range: [47, 50], + loc: { + start: { line: 1, column: 47 }, + end: { line: 1, column: 50 } + } + }, + range: [36, 50], + loc: { + start: { line: 1, column: 36 }, + end: { line: 1, column: 50 } + } + }], + source: null, + range: [18, 53], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 53 } + } + }], + range: [16, 54], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 54 } + } + }, + range: [0, 54], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 54 } + } + }, + + 'import "jquery"': { + type: 'ImportDeclaration', + specifiers: [], + source: { + type: 'Literal', + value: 'jquery', + raw: '"jquery"', + range: [7, 15], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + + 'import $ from "jquery"': { + type: 'ImportDeclaration', + specifiers: [{ + type: 'ImportSpecifier', + id: { + type: 'Identifier', + name: '$', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + name: null, + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }], + kind: 'default', + source: { + type: 'Literal', + value: 'jquery', + raw: '"jquery"', + range: [14, 22], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + + 'import { encrypt, decrypt } from "crypto"': { + type: 'ImportDeclaration', + specifiers: [{ + type: 'ImportSpecifier', + id: { + type: 'Identifier', + name: 'encrypt', + range: [9, 16], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 16 } + } + }, + name: null, + range: [9, 16], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 16 } + } + }, { + type: 'ImportSpecifier', + id: { + type: 'Identifier', + name: 'decrypt', + range: [18, 25], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 25 } + } + }, + name: null, + range: [18, 25], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 25 } + } + }], + kind: 'named', + source: { + type: 'Literal', + value: 'crypto', + raw: '"crypto"', + range: [33, 41], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 41 } + } + }, + range: [0, 41], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 41 } + } + }, + + 'import { encrypt as enc } from "crypto"': { + type: 'ImportDeclaration', + specifiers: [{ + type: 'ImportSpecifier', + id: { + type: 'Identifier', + name: 'encrypt', + range: [9, 16], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 16 } + } + }, + name: { + type: 'Identifier', + name: 'enc', + range: [20, 23], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 23 } + } + }, + range: [9, 23], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 23 } + } + }], + kind: 'named', + source: { + type: 'Literal', + value: 'crypto', + raw: '"crypto"', + range: [31, 39], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 39 } + } + }, + range: [0, 39], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 39 } + } + }, + + 'import { decrypt, encrypt as enc } from "crypto"': { + type: 'ImportDeclaration', + specifiers: [{ + type: 'ImportSpecifier', + id: { + type: 'Identifier', + name: 'decrypt', + range: [9, 16], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 16 } + } + }, + name: null, + range: [9, 16], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 16 } + } + }, { + type: 'ImportSpecifier', + id: { + type: 'Identifier', + name: 'encrypt', + range: [18, 25], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 25 } + } + }, + name: { + type: 'Identifier', + name: 'enc', + range: [29, 32], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 32 } + } + }, + range: [18, 32], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 32 } + } + }], + kind: 'named', + source: { + type: 'Literal', + value: 'crypto', + raw: '"crypto"', + range: [40, 48], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 48 } + } + }, + range: [0, 48], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 48 } + } + }, + + 'import default from "foo"': { + type: 'ImportDeclaration', + specifiers: [{ + type: 'ImportSpecifier', + id: { + type: 'Identifier', + name: 'default', + range: [7, 14], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 14 } + } + }, + name: null, + range: [7, 14], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 14 } + } + }], + kind: 'default', + source: { + type: 'Literal', + value: 'foo', + raw: '"foo"', + range: [20, 25], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 25 } + } + }, + range: [0, 25], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 25 } + } + }, + + 'import { null as nil } from "bar"': { + type: 'ImportDeclaration', + specifiers: [{ + type: 'ImportSpecifier', + id: { + type: 'Identifier', + name: 'null', + range: [9, 13], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 13 } + } + }, + name: { + type: 'Identifier', + name: 'nil', + range: [17, 20], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 20 } + } + }, + range: [9, 20], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 20 } + } + }], + kind: 'named', + source: { + type: 'Literal', + value: 'bar', + raw: '"bar"', + range: [28, 33], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 33 } + } + }, + range: [0, 33], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 33 } + } + }, + + 'module "security" { import "cryto" }': { + type: 'ModuleDeclaration', + id: { + type: 'Literal', + value: 'security', + raw: '"security"', + range: [7, 17], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 17 } + } + }, + source: null, + body: { + type: 'BlockStatement', + body: [{ + type: 'ImportDeclaration', + specifiers: [], + source: { + type: 'Literal', + value: 'cryto', + raw: '"cryto"', + range: [27, 34], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 34 } + } + }, + range: [20, 35], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 35 } + } + }], + range: [18, 36], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 36 } + } + }, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + } + }, + + 'module()': { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'module', + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + 'arguments': [], + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + + 'module "foo" { module() }': { + type: 'ModuleDeclaration', + id: { + type: 'Literal', + value: 'foo', + raw: '"foo"', + range: [7, 12], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 12 } + } + }, + source: null, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'module', + range: [15, 21], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 21 } + } + }, + 'arguments': [], + range: [15, 23], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 23 } + } + }, + range: [15, 24], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 24 } + } + }], + range: [13, 25], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 25 } + } + }, + range: [0, 25], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 25 } + } + } + + }, + + + // http://wiki.ecmascript.org/doku.php?id=harmony:generators + + 'Harmony: Yield Expression': { + '(function* () { yield v })': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'YieldExpression', + argument: { + type: 'Identifier', + name: 'v', + range: [22, 23], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 23 } + } + }, + delegate: false, + range: [16, 23], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 23 } + } + }, + range: [16, 24], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 24 } + } + }], + range: [14, 25], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 25 } + } + }, + rest: null, + generator: true, + expression: false, + range: [1, 25], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 25 } + } + }, + range: [0, 26], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 26 } + } + }, + + '(function* () { yield *v })': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'YieldExpression', + argument: { + type: 'Identifier', + name: 'v', + range: [23, 24], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 24 } + } + }, + delegate: true, + range: [16, 24], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 24 } + } + }, + range: [16, 25], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 25 } + } + }], + range: [14, 26], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 26 } + } + }, + rest: null, + generator: true, + expression: false, + range: [1, 26], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 26 } + } + }, + range: [0, 27], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + }, + + 'function* test () { yield *v }': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'test', + range: [10, 14], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 14} + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'YieldExpression', + argument: { + type: 'Identifier', + name: 'v', + range: [27, 28], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 28 } + } + }, + delegate: true, + range: [20, 28], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 28 } + } + }, + range: [20, 29], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 29 } + } + }], + range: [18, 30], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 30 } + } + }, + rest: null, + generator: true, + expression: false, + range: [0, 30], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 30 } + } + }, + + 'var x = { *test () { yield *v } };': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'test', + range: [11, 15], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 15 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'YieldExpression', + argument: { + type: 'Identifier', + name: 'v', + range: [28, 29], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 29 } + } + }, + delegate: true, + range: [21, 29], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 29 } + } + }, + range: [21, 30], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 30 } + } + }], + range: [19, 31], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 31 } + } + }, + rest: null, + generator: true, + expression: false, + range: [19, 31], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 31 } + } + }, + kind: 'init', + method: true, + shorthand: false, + range: [10, 31], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 31 } + } + }], + range: [8, 33], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 33 } + } + }, + range: [4, 33], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 33 } + } + }], + kind: 'var', + range: [0, 34], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 34 } + } + }, + + 'function* t() {}': { + type: 'Program', + body: [{ + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 't', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [14, 16], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 16 } + } + }, + rest: null, + generator: true, + expression: false, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }], + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + }, + errors: [{ + index: 16, + lineNumber: 1, + column: 17, + message: 'Error: Line 1: Missing yield in generator' + }] + }, + + '(function* () { yield yield 10 })': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'YieldExpression', + argument: { + type: 'YieldExpression', + argument: { + type: 'Literal', + value: 10, + raw: '10', + range: [28, 30], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 30 } + } + }, + delegate: false, + range: [22, 30], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 30 } + } + }, + delegate: false, + range: [16, 30], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 30 } + } + }, + range: [16, 31], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 31 } + } + }], + range: [14, 32], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 32 } + } + }, + rest: null, + generator: true, + expression: false, + range: [1, 32], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 32 } + } + }, + range: [0, 33], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 33 } + } + } + + }, + + + + // http://wiki.ecmascript.org/doku.php?id=harmony:iterators + + 'Harmony: Iterators': { + + 'for(x of list) process(x);': { + type: 'ForOfStatement', + left: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'list', + range: [9, 13], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 13 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'process', + range: [15, 22], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 22 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'x', + range: [23, 24], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 24 } + } + }], + range: [15, 25], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 25 } + } + }, + range: [15, 26], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 26 } + } + }, + range: [0, 26], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 26 } + } + }, + + 'for (var x of list) process(x);': { + type: 'ForOfStatement', + left: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + init: null, + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }], + kind: 'var', + range: [5, 10], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 10 } + } + }, + right: { + type: 'Identifier', + name: 'list', + range: [14, 18], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 18 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'process', + range: [20, 27], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 27 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'x', + range: [28, 29], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 29 } + } + }], + range: [20, 30], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 30 } + } + }, + range: [20, 31], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 31 } + } + }, + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + } + }, + + 'for (var x = 42 of list) process(x);': { + type: 'ForOfStatement', + left: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + init: { + type: 'Literal', + value: 42, + raw: '42', + range: [13, 15], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 15 } + } + }, + range: [9, 15], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 15 } + } + }], + kind: 'var', + range: [5, 15], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 15 } + } + }, + right: { + type: 'Identifier', + name: 'list', + range: [19, 23], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 23 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'process', + range: [25, 32], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 32 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'x', + range: [33, 34], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 34 } + } + }], + range: [25, 35], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 35 } + } + }, + range: [25, 36], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 36 } + } + }, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + } + }, + + 'for (let x of list) process(x);': { + type: 'ForOfStatement', + left: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + init: null, + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }], + kind: 'let', + range: [5, 10], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 10 } + } + }, + right: { + type: 'Identifier', + name: 'list', + range: [14, 18], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 18 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'process', + range: [20, 27], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 27 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'x', + range: [28, 29], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 29 } + } + }], + range: [20, 30], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 30 } + } + }, + range: [20, 31], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 31 } + } + }, + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + } + } + + }, + + + // http://wiki.ecmascript.org/doku.php?id=strawman:maximally_minimal_classes + + 'Harmony: Class (strawman)': { + + 'var A = class extends B {}': { + type: "VariableDeclaration", + declarations: [ + { + type: "VariableDeclarator", + id: { + type: "Identifier", + name: "A", + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: { + type: "ClassExpression", + superClass: { + type: "Identifier", + name: "B", + range: [22, 23], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 23 } + } + }, + body: { + type: "ClassBody", + body: [], + range: [24, 26], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 26 } + } + }, + range: [8, 26], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 26 } + } + }, + range: [4, 26], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 26 } + } + } + ], + kind: "var", + range: [0, 26], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 26 } + } + }, + + 'class A extends class B extends C {} {}': { + type: "ClassDeclaration", + id: { + type: "Identifier", + name: "A", + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: { + type: "ClassExpression", + id: { + type: "Identifier", + name: "B", + range: [22, 23], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 23 } + } + }, + superClass: null, + body: { + type: "ClassBody", + body: [], + range: [34, 36], + loc: { + start: { line: 1, column: 34 }, + end: { line: 1, column: 36 } + } + }, + superClass: { + type: "Identifier", + name: "C", + range: [32, 33], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 33 } + } + }, + range: [16, 36], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 36 } + } + }, + body: { + type: "ClassBody", + body: [], + range: [37, 39], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 39 } + } + }, + range: [0, 39], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 39 } + } + }, + + 'class A {get() {}}': { + type: "ClassDeclaration", + id: { + type: "Identifier", + name: "A", + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: null, + body: { + type: "ClassBody", + body: [ + { + type: "MethodDefinition", + key: { + type: "Identifier", + name: "get", + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + value: { + type: "FunctionExpression", + id: null, + params: [], + defaults: [], + body: { + type: "BlockStatement", + body: [], + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + rest: null, + generator: false, + expression: false, + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + kind: "", + 'static': false, + range: [9, 17], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 17 } + } + } + ], + range: [8, 18], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 18 } + } + }, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + + 'class A { static get() {}}': { + type: 'ClassDeclaration', + id: { + type: 'Identifier', + name: 'A', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: null, + body: { + type: 'ClassBody', + body: [{ + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'get', + range: [17, 20], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 20 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [23, 25], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 25 } + } + }, + rest: null, + generator: false, + expression: false, + range: [23, 25], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 25 } + } + }, + kind: '', + 'static': true, + range: [10, 25], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 25 } + } + }], + range: [8, 26], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 26 } + } + }, + range: [0, 26], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 26 } + } + }, + + 'class A extends B {get foo() {}}': { + type: "ClassDeclaration", + id: { + type: "Identifier", + name: "A", + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: { + type: "Identifier", + name: "B", + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }, + body: { + type: "ClassBody", + body: [{ + type: "MethodDefinition", + key: { + type: "Identifier", + name: "foo", + range: [23, 26], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 26 } + } + }, + value: { + type: "FunctionExpression", + id: null, + params: [], + defaults: [], + body: { + type: "BlockStatement", + body: [], + range: [29, 31], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 31 } + } + }, + rest: null, + generator: false, + expression: false, + range: [29, 31], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 31 } + } + }, + kind: "get", + 'static': false, + range: [19, 31], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 31 } + } + }], + range: [18, 32], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 32 } + } + }, + range: [0, 32], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 32 } + } + }, + + 'class A extends B { static get foo() {}}': { + type: 'ClassDeclaration', + id: { + type: 'Identifier', + name: 'A', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: { + type: 'Identifier', + name: 'B', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }, + body: { + type: 'ClassBody', + body: [{ + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'foo', + range: [31, 34], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 34 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [37, 39], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 39 } + } + }, + rest: null, + generator: false, + expression: false, + range: [37, 39], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 39 } + } + }, + kind: 'get', + 'static': true, + range: [20, 39], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 39 } + } + }], + range: [18, 40], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 40 } + } + }, + range: [0, 40], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 40 } + } + }, + + 'class A {set a(v) {}}': { + type: "ClassDeclaration", + id: { + type: "Identifier", + name: "A", + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: null, + body: { + type: "ClassBody", + body: [ + { + type: "MethodDefinition", + key: { + type: 'Identifier', + name: 'a', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }, + value: { + type: "FunctionExpression", + id: null, + params: [{ + type: 'Identifier', + name: 'v', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }], + defaults: [], + body: { + type: "BlockStatement", + body: [], + range: [18, 20], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 20 } + } + }, + rest: null, + generator: false, + expression: false, + range: [18, 20], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 20 } + } + }, + kind: "set", + 'static': false, + range: [9, 20], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 20 } + } + } + ], + range: [8, 21], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + + 'class A { static set a(v) {}}': { + type: 'ClassDeclaration', + id: { + type: 'Identifier', + name: 'A', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: null, + body: { + type: 'ClassBody', + body: [{ + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'a', + range: [21, 22], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 22 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'v', + range: [23, 24], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 24 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [26, 28], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 28 } + } + }, + rest: null, + generator: false, + expression: false, + range: [26, 28], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 28 } + } + }, + kind: 'set', + 'static': true, + range: [10, 28], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 28 } + } + }], + range: [8, 29], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 29 } + } + }, + range: [0, 29], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 29 } + } + }, + + 'class A {set(v) {};}': { + type: "ClassDeclaration", + id: { + type: "Identifier", + name: "A", + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: null, + body: { + type: "ClassBody", + body: [ + { + type: "MethodDefinition", + key: { + type: "Identifier", + name: "set", + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + value: { + type: "FunctionExpression", + id: null, + params: [{ + type: 'Identifier', + name: 'v', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }], + defaults: [], + body: { + type: "BlockStatement", + body: [], + range: [16, 18], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 18 } + } + }, + rest: null, + generator: false, + expression: false, + range: [16, 18], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 18 } + } + }, + kind: "", + 'static': false, + range: [9, 18], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 18 } + } + } + ], + range: [8, 20], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 20 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + + 'class A { static set(v) {};}': { + type: 'ClassDeclaration', + id: { + type: 'Identifier', + name: 'A', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: null, + body: { + type: 'ClassBody', + body: [{ + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'set', + range: [17, 20], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 20 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'v', + range: [21, 22], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 22 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [24, 26], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 26 } + } + }, + rest: null, + generator: false, + expression: false, + range: [24, 26], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 26 } + } + }, + kind: '', + 'static': true, + range: [10, 26], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 26 } + } + }], + range: [8, 28], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 28 } + } + }, + range: [0, 28], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 28 } + } + }, + + 'class A {*gen(v) { yield v; }}': { + type: "ClassDeclaration", + id: { + type: "Identifier", + name: "A", + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: null, + body: { + type: "ClassBody", + body: [ + { + type: "MethodDefinition", + key: { + type: "Identifier", + name: "gen", + range: [10, 13], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 13 } + } + }, + value: { + type: "FunctionExpression", + id: null, + params: [{ + type: 'Identifier', + name: 'v', + range: [14, 15], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 15 } + } + }], + defaults: [], + body: { + type: "BlockStatement", + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'YieldExpression', + argument: { + type: 'Identifier', + name: 'v', + range: [25, 26], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 26 } + } + }, + delegate: false, + range: [19, 26], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 26 } + } + }, + range: [19, 27], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 27 } + } + }], + range: [17, 29], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 29 } + } + }, + rest: null, + generator: true, + expression: false, + range: [17, 29], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 29 } + } + }, + kind: "", + 'static': false, + range: [9, 29], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 29 } + } + } + ], + range: [8, 30], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 30 } + } + }, + range: [0, 30], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 30 } + } + }, + + 'class A { static *gen(v) { yield v; }}': { + type: 'ClassDeclaration', + id: { + type: 'Identifier', + name: 'A', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: null, + body: { + type: 'ClassBody', + body: [{ + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'gen', + range: [18, 21], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 21 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'v', + range: [22, 23], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 23 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'YieldExpression', + argument: { + type: 'Identifier', + name: 'v', + range: [33, 34], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 34 } + } + }, + delegate: false, + range: [27, 34], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 34 } + } + }, + range: [27, 35], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 35 } + } + }], + range: [25, 37], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 37 } + } + }, + rest: null, + generator: true, + expression: false, + range: [25, 37], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 37 } + } + }, + kind: '', + 'static': true, + range: [10, 37], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 37 } + } + }], + range: [8, 38], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 38 } + } + }, + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + } + }, + + '"use strict"; (class A {constructor() { super() }})': { + type: "Program", + body: [ + { + type: "ExpressionStatement", + expression: { + type: "Literal", + value: "use strict", + raw: "\"use strict\"", + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + { + type: "ExpressionStatement", + expression: { + type: "ClassExpression", + id: { + type: "Identifier", + name: "A", + range: [21, 22], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 22 } + } + }, + superClass: null, + body: { + type: "ClassBody", + body: [ + { + type: "MethodDefinition", + key: { + type: "Identifier", + name: "constructor", + range: [24, 35], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 35 } + } + }, + value: { + type: "FunctionExpression", + id: null, + params: [], + defaults: [], + body: { + type: "BlockStatement", + body: [ + { + type: "ExpressionStatement", + expression: { + type: "CallExpression", + callee: { + type: "Identifier", + name: "super", + range: [40, 45], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 45 } + } + }, + 'arguments': [], + range: [40, 47], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 47 } + } + }, + range: [40, 48], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 48 } + } + } + ], + range: [38, 49], + loc: { + start: { line: 1, column: 38 }, + end: { line: 1, column: 49 } + } + }, + rest: null, + generator: false, + expression: false, + range: [38, 49], + loc: { + start: { line: 1, column: 38 }, + end: { line: 1, column: 49 } + } + }, + kind: "", + 'static': false, + range: [24, 49], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 49 } + } + } + ], + range: [23, 50], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 50 } + } + }, + range: [15, 50], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 50 } + } + }, + range: [14, 51], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 51 } + } + } + ], + range: [0, 51], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 51 } + }, + comments: [] + }, + + 'class A {static foo() {}}': { + type: 'ClassDeclaration', + id: { + type: 'Identifier', + name: 'A', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7} + } + }, + superClass: null, + body: { + type: 'ClassBody', + body: [{ + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'foo', + range: [16, 19], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 19 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [22, 24], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 24} + } + }, + rest: null, + generator: false, + expression: false, + range: [22, 24], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 24 } + } + }, + kind: '', + 'static': true, + range: [9, 24], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 24 } + } + }], + range: [8, 25], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 25 } + } + }, + range: [0, 25], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 25 } + } + }, + + 'class A {foo() {} static bar() {}}': { + type: 'ClassDeclaration', + id: { + type: 'Identifier', + name: 'A', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: null, + body: { + type: 'ClassBody', + body: [{ + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'foo', + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + rest: null, + generator: false, + expression: false, + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + kind: '', + 'static': false, + range: [9, 17], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 17 } + } + }, { + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'bar', + range: [25, 28], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 28 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [31, 33], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 33 } + } + }, + rest: null, + generator: false, + expression: false, + range: [31, 33], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 33 } + } + }, + kind: '', + 'static': true, + range: [18, 33], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 33 } + } + }], + range: [8, 34], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 34 } + } + }, + range: [0, 34], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 34 } + } + }, + + '"use strict"; (class A { static constructor() { super() }})': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'ClassExpression', + id: { + type: 'Identifier', + name: 'A', + range: [21, 22], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 22 } + } + }, + superClass: null, + body: { + type: 'ClassBody', + body: [{ + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'constructor', + range: [32, 43], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 43 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'super', + range: [48, 53], + loc: { + start: { line: 1, column: 48 }, + end: { line: 1, column: 53 } + } + }, + 'arguments': [], + range: [48, 55], + loc: { + start: { line: 1, column: 48 }, + end: { line: 1, column: 55 } + } + }, + range: [48, 56], + loc: { + start: { line: 1, column: 48 }, + end: { line: 1, column: 56 } + } + }], + range: [46, 57], + loc: { + start: { line: 1, column: 46 }, + end: { line: 1, column: 57 } + } + }, + rest: null, + generator: false, + expression: false, + range: [46, 57], + loc: { + start: { line: 1, column: 46 }, + end: { line: 1, column: 57 } + } + }, + kind: '', + 'static': true, + range: [25, 57], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 57 } + } + }], + range: [23, 58], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 58 } + } + }, + range: [15, 58], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 58 } + } + }, + range: [14, 59], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 59 } + } + }], + range: [0, 59], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 59 } + }, + comments: [] + }, + + 'class A { foo() {} bar() {}}': { + type: 'ClassDeclaration', + id: { + type: 'Identifier', + name: 'A', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: null, + body: { + type: 'ClassBody', + body: [{ + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'foo', + range: [10, 13], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 13 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [16, 18], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 18 } + } + }, + rest: null, + generator: false, + expression: false, + range: [16, 18], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 18 } + } + }, + kind: '', + 'static': false, + range: [10, 18], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 18 } + } + }, { + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'bar', + range: [19, 22], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 22 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [25, 27], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 27 } + } + }, + rest: null, + generator: false, + expression: false, + range: [25, 27], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 27 } + } + }, + kind: '', + 'static': false, + range: [19, 27], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 27 } + } + }], + range: [8, 28], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 28 } + } + }, + range: [0, 28], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 28 } + } + }, + + 'class A { get foo() {} set foo(v) {}}': { + type: 'ClassDeclaration', + id: { + type: 'Identifier', + name: 'A', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: null, + body: { + type: 'ClassBody', + body: [{ + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'foo', + range: [14, 17], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 17 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [20, 22], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 22 } + } + }, + rest: null, + generator: false, + expression: false, + range: [20, 22], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 22 } + } + }, + kind: 'get', + 'static': false, + range: [10, 22], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 22 } + } + }, { + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'foo', + range: [27, 30], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 30 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'v', + range: [31, 32], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 32 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [34, 36], + loc: { + start: { line: 1, column: 34 }, + end: { line: 1, column: 36 } + } + }, + rest: null, + generator: false, + expression: false, + range: [34, 36], + loc: { + start: { line: 1, column: 34 }, + end: { line: 1, column: 36 } + } + }, + kind: 'set', + 'static': false, + range: [23, 36], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 36 } + } + }], + range: [8, 37], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 37 } + } + }, + range: [0, 37], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 37 } + } + }, + + 'class A { static get foo() {} get foo() {}}': { + type: 'ClassDeclaration', + id: { + type: 'Identifier', + name: 'A', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: null, + body: { + type: 'ClassBody', + body: [{ + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'foo', + range: [21, 24], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 24 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [27, 29], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 29 } + } + }, + rest: null, + generator: false, + expression: false, + range: [27, 29], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 29 } + } + }, + kind: 'get', + 'static': true, + range: [10, 29], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 29 } + } + }, { + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'foo', + range: [34, 37], + loc: { + start: { line: 1, column: 34 }, + end: { line: 1, column: 37 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [40, 42], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 42 } + } + }, + rest: null, + generator: false, + expression: false, + range: [40, 42], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 42 } + } + }, + kind: 'get', + 'static': false, + range: [30, 42], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 42 } + } + }], + range: [8, 43], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 43 } + } + }, + range: [0, 43], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 43 } + } + }, + + 'class A { static get foo() {} static get bar() {} }': { + type: 'ClassDeclaration', + id: { + type: 'Identifier', + name: 'A', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: null, + body: { + type: 'ClassBody', + body: [{ + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'foo', + range: [21, 24], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 24 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [27, 29], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 29 } + } + }, + rest: null, + generator: false, + expression: false, + range: [27, 29], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 29 } + } + }, + kind: 'get', + 'static': true, + range: [10, 29], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 29 } + } + }, { + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'bar', + range: [41, 44], + loc: { + start: { line: 1, column: 41 }, + end: { line: 1, column: 44 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [47, 49], + loc: { + start: { line: 1, column: 47 }, + end: { line: 1, column: 49 } + } + }, + rest: null, + generator: false, + expression: false, + range: [47, 49], + loc: { + start: { line: 1, column: 47 }, + end: { line: 1, column: 49 } + } + }, + kind: 'get', + 'static': true, + range: [30, 49], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 49 } + } + }], + range: [8, 51], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 51 } + } + }, + range: [0, 51], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 51 } + } + }, + + 'class A { static get foo() {} static set foo(v) {} get foo() {} set foo(v) {}}': { + type: 'ClassDeclaration', + id: { + type: 'Identifier', + name: 'A', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: null, + body: { + type: 'ClassBody', + body: [{ + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'foo', + range: [21, 24], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 24 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [27, 29], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 29 } + } + }, + rest: null, + generator: false, + expression: false, + range: [27, 29], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 29 } + } + }, + kind: 'get', + 'static': true, + range: [10, 29], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 29 } + } + }, { + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'foo', + range: [41, 44], + loc: { + start: { line: 1, column: 41 }, + end: { line: 1, column: 44 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'v', + range: [45, 46], + loc: { + start: { line: 1, column: 45 }, + end: { line: 1, column: 46 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [48, 50], + loc: { + start: { line: 1, column: 48 }, + end: { line: 1, column: 50 } + } + }, + rest: null, + generator: false, + expression: false, + range: [48, 50], + loc: { + start: { line: 1, column: 48 }, + end: { line: 1, column: 50 } + } + }, + kind: 'set', + 'static': true, + range: [30, 50], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 50 } + } + }, { + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'foo', + range: [55, 58], + loc: { + start: { line: 1, column: 55 }, + end: { line: 1, column: 58 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [61, 63], + loc: { + start: { line: 1, column: 61 }, + end: { line: 1, column: 63 } + } + }, + rest: null, + generator: false, + expression: false, + range: [61, 63], + loc: { + start: { line: 1, column: 61 }, + end: { line: 1, column: 63 } + } + }, + kind: 'get', + 'static': false, + range: [51, 63], + loc: { + start: { line: 1, column: 51 }, + end: { line: 1, column: 63 } + } + }, { + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'foo', + range: [68, 71], + loc: { + start: { line: 1, column: 68 }, + end: { line: 1, column: 71 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'v', + range: [72, 73], + loc: { + start: { line: 1, column: 72 }, + end: { line: 1, column: 73 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [75, 77], + loc: { + start: { line: 1, column: 75 }, + end: { line: 1, column: 77 } + } + }, + rest: null, + generator: false, + expression: false, + range: [75, 77], + loc: { + start: { line: 1, column: 75 }, + end: { line: 1, column: 77 } + } + }, + kind: 'set', + 'static': false, + range: [64, 77], + loc: { + start: { line: 1, column: 64 }, + end: { line: 1, column: 77 } + } + }], + range: [8, 78], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 78 } + } + }, + range: [0, 78], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 78 } + } + }, + + 'class A { set foo(v) {} get foo() {} }': { + type: 'ClassDeclaration', + id: { + type: 'Identifier', + name: 'A', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + superClass: null, + body: { + type: 'ClassBody', + body: [{ + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'foo', + range: [14, 17], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 17 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'v', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [21, 23], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 23 } + } + }, + rest: null, + generator: false, + expression: false, + range: [21, 23], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 23 } + } + }, + kind: 'set', + 'static': false, + range: [10, 23], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 23 } + } + }, { + type: 'MethodDefinition', + key: { + type: 'Identifier', + name: 'foo', + range: [28, 31], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 31 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [34, 36], + loc: { + start: { line: 1, column: 34 }, + end: { line: 1, column: 36 } + } + }, + rest: null, + generator: false, + expression: false, + range: [34, 36], + loc: { + start: { line: 1, column: 34 }, + end: { line: 1, column: 36 } + } + }, + kind: 'get', + 'static': false, + range: [24, 36], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 36 } + } + }], + range: [8, 38], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 38 } + } + }, + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + } + }, + + 'class A { get foo() {} get foo() {} }': { + index: 30, + lineNumber: 1, + column: 31, + message: 'Error: Line 1: Illegal duplicate property in class definition', + description: 'Illegal duplicate property in class definition' + }, + + 'class A { set foo(v) {} set foo(v) {} }': { + index: 31, + lineNumber: 1, + column: 32, + message: 'Error: Line 1: Illegal duplicate property in class definition', + description: 'Illegal duplicate property in class definition' + }, + + 'class A { get foo() {} foo() {} }': { + index: 26, + lineNumber: 1, + column: 27, + message: 'Error: Line 1: Illegal duplicate property in class definition', + description: 'Illegal duplicate property in class definition' + }, + + 'class A { foo() {} get foo() {} }': { + index: 26, + lineNumber: 1, + column: 27, + message: 'Error: Line 1: Illegal duplicate property in class definition', + description: 'Illegal duplicate property in class definition' + }, + + 'class A { set foo(v) {} foo() {} }': { + index: 27, + lineNumber: 1, + column: 28, + message: 'Error: Line 1: Illegal duplicate property in class definition', + description: 'Illegal duplicate property in class definition' + }, + + 'class A { foo() {} set foo(v) {} }': { + index: 26, + lineNumber: 1, + column: 27, + message: 'Error: Line 1: Illegal duplicate property in class definition', + description: 'Illegal duplicate property in class definition' + }, + + }, + + 'ES6: Default parameters': { + + 'x = function(y = 1) {}': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'y', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }], + defaults: [{ + type: 'Literal', + value: 1, + raw: '1', + range: [17, 18], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 18 } + } + }], + body: { + type: 'BlockStatement', + body: [], + range: [20, 22], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 22 } + } + }, + rest: null, + generator: false, + expression: false, + range: [4, 22], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + + 'function f(a = 1) {}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'f', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + params: [{ + type: 'Identifier', + name: 'a', + range: [11, 12], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 12 } + } + }], + defaults: [{ + type: 'Literal', + value: 1, + raw: '1', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }], + body: { + type: 'BlockStatement', + body: [], + range: [18, 20], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 20 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + + 'x = { f: function(a=1) {} }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'f', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'a', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }], + defaults: [{ + type: 'Literal', + value: 1, + raw: '1', + range: [20, 21], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 21 } + } + }], + body: { + type: 'BlockStatement', + body: [], + range: [23, 25], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 25 } + } + }, + rest: null, + generator: false, + expression: false, + range: [9, 25], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 25 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [6, 25], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 25 } + } + }], + range: [4, 27], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 27 } + } + }, + range: [0, 27], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + }, + range: [0, 27], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + }, + + 'x = { f(a=1) {} }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'f', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'a', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }], + defaults: [{ + type: 'Literal', + value: 1, + raw: '1', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }], + body: { + type: 'BlockStatement', + body: [], + range: [13, 15], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 15 } + } + }, + rest: null, + generator: false, + expression: false, + range: [13, 15], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 15 } + } + }, + kind: 'init', + method: true, + shorthand: false, + range: [6, 15], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 15 } + } + }], + range: [4, 17], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + } + + }, + + // ECMAScript 6th Syntax, 13 - Rest parameters + // http://wiki.ecmascript.org/doku.php?id=harmony:rest_parameters + 'ES6: Rest parameters': { + 'function f(a, ...b) {}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'f', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + params: [{ + type: 'Identifier', + name: 'a', + range: [11, 12], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 12 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [20, 22], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 22 } + } + }, + rest: { + type: 'Identifier', + name: 'b', + range: [17, 18], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 18 } + } + }, + generator: false, + expression: false, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + } + }, + + 'ES6: Destructured Parameters': { + + 'function x([ a, b ]){}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'x', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + params: [{ + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }, { + type: 'Identifier', + name: 'b', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }], + range: [11, 19], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 19 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [20, 22], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 22 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + + 'function x({ a, b }){}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'x', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + params: [{ + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }, + value: { + type: 'Identifier', + name: 'a', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'b', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }, + value: { + type: 'Identifier', + name: 'b', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }], + range: [11, 19], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 19 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [20, 22], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 22 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + + + 'function x(a, { a }){}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'x', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + params: [{ + type: 'Identifier', + name: 'a', + range: [11, 12], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 12 } + } + }, { + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }, + value: { + type: 'Identifier', + name: 'a', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }], + range: [14, 19], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 19 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [20, 22], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 22 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + + 'function x(...[ a, b ]){}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'x', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [23, 25], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 25 } + } + }, + rest: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }, { + type: 'Identifier', + name: 'b', + range: [19, 20], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 20 } + } + }], + range: [14, 22], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 22 } + } + }, + generator: false, + expression: false, + range: [0, 25], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 25 } + } + }, + + 'function x({ a: { w, x }, b: [y, z] }, ...[a, b, c]){}': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'x', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + params: [{ + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }, + value: { + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'w', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }, + value: { + type: 'Identifier', + name: 'w', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'x', + range: [21, 22], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 22 } + } + }, + value: { + type: 'Identifier', + name: 'x', + range: [21, 22], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 22 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [21, 22], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 22 } + } + }], + range: [16, 24], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 24 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [13, 24], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 24 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'b', + range: [26, 27], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 27 } + } + }, + value: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'y', + range: [30, 31], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 31 } + } + }, { + type: 'Identifier', + name: 'z', + range: [33, 34], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 34 } + } + }], + range: [29, 35], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 35 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [26, 35], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 35 } + } + }], + range: [11, 37], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 37 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [52, 54], + loc: { + start: { line: 1, column: 52 }, + end: { line: 1, column: 54 } + } + }, + rest: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [43, 44], + loc: { + start: { line: 1, column: 43 }, + end: { line: 1, column: 44 } + } + }, { + type: 'Identifier', + name: 'b', + range: [46, 47], + loc: { + start: { line: 1, column: 46 }, + end: { line: 1, column: 47 } + } + }, { + type: 'Identifier', + name: 'c', + range: [49, 50], + loc: { + start: { line: 1, column: 49 }, + end: { line: 1, column: 50 } + } + }], + range: [42, 51], + loc: { + start: { line: 1, column: 42 }, + end: { line: 1, column: 51 } + } + }, + generator: false, + expression: false, + range: [0, 54], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 54 } + } + }, + + '(function x([ a, b ]){})': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'x', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + params: [{ + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [14, 15], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 15 } + } + }, { + type: 'Identifier', + name: 'b', + range: [17, 18], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 18 } + } + }], + range: [12, 20], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 20 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [21, 23], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 23 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 23], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 23 } + } + }, + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + + '(function x({ a, b }){})': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'x', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + params: [{ + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [14, 15], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 15 } + } + }, + value: { + type: 'Identifier', + name: 'a', + range: [14, 15], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 15 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [14, 15], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 15 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'b', + range: [17, 18], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 18 } + } + }, + value: { + type: 'Identifier', + name: 'b', + range: [17, 18], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 18 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [17, 18], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 18 } + } + }], + range: [12, 20], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 20 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [21, 23], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 23 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 23], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 23 } + } + }, + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + + '(function x(...[ a, b ]){})': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'x', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [24, 26], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 26 } + } + }, + rest: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [17, 18], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 18 } + } + }, { + type: 'Identifier', + name: 'b', + range: [20, 21], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 21 } + } + }], + range: [15, 23], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 23 } + } + }, + generator: false, + expression: false, + range: [1, 26], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 26 } + } + }, + range: [0, 27], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + }, + + '(function x({ a: { w, x }, b: [y, z] }, ...[a, b, c]){})': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'x', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + params: [{ + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [14, 15], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 15 } + } + }, + value: { + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'w', + range: [19, 20], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 20 } + } + }, + value: { + type: 'Identifier', + name: 'w', + range: [19, 20], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 20 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [19, 20], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 20 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'x', + range: [22, 23], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 23 } + } + }, + value: { + type: 'Identifier', + name: 'x', + range: [22, 23], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 23 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [22, 23], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 23 } + } + }], + range: [17, 25], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 25 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [14, 25], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 25 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'b', + range: [27, 28], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 28 } + } + }, + value: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'y', + range: [31, 32], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 32 } + } + }, { + type: 'Identifier', + name: 'z', + range: [34, 35], + loc: { + start: { line: 1, column: 34 }, + end: { line: 1, column: 35 } + } + }], + range: [30, 36], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 36 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [27, 36], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 36 } + } + }], + range: [12, 38], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 38 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [53, 55], + loc: { + start: { line: 1, column: 53 }, + end: { line: 1, column: 55 } + } + }, + rest: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [44, 45], + loc: { + start: { line: 1, column: 44 }, + end: { line: 1, column: 45 } + } + }, { + type: 'Identifier', + name: 'b', + range: [47, 48], + loc: { + start: { line: 1, column: 47 }, + end: { line: 1, column: 48 } + } + }, { + type: 'Identifier', + name: 'c', + range: [50, 51], + loc: { + start: { line: 1, column: 50 }, + end: { line: 1, column: 51 } + } + }], + range: [43, 52], + loc: { + start: { line: 1, column: 43 }, + end: { line: 1, column: 52 } + } + }, + generator: false, + expression: false, + range: [1, 55], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 55 } + } + }, + range: [0, 56], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 56 } + } + }, + + '({ x([ a, b ]){} })': { + type: 'ExpressionStatement', + expression: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'x', + range: [3, 4], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 4 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, { + type: 'Identifier', + name: 'b', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }], + range: [5, 13], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 13 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [14, 16], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 16 } + } + }, + rest: null, + generator: false, + expression: false, + range: [14, 16], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 16 } + } + }, + kind: 'init', + method: true, + shorthand: false, + range: [3, 16], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 16 } + } + }], + range: [1, 18], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 18 } + } + }, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + + '({ x(...[ a, b ]){} })': { + type: 'ExpressionStatement', + expression: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'x', + range: [3, 4], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 4 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [17, 19], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 19 } + } + }, + rest: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, { + type: 'Identifier', + name: 'b', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }], + range: [8, 16], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 16 } + } + }, + generator: false, + expression: false, + range: [17, 19], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 19 } + } + }, + kind: 'init', + method: true, + shorthand: false, + range: [3, 19], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 19 } + } + }], + range: [1, 21], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + + '({ x({ a: { w, x }, b: [y, z] }, ...[a, b, c]){} })': { + type: 'ExpressionStatement', + expression: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'x', + range: [3, 4], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 4 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + value: { + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'w', + range: [12, 13], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 13 } + } + }, + value: { + type: 'Identifier', + name: 'w', + range: [12, 13], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 13 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [12, 13], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 13 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'x', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }, + value: { + type: 'Identifier', + name: 'x', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }], + range: [10, 18], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 18 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [7, 18], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 18 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'b', + range: [20, 21], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 21 } + } + }, + value: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'y', + range: [24, 25], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 25 } + } + }, { + type: 'Identifier', + name: 'z', + range: [27, 28], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 28 } + } + }], + range: [23, 29], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 29 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [20, 29], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 29 } + } + }], + range: [5, 31], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 31 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [46, 48], + loc: { + start: { line: 1, column: 46 }, + end: { line: 1, column: 48 } + } + }, + rest: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [37, 38], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 38 } + } + }, { + type: 'Identifier', + name: 'b', + range: [40, 41], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 41 } + } + }, { + type: 'Identifier', + name: 'c', + range: [43, 44], + loc: { + start: { line: 1, column: 43 }, + end: { line: 1, column: 44 } + } + }], + range: [36, 45], + loc: { + start: { line: 1, column: 36 }, + end: { line: 1, column: 45 } + } + }, + generator: false, + expression: false, + range: [46, 48], + loc: { + start: { line: 1, column: 46 }, + end: { line: 1, column: 48 } + } + }, + kind: 'init', + method: true, + shorthand: false, + range: [3, 48], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 48 } + } + }], + range: [1, 50], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 50 } + } + }, + range: [0, 51], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 51 } + } + }, + + '(...a) => {}': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + rest: { + type: 'Identifier', + name: 'a', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + generator: false, + expression: false, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + '(a, ...b) => {}': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'a', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [13, 15], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 15 } + } + }, + rest: { + type: 'Identifier', + name: 'b', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + generator: false, + expression: false, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + + '({ a }) => {}': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [3, 4], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 4 } + } + }, + value: { + type: 'Identifier', + name: 'a', + range: [3, 4], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 4 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [3, 4], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 4 } + } + }], + range: [1, 6], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 6 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [11, 13], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 13 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + + '({ a }, ...b) => {}': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [3, 4], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 4 } + } + }, + value: { + type: 'Identifier', + name: 'a', + range: [3, 4], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 4 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [3, 4], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 4 } + } + }], + range: [1, 6], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 6 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [17, 19], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 19 } + } + }, + rest: { + type: 'Identifier', + name: 'b', + range: [11, 12], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 12 } + } + }, + generator: false, + expression: false, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + '(...[a, b]) => {}': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + rest: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, { + type: 'Identifier', + name: 'b', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }], + range: [4, 10], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 10 } + } + }, + generator: false, + expression: false, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + '(a, ...[b]) => {}': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'a', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + rest: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'b', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }], + range: [7, 10], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 10 } + } + }, + generator: false, + expression: false, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + '({ a: [a, b] }, ...c) => {}': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [3, 4], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 4 } + } + }, + value: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, { + type: 'Identifier', + name: 'b', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }], + range: [6, 12], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 12 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [3, 12], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 12 } + } + }], + range: [1, 14], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 14 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [25, 27], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 27 } + } + }, + rest: { + type: 'Identifier', + name: 'c', + range: [19, 20], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 20 } + } + }, + generator: false, + expression: false, + range: [0, 27], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + }, + range: [0, 27], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + }, + '({ a: b, c }, [d, e], ...f) => {}': { + type: 'ExpressionStatement', + expression: { + type: 'ArrowFunctionExpression', + id: null, + params: [{ + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [3, 4], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 4 } + } + }, + value: { + type: 'Identifier', + name: 'b', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [3, 7], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 7 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'c', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + value: { + type: 'Identifier', + name: 'c', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }], + range: [1, 12], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 12 } + } + }, { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'd', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }, { + type: 'Identifier', + name: 'e', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }], + range: [14, 20], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 20 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [31, 33], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 33 } + } + }, + rest: { + type: 'Identifier', + name: 'f', + range: [25, 26], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 26 } + } + }, + generator: false, + expression: false, + range: [0, 33], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 33 } + } + }, + range: [0, 33], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 33 } + } + } + + }, + + 'ES6: SpreadElement': { + '[...a] = b': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'ArrayPattern', + elements: [{ + type: 'SpreadElement', + argument: { + type: 'Identifier', + name: 'a', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [1, 5], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 5 } + } + }], + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + right: { + type: 'Identifier', + name: 'b', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + }, + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + }, + + '[a, ...b] = c': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, { + type: 'SpreadElement', + argument: { + type: 'Identifier', + name: 'b', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + range: [4, 8], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 8 } + } + }], + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + right: { + type: 'Identifier', + name: 'c', + range: [12, 13], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + + '[{ a, b }, ...c] = d': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'ArrayPattern', + elements: [{ + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [3, 4], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 4 } + } + }, + value: { + type: 'Identifier', + name: 'a', + range: [3, 4], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 4 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [3, 4], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 4 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'b', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + value: { + type: 'Identifier', + name: 'b', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }], + range: [1, 9], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 9 } + } + }, { + type: 'SpreadElement', + argument: { + type: 'Identifier', + name: 'c', + range: [14, 15], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 15 } + } + }, + range: [11, 15], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 15 } + } + }], + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + right: { + type: 'Identifier', + name: 'd', + range: [19, 20], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 20 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + + '[a, ...[b, c]] = d': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, { + type: 'SpreadElement', + argument: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'b', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, { + type: 'Identifier', + name: 'c', + range: [11, 12], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 12 } + } + }], + range: [7, 13], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 13 } + } + }, + range: [4, 13], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 13 } + } + }], + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + right: { + type: 'Identifier', + name: 'd', + range: [17, 18], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 18 } + } + }, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + + 'var [...a] = b': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'ArrayPattern', + elements: [{ + type: 'SpreadElement', + argument: { + type: 'Identifier', + name: 'a', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [5, 9], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 9 } + } + }], + range: [4, 10], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 10 } + } + }, + init: { + type: 'Identifier', + name: 'b', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }, + range: [4, 14], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 14 } + } + }], + kind: 'var', + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + 'var [a, ...b] = c': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, { + type: 'SpreadElement', + argument: { + type: 'Identifier', + name: 'b', + range: [11, 12], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 12 } + } + }, + range: [8, 12], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 12 } + } + }], + range: [4, 13], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 13 } + } + }, + init: { + type: 'Identifier', + name: 'c', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }, + range: [4, 17], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 17 } + } + }], + kind: 'var', + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + + 'var [{ a, b }, ...c] = d': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'ArrayPattern', + elements: [{ + type: 'ObjectPattern', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'a', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + value: { + type: 'Identifier', + name: 'a', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'b', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + value: { + type: 'Identifier', + name: 'b', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + kind: 'init', + method: false, + shorthand: true, + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }], + range: [5, 13], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 13 } + } + }, { + type: 'SpreadElement', + argument: { + type: 'Identifier', + name: 'c', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }, + range: [15, 19], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 19 } + } + }], + range: [4, 20], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 20 } + } + }, + init: { + type: 'Identifier', + name: 'd', + range: [23, 24], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 24 } + } + }, + range: [4, 24], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 24 } + } + }], + kind: 'var', + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + + 'var [a, ...[b, c]] = d': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'a', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, { + type: 'SpreadElement', + argument: { + type: 'ArrayPattern', + elements: [{ + type: 'Identifier', + name: 'b', + range: [12, 13], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 13 } + } + }, { + type: 'Identifier', + name: 'c', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }], + range: [11, 17], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 17 } + } + }, + range: [8, 17], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 17 } + } + }], + range: [4, 18], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 18 } + } + }, + init: { + type: 'Identifier', + name: 'd', + range: [21, 22], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 22 } + } + }, + range: [4, 22], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 22 } + } + }], + kind: 'var', + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + + 'func(...a)': { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'func', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + 'arguments': [{ + type: 'SpreadElement', + argument: { + type: 'Identifier', + name: 'a', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [5, 9], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 9 } + } + }], + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + }, + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + }, + + 'func(a, ...b)': { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'func', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'a', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, { + type: 'SpreadElement', + argument: { + type: 'Identifier', + name: 'b', + range: [11, 12], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 12 } + } + }, + range: [8, 12], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 12 } + } + }], + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + } + }, + + + 'Harmony Invalid syntax': { + + '0o': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0o1a': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0o9': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0o18': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0O': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0O1a': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0O9': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0O18': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0b': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0b1a': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0b9': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0b18': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0b12': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0B': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0B1a': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0B9': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0B18': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0B12': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '"\\u{110000}"': { + index: 11, + lineNumber: 1, + column: 12, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '"\\u{}"': { + index: 4, + lineNumber: 1, + column: 5, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '"\\u{FFFF"': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '"\\u{FFZ}"': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '[v] += ary': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + '[2] = 42': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + '({ obj:20 }) = 42': { + index: 12, + lineNumber: 1, + column: 13, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + '( { get x() {} } ) = 0': { + index: 18, + lineNumber: 1, + column: 19, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + 'x \n is y': { + index: 7, + lineNumber: 2, + column: 5, + message: 'Error: Line 2: Unexpected identifier' + }, + + 'x \n isnt y': { + index: 9, + lineNumber: 2, + column: 7, + message: 'Error: Line 2: Unexpected identifier' + }, + + 'function default() {}': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token default' + }, + + 'function hello() {\'use strict\'; ({ i: 10, s(eval) { } }); }': { + index: 44, + lineNumber: 1, + column: 45, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + 'function a() { "use strict"; ({ b(t, t) { } }); }': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' + }, + + 'var super': { + index: 4, + lineNumber: 1, + column: 5, + message: 'Error: Line 1: Unexpected reserved word' + }, + + 'var default': { + index: 4, + lineNumber: 1, + column: 5, + message: 'Error: Line 1: Unexpected token default' + }, + + 'let default': { + index: 4, + lineNumber: 1, + column: 5, + message: 'Error: Line 1: Unexpected token default' + }, + + 'const default': { + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Unexpected token default' + }, + + + + '({ v: eval }) = obj': { + index: 13, + lineNumber: 1, + column: 14, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + '({ v: arguments }) = obj': { + index: 18, + lineNumber: 1, + column: 19, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + 'for (var i = function() { return 10 in [] } in list) process(x);': { + index: 44, + lineNumber: 1, + column: 45, + message: 'Error: Line 1: Unexpected token in' + }, + + 'for (let x = 42 in list) process(x);': { + index: 16, + lineNumber: 1, + column: 17, + message: 'Error: Line 1: Unexpected token in' + }, + + 'for (let x = 42 of list) process(x);': { + index: 16, + lineNumber: 1, + column: 17, + message: 'Error: Line 1: Unexpected identifier' + }, + + 'module\n"crypto" {}': { + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Illegal newline after module' + }, + + 'module foo from bar': { + index: 19, + lineNumber: 1, + column: 20, + message: 'Error: Line 1: Invalid module specifier' + }, + + 'module 42': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Unexpected number' + }, + + 'module foo bar': { + index: 11, + lineNumber: 1, + column: 12, + message: 'Error: Line 1: Unexpected identifier' + }, + + 'module "crypto" { module "e" {} }': { + index: 17, + lineNumber: 1, + column: 18, + message: 'Error: Line 1: Module declaration can not be nested' + }, + + 'module "x" { export * from foo }': { + index: 30, + lineNumber: 1, + column: 31, + message: 'Error: Line 1: Invalid module specifier' + }, + + 'import foo': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Missing from after import' + }, + + 'import { foo, bar }': { + index: 19, + lineNumber: 1, + column: 20, + message: 'Error: Line 1: Missing from after import' + }, + + 'import foo from bar': { + index: 19, + lineNumber: 1, + column: 20, + message: 'Error: Line 1: Invalid module specifier' + }, + + '((a)) => 42': { + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Unexpected token =>' + }, + + '(a, (b)) => 42': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token =>' + }, + + '"use strict"; (eval = 10) => 42': { + index: 15, + lineNumber: 1, + column: 16, + message: 'Error: Line 1: Assignment to eval or arguments is not allowed in strict mode' + }, + + // strict mode, using eval when IsSimpleParameterList is true + '"use strict"; eval => 42': { + index: 24, + lineNumber: 1, + column: 25, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + // strict mode, using arguments when IsSimpleParameterList is true + '"use strict"; arguments => 42': { + index: 29, + lineNumber: 1, + column: 30, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + // strict mode, using eval when IsSimpleParameterList is true + '"use strict"; (eval, a) => 42': { + index: 29, + lineNumber: 1, + column: 30, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + // strict mode, using arguments when IsSimpleParameterList is true + '"use strict"; (arguments, a) => 42': { + index: 34, + lineNumber: 1, + column: 35, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + // strict mode, using eval when IsSimpleParameterList is false + '"use strict"; (eval, a = 10) => 42': { + index: 34, + lineNumber: 1, + column: 35, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + '(a, a) => 42': { + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' + }, + + '"use strict"; (a, a) => 42': { + index: 20, + lineNumber: 1, + column: 21, + message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' + }, + + '"use strict"; (a) => 00': { + index: 21, + lineNumber: 1, + column: 22, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }, + + '() <= 42': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token <=' + }, + + '(10) => 00': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Unexpected token =>' + }, + + '(10, 20) => 00': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token =>' + }, + + 'yield v': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Illegal yield expression' + }, + + 'yield 10': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Illegal yield expression' + }, + + 'yield* 10': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Illegal yield expression' + }, + + 'e => yield* 10': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Illegal yield expression' + }, + + '(function () { yield 10 })': { + index: 20, + lineNumber: 1, + column: 21, + message: 'Error: Line 1: Illegal yield expression' + }, + + '(function () { yield* 10 })': { + index: 20, + lineNumber: 1, + column: 21, + message: 'Error: Line 1: Illegal yield expression' + }, + + '(function* () { })': { + index: 17, + lineNumber: 1, + column: 18, + message: 'Error: Line 1: Missing yield in generator' + }, + + 'function* test () { }': { + index: 21, + lineNumber: 1, + column: 22, + message: 'Error: Line 1: Missing yield in generator' + }, + + 'var obj = { *test() { } }': { + index: 23, + lineNumber: 1, + column: 24, + message: 'Error: Line 1: Missing yield in generator' + }, + + 'var obj = { *test** }': { + index: 17, + lineNumber: 1, + column: 18, + message: 'Error: Line 1: Unexpected token *' + }, + + 'class A extends yield B { }': { + index: 21, + lineNumber: 1, + column: 22, + message: 'Error: Line 1: Illegal yield expression' + }, + + 'class default': { + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Unexpected token default' + }, + + '`test': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + 'switch `test`': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Unexpected quasi test' + }, + + '`hello ${10 `test`': { + index: 18, + lineNumber: 1, + column: 19, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '`hello ${10;test`': { + index: 11, + lineNumber: 1, + column: 12, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + 'function a() 1 // expression closure is not supported': { + index: 13, + lineNumber: 1, + column: 14, + message: 'Error: Line 1: Unexpected number' + }, + + '[a,b if (a)] // (a,b)': { + index: 4, + lineNumber: 1, + column: 5, + message: 'Error: Line 1: Comprehension Error' + }, + + 'for each (let x in {}) {};': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Each is not supported' + }, + + '[x for (let x in [])]': { + index: 20, + lineNumber: 1, + column: 21, + message: 'Error: Line 1: Comprehension Error' + }, + + '[x for (const x in [])]': { + index: 22, + lineNumber: 1, + column: 23, + message: 'Error: Line 1: Comprehension Error' + }, + + '[x for (var x in [])]': { + index: 20, + lineNumber: 1, + column: 21, + message: 'Error: Line 1: Comprehension Error' + }, + + '[a,b for (a in [])] // (a,b) ': { + index: 4, + lineNumber: 1, + column: 5, + message: 'Error: Line 1: Comprehension Error' + }, + + '[x if (x)] // block required': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Comprehension must have at least one block' + }, + + 'var a = [x if (x)]': { + index: 18, + lineNumber: 1, + column: 19, + message: 'Error: Line 1: Comprehension must have at least one block' + }, + + '[for (x in [])] // no espression': { + index: 15, + lineNumber: 1, + column: 16, + message: 'Error: Line 1: Comprehension Error' + }, + + '({ "chance" }) = obj': { + index: 12, + lineNumber: 1, + column: 13, + message: 'Error: Line 1: Unexpected token }' + }, + + '({ 42 }) = obj': { + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Unexpected token }' + }, + + 'function f(a, ...b, c)': { + index: 18, + lineNumber: 1, + column: 19, + message: 'Error: Line 1: Rest parameter must be final parameter of an argument list' + }, + + 'function f(a, ...b = 0)': { + index: 19, + lineNumber: 1, + column: 20, + message: 'Error: Line 1: Rest parameter can not have a default value' + }, + + 'function x(...{ a }){}': { + index: 14, + lineNumber: 1, + column: 15, + message: 'Error: Line 1: Invalid rest parameter' + }, + + '"use strict"; function x(a, { a }){}': { + index: 36, + lineNumber: 1, + column: 37, + message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' + }, + + '"use strict"; function x({ b: { a } }, [{ b: { a } }]){}': { + index: 56, + lineNumber: 1, + column: 57, + message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' + }, + + '"use strict"; function x(a, ...[a]){}': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' + }, + + '(...a, b) => {}': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Rest parameter must be final parameter of an argument list' + }, + + '([ 5 ]) => {}': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Invalid left-hand side in formals list' + }, + + '({ 5 }) => {}': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Unexpected token }' + }, + + '(...[ 5 ]) => {}': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Invalid left-hand side in formals list' + }, + + '[...{ a }] = b': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Invalid spread argument' + }, + + '[...a, b] = c': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Spread must be the final element of an element list' + }, + + 'func(...a, b)': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Spread must be the final element of an element list' + }, + + '({ t(eval) { "use strict"; } });': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + '"use strict"; `${test}\\02`;': { + index: 21, + lineNumber: 1, + column: 22, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }, + + '[...a, ] = b': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Spread must be the final element of an element list' + }, + + 'if (b,...a, );': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Spread must be the final element of an element list' + }, + + '(b, ...a)': { + index: 8, + lineNumber: 1, + column: 9, + message: 'Error: Line 1: Illegal spread element' + }, + + 'module "Universe" { ; ; ': { + index: 26, + lineNumber: 1, + column: 27, + message: 'Error: Line 1: Unexpected end of input' + }, + + 'switch (cond) { case 10: let a = 20; ': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Unexpected end of input' + }, + + '"use strict"; (eval) => 42': { + index: 26, + lineNumber: 1, + column: 27, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + '(eval) => { "use strict"; 42 }': { + index: 30, + lineNumber: 1, + column: 31, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + '({ get test() { } }) => 42': { + index: 20, + lineNumber: 1, + column: 21, + message: 'Error: Line 1: Invalid left-hand side in formals list' + } + + } +}; + +// Merge both test fixtures. + +(function () { + + 'use strict'; + + var i, fixtures; + + for (i in harmonyTestFixture) { + if (harmonyTestFixture.hasOwnProperty(i)) { + fixtures = harmonyTestFixture[i]; + if (i !== 'Syntax' && testFixture.hasOwnProperty(i)) { + throw new Error('Harmony test should not replace existing test for ' + i); + } + testFixture[i] = fixtures; + } + } + +}()); diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/index.html b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/index.html new file mode 100644 index 00000000..3ded48da --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/index.html @@ -0,0 +1,115 @@ + + + + + + + Esprima: Unit Tests + + + + + + + + + + + +
    +
    +

    Unit Tests ensures the correct implementation

    +
    +
    + + +
    +
    +
    +
    + +
    +
    Please wait...
    +
    +

    A software project is only as good as its QA workflow. This set of unit tests + makes sure that no regression is ever sneaked in.

    +

    Version being tested: .

    +
    +
    +
    + + + + + + + + + + + + diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/module.html b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/module.html new file mode 100644 index 00000000..a952a156 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/module.html @@ -0,0 +1,112 @@ + + + + + + + Esprima: Module Loading Test + + + + + + + + + + + +
    +
    +

    Module Loading works also web browsers

    +
    +
    + + +
    +
    +
    +
    + +
    +
    Please wait...
    +
    +

    The following tests are to ensure that Esprima can be loaded using AMD (Asynchronous Module Definition) loader such as RequireJS.

    +
    +
    +
    + + + + + + + + + + + diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/module.js b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/module.js new file mode 100644 index 00000000..637fbc12 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/module.js @@ -0,0 +1,131 @@ +/*jslint browser:true plusplus:true */ +/*global require:true */ +function runTests() { + 'use strict'; + + function setText(el, str) { + if (typeof el.innerText === 'string') { + el.innerText = str; + } else { + el.textContent = str; + } + } + + function reportSuccess(code) { + var report, e; + report = document.getElementById('report'); + e = document.createElement('pre'); + e.setAttribute('class', 'code'); + setText(e, code); + report.appendChild(e); + } + + function reportFailure(code, expected, actual) { + var report, e; + + report = document.getElementById('report'); + + e = document.createElement('pre'); + e.setAttribute('class', 'code'); + setText(e, code); + report.appendChild(e); + + e = document.createElement('p'); + setText(e, 'Expected type: ' + expected); + report.appendChild(e); + + e = document.createElement('p'); + setText(e, 'Actual type: ' + actual); + report.appendChild(e); + } + + + require(['../esprima'], function (ESParser) { + var tick, total, failures, obj, variable, variables, i, entry, entries; + + // We check only the type of some members of ESParser. + variables = { + 'version': 'string', + 'parse': 'function', + 'Syntax': 'object', + 'Syntax.AssignmentExpression': 'string', + 'Syntax.ArrayExpression': 'string', + 'Syntax.BlockStatement': 'string', + 'Syntax.BinaryExpression': 'string', + 'Syntax.BreakStatement': 'string', + 'Syntax.CallExpression': 'string', + 'Syntax.CatchClause': 'string', + 'Syntax.ConditionalExpression': 'string', + 'Syntax.ContinueStatement': 'string', + 'Syntax.DoWhileStatement': 'string', + 'Syntax.DebuggerStatement': 'string', + 'Syntax.EmptyStatement': 'string', + 'Syntax.ExpressionStatement': 'string', + 'Syntax.ForStatement': 'string', + 'Syntax.ForInStatement': 'string', + 'Syntax.FunctionDeclaration': 'string', + 'Syntax.FunctionExpression': 'string', + 'Syntax.Identifier': 'string', + 'Syntax.IfStatement': 'string', + 'Syntax.Literal': 'string', + 'Syntax.LabeledStatement': 'string', + 'Syntax.LogicalExpression': 'string', + 'Syntax.MemberExpression': 'string', + 'Syntax.NewExpression': 'string', + 'Syntax.ObjectExpression': 'string', + 'Syntax.Program': 'string', + 'Syntax.Property': 'string', + 'Syntax.ReturnStatement': 'string', + 'Syntax.SequenceExpression': 'string', + 'Syntax.SwitchStatement': 'string', + 'Syntax.SwitchCase': 'string', + 'Syntax.ThisExpression': 'string', + 'Syntax.ThrowStatement': 'string', + 'Syntax.TryStatement': 'string', + 'Syntax.UnaryExpression': 'string', + 'Syntax.UpdateExpression': 'string', + 'Syntax.VariableDeclaration': 'string', + 'Syntax.VariableDeclarator': 'string', + 'Syntax.WhileStatement': 'string', + 'Syntax.WithStatement': 'string' + }; + + total = failures = 0; + tick = new Date(); + + for (variable in variables) { + if (variables.hasOwnProperty(variable)) { + entries = variable.split('.'); + obj = ESParser; + for (i = 0; i < entries.length; ++i) { + entry = entries[i]; + if (typeof obj[entry] !== 'undefined') { + obj = obj[entry]; + } else { + obj = undefined; + break; + } + } + total++; + if (typeof obj === variables[variable]) { + reportSuccess(variable); + } else { + failures++; + reportFailure(variable, variables[variable], typeof obj); + } + } + } + + tick = (new Date()) - tick; + + if (failures > 0) { + document.getElementById('status').className = 'alert-box alert'; + setText(document.getElementById('status'), total + ' tests. ' + + 'Failures: ' + failures + '. ' + tick + ' ms'); + } else { + document.getElementById('status').className = 'alert-box success'; + setText(document.getElementById('status'), total + ' tests. ' + + 'No failure. ' + tick + ' ms'); + } + }); +} diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/reflect.js b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/reflect.js new file mode 100644 index 00000000..19c597f1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/reflect.js @@ -0,0 +1,421 @@ +// This is modified from Mozilla Reflect.parse test suite (the file is located +// at js/src/tests/js1_8_5/extensions/reflect-parse.js in the source tree). +// +// Some notable changes: +// * Removed unsupported features (destructuring, let, comprehensions...). +// * Removed tests for E4X (ECMAScript for XML). +// * Removed everything related to builder. +// * Enclosed every 'Pattern' construct with a scope. +// * Removed the test for bug 632030 and bug 632024. + +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ + +(function (exports) { + +function testReflect(Reflect, Pattern) { + +function program(elts) { return Pattern({ type: "Program", body: elts }) } +function exprStmt(expr) { return Pattern({ type: "ExpressionStatement", expression: expr }) } +function throwStmt(expr) { return Pattern({ type: "ThrowStatement", argument: expr }) } +function returnStmt(expr) { return Pattern({ type: "ReturnStatement", argument: expr }) } +function yieldExpr(expr) { return Pattern({ type: "YieldExpression", argument: expr }) } +function lit(val) { return Pattern({ type: "Literal", value: val }) } +var thisExpr = Pattern({ type: "ThisExpression" }); +function funDecl(id, params, body) { return Pattern({ type: "FunctionDeclaration", + id: id, + params: params, + defaults: [], + body: body, + rest: null, + generator: false, + expression: false + }) } +function genFunDecl(id, params, body) { return Pattern({ type: "FunctionDeclaration", + id: id, + params: params, + defaults: [], + body: body, + rest: null, + generator: true, + expression: false + }) } +function declarator(id, init) { return Pattern({ type: "VariableDeclarator", id: id, init: init }) } +function varDecl(decls) { return Pattern({ type: "VariableDeclaration", declarations: decls, kind: "var" }) } +function letDecl(decls) { return Pattern({ type: "VariableDeclaration", declarations: decls, kind: "let" }) } +function constDecl(decls) { return Pattern({ type: "VariableDeclaration", declarations: decls, kind: "const" }) } +function ident(name) { return Pattern({ type: "Identifier", name: name }) } +function dotExpr(obj, id) { return Pattern({ type: "MemberExpression", computed: false, object: obj, property: id }) } +function memExpr(obj, id) { return Pattern({ type: "MemberExpression", computed: true, object: obj, property: id }) } +function forStmt(init, test, update, body) { return Pattern({ type: "ForStatement", init: init, test: test, update: update, body: body }) } +function forInStmt(lhs, rhs, body) { return Pattern({ type: "ForInStatement", left: lhs, right: rhs, body: body, each: false }) } +function forEachInStmt(lhs, rhs, body) { return Pattern({ type: "ForInStatement", left: lhs, right: rhs, body: body, each: true }) } +function breakStmt(lab) { return Pattern({ type: "BreakStatement", label: lab }) } +function continueStmt(lab) { return Pattern({ type: "ContinueStatement", label: lab }) } +function blockStmt(body) { return Pattern({ type: "BlockStatement", body: body }) } +var emptyStmt = Pattern({ type: "EmptyStatement" }); +function ifStmt(test, cons, alt) { return Pattern({ type: "IfStatement", test: test, alternate: alt, consequent: cons }) } +function labStmt(lab, stmt) { return Pattern({ type: "LabeledStatement", label: lab, body: stmt }) } +function withStmt(obj, stmt) { return Pattern({ type: "WithStatement", object: obj, body: stmt }) } +function whileStmt(test, stmt) { return Pattern({ type: "WhileStatement", test: test, body: stmt }) } +function doStmt(stmt, test) { return Pattern({ type: "DoWhileStatement", test: test, body: stmt }) } +function switchStmt(disc, cases) { return Pattern({ type: "SwitchStatement", discriminant: disc, cases: cases }) } +function caseClause(test, stmts) { return Pattern({ type: "SwitchCase", test: test, consequent: stmts }) } +function defaultClause(stmts) { return Pattern({ type: "SwitchCase", test: null, consequent: stmts }) } +function catchClause(id, guard, body) { if (guard) { return Pattern({ type: "GuardedCatchClause", param: id, guard: guard, body: body }) } else { return Pattern({ type: "CatchClause", param: id, body: body }) } } +function tryStmt(body, guarded, catches, fin) { return Pattern({ type: "TryStatement", block: body, guardedHandlers: guarded, handlers: catches, finalizer: fin }) } +function letStmt(head, body) { return Pattern({ type: "LetStatement", head: head, body: body }) } +function funExpr(id, args, body, gen) { return Pattern({ type: "FunctionExpression", + id: id, + params: args, + defaults: [], + body: body, + rest: null, + generator: false, + expression: false + }) } +function genFunExpr(id, args, body) { return Pattern({ type: "FunctionExpression", + id: id, + params: args, + defaults: [], + body: body, + rest: null, + generator: true, + expression: false + }) } + +function unExpr(op, arg) { return Pattern({ type: "UnaryExpression", operator: op, argument: arg }) } +function binExpr(op, left, right) { return Pattern({ type: "BinaryExpression", operator: op, left: left, right: right }) } +function aExpr(op, left, right) { return Pattern({ type: "AssignmentExpression", operator: op, left: left, right: right }) } +function updExpr(op, arg, prefix) { return Pattern({ type: "UpdateExpression", operator: op, argument: arg, prefix: prefix }) } +function logExpr(op, left, right) { return Pattern({ type: "LogicalExpression", operator: op, left: left, right: right }) } + +function condExpr(test, cons, alt) { return Pattern({ type: "ConditionalExpression", test: test, consequent: cons, alternate: alt }) } +function seqExpr(exprs) { return Pattern({ type: "SequenceExpression", expressions: exprs }) } +function newExpr(callee, args) { return Pattern({ type: "NewExpression", callee: callee, arguments: args }) } +function callExpr(callee, args) { return Pattern({ type: "CallExpression", callee: callee, arguments: args }) } +function arrExpr(elts) { return Pattern({ type: "ArrayExpression", elements: elts }) } +function objExpr(elts) { return Pattern({ type: "ObjectExpression", properties: elts }) } +function objProp(key, value, kind) { return Pattern({ type: "Property", key: key, value: value, kind: kind, method: false, shorthand: false }) } + +function arrPatt(elts) { return Pattern({ type: "ArrayPattern", elements: elts }) } +function objPatt(elts) { return Pattern({ type: "ObjectPattern", properties: elts }) } + +function localSrc(src) { return "(function(){ " + src + " })" } +function localPatt(patt) { return program([exprStmt(funExpr(null, [], blockStmt([patt])))]) } +function blockSrc(src) { return "(function(){ { " + src + " } })" } +function blockPatt(patt) { return program([exprStmt(funExpr(null, [], blockStmt([blockStmt([patt])])))]) } + +function assertBlockStmt(src, patt) { + blockPatt(patt).assert(Reflect.parse(blockSrc(src))); +} + +function assertBlockExpr(src, patt) { + assertBlockStmt(src, exprStmt(patt)); +} + +function assertBlockDecl(src, patt, builder) { + blockPatt(patt).assert(Reflect.parse(blockSrc(src), {builder: builder})); +} + +function assertLocalStmt(src, patt) { + localPatt(patt).assert(Reflect.parse(localSrc(src))); +} + +function assertLocalExpr(src, patt) { + assertLocalStmt(src, exprStmt(patt)); +} + +function assertLocalDecl(src, patt) { + localPatt(patt).assert(Reflect.parse(localSrc(src))); +} + +function assertGlobalStmt(src, patt, builder) { + program([patt]).assert(Reflect.parse(src, {builder: builder})); +} + +function assertGlobalExpr(src, patt, builder) { + program([exprStmt(patt)]).assert(Reflect.parse(src, {builder: builder})); + //assertStmt(src, exprStmt(patt)); +} + +function assertGlobalDecl(src, patt) { + program([patt]).assert(Reflect.parse(src)); +} + +function assertProg(src, patt) { + program(patt).assert(Reflect.parse(src)); +} + +function assertStmt(src, patt) { + assertLocalStmt(src, patt); + assertGlobalStmt(src, patt); + assertBlockStmt(src, patt); +} + +function assertExpr(src, patt) { + assertLocalExpr(src, patt); + assertGlobalExpr(src, patt); + assertBlockExpr(src, patt); +} + +function assertDecl(src, patt) { + assertLocalDecl(src, patt); + assertGlobalDecl(src, patt); + assertBlockDecl(src, patt); +} + +function assertError(src, errorType) { + try { + Reflect.parse(src); + } catch (e) { + return; + } + throw new Error("expected " + errorType.name + " for " + uneval(src)); +} + + +// general tests + +// NB: These are useful but for now jit-test doesn't do I/O reliably. + +//program(_).assert(Reflect.parse(snarf('data/flapjax.txt'))); +//program(_).assert(Reflect.parse(snarf('data/jquery-1.4.2.txt'))); +//program(_).assert(Reflect.parse(snarf('data/prototype.js'))); +//program(_).assert(Reflect.parse(snarf('data/dojo.js.uncompressed.js'))); +//program(_).assert(Reflect.parse(snarf('data/mootools-1.2.4-core-nc.js'))); + + +// declarations + +assertDecl("var x = 1, y = 2, z = 3", + varDecl([declarator(ident("x"), lit(1)), + declarator(ident("y"), lit(2)), + declarator(ident("z"), lit(3))])); +assertDecl("var x, y, z", + varDecl([declarator(ident("x"), null), + declarator(ident("y"), null), + declarator(ident("z"), null)])); +assertDecl("function foo() { }", + funDecl(ident("foo"), [], blockStmt([]))); +assertDecl("function foo() { return 42 }", + funDecl(ident("foo"), [], blockStmt([returnStmt(lit(42))]))); + + +// Bug 591437: rebound args have their defs turned into uses +assertDecl("function f(a) { function a() { } }", + funDecl(ident("f"), [ident("a")], blockStmt([funDecl(ident("a"), [], blockStmt([]))]))); +assertDecl("function f(a,b,c) { function b() { } }", + funDecl(ident("f"), [ident("a"),ident("b"),ident("c")], blockStmt([funDecl(ident("b"), [], blockStmt([]))]))); + +// expressions + +assertExpr("true", lit(true)); +assertExpr("false", lit(false)); +assertExpr("42", lit(42)); +assertExpr("(/asdf/)", lit(/asdf/)); +assertExpr("this", thisExpr); +assertExpr("foo", ident("foo")); +assertExpr("foo.bar", dotExpr(ident("foo"), ident("bar"))); +assertExpr("foo[bar]", memExpr(ident("foo"), ident("bar"))); +assertExpr("(function(){})", funExpr(null, [], blockStmt([]))); +assertExpr("(function f() {})", funExpr(ident("f"), [], blockStmt([]))); +assertExpr("(function f(x,y,z) {})", funExpr(ident("f"), [ident("x"),ident("y"),ident("z")], blockStmt([]))); +assertExpr("(++x)", updExpr("++", ident("x"), true)); +assertExpr("(x++)", updExpr("++", ident("x"), false)); +assertExpr("(+x)", unExpr("+", ident("x"))); +assertExpr("(-x)", unExpr("-", ident("x"))); +assertExpr("(!x)", unExpr("!", ident("x"))); +assertExpr("(~x)", unExpr("~", ident("x"))); +assertExpr("(delete x)", unExpr("delete", ident("x"))); +assertExpr("(typeof x)", unExpr("typeof", ident("x"))); +assertExpr("(void x)", unExpr("void", ident("x"))); +assertExpr("(x == y)", binExpr("==", ident("x"), ident("y"))); +assertExpr("(x != y)", binExpr("!=", ident("x"), ident("y"))); +assertExpr("(x === y)", binExpr("===", ident("x"), ident("y"))); +assertExpr("(x !== y)", binExpr("!==", ident("x"), ident("y"))); +assertExpr("(x < y)", binExpr("<", ident("x"), ident("y"))); +assertExpr("(x <= y)", binExpr("<=", ident("x"), ident("y"))); +assertExpr("(x > y)", binExpr(">", ident("x"), ident("y"))); +assertExpr("(x >= y)", binExpr(">=", ident("x"), ident("y"))); +assertExpr("(x << y)", binExpr("<<", ident("x"), ident("y"))); +assertExpr("(x >> y)", binExpr(">>", ident("x"), ident("y"))); +assertExpr("(x >>> y)", binExpr(">>>", ident("x"), ident("y"))); +assertExpr("(x + y)", binExpr("+", ident("x"), ident("y"))); +assertExpr("(w + x + y + z)", binExpr("+", binExpr("+", binExpr("+", ident("w"), ident("x")), ident("y")), ident("z"))); +assertExpr("(x - y)", binExpr("-", ident("x"), ident("y"))); +assertExpr("(w - x - y - z)", binExpr("-", binExpr("-", binExpr("-", ident("w"), ident("x")), ident("y")), ident("z"))); +assertExpr("(x * y)", binExpr("*", ident("x"), ident("y"))); +assertExpr("(x / y)", binExpr("/", ident("x"), ident("y"))); +assertExpr("(x % y)", binExpr("%", ident("x"), ident("y"))); +assertExpr("(x | y)", binExpr("|", ident("x"), ident("y"))); +assertExpr("(x ^ y)", binExpr("^", ident("x"), ident("y"))); +assertExpr("(x & y)", binExpr("&", ident("x"), ident("y"))); +assertExpr("(x in y)", binExpr("in", ident("x"), ident("y"))); +assertExpr("(x instanceof y)", binExpr("instanceof", ident("x"), ident("y"))); +assertExpr("(x = y)", aExpr("=", ident("x"), ident("y"))); +assertExpr("(x += y)", aExpr("+=", ident("x"), ident("y"))); +assertExpr("(x -= y)", aExpr("-=", ident("x"), ident("y"))); +assertExpr("(x *= y)", aExpr("*=", ident("x"), ident("y"))); +assertExpr("(x /= y)", aExpr("/=", ident("x"), ident("y"))); +assertExpr("(x %= y)", aExpr("%=", ident("x"), ident("y"))); +assertExpr("(x <<= y)", aExpr("<<=", ident("x"), ident("y"))); +assertExpr("(x >>= y)", aExpr(">>=", ident("x"), ident("y"))); +assertExpr("(x >>>= y)", aExpr(">>>=", ident("x"), ident("y"))); +assertExpr("(x |= y)", aExpr("|=", ident("x"), ident("y"))); +assertExpr("(x ^= y)", aExpr("^=", ident("x"), ident("y"))); +assertExpr("(x &= y)", aExpr("&=", ident("x"), ident("y"))); +assertExpr("(x || y)", logExpr("||", ident("x"), ident("y"))); +assertExpr("(x && y)", logExpr("&&", ident("x"), ident("y"))); +assertExpr("(w || x || y || z)", logExpr("||", logExpr("||", logExpr("||", ident("w"), ident("x")), ident("y")), ident("z"))) +assertExpr("(x ? y : z)", condExpr(ident("x"), ident("y"), ident("z"))); +assertExpr("(x,y)", seqExpr([ident("x"),ident("y")])) +assertExpr("(x,y,z)", seqExpr([ident("x"),ident("y"),ident("z")])) +assertExpr("(a,b,c,d,e,f,g)", seqExpr([ident("a"),ident("b"),ident("c"),ident("d"),ident("e"),ident("f"),ident("g")])); +assertExpr("(new Object)", newExpr(ident("Object"), [])); +assertExpr("(new Object())", newExpr(ident("Object"), [])); +assertExpr("(new Object(42))", newExpr(ident("Object"), [lit(42)])); +assertExpr("(new Object(1,2,3))", newExpr(ident("Object"), [lit(1),lit(2),lit(3)])); +assertExpr("(String())", callExpr(ident("String"), [])); +assertExpr("(String(42))", callExpr(ident("String"), [lit(42)])); +assertExpr("(String(1,2,3))", callExpr(ident("String"), [lit(1),lit(2),lit(3)])); +assertExpr("[]", arrExpr([])); +assertExpr("[1]", arrExpr([lit(1)])); +assertExpr("[1,2]", arrExpr([lit(1),lit(2)])); +assertExpr("[1,2,3]", arrExpr([lit(1),lit(2),lit(3)])); +assertExpr("[1,,2,3]", arrExpr([lit(1),,lit(2),lit(3)])); +assertExpr("[1,,,2,3]", arrExpr([lit(1),,,lit(2),lit(3)])); +assertExpr("[1,,,2,,3]", arrExpr([lit(1),,,lit(2),,lit(3)])); +assertExpr("[1,,,2,,,3]", arrExpr([lit(1),,,lit(2),,,lit(3)])); +assertExpr("[,1,2,3]", arrExpr([,lit(1),lit(2),lit(3)])); +assertExpr("[,,1,2,3]", arrExpr([,,lit(1),lit(2),lit(3)])); +assertExpr("[,,,1,2,3]", arrExpr([,,,lit(1),lit(2),lit(3)])); +assertExpr("[,,,1,2,3,]", arrExpr([,,,lit(1),lit(2),lit(3)])); +assertExpr("[,,,1,2,3,,]", arrExpr([,,,lit(1),lit(2),lit(3),undefined])); +assertExpr("[,,,1,2,3,,,]", arrExpr([,,,lit(1),lit(2),lit(3),undefined,undefined])); +assertExpr("[,,,,,]", arrExpr([undefined,undefined,undefined,undefined,undefined])); +assertExpr("({})", objExpr([])); +assertExpr("({x:1})", objExpr([objProp(ident("x"), lit(1), "init")])); +assertExpr("({x:1, y:2})", objExpr([objProp(ident("x"), lit(1), "init"), + objProp(ident("y"), lit(2), "init")])); +assertExpr("({x:1, y:2, z:3})", objExpr([objProp(ident("x"), lit(1), "init"), + objProp(ident("y"), lit(2), "init"), + objProp(ident("z"), lit(3), "init") ])); +assertExpr("({x:1, 'y':2, z:3})", objExpr([objProp(ident("x"), lit(1), "init"), + objProp(lit("y"), lit(2), "init"), + objProp(ident("z"), lit(3), "init") ])); +assertExpr("({'x':1, 'y':2, z:3})", objExpr([objProp(lit("x"), lit(1), "init"), + objProp(lit("y"), lit(2), "init"), + objProp(ident("z"), lit(3), "init") ])); +assertExpr("({'x':1, 'y':2, 3:3})", objExpr([objProp(lit("x"), lit(1), "init"), + objProp(lit("y"), lit(2), "init"), + objProp(lit(3), lit(3), "init") ])); + +// Bug 571617: eliminate constant-folding +assertExpr("2 + 3", binExpr("+", lit(2), lit(3))); + +// Bug 632026: constant-folding +assertExpr("typeof(0?0:a)", unExpr("typeof", condExpr(lit(0), lit(0), ident("a")))); + +// Bug 632056: constant-folding +program([exprStmt(ident("f")), + ifStmt(lit(1), + funDecl(ident("f"), [], blockStmt([])), + null)]).assert(Reflect.parse("f; if (1) function f(){}")); + +// statements + +assertStmt("throw 42", throwStmt(lit(42))); +assertStmt("for (;;) break", forStmt(null, null, null, breakStmt(null))); +assertStmt("for (x; y; z) break", forStmt(ident("x"), ident("y"), ident("z"), breakStmt(null))); +assertStmt("for (var x; y; z) break", forStmt(varDecl([declarator(ident("x"), null)]), ident("y"), ident("z"), breakStmt(null))); +assertStmt("for (var x = 42; y; z) break", forStmt(varDecl([declarator(ident("x"), lit(42))]), ident("y"), ident("z"), breakStmt(null))); +assertStmt("for (x; ; z) break", forStmt(ident("x"), null, ident("z"), breakStmt(null))); +assertStmt("for (var x; ; z) break", forStmt(varDecl([declarator(ident("x"), null)]), null, ident("z"), breakStmt(null))); +assertStmt("for (var x = 42; ; z) break", forStmt(varDecl([declarator(ident("x"), lit(42))]), null, ident("z"), breakStmt(null))); +assertStmt("for (x; y; ) break", forStmt(ident("x"), ident("y"), null, breakStmt(null))); +assertStmt("for (var x; y; ) break", forStmt(varDecl([declarator(ident("x"), null)]), ident("y"), null, breakStmt(null))); +assertStmt("for (var x = 42; y; ) break", forStmt(varDecl([declarator(ident("x"),lit(42))]), ident("y"), null, breakStmt(null))); +assertStmt("for (var x in y) break", forInStmt(varDecl([declarator(ident("x"),null)]), ident("y"), breakStmt(null))); +assertStmt("for (x in y) break", forInStmt(ident("x"), ident("y"), breakStmt(null))); +assertStmt("{ }", blockStmt([])); +assertStmt("{ throw 1; throw 2; throw 3; }", blockStmt([ throwStmt(lit(1)), throwStmt(lit(2)), throwStmt(lit(3))])); +assertStmt(";", emptyStmt); +assertStmt("if (foo) throw 42;", ifStmt(ident("foo"), throwStmt(lit(42)), null)); +assertStmt("if (foo) throw 42; else true;", ifStmt(ident("foo"), throwStmt(lit(42)), exprStmt(lit(true)))); +assertStmt("if (foo) { throw 1; throw 2; throw 3; }", + ifStmt(ident("foo"), + blockStmt([throwStmt(lit(1)), throwStmt(lit(2)), throwStmt(lit(3))]), + null)); +assertStmt("if (foo) { throw 1; throw 2; throw 3; } else true;", + ifStmt(ident("foo"), + blockStmt([throwStmt(lit(1)), throwStmt(lit(2)), throwStmt(lit(3))]), + exprStmt(lit(true)))); +assertStmt("foo: for(;;) break foo;", labStmt(ident("foo"), forStmt(null, null, null, breakStmt(ident("foo"))))); +assertStmt("foo: for(;;) continue foo;", labStmt(ident("foo"), forStmt(null, null, null, continueStmt(ident("foo"))))); +assertStmt("with (obj) { }", withStmt(ident("obj"), blockStmt([]))); +assertStmt("with (obj) { obj; }", withStmt(ident("obj"), blockStmt([exprStmt(ident("obj"))]))); +assertStmt("while (foo) { }", whileStmt(ident("foo"), blockStmt([]))); +assertStmt("while (foo) { foo; }", whileStmt(ident("foo"), blockStmt([exprStmt(ident("foo"))]))); +assertStmt("do { } while (foo);", doStmt(blockStmt([]), ident("foo"))); +assertStmt("do { foo; } while (foo)", doStmt(blockStmt([exprStmt(ident("foo"))]), ident("foo"))); +assertStmt("switch (foo) { case 1: 1; break; case 2: 2; break; default: 3; }", + switchStmt(ident("foo"), + [ caseClause(lit(1), [ exprStmt(lit(1)), breakStmt(null) ]), + caseClause(lit(2), [ exprStmt(lit(2)), breakStmt(null) ]), + defaultClause([ exprStmt(lit(3)) ]) ])); +assertStmt("switch (foo) { case 1: 1; break; case 2: 2; break; default: 3; case 42: 42; }", + switchStmt(ident("foo"), + [ caseClause(lit(1), [ exprStmt(lit(1)), breakStmt(null) ]), + caseClause(lit(2), [ exprStmt(lit(2)), breakStmt(null) ]), + defaultClause([ exprStmt(lit(3)) ]), + caseClause(lit(42), [ exprStmt(lit(42)) ]) ])); +assertStmt("try { } catch (e) { }", + tryStmt(blockStmt([]), + [], + [ catchClause(ident("e"), null, blockStmt([])) ], + null)); +assertStmt("try { } catch (e) { } finally { }", + tryStmt(blockStmt([]), + [], + [ catchClause(ident("e"), null, blockStmt([])) ], + blockStmt([]))); +assertStmt("try { } finally { }", + tryStmt(blockStmt([]), + [], + [], + blockStmt([]))); + +// redeclarations (TOK_NAME nodes with lexdef) + +assertStmt("function f() { function g() { } function g() { } }", + funDecl(ident("f"), [], blockStmt([funDecl(ident("g"), [], blockStmt([])), + funDecl(ident("g"), [], blockStmt([]))]))); + +assertStmt("function f() { function g() { } function g() { return 42 } }", + funDecl(ident("f"), [], blockStmt([funDecl(ident("g"), [], blockStmt([])), + funDecl(ident("g"), [], blockStmt([returnStmt(lit(42))]))]))); + +assertStmt("function f() { var x = 42; var x = 43; }", + funDecl(ident("f"), [], blockStmt([varDecl([declarator(ident("x"),lit(42))]), + varDecl([declarator(ident("x"),lit(43))])]))); + +// getters and setters + + assertExpr("({ get x() { return 42 } })", + objExpr([ objProp(ident("x"), + funExpr(null, [], blockStmt([returnStmt(lit(42))])), + "get" ) ])); + assertExpr("({ set x(v) { return 42 } })", + objExpr([ objProp(ident("x"), + funExpr(null, [ident("v")], blockStmt([returnStmt(lit(42))])), + "set" ) ])); + +} + +exports.testReflect = testReflect; + +}(typeof exports === 'undefined' ? this : exports)); diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/run.js b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/run.js new file mode 100644 index 00000000..32ca3faa --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/run.js @@ -0,0 +1,66 @@ +/* + Copyright (C) 2012 Yusuke Suzuki + Copyright (C) 2012 Ariya Hidayat + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*jslint node:true */ + +(function () { + 'use strict'; + + var child = require('child_process'), + nodejs = '"' + process.execPath + '"', + ret = 0, + suites, + index; + + suites = [ + 'runner', + 'compat' + ]; + + function nextTest() { + var suite = suites[index]; + + if (index < suites.length) { + child.exec(nodejs + ' ./test/' + suite + '.js', function (err, stdout, stderr) { + if (stdout) { + process.stdout.write(suite + ': ' + stdout); + } + if (stderr) { + process.stderr.write(suite + ': ' + stderr); + } + if (err) { + ret = err.code; + } + index += 1; + nextTest(); + }); + } else { + process.exit(ret); + } + } + + index = 0; + nextTest(); +}()); diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/runner.js b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/runner.js new file mode 100644 index 00000000..919e898d --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/runner.js @@ -0,0 +1,445 @@ +/* + Copyright (C) 2012 Ariya Hidayat + Copyright (C) 2012 Joost-Wim Boekesteijn + Copyright (C) 2012 Yusuke Suzuki + Copyright (C) 2012 Arpad Borsos + Copyright (C) 2011 Ariya Hidayat + Copyright (C) 2011 Yusuke Suzuki + Copyright (C) 2011 Arpad Borsos + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*jslint browser:true node:true */ +/*global esprima:true, testFixture:true */ + +var runTests; + +// Special handling for regular expression literal since we need to +// convert it to a string literal, otherwise it will be decoded +// as object "{}" and the regular expression would be lost. +function adjustRegexLiteral(key, value) { + 'use strict'; + if (key === 'value' && value instanceof RegExp) { + value = value.toString(); + } + return value; +} + +function NotMatchingError(expected, actual) { + 'use strict'; + Error.call(this, 'Expected '); + this.expected = expected; + this.actual = actual; +} +NotMatchingError.prototype = new Error(); + +function errorToObject(e) { + 'use strict'; + var msg = e.toString(); + + // Opera 9.64 produces an non-standard string in toString(). + if (msg.substr(0, 6) !== 'Error:') { + if (typeof e.message === 'string') { + msg = 'Error: ' + e.message; + } + } + + return { + index: e.index, + lineNumber: e.lineNumber, + column: e.column, + message: msg + }; +} + +function testParse(esprima, code, syntax) { + 'use strict'; + var expected, tree, actual, options, StringObject, i, len, err; + + // alias, so that JSLint does not complain. + StringObject = String; + + options = { + comment: (typeof syntax.comments !== 'undefined'), + range: true, + loc: true, + tokens: (typeof syntax.tokens !== 'undefined'), + raw: true, + tolerant: (typeof syntax.errors !== 'undefined'), + source: null + }; + + if (typeof syntax.tokens !== 'undefined') { + if (syntax.tokens.length > 0) { + options.range = (typeof syntax.tokens[0].range !== 'undefined'); + options.loc = (typeof syntax.tokens[0].loc !== 'undefined'); + } + } + + if (typeof syntax.comments !== 'undefined') { + if (syntax.comments.length > 0) { + options.range = (typeof syntax.comments[0].range !== 'undefined'); + options.loc = (typeof syntax.comments[0].loc !== 'undefined'); + } + } + + if (options.loc) { + options.source = syntax.loc.source; + } + + expected = JSON.stringify(syntax, null, 4); + try { + tree = esprima.parse(code, options); + tree = (options.comment || options.tokens || options.tolerant) ? tree : tree.body[0]; + + if (options.tolerant) { + for (i = 0, len = tree.errors.length; i < len; i += 1) { + tree.errors[i] = errorToObject(tree.errors[i]); + } + } + + actual = JSON.stringify(tree, adjustRegexLiteral, 4); + + // Only to ensure that there is no error when using string object. + esprima.parse(new StringObject(code), options); + + } catch (e) { + throw new NotMatchingError(expected, e.toString()); + } + if (expected !== actual) { + throw new NotMatchingError(expected, actual); + } + + function filter(key, value) { + if (key === 'value' && value instanceof RegExp) { + value = value.toString(); + } + return (key === 'loc' || key === 'range') ? undefined : value; + } + + if (options.tolerant) { + return; + } + + + // Check again without any location info. + options.range = false; + options.loc = false; + expected = JSON.stringify(syntax, filter, 4); + try { + tree = esprima.parse(code, options); + tree = (options.comment || options.tokens) ? tree : tree.body[0]; + + if (options.tolerant) { + for (i = 0, len = tree.errors.length; i < len; i += 1) { + tree.errors[i] = errorToObject(tree.errors[i]); + } + } + + actual = JSON.stringify(tree, filter, 4); + } catch (e) { + throw new NotMatchingError(expected, e.toString()); + } + if (expected !== actual) { + throw new NotMatchingError(expected, actual); + } +} + +function testTokenize(esprima, code, tokens) { + 'use strict'; + var options, expected, actual, tree; + + options = { + comment: true, + tolerant: true, + loc: true, + range: true + }; + + expected = JSON.stringify(tokens, null, 4); + + try { + tree = esprima.tokenize(code, options); + actual = JSON.stringify(tree, null, 4); + } catch (e) { + throw new NotMatchingError(expected, e.toString()); + } + if (expected !== actual) { + throw new NotMatchingError(expected, actual); + } +} + +function testError(esprima, code, exception) { + 'use strict'; + var i, options, expected, actual, err, handleInvalidRegexFlag, tokenize; + + // Different parsing options should give the same error. + options = [ + {}, + { comment: true }, + { raw: true }, + { raw: true, comment: true } + ]; + + // If handleInvalidRegexFlag is true, an invalid flag in a regular expression + // will throw an exception. In some old version V8, this is not the case + // and hence handleInvalidRegexFlag is false. + handleInvalidRegexFlag = false; + try { + 'test'.match(new RegExp('[a-z]', 'x')); + } catch (e) { + handleInvalidRegexFlag = true; + } + + exception.description = exception.message.replace(/Error: Line [0-9]+: /, ''); + + if (exception.tokenize) { + tokenize = true; + exception.tokenize = undefined; + } + expected = JSON.stringify(exception); + + for (i = 0; i < options.length; i += 1) { + + try { + if (tokenize) { + esprima.tokenize(code, options[i]) + } else { + esprima.parse(code, options[i]); + } + } catch (e) { + err = errorToObject(e); + err.description = e.description; + actual = JSON.stringify(err); + } + + if (expected !== actual) { + + // Compensate for old V8 which does not handle invalid flag. + if (exception.message.indexOf('Invalid regular expression') > 0) { + if (typeof actual === 'undefined' && !handleInvalidRegexFlag) { + return; + } + } + + throw new NotMatchingError(expected, actual); + } + + } +} + +function testAPI(esprima, code, result) { + 'use strict'; + var expected, res, actual; + + expected = JSON.stringify(result.result, null, 4); + try { + if (typeof result.property !== 'undefined') { + res = esprima[result.property]; + } else { + res = esprima[result.call].apply(esprima, result.args); + } + actual = JSON.stringify(res, adjustRegexLiteral, 4); + } catch (e) { + throw new NotMatchingError(expected, e.toString()); + } + if (expected !== actual) { + throw new NotMatchingError(expected, actual); + } +} + +function runTest(esprima, code, result) { + 'use strict'; + if (result.hasOwnProperty('lineNumber')) { + testError(esprima, code, result); + } else if (result.hasOwnProperty('result')) { + testAPI(esprima, code, result); + } else if (result instanceof Array) { + testTokenize(esprima, code, result); + } else { + testParse(esprima, code, result); + } +} + +if (typeof window !== 'undefined') { + // Run all tests in a browser environment. + runTests = function () { + 'use strict'; + var total = 0, + failures = 0, + category, + fixture, + source, + tick, + expected, + index, + len; + + function setText(el, str) { + if (typeof el.innerText === 'string') { + el.innerText = str; + } else { + el.textContent = str; + } + } + + function startCategory(category) { + var report, e; + report = document.getElementById('report'); + e = document.createElement('h4'); + setText(e, category); + report.appendChild(e); + } + + function reportSuccess(code) { + var report, e; + report = document.getElementById('report'); + e = document.createElement('pre'); + e.setAttribute('class', 'code'); + setText(e, code); + report.appendChild(e); + } + + function reportFailure(code, expected, actual) { + var report, e; + + report = document.getElementById('report'); + + e = document.createElement('p'); + setText(e, 'Code:'); + report.appendChild(e); + + e = document.createElement('pre'); + e.setAttribute('class', 'code'); + setText(e, code); + report.appendChild(e); + + e = document.createElement('p'); + setText(e, 'Expected'); + report.appendChild(e); + + e = document.createElement('pre'); + e.setAttribute('class', 'expected'); + setText(e, expected); + report.appendChild(e); + + e = document.createElement('p'); + setText(e, 'Actual'); + report.appendChild(e); + + e = document.createElement('pre'); + e.setAttribute('class', 'actual'); + setText(e, actual); + report.appendChild(e); + } + + setText(document.getElementById('version'), esprima.version); + + tick = new Date(); + for (category in testFixture) { + if (testFixture.hasOwnProperty(category)) { + startCategory(category); + fixture = testFixture[category]; + for (source in fixture) { + if (fixture.hasOwnProperty(source)) { + expected = fixture[source]; + total += 1; + try { + runTest(esprima, source, expected); + reportSuccess(source, JSON.stringify(expected, null, 4)); + } catch (e) { + failures += 1; + reportFailure(source, e.expected, e.actual); + } + } + } + } + } + tick = (new Date()) - tick; + + if (failures > 0) { + document.getElementById('status').className = 'alert-box alert'; + setText(document.getElementById('status'), total + ' tests. ' + + 'Failures: ' + failures + '. ' + tick + ' ms.'); + } else { + document.getElementById('status').className = 'alert-box success'; + setText(document.getElementById('status'), total + ' tests. ' + + 'No failure. ' + tick + ' ms.'); + } + }; +} else { + (function () { + 'use strict'; + + var esprima = require('../esprima'), + vm = require('vm'), + fs = require('fs'), + diff = require('json-diff').diffString, + total = 0, + failures = [], + tick = new Date(), + expected, + header; + + vm.runInThisContext(fs.readFileSync(__dirname + '/test.js', 'utf-8')); + vm.runInThisContext(fs.readFileSync(__dirname + '/harmonytest.js', 'utf-8')); + vm.runInThisContext(fs.readFileSync(__dirname + '/fbtest.js', 'utf-8')); + + Object.keys(testFixture).forEach(function (category) { + Object.keys(testFixture[category]).forEach(function (source) { + total += 1; + expected = testFixture[category][source]; + try { + runTest(esprima, source, expected); + } catch (e) { + e.source = source; + failures.push(e); + } + }); + }); + tick = (new Date()) - tick; + + header = total + ' tests. ' + failures.length + ' failures. ' + + tick + ' ms'; + if (failures.length) { + console.error(header); + failures.forEach(function (failure) { + try { + var expectedObject = JSON.parse(failure.expected); + var actualObject = JSON.parse(failure.actual); + + console.error(failure.source + ': Expected\n ' + + failure.expected.split('\n').join('\n ') + + '\nto match\n ' + failure.actual + '\nDiff:\n' + + diff(expectedObject, actualObject)); + } catch (ex) { + console.error(failure.source + ': Expected\n ' + + failure.expected.split('\n').join('\n ') + + '\nto match\n ' + failure.actual); + } + }); + } else { + console.log(header); + } + process.exit(failures.length === 0 ? 0 : 1); + }()); +} diff --git a/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/test.js b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/test.js new file mode 100644 index 00000000..547afaba --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/node_modules/esprima-fb/test/test.js @@ -0,0 +1,22331 @@ +/* + Copyright (C) 2012 Ariya Hidayat + Copyright (C) 2012 Joost-Wim Boekesteijn + Copyright (C) 2012 Yusuke Suzuki + Copyright (C) 2012 Arpad Borsos + Copyright (C) 2011 Ariya Hidayat + Copyright (C) 2011 Yusuke Suzuki + Copyright (C) 2011 Arpad Borsos + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +var testFixture = { + + 'Primary Expression': { + + 'this\n': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'ThisExpression', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 0 } + } + }], + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 0 } + }, + tokens: [{ + type: 'Keyword', + value: 'this', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }] + }, + + 'null\n': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: null, + raw: 'null', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 0 } + } + }], + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 0 } + }, + tokens: [{ + type: 'Null', + value: 'null', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }] + }, + + '\n 42\n\n': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [5, 7], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + } + }, + range: [5, 9], + loc: { + start: { line: 2, column: 4 }, + end: { line: 4, column: 0 } + } + }], + range: [5, 9], + loc: { + start: { line: 2, column: 4 }, + end: { line: 4, column: 0 } + }, + tokens: [{ + type: 'Numeric', + value: '42', + range: [5, 7], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + } + }] + }, + + '(1 + 2 ) * 3': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'Literal', + value: 1, + raw: '1', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + right: { + type: 'Literal', + value: 2, + raw: '2', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [1, 6], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 6 } + } + }, + right: { + type: 'Literal', + value: 3, + raw: '3', + range: [11, 12], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + } + + }, + + 'Grouping Operator': { + + '(1) + (2 ) + 3': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'Literal', + value: 1, + raw: '1', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + right: { + type: 'Literal', + value: 2, + raw: '2', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + right: { + type: 'Literal', + value: 3, + raw: '3', + range: [14, 15], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + + '4 + 5 << (6)': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '<<', + left: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'Literal', + value: 4, + raw: '4', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 5, + raw: '5', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Literal', + value: 6, + raw: '6', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + } + + }, + + 'Array Initializer': { + + 'x = []': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [4, 6], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }], + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + }, + tokens: [{ + type: 'Identifier', + value: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, { + type: 'Punctuator', + value: '=', + range: [2, 3], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 3 } + } + }, { + type: 'Punctuator', + value: '[', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, { + type: 'Punctuator', + value: ']', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }] + }, + + 'x = [ ]': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'x = [ 42 ]': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ArrayExpression', + elements: [{ + type: 'Literal', + value: 42, + raw: '42', + range: [6, 8], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 8 } + } + }], + range: [4, 10], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 10 } + } + }, + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + }, + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + }, + + 'x = [ 42, ]': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ArrayExpression', + elements: [{ + type: 'Literal', + value: 42, + raw: '42', + range: [6, 8], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 8 } + } + }], + range: [4, 11], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + + 'x = [ ,, 42 ]': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ArrayExpression', + elements: [ + null, + null, + { + type: 'Literal', + value: 42, + raw: '42', + range: [9, 11], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 11 } + } + }], + range: [4, 13], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + + 'x = [ 1, 2, 3, ]': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ArrayExpression', + elements: [{ + type: 'Literal', + value: 1, + raw: '1', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, { + type: 'Literal', + value: 2, + raw: '2', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, { + type: 'Literal', + value: 3, + raw: '3', + range: [12, 13], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 13 } + } + }], + range: [4, 16], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + 'x = [ 1, 2,, 3, ]': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ArrayExpression', + elements: [{ + type: 'Literal', + value: 1, + raw: '1', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, { + type: 'Literal', + value: 2, + raw: '2', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, null, { + type: 'Literal', + value: 3, + raw: '3', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }], + range: [4, 17], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + + 'x = [ "finally", "for" ]': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ArrayExpression', + elements: [{ + type: 'Literal', + value: 'finally', + raw: '"finally"', + range: [6, 15], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 15 } + } + }, { + type: 'Literal', + value: 'for', + raw: '"for"', + range: [17, 22], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 22 } + } + }], + range: [4, 24], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 24 } + } + }, + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + + '日本語 = []': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: '日本語', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [6, 8], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + + 'T\u203F = []': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'T\u203F', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'T\u200C = []': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'T\u200C', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'T\u200D = []': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'T\u200D', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + '\u2163\u2161 = []': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: '\u2163\u2161', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + '\u2163\u2161\u200A=\u2009[]': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: '\u2163\u2161', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + '[",", "second"]': { + type: 'ExpressionStatement', + expression: { + type: 'ArrayExpression', + elements: [{ + type: 'Literal', + value: ',', + raw: '","', + range: [1, 4], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 4 } + } + }, { + type: 'Literal', + value: 'second', + raw: '"second"', + range: [6, 14], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 14 } + } + }], + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + + '["notAToken", "if"]': { + type: 'ExpressionStatement', + expression: { + type: 'ArrayExpression', + elements: [{ + type: 'Literal', + value: 'notAToken', + raw: '"notAToken"', + range: [1, 12], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 12 } + } + }, { + type: 'Literal', + value: 'if', + raw: '"if"', + range: [14, 18], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 18 } + } + }], + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + } + }, + + 'Object Initializer': { + + 'x = {}': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [], + range: [4, 6], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'x = { }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [], + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'x = { answer: 42 }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'answer', + range: [6, 12], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 12 } + } + }, + value: { + type: 'Literal', + value: 42, + raw: '42', + range: [14, 16], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 16 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [6, 16], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 16 } + } + }], + range: [4, 18], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 18 } + } + }, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + + 'x = { if: 42 }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'if', + range: [6, 8], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 8 } + } + }, + value: { + type: 'Literal', + value: 42, + raw: '42', + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [6, 12], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 12 } + } + }], + range: [4, 14], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + 'x = { true: 42 }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'true', + range: [6, 10], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 10 } + } + }, + value: { + type: 'Literal', + value: 42, + raw: '42', + range: [12, 14], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 14 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [6, 14], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 14 } + } + }], + range: [4, 16], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + 'x = { false: 42 }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'false', + range: [6, 11], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 11 } + } + }, + value: { + type: 'Literal', + value: 42, + raw: '42', + range: [13, 15], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 15 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [6, 15], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 15 } + } + }], + range: [4, 17], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + + 'x = { null: 42 }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'null', + range: [6, 10], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 10 } + } + }, + value: { + type: 'Literal', + value: 42, + raw: '42', + range: [12, 14], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 14 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [6, 14], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 14 } + } + }], + range: [4, 16], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + 'x = { "answer": 42 }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Literal', + value: 'answer', + raw: '"answer"', + range: [6, 14], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 14 } + } + }, + value: { + type: 'Literal', + value: 42, + raw: '42', + range: [16, 18], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 18 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [6, 18], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 18 } + } + }], + range: [4, 20], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 20 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + + 'x = { x: 1, x: 2 }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [ + { + type: 'Property', + key: { + type: 'Identifier', + name: 'x', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + value: { + type: 'Literal', + value: 1, + raw: '1', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [6, 10], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 10 } + } + }, + { + type: 'Property', + key: { + type: 'Identifier', + name: 'x', + range: [12, 13], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 13 } + } + }, + value: { + type: 'Literal', + value: 2, + raw: '2', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [12, 16], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 16 } + } + } + ], + range: [4, 18], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 18 } + } + }, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + + 'x = { get width() { return m_width } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'width', + range: [10, 15], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 15 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ReturnStatement', + argument: { + type: 'Identifier', + name: 'm_width', + range: [27, 34], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 34 } + } + }, + range: [20, 35], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 35 } + } + }], + range: [18, 36], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 36 } + } + }, + rest: null, + generator: false, + expression: false, + range: [18, 36], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 36 } + } + }, + kind: 'get', + method: false, + shorthand: false, + range: [6, 36], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 36 } + } + }], + range: [4, 38], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 38 } + } + }, + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + } + }, + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + } + }, + + 'x = { get undef() {} }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'undef', + range: [10, 15], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 15 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [18, 20], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 20 } + } + }, + rest: null, + generator: false, + expression: false, + range: [18, 20], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 20 } + } + }, + kind: 'get', + method: false, + shorthand: false, + range: [6, 20], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 20 } + } + }], + range: [4, 22], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + + 'x = { get if() {} }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'if', + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + rest: null, + generator: false, + expression: false, + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + kind: 'get', + method: false, + shorthand: false, + range: [6, 17], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 17 } + } + }], + range: [4, 19], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 19 } + } + }, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + + 'x = { get true() {} }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'true', + range: [10, 14], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 14 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [17, 19], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 19 } + } + }, + rest: null, + generator: false, + expression: false, + range: [17, 19], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 19 } + } + }, + kind: 'get', + method: false, + shorthand: false, + range: [6, 19], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 19 } + } + }], + range: [4, 21], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + + 'x = { get false() {} }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'false', + range: [10, 15], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 15 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [18, 20], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 20 } + } + }, + rest: null, + generator: false, + expression: false, + range: [18, 20], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 20 } + } + }, + kind: 'get', + method: false, + shorthand: false, + range: [6, 20], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 20 } + } + }], + range: [4, 22], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + + 'x = { get null() {} }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'null', + range: [10, 14], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 14 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [17, 19], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 19 } + } + }, + rest: null, + generator: false, + expression: false, + range: [17, 19], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 19 } + } + }, + kind: 'get', + method: false, + shorthand: false, + range: [6, 19], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 19 } + } + }], + range: [4, 21], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + + 'x = { get "undef"() {} }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Literal', + value: 'undef', + raw: '"undef"', + range: [10, 17], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 17 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [20, 22], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 22 } + } + }, + rest: null, + generator: false, + expression: false, + range: [20, 22], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 22 } + } + }, + kind: 'get', + method: false, + shorthand: false, + range: [6, 22], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 22 } + } + }], + range: [4, 24], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 24 } + } + }, + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + + 'x = { get 10() {} }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Literal', + value: 10, + raw: '10', + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + rest: null, + generator: false, + expression: false, + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + kind: 'get', + method: false, + shorthand: false, + range: [6, 17], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 17 } + } + }], + range: [4, 19], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 19 } + } + }, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + + 'x = { set width(w) { m_width = w } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'width', + range: [10, 15], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 15 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'w', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'm_width', + range: [21, 28], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 28 } + } + }, + right: { + type: 'Identifier', + name: 'w', + range: [31, 32], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 32 } + } + }, + range: [21, 32], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 32 } + } + }, + range: [21, 33], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 33 } + } + }], + range: [19, 34], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 34 } + } + }, + rest: null, + generator: false, + expression: false, + range: [19, 34], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 34 } + } + }, + kind: 'set', + method: false, + shorthand: false, + range: [6, 34], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 34 } + } + }], + range: [4, 36], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 36 } + } + }, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + } + }, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + } + }, + + 'x = { set if(w) { m_if = w } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'if', + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'w', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'm_if', + range: [18, 22], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 22 } + } + }, + right: { + type: 'Identifier', + name: 'w', + range: [25, 26], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 26 } + } + }, + range: [18, 26], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 26 } + } + }, + range: [18, 27], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 27 } + } + }], + range: [16, 28], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 28 } + } + }, + rest: null, + generator: false, + expression: false, + range: [16, 28], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 28 } + } + }, + kind: 'set', + method: false, + shorthand: false, + range: [6, 28], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 28 } + } + }], + range: [4, 30], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 30 } + } + }, + range: [0, 30], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 30 } + } + }, + range: [0, 30], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 30 } + } + }, + + 'x = { set true(w) { m_true = w } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'true', + range: [10, 14], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 14 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'w', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'm_true', + range: [20, 26], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 26 } + } + }, + right: { + type: 'Identifier', + name: 'w', + range: [29, 30], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 30 } + } + }, + range: [20, 30], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 30 } + } + }, + range: [20, 31], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 31 } + } + }], + range: [18, 32], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 32 } + } + }, + rest: null, + generator: false, + expression: false, + range: [18, 32], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 32 } + } + }, + kind: 'set', + method: false, + shorthand: false, + range: [6, 32], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 32 } + } + }], + range: [4, 34], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 34 } + } + }, + range: [0, 34], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 34 } + } + }, + range: [0, 34], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 34 } + } + }, + + 'x = { set false(w) { m_false = w } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'false', + range: [10, 15], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 15 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'w', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'm_false', + range: [21, 28], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 28 } + } + }, + right: { + type: 'Identifier', + name: 'w', + range: [31, 32], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 32 } + } + }, + range: [21, 32], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 32 } + } + }, + range: [21, 33], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 33 } + } + }], + range: [19, 34], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 34 } + } + }, + rest: null, + generator: false, + expression: false, + range: [19, 34], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 34 } + } + }, + kind: 'set', + method: false, + shorthand: false, + range: [6, 34], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 34 } + } + }], + range: [4, 36], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 36 } + } + }, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + } + }, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + } + }, + + 'x = { set null(w) { m_null = w } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'null', + range: [10, 14], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 14 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'w', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'm_null', + range: [20, 26], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 26 } + } + }, + right: { + type: 'Identifier', + name: 'w', + range: [29, 30], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 30 } + } + }, + range: [20, 30], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 30 } + } + }, + range: [20, 31], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 31 } + } + }], + range: [18, 32], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 32 } + } + }, + rest: null, + generator: false, + expression: false, + range: [18, 32], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 32 } + } + }, + kind: 'set', + method: false, + shorthand: false, + range: [6, 32], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 32 } + } + }], + range: [4, 34], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 34 } + } + }, + range: [0, 34], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 34 } + } + }, + range: [0, 34], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 34 } + } + }, + + 'x = { set "null"(w) { m_null = w } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Literal', + value: 'null', + raw: '"null"', + range: [10, 16], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 16 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'w', + range: [17, 18], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 18 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'm_null', + range: [22, 28], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 28 } + } + }, + right: { + type: 'Identifier', + name: 'w', + range: [31, 32], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 32 } + } + }, + range: [22, 32], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 32 } + } + }, + range: [22, 33], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 33 } + } + }], + range: [20, 34], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 34 } + } + }, + rest: null, + generator: false, + expression: false, + range: [20, 34], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 34 } + } + }, + kind: 'set', + method: false, + shorthand: false, + range: [6, 34], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 34 } + } + }], + range: [4, 36], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 36 } + } + }, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + } + }, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + } + }, + + 'x = { set 10(w) { m_null = w } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Literal', + value: 10, + raw: '10', + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'w', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'm_null', + range: [18, 24], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 24 } + } + }, + right: { + type: 'Identifier', + name: 'w', + range: [27, 28], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 28 } + } + }, + range: [18, 28], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 28 } + } + }, + range: [18, 29], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 29 } + } + }], + range: [16, 30], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 30 } + } + }, + rest: null, + generator: false, + expression: false, + range: [16, 30], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 30 } + } + }, + kind: 'set', + method: false, + shorthand: false, + range: [6, 30], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 30 } + } + }], + range: [4, 32], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 32 } + } + }, + range: [0, 32], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 32 } + } + }, + range: [0, 32], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 32 } + } + }, + + 'x = { get: 42 }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'get', + range: [6, 9], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 9 } + } + }, + value: { + type: 'Literal', + value: 42, + raw: '42', + range: [11, 13], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 13 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [6, 13], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 13 } + } + }], + range: [4, 15], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + + 'x = { set: 43 }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'set', + range: [6, 9], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 9 } + } + }, + value: { + type: 'Literal', + value: 43, + raw: '43', + range: [11, 13], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 13 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [6, 13], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 13 } + } + }], + range: [4, 15], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + + 'x = { __proto__: 2 }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: '__proto__', + range: [6, 15], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 15 } + } + }, + value: { + type: 'Literal', + value: 2, + raw: '2', + range: [17, 18], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 18 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [6, 18], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 18 } + } + }], + range: [4, 20], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 20 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + + 'x = {"__proto__": 2 }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Literal', + value: '__proto__', + raw: '"__proto__"', + range: [5, 16], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 16 } + } + }, + value: { + type: 'Literal', + value: 2, + raw: '2', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [5, 19], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 19 } + } + }], + range: [4, 21], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + + 'x = { get width() { return m_width }, set width(width) { m_width = width; } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'width', + range: [10, 15], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 15 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ReturnStatement', + argument: { + type: 'Identifier', + name: 'm_width', + range: [27, 34], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 34 } + } + }, + range: [20, 35], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 35 } + } + }], + range: [18, 36], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 36 } + } + }, + rest: null, + generator: false, + expression: false, + range: [18, 36], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 36 } + } + }, + kind: 'get', + method: false, + shorthand: false, + range: [6, 36], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 36 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'width', + range: [42, 47], + loc: { + start: { line: 1, column: 42 }, + end: { line: 1, column: 47 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'width', + range: [48, 53], + loc: { + start: { line: 1, column: 48 }, + end: { line: 1, column: 53 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'm_width', + range: [57, 64], + loc: { + start: { line: 1, column: 57 }, + end: { line: 1, column: 64 } + } + }, + right: { + type: 'Identifier', + name: 'width', + range: [67, 72], + loc: { + start: { line: 1, column: 67 }, + end: { line: 1, column: 72 } + } + }, + range: [57, 72], + loc: { + start: { line: 1, column: 57 }, + end: { line: 1, column: 72 } + } + }, + range: [57, 73], + loc: { + start: { line: 1, column: 57 }, + end: { line: 1, column: 73 } + } + }], + range: [55, 75], + loc: { + start: { line: 1, column: 55 }, + end: { line: 1, column: 75 } + } + }, + rest: null, + generator: false, + expression: false, + range: [55, 75], + loc: { + start: { line: 1, column: 55 }, + end: { line: 1, column: 75 } + } + }, + kind: 'set', + method: false, + shorthand: false, + range: [38, 75], + loc: { + start: { line: 1, column: 38 }, + end: { line: 1, column: 75 } + } + }], + range: [4, 77], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 77 } + } + }, + range: [0, 77], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 77 } + } + }, + range: [0, 77], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 77 } + } + } + + + }, + + 'Comments': { + + '/* block comment */ 42': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [20, 22], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 22 } + } + }, + range: [20, 22], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 22 } + } + }, + + '42 /*The*/ /*Answer*/': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }], + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + }, + comments: [{ + type: 'Block', + value: 'The', + range: [3, 10], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 10 } + } + }, { + type: 'Block', + value: 'Answer', + range: [11, 21], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 21 } + } + }] + }, + + '42 /*the*/ /*answer*/': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [0, 2] + }, + range: [0, 21] + }], + range: [0, 21], + comments: [{ + type: 'Block', + value: 'the', + range: [3, 10] + }, { + type: 'Block', + value: 'answer', + range: [11, 21] + }] + }, + + '42 /* the * answer */': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + + '42 /* The * answer */': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }], + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + }, + comments: [{ + type: 'Block', + value: ' The * answer ', + range: [3, 21], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 21 } + } + }] + }, + + '/* multiline\ncomment\nshould\nbe\nignored */ 42': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [42, 44], + loc: { + start: { line: 5, column: 11 }, + end: { line: 5, column: 13 } + } + }, + range: [42, 44], + loc: { + start: { line: 5, column: 11 }, + end: { line: 5, column: 13 } + } + }, + + '/*a\r\nb*/ 42': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [9, 11], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + } + }, + range: [9, 11], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + } + }], + range: [9, 11], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + }, + comments: [{ + type: 'Block', + value: 'a\r\nb', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 3 } + } + }] + }, + + '/*a\rb*/ 42': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [8, 10], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + } + }, + range: [8, 10], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + } + }], + range: [8, 10], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + }, + comments: [{ + type: 'Block', + value: 'a\rb', + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 3 } + } + }] + }, + + '/*a\nb*/ 42': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [8, 10], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + } + }, + range: [8, 10], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + } + }], + range: [8, 10], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + }, + comments: [{ + type: 'Block', + value: 'a\nb', + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 3 } + } + }] + }, + + '/*a\nc*/ 42': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + } + }, + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + } + }], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + }, + comments: [{ + type: 'Block', + value: 'a\nc', + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 3 } + } + }] + }, + + '// line comment\n42': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [16, 18], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 2 } + } + }, + range: [16, 18], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 2 } + } + }, + + '42 // line comment': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }], + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + }, + comments: [{ + type: 'Line', + value: ' line comment', + range: [3, 18], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 18 } + } + }] + }, + + '// Hello, world!\n42': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [17, 19], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 2 } + } + }, + range: [17, 19], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 2 } + } + }], + range: [17, 19], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 2 } + }, + comments: [{ + type: 'Line', + value: ' Hello, world!', + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }] + }, + + '// Hello, world!\n': { + type: 'Program', + body: [], + range: [17, 17], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 0 } + }, + comments: [{ + type: 'Line', + value: ' Hello, world!', + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }] + }, + + '// Hallo, world!\n': { + type: 'Program', + body: [], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 0 } + }, + comments: [{ + type: 'Line', + value: ' Hallo, world!', + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }] + }, + + '//\n42': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [3, 5], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 2 } + } + }, + range: [3, 5], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 2 } + } + }], + range: [3, 5], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 2 } + }, + comments: [{ + type: 'Line', + value: '', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }] + }, + + '//': { + type: 'Program', + body: [], + range: [2, 2], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 2 } + }, + comments: [{ + type: 'Line', + value: '', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }] + }, + + '// ': { + type: 'Program', + body: [], + range: [3, 3], + comments: [{ + type: 'Line', + value: ' ', + range: [0, 3] + }] + }, + + '/**/42': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [4, 6], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 6 } + } + }, + range: [4, 6], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 6 } + } + }], + range: [4, 6], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 6 } + }, + comments: [{ + type: 'Block', + value: '', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }] + }, + + '// Hello, world!\n\n// Another hello\n42': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [37, 39], + loc: { + start: { line: 4, column: 0 }, + end: { line: 4, column: 2 } + } + }, + range: [37, 39], + loc: { + start: { line: 4, column: 0 }, + end: { line: 4, column: 2 } + } + }], + range: [37, 39], + loc: { + start: { line: 4, column: 0 }, + end: { line: 4, column: 2 } + }, + comments: [{ + type: 'Line', + value: ' Hello, world!', + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, { + type: 'Line', + value: ' Another hello', + range: [18, 36], + loc: { + start: { line: 3, column: 0 }, + end: { line: 3, column: 18 } + } + }] + }, + + 'if (x) { // Some comment\ndoThat(); }': { + type: 'Program', + body: [{ + type: 'IfStatement', + test: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + consequent: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'doThat', + range: [25, 31], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 6 } + } + }, + 'arguments': [], + range: [25, 33], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 8 } + } + }, + range: [25, 34], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 9 } + } + }], + range: [7, 36], + loc: { + start: { line: 1, column: 7 }, + end: { line: 2, column: 11 } + } + }, + alternate: null, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 11 } + } + }], + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 11 } + }, + comments: [{ + type: 'Line', + value: ' Some comment', + range: [9, 24], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 24 } + } + }] + }, + + 'switch (answer) { case 42: /* perfect */ bingo() }': { + type: 'Program', + body: [{ + type: 'SwitchStatement', + discriminant: { + type: 'Identifier', + name: 'answer', + range: [8, 14], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 14 } + } + }, + cases: [{ + type: 'SwitchCase', + test: { + type: 'Literal', + value: 42, + raw: '42', + range: [23, 25], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 25 } + } + }, + consequent: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'bingo', + range: [41, 46], + loc: { + start: { line: 1, column: 41 }, + end: { line: 1, column: 46 } + } + }, + 'arguments': [], + range: [41, 48], + loc: { + start: { line: 1, column: 41 }, + end: { line: 1, column: 48 } + } + }, + range: [41, 49], + loc: { + start: { line: 1, column: 41 }, + end: { line: 1, column: 49 } + } + }], + range: [18, 49], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 49 } + } + }], + range: [0, 50], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 50 } + } + }], + range: [0, 50], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 50 } + }, + comments: [{ + type: 'Block', + value: ' perfect ', + range: [27, 40], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 40 } + } + }] + } + + }, + + 'Numeric Literals': { + + '0': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0, + raw: '0', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + + '42': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + + '3': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 3, + raw: '3', + range: [0, 1] + }, + range: [0, 1] + }], + range: [0, 1], + tokens: [{ + type: 'Numeric', + value: '3', + range: [0, 1] + }] + }, + + '5': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 5, + raw: '5', + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + }, + tokens: [{ + type: 'Numeric', + value: '5', + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }] + }, + + '.14': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0.14, + raw: '.14', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + '3.14159': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 3.14159, + raw: '3.14159', + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + '6.02214179e+23': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 6.02214179e+23, + raw: '6.02214179e+23', + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + '1.492417830e-10': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 1.49241783e-10, + raw: '1.492417830e-10', + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + + '0x0': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0, + raw: '0x0', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + '0x0;': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0, + raw: '0x0', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + + '0e+100 ': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0, + raw: '0e+100', + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + '0e+100': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0, + raw: '0e+100', + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + '0xabc': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0xabc, + raw: '0xabc', + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + '0xdef': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0xdef, + raw: '0xdef', + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + '0X1A': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0x1A, + raw: '0X1A', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + + '0x10': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0x10, + raw: '0x10', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + + '0x100': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0x100, + raw: '0x100', + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + '0X04': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0X04, + raw: '0X04', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + + '02': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 2, + raw: '02', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + + '012': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 10, + raw: '012', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + '0012': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 10, + raw: '0012', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + } + + }, + + 'String Literals': { + + '"Hello"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello', + raw: '"Hello"', + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + '"\\n\\r\\t\\v\\b\\f\\\\\\\'\\"\\0"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: '\n\r\t\x0B\b\f\\\'"\x00', + raw: '"\\n\\r\\t\\v\\b\\f\\\\\\\'\\"\\0"', + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + + '"\\u0061"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'a', + raw: '"\\u0061"', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + + '"\\x61"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'a', + raw: '"\\x61"', + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + '"\\u00"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'u00', + raw: '"\\u00"', + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + '"\\xt"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'xt', + raw: '"\\xt"', + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + '"Hello\\nworld"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello\nworld', + raw: '"Hello\\nworld"', + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + '"Hello\\\nworld"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Helloworld', + raw: '"Hello\\\nworld"', + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 14 } + } + }, + + '"Hello\\02World"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello\u0002World', + raw: '"Hello\\02World"', + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + + '"Hello\\012World"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello\u000AWorld', + raw: '"Hello\\012World"', + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + '"Hello\\122World"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello\122World', + raw: '"Hello\\122World"', + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + '"Hello\\0122World"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello\u000A2World', + raw: '"Hello\\0122World"', + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + + '"Hello\\312World"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello\u00CAWorld', + raw: '"Hello\\312World"', + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + '"Hello\\412World"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello\412World', + raw: '"Hello\\412World"', + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + '"Hello\\812World"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello812World', + raw: '"Hello\\812World"', + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + '"Hello\\712World"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello\712World', + raw: '"Hello\\712World"', + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + '"Hello\\0World"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello\u0000World', + raw: '"Hello\\0World"', + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + '"Hello\\\r\nworld"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Helloworld', + raw: '"Hello\\\r\nworld"', + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 15 } + } + }, + + '"Hello\\1World"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello\u0001World', + raw: '"Hello\\1World"', + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + } + }, + + 'Regular Expression Literals': { + + 'var x = /[a-z]/i': { + type: 'Program', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: { + type: 'Literal', + value: '/[a-z]/i', + raw: '/[a-z]/i', + range: [8, 16], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 16 } + } + }, + range: [4, 16], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 16 } + } + }], + kind: 'var', + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }], + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + }, + tokens: [{ + type: 'Keyword', + value: 'var', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, { + type: 'Identifier', + value: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, { + type: 'Punctuator', + value: '=', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, { + type: 'RegularExpression', + value: '/[a-z]/i', + range: [8, 16], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 16 } + } + }] + }, + + 'var x = /[x-z]/i': { + type: 'Program', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5] + }, + init: { + type: 'Literal', + value: '/[x-z]/i', + raw: '/[x-z]/i', + range: [8, 16] + }, + range: [4, 16] + }], + kind: 'var', + range: [0, 16] + }], + range: [0, 16], + tokens: [{ + type: 'Keyword', + value: 'var', + range: [0, 3] + }, { + type: 'Identifier', + value: 'x', + range: [4, 5] + }, { + type: 'Punctuator', + value: '=', + range: [6, 7] + }, { + type: 'RegularExpression', + value: '/[x-z]/i', + range: [8, 16] + }] + }, + + 'var x = /[a-c]/i': { + type: 'Program', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: { + type: 'Literal', + value: '/[a-c]/i', + raw: '/[a-c]/i', + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 16 } + } + }, + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 16 } + } + }], + kind: 'var', + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + }, + tokens: [{ + type: 'Keyword', + value: 'var', + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, { + type: 'Identifier', + value: 'x', + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, { + type: 'Punctuator', + value: '=', + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, { + type: 'RegularExpression', + value: '/[a-c]/i', + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 16 } + } + }] + }, + + 'var x = /[P QR]/i': { + type: 'Program', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: { + type: 'Literal', + value: '/[P QR]/i', + raw: '/[P QR]/i', + range: [8, 17], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 17 } + } + }, + range: [4, 17], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 17 } + } + }], + kind: 'var', + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }], + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + }, + tokens: [{ + type: 'Keyword', + value: 'var', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, { + type: 'Identifier', + value: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, { + type: 'Punctuator', + value: '=', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, { + type: 'RegularExpression', + value: '/[P QR]/i', + range: [8, 17], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 17 } + } + }] + }, + + 'var x = /foo\\/bar/': { + type: 'Program', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: { + type: 'Literal', + value: '/foo\\/bar/', + raw: '/foo\\/bar/', + range: [8, 18], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 18 } + } + }, + range: [4, 18], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 18 } + } + }], + kind: 'var', + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }], + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + }, + tokens: [{ + type: 'Keyword', + value: 'var', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, { + type: 'Identifier', + value: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, { + type: 'Punctuator', + value: '=', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, { + type: 'RegularExpression', + value: '/foo\\/bar/', + range: [8, 18], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 18 } + } + }] + }, + + 'var x = /=([^=\\s])+/g': { + type: 'Program', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: { + type: 'Literal', + value: '/=([^=\\s])+/g', + raw: '/=([^=\\s])+/g', + range: [8, 21], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 21 } + } + }, + range: [4, 21], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 21 } + } + }], + kind: 'var', + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }], + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + }, + tokens: [{ + type: 'Keyword', + value: 'var', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, { + type: 'Identifier', + value: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, { + type: 'Punctuator', + value: '=', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, { + type: 'RegularExpression', + value: '/=([^=\\s])+/g', + range: [8, 21], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 21 } + } + }] + }, + + 'var x = /[P QR]/\\u0067': { + type: 'Program', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: { + type: 'Literal', + value: '/[P QR]/g', + raw: '/[P QR]/\\u0067', + range: [8, 22], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 22 } + } + }, + range: [4, 22], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 22 } + } + }], + kind: 'var', + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }], + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + }, + tokens: [{ + type: 'Keyword', + value: 'var', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, { + type: 'Identifier', + value: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, { + type: 'Punctuator', + value: '=', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, { + type: 'RegularExpression', + value: '/[P QR]/\\u0067', + range: [8, 22], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 22 } + } + }] + }, + + 'var x = /[P QR]/\\g': { + type: 'Program', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: { + type: 'Literal', + value: '/[P QR]/g', + raw: '/[P QR]/\\g', + range: [8, 18], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 18 } + } + }, + range: [4, 18], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 18 } + } + }], + kind: 'var', + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }], + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + }, + tokens: [{ + type: 'Keyword', + value: 'var', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, { + type: 'Identifier', + value: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, { + type: 'Punctuator', + value: '=', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, { + type: 'RegularExpression', + value: '/[P QR]/\\g', + range: [8, 18], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 18 } + } + }] + }, + + 'var x = /42/g.test': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: { + type: 'MemberExpression', + computed: false, + object: { + type: 'Literal', + value: '/42/g', + raw: '/42/g', + range: [8, 13], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 13 } + } + }, + property: { + type: 'Identifier', + name: 'test', + range: [14, 18], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 18 } + } + }, + range: [8, 18], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 18 } + } + }, + range: [4, 18], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 18 } + } + }], + kind: 'var', + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + } + + }, + + 'Left-Hand-Side Expression': { + + 'new Button': { + type: 'ExpressionStatement', + expression: { + type: 'NewExpression', + callee: { + type: 'Identifier', + name: 'Button', + range: [4, 10], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 10 } + } + }, + 'arguments': [], + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + }, + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + }, + + 'new Button()': { + type: 'ExpressionStatement', + expression: { + type: 'NewExpression', + callee: { + type: 'Identifier', + name: 'Button', + range: [4, 10], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 10 } + } + }, + 'arguments': [], + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + + 'new new foo': { + type: 'ExpressionStatement', + expression: { + type: 'NewExpression', + callee: { + type: 'NewExpression', + callee: { + type: 'Identifier', + name: 'foo', + range: [8, 11], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 11 } + } + }, + 'arguments': [], + range: [4, 11], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 11 } + } + }, + 'arguments': [], + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + + 'new new foo()': { + type: 'ExpressionStatement', + expression: { + type: 'NewExpression', + callee: { + type: 'NewExpression', + callee: { + type: 'Identifier', + name: 'foo', + range: [8, 11], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 11 } + } + }, + 'arguments': [], + range: [4, 13], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 13 } + } + }, + 'arguments': [], + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + + 'new foo().bar()': { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'MemberExpression', + computed: false, + object: { + type: 'NewExpression', + callee: { + type: 'Identifier', + name: 'foo', + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + 'arguments': [], + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + property: { + type: 'Identifier', + name: 'bar', + range: [10, 13], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + 'arguments': [], + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + + 'new foo[bar]': { + type: 'ExpressionStatement', + expression: { + type: 'NewExpression', + callee: { + type: 'MemberExpression', + computed: true, + object: { + type: 'Identifier', + name: 'foo', + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + property: { + type: 'Identifier', + name: 'bar', + range: [8, 11], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 11 } + } + }, + range: [4, 12], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 12 } + } + }, + 'arguments': [], + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + + 'new foo.bar()': { + type: 'ExpressionStatement', + expression: { + type: 'NewExpression', + callee: { + type: 'MemberExpression', + computed: false, + object: { + type: 'Identifier', + name: 'foo', + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + property: { + type: 'Identifier', + name: 'bar', + range: [8, 11], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 11 } + } + }, + range: [4, 11], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 11 } + } + }, + 'arguments': [], + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + + '( new foo).bar()': { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'MemberExpression', + computed: false, + object: { + type: 'NewExpression', + callee: { + type: 'Identifier', + name: 'foo', + range: [6, 9], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 9 } + } + }, + 'arguments': [], + range: [2, 9], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 9 } + } + }, + property: { + type: 'Identifier', + name: 'bar', + range: [11, 14], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + 'arguments': [], + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + 'foo(bar, baz)': { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'foo', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'bar', + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, { + type: 'Identifier', + name: 'baz', + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }], + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + + '( foo )()': { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'foo', + range: [5, 8], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 8 } + } + }, + 'arguments': [], + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + + 'universe.milkyway': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: false, + object: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + property: { + type: 'Identifier', + name: 'milkyway', + range: [9, 17], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + + 'universe.milkyway.solarsystem': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: false, + object: { + type: 'MemberExpression', + computed: false, + object: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + property: { + type: 'Identifier', + name: 'milkyway', + range: [9, 17], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + property: { + type: 'Identifier', + name: 'solarsystem', + range: [18, 29], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 29 } + } + }, + range: [0, 29], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 29 } + } + }, + range: [0, 29], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 29 } + } + }, + + 'universe.milkyway.solarsystem.Earth': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: false, + object: { + type: 'MemberExpression', + computed: false, + object: { + type: 'MemberExpression', + computed: false, + object: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + property: { + type: 'Identifier', + name: 'milkyway', + range: [9, 17], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + property: { + type: 'Identifier', + name: 'solarsystem', + range: [18, 29], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 29 } + } + }, + range: [0, 29], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 29 } + } + }, + property: { + type: 'Identifier', + name: 'Earth', + range: [30, 35], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 35 } + } + }, + range: [0, 35], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 35 } + } + }, + range: [0, 35], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 35 } + } + }, + + 'universe[galaxyName, otherUselessName]': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: true, + object: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + property: { + type: 'SequenceExpression', + expressions: [{ + type: 'Identifier', + name: 'galaxyName', + range: [9, 19], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 19 } + } + }, { + type: 'Identifier', + name: 'otherUselessName', + range: [21, 37], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 37 } + } + }], + range: [9, 37], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 37 } + } + }, + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + } + }, + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + } + }, + + 'universe[galaxyName]': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: true, + object: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + property: { + type: 'Identifier', + name: 'galaxyName', + range: [9, 19], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 19 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + + 'universe[42].galaxies': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: false, + object: { + type: 'MemberExpression', + computed: true, + object: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + property: { + type: 'Literal', + value: 42, + raw: '42', + range: [9, 11], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + property: { + type: 'Identifier', + name: 'galaxies', + range: [13, 21], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + + 'universe(42).galaxies': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: false, + object: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + 'arguments': [{ + type: 'Literal', + value: 42, + raw: '42', + range: [9, 11], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 11 } + } + }], + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + property: { + type: 'Identifier', + name: 'galaxies', + range: [13, 21], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + + 'universe(42).galaxies(14, 3, 77).milkyway': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: false, + object: { + type: 'CallExpression', + callee: { + type: 'MemberExpression', + computed: false, + object: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + 'arguments': [{ + type: 'Literal', + value: 42, + raw: '42', + range: [9, 11], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 11 } + } + }], + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + property: { + type: 'Identifier', + name: 'galaxies', + range: [13, 21], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + 'arguments': [{ + type: 'Literal', + value: 14, + raw: '14', + range: [22, 24], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 24 } + } + }, { + type: 'Literal', + value: 3, + raw: '3', + range: [26, 27], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 27 } + } + }, { + type: 'Literal', + value: 77, + raw: '77', + range: [29, 31], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 31 } + } + }], + range: [0, 32], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 32 } + } + }, + property: { + type: 'Identifier', + name: 'milkyway', + range: [33, 41], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 41 } + } + }, + range: [0, 41], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 41 } + } + }, + range: [0, 41], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 41 } + } + }, + + 'earth.asia.Indonesia.prepareForElection(2014)': { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'MemberExpression', + computed: false, + object: { + type: 'MemberExpression', + computed: false, + object: { + type: 'MemberExpression', + computed: false, + object: { + type: 'Identifier', + name: 'earth', + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + property: { + type: 'Identifier', + name: 'asia', + range: [6, 10], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 10 } + } + }, + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + }, + property: { + type: 'Identifier', + name: 'Indonesia', + range: [11, 20], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 20 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + property: { + type: 'Identifier', + name: 'prepareForElection', + range: [21, 39], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 39 } + } + }, + range: [0, 39], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 39 } + } + }, + 'arguments': [{ + type: 'Literal', + value: 2014, + raw: '2014', + range: [40, 44], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 44 } + } + }], + range: [0, 45], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 45 } + } + }, + range: [0, 45], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 45 } + } + }, + + 'universe.if': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: false, + object: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + property: { + type: 'Identifier', + name: 'if', + range: [9, 11], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + + 'universe.true': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: false, + object: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + property: { + type: 'Identifier', + name: 'true', + range: [9, 13], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + + 'universe.false': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: false, + object: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + property: { + type: 'Identifier', + name: 'false', + range: [9, 14], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + 'universe.null': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: false, + object: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + property: { + type: 'Identifier', + name: 'null', + range: [9, 13], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + } + + }, + + 'Postfix Expressions': { + + 'x++': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + prefix: false, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + 'x--': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '--', + argument: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + prefix: false, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + 'eval++': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'eval', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + prefix: false, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'eval--': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '--', + argument: { + type: 'Identifier', + name: 'eval', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + prefix: false, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'arguments++': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'arguments', + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + prefix: false, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + + 'arguments--': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '--', + argument: { + type: 'Identifier', + name: 'arguments', + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + prefix: false, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + } + + }, + + 'Unary Operators': { + + '++x': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'x', + range: [2, 3], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 3 } + } + }, + prefix: true, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + '--x': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '--', + argument: { + type: 'Identifier', + name: 'x', + range: [2, 3], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 3 } + } + }, + prefix: true, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + '++eval': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'eval', + range: [2, 6], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 6 } + } + }, + prefix: true, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + '--eval': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '--', + argument: { + type: 'Identifier', + name: 'eval', + range: [2, 6], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 6 } + } + }, + prefix: true, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + '++arguments': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'arguments', + range: [2, 11], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 11 } + } + }, + prefix: true, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + + '--arguments': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '--', + argument: { + type: 'Identifier', + name: 'arguments', + range: [2, 11], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 11 } + } + }, + prefix: true, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + + '+x': { + type: 'ExpressionStatement', + expression: { + type: 'UnaryExpression', + operator: '+', + argument: { + type: 'Identifier', + name: 'x', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + + '-x': { + type: 'ExpressionStatement', + expression: { + type: 'UnaryExpression', + operator: '-', + argument: { + type: 'Identifier', + name: 'x', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + + '~x': { + type: 'ExpressionStatement', + expression: { + type: 'UnaryExpression', + operator: '~', + argument: { + type: 'Identifier', + name: 'x', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + + '!x': { + type: 'ExpressionStatement', + expression: { + type: 'UnaryExpression', + operator: '!', + argument: { + type: 'Identifier', + name: 'x', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + + 'void x': { + type: 'ExpressionStatement', + expression: { + type: 'UnaryExpression', + operator: 'void', + argument: { + type: 'Identifier', + name: 'x', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'delete x': { + type: 'ExpressionStatement', + expression: { + type: 'UnaryExpression', + operator: 'delete', + argument: { + type: 'Identifier', + name: 'x', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + + 'typeof x': { + type: 'ExpressionStatement', + expression: { + type: 'UnaryExpression', + operator: 'typeof', + argument: { + type: 'Identifier', + name: 'x', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + } + + }, + + 'Multiplicative Operators': { + + 'x * y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + 'x / y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '/', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + 'x % y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '%', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + } + + }, + + 'Additive Operators': { + + 'x + y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + 'x - y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '-', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + '"use strict" + 42': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + } + + }, + + 'Bitwise Shift Operator': { + + 'x << y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '<<', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'x >> y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '>>', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'x >>> y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '>>>', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + } + + }, + + 'Relational Operators': { + + 'x < y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '<', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + 'x > y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '>', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + 'x <= y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '<=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'x >= y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '>=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'x in y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: 'in', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'x instanceof y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: 'instanceof', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + 'x < y < z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '<', + left: { + type: 'BinaryExpression', + operator: '<', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + } + + }, + + 'Equality Operators': { + + 'x == y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '==', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'x != y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '!=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'x === y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '===', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'x !== y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '!==', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + } + + }, + + 'Binary Bitwise Operators': { + + 'x & y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '&', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + 'x ^ y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '^', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + 'x | y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '|', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + } + + }, + + 'Binary Expressions': { + + 'x + y + z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x - y + z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'BinaryExpression', + operator: '-', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x + y - z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '-', + left: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x - y - z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '-', + left: { + type: 'BinaryExpression', + operator: '-', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x + y * z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [4, 9], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x + y / z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'BinaryExpression', + operator: '/', + left: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [4, 9], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x - y % z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '-', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'BinaryExpression', + operator: '%', + left: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [4, 9], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x * y * z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x * y / z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '/', + left: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x * y % z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '%', + left: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x % y * z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'BinaryExpression', + operator: '%', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x << y << z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '<<', + left: { + type: 'BinaryExpression', + operator: '<<', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + + 'x | y | z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '|', + left: { + type: 'BinaryExpression', + operator: '|', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x & y & z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '&', + left: { + type: 'BinaryExpression', + operator: '&', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x ^ y ^ z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '^', + left: { + type: 'BinaryExpression', + operator: '^', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x & y | z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '|', + left: { + type: 'BinaryExpression', + operator: '&', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x | y ^ z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '|', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'BinaryExpression', + operator: '^', + left: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [4, 9], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x | y & z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '|', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'BinaryExpression', + operator: '&', + left: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [4, 9], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + } + + }, + + 'Binary Logical Operators': { + + 'x || y': { + type: 'ExpressionStatement', + expression: { + type: 'LogicalExpression', + operator: '||', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'x && y': { + type: 'ExpressionStatement', + expression: { + type: 'LogicalExpression', + operator: '&&', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'x || y || z': { + type: 'ExpressionStatement', + expression: { + type: 'LogicalExpression', + operator: '||', + left: { + type: 'LogicalExpression', + operator: '||', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + + 'x && y && z': { + type: 'ExpressionStatement', + expression: { + type: 'LogicalExpression', + operator: '&&', + left: { + type: 'LogicalExpression', + operator: '&&', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + + 'x || y && z': { + type: 'ExpressionStatement', + expression: { + type: 'LogicalExpression', + operator: '||', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'LogicalExpression', + operator: '&&', + left: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + range: [5, 11], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + + 'x || y ^ z': { + type: 'ExpressionStatement', + expression: { + type: 'LogicalExpression', + operator: '||', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'BinaryExpression', + operator: '^', + left: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + range: [5, 10], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 10 } + } + }, + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + }, + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + } + + }, + + 'Conditional Operator': { + + 'y ? 1 : 2': { + type: 'ExpressionStatement', + expression: { + type: 'ConditionalExpression', + test: { + type: 'Identifier', + name: 'y', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + consequent: { + type: 'Literal', + value: 1, + raw: '1', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + alternate: { + type: 'Literal', + value: 2, + raw: '2', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x && y ? 1 : 2': { + type: 'ExpressionStatement', + expression: { + type: 'ConditionalExpression', + test: { + type: 'LogicalExpression', + operator: '&&', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + consequent: { + type: 'Literal', + value: 1, + raw: '1', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + alternate: { + type: 'Literal', + value: 2, + raw: '2', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + } + + }, + + 'Assignment Operators': { + + 'x = 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [4, 6], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'eval = 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'eval', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [7, 9], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'arguments = 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'arguments', + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [12, 14], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + 'x *= 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '*=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'x /= 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '/=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'x %= 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '%=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'x += 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '+=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'x -= 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '-=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'x <<= 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '<<=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [6, 8], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + + 'x >>= 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '>>=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [6, 8], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + + 'x >>>= 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '>>>=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [7, 9], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x &= 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '&=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'x ^= 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '^=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'x |= 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '|=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + } + + }, + + 'Complex Expression': { + + 'a || b && c | d ^ e & f == g < h >>> i + j * k': { + type: 'ExpressionStatement', + expression: { + type: 'LogicalExpression', + operator: '||', + left: { + type: 'Identifier', + name: 'a', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'LogicalExpression', + operator: '&&', + left: { + type: 'Identifier', + name: 'b', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + right: { + type: 'BinaryExpression', + operator: '|', + left: { + type: 'Identifier', + name: 'c', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + right: { + type: 'BinaryExpression', + operator: '^', + left: { + type: 'Identifier', + name: 'd', + range: [14, 15], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 15 } + } + }, + right: { + type: 'BinaryExpression', + operator: '&', + left: { + type: 'Identifier', + name: 'e', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }, + right: { + type: 'BinaryExpression', + operator: '==', + left: { + type: 'Identifier', + name: 'f', + range: [22, 23], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 23 } + } + }, + right: { + type: 'BinaryExpression', + operator: '<', + left: { + type: 'Identifier', + name: 'g', + range: [27, 28], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 28 } + } + }, + right: { + type: 'BinaryExpression', + operator: '>>>', + left: { + type: 'Identifier', + name: 'h', + range: [31, 32], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 32 } + } + }, + right: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'Identifier', + name: 'i', + range: [37, 38], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 38 } + } + }, + right: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'Identifier', + name: 'j', + range: [41, 42], + loc: { + start: { line: 1, column: 41 }, + end: { line: 1, column: 42 } + } + }, + right: { + type: 'Identifier', + name: 'k', + range: [45, 46], + loc: { + start: { line: 1, column: 45 }, + end: { line: 1, column: 46 } + } + }, + range: [41, 46], + loc: { + start: { line: 1, column: 41 }, + end: { line: 1, column: 46 } + } + }, + range: [37, 46], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 46 } + } + }, + range: [31, 46], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 46 } + } + }, + range: [27, 46], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 46 } + } + }, + range: [22, 46], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 46 } + } + }, + range: [18, 46], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 46 } + } + }, + range: [14, 46], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 46 } + } + }, + range: [10, 46], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 46 } + } + }, + range: [5, 46], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 46 } + } + }, + range: [0, 46], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 46 } + } + }, + range: [0, 46], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 46 } + } + } + + }, + + 'Block': { + + '{ foo }': { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'foo', + range: [2, 5], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 5 } + } + }, + range: [2, 6], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 6 } + } + }], + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + '{ doThis(); doThat(); }': { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'doThis', + range: [2, 8], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 8 } + } + }, + 'arguments': [], + range: [2, 10], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 10 } + } + }, + range: [2, 11], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 11 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'doThat', + range: [12, 18], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 18 } + } + }, + 'arguments': [], + range: [12, 20], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 20 } + } + }, + range: [12, 21], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 21 } + } + }], + range: [0, 23], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 23 } + } + }, + + '{}': { + type: 'BlockStatement', + body: [], + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + } + + }, + + 'Variable Statement': { + + 'var x': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: null, + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }], + kind: 'var', + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + 'var x, y;': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: null, + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'y', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + init: null, + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }], + kind: 'var', + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'var x = 42': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: { + type: 'Literal', + value: 42, + raw: '42', + range: [8, 10], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 10 } + } + }, + range: [4, 10], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 10 } + } + }], + kind: 'var', + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + }, + + 'var eval = 42, arguments = 42': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'eval', + range: [4, 8], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 8 } + } + }, + init: { + type: 'Literal', + value: 42, + raw: '42', + range: [11, 13], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 13 } + } + }, + range: [4, 13], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 13 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'arguments', + range: [15, 24], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 24 } + } + }, + init: { + type: 'Literal', + value: 42, + raw: '42', + range: [27, 29], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 29 } + } + }, + range: [15, 29], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 29 } + } + }], + kind: 'var', + range: [0, 29], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 29 } + } + }, + + 'var x = 14, y = 3, z = 1977': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: { + type: 'Literal', + value: 14, + raw: '14', + range: [8, 10], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 10 } + } + }, + range: [4, 10], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 10 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'y', + range: [12, 13], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 13 } + } + }, + init: { + type: 'Literal', + value: 3, + raw: '3', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }, + range: [12, 17], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 17 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'z', + range: [19, 20], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 20 } + } + }, + init: { + type: 'Literal', + value: 1977, + raw: '1977', + range: [23, 27], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 27 } + } + }, + range: [19, 27], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 27 } + } + }], + kind: 'var', + range: [0, 27], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + }, + + 'var implements, interface, package': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'implements', + range: [4, 14], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 14 } + } + }, + init: null, + range: [4, 14], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 14 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'interface', + range: [16, 25], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 25 } + } + }, + init: null, + range: [16, 25], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 25 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'package', + range: [27, 34], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 34 } + } + }, + init: null, + range: [27, 34], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 34 } + } + }], + kind: 'var', + range: [0, 34], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 34 } + } + }, + + 'var private, protected, public, static': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'private', + range: [4, 11], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 11 } + } + }, + init: null, + range: [4, 11], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 11 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'protected', + range: [13, 22], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 22 } + } + }, + init: null, + range: [13, 22], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 22 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'public', + range: [24, 30], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 30 } + } + }, + init: null, + range: [24, 30], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 30 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'static', + range: [32, 38], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 38 } + } + }, + init: null, + range: [32, 38], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 38 } + } + }], + kind: 'var', + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + } + } + + }, + + 'Let Statement': { + + 'let x': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: null, + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }], + kind: 'let', + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + '{ let x }': { + type: 'BlockStatement', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + init: null, + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }], + kind: 'let', + range: [2, 8], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 8 } + } + }], + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + '{ let x = 42 }': { + type: 'BlockStatement', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + init: { + type: 'Literal', + value: 42, + raw: '42', + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + range: [6, 12], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 12 } + } + }], + kind: 'let', + range: [2, 13], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 13 } + } + }], + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + '{ let x = 14, y = 3, z = 1977 }': { + type: 'BlockStatement', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + init: { + type: 'Literal', + value: 14, + raw: '14', + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + range: [6, 12], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 12 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'y', + range: [14, 15], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 15 } + } + }, + init: { + type: 'Literal', + value: 3, + raw: '3', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }, + range: [14, 19], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 19 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'z', + range: [21, 22], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 22 } + } + }, + init: { + type: 'Literal', + value: 1977, + raw: '1977', + range: [25, 29], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 29 } + } + }, + range: [21, 29], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 29 } + } + }], + kind: 'let', + range: [2, 30], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 30 } + } + }], + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + } + } + + }, + + 'Const Statement': { + + 'const x = 42': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + init: { + type: 'Literal', + value: 42, + raw: '42', + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + range: [6, 12], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 12 } + } + }], + kind: 'const', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + + '{ const x = 42 }': { + type: 'BlockStatement', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + init: { + type: 'Literal', + value: 42, + raw: '42', + range: [12, 14], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 14 } + } + }, + range: [8, 14], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 14 } + } + }], + kind: 'const', + range: [2, 15], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 15 } + } + }], + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + '{ const x = 14, y = 3, z = 1977 }': { + type: 'BlockStatement', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + init: { + type: 'Literal', + value: 14, + raw: '14', + range: [12, 14], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 14 } + } + }, + range: [8, 14], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 14 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'y', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }, + init: { + type: 'Literal', + value: 3, + raw: '3', + range: [20, 21], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 21 } + } + }, + range: [16, 21], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 21 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'z', + range: [23, 24], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 24 } + } + }, + init: { + type: 'Literal', + value: 1977, + raw: '1977', + range: [27, 31], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 31 } + } + }, + range: [23, 31], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 31 } + } + }], + kind: 'const', + range: [2, 32], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 32 } + } + }], + range: [0, 33], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 33 } + } + } + + }, + + 'Empty Statement': { + + ';': { + type: 'EmptyStatement', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + } + + }, + + 'Expression Statement': { + + 'x': { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + + 'x, y': { + type: 'ExpressionStatement', + expression: { + type: 'SequenceExpression', + expressions: [{ + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, { + type: 'Identifier', + name: 'y', + range: [3, 4], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 4 } + } + }], + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + + '\\u0061': { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'a', + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'a\\u0061': { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'aa', + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + '\\u0061a': { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'aa', + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + '\\u0061a ': { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'aa', + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + } + }, + + 'If Statement': { + + 'if (morning) goodMorning()': { + type: 'IfStatement', + test: { + type: 'Identifier', + name: 'morning', + range: [4, 11], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 11 } + } + }, + consequent: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'goodMorning', + range: [13, 24], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 24 } + } + }, + 'arguments': [], + range: [13, 26], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 26 } + } + }, + range: [13, 26], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 26 } + } + }, + alternate: null, + range: [0, 26], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 26 } + } + }, + + 'if (morning) (function(){})': { + type: 'IfStatement', + test: { + type: 'Identifier', + name: 'morning', + range: [4, 11], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 11 } + } + }, + consequent: { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [24, 26], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 26 } + } + }, + rest: null, + generator: false, + expression: false, + range: [14, 26], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 26 } + } + }, + range: [13, 27], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 27 } + } + }, + alternate: null, + range: [0, 27], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + }, + + 'if (morning) var x = 0;': { + type: 'IfStatement', + test: { + type: 'Identifier', + name: 'morning', + range: [4, 11], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 11 } + } + }, + consequent: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [17, 18], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 18 } + } + }, + init: { + type: 'Literal', + value: 0, + raw: '0', + range: [21, 22], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 22 } + } + }, + range: [17, 22], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 22 } + } + }], + kind: 'var', + range: [13, 23], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 23 } + } + }, + alternate: null, + range: [0, 23], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 23 } + } + }, + + 'if (morning) function a(){}': { + type: 'IfStatement', + test: { + type: 'Identifier', + name: 'morning', + range: [4, 11], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 11 } + } + }, + consequent: { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'a', + range: [22, 23], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 23 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [25, 27], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 27 } + } + }, + rest: null, + generator: false, + expression: false, + range: [13, 27], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 27 } + } + }, + alternate: null, + range: [0, 27], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + }, + + 'if (morning) goodMorning(); else goodDay()': { + type: 'IfStatement', + test: { + type: 'Identifier', + name: 'morning', + range: [4, 11], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 11 } + } + }, + consequent: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'goodMorning', + range: [13, 24], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 24 } + } + }, + 'arguments': [], + range: [13, 26], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 26 } + } + }, + range: [13, 27], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 27 } + } + }, + alternate: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'goodDay', + range: [33, 40], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 40 } + } + }, + 'arguments': [], + range: [33, 42], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 42 } + } + }, + range: [33, 42], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 42 } + } + }, + range: [0, 42], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 42 } + } + } + + }, + + 'Iteration Statements': { + + 'do keep(); while (true)': { + type: 'DoWhileStatement', + body: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'keep', + range: [3, 7], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 7 } + } + }, + 'arguments': [], + range: [3, 9], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 9 } + } + }, + range: [3, 10], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 10 } + } + }, + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [18, 22], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 23], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 23 } + } + }, + + 'do keep(); while (true);': { + type: 'DoWhileStatement', + body: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'keep', + range: [3, 7], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 7 } + } + }, + 'arguments': [], + range: [3, 9], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 9 } + } + }, + range: [3, 10], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 10 } + } + }, + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [18, 22], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + + 'do { x++; y--; } while (x < 10)': { + type: 'DoWhileStatement', + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'x', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + prefix: false, + range: [5, 8], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 8 } + } + }, + range: [5, 9], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 9 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '--', + argument: { + type: 'Identifier', + name: 'y', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + prefix: false, + range: [10, 13], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 13 } + } + }, + range: [10, 14], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 14 } + } + }], + range: [3, 16], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 16 } + } + }, + test: { + type: 'BinaryExpression', + operator: '<', + left: { + type: 'Identifier', + name: 'x', + range: [24, 25], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 25 } + } + }, + right: { + type: 'Literal', + value: 10, + raw: '10', + range: [28, 30], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 30 } + } + }, + range: [24, 30], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 30 } + } + }, + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + } + }, + + '{ do { } while (false) false }': { + type: 'BlockStatement', + body: [{ + type: 'DoWhileStatement', + body: { + type: 'BlockStatement', + body: [], + range: [5, 8], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 8 } + } + }, + test: { + type: 'Literal', + value: false, + raw: 'false', + range: [16, 21], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 21 } + } + }, + range: [2, 22], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 22 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: false, + raw: 'false', + range: [23, 28], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 28 } + } + }, + range: [23, 29], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 29 } + } + }], + range: [0, 30], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 30 } + } + }, + + 'while (true) doSomething()': { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [7, 11], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 11 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'doSomething', + range: [13, 24], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 24 } + } + }, + 'arguments': [], + range: [13, 26], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 26 } + } + }, + range: [13, 26], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 26 } + } + }, + range: [0, 26], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 26 } + } + }, + + 'while (x < 10) { x++; y--; }': { + type: 'WhileStatement', + test: { + type: 'BinaryExpression', + operator: '<', + left: { + type: 'Identifier', + name: 'x', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + right: { + type: 'Literal', + value: 10, + raw: '10', + range: [11, 13], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 13 } + } + }, + range: [7, 13], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 13 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'x', + range: [17, 18], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 18 } + } + }, + prefix: false, + range: [17, 20], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 20 } + } + }, + range: [17, 21], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 21 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '--', + argument: { + type: 'Identifier', + name: 'y', + range: [22, 23], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 23 } + } + }, + prefix: false, + range: [22, 25], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 25 } + } + }, + range: [22, 26], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 26 } + } + }], + range: [15, 28], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 28 } + } + }, + range: [0, 28], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 28 } + } + }, + + 'for(;;);': { + type: 'ForStatement', + init: null, + test: null, + update: null, + body: { + type: 'EmptyStatement', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + + 'for(;;){}': { + type: 'ForStatement', + init: null, + test: null, + update: null, + body: { + type: 'BlockStatement', + body: [], + range: [7, 9], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'for(x = 0;;);': { + type: 'ForStatement', + init: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Literal', + value: 0, + raw: '0', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [4, 9], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 9 } + } + }, + test: null, + update: null, + body: { + type: 'EmptyStatement', + range: [12, 13], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + + 'for(var x = 0;;);': { + type: 'ForStatement', + init: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + init: { + type: 'Literal', + value: 0, + raw: '0', + range: [12, 13], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 13 } + } + }, + range: [8, 13], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 13 } + } + }], + kind: 'var', + range: [4, 13], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 13 } + } + }, + test: null, + update: null, + body: { + type: 'EmptyStatement', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + + 'for(let x = 0;;);': { + type: 'ForStatement', + init: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + init: { + type: 'Literal', + value: 0, + raw: '0', + range: [12, 13], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 13 } + } + }, + range: [8, 13], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 13 } + } + }], + kind: 'let', + range: [4, 13], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 13 } + } + }, + test: null, + update: null, + body: { + type: 'EmptyStatement', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + + 'for(var x = 0, y = 1;;);': { + type: 'ForStatement', + init: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + init: { + type: 'Literal', + value: 0, + raw: '0', + range: [12, 13], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 13 } + } + }, + range: [8, 13], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 13 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'y', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }, + init: { + type: 'Literal', + value: 1, + raw: '1', + range: [19, 20], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 20 } + } + }, + range: [15, 20], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 20 } + } + }], + kind: 'var', + range: [4, 20], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 20 } + } + }, + test: null, + update: null, + body: { + type: 'EmptyStatement', + range: [23, 24], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 24 } + } + }, + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + + 'for(x = 0; x < 42;);': { + type: 'ForStatement', + init: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Literal', + value: 0, + raw: '0', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [4, 9], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 9 } + } + }, + test: { + type: 'BinaryExpression', + operator: '<', + left: { + type: 'Identifier', + name: 'x', + range: [11, 12], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 12 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + range: [11, 17], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 17 } + } + }, + update: null, + body: { + type: 'EmptyStatement', + range: [19, 20], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 20 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + + 'for(x = 0; x < 42; x++);': { + type: 'ForStatement', + init: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Literal', + value: 0, + raw: '0', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [4, 9], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 9 } + } + }, + test: { + type: 'BinaryExpression', + operator: '<', + left: { + type: 'Identifier', + name: 'x', + range: [11, 12], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 12 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + range: [11, 17], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 17 } + } + }, + update: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'x', + range: [19, 20], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 20 } + } + }, + prefix: false, + range: [19, 22], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 22 } + } + }, + body: { + type: 'EmptyStatement', + range: [23, 24], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 24 } + } + }, + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + + 'for(x = 0; x < 42; x++) process(x);': { + type: 'ForStatement', + init: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Literal', + value: 0, + raw: '0', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [4, 9], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 9 } + } + }, + test: { + type: 'BinaryExpression', + operator: '<', + left: { + type: 'Identifier', + name: 'x', + range: [11, 12], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 12 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + range: [11, 17], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 17 } + } + }, + update: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'x', + range: [19, 20], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 20 } + } + }, + prefix: false, + range: [19, 22], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 22 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'process', + range: [24, 31], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 31 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'x', + range: [32, 33], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 33 } + } + }], + range: [24, 34], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 34 } + } + }, + range: [24, 35], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 35 } + } + }, + range: [0, 35], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 35 } + } + }, + + 'for(x in list) process(x);': { + type: 'ForInStatement', + left: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'list', + range: [9, 13], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 13 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'process', + range: [15, 22], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 22 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'x', + range: [23, 24], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 24 } + } + }], + range: [15, 25], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 25 } + } + }, + range: [15, 26], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 26 } + } + }, + each: false, + range: [0, 26], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 26 } + } + }, + + 'for (var x in list) process(x);': { + type: 'ForInStatement', + left: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + init: null, + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }], + kind: 'var', + range: [5, 10], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 10 } + } + }, + right: { + type: 'Identifier', + name: 'list', + range: [14, 18], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 18 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'process', + range: [20, 27], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 27 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'x', + range: [28, 29], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 29 } + } + }], + range: [20, 30], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 30 } + } + }, + range: [20, 31], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 31 } + } + }, + each: false, + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + } + }, + + 'for (let x in list) process(x);': { + type: 'ForInStatement', + left: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + init: null, + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }], + kind: 'let', + range: [5, 10], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 10 } + } + }, + right: { + type: 'Identifier', + name: 'list', + range: [14, 18], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 18 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'process', + range: [20, 27], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 27 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'x', + range: [28, 29], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 29 } + } + }], + range: [20, 30], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 30 } + } + }, + range: [20, 31], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 31 } + } + }, + each: false, + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + } + }, + + 'for (var i = function() { return 10 in [] } of list) process(x);': { + type: 'ForOfStatement', + left: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'i', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + init: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ReturnStatement', + argument: { + type: 'BinaryExpression', + operator: 'in', + left: { + type: 'Literal', + value: 10, + raw: '10', + range: [33, 35], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 35 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [39, 41], + loc: { + start: { line: 1, column: 39 }, + end: { line: 1, column: 41 } + } + }, + range: [33, 41], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 41 } + } + }, + range: [26, 42], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 42 } + } + }], + range: [24, 43], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 43 } + } + }, + rest: null, + generator: false, + expression: false, + range: [13, 43], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 43 } + } + }, + range: [9, 43], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 43 } + } + }], + kind: 'var', + range: [5, 43], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 43 } + } + }, + right: { + type: 'Identifier', + name: 'list', + range: [47, 51], + loc: { + start: { line: 1, column: 47 }, + end: { line: 1, column: 51 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'process', + range: [53, 60], + loc: { + start: { line: 1, column: 53 }, + end: { line: 1, column: 60 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'x', + range: [61, 62], + loc: { + start: { line: 1, column: 61 }, + end: { line: 1, column: 62 } + } + }], + range: [53, 63], + loc: { + start: { line: 1, column: 53 }, + end: { line: 1, column: 63 } + } + }, + range: [53, 64], + loc: { + start: { line: 1, column: 53 }, + end: { line: 1, column: 64 } + } + }, + range: [0, 64], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 64 } + } + } + + }, + + 'continue statement': { + + 'while (true) { continue; }': { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [7, 11], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 11 } + } + }, + body: { + type: 'BlockStatement', + body: [ + { + type: 'ContinueStatement', + label: null, + range: [15, 24], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 24 } + } + } + ], + range: [13, 26], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 26 } + } + }, + range: [0, 26], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 26 } + } + }, + + 'while (true) { continue }': { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [7, 11], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 11 } + } + }, + body: { + type: 'BlockStatement', + body: [ + { + type: 'ContinueStatement', + label: null, + range: [15, 24], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 24 } + } + } + ], + range: [13, 25], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 25 } + } + }, + range: [0, 25], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 25 } + } + }, + + 'done: while (true) { continue done }': { + type: 'LabeledStatement', + label: { + type: 'Identifier', + name: 'done', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + body: { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [13, 17], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 17 } + } + }, + body: { + type: 'BlockStatement', + body: [ + { + type: 'ContinueStatement', + label: { + type: 'Identifier', + name: 'done', + range: [30, 34], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 34 } + } + }, + range: [21, 35], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 35 } + } + } + ], + range: [19, 36], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 36 } + } + }, + range: [6, 36], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 36 } + } + }, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + } + }, + + 'done: while (true) { continue done; }': { + type: 'LabeledStatement', + label: { + type: 'Identifier', + name: 'done', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + body: { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [13, 17], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 17 } + } + }, + body: { + type: 'BlockStatement', + body: [ + { + type: 'ContinueStatement', + label: { + type: 'Identifier', + name: 'done', + range: [30, 34], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 34 } + } + }, + range: [21, 35], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 35 } + } + } + ], + range: [19, 37], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 37 } + } + }, + range: [6, 37], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 37 } + } + }, + range: [0, 37], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 37 } + } + }, + + '__proto__: while (true) { continue __proto__; }': { + type: 'LabeledStatement', + label: { + type: 'Identifier', + name: '__proto__', + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + body: { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [18, 22], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 22 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'ContinueStatement', + label: { + type: 'Identifier', + name: '__proto__', + range: [35, 44], + loc: { + start: { line: 1, column: 35 }, + end: { line: 1, column: 44 } + } + }, + range: [26, 45], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 45 } + } + }], + range: [24, 47], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 47 } + } + }, + range: [11, 47], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 47 } + } + }, + range: [0, 47], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 47 } + } + } + + }, + + 'break statement': { + + 'while (true) { break }': { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [7, 11], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 11 } + } + }, + body: { + type: 'BlockStatement', + body: [ + { + type: 'BreakStatement', + label: null, + range: [15, 21], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 21 } + } + } + ], + range: [13, 22], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + + 'done: while (true) { break done }': { + type: 'LabeledStatement', + label: { + type: 'Identifier', + name: 'done', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + body: { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [13, 17], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 17 } + } + }, + body: { + type: 'BlockStatement', + body: [ + { + type: 'BreakStatement', + label: { + type: 'Identifier', + name: 'done', + range: [27, 31], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 31 } + } + }, + range: [21, 32], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 32 } + } + } + ], + range: [19, 33], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 33 } + } + }, + range: [6, 33], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 33 } + } + }, + range: [0, 33], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 33 } + } + }, + + 'done: while (true) { break done; }': { + type: 'LabeledStatement', + label: { + type: 'Identifier', + name: 'done', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + body: { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [13, 17], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 17 } + } + }, + body: { + type: 'BlockStatement', + body: [ + { + type: 'BreakStatement', + label: { + type: 'Identifier', + name: 'done', + range: [27, 31], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 31 } + } + }, + range: [21, 32], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 32 } + } + } + ], + range: [19, 34], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 34 } + } + }, + range: [6, 34], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 34 } + } + }, + range: [0, 34], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 34 } + } + }, + + '__proto__: while (true) { break __proto__; }': { + type: 'LabeledStatement', + label: { + type: 'Identifier', + name: '__proto__', + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + body: { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [18, 22], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 22 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'BreakStatement', + label: { + type: 'Identifier', + name: '__proto__', + range: [32, 41], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 41 } + } + }, + range: [26, 42], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 42 } + } + }], + range: [24, 44], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 44 } + } + }, + range: [11, 44], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 44 } + } + }, + range: [0, 44], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 44 } + } + } + + }, + + 'return statement': { + + '(function(){ return })': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [ + { + type: 'ReturnStatement', + argument: null, + range: [13, 20], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 20 } + } + } + ], + range: [11, 21], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 21 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 21], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + + '(function(){ return; })': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [ + { + type: 'ReturnStatement', + argument: null, + range: [13, 20], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 20 } + } + } + ], + range: [11, 22], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 22 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 22], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 23], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 23 } + } + }, + + '(function(){ return x; })': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [ + { + type: 'ReturnStatement', + argument: { + type: 'Identifier', + name: 'x', + range: [20, 21], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 21 } + } + }, + range: [13, 22], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 22 } + } + } + ], + range: [11, 24], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 24 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 24], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 24 } + } + }, + range: [0, 25], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 25 } + } + }, + + '(function(){ return x * y })': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [ + { + type: 'ReturnStatement', + argument: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'Identifier', + name: 'x', + range: [20, 21], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 21 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [24, 25], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 25 } + } + }, + range: [20, 25], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 25 } + } + }, + range: [13, 26], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 26 } + } + } + ], + range: [11, 27], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 27 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 27], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 27 } + } + }, + range: [0, 28], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 28 } + } + } + }, + + 'with statement': { + + 'with (x) foo = bar': { + type: 'WithStatement', + object: { + type: 'Identifier', + name: 'x', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'foo', + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + right: { + type: 'Identifier', + name: 'bar', + range: [15, 18], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 18 } + } + }, + range: [9, 18], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 18 } + } + }, + range: [9, 18], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 18 } + } + }, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + + 'with (x) foo = bar;': { + type: 'WithStatement', + object: { + type: 'Identifier', + name: 'x', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'foo', + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + right: { + type: 'Identifier', + name: 'bar', + range: [15, 18], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 18 } + } + }, + range: [9, 18], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 18 } + } + }, + range: [9, 19], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 19 } + } + }, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + + 'with (x) { foo = bar }': { + type: 'WithStatement', + object: { + type: 'Identifier', + name: 'x', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'foo', + range: [11, 14], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 14 } + } + }, + right: { + type: 'Identifier', + name: 'bar', + range: [17, 20], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 20 } + } + }, + range: [11, 20], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 20 } + } + }, + range: [11, 21], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 21 } + } + }], + range: [9, 22], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + } + + }, + + 'switch statement': { + + 'switch (x) {}': { + type: 'SwitchStatement', + discriminant: { + type: 'Identifier', + name: 'x', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + cases:[], + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + + 'switch (answer) { case 42: hi(); break; }': { + type: 'SwitchStatement', + discriminant: { + type: 'Identifier', + name: 'answer', + range: [8, 14], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 14 } + } + }, + cases: [{ + type: 'SwitchCase', + test: { + type: 'Literal', + value: 42, + raw: '42', + range: [23, 25], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 25 } + } + }, + consequent: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'hi', + range: [27, 29], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 29 } + } + }, + 'arguments': [], + range: [27, 31], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 31 } + } + }, + range: [27, 32], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 32 } + } + }, { + type: 'BreakStatement', + label: null, + range: [33, 39], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 39 } + } + }], + range: [18, 39], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 39 } + } + }], + range: [0, 41], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 41 } + } + }, + + 'switch (answer) { case 42: hi(); break; default: break }': { + type: 'SwitchStatement', + discriminant: { + type: 'Identifier', + name: 'answer', + range: [8, 14], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 14 } + } + }, + cases: [{ + type: 'SwitchCase', + test: { + type: 'Literal', + value: 42, + raw: '42', + range: [23, 25], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 25 } + } + }, + consequent: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'hi', + range: [27, 29], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 29 } + } + }, + 'arguments': [], + range: [27, 31], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 31 } + } + }, + range: [27, 32], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 32 } + } + }, { + type: 'BreakStatement', + label: null, + range: [33, 39], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 39 } + } + }], + range: [18, 39], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 39 } + } + }, { + type: 'SwitchCase', + test: null, + consequent: [{ + type: 'BreakStatement', + label: null, + range: [49, 55], + loc: { + start: { line: 1, column: 49 }, + end: { line: 1, column: 55 } + } + }], + range: [40, 55], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 55 } + } + }], + range: [0, 56], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 56 } + } + } + + }, + + 'Labelled Statements': { + + 'start: for (;;) break start': { + type: 'LabeledStatement', + label: { + type: 'Identifier', + name: 'start', + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + body: { + type: 'ForStatement', + init: null, + test: null, + update: null, + body: { + type: 'BreakStatement', + label: { + type: 'Identifier', + name: 'start', + range: [22, 27], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 27 } + } + }, + range: [16, 27], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 27 } + } + }, + range: [7, 27], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 27 } + } + }, + range: [0, 27], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + }, + + 'start: while (true) break start': { + type: 'LabeledStatement', + label: { + type: 'Identifier', + name: 'start', + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + body: { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [14, 18], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 18 } + } + }, + body: { + type: 'BreakStatement', + label: { + type: 'Identifier', + name: 'start', + range: [26, 31], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 31 } + } + }, + range: [20, 31], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 31 } + } + }, + range: [7, 31], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 31 } + } + }, + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + } + }, + + '__proto__: test': { + type: 'LabeledStatement', + label: { + type: 'Identifier', + name: '__proto__', + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'test', + range: [11, 15], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 15 } + } + }, + range: [11, 15], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + } + + }, + + 'throw statement': { + + 'throw x;': { + type: 'ThrowStatement', + argument: { + type: 'Identifier', + name: 'x', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + + 'throw x * y': { + type: 'ThrowStatement', + argument: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'Identifier', + name: 'x', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + range: [6, 11], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + + 'throw { message: "Error" }': { + type: 'ThrowStatement', + argument: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'message', + range: [8, 15], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 15 } + } + }, + value: { + type: 'Literal', + value: 'Error', + raw: '"Error"', + range: [17, 24], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 24 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [8, 24], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 24 } + } + }], + range: [6, 26], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 26 } + } + }, + range: [0, 26], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 26 } + } + } + + }, + + 'try statement': { + + 'try { } catch (e) { }': { + type: 'TryStatement', + block: { + type: 'BlockStatement', + body: [], + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + guardedHandlers: [], + handlers: [{ + type: 'CatchClause', + param: { + type: 'Identifier', + name: 'e', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }, + body: { + type: 'BlockStatement', + body: [], + range: [18, 21], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 21 } + } + }, + range: [8, 21], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 21 } + } + }], + finalizer: null, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + + 'try { } catch (eval) { }': { + type: 'TryStatement', + block: { + type: 'BlockStatement', + body: [], + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + guardedHandlers: [], + handlers: [{ + type: 'CatchClause', + param: { + type: 'Identifier', + name: 'eval', + range: [15, 19], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 19 } + } + }, + body: { + type: 'BlockStatement', + body: [], + range: [21, 24], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 24 } + } + }, + range: [8, 24], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 24 } + } + }], + finalizer: null, + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + + 'try { } catch (arguments) { }': { + type: 'TryStatement', + block: { + type: 'BlockStatement', + body: [], + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + guardedHandlers: [], + handlers: [{ + type: 'CatchClause', + param: { + type: 'Identifier', + name: 'arguments', + range: [15, 24], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 24 } + } + }, + body: { + type: 'BlockStatement', + body: [], + range: [26, 29], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 29 } + } + }, + range: [8, 29], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 29 } + } + }], + finalizer: null, + range: [0, 29], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 29 } + } + }, + + 'try { } catch (e) { say(e) }': { + type: 'TryStatement', + block: { + type: 'BlockStatement', + body: [], + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + guardedHandlers: [], + handlers: [{ + type: 'CatchClause', + param: { + type: 'Identifier', + name: 'e', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'say', + range: [20, 23], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 23 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'e', + range: [24, 25], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 25 } + } + }], + range: [20, 26], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 26 } + } + }, + range: [20, 27], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 27 } + } + }], + range: [18, 28], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 28 } + } + }, + range: [8, 28], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 28 } + } + }], + finalizer: null, + range: [0, 28], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 28 } + } + }, + + 'try { } finally { cleanup(stuff) }': { + type: 'TryStatement', + block: { + type: 'BlockStatement', + body: [], + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + guardedHandlers: [], + handlers: [], + finalizer: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'cleanup', + range: [18, 25], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 25 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'stuff', + range: [26, 31], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 31 } + } + }], + range: [18, 32], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 32 } + } + }, + range: [18, 33], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 33 } + } + }], + range: [16, 34], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 34 } + } + }, + range: [0, 34], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 34 } + } + }, + + 'try { doThat(); } catch (e) { say(e) }': { + type: 'TryStatement', + block: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'doThat', + range: [6, 12], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 12 } + } + }, + 'arguments': [], + range: [6, 14], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 14 } + } + }, + range: [6, 15], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 15 } + } + }], + range: [4, 17], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 17 } + } + }, + guardedHandlers: [], + handlers: [{ + type: 'CatchClause', + param: { + type: 'Identifier', + name: 'e', + range: [25, 26], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 26 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'say', + range: [30, 33], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 33 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'e', + range: [34, 35], + loc: { + start: { line: 1, column: 34 }, + end: { line: 1, column: 35 } + } + }], + range: [30, 36], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 36 } + } + }, + range: [30, 37], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 37 } + } + }], + range: [28, 38], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 38 } + } + }, + range: [18, 38], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 38 } + } + }], + finalizer: null, + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + } + }, + + 'try { doThat(); } catch (e) { say(e) } finally { cleanup(stuff) }': { + type: 'TryStatement', + block: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'doThat', + range: [6, 12], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 12 } + } + }, + 'arguments': [], + range: [6, 14], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 14 } + } + }, + range: [6, 15], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 15 } + } + }], + range: [4, 17], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 17 } + } + }, + guardedHandlers: [], + handlers: [{ + type: 'CatchClause', + param: { + type: 'Identifier', + name: 'e', + range: [25, 26], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 26 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'say', + range: [30, 33], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 33 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'e', + range: [34, 35], + loc: { + start: { line: 1, column: 34 }, + end: { line: 1, column: 35 } + } + }], + range: [30, 36], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 36 } + } + }, + range: [30, 37], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 37 } + } + }], + range: [28, 38], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 38 } + } + }, + range: [18, 38], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 38 } + } + }], + finalizer: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'cleanup', + range: [49, 56], + loc: { + start: { line: 1, column: 49 }, + end: { line: 1, column: 56 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'stuff', + range: [57, 62], + loc: { + start: { line: 1, column: 57 }, + end: { line: 1, column: 62 } + } + }], + range: [49, 63], + loc: { + start: { line: 1, column: 49 }, + end: { line: 1, column: 63 } + } + }, + range: [49, 64], + loc: { + start: { line: 1, column: 49 }, + end: { line: 1, column: 64 } + } + }], + range: [47, 65], + loc: { + start: { line: 1, column: 47 }, + end: { line: 1, column: 65 } + } + }, + range: [0, 65], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 65 } + } + } + + }, + + 'debugger statement': { + + 'debugger;': { + type: 'DebuggerStatement', + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + } + + }, + + 'Function Definition': { + + 'function hello() { sayHi(); }': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'hello', + range: [9, 14], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 14 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'sayHi', + range: [19, 24], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 24 } + } + }, + 'arguments': [], + range: [19, 26], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 26 } + } + }, + range: [19, 27], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 27 } + } + }], + range: [17, 29], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 29 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 29], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 29 } + } + }, + + 'function eval() { }': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'eval', + range: [9, 13], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 13 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [16, 19], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 19 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + + 'function arguments() { }': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'arguments', + range: [9, 18], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 18 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [21, 24], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 24 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + + 'function test(t, t) { }': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'test', + range: [9, 13], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 13 } + } + }, + params: [{ + type: 'Identifier', + name: 't', + range: [14, 15], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 15 } + } + }, { + type: 'Identifier', + name: 't', + range: [17, 18], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 18 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [20, 23], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 23 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 23], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 23 } + } + }, + + '(function test(t, t) { })': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'test', + range: [10, 14], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 14 } + } + }, + params: [{ + type: 'Identifier', + name: 't', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }, { + type: 'Identifier', + name: 't', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [21, 24], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 24 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 24], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 24 } + } + }, + range: [0, 25], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 25 } + } + }, + + 'function eval() { function inner() { "use strict" } }': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'eval', + range: [9, 13], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 13 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'inner', + range: [27, 32], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 32 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '\"use strict\"', + range: [37, 49], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 49 } + } + }, + range: [37, 50], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 50 } + } + }], + range: [35, 51], + loc: { + start: { line: 1, column: 35 }, + end: { line: 1, column: 51 } + } + }, + rest: null, + generator: false, + expression: false, + range: [18, 51], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 51 } + } + }], + range: [16, 53], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 53 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 53], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 53 } + } + }, + + 'function hello(a) { sayHi(); }': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'hello', + range: [9, 14], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 14 } + } + }, + params: [{ + type: 'Identifier', + name: 'a', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'sayHi', + range: [20, 25], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 25 } + } + }, + 'arguments': [], + range: [20, 27], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 27 } + } + }, + range: [20, 28], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 28 } + } + }], + range: [18, 30], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 30 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 30], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 30 } + } + }, + + 'function hello(a, b) { sayHi(); }': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'hello', + range: [9, 14], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 14 } + } + }, + params: [{ + type: 'Identifier', + name: 'a', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }, { + type: 'Identifier', + name: 'b', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'sayHi', + range: [23, 28], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 28 } + } + }, + 'arguments': [], + range: [23, 30], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 30 } + } + }, + range: [23, 31], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 31 } + } + }], + range: [21, 33], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 33 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 33], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 33 } + } + }, + + 'var hi = function() { sayHi() };': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'hi', + range: [4, 6], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 6 } + } + }, + init: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'sayHi', + range: [22, 27], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 27 } + } + }, + 'arguments': [], + range: [22, 29], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 29 } + } + }, + range: [22, 30], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 30 } + } + }], + range: [20, 31], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 31 } + } + }, + rest: null, + generator: false, + expression: false, + range: [9, 31], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 31 } + } + }, + range: [4, 31], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 31 } + } + }], + kind: 'var', + range: [0, 32], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 32 } + } + }, + + 'var hi = function eval() { };': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'hi', + range: [4, 6], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 6 } + } + }, + init: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'eval', + range: [18, 22], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 22 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [25, 28], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 28 } + } + }, + rest: null, + generator: false, + expression: false, + range: [9, 28], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 28 } + } + }, + range: [4, 28], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 28 } + } + }], + kind: 'var', + range: [0, 29], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 29 } + } + }, + + 'var hi = function arguments() { };': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'hi', + range: [4, 6], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 6 } + } + }, + init: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'arguments', + range: [18, 27], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 27 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [30, 33], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 33 } + } + }, + rest: null, + generator: false, + expression: false, + range: [9, 33], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 33 } + } + }, + range: [4, 33], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 33 } + } + }], + kind: 'var', + range: [0, 34], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 34 } + } + }, + + 'var hello = function hi() { sayHi() };': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'hello', + range: [4, 9], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 9 } + } + }, + init: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'hi', + range: [21, 23], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 23 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'sayHi', + range: [28, 33], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 33 } + } + }, + 'arguments': [], + range: [28, 35], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 35 } + } + }, + range: [28, 36], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 36 } + } + }], + range: [26, 37], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 37 } + } + }, + rest: null, + generator: false, + expression: false, + range: [12, 37], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 37 } + } + }, + range: [4, 37], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 37 } + } + }], + kind: 'var', + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + } + }, + + '(function(){})': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [11, 13], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 13 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 13], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + 'function universe(__proto__) { }': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'universe', + range: [9, 17], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 17 } + } + }, + params: [{ + type: 'Identifier', + name: '__proto__', + range: [18, 27], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 27 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [29, 32], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 32 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 32], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 32 } + } + }, + + 'function test() { "use strict" + 42; }': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'test', + range: [9, 13], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 13 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [18, 30], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 30 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [33, 35], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 35 } + } + }, + range: [18, 35], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 35 } + } + }, + range: [18, 36], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 36 } + } + }], + range: [16, 38], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 38 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + } + } + + }, + + 'Automatic semicolon insertion': { + + '{ x\n++y }': { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'x', + range: [2, 3], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 3 } + } + }, + range: [2, 4], + loc: { + start: { line: 1, column: 2 }, + end: { line: 2, column: 0 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'y', + range: [6, 7], + loc: { + start: { line: 2, column: 2 }, + end: { line: 2, column: 3 } + } + }, + prefix: true, + range: [4, 7], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 3 } + } + }, + range: [4, 8], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 4 } + } + }], + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 5 } + } + }, + + '{ x\n--y }': { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'x', + range: [2, 3], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 3 } + } + }, + range: [2, 4], + loc: { + start: { line: 1, column: 2 }, + end: { line: 2, column: 0 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '--', + argument: { + type: 'Identifier', + name: 'y', + range: [6, 7], + loc: { + start: { line: 2, column: 2 }, + end: { line: 2, column: 3 } + } + }, + prefix: true, + range: [4, 7], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 3 } + } + }, + range: [4, 8], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 4 } + } + }], + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 5 } + } + }, + + 'var x /* comment */;': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: null, + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }], + kind: 'var', + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + + '{ var x = 14, y = 3\nz; }': { + type: 'BlockStatement', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + init: { + type: 'Literal', + value: 14, + raw: '14', + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + range: [6, 12], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 12 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'y', + range: [14, 15], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 15 } + } + }, + init: { + type: 'Literal', + value: 3, + raw: '3', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }, + range: [14, 19], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 19 } + } + }], + kind: 'var', + range: [2, 20], + loc: { + start: { line: 1, column: 2 }, + end: { line: 2, column: 0 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'z', + range: [20, 21], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 1 } + } + }, + range: [20, 22], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 2 } + } + }], + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 4 } + } + }, + + 'while (true) { continue\nthere; }': { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [7, 11], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 11 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'ContinueStatement', + label: null, + range: [15, 23], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 23 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'there', + range: [24, 29], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 5 } + } + }, + range: [24, 30], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 6 } + } + }], + range: [13, 32], + loc: { + start: { line: 1, column: 13 }, + end: { line: 2, column: 8 } + } + }, + range: [0, 32], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 8 } + } + }, + + 'while (true) { continue // Comment\nthere; }': { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [7, 11], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 11 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'ContinueStatement', + label: null, + range: [15, 23], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 23 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'there', + range: [35, 40], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 5 } + } + }, + range: [35, 41], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 6 } + } + }], + range: [13, 43], + loc: { + start: { line: 1, column: 13 }, + end: { line: 2, column: 8 } + } + }, + range: [0, 43], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 8 } + } + }, + + 'while (true) { continue /* Multiline\nComment */there; }': { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [7, 11], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 11 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'ContinueStatement', + label: null, + range: [15, 23], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 23 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'there', + range: [47, 52], + loc: { + start: { line: 2, column: 10 }, + end: { line: 2, column: 15 } + } + }, + range: [47, 53], + loc: { + start: { line: 2, column: 10 }, + end: { line: 2, column: 16 } + } + }], + range: [13, 55], + loc: { + start: { line: 1, column: 13 }, + end: { line: 2, column: 18 } + } + }, + range: [0, 55], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 18 } + } + }, + + 'while (true) { break\nthere; }': { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [7, 11], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 11 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'BreakStatement', + label: null, + range: [15, 20], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 20 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'there', + range: [21, 26], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 5 } + } + }, + range: [21, 27], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 6 } + } + }], + range: [13, 29], + loc: { + start: { line: 1, column: 13 }, + end: { line: 2, column: 8 } + } + }, + range: [0, 29], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 8 } + } + }, + + 'while (true) { break // Comment\nthere; }': { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [7, 11], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 11 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'BreakStatement', + label: null, + range: [15, 20], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 20 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'there', + range: [32, 37], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 5 } + } + }, + range: [32, 38], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 6 } + } + }], + range: [13, 40], + loc: { + start: { line: 1, column: 13 }, + end: { line: 2, column: 8 } + } + }, + range: [0, 40], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 8 } + } + }, + + 'while (true) { break /* Multiline\nComment */there; }': { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [7, 11], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 11 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'BreakStatement', + label: null, + range: [15, 20], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 20 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'there', + range: [44, 49], + loc: { + start: { line: 2, column: 10 }, + end: { line: 2, column: 15 } + } + }, + range: [44, 50], + loc: { + start: { line: 2, column: 10 }, + end: { line: 2, column: 16 } + } + }], + range: [13, 52], + loc: { + start: { line: 1, column: 13 }, + end: { line: 2, column: 18 } + } + }, + range: [0, 52], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 18 } + } + }, + + '(function(){ return\nx; })': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [ + { + type: 'ReturnStatement', + argument: null, + range: [13, 19], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 19 } + } + }, + { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'x', + range: [20, 21], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 1 } + } + }, + range: [20, 22], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 2 } + } + } + ], + range: [11, 24], + loc: { + start: { line: 1, column: 11 }, + end: { line: 2, column: 4 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 24], + loc: { + start: { line: 1, column: 1 }, + end: { line: 2, column: 4 } + } + }, + range: [0, 25], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 5 } + } + }, + + '(function(){ return // Comment\nx; })': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [ + { + type: 'ReturnStatement', + argument: null, + range: [13, 19], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 19 } + } + }, + { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'x', + range: [31, 32], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 1 } + } + }, + range: [31, 33], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 2 } + } + } + ], + range: [11, 35], + loc: { + start: { line: 1, column: 11 }, + end: { line: 2, column: 4 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 35], + loc: { + start: { line: 1, column: 1 }, + end: { line: 2, column: 4 } + } + }, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 5 } + } + }, + + '(function(){ return/* Multiline\nComment */x; })': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [ + { + type: 'ReturnStatement', + argument: null, + range: [13, 19], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 19 } + } + }, + { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'x', + range: [42, 43], + loc: { + start: { line: 2, column: 10 }, + end: { line: 2, column: 11 } + } + }, + range: [42, 44], + loc: { + start: { line: 2, column: 10 }, + end: { line: 2, column: 12 } + } + } + ], + range: [11, 46], + loc: { + start: { line: 1, column: 11 }, + end: { line: 2, column: 14 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 46], + loc: { + start: { line: 1, column: 1 }, + end: { line: 2, column: 14 } + } + }, + range: [0, 47], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 15 } + } + }, + + '{ throw error\nerror; }': { + type: 'BlockStatement', + body: [{ + type: 'ThrowStatement', + argument: { + type: 'Identifier', + name: 'error', + range: [8, 13], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 13 } + } + }, + range: [2, 14], + loc: { + start: { line: 1, column: 2 }, + end: { line: 2, column: 0 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'error', + range: [14, 19], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 5 } + } + }, + range: [14, 20], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 6 } + } + }], + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 8 } + } + }, + + '{ throw error// Comment\nerror; }': { + type: 'BlockStatement', + body: [{ + type: 'ThrowStatement', + argument: { + type: 'Identifier', + name: 'error', + range: [8, 13], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 13 } + } + }, + range: [2, 24], + loc: { + start: { line: 1, column: 2 }, + end: { line: 2, column: 0 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'error', + range: [24, 29], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 5 } + } + }, + range: [24, 30], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 6 } + } + }], + range: [0, 32], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 8 } + } + }, + + '{ throw error/* Multiline\nComment */error; }': { + type: 'BlockStatement', + body: [{ + type: 'ThrowStatement', + argument: { + type: 'Identifier', + name: 'error', + range: [8, 13], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 13 } + } + }, + range: [2, 36], + loc: { + start: { line: 1, column: 2 }, + end: { line: 2, column: 10 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'error', + range: [36, 41], + loc: { + start: { line: 2, column: 10 }, + end: { line: 2, column: 15 } + } + }, + range: [36, 42], + loc: { + start: { line: 2, column: 10 }, + end: { line: 2, column: 16 } + } + }], + range: [0, 44], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 18 } + } + } + + }, + + 'Source elements': { + + '': { + type: 'Program', + body: [], + range: [0, 0], + loc: { + start: { line: 0, column: 0 }, + end: { line: 0, column: 0 } + }, + tokens: [] + } + }, + + 'Source option': { + 'x + y - z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '-', + left: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 }, + source: '42.js' + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 }, + source: '42.js' + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 }, + source: '42.js' + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 }, + source: '42.js' + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 }, + source: '42.js' + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 }, + source: '42.js' + } + }, + + 'a + (b < (c * d)) + e': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'Identifier', + name: 'a', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 }, + source: '42.js' + } + }, + right: { + type: 'BinaryExpression', + operator: '<', + left: { + type: 'Identifier', + name: 'b', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 }, + source: '42.js' + } + }, + right: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'Identifier', + name: 'c', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 }, + source: '42.js' + } + }, + right: { + type: 'Identifier', + name: 'd', + range: [14, 15], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 15 }, + source: '42.js' + } + }, + range: [10, 15], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 15 }, + source: '42.js' + } + }, + range: [5, 16], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 16 }, + source: '42.js' + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 }, + source: '42.js' + } + }, + right: { + type: 'Identifier', + name: 'e', + range: [20, 21], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 21 }, + source: '42.js' + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 }, + source: '42.js' + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 }, + source: '42.js' + } + } + + }, + + + 'Invalid syntax': { + + '{': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Unexpected end of input' + }, + + '}': { + index: 0, + lineNumber: 1, + column: 1, + message: 'Error: Line 1: Unexpected token }' + }, + + '3ea': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '3in []': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '3e': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '3e+': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '3e-': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '3x': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '3x0': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0x': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '09': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '018': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '01a': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '3in[]': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0x3in[]': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '"Hello\nWorld"': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + 'x\\': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + 'x\\u005c': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + 'x\\u002a': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + 'var x = /(s/g': { + index: 13, + lineNumber: 1, + column: 14, + message: 'Error: Line 1: Invalid regular expression' + }, + + 'a\\u': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '\\ua': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '/': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Invalid regular expression: missing /' + }, + + '/test': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Invalid regular expression: missing /' + }, + + 'var x = /[a-z]/\\ux': { + index: 18, + lineNumber: 1, + column: 19, + message: 'Error: Line 1: Invalid regular expression' + }, + + '3 = 4': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + 'func() = 4': { + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + '(1 + 1) = 10': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + '1++': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + '1--': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + '++1': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + '--1': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + 'for((1 + 1) in list) process(x);': { + index: 11, + lineNumber: 1, + column: 12, + message: 'Error: Line 1: Invalid left-hand side in for-in' + }, + + '[': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Unexpected end of input' + }, + + '[,': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected end of input' + }, + + '1 + {': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Unexpected end of input' + }, + + '1 + { t:t ': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Unexpected end of input' + }, + + '1 + { t:t,': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Unexpected end of input' + }, + + 'var x = /\n/': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Invalid regular expression: missing /' + }, + + 'var x = "\n': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + 'var if = 42': { + index: 4, + lineNumber: 1, + column: 5, + message: 'Error: Line 1: Unexpected token if' + }, + + 'i #= 42': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + 'i + 2 = 42': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + '+i = 42': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + '1 + (': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Unexpected end of input' + }, + + '\n\n\n{': { + index: 4, + lineNumber: 4, + column: 2, + message: 'Error: Line 4: Unexpected end of input' + }, + + '\n/* Some multiline\ncomment */\n)': { + index: 30, + lineNumber: 4, + column: 1, + message: 'Error: Line 4: Unexpected token )' + }, + + '{ set 1 }': { + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Unexpected number' + }, + + '{ get 2 }': { + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Unexpected number' + }, + + '({ set: s(if) { } })': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Unexpected token if' + }, + + '({ set s(.) { } })': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token .' + }, + + '({ set: s() { } })': { + index: 12, + lineNumber: 1, + column: 13, + message: 'Error: Line 1: Unexpected token {' + }, + + '({ set: s(a, b) { } })': { + index: 16, + lineNumber: 1, + column: 17, + message: 'Error: Line 1: Unexpected token {' + }, + + '({ get: g(d) { } })': { + index: 13, + lineNumber: 1, + column: 14, + message: 'Error: Line 1: Unexpected token {' + }, + + '({ get i() { }, i: 42 })': { + index: 21, + lineNumber: 1, + column: 22, + message: 'Error: Line 1: Object literal may not have data and accessor property with the same name' + }, + + '({ i: 42, get i() { } })': { + index: 21, + lineNumber: 1, + column: 22, + message: 'Error: Line 1: Object literal may not have data and accessor property with the same name' + }, + + '({ set i(x) { }, i: 42 })': { + index: 22, + lineNumber: 1, + column: 23, + message: 'Error: Line 1: Object literal may not have data and accessor property with the same name' + }, + + '({ i: 42, set i(x) { } })': { + index: 22, + lineNumber: 1, + column: 23, + message: 'Error: Line 1: Object literal may not have data and accessor property with the same name' + }, + + '({ get i() { }, get i() { } })': { + index: 27, + lineNumber: 1, + column: 28, + message: 'Error: Line 1: Object literal may not have multiple get/set accessors with the same name' + }, + + '({ set i(x) { }, set i(x) { } })': { + index: 29, + lineNumber: 1, + column: 30, + message: 'Error: Line 1: Object literal may not have multiple get/set accessors with the same name' + }, + + 'function t(if) { }': { + index: 11, + lineNumber: 1, + column: 12, + message: 'Error: Line 1: Unexpected token if' + }, + + 'function t(true) { }': { + index: 11, + lineNumber: 1, + column: 12, + message: 'Error: Line 1: Unexpected token true' + }, + + 'function t(false) { }': { + index: 11, + lineNumber: 1, + column: 12, + message: 'Error: Line 1: Unexpected token false' + }, + + 'function t(null) { }': { + index: 11, + lineNumber: 1, + column: 12, + message: 'Error: Line 1: Unexpected token null' + }, + + 'function null() { }': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token null' + }, + + 'function true() { }': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token true' + }, + + 'function false() { }': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token false' + }, + + 'function if() { }': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token if' + }, + + 'a b;': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected identifier' + }, + + 'if.a;': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token .' + }, + + 'a if;': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token if' + }, + + 'a class;': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected reserved word' + }, + + 'break\n': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Illegal break statement' + }, + + 'break 1;': { + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Unexpected number' + }, + + 'continue\n': { + index: 8, + lineNumber: 1, + column: 9, + message: 'Error: Line 1: Illegal continue statement' + }, + + 'continue 2;': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected number' + }, + + 'throw': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Unexpected end of input' + }, + + 'throw;': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Unexpected token ;' + }, + + 'throw\n': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Illegal newline after throw' + }, + + 'for (var i, i2 in {});': { + index: 15, + lineNumber: 1, + column: 16, + message: 'Error: Line 1: Unexpected token in' + }, + + 'for ((i in {}));': { + index: 14, + lineNumber: 1, + column: 15, + message: 'Error: Line 1: Unexpected token )' + }, + + 'for (i + 1 in {});': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Invalid left-hand side in for-in' + }, + + 'for (+i in {});': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Invalid left-hand side in for-in' + }, + + 'if(false)': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected end of input' + }, + + 'if(false) doThis(); else': { + index: 24, + lineNumber: 1, + column: 25, + message: 'Error: Line 1: Unexpected end of input' + }, + + 'do': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected end of input' + }, + + 'while(false)': { + index: 12, + lineNumber: 1, + column: 13, + message: 'Error: Line 1: Unexpected end of input' + }, + + 'for(;;)': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Unexpected end of input' + }, + + 'with(x)': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Unexpected end of input' + }, + + 'try { }': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Missing catch or finally after try' + }, + + '\u203F = 10': { + index: 0, + lineNumber: 1, + column: 1, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + 'const x = 12, y;': { + index: 15, + lineNumber: 1, + column: 16, + message: 'Error: Line 1: Const must be initialized' + }, + + 'const x, y = 12;': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Const must be initialized' + }, + + 'const x;': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Const must be initialized' + }, + + 'if(true) let a = 1;': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token let' + }, + + 'if(true) const a = 1;': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token const' + }, + + 'switch (c) { default: default: }': { + index: 30, + lineNumber: 1, + column: 31, + message: 'Error: Line 1: More than one default clause in switch statement' + }, + + 'new X()."s"': { + index: 8, + lineNumber: 1, + column: 9, + message: 'Error: Line 1: Unexpected string' + }, + + '/*': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '/*\n\n\n': { + index: 5, + lineNumber: 4, + column: 1, + message: 'Error: Line 4: Unexpected token ILLEGAL' + }, + + '/**': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '/*\n\n*': { + index: 5, + lineNumber: 3, + column: 2, + message: 'Error: Line 3: Unexpected token ILLEGAL' + }, + + '/*hello': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '/*hello *': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '\n]': { + index: 1, + lineNumber: 2, + column: 1, + message: 'Error: Line 2: Unexpected token ]' + }, + + '\r]': { + index: 1, + lineNumber: 2, + column: 1, + message: 'Error: Line 2: Unexpected token ]' + }, + + '\r\n]': { + index: 2, + lineNumber: 2, + column: 1, + message: 'Error: Line 2: Unexpected token ]' + }, + + '\n\r]': { + index: 2, + lineNumber: 3, + column: 1, + message: 'Error: Line 3: Unexpected token ]' + }, + + '//\r\n]': { + index: 4, + lineNumber: 2, + column: 1, + message: 'Error: Line 2: Unexpected token ]' + }, + + '//\n\r]': { + index: 4, + lineNumber: 3, + column: 1, + message: 'Error: Line 3: Unexpected token ]' + }, + + '/a\\\n/': { + index: 4, + lineNumber: 1, + column: 5, + message: 'Error: Line 1: Invalid regular expression: missing /' + }, + + '//\r \n]': { + index: 5, + lineNumber: 3, + column: 1, + message: 'Error: Line 3: Unexpected token ]' + }, + + '/*\r\n*/]': { + index: 6, + lineNumber: 2, + column: 3, + message: 'Error: Line 2: Unexpected token ]' + }, + + '/*\n\r*/]': { + index: 6, + lineNumber: 3, + column: 3, + message: 'Error: Line 3: Unexpected token ]' + }, + + '/*\r \n*/]': { + index: 7, + lineNumber: 3, + column: 3, + message: 'Error: Line 3: Unexpected token ]' + }, + + '\\\\': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '\\u005c': { + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + + '\\x': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '\\u0000': { + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '\u200C = []': { + index: 0, + lineNumber: 1, + column: 1, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '\u200D = []': { + index: 0, + lineNumber: 1, + column: 1, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '"\\': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '"\\u': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + 'try { } catch() {}': { + index: 14, + lineNumber: 1, + column: 15, + message: 'Error: Line 1: Unexpected token )' + }, + + 'return': { + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Illegal return statement' + }, + + 'break': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Illegal break statement' + }, + + 'continue': { + index: 8, + lineNumber: 1, + column: 9, + message: 'Error: Line 1: Illegal continue statement' + }, + + 'switch (x) { default: continue; }': { + index: 31, + lineNumber: 1, + column: 32, + message: 'Error: Line 1: Illegal continue statement' + }, + + 'do { x } *': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token *' + }, + + 'while (true) { break x; }': { + index: 22, + lineNumber: 1, + column: 23, + message: 'Error: Line 1: Undefined label \'x\'' + }, + + 'while (true) { continue x; }': { + index: 25, + lineNumber: 1, + column: 26, + message: 'Error: Line 1: Undefined label \'x\'' + }, + + 'x: while (true) { (function () { break x; }); }': { + index: 40, + lineNumber: 1, + column: 41, + message: 'Error: Line 1: Undefined label \'x\'' + }, + + 'x: while (true) { (function () { continue x; }); }': { + index: 43, + lineNumber: 1, + column: 44, + message: 'Error: Line 1: Undefined label \'x\'' + }, + + 'x: while (true) { (function () { break; }); }': { + index: 39, + lineNumber: 1, + column: 40, + message: 'Error: Line 1: Illegal break statement' + }, + + 'x: while (true) { (function () { continue; }); }': { + index: 42, + lineNumber: 1, + column: 43, + message: 'Error: Line 1: Illegal continue statement' + }, + + 'x: while (true) { x: while (true) { } }': { + index: 20, + lineNumber: 1, + column: 21, + message: 'Error: Line 1: Label \'x\' has already been declared' + }, + + '(function () { \'use strict\'; delete i; }())': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Delete of an unqualified identifier in strict mode.' + }, + + '(function () { \'use strict\'; with (i); }())': { + index: 28, + lineNumber: 1, + column: 29, + message: 'Error: Line 1: Strict mode code may not include a with statement' + }, + + 'function hello() {\'use strict\'; ({ i: 42, i: 42 }) }': { + index: 47, + lineNumber: 1, + column: 48, + message: 'Error: Line 1: Duplicate data property in object literal not allowed in strict mode' + }, + + 'function hello() {\'use strict\'; ({ hasOwnProperty: 42, hasOwnProperty: 42 }) }': { + index: 73, + lineNumber: 1, + column: 74, + message: 'Error: Line 1: Duplicate data property in object literal not allowed in strict mode' + }, + + 'function hello() {\'use strict\'; var eval = 10; }': { + index: 40, + lineNumber: 1, + column: 41, + message: 'Error: Line 1: Variable name may not be eval or arguments in strict mode' + }, + + 'function hello() {\'use strict\'; var arguments = 10; }': { + index: 45, + lineNumber: 1, + column: 46, + message: 'Error: Line 1: Variable name may not be eval or arguments in strict mode' + }, + + 'function hello() {\'use strict\'; try { } catch (eval) { } }': { + index: 51, + lineNumber: 1, + column: 52, + message: 'Error: Line 1: Catch variable may not be eval or arguments in strict mode' + }, + + 'function hello() {\'use strict\'; try { } catch (arguments) { } }': { + index: 56, + lineNumber: 1, + column: 57, + message: 'Error: Line 1: Catch variable may not be eval or arguments in strict mode' + }, + + 'function hello() {\'use strict\'; eval = 10; }': { + index: 32, + lineNumber: 1, + column: 33, + message: 'Error: Line 1: Assignment to eval or arguments is not allowed in strict mode' + }, + + 'function hello() {\'use strict\'; arguments = 10; }': { + index: 32, + lineNumber: 1, + column: 33, + message: 'Error: Line 1: Assignment to eval or arguments is not allowed in strict mode' + }, + + 'function hello() {\'use strict\'; ++eval; }': { + index: 38, + lineNumber: 1, + column: 39, + message: 'Error: Line 1: Prefix increment/decrement may not have eval or arguments operand in strict mode' + }, + + 'function hello() {\'use strict\'; --eval; }': { + index: 38, + lineNumber: 1, + column: 39, + message: 'Error: Line 1: Prefix increment/decrement may not have eval or arguments operand in strict mode' + }, + + 'function hello() {\'use strict\'; ++arguments; }': { + index: 43, + lineNumber: 1, + column: 44, + message: 'Error: Line 1: Prefix increment/decrement may not have eval or arguments operand in strict mode' + }, + + 'function hello() {\'use strict\'; --arguments; }': { + index: 43, + lineNumber: 1, + column: 44, + message: 'Error: Line 1: Prefix increment/decrement may not have eval or arguments operand in strict mode' + }, + + 'function hello() {\'use strict\'; eval++; }': { + index: 36, + lineNumber: 1, + column: 37, + message: 'Error: Line 1: Postfix increment/decrement may not have eval or arguments operand in strict mode' + }, + + 'function hello() {\'use strict\'; eval--; }': { + index: 36, + lineNumber: 1, + column: 37, + message: 'Error: Line 1: Postfix increment/decrement may not have eval or arguments operand in strict mode' + }, + + 'function hello() {\'use strict\'; arguments++; }': { + index: 41, + lineNumber: 1, + column: 42, + message: 'Error: Line 1: Postfix increment/decrement may not have eval or arguments operand in strict mode' + }, + + 'function hello() {\'use strict\'; arguments--; }': { + index: 41, + lineNumber: 1, + column: 42, + message: 'Error: Line 1: Postfix increment/decrement may not have eval or arguments operand in strict mode' + }, + + 'function hello() {\'use strict\'; function eval() { } }': { + index: 41, + lineNumber: 1, + column: 42, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }, + + 'function hello() {\'use strict\'; function arguments() { } }': { + index: 41, + lineNumber: 1, + column: 42, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }, + + 'function eval() {\'use strict\'; }': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }, + + 'function arguments() {\'use strict\'; }': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }, + + 'function hello() {\'use strict\'; (function eval() { }()) }': { + index: 42, + lineNumber: 1, + column: 43, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }, + + 'function hello() {\'use strict\'; (function arguments() { }()) }': { + index: 42, + lineNumber: 1, + column: 43, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }, + + '(function eval() {\'use strict\'; })()': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }, + + '(function arguments() {\'use strict\'; })()': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }, + + 'function hello() {\'use strict\'; ({ s: function eval() { } }); }': { + index: 47, + lineNumber: 1, + column: 48, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }, + + '(function package() {\'use strict\'; })()': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function hello() {\'use strict\'; ({ i: 10, set s(eval) { } }); }': { + index: 48, + lineNumber: 1, + column: 49, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + 'function hello() {\'use strict\'; ({ set s(eval) { } }); }': { + index: 41, + lineNumber: 1, + column: 42, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + 'function hello() {\'use strict\'; ({ s: function s(eval) { } }); }': { + index: 49, + lineNumber: 1, + column: 50, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + 'function hello(eval) {\'use strict\';}': { + index: 15, + lineNumber: 1, + column: 16, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + 'function hello(arguments) {\'use strict\';}': { + index: 15, + lineNumber: 1, + column: 16, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + 'function hello() { \'use strict\'; function inner(eval) {} }': { + index: 48, + lineNumber: 1, + column: 49, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + 'function hello() { \'use strict\'; function inner(arguments) {} }': { + index: 48, + lineNumber: 1, + column: 49, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + ' "\\1"; \'use strict\';': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }, + + 'function hello() { \'use strict\'; "\\1"; }': { + index: 33, + lineNumber: 1, + column: 34, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }, + + 'function hello() { \'use strict\'; 021; }': { + index: 33, + lineNumber: 1, + column: 34, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }, + + 'function hello() { \'use strict\'; ({ "\\1": 42 }); }': { + index: 36, + lineNumber: 1, + column: 37, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }, + + 'function hello() { \'use strict\'; ({ 021: 42 }); }': { + index: 36, + lineNumber: 1, + column: 37, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }, + + 'function hello() { "octal directive\\1"; "use strict"; }': { + index: 19, + lineNumber: 1, + column: 20, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }, + + 'function hello() { "octal directive\\1"; "octal directive\\2"; "use strict"; }': { + index: 19, + lineNumber: 1, + column: 20, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }, + + 'function hello() { "use strict"; function inner() { "octal directive\\1"; } }': { + index: 52, + lineNumber: 1, + column: 53, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }, + + 'function hello() { "use strict"; var implements; }': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function hello() { "use strict"; var interface; }': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function hello() { "use strict"; var package; }': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function hello() { "use strict"; var private; }': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function hello() { "use strict"; var protected; }': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function hello() { "use strict"; var public; }': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function hello() { "use strict"; var static; }': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function hello() { "use strict"; var yield; }': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function hello() { "use strict"; var let; }': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function hello(static) { "use strict"; }': { + index: 15, + lineNumber: 1, + column: 16, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function static() { "use strict"; }': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function eval(a) { "use strict"; }': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }, + + 'function arguments(a) { "use strict"; }': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }, + + 'var yield': { + index: 4, + lineNumber: 1, + column: 5, + message: 'Error: Line 1: Unexpected token yield' + }, + + 'var let': { + index: 4, + lineNumber: 1, + column: 5, + message: 'Error: Line 1: Unexpected token let' + }, + + '"use strict"; function static() { }': { + index: 23, + lineNumber: 1, + column: 24, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function a(t, t) { "use strict"; }': { + index: 14, + lineNumber: 1, + column: 15, + message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' + }, + + 'function a(eval) { "use strict"; }': { + index: 11, + lineNumber: 1, + column: 12, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + 'function a(package) { "use strict"; }': { + index: 11, + lineNumber: 1, + column: 12, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function a() { "use strict"; function b(t, t) { }; }': { + index: 43, + lineNumber: 1, + column: 44, + message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' + }, + + '(function a(t, t) { "use strict"; })': { + index: 15, + lineNumber: 1, + column: 16, + message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' + }, + + 'function a() { "use strict"; (function b(t, t) { }); }': { + index: 44, + lineNumber: 1, + column: 45, + message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' + }, + + '(function a(eval) { "use strict"; })': { + index: 12, + lineNumber: 1, + column: 13, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + '(function a(package) { "use strict"; })': { + index: 12, + lineNumber: 1, + column: 13, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + '__proto__: __proto__: 42;': { + index: 21, + lineNumber: 1, + column: 22, + message: 'Error: Line 1: Label \'__proto__\' has already been declared' + }, + + '"use strict"; function t(__proto__, __proto__) { }': { + index: 36, + lineNumber: 1, + column: 37, + message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' + }, + + '"use strict"; x = { __proto__: 42, __proto__: 43 }': { + index: 48, + lineNumber: 1, + column: 49, + message: 'Error: Line 1: Duplicate data property in object literal not allowed in strict mode' + }, + + '"use strict"; x = { get __proto__() { }, __proto__: 43 }': { + index: 54, + lineNumber: 1, + column: 55, + message: 'Error: Line 1: Object literal may not have data and accessor property with the same name' + }, + + 'var': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected end of input' + }, + + 'let': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected end of input' + }, + + 'const': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Unexpected end of input' + }, + + '{ ; ; ': { + index: 8, + lineNumber: 1, + column: 9, + message: 'Error: Line 1: Unexpected end of input' + }, + + 'function t() { ; ; ': { + index: 21, + lineNumber: 1, + column: 22, + message: 'Error: Line 1: Unexpected end of input' + } + + }, + + 'Tokenize': { + 'tokenize(/42/)': [ + { + "type": "Identifier", + "value": "tokenize", + "range": [ + 0, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 8, + 9 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 13, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + { + "type": "RegularExpression", + "value": "/42/", + "range": [ + 9, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 13, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + } + } + ], + + 'if (false) { /42/ }': [ + { + "type": "Keyword", + "value": "if", + "range": [ + 0, + 2 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 3, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + { + "type": "Boolean", + "value": "false", + "range": [ + 4, + 9 + ], + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 9, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 11, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 18, + 19 + ], + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 19 + } + } + }, + { + "type": "RegularExpression", + "value": "/42/", + "range": [ + 13, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 18, + 19 + ], + "loc": { + "start": { + "line": 1, + "column": 18 + }, + "end": { + "line": 1, + "column": 19 + } + } + } + ], + + 'with (false) /42/': [ + { + "type": "Keyword", + "value": "with", + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 5, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "Boolean", + "value": "false", + "range": [ + 6, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 11, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "RegularExpression", + "value": "/42/", + "range": [ + 13, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 17 + } + } + } + ], + + '(false) /42/': [ + { + "type": "Punctuator", + "value": "(", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "Boolean", + "value": "false", + "range": [ + 1, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 6 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 6, + 7 + ], + "loc": { + "start": { + "line": 1, + "column": 6 + }, + "end": { + "line": 1, + "column": 7 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 8, + 9 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 9 + } + } + }, + { + "type": "Numeric", + "value": "42", + "range": [ + 9, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 11, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + } + } + } + ], + + 'function f(){} /42/': [ + { + "type": "Keyword", + "value": "function", + "range": [ + 0, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Identifier", + "value": "f", + "range": [ + 9, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 10, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 11, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 12, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 13, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + { + "type": "RegularExpression", + "value": "/42/", + "range": [ + 15, + 19 + ], + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 19 + } + } + } + ], + + 'function(){} /42': [ + { + "type": "Keyword", + "value": "function", + "range": [ + 0, + 8 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 8 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 8, + 9 + ], + "loc": { + "start": { + "line": 1, + "column": 8 + }, + "end": { + "line": 1, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 9, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 10, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 11, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 13, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + { + "type": "Numeric", + "value": "42", + "range": [ + 14, + 16 + ], + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 16 + } + } + } + ], + + '{} /42': [ + { + "type": "Punctuator", + "value": "{", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 1, + 2 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 2 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 3, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + { + "type": "Numeric", + "value": "42", + "range": [ + 4, + 6 + ], + "loc": { + "start": { + "line": 1, + "column": 4 + }, + "end": { + "line": 1, + "column": 6 + } + } + } + ], + + '[function(){} /42]': [ + { + "type": "Punctuator", + "value": "[", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "Keyword", + "value": "function", + "range": [ + 1, + 9 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 9 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 9, + 10 + ], + "loc": { + "start": { + "line": 1, + "column": 9 + }, + "end": { + "line": 1, + "column": 10 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 10, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 11, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 12, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "/", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + { + "type": "Numeric", + "value": "42", + "range": [ + 15, + 17 + ], + "loc": { + "start": { + "line": 1, + "column": 15 + }, + "end": { + "line": 1, + "column": 17 + } + } + }, + { + "type": "Punctuator", + "value": "]", + "range": [ + 17, + 18 + ], + "loc": { + "start": { + "line": 1, + "column": 17 + }, + "end": { + "line": 1, + "column": 18 + } + } + } + ], + + ';function f(){} /42/': [ + { + "type": "Punctuator", + "value": ";", + "range": [ + 0, + 1 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 1 + } + } + }, + { + "type": "Keyword", + "value": "function", + "range": [ + 1, + 9 + ], + "loc": { + "start": { + "line": 1, + "column": 1 + }, + "end": { + "line": 1, + "column": 9 + } + } + }, + { + "type": "Identifier", + "value": "f", + "range": [ + 10, + 11 + ], + "loc": { + "start": { + "line": 1, + "column": 10 + }, + "end": { + "line": 1, + "column": 11 + } + } + }, + { + "type": "Punctuator", + "value": "(", + "range": [ + 11, + 12 + ], + "loc": { + "start": { + "line": 1, + "column": 11 + }, + "end": { + "line": 1, + "column": 12 + } + } + }, + { + "type": "Punctuator", + "value": ")", + "range": [ + 12, + 13 + ], + "loc": { + "start": { + "line": 1, + "column": 12 + }, + "end": { + "line": 1, + "column": 13 + } + } + }, + { + "type": "Punctuator", + "value": "{", + "range": [ + 13, + 14 + ], + "loc": { + "start": { + "line": 1, + "column": 13 + }, + "end": { + "line": 1, + "column": 14 + } + } + }, + { + "type": "Punctuator", + "value": "}", + "range": [ + 14, + 15 + ], + "loc": { + "start": { + "line": 1, + "column": 14 + }, + "end": { + "line": 1, + "column": 15 + } + } + }, + { + "type": "RegularExpression", + "value": "/42/", + "range": [ + 16, + 20 + ], + "loc": { + "start": { + "line": 1, + "column": 16 + }, + "end": { + "line": 1, + "column": 20 + } + } + } + ], + + 'void /42/': [ + { + "type": "Keyword", + "value": "void", + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + }, + { + "type": "RegularExpression", + "value": "/42/", + "range": [ + 5, + 9 + ], + "loc": { + "start": { + "line": 1, + "column": 5 + }, + "end": { + "line": 1, + "column": 9 + } + } + } + ], + + '/42/': [ + { + "type": "RegularExpression", + "value": "/42/", + "range": [ + 0, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 4 + } + } + } + ], + + 'foo[/42]': [ + { + "type": "Identifier", + "value": "foo", + "range": [ + 0, + 3 + ], + "loc": { + "start": { + "line": 1, + "column": 0 + }, + "end": { + "line": 1, + "column": 3 + } + } + }, + { + "type": "Punctuator", + "value": "[", + "range": [ + 3, + 4 + ], + "loc": { + "start": { + "line": 1, + "column": 3 + }, + "end": { + "line": 1, + "column": 4 + } + } + } + ], + + '': [], + + '/42': { + tokenize: true, + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Invalid regular expression: missing /' + }, + + 'foo[/42': { + tokenize: true, + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Invalid regular expression: missing /' + } + + }, + + 'API': { + 'parse()': { + call: 'parse', + args: [], + result: { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'undefined' + } + }] + } + }, + + 'parse(null)': { + call: 'parse', + args: [null], + result: { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: null, + raw: 'null' + } + }] + } + }, + + 'parse(42)': { + call: 'parse', + args: [42], + result: { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42' + } + }] + } + }, + + 'parse(true)': { + call: 'parse', + args: [true], + result: { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: true, + raw: 'true' + } + }] + } + }, + + 'parse(undefined)': { + call: 'parse', + args: [void 0], + result: { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'undefined' + } + }] + } + }, + + 'parse(new String("test"))': { + call: 'parse', + args: [new String('test')], + result: { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'test' + } + }] + } + }, + + 'parse(new Number(42))': { + call: 'parse', + args: [new Number(42)], + result: { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42' + } + }] + } + }, + + 'parse(new Boolean(true))': { + call: 'parse', + args: [new Boolean(true)], + result: { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: true, + raw: 'true' + } + }] + } + }, + + 'Syntax': { + property: 'Syntax', + result: { + ArrayExpression: 'ArrayExpression', + ArrayPattern: 'ArrayPattern', + ArrowFunctionExpression: 'ArrowFunctionExpression', + AssignmentExpression: 'AssignmentExpression', + BinaryExpression: 'BinaryExpression', + BlockStatement: 'BlockStatement', + BreakStatement: 'BreakStatement', + CallExpression: 'CallExpression', + CatchClause: 'CatchClause', + ClassBody: 'ClassBody', + ClassDeclaration: 'ClassDeclaration', + ClassExpression: 'ClassExpression', + ClassHeritage: 'ClassHeritage', + ComprehensionBlock: 'ComprehensionBlock', + ComprehensionExpression: 'ComprehensionExpression', + ConditionalExpression: 'ConditionalExpression', + ContinueStatement: 'ContinueStatement', + DebuggerStatement: 'DebuggerStatement', + DoWhileStatement: 'DoWhileStatement', + EmptyStatement: 'EmptyStatement', + ExportDeclaration: 'ExportDeclaration', + ExportBatchSpecifier: 'ExportBatchSpecifier', + ExportSpecifier: 'ExportSpecifier', + ExpressionStatement: 'ExpressionStatement', + ForInStatement: 'ForInStatement', + ForOfStatement: 'ForOfStatement', + ForStatement: 'ForStatement', + FunctionDeclaration: 'FunctionDeclaration', + FunctionExpression: 'FunctionExpression', + Identifier: 'Identifier', + IfStatement: 'IfStatement', + ImportDeclaration: 'ImportDeclaration', + ImportSpecifier: 'ImportSpecifier', + LabeledStatement: 'LabeledStatement', + Literal: 'Literal', + LogicalExpression: 'LogicalExpression', + MemberExpression: 'MemberExpression', + MethodDefinition: 'MethodDefinition', + ModuleDeclaration: 'ModuleDeclaration', + NewExpression: 'NewExpression', + ObjectExpression: 'ObjectExpression', + ObjectPattern: 'ObjectPattern', + Program: 'Program', + Property: 'Property', + ReturnStatement: 'ReturnStatement', + SequenceExpression: 'SequenceExpression', + SpreadElement: 'SpreadElement', + SwitchCase: 'SwitchCase', + SwitchStatement: 'SwitchStatement', + TaggedTemplateExpression: 'TaggedTemplateExpression', + TemplateElement: 'TemplateElement', + TemplateLiteral: 'TemplateLiteral', + ThisExpression: 'ThisExpression', + ThrowStatement: 'ThrowStatement', + TryStatement: 'TryStatement', + TypeAnnotatedIdentifier: 'TypeAnnotatedIdentifier', + TypeAnnotation: 'TypeAnnotation', + UnaryExpression: 'UnaryExpression', + UpdateExpression: 'UpdateExpression', + VariableDeclaration: 'VariableDeclaration', + VariableDeclarator: 'VariableDeclarator', + WhileStatement: 'WhileStatement', + WithStatement: 'WithStatement', + XJSIdentifier: 'XJSIdentifier', + XJSEmptyExpression: "XJSEmptyExpression", + XJSExpressionContainer: "XJSExpressionContainer", + XJSElement: 'XJSElement', + XJSClosingElement: 'XJSClosingElement', + XJSOpeningElement: 'XJSOpeningElement', + XJSAttribute: "XJSAttribute", + XJSText: 'XJSText', + YieldExpression: 'YieldExpression' + } + }, + + 'tokenize()': { + call: 'tokenize', + args: [], + result: [{ + type: 'Identifier', + value: 'undefined' + }] + }, + + 'tokenize(null)': { + call: 'tokenize', + args: [null], + result: [{ + type: 'Null', + value: 'null' + }] + }, + + 'tokenize(42)': { + call: 'tokenize', + args: [42], + result: [{ + type: 'Numeric', + value: '42' + }] + }, + + 'tokenize(true)': { + call: 'tokenize', + args: [true], + result: [{ + type: 'Boolean', + value: 'true' + }] + }, + + 'tokenize(undefined)': { + call: 'tokenize', + args: [void 0], + result: [{ + type: 'Identifier', + value: 'undefined' + }] + }, + + 'tokenize(new String("test"))': { + call: 'tokenize', + args: [new String('test')], + result: [{ + type: 'Identifier', + value: 'test' + }] + }, + + 'tokenize(new Number(42))': { + call: 'tokenize', + args: [new Number(42)], + result: [{ + type: 'Numeric', + value: '42' + }] + }, + + 'tokenize(new Boolean(true))': { + call: 'tokenize', + args: [new Boolean(true)], + result: [{ + type: 'Boolean', + value: 'true' + }] + }, + + }, + + 'Tolerant parse': { + 'return': { + type: 'Program', + body: [{ + type: 'ReturnStatement', + 'argument': null, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }], + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + }, + errors: [{ + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Illegal return statement' + }] + }, + + '(function () { \'use strict\'; with (i); }())': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '\'use strict\'', + range: [15, 27], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 27 } + } + }, + range: [15, 28], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 28 } + } + }, { + type: 'WithStatement', + object: { + type: 'Identifier', + name: 'i', + range: [35, 36], + loc: { + start: { line: 1, column: 35 }, + end: { line: 1, column: 36 } + } + }, + body: { + type: 'EmptyStatement', + range: [37, 38], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 38 } + } + }, + range: [29, 38], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 38 } + } + }], + range: [13, 40], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 40 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 40], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 40 } + } + }, + 'arguments': [], + range: [1, 42], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 42 } + } + }, + range: [0, 43], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 43 } + } + }], + range: [0, 43], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 43 } + }, + errors: [{ + index: 29, + lineNumber: 1, + column: 30, + message: 'Error: Line 1: Strict mode code may not include a with statement' + }] + }, + + '(function () { \'use strict\'; 021 }())': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '\'use strict\'', + range: [15, 27], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 27 } + } + }, + range: [15, 28], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 28 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 17, + raw: "021", + range: [29, 32], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 32 } + } + }, + range: [29, 33], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 33 } + } + }], + range: [13, 34], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 34 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 34], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 34 } + } + }, + 'arguments': [], + range: [1, 36], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 36 } + } + }, + range: [0, 37], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 37 } + } + }], + range: [0, 37], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 37 } + }, + errors: [{ + index: 29, + lineNumber: 1, + column: 30, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }] + }, + + '"use strict"; delete x': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'UnaryExpression', + operator: 'delete', + argument: { + type: 'Identifier', + name: 'x', + range: [21, 22], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 22 } + } + }, + range: [14, 22], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 22 } + } + }, + range: [14, 22], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 22 } + } + }], + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + }, + errors: [{ + index: 22, + lineNumber: 1, + column: 23, + message: 'Error: Line 1: Delete of an unqualified identifier in strict mode.' + }] + }, + + '"use strict"; try {} catch (eval) {}': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'TryStatement', + block: { + type: 'BlockStatement', + body: [], + range: [18, 20], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 20 } + } + }, + guardedHandlers: [], + handlers: [{ + type: 'CatchClause', + param: { + type: 'Identifier', + name: 'eval', + range: [28, 32], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 32 } + } + }, + body: { + type: 'BlockStatement', + body: [], + range: [34, 36], + loc: { + start: { line: 1, column: 34 }, + end: { line: 1, column: 36 } + } + }, + range: [21, 36], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 36 } + } + }], + finalizer: null, + range: [14, 36], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 36 } + } + }], + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + }, + errors: [{ + index: 32, + lineNumber: 1, + column: 33, + message: 'Error: Line 1: Catch variable may not be eval or arguments in strict mode' + }] + }, + + '"use strict"; try {} catch (arguments) {}': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'TryStatement', + block: { + type: 'BlockStatement', + body: [], + range: [18, 20], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 20 } + } + }, + guardedHandlers: [], + handlers: [{ + type: 'CatchClause', + param: { + type: 'Identifier', + name: 'arguments', + range: [28, 37], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 37 } + } + }, + body: { + type: 'BlockStatement', + body: [], + range: [39, 41], + loc: { + start: { line: 1, column: 39 }, + end: { line: 1, column: 41 } + } + }, + range: [21, 41], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 41 } + } + }], + finalizer: null, + range: [14, 41], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 41 } + } + }], + range: [0, 41], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 41 } + }, + errors: [{ + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Catch variable may not be eval or arguments in strict mode' + }] + }, + + '"use strict"; var eval;': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'eval', + range: [18, 22], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 22 } + } + }, + init: null, + range: [18, 22], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 22 } + } + }], + kind: 'var', + range: [14, 23], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 23 } + } + }], + range: [0, 23], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 23 } + }, + errors: [{ + index: 22, + lineNumber: 1, + column: 23, + message: 'Error: Line 1: Variable name may not be eval or arguments in strict mode' + }] + }, + + '"use strict"; var arguments;': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'arguments', + range: [18, 27], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 27 } + } + }, + init: null, + range: [18, 27], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 27 } + } + }], + kind: 'var', + range: [14, 28], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 28 } + } + }], + range: [0, 28], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 28 } + }, + errors: [{ + index: 27, + lineNumber: 1, + column: 28, + message: 'Error: Line 1: Variable name may not be eval or arguments in strict mode' + }] + }, + + '"use strict"; eval = 0;': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'eval', + range: [14, 18], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 18 } + } + }, + right: { + type: 'Literal', + value: 0, + raw: '0', + range: [21, 22], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 22 } + } + }, + range: [14, 22], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 22 } + } + }, + range: [14, 23], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 23 } + } + }], + range: [0, 23], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 23 } + }, + errors: [{ + index: 14, + lineNumber: 1, + column: 15, + message: 'Error: Line 1: Assignment to eval or arguments is not allowed in strict mode' + }] + }, + + '"use strict"; eval++;': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'eval', + range: [14, 18], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 18 } + } + }, + prefix: false, + range: [14, 20], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 20 } + } + }, + range: [14, 21], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 21 } + } + }], + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + }, + errors: [{ + index: 18, + lineNumber: 1, + column: 19, + message: 'Error: Line 1: Postfix increment/decrement may not have eval or arguments operand in strict mode' + }] + }, + + '"use strict"; --eval;': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '--', + argument: { + type: 'Identifier', + name: 'eval', + range: [16, 20], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 20 } + } + }, + prefix: true, + range: [14, 20], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 20 } + } + }, + range: [14, 21], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 21 } + } + }], + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + }, + errors: [{ + index: 20, + lineNumber: 1, + column: 21, + message: 'Error: Line 1: Prefix increment/decrement may not have eval or arguments operand in strict mode' + }] + }, + + '"use strict"; arguments = 0;': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'arguments', + range: [14, 23], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 23 } + } + }, + right: { + type: 'Literal', + value: 0, + raw: '0', + range: [26, 27], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 27 } + } + }, + range: [14, 27], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 27 } + } + }, + range: [14, 28], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 28 } + } + }], + range: [0, 28], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 28 } + }, + errors: [{ + index: 14, + lineNumber: 1, + column: 15, + message: 'Error: Line 1: Assignment to eval or arguments is not allowed in strict mode' + }] + }, + + '"use strict"; arguments--;': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '--', + argument: { + type: 'Identifier', + name: 'arguments', + range: [14, 23], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 23 } + } + }, + prefix: false, + range: [14, 25], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 25 } + } + }, + range: [14, 26], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 26 } + } + }], + range: [0, 26], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 26 } + }, + errors: [{ + index: 23, + lineNumber: 1, + column: 24, + message: 'Error: Line 1: Postfix increment/decrement may not have eval or arguments operand in strict mode' + }] + }, + + '"use strict"; ++arguments;': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'arguments', + range: [16, 25], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 25 } + } + }, + prefix: true, + range: [14, 25], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 25 } + } + }, + range: [14, 26], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 26 } + } + }], + range: [0, 26], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 26 } + }, + errors: [{ + index: 25, + lineNumber: 1, + column: 26, + message: 'Error: Line 1: Prefix increment/decrement may not have eval or arguments operand in strict mode' + }] + }, + + + '"use strict";x={y:1,y:1}': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'y', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }, + value: { + type: 'Literal', + value: 1, + raw: '1', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [16, 19], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 19 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'y', + range: [20, 21], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 21 } + } + }, + value: { + type: 'Literal', + value: 1, + raw: '1', + range: [22, 23], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 23 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [20, 23], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 23 } + } + }], + range: [15, 24], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 24 } + } + }, + range: [13, 24], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 24 } + } + }, + range: [13, 24], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 24 } + } + }], + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + }, + errors: [{ + index: 23, + lineNumber: 1, + column: 24, + message: 'Error: Line 1: Duplicate data property in object literal not allowed in strict mode' + }] + }, + + '"use strict"; function eval() {};': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'eval', + range: [23, 27], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 27 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [30, 32], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 32 } + } + }, + rest: null, + generator: false, + expression: false, + range: [14, 32], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 32 } + } + }, { + type: 'EmptyStatement', + range: [32, 33], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 33 } + } + }], + range: [0, 33], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 33 } + }, + errors: [{ + index: 23, + lineNumber: 1, + column: 24, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }] + }, + + '"use strict"; function arguments() {};': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'arguments', + range: [23, 32], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 32 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [35, 37], + loc: { + start: { line: 1, column: 35 }, + end: { line: 1, column: 37 } + } + }, + rest: null, + generator: false, + expression: false, + range: [14, 37], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 37 } + } + }, { + type: 'EmptyStatement', + range: [37, 38], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 38 } + } + }], + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + }, + errors: [{ + index: 23, + lineNumber: 1, + column: 24, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }] + }, + + '"use strict"; function interface() {};': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'interface', + range: [23, 32], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 32 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [35, 37], + loc: { + start: { line: 1, column: 35 }, + end: { line: 1, column: 37 } + } + }, + rest: null, + generator: false, + expression: false, + range: [14, 37], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 37 } + } + }, { + type: 'EmptyStatement', + range: [37, 38], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 38 } + } + }], + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + }, + errors: [{ + index: 23, + lineNumber: 1, + column: 24, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }] + }, + + '"use strict"; (function eval() {});': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'eval', + range: [24, 28], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 28 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [31, 33], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 33 } + } + }, + rest: null, + generator: false, + expression: false, + range: [15, 33], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 33 } + } + }, + range: [14, 35], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 35 } + } + }], + range: [0, 35], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 35 } + }, + errors: [{ + index: 24, + lineNumber: 1, + column: 25, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }] + }, + + '"use strict"; (function arguments() {});': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'arguments', + range: [24, 33], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 33 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [36, 38], + loc: { + start: { line: 1, column: 36 }, + end: { line: 1, column: 38 } + } + }, + rest: null, + generator: false, + expression: false, + range: [15, 38], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 38 } + } + }, + range: [14, 40], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 40 } + } + }], + range: [0, 40], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 40 } + }, + errors: [{ + index: 24, + lineNumber: 1, + column: 25, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }] + }, + + '"use strict"; (function interface() {});': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'interface', + range: [24, 33], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 33 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [36, 38], + loc: { + start: { line: 1, column: 36 }, + end: { line: 1, column: 38 } + } + }, + rest: null, + generator: false, + expression: false, + range: [15, 38], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 38 } + } + }, + range: [14, 40], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 40 } + } + }], + range: [0, 40], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 40 } + }, + errors: [{ + index: 24, + lineNumber: 1, + column: 25, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }] + }, + + '"use strict"; function f(eval) {};': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'f', + range: [23, 24], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 24 } + } + }, + params: [{ + type: 'Identifier', + name: 'eval', + range: [25, 29], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 29 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [31, 33], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 33 } + } + }, + rest: null, + generator: false, + expression: false, + range: [14, 33], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 33 } + } + }, { + type: 'EmptyStatement', + range: [33, 34], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 34 } + } + }], + range: [0, 34], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 34 } + }, + errors: [{ + index: 25, + lineNumber: 1, + column: 26, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }] + }, + + '"use strict"; function f(arguments) {};': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'f', + range: [23, 24], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 24 } + } + }, + params: [{ + type: 'Identifier', + name: 'arguments', + range: [25, 34], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 34 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [36, 38], + loc: { + start: { line: 1, column: 36 }, + end: { line: 1, column: 38 } + } + }, + rest: null, + generator: false, + expression: false, + range: [14, 38], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 38 } + } + }, { + type: 'EmptyStatement', + range: [38, 39], + loc: { + start: { line: 1, column: 38 }, + end: { line: 1, column: 39 } + } + }], + range: [0, 39], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 39 } + }, + errors: [{ + index: 25, + lineNumber: 1, + column: 26, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }] + }, + + '"use strict"; function f(foo, foo) {};': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'f', + range: [23, 24], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 24 } + } + }, + params: [{ + type: 'Identifier', + name: 'foo', + range: [25, 28], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 28 } + } + }, { + type: 'Identifier', + name: 'foo', + range: [31, 34], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 34 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [36, 38], + loc: { + start: { line: 1, column: 36 }, + end: { line: 1, column: 38 } + } + }, + rest: null, + generator: false, + expression: false, + range: [14, 38], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 38 } + } + }, { + type: 'EmptyStatement', + range: [38, 39], + loc: { + start: { line: 1, column: 38 }, + end: { line: 1, column: 39 } + } + }], + range: [0, 39], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 39 } + }, + errors: [{ + index: 31, + lineNumber: 1, + column: 32, + message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' + }] + }, + + '"use strict"; (function f(eval) {});': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'f', + range: [24, 25], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 25 } + } + }, + params: [{ + type: 'Identifier', + name: 'eval', + range: [26, 30], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 30 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [32, 34], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 34 } + } + }, + rest: null, + generator: false, + expression: false, + range: [15, 34], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 34 } + } + }, + range: [14, 36], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 36 } + } + }], + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + }, + errors: [{ + index: 26, + lineNumber: 1, + column: 27, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }] + }, + + + '"use strict"; (function f(arguments) {});': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'f', + range: [24, 25], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 25 } + } + }, + params: [{ + type: 'Identifier', + name: 'arguments', + range: [26, 35], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 35 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [37, 39], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 39 } + } + }, + rest: null, + generator: false, + expression: false, + range: [15, 39], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 39 } + } + }, + range: [14, 41], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 41 } + } + }], + range: [0, 41], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 41 } + }, + errors: [{ + index: 26, + lineNumber: 1, + column: 27, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }] + }, + + '"use strict"; (function f(foo, foo) {});': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'f', + range: [24, 25], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 25 } + } + }, + params: [{ + type: 'Identifier', + name: 'foo', + range: [26, 29], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 29 } + } + }, { + type: 'Identifier', + name: 'foo', + range: [32, 35], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 35 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [37, 39], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 39 } + } + }, + rest: null, + generator: false, + expression: false, + range: [15, 39], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 39 } + } + }, + range: [14, 41], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 41 } + } + }], + range: [0, 41], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 41 } + }, + errors: [{ + index: 32, + lineNumber: 1, + column: 33, + message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' + }] + }, + + '"use strict"; x = { set f(eval) {} }' : { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [14, 15], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 15 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'f', + range: [24, 25], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 25 } + } + }, + value : { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'eval', + range: [26, 30], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 30 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [32, 34], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 34 } + } + }, + rest: null, + generator: false, + expression: false, + range: [32, 34], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 34 } + } + }, + kind: 'set', + method: false, + shorthand: false, + range: [20, 34], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 34 } + } + }], + range: [18, 36], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 36 } + } + }, + range: [14, 36], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 36 } + } + }, + range: [14, 36], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 36 } + } + }], + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + }, + errors: [{ + index: 26, + lineNumber: 1, + column: 27, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }] + }, + + 'function hello() { "octal directive\\1"; "use strict"; }': { + type: 'Program', + body: [{ + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'hello', + range: [9, 14], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 14 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'octal directive\u0001', + raw: '"octal directive\\1"', + range: [19, 38], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 38 } + } + }, + range: [19, 39], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 39 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [40, 52], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 52 } + } + }, + range: [40, 53], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 53 } + } + }], + range: [17, 55], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 55 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 55], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 55 } + } + }], + range: [0, 55], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 55 } + }, + errors: [{ + index: 19, + lineNumber: 1, + column: 20, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }] + }, + + '"\\1"; \'use strict\';': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: '\u0001', + raw: '"\\1"', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '\'use strict\'', + range: [6, 18], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 18 } + } + }, + range: [6, 19], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 19 } + } + }], + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + }, + errors: [{ + index: 0, + lineNumber: 1, + column: 1, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }] + }, + + '"use strict"; var x = { 014: 3}': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }, + init: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Literal', + value: 12, + raw: '014', + range: [24, 27], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 27 } + } + }, + value: { + type: 'Literal', + value: 3, + raw: '3', + range: [29, 30], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 30 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [24, 30], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 30 } + } + }], + range: [22, 31], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 31 } + } + }, + range: [18, 31], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 31 } + } + }], + kind: 'var', + range: [14, 31], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 31 } + } + }], + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + }, + errors: [{ + index: 24, + lineNumber: 1, + column: 25, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }] + }, + + '"use strict"; var x = { get i() {}, get i() {} }': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }, + init: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'i', + range: [28, 29], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 29 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [32, 34], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 34 } + } + }, + rest: null, + generator: false, + expression: false, + range: [32, 34], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 34 } + } + }, + kind: 'get', + method: false, + shorthand: false, + range: [24, 34], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 34 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'i', + range: [40, 41], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 41 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [44, 46], + loc: { + start: { line: 1, column: 44 }, + end: { line: 1, column: 46 } + } + }, + rest: null, + generator: false, + expression: false, + range: [44, 46], + loc: { + start: { line: 1, column: 44 }, + end: { line: 1, column: 46 } + } + }, + kind: 'get', + method: false, + shorthand: false, + range: [36, 46], + loc: { + start: { line: 1, column: 36 }, + end: { line: 1, column: 46 } + } + }], + range: [22, 48], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 48 } + } + }, + range: [18, 48], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 48 } + } + }], + kind: 'var', + range: [14, 48], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 48 } + } + }], + range: [0, 48], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 48 } + }, + errors: [{ + index: 46, + lineNumber: 1, + column: 47, + message: 'Error: Line 1: Object literal may not have multiple get/set accessors with the same name' + }] + }, + + '"use strict"; var x = { i: 42, get i() {} }': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }, + init: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'i', + range: [24, 25], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 25 } + } + }, + value: { + type: 'Literal', + value: 42, + raw: '42', + range: [27, 29], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 29 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [24, 29], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 29 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'i', + range: [35, 36], + loc: { + start: { line: 1, column: 35 }, + end: { line: 1, column: 36 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [39, 41], + loc: { + start: { line: 1, column: 39 }, + end: { line: 1, column: 41 } + } + }, + rest: null, + generator: false, + expression: false, + range: [39, 41], + loc: { + start: { line: 1, column: 39 }, + end: { line: 1, column: 41 } + } + }, + kind: 'get', + method: false, + shorthand: false, + range: [31, 41], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 41 } + } + }], + range: [22, 43], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 43 } + } + }, + range: [18, 43], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 43 } + } + }], + kind: 'var', + range: [14, 43], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 43 } + } + }], + range: [0, 43], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 43 } + }, + errors: [{ + index: 41, + lineNumber: 1, + column: 42, + message: 'Error: Line 1: Object literal may not have data and accessor property with the same name' + }] + }, + + '"use strict"; var x = { set i(x) {}, i: 42 }': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }, + init: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'i', + range: [28, 29], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 29 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'x', + range: [30, 31], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 31 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [33, 35], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 35 } + } + }, + rest: null, + generator: false, + expression: false, + range: [33, 35], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 35 } + } + }, + kind: 'set', + method: false, + shorthand: false, + range: [24, 35], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 35 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'i', + range: [37, 38], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 38 } + } + }, + value: { + type: 'Literal', + value: 42, + raw: '42', + range: [40, 42], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 42 } + } + }, + kind: 'init', + method: false, + shorthand: false, + range: [37, 42], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 42 } + } + }], + range: [22, 44], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 44 } + } + }, + range: [18, 44], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 44 } + } + }], + kind: 'var', + range: [14, 44], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 44 } + } + }], + range: [0, 44], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 44 } + }, + errors: [{ + index: 42, + lineNumber: 1, + column: 43, + message: 'Error: Line 1: Object literal may not have data and accessor property with the same name' + }] + + + } + + + }, +}; diff --git a/pitfall/pdfkit/node_modules/detective/package.json b/pitfall/pdfkit/node_modules/detective/package.json new file mode 100644 index 00000000..7dd54e36 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/package.json @@ -0,0 +1,95 @@ +{ + "_args": [ + [ + { + "raw": "detective@~3.1.0", + "scope": null, + "escapedName": "detective", + "name": "detective", + "rawSpec": "~3.1.0", + "spec": ">=3.1.0 <3.2.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/module-deps" + ] + ], + "_from": "detective@>=3.1.0 <3.2.0", + "_id": "detective@3.1.0", + "_inCache": true, + "_location": "/detective", + "_npmUser": { + "name": "substack", + "email": "mail@substack.net" + }, + "_npmVersion": "1.4.4", + "_phantomChildren": { + "esprima": "1.0.4", + "estraverse": "1.5.1", + "esutils": "1.0.0", + "source-map": "0.1.43" + }, + "_requested": { + "raw": "detective@~3.1.0", + "scope": null, + "escapedName": "detective", + "name": "detective", + "rawSpec": "~3.1.0", + "spec": ">=3.1.0 <3.2.0", + "type": "range" + }, + "_requiredBy": [ + "/module-deps" + ], + "_resolved": "https://registry.npmjs.org/detective/-/detective-3.1.0.tgz", + "_shasum": "77782444ab752b88ca1be2e9d0a0395f1da25eed", + "_shrinkwrap": null, + "_spec": "detective@~3.1.0", + "_where": "/Users/MB/git/pdfkit/node_modules/module-deps", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/substack/node-detective/issues" + }, + "dependencies": { + "escodegen": "~1.1.0", + "esprima-fb": "3001.1.0-dev-harmony-fb" + }, + "description": "find all require() calls by walking the AST", + "devDependencies": { + "tap": "~0.4.0" + }, + "directories": {}, + "dist": { + "shasum": "77782444ab752b88ca1be2e9d0a0395f1da25eed", + "tarball": "https://registry.npmjs.org/detective/-/detective-3.1.0.tgz" + }, + "homepage": "https://github.com/substack/node-detective", + "keywords": [ + "require", + "source", + "analyze", + "ast" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "name": "detective", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/substack/node-detective.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "3.1.0" +} diff --git a/pitfall/pdfkit/node_modules/detective/readme.markdown b/pitfall/pdfkit/node_modules/detective/readme.markdown new file mode 100644 index 00000000..5223d504 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/readme.markdown @@ -0,0 +1,78 @@ +# detective + +find all calls to `require()` by walking the AST + +[![build status](https://secure.travis-ci.org/substack/node-detective.png)](http://travis-ci.org/substack/node-detective) + +# example + +## strings + +strings_src.js: + +``` js +var a = require('a'); +var b = require('b'); +var c = require('c'); +``` + +strings.js: + +``` js +var detective = require('detective'); +var fs = require('fs'); + +var src = fs.readFileSync(__dirname + '/strings_src.js'); +var requires = detective(src); +console.dir(requires); +``` + +output: + +``` +$ node examples/strings.js +[ 'a', 'b', 'c' ] +``` + +# methods + +``` js +var detective = require('detective'); +``` + +## detective(src, opts) + +Give some source body `src`, return an array of all the `require()` calls with +string arguments. + +The options parameter `opts` is passed along to `detective.find()`. + +## detective.find(src, opts) + +Give some source body `src`, return an object with "strings" and "expressions" +arrays for each of the require() calls. + +The "expressions" array will contain the stringified expressions. + +Optionally you can specify a different function besides `"require"` to analyze +with `opts.word`. + +You can also specify `opts.nodes = true` in order to include a "nodes" array +which contains an AST node for each of the require() calls. + +You can use `opts.isRequire(node)` to return a boolean signifying whether an +esprima AST `node` is a require call. + +You can use `opts.parse` to supply options parsed to the parser ([esprima](http://esprima.org/doc/index.html)). + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install detective +``` + +# license + +MIT diff --git a/pitfall/pdfkit/node_modules/detective/test/both.js b/pitfall/pdfkit/node_modules/detective/test/both.js new file mode 100644 index 00000000..f09f1f85 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/test/both.js @@ -0,0 +1,26 @@ +var test = require('tap').test; +var detective = require('../'); +var fs = require('fs'); +var src = fs.readFileSync(__dirname + '/files/both.js'); + +test('both', function (t) { + var modules = detective.find(src); + t.deepEqual(modules.strings, [ 'a', 'b' ]); + t.deepEqual(modules.expressions, [ "'c' + x", "'d' + y" ]); + t.notOk(modules.nodes, 'has no nodes'); + t.end(); +}); + +test('both with nodes specified in opts', function (t) { + var modules = detective.find(src, { nodes: true }); + t.deepEqual(modules.strings, [ 'a', 'b' ]); + t.deepEqual(modules.expressions, [ "'c' + x", "'d' + y" ]); + t.deepEqual( + modules.nodes.map(function (n) { + var arg = n.arguments[0]; + return arg.value || arg.left.value; + }), + [ 'a', 'b', 'c', 'd' ], + 'has a node for each require'); + t.end(); +}); diff --git a/pitfall/pdfkit/node_modules/detective/test/chained.js b/pitfall/pdfkit/node_modules/detective/test/chained.js new file mode 100644 index 00000000..307c2015 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/test/chained.js @@ -0,0 +1,9 @@ +var test = require('tap').test; +var detective = require('../'); +var fs = require('fs'); +var src = fs.readFileSync(__dirname + '/files/chained.js'); + +test('chained', function (t) { + t.deepEqual(detective(src), [ 'c', 'b', 'a' ]); + t.end(); +}); diff --git a/pitfall/pdfkit/node_modules/detective/test/files/both.js b/pitfall/pdfkit/node_modules/detective/test/files/both.js new file mode 100644 index 00000000..4c3f390f --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/test/files/both.js @@ -0,0 +1,4 @@ +require('a'); +require('b'); +require('c'+x); +var moo = require('d'+y).moo; diff --git a/pitfall/pdfkit/node_modules/detective/test/files/chained.js b/pitfall/pdfkit/node_modules/detective/test/files/chained.js new file mode 100644 index 00000000..63437cc1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/test/files/chained.js @@ -0,0 +1,5 @@ + + +require('c').hello().goodbye() +require('b').hello() +require('a') diff --git a/pitfall/pdfkit/node_modules/detective/test/files/generators.js b/pitfall/pdfkit/node_modules/detective/test/files/generators.js new file mode 100644 index 00000000..1c1c2c9a --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/test/files/generators.js @@ -0,0 +1,5 @@ +var a = require('a'); + +function *gen() { + yield require('b'); +} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/detective/test/files/isrequire.js b/pitfall/pdfkit/node_modules/detective/test/files/isrequire.js new file mode 100644 index 00000000..44210028 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/test/files/isrequire.js @@ -0,0 +1,14 @@ +var a = require.async('a'); +var b = require.async('b'); +var c = require.async('c'); +var abc = a.b(c); + +var EventEmitter = require.async('events').EventEmitter; + +var x = require.async('doom')(5,6,7); +x(8,9); +c.load('notthis'); +var y = require.async('y') * 100; + +var EventEmitter2 = require.async('events2').EventEmitter(); + diff --git a/pitfall/pdfkit/node_modules/detective/test/files/nested.js b/pitfall/pdfkit/node_modules/detective/test/files/nested.js new file mode 100644 index 00000000..646cf133 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/test/files/nested.js @@ -0,0 +1,22 @@ + +if (true) { + (function () { + require('a'); + })(); +} +if (false) { + (function () { + var x = 10; + switch (x) { + case 1 : require('b'); break; + default : break; + } + })() +} + +function qqq () { + require + ( + "c" + ); +} diff --git a/pitfall/pdfkit/node_modules/detective/test/files/shebang.js b/pitfall/pdfkit/node_modules/detective/test/files/shebang.js new file mode 100644 index 00000000..96d2cfce --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/test/files/shebang.js @@ -0,0 +1,5 @@ +#!/usr/bin/env node + +var a = require('a'); +var b = require('b'); +var c = require('c'); diff --git a/pitfall/pdfkit/node_modules/detective/test/files/sparse-array.js b/pitfall/pdfkit/node_modules/detective/test/files/sparse-array.js new file mode 100644 index 00000000..fa0d23cf --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/test/files/sparse-array.js @@ -0,0 +1,3 @@ +var o = [,,,,] + +require('./foo') diff --git a/pitfall/pdfkit/node_modules/detective/test/files/strings.js b/pitfall/pdfkit/node_modules/detective/test/files/strings.js new file mode 100644 index 00000000..1ed9381c --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/test/files/strings.js @@ -0,0 +1,13 @@ +var a = require('a'); +var b = require('b'); +var c = require('c'); +var abc = a.b(c); + +var EventEmitter = require('events').EventEmitter; + +var x = require('doom')(5,6,7); +x(8,9); +c.require('notthis'); +var y = require('y') * 100; + +var EventEmitter2 = require('events2').EventEmitter(); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/detective/test/files/word.js b/pitfall/pdfkit/node_modules/detective/test/files/word.js new file mode 100644 index 00000000..fd074fe7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/test/files/word.js @@ -0,0 +1,13 @@ +var a = load('a'); +var b = load('b'); +var c = load('c'); +var abc = a.b(c); + +var EventEmitter = load('events').EventEmitter; + +var x = load('doom')(5,6,7); +x(8,9); +c.load('notthis'); +var y = load('y') * 100; + +var EventEmitter2 = load('events2').EventEmitter(); diff --git a/pitfall/pdfkit/node_modules/detective/test/files/yield.js b/pitfall/pdfkit/node_modules/detective/test/files/yield.js new file mode 100644 index 00000000..8f4ac5ef --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/test/files/yield.js @@ -0,0 +1,2 @@ +var a = require('a'); +var b = yield require('c')(a); diff --git a/pitfall/pdfkit/node_modules/detective/test/generators.js b/pitfall/pdfkit/node_modules/detective/test/generators.js new file mode 100644 index 00000000..c16d5346 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/test/generators.js @@ -0,0 +1,9 @@ +var test = require('tap').test; +var detective = require('../'); +var fs = require('fs'); +var src = fs.readFileSync(__dirname + '/files/generators.js'); + +test('generators', function (t) { + t.plan(1); + t.deepEqual(detective(src), [ 'a', 'b' ]); +}); diff --git a/pitfall/pdfkit/node_modules/detective/test/isrequire.js b/pitfall/pdfkit/node_modules/detective/test/isrequire.js new file mode 100644 index 00000000..aa2ce361 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/test/isrequire.js @@ -0,0 +1,20 @@ +var test = require('tap').test; +var detective = require('../'); +var fs = require('fs'); +var src = fs.readFileSync(__dirname + '/files/isrequire.js'); + +test('word', function (t) { + t.deepEqual( + detective(src, { isRequire: function(node) { + return (node.type === 'CallExpression' && + node.callee.type === 'MemberExpression' && + node.callee.object.type == 'Identifier' && + node.callee.object.name == 'require' && + node.callee.property.type == 'Identifier' && + node.callee.property.name == 'async') + } }), + [ 'a', 'b', 'c', 'events', 'doom', 'y', 'events2' ] + ); + t.end(); +}); + diff --git a/pitfall/pdfkit/node_modules/detective/test/nested.js b/pitfall/pdfkit/node_modules/detective/test/nested.js new file mode 100644 index 00000000..d688c0f8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/test/nested.js @@ -0,0 +1,9 @@ +var test = require('tap').test; +var detective = require('../'); +var fs = require('fs'); +var src = fs.readFileSync(__dirname + '/files/nested.js'); + +test('nested', function (t) { + t.deepEqual(detective(src), [ 'a', 'b', 'c' ]); + t.end(); +}); diff --git a/pitfall/pdfkit/node_modules/detective/test/noargs.js b/pitfall/pdfkit/node_modules/detective/test/noargs.js new file mode 100644 index 00000000..4871b60b --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/test/noargs.js @@ -0,0 +1,26 @@ +var test = require('tap').test; +var detective = require('../'); +var fs = require('fs'); + +// in order to use detective to find any function +// it needs to properly handle functions called without args +var src = [ 'fn();', 'otherfn();', 'fn();' ].join('\n') + +test('noargs', function (t) { + t.plan(1); + t.deepEqual(detective(src, { word: 'fn' }).length, 0, 'finds no arg id'); +}); + +test('find noargs with nodes', function (t) { + t.plan(4); + var modules = detective.find(src, { word: 'fn', nodes: true }); + t.equal(modules.strings.length, 0, 'finds no arg id'); + t.equal(modules.expressions.length, 0, 'finds no expressions'); + t.equal(modules.nodes.length, 2, 'finds a node for each matching function call'); + t.equal( + modules.nodes.filter(function (x) { + return x.callee.name === 'fn' + }).length, 2, + 'all matches are correct' + ); +}); diff --git a/pitfall/pdfkit/node_modules/detective/test/parseopts.js b/pitfall/pdfkit/node_modules/detective/test/parseopts.js new file mode 100644 index 00000000..ec0da81d --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/test/parseopts.js @@ -0,0 +1,62 @@ +var test = require('tap').test; +var detective = require('../'); +var fs = require('fs'); +var src = fs.readFileSync(__dirname + '/files/both.js'); + +test('nodes specified in opts and parseopts { range: true }', function (t) { + var modules = detective.find(src, { nodes: true, parse: { range: true } }); + t.deepEqual(modules.strings, [ 'a', 'b' ]); + t.deepEqual(modules.expressions, [ "'c' + x", "'d' + y" ]); + t.deepEqual( + modules.nodes.map(function (n) { + var arg = n.arguments[0]; + return arg.value || arg.left.value; + }), + [ 'a', 'b', 'c', 'd' ], + 'has a node for each require'); + + var range = modules.nodes[0].range; + t.equal(range[0], 0, 'includes range start'); + t.equal(range[1], 12, 'includes range end'); + t.end(); +}); + +test('nodes specified in opts and parseopts { range: false }', function (t) { + var modules = detective.find(src, { nodes: true, parse: { range: false } }); + t.deepEqual(modules.strings, [ 'a', 'b' ]); + t.deepEqual(modules.expressions, [ "'c' + x", "'d' + y" ]); + t.deepEqual( + modules.nodes.map(function (n) { + var arg = n.arguments[0]; + return arg.value || arg.left.value; + }), + [ 'a', 'b', 'c', 'd' ], + 'has a node for each require'); + + t.notOk(modules.nodes[0].range, 'includes no ranges'); + t.end(); +}); + +test('nodes specified in opts and parseopts { range: true, loc: true }', function (t) { + var modules = detective.find(src, { nodes: true, parse: { range: true, loc: true } }); + t.deepEqual(modules.strings, [ 'a', 'b' ]); + t.deepEqual(modules.expressions, [ "'c' + x", "'d' + y" ]); + t.deepEqual( + modules.nodes.map(function (n) { + var arg = n.arguments[0]; + return arg.value || arg.left.value; + }), + [ 'a', 'b', 'c', 'd' ], + 'has a node for each require'); + + var range = modules.nodes[0].range; + t.equal(range[0], 0, 'includes range start'); + t.equal(range[1], 12, 'includes range end'); + + var loc = modules.nodes[0].loc; + t.equal(loc.start.line, 1, 'includes start line'); + t.equal(loc.start.column, 0, 'includes start column'); + t.equal(loc.end.line, 1, 'includes end line'); + t.equal(loc.end.column, 12, 'includes end column'); + t.end(); +}); diff --git a/pitfall/pdfkit/node_modules/detective/test/return.js b/pitfall/pdfkit/node_modules/detective/test/return.js new file mode 100644 index 00000000..c2da016b --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/test/return.js @@ -0,0 +1,9 @@ +var test = require('tap').test; +var detective = require('../'); +var fs = require('fs'); +var src = [ 'require("a")\nreturn' ]; + +test('return', function (t) { + t.plan(1); + t.deepEqual(detective(src), [ 'a' ]); +}); diff --git a/pitfall/pdfkit/node_modules/detective/test/shebang.js b/pitfall/pdfkit/node_modules/detective/test/shebang.js new file mode 100644 index 00000000..b662ea24 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/test/shebang.js @@ -0,0 +1,9 @@ +var test = require('tap').test; +var detective = require('../'); +var fs = require('fs'); +var src = fs.readFileSync(__dirname + '/files/shebang.js'); + +test('shebang', function (t) { + t.plan(1); + t.deepEqual(detective(src), [ 'a', 'b', 'c' ]); +}); diff --git a/pitfall/pdfkit/node_modules/detective/test/sparse-array.js b/pitfall/pdfkit/node_modules/detective/test/sparse-array.js new file mode 100644 index 00000000..f64f3593 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/test/sparse-array.js @@ -0,0 +1,14 @@ +var test = require('tap').test; +var detective = require('../'); +var fs = require('fs'); +var src = fs.readFileSync(__dirname + '/files/sparse-array.js'); + +test('sparse-array', function (t) { + //just check that this does not crash. + t.doesNotThrow(function () { + detective(src) + }) + t.end(); +}); + + diff --git a/pitfall/pdfkit/node_modules/detective/test/strings.js b/pitfall/pdfkit/node_modules/detective/test/strings.js new file mode 100644 index 00000000..3b5e7d82 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/test/strings.js @@ -0,0 +1,9 @@ +var test = require('tap').test; +var detective = require('../'); +var fs = require('fs'); +var src = fs.readFileSync(__dirname + '/files/strings.js'); + +test('single', function (t) { + t.deepEqual(detective(src), [ 'a', 'b', 'c', 'events', 'doom', 'y', 'events2' ]); + t.end(); +}); diff --git a/pitfall/pdfkit/node_modules/detective/test/word.js b/pitfall/pdfkit/node_modules/detective/test/word.js new file mode 100644 index 00000000..cf5397d8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/test/word.js @@ -0,0 +1,12 @@ +var test = require('tap').test; +var detective = require('../'); +var fs = require('fs'); +var src = fs.readFileSync(__dirname + '/files/word.js'); + +test('word', function (t) { + t.deepEqual( + detective(src, { word : 'load' }), + [ 'a', 'b', 'c', 'events', 'doom', 'y', 'events2' ] + ); + t.end(); +}); diff --git a/pitfall/pdfkit/node_modules/detective/test/yield.js b/pitfall/pdfkit/node_modules/detective/test/yield.js new file mode 100644 index 00000000..85560ab7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/detective/test/yield.js @@ -0,0 +1,9 @@ +var test = require('tap').test; +var detective = require('../'); +var fs = require('fs'); +var src = fs.readFileSync(__dirname + '/files/yield.js'); + +test('yield', function (t) { + t.plan(1); + t.deepEqual(detective(src), [ 'a', 'c' ]); +}); diff --git a/pitfall/pdfkit/node_modules/dfa/compile.js b/pitfall/pdfkit/node_modules/dfa/compile.js new file mode 100644 index 00000000..9b87589b --- /dev/null +++ b/pitfall/pdfkit/node_modules/dfa/compile.js @@ -0,0 +1,1861 @@ +'use strict'; + +Object.defineProperty(exports, '__esModule', { value: true }); + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var _Array$from = _interopDefault(require('babel-runtime/core-js/array/from')); +var _getIterator = _interopDefault(require('babel-runtime/core-js/get-iterator')); +var _get = _interopDefault(require('babel-runtime/helpers/get')); +var _Object$getPrototypeOf = _interopDefault(require('babel-runtime/core-js/object/get-prototype-of')); +var _possibleConstructorReturn = _interopDefault(require('babel-runtime/helpers/possibleConstructorReturn')); +var _inherits = _interopDefault(require('babel-runtime/helpers/inherits')); +var _Set = _interopDefault(require('babel-runtime/core-js/set')); +var _classCallCheck = _interopDefault(require('babel-runtime/helpers/classCallCheck')); +var _createClass = _interopDefault(require('babel-runtime/helpers/createClass')); +var _slicedToArray = _interopDefault(require('babel-runtime/helpers/slicedToArray')); +var _defineProperty = _interopDefault(require('babel-runtime/helpers/defineProperty')); +var _regeneratorRuntime = _interopDefault(require('babel-runtime/regenerator')); +var _Symbol$iterator = _interopDefault(require('babel-runtime/core-js/symbol/iterator')); + +/** + * Returns a new set representing the union of a and b. + */ +function union(a, b) { + var s = new _Set(a); + addAll(s, b); + return s; +} + +/** + * Adds all items from the set b to a. + */ +function addAll(a, b) { + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = _getIterator(b), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var x = _step.value; + + a.add(x); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } +} + +/** + * Returns whether two sets are equal + */ +function equal(a, b) { + if (a === b) return true; + + if (a.size !== b.size) return false; + + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = _getIterator(a), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var x = _step2.value; + + if (!b.has(x)) { + return false; + } + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + + return true; +} + +/** + * Base AST node + */ +var Node = function () { + function Node() { + _classCallCheck(this, Node); + + Object.defineProperty(this, 'followpos', { value: new _Set() }); + } + + _createClass(Node, [{ + key: 'calcFollowpos', + value: function calcFollowpos() { + for (var key in this) { + if (this[key] instanceof Node) { + this[key].calcFollowpos(); + } + } + } + }]); + + return Node; +}(); + +/** + * Represents a variable reference + */ +var Variable = function (_Node) { + _inherits(Variable, _Node); + + function Variable(name) { + _classCallCheck(this, Variable); + + var _this = _possibleConstructorReturn(this, (Variable.__proto__ || _Object$getPrototypeOf(Variable)).call(this)); + + _this.name = name; + return _this; + } + + return Variable; +}(Node); + +/** + * Represents a comment + */ +var Comment = function (_Node2) { + _inherits(Comment, _Node2); + + function Comment(value) { + _classCallCheck(this, Comment); + + var _this2 = _possibleConstructorReturn(this, (Comment.__proto__ || _Object$getPrototypeOf(Comment)).call(this)); + + _this2.value = value; + return _this2; + } + + return Comment; +}(Node); + +/** + * Represents an assignment statement. + * e.g. `variable = expression;` + */ +var Assignment = function (_Node3) { + _inherits(Assignment, _Node3); + + function Assignment(variable, expression) { + _classCallCheck(this, Assignment); + + var _this3 = _possibleConstructorReturn(this, (Assignment.__proto__ || _Object$getPrototypeOf(Assignment)).call(this)); + + _this3.variable = variable; + _this3.expression = expression; + return _this3; + } + + return Assignment; +}(Node); + +/** + * Represents an alternation. + * e.g. `a | b` + */ +var Alternation = function (_Node4) { + _inherits(Alternation, _Node4); + + function Alternation(a, b) { + _classCallCheck(this, Alternation); + + var _this4 = _possibleConstructorReturn(this, (Alternation.__proto__ || _Object$getPrototypeOf(Alternation)).call(this)); + + _this4.a = a; + _this4.b = b; + return _this4; + } + + _createClass(Alternation, [{ + key: 'copy', + value: function copy() { + return new Alternation(this.a.copy(), this.b.copy()); + } + }, { + key: 'nullable', + get: function get() { + return this.a.nullable || this.b.nullable; + } + }, { + key: 'firstpos', + get: function get() { + return union(this.a.firstpos, this.b.firstpos); + } + }, { + key: 'lastpos', + get: function get() { + return union(this.a.lastpos, this.b.lastpos); + } + }]); + + return Alternation; +}(Node); + +/** + * Represents a concatenation, or chain. + * e.g. `a b c` + */ +var Concatenation = function (_Node5) { + _inherits(Concatenation, _Node5); + + function Concatenation(a, b) { + _classCallCheck(this, Concatenation); + + var _this5 = _possibleConstructorReturn(this, (Concatenation.__proto__ || _Object$getPrototypeOf(Concatenation)).call(this)); + + _this5.a = a; + _this5.b = b; + return _this5; + } + + _createClass(Concatenation, [{ + key: 'calcFollowpos', + value: function calcFollowpos() { + _get(Concatenation.prototype.__proto__ || _Object$getPrototypeOf(Concatenation.prototype), 'calcFollowpos', this).call(this); + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = _getIterator(this.a.lastpos), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var n = _step.value; + + addAll(n.followpos, this.b.firstpos); + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + } + }, { + key: 'copy', + value: function copy() { + return new Concatenation(this.a.copy(), this.b.copy()); + } + }, { + key: 'nullable', + get: function get() { + return this.a.nullable && this.b.nullable; + } + }, { + key: 'firstpos', + get: function get() { + var s = this.a.firstpos; + if (this.a.nullable) { + s = union(s, this.b.firstpos); + } + + return s; + } + }, { + key: 'lastpos', + get: function get() { + var s = this.b.lastpos; + if (this.b.nullable) { + s = union(s, this.a.lastpos); + } + + return s; + } + }]); + + return Concatenation; +}(Node); + +/** + * Represents a repetition. + * e.g. `a+`, `b*`, or `c?` + */ +var Repeat = function (_Node6) { + _inherits(Repeat, _Node6); + + function Repeat(expression, op) { + _classCallCheck(this, Repeat); + + var _this6 = _possibleConstructorReturn(this, (Repeat.__proto__ || _Object$getPrototypeOf(Repeat)).call(this)); + + _this6.expression = expression; + _this6.op = op; + return _this6; + } + + _createClass(Repeat, [{ + key: 'calcFollowpos', + value: function calcFollowpos() { + _get(Repeat.prototype.__proto__ || _Object$getPrototypeOf(Repeat.prototype), 'calcFollowpos', this).call(this); + if (this.op === '*' || this.op === '+') { + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = _getIterator(this.lastpos), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var n = _step2.value; + + addAll(n.followpos, this.firstpos); + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + } + } + }, { + key: 'copy', + value: function copy() { + return new Repeat(this.expression.copy(), this.op); + } + }, { + key: 'nullable', + get: function get() { + return this.op === '*' || this.op === '?'; + } + }, { + key: 'firstpos', + get: function get() { + return this.expression.firstpos; + } + }, { + key: 'lastpos', + get: function get() { + return this.expression.lastpos; + } + }]); + + return Repeat; +}(Node); + +/** + * Base class for leaf nodes + */ + +var Leaf = function (_Node7) { + _inherits(Leaf, _Node7); + + function Leaf() { + _classCallCheck(this, Leaf); + + return _possibleConstructorReturn(this, (Leaf.__proto__ || _Object$getPrototypeOf(Leaf)).apply(this, arguments)); + } + + _createClass(Leaf, [{ + key: 'nullable', + get: function get() { + return false; + } + }, { + key: 'firstpos', + get: function get() { + return new _Set([this]); + } + }, { + key: 'lastpos', + get: function get() { + return new _Set([this]); + } + }]); + + return Leaf; +}(Node); + +/** + * Represents a literal value, e.g. a number + */ + + +var Literal = function (_Leaf) { + _inherits(Literal, _Leaf); + + function Literal(value) { + _classCallCheck(this, Literal); + + var _this8 = _possibleConstructorReturn(this, (Literal.__proto__ || _Object$getPrototypeOf(Literal)).call(this)); + + _this8.value = value; + return _this8; + } + + _createClass(Literal, [{ + key: 'copy', + value: function copy() { + return new Literal(this.value); + } + }]); + + return Literal; +}(Leaf); + +/** + * Marks the end of an expression + */ +var EndMarker = function (_Leaf2) { + _inherits(EndMarker, _Leaf2); + + function EndMarker() { + _classCallCheck(this, EndMarker); + + return _possibleConstructorReturn(this, (EndMarker.__proto__ || _Object$getPrototypeOf(EndMarker)).apply(this, arguments)); + } + + return EndMarker; +}(Leaf); + +/** + * Represents a tag + * e.g. `a:(a b)` + */ +var Tag = function (_Leaf3) { + _inherits(Tag, _Leaf3); + + function Tag(name) { + _classCallCheck(this, Tag); + + var _this10 = _possibleConstructorReturn(this, (Tag.__proto__ || _Object$getPrototypeOf(Tag)).call(this)); + + _this10.name = name; + return _this10; + } + + _createClass(Tag, [{ + key: 'copy', + value: function copy() { + return new Tag(this.name); + } + }, { + key: 'nullable', + get: function get() { + return true; + } + }]); + + return Tag; +}(Leaf); + +var nodes = Object.freeze({ + Node: Node, + Variable: Variable, + Comment: Comment, + Assignment: Assignment, + Alternation: Alternation, + Concatenation: Concatenation, + Repeat: Repeat, + Literal: Literal, + EndMarker: EndMarker, + Tag: Tag +}); + +var require$$0 = ( nodes && nodes['default'] ) || nodes; + +function peg$subclass(child, parent) { + function ctor() { + this.constructor = child; + } + ctor.prototype = parent.prototype; + child.prototype = new ctor(); +} + +function peg$SyntaxError(message, expected, found, location) { + this.message = message; + this.expected = expected; + this.found = found; + this.location = location; + this.name = "SyntaxError"; + + if (typeof Error.captureStackTrace === "function") { + Error.captureStackTrace(this, peg$SyntaxError); + } +} + +peg$subclass(peg$SyntaxError, Error); + +peg$SyntaxError.buildMessage = function (expected, found) { + var DESCRIBE_EXPECTATION_FNS = { + literal: function literal(expectation) { + return "\"" + literalEscape(expectation.text) + "\""; + }, + + "class": function _class(expectation) { + var escapedParts = "", + i; + + for (i = 0; i < expectation.parts.length; i++) { + escapedParts += expectation.parts[i] instanceof Array ? classEscape(expectation.parts[i][0]) + "-" + classEscape(expectation.parts[i][1]) : classEscape(expectation.parts[i]); + } + + return "[" + (expectation.inverted ? "^" : "") + escapedParts + "]"; + }, + + any: function any(expectation) { + return "any character"; + }, + + end: function end(expectation) { + return "end of input"; + }, + + other: function other(expectation) { + return expectation.description; + } + }; + + function hex(ch) { + return ch.charCodeAt(0).toString(16).toUpperCase(); + } + + function literalEscape(s) { + return s.replace(/\\/g, '\\\\').replace(/"/g, '\\"').replace(/\0/g, '\\0').replace(/\t/g, '\\t').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/[\x00-\x0F]/g, function (ch) { + return '\\x0' + hex(ch); + }).replace(/[\x10-\x1F\x7F-\x9F]/g, function (ch) { + return '\\x' + hex(ch); + }); + } + + function classEscape(s) { + return s.replace(/\\/g, '\\\\').replace(/\]/g, '\\]').replace(/\^/g, '\\^').replace(/-/g, '\\-').replace(/\0/g, '\\0').replace(/\t/g, '\\t').replace(/\n/g, '\\n').replace(/\r/g, '\\r').replace(/[\x00-\x0F]/g, function (ch) { + return '\\x0' + hex(ch); + }).replace(/[\x10-\x1F\x7F-\x9F]/g, function (ch) { + return '\\x' + hex(ch); + }); + } + + function describeExpectation(expectation) { + return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation); + } + + function describeExpected(expected) { + var descriptions = new Array(expected.length), + i, + j; + + for (i = 0; i < expected.length; i++) { + descriptions[i] = describeExpectation(expected[i]); + } + + descriptions.sort(); + + if (descriptions.length > 0) { + for (i = 1, j = 1; i < descriptions.length; i++) { + if (descriptions[i - 1] !== descriptions[i]) { + descriptions[j] = descriptions[i]; + j++; + } + } + descriptions.length = j; + } + + switch (descriptions.length) { + case 1: + return descriptions[0]; + + case 2: + return descriptions[0] + " or " + descriptions[1]; + + default: + return descriptions.slice(0, -1).join(", ") + ", or " + descriptions[descriptions.length - 1]; + } + } + + function describeFound(found) { + return found ? "\"" + literalEscape(found) + "\"" : "end of input"; + } + + return "Expected " + describeExpected(expected) + " but " + describeFound(found) + " found."; +}; + +function peg$parse(input, options) { + options = options !== void 0 ? options : {}; + + var peg$FAILED = {}, + peg$startRuleFunctions = { rules: peg$parserules }, + peg$startRuleFunction = peg$parserules, + peg$c0 = function peg$c0(s) { + return s; + }, + peg$c1 = "#", + peg$c2 = peg$literalExpectation("#", false), + peg$c3 = /^[^\r\n]/, + peg$c4 = peg$classExpectation(["\r", "\n"], true, false), + peg$c5 = /^[\r\n]/, + peg$c6 = peg$classExpectation(["\r", "\n"], false, false), + peg$c7 = function peg$c7(v) { + return new n.Comment(v.join('')); + }, + peg$c8 = "=", + peg$c9 = peg$literalExpectation("=", false), + peg$c10 = ";", + peg$c11 = peg$literalExpectation(";", false), + peg$c12 = function peg$c12(v, e) { + return new n.Assignment(v, e); + }, + peg$c13 = function peg$c13(v) { + return new n.Variable(v); + }, + peg$c14 = "|", + peg$c15 = peg$literalExpectation("|", false), + peg$c16 = function peg$c16(a, b) { + return new n.Alternation(a, b); + }, + peg$c17 = function peg$c17(a, b) { + return new n.Concatenation(a, b); + }, + peg$c18 = ":", + peg$c19 = peg$literalExpectation(":", false), + peg$c20 = function peg$c20(t, e) { + return new n.Concatenation(e, new n.Tag(t)); + }, + peg$c21 = "*", + peg$c22 = peg$literalExpectation("*", false), + peg$c23 = function peg$c23(t) { + return new n.Repeat(t, '*'); + }, + peg$c24 = "?", + peg$c25 = peg$literalExpectation("?", false), + peg$c26 = function peg$c26(t) { + return new n.Repeat(t, '?'); + }, + peg$c27 = "+", + peg$c28 = peg$literalExpectation("+", false), + peg$c29 = function peg$c29(t) { + return new n.Repeat(t, '+'); + }, + peg$c30 = function peg$c30(x) { + return new n.Literal(x); + }, + peg$c31 = "(", + peg$c32 = peg$literalExpectation("(", false), + peg$c33 = ")", + peg$c34 = peg$literalExpectation(")", false), + peg$c35 = function peg$c35(e) { + return e; + }, + peg$c36 = function peg$c36(a, b) { + return a + b.join(''); + }, + peg$c37 = "_", + peg$c38 = peg$literalExpectation("_", false), + peg$c39 = /^[a-zA-Z]/, + peg$c40 = peg$classExpectation([["a", "z"], ["A", "Z"]], false, false), + peg$c41 = /^[0-9]/, + peg$c42 = peg$classExpectation([["0", "9"]], false, false), + peg$c43 = function peg$c43(num) { + return parseInt(num.join('')); + }, + peg$c44 = /^[ \t\r\n]/, + peg$c45 = peg$classExpectation([" ", "\t", "\r", "\n"], false, false), + peg$currPos = 0, + peg$savedPos = 0, + peg$posDetailsCache = [{ line: 1, column: 1 }], + peg$maxFailPos = 0, + peg$maxFailExpected = [], + peg$silentFails = 0, + peg$result; + + if ("startRule" in options) { + if (!(options.startRule in peg$startRuleFunctions)) { + throw new Error("Can't start parsing from rule \"" + options.startRule + "\"."); + } + + peg$startRuleFunction = peg$startRuleFunctions[options.startRule]; + } + + function text() { + return input.substring(peg$savedPos, peg$currPos); + } + + function location() { + return peg$computeLocation(peg$savedPos, peg$currPos); + } + + function expected(description, location) { + location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos); + + throw peg$buildStructuredError([peg$otherExpectation(description)], input.substring(peg$savedPos, peg$currPos), location); + } + + function error(message, location) { + location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos); + + throw peg$buildSimpleError(message, location); + } + + function peg$literalExpectation(text, ignoreCase) { + return { type: "literal", text: text, ignoreCase: ignoreCase }; + } + + function peg$classExpectation(parts, inverted, ignoreCase) { + return { type: "class", parts: parts, inverted: inverted, ignoreCase: ignoreCase }; + } + + function peg$anyExpectation() { + return { type: "any" }; + } + + function peg$endExpectation() { + return { type: "end" }; + } + + function peg$otherExpectation(description) { + return { type: "other", description: description }; + } + + function peg$computePosDetails(pos) { + var details = peg$posDetailsCache[pos], + p; + + if (details) { + return details; + } else { + p = pos - 1; + while (!peg$posDetailsCache[p]) { + p--; + } + + details = peg$posDetailsCache[p]; + details = { + line: details.line, + column: details.column + }; + + while (p < pos) { + if (input.charCodeAt(p) === 10) { + details.line++; + details.column = 1; + } else { + details.column++; + } + + p++; + } + + peg$posDetailsCache[pos] = details; + return details; + } + } + + function peg$computeLocation(startPos, endPos) { + var startPosDetails = peg$computePosDetails(startPos), + endPosDetails = peg$computePosDetails(endPos); + + return { + start: { + offset: startPos, + line: startPosDetails.line, + column: startPosDetails.column + }, + end: { + offset: endPos, + line: endPosDetails.line, + column: endPosDetails.column + } + }; + } + + function peg$fail(expected) { + if (peg$currPos < peg$maxFailPos) { + return; + } + + if (peg$currPos > peg$maxFailPos) { + peg$maxFailPos = peg$currPos; + peg$maxFailExpected = []; + } + + peg$maxFailExpected.push(expected); + } + + function peg$buildSimpleError(message, location) { + return new peg$SyntaxError(message, null, null, location); + } + + function peg$buildStructuredError(expected, found, location) { + return new peg$SyntaxError(peg$SyntaxError.buildMessage(expected, found), expected, found, location); + } + + function peg$parserules() { + var s0, s1; + + s0 = []; + s1 = peg$parsestatement(); + if (s1 !== peg$FAILED) { + while (s1 !== peg$FAILED) { + s0.push(s1); + s1 = peg$parsestatement(); + } + } else { + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsestatement() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = peg$parsestatement_type(); + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c0(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsestatement_type() { + var s0; + + s0 = peg$parseassignment(); + if (s0 === peg$FAILED) { + s0 = peg$parsecomment(); + } + + return s0; + } + + function peg$parsecomment() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 35) { + s1 = peg$c1; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c2); + } + } + if (s1 !== peg$FAILED) { + s2 = []; + if (peg$c3.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c4); + } + } + while (s3 !== peg$FAILED) { + s2.push(s3); + if (peg$c3.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c4); + } + } + } + if (s2 !== peg$FAILED) { + if (peg$c5.test(input.charAt(peg$currPos))) { + s3 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c6); + } + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c7(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parseassignment() { + var s0, s1, s2, s3, s4, s5, s6, s7; + + s0 = peg$currPos; + s1 = peg$parsevariable(); + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 61) { + s3 = peg$c8; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c9); + } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + s5 = peg$parseexpr(); + if (s5 !== peg$FAILED) { + s6 = peg$parse_(); + if (s6 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 59) { + s7 = peg$c10; + peg$currPos++; + } else { + s7 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c11); + } + } + if (s7 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c12(s1, s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsevariable() { + var s0, s1; + + s0 = peg$currPos; + s1 = peg$parsename(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c13(s1); + } + s0 = s1; + + return s0; + } + + function peg$parseexpr() { + var s0, s1, s2, s3, s4, s5; + + s0 = peg$currPos; + s1 = peg$parseexpr_q(); + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 124) { + s3 = peg$c14; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c15); + } + } + if (s3 !== peg$FAILED) { + s4 = peg$parse_(); + if (s4 !== peg$FAILED) { + s5 = peg$parseexpr(); + if (s5 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c16(s1, s5); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseexpr_q(); + if (s1 !== peg$FAILED) { + s2 = peg$parse_(); + if (s2 !== peg$FAILED) { + s3 = peg$parseexpr(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c17(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$parseexpr_q(); + } + } + + return s0; + } + + function peg$parseexpr_q() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = peg$parsename(); + if (s1 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 58) { + s2 = peg$c18; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c19); + } + } + if (s2 !== peg$FAILED) { + s3 = peg$parseexpr_q(); + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c20(s1, s3); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseterm(); + if (s1 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 42) { + s2 = peg$c21; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c22); + } + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c23(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseterm(); + if (s1 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 63) { + s2 = peg$c24; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c25); + } + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c26(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parseterm(); + if (s1 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 43) { + s2 = peg$c27; + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c28); + } + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c29(s1); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + if (s0 === peg$FAILED) { + s0 = peg$parseterm(); + } + } + } + } + + return s0; + } + + function peg$parseterm() { + var s0, s1, s2, s3; + + s0 = peg$parsevariable(); + if (s0 === peg$FAILED) { + s0 = peg$currPos; + s1 = peg$parsenumber(); + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c30(s1); + } + s0 = s1; + if (s0 === peg$FAILED) { + s0 = peg$currPos; + if (input.charCodeAt(peg$currPos) === 40) { + s1 = peg$c31; + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c32); + } + } + if (s1 !== peg$FAILED) { + s2 = peg$parseexpr(); + if (s2 !== peg$FAILED) { + if (input.charCodeAt(peg$currPos) === 41) { + s3 = peg$c33; + peg$currPos++; + } else { + s3 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c34); + } + } + if (s3 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c35(s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } + } + + return s0; + } + + function peg$parsename() { + var s0, s1, s2, s3; + + s0 = peg$currPos; + s1 = peg$parsename_start_char(); + if (s1 !== peg$FAILED) { + s2 = []; + s3 = peg$parsename_char(); + while (s3 !== peg$FAILED) { + s2.push(s3); + s3 = peg$parsename_char(); + } + if (s2 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c36(s1, s2); + s0 = s1; + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + } else { + peg$currPos = s0; + s0 = peg$FAILED; + } + + return s0; + } + + function peg$parsename_start_char() { + var s0; + + if (input.charCodeAt(peg$currPos) === 95) { + s0 = peg$c37; + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c38); + } + } + if (s0 === peg$FAILED) { + if (peg$c39.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c40); + } + } + } + + return s0; + } + + function peg$parsename_char() { + var s0; + + s0 = peg$parsename_start_char(); + if (s0 === peg$FAILED) { + if (peg$c41.test(input.charAt(peg$currPos))) { + s0 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s0 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c42); + } + } + } + + return s0; + } + + function peg$parsenumber() { + var s0, s1, s2; + + s0 = peg$currPos; + s1 = []; + if (peg$c41.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c42); + } + } + if (s2 !== peg$FAILED) { + while (s2 !== peg$FAILED) { + s1.push(s2); + if (peg$c41.test(input.charAt(peg$currPos))) { + s2 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s2 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c42); + } + } + } + } else { + s1 = peg$FAILED; + } + if (s1 !== peg$FAILED) { + peg$savedPos = s0; + s1 = peg$c43(s1); + } + s0 = s1; + + return s0; + } + + function peg$parse_() { + var s0, s1; + + s0 = []; + if (peg$c44.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c45); + } + } + while (s1 !== peg$FAILED) { + s0.push(s1); + if (peg$c44.test(input.charAt(peg$currPos))) { + s1 = input.charAt(peg$currPos); + peg$currPos++; + } else { + s1 = peg$FAILED; + if (peg$silentFails === 0) { + peg$fail(peg$c45); + } + } + } + + return s0; + } + + var n = require$$0; + + peg$result = peg$startRuleFunction(); + + if (peg$result !== peg$FAILED && peg$currPos === input.length) { + return peg$result; + } else { + if (peg$result !== peg$FAILED && peg$currPos < input.length) { + peg$fail(peg$endExpectation()); + } + + throw peg$buildStructuredError(peg$maxFailExpected, peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null, peg$maxFailPos < input.length ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1) : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)); + } +} + +var grammar = { + SyntaxError: peg$SyntaxError, + parse: peg$parse +}; + +/** + * Processes a list of statements into a symbol table + */ + +var SymbolTable = function () { + function SymbolTable(statements) { + var externalSymbols = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + _classCallCheck(this, SymbolTable); + + this.variables = {}; + this.symbols = {}; + this.main = null; + this.size = 0; + + this.addExternalSymbols(externalSymbols); + this.process(statements); + } + + _createClass(SymbolTable, [{ + key: 'addExternalSymbols', + value: function addExternalSymbols(externalSymbols) { + for (var key in externalSymbols) { + this.variables[key] = new Literal(externalSymbols[key]); + this.symbols[key] = externalSymbols[key]; + this.size++; + } + } + }, { + key: 'process', + value: function process(statements) { + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = _getIterator(statements), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var statement = _step.value; + + if (statement instanceof Assignment) { + this.variables[statement.variable.name] = this.processExpression(statement.expression); + + if (statement.expression instanceof Literal) { + this.symbols[statement.variable.name] = statement.expression.value; + this.size++; + } + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + this.main = this.variables.main; + if (!this.main) { + throw new Error('No main variable declaration found'); + } + } + }, { + key: 'processExpression', + value: function processExpression(expr) { + // Process children + for (var key in expr) { + if (expr[key] instanceof Node) { + expr[key] = this.processExpression(expr[key]); + } + } + + // Replace variable references with their values + if (expr instanceof Variable) { + var value = this.variables[expr.name]; + if (value == null) throw new Error('Undeclared indentifier ' + expr.name); + + expr = this.processExpression(value.copy()); + } + + return expr; + } + }]); + + return SymbolTable; +}(); + +var END_MARKER = new EndMarker(); + +/** + * This is an implementation of the direct regular expression to DFA algorithm described + * in section 3.9.5 of "Compilers: Principles, Techniques, and Tools" by Aho, + * Lam, Sethi, and Ullman. http://dragonbook.stanford.edu + * There is a PDF of the book here: + * http://www.informatik.uni-bremen.de/agbkb/lehre/ccfl/Material/ALSUdragonbook.pdf + */ +function buildDFA(root, numSymbols) { + root = new Concatenation(root, END_MARKER); + root.calcFollowpos(); + + var failState = new State(new _Set(), numSymbols); + var initialState = new State(root.firstpos, numSymbols); + var dstates = [failState, initialState]; + + // while there is an unmarked state S in dstates + while (1) { + var s = null; + + for (var j = 1; j < dstates.length; j++) { + if (!dstates[j].marked) { + s = dstates[j]; + break; + } + } + + if (s == null) { + break; + } + + // mark S + s.marked = true; + + // for each input symbol a + for (var a = 0; a < numSymbols; a++) { + // let U be the union of followpos(p) for all + // p in S that correspond to a + var u = new _Set(); + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = _getIterator(s.positions), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var p = _step.value; + + if (p instanceof Literal && p.value === a) { + addAll(u, p.followpos); + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + + if (u.size === 0) { + continue; + } + + // if U is not in dstates + var ux = -1; + for (var i = 0; i < dstates.length; i++) { + if (equal(u, dstates[i].positions)) { + ux = i; + break; + } + } + + if (ux === -1) { + // Add U as an unmarked state to dstates + dstates.push(new State(u, numSymbols)); + ux = dstates.length - 1; + } + + s.transitions[a] = ux; + } + } + + return dstates; +} + +var State = function State(positions, len) { + _classCallCheck(this, State); + + this.positions = positions; + this.transitions = new Uint16Array(len); + this.accepting = positions.has(END_MARKER); + this.marked = false; + this.tags = new _Set(); + + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = _getIterator(positions), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var pos = _step2.value; + + if (pos instanceof Tag) { + this.tags.add(pos.name); + } + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } +}; + +var INITIAL_STATE = 1; +var FAIL_STATE = 0; + +/** + * A StateMachine represents a deterministic finite automaton. + * It can perform matches over a sequence of values, similar to a regular expression. + */ + +var StateMachine = function () { + function StateMachine(dfa) { + _classCallCheck(this, StateMachine); + + this.stateTable = dfa.stateTable; + this.accepting = dfa.accepting; + this.tags = dfa.tags; + } + + /** + * Returns an iterable object that yields pattern matches over the input sequence. + * Matches are of the form [startIndex, endIndex, tags]. + */ + + + _createClass(StateMachine, [{ + key: 'match', + value: function match(str) { + var self = this; + return _defineProperty({}, _Symbol$iterator, _regeneratorRuntime.mark(function _callee() { + var state, startRun, lastAccepting, lastState, p, c; + return _regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + state = INITIAL_STATE; + startRun = null; + lastAccepting = null; + lastState = null; + p = 0; + + case 5: + if (!(p < str.length)) { + _context.next = 21; + break; + } + + c = str[p]; + + + lastState = state; + state = self.stateTable[state][c]; + + if (!(state === FAIL_STATE)) { + _context.next = 15; + break; + } + + if (!(startRun != null && lastAccepting != null && lastAccepting >= startRun)) { + _context.next = 13; + break; + } + + _context.next = 13; + return [startRun, lastAccepting, self.tags[lastState]]; + + case 13: + + // reset the state as if we started over from the initial state + state = self.stateTable[INITIAL_STATE][c]; + startRun = null; + + case 15: + + // start a run if not in the failure state + if (state !== FAIL_STATE && startRun == null) { + startRun = p; + } + + // if accepting, mark the potential match end + if (self.accepting[state]) { + lastAccepting = p; + } + + // reset the state to the initial state if we get into the failure state + if (state === FAIL_STATE) { + state = INITIAL_STATE; + } + + case 18: + p++; + _context.next = 5; + break; + + case 21: + if (!(startRun != null && lastAccepting != null && lastAccepting >= startRun)) { + _context.next = 24; + break; + } + + _context.next = 24; + return [startRun, lastAccepting, self.tags[state]]; + + case 24: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + })); + } + + /** + * For each match over the input sequence, action functions matching + * the tag definitions in the input pattern are called with the startIndex, + * endIndex, and sub-match sequence. + */ + + }, { + key: 'apply', + value: function apply(str, actions) { + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = _getIterator(this.match(str)), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var _step$value = _slicedToArray(_step.value, 3); + + var start = _step$value[0]; + var end = _step$value[1]; + var tags = _step$value[2]; + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = _getIterator(tags), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var tag = _step2.value; + + if (typeof actions[tag] === 'function') { + actions[tag](start, end, str.slice(start, end + 1)); + } + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + } + }]); + + return StateMachine; +}(); + +function parse(string, externalSymbols) { + var ast = grammar.parse(string); + return new SymbolTable(ast, externalSymbols); +} + +function build(symbolTable) { + var states = buildDFA(symbolTable.main, symbolTable.size); + + return new StateMachine({ + stateTable: states.map(function (s) { + return _Array$from(s.transitions); + }), + accepting: states.map(function (s) { + return s.accepting; + }), + tags: states.map(function (s) { + return _Array$from(s.tags); + }) + }); +} + +function compile(string, externalSymbols) { + return build(parse(string, externalSymbols)); +} + +exports.parse = parse; +exports.build = build; +exports['default'] = compile; +//# sourceMappingURL=compile.js.map diff --git a/pitfall/pdfkit/node_modules/dfa/compile.js.map b/pitfall/pdfkit/node_modules/dfa/compile.js.map new file mode 100644 index 00000000..33a97f8e --- /dev/null +++ b/pitfall/pdfkit/node_modules/dfa/compile.js.map @@ -0,0 +1 @@ +{"version":3,"file":null,"sources":["src/utils.js","src/nodes.js","src/grammar.js","src/SymbolTable.js","src/dfa.js","src/StateMachine.js","src/compile.js"],"sourcesContent":["/**\n * Returns a new set representing the union of a and b.\n */\nexport function union(a, b) {\n let s = new Set(a);\n addAll(s, b);\n return s;\n}\n\n/**\n * Adds all items from the set b to a.\n */\nexport function addAll(a, b) {\n for (let x of b) {\n a.add(x);\n }\n}\n\n/**\n * Returns whether two sets are equal\n */\nexport function equal(a, b) {\n if (a === b)\n return true;\n\n if (a.size !== b.size)\n return false;\n\n for (let x of a) {\n if (!b.has(x)) {\n return false;\n }\n }\n\n return true;\n}\n","import {addAll, union} from './utils';\n\n/**\n * Base AST node\n */\nexport class Node {\n constructor() {\n Object.defineProperty(this, 'followpos', {value: new Set})\n }\n\n calcFollowpos() {\n for (let key in this) {\n if (this[key] instanceof Node) {\n this[key].calcFollowpos();\n }\n }\n }\n}\n\n/**\n * Represents a variable reference\n */\nexport class Variable extends Node {\n constructor(name) {\n super();\n this.name = name;\n }\n}\n\n/**\n * Represents a comment\n */\nexport class Comment extends Node {\n constructor(value) {\n super();\n this.value = value;\n }\n}\n\n/**\n * Represents an assignment statement.\n * e.g. `variable = expression;`\n */\nexport class Assignment extends Node {\n constructor(variable, expression) {\n super();\n this.variable = variable;\n this.expression = expression;\n }\n}\n\n/**\n * Represents an alternation.\n * e.g. `a | b`\n */\nexport class Alternation extends Node {\n constructor(a, b) {\n super();\n this.a = a;\n this.b = b;\n }\n\n get nullable() {\n return this.a.nullable || this.b.nullable;\n }\n\n get firstpos() {\n return union(this.a.firstpos, this.b.firstpos);\n }\n\n get lastpos() {\n return union(this.a.lastpos, this.b.lastpos);\n }\n\n copy() {\n return new Alternation(this.a.copy(), this.b.copy());\n }\n}\n\n/**\n * Represents a concatenation, or chain.\n * e.g. `a b c`\n */\nexport class Concatenation extends Node {\n constructor(a, b) {\n super();\n this.a = a;\n this.b = b;\n }\n\n get nullable() {\n return this.a.nullable && this.b.nullable;\n }\n\n get firstpos() {\n let s = this.a.firstpos;\n if (this.a.nullable) {\n s = union(s, this.b.firstpos);\n }\n\n return s;\n }\n\n get lastpos() {\n let s = this.b.lastpos;\n if (this.b.nullable) {\n s = union(s, this.a.lastpos);\n }\n\n return s;\n }\n\n calcFollowpos() {\n super.calcFollowpos();\n for (let n of this.a.lastpos) {\n addAll(n.followpos, this.b.firstpos);\n }\n }\n\n copy() {\n return new Concatenation(this.a.copy(), this.b.copy());\n }\n}\n\n/**\n * Represents a repetition.\n * e.g. `a+`, `b*`, or `c?`\n */\nexport class Repeat extends Node {\n constructor(expression, op) {\n super();\n this.expression = expression;\n this.op = op;\n }\n\n get nullable() {\n return this.op === '*' || this.op === '?';\n }\n\n get firstpos() {\n return this.expression.firstpos;\n }\n\n get lastpos() {\n return this.expression.lastpos;\n }\n\n calcFollowpos() {\n super.calcFollowpos();\n if (this.op === '*' || this.op === '+') {\n for (let n of this.lastpos) {\n addAll(n.followpos, this.firstpos);\n }\n }\n }\n\n copy() {\n return new Repeat(this.expression.copy(), this.op);\n }\n}\n\n/**\n * Base class for leaf nodes\n */\nclass Leaf extends Node {\n get nullable() {\n return false;\n }\n\n get firstpos() {\n return new Set([this]);\n }\n\n get lastpos() {\n return new Set([this]);\n }\n}\n\n/**\n * Represents a literal value, e.g. a number\n */\nexport class Literal extends Leaf {\n constructor(value) {\n super();\n this.value = value;\n }\n\n copy() {\n return new Literal(this.value);\n }\n}\n\n/**\n * Marks the end of an expression\n */\nexport class EndMarker extends Leaf {}\n\n/**\n * Represents a tag\n * e.g. `a:(a b)`\n */\nexport class Tag extends Leaf {\n constructor(name) {\n super();\n this.name = name;\n }\n\n get nullable() {\n return true;\n }\n\n copy() {\n return new Tag(this.name);\n }\n}\n","/*\n * Generated by PEG.js 0.10.0.\n *\n * http://pegjs.org/\n */\n\n\"use strict\";\n\nfunction peg$subclass(child, parent) {\n function ctor() { this.constructor = child; }\n ctor.prototype = parent.prototype;\n child.prototype = new ctor();\n}\n\nfunction peg$SyntaxError(message, expected, found, location) {\n this.message = message;\n this.expected = expected;\n this.found = found;\n this.location = location;\n this.name = \"SyntaxError\";\n\n if (typeof Error.captureStackTrace === \"function\") {\n Error.captureStackTrace(this, peg$SyntaxError);\n }\n}\n\npeg$subclass(peg$SyntaxError, Error);\n\npeg$SyntaxError.buildMessage = function(expected, found) {\n var DESCRIBE_EXPECTATION_FNS = {\n literal: function(expectation) {\n return \"\\\"\" + literalEscape(expectation.text) + \"\\\"\";\n },\n\n \"class\": function(expectation) {\n var escapedParts = \"\",\n i;\n\n for (i = 0; i < expectation.parts.length; i++) {\n escapedParts += expectation.parts[i] instanceof Array\n ? classEscape(expectation.parts[i][0]) + \"-\" + classEscape(expectation.parts[i][1])\n : classEscape(expectation.parts[i]);\n }\n\n return \"[\" + (expectation.inverted ? \"^\" : \"\") + escapedParts + \"]\";\n },\n\n any: function(expectation) {\n return \"any character\";\n },\n\n end: function(expectation) {\n return \"end of input\";\n },\n\n other: function(expectation) {\n return expectation.description;\n }\n };\n\n function hex(ch) {\n return ch.charCodeAt(0).toString(16).toUpperCase();\n }\n\n function literalEscape(s) {\n return s\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\"/g, '\\\\\"')\n .replace(/\\0/g, '\\\\0')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\x00-\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return '\\\\x' + hex(ch); });\n }\n\n function classEscape(s) {\n return s\n .replace(/\\\\/g, '\\\\\\\\')\n .replace(/\\]/g, '\\\\]')\n .replace(/\\^/g, '\\\\^')\n .replace(/-/g, '\\\\-')\n .replace(/\\0/g, '\\\\0')\n .replace(/\\t/g, '\\\\t')\n .replace(/\\n/g, '\\\\n')\n .replace(/\\r/g, '\\\\r')\n .replace(/[\\x00-\\x0F]/g, function(ch) { return '\\\\x0' + hex(ch); })\n .replace(/[\\x10-\\x1F\\x7F-\\x9F]/g, function(ch) { return '\\\\x' + hex(ch); });\n }\n\n function describeExpectation(expectation) {\n return DESCRIBE_EXPECTATION_FNS[expectation.type](expectation);\n }\n\n function describeExpected(expected) {\n var descriptions = new Array(expected.length),\n i, j;\n\n for (i = 0; i < expected.length; i++) {\n descriptions[i] = describeExpectation(expected[i]);\n }\n\n descriptions.sort();\n\n if (descriptions.length > 0) {\n for (i = 1, j = 1; i < descriptions.length; i++) {\n if (descriptions[i - 1] !== descriptions[i]) {\n descriptions[j] = descriptions[i];\n j++;\n }\n }\n descriptions.length = j;\n }\n\n switch (descriptions.length) {\n case 1:\n return descriptions[0];\n\n case 2:\n return descriptions[0] + \" or \" + descriptions[1];\n\n default:\n return descriptions.slice(0, -1).join(\", \")\n + \", or \"\n + descriptions[descriptions.length - 1];\n }\n }\n\n function describeFound(found) {\n return found ? \"\\\"\" + literalEscape(found) + \"\\\"\" : \"end of input\";\n }\n\n return \"Expected \" + describeExpected(expected) + \" but \" + describeFound(found) + \" found.\";\n};\n\nfunction peg$parse(input, options) {\n options = options !== void 0 ? options : {};\n\n var peg$FAILED = {},\n\n peg$startRuleFunctions = { rules: peg$parserules },\n peg$startRuleFunction = peg$parserules,\n\n peg$c0 = function(s) { return s },\n peg$c1 = \"#\",\n peg$c2 = peg$literalExpectation(\"#\", false),\n peg$c3 = /^[^\\r\\n]/,\n peg$c4 = peg$classExpectation([\"\\r\", \"\\n\"], true, false),\n peg$c5 = /^[\\r\\n]/,\n peg$c6 = peg$classExpectation([\"\\r\", \"\\n\"], false, false),\n peg$c7 = function(v) { return new n.Comment(v.join('')) },\n peg$c8 = \"=\",\n peg$c9 = peg$literalExpectation(\"=\", false),\n peg$c10 = \";\",\n peg$c11 = peg$literalExpectation(\";\", false),\n peg$c12 = function(v, e) { return new n.Assignment(v, e) },\n peg$c13 = function(v) { return new n.Variable(v) },\n peg$c14 = \"|\",\n peg$c15 = peg$literalExpectation(\"|\", false),\n peg$c16 = function(a, b) { return new n.Alternation(a, b) },\n peg$c17 = function(a, b) { return new n.Concatenation(a, b) },\n peg$c18 = \":\",\n peg$c19 = peg$literalExpectation(\":\", false),\n peg$c20 = function(t, e) { return new n.Concatenation(e, new n.Tag(t)) },\n peg$c21 = \"*\",\n peg$c22 = peg$literalExpectation(\"*\", false),\n peg$c23 = function(t) { return new n.Repeat(t, '*') },\n peg$c24 = \"?\",\n peg$c25 = peg$literalExpectation(\"?\", false),\n peg$c26 = function(t) { return new n.Repeat(t, '?') },\n peg$c27 = \"+\",\n peg$c28 = peg$literalExpectation(\"+\", false),\n peg$c29 = function(t) { return new n.Repeat(t, '+') },\n peg$c30 = function(x) { return new n.Literal(x) },\n peg$c31 = \"(\",\n peg$c32 = peg$literalExpectation(\"(\", false),\n peg$c33 = \")\",\n peg$c34 = peg$literalExpectation(\")\", false),\n peg$c35 = function(e) { return e },\n peg$c36 = function(a, b) { return a + b.join('') },\n peg$c37 = \"_\",\n peg$c38 = peg$literalExpectation(\"_\", false),\n peg$c39 = /^[a-zA-Z]/,\n peg$c40 = peg$classExpectation([[\"a\", \"z\"], [\"A\", \"Z\"]], false, false),\n peg$c41 = /^[0-9]/,\n peg$c42 = peg$classExpectation([[\"0\", \"9\"]], false, false),\n peg$c43 = function(num) { return parseInt(num.join('')) },\n peg$c44 = /^[ \\t\\r\\n]/,\n peg$c45 = peg$classExpectation([\" \", \"\\t\", \"\\r\", \"\\n\"], false, false),\n\n peg$currPos = 0,\n peg$savedPos = 0,\n peg$posDetailsCache = [{ line: 1, column: 1 }],\n peg$maxFailPos = 0,\n peg$maxFailExpected = [],\n peg$silentFails = 0,\n\n peg$result;\n\n if (\"startRule\" in options) {\n if (!(options.startRule in peg$startRuleFunctions)) {\n throw new Error(\"Can't start parsing from rule \\\"\" + options.startRule + \"\\\".\");\n }\n\n peg$startRuleFunction = peg$startRuleFunctions[options.startRule];\n }\n\n function text() {\n return input.substring(peg$savedPos, peg$currPos);\n }\n\n function location() {\n return peg$computeLocation(peg$savedPos, peg$currPos);\n }\n\n function expected(description, location) {\n location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n throw peg$buildStructuredError(\n [peg$otherExpectation(description)],\n input.substring(peg$savedPos, peg$currPos),\n location\n );\n }\n\n function error(message, location) {\n location = location !== void 0 ? location : peg$computeLocation(peg$savedPos, peg$currPos)\n\n throw peg$buildSimpleError(message, location);\n }\n\n function peg$literalExpectation(text, ignoreCase) {\n return { type: \"literal\", text: text, ignoreCase: ignoreCase };\n }\n\n function peg$classExpectation(parts, inverted, ignoreCase) {\n return { type: \"class\", parts: parts, inverted: inverted, ignoreCase: ignoreCase };\n }\n\n function peg$anyExpectation() {\n return { type: \"any\" };\n }\n\n function peg$endExpectation() {\n return { type: \"end\" };\n }\n\n function peg$otherExpectation(description) {\n return { type: \"other\", description: description };\n }\n\n function peg$computePosDetails(pos) {\n var details = peg$posDetailsCache[pos], p;\n\n if (details) {\n return details;\n } else {\n p = pos - 1;\n while (!peg$posDetailsCache[p]) {\n p--;\n }\n\n details = peg$posDetailsCache[p];\n details = {\n line: details.line,\n column: details.column\n };\n\n while (p < pos) {\n if (input.charCodeAt(p) === 10) {\n details.line++;\n details.column = 1;\n } else {\n details.column++;\n }\n\n p++;\n }\n\n peg$posDetailsCache[pos] = details;\n return details;\n }\n }\n\n function peg$computeLocation(startPos, endPos) {\n var startPosDetails = peg$computePosDetails(startPos),\n endPosDetails = peg$computePosDetails(endPos);\n\n return {\n start: {\n offset: startPos,\n line: startPosDetails.line,\n column: startPosDetails.column\n },\n end: {\n offset: endPos,\n line: endPosDetails.line,\n column: endPosDetails.column\n }\n };\n }\n\n function peg$fail(expected) {\n if (peg$currPos < peg$maxFailPos) { return; }\n\n if (peg$currPos > peg$maxFailPos) {\n peg$maxFailPos = peg$currPos;\n peg$maxFailExpected = [];\n }\n\n peg$maxFailExpected.push(expected);\n }\n\n function peg$buildSimpleError(message, location) {\n return new peg$SyntaxError(message, null, null, location);\n }\n\n function peg$buildStructuredError(expected, found, location) {\n return new peg$SyntaxError(\n peg$SyntaxError.buildMessage(expected, found),\n expected,\n found,\n location\n );\n }\n\n function peg$parserules() {\n var s0, s1;\n\n s0 = [];\n s1 = peg$parsestatement();\n if (s1 !== peg$FAILED) {\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n s1 = peg$parsestatement();\n }\n } else {\n s0 = peg$FAILED;\n }\n\n return s0;\n }\n\n function peg$parsestatement() {\n var s0, s1, s2;\n\n s0 = peg$currPos;\n s1 = peg$parsestatement_type();\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c0(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n return s0;\n }\n\n function peg$parsestatement_type() {\n var s0;\n\n s0 = peg$parseassignment();\n if (s0 === peg$FAILED) {\n s0 = peg$parsecomment();\n }\n\n return s0;\n }\n\n function peg$parsecomment() {\n var s0, s1, s2, s3;\n\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 35) {\n s1 = peg$c1;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c2); }\n }\n if (s1 !== peg$FAILED) {\n s2 = [];\n if (peg$c3.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c4); }\n }\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n if (peg$c3.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c4); }\n }\n }\n if (s2 !== peg$FAILED) {\n if (peg$c5.test(input.charAt(peg$currPos))) {\n s3 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c6); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c7(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n return s0;\n }\n\n function peg$parseassignment() {\n var s0, s1, s2, s3, s4, s5, s6, s7;\n\n s0 = peg$currPos;\n s1 = peg$parsevariable();\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 61) {\n s3 = peg$c8;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c9); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parseexpr();\n if (s5 !== peg$FAILED) {\n s6 = peg$parse_();\n if (s6 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 59) {\n s7 = peg$c10;\n peg$currPos++;\n } else {\n s7 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c11); }\n }\n if (s7 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c12(s1, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n return s0;\n }\n\n function peg$parsevariable() {\n var s0, s1;\n\n s0 = peg$currPos;\n s1 = peg$parsename();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c13(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parseexpr() {\n var s0, s1, s2, s3, s4, s5;\n\n s0 = peg$currPos;\n s1 = peg$parseexpr_q();\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 124) {\n s3 = peg$c14;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c15); }\n }\n if (s3 !== peg$FAILED) {\n s4 = peg$parse_();\n if (s4 !== peg$FAILED) {\n s5 = peg$parseexpr();\n if (s5 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c16(s1, s5);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseexpr_q();\n if (s1 !== peg$FAILED) {\n s2 = peg$parse_();\n if (s2 !== peg$FAILED) {\n s3 = peg$parseexpr();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c17(s1, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$parseexpr_q();\n }\n }\n\n return s0;\n }\n\n function peg$parseexpr_q() {\n var s0, s1, s2, s3;\n\n s0 = peg$currPos;\n s1 = peg$parsename();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 58) {\n s2 = peg$c18;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c19); }\n }\n if (s2 !== peg$FAILED) {\n s3 = peg$parseexpr_q();\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c20(s1, s3);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseterm();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 42) {\n s2 = peg$c21;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c22); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c23(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseterm();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 63) {\n s2 = peg$c24;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c25); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c26(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parseterm();\n if (s1 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 43) {\n s2 = peg$c27;\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c28); }\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c29(s1);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n if (s0 === peg$FAILED) {\n s0 = peg$parseterm();\n }\n }\n }\n }\n\n return s0;\n }\n\n function peg$parseterm() {\n var s0, s1, s2, s3;\n\n s0 = peg$parsevariable();\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n s1 = peg$parsenumber();\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c30(s1);\n }\n s0 = s1;\n if (s0 === peg$FAILED) {\n s0 = peg$currPos;\n if (input.charCodeAt(peg$currPos) === 40) {\n s1 = peg$c31;\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c32); }\n }\n if (s1 !== peg$FAILED) {\n s2 = peg$parseexpr();\n if (s2 !== peg$FAILED) {\n if (input.charCodeAt(peg$currPos) === 41) {\n s3 = peg$c33;\n peg$currPos++;\n } else {\n s3 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c34); }\n }\n if (s3 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c35(s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n }\n }\n\n return s0;\n }\n\n function peg$parsename() {\n var s0, s1, s2, s3;\n\n s0 = peg$currPos;\n s1 = peg$parsename_start_char();\n if (s1 !== peg$FAILED) {\n s2 = [];\n s3 = peg$parsename_char();\n while (s3 !== peg$FAILED) {\n s2.push(s3);\n s3 = peg$parsename_char();\n }\n if (s2 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c36(s1, s2);\n s0 = s1;\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n } else {\n peg$currPos = s0;\n s0 = peg$FAILED;\n }\n\n return s0;\n }\n\n function peg$parsename_start_char() {\n var s0;\n\n if (input.charCodeAt(peg$currPos) === 95) {\n s0 = peg$c37;\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c38); }\n }\n if (s0 === peg$FAILED) {\n if (peg$c39.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c40); }\n }\n }\n\n return s0;\n }\n\n function peg$parsename_char() {\n var s0;\n\n s0 = peg$parsename_start_char();\n if (s0 === peg$FAILED) {\n if (peg$c41.test(input.charAt(peg$currPos))) {\n s0 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s0 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c42); }\n }\n }\n\n return s0;\n }\n\n function peg$parsenumber() {\n var s0, s1, s2;\n\n s0 = peg$currPos;\n s1 = [];\n if (peg$c41.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c42); }\n }\n if (s2 !== peg$FAILED) {\n while (s2 !== peg$FAILED) {\n s1.push(s2);\n if (peg$c41.test(input.charAt(peg$currPos))) {\n s2 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s2 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c42); }\n }\n }\n } else {\n s1 = peg$FAILED;\n }\n if (s1 !== peg$FAILED) {\n peg$savedPos = s0;\n s1 = peg$c43(s1);\n }\n s0 = s1;\n\n return s0;\n }\n\n function peg$parse_() {\n var s0, s1;\n\n s0 = [];\n if (peg$c44.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c45); }\n }\n while (s1 !== peg$FAILED) {\n s0.push(s1);\n if (peg$c44.test(input.charAt(peg$currPos))) {\n s1 = input.charAt(peg$currPos);\n peg$currPos++;\n } else {\n s1 = peg$FAILED;\n if (peg$silentFails === 0) { peg$fail(peg$c45); }\n }\n }\n\n return s0;\n }\n\n\n var n = require('./nodes');\n\n\n peg$result = peg$startRuleFunction();\n\n if (peg$result !== peg$FAILED && peg$currPos === input.length) {\n return peg$result;\n } else {\n if (peg$result !== peg$FAILED && peg$currPos < input.length) {\n peg$fail(peg$endExpectation());\n }\n\n throw peg$buildStructuredError(\n peg$maxFailExpected,\n peg$maxFailPos < input.length ? input.charAt(peg$maxFailPos) : null,\n peg$maxFailPos < input.length\n ? peg$computeLocation(peg$maxFailPos, peg$maxFailPos + 1)\n : peg$computeLocation(peg$maxFailPos, peg$maxFailPos)\n );\n }\n}\n\nmodule.exports = {\n SyntaxError: peg$SyntaxError,\n parse: peg$parse\n};\n","import {Assignment, Literal, Node, Variable} from './nodes';\n\n/**\n * Processes a list of statements into a symbol table\n */\nexport default class SymbolTable {\n constructor(statements, externalSymbols = {}) {\n this.variables = {};\n this.symbols = {};\n this.main = null;\n this.size = 0;\n\n this.addExternalSymbols(externalSymbols);\n this.process(statements);\n }\n\n addExternalSymbols(externalSymbols) {\n for (let key in externalSymbols) {\n this.variables[key] = new Literal(externalSymbols[key]);\n this.symbols[key] = externalSymbols[key];\n this.size++;\n }\n }\n\n process(statements) {\n for (let statement of statements) {\n if (statement instanceof Assignment) {\n this.variables[statement.variable.name] = this.processExpression(statement.expression);\n\n if (statement.expression instanceof Literal) {\n this.symbols[statement.variable.name] = statement.expression.value;\n this.size++;\n }\n }\n }\n\n this.main = this.variables.main;\n if (!this.main) {\n throw new Error('No main variable declaration found');\n }\n }\n\n processExpression(expr) {\n // Process children\n for (let key in expr) {\n if (expr[key] instanceof Node) {\n expr[key] = this.processExpression(expr[key]);\n }\n }\n\n // Replace variable references with their values\n if (expr instanceof Variable) {\n let value = this.variables[expr.name];\n if (value == null)\n throw new Error(`Undeclared indentifier ${expr.name}`);\n\n expr = this.processExpression(value.copy());\n }\n\n return expr;\n }\n}\n","import {EndMarker, Concatenation, Literal, Tag} from './nodes';\nimport {addAll, equal} from './utils';\n\nconst END_MARKER = new EndMarker;\n\n/**\n * This is an implementation of the direct regular expression to DFA algorithm described\n * in section 3.9.5 of \"Compilers: Principles, Techniques, and Tools\" by Aho,\n * Lam, Sethi, and Ullman. http://dragonbook.stanford.edu\n * There is a PDF of the book here:\n * http://www.informatik.uni-bremen.de/agbkb/lehre/ccfl/Material/ALSUdragonbook.pdf\n */\nexport default function buildDFA(root, numSymbols) {\n root = new Concatenation(root, END_MARKER);\n root.calcFollowpos();\n\n let failState = new State(new Set, numSymbols);\n let initialState = new State(root.firstpos, numSymbols);\n let dstates = [failState, initialState];\n\n // while there is an unmarked state S in dstates\n while (1) {\n let s = null;\n\n for (let j = 1; j < dstates.length; j++) {\n if (!dstates[j].marked) {\n s = dstates[j];\n break;\n }\n }\n\n if (s == null) {\n break;\n }\n\n // mark S\n s.marked = true;\n\n // for each input symbol a\n for (let a = 0; a < numSymbols; a++) {\n // let U be the union of followpos(p) for all\n // p in S that correspond to a\n let u = new Set;\n for (let p of s.positions) {\n if (p instanceof Literal && p.value === a) {\n addAll(u, p.followpos);\n }\n }\n\n if (u.size === 0) {\n continue;\n }\n\n // if U is not in dstates\n let ux = -1;\n for (let i = 0; i < dstates.length; i++) {\n if (equal(u, dstates[i].positions)) {\n ux = i;\n break;\n }\n }\n\n if (ux === -1) {\n // Add U as an unmarked state to dstates\n dstates.push(new State(u, numSymbols));\n ux = dstates.length - 1;\n }\n\n s.transitions[a] = ux;\n }\n }\n\n return dstates;\n}\n\nclass State {\n constructor(positions, len) {\n this.positions = positions;\n this.transitions = new Uint16Array(len);\n this.accepting = positions.has(END_MARKER);\n this.marked = false;\n this.tags = new Set;\n\n for (let pos of positions) {\n if (pos instanceof Tag) {\n this.tags.add(pos.name);\n }\n }\n }\n}\n","const INITIAL_STATE = 1;\nconst FAIL_STATE = 0;\n\n/**\n * A StateMachine represents a deterministic finite automaton.\n * It can perform matches over a sequence of values, similar to a regular expression.\n */\nexport default class StateMachine {\n constructor(dfa) {\n this.stateTable = dfa.stateTable;\n this.accepting = dfa.accepting;\n this.tags = dfa.tags;\n }\n\n /**\n * Returns an iterable object that yields pattern matches over the input sequence.\n * Matches are of the form [startIndex, endIndex, tags].\n */\n match(str) {\n let self = this;\n return {\n *[Symbol.iterator]() {\n let state = INITIAL_STATE;\n let startRun = null;\n let lastAccepting = null;\n let lastState = null;\n\n for (let p = 0; p < str.length; p++) {\n let c = str[p];\n\n lastState = state;\n state = self.stateTable[state][c];\n\n if (state === FAIL_STATE) {\n // yield the last match if any\n if (startRun != null && lastAccepting != null && lastAccepting >= startRun) {\n yield [startRun, lastAccepting, self.tags[lastState]];\n }\n\n // reset the state as if we started over from the initial state\n state = self.stateTable[INITIAL_STATE][c];\n startRun = null;\n }\n\n // start a run if not in the failure state\n if (state !== FAIL_STATE && startRun == null) {\n startRun = p;\n }\n\n // if accepting, mark the potential match end\n if (self.accepting[state]) {\n lastAccepting = p;\n }\n\n // reset the state to the initial state if we get into the failure state\n if (state === FAIL_STATE) {\n state = INITIAL_STATE;\n }\n }\n\n // yield the last match if any\n if (startRun != null && lastAccepting != null && lastAccepting >= startRun) {\n yield [startRun, lastAccepting, self.tags[state]];\n }\n }\n };\n }\n\n /**\n * For each match over the input sequence, action functions matching\n * the tag definitions in the input pattern are called with the startIndex,\n * endIndex, and sub-match sequence.\n */\n apply(str, actions) {\n for (let [start, end, tags] of this.match(str)) {\n for (let tag of tags) {\n if (typeof actions[tag] === 'function') {\n actions[tag](start, end, str.slice(start, end + 1));\n }\n }\n }\n }\n}\n","import grammar from './grammar';\nimport SymbolTable from './SymbolTable';\nimport buildDFA from './dfa';\nimport StateMachine from './StateMachine';\n\nexport function parse(string, externalSymbols) {\n let ast = grammar.parse(string);\n return new SymbolTable(ast, externalSymbols);\n}\n\nexport function build(symbolTable) {\n let states = buildDFA(symbolTable.main, symbolTable.size);\n\n return new StateMachine({\n stateTable: states.map(s => Array.from(s.transitions)),\n accepting: states.map(s => s.accepting),\n tags: states.map(s => Array.from(s.tags))\n });\n}\n\nexport default function compile(string, externalSymbols) {\n return build(parse(string, externalSymbols));\n}\n"],"names":["union","a","b","s","addAll","x","add","equal","size","has","Node","defineProperty","value","key","calcFollowpos","Variable","name","Comment","Assignment","variable","expression","Alternation","copy","nullable","firstpos","lastpos","Concatenation","n","followpos","Repeat","op","Leaf","Literal","EndMarker","Tag","peg$subclass","child","parent","ctor","constructor","prototype","peg$SyntaxError","message","expected","found","location","Error","captureStackTrace","buildMessage","DESCRIBE_EXPECTATION_FNS","expectation","literalEscape","text","escapedParts","i","parts","length","Array","classEscape","inverted","description","hex","ch","charCodeAt","toString","toUpperCase","replace","describeExpectation","type","describeExpected","descriptions","j","sort","slice","join","describeFound","peg$parse","input","options","peg$FAILED","peg$startRuleFunctions","rules","peg$parserules","peg$startRuleFunction","peg$c0","peg$c1","peg$c2","peg$literalExpectation","peg$c3","peg$c4","peg$classExpectation","peg$c5","peg$c6","peg$c7","v","peg$c8","peg$c9","peg$c10","peg$c11","peg$c12","e","peg$c13","peg$c14","peg$c15","peg$c16","peg$c17","peg$c18","peg$c19","peg$c20","t","peg$c21","peg$c22","peg$c23","peg$c24","peg$c25","peg$c26","peg$c27","peg$c28","peg$c29","peg$c30","peg$c31","peg$c32","peg$c33","peg$c34","peg$c35","peg$c36","peg$c37","peg$c38","peg$c39","peg$c40","peg$c41","peg$c42","peg$c43","num","parseInt","peg$c44","peg$c45","peg$currPos","peg$savedPos","peg$posDetailsCache","line","column","peg$maxFailPos","peg$maxFailExpected","peg$silentFails","peg$result","startRule","substring","peg$computeLocation","peg$buildStructuredError","peg$otherExpectation","error","peg$buildSimpleError","ignoreCase","peg$anyExpectation","peg$endExpectation","peg$computePosDetails","pos","details","p","startPos","endPos","startPosDetails","endPosDetails","peg$fail","push","s0","s1","peg$parsestatement","s2","peg$parsestatement_type","peg$parse_","peg$parseassignment","peg$parsecomment","s3","test","charAt","s4","s5","s6","s7","peg$parsevariable","peg$parseexpr","peg$parsename","peg$parseexpr_q","peg$parseterm","peg$parsenumber","peg$parsename_start_char","peg$parsename_char","require$$0","SymbolTable","statements","externalSymbols","variables","symbols","main","addExternalSymbols","process","statement","processExpression","expr","END_MARKER","buildDFA","root","numSymbols","failState","State","initialState","dstates","marked","u","positions","ux","transitions","len","Uint16Array","accepting","tags","INITIAL_STATE","FAIL_STATE","StateMachine","dfa","stateTable","str","self","state","c","startRun","lastAccepting","lastState","actions","match","start","end","tag","parse","string","ast","grammar","build","symbolTable","states","map","compile"],"mappings":"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"} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/dfa/index.js b/pitfall/pdfkit/node_modules/dfa/index.js new file mode 100644 index 00000000..718b4d7a --- /dev/null +++ b/pitfall/pdfkit/node_modules/dfa/index.js @@ -0,0 +1,191 @@ +'use strict'; + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var _slicedToArray = _interopDefault(require('babel-runtime/helpers/slicedToArray')); +var _getIterator = _interopDefault(require('babel-runtime/core-js/get-iterator')); +var _defineProperty = _interopDefault(require('babel-runtime/helpers/defineProperty')); +var _regeneratorRuntime = _interopDefault(require('babel-runtime/regenerator')); +var _Symbol$iterator = _interopDefault(require('babel-runtime/core-js/symbol/iterator')); +var _classCallCheck = _interopDefault(require('babel-runtime/helpers/classCallCheck')); +var _createClass = _interopDefault(require('babel-runtime/helpers/createClass')); + +var INITIAL_STATE = 1; +var FAIL_STATE = 0; + +/** + * A StateMachine represents a deterministic finite automaton. + * It can perform matches over a sequence of values, similar to a regular expression. + */ + +var StateMachine = function () { + function StateMachine(dfa) { + _classCallCheck(this, StateMachine); + + this.stateTable = dfa.stateTable; + this.accepting = dfa.accepting; + this.tags = dfa.tags; + } + + /** + * Returns an iterable object that yields pattern matches over the input sequence. + * Matches are of the form [startIndex, endIndex, tags]. + */ + + + _createClass(StateMachine, [{ + key: 'match', + value: function match(str) { + var self = this; + return _defineProperty({}, _Symbol$iterator, _regeneratorRuntime.mark(function _callee() { + var state, startRun, lastAccepting, lastState, p, c; + return _regeneratorRuntime.wrap(function _callee$(_context) { + while (1) { + switch (_context.prev = _context.next) { + case 0: + state = INITIAL_STATE; + startRun = null; + lastAccepting = null; + lastState = null; + p = 0; + + case 5: + if (!(p < str.length)) { + _context.next = 21; + break; + } + + c = str[p]; + + + lastState = state; + state = self.stateTable[state][c]; + + if (!(state === FAIL_STATE)) { + _context.next = 15; + break; + } + + if (!(startRun != null && lastAccepting != null && lastAccepting >= startRun)) { + _context.next = 13; + break; + } + + _context.next = 13; + return [startRun, lastAccepting, self.tags[lastState]]; + + case 13: + + // reset the state as if we started over from the initial state + state = self.stateTable[INITIAL_STATE][c]; + startRun = null; + + case 15: + + // start a run if not in the failure state + if (state !== FAIL_STATE && startRun == null) { + startRun = p; + } + + // if accepting, mark the potential match end + if (self.accepting[state]) { + lastAccepting = p; + } + + // reset the state to the initial state if we get into the failure state + if (state === FAIL_STATE) { + state = INITIAL_STATE; + } + + case 18: + p++; + _context.next = 5; + break; + + case 21: + if (!(startRun != null && lastAccepting != null && lastAccepting >= startRun)) { + _context.next = 24; + break; + } + + _context.next = 24; + return [startRun, lastAccepting, self.tags[state]]; + + case 24: + case 'end': + return _context.stop(); + } + } + }, _callee, this); + })); + } + + /** + * For each match over the input sequence, action functions matching + * the tag definitions in the input pattern are called with the startIndex, + * endIndex, and sub-match sequence. + */ + + }, { + key: 'apply', + value: function apply(str, actions) { + var _iteratorNormalCompletion = true; + var _didIteratorError = false; + var _iteratorError = undefined; + + try { + for (var _iterator = _getIterator(this.match(str)), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) { + var _step$value = _slicedToArray(_step.value, 3); + + var start = _step$value[0]; + var end = _step$value[1]; + var tags = _step$value[2]; + var _iteratorNormalCompletion2 = true; + var _didIteratorError2 = false; + var _iteratorError2 = undefined; + + try { + for (var _iterator2 = _getIterator(tags), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) { + var tag = _step2.value; + + if (typeof actions[tag] === 'function') { + actions[tag](start, end, str.slice(start, end + 1)); + } + } + } catch (err) { + _didIteratorError2 = true; + _iteratorError2 = err; + } finally { + try { + if (!_iteratorNormalCompletion2 && _iterator2.return) { + _iterator2.return(); + } + } finally { + if (_didIteratorError2) { + throw _iteratorError2; + } + } + } + } + } catch (err) { + _didIteratorError = true; + _iteratorError = err; + } finally { + try { + if (!_iteratorNormalCompletion && _iterator.return) { + _iterator.return(); + } + } finally { + if (_didIteratorError) { + throw _iteratorError; + } + } + } + } + }]); + + return StateMachine; +}(); + +module.exports = StateMachine; +//# sourceMappingURL=index.js.map diff --git a/pitfall/pdfkit/node_modules/dfa/index.js.map b/pitfall/pdfkit/node_modules/dfa/index.js.map new file mode 100644 index 00000000..05d33ff0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/dfa/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":null,"sources":["src/StateMachine.js"],"sourcesContent":["const INITIAL_STATE = 1;\nconst FAIL_STATE = 0;\n\n/**\n * A StateMachine represents a deterministic finite automaton.\n * It can perform matches over a sequence of values, similar to a regular expression.\n */\nexport default class StateMachine {\n constructor(dfa) {\n this.stateTable = dfa.stateTable;\n this.accepting = dfa.accepting;\n this.tags = dfa.tags;\n }\n\n /**\n * Returns an iterable object that yields pattern matches over the input sequence.\n * Matches are of the form [startIndex, endIndex, tags].\n */\n match(str) {\n let self = this;\n return {\n *[Symbol.iterator]() {\n let state = INITIAL_STATE;\n let startRun = null;\n let lastAccepting = null;\n let lastState = null;\n\n for (let p = 0; p < str.length; p++) {\n let c = str[p];\n\n lastState = state;\n state = self.stateTable[state][c];\n\n if (state === FAIL_STATE) {\n // yield the last match if any\n if (startRun != null && lastAccepting != null && lastAccepting >= startRun) {\n yield [startRun, lastAccepting, self.tags[lastState]];\n }\n\n // reset the state as if we started over from the initial state\n state = self.stateTable[INITIAL_STATE][c];\n startRun = null;\n }\n\n // start a run if not in the failure state\n if (state !== FAIL_STATE && startRun == null) {\n startRun = p;\n }\n\n // if accepting, mark the potential match end\n if (self.accepting[state]) {\n lastAccepting = p;\n }\n\n // reset the state to the initial state if we get into the failure state\n if (state === FAIL_STATE) {\n state = INITIAL_STATE;\n }\n }\n\n // yield the last match if any\n if (startRun != null && lastAccepting != null && lastAccepting >= startRun) {\n yield [startRun, lastAccepting, self.tags[state]];\n }\n }\n };\n }\n\n /**\n * For each match over the input sequence, action functions matching\n * the tag definitions in the input pattern are called with the startIndex,\n * endIndex, and sub-match sequence.\n */\n apply(str, actions) {\n for (let [start, end, tags] of this.match(str)) {\n for (let tag of tags) {\n if (typeof actions[tag] === 'function') {\n actions[tag](start, end, str.slice(start, end + 1));\n }\n }\n }\n }\n}\n"],"names":["INITIAL_STATE","FAIL_STATE","StateMachine","dfa","stateTable","accepting","tags","str","self","p","length","state","c","startRun","lastAccepting","lastState","actions","match","start","end","tag","slice"],"mappings":";;;;;;;;;;;;AAAA,IAAMA,gBAAgB,CAAtB;AACA,IAAMC,aAAa,CAAnB;;;;;;;IAMqBC;wBACPC,GAAZ,EAAiB;;;SACVC,UAAL,GAAkBD,IAAIC,UAAtB;SACKC,SAAL,GAAiBF,IAAIE,SAArB;SACKC,IAAL,GAAYH,IAAIG,IAAhB;;;;;;;;;;;0BAOIC,KAAK;UACLC,OAAO,IAAX;;;;;;;qBACA,GAEgBR,aAFhB;wBAAA,GAGmB,IAHnB;6BAAA,GAIwB,IAJxB;yBAAA,GAKoB,IALpB;iBAAA,GAOiB,CAPjB;;;sBAOoBS,IAAIF,IAAIG,MAP5B;;;;;iBAAA,GAQcH,IAAIE,CAAJ,CARd;;;4BAUkBE,KAAZ;wBACQH,KAAKJ,UAAL,CAAgBO,KAAhB,EAAuBC,CAAvB,CAAR;;sBAEID,UAAUV,UAbpB;;;;;sBAeYY,YAAY,IAAZ,IAAoBC,iBAAiB,IAArC,IAA6CA,iBAAiBD,QAf1E;;;;;;uBAgBgB,CAACA,QAAD,EAAWC,aAAX,EAA0BN,KAAKF,IAAL,CAAUS,SAAV,CAA1B,CAhBhB;;;;;wBAoBgBP,KAAKJ,UAAL,CAAgBJ,aAAhB,EAA+BY,CAA/B,CAAR;2BACW,IAAX;;;;;oBAIED,UAAUV,UAAV,IAAwBY,YAAY,IAAxC,EAA8C;6BACjCJ,CAAX;;;;oBAIED,KAAKH,SAAL,CAAeM,KAAf,CAAJ,EAA2B;kCACTF,CAAhB;;;;oBAIEE,UAAUV,UAAd,EAA0B;0BAChBD,aAAR;;;;mBApCR;;;;;sBAyCQa,YAAY,IAAZ,IAAoBC,iBAAiB,IAArC,IAA6CA,iBAAiBD,QAzCtE;;;;;;uBA0CY,CAACA,QAAD,EAAWC,aAAX,EAA0BN,KAAKF,IAAL,CAAUK,KAAV,CAA1B,CA1CZ;;;;;;;;;;;;;;;;;;;0BAqDIJ,KAAKS,SAAS;;;;;;0CACa,KAAKC,KAAL,CAAWV,GAAX,CAA/B,4GAAgD;;;cAAtCW,KAAsC;cAA/BC,GAA+B;cAA1Bb,IAA0B;;;;;;+CAC9BA,IAAhB,iHAAsB;kBAAbc,GAAa;;kBAChB,OAAOJ,QAAQI,GAAR,CAAP,KAAwB,UAA5B,EAAwC;wBAC9BA,GAAR,EAAaF,KAAb,EAAoBC,GAApB,EAAyBZ,IAAIc,KAAJ,CAAUH,KAAV,EAAiBC,MAAM,CAAvB,CAAzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/dfa/package.json b/pitfall/pdfkit/node_modules/dfa/package.json new file mode 100644 index 00000000..63b1010b --- /dev/null +++ b/pitfall/pdfkit/node_modules/dfa/package.json @@ -0,0 +1,110 @@ +{ + "_args": [ + [ + { + "raw": "dfa@^1.0.0", + "scope": null, + "escapedName": "dfa", + "name": "dfa", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/fontkit" + ] + ], + "_from": "dfa@>=1.0.0 <2.0.0", + "_id": "dfa@1.0.0", + "_inCache": true, + "_location": "/dfa", + "_nodeVersion": "6.2.2", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/dfa-1.0.0.tgz_1476244247858_0.509749905904755" + }, + "_npmUser": { + "name": "devongovett", + "email": "devongovett@gmail.com" + }, + "_npmVersion": "3.9.5", + "_phantomChildren": {}, + "_requested": { + "raw": "dfa@^1.0.0", + "scope": null, + "escapedName": "dfa", + "name": "dfa", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fontkit" + ], + "_resolved": "https://registry.npmjs.org/dfa/-/dfa-1.0.0.tgz", + "_shasum": "1e8665a345f967bee13a8850f40592ec4fe447df", + "_shrinkwrap": null, + "_spec": "dfa@^1.0.0", + "_where": "/Users/MB/git/pdfkit/node_modules/fontkit", + "author": { + "name": "Devon Govett", + "email": "devongovett@gmail.com" + }, + "bugs": { + "url": "https://github.com/devongovett/dfa/issues" + }, + "dependencies": { + "babel-runtime": "^6.11.6" + }, + "description": "A state machine compiler", + "devDependencies": { + "babel-core": "^6.17.0", + "babel-plugin-transform-runtime": "^6.15.0", + "babel-polyfill": "^6.16.0", + "babel-preset-es2015": "^6.16.0", + "babel-register": "^6.16.3", + "mocha": "^3.1.0", + "pegjs": "^0.10.0", + "rollup": "^0.36.1", + "rollup-plugin-babel": "^2.6.1", + "rollup-plugin-commonjs": "^5.0.4", + "rollup-plugin-local-resolve": "^1.0.7" + }, + "directories": {}, + "dist": { + "shasum": "1e8665a345f967bee13a8850f40592ec4fe447df", + "tarball": "https://registry.npmjs.org/dfa/-/dfa-1.0.0.tgz" + }, + "files": [ + "index.js", + "index.js.map", + "compile.js", + "compile.js.map" + ], + "gitHead": "ebec316da8370c4a39c4ab2e5febf50387a77418", + "homepage": "https://github.com/devongovett/dfa#readme", + "keywords": [ + "state", + "machine", + "compiler" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "devongovett", + "email": "devongovett@gmail.com" + } + ], + "name": "dfa", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/devongovett/dfa.git" + }, + "scripts": { + "prepublish": "make", + "test": "mocha --require babel-register --require babel-polyfill" + }, + "version": "1.0.0" +} diff --git a/pitfall/pdfkit/node_modules/domain-browser/.eslintrc.js b/pitfall/pdfkit/node_modules/domain-browser/.eslintrc.js new file mode 100644 index 00000000..b6238861 --- /dev/null +++ b/pitfall/pdfkit/node_modules/domain-browser/.eslintrc.js @@ -0,0 +1,701 @@ +// 2015 December 1 +// https://github.com/bevry/base +// http://eslint.org +/* eslint no-warning-comments: 0 */ +'use strict' + +const IGNORE = 0, WARN = 1, ERROR = 2, MAX_PARAMS = 4 + +module.exports = { + // parser: 'babel-eslint', + // ^ the bundled ESLINT parser is now actually quite good, and supports the ecmaFeatures property + ecmaFeatures: { + // this property only works with the bundled ESLINT parser, not babel-eslint + arrowFunctions: true, + binaryLiterals: true, + blockBindings: true, + classes: true, + defaultParams: true, + destructuring: true, + forOf: true, + generators: true, + modules: false, // Disabled due to https://twitter.com/balupton/status/671519915795345410 + objectLiteralComputedProperties: true, + objectLiteralDuplicateProperties: true, + objectLiteralShorthandMethods: true, + objectLiteralShorthandProperties: true, + octalLiterals: true, + regexUFlag: true, + regexYFlag: true, + restParams: true, + spread: true, + superInFunctions: true, + templateStrings: true, + unicodeCodePointEscapes: true, + globalReturn: true, + jsx: true, + experimentalObjectRestSpread: true + }, + env: { + browser: true, + node: true, + es6: true, + commonjs: true, + amd: true + }, + rules: { + // ---------------------------- + // Problems with these rules + // If we can figure out how to enable the following, that would be great + + // Two spaces after one line if or else: + // if ( blah ) return + // Insead of one space: + // if ( blah ) return + + // No spaces on embedded function: + // .forEach(function(key, value){ + // instead of: + // .forEach(function (key, value) { + + // Else and catch statements on the same line as closing brace: + // } else { + // } catch (e) { + // instead of: + // } + // else { + + + // -------------------------------------- + // Possible Errors + // The following rules point out areas where you might have made mistakes. + + // ES6 supports dangling commas + 'comma-dangle': IGNORE, + + // Don't allow assignments in conditional statements (if, while, etc.) + 'no-cond-assign': [ERROR, 'always'], + + // Warn but don't error about console statements + 'no-console': WARN, + + // Allow while(true) loops + 'no-constant-condition': IGNORE, + + // Seems like a good idea to error about this + 'no-control-regex': ERROR, + + // Warn but don't error about console statements + 'no-debugger': WARN, + + // Don't allow duplicate arguments in a function, they can cause errors + 'no-dupe-args': ERROR, + + // Disallow duplicate keys in an object, they can cause errors + 'no-dupe-keys': ERROR, + + // Disallow duplicate case statements in a switch + 'no-duplicate-case': ERROR, + + // Disallow empty [] in regular expressions as they cause unexpected behaviour + 'no-empty-character-class': ERROR, + + // Allow empty block statements, they are useful for clarity + 'no-empty': IGNORE, + + // Overwriting the exception argument in a catch statement can cause memory leaks in some browsers + 'no-ex-assign': ERROR, + + // Disallow superflous boolean casts, they offer no value + 'no-extra-boolean-cast': ERROR, + + // Allow superflous parenthesis as they offer clarity in some cases + 'no-extra-parens': IGNORE, + + // Disallow superflous semicolons, they offer no value + 'no-extra-semi': IGNORE, + + // Seems like a good idea to error about this + 'no-func-assign': ERROR, + + // Seems like a good idea to error about this + 'no-inner-declarations': ERROR, + + // Seems like a good idea to error about this + 'no-invalid-regexp': ERROR, + + // Seems like a good idea to error about this + 'no-irregular-whitespace': ERROR, + + // Seems like a good idea to error about this + 'no-negated-in-lhs': ERROR, + + // Seems like a good idea to error about this + 'no-obj-calls': ERROR, + + // Seems like a good idea to error about this + // Instead of / / used / {ERROR}/ instead + 'no-regex-spaces': ERROR, + + // Seems like a good idea to error about this + 'no-sparse-arrays': ERROR, + + // Seems like a good idea to error about this + 'no-unexpected-multiline': ERROR, + + // Seems like a good idea to error about this + 'no-unreachable': ERROR, + + // Seems like a good idea to error about this + 'use-isnan': ERROR, + + // We use YUIdoc, not JSDoc + 'valid-jsdoc': IGNORE, + + // Seems like a good idea to error about this + 'valid-typeof': ERROR, + + + // -------------------------------------- + // Best Practices + // These are rules designed to prevent you from making mistakes. They either prescribe a better way of doing something or help you avoid footguns. + + // Meh + 'accessor-pairs': IGNORE, + + // This rule seems buggy + 'block-scoped-var': IGNORE, + + // Disable complexity checks, they are annoying and not that useful in detecting actual complexity + 'complexity': IGNORE, + + // We use blank returns for break statements + 'consistent-return': IGNORE, + + // Always require curly braces unless the statement is all on a single line + 'curly': [ERROR, 'multi-line'], + + // If we don't have a default cause, it probably means we should throw an error + 'default-case': ERROR, + + // Dots should be on the newlines + // chainableThingy + // .doSomething() + // .doSomethingElse() + 'dot-location': [ERROR, 'property'], + + // Use dot notation where possible + 'dot-notation': ERROR, + + // Unless you are doing == null, then force === to avoid truthy/falsey mistakes + 'eqeqeq': [ERROR, 'allow-null'], + + // Always use hasOwnProperty when doing for in + 'guard-for-in': ERROR, + + // Warn about alert statements in our code + // Use one of the suggested alternatives instead + // Reasoning is they could be mistaken for left over debugging statements + 'no-alert': WARN, + + // They are very slow + 'no-caller': ERROR, + + // Wow... + 'no-case-declarations': ERROR, + + // Seems like a good idea to error about this + 'no-div-regex': ERROR, + + // Returns in else statements offer code clarity, so disable this rule + 'no-else-return': IGNORE, + + // Seems like a good idea to error about this + 'no-empty-label': ERROR, + + // Seems sensible + 'no-empty-pattern': ERROR, + + // We know that == null is a null and undefined check + 'no-eq-null': IGNORE, + + // Eval is slow and unsafe, use vm's instead + 'no-eval': ERROR, + + // There is never a good reason for this + 'no-extend-native': ERROR, + + // Don't allow useless binds + 'no-extra-bind': ERROR, + + // Don't allow switch case statements to follow through, use continue keyword instead + 'no-fallthrough': ERROR, + + // Use zero when doing decimals, otherwise it is confusing + 'no-floating-decimal': ERROR, + + // Cleverness is unclear + 'no-implicit-coercion': ERROR, + + // A sneaky way to do evals + 'no-implied-eval': ERROR, + + // This throws for a lot of senseless things, like chainy functions + 'no-invalid-this': IGNORE, + + // Use proper iterators instead + 'no-iterator': ERROR, + + // We never use this, it seems silly to allow this + 'no-labels': ERROR, + + // We never use this, it seems silly to allow this + 'no-lone-blocks': ERROR, + + // Loop functions always cause problems, as the scope isn't clear through iterations + 'no-loop-func': ERROR, + + // This is a great idea + // Although ignore -1 and 0 as it is common with indexOf + 'no-magic-numbers': [WARN, { ignore: [-1, 0] }], + + // We like multi spaces for clarity + // E.g. We like + // if ( blah ) return foo + // Instead of: + // if ( blah ) return foo + // @TODO would be great to enforce the above + 'no-multi-spaces': IGNORE, + + // Use ES6 template strings instead + 'no-multi-str': ERROR, + + // Would be silly to allow this + 'no-native-reassign': ERROR, + + // We never use this, it seems silly to allow this + 'no-new-func': ERROR, + + // We never use this, it seems silly to allow this + 'no-new-wrappers': ERROR, + + // We never use this, it seems silly to allow this + 'no-new': ERROR, + + // We never use this, it seems silly to allow this + 'no-octal-escape': ERROR, + + // We never use this, it seems silly to allow this + 'no-octal': ERROR, + + // We got to be pretty silly if we don't realise we are doing this + // As such, take any usage as intentional and aware + 'no-param-reassign': IGNORE, + + // We use process.env wisely + 'no-process-env': IGNORE, + + // We never use this, it seems silly to allow this + 'no-proto': ERROR, + + // We never use this, it seems silly to allow this + 'no-redeclare': ERROR, + + // We never use this, it seems silly to allow this + 'no-return-assign': ERROR, + + // We never use this, it seems silly to allow this + 'no-script-url': ERROR, + + // We never use this, it seems silly to allow this + 'no-self-compare': ERROR, + + // We never use this, it seems silly to allow this + 'no-sequences': ERROR, + + // We always want proper error objects as they have stack traces and respond to instanceof Error checks + 'no-throw-literal': ERROR, + + // We never use this, it seems silly to allow this + 'no-unused-expressions': ERROR, + + // Seems sensible + 'no-useless-call': ERROR, + + // Seems sensible + 'no-useless-concat': ERROR, + + // We never use this, it seems silly to allow this + 'no-void': ERROR, + + // Warn about todos + 'no-warning-comments': [WARN, { terms: ['todo', 'fixme'], location: 'anywhere' }], + + // We never use this, it seems silly to allow this + 'no-with': ERROR, + + // Always specify a radix to avoid errors + 'radix': ERROR, + + // We appreciate the clarity late defines offer + 'vars-on-top': IGNORE, + + // Wrap instant called functions in parenthesis for clearer intent + 'wrap-iife': ERROR, + + // Because we force === and never allow assignments in conditions + // we have no need for yoda statements, so disable them + 'yoda': [ERROR, 'never'], + + + // -------------------------------------- + // Strict Mode + // These rules relate to using strict mode. + + // Ensure that use strict is specified to prevent the runtime erorr: + // SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode + 'strict': [ERROR, 'global'], + + + // -------------------------------------- + // Variables + // These rules have to do with variable declarations. + + // We don't care + 'init-declaration': IGNORE, + + // Don't allow the catch method to shadow objects as browsers handle this differently + // Update: We don't care for IE8 + 'no-catch-shadow': IGNORE, + + // Don't use delete, it disables optimisations + 'no-delete-var': ERROR, + + // We never use this, it seems silly to allow this + 'no-label-var': ERROR, + + // We never use this, it seems silly to allow this + 'no-shadow-restricted-names': ERROR, + + // We use shadowing + 'no-shadow': IGNORE, + + // Makes sense + 'no-undef-init': ERROR, + + // Error when an undefined variable is used + 'no-undef': ERROR, + + // typeof blah === 'undefined' should always be used + 'no-undefined': ERROR, + + // Warn us when we don't use something + 'no-unused-vars': WARN, + + // Error when we try and use something before it is defined + 'no-use-before-define': ERROR, + + + // -------------------------------------- + // Node.js and CommonJS + // These rules are specific to JavaScript running on Node.js or using CommonJS in the browser. + + // Seems to difficult to enforce + 'callback-return': IGNORE, + + // We use require where it is appropriate to use it + 'global-require': IGNORE, + + // Force handling of callback errors + 'handle-callback-err': ERROR, + + // @TODO decide if this is good or not + 'no-mixed-requires': ERROR, + + // Disallow error prone syntax + 'no-new-require': ERROR, + + // Always use path.join for windows support + 'no-path-concat': ERROR, + + // We know what we are doing + 'no-process-exit': IGNORE, + + // No need to disallow any modules + 'no-restricted-modules': IGNORE, + + // Sometimes sync methods are useful, so warn but don't error + 'no-sync': WARN, + + + // -------------------------------------- + // Stylistic + // These rules are purely matters of style and are quite subjective. + + // We don't use spaces with brackets + 'array-bracket-spacing': [ERROR, 'never'], + + // Disallow or enforce spaces inside of single line blocks + 'block-spacing': [ERROR, 'always'], + + // Opening brace on same line, closing brace on its own line, except when statement is a single line + 'brace-style': [ERROR, 'stroustrup', { allowSingleLine: true }], + + // Use camel case + 'camelcase': ERROR, + + // Require a comma after always + 'comma-spacing': [ERROR, { before: false, after: true }], + + // Commas go last, we have tooling to detect if we forget a comma + 'comma-style': [ERROR, 'last'], + + // Require or disallow padding inside computed properties + 'computed-property-spacing': [ERROR, 'never'], + + // Enabling this was incredibly annoying when doing layers of nesting + 'consistent-this': IGNORE, + + // Enable to make UNIX people's lives easier + 'eol-last': ERROR, + + // We like anonymous functions + 'func-names': IGNORE, + + // Prefer to define functions via variables + 'func-style': [WARN, 'declaration'], + + // Sometimes short names are appropriate + 'id-length': IGNORE, + + // Camel case handles this for us + 'id-match': IGNORE, + + // Use tabs and indent case blocks + 'indent': [ERROR, 'tab', { SwitchCase: WARN }], + + // Prefer double qoutes for JSX properties: , + 'jsx-quotes': [ERROR, 'prefer-double'], + + // Space after the colon + 'key-spacing': [ERROR, { + beforeColon: false, + afterColon: true + }], + + // Enforce unix line breaks + 'linebreak-style': [ERROR, 'unix'], + + // Enforce new lines before block comments + 'lines-around-comment': [ERROR, { beforeBlockComment: true, allowBlockStart: true }], + + // Disabled to ensure consistency with complexity option + 'max-depth': IGNORE, + + // We use soft wrap + 'max-len': IGNORE, + + // We are smart enough to know if this is bad or not + 'max-nested-callbacks': IGNORE, + + // Sometimes we have no control over this for compat reasons, so just warn + 'max-params': [WARN, MAX_PARAMS], + + // We should be able to use whatever feels right + 'max-statements': IGNORE, + + // Constructors should be CamelCase + 'new-cap': ERROR, + + // Always use parens when instantiating a class + 'new-parens': ERROR, + + // Too difficult to enforce correctly as too many edge-cases + 'newline-after-var': IGNORE, + + // Don't use the array constructor when it is not needed + 'no-array-constructor': ERROR, + + // We never use bitwise, they are too clever + 'no-bitwise': ERROR, + + // We use continue + 'no-continue': IGNORE, + + // We like inline comments + 'no-inline-comments': IGNORE, + + // The code could be optimised if this error occurs + 'no-lonely-if': ERROR, + + // Don't mix spaces and tabs + // @TODO maybe [ERROR, 'smart-tabs'] will be better, we will see + 'no-mixed-spaces-and-tabs': ERROR, + + // We use multiple empty lines for styling + 'no-multiple-empty-lines': IGNORE, + + // Sometimes it is more understandable with a negated condition + 'no-negated-condition': IGNORE, + + // Sometimes these are useful + 'no-nested-ternary': IGNORE, + + // Use {} instead of new Object() + 'no-new-object': ERROR, + + // We use plus plus + 'no-plusplus': IGNORE, + + // Handled by other rules + 'no-restricted-syntax': IGNORE, + + // We never use this, it seems silly to allow this + 'no-spaced-func': ERROR, + + // Sometimes ternaries are useful + 'no-ternary': IGNORE, + + // Disallow trailing spaces + 'no-trailing-spaces': ERROR, + + // Sometimes this is useful when avoiding shadowing + 'no-underscore-dangle': IGNORE, + + // Sensible + 'no-unneeded-ternary': ERROR, + + // Desirable, but too many edge cases it turns out where it is actually preferred + 'object-curly-spacing': IGNORE, // [ERROR, 'always'], + + // We like multiple var statements + 'one-var': IGNORE, + + // Force use of shorthands when available + 'operator-assignment': [ERROR, 'always'], + + // Should be before, but not with =, *=, /=, += lines + // @TODO figure out how to enforce + 'operator-linebreak': IGNORE, + + // This rule doesn't appear to work correclty + 'padded-blocks': IGNORE, + + // Seems like a good idea to error about this + 'quote-props': [ERROR, 'consistent-as-needed'], + + // Use single quotes where escaping isn't needed + 'quotes': [ERROR, 'single', 'avoid-escape'], + + // We use YUIdoc + 'require-jsdoc': IGNORE, + + // If semi's are used, then add spacing after + 'semi-spacing': [ERROR, { before: false, after: true }], + + // Never use semicolons + 'semi': [ERROR, 'never'], + + // We don't care if our vars are alphabetical + 'sort-vars': IGNORE, + + // Always force a space after a keyword + 'space-after-keywords': [ERROR, 'always'], + + // Always force a space before a { + 'space-before-blocks': [ERROR, 'always'], + + // function () {, get blah () { + 'space-before-function-paren': [ERROR, 'always'], + + // We do this + 'space-before-keywords': [ERROR, 'always'], + + // This is for spacing between [], so [ WARN, ERROR, 3 ] which we don't want + 'space-in-brackets': IGNORE, + + // This is for spacing between (), so doSomething( WARN, ERROR, 3 ) or if ( WARN === 3 ) + // which we want for ifs, but don't want for calls + 'space-in-parens': IGNORE, + + // We use this + 'space-infix-ops': ERROR, + + // We use this + 'space-return-throw-case': ERROR, + + // We use this + 'space-unary-ops': ERROR, + + // We use this + // 'spaced-line-comment': ERROR, + 'spaced-comment': ERROR, + + // We use this + // @TODO revise this + 'wrap-regex': ERROR, + + + // -------------------------------------- + // ECMAScript 6 + + // Sensible to create more informed and clear code + 'arrow-body-style': [ERROR, 'as-needed'], + + // We do this, no reason why, just what we do + 'arrow-parens': [ERROR, 'always'], + + // Require consistent spacing for arrow functions + 'arrow-spacing': ERROR, + + // Makes sense as otherwise runtime error will occur + 'constructor-super': ERROR, + + // Seems the most consistent location for it + 'generator-star-spacing': [ERROR, 'before'], + + // Seems sensible + 'no-arrow-condition': ERROR, + + // Seems sensible + 'no-class-assign': ERROR, + + // Makes sense as otherwise runtime error will occur + 'no-const-assign': ERROR, + + // Makes sense as otherwise runtime error will occur + 'no-dupe-class-members': ERROR, + + // Makes sense as otherwise runtime error will occur + 'no-this-before-super': ERROR, + + // @TODO This probably should be an error + // however it is useful for: for ( var key in obj ) { + // which hopefully is more performant than let (@TODO check if it actually is more performant) + 'no-var': WARN, + + // Enforce ES6 object shorthand + 'object-shorthand': ERROR, + + // Better performance when running native + // but horrible performance if not running native as could fallback to bind + // https://travis-ci.org/bevry/es6-benchmarks + 'prefer-arrow-callback': IGNORE, + + // Sure, why not + 'prefer-const': WARN, + + // Controversial change, but makes sense to move towards to reduce the risk of bad people overwriting apply and call + // https://github.com/eslint/eslint/issues/ERROR939 + 'prefer-reflect': WARN, + + // Sure, why not + 'prefer-spread': ERROR, + + // Too annoying to enforce + 'prefer-template': IGNORE, + + // Makes sense + 'require-yield': ERROR + } +} diff --git a/pitfall/pdfkit/node_modules/domain-browser/.npmignore b/pitfall/pdfkit/node_modules/domain-browser/.npmignore new file mode 100644 index 00000000..27859c14 --- /dev/null +++ b/pitfall/pdfkit/node_modules/domain-browser/.npmignore @@ -0,0 +1,44 @@ +# 2015 September 18 +# https://github.com/bevry/base + +# Temp Files +**/.docpad.db +**/out.* +**/*.log +**/*.cpuprofile +**/*.heapsnapshot + +# Build Files +build/ +components/ +bower_components/ +node_modules/ + +# Private Files +.env + +# Development Files +.editorconfig +.eslintrc +.jshintrc +.jscrc +coffeelint.json +.travis* +nakefile.js +Cakefile +Makefile +BACKERS.md +CONTRIBUTING.md +HISTORY.md +**/src/ +**/test/ + +# Other Package Definitions +template.js +component.json +bower.json + +# ===================================== +# CUSTOM MODIFICATIONS + +# None diff --git a/pitfall/pdfkit/node_modules/domain-browser/HISTORY.md b/pitfall/pdfkit/node_modules/domain-browser/HISTORY.md new file mode 100644 index 00000000..758a44fc --- /dev/null +++ b/pitfall/pdfkit/node_modules/domain-browser/HISTORY.md @@ -0,0 +1,42 @@ +# History + +## v1.1.7 2015 December 12 +- Revert minimum node version from 0.12 back to 0.4 + - Thanks to [Alexander Sorokin](https://github.com/syrnick) for [this comment](https://github.com/bevry/domain-browser/commit/c66ee3445e87955e70d0d60d4515f2d26a81b9c4#commitcomment-14938325) + +## v1.1.6 2015 December 12 +- Fixed `assert-helpers` sneaking into `dependencies` + - Thanks to [Bogdan Chadkin](https://github.com/TrySound) for [Pull Request #8](https://github.com/bevry/domain-browser/pull/8) + +## v1.1.5 2015 December 9 +- Updated internal conventions +- Added better jspm support + - Thanks to [Guy Bedford](https://github.com/guybedford) for [Pull Request #7](https://github.com/bevry/domain-browser/pull/7) + +## v1.1.4 2015 February 3 +- Added + - `domain.enter()` + - `domain.exit()` + - `domain.bind()` + - `domain.intercept()` + +## v1.1.3 2014 October 10 +- Added + - `domain.add()` + - `domain.remove()` + +## v1.1.2 2014 June 8 +- Added `domain.createDomain()` alias + - Thanks to [James Halliday](https://github.com/substack) for [Pull Request #1](https://github.com/bevry/domain-browser/pull/1) + +## v1.1.1 2013 December 27 +- Fixed `domain.create()` not returning anything + +## v1.1.0 2013 November 1 +- Dropped component.io and bower support, just use ender or browserify + +## v1.0.1 2013 September 18 +- Now called `domain-browser` everywhere + +## v1.0.0 2013 September 18 +- Initial release diff --git a/pitfall/pdfkit/node_modules/domain-browser/LICENSE.md b/pitfall/pdfkit/node_modules/domain-browser/LICENSE.md new file mode 100644 index 00000000..08d8802a --- /dev/null +++ b/pitfall/pdfkit/node_modules/domain-browser/LICENSE.md @@ -0,0 +1,23 @@ + + +

    License

    + +Unless stated otherwise all works are: + +
    + +and licensed under: + + + +

    MIT License

    + +
    +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
    +
    +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
    +
    +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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.
    +
    + + diff --git a/pitfall/pdfkit/node_modules/domain-browser/README.md b/pitfall/pdfkit/node_modules/domain-browser/README.md new file mode 100644 index 00000000..43502eff --- /dev/null +++ b/pitfall/pdfkit/node_modules/domain-browser/README.md @@ -0,0 +1,111 @@ + + +

    domain-browser

    + + + + + + +Travis CI Build Status +NPM version +NPM downloads +Dependency Status +Dev Dependency Status +
    +Slack community badge +Patreon donate button +Gratipay donate button +Flattr donate button +PayPal donate button +Bitcoin donate button +Wishlist browse button + + + + + + +Node's domain module for the web browser. This is merely an evented try...catch with the same API as node, nothing more. + + + + + + +

    Install

    + +

    NPM

      +
    • Install: npm install --save domain-browser
    • +
    • Use: require('domain-browser')
    + +

    Browserify

      +
    • Install: npm install --save domain-browser
    • +
    • Use: require('domain-browser')
    • +
    • CDN URL: //wzrd.in/bundle/domain-browser@1.1.7
    + +

    Ender

      +
    • Install: ender add domain-browser
    • +
    • Use: require('domain-browser')
    + + + + + + +

    History

    + +Discover the release history by heading on over to the HISTORY.md file. + + + + + + +

    Backers

    + +

    Maintainers

    + +These amazing people are maintaining this project: + + + +

    Sponsors

    + +No sponsors yet! Will you be the first? + +Patreon donate button +Gratipay donate button +Flattr donate button +PayPal donate button +Bitcoin donate button +Wishlist browse button + +

    Contributors

    + +These amazing people have contributed code to this project: + + + +Discover how you can contribute by heading on over to the CONTRIBUTING.md file. + + + + + + +

    License

    + +Unless stated otherwise all works are: + + + +and licensed under: + + + + diff --git a/pitfall/pdfkit/node_modules/domain-browser/index.js b/pitfall/pdfkit/node_modules/domain-browser/index.js new file mode 100644 index 00000000..f6cd7f7d --- /dev/null +++ b/pitfall/pdfkit/node_modules/domain-browser/index.js @@ -0,0 +1,69 @@ +// This file should be ES5 compatible +/* eslint prefer-spread:0, no-var:0, prefer-reflect:0, no-magic-numbers:0 */ +'use strict' +module.exports = (function () { + // Import Events + var events = require('events') + + // Export Domain + var domain = {} + domain.createDomain = domain.create = function () { + var d = new events.EventEmitter() + + function emitError (e) { + d.emit('error', e) + } + + d.add = function (emitter) { + emitter.on('error', emitError) + } + d.remove = function (emitter) { + emitter.removeListener('error', emitError) + } + d.bind = function (fn) { + return function () { + var args = Array.prototype.slice.call(arguments) + try { + fn.apply(null, args) + } + catch (err) { + emitError(err) + } + } + } + d.intercept = function (fn) { + return function (err) { + if ( err ) { + emitError(err) + } + else { + var args = Array.prototype.slice.call(arguments, 1) + try { + fn.apply(null, args) + } + catch (err) { + emitError(err) + } + } + } + } + d.run = function (fn) { + try { + fn() + } + catch (err) { + emitError(err) + } + return this + } + d.dispose = function () { + this.removeAllListeners() + return this + } + d.enter = d.exit = function () { + return this + } + return d + } + return domain +}).call(this) diff --git a/pitfall/pdfkit/node_modules/domain-browser/package.json b/pitfall/pdfkit/node_modules/domain-browser/package.json new file mode 100644 index 00000000..9d2ffeea --- /dev/null +++ b/pitfall/pdfkit/node_modules/domain-browser/package.json @@ -0,0 +1,181 @@ +{ + "_args": [ + [ + { + "raw": "domain-browser@~1.1.0", + "scope": null, + "escapedName": "domain-browser", + "name": "domain-browser", + "rawSpec": "~1.1.0", + "spec": ">=1.1.0 <1.2.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/browserify" + ] + ], + "_from": "domain-browser@>=1.1.0 <1.2.0", + "_id": "domain-browser@1.1.7", + "_inCache": true, + "_location": "/domain-browser", + "_nodeVersion": "5.2.0", + "_npmUser": { + "name": "balupton", + "email": "b@lupton.cc" + }, + "_npmVersion": "3.5.1", + "_phantomChildren": {}, + "_requested": { + "raw": "domain-browser@~1.1.0", + "scope": null, + "escapedName": "domain-browser", + "name": "domain-browser", + "rawSpec": "~1.1.0", + "spec": ">=1.1.0 <1.2.0", + "type": "range" + }, + "_requiredBy": [ + "/browserify" + ], + "_resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz", + "_shasum": "867aa4b093faa05f1de08c06f4d7b21fdf8698bc", + "_shrinkwrap": null, + "_spec": "domain-browser@~1.1.0", + "_where": "/Users/MB/git/pdfkit/node_modules/browserify", + "author": { + "name": "2013+ Bevry Pty Ltd", + "email": "us@bevry.me", + "url": "http://bevry.me" + }, + "badges": { + "list": [ + "travisci", + "npmversion", + "npmdownloads", + "daviddm", + "daviddmdev", + "---", + "slackin", + "patreon", + "gratipay", + "flattr", + "paypal", + "bitcoin", + "wishlist" + ], + "config": { + "patreonUsername": "bevry", + "gratipayUsername": "bevry", + "flattrCode": "344188/balupton-on-Flattr", + "paypalButtonID": "QB8GQPZAH84N6", + "bitcoinURL": "https://bevry.me/bitcoin", + "wishlistURL": "https://bevry.me/wishlist", + "slackinURL": "https://slack.bevry.me" + } + }, + "browsers": true, + "bugs": { + "url": "https://github.com/bevry/domain-browser/issues" + }, + "contributors": [ + { + "name": "Benjamin Lupton", + "email": "b@lupton.cc", + "url": "http://balupton.com" + }, + { + "name": "Evan Solomon", + "url": "http://evansolomon.me" + }, + { + "name": "James Halliday", + "email": "substack@gmail.com", + "url": "http://substack.net/" + }, + { + "name": "Guy Bedford", + "email": "guybedford@gmail.com", + "url": "twitter.com/guybedford" + }, + { + "name": "Bogdan Chadkin", + "email": "trysound@yandex.ru", + "url": "https://github.com/TrySound" + } + ], + "dependencies": {}, + "description": "Node's domain module for the web browser. This is merely an evented try...catch with the same API as node, nothing more.", + "devDependencies": { + "assert-helpers": "^4.1.0", + "eslint": "^1.10.3", + "joe": "^1.6.0", + "joe-reporter-console": "^1.2.1", + "projectz": "^1.0.8" + }, + "directories": {}, + "dist": { + "shasum": "867aa4b093faa05f1de08c06f4d7b21fdf8698bc", + "tarball": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.1.7.tgz" + }, + "engines": { + "node": ">=0.4", + "npm": ">=1.2" + }, + "gitHead": "9b7f0590a10569078b1b3b5c33f201f0a59d9822", + "homepage": "https://github.com/bevry/domain-browser", + "jspm": { + "map": { + "./index.js": { + "node": "@node/domain" + } + } + }, + "keywords": [ + "domain", + "trycatch", + "try", + "catch", + "node-compat", + "ender.js", + "component", + "component.io", + "umd", + "amd", + "require.js", + "browser" + ], + "license": "MIT", + "main": "./index.js", + "maintainers": [ + { + "name": "balupton", + "email": "b@lupton.cc" + }, + { + "name": "substack", + "email": "mail@substack.net" + }, + { + "name": "evansolomon", + "email": "evan@evanalyze.com" + } + ], + "name": "domain-browser", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/bevry/domain-browser.git" + }, + "scripts": { + "clean": "node --harmony nakefile.js clean", + "compile": "node --harmony nakefile.js compile", + "meta": "node --harmony nakefile.js meta", + "prepare": "node --harmony nakefile.js prepare", + "release": "node --harmony nakefile.js release", + "setup": "node --harmony nakefile.js setup", + "test": "node --harmony ./test.js", + "verify": "node --harmony nakefile.js verify", + "watch": "node --harmony nakefile.js watch" + }, + "version": "1.1.7" +} diff --git a/pitfall/pdfkit/node_modules/domain-browser/test.js b/pitfall/pdfkit/node_modules/domain-browser/test.js new file mode 100644 index 00000000..70efcfcf --- /dev/null +++ b/pitfall/pdfkit/node_modules/domain-browser/test.js @@ -0,0 +1,100 @@ +/* eslint handle-callback-err:0, no-magic-numbers:0, no-unused-vars:0 */ +'use strict' + +// Import +const events = require('events') +const equal = require('assert-helpers').equal +const joe = require('joe') +const domain = require('./') + +// ===================================== +// Tests + +joe.describe('domain-browser', function (describe, it) { + it('should work on throws', function (done) { + const d = domain.create() + d.on('error', function (err) { + equal(err && err.message, 'a thrown error', 'error message') + done() + }) + d.run(function () { + throw new Error('a thrown error') + }) + }) + + it('should be able to add emitters', function (done) { + const d = domain.create() + const emitter = new events.EventEmitter() + + d.add(emitter) + d.on('error', function (err) { + equal(err && err.message, 'an emitted error', 'error message') + done() + }) + + emitter.emit('error', new Error('an emitted error')) + }) + + it('should be able to remove emitters', function (done) { + const emitter = new events.EventEmitter() + const d = domain.create() + let domainGotError = false + + d.add(emitter) + d.on('error', function (err) { + domainGotError = true + }) + + emitter.on('error', function (err) { + equal(err && err.message, 'This error should not go to the domain', 'error message') + + // Make sure nothing race condition-y is happening + setTimeout(function () { + equal(domainGotError, false, 'no domain error') + done() + }, 0) + }) + + d.remove(emitter) + emitter.emit('error', new Error('This error should not go to the domain')) + }) + + it('bind should work', function (done) { + const d = domain.create() + d.on('error', function (err) { + equal(err && err.message, 'a thrown error', 'error message') + done() + }) + d.bind(function (err, a, b) { + equal(err && err.message, 'a passed error', 'error message') + equal(a, 2, 'value of a') + equal(b, 3, 'value of b') + throw new Error('a thrown error') + })(new Error('a passed error'), 2, 3) + }) + + it('intercept should work', function (done) { + const d = domain.create() + let count = 0 + d.on('error', function (err) { + if ( count === 0 ) { + equal(err && err.message, 'a thrown error', 'error message') + } + else if ( count === 1 ) { + equal(err && err.message, 'a passed error', 'error message') + done() + } + count++ + }) + + d.intercept(function (a, b) { + equal(a, 2, 'value of a') + equal(b, 3, 'value of b') + throw new Error('a thrown error') + })(null, 2, 3) + + d.intercept(function (a, b) { + throw new Error('should never reach here') + })(new Error('a passed error'), 2, 3) + }) +}) diff --git a/pitfall/pdfkit/node_modules/duplexer/.npmignore b/pitfall/pdfkit/node_modules/duplexer/.npmignore new file mode 100644 index 00000000..062c11e8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/duplexer/.npmignore @@ -0,0 +1,3 @@ +node_modules +*.log +*.err \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/duplexer/.travis.yml b/pitfall/pdfkit/node_modules/duplexer/.travis.yml new file mode 100644 index 00000000..ed05f88d --- /dev/null +++ b/pitfall/pdfkit/node_modules/duplexer/.travis.yml @@ -0,0 +1,6 @@ +language: node_js +node_js: + - "0.11" + - "0.10" + - "0.8" + - "0.6" diff --git a/pitfall/pdfkit/node_modules/duplexer/LICENCE b/pitfall/pdfkit/node_modules/duplexer/LICENCE new file mode 100644 index 00000000..a23e08a8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/duplexer/LICENCE @@ -0,0 +1,19 @@ +Copyright (c) 2012 Raynos. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND 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. \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/duplexer/README.md b/pitfall/pdfkit/node_modules/duplexer/README.md new file mode 100644 index 00000000..61ff71aa --- /dev/null +++ b/pitfall/pdfkit/node_modules/duplexer/README.md @@ -0,0 +1,47 @@ +# duplexer + +[![build status][1]][2] [![dependency status][3]][4] + +[![browser support][5]][6] + +Creates a duplex stream + +Taken from [event-stream][7] + +## duplex (writeStream, readStream) + +Takes a writable stream and a readable stream and makes them appear as a readable writable stream. + +It is assumed that the two streams are connected to each other in some way. + +## Example + +```js +var grep = cp.exec('grep Stream') + +duplex(grep.stdin, grep.stdout) +``` + +## Installation + +`npm install duplexer` + +## Tests + +`npm test` + +## Contributors + + - Dominictarr + - Raynos + - samccone + +## MIT Licenced + + [1]: https://secure.travis-ci.org/Raynos/duplexer.png + [2]: https://travis-ci.org/Raynos/duplexer + [3]: https://david-dm.org/Raynos/duplexer.png + [4]: https://david-dm.org/Raynos/duplexer + [5]: https://ci.testling.com/Raynos/duplexer.png + [6]: https://ci.testling.com/Raynos/duplexer + [7]: https://github.com/dominictarr/event-stream#duplex-writestream-readstream diff --git a/pitfall/pdfkit/node_modules/duplexer/index.js b/pitfall/pdfkit/node_modules/duplexer/index.js new file mode 100644 index 00000000..a188a210 --- /dev/null +++ b/pitfall/pdfkit/node_modules/duplexer/index.js @@ -0,0 +1,87 @@ +var Stream = require("stream") +var writeMethods = ["write", "end", "destroy"] +var readMethods = ["resume", "pause"] +var readEvents = ["data", "close"] +var slice = Array.prototype.slice + +module.exports = duplex + +function forEach (arr, fn) { + if (arr.forEach) { + return arr.forEach(fn) + } + + for (var i = 0; i < arr.length; i++) { + fn(arr[i], i) + } +} + +function duplex(writer, reader) { + var stream = new Stream() + var ended = false + + forEach(writeMethods, proxyWriter) + + forEach(readMethods, proxyReader) + + forEach(readEvents, proxyStream) + + reader.on("end", handleEnd) + + writer.on("drain", function() { + stream.emit("drain") + }) + + writer.on("error", reemit) + reader.on("error", reemit) + + stream.writable = writer.writable + stream.readable = reader.readable + + return stream + + function proxyWriter(methodName) { + stream[methodName] = method + + function method() { + return writer[methodName].apply(writer, arguments) + } + } + + function proxyReader(methodName) { + stream[methodName] = method + + function method() { + stream.emit(methodName) + var func = reader[methodName] + if (func) { + return func.apply(reader, arguments) + } + reader.emit(methodName) + } + } + + function proxyStream(methodName) { + reader.on(methodName, reemit) + + function reemit() { + var args = slice.call(arguments) + args.unshift(methodName) + stream.emit.apply(stream, args) + } + } + + function handleEnd() { + if (ended) { + return + } + ended = true + var args = slice.call(arguments) + args.unshift("end") + stream.emit.apply(stream, args) + } + + function reemit(err) { + stream.emit("error", err) + } +} diff --git a/pitfall/pdfkit/node_modules/duplexer/package.json b/pitfall/pdfkit/node_modules/duplexer/package.json new file mode 100644 index 00000000..9626e125 --- /dev/null +++ b/pitfall/pdfkit/node_modules/duplexer/package.json @@ -0,0 +1,115 @@ +{ + "_args": [ + [ + { + "raw": "duplexer@~0.1.1", + "scope": null, + "escapedName": "duplexer", + "name": "duplexer", + "rawSpec": "~0.1.1", + "spec": ">=0.1.1 <0.2.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/browserify" + ] + ], + "_from": "duplexer@>=0.1.1 <0.2.0", + "_id": "duplexer@0.1.1", + "_inCache": true, + "_location": "/duplexer", + "_npmUser": { + "name": "raynos", + "email": "raynos2@gmail.com" + }, + "_npmVersion": "1.2.18", + "_phantomChildren": {}, + "_requested": { + "raw": "duplexer@~0.1.1", + "scope": null, + "escapedName": "duplexer", + "name": "duplexer", + "rawSpec": "~0.1.1", + "spec": ">=0.1.1 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "/browserify", + "/module-deps/stream-combiner", + "/stream-combiner" + ], + "_resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz", + "_shasum": "ace6ff808c1ce66b57d1ebf97977acb02334cfc1", + "_shrinkwrap": null, + "_spec": "duplexer@~0.1.1", + "_where": "/Users/MB/git/pdfkit/node_modules/browserify", + "author": { + "name": "Raynos", + "email": "raynos2@gmail.com" + }, + "bugs": { + "url": "https://github.com/Raynos/duplexer/issues", + "email": "raynos2@gmail.com" + }, + "contributors": [ + { + "name": "Jake Verbaten" + } + ], + "dependencies": {}, + "description": "Creates a duplex stream", + "devDependencies": { + "tape": "0.3.3", + "through": "~0.1.4" + }, + "directories": {}, + "dist": { + "shasum": "ace6ff808c1ce66b57d1ebf97977acb02334cfc1", + "tarball": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.1.tgz" + }, + "homepage": "https://github.com/Raynos/duplexer", + "keywords": [], + "licenses": [ + { + "type": "MIT", + "url": "http://github.com/Raynos/duplexer/raw/master/LICENSE" + } + ], + "main": "index", + "maintainers": [ + { + "name": "raynos", + "email": "raynos2@gmail.com" + }, + { + "name": "dominictarr", + "email": "dominic.tarr@gmail.com" + } + ], + "name": "duplexer", + "optionalDependencies": {}, + "readme": "# duplexer\n\n[![build status][1]][2] [![dependency status][3]][4]\n\n[![browser support][5]][6]\n\nCreates a duplex stream\n\nTaken from [event-stream][7]\n\n## duplex (writeStream, readStream)\n\nTakes a writable stream and a readable stream and makes them appear as a readable writable stream.\n\nIt is assumed that the two streams are connected to each other in some way.\n\n## Example\n\n```js\nvar grep = cp.exec('grep Stream')\n\nduplex(grep.stdin, grep.stdout)\n```\n\n## Installation\n\n`npm install duplexer`\n\n## Tests\n\n`npm test`\n\n## Contributors\n\n - Dominictarr\n - Raynos\n - samccone\n\n## MIT Licenced\n\n [1]: https://secure.travis-ci.org/Raynos/duplexer.png\n [2]: https://travis-ci.org/Raynos/duplexer\n [3]: https://david-dm.org/Raynos/duplexer.png\n [4]: https://david-dm.org/Raynos/duplexer\n [5]: https://ci.testling.com/Raynos/duplexer.png\n [6]: https://ci.testling.com/Raynos/duplexer\n [7]: https://github.com/dominictarr/event-stream#duplex-writestream-readstream\n", + "readmeFilename": "README.md", + "repository": { + "type": "git", + "url": "git://github.com/Raynos/duplexer.git" + }, + "scripts": { + "test": "node test" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "ie/8..latest", + "firefox/16..latest", + "firefox/nightly", + "chrome/22..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest" + ] + }, + "version": "0.1.1" +} diff --git a/pitfall/pdfkit/node_modules/duplexer/test/index.js b/pitfall/pdfkit/node_modules/duplexer/test/index.js new file mode 100644 index 00000000..4988e0d9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/duplexer/test/index.js @@ -0,0 +1,31 @@ +var through = require("through") +var test = require("tape") + +var duplex = require("../index") + +var readable = through() +var writable = through(write) +var written = 0 +var data = 0 + +var stream = duplex(writable, readable) + +function write() { + written++ +} + +stream.on("data", ondata) + +function ondata() { + data++ +} + +test("emit and write", function(t) { + t.plan(2) + + stream.write() + readable.emit("data") + + t.equal(written, 1, "should have written once") + t.equal(data, 1, "should have recived once") +}) diff --git a/pitfall/pdfkit/node_modules/duplexer2/.npmignore b/pitfall/pdfkit/node_modules/duplexer2/.npmignore new file mode 100644 index 00000000..07e6e472 --- /dev/null +++ b/pitfall/pdfkit/node_modules/duplexer2/.npmignore @@ -0,0 +1 @@ +/node_modules diff --git a/pitfall/pdfkit/node_modules/duplexer2/.travis.yml b/pitfall/pdfkit/node_modules/duplexer2/.travis.yml new file mode 100644 index 00000000..6e5919de --- /dev/null +++ b/pitfall/pdfkit/node_modules/duplexer2/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - "0.10" diff --git a/pitfall/pdfkit/node_modules/duplexer2/LICENSE.md b/pitfall/pdfkit/node_modules/duplexer2/LICENSE.md new file mode 100644 index 00000000..547189a6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/duplexer2/LICENSE.md @@ -0,0 +1,26 @@ +Copyright (c) 2013, Deoxxa Development +====================================== +All rights reserved. +-------------------- + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. Neither the name of Deoxxa Development nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY DEOXXA DEVELOPMENT ''AS IS'' AND ANY +EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL DEOXXA DEVELOPMENT BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/pitfall/pdfkit/node_modules/duplexer2/README.md b/pitfall/pdfkit/node_modules/duplexer2/README.md new file mode 100644 index 00000000..e39e1e9e --- /dev/null +++ b/pitfall/pdfkit/node_modules/duplexer2/README.md @@ -0,0 +1,129 @@ +duplexer2 [![build status](https://travis-ci.org/deoxxa/duplexer2.png)](https://travis-ci.org/deoxxa/fork) +========= + +Like duplexer (http://npm.im/duplexer) but using streams2. + +Overview +-------- + +duplexer2 is a reimplementation of [duplexer](http://npm.im/duplexer) using the +readable-stream API which is standard in node as of v0.10. Everything largely +works the same. + +Installation +------------ + +Available via [npm](http://npmjs.org/): + +> $ npm install duplexer2 + +Or via git: + +> $ git clone git://github.com/deoxxa/duplexer2.git node_modules/duplexer2 + +API +--- + +**duplexer2** + +Creates a new `DuplexWrapper` object, which is the actual class that implements +most of the fun stuff. All that fun stuff is hidden. DON'T LOOK. + +```javascript +duplexer2([options], writable, readable) +``` + +```javascript +var duplex = duplexer2(new stream.Writable(), new stream.Readable()); +``` + +Arguments + +* __options__ - an object specifying the regular `stream.Duplex` options, as + well as the properties described below. +* __writable__ - a writable stream +* __readable__ - a readable stream + +Options + +* __bubbleErrors__ - a boolean value that specifies whether to bubble errors + from the underlying readable/writable streams. Default is `true`. + +Example +------- + +Also see [example.js](https://github.com/deoxxa/duplexer2/blob/master/example.js). + +Code: + +```javascript +var stream = require("stream"); + +var duplexer2 = require("duplexer2"); + +var writable = new stream.Writable({objectMode: true}), + readable = new stream.Readable({objectMode: true}); + +writable._write = function _write(input, encoding, done) { + if (readable.push(input)) { + return done(); + } else { + readable.once("drain", done); + } +}; + +readable._read = function _read(n) { + // no-op +}; + +// simulate the readable thing closing after a bit +writable.once("finish", function() { + setTimeout(function() { + readable.push(null); + }, 500); +}); + +var duplex = duplexer2(writable, readable); + +duplex.on("data", function(e) { + console.log("got data", JSON.stringify(e)); +}); + +duplex.on("finish", function() { + console.log("got finish event"); +}); + +duplex.on("end", function() { + console.log("got end event"); +}); + +duplex.write("oh, hi there", function() { + console.log("finished writing"); +}); + +duplex.end(function() { + console.log("finished ending"); +}); +``` + +Output: + +``` +got data "oh, hi there" +finished writing +got finish event +finished ending +got end event +``` + +License +------- + +3-clause BSD. A copy is included with the source. + +Contact +------- + +* GitHub ([deoxxa](http://github.com/deoxxa)) +* Twitter ([@deoxxa](http://twitter.com/deoxxa)) +* Email ([deoxxa@fknsrs.biz](mailto:deoxxa@fknsrs.biz)) diff --git a/pitfall/pdfkit/node_modules/duplexer2/example.js b/pitfall/pdfkit/node_modules/duplexer2/example.js new file mode 100755 index 00000000..90416e9a --- /dev/null +++ b/pitfall/pdfkit/node_modules/duplexer2/example.js @@ -0,0 +1,49 @@ +#!/usr/bin/env node + +var stream = require("readable-stream"); + +var duplexer2 = require("./"); + +var writable = new stream.Writable({objectMode: true}), + readable = new stream.Readable({objectMode: true}); + +writable._write = function _write(input, encoding, done) { + if (readable.push(input)) { + return done(); + } else { + readable.once("drain", done); + } +}; + +readable._read = function _read(n) { + // no-op +}; + +// simulate the readable thing closing after a bit +writable.once("finish", function() { + setTimeout(function() { + readable.push(null); + }, 500); +}); + +var duplex = duplexer2(writable, readable); + +duplex.on("data", function(e) { + console.log("got data", JSON.stringify(e)); +}); + +duplex.on("finish", function() { + console.log("got finish event"); +}); + +duplex.on("end", function() { + console.log("got end event"); +}); + +duplex.write("oh, hi there", function() { + console.log("finished writing"); +}); + +duplex.end(function() { + console.log("finished ending"); +}); diff --git a/pitfall/pdfkit/node_modules/duplexer2/index.js b/pitfall/pdfkit/node_modules/duplexer2/index.js new file mode 100644 index 00000000..b8fafcb3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/duplexer2/index.js @@ -0,0 +1,62 @@ +var stream = require("readable-stream"); + +var duplex2 = module.exports = function duplex2(options, writable, readable) { + return new DuplexWrapper(options, writable, readable); +}; + +var DuplexWrapper = exports.DuplexWrapper = function DuplexWrapper(options, writable, readable) { + if (typeof readable === "undefined") { + readable = writable; + writable = options; + options = null; + } + + options = options || {}; + options.objectMode = true; + + stream.Duplex.call(this, options); + + this._bubbleErrors = (typeof options.bubbleErrors === "undefined") || !!options.bubbleErrors; + + this._writable = writable; + this._readable = readable; + + var self = this; + + writable.once("finish", function() { + self.end(); + }); + + this.once("finish", function() { + writable.end(); + }); + + readable.on("data", function(e) { + if (!self.push(e)) { + readable.pause(); + } + }); + + readable.once("end", function() { + return self.push(null); + }); + + if (this._bubbleErrors) { + writable.on("error", function(err) { + return self.emit("error", err); + }); + + readable.on("error", function(err) { + return self.emit("error", err); + }); + } +}; +DuplexWrapper.prototype = Object.create(stream.Duplex.prototype, {constructor: {value: DuplexWrapper}}); + +DuplexWrapper.prototype._write = function _write(input, encoding, done) { + this._writable.write(input, encoding, done); +}; + +DuplexWrapper.prototype._read = function _read(n) { + this._readable.resume(); +}; diff --git a/pitfall/pdfkit/node_modules/duplexer2/package.json b/pitfall/pdfkit/node_modules/duplexer2/package.json new file mode 100644 index 00000000..8ad8a42e --- /dev/null +++ b/pitfall/pdfkit/node_modules/duplexer2/package.json @@ -0,0 +1,102 @@ +{ + "_args": [ + [ + { + "raw": "duplexer2@~0.0.2", + "scope": null, + "escapedName": "duplexer2", + "name": "duplexer2", + "rawSpec": "~0.0.2", + "spec": ">=0.0.2 <0.1.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/static-module" + ], + [ + { + "raw": "duplexer2@0.0.2", + "scope": null, + "escapedName": "duplexer2", + "name": "duplexer2", + "rawSpec": "0.0.2", + "spec": "0.0.2", + "type": "version" + }, + "/Users/MB/git/pdfkit/node_modules/module-deps" + ] + ], + "_from": "duplexer2@0.0.2", + "_id": "duplexer2@0.0.2", + "_inCache": true, + "_location": "/duplexer2", + "_npmUser": { + "name": "deoxxa", + "email": "deoxxa@fknsrs.biz" + }, + "_npmVersion": "1.4.3", + "_phantomChildren": {}, + "_requested": { + "raw": "duplexer2@0.0.2", + "scope": null, + "escapedName": "duplexer2", + "name": "duplexer2", + "rawSpec": "0.0.2", + "spec": "0.0.2", + "type": "version" + }, + "_requiredBy": [ + "/module-deps" + ], + "_resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz", + "_shasum": "c614dcf67e2fb14995a91711e5a617e8a60a31db", + "_shrinkwrap": null, + "_spec": "duplexer2@0.0.2", + "_where": "/Users/MB/git/pdfkit/node_modules/module-deps", + "author": { + "name": "Conrad Pankoff", + "email": "deoxxa@fknsrs.biz", + "url": "http://www.fknsrs.biz/" + }, + "bugs": { + "url": "https://github.com/deoxxa/duplexer2/issues" + }, + "dependencies": { + "readable-stream": "~1.1.9" + }, + "description": "Like duplexer (http://npm.im/duplexer) but using streams2", + "devDependencies": { + "chai": "~1.7.2", + "mocha": "~1.12.1" + }, + "directories": {}, + "dist": { + "shasum": "c614dcf67e2fb14995a91711e5a617e8a60a31db", + "tarball": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.0.2.tgz" + }, + "homepage": "https://github.com/deoxxa/duplexer2", + "keywords": [ + "duplex", + "stream", + "join", + "combine" + ], + "license": "BSD", + "main": "index.js", + "maintainers": [ + { + "name": "deoxxa", + "email": "deoxxa@fknsrs.biz" + } + ], + "name": "duplexer2", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/deoxxa/duplexer2.git" + }, + "scripts": { + "test": "mocha -R tap" + }, + "version": "0.0.2" +} diff --git a/pitfall/pdfkit/node_modules/duplexer2/test/tests.js b/pitfall/pdfkit/node_modules/duplexer2/test/tests.js new file mode 100644 index 00000000..c3cf76f6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/duplexer2/test/tests.js @@ -0,0 +1,161 @@ +var assert = require("chai").assert; + +var stream = require("readable-stream"); + +var duplexer2 = require("../"); + +describe("duplexer2", function() { + var writable, readable; + + beforeEach(function() { + writable = new stream.Writable({objectMode: true}); + readable = new stream.Readable({objectMode: true}); + + writable._write = function _write(input, encoding, done) { + return done(); + }; + + readable._read = function _read(n) { + }; + }); + + it("should interact with the writable stream properly for writing", function(done) { + var duplex = duplexer2(writable, readable); + + writable._write = function _write(input, encoding, _done) { + assert.strictEqual(input, "well hello there"); + + return done(); + }; + + duplex.write("well hello there"); + }); + + it("should interact with the readable stream properly for reading", function(done) { + var duplex = duplexer2(writable, readable); + + duplex.on("data", function(e) { + assert.strictEqual(e, "well hello there"); + + return done(); + }); + + readable.push("well hello there"); + }); + + it("should end the writable stream, causing it to finish", function(done) { + var duplex = duplexer2(writable, readable); + + writable.once("finish", done); + + duplex.end(); + }); + + it("should finish when the writable stream finishes", function(done) { + var duplex = duplexer2(writable, readable); + + duplex.once("finish", done); + + writable.end(); + }); + + it("should end when the readable stream ends", function(done) { + var duplex = duplexer2(writable, readable); + + // required to let "end" fire without reading + duplex.resume(); + duplex.once("end", done); + + readable.push(null); + }); + + it("should bubble errors from the writable stream when no behaviour is specified", function(done) { + var duplex = duplexer2(writable, readable); + + var originalErr = Error("testing"); + + duplex.on("error", function(err) { + assert.strictEqual(err, originalErr); + + return done(); + }); + + writable.emit("error", originalErr); + }); + + it("should bubble errors from the readable stream when no behaviour is specified", function(done) { + var duplex = duplexer2(writable, readable); + + var originalErr = Error("testing"); + + duplex.on("error", function(err) { + assert.strictEqual(err, originalErr); + + return done(); + }); + + readable.emit("error", originalErr); + }); + + it("should bubble errors from the writable stream when bubbleErrors is true", function(done) { + var duplex = duplexer2({bubbleErrors: true}, writable, readable); + + var originalErr = Error("testing"); + + duplex.on("error", function(err) { + assert.strictEqual(err, originalErr); + + return done(); + }); + + writable.emit("error", originalErr); + }); + + it("should bubble errors from the readable stream when bubbleErrors is true", function(done) { + var duplex = duplexer2({bubbleErrors: true}, writable, readable); + + var originalErr = Error("testing"); + + duplex.on("error", function(err) { + assert.strictEqual(err, originalErr); + + return done(); + }); + + readable.emit("error", originalErr); + }); + + it("should not bubble errors from the writable stream when bubbleErrors is false", function(done) { + var duplex = duplexer2({bubbleErrors: false}, writable, readable); + + var timeout = setTimeout(done, 25); + + duplex.on("error", function(err) { + clearTimeout(timeout); + + return done(Error("shouldn't bubble error")); + }); + + // prevent uncaught error exception + writable.on("error", function() {}); + + writable.emit("error", Error("testing")); + }); + + it("should not bubble errors from the readable stream when bubbleErrors is false", function(done) { + var duplex = duplexer2({bubbleErrors: false}, writable, readable); + + var timeout = setTimeout(done, 25); + + duplex.on("error", function(err) { + clearTimeout(timeout); + + return done(Error("shouldn't bubble error")); + }); + + // prevent uncaught error exception + readable.on("error", function() {}); + + readable.emit("error", Error("testing")); + }); +}); diff --git a/pitfall/pdfkit/node_modules/escodegen/LICENSE.BSD b/pitfall/pdfkit/node_modules/escodegen/LICENSE.BSD new file mode 100644 index 00000000..3e580c35 --- /dev/null +++ b/pitfall/pdfkit/node_modules/escodegen/LICENSE.BSD @@ -0,0 +1,19 @@ +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/pitfall/pdfkit/node_modules/escodegen/LICENSE.source-map b/pitfall/pdfkit/node_modules/escodegen/LICENSE.source-map new file mode 100644 index 00000000..259c59ff --- /dev/null +++ b/pitfall/pdfkit/node_modules/escodegen/LICENSE.source-map @@ -0,0 +1,27 @@ +Copyright (c) 2009-2011, Mozilla Foundation and contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the names of the Mozilla Foundation nor the names of project + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/pitfall/pdfkit/node_modules/escodegen/README.md b/pitfall/pdfkit/node_modules/escodegen/README.md new file mode 100644 index 00000000..1d6a679f --- /dev/null +++ b/pitfall/pdfkit/node_modules/escodegen/README.md @@ -0,0 +1,99 @@ +Escodegen ([escodegen](http://github.com/Constellation/escodegen)) is +[ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm) +(also popularly known as [JavaScript](http://en.wikipedia.org/wiki/JavaScript>JavaScript)) +code generator from [Parser API](https://developer.mozilla.org/en/SpiderMonkey/Parser_API) AST. +See [online generator demo](http://constellation.github.com/escodegen/demo/index.html). + + +### Install + +Escodegen can be used in a web browser: + + + +or in a Node.js application via the package manager: + + npm install escodegen + + +### Usage + +A simple example: the program + + escodegen.generate({ + type: 'BinaryExpression', + operator: '+', + left: { type: 'Literal', value: 40 }, + right: { type: 'Literal', value: 2 } + }); + +produces the string `'40 + 2'` + +See the [API page](https://github.com/Constellation/escodegen/wiki/API) for +options. To run the tests, execute `npm test` in the root directory. + + +### License + +#### Escodegen + +Copyright (C) 2012 [Yusuke Suzuki](http://github.com/Constellation) + (twitter: [@Constellation](http://twitter.com/Constellation)) and other contributors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#### source-map + +SourceNodeMocks has a limited interface of mozilla/source-map SourceNode implementations. + +Copyright (c) 2009-2011, Mozilla Foundation and contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the names of the Mozilla Foundation nor the names of project + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +### Status + +[![Build Status](https://secure.travis-ci.org/Constellation/escodegen.png)](http://travis-ci.org/Constellation/escodegen) diff --git a/pitfall/pdfkit/node_modules/escodegen/bin/escodegen.js b/pitfall/pdfkit/node_modules/escodegen/bin/escodegen.js new file mode 100755 index 00000000..590b786e --- /dev/null +++ b/pitfall/pdfkit/node_modules/escodegen/bin/escodegen.js @@ -0,0 +1,43 @@ +#!/usr/bin/env node +/* + Copyright (C) 2012 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*jslint sloppy:true node:true */ + +var fs = require('fs'), + esprima = require('esprima'), + escodegen = require('escodegen'), + files = process.argv.splice(2); + +if (files.length === 0) { + console.log('Usage:'); + console.log(' escodegen file.js'); + process.exit(1); +} + +files.forEach(function (filename) { + var content = fs.readFileSync(filename, 'utf-8'); + console.log(escodegen.generate(esprima.parse(content))); +}); +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/pitfall/pdfkit/node_modules/escodegen/bin/esgenerate.js b/pitfall/pdfkit/node_modules/escodegen/bin/esgenerate.js new file mode 100755 index 00000000..7a2a449e --- /dev/null +++ b/pitfall/pdfkit/node_modules/escodegen/bin/esgenerate.js @@ -0,0 +1,43 @@ +#!/usr/bin/env node +/* + Copyright (C) 2012 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*jslint sloppy:true node:true */ + +var fs = require('fs'), + esprima = require('esprima'), + escodegen = require('escodegen'), + files = process.argv.splice(2); + +if (files.length === 0) { + console.log('Usage:'); + console.log(' esgenerate file.json'); + process.exit(1); +} + +files.forEach(function (filename) { + var content = fs.readFileSync(filename, 'utf-8'); + console.log(escodegen.generate(JSON.parse(content))); +}); +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/pitfall/pdfkit/node_modules/escodegen/escodegen.browser.js b/pitfall/pdfkit/node_modules/escodegen/escodegen.browser.js new file mode 100644 index 00000000..dfa664f0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/escodegen/escodegen.browser.js @@ -0,0 +1,2986 @@ +// Generated by browserify +(function(){var require = function (file, cwd) { + var resolved = require.resolve(file, cwd || '/'); + var mod = require.modules[resolved]; + if (!mod) throw new Error( + 'Failed to resolve module ' + file + ', tried ' + resolved + ); + var cached = require.cache[resolved]; + var res = cached? cached.exports : mod(); + return res; +}; + +require.paths = []; +require.modules = {}; +require.cache = {}; +require.extensions = [".js",".coffee",".json"]; + +require._core = { + 'assert': true, + 'events': true, + 'fs': true, + 'path': true, + 'vm': true +}; + +require.resolve = (function () { + return function (x, cwd) { + if (!cwd) cwd = '/'; + + if (require._core[x]) return x; + var path = require.modules.path(); + cwd = path.resolve('/', cwd); + var y = cwd || '/'; + + if (x.match(/^(?:\.\.?\/|\/)/)) { + var m = loadAsFileSync(path.resolve(y, x)) + || loadAsDirectorySync(path.resolve(y, x)); + if (m) return m; + } + + var n = loadNodeModulesSync(x, y); + if (n) return n; + + throw new Error("Cannot find module '" + x + "'"); + + function loadAsFileSync (x) { + x = path.normalize(x); + if (require.modules[x]) { + return x; + } + + for (var i = 0; i < require.extensions.length; i++) { + var ext = require.extensions[i]; + if (require.modules[x + ext]) return x + ext; + } + } + + function loadAsDirectorySync (x) { + x = x.replace(/\/+$/, ''); + var pkgfile = path.normalize(x + '/package.json'); + if (require.modules[pkgfile]) { + var pkg = require.modules[pkgfile](); + var b = pkg.browserify; + if (typeof b === 'object' && b.main) { + var m = loadAsFileSync(path.resolve(x, b.main)); + if (m) return m; + } + else if (typeof b === 'string') { + var m = loadAsFileSync(path.resolve(x, b)); + if (m) return m; + } + else if (pkg.main) { + var m = loadAsFileSync(path.resolve(x, pkg.main)); + if (m) return m; + } + } + + return loadAsFileSync(x + '/index'); + } + + function loadNodeModulesSync (x, start) { + var dirs = nodeModulesPathsSync(start); + for (var i = 0; i < dirs.length; i++) { + var dir = dirs[i]; + var m = loadAsFileSync(dir + '/' + x); + if (m) return m; + var n = loadAsDirectorySync(dir + '/' + x); + if (n) return n; + } + + var m = loadAsFileSync(x); + if (m) return m; + } + + function nodeModulesPathsSync (start) { + var parts; + if (start === '/') parts = [ '' ]; + else parts = path.normalize(start).split('/'); + + var dirs = []; + for (var i = parts.length - 1; i >= 0; i--) { + if (parts[i] === 'node_modules') continue; + var dir = parts.slice(0, i + 1).join('/') + '/node_modules'; + dirs.push(dir); + } + + return dirs; + } + }; +})(); + +require.alias = function (from, to) { + var path = require.modules.path(); + var res = null; + try { + res = require.resolve(from + '/package.json', '/'); + } + catch (err) { + res = require.resolve(from, '/'); + } + var basedir = path.dirname(res); + + var keys = (Object.keys || function (obj) { + var res = []; + for (var key in obj) res.push(key); + return res; + })(require.modules); + + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (key.slice(0, basedir.length + 1) === basedir + '/') { + var f = key.slice(basedir.length); + require.modules[to + f] = require.modules[basedir + f]; + } + else if (key === basedir) { + require.modules[to] = require.modules[basedir]; + } + } +}; + +(function () { + var process = {}; + var global = typeof window !== 'undefined' ? window : {}; + var definedProcess = false; + + require.define = function (filename, fn) { + if (!definedProcess && require.modules.__browserify_process) { + process = require.modules.__browserify_process(); + definedProcess = true; + } + + var dirname = require._core[filename] + ? '' + : require.modules.path().dirname(filename) + ; + + var require_ = function (file) { + var requiredModule = require(file, dirname); + var cached = require.cache[require.resolve(file, dirname)]; + + if (cached && cached.parent === null) { + cached.parent = module_; + } + + return requiredModule; + }; + require_.resolve = function (name) { + return require.resolve(name, dirname); + }; + require_.modules = require.modules; + require_.define = require.define; + require_.cache = require.cache; + var module_ = { + id : filename, + filename: filename, + exports : {}, + loaded : false, + parent: null + }; + + require.modules[filename] = function () { + require.cache[filename] = module_; + fn.call( + module_.exports, + require_, + module_, + module_.exports, + dirname, + filename, + process, + global + ); + module_.loaded = true; + return module_.exports; + }; + }; +})(); + + +require.define("path",function(require,module,exports,__dirname,__filename,process,global){function filter (xs, fn) { + var res = []; + for (var i = 0; i < xs.length; i++) { + if (fn(xs[i], i, xs)) res.push(xs[i]); + } + return res; +} + +// resolves . and .. elements in a path array with directory names there +// must be no slashes, empty elements, or device names (c:\) in the array +// (so also no leading and trailing slashes - it does not distinguish +// relative and absolute paths) +function normalizeArray(parts, allowAboveRoot) { + // if the path tries to go above the root, `up` ends up > 0 + var up = 0; + for (var i = parts.length; i >= 0; i--) { + var last = parts[i]; + if (last == '.') { + parts.splice(i, 1); + } else if (last === '..') { + parts.splice(i, 1); + up++; + } else if (up) { + parts.splice(i, 1); + up--; + } + } + + // if the path is allowed to go above the root, restore leading ..s + if (allowAboveRoot) { + for (; up--; up) { + parts.unshift('..'); + } + } + + return parts; +} + +// Regex to split a filename into [*, dir, basename, ext] +// posix version +var splitPathRe = /^(.+\/(?!$)|\/)?((?:.+?)?(\.[^.]*)?)$/; + +// path.resolve([from ...], to) +// posix version +exports.resolve = function() { +var resolvedPath = '', + resolvedAbsolute = false; + +for (var i = arguments.length; i >= -1 && !resolvedAbsolute; i--) { + var path = (i >= 0) + ? arguments[i] + : process.cwd(); + + // Skip empty and invalid entries + if (typeof path !== 'string' || !path) { + continue; + } + + resolvedPath = path + '/' + resolvedPath; + resolvedAbsolute = path.charAt(0) === '/'; +} + +// At this point the path should be resolved to a full absolute path, but +// handle relative paths to be safe (might happen when process.cwd() fails) + +// Normalize the path +resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) { + return !!p; + }), !resolvedAbsolute).join('/'); + + return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; +}; + +// path.normalize(path) +// posix version +exports.normalize = function(path) { +var isAbsolute = path.charAt(0) === '/', + trailingSlash = path.slice(-1) === '/'; + +// Normalize the path +path = normalizeArray(filter(path.split('/'), function(p) { + return !!p; + }), !isAbsolute).join('/'); + + if (!path && !isAbsolute) { + path = '.'; + } + if (path && trailingSlash) { + path += '/'; + } + + return (isAbsolute ? '/' : '') + path; +}; + + +// posix version +exports.join = function() { + var paths = Array.prototype.slice.call(arguments, 0); + return exports.normalize(filter(paths, function(p, index) { + return p && typeof p === 'string'; + }).join('/')); +}; + + +exports.dirname = function(path) { + var dir = splitPathRe.exec(path)[1] || ''; + var isWindows = false; + if (!dir) { + // No dirname + return '.'; + } else if (dir.length === 1 || + (isWindows && dir.length <= 3 && dir.charAt(1) === ':')) { + // It is just a slash or a drive letter with a slash + return dir; + } else { + // It is a full dirname, strip trailing slash + return dir.substring(0, dir.length - 1); + } +}; + + +exports.basename = function(path, ext) { + var f = splitPathRe.exec(path)[2] || ''; + // TODO: make this comparison case-insensitive on windows? + if (ext && f.substr(-1 * ext.length) === ext) { + f = f.substr(0, f.length - ext.length); + } + return f; +}; + + +exports.extname = function(path) { + return splitPathRe.exec(path)[3] || ''; +}; + +exports.relative = function(from, to) { + from = exports.resolve(from).substr(1); + to = exports.resolve(to).substr(1); + + function trim(arr) { + var start = 0; + for (; start < arr.length; start++) { + if (arr[start] !== '') break; + } + + var end = arr.length - 1; + for (; end >= 0; end--) { + if (arr[end] !== '') break; + } + + if (start > end) return []; + return arr.slice(start, end - start + 1); + } + + var fromParts = trim(from.split('/')); + var toParts = trim(to.split('/')); + + var length = Math.min(fromParts.length, toParts.length); + var samePartsLength = length; + for (var i = 0; i < length; i++) { + if (fromParts[i] !== toParts[i]) { + samePartsLength = i; + break; + } + } + + var outputParts = []; + for (var i = samePartsLength; i < fromParts.length; i++) { + outputParts.push('..'); + } + + outputParts = outputParts.concat(toParts.slice(samePartsLength)); + + return outputParts.join('/'); +}; + +}); + +require.define("__browserify_process",function(require,module,exports,__dirname,__filename,process,global){var process = module.exports = {}; + +process.nextTick = (function () { + var canSetImmediate = typeof window !== 'undefined' + && window.setImmediate; + var canPost = typeof window !== 'undefined' + && window.postMessage && window.addEventListener + ; + + if (canSetImmediate) { + return function (f) { return window.setImmediate(f) }; + } + + if (canPost) { + var queue = []; + window.addEventListener('message', function (ev) { + if (ev.source === window && ev.data === 'browserify-tick') { + ev.stopPropagation(); + if (queue.length > 0) { + var fn = queue.shift(); + fn(); + } + } + }, true); + + return function nextTick(fn) { + queue.push(fn); + window.postMessage('browserify-tick', '*'); + }; + } + + return function nextTick(fn) { + setTimeout(fn, 0); + }; +})(); + +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; + +process.binding = function (name) { + if (name === 'evals') return (require)('vm') + else throw new Error('No such module. (Possibly not yet loaded)') +}; + +(function () { + var cwd = '/'; + var path; + process.cwd = function () { return cwd }; + process.chdir = function (dir) { + if (!path) path = require('path'); + cwd = path.resolve(dir, cwd); + }; +})(); + +}); + +require.define("/package.json",function(require,module,exports,__dirname,__filename,process,global){module.exports = {"main":"escodegen.js"} +}); + +require.define("/escodegen.js",function(require,module,exports,__dirname,__filename,process,global){/* + Copyright (C) 2012 Michael Ficarra + Copyright (C) 2012 Robert Gust-Bardon + Copyright (C) 2012 John Freeman + Copyright (C) 2011-2012 Ariya Hidayat + Copyright (C) 2012 Mathias Bynens + Copyright (C) 2012 Joost-Wim Boekesteijn + Copyright (C) 2012 Kris Kowal + Copyright (C) 2012 Yusuke Suzuki + Copyright (C) 2012 Arpad Borsos + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*jslint bitwise:true */ +/*global escodegen:true, exports:true, generateStatement:true, generateExpression:true, generateFunctionBody:true, process:true, require:true, define:true, global:true*/ +(function () { + 'use strict'; + + var Syntax, + Precedence, + BinaryPrecedence, + Regex, + VisitorKeys, + VisitorOption, + SourceNode, + isArray, + base, + indent, + json, + renumber, + hexadecimal, + quotes, + escapeless, + newline, + space, + parentheses, + semicolons, + safeConcatenation, + directive, + extra, + parse, + sourceMap, + traverse; + + traverse = require('estraverse').traverse; + + Syntax = { + AssignmentExpression: 'AssignmentExpression', + ArrayExpression: 'ArrayExpression', + ArrayPattern: 'ArrayPattern', + BlockStatement: 'BlockStatement', + BinaryExpression: 'BinaryExpression', + BreakStatement: 'BreakStatement', + CallExpression: 'CallExpression', + CatchClause: 'CatchClause', + ComprehensionBlock: 'ComprehensionBlock', + ComprehensionExpression: 'ComprehensionExpression', + ConditionalExpression: 'ConditionalExpression', + ContinueStatement: 'ContinueStatement', + DirectiveStatement: 'DirectiveStatement', + DoWhileStatement: 'DoWhileStatement', + DebuggerStatement: 'DebuggerStatement', + EmptyStatement: 'EmptyStatement', + ExpressionStatement: 'ExpressionStatement', + ForStatement: 'ForStatement', + ForInStatement: 'ForInStatement', + FunctionDeclaration: 'FunctionDeclaration', + FunctionExpression: 'FunctionExpression', + Identifier: 'Identifier', + IfStatement: 'IfStatement', + Literal: 'Literal', + LabeledStatement: 'LabeledStatement', + LogicalExpression: 'LogicalExpression', + MemberExpression: 'MemberExpression', + NewExpression: 'NewExpression', + ObjectExpression: 'ObjectExpression', + ObjectPattern: 'ObjectPattern', + Program: 'Program', + Property: 'Property', + ReturnStatement: 'ReturnStatement', + SequenceExpression: 'SequenceExpression', + SwitchStatement: 'SwitchStatement', + SwitchCase: 'SwitchCase', + ThisExpression: 'ThisExpression', + ThrowStatement: 'ThrowStatement', + TryStatement: 'TryStatement', + UnaryExpression: 'UnaryExpression', + UpdateExpression: 'UpdateExpression', + VariableDeclaration: 'VariableDeclaration', + VariableDeclarator: 'VariableDeclarator', + WhileStatement: 'WhileStatement', + WithStatement: 'WithStatement', + YieldExpression: 'YieldExpression' + + }; + + Precedence = { + Sequence: 0, + Assignment: 1, + Conditional: 2, + LogicalOR: 3, + LogicalAND: 4, + BitwiseOR: 5, + BitwiseXOR: 6, + BitwiseAND: 7, + Equality: 8, + Relational: 9, + BitwiseSHIFT: 10, + Additive: 11, + Multiplicative: 12, + Unary: 13, + Postfix: 14, + Call: 15, + New: 16, + Member: 17, + Primary: 18 + }; + + BinaryPrecedence = { + '||': Precedence.LogicalOR, + '&&': Precedence.LogicalAND, + '|': Precedence.BitwiseOR, + '^': Precedence.BitwiseXOR, + '&': Precedence.BitwiseAND, + '==': Precedence.Equality, + '!=': Precedence.Equality, + '===': Precedence.Equality, + '!==': Precedence.Equality, + 'is': Precedence.Equality, + 'isnt': Precedence.Equality, + '<': Precedence.Relational, + '>': Precedence.Relational, + '<=': Precedence.Relational, + '>=': Precedence.Relational, + 'in': Precedence.Relational, + 'instanceof': Precedence.Relational, + '<<': Precedence.BitwiseSHIFT, + '>>': Precedence.BitwiseSHIFT, + '>>>': Precedence.BitwiseSHIFT, + '+': Precedence.Additive, + '-': Precedence.Additive, + '*': Precedence.Multiplicative, + '%': Precedence.Multiplicative, + '/': Precedence.Multiplicative + }; + + Regex = { + NonAsciiIdentifierPart: new RegExp('[\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0300-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u0483-\u0487\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u05d0-\u05ea\u05f0-\u05f2\u0610-\u061a\u0620-\u0669\u066e-\u06d3\u06d5-\u06dc\u06df-\u06e8\u06ea-\u06fc\u06ff\u0710-\u074a\u074d-\u07b1\u07c0-\u07f5\u07fa\u0800-\u082d\u0840-\u085b\u08a0\u08a2-\u08ac\u08e4-\u08fe\u0900-\u0963\u0966-\u096f\u0971-\u0977\u0979-\u097f\u0981-\u0983\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bc-\u09c4\u09c7\u09c8\u09cb-\u09ce\u09d7\u09dc\u09dd\u09df-\u09e3\u09e6-\u09f1\u0a01-\u0a03\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a59-\u0a5c\u0a5e\u0a66-\u0a75\u0a81-\u0a83\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abc-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ad0\u0ae0-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3c-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5c\u0b5d\u0b5f-\u0b63\u0b66-\u0b6f\u0b71\u0b82\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd0\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c58\u0c59\u0c60-\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbc-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0cde\u0ce0-\u0ce3\u0ce6-\u0cef\u0cf1\u0cf2\u0d02\u0d03\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d-\u0d44\u0d46-\u0d48\u0d4a-\u0d4e\u0d57\u0d60-\u0d63\u0d66-\u0d6f\u0d7a-\u0d7f\u0d82\u0d83\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e01-\u0e3a\u0e40-\u0e4e\u0e50-\u0e59\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb9\u0ebb-\u0ebd\u0ec0-\u0ec4\u0ec6\u0ec8-\u0ecd\u0ed0-\u0ed9\u0edc-\u0edf\u0f00\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e-\u0f47\u0f49-\u0f6c\u0f71-\u0f84\u0f86-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1049\u1050-\u109d\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u135d-\u135f\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176c\u176e-\u1770\u1772\u1773\u1780-\u17d3\u17d7\u17dc\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1820-\u1877\u1880-\u18aa\u18b0-\u18f5\u1900-\u191c\u1920-\u192b\u1930-\u193b\u1946-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u19d0-\u19d9\u1a00-\u1a1b\u1a20-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1aa7\u1b00-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1bf3\u1c00-\u1c37\u1c40-\u1c49\u1c4d-\u1c7d\u1cd0-\u1cd2\u1cd4-\u1cf6\u1d00-\u1de6\u1dfc-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u200c\u200d\u203f\u2040\u2054\u2071\u207f\u2090-\u209c\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d7f-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2de0-\u2dff\u2e2f\u3005-\u3007\u3021-\u302f\u3031-\u3035\u3038-\u303c\u3041-\u3096\u3099\u309a\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua62b\ua640-\ua66f\ua674-\ua67d\ua67f-\ua697\ua69f-\ua6f1\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua827\ua840-\ua873\ua880-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f7\ua8fb\ua900-\ua92d\ua930-\ua953\ua960-\ua97c\ua980-\ua9c0\ua9cf-\ua9d9\uaa00-\uaa36\uaa40-\uaa4d\uaa50-\uaa59\uaa60-\uaa76\uaa7a\uaa7b\uaa80-\uaac2\uaadb-\uaadd\uaae0-\uaaef\uaaf2-\uaaf6\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabea\uabec\uabed\uabf0-\uabf9\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\ufe70-\ufe74\ufe76-\ufefc\uff10-\uff19\uff21-\uff3a\uff3f\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]') + }; + + function getDefaultOptions() { + // default options + return { + indent: null, + base: null, + parse: null, + comment: false, + format: { + indent: { + style: ' ', + base: 0, + adjustMultilineComment: false + }, + json: false, + renumber: false, + hexadecimal: false, + quotes: 'single', + escapeless: false, + compact: false, + parentheses: true, + semicolons: true, + safeConcatenation: false + }, + moz: { + starlessGenerator: false, + parenthesizedComprehensionBlock: false + }, + sourceMap: null, + sourceMapRoot: null, + sourceMapWithCode: false, + directive: false, + verbatim: null + }; + } + + function stringToArray(str) { + var length = str.length, + result = [], + i; + for (i = 0; i < length; i += 1) { + result[i] = str.charAt(i); + } + return result; + } + + function stringRepeat(str, num) { + var result = ''; + + for (num |= 0; num > 0; num >>>= 1, str += str) { + if (num & 1) { + result += str; + } + } + + return result; + } + + isArray = Array.isArray; + if (!isArray) { + isArray = function isArray(array) { + return Object.prototype.toString.call(array) === '[object Array]'; + }; + } + + // Fallback for the non SourceMap environment + function SourceNodeMock(line, column, filename, chunk) { + var result = []; + + function flatten(input) { + var i, iz; + if (isArray(input)) { + for (i = 0, iz = input.length; i < iz; ++i) { + flatten(input[i]); + } + } else if (input instanceof SourceNodeMock) { + result.push(input); + } else if (typeof input === 'string' && input) { + result.push(input); + } + } + + flatten(chunk); + this.children = result; + } + + SourceNodeMock.prototype.toString = function toString() { + var res = '', i, iz, node; + for (i = 0, iz = this.children.length; i < iz; ++i) { + node = this.children[i]; + if (node instanceof SourceNodeMock) { + res += node.toString(); + } else { + res += node; + } + } + return res; + }; + + SourceNodeMock.prototype.replaceRight = function replaceRight(pattern, replacement) { + var last = this.children[this.children.length - 1]; + if (last instanceof SourceNodeMock) { + last.replaceRight(pattern, replacement); + } else if (typeof last === 'string') { + this.children[this.children.length - 1] = last.replace(pattern, replacement); + } else { + this.children.push(''.replace(pattern, replacement)); + } + return this; + }; + + SourceNodeMock.prototype.join = function join(sep) { + var i, iz, result; + result = []; + iz = this.children.length; + if (iz > 0) { + for (i = 0, iz -= 1; i < iz; ++i) { + result.push(this.children[i], sep); + } + result.push(this.children[iz]); + this.children = result; + } + return this; + }; + + function hasLineTerminator(str) { + return (/[\r\n]/g).test(str); + } + + function endsWithLineTerminator(str) { + var ch = str.charAt(str.length - 1); + return ch === '\r' || ch === '\n'; + } + + function shallowCopy(obj) { + var ret = {}, key; + for (key in obj) { + if (obj.hasOwnProperty(key)) { + ret[key] = obj[key]; + } + } + return ret; + } + + function deepCopy(obj) { + var ret = {}, key, val; + for (key in obj) { + if (obj.hasOwnProperty(key)) { + val = obj[key]; + if (typeof val === 'object' && val !== null) { + ret[key] = deepCopy(val); + } else { + ret[key] = val; + } + } + } + return ret; + } + + function updateDeeply(target, override) { + var key, val; + + function isHashObject(target) { + return typeof target === 'object' && target instanceof Object && !(target instanceof RegExp); + } + + for (key in override) { + if (override.hasOwnProperty(key)) { + val = override[key]; + if (isHashObject(val)) { + if (isHashObject(target[key])) { + updateDeeply(target[key], val); + } else { + target[key] = updateDeeply({}, val); + } + } else { + target[key] = val; + } + } + } + return target; + } + + function generateNumber(value) { + var result, point, temp, exponent, pos; + + if (value !== value) { + throw new Error('Numeric literal whose value is NaN'); + } + if (value < 0 || (value === 0 && 1 / value < 0)) { + throw new Error('Numeric literal whose value is negative'); + } + + if (value === 1 / 0) { + return json ? 'null' : renumber ? '1e400' : '1e+400'; + } + + result = '' + value; + if (!renumber || result.length < 3) { + return result; + } + + point = result.indexOf('.'); + if (!json && result.charAt(0) === '0' && point === 1) { + point = 0; + result = result.slice(1); + } + temp = result; + result = result.replace('e+', 'e'); + exponent = 0; + if ((pos = temp.indexOf('e')) > 0) { + exponent = +temp.slice(pos + 1); + temp = temp.slice(0, pos); + } + if (point >= 0) { + exponent -= temp.length - point - 1; + temp = +(temp.slice(0, point) + temp.slice(point + 1)) + ''; + } + pos = 0; + while (temp.charAt(temp.length + pos - 1) === '0') { + pos -= 1; + } + if (pos !== 0) { + exponent -= pos; + temp = temp.slice(0, pos); + } + if (exponent !== 0) { + temp += 'e' + exponent; + } + if ((temp.length < result.length || + (hexadecimal && value > 1e12 && Math.floor(value) === value && (temp = '0x' + value.toString(16)).length < result.length)) && + +temp === value) { + result = temp; + } + + return result; + } + + function escapeAllowedCharacter(ch, next) { + var code = ch.charCodeAt(0), hex = code.toString(16), result = '\\'; + + switch (ch) { + case '\b': + result += 'b'; + break; + case '\f': + result += 'f'; + break; + case '\t': + result += 't'; + break; + default: + if (json || code > 0xff) { + result += 'u' + '0000'.slice(hex.length) + hex; + } else if (ch === '\u0000' && '0123456789'.indexOf(next) < 0) { + result += '0'; + } else if (ch === '\v') { + result += 'v'; + } else { + result += 'x' + '00'.slice(hex.length) + hex; + } + break; + } + + return result; + } + + function escapeDisallowedCharacter(ch) { + var result = '\\'; + switch (ch) { + case '\\': + result += '\\'; + break; + case '\n': + result += 'n'; + break; + case '\r': + result += 'r'; + break; + case '\u2028': + result += 'u2028'; + break; + case '\u2029': + result += 'u2029'; + break; + default: + throw new Error('Incorrectly classified character'); + } + + return result; + } + + function escapeDirective(str) { + var i, iz, ch, single, buf, quote; + + buf = str; + if (typeof buf[0] === 'undefined') { + buf = stringToArray(buf); + } + + quote = quotes === 'double' ? '"' : '\''; + for (i = 0, iz = buf.length; i < iz; i += 1) { + ch = buf[i]; + if (ch === '\'') { + quote = '"'; + break; + } else if (ch === '"') { + quote = '\''; + break; + } else if (ch === '\\') { + i += 1; + } + } + + return quote + str + quote; + } + + function escapeString(str) { + var result = '', i, len, ch, next, singleQuotes = 0, doubleQuotes = 0, single; + + if (typeof str[0] === 'undefined') { + str = stringToArray(str); + } + + for (i = 0, len = str.length; i < len; i += 1) { + ch = str[i]; + if (ch === '\'') { + singleQuotes += 1; + } else if (ch === '"') { + doubleQuotes += 1; + } else if (ch === '/' && json) { + result += '\\'; + } else if ('\\\n\r\u2028\u2029'.indexOf(ch) >= 0) { + result += escapeDisallowedCharacter(ch); + continue; + } else if ((json && ch < ' ') || !(json || escapeless || (ch >= ' ' && ch <= '~'))) { + result += escapeAllowedCharacter(ch, str[i + 1]); + continue; + } + result += ch; + } + + single = !(quotes === 'double' || (quotes === 'auto' && doubleQuotes < singleQuotes)); + str = result; + result = single ? '\'' : '"'; + + if (typeof str[0] === 'undefined') { + str = stringToArray(str); + } + + for (i = 0, len = str.length; i < len; i += 1) { + ch = str[i]; + if ((ch === '\'' && single) || (ch === '"' && !single)) { + result += '\\'; + } + result += ch; + } + + return result + (single ? '\'' : '"'); + } + + function isWhiteSpace(ch) { + return '\t\v\f \xa0'.indexOf(ch) >= 0 || (ch.charCodeAt(0) >= 0x1680 && '\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\ufeff'.indexOf(ch) >= 0); + } + + function isLineTerminator(ch) { + return '\n\r\u2028\u2029'.indexOf(ch) >= 0; + } + + function isIdentifierPart(ch) { + return (ch === '$') || (ch === '_') || (ch === '\\') || + (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || + ((ch >= '0') && (ch <= '9')) || + ((ch.charCodeAt(0) >= 0x80) && Regex.NonAsciiIdentifierPart.test(ch)); + } + + function toSourceNode(generated, node) { + if (node == null) { + if (generated instanceof SourceNode) { + return generated; + } else { + node = {}; + } + } + if (node.loc == null) { + return new SourceNode(null, null, sourceMap, generated); + } + return new SourceNode(node.loc.start.line, node.loc.start.column, (sourceMap === true ? node.loc.source || null : sourceMap), generated); + } + + function join(left, right) { + var leftSource = toSourceNode(left).toString(), + rightSource = toSourceNode(right).toString(), + leftChar = leftSource.charAt(leftSource.length - 1), + rightChar = rightSource.charAt(0); + + if (((leftChar === '+' || leftChar === '-') && leftChar === rightChar) || (isIdentifierPart(leftChar) && isIdentifierPart(rightChar))) { + return [left, ' ', right]; + } else if (isWhiteSpace(leftChar) || isLineTerminator(leftChar) || isWhiteSpace(rightChar) || isLineTerminator(rightChar)) { + return [left, right]; + } + return [left, space, right]; + } + + function addIndent(stmt) { + return [base, stmt]; + } + + function withIndent(fn) { + var previousBase, result; + previousBase = base; + base += indent; + result = fn.call(this, base); + base = previousBase; + return result; + } + + function calculateSpaces(str) { + var i; + for (i = str.length - 1; i >= 0; i -= 1) { + if (isLineTerminator(str.charAt(i))) { + break; + } + } + return (str.length - 1) - i; + } + + function adjustMultilineComment(value, specialBase) { + var array, i, len, line, j, ch, spaces, previousBase; + + array = value.split(/\r\n|[\r\n]/); + spaces = Number.MAX_VALUE; + + // first line doesn't have indentation + for (i = 1, len = array.length; i < len; i += 1) { + line = array[i]; + j = 0; + while (j < line.length && isWhiteSpace(line[j])) { + j += 1; + } + if (spaces > j) { + spaces = j; + } + } + + if (typeof specialBase !== 'undefined') { + // pattern like + // { + // var t = 20; /* + // * this is comment + // */ + // } + previousBase = base; + if (array[1][spaces] === '*') { + specialBase += ' '; + } + base = specialBase; + } else { + if (spaces & 1) { + // /* + // * + // */ + // If spaces are odd number, above pattern is considered. + // We waste 1 space. + spaces -= 1; + } + previousBase = base; + } + + for (i = 1, len = array.length; i < len; i += 1) { + array[i] = toSourceNode(addIndent(array[i].slice(spaces))).join(''); + } + + base = previousBase; + + return array.join('\n'); + } + + function generateComment(comment, specialBase) { + if (comment.type === 'Line') { + if (endsWithLineTerminator(comment.value)) { + return '//' + comment.value; + } else { + // Always use LineTerminator + return '//' + comment.value + '\n'; + } + } + if (extra.format.indent.adjustMultilineComment && /[\n\r]/.test(comment.value)) { + return adjustMultilineComment('/*' + comment.value + '*/', specialBase); + } + return '/*' + comment.value + '*/'; + } + + function addCommentsToStatement(stmt, result) { + var i, len, comment, save, node, tailingToStatement, specialBase, fragment; + + if (stmt.leadingComments && stmt.leadingComments.length > 0) { + save = result; + + comment = stmt.leadingComments[0]; + result = []; + if (safeConcatenation && stmt.type === Syntax.Program && stmt.body.length === 0) { + result.push('\n'); + } + result.push(generateComment(comment)); + if (!endsWithLineTerminator(toSourceNode(result).toString())) { + result.push('\n'); + } + + for (i = 1, len = stmt.leadingComments.length; i < len; i += 1) { + comment = stmt.leadingComments[i]; + fragment = [generateComment(comment)]; + if (!endsWithLineTerminator(toSourceNode(fragment).toString())) { + fragment.push('\n'); + } + result.push(addIndent(fragment)); + } + + result.push(addIndent(save)); + } + + if (stmt.trailingComments) { + tailingToStatement = !endsWithLineTerminator(toSourceNode(result).toString()); + specialBase = stringRepeat(' ', calculateSpaces(toSourceNode([base, result, indent]).toString())); + for (i = 0, len = stmt.trailingComments.length; i < len; i += 1) { + comment = stmt.trailingComments[i]; + if (tailingToStatement) { + // We assume target like following script + // + // var t = 20; /** + // * This is comment of t + // */ + if (i === 0) { + // first case + result = [result, indent]; + } else { + result = [result, specialBase]; + } + result.push(generateComment(comment, specialBase)); + } else { + result = [result, addIndent(generateComment(comment))]; + } + if (i !== len - 1 && !endsWithLineTerminator(toSourceNode(result).toString())) { + result = [result, '\n']; + } + } + } + + return result; + } + + function parenthesize(text, current, should) { + if (current < should) { + return ['(', text, ')']; + } + return text; + } + + function maybeBlock(stmt, semicolonOptional, functionBody) { + var result, noLeadingComment; + + noLeadingComment = !extra.comment || !stmt.leadingComments; + + if (stmt.type === Syntax.BlockStatement && noLeadingComment) { + return [space, generateStatement(stmt, { functionBody: functionBody })]; + } + + if (stmt.type === Syntax.EmptyStatement && noLeadingComment) { + return ';'; + } + + withIndent(function () { + result = [newline, addIndent(generateStatement(stmt, { semicolonOptional: semicolonOptional, functionBody: functionBody }))]; + }); + + return result; + } + + function maybeBlockSuffix(stmt, result) { + var ends = endsWithLineTerminator(toSourceNode(result).toString()); + if (stmt.type === Syntax.BlockStatement && (!extra.comment || !stmt.leadingComments) && !ends) { + return [result, space]; + } + if (ends) { + return [result, base]; + } + return [result, newline, base]; + } + + function generateVerbatim(expr, option) { + var i, result; + result = expr[extra.verbatim].split(/\r\n|\n/); + for (i = 1; i < result.length; i++) { + result[i] = newline + base + result[i]; + } + + result = parenthesize(result, Precedence.Sequence, option.precedence); + return toSourceNode(result, expr); + } + + function generateFunctionBody(node) { + var result, i, len, expr; + result = ['(']; + for (i = 0, len = node.params.length; i < len; i += 1) { + result.push(node.params[i].name); + if (i + 1 < len) { + result.push(',' + space); + } + } + result.push(')'); + + if (node.expression) { + result.push(space); + expr = generateExpression(node.body, { + precedence: Precedence.Assignment, + allowIn: true, + allowCall: true + }); + if (expr.toString().charAt(0) === '{') { + expr = ['(', expr, ')']; + } + result.push(expr); + } else { + result.push(maybeBlock(node.body, false, true)); + } + return result; + } + + function generateExpression(expr, option) { + var result, precedence, type, currentPrecedence, i, len, raw, fragment, multiline, leftChar, leftSource, rightChar, rightSource, allowIn, allowCall, allowUnparenthesizedNew, property, key, value; + + precedence = option.precedence; + allowIn = option.allowIn; + allowCall = option.allowCall; + type = expr.type || option.type; + + if (extra.verbatim && expr.hasOwnProperty(extra.verbatim)) { + return generateVerbatim(expr, option); + } + + switch (type) { + case Syntax.SequenceExpression: + result = []; + allowIn |= (Precedence.Sequence < precedence); + for (i = 0, len = expr.expressions.length; i < len; i += 1) { + result.push(generateExpression(expr.expressions[i], { + precedence: Precedence.Assignment, + allowIn: allowIn, + allowCall: true + })); + if (i + 1 < len) { + result.push(',' + space); + } + } + result = parenthesize(result, Precedence.Sequence, precedence); + break; + + case Syntax.AssignmentExpression: + allowIn |= (Precedence.Assignment < precedence); + result = parenthesize( + [ + generateExpression(expr.left, { + precedence: Precedence.Call, + allowIn: allowIn, + allowCall: true + }), + space + expr.operator + space, + generateExpression(expr.right, { + precedence: Precedence.Assignment, + allowIn: allowIn, + allowCall: true + }) + ], + Precedence.Assignment, + precedence + ); + break; + + case Syntax.ConditionalExpression: + allowIn |= (Precedence.Conditional < precedence); + result = parenthesize( + [ + generateExpression(expr.test, { + precedence: Precedence.LogicalOR, + allowIn: allowIn, + allowCall: true + }), + space + '?' + space, + generateExpression(expr.consequent, { + precedence: Precedence.Assignment, + allowIn: allowIn, + allowCall: true + }), + space + ':' + space, + generateExpression(expr.alternate, { + precedence: Precedence.Assignment, + allowIn: allowIn, + allowCall: true + }) + ], + Precedence.Conditional, + precedence + ); + break; + + case Syntax.LogicalExpression: + case Syntax.BinaryExpression: + currentPrecedence = BinaryPrecedence[expr.operator]; + + allowIn |= (currentPrecedence < precedence); + + fragment = generateExpression(expr.left, { + precedence: currentPrecedence, + allowIn: allowIn, + allowCall: true + }); + + leftSource = fragment.toString(); + + if (leftSource.charAt(leftSource.length - 1) === '/' && isIdentifierPart(expr.operator.charAt(0))) { + result = [fragment, ' ', expr.operator]; + } else { + result = join(fragment, expr.operator); + } + + fragment = generateExpression(expr.right, { + precedence: currentPrecedence + 1, + allowIn: allowIn, + allowCall: true + }); + + if (expr.operator === '/' && fragment.toString().charAt(0) === '/') { + // If '/' concats with '/', it is interpreted as comment start + result.push(' ', fragment); + } else { + result = join(result, fragment); + } + + if (expr.operator === 'in' && !allowIn) { + result = ['(', result, ')']; + } else { + result = parenthesize(result, currentPrecedence, precedence); + } + + break; + + case Syntax.CallExpression: + result = [generateExpression(expr.callee, { + precedence: Precedence.Call, + allowIn: true, + allowCall: true, + allowUnparenthesizedNew: false + })]; + + result.push('('); + for (i = 0, len = expr['arguments'].length; i < len; i += 1) { + result.push(generateExpression(expr['arguments'][i], { + precedence: Precedence.Assignment, + allowIn: true, + allowCall: true + })); + if (i + 1 < len) { + result.push(',' + space); + } + } + result.push(')'); + + if (!allowCall) { + result = ['(', result, ')']; + } else { + result = parenthesize(result, Precedence.Call, precedence); + } + break; + + case Syntax.NewExpression: + len = expr['arguments'].length; + allowUnparenthesizedNew = option.allowUnparenthesizedNew === undefined || option.allowUnparenthesizedNew; + + result = join( + 'new', + generateExpression(expr.callee, { + precedence: Precedence.New, + allowIn: true, + allowCall: false, + allowUnparenthesizedNew: allowUnparenthesizedNew && !parentheses && len === 0 + }) + ); + + if (!allowUnparenthesizedNew || parentheses || len > 0) { + result.push('('); + for (i = 0; i < len; i += 1) { + result.push(generateExpression(expr['arguments'][i], { + precedence: Precedence.Assignment, + allowIn: true, + allowCall: true + })); + if (i + 1 < len) { + result.push(',' + space); + } + } + result.push(')'); + } + + result = parenthesize(result, Precedence.New, precedence); + break; + + case Syntax.MemberExpression: + result = [generateExpression(expr.object, { + precedence: Precedence.Call, + allowIn: true, + allowCall: allowCall, + allowUnparenthesizedNew: false + })]; + + if (expr.computed) { + result.push('[', generateExpression(expr.property, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: allowCall + }), ']'); + } else { + if (expr.object.type === Syntax.Literal && typeof expr.object.value === 'number') { + if (result.indexOf('.') < 0) { + if (!/[eExX]/.test(result) && !(result.length >= 2 && result[0] === '0')) { + result.push('.'); + } + } + } + result.push('.' + expr.property.name); + } + + result = parenthesize(result, Precedence.Member, precedence); + break; + + case Syntax.UnaryExpression: + fragment = generateExpression(expr.argument, { + precedence: Precedence.Unary, + allowIn: true, + allowCall: true + }); + + if (space === '') { + result = join(expr.operator, fragment); + } else { + result = [expr.operator]; + if (expr.operator.length > 2) { + // delete, void, typeof + // get `typeof []`, not `typeof[]` + result = join(result, fragment); + } else { + // Prevent inserting spaces between operator and argument if it is unnecessary + // like, `!cond` + leftSource = toSourceNode(result).toString(); + leftChar = leftSource.charAt(leftSource.length - 1); + rightChar = fragment.toString().charAt(0); + + if (((leftChar === '+' || leftChar === '-') && leftChar === rightChar) || (isIdentifierPart(leftChar) && isIdentifierPart(rightChar))) { + result.push(' ', fragment); + } else { + result.push(fragment); + } + } + } + result = parenthesize(result, Precedence.Unary, precedence); + break; + + case Syntax.YieldExpression: + if (expr.delegate) { + result = 'yield*'; + } else { + result = 'yield'; + } + if (expr.argument) { + result = join( + result, + generateExpression(expr.argument, { + precedence: Precedence.Assignment, + allowIn: true, + allowCall: true + }) + ); + } + break; + + case Syntax.UpdateExpression: + if (expr.prefix) { + result = parenthesize( + [ + expr.operator, + generateExpression(expr.argument, { + precedence: Precedence.Unary, + allowIn: true, + allowCall: true + }) + ], + Precedence.Unary, + precedence + ); + } else { + result = parenthesize( + [ + generateExpression(expr.argument, { + precedence: Precedence.Postfix, + allowIn: true, + allowCall: true + }), + expr.operator + ], + Precedence.Postfix, + precedence + ); + } + break; + + case Syntax.FunctionExpression: + result = 'function'; + if (expr.id) { + result += ' ' + expr.id.name; + } else { + result += space; + } + + result = [result, generateFunctionBody(expr)]; + break; + + case Syntax.ArrayPattern: + case Syntax.ArrayExpression: + if (!expr.elements.length) { + result = '[]'; + break; + } + multiline = expr.elements.length > 1; + result = ['[', multiline ? newline : '']; + withIndent(function (indent) { + for (i = 0, len = expr.elements.length; i < len; i += 1) { + if (!expr.elements[i]) { + if (multiline) { + result.push(indent); + } + if (i + 1 === len) { + result.push(','); + } + } else { + result.push(multiline ? indent : '', generateExpression(expr.elements[i], { + precedence: Precedence.Assignment, + allowIn: true, + allowCall: true + })); + } + if (i + 1 < len) { + result.push(',' + (multiline ? newline : space)); + } + } + }); + if (multiline && !endsWithLineTerminator(toSourceNode(result).toString())) { + result.push(newline); + } + result.push(multiline ? base : '', ']'); + break; + + case Syntax.Property: + if (expr.kind === 'get' || expr.kind === 'set') { + result = [ + expr.kind + ' ', + generateExpression(expr.key, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }), + generateFunctionBody(expr.value) + ]; + } else { + if (expr.shorthand) { + result = generateExpression(expr.key, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }); + } else if (expr.method) { + result = []; + if (expr.value.generator) { + result.push('*'); + } + result.push(generateExpression(expr.key, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }), generateFunctionBody(expr.value)); + } else { + result = [ + generateExpression(expr.key, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }), + ':' + space, + generateExpression(expr.value, { + precedence: Precedence.Assignment, + allowIn: true, + allowCall: true + }) + ]; + } + } + break; + + case Syntax.ObjectExpression: + if (!expr.properties.length) { + result = '{}'; + break; + } + multiline = expr.properties.length > 1; + + withIndent(function (indent) { + fragment = generateExpression(expr.properties[0], { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true, + type: Syntax.Property + }); + }); + + if (!multiline) { + // issues 4 + // Do not transform from + // dejavu.Class.declare({ + // method2: function () {} + // }); + // to + // dejavu.Class.declare({method2: function () { + // }}); + if (!hasLineTerminator(toSourceNode(fragment).toString())) { + result = [ '{', space, fragment, space, '}' ]; + break; + } + } + + withIndent(function (indent) { + result = [ '{', newline, indent, fragment ]; + + if (multiline) { + result.push(',' + newline); + for (i = 1, len = expr.properties.length; i < len; i += 1) { + result.push(indent, generateExpression(expr.properties[i], { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true, + type: Syntax.Property + })); + if (i + 1 < len) { + result.push(',' + newline); + } + } + } + }); + + if (!endsWithLineTerminator(toSourceNode(result).toString())) { + result.push(newline); + } + result.push(base, '}'); + break; + + case Syntax.ObjectPattern: + if (!expr.properties.length) { + result = '{}'; + break; + } + + multiline = false; + if (expr.properties.length === 1) { + property = expr.properties[0]; + if (property.value.type !== Syntax.Identifier) { + multiline = true; + } + } else { + for (i = 0, len = expr.properties.length; i < len; i += 1) { + property = expr.properties[i]; + if (!property.shorthand) { + multiline = true; + break; + } + } + } + result = ['{', multiline ? newline : '' ]; + + withIndent(function (indent) { + for (i = 0, len = expr.properties.length; i < len; i += 1) { + result.push(multiline ? indent : '', generateExpression(expr.properties[i], { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + })); + if (i + 1 < len) { + result.push(',' + (multiline ? newline : space)); + } + } + }); + + if (multiline && !endsWithLineTerminator(toSourceNode(result).toString())) { + result.push(newline); + } + result.push(multiline ? base : '', '}'); + break; + + case Syntax.ThisExpression: + result = 'this'; + break; + + case Syntax.Identifier: + result = expr.name; + break; + + case Syntax.Literal: + if (expr.hasOwnProperty('raw') && parse) { + try { + raw = parse(expr.raw).body[0].expression; + if (raw.type === Syntax.Literal) { + if (raw.value === expr.value) { + result = expr.raw; + break; + } + } + } catch (e) { + // not use raw property + } + } + + if (expr.value === null) { + result = 'null'; + break; + } + + if (typeof expr.value === 'string') { + result = escapeString(expr.value); + break; + } + + if (typeof expr.value === 'number') { + result = generateNumber(expr.value); + break; + } + + result = expr.value.toString(); + break; + + case Syntax.ComprehensionExpression: + result = [ + '[', + generateExpression(expr.body, { + precedence: Precedence.Assignment, + allowIn: true, + allowCall: true + }) + ]; + + if (expr.blocks) { + for (i = 0, len = expr.blocks.length; i < len; i += 1) { + fragment = generateExpression(expr.blocks[i], { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }); + result = join(result, fragment); + } + } + + if (expr.filter) { + result = join(result, 'if' + space); + fragment = generateExpression(expr.filter, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }); + if (extra.moz.parenthesizedComprehensionBlock) { + result = join(result, [ '(', fragment, ')' ]); + } else { + result = join(result, fragment); + } + } + result.push(']'); + break; + + case Syntax.ComprehensionBlock: + if (expr.left.type === Syntax.VariableDeclaration) { + fragment = [ + expr.left.kind + ' ', + generateStatement(expr.left.declarations[0], { + allowIn: false + }) + ]; + } else { + fragment = generateExpression(expr.left, { + precedence: Precedence.Call, + allowIn: true, + allowCall: true + }); + } + + fragment = join(fragment, expr.of ? 'of' : 'in'); + fragment = join(fragment, generateExpression(expr.right, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + })); + + if (extra.moz.parenthesizedComprehensionBlock) { + result = [ 'for' + space + '(', fragment, ')' ]; + } else { + result = join('for' + space, fragment); + } + break; + + default: + throw new Error('Unknown expression type: ' + expr.type); + } + + return toSourceNode(result, expr); + } + + function generateStatement(stmt, option) { + var i, len, result, node, allowIn, functionBody, directiveContext, fragment, semicolon; + + allowIn = true; + semicolon = ';'; + functionBody = false; + directiveContext = false; + if (option) { + allowIn = option.allowIn === undefined || option.allowIn; + if (!semicolons && option.semicolonOptional === true) { + semicolon = ''; + } + functionBody = option.functionBody; + directiveContext = option.directiveContext; + } + + switch (stmt.type) { + case Syntax.BlockStatement: + result = ['{', newline]; + + withIndent(function () { + for (i = 0, len = stmt.body.length; i < len; i += 1) { + fragment = addIndent(generateStatement(stmt.body[i], { + semicolonOptional: i === len - 1, + directiveContext: functionBody + })); + result.push(fragment); + if (!endsWithLineTerminator(toSourceNode(fragment).toString())) { + result.push(newline); + } + } + }); + + result.push(addIndent('}')); + break; + + case Syntax.BreakStatement: + if (stmt.label) { + result = 'break ' + stmt.label.name + semicolon; + } else { + result = 'break' + semicolon; + } + break; + + case Syntax.ContinueStatement: + if (stmt.label) { + result = 'continue ' + stmt.label.name + semicolon; + } else { + result = 'continue' + semicolon; + } + break; + + case Syntax.DirectiveStatement: + if (stmt.raw) { + result = stmt.raw + semicolon; + } else { + result = escapeDirective(stmt.directive) + semicolon; + } + break; + + case Syntax.DoWhileStatement: + // Because `do 42 while (cond)` is Syntax Error. We need semicolon. + result = join('do', maybeBlock(stmt.body)); + result = maybeBlockSuffix(stmt.body, result); + result = join(result, [ + 'while' + space + '(', + generateExpression(stmt.test, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }), + ')' + semicolon + ]); + break; + + case Syntax.CatchClause: + withIndent(function () { + result = [ + 'catch' + space + '(', + generateExpression(stmt.param, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }), + ')' + ]; + }); + result.push(maybeBlock(stmt.body)); + break; + + case Syntax.DebuggerStatement: + result = 'debugger' + semicolon; + break; + + case Syntax.EmptyStatement: + result = ';'; + break; + + case Syntax.ExpressionStatement: + result = [generateExpression(stmt.expression, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + })]; + // 12.4 '{', 'function' is not allowed in this position. + // wrap expression with parentheses + if (result.toString().charAt(0) === '{' || (result.toString().slice(0, 8) === 'function' && " (".indexOf(result.toString().charAt(8)) >= 0) || (directive && directiveContext && stmt.expression.type === Syntax.Literal && typeof stmt.expression.value === 'string')) { + result = ['(', result, ')' + semicolon]; + } else { + result.push(semicolon); + } + break; + + case Syntax.VariableDeclarator: + if (stmt.init) { + result = [ + generateExpression(stmt.id, { + precedence: Precedence.Assignment, + allowIn: allowIn, + allowCall: true + }) + space + '=' + space, + generateExpression(stmt.init, { + precedence: Precedence.Assignment, + allowIn: allowIn, + allowCall: true + }) + ]; + } else { + result = stmt.id.name; + } + break; + + case Syntax.VariableDeclaration: + result = [stmt.kind]; + // special path for + // var x = function () { + // }; + if (stmt.declarations.length === 1 && stmt.declarations[0].init && + stmt.declarations[0].init.type === Syntax.FunctionExpression) { + result.push(' ', generateStatement(stmt.declarations[0], { + allowIn: allowIn + })); + } else { + // VariableDeclarator is typed as Statement, + // but joined with comma (not LineTerminator). + // So if comment is attached to target node, we should specialize. + withIndent(function () { + node = stmt.declarations[0]; + if (extra.comment && node.leadingComments) { + result.push('\n', addIndent(generateStatement(node, { + allowIn: allowIn + }))); + } else { + result.push(' ', generateStatement(node, { + allowIn: allowIn + })); + } + + for (i = 1, len = stmt.declarations.length; i < len; i += 1) { + node = stmt.declarations[i]; + if (extra.comment && node.leadingComments) { + result.push(',' + newline, addIndent(generateStatement(node, { + allowIn: allowIn + }))); + } else { + result.push(',' + space, generateStatement(node, { + allowIn: allowIn + })); + } + } + }); + } + result.push(semicolon); + break; + + case Syntax.ThrowStatement: + result = [join( + 'throw', + generateExpression(stmt.argument, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }) + ), semicolon]; + break; + + case Syntax.TryStatement: + result = ['try', maybeBlock(stmt.block)]; + result = maybeBlockSuffix(stmt.block, result); + for (i = 0, len = stmt.handlers.length; i < len; i += 1) { + result = join(result, generateStatement(stmt.handlers[i])); + if (stmt.finalizer || i + 1 !== len) { + result = maybeBlockSuffix(stmt.handlers[i].body, result); + } + } + if (stmt.finalizer) { + result = join(result, ['finally', maybeBlock(stmt.finalizer)]); + } + break; + + case Syntax.SwitchStatement: + withIndent(function () { + result = [ + 'switch' + space + '(', + generateExpression(stmt.discriminant, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }), + ')' + space + '{' + newline + ]; + }); + if (stmt.cases) { + for (i = 0, len = stmt.cases.length; i < len; i += 1) { + fragment = addIndent(generateStatement(stmt.cases[i], {semicolonOptional: i === len - 1})); + result.push(fragment); + if (!endsWithLineTerminator(toSourceNode(fragment).toString())) { + result.push(newline); + } + } + } + result.push(addIndent('}')); + break; + + case Syntax.SwitchCase: + withIndent(function () { + if (stmt.test) { + result = [ + join('case', generateExpression(stmt.test, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + })), + ':' + ]; + } else { + result = ['default:']; + } + + i = 0; + len = stmt.consequent.length; + if (len && stmt.consequent[0].type === Syntax.BlockStatement) { + fragment = maybeBlock(stmt.consequent[0]); + result.push(fragment); + i = 1; + } + + if (i !== len && !endsWithLineTerminator(toSourceNode(result).toString())) { + result.push(newline); + } + + for (; i < len; i += 1) { + fragment = addIndent(generateStatement(stmt.consequent[i], {semicolonOptional: i === len - 1 && semicolon === ''})); + result.push(fragment); + if (i + 1 !== len && !endsWithLineTerminator(toSourceNode(fragment).toString())) { + result.push(newline); + } + } + }); + break; + + case Syntax.IfStatement: + withIndent(function () { + result = [ + 'if' + space + '(', + generateExpression(stmt.test, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }), + ')' + ]; + }); + if (stmt.alternate) { + result.push(maybeBlock(stmt.consequent)); + result = maybeBlockSuffix(stmt.consequent, result); + if (stmt.alternate.type === Syntax.IfStatement) { + result = join(result, ['else ', generateStatement(stmt.alternate, {semicolonOptional: semicolon === ''})]); + } else { + result = join(result, join('else', maybeBlock(stmt.alternate, semicolon === ''))); + } + } else { + result.push(maybeBlock(stmt.consequent, semicolon === '')); + } + break; + + case Syntax.ForStatement: + withIndent(function () { + result = ['for' + space + '(']; + if (stmt.init) { + if (stmt.init.type === Syntax.VariableDeclaration) { + result.push(generateStatement(stmt.init, {allowIn: false})); + } else { + result.push(generateExpression(stmt.init, { + precedence: Precedence.Sequence, + allowIn: false, + allowCall: true + }), ';'); + } + } else { + result.push(';'); + } + + if (stmt.test) { + result.push(space, generateExpression(stmt.test, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }), ';'); + } else { + result.push(';'); + } + + if (stmt.update) { + result.push(space, generateExpression(stmt.update, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }), ')'); + } else { + result.push(')'); + } + }); + + result.push(maybeBlock(stmt.body, semicolon === '')); + break; + + case Syntax.ForInStatement: + result = ['for' + space + '(']; + withIndent(function () { + if (stmt.left.type === Syntax.VariableDeclaration) { + withIndent(function () { + result.push(stmt.left.kind + ' ', generateStatement(stmt.left.declarations[0], { + allowIn: false + })); + }); + } else { + result.push(generateExpression(stmt.left, { + precedence: Precedence.Call, + allowIn: true, + allowCall: true + })); + } + + result = join(result, 'in'); + result = [join( + result, + generateExpression(stmt.right, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }) + ), ')']; + }); + result.push(maybeBlock(stmt.body, semicolon === '')); + break; + + case Syntax.LabeledStatement: + result = [stmt.label.name + ':', maybeBlock(stmt.body, semicolon === '')]; + break; + + case Syntax.Program: + len = stmt.body.length; + result = [safeConcatenation && len > 0 ? '\n' : '']; + for (i = 0; i < len; i += 1) { + fragment = addIndent( + generateStatement(stmt.body[i], { + semicolonOptional: !safeConcatenation && i === len - 1, + directiveContext: true + }) + ); + result.push(fragment); + if (i + 1 < len && !endsWithLineTerminator(toSourceNode(fragment).toString())) { + result.push(newline); + } + } + break; + + case Syntax.FunctionDeclaration: + result = [(stmt.generator && !extra.moz.starlessGenerator ? 'function* ' : 'function ') + stmt.id.name, generateFunctionBody(stmt)]; + break; + + case Syntax.ReturnStatement: + if (stmt.argument) { + result = [join( + 'return', + generateExpression(stmt.argument, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }) + ), semicolon]; + } else { + result = ['return' + semicolon]; + } + break; + + case Syntax.WhileStatement: + withIndent(function () { + result = [ + 'while' + space + '(', + generateExpression(stmt.test, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }), + ')' + ]; + }); + result.push(maybeBlock(stmt.body, semicolon === '')); + break; + + case Syntax.WithStatement: + withIndent(function () { + result = [ + 'with' + space + '(', + generateExpression(stmt.object, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }), + ')' + ]; + }); + result.push(maybeBlock(stmt.body, semicolon === '')); + break; + + default: + throw new Error('Unknown statement type: ' + stmt.type); + } + + // Attach comments + + if (extra.comment) { + result = addCommentsToStatement(stmt, result); + } + + fragment = toSourceNode(result).toString(); + if (stmt.type === Syntax.Program && !safeConcatenation && newline === '' && fragment.charAt(fragment.length - 1) === '\n') { + result = toSourceNode(result).replaceRight(/\s+$/, ''); + } + + return toSourceNode(result, stmt); + } + + function generate(node, options) { + var defaultOptions = getDefaultOptions(), result, pair; + + if (options != null) { + // Obsolete options + // + // `options.indent` + // `options.base` + // + // Instead of them, we can use `option.format.indent`. + if (typeof options.indent === 'string') { + defaultOptions.format.indent.style = options.indent; + } + if (typeof options.base === 'number') { + defaultOptions.format.indent.base = options.base; + } + options = updateDeeply(defaultOptions, options); + indent = options.format.indent.style; + if (typeof options.base === 'string') { + base = options.base; + } else { + base = stringRepeat(indent, options.format.indent.base); + } + } else { + options = defaultOptions; + indent = options.format.indent.style; + base = stringRepeat(indent, options.format.indent.base); + } + json = options.format.json; + renumber = options.format.renumber; + hexadecimal = json ? false : options.format.hexadecimal; + quotes = json ? 'double' : options.format.quotes; + escapeless = options.format.escapeless; + if (options.format.compact) { + newline = space = indent = base = ''; + } else { + newline = '\n'; + space = ' '; + } + parentheses = options.format.parentheses; + semicolons = options.format.semicolons; + safeConcatenation = options.format.safeConcatenation; + directive = options.directive; + parse = json ? null : options.parse; + sourceMap = options.sourceMap; + extra = options; + + if (sourceMap) { + if (!exports.browser) { + // We assume environment is node.js + // And prevent from including source-map by browserify + SourceNode = require('source-map').SourceNode; + } else { + SourceNode = global.sourceMap.SourceNode; + } + } else { + SourceNode = SourceNodeMock; + } + + switch (node.type) { + case Syntax.BlockStatement: + case Syntax.BreakStatement: + case Syntax.CatchClause: + case Syntax.ContinueStatement: + case Syntax.DirectiveStatement: + case Syntax.DoWhileStatement: + case Syntax.DebuggerStatement: + case Syntax.EmptyStatement: + case Syntax.ExpressionStatement: + case Syntax.ForStatement: + case Syntax.ForInStatement: + case Syntax.FunctionDeclaration: + case Syntax.IfStatement: + case Syntax.LabeledStatement: + case Syntax.Program: + case Syntax.ReturnStatement: + case Syntax.SwitchStatement: + case Syntax.SwitchCase: + case Syntax.ThrowStatement: + case Syntax.TryStatement: + case Syntax.VariableDeclaration: + case Syntax.VariableDeclarator: + case Syntax.WhileStatement: + case Syntax.WithStatement: + result = generateStatement(node); + break; + + case Syntax.AssignmentExpression: + case Syntax.ArrayExpression: + case Syntax.ArrayPattern: + case Syntax.BinaryExpression: + case Syntax.CallExpression: + case Syntax.ConditionalExpression: + case Syntax.FunctionExpression: + case Syntax.Identifier: + case Syntax.Literal: + case Syntax.LogicalExpression: + case Syntax.MemberExpression: + case Syntax.NewExpression: + case Syntax.ObjectExpression: + case Syntax.ObjectPattern: + case Syntax.Property: + case Syntax.SequenceExpression: + case Syntax.ThisExpression: + case Syntax.UnaryExpression: + case Syntax.UpdateExpression: + case Syntax.YieldExpression: + + result = generateExpression(node, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }); + break; + + default: + throw new Error('Unknown node type: ' + node.type); + } + + if (!sourceMap) { + return result.toString(); + } + + pair = result.toStringWithSourceMap({ + file: options.sourceMap, + sourceRoot: options.sourceMapRoot + }); + + if (options.sourceMapWithCode) { + return pair; + } + return pair.map.toString(); + } + + // simple visitor implementation + + VisitorKeys = { + AssignmentExpression: ['left', 'right'], + ArrayExpression: ['elements'], + ArrayPattern: ['elements'], + BlockStatement: ['body'], + BinaryExpression: ['left', 'right'], + BreakStatement: ['label'], + CallExpression: ['callee', 'arguments'], + CatchClause: ['param', 'body'], + ConditionalExpression: ['test', 'consequent', 'alternate'], + ContinueStatement: ['label'], + DirectiveStatement: [], + DoWhileStatement: ['body', 'test'], + DebuggerStatement: [], + EmptyStatement: [], + ExpressionStatement: ['expression'], + ForStatement: ['init', 'test', 'update', 'body'], + ForInStatement: ['left', 'right', 'body'], + FunctionDeclaration: ['id', 'params', 'body'], + FunctionExpression: ['id', 'params', 'body'], + Identifier: [], + IfStatement: ['test', 'consequent', 'alternate'], + Literal: [], + LabeledStatement: ['label', 'body'], + LogicalExpression: ['left', 'right'], + MemberExpression: ['object', 'property'], + NewExpression: ['callee', 'arguments'], + ObjectExpression: ['properties'], + ObjectPattern: ['properties'], + Program: ['body'], + Property: ['key', 'value'], + ReturnStatement: ['argument'], + SequenceExpression: ['expressions'], + SwitchStatement: ['discriminant', 'cases'], + SwitchCase: ['test', 'consequent'], + ThisExpression: [], + ThrowStatement: ['argument'], + TryStatement: ['block', 'handlers', 'finalizer'], + UnaryExpression: ['argument'], + UpdateExpression: ['argument'], + VariableDeclaration: ['declarations'], + VariableDeclarator: ['id', 'init'], + WhileStatement: ['test', 'body'], + WithStatement: ['object', 'body'], + YieldExpression: ['argument'] + }; + + VisitorOption = { + Break: 1, + Skip: 2 + }; + + // based on LLVM libc++ upper_bound / lower_bound + // MIT License + + function upperBound(array, func) { + var diff, len, i, current; + + len = array.length; + i = 0; + + while (len) { + diff = len >>> 1; + current = i + diff; + if (func(array[current])) { + len = diff; + } else { + i = current + 1; + len -= diff + 1; + } + } + return i; + } + + function lowerBound(array, func) { + var diff, len, i, current; + + len = array.length; + i = 0; + + while (len) { + diff = len >>> 1; + current = i + diff; + if (func(array[current])) { + i = current + 1; + len -= diff + 1; + } else { + len = diff; + } + } + return i; + } + + function extendCommentRange(comment, tokens) { + var target, token; + + target = upperBound(tokens, function search(token) { + return token.range[0] > comment.range[0]; + }); + + comment.extendedRange = [comment.range[0], comment.range[1]]; + + if (target !== tokens.length) { + comment.extendedRange[1] = tokens[target].range[0]; + } + + target -= 1; + if (target >= 0) { + if (target < tokens.length) { + comment.extendedRange[0] = tokens[target].range[1]; + } else if (token.length) { + comment.extendedRange[1] = tokens[tokens.length - 1].range[0]; + } + } + + return comment; + } + + function attachComments(tree, providedComments, tokens) { + // At first, we should calculate extended comment ranges. + var comments = [], comment, len, i; + + if (!tree.range) { + throw new Error('attachComments needs range information'); + } + + // tokens array is empty, we attach comments to tree as 'leadingComments' + if (!tokens.length) { + if (providedComments.length) { + for (i = 0, len = providedComments.length; i < len; i += 1) { + comment = deepCopy(providedComments[i]); + comment.extendedRange = [0, tree.range[0]]; + comments.push(comment); + } + tree.leadingComments = comments; + } + return tree; + } + + for (i = 0, len = providedComments.length; i < len; i += 1) { + comments.push(extendCommentRange(deepCopy(providedComments[i]), tokens)); + } + + // This is based on John Freeman's implementation. + traverse(tree, { + cursor: 0, + enter: function (node) { + var comment; + + while (this.cursor < comments.length) { + comment = comments[this.cursor]; + if (comment.extendedRange[1] > node.range[0]) { + break; + } + + if (comment.extendedRange[1] === node.range[0]) { + if (!node.leadingComments) { + node.leadingComments = []; + } + node.leadingComments.push(comment); + comments.splice(this.cursor, 1); + } else { + this.cursor += 1; + } + } + + // already out of owned node + if (this.cursor === comments.length) { + return VisitorOption.Break; + } + + if (comments[this.cursor].extendedRange[0] > node.range[1]) { + return VisitorOption.Skip; + } + } + }); + + traverse(tree, { + cursor: 0, + leave: function (node) { + var comment; + + while (this.cursor < comments.length) { + comment = comments[this.cursor]; + if (node.range[1] < comment.extendedRange[0]) { + break; + } + + if (node.range[1] === comment.extendedRange[0]) { + if (!node.trailingComments) { + node.trailingComments = []; + } + node.trailingComments.push(comment); + comments.splice(this.cursor, 1); + } else { + this.cursor += 1; + } + } + + // already out of owned node + if (this.cursor === comments.length) { + return VisitorOption.Break; + } + + if (comments[this.cursor].extendedRange[0] > node.range[1]) { + return VisitorOption.Skip; + } + } + }); + + return tree; + } + + // Sync with package.json. + exports.version = '0.0.16'; + + exports.generate = generate; + exports.attachComments = attachComments; + exports.browser = false; +}()); +/* vim: set sw=4 ts=4 et tw=80 : */ + +}); + +require.define("/node_modules/estraverse/package.json",function(require,module,exports,__dirname,__filename,process,global){module.exports = {"main":"estraverse.js"} +}); + +require.define("/node_modules/estraverse/estraverse.js",function(require,module,exports,__dirname,__filename,process,global){/* + Copyright (C) 2012 Yusuke Suzuki + Copyright (C) 2012 Ariya Hidayat + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*jslint bitwise:true */ +/*global exports:true, define:true, window:true */ +(function (factory) { + 'use strict'; + + // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, + // and plain browser loading, + if (typeof define === 'function' && define.amd) { + define(['exports'], factory); + } else if (typeof exports !== 'undefined') { + factory(exports); + } else { + factory((window.estraverse = {})); + } +}(function (exports) { + 'use strict'; + + var Syntax, + isArray, + VisitorOption, + VisitorKeys, + wrappers; + + Syntax = { + AssignmentExpression: 'AssignmentExpression', + ArrayExpression: 'ArrayExpression', + BlockStatement: 'BlockStatement', + BinaryExpression: 'BinaryExpression', + BreakStatement: 'BreakStatement', + CallExpression: 'CallExpression', + CatchClause: 'CatchClause', + ConditionalExpression: 'ConditionalExpression', + ContinueStatement: 'ContinueStatement', + DebuggerStatement: 'DebuggerStatement', + DirectiveStatement: 'DirectiveStatement', + DoWhileStatement: 'DoWhileStatement', + EmptyStatement: 'EmptyStatement', + ExpressionStatement: 'ExpressionStatement', + ForStatement: 'ForStatement', + ForInStatement: 'ForInStatement', + FunctionDeclaration: 'FunctionDeclaration', + FunctionExpression: 'FunctionExpression', + Identifier: 'Identifier', + IfStatement: 'IfStatement', + Literal: 'Literal', + LabeledStatement: 'LabeledStatement', + LogicalExpression: 'LogicalExpression', + MemberExpression: 'MemberExpression', + NewExpression: 'NewExpression', + ObjectExpression: 'ObjectExpression', + Program: 'Program', + Property: 'Property', + ReturnStatement: 'ReturnStatement', + SequenceExpression: 'SequenceExpression', + SwitchStatement: 'SwitchStatement', + SwitchCase: 'SwitchCase', + ThisExpression: 'ThisExpression', + ThrowStatement: 'ThrowStatement', + TryStatement: 'TryStatement', + UnaryExpression: 'UnaryExpression', + UpdateExpression: 'UpdateExpression', + VariableDeclaration: 'VariableDeclaration', + VariableDeclarator: 'VariableDeclarator', + WhileStatement: 'WhileStatement', + WithStatement: 'WithStatement' + }; + + isArray = Array.isArray; + if (!isArray) { + isArray = function isArray(array) { + return Object.prototype.toString.call(array) === '[object Array]'; + }; + } + + VisitorKeys = { + AssignmentExpression: ['left', 'right'], + ArrayExpression: ['elements'], + BlockStatement: ['body'], + BinaryExpression: ['left', 'right'], + BreakStatement: ['label'], + CallExpression: ['callee', 'arguments'], + CatchClause: ['param', 'body'], + ConditionalExpression: ['test', 'consequent', 'alternate'], + ContinueStatement: ['label'], + DebuggerStatement: [], + DirectiveStatement: [], + DoWhileStatement: ['body', 'test'], + EmptyStatement: [], + ExpressionStatement: ['expression'], + ForStatement: ['init', 'test', 'update', 'body'], + ForInStatement: ['left', 'right', 'body'], + FunctionDeclaration: ['id', 'params', 'body'], + FunctionExpression: ['id', 'params', 'body'], + Identifier: [], + IfStatement: ['test', 'consequent', 'alternate'], + Literal: [], + LabeledStatement: ['label', 'body'], + LogicalExpression: ['left', 'right'], + MemberExpression: ['object', 'property'], + NewExpression: ['callee', 'arguments'], + ObjectExpression: ['properties'], + Program: ['body'], + Property: ['key', 'value'], + ReturnStatement: ['argument'], + SequenceExpression: ['expressions'], + SwitchStatement: ['discriminant', 'cases'], + SwitchCase: ['test', 'consequent'], + ThisExpression: [], + ThrowStatement: ['argument'], + TryStatement: ['block', 'handlers', 'finalizer'], + UnaryExpression: ['argument'], + UpdateExpression: ['argument'], + VariableDeclaration: ['declarations'], + VariableDeclarator: ['id', 'init'], + WhileStatement: ['test', 'body'], + WithStatement: ['object', 'body'] + }; + + VisitorOption = { + Break: 1, + Skip: 2 + }; + + wrappers = { + PropertyWrapper: 'Property' + }; + + function traverse(top, visitor) { + var worklist, leavelist, node, nodeType, ret, current, current2, candidates, candidate, marker = {}; + + worklist = [ top ]; + leavelist = [ null ]; + + while (worklist.length) { + node = worklist.pop(); + nodeType = node.type; + + if (node === marker) { + node = leavelist.pop(); + if (visitor.leave) { + ret = visitor.leave(node, leavelist[leavelist.length - 1]); + } else { + ret = undefined; + } + if (ret === VisitorOption.Break) { + return; + } + } else if (node) { + if (wrappers.hasOwnProperty(nodeType)) { + node = node.node; + nodeType = wrappers[nodeType]; + } + + if (visitor.enter) { + ret = visitor.enter(node, leavelist[leavelist.length - 1]); + } else { + ret = undefined; + } + + if (ret === VisitorOption.Break) { + return; + } + + worklist.push(marker); + leavelist.push(node); + + if (ret !== VisitorOption.Skip) { + candidates = VisitorKeys[nodeType]; + current = candidates.length; + while ((current -= 1) >= 0) { + candidate = node[candidates[current]]; + if (candidate) { + if (isArray(candidate)) { + current2 = candidate.length; + while ((current2 -= 1) >= 0) { + if (candidate[current2]) { + if(nodeType === Syntax.ObjectExpression && 'properties' === candidates[current] && null == candidates[current].type) { + worklist.push({type: 'PropertyWrapper', node: candidate[current2]}); + } else { + worklist.push(candidate[current2]); + } + } + } + } else { + worklist.push(candidate); + } + } + } + } + } + } + } + + function replace(top, visitor) { + var worklist, leavelist, node, nodeType, target, tuple, ret, current, current2, candidates, candidate, marker = {}, result; + + result = { + top: top + }; + + tuple = [ top, result, 'top' ]; + worklist = [ tuple ]; + leavelist = [ tuple ]; + + function notify(v) { + ret = v; + } + + while (worklist.length) { + tuple = worklist.pop(); + + if (tuple === marker) { + tuple = leavelist.pop(); + ret = undefined; + if (visitor.leave) { + node = tuple[0]; + target = visitor.leave(tuple[0], leavelist[leavelist.length - 1][0], notify); + if (target !== undefined) { + node = target; + } + tuple[1][tuple[2]] = node; + } + if (ret === VisitorOption.Break) { + return result.top; + } + } else if (tuple[0]) { + ret = undefined; + node = tuple[0]; + + nodeType = node.type; + if (wrappers.hasOwnProperty(nodeType)) { + tuple[0] = node = node.node; + nodeType = wrappers[nodeType]; + } + + if (visitor.enter) { + target = visitor.enter(tuple[0], leavelist[leavelist.length - 1][0], notify); + if (target !== undefined) { + node = target; + } + tuple[1][tuple[2]] = node; + tuple[0] = node; + } + + if (ret === VisitorOption.Break) { + return result.top; + } + + if (tuple[0]) { + worklist.push(marker); + leavelist.push(tuple); + + if (ret !== VisitorOption.Skip) { + candidates = VisitorKeys[nodeType]; + current = candidates.length; + while ((current -= 1) >= 0) { + candidate = node[candidates[current]]; + if (candidate) { + if (isArray(candidate)) { + current2 = candidate.length; + while ((current2 -= 1) >= 0) { + if (candidate[current2]) { + if(nodeType === Syntax.ObjectExpression && 'properties' === candidates[current] && null == candidates[current].type) { + worklist.push([{type: 'PropertyWrapper', node: candidate[current2]}, candidate, current2]); + } else { + worklist.push([candidate[current2], candidate, current2]); + } + } + } + } else { + worklist.push([candidate, node, candidates[current]]); + } + } + } + } + } + } + } + + return result.top; + } + + exports.version = '0.0.4'; + exports.Syntax = Syntax; + exports.traverse = traverse; + exports.replace = replace; + exports.VisitorKeys = VisitorKeys; + exports.VisitorOption = VisitorOption; +})); +/* vim: set sw=4 ts=4 et tw=80 : */ + +}); + +require.define("/tools/entry-point.js",function(require,module,exports,__dirname,__filename,process,global){/* + Copyright (C) 2012 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +(function () { + 'use strict'; + var escodegen; + escodegen = global.escodegen = require('../escodegen'); + escodegen.browser = true; +}()); + +}); +require("/tools/entry-point.js"); +})(); + diff --git a/pitfall/pdfkit/node_modules/escodegen/escodegen.js b/pitfall/pdfkit/node_modules/escodegen/escodegen.js new file mode 100644 index 00000000..6233d858 --- /dev/null +++ b/pitfall/pdfkit/node_modules/escodegen/escodegen.js @@ -0,0 +1,2189 @@ +/* + Copyright (C) 2012 Michael Ficarra + Copyright (C) 2012 Robert Gust-Bardon + Copyright (C) 2012 John Freeman + Copyright (C) 2011-2012 Ariya Hidayat + Copyright (C) 2012 Mathias Bynens + Copyright (C) 2012 Joost-Wim Boekesteijn + Copyright (C) 2012 Kris Kowal + Copyright (C) 2012 Yusuke Suzuki + Copyright (C) 2012 Arpad Borsos + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*jslint bitwise:true */ +/*global escodegen:true, exports:true, generateStatement:true, generateExpression:true, generateFunctionBody:true, process:true, require:true, define:true, global:true*/ +(function () { + 'use strict'; + + var Syntax, + Precedence, + BinaryPrecedence, + Regex, + VisitorKeys, + VisitorOption, + SourceNode, + isArray, + base, + indent, + json, + renumber, + hexadecimal, + quotes, + escapeless, + newline, + space, + parentheses, + semicolons, + safeConcatenation, + directive, + extra, + parse, + sourceMap, + traverse; + + traverse = require('estraverse').traverse; + + Syntax = { + AssignmentExpression: 'AssignmentExpression', + ArrayExpression: 'ArrayExpression', + ArrayPattern: 'ArrayPattern', + BlockStatement: 'BlockStatement', + BinaryExpression: 'BinaryExpression', + BreakStatement: 'BreakStatement', + CallExpression: 'CallExpression', + CatchClause: 'CatchClause', + ComprehensionBlock: 'ComprehensionBlock', + ComprehensionExpression: 'ComprehensionExpression', + ConditionalExpression: 'ConditionalExpression', + ContinueStatement: 'ContinueStatement', + DirectiveStatement: 'DirectiveStatement', + DoWhileStatement: 'DoWhileStatement', + DebuggerStatement: 'DebuggerStatement', + EmptyStatement: 'EmptyStatement', + ExpressionStatement: 'ExpressionStatement', + ForStatement: 'ForStatement', + ForInStatement: 'ForInStatement', + FunctionDeclaration: 'FunctionDeclaration', + FunctionExpression: 'FunctionExpression', + Identifier: 'Identifier', + IfStatement: 'IfStatement', + Literal: 'Literal', + LabeledStatement: 'LabeledStatement', + LogicalExpression: 'LogicalExpression', + MemberExpression: 'MemberExpression', + NewExpression: 'NewExpression', + ObjectExpression: 'ObjectExpression', + ObjectPattern: 'ObjectPattern', + Program: 'Program', + Property: 'Property', + ReturnStatement: 'ReturnStatement', + SequenceExpression: 'SequenceExpression', + SwitchStatement: 'SwitchStatement', + SwitchCase: 'SwitchCase', + ThisExpression: 'ThisExpression', + ThrowStatement: 'ThrowStatement', + TryStatement: 'TryStatement', + UnaryExpression: 'UnaryExpression', + UpdateExpression: 'UpdateExpression', + VariableDeclaration: 'VariableDeclaration', + VariableDeclarator: 'VariableDeclarator', + WhileStatement: 'WhileStatement', + WithStatement: 'WithStatement', + YieldExpression: 'YieldExpression' + + }; + + Precedence = { + Sequence: 0, + Assignment: 1, + Conditional: 2, + LogicalOR: 3, + LogicalAND: 4, + BitwiseOR: 5, + BitwiseXOR: 6, + BitwiseAND: 7, + Equality: 8, + Relational: 9, + BitwiseSHIFT: 10, + Additive: 11, + Multiplicative: 12, + Unary: 13, + Postfix: 14, + Call: 15, + New: 16, + Member: 17, + Primary: 18 + }; + + BinaryPrecedence = { + '||': Precedence.LogicalOR, + '&&': Precedence.LogicalAND, + '|': Precedence.BitwiseOR, + '^': Precedence.BitwiseXOR, + '&': Precedence.BitwiseAND, + '==': Precedence.Equality, + '!=': Precedence.Equality, + '===': Precedence.Equality, + '!==': Precedence.Equality, + 'is': Precedence.Equality, + 'isnt': Precedence.Equality, + '<': Precedence.Relational, + '>': Precedence.Relational, + '<=': Precedence.Relational, + '>=': Precedence.Relational, + 'in': Precedence.Relational, + 'instanceof': Precedence.Relational, + '<<': Precedence.BitwiseSHIFT, + '>>': Precedence.BitwiseSHIFT, + '>>>': Precedence.BitwiseSHIFT, + '+': Precedence.Additive, + '-': Precedence.Additive, + '*': Precedence.Multiplicative, + '%': Precedence.Multiplicative, + '/': Precedence.Multiplicative + }; + + Regex = { + NonAsciiIdentifierPart: new RegExp('[\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0300-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u0483-\u0487\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u05d0-\u05ea\u05f0-\u05f2\u0610-\u061a\u0620-\u0669\u066e-\u06d3\u06d5-\u06dc\u06df-\u06e8\u06ea-\u06fc\u06ff\u0710-\u074a\u074d-\u07b1\u07c0-\u07f5\u07fa\u0800-\u082d\u0840-\u085b\u08a0\u08a2-\u08ac\u08e4-\u08fe\u0900-\u0963\u0966-\u096f\u0971-\u0977\u0979-\u097f\u0981-\u0983\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bc-\u09c4\u09c7\u09c8\u09cb-\u09ce\u09d7\u09dc\u09dd\u09df-\u09e3\u09e6-\u09f1\u0a01-\u0a03\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a59-\u0a5c\u0a5e\u0a66-\u0a75\u0a81-\u0a83\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abc-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ad0\u0ae0-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3c-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5c\u0b5d\u0b5f-\u0b63\u0b66-\u0b6f\u0b71\u0b82\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd0\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c58\u0c59\u0c60-\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbc-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0cde\u0ce0-\u0ce3\u0ce6-\u0cef\u0cf1\u0cf2\u0d02\u0d03\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d-\u0d44\u0d46-\u0d48\u0d4a-\u0d4e\u0d57\u0d60-\u0d63\u0d66-\u0d6f\u0d7a-\u0d7f\u0d82\u0d83\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e01-\u0e3a\u0e40-\u0e4e\u0e50-\u0e59\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb9\u0ebb-\u0ebd\u0ec0-\u0ec4\u0ec6\u0ec8-\u0ecd\u0ed0-\u0ed9\u0edc-\u0edf\u0f00\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e-\u0f47\u0f49-\u0f6c\u0f71-\u0f84\u0f86-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1049\u1050-\u109d\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u135d-\u135f\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176c\u176e-\u1770\u1772\u1773\u1780-\u17d3\u17d7\u17dc\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1820-\u1877\u1880-\u18aa\u18b0-\u18f5\u1900-\u191c\u1920-\u192b\u1930-\u193b\u1946-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u19d0-\u19d9\u1a00-\u1a1b\u1a20-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1aa7\u1b00-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1bf3\u1c00-\u1c37\u1c40-\u1c49\u1c4d-\u1c7d\u1cd0-\u1cd2\u1cd4-\u1cf6\u1d00-\u1de6\u1dfc-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u200c\u200d\u203f\u2040\u2054\u2071\u207f\u2090-\u209c\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d7f-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2de0-\u2dff\u2e2f\u3005-\u3007\u3021-\u302f\u3031-\u3035\u3038-\u303c\u3041-\u3096\u3099\u309a\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua62b\ua640-\ua66f\ua674-\ua67d\ua67f-\ua697\ua69f-\ua6f1\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua827\ua840-\ua873\ua880-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f7\ua8fb\ua900-\ua92d\ua930-\ua953\ua960-\ua97c\ua980-\ua9c0\ua9cf-\ua9d9\uaa00-\uaa36\uaa40-\uaa4d\uaa50-\uaa59\uaa60-\uaa76\uaa7a\uaa7b\uaa80-\uaac2\uaadb-\uaadd\uaae0-\uaaef\uaaf2-\uaaf6\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabea\uabec\uabed\uabf0-\uabf9\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\ufe70-\ufe74\ufe76-\ufefc\uff10-\uff19\uff21-\uff3a\uff3f\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]') + }; + + function getDefaultOptions() { + // default options + return { + indent: null, + base: null, + parse: null, + comment: false, + format: { + indent: { + style: ' ', + base: 0, + adjustMultilineComment: false + }, + json: false, + renumber: false, + hexadecimal: false, + quotes: 'single', + escapeless: false, + compact: false, + parentheses: true, + semicolons: true, + safeConcatenation: false + }, + moz: { + starlessGenerator: false, + parenthesizedComprehensionBlock: false + }, + sourceMap: null, + sourceMapRoot: null, + sourceMapWithCode: false, + directive: false, + verbatim: null + }; + } + + function stringToArray(str) { + var length = str.length, + result = [], + i; + for (i = 0; i < length; i += 1) { + result[i] = str.charAt(i); + } + return result; + } + + function stringRepeat(str, num) { + var result = ''; + + for (num |= 0; num > 0; num >>>= 1, str += str) { + if (num & 1) { + result += str; + } + } + + return result; + } + + isArray = Array.isArray; + if (!isArray) { + isArray = function isArray(array) { + return Object.prototype.toString.call(array) === '[object Array]'; + }; + } + + // Fallback for the non SourceMap environment + function SourceNodeMock(line, column, filename, chunk) { + var result = []; + + function flatten(input) { + var i, iz; + if (isArray(input)) { + for (i = 0, iz = input.length; i < iz; ++i) { + flatten(input[i]); + } + } else if (input instanceof SourceNodeMock) { + result.push(input); + } else if (typeof input === 'string' && input) { + result.push(input); + } + } + + flatten(chunk); + this.children = result; + } + + SourceNodeMock.prototype.toString = function toString() { + var res = '', i, iz, node; + for (i = 0, iz = this.children.length; i < iz; ++i) { + node = this.children[i]; + if (node instanceof SourceNodeMock) { + res += node.toString(); + } else { + res += node; + } + } + return res; + }; + + SourceNodeMock.prototype.replaceRight = function replaceRight(pattern, replacement) { + var last = this.children[this.children.length - 1]; + if (last instanceof SourceNodeMock) { + last.replaceRight(pattern, replacement); + } else if (typeof last === 'string') { + this.children[this.children.length - 1] = last.replace(pattern, replacement); + } else { + this.children.push(''.replace(pattern, replacement)); + } + return this; + }; + + SourceNodeMock.prototype.join = function join(sep) { + var i, iz, result; + result = []; + iz = this.children.length; + if (iz > 0) { + for (i = 0, iz -= 1; i < iz; ++i) { + result.push(this.children[i], sep); + } + result.push(this.children[iz]); + this.children = result; + } + return this; + }; + + function hasLineTerminator(str) { + return (/[\r\n]/g).test(str); + } + + function endsWithLineTerminator(str) { + var ch = str.charAt(str.length - 1); + return ch === '\r' || ch === '\n'; + } + + function shallowCopy(obj) { + var ret = {}, key; + for (key in obj) { + if (obj.hasOwnProperty(key)) { + ret[key] = obj[key]; + } + } + return ret; + } + + function deepCopy(obj) { + var ret = {}, key, val; + for (key in obj) { + if (obj.hasOwnProperty(key)) { + val = obj[key]; + if (typeof val === 'object' && val !== null) { + ret[key] = deepCopy(val); + } else { + ret[key] = val; + } + } + } + return ret; + } + + function updateDeeply(target, override) { + var key, val; + + function isHashObject(target) { + return typeof target === 'object' && target instanceof Object && !(target instanceof RegExp); + } + + for (key in override) { + if (override.hasOwnProperty(key)) { + val = override[key]; + if (isHashObject(val)) { + if (isHashObject(target[key])) { + updateDeeply(target[key], val); + } else { + target[key] = updateDeeply({}, val); + } + } else { + target[key] = val; + } + } + } + return target; + } + + function generateNumber(value) { + var result, point, temp, exponent, pos; + + if (value !== value) { + throw new Error('Numeric literal whose value is NaN'); + } + if (value < 0 || (value === 0 && 1 / value < 0)) { + throw new Error('Numeric literal whose value is negative'); + } + + if (value === 1 / 0) { + return json ? 'null' : renumber ? '1e400' : '1e+400'; + } + + result = '' + value; + if (!renumber || result.length < 3) { + return result; + } + + point = result.indexOf('.'); + if (!json && result.charAt(0) === '0' && point === 1) { + point = 0; + result = result.slice(1); + } + temp = result; + result = result.replace('e+', 'e'); + exponent = 0; + if ((pos = temp.indexOf('e')) > 0) { + exponent = +temp.slice(pos + 1); + temp = temp.slice(0, pos); + } + if (point >= 0) { + exponent -= temp.length - point - 1; + temp = +(temp.slice(0, point) + temp.slice(point + 1)) + ''; + } + pos = 0; + while (temp.charAt(temp.length + pos - 1) === '0') { + pos -= 1; + } + if (pos !== 0) { + exponent -= pos; + temp = temp.slice(0, pos); + } + if (exponent !== 0) { + temp += 'e' + exponent; + } + if ((temp.length < result.length || + (hexadecimal && value > 1e12 && Math.floor(value) === value && (temp = '0x' + value.toString(16)).length < result.length)) && + +temp === value) { + result = temp; + } + + return result; + } + + function escapeAllowedCharacter(ch, next) { + var code = ch.charCodeAt(0), hex = code.toString(16), result = '\\'; + + switch (ch) { + case '\b': + result += 'b'; + break; + case '\f': + result += 'f'; + break; + case '\t': + result += 't'; + break; + default: + if (json || code > 0xff) { + result += 'u' + '0000'.slice(hex.length) + hex; + } else if (ch === '\u0000' && '0123456789'.indexOf(next) < 0) { + result += '0'; + } else if (ch === '\v') { + result += 'v'; + } else { + result += 'x' + '00'.slice(hex.length) + hex; + } + break; + } + + return result; + } + + function escapeDisallowedCharacter(ch) { + var result = '\\'; + switch (ch) { + case '\\': + result += '\\'; + break; + case '\n': + result += 'n'; + break; + case '\r': + result += 'r'; + break; + case '\u2028': + result += 'u2028'; + break; + case '\u2029': + result += 'u2029'; + break; + default: + throw new Error('Incorrectly classified character'); + } + + return result; + } + + function escapeDirective(str) { + var i, iz, ch, single, buf, quote; + + buf = str; + if (typeof buf[0] === 'undefined') { + buf = stringToArray(buf); + } + + quote = quotes === 'double' ? '"' : '\''; + for (i = 0, iz = buf.length; i < iz; i += 1) { + ch = buf[i]; + if (ch === '\'') { + quote = '"'; + break; + } else if (ch === '"') { + quote = '\''; + break; + } else if (ch === '\\') { + i += 1; + } + } + + return quote + str + quote; + } + + function escapeString(str) { + var result = '', i, len, ch, next, singleQuotes = 0, doubleQuotes = 0, single; + + if (typeof str[0] === 'undefined') { + str = stringToArray(str); + } + + for (i = 0, len = str.length; i < len; i += 1) { + ch = str[i]; + if (ch === '\'') { + singleQuotes += 1; + } else if (ch === '"') { + doubleQuotes += 1; + } else if (ch === '/' && json) { + result += '\\'; + } else if ('\\\n\r\u2028\u2029'.indexOf(ch) >= 0) { + result += escapeDisallowedCharacter(ch); + continue; + } else if ((json && ch < ' ') || !(json || escapeless || (ch >= ' ' && ch <= '~'))) { + result += escapeAllowedCharacter(ch, str[i + 1]); + continue; + } + result += ch; + } + + single = !(quotes === 'double' || (quotes === 'auto' && doubleQuotes < singleQuotes)); + str = result; + result = single ? '\'' : '"'; + + if (typeof str[0] === 'undefined') { + str = stringToArray(str); + } + + for (i = 0, len = str.length; i < len; i += 1) { + ch = str[i]; + if ((ch === '\'' && single) || (ch === '"' && !single)) { + result += '\\'; + } + result += ch; + } + + return result + (single ? '\'' : '"'); + } + + function isWhiteSpace(ch) { + return '\t\v\f \xa0'.indexOf(ch) >= 0 || (ch.charCodeAt(0) >= 0x1680 && '\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\ufeff'.indexOf(ch) >= 0); + } + + function isLineTerminator(ch) { + return '\n\r\u2028\u2029'.indexOf(ch) >= 0; + } + + function isIdentifierPart(ch) { + return (ch === '$') || (ch === '_') || (ch === '\\') || + (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || + ((ch >= '0') && (ch <= '9')) || + ((ch.charCodeAt(0) >= 0x80) && Regex.NonAsciiIdentifierPart.test(ch)); + } + + function toSourceNode(generated, node) { + if (node == null) { + if (generated instanceof SourceNode) { + return generated; + } else { + node = {}; + } + } + if (node.loc == null) { + return new SourceNode(null, null, sourceMap, generated); + } + return new SourceNode(node.loc.start.line, node.loc.start.column, (sourceMap === true ? node.loc.source || null : sourceMap), generated); + } + + function join(left, right) { + var leftSource = toSourceNode(left).toString(), + rightSource = toSourceNode(right).toString(), + leftChar = leftSource.charAt(leftSource.length - 1), + rightChar = rightSource.charAt(0); + + if (((leftChar === '+' || leftChar === '-') && leftChar === rightChar) || (isIdentifierPart(leftChar) && isIdentifierPart(rightChar))) { + return [left, ' ', right]; + } else if (isWhiteSpace(leftChar) || isLineTerminator(leftChar) || isWhiteSpace(rightChar) || isLineTerminator(rightChar)) { + return [left, right]; + } + return [left, space, right]; + } + + function addIndent(stmt) { + return [base, stmt]; + } + + function withIndent(fn) { + var previousBase, result; + previousBase = base; + base += indent; + result = fn.call(this, base); + base = previousBase; + return result; + } + + function calculateSpaces(str) { + var i; + for (i = str.length - 1; i >= 0; i -= 1) { + if (isLineTerminator(str.charAt(i))) { + break; + } + } + return (str.length - 1) - i; + } + + function adjustMultilineComment(value, specialBase) { + var array, i, len, line, j, ch, spaces, previousBase; + + array = value.split(/\r\n|[\r\n]/); + spaces = Number.MAX_VALUE; + + // first line doesn't have indentation + for (i = 1, len = array.length; i < len; i += 1) { + line = array[i]; + j = 0; + while (j < line.length && isWhiteSpace(line[j])) { + j += 1; + } + if (spaces > j) { + spaces = j; + } + } + + if (typeof specialBase !== 'undefined') { + // pattern like + // { + // var t = 20; /* + // * this is comment + // */ + // } + previousBase = base; + if (array[1][spaces] === '*') { + specialBase += ' '; + } + base = specialBase; + } else { + if (spaces & 1) { + // /* + // * + // */ + // If spaces are odd number, above pattern is considered. + // We waste 1 space. + spaces -= 1; + } + previousBase = base; + } + + for (i = 1, len = array.length; i < len; i += 1) { + array[i] = toSourceNode(addIndent(array[i].slice(spaces))).join(''); + } + + base = previousBase; + + return array.join('\n'); + } + + function generateComment(comment, specialBase) { + if (comment.type === 'Line') { + if (endsWithLineTerminator(comment.value)) { + return '//' + comment.value; + } else { + // Always use LineTerminator + return '//' + comment.value + '\n'; + } + } + if (extra.format.indent.adjustMultilineComment && /[\n\r]/.test(comment.value)) { + return adjustMultilineComment('/*' + comment.value + '*/', specialBase); + } + return '/*' + comment.value + '*/'; + } + + function addCommentsToStatement(stmt, result) { + var i, len, comment, save, node, tailingToStatement, specialBase, fragment; + + if (stmt.leadingComments && stmt.leadingComments.length > 0) { + save = result; + + comment = stmt.leadingComments[0]; + result = []; + if (safeConcatenation && stmt.type === Syntax.Program && stmt.body.length === 0) { + result.push('\n'); + } + result.push(generateComment(comment)); + if (!endsWithLineTerminator(toSourceNode(result).toString())) { + result.push('\n'); + } + + for (i = 1, len = stmt.leadingComments.length; i < len; i += 1) { + comment = stmt.leadingComments[i]; + fragment = [generateComment(comment)]; + if (!endsWithLineTerminator(toSourceNode(fragment).toString())) { + fragment.push('\n'); + } + result.push(addIndent(fragment)); + } + + result.push(addIndent(save)); + } + + if (stmt.trailingComments) { + tailingToStatement = !endsWithLineTerminator(toSourceNode(result).toString()); + specialBase = stringRepeat(' ', calculateSpaces(toSourceNode([base, result, indent]).toString())); + for (i = 0, len = stmt.trailingComments.length; i < len; i += 1) { + comment = stmt.trailingComments[i]; + if (tailingToStatement) { + // We assume target like following script + // + // var t = 20; /** + // * This is comment of t + // */ + if (i === 0) { + // first case + result = [result, indent]; + } else { + result = [result, specialBase]; + } + result.push(generateComment(comment, specialBase)); + } else { + result = [result, addIndent(generateComment(comment))]; + } + if (i !== len - 1 && !endsWithLineTerminator(toSourceNode(result).toString())) { + result = [result, '\n']; + } + } + } + + return result; + } + + function parenthesize(text, current, should) { + if (current < should) { + return ['(', text, ')']; + } + return text; + } + + function maybeBlock(stmt, semicolonOptional, functionBody) { + var result, noLeadingComment; + + noLeadingComment = !extra.comment || !stmt.leadingComments; + + if (stmt.type === Syntax.BlockStatement && noLeadingComment) { + return [space, generateStatement(stmt, { functionBody: functionBody })]; + } + + if (stmt.type === Syntax.EmptyStatement && noLeadingComment) { + return ';'; + } + + withIndent(function () { + result = [newline, addIndent(generateStatement(stmt, { semicolonOptional: semicolonOptional, functionBody: functionBody }))]; + }); + + return result; + } + + function maybeBlockSuffix(stmt, result) { + var ends = endsWithLineTerminator(toSourceNode(result).toString()); + if (stmt.type === Syntax.BlockStatement && (!extra.comment || !stmt.leadingComments) && !ends) { + return [result, space]; + } + if (ends) { + return [result, base]; + } + return [result, newline, base]; + } + + function generateVerbatim(expr, option) { + var i, result; + result = expr[extra.verbatim].split(/\r\n|\n/); + for (i = 1; i < result.length; i++) { + result[i] = newline + base + result[i]; + } + + result = parenthesize(result, Precedence.Sequence, option.precedence); + return toSourceNode(result, expr); + } + + function generateFunctionBody(node) { + var result, i, len, expr; + result = ['(']; + for (i = 0, len = node.params.length; i < len; i += 1) { + result.push(node.params[i].name); + if (i + 1 < len) { + result.push(',' + space); + } + } + result.push(')'); + + if (node.expression) { + result.push(space); + expr = generateExpression(node.body, { + precedence: Precedence.Assignment, + allowIn: true, + allowCall: true + }); + if (expr.toString().charAt(0) === '{') { + expr = ['(', expr, ')']; + } + result.push(expr); + } else { + result.push(maybeBlock(node.body, false, true)); + } + return result; + } + + function generateExpression(expr, option) { + var result, precedence, type, currentPrecedence, i, len, raw, fragment, multiline, leftChar, leftSource, rightChar, rightSource, allowIn, allowCall, allowUnparenthesizedNew, property, key, value; + + precedence = option.precedence; + allowIn = option.allowIn; + allowCall = option.allowCall; + type = expr.type || option.type; + + if (extra.verbatim && expr.hasOwnProperty(extra.verbatim)) { + return generateVerbatim(expr, option); + } + + switch (type) { + case Syntax.SequenceExpression: + result = []; + allowIn |= (Precedence.Sequence < precedence); + for (i = 0, len = expr.expressions.length; i < len; i += 1) { + result.push(generateExpression(expr.expressions[i], { + precedence: Precedence.Assignment, + allowIn: allowIn, + allowCall: true + })); + if (i + 1 < len) { + result.push(',' + space); + } + } + result = parenthesize(result, Precedence.Sequence, precedence); + break; + + case Syntax.AssignmentExpression: + allowIn |= (Precedence.Assignment < precedence); + result = parenthesize( + [ + generateExpression(expr.left, { + precedence: Precedence.Call, + allowIn: allowIn, + allowCall: true + }), + space + expr.operator + space, + generateExpression(expr.right, { + precedence: Precedence.Assignment, + allowIn: allowIn, + allowCall: true + }) + ], + Precedence.Assignment, + precedence + ); + break; + + case Syntax.ConditionalExpression: + allowIn |= (Precedence.Conditional < precedence); + result = parenthesize( + [ + generateExpression(expr.test, { + precedence: Precedence.LogicalOR, + allowIn: allowIn, + allowCall: true + }), + space + '?' + space, + generateExpression(expr.consequent, { + precedence: Precedence.Assignment, + allowIn: allowIn, + allowCall: true + }), + space + ':' + space, + generateExpression(expr.alternate, { + precedence: Precedence.Assignment, + allowIn: allowIn, + allowCall: true + }) + ], + Precedence.Conditional, + precedence + ); + break; + + case Syntax.LogicalExpression: + case Syntax.BinaryExpression: + currentPrecedence = BinaryPrecedence[expr.operator]; + + allowIn |= (currentPrecedence < precedence); + + fragment = generateExpression(expr.left, { + precedence: currentPrecedence, + allowIn: allowIn, + allowCall: true + }); + + leftSource = fragment.toString(); + + if (leftSource.charAt(leftSource.length - 1) === '/' && isIdentifierPart(expr.operator.charAt(0))) { + result = [fragment, ' ', expr.operator]; + } else { + result = join(fragment, expr.operator); + } + + fragment = generateExpression(expr.right, { + precedence: currentPrecedence + 1, + allowIn: allowIn, + allowCall: true + }); + + if (expr.operator === '/' && fragment.toString().charAt(0) === '/') { + // If '/' concats with '/', it is interpreted as comment start + result.push(' ', fragment); + } else { + result = join(result, fragment); + } + + if (expr.operator === 'in' && !allowIn) { + result = ['(', result, ')']; + } else { + result = parenthesize(result, currentPrecedence, precedence); + } + + break; + + case Syntax.CallExpression: + result = [generateExpression(expr.callee, { + precedence: Precedence.Call, + allowIn: true, + allowCall: true, + allowUnparenthesizedNew: false + })]; + + result.push('('); + for (i = 0, len = expr['arguments'].length; i < len; i += 1) { + result.push(generateExpression(expr['arguments'][i], { + precedence: Precedence.Assignment, + allowIn: true, + allowCall: true + })); + if (i + 1 < len) { + result.push(',' + space); + } + } + result.push(')'); + + if (!allowCall) { + result = ['(', result, ')']; + } else { + result = parenthesize(result, Precedence.Call, precedence); + } + break; + + case Syntax.NewExpression: + len = expr['arguments'].length; + allowUnparenthesizedNew = option.allowUnparenthesizedNew === undefined || option.allowUnparenthesizedNew; + + result = join( + 'new', + generateExpression(expr.callee, { + precedence: Precedence.New, + allowIn: true, + allowCall: false, + allowUnparenthesizedNew: allowUnparenthesizedNew && !parentheses && len === 0 + }) + ); + + if (!allowUnparenthesizedNew || parentheses || len > 0) { + result.push('('); + for (i = 0; i < len; i += 1) { + result.push(generateExpression(expr['arguments'][i], { + precedence: Precedence.Assignment, + allowIn: true, + allowCall: true + })); + if (i + 1 < len) { + result.push(',' + space); + } + } + result.push(')'); + } + + result = parenthesize(result, Precedence.New, precedence); + break; + + case Syntax.MemberExpression: + result = [generateExpression(expr.object, { + precedence: Precedence.Call, + allowIn: true, + allowCall: allowCall, + allowUnparenthesizedNew: false + })]; + + if (expr.computed) { + result.push('[', generateExpression(expr.property, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: allowCall + }), ']'); + } else { + if (expr.object.type === Syntax.Literal && typeof expr.object.value === 'number') { + if (result.indexOf('.') < 0) { + if (!/[eExX]/.test(result) && !(result.length >= 2 && result[0] === '0')) { + result.push('.'); + } + } + } + result.push('.' + expr.property.name); + } + + result = parenthesize(result, Precedence.Member, precedence); + break; + + case Syntax.UnaryExpression: + fragment = generateExpression(expr.argument, { + precedence: Precedence.Unary, + allowIn: true, + allowCall: true + }); + + if (space === '') { + result = join(expr.operator, fragment); + } else { + result = [expr.operator]; + if (expr.operator.length > 2) { + // delete, void, typeof + // get `typeof []`, not `typeof[]` + result = join(result, fragment); + } else { + // Prevent inserting spaces between operator and argument if it is unnecessary + // like, `!cond` + leftSource = toSourceNode(result).toString(); + leftChar = leftSource.charAt(leftSource.length - 1); + rightChar = fragment.toString().charAt(0); + + if (((leftChar === '+' || leftChar === '-') && leftChar === rightChar) || (isIdentifierPart(leftChar) && isIdentifierPart(rightChar))) { + result.push(' ', fragment); + } else { + result.push(fragment); + } + } + } + result = parenthesize(result, Precedence.Unary, precedence); + break; + + case Syntax.YieldExpression: + if (expr.delegate) { + result = 'yield*'; + } else { + result = 'yield'; + } + if (expr.argument) { + result = join( + result, + generateExpression(expr.argument, { + precedence: Precedence.Assignment, + allowIn: true, + allowCall: true + }) + ); + } + break; + + case Syntax.UpdateExpression: + if (expr.prefix) { + result = parenthesize( + [ + expr.operator, + generateExpression(expr.argument, { + precedence: Precedence.Unary, + allowIn: true, + allowCall: true + }) + ], + Precedence.Unary, + precedence + ); + } else { + result = parenthesize( + [ + generateExpression(expr.argument, { + precedence: Precedence.Postfix, + allowIn: true, + allowCall: true + }), + expr.operator + ], + Precedence.Postfix, + precedence + ); + } + break; + + case Syntax.FunctionExpression: + result = 'function'; + if (expr.id) { + result += ' ' + expr.id.name; + } else { + result += space; + } + + result = [result, generateFunctionBody(expr)]; + break; + + case Syntax.ArrayPattern: + case Syntax.ArrayExpression: + if (!expr.elements.length) { + result = '[]'; + break; + } + multiline = expr.elements.length > 1; + result = ['[', multiline ? newline : '']; + withIndent(function (indent) { + for (i = 0, len = expr.elements.length; i < len; i += 1) { + if (!expr.elements[i]) { + if (multiline) { + result.push(indent); + } + if (i + 1 === len) { + result.push(','); + } + } else { + result.push(multiline ? indent : '', generateExpression(expr.elements[i], { + precedence: Precedence.Assignment, + allowIn: true, + allowCall: true + })); + } + if (i + 1 < len) { + result.push(',' + (multiline ? newline : space)); + } + } + }); + if (multiline && !endsWithLineTerminator(toSourceNode(result).toString())) { + result.push(newline); + } + result.push(multiline ? base : '', ']'); + break; + + case Syntax.Property: + if (expr.kind === 'get' || expr.kind === 'set') { + result = [ + expr.kind + ' ', + generateExpression(expr.key, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }), + generateFunctionBody(expr.value) + ]; + } else { + if (expr.shorthand) { + result = generateExpression(expr.key, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }); + } else if (expr.method) { + result = []; + if (expr.value.generator) { + result.push('*'); + } + result.push(generateExpression(expr.key, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }), generateFunctionBody(expr.value)); + } else { + result = [ + generateExpression(expr.key, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }), + ':' + space, + generateExpression(expr.value, { + precedence: Precedence.Assignment, + allowIn: true, + allowCall: true + }) + ]; + } + } + break; + + case Syntax.ObjectExpression: + if (!expr.properties.length) { + result = '{}'; + break; + } + multiline = expr.properties.length > 1; + + withIndent(function (indent) { + fragment = generateExpression(expr.properties[0], { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true, + type: Syntax.Property + }); + }); + + if (!multiline) { + // issues 4 + // Do not transform from + // dejavu.Class.declare({ + // method2: function () {} + // }); + // to + // dejavu.Class.declare({method2: function () { + // }}); + if (!hasLineTerminator(toSourceNode(fragment).toString())) { + result = [ '{', space, fragment, space, '}' ]; + break; + } + } + + withIndent(function (indent) { + result = [ '{', newline, indent, fragment ]; + + if (multiline) { + result.push(',' + newline); + for (i = 1, len = expr.properties.length; i < len; i += 1) { + result.push(indent, generateExpression(expr.properties[i], { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true, + type: Syntax.Property + })); + if (i + 1 < len) { + result.push(',' + newline); + } + } + } + }); + + if (!endsWithLineTerminator(toSourceNode(result).toString())) { + result.push(newline); + } + result.push(base, '}'); + break; + + case Syntax.ObjectPattern: + if (!expr.properties.length) { + result = '{}'; + break; + } + + multiline = false; + if (expr.properties.length === 1) { + property = expr.properties[0]; + if (property.value.type !== Syntax.Identifier) { + multiline = true; + } + } else { + for (i = 0, len = expr.properties.length; i < len; i += 1) { + property = expr.properties[i]; + if (!property.shorthand) { + multiline = true; + break; + } + } + } + result = ['{', multiline ? newline : '' ]; + + withIndent(function (indent) { + for (i = 0, len = expr.properties.length; i < len; i += 1) { + result.push(multiline ? indent : '', generateExpression(expr.properties[i], { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + })); + if (i + 1 < len) { + result.push(',' + (multiline ? newline : space)); + } + } + }); + + if (multiline && !endsWithLineTerminator(toSourceNode(result).toString())) { + result.push(newline); + } + result.push(multiline ? base : '', '}'); + break; + + case Syntax.ThisExpression: + result = 'this'; + break; + + case Syntax.Identifier: + result = expr.name; + break; + + case Syntax.Literal: + if (expr.hasOwnProperty('raw') && parse) { + try { + raw = parse(expr.raw).body[0].expression; + if (raw.type === Syntax.Literal) { + if (raw.value === expr.value) { + result = expr.raw; + break; + } + } + } catch (e) { + // not use raw property + } + } + + if (expr.value === null) { + result = 'null'; + break; + } + + if (typeof expr.value === 'string') { + result = escapeString(expr.value); + break; + } + + if (typeof expr.value === 'number') { + result = generateNumber(expr.value); + break; + } + + result = expr.value.toString(); + break; + + case Syntax.ComprehensionExpression: + result = [ + '[', + generateExpression(expr.body, { + precedence: Precedence.Assignment, + allowIn: true, + allowCall: true + }) + ]; + + if (expr.blocks) { + for (i = 0, len = expr.blocks.length; i < len; i += 1) { + fragment = generateExpression(expr.blocks[i], { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }); + result = join(result, fragment); + } + } + + if (expr.filter) { + result = join(result, 'if' + space); + fragment = generateExpression(expr.filter, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }); + if (extra.moz.parenthesizedComprehensionBlock) { + result = join(result, [ '(', fragment, ')' ]); + } else { + result = join(result, fragment); + } + } + result.push(']'); + break; + + case Syntax.ComprehensionBlock: + if (expr.left.type === Syntax.VariableDeclaration) { + fragment = [ + expr.left.kind + ' ', + generateStatement(expr.left.declarations[0], { + allowIn: false + }) + ]; + } else { + fragment = generateExpression(expr.left, { + precedence: Precedence.Call, + allowIn: true, + allowCall: true + }); + } + + fragment = join(fragment, expr.of ? 'of' : 'in'); + fragment = join(fragment, generateExpression(expr.right, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + })); + + if (extra.moz.parenthesizedComprehensionBlock) { + result = [ 'for' + space + '(', fragment, ')' ]; + } else { + result = join('for' + space, fragment); + } + break; + + default: + throw new Error('Unknown expression type: ' + expr.type); + } + + return toSourceNode(result, expr); + } + + function generateStatement(stmt, option) { + var i, len, result, node, allowIn, functionBody, directiveContext, fragment, semicolon; + + allowIn = true; + semicolon = ';'; + functionBody = false; + directiveContext = false; + if (option) { + allowIn = option.allowIn === undefined || option.allowIn; + if (!semicolons && option.semicolonOptional === true) { + semicolon = ''; + } + functionBody = option.functionBody; + directiveContext = option.directiveContext; + } + + switch (stmt.type) { + case Syntax.BlockStatement: + result = ['{', newline]; + + withIndent(function () { + for (i = 0, len = stmt.body.length; i < len; i += 1) { + fragment = addIndent(generateStatement(stmt.body[i], { + semicolonOptional: i === len - 1, + directiveContext: functionBody + })); + result.push(fragment); + if (!endsWithLineTerminator(toSourceNode(fragment).toString())) { + result.push(newline); + } + } + }); + + result.push(addIndent('}')); + break; + + case Syntax.BreakStatement: + if (stmt.label) { + result = 'break ' + stmt.label.name + semicolon; + } else { + result = 'break' + semicolon; + } + break; + + case Syntax.ContinueStatement: + if (stmt.label) { + result = 'continue ' + stmt.label.name + semicolon; + } else { + result = 'continue' + semicolon; + } + break; + + case Syntax.DirectiveStatement: + if (stmt.raw) { + result = stmt.raw + semicolon; + } else { + result = escapeDirective(stmt.directive) + semicolon; + } + break; + + case Syntax.DoWhileStatement: + // Because `do 42 while (cond)` is Syntax Error. We need semicolon. + result = join('do', maybeBlock(stmt.body)); + result = maybeBlockSuffix(stmt.body, result); + result = join(result, [ + 'while' + space + '(', + generateExpression(stmt.test, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }), + ')' + semicolon + ]); + break; + + case Syntax.CatchClause: + withIndent(function () { + result = [ + 'catch' + space + '(', + generateExpression(stmt.param, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }), + ')' + ]; + }); + result.push(maybeBlock(stmt.body)); + break; + + case Syntax.DebuggerStatement: + result = 'debugger' + semicolon; + break; + + case Syntax.EmptyStatement: + result = ';'; + break; + + case Syntax.ExpressionStatement: + result = [generateExpression(stmt.expression, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + })]; + // 12.4 '{', 'function' is not allowed in this position. + // wrap expression with parentheses + if (result.toString().charAt(0) === '{' || (result.toString().slice(0, 8) === 'function' && " (".indexOf(result.toString().charAt(8)) >= 0) || (directive && directiveContext && stmt.expression.type === Syntax.Literal && typeof stmt.expression.value === 'string')) { + result = ['(', result, ')' + semicolon]; + } else { + result.push(semicolon); + } + break; + + case Syntax.VariableDeclarator: + if (stmt.init) { + result = [ + generateExpression(stmt.id, { + precedence: Precedence.Assignment, + allowIn: allowIn, + allowCall: true + }) + space + '=' + space, + generateExpression(stmt.init, { + precedence: Precedence.Assignment, + allowIn: allowIn, + allowCall: true + }) + ]; + } else { + result = stmt.id.name; + } + break; + + case Syntax.VariableDeclaration: + result = [stmt.kind]; + // special path for + // var x = function () { + // }; + if (stmt.declarations.length === 1 && stmt.declarations[0].init && + stmt.declarations[0].init.type === Syntax.FunctionExpression) { + result.push(' ', generateStatement(stmt.declarations[0], { + allowIn: allowIn + })); + } else { + // VariableDeclarator is typed as Statement, + // but joined with comma (not LineTerminator). + // So if comment is attached to target node, we should specialize. + withIndent(function () { + node = stmt.declarations[0]; + if (extra.comment && node.leadingComments) { + result.push('\n', addIndent(generateStatement(node, { + allowIn: allowIn + }))); + } else { + result.push(' ', generateStatement(node, { + allowIn: allowIn + })); + } + + for (i = 1, len = stmt.declarations.length; i < len; i += 1) { + node = stmt.declarations[i]; + if (extra.comment && node.leadingComments) { + result.push(',' + newline, addIndent(generateStatement(node, { + allowIn: allowIn + }))); + } else { + result.push(',' + space, generateStatement(node, { + allowIn: allowIn + })); + } + } + }); + } + result.push(semicolon); + break; + + case Syntax.ThrowStatement: + result = [join( + 'throw', + generateExpression(stmt.argument, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }) + ), semicolon]; + break; + + case Syntax.TryStatement: + result = ['try', maybeBlock(stmt.block)]; + result = maybeBlockSuffix(stmt.block, result); + for (i = 0, len = stmt.handlers.length; i < len; i += 1) { + result = join(result, generateStatement(stmt.handlers[i])); + if (stmt.finalizer || i + 1 !== len) { + result = maybeBlockSuffix(stmt.handlers[i].body, result); + } + } + if (stmt.finalizer) { + result = join(result, ['finally', maybeBlock(stmt.finalizer)]); + } + break; + + case Syntax.SwitchStatement: + withIndent(function () { + result = [ + 'switch' + space + '(', + generateExpression(stmt.discriminant, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }), + ')' + space + '{' + newline + ]; + }); + if (stmt.cases) { + for (i = 0, len = stmt.cases.length; i < len; i += 1) { + fragment = addIndent(generateStatement(stmt.cases[i], {semicolonOptional: i === len - 1})); + result.push(fragment); + if (!endsWithLineTerminator(toSourceNode(fragment).toString())) { + result.push(newline); + } + } + } + result.push(addIndent('}')); + break; + + case Syntax.SwitchCase: + withIndent(function () { + if (stmt.test) { + result = [ + join('case', generateExpression(stmt.test, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + })), + ':' + ]; + } else { + result = ['default:']; + } + + i = 0; + len = stmt.consequent.length; + if (len && stmt.consequent[0].type === Syntax.BlockStatement) { + fragment = maybeBlock(stmt.consequent[0]); + result.push(fragment); + i = 1; + } + + if (i !== len && !endsWithLineTerminator(toSourceNode(result).toString())) { + result.push(newline); + } + + for (; i < len; i += 1) { + fragment = addIndent(generateStatement(stmt.consequent[i], {semicolonOptional: i === len - 1 && semicolon === ''})); + result.push(fragment); + if (i + 1 !== len && !endsWithLineTerminator(toSourceNode(fragment).toString())) { + result.push(newline); + } + } + }); + break; + + case Syntax.IfStatement: + withIndent(function () { + result = [ + 'if' + space + '(', + generateExpression(stmt.test, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }), + ')' + ]; + }); + if (stmt.alternate) { + result.push(maybeBlock(stmt.consequent)); + result = maybeBlockSuffix(stmt.consequent, result); + if (stmt.alternate.type === Syntax.IfStatement) { + result = join(result, ['else ', generateStatement(stmt.alternate, {semicolonOptional: semicolon === ''})]); + } else { + result = join(result, join('else', maybeBlock(stmt.alternate, semicolon === ''))); + } + } else { + result.push(maybeBlock(stmt.consequent, semicolon === '')); + } + break; + + case Syntax.ForStatement: + withIndent(function () { + result = ['for' + space + '(']; + if (stmt.init) { + if (stmt.init.type === Syntax.VariableDeclaration) { + result.push(generateStatement(stmt.init, {allowIn: false})); + } else { + result.push(generateExpression(stmt.init, { + precedence: Precedence.Sequence, + allowIn: false, + allowCall: true + }), ';'); + } + } else { + result.push(';'); + } + + if (stmt.test) { + result.push(space, generateExpression(stmt.test, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }), ';'); + } else { + result.push(';'); + } + + if (stmt.update) { + result.push(space, generateExpression(stmt.update, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }), ')'); + } else { + result.push(')'); + } + }); + + result.push(maybeBlock(stmt.body, semicolon === '')); + break; + + case Syntax.ForInStatement: + result = ['for' + space + '(']; + withIndent(function () { + if (stmt.left.type === Syntax.VariableDeclaration) { + withIndent(function () { + result.push(stmt.left.kind + ' ', generateStatement(stmt.left.declarations[0], { + allowIn: false + })); + }); + } else { + result.push(generateExpression(stmt.left, { + precedence: Precedence.Call, + allowIn: true, + allowCall: true + })); + } + + result = join(result, 'in'); + result = [join( + result, + generateExpression(stmt.right, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }) + ), ')']; + }); + result.push(maybeBlock(stmt.body, semicolon === '')); + break; + + case Syntax.LabeledStatement: + result = [stmt.label.name + ':', maybeBlock(stmt.body, semicolon === '')]; + break; + + case Syntax.Program: + len = stmt.body.length; + result = [safeConcatenation && len > 0 ? '\n' : '']; + for (i = 0; i < len; i += 1) { + fragment = addIndent( + generateStatement(stmt.body[i], { + semicolonOptional: !safeConcatenation && i === len - 1, + directiveContext: true + }) + ); + result.push(fragment); + if (i + 1 < len && !endsWithLineTerminator(toSourceNode(fragment).toString())) { + result.push(newline); + } + } + break; + + case Syntax.FunctionDeclaration: + result = [(stmt.generator && !extra.moz.starlessGenerator ? 'function* ' : 'function ') + stmt.id.name, generateFunctionBody(stmt)]; + break; + + case Syntax.ReturnStatement: + if (stmt.argument) { + result = [join( + 'return', + generateExpression(stmt.argument, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }) + ), semicolon]; + } else { + result = ['return' + semicolon]; + } + break; + + case Syntax.WhileStatement: + withIndent(function () { + result = [ + 'while' + space + '(', + generateExpression(stmt.test, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }), + ')' + ]; + }); + result.push(maybeBlock(stmt.body, semicolon === '')); + break; + + case Syntax.WithStatement: + withIndent(function () { + result = [ + 'with' + space + '(', + generateExpression(stmt.object, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }), + ')' + ]; + }); + result.push(maybeBlock(stmt.body, semicolon === '')); + break; + + default: + throw new Error('Unknown statement type: ' + stmt.type); + } + + // Attach comments + + if (extra.comment) { + result = addCommentsToStatement(stmt, result); + } + + fragment = toSourceNode(result).toString(); + if (stmt.type === Syntax.Program && !safeConcatenation && newline === '' && fragment.charAt(fragment.length - 1) === '\n') { + result = toSourceNode(result).replaceRight(/\s+$/, ''); + } + + return toSourceNode(result, stmt); + } + + function generate(node, options) { + var defaultOptions = getDefaultOptions(), result, pair; + + if (options != null) { + // Obsolete options + // + // `options.indent` + // `options.base` + // + // Instead of them, we can use `option.format.indent`. + if (typeof options.indent === 'string') { + defaultOptions.format.indent.style = options.indent; + } + if (typeof options.base === 'number') { + defaultOptions.format.indent.base = options.base; + } + options = updateDeeply(defaultOptions, options); + indent = options.format.indent.style; + if (typeof options.base === 'string') { + base = options.base; + } else { + base = stringRepeat(indent, options.format.indent.base); + } + } else { + options = defaultOptions; + indent = options.format.indent.style; + base = stringRepeat(indent, options.format.indent.base); + } + json = options.format.json; + renumber = options.format.renumber; + hexadecimal = json ? false : options.format.hexadecimal; + quotes = json ? 'double' : options.format.quotes; + escapeless = options.format.escapeless; + if (options.format.compact) { + newline = space = indent = base = ''; + } else { + newline = '\n'; + space = ' '; + } + parentheses = options.format.parentheses; + semicolons = options.format.semicolons; + safeConcatenation = options.format.safeConcatenation; + directive = options.directive; + parse = json ? null : options.parse; + sourceMap = options.sourceMap; + extra = options; + + if (sourceMap) { + if (!exports.browser) { + // We assume environment is node.js + // And prevent from including source-map by browserify + SourceNode = require('source-map').SourceNode; + } else { + SourceNode = global.sourceMap.SourceNode; + } + } else { + SourceNode = SourceNodeMock; + } + + switch (node.type) { + case Syntax.BlockStatement: + case Syntax.BreakStatement: + case Syntax.CatchClause: + case Syntax.ContinueStatement: + case Syntax.DirectiveStatement: + case Syntax.DoWhileStatement: + case Syntax.DebuggerStatement: + case Syntax.EmptyStatement: + case Syntax.ExpressionStatement: + case Syntax.ForStatement: + case Syntax.ForInStatement: + case Syntax.FunctionDeclaration: + case Syntax.IfStatement: + case Syntax.LabeledStatement: + case Syntax.Program: + case Syntax.ReturnStatement: + case Syntax.SwitchStatement: + case Syntax.SwitchCase: + case Syntax.ThrowStatement: + case Syntax.TryStatement: + case Syntax.VariableDeclaration: + case Syntax.VariableDeclarator: + case Syntax.WhileStatement: + case Syntax.WithStatement: + result = generateStatement(node); + break; + + case Syntax.AssignmentExpression: + case Syntax.ArrayExpression: + case Syntax.ArrayPattern: + case Syntax.BinaryExpression: + case Syntax.CallExpression: + case Syntax.ConditionalExpression: + case Syntax.FunctionExpression: + case Syntax.Identifier: + case Syntax.Literal: + case Syntax.LogicalExpression: + case Syntax.MemberExpression: + case Syntax.NewExpression: + case Syntax.ObjectExpression: + case Syntax.ObjectPattern: + case Syntax.Property: + case Syntax.SequenceExpression: + case Syntax.ThisExpression: + case Syntax.UnaryExpression: + case Syntax.UpdateExpression: + case Syntax.YieldExpression: + + result = generateExpression(node, { + precedence: Precedence.Sequence, + allowIn: true, + allowCall: true + }); + break; + + default: + throw new Error('Unknown node type: ' + node.type); + } + + if (!sourceMap) { + return result.toString(); + } + + pair = result.toStringWithSourceMap({ + file: options.sourceMap, + sourceRoot: options.sourceMapRoot + }); + + if (options.sourceMapWithCode) { + return pair; + } + return pair.map.toString(); + } + + // simple visitor implementation + + VisitorKeys = { + AssignmentExpression: ['left', 'right'], + ArrayExpression: ['elements'], + ArrayPattern: ['elements'], + BlockStatement: ['body'], + BinaryExpression: ['left', 'right'], + BreakStatement: ['label'], + CallExpression: ['callee', 'arguments'], + CatchClause: ['param', 'body'], + ConditionalExpression: ['test', 'consequent', 'alternate'], + ContinueStatement: ['label'], + DirectiveStatement: [], + DoWhileStatement: ['body', 'test'], + DebuggerStatement: [], + EmptyStatement: [], + ExpressionStatement: ['expression'], + ForStatement: ['init', 'test', 'update', 'body'], + ForInStatement: ['left', 'right', 'body'], + FunctionDeclaration: ['id', 'params', 'body'], + FunctionExpression: ['id', 'params', 'body'], + Identifier: [], + IfStatement: ['test', 'consequent', 'alternate'], + Literal: [], + LabeledStatement: ['label', 'body'], + LogicalExpression: ['left', 'right'], + MemberExpression: ['object', 'property'], + NewExpression: ['callee', 'arguments'], + ObjectExpression: ['properties'], + ObjectPattern: ['properties'], + Program: ['body'], + Property: ['key', 'value'], + ReturnStatement: ['argument'], + SequenceExpression: ['expressions'], + SwitchStatement: ['discriminant', 'cases'], + SwitchCase: ['test', 'consequent'], + ThisExpression: [], + ThrowStatement: ['argument'], + TryStatement: ['block', 'handlers', 'finalizer'], + UnaryExpression: ['argument'], + UpdateExpression: ['argument'], + VariableDeclaration: ['declarations'], + VariableDeclarator: ['id', 'init'], + WhileStatement: ['test', 'body'], + WithStatement: ['object', 'body'], + YieldExpression: ['argument'] + }; + + VisitorOption = { + Break: 1, + Skip: 2 + }; + + // based on LLVM libc++ upper_bound / lower_bound + // MIT License + + function upperBound(array, func) { + var diff, len, i, current; + + len = array.length; + i = 0; + + while (len) { + diff = len >>> 1; + current = i + diff; + if (func(array[current])) { + len = diff; + } else { + i = current + 1; + len -= diff + 1; + } + } + return i; + } + + function lowerBound(array, func) { + var diff, len, i, current; + + len = array.length; + i = 0; + + while (len) { + diff = len >>> 1; + current = i + diff; + if (func(array[current])) { + i = current + 1; + len -= diff + 1; + } else { + len = diff; + } + } + return i; + } + + function extendCommentRange(comment, tokens) { + var target, token; + + target = upperBound(tokens, function search(token) { + return token.range[0] > comment.range[0]; + }); + + comment.extendedRange = [comment.range[0], comment.range[1]]; + + if (target !== tokens.length) { + comment.extendedRange[1] = tokens[target].range[0]; + } + + target -= 1; + if (target >= 0) { + if (target < tokens.length) { + comment.extendedRange[0] = tokens[target].range[1]; + } else if (token.length) { + comment.extendedRange[1] = tokens[tokens.length - 1].range[0]; + } + } + + return comment; + } + + function attachComments(tree, providedComments, tokens) { + // At first, we should calculate extended comment ranges. + var comments = [], comment, len, i; + + if (!tree.range) { + throw new Error('attachComments needs range information'); + } + + // tokens array is empty, we attach comments to tree as 'leadingComments' + if (!tokens.length) { + if (providedComments.length) { + for (i = 0, len = providedComments.length; i < len; i += 1) { + comment = deepCopy(providedComments[i]); + comment.extendedRange = [0, tree.range[0]]; + comments.push(comment); + } + tree.leadingComments = comments; + } + return tree; + } + + for (i = 0, len = providedComments.length; i < len; i += 1) { + comments.push(extendCommentRange(deepCopy(providedComments[i]), tokens)); + } + + // This is based on John Freeman's implementation. + traverse(tree, { + cursor: 0, + enter: function (node) { + var comment; + + while (this.cursor < comments.length) { + comment = comments[this.cursor]; + if (comment.extendedRange[1] > node.range[0]) { + break; + } + + if (comment.extendedRange[1] === node.range[0]) { + if (!node.leadingComments) { + node.leadingComments = []; + } + node.leadingComments.push(comment); + comments.splice(this.cursor, 1); + } else { + this.cursor += 1; + } + } + + // already out of owned node + if (this.cursor === comments.length) { + return VisitorOption.Break; + } + + if (comments[this.cursor].extendedRange[0] > node.range[1]) { + return VisitorOption.Skip; + } + } + }); + + traverse(tree, { + cursor: 0, + leave: function (node) { + var comment; + + while (this.cursor < comments.length) { + comment = comments[this.cursor]; + if (node.range[1] < comment.extendedRange[0]) { + break; + } + + if (node.range[1] === comment.extendedRange[0]) { + if (!node.trailingComments) { + node.trailingComments = []; + } + node.trailingComments.push(comment); + comments.splice(this.cursor, 1); + } else { + this.cursor += 1; + } + } + + // already out of owned node + if (this.cursor === comments.length) { + return VisitorOption.Break; + } + + if (comments[this.cursor].extendedRange[0] > node.range[1]) { + return VisitorOption.Skip; + } + } + }); + + return tree; + } + + // Sync with package.json. + exports.version = '0.0.17'; + + exports.generate = generate; + exports.attachComments = attachComments; + exports.browser = false; +}()); +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/pitfall/pdfkit/node_modules/escodegen/node_modules/estraverse/LICENSE.BSD b/pitfall/pdfkit/node_modules/escodegen/node_modules/estraverse/LICENSE.BSD new file mode 100644 index 00000000..3e580c35 --- /dev/null +++ b/pitfall/pdfkit/node_modules/escodegen/node_modules/estraverse/LICENSE.BSD @@ -0,0 +1,19 @@ +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/pitfall/pdfkit/node_modules/escodegen/node_modules/estraverse/README.md b/pitfall/pdfkit/node_modules/escodegen/node_modules/estraverse/README.md new file mode 100644 index 00000000..db04749a --- /dev/null +++ b/pitfall/pdfkit/node_modules/escodegen/node_modules/estraverse/README.md @@ -0,0 +1,29 @@ +Estraverse ([estraverse](http://github.com/Constellation/estraverse)) is +[ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm) +traversal functions from [esmangle project](http://github.com/Constellation/esmangle). + +### License + +Copyright (C) 2012 [Yusuke Suzuki](http://github.com/Constellation) + (twitter: [@Constellation](http://twitter.com/Constellation)) and other contributors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/pitfall/pdfkit/node_modules/escodegen/node_modules/estraverse/estraverse.js b/pitfall/pdfkit/node_modules/escodegen/node_modules/estraverse/estraverse.js new file mode 100644 index 00000000..2d42c161 --- /dev/null +++ b/pitfall/pdfkit/node_modules/escodegen/node_modules/estraverse/estraverse.js @@ -0,0 +1,315 @@ +/* + Copyright (C) 2012 Yusuke Suzuki + Copyright (C) 2012 Ariya Hidayat + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*jslint bitwise:true */ +/*global exports:true, define:true, window:true */ +(function (factory) { + 'use strict'; + + // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, + // and plain browser loading, + if (typeof define === 'function' && define.amd) { + define(['exports'], factory); + } else if (typeof exports !== 'undefined') { + factory(exports); + } else { + factory((window.estraverse = {})); + } +}(function (exports) { + 'use strict'; + + var Syntax, + isArray, + VisitorOption, + VisitorKeys, + wrappers; + + Syntax = { + AssignmentExpression: 'AssignmentExpression', + ArrayExpression: 'ArrayExpression', + BlockStatement: 'BlockStatement', + BinaryExpression: 'BinaryExpression', + BreakStatement: 'BreakStatement', + CallExpression: 'CallExpression', + CatchClause: 'CatchClause', + ConditionalExpression: 'ConditionalExpression', + ContinueStatement: 'ContinueStatement', + DebuggerStatement: 'DebuggerStatement', + DirectiveStatement: 'DirectiveStatement', + DoWhileStatement: 'DoWhileStatement', + EmptyStatement: 'EmptyStatement', + ExpressionStatement: 'ExpressionStatement', + ForStatement: 'ForStatement', + ForInStatement: 'ForInStatement', + FunctionDeclaration: 'FunctionDeclaration', + FunctionExpression: 'FunctionExpression', + Identifier: 'Identifier', + IfStatement: 'IfStatement', + Literal: 'Literal', + LabeledStatement: 'LabeledStatement', + LogicalExpression: 'LogicalExpression', + MemberExpression: 'MemberExpression', + NewExpression: 'NewExpression', + ObjectExpression: 'ObjectExpression', + Program: 'Program', + Property: 'Property', + ReturnStatement: 'ReturnStatement', + SequenceExpression: 'SequenceExpression', + SwitchStatement: 'SwitchStatement', + SwitchCase: 'SwitchCase', + ThisExpression: 'ThisExpression', + ThrowStatement: 'ThrowStatement', + TryStatement: 'TryStatement', + UnaryExpression: 'UnaryExpression', + UpdateExpression: 'UpdateExpression', + VariableDeclaration: 'VariableDeclaration', + VariableDeclarator: 'VariableDeclarator', + WhileStatement: 'WhileStatement', + WithStatement: 'WithStatement' + }; + + isArray = Array.isArray; + if (!isArray) { + isArray = function isArray(array) { + return Object.prototype.toString.call(array) === '[object Array]'; + }; + } + + VisitorKeys = { + AssignmentExpression: ['left', 'right'], + ArrayExpression: ['elements'], + BlockStatement: ['body'], + BinaryExpression: ['left', 'right'], + BreakStatement: ['label'], + CallExpression: ['callee', 'arguments'], + CatchClause: ['param', 'body'], + ConditionalExpression: ['test', 'consequent', 'alternate'], + ContinueStatement: ['label'], + DebuggerStatement: [], + DirectiveStatement: [], + DoWhileStatement: ['body', 'test'], + EmptyStatement: [], + ExpressionStatement: ['expression'], + ForStatement: ['init', 'test', 'update', 'body'], + ForInStatement: ['left', 'right', 'body'], + FunctionDeclaration: ['id', 'params', 'body'], + FunctionExpression: ['id', 'params', 'body'], + Identifier: [], + IfStatement: ['test', 'consequent', 'alternate'], + Literal: [], + LabeledStatement: ['label', 'body'], + LogicalExpression: ['left', 'right'], + MemberExpression: ['object', 'property'], + NewExpression: ['callee', 'arguments'], + ObjectExpression: ['properties'], + Program: ['body'], + Property: ['key', 'value'], + ReturnStatement: ['argument'], + SequenceExpression: ['expressions'], + SwitchStatement: ['discriminant', 'cases'], + SwitchCase: ['test', 'consequent'], + ThisExpression: [], + ThrowStatement: ['argument'], + TryStatement: ['block', 'handlers', 'finalizer'], + UnaryExpression: ['argument'], + UpdateExpression: ['argument'], + VariableDeclaration: ['declarations'], + VariableDeclarator: ['id', 'init'], + WhileStatement: ['test', 'body'], + WithStatement: ['object', 'body'] + }; + + VisitorOption = { + Break: 1, + Skip: 2 + }; + + wrappers = { + PropertyWrapper: 'Property' + }; + + function traverse(top, visitor) { + var worklist, leavelist, node, nodeType, ret, current, current2, candidates, candidate, marker = {}; + + worklist = [ top ]; + leavelist = [ null ]; + + while (worklist.length) { + node = worklist.pop(); + nodeType = node.type; + + if (node === marker) { + node = leavelist.pop(); + if (visitor.leave) { + ret = visitor.leave(node, leavelist[leavelist.length - 1]); + } else { + ret = undefined; + } + if (ret === VisitorOption.Break) { + return; + } + } else if (node) { + if (wrappers.hasOwnProperty(nodeType)) { + node = node.node; + nodeType = wrappers[nodeType]; + } + + if (visitor.enter) { + ret = visitor.enter(node, leavelist[leavelist.length - 1]); + } else { + ret = undefined; + } + + if (ret === VisitorOption.Break) { + return; + } + + worklist.push(marker); + leavelist.push(node); + + if (ret !== VisitorOption.Skip) { + candidates = VisitorKeys[nodeType]; + current = candidates.length; + while ((current -= 1) >= 0) { + candidate = node[candidates[current]]; + if (candidate) { + if (isArray(candidate)) { + current2 = candidate.length; + while ((current2 -= 1) >= 0) { + if (candidate[current2]) { + if(nodeType === Syntax.ObjectExpression && 'properties' === candidates[current] && null == candidates[current].type) { + worklist.push({type: 'PropertyWrapper', node: candidate[current2]}); + } else { + worklist.push(candidate[current2]); + } + } + } + } else { + worklist.push(candidate); + } + } + } + } + } + } + } + + function replace(top, visitor) { + var worklist, leavelist, node, nodeType, target, tuple, ret, current, current2, candidates, candidate, marker = {}, result; + + result = { + top: top + }; + + tuple = [ top, result, 'top' ]; + worklist = [ tuple ]; + leavelist = [ tuple ]; + + function notify(v) { + ret = v; + } + + while (worklist.length) { + tuple = worklist.pop(); + + if (tuple === marker) { + tuple = leavelist.pop(); + ret = undefined; + if (visitor.leave) { + node = tuple[0]; + target = visitor.leave(tuple[0], leavelist[leavelist.length - 1][0], notify); + if (target !== undefined) { + node = target; + } + tuple[1][tuple[2]] = node; + } + if (ret === VisitorOption.Break) { + return result.top; + } + } else if (tuple[0]) { + ret = undefined; + node = tuple[0]; + + nodeType = node.type; + if (wrappers.hasOwnProperty(nodeType)) { + tuple[0] = node = node.node; + nodeType = wrappers[nodeType]; + } + + if (visitor.enter) { + target = visitor.enter(tuple[0], leavelist[leavelist.length - 1][0], notify); + if (target !== undefined) { + node = target; + } + tuple[1][tuple[2]] = node; + tuple[0] = node; + } + + if (ret === VisitorOption.Break) { + return result.top; + } + + if (tuple[0]) { + worklist.push(marker); + leavelist.push(tuple); + + if (ret !== VisitorOption.Skip) { + candidates = VisitorKeys[nodeType]; + current = candidates.length; + while ((current -= 1) >= 0) { + candidate = node[candidates[current]]; + if (candidate) { + if (isArray(candidate)) { + current2 = candidate.length; + while ((current2 -= 1) >= 0) { + if (candidate[current2]) { + if(nodeType === Syntax.ObjectExpression && 'properties' === candidates[current] && null == candidates[current].type) { + worklist.push([{type: 'PropertyWrapper', node: candidate[current2]}, candidate, current2]); + } else { + worklist.push([candidate[current2], candidate, current2]); + } + } + } + } else { + worklist.push([candidate, node, candidates[current]]); + } + } + } + } + } + } + } + + return result.top; + } + + exports.version = '0.0.4'; + exports.Syntax = Syntax; + exports.traverse = traverse; + exports.replace = replace; + exports.VisitorKeys = VisitorKeys; + exports.VisitorOption = VisitorOption; +})); +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/pitfall/pdfkit/node_modules/escodegen/node_modules/estraverse/package.json b/pitfall/pdfkit/node_modules/escodegen/node_modules/estraverse/package.json new file mode 100644 index 00000000..061b883b --- /dev/null +++ b/pitfall/pdfkit/node_modules/escodegen/node_modules/estraverse/package.json @@ -0,0 +1,85 @@ +{ + "_args": [ + [ + { + "raw": "estraverse@~0.0.4", + "scope": null, + "escapedName": "estraverse", + "name": "estraverse", + "rawSpec": "~0.0.4", + "spec": ">=0.0.4 <0.1.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/escodegen" + ] + ], + "_from": "estraverse@>=0.0.4 <0.1.0", + "_id": "estraverse@0.0.4", + "_inCache": true, + "_location": "/escodegen/estraverse", + "_npmUser": { + "name": "constellation", + "email": "utatane.tea@gmail.com" + }, + "_npmVersion": "1.1.68", + "_phantomChildren": {}, + "_requested": { + "raw": "estraverse@~0.0.4", + "scope": null, + "escapedName": "estraverse", + "name": "estraverse", + "rawSpec": "~0.0.4", + "spec": ">=0.0.4 <0.1.0", + "type": "range" + }, + "_requiredBy": [ + "/escodegen" + ], + "_resolved": "https://registry.npmjs.org/estraverse/-/estraverse-0.0.4.tgz", + "_shasum": "01a0932dfee574684a598af5a67c3bf9b6428db2", + "_shrinkwrap": null, + "_spec": "estraverse@~0.0.4", + "_where": "/Users/MB/git/pdfkit/node_modules/escodegen", + "bugs": { + "url": "https://github.com/Constellation/estraverse/issues" + }, + "dependencies": {}, + "description": "ECMAScript JS AST traversal functions", + "devDependencies": { + "chai": "*", + "mocha": "*" + }, + "directories": {}, + "dist": { + "shasum": "01a0932dfee574684a598af5a67c3bf9b6428db2", + "tarball": "https://registry.npmjs.org/estraverse/-/estraverse-0.0.4.tgz" + }, + "engines": { + "node": ">=0.4.0" + }, + "homepage": "http://github.com/Constellation/estraverse.html", + "licenses": [ + { + "type": "BSD", + "url": "http://github.com/Constellation/estraverse/raw/master/LICENSE.BSD" + } + ], + "main": "estraverse.js", + "maintainers": [ + { + "name": "constellation", + "email": "utatane.tea@gmail.com" + } + ], + "name": "estraverse", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/Constellation/estraverse.git" + }, + "scripts": { + "test": "./node_modules/.bin/mocha" + }, + "version": "0.0.4" +} diff --git a/pitfall/pdfkit/node_modules/escodegen/package.json b/pitfall/pdfkit/node_modules/escodegen/package.json new file mode 100644 index 00000000..f61274a4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/escodegen/package.json @@ -0,0 +1,96 @@ +{ + "_args": [ + [ + { + "raw": "escodegen@0.0.17", + "scope": null, + "escapedName": "escodegen", + "name": "escodegen", + "rawSpec": "0.0.17", + "spec": "0.0.17", + "type": "version" + }, + "/Users/MB/git/pdfkit/node_modules/brfs" + ] + ], + "_from": "escodegen@0.0.17", + "_id": "escodegen@0.0.17", + "_inCache": true, + "_location": "/escodegen", + "_npmUser": { + "name": "constellation", + "email": "utatane.tea@gmail.com" + }, + "_npmVersion": "1.2.2", + "_phantomChildren": {}, + "_requested": { + "raw": "escodegen@0.0.17", + "scope": null, + "escapedName": "escodegen", + "name": "escodegen", + "rawSpec": "0.0.17", + "spec": "0.0.17", + "type": "version" + }, + "_requiredBy": [ + "/brfs" + ], + "_resolved": "https://registry.npmjs.org/escodegen/-/escodegen-0.0.17.tgz", + "_shasum": "1e78d17df1004fd7a88f2fed3b8b8592f3217f9c", + "_shrinkwrap": null, + "_spec": "escodegen@0.0.17", + "_where": "/Users/MB/git/pdfkit/node_modules/brfs", + "bin": { + "esgenerate": "./bin/esgenerate.js", + "escodegen": "./bin/escodegen.js" + }, + "bugs": { + "url": "https://github.com/Constellation/escodegen/issues" + }, + "dependencies": { + "esprima": "~1.0.2", + "estraverse": "~0.0.4", + "source-map": ">= 0.1.2" + }, + "description": "ECMAScript code generator", + "devDependencies": { + "browserify": "*", + "esprima-moz": "*" + }, + "directories": {}, + "dist": { + "shasum": "1e78d17df1004fd7a88f2fed3b8b8592f3217f9c", + "tarball": "https://registry.npmjs.org/escodegen/-/escodegen-0.0.17.tgz" + }, + "engines": { + "node": ">=0.4.0" + }, + "homepage": "http://github.com/Constellation/escodegen.html", + "licenses": [ + { + "type": "BSD", + "url": "http://github.com/Constellation/escodegen/raw/master/LICENSE.BSD" + } + ], + "main": "escodegen.js", + "maintainers": [ + { + "name": "constellation", + "email": "utatane.tea@gmail.com" + } + ], + "name": "escodegen", + "optionalDependencies": { + "source-map": ">= 0.1.2" + }, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/Constellation/escodegen.git" + }, + "scripts": { + "build": "(echo '// Generated by browserify'; ./node_modules/.bin/browserify -i source-map tools/entry-point.js) > escodegen.browser.js", + "test": "node test/run.js" + }, + "version": "0.0.17" +} diff --git a/pitfall/pdfkit/node_modules/escope/.jshintrc b/pitfall/pdfkit/node_modules/escope/.jshintrc new file mode 100644 index 00000000..479c7309 --- /dev/null +++ b/pitfall/pdfkit/node_modules/escope/.jshintrc @@ -0,0 +1,19 @@ +{ + "curly": true, + "eqeqeq": true, + "immed": true, + "indent": 4, + "eqnull": true, + "latedef": true, + "noarg": true, + "noempty": true, + "quotmark": "single", + "undef": true, + "unused": true, + "strict": true, + "trailing": true, + "white": true, + "onevar": true, + + "node": true +} diff --git a/pitfall/pdfkit/node_modules/escope/Gruntfile.js b/pitfall/pdfkit/node_modules/escope/Gruntfile.js new file mode 100644 index 00000000..586e5ea8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/escope/Gruntfile.js @@ -0,0 +1,61 @@ +/* + Copyright (C) 2013 Yusuke Suzuki + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +module.exports = function (grunt) { + 'use strict'; + + grunt.initConfig({ + jshint: { + all: [ + 'Gruntfile.js', + 'escope.js' + ], + options: { + jshintrc: '.jshintrc', + force: false + } + }, + mochaTest: { + test: { + options: { + reporter: 'spec', + compilers: 'coffee:coffee-script' + }, + src: ['test/*.coffee'] + } + } + }); + + + // load tasks + grunt.loadNpmTasks('grunt-contrib-jshint'); + grunt.loadNpmTasks('grunt-mocha-test'); + + // alias + grunt.registerTask('test', 'mochaTest'); + grunt.registerTask('lint', 'jshint'); + grunt.registerTask('travis', ['lint', 'test']); + grunt.registerTask('default', 'travis'); +}; +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/pitfall/pdfkit/node_modules/escope/LICENSE.BSD b/pitfall/pdfkit/node_modules/escope/LICENSE.BSD new file mode 100644 index 00000000..3e580c35 --- /dev/null +++ b/pitfall/pdfkit/node_modules/escope/LICENSE.BSD @@ -0,0 +1,19 @@ +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/pitfall/pdfkit/node_modules/escope/README.md b/pitfall/pdfkit/node_modules/escope/README.md new file mode 100644 index 00000000..5b7528c8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/escope/README.md @@ -0,0 +1,45 @@ +Escope ([escope](http://github.com/Constellation/escope)) is +[ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm) +scope analyzer extracted from [esmangle project](http://github.com/Constellation/esmangle). + +[![Build Status](https://travis-ci.org/Constellation/escope.png?branch=master)](https://travis-ci.org/Constellation/escope) + +### Demos and Tools + +Demonstration is [here](http://mazurov.github.io/escope-demo/) by [Sasha Mazurov](https://github.com/mazurov) (twitter: [@mazurov](http://twitter.com/mazurov)). [issue](https://github.com/Constellation/escope/issues/14) + +![Demo](https://f.cloud.github.com/assets/75759/462920/7aa6dd40-b4f5-11e2-9f07-9f4e8d0415f9.gif) + + +And there are tools constructed on Escope. + +- [Esmangle](https://github.com/Constellation/esmangle) is a minifier / mangler / optimizer. +- [Eslevels](https://github.com/mazurov/eslevels) is a scope levels analyzer and [SublimeText plugin for scope context coloring](https://github.com/mazurov/sublime-levels) is constructed on it. +- [Estoggles](https://github.com/keeyipchan/esgoggles) is JavaScript code browser. + + +### License + +Copyright (C) 2012-2013 [Yusuke Suzuki](http://github.com/Constellation) + (twitter: [@Constellation](http://twitter.com/Constellation)) and other contributors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/pitfall/pdfkit/node_modules/escope/bower.json b/pitfall/pdfkit/node_modules/escope/bower.json new file mode 100644 index 00000000..021b3524 --- /dev/null +++ b/pitfall/pdfkit/node_modules/escope/bower.json @@ -0,0 +1,13 @@ +{ + "name": "escope", + "version": "0.0.14-dev", + "main": "escope.js", + "dependencies": { + "estraverse": ">= 0.0.2" + }, + "ignore": [ + "**/.*", + "node_modules", + "components" + ] +} diff --git a/pitfall/pdfkit/node_modules/escope/escope.js b/pitfall/pdfkit/node_modules/escope/escope.js new file mode 100644 index 00000000..e42e8a03 --- /dev/null +++ b/pitfall/pdfkit/node_modules/escope/escope.js @@ -0,0 +1,845 @@ +/* + Copyright (C) 2012-2013 Yusuke Suzuki + Copyright (C) 2013 Alex Seville + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*jslint bitwise:true */ +/*global exports:true, define:true, require:true*/ +(function (factory, global) { + 'use strict'; + + function namespace(str, obj) { + var i, iz, names, name; + names = str.split('.'); + for (i = 0, iz = names.length; i < iz; ++i) { + name = names[i]; + if (obj.hasOwnProperty(name)) { + obj = obj[name]; + } else { + obj = (obj[name] = {}); + } + } + return obj; + } + + // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, + // and plain browser loading, + if (typeof define === 'function' && define.amd) { + define('escope', ['exports', 'estraverse'], function (exports, estraverse) { + factory(exports, global, estraverse); + }); + } else if (typeof exports !== 'undefined') { + factory(exports, global, require('estraverse')); + } else { + factory(namespace('escope', global), global, global.estraverse); + } +}(function (exports, global, estraverse) { + 'use strict'; + + var Syntax, + Map, + currentScope, + globalScope, + scopes, + options; + + Syntax = estraverse.Syntax; + + if (typeof global.Map !== 'undefined') { + // ES6 Map + Map = global.Map; + } else { + Map = function Map() { + this.__data = {}; + }; + + Map.prototype.get = function MapGet(key) { + key = '$' + key; + if (this.__data.hasOwnProperty(key)) { + return this.__data[key]; + } + return undefined; + }; + + Map.prototype.has = function MapHas(key) { + key = '$' + key; + return this.__data.hasOwnProperty(key); + }; + + Map.prototype.set = function MapSet(key, val) { + key = '$' + key; + this.__data[key] = val; + }; + + Map.prototype['delete'] = function MapDelete(key) { + key = '$' + key; + return delete this.__data[key]; + }; + } + + function assert(cond, text) { + if (!cond) { + throw new Error(text); + } + } + + function defaultOptions() { + return { + optimistic: false, + directive: false + }; + }; + + function updateDeeply(target, override) { + var key, val; + + function isHashObject(target) { + return typeof target === 'object' && target instanceof Object && !(target instanceof RegExp); + } + + for (key in override) { + if (override.hasOwnProperty(key)) { + val = override[key]; + if (isHashObject(val)) { + if (isHashObject(target[key])) { + updateDeeply(target[key], val); + } else { + target[key] = updateDeeply({}, val); + } + } else { + target[key] = val; + } + } + } + return target; + } + + function Reference(ident, scope, flag, writeExpr, maybeImplicitGlobal) { + this.identifier = ident; + this.from = scope; + this.tainted = false; + this.resolved = null; + this.flag = flag; + if (this.isWrite()) { + this.writeExpr = writeExpr; + } + this.__maybeImplicitGlobal = maybeImplicitGlobal; + } + + Reference.READ = 0x1; + Reference.WRITE = 0x2; + Reference.RW = 0x3; + + Reference.prototype.isStatic = function isStatic() { + return !this.tainted && this.resolved && this.resolved.scope.isStatic(); + }; + + Reference.prototype.isWrite = function isWrite() { + return this.flag & Reference.WRITE; + }; + + Reference.prototype.isRead = function isRead() { + return this.flag & Reference.READ; + }; + + Reference.prototype.isReadOnly = function isReadOnly() { + return this.flag === Reference.READ; + }; + + Reference.prototype.isWriteOnly = function isWriteOnly() { + return this.flag === Reference.WRITE; + }; + + Reference.prototype.isReadWrite = function isReadWrite() { + return this.flag === Reference.RW; + }; + + function Variable(name, scope) { + this.name = name; + this.identifiers = []; + this.references = []; + + this.defs = []; + + this.tainted = false; + this.stack = true; + this.scope = scope; + } + + Variable.CatchClause = 'CatchClause'; + Variable.Parameter = 'Parameter'; + Variable.FunctionName = 'FunctionName'; + Variable.Variable = 'Variable'; + Variable.ImplicitGlobalVariable = 'ImplicitGlobalVariable'; + + function isStrictScope(scope, block) { + var body, i, iz, stmt, expr; + + // When upper scope is exists and strict, inner scope is also strict. + if (scope.upper && scope.upper.isStrict) { + return true; + } + + if (scope.type === 'function') { + body = block.body; + } else if (scope.type === 'global') { + body = block; + } else { + return false; + } + + if (options.directive) { + for (i = 0, iz = body.body.length; i < iz; ++i) { + stmt = body.body[i]; + if (stmt.type !== 'DirectiveStatement') { + break; + } + if (stmt.raw === '"use strict"' || stmt.raw === '\'use strict\'') { + return true; + } + } + } else { + for (i = 0, iz = body.body.length; i < iz; ++i) { + stmt = body.body[i]; + if (stmt.type !== Syntax.ExpressionStatement) { + break; + } + expr = stmt.expression; + if (expr.type !== Syntax.Literal || typeof expr.value !== 'string') { + break; + } + if (expr.raw != null) { + if (expr.raw === '"use strict"' || expr.raw === '\'use strict\'') { + return true; + } + } else { + if (expr.value === 'use strict') { + return true; + } + } + } + } + return false; + } + + function Scope(block, opt) { + var variable, body; + + this.type = + (block.type === Syntax.CatchClause) ? 'catch' : + (block.type === Syntax.WithStatement) ? 'with' : + (block.type === Syntax.Program) ? 'global' : 'function'; + this.set = new Map(); + this.taints = new Map(); + this.dynamic = this.type === 'global' || this.type === 'with'; + this.block = block; + this.through = []; + this.variables = []; + this.references = []; + this.left = []; + this.variableScope = + (this.type === 'global' || this.type === 'function') ? this : currentScope.variableScope; + this.functionExpressionScope = false; + this.directCallToEvalScope = false; + this.thisFound = false; + body = this.type === 'function' ? block.body : block; + if (opt.naming) { + this.__define(block.id, { + type: Variable.FunctionName, + name: block.id, + node: block + }); + this.functionExpressionScope = true; + } else { + if (this.type === 'function') { + variable = new Variable('arguments', this); + this.taints.set('arguments', true); + this.set.set('arguments', variable); + this.variables.push(variable); + } + + if (block.type === Syntax.FunctionExpression && block.id) { + new Scope(block, { naming: true }); + } + } + + this.upper = currentScope; + this.isStrict = isStrictScope(this, block); + + this.childScopes = []; + if (currentScope) { + currentScope.childScopes.push(this); + } + + + // RAII + currentScope = this; + if (this.type === 'global') { + globalScope = this; + } + scopes.push(this); + } + + Scope.prototype.__close = function __close() { + var i, iz, ref, current, node; + + // Because if this is global environment, upper is null + if (!this.dynamic || options.optimistic) { + // static resolve + for (i = 0, iz = this.left.length; i < iz; ++i) { + ref = this.left[i]; + if (!this.__resolve(ref)) { + this.__delegateToUpperScope(ref); + } + } + } else { + // this is "global" / "with" / "function with eval" environment + if (this.type === 'with') { + for (i = 0, iz = this.left.length; i < iz; ++i) { + ref = this.left[i]; + ref.tainted = true; + this.__delegateToUpperScope(ref); + } + } else { + for (i = 0, iz = this.left.length; i < iz; ++i) { + // notify all names are through to global + ref = this.left[i]; + current = this; + do { + current.through.push(ref); + current = current.upper; + } while (current); + } + } + } + + + if (this.type === 'global') { + for (i = 0, iz = this.left.length; i < iz; ++i) { + // create an implicit global variable from assignment expression + ref = this.left[i]; + if (ref.__maybeImplicitGlobal) { + node = ref.__maybeImplicitGlobal; + this.__define(node.left, { + type: Variable.ImplicitGlobalVariable, + name: node.left, + node: node + }); + } + } + } + + this.left = null; + currentScope = this.upper; + }; + + Scope.prototype.__resolve = function __resolve(ref) { + var variable, name; + name = ref.identifier.name; + if (this.set.has(name)) { + variable = this.set.get(name); + variable.references.push(ref); + variable.stack = variable.stack && ref.from.variableScope === this.variableScope; + if (ref.tainted) { + variable.tainted = true; + this.taints.set(variable.name, true); + } + ref.resolved = variable; + return true; + } + return false; + }; + + Scope.prototype.__delegateToUpperScope = function __delegateToUpperScope(ref) { + if (this.upper) { + this.upper.left.push(ref); + } + this.through.push(ref); + }; + + Scope.prototype.__define = function __define(node, info) { + var name, variable; + if (node && node.type === Syntax.Identifier) { + name = node.name; + if (!this.set.has(name)) { + variable = new Variable(name, this); + variable.identifiers.push(node); + variable.defs.push(info); + this.set.set(name, variable); + this.variables.push(variable); + } else { + variable = this.set.get(name); + variable.identifiers.push(node); + variable.defs.push(info); + } + } + }; + + Scope.prototype.__referencing = function __referencing(node, assign, writeExpr, maybeImplicitGlobal) { + var ref; + // because Array element may be null + if (node && node.type === Syntax.Identifier) { + ref = new Reference(node, this, assign || Reference.READ, writeExpr, maybeImplicitGlobal); + this.references.push(ref); + this.left.push(ref); + } + }; + + Scope.prototype.__detectEval = function __detectEval() { + var current; + current = this; + this.directCallToEvalScope = true; + do { + current.dynamic = true; + current = current.upper; + } while (current); + }; + + Scope.prototype.__detectThis = function __detectThis() { + this.thisFound = true; + }; + + Scope.prototype.__isClosed = function isClosed() { + return this.left === null; + }; + + // API Scope#resolve(name) + // returns resolved reference + Scope.prototype.resolve = function resolve(ident) { + var ref, i, iz; + assert(this.__isClosed(), 'scope should be closed'); + assert(ident.type === Syntax.Identifier, 'target should be identifier'); + for (i = 0, iz = this.references.length; i < iz; ++i) { + ref = this.references[i]; + if (ref.identifier === ident) { + return ref; + } + } + return null; + }; + + // API Scope#isStatic + // returns this scope is static + Scope.prototype.isStatic = function isStatic() { + return !this.dynamic; + }; + + // API Scope#isArgumentsMaterialized + // return this scope has materialized arguments + Scope.prototype.isArgumentsMaterialized = function isArgumentsMaterialized() { + // TODO(Constellation) + // We can more aggressive on this condition like this. + // + // function t() { + // // arguments of t is always hidden. + // function arguments() { + // } + // } + var variable; + + // This is not function scope + if (this.type !== 'function') { + return true; + } + + if (!this.isStatic()) { + return true; + } + + variable = this.set.get('arguments'); + assert(variable, 'always have arguments variable'); + return variable.tainted || variable.references.length !== 0; + }; + + // API Scope#isThisMaterialized + // return this scope has materialized `this` reference + Scope.prototype.isThisMaterialized = function isThisMaterialized() { + // This is not function scope + if (this.type !== 'function') { + return true; + } + if (!this.isStatic()) { + return true; + } + return this.thisFound; + }; + + Scope.mangledName = '__$escope$__'; + + Scope.prototype.attach = function attach() { + if (!this.functionExpressionScope) { + this.block[Scope.mangledName] = this; + } + }; + + Scope.prototype.detach = function detach() { + if (!this.functionExpressionScope) { + delete this.block[Scope.mangledName]; + } + }; + + Scope.prototype.isUsedName = function (name) { + if (this.set.has(name)) { + return true; + } + for (var i = 0, iz = this.through.length; i < iz; ++i) { + if (this.through[i].identifier.name === name) { + return true; + } + } + return false; + }; + + function ScopeManager(scopes) { + this.scopes = scopes; + this.attached = false; + } + + // Returns appropliate scope for this node + ScopeManager.prototype.__get = function __get(node) { + var i, iz, scope; + if (this.attached) { + return node[Scope.mangledName] || null; + } + if (Scope.isScopeRequired(node)) { + for (i = 0, iz = this.scopes.length; i < iz; ++i) { + scope = this.scopes[i]; + if (!scope.functionExpressionScope) { + if (scope.block === node) { + return scope; + } + } + } + } + return null; + }; + + ScopeManager.prototype.acquire = function acquire(node) { + return this.__get(node); + }; + + ScopeManager.prototype.release = function release(node) { + var scope = this.__get(node); + if (scope) { + scope = scope.upper; + while (scope) { + if (!scope.functionExpressionScope) { + return scope; + } + scope = scope.upper; + } + } + return null; + }; + + ScopeManager.prototype.attach = function attach() { + var i, iz; + for (i = 0, iz = this.scopes.length; i < iz; ++i) { + this.scopes[i].attach(); + } + this.attached = true; + }; + + ScopeManager.prototype.detach = function detach() { + var i, iz; + for (i = 0, iz = this.scopes.length; i < iz; ++i) { + this.scopes[i].detach(); + } + this.attached = false; + }; + + Scope.isScopeRequired = function isScopeRequired(node) { + return Scope.isVariableScopeRequired(node) || node.type === Syntax.WithStatement || node.type === Syntax.CatchClause; + }; + + Scope.isVariableScopeRequired = function isVariableScopeRequired(node) { + return node.type === Syntax.Program || node.type === Syntax.FunctionExpression || node.type === Syntax.FunctionDeclaration; + }; + + function analyze(tree, providedOptions) { + var resultScopes; + + options = updateDeeply(defaultOptions(), providedOptions); + resultScopes = scopes = []; + currentScope = null; + globalScope = null; + + // attach scope and collect / resolve names + estraverse.traverse(tree, { + enter: function enter(node) { + var i, iz, decl; + if (Scope.isScopeRequired(node)) { + new Scope(node, {}); + } + + switch (node.type) { + case Syntax.AssignmentExpression: + if (node.operator === '=') { + currentScope.__referencing(node.left, Reference.WRITE, node.right, (!currentScope.isStrict && node.left.name != null) && node); + } else { + currentScope.__referencing(node.left, Reference.RW, node.right); + } + currentScope.__referencing(node.right); + break; + + case Syntax.ArrayExpression: + for (i = 0, iz = node.elements.length; i < iz; ++i) { + currentScope.__referencing(node.elements[i]); + } + break; + + case Syntax.BlockStatement: + break; + + case Syntax.BinaryExpression: + currentScope.__referencing(node.left); + currentScope.__referencing(node.right); + break; + + case Syntax.BreakStatement: + break; + + case Syntax.CallExpression: + currentScope.__referencing(node.callee); + for (i = 0, iz = node['arguments'].length; i < iz; ++i) { + currentScope.__referencing(node['arguments'][i]); + } + + // check this is direct call to eval + if (!options.ignoreEval && node.callee.type === Syntax.Identifier && node.callee.name === 'eval') { + currentScope.variableScope.__detectEval(); + } + break; + + case Syntax.CatchClause: + currentScope.__define(node.param, { + type: Variable.CatchClause, + name: node.param, + node: node + }); + break; + + case Syntax.ConditionalExpression: + currentScope.__referencing(node.test); + currentScope.__referencing(node.consequent); + currentScope.__referencing(node.alternate); + break; + + case Syntax.ContinueStatement: + break; + + case Syntax.DirectiveStatement: + break; + + case Syntax.DoWhileStatement: + currentScope.__referencing(node.test); + break; + + case Syntax.DebuggerStatement: + break; + + case Syntax.EmptyStatement: + break; + + case Syntax.ExpressionStatement: + currentScope.__referencing(node.expression); + break; + + case Syntax.ForStatement: + currentScope.__referencing(node.init); + currentScope.__referencing(node.test); + currentScope.__referencing(node.update); + break; + + case Syntax.ForInStatement: + if (node.left.type === Syntax.VariableDeclaration) { + currentScope.__referencing(node.left.declarations[0].id, Reference.WRITE, null, false); + } else { + currentScope.__referencing(node.left, Reference.WRITE, null, (!currentScope.isStrict && node.left.name != null) && node); + } + currentScope.__referencing(node.right); + break; + + case Syntax.FunctionDeclaration: + // FunctionDeclaration name is defined in upper scope + currentScope.upper.__define(node.id, { + type: Variable.FunctionName, + name: node.id, + node: node + }); + for (i = 0, iz = node.params.length; i < iz; ++i) { + currentScope.__define(node.params[i], { + type: Variable.Parameter, + name: node.params[i], + node: node, + index: i + }); + } + break; + + case Syntax.FunctionExpression: + // id is defined in upper scope + for (i = 0, iz = node.params.length; i < iz; ++i) { + currentScope.__define(node.params[i], { + type: Variable.Parameter, + name: node.params[i], + node: node, + index: i + }); + } + break; + + case Syntax.Identifier: + break; + + case Syntax.IfStatement: + currentScope.__referencing(node.test); + break; + + case Syntax.Literal: + break; + + case Syntax.LabeledStatement: + break; + + case Syntax.LogicalExpression: + currentScope.__referencing(node.left); + currentScope.__referencing(node.right); + break; + + case Syntax.MemberExpression: + currentScope.__referencing(node.object); + if (node.computed) { + currentScope.__referencing(node.property); + } + break; + + case Syntax.NewExpression: + currentScope.__referencing(node.callee); + for (i = 0, iz = node['arguments'].length; i < iz; ++i) { + currentScope.__referencing(node['arguments'][i]); + } + break; + + case Syntax.ObjectExpression: + break; + + case Syntax.Program: + break; + + case Syntax.Property: + currentScope.__referencing(node.value); + break; + + case Syntax.ReturnStatement: + currentScope.__referencing(node.argument); + break; + + case Syntax.SequenceExpression: + for (i = 0, iz = node.expressions.length; i < iz; ++i) { + currentScope.__referencing(node.expressions[i]); + } + break; + + case Syntax.SwitchStatement: + currentScope.__referencing(node.discriminant); + break; + + case Syntax.SwitchCase: + currentScope.__referencing(node.test); + break; + + case Syntax.ThisExpression: + currentScope.variableScope.__detectThis(); + break; + + case Syntax.ThrowStatement: + currentScope.__referencing(node.argument); + break; + + case Syntax.TryStatement: + break; + + case Syntax.UnaryExpression: + currentScope.__referencing(node.argument); + break; + + case Syntax.UpdateExpression: + currentScope.__referencing(node.argument, Reference.RW, null); + break; + + case Syntax.VariableDeclaration: + for (i = 0, iz = node.declarations.length; i < iz; ++i) { + decl = node.declarations[i]; + currentScope.variableScope.__define(decl.id, { + type: Variable.Variable, + name: decl.id, + node: decl, + index: i, + parent: node + }); + if (decl.init) { + // initializer is found + currentScope.__referencing(decl.id, Reference.WRITE, decl.init, false); + currentScope.__referencing(decl.init); + } + } + break; + + case Syntax.VariableDeclarator: + break; + + case Syntax.WhileStatement: + currentScope.__referencing(node.test); + break; + + case Syntax.WithStatement: + // WithStatement object is referenced at upper scope + currentScope.upper.__referencing(node.object); + break; + } + }, + + leave: function leave(node) { + while (currentScope && node === currentScope.block) { + currentScope.__close(); + } + } + }); + + assert(currentScope === null); + globalScope = null; + scopes = null; + options = null; + + return new ScopeManager(resultScopes); + } + + exports.version = '0.0.16'; + exports.Reference = Reference; + exports.Variable = Variable; + exports.Scope = Scope; + exports.ScopeManager = ScopeManager; + exports.analyze = analyze; +}, this)); +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/pitfall/pdfkit/node_modules/escope/package.json b/pitfall/pdfkit/node_modules/escope/package.json new file mode 100644 index 00000000..5642a9d8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/escope/package.json @@ -0,0 +1,95 @@ +{ + "_args": [ + [ + { + "raw": "escope@~0.0.13", + "scope": null, + "escapedName": "escope", + "name": "escope", + "rawSpec": "~0.0.13", + "spec": ">=0.0.13 <0.1.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/esrefactor" + ] + ], + "_from": "escope@>=0.0.13 <0.1.0", + "_id": "escope@0.0.16", + "_inCache": true, + "_location": "/escope", + "_npmUser": { + "name": "constellation", + "email": "utatane.tea@gmail.com" + }, + "_npmVersion": "1.2.32", + "_phantomChildren": {}, + "_requested": { + "raw": "escope@~0.0.13", + "scope": null, + "escapedName": "escope", + "name": "escope", + "rawSpec": "~0.0.13", + "spec": ">=0.0.13 <0.1.0", + "type": "range" + }, + "_requiredBy": [ + "/esrefactor" + ], + "_resolved": "https://registry.npmjs.org/escope/-/escope-0.0.16.tgz", + "_shasum": "418c7a0afca721dafe659193fd986283e746538f", + "_shrinkwrap": null, + "_spec": "escope@~0.0.13", + "_where": "/Users/MB/git/pdfkit/node_modules/esrefactor", + "bugs": { + "url": "https://github.com/Constellation/escope/issues" + }, + "dependencies": { + "estraverse": ">= 0.0.2" + }, + "description": "ECMAScript scope analyzer", + "devDependencies": { + "chai": "~1.7.2", + "coffee-script": "~1.6.3", + "esprima": "~1.0.3", + "grunt": "~0.4.1", + "grunt-cli": "~0.1.9", + "grunt-contrib-jshint": "~0.6.3", + "grunt-mocha-test": "~0.6.3", + "jshint": "~1.1.0" + }, + "directories": {}, + "dist": { + "shasum": "418c7a0afca721dafe659193fd986283e746538f", + "tarball": "https://registry.npmjs.org/escope/-/escope-0.0.16.tgz" + }, + "engines": { + "node": ">=0.4.0" + }, + "homepage": "http://github.com/Constellation/escope.html", + "licenses": [ + { + "type": "BSD", + "url": "http://github.com/Constellation/escope/raw/master/LICENSE.BSD" + } + ], + "main": "escope.js", + "maintainers": [ + { + "name": "constellation", + "email": "utatane.tea@gmail.com" + } + ], + "name": "escope", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/Constellation/escope.git" + }, + "scripts": { + "lint": "grunt lint", + "test": "grunt travis", + "unit-test": "grunt test" + }, + "version": "0.0.16" +} diff --git a/pitfall/pdfkit/node_modules/esprima/README.md b/pitfall/pdfkit/node_modules/esprima/README.md new file mode 100644 index 00000000..a74bd12d --- /dev/null +++ b/pitfall/pdfkit/node_modules/esprima/README.md @@ -0,0 +1,73 @@ +**Esprima** ([esprima.org](http://esprima.org)) is a high performance, +standard-compliant [ECMAScript](http://www.ecma-international.org/publications/standards/Ecma-262.htm) +parser written in ECMAScript (also popularly known as +[JavaScript](http://en.wikipedia.org/wiki/JavaScript>JavaScript)). +Esprima is created and maintained by [Ariya Hidayat](http://twitter.com/ariyahidayat), +with the help of [many contributors](https://github.com/ariya/esprima/contributors). + +Esprima runs on web browsers (IE 6+, Firefox 1+, Safari 3+, Chrome 1+, Konqueror 4.6+, Opera 8+) as well as +[Node.js](http://nodejs.org). + +### Features + +- Full support for [ECMAScript 5.1](http://www.ecma-international.org/publications/standards/Ecma-262.htm)(ECMA-262) +- Sensible [syntax tree format](http://esprima.org/doc/index.html#ast) compatible with Mozilla +[Parser AST](https://developer.mozilla.org/en/SpiderMonkey/Parser_API) +- Heavily tested (> 550 [unit tests](http://esprima.org/test/) with solid 100% statement coverage) +- Optional tracking of syntax node location (index-based and line-column) +- Experimental support for ES6/Harmony (module, class, destructuring, ...) + +Esprima is blazing fast (see the [benchmark suite](http://esprima.org/test/benchmarks.html)). +It is up to 3x faster than UglifyJS v1 and it is still [competitive](http://esprima.org/test/compare.html) +with the new generation of fast parsers. + +### Applications + +Esprima serves as the basis for many popular JavaScript development tools: + +- Code coverage analysis: [node-cover](https://github.com/itay/node-cover), [Istanbul](https://github.com/yahoo/Istanbul) +- Documentation tool: [JFDoc](https://github.com/thejohnfreeman/jfdoc), [JSDuck](https://github.com/senchalabs/jsduck) +- Language extension: [LLJS](http://mbebenita.github.com/LLJS/) (low-level JS), +[Sweet.js](http://sweetjs.org/) (macro) +- ES6/Harmony transpiler: [Six](https://github.com/matthewrobb/six), [Harmonizr](https://github.com/jdiamond/harmonizr) +- Eclipse Orion smart editing ([outline view](https://github.com/aclement/esprima-outline), [content assist](http://contraptionsforprogramming.blogspot.com/2012/02/better-javascript-content-assist-in.html)) +- Source code modification: [Esmorph](https://github.com/ariya/esmorph), [Code Painter](https://github.com/fawek/codepainter), +- Source transformation: [node-falafel](https://github.com/substack/node-falafel), [Esmangle](https://github.com/Constellation/esmangle), [escodegen](https://github.com/Constellation/escodegen) + +### Questions? +- [Documentation](http://esprima.org/doc) +- [Issue tracker](http://issues.esprima.org): [known problems](http://code.google.com/p/esprima/issues/list?q=Defect) +and [future plans](http://code.google.com/p/esprima/issues/list?q=Enhancement) +- [Mailing list](http://groups.google.com/group/esprima) +- [Contribution guide](http://esprima.org/doc/index.html#contribution) + +Follow [@Esprima](http://twitter.com/Esprima) on Twitter to get the +development updates. +Feedback and contribution are welcomed! + +### License + +Copyright (C) 2012, 2011 [Ariya Hidayat](http://ariya.ofilabs.com/about) + and other contributors. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/pitfall/pdfkit/node_modules/esprima/bin/esparse.js b/pitfall/pdfkit/node_modules/esprima/bin/esparse.js new file mode 100755 index 00000000..3e7bb81e --- /dev/null +++ b/pitfall/pdfkit/node_modules/esprima/bin/esparse.js @@ -0,0 +1,117 @@ +#!/usr/bin/env node +/* + Copyright (C) 2012 Ariya Hidayat + Copyright (C) 2011 Ariya Hidayat + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*jslint sloppy:true node:true rhino:true */ + +var fs, esprima, fname, content, options, syntax; + +if (typeof require === 'function') { + fs = require('fs'); + esprima = require('esprima'); +} else if (typeof load === 'function') { + try { + load('esprima.js'); + } catch (e) { + load('../esprima.js'); + } +} + +// Shims to Node.js objects when running under Rhino. +if (typeof console === 'undefined' && typeof process === 'undefined') { + console = { log: print }; + fs = { readFileSync: readFile }; + process = { argv: arguments, exit: quit }; + process.argv.unshift('esparse.js'); + process.argv.unshift('rhino'); +} + +function showUsage() { + console.log('Usage:'); + console.log(' esparse [options] file.js'); + console.log(); + console.log('Available options:'); + console.log(); + console.log(' --comment Gather all line and block comments in an array'); + console.log(' --loc Include line-column location info for each syntax node'); + console.log(' --range Include index-based range for each syntax node'); + console.log(' --raw Display the raw value of literals'); + console.log(' --tokens List all tokens in an array'); + console.log(' --tolerant Tolerate errors on a best-effort basis (experimental)'); + console.log(' -v, --version Shows program version'); + console.log(); + process.exit(1); +} + +if (process.argv.length <= 2) { + showUsage(); +} + +options = {}; + +process.argv.splice(2).forEach(function (entry) { + + if (entry === '-h' || entry === '--help') { + showUsage(); + } else if (entry === '-v' || entry === '--version') { + console.log('ECMAScript Parser (using Esprima version', esprima.version, ')'); + console.log(); + process.exit(0); + } else if (entry === '--comment') { + options.comment = true; + } else if (entry === '--loc') { + options.loc = true; + } else if (entry === '--range') { + options.range = true; + } else if (entry === '--raw') { + options.raw = true; + } else if (entry === '--tokens') { + options.tokens = true; + } else if (entry === '--tolerant') { + options.tolerant = true; + } else if (entry.slice(0, 2) === '--') { + console.log('Error: unknown option ' + entry + '.'); + process.exit(1); + } else if (typeof fname === 'string') { + console.log('Error: more than one input file.'); + process.exit(1); + } else { + fname = entry; + } +}); + +if (typeof fname !== 'string') { + console.log('Error: no input file.'); + process.exit(1); +} + +try { + content = fs.readFileSync(fname, 'utf-8'); + syntax = esprima.parse(content, options); + console.log(JSON.stringify(syntax, null, 4)); +} catch (e) { + console.log('Error: ' + e.message); + process.exit(1); +} diff --git a/pitfall/pdfkit/node_modules/esprima/bin/esvalidate.js b/pitfall/pdfkit/node_modules/esprima/bin/esvalidate.js new file mode 100755 index 00000000..e0af3f70 --- /dev/null +++ b/pitfall/pdfkit/node_modules/esprima/bin/esvalidate.js @@ -0,0 +1,177 @@ +#!/usr/bin/env node +/* + Copyright (C) 2012 Ariya Hidayat + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*jslint sloppy:true plusplus:true node:true rhino:true */ + +var fs, esprima, options, fnames, count; + +if (typeof require === 'function') { + fs = require('fs'); + esprima = require('esprima'); +} else if (typeof load === 'function') { + try { + load('esprima.js'); + } catch (e) { + load('../esprima.js'); + } +} + +// Shims to Node.js objects when running under Rhino. +if (typeof console === 'undefined' && typeof process === 'undefined') { + console = { log: print }; + fs = { readFileSync: readFile }; + process = { argv: arguments, exit: quit }; + process.argv.unshift('esvalidate.js'); + process.argv.unshift('rhino'); +} + +function showUsage() { + console.log('Usage:'); + console.log(' esvalidate [options] file.js'); + console.log(); + console.log('Available options:'); + console.log(); + console.log(' --format=type Set the report format, plain (default) or junit'); + console.log(' -v, --version Print program version'); + console.log(); + process.exit(1); +} + +if (process.argv.length <= 2) { + showUsage(); +} + +options = { + format: 'plain' +}; + +fnames = []; + +process.argv.splice(2).forEach(function (entry) { + + if (entry === '-h' || entry === '--help') { + showUsage(); + } else if (entry === '-v' || entry === '--version') { + console.log('ECMAScript Validator (using Esprima version', esprima.version, ')'); + console.log(); + process.exit(0); + } else if (entry.slice(0, 9) === '--format=') { + options.format = entry.slice(9); + if (options.format !== 'plain' && options.format !== 'junit') { + console.log('Error: unknown report format ' + options.format + '.'); + process.exit(1); + } + } else if (entry.slice(0, 2) === '--') { + console.log('Error: unknown option ' + entry + '.'); + process.exit(1); + } else { + fnames.push(entry); + } +}); + +if (fnames.length === 0) { + console.log('Error: no input file.'); + process.exit(1); +} + +if (options.format === 'junit') { + console.log(''); + console.log(''); +} + +count = 0; +fnames.forEach(function (fname) { + var content, timestamp, syntax, name; + try { + content = fs.readFileSync(fname, 'utf-8'); + + if (content[0] === '#' && content[1] === '!') { + content = '//' + content.substr(2, content.length); + } + + timestamp = Date.now(); + syntax = esprima.parse(content, { tolerant: true }); + + if (options.format === 'junit') { + + name = fname; + if (name.lastIndexOf('/') >= 0) { + name = name.slice(name.lastIndexOf('/') + 1); + } + + console.log(''); + + syntax.errors.forEach(function (error) { + var msg = error.message; + msg = msg.replace(/^Line\ [0-9]*\:\ /, ''); + console.log(' '); + console.log(' ' + + error.message + '(' + name + ':' + error.lineNumber + ')' + + ''); + console.log(' '); + }); + + console.log(''); + + } else if (options.format === 'plain') { + + syntax.errors.forEach(function (error) { + var msg = error.message; + msg = msg.replace(/^Line\ [0-9]*\:\ /, ''); + msg = fname + ':' + error.lineNumber + ': ' + msg; + console.log(msg); + ++count; + }); + + } + } catch (e) { + ++count; + if (options.format === 'junit') { + console.log(''); + console.log(' '); + console.log(' ' + + e.message + '(' + fname + ((e.lineNumber) ? ':' + e.lineNumber : '') + + ')'); + console.log(' '); + console.log(''); + } else { + console.log('Error: ' + e.message); + } + } +}); + +if (options.format === 'junit') { + console.log(''); +} + +if (count > 0) { + process.exit(1); +} diff --git a/pitfall/pdfkit/node_modules/esprima/esprima.js b/pitfall/pdfkit/node_modules/esprima/esprima.js new file mode 100644 index 00000000..f1320daf --- /dev/null +++ b/pitfall/pdfkit/node_modules/esprima/esprima.js @@ -0,0 +1,3908 @@ +/* + Copyright (C) 2012 Ariya Hidayat + Copyright (C) 2012 Mathias Bynens + Copyright (C) 2012 Joost-Wim Boekesteijn + Copyright (C) 2012 Kris Kowal + Copyright (C) 2012 Yusuke Suzuki + Copyright (C) 2012 Arpad Borsos + Copyright (C) 2011 Ariya Hidayat + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*jslint bitwise:true plusplus:true */ +/*global esprima:true, define:true, exports:true, window: true, +throwError: true, createLiteral: true, generateStatement: true, +parseAssignmentExpression: true, parseBlock: true, parseExpression: true, +parseFunctionDeclaration: true, parseFunctionExpression: true, +parseFunctionSourceElements: true, parseVariableIdentifier: true, +parseLeftHandSideExpression: true, +parseStatement: true, parseSourceElement: true */ + +(function (root, factory) { + 'use strict'; + + // Universal Module Definition (UMD) to support AMD, CommonJS/Node.js, + // Rhino, and plain browser loading. + if (typeof define === 'function' && define.amd) { + define(['exports'], factory); + } else if (typeof exports !== 'undefined') { + factory(exports); + } else { + factory((root.esprima = {})); + } +}(this, function (exports) { + 'use strict'; + + var Token, + TokenName, + Syntax, + PropertyKind, + Messages, + Regex, + source, + strict, + index, + lineNumber, + lineStart, + length, + buffer, + state, + extra; + + Token = { + BooleanLiteral: 1, + EOF: 2, + Identifier: 3, + Keyword: 4, + NullLiteral: 5, + NumericLiteral: 6, + Punctuator: 7, + StringLiteral: 8 + }; + + TokenName = {}; + TokenName[Token.BooleanLiteral] = 'Boolean'; + TokenName[Token.EOF] = ''; + TokenName[Token.Identifier] = 'Identifier'; + TokenName[Token.Keyword] = 'Keyword'; + TokenName[Token.NullLiteral] = 'Null'; + TokenName[Token.NumericLiteral] = 'Numeric'; + TokenName[Token.Punctuator] = 'Punctuator'; + TokenName[Token.StringLiteral] = 'String'; + + Syntax = { + AssignmentExpression: 'AssignmentExpression', + ArrayExpression: 'ArrayExpression', + BlockStatement: 'BlockStatement', + BinaryExpression: 'BinaryExpression', + BreakStatement: 'BreakStatement', + CallExpression: 'CallExpression', + CatchClause: 'CatchClause', + ConditionalExpression: 'ConditionalExpression', + ContinueStatement: 'ContinueStatement', + DoWhileStatement: 'DoWhileStatement', + DebuggerStatement: 'DebuggerStatement', + EmptyStatement: 'EmptyStatement', + ExpressionStatement: 'ExpressionStatement', + ForStatement: 'ForStatement', + ForInStatement: 'ForInStatement', + FunctionDeclaration: 'FunctionDeclaration', + FunctionExpression: 'FunctionExpression', + Identifier: 'Identifier', + IfStatement: 'IfStatement', + Literal: 'Literal', + LabeledStatement: 'LabeledStatement', + LogicalExpression: 'LogicalExpression', + MemberExpression: 'MemberExpression', + NewExpression: 'NewExpression', + ObjectExpression: 'ObjectExpression', + Program: 'Program', + Property: 'Property', + ReturnStatement: 'ReturnStatement', + SequenceExpression: 'SequenceExpression', + SwitchStatement: 'SwitchStatement', + SwitchCase: 'SwitchCase', + ThisExpression: 'ThisExpression', + ThrowStatement: 'ThrowStatement', + TryStatement: 'TryStatement', + UnaryExpression: 'UnaryExpression', + UpdateExpression: 'UpdateExpression', + VariableDeclaration: 'VariableDeclaration', + VariableDeclarator: 'VariableDeclarator', + WhileStatement: 'WhileStatement', + WithStatement: 'WithStatement' + }; + + PropertyKind = { + Data: 1, + Get: 2, + Set: 4 + }; + + // Error messages should be identical to V8. + Messages = { + UnexpectedToken: 'Unexpected token %0', + UnexpectedNumber: 'Unexpected number', + UnexpectedString: 'Unexpected string', + UnexpectedIdentifier: 'Unexpected identifier', + UnexpectedReserved: 'Unexpected reserved word', + UnexpectedEOS: 'Unexpected end of input', + NewlineAfterThrow: 'Illegal newline after throw', + InvalidRegExp: 'Invalid regular expression', + UnterminatedRegExp: 'Invalid regular expression: missing /', + InvalidLHSInAssignment: 'Invalid left-hand side in assignment', + InvalidLHSInForIn: 'Invalid left-hand side in for-in', + MultipleDefaultsInSwitch: 'More than one default clause in switch statement', + NoCatchOrFinally: 'Missing catch or finally after try', + UnknownLabel: 'Undefined label \'%0\'', + Redeclaration: '%0 \'%1\' has already been declared', + IllegalContinue: 'Illegal continue statement', + IllegalBreak: 'Illegal break statement', + IllegalReturn: 'Illegal return statement', + StrictModeWith: 'Strict mode code may not include a with statement', + StrictCatchVariable: 'Catch variable may not be eval or arguments in strict mode', + StrictVarName: 'Variable name may not be eval or arguments in strict mode', + StrictParamName: 'Parameter name eval or arguments is not allowed in strict mode', + StrictParamDupe: 'Strict mode function may not have duplicate parameter names', + StrictFunctionName: 'Function name may not be eval or arguments in strict mode', + StrictOctalLiteral: 'Octal literals are not allowed in strict mode.', + StrictDelete: 'Delete of an unqualified identifier in strict mode.', + StrictDuplicateProperty: 'Duplicate data property in object literal not allowed in strict mode', + AccessorDataProperty: 'Object literal may not have data and accessor property with the same name', + AccessorGetSet: 'Object literal may not have multiple get/set accessors with the same name', + StrictLHSAssignment: 'Assignment to eval or arguments is not allowed in strict mode', + StrictLHSPostfix: 'Postfix increment/decrement may not have eval or arguments operand in strict mode', + StrictLHSPrefix: 'Prefix increment/decrement may not have eval or arguments operand in strict mode', + StrictReservedWord: 'Use of future reserved word in strict mode' + }; + + // See also tools/generate-unicode-regex.py. + Regex = { + NonAsciiIdentifierStart: new RegExp('[\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0370-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05d0-\u05ea\u05f0-\u05f2\u0620-\u064a\u066e\u066f\u0671-\u06d3\u06d5\u06e5\u06e6\u06ee\u06ef\u06fa-\u06fc\u06ff\u0710\u0712-\u072f\u074d-\u07a5\u07b1\u07ca-\u07ea\u07f4\u07f5\u07fa\u0800-\u0815\u081a\u0824\u0828\u0840-\u0858\u08a0\u08a2-\u08ac\u0904-\u0939\u093d\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097f\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bd\u09ce\u09dc\u09dd\u09df-\u09e1\u09f0\u09f1\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a59-\u0a5c\u0a5e\u0a72-\u0a74\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abd\u0ad0\u0ae0\u0ae1\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3d\u0b5c\u0b5d\u0b5f-\u0b61\u0b71\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bd0\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d\u0c58\u0c59\u0c60\u0c61\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbd\u0cde\u0ce0\u0ce1\u0cf1\u0cf2\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d\u0d4e\u0d60\u0d61\u0d7a-\u0d7f\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0e01-\u0e30\u0e32\u0e33\u0e40-\u0e46\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb0\u0eb2\u0eb3\u0ebd\u0ec0-\u0ec4\u0ec6\u0edc-\u0edf\u0f00\u0f40-\u0f47\u0f49-\u0f6c\u0f88-\u0f8c\u1000-\u102a\u103f\u1050-\u1055\u105a-\u105d\u1061\u1065\u1066\u106e-\u1070\u1075-\u1081\u108e\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176c\u176e-\u1770\u1780-\u17b3\u17d7\u17dc\u1820-\u1877\u1880-\u18a8\u18aa\u18b0-\u18f5\u1900-\u191c\u1950-\u196d\u1970-\u1974\u1980-\u19ab\u19c1-\u19c7\u1a00-\u1a16\u1a20-\u1a54\u1aa7\u1b05-\u1b33\u1b45-\u1b4b\u1b83-\u1ba0\u1bae\u1baf\u1bba-\u1be5\u1c00-\u1c23\u1c4d-\u1c4f\u1c5a-\u1c7d\u1ce9-\u1cec\u1cee-\u1cf1\u1cf5\u1cf6\u1d00-\u1dbf\u1e00-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u2071\u207f\u2090-\u209c\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cee\u2cf2\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d80-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2e2f\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303c\u3041-\u3096\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua61f\ua62a\ua62b\ua640-\ua66e\ua67f-\ua697\ua6a0-\ua6ef\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua801\ua803-\ua805\ua807-\ua80a\ua80c-\ua822\ua840-\ua873\ua882-\ua8b3\ua8f2-\ua8f7\ua8fb\ua90a-\ua925\ua930-\ua946\ua960-\ua97c\ua984-\ua9b2\ua9cf\uaa00-\uaa28\uaa40-\uaa42\uaa44-\uaa4b\uaa60-\uaa76\uaa7a\uaa80-\uaaaf\uaab1\uaab5\uaab6\uaab9-\uaabd\uaac0\uaac2\uaadb-\uaadd\uaae0-\uaaea\uaaf2-\uaaf4\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabe2\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d\ufb1f-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe70-\ufe74\ufe76-\ufefc\uff21-\uff3a\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]'), + NonAsciiIdentifierPart: new RegExp('[\xaa\xb5\xba\xc0-\xd6\xd8-\xf6\xf8-\u02c1\u02c6-\u02d1\u02e0-\u02e4\u02ec\u02ee\u0300-\u0374\u0376\u0377\u037a-\u037d\u0386\u0388-\u038a\u038c\u038e-\u03a1\u03a3-\u03f5\u03f7-\u0481\u0483-\u0487\u048a-\u0527\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u05d0-\u05ea\u05f0-\u05f2\u0610-\u061a\u0620-\u0669\u066e-\u06d3\u06d5-\u06dc\u06df-\u06e8\u06ea-\u06fc\u06ff\u0710-\u074a\u074d-\u07b1\u07c0-\u07f5\u07fa\u0800-\u082d\u0840-\u085b\u08a0\u08a2-\u08ac\u08e4-\u08fe\u0900-\u0963\u0966-\u096f\u0971-\u0977\u0979-\u097f\u0981-\u0983\u0985-\u098c\u098f\u0990\u0993-\u09a8\u09aa-\u09b0\u09b2\u09b6-\u09b9\u09bc-\u09c4\u09c7\u09c8\u09cb-\u09ce\u09d7\u09dc\u09dd\u09df-\u09e3\u09e6-\u09f1\u0a01-\u0a03\u0a05-\u0a0a\u0a0f\u0a10\u0a13-\u0a28\u0a2a-\u0a30\u0a32\u0a33\u0a35\u0a36\u0a38\u0a39\u0a3c\u0a3e-\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a59-\u0a5c\u0a5e\u0a66-\u0a75\u0a81-\u0a83\u0a85-\u0a8d\u0a8f-\u0a91\u0a93-\u0aa8\u0aaa-\u0ab0\u0ab2\u0ab3\u0ab5-\u0ab9\u0abc-\u0ac5\u0ac7-\u0ac9\u0acb-\u0acd\u0ad0\u0ae0-\u0ae3\u0ae6-\u0aef\u0b01-\u0b03\u0b05-\u0b0c\u0b0f\u0b10\u0b13-\u0b28\u0b2a-\u0b30\u0b32\u0b33\u0b35-\u0b39\u0b3c-\u0b44\u0b47\u0b48\u0b4b-\u0b4d\u0b56\u0b57\u0b5c\u0b5d\u0b5f-\u0b63\u0b66-\u0b6f\u0b71\u0b82\u0b83\u0b85-\u0b8a\u0b8e-\u0b90\u0b92-\u0b95\u0b99\u0b9a\u0b9c\u0b9e\u0b9f\u0ba3\u0ba4\u0ba8-\u0baa\u0bae-\u0bb9\u0bbe-\u0bc2\u0bc6-\u0bc8\u0bca-\u0bcd\u0bd0\u0bd7\u0be6-\u0bef\u0c01-\u0c03\u0c05-\u0c0c\u0c0e-\u0c10\u0c12-\u0c28\u0c2a-\u0c33\u0c35-\u0c39\u0c3d-\u0c44\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c58\u0c59\u0c60-\u0c63\u0c66-\u0c6f\u0c82\u0c83\u0c85-\u0c8c\u0c8e-\u0c90\u0c92-\u0ca8\u0caa-\u0cb3\u0cb5-\u0cb9\u0cbc-\u0cc4\u0cc6-\u0cc8\u0cca-\u0ccd\u0cd5\u0cd6\u0cde\u0ce0-\u0ce3\u0ce6-\u0cef\u0cf1\u0cf2\u0d02\u0d03\u0d05-\u0d0c\u0d0e-\u0d10\u0d12-\u0d3a\u0d3d-\u0d44\u0d46-\u0d48\u0d4a-\u0d4e\u0d57\u0d60-\u0d63\u0d66-\u0d6f\u0d7a-\u0d7f\u0d82\u0d83\u0d85-\u0d96\u0d9a-\u0db1\u0db3-\u0dbb\u0dbd\u0dc0-\u0dc6\u0dca\u0dcf-\u0dd4\u0dd6\u0dd8-\u0ddf\u0df2\u0df3\u0e01-\u0e3a\u0e40-\u0e4e\u0e50-\u0e59\u0e81\u0e82\u0e84\u0e87\u0e88\u0e8a\u0e8d\u0e94-\u0e97\u0e99-\u0e9f\u0ea1-\u0ea3\u0ea5\u0ea7\u0eaa\u0eab\u0ead-\u0eb9\u0ebb-\u0ebd\u0ec0-\u0ec4\u0ec6\u0ec8-\u0ecd\u0ed0-\u0ed9\u0edc-\u0edf\u0f00\u0f18\u0f19\u0f20-\u0f29\u0f35\u0f37\u0f39\u0f3e-\u0f47\u0f49-\u0f6c\u0f71-\u0f84\u0f86-\u0f97\u0f99-\u0fbc\u0fc6\u1000-\u1049\u1050-\u109d\u10a0-\u10c5\u10c7\u10cd\u10d0-\u10fa\u10fc-\u1248\u124a-\u124d\u1250-\u1256\u1258\u125a-\u125d\u1260-\u1288\u128a-\u128d\u1290-\u12b0\u12b2-\u12b5\u12b8-\u12be\u12c0\u12c2-\u12c5\u12c8-\u12d6\u12d8-\u1310\u1312-\u1315\u1318-\u135a\u135d-\u135f\u1380-\u138f\u13a0-\u13f4\u1401-\u166c\u166f-\u167f\u1681-\u169a\u16a0-\u16ea\u16ee-\u16f0\u1700-\u170c\u170e-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176c\u176e-\u1770\u1772\u1773\u1780-\u17d3\u17d7\u17dc\u17dd\u17e0-\u17e9\u180b-\u180d\u1810-\u1819\u1820-\u1877\u1880-\u18aa\u18b0-\u18f5\u1900-\u191c\u1920-\u192b\u1930-\u193b\u1946-\u196d\u1970-\u1974\u1980-\u19ab\u19b0-\u19c9\u19d0-\u19d9\u1a00-\u1a1b\u1a20-\u1a5e\u1a60-\u1a7c\u1a7f-\u1a89\u1a90-\u1a99\u1aa7\u1b00-\u1b4b\u1b50-\u1b59\u1b6b-\u1b73\u1b80-\u1bf3\u1c00-\u1c37\u1c40-\u1c49\u1c4d-\u1c7d\u1cd0-\u1cd2\u1cd4-\u1cf6\u1d00-\u1de6\u1dfc-\u1f15\u1f18-\u1f1d\u1f20-\u1f45\u1f48-\u1f4d\u1f50-\u1f57\u1f59\u1f5b\u1f5d\u1f5f-\u1f7d\u1f80-\u1fb4\u1fb6-\u1fbc\u1fbe\u1fc2-\u1fc4\u1fc6-\u1fcc\u1fd0-\u1fd3\u1fd6-\u1fdb\u1fe0-\u1fec\u1ff2-\u1ff4\u1ff6-\u1ffc\u200c\u200d\u203f\u2040\u2054\u2071\u207f\u2090-\u209c\u20d0-\u20dc\u20e1\u20e5-\u20f0\u2102\u2107\u210a-\u2113\u2115\u2119-\u211d\u2124\u2126\u2128\u212a-\u212d\u212f-\u2139\u213c-\u213f\u2145-\u2149\u214e\u2160-\u2188\u2c00-\u2c2e\u2c30-\u2c5e\u2c60-\u2ce4\u2ceb-\u2cf3\u2d00-\u2d25\u2d27\u2d2d\u2d30-\u2d67\u2d6f\u2d7f-\u2d96\u2da0-\u2da6\u2da8-\u2dae\u2db0-\u2db6\u2db8-\u2dbe\u2dc0-\u2dc6\u2dc8-\u2dce\u2dd0-\u2dd6\u2dd8-\u2dde\u2de0-\u2dff\u2e2f\u3005-\u3007\u3021-\u302f\u3031-\u3035\u3038-\u303c\u3041-\u3096\u3099\u309a\u309d-\u309f\u30a1-\u30fa\u30fc-\u30ff\u3105-\u312d\u3131-\u318e\u31a0-\u31ba\u31f0-\u31ff\u3400-\u4db5\u4e00-\u9fcc\ua000-\ua48c\ua4d0-\ua4fd\ua500-\ua60c\ua610-\ua62b\ua640-\ua66f\ua674-\ua67d\ua67f-\ua697\ua69f-\ua6f1\ua717-\ua71f\ua722-\ua788\ua78b-\ua78e\ua790-\ua793\ua7a0-\ua7aa\ua7f8-\ua827\ua840-\ua873\ua880-\ua8c4\ua8d0-\ua8d9\ua8e0-\ua8f7\ua8fb\ua900-\ua92d\ua930-\ua953\ua960-\ua97c\ua980-\ua9c0\ua9cf-\ua9d9\uaa00-\uaa36\uaa40-\uaa4d\uaa50-\uaa59\uaa60-\uaa76\uaa7a\uaa7b\uaa80-\uaac2\uaadb-\uaadd\uaae0-\uaaef\uaaf2-\uaaf6\uab01-\uab06\uab09-\uab0e\uab11-\uab16\uab20-\uab26\uab28-\uab2e\uabc0-\uabea\uabec\uabed\uabf0-\uabf9\uac00-\ud7a3\ud7b0-\ud7c6\ud7cb-\ud7fb\uf900-\ufa6d\ufa70-\ufad9\ufb00-\ufb06\ufb13-\ufb17\ufb1d-\ufb28\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40\ufb41\ufb43\ufb44\ufb46-\ufbb1\ufbd3-\ufd3d\ufd50-\ufd8f\ufd92-\ufdc7\ufdf0-\ufdfb\ufe00-\ufe0f\ufe20-\ufe26\ufe33\ufe34\ufe4d-\ufe4f\ufe70-\ufe74\ufe76-\ufefc\uff10-\uff19\uff21-\uff3a\uff3f\uff41-\uff5a\uff66-\uffbe\uffc2-\uffc7\uffca-\uffcf\uffd2-\uffd7\uffda-\uffdc]') + }; + + // Ensure the condition is true, otherwise throw an error. + // This is only to have a better contract semantic, i.e. another safety net + // to catch a logic error. The condition shall be fulfilled in normal case. + // Do NOT use this to enforce a certain condition on any user input. + + function assert(condition, message) { + if (!condition) { + throw new Error('ASSERT: ' + message); + } + } + + function sliceSource(from, to) { + return source.slice(from, to); + } + + if (typeof 'esprima'[0] === 'undefined') { + sliceSource = function sliceArraySource(from, to) { + return source.slice(from, to).join(''); + }; + } + + function isDecimalDigit(ch) { + return '0123456789'.indexOf(ch) >= 0; + } + + function isHexDigit(ch) { + return '0123456789abcdefABCDEF'.indexOf(ch) >= 0; + } + + function isOctalDigit(ch) { + return '01234567'.indexOf(ch) >= 0; + } + + + // 7.2 White Space + + function isWhiteSpace(ch) { + return (ch === ' ') || (ch === '\u0009') || (ch === '\u000B') || + (ch === '\u000C') || (ch === '\u00A0') || + (ch.charCodeAt(0) >= 0x1680 && + '\u1680\u180E\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\uFEFF'.indexOf(ch) >= 0); + } + + // 7.3 Line Terminators + + function isLineTerminator(ch) { + return (ch === '\n' || ch === '\r' || ch === '\u2028' || ch === '\u2029'); + } + + // 7.6 Identifier Names and Identifiers + + function isIdentifierStart(ch) { + return (ch === '$') || (ch === '_') || (ch === '\\') || + (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || + ((ch.charCodeAt(0) >= 0x80) && Regex.NonAsciiIdentifierStart.test(ch)); + } + + function isIdentifierPart(ch) { + return (ch === '$') || (ch === '_') || (ch === '\\') || + (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z') || + ((ch >= '0') && (ch <= '9')) || + ((ch.charCodeAt(0) >= 0x80) && Regex.NonAsciiIdentifierPart.test(ch)); + } + + // 7.6.1.2 Future Reserved Words + + function isFutureReservedWord(id) { + switch (id) { + + // Future reserved words. + case 'class': + case 'enum': + case 'export': + case 'extends': + case 'import': + case 'super': + return true; + } + + return false; + } + + function isStrictModeReservedWord(id) { + switch (id) { + + // Strict Mode reserved words. + case 'implements': + case 'interface': + case 'package': + case 'private': + case 'protected': + case 'public': + case 'static': + case 'yield': + case 'let': + return true; + } + + return false; + } + + function isRestrictedWord(id) { + return id === 'eval' || id === 'arguments'; + } + + // 7.6.1.1 Keywords + + function isKeyword(id) { + var keyword = false; + switch (id.length) { + case 2: + keyword = (id === 'if') || (id === 'in') || (id === 'do'); + break; + case 3: + keyword = (id === 'var') || (id === 'for') || (id === 'new') || (id === 'try'); + break; + case 4: + keyword = (id === 'this') || (id === 'else') || (id === 'case') || (id === 'void') || (id === 'with'); + break; + case 5: + keyword = (id === 'while') || (id === 'break') || (id === 'catch') || (id === 'throw'); + break; + case 6: + keyword = (id === 'return') || (id === 'typeof') || (id === 'delete') || (id === 'switch'); + break; + case 7: + keyword = (id === 'default') || (id === 'finally'); + break; + case 8: + keyword = (id === 'function') || (id === 'continue') || (id === 'debugger'); + break; + case 10: + keyword = (id === 'instanceof'); + break; + } + + if (keyword) { + return true; + } + + switch (id) { + // Future reserved words. + // 'const' is specialized as Keyword in V8. + case 'const': + return true; + + // For compatiblity to SpiderMonkey and ES.next + case 'yield': + case 'let': + return true; + } + + if (strict && isStrictModeReservedWord(id)) { + return true; + } + + return isFutureReservedWord(id); + } + + // 7.4 Comments + + function skipComment() { + var ch, blockComment, lineComment; + + blockComment = false; + lineComment = false; + + while (index < length) { + ch = source[index]; + + if (lineComment) { + ch = source[index++]; + if (isLineTerminator(ch)) { + lineComment = false; + if (ch === '\r' && source[index] === '\n') { + ++index; + } + ++lineNumber; + lineStart = index; + } + } else if (blockComment) { + if (isLineTerminator(ch)) { + if (ch === '\r' && source[index + 1] === '\n') { + ++index; + } + ++lineNumber; + ++index; + lineStart = index; + if (index >= length) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } else { + ch = source[index++]; + if (index >= length) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + if (ch === '*') { + ch = source[index]; + if (ch === '/') { + ++index; + blockComment = false; + } + } + } + } else if (ch === '/') { + ch = source[index + 1]; + if (ch === '/') { + index += 2; + lineComment = true; + } else if (ch === '*') { + index += 2; + blockComment = true; + if (index >= length) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } else { + break; + } + } else if (isWhiteSpace(ch)) { + ++index; + } else if (isLineTerminator(ch)) { + ++index; + if (ch === '\r' && source[index] === '\n') { + ++index; + } + ++lineNumber; + lineStart = index; + } else { + break; + } + } + } + + function scanHexEscape(prefix) { + var i, len, ch, code = 0; + + len = (prefix === 'u') ? 4 : 2; + for (i = 0; i < len; ++i) { + if (index < length && isHexDigit(source[index])) { + ch = source[index++]; + code = code * 16 + '0123456789abcdef'.indexOf(ch.toLowerCase()); + } else { + return ''; + } + } + return String.fromCharCode(code); + } + + function scanIdentifier() { + var ch, start, id, restore; + + ch = source[index]; + if (!isIdentifierStart(ch)) { + return; + } + + start = index; + if (ch === '\\') { + ++index; + if (source[index] !== 'u') { + return; + } + ++index; + restore = index; + ch = scanHexEscape('u'); + if (ch) { + if (ch === '\\' || !isIdentifierStart(ch)) { + return; + } + id = ch; + } else { + index = restore; + id = 'u'; + } + } else { + id = source[index++]; + } + + while (index < length) { + ch = source[index]; + if (!isIdentifierPart(ch)) { + break; + } + if (ch === '\\') { + ++index; + if (source[index] !== 'u') { + return; + } + ++index; + restore = index; + ch = scanHexEscape('u'); + if (ch) { + if (ch === '\\' || !isIdentifierPart(ch)) { + return; + } + id += ch; + } else { + index = restore; + id += 'u'; + } + } else { + id += source[index++]; + } + } + + // There is no keyword or literal with only one character. + // Thus, it must be an identifier. + if (id.length === 1) { + return { + type: Token.Identifier, + value: id, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + if (isKeyword(id)) { + return { + type: Token.Keyword, + value: id, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + // 7.8.1 Null Literals + + if (id === 'null') { + return { + type: Token.NullLiteral, + value: id, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + // 7.8.2 Boolean Literals + + if (id === 'true' || id === 'false') { + return { + type: Token.BooleanLiteral, + value: id, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + return { + type: Token.Identifier, + value: id, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + // 7.7 Punctuators + + function scanPunctuator() { + var start = index, + ch1 = source[index], + ch2, + ch3, + ch4; + + // Check for most common single-character punctuators. + + if (ch1 === ';' || ch1 === '{' || ch1 === '}') { + ++index; + return { + type: Token.Punctuator, + value: ch1, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + if (ch1 === ',' || ch1 === '(' || ch1 === ')') { + ++index; + return { + type: Token.Punctuator, + value: ch1, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + // Dot (.) can also start a floating-point number, hence the need + // to check the next character. + + ch2 = source[index + 1]; + if (ch1 === '.' && !isDecimalDigit(ch2)) { + return { + type: Token.Punctuator, + value: source[index++], + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + // Peek more characters. + + ch3 = source[index + 2]; + ch4 = source[index + 3]; + + // 4-character punctuator: >>>= + + if (ch1 === '>' && ch2 === '>' && ch3 === '>') { + if (ch4 === '=') { + index += 4; + return { + type: Token.Punctuator, + value: '>>>=', + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + } + + // 3-character punctuators: === !== >>> <<= >>= + + if (ch1 === '=' && ch2 === '=' && ch3 === '=') { + index += 3; + return { + type: Token.Punctuator, + value: '===', + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + if (ch1 === '!' && ch2 === '=' && ch3 === '=') { + index += 3; + return { + type: Token.Punctuator, + value: '!==', + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + if (ch1 === '>' && ch2 === '>' && ch3 === '>') { + index += 3; + return { + type: Token.Punctuator, + value: '>>>', + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + if (ch1 === '<' && ch2 === '<' && ch3 === '=') { + index += 3; + return { + type: Token.Punctuator, + value: '<<=', + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + if (ch1 === '>' && ch2 === '>' && ch3 === '=') { + index += 3; + return { + type: Token.Punctuator, + value: '>>=', + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + // 2-character punctuators: <= >= == != ++ -- << >> && || + // += -= *= %= &= |= ^= /= + + if (ch2 === '=') { + if ('<>=!+-*%&|^/'.indexOf(ch1) >= 0) { + index += 2; + return { + type: Token.Punctuator, + value: ch1 + ch2, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + } + + if (ch1 === ch2 && ('+-<>&|'.indexOf(ch1) >= 0)) { + if ('+-<>&|'.indexOf(ch2) >= 0) { + index += 2; + return { + type: Token.Punctuator, + value: ch1 + ch2, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + } + + // The remaining 1-character punctuators. + + if ('[]<>+-*%&|^!~?:=/'.indexOf(ch1) >= 0) { + return { + type: Token.Punctuator, + value: source[index++], + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + } + + // 7.8.3 Numeric Literals + + function scanNumericLiteral() { + var number, start, ch; + + ch = source[index]; + assert(isDecimalDigit(ch) || (ch === '.'), + 'Numeric literal must start with a decimal digit or a decimal point'); + + start = index; + number = ''; + if (ch !== '.') { + number = source[index++]; + ch = source[index]; + + // Hex number starts with '0x'. + // Octal number starts with '0'. + if (number === '0') { + if (ch === 'x' || ch === 'X') { + number += source[index++]; + while (index < length) { + ch = source[index]; + if (!isHexDigit(ch)) { + break; + } + number += source[index++]; + } + + if (number.length <= 2) { + // only 0x + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + if (index < length) { + ch = source[index]; + if (isIdentifierStart(ch)) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } + return { + type: Token.NumericLiteral, + value: parseInt(number, 16), + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } else if (isOctalDigit(ch)) { + number += source[index++]; + while (index < length) { + ch = source[index]; + if (!isOctalDigit(ch)) { + break; + } + number += source[index++]; + } + + if (index < length) { + ch = source[index]; + if (isIdentifierStart(ch) || isDecimalDigit(ch)) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } + return { + type: Token.NumericLiteral, + value: parseInt(number, 8), + octal: true, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + // decimal number starts with '0' such as '09' is illegal. + if (isDecimalDigit(ch)) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } + + while (index < length) { + ch = source[index]; + if (!isDecimalDigit(ch)) { + break; + } + number += source[index++]; + } + } + + if (ch === '.') { + number += source[index++]; + while (index < length) { + ch = source[index]; + if (!isDecimalDigit(ch)) { + break; + } + number += source[index++]; + } + } + + if (ch === 'e' || ch === 'E') { + number += source[index++]; + + ch = source[index]; + if (ch === '+' || ch === '-') { + number += source[index++]; + } + + ch = source[index]; + if (isDecimalDigit(ch)) { + number += source[index++]; + while (index < length) { + ch = source[index]; + if (!isDecimalDigit(ch)) { + break; + } + number += source[index++]; + } + } else { + ch = 'character ' + ch; + if (index >= length) { + ch = ''; + } + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } + + if (index < length) { + ch = source[index]; + if (isIdentifierStart(ch)) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } + + return { + type: Token.NumericLiteral, + value: parseFloat(number), + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + // 7.8.4 String Literals + + function scanStringLiteral() { + var str = '', quote, start, ch, code, unescaped, restore, octal = false; + + quote = source[index]; + assert((quote === '\'' || quote === '"'), + 'String literal must starts with a quote'); + + start = index; + ++index; + + while (index < length) { + ch = source[index++]; + + if (ch === quote) { + quote = ''; + break; + } else if (ch === '\\') { + ch = source[index++]; + if (!isLineTerminator(ch)) { + switch (ch) { + case 'n': + str += '\n'; + break; + case 'r': + str += '\r'; + break; + case 't': + str += '\t'; + break; + case 'u': + case 'x': + restore = index; + unescaped = scanHexEscape(ch); + if (unescaped) { + str += unescaped; + } else { + index = restore; + str += ch; + } + break; + case 'b': + str += '\b'; + break; + case 'f': + str += '\f'; + break; + case 'v': + str += '\x0B'; + break; + + default: + if (isOctalDigit(ch)) { + code = '01234567'.indexOf(ch); + + // \0 is not octal escape sequence + if (code !== 0) { + octal = true; + } + + if (index < length && isOctalDigit(source[index])) { + octal = true; + code = code * 8 + '01234567'.indexOf(source[index++]); + + // 3 digits are only allowed when string starts + // with 0, 1, 2, 3 + if ('0123'.indexOf(ch) >= 0 && + index < length && + isOctalDigit(source[index])) { + code = code * 8 + '01234567'.indexOf(source[index++]); + } + } + str += String.fromCharCode(code); + } else { + str += ch; + } + break; + } + } else { + ++lineNumber; + if (ch === '\r' && source[index] === '\n') { + ++index; + } + } + } else if (isLineTerminator(ch)) { + break; + } else { + str += ch; + } + } + + if (quote !== '') { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + return { + type: Token.StringLiteral, + value: str, + octal: octal, + lineNumber: lineNumber, + lineStart: lineStart, + range: [start, index] + }; + } + + function scanRegExp() { + var str, ch, start, pattern, flags, value, classMarker = false, restore, terminated = false; + + buffer = null; + skipComment(); + + start = index; + ch = source[index]; + assert(ch === '/', 'Regular expression literal must start with a slash'); + str = source[index++]; + + while (index < length) { + ch = source[index++]; + str += ch; + if (ch === '\\') { + ch = source[index++]; + // ECMA-262 7.8.5 + if (isLineTerminator(ch)) { + throwError({}, Messages.UnterminatedRegExp); + } + str += ch; + } else if (classMarker) { + if (ch === ']') { + classMarker = false; + } + } else { + if (ch === '/') { + terminated = true; + break; + } else if (ch === '[') { + classMarker = true; + } else if (isLineTerminator(ch)) { + throwError({}, Messages.UnterminatedRegExp); + } + } + } + + if (!terminated) { + throwError({}, Messages.UnterminatedRegExp); + } + + // Exclude leading and trailing slash. + pattern = str.substr(1, str.length - 2); + + flags = ''; + while (index < length) { + ch = source[index]; + if (!isIdentifierPart(ch)) { + break; + } + + ++index; + if (ch === '\\' && index < length) { + ch = source[index]; + if (ch === 'u') { + ++index; + restore = index; + ch = scanHexEscape('u'); + if (ch) { + flags += ch; + str += '\\u'; + for (; restore < index; ++restore) { + str += source[restore]; + } + } else { + index = restore; + flags += 'u'; + str += '\\u'; + } + } else { + str += '\\'; + } + } else { + flags += ch; + str += ch; + } + } + + try { + value = new RegExp(pattern, flags); + } catch (e) { + throwError({}, Messages.InvalidRegExp); + } + + return { + literal: str, + value: value, + range: [start, index] + }; + } + + function isIdentifierName(token) { + return token.type === Token.Identifier || + token.type === Token.Keyword || + token.type === Token.BooleanLiteral || + token.type === Token.NullLiteral; + } + + function advance() { + var ch, token; + + skipComment(); + + if (index >= length) { + return { + type: Token.EOF, + lineNumber: lineNumber, + lineStart: lineStart, + range: [index, index] + }; + } + + token = scanPunctuator(); + if (typeof token !== 'undefined') { + return token; + } + + ch = source[index]; + + if (ch === '\'' || ch === '"') { + return scanStringLiteral(); + } + + if (ch === '.' || isDecimalDigit(ch)) { + return scanNumericLiteral(); + } + + token = scanIdentifier(); + if (typeof token !== 'undefined') { + return token; + } + + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + + function lex() { + var token; + + if (buffer) { + index = buffer.range[1]; + lineNumber = buffer.lineNumber; + lineStart = buffer.lineStart; + token = buffer; + buffer = null; + return token; + } + + buffer = null; + return advance(); + } + + function lookahead() { + var pos, line, start; + + if (buffer !== null) { + return buffer; + } + + pos = index; + line = lineNumber; + start = lineStart; + buffer = advance(); + index = pos; + lineNumber = line; + lineStart = start; + + return buffer; + } + + // Return true if there is a line terminator before the next token. + + function peekLineTerminator() { + var pos, line, start, found; + + pos = index; + line = lineNumber; + start = lineStart; + skipComment(); + found = lineNumber !== line; + index = pos; + lineNumber = line; + lineStart = start; + + return found; + } + + // Throw an exception + + function throwError(token, messageFormat) { + var error, + args = Array.prototype.slice.call(arguments, 2), + msg = messageFormat.replace( + /%(\d)/g, + function (whole, index) { + return args[index] || ''; + } + ); + + if (typeof token.lineNumber === 'number') { + error = new Error('Line ' + token.lineNumber + ': ' + msg); + error.index = token.range[0]; + error.lineNumber = token.lineNumber; + error.column = token.range[0] - lineStart + 1; + } else { + error = new Error('Line ' + lineNumber + ': ' + msg); + error.index = index; + error.lineNumber = lineNumber; + error.column = index - lineStart + 1; + } + + throw error; + } + + function throwErrorTolerant() { + try { + throwError.apply(null, arguments); + } catch (e) { + if (extra.errors) { + extra.errors.push(e); + } else { + throw e; + } + } + } + + + // Throw an exception because of the token. + + function throwUnexpected(token) { + if (token.type === Token.EOF) { + throwError(token, Messages.UnexpectedEOS); + } + + if (token.type === Token.NumericLiteral) { + throwError(token, Messages.UnexpectedNumber); + } + + if (token.type === Token.StringLiteral) { + throwError(token, Messages.UnexpectedString); + } + + if (token.type === Token.Identifier) { + throwError(token, Messages.UnexpectedIdentifier); + } + + if (token.type === Token.Keyword) { + if (isFutureReservedWord(token.value)) { + throwError(token, Messages.UnexpectedReserved); + } else if (strict && isStrictModeReservedWord(token.value)) { + throwErrorTolerant(token, Messages.StrictReservedWord); + return; + } + throwError(token, Messages.UnexpectedToken, token.value); + } + + // BooleanLiteral, NullLiteral, or Punctuator. + throwError(token, Messages.UnexpectedToken, token.value); + } + + // Expect the next token to match the specified punctuator. + // If not, an exception will be thrown. + + function expect(value) { + var token = lex(); + if (token.type !== Token.Punctuator || token.value !== value) { + throwUnexpected(token); + } + } + + // Expect the next token to match the specified keyword. + // If not, an exception will be thrown. + + function expectKeyword(keyword) { + var token = lex(); + if (token.type !== Token.Keyword || token.value !== keyword) { + throwUnexpected(token); + } + } + + // Return true if the next token matches the specified punctuator. + + function match(value) { + var token = lookahead(); + return token.type === Token.Punctuator && token.value === value; + } + + // Return true if the next token matches the specified keyword + + function matchKeyword(keyword) { + var token = lookahead(); + return token.type === Token.Keyword && token.value === keyword; + } + + // Return true if the next token is an assignment operator + + function matchAssign() { + var token = lookahead(), + op = token.value; + + if (token.type !== Token.Punctuator) { + return false; + } + return op === '=' || + op === '*=' || + op === '/=' || + op === '%=' || + op === '+=' || + op === '-=' || + op === '<<=' || + op === '>>=' || + op === '>>>=' || + op === '&=' || + op === '^=' || + op === '|='; + } + + function consumeSemicolon() { + var token, line; + + // Catch the very common case first. + if (source[index] === ';') { + lex(); + return; + } + + line = lineNumber; + skipComment(); + if (lineNumber !== line) { + return; + } + + if (match(';')) { + lex(); + return; + } + + token = lookahead(); + if (token.type !== Token.EOF && !match('}')) { + throwUnexpected(token); + } + } + + // Return true if provided expression is LeftHandSideExpression + + function isLeftHandSide(expr) { + return expr.type === Syntax.Identifier || expr.type === Syntax.MemberExpression; + } + + // 11.1.4 Array Initialiser + + function parseArrayInitialiser() { + var elements = []; + + expect('['); + + while (!match(']')) { + if (match(',')) { + lex(); + elements.push(null); + } else { + elements.push(parseAssignmentExpression()); + + if (!match(']')) { + expect(','); + } + } + } + + expect(']'); + + return { + type: Syntax.ArrayExpression, + elements: elements + }; + } + + // 11.1.5 Object Initialiser + + function parsePropertyFunction(param, first) { + var previousStrict, body; + + previousStrict = strict; + body = parseFunctionSourceElements(); + if (first && strict && isRestrictedWord(param[0].name)) { + throwErrorTolerant(first, Messages.StrictParamName); + } + strict = previousStrict; + + return { + type: Syntax.FunctionExpression, + id: null, + params: param, + defaults: [], + body: body, + rest: null, + generator: false, + expression: false + }; + } + + function parseObjectPropertyKey() { + var token = lex(); + + // Note: This function is called only from parseObjectProperty(), where + // EOF and Punctuator tokens are already filtered out. + + if (token.type === Token.StringLiteral || token.type === Token.NumericLiteral) { + if (strict && token.octal) { + throwErrorTolerant(token, Messages.StrictOctalLiteral); + } + return createLiteral(token); + } + + return { + type: Syntax.Identifier, + name: token.value + }; + } + + function parseObjectProperty() { + var token, key, id, param; + + token = lookahead(); + + if (token.type === Token.Identifier) { + + id = parseObjectPropertyKey(); + + // Property Assignment: Getter and Setter. + + if (token.value === 'get' && !match(':')) { + key = parseObjectPropertyKey(); + expect('('); + expect(')'); + return { + type: Syntax.Property, + key: key, + value: parsePropertyFunction([]), + kind: 'get' + }; + } else if (token.value === 'set' && !match(':')) { + key = parseObjectPropertyKey(); + expect('('); + token = lookahead(); + if (token.type !== Token.Identifier) { + expect(')'); + throwErrorTolerant(token, Messages.UnexpectedToken, token.value); + return { + type: Syntax.Property, + key: key, + value: parsePropertyFunction([]), + kind: 'set' + }; + } else { + param = [ parseVariableIdentifier() ]; + expect(')'); + return { + type: Syntax.Property, + key: key, + value: parsePropertyFunction(param, token), + kind: 'set' + }; + } + } else { + expect(':'); + return { + type: Syntax.Property, + key: id, + value: parseAssignmentExpression(), + kind: 'init' + }; + } + } else if (token.type === Token.EOF || token.type === Token.Punctuator) { + throwUnexpected(token); + } else { + key = parseObjectPropertyKey(); + expect(':'); + return { + type: Syntax.Property, + key: key, + value: parseAssignmentExpression(), + kind: 'init' + }; + } + } + + function parseObjectInitialiser() { + var properties = [], property, name, kind, map = {}, toString = String; + + expect('{'); + + while (!match('}')) { + property = parseObjectProperty(); + + if (property.key.type === Syntax.Identifier) { + name = property.key.name; + } else { + name = toString(property.key.value); + } + kind = (property.kind === 'init') ? PropertyKind.Data : (property.kind === 'get') ? PropertyKind.Get : PropertyKind.Set; + if (Object.prototype.hasOwnProperty.call(map, name)) { + if (map[name] === PropertyKind.Data) { + if (strict && kind === PropertyKind.Data) { + throwErrorTolerant({}, Messages.StrictDuplicateProperty); + } else if (kind !== PropertyKind.Data) { + throwErrorTolerant({}, Messages.AccessorDataProperty); + } + } else { + if (kind === PropertyKind.Data) { + throwErrorTolerant({}, Messages.AccessorDataProperty); + } else if (map[name] & kind) { + throwErrorTolerant({}, Messages.AccessorGetSet); + } + } + map[name] |= kind; + } else { + map[name] = kind; + } + + properties.push(property); + + if (!match('}')) { + expect(','); + } + } + + expect('}'); + + return { + type: Syntax.ObjectExpression, + properties: properties + }; + } + + // 11.1.6 The Grouping Operator + + function parseGroupExpression() { + var expr; + + expect('('); + + expr = parseExpression(); + + expect(')'); + + return expr; + } + + + // 11.1 Primary Expressions + + function parsePrimaryExpression() { + var token = lookahead(), + type = token.type; + + if (type === Token.Identifier) { + return { + type: Syntax.Identifier, + name: lex().value + }; + } + + if (type === Token.StringLiteral || type === Token.NumericLiteral) { + if (strict && token.octal) { + throwErrorTolerant(token, Messages.StrictOctalLiteral); + } + return createLiteral(lex()); + } + + if (type === Token.Keyword) { + if (matchKeyword('this')) { + lex(); + return { + type: Syntax.ThisExpression + }; + } + + if (matchKeyword('function')) { + return parseFunctionExpression(); + } + } + + if (type === Token.BooleanLiteral) { + lex(); + token.value = (token.value === 'true'); + return createLiteral(token); + } + + if (type === Token.NullLiteral) { + lex(); + token.value = null; + return createLiteral(token); + } + + if (match('[')) { + return parseArrayInitialiser(); + } + + if (match('{')) { + return parseObjectInitialiser(); + } + + if (match('(')) { + return parseGroupExpression(); + } + + if (match('/') || match('/=')) { + return createLiteral(scanRegExp()); + } + + return throwUnexpected(lex()); + } + + // 11.2 Left-Hand-Side Expressions + + function parseArguments() { + var args = []; + + expect('('); + + if (!match(')')) { + while (index < length) { + args.push(parseAssignmentExpression()); + if (match(')')) { + break; + } + expect(','); + } + } + + expect(')'); + + return args; + } + + function parseNonComputedProperty() { + var token = lex(); + + if (!isIdentifierName(token)) { + throwUnexpected(token); + } + + return { + type: Syntax.Identifier, + name: token.value + }; + } + + function parseNonComputedMember() { + expect('.'); + + return parseNonComputedProperty(); + } + + function parseComputedMember() { + var expr; + + expect('['); + + expr = parseExpression(); + + expect(']'); + + return expr; + } + + function parseNewExpression() { + var expr; + + expectKeyword('new'); + + expr = { + type: Syntax.NewExpression, + callee: parseLeftHandSideExpression(), + 'arguments': [] + }; + + if (match('(')) { + expr['arguments'] = parseArguments(); + } + + return expr; + } + + function parseLeftHandSideExpressionAllowCall() { + var expr; + + expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression(); + + while (match('.') || match('[') || match('(')) { + if (match('(')) { + expr = { + type: Syntax.CallExpression, + callee: expr, + 'arguments': parseArguments() + }; + } else if (match('[')) { + expr = { + type: Syntax.MemberExpression, + computed: true, + object: expr, + property: parseComputedMember() + }; + } else { + expr = { + type: Syntax.MemberExpression, + computed: false, + object: expr, + property: parseNonComputedMember() + }; + } + } + + return expr; + } + + + function parseLeftHandSideExpression() { + var expr; + + expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression(); + + while (match('.') || match('[')) { + if (match('[')) { + expr = { + type: Syntax.MemberExpression, + computed: true, + object: expr, + property: parseComputedMember() + }; + } else { + expr = { + type: Syntax.MemberExpression, + computed: false, + object: expr, + property: parseNonComputedMember() + }; + } + } + + return expr; + } + + // 11.3 Postfix Expressions + + function parsePostfixExpression() { + var expr = parseLeftHandSideExpressionAllowCall(), token; + + token = lookahead(); + if (token.type !== Token.Punctuator) { + return expr; + } + + if ((match('++') || match('--')) && !peekLineTerminator()) { + // 11.3.1, 11.3.2 + if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { + throwErrorTolerant({}, Messages.StrictLHSPostfix); + } + if (!isLeftHandSide(expr)) { + throwErrorTolerant({}, Messages.InvalidLHSInAssignment); + } + + expr = { + type: Syntax.UpdateExpression, + operator: lex().value, + argument: expr, + prefix: false + }; + } + + return expr; + } + + // 11.4 Unary Operators + + function parseUnaryExpression() { + var token, expr; + + token = lookahead(); + if (token.type !== Token.Punctuator && token.type !== Token.Keyword) { + return parsePostfixExpression(); + } + + if (match('++') || match('--')) { + token = lex(); + expr = parseUnaryExpression(); + // 11.4.4, 11.4.5 + if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { + throwErrorTolerant({}, Messages.StrictLHSPrefix); + } + + if (!isLeftHandSide(expr)) { + throwErrorTolerant({}, Messages.InvalidLHSInAssignment); + } + + expr = { + type: Syntax.UpdateExpression, + operator: token.value, + argument: expr, + prefix: true + }; + return expr; + } + + if (match('+') || match('-') || match('~') || match('!')) { + expr = { + type: Syntax.UnaryExpression, + operator: lex().value, + argument: parseUnaryExpression(), + prefix: true + }; + return expr; + } + + if (matchKeyword('delete') || matchKeyword('void') || matchKeyword('typeof')) { + expr = { + type: Syntax.UnaryExpression, + operator: lex().value, + argument: parseUnaryExpression(), + prefix: true + }; + if (strict && expr.operator === 'delete' && expr.argument.type === Syntax.Identifier) { + throwErrorTolerant({}, Messages.StrictDelete); + } + return expr; + } + + return parsePostfixExpression(); + } + + // 11.5 Multiplicative Operators + + function parseMultiplicativeExpression() { + var expr = parseUnaryExpression(); + + while (match('*') || match('/') || match('%')) { + expr = { + type: Syntax.BinaryExpression, + operator: lex().value, + left: expr, + right: parseUnaryExpression() + }; + } + + return expr; + } + + // 11.6 Additive Operators + + function parseAdditiveExpression() { + var expr = parseMultiplicativeExpression(); + + while (match('+') || match('-')) { + expr = { + type: Syntax.BinaryExpression, + operator: lex().value, + left: expr, + right: parseMultiplicativeExpression() + }; + } + + return expr; + } + + // 11.7 Bitwise Shift Operators + + function parseShiftExpression() { + var expr = parseAdditiveExpression(); + + while (match('<<') || match('>>') || match('>>>')) { + expr = { + type: Syntax.BinaryExpression, + operator: lex().value, + left: expr, + right: parseAdditiveExpression() + }; + } + + return expr; + } + // 11.8 Relational Operators + + function parseRelationalExpression() { + var expr, previousAllowIn; + + previousAllowIn = state.allowIn; + state.allowIn = true; + + expr = parseShiftExpression(); + + while (match('<') || match('>') || match('<=') || match('>=') || (previousAllowIn && matchKeyword('in')) || matchKeyword('instanceof')) { + expr = { + type: Syntax.BinaryExpression, + operator: lex().value, + left: expr, + right: parseShiftExpression() + }; + } + + state.allowIn = previousAllowIn; + return expr; + } + + // 11.9 Equality Operators + + function parseEqualityExpression() { + var expr = parseRelationalExpression(); + + while (match('==') || match('!=') || match('===') || match('!==')) { + expr = { + type: Syntax.BinaryExpression, + operator: lex().value, + left: expr, + right: parseRelationalExpression() + }; + } + + return expr; + } + + // 11.10 Binary Bitwise Operators + + function parseBitwiseANDExpression() { + var expr = parseEqualityExpression(); + + while (match('&')) { + lex(); + expr = { + type: Syntax.BinaryExpression, + operator: '&', + left: expr, + right: parseEqualityExpression() + }; + } + + return expr; + } + + function parseBitwiseXORExpression() { + var expr = parseBitwiseANDExpression(); + + while (match('^')) { + lex(); + expr = { + type: Syntax.BinaryExpression, + operator: '^', + left: expr, + right: parseBitwiseANDExpression() + }; + } + + return expr; + } + + function parseBitwiseORExpression() { + var expr = parseBitwiseXORExpression(); + + while (match('|')) { + lex(); + expr = { + type: Syntax.BinaryExpression, + operator: '|', + left: expr, + right: parseBitwiseXORExpression() + }; + } + + return expr; + } + + // 11.11 Binary Logical Operators + + function parseLogicalANDExpression() { + var expr = parseBitwiseORExpression(); + + while (match('&&')) { + lex(); + expr = { + type: Syntax.LogicalExpression, + operator: '&&', + left: expr, + right: parseBitwiseORExpression() + }; + } + + return expr; + } + + function parseLogicalORExpression() { + var expr = parseLogicalANDExpression(); + + while (match('||')) { + lex(); + expr = { + type: Syntax.LogicalExpression, + operator: '||', + left: expr, + right: parseLogicalANDExpression() + }; + } + + return expr; + } + + // 11.12 Conditional Operator + + function parseConditionalExpression() { + var expr, previousAllowIn, consequent; + + expr = parseLogicalORExpression(); + + if (match('?')) { + lex(); + previousAllowIn = state.allowIn; + state.allowIn = true; + consequent = parseAssignmentExpression(); + state.allowIn = previousAllowIn; + expect(':'); + + expr = { + type: Syntax.ConditionalExpression, + test: expr, + consequent: consequent, + alternate: parseAssignmentExpression() + }; + } + + return expr; + } + + // 11.13 Assignment Operators + + function parseAssignmentExpression() { + var token, expr; + + token = lookahead(); + expr = parseConditionalExpression(); + + if (matchAssign()) { + // LeftHandSideExpression + if (!isLeftHandSide(expr)) { + throwErrorTolerant({}, Messages.InvalidLHSInAssignment); + } + + // 11.13.1 + if (strict && expr.type === Syntax.Identifier && isRestrictedWord(expr.name)) { + throwErrorTolerant(token, Messages.StrictLHSAssignment); + } + + expr = { + type: Syntax.AssignmentExpression, + operator: lex().value, + left: expr, + right: parseAssignmentExpression() + }; + } + + return expr; + } + + // 11.14 Comma Operator + + function parseExpression() { + var expr = parseAssignmentExpression(); + + if (match(',')) { + expr = { + type: Syntax.SequenceExpression, + expressions: [ expr ] + }; + + while (index < length) { + if (!match(',')) { + break; + } + lex(); + expr.expressions.push(parseAssignmentExpression()); + } + + } + return expr; + } + + // 12.1 Block + + function parseStatementList() { + var list = [], + statement; + + while (index < length) { + if (match('}')) { + break; + } + statement = parseSourceElement(); + if (typeof statement === 'undefined') { + break; + } + list.push(statement); + } + + return list; + } + + function parseBlock() { + var block; + + expect('{'); + + block = parseStatementList(); + + expect('}'); + + return { + type: Syntax.BlockStatement, + body: block + }; + } + + // 12.2 Variable Statement + + function parseVariableIdentifier() { + var token = lex(); + + if (token.type !== Token.Identifier) { + throwUnexpected(token); + } + + return { + type: Syntax.Identifier, + name: token.value + }; + } + + function parseVariableDeclaration(kind) { + var id = parseVariableIdentifier(), + init = null; + + // 12.2.1 + if (strict && isRestrictedWord(id.name)) { + throwErrorTolerant({}, Messages.StrictVarName); + } + + if (kind === 'const') { + expect('='); + init = parseAssignmentExpression(); + } else if (match('=')) { + lex(); + init = parseAssignmentExpression(); + } + + return { + type: Syntax.VariableDeclarator, + id: id, + init: init + }; + } + + function parseVariableDeclarationList(kind) { + var list = []; + + do { + list.push(parseVariableDeclaration(kind)); + if (!match(',')) { + break; + } + lex(); + } while (index < length); + + return list; + } + + function parseVariableStatement() { + var declarations; + + expectKeyword('var'); + + declarations = parseVariableDeclarationList(); + + consumeSemicolon(); + + return { + type: Syntax.VariableDeclaration, + declarations: declarations, + kind: 'var' + }; + } + + // kind may be `const` or `let` + // Both are experimental and not in the specification yet. + // see http://wiki.ecmascript.org/doku.php?id=harmony:const + // and http://wiki.ecmascript.org/doku.php?id=harmony:let + function parseConstLetDeclaration(kind) { + var declarations; + + expectKeyword(kind); + + declarations = parseVariableDeclarationList(kind); + + consumeSemicolon(); + + return { + type: Syntax.VariableDeclaration, + declarations: declarations, + kind: kind + }; + } + + // 12.3 Empty Statement + + function parseEmptyStatement() { + expect(';'); + + return { + type: Syntax.EmptyStatement + }; + } + + // 12.4 Expression Statement + + function parseExpressionStatement() { + var expr = parseExpression(); + + consumeSemicolon(); + + return { + type: Syntax.ExpressionStatement, + expression: expr + }; + } + + // 12.5 If statement + + function parseIfStatement() { + var test, consequent, alternate; + + expectKeyword('if'); + + expect('('); + + test = parseExpression(); + + expect(')'); + + consequent = parseStatement(); + + if (matchKeyword('else')) { + lex(); + alternate = parseStatement(); + } else { + alternate = null; + } + + return { + type: Syntax.IfStatement, + test: test, + consequent: consequent, + alternate: alternate + }; + } + + // 12.6 Iteration Statements + + function parseDoWhileStatement() { + var body, test, oldInIteration; + + expectKeyword('do'); + + oldInIteration = state.inIteration; + state.inIteration = true; + + body = parseStatement(); + + state.inIteration = oldInIteration; + + expectKeyword('while'); + + expect('('); + + test = parseExpression(); + + expect(')'); + + if (match(';')) { + lex(); + } + + return { + type: Syntax.DoWhileStatement, + body: body, + test: test + }; + } + + function parseWhileStatement() { + var test, body, oldInIteration; + + expectKeyword('while'); + + expect('('); + + test = parseExpression(); + + expect(')'); + + oldInIteration = state.inIteration; + state.inIteration = true; + + body = parseStatement(); + + state.inIteration = oldInIteration; + + return { + type: Syntax.WhileStatement, + test: test, + body: body + }; + } + + function parseForVariableDeclaration() { + var token = lex(); + + return { + type: Syntax.VariableDeclaration, + declarations: parseVariableDeclarationList(), + kind: token.value + }; + } + + function parseForStatement() { + var init, test, update, left, right, body, oldInIteration; + + init = test = update = null; + + expectKeyword('for'); + + expect('('); + + if (match(';')) { + lex(); + } else { + if (matchKeyword('var') || matchKeyword('let')) { + state.allowIn = false; + init = parseForVariableDeclaration(); + state.allowIn = true; + + if (init.declarations.length === 1 && matchKeyword('in')) { + lex(); + left = init; + right = parseExpression(); + init = null; + } + } else { + state.allowIn = false; + init = parseExpression(); + state.allowIn = true; + + if (matchKeyword('in')) { + // LeftHandSideExpression + if (!isLeftHandSide(init)) { + throwErrorTolerant({}, Messages.InvalidLHSInForIn); + } + + lex(); + left = init; + right = parseExpression(); + init = null; + } + } + + if (typeof left === 'undefined') { + expect(';'); + } + } + + if (typeof left === 'undefined') { + + if (!match(';')) { + test = parseExpression(); + } + expect(';'); + + if (!match(')')) { + update = parseExpression(); + } + } + + expect(')'); + + oldInIteration = state.inIteration; + state.inIteration = true; + + body = parseStatement(); + + state.inIteration = oldInIteration; + + if (typeof left === 'undefined') { + return { + type: Syntax.ForStatement, + init: init, + test: test, + update: update, + body: body + }; + } + + return { + type: Syntax.ForInStatement, + left: left, + right: right, + body: body, + each: false + }; + } + + // 12.7 The continue statement + + function parseContinueStatement() { + var token, label = null; + + expectKeyword('continue'); + + // Optimize the most common form: 'continue;'. + if (source[index] === ';') { + lex(); + + if (!state.inIteration) { + throwError({}, Messages.IllegalContinue); + } + + return { + type: Syntax.ContinueStatement, + label: null + }; + } + + if (peekLineTerminator()) { + if (!state.inIteration) { + throwError({}, Messages.IllegalContinue); + } + + return { + type: Syntax.ContinueStatement, + label: null + }; + } + + token = lookahead(); + if (token.type === Token.Identifier) { + label = parseVariableIdentifier(); + + if (!Object.prototype.hasOwnProperty.call(state.labelSet, label.name)) { + throwError({}, Messages.UnknownLabel, label.name); + } + } + + consumeSemicolon(); + + if (label === null && !state.inIteration) { + throwError({}, Messages.IllegalContinue); + } + + return { + type: Syntax.ContinueStatement, + label: label + }; + } + + // 12.8 The break statement + + function parseBreakStatement() { + var token, label = null; + + expectKeyword('break'); + + // Optimize the most common form: 'break;'. + if (source[index] === ';') { + lex(); + + if (!(state.inIteration || state.inSwitch)) { + throwError({}, Messages.IllegalBreak); + } + + return { + type: Syntax.BreakStatement, + label: null + }; + } + + if (peekLineTerminator()) { + if (!(state.inIteration || state.inSwitch)) { + throwError({}, Messages.IllegalBreak); + } + + return { + type: Syntax.BreakStatement, + label: null + }; + } + + token = lookahead(); + if (token.type === Token.Identifier) { + label = parseVariableIdentifier(); + + if (!Object.prototype.hasOwnProperty.call(state.labelSet, label.name)) { + throwError({}, Messages.UnknownLabel, label.name); + } + } + + consumeSemicolon(); + + if (label === null && !(state.inIteration || state.inSwitch)) { + throwError({}, Messages.IllegalBreak); + } + + return { + type: Syntax.BreakStatement, + label: label + }; + } + + // 12.9 The return statement + + function parseReturnStatement() { + var token, argument = null; + + expectKeyword('return'); + + if (!state.inFunctionBody) { + throwErrorTolerant({}, Messages.IllegalReturn); + } + + // 'return' followed by a space and an identifier is very common. + if (source[index] === ' ') { + if (isIdentifierStart(source[index + 1])) { + argument = parseExpression(); + consumeSemicolon(); + return { + type: Syntax.ReturnStatement, + argument: argument + }; + } + } + + if (peekLineTerminator()) { + return { + type: Syntax.ReturnStatement, + argument: null + }; + } + + if (!match(';')) { + token = lookahead(); + if (!match('}') && token.type !== Token.EOF) { + argument = parseExpression(); + } + } + + consumeSemicolon(); + + return { + type: Syntax.ReturnStatement, + argument: argument + }; + } + + // 12.10 The with statement + + function parseWithStatement() { + var object, body; + + if (strict) { + throwErrorTolerant({}, Messages.StrictModeWith); + } + + expectKeyword('with'); + + expect('('); + + object = parseExpression(); + + expect(')'); + + body = parseStatement(); + + return { + type: Syntax.WithStatement, + object: object, + body: body + }; + } + + // 12.10 The swith statement + + function parseSwitchCase() { + var test, + consequent = [], + statement; + + if (matchKeyword('default')) { + lex(); + test = null; + } else { + expectKeyword('case'); + test = parseExpression(); + } + expect(':'); + + while (index < length) { + if (match('}') || matchKeyword('default') || matchKeyword('case')) { + break; + } + statement = parseStatement(); + if (typeof statement === 'undefined') { + break; + } + consequent.push(statement); + } + + return { + type: Syntax.SwitchCase, + test: test, + consequent: consequent + }; + } + + function parseSwitchStatement() { + var discriminant, cases, clause, oldInSwitch, defaultFound; + + expectKeyword('switch'); + + expect('('); + + discriminant = parseExpression(); + + expect(')'); + + expect('{'); + + cases = []; + + if (match('}')) { + lex(); + return { + type: Syntax.SwitchStatement, + discriminant: discriminant, + cases: cases + }; + } + + oldInSwitch = state.inSwitch; + state.inSwitch = true; + defaultFound = false; + + while (index < length) { + if (match('}')) { + break; + } + clause = parseSwitchCase(); + if (clause.test === null) { + if (defaultFound) { + throwError({}, Messages.MultipleDefaultsInSwitch); + } + defaultFound = true; + } + cases.push(clause); + } + + state.inSwitch = oldInSwitch; + + expect('}'); + + return { + type: Syntax.SwitchStatement, + discriminant: discriminant, + cases: cases + }; + } + + // 12.13 The throw statement + + function parseThrowStatement() { + var argument; + + expectKeyword('throw'); + + if (peekLineTerminator()) { + throwError({}, Messages.NewlineAfterThrow); + } + + argument = parseExpression(); + + consumeSemicolon(); + + return { + type: Syntax.ThrowStatement, + argument: argument + }; + } + + // 12.14 The try statement + + function parseCatchClause() { + var param; + + expectKeyword('catch'); + + expect('('); + if (match(')')) { + throwUnexpected(lookahead()); + } + + param = parseVariableIdentifier(); + // 12.14.1 + if (strict && isRestrictedWord(param.name)) { + throwErrorTolerant({}, Messages.StrictCatchVariable); + } + + expect(')'); + + return { + type: Syntax.CatchClause, + param: param, + body: parseBlock() + }; + } + + function parseTryStatement() { + var block, handlers = [], finalizer = null; + + expectKeyword('try'); + + block = parseBlock(); + + if (matchKeyword('catch')) { + handlers.push(parseCatchClause()); + } + + if (matchKeyword('finally')) { + lex(); + finalizer = parseBlock(); + } + + if (handlers.length === 0 && !finalizer) { + throwError({}, Messages.NoCatchOrFinally); + } + + return { + type: Syntax.TryStatement, + block: block, + guardedHandlers: [], + handlers: handlers, + finalizer: finalizer + }; + } + + // 12.15 The debugger statement + + function parseDebuggerStatement() { + expectKeyword('debugger'); + + consumeSemicolon(); + + return { + type: Syntax.DebuggerStatement + }; + } + + // 12 Statements + + function parseStatement() { + var token = lookahead(), + expr, + labeledBody; + + if (token.type === Token.EOF) { + throwUnexpected(token); + } + + if (token.type === Token.Punctuator) { + switch (token.value) { + case ';': + return parseEmptyStatement(); + case '{': + return parseBlock(); + case '(': + return parseExpressionStatement(); + default: + break; + } + } + + if (token.type === Token.Keyword) { + switch (token.value) { + case 'break': + return parseBreakStatement(); + case 'continue': + return parseContinueStatement(); + case 'debugger': + return parseDebuggerStatement(); + case 'do': + return parseDoWhileStatement(); + case 'for': + return parseForStatement(); + case 'function': + return parseFunctionDeclaration(); + case 'if': + return parseIfStatement(); + case 'return': + return parseReturnStatement(); + case 'switch': + return parseSwitchStatement(); + case 'throw': + return parseThrowStatement(); + case 'try': + return parseTryStatement(); + case 'var': + return parseVariableStatement(); + case 'while': + return parseWhileStatement(); + case 'with': + return parseWithStatement(); + default: + break; + } + } + + expr = parseExpression(); + + // 12.12 Labelled Statements + if ((expr.type === Syntax.Identifier) && match(':')) { + lex(); + + if (Object.prototype.hasOwnProperty.call(state.labelSet, expr.name)) { + throwError({}, Messages.Redeclaration, 'Label', expr.name); + } + + state.labelSet[expr.name] = true; + labeledBody = parseStatement(); + delete state.labelSet[expr.name]; + + return { + type: Syntax.LabeledStatement, + label: expr, + body: labeledBody + }; + } + + consumeSemicolon(); + + return { + type: Syntax.ExpressionStatement, + expression: expr + }; + } + + // 13 Function Definition + + function parseFunctionSourceElements() { + var sourceElement, sourceElements = [], token, directive, firstRestricted, + oldLabelSet, oldInIteration, oldInSwitch, oldInFunctionBody; + + expect('{'); + + while (index < length) { + token = lookahead(); + if (token.type !== Token.StringLiteral) { + break; + } + + sourceElement = parseSourceElement(); + sourceElements.push(sourceElement); + if (sourceElement.expression.type !== Syntax.Literal) { + // this is not directive + break; + } + directive = sliceSource(token.range[0] + 1, token.range[1] - 1); + if (directive === 'use strict') { + strict = true; + if (firstRestricted) { + throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral); + } + } else { + if (!firstRestricted && token.octal) { + firstRestricted = token; + } + } + } + + oldLabelSet = state.labelSet; + oldInIteration = state.inIteration; + oldInSwitch = state.inSwitch; + oldInFunctionBody = state.inFunctionBody; + + state.labelSet = {}; + state.inIteration = false; + state.inSwitch = false; + state.inFunctionBody = true; + + while (index < length) { + if (match('}')) { + break; + } + sourceElement = parseSourceElement(); + if (typeof sourceElement === 'undefined') { + break; + } + sourceElements.push(sourceElement); + } + + expect('}'); + + state.labelSet = oldLabelSet; + state.inIteration = oldInIteration; + state.inSwitch = oldInSwitch; + state.inFunctionBody = oldInFunctionBody; + + return { + type: Syntax.BlockStatement, + body: sourceElements + }; + } + + function parseFunctionDeclaration() { + var id, param, params = [], body, token, stricted, firstRestricted, message, previousStrict, paramSet; + + expectKeyword('function'); + token = lookahead(); + id = parseVariableIdentifier(); + if (strict) { + if (isRestrictedWord(token.value)) { + throwErrorTolerant(token, Messages.StrictFunctionName); + } + } else { + if (isRestrictedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictFunctionName; + } else if (isStrictModeReservedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictReservedWord; + } + } + + expect('('); + + if (!match(')')) { + paramSet = {}; + while (index < length) { + token = lookahead(); + param = parseVariableIdentifier(); + if (strict) { + if (isRestrictedWord(token.value)) { + stricted = token; + message = Messages.StrictParamName; + } + if (Object.prototype.hasOwnProperty.call(paramSet, token.value)) { + stricted = token; + message = Messages.StrictParamDupe; + } + } else if (!firstRestricted) { + if (isRestrictedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictParamName; + } else if (isStrictModeReservedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictReservedWord; + } else if (Object.prototype.hasOwnProperty.call(paramSet, token.value)) { + firstRestricted = token; + message = Messages.StrictParamDupe; + } + } + params.push(param); + paramSet[param.name] = true; + if (match(')')) { + break; + } + expect(','); + } + } + + expect(')'); + + previousStrict = strict; + body = parseFunctionSourceElements(); + if (strict && firstRestricted) { + throwError(firstRestricted, message); + } + if (strict && stricted) { + throwErrorTolerant(stricted, message); + } + strict = previousStrict; + + return { + type: Syntax.FunctionDeclaration, + id: id, + params: params, + defaults: [], + body: body, + rest: null, + generator: false, + expression: false + }; + } + + function parseFunctionExpression() { + var token, id = null, stricted, firstRestricted, message, param, params = [], body, previousStrict, paramSet; + + expectKeyword('function'); + + if (!match('(')) { + token = lookahead(); + id = parseVariableIdentifier(); + if (strict) { + if (isRestrictedWord(token.value)) { + throwErrorTolerant(token, Messages.StrictFunctionName); + } + } else { + if (isRestrictedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictFunctionName; + } else if (isStrictModeReservedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictReservedWord; + } + } + } + + expect('('); + + if (!match(')')) { + paramSet = {}; + while (index < length) { + token = lookahead(); + param = parseVariableIdentifier(); + if (strict) { + if (isRestrictedWord(token.value)) { + stricted = token; + message = Messages.StrictParamName; + } + if (Object.prototype.hasOwnProperty.call(paramSet, token.value)) { + stricted = token; + message = Messages.StrictParamDupe; + } + } else if (!firstRestricted) { + if (isRestrictedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictParamName; + } else if (isStrictModeReservedWord(token.value)) { + firstRestricted = token; + message = Messages.StrictReservedWord; + } else if (Object.prototype.hasOwnProperty.call(paramSet, token.value)) { + firstRestricted = token; + message = Messages.StrictParamDupe; + } + } + params.push(param); + paramSet[param.name] = true; + if (match(')')) { + break; + } + expect(','); + } + } + + expect(')'); + + previousStrict = strict; + body = parseFunctionSourceElements(); + if (strict && firstRestricted) { + throwError(firstRestricted, message); + } + if (strict && stricted) { + throwErrorTolerant(stricted, message); + } + strict = previousStrict; + + return { + type: Syntax.FunctionExpression, + id: id, + params: params, + defaults: [], + body: body, + rest: null, + generator: false, + expression: false + }; + } + + // 14 Program + + function parseSourceElement() { + var token = lookahead(); + + if (token.type === Token.Keyword) { + switch (token.value) { + case 'const': + case 'let': + return parseConstLetDeclaration(token.value); + case 'function': + return parseFunctionDeclaration(); + default: + return parseStatement(); + } + } + + if (token.type !== Token.EOF) { + return parseStatement(); + } + } + + function parseSourceElements() { + var sourceElement, sourceElements = [], token, directive, firstRestricted; + + while (index < length) { + token = lookahead(); + if (token.type !== Token.StringLiteral) { + break; + } + + sourceElement = parseSourceElement(); + sourceElements.push(sourceElement); + if (sourceElement.expression.type !== Syntax.Literal) { + // this is not directive + break; + } + directive = sliceSource(token.range[0] + 1, token.range[1] - 1); + if (directive === 'use strict') { + strict = true; + if (firstRestricted) { + throwErrorTolerant(firstRestricted, Messages.StrictOctalLiteral); + } + } else { + if (!firstRestricted && token.octal) { + firstRestricted = token; + } + } + } + + while (index < length) { + sourceElement = parseSourceElement(); + if (typeof sourceElement === 'undefined') { + break; + } + sourceElements.push(sourceElement); + } + return sourceElements; + } + + function parseProgram() { + var program; + strict = false; + program = { + type: Syntax.Program, + body: parseSourceElements() + }; + return program; + } + + // The following functions are needed only when the option to preserve + // the comments is active. + + function addComment(type, value, start, end, loc) { + assert(typeof start === 'number', 'Comment must have valid position'); + + // Because the way the actual token is scanned, often the comments + // (if any) are skipped twice during the lexical analysis. + // Thus, we need to skip adding a comment if the comment array already + // handled it. + if (extra.comments.length > 0) { + if (extra.comments[extra.comments.length - 1].range[1] > start) { + return; + } + } + + extra.comments.push({ + type: type, + value: value, + range: [start, end], + loc: loc + }); + } + + function scanComment() { + var comment, ch, loc, start, blockComment, lineComment; + + comment = ''; + blockComment = false; + lineComment = false; + + while (index < length) { + ch = source[index]; + + if (lineComment) { + ch = source[index++]; + if (isLineTerminator(ch)) { + loc.end = { + line: lineNumber, + column: index - lineStart - 1 + }; + lineComment = false; + addComment('Line', comment, start, index - 1, loc); + if (ch === '\r' && source[index] === '\n') { + ++index; + } + ++lineNumber; + lineStart = index; + comment = ''; + } else if (index >= length) { + lineComment = false; + comment += ch; + loc.end = { + line: lineNumber, + column: length - lineStart + }; + addComment('Line', comment, start, length, loc); + } else { + comment += ch; + } + } else if (blockComment) { + if (isLineTerminator(ch)) { + if (ch === '\r' && source[index + 1] === '\n') { + ++index; + comment += '\r\n'; + } else { + comment += ch; + } + ++lineNumber; + ++index; + lineStart = index; + if (index >= length) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } else { + ch = source[index++]; + if (index >= length) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + comment += ch; + if (ch === '*') { + ch = source[index]; + if (ch === '/') { + comment = comment.substr(0, comment.length - 1); + blockComment = false; + ++index; + loc.end = { + line: lineNumber, + column: index - lineStart + }; + addComment('Block', comment, start, index, loc); + comment = ''; + } + } + } + } else if (ch === '/') { + ch = source[index + 1]; + if (ch === '/') { + loc = { + start: { + line: lineNumber, + column: index - lineStart + } + }; + start = index; + index += 2; + lineComment = true; + if (index >= length) { + loc.end = { + line: lineNumber, + column: index - lineStart + }; + lineComment = false; + addComment('Line', comment, start, index, loc); + } + } else if (ch === '*') { + start = index; + index += 2; + blockComment = true; + loc = { + start: { + line: lineNumber, + column: index - lineStart - 2 + } + }; + if (index >= length) { + throwError({}, Messages.UnexpectedToken, 'ILLEGAL'); + } + } else { + break; + } + } else if (isWhiteSpace(ch)) { + ++index; + } else if (isLineTerminator(ch)) { + ++index; + if (ch === '\r' && source[index] === '\n') { + ++index; + } + ++lineNumber; + lineStart = index; + } else { + break; + } + } + } + + function filterCommentLocation() { + var i, entry, comment, comments = []; + + for (i = 0; i < extra.comments.length; ++i) { + entry = extra.comments[i]; + comment = { + type: entry.type, + value: entry.value + }; + if (extra.range) { + comment.range = entry.range; + } + if (extra.loc) { + comment.loc = entry.loc; + } + comments.push(comment); + } + + extra.comments = comments; + } + + function collectToken() { + var start, loc, token, range, value; + + skipComment(); + start = index; + loc = { + start: { + line: lineNumber, + column: index - lineStart + } + }; + + token = extra.advance(); + loc.end = { + line: lineNumber, + column: index - lineStart + }; + + if (token.type !== Token.EOF) { + range = [token.range[0], token.range[1]]; + value = sliceSource(token.range[0], token.range[1]); + extra.tokens.push({ + type: TokenName[token.type], + value: value, + range: range, + loc: loc + }); + } + + return token; + } + + function collectRegex() { + var pos, loc, regex, token; + + skipComment(); + + pos = index; + loc = { + start: { + line: lineNumber, + column: index - lineStart + } + }; + + regex = extra.scanRegExp(); + loc.end = { + line: lineNumber, + column: index - lineStart + }; + + // Pop the previous token, which is likely '/' or '/=' + if (extra.tokens.length > 0) { + token = extra.tokens[extra.tokens.length - 1]; + if (token.range[0] === pos && token.type === 'Punctuator') { + if (token.value === '/' || token.value === '/=') { + extra.tokens.pop(); + } + } + } + + extra.tokens.push({ + type: 'RegularExpression', + value: regex.literal, + range: [pos, index], + loc: loc + }); + + return regex; + } + + function filterTokenLocation() { + var i, entry, token, tokens = []; + + for (i = 0; i < extra.tokens.length; ++i) { + entry = extra.tokens[i]; + token = { + type: entry.type, + value: entry.value + }; + if (extra.range) { + token.range = entry.range; + } + if (extra.loc) { + token.loc = entry.loc; + } + tokens.push(token); + } + + extra.tokens = tokens; + } + + function createLiteral(token) { + return { + type: Syntax.Literal, + value: token.value + }; + } + + function createRawLiteral(token) { + return { + type: Syntax.Literal, + value: token.value, + raw: sliceSource(token.range[0], token.range[1]) + }; + } + + function createLocationMarker() { + var marker = {}; + + marker.range = [index, index]; + marker.loc = { + start: { + line: lineNumber, + column: index - lineStart + }, + end: { + line: lineNumber, + column: index - lineStart + } + }; + + marker.end = function () { + this.range[1] = index; + this.loc.end.line = lineNumber; + this.loc.end.column = index - lineStart; + }; + + marker.applyGroup = function (node) { + if (extra.range) { + node.groupRange = [this.range[0], this.range[1]]; + } + if (extra.loc) { + node.groupLoc = { + start: { + line: this.loc.start.line, + column: this.loc.start.column + }, + end: { + line: this.loc.end.line, + column: this.loc.end.column + } + }; + } + }; + + marker.apply = function (node) { + if (extra.range) { + node.range = [this.range[0], this.range[1]]; + } + if (extra.loc) { + node.loc = { + start: { + line: this.loc.start.line, + column: this.loc.start.column + }, + end: { + line: this.loc.end.line, + column: this.loc.end.column + } + }; + } + }; + + return marker; + } + + function trackGroupExpression() { + var marker, expr; + + skipComment(); + marker = createLocationMarker(); + expect('('); + + expr = parseExpression(); + + expect(')'); + + marker.end(); + marker.applyGroup(expr); + + return expr; + } + + function trackLeftHandSideExpression() { + var marker, expr; + + skipComment(); + marker = createLocationMarker(); + + expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression(); + + while (match('.') || match('[')) { + if (match('[')) { + expr = { + type: Syntax.MemberExpression, + computed: true, + object: expr, + property: parseComputedMember() + }; + marker.end(); + marker.apply(expr); + } else { + expr = { + type: Syntax.MemberExpression, + computed: false, + object: expr, + property: parseNonComputedMember() + }; + marker.end(); + marker.apply(expr); + } + } + + return expr; + } + + function trackLeftHandSideExpressionAllowCall() { + var marker, expr; + + skipComment(); + marker = createLocationMarker(); + + expr = matchKeyword('new') ? parseNewExpression() : parsePrimaryExpression(); + + while (match('.') || match('[') || match('(')) { + if (match('(')) { + expr = { + type: Syntax.CallExpression, + callee: expr, + 'arguments': parseArguments() + }; + marker.end(); + marker.apply(expr); + } else if (match('[')) { + expr = { + type: Syntax.MemberExpression, + computed: true, + object: expr, + property: parseComputedMember() + }; + marker.end(); + marker.apply(expr); + } else { + expr = { + type: Syntax.MemberExpression, + computed: false, + object: expr, + property: parseNonComputedMember() + }; + marker.end(); + marker.apply(expr); + } + } + + return expr; + } + + function filterGroup(node) { + var n, i, entry; + + n = (Object.prototype.toString.apply(node) === '[object Array]') ? [] : {}; + for (i in node) { + if (node.hasOwnProperty(i) && i !== 'groupRange' && i !== 'groupLoc') { + entry = node[i]; + if (entry === null || typeof entry !== 'object' || entry instanceof RegExp) { + n[i] = entry; + } else { + n[i] = filterGroup(entry); + } + } + } + return n; + } + + function wrapTrackingFunction(range, loc) { + + return function (parseFunction) { + + function isBinary(node) { + return node.type === Syntax.LogicalExpression || + node.type === Syntax.BinaryExpression; + } + + function visit(node) { + var start, end; + + if (isBinary(node.left)) { + visit(node.left); + } + if (isBinary(node.right)) { + visit(node.right); + } + + if (range) { + if (node.left.groupRange || node.right.groupRange) { + start = node.left.groupRange ? node.left.groupRange[0] : node.left.range[0]; + end = node.right.groupRange ? node.right.groupRange[1] : node.right.range[1]; + node.range = [start, end]; + } else if (typeof node.range === 'undefined') { + start = node.left.range[0]; + end = node.right.range[1]; + node.range = [start, end]; + } + } + if (loc) { + if (node.left.groupLoc || node.right.groupLoc) { + start = node.left.groupLoc ? node.left.groupLoc.start : node.left.loc.start; + end = node.right.groupLoc ? node.right.groupLoc.end : node.right.loc.end; + node.loc = { + start: start, + end: end + }; + } else if (typeof node.loc === 'undefined') { + node.loc = { + start: node.left.loc.start, + end: node.right.loc.end + }; + } + } + } + + return function () { + var marker, node; + + skipComment(); + + marker = createLocationMarker(); + node = parseFunction.apply(null, arguments); + marker.end(); + + if (range && typeof node.range === 'undefined') { + marker.apply(node); + } + + if (loc && typeof node.loc === 'undefined') { + marker.apply(node); + } + + if (isBinary(node)) { + visit(node); + } + + return node; + }; + }; + } + + function patch() { + + var wrapTracking; + + if (extra.comments) { + extra.skipComment = skipComment; + skipComment = scanComment; + } + + if (extra.raw) { + extra.createLiteral = createLiteral; + createLiteral = createRawLiteral; + } + + if (extra.range || extra.loc) { + + extra.parseGroupExpression = parseGroupExpression; + extra.parseLeftHandSideExpression = parseLeftHandSideExpression; + extra.parseLeftHandSideExpressionAllowCall = parseLeftHandSideExpressionAllowCall; + parseGroupExpression = trackGroupExpression; + parseLeftHandSideExpression = trackLeftHandSideExpression; + parseLeftHandSideExpressionAllowCall = trackLeftHandSideExpressionAllowCall; + + wrapTracking = wrapTrackingFunction(extra.range, extra.loc); + + extra.parseAdditiveExpression = parseAdditiveExpression; + extra.parseAssignmentExpression = parseAssignmentExpression; + extra.parseBitwiseANDExpression = parseBitwiseANDExpression; + extra.parseBitwiseORExpression = parseBitwiseORExpression; + extra.parseBitwiseXORExpression = parseBitwiseXORExpression; + extra.parseBlock = parseBlock; + extra.parseFunctionSourceElements = parseFunctionSourceElements; + extra.parseCatchClause = parseCatchClause; + extra.parseComputedMember = parseComputedMember; + extra.parseConditionalExpression = parseConditionalExpression; + extra.parseConstLetDeclaration = parseConstLetDeclaration; + extra.parseEqualityExpression = parseEqualityExpression; + extra.parseExpression = parseExpression; + extra.parseForVariableDeclaration = parseForVariableDeclaration; + extra.parseFunctionDeclaration = parseFunctionDeclaration; + extra.parseFunctionExpression = parseFunctionExpression; + extra.parseLogicalANDExpression = parseLogicalANDExpression; + extra.parseLogicalORExpression = parseLogicalORExpression; + extra.parseMultiplicativeExpression = parseMultiplicativeExpression; + extra.parseNewExpression = parseNewExpression; + extra.parseNonComputedProperty = parseNonComputedProperty; + extra.parseObjectProperty = parseObjectProperty; + extra.parseObjectPropertyKey = parseObjectPropertyKey; + extra.parsePostfixExpression = parsePostfixExpression; + extra.parsePrimaryExpression = parsePrimaryExpression; + extra.parseProgram = parseProgram; + extra.parsePropertyFunction = parsePropertyFunction; + extra.parseRelationalExpression = parseRelationalExpression; + extra.parseStatement = parseStatement; + extra.parseShiftExpression = parseShiftExpression; + extra.parseSwitchCase = parseSwitchCase; + extra.parseUnaryExpression = parseUnaryExpression; + extra.parseVariableDeclaration = parseVariableDeclaration; + extra.parseVariableIdentifier = parseVariableIdentifier; + + parseAdditiveExpression = wrapTracking(extra.parseAdditiveExpression); + parseAssignmentExpression = wrapTracking(extra.parseAssignmentExpression); + parseBitwiseANDExpression = wrapTracking(extra.parseBitwiseANDExpression); + parseBitwiseORExpression = wrapTracking(extra.parseBitwiseORExpression); + parseBitwiseXORExpression = wrapTracking(extra.parseBitwiseXORExpression); + parseBlock = wrapTracking(extra.parseBlock); + parseFunctionSourceElements = wrapTracking(extra.parseFunctionSourceElements); + parseCatchClause = wrapTracking(extra.parseCatchClause); + parseComputedMember = wrapTracking(extra.parseComputedMember); + parseConditionalExpression = wrapTracking(extra.parseConditionalExpression); + parseConstLetDeclaration = wrapTracking(extra.parseConstLetDeclaration); + parseEqualityExpression = wrapTracking(extra.parseEqualityExpression); + parseExpression = wrapTracking(extra.parseExpression); + parseForVariableDeclaration = wrapTracking(extra.parseForVariableDeclaration); + parseFunctionDeclaration = wrapTracking(extra.parseFunctionDeclaration); + parseFunctionExpression = wrapTracking(extra.parseFunctionExpression); + parseLeftHandSideExpression = wrapTracking(parseLeftHandSideExpression); + parseLogicalANDExpression = wrapTracking(extra.parseLogicalANDExpression); + parseLogicalORExpression = wrapTracking(extra.parseLogicalORExpression); + parseMultiplicativeExpression = wrapTracking(extra.parseMultiplicativeExpression); + parseNewExpression = wrapTracking(extra.parseNewExpression); + parseNonComputedProperty = wrapTracking(extra.parseNonComputedProperty); + parseObjectProperty = wrapTracking(extra.parseObjectProperty); + parseObjectPropertyKey = wrapTracking(extra.parseObjectPropertyKey); + parsePostfixExpression = wrapTracking(extra.parsePostfixExpression); + parsePrimaryExpression = wrapTracking(extra.parsePrimaryExpression); + parseProgram = wrapTracking(extra.parseProgram); + parsePropertyFunction = wrapTracking(extra.parsePropertyFunction); + parseRelationalExpression = wrapTracking(extra.parseRelationalExpression); + parseStatement = wrapTracking(extra.parseStatement); + parseShiftExpression = wrapTracking(extra.parseShiftExpression); + parseSwitchCase = wrapTracking(extra.parseSwitchCase); + parseUnaryExpression = wrapTracking(extra.parseUnaryExpression); + parseVariableDeclaration = wrapTracking(extra.parseVariableDeclaration); + parseVariableIdentifier = wrapTracking(extra.parseVariableIdentifier); + } + + if (typeof extra.tokens !== 'undefined') { + extra.advance = advance; + extra.scanRegExp = scanRegExp; + + advance = collectToken; + scanRegExp = collectRegex; + } + } + + function unpatch() { + if (typeof extra.skipComment === 'function') { + skipComment = extra.skipComment; + } + + if (extra.raw) { + createLiteral = extra.createLiteral; + } + + if (extra.range || extra.loc) { + parseAdditiveExpression = extra.parseAdditiveExpression; + parseAssignmentExpression = extra.parseAssignmentExpression; + parseBitwiseANDExpression = extra.parseBitwiseANDExpression; + parseBitwiseORExpression = extra.parseBitwiseORExpression; + parseBitwiseXORExpression = extra.parseBitwiseXORExpression; + parseBlock = extra.parseBlock; + parseFunctionSourceElements = extra.parseFunctionSourceElements; + parseCatchClause = extra.parseCatchClause; + parseComputedMember = extra.parseComputedMember; + parseConditionalExpression = extra.parseConditionalExpression; + parseConstLetDeclaration = extra.parseConstLetDeclaration; + parseEqualityExpression = extra.parseEqualityExpression; + parseExpression = extra.parseExpression; + parseForVariableDeclaration = extra.parseForVariableDeclaration; + parseFunctionDeclaration = extra.parseFunctionDeclaration; + parseFunctionExpression = extra.parseFunctionExpression; + parseGroupExpression = extra.parseGroupExpression; + parseLeftHandSideExpression = extra.parseLeftHandSideExpression; + parseLeftHandSideExpressionAllowCall = extra.parseLeftHandSideExpressionAllowCall; + parseLogicalANDExpression = extra.parseLogicalANDExpression; + parseLogicalORExpression = extra.parseLogicalORExpression; + parseMultiplicativeExpression = extra.parseMultiplicativeExpression; + parseNewExpression = extra.parseNewExpression; + parseNonComputedProperty = extra.parseNonComputedProperty; + parseObjectProperty = extra.parseObjectProperty; + parseObjectPropertyKey = extra.parseObjectPropertyKey; + parsePrimaryExpression = extra.parsePrimaryExpression; + parsePostfixExpression = extra.parsePostfixExpression; + parseProgram = extra.parseProgram; + parsePropertyFunction = extra.parsePropertyFunction; + parseRelationalExpression = extra.parseRelationalExpression; + parseStatement = extra.parseStatement; + parseShiftExpression = extra.parseShiftExpression; + parseSwitchCase = extra.parseSwitchCase; + parseUnaryExpression = extra.parseUnaryExpression; + parseVariableDeclaration = extra.parseVariableDeclaration; + parseVariableIdentifier = extra.parseVariableIdentifier; + } + + if (typeof extra.scanRegExp === 'function') { + advance = extra.advance; + scanRegExp = extra.scanRegExp; + } + } + + function stringToArray(str) { + var length = str.length, + result = [], + i; + for (i = 0; i < length; ++i) { + result[i] = str.charAt(i); + } + return result; + } + + function parse(code, options) { + var program, toString; + + toString = String; + if (typeof code !== 'string' && !(code instanceof String)) { + code = toString(code); + } + + source = code; + index = 0; + lineNumber = (source.length > 0) ? 1 : 0; + lineStart = 0; + length = source.length; + buffer = null; + state = { + allowIn: true, + labelSet: {}, + inFunctionBody: false, + inIteration: false, + inSwitch: false + }; + + extra = {}; + if (typeof options !== 'undefined') { + extra.range = (typeof options.range === 'boolean') && options.range; + extra.loc = (typeof options.loc === 'boolean') && options.loc; + extra.raw = (typeof options.raw === 'boolean') && options.raw; + if (typeof options.tokens === 'boolean' && options.tokens) { + extra.tokens = []; + } + if (typeof options.comment === 'boolean' && options.comment) { + extra.comments = []; + } + if (typeof options.tolerant === 'boolean' && options.tolerant) { + extra.errors = []; + } + } + + if (length > 0) { + if (typeof source[0] === 'undefined') { + // Try first to convert to a string. This is good as fast path + // for old IE which understands string indexing for string + // literals only and not for string object. + if (code instanceof String) { + source = code.valueOf(); + } + + // Force accessing the characters via an array. + if (typeof source[0] === 'undefined') { + source = stringToArray(code); + } + } + } + + patch(); + try { + program = parseProgram(); + if (typeof extra.comments !== 'undefined') { + filterCommentLocation(); + program.comments = extra.comments; + } + if (typeof extra.tokens !== 'undefined') { + filterTokenLocation(); + program.tokens = extra.tokens; + } + if (typeof extra.errors !== 'undefined') { + program.errors = extra.errors; + } + if (extra.range || extra.loc) { + program.body = filterGroup(program.body); + } + } catch (e) { + throw e; + } finally { + unpatch(); + extra = {}; + } + + return program; + } + + // Sync with package.json. + exports.version = '1.0.4'; + + exports.parse = parse; + + // Deep copy. + exports.Syntax = (function () { + var name, types = {}; + + if (typeof Object.create === 'function') { + types = Object.create(null); + } + + for (name in Syntax) { + if (Syntax.hasOwnProperty(name)) { + types[name] = Syntax[name]; + } + } + + if (typeof Object.freeze === 'function') { + Object.freeze(types); + } + + return types; + }()); + +})); +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/pitfall/pdfkit/node_modules/esprima/package.json b/pitfall/pdfkit/node_modules/esprima/package.json new file mode 100644 index 00000000..3ee8b4a6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/esprima/package.json @@ -0,0 +1,107 @@ +{ + "_args": [ + [ + { + "raw": "esprima@~1.0.2", + "scope": null, + "escapedName": "esprima", + "name": "esprima", + "rawSpec": "~1.0.2", + "spec": ">=1.0.2 <1.1.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/escodegen" + ] + ], + "_from": "esprima@>=1.0.2 <1.1.0", + "_id": "esprima@1.0.4", + "_inCache": true, + "_location": "/esprima", + "_npmUser": { + "name": "ariya", + "email": "ariya.hidayat@gmail.com" + }, + "_npmVersion": "1.1.61", + "_phantomChildren": {}, + "_requested": { + "raw": "esprima@~1.0.2", + "scope": null, + "escapedName": "esprima", + "name": "esprima", + "rawSpec": "~1.0.2", + "spec": ">=1.0.2 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "/detective/escodegen", + "/escodegen", + "/esrefactor", + "/falafel" + ], + "_resolved": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz", + "_shasum": "9f557e08fc3b4d26ece9dd34f8fbf476b62585ad", + "_shrinkwrap": null, + "_spec": "esprima@~1.0.2", + "_where": "/Users/MB/git/pdfkit/node_modules/escodegen", + "bin": { + "esparse": "./bin/esparse.js", + "esvalidate": "./bin/esvalidate.js" + }, + "bugs": { + "url": "https://github.com/ariya/esprima/issues" + }, + "dependencies": {}, + "description": "ECMAScript parsing infrastructure for multipurpose analysis", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "9f557e08fc3b4d26ece9dd34f8fbf476b62585ad", + "tarball": "https://registry.npmjs.org/esprima/-/esprima-1.0.4.tgz" + }, + "engines": { + "node": ">=0.4.0" + }, + "files": [ + "bin", + "test/run.js", + "test/runner.js", + "test/test.js", + "test/compat.js", + "test/reflect.js", + "esprima.js" + ], + "homepage": "http://esprima.org", + "keywords": [ + "ast", + "ecmascript", + "javascript", + "parser", + "syntax" + ], + "licenses": [ + { + "type": "BSD", + "url": "http://github.com/ariya/esprima/raw/master/LICENSE.BSD" + } + ], + "main": "esprima.js", + "maintainers": [ + { + "name": "ariya", + "email": "ariya.hidayat@gmail.com" + } + ], + "name": "esprima", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/ariya/esprima.git" + }, + "scripts": { + "benchmark": "node test/benchmarks.js", + "benchmark-quick": "node test/benchmarks.js quick", + "test": "node test/run.js" + }, + "version": "1.0.4" +} diff --git a/pitfall/pdfkit/node_modules/esprima/test/compat.js b/pitfall/pdfkit/node_modules/esprima/test/compat.js new file mode 100644 index 00000000..ee3a6295 --- /dev/null +++ b/pitfall/pdfkit/node_modules/esprima/test/compat.js @@ -0,0 +1,239 @@ +/* + Copyright (C) 2012 Joost-Wim Boekesteijn + Copyright (C) 2011 Ariya Hidayat + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*jslint node: true */ +/*global document: true, window:true, esprima: true, testReflect: true */ + +var runTests; + +function getContext(esprima, reportCase, reportFailure) { + 'use strict'; + + var Reflect, Pattern; + + // Maps Mozilla Reflect object to our Esprima parser. + Reflect = { + parse: function (code) { + var result; + + reportCase(code); + + try { + result = esprima.parse(code); + } catch (error) { + result = error; + } + + return result; + } + }; + + // This is used by Reflect test suite to match a syntax tree. + Pattern = function (obj) { + var pattern; + + // Poor man's deep object cloning. + pattern = JSON.parse(JSON.stringify(obj)); + + // Special handling for regular expression literal since we need to + // convert it to a string literal, otherwise it will be decoded + // as object "{}" and the regular expression would be lost. + if (obj.type && obj.type === 'Literal') { + if (obj.value instanceof RegExp) { + pattern = { + type: obj.type, + value: obj.value.toString() + }; + } + } + + // Special handling for branch statement because SpiderMonkey + // prefers to put the 'alternate' property before 'consequent'. + if (obj.type && obj.type === 'IfStatement') { + pattern = { + type: pattern.type, + test: pattern.test, + consequent: pattern.consequent, + alternate: pattern.alternate + }; + } + + // Special handling for do while statement because SpiderMonkey + // prefers to put the 'test' property before 'body'. + if (obj.type && obj.type === 'DoWhileStatement') { + pattern = { + type: pattern.type, + body: pattern.body, + test: pattern.test + }; + } + + function adjustRegexLiteralAndRaw(key, value) { + if (key === 'value' && value instanceof RegExp) { + value = value.toString(); + } else if (key === 'raw' && typeof value === "string") { + // Ignore Esprima-specific 'raw' property. + return undefined; + } + return value; + } + + if (obj.type && (obj.type === 'Program')) { + pattern.assert = function (tree) { + var actual, expected; + actual = JSON.stringify(tree, adjustRegexLiteralAndRaw, 4); + expected = JSON.stringify(obj, null, 4); + + if (expected !== actual) { + reportFailure(expected, actual); + } + }; + } + + return pattern; + }; + + return { + Reflect: Reflect, + Pattern: Pattern + }; +} + +if (typeof window !== 'undefined') { + // Run all tests in a browser environment. + runTests = function () { + 'use strict'; + + var total = 0, + failures = 0; + + function setText(el, str) { + if (typeof el.innerText === 'string') { + el.innerText = str; + } else { + el.textContent = str; + } + } + + function reportCase(code) { + var report, e; + report = document.getElementById('report'); + e = document.createElement('pre'); + e.setAttribute('class', 'code'); + setText(e, code); + report.appendChild(e); + total += 1; + } + + function reportFailure(expected, actual) { + var report, e; + + failures += 1; + + report = document.getElementById('report'); + + e = document.createElement('p'); + setText(e, 'Expected'); + report.appendChild(e); + + e = document.createElement('pre'); + e.setAttribute('class', 'expected'); + setText(e, expected); + report.appendChild(e); + + e = document.createElement('p'); + setText(e, 'Actual'); + report.appendChild(e); + + e = document.createElement('pre'); + e.setAttribute('class', 'actual'); + setText(e, actual); + report.appendChild(e); + } + + setText(document.getElementById('version'), esprima.version); + + window.setTimeout(function () { + var tick, context = getContext(esprima, reportCase, reportFailure); + + tick = new Date(); + testReflect(context.Reflect, context.Pattern); + tick = (new Date()) - tick; + + if (failures > 0) { + setText(document.getElementById('status'), total + ' tests. ' + + 'Failures: ' + failures + '. ' + tick + ' ms'); + } else { + setText(document.getElementById('status'), total + ' tests. ' + + 'No failure. ' + tick + ' ms'); + } + }, 513); + }; +} else { + (function (global) { + 'use strict'; + var esprima = require('../esprima'), + tick, + total = 0, + failures = [], + header, + current, + context; + + function reportCase(code) { + total += 1; + current = code; + } + + function reportFailure(expected, actual) { + failures.push({ + source: current, + expected: expected.toString(), + actual: actual.toString() + }); + } + + context = getContext(esprima, reportCase, reportFailure); + + tick = new Date(); + require('./reflect').testReflect(context.Reflect, context.Pattern); + tick = (new Date()) - tick; + + header = total + ' tests. ' + failures.length + ' failures. ' + + tick + ' ms'; + if (failures.length) { + console.error(header); + failures.forEach(function (failure) { + console.error(failure.source + ': Expected\n ' + + failure.expected.split('\n').join('\n ') + + '\nto match\n ' + failure.actual); + }); + } else { + console.log(header); + } + process.exit(failures.length === 0 ? 0 : 1); + }(this)); +} +/* vim: set sw=4 ts=4 et tw=80 : */ diff --git a/pitfall/pdfkit/node_modules/esprima/test/reflect.js b/pitfall/pdfkit/node_modules/esprima/test/reflect.js new file mode 100644 index 00000000..dba1ba8f --- /dev/null +++ b/pitfall/pdfkit/node_modules/esprima/test/reflect.js @@ -0,0 +1,422 @@ +// This is modified from Mozilla Reflect.parse test suite (the file is located +// at js/src/tests/js1_8_5/extensions/reflect-parse.js in the source tree). +// +// Some notable changes: +// * Removed unsupported features (destructuring, let, comprehensions...). +// * Removed tests for E4X (ECMAScript for XML). +// * Removed everything related to builder. +// * Enclosed every 'Pattern' construct with a scope. +// * Tweaked some expected tree to remove generator field. +// * Removed the test for bug 632030 and bug 632024. + +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * Any copyright is dedicated to the Public Domain. + * http://creativecommons.org/licenses/publicdomain/ + */ + +(function (exports) { + +function testReflect(Reflect, Pattern) { + +function program(elts) { return Pattern({ type: "Program", body: elts }) } +function exprStmt(expr) { return Pattern({ type: "ExpressionStatement", expression: expr }) } +function throwStmt(expr) { return Pattern({ type: "ThrowStatement", argument: expr }) } +function returnStmt(expr) { return Pattern({ type: "ReturnStatement", argument: expr }) } +function yieldExpr(expr) { return Pattern({ type: "YieldExpression", argument: expr }) } +function lit(val) { return Pattern({ type: "Literal", value: val }) } +var thisExpr = Pattern({ type: "ThisExpression" }); +function funDecl(id, params, body) { return Pattern({ type: "FunctionDeclaration", + id: id, + params: params, + defaults: [], + body: body, + rest: null, + generator: false, + expression: false + }) } +function genFunDecl(id, params, body) { return Pattern({ type: "FunctionDeclaration", + id: id, + params: params, + defaults: [], + body: body, + rest: null, + generator: false, + expression: false + }) } +function declarator(id, init) { return Pattern({ type: "VariableDeclarator", id: id, init: init }) } +function varDecl(decls) { return Pattern({ type: "VariableDeclaration", declarations: decls, kind: "var" }) } +function letDecl(decls) { return Pattern({ type: "VariableDeclaration", declarations: decls, kind: "let" }) } +function constDecl(decls) { return Pattern({ type: "VariableDeclaration", declarations: decls, kind: "const" }) } +function ident(name) { return Pattern({ type: "Identifier", name: name }) } +function dotExpr(obj, id) { return Pattern({ type: "MemberExpression", computed: false, object: obj, property: id }) } +function memExpr(obj, id) { return Pattern({ type: "MemberExpression", computed: true, object: obj, property: id }) } +function forStmt(init, test, update, body) { return Pattern({ type: "ForStatement", init: init, test: test, update: update, body: body }) } +function forInStmt(lhs, rhs, body) { return Pattern({ type: "ForInStatement", left: lhs, right: rhs, body: body, each: false }) } +function forEachInStmt(lhs, rhs, body) { return Pattern({ type: "ForInStatement", left: lhs, right: rhs, body: body, each: true }) } +function breakStmt(lab) { return Pattern({ type: "BreakStatement", label: lab }) } +function continueStmt(lab) { return Pattern({ type: "ContinueStatement", label: lab }) } +function blockStmt(body) { return Pattern({ type: "BlockStatement", body: body }) } +var emptyStmt = Pattern({ type: "EmptyStatement" }); +function ifStmt(test, cons, alt) { return Pattern({ type: "IfStatement", test: test, alternate: alt, consequent: cons }) } +function labStmt(lab, stmt) { return Pattern({ type: "LabeledStatement", label: lab, body: stmt }) } +function withStmt(obj, stmt) { return Pattern({ type: "WithStatement", object: obj, body: stmt }) } +function whileStmt(test, stmt) { return Pattern({ type: "WhileStatement", test: test, body: stmt }) } +function doStmt(stmt, test) { return Pattern({ type: "DoWhileStatement", test: test, body: stmt }) } +function switchStmt(disc, cases) { return Pattern({ type: "SwitchStatement", discriminant: disc, cases: cases }) } +function caseClause(test, stmts) { return Pattern({ type: "SwitchCase", test: test, consequent: stmts }) } +function defaultClause(stmts) { return Pattern({ type: "SwitchCase", test: null, consequent: stmts }) } +function catchClause(id, guard, body) { if (guard) { return Pattern({ type: "GuardedCatchClause", param: id, guard: guard, body: body }) } else { return Pattern({ type: "CatchClause", param: id, body: body }) } } +function tryStmt(body, guarded, catches, fin) { return Pattern({ type: "TryStatement", block: body, guardedHandlers: guarded, handlers: catches, finalizer: fin }) } +function letStmt(head, body) { return Pattern({ type: "LetStatement", head: head, body: body }) } +function funExpr(id, args, body, gen) { return Pattern({ type: "FunctionExpression", + id: id, + params: args, + defaults: [], + body: body, + rest: null, + generator: false, + expression: false + }) } +function genFunExpr(id, args, body) { return Pattern({ type: "FunctionExpression", + id: id, + params: args, + defaults: [], + body: body, + rest: null, + generator: false, + expression: false + }) } + +function unExpr(op, arg) { return Pattern({ type: "UnaryExpression", operator: op, argument: arg, prefix: true }) } +function binExpr(op, left, right) { return Pattern({ type: "BinaryExpression", operator: op, left: left, right: right }) } +function aExpr(op, left, right) { return Pattern({ type: "AssignmentExpression", operator: op, left: left, right: right }) } +function updExpr(op, arg, prefix) { return Pattern({ type: "UpdateExpression", operator: op, argument: arg, prefix: prefix }) } +function logExpr(op, left, right) { return Pattern({ type: "LogicalExpression", operator: op, left: left, right: right }) } + +function condExpr(test, cons, alt) { return Pattern({ type: "ConditionalExpression", test: test, consequent: cons, alternate: alt }) } +function seqExpr(exprs) { return Pattern({ type: "SequenceExpression", expressions: exprs }) } +function newExpr(callee, args) { return Pattern({ type: "NewExpression", callee: callee, arguments: args }) } +function callExpr(callee, args) { return Pattern({ type: "CallExpression", callee: callee, arguments: args }) } +function arrExpr(elts) { return Pattern({ type: "ArrayExpression", elements: elts }) } +function objExpr(elts) { return Pattern({ type: "ObjectExpression", properties: elts }) } +function objProp(key, value, kind) { return Pattern({ type: "Property", key: key, value: value, kind: kind }) } + +function arrPatt(elts) { return Pattern({ type: "ArrayPattern", elements: elts }) } +function objPatt(elts) { return Pattern({ type: "ObjectPattern", properties: elts }) } + +function localSrc(src) { return "(function(){ " + src + " })" } +function localPatt(patt) { return program([exprStmt(funExpr(null, [], blockStmt([patt])))]) } +function blockSrc(src) { return "(function(){ { " + src + " } })" } +function blockPatt(patt) { return program([exprStmt(funExpr(null, [], blockStmt([blockStmt([patt])])))]) } + +function assertBlockStmt(src, patt) { + blockPatt(patt).assert(Reflect.parse(blockSrc(src))); +} + +function assertBlockExpr(src, patt) { + assertBlockStmt(src, exprStmt(patt)); +} + +function assertBlockDecl(src, patt, builder) { + blockPatt(patt).assert(Reflect.parse(blockSrc(src), {builder: builder})); +} + +function assertLocalStmt(src, patt) { + localPatt(patt).assert(Reflect.parse(localSrc(src))); +} + +function assertLocalExpr(src, patt) { + assertLocalStmt(src, exprStmt(patt)); +} + +function assertLocalDecl(src, patt) { + localPatt(patt).assert(Reflect.parse(localSrc(src))); +} + +function assertGlobalStmt(src, patt, builder) { + program([patt]).assert(Reflect.parse(src, {builder: builder})); +} + +function assertGlobalExpr(src, patt, builder) { + program([exprStmt(patt)]).assert(Reflect.parse(src, {builder: builder})); + //assertStmt(src, exprStmt(patt)); +} + +function assertGlobalDecl(src, patt) { + program([patt]).assert(Reflect.parse(src)); +} + +function assertProg(src, patt) { + program(patt).assert(Reflect.parse(src)); +} + +function assertStmt(src, patt) { + assertLocalStmt(src, patt); + assertGlobalStmt(src, patt); + assertBlockStmt(src, patt); +} + +function assertExpr(src, patt) { + assertLocalExpr(src, patt); + assertGlobalExpr(src, patt); + assertBlockExpr(src, patt); +} + +function assertDecl(src, patt) { + assertLocalDecl(src, patt); + assertGlobalDecl(src, patt); + assertBlockDecl(src, patt); +} + +function assertError(src, errorType) { + try { + Reflect.parse(src); + } catch (e) { + return; + } + throw new Error("expected " + errorType.name + " for " + uneval(src)); +} + + +// general tests + +// NB: These are useful but for now jit-test doesn't do I/O reliably. + +//program(_).assert(Reflect.parse(snarf('data/flapjax.txt'))); +//program(_).assert(Reflect.parse(snarf('data/jquery-1.4.2.txt'))); +//program(_).assert(Reflect.parse(snarf('data/prototype.js'))); +//program(_).assert(Reflect.parse(snarf('data/dojo.js.uncompressed.js'))); +//program(_).assert(Reflect.parse(snarf('data/mootools-1.2.4-core-nc.js'))); + + +// declarations + +assertDecl("var x = 1, y = 2, z = 3", + varDecl([declarator(ident("x"), lit(1)), + declarator(ident("y"), lit(2)), + declarator(ident("z"), lit(3))])); +assertDecl("var x, y, z", + varDecl([declarator(ident("x"), null), + declarator(ident("y"), null), + declarator(ident("z"), null)])); +assertDecl("function foo() { }", + funDecl(ident("foo"), [], blockStmt([]))); +assertDecl("function foo() { return 42 }", + funDecl(ident("foo"), [], blockStmt([returnStmt(lit(42))]))); + + +// Bug 591437: rebound args have their defs turned into uses +assertDecl("function f(a) { function a() { } }", + funDecl(ident("f"), [ident("a")], blockStmt([funDecl(ident("a"), [], blockStmt([]))]))); +assertDecl("function f(a,b,c) { function b() { } }", + funDecl(ident("f"), [ident("a"),ident("b"),ident("c")], blockStmt([funDecl(ident("b"), [], blockStmt([]))]))); + +// expressions + +assertExpr("true", lit(true)); +assertExpr("false", lit(false)); +assertExpr("42", lit(42)); +assertExpr("(/asdf/)", lit(/asdf/)); +assertExpr("this", thisExpr); +assertExpr("foo", ident("foo")); +assertExpr("foo.bar", dotExpr(ident("foo"), ident("bar"))); +assertExpr("foo[bar]", memExpr(ident("foo"), ident("bar"))); +assertExpr("(function(){})", funExpr(null, [], blockStmt([]))); +assertExpr("(function f() {})", funExpr(ident("f"), [], blockStmt([]))); +assertExpr("(function f(x,y,z) {})", funExpr(ident("f"), [ident("x"),ident("y"),ident("z")], blockStmt([]))); +assertExpr("(++x)", updExpr("++", ident("x"), true)); +assertExpr("(x++)", updExpr("++", ident("x"), false)); +assertExpr("(+x)", unExpr("+", ident("x"))); +assertExpr("(-x)", unExpr("-", ident("x"))); +assertExpr("(!x)", unExpr("!", ident("x"))); +assertExpr("(~x)", unExpr("~", ident("x"))); +assertExpr("(delete x)", unExpr("delete", ident("x"))); +assertExpr("(typeof x)", unExpr("typeof", ident("x"))); +assertExpr("(void x)", unExpr("void", ident("x"))); +assertExpr("(x == y)", binExpr("==", ident("x"), ident("y"))); +assertExpr("(x != y)", binExpr("!=", ident("x"), ident("y"))); +assertExpr("(x === y)", binExpr("===", ident("x"), ident("y"))); +assertExpr("(x !== y)", binExpr("!==", ident("x"), ident("y"))); +assertExpr("(x < y)", binExpr("<", ident("x"), ident("y"))); +assertExpr("(x <= y)", binExpr("<=", ident("x"), ident("y"))); +assertExpr("(x > y)", binExpr(">", ident("x"), ident("y"))); +assertExpr("(x >= y)", binExpr(">=", ident("x"), ident("y"))); +assertExpr("(x << y)", binExpr("<<", ident("x"), ident("y"))); +assertExpr("(x >> y)", binExpr(">>", ident("x"), ident("y"))); +assertExpr("(x >>> y)", binExpr(">>>", ident("x"), ident("y"))); +assertExpr("(x + y)", binExpr("+", ident("x"), ident("y"))); +assertExpr("(w + x + y + z)", binExpr("+", binExpr("+", binExpr("+", ident("w"), ident("x")), ident("y")), ident("z"))); +assertExpr("(x - y)", binExpr("-", ident("x"), ident("y"))); +assertExpr("(w - x - y - z)", binExpr("-", binExpr("-", binExpr("-", ident("w"), ident("x")), ident("y")), ident("z"))); +assertExpr("(x * y)", binExpr("*", ident("x"), ident("y"))); +assertExpr("(x / y)", binExpr("/", ident("x"), ident("y"))); +assertExpr("(x % y)", binExpr("%", ident("x"), ident("y"))); +assertExpr("(x | y)", binExpr("|", ident("x"), ident("y"))); +assertExpr("(x ^ y)", binExpr("^", ident("x"), ident("y"))); +assertExpr("(x & y)", binExpr("&", ident("x"), ident("y"))); +assertExpr("(x in y)", binExpr("in", ident("x"), ident("y"))); +assertExpr("(x instanceof y)", binExpr("instanceof", ident("x"), ident("y"))); +assertExpr("(x = y)", aExpr("=", ident("x"), ident("y"))); +assertExpr("(x += y)", aExpr("+=", ident("x"), ident("y"))); +assertExpr("(x -= y)", aExpr("-=", ident("x"), ident("y"))); +assertExpr("(x *= y)", aExpr("*=", ident("x"), ident("y"))); +assertExpr("(x /= y)", aExpr("/=", ident("x"), ident("y"))); +assertExpr("(x %= y)", aExpr("%=", ident("x"), ident("y"))); +assertExpr("(x <<= y)", aExpr("<<=", ident("x"), ident("y"))); +assertExpr("(x >>= y)", aExpr(">>=", ident("x"), ident("y"))); +assertExpr("(x >>>= y)", aExpr(">>>=", ident("x"), ident("y"))); +assertExpr("(x |= y)", aExpr("|=", ident("x"), ident("y"))); +assertExpr("(x ^= y)", aExpr("^=", ident("x"), ident("y"))); +assertExpr("(x &= y)", aExpr("&=", ident("x"), ident("y"))); +assertExpr("(x || y)", logExpr("||", ident("x"), ident("y"))); +assertExpr("(x && y)", logExpr("&&", ident("x"), ident("y"))); +assertExpr("(w || x || y || z)", logExpr("||", logExpr("||", logExpr("||", ident("w"), ident("x")), ident("y")), ident("z"))) +assertExpr("(x ? y : z)", condExpr(ident("x"), ident("y"), ident("z"))); +assertExpr("(x,y)", seqExpr([ident("x"),ident("y")])) +assertExpr("(x,y,z)", seqExpr([ident("x"),ident("y"),ident("z")])) +assertExpr("(a,b,c,d,e,f,g)", seqExpr([ident("a"),ident("b"),ident("c"),ident("d"),ident("e"),ident("f"),ident("g")])); +assertExpr("(new Object)", newExpr(ident("Object"), [])); +assertExpr("(new Object())", newExpr(ident("Object"), [])); +assertExpr("(new Object(42))", newExpr(ident("Object"), [lit(42)])); +assertExpr("(new Object(1,2,3))", newExpr(ident("Object"), [lit(1),lit(2),lit(3)])); +assertExpr("(String())", callExpr(ident("String"), [])); +assertExpr("(String(42))", callExpr(ident("String"), [lit(42)])); +assertExpr("(String(1,2,3))", callExpr(ident("String"), [lit(1),lit(2),lit(3)])); +assertExpr("[]", arrExpr([])); +assertExpr("[1]", arrExpr([lit(1)])); +assertExpr("[1,2]", arrExpr([lit(1),lit(2)])); +assertExpr("[1,2,3]", arrExpr([lit(1),lit(2),lit(3)])); +assertExpr("[1,,2,3]", arrExpr([lit(1),,lit(2),lit(3)])); +assertExpr("[1,,,2,3]", arrExpr([lit(1),,,lit(2),lit(3)])); +assertExpr("[1,,,2,,3]", arrExpr([lit(1),,,lit(2),,lit(3)])); +assertExpr("[1,,,2,,,3]", arrExpr([lit(1),,,lit(2),,,lit(3)])); +assertExpr("[,1,2,3]", arrExpr([,lit(1),lit(2),lit(3)])); +assertExpr("[,,1,2,3]", arrExpr([,,lit(1),lit(2),lit(3)])); +assertExpr("[,,,1,2,3]", arrExpr([,,,lit(1),lit(2),lit(3)])); +assertExpr("[,,,1,2,3,]", arrExpr([,,,lit(1),lit(2),lit(3)])); +assertExpr("[,,,1,2,3,,]", arrExpr([,,,lit(1),lit(2),lit(3),undefined])); +assertExpr("[,,,1,2,3,,,]", arrExpr([,,,lit(1),lit(2),lit(3),undefined,undefined])); +assertExpr("[,,,,,]", arrExpr([undefined,undefined,undefined,undefined,undefined])); +assertExpr("({})", objExpr([])); +assertExpr("({x:1})", objExpr([objProp(ident("x"), lit(1), "init")])); +assertExpr("({x:1, y:2})", objExpr([objProp(ident("x"), lit(1), "init"), + objProp(ident("y"), lit(2), "init")])); +assertExpr("({x:1, y:2, z:3})", objExpr([objProp(ident("x"), lit(1), "init"), + objProp(ident("y"), lit(2), "init"), + objProp(ident("z"), lit(3), "init") ])); +assertExpr("({x:1, 'y':2, z:3})", objExpr([objProp(ident("x"), lit(1), "init"), + objProp(lit("y"), lit(2), "init"), + objProp(ident("z"), lit(3), "init") ])); +assertExpr("({'x':1, 'y':2, z:3})", objExpr([objProp(lit("x"), lit(1), "init"), + objProp(lit("y"), lit(2), "init"), + objProp(ident("z"), lit(3), "init") ])); +assertExpr("({'x':1, 'y':2, 3:3})", objExpr([objProp(lit("x"), lit(1), "init"), + objProp(lit("y"), lit(2), "init"), + objProp(lit(3), lit(3), "init") ])); + +// Bug 571617: eliminate constant-folding +assertExpr("2 + 3", binExpr("+", lit(2), lit(3))); + +// Bug 632026: constant-folding +assertExpr("typeof(0?0:a)", unExpr("typeof", condExpr(lit(0), lit(0), ident("a")))); + +// Bug 632056: constant-folding +program([exprStmt(ident("f")), + ifStmt(lit(1), + funDecl(ident("f"), [], blockStmt([])), + null)]).assert(Reflect.parse("f; if (1) function f(){}")); + +// statements + +assertStmt("throw 42", throwStmt(lit(42))); +assertStmt("for (;;) break", forStmt(null, null, null, breakStmt(null))); +assertStmt("for (x; y; z) break", forStmt(ident("x"), ident("y"), ident("z"), breakStmt(null))); +assertStmt("for (var x; y; z) break", forStmt(varDecl([declarator(ident("x"), null)]), ident("y"), ident("z"), breakStmt(null))); +assertStmt("for (var x = 42; y; z) break", forStmt(varDecl([declarator(ident("x"), lit(42))]), ident("y"), ident("z"), breakStmt(null))); +assertStmt("for (x; ; z) break", forStmt(ident("x"), null, ident("z"), breakStmt(null))); +assertStmt("for (var x; ; z) break", forStmt(varDecl([declarator(ident("x"), null)]), null, ident("z"), breakStmt(null))); +assertStmt("for (var x = 42; ; z) break", forStmt(varDecl([declarator(ident("x"), lit(42))]), null, ident("z"), breakStmt(null))); +assertStmt("for (x; y; ) break", forStmt(ident("x"), ident("y"), null, breakStmt(null))); +assertStmt("for (var x; y; ) break", forStmt(varDecl([declarator(ident("x"), null)]), ident("y"), null, breakStmt(null))); +assertStmt("for (var x = 42; y; ) break", forStmt(varDecl([declarator(ident("x"),lit(42))]), ident("y"), null, breakStmt(null))); +assertStmt("for (var x in y) break", forInStmt(varDecl([declarator(ident("x"),null)]), ident("y"), breakStmt(null))); +assertStmt("for (x in y) break", forInStmt(ident("x"), ident("y"), breakStmt(null))); +assertStmt("{ }", blockStmt([])); +assertStmt("{ throw 1; throw 2; throw 3; }", blockStmt([ throwStmt(lit(1)), throwStmt(lit(2)), throwStmt(lit(3))])); +assertStmt(";", emptyStmt); +assertStmt("if (foo) throw 42;", ifStmt(ident("foo"), throwStmt(lit(42)), null)); +assertStmt("if (foo) throw 42; else true;", ifStmt(ident("foo"), throwStmt(lit(42)), exprStmt(lit(true)))); +assertStmt("if (foo) { throw 1; throw 2; throw 3; }", + ifStmt(ident("foo"), + blockStmt([throwStmt(lit(1)), throwStmt(lit(2)), throwStmt(lit(3))]), + null)); +assertStmt("if (foo) { throw 1; throw 2; throw 3; } else true;", + ifStmt(ident("foo"), + blockStmt([throwStmt(lit(1)), throwStmt(lit(2)), throwStmt(lit(3))]), + exprStmt(lit(true)))); +assertStmt("foo: for(;;) break foo;", labStmt(ident("foo"), forStmt(null, null, null, breakStmt(ident("foo"))))); +assertStmt("foo: for(;;) continue foo;", labStmt(ident("foo"), forStmt(null, null, null, continueStmt(ident("foo"))))); +assertStmt("with (obj) { }", withStmt(ident("obj"), blockStmt([]))); +assertStmt("with (obj) { obj; }", withStmt(ident("obj"), blockStmt([exprStmt(ident("obj"))]))); +assertStmt("while (foo) { }", whileStmt(ident("foo"), blockStmt([]))); +assertStmt("while (foo) { foo; }", whileStmt(ident("foo"), blockStmt([exprStmt(ident("foo"))]))); +assertStmt("do { } while (foo);", doStmt(blockStmt([]), ident("foo"))); +assertStmt("do { foo; } while (foo)", doStmt(blockStmt([exprStmt(ident("foo"))]), ident("foo"))); +assertStmt("switch (foo) { case 1: 1; break; case 2: 2; break; default: 3; }", + switchStmt(ident("foo"), + [ caseClause(lit(1), [ exprStmt(lit(1)), breakStmt(null) ]), + caseClause(lit(2), [ exprStmt(lit(2)), breakStmt(null) ]), + defaultClause([ exprStmt(lit(3)) ]) ])); +assertStmt("switch (foo) { case 1: 1; break; case 2: 2; break; default: 3; case 42: 42; }", + switchStmt(ident("foo"), + [ caseClause(lit(1), [ exprStmt(lit(1)), breakStmt(null) ]), + caseClause(lit(2), [ exprStmt(lit(2)), breakStmt(null) ]), + defaultClause([ exprStmt(lit(3)) ]), + caseClause(lit(42), [ exprStmt(lit(42)) ]) ])); +assertStmt("try { } catch (e) { }", + tryStmt(blockStmt([]), + [], + [ catchClause(ident("e"), null, blockStmt([])) ], + null)); +assertStmt("try { } catch (e) { } finally { }", + tryStmt(blockStmt([]), + [], + [ catchClause(ident("e"), null, blockStmt([])) ], + blockStmt([]))); +assertStmt("try { } finally { }", + tryStmt(blockStmt([]), + [], + [], + blockStmt([]))); + +// redeclarations (TOK_NAME nodes with lexdef) + +assertStmt("function f() { function g() { } function g() { } }", + funDecl(ident("f"), [], blockStmt([funDecl(ident("g"), [], blockStmt([])), + funDecl(ident("g"), [], blockStmt([]))]))); + +assertStmt("function f() { function g() { } function g() { return 42 } }", + funDecl(ident("f"), [], blockStmt([funDecl(ident("g"), [], blockStmt([])), + funDecl(ident("g"), [], blockStmt([returnStmt(lit(42))]))]))); + +assertStmt("function f() { var x = 42; var x = 43; }", + funDecl(ident("f"), [], blockStmt([varDecl([declarator(ident("x"),lit(42))]), + varDecl([declarator(ident("x"),lit(43))])]))); + +// getters and setters + + assertExpr("({ get x() { return 42 } })", + objExpr([ objProp(ident("x"), + funExpr(null, [], blockStmt([returnStmt(lit(42))])), + "get" ) ])); + assertExpr("({ set x(v) { return 42 } })", + objExpr([ objProp(ident("x"), + funExpr(null, [ident("v")], blockStmt([returnStmt(lit(42))])), + "set" ) ])); + +} + +exports.testReflect = testReflect; + +}(typeof exports === 'undefined' ? this : exports)); diff --git a/pitfall/pdfkit/node_modules/esprima/test/run.js b/pitfall/pdfkit/node_modules/esprima/test/run.js new file mode 100644 index 00000000..32ca3faa --- /dev/null +++ b/pitfall/pdfkit/node_modules/esprima/test/run.js @@ -0,0 +1,66 @@ +/* + Copyright (C) 2012 Yusuke Suzuki + Copyright (C) 2012 Ariya Hidayat + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*jslint node:true */ + +(function () { + 'use strict'; + + var child = require('child_process'), + nodejs = '"' + process.execPath + '"', + ret = 0, + suites, + index; + + suites = [ + 'runner', + 'compat' + ]; + + function nextTest() { + var suite = suites[index]; + + if (index < suites.length) { + child.exec(nodejs + ' ./test/' + suite + '.js', function (err, stdout, stderr) { + if (stdout) { + process.stdout.write(suite + ': ' + stdout); + } + if (stderr) { + process.stderr.write(suite + ': ' + stderr); + } + if (err) { + ret = err.code; + } + index += 1; + nextTest(); + }); + } else { + process.exit(ret); + } + } + + index = 0; + nextTest(); +}()); diff --git a/pitfall/pdfkit/node_modules/esprima/test/runner.js b/pitfall/pdfkit/node_modules/esprima/test/runner.js new file mode 100644 index 00000000..c1a3fc9b --- /dev/null +++ b/pitfall/pdfkit/node_modules/esprima/test/runner.js @@ -0,0 +1,387 @@ +/* + Copyright (C) 2012 Ariya Hidayat + Copyright (C) 2012 Joost-Wim Boekesteijn + Copyright (C) 2012 Yusuke Suzuki + Copyright (C) 2012 Arpad Borsos + Copyright (C) 2011 Ariya Hidayat + Copyright (C) 2011 Yusuke Suzuki + Copyright (C) 2011 Arpad Borsos + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +/*jslint browser:true node:true */ +/*global esprima:true, testFixture:true */ + +var runTests; + +// Special handling for regular expression literal since we need to +// convert it to a string literal, otherwise it will be decoded +// as object "{}" and the regular expression would be lost. +function adjustRegexLiteral(key, value) { + 'use strict'; + if (key === 'value' && value instanceof RegExp) { + value = value.toString(); + } + return value; +} + +function NotMatchingError(expected, actual) { + 'use strict'; + Error.call(this, 'Expected '); + this.expected = expected; + this.actual = actual; +} +NotMatchingError.prototype = new Error(); + +function errorToObject(e) { + 'use strict'; + var msg = e.toString(); + + // Opera 9.64 produces an non-standard string in toString(). + if (msg.substr(0, 6) !== 'Error:') { + if (typeof e.message === 'string') { + msg = 'Error: ' + e.message; + } + } + + return { + index: e.index, + lineNumber: e.lineNumber, + column: e.column, + message: msg + }; +} + +function testParse(esprima, code, syntax) { + 'use strict'; + var expected, tree, actual, options, StringObject, i, len, err; + + // alias, so that JSLint does not complain. + StringObject = String; + + options = { + comment: (typeof syntax.comments !== 'undefined'), + range: true, + loc: true, + tokens: (typeof syntax.tokens !== 'undefined'), + raw: true, + tolerant: (typeof syntax.errors !== 'undefined') + }; + + if (typeof syntax.tokens !== 'undefined') { + if (syntax.tokens.length > 0) { + options.range = (typeof syntax.tokens[0].range !== 'undefined'); + options.loc = (typeof syntax.tokens[0].loc !== 'undefined'); + } + } + + if (typeof syntax.comments !== 'undefined') { + if (syntax.comments.length > 0) { + options.range = (typeof syntax.comments[0].range !== 'undefined'); + options.loc = (typeof syntax.comments[0].loc !== 'undefined'); + } + } + + expected = JSON.stringify(syntax, null, 4); + try { + tree = esprima.parse(code, options); + tree = (options.comment || options.tokens || options.tolerant) ? tree : tree.body[0]; + + if (options.tolerant) { + for (i = 0, len = tree.errors.length; i < len; i += 1) { + tree.errors[i] = errorToObject(tree.errors[i]); + } + } + + actual = JSON.stringify(tree, adjustRegexLiteral, 4); + + // Only to ensure that there is no error when using string object. + esprima.parse(new StringObject(code), options); + + } catch (e) { + throw new NotMatchingError(expected, e.toString()); + } + if (expected !== actual) { + throw new NotMatchingError(expected, actual); + } + + function filter(key, value) { + if (key === 'value' && value instanceof RegExp) { + value = value.toString(); + } + return (key === 'loc' || key === 'range') ? undefined : value; + } + + if (options.tolerant) { + return; + } + + + // Check again without any location info. + options.range = false; + options.loc = false; + expected = JSON.stringify(syntax, filter, 4); + try { + tree = esprima.parse(code, options); + tree = (options.comment || options.tokens) ? tree : tree.body[0]; + + if (options.tolerant) { + for (i = 0, len = tree.errors.length; i < len; i += 1) { + tree.errors[i] = errorToObject(tree.errors[i]); + } + } + + actual = JSON.stringify(tree, filter, 4); + } catch (e) { + throw new NotMatchingError(expected, e.toString()); + } + if (expected !== actual) { + throw new NotMatchingError(expected, actual); + } +} + +function testError(esprima, code, exception) { + 'use strict'; + var i, options, expected, actual, handleInvalidRegexFlag; + + // Different parsing options should give the same error. + options = [ + {}, + { comment: true }, + { raw: true }, + { raw: true, comment: true } + ]; + + // If handleInvalidRegexFlag is true, an invalid flag in a regular expression + // will throw an exception. In some old version V8, this is not the case + // and hence handleInvalidRegexFlag is false. + handleInvalidRegexFlag = false; + try { + 'test'.match(new RegExp('[a-z]', 'x')); + } catch (e) { + handleInvalidRegexFlag = true; + } + + expected = JSON.stringify(exception); + + for (i = 0; i < options.length; i += 1) { + + try { + esprima.parse(code, options[i]); + } catch (e) { + actual = JSON.stringify(errorToObject(e)); + } + + if (expected !== actual) { + + // Compensate for old V8 which does not handle invalid flag. + if (exception.message.indexOf('Invalid regular expression') > 0) { + if (typeof actual === 'undefined' && !handleInvalidRegexFlag) { + return; + } + } + + throw new NotMatchingError(expected, actual); + } + + } +} + +function testAPI(esprima, code, result) { + 'use strict'; + var expected, res, actual; + + expected = JSON.stringify(result.result, null, 4); + try { + if (typeof result.property !== 'undefined') { + res = esprima[result.property]; + } else { + res = esprima[result.call].apply(esprima, result.args); + } + actual = JSON.stringify(res, adjustRegexLiteral, 4); + } catch (e) { + throw new NotMatchingError(expected, e.toString()); + } + if (expected !== actual) { + throw new NotMatchingError(expected, actual); + } +} + +function runTest(esprima, code, result) { + 'use strict'; + if (result.hasOwnProperty('lineNumber')) { + testError(esprima, code, result); + } else if (result.hasOwnProperty('result')) { + testAPI(esprima, code, result); + } else { + testParse(esprima, code, result); + } +} + +if (typeof window !== 'undefined') { + // Run all tests in a browser environment. + runTests = function () { + 'use strict'; + var total = 0, + failures = 0, + category, + fixture, + source, + tick, + expected, + index, + len; + + function setText(el, str) { + if (typeof el.innerText === 'string') { + el.innerText = str; + } else { + el.textContent = str; + } + } + + function startCategory(category) { + var report, e; + report = document.getElementById('report'); + e = document.createElement('h4'); + setText(e, category); + report.appendChild(e); + } + + function reportSuccess(code) { + var report, e; + report = document.getElementById('report'); + e = document.createElement('pre'); + e.setAttribute('class', 'code'); + setText(e, code); + report.appendChild(e); + } + + function reportFailure(code, expected, actual) { + var report, e; + + report = document.getElementById('report'); + + e = document.createElement('p'); + setText(e, 'Code:'); + report.appendChild(e); + + e = document.createElement('pre'); + e.setAttribute('class', 'code'); + setText(e, code); + report.appendChild(e); + + e = document.createElement('p'); + setText(e, 'Expected'); + report.appendChild(e); + + e = document.createElement('pre'); + e.setAttribute('class', 'expected'); + setText(e, expected); + report.appendChild(e); + + e = document.createElement('p'); + setText(e, 'Actual'); + report.appendChild(e); + + e = document.createElement('pre'); + e.setAttribute('class', 'actual'); + setText(e, actual); + report.appendChild(e); + } + + setText(document.getElementById('version'), esprima.version); + + tick = new Date(); + for (category in testFixture) { + if (testFixture.hasOwnProperty(category)) { + startCategory(category); + fixture = testFixture[category]; + for (source in fixture) { + if (fixture.hasOwnProperty(source)) { + expected = fixture[source]; + total += 1; + try { + runTest(esprima, source, expected); + reportSuccess(source, JSON.stringify(expected, null, 4)); + } catch (e) { + failures += 1; + reportFailure(source, e.expected, e.actual); + } + } + } + } + } + tick = (new Date()) - tick; + + if (failures > 0) { + setText(document.getElementById('status'), total + ' tests. ' + + 'Failures: ' + failures + '. ' + tick + ' ms'); + } else { + setText(document.getElementById('status'), total + ' tests. ' + + 'No failure. ' + tick + ' ms'); + } + }; +} else { + (function () { + 'use strict'; + + var esprima = require('../esprima'), + vm = require('vm'), + fs = require('fs'), + total = 0, + failures = [], + tick = new Date(), + expected, + header; + + vm.runInThisContext(fs.readFileSync(__dirname + '/test.js', 'utf-8')); + + Object.keys(testFixture).forEach(function (category) { + Object.keys(testFixture[category]).forEach(function (source) { + total += 1; + expected = testFixture[category][source]; + try { + runTest(esprima, source, expected); + } catch (e) { + e.source = source; + failures.push(e); + } + }); + }); + tick = (new Date()) - tick; + + header = total + ' tests. ' + failures.length + ' failures. ' + + tick + ' ms'; + if (failures.length) { + console.error(header); + failures.forEach(function (failure) { + console.error(failure.source + ': Expected\n ' + + failure.expected.split('\n').join('\n ') + + '\nto match\n ' + failure.actual); + }); + } else { + console.log(header); + } + process.exit(failures.length === 0 ? 0 : 1); + }()); +} diff --git a/pitfall/pdfkit/node_modules/esprima/test/test.js b/pitfall/pdfkit/node_modules/esprima/test/test.js new file mode 100644 index 00000000..8ceee54b --- /dev/null +++ b/pitfall/pdfkit/node_modules/esprima/test/test.js @@ -0,0 +1,20238 @@ +/* + Copyright (C) 2012 Ariya Hidayat + Copyright (C) 2012 Joost-Wim Boekesteijn + Copyright (C) 2012 Yusuke Suzuki + Copyright (C) 2012 Arpad Borsos + Copyright (C) 2011 Ariya Hidayat + Copyright (C) 2011 Yusuke Suzuki + Copyright (C) 2011 Arpad Borsos + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY + DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +var testFixture = { + + 'Primary Expression': { + + 'this\n': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'ThisExpression', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 0 } + } + }], + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 0 } + }, + tokens: [{ + type: 'Keyword', + value: 'this', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }] + }, + + 'null\n': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: null, + raw: 'null', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 0 } + } + }], + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 0 } + }, + tokens: [{ + type: 'Null', + value: 'null', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }] + }, + + '\n 42\n\n': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [5, 7], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + } + }, + range: [5, 9], + loc: { + start: { line: 2, column: 4 }, + end: { line: 4, column: 0 } + } + }], + range: [5, 9], + loc: { + start: { line: 2, column: 4 }, + end: { line: 4, column: 0 } + }, + tokens: [{ + type: 'Numeric', + value: '42', + range: [5, 7], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + } + }] + }, + + '(1 + 2 ) * 3': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'Literal', + value: 1, + raw: '1', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + right: { + type: 'Literal', + value: 2, + raw: '2', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [1, 6], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 6 } + } + }, + right: { + type: 'Literal', + value: 3, + raw: '3', + range: [11, 12], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + } + + }, + + 'Grouping Operator': { + + '(1) + (2 ) + 3': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'Literal', + value: 1, + raw: '1', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + right: { + type: 'Literal', + value: 2, + raw: '2', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + right: { + type: 'Literal', + value: 3, + raw: '3', + range: [14, 15], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + + '4 + 5 << (6)': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '<<', + left: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'Literal', + value: 4, + raw: '4', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 5, + raw: '5', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Literal', + value: 6, + raw: '6', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + } + + }, + + 'Array Initializer': { + + 'x = []': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [4, 6], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }], + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + }, + tokens: [{ + type: 'Identifier', + value: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, { + type: 'Punctuator', + value: '=', + range: [2, 3], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 3 } + } + }, { + type: 'Punctuator', + value: '[', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, { + type: 'Punctuator', + value: ']', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }] + }, + + 'x = [ ]': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'x = [ 42 ]': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ArrayExpression', + elements: [{ + type: 'Literal', + value: 42, + raw: '42', + range: [6, 8], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 8 } + } + }], + range: [4, 10], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 10 } + } + }, + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + }, + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + }, + + 'x = [ 42, ]': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ArrayExpression', + elements: [{ + type: 'Literal', + value: 42, + raw: '42', + range: [6, 8], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 8 } + } + }], + range: [4, 11], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + + 'x = [ ,, 42 ]': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ArrayExpression', + elements: [ + null, + null, + { + type: 'Literal', + value: 42, + raw: '42', + range: [9, 11], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 11 } + } + }], + range: [4, 13], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + + 'x = [ 1, 2, 3, ]': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ArrayExpression', + elements: [{ + type: 'Literal', + value: 1, + raw: '1', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, { + type: 'Literal', + value: 2, + raw: '2', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, { + type: 'Literal', + value: 3, + raw: '3', + range: [12, 13], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 13 } + } + }], + range: [4, 16], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + 'x = [ 1, 2,, 3, ]': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ArrayExpression', + elements: [{ + type: 'Literal', + value: 1, + raw: '1', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, { + type: 'Literal', + value: 2, + raw: '2', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, null, { + type: 'Literal', + value: 3, + raw: '3', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }], + range: [4, 17], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + + '日本語 = []': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: '日本語', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [6, 8], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + + 'T\u203F = []': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'T\u203F', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'T\u200C = []': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'T\u200C', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'T\u200D = []': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'T\u200D', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + '\u2163\u2161 = []': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: '\u2163\u2161', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + '\u2163\u2161\u200A=\u2009[]': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: '\u2163\u2161', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + } + + }, + + 'Object Initializer': { + + 'x = {}': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [], + range: [4, 6], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'x = { }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [], + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'x = { answer: 42 }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'answer', + range: [6, 12], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 12 } + } + }, + value: { + type: 'Literal', + value: 42, + raw: '42', + range: [14, 16], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 16 } + } + }, + kind: 'init', + range: [6, 16], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 16 } + } + }], + range: [4, 18], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 18 } + } + }, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + + 'x = { if: 42 }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'if', + range: [6, 8], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 8 } + } + }, + value: { + type: 'Literal', + value: 42, + raw: '42', + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + kind: 'init', + range: [6, 12], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 12 } + } + }], + range: [4, 14], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + 'x = { true: 42 }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'true', + range: [6, 10], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 10 } + } + }, + value: { + type: 'Literal', + value: 42, + raw: '42', + range: [12, 14], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 14 } + } + }, + kind: 'init', + range: [6, 14], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 14 } + } + }], + range: [4, 16], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + 'x = { false: 42 }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'false', + range: [6, 11], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 11 } + } + }, + value: { + type: 'Literal', + value: 42, + raw: '42', + range: [13, 15], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 15 } + } + }, + kind: 'init', + range: [6, 15], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 15 } + } + }], + range: [4, 17], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + + 'x = { null: 42 }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'null', + range: [6, 10], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 10 } + } + }, + value: { + type: 'Literal', + value: 42, + raw: '42', + range: [12, 14], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 14 } + } + }, + kind: 'init', + range: [6, 14], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 14 } + } + }], + range: [4, 16], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + 'x = { "answer": 42 }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Literal', + value: 'answer', + raw: '"answer"', + range: [6, 14], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 14 } + } + }, + value: { + type: 'Literal', + value: 42, + raw: '42', + range: [16, 18], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 18 } + } + }, + kind: 'init', + range: [6, 18], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 18 } + } + }], + range: [4, 20], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 20 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + + 'x = { x: 1, x: 2 }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [ + { + type: 'Property', + key: { + type: 'Identifier', + name: 'x', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + value: { + type: 'Literal', + value: 1, + raw: '1', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + kind: 'init', + range: [6, 10], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 10 } + } + }, + { + type: 'Property', + key: { + type: 'Identifier', + name: 'x', + range: [12, 13], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 13 } + } + }, + value: { + type: 'Literal', + value: 2, + raw: '2', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }, + kind: 'init', + range: [12, 16], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 16 } + } + } + ], + range: [4, 18], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 18 } + } + }, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + + 'x = { get width() { return m_width } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'width', + range: [10, 15], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 15 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ReturnStatement', + argument: { + type: 'Identifier', + name: 'm_width', + range: [27, 34], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 34 } + } + }, + range: [20, 35], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 35 } + } + }], + range: [18, 36], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 36 } + } + }, + rest: null, + generator: false, + expression: false, + range: [18, 36], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 36 } + } + }, + kind: 'get', + range: [6, 36], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 36 } + } + }], + range: [4, 38], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 38 } + } + }, + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + } + }, + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + } + }, + + 'x = { get undef() {} }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'undef', + range: [10, 15], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 15 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [18, 20], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 20 } + } + }, + rest: null, + generator: false, + expression: false, + range: [18, 20], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 20 } + } + }, + kind: 'get', + range: [6, 20], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 20 } + } + }], + range: [4, 22], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + + 'x = { get if() {} }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'if', + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + rest: null, + generator: false, + expression: false, + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + kind: 'get', + range: [6, 17], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 17 } + } + }], + range: [4, 19], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 19 } + } + }, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + + 'x = { get true() {} }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'true', + range: [10, 14], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 14 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [17, 19], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 19 } + } + }, + rest: null, + generator: false, + expression: false, + range: [17, 19], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 19 } + } + }, + kind: 'get', + range: [6, 19], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 19 } + } + }], + range: [4, 21], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + + 'x = { get false() {} }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'false', + range: [10, 15], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 15 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [18, 20], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 20 } + } + }, + rest: null, + generator: false, + expression: false, + range: [18, 20], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 20 } + } + }, + kind: 'get', + range: [6, 20], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 20 } + } + }], + range: [4, 22], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + + 'x = { get null() {} }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'null', + range: [10, 14], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 14 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [17, 19], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 19 } + } + }, + rest: null, + generator: false, + expression: false, + range: [17, 19], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 19 } + } + }, + kind: 'get', + range: [6, 19], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 19 } + } + }], + range: [4, 21], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + + 'x = { get "undef"() {} }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Literal', + value: 'undef', + raw: '"undef"', + range: [10, 17], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 17 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [20, 22], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 22 } + } + }, + rest: null, + generator: false, + expression: false, + range: [20, 22], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 22 } + } + }, + kind: 'get', + range: [6, 22], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 22 } + } + }], + range: [4, 24], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 24 } + } + }, + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + + 'x = { get 10() {} }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Literal', + value: 10, + raw: '10', + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + rest: null, + generator: false, + expression: false, + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + kind: 'get', + range: [6, 17], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 17 } + } + }], + range: [4, 19], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 19 } + } + }, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + + 'x = { set width(w) { m_width = w } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'width', + range: [10, 15], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 15 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'w', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'm_width', + range: [21, 28], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 28 } + } + }, + right: { + type: 'Identifier', + name: 'w', + range: [31, 32], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 32 } + } + }, + range: [21, 32], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 32 } + } + }, + range: [21, 33], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 33 } + } + }], + range: [19, 34], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 34 } + } + }, + rest: null, + generator: false, + expression: false, + range: [19, 34], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 34 } + } + }, + kind: 'set', + range: [6, 34], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 34 } + } + }], + range: [4, 36], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 36 } + } + }, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + } + }, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + } + }, + + 'x = { set if(w) { m_if = w } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'if', + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'w', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'm_if', + range: [18, 22], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 22 } + } + }, + right: { + type: 'Identifier', + name: 'w', + range: [25, 26], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 26 } + } + }, + range: [18, 26], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 26 } + } + }, + range: [18, 27], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 27 } + } + }], + range: [16, 28], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 28 } + } + }, + rest: null, + generator: false, + expression: false, + range: [16, 28], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 28 } + } + }, + kind: 'set', + range: [6, 28], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 28 } + } + }], + range: [4, 30], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 30 } + } + }, + range: [0, 30], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 30 } + } + }, + range: [0, 30], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 30 } + } + }, + + 'x = { set true(w) { m_true = w } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'true', + range: [10, 14], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 14 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'w', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'm_true', + range: [20, 26], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 26 } + } + }, + right: { + type: 'Identifier', + name: 'w', + range: [29, 30], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 30 } + } + }, + range: [20, 30], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 30 } + } + }, + range: [20, 31], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 31 } + } + }], + range: [18, 32], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 32 } + } + }, + rest: null, + generator: false, + expression: false, + range: [18, 32], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 32 } + } + }, + kind: 'set', + range: [6, 32], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 32 } + } + }], + range: [4, 34], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 34 } + } + }, + range: [0, 34], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 34 } + } + }, + range: [0, 34], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 34 } + } + }, + + 'x = { set false(w) { m_false = w } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'false', + range: [10, 15], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 15 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'w', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'm_false', + range: [21, 28], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 28 } + } + }, + right: { + type: 'Identifier', + name: 'w', + range: [31, 32], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 32 } + } + }, + range: [21, 32], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 32 } + } + }, + range: [21, 33], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 33 } + } + }], + range: [19, 34], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 34 } + } + }, + rest: null, + generator: false, + expression: false, + range: [19, 34], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 34 } + } + }, + kind: 'set', + range: [6, 34], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 34 } + } + }], + range: [4, 36], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 36 } + } + }, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + } + }, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + } + }, + + 'x = { set null(w) { m_null = w } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'null', + range: [10, 14], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 14 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'w', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'm_null', + range: [20, 26], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 26 } + } + }, + right: { + type: 'Identifier', + name: 'w', + range: [29, 30], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 30 } + } + }, + range: [20, 30], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 30 } + } + }, + range: [20, 31], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 31 } + } + }], + range: [18, 32], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 32 } + } + }, + rest: null, + generator: false, + expression: false, + range: [18, 32], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 32 } + } + }, + kind: 'set', + range: [6, 32], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 32 } + } + }], + range: [4, 34], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 34 } + } + }, + range: [0, 34], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 34 } + } + }, + range: [0, 34], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 34 } + } + }, + + 'x = { set "null"(w) { m_null = w } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Literal', + value: 'null', + raw: '"null"', + range: [10, 16], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 16 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'w', + range: [17, 18], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 18 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'm_null', + range: [22, 28], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 28 } + } + }, + right: { + type: 'Identifier', + name: 'w', + range: [31, 32], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 32 } + } + }, + range: [22, 32], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 32 } + } + }, + range: [22, 33], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 33 } + } + }], + range: [20, 34], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 34 } + } + }, + rest: null, + generator: false, + expression: false, + range: [20, 34], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 34 } + } + }, + kind: 'set', + range: [6, 34], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 34 } + } + }], + range: [4, 36], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 36 } + } + }, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + } + }, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + } + }, + + 'x = { set 10(w) { m_null = w } }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Literal', + value: 10, + raw: '10', + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'w', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'm_null', + range: [18, 24], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 24 } + } + }, + right: { + type: 'Identifier', + name: 'w', + range: [27, 28], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 28 } + } + }, + range: [18, 28], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 28 } + } + }, + range: [18, 29], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 29 } + } + }], + range: [16, 30], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 30 } + } + }, + rest: null, + generator: false, + expression: false, + range: [16, 30], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 30 } + } + }, + kind: 'set', + range: [6, 30], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 30 } + } + }], + range: [4, 32], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 32 } + } + }, + range: [0, 32], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 32 } + } + }, + range: [0, 32], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 32 } + } + }, + + 'x = { get: 42 }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'get', + range: [6, 9], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 9 } + } + }, + value: { + type: 'Literal', + value: 42, + raw: '42', + range: [11, 13], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 13 } + } + }, + kind: 'init', + range: [6, 13], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 13 } + } + }], + range: [4, 15], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + + 'x = { set: 43 }': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'set', + range: [6, 9], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 9 } + } + }, + value: { + type: 'Literal', + value: 43, + raw: '43', + range: [11, 13], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 13 } + } + }, + kind: 'init', + range: [6, 13], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 13 } + } + }], + range: [4, 15], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + } + + }, + + 'Comments': { + + '/* block comment */ 42': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [20, 22], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 22 } + } + }, + range: [20, 22], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 22 } + } + }, + + '42 /*The*/ /*Answer*/': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }], + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + }, + comments: [{ + type: 'Block', + value: 'The', + range: [3, 10], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 10 } + } + }, { + type: 'Block', + value: 'Answer', + range: [11, 21], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 21 } + } + }] + }, + + '42 /*the*/ /*answer*/': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [0, 2] + }, + range: [0, 21] + }], + range: [0, 21], + comments: [{ + type: 'Block', + value: 'the', + range: [3, 10] + }, { + type: 'Block', + value: 'answer', + range: [11, 21] + }] + }, + + '/* multiline\ncomment\nshould\nbe\nignored */ 42': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [42, 44], + loc: { + start: { line: 5, column: 11 }, + end: { line: 5, column: 13 } + } + }, + range: [42, 44], + loc: { + start: { line: 5, column: 11 }, + end: { line: 5, column: 13 } + } + }, + + '/*a\r\nb*/ 42': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [9, 11], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + } + }, + range: [9, 11], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + } + }], + range: [9, 11], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + }, + comments: [{ + type: 'Block', + value: 'a\r\nb', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 3 } + } + }] + }, + + '/*a\rb*/ 42': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [8, 10], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + } + }, + range: [8, 10], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + } + }], + range: [8, 10], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + }, + comments: [{ + type: 'Block', + value: 'a\rb', + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 3 } + } + }] + }, + + '/*a\nb*/ 42': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [8, 10], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + } + }, + range: [8, 10], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + } + }], + range: [8, 10], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + }, + comments: [{ + type: 'Block', + value: 'a\nb', + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 3 } + } + }] + }, + + '/*a\nc*/ 42': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + } + }, + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + } + }], + loc: { + start: { line: 2, column: 4 }, + end: { line: 2, column: 6 } + }, + comments: [{ + type: 'Block', + value: 'a\nc', + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 3 } + } + }] + }, + + '// line comment\n42': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [16, 18], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 2 } + } + }, + range: [16, 18], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 2 } + } + }, + + '42 // line comment': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }], + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + }, + comments: [{ + type: 'Line', + value: ' line comment', + range: [3, 18], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 18 } + } + }] + }, + + '// Hello, world!\n42': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [17, 19], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 2 } + } + }, + range: [17, 19], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 2 } + } + }], + range: [17, 19], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 2 } + }, + comments: [{ + type: 'Line', + value: ' Hello, world!', + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }] + }, + + '// Hello, world!\n': { + type: 'Program', + body: [], + range: [17, 17], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 0 } + }, + comments: [{ + type: 'Line', + value: ' Hello, world!', + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }] + }, + + '// Hallo, world!\n': { + type: 'Program', + body: [], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 0 } + }, + comments: [{ + type: 'Line', + value: ' Hallo, world!', + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }] + }, + + '//\n42': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [3, 5], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 2 } + } + }, + range: [3, 5], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 2 } + } + }], + range: [3, 5], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 2 } + }, + comments: [{ + type: 'Line', + value: '', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }] + }, + + '//': { + type: 'Program', + body: [], + range: [2, 2], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 2 } + }, + comments: [{ + type: 'Line', + value: '', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }] + }, + + '// ': { + type: 'Program', + body: [], + range: [3, 3], + comments: [{ + type: 'Line', + value: ' ', + range: [0, 3] + }] + }, + + '/**/42': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [4, 6], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 6 } + } + }, + range: [4, 6], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 6 } + } + }], + range: [4, 6], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 6 } + }, + comments: [{ + type: 'Block', + value: '', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }] + }, + + '// Hello, world!\n\n// Another hello\n42': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [37, 39], + loc: { + start: { line: 4, column: 0 }, + end: { line: 4, column: 2 } + } + }, + range: [37, 39], + loc: { + start: { line: 4, column: 0 }, + end: { line: 4, column: 2 } + } + }], + range: [37, 39], + loc: { + start: { line: 4, column: 0 }, + end: { line: 4, column: 2 } + }, + comments: [{ + type: 'Line', + value: ' Hello, world!', + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, { + type: 'Line', + value: ' Another hello', + range: [18, 36], + loc: { + start: { line: 3, column: 0 }, + end: { line: 3, column: 18 } + } + }] + }, + + 'if (x) { // Some comment\ndoThat(); }': { + type: 'Program', + body: [{ + type: 'IfStatement', + test: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + consequent: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'doThat', + range: [25, 31], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 6 } + } + }, + 'arguments': [], + range: [25, 33], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 8 } + } + }, + range: [25, 34], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 9 } + } + }], + range: [7, 36], + loc: { + start: { line: 1, column: 7 }, + end: { line: 2, column: 11 } + } + }, + alternate: null, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 11 } + } + }], + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 11 } + }, + comments: [{ + type: 'Line', + value: ' Some comment', + range: [9, 24], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 24 } + } + }] + }, + + 'switch (answer) { case 42: /* perfect */ bingo() }': { + type: 'Program', + body: [{ + type: 'SwitchStatement', + discriminant: { + type: 'Identifier', + name: 'answer', + range: [8, 14], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 14 } + } + }, + cases: [{ + type: 'SwitchCase', + test: { + type: 'Literal', + value: 42, + raw: '42', + range: [23, 25], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 25 } + } + }, + consequent: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'bingo', + range: [41, 46], + loc: { + start: { line: 1, column: 41 }, + end: { line: 1, column: 46 } + } + }, + 'arguments': [], + range: [41, 48], + loc: { + start: { line: 1, column: 41 }, + end: { line: 1, column: 48 } + } + }, + range: [41, 49], + loc: { + start: { line: 1, column: 41 }, + end: { line: 1, column: 49 } + } + }], + range: [18, 49], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 49 } + } + }], + range: [0, 50], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 50 } + } + }], + range: [0, 50], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 50 } + }, + comments: [{ + type: 'Block', + value: ' perfect ', + range: [27, 40], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 40 } + } + }] + } + + }, + + 'Numeric Literals': { + + '0': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0, + raw: '0', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + + '42': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42, + raw: '42', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + + '3': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 3, + raw: '3', + range: [0, 1] + }, + range: [0, 1] + }], + range: [0, 1], + tokens: [{ + type: 'Numeric', + value: '3', + range: [0, 1] + }] + }, + + '5': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 5, + raw: '5', + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + }, + tokens: [{ + type: 'Numeric', + value: '5', + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }] + }, + + '.14': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0.14, + raw: '.14', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + '3.14159': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 3.14159, + raw: '3.14159', + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + '6.02214179e+23': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 6.02214179e+23, + raw: '6.02214179e+23', + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + '1.492417830e-10': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 1.49241783e-10, + raw: '1.492417830e-10', + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + + '0x0': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0, + raw: '0x0', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + '0e+100': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0, + raw: '0e+100', + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + '0xabc': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0xabc, + raw: '0xabc', + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + '0xdef': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0xdef, + raw: '0xdef', + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + '0X1A': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0x1A, + raw: '0X1A', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + + '0x10': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0x10, + raw: '0x10', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + + '0x100': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0x100, + raw: '0x100', + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + '0X04': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 0X04, + raw: '0X04', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + + '02': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 2, + raw: '02', + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + + '012': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 10, + raw: '012', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + '0012': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 10, + raw: '0012', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + } + + }, + + 'String Literals': { + + '"Hello"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello', + raw: '"Hello"', + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + '"\\n\\r\\t\\v\\b\\f\\\\\\\'\\"\\0"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: '\n\r\t\x0B\b\f\\\'"\x00', + raw: '"\\n\\r\\t\\v\\b\\f\\\\\\\'\\"\\0"', + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + + '"\\u0061"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'a', + raw: '"\\u0061"', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + + '"\\x61"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'a', + raw: '"\\x61"', + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + '"\\u00"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'u00', + raw: '"\\u00"', + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + '"\\xt"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'xt', + raw: '"\\xt"', + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + '"Hello\\nworld"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello\nworld', + raw: '"Hello\\nworld"', + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + '"Hello\\\nworld"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Helloworld', + raw: '"Hello\\\nworld"', + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 14 } + } + }, + + '"Hello\\02World"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello\u0002World', + raw: '"Hello\\02World"', + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + + '"Hello\\012World"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello\u000AWorld', + raw: '"Hello\\012World"', + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + '"Hello\\122World"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello\122World', + raw: '"Hello\\122World"', + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + '"Hello\\0122World"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello\u000A2World', + raw: '"Hello\\0122World"', + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + + '"Hello\\312World"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello\u00CAWorld', + raw: '"Hello\\312World"', + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + '"Hello\\412World"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello\412World', + raw: '"Hello\\412World"', + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + '"Hello\\812World"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello812World', + raw: '"Hello\\812World"', + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + '"Hello\\712World"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello\712World', + raw: '"Hello\\712World"', + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + '"Hello\\0World"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello\u0000World', + raw: '"Hello\\0World"', + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + '"Hello\\\r\nworld"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Helloworld', + raw: '"Hello\\\r\nworld"', + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 15 } + } + }, + + '"Hello\\1World"': { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'Hello\u0001World', + raw: '"Hello\\1World"', + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + } + }, + + 'Regular Expression Literals': { + + 'var x = /[a-z]/i': { + type: 'Program', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: { + type: 'Literal', + value: '/[a-z]/i', + raw: '/[a-z]/i', + range: [8, 16], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 16 } + } + }, + range: [4, 16], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 16 } + } + }], + kind: 'var', + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }], + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + }, + tokens: [{ + type: 'Keyword', + value: 'var', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, { + type: 'Identifier', + value: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, { + type: 'Punctuator', + value: '=', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, { + type: 'RegularExpression', + value: '/[a-z]/i', + range: [8, 16], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 16 } + } + }] + }, + + 'var x = /[x-z]/i': { + type: 'Program', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5] + }, + init: { + type: 'Literal', + value: '/[x-z]/i', + raw: '/[x-z]/i', + range: [8, 16] + }, + range: [4, 16] + }], + kind: 'var', + range: [0, 16] + }], + range: [0, 16], + tokens: [{ + type: 'Keyword', + value: 'var', + range: [0, 3] + }, { + type: 'Identifier', + value: 'x', + range: [4, 5] + }, { + type: 'Punctuator', + value: '=', + range: [6, 7] + }, { + type: 'RegularExpression', + value: '/[x-z]/i', + range: [8, 16] + }] + }, + + 'var x = /[a-c]/i': { + type: 'Program', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: { + type: 'Literal', + value: '/[a-c]/i', + raw: '/[a-c]/i', + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 16 } + } + }, + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 16 } + } + }], + kind: 'var', + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + }, + tokens: [{ + type: 'Keyword', + value: 'var', + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, { + type: 'Identifier', + value: 'x', + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, { + type: 'Punctuator', + value: '=', + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, { + type: 'RegularExpression', + value: '/[a-c]/i', + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 16 } + } + }] + }, + + 'var x = /[P QR]/i': { + type: 'Program', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: { + type: 'Literal', + value: '/[P QR]/i', + raw: '/[P QR]/i', + range: [8, 17], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 17 } + } + }, + range: [4, 17], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 17 } + } + }], + kind: 'var', + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }], + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + }, + tokens: [{ + type: 'Keyword', + value: 'var', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, { + type: 'Identifier', + value: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, { + type: 'Punctuator', + value: '=', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, { + type: 'RegularExpression', + value: '/[P QR]/i', + range: [8, 17], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 17 } + } + }] + }, + + 'var x = /[\\]/]/': { + type: 'Program', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: { + type: 'Literal', + value: new RegExp('[\\]/]').toString(), + raw: '/[\\]/]/', + range: [8, 15], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 15 } + } + }, + range: [4, 15], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 15 } + } + }], + kind: 'var', + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }], + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + }, + tokens: [{ + type: 'Keyword', + value: 'var', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, { + type: 'Identifier', + value: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, { + type: 'Punctuator', + value: '=', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, { + type: 'RegularExpression', + value: '/[\\]/]/', + range: [8, 15], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 15 } + } + }] + }, + + 'var x = /foo\\/bar/': { + type: 'Program', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: { + type: 'Literal', + value: '/foo\\/bar/', + raw: '/foo\\/bar/', + range: [8, 18], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 18 } + } + }, + range: [4, 18], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 18 } + } + }], + kind: 'var', + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }], + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + }, + tokens: [{ + type: 'Keyword', + value: 'var', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, { + type: 'Identifier', + value: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, { + type: 'Punctuator', + value: '=', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, { + type: 'RegularExpression', + value: '/foo\\/bar/', + range: [8, 18], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 18 } + } + }] + }, + + 'var x = /=([^=\\s])+/g': { + type: 'Program', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: { + type: 'Literal', + value: '/=([^=\\s])+/g', + raw: '/=([^=\\s])+/g', + range: [8, 21], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 21 } + } + }, + range: [4, 21], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 21 } + } + }], + kind: 'var', + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }], + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + }, + tokens: [{ + type: 'Keyword', + value: 'var', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, { + type: 'Identifier', + value: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, { + type: 'Punctuator', + value: '=', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, { + type: 'RegularExpression', + value: '/=([^=\\s])+/g', + range: [8, 21], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 21 } + } + }] + }, + + 'var x = /[P QR]/\\u0067': { + type: 'Program', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: { + type: 'Literal', + value: '/[P QR]/g', + raw: '/[P QR]/\\u0067', + range: [8, 22], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 22 } + } + }, + range: [4, 22], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 22 } + } + }], + kind: 'var', + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }], + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + }, + tokens: [{ + type: 'Keyword', + value: 'var', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, { + type: 'Identifier', + value: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, { + type: 'Punctuator', + value: '=', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, { + type: 'RegularExpression', + value: '/[P QR]/\\u0067', + range: [8, 22], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 22 } + } + }] + }, + + 'var x = /[P QR]/\\g': { + type: 'Program', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: { + type: 'Literal', + value: '/[P QR]/g', + raw: '/[P QR]/\\g', + range: [8, 18], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 18 } + } + }, + range: [4, 18], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 18 } + } + }], + kind: 'var', + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }], + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + }, + tokens: [{ + type: 'Keyword', + value: 'var', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, { + type: 'Identifier', + value: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, { + type: 'Punctuator', + value: '=', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, { + type: 'RegularExpression', + value: '/[P QR]/\\g', + range: [8, 18], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 18 } + } + }] + } + + }, + + 'Left-Hand-Side Expression': { + + 'new Button': { + type: 'ExpressionStatement', + expression: { + type: 'NewExpression', + callee: { + type: 'Identifier', + name: 'Button', + range: [4, 10], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 10 } + } + }, + 'arguments': [], + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + }, + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + }, + + 'new Button()': { + type: 'ExpressionStatement', + expression: { + type: 'NewExpression', + callee: { + type: 'Identifier', + name: 'Button', + range: [4, 10], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 10 } + } + }, + 'arguments': [], + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + + 'new new foo': { + type: 'ExpressionStatement', + expression: { + type: 'NewExpression', + callee: { + type: 'NewExpression', + callee: { + type: 'Identifier', + name: 'foo', + range: [8, 11], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 11 } + } + }, + 'arguments': [], + range: [4, 11], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 11 } + } + }, + 'arguments': [], + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + + 'new new foo()': { + type: 'ExpressionStatement', + expression: { + type: 'NewExpression', + callee: { + type: 'NewExpression', + callee: { + type: 'Identifier', + name: 'foo', + range: [8, 11], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 11 } + } + }, + 'arguments': [], + range: [4, 13], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 13 } + } + }, + 'arguments': [], + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + + 'new foo().bar()': { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'MemberExpression', + computed: false, + object: { + type: 'NewExpression', + callee: { + type: 'Identifier', + name: 'foo', + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + 'arguments': [], + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + property: { + type: 'Identifier', + name: 'bar', + range: [10, 13], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + 'arguments': [], + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + range: [0, 15], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 15 } + } + }, + + 'new foo[bar]': { + type: 'ExpressionStatement', + expression: { + type: 'NewExpression', + callee: { + type: 'MemberExpression', + computed: true, + object: { + type: 'Identifier', + name: 'foo', + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + property: { + type: 'Identifier', + name: 'bar', + range: [8, 11], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 11 } + } + }, + range: [4, 12], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 12 } + } + }, + 'arguments': [], + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + + 'new foo.bar()': { + type: 'ExpressionStatement', + expression: { + type: 'NewExpression', + callee: { + type: 'MemberExpression', + computed: false, + object: { + type: 'Identifier', + name: 'foo', + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + property: { + type: 'Identifier', + name: 'bar', + range: [8, 11], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 11 } + } + }, + range: [4, 11], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 11 } + } + }, + 'arguments': [], + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + + '( new foo).bar()': { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'MemberExpression', + computed: false, + object: { + type: 'NewExpression', + callee: { + type: 'Identifier', + name: 'foo', + range: [6, 9], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 9 } + } + }, + 'arguments': [], + range: [2, 9], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 9 } + } + }, + property: { + type: 'Identifier', + name: 'bar', + range: [11, 14], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + 'arguments': [], + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + 'foo(bar, baz)': { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'foo', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'bar', + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, { + type: 'Identifier', + name: 'baz', + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }], + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + + '( foo )()': { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'foo', + range: [5, 8], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 8 } + } + }, + 'arguments': [], + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + + 'universe.milkyway': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: false, + object: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + property: { + type: 'Identifier', + name: 'milkyway', + range: [9, 17], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + + 'universe.milkyway.solarsystem': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: false, + object: { + type: 'MemberExpression', + computed: false, + object: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + property: { + type: 'Identifier', + name: 'milkyway', + range: [9, 17], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + property: { + type: 'Identifier', + name: 'solarsystem', + range: [18, 29], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 29 } + } + }, + range: [0, 29], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 29 } + } + }, + range: [0, 29], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 29 } + } + }, + + 'universe.milkyway.solarsystem.Earth': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: false, + object: { + type: 'MemberExpression', + computed: false, + object: { + type: 'MemberExpression', + computed: false, + object: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + property: { + type: 'Identifier', + name: 'milkyway', + range: [9, 17], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + property: { + type: 'Identifier', + name: 'solarsystem', + range: [18, 29], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 29 } + } + }, + range: [0, 29], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 29 } + } + }, + property: { + type: 'Identifier', + name: 'Earth', + range: [30, 35], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 35 } + } + }, + range: [0, 35], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 35 } + } + }, + range: [0, 35], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 35 } + } + }, + + 'universe[galaxyName, otherUselessName]': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: true, + object: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + property: { + type: 'SequenceExpression', + expressions: [{ + type: 'Identifier', + name: 'galaxyName', + range: [9, 19], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 19 } + } + }, { + type: 'Identifier', + name: 'otherUselessName', + range: [21, 37], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 37 } + } + }], + range: [9, 37], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 37 } + } + }, + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + } + }, + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + } + }, + + 'universe[galaxyName]': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: true, + object: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + property: { + type: 'Identifier', + name: 'galaxyName', + range: [9, 19], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 19 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + + 'universe[42].galaxies': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: false, + object: { + type: 'MemberExpression', + computed: true, + object: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + property: { + type: 'Literal', + value: 42, + raw: '42', + range: [9, 11], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + property: { + type: 'Identifier', + name: 'galaxies', + range: [13, 21], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + + 'universe(42).galaxies': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: false, + object: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + 'arguments': [{ + type: 'Literal', + value: 42, + raw: '42', + range: [9, 11], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 11 } + } + }], + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + property: { + type: 'Identifier', + name: 'galaxies', + range: [13, 21], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + + 'universe(42).galaxies(14, 3, 77).milkyway': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: false, + object: { + type: 'CallExpression', + callee: { + type: 'MemberExpression', + computed: false, + object: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + 'arguments': [{ + type: 'Literal', + value: 42, + raw: '42', + range: [9, 11], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 11 } + } + }], + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + property: { + type: 'Identifier', + name: 'galaxies', + range: [13, 21], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + 'arguments': [{ + type: 'Literal', + value: 14, + raw: '14', + range: [22, 24], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 24 } + } + }, { + type: 'Literal', + value: 3, + raw: '3', + range: [26, 27], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 27 } + } + }, { + type: 'Literal', + value: 77, + raw: '77', + range: [29, 31], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 31 } + } + }], + range: [0, 32], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 32 } + } + }, + property: { + type: 'Identifier', + name: 'milkyway', + range: [33, 41], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 41 } + } + }, + range: [0, 41], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 41 } + } + }, + range: [0, 41], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 41 } + } + }, + + 'earth.asia.Indonesia.prepareForElection(2014)': { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'MemberExpression', + computed: false, + object: { + type: 'MemberExpression', + computed: false, + object: { + type: 'MemberExpression', + computed: false, + object: { + type: 'Identifier', + name: 'earth', + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + property: { + type: 'Identifier', + name: 'asia', + range: [6, 10], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 10 } + } + }, + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + }, + property: { + type: 'Identifier', + name: 'Indonesia', + range: [11, 20], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 20 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + property: { + type: 'Identifier', + name: 'prepareForElection', + range: [21, 39], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 39 } + } + }, + range: [0, 39], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 39 } + } + }, + 'arguments': [{ + type: 'Literal', + value: 2014, + raw: '2014', + range: [40, 44], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 44 } + } + }], + range: [0, 45], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 45 } + } + }, + range: [0, 45], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 45 } + } + }, + + 'universe.if': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: false, + object: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + property: { + type: 'Identifier', + name: 'if', + range: [9, 11], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + + 'universe.true': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: false, + object: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + property: { + type: 'Identifier', + name: 'true', + range: [9, 13], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + + 'universe.false': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: false, + object: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + property: { + type: 'Identifier', + name: 'false', + range: [9, 14], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + 'universe.null': { + type: 'ExpressionStatement', + expression: { + type: 'MemberExpression', + computed: false, + object: { + type: 'Identifier', + name: 'universe', + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + property: { + type: 'Identifier', + name: 'null', + range: [9, 13], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + } + + }, + + 'Postfix Expressions': { + + 'x++': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + prefix: false, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + 'x--': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '--', + argument: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + prefix: false, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + 'eval++': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'eval', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + prefix: false, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'eval--': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '--', + argument: { + type: 'Identifier', + name: 'eval', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + prefix: false, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'arguments++': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'arguments', + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + prefix: false, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + + 'arguments--': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '--', + argument: { + type: 'Identifier', + name: 'arguments', + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + prefix: false, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + } + + }, + + 'Unary Operators': { + + '++x': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'x', + range: [2, 3], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 3 } + } + }, + prefix: true, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + '--x': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '--', + argument: { + type: 'Identifier', + name: 'x', + range: [2, 3], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 3 } + } + }, + prefix: true, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + '++eval': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'eval', + range: [2, 6], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 6 } + } + }, + prefix: true, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + '--eval': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '--', + argument: { + type: 'Identifier', + name: 'eval', + range: [2, 6], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 6 } + } + }, + prefix: true, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + '++arguments': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'arguments', + range: [2, 11], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 11 } + } + }, + prefix: true, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + + '--arguments': { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '--', + argument: { + type: 'Identifier', + name: 'arguments', + range: [2, 11], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 11 } + } + }, + prefix: true, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + + '+x': { + type: 'ExpressionStatement', + expression: { + type: 'UnaryExpression', + operator: '+', + argument: { + type: 'Identifier', + name: 'x', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + prefix: true, + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + + '-x': { + type: 'ExpressionStatement', + expression: { + type: 'UnaryExpression', + operator: '-', + argument: { + type: 'Identifier', + name: 'x', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + prefix: true, + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + + '~x': { + type: 'ExpressionStatement', + expression: { + type: 'UnaryExpression', + operator: '~', + argument: { + type: 'Identifier', + name: 'x', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + prefix: true, + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + + '!x': { + type: 'ExpressionStatement', + expression: { + type: 'UnaryExpression', + operator: '!', + argument: { + type: 'Identifier', + name: 'x', + range: [1, 2], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 2 } + } + }, + prefix: true, + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + }, + + 'void x': { + type: 'ExpressionStatement', + expression: { + type: 'UnaryExpression', + operator: 'void', + argument: { + type: 'Identifier', + name: 'x', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + prefix: true, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'delete x': { + type: 'ExpressionStatement', + expression: { + type: 'UnaryExpression', + operator: 'delete', + argument: { + type: 'Identifier', + name: 'x', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + prefix: true, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + + 'typeof x': { + type: 'ExpressionStatement', + expression: { + type: 'UnaryExpression', + operator: 'typeof', + argument: { + type: 'Identifier', + name: 'x', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + prefix: true, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + } + + }, + + 'Multiplicative Operators': { + + 'x * y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + 'x / y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '/', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + 'x % y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '%', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + } + + }, + + 'Additive Operators': { + + 'x + y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + 'x - y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '-', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + } + + }, + + 'Bitwise Shift Operator': { + + 'x << y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '<<', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'x >> y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '>>', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'x >>> y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '>>>', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + } + + }, + + 'Relational Operators': { + + 'x < y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '<', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + 'x > y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '>', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + 'x <= y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '<=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'x >= y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '>=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'x in y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: 'in', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'x instanceof y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: 'instanceof', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + 'x < y < z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '<', + left: { + type: 'BinaryExpression', + operator: '<', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + } + + }, + + 'Equality Operators': { + + 'x == y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '==', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'x != y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '!=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'x === y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '===', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'x !== y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '!==', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + } + + }, + + 'Binary Bitwise Operators': { + + 'x & y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '&', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + 'x ^ y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '^', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + 'x | y': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '|', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + } + + }, + + 'Binary Expressions': { + + 'x + y + z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x - y + z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'BinaryExpression', + operator: '-', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x + y - z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '-', + left: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x - y - z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '-', + left: { + type: 'BinaryExpression', + operator: '-', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x + y * z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [4, 9], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x + y / z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '+', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'BinaryExpression', + operator: '/', + left: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [4, 9], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x - y % z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '-', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'BinaryExpression', + operator: '%', + left: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [4, 9], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x * y * z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x * y / z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '/', + left: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x * y % z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '%', + left: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x % y * z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'BinaryExpression', + operator: '%', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x << y << z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '<<', + left: { + type: 'BinaryExpression', + operator: '<<', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + + 'x | y | z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '|', + left: { + type: 'BinaryExpression', + operator: '|', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x & y & z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '&', + left: { + type: 'BinaryExpression', + operator: '&', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x ^ y ^ z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '^', + left: { + type: 'BinaryExpression', + operator: '^', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x & y | z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '|', + left: { + type: 'BinaryExpression', + operator: '&', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x | y ^ z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '|', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'BinaryExpression', + operator: '^', + left: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [4, 9], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x | y & z': { + type: 'ExpressionStatement', + expression: { + type: 'BinaryExpression', + operator: '|', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'BinaryExpression', + operator: '&', + left: { + type: 'Identifier', + name: 'y', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [4, 9], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + } + + }, + + 'Binary Logical Operators': { + + 'x || y': { + type: 'ExpressionStatement', + expression: { + type: 'LogicalExpression', + operator: '||', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'x && y': { + type: 'ExpressionStatement', + expression: { + type: 'LogicalExpression', + operator: '&&', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'x || y || z': { + type: 'ExpressionStatement', + expression: { + type: 'LogicalExpression', + operator: '||', + left: { + type: 'LogicalExpression', + operator: '||', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + + 'x && y && z': { + type: 'ExpressionStatement', + expression: { + type: 'LogicalExpression', + operator: '&&', + left: { + type: 'LogicalExpression', + operator: '&&', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + + 'x || y && z': { + type: 'ExpressionStatement', + expression: { + type: 'LogicalExpression', + operator: '||', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'LogicalExpression', + operator: '&&', + left: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + range: [5, 11], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + + 'x || y ^ z': { + type: 'ExpressionStatement', + expression: { + type: 'LogicalExpression', + operator: '||', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'BinaryExpression', + operator: '^', + left: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + right: { + type: 'Identifier', + name: 'z', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + range: [5, 10], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 10 } + } + }, + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + }, + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + } + + }, + + 'Conditional Operator': { + + 'y ? 1 : 2': { + type: 'ExpressionStatement', + expression: { + type: 'ConditionalExpression', + test: { + type: 'Identifier', + name: 'y', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + consequent: { + type: 'Literal', + value: 1, + raw: '1', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + alternate: { + type: 'Literal', + value: 2, + raw: '2', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x && y ? 1 : 2': { + type: 'ExpressionStatement', + expression: { + type: 'ConditionalExpression', + test: { + type: 'LogicalExpression', + operator: '&&', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + consequent: { + type: 'Literal', + value: 1, + raw: '1', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + alternate: { + type: 'Literal', + value: 2, + raw: '2', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + } + + }, + + 'Assignment Operators': { + + 'x = 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [4, 6], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'eval = 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'eval', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [7, 9], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'arguments = 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'arguments', + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [12, 14], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + 'x *= 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '*=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'x /= 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '/=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'x %= 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '%=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'x += 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '+=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'x -= 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '-=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'x <<= 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '<<=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [6, 8], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + + 'x >>= 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '>>=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [6, 8], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + + 'x >>>= 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '>>>=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [7, 9], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'x &= 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '&=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'x ^= 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '^=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + 'x |= 42': { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '|=', + left: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [5, 7], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + } + + }, + + 'Block': { + + '{ foo }': { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'foo', + range: [2, 5], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 5 } + } + }, + range: [2, 6], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 6 } + } + }], + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + '{ doThis(); doThat(); }': { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'doThis', + range: [2, 8], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 8 } + } + }, + 'arguments': [], + range: [2, 10], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 10 } + } + }, + range: [2, 11], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 11 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'doThat', + range: [12, 18], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 18 } + } + }, + 'arguments': [], + range: [12, 20], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 20 } + } + }, + range: [12, 21], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 21 } + } + }], + range: [0, 23], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 23 } + } + }, + + '{}': { + type: 'BlockStatement', + body: [], + range: [0, 2], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 2 } + } + } + + }, + + 'Variable Statement': { + + 'var x': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: null, + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }], + kind: 'var', + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + 'var x, y;': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: null, + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'y', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + init: null, + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }], + kind: 'var', + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'var x = 42': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: { + type: 'Literal', + value: 42, + raw: '42', + range: [8, 10], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 10 } + } + }, + range: [4, 10], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 10 } + } + }], + kind: 'var', + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + }, + + 'var eval = 42, arguments = 42': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'eval', + range: [4, 8], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 8 } + } + }, + init: { + type: 'Literal', + value: 42, + raw: '42', + range: [11, 13], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 13 } + } + }, + range: [4, 13], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 13 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'arguments', + range: [15, 24], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 24 } + } + }, + init: { + type: 'Literal', + value: 42, + raw: '42', + range: [27, 29], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 29 } + } + }, + range: [15, 29], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 29 } + } + }], + kind: 'var', + range: [0, 29], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 29 } + } + }, + + 'var x = 14, y = 3, z = 1977': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: { + type: 'Literal', + value: 14, + raw: '14', + range: [8, 10], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 10 } + } + }, + range: [4, 10], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 10 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'y', + range: [12, 13], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 13 } + } + }, + init: { + type: 'Literal', + value: 3, + raw: '3', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }, + range: [12, 17], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 17 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'z', + range: [19, 20], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 20 } + } + }, + init: { + type: 'Literal', + value: 1977, + raw: '1977', + range: [23, 27], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 27 } + } + }, + range: [19, 27], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 27 } + } + }], + kind: 'var', + range: [0, 27], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + }, + + 'var implements, interface, package': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'implements', + range: [4, 14], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 14 } + } + }, + init: null, + range: [4, 14], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 14 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'interface', + range: [16, 25], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 25 } + } + }, + init: null, + range: [16, 25], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 25 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'package', + range: [27, 34], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 34 } + } + }, + init: null, + range: [27, 34], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 34 } + } + }], + kind: 'var', + range: [0, 34], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 34 } + } + }, + + 'var private, protected, public, static': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'private', + range: [4, 11], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 11 } + } + }, + init: null, + range: [4, 11], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 11 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'protected', + range: [13, 22], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 22 } + } + }, + init: null, + range: [13, 22], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 22 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'public', + range: [24, 30], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 30 } + } + }, + init: null, + range: [24, 30], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 30 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'static', + range: [32, 38], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 38 } + } + }, + init: null, + range: [32, 38], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 38 } + } + }], + kind: 'var', + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + } + } + + }, + + 'Let Statement': { + + 'let x': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: null, + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }], + kind: 'let', + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + + '{ let x }': { + type: 'BlockStatement', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + init: null, + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }], + kind: 'let', + range: [2, 8], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 8 } + } + }], + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + '{ let x = 42 }': { + type: 'BlockStatement', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + init: { + type: 'Literal', + value: 42, + raw: '42', + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + range: [6, 12], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 12 } + } + }], + kind: 'let', + range: [2, 13], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 13 } + } + }], + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + }, + + '{ let x = 14, y = 3, z = 1977 }': { + type: 'BlockStatement', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + init: { + type: 'Literal', + value: 14, + raw: '14', + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + range: [6, 12], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 12 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'y', + range: [14, 15], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 15 } + } + }, + init: { + type: 'Literal', + value: 3, + raw: '3', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }, + range: [14, 19], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 19 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'z', + range: [21, 22], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 22 } + } + }, + init: { + type: 'Literal', + value: 1977, + raw: '1977', + range: [25, 29], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 29 } + } + }, + range: [21, 29], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 29 } + } + }], + kind: 'let', + range: [2, 30], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 30 } + } + }], + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + } + } + + }, + + 'Const Statement': { + + 'const x = 42': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + init: { + type: 'Literal', + value: 42, + raw: '42', + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + range: [6, 12], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 12 } + } + }], + kind: 'const', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + + '{ const x = 42 }': { + type: 'BlockStatement', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + init: { + type: 'Literal', + value: 42, + raw: '42', + range: [12, 14], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 14 } + } + }, + range: [8, 14], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 14 } + } + }], + kind: 'const', + range: [2, 15], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 15 } + } + }], + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + + '{ const x = 14, y = 3, z = 1977 }': { + type: 'BlockStatement', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + init: { + type: 'Literal', + value: 14, + raw: '14', + range: [12, 14], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 14 } + } + }, + range: [8, 14], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 14 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'y', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }, + init: { + type: 'Literal', + value: 3, + raw: '3', + range: [20, 21], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 21 } + } + }, + range: [16, 21], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 21 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'z', + range: [23, 24], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 24 } + } + }, + init: { + type: 'Literal', + value: 1977, + raw: '1977', + range: [27, 31], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 31 } + } + }, + range: [23, 31], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 31 } + } + }], + kind: 'const', + range: [2, 32], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 32 } + } + }], + range: [0, 33], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 33 } + } + } + + }, + + 'Empty Statement': { + + ';': { + type: 'EmptyStatement', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + } + + }, + + 'Expression Statement': { + + 'x': { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + + 'x, y': { + type: 'ExpressionStatement', + expression: { + type: 'SequenceExpression', + expressions: [{ + type: 'Identifier', + name: 'x', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, { + type: 'Identifier', + name: 'y', + range: [3, 4], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 4 } + } + }], + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + + '\\u0061': { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'a', + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }, + + 'a\\u0061': { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'aa', + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 7], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 7 } + } + }, + + '\\ua': { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'ua', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + + 'a\\u': { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'au', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + } + + }, + + 'If Statement': { + + 'if (morning) goodMorning()': { + type: 'IfStatement', + test: { + type: 'Identifier', + name: 'morning', + range: [4, 11], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 11 } + } + }, + consequent: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'goodMorning', + range: [13, 24], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 24 } + } + }, + 'arguments': [], + range: [13, 26], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 26 } + } + }, + range: [13, 26], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 26 } + } + }, + alternate: null, + range: [0, 26], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 26 } + } + }, + + 'if (morning) (function(){})': { + type: 'IfStatement', + test: { + type: 'Identifier', + name: 'morning', + range: [4, 11], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 11 } + } + }, + consequent: { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [24, 26], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 26 } + } + }, + rest: null, + generator: false, + expression: false, + range: [14, 26], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 26 } + } + }, + range: [13, 27], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 27 } + } + }, + alternate: null, + range: [0, 27], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + }, + + 'if (morning) var x = 0;': { + type: 'IfStatement', + test: { + type: 'Identifier', + name: 'morning', + range: [4, 11], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 11 } + } + }, + consequent: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [17, 18], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 18 } + } + }, + init: { + type: 'Literal', + value: 0, + raw: '0', + range: [21, 22], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 22 } + } + }, + range: [17, 22], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 22 } + } + }], + kind: 'var', + range: [13, 23], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 23 } + } + }, + alternate: null, + range: [0, 23], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 23 } + } + }, + + 'if (morning) function a(){}': { + type: 'IfStatement', + test: { + type: 'Identifier', + name: 'morning', + range: [4, 11], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 11 } + } + }, + consequent: { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'a', + range: [22, 23], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 23 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [25, 27], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 27 } + } + }, + rest: null, + generator: false, + expression: false, + range: [13, 27], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 27 } + } + }, + alternate: null, + range: [0, 27], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + }, + + 'if (morning) goodMorning(); else goodDay()': { + type: 'IfStatement', + test: { + type: 'Identifier', + name: 'morning', + range: [4, 11], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 11 } + } + }, + consequent: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'goodMorning', + range: [13, 24], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 24 } + } + }, + 'arguments': [], + range: [13, 26], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 26 } + } + }, + range: [13, 27], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 27 } + } + }, + alternate: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'goodDay', + range: [33, 40], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 40 } + } + }, + 'arguments': [], + range: [33, 42], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 42 } + } + }, + range: [33, 42], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 42 } + } + }, + range: [0, 42], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 42 } + } + } + + }, + + 'Iteration Statements': { + + 'do keep(); while (true)': { + type: 'DoWhileStatement', + body: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'keep', + range: [3, 7], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 7 } + } + }, + 'arguments': [], + range: [3, 9], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 9 } + } + }, + range: [3, 10], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 10 } + } + }, + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [18, 22], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 23], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 23 } + } + }, + + 'do keep(); while (true);': { + type: 'DoWhileStatement', + body: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'keep', + range: [3, 7], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 7 } + } + }, + 'arguments': [], + range: [3, 9], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 9 } + } + }, + range: [3, 10], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 10 } + } + }, + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [18, 22], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + + 'do { x++; y--; } while (x < 10)': { + type: 'DoWhileStatement', + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'x', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + prefix: false, + range: [5, 8], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 8 } + } + }, + range: [5, 9], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 9 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '--', + argument: { + type: 'Identifier', + name: 'y', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + prefix: false, + range: [10, 13], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 13 } + } + }, + range: [10, 14], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 14 } + } + }], + range: [3, 16], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 16 } + } + }, + test: { + type: 'BinaryExpression', + operator: '<', + left: { + type: 'Identifier', + name: 'x', + range: [24, 25], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 25 } + } + }, + right: { + type: 'Literal', + value: 10, + raw: '10', + range: [28, 30], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 30 } + } + }, + range: [24, 30], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 30 } + } + }, + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + } + }, + + '{ do { } while (false) false }': { + type: 'BlockStatement', + body: [{ + type: 'DoWhileStatement', + body: { + type: 'BlockStatement', + body: [], + range: [5, 8], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 8 } + } + }, + test: { + type: 'Literal', + value: false, + raw: 'false', + range: [16, 21], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 21 } + } + }, + range: [2, 22], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 22 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: false, + raw: 'false', + range: [23, 28], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 28 } + } + }, + range: [23, 29], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 29 } + } + }], + range: [0, 30], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 30 } + } + }, + + 'while (true) doSomething()': { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [7, 11], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 11 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'doSomething', + range: [13, 24], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 24 } + } + }, + 'arguments': [], + range: [13, 26], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 26 } + } + }, + range: [13, 26], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 26 } + } + }, + range: [0, 26], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 26 } + } + }, + + 'while (x < 10) { x++; y--; }': { + type: 'WhileStatement', + test: { + type: 'BinaryExpression', + operator: '<', + left: { + type: 'Identifier', + name: 'x', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + right: { + type: 'Literal', + value: 10, + raw: '10', + range: [11, 13], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 13 } + } + }, + range: [7, 13], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 13 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'x', + range: [17, 18], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 18 } + } + }, + prefix: false, + range: [17, 20], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 20 } + } + }, + range: [17, 21], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 21 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '--', + argument: { + type: 'Identifier', + name: 'y', + range: [22, 23], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 23 } + } + }, + prefix: false, + range: [22, 25], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 25 } + } + }, + range: [22, 26], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 26 } + } + }], + range: [15, 28], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 28 } + } + }, + range: [0, 28], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 28 } + } + }, + + 'for(;;);': { + type: 'ForStatement', + init: null, + test: null, + update: null, + body: { + type: 'EmptyStatement', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + + 'for(;;){}': { + type: 'ForStatement', + init: null, + test: null, + update: null, + body: { + type: 'BlockStatement', + body: [], + range: [7, 9], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 9 } + } + }, + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + }, + + 'for(x = 0;;);': { + type: 'ForStatement', + init: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Literal', + value: 0, + raw: '0', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [4, 9], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 9 } + } + }, + test: null, + update: null, + body: { + type: 'EmptyStatement', + range: [12, 13], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + + 'for(var x = 0;;);': { + type: 'ForStatement', + init: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + init: { + type: 'Literal', + value: 0, + raw: '0', + range: [12, 13], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 13 } + } + }, + range: [8, 13], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 13 } + } + }], + kind: 'var', + range: [4, 13], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 13 } + } + }, + test: null, + update: null, + body: { + type: 'EmptyStatement', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + + 'for(let x = 0;;);': { + type: 'ForStatement', + init: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + init: { + type: 'Literal', + value: 0, + raw: '0', + range: [12, 13], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 13 } + } + }, + range: [8, 13], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 13 } + } + }], + kind: 'let', + range: [4, 13], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 13 } + } + }, + test: null, + update: null, + body: { + type: 'EmptyStatement', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }, + + 'for(var x = 0, y = 1;;);': { + type: 'ForStatement', + init: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + init: { + type: 'Literal', + value: 0, + raw: '0', + range: [12, 13], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 13 } + } + }, + range: [8, 13], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 13 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'y', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }, + init: { + type: 'Literal', + value: 1, + raw: '1', + range: [19, 20], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 20 } + } + }, + range: [15, 20], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 20 } + } + }], + kind: 'var', + range: [4, 20], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 20 } + } + }, + test: null, + update: null, + body: { + type: 'EmptyStatement', + range: [23, 24], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 24 } + } + }, + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + + 'for(x = 0; x < 42;);': { + type: 'ForStatement', + init: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Literal', + value: 0, + raw: '0', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [4, 9], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 9 } + } + }, + test: { + type: 'BinaryExpression', + operator: '<', + left: { + type: 'Identifier', + name: 'x', + range: [11, 12], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 12 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + range: [11, 17], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 17 } + } + }, + update: null, + body: { + type: 'EmptyStatement', + range: [19, 20], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 20 } + } + }, + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + + 'for(x = 0; x < 42; x++);': { + type: 'ForStatement', + init: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Literal', + value: 0, + raw: '0', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [4, 9], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 9 } + } + }, + test: { + type: 'BinaryExpression', + operator: '<', + left: { + type: 'Identifier', + name: 'x', + range: [11, 12], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 12 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + range: [11, 17], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 17 } + } + }, + update: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'x', + range: [19, 20], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 20 } + } + }, + prefix: false, + range: [19, 22], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 22 } + } + }, + body: { + type: 'EmptyStatement', + range: [23, 24], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 24 } + } + }, + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + + 'for(x = 0; x < 42; x++) process(x);': { + type: 'ForStatement', + init: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Literal', + value: 0, + raw: '0', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + range: [4, 9], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 9 } + } + }, + test: { + type: 'BinaryExpression', + operator: '<', + left: { + type: 'Identifier', + name: 'x', + range: [11, 12], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 12 } + } + }, + right: { + type: 'Literal', + value: 42, + raw: '42', + range: [15, 17], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 17 } + } + }, + range: [11, 17], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 17 } + } + }, + update: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'x', + range: [19, 20], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 20 } + } + }, + prefix: false, + range: [19, 22], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 22 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'process', + range: [24, 31], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 31 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'x', + range: [32, 33], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 33 } + } + }], + range: [24, 34], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 34 } + } + }, + range: [24, 35], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 35 } + } + }, + range: [0, 35], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 35 } + } + }, + + 'for(x in list) process(x);': { + type: 'ForInStatement', + left: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + right: { + type: 'Identifier', + name: 'list', + range: [9, 13], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 13 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'process', + range: [15, 22], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 22 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'x', + range: [23, 24], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 24 } + } + }], + range: [15, 25], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 25 } + } + }, + range: [15, 26], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 26 } + } + }, + each: false, + range: [0, 26], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 26 } + } + }, + + 'for (var x in list) process(x);': { + type: 'ForInStatement', + left: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + init: null, + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }], + kind: 'var', + range: [5, 10], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 10 } + } + }, + right: { + type: 'Identifier', + name: 'list', + range: [14, 18], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 18 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'process', + range: [20, 27], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 27 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'x', + range: [28, 29], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 29 } + } + }], + range: [20, 30], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 30 } + } + }, + range: [20, 31], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 31 } + } + }, + each: false, + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + } + }, + + 'for (var x = 42 in list) process(x);': { + type: 'ForInStatement', + left: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + init: { + type: 'Literal', + value: 42, + raw: '42', + range: [13, 15], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 15 } + } + }, + range: [9, 15], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 15 } + } + }], + kind: 'var', + range: [5, 15], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 15 } + } + }, + right: { + type: 'Identifier', + name: 'list', + range: [19, 23], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 23 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'process', + range: [25, 32], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 32 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'x', + range: [33, 34], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 34 } + } + }], + range: [25, 35], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 35 } + } + }, + range: [25, 36], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 36 } + } + }, + each: false, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + } + }, + + 'for (let x in list) process(x);': { + type: 'ForInStatement', + left: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + init: null, + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }], + kind: 'let', + range: [5, 10], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 10 } + } + }, + right: { + type: 'Identifier', + name: 'list', + range: [14, 18], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 18 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'process', + range: [20, 27], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 27 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'x', + range: [28, 29], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 29 } + } + }], + range: [20, 30], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 30 } + } + }, + range: [20, 31], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 31 } + } + }, + each: false, + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + } + }, + + 'for (let x = 42 in list) process(x);': { + type: 'ForInStatement', + left: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + init: { + type: 'Literal', + value: 42, + raw: '42', + range: [13, 15], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 15 } + } + }, + range: [9, 15], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 15 } + } + }], + kind: 'let', + range: [5, 15], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 15 } + } + }, + right: { + type: 'Identifier', + name: 'list', + range: [19, 23], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 23 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'process', + range: [25, 32], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 32 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'x', + range: [33, 34], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 34 } + } + }], + range: [25, 35], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 35 } + } + }, + range: [25, 36], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 36 } + } + }, + each: false, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + } + }, + + 'for (var i = function() { return 10 in [] } in list) process(x);': { + type: 'ForInStatement', + left: { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'i', + range: [9, 10], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 10 } + } + }, + init: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ReturnStatement', + argument: { + type: 'BinaryExpression', + operator: 'in', + left: { + type: 'Literal', + value: 10, + raw: '10', + range: [33, 35], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 35 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [39, 41], + loc: { + start: { line: 1, column: 39 }, + end: { line: 1, column: 41 } + } + }, + range: [33, 41], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 41 } + } + }, + range: [26, 42], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 42 } + } + }], + range: [24, 43], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 43 } + } + }, + rest: null, + generator: false, + expression: false, + range: [13, 43], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 43 } + } + }, + range: [9, 43], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 43 } + } + }], + kind: 'var', + range: [5, 43], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 43 } + } + }, + right: { + type: 'Identifier', + name: 'list', + range: [47, 51], + loc: { + start: { line: 1, column: 47 }, + end: { line: 1, column: 51 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'process', + range: [53, 60], + loc: { + start: { line: 1, column: 53 }, + end: { line: 1, column: 60 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'x', + range: [61, 62], + loc: { + start: { line: 1, column: 61 }, + end: { line: 1, column: 62 } + } + }], + range: [53, 63], + loc: { + start: { line: 1, column: 53 }, + end: { line: 1, column: 63 } + } + }, + range: [53, 64], + loc: { + start: { line: 1, column: 53 }, + end: { line: 1, column: 64 } + } + }, + each: false, + range: [0, 64], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 64 } + } + } + + }, + + 'continue statement': { + + 'while (true) { continue; }': { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [7, 11], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 11 } + } + }, + body: { + type: 'BlockStatement', + body: [ + { + type: 'ContinueStatement', + label: null, + range: [15, 24], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 24 } + } + } + ], + range: [13, 26], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 26 } + } + }, + range: [0, 26], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 26 } + } + }, + + 'while (true) { continue }': { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [7, 11], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 11 } + } + }, + body: { + type: 'BlockStatement', + body: [ + { + type: 'ContinueStatement', + label: null, + range: [15, 24], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 24 } + } + } + ], + range: [13, 25], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 25 } + } + }, + range: [0, 25], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 25 } + } + }, + + 'done: while (true) { continue done }': { + type: 'LabeledStatement', + label: { + type: 'Identifier', + name: 'done', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + body: { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [13, 17], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 17 } + } + }, + body: { + type: 'BlockStatement', + body: [ + { + type: 'ContinueStatement', + label: { + type: 'Identifier', + name: 'done', + range: [30, 34], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 34 } + } + }, + range: [21, 35], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 35 } + } + } + ], + range: [19, 36], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 36 } + } + }, + range: [6, 36], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 36 } + } + }, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + } + }, + + 'done: while (true) { continue done; }': { + type: 'LabeledStatement', + label: { + type: 'Identifier', + name: 'done', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + body: { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [13, 17], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 17 } + } + }, + body: { + type: 'BlockStatement', + body: [ + { + type: 'ContinueStatement', + label: { + type: 'Identifier', + name: 'done', + range: [30, 34], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 34 } + } + }, + range: [21, 35], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 35 } + } + } + ], + range: [19, 37], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 37 } + } + }, + range: [6, 37], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 37 } + } + }, + range: [0, 37], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 37 } + } + } + + }, + + 'break statement': { + + 'while (true) { break }': { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [7, 11], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 11 } + } + }, + body: { + type: 'BlockStatement', + body: [ + { + type: 'BreakStatement', + label: null, + range: [15, 21], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 21 } + } + } + ], + range: [13, 22], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + + 'done: while (true) { break done }': { + type: 'LabeledStatement', + label: { + type: 'Identifier', + name: 'done', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + body: { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [13, 17], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 17 } + } + }, + body: { + type: 'BlockStatement', + body: [ + { + type: 'BreakStatement', + label: { + type: 'Identifier', + name: 'done', + range: [27, 31], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 31 } + } + }, + range: [21, 32], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 32 } + } + } + ], + range: [19, 33], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 33 } + } + }, + range: [6, 33], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 33 } + } + }, + range: [0, 33], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 33 } + } + }, + + 'done: while (true) { break done; }': { + type: 'LabeledStatement', + label: { + type: 'Identifier', + name: 'done', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + body: { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [13, 17], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 17 } + } + }, + body: { + type: 'BlockStatement', + body: [ + { + type: 'BreakStatement', + label: { + type: 'Identifier', + name: 'done', + range: [27, 31], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 31 } + } + }, + range: [21, 32], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 32 } + } + } + ], + range: [19, 34], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 34 } + } + }, + range: [6, 34], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 34 } + } + }, + range: [0, 34], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 34 } + } + } + + }, + + 'return statement': { + + '(function(){ return })': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [ + { + type: 'ReturnStatement', + argument: null, + range: [13, 20], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 20 } + } + } + ], + range: [11, 21], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 21 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 21], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 21 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + }, + + '(function(){ return; })': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [ + { + type: 'ReturnStatement', + argument: null, + range: [13, 20], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 20 } + } + } + ], + range: [11, 22], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 22 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 22], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 23], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 23 } + } + }, + + '(function(){ return x; })': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [ + { + type: 'ReturnStatement', + argument: { + type: 'Identifier', + name: 'x', + range: [20, 21], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 21 } + } + }, + range: [13, 22], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 22 } + } + } + ], + range: [11, 24], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 24 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 24], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 24 } + } + }, + range: [0, 25], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 25 } + } + }, + + '(function(){ return x * y })': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [ + { + type: 'ReturnStatement', + argument: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'Identifier', + name: 'x', + range: [20, 21], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 21 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [24, 25], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 25 } + } + }, + range: [20, 25], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 25 } + } + }, + range: [13, 26], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 26 } + } + } + ], + range: [11, 27], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 27 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 27], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 27 } + } + }, + range: [0, 28], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 28 } + } + } + }, + + 'with statement': { + + 'with (x) foo = bar': { + type: 'WithStatement', + object: { + type: 'Identifier', + name: 'x', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'foo', + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + right: { + type: 'Identifier', + name: 'bar', + range: [15, 18], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 18 } + } + }, + range: [9, 18], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 18 } + } + }, + range: [9, 18], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 18 } + } + }, + range: [0, 18], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 18 } + } + }, + + 'with (x) foo = bar;': { + type: 'WithStatement', + object: { + type: 'Identifier', + name: 'x', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + body: { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'foo', + range: [9, 12], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 12 } + } + }, + right: { + type: 'Identifier', + name: 'bar', + range: [15, 18], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 18 } + } + }, + range: [9, 18], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 18 } + } + }, + range: [9, 19], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 19 } + } + }, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + + 'with (x) { foo = bar }': { + type: 'WithStatement', + object: { + type: 'Identifier', + name: 'x', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'foo', + range: [11, 14], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 14 } + } + }, + right: { + type: 'Identifier', + name: 'bar', + range: [17, 20], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 20 } + } + }, + range: [11, 20], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 20 } + } + }, + range: [11, 21], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 21 } + } + }], + range: [9, 22], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 22 } + } + }, + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + } + } + + }, + + 'switch statement': { + + 'switch (x) {}': { + type: 'SwitchStatement', + discriminant: { + type: 'Identifier', + name: 'x', + range: [8, 9], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 9 } + } + }, + cases:[], + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, + + 'switch (answer) { case 42: hi(); break; }': { + type: 'SwitchStatement', + discriminant: { + type: 'Identifier', + name: 'answer', + range: [8, 14], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 14 } + } + }, + cases: [{ + type: 'SwitchCase', + test: { + type: 'Literal', + value: 42, + raw: '42', + range: [23, 25], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 25 } + } + }, + consequent: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'hi', + range: [27, 29], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 29 } + } + }, + 'arguments': [], + range: [27, 31], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 31 } + } + }, + range: [27, 32], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 32 } + } + }, { + type: 'BreakStatement', + label: null, + range: [33, 39], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 39 } + } + }], + range: [18, 39], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 39 } + } + }], + range: [0, 41], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 41 } + } + }, + + 'switch (answer) { case 42: hi(); break; default: break }': { + type: 'SwitchStatement', + discriminant: { + type: 'Identifier', + name: 'answer', + range: [8, 14], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 14 } + } + }, + cases: [{ + type: 'SwitchCase', + test: { + type: 'Literal', + value: 42, + raw: '42', + range: [23, 25], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 25 } + } + }, + consequent: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'hi', + range: [27, 29], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 29 } + } + }, + 'arguments': [], + range: [27, 31], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 31 } + } + }, + range: [27, 32], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 32 } + } + }, { + type: 'BreakStatement', + label: null, + range: [33, 39], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 39 } + } + }], + range: [18, 39], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 39 } + } + }, { + type: 'SwitchCase', + test: null, + consequent: [{ + type: 'BreakStatement', + label: null, + range: [49, 55], + loc: { + start: { line: 1, column: 49 }, + end: { line: 1, column: 55 } + } + }], + range: [40, 55], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 55 } + } + }], + range: [0, 56], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 56 } + } + } + + }, + + 'Labelled Statements': { + + 'start: for (;;) break start': { + type: 'LabeledStatement', + label: { + type: 'Identifier', + name: 'start', + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + body: { + type: 'ForStatement', + init: null, + test: null, + update: null, + body: { + type: 'BreakStatement', + label: { + type: 'Identifier', + name: 'start', + range: [22, 27], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 27 } + } + }, + range: [16, 27], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 27 } + } + }, + range: [7, 27], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 27 } + } + }, + range: [0, 27], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 27 } + } + }, + + 'start: while (true) break start': { + type: 'LabeledStatement', + label: { + type: 'Identifier', + name: 'start', + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + body: { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [14, 18], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 18 } + } + }, + body: { + type: 'BreakStatement', + label: { + type: 'Identifier', + name: 'start', + range: [26, 31], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 31 } + } + }, + range: [20, 31], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 31 } + } + }, + range: [7, 31], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 31 } + } + }, + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + } + } + + }, + + 'throw statement': { + + 'throw x;': { + type: 'ThrowStatement', + argument: { + type: 'Identifier', + name: 'x', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + range: [0, 8], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 8 } + } + }, + + 'throw x * y': { + type: 'ThrowStatement', + argument: { + type: 'BinaryExpression', + operator: '*', + left: { + type: 'Identifier', + name: 'x', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + right: { + type: 'Identifier', + name: 'y', + range: [10, 11], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 11 } + } + }, + range: [6, 11], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 11 } + } + }, + range: [0, 11], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 11 } + } + }, + + 'throw { message: "Error" }': { + type: 'ThrowStatement', + argument: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'message', + range: [8, 15], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 15 } + } + }, + value: { + type: 'Literal', + value: 'Error', + raw: '"Error"', + range: [17, 24], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 24 } + } + }, + kind: 'init', + range: [8, 24], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 24 } + } + }], + range: [6, 26], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 26 } + } + }, + range: [0, 26], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 26 } + } + } + + }, + + 'try statement': { + + 'try { } catch (e) { }': { + type: 'TryStatement', + block: { + type: 'BlockStatement', + body: [], + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + guardedHandlers: [], + handlers: [{ + type: 'CatchClause', + param: { + type: 'Identifier', + name: 'e', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }, + body: { + type: 'BlockStatement', + body: [], + range: [18, 21], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 21 } + } + }, + range: [8, 21], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 21 } + } + }], + finalizer: null, + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + } + }, + + 'try { } catch (eval) { }': { + type: 'TryStatement', + block: { + type: 'BlockStatement', + body: [], + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + guardedHandlers: [], + handlers: [{ + type: 'CatchClause', + param: { + type: 'Identifier', + name: 'eval', + range: [15, 19], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 19 } + } + }, + body: { + type: 'BlockStatement', + body: [], + range: [21, 24], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 24 } + } + }, + range: [8, 24], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 24 } + } + }], + finalizer: null, + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + + 'try { } catch (arguments) { }': { + type: 'TryStatement', + block: { + type: 'BlockStatement', + body: [], + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + guardedHandlers: [], + handlers: [{ + type: 'CatchClause', + param: { + type: 'Identifier', + name: 'arguments', + range: [15, 24], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 24 } + } + }, + body: { + type: 'BlockStatement', + body: [], + range: [26, 29], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 29 } + } + }, + range: [8, 29], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 29 } + } + }], + finalizer: null, + range: [0, 29], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 29 } + } + }, + + 'try { } catch (e) { say(e) }': { + type: 'TryStatement', + block: { + type: 'BlockStatement', + body: [], + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + guardedHandlers: [], + handlers: [{ + type: 'CatchClause', + param: { + type: 'Identifier', + name: 'e', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'say', + range: [20, 23], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 23 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'e', + range: [24, 25], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 25 } + } + }], + range: [20, 26], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 26 } + } + }, + range: [20, 27], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 27 } + } + }], + range: [18, 28], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 28 } + } + }, + range: [8, 28], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 28 } + } + }], + finalizer: null, + range: [0, 28], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 28 } + } + }, + + 'try { } finally { cleanup(stuff) }': { + type: 'TryStatement', + block: { + type: 'BlockStatement', + body: [], + range: [4, 7], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 7 } + } + }, + guardedHandlers: [], + handlers: [], + finalizer: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'cleanup', + range: [18, 25], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 25 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'stuff', + range: [26, 31], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 31 } + } + }], + range: [18, 32], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 32 } + } + }, + range: [18, 33], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 33 } + } + }], + range: [16, 34], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 34 } + } + }, + range: [0, 34], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 34 } + } + }, + + 'try { doThat(); } catch (e) { say(e) }': { + type: 'TryStatement', + block: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'doThat', + range: [6, 12], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 12 } + } + }, + 'arguments': [], + range: [6, 14], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 14 } + } + }, + range: [6, 15], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 15 } + } + }], + range: [4, 17], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 17 } + } + }, + guardedHandlers: [], + handlers: [{ + type: 'CatchClause', + param: { + type: 'Identifier', + name: 'e', + range: [25, 26], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 26 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'say', + range: [30, 33], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 33 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'e', + range: [34, 35], + loc: { + start: { line: 1, column: 34 }, + end: { line: 1, column: 35 } + } + }], + range: [30, 36], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 36 } + } + }, + range: [30, 37], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 37 } + } + }], + range: [28, 38], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 38 } + } + }, + range: [18, 38], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 38 } + } + }], + finalizer: null, + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + } + }, + + 'try { doThat(); } catch (e) { say(e) } finally { cleanup(stuff) }': { + type: 'TryStatement', + block: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'doThat', + range: [6, 12], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 12 } + } + }, + 'arguments': [], + range: [6, 14], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 14 } + } + }, + range: [6, 15], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 15 } + } + }], + range: [4, 17], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 17 } + } + }, + guardedHandlers: [], + handlers: [{ + type: 'CatchClause', + param: { + type: 'Identifier', + name: 'e', + range: [25, 26], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 26 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'say', + range: [30, 33], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 33 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'e', + range: [34, 35], + loc: { + start: { line: 1, column: 34 }, + end: { line: 1, column: 35 } + } + }], + range: [30, 36], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 36 } + } + }, + range: [30, 37], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 37 } + } + }], + range: [28, 38], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 38 } + } + }, + range: [18, 38], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 38 } + } + }], + finalizer: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'cleanup', + range: [49, 56], + loc: { + start: { line: 1, column: 49 }, + end: { line: 1, column: 56 } + } + }, + 'arguments': [{ + type: 'Identifier', + name: 'stuff', + range: [57, 62], + loc: { + start: { line: 1, column: 57 }, + end: { line: 1, column: 62 } + } + }], + range: [49, 63], + loc: { + start: { line: 1, column: 49 }, + end: { line: 1, column: 63 } + } + }, + range: [49, 64], + loc: { + start: { line: 1, column: 49 }, + end: { line: 1, column: 64 } + } + }], + range: [47, 65], + loc: { + start: { line: 1, column: 47 }, + end: { line: 1, column: 65 } + } + }, + range: [0, 65], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 65 } + } + } + + }, + + 'debugger statement': { + + 'debugger;': { + type: 'DebuggerStatement', + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 9 } + } + } + + }, + + 'Function Definition': { + + 'function hello() { sayHi(); }': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'hello', + range: [9, 14], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 14 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'sayHi', + range: [19, 24], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 24 } + } + }, + 'arguments': [], + range: [19, 26], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 26 } + } + }, + range: [19, 27], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 27 } + } + }], + range: [17, 29], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 29 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 29], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 29 } + } + }, + + 'function eval() { }': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'eval', + range: [9, 13], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 13 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [16, 19], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 19 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + } + }, + + 'function arguments() { }': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'arguments', + range: [9, 18], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 18 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [21, 24], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 24 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + } + }, + + 'function test(t, t) { }': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'test', + range: [9, 13], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 13 } + } + }, + params: [{ + type: 'Identifier', + name: 't', + range: [14, 15], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 15 } + } + }, { + type: 'Identifier', + name: 't', + range: [17, 18], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 18 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [20, 23], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 23 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 23], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 23 } + } + }, + + '(function test(t, t) { })': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'test', + range: [10, 14], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 14 } + } + }, + params: [{ + type: 'Identifier', + name: 't', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }, { + type: 'Identifier', + name: 't', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [21, 24], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 24 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 24], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 24 } + } + }, + range: [0, 25], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 25 } + } + }, + + 'function eval() { function inner() { "use strict" } }': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'eval', + range: [9, 13], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 13 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'inner', + range: [27, 32], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 32 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '\"use strict\"', + range: [37, 49], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 49 } + } + }, + range: [37, 50], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 50 } + } + }], + range: [35, 51], + loc: { + start: { line: 1, column: 35 }, + end: { line: 1, column: 51 } + } + }, + rest: null, + generator: false, + expression: false, + range: [18, 51], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 51 } + } + }], + range: [16, 53], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 53 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 53], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 53 } + } + }, + + 'function hello(a) { sayHi(); }': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'hello', + range: [9, 14], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 14 } + } + }, + params: [{ + type: 'Identifier', + name: 'a', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'sayHi', + range: [20, 25], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 25 } + } + }, + 'arguments': [], + range: [20, 27], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 27 } + } + }, + range: [20, 28], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 28 } + } + }], + range: [18, 30], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 30 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 30], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 30 } + } + }, + + 'function hello(a, b) { sayHi(); }': { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'hello', + range: [9, 14], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 14 } + } + }, + params: [{ + type: 'Identifier', + name: 'a', + range: [15, 16], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 16 } + } + }, { + type: 'Identifier', + name: 'b', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'sayHi', + range: [23, 28], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 28 } + } + }, + 'arguments': [], + range: [23, 30], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 30 } + } + }, + range: [23, 31], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 31 } + } + }], + range: [21, 33], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 33 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 33], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 33 } + } + }, + + 'var hi = function() { sayHi() };': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'hi', + range: [4, 6], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 6 } + } + }, + init: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'sayHi', + range: [22, 27], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 27 } + } + }, + 'arguments': [], + range: [22, 29], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 29 } + } + }, + range: [22, 30], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 30 } + } + }], + range: [20, 31], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 31 } + } + }, + rest: null, + generator: false, + expression: false, + range: [9, 31], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 31 } + } + }, + range: [4, 31], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 31 } + } + }], + kind: 'var', + range: [0, 32], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 32 } + } + }, + + 'var hi = function eval() { };': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'hi', + range: [4, 6], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 6 } + } + }, + init: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'eval', + range: [18, 22], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 22 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [25, 28], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 28 } + } + }, + rest: null, + generator: false, + expression: false, + range: [9, 28], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 28 } + } + }, + range: [4, 28], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 28 } + } + }], + kind: 'var', + range: [0, 29], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 29 } + } + }, + + 'var hi = function arguments() { };': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'hi', + range: [4, 6], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 6 } + } + }, + init: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'arguments', + range: [18, 27], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 27 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [30, 33], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 33 } + } + }, + rest: null, + generator: false, + expression: false, + range: [9, 33], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 33 } + } + }, + range: [4, 33], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 33 } + } + }], + kind: 'var', + range: [0, 34], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 34 } + } + }, + + 'var hello = function hi() { sayHi() };': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'hello', + range: [4, 9], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 9 } + } + }, + init: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'hi', + range: [21, 23], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 23 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'sayHi', + range: [28, 33], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 33 } + } + }, + 'arguments': [], + range: [28, 35], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 35 } + } + }, + range: [28, 36], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 36 } + } + }], + range: [26, 37], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 37 } + } + }, + rest: null, + generator: false, + expression: false, + range: [12, 37], + loc: { + start: { line: 1, column: 12 }, + end: { line: 1, column: 37 } + } + }, + range: [4, 37], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 37 } + } + }], + kind: 'var', + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + } + }, + + '(function(){})': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [11, 13], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 13 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 13], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 13 } + } + }, + range: [0, 14], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 14 } + } + } + + }, + + 'Automatic semicolon insertion': { + + '{ x\n++y }': { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'x', + range: [2, 3], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 3 } + } + }, + range: [2, 4], + loc: { + start: { line: 1, column: 2 }, + end: { line: 2, column: 0 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'y', + range: [6, 7], + loc: { + start: { line: 2, column: 2 }, + end: { line: 2, column: 3 } + } + }, + prefix: true, + range: [4, 7], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 3 } + } + }, + range: [4, 8], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 4 } + } + }], + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 5 } + } + }, + + '{ x\n--y }': { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'x', + range: [2, 3], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 3 } + } + }, + range: [2, 4], + loc: { + start: { line: 1, column: 2 }, + end: { line: 2, column: 0 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '--', + argument: { + type: 'Identifier', + name: 'y', + range: [6, 7], + loc: { + start: { line: 2, column: 2 }, + end: { line: 2, column: 3 } + } + }, + prefix: true, + range: [4, 7], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 3 } + } + }, + range: [4, 8], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 4 } + } + }], + range: [0, 9], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 5 } + } + }, + + 'var x /* comment */;': { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + init: null, + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }], + kind: 'var', + range: [0, 20], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 20 } + } + }, + + '{ var x = 14, y = 3\nz; }': { + type: 'BlockStatement', + body: [{ + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [6, 7], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 7 } + } + }, + init: { + type: 'Literal', + value: 14, + raw: '14', + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + range: [6, 12], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 12 } + } + }, { + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'y', + range: [14, 15], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 15 } + } + }, + init: { + type: 'Literal', + value: 3, + raw: '3', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }, + range: [14, 19], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 19 } + } + }], + kind: 'var', + range: [2, 20], + loc: { + start: { line: 1, column: 2 }, + end: { line: 2, column: 0 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'z', + range: [20, 21], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 1 } + } + }, + range: [20, 22], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 2 } + } + }], + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 4 } + } + }, + + 'while (true) { continue\nthere; }': { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [7, 11], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 11 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'ContinueStatement', + label: null, + range: [15, 23], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 23 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'there', + range: [24, 29], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 5 } + } + }, + range: [24, 30], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 6 } + } + }], + range: [13, 32], + loc: { + start: { line: 1, column: 13 }, + end: { line: 2, column: 8 } + } + }, + range: [0, 32], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 8 } + } + }, + + 'while (true) { continue // Comment\nthere; }': { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [7, 11], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 11 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'ContinueStatement', + label: null, + range: [15, 23], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 23 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'there', + range: [35, 40], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 5 } + } + }, + range: [35, 41], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 6 } + } + }], + range: [13, 43], + loc: { + start: { line: 1, column: 13 }, + end: { line: 2, column: 8 } + } + }, + range: [0, 43], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 8 } + } + }, + + 'while (true) { continue /* Multiline\nComment */there; }': { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [7, 11], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 11 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'ContinueStatement', + label: null, + range: [15, 23], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 23 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'there', + range: [47, 52], + loc: { + start: { line: 2, column: 10 }, + end: { line: 2, column: 15 } + } + }, + range: [47, 53], + loc: { + start: { line: 2, column: 10 }, + end: { line: 2, column: 16 } + } + }], + range: [13, 55], + loc: { + start: { line: 1, column: 13 }, + end: { line: 2, column: 18 } + } + }, + range: [0, 55], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 18 } + } + }, + + 'while (true) { break\nthere; }': { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [7, 11], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 11 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'BreakStatement', + label: null, + range: [15, 20], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 20 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'there', + range: [21, 26], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 5 } + } + }, + range: [21, 27], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 6 } + } + }], + range: [13, 29], + loc: { + start: { line: 1, column: 13 }, + end: { line: 2, column: 8 } + } + }, + range: [0, 29], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 8 } + } + }, + + 'while (true) { break // Comment\nthere; }': { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [7, 11], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 11 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'BreakStatement', + label: null, + range: [15, 20], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 20 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'there', + range: [32, 37], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 5 } + } + }, + range: [32, 38], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 6 } + } + }], + range: [13, 40], + loc: { + start: { line: 1, column: 13 }, + end: { line: 2, column: 8 } + } + }, + range: [0, 40], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 8 } + } + }, + + 'while (true) { break /* Multiline\nComment */there; }': { + type: 'WhileStatement', + test: { + type: 'Literal', + value: true, + raw: 'true', + range: [7, 11], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 11 } + } + }, + body: { + type: 'BlockStatement', + body: [{ + type: 'BreakStatement', + label: null, + range: [15, 20], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 20 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'there', + range: [44, 49], + loc: { + start: { line: 2, column: 10 }, + end: { line: 2, column: 15 } + } + }, + range: [44, 50], + loc: { + start: { line: 2, column: 10 }, + end: { line: 2, column: 16 } + } + }], + range: [13, 52], + loc: { + start: { line: 1, column: 13 }, + end: { line: 2, column: 18 } + } + }, + range: [0, 52], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 18 } + } + }, + + '(function(){ return\nx; })': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [ + { + type: 'ReturnStatement', + argument: null, + range: [13, 19], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 19 } + } + }, + { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'x', + range: [20, 21], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 1 } + } + }, + range: [20, 22], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 2 } + } + } + ], + range: [11, 24], + loc: { + start: { line: 1, column: 11 }, + end: { line: 2, column: 4 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 24], + loc: { + start: { line: 1, column: 1 }, + end: { line: 2, column: 4 } + } + }, + range: [0, 25], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 5 } + } + }, + + '(function(){ return // Comment\nx; })': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [ + { + type: 'ReturnStatement', + argument: null, + range: [13, 19], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 19 } + } + }, + { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'x', + range: [31, 32], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 1 } + } + }, + range: [31, 33], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 2 } + } + } + ], + range: [11, 35], + loc: { + start: { line: 1, column: 11 }, + end: { line: 2, column: 4 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 35], + loc: { + start: { line: 1, column: 1 }, + end: { line: 2, column: 4 } + } + }, + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 5 } + } + }, + + '(function(){ return/* Multiline\nComment */x; })': { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [ + { + type: 'ReturnStatement', + argument: null, + range: [13, 19], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 19 } + } + }, + { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'x', + range: [42, 43], + loc: { + start: { line: 2, column: 10 }, + end: { line: 2, column: 11 } + } + }, + range: [42, 44], + loc: { + start: { line: 2, column: 10 }, + end: { line: 2, column: 12 } + } + } + ], + range: [11, 46], + loc: { + start: { line: 1, column: 11 }, + end: { line: 2, column: 14 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 46], + loc: { + start: { line: 1, column: 1 }, + end: { line: 2, column: 14 } + } + }, + range: [0, 47], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 15 } + } + }, + + '{ throw error\nerror; }': { + type: 'BlockStatement', + body: [{ + type: 'ThrowStatement', + argument: { + type: 'Identifier', + name: 'error', + range: [8, 13], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 13 } + } + }, + range: [2, 14], + loc: { + start: { line: 1, column: 2 }, + end: { line: 2, column: 0 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'error', + range: [14, 19], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 5 } + } + }, + range: [14, 20], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 6 } + } + }], + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 8 } + } + }, + + '{ throw error// Comment\nerror; }': { + type: 'BlockStatement', + body: [{ + type: 'ThrowStatement', + argument: { + type: 'Identifier', + name: 'error', + range: [8, 13], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 13 } + } + }, + range: [2, 24], + loc: { + start: { line: 1, column: 2 }, + end: { line: 2, column: 0 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'error', + range: [24, 29], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 5 } + } + }, + range: [24, 30], + loc: { + start: { line: 2, column: 0 }, + end: { line: 2, column: 6 } + } + }], + range: [0, 32], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 8 } + } + }, + + '{ throw error/* Multiline\nComment */error; }': { + type: 'BlockStatement', + body: [{ + type: 'ThrowStatement', + argument: { + type: 'Identifier', + name: 'error', + range: [8, 13], + loc: { + start: { line: 1, column: 8 }, + end: { line: 1, column: 13 } + } + }, + range: [2, 36], + loc: { + start: { line: 1, column: 2 }, + end: { line: 2, column: 10 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'error', + range: [36, 41], + loc: { + start: { line: 2, column: 10 }, + end: { line: 2, column: 15 } + } + }, + range: [36, 42], + loc: { + start: { line: 2, column: 10 }, + end: { line: 2, column: 16 } + } + }], + range: [0, 44], + loc: { + start: { line: 1, column: 0 }, + end: { line: 2, column: 18 } + } + } + + }, + + 'Source elements': { + + '': { + type: 'Program', + body: [], + range: [0, 0], + loc: { + start: { line: 0, column: 0 }, + end: { line: 0, column: 0 } + }, + tokens: [] + } + }, + + 'Invalid syntax': { + + '{': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Unexpected end of input' + }, + + '}': { + index: 0, + lineNumber: 1, + column: 1, + message: 'Error: Line 1: Unexpected token }' + }, + + '3ea': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '3in []': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '3e': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '3e+': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '3e-': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '3x': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '3x0': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0x': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '09': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '018': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '01a': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '3in[]': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '0x3in[]': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '"Hello\nWorld"': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + 'x\\': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + 'x\\u005c': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + 'x\\u002a': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + 'var x = /(s/g': { + index: 13, + lineNumber: 1, + column: 14, + message: 'Error: Line 1: Invalid regular expression' + }, + + '/': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Invalid regular expression: missing /' + }, + + '/test': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Invalid regular expression: missing /' + }, + + 'var x = /[a-z]/\\ux': { + index: 18, + lineNumber: 1, + column: 19, + message: 'Error: Line 1: Invalid regular expression' + }, + + '3 = 4': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + 'func() = 4': { + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + '(1 + 1) = 10': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + '1++': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + '1--': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + '++1': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + '--1': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + 'for((1 + 1) in list) process(x);': { + index: 11, + lineNumber: 1, + column: 12, + message: 'Error: Line 1: Invalid left-hand side in for-in' + }, + + '[': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Unexpected end of input' + }, + + '[,': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected end of input' + }, + + '1 + {': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Unexpected end of input' + }, + + '1 + { t:t ': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Unexpected end of input' + }, + + '1 + { t:t,': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Unexpected end of input' + }, + + 'var x = /\n/': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Invalid regular expression: missing /' + }, + + 'var x = "\n': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + 'var if = 42': { + index: 4, + lineNumber: 1, + column: 5, + message: 'Error: Line 1: Unexpected token if' + }, + + 'i + 2 = 42': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + '+i = 42': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }, + + '1 + (': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Unexpected end of input' + }, + + '\n\n\n{': { + index: 4, + lineNumber: 4, + column: 2, + message: 'Error: Line 4: Unexpected end of input' + }, + + '\n/* Some multiline\ncomment */\n)': { + index: 30, + lineNumber: 4, + column: 1, + message: 'Error: Line 4: Unexpected token )' + }, + + '{ set 1 }': { + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Unexpected number' + }, + + '{ get 2 }': { + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Unexpected number' + }, + + '({ set: s(if) { } })': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Unexpected token if' + }, + + '({ set s(.) { } })': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token .' + }, + + '({ set s() { } })': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token )' + }, + + '({ set: s() { } })': { + index: 12, + lineNumber: 1, + column: 13, + message: 'Error: Line 1: Unexpected token {' + }, + + '({ set: s(a, b) { } })': { + index: 16, + lineNumber: 1, + column: 17, + message: 'Error: Line 1: Unexpected token {' + }, + + '({ get: g(d) { } })': { + index: 13, + lineNumber: 1, + column: 14, + message: 'Error: Line 1: Unexpected token {' + }, + + '({ get i() { }, i: 42 })': { + index: 21, + lineNumber: 1, + column: 22, + message: 'Error: Line 1: Object literal may not have data and accessor property with the same name' + }, + + '({ i: 42, get i() { } })': { + index: 21, + lineNumber: 1, + column: 22, + message: 'Error: Line 1: Object literal may not have data and accessor property with the same name' + }, + + '({ set i(x) { }, i: 42 })': { + index: 22, + lineNumber: 1, + column: 23, + message: 'Error: Line 1: Object literal may not have data and accessor property with the same name' + }, + + '({ i: 42, set i(x) { } })': { + index: 22, + lineNumber: 1, + column: 23, + message: 'Error: Line 1: Object literal may not have data and accessor property with the same name' + }, + + '({ get i() { }, get i() { } })': { + index: 27, + lineNumber: 1, + column: 28, + message: 'Error: Line 1: Object literal may not have multiple get/set accessors with the same name' + }, + + '({ set i(x) { }, set i(x) { } })': { + index: 29, + lineNumber: 1, + column: 30, + message: 'Error: Line 1: Object literal may not have multiple get/set accessors with the same name' + }, + + 'function t(if) { }': { + index: 11, + lineNumber: 1, + column: 12, + message: 'Error: Line 1: Unexpected token if' + }, + + 'function t(true) { }': { + index: 11, + lineNumber: 1, + column: 12, + message: 'Error: Line 1: Unexpected token true' + }, + + 'function t(false) { }': { + index: 11, + lineNumber: 1, + column: 12, + message: 'Error: Line 1: Unexpected token false' + }, + + 'function t(null) { }': { + index: 11, + lineNumber: 1, + column: 12, + message: 'Error: Line 1: Unexpected token null' + }, + + 'function null() { }': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token null' + }, + + 'function true() { }': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token true' + }, + + 'function false() { }': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token false' + }, + + 'function if() { }': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token if' + }, + + 'a b;': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected identifier' + }, + + 'if.a;': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token .' + }, + + 'a if;': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token if' + }, + + 'a class;': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected reserved word' + }, + + 'break\n': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Illegal break statement' + }, + + 'break 1;': { + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Unexpected number' + }, + + 'continue\n': { + index: 8, + lineNumber: 1, + column: 9, + message: 'Error: Line 1: Illegal continue statement' + }, + + 'continue 2;': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected number' + }, + + 'throw': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Unexpected end of input' + }, + + 'throw;': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Unexpected token ;' + }, + + 'throw\n': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Illegal newline after throw' + }, + + 'for (var i, i2 in {});': { + index: 15, + lineNumber: 1, + column: 16, + message: 'Error: Line 1: Unexpected token in' + }, + + 'for ((i in {}));': { + index: 14, + lineNumber: 1, + column: 15, + message: 'Error: Line 1: Unexpected token )' + }, + + 'for (i + 1 in {});': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Invalid left-hand side in for-in' + }, + + 'for (+i in {});': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Invalid left-hand side in for-in' + }, + + 'if(false)': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected end of input' + }, + + 'if(false) doThis(); else': { + index: 24, + lineNumber: 1, + column: 25, + message: 'Error: Line 1: Unexpected end of input' + }, + + 'do': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected end of input' + }, + + 'while(false)': { + index: 12, + lineNumber: 1, + column: 13, + message: 'Error: Line 1: Unexpected end of input' + }, + + 'for(;;)': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Unexpected end of input' + }, + + 'with(x)': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Unexpected end of input' + }, + + 'try { }': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Missing catch or finally after try' + }, + + 'try {} catch (42) {} ': { + index: 14, + lineNumber: 1, + column: 15, + message: 'Error: Line 1: Unexpected number' + }, + + 'try {} catch (answer()) {} ': { + index: 20, + lineNumber: 1, + column: 21, + message: 'Error: Line 1: Unexpected token (' + }, + + 'try {} catch (-x) {} ': { + index: 14, + lineNumber: 1, + column: 15, + message: 'Error: Line 1: Unexpected token -' + }, + + + '\u203F = 10': { + index: 0, + lineNumber: 1, + column: 1, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + 'const x = 12, y;': { + index: 15, + lineNumber: 1, + column: 16, + message: 'Error: Line 1: Unexpected token ;' + }, + + 'const x, y = 12;': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Unexpected token ,' + }, + + 'const x;': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Unexpected token ;' + }, + + 'if(true) let a = 1;': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token let' + }, + + 'if(true) const a = 1;': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token const' + }, + + 'switch (c) { default: default: }': { + index: 30, + lineNumber: 1, + column: 31, + message: 'Error: Line 1: More than one default clause in switch statement' + }, + + 'new X()."s"': { + index: 8, + lineNumber: 1, + column: 9, + message: 'Error: Line 1: Unexpected string' + }, + + '/*': { + index: 2, + lineNumber: 1, + column: 3, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '/*\n\n\n': { + index: 5, + lineNumber: 4, + column: 1, + message: 'Error: Line 4: Unexpected token ILLEGAL' + }, + + '/**': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '/*\n\n*': { + index: 5, + lineNumber: 3, + column: 2, + message: 'Error: Line 3: Unexpected token ILLEGAL' + }, + + '/*hello': { + index: 7, + lineNumber: 1, + column: 8, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '/*hello *': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '\n]': { + index: 1, + lineNumber: 2, + column: 1, + message: 'Error: Line 2: Unexpected token ]' + }, + + '\r]': { + index: 1, + lineNumber: 2, + column: 1, + message: 'Error: Line 2: Unexpected token ]' + }, + + '\r\n]': { + index: 2, + lineNumber: 2, + column: 1, + message: 'Error: Line 2: Unexpected token ]' + }, + + '\n\r]': { + index: 2, + lineNumber: 3, + column: 1, + message: 'Error: Line 3: Unexpected token ]' + }, + + '//\r\n]': { + index: 4, + lineNumber: 2, + column: 1, + message: 'Error: Line 2: Unexpected token ]' + }, + + '//\n\r]': { + index: 4, + lineNumber: 3, + column: 1, + message: 'Error: Line 3: Unexpected token ]' + }, + + '/a\\\n/': { + index: 4, + lineNumber: 1, + column: 5, + message: 'Error: Line 1: Invalid regular expression: missing /' + }, + + '//\r \n]': { + index: 5, + lineNumber: 3, + column: 1, + message: 'Error: Line 3: Unexpected token ]' + }, + + '/*\r\n*/]': { + index: 6, + lineNumber: 2, + column: 3, + message: 'Error: Line 2: Unexpected token ]' + }, + + '/*\n\r*/]': { + index: 6, + lineNumber: 3, + column: 3, + message: 'Error: Line 3: Unexpected token ]' + }, + + '/*\r \n*/]': { + index: 7, + lineNumber: 3, + column: 3, + message: 'Error: Line 3: Unexpected token ]' + }, + + '\\\\': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '\\u005c': { + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + + '\\x': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '\\u0000': { + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '\u200C = []': { + index: 0, + lineNumber: 1, + column: 1, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '\u200D = []': { + index: 0, + lineNumber: 1, + column: 1, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '"\\': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + '"\\u': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected token ILLEGAL' + }, + + 'try { } catch() {}': { + index: 14, + lineNumber: 1, + column: 15, + message: 'Error: Line 1: Unexpected token )' + }, + + 'return': { + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Illegal return statement' + }, + + 'break': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Illegal break statement' + }, + + 'continue': { + index: 8, + lineNumber: 1, + column: 9, + message: 'Error: Line 1: Illegal continue statement' + }, + + 'switch (x) { default: continue; }': { + index: 31, + lineNumber: 1, + column: 32, + message: 'Error: Line 1: Illegal continue statement' + }, + + 'do { x } *': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token *' + }, + + 'while (true) { break x; }': { + index: 22, + lineNumber: 1, + column: 23, + message: 'Error: Line 1: Undefined label \'x\'' + }, + + 'while (true) { continue x; }': { + index: 25, + lineNumber: 1, + column: 26, + message: 'Error: Line 1: Undefined label \'x\'' + }, + + 'x: while (true) { (function () { break x; }); }': { + index: 40, + lineNumber: 1, + column: 41, + message: 'Error: Line 1: Undefined label \'x\'' + }, + + 'x: while (true) { (function () { continue x; }); }': { + index: 43, + lineNumber: 1, + column: 44, + message: 'Error: Line 1: Undefined label \'x\'' + }, + + 'x: while (true) { (function () { break; }); }': { + index: 39, + lineNumber: 1, + column: 40, + message: 'Error: Line 1: Illegal break statement' + }, + + 'x: while (true) { (function () { continue; }); }': { + index: 42, + lineNumber: 1, + column: 43, + message: 'Error: Line 1: Illegal continue statement' + }, + + 'x: while (true) { x: while (true) { } }': { + index: 20, + lineNumber: 1, + column: 21, + message: 'Error: Line 1: Label \'x\' has already been declared' + }, + + '(function () { \'use strict\'; delete i; }())': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Delete of an unqualified identifier in strict mode.' + }, + + '(function () { \'use strict\'; with (i); }())': { + index: 28, + lineNumber: 1, + column: 29, + message: 'Error: Line 1: Strict mode code may not include a with statement' + }, + + 'function hello() {\'use strict\'; ({ i: 42, i: 42 }) }': { + index: 47, + lineNumber: 1, + column: 48, + message: 'Error: Line 1: Duplicate data property in object literal not allowed in strict mode' + }, + + 'function hello() {\'use strict\'; ({ hasOwnProperty: 42, hasOwnProperty: 42 }) }': { + index: 73, + lineNumber: 1, + column: 74, + message: 'Error: Line 1: Duplicate data property in object literal not allowed in strict mode' + }, + + 'function hello() {\'use strict\'; var eval = 10; }': { + index: 40, + lineNumber: 1, + column: 41, + message: 'Error: Line 1: Variable name may not be eval or arguments in strict mode' + }, + + 'function hello() {\'use strict\'; var arguments = 10; }': { + index: 45, + lineNumber: 1, + column: 46, + message: 'Error: Line 1: Variable name may not be eval or arguments in strict mode' + }, + + 'function hello() {\'use strict\'; try { } catch (eval) { } }': { + index: 51, + lineNumber: 1, + column: 52, + message: 'Error: Line 1: Catch variable may not be eval or arguments in strict mode' + }, + + 'function hello() {\'use strict\'; try { } catch (arguments) { } }': { + index: 56, + lineNumber: 1, + column: 57, + message: 'Error: Line 1: Catch variable may not be eval or arguments in strict mode' + }, + + 'function hello() {\'use strict\'; eval = 10; }': { + index: 32, + lineNumber: 1, + column: 33, + message: 'Error: Line 1: Assignment to eval or arguments is not allowed in strict mode' + }, + + 'function hello() {\'use strict\'; arguments = 10; }': { + index: 32, + lineNumber: 1, + column: 33, + message: 'Error: Line 1: Assignment to eval or arguments is not allowed in strict mode' + }, + + 'function hello() {\'use strict\'; ++eval; }': { + index: 38, + lineNumber: 1, + column: 39, + message: 'Error: Line 1: Prefix increment/decrement may not have eval or arguments operand in strict mode' + }, + + 'function hello() {\'use strict\'; --eval; }': { + index: 38, + lineNumber: 1, + column: 39, + message: 'Error: Line 1: Prefix increment/decrement may not have eval or arguments operand in strict mode' + }, + + 'function hello() {\'use strict\'; ++arguments; }': { + index: 43, + lineNumber: 1, + column: 44, + message: 'Error: Line 1: Prefix increment/decrement may not have eval or arguments operand in strict mode' + }, + + 'function hello() {\'use strict\'; --arguments; }': { + index: 43, + lineNumber: 1, + column: 44, + message: 'Error: Line 1: Prefix increment/decrement may not have eval or arguments operand in strict mode' + }, + + 'function hello() {\'use strict\'; eval++; }': { + index: 36, + lineNumber: 1, + column: 37, + message: 'Error: Line 1: Postfix increment/decrement may not have eval or arguments operand in strict mode' + }, + + 'function hello() {\'use strict\'; eval--; }': { + index: 36, + lineNumber: 1, + column: 37, + message: 'Error: Line 1: Postfix increment/decrement may not have eval or arguments operand in strict mode' + }, + + 'function hello() {\'use strict\'; arguments++; }': { + index: 41, + lineNumber: 1, + column: 42, + message: 'Error: Line 1: Postfix increment/decrement may not have eval or arguments operand in strict mode' + }, + + 'function hello() {\'use strict\'; arguments--; }': { + index: 41, + lineNumber: 1, + column: 42, + message: 'Error: Line 1: Postfix increment/decrement may not have eval or arguments operand in strict mode' + }, + + 'function hello() {\'use strict\'; function eval() { } }': { + index: 41, + lineNumber: 1, + column: 42, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }, + + 'function hello() {\'use strict\'; function arguments() { } }': { + index: 41, + lineNumber: 1, + column: 42, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }, + + 'function eval() {\'use strict\'; }': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }, + + 'function arguments() {\'use strict\'; }': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }, + + 'function hello() {\'use strict\'; (function eval() { }()) }': { + index: 42, + lineNumber: 1, + column: 43, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }, + + 'function hello() {\'use strict\'; (function arguments() { }()) }': { + index: 42, + lineNumber: 1, + column: 43, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }, + + '(function eval() {\'use strict\'; })()': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }, + + '(function arguments() {\'use strict\'; })()': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }, + + 'function hello() {\'use strict\'; ({ s: function eval() { } }); }': { + index: 47, + lineNumber: 1, + column: 48, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }, + + '(function package() {\'use strict\'; })()': { + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function hello() {\'use strict\'; ({ i: 10, set s(eval) { } }); }': { + index: 48, + lineNumber: 1, + column: 49, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + 'function hello() {\'use strict\'; ({ set s(eval) { } }); }': { + index: 41, + lineNumber: 1, + column: 42, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + 'function hello() {\'use strict\'; ({ s: function s(eval) { } }); }': { + index: 49, + lineNumber: 1, + column: 50, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + 'function hello(eval) {\'use strict\';}': { + index: 15, + lineNumber: 1, + column: 16, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + 'function hello(arguments) {\'use strict\';}': { + index: 15, + lineNumber: 1, + column: 16, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + 'function hello() { \'use strict\'; function inner(eval) {} }': { + index: 48, + lineNumber: 1, + column: 49, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + 'function hello() { \'use strict\'; function inner(arguments) {} }': { + index: 48, + lineNumber: 1, + column: 49, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + ' "\\1"; \'use strict\';': { + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }, + + 'function hello() { \'use strict\'; "\\1"; }': { + index: 33, + lineNumber: 1, + column: 34, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }, + + 'function hello() { \'use strict\'; 021; }': { + index: 33, + lineNumber: 1, + column: 34, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }, + + 'function hello() { \'use strict\'; ({ "\\1": 42 }); }': { + index: 36, + lineNumber: 1, + column: 37, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }, + + 'function hello() { \'use strict\'; ({ 021: 42 }); }': { + index: 36, + lineNumber: 1, + column: 37, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }, + + 'function hello() { "octal directive\\1"; "use strict"; }': { + index: 19, + lineNumber: 1, + column: 20, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }, + + 'function hello() { "octal directive\\1"; "octal directive\\2"; "use strict"; }': { + index: 19, + lineNumber: 1, + column: 20, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }, + + 'function hello() { "use strict"; function inner() { "octal directive\\1"; } }': { + index: 52, + lineNumber: 1, + column: 53, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }, + + 'function hello() { "use strict"; var implements; }': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function hello() { "use strict"; var interface; }': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function hello() { "use strict"; var package; }': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function hello() { "use strict"; var private; }': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function hello() { "use strict"; var protected; }': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function hello() { "use strict"; var public; }': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function hello() { "use strict"; var static; }': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function hello() { "use strict"; var yield; }': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function hello() { "use strict"; var let; }': { + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function hello(static) { "use strict"; }': { + index: 15, + lineNumber: 1, + column: 16, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function static() { "use strict"; }': { + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'var yield': { + index: 4, + lineNumber: 1, + column: 5, + message: 'Error: Line 1: Unexpected token yield' + }, + + 'var let': { + index: 4, + lineNumber: 1, + column: 5, + message: 'Error: Line 1: Unexpected token let' + }, + + '"use strict"; function static() { }': { + index: 23, + lineNumber: 1, + column: 24, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function a(t, t) { "use strict"; }': { + index: 14, + lineNumber: 1, + column: 15, + message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' + }, + + 'function a(eval) { "use strict"; }': { + index: 11, + lineNumber: 1, + column: 12, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + 'function a(package) { "use strict"; }': { + index: 11, + lineNumber: 1, + column: 12, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'function a() { "use strict"; function b(t, t) { }; }': { + index: 43, + lineNumber: 1, + column: 44, + message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' + }, + + '(function a(t, t) { "use strict"; })': { + index: 15, + lineNumber: 1, + column: 16, + message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' + }, + + 'function a() { "use strict"; (function b(t, t) { }); }': { + index: 44, + lineNumber: 1, + column: 45, + message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' + }, + + '(function a(eval) { "use strict"; })': { + index: 12, + lineNumber: 1, + column: 13, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }, + + '(function a(package) { "use strict"; })': { + index: 12, + lineNumber: 1, + column: 13, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }, + + 'var': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected end of input' + }, + + 'let': { + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Unexpected end of input' + }, + + 'const': { + index: 5, + lineNumber: 1, + column: 6, + message: 'Error: Line 1: Unexpected end of input' + } + + }, + + 'API': { + 'parse()': { + call: 'parse', + args: [], + result: { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'undefined' + } + }] + } + }, + + 'parse(null)': { + call: 'parse', + args: [null], + result: { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: null + } + }] + } + }, + + 'parse(42)': { + call: 'parse', + args: [42], + result: { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42 + } + }] + } + }, + + 'parse(true)': { + call: 'parse', + args: [true], + result: { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: true + } + }] + } + }, + + 'parse(undefined)': { + call: 'parse', + args: [void 0], + result: { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'undefined' + } + }] + } + }, + + 'parse(new String("test"))': { + call: 'parse', + args: [new String('test')], + result: { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Identifier', + name: 'test' + } + }] + } + }, + + 'parse(new Number(42))': { + call: 'parse', + args: [new Number(42)], + result: { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 42 + } + }] + } + }, + + 'parse(new Boolean(true))': { + call: 'parse', + args: [new Boolean(true)], + result: { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: true + } + }] + } + }, + + 'Syntax': { + property: 'Syntax', + result: { + AssignmentExpression: 'AssignmentExpression', + ArrayExpression: 'ArrayExpression', + BlockStatement: 'BlockStatement', + BinaryExpression: 'BinaryExpression', + BreakStatement: 'BreakStatement', + CallExpression: 'CallExpression', + CatchClause: 'CatchClause', + ConditionalExpression: 'ConditionalExpression', + ContinueStatement: 'ContinueStatement', + DoWhileStatement: 'DoWhileStatement', + DebuggerStatement: 'DebuggerStatement', + EmptyStatement: 'EmptyStatement', + ExpressionStatement: 'ExpressionStatement', + ForStatement: 'ForStatement', + ForInStatement: 'ForInStatement', + FunctionDeclaration: 'FunctionDeclaration', + FunctionExpression: 'FunctionExpression', + Identifier: 'Identifier', + IfStatement: 'IfStatement', + Literal: 'Literal', + LabeledStatement: 'LabeledStatement', + LogicalExpression: 'LogicalExpression', + MemberExpression: 'MemberExpression', + NewExpression: 'NewExpression', + ObjectExpression: 'ObjectExpression', + Program: 'Program', + Property: 'Property', + ReturnStatement: 'ReturnStatement', + SequenceExpression: 'SequenceExpression', + SwitchStatement: 'SwitchStatement', + SwitchCase: 'SwitchCase', + ThisExpression: 'ThisExpression', + ThrowStatement: 'ThrowStatement', + TryStatement: 'TryStatement', + UnaryExpression: 'UnaryExpression', + UpdateExpression: 'UpdateExpression', + VariableDeclaration: 'VariableDeclaration', + VariableDeclarator: 'VariableDeclarator', + WhileStatement: 'WhileStatement', + WithStatement: 'WithStatement' + } + } + + }, + + 'Tolerant parse': { + 'return': { + type: 'Program', + body: [{ + type: 'ReturnStatement', + 'argument': null, + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + } + }], + range: [0, 6], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 6 } + }, + errors: [{ + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Illegal return statement' + }] + }, + + '(function () { \'use strict\'; with (i); }())': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '\'use strict\'', + range: [15, 27], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 27 } + } + }, + range: [15, 28], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 28 } + } + }, { + type: 'WithStatement', + object: { + type: 'Identifier', + name: 'i', + range: [35, 36], + loc: { + start: { line: 1, column: 35 }, + end: { line: 1, column: 36 } + } + }, + body: { + type: 'EmptyStatement', + range: [37, 38], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 38 } + } + }, + range: [29, 38], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 38 } + } + }], + range: [13, 40], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 40 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 40], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 40 } + } + }, + 'arguments': [], + range: [1, 42], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 42 } + } + }, + range: [0, 43], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 43 } + } + }], + range: [0, 43], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 43 } + }, + errors: [{ + index: 29, + lineNumber: 1, + column: 30, + message: 'Error: Line 1: Strict mode code may not include a with statement' + }] + }, + + '(function () { \'use strict\'; 021 }())': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'CallExpression', + callee: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '\'use strict\'', + range: [15, 27], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 27 } + } + }, + range: [15, 28], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 28 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 17, + raw: "021", + range: [29, 32], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 32 } + } + }, + range: [29, 33], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 33 } + } + }], + range: [13, 34], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 34 } + } + }, + rest: null, + generator: false, + expression: false, + range: [1, 34], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 34 } + } + }, + 'arguments': [], + range: [1, 36], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 36 } + } + }, + range: [0, 37], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 37 } + } + }], + range: [0, 37], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 37 } + }, + errors: [{ + index: 29, + lineNumber: 1, + column: 30, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }] + }, + + '"use strict"; delete x': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'UnaryExpression', + operator: 'delete', + argument: { + type: 'Identifier', + name: 'x', + range: [21, 22], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 22 } + } + }, + prefix: true, + range: [14, 22], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 22 } + } + }, + range: [14, 22], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 22 } + } + }], + range: [0, 22], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 22 } + }, + errors: [{ + index: 22, + lineNumber: 1, + column: 23, + message: 'Error: Line 1: Delete of an unqualified identifier in strict mode.' + }] + }, + + '"use strict"; try {} catch (eval) {}': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'TryStatement', + block: { + type: 'BlockStatement', + body: [], + range: [18, 20], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 20 } + } + }, + guardedHandlers: [], + handlers: [{ + type: 'CatchClause', + param: { + type: 'Identifier', + name: 'eval', + range: [28, 32], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 32 } + } + }, + body: { + type: 'BlockStatement', + body: [], + range: [34, 36], + loc: { + start: { line: 1, column: 34 }, + end: { line: 1, column: 36 } + } + }, + range: [21, 36], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 36 } + } + }], + finalizer: null, + range: [14, 36], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 36 } + } + }], + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + }, + errors: [{ + index: 32, + lineNumber: 1, + column: 33, + message: 'Error: Line 1: Catch variable may not be eval or arguments in strict mode' + }] + }, + + '"use strict"; try {} catch (arguments) {}': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'TryStatement', + block: { + type: 'BlockStatement', + body: [], + range: [18, 20], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 20 } + } + }, + guardedHandlers: [], + handlers: [{ + type: 'CatchClause', + param: { + type: 'Identifier', + name: 'arguments', + range: [28, 37], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 37 } + } + }, + body: { + type: 'BlockStatement', + body: [], + range: [39, 41], + loc: { + start: { line: 1, column: 39 }, + end: { line: 1, column: 41 } + } + }, + range: [21, 41], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 41 } + } + }], + finalizer: null, + range: [14, 41], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 41 } + } + }], + range: [0, 41], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 41 } + }, + errors: [{ + index: 37, + lineNumber: 1, + column: 38, + message: 'Error: Line 1: Catch variable may not be eval or arguments in strict mode' + }] + }, + + '"use strict"; var eval;': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'eval', + range: [18, 22], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 22 } + } + }, + init: null, + range: [18, 22], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 22 } + } + }], + kind: 'var', + range: [14, 23], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 23 } + } + }], + range: [0, 23], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 23 } + }, + errors: [{ + index: 22, + lineNumber: 1, + column: 23, + message: 'Error: Line 1: Variable name may not be eval or arguments in strict mode' + }] + }, + + '"use strict"; var arguments;': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'arguments', + range: [18, 27], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 27 } + } + }, + init: null, + range: [18, 27], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 27 } + } + }], + kind: 'var', + range: [14, 28], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 28 } + } + }], + range: [0, 28], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 28 } + }, + errors: [{ + index: 27, + lineNumber: 1, + column: 28, + message: 'Error: Line 1: Variable name may not be eval or arguments in strict mode' + }] + }, + + '"use strict"; eval = 0;': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'eval', + range: [14, 18], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 18 } + } + }, + right: { + type: 'Literal', + value: 0, + raw: '0', + range: [21, 22], + loc: { + start: { line: 1, column: 21 }, + end: { line: 1, column: 22 } + } + }, + range: [14, 22], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 22 } + } + }, + range: [14, 23], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 23 } + } + }], + range: [0, 23], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 23 } + }, + errors: [{ + index: 14, + lineNumber: 1, + column: 15, + message: 'Error: Line 1: Assignment to eval or arguments is not allowed in strict mode' + }] + }, + + '"use strict"; eval++;': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'eval', + range: [14, 18], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 18 } + } + }, + prefix: false, + range: [14, 20], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 20 } + } + }, + range: [14, 21], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 21 } + } + }], + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + }, + errors: [{ + index: 18, + lineNumber: 1, + column: 19, + message: 'Error: Line 1: Postfix increment/decrement may not have eval or arguments operand in strict mode' + }] + }, + + '"use strict"; --eval;': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '--', + argument: { + type: 'Identifier', + name: 'eval', + range: [16, 20], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 20 } + } + }, + prefix: true, + range: [14, 20], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 20 } + } + }, + range: [14, 21], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 21 } + } + }], + range: [0, 21], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 21 } + }, + errors: [{ + index: 20, + lineNumber: 1, + column: 21, + message: 'Error: Line 1: Prefix increment/decrement may not have eval or arguments operand in strict mode' + }] + }, + + '"use strict"; arguments = 0;': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'arguments', + range: [14, 23], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 23 } + } + }, + right: { + type: 'Literal', + value: 0, + raw: '0', + range: [26, 27], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 27 } + } + }, + range: [14, 27], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 27 } + } + }, + range: [14, 28], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 28 } + } + }], + range: [0, 28], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 28 } + }, + errors: [{ + index: 14, + lineNumber: 1, + column: 15, + message: 'Error: Line 1: Assignment to eval or arguments is not allowed in strict mode' + }] + }, + + '"use strict"; arguments--;': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '--', + argument: { + type: 'Identifier', + name: 'arguments', + range: [14, 23], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 23 } + } + }, + prefix: false, + range: [14, 25], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 25 } + } + }, + range: [14, 26], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 26 } + } + }], + range: [0, 26], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 26 } + }, + errors: [{ + index: 23, + lineNumber: 1, + column: 24, + message: 'Error: Line 1: Postfix increment/decrement may not have eval or arguments operand in strict mode' + }] + }, + + '"use strict"; ++arguments;': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Identifier', + name: 'arguments', + range: [16, 25], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 25 } + } + }, + prefix: true, + range: [14, 25], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 25 } + } + }, + range: [14, 26], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 26 } + } + }], + range: [0, 26], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 26 } + }, + errors: [{ + index: 25, + lineNumber: 1, + column: 26, + message: 'Error: Line 1: Prefix increment/decrement may not have eval or arguments operand in strict mode' + }] + }, + + + '"use strict";x={y:1,y:1}': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [13, 14], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 14 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'y', + range: [16, 17], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 17 } + } + }, + value: { + type: 'Literal', + value: 1, + raw: '1', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }, + kind: 'init', + range: [16, 19], + loc: { + start: { line: 1, column: 16 }, + end: { line: 1, column: 19 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'y', + range: [20, 21], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 21 } + } + }, + value: { + type: 'Literal', + value: 1, + raw: '1', + range: [22, 23], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 23 } + } + }, + kind: 'init', + range: [20, 23], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 23 } + } + }], + range: [15, 24], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 24 } + } + }, + range: [13, 24], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 24 } + } + }, + range: [13, 24], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 24 } + } + }], + range: [0, 24], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 24 } + }, + errors: [{ + index: 23, + lineNumber: 1, + column: 24, + message: 'Error: Line 1: Duplicate data property in object literal not allowed in strict mode' + }] + }, + + '"use strict"; function eval() {};': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'eval', + range: [23, 27], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 27 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [30, 32], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 32 } + } + }, + rest: null, + generator: false, + expression: false, + range: [14, 32], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 32 } + } + }, { + type: 'EmptyStatement', + range: [32, 33], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 33 } + } + }], + range: [0, 33], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 33 } + }, + errors: [{ + index: 23, + lineNumber: 1, + column: 24, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }] + }, + + '"use strict"; function arguments() {};': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'arguments', + range: [23, 32], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 32 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [35, 37], + loc: { + start: { line: 1, column: 35 }, + end: { line: 1, column: 37 } + } + }, + rest: null, + generator: false, + expression: false, + range: [14, 37], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 37 } + } + }, { + type: 'EmptyStatement', + range: [37, 38], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 38 } + } + }], + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + }, + errors: [{ + index: 23, + lineNumber: 1, + column: 24, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }] + }, + + '"use strict"; function interface() {};': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'interface', + range: [23, 32], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 32 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [35, 37], + loc: { + start: { line: 1, column: 35 }, + end: { line: 1, column: 37 } + } + }, + rest: null, + generator: false, + expression: false, + range: [14, 37], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 37 } + } + }, { + type: 'EmptyStatement', + range: [37, 38], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 38 } + } + }], + range: [0, 38], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 38 } + }, + errors: [{ + index: 23, + lineNumber: 1, + column: 24, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }] + }, + + '"use strict"; (function eval() {});': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'eval', + range: [24, 28], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 28 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [31, 33], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 33 } + } + }, + rest: null, + generator: false, + expression: false, + range: [15, 33], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 33 } + } + }, + range: [14, 35], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 35 } + } + }], + range: [0, 35], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 35 } + }, + errors: [{ + index: 24, + lineNumber: 1, + column: 25, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }] + }, + + '"use strict"; (function arguments() {});': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'arguments', + range: [24, 33], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 33 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [36, 38], + loc: { + start: { line: 1, column: 36 }, + end: { line: 1, column: 38 } + } + }, + rest: null, + generator: false, + expression: false, + range: [15, 38], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 38 } + } + }, + range: [14, 40], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 40 } + } + }], + range: [0, 40], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 40 } + }, + errors: [{ + index: 24, + lineNumber: 1, + column: 25, + message: 'Error: Line 1: Function name may not be eval or arguments in strict mode' + }] + }, + + '"use strict"; (function interface() {});': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'interface', + range: [24, 33], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 33 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [36, 38], + loc: { + start: { line: 1, column: 36 }, + end: { line: 1, column: 38 } + } + }, + rest: null, + generator: false, + expression: false, + range: [15, 38], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 38 } + } + }, + range: [14, 40], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 40 } + } + }], + range: [0, 40], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 40 } + }, + errors: [{ + index: 24, + lineNumber: 1, + column: 25, + message: 'Error: Line 1: Use of future reserved word in strict mode' + }] + }, + + '"use strict"; function f(eval) {};': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'f', + range: [23, 24], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 24 } + } + }, + params: [{ + type: 'Identifier', + name: 'eval', + range: [25, 29], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 29 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [31, 33], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 33 } + } + }, + rest: null, + generator: false, + expression: false, + range: [14, 33], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 33 } + } + }, { + type: 'EmptyStatement', + range: [33, 34], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 34 } + } + }], + range: [0, 34], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 34 } + }, + errors: [{ + index: 25, + lineNumber: 1, + column: 26, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }] + }, + + '"use strict"; function f(arguments) {};': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'f', + range: [23, 24], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 24 } + } + }, + params: [{ + type: 'Identifier', + name: 'arguments', + range: [25, 34], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 34 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [36, 38], + loc: { + start: { line: 1, column: 36 }, + end: { line: 1, column: 38 } + } + }, + rest: null, + generator: false, + expression: false, + range: [14, 38], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 38 } + } + }, { + type: 'EmptyStatement', + range: [38, 39], + loc: { + start: { line: 1, column: 38 }, + end: { line: 1, column: 39 } + } + }], + range: [0, 39], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 39 } + }, + errors: [{ + index: 25, + lineNumber: 1, + column: 26, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }] + }, + + '"use strict"; function f(foo, foo) {};': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'f', + range: [23, 24], + loc: { + start: { line: 1, column: 23 }, + end: { line: 1, column: 24 } + } + }, + params: [{ + type: 'Identifier', + name: 'foo', + range: [25, 28], + loc: { + start: { line: 1, column: 25 }, + end: { line: 1, column: 28 } + } + }, { + type: 'Identifier', + name: 'foo', + range: [31, 34], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 34 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [36, 38], + loc: { + start: { line: 1, column: 36 }, + end: { line: 1, column: 38 } + } + }, + rest: null, + generator: false, + expression: false, + range: [14, 38], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 38 } + } + }, { + type: 'EmptyStatement', + range: [38, 39], + loc: { + start: { line: 1, column: 38 }, + end: { line: 1, column: 39 } + } + }], + range: [0, 39], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 39 } + }, + errors: [{ + index: 31, + lineNumber: 1, + column: 32, + message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' + }] + }, + + '"use strict"; (function f(eval) {});': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'f', + range: [24, 25], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 25 } + } + }, + params: [{ + type: 'Identifier', + name: 'eval', + range: [26, 30], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 30 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [32, 34], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 34 } + } + }, + rest: null, + generator: false, + expression: false, + range: [15, 34], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 34 } + } + }, + range: [14, 36], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 36 } + } + }], + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + }, + errors: [{ + index: 26, + lineNumber: 1, + column: 27, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }] + }, + + + '"use strict"; (function f(arguments) {});': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'f', + range: [24, 25], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 25 } + } + }, + params: [{ + type: 'Identifier', + name: 'arguments', + range: [26, 35], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 35 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [37, 39], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 39 } + } + }, + rest: null, + generator: false, + expression: false, + range: [15, 39], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 39 } + } + }, + range: [14, 41], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 41 } + } + }], + range: [0, 41], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 41 } + }, + errors: [{ + index: 26, + lineNumber: 1, + column: 27, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }] + }, + + '"use strict"; (function f(foo, foo) {});': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'FunctionExpression', + id: { + type: 'Identifier', + name: 'f', + range: [24, 25], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 25 } + } + }, + params: [{ + type: 'Identifier', + name: 'foo', + range: [26, 29], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 29 } + } + }, { + type: 'Identifier', + name: 'foo', + range: [32, 35], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 35 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [37, 39], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 39 } + } + }, + rest: null, + generator: false, + expression: false, + range: [15, 39], + loc: { + start: { line: 1, column: 15 }, + end: { line: 1, column: 39 } + } + }, + range: [14, 41], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 41 } + } + }], + range: [0, 41], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 41 } + }, + errors: [{ + index: 32, + lineNumber: 1, + column: 33, + message: 'Error: Line 1: Strict mode function may not have duplicate parameter names' + }] + }, + + '"use strict"; x = { set f(eval) {} }' : { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Identifier', + name: 'x', + range: [14, 15], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 15 } + } + }, + right: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'f', + range: [24, 25], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 25 } + } + }, + value : { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'eval', + range: [26, 30], + loc: { + start: { line: 1, column: 26 }, + end: { line: 1, column: 30 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [32, 34], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 34 } + } + }, + rest: null, + generator: false, + expression: false, + range: [32, 34], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 34 } + } + }, + kind: 'set', + range: [20, 34], + loc: { + start: { line: 1, column: 20 }, + end: { line: 1, column: 34 } + } + }], + range: [18, 36], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 36 } + } + }, + range: [14, 36], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 36 } + } + }, + range: [14, 36], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 36 } + } + }], + range: [0, 36], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 36 } + }, + errors: [{ + index: 26, + lineNumber: 1, + column: 27, + message: 'Error: Line 1: Parameter name eval or arguments is not allowed in strict mode' + }] + }, + + 'function hello() { "octal directive\\1"; "use strict"; }': { + type: 'Program', + body: [{ + type: 'FunctionDeclaration', + id: { + type: 'Identifier', + name: 'hello', + range: [9, 14], + loc: { + start: { line: 1, column: 9 }, + end: { line: 1, column: 14 } + } + }, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'octal directive\u0001', + raw: '"octal directive\\1"', + range: [19, 38], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 38 } + } + }, + range: [19, 39], + loc: { + start: { line: 1, column: 19 }, + end: { line: 1, column: 39 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [40, 52], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 52 } + } + }, + range: [40, 53], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 53 } + } + }], + range: [17, 55], + loc: { + start: { line: 1, column: 17 }, + end: { line: 1, column: 55 } + } + }, + rest: null, + generator: false, + expression: false, + range: [0, 55], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 55 } + } + }], + range: [0, 55], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 55 } + }, + errors: [{ + index: 19, + lineNumber: 1, + column: 20, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }] + }, + + '"\\1"; \'use strict\';': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: '\u0001', + raw: '"\\1"', + range: [0, 4], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 4 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, { + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '\'use strict\'', + range: [6, 18], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 18 } + } + }, + range: [6, 19], + loc: { + start: { line: 1, column: 6 }, + end: { line: 1, column: 19 } + } + }], + range: [0, 19], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 19 } + }, + errors: [{ + index: 0, + lineNumber: 1, + column: 1, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }] + }, + + '"use strict"; var x = { 014: 3}': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }, + init: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Literal', + value: 12, + raw: '014', + range: [24, 27], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 27 } + } + }, + value: { + type: 'Literal', + value: 3, + raw: '3', + range: [29, 30], + loc: { + start: { line: 1, column: 29 }, + end: { line: 1, column: 30 } + } + }, + kind: 'init', + range: [24, 30], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 30 } + } + }], + range: [22, 31], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 31 } + } + }, + range: [18, 31], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 31 } + } + }], + kind: 'var', + range: [14, 31], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 31 } + } + }], + range: [0, 31], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 31 } + }, + errors: [{ + index: 24, + lineNumber: 1, + column: 25, + message: 'Error: Line 1: Octal literals are not allowed in strict mode.' + }] + }, + + '"use strict"; var x = { get i() {}, get i() {} }': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }, + init: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'i', + range: [28, 29], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 29 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [32, 34], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 34 } + } + }, + rest: null, + generator: false, + expression: false, + range: [32, 34], + loc: { + start: { line: 1, column: 32 }, + end: { line: 1, column: 34 } + } + }, + kind: 'get', + range: [24, 34], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 34 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'i', + range: [40, 41], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 41 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [44, 46], + loc: { + start: { line: 1, column: 44 }, + end: { line: 1, column: 46 } + } + }, + rest: null, + generator: false, + expression: false, + range: [44, 46], + loc: { + start: { line: 1, column: 44 }, + end: { line: 1, column: 46 } + } + }, + kind: 'get', + range: [36, 46], + loc: { + start: { line: 1, column: 36 }, + end: { line: 1, column: 46 } + } + }], + range: [22, 48], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 48 } + } + }, + range: [18, 48], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 48 } + } + }], + kind: 'var', + range: [14, 48], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 48 } + } + }], + range: [0, 48], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 48 } + }, + errors: [{ + index: 46, + lineNumber: 1, + column: 47, + message: 'Error: Line 1: Object literal may not have multiple get/set accessors with the same name' + }] + }, + + '"use strict"; var x = { i: 42, get i() {} }': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }, + init: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'i', + range: [24, 25], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 25 } + } + }, + value: { + type: 'Literal', + value: 42, + raw: '42', + range: [27, 29], + loc: { + start: { line: 1, column: 27 }, + end: { line: 1, column: 29 } + } + }, + kind: 'init', + range: [24, 29], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 29 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'i', + range: [35, 36], + loc: { + start: { line: 1, column: 35 }, + end: { line: 1, column: 36 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [39, 41], + loc: { + start: { line: 1, column: 39 }, + end: { line: 1, column: 41 } + } + }, + rest: null, + generator: false, + expression: false, + range: [39, 41], + loc: { + start: { line: 1, column: 39 }, + end: { line: 1, column: 41 } + } + }, + kind: 'get', + range: [31, 41], + loc: { + start: { line: 1, column: 31 }, + end: { line: 1, column: 41 } + } + }], + range: [22, 43], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 43 } + } + }, + range: [18, 43], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 43 } + } + }], + kind: 'var', + range: [14, 43], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 43 } + } + }], + range: [0, 43], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 43 } + }, + errors: [{ + index: 41, + lineNumber: 1, + column: 42, + message: 'Error: Line 1: Object literal may not have data and accessor property with the same name' + }] + }, + + '"use strict"; var x = { set i(x) {}, i: 42 }': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'Literal', + value: 'use strict', + raw: '"use strict"', + range: [0, 12], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 12 } + } + }, + range: [0, 13], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 13 } + } + }, { + type: 'VariableDeclaration', + declarations: [{ + type: 'VariableDeclarator', + id: { + type: 'Identifier', + name: 'x', + range: [18, 19], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 19 } + } + }, + init: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 'i', + range: [28, 29], + loc: { + start: { line: 1, column: 28 }, + end: { line: 1, column: 29 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [{ + type: 'Identifier', + name: 'x', + range: [30, 31], + loc: { + start: { line: 1, column: 30 }, + end: { line: 1, column: 31 } + } + }], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [33, 35], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 35 } + } + }, + rest: null, + generator: false, + expression: false, + range: [33, 35], + loc: { + start: { line: 1, column: 33 }, + end: { line: 1, column: 35 } + } + }, + kind: 'set', + range: [24, 35], + loc: { + start: { line: 1, column: 24 }, + end: { line: 1, column: 35 } + } + }, { + type: 'Property', + key: { + type: 'Identifier', + name: 'i', + range: [37, 38], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 38 } + } + }, + value: { + type: 'Literal', + value: 42, + raw: '42', + range: [40, 42], + loc: { + start: { line: 1, column: 40 }, + end: { line: 1, column: 42 } + } + }, + kind: 'init', + range: [37, 42], + loc: { + start: { line: 1, column: 37 }, + end: { line: 1, column: 42 } + } + }], + range: [22, 44], + loc: { + start: { line: 1, column: 22 }, + end: { line: 1, column: 44 } + } + }, + range: [18, 44], + loc: { + start: { line: 1, column: 18 }, + end: { line: 1, column: 44 } + } + }], + kind: 'var', + range: [14, 44], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 44 } + } + }], + range: [0, 44], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 44 } + }, + errors: [{ + index: 42, + lineNumber: 1, + column: 43, + message: 'Error: Line 1: Object literal may not have data and accessor property with the same name' + }] + + + }, + + '({ set s() { } })': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'ObjectExpression', + properties: [{ + type: 'Property', + key: { + type: 'Identifier', + name: 's', + range: [7, 8], + loc: { + start: { line: 1, column: 7 }, + end: { line: 1, column: 8 } + } + }, + value: { + type: 'FunctionExpression', + id: null, + params: [], + defaults: [], + body: { + type: 'BlockStatement', + body: [], + range: [11, 14], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 14 } + } + }, + rest: null, + generator: false, + expression: false, + range: [11, 14], + loc: { + start: { line: 1, column: 11 }, + end: { line: 1, column: 14 } + } + }, + kind: 'set', + range: [3, 14], + loc: { + start: { line: 1, column: 3 }, + end: { line: 1, column: 14 } + } + }], + range: [1, 16], + loc: { + start: { line: 1, column: 1 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + } + }], + range: [0, 17], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 17 } + }, + errors: [{ + index: 9, + lineNumber: 1, + column: 10, + message: 'Error: Line 1: Unexpected token )' + }] + }, + + 'foo("bar") = baz': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'CallExpression', + callee: { + type: 'Identifier', + name: 'foo', + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + 'arguments': [{ + type: 'Literal', + value: 'bar', + raw: '"bar"', + range: [4, 9], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 9 } + } + }], + range: [0, 10], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 10 } + } + }, + right: { + type: 'Identifier', + name: 'baz', + range: [13, 16], + loc: { + start: { line: 1, column: 13 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }], + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + }, + errors: [{ + index: 10, + lineNumber: 1, + column: 11, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }] + }, + + '1 = 2': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'AssignmentExpression', + operator: '=', + left: { + type: 'Literal', + value: 1, + raw: '1', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + right: { + type: 'Literal', + value: 2, + raw: '2', + range: [4, 5], + loc: { + start: { line: 1, column: 4 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }, + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + } + }], + range: [0, 5], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 5 } + }, + errors: [{ + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }] + }, + + '3++': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '++', + argument: { + type: 'Literal', + value: 3, + raw: '3', + range: [0, 1], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 1 } + } + }, + prefix: false, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }], + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + }, + errors: [{ + index: 1, + lineNumber: 1, + column: 2, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }] + }, + + '--4': { + type: 'Program', + body: [{ + type: 'ExpressionStatement', + expression: { + type: 'UpdateExpression', + operator: '--', + argument: { + type: 'Literal', + value: 4, + raw: '4', + range: [2, 3], + loc: { + start: { line: 1, column: 2 }, + end: { line: 1, column: 3 } + } + }, + prefix: true, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }, + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + } + }], + range: [0, 3], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 3 } + }, + errors: [{ + index: 3, + lineNumber: 1, + column: 4, + message: 'Error: Line 1: Invalid left-hand side in assignment' + }] + }, + + 'for (5 in []) {}': { + type: 'Program', + body: [{ + type: 'ForInStatement', + left: { + type: 'Literal', + value: 5, + raw: '5', + range: [5, 6], + loc: { + start: { line: 1, column: 5 }, + end: { line: 1, column: 6 } + } + }, + right: { + type: 'ArrayExpression', + elements: [], + range: [10, 12], + loc: { + start: { line: 1, column: 10 }, + end: { line: 1, column: 12 } + } + }, + body: { + type: 'BlockStatement', + body: [], + range: [14, 16], + loc: { + start: { line: 1, column: 14 }, + end: { line: 1, column: 16 } + } + }, + each: false, + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + } + }], + range: [0, 16], + loc: { + start: { line: 1, column: 0 }, + end: { line: 1, column: 16 } + }, + errors: [{ + index: 6, + lineNumber: 1, + column: 7, + message: 'Error: Line 1: Invalid left-hand side in for-in' + }] + } + + + } +}; + diff --git a/pitfall/pdfkit/node_modules/esrefactor/CONTRIBUTING.md b/pitfall/pdfkit/node_modules/esrefactor/CONTRIBUTING.md new file mode 100644 index 00000000..8c59cfc1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/esrefactor/CONTRIBUTING.md @@ -0,0 +1,45 @@ +# Contribution Guide + +This page describes how to contribute changes to esrefactor. + +Please do **not** create a pull request without reading this guide first. Failure to do so may result in the **rejection** of the pull request. + +## Testing Workflow + +To prepare the environment for testing, Node.js is required: + + npm install + +There are two types of tests: unit test and coverage test. To run the +tests: + + npm test + +If either the unit or the coverage test files, it will complain. +Any kind of regression, as spotted by the above tests, is **not tolerated**. + +### Unit Tests + + node test/run.js + +TODO: How to write a new test. + +### Code Coverage + +To ensure a good code coverage, [Istanbul](https://github.com/gotwarlost/istanbul) is invoked while running the unit tests: + + npm run-script coverage + +## Review and Merge + +When your branch is ready, send the pull request. + +While it is not always the case, often it is necessary to improve parts of your code in the branch. This is the actual review process. + +Here is a check list for the review: + +* It does not break the test suite +* The coding style follows the existing one +* There is a reasonable amount of comment +* There is no typo and other related mistakes + diff --git a/pitfall/pdfkit/node_modules/esrefactor/LICENSE.BSD b/pitfall/pdfkit/node_modules/esrefactor/LICENSE.BSD new file mode 100644 index 00000000..3e580c35 --- /dev/null +++ b/pitfall/pdfkit/node_modules/esrefactor/LICENSE.BSD @@ -0,0 +1,19 @@ +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL BE LIABLE FOR ANY +DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/pitfall/pdfkit/node_modules/esrefactor/README.md b/pitfall/pdfkit/node_modules/esrefactor/README.md new file mode 100644 index 00000000..b9536473 --- /dev/null +++ b/pitfall/pdfkit/node_modules/esrefactor/README.md @@ -0,0 +1,75 @@ +**esrefactor** (BSD licensed) is a little helper library for ECMAScript refactoring. + +## Usage + +With Node.js: + +```bash +npm install esrefactor +``` + +In a browser, include first all the dependents: + +``` + + + + diff --git a/pitfall/pdfkit/node_modules/exorcist/example/main.js b/pitfall/pdfkit/node_modules/exorcist/example/main.js new file mode 100644 index 00000000..5ad6728f --- /dev/null +++ b/pitfall/pdfkit/node_modules/exorcist/example/main.js @@ -0,0 +1,5 @@ +'use strict'; + +var foo = require('./foo'); + +foo(); diff --git a/pitfall/pdfkit/node_modules/exorcist/index.js b/pitfall/pdfkit/node_modules/exorcist/index.js new file mode 100644 index 00000000..4a4821db --- /dev/null +++ b/pitfall/pdfkit/node_modules/exorcist/index.js @@ -0,0 +1,63 @@ +'use strict'; + +var convert = require('convert-source-map') + , path = require('path') + , fs = require('fs') + , through = require('through2'); + +function separate(src, file, root, url) { + var inlined = convert.fromSource(src); + + if (!inlined) return null; + + var json = inlined + .setProperty('sourceRoot', root || '') + .toJSON(2); + + url = url || path.basename(file); + + var newSrc = convert.removeComments(src); + var comment = '//# sourceMappingURL=' + url; + + return { json: json, src: newSrc + '\n' + comment } +} + +var go = module.exports = + +/** + * Transforms the incoming stream of code by removing the inlined source map and writing it to an external map file. + * Additionally it adds a source map url that points to the extracted map file. + * + * #### Events (other than all stream events like `error`) + * + * - `missing-map` emitted if no map was found in the stream (the src still is piped through in this case, but no map file is written) + * + * @name exorcist + * @function + * @param {String} file full path to the map file to which to write the extracted source map + * @param {String=} url allows overriding the url at which the map file is found (default: name of map file) + * @param {String=} root allows adjusting the source maps `sourceRoot` field (default: '') + * @return {TransformStream} transform stream into which to pipe the code containing the source map + */ +function exorcist(file, url, root) { + var src = ''; + + function ondata(d, _, cb) { src += d; cb(); } + function onend(cb) { + var self = this; + var separated = separate(src, file, root, url); + if (!separated) { + self.emit( + 'missing-map' + , 'The code that you piped into exorcist contains no source map!\n' + + 'Therefore it was piped through as is and no external map file generated.' + ); + self.push(src); + return cb(); + } + self.push(separated.src); + fs.writeFile(file, separated.json, 'utf8', cb) + } + + return through(ondata, onend); +} diff --git a/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/.travis.yml b/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/.travis.yml new file mode 100644 index 00000000..cc4dba29 --- /dev/null +++ b/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.8" + - "0.10" diff --git a/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/LICENSE b/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/LICENSE new file mode 100644 index 00000000..ee27ba4b --- /dev/null +++ b/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/example/parse.js b/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/example/parse.js new file mode 100644 index 00000000..abff3e8e --- /dev/null +++ b/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/example/parse.js @@ -0,0 +1,2 @@ +var argv = require('../')(process.argv.slice(2)); +console.dir(argv); diff --git a/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/index.js b/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/index.js new file mode 100644 index 00000000..2ab962ea --- /dev/null +++ b/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/index.js @@ -0,0 +1,193 @@ +module.exports = function (args, opts) { + if (!opts) opts = {}; + + var flags = { bools : {}, strings : {} }; + + [].concat(opts['boolean']).filter(Boolean).forEach(function (key) { + flags.bools[key] = true; + }); + + [].concat(opts.string).filter(Boolean).forEach(function (key) { + flags.strings[key] = true; + }); + + var aliases = {}; + Object.keys(opts.alias || {}).forEach(function (key) { + aliases[key] = [].concat(opts.alias[key]); + aliases[key].forEach(function (x) { + aliases[x] = [key].concat(aliases[key].filter(function (y) { + return x !== y; + })); + }); + }); + + var defaults = opts['default'] || {}; + + var argv = { _ : [] }; + Object.keys(flags.bools).forEach(function (key) { + setArg(key, defaults[key] === undefined ? false : defaults[key]); + }); + + var notFlags = []; + + if (args.indexOf('--') !== -1) { + notFlags = args.slice(args.indexOf('--')+1); + args = args.slice(0, args.indexOf('--')); + } + + function setArg (key, val) { + var value = !flags.strings[key] && isNumber(val) + ? Number(val) : val + ; + setKey(argv, key.split('.'), value); + + (aliases[key] || []).forEach(function (x) { + setKey(argv, x.split('.'), value); + }); + } + + for (var i = 0; i < args.length; i++) { + var arg = args[i]; + + if (arg.match(/^--.+=/)) { + // Using [\s\S] instead of . because js doesn't support the + // 'dotall' regex modifier. See: + // http://stackoverflow.com/a/1068308/13216 + var m = arg.match(/^--([^=]+)=([\s\S]*)$/); + setArg(m[1], m[2]); + } + else if (arg.match(/^--no-.+/)) { + var key = arg.match(/^--no-(.+)/)[1]; + setArg(key, false); + } + else if (arg.match(/^--.+/)) { + var key = arg.match(/^--(.+)/)[1]; + var next = args[i + 1]; + if (next !== undefined && !next.match(/^-/) + && !flags.bools[key] + && (aliases[key] ? !flags.bools[aliases[key]] : true)) { + setArg(key, next); + i++; + } + else if (/^(true|false)$/.test(next)) { + setArg(key, next === 'true'); + i++; + } + else { + setArg(key, true); + } + } + else if (arg.match(/^-[^-]+/)) { + var letters = arg.slice(1,-1).split(''); + + var broken = false; + for (var j = 0; j < letters.length; j++) { + var next = arg.slice(j+2); + + if (letters[j+1] && letters[j+1] === '=') { + setArg(letters[j], arg.slice(j+3)); + broken = true; + break; + } + + if (next === '-') { + setArg(letters[j], next) + continue; + } + + if (/[A-Za-z]/.test(letters[j]) + && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { + setArg(letters[j], next); + broken = true; + break; + } + + if (letters[j+1] && letters[j+1].match(/\W/)) { + setArg(letters[j], arg.slice(j+2)); + broken = true; + break; + } + else { + setArg(letters[j], true); + } + } + + var key = arg.slice(-1)[0]; + if (!broken && key !== '-') { + if (args[i+1] && !/^(-|--)[^-]/.test(args[i+1]) + && !flags.bools[key] + && (aliases[key] ? !flags.bools[aliases[key]] : true)) { + setArg(key, args[i+1]); + i++; + } + else if (args[i+1] && /true|false/.test(args[i+1])) { + setArg(key, args[i+1] === 'true'); + i++; + } + else { + setArg(key, true); + } + } + } + else { + argv._.push( + flags.strings['_'] || !isNumber(arg) ? arg : Number(arg) + ); + } + } + + Object.keys(defaults).forEach(function (key) { + if (!hasKey(argv, key.split('.'))) { + setKey(argv, key.split('.'), defaults[key]); + + (aliases[key] || []).forEach(function (x) { + setKey(argv, x.split('.'), defaults[key]); + }); + } + }); + + notFlags.forEach(function(key) { + argv._.push(key); + }); + + return argv; +}; + +function hasKey (obj, keys) { + var o = obj; + keys.slice(0,-1).forEach(function (key) { + o = (o[key] || {}); + }); + + var key = keys[keys.length - 1]; + return key in o; +} + +function setKey (obj, keys, value) { + var o = obj; + keys.slice(0,-1).forEach(function (key) { + if (o[key] === undefined) o[key] = {}; + o = o[key]; + }); + + var key = keys[keys.length - 1]; + if (o[key] === undefined || typeof o[key] === 'boolean') { + o[key] = value; + } + else if (Array.isArray(o[key])) { + o[key].push(value); + } + else { + o[key] = [ o[key], value ]; + } +} + +function isNumber (x) { + if (typeof x === 'number') return true; + if (/^0x[0-9a-f]+$/i.test(x)) return true; + return /^[-+]?(?:\d+(?:\.\d*)?|\.\d+)(e[-+]?\d+)?$/.test(x); +} + +function longest (xs) { + return Math.max.apply(null, xs.map(function (x) { return x.length })); +} diff --git a/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/package.json b/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/package.json new file mode 100644 index 00000000..740fbdaa --- /dev/null +++ b/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/package.json @@ -0,0 +1,101 @@ +{ + "_args": [ + [ + { + "raw": "minimist@0.0.5", + "scope": null, + "escapedName": "minimist", + "name": "minimist", + "rawSpec": "0.0.5", + "spec": "0.0.5", + "type": "version" + }, + "/Users/MB/git/pdfkit/node_modules/exorcist" + ] + ], + "_from": "minimist@0.0.5", + "_id": "minimist@0.0.5", + "_inCache": true, + "_location": "/exorcist/minimist", + "_npmUser": { + "name": "substack", + "email": "mail@substack.net" + }, + "_npmVersion": "1.3.7", + "_phantomChildren": {}, + "_requested": { + "raw": "minimist@0.0.5", + "scope": null, + "escapedName": "minimist", + "name": "minimist", + "rawSpec": "0.0.5", + "spec": "0.0.5", + "type": "version" + }, + "_requiredBy": [ + "/exorcist" + ], + "_resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.5.tgz", + "_shasum": "d7aa327bcecf518f9106ac6b8f003fa3bcea8566", + "_shrinkwrap": null, + "_spec": "minimist@0.0.5", + "_where": "/Users/MB/git/pdfkit/node_modules/exorcist", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/substack/minimist/issues" + }, + "dependencies": {}, + "description": "parse argument options", + "devDependencies": { + "tap": "~0.4.0", + "tape": "~1.0.4" + }, + "directories": {}, + "dist": { + "shasum": "d7aa327bcecf518f9106ac6b8f003fa3bcea8566", + "tarball": "https://registry.npmjs.org/minimist/-/minimist-0.0.5.tgz" + }, + "homepage": "https://github.com/substack/minimist", + "keywords": [ + "argv", + "getopt", + "parser", + "optimist" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "name": "minimist", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/substack/minimist.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/6..latest", + "ff/5", + "firefox/latest", + "chrome/10", + "chrome/latest", + "safari/5.1", + "safari/latest", + "opera/12" + ] + }, + "version": "0.0.5" +} diff --git a/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/readme.markdown b/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/readme.markdown new file mode 100644 index 00000000..c2563532 --- /dev/null +++ b/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/readme.markdown @@ -0,0 +1,73 @@ +# minimist + +parse argument options + +This module is the guts of optimist's argument parser without all the +fanciful decoration. + +[![browser support](https://ci.testling.com/substack/minimist.png)](http://ci.testling.com/substack/minimist) + +[![build status](https://secure.travis-ci.org/substack/minimist.png)](http://travis-ci.org/substack/minimist) + +# example + +``` js +var argv = require('minimist')(process.argv.slice(2)); +console.dir(argv); +``` + +``` +$ node example/parse.js -a beep -b boop +{ _: [], a: 'beep', b: 'boop' } +``` + +``` +$ node example/parse.js -x 3 -y 4 -n5 -abc --beep=boop foo bar baz +{ _: [ 'foo', 'bar', 'baz' ], + x: 3, + y: 4, + n: 5, + a: true, + b: true, + c: true, + beep: 'boop' } +``` + +# methods + +``` js +var parseArgs = require('minimist') +``` + +## var argv = parseArgs(args, opts={}) + +Return an argument object `argv` populated with the array arguments from `args`. + +`argv._` contains all the arguments that didn't have an option associated with +them. + +Numeric-looking arguments will be returned as numbers unless `opts.string` or +`opts.boolean` is set for that argument name. + +Any arguments after `'--'` will not be parsed and will end up in `argv._`. + +options can be: + +* `opts.string` - a string or array of strings argument names to always treat as +strings +* `opts.boolean` - a string or array of strings to always treat as booleans +* `opts.alias` - an object mapping string names to strings or arrays of string +argument names to use as aliases +* `opts.default` - an object mapping string argument names to default values + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install minimist +``` + +# license + +MIT diff --git a/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/test/dash.js b/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/test/dash.js new file mode 100644 index 00000000..8b034b99 --- /dev/null +++ b/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/test/dash.js @@ -0,0 +1,24 @@ +var parse = require('../'); +var test = require('tape'); + +test('-', function (t) { + t.plan(5); + t.deepEqual(parse([ '-n', '-' ]), { n: '-', _: [] }); + t.deepEqual(parse([ '-' ]), { _: [ '-' ] }); + t.deepEqual(parse([ '-f-' ]), { f: '-', _: [] }); + t.deepEqual( + parse([ '-b', '-' ], { boolean: 'b' }), + { b: true, _: [ '-' ] } + ); + t.deepEqual( + parse([ '-s', '-' ], { string: 's' }), + { s: '-', _: [] } + ); +}); + +test('-a -- b', function (t) { + t.plan(3); + t.deepEqual(parse([ '-a', '--', 'b' ]), { a: true, _: [ 'b' ] }); + t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); + t.deepEqual(parse([ '--a', '--', 'b' ]), { a: true, _: [ 'b' ] }); +}); diff --git a/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/test/default_bool.js b/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/test/default_bool.js new file mode 100644 index 00000000..f0041ee4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/test/default_bool.js @@ -0,0 +1,20 @@ +var test = require('tape'); +var parse = require('../'); + +test('boolean default true', function (t) { + var argv = parse([], { + boolean: 'sometrue', + default: { sometrue: true } + }); + t.equal(argv.sometrue, true); + t.end(); +}); + +test('boolean default false', function (t) { + var argv = parse([], { + boolean: 'somefalse', + default: { somefalse: false } + }); + t.equal(argv.somefalse, false); + t.end(); +}); diff --git a/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/test/dotted.js b/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/test/dotted.js new file mode 100644 index 00000000..ef0ae349 --- /dev/null +++ b/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/test/dotted.js @@ -0,0 +1,16 @@ +var parse = require('../'); +var test = require('tape'); + +test('dotted alias', function (t) { + var argv = parse(['--a.b', '22'], {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); + t.equal(argv.a.b, 22); + t.equal(argv.aa.bb, 22); + t.end(); +}); + +test('dotted default', function (t) { + var argv = parse('', {default: {'a.b': 11}, alias: {'a.b': 'aa.bb'}}); + t.equal(argv.a.b, 11); + t.equal(argv.aa.bb, 11); + t.end(); +}); diff --git a/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/test/long.js b/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/test/long.js new file mode 100644 index 00000000..5d3a1e09 --- /dev/null +++ b/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/test/long.js @@ -0,0 +1,31 @@ +var test = require('tape'); +var parse = require('../'); + +test('long opts', function (t) { + t.deepEqual( + parse([ '--bool' ]), + { bool : true, _ : [] }, + 'long boolean' + ); + t.deepEqual( + parse([ '--pow', 'xixxle' ]), + { pow : 'xixxle', _ : [] }, + 'long capture sp' + ); + t.deepEqual( + parse([ '--pow=xixxle' ]), + { pow : 'xixxle', _ : [] }, + 'long capture eq' + ); + t.deepEqual( + parse([ '--host', 'localhost', '--port', '555' ]), + { host : 'localhost', port : 555, _ : [] }, + 'long captures sp' + ); + t.deepEqual( + parse([ '--host=localhost', '--port=555' ]), + { host : 'localhost', port : 555, _ : [] }, + 'long captures eq' + ); + t.end(); +}); diff --git a/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/test/parse.js b/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/test/parse.js new file mode 100644 index 00000000..7c4348a4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/test/parse.js @@ -0,0 +1,297 @@ +var parse = require('../'); +var test = require('tape'); + +test('parse args', function (t) { + t.deepEqual( + parse([ '--no-moo' ]), + { moo : false, _ : [] }, + 'no' + ); + t.deepEqual( + parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), + { v : ['a','b','c'], _ : [] }, + 'multi' + ); + t.end(); +}); + +test('comprehensive', function (t) { + t.deepEqual( + parse([ + '--name=meowmers', 'bare', '-cats', 'woo', + '-h', 'awesome', '--multi=quux', + '--key', 'value', + '-b', '--bool', '--no-meep', '--multi=baz', + '--', '--not-a-flag', 'eek' + ]), + { + c : true, + a : true, + t : true, + s : 'woo', + h : 'awesome', + b : true, + bool : true, + key : 'value', + multi : [ 'quux', 'baz' ], + meep : false, + name : 'meowmers', + _ : [ 'bare', '--not-a-flag', 'eek' ] + } + ); + t.end(); +}); + +test('nums', function (t) { + var argv = parse([ + '-x', '1234', + '-y', '5.67', + '-z', '1e7', + '-w', '10f', + '--hex', '0xdeadbeef', + '789' + ]); + t.deepEqual(argv, { + x : 1234, + y : 5.67, + z : 1e7, + w : '10f', + hex : 0xdeadbeef, + _ : [ 789 ] + }); + t.deepEqual(typeof argv.x, 'number'); + t.deepEqual(typeof argv.y, 'number'); + t.deepEqual(typeof argv.z, 'number'); + t.deepEqual(typeof argv.w, 'string'); + t.deepEqual(typeof argv.hex, 'number'); + t.deepEqual(typeof argv._[0], 'number'); + t.end(); +}); + +test('flag boolean', function (t) { + var argv = parse([ '-t', 'moo' ], { boolean: 't' }); + t.deepEqual(argv, { t : true, _ : [ 'moo' ] }); + t.deepEqual(typeof argv.t, 'boolean'); + t.end(); +}); + +test('flag boolean value', function (t) { + var argv = parse(['--verbose', 'false', 'moo', '-t', 'true'], { + boolean: [ 't', 'verbose' ], + default: { verbose: true } + }); + + t.deepEqual(argv, { + verbose: false, + t: true, + _: ['moo'] + }); + + t.deepEqual(typeof argv.verbose, 'boolean'); + t.deepEqual(typeof argv.t, 'boolean'); + t.end(); +}); + +test('flag boolean default false', function (t) { + var argv = parse(['moo'], { + boolean: ['t', 'verbose'], + default: { verbose: false, t: false } + }); + + t.deepEqual(argv, { + verbose: false, + t: false, + _: ['moo'] + }); + + t.deepEqual(typeof argv.verbose, 'boolean'); + t.deepEqual(typeof argv.t, 'boolean'); + t.end(); + +}); + +test('boolean groups', function (t) { + var argv = parse([ '-x', '-z', 'one', 'two', 'three' ], { + boolean: ['x','y','z'] + }); + + t.deepEqual(argv, { + x : true, + y : false, + z : true, + _ : [ 'one', 'two', 'three' ] + }); + + t.deepEqual(typeof argv.x, 'boolean'); + t.deepEqual(typeof argv.y, 'boolean'); + t.deepEqual(typeof argv.z, 'boolean'); + t.end(); +}); + +test('newlines in params' , function (t) { + var args = parse([ '-s', "X\nX" ]) + t.deepEqual(args, { _ : [], s : "X\nX" }); + + // reproduce in bash: + // VALUE="new + // line" + // node program.js --s="$VALUE" + args = parse([ "--s=X\nX" ]) + t.deepEqual(args, { _ : [], s : "X\nX" }); + t.end(); +}); + +test('strings' , function (t) { + var s = parse([ '-s', '0001234' ], { string: 's' }).s; + t.equal(s, '0001234'); + t.equal(typeof s, 'string'); + + var x = parse([ '-x', '56' ], { string: 'x' }).x; + t.equal(x, '56'); + t.equal(typeof x, 'string'); + t.end(); +}); + +test('stringArgs', function (t) { + var s = parse([ ' ', ' ' ], { string: '_' })._; + t.same(s.length, 2); + t.same(typeof s[0], 'string'); + t.same(s[0], ' '); + t.same(typeof s[1], 'string'); + t.same(s[1], ' '); + t.end(); +}); + +test('slashBreak', function (t) { + t.same( + parse([ '-I/foo/bar/baz' ]), + { I : '/foo/bar/baz', _ : [] } + ); + t.same( + parse([ '-xyz/foo/bar/baz' ]), + { x : true, y : true, z : '/foo/bar/baz', _ : [] } + ); + t.end(); +}); + +test('alias', function (t) { + var argv = parse([ '-f', '11', '--zoom', '55' ], { + alias: { z: 'zoom' } + }); + t.equal(argv.zoom, 55); + t.equal(argv.z, argv.zoom); + t.equal(argv.f, 11); + t.end(); +}); + +test('multiAlias', function (t) { + var argv = parse([ '-f', '11', '--zoom', '55' ], { + alias: { z: [ 'zm', 'zoom' ] } + }); + t.equal(argv.zoom, 55); + t.equal(argv.z, argv.zoom); + t.equal(argv.z, argv.zm); + t.equal(argv.f, 11); + t.end(); +}); + +test('nested dotted objects', function (t) { + var argv = parse([ + '--foo.bar', '3', '--foo.baz', '4', + '--foo.quux.quibble', '5', '--foo.quux.o_O', + '--beep.boop' + ]); + + t.same(argv.foo, { + bar : 3, + baz : 4, + quux : { + quibble : 5, + o_O : true + } + }); + t.same(argv.beep, { boop : true }); + t.end(); +}); + +test('boolean and alias with chainable api', function (t) { + var aliased = [ '-h', 'derp' ]; + var regular = [ '--herp', 'derp' ]; + var opts = { + herp: { alias: 'h', boolean: true } + }; + var aliasedArgv = parse(aliased, { + boolean: 'herp', + alias: { h: 'herp' } + }); + var propertyArgv = parse(regular, { + boolean: 'herp', + alias: { h: 'herp' } + }); + var expected = { + herp: true, + h: true, + '_': [ 'derp' ] + }; + + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); +}); + +test('boolean and alias with options hash', function (t) { + var aliased = [ '-h', 'derp' ]; + var regular = [ '--herp', 'derp' ]; + var opts = { + alias: { 'h': 'herp' }, + boolean: 'herp' + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + var expected = { + herp: true, + h: true, + '_': [ 'derp' ] + }; + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); +}); + +test('boolean and alias using explicit true', function (t) { + var aliased = [ '-h', 'true' ]; + var regular = [ '--herp', 'true' ]; + var opts = { + alias: { h: 'herp' }, + boolean: 'h' + }; + var aliasedArgv = parse(aliased, opts); + var propertyArgv = parse(regular, opts); + var expected = { + herp: true, + h: true, + '_': [ ] + }; + + t.same(aliasedArgv, expected); + t.same(propertyArgv, expected); + t.end(); +}); + +// regression, see https://github.com/substack/node-optimist/issues/71 +test('boolean and --x=true', function(t) { + var parsed = parse(['--boool', '--other=true'], { + boolean: 'boool' + }); + + t.same(parsed.boool, true); + t.same(parsed.other, 'true'); + + parsed = parse(['--boool', '--other=false'], { + boolean: 'boool' + }); + + t.same(parsed.boool, true); + t.same(parsed.other, 'false'); + t.end(); +}); diff --git a/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/test/parse_modified.js b/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/test/parse_modified.js new file mode 100644 index 00000000..21851b03 --- /dev/null +++ b/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/test/parse_modified.js @@ -0,0 +1,9 @@ +var parse = require('../'); +var test = require('tape'); + +test('parse with modifier functions' , function (t) { + t.plan(1); + + var argv = parse([ '-b', '123' ], { boolean: 'b' }); + t.deepEqual(argv, { b: true, _: ['123'] }); +}); diff --git a/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/test/short.js b/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/test/short.js new file mode 100644 index 00000000..10194ddc --- /dev/null +++ b/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/test/short.js @@ -0,0 +1,85 @@ +var parse = require('../'); +var test = require('tape'); + +test('numeric short args', function (t) { + t.plan(2); + t.deepEqual(parse([ '-n123' ]), { n: 123, _: [] }); + t.deepEqual( + parse([ '-123', '456' ]), + { 1: true, 2: true, 3: 456, _: [] } + ); +}); + +test('short', function (t) { + t.deepEqual( + parse([ '-b' ]), + { b : true, _ : [] }, + 'short boolean' + ); + t.deepEqual( + parse([ 'foo', 'bar', 'baz' ]), + { _ : [ 'foo', 'bar', 'baz' ] }, + 'bare' + ); + t.deepEqual( + parse([ '-cats' ]), + { c : true, a : true, t : true, s : true, _ : [] }, + 'group' + ); + t.deepEqual( + parse([ '-cats', 'meow' ]), + { c : true, a : true, t : true, s : 'meow', _ : [] }, + 'short group next' + ); + t.deepEqual( + parse([ '-h', 'localhost' ]), + { h : 'localhost', _ : [] }, + 'short capture' + ); + t.deepEqual( + parse([ '-h', 'localhost', '-p', '555' ]), + { h : 'localhost', p : 555, _ : [] }, + 'short captures' + ); + t.end(); +}); + +test('mixed short bool and capture', function (t) { + t.same( + parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), + { + f : true, p : 555, h : 'localhost', + _ : [ 'script.js' ] + } + ); + t.end(); +}); + +test('short and long', function (t) { + t.deepEqual( + parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), + { + f : true, p : 555, h : 'localhost', + _ : [ 'script.js' ] + } + ); + t.end(); +}); + +test('-a=b', function (t) { + t.plan(2); + t.deepEqual(parse([ '-n=smth' ]), { _: [], n: 'smth' }); + t.deepEqual( + parse([ '-abn=smth' ]), + { _: [], a: true, b: true, n: 'smth' } + ); +}); + +test('-a =b', function (t) { + t.plan(2); + t.deepEqual(parse([ '-n', '=smth' ]), { _: [], n: '=smth' }); + t.deepEqual( + parse([ '-abn', '=smth' ]), + { _: [], a: true, b: true, n: '=smth' } + ); +}); diff --git a/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/test/whitespace.js b/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/test/whitespace.js new file mode 100644 index 00000000..8a52a58c --- /dev/null +++ b/pitfall/pdfkit/node_modules/exorcist/node_modules/minimist/test/whitespace.js @@ -0,0 +1,8 @@ +var parse = require('../'); +var test = require('tape'); + +test('whitespace should be whitespace' , function (t) { + t.plan(1); + var x = parse([ '-x', '\t' ]).x; + t.equal(x, '\t'); +}); diff --git a/pitfall/pdfkit/node_modules/exorcist/package.json b/pitfall/pdfkit/node_modules/exorcist/package.json new file mode 100644 index 00000000..63b6a603 --- /dev/null +++ b/pitfall/pdfkit/node_modules/exorcist/package.json @@ -0,0 +1,104 @@ +{ + "_args": [ + [ + { + "raw": "exorcist@^0.1.5", + "scope": null, + "escapedName": "exorcist", + "name": "exorcist", + "rawSpec": "^0.1.5", + "spec": ">=0.1.5 <0.2.0", + "type": "range" + }, + "/Users/MB/git/pdfkit" + ] + ], + "_from": "exorcist@>=0.1.5 <0.2.0", + "_id": "exorcist@0.1.6", + "_inCache": true, + "_location": "/exorcist", + "_npmUser": { + "name": "thlorenz", + "email": "thlorenz@gmx.de" + }, + "_npmVersion": "1.4.6", + "_phantomChildren": {}, + "_requested": { + "raw": "exorcist@^0.1.5", + "scope": null, + "escapedName": "exorcist", + "name": "exorcist", + "rawSpec": "^0.1.5", + "spec": ">=0.1.5 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "#DEV:/" + ], + "_resolved": "https://registry.npmjs.org/exorcist/-/exorcist-0.1.6.tgz", + "_shasum": "16a4c4837f484d0b8394fb6380a13fd6b42af8ee", + "_shrinkwrap": null, + "_spec": "exorcist@^0.1.5", + "_where": "/Users/MB/git/pdfkit", + "author": { + "name": "Thorsten Lorenz", + "email": "thlorenz@gmx.de", + "url": "http://thlorenz.com" + }, + "bin": { + "exorcist": "./bin/exorcist.js" + }, + "bugs": { + "url": "https://github.com/thlorenz/exorcist/issues" + }, + "dependencies": { + "convert-source-map": "~0.3.3", + "minimist": "0.0.5", + "through2": "~0.4.0" + }, + "description": "Externalizes the source map found inside a stream to an external `.js.map` file", + "devDependencies": { + "browserify": "~3.20.0", + "tap": "~0.4.3" + }, + "directories": {}, + "dist": { + "shasum": "16a4c4837f484d0b8394fb6380a13fd6b42af8ee", + "tarball": "https://registry.npmjs.org/exorcist/-/exorcist-0.1.6.tgz" + }, + "engine": { + "node": ">=0.6" + }, + "homepage": "https://github.com/thlorenz/exorcist", + "keywords": [ + "source-map", + "source", + "map", + "external", + "mapfile", + "browserify", + "browserify-tool" + ], + "license": { + "type": "MIT", + "url": "https://github.com/thlorenz/exorcist/blob/master/LICENSE" + }, + "main": "index.js", + "maintainers": [ + { + "name": "thlorenz", + "email": "thlorenz@gmx.de" + } + ], + "name": "exorcist", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/thlorenz/exorcist.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "0.1.6" +} diff --git a/pitfall/pdfkit/node_modules/exorcist/test/exorcist.js b/pitfall/pdfkit/node_modules/exorcist/test/exorcist.js new file mode 100644 index 00000000..1a73062a --- /dev/null +++ b/pitfall/pdfkit/node_modules/exorcist/test/exorcist.js @@ -0,0 +1,113 @@ +'use strict'; +/*jshint asi: true */ + +var test = require('tap').test +var fs = require('fs'); +var through = require('through2') +var exorcist = require('../') + +var fixtures = __dirname + '/fixtures'; +var mapfile = fixtures + '/bundle.js.map'; + +function setup() { + if (fs.existsSync(mapfile)) fs.unlinkSync(mapfile); +} + +test('\nwhen piping a bundle generated with browserify through exorcist without adjusting properties', function (t) { + setup(); + var data = '' + fs.createReadStream(fixtures + '/bundle.js', 'utf8') + .pipe(exorcist(mapfile)) + .pipe(through(onread, onflush)); + + function onread(d, _, cb) { data += d; cb(); } + + function onflush(cb) { + var lines = data.split('\n') + t.equal(lines.length, 27, 'pipes entire bundle including prelude, sources and source map url') + t.equal(lines.pop(), '//# sourceMappingURL=bundle.js.map', 'last line as source map url pointing to .js.map file') + + var map = JSON.parse(fs.readFileSync(mapfile, 'utf8')); + t.equal(map.file, 'generated.js', 'leaves file name unchanged') + t.equal(map.sources.length, 4, 'maps 4 source files') + t.equal(map.sourcesContent.length, 4, 'includes 4 source contents') + t.equal(map.mappings.length, 106, 'maintains mappings') + t.equal(map.sourceRoot, '', 'leaves source root an empty string') + + cb(); + t.end() + } +}) + +test('\nwhen piping a bundle generated with browserify through exorcist and adjusting url', function (t) { + setup(); + var data = '' + fs.createReadStream(fixtures + '/bundle.js', 'utf8') + .pipe(exorcist(mapfile, 'http://my.awseome.site/bundle.js.map')) + .pipe(through(onread, onflush)); + + function onread(d, _, cb) { data += d; cb(); } + + function onflush(cb) { + var lines = data.split('\n') + t.equal(lines.length, 27, 'pipes entire bundle including prelude, sources and source map url') + t.equal(lines.pop(), '//# sourceMappingURL=http://my.awseome.site/bundle.js.map', 'last line as source map url pointing to .js.map file at url set to supplied url') + + var map = JSON.parse(fs.readFileSync(mapfile, 'utf8')); + t.equal(map.file, 'generated.js', 'leaves file name unchanged') + t.equal(map.sources.length, 4, 'maps 4 source files') + t.equal(map.sourcesContent.length, 4, 'includes 4 source contents') + t.equal(map.mappings.length, 106, 'maintains mappings') + t.equal(map.sourceRoot, '', 'leaves source root an empty string') + + cb(); + t.end() + } +}) + +test('\nwhen piping a bundle generated with browserify through exorcist and adjusting root and url', function (t) { + setup(); + var data = '' + fs.createReadStream(fixtures + '/bundle.js', 'utf8') + .pipe(exorcist(mapfile, 'http://my.awseome.site/bundle.js.map', '/hello/world.map.js')) + .pipe(through(onread, onflush)); + + function onread(d, _, cb) { data += d; cb(); } + + function onflush(cb) { + var lines = data.split('\n') + t.equal(lines.length, 27, 'pipes entire bundle including prelude, sources and source map url') + t.equal(lines.pop(), '//# sourceMappingURL=http://my.awseome.site/bundle.js.map', 'last line as source map url pointing to .js.map file at url set to supplied url') + + var map = JSON.parse(fs.readFileSync(mapfile, 'utf8')); + t.equal(map.file, 'generated.js', 'leaves file name unchanged') + t.equal(map.sources.length, 4, 'maps 4 source files') + t.equal(map.sourcesContent.length, 4, 'includes 4 source contents') + t.equal(map.mappings.length, 106, 'maintains mappings') + t.equal(map.sourceRoot, '/hello/world.map.js', 'adapts source root') + + cb(); + t.end() + } +}) + +test('\nwhen piping a bundle generated with browserify thats missing a map through exorcist' , function (t) { + setup(); + var data = '' + var missingMapEmitted = false; + fs.createReadStream(fixtures + '/bundle.nomap.js', 'utf8') + .pipe(exorcist(mapfile)) + .on('missing-map', function () { missingMapEmitted = true }) + .pipe(through(onread, onflush)); + + function onread(d, _, cb) { data += d; cb(); } + + function onflush(cb) { + var lines = data.split('\n') + t.equal(lines.length, 25, 'pipes entire bundle including prelude') + t.ok(missingMapEmitted, 'emits missing-map event') + + cb(); + t.end() + } +}) diff --git a/pitfall/pdfkit/node_modules/falafel/.travis.yml b/pitfall/pdfkit/node_modules/falafel/.travis.yml new file mode 100644 index 00000000..f1d0f13c --- /dev/null +++ b/pitfall/pdfkit/node_modules/falafel/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.4 + - 0.6 diff --git a/pitfall/pdfkit/node_modules/falafel/README.markdown b/pitfall/pdfkit/node_modules/falafel/README.markdown new file mode 100644 index 00000000..106728fc --- /dev/null +++ b/pitfall/pdfkit/node_modules/falafel/README.markdown @@ -0,0 +1,113 @@ +# falafel + +Transform the [ast](http://en.wikipedia.org/wiki/Abstract_syntax_tree) on a +recursive walk. + +[![browser support](http://ci.testling.com/substack/node-falafel.png)](http://ci.testling.com/substack/node-falafel) + +[![build status](https://secure.travis-ci.org/substack/node-falafel.png)](http://travis-ci.org/substack/node-falafel) + +This module is like [burrito](https://github.com/substack/node-burrito), +except that it uses [esprima](http://esprima.org) instead of +[uglify](https://github.com/mishoo/UglifyJS) +for friendlier-looking ast nodes. + +# example + +## array.js + +Put a function wrapper around all array literals. + +``` js +var falafel = require('falafel'); + +var src = '(' + function () { + var xs = [ 1, 2, [ 3, 4 ] ]; + var ys = [ 5, 6 ]; + console.dir([ xs, ys ]); +} + ')()'; + +var output = falafel(src, function (node) { + if (node.type === 'ArrayExpression') { + node.update('fn(' + node.source() + ')'); + } +}); +console.log(output); +``` + +output: + +``` +(function () { + var xs = fn([ 1, 2, fn([ 3, 4 ]) ]); + var ys = fn([ 5, 6 ]); + console.dir(fn([ xs, ys ])); +})() +``` + +# methods + +``` js +var falafel = require('falafel') +``` + +## falafel(src, opts={}, fn) + +Transform the string source `src` with the function `fn`, returning a +string-like transformed output object. + +For every node in the ast, `fn(node)` fires. The recursive walk is a +pre-traversal, so children get called before their parents. + +Performing a pre-traversal makes it easier to write nested transforms since +transforming parents often requires transforming all its children first. + +The return value is string-like (it defines `.toString()` and `.inspect()`) so +that you can call `node.update()` asynchronously after the function has +returned and still capture the output. + +Instead of passing a `src` you can also use `opts.source`. + +All of the `opts` will be passed directly to esprima except for `'range'` which +is always turned on because falafel needs it. + +Some of the options you might want from esprima includes: +`'loc'`, `'raw'`, `'comments'`, `'tokens'`, and `'tolerant'`. + +# nodes + +Aside from the regular [esprima](http://esprima.org) data, you can also call +some inserted methods on nodes. + +Aside from updating the current node, you can also reach into sub-nodes to call +update functions on children from parent nodes. + +## node.source() + +Return the source for the given node, including any modifications made to +children nodes. + +## node.update(s) + +Transform the source for the present node to the string `s`. + +Note that in `'ForStatement'` node types, there is an existing subnode called +`update`. For those nodes all the properties are copied over onto the +`node.update()` function. + +## node.parent + +Reference to the parent element or `null` at the root element. + +# install + +With [npm](http://npmjs.org) do: + +``` +npm install falafel +``` + +# license + +MIT + diff --git a/pitfall/pdfkit/node_modules/falafel/example/array.js b/pitfall/pdfkit/node_modules/falafel/example/array.js new file mode 100644 index 00000000..c805d519 --- /dev/null +++ b/pitfall/pdfkit/node_modules/falafel/example/array.js @@ -0,0 +1,14 @@ +var falafel = require('../'); + +var src = '(' + function () { + var xs = [ 1, 2, [ 3, 4 ] ]; + var ys = [ 5, 6 ]; + console.dir([ xs, ys ]); +} + ')()'; + +var output = falafel(src, function (node) { + if (node.type === 'ArrayExpression') { + node.update('fn(' + node.source() + ')'); + } +}); +console.log(output); diff --git a/pitfall/pdfkit/node_modules/falafel/example/prompt.js b/pitfall/pdfkit/node_modules/falafel/example/prompt.js new file mode 100644 index 00000000..49dfa0d1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/falafel/example/prompt.js @@ -0,0 +1,49 @@ +var falafel = require('../'); +var vm = require('vm'); + +var termExps = [ + 'Identifier', + 'CallExpression', + 'BinaryExpression', + 'UpdateExpression', + 'UnaryExpression' +].reduce(function (acc, key) { acc[key] = true; return acc }, {}); + +function terminated (node) { + for (var p = node; p.parent; p = p.parent) { + if (termExps[p.type]) return true; + } + return false; +} + +var src = '{"a":[2,~9,prompt(":d")],"b":4,"c":prompt("beep"),"d":6}'; + +var offsets = []; +var output = falafel('(' + src + ')', function (node) { + var isLeaf = node.parent + && !terminated(node.parent) && terminated(node) + ; + + if (isLeaf) { + var s = node.source(); + var prompted = false; + var res = vm.runInNewContext('(' + s + ')', { + prompt : function (x) { + setTimeout(function () { + node.update(x.toUpperCase()); + }, Math.random() * 50); + prompted = true; + } + }); + if (!prompted) { + var s_ = JSON.stringify(res); + node.update(s_); + } + } +}); + +setTimeout(function () { + console.log(src); + console.log('---'); + console.log(output); +}, 200); diff --git a/pitfall/pdfkit/node_modules/falafel/index.js b/pitfall/pdfkit/node_modules/falafel/index.js new file mode 100644 index 00000000..f9630a65 --- /dev/null +++ b/pitfall/pdfkit/node_modules/falafel/index.js @@ -0,0 +1,94 @@ +var parse = require('esprima').parse; +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) keys.push(key); + return keys; +}; +var forEach = function (xs, fn) { + if (xs.forEach) return xs.forEach(fn); + for (var i = 0; i < xs.length; i++) { + fn.call(xs, xs[i], i, xs); + } +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; + +module.exports = function (src, opts, fn) { + if (typeof opts === 'function') { + fn = opts; + opts = {}; + } + if (typeof src === 'object') { + opts = src; + src = opts.source; + delete opts.source; + } + src = src === undefined ? opts.source : src; + opts.range = true; + if (typeof src !== 'string') src = String(src); + + var ast = parse(src, opts); + + var result = { + chunks : src.split(''), + toString : function () { return result.chunks.join('') }, + inspect : function () { return result.toString() } + }; + var index = 0; + + (function walk (node, parent) { + insertHelpers(node, parent, result.chunks); + + forEach(objectKeys(node), function (key) { + if (key === 'parent') return; + + var child = node[key]; + if (isArray(child)) { + forEach(child, function (c) { + if (c && typeof c.type === 'string') { + walk(c, node); + } + }); + } + else if (child && typeof child.type === 'string') { + insertHelpers(child, node, result.chunks); + walk(child, node); + } + }); + fn(node); + })(ast, undefined); + + return result; +}; + +function insertHelpers (node, parent, chunks) { + if (!node.range) return; + + node.parent = parent; + + node.source = function () { + return chunks.slice( + node.range[0], node.range[1] + ).join(''); + }; + + if (node.update && typeof node.update === 'object') { + var prev = node.update; + forEach(objectKeys(prev), function (key) { + update[key] = prev[key]; + }); + node.update = update; + } + else { + node.update = update; + } + + function update (s) { + chunks[node.range[0]] = s; + for (var i = node.range[0] + 1; i < node.range[1]; i++) { + chunks[i] = ''; + } + }; +} diff --git a/pitfall/pdfkit/node_modules/falafel/package.json b/pitfall/pdfkit/node_modules/falafel/package.json new file mode 100644 index 00000000..ce0c77a7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/falafel/package.json @@ -0,0 +1,122 @@ +{ + "_args": [ + [ + { + "raw": "falafel@~0.1.6", + "scope": null, + "escapedName": "falafel", + "name": "falafel", + "rawSpec": "~0.1.6", + "spec": ">=0.1.6 <0.2.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/brfs" + ] + ], + "_from": "falafel@>=0.1.6 <0.2.0", + "_id": "falafel@0.1.6", + "_inCache": true, + "_location": "/falafel", + "_npmUser": { + "name": "substack", + "email": "mail@substack.net" + }, + "_npmVersion": "1.2.2", + "_phantomChildren": {}, + "_requested": { + "raw": "falafel@~0.1.6", + "scope": null, + "escapedName": "falafel", + "name": "falafel", + "rawSpec": "~0.1.6", + "spec": ">=0.1.6 <0.2.0", + "type": "range" + }, + "_requiredBy": [ + "/brfs" + ], + "_resolved": "https://registry.npmjs.org/falafel/-/falafel-0.1.6.tgz", + "_shasum": "3084cf3d41b59d15c813be6f259557fdc82b0660", + "_shrinkwrap": null, + "_spec": "falafel@~0.1.6", + "_where": "/Users/MB/git/pdfkit/node_modules/brfs", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/substack/node-falafel/issues" + }, + "dependencies": { + "esprima": "~1.0.2" + }, + "description": "transform the ast on a recursive walk", + "devDependencies": { + "tap": "~0.3.0", + "tape": "~0.0.2" + }, + "directories": { + "example": "example", + "test": "test" + }, + "dist": { + "shasum": "3084cf3d41b59d15c813be6f259557fdc82b0660", + "tarball": "https://registry.npmjs.org/falafel/-/falafel-0.1.6.tgz" + }, + "engines": { + "node": ">=0.4.0" + }, + "homepage": "https://github.com/substack/node-falafel#readme", + "keywords": [ + "ast", + "source", + "traversal", + "syntax", + "tree", + "burrito" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "name": "falafel", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/substack/node-falafel.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "testling": { + "files": "test/*.js", + "browsers": { + "iexplore": [ + "6.0", + "7.0", + "8.0", + "9.0" + ], + "chrome": [ + "20.0" + ], + "firefox": [ + "10.0", + "15.0" + ], + "safari": [ + "5.1" + ], + "opera": [ + "12.0" + ] + } + }, + "version": "0.1.6" +} diff --git a/pitfall/pdfkit/node_modules/falafel/test/array.js b/pitfall/pdfkit/node_modules/falafel/test/array.js new file mode 100644 index 00000000..3680cab8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/falafel/test/array.js @@ -0,0 +1,35 @@ +var falafel = require('../'); +var test = require('tape'); + +test('array', function (t) { + t.plan(5); + + var src = '(' + function () { + var xs = [ 1, 2, [ 3, 4 ] ]; + var ys = [ 5, 6 ]; + g([ xs, ys ]); + } + ')()'; + + var output = falafel(src, function (node) { + if (node.type === 'ArrayExpression') { + node.update('fn(' + node.source() + ')'); + } + }); + + var arrays = [ + [ 3, 4 ], + [ 1, 2, [ 3, 4 ] ], + [ 5, 6 ], + [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ], + ]; + + Function(['fn','g'], output)( + function (xs) { + t.same(arrays.shift(), xs); + return xs; + }, + function (xs) { + t.same(xs, [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ]); + } + ); +}); diff --git a/pitfall/pdfkit/node_modules/falafel/test/async.js b/pitfall/pdfkit/node_modules/falafel/test/async.js new file mode 100644 index 00000000..780efcfc --- /dev/null +++ b/pitfall/pdfkit/node_modules/falafel/test/async.js @@ -0,0 +1,42 @@ +var falafel = require('../'); +var test = require('tape'); + +test('array', function (t) { + t.plan(5); + + var src = '(' + function () { + var xs = [ 1, 2, [ 3, 4 ] ]; + var ys = [ 5, 6 ]; + g([ xs, ys ]); + } + ')()'; + + var pending = 0; + var output = falafel(src, function (node) { + if (node.type === 'ArrayExpression') { + pending ++; + setTimeout(function () { + node.update('fn(' + node.source() + ')'); + if (--pending === 0) check(); + }, 50 * pending * 2); + } + }); + + var arrays = [ + [ 3, 4 ], + [ 1, 2, [ 3, 4 ] ], + [ 5, 6 ], + [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ], + ]; + + function check () { + Function([ 'fn', 'g' ], output)( + function (xs) { + t.same(arrays.shift(), xs); + return xs; + }, + function (xs) { + t.same(xs, [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ]); + } + ); + } +}); diff --git a/pitfall/pdfkit/node_modules/falafel/test/for.js b/pitfall/pdfkit/node_modules/falafel/test/for.js new file mode 100644 index 00000000..8ad19a01 --- /dev/null +++ b/pitfall/pdfkit/node_modules/falafel/test/for.js @@ -0,0 +1,28 @@ +var falafel = require('../'); +var test = require('tape'); + +test('for loop', function (t) { + t.plan(3); + + var src = '(' + function () { + var sum = 0; + for (var i = 0; i < 10; i++) { + sum += i; + } + return sum; + } + ')()'; + + var output = falafel(src, function (node) { + if (node.type === 'ForStatement') { + t.equal(node.update.source(), 'i++'); + node.update.update('i+=2'); + } + if (node.type === 'UpdateExpression') { + t.equal(node.source(), 'i++'); + } + }); + + var res = Function('return ' + output)(); + t.equal(res, 2 + 4 + 6 + 8); + //t.equal(res, 222 + 4 + 6 + 8); +}); diff --git a/pitfall/pdfkit/node_modules/falafel/test/parent.js b/pitfall/pdfkit/node_modules/falafel/test/parent.js new file mode 100644 index 00000000..ae10fea4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/falafel/test/parent.js @@ -0,0 +1,33 @@ +var falafel = require('../'); +var test = require('tape'); + +test('parent', function (t) { + t.plan(5); + + var src = '(' + function () { + var xs = [ 1, 2, 3 ]; + fn(ys); + } + ')()'; + + var output = falafel(src, function (node) { + if (node.type === 'ArrayExpression') { + t.equal(node.parent.type, 'VariableDeclarator'); + t.equal( + ffBracket(node.parent.source()), + 'xs = [ 1, 2, 3 ]' + ); + t.equal(node.parent.parent.type, 'VariableDeclaration'); + t.equal( + ffBracket(node.parent.parent.source()), + 'var xs = [ 1, 2, 3 ];' + ); + node.parent.update('ys = 4;'); + } + }); + + Function(['fn'], output)(function (x) { t.equal(x, 4) }); +}); + +function ffBracket (s) { + return s.replace(/\[\s*/, '[ ').replace(/\s*\]/, ' ]'); +} diff --git a/pitfall/pdfkit/node_modules/fontkit/README.md b/pitfall/pdfkit/node_modules/fontkit/README.md new file mode 100644 index 00000000..f642d515 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/README.md @@ -0,0 +1,266 @@ +# fontkit + +Fontkit is an advanced font engine for Node and the browser, used by [PDFKit](https://github.com/devongovett/pdfkit). It supports many font formats, advanced glyph substitution and layout features, glyph path extraction, color emoji glyphs, font subsetting, and more. + +## Features + +* Suports TrueType (.ttf), OpenType (.otf), WOFF, WOFF2, TrueType Collection (.ttc), and Datafork TrueType (.dfont) font files +* Supports mapping characters to glyphs, including support for ligatures and other advanced substitutions (see below) +* Supports reading glyph metrics and laying out glyphs, including support for kerning and other advanced layout features (see below) +* Advanced OpenType features including glyph substitution (GSUB) and positioning (GPOS) +* Apple Advanced Typography (AAT) glyph substitution features (morx table) +* Support for getting glyph vector paths and converting them to SVG paths, or rendering them to a graphics context +* Supports TrueType (glyf) and PostScript (CFF) outlines +* Support for color glyphs (e.g. emoji), including Apple’s SBIX table, and Microsoft’s COLR table +* Support for AAT variation glyphs, allowing for nearly infinite design control over weight, width, and other axes. +* Font subsetting support - create a new font including only the specified glyphs + +## Installation + + npm install fontkit + +## Example + +```javascript +var fontkit = require('fontkit'); + +// open a font synchronously +var font = fontkit.openSync('font.ttf'); + +// layout a string, using default shaping features. +// returns a GlyphRun, describing glyphs and positions. +var run = font.layout('hello world!'); + +// get an SVG path for a glyph +var svg = run.glyphs[0].path.toSVG(); + +// create a font subset +var subset = font.createSubset(); +run.glyphs.forEach(function(glyph) { + subset.includeGlyph(glyph); +}); + +subset.encodeStream() + .pipe(fs.createWriteStream('subset.ttf')); +``` + +## API + +### `fontkit.open(filename, postscriptName = null, callback(err, font))` + +Opens a font file asynchronously, and calls the callback with a font object. For collection fonts (such as TrueType collection files), you can pass a `postscriptName` to get that font out of the collection instead of a collection object. + +### `fontkit.openSync(filename, postscriptName = null)` + +Opens a font file synchronously, and returns a font object. For collection fonts (such as TrueType collection files), you can pass a `postscriptName` to get that font out of the collection instead of a collection object. + +### `fontkit.create(buffer, postscriptName = null)` + +Returns a font object for the given buffer. For collection fonts (such as TrueType collection files), you can pass a `postscriptName` to get that font out of the collection instead of a collection object. + +## Font objects + +There are several different types of font objects that are returned by fontkit depending on the font format. They all inherit from the `TTFFont` class and have the same public API, described below. + +### Metadata properties + +The following properties are strings (or null if the font does not contain strings for them) describing the font, as specified by the font creator. + +* `postscriptName` +* `fullName` +* `familyName` +* `subfamilyName` +* `copyright` +* `version` + +### Metrics + +The following properties describe the general metrics of the font. See [here](http://www.freetype.org/freetype2/docs/glyphs/glyphs-3.html) for a good overview of how all of these properties relate to one another. + +* `unitsPerEm` - the size of the font’s internal coordinate grid +* `ascent` - the font’s [ascender](http://en.wikipedia.org/wiki/Ascender_(typography)) +* `descent` - the font’s [descender](http://en.wikipedia.org/wiki/Descender) +* `lineGap` - the amount of space that should be included between lines +* `underlinePosition` - the offset from the normal underline position that should be used +* `underlineThickness` - the weight of the underline that should be used +* `italicAngle` - if this is an italic font, the angle the cursor should be drawn at to match the font design +* `capHeight` - the height of capital letters above the baseline. See [here](http://en.wikipedia.org/wiki/Cap_height) for more details. +* `xHeight`- the height of lower case letters. See [here](http://en.wikipedia.org/wiki/X-height) for more details. +* `bbox` - the font’s bounding box, i.e. the box that encloses all glyphs in the font + +### Other properties + +* `numGlyphs` - the number of glyphs in the font +* `characterSet` - an array of all of the unicode code points supported by the font +* `availableFeatures` - an array of all [OpenType feature tags](https://www.microsoft.com/typography/otspec/featuretags.htm) (or mapped AAT tags) supported by the font (see below for a description of this) + +### Character to glyph mapping + +Fontkit includes several methods for character to glyph mapping, including support for advanced OpenType and AAT substitutions. + +#### `font.glyphForCodePoint(codePoint)` + +Maps a single unicode code point (number) to a Glyph object. Does not perform any advanced substitutions (there is no context to do so). + +#### `font.hasGlyphForCodePoint(codePoint)` + +Returns whether there is glyph in the font for the given unicode code point. + +#### `font.glyphsForString(string)` + +This method returns an array of Glyph objects for the given string. This is only a one-to-one mapping from characters +to glyphs. For most uses, you should use `font.layout` (described below), which provides a much more advanced mapping +supporting AAT and OpenType shaping. + +### Glyph metrics and layout + +Fontkit includes several methods for accessing glyph metrics and performing layout, including support for kerning and other advanced OpenType positioning adjustments. + +#### `font.widthOfGlyph(glyph_id)` + +Returns the advance width (described above) for a single glyph id. + +#### `font.layout(string, features = [])` + +This method returns a `GlyphRun` object, which includes an array of `Glyph`s and `GlyphPosition`s for the given string. +`Glyph` objects are described below. `GlyphPosition` objects include 4 properties: `xAdvance`, `yAdvance`, `xOffset`, +and `yOffset`. + +The `features` parameter is an array of [OpenType feature tags](https://www.microsoft.com/typography/otspec/featuretags.htm) to be applied +in addition to the default set. If this is an AAT font, the OpenType feature tags are mapped to AAT features. + +### Variation fonts + +Fontkit has support for AAT variation fonts, where glyphs can adjust their shape according to user defined settings along +various axes including weight, width, and slant. Font designers specify the minimum, default, and maximum values for each +axis they support, and allow the user fine grained control over the rendered text. + +#### `font.variationAxes` + +Returns an object describing the available variation axes. Keys are 4 letter axis tags, and values include `name`, +`min`, `default`, and `max` properties for the axis. + +#### `font.namedVariations` + +The font designer may have picked out some variations that they think look particularly good, for example a light, regular, +and bold weight which would traditionally be separate fonts. This property returns an object describing these named variation +instances that the designer has specified. Keys are variation names, and values are objects with axis settings. + +#### `font.getVariation(variation)` + +Returns a new font object representing this variation, from which you can get glyphs and perform layout as normal. +The `variation` parameter can either be a variation settings object or a string variation name. Variation settings objects +have axis names as keys, and numbers as values (should be in the range specified by `font.variationAxes`). + +### Other methods + +#### `font.getGlyph(glyph_id, codePoints = [])` + +Returns a glyph object for the given glyph id. You can pass the array of code points this glyph represents for your use later, and it will be stored in the glyph object. + +#### `font.createSubset()` + +Returns a Subset object for this font, described below. + +## Font Collection objects + +For font collection files that contain multiple fonts in a single file, such as TrueType Collection (.ttc) and Datafork TrueType (.dfont) files, a font collection object can be returned by Fontkit. + +### `collection.getFont(postscriptName)` + +Gets a font from the collection by its postscript name. Returns a Font object, described above. + +### `collection.fonts` + +This property is a lazily-loaded array of all of the fonts in the collection. + +## Glyph objects + +Glyph objects represent a glyph in the font. They have various properties for accessing metrics and the actual vector path the glyph represents, and methods for rendering the glyph to a graphics context. + +You do not create glyph objects directly. They are created by various methods on the font object, described above. There are several subclasses of the base `Glyph` class internally that may be returned depending on the font format, but they all include the following API. + +### Properties + +* `id` - the glyph id in the font +* `codePoints` - an array of unicode code points that are represented by this glyph. There can be multiple code points in the case of ligatures and other glyphs that represent multiple visual characters. +* `path` - a vector Path object representing the glyph +* `bbox` - the glyph’s bounding box, i.e. the rectangle that encloses the glyph outline as tightly as possible. +* `cbox` - the glyph’s control box. This is often the same as the bounding box, but is faster to compute. Because of the way bezier curves are defined, some of the control points can be outside of the bounding box. Where `bbox` takes this into account, `cbox` does not. Thus, `cbox` is less accurate, but faster to compute. See [here](http://www.freetype.org/freetype2/docs/glyphs/glyphs-6.html#section-2) for a more detailed description. +* `advanceWidth` - the glyph’s advance width. + +### `glyph.render(ctx, size)` + +Renders the glyph to the given graphics context, at the specified font size. + +### Color glyphs (e.g. emoji) + +Fontkit has support for several different color emoji font formats. Currently, these include Apple’s SBIX table (as used by the “Apple Color Emoji” font), and Microsoft’s COLR table (supported by Windows 8.1). [Here](http://blog.symbolset.com/multicolor-fonts) is an overview of the various color font formats out there. + +#### `glyph.getImageForSize(size)` + +For SBIX glyphs, which are bitmap based, this returns an object containing some properties about the image, along with the image data itself (usually PNG). + +#### `glyph.layers` + +For COLR glyphs, which are vector based, this returns an array of objects representing the glyphs and colors for each layer in render order. + +## Path objects + +Path objects are returned by glyphs and represent the actual vector outlines for each glyph in the font. Paths can be converted to SVG path data strings, or to functions that can be applied to render the path to a graphics context. + +### `path.moveTo(x, y)` + +Moves the virtual pen to the given x, y coordinates. + +### `path.lineTo(x, y)` + +Adds a line to the path from the current point to the given x, y coordinates. + +### `path.quadraticCurveTo(cpx, cpy, x, y)` + +Adds a quadratic curve to the path from the current point to the given x, y coordinates using cpx, cpy as a control point. + +### `path.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y)` + +Adds a bezier curve to the path from the current point to the given x, y coordinates using cp1x, cp1y and cp2x, cp2y as control points. + +### `path.closePath()` + +Closes the current sub-path by drawing a straight line back to the starting point. + +### `path.toFunction()` + +Compiles the path to a JavaScript function that can be applied with a graphics context in order to render the path. + +### `path.toSVG()` + +Converts the path to an SVG path data string. + +### `path.bbox` + +This property represents the path’s bounding box, i.e. the smallest rectangle that contains the entire path shape. This is the exact bounding box, taking into account control points that may be outside the visible shape. + +### `path.cbox` + +This property represents the path’s control box. It is like the bounding box, but it includes all points of the path, including control points of bezier segments. It is much faster to compute than the real bounding box, but less accurate if there are control points outside of the visible shape. + +## Subsets + +Fontkit can perform font subsetting, i.e. the process of creating a new font from an existing font where only the specified glyphs are included. This is useful to reduce the size of large fonts, such as in PDF generation or for web use. + +Currently, subsets produce minimal fonts designed for PDF embedding that may not work as standalone files. They have no cmap tables and other essential tables for standalone use. This limitation will be removed in the future. + +You create a Subset object by calling `font.createSubset()`, described above. The API on Subset objects is as follows. + +### `subset.includeGlyph(glyph)` + +Includes the given glyph object or glyph ID in the subset. + +### `subset.encodeStream()` + +Returns a [stream](https://nodejs.org/api/stream.html) containing the encoded font file that can be piped to a destination, such as a file. + +## License + +MIT diff --git a/pitfall/pdfkit/node_modules/fontkit/base.js b/pitfall/pdfkit/node_modules/fontkit/base.js new file mode 100644 index 00000000..0d2202c3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/base.js @@ -0,0 +1,62 @@ +'use strict'; + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var r = _interopDefault(require('restructure')); + +var fs = require('fs'); + +var fontkit = {}; +fontkit.logErrors = false; + +var formats = []; +fontkit.registerFormat = function (format) { + formats.push(format); +}; + +fontkit.openSync = function (filename, postscriptName) { + var buffer = fs.readFileSync(filename); + return fontkit.create(buffer, postscriptName); +}; + +fontkit.open = function (filename, postscriptName, callback) { + if (typeof postscriptName === 'function') { + callback = postscriptName; + postscriptName = null; + } + + fs.readFile(filename, function (err, buffer) { + if (err) { + return callback(err); + } + + try { + var font = fontkit.create(buffer, postscriptName); + } catch (e) { + return callback(e); + } + + return callback(null, font); + }); + + return; +}; + +fontkit.create = function (buffer, postscriptName) { + for (var i = 0; i < formats.length; i++) { + var format = formats[i]; + if (format.probe(buffer)) { + var font = new format(new r.DecodeStream(buffer)); + if (postscriptName) { + return font.getFont(postscriptName); + } + + return font; + } + } + + throw new Error('Unknown font format'); +}; + +module.exports = fontkit; +//# sourceMappingURL=base.js.map diff --git a/pitfall/pdfkit/node_modules/fontkit/base.js.map b/pitfall/pdfkit/node_modules/fontkit/base.js.map new file mode 100644 index 00000000..b9ab9b77 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/base.js.map @@ -0,0 +1 @@ +{"version":3,"file":null,"sources":["src/base.js"],"sourcesContent":["import r from 'restructure';\nconst fs = require('fs');\n\nvar fontkit = {};\nexport default fontkit;\n\nfontkit.logErrors = false;\n\nlet formats = [];\nfontkit.registerFormat = function(format) {\n formats.push(format);\n};\n\nfontkit.openSync = function(filename, postscriptName) {\n let buffer = fs.readFileSync(filename);\n return fontkit.create(buffer, postscriptName);\n};\n\nfontkit.open = function(filename, postscriptName, callback) {\n if (typeof postscriptName === 'function') {\n callback = postscriptName;\n postscriptName = null;\n }\n\n fs.readFile(filename, function(err, buffer) {\n if (err) { return callback(err); }\n\n try {\n var font = fontkit.create(buffer, postscriptName);\n } catch (e) {\n return callback(e);\n }\n\n return callback(null, font);\n });\n\n return;\n};\n\nfontkit.create = function(buffer, postscriptName) {\n for (let i = 0; i < formats.length; i++) {\n let format = formats[i];\n if (format.probe(buffer)) {\n let font = new format(new r.DecodeStream(buffer));\n if (postscriptName) {\n return font.getFont(postscriptName);\n }\n\n return font;\n }\n }\n\n throw new Error('Unknown font format');\n};\n"],"names":["fs","require","fontkit","logErrors","formats","registerFormat","format","push","openSync","filename","postscriptName","buffer","readFileSync","create","open","callback","readFile","err","font","e","i","length","probe","r","DecodeStream","getFont","Error"],"mappings":";;;;;;AACA,IAAMA,KAAKC,QAAQ,IAAR,CAAX;;AAEA,IAAIC,UAAU,EAAd;AACA,AAEAA,QAAQC,SAAR,GAAoB,KAApB;;AAEA,IAAIC,UAAU,EAAd;AACAF,QAAQG,cAAR,GAAyB,UAASC,MAAT,EAAiB;UAChCC,IAAR,CAAaD,MAAb;CADF;;AAIAJ,QAAQM,QAAR,GAAmB,UAASC,QAAT,EAAmBC,cAAnB,EAAmC;MAChDC,SAASX,GAAGY,YAAH,CAAgBH,QAAhB,CAAb;SACOP,QAAQW,MAAR,CAAeF,MAAf,EAAuBD,cAAvB,CAAP;CAFF;;AAKAR,QAAQY,IAAR,GAAe,UAASL,QAAT,EAAmBC,cAAnB,EAAmCK,QAAnC,EAA6C;MACtD,OAAOL,cAAP,KAA0B,UAA9B,EAA0C;eAC7BA,cAAX;qBACiB,IAAjB;;;KAGCM,QAAH,CAAYP,QAAZ,EAAsB,UAASQ,GAAT,EAAcN,MAAd,EAAsB;QACtCM,GAAJ,EAAS;aAASF,SAASE,GAAT,CAAP;;;QAEP;UACEC,OAAOhB,QAAQW,MAAR,CAAeF,MAAf,EAAuBD,cAAvB,CAAX;KADF,CAEE,OAAOS,CAAP,EAAU;aACHJ,SAASI,CAAT,CAAP;;;WAGKJ,SAAS,IAAT,EAAeG,IAAf,CAAP;GATF;;;CANF;;AAqBAhB,QAAQW,MAAR,GAAiB,UAASF,MAAT,EAAiBD,cAAjB,EAAiC;OAC3C,IAAIU,IAAI,CAAb,EAAgBA,IAAIhB,QAAQiB,MAA5B,EAAoCD,GAApC,EAAyC;QACnCd,SAASF,QAAQgB,CAAR,CAAb;QACId,OAAOgB,KAAP,CAAaX,MAAb,CAAJ,EAA0B;UACpBO,OAAO,IAAIZ,MAAJ,CAAW,IAAIiB,EAAEC,YAAN,CAAmBb,MAAnB,CAAX,CAAX;UACID,cAAJ,EAAoB;eACXQ,KAAKO,OAAL,CAAaf,cAAb,CAAP;;;aAGKQ,IAAP;;;;QAIE,IAAIQ,KAAJ,CAAU,qBAAV,CAAN;CAbF;;"} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/fontkit/data.trie b/pitfall/pdfkit/node_modules/fontkit/data.trie new file mode 100644 index 00000000..5f6b4909 Binary files /dev/null and b/pitfall/pdfkit/node_modules/fontkit/data.trie differ diff --git a/pitfall/pdfkit/node_modules/fontkit/index.js b/pitfall/pdfkit/node_modules/fontkit/index.js new file mode 100644 index 00000000..bfacec00 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/index.js @@ -0,0 +1,13539 @@ +'use strict'; + +function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; } + +var r = _interopDefault(require('restructure')); +var _Object$getOwnPropertyDescriptor = _interopDefault(require('babel-runtime/core-js/object/get-own-property-descriptor')); +var _getIterator = _interopDefault(require('babel-runtime/core-js/get-iterator')); +var _Object$freeze = _interopDefault(require('babel-runtime/core-js/object/freeze')); +var _Object$keys = _interopDefault(require('babel-runtime/core-js/object/keys')); +var _typeof = _interopDefault(require('babel-runtime/helpers/typeof')); +var _Object$defineProperty = _interopDefault(require('babel-runtime/core-js/object/define-property')); +var _classCallCheck = _interopDefault(require('babel-runtime/helpers/classCallCheck')); +var _createClass = _interopDefault(require('babel-runtime/helpers/createClass')); +var _Map = _interopDefault(require('babel-runtime/core-js/map')); +var _possibleConstructorReturn = _interopDefault(require('babel-runtime/helpers/possibleConstructorReturn')); +var _inherits = _interopDefault(require('babel-runtime/helpers/inherits')); +var restructure_src_utils = require('restructure/src/utils'); +var _Object$defineProperties = _interopDefault(require('babel-runtime/core-js/object/define-properties')); +var isEqual = _interopDefault(require('deep-equal')); +var _Object$assign = _interopDefault(require('babel-runtime/core-js/object/assign')); +var _String$fromCodePoint = _interopDefault(require('babel-runtime/core-js/string/from-code-point')); +var _Array$from = _interopDefault(require('babel-runtime/core-js/array/from')); +var _Set = _interopDefault(require('babel-runtime/core-js/set')); +var unicode = _interopDefault(require('unicode-properties')); +var UnicodeTrie = _interopDefault(require('unicode-trie')); +var StateMachine = _interopDefault(require('dfa')); +var _Number$EPSILON = _interopDefault(require('babel-runtime/core-js/number/epsilon')); +var cloneDeep = _interopDefault(require('clone')); +var inflate = _interopDefault(require('tiny-inflate')); +var brotli = _interopDefault(require('brotli/decompress')); + +var fs = require('fs'); + +var fontkit = {}; +fontkit.logErrors = false; + +var formats = []; +fontkit.registerFormat = function (format) { + formats.push(format); +}; + +fontkit.openSync = function (filename, postscriptName) { + var buffer = fs.readFileSync(filename); + return fontkit.create(buffer, postscriptName); +}; + +fontkit.open = function (filename, postscriptName, callback) { + if (typeof postscriptName === 'function') { + callback = postscriptName; + postscriptName = null; + } + + fs.readFile(filename, function (err, buffer) { + if (err) { + return callback(err); + } + + try { + var font = fontkit.create(buffer, postscriptName); + } catch (e) { + return callback(e); + } + + return callback(null, font); + }); + + return; +}; + +fontkit.create = function (buffer, postscriptName) { + for (var i = 0; i < formats.length; i++) { + var format = formats[i]; + if (format.probe(buffer)) { + var font = new format(new r.DecodeStream(buffer)); + if (postscriptName) { + return font.getFont(postscriptName); + } + + return font; + } + } + + throw new Error('Unknown font format'); +}; + +/** + * This decorator caches the results of a getter or method such that + * the results are lazily computed once, and then cached. + * @private + */ +function cache(target, key, descriptor) { + if (descriptor.get) { + (function () { + var get = descriptor.get; + descriptor.get = function () { + var value = get.call(this); + _Object$defineProperty(this, key, { value: value }); + return value; + }; + })(); + } else if (typeof descriptor.value === 'function') { + var _ret2 = function () { + var fn = descriptor.value; + + return { + v: { + get: function get() { + var cache = new _Map(); + function memoized() { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + var key = args.length > 0 ? args[0] : 'value'; + if (cache.has(key)) { + return cache.get(key); + } + + var result = fn.apply(this, args); + cache.set(key, result); + return result; + }; + + _Object$defineProperty(this, key, { value: memoized }); + return memoized; + } + } + }; + }(); + + if ((typeof _ret2 === 'undefined' ? 'undefined' : _typeof(_ret2)) === "object") return _ret2.v; + } +} + +var SubHeader = new r.Struct({ + firstCode: r.uint16, + entryCount: r.uint16, + idDelta: r.int16, + idRangeOffset: r.uint16 +}); + +var CmapGroup = new r.Struct({ + startCharCode: r.uint32, + endCharCode: r.uint32, + glyphID: r.uint32 +}); + +var UnicodeValueRange = new r.Struct({ + startUnicodeValue: r.uint24, + additionalCount: r.uint8 +}); + +var UVSMapping = new r.Struct({ + unicodeValue: r.uint24, + glyphID: r.uint16 +}); + +var DefaultUVS = new r.Array(UnicodeValueRange, r.uint32); +var NonDefaultUVS = new r.Array(UVSMapping, r.uint32); + +var VarSelectorRecord = new r.Struct({ + varSelector: r.uint24, + defaultUVS: new r.Pointer(r.uint32, DefaultUVS, { type: 'parent' }), + nonDefaultUVS: new r.Pointer(r.uint32, NonDefaultUVS, { type: 'parent' }) +}); + +var CmapSubtable = new r.VersionedStruct(r.uint16, { + 0: { // Byte encoding + length: r.uint16, // Total table length in bytes (set to 262 for format 0) + language: r.uint16, // Language code for this encoding subtable, or zero if language-independent + codeMap: new r.LazyArray(r.uint8, 256) + }, + + 2: { // High-byte mapping (CJK) + length: r.uint16, + language: r.uint16, + subHeaderKeys: new r.Array(r.uint16, 256), + subHeaderCount: function subHeaderCount(t) { + return Math.max.apply(Math, t.subHeaderKeys); + }, + subHeaders: new r.LazyArray(SubHeader, 'subHeaderCount'), + glyphIndexArray: new r.LazyArray(r.uint16, 'subHeaderCount') + }, + + 4: { // Segment mapping to delta values + length: r.uint16, // Total table length in bytes + language: r.uint16, // Language code + segCountX2: r.uint16, + segCount: function segCount(t) { + return t.segCountX2 >> 1; + }, + searchRange: r.uint16, + entrySelector: r.uint16, + rangeShift: r.uint16, + endCode: new r.LazyArray(r.uint16, 'segCount'), + reservedPad: new r.Reserved(r.uint16), // This value should be zero + startCode: new r.LazyArray(r.uint16, 'segCount'), + idDelta: new r.LazyArray(r.int16, 'segCount'), + idRangeOffset: new r.LazyArray(r.uint16, 'segCount'), + glyphIndexArray: new r.LazyArray(r.uint16, function (t) { + return (t.length - t._currentOffset) / 2; + }) + }, + + 6: { // Trimmed table + length: r.uint16, + language: r.uint16, + firstCode: r.uint16, + entryCount: r.uint16, + glyphIndices: new r.LazyArray(r.uint16, 'entryCount') + }, + + 8: { // mixed 16-bit and 32-bit coverage + reserved: new r.Reserved(r.uint16), + length: r.uint32, + language: r.uint16, + is32: new r.LazyArray(r.uint8, 8192), + nGroups: r.uint32, + groups: new r.LazyArray(CmapGroup, 'nGroups') + }, + + 10: { // Trimmed Array + reserved: new r.Reserved(r.uint16), + length: r.uint32, + language: r.uint32, + firstCode: r.uint32, + entryCount: r.uint32, + glyphIndices: new r.LazyArray(r.uint16, 'numChars') + }, + + 12: { // Segmented coverage + reserved: new r.Reserved(r.uint16), + length: r.uint32, + language: r.uint32, + nGroups: r.uint32, + groups: new r.LazyArray(CmapGroup, 'nGroups') + }, + + 13: { // Many-to-one range mappings (same as 12 except for group.startGlyphID) + reserved: new r.Reserved(r.uint16), + length: r.uint32, + language: r.uint32, + nGroups: r.uint32, + groups: new r.LazyArray(CmapGroup, 'nGroups') + }, + + 14: { // Unicode Variation Sequences + length: r.uint32, + numRecords: r.uint32, + varSelectors: new r.LazyArray(VarSelectorRecord, 'numRecords') + } +}); + +var CmapEntry = new r.Struct({ + platformID: r.uint16, // Platform identifier + encodingID: r.uint16, // Platform-specific encoding identifier + table: new r.Pointer(r.uint32, CmapSubtable, { type: 'parent', lazy: true }) +}); + +// character to glyph mapping +var cmap = new r.Struct({ + version: r.uint16, + numSubtables: r.uint16, + tables: new r.Array(CmapEntry, 'numSubtables') +}); + +// font header +var head = new r.Struct({ + version: r.int32, // 0x00010000 (version 1.0) + revision: r.int32, // set by font manufacturer + checkSumAdjustment: r.uint32, + magicNumber: r.uint32, // set to 0x5F0F3CF5 + flags: r.uint16, + unitsPerEm: r.uint16, // range from 64 to 16384 + created: new r.Array(r.int32, 2), + modified: new r.Array(r.int32, 2), + xMin: r.int16, // for all glyph bounding boxes + yMin: r.int16, // for all glyph bounding boxes + xMax: r.int16, // for all glyph bounding boxes + yMax: r.int16, // for all glyph bounding boxes + macStyle: new r.Bitfield(r.uint16, ['bold', 'italic', 'underline', 'outline', 'shadow', 'condensed', 'extended']), + lowestRecPPEM: r.uint16, // smallest readable size in pixels + fontDirectionHint: r.int16, + indexToLocFormat: r.int16, // 0 for short offsets, 1 for long + glyphDataFormat: r.int16 // 0 for current format +}); + +// horizontal header +var hhea = new r.Struct({ + version: r.int32, + ascent: r.int16, // Distance from baseline of highest ascender + descent: r.int16, // Distance from baseline of lowest descender + lineGap: r.int16, // Typographic line gap + advanceWidthMax: r.uint16, // Maximum advance width value in 'hmtx' table + minLeftSideBearing: r.int16, // Maximum advance width value in 'hmtx' table + minRightSideBearing: r.int16, // Minimum right sidebearing value + xMaxExtent: r.int16, + caretSlopeRise: r.int16, // Used to calculate the slope of the cursor (rise/run); 1 for vertical + caretSlopeRun: r.int16, // 0 for vertical + caretOffset: r.int16, // Set to 0 for non-slanted fonts + reserved: new r.Reserved(r.int16, 4), + metricDataFormat: r.int16, // 0 for current format + numberOfMetrics: r.uint16 // Number of advance widths in 'hmtx' table +}); + +var HmtxEntry = new r.Struct({ + advance: r.uint16, + bearing: r.int16 +}); + +var hmtx = new r.Struct({ + metrics: new r.LazyArray(HmtxEntry, function (t) { + return t.parent.hhea.numberOfMetrics; + }), + bearings: new r.LazyArray(r.int16, function (t) { + return t.parent.maxp.numGlyphs - t.parent.hhea.numberOfMetrics; + }) +}); + +// maxiumum profile +var maxp = new r.Struct({ + version: r.int32, + numGlyphs: r.uint16, // The number of glyphs in the font + maxPoints: r.uint16, // Maximum points in a non-composite glyph + maxContours: r.uint16, // Maximum contours in a non-composite glyph + maxComponentPoints: r.uint16, // Maximum points in a composite glyph + maxComponentContours: r.uint16, // Maximum contours in a composite glyph + maxZones: r.uint16, // 1 if instructions do not use the twilight zone, 2 otherwise + maxTwilightPoints: r.uint16, // Maximum points used in Z0 + maxStorage: r.uint16, // Number of Storage Area locations + maxFunctionDefs: r.uint16, // Number of FDEFs + maxInstructionDefs: r.uint16, // Number of IDEFs + maxStackElements: r.uint16, // Maximum stack depth + maxSizeOfInstructions: r.uint16, // Maximum byte count for glyph instructions + maxComponentElements: r.uint16, // Maximum number of components referenced at “top level” for any composite glyph + maxComponentDepth: r.uint16 // Maximum levels of recursion; 1 for simple components +}); + +/** + * Gets an encoding name from platform, encoding, and language ids. + * Returned encoding names can be used in iconv-lite to decode text. + */ +function getEncoding(platformID, encodingID) { + var languageID = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; + + if (platformID === 1 && MAC_LANGUAGE_ENCODINGS[languageID]) { + return MAC_LANGUAGE_ENCODINGS[languageID]; + } + + return ENCODINGS[platformID][encodingID]; +} + +// Map of platform ids to encoding ids. +var ENCODINGS = [ +// unicode +['utf16be', 'utf16be', 'utf16be', 'utf16be', 'utf16be', 'utf16be'], + +// macintosh +// Mappings available at http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/ +// 0 Roman 17 Malayalam +// 1 Japanese 18 Sinhalese +// 2 Traditional Chinese 19 Burmese +// 3 Korean 20 Khmer +// 4 Arabic 21 Thai +// 5 Hebrew 22 Laotian +// 6 Greek 23 Georgian +// 7 Russian 24 Armenian +// 8 RSymbol 25 Simplified Chinese +// 9 Devanagari 26 Tibetan +// 10 Gurmukhi 27 Mongolian +// 11 Gujarati 28 Geez +// 12 Oriya 29 Slavic +// 13 Bengali 30 Vietnamese +// 14 Tamil 31 Sindhi +// 15 Telugu 32 (Uninterpreted) +// 16 Kannada +['macroman', 'shift-jis', 'big5', 'euc-kr', 'iso-8859-6', 'iso-8859-8', 'macgreek', 'maccyrillic', 'symbol', 'Devanagari', 'Gurmukhi', 'Gujarati', 'Oriya', 'Bengali', 'Tamil', 'Telugu', 'Kannada', 'Malayalam', 'Sinhalese', 'Burmese', 'Khmer', 'macthai', 'Laotian', 'Georgian', 'Armenian', 'gb-2312-80', 'Tibetan', 'Mongolian', 'Geez', 'maccenteuro', 'Vietnamese', 'Sindhi'], + +// ISO (deprecated) +['ascii'], + +// windows +// Docs here: http://msdn.microsoft.com/en-us/library/system.text.encoding(v=vs.110).aspx +['symbol', 'utf16be', 'shift-jis', 'gb18030', 'big5', 'wansung', 'johab', null, null, null, 'utf16be']]; + +// Overrides for Mac scripts by language id. +// See http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt +var MAC_LANGUAGE_ENCODINGS = { + 15: 'maciceland', + 17: 'macturkish', + 18: 'maccroatian', + 24: 'maccenteuro', + 25: 'maccenteuro', + 26: 'maccenteuro', + 27: 'maccenteuro', + 28: 'maccenteuro', + 30: 'maciceland', + 37: 'macromania', + 38: 'maccenteuro', + 39: 'maccenteuro', + 40: 'maccenteuro', + 143: 'macinuit', // Unsupported by iconv-lite + 146: 'macgaelic' // Unsupported by iconv-lite +}; + +// Map of platform ids to BCP-47 language codes. +var LANGUAGES = [ +// unicode +[], { // macintosh + 0: 'en', 30: 'fo', 60: 'ks', 90: 'rw', + 1: 'fr', 31: 'fa', 61: 'ku', 91: 'rn', + 2: 'de', 32: 'ru', 62: 'sd', 92: 'ny', + 3: 'it', 33: 'zh', 63: 'bo', 93: 'mg', + 4: 'nl', 34: 'nl-BE', 64: 'ne', 94: 'eo', + 5: 'sv', 35: 'ga', 65: 'sa', 128: 'cy', + 6: 'es', 36: 'sq', 66: 'mr', 129: 'eu', + 7: 'da', 37: 'ro', 67: 'bn', 130: 'ca', + 8: 'pt', 38: 'cz', 68: 'as', 131: 'la', + 9: 'no', 39: 'sk', 69: 'gu', 132: 'qu', + 10: 'he', 40: 'si', 70: 'pa', 133: 'gn', + 11: 'ja', 41: 'yi', 71: 'or', 134: 'ay', + 12: 'ar', 42: 'sr', 72: 'ml', 135: 'tt', + 13: 'fi', 43: 'mk', 73: 'kn', 136: 'ug', + 14: 'el', 44: 'bg', 74: 'ta', 137: 'dz', + 15: 'is', 45: 'uk', 75: 'te', 138: 'jv', + 16: 'mt', 46: 'be', 76: 'si', 139: 'su', + 17: 'tr', 47: 'uz', 77: 'my', 140: 'gl', + 18: 'hr', 48: 'kk', 78: 'km', 141: 'af', + 19: 'zh-Hant', 49: 'az-Cyrl', 79: 'lo', 142: 'br', + 20: 'ur', 50: 'az-Arab', 80: 'vi', 143: 'iu', + 21: 'hi', 51: 'hy', 81: 'id', 144: 'gd', + 22: 'th', 52: 'ka', 82: 'tl', 145: 'gv', + 23: 'ko', 53: 'mo', 83: 'ms', 146: 'ga', + 24: 'lt', 54: 'ky', 84: 'ms-Arab', 147: 'to', + 25: 'pl', 55: 'tg', 85: 'am', 148: 'el-polyton', + 26: 'hu', 56: 'tk', 86: 'ti', 149: 'kl', + 27: 'es', 57: 'mn-CN', 87: 'om', 150: 'az', + 28: 'lv', 58: 'mn', 88: 'so', 151: 'nn', + 29: 'se', 59: 'ps', 89: 'sw' +}, + +// ISO (deprecated) +[], { // windows + 0x0436: 'af', 0x4009: 'en-IN', 0x0487: 'rw', 0x0432: 'tn', + 0x041C: 'sq', 0x1809: 'en-IE', 0x0441: 'sw', 0x045B: 'si', + 0x0484: 'gsw', 0x2009: 'en-JM', 0x0457: 'kok', 0x041B: 'sk', + 0x045E: 'am', 0x4409: 'en-MY', 0x0412: 'ko', 0x0424: 'sl', + 0x1401: 'ar-DZ', 0x1409: 'en-NZ', 0x0440: 'ky', 0x2C0A: 'es-AR', + 0x3C01: 'ar-BH', 0x3409: 'en-PH', 0x0454: 'lo', 0x400A: 'es-BO', + 0x0C01: 'ar', 0x4809: 'en-SG', 0x0426: 'lv', 0x340A: 'es-CL', + 0x0801: 'ar-IQ', 0x1C09: 'en-ZA', 0x0427: 'lt', 0x240A: 'es-CO', + 0x2C01: 'ar-JO', 0x2C09: 'en-TT', 0x082E: 'dsb', 0x140A: 'es-CR', + 0x3401: 'ar-KW', 0x0809: 'en-GB', 0x046E: 'lb', 0x1C0A: 'es-DO', + 0x3001: 'ar-LB', 0x0409: 'en', 0x042F: 'mk', 0x300A: 'es-EC', + 0x1001: 'ar-LY', 0x3009: 'en-ZW', 0x083E: 'ms-BN', 0x440A: 'es-SV', + 0x1801: 'ary', 0x0425: 'et', 0x043E: 'ms', 0x100A: 'es-GT', + 0x2001: 'ar-OM', 0x0438: 'fo', 0x044C: 'ml', 0x480A: 'es-HN', + 0x4001: 'ar-QA', 0x0464: 'fil', 0x043A: 'mt', 0x080A: 'es-MX', + 0x0401: 'ar-SA', 0x040B: 'fi', 0x0481: 'mi', 0x4C0A: 'es-NI', + 0x2801: 'ar-SY', 0x080C: 'fr-BE', 0x047A: 'arn', 0x180A: 'es-PA', + 0x1C01: 'aeb', 0x0C0C: 'fr-CA', 0x044E: 'mr', 0x3C0A: 'es-PY', + 0x3801: 'ar-AE', 0x040C: 'fr', 0x047C: 'moh', 0x280A: 'es-PE', + 0x2401: 'ar-YE', 0x140C: 'fr-LU', 0x0450: 'mn', 0x500A: 'es-PR', + 0x042B: 'hy', 0x180C: 'fr-MC', 0x0850: 'mn-CN', 0x0C0A: 'es', + 0x044D: 'as', 0x100C: 'fr-CH', 0x0461: 'ne', 0x040A: 'es', + 0x082C: 'az-Cyrl', 0x0462: 'fy', 0x0414: 'nb', 0x540A: 'es-US', + 0x042C: 'az', 0x0456: 'gl', 0x0814: 'nn', 0x380A: 'es-UY', + 0x046D: 'ba', 0x0437: 'ka', 0x0482: 'oc', 0x200A: 'es-VE', + 0x042D: 'eu', 0x0C07: 'de-AT', 0x0448: 'or', 0x081D: 'sv-FI', + 0x0423: 'be', 0x0407: 'de', 0x0463: 'ps', 0x041D: 'sv', + 0x0845: 'bn', 0x1407: 'de-LI', 0x0415: 'pl', 0x045A: 'syr', + 0x0445: 'bn-IN', 0x1007: 'de-LU', 0x0416: 'pt', 0x0428: 'tg', + 0x201A: 'bs-Cyrl', 0x0807: 'de-CH', 0x0816: 'pt-PT', 0x085F: 'tzm', + 0x141A: 'bs', 0x0408: 'el', 0x0446: 'pa', 0x0449: 'ta', + 0x047E: 'br', 0x046F: 'kl', 0x046B: 'qu-BO', 0x0444: 'tt', + 0x0402: 'bg', 0x0447: 'gu', 0x086B: 'qu-EC', 0x044A: 'te', + 0x0403: 'ca', 0x0468: 'ha', 0x0C6B: 'qu', 0x041E: 'th', + 0x0C04: 'zh-HK', 0x040D: 'he', 0x0418: 'ro', 0x0451: 'bo', + 0x1404: 'zh-MO', 0x0439: 'hi', 0x0417: 'rm', 0x041F: 'tr', + 0x0804: 'zh', 0x040E: 'hu', 0x0419: 'ru', 0x0442: 'tk', + 0x1004: 'zh-SG', 0x040F: 'is', 0x243B: 'smn', 0x0480: 'ug', + 0x0404: 'zh-TW', 0x0470: 'ig', 0x103B: 'smj-NO', 0x0422: 'uk', + 0x0483: 'co', 0x0421: 'id', 0x143B: 'smj', 0x042E: 'hsb', + 0x041A: 'hr', 0x045D: 'iu', 0x0C3B: 'se-FI', 0x0420: 'ur', + 0x101A: 'hr-BA', 0x085D: 'iu-Latn', 0x043B: 'se', 0x0843: 'uz-Cyrl', + 0x0405: 'cs', 0x083C: 'ga', 0x083B: 'se-SE', 0x0443: 'uz', + 0x0406: 'da', 0x0434: 'xh', 0x203B: 'sms', 0x042A: 'vi', + 0x048C: 'prs', 0x0435: 'zu', 0x183B: 'sma-NO', 0x0452: 'cy', + 0x0465: 'dv', 0x0410: 'it', 0x1C3B: 'sms', 0x0488: 'wo', + 0x0813: 'nl-BE', 0x0810: 'it-CH', 0x044F: 'sa', 0x0485: 'sah', + 0x0413: 'nl', 0x0411: 'ja', 0x1C1A: 'sr-Cyrl-BA', 0x0478: 'ii', + 0x0C09: 'en-AU', 0x044B: 'kn', 0x0C1A: 'sr', 0x046A: 'yo', + 0x2809: 'en-BZ', 0x043F: 'kk', 0x181A: 'sr-Latn-BA', + 0x1009: 'en-CA', 0x0453: 'km', 0x081A: 'sr-Latn', + 0x2409: 'en-029', 0x0486: 'quc', 0x046C: 'nso' +}]; + +var NameRecord = new r.Struct({ + platformID: r.uint16, + encodingID: r.uint16, + languageID: r.uint16, + nameID: r.uint16, + length: r.uint16, + string: new r.Pointer(r.uint16, new r.String('length', function (t) { + return getEncoding(t.platformID, t.encodingID, t.languageID); + }), { type: 'parent', relativeTo: 'parent.stringOffset', allowNull: false }) +}); + +var LangTagRecord = new r.Struct({ + length: r.uint16, + tag: new r.Pointer(r.uint16, new r.String('length', 'utf16be'), { type: 'parent', relativeTo: 'stringOffset' }) +}); + +var NameTable = new r.VersionedStruct(r.uint16, { + 0: { + count: r.uint16, + stringOffset: r.uint16, + records: new r.Array(NameRecord, 'count') + }, + 1: { + count: r.uint16, + stringOffset: r.uint16, + records: new r.Array(NameRecord, 'count'), + langTagCount: r.uint16, + langTags: new r.Array(LangTagRecord, 'langTagCount') + } +}); + +var NAMES = ['copyright', 'fontFamily', 'fontSubfamily', 'uniqueSubfamily', 'fullName', 'version', 'postscriptName', // Note: A font may have only one PostScript name and that name must be ASCII. +'trademark', 'manufacturer', 'designer', 'description', 'vendorURL', 'designerURL', 'license', 'licenseURL', null, // reserved +'preferredFamily', 'preferredSubfamily', 'compatibleFull', 'sampleText', 'postscriptCIDFontName', 'wwsFamilyName', 'wwsSubfamilyName']; + +NameTable.process = function (stream) { + var records = {}; + for (var _iterator = this.records, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var record = _ref; + + // find out what language this is for + var language = LANGUAGES[record.platformID][record.languageID]; + + if (language == null && this.langTags != null && record.languageID >= 0x8000) { + language = this.langTags[record.languageID - 0x8000].tag; + } + + if (language == null) { + language = record.platformID + '-' + record.languageID; + } + + // if the nameID is >= 256, it is a font feature record (AAT) + var key = record.nameID >= 256 ? 'fontFeatures' : NAMES[record.nameID] || record.nameID; + if (records[key] == null) { + records[key] = {}; + } + + var obj = records[key]; + if (record.nameID >= 256) { + obj = obj[record.nameID] || (obj[record.nameID] = {}); + } + + if (typeof record.string === 'string' || typeof obj[language] !== 'string') { + obj[language] = record.string; + } + } + + this.records = records; +}; + +NameTable.preEncode = function () { + if (Array.isArray(this.records)) return; + this.version = 0; + + var records = []; + for (var key in this.records) { + var val = this.records[key]; + if (key === 'fontFeatures') continue; + + records.push({ + platformID: 3, + encodingID: 1, + languageID: 0x409, + nameID: NAMES.indexOf(key), + length: Buffer.byteLength(val.en, 'utf16le'), + string: val.en + }); + + if (key === 'postscriptName') { + records.push({ + platformID: 1, + encodingID: 0, + languageID: 0, + nameID: NAMES.indexOf(key), + length: val.en.length, + string: val.en + }); + } + } + + this.records = records; + this.count = records.length; + this.stringOffset = NameTable.size(this, null, false); +}; + +var OS2 = new r.VersionedStruct(r.uint16, { + header: { + xAvgCharWidth: r.int16, // average weighted advance width of lower case letters and space + usWeightClass: r.uint16, // visual weight of stroke in glyphs + usWidthClass: r.uint16, // relative change from the normal aspect ratio (width to height ratio) + fsType: new r.Bitfield(r.uint16, [// Indicates font embedding licensing rights + null, 'noEmbedding', 'viewOnly', 'editable', null, null, null, null, 'noSubsetting', 'bitmapOnly']), + ySubscriptXSize: r.int16, // recommended horizontal size in pixels for subscripts + ySubscriptYSize: r.int16, // recommended vertical size in pixels for subscripts + ySubscriptXOffset: r.int16, // recommended horizontal offset for subscripts + ySubscriptYOffset: r.int16, // recommended vertical offset form the baseline for subscripts + ySuperscriptXSize: r.int16, // recommended horizontal size in pixels for superscripts + ySuperscriptYSize: r.int16, // recommended vertical size in pixels for superscripts + ySuperscriptXOffset: r.int16, // recommended horizontal offset for superscripts + ySuperscriptYOffset: r.int16, // recommended vertical offset from the baseline for superscripts + yStrikeoutSize: r.int16, // width of the strikeout stroke + yStrikeoutPosition: r.int16, // position of the strikeout stroke relative to the baseline + sFamilyClass: r.int16, // classification of font-family design + panose: new r.Array(r.uint8, 10), // describe the visual characteristics of a given typeface + ulCharRange: new r.Array(r.uint32, 4), + vendorID: new r.String(4), // four character identifier for the font vendor + fsSelection: new r.Bitfield(r.uint16, [// bit field containing information about the font + 'italic', 'underscore', 'negative', 'outlined', 'strikeout', 'bold', 'regular', 'useTypoMetrics', 'wws', 'oblique']), + usFirstCharIndex: r.uint16, // The minimum Unicode index in this font + usLastCharIndex: r.uint16 // The maximum Unicode index in this font + }, + + // The Apple version of this table ends here, but the Microsoft one continues on... + 0: {}, + + 1: { + typoAscender: r.int16, + typoDescender: r.int16, + typoLineGap: r.int16, + winAscent: r.uint16, + winDescent: r.uint16, + codePageRange: new r.Array(r.uint32, 2) + }, + + 2: { + // these should be common with version 1 somehow + typoAscender: r.int16, + typoDescender: r.int16, + typoLineGap: r.int16, + winAscent: r.uint16, + winDescent: r.uint16, + codePageRange: new r.Array(r.uint32, 2), + + xHeight: r.int16, + capHeight: r.int16, + defaultChar: r.uint16, + breakChar: r.uint16, + maxContent: r.uint16 + }, + + 5: { + typoAscender: r.int16, + typoDescender: r.int16, + typoLineGap: r.int16, + winAscent: r.uint16, + winDescent: r.uint16, + codePageRange: new r.Array(r.uint32, 2), + + xHeight: r.int16, + capHeight: r.int16, + defaultChar: r.uint16, + breakChar: r.uint16, + maxContent: r.uint16, + + usLowerOpticalPointSize: r.uint16, + usUpperOpticalPointSize: r.uint16 + } +}); + +var versions = OS2.versions; +versions[3] = versions[4] = versions[2]; + +// PostScript information +var post = new r.VersionedStruct(r.fixed32, { + header: { // these fields exist at the top of all versions + italicAngle: r.fixed32, // Italic angle in counter-clockwise degrees from the vertical. + underlinePosition: r.int16, // Suggested distance of the top of the underline from the baseline + underlineThickness: r.int16, // Suggested values for the underline thickness + isFixedPitch: r.uint32, // Whether the font is monospaced + minMemType42: r.uint32, // Minimum memory usage when a TrueType font is downloaded as a Type 42 font + maxMemType42: r.uint32, // Maximum memory usage when a TrueType font is downloaded as a Type 42 font + minMemType1: r.uint32, // Minimum memory usage when a TrueType font is downloaded as a Type 1 font + maxMemType1: r.uint32 // Maximum memory usage when a TrueType font is downloaded as a Type 1 font + }, + + 1: {}, // version 1 has no additional fields + + 2: { + numberOfGlyphs: r.uint16, + glyphNameIndex: new r.Array(r.uint16, 'numberOfGlyphs'), + names: new r.Array(new r.String(r.uint8)) + }, + + 2.5: { + numberOfGlyphs: r.uint16, + offsets: new r.Array(r.uint8, 'numberOfGlyphs') + }, + + 3: {}, // version 3 has no additional fields + + 4: { + map: new r.Array(r.uint32, function (t) { + return t.parent.maxp.numGlyphs; + }) + } +}); + +// An array of predefined values accessible by instructions +var cvt = new r.Struct({ + controlValues: new r.Array(r.int16) +}); + +// A list of instructions that are executed once when a font is first used. +// These instructions are known as the font program. The main use of this table +// is for the definition of functions that are used in many different glyph programs. +var fpgm = new r.Struct({ + instructions: new r.Array(r.uint8) +}); + +var loca = new r.VersionedStruct('head.indexToLocFormat', { + 0: { + offsets: new r.Array(r.uint16) + }, + 1: { + offsets: new r.Array(r.uint32) + } +}); + +loca.process = function () { + if (this.version === 0) { + for (var i = 0; i < this.offsets.length; i++) { + this.offsets[i] <<= 1; + } + } +}; + +loca.preEncode = function () { + if (this.version != null) return; + + // assume this.offsets is a sorted array + this.version = this.offsets[this.offsets.length - 1] > 0xffff ? 1 : 0; + + if (this.version === 0) { + for (var i = 0; i < this.offsets.length; i++) { + this.offsets[i] >>>= 1; + } + } +}; + +// Set of instructions executed whenever the point size or font transformation change +var prep = new r.Struct({ + controlValueProgram: new r.Array(r.uint8) +}); + +// only used for encoding +var glyf = new r.Array(new r.Buffer()); + +var CFFIndex = function () { + function CFFIndex(type) { + _classCallCheck(this, CFFIndex); + + this.type = type; + } + + CFFIndex.prototype.getCFFVersion = function getCFFVersion(ctx) { + while (ctx && !ctx.hdrSize) { + ctx = ctx.parent; + } + + return ctx ? ctx.version : -1; + }; + + CFFIndex.prototype.decode = function decode(stream, parent) { + var version = this.getCFFVersion(parent); + var count = version >= 2 ? stream.readUInt32BE() : stream.readUInt16BE(); + + if (count === 0) { + return []; + } + + var offSize = stream.readUInt8(); + var offsetType = void 0; + if (offSize === 1) { + offsetType = r.uint8; + } else if (offSize === 2) { + offsetType = r.uint16; + } else if (offSize === 3) { + offsetType = r.uint24; + } else if (offSize === 4) { + offsetType = r.uint32; + } else { + throw new Error("Bad offset size in CFFIndex: " + offSize + " " + stream.pos); + } + + var ret = []; + var startPos = stream.pos + (count + 1) * offSize - 1; + + var start = offsetType.decode(stream); + for (var i = 0; i < count; i++) { + var end = offsetType.decode(stream); + + if (this.type != null) { + var pos = stream.pos; + stream.pos = startPos + start; + + parent.length = end - start; + ret.push(this.type.decode(stream, parent)); + stream.pos = pos; + } else { + ret.push({ + offset: startPos + start, + length: end - start + }); + } + + start = end; + } + + stream.pos = startPos + start; + return ret; + }; + + CFFIndex.prototype.size = function size(arr, parent) { + var size = 2; + if (arr.length === 0) { + return size; + } + + var type = this.type || new r.Buffer(); + + // find maximum offset to detminine offset type + var offset = 1; + for (var i = 0; i < arr.length; i++) { + var item = arr[i]; + offset += type.size(item, parent); + } + + var offsetType = void 0; + if (offset <= 0xff) { + offsetType = r.uint8; + } else if (offset <= 0xffff) { + offsetType = r.uint16; + } else if (offset <= 0xffffff) { + offsetType = r.uint24; + } else if (offset <= 0xffffffff) { + offsetType = r.uint32; + } else { + throw new Error("Bad offset in CFFIndex"); + } + + size += 1 + offsetType.size() * (arr.length + 1); + size += offset - 1; + + return size; + }; + + CFFIndex.prototype.encode = function encode(stream, arr, parent) { + stream.writeUInt16BE(arr.length); + if (arr.length === 0) { + return; + } + + var type = this.type || new r.Buffer(); + + // find maximum offset to detminine offset type + var sizes = []; + var offset = 1; + for (var _iterator = arr, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var item = _ref; + + var s = type.size(item, parent); + sizes.push(s); + offset += s; + } + + var offsetType = void 0; + if (offset <= 0xff) { + offsetType = r.uint8; + } else if (offset <= 0xffff) { + offsetType = r.uint16; + } else if (offset <= 0xffffff) { + offsetType = r.uint24; + } else if (offset <= 0xffffffff) { + offsetType = r.uint32; + } else { + throw new Error("Bad offset in CFFIndex"); + } + + // write offset size + stream.writeUInt8(offsetType.size()); + + // write elements + offset = 1; + offsetType.encode(stream, offset); + + for (var _iterator2 = sizes, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _getIterator(_iterator2);;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var size = _ref2; + + offset += size; + offsetType.encode(stream, offset); + } + + for (var _iterator3 = arr, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _getIterator(_iterator3);;) { + var _ref3; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref3 = _i3.value; + } + + var _item = _ref3; + + type.encode(stream, _item, parent); + } + + return; + }; + + return CFFIndex; +}(); + +var FLOAT_EOF = 0xf; +var FLOAT_LOOKUP = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '.', 'E', 'E-', null, '-']; + +var FLOAT_ENCODE_LOOKUP = { + '.': 10, + 'E': 11, + 'E-': 12, + '-': 14 +}; + +var CFFOperand = function () { + function CFFOperand() { + _classCallCheck(this, CFFOperand); + } + + CFFOperand.decode = function decode(stream, value) { + if (32 <= value && value <= 246) { + return value - 139; + } + + if (247 <= value && value <= 250) { + return (value - 247) * 256 + stream.readUInt8() + 108; + } + + if (251 <= value && value <= 254) { + return -(value - 251) * 256 - stream.readUInt8() - 108; + } + + if (value === 28) { + return stream.readInt16BE(); + } + + if (value === 29) { + return stream.readInt32BE(); + } + + if (value === 30) { + var str = ''; + while (true) { + var b = stream.readUInt8(); + + var n1 = b >> 4; + if (n1 === FLOAT_EOF) { + break; + } + str += FLOAT_LOOKUP[n1]; + + var n2 = b & 15; + if (n2 === FLOAT_EOF) { + break; + } + str += FLOAT_LOOKUP[n2]; + } + + return parseFloat(str); + } + + return null; + }; + + CFFOperand.size = function size(value) { + // if the value needs to be forced to the largest size (32 bit) + // e.g. for unknown pointers, set to 32768 + if (value.forceLarge) { + value = 32768; + } + + if ((value | 0) !== value) { + // floating point + var str = '' + value; + return 1 + Math.ceil((str.length + 1) / 2); + } else if (-107 <= value && value <= 107) { + return 1; + } else if (108 <= value && value <= 1131 || -1131 <= value && value <= -108) { + return 2; + } else if (-32768 <= value && value <= 32767) { + return 3; + } else { + return 5; + } + }; + + CFFOperand.encode = function encode(stream, value) { + // if the value needs to be forced to the largest size (32 bit) + // e.g. for unknown pointers, save the old value and set to 32768 + var val = Number(value); + + if (value.forceLarge) { + stream.writeUInt8(29); + return stream.writeInt32BE(val); + } else if ((val | 0) !== val) { + // floating point + stream.writeUInt8(30); + + var str = '' + val; + for (var i = 0; i < str.length; i += 2) { + var c1 = str[i]; + var n1 = FLOAT_ENCODE_LOOKUP[c1] || +c1; + + if (i === str.length - 1) { + var n2 = FLOAT_EOF; + } else { + var c2 = str[i + 1]; + var n2 = FLOAT_ENCODE_LOOKUP[c2] || +c2; + } + + stream.writeUInt8(n1 << 4 | n2 & 15); + } + + if (n2 !== FLOAT_EOF) { + return stream.writeUInt8(FLOAT_EOF << 4); + } + } else if (-107 <= val && val <= 107) { + return stream.writeUInt8(val + 139); + } else if (108 <= val && val <= 1131) { + val -= 108; + stream.writeUInt8((val >> 8) + 247); + return stream.writeUInt8(val & 0xff); + } else if (-1131 <= val && val <= -108) { + val = -val - 108; + stream.writeUInt8((val >> 8) + 251); + return stream.writeUInt8(val & 0xff); + } else if (-32768 <= val && val <= 32767) { + stream.writeUInt8(28); + return stream.writeInt16BE(val); + } else { + stream.writeUInt8(29); + return stream.writeInt32BE(val); + } + }; + + return CFFOperand; +}(); + +var CFFDict = function () { + function CFFDict() { + var ops = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + + _classCallCheck(this, CFFDict); + + this.ops = ops; + this.fields = {}; + for (var _iterator = ops, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var field = _ref; + + var key = Array.isArray(field[0]) ? field[0][0] << 8 | field[0][1] : field[0]; + this.fields[key] = field; + } + } + + CFFDict.prototype.decodeOperands = function decodeOperands(type, stream, ret, operands) { + var _this = this; + + if (Array.isArray(type)) { + return operands.map(function (op, i) { + return _this.decodeOperands(type[i], stream, ret, [op]); + }); + } else if (type.decode != null) { + return type.decode(stream, ret, operands); + } else { + switch (type) { + case 'number': + case 'offset': + case 'sid': + return operands[0]; + case 'boolean': + return !!operands[0]; + default: + return operands; + } + } + }; + + CFFDict.prototype.encodeOperands = function encodeOperands(type, stream, ctx, operands) { + var _this2 = this; + + if (Array.isArray(type)) { + return operands.map(function (op, i) { + return _this2.encodeOperands(type[i], stream, ctx, op)[0]; + }); + } else if (type.encode != null) { + return type.encode(stream, operands, ctx); + } else if (typeof operands === 'number') { + return [operands]; + } else if (typeof operands === 'boolean') { + return [+operands]; + } else if (Array.isArray(operands)) { + return operands; + } else { + return [operands]; + } + }; + + CFFDict.prototype.decode = function decode(stream, parent) { + var end = stream.pos + parent.length; + var ret = {}; + var operands = []; + + // define hidden properties + _Object$defineProperties(ret, { + parent: { value: parent }, + _startOffset: { value: stream.pos } + }); + + // fill in defaults + for (var key in this.fields) { + var field = this.fields[key]; + ret[field[1]] = field[3]; + } + + while (stream.pos < end) { + var b = stream.readUInt8(); + if (b < 28) { + if (b === 12) { + b = b << 8 | stream.readUInt8(); + } + + var _field = this.fields[b]; + if (!_field) { + throw new Error('Unknown operator ' + b); + } + + var val = this.decodeOperands(_field[2], stream, ret, operands); + if (val != null) { + if (val instanceof restructure_src_utils.PropertyDescriptor) { + _Object$defineProperty(ret, _field[1], val); + } else { + ret[_field[1]] = val; + } + } + + operands = []; + } else { + operands.push(CFFOperand.decode(stream, b)); + } + } + + return ret; + }; + + CFFDict.prototype.size = function size(dict, parent) { + var includePointers = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true; + + var ctx = { + parent: parent, + val: dict, + pointerSize: 0, + startOffset: parent.startOffset || 0 + }; + + var len = 0; + + for (var k in this.fields) { + var field = this.fields[k]; + var val = dict[field[1]]; + if (val == null || isEqual(val, field[3])) { + continue; + } + + var operands = this.encodeOperands(field[2], null, ctx, val); + for (var _iterator2 = operands, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _getIterator(_iterator2);;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var op = _ref2; + + len += CFFOperand.size(op); + } + + var key = Array.isArray(field[0]) ? field[0] : [field[0]]; + len += key.length; + } + + if (includePointers) { + len += ctx.pointerSize; + } + + return len; + }; + + CFFDict.prototype.encode = function encode(stream, dict, parent) { + var ctx = { + pointers: [], + startOffset: stream.pos, + parent: parent, + val: dict, + pointerSize: 0 + }; + + ctx.pointerOffset = stream.pos + this.size(dict, ctx, false); + + for (var _iterator3 = this.ops, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _getIterator(_iterator3);;) { + var _ref3; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref3 = _i3.value; + } + + var field = _ref3; + + var val = dict[field[1]]; + if (val == null || isEqual(val, field[3])) { + continue; + } + + var operands = this.encodeOperands(field[2], stream, ctx, val); + for (var _iterator4 = operands, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _getIterator(_iterator4);;) { + var _ref4; + + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref4 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref4 = _i4.value; + } + + var op = _ref4; + + CFFOperand.encode(stream, op); + } + + var key = Array.isArray(field[0]) ? field[0] : [field[0]]; + for (var _iterator5 = key, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _getIterator(_iterator5);;) { + var _ref5; + + if (_isArray5) { + if (_i5 >= _iterator5.length) break; + _ref5 = _iterator5[_i5++]; + } else { + _i5 = _iterator5.next(); + if (_i5.done) break; + _ref5 = _i5.value; + } + + var _op = _ref5; + + stream.writeUInt8(_op); + } + } + + var i = 0; + while (i < ctx.pointers.length) { + var ptr = ctx.pointers[i++]; + ptr.type.encode(stream, ptr.val, ptr.parent); + } + + return; + }; + + return CFFDict; +}(); + +var CFFPointer = function (_r$Pointer) { + _inherits(CFFPointer, _r$Pointer); + + function CFFPointer(type) { + var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + _classCallCheck(this, CFFPointer); + + if (options.type == null) { + options.type = 'global'; + } + + return _possibleConstructorReturn(this, _r$Pointer.call(this, null, type, options)); + } + + CFFPointer.prototype.decode = function decode(stream, parent, operands) { + this.offsetType = { + decode: function decode() { + return operands[0]; + } + }; + + return _r$Pointer.prototype.decode.call(this, stream, parent, operands); + }; + + CFFPointer.prototype.encode = function encode(stream, value, ctx) { + if (!stream) { + // compute the size (so ctx.pointerSize is correct) + this.offsetType = { + size: function size() { + return 0; + } + }; + + this.size(value, ctx); + return [new Ptr(0)]; + } + + var ptr = null; + this.offsetType = { + encode: function encode(stream, val) { + return ptr = val; + } + }; + + _r$Pointer.prototype.encode.call(this, stream, value, ctx); + return [new Ptr(ptr)]; + }; + + return CFFPointer; +}(r.Pointer); + +var Ptr = function () { + function Ptr(val) { + _classCallCheck(this, Ptr); + + this.val = val; + this.forceLarge = true; + } + + Ptr.prototype.valueOf = function valueOf() { + return this.val; + }; + + return Ptr; +}(); + +var CFFBlendOp = function () { + function CFFBlendOp() { + _classCallCheck(this, CFFBlendOp); + } + + CFFBlendOp.decode = function decode(stream, parent, operands) { + var numBlends = operands.pop(); + + // TODO: actually blend. For now just consume the deltas + // since we don't use any of the values anyway. + while (operands.length > numBlends) { + operands.pop(); + } + }; + + return CFFBlendOp; +}(); + +var CFFPrivateDict = new CFFDict([ +// key name type default +[6, 'BlueValues', 'delta', null], [7, 'OtherBlues', 'delta', null], [8, 'FamilyBlues', 'delta', null], [9, 'FamilyOtherBlues', 'delta', null], [[12, 9], 'BlueScale', 'number', 0.039625], [[12, 10], 'BlueShift', 'number', 7], [[12, 11], 'BlueFuzz', 'number', 1], [10, 'StdHW', 'number', null], [11, 'StdVW', 'number', null], [[12, 12], 'StemSnapH', 'delta', null], [[12, 13], 'StemSnapV', 'delta', null], [[12, 14], 'ForceBold', 'boolean', false], [[12, 17], 'LanguageGroup', 'number', 0], [[12, 18], 'ExpansionFactor', 'number', 0.06], [[12, 19], 'initialRandomSeed', 'number', 0], [20, 'defaultWidthX', 'number', 0], [21, 'nominalWidthX', 'number', 0], [22, 'vsindex', 'number', 0], [23, 'blend', CFFBlendOp, null], [19, 'Subrs', new CFFPointer(new CFFIndex(), { type: 'local' }), null]]); + +// Automatically generated from Appendix A of the CFF specification; do +// not edit. Length should be 391. +var standardStrings = [".notdef", "space", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", "quoteright", "parenleft", "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash", "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "colon", "semicolon", "less", "equal", "greater", "question", "at", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "bracketleft", "backslash", "bracketright", "asciicircum", "underscore", "quoteleft", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "braceleft", "bar", "braceright", "asciitilde", "exclamdown", "cent", "sterling", "fraction", "yen", "florin", "section", "currency", "quotesingle", "quotedblleft", "guillemotleft", "guilsinglleft", "guilsinglright", "fi", "fl", "endash", "dagger", "daggerdbl", "periodcentered", "paragraph", "bullet", "quotesinglbase", "quotedblbase", "quotedblright", "guillemotright", "ellipsis", "perthousand", "questiondown", "grave", "acute", "circumflex", "tilde", "macron", "breve", "dotaccent", "dieresis", "ring", "cedilla", "hungarumlaut", "ogonek", "caron", "emdash", "AE", "ordfeminine", "Lslash", "Oslash", "OE", "ordmasculine", "ae", "dotlessi", "lslash", "oslash", "oe", "germandbls", "onesuperior", "logicalnot", "mu", "trademark", "Eth", "onehalf", "plusminus", "Thorn", "onequarter", "divide", "brokenbar", "degree", "thorn", "threequarters", "twosuperior", "registered", "minus", "eth", "multiply", "threesuperior", "copyright", "Aacute", "Acircumflex", "Adieresis", "Agrave", "Aring", "Atilde", "Ccedilla", "Eacute", "Ecircumflex", "Edieresis", "Egrave", "Iacute", "Icircumflex", "Idieresis", "Igrave", "Ntilde", "Oacute", "Ocircumflex", "Odieresis", "Ograve", "Otilde", "Scaron", "Uacute", "Ucircumflex", "Udieresis", "Ugrave", "Yacute", "Ydieresis", "Zcaron", "aacute", "acircumflex", "adieresis", "agrave", "aring", "atilde", "ccedilla", "eacute", "ecircumflex", "edieresis", "egrave", "iacute", "icircumflex", "idieresis", "igrave", "ntilde", "oacute", "ocircumflex", "odieresis", "ograve", "otilde", "scaron", "uacute", "ucircumflex", "udieresis", "ugrave", "yacute", "ydieresis", "zcaron", "exclamsmall", "Hungarumlautsmall", "dollaroldstyle", "dollarsuperior", "ampersandsmall", "Acutesmall", "parenleftsuperior", "parenrightsuperior", "twodotenleader", "onedotenleader", "zerooldstyle", "oneoldstyle", "twooldstyle", "threeoldstyle", "fouroldstyle", "fiveoldstyle", "sixoldstyle", "sevenoldstyle", "eightoldstyle", "nineoldstyle", "commasuperior", "threequartersemdash", "periodsuperior", "questionsmall", "asuperior", "bsuperior", "centsuperior", "dsuperior", "esuperior", "isuperior", "lsuperior", "msuperior", "nsuperior", "osuperior", "rsuperior", "ssuperior", "tsuperior", "ff", "ffi", "ffl", "parenleftinferior", "parenrightinferior", "Circumflexsmall", "hyphensuperior", "Gravesmall", "Asmall", "Bsmall", "Csmall", "Dsmall", "Esmall", "Fsmall", "Gsmall", "Hsmall", "Ismall", "Jsmall", "Ksmall", "Lsmall", "Msmall", "Nsmall", "Osmall", "Psmall", "Qsmall", "Rsmall", "Ssmall", "Tsmall", "Usmall", "Vsmall", "Wsmall", "Xsmall", "Ysmall", "Zsmall", "colonmonetary", "onefitted", "rupiah", "Tildesmall", "exclamdownsmall", "centoldstyle", "Lslashsmall", "Scaronsmall", "Zcaronsmall", "Dieresissmall", "Brevesmall", "Caronsmall", "Dotaccentsmall", "Macronsmall", "figuredash", "hypheninferior", "Ogoneksmall", "Ringsmall", "Cedillasmall", "questiondownsmall", "oneeighth", "threeeighths", "fiveeighths", "seveneighths", "onethird", "twothirds", "zerosuperior", "foursuperior", "fivesuperior", "sixsuperior", "sevensuperior", "eightsuperior", "ninesuperior", "zeroinferior", "oneinferior", "twoinferior", "threeinferior", "fourinferior", "fiveinferior", "sixinferior", "seveninferior", "eightinferior", "nineinferior", "centinferior", "dollarinferior", "periodinferior", "commainferior", "Agravesmall", "Aacutesmall", "Acircumflexsmall", "Atildesmall", "Adieresissmall", "Aringsmall", "AEsmall", "Ccedillasmall", "Egravesmall", "Eacutesmall", "Ecircumflexsmall", "Edieresissmall", "Igravesmall", "Iacutesmall", "Icircumflexsmall", "Idieresissmall", "Ethsmall", "Ntildesmall", "Ogravesmall", "Oacutesmall", "Ocircumflexsmall", "Otildesmall", "Odieresissmall", "OEsmall", "Oslashsmall", "Ugravesmall", "Uacutesmall", "Ucircumflexsmall", "Udieresissmall", "Yacutesmall", "Thornsmall", "Ydieresissmall", "001.000", "001.001", "001.002", "001.003", "Black", "Bold", "Book", "Light", "Medium", "Regular", "Roman", "Semibold"]; + +var StandardEncoding = ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent', 'ampersand', 'quoteright', 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore', 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'exclamdown', 'cent', 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency', 'quotesingle', 'quotedblleft', 'guillemotleft', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', '', 'endash', 'dagger', 'daggerdbl', 'periodcentered', '', 'paragraph', 'bullet', 'quotesinglbase', 'quotedblbase', 'quotedblright', 'guillemotright', 'ellipsis', 'perthousand', '', 'questiondown', '', 'grave', 'acute', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent', 'dieresis', '', 'ring', 'cedilla', '', 'hungarumlaut', 'ogonek', 'caron', 'emdash', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'AE', '', 'ordfeminine', '', '', '', '', 'Lslash', 'Oslash', 'OE', 'ordmasculine', '', '', '', '', '', 'ae', '', '', '', 'dotlessi', '', '', 'lslash', 'oslash', 'oe', 'germandbls']; + +var ExpertEncoding = ['', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'space', 'exclamsmall', 'Hungarumlautsmall', '', 'dollaroldstyle', 'dollarsuperior', 'ampersandsmall', 'Acutesmall', 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader', 'onedotenleader', 'comma', 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'colon', 'semicolon', 'commasuperior', 'threequartersemdash', 'periodsuperior', 'questionsmall', '', 'asuperior', 'bsuperior', 'centsuperior', 'dsuperior', 'esuperior', '', '', 'isuperior', '', '', 'lsuperior', 'msuperior', 'nsuperior', 'osuperior', '', '', 'rsuperior', 'ssuperior', 'tsuperior', '', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior', '', 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall', 'Asmall', 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall', 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', 'Vsmall', 'Wsmall', 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', 'onefitted', 'rupiah', 'Tildesmall', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'exclamdownsmall', 'centoldstyle', 'Lslashsmall', '', '', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall', 'Brevesmall', 'Caronsmall', '', 'Dotaccentsmall', '', '', 'Macronsmall', '', '', 'figuredash', 'hypheninferior', '', '', 'Ogoneksmall', 'Ringsmall', 'Cedillasmall', '', '', '', 'onequarter', 'onehalf', 'threequarters', 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds', '', '', 'zerosuperior', 'onesuperior', 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior', 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior', 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior', 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior', 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior', 'periodinferior', 'commainferior', 'Agravesmall', 'Aacutesmall', 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall', 'Aringsmall', 'AEsmall', 'Ccedillasmall', 'Egravesmall', 'Eacutesmall', 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall', 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall', 'Ogravesmall', 'Oacutesmall', 'Ocircumflexsmall', 'Otildesmall', 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall', 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall', 'Ydieresissmall']; + +var ISOAdobeCharset = ['.notdef', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent', 'ampersand', 'quoteright', 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore', 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', 'exclamdown', 'cent', 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency', 'quotesingle', 'quotedblleft', 'guillemotleft', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', 'endash', 'dagger', 'daggerdbl', 'periodcentered', 'paragraph', 'bullet', 'quotesinglbase', 'quotedblbase', 'quotedblright', 'guillemotright', 'ellipsis', 'perthousand', 'questiondown', 'grave', 'acute', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent', 'dieresis', 'ring', 'cedilla', 'hungarumlaut', 'ogonek', 'caron', 'emdash', 'AE', 'ordfeminine', 'Lslash', 'Oslash', 'OE', 'ordmasculine', 'ae', 'dotlessi', 'lslash', 'oslash', 'oe', 'germandbls', 'onesuperior', 'logicalnot', 'mu', 'trademark', 'Eth', 'onehalf', 'plusminus', 'Thorn', 'onequarter', 'divide', 'brokenbar', 'degree', 'thorn', 'threequarters', 'twosuperior', 'registered', 'minus', 'eth', 'multiply', 'threesuperior', 'copyright', 'Aacute', 'Acircumflex', 'Adieresis', 'Agrave', 'Aring', 'Atilde', 'Ccedilla', 'Eacute', 'Ecircumflex', 'Edieresis', 'Egrave', 'Iacute', 'Icircumflex', 'Idieresis', 'Igrave', 'Ntilde', 'Oacute', 'Ocircumflex', 'Odieresis', 'Ograve', 'Otilde', 'Scaron', 'Uacute', 'Ucircumflex', 'Udieresis', 'Ugrave', 'Yacute', 'Ydieresis', 'Zcaron', 'aacute', 'acircumflex', 'adieresis', 'agrave', 'aring', 'atilde', 'ccedilla', 'eacute', 'ecircumflex', 'edieresis', 'egrave', 'iacute', 'icircumflex', 'idieresis', 'igrave', 'ntilde', 'oacute', 'ocircumflex', 'odieresis', 'ograve', 'otilde', 'scaron', 'uacute', 'ucircumflex', 'udieresis', 'ugrave', 'yacute', 'ydieresis', 'zcaron']; + +var ExpertCharset = ['.notdef', 'space', 'exclamsmall', 'Hungarumlautsmall', 'dollaroldstyle', 'dollarsuperior', 'ampersandsmall', 'Acutesmall', 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader', 'onedotenleader', 'comma', 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'colon', 'semicolon', 'commasuperior', 'threequartersemdash', 'periodsuperior', 'questionsmall', 'asuperior', 'bsuperior', 'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior', 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior', 'tsuperior', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior', 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall', 'Asmall', 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall', 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', 'Vsmall', 'Wsmall', 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', 'onefitted', 'rupiah', 'Tildesmall', 'exclamdownsmall', 'centoldstyle', 'Lslashsmall', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall', 'Brevesmall', 'Caronsmall', 'Dotaccentsmall', 'Macronsmall', 'figuredash', 'hypheninferior', 'Ogoneksmall', 'Ringsmall', 'Cedillasmall', 'onequarter', 'onehalf', 'threequarters', 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'onesuperior', 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior', 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior', 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior', 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior', 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior', 'periodinferior', 'commainferior', 'Agravesmall', 'Aacutesmall', 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall', 'Aringsmall', 'AEsmall', 'Ccedillasmall', 'Egravesmall', 'Eacutesmall', 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall', 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall', 'Ogravesmall', 'Oacutesmall', 'Ocircumflexsmall', 'Otildesmall', 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall', 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall', 'Ydieresissmall']; + +var ExpertSubsetCharset = ['.notdef', 'space', 'dollaroldstyle', 'dollarsuperior', 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader', 'onedotenleader', 'comma', 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'colon', 'semicolon', 'commasuperior', 'threequartersemdash', 'periodsuperior', 'asuperior', 'bsuperior', 'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior', 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior', 'tsuperior', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior', 'parenrightinferior', 'hyphensuperior', 'colonmonetary', 'onefitted', 'rupiah', 'centoldstyle', 'figuredash', 'hypheninferior', 'onequarter', 'onehalf', 'threequarters', 'oneeighth', 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'onesuperior', 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior', 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior', 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior', 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior', 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior', 'periodinferior', 'commainferior']; + +//######################## +// Scripts and Languages # +//######################## + +var LangSysTable = new r.Struct({ + reserved: new r.Reserved(r.uint16), + reqFeatureIndex: r.uint16, + featureCount: r.uint16, + featureIndexes: new r.Array(r.uint16, 'featureCount') +}); + +var LangSysRecord = new r.Struct({ + tag: new r.String(4), + langSys: new r.Pointer(r.uint16, LangSysTable, { type: 'parent' }) +}); + +var Script = new r.Struct({ + defaultLangSys: new r.Pointer(r.uint16, LangSysTable), + count: r.uint16, + langSysRecords: new r.Array(LangSysRecord, 'count') +}); + +var ScriptRecord = new r.Struct({ + tag: new r.String(4), + script: new r.Pointer(r.uint16, Script, { type: 'parent' }) +}); + +var ScriptList = new r.Array(ScriptRecord, r.uint16); + +//####################### +// Features and Lookups # +//####################### + +var Feature = new r.Struct({ + featureParams: r.uint16, // pointer + lookupCount: r.uint16, + lookupListIndexes: new r.Array(r.uint16, 'lookupCount') +}); + +var FeatureRecord = new r.Struct({ + tag: new r.String(4), + feature: new r.Pointer(r.uint16, Feature, { type: 'parent' }) +}); + +var FeatureList = new r.Array(FeatureRecord, r.uint16); + +var LookupFlags = new r.Bitfield(r.uint16, ['rightToLeft', 'ignoreBaseGlyphs', 'ignoreLigatures', 'ignoreMarks', 'useMarkFilteringSet', null, 'markAttachmentType']); + +function LookupList(SubTable) { + var Lookup = new r.Struct({ + lookupType: r.uint16, + flags: LookupFlags, + subTableCount: r.uint16, + subTables: new r.Array(new r.Pointer(r.uint16, SubTable), 'subTableCount'), + markFilteringSet: r.uint16 // TODO: only present when flags says so... + }); + + return new r.LazyArray(new r.Pointer(r.uint16, Lookup), r.uint16); +} + +//################# +// Coverage Table # +//################# + +var RangeRecord = new r.Struct({ + start: r.uint16, + end: r.uint16, + startCoverageIndex: r.uint16 +}); + +var Coverage = new r.VersionedStruct(r.uint16, { + 1: { + glyphCount: r.uint16, + glyphs: new r.Array(r.uint16, 'glyphCount') + }, + 2: { + rangeCount: r.uint16, + rangeRecords: new r.Array(RangeRecord, 'rangeCount') + } +}); + +//######################### +// Class Definition Table # +//######################### + +var ClassRangeRecord = new r.Struct({ + start: r.uint16, + end: r.uint16, + class: r.uint16 +}); + +var ClassDef = new r.VersionedStruct(r.uint16, { + 1: { // Class array + startGlyph: r.uint16, + glyphCount: r.uint16, + classValueArray: new r.Array(r.uint16, 'glyphCount') + }, + 2: { // Class ranges + classRangeCount: r.uint16, + classRangeRecord: new r.Array(ClassRangeRecord, 'classRangeCount') + } +}); + +//############### +// Device Table # +//############### + +var Device = new r.Struct({ + startSize: r.uint16, + endSize: r.uint16, + deltaFormat: r.uint16 +}); + +//############################################# +// Contextual Substitution/Positioning Tables # +//############################################# + +var LookupRecord = new r.Struct({ + sequenceIndex: r.uint16, + lookupListIndex: r.uint16 +}); + +var Rule = new r.Struct({ + glyphCount: r.uint16, + lookupCount: r.uint16, + input: new r.Array(r.uint16, function (t) { + return t.glyphCount - 1; + }), + lookupRecords: new r.Array(LookupRecord, 'lookupCount') +}); + +var RuleSet = new r.Array(new r.Pointer(r.uint16, Rule), r.uint16); + +var ClassRule = new r.Struct({ + glyphCount: r.uint16, + lookupCount: r.uint16, + classes: new r.Array(r.uint16, function (t) { + return t.glyphCount - 1; + }), + lookupRecords: new r.Array(LookupRecord, 'lookupCount') +}); + +var ClassSet = new r.Array(new r.Pointer(r.uint16, ClassRule), r.uint16); + +var Context = new r.VersionedStruct(r.uint16, { + 1: { // Simple context + coverage: new r.Pointer(r.uint16, Coverage), + ruleSetCount: r.uint16, + ruleSets: new r.Array(new r.Pointer(r.uint16, RuleSet), 'ruleSetCount') + }, + 2: { // Class-based context + coverage: new r.Pointer(r.uint16, Coverage), + classDef: new r.Pointer(r.uint16, ClassDef), + classSetCnt: r.uint16, + classSet: new r.Array(new r.Pointer(r.uint16, ClassSet), 'classSetCnt') + }, + 3: { + glyphCount: r.uint16, + lookupCount: r.uint16, + coverages: new r.Array(new r.Pointer(r.uint16, Coverage), 'glyphCount'), + lookupRecords: new r.Array(LookupRecord, 'lookupCount') + } +}); + +//###################################################### +// Chaining Contextual Substitution/Positioning Tables # +//###################################################### + +var ChainRule = new r.Struct({ + backtrackGlyphCount: r.uint16, + backtrack: new r.Array(r.uint16, 'backtrackGlyphCount'), + inputGlyphCount: r.uint16, + input: new r.Array(r.uint16, function (t) { + return t.inputGlyphCount - 1; + }), + lookaheadGlyphCount: r.uint16, + lookahead: new r.Array(r.uint16, 'lookaheadGlyphCount'), + lookupCount: r.uint16, + lookupRecords: new r.Array(LookupRecord, 'lookupCount') +}); + +var ChainRuleSet = new r.Array(new r.Pointer(r.uint16, ChainRule), r.uint16); + +var ChainingContext = new r.VersionedStruct(r.uint16, { + 1: { // Simple context glyph substitution + coverage: new r.Pointer(r.uint16, Coverage), + chainCount: r.uint16, + chainRuleSets: new r.Array(new r.Pointer(r.uint16, ChainRuleSet), 'chainCount') + }, + + 2: { // Class-based chaining context + coverage: new r.Pointer(r.uint16, Coverage), + backtrackClassDef: new r.Pointer(r.uint16, ClassDef), + inputClassDef: new r.Pointer(r.uint16, ClassDef), + lookaheadClassDef: new r.Pointer(r.uint16, ClassDef), + chainCount: r.uint16, + chainClassSet: new r.Array(new r.Pointer(r.uint16, ChainRuleSet), 'chainCount') + }, + + 3: { // Coverage-based chaining context + backtrackGlyphCount: r.uint16, + backtrackCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'backtrackGlyphCount'), + inputGlyphCount: r.uint16, + inputCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'inputGlyphCount'), + lookaheadGlyphCount: r.uint16, + lookaheadCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'lookaheadGlyphCount'), + lookupCount: r.uint16, + lookupRecords: new r.Array(LookupRecord, 'lookupCount') + } +}); + +var _; + +/******************* + * Variation Store * + *******************/ + +var F2DOT14 = new r.Fixed(16, 'BE', 14); +var RegionAxisCoordinates = new r.Struct({ + startCoord: F2DOT14, + peakCoord: F2DOT14, + endCoord: F2DOT14 +}); + +var VariationRegionList = new r.Struct({ + axisCount: r.uint16, + regionCount: r.uint16, + variationRegions: new r.Array(new r.Array(RegionAxisCoordinates, 'axisCount'), 'regionCount') +}); + +var DeltaSet = new r.Struct({ + shortDeltas: new r.Array(r.int16, function (t) { + return t.parent.shortDeltaCount; + }), + regionDeltas: new r.Array(r.int8, function (t) { + return t.parent.regionIndexCount - t.parent.shortDeltaCount; + }), + deltas: function deltas(t) { + return t.shortDeltas.concat(t.regionDeltas); + } +}); + +var ItemVariationData = new r.Struct({ + itemCount: r.uint16, + shortDeltaCount: r.uint16, + regionIndexCount: r.uint16, + regionIndexes: new r.Array(r.uint16, 'regionIndexCount'), + deltaSets: new r.Array(DeltaSet, 'itemCount') +}); + +var ItemVariationStore = new r.Struct({ + format: r.uint16, + variationRegionList: new r.Pointer(r.uint32, VariationRegionList), + variationDataCount: r.uint16, + itemVariationData: new r.Array(new r.Pointer(r.uint32, ItemVariationData), 'variationDataCount') +}); + +/********************** + * Feature Variations * + **********************/ + +var ConditionTable = new r.VersionedStruct(r.uint16, { + 1: (_ = { + axisIndex: r.uint16 + }, _['axisIndex'] = r.uint16, _.filterRangeMinValue = F2DOT14, _.filterRangeMaxValue = F2DOT14, _) +}); + +var ConditionSet = new r.Struct({ + conditionCount: r.uint16, + conditionTable: new r.Array(new r.Pointer(r.uint32, ConditionTable), 'conditionCount') +}); + +var FeatureTableSubstitutionRecord = new r.Struct({ + featureIndex: r.uint16, + alternateFeatureTable: new r.Pointer(r.uint32, Feature, { type: 'parent' }) +}); + +var FeatureTableSubstitution = new r.Struct({ + version: r.fixed32, + substitutionCount: r.uint16, + substitutions: new r.Array(FeatureTableSubstitutionRecord, 'substitutionCount') +}); + +var FeatureVariationRecord = new r.Struct({ + conditionSet: new r.Pointer(r.uint32, ConditionSet, { type: 'parent' }), + featureTableSubstitution: new r.Pointer(r.uint32, FeatureTableSubstitution, { type: 'parent' }) +}); + +var FeatureVariations = new r.Struct({ + majorVersion: r.uint16, + minorVersion: r.uint16, + featureVariationRecordCount: r.uint32, + featureVariationRecords: new r.Array(FeatureVariationRecord, 'featureVariationRecordCount') +}); + +// Checks if an operand is an index of a predefined value, +// otherwise delegates to the provided type. + +var PredefinedOp = function () { + function PredefinedOp(predefinedOps, type) { + _classCallCheck(this, PredefinedOp); + + this.predefinedOps = predefinedOps; + this.type = type; + } + + PredefinedOp.prototype.decode = function decode(stream, parent, operands) { + if (this.predefinedOps[operands[0]]) { + return this.predefinedOps[operands[0]]; + } + + return this.type.decode(stream, parent, operands); + }; + + PredefinedOp.prototype.size = function size(value, ctx) { + return this.type.size(value, ctx); + }; + + PredefinedOp.prototype.encode = function encode(stream, value, ctx) { + var index = this.predefinedOps.indexOf(value); + if (index !== -1) { + return index; + } + + return this.type.encode(stream, value, ctx); + }; + + return PredefinedOp; +}(); + +var CFFEncodingVersion = function (_r$Number) { + _inherits(CFFEncodingVersion, _r$Number); + + function CFFEncodingVersion() { + _classCallCheck(this, CFFEncodingVersion); + + return _possibleConstructorReturn(this, _r$Number.call(this, 'UInt8')); + } + + CFFEncodingVersion.prototype.decode = function decode(stream) { + return r.uint8.decode(stream) & 0x7f; + }; + + return CFFEncodingVersion; +}(r.Number); + +var Range1 = new r.Struct({ + first: r.uint16, + nLeft: r.uint8 +}); + +var Range2 = new r.Struct({ + first: r.uint16, + nLeft: r.uint16 +}); + +var CFFCustomEncoding = new r.VersionedStruct(new CFFEncodingVersion(), { + 0: { + nCodes: r.uint8, + codes: new r.Array(r.uint8, 'nCodes') + }, + + 1: { + nRanges: r.uint8, + ranges: new r.Array(Range1, 'nRanges') + } + + // TODO: supplement? +}); + +var CFFEncoding = new PredefinedOp([StandardEncoding, ExpertEncoding], new CFFPointer(CFFCustomEncoding, { lazy: true })); + +// Decodes an array of ranges until the total +// length is equal to the provided length. + +var RangeArray = function (_r$Array) { + _inherits(RangeArray, _r$Array); + + function RangeArray() { + _classCallCheck(this, RangeArray); + + return _possibleConstructorReturn(this, _r$Array.apply(this, arguments)); + } + + RangeArray.prototype.decode = function decode(stream, parent) { + var length = restructure_src_utils.resolveLength(this.length, stream, parent); + var count = 0; + var res = []; + while (count < length) { + var range = this.type.decode(stream, parent); + range.offset = count; + count += range.nLeft + 1; + res.push(range); + } + + return res; + }; + + return RangeArray; +}(r.Array); + +var CFFCustomCharset = new r.VersionedStruct(r.uint8, { + 0: { + glyphs: new r.Array(r.uint16, function (t) { + return t.parent.CharStrings.length - 1; + }) + }, + + 1: { + ranges: new RangeArray(Range1, function (t) { + return t.parent.CharStrings.length - 1; + }) + }, + + 2: { + ranges: new RangeArray(Range2, function (t) { + return t.parent.CharStrings.length - 1; + }) + } +}); + +var CFFCharset = new PredefinedOp([ISOAdobeCharset, ExpertCharset, ExpertSubsetCharset], new CFFPointer(CFFCustomCharset, { lazy: true })); + +var FDRange3 = new r.Struct({ + first: r.uint16, + fd: r.uint8 +}); + +var FDRange4 = new r.Struct({ + first: r.uint32, + fd: r.uint16 +}); + +var FDSelect = new r.VersionedStruct(r.uint8, { + 0: { + fds: new r.Array(r.uint8, function (t) { + return t.parent.CharStrings.length; + }) + }, + + 3: { + nRanges: r.uint16, + ranges: new r.Array(FDRange3, 'nRanges'), + sentinel: r.uint16 + }, + + 4: { + nRanges: r.uint32, + ranges: new r.Array(FDRange4, 'nRanges'), + sentinel: r.uint32 + } +}); + +var ptr = new CFFPointer(CFFPrivateDict); + +var CFFPrivateOp = function () { + function CFFPrivateOp() { + _classCallCheck(this, CFFPrivateOp); + } + + CFFPrivateOp.prototype.decode = function decode(stream, parent, operands) { + parent.length = operands[0]; + return ptr.decode(stream, parent, [operands[1]]); + }; + + CFFPrivateOp.prototype.size = function size(dict, ctx) { + return [CFFPrivateDict.size(dict, ctx, false), ptr.size(dict, ctx)[0]]; + }; + + CFFPrivateOp.prototype.encode = function encode(stream, dict, ctx) { + return [CFFPrivateDict.size(dict, ctx, false), ptr.encode(stream, dict, ctx)[0]]; + }; + + return CFFPrivateOp; +}(); + +var FontDict = new CFFDict([ +// key name type(s) default +[18, 'Private', new CFFPrivateOp(), null], [[12, 38], 'FontName', 'sid', null]]); + +var CFFTopDict = new CFFDict([ +// key name type(s) default +[[12, 30], 'ROS', ['sid', 'sid', 'number'], null], [0, 'version', 'sid', null], [1, 'Notice', 'sid', null], [[12, 0], 'Copyright', 'sid', null], [2, 'FullName', 'sid', null], [3, 'FamilyName', 'sid', null], [4, 'Weight', 'sid', null], [[12, 1], 'isFixedPitch', 'boolean', false], [[12, 2], 'ItalicAngle', 'number', 0], [[12, 3], 'UnderlinePosition', 'number', -100], [[12, 4], 'UnderlineThickness', 'number', 50], [[12, 5], 'PaintType', 'number', 0], [[12, 6], 'CharstringType', 'number', 2], [[12, 7], 'FontMatrix', 'array', [0.001, 0, 0, 0.001, 0, 0]], [13, 'UniqueID', 'number', null], [5, 'FontBBox', 'array', [0, 0, 0, 0]], [[12, 8], 'StrokeWidth', 'number', 0], [14, 'XUID', 'array', null], [15, 'charset', CFFCharset, ISOAdobeCharset], [16, 'Encoding', CFFEncoding, StandardEncoding], [17, 'CharStrings', new CFFPointer(new CFFIndex()), null], [18, 'Private', new CFFPrivateOp(), null], [[12, 20], 'SyntheticBase', 'number', null], [[12, 21], 'PostScript', 'sid', null], [[12, 22], 'BaseFontName', 'sid', null], [[12, 23], 'BaseFontBlend', 'delta', null], + +// CID font specific +[[12, 31], 'CIDFontVersion', 'number', 0], [[12, 32], 'CIDFontRevision', 'number', 0], [[12, 33], 'CIDFontType', 'number', 0], [[12, 34], 'CIDCount', 'number', 8720], [[12, 35], 'UIDBase', 'number', null], [[12, 37], 'FDSelect', new CFFPointer(FDSelect), null], [[12, 36], 'FDArray', new CFFPointer(new CFFIndex(FontDict)), null], [[12, 38], 'FontName', 'sid', null]]); + +var VariationStore = new r.Struct({ + length: r.uint16, + itemVariationStore: ItemVariationStore +}); + +var CFF2TopDict = new CFFDict([[[12, 7], 'FontMatrix', 'array', [0.001, 0, 0, 0.001, 0, 0]], [17, 'CharStrings', new CFFPointer(new CFFIndex()), null], [[12, 37], 'FDSelect', new CFFPointer(FDSelect), null], [[12, 36], 'FDArray', new CFFPointer(new CFFIndex(FontDict)), null], [24, 'vstore', new CFFPointer(VariationStore), null], [25, 'maxstack', 'number', 193]]); + +var CFFTop = new r.VersionedStruct(r.fixed16, { + 1: { + hdrSize: r.uint8, + offSize: r.uint8, + nameIndex: new CFFIndex(new r.String('length')), + topDictIndex: new CFFIndex(CFFTopDict), + stringIndex: new CFFIndex(new r.String('length')), + globalSubrIndex: new CFFIndex() + }, + + 2: { + hdrSize: r.uint8, + length: r.uint16, + topDict: CFF2TopDict, + globalSubrIndex: new CFFIndex() + } +}); + +var CFFFont = function () { + function CFFFont(stream) { + _classCallCheck(this, CFFFont); + + this.stream = stream; + this.decode(); + } + + CFFFont.decode = function decode(stream) { + return new CFFFont(stream); + }; + + CFFFont.prototype.decode = function decode() { + var start = this.stream.pos; + var top = CFFTop.decode(this.stream); + for (var key in top) { + var val = top[key]; + this[key] = val; + } + + if (this.version < 2) { + if (this.topDictIndex.length !== 1) { + throw new Error("Only a single font is allowed in CFF"); + } + + this.topDict = this.topDictIndex[0]; + } + + this.isCIDFont = this.topDict.ROS != null; + return this; + }; + + CFFFont.prototype.string = function string(sid) { + if (this.version >= 2) { + return null; + } + + if (sid < standardStrings.length) { + return standardStrings[sid]; + } + + return this.stringIndex[sid - standardStrings.length]; + }; + + CFFFont.prototype.getCharString = function getCharString(glyph) { + this.stream.pos = this.topDict.CharStrings[glyph].offset; + return this.stream.readBuffer(this.topDict.CharStrings[glyph].length); + }; + + CFFFont.prototype.getGlyphName = function getGlyphName(gid) { + // CFF2 glyph names are in the post table. + if (this.version >= 2) { + return null; + } + + // CID-keyed fonts don't have glyph names + if (this.isCIDFont) { + return null; + } + + var charset = this.topDict.charset; + + if (Array.isArray(charset)) { + return charset[gid]; + } + + if (gid === 0) { + return '.notdef'; + } + + gid -= 1; + + switch (charset.version) { + case 0: + return this.string(charset.glyphs[gid]); + + case 1: + case 2: + for (var i = 0; i < charset.ranges.length; i++) { + var range = charset.ranges[i]; + if (range.offset <= gid && gid <= range.offset + range.nLeft) { + return this.string(range.first + (gid - range.offset)); + } + } + break; + } + + return null; + }; + + CFFFont.prototype.fdForGlyph = function fdForGlyph(gid) { + if (!this.topDict.FDSelect) { + return null; + } + + switch (this.topDict.FDSelect.version) { + case 0: + return this.topDict.FDSelect.fds[gid]; + + case 3: + case 4: + var ranges = this.topDict.FDSelect.ranges; + + var low = 0; + var high = ranges.length - 1; + + while (low <= high) { + var mid = low + high >> 1; + + if (gid < ranges[mid].first) { + high = mid - 1; + } else if (mid < high && gid > ranges[mid + 1].first) { + low = mid + 1; + } else { + return ranges[mid].fd; + } + } + default: + throw new Error('Unknown FDSelect version: ' + this.topDict.FDSelect.version); + } + }; + + CFFFont.prototype.privateDictForGlyph = function privateDictForGlyph(gid) { + if (this.topDict.FDSelect) { + var fd = this.fdForGlyph(gid); + if (this.topDict.FDArray[fd]) { + return this.topDict.FDArray[fd].Private; + } + + return null; + } + + if (this.version < 2) { + return this.topDict.Private; + } + + return this.topDict.FDArray[0].Private; + }; + + _createClass(CFFFont, [{ + key: 'postscriptName', + get: function get() { + if (this.version < 2) { + return this.nameIndex[0]; + } + + return null; + } + }, { + key: 'fullName', + get: function get() { + return this.string(this.topDict.FullName); + } + }, { + key: 'familyName', + get: function get() { + return this.string(this.topDict.FamilyName); + } + }]); + + return CFFFont; +}(); + +var VerticalOrigin = new r.Struct({ + glyphIndex: r.uint16, + vertOriginY: r.int16 +}); + +var VORG = new r.Struct({ + majorVersion: r.uint16, + minorVersion: r.uint16, + defaultVertOriginY: r.int16, + numVertOriginYMetrics: r.uint16, + metrics: new r.Array(VerticalOrigin, 'numVertOriginYMetrics') +}); + +var BigMetrics = new r.Struct({ + height: r.uint8, + width: r.uint8, + horiBearingX: r.int8, + horiBearingY: r.int8, + horiAdvance: r.uint8, + vertBearingX: r.int8, + vertBearingY: r.int8, + vertAdvance: r.uint8 +}); + +var SmallMetrics = new r.Struct({ + height: r.uint8, + width: r.uint8, + bearingX: r.int8, + bearingY: r.int8, + advance: r.uint8 +}); + +var EBDTComponent = new r.Struct({ + glyph: r.uint16, + xOffset: r.int8, + yOffset: r.int8 +}); + +var ByteAligned = function ByteAligned() { + _classCallCheck(this, ByteAligned); +}; + +var BitAligned = function BitAligned() { + _classCallCheck(this, BitAligned); +}; + +var glyph = new r.VersionedStruct('version', { + 1: { + metrics: SmallMetrics, + data: ByteAligned + }, + + 2: { + metrics: SmallMetrics, + data: BitAligned + }, + + // format 3 is deprecated + // format 4 is not supported by Microsoft + + 5: { + data: BitAligned + }, + + 6: { + metrics: BigMetrics, + data: ByteAligned + }, + + 7: { + metrics: BigMetrics, + data: BitAligned + }, + + 8: { + metrics: SmallMetrics, + pad: new r.Reserved(r.uint8), + numComponents: r.uint16, + components: new r.Array(EBDTComponent, 'numComponents') + }, + + 9: { + metrics: BigMetrics, + pad: new r.Reserved(r.uint8), + numComponents: r.uint16, + components: new r.Array(EBDTComponent, 'numComponents') + }, + + 17: { + metrics: SmallMetrics, + dataLen: r.uint32, + data: new r.Buffer('dataLen') + }, + + 18: { + metrics: BigMetrics, + dataLen: r.uint32, + data: new r.Buffer('dataLen') + }, + + 19: { + dataLen: r.uint32, + data: new r.Buffer('dataLen') + } +}); + +var SBitLineMetrics = new r.Struct({ + ascender: r.int8, + descender: r.int8, + widthMax: r.uint8, + caretSlopeNumerator: r.int8, + caretSlopeDenominator: r.int8, + caretOffset: r.int8, + minOriginSB: r.int8, + minAdvanceSB: r.int8, + maxBeforeBL: r.int8, + minAfterBL: r.int8, + pad: new r.Reserved(r.int8, 2) +}); + +var CodeOffsetPair = new r.Struct({ + glyphCode: r.uint16, + offset: r.uint16 +}); + +var IndexSubtable = new r.VersionedStruct(r.uint16, { + header: { + imageFormat: r.uint16, + imageDataOffset: r.uint32 + }, + + 1: { + offsetArray: new r.Array(r.uint32, function (t) { + return t.parent.lastGlyphIndex - t.parent.firstGlyphIndex + 1; + }) + }, + + 2: { + imageSize: r.uint32, + bigMetrics: BigMetrics + }, + + 3: { + offsetArray: new r.Array(r.uint16, function (t) { + return t.parent.lastGlyphIndex - t.parent.firstGlyphIndex + 1; + }) + }, + + 4: { + numGlyphs: r.uint32, + glyphArray: new r.Array(CodeOffsetPair, function (t) { + return t.numGlyphs + 1; + }) + }, + + 5: { + imageSize: r.uint32, + bigMetrics: BigMetrics, + numGlyphs: r.uint32, + glyphCodeArray: new r.Array(r.uint16, 'numGlyphs') + } +}); + +var IndexSubtableArray = new r.Struct({ + firstGlyphIndex: r.uint16, + lastGlyphIndex: r.uint16, + subtable: new r.Pointer(r.uint32, IndexSubtable) +}); + +var BitmapSizeTable = new r.Struct({ + indexSubTableArray: new r.Pointer(r.uint32, new r.Array(IndexSubtableArray, 1), { type: 'parent' }), + indexTablesSize: r.uint32, + numberOfIndexSubTables: r.uint32, + colorRef: r.uint32, + hori: SBitLineMetrics, + vert: SBitLineMetrics, + startGlyphIndex: r.uint16, + endGlyphIndex: r.uint16, + ppemX: r.uint8, + ppemY: r.uint8, + bitDepth: r.uint8, + flags: new r.Bitfield(r.uint8, ['horizontal', 'vertical']) +}); + +var EBLC = new r.Struct({ + version: r.uint32, // 0x00020000 + numSizes: r.uint32, + sizes: new r.Array(BitmapSizeTable, 'numSizes') +}); + +var ImageTable = new r.Struct({ + ppem: r.uint16, + resolution: r.uint16, + imageOffsets: new r.Array(new r.Pointer(r.uint32, 'void'), function (t) { + return t.parent.parent.maxp.numGlyphs + 1; + }) +}); + +// This is the Apple sbix table, used by the "Apple Color Emoji" font. +// It includes several image tables with images for each bitmap glyph +// of several different sizes. +var sbix = new r.Struct({ + version: r.uint16, + flags: new r.Bitfield(r.uint16, ['renderOutlines']), + numImgTables: r.uint32, + imageTables: new r.Array(new r.Pointer(r.uint32, ImageTable), 'numImgTables') +}); + +var LayerRecord = new r.Struct({ + gid: r.uint16, // Glyph ID of layer glyph (must be in z-order from bottom to top). + paletteIndex: r.uint16 // Index value to use in the appropriate palette. This value must +}); // be less than numPaletteEntries in the CPAL table, except for +// the special case noted below. Each palette entry is 16 bits. +// A palette index of 0xFFFF is a special case indicating that +// the text foreground color should be used. + +var BaseGlyphRecord = new r.Struct({ + gid: r.uint16, // Glyph ID of reference glyph. This glyph is for reference only + // and is not rendered for color. + firstLayerIndex: r.uint16, // Index (from beginning of the Layer Records) to the layer record. + // There will be numLayers consecutive entries for this base glyph. + numLayers: r.uint16 +}); + +var COLR = new r.Struct({ + version: r.uint16, + numBaseGlyphRecords: r.uint16, + baseGlyphRecord: new r.Pointer(r.uint32, new r.Array(BaseGlyphRecord, 'numBaseGlyphRecords')), + layerRecords: new r.Pointer(r.uint32, new r.Array(LayerRecord, 'numLayerRecords'), { lazy: true }), + numLayerRecords: r.uint16 +}); + +var ColorRecord = new r.Struct({ + blue: r.uint8, + green: r.uint8, + red: r.uint8, + alpha: r.uint8 +}); + +var CPAL = new r.Struct({ + version: r.uint16, + numPaletteEntries: r.uint16, + numPalettes: r.uint16, + numColorRecords: r.uint16, + colorRecords: new r.Pointer(r.uint32, new r.Array(ColorRecord, 'numColorRecords')), + colorRecordIndices: new r.Array(r.uint16, 'numPalettes') +}); + +var BaseCoord = new r.VersionedStruct(r.uint16, { + 1: { // Design units only + coordinate: r.int16 // X or Y value, in design units + }, + + 2: { // Design units plus contour point + coordinate: r.int16, // X or Y value, in design units + referenceGlyph: r.uint16, // GlyphID of control glyph + baseCoordPoint: r.uint16 // Index of contour point on the referenceGlyph + }, + + 3: { // Design units plus Device table + coordinate: r.int16, // X or Y value, in design units + deviceTable: new r.Pointer(r.uint16, Device) // Device table for X or Y value + } +}); + +var BaseValues = new r.Struct({ + defaultIndex: r.uint16, // Index of default baseline for this script-same index in the BaseTagList + baseCoordCount: r.uint16, + baseCoords: new r.Array(new r.Pointer(r.uint16, BaseCoord), 'baseCoordCount') +}); + +var FeatMinMaxRecord = new r.Struct({ + tag: new r.String(4), // 4-byte feature identification tag-must match FeatureTag in FeatureList + minCoord: new r.Pointer(r.uint16, BaseCoord, { type: 'parent' }), // May be NULL + maxCoord: new r.Pointer(r.uint16, BaseCoord, { type: 'parent' }) // May be NULL +}); + +var MinMax = new r.Struct({ + minCoord: new r.Pointer(r.uint16, BaseCoord), // May be NULL + maxCoord: new r.Pointer(r.uint16, BaseCoord), // May be NULL + featMinMaxCount: r.uint16, // May be 0 + featMinMaxRecords: new r.Array(FeatMinMaxRecord, 'featMinMaxCount') // In alphabetical order +}); + +var BaseLangSysRecord = new r.Struct({ + tag: new r.String(4), // 4-byte language system identification tag + minMax: new r.Pointer(r.uint16, MinMax, { type: 'parent' }) +}); + +var BaseScript = new r.Struct({ + baseValues: new r.Pointer(r.uint16, BaseValues), // May be NULL + defaultMinMax: new r.Pointer(r.uint16, MinMax), // May be NULL + baseLangSysCount: r.uint16, // May be 0 + baseLangSysRecords: new r.Array(BaseLangSysRecord, 'baseLangSysCount') // in alphabetical order by BaseLangSysTag +}); + +var BaseScriptRecord = new r.Struct({ + tag: new r.String(4), // 4-byte script identification tag + script: new r.Pointer(r.uint16, BaseScript, { type: 'parent' }) +}); + +var BaseScriptList = new r.Array(BaseScriptRecord, r.uint16); + +// Array of 4-byte baseline identification tags-must be in alphabetical order +var BaseTagList = new r.Array(new r.String(4), r.uint16); + +var Axis = new r.Struct({ + baseTagList: new r.Pointer(r.uint16, BaseTagList), // May be NULL + baseScriptList: new r.Pointer(r.uint16, BaseScriptList) +}); + +var BASE = new r.Struct({ + version: r.uint32, // Version of the BASE table-initially 0x00010000 + horizAxis: new r.Pointer(r.uint16, Axis), // May be NULL + vertAxis: new r.Pointer(r.uint16, Axis) // May be NULL +}); + +var AttachPoint = new r.Array(r.uint16, r.uint16); +var AttachList = new r.Struct({ + coverage: new r.Pointer(r.uint16, Coverage), + glyphCount: r.uint16, + attachPoints: new r.Array(new r.Pointer(r.uint16, AttachPoint), 'glyphCount') +}); + +var CaretValue = new r.VersionedStruct(r.uint16, { + 1: { // Design units only + coordinate: r.int16 + }, + + 2: { // Contour point + caretValuePoint: r.uint16 + }, + + 3: { // Design units plus Device table + coordinate: r.int16, + deviceTable: new r.Pointer(r.uint16, Device) + } +}); + +var LigGlyph = new r.Array(new r.Pointer(r.uint16, CaretValue), r.uint16); + +var LigCaretList = new r.Struct({ + coverage: new r.Pointer(r.uint16, Coverage), + ligGlyphCount: r.uint16, + ligGlyphs: new r.Array(new r.Pointer(r.uint16, LigGlyph), 'ligGlyphCount') +}); + +var MarkGlyphSetsDef = new r.Struct({ + markSetTableFormat: r.uint16, + markSetCount: r.uint16, + coverage: new r.Array(new r.Pointer(r.uint32, Coverage), 'markSetCount') +}); + +var GDEF = new r.VersionedStruct(r.uint32, { + header: { + glyphClassDef: new r.Pointer(r.uint16, ClassDef), + attachList: new r.Pointer(r.uint16, AttachList), + ligCaretList: new r.Pointer(r.uint16, LigCaretList), + markAttachClassDef: new r.Pointer(r.uint16, ClassDef) + }, + + 0x00010000: {}, + 0x00010002: { + markGlyphSetsDef: new r.Pointer(r.uint16, MarkGlyphSetsDef) + }, + 0x00010003: { + markGlyphSetsDef: new r.Pointer(r.uint16, MarkGlyphSetsDef), + itemVariationStore: new r.Pointer(r.uint32, ItemVariationStore) + } +}); + +var ValueFormat = new r.Bitfield(r.uint16, ['xPlacement', 'yPlacement', 'xAdvance', 'yAdvance', 'xPlaDevice', 'yPlaDevice', 'xAdvDevice', 'yAdvDevice']); + +var types = { + xPlacement: r.int16, + yPlacement: r.int16, + xAdvance: r.int16, + yAdvance: r.int16, + xPlaDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: 'rel' }), + yPlaDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: 'rel' }), + xAdvDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: 'rel' }), + yAdvDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: 'rel' }) +}; + +var ValueRecord = function () { + function ValueRecord() { + var key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'valueFormat'; + + _classCallCheck(this, ValueRecord); + + this.key = key; + } + + ValueRecord.prototype.buildStruct = function buildStruct(parent) { + var struct = parent; + while (!struct[this.key] && struct.parent) { + struct = struct.parent; + } + + if (!struct[this.key]) return; + + var fields = {}; + fields.rel = function () { + return struct._startOffset; + }; + + var format = struct[this.key]; + for (var key in format) { + if (format[key]) { + fields[key] = types[key]; + } + } + + return new r.Struct(fields); + }; + + ValueRecord.prototype.size = function size(val, ctx) { + return this.buildStruct(ctx).size(val, ctx); + }; + + ValueRecord.prototype.decode = function decode(stream, parent) { + var res = this.buildStruct(parent).decode(stream, parent); + delete res.rel; + return res; + }; + + return ValueRecord; +}(); + +var PairValueRecord = new r.Struct({ + secondGlyph: r.uint16, + value1: new ValueRecord('valueFormat1'), + value2: new ValueRecord('valueFormat2') +}); + +var PairSet = new r.Array(PairValueRecord, r.uint16); + +var Class2Record = new r.Struct({ + value1: new ValueRecord('valueFormat1'), + value2: new ValueRecord('valueFormat2') +}); + +var Anchor = new r.VersionedStruct(r.uint16, { + 1: { // Design units only + xCoordinate: r.int16, + yCoordinate: r.int16 + }, + + 2: { // Design units plus contour point + xCoordinate: r.int16, + yCoordinate: r.int16, + anchorPoint: r.uint16 + }, + + 3: { // Design units plus Device tables + xCoordinate: r.int16, + yCoordinate: r.int16, + xDeviceTable: new r.Pointer(r.uint16, Device), + yDeviceTable: new r.Pointer(r.uint16, Device) + } +}); + +var EntryExitRecord = new r.Struct({ + entryAnchor: new r.Pointer(r.uint16, Anchor, { type: 'parent' }), + exitAnchor: new r.Pointer(r.uint16, Anchor, { type: 'parent' }) +}); + +var MarkRecord = new r.Struct({ + class: r.uint16, + markAnchor: new r.Pointer(r.uint16, Anchor, { type: 'parent' }) +}); + +var MarkArray = new r.Array(MarkRecord, r.uint16); + +var BaseRecord = new r.Array(new r.Pointer(r.uint16, Anchor), function (t) { + return t.parent.classCount; +}); +var BaseArray = new r.Array(BaseRecord, r.uint16); + +var ComponentRecord = new r.Array(new r.Pointer(r.uint16, Anchor), function (t) { + return t.parent.parent.classCount; +}); +var LigatureAttach = new r.Array(ComponentRecord, r.uint16); +var LigatureArray = new r.Array(new r.Pointer(r.uint16, LigatureAttach), r.uint16); + +var GPOSLookup = new r.VersionedStruct('lookupType', { + 1: new r.VersionedStruct(r.uint16, { // Single Adjustment + 1: { // Single positioning value + coverage: new r.Pointer(r.uint16, Coverage), + valueFormat: ValueFormat, + value: new ValueRecord() + }, + 2: { + coverage: new r.Pointer(r.uint16, Coverage), + valueFormat: ValueFormat, + valueCount: r.uint16, + values: new r.LazyArray(new ValueRecord(), 'valueCount') + } + }), + + 2: new r.VersionedStruct(r.uint16, { // Pair Adjustment Positioning + 1: { // Adjustments for glyph pairs + coverage: new r.Pointer(r.uint16, Coverage), + valueFormat1: ValueFormat, + valueFormat2: ValueFormat, + pairSetCount: r.uint16, + pairSets: new r.LazyArray(new r.Pointer(r.uint16, PairSet), 'pairSetCount') + }, + + 2: { // Class pair adjustment + coverage: new r.Pointer(r.uint16, Coverage), + valueFormat1: ValueFormat, + valueFormat2: ValueFormat, + classDef1: new r.Pointer(r.uint16, ClassDef), + classDef2: new r.Pointer(r.uint16, ClassDef), + class1Count: r.uint16, + class2Count: r.uint16, + classRecords: new r.LazyArray(new r.LazyArray(Class2Record, 'class2Count'), 'class1Count') + } + }), + + 3: { // Cursive Attachment Positioning + format: r.uint16, + coverage: new r.Pointer(r.uint16, Coverage), + entryExitCount: r.uint16, + entryExitRecords: new r.Array(EntryExitRecord, 'entryExitCount') + }, + + 4: { // MarkToBase Attachment Positioning + format: r.uint16, + markCoverage: new r.Pointer(r.uint16, Coverage), + baseCoverage: new r.Pointer(r.uint16, Coverage), + classCount: r.uint16, + markArray: new r.Pointer(r.uint16, MarkArray), + baseArray: new r.Pointer(r.uint16, BaseArray) + }, + + 5: { // MarkToLigature Attachment Positioning + format: r.uint16, + markCoverage: new r.Pointer(r.uint16, Coverage), + ligatureCoverage: new r.Pointer(r.uint16, Coverage), + classCount: r.uint16, + markArray: new r.Pointer(r.uint16, MarkArray), + ligatureArray: new r.Pointer(r.uint16, LigatureArray) + }, + + 6: { // MarkToMark Attachment Positioning + format: r.uint16, + mark1Coverage: new r.Pointer(r.uint16, Coverage), + mark2Coverage: new r.Pointer(r.uint16, Coverage), + classCount: r.uint16, + mark1Array: new r.Pointer(r.uint16, MarkArray), + mark2Array: new r.Pointer(r.uint16, BaseArray) + }, + + 7: Context, // Contextual positioning + 8: ChainingContext, // Chaining contextual positioning + + 9: { // Extension Positioning + posFormat: r.uint16, + lookupType: r.uint16, // cannot also be 9 + extension: new r.Pointer(r.uint32, GPOSLookup) + } +}); + +// Fix circular reference +GPOSLookup.versions[9].extension.type = GPOSLookup; + +var GPOS = new r.VersionedStruct(r.uint32, { + header: { + scriptList: new r.Pointer(r.uint16, ScriptList), + featureList: new r.Pointer(r.uint16, FeatureList), + lookupList: new r.Pointer(r.uint16, new LookupList(GPOSLookup)) + }, + + 0x00010000: {}, + 0x00010001: { + featureVariations: new r.Pointer(r.uint32, FeatureVariations) + } +}); + +var Sequence = new r.Array(r.uint16, r.uint16); +var AlternateSet = Sequence; + +var Ligature = new r.Struct({ + glyph: r.uint16, + compCount: r.uint16, + components: new r.Array(r.uint16, function (t) { + return t.compCount - 1; + }) +}); + +var LigatureSet = new r.Array(new r.Pointer(r.uint16, Ligature), r.uint16); + +var GSUBLookup = new r.VersionedStruct('lookupType', { + 1: new r.VersionedStruct(r.uint16, { // Single Substitution + 1: { + coverage: new r.Pointer(r.uint16, Coverage), + deltaGlyphID: r.int16 + }, + 2: { + coverage: new r.Pointer(r.uint16, Coverage), + glyphCount: r.uint16, + substitute: new r.LazyArray(r.uint16, 'glyphCount') + } + }), + + 2: { // Multiple Substitution + substFormat: r.uint16, + coverage: new r.Pointer(r.uint16, Coverage), + count: r.uint16, + sequences: new r.LazyArray(new r.Pointer(r.uint16, Sequence), 'count') + }, + + 3: { // Alternate Substitution + substFormat: r.uint16, + coverage: new r.Pointer(r.uint16, Coverage), + count: r.uint16, + alternateSet: new r.LazyArray(new r.Pointer(r.uint16, AlternateSet), 'count') + }, + + 4: { // Ligature Substitution + substFormat: r.uint16, + coverage: new r.Pointer(r.uint16, Coverage), + count: r.uint16, + ligatureSets: new r.LazyArray(new r.Pointer(r.uint16, LigatureSet), 'count') + }, + + 5: Context, // Contextual Substitution + 6: ChainingContext, // Chaining Contextual Substitution + + 7: { // Extension Substitution + substFormat: r.uint16, + lookupType: r.uint16, // cannot also be 7 + extension: new r.Pointer(r.uint32, GSUBLookup) + }, + + 8: { // Reverse Chaining Contextual Single Substitution + substFormat: r.uint16, + coverage: new r.Pointer(r.uint16, Coverage), + backtrackCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'backtrackGlyphCount'), + lookaheadGlyphCount: r.uint16, + lookaheadCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'lookaheadGlyphCount'), + glyphCount: r.uint16, + substitutes: new r.Array(r.uint16, 'glyphCount') + } +}); + +// Fix circular reference +GSUBLookup.versions[7].extension.type = GSUBLookup; + +var GSUB = new r.VersionedStruct(r.uint32, { + header: { + scriptList: new r.Pointer(r.uint16, ScriptList), + featureList: new r.Pointer(r.uint16, FeatureList), + lookupList: new r.Pointer(r.uint16, new LookupList(GSUBLookup)) + }, + + 0x00010000: {}, + 0x00010001: { + featureVariations: new r.Pointer(r.uint32, FeatureVariations) + } +}); + +var JstfGSUBModList = new r.Array(r.uint16, r.uint16); + +var JstfPriority = new r.Struct({ + shrinkageEnableGSUB: new r.Pointer(r.uint16, JstfGSUBModList), + shrinkageDisableGSUB: new r.Pointer(r.uint16, JstfGSUBModList), + shrinkageEnableGPOS: new r.Pointer(r.uint16, JstfGSUBModList), + shrinkageDisableGPOS: new r.Pointer(r.uint16, JstfGSUBModList), + shrinkageJstfMax: new r.Pointer(r.uint16, new LookupList(GPOSLookup)), + extensionEnableGSUB: new r.Pointer(r.uint16, JstfGSUBModList), + extensionDisableGSUB: new r.Pointer(r.uint16, JstfGSUBModList), + extensionEnableGPOS: new r.Pointer(r.uint16, JstfGSUBModList), + extensionDisableGPOS: new r.Pointer(r.uint16, JstfGSUBModList), + extensionJstfMax: new r.Pointer(r.uint16, new LookupList(GPOSLookup)) +}); + +var JstfLangSys = new r.Array(new r.Pointer(r.uint16, JstfPriority), r.uint16); + +var JstfLangSysRecord = new r.Struct({ + tag: new r.String(4), + jstfLangSys: new r.Pointer(r.uint16, JstfLangSys) +}); + +var JstfScript = new r.Struct({ + extenderGlyphs: new r.Pointer(r.uint16, new r.Array(r.uint16, r.uint16)), // array of glyphs to extend line length + defaultLangSys: new r.Pointer(r.uint16, JstfLangSys), + langSysCount: r.uint16, + langSysRecords: new r.Array(JstfLangSysRecord, 'langSysCount') +}); + +var JstfScriptRecord = new r.Struct({ + tag: new r.String(4), + script: new r.Pointer(r.uint16, JstfScript, { type: 'parent' }) +}); + +var JSTF = new r.Struct({ + version: r.uint32, // should be 0x00010000 + scriptCount: r.uint16, + scriptList: new r.Array(JstfScriptRecord, 'scriptCount') +}); + +// TODO: add this to restructure + +var VariableSizeNumber = function () { + function VariableSizeNumber(size) { + _classCallCheck(this, VariableSizeNumber); + + this._size = size; + } + + VariableSizeNumber.prototype.decode = function decode(stream, parent) { + switch (this.size(0, parent)) { + case 1: + return stream.readUInt8(); + case 2: + return stream.readUInt16BE(); + case 3: + return stream.readUInt24BE(); + case 4: + return stream.readUInt32BE(); + } + }; + + VariableSizeNumber.prototype.size = function size(val, parent) { + return restructure_src_utils.resolveLength(this._size, null, parent); + }; + + return VariableSizeNumber; +}(); + +var MapDataEntry = new r.Struct({ + entry: new VariableSizeNumber(function (t) { + return ((t.parent.entryFormat & 0x0030) >> 4) + 1; + }), + outerIndex: function outerIndex(t) { + return t.entry >> (t.parent.entryFormat & 0x000F) + 1; + }, + innerIndex: function innerIndex(t) { + return t.entry & (1 << (t.parent.entryFormat & 0x000F) + 1) - 1; + } +}); + +var DeltaSetIndexMap = new r.Struct({ + entryFormat: r.uint16, + mapCount: r.uint16, + mapData: new r.Array(MapDataEntry, 'mapCount') +}); + +var HVAR = new r.Struct({ + majorVersion: r.uint16, + minorVersion: r.uint16, + itemVariationStore: new r.Pointer(r.uint32, ItemVariationStore), + advanceWidthMapping: new r.Pointer(r.uint32, DeltaSetIndexMap), + LSBMapping: new r.Pointer(r.uint32, DeltaSetIndexMap), + RSBMapping: new r.Pointer(r.uint32, DeltaSetIndexMap) +}); + +var Signature = new r.Struct({ + format: r.uint32, + length: r.uint32, + offset: r.uint32 +}); + +var SignatureBlock = new r.Struct({ + reserved: new r.Reserved(r.uint16, 2), + cbSignature: r.uint32, // Length (in bytes) of the PKCS#7 packet in pbSignature + signature: new r.Buffer('cbSignature') +}); + +var DSIG = new r.Struct({ + ulVersion: r.uint32, // Version number of the DSIG table (0x00000001) + usNumSigs: r.uint16, // Number of signatures in the table + usFlag: r.uint16, // Permission flags + signatures: new r.Array(Signature, 'usNumSigs'), + signatureBlocks: new r.Array(SignatureBlock, 'usNumSigs') +}); + +var GaspRange = new r.Struct({ + rangeMaxPPEM: r.uint16, // Upper limit of range, in ppem + rangeGaspBehavior: new r.Bitfield(r.uint16, [// Flags describing desired rasterizer behavior + 'grayscale', 'gridfit', 'symmetricSmoothing', 'symmetricGridfit' // only in version 1, for ClearType + ]) +}); + +var gasp = new r.Struct({ + version: r.uint16, // set to 0 + numRanges: r.uint16, + gaspRanges: new r.Array(GaspRange, 'numRanges') // Sorted by ppem +}); + +var DeviceRecord = new r.Struct({ + pixelSize: r.uint8, + maximumWidth: r.uint8, + widths: new r.Array(r.uint8, function (t) { + return t.parent.parent.maxp.numGlyphs; + }) +}); + +// The Horizontal Device Metrics table stores integer advance widths scaled to particular pixel sizes +var hdmx = new r.Struct({ + version: r.uint16, + numRecords: r.int16, + sizeDeviceRecord: r.int32, + records: new r.Array(DeviceRecord, 'numRecords') +}); + +var KernPair = new r.Struct({ + left: r.uint16, + right: r.uint16, + value: r.int16 +}); + +var ClassTable = new r.Struct({ + firstGlyph: r.uint16, + nGlyphs: r.uint16, + offsets: new r.Array(r.uint16, 'nGlyphs'), + max: function max(t) { + return t.offsets.length && Math.max.apply(Math, t.offsets); + } +}); + +var Kern2Array = new r.Struct({ + off: function off(t) { + return t._startOffset - t.parent.parent._startOffset; + }, + len: function len(t) { + return ((t.parent.leftTable.max - t.off) / t.parent.rowWidth + 1) * (t.parent.rowWidth / 2); + }, + values: new r.LazyArray(r.int16, 'len') +}); + +var KernSubtable = new r.VersionedStruct('format', { + 0: { + nPairs: r.uint16, + searchRange: r.uint16, + entrySelector: r.uint16, + rangeShift: r.uint16, + pairs: new r.Array(KernPair, 'nPairs') + }, + + 2: { + rowWidth: r.uint16, + leftTable: new r.Pointer(r.uint16, ClassTable, { type: 'parent' }), + rightTable: new r.Pointer(r.uint16, ClassTable, { type: 'parent' }), + array: new r.Pointer(r.uint16, Kern2Array, { type: 'parent' }) + }, + + 3: { + glyphCount: r.uint16, + kernValueCount: r.uint8, + leftClassCount: r.uint8, + rightClassCount: r.uint8, + flags: r.uint8, + kernValue: new r.Array(r.int16, 'kernValueCount'), + leftClass: new r.Array(r.uint8, 'glyphCount'), + rightClass: new r.Array(r.uint8, 'glyphCount'), + kernIndex: new r.Array(r.uint8, function (t) { + return t.leftClassCount * t.rightClassCount; + }) + } +}); + +var KernTable = new r.VersionedStruct('version', { + 0: { // Microsoft uses this format + subVersion: r.uint16, // Microsoft has an extra sub-table version number + length: r.uint16, // Length of the subtable, in bytes + format: r.uint8, // Format of subtable + coverage: new r.Bitfield(r.uint8, ['horizontal', // 1 if table has horizontal data, 0 if vertical + 'minimum', // If set to 1, the table has minimum values. If set to 0, the table has kerning values. + 'crossStream', // If set to 1, kerning is perpendicular to the flow of the text + 'override' // If set to 1 the value in this table replaces the accumulated value + ]), + subtable: KernSubtable, + padding: new r.Reserved(r.uint8, function (t) { + return t.length - t._currentOffset; + }) + }, + 1: { // Apple uses this format + length: r.uint32, + coverage: new r.Bitfield(r.uint8, [null, null, null, null, null, 'variation', // Set if table has variation kerning values + 'crossStream', // Set if table has cross-stream kerning values + 'vertical' // Set if table has vertical kerning values + ]), + format: r.uint8, + tupleIndex: r.uint16, + subtable: KernSubtable, + padding: new r.Reserved(r.uint8, function (t) { + return t.length - t._currentOffset; + }) + } +}); + +var kern = new r.VersionedStruct(r.uint16, { + 0: { // Microsoft Version + nTables: r.uint16, + tables: new r.Array(KernTable, 'nTables') + }, + + 1: { // Apple Version + reserved: new r.Reserved(r.uint16), // the other half of the version number + nTables: r.uint32, + tables: new r.Array(KernTable, 'nTables') + } +}); + +// Linear Threshold table +// Records the ppem for each glyph at which the scaling becomes linear again, +// despite instructions effecting the advance width +var LTSH = new r.Struct({ + version: r.uint16, + numGlyphs: r.uint16, + yPels: new r.Array(r.uint8, 'numGlyphs') +}); + +// PCL 5 Table +// NOTE: The PCLT table is strongly discouraged for OpenType fonts with TrueType outlines +var PCLT = new r.Struct({ + version: r.uint16, + fontNumber: r.uint32, + pitch: r.uint16, + xHeight: r.uint16, + style: r.uint16, + typeFamily: r.uint16, + capHeight: r.uint16, + symbolSet: r.uint16, + typeface: new r.String(16), + characterComplement: new r.String(8), + fileName: new r.String(6), + strokeWeight: new r.String(1), + widthType: new r.String(1), + serifStyle: r.uint8, + reserved: new r.Reserved(r.uint8) +}); + +// VDMX tables contain ascender/descender overrides for certain (usually small) +// sizes. This is needed in order to match font metrics on Windows. + +var Ratio = new r.Struct({ + bCharSet: r.uint8, // Character set + xRatio: r.uint8, // Value to use for x-Ratio + yStartRatio: r.uint8, // Starting y-Ratio value + yEndRatio: r.uint8 // Ending y-Ratio value +}); + +var vTable = new r.Struct({ + yPelHeight: r.uint16, // yPelHeight to which values apply + yMax: r.int16, // Maximum value (in pels) for this yPelHeight + yMin: r.int16 // Minimum value (in pels) for this yPelHeight +}); + +var VdmxGroup = new r.Struct({ + recs: r.uint16, // Number of height records in this group + startsz: r.uint8, // Starting yPelHeight + endsz: r.uint8, // Ending yPelHeight + entries: new r.Array(vTable, 'recs') // The VDMX records +}); + +var VDMX = new r.Struct({ + version: r.uint16, // Version number (0 or 1) + numRecs: r.uint16, // Number of VDMX groups present + numRatios: r.uint16, // Number of aspect ratio groupings + ratioRanges: new r.Array(Ratio, 'numRatios'), // Ratio ranges + offsets: new r.Array(r.uint16, 'numRatios'), // Offset to the VDMX group for this ratio range + groups: new r.Array(VdmxGroup, 'numRecs') // The actual VDMX groupings +}); + +// Vertical Header Table +var vhea = new r.Struct({ + version: r.uint16, // Version number of the Vertical Header Table + ascent: r.int16, // The vertical typographic ascender for this font + descent: r.int16, // The vertical typographic descender for this font + lineGap: r.int16, // The vertical typographic line gap for this font + advanceHeightMax: r.int16, // The maximum advance height measurement found in the font + minTopSideBearing: r.int16, // The minimum top side bearing measurement found in the font + minBottomSideBearing: r.int16, // The minimum bottom side bearing measurement found in the font + yMaxExtent: r.int16, + caretSlopeRise: r.int16, // Caret slope (rise/run) + caretSlopeRun: r.int16, + caretOffset: r.int16, // Set value equal to 0 for nonslanted fonts + reserved: new r.Reserved(r.int16, 4), + metricDataFormat: r.int16, // Set to 0 + numberOfMetrics: r.uint16 // Number of advance heights in the Vertical Metrics table +}); + +var VmtxEntry = new r.Struct({ + advance: r.uint16, // The advance height of the glyph + bearing: r.int16 // The top sidebearing of the glyph +}); + +// Vertical Metrics Table +var vmtx = new r.Struct({ + metrics: new r.LazyArray(VmtxEntry, function (t) { + return t.parent.vhea.numberOfMetrics; + }), + bearings: new r.LazyArray(r.int16, function (t) { + return t.parent.maxp.numGlyphs - t.parent.vhea.numberOfMetrics; + }) +}); + +var shortFrac = new r.Fixed(16, 'BE', 14); + +var Correspondence = new r.Struct({ + fromCoord: shortFrac, + toCoord: shortFrac +}); + +var Segment = new r.Struct({ + pairCount: r.uint16, + correspondence: new r.Array(Correspondence, 'pairCount') +}); + +var avar = new r.Struct({ + version: r.fixed32, + axisCount: r.uint32, + segment: new r.Array(Segment, 'axisCount') +}); + +var UnboundedArrayAccessor = function () { + function UnboundedArrayAccessor(type, stream, parent) { + _classCallCheck(this, UnboundedArrayAccessor); + + this.type = type; + this.stream = stream; + this.parent = parent; + this.base = this.stream.pos; + this._items = []; + } + + UnboundedArrayAccessor.prototype.getItem = function getItem(index) { + if (this._items[index] == null) { + var pos = this.stream.pos; + this.stream.pos = this.base + this.type.size(null, this.parent) * index; + this._items[index] = this.type.decode(this.stream, this.parent); + this.stream.pos = pos; + } + + return this._items[index]; + }; + + UnboundedArrayAccessor.prototype.inspect = function inspect() { + return '[UnboundedArray ' + this.type.constructor.name + ']'; + }; + + return UnboundedArrayAccessor; +}(); + +var UnboundedArray = function (_r$Array) { + _inherits(UnboundedArray, _r$Array); + + function UnboundedArray(type) { + _classCallCheck(this, UnboundedArray); + + return _possibleConstructorReturn(this, _r$Array.call(this, type, 0)); + } + + UnboundedArray.prototype.decode = function decode(stream, parent) { + return new UnboundedArrayAccessor(this.type, stream, parent); + }; + + return UnboundedArray; +}(r.Array); + +var LookupTable = function LookupTable() { + var ValueType = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : r.uint16; + + // Helper class that makes internal structures invisible to pointers + var Shadow = function () { + function Shadow(type) { + _classCallCheck(this, Shadow); + + this.type = type; + } + + Shadow.prototype.decode = function decode(stream, ctx) { + ctx = ctx.parent.parent; + return this.type.decode(stream, ctx); + }; + + Shadow.prototype.size = function size(val, ctx) { + ctx = ctx.parent.parent; + return this.type.size(val, ctx); + }; + + Shadow.prototype.encode = function encode(stream, val, ctx) { + ctx = ctx.parent.parent; + return this.type.encode(stream, val, ctx); + }; + + return Shadow; + }(); + + ValueType = new Shadow(ValueType); + + var BinarySearchHeader = new r.Struct({ + unitSize: r.uint16, + nUnits: r.uint16, + searchRange: r.uint16, + entrySelector: r.uint16, + rangeShift: r.uint16 + }); + + var LookupSegmentSingle = new r.Struct({ + lastGlyph: r.uint16, + firstGlyph: r.uint16, + value: ValueType + }); + + var LookupSegmentArray = new r.Struct({ + lastGlyph: r.uint16, + firstGlyph: r.uint16, + values: new r.Pointer(r.uint16, new r.Array(ValueType, function (t) { + return t.lastGlyph - t.firstGlyph + 1; + }), { type: 'parent' }) + }); + + var LookupSingle = new r.Struct({ + glyph: r.uint16, + value: ValueType + }); + + return new r.VersionedStruct(r.uint16, { + 0: { + values: new UnboundedArray(ValueType) // length == number of glyphs maybe? + }, + 2: { + binarySearchHeader: BinarySearchHeader, + segments: new r.Array(LookupSegmentSingle, function (t) { + return t.binarySearchHeader.nUnits; + }) + }, + 4: { + binarySearchHeader: BinarySearchHeader, + segments: new r.Array(LookupSegmentArray, function (t) { + return t.binarySearchHeader.nUnits; + }) + }, + 6: { + binarySearchHeader: BinarySearchHeader, + segments: new r.Array(LookupSingle, function (t) { + return t.binarySearchHeader.nUnits; + }) + }, + 8: { + firstGlyph: r.uint16, + count: r.uint16, + values: new r.Array(ValueType, 'count') + } + }); +}; + +function StateTable() { + var entryData = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var lookupType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : r.uint16; + + var entry = _Object$assign({ + newState: r.uint16, + flags: r.uint16 + }, entryData); + + var Entry = new r.Struct(entry); + var StateArray = new UnboundedArray(new r.Array(r.uint16, function (t) { + return t.nClasses; + })); + + var StateHeader = new r.Struct({ + nClasses: r.uint32, + classTable: new r.Pointer(r.uint32, new LookupTable(lookupType)), + stateArray: new r.Pointer(r.uint32, StateArray), + entryTable: new r.Pointer(r.uint32, new UnboundedArray(Entry)) + }); + + return StateHeader; +} + +// This is the old version of the StateTable structure +function StateTable1() { + var entryData = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + var lookupType = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : r.uint16; + + var ClassLookupTable = new r.Struct({ + version: function version() { + return 8; + }, + // simulate LookupTable + firstGlyph: r.uint16, + values: new r.Array(r.uint8, r.uint16) + }); + + var entry = _Object$assign({ + newStateOffset: r.uint16, + // convert offset to stateArray index + newState: function newState(t) { + return (t.newStateOffset - (t.parent.stateArray.base - t.parent._startOffset)) / t.parent.nClasses; + }, + flags: r.uint16 + }, entryData); + + var Entry = new r.Struct(entry); + var StateArray = new UnboundedArray(new r.Array(r.uint8, function (t) { + return t.nClasses; + })); + + var StateHeader1 = new r.Struct({ + nClasses: r.uint16, + classTable: new r.Pointer(r.uint16, ClassLookupTable), + stateArray: new r.Pointer(r.uint16, StateArray), + entryTable: new r.Pointer(r.uint16, new UnboundedArray(Entry)) + }); + + return StateHeader1; +} + +var BslnSubtable = new r.VersionedStruct('format', { + 0: { // Distance-based, no mapping + deltas: new r.Array(r.int16, 32) + }, + + 1: { // Distance-based, with mapping + deltas: new r.Array(r.int16, 32), + mappingData: new LookupTable(r.uint16) + }, + + 2: { // Control point-based, no mapping + standardGlyph: r.uint16, + controlPoints: new r.Array(r.uint16, 32) + }, + + 3: { // Control point-based, with mapping + standardGlyph: r.uint16, + controlPoints: new r.Array(r.uint16, 32), + mappingData: new LookupTable(r.uint16) + } +}); + +var bsln = new r.Struct({ + version: r.fixed32, + format: r.uint16, + defaultBaseline: r.uint16, + subtable: BslnSubtable +}); + +var Setting = new r.Struct({ + setting: r.uint16, + nameIndex: r.int16, + name: function name(t) { + return t.parent.parent.parent.name.records.fontFeatures[t.nameIndex]; + } +}); + +var FeatureName = new r.Struct({ + feature: r.uint16, + nSettings: r.uint16, + settingTable: new r.Pointer(r.uint32, new r.Array(Setting, 'nSettings'), { type: 'parent' }), + featureFlags: new r.Bitfield(r.uint8, [null, null, null, null, null, null, 'hasDefault', 'exclusive']), + defaultSetting: r.uint8, + nameIndex: r.int16, + name: function name(t) { + return t.parent.parent.name.records.fontFeatures[t.nameIndex]; + } +}); + +var feat = new r.Struct({ + version: r.fixed32, + featureNameCount: r.uint16, + reserved1: new r.Reserved(r.uint16), + reserved2: new r.Reserved(r.uint32), + featureNames: new r.Array(FeatureName, 'featureNameCount') +}); + +var Axis$1 = new r.Struct({ + axisTag: new r.String(4), + minValue: r.fixed32, + defaultValue: r.fixed32, + maxValue: r.fixed32, + flags: r.uint16, + nameID: r.uint16, + name: function name(t) { + return t.parent.parent.name.records.fontFeatures[t.nameID]; + } +}); + +var Instance = new r.Struct({ + nameID: r.uint16, + name: function name(t) { + return t.parent.parent.name.records.fontFeatures[t.nameID]; + }, + flags: r.uint16, + coord: new r.Array(r.fixed32, function (t) { + return t.parent.axisCount; + }) +}); + +var fvar = new r.Struct({ + version: r.fixed32, + offsetToData: r.uint16, + countSizePairs: r.uint16, + axisCount: r.uint16, + axisSize: r.uint16, + instanceCount: r.uint16, + instanceSize: r.uint16, + axis: new r.Array(Axis$1, 'axisCount'), + instance: new r.Array(Instance, 'instanceCount') +}); + +var shortFrac$1 = new r.Fixed(16, 'BE', 14); + +var Offset = function () { + function Offset() { + _classCallCheck(this, Offset); + } + + Offset.decode = function decode(stream, parent) { + // In short format, offsets are multiplied by 2. + // This doesn't seem to be documented by Apple, but it + // is implemented this way in Freetype. + return parent.flags ? stream.readUInt32BE() : stream.readUInt16BE() * 2; + }; + + return Offset; +}(); + +var gvar = new r.Struct({ + version: r.uint16, + reserved: new r.Reserved(r.uint16), + axisCount: r.uint16, + globalCoordCount: r.uint16, + globalCoords: new r.Pointer(r.uint32, new r.Array(new r.Array(shortFrac$1, 'axisCount'), 'globalCoordCount')), + glyphCount: r.uint16, + flags: r.uint16, + offsetToData: r.uint32, + offsets: new r.Array(new r.Pointer(Offset, 'void', { relativeTo: 'offsetToData', allowNull: false }), function (t) { + return t.glyphCount + 1; + }) +}); + +var ClassTable$1 = new r.Struct({ + length: r.uint16, + coverage: r.uint16, + subFeatureFlags: r.uint32, + stateTable: new StateTable1() +}); + +var WidthDeltaRecord = new r.Struct({ + justClass: r.uint32, + beforeGrowLimit: r.fixed32, + beforeShrinkLimit: r.fixed32, + afterGrowLimit: r.fixed32, + afterShrinkLimit: r.fixed32, + growFlags: r.uint16, + shrinkFlags: r.uint16 +}); + +var WidthDeltaCluster = new r.Array(WidthDeltaRecord, r.uint32); + +var ActionData = new r.VersionedStruct('actionType', { + 0: { // Decomposition action + lowerLimit: r.fixed32, + upperLimit: r.fixed32, + order: r.uint16, + glyphs: new r.Array(r.uint16, r.uint16) + }, + + 1: { // Unconditional add glyph action + addGlyph: r.uint16 + }, + + 2: { // Conditional add glyph action + substThreshold: r.fixed32, + addGlyph: r.uint16, + substGlyph: r.uint16 + }, + + 3: {}, // Stretch glyph action (no data, not supported by CoreText) + + 4: { // Ductile glyph action (not supported by CoreText) + variationAxis: r.uint32, + minimumLimit: r.fixed32, + noStretchValue: r.fixed32, + maximumLimit: r.fixed32 + }, + + 5: { // Repeated add glyph action + flags: r.uint16, + glyph: r.uint16 + } +}); + +var Action = new r.Struct({ + actionClass: r.uint16, + actionType: r.uint16, + actionLength: r.uint32, + actionData: ActionData, + padding: new r.Reserved(r.uint8, function (t) { + return t.actionLength - t._currentOffset; + }) +}); + +var PostcompensationAction = new r.Array(Action, r.uint32); +var PostCompensationTable = new r.Struct({ + lookupTable: new LookupTable(new r.Pointer(r.uint16, PostcompensationAction)) +}); + +var JustificationTable = new r.Struct({ + classTable: new r.Pointer(r.uint16, ClassTable$1, { type: 'parent' }), + wdcOffset: r.uint16, + postCompensationTable: new r.Pointer(r.uint16, PostCompensationTable, { type: 'parent' }), + widthDeltaClusters: new LookupTable(new r.Pointer(r.uint16, WidthDeltaCluster, { type: 'parent', relativeTo: 'wdcOffset' })) +}); + +var just = new r.Struct({ + version: r.uint32, + format: r.uint16, + horizontal: new r.Pointer(r.uint16, JustificationTable), + vertical: new r.Pointer(r.uint16, JustificationTable) +}); + +var LigatureData = { + action: r.uint16 +}; + +var ContextualData = { + markIndex: r.uint16, + currentIndex: r.uint16 +}; + +var InsertionData = { + currentInsertIndex: r.uint16, + markedInsertIndex: r.uint16 +}; + +var SubstitutionTable = new r.Struct({ + items: new UnboundedArray(new r.Pointer(r.uint32, new LookupTable())) +}); + +var SubtableData = new r.VersionedStruct('type', { + 0: { // Indic Rearrangement Subtable + stateTable: new StateTable() + }, + + 1: { // Contextual Glyph Substitution Subtable + stateTable: new StateTable(ContextualData), + substitutionTable: new r.Pointer(r.uint32, SubstitutionTable) + }, + + 2: { // Ligature subtable + stateTable: new StateTable(LigatureData), + ligatureActions: new r.Pointer(r.uint32, new UnboundedArray(r.uint32)), + components: new r.Pointer(r.uint32, new UnboundedArray(r.uint16)), + ligatureList: new r.Pointer(r.uint32, new UnboundedArray(r.uint16)) + }, + + 4: { // Non-contextual Glyph Substitution Subtable + lookupTable: new LookupTable() + }, + + 5: { // Glyph Insertion Subtable + stateTable: new StateTable(InsertionData), + insertionActions: new r.Pointer(r.uint32, new UnboundedArray(r.uint16)) + } +}); + +var Subtable = new r.Struct({ + length: r.uint32, + coverage: r.uint24, + type: r.uint8, + subFeatureFlags: r.uint32, + table: SubtableData, + padding: new r.Reserved(r.uint8, function (t) { + return t.length - t._currentOffset; + }) +}); + +var FeatureEntry = new r.Struct({ + featureType: r.uint16, + featureSetting: r.uint16, + enableFlags: r.uint32, + disableFlags: r.uint32 +}); + +var MorxChain = new r.Struct({ + defaultFlags: r.uint32, + chainLength: r.uint32, + nFeatureEntries: r.uint32, + nSubtables: r.uint32, + features: new r.Array(FeatureEntry, 'nFeatureEntries'), + subtables: new r.Array(Subtable, 'nSubtables') +}); + +var morx = new r.Struct({ + version: r.uint16, + unused: new r.Reserved(r.uint16), + nChains: r.uint32, + chains: new r.Array(MorxChain, 'nChains') +}); + +var OpticalBounds = new r.Struct({ + left: r.int16, + top: r.int16, + right: r.int16, + bottom: r.int16 +}); + +var opbd = new r.Struct({ + version: r.fixed32, + format: r.uint16, + lookupTable: new LookupTable(OpticalBounds) +}); + +var tables = {}; +// Required Tables +tables.cmap = cmap; +tables.head = head; +tables.hhea = hhea; +tables.hmtx = hmtx; +tables.maxp = maxp; +tables.name = NameTable; +tables['OS/2'] = OS2; +tables.post = post; + +// TrueType Outlines +tables.fpgm = fpgm; +tables.loca = loca; +tables.prep = prep; +tables['cvt '] = cvt; +tables.glyf = glyf; + +// PostScript Outlines +tables['CFF '] = CFFFont; +tables['CFF2'] = CFFFont; +tables.VORG = VORG; + +// Bitmap Glyphs +tables.EBLC = EBLC; +tables.CBLC = tables.EBLC; +tables.sbix = sbix; +tables.COLR = COLR; +tables.CPAL = CPAL; + +// Advanced OpenType Tables +tables.BASE = BASE; +tables.GDEF = GDEF; +tables.GPOS = GPOS; +tables.GSUB = GSUB; +tables.JSTF = JSTF; + +// OpenType variations tables +tables.HVAR = HVAR; + +// Other OpenType Tables +tables.DSIG = DSIG; +tables.gasp = gasp; +tables.hdmx = hdmx; +tables.kern = kern; +tables.LTSH = LTSH; +tables.PCLT = PCLT; +tables.VDMX = VDMX; +tables.vhea = vhea; +tables.vmtx = vmtx; + +// Apple Advanced Typography Tables +tables.avar = avar; +tables.bsln = bsln; +tables.feat = feat; +tables.fvar = fvar; +tables.gvar = gvar; +tables.just = just; +tables.morx = morx; +tables.opbd = opbd; + +var TableEntry = new r.Struct({ + tag: new r.String(4), + checkSum: r.uint32, + offset: new r.Pointer(r.uint32, 'void', { type: 'global' }), + length: r.uint32 +}); + +var Directory = new r.Struct({ + tag: new r.String(4), + numTables: r.uint16, + searchRange: r.uint16, + entrySelector: r.uint16, + rangeShift: r.uint16, + tables: new r.Array(TableEntry, 'numTables') +}); + +Directory.process = function () { + var tables = {}; + for (var _iterator = this.tables, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var table = _ref; + + tables[table.tag] = table; + } + + this.tables = tables; +}; + +Directory.preEncode = function (stream) { + var tables$$ = []; + for (var tag in this.tables) { + var table = this.tables[tag]; + if (table) { + tables$$.push({ + tag: tag, + checkSum: 0, + offset: new r.VoidPointer(tables[tag], table), + length: tables[tag].size(table) + }); + } + } + + this.tag = 'true'; + this.numTables = tables$$.length; + this.tables = tables$$; + + this.searchRange = Math.floor(Math.log(this.numTables) / Math.LN2) * 16; + this.entrySelector = Math.floor(this.searchRange / Math.LN2); + this.rangeShift = this.numTables * 16 - this.searchRange; +}; + +function binarySearch(arr, cmp) { + var min = 0; + var max = arr.length - 1; + while (min <= max) { + var mid = min + max >> 1; + var res = cmp(arr[mid]); + + if (res < 0) { + max = mid - 1; + } else if (res > 0) { + min = mid + 1; + } else { + return mid; + } + } + + return -1; +} + +function range(index, end) { + var range = []; + while (index < end) { + range.push(index++); + } + return range; +} + +var _class$1; +function _applyDecoratedDescriptor$1(target, property, decorators, descriptor, context) { + var desc = {}; + Object['ke' + 'ys'](descriptor).forEach(function (key) { + desc[key] = descriptor[key]; + }); + desc.enumerable = !!desc.enumerable; + desc.configurable = !!desc.configurable; + + if ('value' in desc || desc.initializer) { + desc.writable = true; + } + + desc = decorators.slice().reverse().reduce(function (desc, decorator) { + return decorator(target, property, desc) || desc; + }, desc); + + if (context && desc.initializer !== void 0) { + desc.value = desc.initializer ? desc.initializer.call(context) : void 0; + desc.initializer = undefined; + } + + if (desc.initializer === void 0) { + Object['define' + 'Property'](target, property, desc); + desc = null; + } + + return desc; +} + +// iconv-lite is an optional dependency. +try { + var iconv = require('iconv-lite'); +} catch (err) {} + +var CmapProcessor = (_class$1 = function () { + function CmapProcessor(cmapTable) { + _classCallCheck(this, CmapProcessor); + + // Attempt to find a Unicode cmap first + this.encoding = null; + this.cmap = this.findSubtable(cmapTable, [ + // 32-bit subtables + [3, 10], [0, 6], [0, 4], + + // 16-bit subtables + [3, 1], [0, 3], [0, 2], [0, 1], [0, 0]]); + + // If not unicode cmap was found, and iconv-lite is installed, + // take the first table with a supported encoding. + if (!this.cmap && iconv) { + for (var _iterator = cmapTable.tables, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var cmap = _ref; + + var encoding = getEncoding(cmap.platformID, cmap.encodingID, cmap.table.language - 1); + if (iconv.encodingExists(encoding)) { + this.cmap = cmap.table; + this.encoding = encoding; + } + } + } + + if (!this.cmap) { + throw new Error("Could not find a supported cmap table"); + } + + this.uvs = this.findSubtable(cmapTable, [[0, 5]]); + if (this.uvs && this.uvs.version !== 14) { + this.uvs = null; + } + } + + CmapProcessor.prototype.findSubtable = function findSubtable(cmapTable, pairs) { + for (var _iterator2 = pairs, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _getIterator(_iterator2);;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var _ref3 = _ref2, + platformID = _ref3[0], + encodingID = _ref3[1]; + + for (var _iterator3 = cmapTable.tables, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _getIterator(_iterator3);;) { + var _ref4; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref4 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref4 = _i3.value; + } + + var cmap = _ref4; + + if (cmap.platformID === platformID && cmap.encodingID === encodingID) { + return cmap.table; + } + } + } + + return null; + }; + + CmapProcessor.prototype.lookup = function lookup(codepoint, variationSelector) { + // If there is no Unicode cmap in this font, we need to re-encode + // the codepoint in the encoding that the cmap supports. + if (this.encoding) { + var buf = iconv.encode(_String$fromCodePoint(codepoint), this.encoding); + codepoint = 0; + for (var i = 0; i < buf.length; i++) { + codepoint = codepoint << 8 | buf[i]; + } + + // Otherwise, try to get a Unicode variation selector for this codepoint if one is provided. + } else if (variationSelector) { + var gid = this.getVariationSelector(codepoint, variationSelector); + if (gid) { + return gid; + } + } + + var cmap = this.cmap; + switch (cmap.version) { + case 0: + return cmap.codeMap.get(codepoint) || 0; + + case 4: + { + var min = 0; + var max = cmap.segCount - 1; + while (min <= max) { + var mid = min + max >> 1; + + if (codepoint < cmap.startCode.get(mid)) { + max = mid - 1; + } else if (codepoint > cmap.endCode.get(mid)) { + min = mid + 1; + } else { + var rangeOffset = cmap.idRangeOffset.get(mid); + var _gid = void 0; + + if (rangeOffset === 0) { + _gid = codepoint + cmap.idDelta.get(mid); + } else { + var index = rangeOffset / 2 + (codepoint - cmap.startCode.get(mid)) - (cmap.segCount - mid); + _gid = cmap.glyphIndexArray.get(index) || 0; + if (_gid !== 0) { + _gid += cmap.idDelta.get(mid); + } + } + + return _gid & 0xffff; + } + } + + return 0; + } + + case 8: + throw new Error('TODO: cmap format 8'); + + case 6: + case 10: + return cmap.glyphIndices.get(codepoint - cmap.firstCode) || 0; + + case 12: + case 13: + { + var _min = 0; + var _max = cmap.nGroups - 1; + while (_min <= _max) { + var _mid = _min + _max >> 1; + var group = cmap.groups.get(_mid); + + if (codepoint < group.startCharCode) { + _max = _mid - 1; + } else if (codepoint > group.endCharCode) { + _min = _mid + 1; + } else { + if (cmap.version === 12) { + return group.glyphID + (codepoint - group.startCharCode); + } else { + return group.glyphID; + } + } + } + + return 0; + } + + case 14: + throw new Error('TODO: cmap format 14'); + + default: + throw new Error('Unknown cmap format ' + cmap.version); + } + }; + + CmapProcessor.prototype.getVariationSelector = function getVariationSelector(codepoint, variationSelector) { + if (!this.uvs) { + return 0; + } + + var selectors = this.uvs.varSelectors.toArray(); + var i = binarySearch(selectors, function (x) { + return variationSelector - x.varSelector; + }); + var sel = selectors[i]; + + if (i !== -1 && sel.defaultUVS) { + i = binarySearch(sel.defaultUVS, function (x) { + return codepoint < x.startUnicodeValue ? -1 : codepoint > x.startUnicodeValue + x.additionalCount ? +1 : 0; + }); + } + + if (i !== -1 && sel.nonDefaultUVS) { + i = binarySearch(sel.nonDefaultUVS, function (x) { + return codepoint - x.unicodeValue; + }); + if (i !== -1) { + return sel.nonDefaultUVS[i].glyphID; + } + } + + return 0; + }; + + CmapProcessor.prototype.getCharacterSet = function getCharacterSet() { + var cmap = this.cmap; + switch (cmap.version) { + case 0: + return range(0, cmap.codeMap.length); + + case 4: + { + var res = []; + var endCodes = cmap.endCode.toArray(); + for (var i = 0; i < endCodes.length; i++) { + var tail = endCodes[i] + 1; + var start = cmap.startCode.get(i); + res.push.apply(res, range(start, tail)); + } + + return res; + } + + case 8: + throw new Error('TODO: cmap format 8'); + + case 6: + case 10: + return range(cmap.firstCode, cmap.firstCode + cmap.glyphIndices.length); + + case 12: + case 13: + { + var _res = []; + for (var _iterator4 = cmap.groups.toArray(), _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _getIterator(_iterator4);;) { + var _ref5; + + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref5 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref5 = _i4.value; + } + + var group = _ref5; + + _res.push.apply(_res, range(group.startCharCode, group.endCharCode + 1)); + } + + return _res; + } + + case 14: + throw new Error('TODO: cmap format 14'); + + default: + throw new Error('Unknown cmap format ' + cmap.version); + } + }; + + CmapProcessor.prototype.codePointsForGlyph = function codePointsForGlyph(gid) { + var cmap = this.cmap; + switch (cmap.version) { + case 0: + { + var res = []; + for (var i = 0; i < 256; i++) { + if (cmap.codeMap.get(i) === gid) { + res.push(i); + } + } + + return res; + } + + case 4: + { + var _res2 = []; + for (var _i5 = 0; _i5 < cmap.segCount; _i5++) { + var end = cmap.endCode.get(_i5); + var start = cmap.startCode.get(_i5); + var rangeOffset = cmap.idRangeOffset.get(_i5); + var delta = cmap.idDelta.get(_i5); + + for (var c = start; c <= end; c++) { + var g = 0; + if (rangeOffset === 0) { + g = c + delta; + } else { + var index = rangeOffset / 2 + (c - start) - (cmap.segCount - _i5); + g = cmap.glyphIndexArray.get(index) || 0; + if (g !== 0) { + g += delta; + } + } + + if (g === gid) { + _res2.push(c); + } + } + } + + return _res2; + } + + case 12: + { + var _res3 = []; + for (var _iterator5 = cmap.groups.toArray(), _isArray5 = Array.isArray(_iterator5), _i6 = 0, _iterator5 = _isArray5 ? _iterator5 : _getIterator(_iterator5);;) { + var _ref6; + + if (_isArray5) { + if (_i6 >= _iterator5.length) break; + _ref6 = _iterator5[_i6++]; + } else { + _i6 = _iterator5.next(); + if (_i6.done) break; + _ref6 = _i6.value; + } + + var group = _ref6; + + if (gid >= group.glyphID && gid <= group.glyphID + (group.endCharCode - group.startCharCode)) { + _res3.push(group.startCharCode + (gid - group.glyphID)); + } + } + + return _res3; + } + + case 13: + { + var _res4 = []; + for (var _iterator6 = cmap.groups.toArray(), _isArray6 = Array.isArray(_iterator6), _i7 = 0, _iterator6 = _isArray6 ? _iterator6 : _getIterator(_iterator6);;) { + var _ref7; + + if (_isArray6) { + if (_i7 >= _iterator6.length) break; + _ref7 = _iterator6[_i7++]; + } else { + _i7 = _iterator6.next(); + if (_i7.done) break; + _ref7 = _i7.value; + } + + var _group = _ref7; + + if (gid === _group.glyphID) { + _res4.push.apply(_res4, range(_group.startCharCode, _group.endCharCode + 1)); + } + } + + return _res4; + } + + default: + throw new Error('Unknown cmap format ' + cmap.version); + } + }; + + return CmapProcessor; +}(), (_applyDecoratedDescriptor$1(_class$1.prototype, 'getCharacterSet', [cache], _Object$getOwnPropertyDescriptor(_class$1.prototype, 'getCharacterSet'), _class$1.prototype), _applyDecoratedDescriptor$1(_class$1.prototype, 'codePointsForGlyph', [cache], _Object$getOwnPropertyDescriptor(_class$1.prototype, 'codePointsForGlyph'), _class$1.prototype)), _class$1); + +var KernProcessor = function () { + function KernProcessor(font) { + _classCallCheck(this, KernProcessor); + + this.kern = font.kern; + } + + KernProcessor.prototype.process = function process(glyphs, positions) { + for (var glyphIndex = 0; glyphIndex < glyphs.length - 1; glyphIndex++) { + var left = glyphs[glyphIndex].id; + var right = glyphs[glyphIndex + 1].id; + positions[glyphIndex].xAdvance += this.getKerning(left, right); + } + }; + + KernProcessor.prototype.getKerning = function getKerning(left, right) { + var res = 0; + + for (var _iterator = this.kern.tables, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var table = _ref; + + if (table.coverage.crossStream) { + continue; + } + + switch (table.version) { + case 0: + if (!table.coverage.horizontal) { + continue; + } + + break; + case 1: + if (table.coverage.vertical || table.coverage.variation) { + continue; + } + + break; + default: + throw new Error('Unsupported kerning table version ' + table.version); + } + + var val = 0; + var s = table.subtable; + switch (table.format) { + case 0: + var pairIdx = binarySearch(s.pairs, function (pair) { + return left - pair.left || right - pair.right; + }); + + if (pairIdx >= 0) { + val = s.pairs[pairIdx].value; + } + + break; + + case 2: + var leftOffset = 0, + rightOffset = 0; + if (left >= s.leftTable.firstGlyph && left < s.leftTable.firstGlyph + s.leftTable.nGlyphs) { + leftOffset = s.leftTable.offsets[left - s.leftTable.firstGlyph]; + } else { + leftOffset = s.array.off; + } + + if (right >= s.rightTable.firstGlyph && right < s.rightTable.firstGlyph + s.rightTable.nGlyphs) { + rightOffset = s.rightTable.offsets[right - s.rightTable.firstGlyph]; + } + + var index = (leftOffset + rightOffset - s.array.off) / 2; + val = s.array.values.get(index); + break; + + case 3: + if (left >= s.glyphCount || right >= s.glyphCount) { + return 0; + } + + val = s.kernValue[s.kernIndex[s.leftClass[left] * s.rightClassCount + s.rightClass[right]]]; + break; + + default: + throw new Error('Unsupported kerning sub-table format ' + table.format); + } + + // Microsoft supports the override flag, which resets the result + // Otherwise, the sum of the results from all subtables is returned + if (table.coverage.override) { + res = val; + } else { + res += val; + } + } + + return res; + }; + + return KernProcessor; +}(); + +/** + * This class is used when GPOS does not define 'mark' or 'mkmk' features + * for positioning marks relative to base glyphs. It uses the unicode + * combining class property to position marks. + * + * Based on code from Harfbuzz, thanks! + * https://github.com/behdad/harfbuzz/blob/master/src/hb-ot-shape-fallback.cc + */ + +var UnicodeLayoutEngine = function () { + function UnicodeLayoutEngine(font) { + _classCallCheck(this, UnicodeLayoutEngine); + + this.font = font; + } + + UnicodeLayoutEngine.prototype.positionGlyphs = function positionGlyphs(glyphs, positions) { + // find each base + mark cluster, and position the marks relative to the base + var clusterStart = 0; + var clusterEnd = 0; + for (var index = 0; index < glyphs.length; index++) { + var glyph = glyphs[index]; + if (glyph.isMark) { + // TODO: handle ligatures + clusterEnd = index; + } else { + if (clusterStart !== clusterEnd) { + this.positionCluster(glyphs, positions, clusterStart, clusterEnd); + } + + clusterStart = clusterEnd = index; + } + } + + if (clusterStart !== clusterEnd) { + this.positionCluster(glyphs, positions, clusterStart, clusterEnd); + } + + return positions; + }; + + UnicodeLayoutEngine.prototype.positionCluster = function positionCluster(glyphs, positions, clusterStart, clusterEnd) { + var base = glyphs[clusterStart]; + var baseBox = base.cbox.copy(); + + // adjust bounding box for ligature glyphs + if (base.codePoints.length > 1) { + // LTR. TODO: RTL support. + baseBox.minX += (base.codePoints.length - 1) * baseBox.width / base.codePoints.length; + } + + var xOffset = -positions[clusterStart].xAdvance; + var yOffset = 0; + var yGap = this.font.unitsPerEm / 16; + + // position each of the mark glyphs relative to the base glyph + for (var index = clusterStart + 1; index <= clusterEnd; index++) { + var mark = glyphs[index]; + var markBox = mark.cbox; + var position = positions[index]; + + var combiningClass = this.getCombiningClass(mark.codePoints[0]); + + if (combiningClass !== 'Not_Reordered') { + position.xOffset = position.yOffset = 0; + + // x positioning + switch (combiningClass) { + case 'Double_Above': + case 'Double_Below': + // LTR. TODO: RTL support. + position.xOffset += baseBox.minX - markBox.width / 2 - markBox.minX; + break; + + case 'Attached_Below_Left': + case 'Below_Left': + case 'Above_Left': + // left align + position.xOffset += baseBox.minX - markBox.minX; + break; + + case 'Attached_Above_Right': + case 'Below_Right': + case 'Above_Right': + // right align + position.xOffset += baseBox.maxX - markBox.width - markBox.minX; + break; + + default: + // Attached_Below, Attached_Above, Below, Above, other + // center align + position.xOffset += baseBox.minX + (baseBox.width - markBox.width) / 2 - markBox.minX; + } + + // y positioning + switch (combiningClass) { + case 'Double_Below': + case 'Below_Left': + case 'Below': + case 'Below_Right': + case 'Attached_Below_Left': + case 'Attached_Below': + // add a small gap between the glyphs if they are not attached + if (combiningClass === 'Attached_Below_Left' || combiningClass === 'Attached_Below') { + baseBox.minY += yGap; + } + + position.yOffset = -baseBox.minY - markBox.maxY; + baseBox.minY += markBox.height; + break; + + case 'Double_Above': + case 'Above_Left': + case 'Above': + case 'Above_Right': + case 'Attached_Above': + case 'Attached_Above_Right': + // add a small gap between the glyphs if they are not attached + if (combiningClass === 'Attached_Above' || combiningClass === 'Attached_Above_Right') { + baseBox.maxY += yGap; + } + + position.yOffset = baseBox.maxY - markBox.minY; + baseBox.maxY += markBox.height; + break; + } + + position.xAdvance = position.yAdvance = 0; + position.xOffset += xOffset; + position.yOffset += yOffset; + } else { + xOffset -= position.xAdvance; + yOffset -= position.yAdvance; + } + } + + return; + }; + + UnicodeLayoutEngine.prototype.getCombiningClass = function getCombiningClass(codePoint) { + var combiningClass = unicode.getCombiningClass(codePoint); + + // Thai / Lao need some per-character work + if ((codePoint & ~0xff) === 0x0e00) { + if (combiningClass === 'Not_Reordered') { + switch (codePoint) { + case 0x0e31: + case 0x0e34: + case 0x0e35: + case 0x0e36: + case 0x0e37: + case 0x0e47: + case 0x0e4c: + case 0x0e3d: + case 0x0e4e: + return 'Above_Right'; + + case 0x0eb1: + case 0x0eb4: + case 0x0eb5: + case 0x0eb6: + case 0x0eb7: + case 0x0ebb: + case 0x0ecc: + case 0x0ecd: + return 'Above'; + + case 0x0ebc: + return 'Below'; + } + } else if (codePoint === 0x0e3a) { + // virama + return 'Below_Right'; + } + } + + switch (combiningClass) { + // Hebrew + + case 'CCC10': // sheva + case 'CCC11': // hataf segol + case 'CCC12': // hataf patah + case 'CCC13': // hataf qamats + case 'CCC14': // hiriq + case 'CCC15': // tsere + case 'CCC16': // segol + case 'CCC17': // patah + case 'CCC18': // qamats + case 'CCC20': // qubuts + case 'CCC22': + // meteg + return 'Below'; + + case 'CCC23': + // rafe + return 'Attached_Above'; + + case 'CCC24': + // shin dot + return 'Above_Right'; + + case 'CCC25': // sin dot + case 'CCC19': + // holam + return 'Above_Left'; + + case 'CCC26': + // point varika + return 'Above'; + + case 'CCC21': + // dagesh + break; + + // Arabic and Syriac + + case 'CCC27': // fathatan + case 'CCC28': // dammatan + case 'CCC30': // fatha + case 'CCC31': // damma + case 'CCC33': // shadda + case 'CCC34': // sukun + case 'CCC35': // superscript alef + case 'CCC36': + // superscript alaph + return 'Above'; + + case 'CCC29': // kasratan + case 'CCC32': + // kasra + return 'Below'; + + // Thai + + case 'CCC103': + // sara u / sara uu + return 'Below_Right'; + + case 'CCC107': + // mai + return 'Above_Right'; + + // Lao + + case 'CCC118': + // sign u / sign uu + return 'Below'; + + case 'CCC122': + // mai + return 'Above'; + + // Tibetan + + case 'CCC129': // sign aa + case 'CCC132': + // sign u + return 'Below'; + + case 'CCC130': + // sign i + return 'Above'; + } + + return combiningClass; + }; + + return UnicodeLayoutEngine; +}(); + +/** + * Represents a glyph bounding box + */ +var BBox = function () { + function BBox() { + var minX = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Infinity; + var minY = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Infinity; + var maxX = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : -Infinity; + var maxY = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : -Infinity; + + _classCallCheck(this, BBox); + + /** + * The minimum X position in the bounding box + * @type {number} + */ + this.minX = minX; + + /** + * The minimum Y position in the bounding box + * @type {number} + */ + this.minY = minY; + + /** + * The maxmimum X position in the bounding box + * @type {number} + */ + this.maxX = maxX; + + /** + * The maxmimum Y position in the bounding box + * @type {number} + */ + this.maxY = maxY; + } + + /** + * The width of the bounding box + * @type {number} + */ + + + BBox.prototype.addPoint = function addPoint(x, y) { + if (x < this.minX) { + this.minX = x; + } + + if (y < this.minY) { + this.minY = y; + } + + if (x > this.maxX) { + this.maxX = x; + } + + if (y > this.maxY) { + this.maxY = y; + } + }; + + BBox.prototype.copy = function copy() { + return new BBox(this.minX, this.minY, this.maxX, this.maxY); + }; + + _createClass(BBox, [{ + key: "width", + get: function get() { + return this.maxX - this.minX; + } + + /** + * The height of the bounding box + * @type {number} + */ + + }, { + key: "height", + get: function get() { + return this.maxY - this.minY; + } + }]); + + return BBox; +}(); + +/** + * Represents a run of Glyph and GlyphPosition objects. + * Returned by the font layout method. + */ + +var GlyphRun = function () { + function GlyphRun(glyphs, positions) { + _classCallCheck(this, GlyphRun); + + /** + * An array of Glyph objects in the run + * @type {Glyph[]} + */ + this.glyphs = glyphs; + + /** + * An array of GlyphPosition objects for each glyph in the run + * @type {GlyphPosition[]} + */ + this.positions = positions; + } + + /** + * The total advance width of the run. + * @type {number} + */ + + + _createClass(GlyphRun, [{ + key: 'advanceWidth', + get: function get() { + var width = 0; + for (var _iterator = this.positions, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var position = _ref; + + width += position.xAdvance; + } + + return width; + } + + /** + * The total advance height of the run. + * @type {number} + */ + + }, { + key: 'advanceHeight', + get: function get() { + var height = 0; + for (var _iterator2 = this.positions, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _getIterator(_iterator2);;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var position = _ref2; + + height += position.yAdvance; + } + + return height; + } + + /** + * The bounding box containing all glyphs in the run. + * @type {BBox} + */ + + }, { + key: 'bbox', + get: function get() { + var bbox = new BBox(); + + var x = 0; + var y = 0; + for (var index = 0; index < this.glyphs.length; index++) { + var glyph = this.glyphs[index]; + var p = this.positions[index]; + var b = glyph.bbox; + + bbox.addPoint(b.minX + x + p.xOffset, b.minY + y + p.yOffset); + bbox.addPoint(b.maxX + x + p.xOffset, b.maxY + y + p.yOffset); + + x += p.xAdvance; + y += p.yAdvance; + } + + return bbox; + } + }]); + + return GlyphRun; +}(); + +/** + * Represents positioning information for a glyph in a GlyphRun. + */ +var GlyphPosition = function GlyphPosition() { + var xAdvance = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; + var yAdvance = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + var xOffset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; + var yOffset = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + + _classCallCheck(this, GlyphPosition); + + /** + * The amount to move the virtual pen in the X direction after rendering this glyph. + * @type {number} + */ + this.xAdvance = xAdvance; + + /** + * The amount to move the virtual pen in the Y direction after rendering this glyph. + * @type {number} + */ + this.yAdvance = yAdvance; + + /** + * The offset from the pen position in the X direction at which to render this glyph. + * @type {number} + */ + this.xOffset = xOffset; + + /** + * The offset from the pen position in the Y direction at which to render this glyph. + * @type {number} + */ + this.yOffset = yOffset; +}; + +// This maps the Unicode Script property to an OpenType script tag +// Data from http://www.microsoft.com/typography/otspec/scripttags.htm +// and http://www.unicode.org/Public/UNIDATA/PropertyValueAliases.txt. +var UNICODE_SCRIPTS = { + Caucasian_Albanian: 'aghb', + Arabic: 'arab', + Imperial_Aramaic: 'armi', + Armenian: 'armn', + Avestan: 'avst', + Balinese: 'bali', + Bamum: 'bamu', + Bassa_Vah: 'bass', + Batak: 'batk', + Bengali: ['bng2', 'beng'], + Bopomofo: 'bopo', + Brahmi: 'brah', + Braille: 'brai', + Buginese: 'bugi', + Buhid: 'buhd', + Chakma: 'cakm', + Canadian_Aboriginal: 'cans', + Carian: 'cari', + Cham: 'cham', + Cherokee: 'cher', + Coptic: 'copt', + Cypriot: 'cprt', + Cyrillic: 'cyrl', + Devanagari: ['dev2', 'deva'], + Deseret: 'dsrt', + Duployan: 'dupl', + Egyptian_Hieroglyphs: 'egyp', + Elbasan: 'elba', + Ethiopic: 'ethi', + Georgian: 'geor', + Glagolitic: 'glag', + Gothic: 'goth', + Grantha: 'gran', + Greek: 'grek', + Gujarati: ['gjr2', 'gujr'], + Gurmukhi: ['gur2', 'guru'], + Hangul: 'hang', + Han: 'hani', + Hanunoo: 'hano', + Hebrew: 'hebr', + Hiragana: 'hira', + Pahawh_Hmong: 'hmng', + Katakana_Or_Hiragana: 'hrkt', + Old_Italic: 'ital', + Javanese: 'java', + Kayah_Li: 'kali', + Katakana: 'kana', + Kharoshthi: 'khar', + Khmer: 'khmr', + Khojki: 'khoj', + Kannada: ['knd2', 'knda'], + Kaithi: 'kthi', + Tai_Tham: 'lana', + Lao: 'lao ', + Latin: 'latn', + Lepcha: 'lepc', + Limbu: 'limb', + Linear_A: 'lina', + Linear_B: 'linb', + Lisu: 'lisu', + Lycian: 'lyci', + Lydian: 'lydi', + Mahajani: 'mahj', + Mandaic: 'mand', + Manichaean: 'mani', + Mende_Kikakui: 'mend', + Meroitic_Cursive: 'merc', + Meroitic_Hieroglyphs: 'mero', + Malayalam: ['mlm2', 'mlym'], + Modi: 'modi', + Mongolian: 'mong', + Mro: 'mroo', + Meetei_Mayek: 'mtei', + Myanmar: ['mym2', 'mymr'], + Old_North_Arabian: 'narb', + Nabataean: 'nbat', + Nko: 'nko ', + Ogham: 'ogam', + Ol_Chiki: 'olck', + Old_Turkic: 'orkh', + Oriya: 'orya', + Osmanya: 'osma', + Palmyrene: 'palm', + Pau_Cin_Hau: 'pauc', + Old_Permic: 'perm', + Phags_Pa: 'phag', + Inscriptional_Pahlavi: 'phli', + Psalter_Pahlavi: 'phlp', + Phoenician: 'phnx', + Miao: 'plrd', + Inscriptional_Parthian: 'prti', + Rejang: 'rjng', + Runic: 'runr', + Samaritan: 'samr', + Old_South_Arabian: 'sarb', + Saurashtra: 'saur', + Shavian: 'shaw', + Sharada: 'shrd', + Siddham: 'sidd', + Khudawadi: 'sind', + Sinhala: 'sinh', + Sora_Sompeng: 'sora', + Sundanese: 'sund', + Syloti_Nagri: 'sylo', + Syriac: 'syrc', + Tagbanwa: 'tagb', + Takri: 'takr', + Tai_Le: 'tale', + New_Tai_Lue: 'talu', + Tamil: 'taml', + Tai_Viet: 'tavt', + Telugu: ['tel2', 'telu'], + Tifinagh: 'tfng', + Tagalog: 'tglg', + Thaana: 'thaa', + Thai: 'thai', + Tibetan: 'tibt', + Tirhuta: 'tirh', + Ugaritic: 'ugar', + Vai: 'vai ', + Warang_Citi: 'wara', + Old_Persian: 'xpeo', + Cuneiform: 'xsux', + Yi: 'yi ', + Inherited: 'zinh', + Common: 'zyyy', + Unknown: 'zzzz' +}; + +function forString(string) { + var len = string.length; + var idx = 0; + while (idx < len) { + var code = string.charCodeAt(idx++); + + // Check if this is a high surrogate + if (0xd800 <= code && code <= 0xdbff && idx < len) { + var next = string.charCodeAt(idx); + + // Check if this is a low surrogate + if (0xdc00 <= next && next <= 0xdfff) { + idx++; + code = ((code & 0x3FF) << 10) + (next & 0x3FF) + 0x10000; + } + } + + var script = unicode.getScript(code); + if (script !== 'Common' && script !== 'Inherited' && script !== 'Unknown') { + return UNICODE_SCRIPTS[script]; + } + } + + return UNICODE_SCRIPTS.Unknown; +} + +function forCodePoints(codePoints) { + for (var i = 0; i < codePoints.length; i++) { + var codePoint = codePoints[i]; + var script = unicode.getScript(codePoint); + if (script !== 'Common' && script !== 'Inherited' && script !== 'Unknown') { + return UNICODE_SCRIPTS[script]; + } + } + + return UNICODE_SCRIPTS.Unknown; +} + +// The scripts in this map are written from right to left +var RTL = { + arab: true, // Arabic + hebr: true, // Hebrew + syrc: true, // Syriac + thaa: true, // Thaana + cprt: true, // Cypriot Syllabary + khar: true, // Kharosthi + phnx: true, // Phoenician + 'nko ': true, // N'Ko + lydi: true, // Lydian + avst: true, // Avestan + armi: true, // Imperial Aramaic + phli: true, // Inscriptional Pahlavi + prti: true, // Inscriptional Parthian + sarb: true, // Old South Arabian + orkh: true, // Old Turkic, Orkhon Runic + samr: true, // Samaritan + mand: true, // Mandaic, Mandaean + merc: true, // Meroitic Cursive + mero: true, // Meroitic Hieroglyphs + + // Unicode 7.0 (not listed on http://www.microsoft.com/typography/otspec/scripttags.htm) + mani: true, // Manichaean + mend: true, // Mende Kikakui + nbat: true, // Nabataean + narb: true, // Old North Arabian + palm: true, // Palmyrene + phlp: true // Psalter Pahlavi +}; + +function direction(script) { + if (RTL[script]) { + return 'rtl'; + } + + return 'ltr'; +} + +// see https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html +// and /System/Library/Frameworks/CoreText.framework/Versions/A/Headers/SFNTLayoutTypes.h on a Mac +var features = { + allTypographicFeatures: { + code: 0, + exclusive: false, + allTypeFeatures: 0 + }, + ligatures: { + code: 1, + exclusive: false, + requiredLigatures: 0, + commonLigatures: 2, + rareLigatures: 4, + // logos: 6 + rebusPictures: 8, + diphthongLigatures: 10, + squaredLigatures: 12, + abbrevSquaredLigatures: 14, + symbolLigatures: 16, + contextualLigatures: 18, + historicalLigatures: 20 + }, + cursiveConnection: { + code: 2, + exclusive: true, + unconnected: 0, + partiallyConnected: 1, + cursive: 2 + }, + letterCase: { + code: 3, + exclusive: true + }, + // upperAndLowerCase: 0 # deprecated + // allCaps: 1 # deprecated + // allLowerCase: 2 # deprecated + // smallCaps: 3 # deprecated + // initialCaps: 4 # deprecated + // initialCapsAndSmallCaps: 5 # deprecated + verticalSubstitution: { + code: 4, + exclusive: false, + substituteVerticalForms: 0 + }, + linguisticRearrangement: { + code: 5, + exclusive: false, + linguisticRearrangement: 0 + }, + numberSpacing: { + code: 6, + exclusive: true, + monospacedNumbers: 0, + proportionalNumbers: 1, + thirdWidthNumbers: 2, + quarterWidthNumbers: 3 + }, + smartSwash: { + code: 8, + exclusive: false, + wordInitialSwashes: 0, + wordFinalSwashes: 2, + // lineInitialSwashes: 4 + // lineFinalSwashes: 6 + nonFinalSwashes: 8 + }, + diacritics: { + code: 9, + exclusive: true, + showDiacritics: 0, + hideDiacritics: 1, + decomposeDiacritics: 2 + }, + verticalPosition: { + code: 10, + exclusive: true, + normalPosition: 0, + superiors: 1, + inferiors: 2, + ordinals: 3, + scientificInferiors: 4 + }, + fractions: { + code: 11, + exclusive: true, + noFractions: 0, + verticalFractions: 1, + diagonalFractions: 2 + }, + overlappingCharacters: { + code: 13, + exclusive: false, + preventOverlap: 0 + }, + typographicExtras: { + code: 14, + exclusive: false, + // hyphensToEmDash: 0 + // hyphenToEnDash: 2 + slashedZero: 4 + }, + // formInterrobang: 6 + // smartQuotes: 8 + // periodsToEllipsis: 10 + mathematicalExtras: { + code: 15, + exclusive: false, + // hyphenToMinus: 0 + // asteristoMultiply: 2 + // slashToDivide: 4 + // inequalityLigatures: 6 + // exponents: 8 + mathematicalGreek: 10 + }, + ornamentSets: { + code: 16, + exclusive: true, + noOrnaments: 0, + dingbats: 1, + piCharacters: 2, + fleurons: 3, + decorativeBorders: 4, + internationalSymbols: 5, + mathSymbols: 6 + }, + characterAlternatives: { + code: 17, + exclusive: true, + noAlternates: 0 + }, + // user defined options + designComplexity: { + code: 18, + exclusive: true, + designLevel1: 0, + designLevel2: 1, + designLevel3: 2, + designLevel4: 3, + designLevel5: 4 + }, + styleOptions: { + code: 19, + exclusive: true, + noStyleOptions: 0, + displayText: 1, + engravedText: 2, + illuminatedCaps: 3, + titlingCaps: 4, + tallCaps: 5 + }, + characterShape: { + code: 20, + exclusive: true, + traditionalCharacters: 0, + simplifiedCharacters: 1, + JIS1978Characters: 2, + JIS1983Characters: 3, + JIS1990Characters: 4, + traditionalAltOne: 5, + traditionalAltTwo: 6, + traditionalAltThree: 7, + traditionalAltFour: 8, + traditionalAltFive: 9, + expertCharacters: 10, + JIS2004Characters: 11, + hojoCharacters: 12, + NLCCharacters: 13, + traditionalNamesCharacters: 14 + }, + numberCase: { + code: 21, + exclusive: true, + lowerCaseNumbers: 0, + upperCaseNumbers: 1 + }, + textSpacing: { + code: 22, + exclusive: true, + proportionalText: 0, + monospacedText: 1, + halfWidthText: 2, + thirdWidthText: 3, + quarterWidthText: 4, + altProportionalText: 5, + altHalfWidthText: 6 + }, + transliteration: { + code: 23, + exclusive: true, + noTransliteration: 0 + }, + // hanjaToHangul: 1 + // hiraganaToKatakana: 2 + // katakanaToHiragana: 3 + // kanaToRomanization: 4 + // romanizationToHiragana: 5 + // romanizationToKatakana: 6 + // hanjaToHangulAltOne: 7 + // hanjaToHangulAltTwo: 8 + // hanjaToHangulAltThree: 9 + annotation: { + code: 24, + exclusive: true, + noAnnotation: 0, + boxAnnotation: 1, + roundedBoxAnnotation: 2, + circleAnnotation: 3, + invertedCircleAnnotation: 4, + parenthesisAnnotation: 5, + periodAnnotation: 6, + romanNumeralAnnotation: 7, + diamondAnnotation: 8, + invertedBoxAnnotation: 9, + invertedRoundedBoxAnnotation: 10 + }, + kanaSpacing: { + code: 25, + exclusive: true, + fullWidthKana: 0, + proportionalKana: 1 + }, + ideographicSpacing: { + code: 26, + exclusive: true, + fullWidthIdeographs: 0, + proportionalIdeographs: 1, + halfWidthIdeographs: 2 + }, + unicodeDecomposition: { + code: 27, + exclusive: false, + canonicalComposition: 0, + compatibilityComposition: 2, + transcodingComposition: 4 + }, + rubyKana: { + code: 28, + exclusive: false, + // noRubyKana: 0 # deprecated - use rubyKanaOff instead + // rubyKana: 1 # deprecated - use rubyKanaOn instead + rubyKana: 2 + }, + CJKSymbolAlternatives: { + code: 29, + exclusive: true, + noCJKSymbolAlternatives: 0, + CJKSymbolAltOne: 1, + CJKSymbolAltTwo: 2, + CJKSymbolAltThree: 3, + CJKSymbolAltFour: 4, + CJKSymbolAltFive: 5 + }, + ideographicAlternatives: { + code: 30, + exclusive: true, + noIdeographicAlternatives: 0, + ideographicAltOne: 1, + ideographicAltTwo: 2, + ideographicAltThree: 3, + ideographicAltFour: 4, + ideographicAltFive: 5 + }, + CJKVerticalRomanPlacement: { + code: 31, + exclusive: true, + CJKVerticalRomanCentered: 0, + CJKVerticalRomanHBaseline: 1 + }, + italicCJKRoman: { + code: 32, + exclusive: false, + // noCJKItalicRoman: 0 # deprecated - use CJKItalicRomanOff instead + // CJKItalicRoman: 1 # deprecated - use CJKItalicRomanOn instead + CJKItalicRoman: 2 + }, + caseSensitiveLayout: { + code: 33, + exclusive: false, + caseSensitiveLayout: 0, + caseSensitiveSpacing: 2 + }, + alternateKana: { + code: 34, + exclusive: false, + alternateHorizKana: 0, + alternateVertKana: 2 + }, + stylisticAlternatives: { + code: 35, + exclusive: false, + noStylisticAlternates: 0, + stylisticAltOne: 2, + stylisticAltTwo: 4, + stylisticAltThree: 6, + stylisticAltFour: 8, + stylisticAltFive: 10, + stylisticAltSix: 12, + stylisticAltSeven: 14, + stylisticAltEight: 16, + stylisticAltNine: 18, + stylisticAltTen: 20, + stylisticAltEleven: 22, + stylisticAltTwelve: 24, + stylisticAltThirteen: 26, + stylisticAltFourteen: 28, + stylisticAltFifteen: 30, + stylisticAltSixteen: 32, + stylisticAltSeventeen: 34, + stylisticAltEighteen: 36, + stylisticAltNineteen: 38, + stylisticAltTwenty: 40 + }, + contextualAlternates: { + code: 36, + exclusive: false, + contextualAlternates: 0, + swashAlternates: 2, + contextualSwashAlternates: 4 + }, + lowerCase: { + code: 37, + exclusive: true, + defaultLowerCase: 0, + lowerCaseSmallCaps: 1, + lowerCasePetiteCaps: 2 + }, + upperCase: { + code: 38, + exclusive: true, + defaultUpperCase: 0, + upperCaseSmallCaps: 1, + upperCasePetiteCaps: 2 + }, + languageTag: { // indices into ltag table + code: 39, + exclusive: true + }, + CJKRomanSpacing: { + code: 103, + exclusive: true, + halfWidthCJKRoman: 0, + proportionalCJKRoman: 1, + defaultCJKRoman: 2, + fullWidthCJKRoman: 3 + } +}; + +var feature = function feature(name, selector) { + return [features[name].code, features[name][selector]]; +}; + +var OTMapping = { + rlig: feature('ligatures', 'requiredLigatures'), + clig: feature('ligatures', 'contextualLigatures'), + dlig: feature('ligatures', 'rareLigatures'), + hlig: feature('ligatures', 'historicalLigatures'), + liga: feature('ligatures', 'commonLigatures'), + hist: feature('ligatures', 'historicalLigatures'), // ?? + + smcp: feature('lowerCase', 'lowerCaseSmallCaps'), + pcap: feature('lowerCase', 'lowerCasePetiteCaps'), + + frac: feature('fractions', 'diagonalFractions'), + dnom: feature('fractions', 'diagonalFractions'), // ?? + numr: feature('fractions', 'diagonalFractions'), // ?? + afrc: feature('fractions', 'verticalFractions'), + // aalt + // abvf, abvm, abvs, akhn, blwf, blwm, blws, cfar, cjct, cpsp, falt, isol, jalt, ljmo, mset? + // ltra, ltrm, nukt, pref, pres, pstf, psts, rand, rkrf, rphf, rtla, rtlm, size, tjmo, tnum? + // unic, vatu, vhal, vjmo, vpal, vrt2 + // dist -> trak table? + // kern, vkrn -> kern table + // lfbd + opbd + rtbd -> opbd table? + // mark, mkmk -> acnt table? + // locl -> languageTag + ltag table + + case: feature('caseSensitiveLayout', 'caseSensitiveLayout'), // also caseSensitiveSpacing + ccmp: feature('unicodeDecomposition', 'canonicalComposition'), // compatibilityComposition? + cpct: feature('CJKVerticalRomanPlacement', 'CJKVerticalRomanCentered'), // guess..., probably not given below + valt: feature('CJKVerticalRomanPlacement', 'CJKVerticalRomanCentered'), + swsh: feature('contextualAlternates', 'swashAlternates'), + cswh: feature('contextualAlternates', 'contextualSwashAlternates'), + curs: feature('cursiveConnection', 'cursive'), // ?? + c2pc: feature('upperCase', 'upperCasePetiteCaps'), + c2sc: feature('upperCase', 'upperCaseSmallCaps'), + + init: feature('smartSwash', 'wordInitialSwashes'), // ?? + fin2: feature('smartSwash', 'wordFinalSwashes'), // ?? + medi: feature('smartSwash', 'nonFinalSwashes'), // ?? + med2: feature('smartSwash', 'nonFinalSwashes'), // ?? + fin3: feature('smartSwash', 'wordFinalSwashes'), // ?? + fina: feature('smartSwash', 'wordFinalSwashes'), // ?? + + pkna: feature('kanaSpacing', 'proportionalKana'), + half: feature('textSpacing', 'halfWidthText'), // also HalfWidthCJKRoman, HalfWidthIdeographs? + halt: feature('textSpacing', 'altHalfWidthText'), + + hkna: feature('alternateKana', 'alternateHorizKana'), + vkna: feature('alternateKana', 'alternateVertKana'), + // hngl: feature 'transliteration', 'hanjaToHangulSelector' # deprecated + + ital: feature('italicCJKRoman', 'CJKItalicRoman'), + lnum: feature('numberCase', 'upperCaseNumbers'), + onum: feature('numberCase', 'lowerCaseNumbers'), + mgrk: feature('mathematicalExtras', 'mathematicalGreek'), + + // nalt: not enough info. what type of annotation? + // ornm: ditto, which ornament style? + + calt: feature('contextualAlternates', 'contextualAlternates'), // or more? + vrt2: feature('verticalSubstitution', 'substituteVerticalForms'), // oh... below? + vert: feature('verticalSubstitution', 'substituteVerticalForms'), + tnum: feature('numberSpacing', 'monospacedNumbers'), + pnum: feature('numberSpacing', 'proportionalNumbers'), + sups: feature('verticalPosition', 'superiors'), + subs: feature('verticalPosition', 'inferiors'), + ordn: feature('verticalPosition', 'ordinals'), + pwid: feature('textSpacing', 'proportionalText'), + hwid: feature('textSpacing', 'halfWidthText'), + qwid: feature('textSpacing', 'quarterWidthText'), // also QuarterWidthNumbers? + twid: feature('textSpacing', 'thirdWidthText'), // also ThirdWidthNumbers? + fwid: feature('textSpacing', 'proportionalText'), //?? + palt: feature('textSpacing', 'altProportionalText'), + trad: feature('characterShape', 'traditionalCharacters'), + smpl: feature('characterShape', 'simplifiedCharacters'), + jp78: feature('characterShape', 'JIS1978Characters'), + jp83: feature('characterShape', 'JIS1983Characters'), + jp90: feature('characterShape', 'JIS1990Characters'), + jp04: feature('characterShape', 'JIS2004Characters'), + expt: feature('characterShape', 'expertCharacters'), + hojo: feature('characterShape', 'hojoCharacters'), + nlck: feature('characterShape', 'NLCCharacters'), + tnam: feature('characterShape', 'traditionalNamesCharacters'), + ruby: feature('rubyKana', 'rubyKana'), + titl: feature('styleOptions', 'titlingCaps'), + zero: feature('typographicExtras', 'slashedZero'), + + ss01: feature('stylisticAlternatives', 'stylisticAltOne'), + ss02: feature('stylisticAlternatives', 'stylisticAltTwo'), + ss03: feature('stylisticAlternatives', 'stylisticAltThree'), + ss04: feature('stylisticAlternatives', 'stylisticAltFour'), + ss05: feature('stylisticAlternatives', 'stylisticAltFive'), + ss06: feature('stylisticAlternatives', 'stylisticAltSix'), + ss07: feature('stylisticAlternatives', 'stylisticAltSeven'), + ss08: feature('stylisticAlternatives', 'stylisticAltEight'), + ss09: feature('stylisticAlternatives', 'stylisticAltNine'), + ss10: feature('stylisticAlternatives', 'stylisticAltTen'), + ss11: feature('stylisticAlternatives', 'stylisticAltEleven'), + ss12: feature('stylisticAlternatives', 'stylisticAltTwelve'), + ss13: feature('stylisticAlternatives', 'stylisticAltThirteen'), + ss14: feature('stylisticAlternatives', 'stylisticAltFourteen'), + ss15: feature('stylisticAlternatives', 'stylisticAltFifteen'), + ss16: feature('stylisticAlternatives', 'stylisticAltSixteen'), + ss17: feature('stylisticAlternatives', 'stylisticAltSeventeen'), + ss18: feature('stylisticAlternatives', 'stylisticAltEighteen'), + ss19: feature('stylisticAlternatives', 'stylisticAltNineteen'), + ss20: feature('stylisticAlternatives', 'stylisticAltTwenty') +}; + +// salt: feature 'stylisticAlternatives', 'stylisticAltOne' # hmm, which one to choose + +// Add cv01-cv99 features +for (var i = 1; i <= 99; i++) { + OTMapping['cv' + ('00' + i).slice(-2)] = [features.characterAlternatives.code, i]; +} + +// create inverse mapping +var AATMapping = {}; +for (var ot in OTMapping) { + var aat = OTMapping[ot]; + if (AATMapping[aat[0]] == null) { + AATMapping[aat[0]] = {}; + } + + AATMapping[aat[0]][aat[1]] = ot; +} + +// Maps an array of OpenType features to AAT features +// in the form of {featureType:{featureSetting:true}} +function mapOTToAAT(features) { + var res = {}; + for (var k = 0; k < features.length; k++) { + var r = void 0; + if (r = OTMapping[features[k]]) { + if (res[r[0]] == null) { + res[r[0]] = {}; + } + + res[r[0]][r[1]] = true; + } + } + + return res; +} + +// Maps strings in a [featureType, featureSetting] +// to their equivalent number codes +function mapFeatureStrings(f) { + var type = f[0], + setting = f[1]; + + if (isNaN(type)) { + var typeCode = features[type] && features[type].code; + } else { + var typeCode = type; + } + + if (isNaN(setting)) { + var settingCode = features[type] && features[type][setting]; + } else { + var settingCode = setting; + } + + return [typeCode, settingCode]; +} + +// Maps AAT features to an array of OpenType features +// Supports both arrays in the form of [[featureType, featureSetting]] +// and objects in the form of {featureType:{featureSetting:true}} +// featureTypes and featureSettings can be either strings or number codes +function mapAATToOT(features) { + var res = {}; + if (Array.isArray(features)) { + for (var k = 0; k < features.length; k++) { + var r = void 0; + var f = mapFeatureStrings(features[k]); + if (r = AATMapping[f[0]] && AATMapping[f[0]][f[1]]) { + res[r] = true; + } + } + } else if ((typeof features === 'undefined' ? 'undefined' : _typeof(features)) === 'object') { + for (var type in features) { + var _feature = features[type]; + for (var setting in _feature) { + var _r = void 0; + var _f = mapFeatureStrings([type, setting]); + if (_feature[setting] && (_r = AATMapping[_f[0]] && AATMapping[_f[0]][_f[1]])) { + res[_r] = true; + } + } + } + } + + return _Object$keys(res); +} + +var _class$3; +function _applyDecoratedDescriptor$3(target, property, decorators, descriptor, context) { + var desc = {}; + Object['ke' + 'ys'](descriptor).forEach(function (key) { + desc[key] = descriptor[key]; + }); + desc.enumerable = !!desc.enumerable; + desc.configurable = !!desc.configurable; + + if ('value' in desc || desc.initializer) { + desc.writable = true; + } + + desc = decorators.slice().reverse().reduce(function (desc, decorator) { + return decorator(target, property, desc) || desc; + }, desc); + + if (context && desc.initializer !== void 0) { + desc.value = desc.initializer ? desc.initializer.call(context) : void 0; + desc.initializer = undefined; + } + + if (desc.initializer === void 0) { + Object['define' + 'Property'](target, property, desc); + desc = null; + } + + return desc; +} + +var AATLookupTable = (_class$3 = function () { + function AATLookupTable(table) { + _classCallCheck(this, AATLookupTable); + + this.table = table; + } + + AATLookupTable.prototype.lookup = function lookup(glyph) { + switch (this.table.version) { + case 0: + // simple array format + return this.table.values.getItem(glyph); + + case 2: // segment format + case 4: + { + var min = 0; + var max = this.table.binarySearchHeader.nUnits - 1; + + while (min <= max) { + var mid = min + max >> 1; + var seg = this.table.segments[mid]; + + // special end of search value + if (seg.firstGlyph === 0xffff) { + return null; + } + + if (glyph < seg.firstGlyph) { + max = mid - 1; + } else if (glyph > seg.lastGlyph) { + min = mid + 1; + } else { + if (this.table.version === 2) { + return seg.value; + } else { + return seg.values[glyph - seg.firstGlyph]; + } + } + } + + return null; + } + + case 6: + { + // lookup single + var _min = 0; + var _max = this.table.binarySearchHeader.nUnits - 1; + + while (_min <= _max) { + var mid = _min + _max >> 1; + var seg = this.table.segments[mid]; + + // special end of search value + if (seg.glyph === 0xffff) { + return null; + } + + if (glyph < seg.glyph) { + _max = mid - 1; + } else if (glyph > seg.glyph) { + _min = mid + 1; + } else { + return seg.value; + } + } + + return null; + } + + case 8: + // lookup trimmed + return this.table.values[glyph - this.table.firstGlyph]; + + default: + throw new Error('Unknown lookup table format: ' + this.table.version); + } + }; + + AATLookupTable.prototype.glyphsForValue = function glyphsForValue(classValue) { + var res = []; + + switch (this.table.version) { + case 2: // segment format + case 4: + { + for (var _iterator = this.table.segments, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var segment = _ref; + + if (this.table.version === 2 && segment.value === classValue) { + res.push.apply(res, range(segment.firstGlyph, segment.lastGlyph + 1)); + } else { + for (var index = 0; index < segment.values.length; index++) { + if (segment.values[index] === classValue) { + res.push(segment.firstGlyph + index); + } + } + } + } + + break; + } + + case 6: + { + // lookup single + for (var _iterator2 = this.table.segments, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _getIterator(_iterator2);;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var _segment = _ref2; + + if (_segment.value === classValue) { + res.push(_segment.glyph); + } + } + + break; + } + + case 8: + { + // lookup trimmed + for (var i = 0; i < this.table.values.length; i++) { + if (this.table.values[i] === classValue) { + res.push(this.table.firstGlyph + i); + } + } + + break; + } + + default: + throw new Error('Unknown lookup table format: ' + this.table.version); + } + + return res; + }; + + return AATLookupTable; +}(), (_applyDecoratedDescriptor$3(_class$3.prototype, 'glyphsForValue', [cache], _Object$getOwnPropertyDescriptor(_class$3.prototype, 'glyphsForValue'), _class$3.prototype)), _class$3); + +var START_OF_TEXT_STATE = 0; +var END_OF_TEXT_CLASS = 0; +var OUT_OF_BOUNDS_CLASS = 1; +var DELETED_GLYPH_CLASS = 2; +var DONT_ADVANCE = 0x4000; + +var AATStateMachine = function () { + function AATStateMachine(stateTable) { + _classCallCheck(this, AATStateMachine); + + this.stateTable = stateTable; + this.lookupTable = new AATLookupTable(stateTable.classTable); + } + + AATStateMachine.prototype.process = function process(glyphs, reverse, processEntry) { + var currentState = START_OF_TEXT_STATE; // START_OF_LINE_STATE is used for kashida glyph insertions sometimes I think? + var index = reverse ? glyphs.length - 1 : 0; + var dir = reverse ? -1 : 1; + + while (dir === 1 && index <= glyphs.length || dir === -1 && index >= -1) { + var glyph = null; + var classCode = OUT_OF_BOUNDS_CLASS; + var shouldAdvance = true; + + if (index === glyphs.length || index === -1) { + classCode = END_OF_TEXT_CLASS; + } else { + glyph = glyphs[index]; + if (glyph.id === 0xffff) { + // deleted glyph + classCode = DELETED_GLYPH_CLASS; + } else { + classCode = this.lookupTable.lookup(glyph.id); + if (classCode == null) { + classCode = OUT_OF_BOUNDS_CLASS; + } + } + } + + var row = this.stateTable.stateArray.getItem(currentState); + var entryIndex = row[classCode]; + var entry = this.stateTable.entryTable.getItem(entryIndex); + + if (classCode !== END_OF_TEXT_CLASS && classCode !== DELETED_GLYPH_CLASS) { + processEntry(glyph, entry, index); + shouldAdvance = !(entry.flags & DONT_ADVANCE); + } + + currentState = entry.newState; + if (shouldAdvance) { + index += dir; + } + } + + return glyphs; + }; + + /** + * Performs a depth-first traversal of the glyph strings + * represented by the state machine. + */ + + + AATStateMachine.prototype.traverse = function traverse(opts) { + var state = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; + var visited = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : new _Set(); + + if (visited.has(state)) { + return; + } + + visited.add(state); + + var _stateTable = this.stateTable, + nClasses = _stateTable.nClasses, + stateArray = _stateTable.stateArray, + entryTable = _stateTable.entryTable; + + var row = stateArray.getItem(state); + + // Skip predefined classes + for (var classCode = 4; classCode < nClasses; classCode++) { + var entryIndex = row[classCode]; + var entry = entryTable.getItem(entryIndex); + + // Try all glyphs in the class + for (var _iterator = this.lookupTable.glyphsForValue(classCode), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var glyph = _ref; + + if (opts.enter) { + opts.enter(glyph, entry); + } + + if (entry.newState !== 0) { + this.traverse(opts, entry.newState, visited); + } + + if (opts.exit) { + opts.exit(glyph, entry); + } + } + } + }; + + return AATStateMachine; +}(); + +var _class$2; +function _applyDecoratedDescriptor$2(target, property, decorators, descriptor, context) { + var desc = {}; + Object['ke' + 'ys'](descriptor).forEach(function (key) { + desc[key] = descriptor[key]; + }); + desc.enumerable = !!desc.enumerable; + desc.configurable = !!desc.configurable; + + if ('value' in desc || desc.initializer) { + desc.writable = true; + } + + desc = decorators.slice().reverse().reduce(function (desc, decorator) { + return decorator(target, property, desc) || desc; + }, desc); + + if (context && desc.initializer !== void 0) { + desc.value = desc.initializer ? desc.initializer.call(context) : void 0; + desc.initializer = undefined; + } + + if (desc.initializer === void 0) { + Object['define' + 'Property'](target, property, desc); + desc = null; + } + + return desc; +} + +// indic replacement flags +var MARK_FIRST = 0x8000; +var MARK_LAST = 0x2000; +var VERB = 0x000F; + +// contextual substitution and glyph insertion flag +var SET_MARK = 0x8000; + +// ligature entry flags +var SET_COMPONENT = 0x8000; +var PERFORM_ACTION = 0x2000; + +// ligature action masks +var LAST_MASK = 0x80000000; +var STORE_MASK = 0x40000000; +var OFFSET_MASK = 0x3FFFFFFF; + +var REVERSE_DIRECTION = 0x400000; +var CURRENT_INSERT_BEFORE = 0x0800; +var MARKED_INSERT_BEFORE = 0x0400; +var CURRENT_INSERT_COUNT = 0x03E0; +var MARKED_INSERT_COUNT = 0x001F; + +var AATMorxProcessor = (_class$2 = function () { + function AATMorxProcessor(font) { + _classCallCheck(this, AATMorxProcessor); + + this.processIndicRearragement = this.processIndicRearragement.bind(this); + this.processContextualSubstitution = this.processContextualSubstitution.bind(this); + this.processLigature = this.processLigature.bind(this); + this.processNoncontextualSubstitutions = this.processNoncontextualSubstitutions.bind(this); + this.processGlyphInsertion = this.processGlyphInsertion.bind(this); + this.font = font; + this.morx = font.morx; + this.inputCache = null; + } + + // Processes an array of glyphs and applies the specified features + // Features should be in the form of {featureType:{featureSetting:true}} + + + AATMorxProcessor.prototype.process = function process(glyphs) { + var features = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + + for (var _iterator = this.morx.chains, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var chain = _ref; + + var flags = chain.defaultFlags; + + // enable/disable the requested features + for (var _iterator2 = chain.features, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _getIterator(_iterator2);;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var feature = _ref2; + + var f = void 0; + if ((f = features[feature.featureType]) && f[feature.featureSetting]) { + flags &= feature.disableFlags; + flags |= feature.enableFlags; + } + } + + for (var _iterator3 = chain.subtables, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _getIterator(_iterator3);;) { + var _ref3; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref3 = _i3.value; + } + + var subtable = _ref3; + + if (subtable.subFeatureFlags & flags) { + this.processSubtable(subtable, glyphs); + } + } + } + + // remove deleted glyphs + var index = glyphs.length - 1; + while (index >= 0) { + if (glyphs[index].id === 0xffff) { + glyphs.splice(index, 1); + } + + index--; + } + + return glyphs; + }; + + AATMorxProcessor.prototype.processSubtable = function processSubtable(subtable, glyphs) { + this.subtable = subtable; + this.glyphs = glyphs; + if (this.subtable.type === 4) { + this.processNoncontextualSubstitutions(this.subtable, this.glyphs); + return; + } + + this.ligatureStack = []; + this.markedGlyph = null; + this.firstGlyph = null; + this.lastGlyph = null; + this.markedIndex = null; + + var stateMachine = this.getStateMachine(subtable); + var process = this.getProcessor(); + + var reverse = !!(this.subtable.coverage & REVERSE_DIRECTION); + return stateMachine.process(this.glyphs, reverse, process); + }; + + AATMorxProcessor.prototype.getStateMachine = function getStateMachine(subtable) { + return new AATStateMachine(subtable.table.stateTable); + }; + + AATMorxProcessor.prototype.getProcessor = function getProcessor() { + switch (this.subtable.type) { + case 0: + return this.processIndicRearragement; + case 1: + return this.processContextualSubstitution; + case 2: + return this.processLigature; + case 4: + return this.processNoncontextualSubstitutions; + case 5: + return this.processGlyphInsertion; + default: + throw new Error('Invalid morx subtable type: ' + this.subtable.type); + } + }; + + AATMorxProcessor.prototype.processIndicRearragement = function processIndicRearragement(glyph, entry, index) { + if (entry.flags & MARK_FIRST) { + this.firstGlyph = index; + } + + if (entry.flags & MARK_LAST) { + this.lastGlyph = index; + } + + reorderGlyphs(this.glyphs, entry.flags & VERB, this.firstGlyph, this.lastGlyph); + }; + + AATMorxProcessor.prototype.processContextualSubstitution = function processContextualSubstitution(glyph, entry, index) { + var subsitutions = this.subtable.table.substitutionTable.items; + if (entry.markIndex !== 0xffff) { + var lookup = subsitutions.getItem(entry.markIndex); + var lookupTable = new AATLookupTable(lookup); + glyph = this.glyphs[this.markedGlyph]; + var gid = lookupTable.lookup(glyph.id); + if (gid) { + this.glyphs[this.markedGlyph] = this.font.getGlyph(gid, glyph.codePoints); + } + } + + if (entry.currentIndex !== 0xffff) { + var _lookup = subsitutions.getItem(entry.currentIndex); + var _lookupTable = new AATLookupTable(_lookup); + glyph = this.glyphs[index]; + var gid = _lookupTable.lookup(glyph.id); + if (gid) { + this.glyphs[index] = this.font.getGlyph(gid, glyph.codePoints); + } + } + + if (entry.flags & SET_MARK) { + this.markedGlyph = index; + } + }; + + AATMorxProcessor.prototype.processLigature = function processLigature(glyph, entry, index) { + if (entry.flags & SET_COMPONENT) { + this.ligatureStack.push(index); + } + + if (entry.flags & PERFORM_ACTION) { + var _ligatureStack; + + var actions = this.subtable.table.ligatureActions; + var components = this.subtable.table.components; + var ligatureList = this.subtable.table.ligatureList; + + var actionIndex = entry.action; + var last = false; + var ligatureIndex = 0; + var codePoints = []; + var ligatureGlyphs = []; + + while (!last) { + var _codePoints; + + var componentGlyph = this.ligatureStack.pop(); + (_codePoints = codePoints).unshift.apply(_codePoints, this.glyphs[componentGlyph].codePoints); + + var action = actions.getItem(actionIndex++); + last = !!(action & LAST_MASK); + var store = !!(action & STORE_MASK); + var offset = (action & OFFSET_MASK) << 2 >> 2; // sign extend 30 to 32 bits + offset += this.glyphs[componentGlyph].id; + + var component = components.getItem(offset); + ligatureIndex += component; + + if (last || store) { + var ligatureEntry = ligatureList.getItem(ligatureIndex); + this.glyphs[componentGlyph] = this.font.getGlyph(ligatureEntry, codePoints); + ligatureGlyphs.push(componentGlyph); + ligatureIndex = 0; + codePoints = []; + } else { + this.glyphs[componentGlyph] = this.font.getGlyph(0xffff); + } + } + + // Put ligature glyph indexes back on the stack + (_ligatureStack = this.ligatureStack).push.apply(_ligatureStack, ligatureGlyphs); + } + }; + + AATMorxProcessor.prototype.processNoncontextualSubstitutions = function processNoncontextualSubstitutions(subtable, glyphs, index) { + var lookupTable = new AATLookupTable(subtable.table.lookupTable); + + for (index = 0; index < glyphs.length; index++) { + var glyph = glyphs[index]; + if (glyph.id !== 0xffff) { + var gid = lookupTable.lookup(glyph.id); + if (gid) { + // 0 means do nothing + glyphs[index] = this.font.getGlyph(gid, glyph.codePoints); + } + } + } + }; + + AATMorxProcessor.prototype._insertGlyphs = function _insertGlyphs(glyphIndex, insertionActionIndex, count, isBefore) { + var _glyphs; + + var insertions = []; + while (count--) { + var gid = this.subtable.table.insertionActions.getItem(insertionActionIndex++); + insertions.push(this.font.getGlyph(gid)); + } + + if (!isBefore) { + glyphIndex++; + } + + (_glyphs = this.glyphs).splice.apply(_glyphs, [glyphIndex, 0].concat(insertions)); + }; + + AATMorxProcessor.prototype.processGlyphInsertion = function processGlyphInsertion(glyph, entry, index) { + if (entry.flags & SET_MARK) { + this.markedIndex = index; + } + + if (entry.markedInsertIndex !== 0xffff) { + var count = (entry.flags & MARKED_INSERT_COUNT) >>> 5; + var isBefore = !!(entry.flags & MARKED_INSERT_BEFORE); + this._insertGlyphs(this.markedIndex, entry.markedInsertIndex, count, isBefore); + } + + if (entry.currentInsertIndex !== 0xffff) { + var _count = (entry.flags & CURRENT_INSERT_COUNT) >>> 5; + var _isBefore = !!(entry.flags & CURRENT_INSERT_BEFORE); + this._insertGlyphs(index, entry.currentInsertIndex, _count, _isBefore); + } + }; + + AATMorxProcessor.prototype.getSupportedFeatures = function getSupportedFeatures() { + var features = []; + for (var _iterator4 = this.morx.chains, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _getIterator(_iterator4);;) { + var _ref4; + + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref4 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref4 = _i4.value; + } + + var chain = _ref4; + + for (var _iterator5 = chain.features, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _getIterator(_iterator5);;) { + var _ref5; + + if (_isArray5) { + if (_i5 >= _iterator5.length) break; + _ref5 = _iterator5[_i5++]; + } else { + _i5 = _iterator5.next(); + if (_i5.done) break; + _ref5 = _i5.value; + } + + var feature = _ref5; + + features.push([feature.featureType, feature.featureSetting]); + } + } + + return features; + }; + + AATMorxProcessor.prototype.generateInputs = function generateInputs(gid) { + if (!this.inputCache) { + this.generateInputCache(); + } + + return this.inputCache[gid] || []; + }; + + AATMorxProcessor.prototype.generateInputCache = function generateInputCache() { + this.inputCache = {}; + + for (var _iterator6 = this.morx.chains, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : _getIterator(_iterator6);;) { + var _ref6; + + if (_isArray6) { + if (_i6 >= _iterator6.length) break; + _ref6 = _iterator6[_i6++]; + } else { + _i6 = _iterator6.next(); + if (_i6.done) break; + _ref6 = _i6.value; + } + + var chain = _ref6; + + var flags = chain.defaultFlags; + + for (var _iterator7 = chain.subtables, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : _getIterator(_iterator7);;) { + var _ref7; + + if (_isArray7) { + if (_i7 >= _iterator7.length) break; + _ref7 = _iterator7[_i7++]; + } else { + _i7 = _iterator7.next(); + if (_i7.done) break; + _ref7 = _i7.value; + } + + var subtable = _ref7; + + if (subtable.subFeatureFlags & flags) { + this.generateInputsForSubtable(subtable); + } + } + } + }; + + AATMorxProcessor.prototype.generateInputsForSubtable = function generateInputsForSubtable(subtable) { + var _this = this; + + // Currently, only supporting ligature subtables. + if (subtable.type !== 2) { + return; + } + + var reverse = !!(subtable.coverage & REVERSE_DIRECTION); + if (reverse) { + throw new Error('Reverse subtable, not supported.'); + } + + this.subtable = subtable; + this.ligatureStack = []; + + var stateMachine = this.getStateMachine(subtable); + var process = this.getProcessor(); + + var input = []; + var stack = []; + this.glyphs = []; + + stateMachine.traverse({ + enter: function enter(glyph, entry) { + var glyphs = _this.glyphs; + stack.push({ + glyphs: glyphs.slice(), + ligatureStack: _this.ligatureStack.slice() + }); + + // Add glyph to input and glyphs to process. + var g = _this.font.getGlyph(glyph); + input.push(g); + glyphs.push(input[input.length - 1]); + + // Process ligature substitution + process(glyphs[glyphs.length - 1], entry, glyphs.length - 1); + + // Add input to result if only one matching (non-deleted) glyph remains. + var count = 0; + var found = 0; + for (var i = 0; i < glyphs.length && count <= 1; i++) { + if (glyphs[i].id !== 0xffff) { + count++; + found = glyphs[i].id; + } + } + + if (count === 1) { + var result = input.map(function (g) { + return g.id; + }); + var _cache = _this.inputCache[found]; + if (_cache) { + _cache.push(result); + } else { + _this.inputCache[found] = [result]; + } + } + }, + + exit: function exit() { + var _stack$pop = stack.pop(); + + _this.glyphs = _stack$pop.glyphs; + _this.ligatureStack = _stack$pop.ligatureStack; + + input.pop(); + } + }); + }; + + return AATMorxProcessor; +}(), (_applyDecoratedDescriptor$2(_class$2.prototype, 'getStateMachine', [cache], _Object$getOwnPropertyDescriptor(_class$2.prototype, 'getStateMachine'), _class$2.prototype)), _class$2); + +function swap(glyphs, rangeA, rangeB) { + var reverseA = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; + var reverseB = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false; + + var end = glyphs.splice(rangeB[0] - (rangeB[1] - 1), rangeB[1]); + if (reverseB) { + end.reverse(); + } + + var start = glyphs.splice.apply(glyphs, [rangeA[0], rangeA[1]].concat(end)); + if (reverseA) { + start.reverse(); + } + + glyphs.splice.apply(glyphs, [rangeB[0] - (rangeA[1] - 1), 0].concat(start)); + return glyphs; +} + +function reorderGlyphs(glyphs, verb, firstGlyph, lastGlyph) { + var length = lastGlyph - firstGlyph + 1; + switch (verb) { + case 0: + // no change + return glyphs; + + case 1: + // Ax => xA + return swap(glyphs, [firstGlyph, 1], [lastGlyph, 0]); + + case 2: + // xD => Dx + return swap(glyphs, [firstGlyph, 0], [lastGlyph, 1]); + + case 3: + // AxD => DxA + return swap(glyphs, [firstGlyph, 1], [lastGlyph, 1]); + + case 4: + // ABx => xAB + return swap(glyphs, [firstGlyph, 2], [lastGlyph, 0]); + + case 5: + // ABx => xBA + return swap(glyphs, [firstGlyph, 2], [lastGlyph, 0], true, false); + + case 6: + // xCD => CDx + return swap(glyphs, [firstGlyph, 0], [lastGlyph, 2]); + + case 7: + // xCD => DCx + return swap(glyphs, [firstGlyph, 0], [lastGlyph, 2], false, true); + + case 8: + // AxCD => CDxA + return swap(glyphs, [firstGlyph, 1], [lastGlyph, 2]); + + case 9: + // AxCD => DCxA + return swap(glyphs, [firstGlyph, 1], [lastGlyph, 2], false, true); + + case 10: + // ABxD => DxAB + return swap(glyphs, [firstGlyph, 2], [lastGlyph, 1]); + + case 11: + // ABxD => DxBA + return swap(glyphs, [firstGlyph, 2], [lastGlyph, 1], true, false); + + case 12: + // ABxCD => CDxAB + return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2]); + + case 13: + // ABxCD => CDxBA + return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2], true, false); + + case 14: + // ABxCD => DCxAB + return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2], false, true); + + case 15: + // ABxCD => DCxBA + return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2], true, true); + + default: + throw new Error('Unknown verb: ' + verb); + } +} + +var AATLayoutEngine = function () { + function AATLayoutEngine(font) { + _classCallCheck(this, AATLayoutEngine); + + this.font = font; + this.morxProcessor = new AATMorxProcessor(font); + } + + AATLayoutEngine.prototype.substitute = function substitute(glyphs, features, script, language) { + // AAT expects the glyphs to be in visual order prior to morx processing, + // so reverse the glyphs if the script is right-to-left. + var isRTL = direction(script) === 'rtl'; + if (isRTL) { + glyphs.reverse(); + } + + this.morxProcessor.process(glyphs, mapOTToAAT(features)); + return glyphs; + }; + + AATLayoutEngine.prototype.getAvailableFeatures = function getAvailableFeatures(script, language) { + return mapAATToOT(this.morxProcessor.getSupportedFeatures()); + }; + + AATLayoutEngine.prototype.stringsForGlyph = function stringsForGlyph(gid) { + var glyphStrings = this.morxProcessor.generateInputs(gid); + var result = new _Set(); + + for (var _iterator = glyphStrings, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var glyphs = _ref; + + this._addStrings(glyphs, 0, result, ''); + } + + return result; + }; + + AATLayoutEngine.prototype._addStrings = function _addStrings(glyphs, index, strings, string) { + var codePoints = this.font._cmapProcessor.codePointsForGlyph(glyphs[index]); + + for (var _iterator2 = codePoints, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _getIterator(_iterator2);;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var codePoint = _ref2; + + var s = string + _String$fromCodePoint(codePoint); + if (index < glyphs.length - 1) { + this._addStrings(glyphs, index + 1, strings, s); + } else { + strings.add(s); + } + } + }; + + return AATLayoutEngine; +}(); + +/** + * ShapingPlans are used by the OpenType shapers to store which + * features should by applied, and in what order to apply them. + * The features are applied in groups called stages. A feature + * can be applied globally to all glyphs, or locally to only + * specific glyphs. + * + * @private + */ + +var ShapingPlan = function () { + function ShapingPlan(font, script, language) { + _classCallCheck(this, ShapingPlan); + + this.font = font; + this.script = script; + this.language = language; + this.direction = direction(script); + this.stages = []; + this.globalFeatures = {}; + this.allFeatures = {}; + } + + /** + * Adds the given features to the last stage. + * Ignores features that have already been applied. + */ + + + ShapingPlan.prototype._addFeatures = function _addFeatures(features) { + var stage = this.stages[this.stages.length - 1]; + for (var _iterator = features, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var feature = _ref; + + if (!this.allFeatures[feature]) { + stage.push(feature); + this.allFeatures[feature] = true; + } + } + }; + + /** + * Adds the given features to the global list + */ + + + ShapingPlan.prototype._addGlobal = function _addGlobal(features) { + for (var _iterator2 = features, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _getIterator(_iterator2);;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var feature = _ref2; + + this.globalFeatures[feature] = true; + } + }; + + /** + * Add features to the last stage + */ + + + ShapingPlan.prototype.add = function add(arg) { + var global = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true; + + if (this.stages.length === 0) { + this.stages.push([]); + } + + if (typeof arg === 'string') { + arg = [arg]; + } + + if (Array.isArray(arg)) { + this._addFeatures(arg); + if (global) { + this._addGlobal(arg); + } + } else if ((typeof arg === 'undefined' ? 'undefined' : _typeof(arg)) === 'object') { + var features = (arg.global || []).concat(arg.local || []); + this._addFeatures(features); + if (arg.global) { + this._addGlobal(arg.global); + } + } else { + throw new Error("Unsupported argument to ShapingPlan#add"); + } + }; + + /** + * Add a new stage + */ + + + ShapingPlan.prototype.addStage = function addStage(arg, global) { + if (typeof arg === 'function') { + this.stages.push(arg, []); + } else { + this.stages.push([]); + this.add(arg, global); + } + }; + + /** + * Assigns the global features to the given glyphs + */ + + + ShapingPlan.prototype.assignGlobalFeatures = function assignGlobalFeatures(glyphs) { + for (var _iterator3 = glyphs, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _getIterator(_iterator3);;) { + var _ref3; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref3 = _i3.value; + } + + var glyph = _ref3; + + for (var feature in this.globalFeatures) { + glyph.features[feature] = true; + } + } + }; + + /** + * Executes the planned stages using the given OTProcessor + */ + + + ShapingPlan.prototype.process = function process(processor, glyphs, positions) { + processor.selectScript(this.script, this.language); + + for (var _iterator4 = this.stages, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _getIterator(_iterator4);;) { + var _ref4; + + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref4 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref4 = _i4.value; + } + + var stage = _ref4; + + if (typeof stage === 'function') { + if (!positions) { + stage(this.font, glyphs, positions); + } + } else if (stage.length > 0) { + processor.applyFeatures(stage, glyphs, positions); + } + } + }; + + return ShapingPlan; +}(); + +var _class$4; +var _temp; +var VARIATION_FEATURES = ['rvrn']; +var COMMON_FEATURES = ['ccmp', 'locl', 'rlig', 'mark', 'mkmk']; +var FRACTIONAL_FEATURES = ['frac', 'numr', 'dnom']; +var HORIZONTAL_FEATURES = ['calt', 'clig', 'liga', 'rclt', 'curs', 'kern']; +var DIRECTIONAL_FEATURES = { + ltr: ['ltra', 'ltrm'], + rtl: ['rtla', 'rtlm'] +}; + +var DefaultShaper = (_temp = _class$4 = function () { + function DefaultShaper() { + _classCallCheck(this, DefaultShaper); + } + + DefaultShaper.plan = function plan(_plan, glyphs, features) { + // Plan the features we want to apply + this.planPreprocessing(_plan); + this.planFeatures(_plan); + this.planPostprocessing(_plan, features); + + // Assign the global features to all the glyphs + _plan.assignGlobalFeatures(glyphs); + + // Assign local features to glyphs + this.assignFeatures(_plan, glyphs); + }; + + DefaultShaper.planPreprocessing = function planPreprocessing(plan) { + plan.add({ + global: [].concat(VARIATION_FEATURES, DIRECTIONAL_FEATURES[plan.direction]), + local: FRACTIONAL_FEATURES + }); + }; + + DefaultShaper.planFeatures = function planFeatures(plan) { + // Do nothing by default. Let subclasses override this. + }; + + DefaultShaper.planPostprocessing = function planPostprocessing(plan, userFeatures) { + plan.add([].concat(COMMON_FEATURES, HORIZONTAL_FEATURES, userFeatures)); + }; + + DefaultShaper.assignFeatures = function assignFeatures(plan, glyphs) { + // Enable contextual fractions + var i = 0; + while (i < glyphs.length) { + var glyph = glyphs[i]; + if (glyph.codePoints[0] === 0x2044) { + // fraction slash + var start = i - 1; + var end = i + 1; + + // Apply numerator + while (start >= 0 && unicode.isDigit(glyphs[start].codePoints[0])) { + glyphs[start].features.numr = true; + glyphs[start].features.frac = true; + start--; + } + + // Apply denominator + while (end < glyphs.length && unicode.isDigit(glyphs[end].codePoints[0])) { + glyphs[end].features.dnom = true; + glyphs[end].features.frac = true; + end++; + } + + // Apply fraction slash + glyph.features.frac = true; + i = end - 1; + } else { + i++; + } + } + }; + + return DefaultShaper; +}(), _class$4.zeroMarkWidths = 'AFTER_GPOS', _temp); + +var trie = new UnicodeTrie(require('fs').readFileSync(__dirname + '/data.trie')); +var FEATURES = ['isol', 'fina', 'fin2', 'fin3', 'medi', 'med2', 'init']; + +var ShapingClasses = { + Non_Joining: 0, + Left_Joining: 1, + Right_Joining: 2, + Dual_Joining: 3, + Join_Causing: 3, + ALAPH: 4, + 'DALATH RISH': 5, + Transparent: 6 +}; + +var ISOL = 'isol'; +var FINA = 'fina'; +var FIN2 = 'fin2'; +var FIN3 = 'fin3'; +var MEDI = 'medi'; +var MED2 = 'med2'; +var INIT = 'init'; +var NONE = null; + +// Each entry is [prevAction, curAction, nextState] +var STATE_TABLE = [ +// Non_Joining, Left_Joining, Right_Joining, Dual_Joining, ALAPH, DALATH RISH +// State 0: prev was U, not willing to join. +[[NONE, NONE, 0], [NONE, ISOL, 2], [NONE, ISOL, 1], [NONE, ISOL, 2], [NONE, ISOL, 1], [NONE, ISOL, 6]], + +// State 1: prev was R or ISOL/ALAPH, not willing to join. +[[NONE, NONE, 0], [NONE, ISOL, 2], [NONE, ISOL, 1], [NONE, ISOL, 2], [NONE, FIN2, 5], [NONE, ISOL, 6]], + +// State 2: prev was D/L in ISOL form, willing to join. +[[NONE, NONE, 0], [NONE, ISOL, 2], [INIT, FINA, 1], [INIT, FINA, 3], [INIT, FINA, 4], [INIT, FINA, 6]], + +// State 3: prev was D in FINA form, willing to join. +[[NONE, NONE, 0], [NONE, ISOL, 2], [MEDI, FINA, 1], [MEDI, FINA, 3], [MEDI, FINA, 4], [MEDI, FINA, 6]], + +// State 4: prev was FINA ALAPH, not willing to join. +[[NONE, NONE, 0], [NONE, ISOL, 2], [MED2, ISOL, 1], [MED2, ISOL, 2], [MED2, FIN2, 5], [MED2, ISOL, 6]], + +// State 5: prev was FIN2/FIN3 ALAPH, not willing to join. +[[NONE, NONE, 0], [NONE, ISOL, 2], [ISOL, ISOL, 1], [ISOL, ISOL, 2], [ISOL, FIN2, 5], [ISOL, ISOL, 6]], + +// State 6: prev was DALATH/RISH, not willing to join. +[[NONE, NONE, 0], [NONE, ISOL, 2], [NONE, ISOL, 1], [NONE, ISOL, 2], [NONE, FIN3, 5], [NONE, ISOL, 6]]]; + +/** + * This is a shaper for Arabic, and other cursive scripts. + * It uses data from ArabicShaping.txt in the Unicode database, + * compiled to a UnicodeTrie by generate-data.coffee. + * + * The shaping state machine was ported from Harfbuzz. + * https://github.com/behdad/harfbuzz/blob/master/src/hb-ot-shape-complex-arabic.cc + */ + +var ArabicShaper = function (_DefaultShaper) { + _inherits(ArabicShaper, _DefaultShaper); + + function ArabicShaper() { + _classCallCheck(this, ArabicShaper); + + return _possibleConstructorReturn(this, _DefaultShaper.apply(this, arguments)); + } + + ArabicShaper.planFeatures = function planFeatures(plan) { + plan.add(['ccmp', 'locl']); + for (var i = 0; i < FEATURES.length; i++) { + var feature = FEATURES[i]; + plan.addStage(feature, false); + } + + plan.addStage('mset'); + }; + + ArabicShaper.assignFeatures = function assignFeatures(plan, glyphs) { + _DefaultShaper.assignFeatures.call(this, plan, glyphs); + + var prev = -1; + var state = 0; + var actions = []; + + // Apply the state machine to map glyphs to features + for (var i = 0; i < glyphs.length; i++) { + var curAction = void 0, + prevAction = void 0; + var glyph = glyphs[i]; + var type = getShapingClass(glyph.codePoints[0]); + if (type === ShapingClasses.Transparent) { + actions[i] = NONE; + continue; + } + + var _STATE_TABLE$state$ty = STATE_TABLE[state][type]; + prevAction = _STATE_TABLE$state$ty[0]; + curAction = _STATE_TABLE$state$ty[1]; + state = _STATE_TABLE$state$ty[2]; + + + if (prevAction !== NONE && prev !== -1) { + actions[prev] = prevAction; + } + + actions[i] = curAction; + prev = i; + } + + // Apply the chosen features to their respective glyphs + for (var index = 0; index < glyphs.length; index++) { + var feature = void 0; + var glyph = glyphs[index]; + if (feature = actions[index]) { + glyph.features[feature] = true; + } + } + }; + + return ArabicShaper; +}(DefaultShaper); + +function getShapingClass(codePoint) { + var res = trie.get(codePoint); + if (res) { + return res - 1; + } + + var category = unicode.getCategory(codePoint); + if (category === 'Mn' || category === 'Me' || category === 'Cf') { + return ShapingClasses.Transparent; + } + + return ShapingClasses.Non_Joining; +} + +var GlyphIterator = function () { + function GlyphIterator(glyphs, flags) { + _classCallCheck(this, GlyphIterator); + + this.glyphs = glyphs; + this.reset(flags); + } + + GlyphIterator.prototype.reset = function reset() { + var flags = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; + + this.flags = flags; + this.index = 0; + }; + + GlyphIterator.prototype.shouldIgnore = function shouldIgnore(glyph, flags) { + return flags.ignoreMarks && glyph.isMark || flags.ignoreBaseGlyphs && !glyph.isMark || flags.ignoreLigatures && glyph.isLigature; + }; + + GlyphIterator.prototype.move = function move(dir) { + this.index += dir; + while (0 <= this.index && this.index < this.glyphs.length && this.shouldIgnore(this.glyphs[this.index], this.flags)) { + this.index += dir; + } + + if (0 > this.index || this.index >= this.glyphs.length) { + return null; + } + + return this.glyphs[this.index]; + }; + + GlyphIterator.prototype.next = function next() { + return this.move(+1); + }; + + GlyphIterator.prototype.prev = function prev() { + return this.move(-1); + }; + + GlyphIterator.prototype.peek = function peek() { + var count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; + + var idx = this.index; + var res = this.increment(count); + this.index = idx; + return res; + }; + + GlyphIterator.prototype.peekIndex = function peekIndex() { + var count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; + + var idx = this.index; + this.increment(count); + var res = this.index; + this.index = idx; + return res; + }; + + GlyphIterator.prototype.increment = function increment() { + var count = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1; + + var dir = count < 0 ? -1 : 1; + count = Math.abs(count); + while (count--) { + this.move(dir); + } + + return this.glyphs[this.index]; + }; + + _createClass(GlyphIterator, [{ + key: "cur", + get: function get() { + return this.glyphs[this.index] || null; + } + }]); + + return GlyphIterator; +}(); + +var DEFAULT_SCRIPTS = ['DFLT', 'dflt', 'latn']; + +var OTProcessor = function () { + function OTProcessor(font, table) { + _classCallCheck(this, OTProcessor); + + this.font = font; + this.table = table; + + this.script = null; + this.scriptTag = null; + + this.language = null; + this.languageTag = null; + + this.features = {}; + this.lookups = {}; + + // Setup variation substitutions + this.variationsIndex = font._variationProcessor ? this.findVariationsIndex(font._variationProcessor.normalizedCoords) : -1; + + // initialize to default script + language + this.selectScript(); + + // current context (set by applyFeatures) + this.glyphs = []; + this.positions = []; // only used by GPOS + this.ligatureID = 1; + } + + OTProcessor.prototype.findScript = function findScript(script) { + if (this.table.scriptList == null) { + return null; + } + + if (!Array.isArray(script)) { + script = [script]; + } + + for (var _iterator = this.table.scriptList, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var entry = _ref; + + for (var _iterator2 = script, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _getIterator(_iterator2);;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var s = _ref2; + + if (entry.tag === s) { + return entry; + } + } + } + + return null; + }; + + OTProcessor.prototype.selectScript = function selectScript(script, language) { + var changed = false; + var entry = void 0; + if (!this.script || script !== this.scriptTag) { + entry = this.findScript(script); + if (script) { + entry = this.findScript(script); + } + + if (!entry) { + entry = this.findScript(DEFAULT_SCRIPTS); + } + + if (!entry) { + return; + } + + this.scriptTag = entry.tag; + this.script = entry.script; + this.direction = direction(script); + this.language = null; + changed = true; + } + + if (!language && language !== this.langugeTag) { + for (var _iterator3 = this.script.langSysRecords, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _getIterator(_iterator3);;) { + var _ref3; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref3 = _i3.value; + } + + var lang = _ref3; + + if (lang.tag === language) { + this.language = lang.langSys; + this.langugeTag = lang.tag; + changed = true; + break; + } + } + } + + if (!this.language) { + this.language = this.script.defaultLangSys; + } + + // Build a feature lookup table + if (changed) { + this.features = {}; + if (this.language) { + for (var _iterator4 = this.language.featureIndexes, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _getIterator(_iterator4);;) { + var _ref4; + + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref4 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref4 = _i4.value; + } + + var featureIndex = _ref4; + + var record = this.table.featureList[featureIndex]; + var substituteFeature = this.substituteFeatureForVariations(featureIndex); + this.features[record.tag] = substituteFeature || record.feature; + } + } + } + }; + + OTProcessor.prototype.lookupsForFeatures = function lookupsForFeatures() { + var userFeatures = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : []; + var exclude = arguments[1]; + + var lookups = []; + for (var _iterator5 = userFeatures, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _getIterator(_iterator5);;) { + var _ref5; + + if (_isArray5) { + if (_i5 >= _iterator5.length) break; + _ref5 = _iterator5[_i5++]; + } else { + _i5 = _iterator5.next(); + if (_i5.done) break; + _ref5 = _i5.value; + } + + var tag = _ref5; + + var feature = this.features[tag]; + if (!feature) { + continue; + } + + for (var _iterator6 = feature.lookupListIndexes, _isArray6 = Array.isArray(_iterator6), _i6 = 0, _iterator6 = _isArray6 ? _iterator6 : _getIterator(_iterator6);;) { + var _ref6; + + if (_isArray6) { + if (_i6 >= _iterator6.length) break; + _ref6 = _iterator6[_i6++]; + } else { + _i6 = _iterator6.next(); + if (_i6.done) break; + _ref6 = _i6.value; + } + + var lookupIndex = _ref6; + + if (exclude && exclude.indexOf(lookupIndex) !== -1) { + continue; + } + + lookups.push({ + feature: tag, + index: lookupIndex, + lookup: this.table.lookupList.get(lookupIndex) + }); + } + } + + lookups.sort(function (a, b) { + return a.index - b.index; + }); + return lookups; + }; + + OTProcessor.prototype.substituteFeatureForVariations = function substituteFeatureForVariations(featureIndex) { + if (this.variationsIndex === -1) { + return null; + } + + var record = this.table.featureVariations.featureVariationRecords[this.variationsIndex]; + var substitutions = record.featureTableSubstitution.substitutions; + for (var _iterator7 = substitutions, _isArray7 = Array.isArray(_iterator7), _i7 = 0, _iterator7 = _isArray7 ? _iterator7 : _getIterator(_iterator7);;) { + var _ref7; + + if (_isArray7) { + if (_i7 >= _iterator7.length) break; + _ref7 = _iterator7[_i7++]; + } else { + _i7 = _iterator7.next(); + if (_i7.done) break; + _ref7 = _i7.value; + } + + var substitution = _ref7; + + if (substitution.featureIndex === featureIndex) { + return substitution.alternateFeatureTable; + } + } + + return null; + }; + + OTProcessor.prototype.findVariationsIndex = function findVariationsIndex(coords) { + var variations = this.table.featureVariations; + if (!variations) { + return -1; + } + + var records = variations.featureVariationRecords; + for (var i = 0; i < records.length; i++) { + var conditions = records[i].conditionSet.conditionTable; + if (this.variationConditionsMatch(conditions, coords)) { + return i; + } + } + + return -1; + }; + + OTProcessor.prototype.variationConditionsMatch = function variationConditionsMatch(conditions, coords) { + return conditions.every(function (condition) { + var coord = condition.axisIndex < coords.length ? coords[condition.axisIndex] : 0; + return condition.filterRangeMinValue <= coord && coord <= condition.filterRangeMaxValue; + }); + }; + + OTProcessor.prototype.applyFeatures = function applyFeatures(userFeatures, glyphs, advances) { + var lookups = this.lookupsForFeatures(userFeatures); + this.applyLookups(lookups, glyphs, advances); + }; + + OTProcessor.prototype.applyLookups = function applyLookups(lookups, glyphs, positions) { + this.glyphs = glyphs; + this.positions = positions; + this.glyphIterator = new GlyphIterator(glyphs); + + for (var _iterator8 = lookups, _isArray8 = Array.isArray(_iterator8), _i8 = 0, _iterator8 = _isArray8 ? _iterator8 : _getIterator(_iterator8);;) { + var _ref8; + + if (_isArray8) { + if (_i8 >= _iterator8.length) break; + _ref8 = _iterator8[_i8++]; + } else { + _i8 = _iterator8.next(); + if (_i8.done) break; + _ref8 = _i8.value; + } + + var _ref9 = _ref8, + feature = _ref9.feature, + lookup = _ref9.lookup; + + this.glyphIterator.reset(lookup.flags); + + while (this.glyphIterator.index < glyphs.length) { + if (!(feature in this.glyphIterator.cur.features)) { + this.glyphIterator.next(); + continue; + } + + for (var _iterator9 = lookup.subTables, _isArray9 = Array.isArray(_iterator9), _i9 = 0, _iterator9 = _isArray9 ? _iterator9 : _getIterator(_iterator9);;) { + var _ref10; + + if (_isArray9) { + if (_i9 >= _iterator9.length) break; + _ref10 = _iterator9[_i9++]; + } else { + _i9 = _iterator9.next(); + if (_i9.done) break; + _ref10 = _i9.value; + } + + var table = _ref10; + + var res = this.applyLookup(lookup.lookupType, table); + if (res) { + break; + } + } + + this.glyphIterator.next(); + } + } + }; + + OTProcessor.prototype.applyLookup = function applyLookup(lookup, table) { + throw new Error("applyLookup must be implemented by subclasses"); + }; + + OTProcessor.prototype.applyLookupList = function applyLookupList(lookupRecords) { + var glyphIndex = this.glyphIterator.index; + + for (var _iterator10 = lookupRecords, _isArray10 = Array.isArray(_iterator10), _i10 = 0, _iterator10 = _isArray10 ? _iterator10 : _getIterator(_iterator10);;) { + var _ref11; + + if (_isArray10) { + if (_i10 >= _iterator10.length) break; + _ref11 = _iterator10[_i10++]; + } else { + _i10 = _iterator10.next(); + if (_i10.done) break; + _ref11 = _i10.value; + } + + var lookupRecord = _ref11; + + this.glyphIterator.index = glyphIndex; + this.glyphIterator.increment(lookupRecord.sequenceIndex); + + var lookup = this.table.lookupList.get(lookupRecord.lookupListIndex); + for (var _iterator11 = lookup.subTables, _isArray11 = Array.isArray(_iterator11), _i11 = 0, _iterator11 = _isArray11 ? _iterator11 : _getIterator(_iterator11);;) { + var _ref12; + + if (_isArray11) { + if (_i11 >= _iterator11.length) break; + _ref12 = _iterator11[_i11++]; + } else { + _i11 = _iterator11.next(); + if (_i11.done) break; + _ref12 = _i11.value; + } + + var table = _ref12; + + this.applyLookup(lookup.lookupType, table); + } + } + + this.glyphIterator.index = glyphIndex; + return true; + }; + + OTProcessor.prototype.coverageIndex = function coverageIndex(coverage, glyph) { + if (glyph == null) { + glyph = this.glyphIterator.cur.id; + } + + switch (coverage.version) { + case 1: + return coverage.glyphs.indexOf(glyph); + + case 2: + for (var _iterator12 = coverage.rangeRecords, _isArray12 = Array.isArray(_iterator12), _i12 = 0, _iterator12 = _isArray12 ? _iterator12 : _getIterator(_iterator12);;) { + var _ref13; + + if (_isArray12) { + if (_i12 >= _iterator12.length) break; + _ref13 = _iterator12[_i12++]; + } else { + _i12 = _iterator12.next(); + if (_i12.done) break; + _ref13 = _i12.value; + } + + var range = _ref13; + + if (range.start <= glyph && glyph <= range.end) { + return range.startCoverageIndex + glyph - range.start; + } + } + + break; + } + + return -1; + }; + + OTProcessor.prototype.match = function match(sequenceIndex, sequence, fn, matched) { + var pos = this.glyphIterator.index; + var glyph = this.glyphIterator.increment(sequenceIndex); + var idx = 0; + + while (idx < sequence.length && glyph && fn(sequence[idx], glyph.id)) { + if (matched) { + matched.push(this.glyphIterator.index); + } + + idx++; + glyph = this.glyphIterator.next(); + } + + this.glyphIterator.index = pos; + if (idx < sequence.length) { + return false; + } + + return matched || true; + }; + + OTProcessor.prototype.sequenceMatches = function sequenceMatches(sequenceIndex, sequence) { + return this.match(sequenceIndex, sequence, function (component, glyph) { + return component === glyph; + }); + }; + + OTProcessor.prototype.sequenceMatchIndices = function sequenceMatchIndices(sequenceIndex, sequence) { + return this.match(sequenceIndex, sequence, function (component, glyph) { + return component === glyph; + }, []); + }; + + OTProcessor.prototype.coverageSequenceMatches = function coverageSequenceMatches(sequenceIndex, sequence) { + var _this = this; + + return this.match(sequenceIndex, sequence, function (coverage, glyph) { + return _this.coverageIndex(coverage, glyph) >= 0; + }); + }; + + OTProcessor.prototype.getClassID = function getClassID(glyph, classDef) { + switch (classDef.version) { + case 1: + // Class array + var i = glyph - classDef.startGlyph; + if (i >= 0 && i < classDef.classValueArray.length) { + return classDef.classValueArray[i]; + } + + break; + + case 2: + for (var _iterator13 = classDef.classRangeRecord, _isArray13 = Array.isArray(_iterator13), _i13 = 0, _iterator13 = _isArray13 ? _iterator13 : _getIterator(_iterator13);;) { + var _ref14; + + if (_isArray13) { + if (_i13 >= _iterator13.length) break; + _ref14 = _iterator13[_i13++]; + } else { + _i13 = _iterator13.next(); + if (_i13.done) break; + _ref14 = _i13.value; + } + + var range = _ref14; + + if (range.start <= glyph && glyph <= range.end) { + return range.class; + } + } + + break; + } + + return 0; + }; + + OTProcessor.prototype.classSequenceMatches = function classSequenceMatches(sequenceIndex, sequence, classDef) { + var _this2 = this; + + return this.match(sequenceIndex, sequence, function (classID, glyph) { + return classID === _this2.getClassID(glyph, classDef); + }); + }; + + OTProcessor.prototype.applyContext = function applyContext(table) { + switch (table.version) { + case 1: + var index = this.coverageIndex(table.coverage); + if (index === -1) { + return false; + } + + var set = table.ruleSets[index]; + for (var _iterator14 = set, _isArray14 = Array.isArray(_iterator14), _i14 = 0, _iterator14 = _isArray14 ? _iterator14 : _getIterator(_iterator14);;) { + var _ref15; + + if (_isArray14) { + if (_i14 >= _iterator14.length) break; + _ref15 = _iterator14[_i14++]; + } else { + _i14 = _iterator14.next(); + if (_i14.done) break; + _ref15 = _i14.value; + } + + var rule = _ref15; + + if (this.sequenceMatches(1, rule.input)) { + return this.applyLookupList(rule.lookupRecords); + } + } + + break; + + case 2: + if (this.coverageIndex(table.coverage) === -1) { + return false; + } + + index = this.getClassID(this.glyphIterator.cur.id, table.classDef); + if (index === -1) { + return false; + } + + set = table.classSet[index]; + for (var _iterator15 = set, _isArray15 = Array.isArray(_iterator15), _i15 = 0, _iterator15 = _isArray15 ? _iterator15 : _getIterator(_iterator15);;) { + var _ref16; + + if (_isArray15) { + if (_i15 >= _iterator15.length) break; + _ref16 = _iterator15[_i15++]; + } else { + _i15 = _iterator15.next(); + if (_i15.done) break; + _ref16 = _i15.value; + } + + var _rule = _ref16; + + if (this.classSequenceMatches(1, _rule.classes, table.classDef)) { + return this.applyLookupList(_rule.lookupRecords); + } + } + + break; + + case 3: + if (this.coverageSequenceMatches(0, table.coverages)) { + return this.applyLookupList(table.lookupRecords); + } + + break; + } + + return false; + }; + + OTProcessor.prototype.applyChainingContext = function applyChainingContext(table) { + switch (table.version) { + case 1: + var index = this.coverageIndex(table.coverage); + if (index === -1) { + return false; + } + + var set = table.chainRuleSets[index]; + for (var _iterator16 = set, _isArray16 = Array.isArray(_iterator16), _i16 = 0, _iterator16 = _isArray16 ? _iterator16 : _getIterator(_iterator16);;) { + var _ref17; + + if (_isArray16) { + if (_i16 >= _iterator16.length) break; + _ref17 = _iterator16[_i16++]; + } else { + _i16 = _iterator16.next(); + if (_i16.done) break; + _ref17 = _i16.value; + } + + var rule = _ref17; + + if (this.sequenceMatches(-rule.backtrack.length, rule.backtrack) && this.sequenceMatches(1, rule.input) && this.sequenceMatches(1 + rule.input.length, rule.lookahead)) { + return this.applyLookupList(rule.lookupRecords); + } + } + + break; + + case 2: + if (this.coverageIndex(table.coverage) === -1) { + return false; + } + + index = this.getClassID(this.glyphIterator.cur.id, table.inputClassDef); + var rules = table.chainClassSet[index]; + if (!rules) { + return false; + } + + for (var _iterator17 = rules, _isArray17 = Array.isArray(_iterator17), _i17 = 0, _iterator17 = _isArray17 ? _iterator17 : _getIterator(_iterator17);;) { + var _ref18; + + if (_isArray17) { + if (_i17 >= _iterator17.length) break; + _ref18 = _iterator17[_i17++]; + } else { + _i17 = _iterator17.next(); + if (_i17.done) break; + _ref18 = _i17.value; + } + + var _rule2 = _ref18; + + if (this.classSequenceMatches(-_rule2.backtrack.length, _rule2.backtrack, table.backtrackClassDef) && this.classSequenceMatches(1, _rule2.input, table.inputClassDef) && this.classSequenceMatches(1 + _rule2.input.length, _rule2.lookahead, table.lookaheadClassDef)) { + return this.applyLookupList(_rule2.lookupRecords); + } + } + + break; + + case 3: + if (this.coverageSequenceMatches(-table.backtrackGlyphCount, table.backtrackCoverage) && this.coverageSequenceMatches(0, table.inputCoverage) && this.coverageSequenceMatches(table.inputGlyphCount, table.lookaheadCoverage)) { + return this.applyLookupList(table.lookupRecords); + } + + break; + } + + return false; + }; + + return OTProcessor; +}(); + +var GlyphInfo = function () { + function GlyphInfo(font, id) { + var codePoints = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; + var features = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : []; + + _classCallCheck(this, GlyphInfo); + + this._font = font; + this.codePoints = codePoints; + this.id = id; + + this.features = {}; + if (Array.isArray(features)) { + for (var i = 0; i < features.length; i++) { + var feature = features[i]; + this.features[feature] = true; + } + } else if ((typeof features === 'undefined' ? 'undefined' : _typeof(features)) === 'object') { + _Object$assign(this.features, features); + } + + this.ligatureID = null; + this.ligatureComponent = null; + this.ligated = false; + this.cursiveAttachment = null; + this.markAttachment = null; + this.shaperInfo = null; + this.substituted = false; + } + + _createClass(GlyphInfo, [{ + key: 'id', + get: function get() { + return this._id; + }, + set: function set(id) { + this._id = id; + this.substituted = true; + + if (this._font.GDEF && this._font.GDEF.glyphClassDef) { + // TODO: clean this up + var classID = OTProcessor.prototype.getClassID(id, this._font.GDEF.glyphClassDef); + this.isMark = classID === 3; + this.isLigature = classID === 2; + } else { + this.isMark = this.codePoints.every(unicode.isMark); + this.isLigature = this.codePoints.length > 1; + } + } + }]); + + return GlyphInfo; +}(); + +var _class$5; +var _temp$1; +/** + * This is a shaper for the Hangul script, used by the Korean language. + * It does the following: + * - decompose if unsupported by the font: + * -> + * -> + * -> + * + * - compose if supported by the font: + * -> + * -> + * -> + * + * - reorder tone marks (S is any valid syllable): + * -> + * + * - apply ljmo, vjmo, and tjmo OpenType features to decomposed Jamo sequences. + * + * This logic is based on the following documents: + * - http://www.microsoft.com/typography/OpenTypeDev/hangul/intro.htm + * - http://ktug.org/~nomos/harfbuzz-hangul/hangulshaper.pdf + */ +var HangulShaper = (_temp$1 = _class$5 = function (_DefaultShaper) { + _inherits(HangulShaper, _DefaultShaper); + + function HangulShaper() { + _classCallCheck(this, HangulShaper); + + return _possibleConstructorReturn(this, _DefaultShaper.apply(this, arguments)); + } + + HangulShaper.planFeatures = function planFeatures(plan) { + plan.add(['ljmo', 'vjmo', 'tjmo'], false); + }; + + HangulShaper.assignFeatures = function assignFeatures(plan, glyphs) { + var state = 0; + var i = 0; + while (i < glyphs.length) { + var action = void 0; + var glyph = glyphs[i]; + var code = glyph.codePoints[0]; + var type = getType(code); + + var _STATE_TABLE$state$ty = STATE_TABLE$1[state][type]; + action = _STATE_TABLE$state$ty[0]; + state = _STATE_TABLE$state$ty[1]; + + + switch (action) { + case DECOMPOSE: + // Decompose the composed syllable if it is not supported by the font. + if (!plan.font.hasGlyphForCodePoint(code)) { + i = decompose(glyphs, i, plan.font); + } + break; + + case COMPOSE: + // Found a decomposed syllable. Try to compose if supported by the font. + i = compose(glyphs, i, plan.font); + break; + + case TONE_MARK: + // Got a valid syllable, followed by a tone mark. Move the tone mark to the beginning of the syllable. + reorderToneMark(glyphs, i, plan.font); + break; + + case INVALID: + // Tone mark has no valid syllable to attach to, so insert a dotted circle + i = insertDottedCircle(glyphs, i, plan.font); + break; + } + + i++; + } + }; + + return HangulShaper; +}(DefaultShaper), _class$5.zeroMarkWidths = 'NONE', _temp$1); +var HANGUL_BASE = 0xac00; +var HANGUL_END = 0xd7a4; +var HANGUL_COUNT = HANGUL_END - HANGUL_BASE + 1; +var L_BASE = 0x1100; // lead +var V_BASE = 0x1161; // vowel +var T_BASE = 0x11a7; // trail +var L_COUNT = 19; +var V_COUNT = 21; +var T_COUNT = 28; +var L_END = L_BASE + L_COUNT - 1; +var V_END = V_BASE + V_COUNT - 1; +var T_END = T_BASE + T_COUNT - 1; +var DOTTED_CIRCLE = 0x25cc; + +var isL = function isL(code) { + return 0x1100 <= code && code <= 0x115f || 0xa960 <= code && code <= 0xa97c; +}; +var isV = function isV(code) { + return 0x1160 <= code && code <= 0x11a7 || 0xd7b0 <= code && code <= 0xd7c6; +}; +var isT = function isT(code) { + return 0x11a8 <= code && code <= 0x11ff || 0xd7cb <= code && code <= 0xd7fb; +}; +var isTone = function isTone(code) { + return 0x302e <= code && code <= 0x302f; +}; +var isLVT = function isLVT(code) { + return HANGUL_BASE <= code && code <= HANGUL_END; +}; +var isLV = function isLV(code) { + return code - HANGUL_BASE < HANGUL_COUNT && (code - HANGUL_BASE) % T_COUNT === 0; +}; +var isCombiningL = function isCombiningL(code) { + return L_BASE <= code && code <= L_END; +}; +var isCombiningV = function isCombiningV(code) { + return V_BASE <= code && code <= V_END; +}; +var isCombiningT = function isCombiningT(code) { + return T_BASE + 1 && 1 <= code && code <= T_END; +}; + +// Character categories +var X = 0; // Other character +var L = 1; // Leading consonant +var V = 2; // Medial vowel +var T = 3; // Trailing consonant +var LV = 4; // Composed syllable +var LVT = 5; // Composed syllable +var M = 6; // Tone mark + +// This function classifies a character using the above categories. +function getType(code) { + if (isL(code)) { + return L; + } + if (isV(code)) { + return V; + } + if (isT(code)) { + return T; + } + if (isLV(code)) { + return LV; + } + if (isLVT(code)) { + return LVT; + } + if (isTone(code)) { + return M; + } + return X; +} + +// State machine actions +var NO_ACTION = 0; +var DECOMPOSE = 1; +var COMPOSE = 2; +var TONE_MARK = 4; +var INVALID = 5; + +// Build a state machine that accepts valid syllables, and applies actions along the way. +// The logic this is implementing is documented at the top of the file. +var STATE_TABLE$1 = [ +// X L V T LV LVT M +// State 0: start state +[[NO_ACTION, 0], [NO_ACTION, 1], [NO_ACTION, 0], [NO_ACTION, 0], [DECOMPOSE, 2], [DECOMPOSE, 3], [INVALID, 0]], + +// State 1: +[[NO_ACTION, 0], [NO_ACTION, 1], [COMPOSE, 2], [NO_ACTION, 0], [DECOMPOSE, 2], [DECOMPOSE, 3], [INVALID, 0]], + +// State 2: or +[[NO_ACTION, 0], [NO_ACTION, 1], [NO_ACTION, 0], [COMPOSE, 3], [DECOMPOSE, 2], [DECOMPOSE, 3], [TONE_MARK, 0]], + +// State 3: or +[[NO_ACTION, 0], [NO_ACTION, 1], [NO_ACTION, 0], [NO_ACTION, 0], [DECOMPOSE, 2], [DECOMPOSE, 3], [TONE_MARK, 0]]]; + +function getGlyph(font, code, features) { + return new GlyphInfo(font, font.glyphForCodePoint(code).id, [code], features); +} + +function decompose(glyphs, i, font) { + var glyph = glyphs[i]; + var code = glyph.codePoints[0]; + + var s = code - HANGUL_BASE; + var t = T_BASE + s % T_COUNT; + s = s / T_COUNT | 0; + var l = L_BASE + s / V_COUNT | 0; + var v = V_BASE + s % V_COUNT; + + // Don't decompose if all of the components are not available + if (!font.hasGlyphForCodePoint(l) || !font.hasGlyphForCodePoint(v) || t !== T_BASE && !font.hasGlyphForCodePoint(t)) { + return i; + } + + // Replace the current glyph with decomposed L, V, and T glyphs, + // and apply the proper OpenType features to each component. + var ljmo = getGlyph(font, l, glyph.features); + ljmo.features.ljmo = true; + + var vjmo = getGlyph(font, v, glyph.features); + vjmo.features.vjmo = true; + + var insert = [ljmo, vjmo]; + + if (t > T_BASE) { + var tjmo = getGlyph(font, t, glyph.features); + tjmo.features.tjmo = true; + insert.push(tjmo); + } + + glyphs.splice.apply(glyphs, [i, 1].concat(insert)); + return i + insert.length - 1; +} + +function compose(glyphs, i, font) { + var glyph = glyphs[i]; + var code = glyphs[i].codePoints[0]; + var type = getType(code); + + var prev = glyphs[i - 1].codePoints[0]; + var prevType = getType(prev); + + // Figure out what type of syllable we're dealing with + var lv = void 0, + ljmo = void 0, + vjmo = void 0, + tjmo = void 0; + if (prevType === LV && type === T) { + // + lv = prev; + tjmo = glyph; + } else { + if (type === V) { + // + ljmo = glyphs[i - 1]; + vjmo = glyph; + } else { + // + ljmo = glyphs[i - 2]; + vjmo = glyphs[i - 1]; + tjmo = glyph; + } + + var l = ljmo.codePoints[0]; + var v = vjmo.codePoints[0]; + + // Make sure L and V are combining characters + if (isCombiningL(l) && isCombiningV(v)) { + lv = HANGUL_BASE + ((l - L_BASE) * V_COUNT + (v - V_BASE)) * T_COUNT; + } + } + + var t = tjmo && tjmo.codePoints[0] || T_BASE; + if (lv != null && (t === T_BASE || isCombiningT(t))) { + var s = lv + (t - T_BASE); + + // Replace with a composed glyph if supported by the font, + // otherwise apply the proper OpenType features to each component. + if (font.hasGlyphForCodePoint(s)) { + var del = prevType === V ? 3 : 2; + glyphs.splice(i - del + 1, del, getGlyph(font, s, glyph.features)); + return i - del + 1; + } + } + + // Didn't compose (either a non-combining component or unsupported by font). + if (ljmo) { + ljmo.features.ljmo = true; + } + if (vjmo) { + vjmo.features.vjmo = true; + } + if (tjmo) { + tjmo.features.tjmo = true; + } + + if (prevType === LV) { + // Sequence was originally , which got combined earlier. + // Either the T was non-combining, or the LVT glyph wasn't supported. + // Decompose the glyph again and apply OT features. + decompose(glyphs, i - 1, font); + return i + 1; + } + + return i; +} + +function getLength(code) { + switch (getType(code)) { + case LV: + case LVT: + return 1; + case V: + return 2; + case T: + return 3; + } +} + +function reorderToneMark(glyphs, i, font) { + var glyph = glyphs[i]; + var code = glyphs[i].codePoints[0]; + + // Move tone mark to the beginning of the previous syllable, unless it is zero width + if (font.glyphForCodePoint(code).advanceWidth === 0) { + return; + } + + var prev = glyphs[i - 1].codePoints[0]; + var len = getLength(prev); + + glyphs.splice(i, 1); + return glyphs.splice(i - len, 0, glyph); +} + +function insertDottedCircle(glyphs, i, font) { + var glyph = glyphs[i]; + var code = glyphs[i].codePoints[0]; + + if (font.hasGlyphForCodePoint(DOTTED_CIRCLE)) { + var dottedCircle = getGlyph(font, DOTTED_CIRCLE, glyph.features); + + // If the tone mark is zero width, insert the dotted circle before, otherwise after + var idx = font.glyphForCodePoint(code).advanceWidth === 0 ? i : i + 1; + glyphs.splice(idx, 0, dottedCircle); + i++; + } + + return i; +} + +var categories$1 = ["O", "IND", "S", "GB", "B", "FM", "CGJ", "VMAbv", "VMPst", "VAbv", "VPst", "CMBlw", "VPre", "VBlw", "H", "VMBlw", "CMAbv", "MBlw", "CS", "R", "SUB", "MPst", "MPre", "FAbv", "FPst", "FBlw", "SMAbv", "SMBlw", "VMPre", "ZWNJ", "ZWJ", "WJ", "VS", "N", "HN", "MAbv"]; +var decompositions$1 = { "2507": [2503, 2494], "2508": [2503, 2519], "2888": [2887, 2902], "2891": [2887, 2878], "2892": [2887, 2903], "3018": [3014, 3006], "3019": [3015, 3006], "3020": [3014, 3031], "3144": [3142, 3158], "3264": [3263, 3285], "3271": [3270, 3285], "3272": [3270, 3286], "3274": [3270, 3266], "3275": [3270, 3266, 3285], "3402": [3398, 3390], "3403": [3399, 3390], "3404": [3398, 3415], "3546": [3545, 3530], "3548": [3545, 3535], "3549": [3545, 3535, 3530], "3550": [3545, 3551], "3635": [3661, 3634], "3763": [3789, 3762], "3955": [3953, 3954], "3957": [3953, 3956], "3958": [4018, 3968], "3959": [4018, 3953, 3968], "3960": [4019, 3968], "3961": [4019, 3953, 3968], "3969": [3953, 3968], "6971": [6970, 6965], "6973": [6972, 6965], "6976": [6974, 6965], "6977": [6975, 6965], "6979": [6978, 6965], "69934": [69937, 69927], "69935": [69938, 69927], "70475": [70471, 70462], "70476": [70471, 70487], "70843": [70841, 70842], "70844": [70841, 70832], "70846": [70841, 70845], "71098": [71096, 71087], "71099": [71097, 71087] }; +var stateTable = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [2, 2, 3, 4, 4, 5, 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 0, 17, 0, 11, 18, 19, 20, 21, 0, 0, 22, 0, 0, 2, 0, 23, 0, 24], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 27, 0, 0, 0, 0, 26, 0, 0, 0], [0, 0, 0, 0, 0, 28, 0, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 0, 0, 0, 34, 40, 41, 42, 43, 0, 0, 44, 0, 0, 0, 38, 0, 0, 45], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 5, 0, 6, 7, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 19, 20, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 5, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 20, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 5, 0, 6, 7, 8, 9, 0, 0, 12, 0, 14, 0, 0, 0, 0, 0, 0, 0, 19, 20, 21, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 5, 0, 6, 7, 0, 9, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 19, 20, 21, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 5, 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 0, 16, 0, 0, 0, 11, 18, 19, 20, 21, 0, 0, 22, 0, 0, 0, 0, 0, 0, 24], [0, 0, 0, 0, 0, 5, 0, 6, 7, 8, 9, 0, 11, 12, 0, 14, 0, 0, 0, 0, 0, 0, 0, 19, 20, 21, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 5, 0, 6, 7, 0, 9, 0, 0, 12, 0, 14, 0, 0, 0, 0, 0, 0, 0, 19, 20, 21, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 46, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 5, 0, 0, 7, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 19, 20, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 5, 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 0, 0, 0, 11, 18, 19, 20, 21, 0, 0, 22, 0, 0, 0, 0, 0, 0, 24], [0, 0, 0, 0, 0, 5, 0, 6, 7, 8, 9, 0, 11, 12, 0, 14, 0, 0, 0, 0, 0, 11, 0, 19, 20, 21, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 4, 4, 5, 0, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 0, 0, 0, 11, 18, 19, 20, 21, 0, 0, 22, 0, 0, 0, 0, 0, 0, 24], [0, 0, 0, 0, 0, 5, 0, 6, 7, 8, 9, 0, 11, 12, 0, 14, 0, 16, 0, 0, 0, 11, 0, 19, 20, 21, 0, 0, 22, 0, 0, 0, 0, 0, 0, 24], [0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 19, 20, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 21, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 5, 0, 6, 7, 0, 0, 0, 0, 0, 0, 14, 0, 0, 0, 0, 0, 0, 0, 19, 20, 21, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 0, 48, 0], [0, 0, 0, 0, 0, 5, 0, 6, 7, 8, 9, 0, 11, 12, 0, 14, 0, 16, 0, 0, 0, 11, 0, 19, 20, 21, 0, 0, 22, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 26, 27, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 28, 0, 29, 30, 0, 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, 41, 42, 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 28, 0, 0, 30, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 42, 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 28, 0, 29, 30, 31, 32, 0, 0, 35, 0, 37, 0, 0, 0, 0, 0, 0, 0, 41, 42, 43, 0, 0, 44, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 28, 0, 29, 30, 0, 32, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, 41, 42, 43, 0, 0, 44, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 28, 0, 29, 30, 31, 32, 33, 34, 35, 36, 37, 0, 39, 0, 0, 0, 34, 40, 41, 42, 43, 0, 0, 44, 0, 0, 0, 0, 0, 0, 45], [0, 0, 0, 0, 0, 28, 0, 29, 30, 31, 32, 0, 34, 35, 0, 37, 0, 0, 0, 0, 0, 0, 0, 41, 42, 43, 0, 0, 44, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 28, 0, 29, 30, 0, 32, 0, 0, 35, 0, 37, 0, 0, 0, 0, 0, 0, 0, 41, 42, 43, 0, 0, 44, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 49, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 28, 0, 0, 30, 0, 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, 41, 42, 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 28, 0, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 0, 0, 0, 34, 40, 41, 42, 43, 0, 0, 44, 0, 0, 0, 0, 0, 0, 45], [0, 0, 0, 0, 0, 28, 0, 29, 30, 31, 32, 0, 34, 35, 0, 37, 0, 0, 0, 0, 0, 34, 0, 41, 42, 43, 0, 0, 44, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 28, 0, 29, 30, 31, 32, 0, 34, 35, 0, 37, 0, 39, 0, 0, 0, 34, 0, 41, 42, 43, 0, 0, 44, 0, 0, 0, 0, 0, 0, 45], [0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 41, 42, 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 28, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 43, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 28, 0, 29, 30, 0, 0, 0, 0, 0, 0, 37, 0, 0, 0, 0, 0, 0, 0, 41, 42, 43, 0, 0, 44, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 28, 0, 29, 30, 31, 32, 0, 34, 35, 0, 37, 0, 39, 0, 0, 0, 34, 0, 41, 42, 43, 0, 0, 44, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 5, 0, 6, 7, 8, 9, 50, 11, 12, 13, 14, 50, 16, 0, 0, 0, 11, 18, 19, 20, 21, 0, 0, 22, 0, 0, 0, 51, 0, 0, 24], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 52, 0, 0], [0, 0, 0, 0, 0, 28, 0, 29, 30, 31, 32, 53, 34, 35, 36, 37, 53, 39, 0, 0, 0, 34, 40, 41, 42, 43, 0, 0, 44, 0, 0, 0, 54, 0, 0, 45], [0, 0, 0, 0, 0, 5, 0, 6, 7, 8, 9, 50, 11, 12, 13, 14, 0, 16, 0, 0, 0, 11, 18, 19, 20, 21, 0, 0, 22, 0, 0, 0, 0, 0, 0, 24], [0, 0, 0, 0, 0, 5, 0, 6, 7, 8, 9, 50, 11, 12, 13, 14, 50, 16, 0, 0, 0, 11, 18, 19, 20, 21, 0, 0, 22, 0, 0, 0, 0, 0, 0, 24], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 47, 0, 48, 0], [0, 0, 0, 0, 0, 28, 0, 29, 30, 31, 32, 53, 34, 35, 36, 37, 0, 39, 0, 0, 0, 34, 40, 41, 42, 43, 0, 0, 44, 0, 0, 0, 0, 0, 0, 45], [0, 0, 0, 0, 0, 28, 0, 29, 30, 31, 32, 53, 34, 35, 36, 37, 53, 39, 0, 0, 0, 34, 40, 41, 42, 43, 0, 0, 44, 0, 0, 0, 0, 0, 0, 45]]; +var accepting = [false, true, true, true, true, true, true, true, true, true, true, true, true, false, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true, true]; +var tags = [[], ["broken_cluster"], ["independent_cluster"], ["symbol_cluster"], ["standard_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], [], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["broken_cluster"], ["numeral_cluster"], ["broken_cluster"], ["independent_cluster"], ["symbol_cluster"], ["symbol_cluster"], ["standard_cluster"], ["standard_cluster"], ["standard_cluster"], ["standard_cluster"], ["standard_cluster"], ["standard_cluster"], ["standard_cluster"], ["standard_cluster"], ["virama_terminated_cluster"], ["standard_cluster"], ["standard_cluster"], ["standard_cluster"], ["standard_cluster"], ["standard_cluster"], ["standard_cluster"], ["standard_cluster"], ["standard_cluster"], ["standard_cluster"], ["broken_cluster"], ["numeral_cluster"], ["number_joiner_terminated_cluster"], ["standard_cluster"], ["broken_cluster"], ["broken_cluster"], ["numeral_cluster"], ["standard_cluster"], ["standard_cluster"]]; +var useData = { + categories: categories$1, + decompositions: decompositions$1, + stateTable: stateTable, + accepting: accepting, + tags: tags +}; + +var _class$6; +var _temp$2; +var categories = useData.categories; +var decompositions = useData.decompositions; +var trie$1 = new UnicodeTrie(require('fs').readFileSync(__dirname + '/use.trie')); +var stateMachine = new StateMachine(useData); + +/** + * This shaper is an implementation of the Universal Shaping Engine, which + * uses Unicode data to shape a number of scripts without a dedicated shaping engine. + * See https://www.microsoft.com/typography/OpenTypeDev/USE/intro.htm. + */ +var UniversalShaper = (_temp$2 = _class$6 = function (_DefaultShaper) { + _inherits(UniversalShaper, _DefaultShaper); + + function UniversalShaper() { + _classCallCheck(this, UniversalShaper); + + return _possibleConstructorReturn(this, _DefaultShaper.apply(this, arguments)); + } + + UniversalShaper.planFeatures = function planFeatures(plan) { + plan.addStage(setupSyllables); + + // Default glyph pre-processing group + plan.addStage(['locl', 'ccmp', 'nukt', 'akhn']); + + // Reordering group + plan.addStage(clearSubstitutionFlags); + plan.addStage(['rphf'], false); + plan.addStage(recordRphf); + plan.addStage(clearSubstitutionFlags); + plan.addStage(['pref']); + plan.addStage(recordPref); + + // Orthographic unit shaping group + plan.addStage(['rkrf', 'abvf', 'blwf', 'half', 'pstf', 'vatu', 'cjct']); + plan.addStage(reorder); + + // Topographical features + // Scripts that need this are handled by the Arabic shaper, not implemented here for now. + // plan.addStage(['isol', 'init', 'medi', 'fina', 'med2', 'fin2', 'fin3'], false); + + // Standard topographic presentation and positional feature application + plan.addStage(['abvs', 'blws', 'pres', 'psts', 'dist', 'abvm', 'blwm']); + }; + + UniversalShaper.assignFeatures = function assignFeatures(plan, glyphs) { + var _loop = function _loop(i) { + var codepoint = glyphs[i].codePoints[0]; + if (decompositions[codepoint]) { + var decomposed = decompositions[codepoint].map(function (c) { + var g = plan.font.glyphForCodePoint(c); + return new GlyphInfo(plan.font, g.id, [c], glyphs[i].features); + }); + + glyphs.splice.apply(glyphs, [i, 1].concat(decomposed)); + } + }; + + // Decompose split vowels + // TODO: do this in a more general unicode normalizer + for (var i = glyphs.length - 1; i >= 0; i--) { + _loop(i); + } + }; + + return UniversalShaper; +}(DefaultShaper), _class$6.zeroMarkWidths = 'BEFORE_GPOS', _temp$2); +function useCategory(glyph) { + return trie$1.get(glyph.codePoints[0]); +} + +var USEInfo = function USEInfo(category, syllableType, syllable) { + _classCallCheck(this, USEInfo); + + this.category = category; + this.syllableType = syllableType; + this.syllable = syllable; +}; + +function setupSyllables(font, glyphs) { + var syllable = 0; + for (var _iterator = stateMachine.match(glyphs.map(useCategory)), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var _ref2 = _ref, + start = _ref2[0], + end = _ref2[1], + tags = _ref2[2]; + + ++syllable; + + // Create shaper info + for (var i = start; i <= end; i++) { + glyphs[i].shaperInfo = new USEInfo(categories[useCategory(glyphs[i])], tags[0], syllable); + } + + // Assign rphf feature + var limit = glyphs[start].shaperInfo.category === 'R' ? 1 : Math.min(3, end - start); + for (var _i2 = start; _i2 < start + limit; _i2++) { + glyphs[_i2].features.rphf = true; + } + } +} + +function clearSubstitutionFlags(font, glyphs) { + for (var _iterator2 = glyphs, _isArray2 = Array.isArray(_iterator2), _i3 = 0, _iterator2 = _isArray2 ? _iterator2 : _getIterator(_iterator2);;) { + var _ref3; + + if (_isArray2) { + if (_i3 >= _iterator2.length) break; + _ref3 = _iterator2[_i3++]; + } else { + _i3 = _iterator2.next(); + if (_i3.done) break; + _ref3 = _i3.value; + } + + var glyph = _ref3; + + glyph.substituted = false; + } +} + +function recordRphf(font, glyphs) { + for (var _iterator3 = glyphs, _isArray3 = Array.isArray(_iterator3), _i4 = 0, _iterator3 = _isArray3 ? _iterator3 : _getIterator(_iterator3);;) { + var _ref4; + + if (_isArray3) { + if (_i4 >= _iterator3.length) break; + _ref4 = _iterator3[_i4++]; + } else { + _i4 = _iterator3.next(); + if (_i4.done) break; + _ref4 = _i4.value; + } + + var glyph = _ref4; + + if (glyph.substituted && glyph.features.rphf) { + // Mark a substituted repha. + glyph.shaperInfo.category = 'R'; + } + } +} + +function recordPref(font, glyphs) { + for (var _iterator4 = glyphs, _isArray4 = Array.isArray(_iterator4), _i5 = 0, _iterator4 = _isArray4 ? _iterator4 : _getIterator(_iterator4);;) { + var _ref5; + + if (_isArray4) { + if (_i5 >= _iterator4.length) break; + _ref5 = _iterator4[_i5++]; + } else { + _i5 = _iterator4.next(); + if (_i5.done) break; + _ref5 = _i5.value; + } + + var glyph = _ref5; + + if (glyph.substituted) { + // Mark a substituted pref as VPre, as they behave the same way. + glyph.shaperInfo.category = 'VPre'; + } + } +} + +function reorder(font, glyphs) { + var dottedCircle = font.glyphForCodePoint(0x25cc).id; + + for (var start = 0, end = nextSyllable(glyphs, 0); start < glyphs.length; start = end, end = nextSyllable(glyphs, start)) { + var i = void 0, + j = void 0; + var info = glyphs[start].shaperInfo; + var type = info.syllableType; + + // Only a few syllable types need reordering. + if (type !== 'virama_terminated_cluster' && type !== 'standard_cluster' && type !== 'broken_cluster') { + continue; + } + + // Insert a dotted circle glyph in broken clusters. + if (type === 'broken_cluster' && dottedCircle) { + var g = new GlyphInfo(font, dottedCircle, [0x25cc]); + g.shaperInfo = info; + + // Insert after possible Repha. + for (i = start; i < end && glyphs[i].shaperInfo.category === 'R'; i++) {} + glyphs.splice(++i, 0, g); + end++; + } + + // Move things forward. + if (info.category === 'R' && end - start > 1) { + // Got a repha. Reorder it to after first base, before first halant. + for (i = start + 1; i < end; i++) { + info = glyphs[i].shaperInfo; + if (isBase(info) || isHalant(glyphs[i])) { + // If we hit a halant, move before it; otherwise it's a base: move to it's + // place, and shift things in between backward. + if (isHalant(glyphs[i])) { + i--; + } + + glyphs.splice.apply(glyphs, [start, 0].concat(glyphs.splice(start + 1, i - start), [glyphs[i]])); + break; + } + } + } + + // Move things back. + for (i = start, j = end; i < end; i++) { + info = glyphs[i].shaperInfo; + if (isBase(info) || isHalant(glyphs[i])) { + // If we hit a halant, move after it; otherwise it's a base: move to it's + // place, and shift things in between backward. + j = isHalant(glyphs[i]) ? i + 1 : i; + } else if ((info.category === 'VPre' || info.category === 'VMPre') && j < i) { + glyphs.splice.apply(glyphs, [j, 1, glyphs[i]].concat(glyphs.splice(j, i - j))); + } + } + } +} + +function nextSyllable(glyphs, start) { + if (start >= glyphs.length) return start; + var syllable = glyphs[start].shaperInfo.syllable; + while (++start < glyphs.length && glyphs[start].shaperInfo.syllable === syllable) {} + return start; +} + +function isHalant(glyph) { + return glyph.shaperInfo.category === 'H' && !glyph.isLigated; +} + +function isBase(info) { + return info.category === 'B' || info.category === 'GB'; +} + +var SHAPERS = { + arab: ArabicShaper, // Arabic + mong: ArabicShaper, // Mongolian + syrc: ArabicShaper, // Syriac + 'nko ': ArabicShaper, // N'Ko + phag: ArabicShaper, // Phags Pa + mand: ArabicShaper, // Mandaic + mani: ArabicShaper, // Manichaean + phlp: ArabicShaper, // Psalter Pahlavi + + hang: HangulShaper, // Hangul + + bali: UniversalShaper, // Balinese + batk: UniversalShaper, // Batak + brah: UniversalShaper, // Brahmi + bugi: UniversalShaper, // Buginese + buhd: UniversalShaper, // Buhid + cakm: UniversalShaper, // Chakma + cham: UniversalShaper, // Cham + dupl: UniversalShaper, // Duployan + egyp: UniversalShaper, // Egyptian Hieroglyphs + gran: UniversalShaper, // Grantha + hano: UniversalShaper, // Hanunoo + java: UniversalShaper, // Javanese + kthi: UniversalShaper, // Kaithi + kali: UniversalShaper, // Kayah Li + khar: UniversalShaper, // Kharoshthi + khoj: UniversalShaper, // Khojki + sind: UniversalShaper, // Khudawadi + lepc: UniversalShaper, // Lepcha + limb: UniversalShaper, // Limbu + mahj: UniversalShaper, // Mahajani + // mand: UniversalShaper, // Mandaic + // mani: UniversalShaper, // Manichaean + mtei: UniversalShaper, // Meitei Mayek + modi: UniversalShaper, // Modi + // mong: UniversalShaper, // Mongolian + // 'nko ': UniversalShaper, // N’Ko + hmng: UniversalShaper, // Pahawh Hmong + // phag: UniversalShaper, // Phags-pa + // phlp: UniversalShaper, // Psalter Pahlavi + rjng: UniversalShaper, // Rejang + saur: UniversalShaper, // Saurashtra + shrd: UniversalShaper, // Sharada + sidd: UniversalShaper, // Siddham + sinh: UniversalShaper, // Sinhala + sund: UniversalShaper, // Sundanese + sylo: UniversalShaper, // Syloti Nagri + tglg: UniversalShaper, // Tagalog + tagb: UniversalShaper, // Tagbanwa + tale: UniversalShaper, // Tai Le + lana: UniversalShaper, // Tai Tham + tavt: UniversalShaper, // Tai Viet + takr: UniversalShaper, // Takri + tibt: UniversalShaper, // Tibetan + tfng: UniversalShaper, // Tifinagh + tirh: UniversalShaper, // Tirhuta + + latn: DefaultShaper, // Latin + DFLT: DefaultShaper // Default +}; + +function choose(script) { + var shaper = SHAPERS[script]; + if (shaper) { + return shaper; + } + + return DefaultShaper; +} + +var GSUBProcessor = function (_OTProcessor) { + _inherits(GSUBProcessor, _OTProcessor); + + function GSUBProcessor() { + _classCallCheck(this, GSUBProcessor); + + return _possibleConstructorReturn(this, _OTProcessor.apply(this, arguments)); + } + + GSUBProcessor.prototype.applyLookup = function applyLookup(lookupType, table) { + var _this2 = this; + + switch (lookupType) { + case 1: + { + // Single Substitution + var index = this.coverageIndex(table.coverage); + if (index === -1) { + return false; + } + + var glyph = this.glyphIterator.cur; + switch (table.version) { + case 1: + glyph.id = glyph.id + table.deltaGlyphID & 0xffff; + break; + + case 2: + glyph.id = table.substitute.get(index); + break; + } + + return true; + } + + case 2: + { + // Multiple Substitution + var _index = this.coverageIndex(table.coverage); + if (_index !== -1) { + var _ret = function () { + var _glyphs; + + var sequence = table.sequences.get(_index); + _this2.glyphIterator.cur.id = sequence[0]; + _this2.glyphIterator.cur.ligatureComponent = 0; + + var features = _this2.glyphIterator.cur.features; + var curGlyph = _this2.glyphIterator.cur; + var replacement = sequence.slice(1).map(function (gid, i) { + var glyph = new GlyphInfo(_this2.font, gid, undefined, features); + glyph.shaperInfo = curGlyph.shaperInfo; + glyph.isLigated = curGlyph.isLigated; + glyph.ligatureComponent = i + 1; + glyph.substituted = true; + return glyph; + }); + + (_glyphs = _this2.glyphs).splice.apply(_glyphs, [_this2.glyphIterator.index + 1, 0].concat(replacement)); + return { + v: true + }; + }(); + + if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === "object") return _ret.v; + } + + return false; + } + + case 3: + { + // Alternate Substitution + var _index2 = this.coverageIndex(table.coverage); + if (_index2 !== -1) { + var USER_INDEX = 0; // TODO + this.glyphIterator.cur.id = table.alternateSet.get(_index2)[USER_INDEX]; + return true; + } + + return false; + } + + case 4: + { + // Ligature Substitution + var _index3 = this.coverageIndex(table.coverage); + if (_index3 === -1) { + return false; + } + + for (var _iterator = table.ligatureSets.get(_index3), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var ligature = _ref; + + var matched = this.sequenceMatchIndices(1, ligature.components); + if (!matched) { + continue; + } + + var _curGlyph = this.glyphIterator.cur; + + // Concatenate all of the characters the new ligature will represent + var characters = _curGlyph.codePoints.slice(); + for (var _iterator2 = matched, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _getIterator(_iterator2);;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var _index4 = _ref2; + + characters.push.apply(characters, this.glyphs[_index4].codePoints); + } + + // Create the replacement ligature glyph + var ligatureGlyph = new GlyphInfo(this.font, ligature.glyph, characters, _curGlyph.features); + ligatureGlyph.shaperInfo = _curGlyph.shaperInfo; + ligatureGlyph.isLigated = true; + ligatureGlyph.substituted = true; + + // From Harfbuzz: + // - If it *is* a mark ligature, we don't allocate a new ligature id, and leave + // the ligature to keep its old ligature id. This will allow it to attach to + // a base ligature in GPOS. Eg. if the sequence is: LAM,LAM,SHADDA,FATHA,HEH, + // and LAM,LAM,HEH for a ligature, they will leave SHADDA and FATHA with a + // ligature id and component value of 2. Then if SHADDA,FATHA form a ligature + // later, we don't want them to lose their ligature id/component, otherwise + // GPOS will fail to correctly position the mark ligature on top of the + // LAM,LAM,HEH ligature. See https://bugzilla.gnome.org/show_bug.cgi?id=676343 + // + // - If a ligature is formed of components that some of which are also ligatures + // themselves, and those ligature components had marks attached to *their* + // components, we have to attach the marks to the new ligature component + // positions! Now *that*'s tricky! And these marks may be following the + // last component of the whole sequence, so we should loop forward looking + // for them and update them. + // + // Eg. the sequence is LAM,LAM,SHADDA,FATHA,HEH, and the font first forms a + // 'calt' ligature of LAM,HEH, leaving the SHADDA and FATHA with a ligature + // id and component == 1. Now, during 'liga', the LAM and the LAM-HEH ligature + // form a LAM-LAM-HEH ligature. We need to reassign the SHADDA and FATHA to + // the new ligature with a component value of 2. + // + // This in fact happened to a font... See https://bugzilla.gnome.org/show_bug.cgi?id=437633 + var isMarkLigature = _curGlyph.isMark; + for (var i = 0; i < matched.length && isMarkLigature; i++) { + isMarkLigature = this.glyphs[matched[i]].isMark; + } + + ligatureGlyph.ligatureID = isMarkLigature ? null : this.ligatureID++; + + var lastLigID = _curGlyph.ligatureID; + var lastNumComps = _curGlyph.codePoints.length; + var curComps = lastNumComps; + var idx = this.glyphIterator.index + 1; + + // Set ligatureID and ligatureComponent on glyphs that were skipped in the matched sequence. + // This allows GPOS to attach marks to the correct ligature components. + for (var _iterator3 = matched, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _getIterator(_iterator3);;) { + var _ref3; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref3 = _i3.value; + } + + var matchIndex = _ref3; + + // Don't assign new ligature components for mark ligatures (see above) + if (isMarkLigature) { + idx = matchIndex; + } else { + while (idx < matchIndex) { + var ligatureComponent = curComps - lastNumComps + Math.min(this.glyphs[idx].ligatureComponent || 1, lastNumComps); + this.glyphs[idx].ligatureID = ligatureGlyph.ligatureID; + this.glyphs[idx].ligatureComponent = ligatureComponent; + idx++; + } + } + + lastLigID = this.glyphs[idx].ligatureID; + lastNumComps = this.glyphs[idx].codePoints.length; + curComps += lastNumComps; + idx++; // skip base glyph + } + + // Adjust ligature components for any marks following + if (lastLigID && !isMarkLigature) { + for (var _i4 = idx; _i4 < this.glyphs.length; _i4++) { + if (this.glyphs[_i4].ligatureID === lastLigID) { + var ligatureComponent = curComps - lastNumComps + Math.min(this.glyphs[_i4].ligatureComponent || 1, lastNumComps); + this.glyphs[_i4].ligatureComponent = ligatureComponent; + } else { + break; + } + } + } + + // Delete the matched glyphs, and replace the current glyph with the ligature glyph + for (var _i5 = matched.length - 1; _i5 >= 0; _i5--) { + this.glyphs.splice(matched[_i5], 1); + } + + this.glyphs[this.glyphIterator.index] = ligatureGlyph; + return true; + } + + return false; + } + + case 5: + // Contextual Substitution + return this.applyContext(table); + + case 6: + // Chaining Contextual Substitution + return this.applyChainingContext(table); + + case 7: + // Extension Substitution + return this.applyLookup(table.lookupType, table.extension); + + default: + throw new Error('GSUB lookupType ' + lookupType + ' is not supported'); + } + }; + + return GSUBProcessor; +}(OTProcessor); + +var GPOSProcessor = function (_OTProcessor) { + _inherits(GPOSProcessor, _OTProcessor); + + function GPOSProcessor() { + _classCallCheck(this, GPOSProcessor); + + return _possibleConstructorReturn(this, _OTProcessor.apply(this, arguments)); + } + + GPOSProcessor.prototype.applyPositionValue = function applyPositionValue(sequenceIndex, value) { + var position = this.positions[this.glyphIterator.peekIndex(sequenceIndex)]; + if (value.xAdvance != null) { + position.xAdvance += value.xAdvance; + } + + if (value.yAdvance != null) { + position.yAdvance += value.yAdvance; + } + + if (value.xPlacement != null) { + position.xOffset += value.xPlacement; + } + + if (value.yPlacement != null) { + position.yOffset += value.yPlacement; + } + + // TODO: device tables + }; + + GPOSProcessor.prototype.applyLookup = function applyLookup(lookupType, table) { + switch (lookupType) { + case 1: + { + // Single positioning value + var index = this.coverageIndex(table.coverage); + if (index === -1) { + return false; + } + + switch (table.version) { + case 1: + this.applyPositionValue(0, table.value); + break; + + case 2: + this.applyPositionValue(0, table.values.get(index)); + break; + } + + return true; + } + + case 2: + { + // Pair Adjustment Positioning + var nextGlyph = this.glyphIterator.peek(); + if (!nextGlyph) { + return false; + } + + var _index = this.coverageIndex(table.coverage); + if (_index === -1) { + return false; + } + + switch (table.version) { + case 1: + // Adjustments for glyph pairs + var set = table.pairSets.get(_index); + + for (var _iterator = set, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var _pair = _ref; + + if (_pair.secondGlyph === nextGlyph.id) { + this.applyPositionValue(0, _pair.value1); + this.applyPositionValue(1, _pair.value2); + return true; + } + } + + return false; + + case 2: + // Class pair adjustment + var class1 = this.getClassID(this.glyphIterator.cur.id, table.classDef1); + var class2 = this.getClassID(nextGlyph.id, table.classDef2); + if (class1 === -1 || class2 === -1) { + return false; + } + + var pair = table.classRecords.get(class1).get(class2); + this.applyPositionValue(0, pair.value1); + this.applyPositionValue(1, pair.value2); + return true; + } + } + + case 3: + { + // Cursive Attachment Positioning + var nextIndex = this.glyphIterator.peekIndex(); + var _nextGlyph = this.glyphs[nextIndex]; + if (!_nextGlyph) { + return false; + } + + var curRecord = table.entryExitRecords[this.coverageIndex(table.coverage)]; + if (!curRecord || !curRecord.exitAnchor) { + return false; + } + + var nextRecord = table.entryExitRecords[this.coverageIndex(table.coverage, _nextGlyph.id)]; + if (!nextRecord || !nextRecord.entryAnchor) { + return false; + } + + var entry = this.getAnchor(nextRecord.entryAnchor); + var exit = this.getAnchor(curRecord.exitAnchor); + + var cur = this.positions[this.glyphIterator.index]; + var next = this.positions[nextIndex]; + + switch (this.direction) { + case 'ltr': + cur.xAdvance = exit.x + cur.xOffset; + + var d = entry.x + next.xOffset; + next.xAdvance -= d; + next.xOffset -= d; + break; + + case 'rtl': + d = exit.x + cur.xOffset; + cur.xAdvance -= d; + cur.xOffset -= d; + next.xAdvance = entry.x + next.xOffset; + break; + } + + if (this.glyphIterator.flags.rightToLeft) { + this.glyphIterator.cur.cursiveAttachment = nextIndex; + cur.yOffset = entry.y - exit.y; + } else { + _nextGlyph.cursiveAttachment = this.glyphIterator.index; + cur.yOffset = exit.y - entry.y; + } + + return true; + } + + case 4: + { + // Mark to base positioning + var markIndex = this.coverageIndex(table.markCoverage); + if (markIndex === -1) { + return false; + } + + // search backward for a base glyph + var baseGlyphIndex = this.glyphIterator.index; + while (--baseGlyphIndex >= 0 && this.glyphs[baseGlyphIndex].isMark) {} + + if (baseGlyphIndex < 0) { + return false; + } + + var baseIndex = this.coverageIndex(table.baseCoverage, this.glyphs[baseGlyphIndex].id); + if (baseIndex === -1) { + return false; + } + + var markRecord = table.markArray[markIndex]; + var baseAnchor = table.baseArray[baseIndex][markRecord.class]; + this.applyAnchor(markRecord, baseAnchor, baseGlyphIndex); + return true; + } + + case 5: + { + // Mark to ligature positioning + var _markIndex = this.coverageIndex(table.markCoverage); + if (_markIndex === -1) { + return false; + } + + // search backward for a base glyph + var _baseGlyphIndex = this.glyphIterator.index; + while (--_baseGlyphIndex >= 0 && this.glyphs[_baseGlyphIndex].isMark) {} + + if (_baseGlyphIndex < 0) { + return false; + } + + var ligIndex = this.coverageIndex(table.ligatureCoverage, this.glyphs[_baseGlyphIndex].id); + if (ligIndex === -1) { + return false; + } + + var ligAttach = table.ligatureArray[ligIndex]; + var markGlyph = this.glyphIterator.cur; + var ligGlyph = this.glyphs[_baseGlyphIndex]; + var compIndex = ligGlyph.ligatureID && ligGlyph.ligatureID === markGlyph.ligatureID && markGlyph.ligatureComponent != null ? Math.min(markGlyph.ligatureComponent, ligGlyph.codePoints.length) - 1 : ligGlyph.codePoints.length - 1; + + var _markRecord = table.markArray[_markIndex]; + var _baseAnchor = ligAttach[compIndex][_markRecord.class]; + this.applyAnchor(_markRecord, _baseAnchor, _baseGlyphIndex); + return true; + } + + case 6: + { + // Mark to mark positioning + var mark1Index = this.coverageIndex(table.mark1Coverage); + if (mark1Index === -1) { + return false; + } + + // get the previous mark to attach to + var prevIndex = this.glyphIterator.peekIndex(-1); + var prev = this.glyphs[prevIndex]; + if (!prev || !prev.isMark) { + return false; + } + + var _cur = this.glyphIterator.cur; + + // The following logic was borrowed from Harfbuzz + var good = false; + if (_cur.ligatureID === prev.ligatureID) { + if (!_cur.ligatureID) { + // Marks belonging to the same base + good = true; + } else if (_cur.ligatureComponent === prev.ligatureComponent) { + // Marks belonging to the same ligature component + good = true; + } + } else { + // If ligature ids don't match, it may be the case that one of the marks + // itself is a ligature, in which case match. + if (_cur.ligatureID && !_cur.ligatureComponent || prev.ligatureID && !prev.ligatureComponent) { + good = true; + } + } + + if (!good) { + return false; + } + + var mark2Index = this.coverageIndex(table.mark2Coverage, prev.id); + if (mark2Index === -1) { + return false; + } + + var _markRecord2 = table.mark1Array[mark1Index]; + var _baseAnchor2 = table.mark2Array[mark2Index][_markRecord2.class]; + this.applyAnchor(_markRecord2, _baseAnchor2, prevIndex); + return true; + } + + case 7: + // Contextual positioning + return this.applyContext(table); + + case 8: + // Chaining contextual positioning + return this.applyChainingContext(table); + + case 9: + // Extension positioning + return this.applyLookup(table.lookupType, table.extension); + + default: + throw new Error('Unsupported GPOS table: ' + lookupType); + } + }; + + GPOSProcessor.prototype.applyAnchor = function applyAnchor(markRecord, baseAnchor, baseGlyphIndex) { + var baseCoords = this.getAnchor(baseAnchor); + var markCoords = this.getAnchor(markRecord.markAnchor); + + var basePos = this.positions[baseGlyphIndex]; + var markPos = this.positions[this.glyphIterator.index]; + + markPos.xOffset = baseCoords.x - markCoords.x; + markPos.yOffset = baseCoords.y - markCoords.y; + this.glyphIterator.cur.markAttachment = baseGlyphIndex; + }; + + GPOSProcessor.prototype.getAnchor = function getAnchor(anchor) { + // TODO: contour point, device tables + return { + x: anchor.xCoordinate, + y: anchor.yCoordinate + }; + }; + + GPOSProcessor.prototype.applyFeatures = function applyFeatures(userFeatures, glyphs, advances) { + _OTProcessor.prototype.applyFeatures.call(this, userFeatures, glyphs, advances); + + for (var i = 0; i < this.glyphs.length; i++) { + this.fixCursiveAttachment(i); + } + + this.fixMarkAttachment(); + }; + + GPOSProcessor.prototype.fixCursiveAttachment = function fixCursiveAttachment(i) { + var glyph = this.glyphs[i]; + if (glyph.cursiveAttachment != null) { + var j = glyph.cursiveAttachment; + + glyph.cursiveAttachment = null; + this.fixCursiveAttachment(j); + + this.positions[i].yOffset += this.positions[j].yOffset; + } + }; + + GPOSProcessor.prototype.fixMarkAttachment = function fixMarkAttachment() { + for (var i = 0; i < this.glyphs.length; i++) { + var glyph = this.glyphs[i]; + if (glyph.markAttachment != null) { + var j = glyph.markAttachment; + + this.positions[i].xOffset += this.positions[j].xOffset; + this.positions[i].yOffset += this.positions[j].yOffset; + + if (this.direction === 'ltr') { + for (var k = j; k < i; k++) { + this.positions[i].xOffset -= this.positions[k].xAdvance; + this.positions[i].yOffset -= this.positions[k].yAdvance; + } + } + } + } + }; + + return GPOSProcessor; +}(OTProcessor); + +var OTLayoutEngine = function () { + function OTLayoutEngine(font) { + _classCallCheck(this, OTLayoutEngine); + + this.font = font; + this.glyphInfos = null; + this.plan = null; + this.GSUBProcessor = null; + this.GPOSProcessor = null; + + if (font.GSUB) { + this.GSUBProcessor = new GSUBProcessor(font, font.GSUB); + } + + if (font.GPOS) { + this.GPOSProcessor = new GPOSProcessor(font, font.GPOS); + } + } + + OTLayoutEngine.prototype.setup = function setup(glyphs, features, script, language) { + var _this = this; + + // Map glyphs to GlyphInfo objects so data can be passed between + // GSUB and GPOS without mutating the real (shared) Glyph objects. + this.glyphInfos = glyphs.map(function (glyph) { + return new GlyphInfo(_this.font, glyph.id, [].concat(glyph.codePoints)); + }); + + // Choose a shaper based on the script, and setup a shaping plan. + // This determines which features to apply to which glyphs. + this.shaper = choose(script); + this.plan = new ShapingPlan(this.font, script, language); + return this.shaper.plan(this.plan, this.glyphInfos, features); + }; + + OTLayoutEngine.prototype.substitute = function substitute(glyphs) { + var _this2 = this; + + if (this.GSUBProcessor) { + this.plan.process(this.GSUBProcessor, this.glyphInfos); + + // Map glyph infos back to normal Glyph objects + glyphs = this.glyphInfos.map(function (glyphInfo) { + return _this2.font.getGlyph(glyphInfo.id, glyphInfo.codePoints); + }); + } + + return glyphs; + }; + + OTLayoutEngine.prototype.position = function position(glyphs, positions) { + if (this.shaper.zeroMarkWidths === 'BEFORE_GPOS') { + this.zeroMarkAdvances(positions); + } + + if (this.GPOSProcessor) { + this.plan.process(this.GPOSProcessor, this.glyphInfos, positions); + } + + if (this.shaper.zeroMarkWidths === 'AFTER_GPOS') { + this.zeroMarkAdvances(positions); + } + + // Reverse the glyphs and positions if the script is right-to-left + if (this.plan.direction === 'rtl') { + glyphs.reverse(); + positions.reverse(); + } + + return this.GPOSProcessor && this.GPOSProcessor.features; + }; + + OTLayoutEngine.prototype.zeroMarkAdvances = function zeroMarkAdvances(positions) { + for (var i = 0; i < this.glyphInfos.length; i++) { + if (this.glyphInfos[i].isMark) { + positions[i].xAdvance = 0; + positions[i].yAdvance = 0; + } + } + }; + + OTLayoutEngine.prototype.cleanup = function cleanup() { + this.glyphInfos = null; + this.plan = null; + this.shaper = null; + }; + + OTLayoutEngine.prototype.getAvailableFeatures = function getAvailableFeatures(script, language) { + var features = []; + + if (this.GSUBProcessor) { + this.GSUBProcessor.selectScript(script, language); + features.push.apply(features, _Object$keys(this.GSUBProcessor.features)); + } + + if (this.GPOSProcessor) { + this.GPOSProcessor.selectScript(script, language); + features.push.apply(features, _Object$keys(this.GPOSProcessor.features)); + } + + return features; + }; + + return OTLayoutEngine; +}(); + +var LayoutEngine = function () { + function LayoutEngine(font) { + _classCallCheck(this, LayoutEngine); + + this.font = font; + this.unicodeLayoutEngine = null; + this.kernProcessor = null; + + // Choose an advanced layout engine. We try the AAT morx table first since more + // scripts are currently supported because the shaping logic is built into the font. + if (this.font.morx) { + this.engine = new AATLayoutEngine(this.font); + } else if (this.font.GSUB || this.font.GPOS) { + this.engine = new OTLayoutEngine(this.font); + } + } + + LayoutEngine.prototype.layout = function layout(string) { + var features = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + var script = arguments[2]; + var language = arguments[3]; + + // Make the features parameter optional + if (typeof features === 'string') { + script = features; + language = script; + features = []; + } + + // Map string to glyphs if needed + if (typeof string === 'string') { + // Attempt to detect the script from the string if not provided. + if (script == null) { + script = forString(string); + } + + var glyphs = this.font.glyphsForString(string); + } else { + // Attempt to detect the script from the glyph code points if not provided. + if (script == null) { + var codePoints = []; + for (var _iterator = string, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var glyph = _ref; + + codePoints.push.apply(codePoints, glyph.codePoints); + } + + script = forCodePoints(codePoints); + } + + var glyphs = string; + } + + // Return early if there are no glyphs + if (glyphs.length === 0) { + return new GlyphRun(glyphs, []); + } + + // Setup the advanced layout engine + if (this.engine && this.engine.setup) { + this.engine.setup(glyphs, features, script, language); + } + + // Substitute and position the glyphs + glyphs = this.substitute(glyphs, features, script, language); + var positions = this.position(glyphs, features, script, language); + + // Let the layout engine clean up any state it might have + if (this.engine && this.engine.cleanup) { + this.engine.cleanup(); + } + + return new GlyphRun(glyphs, positions); + }; + + LayoutEngine.prototype.substitute = function substitute(glyphs, features, script, language) { + // Call the advanced layout engine to make substitutions + if (this.engine && this.engine.substitute) { + glyphs = this.engine.substitute(glyphs, features, script, language); + } + + return glyphs; + }; + + LayoutEngine.prototype.position = function position(glyphs, features, script, language) { + // Get initial glyph positions + var positions = glyphs.map(function (glyph) { + return new GlyphPosition(glyph.advanceWidth); + }); + var positioned = null; + + // Call the advanced layout engine. Returns the features applied. + if (this.engine && this.engine.position) { + positioned = this.engine.position(glyphs, positions, features, script, language); + } + + // if there is no GPOS table, use unicode properties to position marks. + if (!positioned) { + if (!this.unicodeLayoutEngine) { + this.unicodeLayoutEngine = new UnicodeLayoutEngine(this.font); + } + + this.unicodeLayoutEngine.positionGlyphs(glyphs, positions); + } + + // if kerning is not supported by GPOS, do kerning with the TrueType/AAT kern table + if ((!positioned || !positioned.kern) && this.font.kern) { + if (!this.kernProcessor) { + this.kernProcessor = new KernProcessor(this.font); + } + + this.kernProcessor.process(glyphs, positions); + } + + return positions; + }; + + LayoutEngine.prototype.getAvailableFeatures = function getAvailableFeatures(script, language) { + var features = []; + + if (this.engine) { + features.push.apply(features, this.engine.getAvailableFeatures(script, language)); + } + + if (this.font.kern && features.indexOf('kern') === -1) { + features.push('kern'); + } + + return features; + }; + + LayoutEngine.prototype.stringsForGlyph = function stringsForGlyph(gid) { + var result = new _Set(); + + var codePoints = this.font._cmapProcessor.codePointsForGlyph(gid); + for (var _iterator2 = codePoints, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _getIterator(_iterator2);;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var codePoint = _ref2; + + result.add(_String$fromCodePoint(codePoint)); + } + + if (this.engine && this.engine.stringsForGlyph) { + for (var _iterator3 = this.engine.stringsForGlyph(gid), _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _getIterator(_iterator3);;) { + var _ref3; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref3 = _i3.value; + } + + var string = _ref3; + + result.add(string); + } + } + + return _Array$from(result); + }; + + return LayoutEngine; +}(); + +var SVG_COMMANDS = { + moveTo: 'M', + lineTo: 'L', + quadraticCurveTo: 'Q', + bezierCurveTo: 'C', + closePath: 'Z' +}; + +/** + * Path objects are returned by glyphs and represent the actual + * vector outlines for each glyph in the font. Paths can be converted + * to SVG path data strings, or to functions that can be applied to + * render the path to a graphics context. + */ + +var Path = function () { + function Path() { + _classCallCheck(this, Path); + + this.commands = []; + this._bbox = null; + this._cbox = null; + } + + /** + * Compiles the path to a JavaScript function that can be applied with + * a graphics context in order to render the path. + * @return {string} + */ + + + Path.prototype.toFunction = function toFunction() { + var cmds = this.commands.map(function (c) { + return ' ctx.' + c.command + '(' + c.args.join(', ') + ');'; + }); + return new Function('ctx', cmds.join('\n')); + }; + + /** + * Converts the path to an SVG path data string + * @return {string} + */ + + + Path.prototype.toSVG = function toSVG() { + var cmds = this.commands.map(function (c) { + var args = c.args.map(function (arg) { + return Math.round(arg * 100) / 100; + }); + return '' + SVG_COMMANDS[c.command] + args.join(' '); + }); + + return cmds.join(''); + }; + + /** + * Gets the "control box" of a path. + * This is like the bounding box, but it includes all points including + * control points of bezier segments and is much faster to compute than + * the real bounding box. + * @type {BBox} + */ + + + /** + * Applies a mapping function to each point in the path. + * @param {function} fn + * @return {Path} + */ + Path.prototype.mapPoints = function mapPoints(fn) { + var path = new Path(); + + for (var _iterator = this.commands, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var c = _ref; + + var args = []; + for (var _i2 = 0; _i2 < c.args.length; _i2 += 2) { + var _fn = fn(c.args[_i2], c.args[_i2 + 1]), + x = _fn[0], + y = _fn[1]; + + args.push(x, y); + } + + path[c.command].apply(path, args); + } + + return path; + }; + + /** + * Transforms the path by the given matrix. + */ + + + Path.prototype.transform = function transform(m0, m1, m2, m3, m4, m5) { + return this.mapPoints(function (x, y) { + x = m0 * x + m2 * y + m4; + y = m1 * x + m3 * y + m5; + return [x, y]; + }); + }; + + /** + * Translates the path by the given offset. + */ + + + Path.prototype.translate = function translate(x, y) { + return this.transform(1, 0, 0, 1, x, y); + }; + + /** + * Rotates the path by the given angle (in radians). + */ + + + Path.prototype.rotate = function rotate(angle) { + var cos = Math.cos(angle); + var sin = Math.sin(angle); + return this.transform(cos, sin, -sin, cos, 0, 0); + }; + + /** + * Scales the path. + */ + + + Path.prototype.scale = function scale(scaleX) { + var scaleY = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : scaleX; + + return this.transform(scaleX, 0, 0, scaleY, 0, 0); + }; + + _createClass(Path, [{ + key: 'cbox', + get: function get() { + if (!this._cbox) { + var cbox = new BBox(); + for (var _iterator2 = this.commands, _isArray2 = Array.isArray(_iterator2), _i3 = 0, _iterator2 = _isArray2 ? _iterator2 : _getIterator(_iterator2);;) { + var _ref2; + + if (_isArray2) { + if (_i3 >= _iterator2.length) break; + _ref2 = _iterator2[_i3++]; + } else { + _i3 = _iterator2.next(); + if (_i3.done) break; + _ref2 = _i3.value; + } + + var command = _ref2; + + for (var _i4 = 0; _i4 < command.args.length; _i4 += 2) { + cbox.addPoint(command.args[_i4], command.args[_i4 + 1]); + } + } + + this._cbox = _Object$freeze(cbox); + } + + return this._cbox; + } + + /** + * Gets the exact bounding box of the path by evaluating curve segments. + * Slower to compute than the control box, but more accurate. + * @type {BBox} + */ + + }, { + key: 'bbox', + get: function get() { + if (this._bbox) { + return this._bbox; + } + + var bbox = new BBox(); + var cx = 0, + cy = 0; + + var f = function f(t) { + return Math.pow(1 - t, 3) * p0[i] + 3 * Math.pow(1 - t, 2) * t * p1[i] + 3 * (1 - t) * Math.pow(t, 2) * p2[i] + Math.pow(t, 3) * p3[i]; + }; + + for (var _iterator3 = this.commands, _isArray3 = Array.isArray(_iterator3), _i5 = 0, _iterator3 = _isArray3 ? _iterator3 : _getIterator(_iterator3);;) { + var _ref3; + + if (_isArray3) { + if (_i5 >= _iterator3.length) break; + _ref3 = _iterator3[_i5++]; + } else { + _i5 = _iterator3.next(); + if (_i5.done) break; + _ref3 = _i5.value; + } + + var c = _ref3; + + switch (c.command) { + case 'moveTo': + case 'lineTo': + var _c$args = c.args, + x = _c$args[0], + y = _c$args[1]; + + bbox.addPoint(x, y); + cx = x; + cy = y; + break; + + case 'quadraticCurveTo': + case 'bezierCurveTo': + if (c.command === 'quadraticCurveTo') { + // http://fontforge.org/bezier.html + var _c$args2 = c.args, + qp1x = _c$args2[0], + qp1y = _c$args2[1], + p3x = _c$args2[2], + p3y = _c$args2[3]; + + var cp1x = cx + 2 / 3 * (qp1x - cx); // CP1 = QP0 + 2/3 * (QP1-QP0) + var cp1y = cy + 2 / 3 * (qp1y - cy); + var cp2x = p3x + 2 / 3 * (qp1x - p3x); // CP2 = QP2 + 2/3 * (QP1-QP2) + var cp2y = p3y + 2 / 3 * (qp1y - p3y); + } else { + var _c$args3 = c.args, + cp1x = _c$args3[0], + cp1y = _c$args3[1], + cp2x = _c$args3[2], + cp2y = _c$args3[3], + p3x = _c$args3[4], + p3y = _c$args3[5]; + } + + // http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html + bbox.addPoint(p3x, p3y); + + var p0 = [cx, cy]; + var p1 = [cp1x, cp1y]; + var p2 = [cp2x, cp2y]; + var p3 = [p3x, p3y]; + + for (var i = 0; i <= 1; i++) { + var b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i]; + var a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i]; + c = 3 * p1[i] - 3 * p0[i]; + + if (a === 0) { + if (b === 0) { + continue; + } + + var t = -c / b; + if (0 < t && t < 1) { + if (i === 0) { + bbox.addPoint(f(t), bbox.maxY); + } else if (i === 1) { + bbox.addPoint(bbox.maxX, f(t)); + } + } + + continue; + } + + var b2ac = Math.pow(b, 2) - 4 * c * a; + if (b2ac < 0) { + continue; + } + + var t1 = (-b + Math.sqrt(b2ac)) / (2 * a); + if (0 < t1 && t1 < 1) { + if (i === 0) { + bbox.addPoint(f(t1), bbox.maxY); + } else if (i === 1) { + bbox.addPoint(bbox.maxX, f(t1)); + } + } + + var t2 = (-b - Math.sqrt(b2ac)) / (2 * a); + if (0 < t2 && t2 < 1) { + if (i === 0) { + bbox.addPoint(f(t2), bbox.maxY); + } else if (i === 1) { + bbox.addPoint(bbox.maxX, f(t2)); + } + } + } + + cx = p3x; + cy = p3y; + break; + } + } + + return this._bbox = _Object$freeze(bbox); + } + }]); + + return Path; +}(); + +var _arr = ['moveTo', 'lineTo', 'quadraticCurveTo', 'bezierCurveTo', 'closePath']; + +var _loop = function _loop() { + var command = _arr[_i6]; + Path.prototype[command] = function () { + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) { + args[_key] = arguments[_key]; + } + + this._bbox = this._cbox = null; + this.commands.push({ + command: command, + args: args + }); + + return this; + }; +}; + +for (var _i6 = 0; _i6 < _arr.length; _i6++) { + _loop(); +} + +var StandardNames = ['.notdef', '.null', 'nonmarkingreturn', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent', 'ampersand', 'quotesingle', 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore', 'grave', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', 'Adieresis', 'Aring', 'Ccedilla', 'Eacute', 'Ntilde', 'Odieresis', 'Udieresis', 'aacute', 'agrave', 'acircumflex', 'adieresis', 'atilde', 'aring', 'ccedilla', 'eacute', 'egrave', 'ecircumflex', 'edieresis', 'iacute', 'igrave', 'icircumflex', 'idieresis', 'ntilde', 'oacute', 'ograve', 'ocircumflex', 'odieresis', 'otilde', 'uacute', 'ugrave', 'ucircumflex', 'udieresis', 'dagger', 'degree', 'cent', 'sterling', 'section', 'bullet', 'paragraph', 'germandbls', 'registered', 'copyright', 'trademark', 'acute', 'dieresis', 'notequal', 'AE', 'Oslash', 'infinity', 'plusminus', 'lessequal', 'greaterequal', 'yen', 'mu', 'partialdiff', 'summation', 'product', 'pi', 'integral', 'ordfeminine', 'ordmasculine', 'Omega', 'ae', 'oslash', 'questiondown', 'exclamdown', 'logicalnot', 'radical', 'florin', 'approxequal', 'Delta', 'guillemotleft', 'guillemotright', 'ellipsis', 'nonbreakingspace', 'Agrave', 'Atilde', 'Otilde', 'OE', 'oe', 'endash', 'emdash', 'quotedblleft', 'quotedblright', 'quoteleft', 'quoteright', 'divide', 'lozenge', 'ydieresis', 'Ydieresis', 'fraction', 'currency', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', 'daggerdbl', 'periodcentered', 'quotesinglbase', 'quotedblbase', 'perthousand', 'Acircumflex', 'Ecircumflex', 'Aacute', 'Edieresis', 'Egrave', 'Iacute', 'Icircumflex', 'Idieresis', 'Igrave', 'Oacute', 'Ocircumflex', 'apple', 'Ograve', 'Uacute', 'Ucircumflex', 'Ugrave', 'dotlessi', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent', 'ring', 'cedilla', 'hungarumlaut', 'ogonek', 'caron', 'Lslash', 'lslash', 'Scaron', 'scaron', 'Zcaron', 'zcaron', 'brokenbar', 'Eth', 'eth', 'Yacute', 'yacute', 'Thorn', 'thorn', 'minus', 'multiply', 'onesuperior', 'twosuperior', 'threesuperior', 'onehalf', 'onequarter', 'threequarters', 'franc', 'Gbreve', 'gbreve', 'Idotaccent', 'Scedilla', 'scedilla', 'Cacute', 'cacute', 'Ccaron', 'ccaron', 'dcroat']; + +var _class$7; +function _applyDecoratedDescriptor$4(target, property, decorators, descriptor, context) { + var desc = {}; + Object['ke' + 'ys'](descriptor).forEach(function (key) { + desc[key] = descriptor[key]; + }); + desc.enumerable = !!desc.enumerable; + desc.configurable = !!desc.configurable; + + if ('value' in desc || desc.initializer) { + desc.writable = true; + } + + desc = decorators.slice().reverse().reduce(function (desc, decorator) { + return decorator(target, property, desc) || desc; + }, desc); + + if (context && desc.initializer !== void 0) { + desc.value = desc.initializer ? desc.initializer.call(context) : void 0; + desc.initializer = undefined; + } + + if (desc.initializer === void 0) { + Object['define' + 'Property'](target, property, desc); + desc = null; + } + + return desc; +} + +/** + * Glyph objects represent a glyph in the font. They have various properties for accessing metrics and + * the actual vector path the glyph represents, and methods for rendering the glyph to a graphics context. + * + * You do not create glyph objects directly. They are created by various methods on the font object. + * There are several subclasses of the base Glyph class internally that may be returned depending + * on the font format, but they all inherit from this class. + */ +var Glyph = (_class$7 = function () { + function Glyph(id, codePoints, font) { + _classCallCheck(this, Glyph); + + /** + * The glyph id in the font + * @type {number} + */ + this.id = id; + + /** + * An array of unicode code points that are represented by this glyph. + * There can be multiple code points in the case of ligatures and other glyphs + * that represent multiple visual characters. + * @type {number[]} + */ + this.codePoints = codePoints; + this._font = font; + + // TODO: get this info from GDEF if available + this.isMark = this.codePoints.every(unicode.isMark); + this.isLigature = this.codePoints.length > 1; + } + + Glyph.prototype._getPath = function _getPath() { + return new Path(); + }; + + Glyph.prototype._getCBox = function _getCBox() { + return this.path.cbox; + }; + + Glyph.prototype._getBBox = function _getBBox() { + return this.path.bbox; + }; + + Glyph.prototype._getTableMetrics = function _getTableMetrics(table) { + if (this.id < table.metrics.length) { + return table.metrics.get(this.id); + } + + var metric = table.metrics.get(table.metrics.length - 1); + var res = { + advance: metric ? metric.advance : 0, + bearing: table.bearings.get(this.id - table.metrics.length) || 0 + }; + + return res; + }; + + Glyph.prototype._getMetrics = function _getMetrics(cbox) { + if (this._metrics) { + return this._metrics; + } + + var _getTableMetrics2 = this._getTableMetrics(this._font.hmtx), + advanceWidth = _getTableMetrics2.advance, + leftBearing = _getTableMetrics2.bearing; + + // For vertical metrics, use vmtx if available, or fall back to global data from OS/2 or hhea + + + if (this._font.vmtx) { + var _getTableMetrics3 = this._getTableMetrics(this._font.vmtx), + advanceHeight = _getTableMetrics3.advance, + topBearing = _getTableMetrics3.bearing; + } else { + var os2 = void 0; + if (typeof cbox === 'undefined' || cbox === null) { + cbox = this.cbox; + } + + if ((os2 = this._font['OS/2']) && os2.version > 0) { + var advanceHeight = Math.abs(os2.typoAscender - os2.typoDescender); + var topBearing = os2.typoAscender - cbox.maxY; + } else { + var hhea = this._font.hhea; + + var advanceHeight = Math.abs(hhea.ascent - hhea.descent); + var topBearing = hhea.ascent - cbox.maxY; + } + } + + if (this._font._variationProcessor && this._font.HVAR) { + advanceWidth += this._font._variationProcessor.getAdvanceAdjustment(this.id, this._font.HVAR); + } + + return this._metrics = { advanceWidth: advanceWidth, advanceHeight: advanceHeight, leftBearing: leftBearing, topBearing: topBearing }; + }; + + /** + * The glyph’s control box. + * This is often the same as the bounding box, but is faster to compute. + * Because of the way bezier curves are defined, some of the control points + * can be outside of the bounding box. Where `bbox` takes this into account, + * `cbox` does not. Thus, cbox is less accurate, but faster to compute. + * See [here](http://www.freetype.org/freetype2/docs/glyphs/glyphs-6.html#section-2) + * for a more detailed description. + * + * @type {BBox} + */ + + + /** + * Returns a path scaled to the given font size. + * @param {number} size + * @return {Path} + */ + Glyph.prototype.getScaledPath = function getScaledPath(size) { + var scale = 1 / this._font.unitsPerEm * size; + return this.path.scale(scale); + }; + + /** + * The glyph's advance width. + * @type {number} + */ + + + Glyph.prototype._getName = function _getName() { + var post = this._font.post; + + if (!post) { + return null; + } + + switch (post.version) { + case 1: + return StandardNames[this.id]; + + case 2: + var id = post.glyphNameIndex[this.id]; + if (id < StandardNames.length) { + return StandardNames[id]; + } + + return post.names[id - StandardNames.length]; + + case 2.5: + return StandardNames[this.id + post.offsets[this.id]]; + + case 4: + return String.fromCharCode(post.map[this.id]); + } + }; + + /** + * The glyph's name + * @type {string} + */ + + + /** + * Renders the glyph to the given graphics context, at the specified font size. + * @param {CanvasRenderingContext2d} ctx + * @param {number} size + */ + Glyph.prototype.render = function render(ctx, size) { + ctx.save(); + + var scale = 1 / this._font.head.unitsPerEm * size; + ctx.scale(scale, scale); + + var fn = this.path.toFunction(); + fn(ctx); + ctx.fill(); + + ctx.restore(); + }; + + _createClass(Glyph, [{ + key: 'cbox', + get: function get() { + return this._getCBox(); + } + + /** + * The glyph’s bounding box, i.e. the rectangle that encloses the + * glyph outline as tightly as possible. + * @type {BBox} + */ + + }, { + key: 'bbox', + get: function get() { + return this._getBBox(); + } + + /** + * A vector Path object representing the glyph outline. + * @type {Path} + */ + + }, { + key: 'path', + get: function get() { + // Cache the path so we only decode it once + // Decoding is actually performed by subclasses + return this._getPath(); + } + }, { + key: 'advanceWidth', + get: function get() { + return this._getMetrics().advanceWidth; + } + + /** + * The glyph's advance height. + * @type {number} + */ + + }, { + key: 'advanceHeight', + get: function get() { + return this._getMetrics().advanceHeight; + } + }, { + key: 'ligatureCaretPositions', + get: function get() {} + }, { + key: 'name', + get: function get() { + return this._getName(); + } + }]); + + return Glyph; +}(), (_applyDecoratedDescriptor$4(_class$7.prototype, 'cbox', [cache], _Object$getOwnPropertyDescriptor(_class$7.prototype, 'cbox'), _class$7.prototype), _applyDecoratedDescriptor$4(_class$7.prototype, 'bbox', [cache], _Object$getOwnPropertyDescriptor(_class$7.prototype, 'bbox'), _class$7.prototype), _applyDecoratedDescriptor$4(_class$7.prototype, 'path', [cache], _Object$getOwnPropertyDescriptor(_class$7.prototype, 'path'), _class$7.prototype), _applyDecoratedDescriptor$4(_class$7.prototype, 'advanceWidth', [cache], _Object$getOwnPropertyDescriptor(_class$7.prototype, 'advanceWidth'), _class$7.prototype), _applyDecoratedDescriptor$4(_class$7.prototype, 'advanceHeight', [cache], _Object$getOwnPropertyDescriptor(_class$7.prototype, 'advanceHeight'), _class$7.prototype), _applyDecoratedDescriptor$4(_class$7.prototype, 'name', [cache], _Object$getOwnPropertyDescriptor(_class$7.prototype, 'name'), _class$7.prototype)), _class$7); + +// The header for both simple and composite glyphs +var GlyfHeader = new r.Struct({ + numberOfContours: r.int16, // if negative, this is a composite glyph + xMin: r.int16, + yMin: r.int16, + xMax: r.int16, + yMax: r.int16 +}); + +// Flags for simple glyphs +var ON_CURVE = 1 << 0; +var X_SHORT_VECTOR = 1 << 1; +var Y_SHORT_VECTOR = 1 << 2; +var REPEAT = 1 << 3; +var SAME_X = 1 << 4; +var SAME_Y = 1 << 5; + +// Flags for composite glyphs +var ARG_1_AND_2_ARE_WORDS = 1 << 0; +var WE_HAVE_A_SCALE = 1 << 3; +var MORE_COMPONENTS = 1 << 5; +var WE_HAVE_AN_X_AND_Y_SCALE = 1 << 6; +var WE_HAVE_A_TWO_BY_TWO = 1 << 7; +var WE_HAVE_INSTRUCTIONS = 1 << 8; +// Represents a point in a simple glyph +var Point = function () { + function Point(onCurve, endContour) { + var x = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; + var y = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 0; + + _classCallCheck(this, Point); + + this.onCurve = onCurve; + this.endContour = endContour; + this.x = x; + this.y = y; + } + + Point.prototype.copy = function copy() { + return new Point(this.onCurve, this.endContour, this.x, this.y); + }; + + return Point; +}(); + +// Represents a component in a composite glyph + +var Component = function Component(glyphID, dx, dy) { + _classCallCheck(this, Component); + + this.glyphID = glyphID; + this.dx = dx; + this.dy = dy; + this.pos = 0; + this.scaleX = this.scaleY = 1; + this.scale01 = this.scale10 = 0; +}; + +/** + * Represents a TrueType glyph. + */ + + +var TTFGlyph = function (_Glyph) { + _inherits(TTFGlyph, _Glyph); + + function TTFGlyph() { + _classCallCheck(this, TTFGlyph); + + return _possibleConstructorReturn(this, _Glyph.apply(this, arguments)); + } + + // Parses just the glyph header and returns the bounding box + TTFGlyph.prototype._getCBox = function _getCBox(internal) { + // We need to decode the glyph if variation processing is requested, + // so it's easier just to recompute the path's cbox after decoding. + if (this._font._variationProcessor && !internal) { + return this.path.cbox; + } + + var stream = this._font._getTableStream('glyf'); + stream.pos += this._font.loca.offsets[this.id]; + var glyph = GlyfHeader.decode(stream); + + var cbox = new BBox(glyph.xMin, glyph.yMin, glyph.xMax, glyph.yMax); + return _Object$freeze(cbox); + }; + + // Parses a single glyph coordinate + + + TTFGlyph.prototype._parseGlyphCoord = function _parseGlyphCoord(stream, prev, short, same) { + if (short) { + var val = stream.readUInt8(); + if (!same) { + val = -val; + } + + val += prev; + } else { + if (same) { + var val = prev; + } else { + var val = prev + stream.readInt16BE(); + } + } + + return val; + }; + + // Decodes the glyph data into points for simple glyphs, + // or components for composite glyphs + + + TTFGlyph.prototype._decode = function _decode() { + var glyfPos = this._font.loca.offsets[this.id]; + var nextPos = this._font.loca.offsets[this.id + 1]; + + // Nothing to do if there is no data for this glyph + if (glyfPos === nextPos) { + return null; + } + + var stream = this._font._getTableStream('glyf'); + stream.pos += glyfPos; + var startPos = stream.pos; + + var glyph = GlyfHeader.decode(stream); + + if (glyph.numberOfContours > 0) { + this._decodeSimple(glyph, stream); + } else if (glyph.numberOfContours < 0) { + this._decodeComposite(glyph, stream, startPos); + } + + return glyph; + }; + + TTFGlyph.prototype._decodeSimple = function _decodeSimple(glyph, stream) { + // this is a simple glyph + glyph.points = []; + + var endPtsOfContours = new r.Array(r.uint16, glyph.numberOfContours).decode(stream); + glyph.instructions = new r.Array(r.uint8, r.uint16).decode(stream); + + var flags = []; + var numCoords = endPtsOfContours[endPtsOfContours.length - 1] + 1; + + while (flags.length < numCoords) { + var flag = stream.readUInt8(); + flags.push(flag); + + // check for repeat flag + if (flag & REPEAT) { + var count = stream.readUInt8(); + for (var j = 0; j < count; j++) { + flags.push(flag); + } + } + } + + for (var i = 0; i < flags.length; i++) { + var flag = flags[i]; + var point = new Point(!!(flag & ON_CURVE), endPtsOfContours.indexOf(i) >= 0, 0, 0); + glyph.points.push(point); + } + + var px = 0; + for (var i = 0; i < flags.length; i++) { + var flag = flags[i]; + glyph.points[i].x = px = this._parseGlyphCoord(stream, px, flag & X_SHORT_VECTOR, flag & SAME_X); + } + + var py = 0; + for (var i = 0; i < flags.length; i++) { + var flag = flags[i]; + glyph.points[i].y = py = this._parseGlyphCoord(stream, py, flag & Y_SHORT_VECTOR, flag & SAME_Y); + } + + if (this._font._variationProcessor) { + var points = glyph.points.slice(); + points.push.apply(points, this._getPhantomPoints(glyph)); + + this._font._variationProcessor.transformPoints(this.id, points); + glyph.phantomPoints = points.slice(-4); + } + + return; + }; + + TTFGlyph.prototype._decodeComposite = function _decodeComposite(glyph, stream) { + var offset = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0; + + // this is a composite glyph + glyph.components = []; + var haveInstructions = false; + var flags = MORE_COMPONENTS; + + while (flags & MORE_COMPONENTS) { + flags = stream.readUInt16BE(); + var gPos = stream.pos - offset; + var glyphID = stream.readUInt16BE(); + if (!haveInstructions) { + haveInstructions = (flags & WE_HAVE_INSTRUCTIONS) !== 0; + } + + if (flags & ARG_1_AND_2_ARE_WORDS) { + var dx = stream.readInt16BE(); + var dy = stream.readInt16BE(); + } else { + var dx = stream.readInt8(); + var dy = stream.readInt8(); + } + + var component = new Component(glyphID, dx, dy); + component.pos = gPos; + + if (flags & WE_HAVE_A_SCALE) { + // fixed number with 14 bits of fraction + component.scaleX = component.scaleY = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824; + } else if (flags & WE_HAVE_AN_X_AND_Y_SCALE) { + component.scaleX = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824; + component.scaleY = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824; + } else if (flags & WE_HAVE_A_TWO_BY_TWO) { + component.scaleX = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824; + component.scale01 = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824; + component.scale10 = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824; + component.scaleY = (stream.readUInt8() << 24 | stream.readUInt8() << 16) / 1073741824; + } + + glyph.components.push(component); + } + + if (this._font._variationProcessor) { + var points = []; + for (var j = 0; j < glyph.components.length; j++) { + var component = glyph.components[j]; + points.push(new Point(true, true, component.dx, component.dy)); + } + + points.push.apply(points, this._getPhantomPoints(glyph)); + + this._font._variationProcessor.transformPoints(this.id, points); + glyph.phantomPoints = points.splice(-4, 4); + + for (var i = 0; i < points.length; i++) { + var point = points[i]; + glyph.components[i].dx = point.x; + glyph.components[i].dy = point.y; + } + } + + return haveInstructions; + }; + + TTFGlyph.prototype._getPhantomPoints = function _getPhantomPoints(glyph) { + var cbox = this._getCBox(true); + if (this._metrics == null) { + this._metrics = Glyph.prototype._getMetrics.call(this, cbox); + } + + var _metrics = this._metrics, + advanceWidth = _metrics.advanceWidth, + advanceHeight = _metrics.advanceHeight, + leftBearing = _metrics.leftBearing, + topBearing = _metrics.topBearing; + + + return [new Point(false, true, glyph.xMin - leftBearing, 0), new Point(false, true, glyph.xMin - leftBearing + advanceWidth, 0), new Point(false, true, 0, glyph.yMax + topBearing), new Point(false, true, 0, glyph.yMax + topBearing + advanceHeight)]; + }; + + // Decodes font data, resolves composite glyphs, and returns an array of contours + + + TTFGlyph.prototype._getContours = function _getContours() { + var glyph = this._decode(); + if (!glyph) { + return []; + } + + if (glyph.numberOfContours < 0) { + // resolve composite glyphs + var points = []; + for (var _iterator = glyph.components, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var component = _ref; + + glyph = this._font.getGlyph(component.glyphID)._decode(); + // TODO transform + for (var _iterator2 = glyph.points, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _getIterator(_iterator2);;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var _point = _ref2; + + points.push(new Point(_point.onCurve, _point.endContour, _point.x + component.dx, _point.y + component.dy)); + } + } + } else { + var points = glyph.points || []; + } + + // Recompute and cache metrics if we performed variation processing, and don't have an HVAR table + if (glyph.phantomPoints && !this._font.directory.tables.HVAR) { + this._metrics.advanceWidth = glyph.phantomPoints[1].x - glyph.phantomPoints[0].x; + this._metrics.advanceHeight = glyph.phantomPoints[3].y - glyph.phantomPoints[2].y; + this._metrics.leftBearing = glyph.xMin - glyph.phantomPoints[0].x; + this._metrics.topBearing = glyph.phantomPoints[2].y - glyph.yMax; + } + + var contours = []; + var cur = []; + for (var k = 0; k < points.length; k++) { + var point = points[k]; + cur.push(point); + if (point.endContour) { + contours.push(cur); + cur = []; + } + } + + return contours; + }; + + TTFGlyph.prototype._getMetrics = function _getMetrics() { + if (this._metrics) { + return this._metrics; + } + + var cbox = this._getCBox(true); + _Glyph.prototype._getMetrics.call(this, cbox); + + if (this._font._variationProcessor && !this._font.HVAR) { + // No HVAR table, decode the glyph. This triggers recomputation of metrics. + this.path; + } + + return this._metrics; + }; + + // Converts contours to a Path object that can be rendered + + + TTFGlyph.prototype._getPath = function _getPath() { + var contours = this._getContours(); + var path = new Path(); + + for (var i = 0; i < contours.length; i++) { + var contour = contours[i]; + var firstPt = contour[0]; + var lastPt = contour[contour.length - 1]; + var start = 0; + + if (firstPt.onCurve) { + // The first point will be consumed by the moveTo command, so skip in the loop + var curvePt = null; + start = 1; + } else { + if (lastPt.onCurve) { + // Start at the last point if the first point is off curve and the last point is on curve + firstPt = lastPt; + } else { + // Start at the middle if both the first and last points are off curve + firstPt = new Point(false, false, (firstPt.x + lastPt.x) / 2, (firstPt.y + lastPt.y) / 2); + } + + var curvePt = firstPt; + } + + path.moveTo(firstPt.x, firstPt.y); + + for (var j = start; j < contour.length; j++) { + var pt = contour[j]; + var prevPt = j === 0 ? firstPt : contour[j - 1]; + + if (prevPt.onCurve && pt.onCurve) { + path.lineTo(pt.x, pt.y); + } else if (prevPt.onCurve && !pt.onCurve) { + var curvePt = pt; + } else if (!prevPt.onCurve && !pt.onCurve) { + var midX = (prevPt.x + pt.x) / 2; + var midY = (prevPt.y + pt.y) / 2; + path.quadraticCurveTo(prevPt.x, prevPt.y, midX, midY); + var curvePt = pt; + } else if (!prevPt.onCurve && pt.onCurve) { + path.quadraticCurveTo(curvePt.x, curvePt.y, pt.x, pt.y); + var curvePt = null; + } else { + throw new Error("Unknown TTF path state"); + } + } + + // Connect the first and last points + if (curvePt) { + path.quadraticCurveTo(curvePt.x, curvePt.y, firstPt.x, firstPt.y); + } + + path.closePath(); + } + + return path; + }; + + return TTFGlyph; +}(Glyph); + +/** + * Represents an OpenType PostScript glyph, in the Compact Font Format. + */ + +var CFFGlyph = function (_Glyph) { + _inherits(CFFGlyph, _Glyph); + + function CFFGlyph() { + _classCallCheck(this, CFFGlyph); + + return _possibleConstructorReturn(this, _Glyph.apply(this, arguments)); + } + + CFFGlyph.prototype._getName = function _getName() { + if (this._font.CFF2) { + return _Glyph.prototype._getName.call(this); + } + + return this._font['CFF '].getGlyphName(this.id); + }; + + CFFGlyph.prototype.bias = function bias(s) { + if (s.length < 1240) { + return 107; + } else if (s.length < 33900) { + return 1131; + } else { + return 32768; + } + }; + + CFFGlyph.prototype._getPath = function _getPath() { + var stream = this._font.stream; + var pos = stream.pos; + + + var cff = this._font.CFF2 || this._font['CFF ']; + var str = cff.topDict.CharStrings[this.id]; + var end = str.offset + str.length; + stream.pos = str.offset; + + var path = new Path(); + var stack = []; + var trans = []; + + var width = null; + var nStems = 0; + var x = 0, + y = 0; + var usedGsubrs = void 0; + var usedSubrs = void 0; + var open = false; + + this._usedGsubrs = usedGsubrs = {}; + this._usedSubrs = usedSubrs = {}; + + var gsubrs = cff.globalSubrIndex || []; + var gsubrsBias = this.bias(gsubrs); + + var privateDict = cff.privateDictForGlyph(this.id); + var subrs = privateDict.Subrs || []; + var subrsBias = this.bias(subrs); + + var vstore = cff.topDict.vstore && cff.topDict.vstore.itemVariationStore; + var vsindex = privateDict.vsindex; + var variationProcessor = this._font._variationProcessor; + + function checkWidth() { + if (width == null) { + width = stack.shift() + privateDict.nominalWidthX; + } + } + + function parseStems() { + if (stack.length % 2 !== 0) { + checkWidth(); + } + + nStems += stack.length >> 1; + return stack.length = 0; + } + + function moveTo(x, y) { + if (open) { + path.closePath(); + } + + path.moveTo(x, y); + open = true; + } + + var parse = function parse() { + while (stream.pos < end) { + var op = stream.readUInt8(); + if (op < 32) { + switch (op) { + case 1: // hstem + case 3: // vstem + case 18: // hstemhm + case 23: + // vstemhm + parseStems(); + break; + + case 4: + // vmoveto + if (stack.length > 1) { + checkWidth(); + } + + y += stack.shift(); + moveTo(x, y); + break; + + case 5: + // rlineto + while (stack.length >= 2) { + x += stack.shift(); + y += stack.shift(); + path.lineTo(x, y); + } + break; + + case 6: // hlineto + case 7: + // vlineto + var phase = op === 6; + while (stack.length >= 1) { + if (phase) { + x += stack.shift(); + } else { + y += stack.shift(); + } + + path.lineTo(x, y); + phase = !phase; + } + break; + + case 8: + // rrcurveto + while (stack.length > 0) { + var c1x = x + stack.shift(); + var c1y = y + stack.shift(); + var c2x = c1x + stack.shift(); + var c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y + stack.shift(); + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + } + break; + + case 10: + // callsubr + var index = stack.pop() + subrsBias; + var subr = subrs[index]; + if (subr) { + usedSubrs[index] = true; + var p = stream.pos; + var e = end; + stream.pos = subr.offset; + end = subr.offset + subr.length; + parse(); + stream.pos = p; + end = e; + } + break; + + case 11: + // return + if (cff.version >= 2) { + break; + } + return; + + case 14: + // endchar + if (cff.version >= 2) { + break; + } + + if (stack.length > 0) { + checkWidth(); + } + + if (open) { + path.closePath(); + open = false; + } + break; + + case 15: + { + // vsindex + if (cff.version < 2) { + throw new Error('vsindex operator not supported in CFF v1'); + } + + vsindex = stack.pop(); + break; + } + + case 16: + { + // blend + if (cff.version < 2) { + throw new Error('blend operator not supported in CFF v1'); + } + + if (!variationProcessor) { + throw new Error('blend operator in non-variation font'); + } + + var blendVector = variationProcessor.getBlendVector(vstore, vsindex); + var numBlends = stack.pop(); + var numOperands = numBlends * blendVector.length; + var delta = stack.length - numOperands; + var base = delta - numBlends; + + for (var i = 0; i < numBlends; i++) { + var sum = stack[base + i]; + for (var j = 0; j < blendVector.length; j++) { + sum += blendVector[j] * stack[delta++]; + } + + stack[base + i] = sum; + } + + while (numOperands--) { + stack.pop(); + } + + break; + } + + case 19: // hintmask + case 20: + // cntrmask + parseStems(); + stream.pos += nStems + 7 >> 3; + break; + + case 21: + // rmoveto + if (stack.length > 2) { + checkWidth(); + } + + x += stack.shift(); + y += stack.shift(); + moveTo(x, y); + break; + + case 22: + // hmoveto + if (stack.length > 1) { + checkWidth(); + } + + x += stack.shift(); + moveTo(x, y); + break; + + case 24: + // rcurveline + while (stack.length >= 8) { + var c1x = x + stack.shift(); + var c1y = y + stack.shift(); + var c2x = c1x + stack.shift(); + var c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y + stack.shift(); + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + } + + x += stack.shift(); + y += stack.shift(); + path.lineTo(x, y); + break; + + case 25: + // rlinecurve + while (stack.length >= 8) { + x += stack.shift(); + y += stack.shift(); + path.lineTo(x, y); + } + + var c1x = x + stack.shift(); + var c1y = y + stack.shift(); + var c2x = c1x + stack.shift(); + var c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y + stack.shift(); + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + break; + + case 26: + // vvcurveto + if (stack.length % 2) { + x += stack.shift(); + } + + while (stack.length >= 4) { + c1x = x; + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x; + y = c2y + stack.shift(); + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + } + break; + + case 27: + // hhcurveto + if (stack.length % 2) { + y += stack.shift(); + } + + while (stack.length >= 4) { + c1x = x + stack.shift(); + c1y = y; + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y; + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + } + break; + + case 28: + // shortint + stack.push(stream.readInt16BE()); + break; + + case 29: + // callgsubr + index = stack.pop() + gsubrsBias; + subr = gsubrs[index]; + if (subr) { + usedGsubrs[index] = true; + var p = stream.pos; + var e = end; + stream.pos = subr.offset; + end = subr.offset + subr.length; + parse(); + stream.pos = p; + end = e; + } + break; + + case 30: // vhcurveto + case 31: + // hvcurveto + phase = op === 31; + while (stack.length >= 4) { + if (phase) { + c1x = x + stack.shift(); + c1y = y; + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + y = c2y + stack.shift(); + x = c2x + (stack.length === 1 ? stack.shift() : 0); + } else { + c1x = x; + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y + (stack.length === 1 ? stack.shift() : 0); + } + + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + phase = !phase; + } + break; + + case 12: + op = stream.readUInt8(); + switch (op) { + case 3: + // and + var a = stack.pop(); + var b = stack.pop(); + stack.push(a && b ? 1 : 0); + break; + + case 4: + // or + a = stack.pop(); + b = stack.pop(); + stack.push(a || b ? 1 : 0); + break; + + case 5: + // not + a = stack.pop(); + stack.push(a ? 0 : 1); + break; + + case 9: + // abs + a = stack.pop(); + stack.push(Math.abs(a)); + break; + + case 10: + // add + a = stack.pop(); + b = stack.pop(); + stack.push(a + b); + break; + + case 11: + // sub + a = stack.pop(); + b = stack.pop(); + stack.push(a - b); + break; + + case 12: + // div + a = stack.pop(); + b = stack.pop(); + stack.push(a / b); + break; + + case 14: + // neg + a = stack.pop(); + stack.push(-a); + break; + + case 15: + // eq + a = stack.pop(); + b = stack.pop(); + stack.push(a === b ? 1 : 0); + break; + + case 18: + // drop + stack.pop(); + break; + + case 20: + // put + var val = stack.pop(); + var idx = stack.pop(); + trans[idx] = val; + break; + + case 21: + // get + idx = stack.pop(); + stack.push(trans[idx] || 0); + break; + + case 22: + // ifelse + var s1 = stack.pop(); + var s2 = stack.pop(); + var v1 = stack.pop(); + var v2 = stack.pop(); + stack.push(v1 <= v2 ? s1 : s2); + break; + + case 23: + // random + stack.push(Math.random()); + break; + + case 24: + // mul + a = stack.pop(); + b = stack.pop(); + stack.push(a * b); + break; + + case 26: + // sqrt + a = stack.pop(); + stack.push(Math.sqrt(a)); + break; + + case 27: + // dup + a = stack.pop(); + stack.push(a, a); + break; + + case 28: + // exch + a = stack.pop(); + b = stack.pop(); + stack.push(b, a); + break; + + case 29: + // index + idx = stack.pop(); + if (idx < 0) { + idx = 0; + } else if (idx > stack.length - 1) { + idx = stack.length - 1; + } + + stack.push(stack[idx]); + break; + + case 30: + // roll + var n = stack.pop(); + var _j = stack.pop(); + + if (_j >= 0) { + while (_j > 0) { + var t = stack[n - 1]; + for (var _i = n - 2; _i >= 0; _i--) { + stack[_i + 1] = stack[_i]; + } + + stack[0] = t; + _j--; + } + } else { + while (_j < 0) { + var t = stack[0]; + for (var _i2 = 0; _i2 <= n; _i2++) { + stack[_i2] = stack[_i2 + 1]; + } + + stack[n - 1] = t; + _j++; + } + } + break; + + case 34: + // hflex + c1x = x + stack.shift(); + c1y = y; + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + var c3x = c2x + stack.shift(); + var c3y = c2y; + var c4x = c3x + stack.shift(); + var c4y = c3y; + var c5x = c4x + stack.shift(); + var c5y = c4y; + var c6x = c5x + stack.shift(); + var c6y = c5y; + x = c6x; + y = c6y; + + path.bezierCurveTo(c1x, c1y, c2x, c2y, c3x, c3y); + path.bezierCurveTo(c4x, c4y, c5x, c5y, c6x, c6y); + break; + + case 35: + // flex + var pts = []; + + for (var _i3 = 0; _i3 <= 5; _i3++) { + x += stack.shift(); + y += stack.shift(); + pts.push(x, y); + } + + path.bezierCurveTo.apply(path, pts.slice(0, 6)); + path.bezierCurveTo.apply(path, pts.slice(6)); + stack.shift(); // fd + break; + + case 36: + // hflex1 + c1x = x + stack.shift(); + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + c3x = c2x + stack.shift(); + c3y = c2y; + c4x = c3x + stack.shift(); + c4y = c3y; + c5x = c4x + stack.shift(); + c5y = c4y + stack.shift(); + c6x = c5x + stack.shift(); + c6y = c5y; + x = c6x; + y = c6y; + + path.bezierCurveTo(c1x, c1y, c2x, c2y, c3x, c3y); + path.bezierCurveTo(c4x, c4y, c5x, c5y, c6x, c6y); + break; + + case 37: + // flex1 + var startx = x; + var starty = y; + + pts = []; + for (var _i4 = 0; _i4 <= 4; _i4++) { + x += stack.shift(); + y += stack.shift(); + pts.push(x, y); + } + + if (Math.abs(x - startx) > Math.abs(y - starty)) { + // horizontal + x += stack.shift(); + y = starty; + } else { + x = startx; + y += stack.shift(); + } + + pts.push(x, y); + path.bezierCurveTo.apply(path, pts.slice(0, 6)); + path.bezierCurveTo.apply(path, pts.slice(6)); + break; + + default: + throw new Error('Unknown op: 12 ' + op); + } + break; + + default: + throw new Error('Unknown op: ' + op); + } + } else if (op < 247) { + stack.push(op - 139); + } else if (op < 251) { + var b1 = stream.readUInt8(); + stack.push((op - 247) * 256 + b1 + 108); + } else if (op < 255) { + var b1 = stream.readUInt8(); + stack.push(-(op - 251) * 256 - b1 - 108); + } else { + stack.push(stream.readInt32BE() / 65536); + } + } + }; + + parse(); + + if (open) { + path.closePath(); + } + + return path; + }; + + return CFFGlyph; +}(Glyph); + +var SBIXImage = new r.Struct({ + originX: r.uint16, + originY: r.uint16, + type: new r.String(4), + data: new r.Buffer(function (t) { + return t.parent.buflen - t._currentOffset; + }) +}); + +/** + * Represents a color (e.g. emoji) glyph in Apple's SBIX format. + */ + +var SBIXGlyph = function (_TTFGlyph) { + _inherits(SBIXGlyph, _TTFGlyph); + + function SBIXGlyph() { + _classCallCheck(this, SBIXGlyph); + + return _possibleConstructorReturn(this, _TTFGlyph.apply(this, arguments)); + } + + /** + * Returns an object representing a glyph image at the given point size. + * The object has a data property with a Buffer containing the actual image data, + * along with the image type, and origin. + * + * @param {number} size + * @return {object} + */ + SBIXGlyph.prototype.getImageForSize = function getImageForSize(size) { + for (var i = 0; i < this._font.sbix.imageTables.length; i++) { + var table = this._font.sbix.imageTables[i]; + if (table.ppem >= size) { + break; + } + } + + var offsets = table.imageOffsets; + var start = offsets[this.id]; + var end = offsets[this.id + 1]; + + if (start === end) { + return null; + } + + this._font.stream.pos = start; + return SBIXImage.decode(this._font.stream, { buflen: end - start }); + }; + + SBIXGlyph.prototype.render = function render(ctx, size) { + var img = this.getImageForSize(size); + if (img != null) { + var scale = size / this._font.unitsPerEm; + ctx.image(img.data, { height: size, x: img.originX, y: (this.bbox.minY - img.originY) * scale }); + } + + if (this._font.sbix.flags.renderOutlines) { + _TTFGlyph.prototype.render.call(this, ctx, size); + } + }; + + return SBIXGlyph; +}(TTFGlyph); + +var COLRLayer = function COLRLayer(glyph, color) { + _classCallCheck(this, COLRLayer); + + this.glyph = glyph; + this.color = color; +}; + +/** + * Represents a color (e.g. emoji) glyph in Microsoft's COLR format. + * Each glyph in this format contain a list of colored layers, each + * of which is another vector glyph. + */ + + +var COLRGlyph = function (_Glyph) { + _inherits(COLRGlyph, _Glyph); + + function COLRGlyph() { + _classCallCheck(this, COLRGlyph); + + return _possibleConstructorReturn(this, _Glyph.apply(this, arguments)); + } + + COLRGlyph.prototype._getBBox = function _getBBox() { + var bbox = new BBox(); + for (var i = 0; i < this.layers.length; i++) { + var layer = this.layers[i]; + var b = layer.glyph.bbox; + bbox.addPoint(b.minX, b.minY); + bbox.addPoint(b.maxX, b.maxY); + } + + return bbox; + }; + + /** + * Returns an array of objects containing the glyph and color for + * each layer in the composite color glyph. + * @type {object[]} + */ + + + COLRGlyph.prototype.render = function render(ctx, size) { + for (var _iterator = this.layers, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var _ref2 = _ref, + glyph = _ref2.glyph, + color = _ref2.color; + + ctx.fillColor([color.red, color.green, color.blue], color.alpha / 255 * 100); + glyph.render(ctx, size); + } + + return; + }; + + _createClass(COLRGlyph, [{ + key: 'layers', + get: function get() { + var cpal = this._font.CPAL; + var colr = this._font.COLR; + var low = 0; + var high = colr.baseGlyphRecord.length - 1; + + while (low <= high) { + var mid = low + high >> 1; + var rec = colr.baseGlyphRecord[mid]; + + if (this.id < rec.gid) { + high = mid - 1; + } else if (this.id > rec.gid) { + low = mid + 1; + } else { + var baseLayer = rec; + break; + } + } + + // if base glyph not found in COLR table, + // default to normal glyph from glyf or CFF + if (baseLayer == null) { + var g = this._font._getBaseGlyph(this.id); + var color = { + red: 0, + green: 0, + blue: 0, + alpha: 255 + }; + + return [new COLRLayer(g, color)]; + } + + // otherwise, return an array of all the layers + var layers = []; + for (var i = baseLayer.firstLayerIndex; i < baseLayer.firstLayerIndex + baseLayer.numLayers; i++) { + var rec = colr.layerRecords[i]; + var color = cpal.colorRecords[rec.paletteIndex]; + var g = this._font._getBaseGlyph(rec.gid); + layers.push(new COLRLayer(g, color)); + } + + return layers; + } + }]); + + return COLRGlyph; +}(Glyph); + +var TUPLES_SHARE_POINT_NUMBERS = 0x8000; +var TUPLE_COUNT_MASK = 0x0fff; +var EMBEDDED_TUPLE_COORD = 0x8000; +var INTERMEDIATE_TUPLE = 0x4000; +var PRIVATE_POINT_NUMBERS = 0x2000; +var TUPLE_INDEX_MASK = 0x0fff; +var POINTS_ARE_WORDS = 0x80; +var POINT_RUN_COUNT_MASK = 0x7f; +var DELTAS_ARE_ZERO = 0x80; +var DELTAS_ARE_WORDS = 0x40; +var DELTA_RUN_COUNT_MASK = 0x3f; + +/** + * This class is transforms TrueType glyphs according to the data from + * the Apple Advanced Typography variation tables (fvar, gvar, and avar). + * These tables allow infinite adjustments to glyph weight, width, slant, + * and optical size without the designer needing to specify every exact style. + * + * Apple's documentation for these tables is not great, so thanks to the + * Freetype project for figuring much of this out. + * + * @private + */ + +var GlyphVariationProcessor = function () { + function GlyphVariationProcessor(font, coords) { + _classCallCheck(this, GlyphVariationProcessor); + + this.font = font; + this.normalizedCoords = this.normalizeCoords(coords); + this.blendVectors = new _Map(); + } + + GlyphVariationProcessor.prototype.normalizeCoords = function normalizeCoords(coords) { + // the default mapping is linear along each axis, in two segments: + // from the minValue to defaultValue, and from defaultValue to maxValue. + var normalized = []; + for (var i = 0; i < this.font.fvar.axis.length; i++) { + var axis = this.font.fvar.axis[i]; + if (coords[i] < axis.defaultValue) { + normalized.push((coords[i] - axis.defaultValue + _Number$EPSILON) / (axis.defaultValue - axis.minValue + _Number$EPSILON)); + } else { + normalized.push((coords[i] - axis.defaultValue + _Number$EPSILON) / (axis.maxValue - axis.defaultValue + _Number$EPSILON)); + } + } + + // if there is an avar table, the normalized value is calculated + // by interpolating between the two nearest mapped values. + if (this.font.avar) { + for (var i = 0; i < this.font.avar.segment.length; i++) { + var segment = this.font.avar.segment[i]; + for (var j = 0; j < segment.correspondence.length; j++) { + var pair = segment.correspondence[j]; + if (j >= 1 && normalized[i] < pair.fromCoord) { + var prev = segment.correspondence[j - 1]; + normalized[i] = ((normalized[i] - prev.fromCoord) * (pair.toCoord - prev.toCoord) + _Number$EPSILON) / (pair.fromCoord - prev.fromCoord + _Number$EPSILON) + prev.toCoord; + + break; + } + } + } + } + + return normalized; + }; + + GlyphVariationProcessor.prototype.transformPoints = function transformPoints(gid, glyphPoints) { + if (!this.font.fvar || !this.font.gvar) { + return; + } + + var gvar = this.font.gvar; + + if (gid >= gvar.glyphCount) { + return; + } + + var offset = gvar.offsets[gid]; + if (offset === gvar.offsets[gid + 1]) { + return; + } + + // Read the gvar data for this glyph + var stream = this.font.stream; + + stream.pos = offset; + if (stream.pos >= stream.length) { + return; + } + + var tupleCount = stream.readUInt16BE(); + var offsetToData = offset + stream.readUInt16BE(); + + if (tupleCount & TUPLES_SHARE_POINT_NUMBERS) { + var here = stream.pos; + stream.pos = offsetToData; + var sharedPoints = this.decodePoints(); + offsetToData = stream.pos; + stream.pos = here; + } + + var origPoints = glyphPoints.map(function (pt) { + return pt.copy(); + }); + + tupleCount &= TUPLE_COUNT_MASK; + for (var i = 0; i < tupleCount; i++) { + var tupleDataSize = stream.readUInt16BE(); + var tupleIndex = stream.readUInt16BE(); + + if (tupleIndex & EMBEDDED_TUPLE_COORD) { + var tupleCoords = []; + for (var a = 0; a < gvar.axisCount; a++) { + tupleCoords.push(stream.readInt16BE() / 16384); + } + } else { + if ((tupleIndex & TUPLE_INDEX_MASK) >= gvar.globalCoordCount) { + throw new Error('Invalid gvar table'); + } + + var tupleCoords = gvar.globalCoords[tupleIndex & TUPLE_INDEX_MASK]; + } + + if (tupleIndex & INTERMEDIATE_TUPLE) { + var startCoords = []; + for (var _a = 0; _a < gvar.axisCount; _a++) { + startCoords.push(stream.readInt16BE() / 16384); + } + + var endCoords = []; + for (var _a2 = 0; _a2 < gvar.axisCount; _a2++) { + endCoords.push(stream.readInt16BE() / 16384); + } + } + + // Get the factor at which to apply this tuple + var factor = this.tupleFactor(tupleIndex, tupleCoords, startCoords, endCoords); + if (factor === 0) { + offsetToData += tupleDataSize; + continue; + } + + var here = stream.pos; + stream.pos = offsetToData; + + if (tupleIndex & PRIVATE_POINT_NUMBERS) { + var points = this.decodePoints(); + } else { + var points = sharedPoints; + } + + // points.length = 0 means there are deltas for all points + var nPoints = points.length === 0 ? glyphPoints.length : points.length; + var xDeltas = this.decodeDeltas(nPoints); + var yDeltas = this.decodeDeltas(nPoints); + + if (points.length === 0) { + // all points + for (var _i = 0; _i < glyphPoints.length; _i++) { + var point = glyphPoints[_i]; + point.x += Math.round(xDeltas[_i] * factor); + point.y += Math.round(yDeltas[_i] * factor); + } + } else { + var outPoints = origPoints.map(function (pt) { + return pt.copy(); + }); + var hasDelta = glyphPoints.map(function () { + return false; + }); + + for (var _i2 = 0; _i2 < points.length; _i2++) { + var idx = points[_i2]; + if (idx < glyphPoints.length) { + var _point = outPoints[idx]; + hasDelta[idx] = true; + + _point.x += Math.round(xDeltas[_i2] * factor); + _point.y += Math.round(yDeltas[_i2] * factor); + } + } + + this.interpolateMissingDeltas(outPoints, origPoints, hasDelta); + + for (var _i3 = 0; _i3 < glyphPoints.length; _i3++) { + var deltaX = outPoints[_i3].x - origPoints[_i3].x; + var deltaY = outPoints[_i3].y - origPoints[_i3].y; + + glyphPoints[_i3].x += deltaX; + glyphPoints[_i3].y += deltaY; + } + } + + offsetToData += tupleDataSize; + stream.pos = here; + } + }; + + GlyphVariationProcessor.prototype.decodePoints = function decodePoints() { + var stream = this.font.stream; + var count = stream.readUInt8(); + + if (count & POINTS_ARE_WORDS) { + count = (count & POINT_RUN_COUNT_MASK) << 8 | stream.readUInt8(); + } + + var points = new Uint16Array(count); + var i = 0; + var point = 0; + while (i < count) { + var run = stream.readUInt8(); + var runCount = (run & POINT_RUN_COUNT_MASK) + 1; + var fn = run & POINTS_ARE_WORDS ? stream.readUInt16 : stream.readUInt8; + + for (var j = 0; j < runCount && i < count; j++) { + point += fn.call(stream); + points[i++] = point; + } + } + + return points; + }; + + GlyphVariationProcessor.prototype.decodeDeltas = function decodeDeltas(count) { + var stream = this.font.stream; + var i = 0; + var deltas = new Int16Array(count); + + while (i < count) { + var run = stream.readUInt8(); + var runCount = (run & DELTA_RUN_COUNT_MASK) + 1; + + if (run & DELTAS_ARE_ZERO) { + i += runCount; + } else { + var fn = run & DELTAS_ARE_WORDS ? stream.readInt16BE : stream.readInt8; + for (var j = 0; j < runCount && i < count; j++) { + deltas[i++] = fn.call(stream); + } + } + } + + return deltas; + }; + + GlyphVariationProcessor.prototype.tupleFactor = function tupleFactor(tupleIndex, tupleCoords, startCoords, endCoords) { + var normalized = this.normalizedCoords; + var gvar = this.font.gvar; + + var factor = 1; + + for (var i = 0; i < gvar.axisCount; i++) { + if (tupleCoords[i] === 0) { + continue; + } + + if (normalized[i] === 0) { + return 0; + } + + if ((tupleIndex & INTERMEDIATE_TUPLE) === 0) { + if (normalized[i] < Math.min(0, tupleCoords[i]) || normalized[i] > Math.max(0, tupleCoords[i])) { + return 0; + } + + factor = (factor * normalized[i] + _Number$EPSILON) / (tupleCoords[i] + _Number$EPSILON); + } else { + if (normalized[i] < startCoords[i] || normalized[i] > endCoords[i]) { + return 0; + } else if (normalized[i] < tupleCoords[i]) { + factor = factor * (normalized[i] - startCoords[i] + _Number$EPSILON) / (tupleCoords[i] - startCoords[i] + _Number$EPSILON); + } else { + factor = factor * (endCoords[i] - normalized[i] + _Number$EPSILON) / (endCoords[i] - tupleCoords[i] + _Number$EPSILON); + } + } + } + + return factor; + }; + + // Interpolates points without delta values. + // Needed for the Ø and Q glyphs in Skia. + // Algorithm from Freetype. + + + GlyphVariationProcessor.prototype.interpolateMissingDeltas = function interpolateMissingDeltas(points, inPoints, hasDelta) { + if (points.length === 0) { + return; + } + + var point = 0; + while (point < points.length) { + var firstPoint = point; + + // find the end point of the contour + var endPoint = point; + var pt = points[endPoint]; + while (!pt.endContour) { + pt = points[++endPoint]; + } + + // find the first point that has a delta + while (point <= endPoint && !hasDelta[point]) { + point++; + } + + if (point > endPoint) { + continue; + } + + var firstDelta = point; + var curDelta = point; + point++; + + while (point <= endPoint) { + // find the next point with a delta, and interpolate intermediate points + if (hasDelta[point]) { + this.deltaInterpolate(curDelta + 1, point - 1, curDelta, point, inPoints, points); + curDelta = point; + } + + point++; + } + + // shift contour if we only have a single delta + if (curDelta === firstDelta) { + this.deltaShift(firstPoint, endPoint, curDelta, inPoints, points); + } else { + // otherwise, handle the remaining points at the end and beginning of the contour + this.deltaInterpolate(curDelta + 1, endPoint, curDelta, firstDelta, inPoints, points); + + if (firstDelta > 0) { + this.deltaInterpolate(firstPoint, firstDelta - 1, curDelta, firstDelta, inPoints, points); + } + } + + point = endPoint + 1; + } + }; + + GlyphVariationProcessor.prototype.deltaInterpolate = function deltaInterpolate(p1, p2, ref1, ref2, inPoints, outPoints) { + if (p1 > p2) { + return; + } + + var iterable = ['x', 'y']; + for (var i = 0; i < iterable.length; i++) { + var k = iterable[i]; + if (inPoints[ref1][k] > inPoints[ref2][k]) { + var p = ref1; + ref1 = ref2; + ref2 = p; + } + + var in1 = inPoints[ref1][k]; + var in2 = inPoints[ref2][k]; + var out1 = outPoints[ref1][k]; + var out2 = outPoints[ref2][k]; + + // If the reference points have the same coordinate but different + // delta, inferred delta is zero. Otherwise interpolate. + if (in1 !== in2 || out1 === out2) { + var scale = in1 === in2 ? 0 : (out2 - out1) / (in2 - in1); + + for (var _p = p1; _p <= p2; _p++) { + var out = inPoints[_p][k]; + + if (out <= in1) { + out += out1 - in1; + } else if (out >= in2) { + out += out2 - in2; + } else { + out = out1 + (out - in1) * scale; + } + + outPoints[_p][k] = out; + } + } + } + }; + + GlyphVariationProcessor.prototype.deltaShift = function deltaShift(p1, p2, ref, inPoints, outPoints) { + var deltaX = outPoints[ref].x - inPoints[ref].x; + var deltaY = outPoints[ref].y - inPoints[ref].y; + + if (deltaX === 0 && deltaY === 0) { + return; + } + + for (var p = p1; p <= p2; p++) { + if (p !== ref) { + outPoints[p].x += deltaX; + outPoints[p].y += deltaY; + } + } + }; + + GlyphVariationProcessor.prototype.getAdvanceAdjustment = function getAdvanceAdjustment(gid, table) { + var outerIndex = void 0, + innerIndex = void 0; + + if (table.advanceWidthMapping) { + var idx = gid; + if (idx >= table.advanceWidthMapping.mapCount) { + idx = table.advanceWidthMapping.mapCount - 1; + } + + var entryFormat = table.advanceWidthMapping.entryFormat; + var _table$advanceWidthMa = table.advanceWidthMapping.mapData[idx]; + outerIndex = _table$advanceWidthMa.outerIndex; + innerIndex = _table$advanceWidthMa.innerIndex; + } else { + outerIndex = 0; + innerIndex = gid; + } + + return this.getMetricDelta(table.itemVariationStore, outerIndex, innerIndex); + }; + + // See pseudo code from `Font Variations Overview' + // in the OpenType specification. + + + GlyphVariationProcessor.prototype.getMetricDelta = function getMetricDelta(itemStore, outerIndex, innerIndex) { + var varData = itemStore.itemVariationData[outerIndex]; + var deltaSet = varData.deltaSets[innerIndex]; + var blendVector = this.getBlendVector(itemStore, outerIndex); + var netAdjustment = 0; + + for (var master = 0; master < varData.regionIndexCount; master++) { + netAdjustment += deltaSet.deltas[master] * blendVector[master]; + } + + return netAdjustment; + }; + + GlyphVariationProcessor.prototype.getBlendVector = function getBlendVector(itemStore, outerIndex) { + var varData = itemStore.itemVariationData[outerIndex]; + if (this.blendVectors.has(varData)) { + return this.blendVectors.get(varData); + } + + var normalizedCoords = this.normalizedCoords; + var blendVector = []; + + // outer loop steps through master designs to be blended + for (var master = 0; master < varData.regionIndexCount; master++) { + var scalar = 1; + var regionIndex = varData.regionIndexes[master]; + var axes = itemStore.variationRegionList.variationRegions[regionIndex]; + + // inner loop steps through axes in this region + for (var j = 0; j < axes.length; j++) { + var axis = axes[j]; + var axisScalar = void 0; + + // compute the scalar contribution of this axis + // ignore invalid ranges + if (axis.startCoord > axis.peakCoord || axis.peakCoord > axis.endCoord) { + axisScalar = 1; + } else if (axis.startCoord < 0 && axis.endCoord > 0 && axis.peakCoord !== 0) { + axisScalar = 1; + + // peak of 0 means ignore this axis + } else if (axis.peakCoord === 0) { + axisScalar = 1; + + // ignore this region if coords are out of range + } else if (normalizedCoords[j] < axis.startCoord || normalizedCoords[j] > axis.endCoord) { + axisScalar = 0; + + // calculate a proportional factor + } else { + if (normalizedCoords[j] === axis.peakCoord) { + axisScalar = 1; + } else if (normalizedCoords[j] < axis.peakCoord) { + axisScalar = (normalizedCoords[j] - axis.startCoord + _Number$EPSILON) / (axis.peakCoord - axis.startCoord + _Number$EPSILON); + } else { + axisScalar = (axis.endCoord - normalizedCoords[j] + _Number$EPSILON) / (axis.endCoord - axis.peakCoord + _Number$EPSILON); + } + } + + // take product of all the axis scalars + scalar *= axisScalar; + } + + blendVector[master] = scalar; + } + + this.blendVectors.set(varData, blendVector); + return blendVector; + }; + + return GlyphVariationProcessor; +}(); + +var Subset = function () { + function Subset(font) { + _classCallCheck(this, Subset); + + this.font = font; + this.glyphs = []; + this.mapping = {}; + + // always include the missing glyph + this.includeGlyph(0); + } + + Subset.prototype.includeGlyph = function includeGlyph(glyph) { + if ((typeof glyph === 'undefined' ? 'undefined' : _typeof(glyph)) === 'object') { + glyph = glyph.id; + } + + if (this.mapping[glyph] == null) { + this.glyphs.push(glyph); + this.mapping[glyph] = this.glyphs.length - 1; + } + + return this.mapping[glyph]; + }; + + Subset.prototype.encodeStream = function encodeStream() { + var _this = this; + + var s = new r.EncodeStream(); + + process.nextTick(function () { + _this.encode(s); + return s.end(); + }); + + return s; + }; + + return Subset; +}(); + +// Flags for simple glyphs +var ON_CURVE$1 = 1 << 0; +var X_SHORT_VECTOR$1 = 1 << 1; +var Y_SHORT_VECTOR$1 = 1 << 2; +var REPEAT$1 = 1 << 3; +var SAME_X$1 = 1 << 4; +var SAME_Y$1 = 1 << 5; + +var Point$1 = function () { + function Point() { + _classCallCheck(this, Point); + } + + Point.size = function size(val) { + return val >= 0 && val <= 255 ? 1 : 2; + }; + + Point.encode = function encode(stream, value) { + if (value >= 0 && value <= 255) { + stream.writeUInt8(value); + } else { + stream.writeInt16BE(value); + } + }; + + return Point; +}(); + +var Glyf = new r.Struct({ + numberOfContours: r.int16, // if negative, this is a composite glyph + xMin: r.int16, + yMin: r.int16, + xMax: r.int16, + yMax: r.int16, + endPtsOfContours: new r.Array(r.uint16, 'numberOfContours'), + instructions: new r.Array(r.uint8, r.uint16), + flags: new r.Array(r.uint8, 0), + xPoints: new r.Array(Point$1, 0), + yPoints: new r.Array(Point$1, 0) +}); + +/** + * Encodes TrueType glyph outlines + */ + +var TTFGlyphEncoder = function () { + function TTFGlyphEncoder() { + _classCallCheck(this, TTFGlyphEncoder); + } + + TTFGlyphEncoder.prototype.encodeSimple = function encodeSimple(path) { + var instructions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + + var endPtsOfContours = []; + var xPoints = []; + var yPoints = []; + var flags = []; + var same = 0; + var lastX = 0, + lastY = 0, + lastFlag = 0; + var pointCount = 0; + + for (var i = 0; i < path.commands.length; i++) { + var c = path.commands[i]; + + for (var j = 0; j < c.args.length; j += 2) { + var x = c.args[j]; + var y = c.args[j + 1]; + var flag = 0; + + // If the ending point of a quadratic curve is the midpoint + // between the control point and the control point of the next + // quadratic curve, we can omit the ending point. + if (c.command === 'quadraticCurveTo' && j === 2) { + var next = path.commands[i + 1]; + if (next && next.command === 'quadraticCurveTo') { + var midX = (lastX + next.args[0]) / 2; + var midY = (lastY + next.args[1]) / 2; + + if (x === midX && y === midY) { + continue; + } + } + } + + // All points except control points are on curve. + if (!(c.command === 'quadraticCurveTo' && j === 0)) { + flag |= ON_CURVE$1; + } + + flag = this._encodePoint(x, lastX, xPoints, flag, X_SHORT_VECTOR$1, SAME_X$1); + flag = this._encodePoint(y, lastY, yPoints, flag, Y_SHORT_VECTOR$1, SAME_Y$1); + + if (flag === lastFlag && same < 255) { + flags[flags.length - 1] |= REPEAT$1; + same++; + } else { + if (same > 0) { + flags.push(same); + same = 0; + } + + flags.push(flag); + lastFlag = flag; + } + + lastX = x; + lastY = y; + pointCount++; + } + + if (c.command === 'closePath') { + endPtsOfContours.push(pointCount - 1); + } + } + + // Close the path if the last command didn't already + if (path.commands.length > 1 && path.commands[path.commands.length - 1].command !== 'closePath') { + endPtsOfContours.push(pointCount - 1); + } + + var bbox = path.bbox; + var glyf = { + numberOfContours: endPtsOfContours.length, + xMin: bbox.minX, + yMin: bbox.minY, + xMax: bbox.maxX, + yMax: bbox.maxY, + endPtsOfContours: endPtsOfContours, + instructions: instructions, + flags: flags, + xPoints: xPoints, + yPoints: yPoints + }; + + var size = Glyf.size(glyf); + var tail = 4 - size % 4; + + var stream = new r.EncodeStream(size + tail); + Glyf.encode(stream, glyf); + + // Align to 4-byte length + if (tail !== 0) { + stream.fill(0, tail); + } + + return stream.buffer; + }; + + TTFGlyphEncoder.prototype._encodePoint = function _encodePoint(value, last, points, flag, shortFlag, sameFlag) { + var diff = value - last; + + if (value === last) { + flag |= sameFlag; + } else { + if (-255 <= diff && diff <= 255) { + flag |= shortFlag; + if (diff < 0) { + diff = -diff; + } else { + flag |= sameFlag; + } + } + + points.push(diff); + } + + return flag; + }; + + return TTFGlyphEncoder; +}(); + +var TTFSubset = function (_Subset) { + _inherits(TTFSubset, _Subset); + + function TTFSubset(font) { + _classCallCheck(this, TTFSubset); + + var _this = _possibleConstructorReturn(this, _Subset.call(this, font)); + + _this.glyphEncoder = new TTFGlyphEncoder(); + return _this; + } + + TTFSubset.prototype._addGlyph = function _addGlyph(gid) { + var glyph = this.font.getGlyph(gid); + var glyf = glyph._decode(); + + // get the offset to the glyph from the loca table + var curOffset = this.font.loca.offsets[gid]; + var nextOffset = this.font.loca.offsets[gid + 1]; + + var stream = this.font._getTableStream('glyf'); + stream.pos += curOffset; + + var buffer = stream.readBuffer(nextOffset - curOffset); + + // if it is a compound glyph, include its components + if (glyf && glyf.numberOfContours < 0) { + buffer = new Buffer(buffer); + for (var _iterator = glyf.components, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var component = _ref; + + gid = this.includeGlyph(component.glyphID); + buffer.writeUInt16BE(gid, component.pos); + } + } else if (glyf && this.font._variationProcessor) { + // If this is a TrueType variation glyph, re-encode the path + buffer = this.glyphEncoder.encodeSimple(glyph.path, glyf.instructions); + } + + this.glyf.push(buffer); + this.loca.offsets.push(this.offset); + + this.hmtx.metrics.push({ + advance: glyph.advanceWidth, + bearing: glyph._getMetrics().leftBearing + }); + + this.offset += buffer.length; + return this.glyf.length - 1; + }; + + TTFSubset.prototype.encode = function encode(stream) { + // tables required by PDF spec: + // head, hhea, loca, maxp, cvt , prep, glyf, hmtx, fpgm + // + // additional tables required for standalone fonts: + // name, cmap, OS/2, post + + this.glyf = []; + this.offset = 0; + this.loca = { + offsets: [] + }; + + this.hmtx = { + metrics: [], + bearings: [] + }; + + // include all the glyphs + // not using a for loop because we need to support adding more + // glyphs to the array as we go, and CoffeeScript caches the length. + var i = 0; + while (i < this.glyphs.length) { + this._addGlyph(this.glyphs[i++]); + } + + var maxp = cloneDeep(this.font.maxp); + maxp.numGlyphs = this.glyf.length; + + this.loca.offsets.push(this.offset); + tables.loca.preEncode.call(this.loca); + + var head = cloneDeep(this.font.head); + head.indexToLocFormat = this.loca.version; + + var hhea = cloneDeep(this.font.hhea); + hhea.numberOfMetrics = this.hmtx.metrics.length; + + // map = [] + // for index in [0...256] + // if index < @numGlyphs + // map[index] = index + // else + // map[index] = 0 + // + // cmapTable = + // version: 0 + // length: 262 + // language: 0 + // codeMap: map + // + // cmap = + // version: 0 + // numSubtables: 1 + // tables: [ + // platformID: 1 + // encodingID: 0 + // table: cmapTable + // ] + + // TODO: subset prep, cvt, fpgm? + Directory.encode(stream, { + tables: { + head: head, + hhea: hhea, + loca: this.loca, + maxp: maxp, + 'cvt ': this.font['cvt '], + prep: this.font.prep, + glyf: this.glyf, + hmtx: this.hmtx, + fpgm: this.font.fpgm + + // name: clone @font.name + // 'OS/2': clone @font['OS/2'] + // post: clone @font.post + // cmap: cmap + } + }); + }; + + return TTFSubset; +}(Subset); + +var CFFSubset = function (_Subset) { + _inherits(CFFSubset, _Subset); + + function CFFSubset(font) { + _classCallCheck(this, CFFSubset); + + var _this = _possibleConstructorReturn(this, _Subset.call(this, font)); + + _this.cff = _this.font['CFF ']; + if (!_this.cff) { + throw new Error('Not a CFF Font'); + } + return _this; + } + + CFFSubset.prototype.subsetCharstrings = function subsetCharstrings() { + this.charstrings = []; + var gsubrs = {}; + + for (var _iterator = this.glyphs, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var gid = _ref; + + this.charstrings.push(this.cff.getCharString(gid)); + + var glyph = this.font.getGlyph(gid); + var path = glyph.path; // this causes the glyph to be parsed + + for (var subr in glyph._usedGsubrs) { + gsubrs[subr] = true; + } + } + + this.gsubrs = this.subsetSubrs(this.cff.globalSubrIndex, gsubrs); + }; + + CFFSubset.prototype.subsetSubrs = function subsetSubrs(subrs, used) { + var res = []; + for (var i = 0; i < subrs.length; i++) { + var subr = subrs[i]; + if (used[i]) { + this.cff.stream.pos = subr.offset; + res.push(this.cff.stream.readBuffer(subr.length)); + } else { + res.push(new Buffer([11])); // return + } + } + + return res; + }; + + CFFSubset.prototype.subsetFontdict = function subsetFontdict(topDict) { + topDict.FDArray = []; + topDict.FDSelect = { + version: 0, + fds: [] + }; + + var used_fds = {}; + var used_subrs = []; + for (var _iterator2 = this.glyphs, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _getIterator(_iterator2);;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var gid = _ref2; + + var fd = this.cff.fdForGlyph(gid); + if (fd == null) { + continue; + } + + if (!used_fds[fd]) { + topDict.FDArray.push(_Object$assign({}, this.cff.topDict.FDArray[fd])); + used_subrs.push({}); + } + + used_fds[fd] = true; + topDict.FDSelect.fds.push(topDict.FDArray.length - 1); + + var glyph = this.font.getGlyph(gid); + var path = glyph.path; // this causes the glyph to be parsed + for (var subr in glyph._usedSubrs) { + used_subrs[used_subrs.length - 1][subr] = true; + } + } + + for (var i = 0; i < topDict.FDArray.length; i++) { + var dict = topDict.FDArray[i]; + delete dict.FontName; + if (dict.Private && dict.Private.Subrs) { + dict.Private = _Object$assign({}, dict.Private); + dict.Private.Subrs = this.subsetSubrs(dict.Private.Subrs, used_subrs[i]); + } + } + + return; + }; + + CFFSubset.prototype.createCIDFontdict = function createCIDFontdict(topDict) { + var used_subrs = {}; + for (var _iterator3 = this.glyphs, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _getIterator(_iterator3);;) { + var _ref3; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref3 = _i3.value; + } + + var gid = _ref3; + + var glyph = this.font.getGlyph(gid); + var path = glyph.path; // this causes the glyph to be parsed + + for (var subr in glyph._usedSubrs) { + used_subrs[subr] = true; + } + } + + var privateDict = _Object$assign({}, this.cff.topDict.Private); + privateDict.Subrs = this.subsetSubrs(this.cff.topDict.Private.Subrs, used_subrs); + + topDict.FDArray = [{ Private: privateDict }]; + return topDict.FDSelect = { + version: 3, + nRanges: 1, + ranges: [{ first: 0, fd: 0 }], + sentinel: this.charstrings.length + }; + }; + + CFFSubset.prototype.addString = function addString(string) { + if (!string) { + return null; + } + + if (!this.strings) { + this.strings = []; + } + + this.strings.push(string); + return standardStrings.length + this.strings.length - 1; + }; + + CFFSubset.prototype.encode = function encode(stream) { + this.subsetCharstrings(); + + var charset = { + version: this.charstrings.length > 255 ? 2 : 1, + ranges: [{ first: 1, nLeft: this.charstrings.length - 2 }] + }; + + var topDict = _Object$assign({}, this.cff.topDict); + topDict.Private = null; + topDict.charset = charset; + topDict.Encoding = null; + topDict.CharStrings = this.charstrings; + + var _arr = ['version', 'Notice', 'Copyright', 'FullName', 'FamilyName', 'Weight', 'PostScript', 'BaseFontName', 'FontName']; + for (var _i4 = 0; _i4 < _arr.length; _i4++) { + var key = _arr[_i4]; + topDict[key] = this.addString(this.cff.string(topDict[key])); + } + + topDict.ROS = [this.addString('Adobe'), this.addString('Identity'), 0]; + topDict.CIDCount = this.charstrings.length; + + if (this.cff.isCIDFont) { + this.subsetFontdict(topDict); + } else { + this.createCIDFontdict(topDict); + } + + var top = { + version: 1, + hdrSize: this.cff.hdrSize, + offSize: this.cff.length, + header: this.cff.header, + nameIndex: [this.cff.postscriptName], + topDictIndex: [topDict], + stringIndex: this.strings, + globalSubrIndex: this.gsubrs + }; + + CFFTop.encode(stream, top); + }; + + return CFFSubset; +}(Subset); + +var _class; +function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { + var desc = {}; + Object['ke' + 'ys'](descriptor).forEach(function (key) { + desc[key] = descriptor[key]; + }); + desc.enumerable = !!desc.enumerable; + desc.configurable = !!desc.configurable; + + if ('value' in desc || desc.initializer) { + desc.writable = true; + } + + desc = decorators.slice().reverse().reduce(function (desc, decorator) { + return decorator(target, property, desc) || desc; + }, desc); + + if (context && desc.initializer !== void 0) { + desc.value = desc.initializer ? desc.initializer.call(context) : void 0; + desc.initializer = undefined; + } + + if (desc.initializer === void 0) { + Object['define' + 'Property'](target, property, desc); + desc = null; + } + + return desc; +} + +/** + * This is the base class for all SFNT-based font formats in fontkit. + * It supports TrueType, and PostScript glyphs, and several color glyph formats. + */ +var TTFFont = (_class = function () { + TTFFont.probe = function probe(buffer) { + var format = buffer.toString('ascii', 0, 4); + return format === 'true' || format === 'OTTO' || format === String.fromCharCode(0, 1, 0, 0); + }; + + function TTFFont(stream) { + var variationCoords = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + + _classCallCheck(this, TTFFont); + + this.stream = stream; + this.variationCoords = variationCoords; + + this._directoryPos = this.stream.pos; + this._tables = {}; + this._glyphs = {}; + this._decodeDirectory(); + + // define properties for each table to lazily parse + for (var tag in this.directory.tables) { + var table = this.directory.tables[tag]; + if (tables[tag] && table.length > 0) { + _Object$defineProperty(this, tag, { + get: this._getTable.bind(this, table) + }); + } + } + } + + TTFFont.prototype._getTable = function _getTable(table) { + if (!(table.tag in this._tables)) { + try { + this._tables[table.tag] = this._decodeTable(table); + } catch (e) { + if (fontkit.logErrors) { + console.error('Error decoding table ' + table.tag); + console.error(e.stack); + } + } + } + + return this._tables[table.tag]; + }; + + TTFFont.prototype._getTableStream = function _getTableStream(tag) { + var table = this.directory.tables[tag]; + if (table) { + this.stream.pos = table.offset; + return this.stream; + } + + return null; + }; + + TTFFont.prototype._decodeDirectory = function _decodeDirectory() { + return this.directory = Directory.decode(this.stream, { _startOffset: 0 }); + }; + + TTFFont.prototype._decodeTable = function _decodeTable(table) { + var pos = this.stream.pos; + + var stream = this._getTableStream(table.tag); + var result = tables[table.tag].decode(stream, this, table.length); + + this.stream.pos = pos; + return result; + }; + + /** + * The unique PostScript name for this font + * @type {string} + */ + + + /** + * Gets a string from the font's `name` table + * `lang` is a BCP-47 language code. + * @return {string} + */ + TTFFont.prototype.getName = function getName(key) { + var lang = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en'; + + var record = this.name.records[key]; + if (record) { + return record[lang]; + } + + return null; + }; + + /** + * The font's full name, e.g. "Helvetica Bold" + * @type {string} + */ + + + /** + * Returns whether there is glyph in the font for the given unicode code point. + * + * @param {number} codePoint + * @return {boolean} + */ + TTFFont.prototype.hasGlyphForCodePoint = function hasGlyphForCodePoint(codePoint) { + return !!this._cmapProcessor.lookup(codePoint); + }; + + /** + * Maps a single unicode code point to a Glyph object. + * Does not perform any advanced substitutions (there is no context to do so). + * + * @param {number} codePoint + * @return {Glyph} + */ + + + TTFFont.prototype.glyphForCodePoint = function glyphForCodePoint(codePoint) { + return this.getGlyph(this._cmapProcessor.lookup(codePoint), [codePoint]); + }; + + /** + * Returns an array of Glyph objects for the given string. + * This is only a one-to-one mapping from characters to glyphs. + * For most uses, you should use font.layout (described below), which + * provides a much more advanced mapping supporting AAT and OpenType shaping. + * + * @param {string} string + * @return {Glyph[]} + */ + + + TTFFont.prototype.glyphsForString = function glyphsForString(string) { + var glyphs = []; + var len = string.length; + var idx = 0; + var last = -1; + var state = -1; + + while (idx <= len) { + var code = 0; + var nextState = 0; + + if (idx < len) { + // Decode the next codepoint from UTF 16 + code = string.charCodeAt(idx++); + if (0xd800 <= code && code <= 0xdbff && idx < len) { + var next = string.charCodeAt(idx); + if (0xdc00 <= next && next <= 0xdfff) { + idx++; + code = ((code & 0x3ff) << 10) + (next & 0x3ff) + 0x10000; + } + } + + // Compute the next state: 1 if the next codepoint is a variation selector, 0 otherwise. + nextState = 0xfe00 <= code && code <= 0xfe0f || 0xe0100 <= code && code <= 0xe01ef ? 1 : 0; + } else { + idx++; + } + + if (state === 0 && nextState === 1) { + // Variation selector following normal codepoint. + glyphs.push(this.getGlyph(this._cmapProcessor.lookup(last, code), [last, code])); + } else if (state === 0 && nextState === 0) { + // Normal codepoint following normal codepoint. + glyphs.push(this.glyphForCodePoint(last)); + } + + last = code; + state = nextState; + } + + return glyphs; + }; + + /** + * Returns a GlyphRun object, which includes an array of Glyphs and GlyphPositions for the given string. + * + * @param {string} string + * @param {string[]} [userFeatures] + * @param {string} [script] + * @param {string} [language] + * @return {GlyphRun} + */ + TTFFont.prototype.layout = function layout(string, userFeatures, script, language) { + return this._layoutEngine.layout(string, userFeatures, script, language); + }; + + /** + * Returns an array of strings that map to the given glyph id. + * @param {number} gid - glyph id + */ + + + TTFFont.prototype.stringsForGlyph = function stringsForGlyph(gid) { + return this._layoutEngine.stringsForGlyph(gid); + }; + + /** + * An array of all [OpenType feature tags](https://www.microsoft.com/typography/otspec/featuretags.htm) + * (or mapped AAT tags) supported by the font. + * The features parameter is an array of OpenType feature tags to be applied in addition to the default set. + * If this is an AAT font, the OpenType feature tags are mapped to AAT features. + * + * @type {string[]} + */ + + + TTFFont.prototype._getBaseGlyph = function _getBaseGlyph(glyph) { + var characters = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + + if (!this._glyphs[glyph]) { + if (this.directory.tables.glyf) { + this._glyphs[glyph] = new TTFGlyph(glyph, characters, this); + } else if (this.directory.tables['CFF '] || this.directory.tables.CFF2) { + this._glyphs[glyph] = new CFFGlyph(glyph, characters, this); + } + } + + return this._glyphs[glyph] || null; + }; + + /** + * Returns a glyph object for the given glyph id. + * You can pass the array of code points this glyph represents for + * your use later, and it will be stored in the glyph object. + * + * @param {number} glyph + * @param {number[]} characters + * @return {Glyph} + */ + + + TTFFont.prototype.getGlyph = function getGlyph(glyph) { + var characters = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + + if (!this._glyphs[glyph]) { + if (this.directory.tables.sbix) { + this._glyphs[glyph] = new SBIXGlyph(glyph, characters, this); + } else if (this.directory.tables.COLR && this.directory.tables.CPAL) { + this._glyphs[glyph] = new COLRGlyph(glyph, characters, this); + } else { + this._getBaseGlyph(glyph, characters); + } + } + + return this._glyphs[glyph] || null; + }; + + /** + * Returns a Subset for this font. + * @return {Subset} + */ + + + TTFFont.prototype.createSubset = function createSubset() { + if (this.directory.tables['CFF ']) { + return new CFFSubset(this); + } + + return new TTFSubset(this); + }; + + /** + * Returns an object describing the available variation axes + * that this font supports. Keys are setting tags, and values + * contain the axis name, range, and default value. + * + * @type {object} + */ + + + /** + * Returns a new font with the given variation settings applied. + * Settings can either be an instance name, or an object containing + * variation tags as specified by the `variationAxes` property. + * + * @param {object} settings + * @return {TTFFont} + */ + TTFFont.prototype.getVariation = function getVariation(settings) { + if (!(this.directory.tables.fvar && (this.directory.tables.gvar && this.directory.tables.glyf || this.directory.tables.CFF2))) { + throw new Error('Variations require a font with the fvar, gvar and glyf, or CFF2 tables.'); + } + + if (typeof settings === 'string') { + settings = this.namedVariations[settings]; + } + + if ((typeof settings === 'undefined' ? 'undefined' : _typeof(settings)) !== 'object') { + throw new Error('Variation settings must be either a variation name or settings object.'); + } + + // normalize the coordinates + var coords = this.fvar.axis.map(function (axis, i) { + var axisTag = axis.axisTag.trim(); + if (axisTag in settings) { + return Math.max(axis.minValue, Math.min(axis.maxValue, settings[axisTag])); + } else { + return axis.defaultValue; + } + }); + + var stream = new r.DecodeStream(this.stream.buffer); + stream.pos = this._directoryPos; + + var font = new TTFFont(stream, coords); + font._tables = this._tables; + + return font; + }; + + // Standardized format plugin API + TTFFont.prototype.getFont = function getFont(name) { + return this.getVariation(name); + }; + + _createClass(TTFFont, [{ + key: 'postscriptName', + get: function get() { + var name = this.name.records.postscriptName; + var lang = _Object$keys(name)[0]; + return name[lang]; + } + }, { + key: 'fullName', + get: function get() { + return this.getName('fullName'); + } + + /** + * The font's family name, e.g. "Helvetica" + * @type {string} + */ + + }, { + key: 'familyName', + get: function get() { + return this.getName('fontFamily'); + } + + /** + * The font's sub-family, e.g. "Bold". + * @type {string} + */ + + }, { + key: 'subfamilyName', + get: function get() { + return this.getName('fontSubfamily'); + } + + /** + * The font's copyright information + * @type {string} + */ + + }, { + key: 'copyright', + get: function get() { + return this.getName('copyright'); + } + + /** + * The font's version number + * @type {string} + */ + + }, { + key: 'version', + get: function get() { + return this.getName('version'); + } + + /** + * The font’s [ascender](https://en.wikipedia.org/wiki/Ascender_(typography)) + * @type {number} + */ + + }, { + key: 'ascent', + get: function get() { + return this.hhea.ascent; + } + + /** + * The font’s [descender](https://en.wikipedia.org/wiki/Descender) + * @type {number} + */ + + }, { + key: 'descent', + get: function get() { + return this.hhea.descent; + } + + /** + * The amount of space that should be included between lines + * @type {number} + */ + + }, { + key: 'lineGap', + get: function get() { + return this.hhea.lineGap; + } + + /** + * The offset from the normal underline position that should be used + * @type {number} + */ + + }, { + key: 'underlinePosition', + get: function get() { + return this.post.underlinePosition; + } + + /** + * The weight of the underline that should be used + * @type {number} + */ + + }, { + key: 'underlineThickness', + get: function get() { + return this.post.underlineThickness; + } + + /** + * If this is an italic font, the angle the cursor should be drawn at to match the font design + * @type {number} + */ + + }, { + key: 'italicAngle', + get: function get() { + return this.post.italicAngle; + } + + /** + * The height of capital letters above the baseline. + * See [here](https://en.wikipedia.org/wiki/Cap_height) for more details. + * @type {number} + */ + + }, { + key: 'capHeight', + get: function get() { + var os2 = this['OS/2']; + return os2 ? os2.capHeight : this.ascent; + } + + /** + * The height of lower case letters in the font. + * See [here](https://en.wikipedia.org/wiki/X-height) for more details. + * @type {number} + */ + + }, { + key: 'xHeight', + get: function get() { + var os2 = this['OS/2']; + return os2 ? os2.xHeight : 0; + } + + /** + * The number of glyphs in the font. + * @type {number} + */ + + }, { + key: 'numGlyphs', + get: function get() { + return this.maxp.numGlyphs; + } + + /** + * The size of the font’s internal coordinate grid + * @type {number} + */ + + }, { + key: 'unitsPerEm', + get: function get() { + return this.head.unitsPerEm; + } + + /** + * The font’s bounding box, i.e. the box that encloses all glyphs in the font. + * @type {BBox} + */ + + }, { + key: 'bbox', + get: function get() { + return _Object$freeze(new BBox(this.head.xMin, this.head.yMin, this.head.xMax, this.head.yMax)); + } + }, { + key: '_cmapProcessor', + get: function get() { + return new CmapProcessor(this.cmap); + } + + /** + * An array of all of the unicode code points supported by the font. + * @type {number[]} + */ + + }, { + key: 'characterSet', + get: function get() { + return this._cmapProcessor.getCharacterSet(); + } + }, { + key: '_layoutEngine', + get: function get() { + return new LayoutEngine(this); + } + }, { + key: 'availableFeatures', + get: function get() { + return this._layoutEngine.getAvailableFeatures(); + } + }, { + key: 'variationAxes', + get: function get() { + var res = {}; + if (!this.fvar) { + return res; + } + + for (var _iterator = this.fvar.axis, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var axis = _ref; + + res[axis.axisTag.trim()] = { + name: axis.name.en, + min: axis.minValue, + default: axis.defaultValue, + max: axis.maxValue + }; + } + + return res; + } + + /** + * Returns an object describing the named variation instances + * that the font designer has specified. Keys are variation names + * and values are the variation settings for this instance. + * + * @type {object} + */ + + }, { + key: 'namedVariations', + get: function get() { + var res = {}; + if (!this.fvar) { + return res; + } + + for (var _iterator2 = this.fvar.instance, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _getIterator(_iterator2);;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var instance = _ref2; + + var settings = {}; + for (var i = 0; i < this.fvar.axis.length; i++) { + var axis = this.fvar.axis[i]; + settings[axis.axisTag.trim()] = instance.coord[i]; + } + + res[instance.name.en] = settings; + } + + return res; + } + }, { + key: '_variationProcessor', + get: function get() { + if (!this.fvar) { + return null; + } + + var variationCoords = this.variationCoords; + + // Ignore if no variation coords and not CFF2 + if (!variationCoords && !this.CFF2) { + return null; + } + + if (!variationCoords) { + variationCoords = this.fvar.axis.map(function (axis) { + return axis.defaultValue; + }); + } + + return new GlyphVariationProcessor(this, variationCoords); + } + }]); + + return TTFFont; +}(), (_applyDecoratedDescriptor(_class.prototype, 'bbox', [cache], _Object$getOwnPropertyDescriptor(_class.prototype, 'bbox'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, '_cmapProcessor', [cache], _Object$getOwnPropertyDescriptor(_class.prototype, '_cmapProcessor'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'characterSet', [cache], _Object$getOwnPropertyDescriptor(_class.prototype, 'characterSet'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, '_layoutEngine', [cache], _Object$getOwnPropertyDescriptor(_class.prototype, '_layoutEngine'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'variationAxes', [cache], _Object$getOwnPropertyDescriptor(_class.prototype, 'variationAxes'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, 'namedVariations', [cache], _Object$getOwnPropertyDescriptor(_class.prototype, 'namedVariations'), _class.prototype), _applyDecoratedDescriptor(_class.prototype, '_variationProcessor', [cache], _Object$getOwnPropertyDescriptor(_class.prototype, '_variationProcessor'), _class.prototype)), _class); + +var WOFFDirectoryEntry = new r.Struct({ + tag: new r.String(4), + offset: new r.Pointer(r.uint32, 'void', { type: 'global' }), + compLength: r.uint32, + length: r.uint32, + origChecksum: r.uint32 +}); + +var WOFFDirectory = new r.Struct({ + tag: new r.String(4), // should be 'wOFF' + flavor: r.uint32, + length: r.uint32, + numTables: r.uint16, + reserved: new r.Reserved(r.uint16), + totalSfntSize: r.uint32, + majorVersion: r.uint16, + minorVersion: r.uint16, + metaOffset: r.uint32, + metaLength: r.uint32, + metaOrigLength: r.uint32, + privOffset: r.uint32, + privLength: r.uint32, + tables: new r.Array(WOFFDirectoryEntry, 'numTables') +}); + +WOFFDirectory.process = function () { + var tables = {}; + for (var _iterator = this.tables, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var table = _ref; + + tables[table.tag] = table; + } + + this.tables = tables; +}; + +var WOFFFont = function (_TTFFont) { + _inherits(WOFFFont, _TTFFont); + + function WOFFFont() { + _classCallCheck(this, WOFFFont); + + return _possibleConstructorReturn(this, _TTFFont.apply(this, arguments)); + } + + WOFFFont.probe = function probe(buffer) { + return buffer.toString('ascii', 0, 4) === 'wOFF'; + }; + + WOFFFont.prototype._decodeDirectory = function _decodeDirectory() { + this.directory = WOFFDirectory.decode(this.stream, { _startOffset: 0 }); + }; + + WOFFFont.prototype._getTableStream = function _getTableStream(tag) { + var table = this.directory.tables[tag]; + if (table) { + this.stream.pos = table.offset; + + if (table.compLength < table.length) { + this.stream.pos += 2; // skip deflate header + var outBuffer = new Buffer(table.length); + var buf = inflate(this.stream.readBuffer(table.compLength - 2), outBuffer); + return new r.DecodeStream(buf); + } else { + return this.stream; + } + } + + return null; + }; + + return WOFFFont; +}(TTFFont); + +/** + * Represents a TrueType glyph in the WOFF2 format, which compresses glyphs differently. + */ + +var WOFF2Glyph = function (_TTFGlyph) { + _inherits(WOFF2Glyph, _TTFGlyph); + + function WOFF2Glyph() { + _classCallCheck(this, WOFF2Glyph); + + return _possibleConstructorReturn(this, _TTFGlyph.apply(this, arguments)); + } + + WOFF2Glyph.prototype._decode = function _decode() { + // We have to decode in advance (in WOFF2Font), so just return the pre-decoded data. + return this._font._transformedGlyphs[this.id]; + }; + + WOFF2Glyph.prototype._getCBox = function _getCBox() { + return this.path.bbox; + }; + + return WOFF2Glyph; +}(TTFGlyph); + +var Base128 = { + decode: function decode(stream) { + var result = 0; + var iterable = [0, 1, 2, 3, 4]; + for (var j = 0; j < iterable.length; j++) { + var i = iterable[j]; + var code = stream.readUInt8(); + + // If any of the top seven bits are set then we're about to overflow. + if (result & 0xe0000000) { + throw new Error('Overflow'); + } + + result = result << 7 | code & 0x7f; + if ((code & 0x80) === 0) { + return result; + } + } + + throw new Error('Bad base 128 number'); + } +}; + +var knownTags = ['cmap', 'head', 'hhea', 'hmtx', 'maxp', 'name', 'OS/2', 'post', 'cvt ', 'fpgm', 'glyf', 'loca', 'prep', 'CFF ', 'VORG', 'EBDT', 'EBLC', 'gasp', 'hdmx', 'kern', 'LTSH', 'PCLT', 'VDMX', 'vhea', 'vmtx', 'BASE', 'GDEF', 'GPOS', 'GSUB', 'EBSC', 'JSTF', 'MATH', 'CBDT', 'CBLC', 'COLR', 'CPAL', 'SVG ', 'sbix', 'acnt', 'avar', 'bdat', 'bloc', 'bsln', 'cvar', 'fdsc', 'feat', 'fmtx', 'fvar', 'gvar', 'hsty', 'just', 'lcar', 'mort', 'morx', 'opbd', 'prop', 'trak', 'Zapf', 'Silf', 'Glat', 'Gloc', 'Feat', 'Sill']; + +var WOFF2DirectoryEntry = new r.Struct({ + flags: r.uint8, + customTag: new r.Optional(new r.String(4), function (t) { + return (t.flags & 0x3f) === 0x3f; + }), + tag: function tag(t) { + return t.customTag || knownTags[t.flags & 0x3f]; + }, // || (() => { throw new Error(`Bad tag: ${flags & 0x3f}`); })(); }, + length: Base128, + transformVersion: function transformVersion(t) { + return t.flags >>> 6 & 0x03; + }, + transformed: function transformed(t) { + return t.tag === 'glyf' || t.tag === 'loca' ? t.transformVersion === 0 : t.transformVersion !== 0; + }, + transformLength: new r.Optional(Base128, function (t) { + return t.transformed; + }) +}); + +var WOFF2Directory = new r.Struct({ + tag: new r.String(4), // should be 'wOF2' + flavor: r.uint32, + length: r.uint32, + numTables: r.uint16, + reserved: new r.Reserved(r.uint16), + totalSfntSize: r.uint32, + totalCompressedSize: r.uint32, + majorVersion: r.uint16, + minorVersion: r.uint16, + metaOffset: r.uint32, + metaLength: r.uint32, + metaOrigLength: r.uint32, + privOffset: r.uint32, + privLength: r.uint32, + tables: new r.Array(WOFF2DirectoryEntry, 'numTables') +}); + +WOFF2Directory.process = function () { + var tables = {}; + for (var i = 0; i < this.tables.length; i++) { + var table = this.tables[i]; + tables[table.tag] = table; + } + + return this.tables = tables; +}; + +/** + * Subclass of TTFFont that represents a TTF/OTF font compressed by WOFF2 + * See spec here: http://www.w3.org/TR/WOFF2/ + */ + +var WOFF2Font = function (_TTFFont) { + _inherits(WOFF2Font, _TTFFont); + + function WOFF2Font() { + _classCallCheck(this, WOFF2Font); + + return _possibleConstructorReturn(this, _TTFFont.apply(this, arguments)); + } + + WOFF2Font.probe = function probe(buffer) { + return buffer.toString('ascii', 0, 4) === 'wOF2'; + }; + + WOFF2Font.prototype._decodeDirectory = function _decodeDirectory() { + this.directory = WOFF2Directory.decode(this.stream); + this._dataPos = this.stream.pos; + }; + + WOFF2Font.prototype._decompress = function _decompress() { + // decompress data and setup table offsets if we haven't already + if (!this._decompressed) { + this.stream.pos = this._dataPos; + var buffer = this.stream.readBuffer(this.directory.totalCompressedSize); + + var decompressedSize = 0; + for (var tag in this.directory.tables) { + var entry = this.directory.tables[tag]; + entry.offset = decompressedSize; + decompressedSize += entry.transformLength != null ? entry.transformLength : entry.length; + } + + var decompressed = brotli(buffer, decompressedSize); + if (!decompressed) { + throw new Error('Error decoding compressed data in WOFF2'); + } + + this.stream = new r.DecodeStream(new Buffer(decompressed)); + this._decompressed = true; + } + }; + + WOFF2Font.prototype._decodeTable = function _decodeTable(table) { + this._decompress(); + return _TTFFont.prototype._decodeTable.call(this, table); + }; + + // Override this method to get a glyph and return our + // custom subclass if there is a glyf table. + + + WOFF2Font.prototype._getBaseGlyph = function _getBaseGlyph(glyph) { + var characters = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : []; + + if (!this._glyphs[glyph]) { + if (this.directory.tables.glyf && this.directory.tables.glyf.transformed) { + if (!this._transformedGlyphs) { + this._transformGlyfTable(); + } + return this._glyphs[glyph] = new WOFF2Glyph(glyph, characters, this); + } else { + return _TTFFont.prototype._getBaseGlyph.call(this, glyph, characters); + } + } + }; + + WOFF2Font.prototype._transformGlyfTable = function _transformGlyfTable() { + this._decompress(); + this.stream.pos = this.directory.tables.glyf.offset; + var table = GlyfTable.decode(this.stream); + var glyphs = []; + + for (var index = 0; index < table.numGlyphs; index++) { + var glyph = {}; + var nContours = table.nContours.readInt16BE(); + glyph.numberOfContours = nContours; + + if (nContours > 0) { + // simple glyph + var nPoints = []; + var totalPoints = 0; + + for (var i = 0; i < nContours; i++) { + var _r = read255UInt16(table.nPoints); + nPoints.push(_r); + totalPoints += _r; + } + + glyph.points = decodeTriplet(table.flags, table.glyphs, totalPoints); + for (var _i = 0; _i < nContours; _i++) { + glyph.points[nPoints[_i] - 1].endContour = true; + } + + var instructionSize = read255UInt16(table.glyphs); + } else if (nContours < 0) { + // composite glyph + var haveInstructions = TTFGlyph.prototype._decodeComposite.call({ _font: this }, glyph, table.composites); + if (haveInstructions) { + var instructionSize = read255UInt16(table.glyphs); + } + } + + glyphs.push(glyph); + } + + this._transformedGlyphs = glyphs; + }; + + return WOFF2Font; +}(TTFFont); + +var Substream = function () { + function Substream(length) { + _classCallCheck(this, Substream); + + this.length = length; + this._buf = new r.Buffer(length); + } + + Substream.prototype.decode = function decode(stream, parent) { + return new r.DecodeStream(this._buf.decode(stream, parent)); + }; + + return Substream; +}(); + +// This struct represents the entire glyf table + + +var GlyfTable = new r.Struct({ + version: r.uint32, + numGlyphs: r.uint16, + indexFormat: r.uint16, + nContourStreamSize: r.uint32, + nPointsStreamSize: r.uint32, + flagStreamSize: r.uint32, + glyphStreamSize: r.uint32, + compositeStreamSize: r.uint32, + bboxStreamSize: r.uint32, + instructionStreamSize: r.uint32, + nContours: new Substream('nContourStreamSize'), + nPoints: new Substream('nPointsStreamSize'), + flags: new Substream('flagStreamSize'), + glyphs: new Substream('glyphStreamSize'), + composites: new Substream('compositeStreamSize'), + bboxes: new Substream('bboxStreamSize'), + instructions: new Substream('instructionStreamSize') +}); + +var WORD_CODE = 253; +var ONE_MORE_BYTE_CODE2 = 254; +var ONE_MORE_BYTE_CODE1 = 255; +var LOWEST_U_CODE = 253; + +function read255UInt16(stream) { + var code = stream.readUInt8(); + + if (code === WORD_CODE) { + return stream.readUInt16BE(); + } + + if (code === ONE_MORE_BYTE_CODE1) { + return stream.readUInt8() + LOWEST_U_CODE; + } + + if (code === ONE_MORE_BYTE_CODE2) { + return stream.readUInt8() + LOWEST_U_CODE * 2; + } + + return code; +} + +function withSign(flag, baseval) { + return flag & 1 ? baseval : -baseval; +} + +function decodeTriplet(flags, glyphs, nPoints) { + var y = void 0; + var x = y = 0; + var res = []; + + for (var i = 0; i < nPoints; i++) { + var dx = 0, + dy = 0; + var flag = flags.readUInt8(); + var onCurve = !(flag >> 7); + flag &= 0x7f; + + if (flag < 10) { + dx = 0; + dy = withSign(flag, ((flag & 14) << 7) + glyphs.readUInt8()); + } else if (flag < 20) { + dx = withSign(flag, ((flag - 10 & 14) << 7) + glyphs.readUInt8()); + dy = 0; + } else if (flag < 84) { + var b0 = flag - 20; + var b1 = glyphs.readUInt8(); + dx = withSign(flag, 1 + (b0 & 0x30) + (b1 >> 4)); + dy = withSign(flag >> 1, 1 + ((b0 & 0x0c) << 2) + (b1 & 0x0f)); + } else if (flag < 120) { + var b0 = flag - 84; + dx = withSign(flag, 1 + (b0 / 12 << 8) + glyphs.readUInt8()); + dy = withSign(flag >> 1, 1 + (b0 % 12 >> 2 << 8) + glyphs.readUInt8()); + } else if (flag < 124) { + var b1 = glyphs.readUInt8(); + var b2 = glyphs.readUInt8(); + dx = withSign(flag, (b1 << 4) + (b2 >> 4)); + dy = withSign(flag >> 1, ((b2 & 0x0f) << 8) + glyphs.readUInt8()); + } else { + dx = withSign(flag, glyphs.readUInt16BE()); + dy = withSign(flag >> 1, glyphs.readUInt16BE()); + } + + x += dx; + y += dy; + res.push(new Point(onCurve, false, x, y)); + } + + return res; +} + +var TTCHeader = new r.VersionedStruct(r.uint32, { + 0x00010000: { + numFonts: r.uint32, + offsets: new r.Array(r.uint32, 'numFonts') + }, + 0x00020000: { + numFonts: r.uint32, + offsets: new r.Array(r.uint32, 'numFonts'), + dsigTag: r.uint32, + dsigLength: r.uint32, + dsigOffset: r.uint32 + } +}); + +var TrueTypeCollection = function () { + TrueTypeCollection.probe = function probe(buffer) { + return buffer.toString('ascii', 0, 4) === 'ttcf'; + }; + + function TrueTypeCollection(stream) { + _classCallCheck(this, TrueTypeCollection); + + this.stream = stream; + if (stream.readString(4) !== 'ttcf') { + throw new Error('Not a TrueType collection'); + } + + this.header = TTCHeader.decode(stream); + } + + TrueTypeCollection.prototype.getFont = function getFont(name) { + for (var _iterator = this.header.offsets, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var offset = _ref; + + var stream = new r.DecodeStream(this.stream.buffer); + stream.pos = offset; + var font = new TTFFont(stream); + if (font.postscriptName === name) { + return font; + } + } + + return null; + }; + + _createClass(TrueTypeCollection, [{ + key: 'fonts', + get: function get() { + var fonts = []; + for (var _iterator2 = this.header.offsets, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _getIterator(_iterator2);;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var offset = _ref2; + + var stream = new r.DecodeStream(this.stream.buffer); + stream.pos = offset; + fonts.push(new TTFFont(stream)); + } + + return fonts; + } + }]); + + return TrueTypeCollection; +}(); + +var DFontName = new r.String(r.uint8); +var DFontData = new r.Struct({ + len: r.uint32, + buf: new r.Buffer('len') +}); + +var Ref = new r.Struct({ + id: r.uint16, + nameOffset: r.int16, + attr: r.uint8, + dataOffset: r.uint24, + handle: r.uint32 +}); + +var Type = new r.Struct({ + name: new r.String(4), + maxTypeIndex: r.uint16, + refList: new r.Pointer(r.uint16, new r.Array(Ref, function (t) { + return t.maxTypeIndex + 1; + }), { type: 'parent' }) +}); + +var TypeList = new r.Struct({ + length: r.uint16, + types: new r.Array(Type, function (t) { + return t.length + 1; + }) +}); + +var DFontMap = new r.Struct({ + reserved: new r.Reserved(r.uint8, 24), + typeList: new r.Pointer(r.uint16, TypeList), + nameListOffset: new r.Pointer(r.uint16, 'void') +}); + +var DFontHeader = new r.Struct({ + dataOffset: r.uint32, + map: new r.Pointer(r.uint32, DFontMap), + dataLength: r.uint32, + mapLength: r.uint32 +}); + +var DFont = function () { + DFont.probe = function probe(buffer) { + var stream = new r.DecodeStream(buffer); + + try { + var header = DFontHeader.decode(stream); + } catch (e) { + return false; + } + + for (var _iterator = header.map.typeList.types, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _getIterator(_iterator);;) { + var _ref; + + if (_isArray) { + if (_i >= _iterator.length) break; + _ref = _iterator[_i++]; + } else { + _i = _iterator.next(); + if (_i.done) break; + _ref = _i.value; + } + + var type = _ref; + + if (type.name === 'sfnt') { + return true; + } + } + + return false; + }; + + function DFont(stream) { + _classCallCheck(this, DFont); + + this.stream = stream; + this.header = DFontHeader.decode(this.stream); + + for (var _iterator2 = this.header.map.typeList.types, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _getIterator(_iterator2);;) { + var _ref2; + + if (_isArray2) { + if (_i2 >= _iterator2.length) break; + _ref2 = _iterator2[_i2++]; + } else { + _i2 = _iterator2.next(); + if (_i2.done) break; + _ref2 = _i2.value; + } + + var type = _ref2; + + for (var _iterator3 = type.refList, _isArray3 = Array.isArray(_iterator3), _i3 = 0, _iterator3 = _isArray3 ? _iterator3 : _getIterator(_iterator3);;) { + var _ref3; + + if (_isArray3) { + if (_i3 >= _iterator3.length) break; + _ref3 = _iterator3[_i3++]; + } else { + _i3 = _iterator3.next(); + if (_i3.done) break; + _ref3 = _i3.value; + } + + var ref = _ref3; + + if (ref.nameOffset >= 0) { + this.stream.pos = ref.nameOffset + this.header.map.nameListOffset; + ref.name = DFontName.decode(this.stream); + } else { + ref.name = null; + } + } + + if (type.name === 'sfnt') { + this.sfnt = type; + } + } + } + + DFont.prototype.getFont = function getFont(name) { + if (!this.sfnt) { + return null; + } + + for (var _iterator4 = this.sfnt.refList, _isArray4 = Array.isArray(_iterator4), _i4 = 0, _iterator4 = _isArray4 ? _iterator4 : _getIterator(_iterator4);;) { + var _ref4; + + if (_isArray4) { + if (_i4 >= _iterator4.length) break; + _ref4 = _iterator4[_i4++]; + } else { + _i4 = _iterator4.next(); + if (_i4.done) break; + _ref4 = _i4.value; + } + + var ref = _ref4; + + var pos = this.header.dataOffset + ref.dataOffset + 4; + var stream = new r.DecodeStream(this.stream.buffer.slice(pos)); + var font = new TTFFont(stream); + if (font.postscriptName === name) { + return font; + } + } + + return null; + }; + + _createClass(DFont, [{ + key: 'fonts', + get: function get() { + var fonts = []; + for (var _iterator5 = this.sfnt.refList, _isArray5 = Array.isArray(_iterator5), _i5 = 0, _iterator5 = _isArray5 ? _iterator5 : _getIterator(_iterator5);;) { + var _ref5; + + if (_isArray5) { + if (_i5 >= _iterator5.length) break; + _ref5 = _iterator5[_i5++]; + } else { + _i5 = _iterator5.next(); + if (_i5.done) break; + _ref5 = _i5.value; + } + + var ref = _ref5; + + var pos = this.header.dataOffset + ref.dataOffset + 4; + var stream = new r.DecodeStream(this.stream.buffer.slice(pos)); + fonts.push(new TTFFont(stream)); + } + + return fonts; + } + }]); + + return DFont; +}(); + +// Register font formats +fontkit.registerFormat(TTFFont); +fontkit.registerFormat(WOFFFont); +fontkit.registerFormat(WOFF2Font); +fontkit.registerFormat(TrueTypeCollection); +fontkit.registerFormat(DFont); + +module.exports = fontkit; +//# sourceMappingURL=index.js.map diff --git a/pitfall/pdfkit/node_modules/fontkit/index.js.map b/pitfall/pdfkit/node_modules/fontkit/index.js.map new file mode 100644 index 00000000..7dfa40ff --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/index.js.map @@ -0,0 +1 @@ +{"version":3,"file":null,"sources":["src/base.js","src/decorators.js","src/tables/cmap.js","src/tables/head.js","src/tables/hhea.js","src/tables/hmtx.js","src/tables/maxp.js","src/encodings.js","src/tables/name.js","src/tables/OS2.js","src/tables/post.js","src/tables/cvt.js","src/tables/fpgm.js","src/tables/loca.js","src/tables/prep.js","src/tables/glyf.js","src/cff/CFFIndex.js","src/cff/CFFOperand.js","src/cff/CFFDict.js","src/cff/CFFPointer.js","src/cff/CFFPrivateDict.js","src/cff/CFFStandardStrings.js","src/cff/CFFEncodings.js","src/cff/CFFCharsets.js","src/tables/opentype.js","src/tables/variations.js","src/cff/CFFTop.js","src/cff/CFFFont.js","src/tables/VORG.js","src/tables/EBDT.js","src/tables/EBLC.js","src/tables/sbix.js","src/tables/COLR.js","src/tables/CPAL.js","src/tables/BASE.js","src/tables/GDEF.js","src/tables/GPOS.js","src/tables/GSUB.js","src/tables/JSTF.js","src/tables/HVAR.js","src/tables/DSIG.js","src/tables/gasp.js","src/tables/hdmx.js","src/tables/kern.js","src/tables/LTSH.js","src/tables/PCLT.js","src/tables/VDMX.js","src/tables/vhea.js","src/tables/vmtx.js","src/tables/avar.js","src/tables/aat.js","src/tables/bsln.js","src/tables/feat.js","src/tables/fvar.js","src/tables/gvar.js","src/tables/just.js","src/tables/morx.js","src/tables/opbd.js","src/tables/index.js","src/tables/directory.js","src/utils.js","src/CmapProcessor.js","src/layout/KernProcessor.js","src/layout/UnicodeLayoutEngine.js","src/glyph/BBox.js","src/layout/GlyphRun.js","src/layout/GlyphPosition.js","src/layout/Script.js","src/aat/AATFeatureMap.js","src/aat/AATLookupTable.js","src/aat/AATStateMachine.js","src/aat/AATMorxProcessor.js","src/aat/AATLayoutEngine.js","src/opentype/ShapingPlan.js","src/opentype/shapers/DefaultShaper.js","src/opentype/shapers/ArabicShaper.js","src/opentype/GlyphIterator.js","src/opentype/OTProcessor.js","src/opentype/GlyphInfo.js","src/opentype/shapers/HangulShaper.js","src/opentype/shapers/UniversalShaper.js","src/opentype/shapers/index.js","src/opentype/GSUBProcessor.js","src/opentype/GPOSProcessor.js","src/opentype/OTLayoutEngine.js","src/layout/LayoutEngine.js","src/glyph/Path.js","src/glyph/StandardNames.js","src/glyph/Glyph.js","src/glyph/TTFGlyph.js","src/glyph/CFFGlyph.js","src/glyph/SBIXGlyph.js","src/glyph/COLRGlyph.js","src/glyph/GlyphVariationProcessor.js","src/subset/Subset.js","src/glyph/TTFGlyphEncoder.js","src/subset/TTFSubset.js","src/subset/CFFSubset.js","src/TTFFont.js","src/tables/WOFFDirectory.js","src/WOFFFont.js","src/glyph/WOFF2Glyph.js","src/tables/WOFF2Directory.js","src/WOFF2Font.js","src/TrueTypeCollection.js","src/DFont.js","src/index.js"],"sourcesContent":["import r from 'restructure';\nconst fs = require('fs');\n\nvar fontkit = {};\nexport default fontkit;\n\nfontkit.logErrors = false;\n\nlet formats = [];\nfontkit.registerFormat = function(format) {\n formats.push(format);\n};\n\nfontkit.openSync = function(filename, postscriptName) {\n let buffer = fs.readFileSync(filename);\n return fontkit.create(buffer, postscriptName);\n};\n\nfontkit.open = function(filename, postscriptName, callback) {\n if (typeof postscriptName === 'function') {\n callback = postscriptName;\n postscriptName = null;\n }\n\n fs.readFile(filename, function(err, buffer) {\n if (err) { return callback(err); }\n\n try {\n var font = fontkit.create(buffer, postscriptName);\n } catch (e) {\n return callback(e);\n }\n\n return callback(null, font);\n });\n\n return;\n};\n\nfontkit.create = function(buffer, postscriptName) {\n for (let i = 0; i < formats.length; i++) {\n let format = formats[i];\n if (format.probe(buffer)) {\n let font = new format(new r.DecodeStream(buffer));\n if (postscriptName) {\n return font.getFont(postscriptName);\n }\n\n return font;\n }\n }\n\n throw new Error('Unknown font format');\n};\n","/**\n * This decorator caches the results of a getter or method such that\n * the results are lazily computed once, and then cached.\n * @private\n */\nexport function cache(target, key, descriptor) {\n if (descriptor.get) {\n let get = descriptor.get;\n descriptor.get = function() {\n let value = get.call(this);\n Object.defineProperty(this, key, { value });\n return value;\n };\n } else if (typeof descriptor.value === 'function') {\n let fn = descriptor.value;\n\n return {\n get() {\n let cache = new Map;\n function memoized(...args) {\n let key = args.length > 0 ? args[0] : 'value';\n if (cache.has(key)) {\n return cache.get(key);\n }\n\n let result = fn.apply(this, args);\n cache.set(key, result);\n return result;\n };\n\n Object.defineProperty(this, key, {value: memoized});\n return memoized;\n }\n };\n }\n}\n","import r from 'restructure';\n\nlet SubHeader = new r.Struct({\n firstCode: r.uint16,\n entryCount: r.uint16,\n idDelta: r.int16,\n idRangeOffset: r.uint16\n});\n\nlet CmapGroup = new r.Struct({\n startCharCode: r.uint32,\n endCharCode: r.uint32,\n glyphID: r.uint32\n});\n\nlet UnicodeValueRange = new r.Struct({\n startUnicodeValue: r.uint24,\n additionalCount: r.uint8\n});\n\nlet UVSMapping = new r.Struct({\n unicodeValue: r.uint24,\n glyphID: r.uint16\n});\n\nlet DefaultUVS = new r.Array(UnicodeValueRange, r.uint32);\nlet NonDefaultUVS = new r.Array(UVSMapping, r.uint32);\n\nlet VarSelectorRecord = new r.Struct({\n varSelector: r.uint24,\n defaultUVS: new r.Pointer(r.uint32, DefaultUVS, {type: 'parent'}),\n nonDefaultUVS: new r.Pointer(r.uint32, NonDefaultUVS, {type: 'parent'})\n});\n\nlet CmapSubtable = new r.VersionedStruct(r.uint16, {\n 0: { // Byte encoding\n length: r.uint16, // Total table length in bytes (set to 262 for format 0)\n language: r.uint16, // Language code for this encoding subtable, or zero if language-independent\n codeMap: new r.LazyArray(r.uint8, 256)\n },\n\n 2: { // High-byte mapping (CJK)\n length: r.uint16,\n language: r.uint16,\n subHeaderKeys: new r.Array(r.uint16, 256),\n subHeaderCount: t => Math.max.apply(Math, t.subHeaderKeys),\n subHeaders: new r.LazyArray(SubHeader, 'subHeaderCount'),\n glyphIndexArray: new r.LazyArray(r.uint16, 'subHeaderCount')\n },\n\n 4: { // Segment mapping to delta values\n length: r.uint16, // Total table length in bytes\n language: r.uint16, // Language code\n segCountX2: r.uint16,\n segCount: t => t.segCountX2 >> 1,\n searchRange: r.uint16,\n entrySelector: r.uint16,\n rangeShift: r.uint16,\n endCode: new r.LazyArray(r.uint16, 'segCount'),\n reservedPad: new r.Reserved(r.uint16), // This value should be zero\n startCode: new r.LazyArray(r.uint16, 'segCount'),\n idDelta: new r.LazyArray(r.int16, 'segCount'),\n idRangeOffset: new r.LazyArray(r.uint16, 'segCount'),\n glyphIndexArray: new r.LazyArray(r.uint16, t => (t.length - t._currentOffset) / 2)\n },\n\n 6: { // Trimmed table\n length: r.uint16,\n language: r.uint16,\n firstCode: r.uint16,\n entryCount: r.uint16,\n glyphIndices: new r.LazyArray(r.uint16, 'entryCount')\n },\n\n 8: { // mixed 16-bit and 32-bit coverage\n reserved: new r.Reserved(r.uint16),\n length: r.uint32,\n language: r.uint16,\n is32: new r.LazyArray(r.uint8, 8192),\n nGroups: r.uint32,\n groups: new r.LazyArray(CmapGroup, 'nGroups')\n },\n\n 10: { // Trimmed Array\n reserved: new r.Reserved(r.uint16),\n length: r.uint32,\n language: r.uint32,\n firstCode: r.uint32,\n entryCount: r.uint32,\n glyphIndices: new r.LazyArray(r.uint16, 'numChars')\n },\n\n 12: { // Segmented coverage\n reserved: new r.Reserved(r.uint16),\n length: r.uint32,\n language: r.uint32,\n nGroups: r.uint32,\n groups: new r.LazyArray(CmapGroup, 'nGroups')\n },\n\n 13: { // Many-to-one range mappings (same as 12 except for group.startGlyphID)\n reserved: new r.Reserved(r.uint16),\n length: r.uint32,\n language: r.uint32,\n nGroups: r.uint32,\n groups: new r.LazyArray(CmapGroup, 'nGroups')\n },\n\n 14: { // Unicode Variation Sequences\n length: r.uint32,\n numRecords: r.uint32,\n varSelectors: new r.LazyArray(VarSelectorRecord, 'numRecords')\n }\n});\n\nlet CmapEntry = new r.Struct({\n platformID: r.uint16, // Platform identifier\n encodingID: r.uint16, // Platform-specific encoding identifier\n table: new r.Pointer(r.uint32, CmapSubtable, {type: 'parent', lazy: true})\n});\n\n// character to glyph mapping\nexport default new r.Struct({\n version: r.uint16,\n numSubtables: r.uint16,\n tables: new r.Array(CmapEntry, 'numSubtables')\n});\n","import r from 'restructure';\n\n// font header\nexport default new r.Struct({\n version: r.int32, // 0x00010000 (version 1.0)\n revision: r.int32, // set by font manufacturer\n checkSumAdjustment: r.uint32,\n magicNumber: r.uint32, // set to 0x5F0F3CF5\n flags: r.uint16,\n unitsPerEm: r.uint16, // range from 64 to 16384\n created: new r.Array(r.int32, 2),\n modified: new r.Array(r.int32, 2),\n xMin: r.int16, // for all glyph bounding boxes\n yMin: r.int16, // for all glyph bounding boxes\n xMax: r.int16, // for all glyph bounding boxes\n yMax: r.int16, // for all glyph bounding boxes\n macStyle: new r.Bitfield(r.uint16, [\n 'bold', 'italic', 'underline', 'outline',\n 'shadow', 'condensed', 'extended'\n ]),\n lowestRecPPEM: r.uint16, // smallest readable size in pixels\n fontDirectionHint: r.int16,\n indexToLocFormat: r.int16, // 0 for short offsets, 1 for long\n glyphDataFormat: r.int16 // 0 for current format\n});\n","import r from 'restructure';\n\n// horizontal header\nexport default new r.Struct({\n version: r.int32,\n ascent: r.int16, // Distance from baseline of highest ascender\n descent: r.int16, // Distance from baseline of lowest descender\n lineGap: r.int16, // Typographic line gap\n advanceWidthMax: r.uint16, // Maximum advance width value in 'hmtx' table\n minLeftSideBearing: r.int16, // Maximum advance width value in 'hmtx' table\n minRightSideBearing: r.int16, // Minimum right sidebearing value\n xMaxExtent: r.int16,\n caretSlopeRise: r.int16, // Used to calculate the slope of the cursor (rise/run); 1 for vertical\n caretSlopeRun: r.int16, // 0 for vertical\n caretOffset: r.int16, // Set to 0 for non-slanted fonts\n reserved: new r.Reserved(r.int16, 4),\n metricDataFormat: r.int16, // 0 for current format\n numberOfMetrics: r.uint16 // Number of advance widths in 'hmtx' table\n});\n","import r from 'restructure';\n\nlet HmtxEntry = new r.Struct({\n advance: r.uint16,\n bearing: r.int16\n});\n\nexport default new r.Struct({\n metrics: new r.LazyArray(HmtxEntry, t => t.parent.hhea.numberOfMetrics),\n bearings: new r.LazyArray(r.int16, t => t.parent.maxp.numGlyphs - t.parent.hhea.numberOfMetrics)\n});\n","import r from 'restructure';\n\n// maxiumum profile\nexport default new r.Struct({\n version: r.int32,\n numGlyphs: r.uint16, // The number of glyphs in the font\n maxPoints: r.uint16, // Maximum points in a non-composite glyph\n maxContours: r.uint16, // Maximum contours in a non-composite glyph\n maxComponentPoints: r.uint16, // Maximum points in a composite glyph\n maxComponentContours: r.uint16, // Maximum contours in a composite glyph\n maxZones: r.uint16, // 1 if instructions do not use the twilight zone, 2 otherwise\n maxTwilightPoints: r.uint16, // Maximum points used in Z0\n maxStorage: r.uint16, // Number of Storage Area locations\n maxFunctionDefs: r.uint16, // Number of FDEFs\n maxInstructionDefs: r.uint16, // Number of IDEFs\n maxStackElements: r.uint16, // Maximum stack depth\n maxSizeOfInstructions: r.uint16, // Maximum byte count for glyph instructions\n maxComponentElements: r.uint16, // Maximum number of components referenced at “top level” for any composite glyph\n maxComponentDepth: r.uint16 // Maximum levels of recursion; 1 for simple components\n});\n","/**\n * Gets an encoding name from platform, encoding, and language ids.\n * Returned encoding names can be used in iconv-lite to decode text.\n */\nexport function getEncoding(platformID, encodingID, languageID = 0) {\n if (platformID === 1 && MAC_LANGUAGE_ENCODINGS[languageID]) {\n return MAC_LANGUAGE_ENCODINGS[languageID];\n }\n \n return ENCODINGS[platformID][encodingID];\n}\n\n// Map of platform ids to encoding ids.\nexport const ENCODINGS = [\n // unicode\n ['utf16be', 'utf16be', 'utf16be', 'utf16be', 'utf16be', 'utf16be'],\n \n // macintosh\n // Mappings available at http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/\n // 0\tRoman 17\tMalayalam\n // 1\tJapanese\t 18\tSinhalese\n // 2\tTraditional Chinese\t 19\tBurmese\n // 3\tKorean\t 20\tKhmer\n // 4\tArabic\t 21\tThai\n // 5\tHebrew\t 22\tLaotian\n // 6\tGreek\t 23\tGeorgian\n // 7\tRussian\t 24\tArmenian\n // 8\tRSymbol\t 25\tSimplified Chinese\n // 9\tDevanagari\t 26\tTibetan\n // 10\tGurmukhi\t 27\tMongolian\n // 11\tGujarati\t 28\tGeez\n // 12\tOriya\t 29\tSlavic\n // 13\tBengali\t 30\tVietnamese\n // 14\tTamil\t 31\tSindhi\n // 15\tTelugu\t 32\t(Uninterpreted)\n // 16\tKannada\n ['macroman', 'shift-jis', 'big5', 'euc-kr', 'iso-8859-6', 'iso-8859-8',\n 'macgreek', 'maccyrillic', 'symbol', 'Devanagari', 'Gurmukhi', 'Gujarati',\n 'Oriya', 'Bengali', 'Tamil', 'Telugu', 'Kannada', 'Malayalam', 'Sinhalese',\n 'Burmese', 'Khmer', 'macthai', 'Laotian', 'Georgian', 'Armenian', 'gb-2312-80', \n 'Tibetan', 'Mongolian', 'Geez', 'maccenteuro', 'Vietnamese', 'Sindhi'],\n \n // ISO (deprecated)\n ['ascii'],\n \n // windows\n // Docs here: http://msdn.microsoft.com/en-us/library/system.text.encoding(v=vs.110).aspx\n ['symbol', 'utf16be', 'shift-jis', 'gb18030', 'big5', 'wansung', 'johab', null, null, null, 'utf16be']\n];\n\n// Overrides for Mac scripts by language id.\n// See http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt\nexport const MAC_LANGUAGE_ENCODINGS = {\n 15: 'maciceland',\n 17: 'macturkish',\n 18: 'maccroatian',\n 24: 'maccenteuro',\n 25: 'maccenteuro',\n 26: 'maccenteuro',\n 27: 'maccenteuro',\n 28: 'maccenteuro',\n 30: 'maciceland',\n 37: 'macromania',\n 38: 'maccenteuro',\n 39: 'maccenteuro',\n 40: 'maccenteuro',\n 143: 'macinuit', // Unsupported by iconv-lite\n 146: 'macgaelic' // Unsupported by iconv-lite\n};\n\n// Map of platform ids to BCP-47 language codes.\nexport const LANGUAGES = [\n // unicode\n [],\n \n { // macintosh\n 0: 'en', 30: 'fo', 60: 'ks', 90: 'rw',\n 1: 'fr', 31: 'fa', 61: 'ku', 91: 'rn',\n 2: 'de', 32: 'ru', 62: 'sd', 92: 'ny',\n 3: 'it', 33: 'zh', 63: 'bo', 93: 'mg',\n 4: 'nl', 34: 'nl-BE', 64: 'ne', 94: 'eo',\n 5: 'sv', 35: 'ga', 65: 'sa', 128: 'cy',\n 6: 'es', 36: 'sq', 66: 'mr', 129: 'eu',\n 7: 'da', 37: 'ro', 67: 'bn', 130: 'ca',\n 8: 'pt', 38: 'cz', 68: 'as', 131: 'la',\n 9: 'no', 39: 'sk', 69: 'gu', 132: 'qu',\n 10: 'he', 40: 'si', 70: 'pa', 133: 'gn',\n 11: 'ja', 41: 'yi', 71: 'or', 134: 'ay',\n 12: 'ar', 42: 'sr', 72: 'ml', 135: 'tt',\n 13: 'fi', 43: 'mk', 73: 'kn', 136: 'ug',\n 14: 'el', 44: 'bg', 74: 'ta', 137: 'dz',\n 15: 'is', 45: 'uk', 75: 'te', 138: 'jv',\n 16: 'mt', 46: 'be', 76: 'si', 139: 'su',\n 17: 'tr', 47: 'uz', 77: 'my', 140: 'gl',\n 18: 'hr', 48: 'kk', 78: 'km', 141: 'af',\n 19: 'zh-Hant', 49: 'az-Cyrl', 79: 'lo', 142: 'br',\n 20: 'ur', 50: 'az-Arab', 80: 'vi', 143: 'iu',\n 21: 'hi', 51: 'hy', 81: 'id', 144: 'gd',\n 22: 'th', 52: 'ka', 82: 'tl', 145: 'gv',\n 23: 'ko', 53: 'mo', 83: 'ms', 146: 'ga',\n 24: 'lt', 54: 'ky', 84: 'ms-Arab', 147: 'to',\n 25: 'pl', 55: 'tg', 85: 'am', 148: 'el-polyton',\n 26: 'hu', 56: 'tk', 86: 'ti', 149: 'kl',\n 27: 'es', 57: 'mn-CN', 87: 'om', 150: 'az',\n 28: 'lv', 58: 'mn', 88: 'so', 151: 'nn',\n 29: 'se', 59: 'ps', 89: 'sw',\n },\n \n // ISO (deprecated)\n [],\n \n { // windows \n 0x0436: 'af', 0x4009: 'en-IN', 0x0487: 'rw', 0x0432: 'tn', \n 0x041C: 'sq', 0x1809: 'en-IE', 0x0441: 'sw', 0x045B: 'si', \n 0x0484: 'gsw', 0x2009: 'en-JM', 0x0457: 'kok', 0x041B: 'sk', \n 0x045E: 'am', 0x4409: 'en-MY', 0x0412: 'ko', 0x0424: 'sl', \n 0x1401: 'ar-DZ', 0x1409: 'en-NZ', 0x0440: 'ky', 0x2C0A: 'es-AR', \n 0x3C01: 'ar-BH', 0x3409: 'en-PH', 0x0454: 'lo', 0x400A: 'es-BO', \n 0x0C01: 'ar', 0x4809: 'en-SG', 0x0426: 'lv', 0x340A: 'es-CL', \n 0x0801: 'ar-IQ', 0x1C09: 'en-ZA', 0x0427: 'lt', 0x240A: 'es-CO', \n 0x2C01: 'ar-JO', 0x2C09: 'en-TT', 0x082E: 'dsb', 0x140A: 'es-CR', \n 0x3401: 'ar-KW', 0x0809: 'en-GB', 0x046E: 'lb', 0x1C0A: 'es-DO', \n 0x3001: 'ar-LB', 0x0409: 'en', 0x042F: 'mk', 0x300A: 'es-EC', \n 0x1001: 'ar-LY', 0x3009: 'en-ZW', 0x083E: 'ms-BN', 0x440A: 'es-SV', \n 0x1801: 'ary', 0x0425: 'et', 0x043E: 'ms', 0x100A: 'es-GT', \n 0x2001: 'ar-OM', 0x0438: 'fo', 0x044C: 'ml', 0x480A: 'es-HN', \n 0x4001: 'ar-QA', 0x0464: 'fil', 0x043A: 'mt', 0x080A: 'es-MX', \n 0x0401: 'ar-SA', 0x040B: 'fi', 0x0481: 'mi', 0x4C0A: 'es-NI', \n 0x2801: 'ar-SY', 0x080C: 'fr-BE', 0x047A: 'arn', 0x180A: 'es-PA', \n 0x1C01: 'aeb', 0x0C0C: 'fr-CA', 0x044E: 'mr', 0x3C0A: 'es-PY', \n 0x3801: 'ar-AE', 0x040C: 'fr', 0x047C: 'moh', 0x280A: 'es-PE', \n 0x2401: 'ar-YE', 0x140C: 'fr-LU', 0x0450: 'mn', 0x500A: 'es-PR', \n 0x042B: 'hy', 0x180C: 'fr-MC', 0x0850: 'mn-CN', 0x0C0A: 'es', \n 0x044D: 'as', 0x100C: 'fr-CH', 0x0461: 'ne', 0x040A: 'es', \n 0x082C: 'az-Cyrl', 0x0462: 'fy', 0x0414: 'nb', 0x540A: 'es-US', \n 0x042C: 'az', 0x0456: 'gl', 0x0814: 'nn', 0x380A: 'es-UY', \n 0x046D: 'ba', 0x0437: 'ka', 0x0482: 'oc', 0x200A: 'es-VE', \n 0x042D: 'eu', 0x0C07: 'de-AT', 0x0448: 'or', 0x081D: 'sv-FI', \n 0x0423: 'be', 0x0407: 'de', 0x0463: 'ps', 0x041D: 'sv', \n 0x0845: 'bn', 0x1407: 'de-LI', 0x0415: 'pl', 0x045A: 'syr', \n 0x0445: 'bn-IN', 0x1007: 'de-LU', 0x0416: 'pt', 0x0428: 'tg', \n 0x201A: 'bs-Cyrl', 0x0807: 'de-CH', 0x0816: 'pt-PT', 0x085F: 'tzm', \n 0x141A: 'bs', 0x0408: 'el', 0x0446: 'pa', 0x0449: 'ta', \n 0x047E: 'br', 0x046F: 'kl', 0x046B: 'qu-BO', 0x0444: 'tt', \n 0x0402: 'bg', 0x0447: 'gu', 0x086B: 'qu-EC', 0x044A: 'te', \n 0x0403: 'ca', 0x0468: 'ha', 0x0C6B: 'qu', 0x041E: 'th', \n 0x0C04: 'zh-HK', 0x040D: 'he', 0x0418: 'ro', 0x0451: 'bo', \n 0x1404: 'zh-MO', 0x0439: 'hi', 0x0417: 'rm', 0x041F: 'tr', \n 0x0804: 'zh', 0x040E: 'hu', 0x0419: 'ru', 0x0442: 'tk', \n 0x1004: 'zh-SG', 0x040F: 'is', 0x243B: 'smn', 0x0480: 'ug', \n 0x0404: 'zh-TW', 0x0470: 'ig', 0x103B: 'smj-NO', 0x0422: 'uk', \n 0x0483: 'co', 0x0421: 'id', 0x143B: 'smj', 0x042E: 'hsb', \n 0x041A: 'hr', 0x045D: 'iu', 0x0C3B: 'se-FI', 0x0420: 'ur', \n 0x101A: 'hr-BA', 0x085D: 'iu-Latn', 0x043B: 'se', 0x0843: 'uz-Cyrl', \n 0x0405: 'cs', 0x083C: 'ga', 0x083B: 'se-SE', 0x0443: 'uz', \n 0x0406: 'da', 0x0434: 'xh', 0x203B: 'sms', 0x042A: 'vi', \n 0x048C: 'prs', 0x0435: 'zu', 0x183B: 'sma-NO', 0x0452: 'cy', \n 0x0465: 'dv', 0x0410: 'it', 0x1C3B: 'sms', 0x0488: 'wo', \n 0x0813: 'nl-BE', 0x0810: 'it-CH', 0x044F: 'sa', 0x0485: 'sah', \n 0x0413: 'nl', 0x0411: 'ja', 0x1C1A: 'sr-Cyrl-BA', 0x0478: 'ii', \n 0x0C09: 'en-AU', 0x044B: 'kn', 0x0C1A: 'sr', 0x046A: 'yo', \n 0x2809: 'en-BZ', 0x043F: 'kk', 0x181A: 'sr-Latn-BA', \n 0x1009: 'en-CA', 0x0453: 'km', 0x081A: 'sr-Latn', \n 0x2409: 'en-029', 0x0486: 'quc', 0x046C: 'nso', \n }\n];\n","import r from 'restructure';\nimport {getEncoding, LANGUAGES} from '../encodings';\n\nlet NameRecord = new r.Struct({\n platformID: r.uint16,\n encodingID: r.uint16,\n languageID: r.uint16,\n nameID: r.uint16,\n length: r.uint16,\n string: new r.Pointer(r.uint16,\n new r.String('length', t => getEncoding(t.platformID, t.encodingID, t.languageID)),\n { type: 'parent', relativeTo: 'parent.stringOffset', allowNull: false }\n )\n});\n\nlet LangTagRecord = new r.Struct({\n length: r.uint16,\n tag: new r.Pointer(r.uint16, new r.String('length', 'utf16be'), {type: 'parent', relativeTo: 'stringOffset'})\n});\n\nvar NameTable = new r.VersionedStruct(r.uint16, {\n 0: {\n count: r.uint16,\n stringOffset: r.uint16,\n records: new r.Array(NameRecord, 'count')\n },\n 1: {\n count: r.uint16,\n stringOffset: r.uint16,\n records: new r.Array(NameRecord, 'count'),\n langTagCount: r.uint16,\n langTags: new r.Array(LangTagRecord, 'langTagCount')\n }\n});\n\nexport default NameTable;\n\nconst NAMES = [\n 'copyright',\n 'fontFamily',\n 'fontSubfamily',\n 'uniqueSubfamily',\n 'fullName',\n 'version',\n 'postscriptName', // Note: A font may have only one PostScript name and that name must be ASCII.\n 'trademark',\n 'manufacturer',\n 'designer',\n 'description',\n 'vendorURL',\n 'designerURL',\n 'license',\n 'licenseURL',\n null, // reserved\n 'preferredFamily',\n 'preferredSubfamily',\n 'compatibleFull',\n 'sampleText',\n 'postscriptCIDFontName',\n 'wwsFamilyName',\n 'wwsSubfamilyName'\n];\n\nNameTable.process = function(stream) {\n var records = {};\n for (let record of this.records) {\n // find out what language this is for\n let language = LANGUAGES[record.platformID][record.languageID];\n\n if (language == null && this.langTags != null && record.languageID >= 0x8000) {\n language = this.langTags[record.languageID - 0x8000].tag;\n }\n\n if (language == null) {\n language = record.platformID + '-' + record.languageID;\n }\n\n // if the nameID is >= 256, it is a font feature record (AAT)\n let key = record.nameID >= 256 ? 'fontFeatures' : (NAMES[record.nameID] || record.nameID);\n if (records[key] == null) {\n records[key] = {};\n }\n\n let obj = records[key];\n if (record.nameID >= 256) {\n obj = obj[record.nameID] || (obj[record.nameID] = {});\n }\n\n if (typeof record.string === 'string' || typeof obj[language] !== 'string') {\n obj[language] = record.string;\n }\n }\n\n this.records = records;\n};\n\nNameTable.preEncode = function() {\n if (Array.isArray(this.records)) return;\n this.version = 0;\n\n let records = [];\n for (let key in this.records) {\n let val = this.records[key];\n if (key === 'fontFeatures') continue;\n\n records.push({\n platformID: 3,\n encodingID: 1,\n languageID: 0x409,\n nameID: NAMES.indexOf(key),\n length: Buffer.byteLength(val.en, 'utf16le'),\n string: val.en\n });\n\n if (key === 'postscriptName') {\n records.push({\n platformID: 1,\n encodingID: 0,\n languageID: 0,\n nameID: NAMES.indexOf(key),\n length: val.en.length,\n string: val.en\n });\n }\n }\n\n this.records = records;\n this.count = records.length;\n this.stringOffset = NameTable.size(this, null, false);\n};\n","import r from 'restructure';\n\nvar OS2 = new r.VersionedStruct(r.uint16, {\n header: {\n xAvgCharWidth: r.int16, // average weighted advance width of lower case letters and space\n usWeightClass: r.uint16, // visual weight of stroke in glyphs\n usWidthClass: r.uint16, // relative change from the normal aspect ratio (width to height ratio)\n fsType: new r.Bitfield(r.uint16, [ // Indicates font embedding licensing rights\n null, 'noEmbedding', 'viewOnly', 'editable', null,\n null, null, null, 'noSubsetting', 'bitmapOnly'\n ]),\n ySubscriptXSize: r.int16, // recommended horizontal size in pixels for subscripts\n ySubscriptYSize: r.int16, // recommended vertical size in pixels for subscripts\n ySubscriptXOffset: r.int16, // recommended horizontal offset for subscripts\n ySubscriptYOffset: r.int16, // recommended vertical offset form the baseline for subscripts\n ySuperscriptXSize: r.int16, // recommended horizontal size in pixels for superscripts\n ySuperscriptYSize: r.int16, // recommended vertical size in pixels for superscripts\n ySuperscriptXOffset: r.int16, // recommended horizontal offset for superscripts\n ySuperscriptYOffset: r.int16, // recommended vertical offset from the baseline for superscripts\n yStrikeoutSize: r.int16, // width of the strikeout stroke\n yStrikeoutPosition: r.int16, // position of the strikeout stroke relative to the baseline\n sFamilyClass: r.int16, // classification of font-family design\n panose: new r.Array(r.uint8, 10), // describe the visual characteristics of a given typeface\n ulCharRange: new r.Array(r.uint32, 4),\n vendorID: new r.String(4), // four character identifier for the font vendor\n fsSelection: new r.Bitfield(r.uint16, [ // bit field containing information about the font\n 'italic', 'underscore', 'negative', 'outlined', 'strikeout',\n 'bold', 'regular', 'useTypoMetrics', 'wws', 'oblique'\n ]),\n usFirstCharIndex: r.uint16, // The minimum Unicode index in this font\n usLastCharIndex: r.uint16 // The maximum Unicode index in this font\n },\n\n // The Apple version of this table ends here, but the Microsoft one continues on...\n 0: {},\n\n 1: {\n typoAscender: r.int16,\n typoDescender: r.int16,\n typoLineGap: r.int16,\n winAscent: r.uint16,\n winDescent: r.uint16,\n codePageRange: new r.Array(r.uint32, 2)\n },\n\n 2: {\n // these should be common with version 1 somehow\n typoAscender: r.int16,\n typoDescender: r.int16,\n typoLineGap: r.int16,\n winAscent: r.uint16,\n winDescent: r.uint16,\n codePageRange: new r.Array(r.uint32, 2),\n\n xHeight: r.int16,\n capHeight: r.int16,\n defaultChar: r.uint16,\n breakChar: r.uint16,\n maxContent: r.uint16\n },\n\n 5: {\n typoAscender: r.int16,\n typoDescender: r.int16,\n typoLineGap: r.int16,\n winAscent: r.uint16,\n winDescent: r.uint16,\n codePageRange: new r.Array(r.uint32, 2),\n\n xHeight: r.int16,\n capHeight: r.int16,\n defaultChar: r.uint16,\n breakChar: r.uint16,\n maxContent: r.uint16,\n\n usLowerOpticalPointSize: r.uint16,\n usUpperOpticalPointSize: r.uint16\n }\n});\n\nlet versions = OS2.versions;\nversions[3] = versions[4] = versions[2];\n\nexport default OS2;\n","import r from 'restructure';\n\n// PostScript information\nexport default new r.VersionedStruct(r.fixed32, {\n header: { // these fields exist at the top of all versions\n italicAngle: r.fixed32, // Italic angle in counter-clockwise degrees from the vertical.\n underlinePosition: r.int16, // Suggested distance of the top of the underline from the baseline\n underlineThickness: r.int16, // Suggested values for the underline thickness\n isFixedPitch: r.uint32, // Whether the font is monospaced\n minMemType42: r.uint32, // Minimum memory usage when a TrueType font is downloaded as a Type 42 font\n maxMemType42: r.uint32, // Maximum memory usage when a TrueType font is downloaded as a Type 42 font\n minMemType1: r.uint32, // Minimum memory usage when a TrueType font is downloaded as a Type 1 font\n maxMemType1: r.uint32 // Maximum memory usage when a TrueType font is downloaded as a Type 1 font\n },\n\n 1: {}, // version 1 has no additional fields\n\n 2: {\n numberOfGlyphs: r.uint16,\n glyphNameIndex: new r.Array(r.uint16, 'numberOfGlyphs'),\n names: new r.Array(new r.String(r.uint8))\n },\n\n 2.5: {\n numberOfGlyphs: r.uint16,\n offsets: new r.Array(r.uint8, 'numberOfGlyphs')\n },\n\n 3: {}, // version 3 has no additional fields\n\n 4: {\n map: new r.Array(r.uint32, t => t.parent.maxp.numGlyphs)\n }\n});\n","import r from 'restructure';\n\n// An array of predefined values accessible by instructions\nexport default new r.Struct({\n controlValues: new r.Array(r.int16)\n});\n","import r from 'restructure';\n\n// A list of instructions that are executed once when a font is first used.\n// These instructions are known as the font program. The main use of this table\n// is for the definition of functions that are used in many different glyph programs.\nexport default new r.Struct({\n instructions: new r.Array(r.uint8)\n});\n","import r from 'restructure';\n\nlet loca = new r.VersionedStruct('head.indexToLocFormat', {\n 0: {\n offsets: new r.Array(r.uint16)\n },\n 1: {\n offsets: new r.Array(r.uint32)\n }\n});\n\nloca.process = function() {\n if (this.version === 0) {\n for (let i = 0; i < this.offsets.length; i++) {\n this.offsets[i] <<= 1;\n }\n }\n};\n\nloca.preEncode = function() {\n if (this.version != null) return;\n\n // assume this.offsets is a sorted array\n this.version = this.offsets[this.offsets.length - 1] > 0xffff ? 1 : 0;\n\n if (this.version === 0) {\n for (let i = 0; i < this.offsets.length; i++) {\n this.offsets[i] >>>= 1;\n }\n }\n};\n\nexport default loca;\n","import r from 'restructure';\n\n// Set of instructions executed whenever the point size or font transformation change\nexport default new r.Struct({\n controlValueProgram: new r.Array(r.uint8)\n});\n","import r from 'restructure';\n\n// only used for encoding\nexport default new r.Array(new r.Buffer);\n","import r from 'restructure';\n\nexport default class CFFIndex {\n constructor(type) {\n this.type = type;\n }\n\n getCFFVersion(ctx) {\n while (ctx && !ctx.hdrSize) {\n ctx = ctx.parent;\n }\n\n return ctx ? ctx.version : -1;\n }\n\n decode(stream, parent) {\n let version = this.getCFFVersion(parent);\n let count = version >= 2\n ? stream.readUInt32BE()\n : stream.readUInt16BE();\n\n if (count === 0) {\n return [];\n }\n\n let offSize = stream.readUInt8();\n let offsetType;\n if (offSize === 1) {\n offsetType = r.uint8;\n } else if (offSize === 2) {\n offsetType = r.uint16;\n } else if (offSize === 3) {\n offsetType = r.uint24;\n } else if (offSize === 4) {\n offsetType = r.uint32;\n } else {\n throw new Error(`Bad offset size in CFFIndex: ${offSize} ${stream.pos}`);\n }\n\n let ret = [];\n let startPos = stream.pos + ((count + 1) * offSize) - 1;\n\n let start = offsetType.decode(stream);\n for (let i = 0; i < count; i++) {\n let end = offsetType.decode(stream);\n\n if (this.type != null) {\n let pos = stream.pos;\n stream.pos = startPos + start;\n\n parent.length = end - start;\n ret.push(this.type.decode(stream, parent));\n stream.pos = pos;\n } else {\n ret.push({\n offset: startPos + start,\n length: end - start\n });\n }\n\n start = end;\n }\n\n stream.pos = startPos + start;\n return ret;\n }\n\n size(arr, parent) {\n let size = 2;\n if (arr.length === 0) {\n return size;\n }\n\n let type = this.type || new r.Buffer;\n\n // find maximum offset to detminine offset type\n let offset = 1;\n for (let i = 0; i < arr.length; i++) {\n let item = arr[i];\n offset += type.size(item, parent);\n }\n\n let offsetType;\n if (offset <= 0xff) {\n offsetType = r.uint8;\n } else if (offset <= 0xffff) {\n offsetType = r.uint16;\n } else if (offset <= 0xffffff) {\n offsetType = r.uint24;\n } else if (offset <= 0xffffffff) {\n offsetType = r.uint32;\n } else {\n throw new Error(\"Bad offset in CFFIndex\");\n }\n\n size += 1 + offsetType.size() * (arr.length + 1);\n size += offset - 1;\n\n return size;\n }\n\n encode(stream, arr, parent) {\n stream.writeUInt16BE(arr.length);\n if (arr.length === 0) {\n return;\n }\n\n let type = this.type || new r.Buffer;\n\n // find maximum offset to detminine offset type\n let sizes = [];\n let offset = 1;\n for (let item of arr) {\n let s = type.size(item, parent);\n sizes.push(s);\n offset += s;\n }\n\n let offsetType;\n if (offset <= 0xff) {\n offsetType = r.uint8;\n } else if (offset <= 0xffff) {\n offsetType = r.uint16;\n } else if (offset <= 0xffffff) {\n offsetType = r.uint24;\n } else if (offset <= 0xffffffff) {\n offsetType = r.uint32;\n } else {\n throw new Error(\"Bad offset in CFFIndex\");\n }\n\n // write offset size\n stream.writeUInt8(offsetType.size());\n\n // write elements\n offset = 1;\n offsetType.encode(stream, offset);\n\n for (let size of sizes) {\n offset += size;\n offsetType.encode(stream, offset);\n }\n\n for (let item of arr) {\n type.encode(stream, item, parent);\n }\n\n return;\n }\n}\n","const FLOAT_EOF = 0xf;\nconst FLOAT_LOOKUP = [\n '0', '1', '2', '3', '4', '5', '6', '7',\n '8', '9', '.', 'E', 'E-', null, '-'\n];\n\nconst FLOAT_ENCODE_LOOKUP = {\n '.': 10,\n 'E': 11,\n 'E-': 12,\n '-': 14\n};\n\nexport default class CFFOperand {\n static decode(stream, value) {\n if (32 <= value && value <= 246) {\n return value - 139;\n }\n\n if (247 <= value && value <= 250) {\n return (value - 247) * 256 + stream.readUInt8() + 108;\n }\n\n if (251 <= value && value <= 254) {\n return -(value - 251) * 256 - stream.readUInt8() - 108;\n }\n\n if (value === 28) {\n return stream.readInt16BE();\n }\n\n if (value === 29) {\n return stream.readInt32BE();\n }\n\n if (value === 30) {\n let str = '';\n while (true) {\n let b = stream.readUInt8();\n\n let n1 = b >> 4;\n if (n1 === FLOAT_EOF) { break; }\n str += FLOAT_LOOKUP[n1];\n\n let n2 = b & 15;\n if (n2 === FLOAT_EOF) { break; }\n str += FLOAT_LOOKUP[n2];\n }\n\n return parseFloat(str);\n }\n\n return null;\n }\n\n static size(value) {\n // if the value needs to be forced to the largest size (32 bit)\n // e.g. for unknown pointers, set to 32768\n if (value.forceLarge) {\n value = 32768;\n }\n\n if ((value | 0) !== value) { // floating point\n let str = '' + value;\n return 1 + Math.ceil((str.length + 1) / 2);\n\n } else if (-107 <= value && value <= 107) {\n return 1;\n\n } else if (108 <= value && value <= 1131 || -1131 <= value && value <= -108) {\n return 2;\n\n } else if (-32768 <= value && value <= 32767) {\n return 3;\n\n } else {\n return 5;\n }\n }\n\n static encode(stream, value) {\n // if the value needs to be forced to the largest size (32 bit)\n // e.g. for unknown pointers, save the old value and set to 32768\n let val = Number(value);\n\n if (value.forceLarge) {\n stream.writeUInt8(29);\n return stream.writeInt32BE(val);\n\n } else if ((val | 0) !== val) { // floating point\n stream.writeUInt8(30);\n\n let str = '' + val;\n for (let i = 0; i < str.length; i += 2) {\n let c1 = str[i];\n let n1 = FLOAT_ENCODE_LOOKUP[c1] || +c1;\n\n if (i === str.length - 1) {\n var n2 = FLOAT_EOF;\n } else {\n let c2 = str[i + 1];\n var n2 = FLOAT_ENCODE_LOOKUP[c2] || +c2;\n }\n\n stream.writeUInt8((n1 << 4) | (n2 & 15));\n }\n\n if (n2 !== FLOAT_EOF) {\n return stream.writeUInt8((FLOAT_EOF << 4));\n }\n\n } else if (-107 <= val && val <= 107) {\n return stream.writeUInt8(val + 139);\n\n } else if (108 <= val && val <= 1131) {\n val -= 108;\n stream.writeUInt8((val >> 8) + 247);\n return stream.writeUInt8(val & 0xff);\n\n } else if (-1131 <= val && val <= -108) {\n val = -val - 108;\n stream.writeUInt8((val >> 8) + 251);\n return stream.writeUInt8(val & 0xff);\n\n } else if (-32768 <= val && val <= 32767) {\n stream.writeUInt8(28);\n return stream.writeInt16BE(val);\n\n } else {\n stream.writeUInt8(29);\n return stream.writeInt32BE(val);\n }\n }\n}\n","import isEqual from 'deep-equal';\nimport r from 'restructure';\nimport CFFOperand from './CFFOperand';\nimport { PropertyDescriptor } from 'restructure/src/utils';\n\nexport default class CFFDict {\n constructor(ops = []) {\n this.ops = ops;\n this.fields = {};\n for (let field of ops) {\n let key = Array.isArray(field[0]) ? field[0][0] << 8 | field[0][1] : field[0];\n this.fields[key] = field;\n }\n }\n\n decodeOperands(type, stream, ret, operands) {\n if (Array.isArray(type)) {\n return operands.map((op, i) => this.decodeOperands(type[i], stream, ret, [op]));\n } else if (type.decode != null) {\n return type.decode(stream, ret, operands);\n } else {\n switch (type) {\n case 'number':\n case 'offset':\n case 'sid':\n return operands[0];\n case 'boolean':\n return !!operands[0];\n default:\n return operands;\n }\n }\n }\n\n encodeOperands(type, stream, ctx, operands) {\n if (Array.isArray(type)) {\n return operands.map((op, i) => this.encodeOperands(type[i], stream, ctx, op)[0]);\n } else if (type.encode != null) {\n return type.encode(stream, operands, ctx);\n } else if (typeof operands === 'number') {\n return [operands];\n } else if (typeof operands === 'boolean') {\n return [+operands];\n } else if (Array.isArray(operands)) {\n return operands;\n } else {\n return [operands];\n }\n }\n\n decode(stream, parent) {\n let end = stream.pos + parent.length;\n let ret = {};\n let operands = [];\n\n // define hidden properties\n Object.defineProperties(ret, {\n parent: { value: parent },\n _startOffset: { value: stream.pos }\n });\n\n // fill in defaults\n for (let key in this.fields) {\n let field = this.fields[key];\n ret[field[1]] = field[3];\n }\n\n while (stream.pos < end) {\n let b = stream.readUInt8();\n if (b < 28) {\n if (b === 12) {\n b = (b << 8) | stream.readUInt8();\n }\n\n let field = this.fields[b];\n if (!field) {\n throw new Error(`Unknown operator ${b}`);\n }\n\n let val = this.decodeOperands(field[2], stream, ret, operands);\n if (val != null) {\n if (val instanceof PropertyDescriptor) {\n Object.defineProperty(ret, field[1], val);\n } else {\n ret[field[1]] = val;\n }\n }\n\n operands = [];\n } else {\n operands.push(CFFOperand.decode(stream, b));\n }\n }\n\n return ret;\n }\n\n size(dict, parent, includePointers = true) {\n let ctx = {\n parent,\n val: dict,\n pointerSize: 0,\n startOffset: parent.startOffset || 0\n };\n\n let len = 0;\n\n for (let k in this.fields) {\n let field = this.fields[k];\n let val = dict[field[1]];\n if (val == null || isEqual(val, field[3])) {\n continue;\n }\n\n let operands = this.encodeOperands(field[2], null, ctx, val);\n for (let op of operands) {\n len += CFFOperand.size(op);\n }\n\n let key = Array.isArray(field[0]) ? field[0] : [field[0]];\n len += key.length;\n }\n\n if (includePointers) {\n len += ctx.pointerSize;\n }\n\n return len;\n }\n\n encode(stream, dict, parent) {\n let ctx = {\n pointers: [],\n startOffset: stream.pos,\n parent,\n val: dict,\n pointerSize: 0\n };\n\n ctx.pointerOffset = stream.pos + this.size(dict, ctx, false);\n\n for (let field of this.ops) {\n let val = dict[field[1]];\n if (val == null || isEqual(val, field[3])) {\n continue;\n }\n\n let operands = this.encodeOperands(field[2], stream, ctx, val);\n for (let op of operands) {\n CFFOperand.encode(stream, op);\n }\n\n let key = Array.isArray(field[0]) ? field[0] : [field[0]];\n for (let op of key) {\n stream.writeUInt8(op);\n }\n }\n\n let i = 0;\n while (i < ctx.pointers.length) {\n let ptr = ctx.pointers[i++];\n ptr.type.encode(stream, ptr.val, ptr.parent);\n }\n\n return;\n }\n}\n","import r from 'restructure';\n\nexport default class CFFPointer extends r.Pointer {\n constructor(type, options = {}) {\n if (options.type == null) {\n options.type = 'global';\n }\n\n super(null, type, options);\n }\n\n decode(stream, parent, operands) {\n this.offsetType = {\n decode: () => operands[0]\n };\n\n return super.decode(stream, parent, operands);\n }\n\n encode(stream, value, ctx) {\n if (!stream) {\n // compute the size (so ctx.pointerSize is correct)\n this.offsetType = {\n size: () => 0\n };\n\n this.size(value, ctx);\n return [new Ptr(0)];\n }\n\n let ptr = null;\n this.offsetType = {\n encode: (stream, val) => ptr = val\n };\n\n super.encode(stream, value, ctx);\n return [new Ptr(ptr)];\n }\n}\n\nclass Ptr {\n constructor(val) {\n this.val = val;\n this.forceLarge = true;\n }\n\n valueOf() {\n return this.val;\n }\n}\n","import CFFDict from './CFFDict';\nimport CFFIndex from './CFFIndex';\nimport CFFPointer from './CFFPointer';\n\nclass CFFBlendOp {\n static decode(stream, parent, operands) {\n let numBlends = operands.pop();\n\n // TODO: actually blend. For now just consume the deltas\n // since we don't use any of the values anyway.\n while (operands.length > numBlends) {\n operands.pop();\n }\n }\n}\n\nexport default new CFFDict([\n // key name type default\n [6, 'BlueValues', 'delta', null],\n [7, 'OtherBlues', 'delta', null],\n [8, 'FamilyBlues', 'delta', null],\n [9, 'FamilyOtherBlues', 'delta', null],\n [[12, 9], 'BlueScale', 'number', 0.039625],\n [[12, 10], 'BlueShift', 'number', 7],\n [[12, 11], 'BlueFuzz', 'number', 1],\n [10, 'StdHW', 'number', null],\n [11, 'StdVW', 'number', null],\n [[12, 12], 'StemSnapH', 'delta', null],\n [[12, 13], 'StemSnapV', 'delta', null],\n [[12, 14], 'ForceBold', 'boolean', false],\n [[12, 17], 'LanguageGroup', 'number', 0],\n [[12, 18], 'ExpansionFactor', 'number', 0.06],\n [[12, 19], 'initialRandomSeed', 'number', 0],\n [20, 'defaultWidthX', 'number', 0],\n [21, 'nominalWidthX', 'number', 0],\n [22, 'vsindex', 'number', 0],\n [23, 'blend', CFFBlendOp, null],\n [19, 'Subrs', new CFFPointer(new CFFIndex, {type: 'local'}), null]\n]);\n","// Automatically generated from Appendix A of the CFF specification; do\n// not edit. Length should be 391.\nexport default [\n \".notdef\", \"space\", \"exclam\", \"quotedbl\", \"numbersign\", \"dollar\",\n \"percent\", \"ampersand\", \"quoteright\", \"parenleft\", \"parenright\",\n \"asterisk\", \"plus\", \"comma\", \"hyphen\", \"period\", \"slash\", \"zero\", \"one\",\n \"two\", \"three\", \"four\", \"five\", \"six\", \"seven\", \"eight\", \"nine\", \"colon\",\n \"semicolon\", \"less\", \"equal\", \"greater\", \"question\", \"at\", \"A\", \"B\", \"C\",\n \"D\", \"E\", \"F\", \"G\", \"H\", \"I\", \"J\", \"K\", \"L\", \"M\", \"N\", \"O\", \"P\", \"Q\", \"R\",\n \"S\", \"T\", \"U\", \"V\", \"W\", \"X\", \"Y\", \"Z\", \"bracketleft\", \"backslash\",\n \"bracketright\", \"asciicircum\", \"underscore\", \"quoteleft\", \"a\", \"b\", \"c\",\n \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\", \"q\", \"r\",\n \"s\", \"t\", \"u\", \"v\", \"w\", \"x\", \"y\", \"z\", \"braceleft\", \"bar\", \"braceright\",\n \"asciitilde\", \"exclamdown\", \"cent\", \"sterling\", \"fraction\", \"yen\",\n \"florin\", \"section\", \"currency\", \"quotesingle\", \"quotedblleft\",\n \"guillemotleft\", \"guilsinglleft\", \"guilsinglright\", \"fi\", \"fl\", \"endash\",\n \"dagger\", \"daggerdbl\", \"periodcentered\", \"paragraph\", \"bullet\",\n \"quotesinglbase\", \"quotedblbase\", \"quotedblright\", \"guillemotright\",\n \"ellipsis\", \"perthousand\", \"questiondown\", \"grave\", \"acute\", \"circumflex\",\n \"tilde\", \"macron\", \"breve\", \"dotaccent\", \"dieresis\", \"ring\", \"cedilla\",\n \"hungarumlaut\", \"ogonek\", \"caron\", \"emdash\", \"AE\", \"ordfeminine\", \"Lslash\",\n \"Oslash\", \"OE\", \"ordmasculine\", \"ae\", \"dotlessi\", \"lslash\", \"oslash\", \"oe\",\n \"germandbls\", \"onesuperior\", \"logicalnot\", \"mu\", \"trademark\", \"Eth\",\n \"onehalf\", \"plusminus\", \"Thorn\", \"onequarter\", \"divide\", \"brokenbar\",\n \"degree\", \"thorn\", \"threequarters\", \"twosuperior\", \"registered\", \"minus\",\n \"eth\", \"multiply\", \"threesuperior\", \"copyright\", \"Aacute\", \"Acircumflex\",\n \"Adieresis\", \"Agrave\", \"Aring\", \"Atilde\", \"Ccedilla\", \"Eacute\",\n \"Ecircumflex\", \"Edieresis\", \"Egrave\", \"Iacute\", \"Icircumflex\", \"Idieresis\",\n \"Igrave\", \"Ntilde\", \"Oacute\", \"Ocircumflex\", \"Odieresis\", \"Ograve\",\n \"Otilde\", \"Scaron\", \"Uacute\", \"Ucircumflex\", \"Udieresis\", \"Ugrave\",\n \"Yacute\", \"Ydieresis\", \"Zcaron\", \"aacute\", \"acircumflex\", \"adieresis\",\n \"agrave\", \"aring\", \"atilde\", \"ccedilla\", \"eacute\", \"ecircumflex\",\n \"edieresis\", \"egrave\", \"iacute\", \"icircumflex\", \"idieresis\", \"igrave\",\n \"ntilde\", \"oacute\", \"ocircumflex\", \"odieresis\", \"ograve\", \"otilde\",\n \"scaron\", \"uacute\", \"ucircumflex\", \"udieresis\", \"ugrave\", \"yacute\",\n \"ydieresis\", \"zcaron\", \"exclamsmall\", \"Hungarumlautsmall\",\n \"dollaroldstyle\", \"dollarsuperior\", \"ampersandsmall\", \"Acutesmall\",\n \"parenleftsuperior\", \"parenrightsuperior\", \"twodotenleader\",\n \"onedotenleader\", \"zerooldstyle\", \"oneoldstyle\", \"twooldstyle\",\n \"threeoldstyle\", \"fouroldstyle\", \"fiveoldstyle\", \"sixoldstyle\",\n \"sevenoldstyle\", \"eightoldstyle\", \"nineoldstyle\", \"commasuperior\",\n \"threequartersemdash\", \"periodsuperior\", \"questionsmall\", \"asuperior\",\n \"bsuperior\", \"centsuperior\", \"dsuperior\", \"esuperior\", \"isuperior\",\n \"lsuperior\", \"msuperior\", \"nsuperior\", \"osuperior\", \"rsuperior\",\n \"ssuperior\", \"tsuperior\", \"ff\", \"ffi\", \"ffl\", \"parenleftinferior\",\n \"parenrightinferior\", \"Circumflexsmall\", \"hyphensuperior\", \"Gravesmall\",\n \"Asmall\", \"Bsmall\", \"Csmall\", \"Dsmall\", \"Esmall\", \"Fsmall\", \"Gsmall\",\n \"Hsmall\", \"Ismall\", \"Jsmall\", \"Ksmall\", \"Lsmall\", \"Msmall\", \"Nsmall\",\n \"Osmall\", \"Psmall\", \"Qsmall\", \"Rsmall\", \"Ssmall\", \"Tsmall\", \"Usmall\",\n \"Vsmall\", \"Wsmall\", \"Xsmall\", \"Ysmall\", \"Zsmall\", \"colonmonetary\",\n \"onefitted\", \"rupiah\", \"Tildesmall\", \"exclamdownsmall\", \"centoldstyle\",\n \"Lslashsmall\", \"Scaronsmall\", \"Zcaronsmall\", \"Dieresissmall\", \"Brevesmall\",\n \"Caronsmall\", \"Dotaccentsmall\", \"Macronsmall\", \"figuredash\",\n \"hypheninferior\", \"Ogoneksmall\", \"Ringsmall\", \"Cedillasmall\",\n \"questiondownsmall\", \"oneeighth\", \"threeeighths\", \"fiveeighths\",\n \"seveneighths\", \"onethird\", \"twothirds\", \"zerosuperior\", \"foursuperior\",\n \"fivesuperior\", \"sixsuperior\", \"sevensuperior\", \"eightsuperior\",\n \"ninesuperior\", \"zeroinferior\", \"oneinferior\", \"twoinferior\",\n \"threeinferior\", \"fourinferior\", \"fiveinferior\", \"sixinferior\",\n \"seveninferior\", \"eightinferior\", \"nineinferior\", \"centinferior\",\n \"dollarinferior\", \"periodinferior\", \"commainferior\", \"Agravesmall\",\n \"Aacutesmall\", \"Acircumflexsmall\", \"Atildesmall\", \"Adieresissmall\",\n \"Aringsmall\", \"AEsmall\", \"Ccedillasmall\", \"Egravesmall\", \"Eacutesmall\",\n \"Ecircumflexsmall\", \"Edieresissmall\", \"Igravesmall\", \"Iacutesmall\",\n \"Icircumflexsmall\", \"Idieresissmall\", \"Ethsmall\", \"Ntildesmall\",\n \"Ogravesmall\", \"Oacutesmall\", \"Ocircumflexsmall\", \"Otildesmall\",\n \"Odieresissmall\", \"OEsmall\", \"Oslashsmall\", \"Ugravesmall\", \"Uacutesmall\",\n \"Ucircumflexsmall\", \"Udieresissmall\", \"Yacutesmall\", \"Thornsmall\",\n \"Ydieresissmall\", \"001.000\", \"001.001\", \"001.002\", \"001.003\", \"Black\",\n \"Bold\", \"Book\", \"Light\", \"Medium\", \"Regular\", \"Roman\", \"Semibold\"\n];\n","export let StandardEncoding = [\n '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',\n '', '', '', '', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent', 'ampersand', 'quoteright',\n 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two',\n 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater',\n 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',\n 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore',\n 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',\n 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', '', '', '', '', '', '', '', '',\n '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',\n 'exclamdown', 'cent', 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency', 'quotesingle',\n 'quotedblleft', 'guillemotleft', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', '', 'endash', 'dagger',\n 'daggerdbl', 'periodcentered', '', 'paragraph', 'bullet', 'quotesinglbase', 'quotedblbase', 'quotedblright',\n 'guillemotright', 'ellipsis', 'perthousand', '', 'questiondown', '', 'grave', 'acute', 'circumflex', 'tilde',\n 'macron', 'breve', 'dotaccent', 'dieresis', '', 'ring', 'cedilla', '', 'hungarumlaut', 'ogonek', 'caron',\n 'emdash', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'AE', '', 'ordfeminine', '', '', '',\n '', 'Lslash', 'Oslash', 'OE', 'ordmasculine', '', '', '', '', '', 'ae', '', '', '', 'dotlessi', '', '',\n 'lslash', 'oslash', 'oe', 'germandbls'\n];\n\nexport let ExpertEncoding = [\n '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',\n '', '', '', '', 'space', 'exclamsmall', 'Hungarumlautsmall', '', 'dollaroldstyle', 'dollarsuperior',\n 'ampersandsmall', 'Acutesmall', 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader', 'onedotenleader',\n 'comma', 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle',\n 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'colon',\n 'semicolon', 'commasuperior', 'threequartersemdash', 'periodsuperior', 'questionsmall', '', 'asuperior',\n 'bsuperior', 'centsuperior', 'dsuperior', 'esuperior', '', '', 'isuperior', '', '', 'lsuperior', 'msuperior',\n 'nsuperior', 'osuperior', '', '', 'rsuperior', 'ssuperior', 'tsuperior', '', 'ff', 'fi', 'fl', 'ffi', 'ffl',\n 'parenleftinferior', '', 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall', 'Asmall',\n 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall',\n 'Msmall', 'Nsmall', 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', 'Vsmall', 'Wsmall',\n 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', 'onefitted', 'rupiah', 'Tildesmall', '', '', '', '', '', '', '',\n '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',\n 'exclamdownsmall', 'centoldstyle', 'Lslashsmall', '', '', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall',\n 'Brevesmall', 'Caronsmall', '', 'Dotaccentsmall', '', '', 'Macronsmall', '', '', 'figuredash', 'hypheninferior',\n '', '', 'Ogoneksmall', 'Ringsmall', 'Cedillasmall', '', '', '', 'onequarter', 'onehalf', 'threequarters',\n 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds', '',\n '', 'zerosuperior', 'onesuperior', 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior',\n 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior', 'zeroinferior', 'oneinferior', 'twoinferior',\n 'threeinferior', 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior', 'eightinferior',\n 'nineinferior', 'centinferior', 'dollarinferior', 'periodinferior', 'commainferior', 'Agravesmall',\n 'Aacutesmall', 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall', 'Aringsmall', 'AEsmall', 'Ccedillasmall',\n 'Egravesmall', 'Eacutesmall', 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall',\n 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall', 'Ogravesmall', 'Oacutesmall',\n 'Ocircumflexsmall', 'Otildesmall', 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall',\n 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall', 'Ydieresissmall'\n];\n","export let ISOAdobeCharset = [\n '.notdef', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar',\n 'percent', 'ampersand', 'quoteright', 'parenleft', 'parenright',\n 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero',\n 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight',\n 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', 'question',\n 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',\n 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',\n 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore',\n 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',\n 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',\n 'braceleft', 'bar', 'braceright', 'asciitilde', 'exclamdown', 'cent',\n 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency',\n 'quotesingle', 'quotedblleft', 'guillemotleft', 'guilsinglleft',\n 'guilsinglright', 'fi', 'fl', 'endash', 'dagger', 'daggerdbl',\n 'periodcentered', 'paragraph', 'bullet', 'quotesinglbase',\n 'quotedblbase', 'quotedblright', 'guillemotright', 'ellipsis',\n 'perthousand', 'questiondown', 'grave', 'acute', 'circumflex', 'tilde',\n 'macron', 'breve', 'dotaccent', 'dieresis', 'ring', 'cedilla',\n 'hungarumlaut', 'ogonek', 'caron', 'emdash', 'AE', 'ordfeminine',\n 'Lslash', 'Oslash', 'OE', 'ordmasculine', 'ae', 'dotlessi', 'lslash',\n 'oslash', 'oe', 'germandbls', 'onesuperior', 'logicalnot', 'mu',\n 'trademark', 'Eth', 'onehalf', 'plusminus', 'Thorn', 'onequarter',\n 'divide', 'brokenbar', 'degree', 'thorn', 'threequarters', 'twosuperior',\n 'registered', 'minus', 'eth', 'multiply', 'threesuperior', 'copyright',\n 'Aacute', 'Acircumflex', 'Adieresis', 'Agrave', 'Aring', 'Atilde',\n 'Ccedilla', 'Eacute', 'Ecircumflex', 'Edieresis', 'Egrave', 'Iacute',\n 'Icircumflex', 'Idieresis', 'Igrave', 'Ntilde', 'Oacute', 'Ocircumflex',\n 'Odieresis', 'Ograve', 'Otilde', 'Scaron', 'Uacute', 'Ucircumflex',\n 'Udieresis', 'Ugrave', 'Yacute', 'Ydieresis', 'Zcaron', 'aacute',\n 'acircumflex', 'adieresis', 'agrave', 'aring', 'atilde', 'ccedilla',\n 'eacute', 'ecircumflex', 'edieresis', 'egrave', 'iacute', 'icircumflex',\n 'idieresis', 'igrave', 'ntilde', 'oacute', 'ocircumflex', 'odieresis',\n 'ograve', 'otilde', 'scaron', 'uacute', 'ucircumflex', 'udieresis',\n 'ugrave', 'yacute', 'ydieresis', 'zcaron'\n];\n\nexport let ExpertCharset = [\n '.notdef', 'space', 'exclamsmall', 'Hungarumlautsmall', 'dollaroldstyle',\n 'dollarsuperior', 'ampersandsmall', 'Acutesmall', 'parenleftsuperior',\n 'parenrightsuperior', 'twodotenleader', 'onedotenleader', 'comma',\n 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle',\n 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle',\n 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle',\n 'colon', 'semicolon', 'commasuperior', 'threequartersemdash',\n 'periodsuperior', 'questionsmall', 'asuperior', 'bsuperior',\n 'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior',\n 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior',\n 'tsuperior', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior',\n 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall',\n 'Asmall', 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall',\n 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall',\n 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall',\n 'Vsmall', 'Wsmall', 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary',\n 'onefitted', 'rupiah', 'Tildesmall', 'exclamdownsmall', 'centoldstyle',\n 'Lslashsmall', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall',\n 'Brevesmall', 'Caronsmall', 'Dotaccentsmall', 'Macronsmall',\n 'figuredash', 'hypheninferior', 'Ogoneksmall', 'Ringsmall',\n 'Cedillasmall', 'onequarter', 'onehalf', 'threequarters',\n 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths',\n 'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'onesuperior',\n 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior',\n 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior',\n 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior',\n 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior',\n 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior',\n 'periodinferior', 'commainferior', 'Agravesmall', 'Aacutesmall',\n 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall', 'Aringsmall',\n 'AEsmall', 'Ccedillasmall', 'Egravesmall', 'Eacutesmall',\n 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall',\n 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall',\n 'Ogravesmall', 'Oacutesmall', 'Ocircumflexsmall', 'Otildesmall',\n 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall',\n 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall',\n 'Ydieresissmall'\n];\n\nexport let ExpertSubsetCharset = [\n '.notdef', 'space', 'dollaroldstyle', 'dollarsuperior',\n 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader',\n 'onedotenleader', 'comma', 'hyphen', 'period', 'fraction',\n 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle',\n 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle',\n 'eightoldstyle', 'nineoldstyle', 'colon', 'semicolon', 'commasuperior',\n 'threequartersemdash', 'periodsuperior', 'asuperior', 'bsuperior',\n 'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior',\n 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior',\n 'tsuperior', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior',\n 'parenrightinferior', 'hyphensuperior', 'colonmonetary', 'onefitted',\n 'rupiah', 'centoldstyle', 'figuredash', 'hypheninferior', 'onequarter',\n 'onehalf', 'threequarters', 'oneeighth', 'threeeighths', 'fiveeighths',\n 'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'onesuperior',\n 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior',\n 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior',\n 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior',\n 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior',\n 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior',\n 'periodinferior', 'commainferior'\n];\n","import r from 'restructure';\n\n//########################\n// Scripts and Languages #\n//########################\n\nlet LangSysTable = new r.Struct({\n reserved: new r.Reserved(r.uint16),\n reqFeatureIndex: r.uint16,\n featureCount: r.uint16,\n featureIndexes: new r.Array(r.uint16, 'featureCount')\n});\n\nlet LangSysRecord = new r.Struct({\n tag: new r.String(4),\n langSys: new r.Pointer(r.uint16, LangSysTable, { type: 'parent' })\n});\n\nlet Script = new r.Struct({\n defaultLangSys: new r.Pointer(r.uint16, LangSysTable),\n count: r.uint16,\n langSysRecords: new r.Array(LangSysRecord, 'count')\n});\n\nlet ScriptRecord = new r.Struct({\n tag: new r.String(4),\n script: new r.Pointer(r.uint16, Script, { type: 'parent' })\n});\n\nexport let ScriptList = new r.Array(ScriptRecord, r.uint16);\n\n//#######################\n// Features and Lookups #\n//#######################\n\nexport let Feature = new r.Struct({\n featureParams: r.uint16, // pointer\n lookupCount: r.uint16,\n lookupListIndexes: new r.Array(r.uint16, 'lookupCount')\n});\n\nlet FeatureRecord = new r.Struct({\n tag: new r.String(4),\n feature: new r.Pointer(r.uint16, Feature, { type: 'parent' })\n});\n\nexport let FeatureList = new r.Array(FeatureRecord, r.uint16);\n\nlet LookupFlags = new r.Bitfield(r.uint16, [\n 'rightToLeft', 'ignoreBaseGlyphs', 'ignoreLigatures',\n 'ignoreMarks', 'useMarkFilteringSet', null, 'markAttachmentType'\n]);\n\nexport function LookupList(SubTable) {\n let Lookup = new r.Struct({\n lookupType: r.uint16,\n flags: LookupFlags,\n subTableCount: r.uint16,\n subTables: new r.Array(new r.Pointer(r.uint16, SubTable), 'subTableCount'),\n markFilteringSet: r.uint16 // TODO: only present when flags says so...\n });\n\n return new r.LazyArray(new r.Pointer(r.uint16, Lookup), r.uint16);\n}\n\n//#################\n// Coverage Table #\n//#################\n\nlet RangeRecord = new r.Struct({\n start: r.uint16,\n end: r.uint16,\n startCoverageIndex: r.uint16\n});\n\nexport let Coverage = new r.VersionedStruct(r.uint16, {\n 1: {\n glyphCount: r.uint16,\n glyphs: new r.Array(r.uint16, 'glyphCount')\n },\n 2: {\n rangeCount: r.uint16,\n rangeRecords: new r.Array(RangeRecord, 'rangeCount')\n }\n});\n\n//#########################\n// Class Definition Table #\n//#########################\n\nlet ClassRangeRecord = new r.Struct({\n start: r.uint16,\n end: r.uint16,\n class: r.uint16\n});\n\nexport let ClassDef = new r.VersionedStruct(r.uint16, {\n 1: { // Class array\n startGlyph: r.uint16,\n glyphCount: r.uint16,\n classValueArray: new r.Array(r.uint16, 'glyphCount')\n },\n 2: { // Class ranges\n classRangeCount: r.uint16,\n classRangeRecord: new r.Array(ClassRangeRecord, 'classRangeCount')\n }\n});\n\n//###############\n// Device Table #\n//###############\n\nexport let Device = new r.Struct({\n startSize: r.uint16,\n endSize: r.uint16,\n deltaFormat: r.uint16\n});\n\n//#############################################\n// Contextual Substitution/Positioning Tables #\n//#############################################\n\nlet LookupRecord = new r.Struct({\n sequenceIndex: r.uint16,\n lookupListIndex: r.uint16\n});\n\nlet Rule = new r.Struct({\n glyphCount: r.uint16,\n lookupCount: r.uint16,\n input: new r.Array(r.uint16, t => t.glyphCount - 1),\n lookupRecords: new r.Array(LookupRecord, 'lookupCount')\n});\n\nlet RuleSet = new r.Array(new r.Pointer(r.uint16, Rule), r.uint16);\n\nlet ClassRule = new r.Struct({\n glyphCount: r.uint16,\n lookupCount: r.uint16,\n classes: new r.Array(r.uint16, t => t.glyphCount - 1),\n lookupRecords: new r.Array(LookupRecord, 'lookupCount')\n});\n\nlet ClassSet = new r.Array(new r.Pointer(r.uint16, ClassRule), r.uint16);\n\nexport let Context = new r.VersionedStruct(r.uint16, {\n 1: { // Simple context\n coverage: new r.Pointer(r.uint16, Coverage),\n ruleSetCount: r.uint16,\n ruleSets: new r.Array(new r.Pointer(r.uint16, RuleSet), 'ruleSetCount')\n },\n 2: { // Class-based context\n coverage: new r.Pointer(r.uint16, Coverage),\n classDef: new r.Pointer(r.uint16, ClassDef),\n classSetCnt: r.uint16,\n classSet: new r.Array(new r.Pointer(r.uint16, ClassSet), 'classSetCnt')\n },\n 3: {\n glyphCount: r.uint16,\n lookupCount: r.uint16,\n coverages: new r.Array(new r.Pointer(r.uint16, Coverage), 'glyphCount'),\n lookupRecords: new r.Array(LookupRecord, 'lookupCount')\n }\n});\n\n//######################################################\n// Chaining Contextual Substitution/Positioning Tables #\n//######################################################\n\nlet ChainRule = new r.Struct({\n backtrackGlyphCount: r.uint16,\n backtrack: new r.Array(r.uint16, 'backtrackGlyphCount'),\n inputGlyphCount: r.uint16,\n input: new r.Array(r.uint16, t => t.inputGlyphCount - 1),\n lookaheadGlyphCount: r.uint16,\n lookahead: new r.Array(r.uint16, 'lookaheadGlyphCount'),\n lookupCount: r.uint16,\n lookupRecords: new r.Array(LookupRecord, 'lookupCount')\n});\n\nlet ChainRuleSet = new r.Array(new r.Pointer(r.uint16, ChainRule), r.uint16);\n\nexport let ChainingContext = new r.VersionedStruct(r.uint16, {\n 1: { // Simple context glyph substitution\n coverage: new r.Pointer(r.uint16, Coverage),\n chainCount: r.uint16,\n chainRuleSets: new r.Array(new r.Pointer(r.uint16, ChainRuleSet), 'chainCount')\n },\n\n 2: { // Class-based chaining context\n coverage: new r.Pointer(r.uint16, Coverage),\n backtrackClassDef: new r.Pointer(r.uint16, ClassDef),\n inputClassDef: new r.Pointer(r.uint16, ClassDef),\n lookaheadClassDef: new r.Pointer(r.uint16, ClassDef),\n chainCount: r.uint16,\n chainClassSet: new r.Array(new r.Pointer(r.uint16, ChainRuleSet), 'chainCount')\n },\n\n 3: { // Coverage-based chaining context\n backtrackGlyphCount: r.uint16,\n backtrackCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'backtrackGlyphCount'),\n inputGlyphCount: r.uint16,\n inputCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'inputGlyphCount'),\n lookaheadGlyphCount: r.uint16,\n lookaheadCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'lookaheadGlyphCount'),\n lookupCount: r.uint16,\n lookupRecords: new r.Array(LookupRecord, 'lookupCount')\n }\n});\n","import {Feature} from './opentype';\nimport r from 'restructure';\n\n/*******************\n * Variation Store *\n *******************/\n\nlet F2DOT14 = new r.Fixed(16, 'BE', 14);\nlet RegionAxisCoordinates = new r.Struct({\n startCoord: F2DOT14,\n peakCoord: F2DOT14,\n endCoord: F2DOT14\n});\n\nlet VariationRegionList = new r.Struct({\n axisCount: r.uint16,\n regionCount: r.uint16,\n variationRegions: new r.Array(new r.Array(RegionAxisCoordinates, 'axisCount'), 'regionCount')\n});\n\nlet DeltaSet = new r.Struct({\n shortDeltas: new r.Array(r.int16, t => t.parent.shortDeltaCount),\n regionDeltas: new r.Array(r.int8, t => t.parent.regionIndexCount - t.parent.shortDeltaCount),\n deltas: t => t.shortDeltas.concat(t.regionDeltas)\n});\n\nlet ItemVariationData = new r.Struct({\n itemCount: r.uint16,\n shortDeltaCount: r.uint16,\n regionIndexCount: r.uint16,\n regionIndexes: new r.Array(r.uint16, 'regionIndexCount'),\n deltaSets: new r.Array(DeltaSet, 'itemCount')\n});\n\nexport let ItemVariationStore = new r.Struct({\n format: r.uint16,\n variationRegionList: new r.Pointer(r.uint32, VariationRegionList),\n variationDataCount: r.uint16,\n itemVariationData: new r.Array(new r.Pointer(r.uint32, ItemVariationData), 'variationDataCount')\n});\n\n/**********************\n * Feature Variations *\n **********************/\n\nlet ConditionTable = new r.VersionedStruct(r.uint16, {\n 1: {\n axisIndex: r.uint16,\n axisIndex: r.uint16,\n filterRangeMinValue: F2DOT14,\n filterRangeMaxValue: F2DOT14\n }\n});\n\nlet ConditionSet = new r.Struct({\n conditionCount: r.uint16,\n conditionTable: new r.Array(new r.Pointer(r.uint32, ConditionTable), 'conditionCount')\n});\n\nlet FeatureTableSubstitutionRecord = new r.Struct({\n featureIndex: r.uint16,\n alternateFeatureTable: new r.Pointer(r.uint32, Feature, {type: 'parent'})\n});\n\nlet FeatureTableSubstitution = new r.Struct({\n version: r.fixed32,\n substitutionCount: r.uint16,\n substitutions: new r.Array(FeatureTableSubstitutionRecord, 'substitutionCount')\n});\n\nlet FeatureVariationRecord = new r.Struct({\n conditionSet: new r.Pointer(r.uint32, ConditionSet, {type: 'parent'}),\n featureTableSubstitution: new r.Pointer(r.uint32, FeatureTableSubstitution, {type: 'parent'})\n});\n\nexport let FeatureVariations = new r.Struct({\n majorVersion: r.uint16,\n minorVersion: r.uint16,\n featureVariationRecordCount: r.uint32,\n featureVariationRecords: new r.Array(FeatureVariationRecord, 'featureVariationRecordCount')\n});\n","import r from 'restructure';\nimport { resolveLength } from 'restructure/src/utils';\nimport CFFDict from './CFFDict';\nimport CFFIndex from './CFFIndex';\nimport CFFPointer from './CFFPointer';\nimport CFFPrivateDict from './CFFPrivateDict';\nimport StandardStrings from './CFFStandardStrings';\nimport { StandardEncoding, ExpertEncoding } from './CFFEncodings';\nimport { ISOAdobeCharset, ExpertCharset, ExpertSubsetCharset } from './CFFCharsets';\nimport { ItemVariationStore } from '../tables/variations';\n\n// Checks if an operand is an index of a predefined value,\n// otherwise delegates to the provided type.\nclass PredefinedOp {\n constructor(predefinedOps, type) {\n this.predefinedOps = predefinedOps;\n this.type = type;\n }\n\n decode(stream, parent, operands) {\n if (this.predefinedOps[operands[0]]) {\n return this.predefinedOps[operands[0]];\n }\n\n return this.type.decode(stream, parent, operands);\n }\n\n size(value, ctx) {\n return this.type.size(value, ctx);\n }\n\n encode(stream, value, ctx) {\n let index = this.predefinedOps.indexOf(value);\n if (index !== -1) {\n return index;\n }\n\n return this.type.encode(stream, value, ctx);\n }\n}\n\nclass CFFEncodingVersion extends r.Number {\n constructor() {\n super('UInt8');\n }\n\n decode(stream) {\n return r.uint8.decode(stream) & 0x7f;\n }\n}\n\nlet Range1 = new r.Struct({\n first: r.uint16,\n nLeft: r.uint8\n});\n\nlet Range2 = new r.Struct({\n first: r.uint16,\n nLeft: r.uint16\n});\n\nlet CFFCustomEncoding = new r.VersionedStruct(new CFFEncodingVersion(), {\n 0: {\n nCodes: r.uint8,\n codes: new r.Array(r.uint8, 'nCodes')\n },\n\n 1: {\n nRanges: r.uint8,\n ranges: new r.Array(Range1, 'nRanges')\n }\n\n // TODO: supplement?\n});\n\nlet CFFEncoding = new PredefinedOp([ StandardEncoding, ExpertEncoding ], new CFFPointer(CFFCustomEncoding, { lazy: true }));\n\n// Decodes an array of ranges until the total\n// length is equal to the provided length.\nclass RangeArray extends r.Array {\n decode(stream, parent) {\n let length = resolveLength(this.length, stream, parent);\n let count = 0;\n let res = [];\n while (count < length) {\n let range = this.type.decode(stream, parent);\n range.offset = count;\n count += range.nLeft + 1;\n res.push(range);\n }\n\n return res;\n }\n}\n\nlet CFFCustomCharset = new r.VersionedStruct(r.uint8, {\n 0: {\n glyphs: new r.Array(r.uint16, t => t.parent.CharStrings.length - 1)\n },\n\n 1: {\n ranges: new RangeArray(Range1, t => t.parent.CharStrings.length - 1)\n },\n\n 2: {\n ranges: new RangeArray(Range2, t => t.parent.CharStrings.length - 1)\n }\n});\n\nlet CFFCharset = new PredefinedOp([ ISOAdobeCharset, ExpertCharset, ExpertSubsetCharset ], new CFFPointer(CFFCustomCharset, {lazy: true}));\n\nlet FDRange3 = new r.Struct({\n first: r.uint16,\n fd: r.uint8\n});\n\nlet FDRange4 = new r.Struct({\n first: r.uint32,\n fd: r.uint16\n});\n\nlet FDSelect = new r.VersionedStruct(r.uint8, {\n 0: {\n fds: new r.Array(r.uint8, t => t.parent.CharStrings.length)\n },\n\n 3: {\n nRanges: r.uint16,\n ranges: new r.Array(FDRange3, 'nRanges'),\n sentinel: r.uint16\n },\n\n 4: {\n nRanges: r.uint32,\n ranges: new r.Array(FDRange4, 'nRanges'),\n sentinel: r.uint32\n }\n});\n\nlet ptr = new CFFPointer(CFFPrivateDict);\nclass CFFPrivateOp {\n decode(stream, parent, operands) {\n parent.length = operands[0];\n return ptr.decode(stream, parent, [operands[1]]);\n }\n\n size(dict, ctx) {\n return [CFFPrivateDict.size(dict, ctx, false), ptr.size(dict, ctx)[0]];\n }\n\n encode(stream, dict, ctx) {\n return [CFFPrivateDict.size(dict, ctx, false), ptr.encode(stream, dict, ctx)[0]];\n }\n}\n\nlet FontDict = new CFFDict([\n // key name type(s) default\n [18, 'Private', new CFFPrivateOp, null],\n [[12, 38], 'FontName', 'sid', null]\n]);\n\nlet CFFTopDict = new CFFDict([\n // key name type(s) default\n [[12, 30], 'ROS', ['sid', 'sid', 'number'], null],\n\n [0, 'version', 'sid', null],\n [1, 'Notice', 'sid', null],\n [[12, 0], 'Copyright', 'sid', null],\n [2, 'FullName', 'sid', null],\n [3, 'FamilyName', 'sid', null],\n [4, 'Weight', 'sid', null],\n [[12, 1], 'isFixedPitch', 'boolean', false],\n [[12, 2], 'ItalicAngle', 'number', 0],\n [[12, 3], 'UnderlinePosition', 'number', -100],\n [[12, 4], 'UnderlineThickness', 'number', 50],\n [[12, 5], 'PaintType', 'number', 0],\n [[12, 6], 'CharstringType', 'number', 2],\n [[12, 7], 'FontMatrix', 'array', [0.001, 0, 0, 0.001, 0, 0]],\n [13, 'UniqueID', 'number', null],\n [5, 'FontBBox', 'array', [0, 0, 0, 0]],\n [[12, 8], 'StrokeWidth', 'number', 0],\n [14, 'XUID', 'array', null],\n [15, 'charset', CFFCharset, ISOAdobeCharset],\n [16, 'Encoding', CFFEncoding, StandardEncoding],\n [17, 'CharStrings', new CFFPointer(new CFFIndex), null],\n [18, 'Private', new CFFPrivateOp, null],\n [[12, 20], 'SyntheticBase', 'number', null],\n [[12, 21], 'PostScript', 'sid', null],\n [[12, 22], 'BaseFontName', 'sid', null],\n [[12, 23], 'BaseFontBlend', 'delta', null],\n\n // CID font specific\n [[12, 31], 'CIDFontVersion', 'number', 0],\n [[12, 32], 'CIDFontRevision', 'number', 0],\n [[12, 33], 'CIDFontType', 'number', 0],\n [[12, 34], 'CIDCount', 'number', 8720],\n [[12, 35], 'UIDBase', 'number', null],\n [[12, 37], 'FDSelect', new CFFPointer(FDSelect), null],\n [[12, 36], 'FDArray', new CFFPointer(new CFFIndex(FontDict)), null],\n [[12, 38], 'FontName', 'sid', null]\n]);\n\nlet VariationStore = new r.Struct({\n length: r.uint16,\n itemVariationStore: ItemVariationStore\n})\n\nlet CFF2TopDict = new CFFDict([\n [[12, 7], 'FontMatrix', 'array', [0.001, 0, 0, 0.001, 0, 0]],\n [17, 'CharStrings', new CFFPointer(new CFFIndex), null],\n [[12, 37], 'FDSelect', new CFFPointer(FDSelect), null],\n [[12, 36], 'FDArray', new CFFPointer(new CFFIndex(FontDict)), null],\n [24, 'vstore', new CFFPointer(VariationStore), null],\n [25, 'maxstack', 'number', 193]\n]);\n\nlet CFFTop = new r.VersionedStruct(r.fixed16, {\n 1: {\n hdrSize: r.uint8,\n offSize: r.uint8,\n nameIndex: new CFFIndex(new r.String('length')),\n topDictIndex: new CFFIndex(CFFTopDict),\n stringIndex: new CFFIndex(new r.String('length')),\n globalSubrIndex: new CFFIndex\n },\n\n 2: {\n hdrSize: r.uint8,\n length: r.uint16,\n topDict: CFF2TopDict,\n globalSubrIndex: new CFFIndex\n }\n});\n\nexport default CFFTop;\n","import r from 'restructure';\nimport CFFIndex from './CFFIndex';\nimport CFFTop from './CFFTop';\nimport CFFPrivateDict from './CFFPrivateDict';\nimport standardStrings from './CFFStandardStrings';\n\nclass CFFFont {\n constructor(stream) {\n this.stream = stream;\n this.decode();\n }\n\n static decode(stream) {\n return new CFFFont(stream);\n }\n\n decode() {\n let start = this.stream.pos;\n let top = CFFTop.decode(this.stream);\n for (let key in top) {\n let val = top[key];\n this[key] = val;\n }\n\n if (this.version < 2) {\n if (this.topDictIndex.length !== 1) {\n throw new Error(\"Only a single font is allowed in CFF\");\n }\n\n this.topDict = this.topDictIndex[0];\n }\n\n this.isCIDFont = this.topDict.ROS != null;\n return this;\n }\n\n string(sid) {\n if (this.version >= 2) {\n return null;\n }\n\n if (sid < standardStrings.length) {\n return standardStrings[sid];\n }\n\n return this.stringIndex[sid - standardStrings.length];\n }\n\n get postscriptName() {\n if (this.version < 2) {\n return this.nameIndex[0];\n }\n\n return null;\n }\n\n get fullName() {\n return this.string(this.topDict.FullName);\n }\n\n get familyName() {\n return this.string(this.topDict.FamilyName);\n }\n\n getCharString(glyph) {\n this.stream.pos = this.topDict.CharStrings[glyph].offset;\n return this.stream.readBuffer(this.topDict.CharStrings[glyph].length);\n }\n\n getGlyphName(gid) {\n // CFF2 glyph names are in the post table.\n if (this.version >= 2) {\n return null;\n }\n\n // CID-keyed fonts don't have glyph names\n if (this.isCIDFont) {\n return null;\n }\n\n let { charset } = this.topDict;\n if (Array.isArray(charset)) {\n return charset[gid];\n }\n\n if (gid === 0) {\n return '.notdef';\n }\n\n gid -= 1;\n\n switch (charset.version) {\n case 0:\n return this.string(charset.glyphs[gid]);\n\n case 1:\n case 2:\n for (let i = 0; i < charset.ranges.length; i++) {\n let range = charset.ranges[i];\n if (range.offset <= gid && gid <= range.offset + range.nLeft) {\n return this.string(range.first + (gid - range.offset));\n }\n }\n break;\n }\n\n return null;\n }\n\n fdForGlyph(gid) {\n if (!this.topDict.FDSelect) {\n return null;\n }\n\n switch (this.topDict.FDSelect.version) {\n case 0:\n return this.topDict.FDSelect.fds[gid];\n\n case 3:\n case 4:\n let { ranges } = this.topDict.FDSelect;\n let low = 0;\n let high = ranges.length - 1;\n\n while (low <= high) {\n let mid = (low + high) >> 1;\n\n if (gid < ranges[mid].first) {\n high = mid - 1;\n } else if (mid < high && gid > ranges[mid + 1].first) {\n low = mid + 1;\n } else {\n return ranges[mid].fd;\n }\n }\n default:\n throw new Error(`Unknown FDSelect version: ${this.topDict.FDSelect.version}`);\n }\n }\n\n privateDictForGlyph(gid) {\n if (this.topDict.FDSelect) {\n let fd = this.fdForGlyph(gid);\n if (this.topDict.FDArray[fd]) {\n return this.topDict.FDArray[fd].Private;\n }\n\n return null;\n }\n\n if (this.version < 2) {\n return this.topDict.Private;\n }\n\n return this.topDict.FDArray[0].Private;\n }\n}\n\nexport default CFFFont;\n","import r from 'restructure';\n\nlet VerticalOrigin = new r.Struct({\n glyphIndex: r.uint16,\n vertOriginY: r.int16\n});\n\nexport default new r.Struct({\n majorVersion: r.uint16,\n minorVersion: r.uint16,\n defaultVertOriginY: r.int16,\n numVertOriginYMetrics: r.uint16,\n metrics: new r.Array(VerticalOrigin, 'numVertOriginYMetrics')\n});\n","import r from 'restructure';\n\nexport let BigMetrics = new r.Struct({\n height: r.uint8,\n width: r.uint8,\n horiBearingX: r.int8,\n horiBearingY: r.int8,\n horiAdvance: r.uint8,\n vertBearingX: r.int8,\n vertBearingY: r.int8,\n vertAdvance: r.uint8\n});\n\nexport let SmallMetrics = new r.Struct({\n height: r.uint8,\n width: r.uint8,\n bearingX: r.int8,\n bearingY: r.int8,\n advance: r.uint8\n});\n\nlet EBDTComponent = new r.Struct({\n glyph: r.uint16,\n xOffset: r.int8,\n yOffset: r.int8\n});\n\nclass ByteAligned {}\n\nclass BitAligned {}\n\nexport let glyph = new r.VersionedStruct('version', {\n 1: {\n metrics: SmallMetrics,\n data: ByteAligned\n },\n\n 2: {\n metrics: SmallMetrics,\n data: BitAligned\n },\n\n // format 3 is deprecated\n // format 4 is not supported by Microsoft\n\n 5: {\n data: BitAligned\n },\n\n 6: {\n metrics: BigMetrics,\n data: ByteAligned\n },\n\n 7: {\n metrics: BigMetrics,\n data: BitAligned\n },\n\n 8: {\n metrics: SmallMetrics,\n pad: new r.Reserved(r.uint8),\n numComponents: r.uint16,\n components: new r.Array(EBDTComponent, 'numComponents')\n },\n\n 9: {\n metrics: BigMetrics,\n pad: new r.Reserved(r.uint8),\n numComponents: r.uint16,\n components: new r.Array(EBDTComponent, 'numComponents')\n },\n\n 17: {\n metrics: SmallMetrics,\n dataLen: r.uint32,\n data: new r.Buffer('dataLen')\n },\n\n 18: {\n metrics: BigMetrics,\n dataLen: r.uint32,\n data: new r.Buffer('dataLen')\n },\n\n 19: {\n dataLen: r.uint32,\n data: new r.Buffer('dataLen')\n }\n});\n\n","import r from 'restructure';\nimport {BigMetrics} from './EBDT';\n\nlet SBitLineMetrics = new r.Struct({\n ascender: r.int8,\n descender: r.int8,\n widthMax: r.uint8,\n caretSlopeNumerator: r.int8,\n caretSlopeDenominator: r.int8,\n caretOffset: r.int8,\n minOriginSB: r.int8,\n minAdvanceSB: r.int8,\n maxBeforeBL: r.int8,\n minAfterBL: r.int8,\n pad: new r.Reserved(r.int8, 2)\n});\n\nlet CodeOffsetPair = new r.Struct({\n glyphCode: r.uint16,\n offset: r.uint16\n});\n\nlet IndexSubtable = new r.VersionedStruct(r.uint16, {\n header: {\n imageFormat: r.uint16,\n imageDataOffset: r.uint32\n },\n\n 1: {\n offsetArray: new r.Array(r.uint32, t => t.parent.lastGlyphIndex - t.parent.firstGlyphIndex + 1)\n },\n\n 2: {\n imageSize: r.uint32,\n bigMetrics: BigMetrics\n },\n\n 3: {\n offsetArray: new r.Array(r.uint16, t => t.parent.lastGlyphIndex - t.parent.firstGlyphIndex + 1)\n },\n\n 4: {\n numGlyphs: r.uint32,\n glyphArray: new r.Array(CodeOffsetPair, t => t.numGlyphs + 1)\n },\n\n 5: {\n imageSize: r.uint32,\n bigMetrics: BigMetrics,\n numGlyphs: r.uint32,\n glyphCodeArray: new r.Array(r.uint16, 'numGlyphs')\n }\n});\n\nlet IndexSubtableArray = new r.Struct({\n firstGlyphIndex: r.uint16,\n lastGlyphIndex: r.uint16,\n subtable: new r.Pointer(r.uint32, IndexSubtable)\n});\n\nlet BitmapSizeTable = new r.Struct({\n indexSubTableArray: new r.Pointer(r.uint32, new r.Array(IndexSubtableArray, 1), { type: 'parent' }),\n indexTablesSize: r.uint32,\n numberOfIndexSubTables: r.uint32,\n colorRef: r.uint32,\n hori: SBitLineMetrics,\n vert: SBitLineMetrics,\n startGlyphIndex: r.uint16,\n endGlyphIndex: r.uint16,\n ppemX: r.uint8,\n ppemY: r.uint8,\n bitDepth: r.uint8,\n flags: new r.Bitfield(r.uint8, ['horizontal', 'vertical'])\n});\n\nexport default new r.Struct({\n version: r.uint32, // 0x00020000\n numSizes: r.uint32,\n sizes: new r.Array(BitmapSizeTable, 'numSizes')\n});\n","import r from 'restructure';\n\nlet ImageTable = new r.Struct({\n ppem: r.uint16,\n resolution: r.uint16,\n imageOffsets: new r.Array(new r.Pointer(r.uint32, 'void'), t => t.parent.parent.maxp.numGlyphs + 1)\n});\n\n// This is the Apple sbix table, used by the \"Apple Color Emoji\" font.\n// It includes several image tables with images for each bitmap glyph\n// of several different sizes.\nexport default new r.Struct({\n version: r.uint16,\n flags: new r.Bitfield(r.uint16, ['renderOutlines']),\n numImgTables: r.uint32,\n imageTables: new r.Array(new r.Pointer(r.uint32, ImageTable), 'numImgTables')\n});\n","import r from 'restructure';\n\nlet LayerRecord = new r.Struct({\n gid: r.uint16, // Glyph ID of layer glyph (must be in z-order from bottom to top).\n paletteIndex: r.uint16 // Index value to use in the appropriate palette. This value must\n}); // be less than numPaletteEntries in the CPAL table, except for\n // the special case noted below. Each palette entry is 16 bits.\n // A palette index of 0xFFFF is a special case indicating that\n // the text foreground color should be used.\n\nlet BaseGlyphRecord = new r.Struct({\n gid: r.uint16, // Glyph ID of reference glyph. This glyph is for reference only\n // and is not rendered for color.\n firstLayerIndex: r.uint16, // Index (from beginning of the Layer Records) to the layer record.\n // There will be numLayers consecutive entries for this base glyph.\n numLayers: r.uint16\n});\n\nexport default new r.Struct({\n version: r.uint16,\n numBaseGlyphRecords: r.uint16,\n baseGlyphRecord: new r.Pointer(r.uint32, new r.Array(BaseGlyphRecord, 'numBaseGlyphRecords')),\n layerRecords: new r.Pointer(r.uint32, new r.Array(LayerRecord, 'numLayerRecords'), { lazy: true }),\n numLayerRecords: r.uint16\n});\n","import r from 'restructure';\n\nlet ColorRecord = new r.Struct({\n blue: r.uint8,\n green: r.uint8,\n red: r.uint8,\n alpha: r.uint8\n});\n\nexport default new r.Struct({\n version: r.uint16,\n numPaletteEntries: r.uint16,\n numPalettes: r.uint16,\n numColorRecords: r.uint16,\n colorRecords: new r.Pointer(r.uint32, new r.Array(ColorRecord, 'numColorRecords')),\n colorRecordIndices: new r.Array(r.uint16, 'numPalettes')\n});\n","import r from 'restructure';\nimport { ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device } from './opentype';\n\nlet BaseCoord = new r.VersionedStruct(r.uint16, {\n 1: { // Design units only\n coordinate: r.int16 // X or Y value, in design units\n },\n\n 2: { // Design units plus contour point\n coordinate: r.int16, // X or Y value, in design units\n referenceGlyph: r.uint16, // GlyphID of control glyph\n baseCoordPoint: r.uint16 // Index of contour point on the referenceGlyph\n },\n\n 3: { // Design units plus Device table\n coordinate: r.int16, // X or Y value, in design units\n deviceTable: new r.Pointer(r.uint16, Device) // Device table for X or Y value\n }\n});\n\nlet BaseValues = new r.Struct({\n defaultIndex: r.uint16, // Index of default baseline for this script-same index in the BaseTagList\n baseCoordCount: r.uint16,\n baseCoords: new r.Array(new r.Pointer(r.uint16, BaseCoord), 'baseCoordCount')\n});\n\nlet FeatMinMaxRecord = new r.Struct({\n tag: new r.String(4), // 4-byte feature identification tag-must match FeatureTag in FeatureList\n minCoord: new r.Pointer(r.uint16, BaseCoord, {type: 'parent'}), // May be NULL\n maxCoord: new r.Pointer(r.uint16, BaseCoord, {type: 'parent'}) // May be NULL\n});\n\nlet MinMax = new r.Struct({\n minCoord: new r.Pointer(r.uint16, BaseCoord), // May be NULL\n maxCoord: new r.Pointer(r.uint16, BaseCoord), // May be NULL\n featMinMaxCount: r.uint16, // May be 0\n featMinMaxRecords: new r.Array(FeatMinMaxRecord, 'featMinMaxCount') // In alphabetical order\n});\n\nlet BaseLangSysRecord = new r.Struct({\n tag: new r.String(4), // 4-byte language system identification tag\n minMax: new r.Pointer(r.uint16, MinMax, {type: 'parent'})\n});\n\nlet BaseScript = new r.Struct({\n baseValues: new r.Pointer(r.uint16, BaseValues), // May be NULL\n defaultMinMax: new r.Pointer(r.uint16, MinMax), // May be NULL\n baseLangSysCount: r.uint16, // May be 0\n baseLangSysRecords: new r.Array(BaseLangSysRecord, 'baseLangSysCount') // in alphabetical order by BaseLangSysTag\n});\n\nlet BaseScriptRecord = new r.Struct({\n tag: new r.String(4), // 4-byte script identification tag\n script: new r.Pointer(r.uint16, BaseScript, {type: 'parent'})\n});\n\nlet BaseScriptList = new r.Array(BaseScriptRecord, r.uint16);\n\n// Array of 4-byte baseline identification tags-must be in alphabetical order\nlet BaseTagList = new r.Array(new r.String(4), r.uint16);\n\nlet Axis = new r.Struct({\n baseTagList: new r.Pointer(r.uint16, BaseTagList), // May be NULL\n baseScriptList: new r.Pointer(r.uint16, BaseScriptList)\n});\n\nexport default new r.Struct({\n version: r.uint32, // Version of the BASE table-initially 0x00010000\n horizAxis: new r.Pointer(r.uint16, Axis), // May be NULL\n vertAxis: new r.Pointer(r.uint16, Axis) // May be NULL\n});\n","import r from 'restructure';\nimport {ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device} from './opentype';\nimport {ItemVariationStore} from './variations';\n\nlet AttachPoint = new r.Array(r.uint16, r.uint16);\nlet AttachList = new r.Struct({\n coverage: new r.Pointer(r.uint16, Coverage),\n glyphCount: r.uint16,\n attachPoints: new r.Array(new r.Pointer(r.uint16, AttachPoint), 'glyphCount')\n});\n\nlet CaretValue = new r.VersionedStruct(r.uint16, {\n 1: { // Design units only\n coordinate: r.int16\n },\n\n 2: { // Contour point\n caretValuePoint: r.uint16\n },\n\n 3: { // Design units plus Device table\n coordinate: r.int16,\n deviceTable: new r.Pointer(r.uint16, Device)\n }\n});\n\nlet LigGlyph = new r.Array(new r.Pointer(r.uint16, CaretValue), r.uint16);\n\nlet LigCaretList = new r.Struct({\n coverage: new r.Pointer(r.uint16, Coverage),\n ligGlyphCount: r.uint16,\n ligGlyphs: new r.Array(new r.Pointer(r.uint16, LigGlyph), 'ligGlyphCount')\n});\n\nlet MarkGlyphSetsDef = new r.Struct({\n markSetTableFormat: r.uint16,\n markSetCount: r.uint16,\n coverage: new r.Array(new r.Pointer(r.uint32, Coverage), 'markSetCount')\n});\n\nexport default new r.VersionedStruct(r.uint32, {\n header: {\n glyphClassDef: new r.Pointer(r.uint16, ClassDef),\n attachList: new r.Pointer(r.uint16, AttachList),\n ligCaretList: new r.Pointer(r.uint16, LigCaretList),\n markAttachClassDef: new r.Pointer(r.uint16, ClassDef)\n },\n\n 0x00010000: {},\n 0x00010002: {\n markGlyphSetsDef: new r.Pointer(r.uint16, MarkGlyphSetsDef)\n },\n 0x00010003: {\n markGlyphSetsDef: new r.Pointer(r.uint16, MarkGlyphSetsDef),\n itemVariationStore: new r.Pointer(r.uint32, ItemVariationStore)\n }\n});\n","import r from 'restructure';\nimport {ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device, Context, ChainingContext} from './opentype';\nimport {FeatureVariations} from './variations';\n\nlet ValueFormat = new r.Bitfield(r.uint16, [\n 'xPlacement', 'yPlacement',\n 'xAdvance', 'yAdvance',\n 'xPlaDevice', 'yPlaDevice',\n 'xAdvDevice', 'yAdvDevice'\n]);\n\nlet types = {\n xPlacement: r.int16,\n yPlacement: r.int16,\n xAdvance: r.int16,\n yAdvance: r.int16,\n xPlaDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: 'rel' }),\n yPlaDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: 'rel' }),\n xAdvDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: 'rel' }),\n yAdvDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: 'rel' })\n};\n\nclass ValueRecord {\n constructor(key = 'valueFormat') {\n this.key = key;\n }\n\n buildStruct(parent) {\n let struct = parent;\n while (!struct[this.key] && struct.parent) {\n struct = struct.parent;\n }\n\n if (!struct[this.key]) return;\n\n let fields = {};\n fields.rel = () => struct._startOffset;\n\n let format = struct[this.key];\n for (let key in format) {\n if (format[key]) {\n fields[key] = types[key];\n }\n }\n\n return new r.Struct(fields);\n }\n\n size(val, ctx) {\n return this.buildStruct(ctx).size(val, ctx);\n }\n\n decode(stream, parent) {\n let res = this.buildStruct(parent).decode(stream, parent);\n delete res.rel;\n return res;\n }\n}\n\nlet PairValueRecord = new r.Struct({\n secondGlyph: r.uint16,\n value1: new ValueRecord('valueFormat1'),\n value2: new ValueRecord('valueFormat2')\n});\n\nlet PairSet = new r.Array(PairValueRecord, r.uint16);\n\nlet Class2Record = new r.Struct({\n value1: new ValueRecord('valueFormat1'),\n value2: new ValueRecord('valueFormat2')\n});\n\nlet Anchor = new r.VersionedStruct(r.uint16, {\n 1: { // Design units only\n xCoordinate: r.int16,\n yCoordinate: r.int16\n },\n\n 2: { // Design units plus contour point\n xCoordinate: r.int16,\n yCoordinate: r.int16,\n anchorPoint: r.uint16\n },\n\n 3: { // Design units plus Device tables\n xCoordinate: r.int16,\n yCoordinate: r.int16,\n xDeviceTable: new r.Pointer(r.uint16, Device),\n yDeviceTable: new r.Pointer(r.uint16, Device)\n }\n});\n\nlet EntryExitRecord = new r.Struct({\n entryAnchor: new r.Pointer(r.uint16, Anchor, {type: 'parent'}),\n exitAnchor: new r.Pointer(r.uint16, Anchor, {type: 'parent'})\n});\n\nlet MarkRecord = new r.Struct({\n class: r.uint16,\n markAnchor: new r.Pointer(r.uint16, Anchor, {type: 'parent'})\n});\n\nlet MarkArray = new r.Array(MarkRecord, r.uint16);\n\nlet BaseRecord = new r.Array(new r.Pointer(r.uint16, Anchor), t => t.parent.classCount);\nlet BaseArray = new r.Array(BaseRecord, r.uint16);\n\nlet ComponentRecord = new r.Array(new r.Pointer(r.uint16, Anchor), t => t.parent.parent.classCount);\nlet LigatureAttach = new r.Array(ComponentRecord, r.uint16);\nlet LigatureArray = new r.Array(new r.Pointer(r.uint16, LigatureAttach), r.uint16);\n\nlet GPOSLookup = new r.VersionedStruct('lookupType', {\n 1: new r.VersionedStruct(r.uint16, { // Single Adjustment\n 1: { // Single positioning value\n coverage: new r.Pointer(r.uint16, Coverage),\n valueFormat: ValueFormat,\n value: new ValueRecord()\n },\n 2: {\n coverage: new r.Pointer(r.uint16, Coverage),\n valueFormat: ValueFormat,\n valueCount: r.uint16,\n values: new r.LazyArray(new ValueRecord(), 'valueCount')\n }\n }),\n\n 2: new r.VersionedStruct(r.uint16, { // Pair Adjustment Positioning\n 1: { // Adjustments for glyph pairs\n coverage: new r.Pointer(r.uint16, Coverage),\n valueFormat1: ValueFormat,\n valueFormat2: ValueFormat,\n pairSetCount: r.uint16,\n pairSets: new r.LazyArray(new r.Pointer(r.uint16, PairSet), 'pairSetCount')\n },\n\n 2: { // Class pair adjustment\n coverage: new r.Pointer(r.uint16, Coverage),\n valueFormat1: ValueFormat,\n valueFormat2: ValueFormat,\n classDef1: new r.Pointer(r.uint16, ClassDef),\n classDef2: new r.Pointer(r.uint16, ClassDef),\n class1Count: r.uint16,\n class2Count: r.uint16,\n classRecords: new r.LazyArray(new r.LazyArray(Class2Record, 'class2Count'), 'class1Count')\n }\n }),\n\n 3: { // Cursive Attachment Positioning\n format: r.uint16,\n coverage: new r.Pointer(r.uint16, Coverage),\n entryExitCount: r.uint16,\n entryExitRecords: new r.Array(EntryExitRecord, 'entryExitCount')\n },\n\n 4: { // MarkToBase Attachment Positioning\n format: r.uint16,\n markCoverage: new r.Pointer(r.uint16, Coverage),\n baseCoverage: new r.Pointer(r.uint16, Coverage),\n classCount: r.uint16,\n markArray: new r.Pointer(r.uint16, MarkArray),\n baseArray: new r.Pointer(r.uint16, BaseArray)\n },\n\n 5: { // MarkToLigature Attachment Positioning\n format: r.uint16,\n markCoverage: new r.Pointer(r.uint16, Coverage),\n ligatureCoverage: new r.Pointer(r.uint16, Coverage),\n classCount: r.uint16,\n markArray: new r.Pointer(r.uint16, MarkArray),\n ligatureArray: new r.Pointer(r.uint16, LigatureArray)\n },\n\n 6: { // MarkToMark Attachment Positioning\n format: r.uint16,\n mark1Coverage: new r.Pointer(r.uint16, Coverage),\n mark2Coverage: new r.Pointer(r.uint16, Coverage),\n classCount: r.uint16,\n mark1Array: new r.Pointer(r.uint16, MarkArray),\n mark2Array: new r.Pointer(r.uint16, BaseArray)\n },\n\n 7: Context, // Contextual positioning\n 8: ChainingContext, // Chaining contextual positioning\n\n 9: { // Extension Positioning\n posFormat: r.uint16,\n lookupType: r.uint16, // cannot also be 9\n extension: new r.Pointer(r.uint32, GPOSLookup)\n }\n});\n\n// Fix circular reference\nGPOSLookup.versions[9].extension.type = GPOSLookup;\n\nexport default new r.VersionedStruct(r.uint32, {\n header: {\n scriptList: new r.Pointer(r.uint16, ScriptList),\n featureList: new r.Pointer(r.uint16, FeatureList),\n lookupList: new r.Pointer(r.uint16, new LookupList(GPOSLookup))\n },\n\n 0x00010000: {},\n 0x00010001: {\n featureVariations: new r.Pointer(r.uint32, FeatureVariations)\n }\n});\n\n// export GPOSLookup for JSTF table\nexport { GPOSLookup };\n","import r from 'restructure';\nimport {ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device, Context, ChainingContext} from './opentype';\nimport {FeatureVariations} from './variations';\n\nlet Sequence = new r.Array(r.uint16, r.uint16);\nlet AlternateSet = Sequence;\n\nlet Ligature = new r.Struct({\n glyph: r.uint16,\n compCount: r.uint16,\n components: new r.Array(r.uint16, t => t.compCount - 1)\n});\n\nlet LigatureSet = new r.Array(new r.Pointer(r.uint16, Ligature), r.uint16);\n\nlet GSUBLookup = new r.VersionedStruct('lookupType', {\n 1: new r.VersionedStruct(r.uint16, {// Single Substitution\n 1: {\n coverage: new r.Pointer(r.uint16, Coverage),\n deltaGlyphID: r.int16\n },\n 2: {\n coverage: new r.Pointer(r.uint16, Coverage),\n glyphCount: r.uint16,\n substitute: new r.LazyArray(r.uint16, 'glyphCount')\n }\n }),\n\n 2: { // Multiple Substitution\n substFormat: r.uint16,\n coverage: new r.Pointer(r.uint16, Coverage),\n count: r.uint16,\n sequences: new r.LazyArray(new r.Pointer(r.uint16, Sequence), 'count')\n },\n\n 3: { // Alternate Substitution\n substFormat: r.uint16,\n coverage: new r.Pointer(r.uint16, Coverage),\n count: r.uint16,\n alternateSet: new r.LazyArray(new r.Pointer(r.uint16, AlternateSet), 'count')\n },\n\n 4: { // Ligature Substitution\n substFormat: r.uint16,\n coverage: new r.Pointer(r.uint16, Coverage),\n count: r.uint16,\n ligatureSets: new r.LazyArray(new r.Pointer(r.uint16, LigatureSet), 'count')\n },\n\n 5: Context, // Contextual Substitution\n 6: ChainingContext, // Chaining Contextual Substitution\n\n 7: { // Extension Substitution\n substFormat: r.uint16,\n lookupType: r.uint16, // cannot also be 7\n extension: new r.Pointer(r.uint32, GSUBLookup)\n },\n\n 8: { // Reverse Chaining Contextual Single Substitution\n substFormat: r.uint16,\n coverage: new r.Pointer(r.uint16, Coverage),\n backtrackCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'backtrackGlyphCount'),\n lookaheadGlyphCount: r.uint16,\n lookaheadCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'lookaheadGlyphCount'),\n glyphCount: r.uint16,\n substitutes: new r.Array(r.uint16, 'glyphCount')\n }\n});\n\n// Fix circular reference\nGSUBLookup.versions[7].extension.type = GSUBLookup;\n\nexport default new r.VersionedStruct(r.uint32, {\n header: {\n scriptList: new r.Pointer(r.uint16, ScriptList),\n featureList: new r.Pointer(r.uint16, FeatureList),\n lookupList: new r.Pointer(r.uint16, new LookupList(GSUBLookup))\n },\n\n 0x00010000: {},\n 0x00010001: {\n featureVariations: new r.Pointer(r.uint32, FeatureVariations)\n }\n});\n","import r from 'restructure';\nimport { ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device } from './opentype';\nimport { GPOSLookup } from './GPOS';\n\nlet JstfGSUBModList = new r.Array(r.uint16, r.uint16);\n\nlet JstfPriority = new r.Struct({\n shrinkageEnableGSUB: new r.Pointer(r.uint16, JstfGSUBModList),\n shrinkageDisableGSUB: new r.Pointer(r.uint16, JstfGSUBModList),\n shrinkageEnableGPOS: new r.Pointer(r.uint16, JstfGSUBModList),\n shrinkageDisableGPOS: new r.Pointer(r.uint16, JstfGSUBModList),\n shrinkageJstfMax: new r.Pointer(r.uint16, new LookupList(GPOSLookup)),\n extensionEnableGSUB: new r.Pointer(r.uint16, JstfGSUBModList),\n extensionDisableGSUB: new r.Pointer(r.uint16, JstfGSUBModList),\n extensionEnableGPOS: new r.Pointer(r.uint16, JstfGSUBModList),\n extensionDisableGPOS: new r.Pointer(r.uint16, JstfGSUBModList),\n extensionJstfMax: new r.Pointer(r.uint16, new LookupList(GPOSLookup))\n});\n\nlet JstfLangSys = new r.Array(new r.Pointer(r.uint16, JstfPriority), r.uint16);\n\nlet JstfLangSysRecord = new r.Struct({\n tag: new r.String(4),\n jstfLangSys: new r.Pointer(r.uint16, JstfLangSys)\n});\n\nlet JstfScript = new r.Struct({\n extenderGlyphs: new r.Pointer(r.uint16, new r.Array(r.uint16, r.uint16)), // array of glyphs to extend line length\n defaultLangSys: new r.Pointer(r.uint16, JstfLangSys),\n langSysCount: r.uint16,\n langSysRecords: new r.Array(JstfLangSysRecord, 'langSysCount')\n});\n\nlet JstfScriptRecord = new r.Struct({\n tag: new r.String(4),\n script: new r.Pointer(r.uint16, JstfScript, {type: 'parent'})\n});\n\nexport default new r.Struct({\n version: r.uint32, // should be 0x00010000\n scriptCount: r.uint16,\n scriptList: new r.Array(JstfScriptRecord, 'scriptCount')\n});\n","import r from 'restructure';\nimport {resolveLength} from 'restructure/src/utils';\nimport {ItemVariationStore} from './variations';\n\n// TODO: add this to restructure\nclass VariableSizeNumber {\n constructor(size) {\n this._size = size;\n }\n\n decode(stream, parent) {\n switch (this.size(0, parent)) {\n case 1: return stream.readUInt8();\n case 2: return stream.readUInt16BE();\n case 3: return stream.readUInt24BE();\n case 4: return stream.readUInt32BE();\n }\n }\n\n size(val, parent) {\n return resolveLength(this._size, null, parent);\n }\n}\n\nlet MapDataEntry = new r.Struct({\n entry: new VariableSizeNumber(t => ((t.parent.entryFormat & 0x0030) >> 4) + 1),\n outerIndex: t => t.entry >> ((t.parent.entryFormat & 0x000F) + 1),\n innerIndex: t => t.entry & ((1 << ((t.parent.entryFormat & 0x000F) + 1)) - 1)\n});\n\nlet DeltaSetIndexMap = new r.Struct({\n entryFormat: r.uint16,\n mapCount: r.uint16,\n mapData: new r.Array(MapDataEntry, 'mapCount')\n});\n\nexport default new r.Struct({\n majorVersion: r.uint16,\n minorVersion: r.uint16,\n itemVariationStore: new r.Pointer(r.uint32, ItemVariationStore),\n advanceWidthMapping: new r.Pointer(r.uint32, DeltaSetIndexMap),\n LSBMapping: new r.Pointer(r.uint32, DeltaSetIndexMap),\n RSBMapping: new r.Pointer(r.uint32, DeltaSetIndexMap)\n});\n","import r from 'restructure';\n\nlet Signature = new r.Struct({\n format: r.uint32,\n length: r.uint32,\n offset: r.uint32\n});\n\nlet SignatureBlock = new r.Struct({\n reserved: new r.Reserved(r.uint16, 2),\n cbSignature: r.uint32, // Length (in bytes) of the PKCS#7 packet in pbSignature\n signature: new r.Buffer('cbSignature')\n});\n\nexport default new r.Struct({\n ulVersion: r.uint32, // Version number of the DSIG table (0x00000001)\n usNumSigs: r.uint16, // Number of signatures in the table\n usFlag: r.uint16, // Permission flags\n signatures: new r.Array(Signature, 'usNumSigs'),\n signatureBlocks: new r.Array(SignatureBlock, 'usNumSigs')\n});\n","import r from 'restructure';\n\nlet GaspRange = new r.Struct({\n rangeMaxPPEM: r.uint16, // Upper limit of range, in ppem\n rangeGaspBehavior: new r.Bitfield(r.uint16, [ // Flags describing desired rasterizer behavior\n 'grayscale', 'gridfit',\n 'symmetricSmoothing', 'symmetricGridfit' // only in version 1, for ClearType\n ])\n});\n\nexport default new r.Struct({\n version: r.uint16, // set to 0\n numRanges: r.uint16,\n gaspRanges: new r.Array(GaspRange, 'numRanges') // Sorted by ppem\n});\n","import r from 'restructure';\n\nlet DeviceRecord = new r.Struct({\n pixelSize: r.uint8,\n maximumWidth: r.uint8,\n widths: new r.Array(r.uint8, t => t.parent.parent.maxp.numGlyphs)\n});\n\n// The Horizontal Device Metrics table stores integer advance widths scaled to particular pixel sizes\nexport default new r.Struct({\n version: r.uint16,\n numRecords: r.int16,\n sizeDeviceRecord: r.int32,\n records: new r.Array(DeviceRecord, 'numRecords')\n});\n","import r from 'restructure';\n\nlet KernPair = new r.Struct({\n left: r.uint16,\n right: r.uint16,\n value: r.int16\n});\n\nlet ClassTable = new r.Struct({\n firstGlyph: r.uint16,\n nGlyphs: r.uint16,\n offsets: new r.Array(r.uint16, 'nGlyphs'),\n max: t => t.offsets.length && Math.max.apply(Math, t.offsets)\n});\n\nlet Kern2Array = new r.Struct({\n off: t => t._startOffset - t.parent.parent._startOffset,\n len: t => (((t.parent.leftTable.max - t.off) / t.parent.rowWidth) + 1) * (t.parent.rowWidth / 2),\n values: new r.LazyArray(r.int16, 'len')\n});\n\nlet KernSubtable = new r.VersionedStruct('format', {\n 0: {\n nPairs: r.uint16,\n searchRange: r.uint16,\n entrySelector: r.uint16,\n rangeShift: r.uint16,\n pairs: new r.Array(KernPair, 'nPairs')\n },\n\n 2: {\n rowWidth: r.uint16,\n leftTable: new r.Pointer(r.uint16, ClassTable, {type: 'parent'}),\n rightTable: new r.Pointer(r.uint16, ClassTable, {type: 'parent'}),\n array: new r.Pointer(r.uint16, Kern2Array, {type: 'parent'})\n },\n\n 3: {\n glyphCount: r.uint16,\n kernValueCount: r.uint8,\n leftClassCount: r.uint8,\n rightClassCount: r.uint8,\n flags: r.uint8,\n kernValue: new r.Array(r.int16, 'kernValueCount'),\n leftClass: new r.Array(r.uint8, 'glyphCount'),\n rightClass: new r.Array(r.uint8, 'glyphCount'),\n kernIndex: new r.Array(r.uint8, t => t.leftClassCount * t.rightClassCount)\n }\n});\n\nlet KernTable = new r.VersionedStruct('version', {\n 0: { // Microsoft uses this format\n subVersion: r.uint16, // Microsoft has an extra sub-table version number\n length: r.uint16, // Length of the subtable, in bytes\n format: r.uint8, // Format of subtable\n coverage: new r.Bitfield(r.uint8, [\n 'horizontal', // 1 if table has horizontal data, 0 if vertical\n 'minimum', // If set to 1, the table has minimum values. If set to 0, the table has kerning values.\n 'crossStream', // If set to 1, kerning is perpendicular to the flow of the text\n 'override' // If set to 1 the value in this table replaces the accumulated value\n ]),\n subtable: KernSubtable,\n padding: new r.Reserved(r.uint8, t => t.length - t._currentOffset)\n },\n 1: { // Apple uses this format\n length: r.uint32,\n coverage: new r.Bitfield(r.uint8, [\n null, null, null, null, null,\n 'variation', // Set if table has variation kerning values\n 'crossStream', // Set if table has cross-stream kerning values\n 'vertical' // Set if table has vertical kerning values\n ]),\n format: r.uint8,\n tupleIndex: r.uint16,\n subtable: KernSubtable,\n padding: new r.Reserved(r.uint8, t => t.length - t._currentOffset)\n }\n});\n\nexport default new r.VersionedStruct(r.uint16, {\n 0: { // Microsoft Version\n nTables: r.uint16,\n tables: new r.Array(KernTable, 'nTables')\n },\n\n 1: { // Apple Version\n reserved: new r.Reserved(r.uint16), // the other half of the version number\n nTables: r.uint32,\n tables: new r.Array(KernTable, 'nTables')\n }\n});\n","import r from 'restructure';\n\n// Linear Threshold table\n// Records the ppem for each glyph at which the scaling becomes linear again,\n// despite instructions effecting the advance width\nexport default new r.Struct({\n version: r.uint16,\n numGlyphs: r.uint16,\n yPels: new r.Array(r.uint8, 'numGlyphs')\n});\n","import r from 'restructure';\n\n// PCL 5 Table\n// NOTE: The PCLT table is strongly discouraged for OpenType fonts with TrueType outlines\nexport default new r.Struct({\n version: r.uint16,\n fontNumber: r.uint32,\n pitch: r.uint16,\n xHeight: r.uint16,\n style: r.uint16,\n typeFamily: r.uint16,\n capHeight: r.uint16,\n symbolSet: r.uint16,\n typeface: new r.String(16),\n characterComplement: new r.String(8),\n fileName: new r.String(6),\n strokeWeight: new r.String(1),\n widthType: new r.String(1),\n serifStyle: r.uint8,\n reserved: new r.Reserved(r.uint8)\n});\n","import r from 'restructure';\n\n// VDMX tables contain ascender/descender overrides for certain (usually small)\n// sizes. This is needed in order to match font metrics on Windows.\n\nlet Ratio = new r.Struct({\n bCharSet: r.uint8, // Character set\n xRatio: r.uint8, // Value to use for x-Ratio\n yStartRatio: r.uint8, // Starting y-Ratio value\n yEndRatio: r.uint8 // Ending y-Ratio value\n});\n\nlet vTable = new r.Struct({\n yPelHeight: r.uint16, // yPelHeight to which values apply\n yMax: r.int16, // Maximum value (in pels) for this yPelHeight\n yMin: r.int16 // Minimum value (in pels) for this yPelHeight\n});\n\nlet VdmxGroup = new r.Struct({\n recs: r.uint16, // Number of height records in this group\n startsz: r.uint8, // Starting yPelHeight\n endsz: r.uint8, // Ending yPelHeight\n entries: new r.Array(vTable, 'recs') // The VDMX records\n});\n\nexport default new r.Struct({\n version: r.uint16, // Version number (0 or 1)\n numRecs: r.uint16, // Number of VDMX groups present\n numRatios: r.uint16, // Number of aspect ratio groupings\n ratioRanges: new r.Array(Ratio, 'numRatios'), // Ratio ranges\n offsets: new r.Array(r.uint16, 'numRatios'), // Offset to the VDMX group for this ratio range\n groups: new r.Array(VdmxGroup, 'numRecs') // The actual VDMX groupings\n});\n","import r from 'restructure';\n\n// Vertical Header Table\nexport default new r.Struct({\n version: r.uint16, // Version number of the Vertical Header Table\n ascent: r.int16, // The vertical typographic ascender for this font\n descent: r.int16, // The vertical typographic descender for this font\n lineGap: r.int16, // The vertical typographic line gap for this font\n advanceHeightMax: r.int16, // The maximum advance height measurement found in the font\n minTopSideBearing: r.int16, // The minimum top side bearing measurement found in the font\n minBottomSideBearing: r.int16, // The minimum bottom side bearing measurement found in the font\n yMaxExtent: r.int16,\n caretSlopeRise: r.int16, // Caret slope (rise/run)\n caretSlopeRun: r.int16,\n caretOffset: r.int16, // Set value equal to 0 for nonslanted fonts\n reserved: new r.Reserved(r.int16, 4),\n metricDataFormat: r.int16, // Set to 0\n numberOfMetrics: r.uint16 // Number of advance heights in the Vertical Metrics table\n});\n","import r from 'restructure';\n\nlet VmtxEntry = new r.Struct({\n advance: r.uint16, // The advance height of the glyph\n bearing: r.int16 // The top sidebearing of the glyph\n});\n\n// Vertical Metrics Table\nexport default new r.Struct({\n metrics: new r.LazyArray(VmtxEntry, t => t.parent.vhea.numberOfMetrics),\n bearings: new r.LazyArray(r.int16, t => t.parent.maxp.numGlyphs - t.parent.vhea.numberOfMetrics)\n});\n","import r from 'restructure';\n\nlet shortFrac = new r.Fixed(16, 'BE', 14);\n\nlet Correspondence = new r.Struct({\n fromCoord: shortFrac,\n toCoord: shortFrac\n});\n\nlet Segment = new r.Struct({\n pairCount: r.uint16,\n correspondence: new r.Array(Correspondence, 'pairCount')\n});\n\nexport default new r.Struct({\n version: r.fixed32,\n axisCount: r.uint32,\n segment: new r.Array(Segment, 'axisCount')\n});\n","import r from 'restructure';\n\nclass UnboundedArrayAccessor {\n constructor(type, stream, parent) {\n this.type = type;\n this.stream = stream;\n this.parent = parent;\n this.base = this.stream.pos;\n this._items = [];\n }\n\n getItem(index) {\n if (this._items[index] == null) {\n let pos = this.stream.pos;\n this.stream.pos = this.base + this.type.size(null, this.parent) * index;\n this._items[index] = this.type.decode(this.stream, this.parent);\n this.stream.pos = pos;\n }\n\n return this._items[index];\n }\n\n inspect() {\n return `[UnboundedArray ${this.type.constructor.name}]`;\n }\n}\n\nexport class UnboundedArray extends r.Array {\n constructor(type) {\n super(type, 0);\n }\n\n decode(stream, parent) {\n return new UnboundedArrayAccessor(this.type, stream, parent);\n }\n}\n\nexport let LookupTable = function(ValueType = r.uint16) {\n // Helper class that makes internal structures invisible to pointers\n class Shadow {\n constructor(type) {\n this.type = type;\n }\n\n decode(stream, ctx) {\n ctx = ctx.parent.parent;\n return this.type.decode(stream, ctx);\n }\n\n size(val, ctx) {\n ctx = ctx.parent.parent;\n return this.type.size(val, ctx);\n }\n\n encode(stream, val, ctx) {\n ctx = ctx.parent.parent;\n return this.type.encode(stream, val, ctx);\n }\n }\n\n ValueType = new Shadow(ValueType);\n\n let BinarySearchHeader = new r.Struct({\n unitSize: r.uint16,\n nUnits: r.uint16,\n searchRange: r.uint16,\n entrySelector: r.uint16,\n rangeShift: r.uint16\n });\n\n let LookupSegmentSingle = new r.Struct({\n lastGlyph: r.uint16,\n firstGlyph: r.uint16,\n value: ValueType\n });\n\n let LookupSegmentArray = new r.Struct({\n lastGlyph: r.uint16,\n firstGlyph: r.uint16,\n values: new r.Pointer(r.uint16, new r.Array(ValueType, t => t.lastGlyph - t.firstGlyph + 1), {type: 'parent'})\n });\n\n let LookupSingle = new r.Struct({\n glyph: r.uint16,\n value: ValueType\n });\n\n return new r.VersionedStruct(r.uint16, {\n 0: {\n values: new UnboundedArray(ValueType) // length == number of glyphs maybe?\n },\n 2: {\n binarySearchHeader: BinarySearchHeader,\n segments: new r.Array(LookupSegmentSingle, t => t.binarySearchHeader.nUnits)\n },\n 4: {\n binarySearchHeader: BinarySearchHeader,\n segments: new r.Array(LookupSegmentArray, t => t.binarySearchHeader.nUnits)\n },\n 6: {\n binarySearchHeader: BinarySearchHeader,\n segments: new r.Array(LookupSingle, t => t.binarySearchHeader.nUnits)\n },\n 8: {\n firstGlyph: r.uint16,\n count: r.uint16,\n values: new r.Array(ValueType, 'count')\n }\n });\n};\n\nexport function StateTable(entryData = {}, lookupType = r.uint16) {\n let entry = Object.assign({\n newState: r.uint16,\n flags: r.uint16\n }, entryData);\n\n let Entry = new r.Struct(entry);\n let StateArray = new UnboundedArray(new r.Array(r.uint16, t => t.nClasses));\n\n let StateHeader = new r.Struct({\n nClasses: r.uint32,\n classTable: new r.Pointer(r.uint32, new LookupTable(lookupType)),\n stateArray: new r.Pointer(r.uint32, StateArray),\n entryTable: new r.Pointer(r.uint32, new UnboundedArray(Entry))\n });\n\n return StateHeader;\n}\n\n// This is the old version of the StateTable structure\nexport function StateTable1(entryData = {}, lookupType = r.uint16) {\n let ClassLookupTable = new r.Struct({\n version() { return 8; }, // simulate LookupTable\n firstGlyph: r.uint16,\n values: new r.Array(r.uint8, r.uint16)\n });\n\n let entry = Object.assign({\n newStateOffset: r.uint16,\n // convert offset to stateArray index\n newState: t => (t.newStateOffset - (t.parent.stateArray.base - t.parent._startOffset)) / t.parent.nClasses,\n flags: r.uint16\n }, entryData);\n\n let Entry = new r.Struct(entry);\n let StateArray = new UnboundedArray(new r.Array(r.uint8, t => t.nClasses));\n\n let StateHeader1 = new r.Struct({\n nClasses: r.uint16,\n classTable: new r.Pointer(r.uint16, ClassLookupTable),\n stateArray: new r.Pointer(r.uint16, StateArray),\n entryTable: new r.Pointer(r.uint16, new UnboundedArray(Entry))\n });\n\n return StateHeader1;\n}\n","import r from 'restructure';\nimport { LookupTable } from './aat';\n\nlet BslnSubtable = new r.VersionedStruct('format', {\n 0: { // Distance-based, no mapping\n deltas: new r.Array(r.int16, 32)\n },\n\n 1: { // Distance-based, with mapping\n deltas: new r.Array(r.int16, 32),\n mappingData: new LookupTable(r.uint16)\n },\n\n 2: { // Control point-based, no mapping\n standardGlyph: r.uint16,\n controlPoints: new r.Array(r.uint16, 32)\n },\n\n 3: { // Control point-based, with mapping\n standardGlyph: r.uint16,\n controlPoints: new r.Array(r.uint16, 32),\n mappingData: new LookupTable(r.uint16)\n }\n});\n\nexport default new r.Struct({\n version: r.fixed32,\n format: r.uint16,\n defaultBaseline: r.uint16,\n subtable: BslnSubtable\n});\n","import r from 'restructure';\n\nlet Setting = new r.Struct({\n setting: r.uint16,\n nameIndex: r.int16,\n name: t => t.parent.parent.parent.name.records.fontFeatures[t.nameIndex]\n});\n\nlet FeatureName = new r.Struct({\n feature: r.uint16,\n nSettings: r.uint16,\n settingTable: new r.Pointer(r.uint32, new r.Array(Setting, 'nSettings'), { type: 'parent' }),\n featureFlags: new r.Bitfield(r.uint8, [\n null, null, null, null, null, null,\n 'hasDefault', 'exclusive'\n ]),\n defaultSetting: r.uint8,\n nameIndex: r.int16,\n name: t => t.parent.parent.name.records.fontFeatures[t.nameIndex]\n});\n\nexport default new r.Struct({\n version: r.fixed32,\n featureNameCount: r.uint16,\n reserved1: new r.Reserved(r.uint16),\n reserved2: new r.Reserved(r.uint32),\n featureNames: new r.Array(FeatureName, 'featureNameCount')\n});\n","import r from 'restructure';\n\nlet Axis = new r.Struct({\n axisTag: new r.String(4),\n minValue: r.fixed32,\n defaultValue: r.fixed32,\n maxValue: r.fixed32,\n flags: r.uint16,\n nameID: r.uint16,\n name: t => t.parent.parent.name.records.fontFeatures[t.nameID]\n});\n\nlet Instance = new r.Struct({\n nameID: r.uint16,\n name: t => t.parent.parent.name.records.fontFeatures[t.nameID],\n flags: r.uint16,\n coord: new r.Array(r.fixed32, t => t.parent.axisCount)\n});\n\nexport default new r.Struct({\n version: r.fixed32,\n offsetToData: r.uint16,\n countSizePairs: r.uint16,\n axisCount: r.uint16,\n axisSize: r.uint16,\n instanceCount: r.uint16,\n instanceSize: r.uint16,\n axis: new r.Array(Axis, 'axisCount'),\n instance: new r.Array(Instance, 'instanceCount')\n});\n","import r from 'restructure';\n\nlet shortFrac = new r.Fixed(16, 'BE', 14);\nclass Offset {\n static decode(stream, parent) {\n // In short format, offsets are multiplied by 2.\n // This doesn't seem to be documented by Apple, but it\n // is implemented this way in Freetype.\n return parent.flags \n ? stream.readUInt32BE()\n : stream.readUInt16BE() * 2;\n }\n}\n\nlet gvar = new r.Struct({\n version: r.uint16,\n reserved: new r.Reserved(r.uint16),\n axisCount: r.uint16,\n globalCoordCount: r.uint16,\n globalCoords: new r.Pointer(r.uint32, new r.Array(new r.Array(shortFrac, 'axisCount'), 'globalCoordCount')),\n glyphCount: r.uint16,\n flags: r.uint16,\n offsetToData: r.uint32,\n offsets: new r.Array(new r.Pointer(Offset, 'void', { relativeTo: 'offsetToData', allowNull: false }), t => t.glyphCount + 1)\n});\n\nexport default gvar;\n","import r from 'restructure';\nimport { LookupTable, StateTable1 } from './aat';\n\nlet ClassTable = new r.Struct({\n length: r.uint16,\n coverage: r.uint16,\n subFeatureFlags: r.uint32,\n stateTable: new StateTable1\n});\n\nlet WidthDeltaRecord = new r.Struct({\n justClass: r.uint32,\n beforeGrowLimit: r.fixed32,\n beforeShrinkLimit: r.fixed32,\n afterGrowLimit: r.fixed32,\n afterShrinkLimit: r.fixed32,\n growFlags: r.uint16,\n shrinkFlags: r.uint16\n});\n\nlet WidthDeltaCluster = new r.Array(WidthDeltaRecord, r.uint32);\n\nlet ActionData = new r.VersionedStruct('actionType', {\n 0: { // Decomposition action\n lowerLimit: r.fixed32,\n upperLimit: r.fixed32,\n order: r.uint16,\n glyphs: new r.Array(r.uint16, r.uint16)\n },\n\n 1: { // Unconditional add glyph action\n addGlyph: r.uint16\n },\n\n 2: { // Conditional add glyph action\n substThreshold: r.fixed32,\n addGlyph: r.uint16,\n substGlyph: r.uint16\n },\n\n 3: {}, // Stretch glyph action (no data, not supported by CoreText)\n\n 4: { // Ductile glyph action (not supported by CoreText)\n variationAxis: r.uint32,\n minimumLimit: r.fixed32,\n noStretchValue: r.fixed32,\n maximumLimit: r.fixed32\n },\n\n 5: { // Repeated add glyph action\n flags: r.uint16,\n glyph: r.uint16\n }\n});\n\nlet Action = new r.Struct({\n actionClass: r.uint16,\n actionType: r.uint16,\n actionLength: r.uint32,\n actionData: ActionData,\n padding: new r.Reserved(r.uint8, t => t.actionLength - t._currentOffset)\n});\n\nlet PostcompensationAction = new r.Array(Action, r.uint32);\nlet PostCompensationTable = new r.Struct({\n lookupTable: new LookupTable(new r.Pointer(r.uint16, PostcompensationAction))\n});\n\nlet JustificationTable = new r.Struct({\n classTable: new r.Pointer(r.uint16, ClassTable, { type: 'parent' }),\n wdcOffset: r.uint16,\n postCompensationTable: new r.Pointer(r.uint16, PostCompensationTable, { type: 'parent' }),\n widthDeltaClusters: new LookupTable(new r.Pointer(r.uint16, WidthDeltaCluster, { type: 'parent', relativeTo: 'wdcOffset' }))\n});\n\nexport default new r.Struct({\n version: r.uint32,\n format: r.uint16,\n horizontal: new r.Pointer(r.uint16, JustificationTable),\n vertical: new r.Pointer(r.uint16, JustificationTable)\n});\n","import r from 'restructure';\nimport { UnboundedArray, LookupTable, StateTable } from './aat';\n\nlet LigatureData = {\n action: r.uint16\n};\n\nlet ContextualData = {\n markIndex: r.uint16,\n currentIndex: r.uint16\n};\n\nlet InsertionData = {\n currentInsertIndex: r.uint16,\n markedInsertIndex: r.uint16\n};\n\nlet SubstitutionTable = new r.Struct({\n items: new UnboundedArray(new r.Pointer(r.uint32, new LookupTable))\n});\n\nlet SubtableData = new r.VersionedStruct('type', {\n 0: { // Indic Rearrangement Subtable\n stateTable: new StateTable\n },\n\n 1: { // Contextual Glyph Substitution Subtable\n stateTable: new StateTable(ContextualData),\n substitutionTable: new r.Pointer(r.uint32, SubstitutionTable)\n },\n\n 2: { // Ligature subtable\n stateTable: new StateTable(LigatureData),\n ligatureActions: new r.Pointer(r.uint32, new UnboundedArray(r.uint32)),\n components: new r.Pointer(r.uint32, new UnboundedArray(r.uint16)),\n ligatureList: new r.Pointer(r.uint32, new UnboundedArray(r.uint16))\n },\n\n 4: { // Non-contextual Glyph Substitution Subtable\n lookupTable: new LookupTable\n },\n\n 5: { // Glyph Insertion Subtable\n stateTable: new StateTable(InsertionData),\n insertionActions: new r.Pointer(r.uint32, new UnboundedArray(r.uint16))\n }\n});\n\nlet Subtable = new r.Struct({\n length: r.uint32,\n coverage: r.uint24,\n type: r.uint8,\n subFeatureFlags: r.uint32,\n table: SubtableData,\n padding: new r.Reserved(r.uint8, t => t.length - t._currentOffset)\n});\n\nlet FeatureEntry = new r.Struct({\n featureType: r.uint16,\n featureSetting: r.uint16,\n enableFlags: r.uint32,\n disableFlags: r.uint32\n});\n\nlet MorxChain = new r.Struct({\n defaultFlags: r.uint32,\n chainLength: r.uint32,\n nFeatureEntries: r.uint32,\n nSubtables: r.uint32,\n features: new r.Array(FeatureEntry, 'nFeatureEntries'),\n subtables: new r.Array(Subtable, 'nSubtables')\n});\n\nexport default new r.Struct({\n version: r.uint16,\n unused: new r.Reserved(r.uint16),\n nChains: r.uint32,\n chains: new r.Array(MorxChain, 'nChains')\n});\n","import r from 'restructure';\nimport { LookupTable } from './aat';\n\nlet OpticalBounds = new r.Struct({\n left: r.int16,\n top: r.int16,\n right: r.int16,\n bottom: r.int16\n});\n\nexport default new r.Struct({\n version: r.fixed32,\n format: r.uint16,\n lookupTable: new LookupTable(OpticalBounds)\n});\n","let tables = {};\nexport default tables;\n\n// Required Tables\nimport cmap from './cmap';\nimport head from './head';\nimport hhea from './hhea';\nimport hmtx from './hmtx';\nimport maxp from './maxp';\nimport name from './name';\nimport OS2 from './OS2';\nimport post from './post';\n\ntables.cmap = cmap;\ntables.head = head;\ntables.hhea = hhea;\ntables.hmtx = hmtx;\ntables.maxp = maxp;\ntables.name = name;\ntables['OS/2'] = OS2;\ntables.post = post;\n\n\n// TrueType Outlines\nimport cvt from './cvt';\nimport fpgm from './fpgm';\nimport loca from './loca';\nimport prep from './prep';\nimport glyf from './glyf';\n\ntables.fpgm = fpgm;\ntables.loca = loca;\ntables.prep = prep;\ntables['cvt '] = cvt;\ntables.glyf = glyf;\n\n\n// PostScript Outlines\nimport CFFFont from '../cff/CFFFont';\nimport VORG from './VORG';\n\ntables['CFF '] = CFFFont;\ntables['CFF2'] = CFFFont;\ntables.VORG = VORG;\n\n\n// Bitmap Glyphs\nimport EBLC from './EBLC';\nimport sbix from './sbix';\nimport COLR from './COLR';\nimport CPAL from './CPAL';\n\ntables.EBLC = EBLC;\ntables.CBLC = tables.EBLC;\ntables.sbix = sbix;\ntables.COLR = COLR;\ntables.CPAL = CPAL;\n\n\n// Advanced OpenType Tables\nimport BASE from './BASE';\nimport GDEF from './GDEF';\nimport GPOS from './GPOS';\nimport GSUB from './GSUB';\nimport JSTF from './JSTF';\n\ntables.BASE = BASE;\ntables.GDEF = GDEF;\ntables.GPOS = GPOS;\ntables.GSUB = GSUB;\ntables.JSTF = JSTF;\n\n// OpenType variations tables\nimport HVAR from './HVAR';\n\ntables.HVAR = HVAR;\n\n// Other OpenType Tables\nimport DSIG from './DSIG';\nimport gasp from './gasp';\nimport hdmx from './hdmx';\nimport kern from './kern';\nimport LTSH from './LTSH';\nimport PCLT from './PCLT';\nimport VDMX from './VDMX';\nimport vhea from './vhea';\nimport vmtx from './vmtx';\n\ntables.DSIG = DSIG;\ntables.gasp = gasp;\ntables.hdmx = hdmx;\ntables.kern = kern;\ntables.LTSH = LTSH;\ntables.PCLT = PCLT;\ntables.VDMX = VDMX;\ntables.vhea = vhea;\ntables.vmtx = vmtx;\n\n\n// Apple Advanced Typography Tables\nimport avar from './avar';\nimport bsln from './bsln';\nimport feat from './feat';\nimport fvar from './fvar';\nimport gvar from './gvar';\nimport just from './just';\nimport morx from './morx';\nimport opbd from './opbd';\n\ntables.avar = avar;\ntables.bsln = bsln;\ntables.feat = feat;\ntables.fvar = fvar;\ntables.gvar = gvar;\ntables.just = just;\ntables.morx = morx;\ntables.opbd = opbd;\n","import r from 'restructure';\nimport Tables from './';\n\nlet TableEntry = new r.Struct({\n tag: new r.String(4),\n checkSum: r.uint32,\n offset: new r.Pointer(r.uint32, 'void', { type: 'global' }),\n length: r.uint32\n});\n\nlet Directory = new r.Struct({\n tag: new r.String(4),\n numTables: r.uint16,\n searchRange: r.uint16,\n entrySelector: r.uint16,\n rangeShift: r.uint16,\n tables: new r.Array(TableEntry, 'numTables')\n});\n\nDirectory.process = function() {\n let tables = {};\n for (let table of this.tables) {\n tables[table.tag] = table;\n }\n\n this.tables = tables;\n};\n\nDirectory.preEncode = function(stream) {\n let tables = [];\n for (let tag in this.tables) {\n let table = this.tables[tag];\n if (table) {\n tables.push({\n tag: tag,\n checkSum: 0,\n offset: new r.VoidPointer(Tables[tag], table),\n length: Tables[tag].size(table)\n });\n }\n }\n\n this.tag = 'true';\n this.numTables = tables.length;\n this.tables = tables;\n\n this.searchRange = Math.floor(Math.log(this.numTables) / Math.LN2) * 16;\n this.entrySelector = Math.floor(this.searchRange / Math.LN2);\n this.rangeShift = this.numTables * 16 - this.searchRange;\n};\n\nexport default Directory;\n","export function binarySearch(arr, cmp) {\n let min = 0;\n let max = arr.length - 1;\n while (min <= max) {\n let mid = (min + max) >> 1;\n let res = cmp(arr[mid]);\n\n if (res < 0) {\n max = mid - 1;\n } else if (res > 0) {\n min = mid + 1;\n } else {\n return mid;\n }\n }\n\n return -1;\n}\n\nexport function range(index, end) {\n let range = [];\n while (index < end) {\n range.push(index++);\n }\n return range;\n}\n","import {binarySearch} from './utils';\nimport {getEncoding} from './encodings';\nimport {cache} from './decorators';\nimport {range} from './utils';\n\n// iconv-lite is an optional dependency.\ntry {\n var iconv = require('iconv-lite');\n} catch (err) {}\n\nexport default class CmapProcessor {\n constructor(cmapTable) {\n // Attempt to find a Unicode cmap first\n this.encoding = null;\n this.cmap = this.findSubtable(cmapTable, [\n // 32-bit subtables\n [3, 10],\n [0, 6],\n [0, 4],\n\n // 16-bit subtables\n [3, 1],\n [0, 3],\n [0, 2],\n [0, 1],\n [0, 0]\n ]);\n\n // If not unicode cmap was found, and iconv-lite is installed,\n // take the first table with a supported encoding.\n if (!this.cmap && iconv) {\n for (let cmap of cmapTable.tables) {\n let encoding = getEncoding(cmap.platformID, cmap.encodingID, cmap.table.language - 1);\n if (iconv.encodingExists(encoding)) {\n this.cmap = cmap.table;\n this.encoding = encoding;\n }\n }\n }\n\n if (!this.cmap) {\n throw new Error(\"Could not find a supported cmap table\");\n }\n\n this.uvs = this.findSubtable(cmapTable, [[0, 5]]);\n if (this.uvs && this.uvs.version !== 14) {\n this.uvs = null;\n }\n }\n\n findSubtable(cmapTable, pairs) {\n for (let [platformID, encodingID] of pairs) {\n for (let cmap of cmapTable.tables) {\n if (cmap.platformID === platformID && cmap.encodingID === encodingID) {\n return cmap.table;\n }\n }\n }\n\n return null;\n }\n\n lookup(codepoint, variationSelector) {\n // If there is no Unicode cmap in this font, we need to re-encode\n // the codepoint in the encoding that the cmap supports.\n if (this.encoding) {\n let buf = iconv.encode(String.fromCodePoint(codepoint), this.encoding);\n codepoint = 0;\n for (let i = 0; i < buf.length; i++) {\n codepoint = (codepoint << 8) | buf[i];\n }\n\n // Otherwise, try to get a Unicode variation selector for this codepoint if one is provided.\n } else if (variationSelector) {\n let gid = this.getVariationSelector(codepoint, variationSelector);\n if (gid) {\n return gid;\n }\n }\n\n let cmap = this.cmap;\n switch (cmap.version) {\n case 0:\n return cmap.codeMap.get(codepoint) || 0;\n\n case 4: {\n let min = 0;\n let max = cmap.segCount - 1;\n while (min <= max) {\n let mid = (min + max) >> 1;\n\n if (codepoint < cmap.startCode.get(mid)) {\n max = mid - 1;\n } else if (codepoint > cmap.endCode.get(mid)) {\n min = mid + 1;\n } else {\n let rangeOffset = cmap.idRangeOffset.get(mid);\n let gid;\n\n if (rangeOffset === 0) {\n gid = codepoint + cmap.idDelta.get(mid);\n } else {\n let index = rangeOffset / 2 + (codepoint - cmap.startCode.get(mid)) - (cmap.segCount - mid);\n gid = cmap.glyphIndexArray.get(index) || 0;\n if (gid !== 0) {\n gid += cmap.idDelta.get(mid);\n }\n }\n\n return gid & 0xffff;\n }\n }\n\n return 0;\n }\n\n case 8:\n throw new Error('TODO: cmap format 8');\n\n case 6:\n case 10:\n return cmap.glyphIndices.get(codepoint - cmap.firstCode) || 0;\n\n case 12:\n case 13: {\n let min = 0;\n let max = cmap.nGroups - 1;\n while (min <= max) {\n let mid = (min + max) >> 1;\n let group = cmap.groups.get(mid);\n\n if (codepoint < group.startCharCode) {\n max = mid - 1;\n } else if (codepoint > group.endCharCode) {\n min = mid + 1;\n } else {\n if (cmap.version === 12) {\n return group.glyphID + (codepoint - group.startCharCode);\n } else {\n return group.glyphID;\n }\n }\n }\n\n return 0;\n }\n\n case 14:\n throw new Error('TODO: cmap format 14');\n\n default:\n throw new Error(`Unknown cmap format ${cmap.version}`);\n }\n }\n\n getVariationSelector(codepoint, variationSelector) {\n if (!this.uvs) {\n return 0;\n }\n\n let selectors = this.uvs.varSelectors.toArray();\n let i = binarySearch(selectors, x => variationSelector - x.varSelector);\n let sel = selectors[i];\n\n if (i !== -1 && sel.defaultUVS) {\n i = binarySearch(sel.defaultUVS, x =>\n codepoint < x.startUnicodeValue ? -1 : codepoint > x.startUnicodeValue + x.additionalCount ? +1 : 0\n );\n }\n\n if (i !== -1 && sel.nonDefaultUVS) {\n i = binarySearch(sel.nonDefaultUVS, x => codepoint - x.unicodeValue);\n if (i !== -1) {\n return sel.nonDefaultUVS[i].glyphID;\n }\n }\n\n return 0;\n }\n\n @cache\n getCharacterSet() {\n let cmap = this.cmap;\n switch (cmap.version) {\n case 0:\n return range(0, cmap.codeMap.length);\n\n case 4: {\n let res = [];\n let endCodes = cmap.endCode.toArray();\n for (let i = 0; i < endCodes.length; i++) {\n let tail = endCodes[i] + 1;\n let start = cmap.startCode.get(i);\n res.push(...range(start, tail));\n }\n\n return res;\n }\n\n case 8:\n throw new Error('TODO: cmap format 8');\n\n case 6:\n case 10:\n return range(cmap.firstCode, cmap.firstCode + cmap.glyphIndices.length);\n\n case 12:\n case 13: {\n let res = [];\n for (let group of cmap.groups.toArray()) {\n res.push(...range(group.startCharCode, group.endCharCode + 1));\n }\n\n return res;\n }\n\n case 14:\n throw new Error('TODO: cmap format 14');\n\n default:\n throw new Error(`Unknown cmap format ${cmap.version}`);\n }\n }\n\n @cache\n codePointsForGlyph(gid) {\n let cmap = this.cmap;\n switch (cmap.version) {\n case 0: {\n let res = [];\n for (let i = 0; i < 256; i++) {\n if (cmap.codeMap.get(i) === gid) {\n res.push(i);\n }\n }\n\n return res;\n }\n\n case 4: {\n let res = [];\n for (let i = 0; i < cmap.segCount; i++) {\n let end = cmap.endCode.get(i);\n let start = cmap.startCode.get(i);\n let rangeOffset = cmap.idRangeOffset.get(i);\n let delta = cmap.idDelta.get(i);\n\n for (var c = start; c <= end; c++) {\n let g = 0;\n if (rangeOffset === 0) {\n g = c + delta;\n } else {\n let index = rangeOffset / 2 + (c - start) - (cmap.segCount - i);\n g = cmap.glyphIndexArray.get(index) || 0;\n if (g !== 0) {\n g += delta;\n }\n }\n\n if (g === gid) {\n res.push(c);\n }\n }\n }\n\n return res;\n }\n\n case 12: {\n let res = [];\n for (let group of cmap.groups.toArray()) {\n if (gid >= group.glyphID && gid <= group.glyphID + (group.endCharCode - group.startCharCode)) {\n res.push(group.startCharCode + (gid - group.glyphID));\n }\n }\n\n return res;\n }\n\n case 13: {\n let res = [];\n for (let group of cmap.groups.toArray()) {\n if (gid === group.glyphID) {\n res.push(...range(group.startCharCode, group.endCharCode + 1));\n }\n }\n\n return res;\n }\n\n default:\n throw new Error(`Unknown cmap format ${cmap.version}`);\n }\n }\n}\n","import {binarySearch} from '../utils';\n\nexport default class KernProcessor {\n constructor(font) {\n this.kern = font.kern;\n }\n\n process(glyphs, positions) {\n for (let glyphIndex = 0; glyphIndex < glyphs.length - 1; glyphIndex++) {\n let left = glyphs[glyphIndex].id;\n let right = glyphs[glyphIndex + 1].id;\n positions[glyphIndex].xAdvance += this.getKerning(left, right);\n }\n }\n\n getKerning(left, right) {\n let res = 0;\n\n for (let table of this.kern.tables) {\n if (table.coverage.crossStream) {\n continue;\n }\n\n switch (table.version) {\n case 0:\n if (!table.coverage.horizontal) {\n continue;\n }\n\n break;\n case 1:\n if (table.coverage.vertical || table.coverage.variation) {\n continue;\n }\n\n break;\n default:\n throw new Error(`Unsupported kerning table version ${table.version}`);\n }\n\n let val = 0;\n let s = table.subtable;\n switch (table.format) {\n case 0:\n let pairIdx = binarySearch(s.pairs, function (pair) {\n return (left - pair.left) || (right - pair.right);\n });\n\n if (pairIdx >= 0) {\n val = s.pairs[pairIdx].value;\n }\n\n break;\n\n case 2:\n let leftOffset = 0, rightOffset = 0;\n if (left >= s.leftTable.firstGlyph && left < s.leftTable.firstGlyph + s.leftTable.nGlyphs) {\n leftOffset = s.leftTable.offsets[left - s.leftTable.firstGlyph];\n } else {\n leftOffset = s.array.off;\n }\n\n if (right >= s.rightTable.firstGlyph && right < s.rightTable.firstGlyph + s.rightTable.nGlyphs) {\n rightOffset = s.rightTable.offsets[right - s.rightTable.firstGlyph];\n }\n\n let index = (leftOffset + rightOffset - s.array.off) / 2;\n val = s.array.values.get(index);\n break;\n\n case 3:\n if (left >= s.glyphCount || right >= s.glyphCount) {\n return 0;\n }\n\n val = s.kernValue[s.kernIndex[s.leftClass[left] * s.rightClassCount + s.rightClass[right]]];\n break;\n\n default:\n throw new Error(`Unsupported kerning sub-table format ${table.format}`);\n }\n\n // Microsoft supports the override flag, which resets the result\n // Otherwise, the sum of the results from all subtables is returned\n if (table.coverage.override) {\n res = val;\n } else {\n res += val;\n }\n }\n\n return res;\n }\n}\n","import unicode from 'unicode-properties';\n\n/**\n * This class is used when GPOS does not define 'mark' or 'mkmk' features\n * for positioning marks relative to base glyphs. It uses the unicode\n * combining class property to position marks.\n *\n * Based on code from Harfbuzz, thanks!\n * https://github.com/behdad/harfbuzz/blob/master/src/hb-ot-shape-fallback.cc\n */\nexport default class UnicodeLayoutEngine {\n constructor(font) {\n this.font = font;\n }\n\n positionGlyphs(glyphs, positions) {\n // find each base + mark cluster, and position the marks relative to the base\n let clusterStart = 0;\n let clusterEnd = 0;\n for (let index = 0; index < glyphs.length; index++) {\n let glyph = glyphs[index];\n if (glyph.isMark) { // TODO: handle ligatures\n clusterEnd = index;\n } else {\n if (clusterStart !== clusterEnd) {\n this.positionCluster(glyphs, positions, clusterStart, clusterEnd);\n }\n\n clusterStart = clusterEnd = index;\n }\n }\n\n if (clusterStart !== clusterEnd) {\n this.positionCluster(glyphs, positions, clusterStart, clusterEnd);\n }\n\n return positions;\n }\n\n positionCluster(glyphs, positions, clusterStart, clusterEnd) {\n let base = glyphs[clusterStart];\n let baseBox = base.cbox.copy();\n\n // adjust bounding box for ligature glyphs\n if (base.codePoints.length > 1) {\n // LTR. TODO: RTL support.\n baseBox.minX += ((base.codePoints.length - 1) * baseBox.width) / base.codePoints.length;\n }\n\n let xOffset = -positions[clusterStart].xAdvance;\n let yOffset = 0;\n let yGap = this.font.unitsPerEm / 16;\n\n // position each of the mark glyphs relative to the base glyph\n for (let index = clusterStart + 1; index <= clusterEnd; index++) {\n let mark = glyphs[index];\n let markBox = mark.cbox;\n let position = positions[index];\n\n let combiningClass = this.getCombiningClass(mark.codePoints[0]);\n\n if (combiningClass !== 'Not_Reordered') {\n position.xOffset = position.yOffset = 0;\n\n // x positioning\n switch (combiningClass) {\n case 'Double_Above':\n case 'Double_Below':\n // LTR. TODO: RTL support.\n position.xOffset += baseBox.minX - markBox.width / 2 - markBox.minX;\n break;\n\n case 'Attached_Below_Left':\n case 'Below_Left':\n case 'Above_Left':\n // left align\n position.xOffset += baseBox.minX - markBox.minX;\n break;\n\n case 'Attached_Above_Right':\n case 'Below_Right':\n case 'Above_Right':\n // right align\n position.xOffset += baseBox.maxX - markBox.width - markBox.minX;\n break;\n\n default: // Attached_Below, Attached_Above, Below, Above, other\n // center align\n position.xOffset += baseBox.minX + (baseBox.width - markBox.width) / 2 - markBox.minX;\n }\n\n // y positioning\n switch (combiningClass) {\n case 'Double_Below':\n case 'Below_Left':\n case 'Below':\n case 'Below_Right':\n case 'Attached_Below_Left':\n case 'Attached_Below':\n // add a small gap between the glyphs if they are not attached\n if (combiningClass === 'Attached_Below_Left' || combiningClass === 'Attached_Below') {\n baseBox.minY += yGap;\n }\n\n position.yOffset = -baseBox.minY - markBox.maxY;\n baseBox.minY += markBox.height;\n break;\n\n case 'Double_Above':\n case 'Above_Left':\n case 'Above':\n case 'Above_Right':\n case 'Attached_Above':\n case 'Attached_Above_Right':\n // add a small gap between the glyphs if they are not attached\n if (combiningClass === 'Attached_Above' || combiningClass === 'Attached_Above_Right') {\n baseBox.maxY += yGap;\n }\n\n position.yOffset = baseBox.maxY - markBox.minY;\n baseBox.maxY += markBox.height;\n break;\n }\n\n position.xAdvance = position.yAdvance = 0;\n position.xOffset += xOffset;\n position.yOffset += yOffset;\n\n } else {\n xOffset -= position.xAdvance;\n yOffset -= position.yAdvance;\n }\n }\n\n return;\n }\n\n getCombiningClass(codePoint) {\n let combiningClass = unicode.getCombiningClass(codePoint);\n\n // Thai / Lao need some per-character work\n if ((codePoint & ~0xff) === 0x0e00) {\n if (combiningClass === 'Not_Reordered') {\n switch (codePoint) {\n case 0x0e31:\n case 0x0e34:\n case 0x0e35:\n case 0x0e36:\n case 0x0e37:\n case 0x0e47:\n case 0x0e4c:\n case 0x0e3d:\n case 0x0e4e:\n return 'Above_Right';\n\n case 0x0eb1:\n case 0x0eb4:\n case 0x0eb5:\n case 0x0eb6:\n case 0x0eb7:\n case 0x0ebb:\n case 0x0ecc:\n case 0x0ecd:\n return 'Above';\n\n case 0x0ebc:\n return 'Below';\n }\n } else if (codePoint === 0x0e3a) { // virama\n return 'Below_Right';\n }\n }\n\n switch (combiningClass) {\n // Hebrew\n\n case 'CCC10': // sheva\n case 'CCC11': // hataf segol\n case 'CCC12': // hataf patah\n case 'CCC13': // hataf qamats\n case 'CCC14': // hiriq\n case 'CCC15': // tsere\n case 'CCC16': // segol\n case 'CCC17': // patah\n case 'CCC18': // qamats\n case 'CCC20': // qubuts\n case 'CCC22': // meteg\n return 'Below';\n\n case 'CCC23': // rafe\n return 'Attached_Above';\n\n case 'CCC24': // shin dot\n return 'Above_Right';\n\n case 'CCC25': // sin dot\n case 'CCC19': // holam\n return 'Above_Left';\n\n case 'CCC26': // point varika\n return 'Above';\n\n case 'CCC21': // dagesh\n break;\n\n // Arabic and Syriac\n\n case 'CCC27': // fathatan\n case 'CCC28': // dammatan\n case 'CCC30': // fatha\n case 'CCC31': // damma\n case 'CCC33': // shadda\n case 'CCC34': // sukun\n case 'CCC35': // superscript alef\n case 'CCC36': // superscript alaph\n return 'Above';\n\n case 'CCC29': // kasratan\n case 'CCC32': // kasra\n return 'Below';\n\n // Thai\n\n case 'CCC103': // sara u / sara uu\n return 'Below_Right';\n\n case 'CCC107': // mai\n return 'Above_Right';\n\n // Lao\n\n case 'CCC118': // sign u / sign uu\n return 'Below';\n\n case 'CCC122': // mai\n return 'Above';\n\n // Tibetan\n\n case 'CCC129': // sign aa\n case 'CCC132': // sign u\n return 'Below';\n\n case 'CCC130': // sign i\n return 'Above';\n }\n\n return combiningClass;\n }\n}\n","/**\n * Represents a glyph bounding box\n */\nexport default class BBox {\n constructor(minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity) {\n /**\n * The minimum X position in the bounding box\n * @type {number}\n */\n this.minX = minX;\n\n /**\n * The minimum Y position in the bounding box\n * @type {number}\n */\n this.minY = minY;\n\n /**\n * The maxmimum X position in the bounding box\n * @type {number}\n */\n this.maxX = maxX;\n\n /**\n * The maxmimum Y position in the bounding box\n * @type {number}\n */\n this.maxY = maxY;\n }\n\n /**\n * The width of the bounding box\n * @type {number}\n */\n get width() {\n return this.maxX - this.minX;\n }\n\n /**\n * The height of the bounding box\n * @type {number}\n */\n get height() {\n return this.maxY - this.minY;\n }\n\n addPoint(x, y) {\n if (x < this.minX) {\n this.minX = x;\n }\n\n if (y < this.minY) {\n this.minY = y;\n }\n\n if (x > this.maxX) {\n this.maxX = x;\n }\n\n if (y > this.maxY) {\n this.maxY = y;\n }\n }\n\n copy() {\n return new BBox(this.minX, this.minY, this.maxX, this.maxY);\n }\n}\n","import BBox from '../glyph/BBox';\n\n/**\n * Represents a run of Glyph and GlyphPosition objects.\n * Returned by the font layout method.\n */\nexport default class GlyphRun {\n constructor(glyphs, positions) {\n /**\n * An array of Glyph objects in the run\n * @type {Glyph[]}\n */\n this.glyphs = glyphs;\n\n /**\n * An array of GlyphPosition objects for each glyph in the run\n * @type {GlyphPosition[]}\n */\n this.positions = positions;\n }\n\n /**\n * The total advance width of the run.\n * @type {number}\n */\n get advanceWidth() {\n let width = 0;\n for (let position of this.positions) {\n width += position.xAdvance;\n }\n\n return width;\n }\n\n /**\n * The total advance height of the run.\n * @type {number}\n */\n get advanceHeight() {\n let height = 0;\n for (let position of this.positions) {\n height += position.yAdvance;\n }\n\n return height;\n }\n\n /**\n * The bounding box containing all glyphs in the run.\n * @type {BBox}\n */\n get bbox() {\n let bbox = new BBox;\n\n let x = 0;\n let y = 0;\n for (let index = 0; index < this.glyphs.length; index++) {\n let glyph = this.glyphs[index];\n let p = this.positions[index];\n let b = glyph.bbox;\n\n bbox.addPoint(b.minX + x + p.xOffset, b.minY + y + p.yOffset);\n bbox.addPoint(b.maxX + x + p.xOffset, b.maxY + y + p.yOffset);\n\n x += p.xAdvance;\n y += p.yAdvance;\n }\n\n return bbox;\n }\n}\n","/**\n * Represents positioning information for a glyph in a GlyphRun.\n */\nexport default class GlyphPosition {\n constructor(xAdvance = 0, yAdvance = 0, xOffset = 0, yOffset = 0) {\n /**\n * The amount to move the virtual pen in the X direction after rendering this glyph.\n * @type {number}\n */\n this.xAdvance = xAdvance;\n\n /**\n * The amount to move the virtual pen in the Y direction after rendering this glyph.\n * @type {number}\n */\n this.yAdvance = yAdvance;\n\n /**\n * The offset from the pen position in the X direction at which to render this glyph.\n * @type {number}\n */\n this.xOffset = xOffset;\n\n /**\n * The offset from the pen position in the Y direction at which to render this glyph.\n * @type {number}\n */\n this.yOffset = yOffset;\n }\n}\n","import unicode from 'unicode-properties';\n\n// This maps the Unicode Script property to an OpenType script tag\n// Data from http://www.microsoft.com/typography/otspec/scripttags.htm\n// and http://www.unicode.org/Public/UNIDATA/PropertyValueAliases.txt.\nconst UNICODE_SCRIPTS = {\n Caucasian_Albanian: 'aghb',\n Arabic: 'arab',\n Imperial_Aramaic: 'armi',\n Armenian: 'armn',\n Avestan: 'avst',\n Balinese: 'bali',\n Bamum: 'bamu',\n Bassa_Vah: 'bass',\n Batak: 'batk',\n Bengali: ['bng2', 'beng'],\n Bopomofo: 'bopo',\n Brahmi: 'brah',\n Braille: 'brai',\n Buginese: 'bugi',\n Buhid: 'buhd',\n Chakma: 'cakm',\n Canadian_Aboriginal: 'cans',\n Carian: 'cari',\n Cham: 'cham',\n Cherokee: 'cher',\n Coptic: 'copt',\n Cypriot: 'cprt',\n Cyrillic: 'cyrl',\n Devanagari: ['dev2', 'deva'],\n Deseret: 'dsrt',\n Duployan: 'dupl',\n Egyptian_Hieroglyphs: 'egyp',\n Elbasan: 'elba',\n Ethiopic: 'ethi',\n Georgian: 'geor',\n Glagolitic: 'glag',\n Gothic: 'goth',\n Grantha: 'gran',\n Greek: 'grek',\n Gujarati: ['gjr2', 'gujr'],\n Gurmukhi: ['gur2', 'guru'],\n Hangul: 'hang',\n Han: 'hani',\n Hanunoo: 'hano',\n Hebrew: 'hebr',\n Hiragana: 'hira',\n Pahawh_Hmong: 'hmng',\n Katakana_Or_Hiragana: 'hrkt',\n Old_Italic: 'ital',\n Javanese: 'java',\n Kayah_Li: 'kali',\n Katakana: 'kana',\n Kharoshthi: 'khar',\n Khmer: 'khmr',\n Khojki: 'khoj',\n Kannada: ['knd2', 'knda'],\n Kaithi: 'kthi',\n Tai_Tham: 'lana',\n Lao: 'lao ',\n Latin: 'latn',\n Lepcha: 'lepc',\n Limbu: 'limb',\n Linear_A: 'lina',\n Linear_B: 'linb',\n Lisu: 'lisu',\n Lycian: 'lyci',\n Lydian: 'lydi',\n Mahajani: 'mahj',\n Mandaic: 'mand',\n Manichaean: 'mani',\n Mende_Kikakui: 'mend',\n Meroitic_Cursive: 'merc',\n Meroitic_Hieroglyphs: 'mero',\n Malayalam: ['mlm2', 'mlym'],\n Modi: 'modi',\n Mongolian: 'mong',\n Mro: 'mroo',\n Meetei_Mayek: 'mtei',\n Myanmar: ['mym2', 'mymr'],\n Old_North_Arabian: 'narb',\n Nabataean: 'nbat',\n Nko: 'nko ',\n Ogham: 'ogam',\n Ol_Chiki: 'olck',\n Old_Turkic: 'orkh',\n Oriya: 'orya',\n Osmanya: 'osma',\n Palmyrene: 'palm',\n Pau_Cin_Hau: 'pauc',\n Old_Permic: 'perm',\n Phags_Pa: 'phag',\n Inscriptional_Pahlavi: 'phli',\n Psalter_Pahlavi: 'phlp',\n Phoenician: 'phnx',\n Miao: 'plrd',\n Inscriptional_Parthian: 'prti',\n Rejang: 'rjng',\n Runic: 'runr',\n Samaritan: 'samr',\n Old_South_Arabian: 'sarb',\n Saurashtra: 'saur',\n Shavian: 'shaw',\n Sharada: 'shrd',\n Siddham: 'sidd',\n Khudawadi: 'sind',\n Sinhala: 'sinh',\n Sora_Sompeng: 'sora',\n Sundanese: 'sund',\n Syloti_Nagri: 'sylo',\n Syriac: 'syrc',\n Tagbanwa: 'tagb',\n Takri: 'takr',\n Tai_Le: 'tale',\n New_Tai_Lue: 'talu',\n Tamil: 'taml',\n Tai_Viet: 'tavt',\n Telugu: ['tel2', 'telu'],\n Tifinagh: 'tfng',\n Tagalog: 'tglg',\n Thaana: 'thaa',\n Thai: 'thai',\n Tibetan: 'tibt',\n Tirhuta: 'tirh',\n Ugaritic: 'ugar',\n Vai: 'vai ',\n Warang_Citi: 'wara',\n Old_Persian: 'xpeo',\n Cuneiform: 'xsux',\n Yi: 'yi ',\n Inherited: 'zinh',\n Common: 'zyyy',\n Unknown: 'zzzz'\n};\n\nexport function fromUnicode(script) {\n return UNICODE_SCRIPTS[script];\n}\n\nexport function forString(string) {\n let len = string.length;\n let idx = 0;\n while (idx < len) {\n let code = string.charCodeAt(idx++);\n\n // Check if this is a high surrogate\n if (0xd800 <= code && code <= 0xdbff && idx < len) {\n let next = string.charCodeAt(idx);\n\n // Check if this is a low surrogate\n if (0xdc00 <= next && next <= 0xdfff) {\n idx++;\n code = ((code & 0x3FF) << 10) + (next & 0x3FF) + 0x10000;\n }\n }\n\n let script = unicode.getScript(code);\n if (script !== 'Common' && script !== 'Inherited' && script !== 'Unknown') {\n return UNICODE_SCRIPTS[script];\n }\n }\n\n return UNICODE_SCRIPTS.Unknown;\n}\n\nexport function forCodePoints(codePoints) {\n for (let i = 0; i < codePoints.length; i++) {\n let codePoint = codePoints[i];\n let script = unicode.getScript(codePoint);\n if (script !== 'Common' && script !== 'Inherited' && script !== 'Unknown') {\n return UNICODE_SCRIPTS[script];\n }\n }\n\n return UNICODE_SCRIPTS.Unknown;\n}\n\n// The scripts in this map are written from right to left\nconst RTL = {\n arab: true, // Arabic\n hebr: true, // Hebrew\n syrc: true, // Syriac\n thaa: true, // Thaana\n cprt: true, // Cypriot Syllabary\n khar: true, // Kharosthi\n phnx: true, // Phoenician\n 'nko ': true, // N'Ko\n lydi: true, // Lydian\n avst: true, // Avestan\n armi: true, // Imperial Aramaic\n phli: true, // Inscriptional Pahlavi\n prti: true, // Inscriptional Parthian\n sarb: true, // Old South Arabian\n orkh: true, // Old Turkic, Orkhon Runic\n samr: true, // Samaritan\n mand: true, // Mandaic, Mandaean\n merc: true, // Meroitic Cursive\n mero: true, // Meroitic Hieroglyphs\n\n // Unicode 7.0 (not listed on http://www.microsoft.com/typography/otspec/scripttags.htm)\n mani: true, // Manichaean\n mend: true, // Mende Kikakui\n nbat: true, // Nabataean\n narb: true, // Old North Arabian\n palm: true, // Palmyrene\n phlp: true // Psalter Pahlavi\n};\n\nexport function direction(script) {\n if (RTL[script]) {\n return 'rtl';\n }\n\n return 'ltr';\n}\n","// see https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html\n// and /System/Library/Frameworks/CoreText.framework/Versions/A/Headers/SFNTLayoutTypes.h on a Mac\nconst features = {\n allTypographicFeatures: {\n code: 0,\n exclusive: false,\n allTypeFeatures: 0\n },\n ligatures: {\n code: 1,\n exclusive: false,\n requiredLigatures: 0,\n commonLigatures: 2,\n rareLigatures: 4,\n // logos: 6\n rebusPictures: 8,\n diphthongLigatures: 10,\n squaredLigatures: 12,\n abbrevSquaredLigatures: 14,\n symbolLigatures: 16,\n contextualLigatures: 18,\n historicalLigatures: 20\n },\n cursiveConnection: {\n code: 2,\n exclusive: true,\n unconnected: 0,\n partiallyConnected: 1,\n cursive: 2\n },\n letterCase: {\n code: 3,\n exclusive: true\n },\n // upperAndLowerCase: 0 # deprecated\n // allCaps: 1 # deprecated\n // allLowerCase: 2 # deprecated\n // smallCaps: 3 # deprecated\n // initialCaps: 4 # deprecated\n // initialCapsAndSmallCaps: 5 # deprecated\n verticalSubstitution: {\n code: 4,\n exclusive: false,\n substituteVerticalForms: 0\n },\n linguisticRearrangement: {\n code: 5,\n exclusive: false,\n linguisticRearrangement: 0\n },\n numberSpacing: {\n code: 6,\n exclusive: true,\n monospacedNumbers: 0,\n proportionalNumbers: 1,\n thirdWidthNumbers: 2,\n quarterWidthNumbers: 3\n },\n smartSwash: {\n code: 8,\n exclusive: false,\n wordInitialSwashes: 0,\n wordFinalSwashes: 2,\n // lineInitialSwashes: 4\n // lineFinalSwashes: 6\n nonFinalSwashes: 8\n },\n diacritics: {\n code: 9,\n exclusive: true,\n showDiacritics: 0,\n hideDiacritics: 1,\n decomposeDiacritics: 2\n },\n verticalPosition: {\n code: 10,\n exclusive: true,\n normalPosition: 0,\n superiors: 1,\n inferiors: 2,\n ordinals: 3,\n scientificInferiors: 4\n },\n fractions: {\n code: 11,\n exclusive: true,\n noFractions: 0,\n verticalFractions: 1,\n diagonalFractions: 2\n },\n overlappingCharacters: {\n code: 13,\n exclusive: false,\n preventOverlap: 0\n },\n typographicExtras: {\n code: 14,\n exclusive: false,\n // hyphensToEmDash: 0\n // hyphenToEnDash: 2\n slashedZero: 4\n },\n // formInterrobang: 6\n // smartQuotes: 8\n // periodsToEllipsis: 10\n mathematicalExtras: {\n code: 15,\n exclusive: false,\n // hyphenToMinus: 0\n // asteristoMultiply: 2\n // slashToDivide: 4\n // inequalityLigatures: 6\n // exponents: 8\n mathematicalGreek: 10\n },\n ornamentSets: {\n code: 16,\n exclusive: true,\n noOrnaments: 0,\n dingbats: 1,\n piCharacters: 2,\n fleurons: 3,\n decorativeBorders: 4,\n internationalSymbols: 5,\n mathSymbols: 6\n },\n characterAlternatives: {\n code: 17,\n exclusive: true,\n noAlternates: 0\n },\n // user defined options\n designComplexity: {\n code: 18,\n exclusive: true,\n designLevel1: 0,\n designLevel2: 1,\n designLevel3: 2,\n designLevel4: 3,\n designLevel5: 4\n },\n styleOptions: {\n code: 19,\n exclusive: true,\n noStyleOptions: 0,\n displayText: 1,\n engravedText: 2,\n illuminatedCaps: 3,\n titlingCaps: 4,\n tallCaps: 5\n },\n characterShape: {\n code: 20,\n exclusive: true,\n traditionalCharacters: 0,\n simplifiedCharacters: 1,\n JIS1978Characters: 2,\n JIS1983Characters: 3,\n JIS1990Characters: 4,\n traditionalAltOne: 5,\n traditionalAltTwo: 6,\n traditionalAltThree: 7,\n traditionalAltFour: 8,\n traditionalAltFive: 9,\n expertCharacters: 10,\n JIS2004Characters: 11,\n hojoCharacters: 12,\n NLCCharacters: 13,\n traditionalNamesCharacters: 14\n },\n numberCase: {\n code: 21,\n exclusive: true,\n lowerCaseNumbers: 0,\n upperCaseNumbers: 1\n },\n textSpacing: {\n code: 22,\n exclusive: true,\n proportionalText: 0,\n monospacedText: 1,\n halfWidthText: 2,\n thirdWidthText: 3,\n quarterWidthText: 4,\n altProportionalText: 5,\n altHalfWidthText: 6\n },\n transliteration: {\n code: 23,\n exclusive: true,\n noTransliteration: 0\n },\n // hanjaToHangul: 1\n // hiraganaToKatakana: 2\n // katakanaToHiragana: 3\n // kanaToRomanization: 4\n // romanizationToHiragana: 5\n // romanizationToKatakana: 6\n // hanjaToHangulAltOne: 7\n // hanjaToHangulAltTwo: 8\n // hanjaToHangulAltThree: 9\n annotation: {\n code: 24,\n exclusive: true,\n noAnnotation: 0,\n boxAnnotation: 1,\n roundedBoxAnnotation: 2,\n circleAnnotation: 3,\n invertedCircleAnnotation: 4,\n parenthesisAnnotation: 5,\n periodAnnotation: 6,\n romanNumeralAnnotation: 7,\n diamondAnnotation: 8,\n invertedBoxAnnotation: 9,\n invertedRoundedBoxAnnotation: 10\n },\n kanaSpacing: {\n code: 25,\n exclusive: true,\n fullWidthKana: 0,\n proportionalKana: 1\n },\n ideographicSpacing: {\n code: 26,\n exclusive: true,\n fullWidthIdeographs: 0,\n proportionalIdeographs: 1,\n halfWidthIdeographs: 2\n },\n unicodeDecomposition: {\n code: 27,\n exclusive: false,\n canonicalComposition: 0,\n compatibilityComposition: 2,\n transcodingComposition: 4\n },\n rubyKana: {\n code: 28,\n exclusive: false,\n // noRubyKana: 0 # deprecated - use rubyKanaOff instead\n // rubyKana: 1 # deprecated - use rubyKanaOn instead\n rubyKana: 2\n },\n CJKSymbolAlternatives: {\n code: 29,\n exclusive: true,\n noCJKSymbolAlternatives: 0,\n CJKSymbolAltOne: 1,\n CJKSymbolAltTwo: 2,\n CJKSymbolAltThree: 3,\n CJKSymbolAltFour: 4,\n CJKSymbolAltFive: 5\n },\n ideographicAlternatives: {\n code: 30,\n exclusive: true,\n noIdeographicAlternatives: 0,\n ideographicAltOne: 1,\n ideographicAltTwo: 2,\n ideographicAltThree: 3,\n ideographicAltFour: 4,\n ideographicAltFive: 5\n },\n CJKVerticalRomanPlacement: {\n code: 31,\n exclusive: true,\n CJKVerticalRomanCentered: 0,\n CJKVerticalRomanHBaseline: 1\n },\n italicCJKRoman: {\n code: 32,\n exclusive: false,\n // noCJKItalicRoman: 0 # deprecated - use CJKItalicRomanOff instead\n // CJKItalicRoman: 1 # deprecated - use CJKItalicRomanOn instead\n CJKItalicRoman: 2\n },\n caseSensitiveLayout: {\n code: 33,\n exclusive: false,\n caseSensitiveLayout: 0,\n caseSensitiveSpacing: 2\n },\n alternateKana: {\n code: 34,\n exclusive: false,\n alternateHorizKana: 0,\n alternateVertKana: 2\n },\n stylisticAlternatives: {\n code: 35,\n exclusive: false,\n noStylisticAlternates: 0,\n stylisticAltOne: 2,\n stylisticAltTwo: 4,\n stylisticAltThree: 6,\n stylisticAltFour: 8,\n stylisticAltFive: 10,\n stylisticAltSix: 12,\n stylisticAltSeven: 14,\n stylisticAltEight: 16,\n stylisticAltNine: 18,\n stylisticAltTen: 20,\n stylisticAltEleven: 22,\n stylisticAltTwelve: 24,\n stylisticAltThirteen: 26,\n stylisticAltFourteen: 28,\n stylisticAltFifteen: 30,\n stylisticAltSixteen: 32,\n stylisticAltSeventeen: 34,\n stylisticAltEighteen: 36,\n stylisticAltNineteen: 38,\n stylisticAltTwenty: 40\n },\n contextualAlternates: {\n code: 36,\n exclusive: false,\n contextualAlternates: 0,\n swashAlternates: 2,\n contextualSwashAlternates: 4\n },\n lowerCase: {\n code: 37,\n exclusive: true,\n defaultLowerCase: 0,\n lowerCaseSmallCaps: 1,\n lowerCasePetiteCaps: 2\n },\n upperCase: {\n code: 38,\n exclusive: true,\n defaultUpperCase: 0,\n upperCaseSmallCaps: 1,\n upperCasePetiteCaps: 2\n },\n languageTag: { // indices into ltag table\n code: 39,\n exclusive: true\n },\n CJKRomanSpacing: {\n code: 103,\n exclusive: true,\n halfWidthCJKRoman: 0,\n proportionalCJKRoman: 1,\n defaultCJKRoman: 2,\n fullWidthCJKRoman: 3\n }\n};\n\nconst feature = (name, selector) => [features[name].code, features[name][selector]];\n\nconst OTMapping = {\n rlig: feature('ligatures', 'requiredLigatures'),\n clig: feature('ligatures', 'contextualLigatures'),\n dlig: feature('ligatures', 'rareLigatures'),\n hlig: feature('ligatures', 'historicalLigatures'),\n liga: feature('ligatures', 'commonLigatures'),\n hist: feature('ligatures', 'historicalLigatures'), // ??\n\n smcp: feature('lowerCase', 'lowerCaseSmallCaps'),\n pcap: feature('lowerCase', 'lowerCasePetiteCaps'),\n\n frac: feature('fractions', 'diagonalFractions'),\n dnom: feature('fractions', 'diagonalFractions'), // ??\n numr: feature('fractions', 'diagonalFractions'), // ??\n afrc: feature('fractions', 'verticalFractions'),\n // aalt\n // abvf, abvm, abvs, akhn, blwf, blwm, blws, cfar, cjct, cpsp, falt, isol, jalt, ljmo, mset?\n // ltra, ltrm, nukt, pref, pres, pstf, psts, rand, rkrf, rphf, rtla, rtlm, size, tjmo, tnum?\n // unic, vatu, vhal, vjmo, vpal, vrt2\n // dist -> trak table?\n // kern, vkrn -> kern table\n // lfbd + opbd + rtbd -> opbd table?\n // mark, mkmk -> acnt table?\n // locl -> languageTag + ltag table\n\n case: feature('caseSensitiveLayout', 'caseSensitiveLayout'), // also caseSensitiveSpacing\n ccmp: feature('unicodeDecomposition', 'canonicalComposition'), // compatibilityComposition?\n cpct: feature('CJKVerticalRomanPlacement', 'CJKVerticalRomanCentered'), // guess..., probably not given below\n valt: feature('CJKVerticalRomanPlacement', 'CJKVerticalRomanCentered'),\n swsh: feature('contextualAlternates', 'swashAlternates'),\n cswh: feature('contextualAlternates', 'contextualSwashAlternates'),\n curs: feature('cursiveConnection', 'cursive'), // ??\n c2pc: feature('upperCase', 'upperCasePetiteCaps'),\n c2sc: feature('upperCase', 'upperCaseSmallCaps'),\n\n init: feature('smartSwash', 'wordInitialSwashes'), // ??\n fin2: feature('smartSwash', 'wordFinalSwashes'), // ??\n medi: feature('smartSwash', 'nonFinalSwashes'), // ??\n med2: feature('smartSwash', 'nonFinalSwashes'), // ??\n fin3: feature('smartSwash', 'wordFinalSwashes'), // ??\n fina: feature('smartSwash', 'wordFinalSwashes'), // ??\n\n pkna: feature('kanaSpacing', 'proportionalKana'),\n half: feature('textSpacing', 'halfWidthText'), // also HalfWidthCJKRoman, HalfWidthIdeographs?\n halt: feature('textSpacing', 'altHalfWidthText'),\n\n hkna: feature('alternateKana', 'alternateHorizKana'),\n vkna: feature('alternateKana', 'alternateVertKana'),\n // hngl: feature 'transliteration', 'hanjaToHangulSelector' # deprecated\n\n ital: feature('italicCJKRoman', 'CJKItalicRoman'),\n lnum: feature('numberCase', 'upperCaseNumbers'),\n onum: feature('numberCase', 'lowerCaseNumbers'),\n mgrk: feature('mathematicalExtras', 'mathematicalGreek'),\n\n // nalt: not enough info. what type of annotation?\n // ornm: ditto, which ornament style?\n\n calt: feature('contextualAlternates', 'contextualAlternates'), // or more?\n vrt2: feature('verticalSubstitution', 'substituteVerticalForms'), // oh... below?\n vert: feature('verticalSubstitution', 'substituteVerticalForms'),\n tnum: feature('numberSpacing', 'monospacedNumbers'),\n pnum: feature('numberSpacing', 'proportionalNumbers'),\n sups: feature('verticalPosition', 'superiors'),\n subs: feature('verticalPosition', 'inferiors'),\n ordn: feature('verticalPosition', 'ordinals'),\n pwid: feature('textSpacing', 'proportionalText'),\n hwid: feature('textSpacing', 'halfWidthText'),\n qwid: feature('textSpacing', 'quarterWidthText'), // also QuarterWidthNumbers?\n twid: feature('textSpacing', 'thirdWidthText'), // also ThirdWidthNumbers?\n fwid: feature('textSpacing', 'proportionalText'), //??\n palt: feature('textSpacing', 'altProportionalText'),\n trad: feature('characterShape', 'traditionalCharacters'),\n smpl: feature('characterShape', 'simplifiedCharacters'),\n jp78: feature('characterShape', 'JIS1978Characters'),\n jp83: feature('characterShape', 'JIS1983Characters'),\n jp90: feature('characterShape', 'JIS1990Characters'),\n jp04: feature('characterShape', 'JIS2004Characters'),\n expt: feature('characterShape', 'expertCharacters'),\n hojo: feature('characterShape', 'hojoCharacters'),\n nlck: feature('characterShape', 'NLCCharacters'),\n tnam: feature('characterShape', 'traditionalNamesCharacters'),\n ruby: feature('rubyKana', 'rubyKana'),\n titl: feature('styleOptions', 'titlingCaps'),\n zero: feature('typographicExtras', 'slashedZero'),\n\n ss01: feature('stylisticAlternatives', 'stylisticAltOne'),\n ss02: feature('stylisticAlternatives', 'stylisticAltTwo'),\n ss03: feature('stylisticAlternatives', 'stylisticAltThree'),\n ss04: feature('stylisticAlternatives', 'stylisticAltFour'),\n ss05: feature('stylisticAlternatives', 'stylisticAltFive'),\n ss06: feature('stylisticAlternatives', 'stylisticAltSix'),\n ss07: feature('stylisticAlternatives', 'stylisticAltSeven'),\n ss08: feature('stylisticAlternatives', 'stylisticAltEight'),\n ss09: feature('stylisticAlternatives', 'stylisticAltNine'),\n ss10: feature('stylisticAlternatives', 'stylisticAltTen'),\n ss11: feature('stylisticAlternatives', 'stylisticAltEleven'),\n ss12: feature('stylisticAlternatives', 'stylisticAltTwelve'),\n ss13: feature('stylisticAlternatives', 'stylisticAltThirteen'),\n ss14: feature('stylisticAlternatives', 'stylisticAltFourteen'),\n ss15: feature('stylisticAlternatives', 'stylisticAltFifteen'),\n ss16: feature('stylisticAlternatives', 'stylisticAltSixteen'),\n ss17: feature('stylisticAlternatives', 'stylisticAltSeventeen'),\n ss18: feature('stylisticAlternatives', 'stylisticAltEighteen'),\n ss19: feature('stylisticAlternatives', 'stylisticAltNineteen'),\n ss20: feature('stylisticAlternatives', 'stylisticAltTwenty')\n};\n\n // salt: feature 'stylisticAlternatives', 'stylisticAltOne' # hmm, which one to choose\n\n// Add cv01-cv99 features\nfor (let i = 1; i <= 99; i++) {\n OTMapping[`cv${`00${i}`.slice(-2)}`] = [features.characterAlternatives.code, i];\n}\n\n// create inverse mapping\nlet AATMapping = {};\nfor (let ot in OTMapping) {\n let aat = OTMapping[ot];\n if (AATMapping[aat[0]] == null) {\n AATMapping[aat[0]] = {};\n }\n\n AATMapping[aat[0]][aat[1]] = ot;\n}\n\n// Maps an array of OpenType features to AAT features\n// in the form of {featureType:{featureSetting:true}}\nexport function mapOTToAAT(features) {\n let res = {};\n for (let k = 0; k < features.length; k++) {\n let r;\n if (r = OTMapping[features[k]]) {\n if (res[r[0]] == null) {\n res[r[0]] = {};\n }\n\n res[r[0]][r[1]] = true;\n }\n }\n\n return res;\n}\n\n// Maps strings in a [featureType, featureSetting]\n// to their equivalent number codes\nfunction mapFeatureStrings(f) {\n let [type, setting] = f;\n if (isNaN(type)) {\n var typeCode = features[type] && features[type].code;\n } else {\n var typeCode = type;\n }\n\n if (isNaN(setting)) {\n var settingCode = features[type] && features[type][setting];\n } else {\n var settingCode = setting;\n }\n\n return [typeCode, settingCode];\n}\n\n// Maps AAT features to an array of OpenType features\n// Supports both arrays in the form of [[featureType, featureSetting]]\n// and objects in the form of {featureType:{featureSetting:true}}\n// featureTypes and featureSettings can be either strings or number codes\nexport function mapAATToOT(features) {\n let res = {};\n if (Array.isArray(features)) {\n for (let k = 0; k < features.length; k++) {\n let r;\n let f = mapFeatureStrings(features[k]);\n if (r = AATMapping[f[0]] && AATMapping[f[0]][f[1]]) {\n res[r] = true;\n }\n }\n\n } else if (typeof features === 'object') {\n for (let type in features) {\n let feature = features[type];\n for (let setting in feature) {\n let r;\n let f = mapFeatureStrings([type, setting]);\n if (feature[setting] && (r = AATMapping[f[0]] && AATMapping[f[0]][f[1]])) {\n res[r] = true;\n }\n }\n }\n }\n\n return Object.keys(res);\n}\n","import {cache} from '../decorators';\nimport {range} from '../utils';\n\nexport default class AATLookupTable {\n constructor(table) {\n this.table = table;\n }\n\n lookup(glyph) {\n switch (this.table.version) {\n case 0: // simple array format\n return this.table.values.getItem(glyph);\n\n case 2: // segment format\n case 4: {\n let min = 0;\n let max = this.table.binarySearchHeader.nUnits - 1;\n\n while (min <= max) {\n var mid = (min + max) >> 1;\n var seg = this.table.segments[mid];\n\n // special end of search value\n if (seg.firstGlyph === 0xffff) {\n return null;\n }\n\n if (glyph < seg.firstGlyph) {\n max = mid - 1;\n } else if (glyph > seg.lastGlyph) {\n min = mid + 1;\n } else {\n if (this.table.version === 2) {\n return seg.value;\n } else {\n return seg.values[glyph - seg.firstGlyph];\n }\n }\n }\n\n return null;\n }\n\n case 6: { // lookup single\n let min = 0;\n let max = this.table.binarySearchHeader.nUnits - 1;\n\n while (min <= max) {\n var mid = (min + max) >> 1;\n var seg = this.table.segments[mid];\n\n // special end of search value\n if (seg.glyph === 0xffff) {\n return null;\n }\n\n if (glyph < seg.glyph) {\n max = mid - 1;\n } else if (glyph > seg.glyph) {\n min = mid + 1;\n } else {\n return seg.value;\n }\n }\n\n return null;\n }\n\n case 8: // lookup trimmed\n return this.table.values[glyph - this.table.firstGlyph];\n\n default:\n throw new Error(`Unknown lookup table format: ${this.table.version}`);\n }\n }\n\n @cache\n glyphsForValue(classValue) {\n let res = [];\n\n switch (this.table.version) {\n case 2: // segment format\n case 4: {\n for (let segment of this.table.segments) {\n if ((this.table.version === 2 && segment.value === classValue)) {\n res.push(...range(segment.firstGlyph, segment.lastGlyph + 1));\n } else {\n for (let index = 0; index < segment.values.length; index++) {\n if (segment.values[index] === classValue) {\n res.push(segment.firstGlyph + index);\n }\n }\n }\n }\n\n break;\n }\n\n case 6: { // lookup single\n for (let segment of this.table.segments) {\n if (segment.value === classValue) {\n res.push(segment.glyph);\n }\n }\n\n break;\n }\n\n case 8: { // lookup trimmed\n for (let i = 0; i < this.table.values.length; i++) {\n if (this.table.values[i] === classValue) {\n res.push(this.table.firstGlyph + i);\n }\n }\n\n break;\n }\n\n default:\n throw new Error(`Unknown lookup table format: ${this.table.version}`);\n }\n\n return res;\n }\n}\n","import AATLookupTable from './AATLookupTable';\n\nconst START_OF_TEXT_STATE = 0;\nconst START_OF_LINE_STATE = 1;\n\nconst END_OF_TEXT_CLASS = 0;\nconst OUT_OF_BOUNDS_CLASS = 1;\nconst DELETED_GLYPH_CLASS = 2;\nconst END_OF_LINE_CLASS = 3;\n\nconst DONT_ADVANCE = 0x4000;\n\nexport default class AATStateMachine {\n constructor(stateTable) {\n this.stateTable = stateTable;\n this.lookupTable = new AATLookupTable(stateTable.classTable);\n }\n\n process(glyphs, reverse, processEntry) {\n let currentState = START_OF_TEXT_STATE; // START_OF_LINE_STATE is used for kashida glyph insertions sometimes I think?\n let index = reverse ? glyphs.length - 1 : 0;\n let dir = reverse ? -1 : 1;\n\n while ((dir === 1 && index <= glyphs.length) || (dir === -1 && index >= -1)) {\n let glyph = null;\n let classCode = OUT_OF_BOUNDS_CLASS;\n let shouldAdvance = true;\n\n if (index === glyphs.length || index === -1) {\n classCode = END_OF_TEXT_CLASS;\n } else {\n glyph = glyphs[index];\n if (glyph.id === 0xffff) { // deleted glyph\n classCode = DELETED_GLYPH_CLASS;\n } else {\n classCode = this.lookupTable.lookup(glyph.id);\n if (classCode == null) {\n classCode = OUT_OF_BOUNDS_CLASS;\n }\n }\n }\n\n let row = this.stateTable.stateArray.getItem(currentState);\n let entryIndex = row[classCode];\n let entry = this.stateTable.entryTable.getItem(entryIndex);\n\n if (classCode !== END_OF_TEXT_CLASS && classCode !== DELETED_GLYPH_CLASS) {\n processEntry(glyph, entry, index);\n shouldAdvance = !(entry.flags & DONT_ADVANCE);\n }\n\n currentState = entry.newState;\n if (shouldAdvance) {\n index += dir;\n }\n }\n\n return glyphs;\n }\n\n /**\n * Performs a depth-first traversal of the glyph strings\n * represented by the state machine.\n */\n traverse(opts, state = 0, visited = new Set) {\n if (visited.has(state)) {\n return;\n }\n\n visited.add(state);\n\n let {nClasses, stateArray, entryTable} = this.stateTable;\n let row = stateArray.getItem(state);\n\n // Skip predefined classes\n for (let classCode = 4; classCode < nClasses; classCode++) {\n let entryIndex = row[classCode];\n let entry = entryTable.getItem(entryIndex);\n\n // Try all glyphs in the class\n for (let glyph of this.lookupTable.glyphsForValue(classCode)) {\n if (opts.enter) {\n opts.enter(glyph, entry);\n }\n\n if (entry.newState !== 0) {\n this.traverse(opts, entry.newState, visited);\n }\n\n if (opts.exit) {\n opts.exit(glyph, entry);\n }\n }\n }\n }\n}\n","import AATStateMachine from './AATStateMachine';\nimport AATLookupTable from './AATLookupTable';\nimport {cache} from '../decorators';\n\n// indic replacement flags\nconst MARK_FIRST = 0x8000;\nconst MARK_LAST = 0x2000;\nconst VERB = 0x000F;\n\n// contextual substitution and glyph insertion flag\nconst SET_MARK = 0x8000;\n\n// ligature entry flags\nconst SET_COMPONENT = 0x8000;\nconst PERFORM_ACTION = 0x2000;\n\n// ligature action masks\nconst LAST_MASK = 0x80000000;\nconst STORE_MASK = 0x40000000;\nconst OFFSET_MASK = 0x3FFFFFFF;\n\nconst VERTICAL_ONLY = 0x800000;\nconst REVERSE_DIRECTION = 0x400000;\nconst HORIZONTAL_AND_VERTICAL = 0x200000;\n\n// glyph insertion flags\nconst CURRENT_IS_KASHIDA_LIKE = 0x2000;\nconst MARKED_IS_KASHIDA_LIKE = 0x1000;\nconst CURRENT_INSERT_BEFORE = 0x0800;\nconst MARKED_INSERT_BEFORE = 0x0400;\nconst CURRENT_INSERT_COUNT = 0x03E0;\nconst MARKED_INSERT_COUNT = 0x001F;\n\nexport default class AATMorxProcessor {\n constructor(font) {\n this.processIndicRearragement = this.processIndicRearragement.bind(this);\n this.processContextualSubstitution = this.processContextualSubstitution.bind(this);\n this.processLigature = this.processLigature.bind(this);\n this.processNoncontextualSubstitutions = this.processNoncontextualSubstitutions.bind(this);\n this.processGlyphInsertion = this.processGlyphInsertion.bind(this);\n this.font = font;\n this.morx = font.morx;\n this.inputCache = null;\n }\n\n // Processes an array of glyphs and applies the specified features\n // Features should be in the form of {featureType:{featureSetting:true}}\n process(glyphs, features = {}) {\n for (let chain of this.morx.chains) {\n let flags = chain.defaultFlags;\n\n // enable/disable the requested features\n for (let feature of chain.features) {\n let f;\n if ((f = features[feature.featureType]) && f[feature.featureSetting]) {\n flags &= feature.disableFlags;\n flags |= feature.enableFlags;\n }\n }\n\n for (let subtable of chain.subtables) {\n if (subtable.subFeatureFlags & flags) {\n this.processSubtable(subtable, glyphs);\n }\n }\n }\n\n // remove deleted glyphs\n let index = glyphs.length - 1;\n while (index >= 0) {\n if (glyphs[index].id === 0xffff) {\n glyphs.splice(index, 1);\n }\n\n index--;\n }\n\n return glyphs;\n }\n\n processSubtable(subtable, glyphs) {\n this.subtable = subtable;\n this.glyphs = glyphs;\n if (this.subtable.type === 4) {\n this.processNoncontextualSubstitutions(this.subtable, this.glyphs);\n return;\n }\n\n this.ligatureStack = [];\n this.markedGlyph = null;\n this.firstGlyph = null;\n this.lastGlyph = null;\n this.markedIndex = null;\n\n let stateMachine = this.getStateMachine(subtable);\n let process = this.getProcessor();\n\n let reverse = !!(this.subtable.coverage & REVERSE_DIRECTION);\n return stateMachine.process(this.glyphs, reverse, process);\n }\n\n @cache\n getStateMachine(subtable) {\n return new AATStateMachine(subtable.table.stateTable);\n }\n\n getProcessor() {\n switch (this.subtable.type) {\n case 0:\n return this.processIndicRearragement;\n case 1:\n return this.processContextualSubstitution;\n case 2:\n return this.processLigature;\n case 4:\n return this.processNoncontextualSubstitutions;\n case 5:\n return this.processGlyphInsertion;\n default:\n throw new Error(`Invalid morx subtable type: ${this.subtable.type}`);\n }\n }\n\n processIndicRearragement(glyph, entry, index) {\n if (entry.flags & MARK_FIRST) {\n this.firstGlyph = index;\n }\n\n if (entry.flags & MARK_LAST) {\n this.lastGlyph = index;\n }\n\n reorderGlyphs(this.glyphs, entry.flags & VERB, this.firstGlyph, this.lastGlyph);\n }\n\n processContextualSubstitution(glyph, entry, index) {\n let subsitutions = this.subtable.table.substitutionTable.items;\n if (entry.markIndex !== 0xffff) {\n let lookup = subsitutions.getItem(entry.markIndex);\n let lookupTable = new AATLookupTable(lookup);\n glyph = this.glyphs[this.markedGlyph];\n var gid = lookupTable.lookup(glyph.id);\n if (gid) {\n this.glyphs[this.markedGlyph] = this.font.getGlyph(gid, glyph.codePoints);\n }\n }\n\n if (entry.currentIndex !== 0xffff) {\n let lookup = subsitutions.getItem(entry.currentIndex);\n let lookupTable = new AATLookupTable(lookup);\n glyph = this.glyphs[index];\n var gid = lookupTable.lookup(glyph.id);\n if (gid) {\n this.glyphs[index] = this.font.getGlyph(gid, glyph.codePoints);\n }\n }\n\n if (entry.flags & SET_MARK) {\n this.markedGlyph = index;\n }\n }\n\n processLigature(glyph, entry, index) {\n if (entry.flags & SET_COMPONENT) {\n this.ligatureStack.push(index);\n }\n\n if (entry.flags & PERFORM_ACTION) {\n let actions = this.subtable.table.ligatureActions;\n let components = this.subtable.table.components;\n let ligatureList = this.subtable.table.ligatureList;\n\n let actionIndex = entry.action;\n let last = false;\n let ligatureIndex = 0;\n let codePoints = [];\n let ligatureGlyphs = [];\n\n while (!last) {\n let componentGlyph = this.ligatureStack.pop();\n codePoints.unshift(...this.glyphs[componentGlyph].codePoints);\n\n let action = actions.getItem(actionIndex++);\n last = !!(action & LAST_MASK);\n let store = !!(action & STORE_MASK);\n let offset = (action & OFFSET_MASK) << 2 >> 2; // sign extend 30 to 32 bits\n offset += this.glyphs[componentGlyph].id;\n\n let component = components.getItem(offset);\n ligatureIndex += component;\n\n if (last || store) {\n let ligatureEntry = ligatureList.getItem(ligatureIndex);\n this.glyphs[componentGlyph] = this.font.getGlyph(ligatureEntry, codePoints);\n ligatureGlyphs.push(componentGlyph);\n ligatureIndex = 0;\n codePoints = [];\n } else {\n this.glyphs[componentGlyph] = this.font.getGlyph(0xffff);\n }\n }\n\n // Put ligature glyph indexes back on the stack\n this.ligatureStack.push(...ligatureGlyphs);\n }\n }\n\n processNoncontextualSubstitutions(subtable, glyphs, index) {\n let lookupTable = new AATLookupTable(subtable.table.lookupTable);\n\n for (index = 0; index < glyphs.length; index++) {\n let glyph = glyphs[index];\n if (glyph.id !== 0xffff) {\n let gid = lookupTable.lookup(glyph.id);\n if (gid) { // 0 means do nothing\n glyphs[index] = this.font.getGlyph(gid, glyph.codePoints);\n }\n }\n }\n }\n\n _insertGlyphs(glyphIndex, insertionActionIndex, count, isBefore) {\n let insertions = [];\n while (count--) {\n let gid = this.subtable.table.insertionActions.getItem(insertionActionIndex++);\n insertions.push(this.font.getGlyph(gid));\n }\n\n if (!isBefore) {\n glyphIndex++;\n }\n\n this.glyphs.splice(glyphIndex, 0, ...insertions);\n }\n\n processGlyphInsertion(glyph, entry, index) {\n if (entry.flags & SET_MARK) {\n this.markedIndex = index;\n }\n\n if (entry.markedInsertIndex !== 0xffff) {\n let count = (entry.flags & MARKED_INSERT_COUNT) >>> 5;\n let isBefore = !!(entry.flags & MARKED_INSERT_BEFORE);\n this._insertGlyphs(this.markedIndex, entry.markedInsertIndex, count, isBefore);\n }\n\n if (entry.currentInsertIndex !== 0xffff) {\n let count = (entry.flags & CURRENT_INSERT_COUNT) >>> 5;\n let isBefore = !!(entry.flags & CURRENT_INSERT_BEFORE);\n this._insertGlyphs(index, entry.currentInsertIndex, count, isBefore);\n }\n }\n\n getSupportedFeatures() {\n let features = [];\n for (let chain of this.morx.chains) {\n for (let feature of chain.features) {\n features.push([feature.featureType, feature.featureSetting]);\n }\n }\n\n return features;\n }\n\n generateInputs(gid) {\n if (!this.inputCache) {\n this.generateInputCache();\n }\n\n return this.inputCache[gid] || [];\n }\n\n generateInputCache() {\n this.inputCache = {};\n\n for (let chain of this.morx.chains) {\n let flags = chain.defaultFlags;\n\n for (let subtable of chain.subtables) {\n if (subtable.subFeatureFlags & flags) {\n this.generateInputsForSubtable(subtable);\n }\n }\n }\n }\n\n generateInputsForSubtable(subtable) {\n // Currently, only supporting ligature subtables.\n if (subtable.type !== 2) {\n return;\n }\n\n let reverse = !!(subtable.coverage & REVERSE_DIRECTION);\n if (reverse) {\n throw new Error('Reverse subtable, not supported.');\n }\n\n this.subtable = subtable;\n this.ligatureStack = [];\n\n let stateMachine = this.getStateMachine(subtable);\n let process = this.getProcessor();\n\n let input = [];\n let stack = [];\n this.glyphs = [];\n\n stateMachine.traverse({\n enter: (glyph, entry) => {\n let glyphs = this.glyphs;\n stack.push({\n glyphs: glyphs.slice(),\n ligatureStack: this.ligatureStack.slice()\n });\n\n // Add glyph to input and glyphs to process.\n let g = this.font.getGlyph(glyph);\n input.push(g);\n glyphs.push(input[input.length - 1]);\n\n // Process ligature substitution\n process(glyphs[glyphs.length - 1], entry, glyphs.length - 1);\n\n // Add input to result if only one matching (non-deleted) glyph remains.\n let count = 0;\n let found = 0;\n for (let i = 0; i < glyphs.length && count <= 1; i++) {\n if (glyphs[i].id !== 0xffff) {\n count++;\n found = glyphs[i].id;\n }\n }\n\n if (count === 1) {\n let result = input.map(g => g.id);\n let cache = this.inputCache[found];\n if (cache) {\n cache.push(result);\n } else {\n this.inputCache[found] = [result];\n }\n }\n },\n\n exit: () => {\n ({glyphs: this.glyphs, ligatureStack: this.ligatureStack} = stack.pop());\n input.pop();\n }\n });\n }\n}\n\n// swaps the glyphs in rangeA with those in rangeB\n// reverse the glyphs inside those ranges if specified\n// ranges are in [offset, length] format\nfunction swap(glyphs, rangeA, rangeB, reverseA = false, reverseB = false) {\n let end = glyphs.splice(rangeB[0] - (rangeB[1] - 1), rangeB[1]);\n if (reverseB) {\n end.reverse();\n }\n\n let start = glyphs.splice(rangeA[0], rangeA[1], ...end);\n if (reverseA) {\n start.reverse();\n }\n\n glyphs.splice(rangeB[0] - (rangeA[1] - 1), 0, ...start);\n return glyphs;\n}\n\nfunction reorderGlyphs(glyphs, verb, firstGlyph, lastGlyph) {\n let length = lastGlyph - firstGlyph + 1;\n switch (verb) {\n case 0: // no change\n return glyphs;\n\n case 1: // Ax => xA\n return swap(glyphs, [firstGlyph, 1], [lastGlyph, 0]);\n\n case 2: // xD => Dx\n return swap(glyphs, [firstGlyph, 0], [lastGlyph, 1]);\n\n case 3: // AxD => DxA\n return swap(glyphs, [firstGlyph, 1], [lastGlyph, 1]);\n\n case 4: // ABx => xAB\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 0]);\n\n case 5: // ABx => xBA\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 0], true, false);\n\n case 6: // xCD => CDx\n return swap(glyphs, [firstGlyph, 0], [lastGlyph, 2]);\n\n case 7: // xCD => DCx\n return swap(glyphs, [firstGlyph, 0], [lastGlyph, 2], false, true);\n\n case 8: // AxCD => CDxA\n return swap(glyphs, [firstGlyph, 1], [lastGlyph, 2]);\n\n case 9: // AxCD => DCxA\n return swap(glyphs, [firstGlyph, 1], [lastGlyph, 2], false, true);\n\n case 10: // ABxD => DxAB\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 1]);\n\n case 11: // ABxD => DxBA\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 1], true, false);\n\n case 12: // ABxCD => CDxAB\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2]);\n\n case 13: // ABxCD => CDxBA\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2], true, false);\n\n case 14: // ABxCD => DCxAB\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2], false, true);\n\n case 15: // ABxCD => DCxBA\n return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2], true, true);\n\n default:\n throw new Error(`Unknown verb: ${verb}`);\n }\n}\n","import * as AATFeatureMap from './AATFeatureMap';\nimport * as Script from '../layout/Script';\nimport AATMorxProcessor from './AATMorxProcessor';\n\nexport default class AATLayoutEngine {\n constructor(font) {\n this.font = font;\n this.morxProcessor = new AATMorxProcessor(font);\n }\n\n substitute(glyphs, features, script, language) {\n // AAT expects the glyphs to be in visual order prior to morx processing,\n // so reverse the glyphs if the script is right-to-left.\n let isRTL = Script.direction(script) === 'rtl';\n if (isRTL) {\n glyphs.reverse();\n }\n\n this.morxProcessor.process(glyphs, AATFeatureMap.mapOTToAAT(features));\n return glyphs;\n }\n\n getAvailableFeatures(script, language) {\n return AATFeatureMap.mapAATToOT(this.morxProcessor.getSupportedFeatures());\n }\n\n stringsForGlyph(gid) {\n let glyphStrings = this.morxProcessor.generateInputs(gid);\n let result = new Set;\n\n for (let glyphs of glyphStrings) {\n this._addStrings(glyphs, 0, result, '');\n }\n\n return result;\n }\n\n _addStrings(glyphs, index, strings, string) {\n let codePoints = this.font._cmapProcessor.codePointsForGlyph(glyphs[index]);\n\n for (let codePoint of codePoints) {\n let s = string + String.fromCodePoint(codePoint);\n if (index < glyphs.length - 1) {\n this._addStrings(glyphs, index + 1, strings, s);\n } else {\n strings.add(s);\n }\n }\n }\n}\n","import * as Script from '../layout/Script';\n\n/**\n * ShapingPlans are used by the OpenType shapers to store which\n * features should by applied, and in what order to apply them.\n * The features are applied in groups called stages. A feature\n * can be applied globally to all glyphs, or locally to only\n * specific glyphs.\n *\n * @private\n */\nexport default class ShapingPlan {\n constructor(font, script, language) {\n this.font = font;\n this.script = script;\n this.language = language;\n this.direction = Script.direction(script);\n this.stages = [];\n this.globalFeatures = {};\n this.allFeatures = {};\n }\n\n /**\n * Adds the given features to the last stage.\n * Ignores features that have already been applied.\n */\n _addFeatures(features) {\n let stage = this.stages[this.stages.length - 1];\n for (let feature of features) {\n if (!this.allFeatures[feature]) {\n stage.push(feature);\n this.allFeatures[feature] = true;\n }\n }\n }\n\n /**\n * Adds the given features to the global list\n */\n _addGlobal(features) {\n for (let feature of features) {\n this.globalFeatures[feature] = true;\n }\n }\n\n /**\n * Add features to the last stage\n */\n add(arg, global = true) {\n if (this.stages.length === 0) {\n this.stages.push([]);\n }\n\n if (typeof arg === 'string') {\n arg = [arg];\n }\n\n if (Array.isArray(arg)) {\n this._addFeatures(arg);\n if (global) {\n this._addGlobal(arg);\n }\n } else if (typeof arg === 'object') {\n let features = (arg.global || []).concat(arg.local || []);\n this._addFeatures(features);\n if (arg.global) {\n this._addGlobal(arg.global);\n }\n } else {\n throw new Error(\"Unsupported argument to ShapingPlan#add\");\n }\n }\n\n /**\n * Add a new stage\n */\n addStage(arg, global) {\n if (typeof arg === 'function') {\n this.stages.push(arg, []);\n } else {\n this.stages.push([]);\n this.add(arg, global);\n }\n }\n\n /**\n * Assigns the global features to the given glyphs\n */\n assignGlobalFeatures(glyphs) {\n for (let glyph of glyphs) {\n for (let feature in this.globalFeatures) {\n glyph.features[feature] = true;\n }\n }\n }\n\n /**\n * Executes the planned stages using the given OTProcessor\n */\n process(processor, glyphs, positions) {\n processor.selectScript(this.script, this.language);\n\n for (let stage of this.stages) {\n if (typeof stage === 'function') {\n if (!positions) {\n stage(this.font, glyphs, positions);\n }\n\n } else if (stage.length > 0) {\n processor.applyFeatures(stage, glyphs, positions);\n }\n }\n }\n}\n","import unicode from 'unicode-properties';\n\nconst VARIATION_FEATURES = ['rvrn'];\nconst COMMON_FEATURES = ['ccmp', 'locl', 'rlig', 'mark', 'mkmk'];\nconst FRACTIONAL_FEATURES = ['frac', 'numr', 'dnom'];\nconst HORIZONTAL_FEATURES = ['calt', 'clig', 'liga', 'rclt', 'curs', 'kern'];\nconst VERTICAL_FEATURES = ['vert'];\nconst DIRECTIONAL_FEATURES = {\n ltr: ['ltra', 'ltrm'],\n rtl: ['rtla', 'rtlm']\n};\n\nexport default class DefaultShaper {\n static zeroMarkWidths = 'AFTER_GPOS';\n static plan(plan, glyphs, features) {\n // Plan the features we want to apply\n this.planPreprocessing(plan);\n this.planFeatures(plan);\n this.planPostprocessing(plan, features);\n\n // Assign the global features to all the glyphs\n plan.assignGlobalFeatures(glyphs);\n\n // Assign local features to glyphs\n this.assignFeatures(plan, glyphs);\n }\n\n static planPreprocessing(plan) {\n plan.add({\n global: [...VARIATION_FEATURES, ...DIRECTIONAL_FEATURES[plan.direction]],\n local: FRACTIONAL_FEATURES\n });\n }\n\n static planFeatures(plan) {\n // Do nothing by default. Let subclasses override this.\n }\n\n static planPostprocessing(plan, userFeatures) {\n plan.add([...COMMON_FEATURES, ...HORIZONTAL_FEATURES, ...userFeatures]);\n }\n\n static assignFeatures(plan, glyphs) {\n // Enable contextual fractions\n let i = 0;\n while (i < glyphs.length) {\n let glyph = glyphs[i];\n if (glyph.codePoints[0] === 0x2044) { // fraction slash\n let start = i - 1;\n let end = i + 1;\n\n // Apply numerator\n while (start >= 0 && unicode.isDigit(glyphs[start].codePoints[0])) {\n glyphs[start].features.numr = true;\n glyphs[start].features.frac = true;\n start--;\n }\n\n // Apply denominator\n while (end < glyphs.length && unicode.isDigit(glyphs[end].codePoints[0])) {\n glyphs[end].features.dnom = true;\n glyphs[end].features.frac = true;\n end++;\n }\n\n // Apply fraction slash\n glyph.features.frac = true;\n i = end - 1;\n\n } else {\n i++;\n }\n }\n }\n}\n","import DefaultShaper from './DefaultShaper';\nimport unicode from 'unicode-properties';\nimport UnicodeTrie from 'unicode-trie';\n\nconst trie = new UnicodeTrie(require('fs').readFileSync(__dirname + '/data.trie'));\nconst FEATURES = ['isol', 'fina', 'fin2', 'fin3', 'medi', 'med2', 'init'];\n\nconst ShapingClasses = {\n Non_Joining: 0,\n Left_Joining: 1,\n Right_Joining: 2,\n Dual_Joining: 3,\n Join_Causing: 3,\n ALAPH: 4,\n 'DALATH RISH': 5,\n Transparent: 6\n};\n\nconst ISOL = 'isol';\nconst FINA = 'fina';\nconst FIN2 = 'fin2';\nconst FIN3 = 'fin3';\nconst MEDI = 'medi';\nconst MED2 = 'med2';\nconst INIT = 'init';\nconst NONE = null;\n\n// Each entry is [prevAction, curAction, nextState]\nconst STATE_TABLE = [\n // Non_Joining, Left_Joining, Right_Joining, Dual_Joining, ALAPH, DALATH RISH\n // State 0: prev was U, not willing to join.\n [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ NONE, ISOL, 1 ], [ NONE, ISOL, 2 ], [ NONE, ISOL, 1 ], [ NONE, ISOL, 6 ] ],\n\n // State 1: prev was R or ISOL/ALAPH, not willing to join.\n [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ NONE, ISOL, 1 ], [ NONE, ISOL, 2 ], [ NONE, FIN2, 5 ], [ NONE, ISOL, 6 ] ],\n\n // State 2: prev was D/L in ISOL form, willing to join.\n [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ INIT, FINA, 1 ], [ INIT, FINA, 3 ], [ INIT, FINA, 4 ], [ INIT, FINA, 6 ] ],\n\n // State 3: prev was D in FINA form, willing to join.\n [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ MEDI, FINA, 1 ], [ MEDI, FINA, 3 ], [ MEDI, FINA, 4 ], [ MEDI, FINA, 6 ] ],\n\n // State 4: prev was FINA ALAPH, not willing to join.\n [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ MED2, ISOL, 1 ], [ MED2, ISOL, 2 ], [ MED2, FIN2, 5 ], [ MED2, ISOL, 6 ] ],\n\n // State 5: prev was FIN2/FIN3 ALAPH, not willing to join.\n [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ ISOL, ISOL, 1 ], [ ISOL, ISOL, 2 ], [ ISOL, FIN2, 5 ], [ ISOL, ISOL, 6 ] ],\n\n // State 6: prev was DALATH/RISH, not willing to join.\n [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ NONE, ISOL, 1 ], [ NONE, ISOL, 2 ], [ NONE, FIN3, 5 ], [ NONE, ISOL, 6 ] ]\n];\n\n/**\n * This is a shaper for Arabic, and other cursive scripts.\n * It uses data from ArabicShaping.txt in the Unicode database,\n * compiled to a UnicodeTrie by generate-data.coffee.\n *\n * The shaping state machine was ported from Harfbuzz.\n * https://github.com/behdad/harfbuzz/blob/master/src/hb-ot-shape-complex-arabic.cc\n */\nexport default class ArabicShaper extends DefaultShaper {\n static planFeatures(plan) {\n plan.add(['ccmp', 'locl']);\n for (let i = 0; i < FEATURES.length; i++) {\n let feature = FEATURES[i];\n plan.addStage(feature, false);\n }\n\n plan.addStage('mset');\n }\n\n static assignFeatures(plan, glyphs) {\n super.assignFeatures(plan, glyphs);\n\n let prev = -1;\n let state = 0;\n let actions = [];\n\n // Apply the state machine to map glyphs to features\n for (let i = 0; i < glyphs.length; i++) {\n let curAction, prevAction;\n var glyph = glyphs[i];\n let type = getShapingClass(glyph.codePoints[0]);\n if (type === ShapingClasses.Transparent) {\n actions[i] = NONE;\n continue;\n }\n\n [prevAction, curAction, state] = STATE_TABLE[state][type];\n\n if (prevAction !== NONE && prev !== -1) {\n actions[prev] = prevAction;\n }\n\n actions[i] = curAction;\n prev = i;\n }\n\n // Apply the chosen features to their respective glyphs\n for (let index = 0; index < glyphs.length; index++) {\n let feature;\n var glyph = glyphs[index];\n if (feature = actions[index]) {\n glyph.features[feature] = true;\n }\n }\n }\n}\n\nfunction getShapingClass(codePoint) {\n let res = trie.get(codePoint);\n if (res) {\n return res - 1;\n }\n\n let category = unicode.getCategory(codePoint);\n if (category === 'Mn' || category === 'Me' || category === 'Cf') {\n return ShapingClasses.Transparent;\n }\n\n return ShapingClasses.Non_Joining;\n}\n","export default class GlyphIterator {\n constructor(glyphs, flags) {\n this.glyphs = glyphs;\n this.reset(flags);\n }\n\n reset(flags = {}) {\n this.flags = flags;\n this.index = 0;\n }\n\n get cur() {\n return this.glyphs[this.index] || null;\n }\n\n shouldIgnore(glyph, flags) {\n return ((flags.ignoreMarks && glyph.isMark) ||\n (flags.ignoreBaseGlyphs && !glyph.isMark) ||\n (flags.ignoreLigatures && glyph.isLigature));\n }\n\n move(dir) {\n this.index += dir;\n while (0 <= this.index && this.index < this.glyphs.length && this.shouldIgnore(this.glyphs[this.index], this.flags)) {\n this.index += dir;\n }\n\n if (0 > this.index || this.index >= this.glyphs.length) {\n return null;\n }\n\n return this.glyphs[this.index];\n }\n\n next() {\n return this.move(+1);\n }\n\n prev() {\n return this.move(-1);\n }\n\n peek(count = 1) {\n let idx = this.index;\n let res = this.increment(count);\n this.index = idx;\n return res;\n }\n\n peekIndex(count = 1) {\n let idx = this.index;\n this.increment(count);\n let res = this.index;\n this.index = idx;\n return res;\n }\n\n increment(count = 1) {\n let dir = count < 0 ? -1 : 1;\n count = Math.abs(count);\n while (count--) {\n this.move(dir);\n }\n\n return this.glyphs[this.index];\n }\n}\n","import GlyphIterator from './GlyphIterator';\nimport * as Script from '../layout/Script';\n\nconst DEFAULT_SCRIPTS = ['DFLT', 'dflt', 'latn'];\n\nexport default class OTProcessor {\n constructor(font, table) {\n this.font = font;\n this.table = table;\n\n this.script = null;\n this.scriptTag = null;\n\n this.language = null;\n this.languageTag = null;\n\n this.features = {};\n this.lookups = {};\n\n // Setup variation substitutions\n this.variationsIndex = font._variationProcessor\n ? this.findVariationsIndex(font._variationProcessor.normalizedCoords)\n : -1;\n\n // initialize to default script + language\n this.selectScript();\n\n // current context (set by applyFeatures)\n this.glyphs = [];\n this.positions = []; // only used by GPOS\n this.ligatureID = 1;\n }\n\n findScript(script) {\n if (this.table.scriptList == null) {\n return null;\n }\n\n if (!Array.isArray(script)) {\n script = [ script ];\n }\n\n for (let entry of this.table.scriptList) {\n for (let s of script) {\n if (entry.tag === s) {\n return entry;\n }\n }\n }\n\n return null;\n }\n\n selectScript(script, language) {\n let changed = false;\n let entry;\n if (!this.script || script !== this.scriptTag) {\n entry = this.findScript(script);\n if (script) {\n entry = this.findScript(script);\n }\n\n if (!entry) {\n entry = this.findScript(DEFAULT_SCRIPTS);\n }\n\n if (!entry) {\n return;\n }\n\n this.scriptTag = entry.tag;\n this.script = entry.script;\n this.direction = Script.direction(script);\n this.language = null;\n changed = true;\n }\n\n if (!language && language !== this.langugeTag) {\n for (let lang of this.script.langSysRecords) {\n if (lang.tag === language) {\n this.language = lang.langSys;\n this.langugeTag = lang.tag;\n changed = true;\n break;\n }\n }\n }\n\n if (!this.language) {\n this.language = this.script.defaultLangSys;\n }\n\n // Build a feature lookup table\n if (changed) {\n this.features = {};\n if (this.language) {\n for (let featureIndex of this.language.featureIndexes) {\n let record = this.table.featureList[featureIndex];\n let substituteFeature = this.substituteFeatureForVariations(featureIndex);\n this.features[record.tag] = substituteFeature || record.feature;\n }\n }\n }\n }\n\n lookupsForFeatures(userFeatures = [], exclude) {\n let lookups = [];\n for (let tag of userFeatures) {\n let feature = this.features[tag];\n if (!feature) {\n continue;\n }\n\n for (let lookupIndex of feature.lookupListIndexes) {\n if (exclude && exclude.indexOf(lookupIndex) !== -1) {\n continue;\n }\n\n lookups.push({\n feature: tag,\n index: lookupIndex,\n lookup: this.table.lookupList.get(lookupIndex)\n });\n }\n }\n\n lookups.sort((a, b) => a.index - b.index);\n return lookups;\n }\n\n substituteFeatureForVariations(featureIndex) {\n if (this.variationsIndex === -1) {\n return null;\n }\n\n let record = this.table.featureVariations.featureVariationRecords[this.variationsIndex];\n let substitutions = record.featureTableSubstitution.substitutions;\n for (let substitution of substitutions) {\n if (substitution.featureIndex === featureIndex) {\n return substitution.alternateFeatureTable;\n }\n }\n\n return null;\n }\n\n findVariationsIndex(coords) {\n let variations = this.table.featureVariations;\n if (!variations) {\n return -1;\n }\n\n let records = variations.featureVariationRecords;\n for (let i = 0; i < records.length; i++) {\n let conditions = records[i].conditionSet.conditionTable;\n if (this.variationConditionsMatch(conditions, coords)) {\n return i;\n }\n }\n\n return -1;\n }\n\n variationConditionsMatch(conditions, coords) {\n return conditions.every(condition => {\n let coord = condition.axisIndex < coords.length ? coords[condition.axisIndex] : 0;\n return condition.filterRangeMinValue <= coord && coord <= condition.filterRangeMaxValue;\n });\n }\n\n applyFeatures(userFeatures, glyphs, advances) {\n let lookups = this.lookupsForFeatures(userFeatures);\n this.applyLookups(lookups, glyphs, advances);\n }\n\n applyLookups(lookups, glyphs, positions) {\n this.glyphs = glyphs;\n this.positions = positions;\n this.glyphIterator = new GlyphIterator(glyphs);\n\n for (let {feature, lookup} of lookups) {\n this.glyphIterator.reset(lookup.flags);\n\n while (this.glyphIterator.index < glyphs.length) {\n if (!(feature in this.glyphIterator.cur.features)) {\n this.glyphIterator.next();\n continue;\n }\n\n for (let table of lookup.subTables) {\n let res = this.applyLookup(lookup.lookupType, table);\n if (res) {\n break;\n }\n }\n\n this.glyphIterator.next();\n }\n }\n }\n\n applyLookup(lookup, table) {\n throw new Error(\"applyLookup must be implemented by subclasses\");\n }\n\n applyLookupList(lookupRecords) {\n let glyphIndex = this.glyphIterator.index;\n\n for (let lookupRecord of lookupRecords) {\n this.glyphIterator.index = glyphIndex;\n this.glyphIterator.increment(lookupRecord.sequenceIndex);\n\n let lookup = this.table.lookupList.get(lookupRecord.lookupListIndex);\n for (let table of lookup.subTables) {\n this.applyLookup(lookup.lookupType, table);\n }\n }\n\n this.glyphIterator.index = glyphIndex;\n return true;\n }\n\n coverageIndex(coverage, glyph) {\n if (glyph == null) {\n glyph = this.glyphIterator.cur.id;\n }\n\n switch (coverage.version) {\n case 1:\n return coverage.glyphs.indexOf(glyph);\n\n case 2:\n for (let range of coverage.rangeRecords) {\n if (range.start <= glyph && glyph <= range.end) {\n return range.startCoverageIndex + glyph - range.start;\n }\n }\n\n break;\n }\n\n return -1;\n }\n\n match(sequenceIndex, sequence, fn, matched) {\n let pos = this.glyphIterator.index;\n let glyph = this.glyphIterator.increment(sequenceIndex);\n let idx = 0;\n\n while (idx < sequence.length && glyph && fn(sequence[idx], glyph.id)) {\n if (matched) {\n matched.push(this.glyphIterator.index);\n }\n\n idx++;\n glyph = this.glyphIterator.next();\n }\n\n this.glyphIterator.index = pos;\n if (idx < sequence.length) {\n return false;\n }\n\n return matched || true;\n }\n\n sequenceMatches(sequenceIndex, sequence) {\n return this.match(sequenceIndex, sequence, (component, glyph) => component === glyph);\n }\n\n sequenceMatchIndices(sequenceIndex, sequence) {\n return this.match(sequenceIndex, sequence, (component, glyph) => component === glyph, []);\n }\n\n coverageSequenceMatches(sequenceIndex, sequence) {\n return this.match(sequenceIndex, sequence, (coverage, glyph) =>\n this.coverageIndex(coverage, glyph) >= 0\n );\n }\n\n getClassID(glyph, classDef) {\n switch (classDef.version) {\n case 1: // Class array\n let i = glyph - classDef.startGlyph;\n if (i >= 0 && i < classDef.classValueArray.length) {\n return classDef.classValueArray[i];\n }\n\n break;\n\n case 2:\n for (let range of classDef.classRangeRecord) {\n if (range.start <= glyph && glyph <= range.end) {\n return range.class;\n }\n }\n\n break;\n }\n\n return 0;\n }\n\n classSequenceMatches(sequenceIndex, sequence, classDef) {\n return this.match(sequenceIndex, sequence, (classID, glyph) =>\n classID === this.getClassID(glyph, classDef)\n );\n }\n\n applyContext(table) {\n switch (table.version) {\n case 1:\n let index = this.coverageIndex(table.coverage);\n if (index === -1) {\n return false;\n }\n\n let set = table.ruleSets[index];\n for (let rule of set) {\n if (this.sequenceMatches(1, rule.input)) {\n return this.applyLookupList(rule.lookupRecords);\n }\n }\n\n break;\n\n case 2:\n if (this.coverageIndex(table.coverage) === -1) {\n return false;\n }\n\n index = this.getClassID(this.glyphIterator.cur.id, table.classDef);\n if (index === -1) {\n return false;\n }\n\n set = table.classSet[index];\n for (let rule of set) {\n if (this.classSequenceMatches(1, rule.classes, table.classDef)) {\n return this.applyLookupList(rule.lookupRecords);\n }\n }\n\n break;\n\n case 3:\n if (this.coverageSequenceMatches(0, table.coverages)) {\n return this.applyLookupList(table.lookupRecords);\n }\n\n break;\n }\n\n return false;\n }\n\n applyChainingContext(table) {\n switch (table.version) {\n case 1:\n let index = this.coverageIndex(table.coverage);\n if (index === -1) {\n return false;\n }\n\n let set = table.chainRuleSets[index];\n for (let rule of set) {\n if (this.sequenceMatches(-rule.backtrack.length, rule.backtrack)\n && this.sequenceMatches(1, rule.input)\n && this.sequenceMatches(1 + rule.input.length, rule.lookahead)) {\n return this.applyLookupList(rule.lookupRecords);\n }\n }\n\n break;\n\n case 2:\n if (this.coverageIndex(table.coverage) === -1) {\n return false;\n }\n\n index = this.getClassID(this.glyphIterator.cur.id, table.inputClassDef);\n let rules = table.chainClassSet[index];\n if (!rules) {\n return false;\n }\n\n for (let rule of rules) {\n if (this.classSequenceMatches(-rule.backtrack.length, rule.backtrack, table.backtrackClassDef) &&\n this.classSequenceMatches(1, rule.input, table.inputClassDef) &&\n this.classSequenceMatches(1 + rule.input.length, rule.lookahead, table.lookaheadClassDef)) {\n return this.applyLookupList(rule.lookupRecords);\n }\n }\n\n break;\n\n case 3:\n if (this.coverageSequenceMatches(-table.backtrackGlyphCount, table.backtrackCoverage) &&\n this.coverageSequenceMatches(0, table.inputCoverage) &&\n this.coverageSequenceMatches(table.inputGlyphCount, table.lookaheadCoverage)) {\n return this.applyLookupList(table.lookupRecords);\n }\n\n break;\n }\n\n return false;\n }\n}\n","import unicode from 'unicode-properties';\nimport OTProcessor from './OTProcessor';\n\nexport default class GlyphInfo {\n constructor(font, id, codePoints = [], features = []) {\n this._font = font;\n this.codePoints = codePoints;\n this.id = id;\n\n this.features = {};\n if (Array.isArray(features)) {\n for (let i = 0; i < features.length; i++) {\n let feature = features[i];\n this.features[feature] = true;\n }\n } else if (typeof features === 'object') {\n Object.assign(this.features, features);\n }\n\n this.ligatureID = null;\n this.ligatureComponent = null;\n this.ligated = false;\n this.cursiveAttachment = null;\n this.markAttachment = null;\n this.shaperInfo = null;\n this.substituted = false;\n }\n\n get id() {\n return this._id;\n }\n\n set id(id) {\n this._id = id;\n this.substituted = true;\n\n if (this._font.GDEF && this._font.GDEF.glyphClassDef) {\n // TODO: clean this up\n let classID = OTProcessor.prototype.getClassID(id, this._font.GDEF.glyphClassDef);\n this.isMark = classID === 3;\n this.isLigature = classID === 2;\n } else {\n this.isMark = this.codePoints.every(unicode.isMark);\n this.isLigature = this.codePoints.length > 1;\n }\n }\n}\n","import DefaultShaper from './DefaultShaper';\nimport GlyphInfo from '../GlyphInfo';\n\n/**\n * This is a shaper for the Hangul script, used by the Korean language.\n * It does the following:\n * - decompose if unsupported by the font:\n * -> \n * -> \n * -> \n *\n * - compose if supported by the font:\n * -> \n * -> \n * -> \n *\n * - reorder tone marks (S is any valid syllable):\n * -> \n *\n * - apply ljmo, vjmo, and tjmo OpenType features to decomposed Jamo sequences.\n *\n * This logic is based on the following documents:\n * - http://www.microsoft.com/typography/OpenTypeDev/hangul/intro.htm\n * - http://ktug.org/~nomos/harfbuzz-hangul/hangulshaper.pdf\n */\nexport default class HangulShaper extends DefaultShaper {\n static zeroMarkWidths = 'NONE';\n static planFeatures(plan) {\n plan.add(['ljmo', 'vjmo', 'tjmo'], false);\n }\n\n static assignFeatures(plan, glyphs) {\n let state = 0;\n let i = 0;\n while (i < glyphs.length) {\n let action;\n let glyph = glyphs[i];\n let code = glyph.codePoints[0];\n let type = getType(code);\n\n [ action, state ] = STATE_TABLE[state][type];\n\n switch (action) {\n case DECOMPOSE:\n // Decompose the composed syllable if it is not supported by the font.\n if (!plan.font.hasGlyphForCodePoint(code)) {\n i = decompose(glyphs, i, plan.font);\n }\n break;\n\n case COMPOSE:\n // Found a decomposed syllable. Try to compose if supported by the font.\n i = compose(glyphs, i, plan.font);\n break;\n\n case TONE_MARK:\n // Got a valid syllable, followed by a tone mark. Move the tone mark to the beginning of the syllable.\n reorderToneMark(glyphs, i, plan.font);\n break;\n\n case INVALID:\n // Tone mark has no valid syllable to attach to, so insert a dotted circle\n i = insertDottedCircle(glyphs, i, plan.font);\n break;\n }\n\n i++;\n }\n }\n}\n\nconst HANGUL_BASE = 0xac00;\nconst HANGUL_END = 0xd7a4;\nconst HANGUL_COUNT = HANGUL_END - HANGUL_BASE + 1;\nconst L_BASE = 0x1100; // lead\nconst V_BASE = 0x1161; // vowel\nconst T_BASE = 0x11a7; // trail\nconst L_COUNT = 19;\nconst V_COUNT = 21;\nconst T_COUNT = 28;\nconst L_END = L_BASE + L_COUNT - 1;\nconst V_END = V_BASE + V_COUNT - 1;\nconst T_END = T_BASE + T_COUNT - 1;\nconst DOTTED_CIRCLE = 0x25cc;\n\nconst isL = code => 0x1100 <= code && code <= 0x115f || 0xa960 <= code && code <= 0xa97c;\nconst isV = code => 0x1160 <= code && code <= 0x11a7 || 0xd7b0 <= code && code <= 0xd7c6;\nconst isT = code => 0x11a8 <= code && code <= 0x11ff || 0xd7cb <= code && code <= 0xd7fb;\nconst isTone = code => 0x302e <= code && code <= 0x302f;\nconst isLVT = code => HANGUL_BASE <= code && code <= HANGUL_END;\nconst isLV = code => (code - HANGUL_BASE) < HANGUL_COUNT && (code - HANGUL_BASE) % T_COUNT === 0;\nconst isCombiningL = code => L_BASE <= code && code <= L_END;\nconst isCombiningV = code => V_BASE <= code && code <= V_END;\nconst isCombiningT = code => T_BASE + 1 && 1 <= code && code <= T_END;\n\n// Character categories\nconst X = 0; // Other character\nconst L = 1; // Leading consonant\nconst V = 2; // Medial vowel\nconst T = 3; // Trailing consonant\nconst LV = 4; // Composed syllable\nconst LVT = 5; // Composed syllable\nconst M = 6; // Tone mark\n\n// This function classifies a character using the above categories.\nfunction getType(code) {\n if (isL(code)) { return L; }\n if (isV(code)) { return V; }\n if (isT(code)) { return T; }\n if (isLV(code)) { return LV; }\n if (isLVT(code)) { return LVT; }\n if (isTone(code)) { return M; }\n return X;\n}\n\n// State machine actions\nconst NO_ACTION = 0;\nconst DECOMPOSE = 1;\nconst COMPOSE = 2;\nconst TONE_MARK = 4;\nconst INVALID = 5;\n\n// Build a state machine that accepts valid syllables, and applies actions along the way.\n// The logic this is implementing is documented at the top of the file.\nconst STATE_TABLE = [\n // X L V T LV LVT M\n // State 0: start state\n [ [ NO_ACTION, 0 ], [ NO_ACTION, 1 ], [ NO_ACTION, 0 ], [ NO_ACTION, 0 ], [ DECOMPOSE, 2 ], [ DECOMPOSE, 3 ], [ INVALID, 0 ] ],\n\n // State 1: \n [ [ NO_ACTION, 0 ], [ NO_ACTION, 1 ], [ COMPOSE, 2 ], [ NO_ACTION, 0 ], [ DECOMPOSE, 2 ], [ DECOMPOSE, 3 ], [ INVALID, 0 ] ],\n\n // State 2: or \n [ [ NO_ACTION, 0 ], [ NO_ACTION, 1 ], [ NO_ACTION, 0 ], [ COMPOSE, 3 ], [ DECOMPOSE, 2 ], [ DECOMPOSE, 3 ], [ TONE_MARK, 0 ] ],\n\n // State 3: or \n [ [ NO_ACTION, 0 ], [ NO_ACTION, 1 ], [ NO_ACTION, 0 ], [ NO_ACTION, 0 ], [ DECOMPOSE, 2 ], [ DECOMPOSE, 3 ], [ TONE_MARK, 0 ] ]\n];\n\nfunction getGlyph(font, code, features) {\n return new GlyphInfo(font, font.glyphForCodePoint(code).id, [code], features);\n}\n\nfunction decompose(glyphs, i, font) {\n let glyph = glyphs[i];\n let code = glyph.codePoints[0];\n\n let s = code - HANGUL_BASE;\n let t = T_BASE + s % T_COUNT;\n s = s / T_COUNT | 0;\n let l = L_BASE + s / V_COUNT | 0;\n let v = V_BASE + s % V_COUNT;\n\n // Don't decompose if all of the components are not available\n if (!font.hasGlyphForCodePoint(l) ||\n !font.hasGlyphForCodePoint(v) ||\n (t !== T_BASE && !font.hasGlyphForCodePoint(t))) {\n return i;\n }\n\n // Replace the current glyph with decomposed L, V, and T glyphs,\n // and apply the proper OpenType features to each component.\n let ljmo = getGlyph(font, l, glyph.features);\n ljmo.features.ljmo = true;\n\n let vjmo = getGlyph(font, v, glyph.features);\n vjmo.features.vjmo = true;\n\n let insert = [ ljmo, vjmo ];\n\n if (t > T_BASE) {\n let tjmo = getGlyph(font, t, glyph.features);\n tjmo.features.tjmo = true;\n insert.push(tjmo);\n }\n\n glyphs.splice(i, 1, ...insert);\n return i + insert.length - 1;\n}\n\nfunction compose(glyphs, i, font) {\n let glyph = glyphs[i];\n let code = glyphs[i].codePoints[0];\n let type = getType(code);\n\n let prev = glyphs[i - 1].codePoints[0];\n let prevType = getType(prev);\n\n // Figure out what type of syllable we're dealing with\n let lv, ljmo, vjmo, tjmo;\n if (prevType === LV && type === T) {\n // \n lv = prev;\n tjmo = glyph;\n } else {\n if (type === V) {\n // \n ljmo = glyphs[i - 1];\n vjmo = glyph;\n } else {\n // \n ljmo = glyphs[i - 2];\n vjmo = glyphs[i - 1];\n tjmo = glyph;\n }\n\n let l = ljmo.codePoints[0];\n let v = vjmo.codePoints[0];\n\n // Make sure L and V are combining characters\n if (isCombiningL(l) && isCombiningV(v)) {\n lv = HANGUL_BASE + ((l - L_BASE) * V_COUNT + (v - V_BASE)) * T_COUNT;\n }\n }\n\n let t = (tjmo && tjmo.codePoints[0]) || T_BASE;\n if ((lv != null) && (t === T_BASE || isCombiningT(t))) {\n let s = lv + (t - T_BASE);\n\n // Replace with a composed glyph if supported by the font,\n // otherwise apply the proper OpenType features to each component.\n if (font.hasGlyphForCodePoint(s)) {\n let del = prevType === V ? 3 : 2;\n glyphs.splice(i - del + 1, del, getGlyph(font, s, glyph.features));\n return i - del + 1;\n }\n }\n\n // Didn't compose (either a non-combining component or unsupported by font).\n if (ljmo) { ljmo.features.ljmo = true; }\n if (vjmo) { vjmo.features.vjmo = true; }\n if (tjmo) { tjmo.features.tjmo = true; }\n\n if (prevType === LV) {\n // Sequence was originally , which got combined earlier.\n // Either the T was non-combining, or the LVT glyph wasn't supported.\n // Decompose the glyph again and apply OT features.\n decompose(glyphs, i - 1, font);\n return i + 1;\n }\n\n return i;\n}\n\nfunction getLength(code) {\n switch (getType(code)) {\n case LV:\n case LVT:\n return 1;\n case V:\n return 2;\n case T:\n return 3;\n }\n}\n\nfunction reorderToneMark(glyphs, i, font) {\n let glyph = glyphs[i];\n let code = glyphs[i].codePoints[0];\n\n // Move tone mark to the beginning of the previous syllable, unless it is zero width\n if (font.glyphForCodePoint(code).advanceWidth === 0) { return; }\n\n let prev = glyphs[i - 1].codePoints[0];\n let len = getLength(prev);\n\n glyphs.splice(i, 1);\n return glyphs.splice(i - len, 0, glyph);\n}\n\nfunction insertDottedCircle(glyphs, i, font) {\n let glyph = glyphs[i];\n let code = glyphs[i].codePoints[0];\n\n if (font.hasGlyphForCodePoint(DOTTED_CIRCLE)) {\n let dottedCircle = getGlyph(font, DOTTED_CIRCLE, glyph.features);\n\n // If the tone mark is zero width, insert the dotted circle before, otherwise after\n let idx = font.glyphForCodePoint(code).advanceWidth === 0 ? i : i + 1;\n glyphs.splice(idx, 0, dottedCircle);\n i++;\n }\n\n return i;\n}\n","import DefaultShaper from './DefaultShaper';\nimport StateMachine from 'dfa';\nimport UnicodeTrie from 'unicode-trie';\nimport GlyphInfo from '../GlyphInfo';\nimport useData from './use.json';\n\nconst {categories, decompositions} = useData;\nconst trie = new UnicodeTrie(require('fs').readFileSync(__dirname + '/use.trie'));\nconst stateMachine = new StateMachine(useData);\n\n/**\n * This shaper is an implementation of the Universal Shaping Engine, which\n * uses Unicode data to shape a number of scripts without a dedicated shaping engine.\n * See https://www.microsoft.com/typography/OpenTypeDev/USE/intro.htm.\n */\nexport default class UniversalShaper extends DefaultShaper {\n static zeroMarkWidths = 'BEFORE_GPOS';\n static planFeatures(plan) {\n plan.addStage(setupSyllables);\n\n // Default glyph pre-processing group\n plan.addStage(['locl', 'ccmp', 'nukt', 'akhn']);\n\n // Reordering group\n plan.addStage(clearSubstitutionFlags);\n plan.addStage(['rphf'], false);\n plan.addStage(recordRphf);\n plan.addStage(clearSubstitutionFlags);\n plan.addStage(['pref']);\n plan.addStage(recordPref);\n\n // Orthographic unit shaping group\n plan.addStage(['rkrf', 'abvf', 'blwf', 'half', 'pstf', 'vatu', 'cjct']);\n plan.addStage(reorder);\n\n // Topographical features\n // Scripts that need this are handled by the Arabic shaper, not implemented here for now.\n // plan.addStage(['isol', 'init', 'medi', 'fina', 'med2', 'fin2', 'fin3'], false);\n\n // Standard topographic presentation and positional feature application\n plan.addStage(['abvs', 'blws', 'pres', 'psts', 'dist', 'abvm', 'blwm']);\n }\n\n static assignFeatures(plan, glyphs) {\n // Decompose split vowels\n // TODO: do this in a more general unicode normalizer\n for (let i = glyphs.length - 1; i >= 0; i--) {\n let codepoint = glyphs[i].codePoints[0];\n if (decompositions[codepoint]) {\n let decomposed = decompositions[codepoint].map(c => {\n let g = plan.font.glyphForCodePoint(c);\n return new GlyphInfo(plan.font, g.id, [c], glyphs[i].features);\n });\n\n glyphs.splice(i, 1, ...decomposed);\n }\n }\n }\n}\n\nfunction useCategory(glyph) {\n return trie.get(glyph.codePoints[0]);\n}\n\nclass USEInfo {\n constructor(category, syllableType, syllable) {\n this.category = category;\n this.syllableType = syllableType;\n this.syllable = syllable;\n }\n}\n\nfunction setupSyllables(font, glyphs) {\n let syllable = 0;\n for (let [start, end, tags] of stateMachine.match(glyphs.map(useCategory))) {\n ++syllable;\n\n // Create shaper info\n for (let i = start; i <= end; i++) {\n glyphs[i].shaperInfo = new USEInfo(categories[useCategory(glyphs[i])], tags[0], syllable);\n }\n\n // Assign rphf feature\n let limit = glyphs[start].shaperInfo.category === 'R' ? 1 : Math.min(3, end - start);\n for (let i = start; i < start + limit; i++) {\n glyphs[i].features.rphf = true;\n }\n }\n}\n\nfunction clearSubstitutionFlags(font, glyphs) {\n for (let glyph of glyphs) {\n glyph.substituted = false;\n }\n}\n\nfunction recordRphf(font, glyphs) {\n for (let glyph of glyphs) {\n if (glyph.substituted && glyph.features.rphf) {\n // Mark a substituted repha.\n glyph.shaperInfo.category = 'R';\n }\n }\n}\n\nfunction recordPref(font, glyphs) {\n for (let glyph of glyphs) {\n if (glyph.substituted) {\n // Mark a substituted pref as VPre, as they behave the same way.\n glyph.shaperInfo.category = 'VPre';\n }\n }\n}\n\nfunction reorder(font, glyphs) {\n let dottedCircle = font.glyphForCodePoint(0x25cc).id;\n\n for (let start = 0, end = nextSyllable(glyphs, 0); start < glyphs.length; start = end, end = nextSyllable(glyphs, start)) {\n let i, j;\n let info = glyphs[start].shaperInfo;\n let type = info.syllableType;\n\n // Only a few syllable types need reordering.\n if (type !== 'virama_terminated_cluster' && type !== 'standard_cluster' && type !== 'broken_cluster') {\n continue;\n }\n\n // Insert a dotted circle glyph in broken clusters.\n if (type === 'broken_cluster' && dottedCircle) {\n let g = new GlyphInfo(font, dottedCircle, [0x25cc]);\n g.shaperInfo = info;\n\n // Insert after possible Repha.\n for (i = start; i < end && glyphs[i].shaperInfo.category === 'R'; i++);\n glyphs.splice(++i, 0, g);\n end++;\n }\n\n // Move things forward.\n if (info.category === 'R' && end - start > 1) {\n // Got a repha. Reorder it to after first base, before first halant.\n for (i = start + 1; i < end; i++) {\n info = glyphs[i].shaperInfo;\n if (isBase(info) || isHalant(glyphs[i])) {\n // If we hit a halant, move before it; otherwise it's a base: move to it's\n // place, and shift things in between backward.\n if (isHalant(glyphs[i])) {\n i--;\n }\n\n glyphs.splice(start, 0, ...glyphs.splice(start + 1, i - start), glyphs[i]);\n break;\n }\n }\n }\n\n // Move things back.\n for (i = start, j = end; i < end; i++) {\n info = glyphs[i].shaperInfo;\n if (isBase(info) || isHalant(glyphs[i])) {\n // If we hit a halant, move after it; otherwise it's a base: move to it's\n // place, and shift things in between backward.\n j = isHalant(glyphs[i]) ? i + 1 : i;\n } else if ((info.category === 'VPre' || info.category === 'VMPre') && j < i) {\n glyphs.splice(j, 1, glyphs[i], ...glyphs.splice(j, i - j));\n }\n }\n }\n}\n\nfunction nextSyllable(glyphs, start) {\n if (start >= glyphs.length) return start;\n let syllable = glyphs[start].shaperInfo.syllable;\n while (++start < glyphs.length && glyphs[start].shaperInfo.syllable === syllable);\n return start;\n}\n\nfunction isHalant(glyph) {\n return glyph.shaperInfo.category === 'H' && !glyph.isLigated;\n}\n\nfunction isBase(info) {\n return info.category === 'B' || info.category === 'GB';\n}\n","import DefaultShaper from './DefaultShaper';\nimport ArabicShaper from './ArabicShaper';\nimport HangulShaper from './HangulShaper';\nimport UniversalShaper from './UniversalShaper';\n\nconst SHAPERS = {\n arab: ArabicShaper, // Arabic\n mong: ArabicShaper, // Mongolian\n syrc: ArabicShaper, // Syriac\n 'nko ': ArabicShaper, // N'Ko\n phag: ArabicShaper, // Phags Pa\n mand: ArabicShaper, // Mandaic\n mani: ArabicShaper, // Manichaean\n phlp: ArabicShaper, // Psalter Pahlavi\n\n hang: HangulShaper, // Hangul\n\n bali: UniversalShaper, // Balinese\n batk: UniversalShaper, // Batak\n brah: UniversalShaper, // Brahmi\n bugi: UniversalShaper, // Buginese\n buhd: UniversalShaper, // Buhid\n cakm: UniversalShaper, // Chakma\n cham: UniversalShaper, // Cham\n dupl: UniversalShaper, // Duployan\n egyp: UniversalShaper, // Egyptian Hieroglyphs\n gran: UniversalShaper, // Grantha\n hano: UniversalShaper, // Hanunoo\n java: UniversalShaper, // Javanese\n kthi: UniversalShaper, // Kaithi\n kali: UniversalShaper, // Kayah Li\n khar: UniversalShaper, // Kharoshthi\n khoj: UniversalShaper, // Khojki\n sind: UniversalShaper, // Khudawadi\n lepc: UniversalShaper, // Lepcha\n limb: UniversalShaper, // Limbu\n mahj: UniversalShaper, // Mahajani\n // mand: UniversalShaper, // Mandaic\n // mani: UniversalShaper, // Manichaean\n mtei: UniversalShaper, // Meitei Mayek\n modi: UniversalShaper, // Modi\n // mong: UniversalShaper, // Mongolian\n // 'nko ': UniversalShaper, // N’Ko\n hmng: UniversalShaper, // Pahawh Hmong\n // phag: UniversalShaper, // Phags-pa\n // phlp: UniversalShaper, // Psalter Pahlavi\n rjng: UniversalShaper, // Rejang\n saur: UniversalShaper, // Saurashtra\n shrd: UniversalShaper, // Sharada\n sidd: UniversalShaper, // Siddham\n sinh: UniversalShaper, // Sinhala\n sund: UniversalShaper, // Sundanese\n sylo: UniversalShaper, // Syloti Nagri\n tglg: UniversalShaper, // Tagalog\n tagb: UniversalShaper, // Tagbanwa\n tale: UniversalShaper, // Tai Le\n lana: UniversalShaper, // Tai Tham\n tavt: UniversalShaper, // Tai Viet\n takr: UniversalShaper, // Takri\n tibt: UniversalShaper, // Tibetan\n tfng: UniversalShaper, // Tifinagh\n tirh: UniversalShaper, // Tirhuta\n\n latn: DefaultShaper, // Latin\n DFLT: DefaultShaper // Default\n};\n\nexport function choose(script) {\n let shaper = SHAPERS[script];\n if (shaper) { return shaper; }\n\n return DefaultShaper;\n}\n","import OTProcessor from './OTProcessor';\nimport GlyphInfo from './GlyphInfo';\n\nexport default class GSUBProcessor extends OTProcessor {\n applyLookup(lookupType, table) {\n switch (lookupType) {\n case 1: { // Single Substitution\n let index = this.coverageIndex(table.coverage);\n if (index === -1) {\n return false;\n }\n\n let glyph = this.glyphIterator.cur;\n switch (table.version) {\n case 1:\n glyph.id = (glyph.id + table.deltaGlyphID) & 0xffff;\n break;\n\n case 2:\n glyph.id = table.substitute.get(index);\n break;\n }\n\n return true;\n }\n\n case 2: { // Multiple Substitution\n let index = this.coverageIndex(table.coverage);\n if (index !== -1) {\n let sequence = table.sequences.get(index);\n this.glyphIterator.cur.id = sequence[0];\n this.glyphIterator.cur.ligatureComponent = 0;\n\n let features = this.glyphIterator.cur.features;\n let curGlyph = this.glyphIterator.cur;\n let replacement = sequence.slice(1).map((gid, i) => {\n let glyph = new GlyphInfo(this.font, gid, undefined, features);\n glyph.shaperInfo = curGlyph.shaperInfo;\n glyph.isLigated = curGlyph.isLigated;\n glyph.ligatureComponent = i + 1;\n glyph.substituted = true;\n return glyph;\n });\n\n this.glyphs.splice(this.glyphIterator.index + 1, 0, ...replacement);\n return true;\n }\n\n return false;\n }\n\n case 3: { // Alternate Substitution\n let index = this.coverageIndex(table.coverage);\n if (index !== -1) {\n let USER_INDEX = 0; // TODO\n this.glyphIterator.cur.id = table.alternateSet.get(index)[USER_INDEX];\n return true;\n }\n\n return false;\n }\n\n case 4: { // Ligature Substitution\n let index = this.coverageIndex(table.coverage);\n if (index === -1) {\n return false;\n }\n\n for (let ligature of table.ligatureSets.get(index)) {\n let matched = this.sequenceMatchIndices(1, ligature.components);\n if (!matched) {\n continue;\n }\n\n let curGlyph = this.glyphIterator.cur;\n\n // Concatenate all of the characters the new ligature will represent\n let characters = curGlyph.codePoints.slice();\n for (let index of matched) {\n characters.push(...this.glyphs[index].codePoints);\n }\n\n // Create the replacement ligature glyph\n let ligatureGlyph = new GlyphInfo(this.font, ligature.glyph, characters, curGlyph.features);\n ligatureGlyph.shaperInfo = curGlyph.shaperInfo;\n ligatureGlyph.isLigated = true;\n ligatureGlyph.substituted = true;\n\n // From Harfbuzz:\n // - If it *is* a mark ligature, we don't allocate a new ligature id, and leave\n // the ligature to keep its old ligature id. This will allow it to attach to\n // a base ligature in GPOS. Eg. if the sequence is: LAM,LAM,SHADDA,FATHA,HEH,\n // and LAM,LAM,HEH for a ligature, they will leave SHADDA and FATHA with a\n // ligature id and component value of 2. Then if SHADDA,FATHA form a ligature\n // later, we don't want them to lose their ligature id/component, otherwise\n // GPOS will fail to correctly position the mark ligature on top of the\n // LAM,LAM,HEH ligature. See https://bugzilla.gnome.org/show_bug.cgi?id=676343\n //\n // - If a ligature is formed of components that some of which are also ligatures\n // themselves, and those ligature components had marks attached to *their*\n // components, we have to attach the marks to the new ligature component\n // positions! Now *that*'s tricky! And these marks may be following the\n // last component of the whole sequence, so we should loop forward looking\n // for them and update them.\n //\n // Eg. the sequence is LAM,LAM,SHADDA,FATHA,HEH, and the font first forms a\n // 'calt' ligature of LAM,HEH, leaving the SHADDA and FATHA with a ligature\n // id and component == 1. Now, during 'liga', the LAM and the LAM-HEH ligature\n // form a LAM-LAM-HEH ligature. We need to reassign the SHADDA and FATHA to\n // the new ligature with a component value of 2.\n //\n // This in fact happened to a font... See https://bugzilla.gnome.org/show_bug.cgi?id=437633\n let isMarkLigature = curGlyph.isMark;\n for (let i = 0; i < matched.length && isMarkLigature; i++) {\n isMarkLigature = this.glyphs[matched[i]].isMark;\n }\n\n ligatureGlyph.ligatureID = isMarkLigature ? null : this.ligatureID++;\n\n let lastLigID = curGlyph.ligatureID;\n let lastNumComps = curGlyph.codePoints.length;\n let curComps = lastNumComps;\n let idx = this.glyphIterator.index + 1;\n\n // Set ligatureID and ligatureComponent on glyphs that were skipped in the matched sequence.\n // This allows GPOS to attach marks to the correct ligature components.\n for (let matchIndex of matched) {\n // Don't assign new ligature components for mark ligatures (see above)\n if (isMarkLigature) {\n idx = matchIndex;\n } else {\n while (idx < matchIndex) {\n var ligatureComponent = curComps - lastNumComps + Math.min(this.glyphs[idx].ligatureComponent || 1, lastNumComps);\n this.glyphs[idx].ligatureID = ligatureGlyph.ligatureID;\n this.glyphs[idx].ligatureComponent = ligatureComponent;\n idx++;\n }\n }\n\n lastLigID = this.glyphs[idx].ligatureID;\n lastNumComps = this.glyphs[idx].codePoints.length;\n curComps += lastNumComps;\n idx++; // skip base glyph\n }\n\n // Adjust ligature components for any marks following\n if (lastLigID && !isMarkLigature) {\n for (let i = idx; i < this.glyphs.length; i++) {\n if (this.glyphs[i].ligatureID === lastLigID) {\n var ligatureComponent = curComps - lastNumComps + Math.min(this.glyphs[i].ligatureComponent || 1, lastNumComps);\n this.glyphs[i].ligatureComponent = ligatureComponent;\n } else {\n break;\n }\n }\n }\n\n // Delete the matched glyphs, and replace the current glyph with the ligature glyph\n for (let i = matched.length - 1; i >= 0; i--) {\n this.glyphs.splice(matched[i], 1);\n }\n\n this.glyphs[this.glyphIterator.index] = ligatureGlyph;\n return true;\n }\n\n return false;\n }\n\n case 5: // Contextual Substitution\n return this.applyContext(table);\n\n case 6: // Chaining Contextual Substitution\n return this.applyChainingContext(table);\n\n case 7: // Extension Substitution\n return this.applyLookup(table.lookupType, table.extension);\n\n default:\n throw new Error(`GSUB lookupType ${lookupType} is not supported`);\n }\n }\n}\n","import OTProcessor from './OTProcessor';\n\nexport default class GPOSProcessor extends OTProcessor {\n applyPositionValue(sequenceIndex, value) {\n let position = this.positions[this.glyphIterator.peekIndex(sequenceIndex)];\n if (value.xAdvance != null) {\n position.xAdvance += value.xAdvance;\n }\n\n if (value.yAdvance != null) {\n position.yAdvance += value.yAdvance;\n }\n\n if (value.xPlacement != null) {\n position.xOffset += value.xPlacement;\n }\n\n if (value.yPlacement != null) {\n position.yOffset += value.yPlacement;\n }\n\n // TODO: device tables\n }\n\n applyLookup(lookupType, table) {\n switch (lookupType) {\n case 1: { // Single positioning value\n let index = this.coverageIndex(table.coverage);\n if (index === -1) {\n return false;\n }\n\n switch (table.version) {\n case 1:\n this.applyPositionValue(0, table.value);\n break;\n\n case 2:\n this.applyPositionValue(0, table.values.get(index));\n break;\n }\n\n return true;\n }\n\n case 2: { // Pair Adjustment Positioning\n let nextGlyph = this.glyphIterator.peek();\n if (!nextGlyph) {\n return false;\n }\n\n let index = this.coverageIndex(table.coverage);\n if (index === -1) {\n return false;\n }\n\n switch (table.version) {\n case 1: // Adjustments for glyph pairs\n let set = table.pairSets.get(index);\n\n for (let pair of set) {\n if (pair.secondGlyph === nextGlyph.id) {\n this.applyPositionValue(0, pair.value1);\n this.applyPositionValue(1, pair.value2);\n return true;\n }\n }\n\n return false;\n\n case 2: // Class pair adjustment\n let class1 = this.getClassID(this.glyphIterator.cur.id, table.classDef1);\n let class2 = this.getClassID(nextGlyph.id, table.classDef2);\n if (class1 === -1 || class2 === -1) {\n return false;\n }\n\n var pair = table.classRecords.get(class1).get(class2);\n this.applyPositionValue(0, pair.value1);\n this.applyPositionValue(1, pair.value2);\n return true;\n }\n }\n\n case 3: { // Cursive Attachment Positioning\n let nextIndex = this.glyphIterator.peekIndex();\n let nextGlyph = this.glyphs[nextIndex];\n if (!nextGlyph) {\n return false;\n }\n\n let curRecord = table.entryExitRecords[this.coverageIndex(table.coverage)];\n if (!curRecord || !curRecord.exitAnchor) {\n return false;\n }\n\n let nextRecord = table.entryExitRecords[this.coverageIndex(table.coverage, nextGlyph.id)];\n if (!nextRecord || !nextRecord.entryAnchor) {\n return false;\n }\n\n let entry = this.getAnchor(nextRecord.entryAnchor);\n let exit = this.getAnchor(curRecord.exitAnchor);\n\n let cur = this.positions[this.glyphIterator.index];\n let next = this.positions[nextIndex];\n\n switch (this.direction) {\n case 'ltr':\n cur.xAdvance = exit.x + cur.xOffset;\n\n let d = entry.x + next.xOffset;\n next.xAdvance -= d;\n next.xOffset -= d;\n break;\n\n case 'rtl':\n d = exit.x + cur.xOffset;\n cur.xAdvance -= d;\n cur.xOffset -= d;\n next.xAdvance = entry.x + next.xOffset;\n break;\n }\n\n if (this.glyphIterator.flags.rightToLeft) {\n this.glyphIterator.cur.cursiveAttachment = nextIndex;\n cur.yOffset = entry.y - exit.y;\n } else {\n nextGlyph.cursiveAttachment = this.glyphIterator.index;\n cur.yOffset = exit.y - entry.y;\n }\n\n return true;\n }\n\n case 4: { // Mark to base positioning\n let markIndex = this.coverageIndex(table.markCoverage);\n if (markIndex === -1) {\n return false;\n }\n\n // search backward for a base glyph\n let baseGlyphIndex = this.glyphIterator.index;\n while (--baseGlyphIndex >= 0 && this.glyphs[baseGlyphIndex].isMark);\n\n if (baseGlyphIndex < 0) {\n return false;\n }\n\n let baseIndex = this.coverageIndex(table.baseCoverage, this.glyphs[baseGlyphIndex].id);\n if (baseIndex === -1) {\n return false;\n }\n\n let markRecord = table.markArray[markIndex];\n let baseAnchor = table.baseArray[baseIndex][markRecord.class];\n this.applyAnchor(markRecord, baseAnchor, baseGlyphIndex);\n return true;\n }\n\n case 5: { // Mark to ligature positioning\n let markIndex = this.coverageIndex(table.markCoverage);\n if (markIndex === -1) {\n return false;\n }\n\n // search backward for a base glyph\n let baseGlyphIndex = this.glyphIterator.index;\n while (--baseGlyphIndex >= 0 && this.glyphs[baseGlyphIndex].isMark);\n\n if (baseGlyphIndex < 0) {\n return false;\n }\n\n let ligIndex = this.coverageIndex(table.ligatureCoverage, this.glyphs[baseGlyphIndex].id);\n if (ligIndex === -1) {\n return false;\n }\n\n let ligAttach = table.ligatureArray[ligIndex];\n let markGlyph = this.glyphIterator.cur;\n let ligGlyph = this.glyphs[baseGlyphIndex];\n let compIndex = ligGlyph.ligatureID && ligGlyph.ligatureID === markGlyph.ligatureID && (markGlyph.ligatureComponent != null)\n ? Math.min(markGlyph.ligatureComponent, ligGlyph.codePoints.length) - 1\n : ligGlyph.codePoints.length - 1;\n\n let markRecord = table.markArray[markIndex];\n let baseAnchor = ligAttach[compIndex][markRecord.class];\n this.applyAnchor(markRecord, baseAnchor, baseGlyphIndex);\n return true;\n }\n\n case 6: { // Mark to mark positioning\n let mark1Index = this.coverageIndex(table.mark1Coverage);\n if (mark1Index === -1) {\n return false;\n }\n\n // get the previous mark to attach to\n let prevIndex = this.glyphIterator.peekIndex(-1);\n let prev = this.glyphs[prevIndex];\n if (!prev || !prev.isMark) {\n return false;\n }\n\n let cur = this.glyphIterator.cur;\n\n // The following logic was borrowed from Harfbuzz\n let good = false;\n if (cur.ligatureID === prev.ligatureID) {\n if (!cur.ligatureID) { // Marks belonging to the same base\n good = true;\n } else if (cur.ligatureComponent === prev.ligatureComponent) { // Marks belonging to the same ligature component\n good = true;\n }\n } else {\n // If ligature ids don't match, it may be the case that one of the marks\n // itself is a ligature, in which case match.\n if ((cur.ligatureID && !cur.ligatureComponent) || (prev.ligatureID && !prev.ligatureComponent)) {\n good = true;\n }\n }\n\n if (!good) {\n return false;\n }\n\n let mark2Index = this.coverageIndex(table.mark2Coverage, prev.id);\n if (mark2Index === -1) {\n return false;\n }\n\n let markRecord = table.mark1Array[mark1Index];\n let baseAnchor = table.mark2Array[mark2Index][markRecord.class];\n this.applyAnchor(markRecord, baseAnchor, prevIndex);\n return true;\n }\n\n case 7: // Contextual positioning\n return this.applyContext(table);\n\n case 8: // Chaining contextual positioning\n return this.applyChainingContext(table);\n\n case 9: // Extension positioning\n return this.applyLookup(table.lookupType, table.extension);\n\n default:\n throw new Error(`Unsupported GPOS table: ${lookupType}`);\n }\n }\n\n applyAnchor(markRecord, baseAnchor, baseGlyphIndex) {\n let baseCoords = this.getAnchor(baseAnchor);\n let markCoords = this.getAnchor(markRecord.markAnchor);\n\n let basePos = this.positions[baseGlyphIndex];\n let markPos = this.positions[this.glyphIterator.index];\n\n markPos.xOffset = baseCoords.x - markCoords.x;\n markPos.yOffset = baseCoords.y - markCoords.y;\n this.glyphIterator.cur.markAttachment = baseGlyphIndex;\n }\n\n getAnchor(anchor) {\n // TODO: contour point, device tables\n return {\n x: anchor.xCoordinate,\n y: anchor.yCoordinate\n };\n }\n\n applyFeatures(userFeatures, glyphs, advances) {\n super.applyFeatures(userFeatures, glyphs, advances);\n\n for (var i = 0; i < this.glyphs.length; i++) {\n this.fixCursiveAttachment(i);\n }\n\n this.fixMarkAttachment();\n }\n\n fixCursiveAttachment(i) {\n let glyph = this.glyphs[i];\n if (glyph.cursiveAttachment != null) {\n let j = glyph.cursiveAttachment;\n\n glyph.cursiveAttachment = null;\n this.fixCursiveAttachment(j);\n\n this.positions[i].yOffset += this.positions[j].yOffset;\n }\n }\n\n fixMarkAttachment() {\n for (let i = 0; i < this.glyphs.length; i++) {\n let glyph = this.glyphs[i];\n if (glyph.markAttachment != null) {\n let j = glyph.markAttachment;\n\n this.positions[i].xOffset += this.positions[j].xOffset;\n this.positions[i].yOffset += this.positions[j].yOffset;\n\n if (this.direction === 'ltr') {\n for (let k = j; k < i; k++) {\n this.positions[i].xOffset -= this.positions[k].xAdvance;\n this.positions[i].yOffset -= this.positions[k].yAdvance;\n }\n }\n }\n }\n }\n}\n","import ShapingPlan from './ShapingPlan';\nimport * as Shapers from './shapers';\nimport GlyphInfo from './GlyphInfo';\nimport GSUBProcessor from './GSUBProcessor';\nimport GPOSProcessor from './GPOSProcessor';\n\nexport default class OTLayoutEngine {\n constructor(font) {\n this.font = font;\n this.glyphInfos = null;\n this.plan = null;\n this.GSUBProcessor = null;\n this.GPOSProcessor = null;\n\n if (font.GSUB) {\n this.GSUBProcessor = new GSUBProcessor(font, font.GSUB);\n }\n\n if (font.GPOS) {\n this.GPOSProcessor = new GPOSProcessor(font, font.GPOS);\n }\n }\n\n setup(glyphs, features, script, language) {\n // Map glyphs to GlyphInfo objects so data can be passed between\n // GSUB and GPOS without mutating the real (shared) Glyph objects.\n this.glyphInfos = glyphs.map(glyph => new GlyphInfo(this.font, glyph.id, [...glyph.codePoints]));\n\n // Choose a shaper based on the script, and setup a shaping plan.\n // This determines which features to apply to which glyphs.\n this.shaper = Shapers.choose(script);\n this.plan = new ShapingPlan(this.font, script, language);\n return this.shaper.plan(this.plan, this.glyphInfos, features);\n }\n\n substitute(glyphs) {\n if (this.GSUBProcessor) {\n this.plan.process(this.GSUBProcessor, this.glyphInfos);\n\n // Map glyph infos back to normal Glyph objects\n glyphs = this.glyphInfos.map(glyphInfo => this.font.getGlyph(glyphInfo.id, glyphInfo.codePoints));\n }\n\n return glyphs;\n }\n\n position(glyphs, positions) {\n if (this.shaper.zeroMarkWidths === 'BEFORE_GPOS') {\n this.zeroMarkAdvances(positions);\n }\n\n if (this.GPOSProcessor) {\n this.plan.process(this.GPOSProcessor, this.glyphInfos, positions);\n }\n\n if (this.shaper.zeroMarkWidths === 'AFTER_GPOS') {\n this.zeroMarkAdvances(positions);\n }\n\n // Reverse the glyphs and positions if the script is right-to-left\n if (this.plan.direction === 'rtl') {\n glyphs.reverse();\n positions.reverse();\n }\n\n return this.GPOSProcessor && this.GPOSProcessor.features;\n }\n\n zeroMarkAdvances(positions) {\n for (let i = 0; i < this.glyphInfos.length; i++) {\n if (this.glyphInfos[i].isMark) {\n positions[i].xAdvance = 0;\n positions[i].yAdvance = 0;\n }\n }\n }\n\n cleanup() {\n this.glyphInfos = null;\n this.plan = null;\n this.shaper = null;\n }\n\n getAvailableFeatures(script, language) {\n let features = [];\n\n if (this.GSUBProcessor) {\n this.GSUBProcessor.selectScript(script, language);\n features.push(...Object.keys(this.GSUBProcessor.features));\n }\n\n if (this.GPOSProcessor) {\n this.GPOSProcessor.selectScript(script, language);\n features.push(...Object.keys(this.GPOSProcessor.features));\n }\n\n return features;\n }\n}\n","import KernProcessor from './KernProcessor';\nimport UnicodeLayoutEngine from './UnicodeLayoutEngine';\nimport GlyphRun from './GlyphRun';\nimport GlyphPosition from './GlyphPosition';\nimport * as Script from './Script';\nimport unicode from 'unicode-properties';\nimport AATLayoutEngine from '../aat/AATLayoutEngine';\nimport OTLayoutEngine from '../opentype/OTLayoutEngine';\n\nexport default class LayoutEngine {\n constructor(font) {\n this.font = font;\n this.unicodeLayoutEngine = null;\n this.kernProcessor = null;\n\n // Choose an advanced layout engine. We try the AAT morx table first since more\n // scripts are currently supported because the shaping logic is built into the font.\n if (this.font.morx) {\n this.engine = new AATLayoutEngine(this.font);\n\n } else if (this.font.GSUB || this.font.GPOS) {\n this.engine = new OTLayoutEngine(this.font);\n }\n }\n\n layout(string, features = [], script, language) {\n // Make the features parameter optional\n if (typeof features === 'string') {\n script = features;\n language = script;\n features = [];\n }\n\n // Map string to glyphs if needed\n if (typeof string === 'string') {\n // Attempt to detect the script from the string if not provided.\n if (script == null) {\n script = Script.forString(string);\n }\n\n var glyphs = this.font.glyphsForString(string);\n } else {\n // Attempt to detect the script from the glyph code points if not provided.\n if (script == null) {\n let codePoints = [];\n for (let glyph of string) {\n codePoints.push(...glyph.codePoints);\n }\n\n script = Script.forCodePoints(codePoints);\n }\n\n var glyphs = string;\n }\n\n // Return early if there are no glyphs\n if (glyphs.length === 0) {\n return new GlyphRun(glyphs, []);\n }\n\n // Setup the advanced layout engine\n if (this.engine && this.engine.setup) {\n this.engine.setup(glyphs, features, script, language);\n }\n\n // Substitute and position the glyphs\n glyphs = this.substitute(glyphs, features, script, language);\n let positions = this.position(glyphs, features, script, language);\n\n // Let the layout engine clean up any state it might have\n if (this.engine && this.engine.cleanup) {\n this.engine.cleanup();\n }\n\n return new GlyphRun(glyphs, positions);\n }\n\n substitute(glyphs, features, script, language) {\n // Call the advanced layout engine to make substitutions\n if (this.engine && this.engine.substitute) {\n glyphs = this.engine.substitute(glyphs, features, script, language);\n }\n\n return glyphs;\n }\n\n position(glyphs, features, script, language) {\n // Get initial glyph positions\n let positions = glyphs.map(glyph => new GlyphPosition(glyph.advanceWidth));\n let positioned = null;\n\n // Call the advanced layout engine. Returns the features applied.\n if (this.engine && this.engine.position) {\n positioned = this.engine.position(glyphs, positions, features, script, language);\n }\n\n // if there is no GPOS table, use unicode properties to position marks.\n if (!positioned) {\n if (!this.unicodeLayoutEngine) {\n this.unicodeLayoutEngine = new UnicodeLayoutEngine(this.font);\n }\n\n this.unicodeLayoutEngine.positionGlyphs(glyphs, positions);\n }\n\n // if kerning is not supported by GPOS, do kerning with the TrueType/AAT kern table\n if ((!positioned || !positioned.kern) && this.font.kern) {\n if (!this.kernProcessor) {\n this.kernProcessor = new KernProcessor(this.font);\n }\n\n this.kernProcessor.process(glyphs, positions);\n }\n\n return positions;\n }\n\n getAvailableFeatures(script, language) {\n let features = [];\n\n if (this.engine) {\n features.push(...this.engine.getAvailableFeatures(script, language));\n }\n\n if (this.font.kern && features.indexOf('kern') === -1) {\n features.push('kern');\n }\n\n return features;\n }\n\n stringsForGlyph(gid) {\n let result = new Set;\n\n let codePoints = this.font._cmapProcessor.codePointsForGlyph(gid);\n for (let codePoint of codePoints) {\n result.add(String.fromCodePoint(codePoint));\n }\n\n if (this.engine && this.engine.stringsForGlyph) {\n for (let string of this.engine.stringsForGlyph(gid)) {\n result.add(string);\n }\n }\n\n return Array.from(result);\n }\n}\n","import BBox from './BBox';\n\nconst SVG_COMMANDS = {\n moveTo: 'M',\n lineTo: 'L',\n quadraticCurveTo: 'Q',\n bezierCurveTo: 'C',\n closePath: 'Z'\n};\n\n/**\n * Path objects are returned by glyphs and represent the actual\n * vector outlines for each glyph in the font. Paths can be converted\n * to SVG path data strings, or to functions that can be applied to\n * render the path to a graphics context.\n */\nexport default class Path {\n constructor() {\n this.commands = [];\n this._bbox = null;\n this._cbox = null;\n }\n\n /**\n * Compiles the path to a JavaScript function that can be applied with\n * a graphics context in order to render the path.\n * @return {string}\n */\n toFunction() {\n let cmds = this.commands.map(c => ` ctx.${c.command}(${c.args.join(', ')});`);\n return new Function('ctx', cmds.join('\\n'));\n }\n\n /**\n * Converts the path to an SVG path data string\n * @return {string}\n */\n toSVG() {\n let cmds = this.commands.map(c => {\n let args = c.args.map(arg => Math.round(arg * 100) / 100);\n return `${SVG_COMMANDS[c.command]}${args.join(' ')}`;\n });\n\n return cmds.join('');\n }\n\n /**\n * Gets the \"control box\" of a path.\n * This is like the bounding box, but it includes all points including\n * control points of bezier segments and is much faster to compute than\n * the real bounding box.\n * @type {BBox}\n */\n get cbox() {\n if (!this._cbox) {\n let cbox = new BBox;\n for (let command of this.commands) {\n for (let i = 0; i < command.args.length; i += 2) {\n cbox.addPoint(command.args[i], command.args[i + 1]);\n }\n }\n\n this._cbox = Object.freeze(cbox);\n }\n\n return this._cbox;\n }\n\n /**\n * Gets the exact bounding box of the path by evaluating curve segments.\n * Slower to compute than the control box, but more accurate.\n * @type {BBox}\n */\n get bbox() {\n if (this._bbox) {\n return this._bbox;\n }\n\n let bbox = new BBox;\n let cx = 0, cy = 0;\n\n let f = t => (\n Math.pow(1 - t, 3) * p0[i]\n + 3 * Math.pow(1 - t, 2) * t * p1[i]\n + 3 * (1 - t) * Math.pow(t, 2) * p2[i]\n + Math.pow(t, 3) * p3[i]\n );\n\n for (let c of this.commands) {\n switch (c.command) {\n case 'moveTo':\n case 'lineTo':\n let [x, y] = c.args;\n bbox.addPoint(x, y);\n cx = x;\n cy = y;\n break;\n\n case 'quadraticCurveTo':\n case 'bezierCurveTo':\n if (c.command === 'quadraticCurveTo') {\n // http://fontforge.org/bezier.html\n var [qp1x, qp1y, p3x, p3y] = c.args;\n var cp1x = cx + 2 / 3 * (qp1x - cx); // CP1 = QP0 + 2/3 * (QP1-QP0)\n var cp1y = cy + 2 / 3 * (qp1y - cy);\n var cp2x = p3x + 2 / 3 * (qp1x - p3x); // CP2 = QP2 + 2/3 * (QP1-QP2)\n var cp2y = p3y + 2 / 3 * (qp1y - p3y);\n } else {\n var [cp1x, cp1y, cp2x, cp2y, p3x, p3y] = c.args;\n }\n\n // http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html\n bbox.addPoint(p3x, p3y);\n\n var p0 = [cx, cy];\n var p1 = [cp1x, cp1y];\n var p2 = [cp2x, cp2y];\n var p3 = [p3x, p3y];\n\n for (var i = 0; i <= 1; i++) {\n let b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i];\n let a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i];\n c = 3 * p1[i] - 3 * p0[i];\n\n if (a === 0) {\n if (b === 0) {\n continue;\n }\n\n let t = -c / b;\n if (0 < t && t < 1) {\n if (i === 0) {\n bbox.addPoint(f(t), bbox.maxY);\n } else if (i === 1) {\n bbox.addPoint(bbox.maxX, f(t));\n }\n }\n\n continue;\n }\n\n let b2ac = Math.pow(b, 2) - 4 * c * a;\n if (b2ac < 0) {\n continue;\n }\n\n let t1 = (-b + Math.sqrt(b2ac)) / (2 * a);\n if (0 < t1 && t1 < 1) {\n if (i === 0) {\n bbox.addPoint(f(t1), bbox.maxY);\n } else if (i === 1) {\n bbox.addPoint(bbox.maxX, f(t1));\n }\n }\n\n let t2 = (-b - Math.sqrt(b2ac)) / (2 * a);\n if (0 < t2 && t2 < 1) {\n if (i === 0) {\n bbox.addPoint(f(t2), bbox.maxY);\n } else if (i === 1) {\n bbox.addPoint(bbox.maxX, f(t2));\n }\n }\n }\n\n cx = p3x;\n cy = p3y;\n break;\n }\n }\n\n return this._bbox = Object.freeze(bbox);\n }\n\n /**\n * Applies a mapping function to each point in the path.\n * @param {function} fn\n * @return {Path}\n */\n mapPoints(fn) {\n let path = new Path;\n\n for (let c of this.commands) {\n let args = [];\n for (let i = 0; i < c.args.length; i += 2) {\n let [x, y] = fn(c.args[i], c.args[i + 1]);\n args.push(x, y);\n }\n\n path[c.command](...args);\n }\n\n return path;\n }\n\n /**\n * Transforms the path by the given matrix.\n */\n transform(m0, m1, m2, m3, m4, m5) {\n return this.mapPoints((x, y) => {\n x = m0 * x + m2 * y + m4;\n y = m1 * x + m3 * y + m5;\n return [x, y];\n });\n }\n\n /**\n * Translates the path by the given offset.\n */\n translate(x, y) {\n return this.transform(1, 0, 0, 1, x, y);\n }\n\n /**\n * Rotates the path by the given angle (in radians).\n */\n rotate(angle) {\n let cos = Math.cos(angle);\n let sin = Math.sin(angle);\n return this.transform(cos, sin, -sin, cos, 0, 0);\n }\n\n /**\n * Scales the path.\n */\n scale(scaleX, scaleY = scaleX) {\n return this.transform(scaleX, 0, 0, scaleY, 0, 0);\n }\n}\n\nfor (let command of ['moveTo', 'lineTo', 'quadraticCurveTo', 'bezierCurveTo', 'closePath']) {\n Path.prototype[command] = function(...args) {\n this._bbox = this._cbox = null;\n this.commands.push({\n command,\n args\n });\n\n return this;\n };\n}\n","export default [\n '.notdef', '.null', 'nonmarkingreturn', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent',\n 'ampersand', 'quotesingle', 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash',\n 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less',\n 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O',\n 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright',\n 'asciicircum', 'underscore', 'grave', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o',\n 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde',\n 'Adieresis', 'Aring', 'Ccedilla', 'Eacute', 'Ntilde', 'Odieresis', 'Udieresis', 'aacute', 'agrave',\n 'acircumflex', 'adieresis', 'atilde', 'aring', 'ccedilla', 'eacute', 'egrave', 'ecircumflex', 'edieresis',\n 'iacute', 'igrave', 'icircumflex', 'idieresis', 'ntilde', 'oacute', 'ograve', 'ocircumflex', 'odieresis',\n 'otilde', 'uacute', 'ugrave', 'ucircumflex', 'udieresis', 'dagger', 'degree', 'cent', 'sterling', 'section',\n 'bullet', 'paragraph', 'germandbls', 'registered', 'copyright', 'trademark', 'acute', 'dieresis', 'notequal',\n 'AE', 'Oslash', 'infinity', 'plusminus', 'lessequal', 'greaterequal', 'yen', 'mu', 'partialdiff', 'summation',\n 'product', 'pi', 'integral', 'ordfeminine', 'ordmasculine', 'Omega', 'ae', 'oslash', 'questiondown',\n 'exclamdown', 'logicalnot', 'radical', 'florin', 'approxequal', 'Delta', 'guillemotleft', 'guillemotright',\n 'ellipsis', 'nonbreakingspace', 'Agrave', 'Atilde', 'Otilde', 'OE', 'oe', 'endash', 'emdash', 'quotedblleft',\n 'quotedblright', 'quoteleft', 'quoteright', 'divide', 'lozenge', 'ydieresis', 'Ydieresis', 'fraction',\n 'currency', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', 'daggerdbl', 'periodcentered', 'quotesinglbase',\n 'quotedblbase', 'perthousand', 'Acircumflex', 'Ecircumflex', 'Aacute', 'Edieresis', 'Egrave', 'Iacute',\n 'Icircumflex', 'Idieresis', 'Igrave', 'Oacute', 'Ocircumflex', 'apple', 'Ograve', 'Uacute', 'Ucircumflex',\n 'Ugrave', 'dotlessi', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent', 'ring', 'cedilla', 'hungarumlaut',\n 'ogonek', 'caron', 'Lslash', 'lslash', 'Scaron', 'scaron', 'Zcaron', 'zcaron', 'brokenbar', 'Eth', 'eth',\n 'Yacute', 'yacute', 'Thorn', 'thorn', 'minus', 'multiply', 'onesuperior', 'twosuperior', 'threesuperior',\n 'onehalf', 'onequarter', 'threequarters', 'franc', 'Gbreve', 'gbreve', 'Idotaccent', 'Scedilla', 'scedilla',\n 'Cacute', 'cacute', 'Ccaron', 'ccaron', 'dcroat'\n];\n","import { cache } from '../decorators';\nimport Path from './Path';\nimport unicode from 'unicode-properties';\nimport StandardNames from './StandardNames';\n\n/**\n * Glyph objects represent a glyph in the font. They have various properties for accessing metrics and\n * the actual vector path the glyph represents, and methods for rendering the glyph to a graphics context.\n *\n * You do not create glyph objects directly. They are created by various methods on the font object.\n * There are several subclasses of the base Glyph class internally that may be returned depending\n * on the font format, but they all inherit from this class.\n */\nexport default class Glyph {\n constructor(id, codePoints, font) {\n /**\n * The glyph id in the font\n * @type {number}\n */\n this.id = id;\n\n /**\n * An array of unicode code points that are represented by this glyph.\n * There can be multiple code points in the case of ligatures and other glyphs\n * that represent multiple visual characters.\n * @type {number[]}\n */\n this.codePoints = codePoints;\n this._font = font;\n\n // TODO: get this info from GDEF if available\n this.isMark = this.codePoints.every(unicode.isMark);\n this.isLigature = this.codePoints.length > 1;\n }\n\n _getPath() {\n return new Path();\n }\n\n _getCBox() {\n return this.path.cbox;\n }\n\n _getBBox() {\n return this.path.bbox;\n }\n\n _getTableMetrics(table) {\n if (this.id < table.metrics.length) {\n return table.metrics.get(this.id);\n }\n\n let metric = table.metrics.get(table.metrics.length - 1);\n let res = {\n advance: metric ? metric.advance : 0,\n bearing: table.bearings.get(this.id - table.metrics.length) || 0\n };\n\n return res;\n }\n\n _getMetrics(cbox) {\n if (this._metrics) { return this._metrics; }\n\n let {advance:advanceWidth, bearing:leftBearing} = this._getTableMetrics(this._font.hmtx);\n\n // For vertical metrics, use vmtx if available, or fall back to global data from OS/2 or hhea\n if (this._font.vmtx) {\n var {advance:advanceHeight, bearing:topBearing} = this._getTableMetrics(this._font.vmtx);\n\n } else {\n let os2;\n if (typeof cbox === 'undefined' || cbox === null) { ({ cbox } = this); }\n\n if ((os2 = this._font['OS/2']) && os2.version > 0) {\n var advanceHeight = Math.abs(os2.typoAscender - os2.typoDescender);\n var topBearing = os2.typoAscender - cbox.maxY;\n\n } else {\n let { hhea } = this._font;\n var advanceHeight = Math.abs(hhea.ascent - hhea.descent);\n var topBearing = hhea.ascent - cbox.maxY;\n }\n }\n\n if (this._font._variationProcessor && this._font.HVAR) {\n advanceWidth += this._font._variationProcessor.getAdvanceAdjustment(this.id, this._font.HVAR);\n }\n\n return this._metrics = { advanceWidth, advanceHeight, leftBearing, topBearing };\n }\n\n /**\n * The glyph’s control box.\n * This is often the same as the bounding box, but is faster to compute.\n * Because of the way bezier curves are defined, some of the control points\n * can be outside of the bounding box. Where `bbox` takes this into account,\n * `cbox` does not. Thus, cbox is less accurate, but faster to compute.\n * See [here](http://www.freetype.org/freetype2/docs/glyphs/glyphs-6.html#section-2)\n * for a more detailed description.\n *\n * @type {BBox}\n */\n @cache\n get cbox() {\n return this._getCBox();\n }\n\n /**\n * The glyph’s bounding box, i.e. the rectangle that encloses the\n * glyph outline as tightly as possible.\n * @type {BBox}\n */\n @cache\n get bbox() {\n return this._getBBox();\n }\n\n /**\n * A vector Path object representing the glyph outline.\n * @type {Path}\n */\n @cache\n get path() {\n // Cache the path so we only decode it once\n // Decoding is actually performed by subclasses\n return this._getPath();\n }\n\n /**\n * Returns a path scaled to the given font size.\n * @param {number} size\n * @return {Path}\n */\n getScaledPath(size) {\n let scale = 1 / this._font.unitsPerEm * size;\n return this.path.scale(scale);\n }\n\n /**\n * The glyph's advance width.\n * @type {number}\n */\n @cache\n get advanceWidth() {\n return this._getMetrics().advanceWidth;\n }\n\n /**\n * The glyph's advance height.\n * @type {number}\n */\n @cache\n get advanceHeight() {\n return this._getMetrics().advanceHeight;\n }\n\n get ligatureCaretPositions() {}\n\n _getName() {\n let { post } = this._font;\n if (!post) {\n return null;\n }\n\n switch (post.version) {\n case 1:\n return StandardNames[this.id];\n\n case 2:\n let id = post.glyphNameIndex[this.id];\n if (id < StandardNames.length) {\n return StandardNames[id];\n }\n\n return post.names[id - StandardNames.length];\n\n case 2.5:\n return StandardNames[this.id + post.offsets[this.id]];\n\n case 4:\n return String.fromCharCode(post.map[this.id]);\n }\n }\n\n /**\n * The glyph's name\n * @type {string}\n */\n @cache\n get name() {\n return this._getName();\n }\n\n /**\n * Renders the glyph to the given graphics context, at the specified font size.\n * @param {CanvasRenderingContext2d} ctx\n * @param {number} size\n */\n render(ctx, size) {\n ctx.save();\n\n let scale = 1 / this._font.head.unitsPerEm * size;\n ctx.scale(scale, scale);\n\n let fn = this.path.toFunction();\n fn(ctx);\n ctx.fill();\n\n ctx.restore();\n }\n}\n","import Glyph from './Glyph';\nimport Path from './Path';\nimport BBox from './BBox';\nimport r from 'restructure';\n\n// The header for both simple and composite glyphs\nlet GlyfHeader = new r.Struct({\n numberOfContours: r.int16, // if negative, this is a composite glyph\n xMin: r.int16,\n yMin: r.int16,\n xMax: r.int16,\n yMax: r.int16\n});\n\n// Flags for simple glyphs\nconst ON_CURVE = 1 << 0;\nconst X_SHORT_VECTOR = 1 << 1;\nconst Y_SHORT_VECTOR = 1 << 2;\nconst REPEAT = 1 << 3;\nconst SAME_X = 1 << 4;\nconst SAME_Y = 1 << 5;\n\n// Flags for composite glyphs\nconst ARG_1_AND_2_ARE_WORDS = 1 << 0;\nconst ARGS_ARE_XY_VALUES = 1 << 1;\nconst ROUND_XY_TO_GRID = 1 << 2;\nconst WE_HAVE_A_SCALE = 1 << 3;\nconst MORE_COMPONENTS = 1 << 5;\nconst WE_HAVE_AN_X_AND_Y_SCALE = 1 << 6;\nconst WE_HAVE_A_TWO_BY_TWO = 1 << 7;\nconst WE_HAVE_INSTRUCTIONS = 1 << 8;\nconst USE_MY_METRICS = 1 << 9;\nconst OVERLAP_COMPOUND = 1 << 10;\nconst SCALED_COMPONENT_OFFSET = 1 << 11;\nconst UNSCALED_COMPONENT_OFFSET = 1 << 12;\n\n// Represents a point in a simple glyph\nexport class Point {\n constructor(onCurve, endContour, x = 0, y = 0) {\n this.onCurve = onCurve;\n this.endContour = endContour;\n this.x = x;\n this.y = y;\n }\n\n copy() {\n return new Point(this.onCurve, this.endContour, this.x, this.y);\n }\n}\n\n// Represents a component in a composite glyph\nclass Component {\n constructor(glyphID, dx, dy) {\n this.glyphID = glyphID;\n this.dx = dx;\n this.dy = dy;\n this.pos = 0;\n this.scaleX = this.scaleY = 1;\n this.scale01 = this.scale10 = 0;\n }\n}\n\n/**\n * Represents a TrueType glyph.\n */\nexport default class TTFGlyph extends Glyph {\n // Parses just the glyph header and returns the bounding box\n _getCBox(internal) {\n // We need to decode the glyph if variation processing is requested,\n // so it's easier just to recompute the path's cbox after decoding.\n if (this._font._variationProcessor && !internal) {\n return this.path.cbox;\n }\n\n let stream = this._font._getTableStream('glyf');\n stream.pos += this._font.loca.offsets[this.id];\n let glyph = GlyfHeader.decode(stream);\n\n let cbox = new BBox(glyph.xMin, glyph.yMin, glyph.xMax, glyph.yMax);\n return Object.freeze(cbox);\n }\n\n // Parses a single glyph coordinate\n _parseGlyphCoord(stream, prev, short, same) {\n if (short) {\n var val = stream.readUInt8();\n if (!same) {\n val = -val;\n }\n\n val += prev;\n } else {\n if (same) {\n var val = prev;\n } else {\n var val = prev + stream.readInt16BE();\n }\n }\n\n return val;\n }\n\n // Decodes the glyph data into points for simple glyphs,\n // or components for composite glyphs\n _decode() {\n let glyfPos = this._font.loca.offsets[this.id];\n let nextPos = this._font.loca.offsets[this.id + 1];\n\n // Nothing to do if there is no data for this glyph\n if (glyfPos === nextPos) { return null; }\n\n let stream = this._font._getTableStream('glyf');\n stream.pos += glyfPos;\n let startPos = stream.pos;\n\n let glyph = GlyfHeader.decode(stream);\n\n if (glyph.numberOfContours > 0) {\n this._decodeSimple(glyph, stream);\n\n } else if (glyph.numberOfContours < 0) {\n this._decodeComposite(glyph, stream, startPos);\n }\n\n return glyph;\n }\n\n _decodeSimple(glyph, stream) {\n // this is a simple glyph\n glyph.points = [];\n\n let endPtsOfContours = new r.Array(r.uint16, glyph.numberOfContours).decode(stream);\n glyph.instructions = new r.Array(r.uint8, r.uint16).decode(stream);\n\n let flags = [];\n let numCoords = endPtsOfContours[endPtsOfContours.length - 1] + 1;\n\n while (flags.length < numCoords) {\n var flag = stream.readUInt8();\n flags.push(flag);\n\n // check for repeat flag\n if (flag & REPEAT) {\n let count = stream.readUInt8();\n for (let j = 0; j < count; j++) {\n flags.push(flag);\n }\n }\n }\n\n for (var i = 0; i < flags.length; i++) {\n var flag = flags[i];\n let point = new Point(!!(flag & ON_CURVE), endPtsOfContours.indexOf(i) >= 0, 0, 0);\n glyph.points.push(point);\n }\n\n let px = 0;\n for (var i = 0; i < flags.length; i++) {\n var flag = flags[i];\n glyph.points[i].x = px = this._parseGlyphCoord(stream, px, flag & X_SHORT_VECTOR, flag & SAME_X);\n }\n\n let py = 0;\n for (var i = 0; i < flags.length; i++) {\n var flag = flags[i];\n glyph.points[i].y = py = this._parseGlyphCoord(stream, py, flag & Y_SHORT_VECTOR, flag & SAME_Y);\n }\n\n if (this._font._variationProcessor) {\n let points = glyph.points.slice();\n points.push(...this._getPhantomPoints(glyph));\n\n this._font._variationProcessor.transformPoints(this.id, points);\n glyph.phantomPoints = points.slice(-4);\n }\n\n return;\n }\n\n _decodeComposite(glyph, stream, offset = 0) {\n // this is a composite glyph\n glyph.components = [];\n let haveInstructions = false;\n let flags = MORE_COMPONENTS;\n\n while (flags & MORE_COMPONENTS) {\n flags = stream.readUInt16BE();\n let gPos = stream.pos - offset;\n let glyphID = stream.readUInt16BE();\n if (!haveInstructions) {\n haveInstructions = (flags & WE_HAVE_INSTRUCTIONS) !== 0;\n }\n\n if (flags & ARG_1_AND_2_ARE_WORDS) {\n var dx = stream.readInt16BE();\n var dy = stream.readInt16BE();\n } else {\n var dx = stream.readInt8();\n var dy = stream.readInt8();\n }\n\n var component = new Component(glyphID, dx, dy);\n component.pos = gPos;\n\n if (flags & WE_HAVE_A_SCALE) {\n // fixed number with 14 bits of fraction\n component.scaleX =\n component.scaleY = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n\n } else if (flags & WE_HAVE_AN_X_AND_Y_SCALE) {\n component.scaleX = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n component.scaleY = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n\n } else if (flags & WE_HAVE_A_TWO_BY_TWO) {\n component.scaleX = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n component.scale01 = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n component.scale10 = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n component.scaleY = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824;\n }\n\n glyph.components.push(component);\n }\n\n if (this._font._variationProcessor) {\n let points = [];\n for (let j = 0; j < glyph.components.length; j++) {\n var component = glyph.components[j];\n points.push(new Point(true, true, component.dx, component.dy));\n }\n\n points.push(...this._getPhantomPoints(glyph));\n\n this._font._variationProcessor.transformPoints(this.id, points);\n glyph.phantomPoints = points.splice(-4, 4);\n\n for (let i = 0; i < points.length; i++) {\n let point = points[i];\n glyph.components[i].dx = point.x;\n glyph.components[i].dy = point.y;\n }\n }\n\n return haveInstructions;\n }\n\n _getPhantomPoints(glyph) {\n let cbox = this._getCBox(true);\n if (this._metrics == null) {\n this._metrics = Glyph.prototype._getMetrics.call(this, cbox);\n }\n\n let { advanceWidth, advanceHeight, leftBearing, topBearing } = this._metrics;\n\n return [\n new Point(false, true, glyph.xMin - leftBearing, 0),\n new Point(false, true, glyph.xMin - leftBearing + advanceWidth, 0),\n new Point(false, true, 0, glyph.yMax + topBearing),\n new Point(false, true, 0, glyph.yMax + topBearing + advanceHeight)\n ];\n }\n\n // Decodes font data, resolves composite glyphs, and returns an array of contours\n _getContours() {\n let glyph = this._decode();\n if (!glyph) { return []; }\n\n if (glyph.numberOfContours < 0) {\n // resolve composite glyphs\n var points = [];\n for (let component of glyph.components) {\n glyph = this._font.getGlyph(component.glyphID)._decode();\n // TODO transform\n for (let point of glyph.points) {\n points.push(new Point(point.onCurve, point.endContour, point.x + component.dx, point.y + component.dy));\n }\n }\n } else {\n var points = glyph.points || [];\n }\n\n // Recompute and cache metrics if we performed variation processing, and don't have an HVAR table\n if (glyph.phantomPoints && !this._font.directory.tables.HVAR) {\n this._metrics.advanceWidth = glyph.phantomPoints[1].x - glyph.phantomPoints[0].x;\n this._metrics.advanceHeight = glyph.phantomPoints[3].y - glyph.phantomPoints[2].y;\n this._metrics.leftBearing = glyph.xMin - glyph.phantomPoints[0].x;\n this._metrics.topBearing = glyph.phantomPoints[2].y - glyph.yMax;\n }\n\n let contours = [];\n let cur = [];\n for (let k = 0; k < points.length; k++) {\n var point = points[k];\n cur.push(point);\n if (point.endContour) {\n contours.push(cur);\n cur = [];\n }\n }\n\n return contours;\n }\n\n _getMetrics() {\n if (this._metrics) {\n return this._metrics;\n }\n\n let cbox = this._getCBox(true);\n super._getMetrics(cbox);\n\n if (this._font._variationProcessor && !this._font.HVAR) {\n // No HVAR table, decode the glyph. This triggers recomputation of metrics.\n this.path;\n }\n\n return this._metrics;\n }\n\n // Converts contours to a Path object that can be rendered\n _getPath() {\n let contours = this._getContours();\n let path = new Path;\n\n for (let i = 0; i < contours.length; i++) {\n let contour = contours[i];\n let firstPt = contour[0];\n let lastPt = contour[contour.length - 1];\n let start = 0;\n\n if (firstPt.onCurve) {\n // The first point will be consumed by the moveTo command, so skip in the loop\n var curvePt = null;\n start = 1;\n } else {\n if (lastPt.onCurve) {\n // Start at the last point if the first point is off curve and the last point is on curve\n firstPt = lastPt;\n } else {\n // Start at the middle if both the first and last points are off curve\n firstPt = new Point(false, false, (firstPt.x + lastPt.x) / 2, (firstPt.y + lastPt.y) / 2);\n }\n\n var curvePt = firstPt;\n }\n\n path.moveTo(firstPt.x, firstPt.y);\n\n for (let j = start; j < contour.length; j++) {\n let pt = contour[j];\n let prevPt = j === 0 ? firstPt : contour[j - 1];\n\n if (prevPt.onCurve && pt.onCurve) {\n path.lineTo(pt.x, pt.y);\n\n } else if (prevPt.onCurve && !pt.onCurve) {\n var curvePt = pt;\n\n } else if (!prevPt.onCurve && !pt.onCurve) {\n let midX = (prevPt.x + pt.x) / 2;\n let midY = (prevPt.y + pt.y) / 2;\n path.quadraticCurveTo(prevPt.x, prevPt.y, midX, midY);\n var curvePt = pt;\n\n } else if (!prevPt.onCurve && pt.onCurve) {\n path.quadraticCurveTo(curvePt.x, curvePt.y, pt.x, pt.y);\n var curvePt = null;\n\n } else {\n throw new Error(\"Unknown TTF path state\");\n }\n }\n\n // Connect the first and last points\n if (curvePt) {\n path.quadraticCurveTo(curvePt.x, curvePt.y, firstPt.x, firstPt.y);\n }\n\n path.closePath();\n }\n\n return path;\n }\n}\n","import Glyph from './Glyph';\nimport Path from './Path';\n\n/**\n * Represents an OpenType PostScript glyph, in the Compact Font Format.\n */\nexport default class CFFGlyph extends Glyph {\n _getName() {\n if (this._font.CFF2) {\n return super._getName();\n }\n\n return this._font['CFF '].getGlyphName(this.id);\n }\n\n bias(s) {\n if (s.length < 1240) {\n return 107;\n } else if (s.length < 33900) {\n return 1131;\n } else {\n return 32768;\n }\n }\n\n _getPath() {\n let { stream } = this._font;\n let { pos } = stream;\n\n let cff = this._font.CFF2 || this._font['CFF '];\n let str = cff.topDict.CharStrings[this.id];\n let end = str.offset + str.length;\n stream.pos = str.offset;\n\n let path = new Path;\n let stack = [];\n let trans = [];\n\n let width = null;\n let nStems = 0;\n let x = 0, y = 0;\n let usedGsubrs;\n let usedSubrs;\n let open = false;\n\n this._usedGsubrs = usedGsubrs = {};\n this._usedSubrs = usedSubrs = {};\n\n let gsubrs = cff.globalSubrIndex || [];\n let gsubrsBias = this.bias(gsubrs);\n\n let privateDict = cff.privateDictForGlyph(this.id);\n let subrs = privateDict.Subrs || [];\n let subrsBias = this.bias(subrs);\n\n let vstore = cff.topDict.vstore && cff.topDict.vstore.itemVariationStore;\n let vsindex = privateDict.vsindex;\n let variationProcessor = this._font._variationProcessor;\n\n function checkWidth() {\n if (width == null) {\n width = stack.shift() + privateDict.nominalWidthX;\n }\n }\n\n function parseStems() {\n if (stack.length % 2 !== 0) {\n checkWidth();\n }\n\n nStems += stack.length >> 1;\n return stack.length = 0;\n }\n\n function moveTo(x, y) {\n if (open) {\n path.closePath();\n }\n\n path.moveTo(x, y);\n open = true;\n }\n\n let parse = function() {\n while (stream.pos < end) {\n let op = stream.readUInt8();\n if (op < 32) {\n switch (op) {\n case 1: // hstem\n case 3: // vstem\n case 18: // hstemhm\n case 23: // vstemhm\n parseStems();\n break;\n\n case 4: // vmoveto\n if (stack.length > 1) {\n checkWidth();\n }\n\n y += stack.shift();\n moveTo(x, y);\n break;\n\n case 5: // rlineto\n while (stack.length >= 2) {\n x += stack.shift();\n y += stack.shift();\n path.lineTo(x, y);\n }\n break;\n\n case 6: // hlineto\n case 7: // vlineto\n let phase = op === 6;\n while (stack.length >= 1) {\n if (phase) {\n x += stack.shift();\n } else {\n y += stack.shift();\n }\n\n path.lineTo(x, y);\n phase = !phase;\n }\n break;\n\n case 8: // rrcurveto\n while (stack.length > 0) {\n var c1x = x + stack.shift();\n var c1y = y + stack.shift();\n var c2x = c1x + stack.shift();\n var c2y = c1y + stack.shift();\n x = c2x + stack.shift();\n y = c2y + stack.shift();\n path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n }\n break;\n\n case 10: // callsubr\n let index = stack.pop() + subrsBias;\n let subr = subrs[index];\n if (subr) {\n usedSubrs[index] = true;\n var p = stream.pos;\n var e = end;\n stream.pos = subr.offset;\n end = subr.offset + subr.length;\n parse();\n stream.pos = p;\n end = e;\n }\n break;\n\n case 11: // return\n if (cff.version >= 2) {\n break;\n }\n return;\n\n case 14: // endchar\n if (cff.version >= 2) {\n break;\n }\n\n if (stack.length > 0) {\n checkWidth();\n }\n\n if (open) {\n path.closePath();\n open = false;\n }\n break;\n\n case 15: { // vsindex\n if (cff.version < 2) {\n throw new Error('vsindex operator not supported in CFF v1');\n }\n\n vsindex = stack.pop();\n break;\n }\n\n case 16: { // blend\n if (cff.version < 2) {\n throw new Error('blend operator not supported in CFF v1');\n }\n\n if (!variationProcessor) {\n throw new Error('blend operator in non-variation font');\n }\n\n let blendVector = variationProcessor.getBlendVector(vstore, vsindex);\n let numBlends = stack.pop();\n let numOperands = numBlends * blendVector.length;\n let delta = stack.length - numOperands;\n let base = delta - numBlends;\n\n for (let i = 0; i < numBlends; i++) {\n let sum = stack[base + i];\n for (let j = 0; j < blendVector.length; j++) {\n sum += blendVector[j] * stack[delta++];\n }\n\n stack[base + i] = sum;\n }\n\n while (numOperands--) {\n stack.pop();\n }\n\n break;\n }\n\n case 19: // hintmask\n case 20: // cntrmask\n parseStems();\n stream.pos += (nStems + 7) >> 3;\n break;\n\n case 21: // rmoveto\n if (stack.length > 2) {\n checkWidth();\n }\n\n x += stack.shift();\n y += stack.shift();\n moveTo(x, y);\n break;\n\n case 22: // hmoveto\n if (stack.length > 1) {\n checkWidth();\n }\n\n x += stack.shift();\n moveTo(x, y);\n break;\n\n case 24: // rcurveline\n while (stack.length >= 8) {\n var c1x = x + stack.shift();\n var c1y = y + stack.shift();\n var c2x = c1x + stack.shift();\n var c2y = c1y + stack.shift();\n x = c2x + stack.shift();\n y = c2y + stack.shift();\n path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n }\n\n x += stack.shift();\n y += stack.shift();\n path.lineTo(x, y);\n break;\n\n case 25: // rlinecurve\n while (stack.length >= 8) {\n x += stack.shift();\n y += stack.shift();\n path.lineTo(x, y);\n }\n\n var c1x = x + stack.shift();\n var c1y = y + stack.shift();\n var c2x = c1x + stack.shift();\n var c2y = c1y + stack.shift();\n x = c2x + stack.shift();\n y = c2y + stack.shift();\n path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n break;\n\n case 26: // vvcurveto\n if (stack.length % 2) {\n x += stack.shift();\n }\n\n while (stack.length >= 4) {\n c1x = x;\n c1y = y + stack.shift();\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n x = c2x;\n y = c2y + stack.shift();\n path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n }\n break;\n\n case 27: // hhcurveto\n if (stack.length % 2) {\n y += stack.shift();\n }\n\n while (stack.length >= 4) {\n c1x = x + stack.shift();\n c1y = y;\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n x = c2x + stack.shift();\n y = c2y;\n path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n }\n break;\n\n case 28: // shortint\n stack.push(stream.readInt16BE());\n break;\n\n case 29: // callgsubr\n index = stack.pop() + gsubrsBias;\n subr = gsubrs[index];\n if (subr) {\n usedGsubrs[index] = true;\n var p = stream.pos;\n var e = end;\n stream.pos = subr.offset;\n end = subr.offset + subr.length;\n parse();\n stream.pos = p;\n end = e;\n }\n break;\n\n case 30: // vhcurveto\n case 31: // hvcurveto\n phase = op === 31;\n while (stack.length >= 4) {\n if (phase) {\n c1x = x + stack.shift();\n c1y = y;\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n y = c2y + stack.shift();\n x = c2x + (stack.length === 1 ? stack.shift() : 0);\n } else {\n c1x = x;\n c1y = y + stack.shift();\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n x = c2x + stack.shift();\n y = c2y + (stack.length === 1 ? stack.shift() : 0);\n }\n\n path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y);\n phase = !phase;\n }\n break;\n\n case 12:\n op = stream.readUInt8();\n switch (op) {\n case 3: // and\n let a = stack.pop();\n let b = stack.pop();\n stack.push(a && b ? 1 : 0);\n break;\n\n case 4: // or\n a = stack.pop();\n b = stack.pop();\n stack.push(a || b ? 1 : 0);\n break;\n\n case 5: // not\n a = stack.pop();\n stack.push(a ? 0 : 1);\n break;\n\n case 9: // abs\n a = stack.pop();\n stack.push(Math.abs(a));\n break;\n\n case 10: // add\n a = stack.pop();\n b = stack.pop();\n stack.push(a + b);\n break;\n\n case 11: // sub\n a = stack.pop();\n b = stack.pop();\n stack.push(a - b);\n break;\n\n case 12: // div\n a = stack.pop();\n b = stack.pop();\n stack.push(a / b);\n break;\n\n case 14: // neg\n a = stack.pop();\n stack.push(-a);\n break;\n\n case 15: // eq\n a = stack.pop();\n b = stack.pop();\n stack.push(a === b ? 1 : 0);\n break;\n\n case 18: // drop\n stack.pop();\n break;\n\n case 20: // put\n let val = stack.pop();\n let idx = stack.pop();\n trans[idx] = val;\n break;\n\n case 21: // get\n idx = stack.pop();\n stack.push(trans[idx] || 0);\n break;\n\n case 22: // ifelse\n let s1 = stack.pop();\n let s2 = stack.pop();\n let v1 = stack.pop();\n let v2 = stack.pop();\n stack.push(v1 <= v2 ? s1 : s2);\n break;\n\n case 23: // random\n stack.push(Math.random());\n break;\n\n case 24: // mul\n a = stack.pop();\n b = stack.pop();\n stack.push(a * b);\n break;\n\n case 26: // sqrt\n a = stack.pop();\n stack.push(Math.sqrt(a));\n break;\n\n case 27: // dup\n a = stack.pop();\n stack.push(a, a);\n break;\n\n case 28: // exch\n a = stack.pop();\n b = stack.pop();\n stack.push(b, a);\n break;\n\n case 29: // index\n idx = stack.pop();\n if (idx < 0) {\n idx = 0;\n } else if (idx > stack.length - 1) {\n idx = stack.length - 1;\n }\n\n stack.push(stack[idx]);\n break;\n\n case 30: // roll\n let n = stack.pop();\n let j = stack.pop();\n\n if (j >= 0) {\n while (j > 0) {\n var t = stack[n - 1];\n for (let i = n - 2; i >= 0; i--) {\n stack[i + 1] = stack[i];\n }\n\n stack[0] = t;\n j--;\n }\n } else {\n while (j < 0) {\n var t = stack[0];\n for (let i = 0; i <= n; i++) {\n stack[i] = stack[i + 1];\n }\n\n stack[n - 1] = t;\n j++;\n }\n }\n break;\n\n case 34: // hflex\n c1x = x + stack.shift();\n c1y = y;\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n let c3x = c2x + stack.shift();\n let c3y = c2y;\n let c4x = c3x + stack.shift();\n let c4y = c3y;\n let c5x = c4x + stack.shift();\n let c5y = c4y;\n let c6x = c5x + stack.shift();\n let c6y = c5y;\n x = c6x;\n y = c6y;\n\n path.bezierCurveTo(c1x, c1y, c2x, c2y, c3x, c3y);\n path.bezierCurveTo(c4x, c4y, c5x, c5y, c6x, c6y);\n break;\n\n case 35: // flex\n let pts = [];\n\n for (let i = 0; i <= 5; i++) {\n x += stack.shift();\n y += stack.shift();\n pts.push(x, y);\n }\n\n path.bezierCurveTo(...pts.slice(0, 6));\n path.bezierCurveTo(...pts.slice(6));\n stack.shift(); // fd\n break;\n\n case 36: // hflex1\n c1x = x + stack.shift();\n c1y = y + stack.shift();\n c2x = c1x + stack.shift();\n c2y = c1y + stack.shift();\n c3x = c2x + stack.shift();\n c3y = c2y;\n c4x = c3x + stack.shift();\n c4y = c3y;\n c5x = c4x + stack.shift();\n c5y = c4y + stack.shift();\n c6x = c5x + stack.shift();\n c6y = c5y;\n x = c6x;\n y = c6y;\n\n path.bezierCurveTo(c1x, c1y, c2x, c2y, c3x, c3y);\n path.bezierCurveTo(c4x, c4y, c5x, c5y, c6x, c6y);\n break;\n\n case 37: // flex1\n let startx = x;\n let starty = y;\n\n pts = [];\n for (let i = 0; i <= 4; i++) {\n x += stack.shift();\n y += stack.shift();\n pts.push(x, y);\n }\n\n if (Math.abs(x - startx) > Math.abs(y - starty)) { // horizontal\n x += stack.shift();\n y = starty;\n } else {\n x = startx;\n y += stack.shift();\n }\n\n pts.push(x, y);\n path.bezierCurveTo(...pts.slice(0, 6));\n path.bezierCurveTo(...pts.slice(6));\n break;\n\n default:\n throw new Error(`Unknown op: 12 ${op}`);\n }\n break;\n\n default:\n throw new Error(`Unknown op: ${op}`);\n }\n\n } else if (op < 247) {\n stack.push(op - 139);\n } else if (op < 251) {\n var b1 = stream.readUInt8();\n stack.push((op - 247) * 256 + b1 + 108);\n } else if (op < 255) {\n var b1 = stream.readUInt8();\n stack.push(-(op - 251) * 256 - b1 - 108);\n } else {\n stack.push(stream.readInt32BE() / 65536);\n }\n }\n };\n\n parse();\n\n if (open) {\n path.closePath();\n }\n\n return path;\n }\n}\n","import TTFGlyph from './TTFGlyph';\nimport r from 'restructure';\n\nlet SBIXImage = new r.Struct({\n originX: r.uint16,\n originY: r.uint16,\n type: new r.String(4),\n data: new r.Buffer(t => t.parent.buflen - t._currentOffset)\n});\n\n/**\n * Represents a color (e.g. emoji) glyph in Apple's SBIX format.\n */\nexport default class SBIXGlyph extends TTFGlyph {\n /**\n * Returns an object representing a glyph image at the given point size.\n * The object has a data property with a Buffer containing the actual image data,\n * along with the image type, and origin.\n *\n * @param {number} size\n * @return {object}\n */\n getImageForSize(size) {\n for (let i = 0; i < this._font.sbix.imageTables.length; i++) {\n var table = this._font.sbix.imageTables[i];\n if (table.ppem >= size) { break; }\n }\n\n let offsets = table.imageOffsets;\n let start = offsets[this.id];\n let end = offsets[this.id + 1];\n\n if (start === end) {\n return null;\n }\n\n this._font.stream.pos = start;\n return SBIXImage.decode(this._font.stream, {buflen: end - start});\n }\n\n render(ctx, size) {\n let img = this.getImageForSize(size);\n if (img != null) {\n let scale = size / this._font.unitsPerEm;\n ctx.image(img.data, {height: size, x: img.originX, y: (this.bbox.minY - img.originY) * scale});\n }\n\n if (this._font.sbix.flags.renderOutlines) {\n super.render(ctx, size);\n }\n }\n}\n","import Glyph from './Glyph';\nimport BBox from './BBox';\n\nclass COLRLayer {\n constructor(glyph, color) {\n this.glyph = glyph;\n this.color = color;\n }\n}\n\n/**\n * Represents a color (e.g. emoji) glyph in Microsoft's COLR format.\n * Each glyph in this format contain a list of colored layers, each\n * of which is another vector glyph.\n */\nexport default class COLRGlyph extends Glyph {\n _getBBox() {\n let bbox = new BBox;\n for (let i = 0; i < this.layers.length; i++) {\n let layer = this.layers[i];\n let b = layer.glyph.bbox;\n bbox.addPoint(b.minX, b.minY);\n bbox.addPoint(b.maxX, b.maxY);\n }\n\n return bbox;\n }\n\n /**\n * Returns an array of objects containing the glyph and color for\n * each layer in the composite color glyph.\n * @type {object[]}\n */\n get layers() {\n let cpal = this._font.CPAL;\n let colr = this._font.COLR;\n let low = 0;\n let high = colr.baseGlyphRecord.length - 1;\n\n while (low <= high) {\n let mid = (low + high) >> 1;\n var rec = colr.baseGlyphRecord[mid];\n\n if (this.id < rec.gid) {\n high = mid - 1;\n } else if (this.id > rec.gid) {\n low = mid + 1;\n } else {\n var baseLayer = rec;\n break;\n }\n }\n\n // if base glyph not found in COLR table,\n // default to normal glyph from glyf or CFF\n if (baseLayer == null) {\n var g = this._font._getBaseGlyph(this.id);\n var color = {\n red: 0,\n green: 0,\n blue: 0,\n alpha: 255\n };\n\n return [new COLRLayer(g, color)];\n }\n\n // otherwise, return an array of all the layers\n let layers = [];\n for (let i = baseLayer.firstLayerIndex; i < baseLayer.firstLayerIndex + baseLayer.numLayers; i++) {\n var rec = colr.layerRecords[i];\n var color = cpal.colorRecords[rec.paletteIndex];\n var g = this._font._getBaseGlyph(rec.gid);\n layers.push(new COLRLayer(g, color));\n }\n\n return layers;\n }\n\n render(ctx, size) {\n for (let {glyph, color} of this.layers) {\n ctx.fillColor([color.red, color.green, color.blue], color.alpha / 255 * 100);\n glyph.render(ctx, size);\n }\n\n return;\n }\n}\n","const TUPLES_SHARE_POINT_NUMBERS = 0x8000;\nconst TUPLE_COUNT_MASK = 0x0fff;\nconst EMBEDDED_TUPLE_COORD = 0x8000;\nconst INTERMEDIATE_TUPLE = 0x4000;\nconst PRIVATE_POINT_NUMBERS = 0x2000;\nconst TUPLE_INDEX_MASK = 0x0fff;\nconst POINTS_ARE_WORDS = 0x80;\nconst POINT_RUN_COUNT_MASK = 0x7f;\nconst DELTAS_ARE_ZERO = 0x80;\nconst DELTAS_ARE_WORDS = 0x40;\nconst DELTA_RUN_COUNT_MASK = 0x3f;\n\n/**\n * This class is transforms TrueType glyphs according to the data from\n * the Apple Advanced Typography variation tables (fvar, gvar, and avar).\n * These tables allow infinite adjustments to glyph weight, width, slant,\n * and optical size without the designer needing to specify every exact style.\n *\n * Apple's documentation for these tables is not great, so thanks to the\n * Freetype project for figuring much of this out.\n *\n * @private\n */\nexport default class GlyphVariationProcessor {\n constructor(font, coords) {\n this.font = font;\n this.normalizedCoords = this.normalizeCoords(coords);\n this.blendVectors = new Map;\n }\n\n normalizeCoords(coords) {\n // the default mapping is linear along each axis, in two segments:\n // from the minValue to defaultValue, and from defaultValue to maxValue.\n let normalized = [];\n for (var i = 0; i < this.font.fvar.axis.length; i++) {\n let axis = this.font.fvar.axis[i];\n if (coords[i] < axis.defaultValue) {\n normalized.push((coords[i] - axis.defaultValue + Number.EPSILON) / (axis.defaultValue - axis.minValue + Number.EPSILON));\n } else {\n normalized.push((coords[i] - axis.defaultValue + Number.EPSILON) / (axis.maxValue - axis.defaultValue + Number.EPSILON));\n }\n }\n\n // if there is an avar table, the normalized value is calculated\n // by interpolating between the two nearest mapped values.\n if (this.font.avar) {\n for (var i = 0; i < this.font.avar.segment.length; i++) {\n let segment = this.font.avar.segment[i];\n for (let j = 0; j < segment.correspondence.length; j++) {\n let pair = segment.correspondence[j];\n if (j >= 1 && normalized[i] < pair.fromCoord) {\n let prev = segment.correspondence[j - 1];\n normalized[i] = ((normalized[i] - prev.fromCoord) * (pair.toCoord - prev.toCoord) + Number.EPSILON) /\n (pair.fromCoord - prev.fromCoord + Number.EPSILON) +\n prev.toCoord;\n\n break;\n }\n }\n }\n }\n\n return normalized;\n }\n\n transformPoints(gid, glyphPoints) {\n if (!this.font.fvar || !this.font.gvar) { return; }\n\n let { gvar } = this.font;\n if (gid >= gvar.glyphCount) { return; }\n\n let offset = gvar.offsets[gid];\n if (offset === gvar.offsets[gid + 1]) { return; }\n\n // Read the gvar data for this glyph\n let { stream } = this.font;\n stream.pos = offset;\n if (stream.pos >= stream.length) {\n return;\n }\n\n let tupleCount = stream.readUInt16BE();\n let offsetToData = offset + stream.readUInt16BE();\n\n if (tupleCount & TUPLES_SHARE_POINT_NUMBERS) {\n var here = stream.pos;\n stream.pos = offsetToData;\n var sharedPoints = this.decodePoints();\n offsetToData = stream.pos;\n stream.pos = here;\n }\n\n let origPoints = glyphPoints.map(pt => pt.copy());\n\n tupleCount &= TUPLE_COUNT_MASK;\n for (let i = 0; i < tupleCount; i++) {\n let tupleDataSize = stream.readUInt16BE();\n let tupleIndex = stream.readUInt16BE();\n\n if (tupleIndex & EMBEDDED_TUPLE_COORD) {\n var tupleCoords = [];\n for (let a = 0; a < gvar.axisCount; a++) {\n tupleCoords.push(stream.readInt16BE() / 16384);\n }\n\n } else {\n if ((tupleIndex & TUPLE_INDEX_MASK) >= gvar.globalCoordCount) {\n throw new Error('Invalid gvar table');\n }\n\n var tupleCoords = gvar.globalCoords[tupleIndex & TUPLE_INDEX_MASK];\n }\n\n if (tupleIndex & INTERMEDIATE_TUPLE) {\n var startCoords = [];\n for (let a = 0; a < gvar.axisCount; a++) {\n startCoords.push(stream.readInt16BE() / 16384);\n }\n\n var endCoords = [];\n for (let a = 0; a < gvar.axisCount; a++) {\n endCoords.push(stream.readInt16BE() / 16384);\n }\n }\n\n // Get the factor at which to apply this tuple\n let factor = this.tupleFactor(tupleIndex, tupleCoords, startCoords, endCoords);\n if (factor === 0) {\n offsetToData += tupleDataSize;\n continue;\n }\n\n var here = stream.pos;\n stream.pos = offsetToData;\n\n if (tupleIndex & PRIVATE_POINT_NUMBERS) {\n var points = this.decodePoints();\n } else {\n var points = sharedPoints;\n }\n\n // points.length = 0 means there are deltas for all points\n let nPoints = points.length === 0 ? glyphPoints.length : points.length;\n let xDeltas = this.decodeDeltas(nPoints);\n let yDeltas = this.decodeDeltas(nPoints);\n\n if (points.length === 0) { // all points\n for (let i = 0; i < glyphPoints.length; i++) {\n var point = glyphPoints[i];\n point.x += Math.round(xDeltas[i] * factor);\n point.y += Math.round(yDeltas[i] * factor);\n }\n } else {\n let outPoints = origPoints.map(pt => pt.copy());\n let hasDelta = glyphPoints.map(() => false);\n\n for (let i = 0; i < points.length; i++) {\n let idx = points[i];\n if (idx < glyphPoints.length) {\n let point = outPoints[idx];\n hasDelta[idx] = true;\n\n point.x += Math.round(xDeltas[i] * factor);\n point.y += Math.round(yDeltas[i] * factor);\n }\n }\n\n this.interpolateMissingDeltas(outPoints, origPoints, hasDelta);\n\n for (let i = 0; i < glyphPoints.length; i++) {\n let deltaX = outPoints[i].x - origPoints[i].x;\n let deltaY = outPoints[i].y - origPoints[i].y;\n\n glyphPoints[i].x += deltaX;\n glyphPoints[i].y += deltaY;\n }\n }\n\n offsetToData += tupleDataSize;\n stream.pos = here;\n }\n }\n\n decodePoints() {\n let stream = this.font.stream;\n let count = stream.readUInt8();\n\n if (count & POINTS_ARE_WORDS) {\n count = (count & POINT_RUN_COUNT_MASK) << 8 | stream.readUInt8();\n }\n\n let points = new Uint16Array(count);\n let i = 0;\n let point = 0;\n while (i < count) {\n let run = stream.readUInt8();\n let runCount = (run & POINT_RUN_COUNT_MASK) + 1;\n let fn = run & POINTS_ARE_WORDS ? stream.readUInt16 : stream.readUInt8;\n\n for (let j = 0; j < runCount && i < count; j++) {\n point += fn.call(stream);\n points[i++] = point;\n }\n }\n\n return points;\n }\n\n decodeDeltas(count) {\n let stream = this.font.stream;\n let i = 0;\n let deltas = new Int16Array(count);\n\n while (i < count) {\n let run = stream.readUInt8();\n let runCount = (run & DELTA_RUN_COUNT_MASK) + 1;\n\n if (run & DELTAS_ARE_ZERO) {\n i += runCount;\n\n } else {\n let fn = run & DELTAS_ARE_WORDS ? stream.readInt16BE : stream.readInt8;\n for (let j = 0; j < runCount && i < count; j++) {\n deltas[i++] = fn.call(stream);\n }\n }\n }\n\n return deltas;\n }\n\n tupleFactor(tupleIndex, tupleCoords, startCoords, endCoords) {\n let normalized = this.normalizedCoords;\n let { gvar } = this.font;\n let factor = 1;\n\n for (let i = 0; i < gvar.axisCount; i++) {\n if (tupleCoords[i] === 0) {\n continue;\n }\n\n if (normalized[i] === 0) {\n return 0;\n }\n\n if ((tupleIndex & INTERMEDIATE_TUPLE) === 0) {\n if ((normalized[i] < Math.min(0, tupleCoords[i])) ||\n (normalized[i] > Math.max(0, tupleCoords[i]))) {\n return 0;\n }\n\n factor = (factor * normalized[i] + Number.EPSILON) / (tupleCoords[i] + Number.EPSILON);\n } else {\n if ((normalized[i] < startCoords[i]) ||\n (normalized[i] > endCoords[i])) {\n return 0;\n\n } else if (normalized[i] < tupleCoords[i]) {\n factor = factor * (normalized[i] - startCoords[i] + Number.EPSILON) / (tupleCoords[i] - startCoords[i] + Number.EPSILON);\n\n } else {\n factor = factor * (endCoords[i] - normalized[i] + Number.EPSILON) / (endCoords[i] - tupleCoords[i] + Number.EPSILON);\n }\n }\n }\n\n return factor;\n }\n\n // Interpolates points without delta values.\n // Needed for the Ø and Q glyphs in Skia.\n // Algorithm from Freetype.\n interpolateMissingDeltas(points, inPoints, hasDelta) {\n if (points.length === 0) {\n return;\n }\n\n let point = 0;\n while (point < points.length) {\n let firstPoint = point;\n\n // find the end point of the contour\n let endPoint = point;\n let pt = points[endPoint];\n while (!pt.endContour) {\n pt = points[++endPoint];\n }\n\n // find the first point that has a delta\n while (point <= endPoint && !hasDelta[point]) {\n point++;\n }\n\n if (point > endPoint) {\n continue;\n }\n\n let firstDelta = point;\n let curDelta = point;\n point++;\n\n while (point <= endPoint) {\n // find the next point with a delta, and interpolate intermediate points\n if (hasDelta[point]) {\n this.deltaInterpolate(curDelta + 1, point - 1, curDelta, point, inPoints, points);\n curDelta = point;\n }\n\n point++;\n }\n\n // shift contour if we only have a single delta\n if (curDelta === firstDelta) {\n this.deltaShift(firstPoint, endPoint, curDelta, inPoints, points);\n } else {\n // otherwise, handle the remaining points at the end and beginning of the contour\n this.deltaInterpolate(curDelta + 1, endPoint, curDelta, firstDelta, inPoints, points);\n\n if (firstDelta > 0) {\n this.deltaInterpolate(firstPoint, firstDelta - 1, curDelta, firstDelta, inPoints, points);\n }\n }\n\n point = endPoint + 1;\n }\n }\n\n deltaInterpolate(p1, p2, ref1, ref2, inPoints, outPoints) {\n if (p1 > p2) {\n return;\n }\n\n let iterable = ['x', 'y'];\n for (let i = 0; i < iterable.length; i++) {\n let k = iterable[i];\n if (inPoints[ref1][k] > inPoints[ref2][k]) {\n var p = ref1;\n ref1 = ref2;\n ref2 = p;\n }\n\n let in1 = inPoints[ref1][k];\n let in2 = inPoints[ref2][k];\n let out1 = outPoints[ref1][k];\n let out2 = outPoints[ref2][k];\n\n // If the reference points have the same coordinate but different\n // delta, inferred delta is zero. Otherwise interpolate.\n if (in1 !== in2 || out1 === out2) {\n let scale = in1 === in2 ? 0 : (out2 - out1) / (in2 - in1);\n\n for (let p = p1; p <= p2; p++) {\n let out = inPoints[p][k];\n\n if (out <= in1) {\n out += out1 - in1;\n } else if (out >= in2) {\n out += out2 - in2;\n } else {\n out = out1 + (out - in1) * scale;\n }\n\n outPoints[p][k] = out;\n }\n }\n }\n }\n\n deltaShift(p1, p2, ref, inPoints, outPoints) {\n let deltaX = outPoints[ref].x - inPoints[ref].x;\n let deltaY = outPoints[ref].y - inPoints[ref].y;\n\n if (deltaX === 0 && deltaY === 0) {\n return;\n }\n\n for (let p = p1; p <= p2; p++) {\n if (p !== ref) {\n outPoints[p].x += deltaX;\n outPoints[p].y += deltaY;\n }\n }\n }\n\n getAdvanceAdjustment(gid, table) {\n let outerIndex, innerIndex;\n\n if (table.advanceWidthMapping) {\n let idx = gid;\n if (idx >= table.advanceWidthMapping.mapCount) {\n idx = table.advanceWidthMapping.mapCount - 1;\n }\n\n let entryFormat = table.advanceWidthMapping.entryFormat;\n ({outerIndex, innerIndex} = table.advanceWidthMapping.mapData[idx]);\n } else {\n outerIndex = 0;\n innerIndex = gid;\n }\n\n return this.getMetricDelta(table.itemVariationStore, outerIndex, innerIndex);\n }\n\n // See pseudo code from `Font Variations Overview'\n // in the OpenType specification.\n getMetricDelta(itemStore, outerIndex, innerIndex) {\n let varData = itemStore.itemVariationData[outerIndex];\n let deltaSet = varData.deltaSets[innerIndex];\n let blendVector = this.getBlendVector(itemStore, outerIndex);\n let netAdjustment = 0;\n\n for (let master = 0; master < varData.regionIndexCount; master++) {\n netAdjustment += deltaSet.deltas[master] * blendVector[master];\n }\n\n return netAdjustment;\n }\n\n getBlendVector(itemStore, outerIndex) {\n let varData = itemStore.itemVariationData[outerIndex];\n if (this.blendVectors.has(varData)) {\n return this.blendVectors.get(varData);\n }\n\n let normalizedCoords = this.normalizedCoords;\n let blendVector = [];\n\n // outer loop steps through master designs to be blended\n for (let master = 0; master < varData.regionIndexCount; master++) {\n let scalar = 1;\n let regionIndex = varData.regionIndexes[master];\n let axes = itemStore.variationRegionList.variationRegions[regionIndex];\n\n // inner loop steps through axes in this region\n for (let j = 0; j < axes.length; j++) {\n let axis = axes[j];\n let axisScalar;\n\n // compute the scalar contribution of this axis\n // ignore invalid ranges\n if (axis.startCoord > axis.peakCoord || axis.peakCoord > axis.endCoord) {\n axisScalar = 1;\n\n } else if (axis.startCoord < 0 && axis.endCoord > 0 && axis.peakCoord !== 0) {\n axisScalar = 1;\n\n // peak of 0 means ignore this axis\n } else if (axis.peakCoord === 0) {\n axisScalar = 1;\n\n // ignore this region if coords are out of range\n } else if (normalizedCoords[j] < axis.startCoord || normalizedCoords[j] > axis.endCoord) {\n axisScalar = 0;\n\n // calculate a proportional factor\n } else {\n if (normalizedCoords[j] === axis.peakCoord) {\n axisScalar = 1;\n } else if (normalizedCoords[j] < axis.peakCoord) {\n axisScalar = (normalizedCoords[j] - axis.startCoord + Number.EPSILON) /\n (axis.peakCoord - axis.startCoord + Number.EPSILON);\n } else {\n axisScalar = (axis.endCoord - normalizedCoords[j] + Number.EPSILON) /\n (axis.endCoord - axis.peakCoord + Number.EPSILON);\n }\n }\n\n // take product of all the axis scalars\n scalar *= axisScalar;\n }\n\n blendVector[master] = scalar;\n }\n\n this.blendVectors.set(varData, blendVector);\n return blendVector;\n }\n}\n","import r from 'restructure';\n\nexport default class Subset {\n constructor(font) {\n this.font = font;\n this.glyphs = [];\n this.mapping = {};\n\n // always include the missing glyph\n this.includeGlyph(0);\n }\n\n includeGlyph(glyph) {\n if (typeof glyph === 'object') {\n glyph = glyph.id;\n }\n\n if (this.mapping[glyph] == null) {\n this.glyphs.push(glyph);\n this.mapping[glyph] = this.glyphs.length - 1;\n }\n\n return this.mapping[glyph];\n }\n\n encodeStream() {\n let s = new r.EncodeStream();\n\n process.nextTick(() => {\n this.encode(s);\n return s.end();\n });\n\n return s;\n }\n}\n","import r from 'restructure';\n\n// Flags for simple glyphs\nconst ON_CURVE = 1 << 0;\nconst X_SHORT_VECTOR = 1 << 1;\nconst Y_SHORT_VECTOR = 1 << 2;\nconst REPEAT = 1 << 3;\nconst SAME_X = 1 << 4;\nconst SAME_Y = 1 << 5;\n\nclass Point {\n static size(val) {\n return val >= 0 && val <= 255 ? 1 : 2;\n }\n \n static encode(stream, value) {\n if (value >= 0 && value <= 255) {\n stream.writeUInt8(value);\n } else {\n stream.writeInt16BE(value);\n }\n }\n}\n\nlet Glyf = new r.Struct({\n numberOfContours: r.int16, // if negative, this is a composite glyph\n xMin: r.int16,\n yMin: r.int16,\n xMax: r.int16,\n yMax: r.int16,\n endPtsOfContours: new r.Array(r.uint16, 'numberOfContours'),\n instructions: new r.Array(r.uint8, r.uint16),\n flags: new r.Array(r.uint8, 0),\n xPoints: new r.Array(Point, 0),\n yPoints: new r.Array(Point, 0)\n});\n\n/**\n * Encodes TrueType glyph outlines\n */\nexport default class TTFGlyphEncoder {\n encodeSimple(path, instructions = []) {\n let endPtsOfContours = [];\n let xPoints = [];\n let yPoints = [];\n let flags = [];\n let same = 0;\n let lastX = 0, lastY = 0, lastFlag = 0;\n let pointCount = 0;\n \n for (let i = 0; i < path.commands.length; i++) {\n let c = path.commands[i];\n \n for (let j = 0; j < c.args.length; j += 2) {\n let x = c.args[j];\n let y = c.args[j + 1];\n let flag = 0;\n \n // If the ending point of a quadratic curve is the midpoint\n // between the control point and the control point of the next\n // quadratic curve, we can omit the ending point.\n if (c.command === 'quadraticCurveTo' && j === 2) {\n let next = path.commands[i + 1];\n if (next && next.command === 'quadraticCurveTo') {\n let midX = (lastX + next.args[0]) / 2;\n let midY = (lastY + next.args[1]) / 2;\n \n if (x === midX && y === midY) {\n continue;\n }\n }\n }\n \n // All points except control points are on curve.\n if (!(c.command === 'quadraticCurveTo' && j === 0)) {\n flag |= ON_CURVE;\n }\n \n flag = this._encodePoint(x, lastX, xPoints, flag, X_SHORT_VECTOR, SAME_X);\n flag = this._encodePoint(y, lastY, yPoints, flag, Y_SHORT_VECTOR, SAME_Y);\n \n if (flag === lastFlag && same < 255) {\n flags[flags.length - 1] |= REPEAT;\n same++;\n } else {\n if (same > 0) {\n flags.push(same);\n same = 0;\n }\n \n flags.push(flag);\n lastFlag = flag;\n }\n \n lastX = x;\n lastY = y;\n pointCount++;\n }\n \n if (c.command === 'closePath') {\n endPtsOfContours.push(pointCount - 1);\n }\n }\n\n // Close the path if the last command didn't already\n if (path.commands.length > 1 && path.commands[path.commands.length - 1].command !== 'closePath') {\n endPtsOfContours.push(pointCount - 1);\n }\n \n let bbox = path.bbox;\n let glyf = {\n numberOfContours: endPtsOfContours.length,\n xMin: bbox.minX,\n yMin: bbox.minY,\n xMax: bbox.maxX,\n yMax: bbox.maxY,\n endPtsOfContours: endPtsOfContours,\n instructions: instructions,\n flags: flags,\n xPoints: xPoints,\n yPoints: yPoints\n };\n \n let size = Glyf.size(glyf);\n let tail = 4 - (size % 4);\n \n let stream = new r.EncodeStream(size + tail);\n Glyf.encode(stream, glyf);\n \n // Align to 4-byte length\n if (tail !== 0) {\n stream.fill(0, tail);\n }\n \n return stream.buffer;\n }\n \n _encodePoint(value, last, points, flag, shortFlag, sameFlag) {\n let diff = value - last;\n \n if (value === last) {\n flag |= sameFlag;\n } else {\n if (-255 <= diff && diff <= 255) {\n flag |= shortFlag;\n if (diff < 0) {\n diff = -diff;\n } else {\n flag |= sameFlag;\n }\n }\n \n points.push(diff);\n }\n \n return flag;\n }\n}\n","import cloneDeep from 'clone';\nimport Subset from './Subset';\nimport Directory from '../tables/directory';\nimport Tables from '../tables';\nimport TTFGlyphEncoder from '../glyph/TTFGlyphEncoder';\n\nexport default class TTFSubset extends Subset {\n constructor(font) {\n super(font);\n this.glyphEncoder = new TTFGlyphEncoder;\n }\n \n _addGlyph(gid) {\n let glyph = this.font.getGlyph(gid);\n let glyf = glyph._decode();\n\n // get the offset to the glyph from the loca table\n let curOffset = this.font.loca.offsets[gid];\n let nextOffset = this.font.loca.offsets[gid + 1];\n\n let stream = this.font._getTableStream('glyf');\n stream.pos += curOffset;\n\n let buffer = stream.readBuffer(nextOffset - curOffset);\n\n // if it is a compound glyph, include its components\n if (glyf && glyf.numberOfContours < 0) {\n buffer = new Buffer(buffer);\n for (let component of glyf.components) {\n gid = this.includeGlyph(component.glyphID);\n buffer.writeUInt16BE(gid, component.pos);\n }\n } else if (glyf && this.font._variationProcessor) {\n // If this is a TrueType variation glyph, re-encode the path\n buffer = this.glyphEncoder.encodeSimple(glyph.path, glyf.instructions);\n }\n\n this.glyf.push(buffer);\n this.loca.offsets.push(this.offset);\n \n this.hmtx.metrics.push({\n advance: glyph.advanceWidth,\n bearing: glyph._getMetrics().leftBearing\n });\n\n this.offset += buffer.length;\n return this.glyf.length - 1;\n }\n\n encode(stream) {\n // tables required by PDF spec:\n // head, hhea, loca, maxp, cvt , prep, glyf, hmtx, fpgm\n //\n // additional tables required for standalone fonts:\n // name, cmap, OS/2, post\n\n this.glyf = [];\n this.offset = 0;\n this.loca = {\n offsets: []\n };\n\n this.hmtx = {\n metrics: [],\n bearings: []\n };\n\n // include all the glyphs\n // not using a for loop because we need to support adding more\n // glyphs to the array as we go, and CoffeeScript caches the length.\n let i = 0;\n while (i < this.glyphs.length) {\n this._addGlyph(this.glyphs[i++]);\n }\n\n let maxp = cloneDeep(this.font.maxp);\n maxp.numGlyphs = this.glyf.length;\n\n this.loca.offsets.push(this.offset);\n Tables.loca.preEncode.call(this.loca);\n\n let head = cloneDeep(this.font.head);\n head.indexToLocFormat = this.loca.version;\n\n let hhea = cloneDeep(this.font.hhea);\n hhea.numberOfMetrics = this.hmtx.metrics.length;\n\n // map = []\n // for index in [0...256]\n // if index < @numGlyphs\n // map[index] = index\n // else\n // map[index] = 0\n //\n // cmapTable =\n // version: 0\n // length: 262\n // language: 0\n // codeMap: map\n //\n // cmap =\n // version: 0\n // numSubtables: 1\n // tables: [\n // platformID: 1\n // encodingID: 0\n // table: cmapTable\n // ]\n\n // TODO: subset prep, cvt, fpgm?\n Directory.encode(stream, {\n tables: {\n head,\n hhea,\n loca: this.loca,\n maxp,\n 'cvt ': this.font['cvt '],\n prep: this.font.prep,\n glyf: this.glyf,\n hmtx: this.hmtx,\n fpgm: this.font.fpgm\n\n // name: clone @font.name\n // 'OS/2': clone @font['OS/2']\n // post: clone @font.post\n // cmap: cmap\n }\n });\n }\n}\n","import Subset from './Subset';\nimport CFFTop from '../cff/CFFTop';\nimport CFFPrivateDict from '../cff/CFFPrivateDict';\nimport standardStrings from '../cff/CFFStandardStrings';\n\nexport default class CFFSubset extends Subset {\n constructor(font) {\n super(font);\n\n this.cff = this.font['CFF '];\n if (!this.cff) {\n throw new Error('Not a CFF Font');\n }\n }\n\n subsetCharstrings() {\n this.charstrings = [];\n let gsubrs = {};\n\n for (let gid of this.glyphs) {\n this.charstrings.push(this.cff.getCharString(gid));\n\n let glyph = this.font.getGlyph(gid);\n let path = glyph.path; // this causes the glyph to be parsed\n\n for (let subr in glyph._usedGsubrs) {\n gsubrs[subr] = true;\n }\n }\n\n this.gsubrs = this.subsetSubrs(this.cff.globalSubrIndex, gsubrs);\n }\n\n subsetSubrs(subrs, used) {\n let res = [];\n for (let i = 0; i < subrs.length; i++) {\n let subr = subrs[i];\n if (used[i]) {\n this.cff.stream.pos = subr.offset;\n res.push(this.cff.stream.readBuffer(subr.length));\n } else {\n res.push(new Buffer([11])); // return\n }\n }\n\n return res;\n }\n\n subsetFontdict(topDict) {\n topDict.FDArray = [];\n topDict.FDSelect = {\n version: 0,\n fds: []\n };\n\n let used_fds = {};\n let used_subrs = [];\n for (let gid of this.glyphs) {\n let fd = this.cff.fdForGlyph(gid);\n if (fd == null) {\n continue;\n }\n\n if (!used_fds[fd]) {\n topDict.FDArray.push(Object.assign({}, this.cff.topDict.FDArray[fd]));\n used_subrs.push({});\n }\n\n used_fds[fd] = true;\n topDict.FDSelect.fds.push(topDict.FDArray.length - 1);\n\n let glyph = this.font.getGlyph(gid);\n let path = glyph.path; // this causes the glyph to be parsed\n for (let subr in glyph._usedSubrs) {\n used_subrs[used_subrs.length - 1][subr] = true;\n }\n }\n\n for (let i = 0; i < topDict.FDArray.length; i++) {\n let dict = topDict.FDArray[i];\n delete dict.FontName;\n if (dict.Private && dict.Private.Subrs) {\n dict.Private = Object.assign({}, dict.Private);\n dict.Private.Subrs = this.subsetSubrs(dict.Private.Subrs, used_subrs[i]);\n }\n }\n\n return;\n }\n\n createCIDFontdict(topDict) {\n let used_subrs = {};\n for (let gid of this.glyphs) {\n let glyph = this.font.getGlyph(gid);\n let path = glyph.path; // this causes the glyph to be parsed\n\n for (let subr in glyph._usedSubrs) {\n used_subrs[subr] = true;\n }\n }\n\n let privateDict = Object.assign({}, this.cff.topDict.Private);\n privateDict.Subrs = this.subsetSubrs(this.cff.topDict.Private.Subrs, used_subrs);\n\n topDict.FDArray = [{ Private: privateDict }];\n return topDict.FDSelect = {\n version: 3,\n nRanges: 1,\n ranges: [{ first: 0, fd: 0 }],\n sentinel: this.charstrings.length\n };\n }\n\n addString(string) {\n if (!string) {\n return null;\n }\n\n if (!this.strings) {\n this.strings = [];\n }\n\n this.strings.push(string);\n return standardStrings.length + this.strings.length - 1;\n }\n\n encode(stream) {\n this.subsetCharstrings();\n\n let charset = {\n version: this.charstrings.length > 255 ? 2 : 1,\n ranges: [{ first: 1, nLeft: this.charstrings.length - 2 }]\n };\n\n let topDict = Object.assign({}, this.cff.topDict);\n topDict.Private = null;\n topDict.charset = charset;\n topDict.Encoding = null;\n topDict.CharStrings = this.charstrings;\n\n for (let key of ['version', 'Notice', 'Copyright', 'FullName', 'FamilyName', 'Weight', 'PostScript', 'BaseFontName', 'FontName']) {\n topDict[key] = this.addString(this.cff.string(topDict[key]));\n }\n\n topDict.ROS = [this.addString('Adobe'), this.addString('Identity'), 0];\n topDict.CIDCount = this.charstrings.length;\n\n if (this.cff.isCIDFont) {\n this.subsetFontdict(topDict);\n } else {\n this.createCIDFontdict(topDict);\n }\n\n let top = {\n version: 1,\n hdrSize: this.cff.hdrSize,\n offSize: this.cff.length,\n header: this.cff.header,\n nameIndex: [this.cff.postscriptName],\n topDictIndex: [topDict],\n stringIndex: this.strings,\n globalSubrIndex: this.gsubrs\n };\n\n CFFTop.encode(stream, top);\n }\n}\n","import r from 'restructure';\nimport { cache } from './decorators';\nimport fontkit from './base';\nimport Directory from './tables/directory';\nimport tables from './tables';\nimport CmapProcessor from './CmapProcessor';\nimport LayoutEngine from './layout/LayoutEngine';\nimport TTFGlyph from './glyph/TTFGlyph';\nimport CFFGlyph from './glyph/CFFGlyph';\nimport SBIXGlyph from './glyph/SBIXGlyph';\nimport COLRGlyph from './glyph/COLRGlyph';\nimport GlyphVariationProcessor from './glyph/GlyphVariationProcessor';\nimport TTFSubset from './subset/TTFSubset';\nimport CFFSubset from './subset/CFFSubset';\nimport BBox from './glyph/BBox';\n\n/**\n * This is the base class for all SFNT-based font formats in fontkit.\n * It supports TrueType, and PostScript glyphs, and several color glyph formats.\n */\nexport default class TTFFont {\n static probe(buffer) {\n let format = buffer.toString('ascii', 0, 4);\n return format === 'true' || format === 'OTTO' || format === String.fromCharCode(0, 1, 0, 0);\n }\n\n constructor(stream, variationCoords = null) {\n this.stream = stream;\n this.variationCoords = variationCoords;\n\n this._directoryPos = this.stream.pos;\n this._tables = {};\n this._glyphs = {};\n this._decodeDirectory();\n\n // define properties for each table to lazily parse\n for (let tag in this.directory.tables) {\n let table = this.directory.tables[tag];\n if (tables[tag] && table.length > 0) {\n Object.defineProperty(this, tag, {\n get: this._getTable.bind(this, table)\n });\n }\n }\n }\n\n _getTable(table) {\n if (!(table.tag in this._tables)) {\n try {\n this._tables[table.tag] = this._decodeTable(table);\n } catch (e) {\n if (fontkit.logErrors) {\n console.error(`Error decoding table ${table.tag}`);\n console.error(e.stack);\n }\n }\n }\n\n return this._tables[table.tag];\n }\n\n _getTableStream(tag) {\n let table = this.directory.tables[tag];\n if (table) {\n this.stream.pos = table.offset;\n return this.stream;\n }\n\n return null;\n }\n\n _decodeDirectory() {\n return this.directory = Directory.decode(this.stream, {_startOffset: 0});\n }\n\n _decodeTable(table) {\n let pos = this.stream.pos;\n\n let stream = this._getTableStream(table.tag);\n let result = tables[table.tag].decode(stream, this, table.length);\n\n this.stream.pos = pos;\n return result;\n }\n\n /**\n * The unique PostScript name for this font\n * @type {string}\n */\n get postscriptName() {\n let name = this.name.records.postscriptName;\n let lang = Object.keys(name)[0];\n return name[lang];\n }\n\n /**\n * Gets a string from the font's `name` table\n * `lang` is a BCP-47 language code.\n * @return {string}\n */\n getName(key, lang = 'en') {\n let record = this.name.records[key];\n if (record) {\n return record[lang];\n }\n\n return null;\n }\n\n /**\n * The font's full name, e.g. \"Helvetica Bold\"\n * @type {string}\n */\n get fullName() {\n return this.getName('fullName');\n }\n\n /**\n * The font's family name, e.g. \"Helvetica\"\n * @type {string}\n */\n get familyName() {\n return this.getName('fontFamily');\n }\n\n /**\n * The font's sub-family, e.g. \"Bold\".\n * @type {string}\n */\n get subfamilyName() {\n return this.getName('fontSubfamily');\n }\n\n /**\n * The font's copyright information\n * @type {string}\n */\n get copyright() {\n return this.getName('copyright');\n }\n\n /**\n * The font's version number\n * @type {string}\n */\n get version() {\n return this.getName('version');\n }\n\n /**\n * The font’s [ascender](https://en.wikipedia.org/wiki/Ascender_(typography))\n * @type {number}\n */\n get ascent() {\n return this.hhea.ascent;\n }\n\n /**\n * The font’s [descender](https://en.wikipedia.org/wiki/Descender)\n * @type {number}\n */\n get descent() {\n return this.hhea.descent;\n }\n\n /**\n * The amount of space that should be included between lines\n * @type {number}\n */\n get lineGap() {\n return this.hhea.lineGap;\n }\n\n /**\n * The offset from the normal underline position that should be used\n * @type {number}\n */\n get underlinePosition() {\n return this.post.underlinePosition;\n }\n\n /**\n * The weight of the underline that should be used\n * @type {number}\n */\n get underlineThickness() {\n return this.post.underlineThickness;\n }\n\n /**\n * If this is an italic font, the angle the cursor should be drawn at to match the font design\n * @type {number}\n */\n get italicAngle() {\n return this.post.italicAngle;\n }\n\n /**\n * The height of capital letters above the baseline.\n * See [here](https://en.wikipedia.org/wiki/Cap_height) for more details.\n * @type {number}\n */\n get capHeight() {\n let os2 = this['OS/2'];\n return os2 ? os2.capHeight : this.ascent;\n }\n\n /**\n * The height of lower case letters in the font.\n * See [here](https://en.wikipedia.org/wiki/X-height) for more details.\n * @type {number}\n */\n get xHeight() {\n let os2 = this['OS/2'];\n return os2 ? os2.xHeight : 0;\n }\n\n /**\n * The number of glyphs in the font.\n * @type {number}\n */\n get numGlyphs() {\n return this.maxp.numGlyphs;\n }\n\n /**\n * The size of the font’s internal coordinate grid\n * @type {number}\n */\n get unitsPerEm() {\n return this.head.unitsPerEm;\n }\n\n /**\n * The font’s bounding box, i.e. the box that encloses all glyphs in the font.\n * @type {BBox}\n */\n @cache\n get bbox() {\n return Object.freeze(new BBox(this.head.xMin, this.head.yMin, this.head.xMax, this.head.yMax));\n }\n\n @cache\n get _cmapProcessor() {\n return new CmapProcessor(this.cmap);\n }\n\n /**\n * An array of all of the unicode code points supported by the font.\n * @type {number[]}\n */\n @cache\n get characterSet() {\n return this._cmapProcessor.getCharacterSet();\n }\n\n /**\n * Returns whether there is glyph in the font for the given unicode code point.\n *\n * @param {number} codePoint\n * @return {boolean}\n */\n hasGlyphForCodePoint(codePoint) {\n return !!this._cmapProcessor.lookup(codePoint);\n }\n\n /**\n * Maps a single unicode code point to a Glyph object.\n * Does not perform any advanced substitutions (there is no context to do so).\n *\n * @param {number} codePoint\n * @return {Glyph}\n */\n glyphForCodePoint(codePoint) {\n return this.getGlyph(this._cmapProcessor.lookup(codePoint), [codePoint]);\n }\n\n /**\n * Returns an array of Glyph objects for the given string.\n * This is only a one-to-one mapping from characters to glyphs.\n * For most uses, you should use font.layout (described below), which\n * provides a much more advanced mapping supporting AAT and OpenType shaping.\n *\n * @param {string} string\n * @return {Glyph[]}\n */\n glyphsForString(string) {\n let glyphs = [];\n let len = string.length;\n let idx = 0;\n let last = -1;\n let state = -1;\n\n while (idx <= len) {\n let code = 0;\n let nextState = 0;\n\n if (idx < len) {\n // Decode the next codepoint from UTF 16\n code = string.charCodeAt(idx++);\n if (0xd800 <= code && code <= 0xdbff && idx < len) {\n let next = string.charCodeAt(idx);\n if (0xdc00 <= next && next <= 0xdfff) {\n idx++;\n code = ((code & 0x3ff) << 10) + (next & 0x3ff) + 0x10000;\n }\n }\n\n // Compute the next state: 1 if the next codepoint is a variation selector, 0 otherwise.\n nextState = ((0xfe00 <= code && code <= 0xfe0f) || (0xe0100 <= code && code <= 0xe01ef)) ? 1 : 0;\n } else {\n idx++;\n }\n\n if (state === 0 && nextState === 1) {\n // Variation selector following normal codepoint.\n glyphs.push(this.getGlyph(this._cmapProcessor.lookup(last, code), [last, code]));\n } else if (state === 0 && nextState === 0) {\n // Normal codepoint following normal codepoint.\n glyphs.push(this.glyphForCodePoint(last));\n }\n\n last = code;\n state = nextState;\n }\n\n return glyphs;\n }\n\n @cache\n get _layoutEngine() {\n return new LayoutEngine(this);\n }\n\n /**\n * Returns a GlyphRun object, which includes an array of Glyphs and GlyphPositions for the given string.\n *\n * @param {string} string\n * @param {string[]} [userFeatures]\n * @param {string} [script]\n * @param {string} [language]\n * @return {GlyphRun}\n */\n layout(string, userFeatures, script, language) {\n return this._layoutEngine.layout(string, userFeatures, script, language);\n }\n\n /**\n * Returns an array of strings that map to the given glyph id.\n * @param {number} gid - glyph id\n */\n stringsForGlyph(gid) {\n return this._layoutEngine.stringsForGlyph(gid);\n }\n\n /**\n * An array of all [OpenType feature tags](https://www.microsoft.com/typography/otspec/featuretags.htm)\n * (or mapped AAT tags) supported by the font.\n * The features parameter is an array of OpenType feature tags to be applied in addition to the default set.\n * If this is an AAT font, the OpenType feature tags are mapped to AAT features.\n *\n * @type {string[]}\n */\n get availableFeatures() {\n return this._layoutEngine.getAvailableFeatures();\n }\n\n _getBaseGlyph(glyph, characters = []) {\n if (!this._glyphs[glyph]) {\n if (this.directory.tables.glyf) {\n this._glyphs[glyph] = new TTFGlyph(glyph, characters, this);\n\n } else if (this.directory.tables['CFF '] || this.directory.tables.CFF2) {\n this._glyphs[glyph] = new CFFGlyph(glyph, characters, this);\n }\n }\n\n return this._glyphs[glyph] || null;\n }\n\n /**\n * Returns a glyph object for the given glyph id.\n * You can pass the array of code points this glyph represents for\n * your use later, and it will be stored in the glyph object.\n *\n * @param {number} glyph\n * @param {number[]} characters\n * @return {Glyph}\n */\n getGlyph(glyph, characters = []) {\n if (!this._glyphs[glyph]) {\n if (this.directory.tables.sbix) {\n this._glyphs[glyph] = new SBIXGlyph(glyph, characters, this);\n\n } else if ((this.directory.tables.COLR) && (this.directory.tables.CPAL)) {\n this._glyphs[glyph] = new COLRGlyph(glyph, characters, this);\n\n } else {\n this._getBaseGlyph(glyph, characters);\n }\n }\n\n return this._glyphs[glyph] || null;\n }\n\n /**\n * Returns a Subset for this font.\n * @return {Subset}\n */\n createSubset() {\n if (this.directory.tables['CFF ']) {\n return new CFFSubset(this);\n }\n\n return new TTFSubset(this);\n }\n\n /**\n * Returns an object describing the available variation axes\n * that this font supports. Keys are setting tags, and values\n * contain the axis name, range, and default value.\n *\n * @type {object}\n */\n @cache\n get variationAxes() {\n let res = {};\n if (!this.fvar) {\n return res;\n }\n\n for (let axis of this.fvar.axis) {\n res[axis.axisTag.trim()] = {\n name: axis.name.en,\n min: axis.minValue,\n default: axis.defaultValue,\n max: axis.maxValue\n };\n }\n\n return res;\n }\n\n /**\n * Returns an object describing the named variation instances\n * that the font designer has specified. Keys are variation names\n * and values are the variation settings for this instance.\n *\n * @type {object}\n */\n @cache\n get namedVariations() {\n let res = {};\n if (!this.fvar) {\n return res;\n }\n\n for (let instance of this.fvar.instance) {\n let settings = {};\n for (let i = 0; i < this.fvar.axis.length; i++) {\n let axis = this.fvar.axis[i];\n settings[axis.axisTag.trim()] = instance.coord[i];\n }\n\n res[instance.name.en] = settings;\n }\n\n return res;\n }\n\n /**\n * Returns a new font with the given variation settings applied.\n * Settings can either be an instance name, or an object containing\n * variation tags as specified by the `variationAxes` property.\n *\n * @param {object} settings\n * @return {TTFFont}\n */\n getVariation(settings) {\n if (!(this.directory.tables.fvar && ((this.directory.tables.gvar && this.directory.tables.glyf) || this.directory.tables.CFF2))) {\n throw new Error('Variations require a font with the fvar, gvar and glyf, or CFF2 tables.');\n }\n\n if (typeof settings === 'string') {\n settings = this.namedVariations[settings];\n }\n\n if (typeof settings !== 'object') {\n throw new Error('Variation settings must be either a variation name or settings object.');\n }\n\n // normalize the coordinates\n let coords = this.fvar.axis.map((axis, i) => {\n let axisTag = axis.axisTag.trim();\n if (axisTag in settings) {\n return Math.max(axis.minValue, Math.min(axis.maxValue, settings[axisTag]));\n } else {\n return axis.defaultValue;\n }\n });\n\n let stream = new r.DecodeStream(this.stream.buffer);\n stream.pos = this._directoryPos;\n\n let font = new TTFFont(stream, coords);\n font._tables = this._tables;\n\n return font;\n }\n\n @cache\n get _variationProcessor() {\n if (!this.fvar) {\n return null;\n }\n\n let variationCoords = this.variationCoords;\n\n // Ignore if no variation coords and not CFF2\n if (!variationCoords && !this.CFF2) {\n return null;\n }\n\n if (!variationCoords) {\n variationCoords = this.fvar.axis.map(axis => axis.defaultValue);\n }\n\n return new GlyphVariationProcessor(this, variationCoords);\n }\n\n // Standardized format plugin API\n getFont(name) {\n return this.getVariation(name);\n }\n}\n","import r from 'restructure';\nimport tables from './';\n\nlet WOFFDirectoryEntry = new r.Struct({\n tag: new r.String(4),\n offset: new r.Pointer(r.uint32, 'void', {type: 'global'}),\n compLength: r.uint32,\n length: r.uint32,\n origChecksum: r.uint32\n});\n\nlet WOFFDirectory = new r.Struct({\n tag: new r.String(4), // should be 'wOFF'\n flavor: r.uint32,\n length: r.uint32,\n numTables: r.uint16,\n reserved: new r.Reserved(r.uint16),\n totalSfntSize: r.uint32,\n majorVersion: r.uint16,\n minorVersion: r.uint16,\n metaOffset: r.uint32,\n metaLength: r.uint32,\n metaOrigLength: r.uint32,\n privOffset: r.uint32,\n privLength: r.uint32,\n tables: new r.Array(WOFFDirectoryEntry, 'numTables')\n});\n\nWOFFDirectory.process = function() {\n let tables = {};\n for (let table of this.tables) {\n tables[table.tag] = table;\n }\n\n this.tables = tables;\n};\n\nexport default WOFFDirectory;\n","import TTFFont from './TTFFont';\nimport WOFFDirectory from './tables/WOFFDirectory';\nimport tables from './tables';\nimport inflate from 'tiny-inflate';\nimport r from 'restructure';\n\nexport default class WOFFFont extends TTFFont {\n static probe(buffer) {\n return buffer.toString('ascii', 0, 4) === 'wOFF';\n }\n\n _decodeDirectory() {\n this.directory = WOFFDirectory.decode(this.stream, { _startOffset: 0 });\n }\n\n _getTableStream(tag) {\n let table = this.directory.tables[tag];\n if (table) {\n this.stream.pos = table.offset;\n\n if (table.compLength < table.length) {\n this.stream.pos += 2; // skip deflate header\n let outBuffer = new Buffer(table.length);\n let buf = inflate(this.stream.readBuffer(table.compLength - 2), outBuffer);\n return new r.DecodeStream(buf);\n } else {\n return this.stream;\n }\n }\n\n return null;\n }\n}\n","import TTFGlyph from './TTFGlyph';\n\n/**\n * Represents a TrueType glyph in the WOFF2 format, which compresses glyphs differently.\n */\nexport default class WOFF2Glyph extends TTFGlyph {\n _decode() {\n // We have to decode in advance (in WOFF2Font), so just return the pre-decoded data.\n return this._font._transformedGlyphs[this.id];\n }\n\n _getCBox() {\n return this.path.bbox;\n }\n}\n","import r from 'restructure';\n\nconst Base128 = {\n decode(stream) {\n let result = 0;\n let iterable = [0, 1, 2, 3, 4];\n for (let j = 0; j < iterable.length; j++) {\n let i = iterable[j];\n let code = stream.readUInt8();\n\n // If any of the top seven bits are set then we're about to overflow.\n if (result & 0xe0000000) {\n throw new Error('Overflow');\n }\n\n result = (result << 7) | (code & 0x7f);\n if ((code & 0x80) === 0) {\n return result;\n }\n }\n\n throw new Error('Bad base 128 number');\n }\n};\n\nlet knownTags = [\n 'cmap', 'head', 'hhea', 'hmtx', 'maxp', 'name', 'OS/2', 'post', 'cvt ',\n 'fpgm', 'glyf', 'loca', 'prep', 'CFF ', 'VORG', 'EBDT', 'EBLC', 'gasp',\n 'hdmx', 'kern', 'LTSH', 'PCLT', 'VDMX', 'vhea', 'vmtx', 'BASE', 'GDEF',\n 'GPOS', 'GSUB', 'EBSC', 'JSTF', 'MATH', 'CBDT', 'CBLC', 'COLR', 'CPAL',\n 'SVG ', 'sbix', 'acnt', 'avar', 'bdat', 'bloc', 'bsln', 'cvar', 'fdsc',\n 'feat', 'fmtx', 'fvar', 'gvar', 'hsty', 'just', 'lcar', 'mort', 'morx',\n 'opbd', 'prop', 'trak', 'Zapf', 'Silf', 'Glat', 'Gloc', 'Feat', 'Sill'\n];\n\nlet WOFF2DirectoryEntry = new r.Struct({\n flags: r.uint8,\n customTag: new r.Optional(new r.String(4), t => (t.flags & 0x3f) === 0x3f),\n tag: t => t.customTag || knownTags[t.flags & 0x3f],// || (() => { throw new Error(`Bad tag: ${flags & 0x3f}`); })(); },\n length: Base128,\n transformVersion: t => (t.flags >>> 6) & 0x03,\n transformed: t => (t.tag === 'glyf' || t.tag === 'loca') ? t.transformVersion === 0 : t.transformVersion !== 0,\n transformLength: new r.Optional(Base128, t => t.transformed)\n});\n\nlet WOFF2Directory = new r.Struct({\n tag: new r.String(4), // should be 'wOF2'\n flavor: r.uint32,\n length: r.uint32,\n numTables: r.uint16,\n reserved: new r.Reserved(r.uint16),\n totalSfntSize: r.uint32,\n totalCompressedSize: r.uint32,\n majorVersion: r.uint16,\n minorVersion: r.uint16,\n metaOffset: r.uint32,\n metaLength: r.uint32,\n metaOrigLength: r.uint32,\n privOffset: r.uint32,\n privLength: r.uint32,\n tables: new r.Array(WOFF2DirectoryEntry, 'numTables')\n});\n\nWOFF2Directory.process = function() {\n let tables = {};\n for (let i = 0; i < this.tables.length; i++) {\n let table = this.tables[i];\n tables[table.tag] = table;\n }\n\n return this.tables = tables;\n};\n\nexport default WOFF2Directory;\n","import r from 'restructure';\nimport brotli from 'brotli/decompress';\nimport TTFFont from './TTFFont';\nimport TTFGlyph, { Point } from './glyph/TTFGlyph';\nimport WOFF2Glyph from './glyph/WOFF2Glyph';\nimport WOFF2Directory from './tables/WOFF2Directory';\n\n/**\n * Subclass of TTFFont that represents a TTF/OTF font compressed by WOFF2\n * See spec here: http://www.w3.org/TR/WOFF2/\n */\nexport default class WOFF2Font extends TTFFont {\n static probe(buffer) {\n return buffer.toString('ascii', 0, 4) === 'wOF2';\n }\n\n _decodeDirectory() {\n this.directory = WOFF2Directory.decode(this.stream);\n this._dataPos = this.stream.pos;\n }\n\n _decompress() {\n // decompress data and setup table offsets if we haven't already\n if (!this._decompressed) {\n this.stream.pos = this._dataPos;\n let buffer = this.stream.readBuffer(this.directory.totalCompressedSize);\n\n let decompressedSize = 0;\n for (let tag in this.directory.tables) {\n let entry = this.directory.tables[tag];\n entry.offset = decompressedSize;\n decompressedSize += (entry.transformLength != null) ? entry.transformLength : entry.length;\n }\n\n let decompressed = brotli(buffer, decompressedSize);\n if (!decompressed) {\n throw new Error('Error decoding compressed data in WOFF2');\n }\n\n this.stream = new r.DecodeStream(new Buffer(decompressed));\n this._decompressed = true;\n }\n }\n\n _decodeTable(table) {\n this._decompress();\n return super._decodeTable(table);\n }\n\n // Override this method to get a glyph and return our\n // custom subclass if there is a glyf table.\n _getBaseGlyph(glyph, characters = []) {\n if (!this._glyphs[glyph]) {\n if (this.directory.tables.glyf && this.directory.tables.glyf.transformed) {\n if (!this._transformedGlyphs) { this._transformGlyfTable(); }\n return this._glyphs[glyph] = new WOFF2Glyph(glyph, characters, this);\n\n } else {\n return super._getBaseGlyph(glyph, characters);\n }\n }\n }\n\n _transformGlyfTable() {\n this._decompress();\n this.stream.pos = this.directory.tables.glyf.offset;\n let table = GlyfTable.decode(this.stream);\n let glyphs = [];\n\n for (let index = 0; index < table.numGlyphs; index++) {\n let glyph = {};\n let nContours = table.nContours.readInt16BE();\n glyph.numberOfContours = nContours;\n\n if (nContours > 0) { // simple glyph\n let nPoints = [];\n let totalPoints = 0;\n\n for (let i = 0; i < nContours; i++) {\n let r = read255UInt16(table.nPoints);\n nPoints.push(r);\n totalPoints += r;\n }\n\n glyph.points = decodeTriplet(table.flags, table.glyphs, totalPoints);\n for (let i = 0; i < nContours; i++) {\n glyph.points[nPoints[i] - 1].endContour = true;\n }\n\n var instructionSize = read255UInt16(table.glyphs);\n\n } else if (nContours < 0) { // composite glyph\n let haveInstructions = TTFGlyph.prototype._decodeComposite.call({ _font: this }, glyph, table.composites);\n if (haveInstructions) {\n var instructionSize = read255UInt16(table.glyphs);\n }\n }\n\n glyphs.push(glyph);\n }\n\n this._transformedGlyphs = glyphs;\n }\n}\n\n// Special class that accepts a length and returns a sub-stream for that data\nclass Substream {\n constructor(length) {\n this.length = length;\n this._buf = new r.Buffer(length);\n }\n\n decode(stream, parent) {\n return new r.DecodeStream(this._buf.decode(stream, parent));\n }\n}\n\n// This struct represents the entire glyf table\nlet GlyfTable = new r.Struct({\n version: r.uint32,\n numGlyphs: r.uint16,\n indexFormat: r.uint16,\n nContourStreamSize: r.uint32,\n nPointsStreamSize: r.uint32,\n flagStreamSize: r.uint32,\n glyphStreamSize: r.uint32,\n compositeStreamSize: r.uint32,\n bboxStreamSize: r.uint32,\n instructionStreamSize: r.uint32,\n nContours: new Substream('nContourStreamSize'),\n nPoints: new Substream('nPointsStreamSize'),\n flags: new Substream('flagStreamSize'),\n glyphs: new Substream('glyphStreamSize'),\n composites: new Substream('compositeStreamSize'),\n bboxes: new Substream('bboxStreamSize'),\n instructions: new Substream('instructionStreamSize')\n});\n\nconst WORD_CODE = 253;\nconst ONE_MORE_BYTE_CODE2 = 254;\nconst ONE_MORE_BYTE_CODE1 = 255;\nconst LOWEST_U_CODE = 253;\n\nfunction read255UInt16(stream) {\n let code = stream.readUInt8();\n\n if (code === WORD_CODE) {\n return stream.readUInt16BE();\n }\n\n if (code === ONE_MORE_BYTE_CODE1) {\n return stream.readUInt8() + LOWEST_U_CODE;\n }\n\n if (code === ONE_MORE_BYTE_CODE2) {\n return stream.readUInt8() + LOWEST_U_CODE * 2;\n }\n\n return code;\n}\n\nfunction withSign(flag, baseval) {\n return flag & 1 ? baseval : -baseval;\n}\n\nfunction decodeTriplet(flags, glyphs, nPoints) {\n let y;\n let x = y = 0;\n let res = [];\n\n for (let i = 0; i < nPoints; i++) {\n let dx = 0, dy = 0;\n let flag = flags.readUInt8();\n let onCurve = !(flag >> 7);\n flag &= 0x7f;\n\n if (flag < 10) {\n dx = 0;\n dy = withSign(flag, ((flag & 14) << 7) + glyphs.readUInt8());\n\n } else if (flag < 20) {\n dx = withSign(flag, (((flag - 10) & 14) << 7) + glyphs.readUInt8());\n dy = 0;\n\n } else if (flag < 84) {\n var b0 = flag - 20;\n var b1 = glyphs.readUInt8();\n dx = withSign(flag, 1 + (b0 & 0x30) + (b1 >> 4));\n dy = withSign(flag >> 1, 1 + ((b0 & 0x0c) << 2) + (b1 & 0x0f));\n\n } else if (flag < 120) {\n var b0 = flag - 84;\n dx = withSign(flag, 1 + ((b0 / 12) << 8) + glyphs.readUInt8());\n dy = withSign(flag >> 1, 1 + (((b0 % 12) >> 2) << 8) + glyphs.readUInt8());\n\n } else if (flag < 124) {\n var b1 = glyphs.readUInt8();\n let b2 = glyphs.readUInt8();\n dx = withSign(flag, (b1 << 4) + (b2 >> 4));\n dy = withSign(flag >> 1, ((b2 & 0x0f) << 8) + glyphs.readUInt8());\n\n } else {\n dx = withSign(flag, glyphs.readUInt16BE());\n dy = withSign(flag >> 1, glyphs.readUInt16BE());\n }\n\n x += dx;\n y += dy;\n res.push(new Point(onCurve, false, x, y));\n }\n\n return res;\n}\n","import r from 'restructure';\nimport TTFFont from './TTFFont';\nimport Directory from './tables/directory';\nimport tables from './tables';\n\nlet TTCHeader = new r.VersionedStruct(r.uint32, {\n 0x00010000: {\n numFonts: r.uint32,\n offsets: new r.Array(r.uint32, 'numFonts')\n },\n 0x00020000: {\n numFonts: r.uint32,\n offsets: new r.Array(r.uint32, 'numFonts'),\n dsigTag: r.uint32,\n dsigLength: r.uint32,\n dsigOffset: r.uint32\n }\n});\n\nexport default class TrueTypeCollection {\n static probe(buffer) {\n return buffer.toString('ascii', 0, 4) === 'ttcf';\n }\n\n constructor(stream) {\n this.stream = stream;\n if (stream.readString(4) !== 'ttcf') {\n throw new Error('Not a TrueType collection');\n }\n\n this.header = TTCHeader.decode(stream);\n }\n\n getFont(name) {\n for (let offset of this.header.offsets) {\n let stream = new r.DecodeStream(this.stream.buffer);\n stream.pos = offset;\n let font = new TTFFont(stream);\n if (font.postscriptName === name) {\n return font;\n }\n }\n\n return null;\n }\n\n get fonts() {\n let fonts = [];\n for (let offset of this.header.offsets) {\n let stream = new r.DecodeStream(this.stream.buffer);\n stream.pos = offset;\n fonts.push(new TTFFont(stream));\n }\n\n return fonts;\n }\n}\n","import r from 'restructure';\nimport TTFFont from './TTFFont';\n\nlet DFontName = new r.String(r.uint8);\nlet DFontData = new r.Struct({\n len: r.uint32,\n buf: new r.Buffer('len')\n});\n\nlet Ref = new r.Struct({\n id: r.uint16,\n nameOffset: r.int16,\n attr: r.uint8,\n dataOffset: r.uint24,\n handle: r.uint32\n});\n\nlet Type = new r.Struct({\n name: new r.String(4),\n maxTypeIndex: r.uint16,\n refList: new r.Pointer(r.uint16, new r.Array(Ref, t => t.maxTypeIndex + 1), { type: 'parent' })\n});\n\nlet TypeList = new r.Struct({\n length: r.uint16,\n types: new r.Array(Type, t => t.length + 1)\n});\n\nlet DFontMap = new r.Struct({\n reserved: new r.Reserved(r.uint8, 24),\n typeList: new r.Pointer(r.uint16, TypeList),\n nameListOffset: new r.Pointer(r.uint16, 'void')\n});\n\nlet DFontHeader = new r.Struct({\n dataOffset: r.uint32,\n map: new r.Pointer(r.uint32, DFontMap),\n dataLength: r.uint32,\n mapLength: r.uint32\n});\n\nexport default class DFont {\n static probe(buffer) {\n let stream = new r.DecodeStream(buffer);\n\n try {\n var header = DFontHeader.decode(stream);\n } catch (e) {\n return false;\n }\n\n for (let type of header.map.typeList.types) {\n if (type.name === 'sfnt') {\n return true;\n }\n }\n\n return false;\n }\n\n constructor(stream) {\n this.stream = stream;\n this.header = DFontHeader.decode(this.stream);\n\n for (let type of this.header.map.typeList.types) {\n for (let ref of type.refList) {\n if (ref.nameOffset >= 0) {\n this.stream.pos = ref.nameOffset + this.header.map.nameListOffset;\n ref.name = DFontName.decode(this.stream);\n } else {\n ref.name = null;\n }\n }\n\n if (type.name === 'sfnt') {\n this.sfnt = type;\n }\n }\n }\n\n getFont(name) {\n if (!this.sfnt) {\n return null;\n }\n\n for (let ref of this.sfnt.refList) {\n let pos = this.header.dataOffset + ref.dataOffset + 4;\n let stream = new r.DecodeStream(this.stream.buffer.slice(pos));\n let font = new TTFFont(stream);\n if (font.postscriptName === name) {\n return font;\n }\n }\n\n return null;\n }\n\n get fonts() {\n let fonts = [];\n for (let ref of this.sfnt.refList) {\n let pos = this.header.dataOffset + ref.dataOffset + 4;\n let stream = new r.DecodeStream(this.stream.buffer.slice(pos));\n fonts.push(new TTFFont(stream));\n }\n\n return fonts;\n }\n}\n","import fontkit from './base';\nimport TTFFont from './TTFFont';\nimport WOFFFont from './WOFFFont';\nimport WOFF2Font from './WOFF2Font';\nimport TrueTypeCollection from './TrueTypeCollection';\nimport DFont from './DFont';\n\n// Register font formats\nfontkit.registerFormat(TTFFont);\nfontkit.registerFormat(WOFFFont);\nfontkit.registerFormat(WOFF2Font);\nfontkit.registerFormat(TrueTypeCollection);\nfontkit.registerFormat(DFont);\n\nexport default fontkit;\n"],"names":["fs","require","fontkit","logErrors","formats","registerFormat","format","push","openSync","filename","postscriptName","buffer","readFileSync","create","open","callback","readFile","err","font","e","i","length","probe","r","DecodeStream","getFont","Error","cache","target","key","descriptor","get","value","call","fn","memoized","args","has","result","apply","set","SubHeader","Struct","uint16","int16","CmapGroup","uint32","UnicodeValueRange","uint24","uint8","UVSMapping","DefaultUVS","Array","NonDefaultUVS","VarSelectorRecord","Pointer","type","CmapSubtable","VersionedStruct","LazyArray","Math","max","t","subHeaderKeys","segCountX2","Reserved","_currentOffset","CmapEntry","lazy","int32","Bitfield","HmtxEntry","parent","hhea","numberOfMetrics","maxp","numGlyphs","getEncoding","platformID","encodingID","languageID","MAC_LANGUAGE_ENCODINGS","ENCODINGS","LANGUAGES","NameRecord","String","relativeTo","allowNull","LangTagRecord","NameTable","NAMES","process","stream","records","record","language","langTags","tag","nameID","obj","string","preEncode","isArray","version","val","indexOf","Buffer","byteLength","en","count","stringOffset","size","OS2","versions","fixed32","loca","offsets","CFFIndex","getCFFVersion","ctx","hdrSize","decode","readUInt32BE","readUInt16BE","offSize","readUInt8","offsetType","pos","ret","startPos","start","end","arr","offset","item","encode","writeUInt16BE","sizes","s","writeUInt8","FLOAT_EOF","FLOAT_LOOKUP","FLOAT_ENCODE_LOOKUP","CFFOperand","readInt16BE","readInt32BE","str","b","n1","n2","parseFloat","forceLarge","ceil","Number","writeInt32BE","c1","c2","writeInt16BE","CFFDict","ops","fields","field","decodeOperands","operands","map","op","encodeOperands","PropertyDescriptor","dict","includePointers","startOffset","len","k","isEqual","pointerSize","pointerOffset","pointers","ptr","CFFPointer","options","Ptr","valueOf","CFFBlendOp","numBlends","pop","StandardEncoding","ExpertEncoding","ISOAdobeCharset","ExpertCharset","ExpertSubsetCharset","LangSysTable","LangSysRecord","Script","ScriptRecord","ScriptList","Feature","FeatureRecord","FeatureList","LookupFlags","LookupList","SubTable","Lookup","RangeRecord","Coverage","ClassRangeRecord","ClassDef","Device","LookupRecord","Rule","glyphCount","RuleSet","ClassRule","ClassSet","Context","ChainRule","inputGlyphCount","ChainRuleSet","ChainingContext","F2DOT14","Fixed","RegionAxisCoordinates","VariationRegionList","DeltaSet","shortDeltaCount","int8","regionIndexCount","shortDeltas","concat","regionDeltas","ItemVariationData","ItemVariationStore","ConditionTable","filterRangeMinValue","filterRangeMaxValue","ConditionSet","FeatureTableSubstitutionRecord","FeatureTableSubstitution","FeatureVariationRecord","FeatureVariations","PredefinedOp","predefinedOps","index","CFFEncodingVersion","Range1","Range2","CFFCustomEncoding","CFFEncoding","RangeArray","resolveLength","res","range","nLeft","CFFCustomCharset","CharStrings","CFFCharset","FDRange3","FDRange4","FDSelect","CFFPrivateDict","CFFPrivateOp","FontDict","CFFTopDict","VariationStore","CFF2TopDict","CFFTop","fixed16","CFFFont","top","topDictIndex","topDict","isCIDFont","ROS","sid","standardStrings","stringIndex","getCharString","glyph","readBuffer","getGlyphName","gid","charset","glyphs","ranges","first","fdForGlyph","fds","low","high","mid","fd","privateDictForGlyph","FDArray","Private","nameIndex","FullName","FamilyName","VerticalOrigin","BigMetrics","SmallMetrics","EBDTComponent","ByteAligned","BitAligned","SBitLineMetrics","CodeOffsetPair","IndexSubtable","lastGlyphIndex","firstGlyphIndex","IndexSubtableArray","BitmapSizeTable","ImageTable","LayerRecord","BaseGlyphRecord","ColorRecord","BaseCoord","BaseValues","FeatMinMaxRecord","MinMax","BaseLangSysRecord","BaseScript","BaseScriptRecord","BaseScriptList","BaseTagList","Axis","AttachPoint","AttachList","CaretValue","LigGlyph","LigCaretList","MarkGlyphSetsDef","ValueFormat","types","ValueRecord","buildStruct","struct","rel","_startOffset","PairValueRecord","PairSet","Class2Record","Anchor","EntryExitRecord","MarkRecord","MarkArray","BaseRecord","classCount","BaseArray","ComponentRecord","LigatureAttach","LigatureArray","GPOSLookup","extension","Sequence","AlternateSet","Ligature","compCount","LigatureSet","GSUBLookup","JstfGSUBModList","JstfPriority","JstfLangSys","JstfLangSysRecord","JstfScript","JstfScriptRecord","VariableSizeNumber","_size","readUInt24BE","MapDataEntry","entryFormat","entry","DeltaSetIndexMap","Signature","SignatureBlock","GaspRange","DeviceRecord","KernPair","ClassTable","Kern2Array","leftTable","off","rowWidth","KernSubtable","leftClassCount","rightClassCount","KernTable","Ratio","vTable","VdmxGroup","VmtxEntry","vhea","shortFrac","Correspondence","Segment","UnboundedArrayAccessor","base","_items","getItem","inspect","constructor","name","UnboundedArray","LookupTable","ValueType","Shadow","BinarySearchHeader","LookupSegmentSingle","LookupSegmentArray","lastGlyph","firstGlyph","LookupSingle","binarySearchHeader","nUnits","StateTable","entryData","lookupType","Entry","StateArray","nClasses","StateHeader","StateTable1","ClassLookupTable","newStateOffset","stateArray","StateHeader1","BslnSubtable","Setting","fontFeatures","FeatureName","Instance","axisCount","Offset","flags","gvar","WidthDeltaRecord","WidthDeltaCluster","ActionData","Action","actionLength","PostcompensationAction","PostCompensationTable","JustificationTable","LigatureData","ContextualData","InsertionData","SubstitutionTable","SubtableData","Subtable","FeatureEntry","MorxChain","OpticalBounds","tables","cmap","head","hmtx","post","fpgm","prep","cvt","glyf","VORG","EBLC","CBLC","sbix","COLR","CPAL","BASE","GDEF","GPOS","GSUB","JSTF","HVAR","DSIG","gasp","hdmx","kern","LTSH","PCLT","VDMX","vmtx","avar","bsln","feat","fvar","just","morx","opbd","TableEntry","Directory","table","VoidPointer","Tables","numTables","searchRange","floor","log","LN2","entrySelector","rangeShift","binarySearch","cmp","min","iconv","CmapProcessor","cmapTable","encoding","findSubtable","encodingExists","uvs","pairs","lookup","codepoint","variationSelector","buf","getVariationSelector","codeMap","segCount","startCode","endCode","rangeOffset","idRangeOffset","idDelta","glyphIndexArray","glyphIndices","firstCode","nGroups","group","groups","startCharCode","endCharCode","glyphID","selectors","varSelectors","toArray","x","varSelector","sel","defaultUVS","startUnicodeValue","additionalCount","nonDefaultUVS","unicodeValue","getCharacterSet","endCodes","tail","codePointsForGlyph","delta","c","g","KernProcessor","positions","glyphIndex","left","id","right","xAdvance","getKerning","coverage","crossStream","horizontal","vertical","variation","subtable","pairIdx","pair","leftOffset","rightOffset","nGlyphs","array","rightTable","values","kernValue","kernIndex","leftClass","rightClass","override","UnicodeLayoutEngine","positionGlyphs","clusterStart","clusterEnd","isMark","positionCluster","baseBox","cbox","copy","codePoints","minX","width","xOffset","yOffset","yGap","unitsPerEm","mark","markBox","position","combiningClass","getCombiningClass","maxX","minY","maxY","height","yAdvance","codePoint","unicode","BBox","Infinity","addPoint","y","GlyphRun","bbox","p","GlyphPosition","UNICODE_SCRIPTS","forString","idx","code","charCodeAt","next","script","getScript","Unknown","forCodePoints","RTL","direction","features","feature","selector","OTMapping","slice","characterAlternatives","AATMapping","ot","aat","mapOTToAAT","mapFeatureStrings","f","setting","isNaN","typeCode","settingCode","mapAATToOT","AATLookupTable","seg","segments","glyphsForValue","classValue","segment","START_OF_TEXT_STATE","END_OF_TEXT_CLASS","OUT_OF_BOUNDS_CLASS","DELETED_GLYPH_CLASS","DONT_ADVANCE","AATStateMachine","stateTable","lookupTable","classTable","reverse","processEntry","currentState","dir","classCode","shouldAdvance","row","entryIndex","entryTable","newState","traverse","opts","state","visited","add","enter","exit","MARK_FIRST","MARK_LAST","VERB","SET_MARK","SET_COMPONENT","PERFORM_ACTION","LAST_MASK","STORE_MASK","OFFSET_MASK","REVERSE_DIRECTION","CURRENT_INSERT_BEFORE","MARKED_INSERT_BEFORE","CURRENT_INSERT_COUNT","MARKED_INSERT_COUNT","AATMorxProcessor","processIndicRearragement","bind","processContextualSubstitution","processLigature","processNoncontextualSubstitutions","processGlyphInsertion","inputCache","chains","chain","defaultFlags","featureType","featureSetting","disableFlags","enableFlags","subtables","subFeatureFlags","processSubtable","splice","ligatureStack","markedGlyph","markedIndex","stateMachine","getStateMachine","getProcessor","subsitutions","substitutionTable","items","markIndex","getGlyph","currentIndex","actions","ligatureActions","components","ligatureList","actionIndex","action","last","ligatureIndex","ligatureGlyphs","componentGlyph","unshift","store","component","ligatureEntry","_insertGlyphs","insertionActionIndex","isBefore","insertions","insertionActions","markedInsertIndex","currentInsertIndex","getSupportedFeatures","generateInputs","generateInputCache","generateInputsForSubtable","input","stack","found","swap","rangeA","rangeB","reverseA","reverseB","reorderGlyphs","verb","AATLayoutEngine","morxProcessor","substitute","isRTL","AATFeatureMap","getAvailableFeatures","stringsForGlyph","glyphStrings","_addStrings","strings","_cmapProcessor","ShapingPlan","stages","globalFeatures","allFeatures","_addFeatures","stage","_addGlobal","arg","global","local","addStage","assignGlobalFeatures","processor","selectScript","applyFeatures","VARIATION_FEATURES","COMMON_FEATURES","FRACTIONAL_FEATURES","HORIZONTAL_FEATURES","DIRECTIONAL_FEATURES","DefaultShaper","plan","planPreprocessing","planFeatures","planPostprocessing","assignFeatures","userFeatures","isDigit","numr","frac","dnom","zeroMarkWidths","trie","UnicodeTrie","__dirname","FEATURES","ShapingClasses","ISOL","FINA","FIN2","FIN3","MEDI","MED2","INIT","NONE","STATE_TABLE","ArabicShaper","prev","curAction","prevAction","getShapingClass","Transparent","category","getCategory","Non_Joining","GlyphIterator","reset","shouldIgnore","ignoreMarks","ignoreBaseGlyphs","ignoreLigatures","isLigature","move","peek","increment","peekIndex","abs","DEFAULT_SCRIPTS","OTProcessor","scriptTag","languageTag","lookups","variationsIndex","_variationProcessor","findVariationsIndex","normalizedCoords","ligatureID","findScript","scriptList","changed","langugeTag","langSysRecords","lang","langSys","defaultLangSys","featureIndexes","featureIndex","featureList","substituteFeature","substituteFeatureForVariations","lookupsForFeatures","exclude","lookupListIndexes","lookupIndex","lookupList","sort","a","featureVariations","featureVariationRecords","substitutions","featureTableSubstitution","substitution","alternateFeatureTable","coords","variations","conditions","conditionSet","conditionTable","variationConditionsMatch","every","coord","condition","axisIndex","advances","applyLookups","glyphIterator","cur","subTables","applyLookup","applyLookupList","lookupRecords","lookupRecord","sequenceIndex","lookupListIndex","coverageIndex","rangeRecords","startCoverageIndex","match","sequence","matched","sequenceMatches","sequenceMatchIndices","coverageSequenceMatches","getClassID","classDef","startGlyph","classValueArray","classRangeRecord","class","classSequenceMatches","classID","applyContext","ruleSets","rule","classSet","classes","coverages","applyChainingContext","chainRuleSets","backtrack","lookahead","inputClassDef","rules","chainClassSet","backtrackClassDef","lookaheadClassDef","backtrackGlyphCount","backtrackCoverage","inputCoverage","lookaheadCoverage","GlyphInfo","_font","ligatureComponent","ligated","cursiveAttachment","markAttachment","shaperInfo","substituted","_id","glyphClassDef","prototype","HangulShaper","getType","DECOMPOSE","hasGlyphForCodePoint","decompose","COMPOSE","compose","TONE_MARK","INVALID","insertDottedCircle","HANGUL_BASE","HANGUL_END","HANGUL_COUNT","L_BASE","V_BASE","T_BASE","L_COUNT","V_COUNT","T_COUNT","L_END","V_END","T_END","DOTTED_CIRCLE","isL","isV","isT","isTone","isLVT","isLV","isCombiningL","isCombiningV","isCombiningT","X","L","V","T","LV","LVT","M","NO_ACTION","glyphForCodePoint","l","v","ljmo","vjmo","insert","tjmo","prevType","lv","del","getLength","reorderToneMark","advanceWidth","dottedCircle","categories","useData","decompositions","StateMachine","UniversalShaper","setupSyllables","clearSubstitutionFlags","recordRphf","recordPref","reorder","decomposed","useCategory","USEInfo","syllableType","syllable","tags","limit","rphf","nextSyllable","j","info","isBase","isHalant","isLigated","SHAPERS","choose","shaper","GSUBProcessor","deltaGlyphID","sequences","curGlyph","replacement","undefined","USER_INDEX","alternateSet","ligatureSets","ligature","characters","ligatureGlyph","isMarkLigature","lastLigID","lastNumComps","curComps","matchIndex","GPOSProcessor","applyPositionValue","xPlacement","yPlacement","nextGlyph","pairSets","secondGlyph","value1","value2","class1","classDef1","class2","classDef2","classRecords","nextIndex","curRecord","entryExitRecords","exitAnchor","nextRecord","entryAnchor","getAnchor","d","rightToLeft","markCoverage","baseGlyphIndex","baseIndex","baseCoverage","markRecord","markArray","baseAnchor","baseArray","applyAnchor","ligIndex","ligatureCoverage","ligAttach","ligatureArray","markGlyph","ligGlyph","compIndex","mark1Index","mark1Coverage","prevIndex","good","mark2Index","mark2Coverage","mark1Array","mark2Array","baseCoords","markCoords","markAnchor","basePos","markPos","anchor","xCoordinate","yCoordinate","fixCursiveAttachment","fixMarkAttachment","OTLayoutEngine","glyphInfos","setup","Shapers","glyphInfo","zeroMarkAdvances","cleanup","LayoutEngine","unicodeLayoutEngine","kernProcessor","engine","layout","glyphsForString","positioned","SVG_COMMANDS","Path","commands","_bbox","_cbox","toFunction","cmds","command","join","Function","toSVG","round","mapPoints","path","transform","m0","m1","m2","m3","m4","m5","translate","rotate","angle","cos","sin","scale","scaleX","scaleY","cx","cy","pow","p0","p1","p2","p3","qp1x","qp1y","p3x","p3y","cp1x","cp1y","cp2x","cp2y","b2ac","t1","sqrt","t2","Glyph","_getPath","_getCBox","_getBBox","_getTableMetrics","metrics","metric","advance","bearings","_getMetrics","_metrics","leftBearing","bearing","advanceHeight","topBearing","os2","typoAscender","typoDescender","ascent","descent","getAdvanceAdjustment","getScaledPath","_getName","StandardNames","glyphNameIndex","names","fromCharCode","render","save","fill","restore","GlyfHeader","ON_CURVE","X_SHORT_VECTOR","Y_SHORT_VECTOR","REPEAT","SAME_X","SAME_Y","ARG_1_AND_2_ARE_WORDS","WE_HAVE_A_SCALE","MORE_COMPONENTS","WE_HAVE_AN_X_AND_Y_SCALE","WE_HAVE_A_TWO_BY_TWO","WE_HAVE_INSTRUCTIONS","Point","onCurve","endContour","Component","dx","dy","scale01","scale10","TTFGlyph","internal","_getTableStream","xMin","yMin","xMax","yMax","_parseGlyphCoord","short","same","_decode","glyfPos","nextPos","numberOfContours","_decodeSimple","_decodeComposite","points","endPtsOfContours","instructions","numCoords","flag","point","px","py","_getPhantomPoints","transformPoints","phantomPoints","haveInstructions","gPos","readInt8","_getContours","directory","contours","contour","firstPt","lastPt","curvePt","moveTo","pt","prevPt","lineTo","midX","midY","quadraticCurveTo","closePath","CFFGlyph","CFF2","bias","cff","trans","nStems","usedGsubrs","usedSubrs","_usedGsubrs","_usedSubrs","gsubrs","globalSubrIndex","gsubrsBias","privateDict","subrs","Subrs","subrsBias","vstore","itemVariationStore","vsindex","variationProcessor","checkWidth","shift","nominalWidthX","parseStems","parse","phase","c1x","c1y","c2x","c2y","bezierCurveTo","subr","blendVector","getBlendVector","numOperands","sum","s1","s2","v1","v2","random","n","c3x","c3y","c4x","c4y","c5x","c5y","c6x","c6y","pts","startx","starty","b1","SBIXImage","buflen","SBIXGlyph","getImageForSize","imageTables","ppem","imageOffsets","img","image","data","originX","originY","renderOutlines","COLRLayer","color","COLRGlyph","layers","layer","fillColor","red","green","blue","alpha","cpal","colr","baseGlyphRecord","rec","baseLayer","_getBaseGlyph","firstLayerIndex","numLayers","layerRecords","colorRecords","paletteIndex","TUPLES_SHARE_POINT_NUMBERS","TUPLE_COUNT_MASK","EMBEDDED_TUPLE_COORD","INTERMEDIATE_TUPLE","PRIVATE_POINT_NUMBERS","TUPLE_INDEX_MASK","POINTS_ARE_WORDS","POINT_RUN_COUNT_MASK","DELTAS_ARE_ZERO","DELTAS_ARE_WORDS","DELTA_RUN_COUNT_MASK","GlyphVariationProcessor","normalizeCoords","blendVectors","normalized","axis","defaultValue","minValue","maxValue","correspondence","fromCoord","toCoord","glyphPoints","tupleCount","offsetToData","here","sharedPoints","decodePoints","origPoints","tupleDataSize","tupleIndex","tupleCoords","globalCoordCount","globalCoords","startCoords","endCoords","factor","tupleFactor","nPoints","xDeltas","decodeDeltas","yDeltas","outPoints","hasDelta","interpolateMissingDeltas","deltaX","deltaY","Uint16Array","run","runCount","readUInt16","deltas","Int16Array","inPoints","firstPoint","endPoint","firstDelta","curDelta","deltaInterpolate","deltaShift","ref1","ref2","iterable","in1","in2","out1","out2","out","ref","outerIndex","innerIndex","advanceWidthMapping","mapCount","mapData","getMetricDelta","itemStore","varData","itemVariationData","deltaSet","deltaSets","netAdjustment","master","scalar","regionIndex","regionIndexes","axes","variationRegionList","variationRegions","axisScalar","startCoord","peakCoord","endCoord","Subset","mapping","includeGlyph","encodeStream","EncodeStream","nextTick","Glyf","TTFGlyphEncoder","encodeSimple","xPoints","yPoints","lastX","lastY","lastFlag","pointCount","_encodePoint","shortFlag","sameFlag","diff","TTFSubset","glyphEncoder","_addGlyph","curOffset","nextOffset","cloneDeep","indexToLocFormat","CFFSubset","subsetCharstrings","charstrings","subsetSubrs","used","subsetFontdict","used_fds","used_subrs","FontName","createCIDFontdict","addString","Encoding","CIDCount","header","TTFFont","toString","variationCoords","_directoryPos","_tables","_glyphs","_decodeDirectory","_getTable","_decodeTable","error","getName","nextState","_layoutEngine","createSubset","getVariation","settings","namedVariations","axisTag","trim","lineGap","underlinePosition","underlineThickness","italicAngle","capHeight","xHeight","instance","WOFFDirectoryEntry","WOFFDirectory","WOFFFont","compLength","outBuffer","inflate","WOFF2Glyph","_transformedGlyphs","Base128","knownTags","WOFF2DirectoryEntry","Optional","customTag","transformVersion","transformed","WOFF2Directory","WOFF2Font","_dataPos","_decompress","_decompressed","totalCompressedSize","decompressedSize","transformLength","decompressed","brotli","_transformGlyfTable","GlyfTable","nContours","totalPoints","read255UInt16","decodeTriplet","instructionSize","composites","Substream","_buf","WORD_CODE","ONE_MORE_BYTE_CODE2","ONE_MORE_BYTE_CODE1","LOWEST_U_CODE","withSign","baseval","b0","b2","TTCHeader","TrueTypeCollection","readString","fonts","DFontName","DFontData","Ref","Type","maxTypeIndex","TypeList","DFontMap","DFontHeader","DFont","typeList","refList","nameOffset","nameListOffset","sfnt","dataOffset"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAMA,KAAKC,QAAQ,IAAR,CAAX;;AAEA,IAAIC,UAAU,EAAd;AACA,AAEAA,QAAQC,SAAR,GAAoB,KAApB;;AAEA,IAAIC,UAAU,EAAd;AACAF,QAAQG,cAAR,GAAyB,UAASC,MAAT,EAAiB;UAChCC,IAAR,CAAaD,MAAb;CADF;;AAIAJ,QAAQM,QAAR,GAAmB,UAASC,QAAT,EAAmBC,cAAnB,EAAmC;MAChDC,SAASX,GAAGY,YAAH,CAAgBH,QAAhB,CAAb;SACOP,QAAQW,MAAR,CAAeF,MAAf,EAAuBD,cAAvB,CAAP;CAFF;;AAKAR,QAAQY,IAAR,GAAe,UAASL,QAAT,EAAmBC,cAAnB,EAAmCK,QAAnC,EAA6C;MACtD,OAAOL,cAAP,KAA0B,UAA9B,EAA0C;eAC7BA,cAAX;qBACiB,IAAjB;;;KAGCM,QAAH,CAAYP,QAAZ,EAAsB,UAASQ,GAAT,EAAcN,MAAd,EAAsB;QACtCM,GAAJ,EAAS;aAASF,SAASE,GAAT,CAAP;;;QAEP;UACEC,OAAOhB,QAAQW,MAAR,CAAeF,MAAf,EAAuBD,cAAvB,CAAX;KADF,CAEE,OAAOS,CAAP,EAAU;aACHJ,SAASI,CAAT,CAAP;;;WAGKJ,SAAS,IAAT,EAAeG,IAAf,CAAP;GATF;;;CANF;;AAqBAhB,QAAQW,MAAR,GAAiB,UAASF,MAAT,EAAiBD,cAAjB,EAAiC;OAC3C,IAAIU,IAAI,CAAb,EAAgBA,IAAIhB,QAAQiB,MAA5B,EAAoCD,GAApC,EAAyC;QACnCd,SAASF,QAAQgB,CAAR,CAAb;QACId,OAAOgB,KAAP,CAAaX,MAAb,CAAJ,EAA0B;UACpBO,OAAO,IAAIZ,MAAJ,CAAW,IAAIiB,EAAEC,YAAN,CAAmBb,MAAnB,CAAX,CAAX;UACID,cAAJ,EAAoB;eACXQ,KAAKO,OAAL,CAAaf,cAAb,CAAP;;;aAGKQ,IAAP;;;;QAIE,IAAIQ,KAAJ,CAAU,qBAAV,CAAN;CAbF;;ACvCA;;;;;AAKA,AAAO,SAASC,KAAT,CAAeC,MAAf,EAAuBC,GAAvB,EAA4BC,UAA5B,EAAwC;MACzCA,WAAWC,GAAf,EAAoB;;UACdA,MAAMD,WAAWC,GAArB;iBACWA,GAAX,GAAiB,YAAW;YACtBC,QAAQD,IAAIE,IAAJ,CAAS,IAAT,CAAZ;+BACsB,IAAtB,EAA4BJ,GAA5B,EAAiC,EAAEG,YAAF,EAAjC;eACOA,KAAP;OAHF;;GAFF,MAOO,IAAI,OAAOF,WAAWE,KAAlB,KAA4B,UAAhC,EAA4C;;UAC7CE,KAAKJ,WAAWE,KAApB;;;WAEO;aAAA,iBACC;gBACAL,QAAQ,UAAZ;qBACSQ,QAAT,GAA2B;gDAANC,IAAM;oBAAA;;;kBACrBP,MAAMO,KAAKf,MAAL,GAAc,CAAd,GAAkBe,KAAK,CAAL,CAAlB,GAA4B,OAAtC;kBACIT,MAAMU,GAAN,CAAUR,GAAV,CAAJ,EAAoB;uBACXF,MAAMI,GAAN,CAAUF,GAAV,CAAP;;;kBAGES,SAASJ,GAAGK,KAAH,CAAS,IAAT,EAAeH,IAAf,CAAb;oBACMI,GAAN,CAAUX,GAAV,EAAeS,MAAf;qBACOA,MAAP;;;mCAGoB,IAAtB,EAA4BT,GAA5B,EAAiC,EAACG,OAAOG,QAAR,EAAjC;mBACOA,QAAP;;;;;;;;;;AC7BR,IAAIM,YAAY,IAAIlB,EAAEmB,MAAN,CAAa;aACXnB,EAAEoB,MADS;cAEXpB,EAAEoB,MAFS;WAGXpB,EAAEqB,KAHS;iBAIXrB,EAAEoB;CAJJ,CAAhB;;AAOA,IAAIE,YAAY,IAAItB,EAAEmB,MAAN,CAAa;iBACXnB,EAAEuB,MADS;eAEXvB,EAAEuB,MAFS;WAGXvB,EAAEuB;CAHJ,CAAhB;;AAMA,IAAIC,oBAAoB,IAAIxB,EAAEmB,MAAN,CAAa;qBACfnB,EAAEyB,MADa;mBAEfzB,EAAE0B;CAFA,CAAxB;;AAKA,IAAIC,aAAa,IAAI3B,EAAEmB,MAAN,CAAa;gBACdnB,EAAEyB,MADY;WAEdzB,EAAEoB;CAFD,CAAjB;;AAKA,IAAIQ,aAAa,IAAI5B,EAAE6B,KAAN,CAAYL,iBAAZ,EAA+BxB,EAAEuB,MAAjC,CAAjB;AACA,IAAIO,gBAAgB,IAAI9B,EAAE6B,KAAN,CAAYF,UAAZ,EAAwB3B,EAAEuB,MAA1B,CAApB;;AAEA,IAAIQ,oBAAoB,IAAI/B,EAAEmB,MAAN,CAAa;eACnBnB,EAAEyB,MADiB;cAEnB,IAAIzB,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwBK,UAAxB,EAAoC,EAACK,MAAM,QAAP,EAApC,CAFmB;iBAGnB,IAAIjC,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwBO,aAAxB,EAAuC,EAACG,MAAM,QAAP,EAAvC;CAHM,CAAxB;;AAMA,IAAIC,eAAe,IAAIlC,EAAEmC,eAAN,CAAsBnC,EAAEoB,MAAxB,EAAgC;KAC9C;YACWpB,EAAEoB,MADb;cAEWpB,EAAEoB,MAFb;aAGW,IAAIpB,EAAEoC,SAAN,CAAgBpC,EAAE0B,KAAlB,EAAyB,GAAzB;GAJmC;;KAO9C;YACiB1B,EAAEoB,MADnB;cAEiBpB,EAAEoB,MAFnB;mBAGiB,IAAIpB,EAAE6B,KAAN,CAAY7B,EAAEoB,MAAd,EAAsB,GAAtB,CAHjB;oBAIiB;aAAKiB,KAAKC,GAAL,CAAStB,KAAT,CAAeqB,IAAf,EAAqBE,EAAEC,aAAvB,CAAL;KAJjB;gBAKiB,IAAIxC,EAAEoC,SAAN,CAAgBlB,SAAhB,EAA2B,gBAA3B,CALjB;qBAMiB,IAAIlB,EAAEoC,SAAN,CAAgBpC,EAAEoB,MAAlB,EAA0B,gBAA1B;GAb6B;;KAgB9C;YACiBpB,EAAEoB,MADnB;cAEiBpB,EAAEoB,MAFnB;gBAGiBpB,EAAEoB,MAHnB;cAIiB;aAAKmB,EAAEE,UAAF,IAAgB,CAArB;KAJjB;iBAKiBzC,EAAEoB,MALnB;mBAMiBpB,EAAEoB,MANnB;gBAOiBpB,EAAEoB,MAPnB;aAQiB,IAAIpB,EAAEoC,SAAN,CAAgBpC,EAAEoB,MAAlB,EAA0B,UAA1B,CARjB;iBASiB,IAAIpB,EAAE0C,QAAN,CAAe1C,EAAEoB,MAAjB,CATjB;eAUiB,IAAIpB,EAAEoC,SAAN,CAAgBpC,EAAEoB,MAAlB,EAA0B,UAA1B,CAVjB;aAWiB,IAAIpB,EAAEoC,SAAN,CAAgBpC,EAAEqB,KAAlB,EAAyB,UAAzB,CAXjB;mBAYiB,IAAIrB,EAAEoC,SAAN,CAAgBpC,EAAEoB,MAAlB,EAA0B,UAA1B,CAZjB;qBAaiB,IAAIpB,EAAEoC,SAAN,CAAgBpC,EAAEoB,MAAlB,EAA0B;aAAK,CAACmB,EAAEzC,MAAF,GAAWyC,EAAEI,cAAd,IAAgC,CAArC;KAA1B;GA7B6B;;KAgC9C;YACe3C,EAAEoB,MADjB;cAEepB,EAAEoB,MAFjB;eAGepB,EAAEoB,MAHjB;gBAIepB,EAAEoB,MAJjB;kBAKe,IAAIpB,EAAEoC,SAAN,CAAgBpC,EAAEoB,MAAlB,EAA0B,YAA1B;GArC+B;;KAwC9C;cACS,IAAIpB,EAAE0C,QAAN,CAAe1C,EAAEoB,MAAjB,CADT;YAESpB,EAAEuB,MAFX;cAGSvB,EAAEoB,MAHX;UAIS,IAAIpB,EAAEoC,SAAN,CAAgBpC,EAAE0B,KAAlB,EAAyB,IAAzB,CAJT;aAKS1B,EAAEuB,MALX;YAMS,IAAIvB,EAAEoC,SAAN,CAAgBd,SAAhB,EAA2B,SAA3B;GA9CqC;;MAiD7C;cACc,IAAItB,EAAE0C,QAAN,CAAe1C,EAAEoB,MAAjB,CADd;YAEcpB,EAAEuB,MAFhB;cAGcvB,EAAEuB,MAHhB;eAIcvB,EAAEuB,MAJhB;gBAKcvB,EAAEuB,MALhB;kBAMc,IAAIvB,EAAEoC,SAAN,CAAgBpC,EAAEoB,MAAlB,EAA0B,UAA1B;GAvD+B;;MA0D7C;cACQ,IAAIpB,EAAE0C,QAAN,CAAe1C,EAAEoB,MAAjB,CADR;YAEQpB,EAAEuB,MAFV;cAGQvB,EAAEuB,MAHV;aAIQvB,EAAEuB,MAJV;YAKQ,IAAIvB,EAAEoC,SAAN,CAAgBd,SAAhB,EAA2B,SAA3B;GA/DqC;;MAkE7C;cACQ,IAAItB,EAAE0C,QAAN,CAAe1C,EAAEoB,MAAjB,CADR;YAEQpB,EAAEuB,MAFV;cAGQvB,EAAEuB,MAHV;aAIQvB,EAAEuB,MAJV;YAKQ,IAAIvB,EAAEoC,SAAN,CAAgBd,SAAhB,EAA2B,SAA3B;GAvEqC;;MA0E7C;YACYtB,EAAEuB,MADd;gBAEYvB,EAAEuB,MAFd;kBAGY,IAAIvB,EAAEoC,SAAN,CAAgBL,iBAAhB,EAAmC,YAAnC;;CA7EC,CAAnB;;AAiFA,IAAIa,YAAY,IAAI5C,EAAEmB,MAAN,CAAa;cACdnB,EAAEoB,MADY;cAEdpB,EAAEoB,MAFY;SAGd,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwBW,YAAxB,EAAsC,EAACD,MAAM,QAAP,EAAiBY,MAAM,IAAvB,EAAtC;CAHC,CAAhB;;;AAOA,WAAe,IAAI7C,EAAEmB,MAAN,CAAa;WACZnB,EAAEoB,MADU;gBAEZpB,EAAEoB,MAFU;UAGZ,IAAIpB,EAAE6B,KAAN,CAAYe,SAAZ,EAAuB,cAAvB;CAHD,CAAf;;ACxHA;AACA,WAAe,IAAI5C,EAAEmB,MAAN,CAAa;WACNnB,EAAE8C,KADI;YAEN9C,EAAE8C,KAFI;sBAGN9C,EAAEuB,MAHI;eAINvB,EAAEuB,MAJI;SAKNvB,EAAEoB,MALI;cAMNpB,EAAEoB,MANI;WAON,IAAIpB,EAAE6B,KAAN,CAAY7B,EAAE8C,KAAd,EAAqB,CAArB,CAPM;YAQN,IAAI9C,EAAE6B,KAAN,CAAY7B,EAAE8C,KAAd,EAAqB,CAArB,CARM;QASN9C,EAAEqB,KATI;QAUNrB,EAAEqB,KAVI;QAWNrB,EAAEqB,KAXI;QAYNrB,EAAEqB,KAZI;YAaN,IAAIrB,EAAE+C,QAAN,CAAe/C,EAAEoB,MAAjB,EAAyB,CAC3C,MAD2C,EACnC,QADmC,EACzB,WADyB,EACZ,SADY,EAE3C,QAF2C,EAEjC,WAFiC,EAEpB,UAFoB,CAAzB,CAbM;iBAiBNpB,EAAEoB,MAjBI;qBAkBNpB,EAAEqB,KAlBI;oBAmBNrB,EAAEqB,KAnBI;mBAoBNrB,EAAEqB,KApBI;CAAb,CAAf;;ACDA;AACA,WAAe,IAAIrB,EAAEmB,MAAN,CAAa;WACJnB,EAAE8C,KADE;UAEJ9C,EAAEqB,KAFE;WAGJrB,EAAEqB,KAHE;WAIJrB,EAAEqB,KAJE;mBAKJrB,EAAEoB,MALE;sBAMJpB,EAAEqB,KANE;uBAOJrB,EAAEqB,KAPE;cAQJrB,EAAEqB,KARE;kBASJrB,EAAEqB,KATE;iBAUJrB,EAAEqB,KAVE;eAWJrB,EAAEqB,KAXE;YAYJ,IAAIrB,EAAE0C,QAAN,CAAe1C,EAAEqB,KAAjB,EAAwB,CAAxB,CAZI;oBAaJrB,EAAEqB,KAbE;mBAcJrB,EAAEoB,MAdE;CAAb,CAAf;;ACDA,IAAI4B,YAAY,IAAIhD,EAAEmB,MAAN,CAAa;WAClBnB,EAAEoB,MADgB;WAElBpB,EAAEqB;CAFG,CAAhB;;AAKA,WAAe,IAAIrB,EAAEmB,MAAN,CAAa;WACd,IAAInB,EAAEoC,SAAN,CAAgBY,SAAhB,EAA2B;WAAKT,EAAEU,MAAF,CAASC,IAAT,CAAcC,eAAnB;GAA3B,CADc;YAEd,IAAInD,EAAEoC,SAAN,CAAgBpC,EAAEqB,KAAlB,EAAyB;WAAKkB,EAAEU,MAAF,CAASG,IAAT,CAAcC,SAAd,GAA0Bd,EAAEU,MAAF,CAASC,IAAT,CAAcC,eAA7C;GAAzB;CAFC,CAAf;;ACLA;AACA,WAAe,IAAInD,EAAEmB,MAAN,CAAa;WACFnB,EAAE8C,KADA;aAEF9C,EAAEoB,MAFA;aAGFpB,EAAEoB,MAHA;eAIFpB,EAAEoB,MAJA;sBAKFpB,EAAEoB,MALA;wBAMFpB,EAAEoB,MANA;YAOFpB,EAAEoB,MAPA;qBAQFpB,EAAEoB,MARA;cASFpB,EAAEoB,MATA;mBAUFpB,EAAEoB,MAVA;sBAWFpB,EAAEoB,MAXA;oBAYFpB,EAAEoB,MAZA;yBAaFpB,EAAEoB,MAbA;wBAcFpB,EAAEoB,MAdA;qBAeFpB,EAAEoB,MAfA;CAAb,CAAf;;ACHA;;;;AAIA,AAAO,SAASkC,WAAT,CAAqBC,UAArB,EAAiCC,UAAjC,EAA6D;MAAhBC,UAAgB,uEAAH,CAAG;;MAC9DF,eAAe,CAAf,IAAoBG,uBAAuBD,UAAvB,CAAxB,EAA4D;WACnDC,uBAAuBD,UAAvB,CAAP;;;SAGKE,UAAUJ,UAAV,EAAsBC,UAAtB,CAAP;;;;AAIF,AAAO,IAAMG,YAAY;;AAEvB,CAAC,SAAD,EAAY,SAAZ,EAAuB,SAAvB,EAAkC,SAAlC,EAA6C,SAA7C,EAAwD,SAAxD,CAFuB;;;;;;;;;;;;;;;;;;;;;AAuBvB,CAAC,UAAD,EAAa,WAAb,EAA0B,MAA1B,EAAkC,QAAlC,EAA4C,YAA5C,EAA0D,YAA1D,EACC,UADD,EACa,aADb,EAC4B,QAD5B,EACsC,YADtC,EACoD,UADpD,EACgE,UADhE,EAEC,OAFD,EAEU,SAFV,EAEqB,OAFrB,EAE8B,QAF9B,EAEwC,SAFxC,EAEmD,WAFnD,EAEgE,WAFhE,EAGC,SAHD,EAGY,OAHZ,EAGqB,SAHrB,EAGgC,SAHhC,EAG2C,UAH3C,EAGuD,UAHvD,EAGmE,YAHnE,EAIC,SAJD,EAIY,WAJZ,EAIyB,MAJzB,EAIiC,aAJjC,EAIgD,YAJhD,EAI8D,QAJ9D,CAvBuB;;;AA8BvB,CAAC,OAAD,CA9BuB;;;;AAkCvB,CAAC,QAAD,EAAW,SAAX,EAAsB,WAAtB,EAAmC,SAAnC,EAA8C,MAA9C,EAAsD,SAAtD,EAAiE,OAAjE,EAA0E,IAA1E,EAAgF,IAAhF,EAAsF,IAAtF,EAA4F,SAA5F,CAlCuB,CAAlB;;;;AAuCP,AAAO,IAAMD,yBAAyB;MAChC,YADgC;MAEhC,YAFgC;MAGhC,aAHgC;MAIhC,aAJgC;MAKhC,aALgC;MAMhC,aANgC;MAOhC,aAPgC;MAQhC,aARgC;MAShC,YATgC;MAUhC,YAVgC;MAWhC,aAXgC;MAYhC,aAZgC;MAahC,aAbgC;OAc/B,UAd+B;OAe/B,WAf+B;CAA/B;;;AAmBP,AAAO,IAAME,YAAY;;AAEvB,EAFuB,EAIvB;KACK,IADL,EACkB,IAAI,IADtB,EACkC,IAAI,IADtC,EACkD,IAAI,IADtD;KAEK,IAFL,EAEkB,IAAI,IAFtB,EAEkC,IAAI,IAFtC,EAEkD,IAAI,IAFtD;KAGK,IAHL,EAGkB,IAAI,IAHtB,EAGkC,IAAI,IAHtC,EAGkD,IAAI,IAHtD;KAIK,IAJL,EAIkB,IAAI,IAJtB,EAIkC,IAAI,IAJtC,EAIkD,IAAI,IAJtD;KAKK,IALL,EAKkB,IAAI,OALtB,EAKkC,IAAI,IALtC,EAKkD,IAAI,IALtD;KAMK,IANL,EAMkB,IAAI,IANtB,EAMkC,IAAI,IANtC,EAMkD,KAAK,IANvD;KAOK,IAPL,EAOkB,IAAI,IAPtB,EAOkC,IAAI,IAPtC,EAOkD,KAAK,IAPvD;KAQK,IARL,EAQkB,IAAI,IARtB,EAQkC,IAAI,IARtC,EAQkD,KAAK,IARvD;KASK,IATL,EASkB,IAAI,IATtB,EASkC,IAAI,IATtC,EASkD,KAAK,IATvD;KAUK,IAVL,EAUkB,IAAI,IAVtB,EAUkC,IAAI,IAVtC,EAUkD,KAAK,IAVvD;MAWM,IAXN,EAWkB,IAAI,IAXtB,EAWkC,IAAI,IAXtC,EAWkD,KAAK,IAXvD;MAYM,IAZN,EAYkB,IAAI,IAZtB,EAYkC,IAAI,IAZtC,EAYkD,KAAK,IAZvD;MAaM,IAbN,EAakB,IAAI,IAbtB,EAakC,IAAI,IAbtC,EAakD,KAAK,IAbvD;MAcM,IAdN,EAckB,IAAI,IAdtB,EAckC,IAAI,IAdtC,EAckD,KAAK,IAdvD;MAeM,IAfN,EAekB,IAAI,IAftB,EAekC,IAAI,IAftC,EAekD,KAAK,IAfvD;MAgBM,IAhBN,EAgBkB,IAAI,IAhBtB,EAgBkC,IAAI,IAhBtC,EAgBkD,KAAK,IAhBvD;MAiBM,IAjBN,EAiBkB,IAAI,IAjBtB,EAiBkC,IAAI,IAjBtC,EAiBkD,KAAK,IAjBvD;MAkBM,IAlBN,EAkBkB,IAAI,IAlBtB,EAkBkC,IAAI,IAlBtC,EAkBkD,KAAK,IAlBvD;MAmBM,IAnBN,EAmBkB,IAAI,IAnBtB,EAmBkC,IAAI,IAnBtC,EAmBkD,KAAK,IAnBvD;MAoBM,SApBN,EAoBkB,IAAI,SApBtB,EAoBkC,IAAI,IApBtC,EAoBkD,KAAK,IApBvD;MAqBM,IArBN,EAqBkB,IAAI,SArBtB,EAqBkC,IAAI,IArBtC,EAqBkD,KAAK,IArBvD;MAsBM,IAtBN,EAsBkB,IAAI,IAtBtB,EAsBkC,IAAI,IAtBtC,EAsBkD,KAAK,IAtBvD;MAuBM,IAvBN,EAuBkB,IAAI,IAvBtB,EAuBkC,IAAI,IAvBtC,EAuBkD,KAAK,IAvBvD;MAwBM,IAxBN,EAwBkB,IAAI,IAxBtB,EAwBkC,IAAI,IAxBtC,EAwBkD,KAAK,IAxBvD;MAyBM,IAzBN,EAyBkB,IAAI,IAzBtB,EAyBkC,IAAI,SAzBtC,EAyBkD,KAAK,IAzBvD;MA0BM,IA1BN,EA0BkB,IAAI,IA1BtB,EA0BkC,IAAI,IA1BtC,EA0BkD,KAAK,YA1BvD;MA2BM,IA3BN,EA2BkB,IAAI,IA3BtB,EA2BkC,IAAI,IA3BtC,EA2BkD,KAAK,IA3BvD;MA4BM,IA5BN,EA4BkB,IAAI,OA5BtB,EA4BkC,IAAI,IA5BtC,EA4BkD,KAAK,IA5BvD;MA6BM,IA7BN,EA6BkB,IAAI,IA7BtB,EA6BkC,IAAI,IA7BtC,EA6BkD,KAAK,IA7BvD;MA8BM,IA9BN,EA8BkB,IAAI,IA9BtB,EA8BkC,IAAI;CAlCf;;;AAsCvB,EAtCuB,EAwCvB;UACU,IADV,EACsB,QAAQ,OAD9B,EAC0C,QAAQ,IADlD,EACiE,QAAQ,IADzE;UAEU,IAFV,EAEsB,QAAQ,OAF9B,EAE0C,QAAQ,IAFlD,EAEiE,QAAQ,IAFzE;UAGU,KAHV,EAGsB,QAAQ,OAH9B,EAG0C,QAAQ,KAHlD,EAGiE,QAAQ,IAHzE;UAIU,IAJV,EAIsB,QAAQ,OAJ9B,EAI0C,QAAQ,IAJlD,EAIiE,QAAQ,IAJzE;UAKU,OALV,EAKsB,QAAQ,OAL9B,EAK0C,QAAQ,IALlD,EAKiE,QAAQ,OALzE;UAMU,OANV,EAMsB,QAAQ,OAN9B,EAM0C,QAAQ,IANlD,EAMiE,QAAQ,OANzE;UAOU,IAPV,EAOsB,QAAQ,OAP9B,EAO0C,QAAQ,IAPlD,EAOiE,QAAQ,OAPzE;UAQU,OARV,EAQsB,QAAQ,OAR9B,EAQ0C,QAAQ,IARlD,EAQiE,QAAQ,OARzE;UASU,OATV,EASsB,QAAQ,OAT9B,EAS0C,QAAQ,KATlD,EASiE,QAAQ,OATzE;UAUU,OAVV,EAUsB,QAAQ,OAV9B,EAU0C,QAAQ,IAVlD,EAUiE,QAAQ,OAVzE;UAWU,OAXV,EAWsB,QAAQ,IAX9B,EAW0C,QAAQ,IAXlD,EAWiE,QAAQ,OAXzE;UAYU,OAZV,EAYsB,QAAQ,OAZ9B,EAY0C,QAAQ,OAZlD,EAYiE,QAAQ,OAZzE;UAaU,KAbV,EAasB,QAAQ,IAb9B,EAa0C,QAAQ,IAblD,EAaiE,QAAQ,OAbzE;UAcU,OAdV,EAcsB,QAAQ,IAd9B,EAc0C,QAAQ,IAdlD,EAciE,QAAQ,OAdzE;UAeU,OAfV,EAesB,QAAQ,KAf9B,EAe0C,QAAQ,IAflD,EAeiE,QAAQ,OAfzE;UAgBU,OAhBV,EAgBsB,QAAQ,IAhB9B,EAgB0C,QAAQ,IAhBlD,EAgBiE,QAAQ,OAhBzE;UAiBU,OAjBV,EAiBsB,QAAQ,OAjB9B,EAiB0C,QAAQ,KAjBlD,EAiBiE,QAAQ,OAjBzE;UAkBU,KAlBV,EAkBsB,QAAQ,OAlB9B,EAkB0C,QAAQ,IAlBlD,EAkBiE,QAAQ,OAlBzE;UAmBU,OAnBV,EAmBsB,QAAQ,IAnB9B,EAmB0C,QAAQ,KAnBlD,EAmBiE,QAAQ,OAnBzE;UAoBU,OApBV,EAoBsB,QAAQ,OApB9B,EAoB0C,QAAQ,IApBlD,EAoBiE,QAAQ,OApBzE;UAqBU,IArBV,EAqBsB,QAAQ,OArB9B,EAqB0C,QAAQ,OArBlD,EAqBiE,QAAQ,IArBzE;UAsBU,IAtBV,EAsBsB,QAAQ,OAtB9B,EAsB0C,QAAQ,IAtBlD,EAsBiE,QAAQ,IAtBzE;UAuBU,SAvBV,EAuBsB,QAAQ,IAvB9B,EAuB0C,QAAQ,IAvBlD,EAuBiE,QAAQ,OAvBzE;UAwBU,IAxBV,EAwBsB,QAAQ,IAxB9B,EAwB0C,QAAQ,IAxBlD,EAwBiE,QAAQ,OAxBzE;UAyBU,IAzBV,EAyBsB,QAAQ,IAzB9B,EAyB0C,QAAQ,IAzBlD,EAyBiE,QAAQ,OAzBzE;UA0BU,IA1BV,EA0BsB,QAAQ,OA1B9B,EA0B0C,QAAQ,IA1BlD,EA0BiE,QAAQ,OA1BzE;UA2BU,IA3BV,EA2BsB,QAAQ,IA3B9B,EA2B0C,QAAQ,IA3BlD,EA2BiE,QAAQ,IA3BzE;UA4BU,IA5BV,EA4BsB,QAAQ,OA5B9B,EA4B0C,QAAQ,IA5BlD,EA4BiE,QAAQ,KA5BzE;UA6BU,OA7BV,EA6BsB,QAAQ,OA7B9B,EA6B0C,QAAQ,IA7BlD,EA6BiE,QAAQ,IA7BzE;UA8BU,SA9BV,EA8BsB,QAAQ,OA9B9B,EA8B0C,QAAQ,OA9BlD,EA8BiE,QAAQ,KA9BzE;UA+BU,IA/BV,EA+BsB,QAAQ,IA/B9B,EA+B0C,QAAQ,IA/BlD,EA+BiE,QAAQ,IA/BzE;UAgCU,IAhCV,EAgCsB,QAAQ,IAhC9B,EAgC0C,QAAQ,OAhClD,EAgCiE,QAAQ,IAhCzE;UAiCU,IAjCV,EAiCsB,QAAQ,IAjC9B,EAiC0C,QAAQ,OAjClD,EAiCiE,QAAQ,IAjCzE;UAkCU,IAlCV,EAkCsB,QAAQ,IAlC9B,EAkC0C,QAAQ,IAlClD,EAkCiE,QAAQ,IAlCzE;UAmCU,OAnCV,EAmCsB,QAAQ,IAnC9B,EAmC0C,QAAQ,IAnClD,EAmCiE,QAAQ,IAnCzE;UAoCU,OApCV,EAoCsB,QAAQ,IApC9B,EAoC0C,QAAQ,IApClD,EAoCiE,QAAQ,IApCzE;UAqCU,IArCV,EAqCsB,QAAQ,IArC9B,EAqC0C,QAAQ,IArClD,EAqCiE,QAAQ,IArCzE;UAsCU,OAtCV,EAsCsB,QAAQ,IAtC9B,EAsC0C,QAAQ,KAtClD,EAsCiE,QAAQ,IAtCzE;UAuCU,OAvCV,EAuCsB,QAAQ,IAvC9B,EAuC0C,QAAQ,QAvClD,EAuCiE,QAAQ,IAvCzE;UAwCU,IAxCV,EAwCsB,QAAQ,IAxC9B,EAwC0C,QAAQ,KAxClD,EAwCiE,QAAQ,KAxCzE;UAyCU,IAzCV,EAyCsB,QAAQ,IAzC9B,EAyC0C,QAAQ,OAzClD,EAyCiE,QAAQ,IAzCzE;UA0CU,OA1CV,EA0CsB,QAAQ,SA1C9B,EA0C0C,QAAQ,IA1ClD,EA0CiE,QAAQ,SA1CzE;UA2CU,IA3CV,EA2CsB,QAAQ,IA3C9B,EA2C0C,QAAQ,OA3ClD,EA2CiE,QAAQ,IA3CzE;UA4CU,IA5CV,EA4CsB,QAAQ,IA5C9B,EA4C0C,QAAQ,KA5ClD,EA4CiE,QAAQ,IA5CzE;UA6CU,KA7CV,EA6CsB,QAAQ,IA7C9B,EA6C0C,QAAQ,QA7ClD,EA6CiE,QAAQ,IA7CzE;UA8CU,IA9CV,EA8CsB,QAAQ,IA9C9B,EA8C0C,QAAQ,KA9ClD,EA8CiE,QAAQ,IA9CzE;UA+CU,OA/CV,EA+CsB,QAAQ,OA/C9B,EA+C0C,QAAQ,IA/ClD,EA+CiE,QAAQ,KA/CzE;UAgDU,IAhDV,EAgDsB,QAAQ,IAhD9B,EAgD0C,QAAQ,YAhDlD,EAgDiE,QAAQ,IAhDzE;UAiDU,OAjDV,EAiDsB,QAAQ,IAjD9B,EAiD0C,QAAQ,IAjDlD,EAiDiE,QAAQ,IAjDzE;UAkDU,OAlDV,EAkDsB,QAAQ,IAlD9B,EAkD0C,QAAQ,YAlDlD;UAmDU,OAnDV,EAmDsB,QAAQ,IAnD9B,EAmD0C,QAAQ,SAnDlD;UAoDU,QApDV,EAoDsB,QAAQ,KApD9B,EAoD0C,QAAQ;CA5F3B,CAAlB;;ACpEP,IAAIC,aAAa,IAAI7D,EAAEmB,MAAN,CAAa;cAChBnB,EAAEoB,MADc;cAEhBpB,EAAEoB,MAFc;cAGhBpB,EAAEoB,MAHc;UAIhBpB,EAAEoB,MAJc;UAKhBpB,EAAEoB,MALc;UAMhB,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EACV,IAAIpB,EAAE8D,MAAN,CAAa,QAAb,EAAuB;WAAKR,YAAYf,EAAEgB,UAAd,EAA0BhB,EAAEiB,UAA5B,EAAwCjB,EAAEkB,UAA1C,CAAL;GAAvB,CADU,EAEV,EAAExB,MAAM,QAAR,EAAkB8B,YAAY,qBAA9B,EAAqDC,WAAW,KAAhE,EAFU;CANG,CAAjB;;AAYA,IAAIC,gBAAgB,IAAIjE,EAAEmB,MAAN,CAAa;UACtBnB,EAAEoB,MADoB;OAEtB,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB,IAAIpB,EAAE8D,MAAN,CAAa,QAAb,EAAuB,SAAvB,CAAxB,EAA2D,EAAC7B,MAAM,QAAP,EAAiB8B,YAAY,cAA7B,EAA3D;CAFS,CAApB;;AAKA,IAAIG,YAAY,IAAIlE,EAAEmC,eAAN,CAAsBnC,EAAEoB,MAAxB,EAAgC;KAC3C;WACepB,EAAEoB,MADjB;kBAEepB,EAAEoB,MAFjB;aAGe,IAAIpB,EAAE6B,KAAN,CAAYgC,UAAZ,EAAwB,OAAxB;GAJ4B;KAM3C;WACe7D,EAAEoB,MADjB;kBAEepB,EAAEoB,MAFjB;aAGe,IAAIpB,EAAE6B,KAAN,CAAYgC,UAAZ,EAAwB,OAAxB,CAHf;kBAIe7D,EAAEoB,MAJjB;cAKe,IAAIpB,EAAE6B,KAAN,CAAYoC,aAAZ,EAA2B,cAA3B;;CAXJ,CAAhB;;AAeA,AAEA,IAAME,QAAQ,CACZ,WADY,EAEZ,YAFY,EAGZ,eAHY,EAIZ,iBAJY,EAKZ,UALY,EAMZ,SANY,EAOZ,gBAPY;AAQZ,WARY,EASZ,cATY,EAUZ,UAVY,EAWZ,aAXY,EAYZ,WAZY,EAaZ,aAbY,EAcZ,SAdY,EAeZ,YAfY,EAgBZ,IAhBY;AAiBZ,iBAjBY,EAkBZ,oBAlBY,EAmBZ,gBAnBY,EAoBZ,YApBY,EAqBZ,uBArBY,EAsBZ,eAtBY,EAuBZ,kBAvBY,CAAd;;AA0BAD,UAAUE,OAAV,GAAoB,UAASC,MAAT,EAAiB;MAC/BC,UAAU,EAAd;uBACmB,KAAKA,OAAxB,6GAAiC;;;;;;;;;;;;QAAxBC,MAAwB;;;QAE3BC,WAAWZ,UAAUW,OAAOhB,UAAjB,EAA6BgB,OAAOd,UAApC,CAAf;;QAEIe,YAAY,IAAZ,IAAoB,KAAKC,QAAL,IAAiB,IAArC,IAA6CF,OAAOd,UAAP,IAAqB,MAAtE,EAA8E;iBACjE,KAAKgB,QAAL,CAAcF,OAAOd,UAAP,GAAoB,MAAlC,EAA0CiB,GAArD;;;QAGEF,YAAY,IAAhB,EAAsB;iBACTD,OAAOhB,UAAP,GAAoB,GAApB,GAA0BgB,OAAOd,UAA5C;;;;QAIEnD,MAAMiE,OAAOI,MAAP,IAAiB,GAAjB,GAAuB,cAAvB,GAAyCR,MAAMI,OAAOI,MAAb,KAAwBJ,OAAOI,MAAlF;QACIL,QAAQhE,GAAR,KAAgB,IAApB,EAA0B;cAChBA,GAAR,IAAe,EAAf;;;QAGEsE,MAAMN,QAAQhE,GAAR,CAAV;QACIiE,OAAOI,MAAP,IAAiB,GAArB,EAA0B;YAClBC,IAAIL,OAAOI,MAAX,MAAuBC,IAAIL,OAAOI,MAAX,IAAqB,EAA5C,CAAN;;;QAGE,OAAOJ,OAAOM,MAAd,KAAyB,QAAzB,IAAqC,OAAOD,IAAIJ,QAAJ,CAAP,KAAyB,QAAlE,EAA4E;UACtEA,QAAJ,IAAgBD,OAAOM,MAAvB;;;;OAICP,OAAL,GAAeA,OAAf;CA9BF;;AAiCAJ,UAAUY,SAAV,GAAsB,YAAW;MAC3BjD,MAAMkD,OAAN,CAAc,KAAKT,OAAnB,CAAJ,EAAiC;OAC5BU,OAAL,GAAe,CAAf;;MAEIV,UAAU,EAAd;OACK,IAAIhE,GAAT,IAAgB,KAAKgE,OAArB,EAA8B;QACxBW,MAAM,KAAKX,OAAL,CAAahE,GAAb,CAAV;QACIA,QAAQ,cAAZ,EAA4B;;YAEpBtB,IAAR,CAAa;kBACC,CADD;kBAEC,CAFD;kBAGC,KAHD;cAIHmF,MAAMe,OAAN,CAAc5E,GAAd,CAJG;cAKH6E,OAAOC,UAAP,CAAkBH,IAAII,EAAtB,EAA0B,SAA1B,CALG;cAMHJ,IAAII;KANd;;QASI/E,QAAQ,gBAAZ,EAA8B;cACpBtB,IAAR,CAAa;oBACC,CADD;oBAEC,CAFD;oBAGC,CAHD;gBAIHmF,MAAMe,OAAN,CAAc5E,GAAd,CAJG;gBAKH2E,IAAII,EAAJ,CAAOvF,MALJ;gBAMHmF,IAAII;OANd;;;;OAWCf,OAAL,GAAeA,OAAf;OACKgB,KAAL,GAAahB,QAAQxE,MAArB;OACKyF,YAAL,GAAoBrB,UAAUsB,IAAV,CAAe,IAAf,EAAqB,IAArB,EAA2B,KAA3B,CAApB;CAhCF;;AC9FA,IAAIC,MAAM,IAAIzF,EAAEmC,eAAN,CAAsBnC,EAAEoB,MAAxB,EAAgC;UAChC;mBACkBpB,EAAEqB,KADpB;mBAEkBrB,EAAEoB,MAFpB;kBAGkBpB,EAAEoB,MAHpB;YAIkB,IAAIpB,EAAE+C,QAAN,CAAe/C,EAAEoB,MAAjB,EAAyB;QAAA,EACzC,aADyC,EAC1B,UAD0B,EACd,UADc,EACF,IADE,EAE/C,IAF+C,EAEzC,IAFyC,EAEnC,IAFmC,EAE7B,cAF6B,EAEb,YAFa,CAAzB,CAJlB;qBAQkBpB,EAAEqB,KARpB;qBASkBrB,EAAEqB,KATpB;uBAUkBrB,EAAEqB,KAVpB;uBAWkBrB,EAAEqB,KAXpB;uBAYkBrB,EAAEqB,KAZpB;uBAakBrB,EAAEqB,KAbpB;yBAckBrB,EAAEqB,KAdpB;yBAekBrB,EAAEqB,KAfpB;oBAgBkBrB,EAAEqB,KAhBpB;wBAiBkBrB,EAAEqB,KAjBpB;kBAkBkBrB,EAAEqB,KAlBpB;YAmBkB,IAAIrB,EAAE6B,KAAN,CAAY7B,EAAE0B,KAAd,EAAqB,EAArB,CAnBlB;iBAoBkB,IAAI1B,EAAE6B,KAAN,CAAY7B,EAAEuB,MAAd,EAAsB,CAAtB,CApBlB;cAqBkB,IAAIvB,EAAE8D,MAAN,CAAa,CAAb,CArBlB;iBAsBkB,IAAI9D,EAAE+C,QAAN,CAAe/C,EAAEoB,MAAjB,EAAyB;YAAA,EACrC,YADqC,EACvB,UADuB,EACX,UADW,EACC,WADD,EAE/C,MAF+C,EAEvC,SAFuC,EAE5B,gBAF4B,EAEV,KAFU,EAEH,SAFG,CAAzB,CAtBlB;sBA0BkBpB,EAAEoB,MA1BpB;qBA2BkBpB,EAAEoB,MA3BpB;GADgC;;;KAgCrC,EAhCqC;;KAkCrC;kBACmBpB,EAAEqB,KADrB;mBAEmBrB,EAAEqB,KAFrB;iBAGmBrB,EAAEqB,KAHrB;eAImBrB,EAAEoB,MAJrB;gBAKmBpB,EAAEoB,MALrB;mBAMmB,IAAIpB,EAAE6B,KAAN,CAAY7B,EAAEuB,MAAd,EAAsB,CAAtB;GAxCkB;;KA2CrC;;kBAEmBvB,EAAEqB,KAFrB;mBAGmBrB,EAAEqB,KAHrB;iBAImBrB,EAAEqB,KAJrB;eAKmBrB,EAAEoB,MALrB;gBAMmBpB,EAAEoB,MANrB;mBAOmB,IAAIpB,EAAE6B,KAAN,CAAY7B,EAAEuB,MAAd,EAAsB,CAAtB,CAPnB;;aASmBvB,EAAEqB,KATrB;eAUmBrB,EAAEqB,KAVrB;iBAWmBrB,EAAEoB,MAXrB;eAYmBpB,EAAEoB,MAZrB;gBAamBpB,EAAEoB;GAxDgB;;KA2DrC;kBACmBpB,EAAEqB,KADrB;mBAEmBrB,EAAEqB,KAFrB;iBAGmBrB,EAAEqB,KAHrB;eAImBrB,EAAEoB,MAJrB;gBAKmBpB,EAAEoB,MALrB;mBAMmB,IAAIpB,EAAE6B,KAAN,CAAY7B,EAAEuB,MAAd,EAAsB,CAAtB,CANnB;;aAQmBvB,EAAEqB,KARrB;eASmBrB,EAAEqB,KATrB;iBAUmBrB,EAAEoB,MAVrB;eAWmBpB,EAAEoB,MAXrB;gBAYmBpB,EAAEoB,MAZrB;;6BAcwBpB,EAAEoB,MAd1B;6BAewBpB,EAAEoB;;CA1ErB,CAAV;;AA8EA,IAAIsE,WAAWD,IAAIC,QAAnB;AACAA,SAAS,CAAT,IAAcA,SAAS,CAAT,IAAcA,SAAS,CAAT,CAA5B,CAEA;;ACjFA;AACA,WAAe,IAAI1F,EAAEmC,eAAN,CAAsBnC,EAAE2F,OAAxB,EAAiC;UACtC;iBACc3F,EAAE2F,OADhB;uBAEc3F,EAAEqB,KAFhB;wBAGcrB,EAAEqB,KAHhB;kBAIcrB,EAAEuB,MAJhB;kBAKcvB,EAAEuB,MALhB;kBAMcvB,EAAEuB,MANhB;iBAOcvB,EAAEuB,MAPhB;iBAQcvB,EAAEuB,MARhB;GADsC;;KAY3C,EAZ2C;;KAc3C;oBACevB,EAAEoB,MADjB;oBAEe,IAAIpB,EAAE6B,KAAN,CAAY7B,EAAEoB,MAAd,EAAsB,gBAAtB,CAFf;WAGe,IAAIpB,EAAE6B,KAAN,CAAY,IAAI7B,EAAE8D,MAAN,CAAa9D,EAAE0B,KAAf,CAAZ;GAjB4B;;OAoBzC;oBACa1B,EAAEoB,MADf;aAEa,IAAIpB,EAAE6B,KAAN,CAAY7B,EAAE0B,KAAd,EAAqB,gBAArB;GAtB4B;;KAyB3C,EAzB2C;;KA2B3C;SACI,IAAI1B,EAAE6B,KAAN,CAAY7B,EAAEuB,MAAd,EAAsB;aAAKgB,EAAEU,MAAF,CAASG,IAAT,CAAcC,SAAnB;KAAtB;;CA5BM,CAAf;;ACDA;AACA,UAAe,IAAIrD,EAAEmB,MAAN,CAAa;iBACX,IAAInB,EAAE6B,KAAN,CAAY7B,EAAEqB,KAAd;CADF,CAAf;;ACDA;;;AAGA,WAAe,IAAIrB,EAAEmB,MAAN,CAAa;gBACZ,IAAInB,EAAE6B,KAAN,CAAY7B,EAAE0B,KAAd;CADD,CAAf;;ACHA,IAAIkE,OAAO,IAAI5F,EAAEmC,eAAN,CAAsB,uBAAtB,EAA+C;KACrD;aACQ,IAAInC,EAAE6B,KAAN,CAAY7B,EAAEoB,MAAd;GAF6C;KAIrD;aACQ,IAAIpB,EAAE6B,KAAN,CAAY7B,EAAEuB,MAAd;;CALF,CAAX;;AASAqE,KAAKxB,OAAL,GAAe,YAAW;MACpB,KAAKY,OAAL,KAAiB,CAArB,EAAwB;SACjB,IAAInF,IAAI,CAAb,EAAgBA,IAAI,KAAKgG,OAAL,CAAa/F,MAAjC,EAAyCD,GAAzC,EAA8C;WACvCgG,OAAL,CAAahG,CAAb,MAAoB,CAApB;;;CAHN;;AAQA+F,KAAKd,SAAL,GAAiB,YAAW;MACtB,KAAKE,OAAL,IAAgB,IAApB,EAA0B;;;OAGrBA,OAAL,GAAe,KAAKa,OAAL,CAAa,KAAKA,OAAL,CAAa/F,MAAb,GAAsB,CAAnC,IAAwC,MAAxC,GAAiD,CAAjD,GAAqD,CAApE;;MAEI,KAAKkF,OAAL,KAAiB,CAArB,EAAwB;SACjB,IAAInF,IAAI,CAAb,EAAgBA,IAAI,KAAKgG,OAAL,CAAa/F,MAAjC,EAAyCD,GAAzC,EAA8C;WACvCgG,OAAL,CAAahG,CAAb,OAAqB,CAArB;;;CARN,CAaA;;AC9BA;AACA,WAAe,IAAIG,EAAEmB,MAAN,CAAa;uBACL,IAAInB,EAAE6B,KAAN,CAAY7B,EAAE0B,KAAd;CADR,CAAf;;ACDA;AACA,WAAe,IAAI1B,EAAE6B,KAAN,CAAY,IAAI7B,EAAEmF,MAAN,EAAZ,CAAf;;ICDqBW;oBACP7D,IAAZ,EAAkB;;;SACXA,IAAL,GAAYA,IAAZ;;;qBAGF8D,uCAAcC,KAAK;WACVA,OAAO,CAACA,IAAIC,OAAnB,EAA4B;YACpBD,IAAI/C,MAAV;;;WAGK+C,MAAMA,IAAIhB,OAAV,GAAoB,CAAC,CAA5B;;;qBAGFkB,yBAAO7B,QAAQpB,QAAQ;QACjB+B,UAAU,KAAKe,aAAL,CAAmB9C,MAAnB,CAAd;QACIqC,QAAQN,WAAW,CAAX,GACRX,OAAO8B,YAAP,EADQ,GAER9B,OAAO+B,YAAP,EAFJ;;QAIId,UAAU,CAAd,EAAiB;aACR,EAAP;;;QAGEe,UAAUhC,OAAOiC,SAAP,EAAd;QACIC,mBAAJ;QACIF,YAAY,CAAhB,EAAmB;mBACJrG,EAAE0B,KAAf;KADF,MAEO,IAAI2E,YAAY,CAAhB,EAAmB;mBACXrG,EAAEoB,MAAf;KADK,MAEA,IAAIiF,YAAY,CAAhB,EAAmB;mBACXrG,EAAEyB,MAAf;KADK,MAEA,IAAI4E,YAAY,CAAhB,EAAmB;mBACXrG,EAAEuB,MAAf;KADK,MAEA;YACC,IAAIpB,KAAJ,mCAA0CkG,OAA1C,SAAqDhC,OAAOmC,GAA5D,CAAN;;;QAGEC,MAAM,EAAV;QACIC,WAAWrC,OAAOmC,GAAP,GAAc,CAAClB,QAAQ,CAAT,IAAce,OAA5B,GAAuC,CAAtD;;QAEIM,QAAQJ,WAAWL,MAAX,CAAkB7B,MAAlB,CAAZ;SACK,IAAIxE,IAAI,CAAb,EAAgBA,IAAIyF,KAApB,EAA2BzF,GAA3B,EAAgC;UAC1B+G,MAAML,WAAWL,MAAX,CAAkB7B,MAAlB,CAAV;;UAEI,KAAKpC,IAAL,IAAa,IAAjB,EAAuB;YACjBuE,MAAMnC,OAAOmC,GAAjB;eACOA,GAAP,GAAaE,WAAWC,KAAxB;;eAEO7G,MAAP,GAAgB8G,MAAMD,KAAtB;YACI3H,IAAJ,CAAS,KAAKiD,IAAL,CAAUiE,MAAV,CAAiB7B,MAAjB,EAAyBpB,MAAzB,CAAT;eACOuD,GAAP,GAAaA,GAAb;OANF,MAOO;YACDxH,IAAJ,CAAS;kBACC0H,WAAWC,KADZ;kBAECC,MAAMD;SAFhB;;;cAMMC,GAAR;;;WAGKJ,GAAP,GAAaE,WAAWC,KAAxB;WACOF,GAAP;;;qBAGFjB,qBAAKqB,KAAK5D,QAAQ;QACZuC,OAAO,CAAX;QACIqB,IAAI/G,MAAJ,KAAe,CAAnB,EAAsB;aACb0F,IAAP;;;QAGEvD,OAAO,KAAKA,IAAL,IAAa,IAAIjC,EAAEmF,MAAN,EAAxB;;;QAGI2B,SAAS,CAAb;SACK,IAAIjH,IAAI,CAAb,EAAgBA,IAAIgH,IAAI/G,MAAxB,EAAgCD,GAAhC,EAAqC;UAC/BkH,OAAOF,IAAIhH,CAAJ,CAAX;gBACUoC,KAAKuD,IAAL,CAAUuB,IAAV,EAAgB9D,MAAhB,CAAV;;;QAGEsD,mBAAJ;QACIO,UAAU,IAAd,EAAoB;mBACL9G,EAAE0B,KAAf;KADF,MAEO,IAAIoF,UAAU,MAAd,EAAsB;mBACd9G,EAAEoB,MAAf;KADK,MAEA,IAAI0F,UAAU,QAAd,EAAwB;mBAChB9G,EAAEyB,MAAf;KADK,MAEA,IAAIqF,UAAU,UAAd,EAA0B;mBAClB9G,EAAEuB,MAAf;KADK,MAEA;YACC,IAAIpB,KAAJ,CAAU,wBAAV,CAAN;;;YAGM,IAAIoG,WAAWf,IAAX,MAAqBqB,IAAI/G,MAAJ,GAAa,CAAlC,CAAZ;YACQgH,SAAS,CAAjB;;WAEOtB,IAAP;;;qBAGFwB,yBAAO3C,QAAQwC,KAAK5D,QAAQ;WACnBgE,aAAP,CAAqBJ,IAAI/G,MAAzB;QACI+G,IAAI/G,MAAJ,KAAe,CAAnB,EAAsB;;;;QAIlBmC,OAAO,KAAKA,IAAL,IAAa,IAAIjC,EAAEmF,MAAN,EAAxB;;;QAGI+B,QAAQ,EAAZ;QACIJ,SAAS,CAAb;yBACiBD,GAAjB,6GAAsB;;;;;;;;;;;;UAAbE,IAAa;;UAChBI,IAAIlF,KAAKuD,IAAL,CAAUuB,IAAV,EAAgB9D,MAAhB,CAAR;YACMjE,IAAN,CAAWmI,CAAX;gBACUA,CAAV;;;QAGEZ,mBAAJ;QACIO,UAAU,IAAd,EAAoB;mBACL9G,EAAE0B,KAAf;KADF,MAEO,IAAIoF,UAAU,MAAd,EAAsB;mBACd9G,EAAEoB,MAAf;KADK,MAEA,IAAI0F,UAAU,QAAd,EAAwB;mBAChB9G,EAAEyB,MAAf;KADK,MAEA,IAAIqF,UAAU,UAAd,EAA0B;mBAClB9G,EAAEuB,MAAf;KADK,MAEA;YACC,IAAIpB,KAAJ,CAAU,wBAAV,CAAN;;;;WAIKiH,UAAP,CAAkBb,WAAWf,IAAX,EAAlB;;;aAGS,CAAT;eACWwB,MAAX,CAAkB3C,MAAlB,EAA0ByC,MAA1B;;0BAEiBI,KAAjB,oHAAwB;;;;;;;;;;;;UAAf1B,IAAe;;gBACZA,IAAV;iBACWwB,MAAX,CAAkB3C,MAAlB,EAA0ByC,MAA1B;;;0BAGeD,GAAjB,oHAAsB;;;;;;;;;;;;UAAbE,KAAa;;WACfC,MAAL,CAAY3C,MAAZ,EAAoB0C,KAApB,EAA0B9D,MAA1B;;;;;;;;;AChJN,IAAMoE,YAAY,GAAlB;AACA,IAAMC,eAAe,CACnB,GADmB,EACd,GADc,EACT,GADS,EACJ,GADI,EACC,GADD,EACM,GADN,EACW,GADX,EACgB,GADhB,EAEnB,GAFmB,EAEd,GAFc,EAET,GAFS,EAEJ,GAFI,EAEC,IAFD,EAEO,IAFP,EAEa,GAFb,CAArB;;AAKA,IAAMC,sBAAsB;OACrB,EADqB;OAErB,EAFqB;QAGpB,EAHoB;OAIrB;CAJP;;IAOqBC;;;;;aACZtB,yBAAO7B,QAAQ5D,OAAO;QACvB,MAAMA,KAAN,IAAeA,SAAS,GAA5B,EAAiC;aACxBA,QAAQ,GAAf;;;QAGE,OAAOA,KAAP,IAAgBA,SAAS,GAA7B,EAAkC;aACzB,CAACA,QAAQ,GAAT,IAAgB,GAAhB,GAAsB4D,OAAOiC,SAAP,EAAtB,GAA2C,GAAlD;;;QAGE,OAAO7F,KAAP,IAAgBA,SAAS,GAA7B,EAAkC;aACzB,EAAEA,QAAQ,GAAV,IAAiB,GAAjB,GAAuB4D,OAAOiC,SAAP,EAAvB,GAA4C,GAAnD;;;QAGE7F,UAAU,EAAd,EAAkB;aACT4D,OAAOoD,WAAP,EAAP;;;QAGEhH,UAAU,EAAd,EAAkB;aACT4D,OAAOqD,WAAP,EAAP;;;QAGEjH,UAAU,EAAd,EAAkB;UACZkH,MAAM,EAAV;aACO,IAAP,EAAa;YACPC,IAAIvD,OAAOiC,SAAP,EAAR;;YAEIuB,KAAKD,KAAK,CAAd;YACIC,OAAOR,SAAX,EAAsB;;;eACfC,aAAaO,EAAb,CAAP;;YAEIC,KAAKF,IAAI,EAAb;YACIE,OAAOT,SAAX,EAAsB;;;eACfC,aAAaQ,EAAb,CAAP;;;aAGKC,WAAWJ,GAAX,CAAP;;;WAGK,IAAP;;;aAGKnC,qBAAK/E,OAAO;;;QAGbA,MAAMuH,UAAV,EAAsB;cACZ,KAAR;;;QAGE,CAACvH,QAAQ,CAAT,MAAgBA,KAApB,EAA2B;;UACrBkH,MAAM,KAAKlH,KAAf;aACO,IAAI4B,KAAK4F,IAAL,CAAU,CAACN,IAAI7H,MAAJ,GAAa,CAAd,IAAmB,CAA7B,CAAX;KAFF,MAIO,IAAI,CAAC,GAAD,IAAQW,KAAR,IAAiBA,SAAS,GAA9B,EAAmC;aACjC,CAAP;KADK,MAGA,IAAI,OAAOA,KAAP,IAAgBA,SAAS,IAAzB,IAAiC,CAAC,IAAD,IAASA,KAAT,IAAkBA,SAAS,CAAC,GAAjE,EAAsE;aACpE,CAAP;KADK,MAGA,IAAI,CAAC,KAAD,IAAUA,KAAV,IAAmBA,SAAS,KAAhC,EAAuC;aACrC,CAAP;KADK,MAGA;aACE,CAAP;;;;aAIGuG,yBAAO3C,QAAQ5D,OAAO;;;QAGvBwE,MAAMiD,OAAOzH,KAAP,CAAV;;QAEIA,MAAMuH,UAAV,EAAsB;aACbZ,UAAP,CAAkB,EAAlB;aACO/C,OAAO8D,YAAP,CAAoBlD,GAApB,CAAP;KAFF,MAIO,IAAI,CAACA,MAAM,CAAP,MAAcA,GAAlB,EAAuB;;aACrBmC,UAAP,CAAkB,EAAlB;;UAEIO,MAAM,KAAK1C,GAAf;WACK,IAAIpF,IAAI,CAAb,EAAgBA,IAAI8H,IAAI7H,MAAxB,EAAgCD,KAAK,CAArC,EAAwC;YAClCuI,KAAKT,IAAI9H,CAAJ,CAAT;YACIgI,KAAKN,oBAAoBa,EAApB,KAA2B,CAACA,EAArC;;YAEIvI,MAAM8H,IAAI7H,MAAJ,GAAa,CAAvB,EAA0B;cACpBgI,KAAKT,SAAT;SADF,MAEO;cACDgB,KAAKV,IAAI9H,IAAI,CAAR,CAAT;cACIiI,KAAKP,oBAAoBc,EAApB,KAA2B,CAACA,EAArC;;;eAGKjB,UAAP,CAAmBS,MAAM,CAAP,GAAaC,KAAK,EAApC;;;UAGEA,OAAOT,SAAX,EAAsB;eACbhD,OAAO+C,UAAP,CAAmBC,aAAa,CAAhC,CAAP;;KAnBG,MAsBA,IAAI,CAAC,GAAD,IAAQpC,GAAR,IAAeA,OAAO,GAA1B,EAA+B;aAC7BZ,OAAO+C,UAAP,CAAkBnC,MAAM,GAAxB,CAAP;KADK,MAGA,IAAI,OAAOA,GAAP,IAAcA,OAAO,IAAzB,EAA+B;aAC7B,GAAP;aACOmC,UAAP,CAAkB,CAACnC,OAAO,CAAR,IAAa,GAA/B;aACOZ,OAAO+C,UAAP,CAAkBnC,MAAM,IAAxB,CAAP;KAHK,MAKA,IAAI,CAAC,IAAD,IAASA,GAAT,IAAgBA,OAAO,CAAC,GAA5B,EAAiC;YAChC,CAACA,GAAD,GAAO,GAAb;aACOmC,UAAP,CAAkB,CAACnC,OAAO,CAAR,IAAa,GAA/B;aACOZ,OAAO+C,UAAP,CAAkBnC,MAAM,IAAxB,CAAP;KAHK,MAKA,IAAI,CAAC,KAAD,IAAUA,GAAV,IAAiBA,OAAO,KAA5B,EAAmC;aACjCmC,UAAP,CAAkB,EAAlB;aACO/C,OAAOiE,YAAP,CAAoBrD,GAApB,CAAP;KAFK,MAIA;aACEmC,UAAP,CAAkB,EAAlB;aACO/C,OAAO8D,YAAP,CAAoBlD,GAApB,CAAP;;;;;;;IC7HesD;qBACG;QAAVC,GAAU,uEAAJ,EAAI;;;;SACfA,GAAL,GAAWA,GAAX;SACKC,MAAL,GAAc,EAAd;yBACkBD,GAAlB,6GAAuB;;;;;;;;;;;;UAAdE,KAAc;;UACjBpI,MAAMuB,MAAMkD,OAAN,CAAc2D,MAAM,CAAN,CAAd,IAA0BA,MAAM,CAAN,EAAS,CAAT,KAAe,CAAf,GAAmBA,MAAM,CAAN,EAAS,CAAT,CAA7C,GAA2DA,MAAM,CAAN,CAArE;WACKD,MAAL,CAAYnI,GAAZ,IAAmBoI,KAAnB;;;;oBAIJC,yCAAe1G,MAAMoC,QAAQoC,KAAKmC,UAAU;;;QACtC/G,MAAMkD,OAAN,CAAc9C,IAAd,CAAJ,EAAyB;aAChB2G,SAASC,GAAT,CAAa,UAACC,EAAD,EAAKjJ,CAAL;eAAW,MAAK8I,cAAL,CAAoB1G,KAAKpC,CAAL,CAApB,EAA6BwE,MAA7B,EAAqCoC,GAArC,EAA0C,CAACqC,EAAD,CAA1C,CAAX;OAAb,CAAP;KADF,MAEO,IAAI7G,KAAKiE,MAAL,IAAe,IAAnB,EAAyB;aACvBjE,KAAKiE,MAAL,CAAY7B,MAAZ,EAAoBoC,GAApB,EAAyBmC,QAAzB,CAAP;KADK,MAEA;cACG3G,IAAR;aACO,QAAL;aACK,QAAL;aACK,KAAL;iBACS2G,SAAS,CAAT,CAAP;aACG,SAAL;iBACS,CAAC,CAACA,SAAS,CAAT,CAAT;;iBAEOA,QAAP;;;;;oBAKRG,yCAAe9G,MAAMoC,QAAQ2B,KAAK4C,UAAU;;;QACtC/G,MAAMkD,OAAN,CAAc9C,IAAd,CAAJ,EAAyB;aAChB2G,SAASC,GAAT,CAAa,UAACC,EAAD,EAAKjJ,CAAL;eAAW,OAAKkJ,cAAL,CAAoB9G,KAAKpC,CAAL,CAApB,EAA6BwE,MAA7B,EAAqC2B,GAArC,EAA0C8C,EAA1C,EAA8C,CAA9C,CAAX;OAAb,CAAP;KADF,MAEO,IAAI7G,KAAK+E,MAAL,IAAe,IAAnB,EAAyB;aACvB/E,KAAK+E,MAAL,CAAY3C,MAAZ,EAAoBuE,QAApB,EAA8B5C,GAA9B,CAAP;KADK,MAEA,IAAI,OAAO4C,QAAP,KAAoB,QAAxB,EAAkC;aAChC,CAACA,QAAD,CAAP;KADK,MAEA,IAAI,OAAOA,QAAP,KAAoB,SAAxB,EAAmC;aACjC,CAAC,CAACA,QAAF,CAAP;KADK,MAEA,IAAI/G,MAAMkD,OAAN,CAAc6D,QAAd,CAAJ,EAA6B;aAC3BA,QAAP;KADK,MAEA;aACE,CAACA,QAAD,CAAP;;;;oBAIJ1C,yBAAO7B,QAAQpB,QAAQ;QACjB2D,MAAMvC,OAAOmC,GAAP,GAAavD,OAAOnD,MAA9B;QACI2G,MAAM,EAAV;QACImC,WAAW,EAAf;;;6BAGwBnC,GAAxB,EAA6B;cACX,EAAEhG,OAAOwC,MAAT,EADW;oBAEX,EAAExC,OAAO4D,OAAOmC,GAAhB;KAFlB;;;SAMK,IAAIlG,GAAT,IAAgB,KAAKmI,MAArB,EAA6B;UACvBC,QAAQ,KAAKD,MAAL,CAAYnI,GAAZ,CAAZ;UACIoI,MAAM,CAAN,CAAJ,IAAgBA,MAAM,CAAN,CAAhB;;;WAGKrE,OAAOmC,GAAP,GAAaI,GAApB,EAAyB;UACnBgB,IAAIvD,OAAOiC,SAAP,EAAR;UACIsB,IAAI,EAAR,EAAY;YACNA,MAAM,EAAV,EAAc;cACPA,KAAK,CAAN,GAAWvD,OAAOiC,SAAP,EAAf;;;YAGEoC,SAAQ,KAAKD,MAAL,CAAYb,CAAZ,CAAZ;YACI,CAACc,MAAL,EAAY;gBACJ,IAAIvI,KAAJ,uBAA8ByH,CAA9B,CAAN;;;YAGE3C,MAAM,KAAK0D,cAAL,CAAoBD,OAAM,CAAN,CAApB,EAA8BrE,MAA9B,EAAsCoC,GAAtC,EAA2CmC,QAA3C,CAAV;YACI3D,OAAO,IAAX,EAAiB;cACXA,eAAe+D,wCAAnB,EAAuC;mCACfvC,GAAtB,EAA2BiC,OAAM,CAAN,CAA3B,EAAqCzD,GAArC;WADF,MAEO;gBACDyD,OAAM,CAAN,CAAJ,IAAgBzD,GAAhB;;;;mBAIO,EAAX;OAnBF,MAoBO;iBACIjG,IAAT,CAAcwI,WAAWtB,MAAX,CAAkB7B,MAAlB,EAA0BuD,CAA1B,CAAd;;;;WAIGnB,GAAP;;;oBAGFjB,qBAAKyD,MAAMhG,QAAgC;QAAxBiG,eAAwB,uEAAN,IAAM;;QACrClD,MAAM;oBAAA;WAEHiD,IAFG;mBAGK,CAHL;mBAIKhG,OAAOkG,WAAP,IAAsB;KAJrC;;QAOIC,MAAM,CAAV;;SAEK,IAAIC,CAAT,IAAc,KAAKZ,MAAnB,EAA2B;UACrBC,QAAQ,KAAKD,MAAL,CAAYY,CAAZ,CAAZ;UACIpE,MAAMgE,KAAKP,MAAM,CAAN,CAAL,CAAV;UACIzD,OAAO,IAAP,IAAeqE,QAAQrE,GAAR,EAAayD,MAAM,CAAN,CAAb,CAAnB,EAA2C;;;;UAIvCE,WAAW,KAAKG,cAAL,CAAoBL,MAAM,CAAN,CAApB,EAA8B,IAA9B,EAAoC1C,GAApC,EAAyCf,GAAzC,CAAf;4BACe2D,QAAf,oHAAyB;;;;;;;;;;;;YAAhBE,EAAgB;;eAChBtB,WAAWhC,IAAX,CAAgBsD,EAAhB,CAAP;;;UAGExI,MAAMuB,MAAMkD,OAAN,CAAc2D,MAAM,CAAN,CAAd,IAA0BA,MAAM,CAAN,CAA1B,GAAqC,CAACA,MAAM,CAAN,CAAD,CAA/C;aACOpI,IAAIR,MAAX;;;QAGEoJ,eAAJ,EAAqB;aACZlD,IAAIuD,WAAX;;;WAGKH,GAAP;;;oBAGFpC,yBAAO3C,QAAQ4E,MAAMhG,QAAQ;QACvB+C,MAAM;gBACE,EADF;mBAEK3B,OAAOmC,GAFZ;oBAAA;WAIHyC,IAJG;mBAKK;KALf;;QAQIO,aAAJ,GAAoBnF,OAAOmC,GAAP,GAAa,KAAKhB,IAAL,CAAUyD,IAAV,EAAgBjD,GAAhB,EAAqB,KAArB,CAAjC;;0BAEkB,KAAKwC,GAAvB,oHAA4B;;;;;;;;;;;;UAAnBE,KAAmB;;UACtBzD,MAAMgE,KAAKP,MAAM,CAAN,CAAL,CAAV;UACIzD,OAAO,IAAP,IAAeqE,QAAQrE,GAAR,EAAayD,MAAM,CAAN,CAAb,CAAnB,EAA2C;;;;UAIvCE,WAAW,KAAKG,cAAL,CAAoBL,MAAM,CAAN,CAApB,EAA8BrE,MAA9B,EAAsC2B,GAAtC,EAA2Cf,GAA3C,CAAf;4BACe2D,QAAf,oHAAyB;;;;;;;;;;;;YAAhBE,EAAgB;;mBACZ9B,MAAX,CAAkB3C,MAAlB,EAA0ByE,EAA1B;;;UAGExI,MAAMuB,MAAMkD,OAAN,CAAc2D,MAAM,CAAN,CAAd,IAA0BA,MAAM,CAAN,CAA1B,GAAqC,CAACA,MAAM,CAAN,CAAD,CAA/C;4BACepI,GAAf,oHAAoB;;;;;;;;;;;;YAAXwI,GAAW;;eACX1B,UAAP,CAAkB0B,GAAlB;;;;QAIAjJ,IAAI,CAAR;WACOA,IAAImG,IAAIyD,QAAJ,CAAa3J,MAAxB,EAAgC;UAC1B4J,MAAM1D,IAAIyD,QAAJ,CAAa5J,GAAb,CAAV;UACIoC,IAAJ,CAAS+E,MAAT,CAAgB3C,MAAhB,EAAwBqF,IAAIzE,GAA5B,EAAiCyE,IAAIzG,MAArC;;;;;;;;;IC/Je0G;;;sBACP1H,IAAZ,EAAgC;QAAd2H,OAAc,uEAAJ,EAAI;;;;QAC1BA,QAAQ3H,IAAR,IAAgB,IAApB,EAA0B;cAChBA,IAAR,GAAe,QAAf;;;4CAGF,sBAAM,IAAN,EAAYA,IAAZ,EAAkB2H,OAAlB,CAL8B;;;uBAQhC1D,yBAAO7B,QAAQpB,QAAQ2F,UAAU;SAC1BrC,UAAL,GAAkB;cACR;eAAMqC,SAAS,CAAT,CAAN;;KADV;;WAIO,qBAAM1C,MAAN,YAAa7B,MAAb,EAAqBpB,MAArB,EAA6B2F,QAA7B,CAAP;;;uBAGF5B,yBAAO3C,QAAQ5D,OAAOuF,KAAK;QACrB,CAAC3B,MAAL,EAAa;;WAENkC,UAAL,GAAkB;cACV;iBAAM,CAAN;;OADR;;WAIKf,IAAL,CAAU/E,KAAV,EAAiBuF,GAAjB;aACO,CAAC,IAAI6D,GAAJ,CAAQ,CAAR,CAAD,CAAP;;;QAGEH,MAAM,IAAV;SACKnD,UAAL,GAAkB;cACR,gBAAClC,MAAD,EAASY,GAAT;eAAiByE,MAAMzE,GAAvB;;KADV;;yBAIM+B,MAAN,YAAa3C,MAAb,EAAqB5D,KAArB,EAA4BuF,GAA5B;WACO,CAAC,IAAI6D,GAAJ,CAAQH,GAAR,CAAD,CAAP;;;;EAlCoC1J,EAAEgC;;IAsCpC6H;eACQ5E,GAAZ,EAAiB;;;SACVA,GAAL,GAAWA,GAAX;SACK+C,UAAL,GAAkB,IAAlB;;;gBAGF8B,6BAAU;WACD,KAAK7E,GAAZ;;;;;;IC3CE8E;;;;;aACG7D,yBAAO7B,QAAQpB,QAAQ2F,UAAU;QAClCoB,YAAYpB,SAASqB,GAAT,EAAhB;;;;WAIOrB,SAAS9I,MAAT,GAAkBkK,SAAzB,EAAoC;eACzBC,GAAT;;;;;;;AAKN,qBAAe,IAAI1B,OAAJ,CAAY;;AAEzB,CAAC,CAAD,EAAY,YAAZ,EAAoC,OAApC,EAAmF,IAAnF,CAFyB,EAGzB,CAAC,CAAD,EAAY,YAAZ,EAAoC,OAApC,EAAmF,IAAnF,CAHyB,EAIzB,CAAC,CAAD,EAAY,aAAZ,EAAoC,OAApC,EAAmF,IAAnF,CAJyB,EAKzB,CAAC,CAAD,EAAY,kBAAZ,EAAoC,OAApC,EAAmF,IAAnF,CALyB,EAMzB,CAAC,CAAC,EAAD,EAAK,CAAL,CAAD,EAAY,WAAZ,EAAoC,QAApC,EAAmF,QAAnF,CANyB,EAOzB,CAAC,CAAC,EAAD,EAAK,EAAL,CAAD,EAAY,WAAZ,EAAoC,QAApC,EAAmF,CAAnF,CAPyB,EAQzB,CAAC,CAAC,EAAD,EAAK,EAAL,CAAD,EAAY,UAAZ,EAAoC,QAApC,EAAmF,CAAnF,CARyB,EASzB,CAAC,EAAD,EAAY,OAAZ,EAAoC,QAApC,EAAmF,IAAnF,CATyB,EAUzB,CAAC,EAAD,EAAY,OAAZ,EAAoC,QAApC,EAAmF,IAAnF,CAVyB,EAWzB,CAAC,CAAC,EAAD,EAAK,EAAL,CAAD,EAAY,WAAZ,EAAoC,OAApC,EAAmF,IAAnF,CAXyB,EAYzB,CAAC,CAAC,EAAD,EAAK,EAAL,CAAD,EAAY,WAAZ,EAAoC,OAApC,EAAmF,IAAnF,CAZyB,EAazB,CAAC,CAAC,EAAD,EAAK,EAAL,CAAD,EAAY,WAAZ,EAAoC,SAApC,EAAmF,KAAnF,CAbyB,EAczB,CAAC,CAAC,EAAD,EAAK,EAAL,CAAD,EAAY,eAAZ,EAAoC,QAApC,EAAmF,CAAnF,CAdyB,EAezB,CAAC,CAAC,EAAD,EAAK,EAAL,CAAD,EAAY,iBAAZ,EAAoC,QAApC,EAAmF,IAAnF,CAfyB,EAgBzB,CAAC,CAAC,EAAD,EAAK,EAAL,CAAD,EAAY,mBAAZ,EAAoC,QAApC,EAAmF,CAAnF,CAhByB,EAiBzB,CAAC,EAAD,EAAY,eAAZ,EAAoC,QAApC,EAAmF,CAAnF,CAjByB,EAkBzB,CAAC,EAAD,EAAY,eAAZ,EAAoC,QAApC,EAAmF,CAAnF,CAlByB,EAmBzB,CAAC,EAAD,EAAY,SAAZ,EAAoC,QAApC,EAAmF,CAAnF,CAnByB,EAoBzB,CAAC,EAAD,EAAY,OAAZ,EAAoCwB,UAApC,EAAmF,IAAnF,CApByB,EAqBzB,CAAC,EAAD,EAAY,OAAZ,EAAoC,IAAIJ,UAAJ,CAAe,IAAI7D,QAAJ,EAAf,EAA6B,EAAC7D,MAAM,OAAP,EAA7B,CAApC,EAAmF,IAAnF,CArByB,CAAZ,CAAf;;AChBA;;AAEA,sBAAe,CACb,SADa,EACF,OADE,EACO,QADP,EACiB,UADjB,EAC6B,YAD7B,EAC2C,QAD3C,EAEb,SAFa,EAEF,WAFE,EAEW,YAFX,EAEyB,WAFzB,EAEsC,YAFtC,EAGb,UAHa,EAGD,MAHC,EAGO,OAHP,EAGgB,QAHhB,EAG0B,QAH1B,EAGoC,OAHpC,EAG6C,MAH7C,EAGqD,KAHrD,EAIb,KAJa,EAIN,OAJM,EAIG,MAJH,EAIW,MAJX,EAImB,KAJnB,EAI0B,OAJ1B,EAImC,OAJnC,EAI4C,MAJ5C,EAIoD,OAJpD,EAKb,WALa,EAKA,MALA,EAKQ,OALR,EAKiB,SALjB,EAK4B,UAL5B,EAKwC,IALxC,EAK8C,GAL9C,EAKmD,GALnD,EAKwD,GALxD,EAMb,GANa,EAMR,GANQ,EAMH,GANG,EAME,GANF,EAMO,GANP,EAMY,GANZ,EAMiB,GANjB,EAMsB,GANtB,EAM2B,GAN3B,EAMgC,GANhC,EAMqC,GANrC,EAM0C,GAN1C,EAM+C,GAN/C,EAMoD,GANpD,EAMyD,GANzD,EAOb,GAPa,EAOR,GAPQ,EAOH,GAPG,EAOE,GAPF,EAOO,GAPP,EAOY,GAPZ,EAOiB,GAPjB,EAOsB,GAPtB,EAO2B,aAP3B,EAO0C,WAP1C,EAQb,cARa,EAQG,aARH,EAQkB,YARlB,EAQgC,WARhC,EAQ6C,GAR7C,EAQkD,GARlD,EAQuD,GARvD,EASb,GATa,EASR,GATQ,EASH,GATG,EASE,GATF,EASO,GATP,EASY,GATZ,EASiB,GATjB,EASsB,GATtB,EAS2B,GAT3B,EASgC,GAThC,EASqC,GATrC,EAS0C,GAT1C,EAS+C,GAT/C,EASoD,GATpD,EASyD,GATzD,EAUb,GAVa,EAUR,GAVQ,EAUH,GAVG,EAUE,GAVF,EAUO,GAVP,EAUY,GAVZ,EAUiB,GAVjB,EAUsB,GAVtB,EAU2B,WAV3B,EAUwC,KAVxC,EAU+C,YAV/C,EAWb,YAXa,EAWC,YAXD,EAWe,MAXf,EAWuB,UAXvB,EAWmC,UAXnC,EAW+C,KAX/C,EAYb,QAZa,EAYH,SAZG,EAYQ,UAZR,EAYoB,aAZpB,EAYmC,cAZnC,EAab,eAba,EAaI,eAbJ,EAaqB,gBAbrB,EAauC,IAbvC,EAa6C,IAb7C,EAamD,QAbnD,EAcb,QAda,EAcH,WAdG,EAcU,gBAdV,EAc4B,WAd5B,EAcyC,QAdzC,EAeb,gBAfa,EAeK,cAfL,EAeqB,eAfrB,EAesC,gBAftC,EAgBb,UAhBa,EAgBD,aAhBC,EAgBc,cAhBd,EAgB8B,OAhB9B,EAgBuC,OAhBvC,EAgBgD,YAhBhD,EAiBb,OAjBa,EAiBJ,QAjBI,EAiBM,OAjBN,EAiBe,WAjBf,EAiB4B,UAjB5B,EAiBwC,MAjBxC,EAiBgD,SAjBhD,EAkBb,cAlBa,EAkBG,QAlBH,EAkBa,OAlBb,EAkBsB,QAlBtB,EAkBgC,IAlBhC,EAkBsC,aAlBtC,EAkBqD,QAlBrD,EAmBb,QAnBa,EAmBH,IAnBG,EAmBG,cAnBH,EAmBmB,IAnBnB,EAmByB,UAnBzB,EAmBqC,QAnBrC,EAmB+C,QAnB/C,EAmByD,IAnBzD,EAoBb,YApBa,EAoBC,aApBD,EAoBgB,YApBhB,EAoB8B,IApB9B,EAoBoC,WApBpC,EAoBiD,KApBjD,EAqBb,SArBa,EAqBF,WArBE,EAqBW,OArBX,EAqBoB,YArBpB,EAqBkC,QArBlC,EAqB4C,WArB5C,EAsBb,QAtBa,EAsBH,OAtBG,EAsBM,eAtBN,EAsBuB,aAtBvB,EAsBsC,YAtBtC,EAsBoD,OAtBpD,EAuBb,KAvBa,EAuBN,UAvBM,EAuBM,eAvBN,EAuBuB,WAvBvB,EAuBoC,QAvBpC,EAuB8C,aAvB9C,EAwBb,WAxBa,EAwBA,QAxBA,EAwBU,OAxBV,EAwBmB,QAxBnB,EAwB6B,UAxB7B,EAwByC,QAxBzC,EAyBb,aAzBa,EAyBE,WAzBF,EAyBe,QAzBf,EAyByB,QAzBzB,EAyBmC,aAzBnC,EAyBkD,WAzBlD,EA0Bb,QA1Ba,EA0BH,QA1BG,EA0BO,QA1BP,EA0BiB,aA1BjB,EA0BgC,WA1BhC,EA0B6C,QA1B7C,EA2Bb,QA3Ba,EA2BH,QA3BG,EA2BO,QA3BP,EA2BiB,aA3BjB,EA2BgC,WA3BhC,EA2B6C,QA3B7C,EA4Bb,QA5Ba,EA4BH,WA5BG,EA4BU,QA5BV,EA4BoB,QA5BpB,EA4B8B,aA5B9B,EA4B6C,WA5B7C,EA6Bb,QA7Ba,EA6BH,OA7BG,EA6BM,QA7BN,EA6BgB,UA7BhB,EA6B4B,QA7B5B,EA6BsC,aA7BtC,EA8Bb,WA9Ba,EA8BA,QA9BA,EA8BU,QA9BV,EA8BoB,aA9BpB,EA8BmC,WA9BnC,EA8BgD,QA9BhD,EA+Bb,QA/Ba,EA+BH,QA/BG,EA+BO,aA/BP,EA+BsB,WA/BtB,EA+BmC,QA/BnC,EA+B6C,QA/B7C,EAgCb,QAhCa,EAgCH,QAhCG,EAgCO,aAhCP,EAgCsB,WAhCtB,EAgCmC,QAhCnC,EAgC6C,QAhC7C,EAiCb,WAjCa,EAiCA,QAjCA,EAiCU,aAjCV,EAiCyB,mBAjCzB,EAkCb,gBAlCa,EAkCK,gBAlCL,EAkCuB,gBAlCvB,EAkCyC,YAlCzC,EAmCb,mBAnCa,EAmCQ,oBAnCR,EAmC8B,gBAnC9B,EAoCb,gBApCa,EAoCK,cApCL,EAoCqB,aApCrB,EAoCoC,aApCpC,EAqCb,eArCa,EAqCI,cArCJ,EAqCoB,cArCpB,EAqCoC,aArCpC,EAsCb,eAtCa,EAsCI,eAtCJ,EAsCqB,cAtCrB,EAsCqC,eAtCrC,EAuCb,qBAvCa,EAuCU,gBAvCV,EAuC4B,eAvC5B,EAuC6C,WAvC7C,EAwCb,WAxCa,EAwCA,cAxCA,EAwCgB,WAxChB,EAwC6B,WAxC7B,EAwC0C,WAxC1C,EAyCb,WAzCa,EAyCA,WAzCA,EAyCa,WAzCb,EAyC0B,WAzC1B,EAyCuC,WAzCvC,EA0Cb,WA1Ca,EA0CA,WA1CA,EA0Ca,IA1Cb,EA0CmB,KA1CnB,EA0C0B,KA1C1B,EA0CiC,mBA1CjC,EA2Cb,oBA3Ca,EA2CS,iBA3CT,EA2C4B,gBA3C5B,EA2C8C,YA3C9C,EA4Cb,QA5Ca,EA4CH,QA5CG,EA4CO,QA5CP,EA4CiB,QA5CjB,EA4C2B,QA5C3B,EA4CqC,QA5CrC,EA4C+C,QA5C/C,EA6Cb,QA7Ca,EA6CH,QA7CG,EA6CO,QA7CP,EA6CiB,QA7CjB,EA6C2B,QA7C3B,EA6CqC,QA7CrC,EA6C+C,QA7C/C,EA8Cb,QA9Ca,EA8CH,QA9CG,EA8CO,QA9CP,EA8CiB,QA9CjB,EA8C2B,QA9C3B,EA8CqC,QA9CrC,EA8C+C,QA9C/C,EA+Cb,QA/Ca,EA+CH,QA/CG,EA+CO,QA/CP,EA+CiB,QA/CjB,EA+C2B,QA/C3B,EA+CqC,eA/CrC,EAgDb,WAhDa,EAgDA,QAhDA,EAgDU,YAhDV,EAgDwB,iBAhDxB,EAgD2C,cAhD3C,EAiDb,aAjDa,EAiDE,aAjDF,EAiDiB,aAjDjB,EAiDgC,eAjDhC,EAiDiD,YAjDjD,EAkDb,YAlDa,EAkDC,gBAlDD,EAkDmB,aAlDnB,EAkDkC,YAlDlC,EAmDb,gBAnDa,EAmDK,aAnDL,EAmDoB,WAnDpB,EAmDiC,cAnDjC,EAoDb,mBApDa,EAoDQ,WApDR,EAoDqB,cApDrB,EAoDqC,aApDrC,EAqDb,cArDa,EAqDG,UArDH,EAqDe,WArDf,EAqD4B,cArD5B,EAqD4C,cArD5C,EAsDb,cAtDa,EAsDG,aAtDH,EAsDkB,eAtDlB,EAsDmC,eAtDnC,EAuDb,cAvDa,EAuDG,cAvDH,EAuDmB,aAvDnB,EAuDkC,aAvDlC,EAwDb,eAxDa,EAwDI,cAxDJ,EAwDoB,cAxDpB,EAwDoC,aAxDpC,EAyDb,eAzDa,EAyDI,eAzDJ,EAyDqB,cAzDrB,EAyDqC,cAzDrC,EA0Db,gBA1Da,EA0DK,gBA1DL,EA0DuB,eA1DvB,EA0DwC,aA1DxC,EA2Db,aA3Da,EA2DE,kBA3DF,EA2DsB,aA3DtB,EA2DqC,gBA3DrC,EA4Db,YA5Da,EA4DC,SA5DD,EA4DY,eA5DZ,EA4D6B,aA5D7B,EA4D4C,aA5D5C,EA6Db,kBA7Da,EA6DO,gBA7DP,EA6DyB,aA7DzB,EA6DwC,aA7DxC,EA8Db,kBA9Da,EA8DO,gBA9DP,EA8DyB,UA9DzB,EA8DqC,aA9DrC,EA+Db,aA/Da,EA+DE,aA/DF,EA+DiB,kBA/DjB,EA+DqC,aA/DrC,EAgEb,gBAhEa,EAgEK,SAhEL,EAgEgB,aAhEhB,EAgE+B,aAhE/B,EAgE8C,aAhE9C,EAiEb,kBAjEa,EAiEO,gBAjEP,EAiEyB,aAjEzB,EAiEwC,YAjExC,EAkEb,gBAlEa,EAkEK,SAlEL,EAkEgB,SAlEhB,EAkE2B,SAlE3B,EAkEsC,SAlEtC,EAkEiD,OAlEjD,EAmEb,MAnEa,EAmEL,MAnEK,EAmEG,OAnEH,EAmEY,QAnEZ,EAmEsB,SAnEtB,EAmEiC,OAnEjC,EAmE0C,UAnE1C,CAAf;;ACFO,IAAIiI,mBAAmB,CAC5B,EAD4B,EACxB,EADwB,EACpB,EADoB,EAChB,EADgB,EACZ,EADY,EACR,EADQ,EACJ,EADI,EACA,EADA,EACI,EADJ,EACQ,EADR,EACY,EADZ,EACgB,EADhB,EACoB,EADpB,EACwB,EADxB,EAC4B,EAD5B,EACgC,EADhC,EACoC,EADpC,EACwC,EADxC,EAC4C,EAD5C,EACgD,EADhD,EACoD,EADpD,EACwD,EADxD,EAC4D,EAD5D,EACgE,EADhE,EACoE,EADpE,EACwE,EADxE,EAC4E,EAD5E,EACgF,EADhF,EAE5B,EAF4B,EAExB,EAFwB,EAEpB,EAFoB,EAEhB,EAFgB,EAEZ,OAFY,EAEH,QAFG,EAEO,UAFP,EAEmB,YAFnB,EAEiC,QAFjC,EAE2C,SAF3C,EAEsD,WAFtD,EAEmE,YAFnE,EAG5B,WAH4B,EAGf,YAHe,EAGD,UAHC,EAGW,MAHX,EAGmB,OAHnB,EAG4B,QAH5B,EAGsC,QAHtC,EAGgD,OAHhD,EAGyD,MAHzD,EAGiE,KAHjE,EAGwE,KAHxE,EAI5B,OAJ4B,EAInB,MAJmB,EAIX,MAJW,EAIH,KAJG,EAII,OAJJ,EAIa,OAJb,EAIsB,MAJtB,EAI8B,OAJ9B,EAIuC,WAJvC,EAIoD,MAJpD,EAI4D,OAJ5D,EAIqE,SAJrE,EAK5B,UAL4B,EAKhB,IALgB,EAKV,GALU,EAKL,GALK,EAKA,GALA,EAKK,GALL,EAKU,GALV,EAKe,GALf,EAKoB,GALpB,EAKyB,GALzB,EAK8B,GAL9B,EAKmC,GALnC,EAKwC,GALxC,EAK6C,GAL7C,EAKkD,GALlD,EAKuD,GALvD,EAK4D,GAL5D,EAKiE,GALjE,EAKsE,GALtE,EAK2E,GAL3E,EAKgF,GALhF,EAM5B,GAN4B,EAMvB,GANuB,EAMlB,GANkB,EAMb,GANa,EAMR,GANQ,EAMH,GANG,EAME,GANF,EAMO,aANP,EAMsB,WANtB,EAMmC,cANnC,EAMmD,aANnD,EAMkE,YANlE,EAO5B,WAP4B,EAOf,GAPe,EAOV,GAPU,EAOL,GAPK,EAOA,GAPA,EAOK,GAPL,EAOU,GAPV,EAOe,GAPf,EAOoB,GAPpB,EAOyB,GAPzB,EAO8B,GAP9B,EAOmC,GAPnC,EAOwC,GAPxC,EAO6C,GAP7C,EAOkD,GAPlD,EAOuD,GAPvD,EAO4D,GAP5D,EAOiE,GAPjE,EAOsE,GAPtE,EAO2E,GAP3E,EAOgF,GAPhF,EAQ5B,GAR4B,EAQvB,GARuB,EAQlB,GARkB,EAQb,GARa,EAQR,GARQ,EAQH,GARG,EAQE,WARF,EAQe,KARf,EAQsB,YARtB,EAQoC,YARpC,EAQkD,EARlD,EAQsD,EARtD,EAQ0D,EAR1D,EAQ8D,EAR9D,EAQkE,EARlE,EAQsE,EARtE,EAQ0E,EAR1E,EAQ8E,EAR9E,EAS5B,EAT4B,EASxB,EATwB,EASpB,EAToB,EAShB,EATgB,EASZ,EATY,EASR,EATQ,EASJ,EATI,EASA,EATA,EASI,EATJ,EASQ,EATR,EASY,EATZ,EASgB,EAThB,EASoB,EATpB,EASwB,EATxB,EAS4B,EAT5B,EASgC,EAThC,EASoC,EATpC,EASwC,EATxC,EAS4C,EAT5C,EASgD,EAThD,EASoD,EATpD,EASwD,EATxD,EAS4D,EAT5D,EASgE,EAThE,EASoE,EATpE,EASwE,EATxE,EAU5B,YAV4B,EAUd,MAVc,EAUN,UAVM,EAUM,UAVN,EAUkB,KAVlB,EAUyB,QAVzB,EAUmC,SAVnC,EAU8C,UAV9C,EAU0D,aAV1D,EAW5B,cAX4B,EAWZ,eAXY,EAWK,eAXL,EAWsB,gBAXtB,EAWwC,IAXxC,EAW8C,IAX9C,EAWoD,EAXpD,EAWwD,QAXxD,EAWkE,QAXlE,EAY5B,WAZ4B,EAYf,gBAZe,EAYG,EAZH,EAYO,WAZP,EAYoB,QAZpB,EAY8B,gBAZ9B,EAYgD,cAZhD,EAYgE,eAZhE,EAa5B,gBAb4B,EAaV,UAbU,EAaE,aAbF,EAaiB,EAbjB,EAaqB,cAbrB,EAaqC,EAbrC,EAayC,OAbzC,EAakD,OAblD,EAa2D,YAb3D,EAayE,OAbzE,EAc5B,QAd4B,EAclB,OAdkB,EAcT,WAdS,EAcI,UAdJ,EAcgB,EAdhB,EAcoB,MAdpB,EAc4B,SAd5B,EAcuC,EAdvC,EAc2C,cAd3C,EAc2D,QAd3D,EAcqE,OAdrE,EAe5B,QAf4B,EAelB,EAfkB,EAed,EAfc,EAeV,EAfU,EAeN,EAfM,EAeF,EAfE,EAeE,EAfF,EAeM,EAfN,EAeU,EAfV,EAec,EAfd,EAekB,EAflB,EAesB,EAftB,EAe0B,EAf1B,EAe8B,EAf9B,EAekC,EAflC,EAesC,EAftC,EAe0C,EAf1C,EAe8C,IAf9C,EAeoD,EAfpD,EAewD,aAfxD,EAeuE,EAfvE,EAe2E,EAf3E,EAe+E,EAf/E,EAgB5B,EAhB4B,EAgBxB,QAhBwB,EAgBd,QAhBc,EAgBJ,IAhBI,EAgBE,cAhBF,EAgBkB,EAhBlB,EAgBsB,EAhBtB,EAgB0B,EAhB1B,EAgB8B,EAhB9B,EAgBkC,EAhBlC,EAgBsC,IAhBtC,EAgB4C,EAhB5C,EAgBgD,EAhBhD,EAgBoD,EAhBpD,EAgBwD,UAhBxD,EAgBoE,EAhBpE,EAgBwE,EAhBxE,EAiB5B,QAjB4B,EAiBlB,QAjBkB,EAiBR,IAjBQ,EAiBF,YAjBE,CAAvB;;AAoBP,AAAO,IAAIC,iBAAiB,CAC1B,EAD0B,EACtB,EADsB,EAClB,EADkB,EACd,EADc,EACV,EADU,EACN,EADM,EACF,EADE,EACE,EADF,EACM,EADN,EACU,EADV,EACc,EADd,EACkB,EADlB,EACsB,EADtB,EAC0B,EAD1B,EAC8B,EAD9B,EACkC,EADlC,EACsC,EADtC,EAC0C,EAD1C,EAC8C,EAD9C,EACkD,EADlD,EACsD,EADtD,EAC0D,EAD1D,EAC8D,EAD9D,EACkE,EADlE,EACsE,EADtE,EAC0E,EAD1E,EAC8E,EAD9E,EACkF,EADlF,EAE1B,EAF0B,EAEtB,EAFsB,EAElB,EAFkB,EAEd,EAFc,EAEV,OAFU,EAED,aAFC,EAEc,mBAFd,EAEmC,EAFnC,EAEuC,gBAFvC,EAEyD,gBAFzD,EAG1B,gBAH0B,EAGR,YAHQ,EAGM,mBAHN,EAG2B,oBAH3B,EAGiD,gBAHjD,EAGmE,gBAHnE,EAI1B,OAJ0B,EAIjB,QAJiB,EAIP,QAJO,EAIG,UAJH,EAIe,cAJf,EAI+B,aAJ/B,EAI8C,aAJ9C,EAI6D,eAJ7D,EAK1B,cAL0B,EAKV,cALU,EAKM,aALN,EAKqB,eALrB,EAKsC,eALtC,EAKuD,cALvD,EAKuE,OALvE,EAM1B,WAN0B,EAMb,eANa,EAMI,qBANJ,EAM2B,gBAN3B,EAM6C,eAN7C,EAM8D,EAN9D,EAMkE,WANlE,EAO1B,WAP0B,EAOb,cAPa,EAOG,WAPH,EAOgB,WAPhB,EAO6B,EAP7B,EAOiC,EAPjC,EAOqC,WAPrC,EAOkD,EAPlD,EAOsD,EAPtD,EAO0D,WAP1D,EAOuE,WAPvE,EAQ1B,WAR0B,EAQb,WARa,EAQA,EARA,EAQI,EARJ,EAQQ,WARR,EAQqB,WARrB,EAQkC,WARlC,EAQ+C,EAR/C,EAQmD,IARnD,EAQyD,IARzD,EAQ+D,IAR/D,EAQqE,KARrE,EAQ4E,KAR5E,EAS1B,mBAT0B,EASL,EATK,EASD,oBATC,EASqB,iBATrB,EASwC,gBATxC,EAS0D,YAT1D,EASwE,QATxE,EAU1B,QAV0B,EAUhB,QAVgB,EAUN,QAVM,EAUI,QAVJ,EAUc,QAVd,EAUwB,QAVxB,EAUkC,QAVlC,EAU4C,QAV5C,EAUsD,QAVtD,EAUgE,QAVhE,EAU0E,QAV1E,EAW1B,QAX0B,EAWhB,QAXgB,EAWN,QAXM,EAWI,QAXJ,EAWc,QAXd,EAWwB,QAXxB,EAWkC,QAXlC,EAW4C,QAX5C,EAWsD,QAXtD,EAWgE,QAXhE,EAW0E,QAX1E,EAY1B,QAZ0B,EAYhB,QAZgB,EAYN,QAZM,EAYI,eAZJ,EAYqB,WAZrB,EAYkC,QAZlC,EAY4C,YAZ5C,EAY0D,EAZ1D,EAY8D,EAZ9D,EAYkE,EAZlE,EAYsE,EAZtE,EAY0E,EAZ1E,EAY8E,EAZ9E,EAYkF,EAZlF,EAa1B,EAb0B,EAatB,EAbsB,EAalB,EAbkB,EAad,EAbc,EAaV,EAbU,EAaN,EAbM,EAaF,EAbE,EAaE,EAbF,EAaM,EAbN,EAaU,EAbV,EAac,EAbd,EAakB,EAblB,EAasB,EAbtB,EAa0B,EAb1B,EAa8B,EAb9B,EAakC,EAblC,EAasC,EAbtC,EAa0C,EAb1C,EAa8C,EAb9C,EAakD,EAblD,EAasD,EAbtD,EAa0D,EAb1D,EAa8D,EAb9D,EAakE,EAblE,EAasE,EAbtE,EAa0E,EAb1E,EAa8E,EAb9E,EAc1B,iBAd0B,EAcP,cAdO,EAcS,aAdT,EAcwB,EAdxB,EAc4B,EAd5B,EAcgC,aAdhC,EAc+C,aAd/C,EAc8D,eAd9D,EAe1B,YAf0B,EAeZ,YAfY,EAeE,EAfF,EAeM,gBAfN,EAewB,EAfxB,EAe4B,EAf5B,EAegC,aAfhC,EAe+C,EAf/C,EAemD,EAfnD,EAeuD,YAfvD,EAeqE,gBAfrE,EAgB1B,EAhB0B,EAgBtB,EAhBsB,EAgBlB,aAhBkB,EAgBH,WAhBG,EAgBU,cAhBV,EAgB0B,EAhB1B,EAgB8B,EAhB9B,EAgBkC,EAhBlC,EAgBsC,YAhBtC,EAgBoD,SAhBpD,EAgB+D,eAhB/D,EAiB1B,mBAjB0B,EAiBL,WAjBK,EAiBQ,cAjBR,EAiBwB,aAjBxB,EAiBuC,cAjBvC,EAiBuD,UAjBvD,EAiBmE,WAjBnE,EAiBgF,EAjBhF,EAkB1B,EAlB0B,EAkBtB,cAlBsB,EAkBN,aAlBM,EAkBS,aAlBT,EAkBwB,eAlBxB,EAkByC,cAlBzC,EAkByD,cAlBzD,EAmB1B,aAnB0B,EAmBX,eAnBW,EAmBM,eAnBN,EAmBuB,cAnBvB,EAmBuC,cAnBvC,EAmBuD,aAnBvD,EAmBsE,aAnBtE,EAoB1B,eApB0B,EAoBT,cApBS,EAoBO,cApBP,EAoBuB,aApBvB,EAoBsC,eApBtC,EAoBuD,eApBvD,EAqB1B,cArB0B,EAqBV,cArBU,EAqBM,gBArBN,EAqBwB,gBArBxB,EAqB0C,eArB1C,EAqB2D,aArB3D,EAsB1B,aAtB0B,EAsBX,kBAtBW,EAsBS,aAtBT,EAsBwB,gBAtBxB,EAsB0C,YAtB1C,EAsBwD,SAtBxD,EAsBmE,eAtBnE,EAuB1B,aAvB0B,EAuBX,aAvBW,EAuBI,kBAvBJ,EAuBwB,gBAvBxB,EAuB0C,aAvB1C,EAuByD,aAvBzD,EAwB1B,kBAxB0B,EAwBN,gBAxBM,EAwBY,UAxBZ,EAwBwB,aAxBxB,EAwBuC,aAxBvC,EAwBsD,aAxBtD,EAyB1B,kBAzB0B,EAyBN,aAzBM,EAyBS,gBAzBT,EAyB2B,SAzB3B,EAyBsC,aAzBtC,EAyBqD,aAzBrD,EAyBoE,aAzBpE,EA0B1B,kBA1B0B,EA0BN,gBA1BM,EA0BY,aA1BZ,EA0B2B,YA1B3B,EA0ByC,gBA1BzC,CAArB;;ACpBA,IAAIC,kBAAkB,CAC3B,SAD2B,EAChB,OADgB,EACP,QADO,EACG,UADH,EACe,YADf,EAC6B,QAD7B,EAE3B,SAF2B,EAEhB,WAFgB,EAEH,YAFG,EAEW,WAFX,EAEwB,YAFxB,EAG3B,UAH2B,EAGf,MAHe,EAGP,OAHO,EAGE,QAHF,EAGY,QAHZ,EAGsB,OAHtB,EAG+B,MAH/B,EAI3B,KAJ2B,EAIpB,KAJoB,EAIb,OAJa,EAIJ,MAJI,EAII,MAJJ,EAIY,KAJZ,EAImB,OAJnB,EAI4B,OAJ5B,EAK3B,MAL2B,EAKnB,OALmB,EAKV,WALU,EAKG,MALH,EAKW,OALX,EAKoB,SALpB,EAK+B,UAL/B,EAM3B,IAN2B,EAMrB,GANqB,EAMhB,GANgB,EAMX,GANW,EAMN,GANM,EAMD,GANC,EAMI,GANJ,EAMS,GANT,EAMc,GANd,EAMmB,GANnB,EAMwB,GANxB,EAM6B,GAN7B,EAMkC,GANlC,EAMuC,GANvC,EAO3B,GAP2B,EAOtB,GAPsB,EAOjB,GAPiB,EAOZ,GAPY,EAOP,GAPO,EAOF,GAPE,EAOG,GAPH,EAOQ,GAPR,EAOa,GAPb,EAOkB,GAPlB,EAOuB,GAPvB,EAO4B,GAP5B,EAOiC,GAPjC,EAQ3B,aAR2B,EAQZ,WARY,EAQC,cARD,EAQiB,aARjB,EAQgC,YARhC,EAS3B,WAT2B,EASd,GATc,EAST,GATS,EASJ,GATI,EASC,GATD,EASM,GATN,EASW,GATX,EASgB,GAThB,EASqB,GATrB,EAS0B,GAT1B,EAS+B,GAT/B,EASoC,GATpC,EASyC,GATzC,EAU3B,GAV2B,EAUtB,GAVsB,EAUjB,GAViB,EAUZ,GAVY,EAUP,GAVO,EAUF,GAVE,EAUG,GAVH,EAUQ,GAVR,EAUa,GAVb,EAUkB,GAVlB,EAUuB,GAVvB,EAU4B,GAV5B,EAUiC,GAVjC,EAUsC,GAVtC,EAW3B,WAX2B,EAWd,KAXc,EAWP,YAXO,EAWO,YAXP,EAWqB,YAXrB,EAWmC,MAXnC,EAY3B,UAZ2B,EAYf,UAZe,EAYH,KAZG,EAYI,QAZJ,EAYc,SAZd,EAYyB,UAZzB,EAa3B,aAb2B,EAaZ,cAbY,EAaI,eAbJ,EAaqB,eAbrB,EAc3B,gBAd2B,EAcT,IAdS,EAcH,IAdG,EAcG,QAdH,EAca,QAdb,EAcuB,WAdvB,EAe3B,gBAf2B,EAeT,WAfS,EAeI,QAfJ,EAec,gBAfd,EAgB3B,cAhB2B,EAgBX,eAhBW,EAgBM,gBAhBN,EAgBwB,UAhBxB,EAiB3B,aAjB2B,EAiBZ,cAjBY,EAiBI,OAjBJ,EAiBa,OAjBb,EAiBsB,YAjBtB,EAiBoC,OAjBpC,EAkB3B,QAlB2B,EAkBjB,OAlBiB,EAkBR,WAlBQ,EAkBK,UAlBL,EAkBiB,MAlBjB,EAkByB,SAlBzB,EAmB3B,cAnB2B,EAmBX,QAnBW,EAmBD,OAnBC,EAmBQ,QAnBR,EAmBkB,IAnBlB,EAmBwB,aAnBxB,EAoB3B,QApB2B,EAoBjB,QApBiB,EAoBP,IApBO,EAoBD,cApBC,EAoBe,IApBf,EAoBqB,UApBrB,EAoBiC,QApBjC,EAqB3B,QArB2B,EAqBjB,IArBiB,EAqBX,YArBW,EAqBG,aArBH,EAqBkB,YArBlB,EAqBgC,IArBhC,EAsB3B,WAtB2B,EAsBd,KAtBc,EAsBP,SAtBO,EAsBI,WAtBJ,EAsBiB,OAtBjB,EAsB0B,YAtB1B,EAuB3B,QAvB2B,EAuBjB,WAvBiB,EAuBJ,QAvBI,EAuBM,OAvBN,EAuBe,eAvBf,EAuBgC,aAvBhC,EAwB3B,YAxB2B,EAwBb,OAxBa,EAwBJ,KAxBI,EAwBG,UAxBH,EAwBe,eAxBf,EAwBgC,WAxBhC,EAyB3B,QAzB2B,EAyBjB,aAzBiB,EAyBF,WAzBE,EAyBW,QAzBX,EAyBqB,OAzBrB,EAyB8B,QAzB9B,EA0B3B,UA1B2B,EA0Bf,QA1Be,EA0BL,aA1BK,EA0BU,WA1BV,EA0BuB,QA1BvB,EA0BiC,QA1BjC,EA2B3B,aA3B2B,EA2BZ,WA3BY,EA2BC,QA3BD,EA2BW,QA3BX,EA2BqB,QA3BrB,EA2B+B,aA3B/B,EA4B3B,WA5B2B,EA4Bd,QA5Bc,EA4BJ,QA5BI,EA4BM,QA5BN,EA4BgB,QA5BhB,EA4B0B,aA5B1B,EA6B3B,WA7B2B,EA6Bd,QA7Bc,EA6BJ,QA7BI,EA6BM,WA7BN,EA6BmB,QA7BnB,EA6B6B,QA7B7B,EA8B3B,aA9B2B,EA8BZ,WA9BY,EA8BC,QA9BD,EA8BW,OA9BX,EA8BoB,QA9BpB,EA8B8B,UA9B9B,EA+B3B,QA/B2B,EA+BjB,aA/BiB,EA+BF,WA/BE,EA+BW,QA/BX,EA+BqB,QA/BrB,EA+B+B,aA/B/B,EAgC3B,WAhC2B,EAgCd,QAhCc,EAgCJ,QAhCI,EAgCM,QAhCN,EAgCgB,aAhChB,EAgC+B,WAhC/B,EAiC3B,QAjC2B,EAiCjB,QAjCiB,EAiCP,QAjCO,EAiCG,QAjCH,EAiCa,aAjCb,EAiC4B,WAjC5B,EAkC3B,QAlC2B,EAkCjB,QAlCiB,EAkCP,WAlCO,EAkCM,QAlCN,CAAtB;;AAqCP,AAAO,IAAIC,gBAAgB,CACzB,SADyB,EACd,OADc,EACL,aADK,EACU,mBADV,EAC+B,gBAD/B,EAEzB,gBAFyB,EAEP,gBAFO,EAEW,YAFX,EAEyB,mBAFzB,EAGzB,oBAHyB,EAGH,gBAHG,EAGe,gBAHf,EAGiC,OAHjC,EAIzB,QAJyB,EAIf,QAJe,EAIL,UAJK,EAIO,cAJP,EAIuB,aAJvB,EAKzB,aALyB,EAKV,eALU,EAKO,cALP,EAKuB,cALvB,EAMzB,aANyB,EAMV,eANU,EAMO,eANP,EAMwB,cANxB,EAOzB,OAPyB,EAOhB,WAPgB,EAOH,eAPG,EAOc,qBAPd,EAQzB,gBARyB,EAQP,eARO,EAQU,WARV,EAQuB,WARvB,EASzB,cATyB,EAST,WATS,EASI,WATJ,EASiB,WATjB,EAS8B,WAT9B,EAUzB,WAVyB,EAUZ,WAVY,EAUC,WAVD,EAUc,WAVd,EAU2B,WAV3B,EAWzB,WAXyB,EAWZ,IAXY,EAWN,IAXM,EAWA,IAXA,EAWM,KAXN,EAWa,KAXb,EAWoB,mBAXpB,EAYzB,oBAZyB,EAYH,iBAZG,EAYgB,gBAZhB,EAYkC,YAZlC,EAazB,QAbyB,EAaf,QAbe,EAaL,QAbK,EAaK,QAbL,EAae,QAbf,EAayB,QAbzB,EAamC,QAbnC,EAczB,QAdyB,EAcf,QAde,EAcL,QAdK,EAcK,QAdL,EAce,QAdf,EAcyB,QAdzB,EAcmC,QAdnC,EAezB,QAfyB,EAef,QAfe,EAeL,QAfK,EAeK,QAfL,EAee,QAff,EAeyB,QAfzB,EAemC,QAfnC,EAgBzB,QAhByB,EAgBf,QAhBe,EAgBL,QAhBK,EAgBK,QAhBL,EAgBe,QAhBf,EAgByB,eAhBzB,EAiBzB,WAjByB,EAiBZ,QAjBY,EAiBF,YAjBE,EAiBY,iBAjBZ,EAiB+B,cAjB/B,EAkBzB,aAlByB,EAkBV,aAlBU,EAkBK,aAlBL,EAkBoB,eAlBpB,EAmBzB,YAnByB,EAmBX,YAnBW,EAmBG,gBAnBH,EAmBqB,aAnBrB,EAoBzB,YApByB,EAoBX,gBApBW,EAoBO,aApBP,EAoBsB,WApBtB,EAqBzB,cArByB,EAqBT,YArBS,EAqBK,SArBL,EAqBgB,eArBhB,EAsBzB,mBAtByB,EAsBJ,WAtBI,EAsBS,cAtBT,EAsByB,aAtBzB,EAuBzB,cAvByB,EAuBT,UAvBS,EAuBG,WAvBH,EAuBgB,cAvBhB,EAuBgC,aAvBhC,EAwBzB,aAxByB,EAwBV,eAxBU,EAwBO,cAxBP,EAwBuB,cAxBvB,EAyBzB,aAzByB,EAyBV,eAzBU,EAyBO,eAzBP,EAyBwB,cAzBxB,EA0BzB,cA1ByB,EA0BT,aA1BS,EA0BM,aA1BN,EA0BqB,eA1BrB,EA2BzB,cA3ByB,EA2BT,cA3BS,EA2BO,aA3BP,EA2BsB,eA3BtB,EA4BzB,eA5ByB,EA4BR,cA5BQ,EA4BQ,cA5BR,EA4BwB,gBA5BxB,EA6BzB,gBA7ByB,EA6BP,eA7BO,EA6BU,aA7BV,EA6ByB,aA7BzB,EA8BzB,kBA9ByB,EA8BL,aA9BK,EA8BU,gBA9BV,EA8B4B,YA9B5B,EA+BzB,SA/ByB,EA+Bd,eA/Bc,EA+BG,aA/BH,EA+BkB,aA/BlB,EAgCzB,kBAhCyB,EAgCL,gBAhCK,EAgCa,aAhCb,EAgC4B,aAhC5B,EAiCzB,kBAjCyB,EAiCL,gBAjCK,EAiCa,UAjCb,EAiCyB,aAjCzB,EAkCzB,aAlCyB,EAkCV,aAlCU,EAkCK,kBAlCL,EAkCyB,aAlCzB,EAmCzB,gBAnCyB,EAmCP,SAnCO,EAmCI,aAnCJ,EAmCmB,aAnCnB,EAmCkC,aAnClC,EAoCzB,kBApCyB,EAoCL,gBApCK,EAoCa,aApCb,EAoC4B,YApC5B,EAqCzB,gBArCyB,CAApB;;AAwCP,AAAO,IAAIC,sBAAsB,CAC/B,SAD+B,EACpB,OADoB,EACX,gBADW,EACO,gBADP,EAE/B,mBAF+B,EAEV,oBAFU,EAEY,gBAFZ,EAG/B,gBAH+B,EAGb,OAHa,EAGJ,QAHI,EAGM,QAHN,EAGgB,UAHhB,EAI/B,cAJ+B,EAIf,aAJe,EAIA,aAJA,EAIe,eAJf,EAK/B,cAL+B,EAKf,cALe,EAKC,aALD,EAKgB,eALhB,EAM/B,eAN+B,EAMd,cANc,EAME,OANF,EAMW,WANX,EAMwB,eANxB,EAO/B,qBAP+B,EAOR,gBAPQ,EAOU,WAPV,EAOuB,WAPvB,EAQ/B,cAR+B,EAQf,WARe,EAQF,WARE,EAQW,WARX,EAQwB,WARxB,EAS/B,WAT+B,EASlB,WATkB,EASL,WATK,EASQ,WATR,EASqB,WATrB,EAU/B,WAV+B,EAUlB,IAVkB,EAUZ,IAVY,EAUN,IAVM,EAUA,KAVA,EAUO,KAVP,EAUc,mBAVd,EAW/B,oBAX+B,EAWT,gBAXS,EAWS,eAXT,EAW0B,WAX1B,EAY/B,QAZ+B,EAYrB,cAZqB,EAYL,YAZK,EAYS,gBAZT,EAY2B,YAZ3B,EAa/B,SAb+B,EAapB,eAboB,EAaH,WAbG,EAaU,cAbV,EAa0B,aAb1B,EAc/B,cAd+B,EAcf,UAde,EAcH,WAdG,EAcU,cAdV,EAc0B,aAd1B,EAe/B,aAf+B,EAehB,eAfgB,EAeC,cAfD,EAeiB,cAfjB,EAgB/B,aAhB+B,EAgBhB,eAhBgB,EAgBC,eAhBD,EAgBkB,cAhBlB,EAiB/B,cAjB+B,EAiBf,aAjBe,EAiBA,aAjBA,EAiBe,eAjBf,EAkB/B,cAlB+B,EAkBf,cAlBe,EAkBC,aAlBD,EAkBgB,eAlBhB,EAmB/B,eAnB+B,EAmBd,cAnBc,EAmBE,cAnBF,EAmBkB,gBAnBlB,EAoB/B,gBApB+B,EAoBb,eApBa,CAA1B;;AC3EP;;;;AAIA,IAAIC,eAAe,IAAIvK,EAAEmB,MAAN,CAAa;YACZ,IAAInB,EAAE0C,QAAN,CAAe1C,EAAEoB,MAAjB,CADY;mBAEZpB,EAAEoB,MAFU;gBAGZpB,EAAEoB,MAHU;kBAIZ,IAAIpB,EAAE6B,KAAN,CAAY7B,EAAEoB,MAAd,EAAsB,cAAtB;CAJD,CAAnB;;AAOA,IAAIoJ,gBAAgB,IAAIxK,EAAEmB,MAAN,CAAa;OACrB,IAAInB,EAAE8D,MAAN,CAAa,CAAb,CADqB;WAErB,IAAI9D,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBmJ,YAAxB,EAAsC,EAAEtI,MAAM,QAAR,EAAtC;CAFQ,CAApB;;AAKA,IAAIwI,SAAS,IAAIzK,EAAEmB,MAAN,CAAa;kBACR,IAAInB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBmJ,YAAxB,CADQ;SAERvK,EAAEoB,MAFM;kBAGR,IAAIpB,EAAE6B,KAAN,CAAY2I,aAAZ,EAA2B,OAA3B;CAHL,CAAb;;AAMA,IAAIE,eAAe,IAAI1K,EAAEmB,MAAN,CAAa;OACtB,IAAInB,EAAE8D,MAAN,CAAa,CAAb,CADsB;UAEtB,IAAI9D,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBqJ,MAAxB,EAAgC,EAAExI,MAAM,QAAR,EAAhC;CAFS,CAAnB;;AAKA,AAAO,IAAI0I,aAAa,IAAI3K,EAAE6B,KAAN,CAAY6I,YAAZ,EAA0B1K,EAAEoB,MAA5B,CAAjB;;;;;;AAMP,AAAO,IAAIwJ,UAAU,IAAI5K,EAAEmB,MAAN,CAAa;iBACZnB,EAAEoB,MADU;eAEZpB,EAAEoB,MAFU;qBAGZ,IAAIpB,EAAE6B,KAAN,CAAY7B,EAAEoB,MAAd,EAAsB,aAAtB;CAHD,CAAd;;AAMP,IAAIyJ,gBAAgB,IAAI7K,EAAEmB,MAAN,CAAa;OACrB,IAAInB,EAAE8D,MAAN,CAAa,CAAb,CADqB;WAErB,IAAI9D,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBwJ,OAAxB,EAAiC,EAAE3I,MAAM,QAAR,EAAjC;CAFQ,CAApB;;AAKA,AAAO,IAAI6I,cAAc,IAAI9K,EAAE6B,KAAN,CAAYgJ,aAAZ,EAA2B7K,EAAEoB,MAA7B,CAAlB;;AAEP,IAAI2J,cAAc,IAAI/K,EAAE+C,QAAN,CAAe/C,EAAEoB,MAAjB,EAAyB,CACzC,aADyC,EAC1B,kBAD0B,EACN,iBADM,EAEzC,aAFyC,EAE1B,qBAF0B,EAEH,IAFG,EAEG,oBAFH,CAAzB,CAAlB;;AAKA,AAAO,SAAS4J,UAAT,CAAoBC,QAApB,EAA8B;MAC/BC,SAAS,IAAIlL,EAAEmB,MAAN,CAAa;gBACJnB,EAAEoB,MADE;WAEJ2J,WAFI;mBAGJ/K,EAAEoB,MAHE;eAIJ,IAAIpB,EAAE6B,KAAN,CAAY,IAAI7B,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB6J,QAAxB,CAAZ,EAA+C,eAA/C,CAJI;sBAKJjL,EAAEoB,MALE;GAAb,CAAb;;SAQO,IAAIpB,EAAEoC,SAAN,CAAgB,IAAIpC,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB8J,MAAxB,CAAhB,EAAiDlL,EAAEoB,MAAnD,CAAP;;;;;;;AAOF,IAAI+J,cAAc,IAAInL,EAAEmB,MAAN,CAAa;SACTnB,EAAEoB,MADO;OAETpB,EAAEoB,MAFO;sBAGTpB,EAAEoB;CAHN,CAAlB;;AAMA,AAAO,IAAIgK,WAAW,IAAIpL,EAAEmC,eAAN,CAAsBnC,EAAEoB,MAAxB,EAAgC;KACjD;gBACapB,EAAEoB,MADf;YAEa,IAAIpB,EAAE6B,KAAN,CAAY7B,EAAEoB,MAAd,EAAsB,YAAtB;GAHoC;KAKjD;gBACapB,EAAEoB,MADf;kBAEa,IAAIpB,EAAE6B,KAAN,CAAYsJ,WAAZ,EAAyB,YAAzB;;CAPI,CAAf;;;;;;AAeP,IAAIE,mBAAmB,IAAIrL,EAAEmB,MAAN,CAAa;SAC1BnB,EAAEoB,MADwB;OAE1BpB,EAAEoB,MAFwB;SAG1BpB,EAAEoB;CAHW,CAAvB;;AAMA,AAAO,IAAIkK,WAAW,IAAItL,EAAEmC,eAAN,CAAsBnC,EAAEoB,MAAxB,EAAgC;KACjD;gBACiBpB,EAAEoB,MADnB;gBAEiBpB,EAAEoB,MAFnB;qBAGiB,IAAIpB,EAAE6B,KAAN,CAAY7B,EAAEoB,MAAd,EAAsB,YAAtB;GAJgC;KAMjD;qBACiBpB,EAAEoB,MADnB;sBAEiB,IAAIpB,EAAE6B,KAAN,CAAYwJ,gBAAZ,EAA8B,iBAA9B;;CARA,CAAf;;;;;;AAgBP,AAAO,IAAIE,SAAS,IAAIvL,EAAEmB,MAAN,CAAa;aACjBnB,EAAEoB,MADe;WAEjBpB,EAAEoB,MAFe;eAGjBpB,EAAEoB;CAHE,CAAb;;;;;;AAUP,IAAIoK,eAAe,IAAIxL,EAAEmB,MAAN,CAAa;iBACVnB,EAAEoB,MADQ;mBAEVpB,EAAEoB;CAFL,CAAnB;;AAKA,IAAIqK,OAAO,IAAIzL,EAAEmB,MAAN,CAAa;cACNnB,EAAEoB,MADI;eAENpB,EAAEoB,MAFI;SAGN,IAAIpB,EAAE6B,KAAN,CAAY7B,EAAEoB,MAAd,EAAsB;WAAKmB,EAAEmJ,UAAF,GAAe,CAApB;GAAtB,CAHM;iBAIN,IAAI1L,EAAE6B,KAAN,CAAY2J,YAAZ,EAA0B,aAA1B;CAJP,CAAX;;AAOA,IAAIG,UAAU,IAAI3L,EAAE6B,KAAN,CAAY,IAAI7B,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBqK,IAAxB,CAAZ,EAA2CzL,EAAEoB,MAA7C,CAAd;;AAEA,IAAIwK,YAAY,IAAI5L,EAAEmB,MAAN,CAAa;cACXnB,EAAEoB,MADS;eAEXpB,EAAEoB,MAFS;WAGX,IAAIpB,EAAE6B,KAAN,CAAY7B,EAAEoB,MAAd,EAAsB;WAAKmB,EAAEmJ,UAAF,GAAe,CAApB;GAAtB,CAHW;iBAIX,IAAI1L,EAAE6B,KAAN,CAAY2J,YAAZ,EAA0B,aAA1B;CAJF,CAAhB;;AAOA,IAAIK,WAAW,IAAI7L,EAAE6B,KAAN,CAAY,IAAI7B,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBwK,SAAxB,CAAZ,EAAgD5L,EAAEoB,MAAlD,CAAf;;AAEA,AAAO,IAAI0K,UAAU,IAAI9L,EAAEmC,eAAN,CAAsBnC,EAAEoB,MAAxB,EAAgC;KAChD;cACc,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBgK,QAAxB,CADd;kBAEcpL,EAAEoB,MAFhB;cAGc,IAAIpB,EAAE6B,KAAN,CAAY,IAAI7B,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBuK,OAAxB,CAAZ,EAA8C,cAA9C;GAJkC;KAMhD;cACc,IAAI3L,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBgK,QAAxB,CADd;cAEc,IAAIpL,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBkK,QAAxB,CAFd;iBAGctL,EAAEoB,MAHhB;cAIc,IAAIpB,EAAE6B,KAAN,CAAY,IAAI7B,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwByK,QAAxB,CAAZ,EAA+C,aAA/C;GAVkC;KAYhD;gBACc7L,EAAEoB,MADhB;iBAEcpB,EAAEoB,MAFhB;eAGc,IAAIpB,EAAE6B,KAAN,CAAY,IAAI7B,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBgK,QAAxB,CAAZ,EAA+C,YAA/C,CAHd;mBAIc,IAAIpL,EAAE6B,KAAN,CAAY2J,YAAZ,EAA0B,aAA1B;;CAhBE,CAAd;;;;;;AAwBP,IAAIO,YAAY,IAAI/L,EAAEmB,MAAN,CAAa;uBACLnB,EAAEoB,MADG;aAEL,IAAIpB,EAAE6B,KAAN,CAAY7B,EAAEoB,MAAd,EAAsB,qBAAtB,CAFK;mBAGLpB,EAAEoB,MAHG;SAIL,IAAIpB,EAAE6B,KAAN,CAAY7B,EAAEoB,MAAd,EAAsB;WAAKmB,EAAEyJ,eAAF,GAAoB,CAAzB;GAAtB,CAJK;uBAKLhM,EAAEoB,MALG;aAML,IAAIpB,EAAE6B,KAAN,CAAY7B,EAAEoB,MAAd,EAAsB,qBAAtB,CANK;eAOLpB,EAAEoB,MAPG;iBAQL,IAAIpB,EAAE6B,KAAN,CAAY2J,YAAZ,EAA0B,aAA1B;CARR,CAAhB;;AAWA,IAAIS,eAAe,IAAIjM,EAAE6B,KAAN,CAAY,IAAI7B,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB2K,SAAxB,CAAZ,EAAgD/L,EAAEoB,MAAlD,CAAnB;;AAEA,AAAO,IAAI8K,kBAAkB,IAAIlM,EAAEmC,eAAN,CAAsBnC,EAAEoB,MAAxB,EAAgC;KACxD;cACmB,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBgK,QAAxB,CADnB;gBAEmBpL,EAAEoB,MAFrB;mBAGmB,IAAIpB,EAAE6B,KAAN,CAAY,IAAI7B,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB6K,YAAxB,CAAZ,EAAmD,YAAnD;GAJqC;;KAOxD;cACmB,IAAIjM,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBgK,QAAxB,CADnB;uBAEmB,IAAIpL,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBkK,QAAxB,CAFnB;mBAGmB,IAAItL,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBkK,QAAxB,CAHnB;uBAImB,IAAItL,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBkK,QAAxB,CAJnB;gBAKmBtL,EAAEoB,MALrB;mBAMmB,IAAIpB,EAAE6B,KAAN,CAAY,IAAI7B,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB6K,YAAxB,CAAZ,EAAmD,YAAnD;GAbqC;;KAgBxD;yBACuBjM,EAAEoB,MADzB;uBAEuB,IAAIpB,EAAE6B,KAAN,CAAY,IAAI7B,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBgK,QAAxB,CAAZ,EAA+C,qBAA/C,CAFvB;qBAGuBpL,EAAEoB,MAHzB;mBAIuB,IAAIpB,EAAE6B,KAAN,CAAY,IAAI7B,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBgK,QAAxB,CAAZ,EAA+C,iBAA/C,CAJvB;yBAKuBpL,EAAEoB,MALzB;uBAMuB,IAAIpB,EAAE6B,KAAN,CAAY,IAAI7B,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBgK,QAAxB,CAAZ,EAA+C,qBAA/C,CANvB;iBAOuBpL,EAAEoB,MAPzB;mBAQuB,IAAIpB,EAAE6B,KAAN,CAAY2J,YAAZ,EAA0B,aAA1B;;CAxBC,CAAtB;;;;ACtLP,AACA,AAEA;;;;AAIA,IAAIW,UAAU,IAAInM,EAAEoM,KAAN,CAAY,EAAZ,EAAgB,IAAhB,EAAsB,EAAtB,CAAd;AACA,IAAIC,wBAAwB,IAAIrM,EAAEmB,MAAN,CAAa;cAC3BgL,OAD2B;aAE5BA,OAF4B;YAG7BA;CAHgB,CAA5B;;AAMA,IAAIG,sBAAsB,IAAItM,EAAEmB,MAAN,CAAa;aAC1BnB,EAAEoB,MADwB;eAExBpB,EAAEoB,MAFsB;oBAGnB,IAAIpB,EAAE6B,KAAN,CAAY,IAAI7B,EAAE6B,KAAN,CAAYwK,qBAAZ,EAAmC,WAAnC,CAAZ,EAA6D,aAA7D;CAHM,CAA1B;;AAMA,IAAIE,WAAW,IAAIvM,EAAEmB,MAAN,CAAa;eACb,IAAInB,EAAE6B,KAAN,CAAY7B,EAAEqB,KAAd,EAAqB;WAAKkB,EAAEU,MAAF,CAASuJ,eAAd;GAArB,CADa;gBAEZ,IAAIxM,EAAE6B,KAAN,CAAY7B,EAAEyM,IAAd,EAAoB;WAAKlK,EAAEU,MAAF,CAASyJ,gBAAT,GAA4BnK,EAAEU,MAAF,CAASuJ,eAA1C;GAApB,CAFY;UAGlB;WAAKjK,EAAEoK,WAAF,CAAcC,MAAd,CAAqBrK,EAAEsK,YAAvB,CAAL;;CAHK,CAAf;;AAMA,IAAIC,oBAAoB,IAAI9M,EAAEmB,MAAN,CAAa;aACxBnB,EAAEoB,MADsB;mBAElBpB,EAAEoB,MAFgB;oBAGjBpB,EAAEoB,MAHe;iBAIpB,IAAIpB,EAAE6B,KAAN,CAAY7B,EAAEoB,MAAd,EAAsB,kBAAtB,CAJoB;aAKxB,IAAIpB,EAAE6B,KAAN,CAAY0K,QAAZ,EAAsB,WAAtB;CALW,CAAxB;;AAQA,AAAO,IAAIQ,qBAAqB,IAAI/M,EAAEmB,MAAN,CAAa;UACnCnB,EAAEoB,MADiC;uBAEtB,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwB+K,mBAAxB,CAFsB;sBAGvBtM,EAAEoB,MAHqB;qBAIxB,IAAIpB,EAAE6B,KAAN,CAAY,IAAI7B,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwBuL,iBAAxB,CAAZ,EAAwD,oBAAxD;CAJW,CAAzB;;;;;;AAWP,IAAIE,iBAAiB,IAAIhN,EAAEmC,eAAN,CAAsBnC,EAAEoB,MAAxB,EAAgC;;eAEtCpB,EAAEoB;sBACFpB,EAAEoB,MAFf,IAGE6L,mBAHF,GAGuBd,OAHvB,IAIEe,mBAJF,GAIuBf,OAJvB;CADmB,CAArB;;AASA,IAAIgB,eAAe,IAAInN,EAAEmB,MAAN,CAAa;kBACdnB,EAAEoB,MADY;kBAEd,IAAIpB,EAAE6B,KAAN,CAAY,IAAI7B,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwByL,cAAxB,CAAZ,EAAqD,gBAArD;CAFC,CAAnB;;AAKA,IAAII,iCAAiC,IAAIpN,EAAEmB,MAAN,CAAa;gBAClCnB,EAAEoB,MADgC;yBAEzB,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwBqJ,OAAxB,EAAiC,EAAC3I,MAAM,QAAP,EAAjC;CAFY,CAArC;;AAKA,IAAIoL,2BAA2B,IAAIrN,EAAEmB,MAAN,CAAa;WACjCnB,EAAE2F,OAD+B;qBAEvB3F,EAAEoB,MAFqB;iBAG3B,IAAIpB,EAAE6B,KAAN,CAAYuL,8BAAZ,EAA4C,mBAA5C;CAHc,CAA/B;;AAMA,IAAIE,yBAAyB,IAAItN,EAAEmB,MAAN,CAAa;gBAC1B,IAAInB,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwB4L,YAAxB,EAAsC,EAAClL,MAAM,QAAP,EAAtC,CAD0B;4BAEd,IAAIjC,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwB8L,wBAAxB,EAAkD,EAACpL,MAAM,QAAP,EAAlD;CAFC,CAA7B;;AAKA,AAAO,IAAIsL,oBAAoB,IAAIvN,EAAEmB,MAAN,CAAa;gBAC5BnB,EAAEoB,MAD0B;gBAE5BpB,EAAEoB,MAF0B;+BAGbpB,EAAEuB,MAHW;2BAIjB,IAAIvB,EAAE6B,KAAN,CAAYyL,sBAAZ,EAAoC,6BAApC;CAJI,CAAxB;;AChEP;;;IAEME;wBACQC,aAAZ,EAA2BxL,IAA3B,EAAiC;;;SAC1BwL,aAAL,GAAqBA,aAArB;SACKxL,IAAL,GAAYA,IAAZ;;;yBAGFiE,yBAAO7B,QAAQpB,QAAQ2F,UAAU;QAC3B,KAAK6E,aAAL,CAAmB7E,SAAS,CAAT,CAAnB,CAAJ,EAAqC;aAC5B,KAAK6E,aAAL,CAAmB7E,SAAS,CAAT,CAAnB,CAAP;;;WAGK,KAAK3G,IAAL,CAAUiE,MAAV,CAAiB7B,MAAjB,EAAyBpB,MAAzB,EAAiC2F,QAAjC,CAAP;;;yBAGFpD,qBAAK/E,OAAOuF,KAAK;WACR,KAAK/D,IAAL,CAAUuD,IAAV,CAAe/E,KAAf,EAAsBuF,GAAtB,CAAP;;;yBAGFgB,yBAAO3C,QAAQ5D,OAAOuF,KAAK;QACrB0H,QAAQ,KAAKD,aAAL,CAAmBvI,OAAnB,CAA2BzE,KAA3B,CAAZ;QACIiN,UAAU,CAAC,CAAf,EAAkB;aACTA,KAAP;;;WAGK,KAAKzL,IAAL,CAAU+E,MAAV,CAAiB3C,MAAjB,EAAyB5D,KAAzB,EAAgCuF,GAAhC,CAAP;;;;;;IAIE2H;;;gCACU;;;4CACZ,qBAAM,OAAN,CADY;;;+BAIdzH,yBAAO7B,QAAQ;WACNrE,EAAE0B,KAAF,CAAQwE,MAAR,CAAe7B,MAAf,IAAyB,IAAhC;;;;EAN6BrE,EAAEkI;;AAUnC,IAAI0F,SAAS,IAAI5N,EAAEmB,MAAN,CAAa;SACjBnB,EAAEoB,MADe;SAEjBpB,EAAE0B;CAFE,CAAb;;AAKA,IAAImM,SAAS,IAAI7N,EAAEmB,MAAN,CAAa;SACjBnB,EAAEoB,MADe;SAEjBpB,EAAEoB;CAFE,CAAb;;AAKA,IAAI0M,oBAAoB,IAAI9N,EAAEmC,eAAN,CAAsB,IAAIwL,kBAAJ,EAAtB,EAAgD;KACnE;YACO3N,EAAE0B,KADT;WAEM,IAAI1B,EAAE6B,KAAN,CAAY7B,EAAE0B,KAAd,EAAqB,QAArB;GAH6D;;KAMnE;aACQ1B,EAAE0B,KADV;YAEO,IAAI1B,EAAE6B,KAAN,CAAY+L,MAAZ,EAAoB,SAApB;;;;CARY,CAAxB;;AAcA,IAAIG,cAAc,IAAIP,YAAJ,CAAiB,CAAEtD,gBAAF,EAAoBC,cAApB,CAAjB,EAAuD,IAAIR,UAAJ,CAAemE,iBAAf,EAAkC,EAAEjL,MAAM,IAAR,EAAlC,CAAvD,CAAlB;;;;;IAIMmL;;;;;;;;;uBACJ9H,yBAAO7B,QAAQpB,QAAQ;QACjBnD,SAASmO,oCAAc,KAAKnO,MAAnB,EAA2BuE,MAA3B,EAAmCpB,MAAnC,CAAb;QACIqC,QAAQ,CAAZ;QACI4I,MAAM,EAAV;WACO5I,QAAQxF,MAAf,EAAuB;UACjBqO,QAAQ,KAAKlM,IAAL,CAAUiE,MAAV,CAAiB7B,MAAjB,EAAyBpB,MAAzB,CAAZ;YACM6D,MAAN,GAAexB,KAAf;eACS6I,MAAMC,KAAN,GAAc,CAAvB;UACIpP,IAAJ,CAASmP,KAAT;;;WAGKD,GAAP;;;;EAZqBlO,EAAE6B;;AAgB3B,IAAIwM,mBAAmB,IAAIrO,EAAEmC,eAAN,CAAsBnC,EAAE0B,KAAxB,EAA+B;KACjD;YACO,IAAI1B,EAAE6B,KAAN,CAAY7B,EAAEoB,MAAd,EAAsB;aAAKmB,EAAEU,MAAF,CAASqL,WAAT,CAAqBxO,MAArB,GAA8B,CAAnC;KAAtB;GAF0C;;KAKjD;YACO,IAAIkO,UAAJ,CAAeJ,MAAf,EAAuB;aAAKrL,EAAEU,MAAF,CAASqL,WAAT,CAAqBxO,MAArB,GAA8B,CAAnC;KAAvB;GAN0C;;KASjD;YACO,IAAIkO,UAAJ,CAAeH,MAAf,EAAuB;aAAKtL,EAAEU,MAAF,CAASqL,WAAT,CAAqBxO,MAArB,GAA8B,CAAnC;KAAvB;;CAVW,CAAvB;;AAcA,IAAIyO,aAAa,IAAIf,YAAJ,CAAiB,CAAEpD,eAAF,EAAmBC,aAAnB,EAAkCC,mBAAlC,CAAjB,EAA0E,IAAIX,UAAJ,CAAe0E,gBAAf,EAAiC,EAACxL,MAAM,IAAP,EAAjC,CAA1E,CAAjB;;AAEA,IAAI2L,WAAW,IAAIxO,EAAEmB,MAAN,CAAa;SACnBnB,EAAEoB,MADiB;MAEtBpB,EAAE0B;CAFO,CAAf;;AAKA,IAAI+M,WAAW,IAAIzO,EAAEmB,MAAN,CAAa;SACnBnB,EAAEuB,MADiB;MAEtBvB,EAAEoB;CAFO,CAAf;;AAKA,IAAIsN,WAAW,IAAI1O,EAAEmC,eAAN,CAAsBnC,EAAE0B,KAAxB,EAA+B;KACzC;SACI,IAAI1B,EAAE6B,KAAN,CAAY7B,EAAE0B,KAAd,EAAqB;aAAKa,EAAEU,MAAF,CAASqL,WAAT,CAAqBxO,MAA1B;KAArB;GAFqC;;KAKzC;aACQE,EAAEoB,MADV;YAEO,IAAIpB,EAAE6B,KAAN,CAAY2M,QAAZ,EAAsB,SAAtB,CAFP;cAGSxO,EAAEoB;GAR8B;;KAWzC;aACQpB,EAAEuB,MADV;YAEO,IAAIvB,EAAE6B,KAAN,CAAY4M,QAAZ,EAAsB,SAAtB,CAFP;cAGSzO,EAAEuB;;CAdD,CAAf;;AAkBA,IAAImI,MAAM,IAAIC,UAAJ,CAAegF,cAAf,CAAV;;IACMC;;;;;yBACJ1I,yBAAO7B,QAAQpB,QAAQ2F,UAAU;WACxB9I,MAAP,GAAgB8I,SAAS,CAAT,CAAhB;WACOc,IAAIxD,MAAJ,CAAW7B,MAAX,EAAmBpB,MAAnB,EAA2B,CAAC2F,SAAS,CAAT,CAAD,CAA3B,CAAP;;;yBAGFpD,qBAAKyD,MAAMjD,KAAK;WACP,CAAC2I,eAAenJ,IAAf,CAAoByD,IAApB,EAA0BjD,GAA1B,EAA+B,KAA/B,CAAD,EAAwC0D,IAAIlE,IAAJ,CAASyD,IAAT,EAAejD,GAAf,EAAoB,CAApB,CAAxC,CAAP;;;yBAGFgB,yBAAO3C,QAAQ4E,MAAMjD,KAAK;WACjB,CAAC2I,eAAenJ,IAAf,CAAoByD,IAApB,EAA0BjD,GAA1B,EAA+B,KAA/B,CAAD,EAAwC0D,IAAI1C,MAAJ,CAAW3C,MAAX,EAAmB4E,IAAnB,EAAyBjD,GAAzB,EAA8B,CAA9B,CAAxC,CAAP;;;;;;AAIJ,IAAI6I,WAAW,IAAItG,OAAJ,CAAY;;AAEzB,CAAC,EAAD,EAAY,SAAZ,EAAoC,IAAIqG,YAAJ,EAApC,EAA4E,IAA5E,CAFyB,EAGzB,CAAC,CAAC,EAAD,EAAK,EAAL,CAAD,EAAY,UAAZ,EAAoC,KAApC,EAA4E,IAA5E,CAHyB,CAAZ,CAAf;;AAMA,IAAIE,aAAa,IAAIvG,OAAJ,CAAY;;AAE3B,CAAC,CAAC,EAAD,EAAK,EAAL,CAAD,EAAY,KAAZ,EAAoC,CAAC,KAAD,EAAQ,KAAR,EAAe,QAAf,CAApC,EAA4E,IAA5E,CAF2B,EAI3B,CAAC,CAAD,EAAY,SAAZ,EAAoC,KAApC,EAA4E,IAA5E,CAJ2B,EAK3B,CAAC,CAAD,EAAY,QAAZ,EAAoC,KAApC,EAA4E,IAA5E,CAL2B,EAM3B,CAAC,CAAC,EAAD,EAAK,CAAL,CAAD,EAAY,WAAZ,EAAoC,KAApC,EAA4E,IAA5E,CAN2B,EAO3B,CAAC,CAAD,EAAY,UAAZ,EAAoC,KAApC,EAA4E,IAA5E,CAP2B,EAQ3B,CAAC,CAAD,EAAY,YAAZ,EAAoC,KAApC,EAA4E,IAA5E,CAR2B,EAS3B,CAAC,CAAD,EAAY,QAAZ,EAAoC,KAApC,EAA4E,IAA5E,CAT2B,EAU3B,CAAC,CAAC,EAAD,EAAK,CAAL,CAAD,EAAY,cAAZ,EAAoC,SAApC,EAA4E,KAA5E,CAV2B,EAW3B,CAAC,CAAC,EAAD,EAAK,CAAL,CAAD,EAAY,aAAZ,EAAoC,QAApC,EAA4E,CAA5E,CAX2B,EAY3B,CAAC,CAAC,EAAD,EAAK,CAAL,CAAD,EAAY,mBAAZ,EAAoC,QAApC,EAA4E,CAAC,GAA7E,CAZ2B,EAa3B,CAAC,CAAC,EAAD,EAAK,CAAL,CAAD,EAAY,oBAAZ,EAAoC,QAApC,EAA4E,EAA5E,CAb2B,EAc3B,CAAC,CAAC,EAAD,EAAK,CAAL,CAAD,EAAY,WAAZ,EAAoC,QAApC,EAA4E,CAA5E,CAd2B,EAe3B,CAAC,CAAC,EAAD,EAAK,CAAL,CAAD,EAAY,gBAAZ,EAAoC,QAApC,EAA4E,CAA5E,CAf2B,EAgB3B,CAAC,CAAC,EAAD,EAAK,CAAL,CAAD,EAAY,YAAZ,EAAoC,OAApC,EAA4E,CAAC,KAAD,EAAQ,CAAR,EAAW,CAAX,EAAc,KAAd,EAAqB,CAArB,EAAwB,CAAxB,CAA5E,CAhB2B,EAiB3B,CAAC,EAAD,EAAY,UAAZ,EAAoC,QAApC,EAA4E,IAA5E,CAjB2B,EAkB3B,CAAC,CAAD,EAAY,UAAZ,EAAoC,OAApC,EAA4E,CAAC,CAAD,EAAI,CAAJ,EAAO,CAAP,EAAU,CAAV,CAA5E,CAlB2B,EAmB3B,CAAC,CAAC,EAAD,EAAK,CAAL,CAAD,EAAY,aAAZ,EAAoC,QAApC,EAA4E,CAA5E,CAnB2B,EAoB3B,CAAC,EAAD,EAAY,MAAZ,EAAoC,OAApC,EAA4E,IAA5E,CApB2B,EAqB3B,CAAC,EAAD,EAAY,SAAZ,EAAoCgG,UAApC,EAA4EnE,eAA5E,CArB2B,EAsB3B,CAAC,EAAD,EAAY,UAAZ,EAAoC2D,WAApC,EAA4E7D,gBAA5E,CAtB2B,EAuB3B,CAAC,EAAD,EAAY,aAAZ,EAAoC,IAAIP,UAAJ,CAAe,IAAI7D,QAAJ,EAAf,CAApC,EAA4E,IAA5E,CAvB2B,EAwB3B,CAAC,EAAD,EAAY,SAAZ,EAAoC,IAAI8I,YAAJ,EAApC,EAA4E,IAA5E,CAxB2B,EAyB3B,CAAC,CAAC,EAAD,EAAK,EAAL,CAAD,EAAY,eAAZ,EAAoC,QAApC,EAA4E,IAA5E,CAzB2B,EA0B3B,CAAC,CAAC,EAAD,EAAK,EAAL,CAAD,EAAY,YAAZ,EAAoC,KAApC,EAA4E,IAA5E,CA1B2B,EA2B3B,CAAC,CAAC,EAAD,EAAK,EAAL,CAAD,EAAY,cAAZ,EAAoC,KAApC,EAA4E,IAA5E,CA3B2B,EA4B3B,CAAC,CAAC,EAAD,EAAK,EAAL,CAAD,EAAY,eAAZ,EAAoC,OAApC,EAA4E,IAA5E,CA5B2B;;;AA+B3B,CAAC,CAAC,EAAD,EAAK,EAAL,CAAD,EAAY,gBAAZ,EAAoC,QAApC,EAA4E,CAA5E,CA/B2B,EAgC3B,CAAC,CAAC,EAAD,EAAK,EAAL,CAAD,EAAY,iBAAZ,EAAoC,QAApC,EAA4E,CAA5E,CAhC2B,EAiC3B,CAAC,CAAC,EAAD,EAAK,EAAL,CAAD,EAAY,aAAZ,EAAoC,QAApC,EAA4E,CAA5E,CAjC2B,EAkC3B,CAAC,CAAC,EAAD,EAAK,EAAL,CAAD,EAAY,UAAZ,EAAoC,QAApC,EAA4E,IAA5E,CAlC2B,EAmC3B,CAAC,CAAC,EAAD,EAAK,EAAL,CAAD,EAAY,SAAZ,EAAoC,QAApC,EAA4E,IAA5E,CAnC2B,EAoC3B,CAAC,CAAC,EAAD,EAAK,EAAL,CAAD,EAAY,UAAZ,EAAoC,IAAIjF,UAAJ,CAAe+E,QAAf,CAApC,EAA4E,IAA5E,CApC2B,EAqC3B,CAAC,CAAC,EAAD,EAAK,EAAL,CAAD,EAAY,SAAZ,EAAoC,IAAI/E,UAAJ,CAAe,IAAI7D,QAAJ,CAAa+I,QAAb,CAAf,CAApC,EAA4E,IAA5E,CArC2B,EAsC3B,CAAC,CAAC,EAAD,EAAK,EAAL,CAAD,EAAY,UAAZ,EAAoC,KAApC,EAA4E,IAA5E,CAtC2B,CAAZ,CAAjB;;AAyCA,IAAIE,iBAAiB,IAAI/O,EAAEmB,MAAN,CAAa;UACxBnB,EAAEoB,MADsB;sBAEZ2L;CAFD,CAArB;;AAKA,IAAIiC,cAAc,IAAIzG,OAAJ,CAAY,CAC5B,CAAC,CAAC,EAAD,EAAK,CAAL,CAAD,EAAY,YAAZ,EAAoC,OAApC,EAA4E,CAAC,KAAD,EAAQ,CAAR,EAAW,CAAX,EAAc,KAAd,EAAqB,CAArB,EAAwB,CAAxB,CAA5E,CAD4B,EAE5B,CAAC,EAAD,EAAY,aAAZ,EAAoC,IAAIoB,UAAJ,CAAe,IAAI7D,QAAJ,EAAf,CAApC,EAA4E,IAA5E,CAF4B,EAG5B,CAAC,CAAC,EAAD,EAAK,EAAL,CAAD,EAAY,UAAZ,EAAoC,IAAI6D,UAAJ,CAAe+E,QAAf,CAApC,EAA4E,IAA5E,CAH4B,EAI5B,CAAC,CAAC,EAAD,EAAK,EAAL,CAAD,EAAY,SAAZ,EAAoC,IAAI/E,UAAJ,CAAe,IAAI7D,QAAJ,CAAa+I,QAAb,CAAf,CAApC,EAA4E,IAA5E,CAJ4B,EAK5B,CAAC,EAAD,EAAY,QAAZ,EAAoC,IAAIlF,UAAJ,CAAeoF,cAAf,CAApC,EAA4E,IAA5E,CAL4B,EAM5B,CAAC,EAAD,EAAY,UAAZ,EAAoC,QAApC,EAA4E,GAA5E,CAN4B,CAAZ,CAAlB;;AASA,IAAIE,SAAS,IAAIjP,EAAEmC,eAAN,CAAsBnC,EAAEkP,OAAxB,EAAiC;KACzC;aACmBlP,EAAE0B,KADrB;aAEmB1B,EAAE0B,KAFrB;eAGmB,IAAIoE,QAAJ,CAAa,IAAI9F,EAAE8D,MAAN,CAAa,QAAb,CAAb,CAHnB;kBAImB,IAAIgC,QAAJ,CAAagJ,UAAb,CAJnB;iBAKmB,IAAIhJ,QAAJ,CAAa,IAAI9F,EAAE8D,MAAN,CAAa,QAAb,CAAb,CALnB;qBAMmB,IAAIgC,QAAJ;GAPsB;;KAUzC;aACmB9F,EAAE0B,KADrB;YAEmB1B,EAAEoB,MAFrB;aAGmB4N,WAHnB;qBAImB,IAAIlJ,QAAJ;;CAdX,CAAb,CAkBA;;ICpOMqJ;mBACQ9K,MAAZ,EAAoB;;;SACbA,MAAL,GAAcA,MAAd;SACK6B,MAAL;;;UAGKA,yBAAO7B,QAAQ;WACb,IAAI8K,OAAJ,CAAY9K,MAAZ,CAAP;;;oBAGF6B,2BAAS;QACHS,QAAQ,KAAKtC,MAAL,CAAYmC,GAAxB;QACI4I,MAAMH,OAAO/I,MAAP,CAAc,KAAK7B,MAAnB,CAAV;SACK,IAAI/D,GAAT,IAAgB8O,GAAhB,EAAqB;UACfnK,MAAMmK,IAAI9O,GAAJ,CAAV;WACKA,GAAL,IAAY2E,GAAZ;;;QAGE,KAAKD,OAAL,GAAe,CAAnB,EAAsB;UAChB,KAAKqK,YAAL,CAAkBvP,MAAlB,KAA6B,CAAjC,EAAoC;cAC5B,IAAIK,KAAJ,CAAU,sCAAV,CAAN;;;WAGGmP,OAAL,GAAe,KAAKD,YAAL,CAAkB,CAAlB,CAAf;;;SAGGE,SAAL,GAAiB,KAAKD,OAAL,CAAaE,GAAb,IAAoB,IAArC;WACO,IAAP;;;oBAGF3K,yBAAO4K,KAAK;QACN,KAAKzK,OAAL,IAAgB,CAApB,EAAuB;aACd,IAAP;;;QAGEyK,MAAMC,gBAAgB5P,MAA1B,EAAkC;aACzB4P,gBAAgBD,GAAhB,CAAP;;;WAGK,KAAKE,WAAL,CAAiBF,MAAMC,gBAAgB5P,MAAvC,CAAP;;;oBAmBF8P,uCAAcC,OAAO;SACdxL,MAAL,CAAYmC,GAAZ,GAAkB,KAAK8I,OAAL,CAAahB,WAAb,CAAyBuB,KAAzB,EAAgC/I,MAAlD;WACO,KAAKzC,MAAL,CAAYyL,UAAZ,CAAuB,KAAKR,OAAL,CAAahB,WAAb,CAAyBuB,KAAzB,EAAgC/P,MAAvD,CAAP;;;oBAGFiQ,qCAAaC,KAAK;;QAEZ,KAAKhL,OAAL,IAAgB,CAApB,EAAuB;aACd,IAAP;;;;QAIE,KAAKuK,SAAT,EAAoB;aACX,IAAP;;;QAGIU,OAXU,GAWE,KAAKX,OAXP,CAWVW,OAXU;;QAYZpO,MAAMkD,OAAN,CAAckL,OAAd,CAAJ,EAA4B;aACnBA,QAAQD,GAAR,CAAP;;;QAGEA,QAAQ,CAAZ,EAAe;aACN,SAAP;;;WAGK,CAAP;;YAEQC,QAAQjL,OAAhB;WACO,CAAL;eACS,KAAKH,MAAL,CAAYoL,QAAQC,MAAR,CAAeF,GAAf,CAAZ,CAAP;;WAEG,CAAL;WACK,CAAL;aACO,IAAInQ,IAAI,CAAb,EAAgBA,IAAIoQ,QAAQE,MAAR,CAAerQ,MAAnC,EAA2CD,GAA3C,EAAgD;cAC1CsO,QAAQ8B,QAAQE,MAAR,CAAetQ,CAAf,CAAZ;cACIsO,MAAMrH,MAAN,IAAgBkJ,GAAhB,IAAuBA,OAAO7B,MAAMrH,MAAN,GAAeqH,MAAMC,KAAvD,EAA8D;mBACrD,KAAKvJ,MAAL,CAAYsJ,MAAMiC,KAAN,IAAeJ,MAAM7B,MAAMrH,MAA3B,CAAZ,CAAP;;;;;;WAMD,IAAP;;;oBAGFuJ,iCAAWL,KAAK;QACV,CAAC,KAAKV,OAAL,CAAaZ,QAAlB,EAA4B;aACnB,IAAP;;;YAGM,KAAKY,OAAL,CAAaZ,QAAb,CAAsB1J,OAA9B;WACO,CAAL;eACS,KAAKsK,OAAL,CAAaZ,QAAb,CAAsB4B,GAAtB,CAA0BN,GAA1B,CAAP;;WAEG,CAAL;WACK,CAAL;YACQG,MADR,GACmB,KAAKb,OAAL,CAAaZ,QADhC,CACQyB,MADR;;YAEMI,MAAM,CAAV;YACIC,OAAOL,OAAOrQ,MAAP,GAAgB,CAA3B;;eAEOyQ,OAAOC,IAAd,EAAoB;cACdC,MAAOF,MAAMC,IAAP,IAAgB,CAA1B;;cAEIR,MAAMG,OAAOM,GAAP,EAAYL,KAAtB,EAA6B;mBACpBK,MAAM,CAAb;WADF,MAEO,IAAIA,MAAMD,IAAN,IAAcR,MAAMG,OAAOM,MAAM,CAAb,EAAgBL,KAAxC,EAA+C;kBAC9CK,MAAM,CAAZ;WADK,MAEA;mBACEN,OAAOM,GAAP,EAAYC,EAAnB;;;;cAIE,IAAIvQ,KAAJ,gCAAuC,KAAKmP,OAAL,CAAaZ,QAAb,CAAsB1J,OAA7D,CAAN;;;;oBAIN2L,mDAAoBX,KAAK;QACnB,KAAKV,OAAL,CAAaZ,QAAjB,EAA2B;UACrBgC,KAAK,KAAKL,UAAL,CAAgBL,GAAhB,CAAT;UACI,KAAKV,OAAL,CAAasB,OAAb,CAAqBF,EAArB,CAAJ,EAA8B;eACrB,KAAKpB,OAAL,CAAasB,OAAb,CAAqBF,EAArB,EAAyBG,OAAhC;;;aAGK,IAAP;;;QAGE,KAAK7L,OAAL,GAAe,CAAnB,EAAsB;aACb,KAAKsK,OAAL,CAAauB,OAApB;;;WAGK,KAAKvB,OAAL,CAAasB,OAAb,CAAqB,CAArB,EAAwBC,OAA/B;;;;;wBA1GmB;UACf,KAAK7L,OAAL,GAAe,CAAnB,EAAsB;eACb,KAAK8L,SAAL,CAAe,CAAf,CAAP;;;aAGK,IAAP;;;;wBAGa;aACN,KAAKjM,MAAL,CAAY,KAAKyK,OAAL,CAAayB,QAAzB,CAAP;;;;wBAGe;aACR,KAAKlM,MAAL,CAAY,KAAKyK,OAAL,CAAa0B,UAAzB,CAAP;;;;;IAiGJ;;AC5JA,IAAIC,iBAAiB,IAAIjR,EAAEmB,MAAN,CAAa;cAClBnB,EAAEoB,MADgB;eAElBpB,EAAEqB;CAFG,CAArB;;AAKA,WAAe,IAAIrB,EAAEmB,MAAN,CAAa;gBACFnB,EAAEoB,MADA;gBAEFpB,EAAEoB,MAFA;sBAGFpB,EAAEqB,KAHA;yBAIFrB,EAAEoB,MAJA;WAKF,IAAIpB,EAAE6B,KAAN,CAAYoP,cAAZ,EAA4B,uBAA5B;CALX,CAAf;;ACLO,IAAIC,aAAa,IAAIlR,EAAEmB,MAAN,CAAa;UAC3BnB,EAAE0B,KADyB;SAE5B1B,EAAE0B,KAF0B;gBAGrB1B,EAAEyM,IAHmB;gBAIrBzM,EAAEyM,IAJmB;eAKtBzM,EAAE0B,KALoB;gBAMrB1B,EAAEyM,IANmB;gBAOrBzM,EAAEyM,IAPmB;eAQtBzM,EAAE0B;CARO,CAAjB;;AAWP,AAAO,IAAIyP,eAAe,IAAInR,EAAEmB,MAAN,CAAa;UAC7BnB,EAAE0B,KAD2B;SAE9B1B,EAAE0B,KAF4B;YAG3B1B,EAAEyM,IAHyB;YAI3BzM,EAAEyM,IAJyB;WAK5BzM,EAAE0B;CALa,CAAnB;;AAQP,IAAI0P,gBAAgB,IAAIpR,EAAEmB,MAAN,CAAa;SACxBnB,EAAEoB,MADsB;WAEtBpB,EAAEyM,IAFoB;WAGtBzM,EAAEyM;CAHO,CAApB;;IAMM4E;;;;IAEAC;;;;AAEN,AAAO,IAAIzB,QAAQ,IAAI7P,EAAEmC,eAAN,CAAsB,SAAtB,EAAiC;KAC/C;aACQgP,YADR;UAEKE;GAH0C;;KAM/C;aACQF,YADR;UAEKG;GAR0C;;;;;KAc/C;UACKA;GAf0C;;KAkB/C;aACQJ,UADR;UAEKG;GApB0C;;KAuB/C;aACQH,UADR;UAEKI;GAzB0C;;KA4B/C;aACQH,YADR;SAEI,IAAInR,EAAE0C,QAAN,CAAe1C,EAAE0B,KAAjB,CAFJ;mBAGc1B,EAAEoB,MAHhB;gBAIW,IAAIpB,EAAE6B,KAAN,CAAYuP,aAAZ,EAA2B,eAA3B;GAhCoC;;KAmC/C;aACQF,UADR;SAEI,IAAIlR,EAAE0C,QAAN,CAAe1C,EAAE0B,KAAjB,CAFJ;mBAGc1B,EAAEoB,MAHhB;gBAIW,IAAIpB,EAAE6B,KAAN,CAAYuP,aAAZ,EAA2B,eAA3B;GAvCoC;;MA0C9C;aACOD,YADP;aAEOnR,EAAEuB,MAFT;UAGI,IAAIvB,EAAEmF,MAAN,CAAa,SAAb;GA7C0C;;MAgD9C;aACO+L,UADP;aAEOlR,EAAEuB,MAFT;UAGI,IAAIvB,EAAEmF,MAAN,CAAa,SAAb;GAnD0C;;MAsD9C;aACOnF,EAAEuB,MADT;UAEI,IAAIvB,EAAEmF,MAAN,CAAa,SAAb;;CAxDS,CAAZ;;AC5BP,IAAIoM,kBAAkB,IAAIvR,EAAEmB,MAAN,CAAa;YACvBnB,EAAEyM,IADqB;aAEtBzM,EAAEyM,IAFoB;YAGvBzM,EAAE0B,KAHqB;uBAIZ1B,EAAEyM,IAJU;yBAKVzM,EAAEyM,IALQ;eAMpBzM,EAAEyM,IANkB;eAOpBzM,EAAEyM,IAPkB;gBAQnBzM,EAAEyM,IARiB;eASpBzM,EAAEyM,IATkB;cAUrBzM,EAAEyM,IAVmB;OAW5B,IAAIzM,EAAE0C,QAAN,CAAe1C,EAAEyM,IAAjB,EAAuB,CAAvB;CAXe,CAAtB;;AAcA,IAAI+E,iBAAiB,IAAIxR,EAAEmB,MAAN,CAAa;aACrBnB,EAAEoB,MADmB;UAExBpB,EAAEoB;CAFS,CAArB;;AAKA,IAAIqQ,gBAAgB,IAAIzR,EAAEmC,eAAN,CAAsBnC,EAAEoB,MAAxB,EAAgC;UAC1C;iBACOpB,EAAEoB,MADT;qBAEWpB,EAAEuB;GAH6B;;KAM/C;iBACY,IAAIvB,EAAE6B,KAAN,CAAY7B,EAAEuB,MAAd,EAAsB;aAAKgB,EAAEU,MAAF,CAASyO,cAAT,GAA0BnP,EAAEU,MAAF,CAAS0O,eAAnC,GAAqD,CAA1D;KAAtB;GAPmC;;KAU/C;eACU3R,EAAEuB,MADZ;gBAEW2P;GAZoC;;KAe/C;iBACY,IAAIlR,EAAE6B,KAAN,CAAY7B,EAAEoB,MAAd,EAAsB;aAAKmB,EAAEU,MAAF,CAASyO,cAAT,GAA0BnP,EAAEU,MAAF,CAAS0O,eAAnC,GAAqD,CAA1D;KAAtB;GAhBmC;;KAmB/C;eACU3R,EAAEuB,MADZ;gBAEW,IAAIvB,EAAE6B,KAAN,CAAY2P,cAAZ,EAA4B;aAAKjP,EAAEc,SAAF,GAAc,CAAnB;KAA5B;GArBoC;;KAwB/C;eACUrD,EAAEuB,MADZ;gBAEW2P,UAFX;eAGUlR,EAAEuB,MAHZ;oBAIe,IAAIvB,EAAE6B,KAAN,CAAY7B,EAAEoB,MAAd,EAAsB,WAAtB;;CA5BA,CAApB;;AAgCA,IAAIwQ,qBAAqB,IAAI5R,EAAEmB,MAAN,CAAa;mBACnBnB,EAAEoB,MADiB;kBAEpBpB,EAAEoB,MAFkB;YAG1B,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwBkQ,aAAxB;CAHa,CAAzB;;AAMA,IAAII,kBAAkB,IAAI7R,EAAEmB,MAAN,CAAa;sBACb,IAAInB,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwB,IAAIvB,EAAE6B,KAAN,CAAY+P,kBAAZ,EAAgC,CAAhC,CAAxB,EAA4D,EAAE3P,MAAM,QAAR,EAA5D,CADa;mBAEhBjC,EAAEuB,MAFc;0BAGTvB,EAAEuB,MAHO;YAIvBvB,EAAEuB,MAJqB;QAK3BgQ,eAL2B;QAM3BA,eAN2B;mBAOhBvR,EAAEoB,MAPc;iBAQlBpB,EAAEoB,MARgB;SAS1BpB,EAAE0B,KATwB;SAU1B1B,EAAE0B,KAVwB;YAWvB1B,EAAE0B,KAXqB;SAY1B,IAAI1B,EAAE+C,QAAN,CAAe/C,EAAE0B,KAAjB,EAAwB,CAAC,YAAD,EAAe,UAAf,CAAxB;CAZa,CAAtB;;AAeA,WAAe,IAAI1B,EAAEmB,MAAN,CAAa;WAChBnB,EAAEuB,MADc;YAEhBvB,EAAEuB,MAFc;SAGhB,IAAIvB,EAAE6B,KAAN,CAAYgQ,eAAZ,EAA6B,UAA7B;CAHG,CAAf;;ACzEA,IAAIC,aAAa,IAAI9R,EAAEmB,MAAN,CAAa;QACtBnB,EAAEoB,MADoB;cAEhBpB,EAAEoB,MAFc;gBAGd,IAAIpB,EAAE6B,KAAN,CAAY,IAAI7B,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwB,MAAxB,CAAZ,EAA6C;WAAKgB,EAAEU,MAAF,CAASA,MAAT,CAAgBG,IAAhB,CAAqBC,SAArB,GAAiC,CAAtC;GAA7C;CAHC,CAAjB;;;;;AASA,WAAe,IAAIrD,EAAEmB,MAAN,CAAa;WACjBnB,EAAEoB,MADe;SAEnB,IAAIpB,EAAE+C,QAAN,CAAe/C,EAAEoB,MAAjB,EAAyB,CAAC,gBAAD,CAAzB,CAFmB;gBAGZpB,EAAEuB,MAHU;eAIb,IAAIvB,EAAE6B,KAAN,CAAY,IAAI7B,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwBuQ,UAAxB,CAAZ,EAAiD,cAAjD;CAJA,CAAf;;ACTA,IAAIC,cAAc,IAAI/R,EAAEmB,MAAN,CAAa;OACxBnB,EAAEoB,MADsB;gBAEfpB,EAAEoB,MAFa;CAAb,CAAlB;;;;;AAQA,IAAI4Q,kBAAkB,IAAIhS,EAAEmB,MAAN,CAAa;OAC5BnB,EAAEoB,MAD0B;;mBAGhBpB,EAAEoB,MAHc;;aAKtBpB,EAAEoB;CALO,CAAtB;;AAQA,WAAe,IAAIpB,EAAEmB,MAAN,CAAa;WACjBnB,EAAEoB,MADe;uBAELpB,EAAEoB,MAFG;mBAGT,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwB,IAAIvB,EAAE6B,KAAN,CAAYmQ,eAAZ,EAA6B,qBAA7B,CAAxB,CAHS;gBAIZ,IAAIhS,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwB,IAAIvB,EAAE6B,KAAN,CAAYkQ,WAAZ,EAAyB,iBAAzB,CAAxB,EAAqE,EAAElP,MAAM,IAAR,EAArE,CAJY;mBAKT7C,EAAEoB;CALN,CAAf;;AChBA,IAAI6Q,cAAc,IAAIjS,EAAEmB,MAAN,CAAa;QACvBnB,EAAE0B,KADqB;SAEtB1B,EAAE0B,KAFoB;OAGxB1B,EAAE0B,KAHsB;SAItB1B,EAAE0B;CAJO,CAAlB;;AAOA,WAAe,IAAI1B,EAAEmB,MAAN,CAAa;WACjBnB,EAAEoB,MADe;qBAEPpB,EAAEoB,MAFK;eAGbpB,EAAEoB,MAHW;mBAITpB,EAAEoB,MAJO;gBAKZ,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwB,IAAIvB,EAAE6B,KAAN,CAAYoQ,WAAZ,EAAyB,iBAAzB,CAAxB,CALY;sBAMN,IAAIjS,EAAE6B,KAAN,CAAY7B,EAAEoB,MAAd,EAAsB,aAAtB;CANP,CAAf;;ACNA,IAAI8Q,YAAY,IAAIlS,EAAEmC,eAAN,CAAsBnC,EAAEoB,MAAxB,EAAgC;KAC3C;gBACapB,EAAEqB,KADf;GAD2C;;KAK3C;gBACerB,EAAEqB,KADjB;oBAEerB,EAAEoB,MAFjB;oBAGepB,EAAEoB,MAHjB;GAL2C;;KAW3C;gBACapB,EAAEqB,KADf;iBAEa,IAAIrB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBmK,MAAxB,CAFb;;CAXW,CAAhB;;AAiBA,IAAI4G,aAAa,IAAInS,EAAEmB,MAAN,CAAa;gBACZnB,EAAEoB,MADU;kBAEZpB,EAAEoB,MAFU;cAGZ,IAAIpB,EAAE6B,KAAN,CAAY,IAAI7B,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB8Q,SAAxB,CAAZ,EAAgD,gBAAhD;CAHD,CAAjB;;AAMA,IAAIE,mBAAmB,IAAIpS,EAAEmB,MAAN,CAAa;OACtB,IAAInB,EAAE8D,MAAN,CAAa,CAAb,CADsB;YAEtB,IAAI9D,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB8Q,SAAxB,EAAmC,EAACjQ,MAAM,QAAP,EAAnC,CAFsB;YAGtB,IAAIjC,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB8Q,SAAxB,EAAmC,EAACjQ,MAAM,QAAP,EAAnC,CAHsB;CAAb,CAAvB;;AAMA,IAAIoQ,SAAS,IAAIrS,EAAEmB,MAAN,CAAa;YACJ,IAAInB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB8Q,SAAxB,CADI;YAEJ,IAAIlS,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB8Q,SAAxB,CAFI;mBAGJlS,EAAEoB,MAHE;qBAIJ,IAAIpB,EAAE6B,KAAN,CAAYuQ,gBAAZ,EAA8B,iBAA9B,CAJI;CAAb,CAAb;;AAOA,IAAIE,oBAAoB,IAAItS,EAAEmB,MAAN,CAAa;OAC3B,IAAInB,EAAE8D,MAAN,CAAa,CAAb,CAD2B;UAE3B,IAAI9D,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBiR,MAAxB,EAAgC,EAACpQ,MAAM,QAAP,EAAhC;CAFc,CAAxB;;AAKA,IAAIsQ,aAAa,IAAIvS,EAAEmB,MAAN,CAAa;cACR,IAAInB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB+Q,UAAxB,CADQ;iBAER,IAAInS,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBiR,MAAxB,CAFQ;oBAGRrS,EAAEoB,MAHM;sBAIR,IAAIpB,EAAE6B,KAAN,CAAYyQ,iBAAZ,EAA+B,kBAA/B,CAJQ;CAAb,CAAjB;;AAOA,IAAIE,mBAAmB,IAAIxS,EAAEmB,MAAN,CAAa;OACxB,IAAInB,EAAE8D,MAAN,CAAa,CAAb,CADwB;UAExB,IAAI9D,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBmR,UAAxB,EAAoC,EAACtQ,MAAM,QAAP,EAApC;CAFW,CAAvB;;AAKA,IAAIwQ,iBAAiB,IAAIzS,EAAE6B,KAAN,CAAY2Q,gBAAZ,EAA8BxS,EAAEoB,MAAhC,CAArB;;;AAGA,IAAIsR,cAAc,IAAI1S,EAAE6B,KAAN,CAAY,IAAI7B,EAAE8D,MAAN,CAAa,CAAb,CAAZ,EAA6B9D,EAAEoB,MAA/B,CAAlB;;AAEA,IAAIuR,OAAO,IAAI3S,EAAEmB,MAAN,CAAa;eACN,IAAInB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBsR,WAAxB,CADM;kBAEN,IAAI1S,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBqR,cAAxB;CAFP,CAAX;;AAKA,WAAe,IAAIzS,EAAEmB,MAAN,CAAa;WACZnB,EAAEuB,MADU;aAEZ,IAAIvB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBuR,IAAxB,CAFY;YAGZ,IAAI3S,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBuR,IAAxB,CAHY;CAAb,CAAf;;AC9DA,IAAIC,cAAc,IAAI5S,EAAE6B,KAAN,CAAY7B,EAAEoB,MAAd,EAAsBpB,EAAEoB,MAAxB,CAAlB;AACA,IAAIyR,aAAa,IAAI7S,EAAEmB,MAAN,CAAa;YACZ,IAAInB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBgK,QAAxB,CADY;cAEZpL,EAAEoB,MAFU;gBAGZ,IAAIpB,EAAE6B,KAAN,CAAY,IAAI7B,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBwR,WAAxB,CAAZ,EAAkD,YAAlD;CAHD,CAAjB;;AAMA,IAAIE,aAAa,IAAI9S,EAAEmC,eAAN,CAAsBnC,EAAEoB,MAAxB,EAAgC;KAC5C;gBACWpB,EAAEqB;GAF+B;;KAK5C;qBACgBrB,EAAEoB;GAN0B;;KAS5C;gBACepB,EAAEqB,KADjB;iBAEe,IAAIrB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBmK,MAAxB;;CAXH,CAAjB;;AAeA,IAAIwH,WAAW,IAAI/S,EAAE6B,KAAN,CAAY,IAAI7B,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB0R,UAAxB,CAAZ,EAAiD9S,EAAEoB,MAAnD,CAAf;;AAEA,IAAI4R,eAAe,IAAIhT,EAAEmB,MAAN,CAAa;YACd,IAAInB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBgK,QAAxB,CADc;iBAEdpL,EAAEoB,MAFY;aAGd,IAAIpB,EAAE6B,KAAN,CAAY,IAAI7B,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB2R,QAAxB,CAAZ,EAA+C,eAA/C;CAHC,CAAnB;;AAMA,IAAIE,mBAAmB,IAAIjT,EAAEmB,MAAN,CAAa;sBACdnB,EAAEoB,MADY;gBAEdpB,EAAEoB,MAFY;YAGd,IAAIpB,EAAE6B,KAAN,CAAY,IAAI7B,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwB6J,QAAxB,CAAZ,EAA+C,cAA/C;CAHC,CAAvB;;AAMA,WAAe,IAAIpL,EAAEmC,eAAN,CAAsBnC,EAAEuB,MAAxB,EAAgC;UACrC;mBACc,IAAIvB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBkK,QAAxB,CADd;gBAEc,IAAItL,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwByR,UAAxB,CAFd;kBAGc,IAAI7S,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB4R,YAAxB,CAHd;wBAIc,IAAIhT,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBkK,QAAxB;GALuB;;cAQjC,EARiC;cASjC;sBACU,IAAItL,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB6R,gBAAxB;GAVuB;cAYjC;sBACU,IAAIjT,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB6R,gBAAxB,CADV;wBAEU,IAAIjT,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwBwL,kBAAxB;;CAdT,CAAf;;ACpCA,IAAImG,cAAc,IAAIlT,EAAE+C,QAAN,CAAe/C,EAAEoB,MAAjB,EAAyB,CACzC,YADyC,EAC3B,YAD2B,EAEzC,UAFyC,EAE7B,UAF6B,EAGzC,YAHyC,EAG3B,YAH2B,EAIzC,YAJyC,EAI3B,YAJ2B,CAAzB,CAAlB;;AAOA,IAAI+R,QAAQ;cACEnT,EAAEqB,KADJ;cAEErB,EAAEqB,KAFJ;YAGErB,EAAEqB,KAHJ;YAIErB,EAAEqB,KAJJ;cAKE,IAAIrB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBmK,MAAxB,EAAgC,EAAEtJ,MAAM,QAAR,EAAkB8B,YAAY,KAA9B,EAAhC,CALF;cAME,IAAI/D,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBmK,MAAxB,EAAgC,EAAEtJ,MAAM,QAAR,EAAkB8B,YAAY,KAA9B,EAAhC,CANF;cAOE,IAAI/D,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBmK,MAAxB,EAAgC,EAAEtJ,MAAM,QAAR,EAAkB8B,YAAY,KAA9B,EAAhC,CAPF;cAQE,IAAI/D,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBmK,MAAxB,EAAgC,EAAEtJ,MAAM,QAAR,EAAkB8B,YAAY,KAA9B,EAAhC;CARd;;IAWMqP;yBAC6B;QAArB9S,GAAqB,uEAAf,aAAe;;;;SAC1BA,GAAL,GAAWA,GAAX;;;wBAGF+S,mCAAYpQ,QAAQ;QACdqQ,SAASrQ,MAAb;WACO,CAACqQ,OAAO,KAAKhT,GAAZ,CAAD,IAAqBgT,OAAOrQ,MAAnC,EAA2C;eAChCqQ,OAAOrQ,MAAhB;;;QAGE,CAACqQ,OAAO,KAAKhT,GAAZ,CAAL,EAAuB;;QAEnBmI,SAAS,EAAb;WACO8K,GAAP,GAAa;aAAMD,OAAOE,YAAb;KAAb;;QAEIzU,SAASuU,OAAO,KAAKhT,GAAZ,CAAb;SACK,IAAIA,GAAT,IAAgBvB,MAAhB,EAAwB;UAClBA,OAAOuB,GAAP,CAAJ,EAAiB;eACRA,GAAP,IAAc6S,MAAM7S,GAAN,CAAd;;;;WAIG,IAAIN,EAAEmB,MAAN,CAAasH,MAAb,CAAP;;;wBAGFjD,qBAAKP,KAAKe,KAAK;WACN,KAAKqN,WAAL,CAAiBrN,GAAjB,EAAsBR,IAAtB,CAA2BP,GAA3B,EAAgCe,GAAhC,CAAP;;;wBAGFE,yBAAO7B,QAAQpB,QAAQ;QACjBiL,MAAM,KAAKmF,WAAL,CAAiBpQ,MAAjB,EAAyBiD,MAAzB,CAAgC7B,MAAhC,EAAwCpB,MAAxC,CAAV;WACOiL,IAAIqF,GAAX;WACOrF,GAAP;;;;;;AAIJ,IAAIuF,kBAAkB,IAAIzT,EAAEmB,MAAN,CAAa;eACjBnB,EAAEoB,MADe;UAEjB,IAAIgS,WAAJ,CAAgB,cAAhB,CAFiB;UAGjB,IAAIA,WAAJ,CAAgB,cAAhB;CAHI,CAAtB;;AAMA,IAAIM,UAAU,IAAI1T,EAAE6B,KAAN,CAAY4R,eAAZ,EAA6BzT,EAAEoB,MAA/B,CAAd;;AAEA,IAAIuS,eAAe,IAAI3T,EAAEmB,MAAN,CAAa;UACtB,IAAIiS,WAAJ,CAAgB,cAAhB,CADsB;UAEtB,IAAIA,WAAJ,CAAgB,cAAhB;CAFS,CAAnB;;AAKA,IAAIQ,SAAS,IAAI5T,EAAEmC,eAAN,CAAsBnC,EAAEoB,MAAxB,EAAgC;KACxC;iBACepB,EAAEqB,KADjB;iBAEerB,EAAEqB;GAHuB;;KAMxC;iBACerB,EAAEqB,KADjB;iBAEerB,EAAEqB,KAFjB;iBAGerB,EAAEoB;GATuB;;KAYxC;iBACepB,EAAEqB,KADjB;iBAEerB,EAAEqB,KAFjB;kBAGe,IAAIrB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBmK,MAAxB,CAHf;kBAIe,IAAIvL,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBmK,MAAxB;;CAhBP,CAAb;;AAoBA,IAAIsI,kBAAkB,IAAI7T,EAAEmB,MAAN,CAAa;eACjB,IAAInB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBwS,MAAxB,EAAgC,EAAC3R,MAAM,QAAP,EAAhC,CADiB;cAEjB,IAAIjC,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBwS,MAAxB,EAAgC,EAAC3R,MAAM,QAAP,EAAhC;CAFI,CAAtB;;AAKA,IAAI6R,aAAa,IAAI9T,EAAEmB,MAAN,CAAa;SAChBnB,EAAEoB,MADc;cAEhB,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBwS,MAAxB,EAAgC,EAAC3R,MAAM,QAAP,EAAhC;CAFG,CAAjB;;AAKA,IAAI8R,YAAY,IAAI/T,EAAE6B,KAAN,CAAYiS,UAAZ,EAAwB9T,EAAEoB,MAA1B,CAAhB;;AAEA,IAAI4S,aAAc,IAAIhU,EAAE6B,KAAN,CAAY,IAAI7B,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBwS,MAAxB,CAAZ,EAA6C;SAAKrR,EAAEU,MAAF,CAASgR,UAAd;CAA7C,CAAlB;AACA,IAAIC,YAAc,IAAIlU,EAAE6B,KAAN,CAAYmS,UAAZ,EAAwBhU,EAAEoB,MAA1B,CAAlB;;AAEA,IAAI+S,kBAAkB,IAAInU,EAAE6B,KAAN,CAAY,IAAI7B,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBwS,MAAxB,CAAZ,EAA6C;SAAKrR,EAAEU,MAAF,CAASA,MAAT,CAAgBgR,UAArB;CAA7C,CAAtB;AACA,IAAIG,iBAAkB,IAAIpU,EAAE6B,KAAN,CAAYsS,eAAZ,EAA6BnU,EAAEoB,MAA/B,CAAtB;AACA,IAAIiT,gBAAkB,IAAIrU,EAAE6B,KAAN,CAAY,IAAI7B,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBgT,cAAxB,CAAZ,EAAqDpU,EAAEoB,MAAvD,CAAtB;;AAEA,IAAIkT,aAAa,IAAItU,EAAEmC,eAAN,CAAsB,YAAtB,EAAoC;KAChD,IAAInC,EAAEmC,eAAN,CAAsBnC,EAAEoB,MAAxB,EAAgC;OAC9B;gBACe,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBgK,QAAxB,CADf;mBAEe8H,WAFf;aAGe,IAAIE,WAAJ;KAJe;OAM9B;gBACe,IAAIpT,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBgK,QAAxB,CADf;mBAEe8H,WAFf;kBAGelT,EAAEoB,MAHjB;cAIe,IAAIpB,EAAEoC,SAAN,CAAgB,IAAIgR,WAAJ,EAAhB,EAAmC,YAAnC;;GAVjB,CADgD;;KAehD,IAAIpT,EAAEmC,eAAN,CAAsBnC,EAAEoB,MAAxB,EAAgC;OAC9B;gBACe,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBgK,QAAxB,CADf;oBAEe8H,WAFf;oBAGeA,WAHf;oBAIelT,EAAEoB,MAJjB;gBAKe,IAAIpB,EAAEoC,SAAN,CAAgB,IAAIpC,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBsS,OAAxB,CAAhB,EAAkD,cAAlD;KANe;;OAS9B;gBACe,IAAI1T,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBgK,QAAxB,CADf;oBAEe8H,WAFf;oBAGeA,WAHf;iBAIe,IAAIlT,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBkK,QAAxB,CAJf;iBAKe,IAAItL,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBkK,QAAxB,CALf;mBAMetL,EAAEoB,MANjB;mBAOepB,EAAEoB,MAPjB;oBAQe,IAAIpB,EAAEoC,SAAN,CAAgB,IAAIpC,EAAEoC,SAAN,CAAgBuR,YAAhB,EAA8B,aAA9B,CAAhB,EAA8D,aAA9D;;GAjBjB,CAfgD;;KAoChD;YACmB3T,EAAEoB,MADrB;cAEmB,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBgK,QAAxB,CAFnB;oBAGmBpL,EAAEoB,MAHrB;sBAImB,IAAIpB,EAAE6B,KAAN,CAAYgS,eAAZ,EAA6B,gBAA7B;GAxC6B;;KA2ChD;YACmB7T,EAAEoB,MADrB;kBAEmB,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBgK,QAAxB,CAFnB;kBAGmB,IAAIpL,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBgK,QAAxB,CAHnB;gBAImBpL,EAAEoB,MAJrB;eAKmB,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB2S,SAAxB,CALnB;eAMmB,IAAI/T,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB8S,SAAxB;GAjD6B;;KAoDhD;YACmBlU,EAAEoB,MADrB;kBAEmB,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBgK,QAAxB,CAFnB;sBAGmB,IAAIpL,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBgK,QAAxB,CAHnB;gBAImBpL,EAAEoB,MAJrB;eAKmB,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB2S,SAAxB,CALnB;mBAMmB,IAAI/T,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBiT,aAAxB;GA1D6B;;KA6DhD;YACmBrU,EAAEoB,MADrB;mBAEmB,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBgK,QAAxB,CAFnB;mBAGmB,IAAIpL,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBgK,QAAxB,CAHnB;gBAImBpL,EAAEoB,MAJrB;gBAKmB,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB2S,SAAxB,CALnB;gBAMmB,IAAI/T,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB8S,SAAxB;GAnE6B;;KAsEhDpI,OAtEgD;KAuEhDI,eAvEgD;;KAyEhD;eACYlM,EAAEoB,MADd;gBAEYpB,EAAEoB,MAFd;eAGY,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwB+S,UAAxB;;CA5EA,CAAjB;;;AAiFAA,WAAW5O,QAAX,CAAoB,CAApB,EAAuB6O,SAAvB,CAAiCtS,IAAjC,GAAwCqS,UAAxC;;AAEA,WAAe,IAAItU,EAAEmC,eAAN,CAAsBnC,EAAEuB,MAAxB,EAAgC;UACrC;gBACU,IAAIvB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBuJ,UAAxB,CADV;iBAEU,IAAI3K,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB0J,WAAxB,CAFV;gBAGU,IAAI9K,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB,IAAI4J,UAAJ,CAAesJ,UAAf,CAAxB;GAJ2B;;cAOjC,EAPiC;cAQjC;uBACS,IAAItU,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwBgM,iBAAxB;;CATR,CAAf,CAaA;;AC3MA,IAAIiH,WAAW,IAAIxU,EAAE6B,KAAN,CAAY7B,EAAEoB,MAAd,EAAsBpB,EAAEoB,MAAxB,CAAf;AACA,IAAIqT,eAAeD,QAAnB;;AAEA,IAAIE,WAAW,IAAI1U,EAAEmB,MAAN,CAAa;SACdnB,EAAEoB,MADY;aAEdpB,EAAEoB,MAFY;cAGd,IAAIpB,EAAE6B,KAAN,CAAY7B,EAAEoB,MAAd,EAAsB;WAAKmB,EAAEoS,SAAF,GAAc,CAAnB;GAAtB;CAHC,CAAf;;AAMA,IAAIC,cAAc,IAAI5U,EAAE6B,KAAN,CAAY,IAAI7B,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBsT,QAAxB,CAAZ,EAA+C1U,EAAEoB,MAAjD,CAAlB;;AAEA,IAAIyT,aAAa,IAAI7U,EAAEmC,eAAN,CAAsB,YAAtB,EAAoC;KAChD,IAAInC,EAAEmC,eAAN,CAAsBnC,EAAEoB,MAAxB,EAAgC;OAC9B;gBACe,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBgK,QAAxB,CADf;oBAEepL,EAAEqB;KAHa;OAK9B;gBACe,IAAIrB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBgK,QAAxB,CADf;kBAEepL,EAAEoB,MAFjB;kBAGe,IAAIpB,EAAEoC,SAAN,CAAgBpC,EAAEoB,MAAlB,EAA0B,YAA1B;;GARjB,CADgD;;KAahD;iBACepB,EAAEoB,MADjB;cAEe,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBgK,QAAxB,CAFf;WAGepL,EAAEoB,MAHjB;eAIe,IAAIpB,EAAEoC,SAAN,CAAgB,IAAIpC,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBoT,QAAxB,CAAhB,EAAmD,OAAnD;GAjBiC;;KAoBhD;iBACexU,EAAEoB,MADjB;cAEe,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBgK,QAAxB,CAFf;WAGepL,EAAEoB,MAHjB;kBAIe,IAAIpB,EAAEoC,SAAN,CAAgB,IAAIpC,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBqT,YAAxB,CAAhB,EAAuD,OAAvD;GAxBiC;;KA2BhD;iBACezU,EAAEoB,MADjB;cAEe,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBgK,QAAxB,CAFf;WAGepL,EAAEoB,MAHjB;kBAIe,IAAIpB,EAAEoC,SAAN,CAAgB,IAAIpC,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBwT,WAAxB,CAAhB,EAAsD,OAAtD;GA/BiC;;KAkChD9I,OAlCgD;KAmChDI,eAnCgD;;KAqChD;iBACclM,EAAEoB,MADhB;gBAEcpB,EAAEoB,MAFhB;eAGc,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwBsT,UAAxB;GAxCkC;;KA2ChD;iBACuB7U,EAAEoB,MADzB;cAEuB,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBgK,QAAxB,CAFvB;uBAGuB,IAAIpL,EAAE6B,KAAN,CAAY,IAAI7B,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBgK,QAAxB,CAAZ,EAA+C,qBAA/C,CAHvB;yBAIuBpL,EAAEoB,MAJzB;uBAKuB,IAAIpB,EAAE6B,KAAN,CAAY,IAAI7B,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBgK,QAAxB,CAAZ,EAA+C,qBAA/C,CALvB;gBAMuBpL,EAAEoB,MANzB;iBAOuB,IAAIpB,EAAE6B,KAAN,CAAY7B,EAAEoB,MAAd,EAAsB,YAAtB;;CAlDX,CAAjB;;;AAuDAyT,WAAWnP,QAAX,CAAoB,CAApB,EAAuB6O,SAAvB,CAAiCtS,IAAjC,GAAwC4S,UAAxC;;AAEA,WAAe,IAAI7U,EAAEmC,eAAN,CAAsBnC,EAAEuB,MAAxB,EAAgC;UACrC;gBACU,IAAIvB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBuJ,UAAxB,CADV;iBAEU,IAAI3K,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB0J,WAAxB,CAFV;gBAGU,IAAI9K,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB,IAAI4J,UAAJ,CAAe6J,UAAf,CAAxB;GAJ2B;;cAOjC,EAPiC;cAQjC;uBACS,IAAI7U,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwBgM,iBAAxB;;CATR,CAAf;;ACpEA,IAAIuH,kBAAkB,IAAI9U,EAAE6B,KAAN,CAAY7B,EAAEoB,MAAd,EAAsBpB,EAAEoB,MAAxB,CAAtB;;AAEA,IAAI2T,eAAe,IAAI/U,EAAEmB,MAAN,CAAa;uBACN,IAAInB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB0T,eAAxB,CADM;wBAEN,IAAI9U,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB0T,eAAxB,CAFM;uBAGN,IAAI9U,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB0T,eAAxB,CAHM;wBAIN,IAAI9U,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB0T,eAAxB,CAJM;oBAKN,IAAI9U,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB,IAAI4J,UAAJ,CAAesJ,UAAf,CAAxB,CALM;uBAMN,IAAItU,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB0T,eAAxB,CANM;wBAON,IAAI9U,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB0T,eAAxB,CAPM;uBAQN,IAAI9U,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB0T,eAAxB,CARM;wBASN,IAAI9U,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB0T,eAAxB,CATM;oBAUN,IAAI9U,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB,IAAI4J,UAAJ,CAAesJ,UAAf,CAAxB;CAVP,CAAnB;;AAaA,IAAIU,cAAc,IAAIhV,EAAE6B,KAAN,CAAY,IAAI7B,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB2T,YAAxB,CAAZ,EAAmD/U,EAAEoB,MAArD,CAAlB;;AAEA,IAAI6T,oBAAoB,IAAIjV,EAAEmB,MAAN,CAAa;OACtB,IAAInB,EAAE8D,MAAN,CAAa,CAAb,CADsB;eAEtB,IAAI9D,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB4T,WAAxB;CAFS,CAAxB;;AAKA,IAAIE,aAAa,IAAIlV,EAAEmB,MAAN,CAAa;kBACZ,IAAInB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB,IAAIpB,EAAE6B,KAAN,CAAY7B,EAAEoB,MAAd,EAAsBpB,EAAEoB,MAAxB,CAAxB,CADY;kBAEZ,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB4T,WAAxB,CAFY;gBAGZhV,EAAEoB,MAHU;kBAIZ,IAAIpB,EAAE6B,KAAN,CAAYoT,iBAAZ,EAA+B,cAA/B;CAJD,CAAjB;;AAOA,IAAIE,mBAAmB,IAAInV,EAAEmB,MAAN,CAAa;OAC1B,IAAInB,EAAE8D,MAAN,CAAa,CAAb,CAD0B;UAE1B,IAAI9D,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB8T,UAAxB,EAAoC,EAACjT,MAAM,QAAP,EAApC;CAFa,CAAvB;;AAKA,WAAe,IAAIjC,EAAEmB,MAAN,CAAa;WACbnB,EAAEuB,MADW;eAEbvB,EAAEoB,MAFW;cAGb,IAAIpB,EAAE6B,KAAN,CAAYsT,gBAAZ,EAA8B,aAA9B;CAHA,CAAf;;AClCA;;IACMC;8BACQ5P,IAAZ,EAAkB;;;SACX6P,KAAL,GAAa7P,IAAb;;;+BAGFU,yBAAO7B,QAAQpB,QAAQ;YACb,KAAKuC,IAAL,CAAU,CAAV,EAAavC,MAAb,CAAR;WACO,CAAL;eAAeoB,OAAOiC,SAAP,EAAP;WACH,CAAL;eAAejC,OAAO+B,YAAP,EAAP;WACH,CAAL;eAAe/B,OAAOiR,YAAP,EAAP;WACH,CAAL;eAAejR,OAAO8B,YAAP,EAAP;;;;+BAIZX,qBAAKP,KAAKhC,QAAQ;WACTgL,oCAAc,KAAKoH,KAAnB,EAA0B,IAA1B,EAAgCpS,MAAhC,CAAP;;;;;;AAIJ,IAAIsS,eAAe,IAAIvV,EAAEmB,MAAN,CAAa;SACvB,IAAIiU,kBAAJ,CAAuB;WAAK,CAAC,CAAC7S,EAAEU,MAAF,CAASuS,WAAT,GAAuB,MAAxB,KAAmC,CAApC,IAAyC,CAA9C;GAAvB,CADuB;cAElB;WAAKjT,EAAEkT,KAAF,IAAY,CAAClT,EAAEU,MAAF,CAASuS,WAAT,GAAuB,MAAxB,IAAkC,CAAnD;GAFkB;cAGlB;WAAKjT,EAAEkT,KAAF,GAAW,CAAC,KAAM,CAAClT,EAAEU,MAAF,CAASuS,WAAT,GAAuB,MAAxB,IAAkC,CAAzC,IAA+C,CAA/D;;CAHK,CAAnB;;AAMA,IAAIE,mBAAmB,IAAI1V,EAAEmB,MAAN,CAAa;eACrBnB,EAAEoB,MADmB;YAExBpB,EAAEoB,MAFsB;WAGzB,IAAIpB,EAAE6B,KAAN,CAAY0T,YAAZ,EAA0B,UAA1B;CAHY,CAAvB;;AAMA,WAAe,IAAIvV,EAAEmB,MAAN,CAAa;gBACZnB,EAAEoB,MADU;gBAEZpB,EAAEoB,MAFU;sBAGN,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwBwL,kBAAxB,CAHM;uBAIL,IAAI/M,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwBmU,gBAAxB,CAJK;cAKd,IAAI1V,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwBmU,gBAAxB,CALc;cAMd,IAAI1V,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwBmU,gBAAxB;CANC,CAAf;;AClCA,IAAIC,YAAY,IAAI3V,EAAEmB,MAAN,CAAa;UACnBnB,EAAEuB,MADiB;UAEnBvB,EAAEuB,MAFiB;UAGnBvB,EAAEuB;CAHI,CAAhB;;AAMA,IAAIqU,iBAAiB,IAAI5V,EAAEmB,MAAN,CAAa;YAChB,IAAInB,EAAE0C,QAAN,CAAe1C,EAAEoB,MAAjB,EAAyB,CAAzB,CADgB;eAEhBpB,EAAEuB,MAFc;aAGhB,IAAIvB,EAAEmF,MAAN,CAAa,aAAb;CAHG,CAArB;;AAMA,WAAe,IAAInF,EAAEmB,MAAN,CAAa;aACTnB,EAAEuB,MADO;aAETvB,EAAEoB,MAFO;UAGTpB,EAAEoB,MAHO;cAIT,IAAIpB,EAAE6B,KAAN,CAAY8T,SAAZ,EAAuB,WAAvB,CAJS;mBAKT,IAAI3V,EAAE6B,KAAN,CAAY+T,cAAZ,EAA4B,WAA5B;CALJ,CAAf;;ACZA,IAAIC,YAAY,IAAI7V,EAAEmB,MAAN,CAAa;gBACPnB,EAAEoB,MADK;qBAEP,IAAIpB,EAAE+C,QAAN,CAAe/C,EAAEoB,MAAjB,EAAyB;aAAA,EAC9B,SAD8B,EAE3C,oBAF2C,EAErB,kBAFqB;GAAzB;CAFN,CAAhB;;AAQA,WAAe,IAAIpB,EAAEmB,MAAN,CAAa;WACdnB,EAAEoB,MADY;aAEdpB,EAAEoB,MAFY;cAGd,IAAIpB,EAAE6B,KAAN,CAAYgU,SAAZ,EAAuB,WAAvB,CAHc;CAAb,CAAf;;ACRA,IAAIC,eAAe,IAAI9V,EAAEmB,MAAN,CAAa;aACdnB,EAAE0B,KADY;gBAEd1B,EAAE0B,KAFY;UAGd,IAAI1B,EAAE6B,KAAN,CAAY7B,EAAE0B,KAAd,EAAqB;WAAKa,EAAEU,MAAF,CAASA,MAAT,CAAgBG,IAAhB,CAAqBC,SAA1B;GAArB;CAHC,CAAnB;;;AAOA,WAAe,IAAIrD,EAAEmB,MAAN,CAAa;WACNnB,EAAEoB,MADI;cAENpB,EAAEqB,KAFI;oBAGNrB,EAAE8C,KAHI;WAIN,IAAI9C,EAAE6B,KAAN,CAAYiU,YAAZ,EAA0B,YAA1B;CAJP,CAAf;;ACPA,IAAIC,WAAW,IAAI/V,EAAEmB,MAAN,CAAa;QAClBnB,EAAEoB,MADgB;SAElBpB,EAAEoB,MAFgB;SAGlBpB,EAAEqB;CAHG,CAAf;;AAMA,IAAI2U,aAAa,IAAIhW,EAAEmB,MAAN,CAAa;cAChBnB,EAAEoB,MADc;WAEnBpB,EAAEoB,MAFiB;WAGnB,IAAIpB,EAAE6B,KAAN,CAAY7B,EAAEoB,MAAd,EAAsB,SAAtB,CAHmB;OAIvB;WAAKmB,EAAEsD,OAAF,CAAU/F,MAAV,IAAoBuC,KAAKC,GAAL,CAAStB,KAAT,CAAeqB,IAAf,EAAqBE,EAAEsD,OAAvB,CAAzB;;CAJU,CAAjB;;AAOA,IAAIoQ,aAAa,IAAIjW,EAAEmB,MAAN,CAAa;OACvB;WAAKoB,EAAEiR,YAAF,GAAiBjR,EAAEU,MAAF,CAASA,MAAT,CAAgBuQ,YAAtC;GADuB;OAEvB;WAAK,CAAE,CAACjR,EAAEU,MAAF,CAASiT,SAAT,CAAmB5T,GAAnB,GAAyBC,EAAE4T,GAA5B,IAAmC5T,EAAEU,MAAF,CAASmT,QAA7C,GAAyD,CAA1D,KAAgE7T,EAAEU,MAAF,CAASmT,QAAT,GAAoB,CAApF,CAAL;GAFuB;UAGpB,IAAIpW,EAAEoC,SAAN,CAAgBpC,EAAEqB,KAAlB,EAAyB,KAAzB;CAHO,CAAjB;;AAMA,IAAIgV,eAAe,IAAIrW,EAAEmC,eAAN,CAAsB,QAAtB,EAAgC;KAC9C;YACenC,EAAEoB,MADjB;iBAEepB,EAAEoB,MAFjB;mBAGepB,EAAEoB,MAHjB;gBAIepB,EAAEoB,MAJjB;WAKe,IAAIpB,EAAE6B,KAAN,CAAYkU,QAAZ,EAAsB,QAAtB;GAN+B;;KAS9C;cACW/V,EAAEoB,MADb;eAEW,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB4U,UAAxB,EAAoC,EAAC/T,MAAM,QAAP,EAApC,CAFX;gBAGW,IAAIjC,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB4U,UAAxB,EAAoC,EAAC/T,MAAM,QAAP,EAApC,CAHX;WAIW,IAAIjC,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB6U,UAAxB,EAAoC,EAAChU,MAAM,QAAP,EAApC;GAbmC;;KAgB9C;gBACiBjC,EAAEoB,MADnB;oBAEiBpB,EAAE0B,KAFnB;oBAGiB1B,EAAE0B,KAHnB;qBAIiB1B,EAAE0B,KAJnB;WAKiB1B,EAAE0B,KALnB;eAMiB,IAAI1B,EAAE6B,KAAN,CAAY7B,EAAEqB,KAAd,EAAqB,gBAArB,CANjB;eAOiB,IAAIrB,EAAE6B,KAAN,CAAY7B,EAAE0B,KAAd,EAAqB,YAArB,CAPjB;gBAQiB,IAAI1B,EAAE6B,KAAN,CAAY7B,EAAE0B,KAAd,EAAqB,YAArB,CARjB;eASiB,IAAI1B,EAAE6B,KAAN,CAAY7B,EAAE0B,KAAd,EAAqB;aAAKa,EAAE+T,cAAF,GAAmB/T,EAAEgU,eAA1B;KAArB;;CAzBH,CAAnB;;AA6BA,IAAIC,YAAY,IAAIxW,EAAEmC,eAAN,CAAsB,SAAtB,EAAiC;KAC5C;gBACWnC,EAAEoB,MADb;YAEWpB,EAAEoB,MAFb;YAGWpB,EAAE0B,KAHb;cAIW,IAAI1B,EAAE+C,QAAN,CAAe/C,EAAE0B,KAAjB,EAAwB,CAClC,YADkC;aAAA;iBAAA;cAAA;KAAxB,CAJX;cAUW2U,YAVX;aAWQ,IAAIrW,EAAE0C,QAAN,CAAe1C,EAAE0B,KAAjB,EAAwB;aAAKa,EAAEzC,MAAF,GAAWyC,EAAEI,cAAlB;KAAxB;GAZoC;KAc5C;YACW3C,EAAEuB,MADb;cAEW,IAAIvB,EAAE+C,QAAN,CAAe/C,EAAE0B,KAAjB,EAAwB,CAClC,IADkC,EAC5B,IAD4B,EACtB,IADsB,EAChB,IADgB,EACV,IADU,EAElC,WAFkC;iBAAA;cAAA;KAAxB,CAFX;YAQW1B,EAAE0B,KARb;gBASW1B,EAAEoB,MATb;cAUWiV,YAVX;aAWQ,IAAIrW,EAAE0C,QAAN,CAAe1C,EAAE0B,KAAjB,EAAwB;aAAKa,EAAEzC,MAAF,GAAWyC,EAAEI,cAAlB;KAAxB;;CAzBG,CAAhB;;AA6BA,WAAe,IAAI3C,EAAEmC,eAAN,CAAsBnC,EAAEoB,MAAxB,EAAgC;KAC1C;aACWpB,EAAEoB,MADb;YAEW,IAAIpB,EAAE6B,KAAN,CAAY2U,SAAZ,EAAuB,SAAvB;GAH+B;;KAM1C;cACW,IAAIxW,EAAE0C,QAAN,CAAe1C,EAAEoB,MAAjB,CADX;aAEWpB,EAAEuB,MAFb;YAGW,IAAIvB,EAAE6B,KAAN,CAAY2U,SAAZ,EAAuB,SAAvB;;CATD,CAAf;;AC7EA;;;AAGA,WAAe,IAAIxW,EAAEmB,MAAN,CAAa;WACdnB,EAAEoB,MADY;aAEdpB,EAAEoB,MAFY;SAGd,IAAIpB,EAAE6B,KAAN,CAAY7B,EAAE0B,KAAd,EAAqB,WAArB;CAHC,CAAf;;ACHA;;AAEA,WAAe,IAAI1B,EAAEmB,MAAN,CAAa;WACJnB,EAAEoB,MADE;cAEJpB,EAAEuB,MAFE;SAGJvB,EAAEoB,MAHE;WAIJpB,EAAEoB,MAJE;SAKJpB,EAAEoB,MALE;cAMJpB,EAAEoB,MANE;aAOJpB,EAAEoB,MAPE;aAQJpB,EAAEoB,MARE;YASJ,IAAIpB,EAAE8D,MAAN,CAAa,EAAb,CATI;uBAUJ,IAAI9D,EAAE8D,MAAN,CAAa,CAAb,CAVI;YAWJ,IAAI9D,EAAE8D,MAAN,CAAa,CAAb,CAXI;gBAYJ,IAAI9D,EAAE8D,MAAN,CAAa,CAAb,CAZI;aAaJ,IAAI9D,EAAE8D,MAAN,CAAa,CAAb,CAbI;cAcJ9D,EAAE0B,KAdE;YAeJ,IAAI1B,EAAE0C,QAAN,CAAe1C,EAAE0B,KAAjB;CAfT,CAAf;;ACFA;;;AAGA,IAAI+U,QAAQ,IAAIzW,EAAEmB,MAAN,CAAa;YACPnB,EAAE0B,KADK;UAEP1B,EAAE0B,KAFK;eAGP1B,EAAE0B,KAHK;aAIP1B,EAAE0B,KAJK;CAAb,CAAZ;;AAOA,IAAIgV,SAAS,IAAI1W,EAAEmB,MAAN,CAAa;cACRnB,EAAEoB,MADM;QAERpB,EAAEqB,KAFM;QAGRrB,EAAEqB,KAHM;CAAb,CAAb;;AAMA,IAAIsV,YAAY,IAAI3W,EAAEmB,MAAN,CAAa;QACXnB,EAAEoB,MADS;WAEXpB,EAAE0B,KAFS;SAGX1B,EAAE0B,KAHS;WAIX,IAAI1B,EAAE6B,KAAN,CAAY6U,MAAZ,EAAoB,MAApB,CAJW;CAAb,CAAhB;;AAOA,WAAe,IAAI1W,EAAEmB,MAAN,CAAa;WACVnB,EAAEoB,MADQ;WAEVpB,EAAEoB,MAFQ;aAGVpB,EAAEoB,MAHQ;eAIV,IAAIpB,EAAE6B,KAAN,CAAY4U,KAAZ,EAAmB,WAAnB,CAJU;WAKV,IAAIzW,EAAE6B,KAAN,CAAY7B,EAAEoB,MAAd,EAAsB,WAAtB,CALU;UAMV,IAAIpB,EAAE6B,KAAN,CAAY8U,SAAZ,EAAuB,SAAvB,CANU;CAAb,CAAf;;ACvBA;AACA,WAAe,IAAI3W,EAAEmB,MAAN,CAAa;WACFnB,EAAEoB,MADA;UAEFpB,EAAEqB,KAFA;WAGFrB,EAAEqB,KAHA;WAIFrB,EAAEqB,KAJA;oBAKFrB,EAAEqB,KALA;qBAMFrB,EAAEqB,KANA;wBAOFrB,EAAEqB,KAPA;cAQFrB,EAAEqB,KARA;kBASFrB,EAAEqB,KATA;iBAUFrB,EAAEqB,KAVA;eAWFrB,EAAEqB,KAXA;YAYF,IAAIrB,EAAE0C,QAAN,CAAe1C,EAAEqB,KAAjB,EAAwB,CAAxB,CAZE;oBAaFrB,EAAEqB,KAbA;mBAcFrB,EAAEoB,MAdA;CAAb,CAAf;;ACDA,IAAIwV,YAAY,IAAI5W,EAAEmB,MAAN,CAAa;WAClBnB,EAAEoB,MADgB;WAElBpB,EAAEqB,KAFgB;CAAb,CAAhB;;;AAMA,WAAe,IAAIrB,EAAEmB,MAAN,CAAa;WAChB,IAAInB,EAAEoC,SAAN,CAAgBwU,SAAhB,EAA2B;WAAKrU,EAAEU,MAAF,CAAS4T,IAAT,CAAc1T,eAAnB;GAA3B,CADgB;YAEhB,IAAInD,EAAEoC,SAAN,CAAgBpC,EAAEqB,KAAlB,EAAyB;WAAKkB,EAAEU,MAAF,CAASG,IAAT,CAAcC,SAAd,GAA0Bd,EAAEU,MAAF,CAAS4T,IAAT,CAAc1T,eAA7C;GAAzB;CAFG,CAAf;;ACNA,IAAI2T,YAAY,IAAI9W,EAAEoM,KAAN,CAAY,EAAZ,EAAgB,IAAhB,EAAsB,EAAtB,CAAhB;;AAEA,IAAI2K,iBAAiB,IAAI/W,EAAEmB,MAAN,CAAa;aACrB2V,SADqB;WAEvBA;CAFU,CAArB;;AAKA,IAAIE,UAAU,IAAIhX,EAAEmB,MAAN,CAAa;aACdnB,EAAEoB,MADY;kBAET,IAAIpB,EAAE6B,KAAN,CAAYkV,cAAZ,EAA4B,WAA5B;CAFJ,CAAd;;AAKA,WAAe,IAAI/W,EAAEmB,MAAN,CAAa;WACjBnB,EAAE2F,OADe;aAEf3F,EAAEuB,MAFa;WAGjB,IAAIvB,EAAE6B,KAAN,CAAYmV,OAAZ,EAAqB,WAArB;CAHI,CAAf;;ICZMC;kCACQhV,IAAZ,EAAkBoC,MAAlB,EAA0BpB,MAA1B,EAAkC;;;SAC3BhB,IAAL,GAAYA,IAAZ;SACKoC,MAAL,GAAcA,MAAd;SACKpB,MAAL,GAAcA,MAAd;SACKiU,IAAL,GAAY,KAAK7S,MAAL,CAAYmC,GAAxB;SACK2Q,MAAL,GAAc,EAAd;;;mCAGFC,2BAAQ1J,OAAO;QACT,KAAKyJ,MAAL,CAAYzJ,KAAZ,KAAsB,IAA1B,EAAgC;UAC1BlH,MAAM,KAAKnC,MAAL,CAAYmC,GAAtB;WACKnC,MAAL,CAAYmC,GAAZ,GAAkB,KAAK0Q,IAAL,GAAY,KAAKjV,IAAL,CAAUuD,IAAV,CAAe,IAAf,EAAqB,KAAKvC,MAA1B,IAAoCyK,KAAlE;WACKyJ,MAAL,CAAYzJ,KAAZ,IAAqB,KAAKzL,IAAL,CAAUiE,MAAV,CAAiB,KAAK7B,MAAtB,EAA8B,KAAKpB,MAAnC,CAArB;WACKoB,MAAL,CAAYmC,GAAZ,GAAkBA,GAAlB;;;WAGK,KAAK2Q,MAAL,CAAYzJ,KAAZ,CAAP;;;mCAGF2J,6BAAU;gCACkB,KAAKpV,IAAL,CAAUqV,WAAV,CAAsBC,IAAhD;;;;;;AAIJ,IAAaC,cAAb;;;0BACcvV,IAAZ,EAAkB;;;4CAChB,oBAAMA,IAAN,EAAY,CAAZ,CADgB;;;2BAIlBiE,MALF,mBAKS7B,MALT,EAKiBpB,MALjB,EAKyB;WACd,IAAIgU,sBAAJ,CAA2B,KAAKhV,IAAhC,EAAsCoC,MAAtC,EAA8CpB,MAA9C,CAAP;GANJ;;;EAAoCjD,EAAE6B,KAAtC;;AAUA,AAAO,IAAI4V,cAAc,SAAdA,WAAc,GAA+B;MAAtBC,SAAsB,uEAAV1X,EAAEoB,MAAQ;;;MAEhDuW,MAFgD;oBAGxC1V,IAAZ,EAAkB;;;WACXA,IAAL,GAAYA,IAAZ;;;qBAGFiE,MAPoD,mBAO7C7B,MAP6C,EAOrC2B,GAPqC,EAOhC;YACZA,IAAI/C,MAAJ,CAAWA,MAAjB;aACO,KAAKhB,IAAL,CAAUiE,MAAV,CAAiB7B,MAAjB,EAAyB2B,GAAzB,CAAP;KATkD;;qBAYpDR,IAZoD,iBAY/CP,GAZ+C,EAY1Ce,GAZ0C,EAYrC;YACPA,IAAI/C,MAAJ,CAAWA,MAAjB;aACO,KAAKhB,IAAL,CAAUuD,IAAV,CAAeP,GAAf,EAAoBe,GAApB,CAAP;KAdkD;;qBAiBpDgB,MAjBoD,mBAiB7C3C,MAjB6C,EAiBrCY,GAjBqC,EAiBhCe,GAjBgC,EAiB3B;YACjBA,IAAI/C,MAAJ,CAAWA,MAAjB;aACO,KAAKhB,IAAL,CAAU+E,MAAV,CAAiB3C,MAAjB,EAAyBY,GAAzB,EAA8Be,GAA9B,CAAP;KAnBkD;;;;;cAuB1C,IAAI2R,MAAJ,CAAWD,SAAX,CAAZ;;MAEIE,qBAAqB,IAAI5X,EAAEmB,MAAN,CAAa;cAC1BnB,EAAEoB,MADwB;YAE5BpB,EAAEoB,MAF0B;iBAGvBpB,EAAEoB,MAHqB;mBAIrBpB,EAAEoB,MAJmB;gBAKxBpB,EAAEoB;GALS,CAAzB;;MAQIyW,sBAAsB,IAAI7X,EAAEmB,MAAN,CAAa;eAC1BnB,EAAEoB,MADwB;gBAEzBpB,EAAEoB,MAFuB;WAG9BsW;GAHiB,CAA1B;;MAMII,qBAAqB,IAAI9X,EAAEmB,MAAN,CAAa;eACzBnB,EAAEoB,MADuB;gBAExBpB,EAAEoB,MAFsB;YAG5B,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB,IAAIpB,EAAE6B,KAAN,CAAY6V,SAAZ,EAAuB;aAAKnV,EAAEwV,SAAF,GAAcxV,EAAEyV,UAAhB,GAA6B,CAAlC;KAAvB,CAAxB,EAAqF,EAAC/V,MAAM,QAAP,EAArF;GAHe,CAAzB;;MAMIgW,eAAe,IAAIjY,EAAEmB,MAAN,CAAa;WACvBnB,EAAEoB,MADqB;WAEvBsW;GAFU,CAAnB;;SAKO,IAAI1X,EAAEmC,eAAN,CAAsBnC,EAAEoB,MAAxB,EAAgC;OAClC;cACO,IAAIoW,cAAJ,CAAmBE,SAAnB,CADP;KADkC;OAIlC;0BACmBE,kBADnB;gBAES,IAAI5X,EAAE6B,KAAN,CAAYgW,mBAAZ,EAAiC;eAAKtV,EAAE2V,kBAAF,CAAqBC,MAA1B;OAAjC;KANyB;OAQlC;0BACmBP,kBADnB;gBAES,IAAI5X,EAAE6B,KAAN,CAAYiW,kBAAZ,EAAgC;eAAKvV,EAAE2V,kBAAF,CAAqBC,MAA1B;OAAhC;KAVyB;OAYlC;0BACmBP,kBADnB;gBAES,IAAI5X,EAAE6B,KAAN,CAAYoW,YAAZ,EAA0B;eAAK1V,EAAE2V,kBAAF,CAAqBC,MAA1B;OAA1B;KAdyB;OAgBlC;kBACWnY,EAAEoB,MADb;aAEMpB,EAAEoB,MAFR;cAGO,IAAIpB,EAAE6B,KAAN,CAAY6V,SAAZ,EAAuB,OAAvB;;GAnBL,CAAP;CAlDK;;AA0EP,AAAO,SAASU,UAAT,GAA2D;MAAvCC,SAAuC,uEAA3B,EAA2B;MAAvBC,UAAuB,uEAAVtY,EAAEoB,MAAQ;;MAC5DqU,QAAQ,eAAc;cACdzV,EAAEoB,MADY;WAEjBpB,EAAEoB;GAFC,EAGTiX,SAHS,CAAZ;;MAKIE,QAAQ,IAAIvY,EAAEmB,MAAN,CAAasU,KAAb,CAAZ;MACI+C,aAAa,IAAIhB,cAAJ,CAAmB,IAAIxX,EAAE6B,KAAN,CAAY7B,EAAEoB,MAAd,EAAsB;WAAKmB,EAAEkW,QAAP;GAAtB,CAAnB,CAAjB;;MAEIC,cAAc,IAAI1Y,EAAEmB,MAAN,CAAa;cACnBnB,EAAEuB,MADiB;gBAEjB,IAAIvB,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwB,IAAIkW,WAAJ,CAAgBa,UAAhB,CAAxB,CAFiB;gBAGjB,IAAItY,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwBiX,UAAxB,CAHiB;gBAIjB,IAAIxY,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwB,IAAIiW,cAAJ,CAAmBe,KAAnB,CAAxB;GAJI,CAAlB;;SAOOG,WAAP;;;;AAIF,AAAO,SAASC,WAAT,GAA4D;MAAvCN,SAAuC,uEAA3B,EAA2B;MAAvBC,UAAuB,uEAAVtY,EAAEoB,MAAQ;;MAC7DwX,mBAAmB,IAAI5Y,EAAEmB,MAAN,CAAa;WAAA,qBACxB;aAAS,CAAP;KADsB;;gBAEtBnB,EAAEoB,MAFoB;YAG1B,IAAIpB,EAAE6B,KAAN,CAAY7B,EAAE0B,KAAd,EAAqB1B,EAAEoB,MAAvB;GAHa,CAAvB;;MAMIqU,QAAQ,eAAc;oBACRzV,EAAEoB,MADM;;cAGd;aAAK,CAACmB,EAAEsW,cAAF,IAAoBtW,EAAEU,MAAF,CAAS6V,UAAT,CAAoB5B,IAApB,GAA2B3U,EAAEU,MAAF,CAASuQ,YAAxD,CAAD,IAA0EjR,EAAEU,MAAF,CAASwV,QAAxF;KAHc;WAIjBzY,EAAEoB;GAJC,EAKTiX,SALS,CAAZ;;MAOIE,QAAQ,IAAIvY,EAAEmB,MAAN,CAAasU,KAAb,CAAZ;MACI+C,aAAa,IAAIhB,cAAJ,CAAmB,IAAIxX,EAAE6B,KAAN,CAAY7B,EAAE0B,KAAd,EAAqB;WAAKa,EAAEkW,QAAP;GAArB,CAAnB,CAAjB;;MAEIM,eAAe,IAAI/Y,EAAEmB,MAAN,CAAa;cACpBnB,EAAEoB,MADkB;gBAElB,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBwX,gBAAxB,CAFkB;gBAGlB,IAAI5Y,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBoX,UAAxB,CAHkB;gBAIlB,IAAIxY,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB,IAAIoW,cAAJ,CAAmBe,KAAnB,CAAxB;GAJK,CAAnB;;SAOOQ,YAAP;;;ACxJF,IAAIC,eAAe,IAAIhZ,EAAEmC,eAAN,CAAsB,QAAtB,EAAgC;KAC9C;YACO,IAAInC,EAAE6B,KAAN,CAAY7B,EAAEqB,KAAd,EAAqB,EAArB;GAFuC;;KAK9C;YACO,IAAIrB,EAAE6B,KAAN,CAAY7B,EAAEqB,KAAd,EAAqB,EAArB,CADP;iBAEY,IAAIoW,WAAJ,CAAgBzX,EAAEoB,MAAlB;GAPkC;;KAU9C;mBACcpB,EAAEoB,MADhB;mBAEc,IAAIpB,EAAE6B,KAAN,CAAY7B,EAAEoB,MAAd,EAAsB,EAAtB;GAZgC;;KAe9C;mBACcpB,EAAEoB,MADhB;mBAEc,IAAIpB,EAAE6B,KAAN,CAAY7B,EAAEoB,MAAd,EAAsB,EAAtB,CAFd;iBAGY,IAAIqW,WAAJ,CAAgBzX,EAAEoB,MAAlB;;CAlBE,CAAnB;;AAsBA,WAAe,IAAIpB,EAAEmB,MAAN,CAAa;WACjBnB,EAAE2F,OADe;UAElB3F,EAAEoB,MAFgB;mBAGTpB,EAAEoB,MAHO;YAIhB4X;CAJG,CAAf;;ACvBA,IAAIC,UAAU,IAAIjZ,EAAEmB,MAAN,CAAa;WAChBnB,EAAEoB,MADc;aAEdpB,EAAEqB,KAFY;QAGnB;WAAKkB,EAAEU,MAAF,CAASA,MAAT,CAAgBA,MAAhB,CAAuBsU,IAAvB,CAA4BjT,OAA5B,CAAoC4U,YAApC,CAAiD3W,EAAEuO,SAAnD,CAAL;;CAHM,CAAd;;AAMA,IAAIqI,cAAc,IAAInZ,EAAEmB,MAAN,CAAa;WACpBnB,EAAEoB,MADkB;aAElBpB,EAAEoB,MAFgB;gBAGf,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwB,IAAIvB,EAAE6B,KAAN,CAAYoX,OAAZ,EAAqB,WAArB,CAAxB,EAA2D,EAAEhX,MAAM,QAAR,EAA3D,CAHe;gBAIf,IAAIjC,EAAE+C,QAAN,CAAe/C,EAAE0B,KAAjB,EAAwB,CACpC,IADoC,EAC9B,IAD8B,EACxB,IADwB,EAClB,IADkB,EACZ,IADY,EACN,IADM,EAEpC,YAFoC,EAEtB,WAFsB,CAAxB,CAJe;kBAQb1B,EAAE0B,KARW;aASlB1B,EAAEqB,KATgB;QAUvB;WAAKkB,EAAEU,MAAF,CAASA,MAAT,CAAgBsU,IAAhB,CAAqBjT,OAArB,CAA6B4U,YAA7B,CAA0C3W,EAAEuO,SAA5C,CAAL;;CAVU,CAAlB;;AAaA,WAAe,IAAI9Q,EAAEmB,MAAN,CAAa;WACjBnB,EAAE2F,OADe;oBAER3F,EAAEoB,MAFM;aAGf,IAAIpB,EAAE0C,QAAN,CAAe1C,EAAEoB,MAAjB,CAHe;aAIf,IAAIpB,EAAE0C,QAAN,CAAe1C,EAAEuB,MAAjB,CAJe;gBAKZ,IAAIvB,EAAE6B,KAAN,CAAYsX,WAAZ,EAAyB,kBAAzB;CALD,CAAf;;ACnBA,IAAIxG,SAAO,IAAI3S,EAAEmB,MAAN,CAAa;WACb,IAAInB,EAAE8D,MAAN,CAAa,CAAb,CADa;YAEZ9D,EAAE2F,OAFU;gBAGR3F,EAAE2F,OAHM;YAIZ3F,EAAE2F,OAJU;SAKf3F,EAAEoB,MALa;UAMdpB,EAAEoB,MANY;QAOhB;WAAKmB,EAAEU,MAAF,CAASA,MAAT,CAAgBsU,IAAhB,CAAqBjT,OAArB,CAA6B4U,YAA7B,CAA0C3W,EAAEoC,MAA5C,CAAL;;CAPG,CAAX;;AAUA,IAAIyU,WAAW,IAAIpZ,EAAEmB,MAAN,CAAa;UAClBnB,EAAEoB,MADgB;QAEpB;WAAKmB,EAAEU,MAAF,CAASA,MAAT,CAAgBsU,IAAhB,CAAqBjT,OAArB,CAA6B4U,YAA7B,CAA0C3W,EAAEoC,MAA5C,CAAL;GAFoB;SAGnB3E,EAAEoB,MAHiB;SAInB,IAAIpB,EAAE6B,KAAN,CAAY7B,EAAE2F,OAAd,EAAuB;WAAKpD,EAAEU,MAAF,CAASoW,SAAd;GAAvB;CAJM,CAAf;;AAOA,WAAe,IAAIrZ,EAAEmB,MAAN,CAAa;WACjBnB,EAAE2F,OADe;gBAEZ3F,EAAEoB,MAFU;kBAGVpB,EAAEoB,MAHQ;aAIfpB,EAAEoB,MAJa;YAKhBpB,EAAEoB,MALc;iBAMXpB,EAAEoB,MANS;gBAOZpB,EAAEoB,MAPU;QAQpB,IAAIpB,EAAE6B,KAAN,CAAY8Q,MAAZ,EAAkB,WAAlB,CARoB;YAShB,IAAI3S,EAAE6B,KAAN,CAAYuX,QAAZ,EAAsB,eAAtB;CATG,CAAf;;ACjBA,IAAItC,cAAY,IAAI9W,EAAEoM,KAAN,CAAY,EAAZ,EAAgB,IAAhB,EAAsB,EAAtB,CAAhB;;IACMkN;;;;;SACGpT,yBAAO7B,QAAQpB,QAAQ;;;;WAIrBA,OAAOsW,KAAP,GACHlV,OAAO8B,YAAP,EADG,GAEH9B,OAAO+B,YAAP,KAAwB,CAF5B;;;;;;AAMJ,IAAIoT,OAAO,IAAIxZ,EAAEmB,MAAN,CAAa;WACbnB,EAAEoB,MADW;YAEZ,IAAIpB,EAAE0C,QAAN,CAAe1C,EAAEoB,MAAjB,CAFY;aAGXpB,EAAEoB,MAHS;oBAIJpB,EAAEoB,MAJE;gBAKR,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwB,IAAIvB,EAAE6B,KAAN,CAAY,IAAI7B,EAAE6B,KAAN,CAAYiV,WAAZ,EAAuB,WAAvB,CAAZ,EAAiD,kBAAjD,CAAxB,CALQ;cAMV9W,EAAEoB,MANQ;SAOfpB,EAAEoB,MAPa;gBAQRpB,EAAEuB,MARM;WASb,IAAIvB,EAAE6B,KAAN,CAAY,IAAI7B,EAAEgC,OAAN,CAAcsX,MAAd,EAAsB,MAAtB,EAA8B,EAAEvV,YAAY,cAAd,EAA8BC,WAAW,KAAzC,EAA9B,CAAZ,EAA6F;WAAKzB,EAAEmJ,UAAF,GAAe,CAApB;GAA7F;CATA,CAAX,CAYA;;ACvBA,IAAIsK,eAAa,IAAIhW,EAAEmB,MAAN,CAAa;UACpBnB,EAAEoB,MADkB;YAElBpB,EAAEoB,MAFgB;mBAGXpB,EAAEuB,MAHS;cAIhB,IAAIoX,WAAJ;CAJG,CAAjB;;AAOA,IAAIc,mBAAmB,IAAIzZ,EAAEmB,MAAN,CAAa;aACvBnB,EAAEuB,MADqB;mBAEjBvB,EAAE2F,OAFe;qBAGf3F,EAAE2F,OAHa;kBAIlB3F,EAAE2F,OAJgB;oBAKhB3F,EAAE2F,OALc;aAMvB3F,EAAEoB,MANqB;eAOrBpB,EAAEoB;CAPM,CAAvB;;AAUA,IAAIsY,oBAAoB,IAAI1Z,EAAE6B,KAAN,CAAY4X,gBAAZ,EAA8BzZ,EAAEuB,MAAhC,CAAxB;;AAEA,IAAIoY,aAAa,IAAI3Z,EAAEmC,eAAN,CAAsB,YAAtB,EAAoC;KAChD;gBACWnC,EAAE2F,OADb;gBAEW3F,EAAE2F,OAFb;WAGM3F,EAAEoB,MAHR;YAIO,IAAIpB,EAAE6B,KAAN,CAAY7B,EAAEoB,MAAd,EAAsBpB,EAAEoB,MAAxB;GALyC;;KAQhD;cACSpB,EAAEoB;GATqC;;KAYhD;oBACepB,EAAE2F,OADjB;cAES3F,EAAEoB,MAFX;gBAGWpB,EAAEoB;GAfmC;;KAkBhD,EAlBgD;;KAoBhD;mBACcpB,EAAEuB,MADhB;kBAEavB,EAAE2F,OAFf;oBAGe3F,EAAE2F,OAHjB;kBAIa3F,EAAE2F;GAxBiC;;KA2BhD;WACM3F,EAAEoB,MADR;WAEMpB,EAAEoB;;CA7BI,CAAjB;;AAiCA,IAAIwY,SAAS,IAAI5Z,EAAEmB,MAAN,CAAa;eACXnB,EAAEoB,MADS;cAEZpB,EAAEoB,MAFU;gBAGVpB,EAAEuB,MAHQ;cAIZoY,UAJY;WAKf,IAAI3Z,EAAE0C,QAAN,CAAe1C,EAAE0B,KAAjB,EAAwB;WAAKa,EAAEsX,YAAF,GAAiBtX,EAAEI,cAAxB;GAAxB;CALE,CAAb;;AAQA,IAAImX,yBAAyB,IAAI9Z,EAAE6B,KAAN,CAAY+X,MAAZ,EAAoB5Z,EAAEuB,MAAtB,CAA7B;AACA,IAAIwY,wBAAwB,IAAI/Z,EAAEmB,MAAN,CAAa;eAC1B,IAAIsW,WAAJ,CAAgB,IAAIzX,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB0Y,sBAAxB,CAAhB;CADa,CAA5B;;AAIA,IAAIE,qBAAqB,IAAIha,EAAEmB,MAAN,CAAa;cACxB,IAAInB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB4U,YAAxB,EAAoC,EAAE/T,MAAM,QAAR,EAApC,CADwB;aAEzBjC,EAAEoB,MAFuB;yBAGb,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB2Y,qBAAxB,EAA+C,EAAE9X,MAAM,QAAR,EAA/C,CAHa;sBAIhB,IAAIwV,WAAJ,CAAgB,IAAIzX,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwBsY,iBAAxB,EAA2C,EAAEzX,MAAM,QAAR,EAAkB8B,YAAY,WAA9B,EAA3C,CAAhB;CAJG,CAAzB;;AAOA,WAAe,IAAI/D,EAAEmB,MAAN,CAAa;WACjBnB,EAAEuB,MADe;UAElBvB,EAAEoB,MAFgB;cAGd,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB4Y,kBAAxB,CAHc;YAIhB,IAAIha,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB4Y,kBAAxB;CAJG,CAAf;;ACxEA,IAAIC,eAAe;UACTja,EAAEoB;CADZ;;AAIA,IAAI8Y,iBAAiB;aACRla,EAAEoB,MADM;gBAELpB,EAAEoB;CAFlB;;AAKA,IAAI+Y,gBAAgB;sBACEna,EAAEoB,MADJ;qBAECpB,EAAEoB;CAFvB;;AAKA,IAAIgZ,oBAAoB,IAAIpa,EAAEmB,MAAN,CAAa;SAC5B,IAAIqW,cAAJ,CAAmB,IAAIxX,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwB,IAAIkW,WAAJ,EAAxB,CAAnB;CADe,CAAxB;;AAIA,IAAI4C,eAAe,IAAIra,EAAEmC,eAAN,CAAsB,MAAtB,EAA8B;KAC5C;gBACW,IAAIiW,UAAJ;GAFiC;;KAK5C;gBACW,IAAIA,UAAJ,CAAe8B,cAAf,CADX;uBAEkB,IAAIla,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwB6Y,iBAAxB;GAP0B;;KAU5C;gBACW,IAAIhC,UAAJ,CAAe6B,YAAf,CADX;qBAEgB,IAAIja,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwB,IAAIiW,cAAJ,CAAmBxX,EAAEuB,MAArB,CAAxB,CAFhB;gBAGW,IAAIvB,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwB,IAAIiW,cAAJ,CAAmBxX,EAAEoB,MAArB,CAAxB,CAHX;kBAIa,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwB,IAAIiW,cAAJ,CAAmBxX,EAAEoB,MAArB,CAAxB;GAd+B;;KAiB5C;iBACY,IAAIqW,WAAJ;GAlBgC;;KAqB5C;gBACW,IAAIW,UAAJ,CAAe+B,aAAf,CADX;sBAEiB,IAAIna,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwB,IAAIiW,cAAJ,CAAmBxX,EAAEoB,MAArB,CAAxB;;CAvBH,CAAnB;;AA2BA,IAAIkZ,WAAW,IAAIta,EAAEmB,MAAN,CAAa;UAClBnB,EAAEuB,MADgB;YAEhBvB,EAAEyB,MAFc;QAGpBzB,EAAE0B,KAHkB;mBAIT1B,EAAEuB,MAJO;SAKnB8Y,YALmB;WAMjB,IAAIra,EAAE0C,QAAN,CAAe1C,EAAE0B,KAAjB,EAAwB;WAAKa,EAAEzC,MAAF,GAAWyC,EAAEI,cAAlB;GAAxB;CANI,CAAf;;AASA,IAAI4X,eAAe,IAAIva,EAAEmB,MAAN,CAAa;eACdnB,EAAEoB,MADY;kBAEdpB,EAAEoB,MAFY;eAGdpB,EAAEuB,MAHY;gBAIdvB,EAAEuB;CAJD,CAAnB;;AAOA,IAAIiZ,YAAY,IAAIxa,EAAEmB,MAAN,CAAa;gBACTnB,EAAEuB,MADO;eAETvB,EAAEuB,MAFO;mBAGTvB,EAAEuB,MAHO;cAITvB,EAAEuB,MAJO;YAKT,IAAIvB,EAAE6B,KAAN,CAAY0Y,YAAZ,EAA0B,iBAA1B,CALS;aAMT,IAAIva,EAAE6B,KAAN,CAAYyY,QAAZ,EAAsB,YAAtB;CANJ,CAAhB;;AASA,WAAe,IAAIta,EAAEmB,MAAN,CAAa;WAChBnB,EAAEoB,MADc;UAEhB,IAAIpB,EAAE0C,QAAN,CAAe1C,EAAEoB,MAAjB,CAFgB;WAGhBpB,EAAEuB,MAHc;UAIhB,IAAIvB,EAAE6B,KAAN,CAAY2Y,SAAZ,EAAuB,SAAvB;CAJG,CAAf;;ACtEA,IAAIC,gBAAgB,IAAIza,EAAEmB,MAAN,CAAa;QACzBnB,EAAEqB,KADuB;OAE1BrB,EAAEqB,KAFwB;SAGxBrB,EAAEqB,KAHsB;UAIvBrB,EAAEqB;CAJQ,CAApB;;AAOA,WAAe,IAAIrB,EAAEmB,MAAN,CAAa;WACjBnB,EAAE2F,OADe;UAElB3F,EAAEoB,MAFgB;eAGb,IAAIqW,WAAJ,CAAgBgD,aAAhB;CAHA,CAAf;;ACVA,IAAIC,SAAS,EAAb;AACA,AAEA;AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AAEAA,OAAOC,IAAP,GAAcA,IAAd;AACAD,OAAOE,IAAP,GAAcA,IAAd;AACAF,OAAOxX,IAAP,GAAcA,IAAd;AACAwX,OAAOG,IAAP,GAAcA,IAAd;AACAH,OAAOtX,IAAP,GAAcA,IAAd;AACAsX,OAAOnD,IAAP,GAAcA,SAAd;AACAmD,OAAO,MAAP,IAAiBjV,GAAjB;AACAiV,OAAOI,IAAP,GAAcA,IAAd;;;AAIA,AACA,AACA,AACA,AACA,AAEAJ,OAAOK,IAAP,GAAcA,IAAd;AACAL,OAAO9U,IAAP,GAAcA,IAAd;AACA8U,OAAOM,IAAP,GAAcA,IAAd;AACAN,OAAO,MAAP,IAAiBO,GAAjB;AACAP,OAAOQ,IAAP,GAAcA,IAAd;;;AAIA,AACA,AAEAR,OAAO,MAAP,IAAiBvL,OAAjB;AACAuL,OAAO,MAAP,IAAiBvL,OAAjB;AACAuL,OAAOS,IAAP,GAAcA,IAAd;;;AAIA,AACA,AACA,AACA,AAEAT,OAAOU,IAAP,GAAcA,IAAd;AACAV,OAAOW,IAAP,GAAcX,OAAOU,IAArB;AACAV,OAAOY,IAAP,GAAcA,IAAd;AACAZ,OAAOa,IAAP,GAAcA,IAAd;AACAb,OAAOc,IAAP,GAAcA,IAAd;;;AAIA,AACA,AACA,AACA,AACA,AAEAd,OAAOe,IAAP,GAAcA,IAAd;AACAf,OAAOgB,IAAP,GAAcA,IAAd;AACAhB,OAAOiB,IAAP,GAAcA,IAAd;AACAjB,OAAOkB,IAAP,GAAcA,IAAd;AACAlB,OAAOmB,IAAP,GAAcA,IAAd;;;AAGA,AAEAnB,OAAOoB,IAAP,GAAcA,IAAd;;;AAGA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AAEApB,OAAOqB,IAAP,GAAcA,IAAd;AACArB,OAAOsB,IAAP,GAAcA,IAAd;AACAtB,OAAOuB,IAAP,GAAcA,IAAd;AACAvB,OAAOwB,IAAP,GAAcA,IAAd;AACAxB,OAAOyB,IAAP,GAAcA,IAAd;AACAzB,OAAO0B,IAAP,GAAcA,IAAd;AACA1B,OAAO2B,IAAP,GAAcA,IAAd;AACA3B,OAAO7D,IAAP,GAAcA,IAAd;AACA6D,OAAO4B,IAAP,GAAcA,IAAd;;;AAIA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AAEA5B,OAAO6B,IAAP,GAAcA,IAAd;AACA7B,OAAO8B,IAAP,GAAcA,IAAd;AACA9B,OAAO+B,IAAP,GAAcA,IAAd;AACA/B,OAAOgC,IAAP,GAAcA,IAAd;AACAhC,OAAOlB,IAAP,GAAcA,IAAd;AACAkB,OAAOiC,IAAP,GAAcA,IAAd;AACAjC,OAAOkC,IAAP,GAAcA,IAAd;AACAlC,OAAOmC,IAAP,GAAcA,IAAd;;ACjHA,IAAIC,aAAa,IAAI9c,EAAEmB,MAAN,CAAa;OAChB,IAAInB,EAAE8D,MAAN,CAAa,CAAb,CADgB;YAEhB9D,EAAEuB,MAFc;UAGhB,IAAIvB,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwB,MAAxB,EAAgC,EAAEU,MAAM,QAAR,EAAhC,CAHgB;UAIhBjC,EAAEuB;CAJC,CAAjB;;AAOA,IAAIwb,YAAY,IAAI/c,EAAEmB,MAAN,CAAa;OACX,IAAInB,EAAE8D,MAAN,CAAa,CAAb,CADW;aAEX9D,EAAEoB,MAFS;eAGXpB,EAAEoB,MAHS;iBAIXpB,EAAEoB,MAJS;cAKXpB,EAAEoB,MALS;UAMX,IAAIpB,EAAE6B,KAAN,CAAYib,UAAZ,EAAwB,WAAxB;CANF,CAAhB;;AASAC,UAAU3Y,OAAV,GAAoB,YAAW;MACzBsW,SAAS,EAAb;uBACkB,KAAKA,MAAvB,6GAA+B;;;;;;;;;;;;QAAtBsC,KAAsB;;WACtBA,MAAMtY,GAAb,IAAoBsY,KAApB;;;OAGGtC,MAAL,GAAcA,MAAd;CANF;;AASAqC,UAAUjY,SAAV,GAAsB,UAAST,MAAT,EAAiB;MACjCqW,WAAS,EAAb;OACK,IAAIhW,GAAT,IAAgB,KAAKgW,MAArB,EAA6B;QACvBsC,QAAQ,KAAKtC,MAAL,CAAYhW,GAAZ,CAAZ;QACIsY,KAAJ,EAAW;eACFhe,IAAP,CAAY;aACL0F,GADK;kBAEA,CAFA;gBAGF,IAAI1E,EAAEid,WAAN,CAAkBC,OAAOxY,GAAP,CAAlB,EAA+BsY,KAA/B,CAHE;gBAIFE,OAAOxY,GAAP,EAAYc,IAAZ,CAAiBwX,KAAjB;OAJV;;;;OASCtY,GAAL,GAAW,MAAX;OACKyY,SAAL,GAAiBzC,SAAO5a,MAAxB;OACK4a,MAAL,GAAcA,QAAd;;OAEK0C,WAAL,GAAmB/a,KAAKgb,KAAL,CAAWhb,KAAKib,GAAL,CAAS,KAAKH,SAAd,IAA2B9a,KAAKkb,GAA3C,IAAkD,EAArE;OACKC,aAAL,GAAqBnb,KAAKgb,KAAL,CAAW,KAAKD,WAAL,GAAmB/a,KAAKkb,GAAnC,CAArB;OACKE,UAAL,GAAkB,KAAKN,SAAL,GAAiB,EAAjB,GAAsB,KAAKC,WAA7C;CApBF,CAuBA;;ACnDO,SAASM,YAAT,CAAsB7W,GAAtB,EAA2B8W,GAA3B,EAAgC;MACjCC,MAAM,CAAV;MACItb,MAAMuE,IAAI/G,MAAJ,GAAa,CAAvB;SACO8d,OAAOtb,GAAd,EAAmB;QACbmO,MAAOmN,MAAMtb,GAAP,IAAe,CAAzB;QACI4L,MAAMyP,IAAI9W,IAAI4J,GAAJ,CAAJ,CAAV;;QAEIvC,MAAM,CAAV,EAAa;YACLuC,MAAM,CAAZ;KADF,MAEO,IAAIvC,MAAM,CAAV,EAAa;YACZuC,MAAM,CAAZ;KADK,MAEA;aACEA,GAAP;;;;SAIG,CAAC,CAAR;;;AAGF,AAAO,SAAStC,KAAT,CAAeT,KAAf,EAAsB9G,GAAtB,EAA2B;MAC5BuH,QAAQ,EAAZ;SACOT,QAAQ9G,GAAf,EAAoB;UACZ5H,IAAN,CAAW0O,OAAX;;SAEKS,KAAP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACxBF,AACA,AACA,AACA,AAEA;AACA,IAAI;MACE0P,QAAQnf,QAAQ,YAAR,CAAZ;CADF,CAEE,OAAOgB,GAAP,EAAY;;IAEOoe;yBACPC,SAAZ,EAAuB;;;;SAEhBC,QAAL,GAAgB,IAAhB;SACKrD,IAAL,GAAY,KAAKsD,YAAL,CAAkBF,SAAlB,EAA6B;;KAEtC,CAAD,EAAI,EAAJ,CAFuC,EAGvC,CAAC,CAAD,EAAI,CAAJ,CAHuC,EAIvC,CAAC,CAAD,EAAI,CAAJ,CAJuC;;;KAOtC,CAAD,EAAI,CAAJ,CAPuC,EAQvC,CAAC,CAAD,EAAI,CAAJ,CARuC,EASvC,CAAC,CAAD,EAAI,CAAJ,CATuC,EAUvC,CAAC,CAAD,EAAI,CAAJ,CAVuC,EAWvC,CAAC,CAAD,EAAI,CAAJ,CAXuC,CAA7B,CAAZ;;;;QAgBI,CAAC,KAAKpD,IAAN,IAAckD,KAAlB,EAAyB;2BACNE,UAAUrD,MAA3B,6GAAmC;;;;;;;;;;;;YAA1BC,IAA0B;;YAC7BqD,WAAW1a,YAAYqX,KAAKpX,UAAjB,EAA6BoX,KAAKnX,UAAlC,EAA8CmX,KAAKqC,KAAL,CAAWxY,QAAX,GAAsB,CAApE,CAAf;YACIqZ,MAAMK,cAAN,CAAqBF,QAArB,CAAJ,EAAoC;eAC7BrD,IAAL,GAAYA,KAAKqC,KAAjB;eACKgB,QAAL,GAAgBA,QAAhB;;;;;QAKF,CAAC,KAAKrD,IAAV,EAAgB;YACR,IAAIxa,KAAJ,CAAU,uCAAV,CAAN;;;SAGGge,GAAL,GAAW,KAAKF,YAAL,CAAkBF,SAAlB,EAA6B,CAAC,CAAC,CAAD,EAAI,CAAJ,CAAD,CAA7B,CAAX;QACI,KAAKI,GAAL,IAAY,KAAKA,GAAL,CAASnZ,OAAT,KAAqB,EAArC,EAAyC;WAClCmZ,GAAL,GAAW,IAAX;;;;0BAIJF,qCAAaF,WAAWK,OAAO;0BACQA,KAArC,oHAA4C;;;;;;;;;;;;;UAAlC7a,UAAkC;UAAtBC,UAAsB;;4BACzBua,UAAUrD,MAA3B,oHAAmC;;;;;;;;;;;;YAA1BC,IAA0B;;YAC7BA,KAAKpX,UAAL,KAAoBA,UAApB,IAAkCoX,KAAKnX,UAAL,KAAoBA,UAA1D,EAAsE;iBAC7DmX,KAAKqC,KAAZ;;;;;WAKC,IAAP;;;0BAGFqB,yBAAOC,WAAWC,mBAAmB;;;QAG/B,KAAKP,QAAT,EAAmB;UACbQ,MAAMX,MAAM7W,MAAN,CAAa,sBAAqBsX,SAArB,CAAb,EAA8C,KAAKN,QAAnD,CAAV;kBACY,CAAZ;WACK,IAAIne,IAAI,CAAb,EAAgBA,IAAI2e,IAAI1e,MAAxB,EAAgCD,GAAhC,EAAqC;oBACtBye,aAAa,CAAd,GAAmBE,IAAI3e,CAAJ,CAA/B;;;;KAJJ,MAQO,IAAI0e,iBAAJ,EAAuB;UACxBvO,MAAM,KAAKyO,oBAAL,CAA0BH,SAA1B,EAAqCC,iBAArC,CAAV;UACIvO,GAAJ,EAAS;eACAA,GAAP;;;;QAIA2K,OAAO,KAAKA,IAAhB;YACQA,KAAK3V,OAAb;WACO,CAAL;eACS2V,KAAK+D,OAAL,CAAale,GAAb,CAAiB8d,SAAjB,KAA+B,CAAtC;;WAEG,CAAL;;cACMV,MAAM,CAAV;cACItb,MAAMqY,KAAKgE,QAAL,GAAgB,CAA1B;iBACOf,OAAOtb,GAAd,EAAmB;gBACbmO,MAAOmN,MAAMtb,GAAP,IAAe,CAAzB;;gBAEIgc,YAAY3D,KAAKiE,SAAL,CAAepe,GAAf,CAAmBiQ,GAAnB,CAAhB,EAAyC;oBACjCA,MAAM,CAAZ;aADF,MAEO,IAAI6N,YAAY3D,KAAKkE,OAAL,CAAare,GAAb,CAAiBiQ,GAAjB,CAAhB,EAAuC;oBACtCA,MAAM,CAAZ;aADK,MAEA;kBACDqO,cAAcnE,KAAKoE,aAAL,CAAmBve,GAAnB,CAAuBiQ,GAAvB,CAAlB;kBACIT,aAAJ;;kBAEI8O,gBAAgB,CAApB,EAAuB;uBACfR,YAAY3D,KAAKqE,OAAL,CAAaxe,GAAb,CAAiBiQ,GAAjB,CAAlB;eADF,MAEO;oBACD/C,QAAQoR,cAAc,CAAd,IAAmBR,YAAY3D,KAAKiE,SAAL,CAAepe,GAAf,CAAmBiQ,GAAnB,CAA/B,KAA2DkK,KAAKgE,QAAL,GAAgBlO,GAA3E,CAAZ;uBACMkK,KAAKsE,eAAL,CAAqBze,GAArB,CAAyBkN,KAAzB,KAAmC,CAAzC;oBACIsC,SAAQ,CAAZ,EAAe;0BACN2K,KAAKqE,OAAL,CAAaxe,GAAb,CAAiBiQ,GAAjB,CAAP;;;;qBAIGT,OAAM,MAAb;;;;iBAIG,CAAP;;;WAGG,CAAL;cACQ,IAAI7P,KAAJ,CAAU,qBAAV,CAAN;;WAEG,CAAL;WACK,EAAL;eACSwa,KAAKuE,YAAL,CAAkB1e,GAAlB,CAAsB8d,YAAY3D,KAAKwE,SAAvC,KAAqD,CAA5D;;WAEG,EAAL;WACK,EAAL;;cACMvB,OAAM,CAAV;cACItb,OAAMqY,KAAKyE,OAAL,GAAe,CAAzB;iBACOxB,QAAOtb,IAAd,EAAmB;gBACbmO,OAAOmN,OAAMtb,IAAP,IAAe,CAAzB;gBACI+c,QAAQ1E,KAAK2E,MAAL,CAAY9e,GAAZ,CAAgBiQ,IAAhB,CAAZ;;gBAEI6N,YAAYe,MAAME,aAAtB,EAAqC;qBAC7B9O,OAAM,CAAZ;aADF,MAEO,IAAI6N,YAAYe,MAAMG,WAAtB,EAAmC;qBAClC/O,OAAM,CAAZ;aADK,MAEA;kBACDkK,KAAK3V,OAAL,KAAiB,EAArB,EAAyB;uBAChBqa,MAAMI,OAAN,IAAiBnB,YAAYe,MAAME,aAAnC,CAAP;eADF,MAEO;uBACEF,MAAMI,OAAb;;;;;iBAKC,CAAP;;;WAGG,EAAL;cACQ,IAAItf,KAAJ,CAAU,sBAAV,CAAN;;;cAGM,IAAIA,KAAJ,0BAAiCwa,KAAK3V,OAAtC,CAAN;;;;0BAINyZ,qDAAqBH,WAAWC,mBAAmB;QAC7C,CAAC,KAAKJ,GAAV,EAAe;aACN,CAAP;;;QAGEuB,YAAY,KAAKvB,GAAL,CAASwB,YAAT,CAAsBC,OAAtB,EAAhB;QACI/f,IAAI6d,aAAagC,SAAb,EAAwB;aAAKnB,oBAAoBsB,EAAEC,WAA3B;KAAxB,CAAR;QACIC,MAAML,UAAU7f,CAAV,CAAV;;QAEIA,MAAM,CAAC,CAAP,IAAYkgB,IAAIC,UAApB,EAAgC;UAC1BtC,aAAaqC,IAAIC,UAAjB,EAA6B;eAC/B1B,YAAYuB,EAAEI,iBAAd,GAAkC,CAAC,CAAnC,GAAuC3B,YAAYuB,EAAEI,iBAAF,GAAsBJ,EAAEK,eAApC,GAAsD,CAAC,CAAvD,GAA2D,CADnE;OAA7B,CAAJ;;;QAKErgB,MAAM,CAAC,CAAP,IAAYkgB,IAAII,aAApB,EAAmC;UAC7BzC,aAAaqC,IAAII,aAAjB,EAAgC;eAAK7B,YAAYuB,EAAEO,YAAnB;OAAhC,CAAJ;UACIvgB,MAAM,CAAC,CAAX,EAAc;eACLkgB,IAAII,aAAJ,CAAkBtgB,CAAlB,EAAqB4f,OAA5B;;;;WAIG,CAAP;;;0BAIFY,6CAAkB;QACZ1F,OAAO,KAAKA,IAAhB;YACQA,KAAK3V,OAAb;WACO,CAAL;eACSmJ,MAAM,CAAN,EAASwM,KAAK+D,OAAL,CAAa5e,MAAtB,CAAP;;WAEG,CAAL;;cACMoO,MAAM,EAAV;cACIoS,WAAW3F,KAAKkE,OAAL,CAAae,OAAb,EAAf;eACK,IAAI/f,IAAI,CAAb,EAAgBA,IAAIygB,SAASxgB,MAA7B,EAAqCD,GAArC,EAA0C;gBACpC0gB,OAAOD,SAASzgB,CAAT,IAAc,CAAzB;gBACI8G,QAAQgU,KAAKiE,SAAL,CAAepe,GAAf,CAAmBX,CAAnB,CAAZ;gBACIb,IAAJ,YAAYmP,MAAMxH,KAAN,EAAa4Z,IAAb,CAAZ;;;iBAGKrS,GAAP;;;WAGG,CAAL;cACQ,IAAI/N,KAAJ,CAAU,qBAAV,CAAN;;WAEG,CAAL;WACK,EAAL;eACSgO,MAAMwM,KAAKwE,SAAX,EAAsBxE,KAAKwE,SAAL,GAAiBxE,KAAKuE,YAAL,CAAkBpf,MAAzD,CAAP;;WAEG,EAAL;WACK,EAAL;;cACMoO,OAAM,EAAV;gCACkByM,KAAK2E,MAAL,CAAYM,OAAZ,EAAlB,oHAAyC;;;;;;;;;;;;gBAAhCP,KAAgC;;iBACnCrgB,IAAJ,aAAYmP,MAAMkR,MAAME,aAAZ,EAA2BF,MAAMG,WAAN,GAAoB,CAA/C,CAAZ;;;iBAGKtR,IAAP;;;WAGG,EAAL;cACQ,IAAI/N,KAAJ,CAAU,sBAAV,CAAN;;;cAGM,IAAIA,KAAJ,0BAAiCwa,KAAK3V,OAAtC,CAAN;;;;0BAKNwb,iDAAmBxQ,KAAK;QAClB2K,OAAO,KAAKA,IAAhB;YACQA,KAAK3V,OAAb;WACO,CAAL;;cACMkJ,MAAM,EAAV;eACK,IAAIrO,IAAI,CAAb,EAAgBA,IAAI,GAApB,EAAyBA,GAAzB,EAA8B;gBACxB8a,KAAK+D,OAAL,CAAale,GAAb,CAAiBX,CAAjB,MAAwBmQ,GAA5B,EAAiC;kBAC3BhR,IAAJ,CAASa,CAAT;;;;iBAIGqO,GAAP;;;WAGG,CAAL;;cACMA,QAAM,EAAV;eACK,IAAIrO,MAAI,CAAb,EAAgBA,MAAI8a,KAAKgE,QAAzB,EAAmC9e,KAAnC,EAAwC;gBAClC+G,MAAM+T,KAAKkE,OAAL,CAAare,GAAb,CAAiBX,GAAjB,CAAV;gBACI8G,QAAQgU,KAAKiE,SAAL,CAAepe,GAAf,CAAmBX,GAAnB,CAAZ;gBACIif,cAAcnE,KAAKoE,aAAL,CAAmBve,GAAnB,CAAuBX,GAAvB,CAAlB;gBACI4gB,QAAQ9F,KAAKqE,OAAL,CAAaxe,GAAb,CAAiBX,GAAjB,CAAZ;;iBAEK,IAAI6gB,IAAI/Z,KAAb,EAAoB+Z,KAAK9Z,GAAzB,EAA8B8Z,GAA9B,EAAmC;kBAC7BC,IAAI,CAAR;kBACI7B,gBAAgB,CAApB,EAAuB;oBACjB4B,IAAID,KAAR;eADF,MAEO;oBACD/S,QAAQoR,cAAc,CAAd,IAAmB4B,IAAI/Z,KAAvB,KAAiCgU,KAAKgE,QAAL,GAAgB9e,GAAjD,CAAZ;oBACI8a,KAAKsE,eAAL,CAAqBze,GAArB,CAAyBkN,KAAzB,KAAmC,CAAvC;oBACIiT,MAAM,CAAV,EAAa;uBACNF,KAAL;;;;kBAIAE,MAAM3Q,GAAV,EAAe;sBACThR,IAAJ,CAAS0hB,CAAT;;;;;iBAKCxS,KAAP;;;WAGG,EAAL;;cACMA,QAAM,EAAV;gCACkByM,KAAK2E,MAAL,CAAYM,OAAZ,EAAlB,oHAAyC;;;;;;;;;;;;gBAAhCP,KAAgC;;gBACnCrP,OAAOqP,MAAMI,OAAb,IAAwBzP,OAAOqP,MAAMI,OAAN,IAAiBJ,MAAMG,WAAN,GAAoBH,MAAME,aAA3C,CAAnC,EAA8F;oBACxFvgB,IAAJ,CAASqgB,MAAME,aAAN,IAAuBvP,MAAMqP,MAAMI,OAAnC,CAAT;;;;iBAIGvR,KAAP;;;WAGG,EAAL;;cACMA,QAAM,EAAV;gCACkByM,KAAK2E,MAAL,CAAYM,OAAZ,EAAlB,oHAAyC;;;;;;;;;;;;gBAAhCP,MAAgC;;gBACnCrP,QAAQqP,OAAMI,OAAlB,EAA2B;oBACrBzgB,IAAJ,cAAYmP,MAAMkR,OAAME,aAAZ,EAA2BF,OAAMG,WAAN,GAAoB,CAA/C,CAAZ;;;;iBAIGtR,KAAP;;;;cAIM,IAAI/N,KAAJ,0BAAiCwa,KAAK3V,OAAtC,CAAN;;;;;0EA/GL5E,6KA4CAA;;IC9NkBwgB;yBACPjhB,IAAZ,EAAkB;;;SACXuc,IAAL,GAAYvc,KAAKuc,IAAjB;;;0BAGF9X,2BAAQ8L,QAAQ2Q,WAAW;SACpB,IAAIC,aAAa,CAAtB,EAAyBA,aAAa5Q,OAAOpQ,MAAP,GAAgB,CAAtD,EAAyDghB,YAAzD,EAAuE;UACjEC,OAAO7Q,OAAO4Q,UAAP,EAAmBE,EAA9B;UACIC,QAAQ/Q,OAAO4Q,aAAa,CAApB,EAAuBE,EAAnC;gBACUF,UAAV,EAAsBI,QAAtB,IAAkC,KAAKC,UAAL,CAAgBJ,IAAhB,EAAsBE,KAAtB,CAAlC;;;;0BAIJE,iCAAWJ,MAAME,OAAO;QAClB/S,MAAM,CAAV;;yBAEkB,KAAKgO,IAAL,CAAUxB,MAA5B,6GAAoC;;;;;;;;;;;;UAA3BsC,KAA2B;;UAC9BA,MAAMoE,QAAN,CAAeC,WAAnB,EAAgC;;;;cAIxBrE,MAAMhY,OAAd;aACO,CAAL;cACM,CAACgY,MAAMoE,QAAN,CAAeE,UAApB,EAAgC;;;;;aAK7B,CAAL;cACMtE,MAAMoE,QAAN,CAAeG,QAAf,IAA2BvE,MAAMoE,QAAN,CAAeI,SAA9C,EAAyD;;;;;;gBAMnD,IAAIrhB,KAAJ,wCAA+C6c,MAAMhY,OAArD,CAAN;;;UAGAC,MAAM,CAAV;UACIkC,IAAI6V,MAAMyE,QAAd;cACQzE,MAAMje,MAAd;aACO,CAAL;cACM2iB,UAAUhE,aAAavW,EAAEiX,KAAf,EAAsB,UAAUuD,IAAV,EAAgB;mBAC1CZ,OAAOY,KAAKZ,IAAb,IAAuBE,QAAQU,KAAKV,KAA3C;WADY,CAAd;;cAIIS,WAAW,CAAf,EAAkB;kBACVva,EAAEiX,KAAF,CAAQsD,OAAR,EAAiBjhB,KAAvB;;;;;aAKC,CAAL;cACMmhB,aAAa,CAAjB;cAAoBC,cAAc,CAAlC;cACId,QAAQ5Z,EAAE+O,SAAF,CAAY8B,UAApB,IAAkC+I,OAAO5Z,EAAE+O,SAAF,CAAY8B,UAAZ,GAAyB7Q,EAAE+O,SAAF,CAAY4L,OAAlF,EAA2F;yBAC5E3a,EAAE+O,SAAF,CAAYrQ,OAAZ,CAAoBkb,OAAO5Z,EAAE+O,SAAF,CAAY8B,UAAvC,CAAb;WADF,MAEO;yBACQ7Q,EAAE4a,KAAF,CAAQ5L,GAArB;;;cAGE8K,SAAS9Z,EAAE6a,UAAF,CAAahK,UAAtB,IAAoCiJ,QAAQ9Z,EAAE6a,UAAF,CAAahK,UAAb,GAA0B7Q,EAAE6a,UAAF,CAAaF,OAAvF,EAAgG;0BAChF3a,EAAE6a,UAAF,CAAanc,OAAb,CAAqBob,QAAQ9Z,EAAE6a,UAAF,CAAahK,UAA1C,CAAd;;;cAGEtK,QAAQ,CAACkU,aAAaC,WAAb,GAA2B1a,EAAE4a,KAAF,CAAQ5L,GAApC,IAA2C,CAAvD;gBACMhP,EAAE4a,KAAF,CAAQE,MAAR,CAAezhB,GAAf,CAAmBkN,KAAnB,CAAN;;;aAGG,CAAL;cACMqT,QAAQ5Z,EAAEuE,UAAV,IAAwBuV,SAAS9Z,EAAEuE,UAAvC,EAAmD;mBAC1C,CAAP;;;gBAGIvE,EAAE+a,SAAF,CAAY/a,EAAEgb,SAAF,CAAYhb,EAAEib,SAAF,CAAYrB,IAAZ,IAAoB5Z,EAAEoP,eAAtB,GAAwCpP,EAAEkb,UAAF,CAAapB,KAAb,CAApD,CAAZ,CAAN;;;;gBAIM,IAAI9gB,KAAJ,2CAAkD6c,MAAMje,MAAxD,CAAN;;;;;UAKAie,MAAMoE,QAAN,CAAekB,QAAnB,EAA6B;cACrBrd,GAAN;OADF,MAEO;eACEA,GAAP;;;;WAIGiJ,GAAP;;;;;;ACzFJ;;;;;;;;;IAQqBqU;+BACP5iB,IAAZ,EAAkB;;;SACXA,IAAL,GAAYA,IAAZ;;;gCAGF6iB,yCAAetS,QAAQ2Q,WAAW;;QAE5B4B,eAAe,CAAnB;QACIC,aAAa,CAAjB;SACK,IAAIhV,QAAQ,CAAjB,EAAoBA,QAAQwC,OAAOpQ,MAAnC,EAA2C4N,OAA3C,EAAoD;UAC9CmC,QAAQK,OAAOxC,KAAP,CAAZ;UACImC,MAAM8S,MAAV,EAAkB;;qBACHjV,KAAb;OADF,MAEO;YACD+U,iBAAiBC,UAArB,EAAiC;eAC1BE,eAAL,CAAqB1S,MAArB,EAA6B2Q,SAA7B,EAAwC4B,YAAxC,EAAsDC,UAAtD;;;uBAGaA,aAAahV,KAA5B;;;;QAIA+U,iBAAiBC,UAArB,EAAiC;WAC1BE,eAAL,CAAqB1S,MAArB,EAA6B2Q,SAA7B,EAAwC4B,YAAxC,EAAsDC,UAAtD;;;WAGK7B,SAAP;;;gCAGF+B,2CAAgB1S,QAAQ2Q,WAAW4B,cAAcC,YAAY;QACvDxL,OAAOhH,OAAOuS,YAAP,CAAX;QACII,UAAU3L,KAAK4L,IAAL,CAAUC,IAAV,EAAd;;;QAGI7L,KAAK8L,UAAL,CAAgBljB,MAAhB,GAAyB,CAA7B,EAAgC;;cAEtBmjB,IAAR,IAAiB,CAAC/L,KAAK8L,UAAL,CAAgBljB,MAAhB,GAAyB,CAA1B,IAA+B+iB,QAAQK,KAAxC,GAAiDhM,KAAK8L,UAAL,CAAgBljB,MAAjF;;;QAGEqjB,UAAU,CAACtC,UAAU4B,YAAV,EAAwBvB,QAAvC;QACIkC,UAAU,CAAd;QACIC,OAAO,KAAK1jB,IAAL,CAAU2jB,UAAV,GAAuB,EAAlC;;;SAGK,IAAI5V,QAAQ+U,eAAe,CAAhC,EAAmC/U,SAASgV,UAA5C,EAAwDhV,OAAxD,EAAiE;UAC3D6V,OAAOrT,OAAOxC,KAAP,CAAX;UACI8V,UAAUD,KAAKT,IAAnB;UACIW,WAAW5C,UAAUnT,KAAV,CAAf;;UAEIgW,iBAAiB,KAAKC,iBAAL,CAAuBJ,KAAKP,UAAL,CAAgB,CAAhB,CAAvB,CAArB;;UAEIU,mBAAmB,eAAvB,EAAwC;iBAC7BP,OAAT,GAAmBM,SAASL,OAAT,GAAmB,CAAtC;;;gBAGQM,cAAR;eACO,cAAL;eACK,cAAL;;qBAEWP,OAAT,IAAoBN,QAAQI,IAAR,GAAeO,QAAQN,KAAR,GAAgB,CAA/B,GAAmCM,QAAQP,IAA/D;;;eAGG,qBAAL;eACK,YAAL;eACK,YAAL;;qBAEWE,OAAT,IAAoBN,QAAQI,IAAR,GAAeO,QAAQP,IAA3C;;;eAGG,sBAAL;eACK,aAAL;eACK,aAAL;;qBAEWE,OAAT,IAAoBN,QAAQe,IAAR,GAAeJ,QAAQN,KAAvB,GAA+BM,QAAQP,IAA3D;;;;;;qBAKSE,OAAT,IAAoBN,QAAQI,IAAR,GAAe,CAACJ,QAAQK,KAAR,GAAgBM,QAAQN,KAAzB,IAAkC,CAAjD,GAAqDM,QAAQP,IAAjF;;;;gBAIIS,cAAR;eACO,cAAL;eACK,YAAL;eACK,OAAL;eACK,aAAL;eACK,qBAAL;eACK,gBAAL;;gBAEMA,mBAAmB,qBAAnB,IAA4CA,mBAAmB,gBAAnE,EAAqF;sBAC3EG,IAAR,IAAgBR,IAAhB;;;qBAGOD,OAAT,GAAmB,CAACP,QAAQgB,IAAT,GAAgBL,QAAQM,IAA3C;oBACQD,IAAR,IAAgBL,QAAQO,MAAxB;;;eAGG,cAAL;eACK,YAAL;eACK,OAAL;eACK,aAAL;eACK,gBAAL;eACK,sBAAL;;gBAEML,mBAAmB,gBAAnB,IAAuCA,mBAAmB,sBAA9D,EAAsF;sBAC5EI,IAAR,IAAgBT,IAAhB;;;qBAGOD,OAAT,GAAmBP,QAAQiB,IAAR,GAAeN,QAAQK,IAA1C;oBACQC,IAAR,IAAgBN,QAAQO,MAAxB;;;;iBAIK7C,QAAT,GAAoBuC,SAASO,QAAT,GAAoB,CAAxC;iBACSb,OAAT,IAAoBA,OAApB;iBACSC,OAAT,IAAoBA,OAApB;OAjEF,MAmEO;mBACMK,SAASvC,QAApB;mBACWuC,SAASO,QAApB;;;;;;;gCAONL,+CAAkBM,WAAW;QACvBP,iBAAiBQ,QAAQP,iBAAR,CAA0BM,SAA1B,CAArB;;;QAGI,CAACA,YAAY,CAAC,IAAd,MAAwB,MAA5B,EAAoC;UAC9BP,mBAAmB,eAAvB,EAAwC;gBAC9BO,SAAR;eACO,MAAL;eACK,MAAL;eACK,MAAL;eACK,MAAL;eACK,MAAL;eACK,MAAL;eACK,MAAL;eACK,MAAL;eACK,MAAL;mBACS,aAAP;;eAEG,MAAL;eACK,MAAL;eACK,MAAL;eACK,MAAL;eACK,MAAL;eACK,MAAL;eACK,MAAL;eACK,MAAL;mBACS,OAAP;;eAEG,MAAL;mBACS,OAAP;;OAxBN,MA0BO,IAAIA,cAAc,MAAlB,EAA0B;;eACxB,aAAP;;;;YAIIP,cAAR;;;WAGO,OAAL,CAHF;WAIO,OAAL,CAJF;WAKO,OAAL,CALF;WAMO,OAAL,CANF;WAOO,OAAL,CAPF;WAQO,OAAL,CARF;WASO,OAAL,CATF;WAUO,OAAL,CAVF;WAWO,OAAL,CAXF;WAYO,OAAL,CAZF;WAaO,OAAL;;eACS,OAAP;;WAEG,OAAL;;eACS,gBAAP;;WAEG,OAAL;;eACS,aAAP;;WAEG,OAAL,CAtBF;WAuBO,OAAL;;eACS,YAAP;;WAEG,OAAL;;eACS,OAAP;;WAEG,OAAL;;;;;;WAKK,OAAL,CAlCF;WAmCO,OAAL,CAnCF;WAoCO,OAAL,CApCF;WAqCO,OAAL,CArCF;WAsCO,OAAL,CAtCF;WAuCO,OAAL,CAvCF;WAwCO,OAAL,CAxCF;WAyCO,OAAL;;eACS,OAAP;;WAEG,OAAL,CA5CF;WA6CO,OAAL;;eACS,OAAP;;;;WAIG,QAAL;;eACS,aAAP;;WAEG,QAAL;;eACS,aAAP;;;;WAIG,QAAL;;eACS,OAAP;;WAEG,QAAL;;eACS,OAAP;;;;WAIG,QAAL,CAlEF;WAmEO,QAAL;;eACS,OAAP;;WAEG,QAAL;;eACS,OAAP;;;WAGGA,cAAP;;;;;;ACvPJ;;;IAGqBS;kBAC+D;QAAtElB,IAAsE,uEAA/DmB,QAA+D;QAArDP,IAAqD,uEAA9CO,QAA8C;QAApCR,IAAoC,uEAA7B,CAACQ,QAA4B;QAAlBN,IAAkB,uEAAX,CAACM,QAAU;;;;;;;;SAK3EnB,IAAL,GAAYA,IAAZ;;;;;;SAMKY,IAAL,GAAYA,IAAZ;;;;;;SAMKD,IAAL,GAAYA,IAAZ;;;;;;SAMKE,IAAL,GAAYA,IAAZ;;;;;;;;;iBAmBFO,6BAASxE,GAAGyE,GAAG;QACTzE,IAAI,KAAKoD,IAAb,EAAmB;WACZA,IAAL,GAAYpD,CAAZ;;;QAGEyE,IAAI,KAAKT,IAAb,EAAmB;WACZA,IAAL,GAAYS,CAAZ;;;QAGEzE,IAAI,KAAK+D,IAAb,EAAmB;WACZA,IAAL,GAAY/D,CAAZ;;;QAGEyE,IAAI,KAAKR,IAAb,EAAmB;WACZA,IAAL,GAAYQ,CAAZ;;;;iBAIJvB,uBAAO;WACE,IAAIoB,IAAJ,CAAS,KAAKlB,IAAd,EAAoB,KAAKY,IAAzB,EAA+B,KAAKD,IAApC,EAA0C,KAAKE,IAA/C,CAAP;;;;;wBA/BU;aACH,KAAKF,IAAL,GAAY,KAAKX,IAAxB;;;;;;;;;;wBAOW;aACJ,KAAKa,IAAL,GAAY,KAAKD,IAAxB;;;;;;;ACzCJ;;;;;IAIqBU;oBACPrU,MAAZ,EAAoB2Q,SAApB,EAA+B;;;;;;;SAKxB3Q,MAAL,GAAcA,MAAd;;;;;;SAMK2Q,SAAL,GAAiBA,SAAjB;;;;;;;;;;;wBAOiB;UACbqC,QAAQ,CAAZ;2BACqB,KAAKrC,SAA1B,6GAAqC;;;;;;;;;;;;YAA5B4C,QAA4B;;iBAC1BA,SAASvC,QAAlB;;;aAGKgC,KAAP;;;;;;;;;;wBAOkB;UACda,SAAS,CAAb;4BACqB,KAAKlD,SAA1B,oHAAqC;;;;;;;;;;;;YAA5B4C,QAA4B;;kBACzBA,SAASO,QAAnB;;;aAGKD,MAAP;;;;;;;;;;wBAOS;UACLS,OAAO,IAAIL,IAAJ,EAAX;;UAEItE,IAAI,CAAR;UACIyE,IAAI,CAAR;WACK,IAAI5W,QAAQ,CAAjB,EAAoBA,QAAQ,KAAKwC,MAAL,CAAYpQ,MAAxC,EAAgD4N,OAAhD,EAAyD;YACnDmC,QAAQ,KAAKK,MAAL,CAAYxC,KAAZ,CAAZ;YACI+W,IAAI,KAAK5D,SAAL,CAAenT,KAAf,CAAR;YACI9F,IAAIiI,MAAM2U,IAAd;;aAEKH,QAAL,CAAczc,EAAEqb,IAAF,GAASpD,CAAT,GAAa4E,EAAEtB,OAA7B,EAAsCvb,EAAEic,IAAF,GAASS,CAAT,GAAaG,EAAErB,OAArD;aACKiB,QAAL,CAAczc,EAAEgc,IAAF,GAAS/D,CAAT,GAAa4E,EAAEtB,OAA7B,EAAsCvb,EAAEkc,IAAF,GAASQ,CAAT,GAAaG,EAAErB,OAArD;;aAEKqB,EAAEvD,QAAP;aACKuD,EAAET,QAAP;;;aAGKQ,IAAP;;;;;;;ACpEJ;;;IAGqBE,gBACnB,yBAAkE;MAAtDxD,QAAsD,uEAA3C,CAA2C;MAAxC8C,QAAwC,uEAA7B,CAA6B;MAA1Bb,OAA0B,uEAAhB,CAAgB;MAAbC,OAAa,uEAAH,CAAG;;;;;;;;OAK3DlC,QAAL,GAAgBA,QAAhB;;;;;;OAMK8C,QAAL,GAAgBA,QAAhB;;;;;;OAMKb,OAAL,GAAeA,OAAf;;;;;;OAMKC,OAAL,GAAeA,OAAf;;;ACzBJ;;;AAGA,IAAMuB,kBAAkB;sBACF,MADE;UAEd,MAFc;oBAGJ,MAHI;YAIZ,MAJY;WAKb,MALa;YAMZ,MANY;SAOf,MAPe;aAQX,MARW;SASf,MATe;WAUb,CAAC,MAAD,EAAS,MAAT,CAVa;YAWZ,MAXY;UAYd,MAZc;WAab,MAba;YAcZ,MAdY;SAef,MAfe;UAgBd,MAhBc;uBAiBD,MAjBC;UAkBd,MAlBc;QAmBhB,MAnBgB;YAoBZ,MApBY;UAqBd,MArBc;WAsBb,MAtBa;YAuBZ,MAvBY;cAwBV,CAAC,MAAD,EAAS,MAAT,CAxBU;WAyBb,MAzBa;YA0BZ,MA1BY;wBA2BA,MA3BA;WA4Bb,MA5Ba;YA6BZ,MA7BY;YA8BZ,MA9BY;cA+BV,MA/BU;UAgCd,MAhCc;WAiCb,MAjCa;SAkCf,MAlCe;YAmCZ,CAAC,MAAD,EAAS,MAAT,CAnCY;YAoCZ,CAAC,MAAD,EAAS,MAAT,CApCY;UAqCd,MArCc;OAsCjB,MAtCiB;WAuCb,MAvCa;UAwCd,MAxCc;YAyCZ,MAzCY;gBA0CR,MA1CQ;wBA2CA,MA3CA;cA4CV,MA5CU;YA6CZ,MA7CY;YA8CZ,MA9CY;YA+CZ,MA/CY;cAgDV,MAhDU;SAiDf,MAjDe;UAkDd,MAlDc;WAmDb,CAAC,MAAD,EAAS,MAAT,CAnDa;UAoDd,MApDc;YAqDZ,MArDY;OAsDjB,MAtDiB;SAuDf,MAvDe;UAwDd,MAxDc;SAyDf,MAzDe;YA0DZ,MA1DY;YA2DZ,MA3DY;QA4DhB,MA5DgB;UA6Dd,MA7Dc;UA8Dd,MA9Dc;YA+DZ,MA/DY;WAgEb,MAhEa;cAiEV,MAjEU;iBAkEP,MAlEO;oBAmEJ,MAnEI;wBAoEA,MApEA;aAqEX,CAAC,MAAD,EAAS,MAAT,CArEW;QAsEhB,MAtEgB;aAuEX,MAvEW;OAwEjB,MAxEiB;gBAyER,MAzEQ;WA0Eb,CAAC,MAAD,EAAS,MAAT,CA1Ea;qBA2EH,MA3EG;aA4EX,MA5EW;OA6EjB,MA7EiB;SA8Ef,MA9Ee;YA+EZ,MA/EY;cAgFV,MAhFU;SAiFf,MAjFe;WAkFb,MAlFa;aAmFX,MAnFW;eAoFT,MApFS;cAqFV,MArFU;YAsFZ,MAtFY;yBAuFC,MAvFD;mBAwFL,MAxFK;cAyFV,MAzFU;QA0FhB,MA1FgB;0BA2FE,MA3FF;UA4Fd,MA5Fc;SA6Ff,MA7Fe;aA8FX,MA9FW;qBA+FH,MA/FG;cAgGV,MAhGU;WAiGb,MAjGa;WAkGb,MAlGa;WAmGb,MAnGa;aAoGX,MApGW;WAqGb,MArGa;gBAsGR,MAtGQ;aAuGX,MAvGW;gBAwGR,MAxGQ;UAyGd,MAzGc;YA0GZ,MA1GY;SA2Gf,MA3Ge;UA4Gd,MA5Gc;eA6GT,MA7GS;SA8Gf,MA9Ge;YA+GZ,MA/GY;UAgHd,CAAC,MAAD,EAAS,MAAT,CAhHc;YAiHZ,MAjHY;WAkHb,MAlHa;UAmHd,MAnHc;QAoHhB,MApHgB;WAqHb,MArHa;WAsHb,MAtHa;YAuHZ,MAvHY;OAwHjB,MAxHiB;eAyHT,MAzHS;eA0HT,MA1HS;aA2HX,MA3HW;MA4HlB,MA5HkB;aA6HX,MA7HW;UA8Hd,MA9Hc;WA+Hb;CA/HX;;AAkIA,AAIA,AAAO,SAASC,SAAT,CAAmB/f,MAAnB,EAA2B;MAC5BuE,MAAMvE,OAAO/E,MAAjB;MACI+kB,MAAM,CAAV;SACOA,MAAMzb,GAAb,EAAkB;QACZ0b,OAAOjgB,OAAOkgB,UAAP,CAAkBF,KAAlB,CAAX;;;QAGI,UAAUC,IAAV,IAAkBA,QAAQ,MAA1B,IAAoCD,MAAMzb,GAA9C,EAAmD;UAC7C4b,OAAOngB,OAAOkgB,UAAP,CAAkBF,GAAlB,CAAX;;;UAGI,UAAUG,IAAV,IAAkBA,QAAQ,MAA9B,EAAsC;;eAE7B,CAAC,CAACF,OAAO,KAAR,KAAkB,EAAnB,KAA0BE,OAAO,KAAjC,IAA0C,OAAjD;;;;QAIAC,SAASf,QAAQgB,SAAR,CAAkBJ,IAAlB,CAAb;QACIG,WAAW,QAAX,IAAuBA,WAAW,WAAlC,IAAiDA,WAAW,SAAhE,EAA2E;aAClEN,gBAAgBM,MAAhB,CAAP;;;;SAIGN,gBAAgBQ,OAAvB;;;AAGF,AAAO,SAASC,aAAT,CAAuBpC,UAAvB,EAAmC;OACnC,IAAInjB,IAAI,CAAb,EAAgBA,IAAImjB,WAAWljB,MAA/B,EAAuCD,GAAvC,EAA4C;QACtCokB,YAAYjB,WAAWnjB,CAAX,CAAhB;QACIolB,SAASf,QAAQgB,SAAR,CAAkBjB,SAAlB,CAAb;QACIgB,WAAW,QAAX,IAAuBA,WAAW,WAAlC,IAAiDA,WAAW,SAAhE,EAA2E;aAClEN,gBAAgBM,MAAhB,CAAP;;;;SAIGN,gBAAgBQ,OAAvB;;;;AAIF,IAAME,MAAM;QACJ,IADI;QAEJ,IAFI;QAGJ,IAHI;QAIJ,IAJI;QAKJ,IALI;QAMJ,IANI;QAOJ,IAPI;UAQF,IARE;QASJ,IATI;QAUJ,IAVI;QAWJ,IAXI;QAYJ,IAZI;QAaJ,IAbI;QAcJ,IAdI;QAeJ,IAfI;QAgBJ,IAhBI;QAiBJ,IAjBI;QAkBJ,IAlBI;QAmBJ,IAnBI;;;QAsBJ,IAtBI;QAuBJ,IAvBI;QAwBJ,IAxBI;QAyBJ,IAzBI;QA0BJ,IA1BI;QA2BJ,IA3BI;CAAZ;;AA8BA,AAAO,SAASC,SAAT,CAAmBL,MAAnB,EAA2B;MAC5BI,IAAIJ,MAAJ,CAAJ,EAAiB;WACR,KAAP;;;SAGK,KAAP;;;ACrNF;;AAEA,IAAMM,WAAW;0BACS;UAChB,CADgB;eAEX,KAFW;qBAGL;GAJJ;aAMJ;UACH,CADG;eAEE,KAFF;uBAGU,CAHV;qBAIQ,CAJR;mBAKM,CALN;;mBAOM,CAPN;wBAQW,EARX;sBASS,EATT;4BAUe,EAVf;qBAWQ,EAXR;yBAYY,EAZZ;yBAaY;GAnBR;qBAqBI;UACX,CADW;eAEN,IAFM;iBAGJ,CAHI;wBAIG,CAJH;aAKR;GA1BI;cA4BH;UACJ,CADI;eAEC;GA9BE;;;;;;;wBAsCO;UACd,CADc;eAET,KAFS;6BAGK;GAzCZ;2BA2CU;UACjB,CADiB;eAEZ,KAFY;6BAGE;GA9CZ;iBAgDA;UACP,CADO;eAEF,IAFE;uBAGM,CAHN;yBAIQ,CAJR;uBAKM,CALN;yBAMQ;GAtDR;cAwDH;UACJ,CADI;eAEC,KAFD;wBAGU,CAHV;sBAIQ,CAJR;;;qBAOO;GA/DJ;cAiEH;UACJ,CADI;eAEC,IAFD;oBAGM,CAHN;oBAIM,CAJN;yBAKW;GAtER;oBAwEG;UACV,EADU;eAEL,IAFK;oBAGA,CAHA;eAIL,CAJK;eAKL,CALK;cAMN,CANM;yBAOK;GA/ER;aAiFJ;UACH,EADG;eAEE,IAFF;iBAGI,CAHJ;uBAIU,CAJV;uBAKU;GAtFN;yBAwFQ;UACf,EADe;eAEV,KAFU;oBAGL;GA3FH;qBA6FI;UACX,EADW;eAEN,KAFM;;;iBAKJ;GAlGA;;;;sBAuGK;UACZ,EADY;eAEP,KAFO;;;;;;uBAQC;GA/GN;gBAiHD;UACN,EADM;eAED,IAFC;iBAGC,CAHD;cAIF,CAJE;kBAKE,CALF;cAMF,CANE;uBAOO,CAPP;0BAQU,CARV;iBASC;GA1HA;yBA4HQ;UACf,EADe;eAEV,IAFU;kBAGP;GA/HD;;oBAkIG;UACV,EADU;eAEL,IAFK;kBAGF,CAHE;kBAIF,CAJE;kBAKF,CALE;kBAMF,CANE;kBAOF;GAzID;gBA2ID;UACN,EADM;eAED,IAFC;oBAGI,CAHJ;iBAIC,CAJD;kBAKE,CALF;qBAMK,CANL;iBAOC,CAPD;cAQF;GAnJG;kBAqJC;UACR,EADQ;eAEH,IAFG;2BAGS,CAHT;0BAIQ,CAJR;uBAKK,CALL;uBAMK,CANL;uBAOK,CAPL;uBAQK,CARL;uBASK,CATL;yBAUO,CAVP;wBAWM,CAXN;wBAYM,CAZN;sBAaI,EAbJ;uBAcK,EAdL;oBAeE,EAfF;mBAgBC,EAhBD;gCAiBc;GAtKf;cAwKH;UACJ,EADI;eAEC,IAFD;sBAGQ,CAHR;sBAIQ;GA5KL;eA8KF;UACL,EADK;eAEA,IAFA;sBAGO,CAHP;oBAIK,CAJL;mBAKI,CALJ;oBAMK,CANL;sBAOO,CAPP;yBAQU,CARV;sBASO;GAvLL;mBAyLE;UACT,EADS;eAEJ,IAFI;uBAGI;GA5LN;;;;;;;;;;cAuMH;UACJ,EADI;eAEC,IAFD;kBAGI,CAHJ;mBAIK,CAJL;0BAKY,CALZ;sBAMQ,CANR;8BAOgB,CAPhB;2BAQa,CARb;sBASQ,CATR;4BAUc,CAVd;uBAWS,CAXT;2BAYa,CAZb;kCAaoB;GApNjB;eAsNF;UACL,EADK;eAEA,IAFA;mBAGI,CAHJ;sBAIO;GA1NL;sBA4NK;UACZ,EADY;eAEP,IAFO;yBAGG,CAHH;4BAIM,CAJN;yBAKG;GAjOR;wBAmOO;UACd,EADc;eAET,KAFS;0BAGE,CAHF;8BAIM,CAJN;4BAKI;GAxOX;YA0OL;UACF,EADE;eAEG,KAFH;;;cAKE;GA/OG;yBAiPQ;UACf,EADe;eAEV,IAFU;6BAGI,CAHJ;qBAIJ,CAJI;qBAKJ,CALI;uBAMF,CANE;sBAOH,CAPG;sBAQH;GAzPL;2BA2PU;UACjB,EADiB;eAEZ,IAFY;+BAGI,CAHJ;uBAIJ,CAJI;uBAKJ,CALI;yBAMF,CANE;wBAOH,CAPG;wBAQH;GAnQP;6BAqQY;UACnB,EADmB;eAEd,IAFc;8BAGC,CAHD;+BAIE;GAzQd;kBA2QC;UACR,EADQ;eAEH,KAFG;;;oBAKE;GAhRH;uBAkRM;UACb,EADa;eAER,KAFQ;yBAGE,CAHF;0BAIG;GAtRT;iBAwRA;UACP,EADO;eAEF,KAFE;wBAGO,CAHP;uBAIM;GA5RN;yBA8RQ;UACf,EADe;eAEV,KAFU;2BAGE,CAHF;qBAIJ,CAJI;qBAKJ,CALI;uBAMF,CANE;sBAOH,CAPG;sBAQH,EARG;qBASJ,EATI;uBAUF,EAVE;uBAWF,EAXE;sBAYH,EAZG;qBAaJ,EAbI;wBAcD,EAdC;wBAeD,EAfC;0BAgBC,EAhBD;0BAiBC,EAjBD;yBAkBA,EAlBA;yBAmBA,EAnBA;2BAoBE,EApBF;0BAqBC,EArBD;0BAsBC,EAtBD;wBAuBD;GArTP;wBAuTO;UACd,EADc;eAET,KAFS;0BAGE,CAHF;qBAIH,CAJG;+BAKO;GA5Td;aA8TJ;UACH,EADG;eAEE,IAFF;sBAGS,CAHT;wBAIW,CAJX;yBAKY;GAnUR;aAqUJ;UACH,EADG;eAEE,IAFF;sBAGS,CAHT;wBAIW,CAJX;yBAKY;GA1UR;eA4UF;UACL,EADK;eAEA;GA9UE;mBAgVE;UACT,GADS;eAEJ,IAFI;uBAGI,CAHJ;0BAIO,CAJP;qBAKE,CALF;uBAMI;;CAtVvB;;AA0VA,IAAMC,UAAU,SAAVA,OAAU,CAACjO,IAAD,EAAOkO,QAAP;SAAoB,CAACF,SAAShO,IAAT,EAAeuN,IAAhB,EAAsBS,SAAShO,IAAT,EAAekO,QAAf,CAAtB,CAApB;CAAhB;;AAEA,IAAMC,YAAY;QACVF,QAAQ,WAAR,EAAqB,mBAArB,CADU;QAEVA,QAAQ,WAAR,EAAqB,qBAArB,CAFU;QAGVA,QAAQ,WAAR,EAAqB,eAArB,CAHU;QAIVA,QAAQ,WAAR,EAAqB,qBAArB,CAJU;QAKVA,QAAQ,WAAR,EAAqB,iBAArB,CALU;QAMVA,QAAQ,WAAR,EAAqB,qBAArB,CANU;;QAQVA,QAAQ,WAAR,EAAqB,oBAArB,CARU;QASVA,QAAQ,WAAR,EAAqB,qBAArB,CATU;;QAWVA,QAAQ,WAAR,EAAqB,mBAArB,CAXU;QAYVA,QAAQ,WAAR,EAAqB,mBAArB,CAZU;QAaVA,QAAQ,WAAR,EAAqB,mBAArB,CAbU;QAcVA,QAAQ,WAAR,EAAqB,mBAArB,CAdU;;;;;;;;;;;QAyBVA,QAAQ,qBAAR,EAA+B,qBAA/B,CAzBU;QA0BVA,QAAQ,sBAAR,EAAgC,sBAAhC,CA1BU;QA2BVA,QAAQ,2BAAR,EAAqC,0BAArC,CA3BU;QA4BVA,QAAQ,2BAAR,EAAqC,0BAArC,CA5BU;QA6BVA,QAAQ,sBAAR,EAAgC,iBAAhC,CA7BU;QA8BVA,QAAQ,sBAAR,EAAgC,2BAAhC,CA9BU;QA+BVA,QAAQ,mBAAR,EAA6B,SAA7B,CA/BU;QAgCVA,QAAQ,WAAR,EAAqB,qBAArB,CAhCU;QAiCVA,QAAQ,WAAR,EAAqB,oBAArB,CAjCU;;QAmCVA,QAAQ,YAAR,EAAsB,oBAAtB,CAnCU;QAoCVA,QAAQ,YAAR,EAAsB,kBAAtB,CApCU;QAqCVA,QAAQ,YAAR,EAAsB,iBAAtB,CArCU;QAsCVA,QAAQ,YAAR,EAAsB,iBAAtB,CAtCU;QAuCVA,QAAQ,YAAR,EAAsB,kBAAtB,CAvCU;QAwCVA,QAAQ,YAAR,EAAsB,kBAAtB,CAxCU;;QA0CVA,QAAQ,aAAR,EAAuB,kBAAvB,CA1CU;QA2CVA,QAAQ,aAAR,EAAuB,eAAvB,CA3CU;QA4CVA,QAAQ,aAAR,EAAuB,kBAAvB,CA5CU;;QA8CVA,QAAQ,eAAR,EAAyB,oBAAzB,CA9CU;QA+CVA,QAAQ,eAAR,EAAyB,mBAAzB,CA/CU;;;QAkDVA,QAAQ,gBAAR,EAA0B,gBAA1B,CAlDU;QAmDVA,QAAQ,YAAR,EAAsB,kBAAtB,CAnDU;QAoDVA,QAAQ,YAAR,EAAsB,kBAAtB,CApDU;QAqDVA,QAAQ,oBAAR,EAA8B,mBAA9B,CArDU;;;;;QA0DVA,QAAQ,sBAAR,EAAgC,sBAAhC,CA1DU;QA2DVA,QAAQ,sBAAR,EAAgC,yBAAhC,CA3DU;QA4DVA,QAAQ,sBAAR,EAAgC,yBAAhC,CA5DU;QA6DVA,QAAQ,eAAR,EAAyB,mBAAzB,CA7DU;QA8DVA,QAAQ,eAAR,EAAyB,qBAAzB,CA9DU;QA+DVA,QAAQ,kBAAR,EAA4B,WAA5B,CA/DU;QAgEVA,QAAQ,kBAAR,EAA4B,WAA5B,CAhEU;QAiEVA,QAAQ,kBAAR,EAA4B,UAA5B,CAjEU;QAkEVA,QAAQ,aAAR,EAAuB,kBAAvB,CAlEU;QAmEVA,QAAQ,aAAR,EAAuB,eAAvB,CAnEU;QAoEVA,QAAQ,aAAR,EAAuB,kBAAvB,CApEU;QAqEVA,QAAQ,aAAR,EAAuB,gBAAvB,CArEU;QAsEVA,QAAQ,aAAR,EAAuB,kBAAvB,CAtEU;QAuEVA,QAAQ,aAAR,EAAuB,qBAAvB,CAvEU;QAwEVA,QAAQ,gBAAR,EAA0B,uBAA1B,CAxEU;QAyEVA,QAAQ,gBAAR,EAA0B,sBAA1B,CAzEU;QA0EVA,QAAQ,gBAAR,EAA0B,mBAA1B,CA1EU;QA2EVA,QAAQ,gBAAR,EAA0B,mBAA1B,CA3EU;QA4EVA,QAAQ,gBAAR,EAA0B,mBAA1B,CA5EU;QA6EVA,QAAQ,gBAAR,EAA0B,mBAA1B,CA7EU;QA8EVA,QAAQ,gBAAR,EAA0B,kBAA1B,CA9EU;QA+EVA,QAAQ,gBAAR,EAA0B,gBAA1B,CA/EU;QAgFVA,QAAQ,gBAAR,EAA0B,eAA1B,CAhFU;QAiFVA,QAAQ,gBAAR,EAA0B,4BAA1B,CAjFU;QAkFVA,QAAQ,UAAR,EAAoB,UAApB,CAlFU;QAmFVA,QAAQ,cAAR,EAAwB,aAAxB,CAnFU;QAoFVA,QAAQ,mBAAR,EAA6B,aAA7B,CApFU;;QAsFVA,QAAQ,uBAAR,EAAiC,iBAAjC,CAtFU;QAuFVA,QAAQ,uBAAR,EAAiC,iBAAjC,CAvFU;QAwFVA,QAAQ,uBAAR,EAAiC,mBAAjC,CAxFU;QAyFVA,QAAQ,uBAAR,EAAiC,kBAAjC,CAzFU;QA0FVA,QAAQ,uBAAR,EAAiC,kBAAjC,CA1FU;QA2FVA,QAAQ,uBAAR,EAAiC,iBAAjC,CA3FU;QA4FVA,QAAQ,uBAAR,EAAiC,mBAAjC,CA5FU;QA6FVA,QAAQ,uBAAR,EAAiC,mBAAjC,CA7FU;QA8FVA,QAAQ,uBAAR,EAAiC,kBAAjC,CA9FU;QA+FVA,QAAQ,uBAAR,EAAiC,iBAAjC,CA/FU;QAgGVA,QAAQ,uBAAR,EAAiC,oBAAjC,CAhGU;QAiGVA,QAAQ,uBAAR,EAAiC,oBAAjC,CAjGU;QAkGVA,QAAQ,uBAAR,EAAiC,sBAAjC,CAlGU;QAmGVA,QAAQ,uBAAR,EAAiC,sBAAjC,CAnGU;QAoGVA,QAAQ,uBAAR,EAAiC,qBAAjC,CApGU;QAqGVA,QAAQ,uBAAR,EAAiC,qBAAjC,CArGU;QAsGVA,QAAQ,uBAAR,EAAiC,uBAAjC,CAtGU;QAuGVA,QAAQ,uBAAR,EAAiC,sBAAjC,CAvGU;QAwGVA,QAAQ,uBAAR,EAAiC,sBAAjC,CAxGU;QAyGVA,QAAQ,uBAAR,EAAiC,oBAAjC;CAzGR;;;;;AA+GA,KAAK,IAAI3lB,IAAI,CAAb,EAAgBA,KAAK,EAArB,EAAyBA,GAAzB,EAA8B;mBACb,QAAKA,CAAL,EAAS8lB,KAAT,CAAe,CAAC,CAAhB,CAAf,IAAuC,CAACJ,SAASK,qBAAT,CAA+Bd,IAAhC,EAAsCjlB,CAAtC,CAAvC;;;;AAIF,IAAIgmB,aAAa,EAAjB;AACA,KAAK,IAAIC,EAAT,IAAeJ,SAAf,EAA0B;MACpBK,MAAML,UAAUI,EAAV,CAAV;MACID,WAAWE,IAAI,CAAJ,CAAX,KAAsB,IAA1B,EAAgC;eACnBA,IAAI,CAAJ,CAAX,IAAqB,EAArB;;;aAGSA,IAAI,CAAJ,CAAX,EAAmBA,IAAI,CAAJ,CAAnB,IAA6BD,EAA7B;;;;;AAKF,AAAO,SAASE,UAAT,CAAoBT,QAApB,EAA8B;MAC/BrX,MAAM,EAAV;OACK,IAAI7E,IAAI,CAAb,EAAgBA,IAAIkc,SAASzlB,MAA7B,EAAqCuJ,GAArC,EAA0C;QACpCrJ,UAAJ;QACIA,IAAI0lB,UAAUH,SAASlc,CAAT,CAAV,CAAR,EAAgC;UAC1B6E,IAAIlO,EAAE,CAAF,CAAJ,KAAa,IAAjB,EAAuB;YACjBA,EAAE,CAAF,CAAJ,IAAY,EAAZ;;;UAGEA,EAAE,CAAF,CAAJ,EAAUA,EAAE,CAAF,CAAV,IAAkB,IAAlB;;;;SAIGkO,GAAP;;;;;AAKF,SAAS+X,iBAAT,CAA2BC,CAA3B,EAA8B;MACvBjkB,IADuB,GACNikB,CADM;MACjBC,OADiB,GACND,CADM;;MAExBE,MAAMnkB,IAAN,CAAJ,EAAiB;QACXokB,WAAWd,SAAStjB,IAAT,KAAkBsjB,SAAStjB,IAAT,EAAe6iB,IAAhD;GADF,MAEO;QACDuB,WAAWpkB,IAAf;;;MAGEmkB,MAAMD,OAAN,CAAJ,EAAoB;QACdG,cAAcf,SAAStjB,IAAT,KAAkBsjB,SAAStjB,IAAT,EAAekkB,OAAf,CAApC;GADF,MAEO;QACDG,cAAcH,OAAlB;;;SAGK,CAACE,QAAD,EAAWC,WAAX,CAAP;;;;;;;AAOF,AAAO,SAASC,UAAT,CAAoBhB,QAApB,EAA8B;MAC/BrX,MAAM,EAAV;MACIrM,MAAMkD,OAAN,CAAcwgB,QAAd,CAAJ,EAA6B;SACtB,IAAIlc,IAAI,CAAb,EAAgBA,IAAIkc,SAASzlB,MAA7B,EAAqCuJ,GAArC,EAA0C;UACpCrJ,UAAJ;UACIkmB,IAAID,kBAAkBV,SAASlc,CAAT,CAAlB,CAAR;UACIrJ,IAAI6lB,WAAWK,EAAE,CAAF,CAAX,KAAoBL,WAAWK,EAAE,CAAF,CAAX,EAAiBA,EAAE,CAAF,CAAjB,CAA5B,EAAoD;YAC9ClmB,CAAJ,IAAS,IAAT;;;GALN,MASO,IAAI,QAAOulB,QAAP,yCAAOA,QAAP,OAAoB,QAAxB,EAAkC;SAClC,IAAItjB,IAAT,IAAiBsjB,QAAjB,EAA2B;UACrBC,WAAUD,SAAStjB,IAAT,CAAd;WACK,IAAIkkB,OAAT,IAAoBX,QAApB,EAA6B;YACvBxlB,WAAJ;YACIkmB,KAAID,kBAAkB,CAAChkB,IAAD,EAAOkkB,OAAP,CAAlB,CAAR;YACIX,SAAQW,OAAR,MAAqBnmB,KAAI6lB,WAAWK,GAAE,CAAF,CAAX,KAAoBL,WAAWK,GAAE,CAAF,CAAX,EAAiBA,GAAE,CAAF,CAAjB,CAA7C,CAAJ,EAA0E;cACpElmB,EAAJ,IAAS,IAAT;;;;;;SAMD,aAAYkO,GAAZ,CAAP;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC7hBF,AACA,IAEqBsY;0BACPxJ,KAAZ,EAAmB;;;SACZA,KAAL,GAAaA,KAAb;;;2BAGFqB,yBAAOxO,OAAO;YACJ,KAAKmN,KAAL,CAAWhY,OAAnB;WACO,CAAL;;eACS,KAAKgY,KAAL,CAAWiF,MAAX,CAAkB7K,OAAlB,CAA0BvH,KAA1B,CAAP;;WAEG,CAAL,CAJF;WAKO,CAAL;;cACM+N,MAAM,CAAV;cACItb,MAAM,KAAK0a,KAAL,CAAW9E,kBAAX,CAA8BC,MAA9B,GAAuC,CAAjD;;iBAEOyF,OAAOtb,GAAd,EAAmB;gBACbmO,MAAOmN,MAAMtb,GAAP,IAAe,CAAzB;gBACImkB,MAAM,KAAKzJ,KAAL,CAAW0J,QAAX,CAAoBjW,GAApB,CAAV;;;gBAGIgW,IAAIzO,UAAJ,KAAmB,MAAvB,EAA+B;qBACtB,IAAP;;;gBAGEnI,QAAQ4W,IAAIzO,UAAhB,EAA4B;oBACpBvH,MAAM,CAAZ;aADF,MAEO,IAAIZ,QAAQ4W,IAAI1O,SAAhB,EAA2B;oBAC1BtH,MAAM,CAAZ;aADK,MAEA;kBACD,KAAKuM,KAAL,CAAWhY,OAAX,KAAuB,CAA3B,EAA8B;uBACrByhB,IAAIhmB,KAAX;eADF,MAEO;uBACEgmB,IAAIxE,MAAJ,CAAWpS,QAAQ4W,IAAIzO,UAAvB,CAAP;;;;;iBAKC,IAAP;;;WAGG,CAAL;;;cACM4F,OAAM,CAAV;cACItb,OAAM,KAAK0a,KAAL,CAAW9E,kBAAX,CAA8BC,MAA9B,GAAuC,CAAjD;;iBAEOyF,QAAOtb,IAAd,EAAmB;gBACbmO,MAAOmN,OAAMtb,IAAP,IAAe,CAAzB;gBACImkB,MAAM,KAAKzJ,KAAL,CAAW0J,QAAX,CAAoBjW,GAApB,CAAV;;;gBAGIgW,IAAI5W,KAAJ,KAAc,MAAlB,EAA0B;qBACjB,IAAP;;;gBAGEA,QAAQ4W,IAAI5W,KAAhB,EAAuB;qBACfY,MAAM,CAAZ;aADF,MAEO,IAAIZ,QAAQ4W,IAAI5W,KAAhB,EAAuB;qBACtBY,MAAM,CAAZ;aADK,MAEA;qBACEgW,IAAIhmB,KAAX;;;;iBAIG,IAAP;;;WAGG,CAAL;;eACS,KAAKuc,KAAL,CAAWiF,MAAX,CAAkBpS,QAAQ,KAAKmN,KAAL,CAAWhF,UAArC,CAAP;;;cAGM,IAAI7X,KAAJ,mCAA0C,KAAK6c,KAAL,CAAWhY,OAArD,CAAN;;;;2BAKN2hB,yCAAeC,YAAY;QACrB1Y,MAAM,EAAV;;YAEQ,KAAK8O,KAAL,CAAWhY,OAAnB;WACO,CAAL,CADF;WAEO,CAAL;;+BACsB,KAAKgY,KAAL,CAAW0J,QAA/B,6GAAyC;;;;;;;;;;;;gBAAhCG,OAAgC;;gBAClC,KAAK7J,KAAL,CAAWhY,OAAX,KAAuB,CAAvB,IAA4B6hB,QAAQpmB,KAAR,KAAkBmmB,UAAnD,EAAgE;kBAC1D5nB,IAAJ,YAAYmP,MAAM0Y,QAAQ7O,UAAd,EAA0B6O,QAAQ9O,SAAR,GAAoB,CAA9C,CAAZ;aADF,MAEO;mBACA,IAAIrK,QAAQ,CAAjB,EAAoBA,QAAQmZ,QAAQ5E,MAAR,CAAeniB,MAA3C,EAAmD4N,OAAnD,EAA4D;oBACtDmZ,QAAQ5E,MAAR,CAAevU,KAAf,MAA0BkZ,UAA9B,EAA0C;sBACpC5nB,IAAJ,CAAS6nB,QAAQ7O,UAAR,GAAqBtK,KAA9B;;;;;;;;;WASL,CAAL;;;gCACsB,KAAKsP,KAAL,CAAW0J,QAA/B,oHAAyC;;;;;;;;;;;;gBAAhCG,QAAgC;;gBACnCA,SAAQpmB,KAAR,KAAkBmmB,UAAtB,EAAkC;kBAC5B5nB,IAAJ,CAAS6nB,SAAQhX,KAAjB;;;;;;;WAOD,CAAL;;;eACO,IAAIhQ,IAAI,CAAb,EAAgBA,IAAI,KAAKmd,KAAL,CAAWiF,MAAX,CAAkBniB,MAAtC,EAA8CD,GAA9C,EAAmD;gBAC7C,KAAKmd,KAAL,CAAWiF,MAAX,CAAkBpiB,CAAlB,MAAyB+mB,UAA7B,EAAyC;kBACnC5nB,IAAJ,CAAS,KAAKge,KAAL,CAAWhF,UAAX,GAAwBnY,CAAjC;;;;;;;;cAQE,IAAIM,KAAJ,mCAA0C,KAAK6c,KAAL,CAAWhY,OAArD,CAAN;;;WAGGkJ,GAAP;;;;yEA9CD9N;;AC1EH,IAAM0mB,sBAAsB,CAA5B;AACA,AAEA,IAAMC,oBAAoB,CAA1B;AACA,IAAMC,sBAAsB,CAA5B;AACA,IAAMC,sBAAsB,CAA5B;AACA,AAEA,IAAMC,eAAe,MAArB;;IAEqBC;2BACPC,UAAZ,EAAwB;;;SACjBA,UAAL,GAAkBA,UAAlB;SACKC,WAAL,GAAmB,IAAIb,cAAJ,CAAmBY,WAAWE,UAA9B,CAAnB;;;4BAGFljB,2BAAQ8L,QAAQqX,SAASC,cAAc;QACjCC,eAAeX,mBAAnB,CADqC;QAEjCpZ,QAAQ6Z,UAAUrX,OAAOpQ,MAAP,GAAgB,CAA1B,GAA8B,CAA1C;QACI4nB,MAAMH,UAAU,CAAC,CAAX,GAAe,CAAzB;;WAEQG,QAAQ,CAAR,IAAaha,SAASwC,OAAOpQ,MAA9B,IAA0C4nB,QAAQ,CAAC,CAAT,IAAcha,SAAS,CAAC,CAAzE,EAA6E;UACvEmC,QAAQ,IAAZ;UACI8X,YAAYX,mBAAhB;UACIY,gBAAgB,IAApB;;UAEIla,UAAUwC,OAAOpQ,MAAjB,IAA2B4N,UAAU,CAAC,CAA1C,EAA6C;oBAC/BqZ,iBAAZ;OADF,MAEO;gBACG7W,OAAOxC,KAAP,CAAR;YACImC,MAAMmR,EAAN,KAAa,MAAjB,EAAyB;;sBACXiG,mBAAZ;SADF,MAEO;sBACO,KAAKI,WAAL,CAAiBhJ,MAAjB,CAAwBxO,MAAMmR,EAA9B,CAAZ;cACI2G,aAAa,IAAjB,EAAuB;wBACTX,mBAAZ;;;;;UAKFa,MAAM,KAAKT,UAAL,CAAgBtO,UAAhB,CAA2B1B,OAA3B,CAAmCqQ,YAAnC,CAAV;UACIK,aAAaD,IAAIF,SAAJ,CAAjB;UACIlS,QAAQ,KAAK2R,UAAL,CAAgBW,UAAhB,CAA2B3Q,OAA3B,CAAmC0Q,UAAnC,CAAZ;;UAEIH,cAAcZ,iBAAd,IAAmCY,cAAeV,mBAAtD,EAA2E;qBAC5DpX,KAAb,EAAoB4F,KAApB,EAA2B/H,KAA3B;wBACgB,EAAE+H,MAAM8D,KAAN,GAAc2N,YAAhB,CAAhB;;;qBAGazR,MAAMuS,QAArB;UACIJ,aAAJ,EAAmB;iBACRF,GAAT;;;;WAIGxX,MAAP;;;;;;;;;4BAOF+X,6BAASC,MAAoC;QAA9BC,KAA8B,uEAAtB,CAAsB;QAAnBC,OAAmB,uEAAT,UAAS;;QACvCA,QAAQtnB,GAAR,CAAYqnB,KAAZ,CAAJ,EAAwB;;;;YAIhBE,GAAR,CAAYF,KAAZ;;sBAEyC,KAAKf,UAPH;QAOtC3O,QAPsC,eAOtCA,QAPsC;QAO5BK,UAP4B,eAO5BA,UAP4B;QAOhBiP,UAPgB,eAOhBA,UAPgB;;QAQvCF,MAAM/O,WAAW1B,OAAX,CAAmB+Q,KAAnB,CAAV;;;SAGK,IAAIR,YAAY,CAArB,EAAwBA,YAAYlP,QAApC,EAA8CkP,WAA9C,EAA2D;UACrDG,aAAaD,IAAIF,SAAJ,CAAjB;UACIlS,QAAQsS,WAAW3Q,OAAX,CAAmB0Q,UAAnB,CAAZ;;;2BAGkB,KAAKT,WAAL,CAAiBV,cAAjB,CAAgCgB,SAAhC,CAAlB,6GAA8D;;;;;;;;;;;;YAArD9X,KAAqD;;YACxDqY,KAAKI,KAAT,EAAgB;eACTA,KAAL,CAAWzY,KAAX,EAAkB4F,KAAlB;;;YAGEA,MAAMuS,QAAN,KAAmB,CAAvB,EAA0B;eACnBC,QAAL,CAAcC,IAAd,EAAoBzS,MAAMuS,QAA1B,EAAoCI,OAApC;;;YAGEF,KAAKK,IAAT,EAAe;eACRA,IAAL,CAAU1Y,KAAV,EAAiB4F,KAAjB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC1FV,AACA,AACA,AAEA;AACA,IAAM+S,aAAa,MAAnB;AACA,IAAMC,YAAa,MAAnB;AACA,IAAMC,OAAa,MAAnB;;;AAGA,IAAMC,WAAW,MAAjB;;;AAGA,IAAMC,gBAAiB,MAAvB;AACA,IAAMC,iBAAiB,MAAvB;;;AAGA,IAAMC,YAAc,UAApB;AACA,IAAMC,aAAc,UAApB;AACA,IAAMC,cAAc,UAApB;;AAEA,AACA,IAAMC,oBAA0B,QAAhC;AACA,AAEA,AAEA,AACA,IAAMC,wBAA0B,MAAhC;AACA,IAAMC,uBAA0B,MAAhC;AACA,IAAMC,uBAA0B,MAAhC;AACA,IAAMC,sBAA0B,MAAhC;;IAEqBC;4BACP3pB,IAAZ,EAAkB;;;SACX4pB,wBAAL,GAAgC,KAAKA,wBAAL,CAA8BC,IAA9B,CAAmC,IAAnC,CAAhC;SACKC,6BAAL,GAAqC,KAAKA,6BAAL,CAAmCD,IAAnC,CAAwC,IAAxC,CAArC;SACKE,eAAL,GAAuB,KAAKA,eAAL,CAAqBF,IAArB,CAA0B,IAA1B,CAAvB;SACKG,iCAAL,GAAyC,KAAKA,iCAAL,CAAuCH,IAAvC,CAA4C,IAA5C,CAAzC;SACKI,qBAAL,GAA6B,KAAKA,qBAAL,CAA2BJ,IAA3B,CAAgC,IAAhC,CAA7B;SACK7pB,IAAL,GAAYA,IAAZ;SACKid,IAAL,GAAYjd,KAAKid,IAAjB;SACKiN,UAAL,GAAkB,IAAlB;;;;;;;6BAKFzlB,2BAAQ8L,QAAuB;QAAfqV,QAAe,uEAAJ,EAAI;;yBACX,KAAK3I,IAAL,CAAUkN,MAA5B,6GAAoC;;;;;;;;;;;;UAA3BC,KAA2B;;UAC9BxQ,QAAQwQ,MAAMC,YAAlB;;;4BAGoBD,MAAMxE,QAA1B,oHAAoC;;;;;;;;;;;;YAA3BC,OAA2B;;YAC9BU,UAAJ;YACI,CAACA,IAAIX,SAASC,QAAQyE,WAAjB,CAAL,KAAuC/D,EAAEV,QAAQ0E,cAAV,CAA3C,EAAsE;mBAC3D1E,QAAQ2E,YAAjB;mBACS3E,QAAQ4E,WAAjB;;;;4BAIiBL,MAAMM,SAA3B,oHAAsC;;;;;;;;;;;;YAA7B5I,QAA6B;;YAChCA,SAAS6I,eAAT,GAA2B/Q,KAA/B,EAAsC;eAC/BgR,eAAL,CAAqB9I,QAArB,EAA+BvR,MAA/B;;;;;;QAMFxC,QAAQwC,OAAOpQ,MAAP,GAAgB,CAA5B;WACO4N,SAAS,CAAhB,EAAmB;UACbwC,OAAOxC,KAAP,EAAcsT,EAAd,KAAqB,MAAzB,EAAiC;eACxBwJ,MAAP,CAAc9c,KAAd,EAAqB,CAArB;;;;;;WAMGwC,MAAP;;;6BAGFqa,2CAAgB9I,UAAUvR,QAAQ;SAC3BuR,QAAL,GAAgBA,QAAhB;SACKvR,MAAL,GAAcA,MAAd;QACI,KAAKuR,QAAL,CAAcxf,IAAd,KAAuB,CAA3B,EAA8B;WACvB0nB,iCAAL,CAAuC,KAAKlI,QAA5C,EAAsD,KAAKvR,MAA3D;;;;SAIGua,aAAL,GAAqB,EAArB;SACKC,WAAL,GAAmB,IAAnB;SACK1S,UAAL,GAAkB,IAAlB;SACKD,SAAL,GAAiB,IAAjB;SACK4S,WAAL,GAAmB,IAAnB;;QAEIC,eAAe,KAAKC,eAAL,CAAqBpJ,QAArB,CAAnB;QACIrd,UAAU,KAAK0mB,YAAL,EAAd;;QAEIvD,UAAU,CAAC,EAAE,KAAK9F,QAAL,CAAcL,QAAd,GAAyB6H,iBAA3B,CAAf;WACO2B,aAAaxmB,OAAb,CAAqB,KAAK8L,MAA1B,EAAkCqX,OAAlC,EAA2CnjB,OAA3C,CAAP;;;6BAIFymB,2CAAgBpJ,UAAU;WACjB,IAAI0F,eAAJ,CAAoB1F,SAASzE,KAAT,CAAeoK,UAAnC,CAAP;;;6BAGF0D,uCAAe;YACL,KAAKrJ,QAAL,CAAcxf,IAAtB;WACO,CAAL;eACS,KAAKsnB,wBAAZ;WACG,CAAL;eACS,KAAKE,6BAAZ;WACG,CAAL;eACS,KAAKC,eAAZ;WACG,CAAL;eACS,KAAKC,iCAAZ;WACG,CAAL;eACS,KAAKC,qBAAZ;;cAEM,IAAIzpB,KAAJ,kCAAyC,KAAKshB,QAAL,CAAcxf,IAAvD,CAAN;;;;6BAINsnB,6DAAyB1Z,OAAO4F,OAAO/H,OAAO;QACxC+H,MAAM8D,KAAN,GAAciP,UAAlB,EAA8B;WACvBxQ,UAAL,GAAkBtK,KAAlB;;;QAGE+H,MAAM8D,KAAN,GAAckP,SAAlB,EAA6B;WACtB1Q,SAAL,GAAiBrK,KAAjB;;;kBAGY,KAAKwC,MAAnB,EAA2BuF,MAAM8D,KAAN,GAAcmP,IAAzC,EAA+C,KAAK1Q,UAApD,EAAgE,KAAKD,SAArE;;;6BAGF0R,uEAA8B5Z,OAAO4F,OAAO/H,OAAO;QAC7Cqd,eAAe,KAAKtJ,QAAL,CAAczE,KAAd,CAAoBgO,iBAApB,CAAsCC,KAAzD;QACIxV,MAAMyV,SAAN,KAAoB,MAAxB,EAAgC;UAC1B7M,SAAS0M,aAAa3T,OAAb,CAAqB3B,MAAMyV,SAA3B,CAAb;UACI7D,cAAc,IAAIb,cAAJ,CAAmBnI,MAAnB,CAAlB;cACQ,KAAKnO,MAAL,CAAY,KAAKwa,WAAjB,CAAR;UACI1a,MAAMqX,YAAYhJ,MAAZ,CAAmBxO,MAAMmR,EAAzB,CAAV;UACIhR,GAAJ,EAAS;aACFE,MAAL,CAAY,KAAKwa,WAAjB,IAAgC,KAAK/qB,IAAL,CAAUwrB,QAAV,CAAmBnb,GAAnB,EAAwBH,MAAMmT,UAA9B,CAAhC;;;;QAIAvN,MAAM2V,YAAN,KAAuB,MAA3B,EAAmC;UAC7B/M,UAAS0M,aAAa3T,OAAb,CAAqB3B,MAAM2V,YAA3B,CAAb;UACI/D,eAAc,IAAIb,cAAJ,CAAmBnI,OAAnB,CAAlB;cACQ,KAAKnO,MAAL,CAAYxC,KAAZ,CAAR;UACIsC,MAAMqX,aAAYhJ,MAAZ,CAAmBxO,MAAMmR,EAAzB,CAAV;UACIhR,GAAJ,EAAS;aACFE,MAAL,CAAYxC,KAAZ,IAAqB,KAAK/N,IAAL,CAAUwrB,QAAV,CAAmBnb,GAAnB,EAAwBH,MAAMmT,UAA9B,CAArB;;;;QAIAvN,MAAM8D,KAAN,GAAcoP,QAAlB,EAA4B;WACrB+B,WAAL,GAAmBhd,KAAnB;;;;6BAIJgc,2CAAgB7Z,OAAO4F,OAAO/H,OAAO;QAC/B+H,MAAM8D,KAAN,GAAcqP,aAAlB,EAAiC;WAC1B6B,aAAL,CAAmBzrB,IAAnB,CAAwB0O,KAAxB;;;QAGE+H,MAAM8D,KAAN,GAAcsP,cAAlB,EAAkC;;;UAC5BwC,UAAU,KAAK5J,QAAL,CAAczE,KAAd,CAAoBsO,eAAlC;UACIC,aAAa,KAAK9J,QAAL,CAAczE,KAAd,CAAoBuO,UAArC;UACIC,eAAe,KAAK/J,QAAL,CAAczE,KAAd,CAAoBwO,YAAvC;;UAEIC,cAAchW,MAAMiW,MAAxB;UACIC,OAAO,KAAX;UACIC,gBAAgB,CAApB;UACI5I,aAAa,EAAjB;UACI6I,iBAAiB,EAArB;;aAEO,CAACF,IAAR,EAAc;;;YACRG,iBAAiB,KAAKrB,aAAL,CAAmBxgB,GAAnB,EAArB;mCACW8hB,OAAX,oBAAsB,KAAK7b,MAAL,CAAY4b,cAAZ,EAA4B9I,UAAlD;;YAEI0I,SAASL,QAAQjU,OAAR,CAAgBqU,aAAhB,CAAb;eACO,CAAC,EAAEC,SAAS5C,SAAX,CAAR;YACIkD,QAAQ,CAAC,EAAEN,SAAS3C,UAAX,CAAb;YACIjiB,SAAS,CAAC4kB,SAAS1C,WAAV,KAA0B,CAA1B,IAA+B,CAA5C,CAPY;kBAQF,KAAK9Y,MAAL,CAAY4b,cAAZ,EAA4B9K,EAAtC;;YAEIiL,YAAYV,WAAWnU,OAAX,CAAmBtQ,MAAnB,CAAhB;yBACiBmlB,SAAjB;;YAEIN,QAAQK,KAAZ,EAAmB;cACbE,gBAAgBV,aAAapU,OAAb,CAAqBwU,aAArB,CAApB;eACK1b,MAAL,CAAY4b,cAAZ,IAA8B,KAAKnsB,IAAL,CAAUwrB,QAAV,CAAmBe,aAAnB,EAAkClJ,UAAlC,CAA9B;yBACehkB,IAAf,CAAoB8sB,cAApB;0BACgB,CAAhB;uBACa,EAAb;SALF,MAMO;eACA5b,MAAL,CAAY4b,cAAZ,IAA8B,KAAKnsB,IAAL,CAAUwrB,QAAV,CAAmB,MAAnB,CAA9B;;;;;6BAKCV,aAAL,EAAmBzrB,IAAnB,uBAA2B6sB,cAA3B;;;;6BAIJlC,+EAAkClI,UAAUvR,QAAQxC,OAAO;QACrD2Z,cAAc,IAAIb,cAAJ,CAAmB/E,SAASzE,KAAT,CAAeqK,WAAlC,CAAlB;;SAEK3Z,QAAQ,CAAb,EAAgBA,QAAQwC,OAAOpQ,MAA/B,EAAuC4N,OAAvC,EAAgD;UAC1CmC,QAAQK,OAAOxC,KAAP,CAAZ;UACImC,MAAMmR,EAAN,KAAa,MAAjB,EAAyB;YACnBhR,MAAMqX,YAAYhJ,MAAZ,CAAmBxO,MAAMmR,EAAzB,CAAV;YACIhR,GAAJ,EAAS;;iBACAtC,KAAP,IAAgB,KAAK/N,IAAL,CAAUwrB,QAAV,CAAmBnb,GAAnB,EAAwBH,MAAMmT,UAA9B,CAAhB;;;;;;6BAMRmJ,uCAAcrL,YAAYsL,sBAAsB9mB,OAAO+mB,UAAU;;;QAC3DC,aAAa,EAAjB;WACOhnB,OAAP,EAAgB;UACV0K,MAAM,KAAKyR,QAAL,CAAczE,KAAd,CAAoBuP,gBAApB,CAAqCnV,OAArC,CAA6CgV,sBAA7C,CAAV;iBACWptB,IAAX,CAAgB,KAAKW,IAAL,CAAUwrB,QAAV,CAAmBnb,GAAnB,CAAhB;;;QAGE,CAACqc,QAAL,EAAe;;;;oBAIVnc,MAAL,EAAYsa,MAAZ,iBAAmB1J,UAAnB,EAA+B,CAA/B,SAAqCwL,UAArC;;;6BAGF1C,uDAAsB/Z,OAAO4F,OAAO/H,OAAO;QACrC+H,MAAM8D,KAAN,GAAcoP,QAAlB,EAA4B;WACrBgC,WAAL,GAAmBjd,KAAnB;;;QAGE+H,MAAM+W,iBAAN,KAA4B,MAAhC,EAAwC;UAClClnB,QAAQ,CAACmQ,MAAM8D,KAAN,GAAc8P,mBAAf,MAAwC,CAApD;UACIgD,WAAW,CAAC,EAAE5W,MAAM8D,KAAN,GAAc4P,oBAAhB,CAAhB;WACKgD,aAAL,CAAmB,KAAKxB,WAAxB,EAAqClV,MAAM+W,iBAA3C,EAA8DlnB,KAA9D,EAAqE+mB,QAArE;;;QAGE5W,MAAMgX,kBAAN,KAA6B,MAAjC,EAAyC;UACnCnnB,SAAQ,CAACmQ,MAAM8D,KAAN,GAAc6P,oBAAf,MAAyC,CAArD;UACIiD,YAAW,CAAC,EAAE5W,MAAM8D,KAAN,GAAc2P,qBAAhB,CAAhB;WACKiD,aAAL,CAAmBze,KAAnB,EAA0B+H,MAAMgX,kBAAhC,EAAoDnnB,MAApD,EAA2D+mB,SAA3D;;;;6BAIJK,uDAAuB;QACjBnH,WAAW,EAAf;0BACkB,KAAK3I,IAAL,CAAUkN,MAA5B,oHAAoC;;;;;;;;;;;;UAA3BC,KAA2B;;4BACdA,MAAMxE,QAA1B,oHAAoC;;;;;;;;;;;;YAA3BC,OAA2B;;iBACzBxmB,IAAT,CAAc,CAACwmB,QAAQyE,WAAT,EAAsBzE,QAAQ0E,cAA9B,CAAd;;;;WAIG3E,QAAP;;;6BAGFoH,yCAAe3c,KAAK;QACd,CAAC,KAAK6Z,UAAV,EAAsB;WACf+C,kBAAL;;;WAGK,KAAK/C,UAAL,CAAgB7Z,GAAhB,KAAwB,EAA/B;;;6BAGF4c,mDAAqB;SACd/C,UAAL,GAAkB,EAAlB;;0BAEkB,KAAKjN,IAAL,CAAUkN,MAA5B,oHAAoC;;;;;;;;;;;;UAA3BC,KAA2B;;UAC9BxQ,QAAQwQ,MAAMC,YAAlB;;4BAEqBD,MAAMM,SAA3B,oHAAsC;;;;;;;;;;;;YAA7B5I,QAA6B;;YAChCA,SAAS6I,eAAT,GAA2B/Q,KAA/B,EAAsC;eAC/BsT,yBAAL,CAA+BpL,QAA/B;;;;;;6BAMRoL,+DAA0BpL,UAAU;;;;QAE9BA,SAASxf,IAAT,KAAkB,CAAtB,EAAyB;;;;QAIrBslB,UAAU,CAAC,EAAE9F,SAASL,QAAT,GAAoB6H,iBAAtB,CAAf;QACI1B,OAAJ,EAAa;YACL,IAAIpnB,KAAJ,CAAU,kCAAV,CAAN;;;SAGGshB,QAAL,GAAgBA,QAAhB;SACKgJ,aAAL,GAAqB,EAArB;;QAEIG,eAAe,KAAKC,eAAL,CAAqBpJ,QAArB,CAAnB;QACIrd,UAAU,KAAK0mB,YAAL,EAAd;;QAEIgC,QAAQ,EAAZ;QACIC,QAAQ,EAAZ;SACK7c,MAAL,GAAc,EAAd;;iBAEa+X,QAAb,CAAsB;aACb,eAACpY,KAAD,EAAQ4F,KAAR,EAAkB;YACnBvF,SAAS,MAAKA,MAAlB;cACMlR,IAAN,CAAW;kBACDkR,OAAOyV,KAAP,EADC;yBAEM,MAAK8E,aAAL,CAAmB9E,KAAnB;SAFjB;;;YAMIhF,IAAI,MAAKhhB,IAAL,CAAUwrB,QAAV,CAAmBtb,KAAnB,CAAR;cACM7Q,IAAN,CAAW2hB,CAAX;eACO3hB,IAAP,CAAY8tB,MAAMA,MAAMhtB,MAAN,GAAe,CAArB,CAAZ;;;gBAGQoQ,OAAOA,OAAOpQ,MAAP,GAAgB,CAAvB,CAAR,EAAmC2V,KAAnC,EAA0CvF,OAAOpQ,MAAP,GAAgB,CAA1D;;;YAGIwF,QAAQ,CAAZ;YACI0nB,QAAQ,CAAZ;aACK,IAAIntB,IAAI,CAAb,EAAgBA,IAAIqQ,OAAOpQ,MAAX,IAAqBwF,SAAS,CAA9C,EAAiDzF,GAAjD,EAAsD;cAChDqQ,OAAOrQ,CAAP,EAAUmhB,EAAV,KAAiB,MAArB,EAA6B;;oBAEnB9Q,OAAOrQ,CAAP,EAAUmhB,EAAlB;;;;YAIA1b,UAAU,CAAd,EAAiB;cACXvE,SAAS+rB,MAAMjkB,GAAN,CAAU;mBAAK8X,EAAEK,EAAP;WAAV,CAAb;cACI5gB,SAAQ,MAAKypB,UAAL,CAAgBmD,KAAhB,CAAZ;cACI5sB,MAAJ,EAAW;mBACHpB,IAAN,CAAW+B,MAAX;WADF,MAEO;kBACA8oB,UAAL,CAAgBmD,KAAhB,IAAyB,CAACjsB,MAAD,CAAzB;;;OAhCc;;YAqCd,gBAAM;yBACkDgsB,MAAM9iB,GAAN,EADlD;;cACKiG,MADL,cACRA,MADQ;cACiCua,aADjC,cACaA,aADb;;cAEJxgB,GAAN;;KAvCJ;;;;0EA9MD7J;;AA2PH,AAGA,SAAS6sB,IAAT,CAAc/c,MAAd,EAAsBgd,MAAtB,EAA8BC,MAA9B,EAA0E;MAApCC,QAAoC,uEAAzB,KAAyB;MAAlBC,QAAkB,uEAAP,KAAO;;MACpEzmB,MAAMsJ,OAAOsa,MAAP,CAAc2C,OAAO,CAAP,KAAaA,OAAO,CAAP,IAAY,CAAzB,CAAd,EAA2CA,OAAO,CAAP,CAA3C,CAAV;MACIE,QAAJ,EAAc;QACR9F,OAAJ;;;MAGE5gB,QAAQuJ,OAAOsa,MAAP,gBAAc0C,OAAO,CAAP,CAAd,EAAyBA,OAAO,CAAP,CAAzB,SAAuCtmB,GAAvC,EAAZ;MACIwmB,QAAJ,EAAc;UACN7F,OAAN;;;SAGKiD,MAAP,gBAAc2C,OAAO,CAAP,KAAaD,OAAO,CAAP,IAAY,CAAzB,CAAd,EAA2C,CAA3C,SAAiDvmB,KAAjD;SACOuJ,MAAP;;;AAGF,SAASod,aAAT,CAAuBpd,MAAvB,EAA+Bqd,IAA/B,EAAqCvV,UAArC,EAAiDD,SAAjD,EAA4D;MACtDjY,SAASiY,YAAYC,UAAZ,GAAyB,CAAtC;UACQuV,IAAR;SACO,CAAL;;aACSrd,MAAP;;SAEG,CAAL;;aACS+c,KAAK/c,MAAL,EAAa,CAAC8H,UAAD,EAAa,CAAb,CAAb,EAA8B,CAACD,SAAD,EAAY,CAAZ,CAA9B,CAAP;;SAEG,CAAL;;aACSkV,KAAK/c,MAAL,EAAa,CAAC8H,UAAD,EAAa,CAAb,CAAb,EAA8B,CAACD,SAAD,EAAY,CAAZ,CAA9B,CAAP;;SAEG,CAAL;;aACSkV,KAAK/c,MAAL,EAAa,CAAC8H,UAAD,EAAa,CAAb,CAAb,EAA8B,CAACD,SAAD,EAAY,CAAZ,CAA9B,CAAP;;SAEG,CAAL;;aACSkV,KAAK/c,MAAL,EAAa,CAAC8H,UAAD,EAAa,CAAb,CAAb,EAA8B,CAACD,SAAD,EAAY,CAAZ,CAA9B,CAAP;;SAEG,CAAL;;aACSkV,KAAK/c,MAAL,EAAa,CAAC8H,UAAD,EAAa,CAAb,CAAb,EAA8B,CAACD,SAAD,EAAY,CAAZ,CAA9B,EAA8C,IAA9C,EAAoD,KAApD,CAAP;;SAEG,CAAL;;aACSkV,KAAK/c,MAAL,EAAa,CAAC8H,UAAD,EAAa,CAAb,CAAb,EAA8B,CAACD,SAAD,EAAY,CAAZ,CAA9B,CAAP;;SAEG,CAAL;;aACSkV,KAAK/c,MAAL,EAAa,CAAC8H,UAAD,EAAa,CAAb,CAAb,EAA8B,CAACD,SAAD,EAAY,CAAZ,CAA9B,EAA8C,KAA9C,EAAqD,IAArD,CAAP;;SAEG,CAAL;;aACSkV,KAAK/c,MAAL,EAAa,CAAC8H,UAAD,EAAa,CAAb,CAAb,EAA8B,CAACD,SAAD,EAAY,CAAZ,CAA9B,CAAP;;SAEG,CAAL;;aACSkV,KAAK/c,MAAL,EAAa,CAAC8H,UAAD,EAAa,CAAb,CAAb,EAA8B,CAACD,SAAD,EAAY,CAAZ,CAA9B,EAA8C,KAA9C,EAAqD,IAArD,CAAP;;SAEG,EAAL;;aACSkV,KAAK/c,MAAL,EAAa,CAAC8H,UAAD,EAAa,CAAb,CAAb,EAA8B,CAACD,SAAD,EAAY,CAAZ,CAA9B,CAAP;;SAEG,EAAL;;aACSkV,KAAK/c,MAAL,EAAa,CAAC8H,UAAD,EAAa,CAAb,CAAb,EAA8B,CAACD,SAAD,EAAY,CAAZ,CAA9B,EAA8C,IAA9C,EAAoD,KAApD,CAAP;;SAEG,EAAL;;aACSkV,KAAK/c,MAAL,EAAa,CAAC8H,UAAD,EAAa,CAAb,CAAb,EAA8B,CAACD,SAAD,EAAY,CAAZ,CAA9B,CAAP;;SAEG,EAAL;;aACSkV,KAAK/c,MAAL,EAAa,CAAC8H,UAAD,EAAa,CAAb,CAAb,EAA8B,CAACD,SAAD,EAAY,CAAZ,CAA9B,EAA8C,IAA9C,EAAoD,KAApD,CAAP;;SAEG,EAAL;;aACSkV,KAAK/c,MAAL,EAAa,CAAC8H,UAAD,EAAa,CAAb,CAAb,EAA8B,CAACD,SAAD,EAAY,CAAZ,CAA9B,EAA8C,KAA9C,EAAqD,IAArD,CAAP;;SAEG,EAAL;;aACSkV,KAAK/c,MAAL,EAAa,CAAC8H,UAAD,EAAa,CAAb,CAAb,EAA8B,CAACD,SAAD,EAAY,CAAZ,CAA9B,EAA8C,IAA9C,EAAoD,IAApD,CAAP;;;YAGM,IAAI5X,KAAJ,oBAA2BotB,IAA3B,CAAN;;;;IClaeC;2BACP7tB,IAAZ,EAAkB;;;SACXA,IAAL,GAAYA,IAAZ;SACK8tB,aAAL,GAAqB,IAAInE,gBAAJ,CAAqB3pB,IAArB,CAArB;;;4BAGF+tB,iCAAWxd,QAAQqV,UAAUN,QAAQzgB,UAAU;;;QAGzCmpB,QAAQljB,SAAA,CAAiBwa,MAAjB,MAA6B,KAAzC;QACI0I,KAAJ,EAAW;aACFpG,OAAP;;;SAGGkG,aAAL,CAAmBrpB,OAAnB,CAA2B8L,MAA3B,EAAmC0d,UAAA,CAAyBrI,QAAzB,CAAnC;WACOrV,MAAP;;;4BAGF2d,qDAAqB5I,QAAQzgB,UAAU;WAC9BopB,UAAA,CAAyB,KAAKH,aAAL,CAAmBf,oBAAnB,EAAzB,CAAP;;;4BAGFoB,2CAAgB9d,KAAK;QACf+d,eAAe,KAAKN,aAAL,CAAmBd,cAAnB,CAAkC3c,GAAlC,CAAnB;QACIjP,SAAS,UAAb;;yBAEmBgtB,YAAnB,6GAAiC;;;;;;;;;;;;UAAxB7d,MAAwB;;WAC1B8d,WAAL,CAAiB9d,MAAjB,EAAyB,CAAzB,EAA4BnP,MAA5B,EAAoC,EAApC;;;WAGKA,MAAP;;;4BAGFitB,mCAAY9d,QAAQxC,OAAOugB,SAASppB,QAAQ;QACtCme,aAAa,KAAKrjB,IAAL,CAAUuuB,cAAV,CAAyB1N,kBAAzB,CAA4CtQ,OAAOxC,KAAP,CAA5C,CAAjB;;0BAEsBsV,UAAtB,oHAAkC;;;;;;;;;;;;UAAzBiB,SAAyB;;UAC5B9c,IAAItC,SAAS,sBAAqBof,SAArB,CAAjB;UACIvW,QAAQwC,OAAOpQ,MAAP,GAAgB,CAA5B,EAA+B;aACxBkuB,WAAL,CAAiB9d,MAAjB,EAAyBxC,QAAQ,CAAjC,EAAoCugB,OAApC,EAA6C9mB,CAA7C;OADF,MAEO;gBACGkhB,GAAR,CAAYlhB,CAAZ;;;;;;;;AC3CR;;;;;;;;;;IASqBgnB;uBACPxuB,IAAZ,EAAkBslB,MAAlB,EAA0BzgB,QAA1B,EAAoC;;;SAC7B7E,IAAL,GAAYA,IAAZ;SACKslB,MAAL,GAAcA,MAAd;SACKzgB,QAAL,GAAgBA,QAAhB;SACK8gB,SAAL,GAAiB7a,SAAA,CAAiBwa,MAAjB,CAAjB;SACKmJ,MAAL,GAAc,EAAd;SACKC,cAAL,GAAsB,EAAtB;SACKC,WAAL,GAAmB,EAAnB;;;;;;;;;wBAOFC,qCAAahJ,UAAU;QACjBiJ,QAAQ,KAAKJ,MAAL,CAAY,KAAKA,MAAL,CAAYtuB,MAAZ,GAAqB,CAAjC,CAAZ;yBACoBylB,QAApB,6GAA8B;;;;;;;;;;;;UAArBC,OAAqB;;UACxB,CAAC,KAAK8I,WAAL,CAAiB9I,OAAjB,CAAL,EAAgC;cACxBxmB,IAAN,CAAWwmB,OAAX;aACK8I,WAAL,CAAiB9I,OAAjB,IAA4B,IAA5B;;;;;;;;;;wBAQNiJ,iCAAWlJ,UAAU;0BACCA,QAApB,oHAA8B;;;;;;;;;;;;UAArBC,OAAqB;;WACvB6I,cAAL,CAAoB7I,OAApB,IAA+B,IAA/B;;;;;;;;;wBAOJ6C,mBAAIqG,KAAoB;QAAfC,MAAe,uEAAN,IAAM;;QAClB,KAAKP,MAAL,CAAYtuB,MAAZ,KAAuB,CAA3B,EAA8B;WACvBsuB,MAAL,CAAYpvB,IAAZ,CAAiB,EAAjB;;;QAGE,OAAO0vB,GAAP,KAAe,QAAnB,EAA6B;YACrB,CAACA,GAAD,CAAN;;;QAGE7sB,MAAMkD,OAAN,CAAc2pB,GAAd,CAAJ,EAAwB;WACjBH,YAAL,CAAkBG,GAAlB;UACIC,MAAJ,EAAY;aACLF,UAAL,CAAgBC,GAAhB;;KAHJ,MAKO,IAAI,QAAOA,GAAP,yCAAOA,GAAP,OAAe,QAAnB,EAA6B;UAC9BnJ,WAAW,CAACmJ,IAAIC,MAAJ,IAAc,EAAf,EAAmB/hB,MAAnB,CAA0B8hB,IAAIE,KAAJ,IAAa,EAAvC,CAAf;WACKL,YAAL,CAAkBhJ,QAAlB;UACImJ,IAAIC,MAAR,EAAgB;aACTF,UAAL,CAAgBC,IAAIC,MAApB;;KAJG,MAMA;YACC,IAAIxuB,KAAJ,CAAU,yCAAV,CAAN;;;;;;;;;wBAOJ0uB,6BAASH,KAAKC,QAAQ;QAChB,OAAOD,GAAP,KAAe,UAAnB,EAA+B;WACxBN,MAAL,CAAYpvB,IAAZ,CAAiB0vB,GAAjB,EAAsB,EAAtB;KADF,MAEO;WACAN,MAAL,CAAYpvB,IAAZ,CAAiB,EAAjB;WACKqpB,GAAL,CAASqG,GAAT,EAAcC,MAAd;;;;;;;;;wBAOJG,qDAAqB5e,QAAQ;0BACTA,MAAlB,oHAA0B;;;;;;;;;;;;UAAjBL,KAAiB;;WACnB,IAAI2V,OAAT,IAAoB,KAAK6I,cAAzB,EAAyC;cACjC9I,QAAN,CAAeC,OAAf,IAA0B,IAA1B;;;;;;;;;;wBAQNphB,2BAAQ2qB,WAAW7e,QAAQ2Q,WAAW;cAC1BmO,YAAV,CAAuB,KAAK/J,MAA5B,EAAoC,KAAKzgB,QAAzC;;0BAEkB,KAAK4pB,MAAvB,oHAA+B;;;;;;;;;;;;UAAtBI,KAAsB;;UACzB,OAAOA,KAAP,KAAiB,UAArB,EAAiC;YAC3B,CAAC3N,SAAL,EAAgB;gBACR,KAAKlhB,IAAX,EAAiBuQ,MAAjB,EAAyB2Q,SAAzB;;OAFJ,MAKO,IAAI2N,MAAM1uB,MAAN,GAAe,CAAnB,EAAsB;kBACjBmvB,aAAV,CAAwBT,KAAxB,EAA+Bte,MAA/B,EAAuC2Q,SAAvC;;;;;;;;;;AC7GR,AAEA,IAAMqO,qBAAqB,CAAC,MAAD,CAA3B;AACA,IAAMC,kBAAkB,CAAC,MAAD,EAAS,MAAT,EAAiB,MAAjB,EAAyB,MAAzB,EAAiC,MAAjC,CAAxB;AACA,IAAMC,sBAAsB,CAAC,MAAD,EAAS,MAAT,EAAiB,MAAjB,CAA5B;AACA,IAAMC,sBAAsB,CAAC,MAAD,EAAS,MAAT,EAAiB,MAAjB,EAAyB,MAAzB,EAAiC,MAAjC,EAAyC,MAAzC,CAA5B;AACA,AACA,IAAMC,uBAAuB;OACtB,CAAC,MAAD,EAAS,MAAT,CADsB;OAEtB,CAAC,MAAD,EAAS,MAAT;CAFP;;IAKqBC;;;;;gBAEZC,qBAAKA,OAAMtf,QAAQqV,UAAU;;SAE7BkK,iBAAL,CAAuBD,KAAvB;SACKE,YAAL,CAAkBF,KAAlB;SACKG,kBAAL,CAAwBH,KAAxB,EAA8BjK,QAA9B;;;UAGKuJ,oBAAL,CAA0B5e,MAA1B;;;SAGK0f,cAAL,CAAoBJ,KAApB,EAA0Btf,MAA1B;;;gBAGKuf,+CAAkBD,MAAM;SACxBnH,GAAL,CAAS;wBACK6G,kBAAZ,EAAmCI,qBAAqBE,KAAKlK,SAA1B,CAAnC,CADO;aAEA8J;KAFT;;;gBAMKM,qCAAaF,MAAM;;;;gBAInBG,iDAAmBH,MAAMK,cAAc;SACvCxH,GAAL,WAAa8G,eAAb,EAAiCE,mBAAjC,EAAyDQ,YAAzD;;;gBAGKD,yCAAeJ,MAAMtf,QAAQ;;QAE9BrQ,IAAI,CAAR;WACOA,IAAIqQ,OAAOpQ,MAAlB,EAA0B;UACpB+P,QAAQK,OAAOrQ,CAAP,CAAZ;UACIgQ,MAAMmT,UAAN,CAAiB,CAAjB,MAAwB,MAA5B,EAAoC;;YAC9Brc,QAAQ9G,IAAI,CAAhB;YACI+G,MAAM/G,IAAI,CAAd;;;eAGO8G,SAAS,CAAT,IAAcud,QAAQ4L,OAAR,CAAgB5f,OAAOvJ,KAAP,EAAcqc,UAAd,CAAyB,CAAzB,CAAhB,CAArB,EAAmE;iBAC1Drc,KAAP,EAAc4e,QAAd,CAAuBwK,IAAvB,GAA8B,IAA9B;iBACOppB,KAAP,EAAc4e,QAAd,CAAuByK,IAAvB,GAA8B,IAA9B;;;;;eAKKppB,MAAMsJ,OAAOpQ,MAAb,IAAuBokB,QAAQ4L,OAAR,CAAgB5f,OAAOtJ,GAAP,EAAYoc,UAAZ,CAAuB,CAAvB,CAAhB,CAA9B,EAA0E;iBACjEpc,GAAP,EAAY2e,QAAZ,CAAqB0K,IAArB,GAA4B,IAA5B;iBACOrpB,GAAP,EAAY2e,QAAZ,CAAqByK,IAArB,GAA4B,IAA5B;;;;;cAKIzK,QAAN,CAAeyK,IAAf,GAAsB,IAAtB;YACIppB,MAAM,CAAV;OApBF,MAsBO;;;;;;;cAxDJspB,iBAAiB;;ACT1B,IAAMC,OAAO,IAAIC,WAAJ,CAAgB1xB,QAAQ,IAAR,EAAcW,YAAd,CAA2BgxB,YAAY,YAAvC,CAAhB,CAAb;AACA,IAAMC,WAAW,CAAC,MAAD,EAAS,MAAT,EAAiB,MAAjB,EAAyB,MAAzB,EAAiC,MAAjC,EAAyC,MAAzC,EAAiD,MAAjD,CAAjB;;AAEA,IAAMC,iBAAiB;eACR,CADQ;gBAEP,CAFO;iBAGN,CAHM;gBAIP,CAJO;gBAKP,CALO;SAMd,CANc;iBAON,CAPM;eAQR;CARf;;AAWA,IAAMC,OAAO,MAAb;AACA,IAAMC,OAAO,MAAb;AACA,IAAMC,OAAO,MAAb;AACA,IAAMC,OAAO,MAAb;AACA,IAAMC,OAAO,MAAb;AACA,IAAMC,OAAO,MAAb;AACA,IAAMC,OAAO,MAAb;AACA,IAAMC,OAAO,IAAb;;;AAGA,IAAMC,cAAc;;;AAGlB,CAAE,CAAED,IAAF,EAAQA,IAAR,EAAc,CAAd,CAAF,EAAsB,CAAEA,IAAF,EAAQP,IAAR,EAAc,CAAd,CAAtB,EAA0C,CAAEO,IAAF,EAAQP,IAAR,EAAc,CAAd,CAA1C,EAA8D,CAAEO,IAAF,EAAQP,IAAR,EAAc,CAAd,CAA9D,EAAkF,CAAEO,IAAF,EAAQP,IAAR,EAAc,CAAd,CAAlF,EAAsG,CAAEO,IAAF,EAAQP,IAAR,EAAc,CAAd,CAAtG,CAHkB;;;AAMlB,CAAE,CAAEO,IAAF,EAAQA,IAAR,EAAc,CAAd,CAAF,EAAsB,CAAEA,IAAF,EAAQP,IAAR,EAAc,CAAd,CAAtB,EAA0C,CAAEO,IAAF,EAAQP,IAAR,EAAc,CAAd,CAA1C,EAA8D,CAAEO,IAAF,EAAQP,IAAR,EAAc,CAAd,CAA9D,EAAkF,CAAEO,IAAF,EAAQL,IAAR,EAAc,CAAd,CAAlF,EAAsG,CAAEK,IAAF,EAAQP,IAAR,EAAc,CAAd,CAAtG,CANkB;;;AASlB,CAAE,CAAEO,IAAF,EAAQA,IAAR,EAAc,CAAd,CAAF,EAAsB,CAAEA,IAAF,EAAQP,IAAR,EAAc,CAAd,CAAtB,EAA0C,CAAEM,IAAF,EAAQL,IAAR,EAAc,CAAd,CAA1C,EAA8D,CAAEK,IAAF,EAAQL,IAAR,EAAc,CAAd,CAA9D,EAAkF,CAAEK,IAAF,EAAQL,IAAR,EAAc,CAAd,CAAlF,EAAsG,CAAEK,IAAF,EAAQL,IAAR,EAAc,CAAd,CAAtG,CATkB;;;AAYlB,CAAE,CAAEM,IAAF,EAAQA,IAAR,EAAc,CAAd,CAAF,EAAsB,CAAEA,IAAF,EAAQP,IAAR,EAAc,CAAd,CAAtB,EAA0C,CAAEI,IAAF,EAAQH,IAAR,EAAc,CAAd,CAA1C,EAA8D,CAAEG,IAAF,EAAQH,IAAR,EAAc,CAAd,CAA9D,EAAkF,CAAEG,IAAF,EAAQH,IAAR,EAAc,CAAd,CAAlF,EAAsG,CAAEG,IAAF,EAAQH,IAAR,EAAc,CAAd,CAAtG,CAZkB;;;AAelB,CAAE,CAAEM,IAAF,EAAQA,IAAR,EAAc,CAAd,CAAF,EAAsB,CAAEA,IAAF,EAAQP,IAAR,EAAc,CAAd,CAAtB,EAA0C,CAAEK,IAAF,EAAQL,IAAR,EAAc,CAAd,CAA1C,EAA8D,CAAEK,IAAF,EAAQL,IAAR,EAAc,CAAd,CAA9D,EAAkF,CAAEK,IAAF,EAAQH,IAAR,EAAc,CAAd,CAAlF,EAAsG,CAAEG,IAAF,EAAQL,IAAR,EAAc,CAAd,CAAtG,CAfkB;;;AAkBlB,CAAE,CAAEO,IAAF,EAAQA,IAAR,EAAc,CAAd,CAAF,EAAsB,CAAEA,IAAF,EAAQP,IAAR,EAAc,CAAd,CAAtB,EAA0C,CAAEA,IAAF,EAAQA,IAAR,EAAc,CAAd,CAA1C,EAA8D,CAAEA,IAAF,EAAQA,IAAR,EAAc,CAAd,CAA9D,EAAkF,CAAEA,IAAF,EAAQE,IAAR,EAAc,CAAd,CAAlF,EAAsG,CAAEF,IAAF,EAAQA,IAAR,EAAc,CAAd,CAAtG,CAlBkB;;;AAqBlB,CAAE,CAAEO,IAAF,EAAQA,IAAR,EAAc,CAAd,CAAF,EAAsB,CAAEA,IAAF,EAAQP,IAAR,EAAc,CAAd,CAAtB,EAA0C,CAAEO,IAAF,EAAQP,IAAR,EAAc,CAAd,CAA1C,EAA8D,CAAEO,IAAF,EAAQP,IAAR,EAAc,CAAd,CAA9D,EAAkF,CAAEO,IAAF,EAAQJ,IAAR,EAAc,CAAd,CAAlF,EAAsG,CAAEI,IAAF,EAAQP,IAAR,EAAc,CAAd,CAAtG,CArBkB,CAApB;;;;;;;;;;;IAgCqBS;;;;;;;;;eACZvB,qCAAaF,MAAM;SACnBnH,GAAL,CAAS,CAAC,MAAD,EAAS,MAAT,CAAT;SACK,IAAIxoB,IAAI,CAAb,EAAgBA,IAAIywB,SAASxwB,MAA7B,EAAqCD,GAArC,EAA0C;UACpC2lB,UAAU8K,SAASzwB,CAAT,CAAd;WACKgvB,QAAL,CAAcrJ,OAAd,EAAuB,KAAvB;;;SAGGqJ,QAAL,CAAc,MAAd;;;eAGKe,yCAAeJ,MAAMtf,QAAQ;mBAC5B0f,cAAN,YAAqBJ,IAArB,EAA2Btf,MAA3B;;QAEIghB,OAAO,CAAC,CAAZ;QACI/I,QAAQ,CAAZ;QACIkD,UAAU,EAAd;;;SAGK,IAAIxrB,IAAI,CAAb,EAAgBA,IAAIqQ,OAAOpQ,MAA3B,EAAmCD,GAAnC,EAAwC;UAClCsxB,kBAAJ;UAAeC,mBAAf;UACIvhB,QAAQK,OAAOrQ,CAAP,CAAZ;UACIoC,OAAOovB,gBAAgBxhB,MAAMmT,UAAN,CAAiB,CAAjB,CAAhB,CAAX;UACI/gB,SAASsuB,eAAee,WAA5B,EAAyC;gBAC/BzxB,CAAR,IAAakxB,IAAb;;;;kCAI+BC,YAAY7I,KAAZ,EAAmBlmB,IAAnB,CATK;gBAAA;eAAA;WAAA;;;UAWlCmvB,eAAeL,IAAf,IAAuBG,SAAS,CAAC,CAArC,EAAwC;gBAC9BA,IAAR,IAAgBE,UAAhB;;;cAGMvxB,CAAR,IAAasxB,SAAb;aACOtxB,CAAP;;;;SAIG,IAAI6N,QAAQ,CAAjB,EAAoBA,QAAQwC,OAAOpQ,MAAnC,EAA2C4N,OAA3C,EAAoD;UAC9C8X,gBAAJ;UACI3V,QAAQK,OAAOxC,KAAP,CAAZ;UACI8X,UAAU6F,QAAQ3d,KAAR,CAAd,EAA8B;cACtB6X,QAAN,CAAeC,OAAf,IAA0B,IAA1B;;;;;;EA3CkC+J;;AAiD1C,SAAS8B,eAAT,CAAyBpN,SAAzB,EAAoC;MAC9B/V,MAAMiiB,KAAK3vB,GAAL,CAASyjB,SAAT,CAAV;MACI/V,GAAJ,EAAS;WACAA,MAAM,CAAb;;;MAGEqjB,WAAWrN,QAAQsN,WAAR,CAAoBvN,SAApB,CAAf;MACIsN,aAAa,IAAb,IAAqBA,aAAa,IAAlC,IAA0CA,aAAa,IAA3D,EAAiE;WACxDhB,eAAee,WAAtB;;;SAGKf,eAAekB,WAAtB;;;ICxHmBC;yBACPxhB,MAAZ,EAAoBqJ,KAApB,EAA2B;;;SACpBrJ,MAAL,GAAcA,MAAd;SACKyhB,KAAL,CAAWpY,KAAX;;;0BAGFoY,yBAAkB;QAAZpY,KAAY,uEAAJ,EAAI;;SACXA,KAAL,GAAaA,KAAb;SACK7L,KAAL,GAAa,CAAb;;;0BAOFkkB,qCAAa/hB,OAAO0J,OAAO;WAChBA,MAAMsY,WAAN,IAAqBhiB,MAAM8S,MAA5B,IACApJ,MAAMuY,gBAAN,IAA0B,CAACjiB,MAAM8S,MADjC,IAEApJ,MAAMwY,eAAN,IAAyBliB,MAAMmiB,UAFvC;;;0BAKFC,qBAAKvK,KAAK;SACHha,KAAL,IAAcga,GAAd;WACO,KAAK,KAAKha,KAAV,IAAmB,KAAKA,KAAL,GAAa,KAAKwC,MAAL,CAAYpQ,MAA5C,IAAsD,KAAK8xB,YAAL,CAAkB,KAAK1hB,MAAL,CAAY,KAAKxC,KAAjB,CAAlB,EAA2C,KAAK6L,KAAhD,CAA7D,EAAqH;WAC9G7L,KAAL,IAAcga,GAAd;;;QAGE,IAAI,KAAKha,KAAT,IAAkB,KAAKA,KAAL,IAAc,KAAKwC,MAAL,CAAYpQ,MAAhD,EAAwD;aAC/C,IAAP;;;WAGK,KAAKoQ,MAAL,CAAY,KAAKxC,KAAjB,CAAP;;;0BAGFsX,uBAAO;WACE,KAAKiN,IAAL,CAAU,CAAC,CAAX,CAAP;;;0BAGFf,uBAAO;WACE,KAAKe,IAAL,CAAU,CAAC,CAAX,CAAP;;;0BAGFC,uBAAgB;QAAX5sB,KAAW,uEAAH,CAAG;;QACVuf,MAAM,KAAKnX,KAAf;QACIQ,MAAM,KAAKikB,SAAL,CAAe7sB,KAAf,CAAV;SACKoI,KAAL,GAAamX,GAAb;WACO3W,GAAP;;;0BAGFkkB,iCAAqB;QAAX9sB,KAAW,uEAAH,CAAG;;QACfuf,MAAM,KAAKnX,KAAf;SACKykB,SAAL,CAAe7sB,KAAf;QACI4I,MAAM,KAAKR,KAAf;SACKA,KAAL,GAAamX,GAAb;WACO3W,GAAP;;;0BAGFikB,iCAAqB;QAAX7sB,KAAW,uEAAH,CAAG;;QACfoiB,MAAMpiB,QAAQ,CAAR,GAAY,CAAC,CAAb,GAAiB,CAA3B;YACQjD,KAAKgwB,GAAL,CAAS/sB,KAAT,CAAR;WACOA,OAAP,EAAgB;WACT2sB,IAAL,CAAUvK,GAAV;;;WAGK,KAAKxX,MAAL,CAAY,KAAKxC,KAAjB,CAAP;;;;;wBArDQ;aACD,KAAKwC,MAAL,CAAY,KAAKxC,KAAjB,KAA2B,IAAlC;;;;;;;ACTJ,IAAM4kB,kBAAkB,CAAC,MAAD,EAAS,MAAT,EAAiB,MAAjB,CAAxB;;IAEqBC;uBACP5yB,IAAZ,EAAkBqd,KAAlB,EAAyB;;;SAClBrd,IAAL,GAAYA,IAAZ;SACKqd,KAAL,GAAaA,KAAb;;SAEKiI,MAAL,GAAc,IAAd;SACKuN,SAAL,GAAiB,IAAjB;;SAEKhuB,QAAL,GAAgB,IAAhB;SACKiuB,WAAL,GAAmB,IAAnB;;SAEKlN,QAAL,GAAgB,EAAhB;SACKmN,OAAL,GAAe,EAAf;;;SAGKC,eAAL,GAAuBhzB,KAAKizB,mBAAL,GACnB,KAAKC,mBAAL,CAAyBlzB,KAAKizB,mBAAL,CAAyBE,gBAAlD,CADmB,GAEnB,CAAC,CAFL;;;SAKK9D,YAAL;;;SAGK9e,MAAL,GAAc,EAAd;SACK2Q,SAAL,GAAiB,EAAjB,CAvBuB;SAwBlBkS,UAAL,GAAkB,CAAlB;;;wBAGFC,iCAAW/N,QAAQ;QACb,KAAKjI,KAAL,CAAWiW,UAAX,IAAyB,IAA7B,EAAmC;aAC1B,IAAP;;;QAGE,CAACpxB,MAAMkD,OAAN,CAAckgB,MAAd,CAAL,EAA4B;eACjB,CAAEA,MAAF,CAAT;;;yBAGgB,KAAKjI,KAAL,CAAWiW,UAA7B,6GAAyC;;;;;;;;;;;;UAAhCxd,KAAgC;;4BACzBwP,MAAd,oHAAsB;;;;;;;;;;;;YAAb9d,CAAa;;YAChBsO,MAAM/Q,GAAN,KAAcyC,CAAlB,EAAqB;iBACZsO,KAAP;;;;;WAKC,IAAP;;;wBAGFuZ,qCAAa/J,QAAQzgB,UAAU;QACzB0uB,UAAU,KAAd;QACIzd,cAAJ;QACI,CAAC,KAAKwP,MAAN,IAAgBA,WAAW,KAAKuN,SAApC,EAA+C;cACrC,KAAKQ,UAAL,CAAgB/N,MAAhB,CAAR;UACIA,MAAJ,EAAY;gBACF,KAAK+N,UAAL,CAAgB/N,MAAhB,CAAR;;;UAGE,CAACxP,KAAL,EAAY;gBACF,KAAKud,UAAL,CAAgBV,eAAhB,CAAR;;;UAGE,CAAC7c,KAAL,EAAY;;;;WAIP+c,SAAL,GAAiB/c,MAAM/Q,GAAvB;WACKugB,MAAL,GAAcxP,MAAMwP,MAApB;WACKK,SAAL,GAAiB7a,SAAA,CAAiBwa,MAAjB,CAAjB;WACKzgB,QAAL,GAAgB,IAAhB;gBACU,IAAV;;;QAGE,CAACA,QAAD,IAAaA,aAAa,KAAK2uB,UAAnC,EAA+C;4BAC5B,KAAKlO,MAAL,CAAYmO,cAA7B,oHAA6C;;;;;;;;;;;;YAApCC,IAAoC;;YACvCA,KAAK3uB,GAAL,KAAaF,QAAjB,EAA2B;eACpBA,QAAL,GAAgB6uB,KAAKC,OAArB;eACKH,UAAL,GAAkBE,KAAK3uB,GAAvB;oBACU,IAAV;;;;;;QAMF,CAAC,KAAKF,QAAV,EAAoB;WACbA,QAAL,GAAgB,KAAKygB,MAAL,CAAYsO,cAA5B;;;;QAIEL,OAAJ,EAAa;WACN3N,QAAL,GAAgB,EAAhB;UACI,KAAK/gB,QAAT,EAAmB;8BACQ,KAAKA,QAAL,CAAcgvB,cAAvC,oHAAuD;;;;;;;;;;;;cAA9CC,YAA8C;;cACjDlvB,SAAS,KAAKyY,KAAL,CAAW0W,WAAX,CAAuBD,YAAvB,CAAb;cACIE,oBAAoB,KAAKC,8BAAL,CAAoCH,YAApC,CAAxB;eACKlO,QAAL,CAAchhB,OAAOG,GAArB,IAA4BivB,qBAAqBpvB,OAAOihB,OAAxD;;;;;;wBAMRqO,mDAA+C;QAA5BhE,YAA4B,uEAAb,EAAa;QAATiE,OAAS;;QACzCpB,UAAU,EAAd;0BACgB7C,YAAhB,oHAA8B;;;;;;;;;;;;UAArBnrB,GAAqB;;UACxB8gB,UAAU,KAAKD,QAAL,CAAc7gB,GAAd,CAAd;UACI,CAAC8gB,OAAL,EAAc;;;;4BAIUA,QAAQuO,iBAAhC,oHAAmD;;;;;;;;;;;;YAA1CC,WAA0C;;YAC7CF,WAAWA,QAAQ5uB,OAAR,CAAgB8uB,WAAhB,MAAiC,CAAC,CAAjD,EAAoD;;;;gBAI5Ch1B,IAAR,CAAa;mBACF0F,GADE;iBAEJsvB,WAFI;kBAGH,KAAKhX,KAAL,CAAWiX,UAAX,CAAsBzzB,GAAtB,CAA0BwzB,WAA1B;SAHV;;;;YAQIE,IAAR,CAAa,UAACC,CAAD,EAAIvsB,CAAJ;aAAUusB,EAAEzmB,KAAF,GAAU9F,EAAE8F,KAAtB;KAAb;WACOglB,OAAP;;;wBAGFkB,yEAA+BH,cAAc;QACvC,KAAKd,eAAL,KAAyB,CAAC,CAA9B,EAAiC;aACxB,IAAP;;;QAGEpuB,SAAS,KAAKyY,KAAL,CAAWoX,iBAAX,CAA6BC,uBAA7B,CAAqD,KAAK1B,eAA1D,CAAb;QACI2B,gBAAgB/vB,OAAOgwB,wBAAP,CAAgCD,aAApD;0BACyBA,aAAzB,oHAAwC;;;;;;;;;;;;UAA/BE,YAA+B;;UAClCA,aAAaf,YAAb,KAA8BA,YAAlC,EAAgD;eACvCe,aAAaC,qBAApB;;;;WAIG,IAAP;;;wBAGF5B,mDAAoB6B,QAAQ;QACtBC,aAAa,KAAK3X,KAAL,CAAWoX,iBAA5B;QACI,CAACO,UAAL,EAAiB;aACR,CAAC,CAAR;;;QAGErwB,UAAUqwB,WAAWN,uBAAzB;SACK,IAAIx0B,IAAI,CAAb,EAAgBA,IAAIyE,QAAQxE,MAA5B,EAAoCD,GAApC,EAAyC;UACnC+0B,aAAatwB,QAAQzE,CAAR,EAAWg1B,YAAX,CAAwBC,cAAzC;UACI,KAAKC,wBAAL,CAA8BH,UAA9B,EAA0CF,MAA1C,CAAJ,EAAuD;eAC9C70B,CAAP;;;;WAIG,CAAC,CAAR;;;wBAGFk1B,6DAAyBH,YAAYF,QAAQ;WACpCE,WAAWI,KAAX,CAAiB,qBAAa;UAC/BC,QAAQC,UAAUC,SAAV,GAAsBT,OAAO50B,MAA7B,GAAsC40B,OAAOQ,UAAUC,SAAjB,CAAtC,GAAoE,CAAhF;aACOD,UAAUjoB,mBAAV,IAAiCgoB,KAAjC,IAA0CA,SAASC,UAAUhoB,mBAApE;KAFK,CAAP;;;wBAMF+hB,uCAAcY,cAAc3f,QAAQklB,UAAU;QACxC1C,UAAU,KAAKmB,kBAAL,CAAwBhE,YAAxB,CAAd;SACKwF,YAAL,CAAkB3C,OAAlB,EAA2BxiB,MAA3B,EAAmCklB,QAAnC;;;wBAGFC,qCAAa3C,SAASxiB,QAAQ2Q,WAAW;SAClC3Q,MAAL,GAAcA,MAAd;SACK2Q,SAAL,GAAiBA,SAAjB;SACKyU,aAAL,GAAqB,IAAI5D,aAAJ,CAAkBxhB,MAAlB,CAArB;;0BAE8BwiB,OAA9B,oHAAuC;;;;;;;;;;;;;UAA7BlN,OAA6B,SAA7BA,OAA6B;UAApBnH,MAAoB,SAApBA,MAAoB;;WAChCiX,aAAL,CAAmB3D,KAAnB,CAAyBtT,OAAO9E,KAAhC;;aAEO,KAAK+b,aAAL,CAAmB5nB,KAAnB,GAA2BwC,OAAOpQ,MAAzC,EAAiD;YAC3C,EAAE0lB,WAAW,KAAK8P,aAAL,CAAmBC,GAAnB,CAAuBhQ,QAApC,CAAJ,EAAmD;eAC5C+P,aAAL,CAAmBtQ,IAAnB;;;;8BAIgB3G,OAAOmX,SAAzB,oHAAoC;;;;;;;;;;;;cAA3BxY,KAA2B;;cAC9B9O,MAAM,KAAKunB,WAAL,CAAiBpX,OAAO/F,UAAxB,EAAoC0E,KAApC,CAAV;cACI9O,GAAJ,EAAS;;;;;aAKNonB,aAAL,CAAmBtQ,IAAnB;;;;;wBAKNyQ,mCAAYpX,QAAQrB,OAAO;UACnB,IAAI7c,KAAJ,CAAU,+CAAV,CAAN;;;wBAGFu1B,2CAAgBC,eAAe;QACzB7U,aAAa,KAAKwU,aAAL,CAAmB5nB,KAApC;;2BAEyBioB,aAAzB,2HAAwC;;;;;;;;;;;;UAA/BC,YAA+B;;WACjCN,aAAL,CAAmB5nB,KAAnB,GAA2BoT,UAA3B;WACKwU,aAAL,CAAmBnD,SAAnB,CAA6ByD,aAAaC,aAA1C;;UAEIxX,SAAS,KAAKrB,KAAL,CAAWiX,UAAX,CAAsBzzB,GAAtB,CAA0Bo1B,aAAaE,eAAvC,CAAb;6BACkBzX,OAAOmX,SAAzB,2HAAoC;;;;;;;;;;;;YAA3BxY,KAA2B;;aAC7ByY,WAAL,CAAiBpX,OAAO/F,UAAxB,EAAoC0E,KAApC;;;;SAICsY,aAAL,CAAmB5nB,KAAnB,GAA2BoT,UAA3B;WACO,IAAP;;;wBAGFiV,uCAAc3U,UAAUvR,OAAO;QACzBA,SAAS,IAAb,EAAmB;cACT,KAAKylB,aAAL,CAAmBC,GAAnB,CAAuBvU,EAA/B;;;YAGMI,SAASpc,OAAjB;WACO,CAAL;eACSoc,SAASlR,MAAT,CAAgBhL,OAAhB,CAAwB2K,KAAxB,CAAP;;WAEG,CAAL;+BACoBuR,SAAS4U,YAA3B,2HAAyC;;;;;;;;;;;;cAAhC7nB,KAAgC;;cACnCA,MAAMxH,KAAN,IAAekJ,KAAf,IAAwBA,SAAS1B,MAAMvH,GAA3C,EAAgD;mBACvCuH,MAAM8nB,kBAAN,GAA2BpmB,KAA3B,GAAmC1B,MAAMxH,KAAhD;;;;;;;WAOD,CAAC,CAAR;;;wBAGFuvB,uBAAML,eAAeM,UAAUx1B,IAAIy1B,SAAS;QACtC5vB,MAAM,KAAK8uB,aAAL,CAAmB5nB,KAA7B;QACImC,QAAQ,KAAKylB,aAAL,CAAmBnD,SAAnB,CAA6B0D,aAA7B,CAAZ;QACIhR,MAAM,CAAV;;WAEOA,MAAMsR,SAASr2B,MAAf,IAAyB+P,KAAzB,IAAkClP,GAAGw1B,SAAStR,GAAT,CAAH,EAAkBhV,MAAMmR,EAAxB,CAAzC,EAAsE;UAChEoV,OAAJ,EAAa;gBACHp3B,IAAR,CAAa,KAAKs2B,aAAL,CAAmB5nB,KAAhC;;;;cAIM,KAAK4nB,aAAL,CAAmBtQ,IAAnB,EAAR;;;SAGGsQ,aAAL,CAAmB5nB,KAAnB,GAA2BlH,GAA3B;QACIqe,MAAMsR,SAASr2B,MAAnB,EAA2B;aAClB,KAAP;;;WAGKs2B,WAAW,IAAlB;;;wBAGFC,2CAAgBR,eAAeM,UAAU;WAChC,KAAKD,KAAL,CAAWL,aAAX,EAA0BM,QAA1B,EAAoC,UAAClK,SAAD,EAAYpc,KAAZ;aAAsBoc,cAAcpc,KAApC;KAApC,CAAP;;;wBAGFymB,qDAAqBT,eAAeM,UAAU;WACrC,KAAKD,KAAL,CAAWL,aAAX,EAA0BM,QAA1B,EAAoC,UAAClK,SAAD,EAAYpc,KAAZ;aAAsBoc,cAAcpc,KAApC;KAApC,EAA+E,EAA/E,CAAP;;;wBAGF0mB,2DAAwBV,eAAeM,UAAU;;;WACxC,KAAKD,KAAL,CAAWL,aAAX,EAA0BM,QAA1B,EAAoC,UAAC/U,QAAD,EAAWvR,KAAX;aACzC,MAAKkmB,aAAL,CAAmB3U,QAAnB,EAA6BvR,KAA7B,KAAuC,CADE;KAApC,CAAP;;;wBAKF2mB,iCAAW3mB,OAAO4mB,UAAU;YAClBA,SAASzxB,OAAjB;WACO,CAAL;;YACMnF,IAAIgQ,QAAQ4mB,SAASC,UAAzB;YACI72B,KAAK,CAAL,IAAUA,IAAI42B,SAASE,eAAT,CAAyB72B,MAA3C,EAAmD;iBAC1C22B,SAASE,eAAT,CAAyB92B,CAAzB,CAAP;;;;;WAKC,CAAL;+BACoB42B,SAASG,gBAA3B,2HAA6C;;;;;;;;;;;;cAApCzoB,KAAoC;;cACvCA,MAAMxH,KAAN,IAAekJ,KAAf,IAAwBA,SAAS1B,MAAMvH,GAA3C,EAAgD;mBACvCuH,MAAM0oB,KAAb;;;;;;;WAOD,CAAP;;;wBAGFC,qDAAqBjB,eAAeM,UAAUM,UAAU;;;WAC/C,KAAKP,KAAL,CAAWL,aAAX,EAA0BM,QAA1B,EAAoC,UAACY,OAAD,EAAUlnB,KAAV;aACzCknB,YAAY,OAAKP,UAAL,CAAgB3mB,KAAhB,EAAuB4mB,QAAvB,CAD6B;KAApC,CAAP;;;wBAKFO,qCAAaha,OAAO;YACVA,MAAMhY,OAAd;WACO,CAAL;YACM0I,QAAQ,KAAKqoB,aAAL,CAAmB/Y,MAAMoE,QAAzB,CAAZ;YACI1T,UAAU,CAAC,CAAf,EAAkB;iBACT,KAAP;;;YAGEzM,MAAM+b,MAAMia,QAAN,CAAevpB,KAAf,CAAV;+BACiBzM,GAAjB,2HAAsB;;;;;;;;;;;;cAAbi2B,IAAa;;cAChB,KAAKb,eAAL,CAAqB,CAArB,EAAwBa,KAAKpK,KAA7B,CAAJ,EAAyC;mBAChC,KAAK4I,eAAL,CAAqBwB,KAAKvB,aAA1B,CAAP;;;;;;WAMD,CAAL;YACM,KAAKI,aAAL,CAAmB/Y,MAAMoE,QAAzB,MAAuC,CAAC,CAA5C,EAA+C;iBACtC,KAAP;;;gBAGM,KAAKoV,UAAL,CAAgB,KAAKlB,aAAL,CAAmBC,GAAnB,CAAuBvU,EAAvC,EAA2ChE,MAAMyZ,QAAjD,CAAR;YACI/oB,UAAU,CAAC,CAAf,EAAkB;iBACT,KAAP;;;cAGIsP,MAAMma,QAAN,CAAezpB,KAAf,CAAN;+BACiBzM,GAAjB,2HAAsB;;;;;;;;;;;;cAAbi2B,KAAa;;cAChB,KAAKJ,oBAAL,CAA0B,CAA1B,EAA6BI,MAAKE,OAAlC,EAA2Cpa,MAAMyZ,QAAjD,CAAJ,EAAgE;mBACvD,KAAKf,eAAL,CAAqBwB,MAAKvB,aAA1B,CAAP;;;;;;WAMD,CAAL;YACM,KAAKY,uBAAL,CAA6B,CAA7B,EAAgCvZ,MAAMqa,SAAtC,CAAJ,EAAsD;iBAC7C,KAAK3B,eAAL,CAAqB1Y,MAAM2Y,aAA3B,CAAP;;;;;;WAMC,KAAP;;;wBAGF2B,qDAAqBta,OAAO;YAClBA,MAAMhY,OAAd;WACO,CAAL;YACM0I,QAAQ,KAAKqoB,aAAL,CAAmB/Y,MAAMoE,QAAzB,CAAZ;YACI1T,UAAU,CAAC,CAAf,EAAkB;iBACT,KAAP;;;YAGEzM,MAAM+b,MAAMua,aAAN,CAAoB7pB,KAApB,CAAV;+BACiBzM,GAAjB,2HAAsB;;;;;;;;;;;;cAAbi2B,IAAa;;cAChB,KAAKb,eAAL,CAAqB,CAACa,KAAKM,SAAL,CAAe13B,MAArC,EAA6Co3B,KAAKM,SAAlD,KACG,KAAKnB,eAAL,CAAqB,CAArB,EAAwBa,KAAKpK,KAA7B,CADH,IAEG,KAAKuJ,eAAL,CAAqB,IAAIa,KAAKpK,KAAL,CAAWhtB,MAApC,EAA4Co3B,KAAKO,SAAjD,CAFP,EAEoE;mBAC3D,KAAK/B,eAAL,CAAqBwB,KAAKvB,aAA1B,CAAP;;;;;;WAMD,CAAL;YACM,KAAKI,aAAL,CAAmB/Y,MAAMoE,QAAzB,MAAuC,CAAC,CAA5C,EAA+C;iBACtC,KAAP;;;gBAGM,KAAKoV,UAAL,CAAgB,KAAKlB,aAAL,CAAmBC,GAAnB,CAAuBvU,EAAvC,EAA2ChE,MAAM0a,aAAjD,CAAR;YACIC,QAAQ3a,MAAM4a,aAAN,CAAoBlqB,KAApB,CAAZ;YACI,CAACiqB,KAAL,EAAY;iBACH,KAAP;;;+BAGeA,KAAjB,2HAAwB;;;;;;;;;;;;cAAfT,MAAe;;cAClB,KAAKJ,oBAAL,CAA0B,CAACI,OAAKM,SAAL,CAAe13B,MAA1C,EAAkDo3B,OAAKM,SAAvD,EAAkExa,MAAM6a,iBAAxE,KACA,KAAKf,oBAAL,CAA0B,CAA1B,EAA6BI,OAAKpK,KAAlC,EAAyC9P,MAAM0a,aAA/C,CADA,IAEA,KAAKZ,oBAAL,CAA0B,IAAII,OAAKpK,KAAL,CAAWhtB,MAAzC,EAAiDo3B,OAAKO,SAAtD,EAAiEza,MAAM8a,iBAAvE,CAFJ,EAE+F;mBACtF,KAAKpC,eAAL,CAAqBwB,OAAKvB,aAA1B,CAAP;;;;;;WAMD,CAAL;YACM,KAAKY,uBAAL,CAA6B,CAACvZ,MAAM+a,mBAApC,EAAyD/a,MAAMgb,iBAA/D,KACA,KAAKzB,uBAAL,CAA6B,CAA7B,EAAgCvZ,MAAMib,aAAtC,CADA,IAEA,KAAK1B,uBAAL,CAA6BvZ,MAAMhR,eAAnC,EAAoDgR,MAAMkb,iBAA1D,CAFJ,EAEkF;iBACzE,KAAKxC,eAAL,CAAqB1Y,MAAM2Y,aAA3B,CAAP;;;;;;WAMC,KAAP;;;;;;ICnZiBwC;qBACPx4B,IAAZ,EAAkBqhB,EAAlB,EAAsD;QAAhCgC,UAAgC,uEAAnB,EAAmB;QAAfuC,QAAe,uEAAJ,EAAI;;;;SAC/C6S,KAAL,GAAaz4B,IAAb;SACKqjB,UAAL,GAAkBA,UAAlB;SACKhC,EAAL,GAAUA,EAAV;;SAEKuE,QAAL,GAAgB,EAAhB;QACI1jB,MAAMkD,OAAN,CAAcwgB,QAAd,CAAJ,EAA6B;WACtB,IAAI1lB,IAAI,CAAb,EAAgBA,IAAI0lB,SAASzlB,MAA7B,EAAqCD,GAArC,EAA0C;YACpC2lB,UAAUD,SAAS1lB,CAAT,CAAd;aACK0lB,QAAL,CAAcC,OAAd,IAAyB,IAAzB;;KAHJ,MAKO,IAAI,QAAOD,QAAP,yCAAOA,QAAP,OAAoB,QAAxB,EAAkC;qBACzB,KAAKA,QAAnB,EAA6BA,QAA7B;;;SAGGwN,UAAL,GAAkB,IAAlB;SACKsF,iBAAL,GAAyB,IAAzB;SACKC,OAAL,GAAe,KAAf;SACKC,iBAAL,GAAyB,IAAzB;SACKC,cAAL,GAAsB,IAAtB;SACKC,UAAL,GAAkB,IAAlB;SACKC,WAAL,GAAmB,KAAnB;;;;;wBAGO;aACA,KAAKC,GAAZ;;sBAGK3X,IAAI;WACJ2X,GAAL,GAAW3X,EAAX;WACK0X,WAAL,GAAmB,IAAnB;;UAEI,KAAKN,KAAL,CAAW1c,IAAX,IAAmB,KAAK0c,KAAL,CAAW1c,IAAX,CAAgBkd,aAAvC,EAAsD;;YAEhD7B,UAAUxE,YAAYsG,SAAZ,CAAsBrC,UAAtB,CAAiCxV,EAAjC,EAAqC,KAAKoX,KAAL,CAAW1c,IAAX,CAAgBkd,aAArD,CAAd;aACKjW,MAAL,GAAcoU,YAAY,CAA1B;aACK/E,UAAL,GAAkB+E,YAAY,CAA9B;OAJF,MAKO;aACApU,MAAL,GAAc,KAAKK,UAAL,CAAgBgS,KAAhB,CAAsB9Q,QAAQvB,MAA9B,CAAd;aACKqP,UAAL,GAAkB,KAAKhP,UAAL,CAAgBljB,MAAhB,GAAyB,CAA3C;;;;;;;;;;AC3CN,AACA,AAEA;;;;;;;;;;;;;;;;;;;;;;IAsBqBg5B;;;;;;;;;eAEZpJ,qCAAaF,MAAM;SACnBnH,GAAL,CAAS,CAAC,MAAD,EAAS,MAAT,EAAiB,MAAjB,CAAT,EAAmC,KAAnC;;;eAGKuH,yCAAeJ,MAAMtf,QAAQ;QAC9BiY,QAAQ,CAAZ;QACItoB,IAAI,CAAR;WACOA,IAAIqQ,OAAOpQ,MAAlB,EAA0B;UACpB4rB,eAAJ;UACI7b,QAAQK,OAAOrQ,CAAP,CAAZ;UACIilB,OAAOjV,MAAMmT,UAAN,CAAiB,CAAjB,CAAX;UACI/gB,OAAO82B,QAAQjU,IAAR,CAAX;;kCAEoBkM,cAAY7I,KAAZ,EAAmBlmB,IAAnB,CANI;YAAA;WAAA;;;cAQhBypB,MAAR;aACOsN,SAAL;;cAEM,CAACxJ,KAAK7vB,IAAL,CAAUs5B,oBAAV,CAA+BnU,IAA/B,CAAL,EAA2C;gBACrCoU,UAAUhpB,MAAV,EAAkBrQ,CAAlB,EAAqB2vB,KAAK7vB,IAA1B,CAAJ;;;;aAICw5B,OAAL;;cAEMC,QAAQlpB,MAAR,EAAgBrQ,CAAhB,EAAmB2vB,KAAK7vB,IAAxB,CAAJ;;;aAGG05B,SAAL;;0BAEkBnpB,MAAhB,EAAwBrQ,CAAxB,EAA2B2vB,KAAK7vB,IAAhC;;;aAGG25B,OAAL;;cAEMC,mBAAmBrpB,MAAnB,EAA2BrQ,CAA3B,EAA8B2vB,KAAK7vB,IAAnC,CAAJ;;;;;;;;;EArCgC4vB,yBACjCW,iBAAiB;AA6C1B,IAAMsJ,cAAe,MAArB;AACA,IAAMC,aAAe,MAArB;AACA,IAAMC,eAAeD,aAAaD,WAAb,GAA2B,CAAhD;AACA,IAAMG,SAAU,MAAhB;AACA,IAAMC,SAAU,MAAhB;AACA,IAAMC,SAAU,MAAhB;AACA,IAAMC,UAAU,EAAhB;AACA,IAAMC,UAAU,EAAhB;AACA,IAAMC,UAAU,EAAhB;AACA,IAAMC,QAAUN,SAASG,OAAT,GAAmB,CAAnC;AACA,IAAMI,QAAUN,SAASG,OAAT,GAAmB,CAAnC;AACA,IAAMI,QAAUN,SAASG,OAAT,GAAmB,CAAnC;AACA,IAAMI,gBAAgB,MAAtB;;AAEA,IAAMC,MAAS,SAATA,GAAS;SAAQ,UAAUvV,IAAV,IAAkBA,QAAQ,MAA1B,IAAoC,UAAUA,IAAV,IAAkBA,QAAQ,MAAtE;CAAf;AACA,IAAMwV,MAAS,SAATA,GAAS;SAAQ,UAAUxV,IAAV,IAAkBA,QAAQ,MAA1B,IAAoC,UAAUA,IAAV,IAAkBA,QAAQ,MAAtE;CAAf;AACA,IAAMyV,MAAS,SAATA,GAAS;SAAQ,UAAUzV,IAAV,IAAkBA,QAAQ,MAA1B,IAAoC,UAAUA,IAAV,IAAkBA,QAAQ,MAAtE;CAAf;AACA,IAAM0V,SAAS,SAATA,MAAS;SAAQ,UAAU1V,IAAV,IAAkBA,QAAQ,MAAlC;CAAf;AACA,IAAM2V,QAAS,SAATA,KAAS;SAAQjB,eAAe1U,IAAf,IAAuBA,QAAQ2U,UAAvC;CAAf;AACA,IAAMiB,OAAS,SAATA,IAAS;SAAS5V,OAAO0U,WAAR,GAAuBE,YAAvB,IAAuC,CAAC5U,OAAO0U,WAAR,IAAuBQ,OAAvB,KAAmC,CAAlF;CAAf;AACA,IAAMW,eAAe,SAAfA,YAAe;SAAQhB,UAAU7U,IAAV,IAAkBA,QAAQmV,KAAlC;CAArB;AACA,IAAMW,eAAe,SAAfA,YAAe;SAAQhB,UAAU9U,IAAV,IAAkBA,QAAQoV,KAAlC;CAArB;AACA,IAAMW,eAAe,SAAfA,YAAe;SAAQhB,SAAS,CAAT,IAAc,KAAK/U,IAAnB,IAA2BA,QAAQqV,KAA3C;CAArB;;;AAGA,IAAMW,IAAM,CAAZ;AACA,IAAMC,IAAM,CAAZ;AACA,IAAMC,IAAM,CAAZ;AACA,IAAMC,IAAM,CAAZ;AACA,IAAMC,KAAM,CAAZ;AACA,IAAMC,MAAM,CAAZ;AACA,IAAMC,IAAM,CAAZ;;;AAGA,SAASrC,OAAT,CAAiBjU,IAAjB,EAAuB;MACjBuV,IAAIvV,IAAJ,CAAJ,EAAkB;WAASiW,CAAP;;MAChBT,IAAIxV,IAAJ,CAAJ,EAAkB;WAASkW,CAAP;;MAChBT,IAAIzV,IAAJ,CAAJ,EAAkB;WAASmW,CAAP;;MAChBP,KAAK5V,IAAL,CAAJ,EAAkB;WAASoW,EAAP;;MAChBT,MAAM3V,IAAN,CAAJ,EAAkB;WAASqW,GAAP;;MAChBX,OAAO1V,IAAP,CAAJ,EAAkB;WAASsW,CAAP;;SACbN,CAAP;;;;AAIF,IAAMO,YAAY,CAAlB;AACA,IAAMrC,YAAY,CAAlB;AACA,IAAMG,UAAY,CAAlB;AACA,IAAME,YAAY,CAAlB;AACA,IAAMC,UAAY,CAAlB;;;;AAIA,IAAMtI,gBAAc;;;AAGlB,CAAE,CAAEqK,SAAF,EAAa,CAAb,CAAF,EAAoB,CAAEA,SAAF,EAAa,CAAb,CAApB,EAAsC,CAAEA,SAAF,EAAa,CAAb,CAAtC,EAAwD,CAAEA,SAAF,EAAa,CAAb,CAAxD,EAA0E,CAAErC,SAAF,EAAa,CAAb,CAA1E,EAA4F,CAAEA,SAAF,EAAa,CAAb,CAA5F,EAA8G,CAAGM,OAAH,EAAY,CAAZ,CAA9G,CAHkB;;;AAMlB,CAAE,CAAE+B,SAAF,EAAa,CAAb,CAAF,EAAoB,CAAEA,SAAF,EAAa,CAAb,CAApB,EAAsC,CAAGlC,OAAH,EAAY,CAAZ,CAAtC,EAAwD,CAAEkC,SAAF,EAAa,CAAb,CAAxD,EAA0E,CAAErC,SAAF,EAAa,CAAb,CAA1E,EAA4F,CAAEA,SAAF,EAAa,CAAb,CAA5F,EAA8G,CAAGM,OAAH,EAAY,CAAZ,CAA9G,CANkB;;;AASlB,CAAE,CAAE+B,SAAF,EAAa,CAAb,CAAF,EAAoB,CAAEA,SAAF,EAAa,CAAb,CAApB,EAAsC,CAAEA,SAAF,EAAa,CAAb,CAAtC,EAAwD,CAAGlC,OAAH,EAAY,CAAZ,CAAxD,EAA0E,CAAEH,SAAF,EAAa,CAAb,CAA1E,EAA4F,CAAEA,SAAF,EAAa,CAAb,CAA5F,EAA8G,CAAEK,SAAF,EAAa,CAAb,CAA9G,CATkB;;;AAYlB,CAAE,CAAEgC,SAAF,EAAa,CAAb,CAAF,EAAoB,CAAEA,SAAF,EAAa,CAAb,CAApB,EAAsC,CAAEA,SAAF,EAAa,CAAb,CAAtC,EAAwD,CAAEA,SAAF,EAAa,CAAb,CAAxD,EAA0E,CAAErC,SAAF,EAAa,CAAb,CAA1E,EAA4F,CAAEA,SAAF,EAAa,CAAb,CAA5F,EAA8G,CAAEK,SAAF,EAAa,CAAb,CAA9G,CAZkB,CAApB;;AAeA,SAASlO,QAAT,CAAkBxrB,IAAlB,EAAwBmlB,IAAxB,EAA8BS,QAA9B,EAAwC;SAC/B,IAAI4S,SAAJ,CAAcx4B,IAAd,EAAoBA,KAAK27B,iBAAL,CAAuBxW,IAAvB,EAA6B9D,EAAjD,EAAqD,CAAC8D,IAAD,CAArD,EAA6DS,QAA7D,CAAP;;;AAGF,SAAS2T,SAAT,CAAmBhpB,MAAnB,EAA2BrQ,CAA3B,EAA8BF,IAA9B,EAAoC;MAC9BkQ,QAAQK,OAAOrQ,CAAP,CAAZ;MACIilB,OAAOjV,MAAMmT,UAAN,CAAiB,CAAjB,CAAX;;MAEI7b,IAAI2d,OAAO0U,WAAf;MACIj3B,IAAIs3B,SAAS1yB,IAAI6yB,OAArB;MACI7yB,IAAI6yB,OAAJ,GAAc,CAAlB;MACIuB,IAAI5B,SAASxyB,IAAI4yB,OAAb,GAAuB,CAA/B;MACIyB,IAAI5B,SAASzyB,IAAI4yB,OAArB;;;MAGI,CAACp6B,KAAKs5B,oBAAL,CAA0BsC,CAA1B,CAAD,IACA,CAAC57B,KAAKs5B,oBAAL,CAA0BuC,CAA1B,CADD,IAECj5B,MAAMs3B,MAAN,IAAgB,CAACl6B,KAAKs5B,oBAAL,CAA0B12B,CAA1B,CAFtB,EAEqD;WAC5C1C,CAAP;;;;;MAKE47B,OAAOtQ,SAASxrB,IAAT,EAAe47B,CAAf,EAAkB1rB,MAAM0V,QAAxB,CAAX;OACKA,QAAL,CAAckW,IAAd,GAAqB,IAArB;;MAEIC,OAAOvQ,SAASxrB,IAAT,EAAe67B,CAAf,EAAkB3rB,MAAM0V,QAAxB,CAAX;OACKA,QAAL,CAAcmW,IAAd,GAAqB,IAArB;;MAEIC,SAAS,CAAEF,IAAF,EAAQC,IAAR,CAAb;;MAEIn5B,IAAIs3B,MAAR,EAAgB;QACV+B,OAAOzQ,SAASxrB,IAAT,EAAe4C,CAAf,EAAkBsN,MAAM0V,QAAxB,CAAX;SACKA,QAAL,CAAcqW,IAAd,GAAqB,IAArB;WACO58B,IAAP,CAAY48B,IAAZ;;;SAGKpR,MAAP,gBAAc3qB,CAAd,EAAiB,CAAjB,SAAuB87B,MAAvB;SACO97B,IAAI87B,OAAO77B,MAAX,GAAoB,CAA3B;;;AAGF,SAASs5B,OAAT,CAAiBlpB,MAAjB,EAAyBrQ,CAAzB,EAA4BF,IAA5B,EAAkC;MAC5BkQ,QAAQK,OAAOrQ,CAAP,CAAZ;MACIilB,OAAO5U,OAAOrQ,CAAP,EAAUmjB,UAAV,CAAqB,CAArB,CAAX;MACI/gB,OAAO82B,QAAQjU,IAAR,CAAX;;MAEIoM,OAAOhhB,OAAOrQ,IAAI,CAAX,EAAcmjB,UAAd,CAAyB,CAAzB,CAAX;MACI6Y,WAAW9C,QAAQ7H,IAAR,CAAf;;;MAGI4K,WAAJ;MAAQL,aAAR;MAAcC,aAAd;MAAoBE,aAApB;MACIC,aAAaX,EAAb,IAAmBj5B,SAASg5B,CAAhC,EAAmC;;SAE5B/J,IAAL;WACOrhB,KAAP;GAHF,MAIO;QACD5N,SAAS+4B,CAAb,EAAgB;;aAEP9qB,OAAOrQ,IAAI,CAAX,CAAP;aACOgQ,KAAP;KAHF,MAIO;;aAEEK,OAAOrQ,IAAI,CAAX,CAAP;aACOqQ,OAAOrQ,IAAI,CAAX,CAAP;aACOgQ,KAAP;;;QAGE0rB,IAAIE,KAAKzY,UAAL,CAAgB,CAAhB,CAAR;QACIwY,IAAIE,KAAK1Y,UAAL,CAAgB,CAAhB,CAAR;;;QAGI2X,aAAaY,CAAb,KAAmBX,aAAaY,CAAb,CAAvB,EAAwC;WACjChC,cAAc,CAAC,CAAC+B,IAAI5B,MAAL,IAAeI,OAAf,IAA0ByB,IAAI5B,MAA9B,CAAD,IAA0CI,OAA7D;;;;MAIAz3B,IAAKq5B,QAAQA,KAAK5Y,UAAL,CAAgB,CAAhB,CAAT,IAAgC6W,MAAxC;MACKiC,MAAM,IAAP,KAAiBv5B,MAAMs3B,MAAN,IAAgBgB,aAAat4B,CAAb,CAAjC,CAAJ,EAAuD;QACjD4E,IAAI20B,MAAMv5B,IAAIs3B,MAAV,CAAR;;;;QAIIl6B,KAAKs5B,oBAAL,CAA0B9xB,CAA1B,CAAJ,EAAkC;UAC5B40B,MAAMF,aAAab,CAAb,GAAiB,CAAjB,GAAqB,CAA/B;aACOxQ,MAAP,CAAc3qB,IAAIk8B,GAAJ,GAAU,CAAxB,EAA2BA,GAA3B,EAAgC5Q,SAASxrB,IAAT,EAAewH,CAAf,EAAkB0I,MAAM0V,QAAxB,CAAhC;aACO1lB,IAAIk8B,GAAJ,GAAU,CAAjB;;;;;MAKAN,IAAJ,EAAU;SAAOlW,QAAL,CAAckW,IAAd,GAAqB,IAArB;;MACRC,IAAJ,EAAU;SAAOnW,QAAL,CAAcmW,IAAd,GAAqB,IAArB;;MACRE,IAAJ,EAAU;SAAOrW,QAAL,CAAcqW,IAAd,GAAqB,IAArB;;;MAERC,aAAaX,EAAjB,EAAqB;;;;cAIThrB,MAAV,EAAkBrQ,IAAI,CAAtB,EAAyBF,IAAzB;WACOE,IAAI,CAAX;;;SAGKA,CAAP;;;AAGF,SAASm8B,SAAT,CAAmBlX,IAAnB,EAAyB;UACfiU,QAAQjU,IAAR,CAAR;SACOoW,EAAL;SACKC,GAAL;aACS,CAAP;SACGH,CAAL;aACS,CAAP;SACGC,CAAL;aACS,CAAP;;;;AAIN,SAASgB,eAAT,CAAyB/rB,MAAzB,EAAiCrQ,CAAjC,EAAoCF,IAApC,EAA0C;MACpCkQ,QAAQK,OAAOrQ,CAAP,CAAZ;MACIilB,OAAO5U,OAAOrQ,CAAP,EAAUmjB,UAAV,CAAqB,CAArB,CAAX;;;MAGIrjB,KAAK27B,iBAAL,CAAuBxW,IAAvB,EAA6BoX,YAA7B,KAA8C,CAAlD,EAAqD;;;;MAEjDhL,OAAOhhB,OAAOrQ,IAAI,CAAX,EAAcmjB,UAAd,CAAyB,CAAzB,CAAX;MACI5Z,MAAM4yB,UAAU9K,IAAV,CAAV;;SAEO1G,MAAP,CAAc3qB,CAAd,EAAiB,CAAjB;SACOqQ,OAAOsa,MAAP,CAAc3qB,IAAIuJ,GAAlB,EAAuB,CAAvB,EAA0ByG,KAA1B,CAAP;;;AAGF,SAAS0pB,kBAAT,CAA4BrpB,MAA5B,EAAoCrQ,CAApC,EAAuCF,IAAvC,EAA6C;MACvCkQ,QAAQK,OAAOrQ,CAAP,CAAZ;MACIilB,OAAO5U,OAAOrQ,CAAP,EAAUmjB,UAAV,CAAqB,CAArB,CAAX;;MAEIrjB,KAAKs5B,oBAAL,CAA0BmB,aAA1B,CAAJ,EAA8C;QACxC+B,eAAehR,SAASxrB,IAAT,EAAey6B,aAAf,EAA8BvqB,MAAM0V,QAApC,CAAnB;;;QAGIV,MAAMllB,KAAK27B,iBAAL,CAAuBxW,IAAvB,EAA6BoX,YAA7B,KAA8C,CAA9C,GAAkDr8B,CAAlD,GAAsDA,IAAI,CAApE;WACO2qB,MAAP,CAAc3F,GAAd,EAAmB,CAAnB,EAAsBsX,YAAtB;;;;SAIKt8B,CAAP;;;;;;;;;;;;;;;;;;AC3RF,AACA,AACA,AACA,AACA,AAEOu8B,IAAAA,aAA8BC,QAA9BD;AAAYE,IAAAA,iBAAkBD,QAAlBC;AACnB,IAAMnM,SAAO,IAAIC,WAAJ,CAAgB1xB,QAAQ,IAAR,EAAcW,YAAd,CAA2BgxB,YAAY,WAAvC,CAAhB,CAAb;AACA,IAAMzF,eAAe,IAAI2R,YAAJ,CAAiBF,OAAjB,CAArB;;;;;;;IAOqBG;;;;;;;;;kBAEZ9M,qCAAaF,MAAM;SACnBX,QAAL,CAAc4N,cAAd;;;SAGK5N,QAAL,CAAc,CAAC,MAAD,EAAS,MAAT,EAAiB,MAAjB,EAAyB,MAAzB,CAAd;;;SAGKA,QAAL,CAAc6N,sBAAd;SACK7N,QAAL,CAAc,CAAC,MAAD,CAAd,EAAwB,KAAxB;SACKA,QAAL,CAAc8N,UAAd;SACK9N,QAAL,CAAc6N,sBAAd;SACK7N,QAAL,CAAc,CAAC,MAAD,CAAd;SACKA,QAAL,CAAc+N,UAAd;;;SAGK/N,QAAL,CAAc,CAAC,MAAD,EAAS,MAAT,EAAiB,MAAjB,EAAyB,MAAzB,EAAiC,MAAjC,EAAyC,MAAzC,EAAiD,MAAjD,CAAd;SACKA,QAAL,CAAcgO,OAAd;;;;;;;SAOKhO,QAAL,CAAc,CAAC,MAAD,EAAS,MAAT,EAAiB,MAAjB,EAAyB,MAAzB,EAAiC,MAAjC,EAAyC,MAAzC,EAAiD,MAAjD,CAAd;;;kBAGKe,yCAAeJ,MAAMtf,QAAQ;+BAGzBrQ,CAHyB;UAI5Bye,YAAYpO,OAAOrQ,CAAP,EAAUmjB,UAAV,CAAqB,CAArB,CAAhB;UACIsZ,eAAehe,SAAf,CAAJ,EAA+B;YACzBwe,aAAaR,eAAehe,SAAf,EAA0BzV,GAA1B,CAA8B,aAAK;cAC9C8X,IAAI6O,KAAK7vB,IAAL,CAAU27B,iBAAV,CAA4B5a,CAA5B,CAAR;iBACO,IAAIyX,SAAJ,CAAc3I,KAAK7vB,IAAnB,EAAyBghB,EAAEK,EAA3B,EAA+B,CAACN,CAAD,CAA/B,EAAoCxQ,OAAOrQ,CAAP,EAAU0lB,QAA9C,CAAP;SAFe,CAAjB;;eAKOiF,MAAP,gBAAc3qB,CAAd,EAAiB,CAAjB,SAAuBi9B,UAAvB;;;;;;SARC,IAAIj9B,IAAIqQ,OAAOpQ,MAAP,GAAgB,CAA7B,EAAgCD,KAAK,CAArC,EAAwCA,GAAxC,EAA6C;YAApCA,CAAoC;;;;;EA/BJ0vB,yBACpCW,iBAAiB;AA4C1B,SAAS6M,WAAT,CAAqBltB,KAArB,EAA4B;SACnBsgB,OAAK3vB,GAAL,CAASqP,MAAMmT,UAAN,CAAiB,CAAjB,CAAT,CAAP;;;IAGIga,UACJ,iBAAYzL,QAAZ,EAAsB0L,YAAtB,EAAoCC,QAApC,EAA8C;;;OACvC3L,QAAL,GAAgBA,QAAhB;OACK0L,YAAL,GAAoBA,YAApB;OACKC,QAAL,GAAgBA,QAAhB;;;AAIJ,SAAST,cAAT,CAAwB98B,IAAxB,EAA8BuQ,MAA9B,EAAsC;MAChCgtB,WAAW,CAAf;uBAC+BtS,aAAasL,KAAb,CAAmBhmB,OAAOrH,GAAP,CAAWk0B,WAAX,CAAnB,CAA/B,6GAA4E;;;;;;;;;;;;;QAAlEp2B,KAAkE;QAA3DC,GAA2D;QAAtDu2B,IAAsD;;MACxED,QAAF;;;SAGK,IAAIr9B,IAAI8G,KAAb,EAAoB9G,KAAK+G,GAAzB,EAA8B/G,GAA9B,EAAmC;aAC1BA,CAAP,EAAU44B,UAAV,GAAuB,IAAIuE,OAAJ,CAAYZ,WAAWW,YAAY7sB,OAAOrQ,CAAP,CAAZ,CAAX,CAAZ,EAAgDs9B,KAAK,CAAL,CAAhD,EAAyDD,QAAzD,CAAvB;;;;QAIEE,QAAQltB,OAAOvJ,KAAP,EAAc8xB,UAAd,CAAyBlH,QAAzB,KAAsC,GAAtC,GAA4C,CAA5C,GAAgDlvB,KAAKub,GAAL,CAAS,CAAT,EAAYhX,MAAMD,KAAlB,CAA5D;SACK,IAAI9G,MAAI8G,KAAb,EAAoB9G,MAAI8G,QAAQy2B,KAAhC,EAAuCv9B,KAAvC,EAA4C;aACnCA,GAAP,EAAU0lB,QAAV,CAAmB8X,IAAnB,GAA0B,IAA1B;;;;;AAKN,SAASX,sBAAT,CAAgC/8B,IAAhC,EAAsCuQ,MAAtC,EAA8C;wBAC1BA,MAAlB,oHAA0B;;;;;;;;;;;;QAAjBL,KAAiB;;UAClB6oB,WAAN,GAAoB,KAApB;;;;AAIJ,SAASiE,UAAT,CAAoBh9B,IAApB,EAA0BuQ,MAA1B,EAAkC;wBACdA,MAAlB,oHAA0B;;;;;;;;;;;;QAAjBL,KAAiB;;QACpBA,MAAM6oB,WAAN,IAAqB7oB,MAAM0V,QAAN,CAAe8X,IAAxC,EAA8C;;YAEtC5E,UAAN,CAAiBlH,QAAjB,GAA4B,GAA5B;;;;;AAKN,SAASqL,UAAT,CAAoBj9B,IAApB,EAA0BuQ,MAA1B,EAAkC;wBACdA,MAAlB,oHAA0B;;;;;;;;;;;;QAAjBL,KAAiB;;QACpBA,MAAM6oB,WAAV,EAAuB;;YAEfD,UAAN,CAAiBlH,QAAjB,GAA4B,MAA5B;;;;;AAKN,SAASsL,OAAT,CAAiBl9B,IAAjB,EAAuBuQ,MAAvB,EAA+B;MACzBisB,eAAex8B,KAAK27B,iBAAL,CAAuB,MAAvB,EAA+Bta,EAAlD;;OAEK,IAAIra,QAAQ,CAAZ,EAAeC,MAAM02B,aAAaptB,MAAb,EAAqB,CAArB,CAA1B,EAAmDvJ,QAAQuJ,OAAOpQ,MAAlE,EAA0E6G,QAAQC,GAAR,EAAaA,MAAM02B,aAAaptB,MAAb,EAAqBvJ,KAArB,CAA7F,EAA0H;QACpH9G,UAAJ;QAAO09B,UAAP;QACIC,OAAOttB,OAAOvJ,KAAP,EAAc8xB,UAAzB;QACIx2B,OAAOu7B,KAAKP,YAAhB;;;QAGIh7B,SAAS,2BAAT,IAAwCA,SAAS,kBAAjD,IAAuEA,SAAS,gBAApF,EAAsG;;;;;QAKlGA,SAAS,gBAAT,IAA6Bk6B,YAAjC,EAA+C;UACzCxb,IAAI,IAAIwX,SAAJ,CAAcx4B,IAAd,EAAoBw8B,YAApB,EAAkC,CAAC,MAAD,CAAlC,CAAR;QACE1D,UAAF,GAAe+E,IAAf;;;WAGK39B,IAAI8G,KAAT,EAAgB9G,IAAI+G,GAAJ,IAAWsJ,OAAOrQ,CAAP,EAAU44B,UAAV,CAAqBlH,QAArB,KAAkC,GAA7D,EAAkE1xB,GAAlE;aACO2qB,MAAP,CAAc,EAAE3qB,CAAhB,EAAmB,CAAnB,EAAsB8gB,CAAtB;;;;;QAKE6c,KAAKjM,QAAL,KAAkB,GAAlB,IAAyB3qB,MAAMD,KAAN,GAAc,CAA3C,EAA8C;;WAEvC9G,IAAI8G,QAAQ,CAAjB,EAAoB9G,IAAI+G,GAAxB,EAA6B/G,GAA7B,EAAkC;eACzBqQ,OAAOrQ,CAAP,EAAU44B,UAAjB;YACIgF,OAAOD,IAAP,KAAgBE,SAASxtB,OAAOrQ,CAAP,CAAT,CAApB,EAAyC;;;cAGnC69B,SAASxtB,OAAOrQ,CAAP,CAAT,CAAJ,EAAyB;;;;iBAIlB2qB,MAAP,gBAAc7jB,KAAd,EAAqB,CAArB,SAA2BuJ,OAAOsa,MAAP,CAAc7jB,QAAQ,CAAtB,EAAyB9G,IAAI8G,KAA7B,CAA3B,GAAgEuJ,OAAOrQ,CAAP,CAAhE;;;;;;;SAODA,IAAI8G,KAAJ,EAAW42B,IAAI32B,GAApB,EAAyB/G,IAAI+G,GAA7B,EAAkC/G,GAAlC,EAAuC;aAC9BqQ,OAAOrQ,CAAP,EAAU44B,UAAjB;UACIgF,OAAOD,IAAP,KAAgBE,SAASxtB,OAAOrQ,CAAP,CAAT,CAApB,EAAyC;;;YAGnC69B,SAASxtB,OAAOrQ,CAAP,CAAT,IAAsBA,IAAI,CAA1B,GAA8BA,CAAlC;OAHF,MAIO,IAAI,CAAC29B,KAAKjM,QAAL,KAAkB,MAAlB,IAA4BiM,KAAKjM,QAAL,KAAkB,OAA/C,KAA2DgM,IAAI19B,CAAnE,EAAsE;eACpE2qB,MAAP,gBAAc+S,CAAd,EAAiB,CAAjB,EAAoBrtB,OAAOrQ,CAAP,CAApB,SAAkCqQ,OAAOsa,MAAP,CAAc+S,CAAd,EAAiB19B,IAAI09B,CAArB,CAAlC;;;;;;AAMR,SAASD,YAAT,CAAsBptB,MAAtB,EAA8BvJ,KAA9B,EAAqC;MAC/BA,SAASuJ,OAAOpQ,MAApB,EAA4B,OAAO6G,KAAP;MACxBu2B,WAAWhtB,OAAOvJ,KAAP,EAAc8xB,UAAd,CAAyByE,QAAxC;SACO,EAAEv2B,KAAF,GAAUuJ,OAAOpQ,MAAjB,IAA2BoQ,OAAOvJ,KAAP,EAAc8xB,UAAd,CAAyByE,QAAzB,KAAsCA,QAAxE;SACOv2B,KAAP;;;AAGF,SAAS+2B,QAAT,CAAkB7tB,KAAlB,EAAyB;SAChBA,MAAM4oB,UAAN,CAAiBlH,QAAjB,KAA8B,GAA9B,IAAqC,CAAC1hB,MAAM8tB,SAAnD;;;AAGF,SAASF,MAAT,CAAgBD,IAAhB,EAAsB;SACbA,KAAKjM,QAAL,KAAkB,GAAlB,IAAyBiM,KAAKjM,QAAL,KAAkB,IAAlD;;;ACjLF,IAAMqM,UAAU;QACR3M,YADQ;QAERA,YAFQ;QAGRA,YAHQ;UAINA,YAJM;QAKRA,YALQ;QAMRA,YANQ;QAORA,YAPQ;QAQRA,YARQ;;QAUR6H,YAVQ;;QAYR0D,eAZQ;QAaRA,eAbQ;QAcRA,eAdQ;QAeRA,eAfQ;QAgBRA,eAhBQ;QAiBRA,eAjBQ;QAkBRA,eAlBQ;QAmBRA,eAnBQ;QAoBRA,eApBQ;QAqBRA,eArBQ;QAsBRA,eAtBQ;QAuBRA,eAvBQ;QAwBRA,eAxBQ;QAyBRA,eAzBQ;QA0BRA,eA1BQ;QA2BRA,eA3BQ;QA4BRA,eA5BQ;QA6BRA,eA7BQ;QA8BRA,eA9BQ;QA+BRA,eA/BQ;;;QAkCRA,eAlCQ;QAmCRA,eAnCQ;;;QAsCRA,eAtCQ;;;QAyCRA,eAzCQ;QA0CRA,eA1CQ;QA2CRA,eA3CQ;QA4CRA,eA5CQ;QA6CRA,eA7CQ;QA8CRA,eA9CQ;QA+CRA,eA/CQ;QAgDRA,eAhDQ;QAiDRA,eAjDQ;QAkDRA,eAlDQ;QAmDRA,eAnDQ;QAoDRA,eApDQ;QAqDRA,eArDQ;QAsDRA,eAtDQ;QAuDRA,eAvDQ;QAwDRA,eAxDQ;;QA0DRjN,aA1DQ;QA2DRA,aA3DQ;CAAhB;;AA8DA,AAAO,SAASsO,MAAT,CAAgB5Y,MAAhB,EAAwB;MACzB6Y,SAASF,QAAQ3Y,MAAR,CAAb;MACI6Y,MAAJ,EAAY;WAASA,MAAP;;;SAEPvO,aAAP;;;ICpEmBwO;;;;;;;;;0BACnBtI,mCAAYnd,YAAY0E,OAAO;;;YACrB1E,UAAR;WACO,CAAL;;;cACM5K,QAAQ,KAAKqoB,aAAL,CAAmB/Y,MAAMoE,QAAzB,CAAZ;cACI1T,UAAU,CAAC,CAAf,EAAkB;mBACT,KAAP;;;cAGEmC,QAAQ,KAAKylB,aAAL,CAAmBC,GAA/B;kBACQvY,MAAMhY,OAAd;iBACO,CAAL;oBACQgc,EAAN,GAAYnR,MAAMmR,EAAN,GAAWhE,MAAMghB,YAAlB,GAAkC,MAA7C;;;iBAGG,CAAL;oBACQhd,EAAN,GAAWhE,MAAM0Q,UAAN,CAAiBltB,GAAjB,CAAqBkN,KAArB,CAAX;;;;iBAIG,IAAP;;;WAGG,CAAL;;;cACMA,SAAQ,KAAKqoB,aAAL,CAAmB/Y,MAAMoE,QAAzB,CAAZ;cACI1T,WAAU,CAAC,CAAf,EAAkB;;;;kBACZyoB,WAAWnZ,MAAMihB,SAAN,CAAgBz9B,GAAhB,CAAoBkN,MAApB,CAAf;qBACK4nB,aAAL,CAAmBC,GAAnB,CAAuBvU,EAAvB,GAA4BmV,SAAS,CAAT,CAA5B;qBACKb,aAAL,CAAmBC,GAAnB,CAAuB8C,iBAAvB,GAA2C,CAA3C;;kBAEI9S,WAAW,OAAK+P,aAAL,CAAmBC,GAAnB,CAAuBhQ,QAAtC;kBACI2Y,WAAW,OAAK5I,aAAL,CAAmBC,GAAlC;kBACI4I,cAAchI,SAASxQ,KAAT,CAAe,CAAf,EAAkB9c,GAAlB,CAAsB,UAACmH,GAAD,EAAMnQ,CAAN,EAAY;oBAC9CgQ,QAAQ,IAAIsoB,SAAJ,CAAc,OAAKx4B,IAAnB,EAAyBqQ,GAAzB,EAA8BouB,SAA9B,EAAyC7Y,QAAzC,CAAZ;sBACMkT,UAAN,GAAmByF,SAASzF,UAA5B;sBACMkF,SAAN,GAAkBO,SAASP,SAA3B;sBACMtF,iBAAN,GAA0Bx4B,IAAI,CAA9B;sBACM64B,WAAN,GAAoB,IAApB;uBACO7oB,KAAP;eANgB,CAAlB;;gCASKK,MAAL,EAAYsa,MAAZ,iBAAmB,OAAK8K,aAAL,CAAmB5nB,KAAnB,GAA2B,CAA9C,EAAiD,CAAjD,SAAuDywB,WAAvD;;mBACO;;;;;;;iBAGF,KAAP;;;WAGG,CAAL;;;cACMzwB,UAAQ,KAAKqoB,aAAL,CAAmB/Y,MAAMoE,QAAzB,CAAZ;cACI1T,YAAU,CAAC,CAAf,EAAkB;gBACZ2wB,aAAa,CAAjB,CADgB;iBAEX/I,aAAL,CAAmBC,GAAnB,CAAuBvU,EAAvB,GAA4BhE,MAAMshB,YAAN,CAAmB99B,GAAnB,CAAuBkN,OAAvB,EAA8B2wB,UAA9B,CAA5B;mBACO,IAAP;;;iBAGK,KAAP;;;WAGG,CAAL;;;cACM3wB,UAAQ,KAAKqoB,aAAL,CAAmB/Y,MAAMoE,QAAzB,CAAZ;cACI1T,YAAU,CAAC,CAAf,EAAkB;mBACT,KAAP;;;+BAGmBsP,MAAMuhB,YAAN,CAAmB/9B,GAAnB,CAAuBkN,OAAvB,CAArB,6GAAoD;;;;;;;;;;;;gBAA3C8wB,QAA2C;;gBAC9CpI,UAAU,KAAKE,oBAAL,CAA0B,CAA1B,EAA6BkI,SAASjT,UAAtC,CAAd;gBACI,CAAC6K,OAAL,EAAc;;;;gBAIV8H,YAAW,KAAK5I,aAAL,CAAmBC,GAAlC;;;gBAGIkJ,aAAaP,UAASlb,UAAT,CAAoB2C,KAApB,EAAjB;kCACkByQ,OAAlB,oHAA2B;;;;;;;;;;;;kBAAlB1oB,OAAkB;;yBACd1O,IAAX,mBAAmB,KAAKkR,MAAL,CAAYxC,OAAZ,EAAmBsV,UAAtC;;;;gBAIE0b,gBAAgB,IAAIvG,SAAJ,CAAc,KAAKx4B,IAAnB,EAAyB6+B,SAAS3uB,KAAlC,EAAyC4uB,UAAzC,EAAqDP,UAAS3Y,QAA9D,CAApB;0BACckT,UAAd,GAA2ByF,UAASzF,UAApC;0BACckF,SAAd,GAA0B,IAA1B;0BACcjF,WAAd,GAA4B,IAA5B;;;;;;;;;;;;;;;;;;;;;;;;;;gBA0BIiG,iBAAiBT,UAASvb,MAA9B;iBACK,IAAI9iB,IAAI,CAAb,EAAgBA,IAAIu2B,QAAQt2B,MAAZ,IAAsB6+B,cAAtC,EAAsD9+B,GAAtD,EAA2D;+BACxC,KAAKqQ,MAAL,CAAYkmB,QAAQv2B,CAAR,CAAZ,EAAwB8iB,MAAzC;;;0BAGYoQ,UAAd,GAA2B4L,iBAAiB,IAAjB,GAAwB,KAAK5L,UAAL,EAAnD;;gBAEI6L,YAAYV,UAASnL,UAAzB;gBACI8L,eAAeX,UAASlb,UAAT,CAAoBljB,MAAvC;gBACIg/B,WAAWD,YAAf;gBACIha,MAAM,KAAKyQ,aAAL,CAAmB5nB,KAAnB,GAA2B,CAArC;;;;kCAIuB0oB,OAAvB,oHAAgC;;;;;;;;;;;;kBAAvB2I,UAAuB;;;kBAE1BJ,cAAJ,EAAoB;sBACZI,UAAN;eADF,MAEO;uBACEla,MAAMka,UAAb,EAAyB;sBACnB1G,oBAAoByG,WAAWD,YAAX,GAA0Bx8B,KAAKub,GAAL,CAAS,KAAK1N,MAAL,CAAY2U,GAAZ,EAAiBwT,iBAAjB,IAAsC,CAA/C,EAAkDwG,YAAlD,CAAlD;uBACK3uB,MAAL,CAAY2U,GAAZ,EAAiBkO,UAAjB,GAA8B2L,cAAc3L,UAA5C;uBACK7iB,MAAL,CAAY2U,GAAZ,EAAiBwT,iBAAjB,GAAqCA,iBAArC;;;;;0BAKQ,KAAKnoB,MAAL,CAAY2U,GAAZ,EAAiBkO,UAA7B;6BACe,KAAK7iB,MAAL,CAAY2U,GAAZ,EAAiB7B,UAAjB,CAA4BljB,MAA3C;0BACY++B,YAAZ;oBAf8B;;;;gBAoB5BD,aAAa,CAACD,cAAlB,EAAkC;mBAC3B,IAAI9+B,MAAIglB,GAAb,EAAkBhlB,MAAI,KAAKqQ,MAAL,CAAYpQ,MAAlC,EAA0CD,KAA1C,EAA+C;oBACzC,KAAKqQ,MAAL,CAAYrQ,GAAZ,EAAekzB,UAAf,KAA8B6L,SAAlC,EAA6C;sBACvCvG,oBAAoByG,WAAWD,YAAX,GAA0Bx8B,KAAKub,GAAL,CAAS,KAAK1N,MAAL,CAAYrQ,GAAZ,EAAew4B,iBAAf,IAAoC,CAA7C,EAAgDwG,YAAhD,CAAlD;uBACK3uB,MAAL,CAAYrQ,GAAZ,EAAew4B,iBAAf,GAAmCA,iBAAnC;iBAFF,MAGO;;;;;;;iBAON,IAAIx4B,MAAIu2B,QAAQt2B,MAAR,GAAiB,CAA9B,EAAiCD,OAAK,CAAtC,EAAyCA,KAAzC,EAA8C;mBACvCqQ,MAAL,CAAYsa,MAAZ,CAAmB4L,QAAQv2B,GAAR,CAAnB,EAA+B,CAA/B;;;iBAGGqQ,MAAL,CAAY,KAAKolB,aAAL,CAAmB5nB,KAA/B,IAAwCgxB,aAAxC;mBACO,IAAP;;;iBAGK,KAAP;;;WAGG,CAAL;;eACS,KAAK1H,YAAL,CAAkBha,KAAlB,CAAP;;WAEG,CAAL;;eACS,KAAKsa,oBAAL,CAA0Bta,KAA1B,CAAP;;WAEG,CAAL;;eACS,KAAKyY,WAAL,CAAiBzY,MAAM1E,UAAvB,EAAmC0E,MAAMzI,SAAzC,CAAP;;;cAGM,IAAIpU,KAAJ,sBAA6BmY,UAA7B,uBAAN;;;;;EAhLmCia;;ICDtByM;;;;;;;;;0BACnBC,iDAAmBpJ,eAAep1B,OAAO;QACnCgjB,WAAW,KAAK5C,SAAL,CAAe,KAAKyU,aAAL,CAAmBlD,SAAnB,CAA6ByD,aAA7B,CAAf,CAAf;QACIp1B,MAAMygB,QAAN,IAAkB,IAAtB,EAA4B;eACjBA,QAAT,IAAqBzgB,MAAMygB,QAA3B;;;QAGEzgB,MAAMujB,QAAN,IAAkB,IAAtB,EAA4B;eACjBA,QAAT,IAAqBvjB,MAAMujB,QAA3B;;;QAGEvjB,MAAMy+B,UAAN,IAAoB,IAAxB,EAA8B;eACnB/b,OAAT,IAAoB1iB,MAAMy+B,UAA1B;;;QAGEz+B,MAAM0+B,UAAN,IAAoB,IAAxB,EAA8B;eACnB/b,OAAT,IAAoB3iB,MAAM0+B,UAA1B;;;;;;0BAMJ1J,mCAAYnd,YAAY0E,OAAO;YACrB1E,UAAR;WACO,CAAL;;;cACM5K,QAAQ,KAAKqoB,aAAL,CAAmB/Y,MAAMoE,QAAzB,CAAZ;cACI1T,UAAU,CAAC,CAAf,EAAkB;mBACT,KAAP;;;kBAGMsP,MAAMhY,OAAd;iBACO,CAAL;mBACOi6B,kBAAL,CAAwB,CAAxB,EAA2BjiB,MAAMvc,KAAjC;;;iBAGG,CAAL;mBACOw+B,kBAAL,CAAwB,CAAxB,EAA2BjiB,MAAMiF,MAAN,CAAazhB,GAAb,CAAiBkN,KAAjB,CAA3B;;;;iBAIG,IAAP;;;WAGG,CAAL;;;cACM0xB,YAAY,KAAK9J,aAAL,CAAmBpD,IAAnB,EAAhB;cACI,CAACkN,SAAL,EAAgB;mBACP,KAAP;;;cAGE1xB,SAAQ,KAAKqoB,aAAL,CAAmB/Y,MAAMoE,QAAzB,CAAZ;cACI1T,WAAU,CAAC,CAAf,EAAkB;mBACT,KAAP;;;kBAGMsP,MAAMhY,OAAd;iBACO,CAAL;;kBACM/D,MAAM+b,MAAMqiB,QAAN,CAAe7+B,GAAf,CAAmBkN,MAAnB,CAAV;;mCAEiBzM,GAAjB,6GAAsB;;;;;;;;;;;;oBAAb0gB,KAAa;;oBAChBA,MAAK2d,WAAL,KAAqBF,UAAUpe,EAAnC,EAAuC;uBAChCie,kBAAL,CAAwB,CAAxB,EAA2Btd,MAAK4d,MAAhC;uBACKN,kBAAL,CAAwB,CAAxB,EAA2Btd,MAAK6d,MAAhC;yBACO,IAAP;;;;qBAIG,KAAP;;iBAEG,CAAL;;kBACMC,SAAS,KAAKjJ,UAAL,CAAgB,KAAKlB,aAAL,CAAmBC,GAAnB,CAAuBvU,EAAvC,EAA2ChE,MAAM0iB,SAAjD,CAAb;kBACIC,SAAS,KAAKnJ,UAAL,CAAgB4I,UAAUpe,EAA1B,EAA8BhE,MAAM4iB,SAApC,CAAb;kBACIH,WAAW,CAAC,CAAZ,IAAiBE,WAAW,CAAC,CAAjC,EAAoC;uBAC3B,KAAP;;;kBAGEhe,OAAO3E,MAAM6iB,YAAN,CAAmBr/B,GAAnB,CAAuBi/B,MAAvB,EAA+Bj/B,GAA/B,CAAmCm/B,MAAnC,CAAX;mBACKV,kBAAL,CAAwB,CAAxB,EAA2Btd,KAAK4d,MAAhC;mBACKN,kBAAL,CAAwB,CAAxB,EAA2Btd,KAAK6d,MAAhC;qBACO,IAAP;;;;WAID,CAAL;;;cACMM,YAAY,KAAKxK,aAAL,CAAmBlD,SAAnB,EAAhB;cACIgN,aAAY,KAAKlvB,MAAL,CAAY4vB,SAAZ,CAAhB;cACI,CAACV,UAAL,EAAgB;mBACP,KAAP;;;cAGEW,YAAY/iB,MAAMgjB,gBAAN,CAAuB,KAAKjK,aAAL,CAAmB/Y,MAAMoE,QAAzB,CAAvB,CAAhB;cACI,CAAC2e,SAAD,IAAc,CAACA,UAAUE,UAA7B,EAAyC;mBAChC,KAAP;;;cAGEC,aAAaljB,MAAMgjB,gBAAN,CAAuB,KAAKjK,aAAL,CAAmB/Y,MAAMoE,QAAzB,EAAmCge,WAAUpe,EAA7C,CAAvB,CAAjB;cACI,CAACkf,UAAD,IAAe,CAACA,WAAWC,WAA/B,EAA4C;mBACnC,KAAP;;;cAGE1qB,QAAQ,KAAK2qB,SAAL,CAAeF,WAAWC,WAA1B,CAAZ;cACI5X,OAAO,KAAK6X,SAAL,CAAeL,UAAUE,UAAzB,CAAX;;cAEI1K,MAAM,KAAK1U,SAAL,CAAe,KAAKyU,aAAL,CAAmB5nB,KAAlC,CAAV;cACIsX,OAAO,KAAKnE,SAAL,CAAeif,SAAf,CAAX;;kBAEQ,KAAKxa,SAAb;iBACO,KAAL;kBACMpE,QAAJ,GAAeqH,KAAK1I,CAAL,GAAS0V,IAAIpS,OAA5B;;kBAEIkd,IAAI5qB,MAAMoK,CAAN,GAAUmF,KAAK7B,OAAvB;mBACKjC,QAAL,IAAiBmf,CAAjB;mBACKld,OAAL,IAAgBkd,CAAhB;;;iBAGG,KAAL;kBACM9X,KAAK1I,CAAL,GAAS0V,IAAIpS,OAAjB;kBACIjC,QAAJ,IAAgBmf,CAAhB;kBACIld,OAAJ,IAAekd,CAAf;mBACKnf,QAAL,GAAgBzL,MAAMoK,CAAN,GAAUmF,KAAK7B,OAA/B;;;;cAIA,KAAKmS,aAAL,CAAmB/b,KAAnB,CAAyB+mB,WAA7B,EAA0C;iBACnChL,aAAL,CAAmBC,GAAnB,CAAuBgD,iBAAvB,GAA2CuH,SAA3C;gBACI1c,OAAJ,GAAc3N,MAAM6O,CAAN,GAAUiE,KAAKjE,CAA7B;WAFF,MAGO;uBACKiU,iBAAV,GAA8B,KAAKjD,aAAL,CAAmB5nB,KAAjD;gBACI0V,OAAJ,GAAcmF,KAAKjE,CAAL,GAAS7O,MAAM6O,CAA7B;;;iBAGK,IAAP;;;WAGG,CAAL;;;cACM4G,YAAY,KAAK6K,aAAL,CAAmB/Y,MAAMujB,YAAzB,CAAhB;cACIrV,cAAc,CAAC,CAAnB,EAAsB;mBACb,KAAP;;;;cAIEsV,iBAAiB,KAAKlL,aAAL,CAAmB5nB,KAAxC;iBACO,EAAE8yB,cAAF,IAAoB,CAApB,IAAyB,KAAKtwB,MAAL,CAAYswB,cAAZ,EAA4B7d,MAA5D;;cAEI6d,iBAAiB,CAArB,EAAwB;mBACf,KAAP;;;cAGEC,YAAY,KAAK1K,aAAL,CAAmB/Y,MAAM0jB,YAAzB,EAAuC,KAAKxwB,MAAL,CAAYswB,cAAZ,EAA4Bxf,EAAnE,CAAhB;cACIyf,cAAc,CAAC,CAAnB,EAAsB;mBACb,KAAP;;;cAGEE,aAAa3jB,MAAM4jB,SAAN,CAAgB1V,SAAhB,CAAjB;cACI2V,aAAa7jB,MAAM8jB,SAAN,CAAgBL,SAAhB,EAA2BE,WAAW9J,KAAtC,CAAjB;eACKkK,WAAL,CAAiBJ,UAAjB,EAA6BE,UAA7B,EAAyCL,cAAzC;iBACO,IAAP;;;WAGG,CAAL;;;cACMtV,aAAY,KAAK6K,aAAL,CAAmB/Y,MAAMujB,YAAzB,CAAhB;cACIrV,eAAc,CAAC,CAAnB,EAAsB;mBACb,KAAP;;;;cAIEsV,kBAAiB,KAAKlL,aAAL,CAAmB5nB,KAAxC;iBACO,EAAE8yB,eAAF,IAAoB,CAApB,IAAyB,KAAKtwB,MAAL,CAAYswB,eAAZ,EAA4B7d,MAA5D;;cAEI6d,kBAAiB,CAArB,EAAwB;mBACf,KAAP;;;cAGEQ,WAAW,KAAKjL,aAAL,CAAmB/Y,MAAMikB,gBAAzB,EAA2C,KAAK/wB,MAAL,CAAYswB,eAAZ,EAA4Bxf,EAAvE,CAAf;cACIggB,aAAa,CAAC,CAAlB,EAAqB;mBACZ,KAAP;;;cAGEE,YAAYlkB,MAAMmkB,aAAN,CAAoBH,QAApB,CAAhB;cACII,YAAY,KAAK9L,aAAL,CAAmBC,GAAnC;cACI8L,WAAW,KAAKnxB,MAAL,CAAYswB,eAAZ,CAAf;cACIc,YAAYD,SAAStO,UAAT,IAAuBsO,SAAStO,UAAT,KAAwBqO,UAAUrO,UAAzD,IAAwEqO,UAAU/I,iBAAV,IAA+B,IAAvG,GACZh2B,KAAKub,GAAL,CAASwjB,UAAU/I,iBAAnB,EAAsCgJ,SAASre,UAAT,CAAoBljB,MAA1D,IAAoE,CADxD,GAEZuhC,SAASre,UAAT,CAAoBljB,MAApB,GAA6B,CAFjC;;cAII6gC,cAAa3jB,MAAM4jB,SAAN,CAAgB1V,UAAhB,CAAjB;cACI2V,cAAaK,UAAUI,SAAV,EAAqBX,YAAW9J,KAAhC,CAAjB;eACKkK,WAAL,CAAiBJ,WAAjB,EAA6BE,WAA7B,EAAyCL,eAAzC;iBACO,IAAP;;;WAGG,CAAL;;;cACMe,aAAa,KAAKxL,aAAL,CAAmB/Y,MAAMwkB,aAAzB,CAAjB;cACID,eAAe,CAAC,CAApB,EAAuB;mBACd,KAAP;;;;cAIEE,YAAY,KAAKnM,aAAL,CAAmBlD,SAAnB,CAA6B,CAAC,CAA9B,CAAhB;cACIlB,OAAO,KAAKhhB,MAAL,CAAYuxB,SAAZ,CAAX;cACI,CAACvQ,IAAD,IAAS,CAACA,KAAKvO,MAAnB,EAA2B;mBAClB,KAAP;;;cAGE4S,OAAM,KAAKD,aAAL,CAAmBC,GAA7B;;;cAGImM,OAAO,KAAX;cACInM,KAAIxC,UAAJ,KAAmB7B,KAAK6B,UAA5B,EAAwC;gBAClC,CAACwC,KAAIxC,UAAT,EAAqB;;qBACZ,IAAP;aADF,MAEO,IAAIwC,KAAI8C,iBAAJ,KAA0BnH,KAAKmH,iBAAnC,EAAsD;;qBACpD,IAAP;;WAJJ,MAMO;;;gBAGA9C,KAAIxC,UAAJ,IAAkB,CAACwC,KAAI8C,iBAAxB,IAA+CnH,KAAK6B,UAAL,IAAmB,CAAC7B,KAAKmH,iBAA5E,EAAgG;qBACvF,IAAP;;;;cAIA,CAACqJ,IAAL,EAAW;mBACF,KAAP;;;cAGEC,aAAa,KAAK5L,aAAL,CAAmB/Y,MAAM4kB,aAAzB,EAAwC1Q,KAAKlQ,EAA7C,CAAjB;cACI2gB,eAAe,CAAC,CAApB,EAAuB;mBACd,KAAP;;;cAGEhB,eAAa3jB,MAAM6kB,UAAN,CAAiBN,UAAjB,CAAjB;cACIV,eAAa7jB,MAAM8kB,UAAN,CAAiBH,UAAjB,EAA6BhB,aAAW9J,KAAxC,CAAjB;eACKkK,WAAL,CAAiBJ,YAAjB,EAA6BE,YAA7B,EAAyCY,SAAzC;iBACO,IAAP;;;WAGG,CAAL;;eACS,KAAKzK,YAAL,CAAkBha,KAAlB,CAAP;;WAEG,CAAL;;eACS,KAAKsa,oBAAL,CAA0Bta,KAA1B,CAAP;;WAEG,CAAL;;eACS,KAAKyY,WAAL,CAAiBzY,MAAM1E,UAAvB,EAAmC0E,MAAMzI,SAAzC,CAAP;;;cAGM,IAAIpU,KAAJ,8BAAqCmY,UAArC,CAAN;;;;0BAINyoB,mCAAYJ,YAAYE,YAAYL,gBAAgB;QAC9CuB,aAAa,KAAK3B,SAAL,CAAeS,UAAf,CAAjB;QACImB,aAAa,KAAK5B,SAAL,CAAeO,WAAWsB,UAA1B,CAAjB;;QAEIC,UAAU,KAAKrhB,SAAL,CAAe2f,cAAf,CAAd;QACI2B,UAAU,KAAKthB,SAAL,CAAe,KAAKyU,aAAL,CAAmB5nB,KAAlC,CAAd;;YAEQyV,OAAR,GAAkB4e,WAAWliB,CAAX,GAAemiB,WAAWniB,CAA5C;YACQuD,OAAR,GAAkB2e,WAAWzd,CAAX,GAAe0d,WAAW1d,CAA5C;SACKgR,aAAL,CAAmBC,GAAnB,CAAuBiD,cAAvB,GAAwCgI,cAAxC;;;0BAGFJ,+BAAUgC,QAAQ;;WAET;SACFA,OAAOC,WADL;SAEFD,OAAOE;KAFZ;;;0BAMFrT,uCAAcY,cAAc3f,QAAQklB,UAAU;2BACtCnG,aAAN,YAAoBY,YAApB,EAAkC3f,MAAlC,EAA0CklB,QAA1C;;SAEK,IAAIv1B,IAAI,CAAb,EAAgBA,IAAI,KAAKqQ,MAAL,CAAYpQ,MAAhC,EAAwCD,GAAxC,EAA6C;WACtC0iC,oBAAL,CAA0B1iC,CAA1B;;;SAGG2iC,iBAAL;;;0BAGFD,qDAAqB1iC,GAAG;QAClBgQ,QAAQ,KAAKK,MAAL,CAAYrQ,CAAZ,CAAZ;QACIgQ,MAAM0oB,iBAAN,IAA2B,IAA/B,EAAqC;UAC/BgF,IAAI1tB,MAAM0oB,iBAAd;;YAEMA,iBAAN,GAA0B,IAA1B;WACKgK,oBAAL,CAA0BhF,CAA1B;;WAEK1c,SAAL,CAAehhB,CAAf,EAAkBujB,OAAlB,IAA6B,KAAKvC,SAAL,CAAe0c,CAAf,EAAkBna,OAA/C;;;;0BAIJof,iDAAoB;SACb,IAAI3iC,IAAI,CAAb,EAAgBA,IAAI,KAAKqQ,MAAL,CAAYpQ,MAAhC,EAAwCD,GAAxC,EAA6C;UACvCgQ,QAAQ,KAAKK,MAAL,CAAYrQ,CAAZ,CAAZ;UACIgQ,MAAM2oB,cAAN,IAAwB,IAA5B,EAAkC;YAC5B+E,IAAI1tB,MAAM2oB,cAAd;;aAEK3X,SAAL,CAAehhB,CAAf,EAAkBsjB,OAAlB,IAA6B,KAAKtC,SAAL,CAAe0c,CAAf,EAAkBpa,OAA/C;aACKtC,SAAL,CAAehhB,CAAf,EAAkBujB,OAAlB,IAA6B,KAAKvC,SAAL,CAAe0c,CAAf,EAAkBna,OAA/C;;YAEI,KAAKkC,SAAL,KAAmB,KAAvB,EAA8B;eACvB,IAAIjc,IAAIk0B,CAAb,EAAgBl0B,IAAIxJ,CAApB,EAAuBwJ,GAAvB,EAA4B;iBACrBwX,SAAL,CAAehhB,CAAf,EAAkBsjB,OAAlB,IAA6B,KAAKtC,SAAL,CAAexX,CAAf,EAAkB6X,QAA/C;iBACKL,SAAL,CAAehhB,CAAf,EAAkBujB,OAAlB,IAA6B,KAAKvC,SAAL,CAAexX,CAAf,EAAkB2a,QAA/C;;;;;;;;EAhT+BuO;;ICItBkQ;0BACP9iC,IAAZ,EAAkB;;;SACXA,IAAL,GAAYA,IAAZ;SACK+iC,UAAL,GAAkB,IAAlB;SACKlT,IAAL,GAAY,IAAZ;SACKuO,aAAL,GAAqB,IAArB;SACKiB,aAAL,GAAqB,IAArB;;QAEIr/B,KAAKic,IAAT,EAAe;WACRmiB,aAAL,GAAqB,IAAIA,aAAJ,CAAkBp+B,IAAlB,EAAwBA,KAAKic,IAA7B,CAArB;;;QAGEjc,KAAKgc,IAAT,EAAe;WACRqjB,aAAL,GAAqB,IAAIA,aAAJ,CAAkBr/B,IAAlB,EAAwBA,KAAKgc,IAA7B,CAArB;;;;2BAIJgnB,uBAAMzyB,QAAQqV,UAAUN,QAAQzgB,UAAU;;;;;SAGnCk+B,UAAL,GAAkBxyB,OAAOrH,GAAP,CAAW;aAAS,IAAIsvB,SAAJ,CAAc,MAAKx4B,IAAnB,EAAyBkQ,MAAMmR,EAA/B,YAAuCnR,MAAMmT,UAA7C,EAAT;KAAX,CAAlB;;;;SAIK8a,MAAL,GAAc8E,MAAA,CAAe3d,MAAf,CAAd;SACKuK,IAAL,GAAY,IAAIrB,WAAJ,CAAgB,KAAKxuB,IAArB,EAA2BslB,MAA3B,EAAmCzgB,QAAnC,CAAZ;WACO,KAAKs5B,MAAL,CAAYtO,IAAZ,CAAiB,KAAKA,IAAtB,EAA4B,KAAKkT,UAAjC,EAA6Cnd,QAA7C,CAAP;;;2BAGFmI,iCAAWxd,QAAQ;;;QACb,KAAK6tB,aAAT,EAAwB;WACjBvO,IAAL,CAAUprB,OAAV,CAAkB,KAAK25B,aAAvB,EAAsC,KAAK2E,UAA3C;;;eAGS,KAAKA,UAAL,CAAgB75B,GAAhB,CAAoB;eAAa,OAAKlJ,IAAL,CAAUwrB,QAAV,CAAmB0X,UAAU7hB,EAA7B,EAAiC6hB,UAAU7f,UAA3C,CAAb;OAApB,CAAT;;;WAGK9S,MAAP;;;2BAGFuT,6BAASvT,QAAQ2Q,WAAW;QACtB,KAAKid,MAAL,CAAY5N,cAAZ,KAA+B,aAAnC,EAAkD;WAC3C4S,gBAAL,CAAsBjiB,SAAtB;;;QAGE,KAAKme,aAAT,EAAwB;WACjBxP,IAAL,CAAUprB,OAAV,CAAkB,KAAK46B,aAAvB,EAAsC,KAAK0D,UAA3C,EAAuD7hB,SAAvD;;;QAGE,KAAKid,MAAL,CAAY5N,cAAZ,KAA+B,YAAnC,EAAiD;WAC1C4S,gBAAL,CAAsBjiB,SAAtB;;;;QAIE,KAAK2O,IAAL,CAAUlK,SAAV,KAAwB,KAA5B,EAAmC;aAC1BiC,OAAP;gBACUA,OAAV;;;WAGK,KAAKyX,aAAL,IAAsB,KAAKA,aAAL,CAAmBzZ,QAAhD;;;2BAGFud,6CAAiBjiB,WAAW;SACrB,IAAIhhB,IAAI,CAAb,EAAgBA,IAAI,KAAK6iC,UAAL,CAAgB5iC,MAApC,EAA4CD,GAA5C,EAAiD;UAC3C,KAAK6iC,UAAL,CAAgB7iC,CAAhB,EAAmB8iB,MAAvB,EAA+B;kBACnB9iB,CAAV,EAAaqhB,QAAb,GAAwB,CAAxB;kBACUrhB,CAAV,EAAamkB,QAAb,GAAwB,CAAxB;;;;;2BAKN+e,6BAAU;SACHL,UAAL,GAAkB,IAAlB;SACKlT,IAAL,GAAY,IAAZ;SACKsO,MAAL,GAAc,IAAd;;;2BAGFjQ,qDAAqB5I,QAAQzgB,UAAU;QACjC+gB,WAAW,EAAf;;QAEI,KAAKwY,aAAT,EAAwB;WACjBA,aAAL,CAAmB/O,YAAnB,CAAgC/J,MAAhC,EAAwCzgB,QAAxC;eACSxF,IAAT,iBAAiB,aAAY,KAAK++B,aAAL,CAAmBxY,QAA/B,CAAjB;;;QAGE,KAAKyZ,aAAT,EAAwB;WACjBA,aAAL,CAAmBhQ,YAAnB,CAAgC/J,MAAhC,EAAwCzgB,QAAxC;eACSxF,IAAT,iBAAiB,aAAY,KAAKggC,aAAL,CAAmBzZ,QAA/B,CAAjB;;;WAGKA,QAAP;;;;;;ICvFiByd;wBACPrjC,IAAZ,EAAkB;;;SACXA,IAAL,GAAYA,IAAZ;SACKsjC,mBAAL,GAA2B,IAA3B;SACKC,aAAL,GAAqB,IAArB;;;;QAII,KAAKvjC,IAAL,CAAUid,IAAd,EAAoB;WACbumB,MAAL,GAAc,IAAI3V,eAAJ,CAAoB,KAAK7tB,IAAzB,CAAd;KADF,MAGO,IAAI,KAAKA,IAAL,CAAUic,IAAV,IAAkB,KAAKjc,IAAL,CAAUgc,IAAhC,EAAsC;WACtCwnB,MAAL,GAAc,IAAIV,cAAJ,CAAmB,KAAK9iC,IAAxB,CAAd;;;;yBAIJyjC,yBAAOv+B,QAAyC;QAAjC0gB,QAAiC,uEAAtB,EAAsB;QAAlBN,MAAkB;QAAVzgB,QAAU;;;QAE1C,OAAO+gB,QAAP,KAAoB,QAAxB,EAAkC;eACvBA,QAAT;iBACWN,MAAX;iBACW,EAAX;;;;QAIE,OAAOpgB,MAAP,KAAkB,QAAtB,EAAgC;;UAE1BogB,UAAU,IAAd,EAAoB;iBACTxa,SAAA,CAAiB5F,MAAjB,CAAT;;;UAGEqL,SAAS,KAAKvQ,IAAL,CAAU0jC,eAAV,CAA0Bx+B,MAA1B,CAAb;KANF,MAOO;;UAEDogB,UAAU,IAAd,EAAoB;YACdjC,aAAa,EAAjB;6BACkBne,MAAlB,6GAA0B;;;;;;;;;;;;cAAjBgL,KAAiB;;qBACb7Q,IAAX,mBAAmB6Q,MAAMmT,UAAzB;;;iBAGOvY,aAAA,CAAqBuY,UAArB,CAAT;;;UAGE9S,SAASrL,MAAb;;;;QAIEqL,OAAOpQ,MAAP,KAAkB,CAAtB,EAAyB;aAChB,IAAIykB,QAAJ,CAAarU,MAAb,EAAqB,EAArB,CAAP;;;;QAIE,KAAKizB,MAAL,IAAe,KAAKA,MAAL,CAAYR,KAA/B,EAAsC;WAC/BQ,MAAL,CAAYR,KAAZ,CAAkBzyB,MAAlB,EAA0BqV,QAA1B,EAAoCN,MAApC,EAA4CzgB,QAA5C;;;;aAIO,KAAKkpB,UAAL,CAAgBxd,MAAhB,EAAwBqV,QAAxB,EAAkCN,MAAlC,EAA0CzgB,QAA1C,CAAT;QACIqc,YAAY,KAAK4C,QAAL,CAAcvT,MAAd,EAAsBqV,QAAtB,EAAgCN,MAAhC,EAAwCzgB,QAAxC,CAAhB;;;QAGI,KAAK2+B,MAAL,IAAe,KAAKA,MAAL,CAAYJ,OAA/B,EAAwC;WACjCI,MAAL,CAAYJ,OAAZ;;;WAGK,IAAIxe,QAAJ,CAAarU,MAAb,EAAqB2Q,SAArB,CAAP;;;yBAGF6M,iCAAWxd,QAAQqV,UAAUN,QAAQzgB,UAAU;;QAEzC,KAAK2+B,MAAL,IAAe,KAAKA,MAAL,CAAYzV,UAA/B,EAA2C;eAChC,KAAKyV,MAAL,CAAYzV,UAAZ,CAAuBxd,MAAvB,EAA+BqV,QAA/B,EAAyCN,MAAzC,EAAiDzgB,QAAjD,CAAT;;;WAGK0L,MAAP;;;yBAGFuT,6BAASvT,QAAQqV,UAAUN,QAAQzgB,UAAU;;QAEvCqc,YAAY3Q,OAAOrH,GAAP,CAAW;aAAS,IAAI6b,aAAJ,CAAkB7U,MAAMqsB,YAAxB,CAAT;KAAX,CAAhB;QACIoH,aAAa,IAAjB;;;QAGI,KAAKH,MAAL,IAAe,KAAKA,MAAL,CAAY1f,QAA/B,EAAyC;mBAC1B,KAAK0f,MAAL,CAAY1f,QAAZ,CAAqBvT,MAArB,EAA6B2Q,SAA7B,EAAwC0E,QAAxC,EAAkDN,MAAlD,EAA0DzgB,QAA1D,CAAb;;;;QAIE,CAAC8+B,UAAL,EAAiB;UACX,CAAC,KAAKL,mBAAV,EAA+B;aACxBA,mBAAL,GAA2B,IAAI1gB,mBAAJ,CAAwB,KAAK5iB,IAA7B,CAA3B;;;WAGGsjC,mBAAL,CAAyBzgB,cAAzB,CAAwCtS,MAAxC,EAAgD2Q,SAAhD;;;;QAIE,CAAC,CAACyiB,UAAD,IAAe,CAACA,WAAWpnB,IAA5B,KAAqC,KAAKvc,IAAL,CAAUuc,IAAnD,EAAyD;UACnD,CAAC,KAAKgnB,aAAV,EAAyB;aAClBA,aAAL,GAAqB,IAAItiB,aAAJ,CAAkB,KAAKjhB,IAAvB,CAArB;;;WAGGujC,aAAL,CAAmB9+B,OAAnB,CAA2B8L,MAA3B,EAAmC2Q,SAAnC;;;WAGKA,SAAP;;;yBAGFgN,qDAAqB5I,QAAQzgB,UAAU;QACjC+gB,WAAW,EAAf;;QAEI,KAAK4d,MAAT,EAAiB;eACNnkC,IAAT,iBAAiB,KAAKmkC,MAAL,CAAYtV,oBAAZ,CAAiC5I,MAAjC,EAAyCzgB,QAAzC,CAAjB;;;QAGE,KAAK7E,IAAL,CAAUuc,IAAV,IAAkBqJ,SAASrgB,OAAT,CAAiB,MAAjB,MAA6B,CAAC,CAApD,EAAuD;eAC5ClG,IAAT,CAAc,MAAd;;;WAGKumB,QAAP;;;yBAGFuI,2CAAgB9d,KAAK;QACfjP,SAAS,UAAb;;QAEIiiB,aAAa,KAAKrjB,IAAL,CAAUuuB,cAAV,CAAyB1N,kBAAzB,CAA4CxQ,GAA5C,CAAjB;0BACsBgT,UAAtB,oHAAkC;;;;;;;;;;;;UAAzBiB,SAAyB;;aACzBoE,GAAP,CAAW,sBAAqBpE,SAArB,CAAX;;;QAGE,KAAKkf,MAAL,IAAe,KAAKA,MAAL,CAAYrV,eAA/B,EAAgD;4BAC3B,KAAKqV,MAAL,CAAYrV,eAAZ,CAA4B9d,GAA5B,CAAnB,oHAAqD;;;;;;;;;;;;YAA5CnL,MAA4C;;eAC5CwjB,GAAP,CAAWxjB,MAAX;;;;WAIG,YAAW9D,MAAX,CAAP;;;;;;AC/IJ,IAAMwiC,eAAe;UACX,GADW;UAEX,GAFW;oBAGD,GAHC;iBAIJ,GAJI;aAKR;CALb;;;;;;;;;IAcqBC;kBACL;;;SACPC,QAAL,GAAgB,EAAhB;SACKC,KAAL,GAAa,IAAb;SACKC,KAAL,GAAa,IAAb;;;;;;;;;;iBAQFC,mCAAa;QACPC,OAAO,KAAKJ,QAAL,CAAc56B,GAAd,CAAkB;wBAAc6X,EAAEojB,OAAhB,SAA2BpjB,EAAE7f,IAAF,CAAOkjC,IAAP,CAAY,IAAZ,CAA3B;KAAlB,CAAX;WACO,IAAIC,QAAJ,CAAa,KAAb,EAAoBH,KAAKE,IAAL,CAAU,IAAV,CAApB,CAAP;;;;;;;;;iBAOFE,yBAAQ;QACFJ,OAAO,KAAKJ,QAAL,CAAc56B,GAAd,CAAkB,aAAK;UAC5BhI,OAAO6f,EAAE7f,IAAF,CAAOgI,GAAP,CAAW;eAAOxG,KAAK6hC,KAAL,CAAWxV,MAAM,GAAjB,IAAwB,GAA/B;OAAX,CAAX;kBACU6U,aAAa7iB,EAAEojB,OAAf,CAAV,GAAoCjjC,KAAKkjC,IAAL,CAAU,GAAV,CAApC;KAFS,CAAX;;WAKOF,KAAKE,IAAL,CAAU,EAAV,CAAP;;;;;;;;;;;;;;;;;iBAwIFI,+BAAUxjC,IAAI;QACRyjC,OAAO,IAAIZ,IAAJ,EAAX;;yBAEc,KAAKC,QAAnB,6GAA6B;;;;;;;;;;;;UAApB/iB,CAAoB;;UACvB7f,OAAO,EAAX;WACK,IAAIhB,MAAI,CAAb,EAAgBA,MAAI6gB,EAAE7f,IAAF,CAAOf,MAA3B,EAAmCD,OAAK,CAAxC,EAA2C;kBAC5Bc,GAAG+f,EAAE7f,IAAF,CAAOhB,GAAP,CAAH,EAAc6gB,EAAE7f,IAAF,CAAOhB,MAAI,CAAX,CAAd,CAD4B;YACpCggB,CADoC;YACjCyE,CADiC;;aAEpCtlB,IAAL,CAAU6gB,CAAV,EAAayE,CAAb;;;WAGG5D,EAAEojB,OAAP,cAAmBjjC,IAAnB;;;WAGKujC,IAAP;;;;;;;;iBAMFC,+BAAUC,IAAIC,IAAIC,IAAIC,IAAIC,IAAIC,IAAI;WACzB,KAAKR,SAAL,CAAe,UAACtkB,CAAD,EAAIyE,CAAJ,EAAU;UAC1BggB,KAAKzkB,CAAL,GAAS2kB,KAAKlgB,CAAd,GAAkBogB,EAAtB;UACIH,KAAK1kB,CAAL,GAAS4kB,KAAKngB,CAAd,GAAkBqgB,EAAtB;aACO,CAAC9kB,CAAD,EAAIyE,CAAJ,CAAP;KAHK,CAAP;;;;;;;;iBAUFsgB,+BAAU/kB,GAAGyE,GAAG;WACP,KAAK+f,SAAL,CAAe,CAAf,EAAkB,CAAlB,EAAqB,CAArB,EAAwB,CAAxB,EAA2BxkB,CAA3B,EAA8ByE,CAA9B,CAAP;;;;;;;;iBAMFugB,yBAAOC,OAAO;QACRC,MAAM1iC,KAAK0iC,GAAL,CAASD,KAAT,CAAV;QACIE,MAAM3iC,KAAK2iC,GAAL,CAASF,KAAT,CAAV;WACO,KAAKT,SAAL,CAAeU,GAAf,EAAoBC,GAApB,EAAyB,CAACA,GAA1B,EAA+BD,GAA/B,EAAoC,CAApC,EAAuC,CAAvC,CAAP;;;;;;;;iBAMFE,uBAAMC,QAAyB;QAAjBC,MAAiB,uEAARD,MAAQ;;WACtB,KAAKb,SAAL,CAAea,MAAf,EAAuB,CAAvB,EAA0B,CAA1B,EAA6BC,MAA7B,EAAqC,CAArC,EAAwC,CAAxC,CAAP;;;;;wBA7KS;UACL,CAAC,KAAKxB,KAAV,EAAiB;YACX7gB,OAAO,IAAIqB,IAAJ,EAAX;8BACoB,KAAKsf,QAAzB,oHAAmC;;;;;;;;;;;;cAA1BK,OAA0B;;eAC5B,IAAIjkC,MAAI,CAAb,EAAgBA,MAAIikC,QAAQjjC,IAAR,CAAaf,MAAjC,EAAyCD,OAAK,CAA9C,EAAiD;iBAC1CwkB,QAAL,CAAcyf,QAAQjjC,IAAR,CAAahB,GAAb,CAAd,EAA+BikC,QAAQjjC,IAAR,CAAahB,MAAI,CAAjB,CAA/B;;;;aAIC8jC,KAAL,GAAa,eAAc7gB,IAAd,CAAb;;;aAGK,KAAK6gB,KAAZ;;;;;;;;;;;wBAQS;UACL,KAAKD,KAAT,EAAgB;eACP,KAAKA,KAAZ;;;UAGElf,OAAO,IAAIL,IAAJ,EAAX;UACIihB,KAAK,CAAT;UAAYC,KAAK,CAAjB;;UAEInf,IAAI,SAAJA,CAAI;eACN7jB,KAAKijC,GAAL,CAAS,IAAI/iC,CAAb,EAAgB,CAAhB,IAAqBgjC,GAAG1lC,CAAH,CAArB,GACI,IAAIwC,KAAKijC,GAAL,CAAS,IAAI/iC,CAAb,EAAgB,CAAhB,CAAJ,GAAyBA,CAAzB,GAA6BijC,GAAG3lC,CAAH,CADjC,GAEI,KAAK,IAAI0C,CAAT,IAAcF,KAAKijC,GAAL,CAAS/iC,CAAT,EAAY,CAAZ,CAAd,GAA+BkjC,GAAG5lC,CAAH,CAFnC,GAGIwC,KAAKijC,GAAL,CAAS/iC,CAAT,EAAY,CAAZ,IAAiBmjC,GAAG7lC,CAAH,CAJf;OAAR;;4BAOc,KAAK4jC,QAAnB,oHAA6B;;;;;;;;;;;;YAApB/iB,CAAoB;;gBACnBA,EAAEojB,OAAV;eACO,QAAL;eACK,QAAL;0BACepjB,EAAE7f,IADjB;gBACOgf,CADP;gBACUyE,CADV;;iBAEOD,QAAL,CAAcxE,CAAd,EAAiByE,CAAjB;iBACKzE,CAAL;iBACKyE,CAAL;;;eAGG,kBAAL;eACK,eAAL;gBACM5D,EAAEojB,OAAF,KAAc,kBAAlB,EAAsC;;6BAEPpjB,EAAE7f,IAFK;kBAE/B8kC,IAF+B;kBAEzBC,IAFyB;kBAEnBC,GAFmB;kBAEdC,GAFc;;kBAGhCC,OAAOX,KAAK,IAAI,CAAJ,IAASO,OAAOP,EAAhB,CAAhB,CAHoC;kBAIhCY,OAAOX,KAAK,IAAI,CAAJ,IAASO,OAAOP,EAAhB,CAAhB;kBACIY,OAAOJ,MAAM,IAAI,CAAJ,IAASF,OAAOE,GAAhB,CAAjB,CALoC;kBAMhCK,OAAOJ,MAAM,IAAI,CAAJ,IAASF,OAAOE,GAAhB,CAAjB;aANF,MAOO;6BACoCplB,EAAE7f,IADtC;kBACAklC,IADA;kBACMC,IADN;kBACYC,IADZ;kBACkBC,IADlB;kBACwBL,GADxB;kBAC6BC,GAD7B;;;;iBAKFzhB,QAAL,CAAcwhB,GAAd,EAAmBC,GAAnB;;gBAEIP,KAAK,CAACH,EAAD,EAAKC,EAAL,CAAT;gBACIG,KAAK,CAACO,IAAD,EAAOC,IAAP,CAAT;gBACIP,KAAK,CAACQ,IAAD,EAAOC,IAAP,CAAT;gBACIR,KAAK,CAACG,GAAD,EAAMC,GAAN,CAAT;;iBAEK,IAAIjmC,IAAI,CAAb,EAAgBA,KAAK,CAArB,EAAwBA,GAAxB,EAA6B;kBACvB+H,IAAI,IAAI29B,GAAG1lC,CAAH,CAAJ,GAAY,KAAK2lC,GAAG3lC,CAAH,CAAjB,GAAyB,IAAI4lC,GAAG5lC,CAAH,CAArC;kBACIs0B,IAAI,CAAC,CAAD,GAAKoR,GAAG1lC,CAAH,CAAL,GAAa,IAAI2lC,GAAG3lC,CAAH,CAAjB,GAAyB,IAAI4lC,GAAG5lC,CAAH,CAA7B,GAAqC,IAAI6lC,GAAG7lC,CAAH,CAAjD;kBACI,IAAI2lC,GAAG3lC,CAAH,CAAJ,GAAY,IAAI0lC,GAAG1lC,CAAH,CAApB;;kBAEIs0B,MAAM,CAAV,EAAa;oBACPvsB,MAAM,CAAV,EAAa;;;;oBAITrF,IAAI,CAACme,CAAD,GAAK9Y,CAAb;oBACI,IAAIrF,CAAJ,IAASA,IAAI,CAAjB,EAAoB;sBACd1C,MAAM,CAAV,EAAa;yBACNwkB,QAAL,CAAc6B,EAAE3jB,CAAF,CAAd,EAAoBiiB,KAAKV,IAAzB;mBADF,MAEO,IAAIjkB,MAAM,CAAV,EAAa;yBACbwkB,QAAL,CAAcG,KAAKZ,IAAnB,EAAyBsC,EAAE3jB,CAAF,CAAzB;;;;;;;kBAOF4jC,OAAO9jC,KAAKijC,GAAL,CAAS19B,CAAT,EAAY,CAAZ,IAAiB,IAAI8Y,CAAJ,GAAQyT,CAApC;kBACIgS,OAAO,CAAX,EAAc;;;;kBAIVC,KAAK,CAAC,CAACx+B,CAAD,GAAKvF,KAAKgkC,IAAL,CAAUF,IAAV,CAAN,KAA0B,IAAIhS,CAA9B,CAAT;kBACI,IAAIiS,EAAJ,IAAUA,KAAK,CAAnB,EAAsB;oBAChBvmC,MAAM,CAAV,EAAa;uBACNwkB,QAAL,CAAc6B,EAAEkgB,EAAF,CAAd,EAAqB5hB,KAAKV,IAA1B;iBADF,MAEO,IAAIjkB,MAAM,CAAV,EAAa;uBACbwkB,QAAL,CAAcG,KAAKZ,IAAnB,EAAyBsC,EAAEkgB,EAAF,CAAzB;;;;kBAIAE,KAAK,CAAC,CAAC1+B,CAAD,GAAKvF,KAAKgkC,IAAL,CAAUF,IAAV,CAAN,KAA0B,IAAIhS,CAA9B,CAAT;kBACI,IAAImS,EAAJ,IAAUA,KAAK,CAAnB,EAAsB;oBAChBzmC,MAAM,CAAV,EAAa;uBACNwkB,QAAL,CAAc6B,EAAEogB,EAAF,CAAd,EAAqB9hB,KAAKV,IAA1B;iBADF,MAEO,IAAIjkB,MAAM,CAAV,EAAa;uBACbwkB,QAAL,CAAcG,KAAKZ,IAAnB,EAAyBsC,EAAEogB,EAAF,CAAzB;;;;;iBAKDT,GAAL;iBACKC,GAAL;;;;;aAKC,KAAKpC,KAAL,GAAa,eAAclf,IAAd,CAApB;;;;;;;WA2DgB,CAAC,QAAD,EAAW,QAAX,EAAqB,kBAArB,EAAyC,eAAzC,EAA0D,WAA1D;;;MAAXsf,mBAAJ;OACEjL,SAAL,CAAeiL,OAAf,IAA0B,YAAkB;sCAANjjC,IAAM;UAAA;;;SACrC6iC,KAAL,GAAa,KAAKC,KAAL,GAAa,IAA1B;SACKF,QAAL,CAAczkC,IAAd,CAAmB;sBAAA;;KAAnB;;WAKO,IAAP;GAPF;;;AADF,4CAA4F;;;;ACtO5F,oBAAe,CACb,SADa,EACF,OADE,EACO,kBADP,EAC2B,OAD3B,EACoC,QADpC,EAC8C,UAD9C,EAC0D,YAD1D,EACwE,QADxE,EACkF,SADlF,EAEb,WAFa,EAEA,aAFA,EAEe,WAFf,EAE4B,YAF5B,EAE0C,UAF1C,EAEsD,MAFtD,EAE8D,OAF9D,EAEuE,QAFvE,EAEiF,QAFjF,EAE2F,OAF3F,EAGb,MAHa,EAGL,KAHK,EAGE,KAHF,EAGS,OAHT,EAGkB,MAHlB,EAG0B,MAH1B,EAGkC,KAHlC,EAGyC,OAHzC,EAGkD,OAHlD,EAG2D,MAH3D,EAGmE,OAHnE,EAG4E,WAH5E,EAGyF,MAHzF,EAIb,OAJa,EAIJ,SAJI,EAIO,UAJP,EAImB,IAJnB,EAIyB,GAJzB,EAI8B,GAJ9B,EAImC,GAJnC,EAIwC,GAJxC,EAI6C,GAJ7C,EAIkD,GAJlD,EAIuD,GAJvD,EAI4D,GAJ5D,EAIiE,GAJjE,EAIsE,GAJtE,EAI2E,GAJ3E,EAIgF,GAJhF,EAIqF,GAJrF,EAI0F,GAJ1F,EAI+F,GAJ/F,EAKb,GALa,EAKR,GALQ,EAKH,GALG,EAKE,GALF,EAKO,GALP,EAKY,GALZ,EAKiB,GALjB,EAKsB,GALtB,EAK2B,GAL3B,EAKgC,GALhC,EAKqC,GALrC,EAK0C,aAL1C,EAKyD,WALzD,EAKsE,cALtE,EAMb,aANa,EAME,YANF,EAMgB,OANhB,EAMyB,GANzB,EAM8B,GAN9B,EAMmC,GANnC,EAMwC,GANxC,EAM6C,GAN7C,EAMkD,GANlD,EAMuD,GANvD,EAM4D,GAN5D,EAMiE,GANjE,EAMsE,GANtE,EAM2E,GAN3E,EAMgF,GANhF,EAMqF,GANrF,EAM0F,GAN1F,EAM+F,GAN/F,EAOb,GAPa,EAOR,GAPQ,EAOH,GAPG,EAOE,GAPF,EAOO,GAPP,EAOY,GAPZ,EAOiB,GAPjB,EAOsB,GAPtB,EAO2B,GAP3B,EAOgC,GAPhC,EAOqC,GAPrC,EAO0C,WAP1C,EAOuD,KAPvD,EAO8D,YAP9D,EAO4E,YAP5E,EAQb,WARa,EAQA,OARA,EAQS,UART,EAQqB,QARrB,EAQ+B,QAR/B,EAQyC,WARzC,EAQsD,WARtD,EAQmE,QARnE,EAQ6E,QAR7E,EASb,aATa,EASE,WATF,EASe,QATf,EASyB,OATzB,EASkC,UATlC,EAS8C,QAT9C,EASwD,QATxD,EASkE,aATlE,EASiF,WATjF,EAUb,QAVa,EAUH,QAVG,EAUO,aAVP,EAUsB,WAVtB,EAUmC,QAVnC,EAU6C,QAV7C,EAUuD,QAVvD,EAUiE,aAVjE,EAUgF,WAVhF,EAWb,QAXa,EAWH,QAXG,EAWO,QAXP,EAWiB,aAXjB,EAWgC,WAXhC,EAW6C,QAX7C,EAWuD,QAXvD,EAWiE,MAXjE,EAWyE,UAXzE,EAWqF,SAXrF,EAYb,QAZa,EAYH,WAZG,EAYU,YAZV,EAYwB,YAZxB,EAYsC,WAZtC,EAYmD,WAZnD,EAYgE,OAZhE,EAYyE,UAZzE,EAYqF,UAZrF,EAab,IAba,EAaP,QAbO,EAaG,UAbH,EAae,WAbf,EAa4B,WAb5B,EAayC,cAbzC,EAayD,KAbzD,EAagE,IAbhE,EAasE,aAbtE,EAaqF,WAbrF,EAcb,SAda,EAcF,IAdE,EAcI,UAdJ,EAcgB,aAdhB,EAc+B,cAd/B,EAc+C,OAd/C,EAcwD,IAdxD,EAc8D,QAd9D,EAcwE,cAdxE,EAeb,YAfa,EAeC,YAfD,EAee,SAff,EAe0B,QAf1B,EAeoC,aAfpC,EAemD,OAfnD,EAe4D,eAf5D,EAe6E,gBAf7E,EAgBb,UAhBa,EAgBD,kBAhBC,EAgBmB,QAhBnB,EAgB6B,QAhB7B,EAgBuC,QAhBvC,EAgBiD,IAhBjD,EAgBuD,IAhBvD,EAgB6D,QAhB7D,EAgBuE,QAhBvE,EAgBiF,cAhBjF,EAiBb,eAjBa,EAiBI,WAjBJ,EAiBiB,YAjBjB,EAiB+B,QAjB/B,EAiByC,SAjBzC,EAiBoD,WAjBpD,EAiBiE,WAjBjE,EAiB8E,UAjB9E,EAkBb,UAlBa,EAkBD,eAlBC,EAkBgB,gBAlBhB,EAkBkC,IAlBlC,EAkBwC,IAlBxC,EAkB8C,WAlB9C,EAkB2D,gBAlB3D,EAkB6E,gBAlB7E,EAmBb,cAnBa,EAmBG,aAnBH,EAmBkB,aAnBlB,EAmBiC,aAnBjC,EAmBgD,QAnBhD,EAmB0D,WAnB1D,EAmBuE,QAnBvE,EAmBiF,QAnBjF,EAoBb,aApBa,EAoBE,WApBF,EAoBe,QApBf,EAoByB,QApBzB,EAoBmC,aApBnC,EAoBkD,OApBlD,EAoB2D,QApB3D,EAoBqE,QApBrE,EAoB+E,aApB/E,EAqBb,QArBa,EAqBH,UArBG,EAqBS,YArBT,EAqBuB,OArBvB,EAqBgC,QArBhC,EAqB0C,OArB1C,EAqBmD,WArBnD,EAqBgE,MArBhE,EAqBwE,SArBxE,EAqBmF,cArBnF,EAsBb,QAtBa,EAsBH,OAtBG,EAsBM,QAtBN,EAsBgB,QAtBhB,EAsB0B,QAtB1B,EAsBoC,QAtBpC,EAsB8C,QAtB9C,EAsBwD,QAtBxD,EAsBkE,WAtBlE,EAsB+E,KAtB/E,EAsBsF,KAtBtF,EAuBb,QAvBa,EAuBH,QAvBG,EAuBO,OAvBP,EAuBgB,OAvBhB,EAuByB,OAvBzB,EAuBkC,UAvBlC,EAuB8C,aAvB9C,EAuB6D,aAvB7D,EAuB4E,eAvB5E,EAwBb,SAxBa,EAwBF,YAxBE,EAwBY,eAxBZ,EAwB6B,OAxB7B,EAwBsC,QAxBtC,EAwBgD,QAxBhD,EAwB0D,YAxB1D,EAwBwE,UAxBxE,EAwBoF,UAxBpF,EAyBb,QAzBa,EAyBH,QAzBG,EAyBO,QAzBP,EAyBiB,QAzBjB,EAyB2B,QAzB3B,CAAf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAA,AACA,AACA,AACA,AAEA;;;;;;;;IAQqBunC;iBACPvlB,EAAZ,EAAgBgC,UAAhB,EAA4BrjB,IAA5B,EAAkC;;;;;;;SAK3BqhB,EAAL,GAAUA,EAAV;;;;;;;;SAQKgC,UAAL,GAAkBA,UAAlB;SACKoV,KAAL,GAAaz4B,IAAb;;;SAGKgjB,MAAL,GAAc,KAAKK,UAAL,CAAgBgS,KAAhB,CAAsB9Q,QAAQvB,MAA9B,CAAd;SACKqP,UAAL,GAAkB,KAAKhP,UAAL,CAAgBljB,MAAhB,GAAyB,CAA3C;;;kBAGF0mC,+BAAW;WACF,IAAIhD,IAAJ,EAAP;;;kBAGFiD,+BAAW;WACF,KAAKrC,IAAL,CAAUthB,IAAjB;;;kBAGF4jB,+BAAW;WACF,KAAKtC,IAAL,CAAU5f,IAAjB;;;kBAGFmiB,6CAAiB3pB,OAAO;QAClB,KAAKgE,EAAL,GAAUhE,MAAM4pB,OAAN,CAAc9mC,MAA5B,EAAoC;aAC3Bkd,MAAM4pB,OAAN,CAAcpmC,GAAd,CAAkB,KAAKwgB,EAAvB,CAAP;;;QAGE6lB,SAAS7pB,MAAM4pB,OAAN,CAAcpmC,GAAd,CAAkBwc,MAAM4pB,OAAN,CAAc9mC,MAAd,GAAuB,CAAzC,CAAb;QACIoO,MAAM;eACC24B,SAASA,OAAOC,OAAhB,GAA0B,CAD3B;eAEC9pB,MAAM+pB,QAAN,CAAevmC,GAAf,CAAmB,KAAKwgB,EAAL,GAAUhE,MAAM4pB,OAAN,CAAc9mC,MAA3C,KAAsD;KAFjE;;WAKOoO,GAAP;;;kBAGF84B,mCAAYlkB,MAAM;QACZ,KAAKmkB,QAAT,EAAmB;aAAS,KAAKA,QAAZ;;;4BAE6B,KAAKN,gBAAL,CAAsB,KAAKvO,KAAL,CAAWvd,IAAjC,CAHlC;QAGHqhB,YAHG,qBAGX4K,OAHW;QAGmBI,WAHnB,qBAGWC,OAHX;;;;;QAMZ,KAAK/O,KAAL,CAAW9b,IAAf,EAAqB;8BAC+B,KAAKqqB,gBAAL,CAAsB,KAAKvO,KAAL,CAAW9b,IAAjC,CAD/B;UACN8qB,aADM,qBACdN,OADc;UACiBO,UADjB,qBACSF,OADT;KAArB,MAGO;UACDG,YAAJ;UACI,OAAOxkB,IAAP,KAAgB,WAAhB,IAA+BA,SAAS,IAA5C,EAAkD;YAAA,GAAc,IAAd,CAAKA,IAAL;;;UAE9C,CAACwkB,MAAM,KAAKlP,KAAL,CAAW,MAAX,CAAP,KAA8BkP,IAAItiC,OAAJ,GAAc,CAAhD,EAAmD;YAC7CoiC,gBAAgB/kC,KAAKgwB,GAAL,CAASiV,IAAIC,YAAJ,GAAmBD,IAAIE,aAAhC,CAApB;YACIH,aAAaC,IAAIC,YAAJ,GAAmBzkB,KAAKgB,IAAzC;OAFF,MAIO;YACC5gB,IADD,GACU,KAAKk1B,KADf,CACCl1B,IADD;;YAEDkkC,gBAAgB/kC,KAAKgwB,GAAL,CAASnvB,KAAKukC,MAAL,GAAcvkC,KAAKwkC,OAA5B,CAApB;YACIL,aAAankC,KAAKukC,MAAL,GAAc3kB,KAAKgB,IAApC;;;;QAIA,KAAKsU,KAAL,CAAWxF,mBAAX,IAAkC,KAAKwF,KAAL,CAAWtc,IAAjD,EAAuD;sBACrC,KAAKsc,KAAL,CAAWxF,mBAAX,CAA+B+U,oBAA/B,CAAoD,KAAK3mB,EAAzD,EAA6D,KAAKoX,KAAL,CAAWtc,IAAxE,CAAhB;;;WAGK,KAAKmrB,QAAL,GAAgB,EAAE/K,0BAAF,EAAgBkL,4BAAhB,EAA+BF,wBAA/B,EAA4CG,sBAA5C,EAAvB;;;;;;;;;;;;;;;;;;;;;kBA6CFO,uCAAcpiC,MAAM;QACdy/B,QAAQ,IAAI,KAAK7M,KAAL,CAAW9U,UAAf,GAA4B9d,IAAxC;WACO,KAAK4+B,IAAL,CAAUa,KAAV,CAAgBA,KAAhB,CAAP;;;;;;;;;kBAuBF4C,+BAAW;QACH/sB,IADG,GACM,KAAKsd,KADX,CACHtd,IADG;;QAEL,CAACA,IAAL,EAAW;aACF,IAAP;;;YAGMA,KAAK9V,OAAb;WACO,CAAL;eACS8iC,cAAc,KAAK9mB,EAAnB,CAAP;;WAEG,CAAL;YACMA,KAAKlG,KAAKitB,cAAL,CAAoB,KAAK/mB,EAAzB,CAAT;YACIA,KAAK8mB,cAAchoC,MAAvB,EAA+B;iBACtBgoC,cAAc9mB,EAAd,CAAP;;;eAGKlG,KAAKktB,KAAL,CAAWhnB,KAAK8mB,cAAchoC,MAA9B,CAAP;;WAEG,GAAL;eACSgoC,cAAc,KAAK9mB,EAAL,GAAUlG,KAAKjV,OAAL,CAAa,KAAKmb,EAAlB,CAAxB,CAAP;;WAEG,CAAL;eACSld,OAAOmkC,YAAP,CAAoBntB,KAAKjS,GAAL,CAAS,KAAKmY,EAAd,CAApB,CAAP;;;;;;;;;;;;;;;kBAkBNknB,yBAAOliC,KAAKR,MAAM;QACZ2iC,IAAJ;;QAEIlD,QAAQ,IAAI,KAAK7M,KAAL,CAAWxd,IAAX,CAAgB0I,UAApB,GAAiC9d,IAA7C;QACIy/B,KAAJ,CAAUA,KAAV,EAAiBA,KAAjB;;QAEItkC,KAAK,KAAKyjC,IAAL,CAAUR,UAAV,EAAT;OACG59B,GAAH;QACIoiC,IAAJ;;QAEIC,OAAJ;;;;;wBAzGS;aACF,KAAK5B,QAAL,EAAP;;;;;;;;;;;wBASS;aACF,KAAKC,QAAL,EAAP;;;;;;;;;;wBAQS;;;aAGF,KAAKF,QAAL,EAAP;;;;wBAkBiB;aACV,KAAKQ,WAAL,GAAmB9K,YAA1B;;;;;;;;;;wBAQkB;aACX,KAAK8K,WAAL,GAAmBI,aAA1B;;;;wBAG2B;;;wBAiClB;aACF,KAAKS,QAAL,EAAP;;;;;+DAxFDznC,oJAUAA,oJASAA,4JAqBAA,qKASAA,6JAqCAA;;ACxLH;AACA,IAAIkoC,aAAa,IAAItoC,EAAEmB,MAAN,CAAa;oBACVnB,EAAEqB,KADQ;QAEVrB,EAAEqB,KAFQ;QAGVrB,EAAEqB,KAHQ;QAIVrB,EAAEqB,KAJQ;QAKVrB,EAAEqB;CALL,CAAjB;;;AASA,IAAMknC,WAAkB,KAAK,CAA7B;AACA,IAAMC,iBAAkB,KAAK,CAA7B;AACA,IAAMC,iBAAkB,KAAK,CAA7B;AACA,IAAMC,SAAkB,KAAK,CAA7B;AACA,IAAMC,SAAkB,KAAK,CAA7B;AACA,IAAMC,SAAkB,KAAK,CAA7B;;;AAGA,IAAMC,wBAA4B,KAAK,CAAvC;AACA,AACA,AACA,IAAMC,kBAA4B,KAAK,CAAvC;AACA,IAAMC,kBAA4B,KAAK,CAAvC;AACA,IAAMC,2BAA4B,KAAK,CAAvC;AACA,IAAMC,uBAA4B,KAAK,CAAvC;AACA,IAAMC,uBAA4B,KAAK,CAAvC;AACA,AACA,AACA,AACA,AAEA;AACA,IAAaC,KAAb;iBACcC,OAAZ,EAAqBC,UAArB,EAA+C;QAAdxpB,CAAc,uEAAV,CAAU;QAAPyE,CAAO,uEAAH,CAAG;;;;SACxC8kB,OAAL,GAAeA,OAAf;SACKC,UAAL,GAAkBA,UAAlB;SACKxpB,CAAL,GAASA,CAAT;SACKyE,CAAL,GAASA,CAAT;;;kBAGFvB,IARF,mBAQS;WACE,IAAIomB,KAAJ,CAAU,KAAKC,OAAf,EAAwB,KAAKC,UAA7B,EAAyC,KAAKxpB,CAA9C,EAAiD,KAAKyE,CAAtD,CAAP;GATJ;;;;;;;IAcMglB,YACJ,mBAAY7pB,OAAZ,EAAqB8pB,EAArB,EAAyBC,EAAzB,EAA6B;;;OACtB/pB,OAAL,GAAeA,OAAf;OACK8pB,EAAL,GAAUA,EAAV;OACKC,EAAL,GAAUA,EAAV;OACKhjC,GAAL,GAAW,CAAX;OACK0+B,MAAL,GAAc,KAAKC,MAAL,GAAc,CAA5B;OACKsE,OAAL,GAAe,KAAKC,OAAL,GAAe,CAA9B;;;;;;;;IAOiBC;;;;;;;;;;qBAEnBlD,6BAASmD,UAAU;;;QAGb,KAAKxR,KAAL,CAAWxF,mBAAX,IAAkC,CAACgX,QAAvC,EAAiD;aACxC,KAAKxF,IAAL,CAAUthB,IAAjB;;;QAGEze,SAAS,KAAK+zB,KAAL,CAAWyR,eAAX,CAA2B,MAA3B,CAAb;WACOrjC,GAAP,IAAc,KAAK4xB,KAAL,CAAWxyB,IAAX,CAAgBC,OAAhB,CAAwB,KAAKmb,EAA7B,CAAd;QACInR,QAAQy4B,WAAWpiC,MAAX,CAAkB7B,MAAlB,CAAZ;;QAEIye,OAAO,IAAIqB,IAAJ,CAAStU,MAAMi6B,IAAf,EAAqBj6B,MAAMk6B,IAA3B,EAAiCl6B,MAAMm6B,IAAvC,EAA6Cn6B,MAAMo6B,IAAnD,CAAX;WACO,eAAcnnB,IAAd,CAAP;;;;;;qBAIFonB,6CAAiB7lC,QAAQ6sB,MAAMiZ,OAAOC,MAAM;QACtCD,KAAJ,EAAW;UACLllC,MAAMZ,OAAOiC,SAAP,EAAV;UACI,CAAC8jC,IAAL,EAAW;cACH,CAACnlC,GAAP;;;aAGKisB,IAAP;KANF,MAOO;UACDkZ,IAAJ,EAAU;YACJnlC,MAAMisB,IAAV;OADF,MAEO;YACDjsB,MAAMisB,OAAO7sB,OAAOoD,WAAP,EAAjB;;;;WAIGxC,GAAP;;;;;;;qBAKFolC,6BAAU;QACJC,UAAU,KAAKlS,KAAL,CAAWxyB,IAAX,CAAgBC,OAAhB,CAAwB,KAAKmb,EAA7B,CAAd;QACIupB,UAAU,KAAKnS,KAAL,CAAWxyB,IAAX,CAAgBC,OAAhB,CAAwB,KAAKmb,EAAL,GAAU,CAAlC,CAAd;;;QAGIspB,YAAYC,OAAhB,EAAyB;aAAS,IAAP;;;QAEvBlmC,SAAS,KAAK+zB,KAAL,CAAWyR,eAAX,CAA2B,MAA3B,CAAb;WACOrjC,GAAP,IAAc8jC,OAAd;QACI5jC,WAAWrC,OAAOmC,GAAtB;;QAEIqJ,QAAQy4B,WAAWpiC,MAAX,CAAkB7B,MAAlB,CAAZ;;QAEIwL,MAAM26B,gBAAN,GAAyB,CAA7B,EAAgC;WACzBC,aAAL,CAAmB56B,KAAnB,EAA0BxL,MAA1B;KADF,MAGO,IAAIwL,MAAM26B,gBAAN,GAAyB,CAA7B,EAAgC;WAChCE,gBAAL,CAAsB76B,KAAtB,EAA6BxL,MAA7B,EAAqCqC,QAArC;;;WAGKmJ,KAAP;;;qBAGF46B,uCAAc56B,OAAOxL,QAAQ;;UAErBsmC,MAAN,GAAe,EAAf;;QAEIC,mBAAmB,IAAI5qC,EAAE6B,KAAN,CAAY7B,EAAEoB,MAAd,EAAsByO,MAAM26B,gBAA5B,EAA8CtkC,MAA9C,CAAqD7B,MAArD,CAAvB;UACMwmC,YAAN,GAAqB,IAAI7qC,EAAE6B,KAAN,CAAY7B,EAAE0B,KAAd,EAAqB1B,EAAEoB,MAAvB,EAA+B8E,MAA/B,CAAsC7B,MAAtC,CAArB;;QAEIkV,QAAQ,EAAZ;QACIuxB,YAAYF,iBAAiBA,iBAAiB9qC,MAAjB,GAA0B,CAA3C,IAAgD,CAAhE;;WAEOyZ,MAAMzZ,MAAN,GAAegrC,SAAtB,EAAiC;UAC3BC,OAAO1mC,OAAOiC,SAAP,EAAX;YACMtH,IAAN,CAAW+rC,IAAX;;;UAGIA,OAAOrC,MAAX,EAAmB;YACbpjC,QAAQjB,OAAOiC,SAAP,EAAZ;aACK,IAAIi3B,IAAI,CAAb,EAAgBA,IAAIj4B,KAApB,EAA2Bi4B,GAA3B,EAAgC;gBACxBv+B,IAAN,CAAW+rC,IAAX;;;;;SAKD,IAAIlrC,IAAI,CAAb,EAAgBA,IAAI0Z,MAAMzZ,MAA1B,EAAkCD,GAAlC,EAAuC;UACjCkrC,OAAOxxB,MAAM1Z,CAAN,CAAX;UACImrC,QAAQ,IAAI7B,KAAJ,CAAU,CAAC,EAAE4B,OAAOxC,QAAT,CAAX,EAA+BqC,iBAAiB1lC,OAAjB,CAAyBrF,CAAzB,KAA+B,CAA9D,EAAiE,CAAjE,EAAoE,CAApE,CAAZ;YACM8qC,MAAN,CAAa3rC,IAAb,CAAkBgsC,KAAlB;;;QAGEC,KAAK,CAAT;SACK,IAAIprC,IAAI,CAAb,EAAgBA,IAAI0Z,MAAMzZ,MAA1B,EAAkCD,GAAlC,EAAuC;UACjCkrC,OAAOxxB,MAAM1Z,CAAN,CAAX;YACM8qC,MAAN,CAAa9qC,CAAb,EAAgBggB,CAAhB,GAAoBorB,KAAK,KAAKf,gBAAL,CAAsB7lC,MAAtB,EAA8B4mC,EAA9B,EAAkCF,OAAOvC,cAAzC,EAAyDuC,OAAOpC,MAAhE,CAAzB;;;QAGEuC,KAAK,CAAT;SACK,IAAIrrC,IAAI,CAAb,EAAgBA,IAAI0Z,MAAMzZ,MAA1B,EAAkCD,GAAlC,EAAuC;UACjCkrC,OAAOxxB,MAAM1Z,CAAN,CAAX;YACM8qC,MAAN,CAAa9qC,CAAb,EAAgBykB,CAAhB,GAAoB4mB,KAAK,KAAKhB,gBAAL,CAAsB7lC,MAAtB,EAA8B6mC,EAA9B,EAAkCH,OAAOtC,cAAzC,EAAyDsC,OAAOnC,MAAhE,CAAzB;;;QAGE,KAAKxQ,KAAL,CAAWxF,mBAAf,EAAoC;UAC9B+X,SAAS96B,MAAM86B,MAAN,CAAahlB,KAAb,EAAb;aACO3mB,IAAP,eAAe,KAAKmsC,iBAAL,CAAuBt7B,KAAvB,CAAf;;WAEKuoB,KAAL,CAAWxF,mBAAX,CAA+BwY,eAA/B,CAA+C,KAAKpqB,EAApD,EAAwD2pB,MAAxD;YACMU,aAAN,GAAsBV,OAAOhlB,KAAP,CAAa,CAAC,CAAd,CAAtB;;;;;;qBAMJ+kB,6CAAiB76B,OAAOxL,QAAoB;QAAZyC,MAAY,uEAAH,CAAG;;;UAEpCykB,UAAN,GAAmB,EAAnB;QACI+f,mBAAmB,KAAvB;QACI/xB,QAAQwvB,eAAZ;;WAEOxvB,QAAQwvB,eAAf,EAAgC;cACtB1kC,OAAO+B,YAAP,EAAR;UACImlC,OAAOlnC,OAAOmC,GAAP,GAAaM,MAAxB;UACI2Y,UAAUpb,OAAO+B,YAAP,EAAd;UACI,CAACklC,gBAAL,EAAuB;2BACF,CAAC/xB,QAAQ2vB,oBAAT,MAAmC,CAAtD;;;UAGE3vB,QAAQsvB,qBAAZ,EAAmC;YAC7BU,KAAKllC,OAAOoD,WAAP,EAAT;YACI+hC,KAAKnlC,OAAOoD,WAAP,EAAT;OAFF,MAGO;YACD8hC,KAAKllC,OAAOmnC,QAAP,EAAT;YACIhC,KAAKnlC,OAAOmnC,QAAP,EAAT;;;UAGEvf,YAAY,IAAIqd,SAAJ,CAAc7pB,OAAd,EAAuB8pB,EAAvB,EAA2BC,EAA3B,CAAhB;gBACUhjC,GAAV,GAAgB+kC,IAAhB;;UAEIhyB,QAAQuvB,eAAZ,EAA6B;;kBAEjB5D,MAAV,GACAjZ,UAAUkZ,MAAV,GAAmB,CAAE9gC,OAAOiC,SAAP,MAAsB,EAAvB,GAA8BjC,OAAOiC,SAAP,MAAsB,EAArD,IAA4D,UAD/E;OAFF,MAKO,IAAIiT,QAAQyvB,wBAAZ,EAAsC;kBACjC9D,MAAV,GAAmB,CAAE7gC,OAAOiC,SAAP,MAAsB,EAAvB,GAA8BjC,OAAOiC,SAAP,MAAsB,EAArD,IAA4D,UAA/E;kBACU6+B,MAAV,GAAmB,CAAE9gC,OAAOiC,SAAP,MAAsB,EAAvB,GAA8BjC,OAAOiC,SAAP,MAAsB,EAArD,IAA4D,UAA/E;OAFK,MAIA,IAAIiT,QAAQ0vB,oBAAZ,EAAkC;kBAC7B/D,MAAV,GAAoB,CAAE7gC,OAAOiC,SAAP,MAAsB,EAAvB,GAA8BjC,OAAOiC,SAAP,MAAsB,EAArD,IAA4D,UAAhF;kBACUmjC,OAAV,GAAoB,CAAEplC,OAAOiC,SAAP,MAAsB,EAAvB,GAA8BjC,OAAOiC,SAAP,MAAsB,EAArD,IAA4D,UAAhF;kBACUojC,OAAV,GAAoB,CAAErlC,OAAOiC,SAAP,MAAsB,EAAvB,GAA8BjC,OAAOiC,SAAP,MAAsB,EAArD,IAA4D,UAAhF;kBACU6+B,MAAV,GAAoB,CAAE9gC,OAAOiC,SAAP,MAAsB,EAAvB,GAA8BjC,OAAOiC,SAAP,MAAsB,EAArD,IAA4D,UAAhF;;;YAGIilB,UAAN,CAAiBvsB,IAAjB,CAAsBitB,SAAtB;;;QAGE,KAAKmM,KAAL,CAAWxF,mBAAf,EAAoC;UAC9B+X,SAAS,EAAb;WACK,IAAIpN,IAAI,CAAb,EAAgBA,IAAI1tB,MAAM0b,UAAN,CAAiBzrB,MAArC,EAA6Cy9B,GAA7C,EAAkD;YAC5CtR,YAAYpc,MAAM0b,UAAN,CAAiBgS,CAAjB,CAAhB;eACOv+B,IAAP,CAAY,IAAImqC,KAAJ,CAAU,IAAV,EAAgB,IAAhB,EAAsBld,UAAUsd,EAAhC,EAAoCtd,UAAUud,EAA9C,CAAZ;;;aAGKxqC,IAAP,eAAe,KAAKmsC,iBAAL,CAAuBt7B,KAAvB,CAAf;;WAEKuoB,KAAL,CAAWxF,mBAAX,CAA+BwY,eAA/B,CAA+C,KAAKpqB,EAApD,EAAwD2pB,MAAxD;YACMU,aAAN,GAAsBV,OAAOngB,MAAP,CAAc,CAAC,CAAf,EAAkB,CAAlB,CAAtB;;WAEK,IAAI3qB,IAAI,CAAb,EAAgBA,IAAI8qC,OAAO7qC,MAA3B,EAAmCD,GAAnC,EAAwC;YAClCmrC,QAAQL,OAAO9qC,CAAP,CAAZ;cACM0rB,UAAN,CAAiB1rB,CAAjB,EAAoB0pC,EAApB,GAAyByB,MAAMnrB,CAA/B;cACM0L,UAAN,CAAiB1rB,CAAjB,EAAoB2pC,EAApB,GAAyBwB,MAAM1mB,CAA/B;;;;WAIGgnB,gBAAP;;;qBAGFH,+CAAkBt7B,OAAO;QACnBiT,OAAO,KAAK2jB,QAAL,CAAc,IAAd,CAAX;QACI,KAAKQ,QAAL,IAAiB,IAArB,EAA2B;WACpBA,QAAL,GAAgBV,MAAM1N,SAAN,CAAgBmO,WAAhB,CAA4BtmC,IAA5B,CAAiC,IAAjC,EAAuCoiB,IAAvC,CAAhB;;;mBAG6D,KAAKmkB,QAN7C;QAMjB/K,YANiB,YAMjBA,YANiB;QAMHkL,aANG,YAMHA,aANG;QAMYF,WANZ,YAMYA,WANZ;QAMyBG,UANzB,YAMyBA,UANzB;;;WAQhB,CACL,IAAI8B,KAAJ,CAAU,KAAV,EAAiB,IAAjB,EAAuBt5B,MAAMi6B,IAAN,GAAa5C,WAApC,EAAiD,CAAjD,CADK,EAEL,IAAIiC,KAAJ,CAAU,KAAV,EAAiB,IAAjB,EAAuBt5B,MAAMi6B,IAAN,GAAa5C,WAAb,GAA2BhL,YAAlD,EAAgE,CAAhE,CAFK,EAGL,IAAIiN,KAAJ,CAAU,KAAV,EAAiB,IAAjB,EAAuB,CAAvB,EAA0Bt5B,MAAMo6B,IAAN,GAAa5C,UAAvC,CAHK,EAIL,IAAI8B,KAAJ,CAAU,KAAV,EAAiB,IAAjB,EAAuB,CAAvB,EAA0Bt5B,MAAMo6B,IAAN,GAAa5C,UAAb,GAA0BD,aAApD,CAJK,CAAP;;;;;;qBASFqE,uCAAe;QACT57B,QAAQ,KAAKw6B,OAAL,EAAZ;QACI,CAACx6B,KAAL,EAAY;aAAS,EAAP;;;QAEVA,MAAM26B,gBAAN,GAAyB,CAA7B,EAAgC;;UAE1BG,SAAS,EAAb;2BACsB96B,MAAM0b,UAA5B,6GAAwC;;;;;;;;;;;;YAA/BU,SAA+B;;gBAC9B,KAAKmM,KAAL,CAAWjN,QAAX,CAAoBc,UAAUxM,OAA9B,EAAuC4qB,OAAvC,EAAR;;8BAEkBx6B,MAAM86B,MAAxB,oHAAgC;;;;;;;;;;;;cAAvBK,MAAuB;;iBACvBhsC,IAAP,CAAY,IAAImqC,KAAJ,CAAU6B,OAAM5B,OAAhB,EAAyB4B,OAAM3B,UAA/B,EAA2C2B,OAAMnrB,CAAN,GAAUoM,UAAUsd,EAA/D,EAAmEyB,OAAM1mB,CAAN,GAAU2H,UAAUud,EAAvF,CAAZ;;;KAPN,MAUO;UACDmB,SAAS96B,MAAM86B,MAAN,IAAgB,EAA7B;;;;QAIE96B,MAAMw7B,aAAN,IAAuB,CAAC,KAAKjT,KAAL,CAAWsT,SAAX,CAAqBhxB,MAArB,CAA4BoB,IAAxD,EAA8D;WACvDmrB,QAAL,CAAc/K,YAAd,GAA8BrsB,MAAMw7B,aAAN,CAAoB,CAApB,EAAuBxrB,CAAvB,GAA2BhQ,MAAMw7B,aAAN,CAAoB,CAApB,EAAuBxrB,CAAhF;WACKonB,QAAL,CAAcG,aAAd,GAA8Bv3B,MAAMw7B,aAAN,CAAoB,CAApB,EAAuB/mB,CAAvB,GAA2BzU,MAAMw7B,aAAN,CAAoB,CAApB,EAAuB/mB,CAAhF;WACK2iB,QAAL,CAAcC,WAAd,GAA8Br3B,MAAMi6B,IAAN,GAAaj6B,MAAMw7B,aAAN,CAAoB,CAApB,EAAuBxrB,CAAlE;WACKonB,QAAL,CAAcI,UAAd,GAA8Bx3B,MAAMw7B,aAAN,CAAoB,CAApB,EAAuB/mB,CAAvB,GAA2BzU,MAAMo6B,IAA/D;;;QAGE0B,WAAW,EAAf;QACIpW,MAAM,EAAV;SACK,IAAIlsB,IAAI,CAAb,EAAgBA,IAAIshC,OAAO7qC,MAA3B,EAAmCuJ,GAAnC,EAAwC;UAClC2hC,QAAQL,OAAOthC,CAAP,CAAZ;UACIrK,IAAJ,CAASgsC,KAAT;UACIA,MAAM3B,UAAV,EAAsB;iBACXrqC,IAAT,CAAcu2B,GAAd;cACM,EAAN;;;;WAIGoW,QAAP;;;qBAGF3E,qCAAc;QACR,KAAKC,QAAT,EAAmB;aACV,KAAKA,QAAZ;;;QAGEnkB,OAAO,KAAK2jB,QAAL,CAAc,IAAd,CAAX;qBACMO,WAAN,YAAkBlkB,IAAlB;;QAEI,KAAKsV,KAAL,CAAWxF,mBAAX,IAAkC,CAAC,KAAKwF,KAAL,CAAWtc,IAAlD,EAAwD;;WAEjDsoB,IAAL;;;WAGK,KAAK6C,QAAZ;;;;;;qBAIFT,+BAAW;QACLmF,WAAW,KAAKF,YAAL,EAAf;QACIrH,OAAO,IAAIZ,IAAJ,EAAX;;SAEK,IAAI3jC,IAAI,CAAb,EAAgBA,IAAI8rC,SAAS7rC,MAA7B,EAAqCD,GAArC,EAA0C;UACpC+rC,UAAUD,SAAS9rC,CAAT,CAAd;UACIgsC,UAAUD,QAAQ,CAAR,CAAd;UACIE,SAASF,QAAQA,QAAQ9rC,MAAR,GAAiB,CAAzB,CAAb;UACI6G,QAAQ,CAAZ;;UAEIklC,QAAQzC,OAAZ,EAAqB;;YAEf2C,UAAU,IAAd;gBACQ,CAAR;OAHF,MAIO;YACDD,OAAO1C,OAAX,EAAoB;;oBAER0C,MAAV;SAFF,MAGO;;oBAEK,IAAI3C,KAAJ,CAAU,KAAV,EAAiB,KAAjB,EAAwB,CAAC0C,QAAQhsB,CAAR,GAAYisB,OAAOjsB,CAApB,IAAyB,CAAjD,EAAoD,CAACgsB,QAAQvnB,CAAR,GAAYwnB,OAAOxnB,CAApB,IAAyB,CAA7E,CAAV;;;YAGEynB,UAAUF,OAAd;;;WAGGG,MAAL,CAAYH,QAAQhsB,CAApB,EAAuBgsB,QAAQvnB,CAA/B;;WAEK,IAAIiZ,IAAI52B,KAAb,EAAoB42B,IAAIqO,QAAQ9rC,MAAhC,EAAwCy9B,GAAxC,EAA6C;YACvC0O,KAAKL,QAAQrO,CAAR,CAAT;YACI2O,SAAS3O,MAAM,CAAN,GAAUsO,OAAV,GAAoBD,QAAQrO,IAAI,CAAZ,CAAjC;;YAEI2O,OAAO9C,OAAP,IAAkB6C,GAAG7C,OAAzB,EAAkC;eAC3B+C,MAAL,CAAYF,GAAGpsB,CAAf,EAAkBosB,GAAG3nB,CAArB;SADF,MAGO,IAAI4nB,OAAO9C,OAAP,IAAkB,CAAC6C,GAAG7C,OAA1B,EAAmC;cACpC2C,UAAUE,EAAd;SADK,MAGA,IAAI,CAACC,OAAO9C,OAAR,IAAmB,CAAC6C,GAAG7C,OAA3B,EAAoC;cACrCgD,OAAO,CAACF,OAAOrsB,CAAP,GAAWosB,GAAGpsB,CAAf,IAAoB,CAA/B;cACIwsB,OAAO,CAACH,OAAO5nB,CAAP,GAAW2nB,GAAG3nB,CAAf,IAAoB,CAA/B;eACKgoB,gBAAL,CAAsBJ,OAAOrsB,CAA7B,EAAgCqsB,OAAO5nB,CAAvC,EAA0C8nB,IAA1C,EAAgDC,IAAhD;cACIN,UAAUE,EAAd;SAJK,MAMA,IAAI,CAACC,OAAO9C,OAAR,IAAmB6C,GAAG7C,OAA1B,EAAmC;eACnCkD,gBAAL,CAAsBP,QAAQlsB,CAA9B,EAAiCksB,QAAQznB,CAAzC,EAA4C2nB,GAAGpsB,CAA/C,EAAkDosB,GAAG3nB,CAArD;cACIynB,UAAU,IAAd;SAFK,MAIA;gBACC,IAAI5rC,KAAJ,CAAU,wBAAV,CAAN;;;;;UAKA4rC,OAAJ,EAAa;aACNO,gBAAL,CAAsBP,QAAQlsB,CAA9B,EAAiCksB,QAAQznB,CAAzC,EAA4CunB,QAAQhsB,CAApD,EAAuDgsB,QAAQvnB,CAA/D;;;WAGGioB,SAAL;;;WAGKnI,IAAP;;;;EA3TkCmC;;AC9DtC;;;;IAGqBiG;;;;;;;;;qBACnB3E,+BAAW;QACL,KAAKzP,KAAL,CAAWqU,IAAf,EAAqB;aACZ,iBAAM5E,QAAN,WAAP;;;WAGK,KAAKzP,KAAL,CAAW,MAAX,EAAmBroB,YAAnB,CAAgC,KAAKiR,EAArC,CAAP;;;qBAGF0rB,qBAAKvlC,GAAG;QACFA,EAAErH,MAAF,GAAW,IAAf,EAAqB;aACZ,GAAP;KADF,MAEO,IAAIqH,EAAErH,MAAF,GAAW,KAAf,EAAsB;aACpB,IAAP;KADK,MAEA;aACE,KAAP;;;;qBAIJ0mC,+BAAW;QACHniC,MADG,GACQ,KAAK+zB,KADb,CACH/zB,MADG;QAEHmC,GAFG,GAEKnC,MAFL,CAEHmC,GAFG;;;QAILmmC,MAAM,KAAKvU,KAAL,CAAWqU,IAAX,IAAmB,KAAKrU,KAAL,CAAW,MAAX,CAA7B;QACIzwB,MAAMglC,IAAIr9B,OAAJ,CAAYhB,WAAZ,CAAwB,KAAK0S,EAA7B,CAAV;QACIpa,MAAMe,IAAIb,MAAJ,GAAaa,IAAI7H,MAA3B;WACO0G,GAAP,GAAamB,IAAIb,MAAjB;;QAEIs9B,OAAO,IAAIZ,IAAJ,EAAX;QACIzW,QAAQ,EAAZ;QACI6f,QAAQ,EAAZ;;QAEI1pB,QAAQ,IAAZ;QACI2pB,SAAS,CAAb;QACIhtB,IAAI,CAAR;QAAWyE,IAAI,CAAf;QACIwoB,mBAAJ;QACIC,kBAAJ;QACIxtC,OAAO,KAAX;;SAEKytC,WAAL,GAAmBF,aAAa,EAAhC;SACKG,UAAL,GAAkBF,YAAY,EAA9B;;QAEIG,SAASP,IAAIQ,eAAJ,IAAuB,EAApC;QACIC,aAAa,KAAKV,IAAL,CAAUQ,MAAV,CAAjB;;QAEIG,cAAcV,IAAIh8B,mBAAJ,CAAwB,KAAKqQ,EAA7B,CAAlB;QACIssB,QAAQD,YAAYE,KAAZ,IAAqB,EAAjC;QACIC,YAAY,KAAKd,IAAL,CAAUY,KAAV,CAAhB;;QAEIG,SAASd,IAAIr9B,OAAJ,CAAYm+B,MAAZ,IAAsBd,IAAIr9B,OAAJ,CAAYm+B,MAAZ,CAAmBC,kBAAtD;QACIC,UAAUN,YAAYM,OAA1B;QACIC,qBAAqB,KAAKxV,KAAL,CAAWxF,mBAApC;;aAESib,UAAT,GAAsB;UAChB3qB,SAAS,IAAb,EAAmB;gBACT6J,MAAM+gB,KAAN,KAAgBT,YAAYU,aAApC;;;;aAIKC,UAAT,GAAsB;UAChBjhB,MAAMjtB,MAAN,GAAe,CAAf,KAAqB,CAAzB,EAA4B;;;;gBAIlBitB,MAAMjtB,MAAN,IAAgB,CAA1B;aACOitB,MAAMjtB,MAAN,GAAe,CAAtB;;;aAGOksC,MAAT,CAAgBnsB,CAAhB,EAAmByE,CAAnB,EAAsB;UAChB/kB,IAAJ,EAAU;aACHgtC,SAAL;;;WAGGP,MAAL,CAAYnsB,CAAZ,EAAeyE,CAAf;aACO,IAAP;;;QAGE2pB,QAAQ,SAARA,KAAQ,GAAW;aACd5pC,OAAOmC,GAAP,GAAaI,GAApB,EAAyB;YACnBkC,KAAKzE,OAAOiC,SAAP,EAAT;YACIwC,KAAK,EAAT,EAAa;kBACHA,EAAR;iBACO,CAAL,CADF;iBAEO,CAAL,CAFF;iBAGO,EAAL,CAHF;iBAIO,EAAL;;;;;iBAIK,CAAL;;kBACMikB,MAAMjtB,MAAN,GAAe,CAAnB,EAAsB;;;;mBAIjBitB,MAAM+gB,KAAN,EAAL;qBACOjuB,CAAP,EAAUyE,CAAV;;;iBAGG,CAAL;;qBACSyI,MAAMjtB,MAAN,IAAgB,CAAvB,EAA0B;qBACnBitB,MAAM+gB,KAAN,EAAL;qBACK/gB,MAAM+gB,KAAN,EAAL;qBACK3B,MAAL,CAAYtsB,CAAZ,EAAeyE,CAAf;;;;iBAIC,CAAL,CAzBF;iBA0BO,CAAL;;kBACM4pB,QAAQplC,OAAO,CAAnB;qBACOikB,MAAMjtB,MAAN,IAAgB,CAAvB,EAA0B;oBACpBouC,KAAJ,EAAW;uBACJnhB,MAAM+gB,KAAN,EAAL;iBADF,MAEO;uBACA/gB,MAAM+gB,KAAN,EAAL;;;qBAGG3B,MAAL,CAAYtsB,CAAZ,EAAeyE,CAAf;wBACQ,CAAC4pB,KAAT;;;;iBAIC,CAAL;;qBACSnhB,MAAMjtB,MAAN,GAAe,CAAtB,EAAyB;oBACnBquC,MAAMtuB,IAAIkN,MAAM+gB,KAAN,EAAd;oBACIM,MAAM9pB,IAAIyI,MAAM+gB,KAAN,EAAd;oBACIO,MAAMF,MAAMphB,MAAM+gB,KAAN,EAAhB;oBACIQ,MAAMF,MAAMrhB,MAAM+gB,KAAN,EAAhB;oBACIO,MAAMthB,MAAM+gB,KAAN,EAAV;oBACIQ,MAAMvhB,MAAM+gB,KAAN,EAAV;qBACKS,aAAL,CAAmBJ,GAAnB,EAAwBC,GAAxB,EAA6BC,GAA7B,EAAkCC,GAAlC,EAAuCzuB,CAAvC,EAA0CyE,CAA1C;;;;iBAIC,EAAL;;kBACM5W,QAAQqf,MAAM9iB,GAAN,KAAcujC,SAA1B;kBACIgB,OAAOlB,MAAM5/B,KAAN,CAAX;kBACI8gC,IAAJ,EAAU;0BACE9gC,KAAV,IAAmB,IAAnB;oBACI+W,IAAIpgB,OAAOmC,GAAf;oBACI5G,IAAIgH,GAAR;uBACOJ,GAAP,GAAagoC,KAAK1nC,MAAlB;sBACM0nC,KAAK1nC,MAAL,GAAc0nC,KAAK1uC,MAAzB;;uBAEO0G,GAAP,GAAaie,CAAb;sBACM7kB,CAAN;;;;iBAIC,EAAL;;kBACM+sC,IAAI3nC,OAAJ,IAAe,CAAnB,EAAsB;;;;;iBAKnB,EAAL;;kBACM2nC,IAAI3nC,OAAJ,IAAe,CAAnB,EAAsB;;;;kBAIlB+nB,MAAMjtB,MAAN,GAAe,CAAnB,EAAsB;;;;kBAIlBP,IAAJ,EAAU;qBACHgtC,SAAL;uBACO,KAAP;;;;iBAIC,EAAL;;;oBACMI,IAAI3nC,OAAJ,GAAc,CAAlB,EAAqB;wBACb,IAAI7E,KAAJ,CAAU,0CAAV,CAAN;;;0BAGQ4sB,MAAM9iB,GAAN,EAAV;;;;iBAIG,EAAL;;;oBACM0iC,IAAI3nC,OAAJ,GAAc,CAAlB,EAAqB;wBACb,IAAI7E,KAAJ,CAAU,wCAAV,CAAN;;;oBAGE,CAACytC,kBAAL,EAAyB;wBACjB,IAAIztC,KAAJ,CAAU,sCAAV,CAAN;;;oBAGEsuC,cAAcb,mBAAmBc,cAAnB,CAAkCjB,MAAlC,EAA0CE,OAA1C,CAAlB;oBACI3jC,YAAY+iB,MAAM9iB,GAAN,EAAhB;oBACI0kC,cAAc3kC,YAAYykC,YAAY3uC,MAA1C;oBACI2gB,QAAQsM,MAAMjtB,MAAN,GAAe6uC,WAA3B;oBACIz3B,OAAOuJ,QAAQzW,SAAnB;;qBAEK,IAAInK,IAAI,CAAb,EAAgBA,IAAImK,SAApB,EAA+BnK,GAA/B,EAAoC;sBAC9B+uC,MAAM7hB,MAAM7V,OAAOrX,CAAb,CAAV;uBACK,IAAI09B,IAAI,CAAb,EAAgBA,IAAIkR,YAAY3uC,MAAhC,EAAwCy9B,GAAxC,EAA6C;2BACpCkR,YAAYlR,CAAZ,IAAiBxQ,MAAMtM,OAAN,CAAxB;;;wBAGIvJ,OAAOrX,CAAb,IAAkB+uC,GAAlB;;;uBAGKD,aAAP,EAAsB;wBACd1kC,GAAN;;;;;;iBAMC,EAAL,CAhIF;iBAiIO,EAAL;;;qBAESzD,GAAP,IAAeqmC,SAAS,CAAV,IAAgB,CAA9B;;;iBAGG,EAAL;;kBACM9f,MAAMjtB,MAAN,GAAe,CAAnB,EAAsB;;;;mBAIjBitB,MAAM+gB,KAAN,EAAL;mBACK/gB,MAAM+gB,KAAN,EAAL;qBACOjuB,CAAP,EAAUyE,CAAV;;;iBAGG,EAAL;;kBACMyI,MAAMjtB,MAAN,GAAe,CAAnB,EAAsB;;;;mBAIjBitB,MAAM+gB,KAAN,EAAL;qBACOjuB,CAAP,EAAUyE,CAAV;;;iBAGG,EAAL;;qBACSyI,MAAMjtB,MAAN,IAAgB,CAAvB,EAA0B;oBACpBquC,MAAMtuB,IAAIkN,MAAM+gB,KAAN,EAAd;oBACIM,MAAM9pB,IAAIyI,MAAM+gB,KAAN,EAAd;oBACIO,MAAMF,MAAMphB,MAAM+gB,KAAN,EAAhB;oBACIQ,MAAMF,MAAMrhB,MAAM+gB,KAAN,EAAhB;oBACIO,MAAMthB,MAAM+gB,KAAN,EAAV;oBACIQ,MAAMvhB,MAAM+gB,KAAN,EAAV;qBACKS,aAAL,CAAmBJ,GAAnB,EAAwBC,GAAxB,EAA6BC,GAA7B,EAAkCC,GAAlC,EAAuCzuB,CAAvC,EAA0CyE,CAA1C;;;mBAGGyI,MAAM+gB,KAAN,EAAL;mBACK/gB,MAAM+gB,KAAN,EAAL;mBACK3B,MAAL,CAAYtsB,CAAZ,EAAeyE,CAAf;;;iBAGG,EAAL;;qBACSyI,MAAMjtB,MAAN,IAAgB,CAAvB,EAA0B;qBACnBitB,MAAM+gB,KAAN,EAAL;qBACK/gB,MAAM+gB,KAAN,EAAL;qBACK3B,MAAL,CAAYtsB,CAAZ,EAAeyE,CAAf;;;kBAGE6pB,MAAMtuB,IAAIkN,MAAM+gB,KAAN,EAAd;kBACIM,MAAM9pB,IAAIyI,MAAM+gB,KAAN,EAAd;kBACIO,MAAMF,MAAMphB,MAAM+gB,KAAN,EAAhB;kBACIQ,MAAMF,MAAMrhB,MAAM+gB,KAAN,EAAhB;kBACIO,MAAMthB,MAAM+gB,KAAN,EAAV;kBACIQ,MAAMvhB,MAAM+gB,KAAN,EAAV;mBACKS,aAAL,CAAmBJ,GAAnB,EAAwBC,GAAxB,EAA6BC,GAA7B,EAAkCC,GAAlC,EAAuCzuB,CAAvC,EAA0CyE,CAA1C;;;iBAGG,EAAL;;kBACMyI,MAAMjtB,MAAN,GAAe,CAAnB,EAAsB;qBACfitB,MAAM+gB,KAAN,EAAL;;;qBAGK/gB,MAAMjtB,MAAN,IAAgB,CAAvB,EAA0B;sBAClB+f,CAAN;sBACMyE,IAAIyI,MAAM+gB,KAAN,EAAV;sBACMK,MAAMphB,MAAM+gB,KAAN,EAAZ;sBACMM,MAAMrhB,MAAM+gB,KAAN,EAAZ;oBACIO,GAAJ;oBACIC,MAAMvhB,MAAM+gB,KAAN,EAAV;qBACKS,aAAL,CAAmBJ,GAAnB,EAAwBC,GAAxB,EAA6BC,GAA7B,EAAkCC,GAAlC,EAAuCzuB,CAAvC,EAA0CyE,CAA1C;;;;iBAIC,EAAL;;kBACMyI,MAAMjtB,MAAN,GAAe,CAAnB,EAAsB;qBACfitB,MAAM+gB,KAAN,EAAL;;;qBAGK/gB,MAAMjtB,MAAN,IAAgB,CAAvB,EAA0B;sBAClB+f,IAAIkN,MAAM+gB,KAAN,EAAV;sBACMxpB,CAAN;sBACM6pB,MAAMphB,MAAM+gB,KAAN,EAAZ;sBACMM,MAAMrhB,MAAM+gB,KAAN,EAAZ;oBACIO,MAAMthB,MAAM+gB,KAAN,EAAV;oBACIQ,GAAJ;qBACKC,aAAL,CAAmBJ,GAAnB,EAAwBC,GAAxB,EAA6BC,GAA7B,EAAkCC,GAAlC,EAAuCzuB,CAAvC,EAA0CyE,CAA1C;;;;iBAIC,EAAL;;oBACQtlB,IAAN,CAAWqF,OAAOoD,WAAP,EAAX;;;iBAGG,EAAL;;sBACUslB,MAAM9iB,GAAN,KAAcmjC,UAAtB;qBACOF,OAAOx/B,KAAP,CAAP;kBACI8gC,IAAJ,EAAU;2BACG9gC,KAAX,IAAoB,IAApB;oBACI+W,IAAIpgB,OAAOmC,GAAf;oBACI5G,IAAIgH,GAAR;uBACOJ,GAAP,GAAagoC,KAAK1nC,MAAlB;sBACM0nC,KAAK1nC,MAAL,GAAc0nC,KAAK1uC,MAAzB;;uBAEO0G,GAAP,GAAaie,CAAb;sBACM7kB,CAAN;;;;iBAIC,EAAL,CA5OF;iBA6OO,EAAL;;sBACUkJ,OAAO,EAAf;qBACOikB,MAAMjtB,MAAN,IAAgB,CAAvB,EAA0B;oBACpBouC,KAAJ,EAAW;wBACHruB,IAAIkN,MAAM+gB,KAAN,EAAV;wBACMxpB,CAAN;wBACM6pB,MAAMphB,MAAM+gB,KAAN,EAAZ;wBACMM,MAAMrhB,MAAM+gB,KAAN,EAAZ;sBACIQ,MAAMvhB,MAAM+gB,KAAN,EAAV;sBACIO,OAAOthB,MAAMjtB,MAAN,KAAiB,CAAjB,GAAqBitB,MAAM+gB,KAAN,EAArB,GAAqC,CAA5C,CAAJ;iBANF,MAOO;wBACCjuB,CAAN;wBACMyE,IAAIyI,MAAM+gB,KAAN,EAAV;wBACMK,MAAMphB,MAAM+gB,KAAN,EAAZ;wBACMM,MAAMrhB,MAAM+gB,KAAN,EAAZ;sBACIO,MAAMthB,MAAM+gB,KAAN,EAAV;sBACIQ,OAAOvhB,MAAMjtB,MAAN,KAAiB,CAAjB,GAAqBitB,MAAM+gB,KAAN,EAArB,GAAqC,CAA5C,CAAJ;;;qBAGGS,aAAL,CAAmBJ,GAAnB,EAAwBC,GAAxB,EAA6BC,GAA7B,EAAkCC,GAAlC,EAAuCzuB,CAAvC,EAA0CyE,CAA1C;wBACQ,CAAC4pB,KAAT;;;;iBAIC,EAAL;mBACO7pC,OAAOiC,SAAP,EAAL;sBACQwC,EAAR;qBACO,CAAL;;sBACMqrB,IAAIpH,MAAM9iB,GAAN,EAAR;sBACIrC,IAAImlB,MAAM9iB,GAAN,EAAR;wBACMjL,IAAN,CAAWm1B,KAAKvsB,CAAL,GAAS,CAAT,GAAa,CAAxB;;;qBAGG,CAAL;;sBACMmlB,MAAM9iB,GAAN,EAAJ;sBACI8iB,MAAM9iB,GAAN,EAAJ;wBACMjL,IAAN,CAAWm1B,KAAKvsB,CAAL,GAAS,CAAT,GAAa,CAAxB;;;qBAGG,CAAL;;sBACMmlB,MAAM9iB,GAAN,EAAJ;wBACMjL,IAAN,CAAWm1B,IAAI,CAAJ,GAAQ,CAAnB;;;qBAGG,CAAL;;sBACMpH,MAAM9iB,GAAN,EAAJ;wBACMjL,IAAN,CAAWqD,KAAKgwB,GAAL,CAAS8B,CAAT,CAAX;;;qBAGG,EAAL;;sBACMpH,MAAM9iB,GAAN,EAAJ;sBACI8iB,MAAM9iB,GAAN,EAAJ;wBACMjL,IAAN,CAAWm1B,IAAIvsB,CAAf;;;qBAGG,EAAL;;sBACMmlB,MAAM9iB,GAAN,EAAJ;sBACI8iB,MAAM9iB,GAAN,EAAJ;wBACMjL,IAAN,CAAWm1B,IAAIvsB,CAAf;;;qBAGG,EAAL;;sBACMmlB,MAAM9iB,GAAN,EAAJ;sBACI8iB,MAAM9iB,GAAN,EAAJ;wBACMjL,IAAN,CAAWm1B,IAAIvsB,CAAf;;;qBAGG,EAAL;;sBACMmlB,MAAM9iB,GAAN,EAAJ;wBACMjL,IAAN,CAAW,CAACm1B,CAAZ;;;qBAGG,EAAL;;sBACMpH,MAAM9iB,GAAN,EAAJ;sBACI8iB,MAAM9iB,GAAN,EAAJ;wBACMjL,IAAN,CAAWm1B,MAAMvsB,CAAN,GAAU,CAAV,GAAc,CAAzB;;;qBAGG,EAAL;;wBACQqC,GAAN;;;qBAGG,EAAL;;sBACMhF,MAAM8nB,MAAM9iB,GAAN,EAAV;sBACI4a,MAAMkI,MAAM9iB,GAAN,EAAV;wBACM4a,GAAN,IAAa5f,GAAb;;;qBAGG,EAAL;;wBACQ8nB,MAAM9iB,GAAN,EAAN;wBACMjL,IAAN,CAAW4tC,MAAM/nB,GAAN,KAAc,CAAzB;;;qBAGG,EAAL;;sBACMgqB,KAAK9hB,MAAM9iB,GAAN,EAAT;sBACI6kC,KAAK/hB,MAAM9iB,GAAN,EAAT;sBACI8kC,KAAKhiB,MAAM9iB,GAAN,EAAT;sBACI+kC,KAAKjiB,MAAM9iB,GAAN,EAAT;wBACMjL,IAAN,CAAW+vC,MAAMC,EAAN,GAAWH,EAAX,GAAgBC,EAA3B;;;qBAGG,EAAL;;wBACQ9vC,IAAN,CAAWqD,KAAK4sC,MAAL,EAAX;;;qBAGG,EAAL;;sBACMliB,MAAM9iB,GAAN,EAAJ;sBACI8iB,MAAM9iB,GAAN,EAAJ;wBACMjL,IAAN,CAAWm1B,IAAIvsB,CAAf;;;qBAGG,EAAL;;sBACMmlB,MAAM9iB,GAAN,EAAJ;wBACMjL,IAAN,CAAWqD,KAAKgkC,IAAL,CAAUlS,CAAV,CAAX;;;qBAGG,EAAL;;sBACMpH,MAAM9iB,GAAN,EAAJ;wBACMjL,IAAN,CAAWm1B,CAAX,EAAcA,CAAd;;;qBAGG,EAAL;;sBACMpH,MAAM9iB,GAAN,EAAJ;sBACI8iB,MAAM9iB,GAAN,EAAJ;wBACMjL,IAAN,CAAW4I,CAAX,EAAcusB,CAAd;;;qBAGG,EAAL;;wBACQpH,MAAM9iB,GAAN,EAAN;sBACI4a,MAAM,CAAV,EAAa;0BACL,CAAN;mBADF,MAEO,IAAIA,MAAMkI,MAAMjtB,MAAN,GAAe,CAAzB,EAA4B;0BAC3BitB,MAAMjtB,MAAN,GAAe,CAArB;;;wBAGId,IAAN,CAAW+tB,MAAMlI,GAAN,CAAX;;;qBAGG,EAAL;;sBACMqqB,IAAIniB,MAAM9iB,GAAN,EAAR;sBACIszB,KAAIxQ,MAAM9iB,GAAN,EAAR;;sBAEIszB,MAAK,CAAT,EAAY;2BACHA,KAAI,CAAX,EAAc;0BACRh7B,IAAIwqB,MAAMmiB,IAAI,CAAV,CAAR;2BACK,IAAIrvC,KAAIqvC,IAAI,CAAjB,EAAoBrvC,MAAK,CAAzB,EAA4BA,IAA5B,EAAiC;8BACzBA,KAAI,CAAV,IAAektB,MAAMltB,EAAN,CAAf;;;4BAGI,CAAN,IAAW0C,CAAX;;;mBAPJ,MAUO;2BACEg7B,KAAI,CAAX,EAAc;0BACRh7B,IAAIwqB,MAAM,CAAN,CAAR;2BACK,IAAIltB,MAAI,CAAb,EAAgBA,OAAKqvC,CAArB,EAAwBrvC,KAAxB,EAA6B;8BACrBA,GAAN,IAAWktB,MAAMltB,MAAI,CAAV,CAAX;;;4BAGIqvC,IAAI,CAAV,IAAe3sC,CAAf;;;;;;qBAMD,EAAL;;wBACQsd,IAAIkN,MAAM+gB,KAAN,EAAV;wBACMxpB,CAAN;wBACM6pB,MAAMphB,MAAM+gB,KAAN,EAAZ;wBACMM,MAAMrhB,MAAM+gB,KAAN,EAAZ;sBACIqB,MAAMd,MAAMthB,MAAM+gB,KAAN,EAAhB;sBACIsB,MAAMd,GAAV;sBACIe,MAAMF,MAAMpiB,MAAM+gB,KAAN,EAAhB;sBACIwB,MAAMF,GAAV;sBACIG,MAAMF,MAAMtiB,MAAM+gB,KAAN,EAAhB;sBACI0B,MAAMF,GAAV;sBACIG,MAAMF,MAAMxiB,MAAM+gB,KAAN,EAAhB;sBACI4B,MAAMF,GAAV;sBACIC,GAAJ;sBACIC,GAAJ;;uBAEKnB,aAAL,CAAmBJ,GAAnB,EAAwBC,GAAxB,EAA6BC,GAA7B,EAAkCC,GAAlC,EAAuCa,GAAvC,EAA4CC,GAA5C;uBACKb,aAAL,CAAmBc,GAAnB,EAAwBC,GAAxB,EAA6BC,GAA7B,EAAkCC,GAAlC,EAAuCC,GAAvC,EAA4CC,GAA5C;;;qBAGG,EAAL;;sBACMC,MAAM,EAAV;;uBAEK,IAAI9vC,MAAI,CAAb,EAAgBA,OAAK,CAArB,EAAwBA,KAAxB,EAA6B;yBACtBktB,MAAM+gB,KAAN,EAAL;yBACK/gB,MAAM+gB,KAAN,EAAL;wBACI9uC,IAAJ,CAAS6gB,CAAT,EAAYyE,CAAZ;;;uBAGGiqB,aAAL,aAAsBoB,IAAIhqB,KAAJ,CAAU,CAAV,EAAa,CAAb,CAAtB;uBACK4oB,aAAL,aAAsBoB,IAAIhqB,KAAJ,CAAU,CAAV,CAAtB;wBACMmoB,KAAN,GAXF;;;qBAcK,EAAL;;wBACQjuB,IAAIkN,MAAM+gB,KAAN,EAAV;wBACMxpB,IAAIyI,MAAM+gB,KAAN,EAAV;wBACMK,MAAMphB,MAAM+gB,KAAN,EAAZ;wBACMM,MAAMrhB,MAAM+gB,KAAN,EAAZ;wBACMO,MAAMthB,MAAM+gB,KAAN,EAAZ;wBACMQ,GAAN;wBACMa,MAAMpiB,MAAM+gB,KAAN,EAAZ;wBACMsB,GAAN;wBACMC,MAAMtiB,MAAM+gB,KAAN,EAAZ;wBACMwB,MAAMviB,MAAM+gB,KAAN,EAAZ;wBACMyB,MAAMxiB,MAAM+gB,KAAN,EAAZ;wBACM0B,GAAN;sBACIC,GAAJ;sBACIC,GAAJ;;uBAEKnB,aAAL,CAAmBJ,GAAnB,EAAwBC,GAAxB,EAA6BC,GAA7B,EAAkCC,GAAlC,EAAuCa,GAAvC,EAA4CC,GAA5C;uBACKb,aAAL,CAAmBc,GAAnB,EAAwBC,GAAxB,EAA6BC,GAA7B,EAAkCC,GAAlC,EAAuCC,GAAvC,EAA4CC,GAA5C;;;qBAGG,EAAL;;sBACME,SAAS/vB,CAAb;sBACIgwB,SAASvrB,CAAb;;wBAEM,EAAN;uBACK,IAAIzkB,MAAI,CAAb,EAAgBA,OAAK,CAArB,EAAwBA,KAAxB,EAA6B;yBACtBktB,MAAM+gB,KAAN,EAAL;yBACK/gB,MAAM+gB,KAAN,EAAL;wBACI9uC,IAAJ,CAAS6gB,CAAT,EAAYyE,CAAZ;;;sBAGEjiB,KAAKgwB,GAAL,CAASxS,IAAI+vB,MAAb,IAAuBvtC,KAAKgwB,GAAL,CAAS/N,IAAIurB,MAAb,CAA3B,EAAiD;;yBAC1C9iB,MAAM+gB,KAAN,EAAL;wBACI+B,MAAJ;mBAFF,MAGO;wBACDD,MAAJ;yBACK7iB,MAAM+gB,KAAN,EAAL;;;sBAGE9uC,IAAJ,CAAS6gB,CAAT,EAAYyE,CAAZ;uBACKiqB,aAAL,aAAsBoB,IAAIhqB,KAAJ,CAAU,CAAV,EAAa,CAAb,CAAtB;uBACK4oB,aAAL,aAAsBoB,IAAIhqB,KAAJ,CAAU,CAAV,CAAtB;;;;wBAIM,IAAIxlB,KAAJ,qBAA4B2I,EAA5B,CAAN;;;;;oBAKE,IAAI3I,KAAJ,kBAAyB2I,EAAzB,CAAN;;SAveN,MA0eO,IAAIA,KAAK,GAAT,EAAc;gBACb9J,IAAN,CAAW8J,KAAK,GAAhB;SADK,MAEA,IAAIA,KAAK,GAAT,EAAc;cACfgnC,KAAKzrC,OAAOiC,SAAP,EAAT;gBACMtH,IAAN,CAAW,CAAC8J,KAAK,GAAN,IAAa,GAAb,GAAmBgnC,EAAnB,GAAwB,GAAnC;SAFK,MAGA,IAAIhnC,KAAK,GAAT,EAAc;cACfgnC,KAAKzrC,OAAOiC,SAAP,EAAT;gBACMtH,IAAN,CAAW,EAAE8J,KAAK,GAAP,IAAc,GAAd,GAAoBgnC,EAApB,GAAyB,GAApC;SAFK,MAGA;gBACC9wC,IAAN,CAAWqF,OAAOqD,WAAP,KAAuB,KAAlC;;;KAtfN;;;;QA6fInI,IAAJ,EAAU;WACHgtC,SAAL;;;WAGKnI,IAAP;;;;EA9kBkCmC;;ACHtC,IAAIwJ,YAAY,IAAI/vC,EAAEmB,MAAN,CAAa;WAClBnB,EAAEoB,MADgB;WAElBpB,EAAEoB,MAFgB;QAGrB,IAAIpB,EAAE8D,MAAN,CAAa,CAAb,CAHqB;QAIrB,IAAI9D,EAAEmF,MAAN,CAAa;WAAK5C,EAAEU,MAAF,CAAS+sC,MAAT,GAAkBztC,EAAEI,cAAzB;GAAb;CAJQ,CAAhB;;;;;;IAUqBstC;;;;;;;;;;;;;;;;;sBASnBC,2CAAgB1qC,MAAM;SACf,IAAI3F,IAAI,CAAb,EAAgBA,IAAI,KAAKu4B,KAAL,CAAW9c,IAAX,CAAgB60B,WAAhB,CAA4BrwC,MAAhD,EAAwDD,GAAxD,EAA6D;UACvDmd,QAAQ,KAAKob,KAAL,CAAW9c,IAAX,CAAgB60B,WAAhB,CAA4BtwC,CAA5B,CAAZ;UACImd,MAAMozB,IAAN,IAAc5qC,IAAlB,EAAwB;;;;;QAGtBK,UAAUmX,MAAMqzB,YAApB;QACI1pC,QAAQd,QAAQ,KAAKmb,EAAb,CAAZ;QACIpa,MAAMf,QAAQ,KAAKmb,EAAL,GAAU,CAAlB,CAAV;;QAEIra,UAAUC,GAAd,EAAmB;aACV,IAAP;;;SAGGwxB,KAAL,CAAW/zB,MAAX,CAAkBmC,GAAlB,GAAwBG,KAAxB;WACOopC,UAAU7pC,MAAV,CAAiB,KAAKkyB,KAAL,CAAW/zB,MAA5B,EAAoC,EAAC2rC,QAAQppC,MAAMD,KAAf,EAApC,CAAP;;;sBAGFuhC,yBAAOliC,KAAKR,MAAM;QACZ8qC,MAAM,KAAKJ,eAAL,CAAqB1qC,IAArB,CAAV;QACI8qC,OAAO,IAAX,EAAiB;UACXrL,QAAQz/B,OAAO,KAAK4yB,KAAL,CAAW9U,UAA9B;UACIitB,KAAJ,CAAUD,IAAIE,IAAd,EAAoB,EAACzsB,QAAQve,IAAT,EAAeqa,GAAGywB,IAAIG,OAAtB,EAA+BnsB,GAAG,CAAC,KAAKE,IAAL,CAAUX,IAAV,GAAiBysB,IAAII,OAAtB,IAAiCzL,KAAnE,EAApB;;;QAGE,KAAK7M,KAAL,CAAW9c,IAAX,CAAgB/B,KAAhB,CAAsBo3B,cAA1B,EAA0C;0BAClCzI,MAAN,YAAaliC,GAAb,EAAkBR,IAAlB;;;;;EAnCiCmkC;;ICVjCiH,YACJ,mBAAY/gC,KAAZ,EAAmBghC,KAAnB,EAA0B;;;OACnBhhC,KAAL,GAAaA,KAAb;OACKghC,KAAL,GAAaA,KAAb;;;;;;;;;;IASiBC;;;;;;;;;sBACnBpK,+BAAW;QACLliB,OAAO,IAAIL,IAAJ,EAAX;SACK,IAAItkB,IAAI,CAAb,EAAgBA,IAAI,KAAKkxC,MAAL,CAAYjxC,MAAhC,EAAwCD,GAAxC,EAA6C;UACvCmxC,QAAQ,KAAKD,MAAL,CAAYlxC,CAAZ,CAAZ;UACI+H,IAAIopC,MAAMnhC,KAAN,CAAY2U,IAApB;WACKH,QAAL,CAAczc,EAAEqb,IAAhB,EAAsBrb,EAAEic,IAAxB;WACKQ,QAAL,CAAczc,EAAEgc,IAAhB,EAAsBhc,EAAEkc,IAAxB;;;WAGKU,IAAP;;;;;;;;;;sBAsDF0jB,yBAAOliC,KAAKR,MAAM;yBACW,KAAKurC,MAAhC,6GAAwC;;;;;;;;;;;;;UAA9BlhC,KAA8B,SAA9BA,KAA8B;UAAvBghC,KAAuB,SAAvBA,KAAuB;;UAClCI,SAAJ,CAAc,CAACJ,MAAMK,GAAP,EAAYL,MAAMM,KAAlB,EAAyBN,MAAMO,IAA/B,CAAd,EAAoDP,MAAMQ,KAAN,GAAc,GAAd,GAAoB,GAAxE;YACMnJ,MAAN,CAAaliC,GAAb,EAAkBR,IAAlB;;;;;;;;wBAjDS;UACP8rC,OAAO,KAAKlZ,KAAL,CAAW5c,IAAtB;UACI+1B,OAAO,KAAKnZ,KAAL,CAAW7c,IAAtB;UACIhL,MAAM,CAAV;UACIC,OAAO+gC,KAAKC,eAAL,CAAqB1xC,MAArB,GAA8B,CAAzC;;aAEOyQ,OAAOC,IAAd,EAAoB;YACdC,MAAOF,MAAMC,IAAP,IAAgB,CAA1B;YACIihC,MAAMF,KAAKC,eAAL,CAAqB/gC,GAArB,CAAV;;YAEI,KAAKuQ,EAAL,GAAUywB,IAAIzhC,GAAlB,EAAuB;iBACdS,MAAM,CAAb;SADF,MAEO,IAAI,KAAKuQ,EAAL,GAAUywB,IAAIzhC,GAAlB,EAAuB;gBACtBS,MAAM,CAAZ;SADK,MAEA;cACDihC,YAAYD,GAAhB;;;;;;;UAOAC,aAAa,IAAjB,EAAuB;YACjB/wB,IAAI,KAAKyX,KAAL,CAAWuZ,aAAX,CAAyB,KAAK3wB,EAA9B,CAAR;YACI6vB,QAAQ;eACL,CADK;iBAEH,CAFG;gBAGJ,CAHI;iBAIH;SAJT;;eAOO,CAAC,IAAID,SAAJ,CAAcjwB,CAAd,EAAiBkwB,KAAjB,CAAD,CAAP;;;;UAIEE,SAAS,EAAb;WACK,IAAIlxC,IAAI6xC,UAAUE,eAAvB,EAAwC/xC,IAAI6xC,UAAUE,eAAV,GAA4BF,UAAUG,SAAlF,EAA6FhyC,GAA7F,EAAkG;YAC5F4xC,MAAMF,KAAKO,YAAL,CAAkBjyC,CAAlB,CAAV;YACIgxC,QAAQS,KAAKS,YAAL,CAAkBN,IAAIO,YAAtB,CAAZ;YACIrxB,IAAI,KAAKyX,KAAL,CAAWuZ,aAAX,CAAyBF,IAAIzhC,GAA7B,CAAR;eACOhR,IAAP,CAAY,IAAI4xC,SAAJ,CAAcjwB,CAAd,EAAiBkwB,KAAjB,CAAZ;;;aAGKE,MAAP;;;;;EA7DmCxK;;ACfvC,IAAM0L,6BAA6B,MAAnC;AACA,IAAMC,mBAA6B,MAAnC;AACA,IAAMC,uBAA6B,MAAnC;AACA,IAAMC,qBAA6B,MAAnC;AACA,IAAMC,wBAA6B,MAAnC;AACA,IAAMC,mBAA6B,MAAnC;AACA,IAAMC,mBAA6B,IAAnC;AACA,IAAMC,uBAA6B,IAAnC;AACA,IAAMC,kBAA6B,IAAnC;AACA,IAAMC,mBAA6B,IAAnC;AACA,IAAMC,uBAA6B,IAAnC;;;;;;;;;;;;;;IAaqBC;mCACPjzC,IAAZ,EAAkB+0B,MAAlB,EAA0B;;;SACnB/0B,IAAL,GAAYA,IAAZ;SACKmzB,gBAAL,GAAwB,KAAK+f,eAAL,CAAqBne,MAArB,CAAxB;SACKoe,YAAL,GAAoB,UAApB;;;oCAGFD,2CAAgBne,QAAQ;;;QAGlBqe,aAAa,EAAjB;SACK,IAAIlzC,IAAI,CAAb,EAAgBA,IAAI,KAAKF,IAAL,CAAU+c,IAAV,CAAes2B,IAAf,CAAoBlzC,MAAxC,EAAgDD,GAAhD,EAAqD;UAC/CmzC,OAAO,KAAKrzC,IAAL,CAAU+c,IAAV,CAAes2B,IAAf,CAAoBnzC,CAApB,CAAX;UACI60B,OAAO70B,CAAP,IAAYmzC,KAAKC,YAArB,EAAmC;mBACtBj0C,IAAX,CAAgB,CAAC01B,OAAO70B,CAAP,IAAYmzC,KAAKC,YAAjB,kBAAD,KAAoDD,KAAKC,YAAL,GAAoBD,KAAKE,QAAzB,kBAApD,CAAhB;OADF,MAEO;mBACMl0C,IAAX,CAAgB,CAAC01B,OAAO70B,CAAP,IAAYmzC,KAAKC,YAAjB,kBAAD,KAAoDD,KAAKG,QAAL,GAAgBH,KAAKC,YAArB,kBAApD,CAAhB;;;;;;QAMA,KAAKtzC,IAAL,CAAU4c,IAAd,EAAoB;WACb,IAAI1c,IAAI,CAAb,EAAgBA,IAAI,KAAKF,IAAL,CAAU4c,IAAV,CAAesK,OAAf,CAAuB/mB,MAA3C,EAAmDD,GAAnD,EAAwD;YAClDgnB,UAAU,KAAKlnB,IAAL,CAAU4c,IAAV,CAAesK,OAAf,CAAuBhnB,CAAvB,CAAd;aACK,IAAI09B,IAAI,CAAb,EAAgBA,IAAI1W,QAAQusB,cAAR,CAAuBtzC,MAA3C,EAAmDy9B,GAAnD,EAAwD;cAClD5b,OAAOkF,QAAQusB,cAAR,CAAuB7V,CAAvB,CAAX;cACIA,KAAK,CAAL,IAAUwV,WAAWlzC,CAAX,IAAgB8hB,KAAK0xB,SAAnC,EAA8C;gBACxCniB,OAAOrK,QAAQusB,cAAR,CAAuB7V,IAAI,CAA3B,CAAX;uBACW19B,CAAX,IAAgB,CAAC,CAACkzC,WAAWlzC,CAAX,IAAgBqxB,KAAKmiB,SAAtB,KAAoC1xB,KAAK2xB,OAAL,GAAepiB,KAAKoiB,OAAxD,mBAAD,KACb3xB,KAAK0xB,SAAL,GAAiBniB,KAAKmiB,SAAtB,kBADa,IAEdniB,KAAKoiB,OAFP;;;;;;;;WAUDP,UAAP;;;oCAGF3H,2CAAgBp7B,KAAKujC,aAAa;QAC5B,CAAC,KAAK5zC,IAAL,CAAU+c,IAAX,IAAmB,CAAC,KAAK/c,IAAL,CAAU6Z,IAAlC,EAAwC;;;;QAElCA,IAH0B,GAGjB,KAAK7Z,IAHY,CAG1B6Z,IAH0B;;QAI5BxJ,OAAOwJ,KAAK9N,UAAhB,EAA4B;;;;QAExB5E,SAAS0S,KAAK3T,OAAL,CAAamK,GAAb,CAAb;QACIlJ,WAAW0S,KAAK3T,OAAL,CAAamK,MAAM,CAAnB,CAAf,EAAsC;;;;;QAGhC3L,MAV0B,GAUf,KAAK1E,IAVU,CAU1B0E,MAV0B;;WAWzBmC,GAAP,GAAaM,MAAb;QACIzC,OAAOmC,GAAP,IAAcnC,OAAOvE,MAAzB,EAAiC;;;;QAI7B0zC,aAAanvC,OAAO+B,YAAP,EAAjB;QACIqtC,eAAe3sC,SAASzC,OAAO+B,YAAP,EAA5B;;QAEIotC,aAAavB,0BAAjB,EAA6C;UACvCyB,OAAOrvC,OAAOmC,GAAlB;aACOA,GAAP,GAAaitC,YAAb;UACIE,eAAe,KAAKC,YAAL,EAAnB;qBACevvC,OAAOmC,GAAtB;aACOA,GAAP,GAAaktC,IAAb;;;QAGEG,aAAaN,YAAY1qC,GAAZ,CAAgB;aAAMojC,GAAGlpB,IAAH,EAAN;KAAhB,CAAjB;;kBAEcmvB,gBAAd;SACK,IAAIryC,IAAI,CAAb,EAAgBA,IAAI2zC,UAApB,EAAgC3zC,GAAhC,EAAqC;UAC/Bi0C,gBAAgBzvC,OAAO+B,YAAP,EAApB;UACI2tC,aAAa1vC,OAAO+B,YAAP,EAAjB;;UAEI2tC,aAAa5B,oBAAjB,EAAuC;YACjC6B,cAAc,EAAlB;aACK,IAAI7f,IAAI,CAAb,EAAgBA,IAAI3a,KAAKH,SAAzB,EAAoC8a,GAApC,EAAyC;sBAC3Bn1B,IAAZ,CAAiBqF,OAAOoD,WAAP,KAAuB,KAAxC;;OAHJ,MAMO;YACD,CAACssC,aAAazB,gBAAd,KAAmC94B,KAAKy6B,gBAA5C,EAA8D;gBACtD,IAAI9zC,KAAJ,CAAU,oBAAV,CAAN;;;YAGE6zC,cAAcx6B,KAAK06B,YAAL,CAAkBH,aAAazB,gBAA/B,CAAlB;;;UAGEyB,aAAa3B,kBAAjB,EAAqC;YAC/B+B,cAAc,EAAlB;aACK,IAAIhgB,KAAI,CAAb,EAAgBA,KAAI3a,KAAKH,SAAzB,EAAoC8a,IAApC,EAAyC;sBAC3Bn1B,IAAZ,CAAiBqF,OAAOoD,WAAP,KAAuB,KAAxC;;;YAGE2sC,YAAY,EAAhB;aACK,IAAIjgB,MAAI,CAAb,EAAgBA,MAAI3a,KAAKH,SAAzB,EAAoC8a,KAApC,EAAyC;oBAC7Bn1B,IAAV,CAAeqF,OAAOoD,WAAP,KAAuB,KAAtC;;;;;UAKA4sC,SAAS,KAAKC,WAAL,CAAiBP,UAAjB,EAA6BC,WAA7B,EAA0CG,WAA1C,EAAuDC,SAAvD,CAAb;UACIC,WAAW,CAAf,EAAkB;wBACAP,aAAhB;;;;UAIEJ,OAAOrvC,OAAOmC,GAAlB;aACOA,GAAP,GAAaitC,YAAb;;UAEIM,aAAa1B,qBAAjB,EAAwC;YAClC1H,SAAS,KAAKiJ,YAAL,EAAb;OADF,MAEO;YACDjJ,SAASgJ,YAAb;;;;UAIEY,UAAU5J,OAAO7qC,MAAP,KAAkB,CAAlB,GAAsByzC,YAAYzzC,MAAlC,GAA2C6qC,OAAO7qC,MAAhE;UACI00C,UAAU,KAAKC,YAAL,CAAkBF,OAAlB,CAAd;UACIG,UAAU,KAAKD,YAAL,CAAkBF,OAAlB,CAAd;;UAEI5J,OAAO7qC,MAAP,KAAkB,CAAtB,EAAyB;;aAClB,IAAID,KAAI,CAAb,EAAgBA,KAAI0zC,YAAYzzC,MAAhC,EAAwCD,IAAxC,EAA6C;cACvCmrC,QAAQuI,YAAY1zC,EAAZ,CAAZ;gBACMggB,CAAN,IAAWxd,KAAK6hC,KAAL,CAAWsQ,QAAQ30C,EAAR,IAAaw0C,MAAxB,CAAX;gBACM/vB,CAAN,IAAWjiB,KAAK6hC,KAAL,CAAWwQ,QAAQ70C,EAAR,IAAaw0C,MAAxB,CAAX;;OAJJ,MAMO;YACDM,YAAYd,WAAWhrC,GAAX,CAAe;iBAAMojC,GAAGlpB,IAAH,EAAN;SAAf,CAAhB;YACI6xB,WAAWrB,YAAY1qC,GAAZ,CAAgB;iBAAM,KAAN;SAAhB,CAAf;;aAEK,IAAIhJ,MAAI,CAAb,EAAgBA,MAAI8qC,OAAO7qC,MAA3B,EAAmCD,KAAnC,EAAwC;cAClCglB,MAAM8lB,OAAO9qC,GAAP,CAAV;cACIglB,MAAM0uB,YAAYzzC,MAAtB,EAA8B;gBACxBkrC,SAAQ2J,UAAU9vB,GAAV,CAAZ;qBACSA,GAAT,IAAgB,IAAhB;;mBAEMhF,CAAN,IAAWxd,KAAK6hC,KAAL,CAAWsQ,QAAQ30C,GAAR,IAAaw0C,MAAxB,CAAX;mBACM/vB,CAAN,IAAWjiB,KAAK6hC,KAAL,CAAWwQ,QAAQ70C,GAAR,IAAaw0C,MAAxB,CAAX;;;;aAICQ,wBAAL,CAA8BF,SAA9B,EAAyCd,UAAzC,EAAqDe,QAArD;;aAEK,IAAI/0C,MAAI,CAAb,EAAgBA,MAAI0zC,YAAYzzC,MAAhC,EAAwCD,KAAxC,EAA6C;cACvCi1C,SAASH,UAAU90C,GAAV,EAAaggB,CAAb,GAAiBg0B,WAAWh0C,GAAX,EAAcggB,CAA5C;cACIk1B,SAASJ,UAAU90C,GAAV,EAAaykB,CAAb,GAAiBuvB,WAAWh0C,GAAX,EAAcykB,CAA5C;;sBAEYzkB,GAAZ,EAAeggB,CAAf,IAAoBi1B,MAApB;sBACYj1C,GAAZ,EAAeykB,CAAf,IAAoBywB,MAApB;;;;sBAIYjB,aAAhB;aACOttC,GAAP,GAAaktC,IAAb;;;;oCAIJE,uCAAe;QACTvvC,SAAS,KAAK1E,IAAL,CAAU0E,MAAvB;QACIiB,QAAQjB,OAAOiC,SAAP,EAAZ;;QAEIhB,QAAQitC,gBAAZ,EAA8B;cACpB,CAACjtC,QAAQktC,oBAAT,KAAkC,CAAlC,GAAsCnuC,OAAOiC,SAAP,EAA9C;;;QAGEqkC,SAAS,IAAIqK,WAAJ,CAAgB1vC,KAAhB,CAAb;QACIzF,IAAI,CAAR;QACImrC,QAAQ,CAAZ;WACOnrC,IAAIyF,KAAX,EAAkB;UACZ2vC,MAAM5wC,OAAOiC,SAAP,EAAV;UACI4uC,WAAW,CAACD,MAAMzC,oBAAP,IAA+B,CAA9C;UACI7xC,KAAKs0C,MAAM1C,gBAAN,GAAyBluC,OAAO8wC,UAAhC,GAA6C9wC,OAAOiC,SAA7D;;WAEK,IAAIi3B,IAAI,CAAb,EAAgBA,IAAI2X,QAAJ,IAAgBr1C,IAAIyF,KAApC,EAA2Ci4B,GAA3C,EAAgD;iBACrC58B,GAAGD,IAAH,CAAQ2D,MAAR,CAAT;eACOxE,GAAP,IAAcmrC,KAAd;;;;WAIGL,MAAP;;;oCAGF8J,qCAAanvC,OAAO;QACdjB,SAAS,KAAK1E,IAAL,CAAU0E,MAAvB;QACIxE,IAAI,CAAR;QACIu1C,SAAS,IAAIC,UAAJ,CAAe/vC,KAAf,CAAb;;WAEOzF,IAAIyF,KAAX,EAAkB;UACZ2vC,MAAM5wC,OAAOiC,SAAP,EAAV;UACI4uC,WAAW,CAACD,MAAMtC,oBAAP,IAA+B,CAA9C;;UAEIsC,MAAMxC,eAAV,EAA2B;aACpByC,QAAL;OADF,MAGO;YACDv0C,KAAKs0C,MAAMvC,gBAAN,GAAyBruC,OAAOoD,WAAhC,GAA8CpD,OAAOmnC,QAA9D;aACK,IAAIjO,IAAI,CAAb,EAAgBA,IAAI2X,QAAJ,IAAgBr1C,IAAIyF,KAApC,EAA2Ci4B,GAA3C,EAAgD;iBACvC19B,GAAP,IAAcc,GAAGD,IAAH,CAAQ2D,MAAR,CAAd;;;;;WAKC+wC,MAAP;;;oCAGFd,mCAAYP,YAAYC,aAAaG,aAAaC,WAAW;QACvDrB,aAAa,KAAKjgB,gBAAtB;QACMtZ,IAFqD,GAE5C,KAAK7Z,IAFuC,CAErD6Z,IAFqD;;QAGvD66B,SAAS,CAAb;;SAEK,IAAIx0C,IAAI,CAAb,EAAgBA,IAAI2Z,KAAKH,SAAzB,EAAoCxZ,GAApC,EAAyC;UACnCm0C,YAAYn0C,CAAZ,MAAmB,CAAvB,EAA0B;;;;UAItBkzC,WAAWlzC,CAAX,MAAkB,CAAtB,EAAyB;eAChB,CAAP;;;UAGE,CAACk0C,aAAa3B,kBAAd,MAAsC,CAA1C,EAA6C;YACtCW,WAAWlzC,CAAX,IAAgBwC,KAAKub,GAAL,CAAS,CAAT,EAAYo2B,YAAYn0C,CAAZ,CAAZ,CAAjB,IACCkzC,WAAWlzC,CAAX,IAAgBwC,KAAKC,GAAL,CAAS,CAAT,EAAY0xC,YAAYn0C,CAAZ,CAAZ,CADrB,EACmD;iBAC1C,CAAP;;;iBAGO,CAACw0C,SAAStB,WAAWlzC,CAAX,CAAT,kBAAD,KAA6Cm0C,YAAYn0C,CAAZ,mBAA7C,CAAT;OANF,MAOO;YACAkzC,WAAWlzC,CAAX,IAAgBs0C,YAAYt0C,CAAZ,CAAjB,IACCkzC,WAAWlzC,CAAX,IAAgBu0C,UAAUv0C,CAAV,CADrB,EACoC;iBAC3B,CAAP;SAFF,MAIO,IAAIkzC,WAAWlzC,CAAX,IAAgBm0C,YAAYn0C,CAAZ,CAApB,EAAoC;mBAChCw0C,UAAUtB,WAAWlzC,CAAX,IAAgBs0C,YAAYt0C,CAAZ,CAAhB,kBAAV,KAA8Dm0C,YAAYn0C,CAAZ,IAAiBs0C,YAAYt0C,CAAZ,CAAjB,kBAA9D,CAAT;SADK,MAGA;mBACIw0C,UAAUD,UAAUv0C,CAAV,IAAekzC,WAAWlzC,CAAX,CAAf,kBAAV,KAA4Du0C,UAAUv0C,CAAV,IAAem0C,YAAYn0C,CAAZ,CAAf,kBAA5D,CAAT;;;;;WAKCw0C,MAAP;;;;;;;;oCAMFQ,6DAAyBlK,QAAQ2K,UAAUV,UAAU;QAC/CjK,OAAO7qC,MAAP,KAAkB,CAAtB,EAAyB;;;;QAIrBkrC,QAAQ,CAAZ;WACOA,QAAQL,OAAO7qC,MAAtB,EAA8B;UACxBy1C,aAAavK,KAAjB;;;UAGIwK,WAAWxK,KAAf;UACIiB,KAAKtB,OAAO6K,QAAP,CAAT;aACO,CAACvJ,GAAG5C,UAAX,EAAuB;aAChBsB,OAAO,EAAE6K,QAAT,CAAL;;;;aAIKxK,SAASwK,QAAT,IAAqB,CAACZ,SAAS5J,KAAT,CAA7B,EAA8C;;;;UAI1CA,QAAQwK,QAAZ,EAAsB;;;;UAIlBC,aAAazK,KAAjB;UACI0K,WAAW1K,KAAf;;;aAGOA,SAASwK,QAAhB,EAA0B;;YAEpBZ,SAAS5J,KAAT,CAAJ,EAAqB;eACd2K,gBAAL,CAAsBD,WAAW,CAAjC,EAAoC1K,QAAQ,CAA5C,EAA+C0K,QAA/C,EAAyD1K,KAAzD,EAAgEsK,QAAhE,EAA0E3K,MAA1E;qBACWK,KAAX;;;;;;;UAOA0K,aAAaD,UAAjB,EAA6B;aACtBG,UAAL,CAAgBL,UAAhB,EAA4BC,QAA5B,EAAsCE,QAAtC,EAAgDJ,QAAhD,EAA0D3K,MAA1D;OADF,MAEO;;aAEAgL,gBAAL,CAAsBD,WAAW,CAAjC,EAAoCF,QAApC,EAA8CE,QAA9C,EAAwDD,UAAxD,EAAoEH,QAApE,EAA8E3K,MAA9E;;YAEI8K,aAAa,CAAjB,EAAoB;eACbE,gBAAL,CAAsBJ,UAAtB,EAAkCE,aAAa,CAA/C,EAAkDC,QAAlD,EAA4DD,UAA5D,EAAwEH,QAAxE,EAAkF3K,MAAlF;;;;cAII6K,WAAW,CAAnB;;;;oCAIJG,6CAAiBnQ,IAAIC,IAAIoQ,MAAMC,MAAMR,UAAUX,WAAW;QACpDnP,KAAKC,EAAT,EAAa;;;;QAITsQ,WAAW,CAAC,GAAD,EAAM,GAAN,CAAf;SACK,IAAIl2C,IAAI,CAAb,EAAgBA,IAAIk2C,SAASj2C,MAA7B,EAAqCD,GAArC,EAA0C;UACpCwJ,IAAI0sC,SAASl2C,CAAT,CAAR;UACIy1C,SAASO,IAAT,EAAexsC,CAAf,IAAoBisC,SAASQ,IAAT,EAAezsC,CAAf,CAAxB,EAA2C;YACrCob,IAAIoxB,IAAR;eACOC,IAAP;eACOrxB,CAAP;;;UAGEuxB,MAAMV,SAASO,IAAT,EAAexsC,CAAf,CAAV;UACI4sC,MAAMX,SAASQ,IAAT,EAAezsC,CAAf,CAAV;UACI6sC,OAAOvB,UAAUkB,IAAV,EAAgBxsC,CAAhB,CAAX;UACI8sC,OAAOxB,UAAUmB,IAAV,EAAgBzsC,CAAhB,CAAX;;;;UAII2sC,QAAQC,GAAR,IAAeC,SAASC,IAA5B,EAAkC;YAC5BlR,QAAQ+Q,QAAQC,GAAR,GAAc,CAAd,GAAkB,CAACE,OAAOD,IAAR,KAAiBD,MAAMD,GAAvB,CAA9B;;aAEK,IAAIvxB,KAAI+gB,EAAb,EAAiB/gB,MAAKghB,EAAtB,EAA0BhhB,IAA1B,EAA+B;cACzB2xB,MAAMd,SAAS7wB,EAAT,EAAYpb,CAAZ,CAAV;;cAEI+sC,OAAOJ,GAAX,EAAgB;mBACPE,OAAOF,GAAd;WADF,MAEO,IAAII,OAAOH,GAAX,EAAgB;mBACdE,OAAOF,GAAd;WADK,MAEA;kBACCC,OAAO,CAACE,MAAMJ,GAAP,IAAc/Q,KAA3B;;;oBAGQxgB,EAAV,EAAapb,CAAb,IAAkB+sC,GAAlB;;;;;;oCAMRR,iCAAWpQ,IAAIC,IAAI4Q,KAAKf,UAAUX,WAAW;QACvCG,SAASH,UAAU0B,GAAV,EAAex2B,CAAf,GAAmBy1B,SAASe,GAAT,EAAcx2B,CAA9C;QACIk1B,SAASJ,UAAU0B,GAAV,EAAe/xB,CAAf,GAAmBgxB,SAASe,GAAT,EAAc/xB,CAA9C;;QAEIwwB,WAAW,CAAX,IAAgBC,WAAW,CAA/B,EAAkC;;;;SAI7B,IAAItwB,IAAI+gB,EAAb,EAAiB/gB,KAAKghB,EAAtB,EAA0BhhB,GAA1B,EAA+B;UACzBA,MAAM4xB,GAAV,EAAe;kBACH5xB,CAAV,EAAa5E,CAAb,IAAkBi1B,MAAlB;kBACUrwB,CAAV,EAAaH,CAAb,IAAkBywB,MAAlB;;;;;oCAKNpN,qDAAqB33B,KAAKgN,OAAO;QAC3Bs5B,mBAAJ;QAAgBC,mBAAhB;;QAEIv5B,MAAMw5B,mBAAV,EAA+B;UACzB3xB,MAAM7U,GAAV;UACI6U,OAAO7H,MAAMw5B,mBAAN,CAA0BC,QAArC,EAA+C;cACvCz5B,MAAMw5B,mBAAN,CAA0BC,QAA1B,GAAqC,CAA3C;;;UAGEjhC,cAAcwH,MAAMw5B,mBAAN,CAA0BhhC,WAA5C;kCAC4BwH,MAAMw5B,mBAAN,CAA0BE,OAA1B,CAAkC7xB,GAAlC,CAPC;gBAAA,yBAO3ByxB,UAP2B;gBAAA,yBAOfC,UAPe;KAA/B,MAQO;mBACQ,CAAb;mBACavmC,GAAb;;;WAGK,KAAK2mC,cAAL,CAAoB35B,MAAM0wB,kBAA1B,EAA8C4I,UAA9C,EAA0DC,UAA1D,CAAP;;;;;;;oCAKFI,yCAAeC,WAAWN,YAAYC,YAAY;QAC5CM,UAAUD,UAAUE,iBAAV,CAA4BR,UAA5B,CAAd;QACIS,WAAWF,QAAQG,SAAR,CAAkBT,UAAlB,CAAf;QACI9H,cAAc,KAAKC,cAAL,CAAoBkI,SAApB,EAA+BN,UAA/B,CAAlB;QACIW,gBAAgB,CAApB;;SAEK,IAAIC,SAAS,CAAlB,EAAqBA,SAASL,QAAQnqC,gBAAtC,EAAwDwqC,QAAxD,EAAkE;uBAC/CH,SAAS3B,MAAT,CAAgB8B,MAAhB,IAA0BzI,YAAYyI,MAAZ,CAA3C;;;WAGKD,aAAP;;;oCAGFvI,yCAAekI,WAAWN,YAAY;QAChCO,UAAUD,UAAUE,iBAAV,CAA4BR,UAA5B,CAAd;QACI,KAAKxD,YAAL,CAAkBhyC,GAAlB,CAAsB+1C,OAAtB,CAAJ,EAAoC;aAC3B,KAAK/D,YAAL,CAAkBtyC,GAAlB,CAAsBq2C,OAAtB,CAAP;;;QAGE/jB,mBAAmB,KAAKA,gBAA5B;QACI2b,cAAc,EAAlB;;;SAGK,IAAIyI,SAAS,CAAlB,EAAqBA,SAASL,QAAQnqC,gBAAtC,EAAwDwqC,QAAxD,EAAkE;UAC5DC,SAAS,CAAb;UACIC,cAAcP,QAAQQ,aAAR,CAAsBH,MAAtB,CAAlB;UACII,OAAOV,UAAUW,mBAAV,CAA8BC,gBAA9B,CAA+CJ,WAA/C,CAAX;;;WAGK,IAAI7Z,IAAI,CAAb,EAAgBA,IAAI+Z,KAAKx3C,MAAzB,EAAiCy9B,GAAjC,EAAsC;YAChCyV,OAAOsE,KAAK/Z,CAAL,CAAX;YACIka,mBAAJ;;;;YAIIzE,KAAK0E,UAAL,GAAkB1E,KAAK2E,SAAvB,IAAoC3E,KAAK2E,SAAL,GAAiB3E,KAAK4E,QAA9D,EAAwE;uBACzD,CAAb;SADF,MAGO,IAAI5E,KAAK0E,UAAL,GAAkB,CAAlB,IAAuB1E,KAAK4E,QAAL,GAAgB,CAAvC,IAA4C5E,KAAK2E,SAAL,KAAmB,CAAnE,EAAsE;uBAC9D,CAAb;;;SADK,MAIA,IAAI3E,KAAK2E,SAAL,KAAmB,CAAvB,EAA0B;uBAClB,CAAb;;;SADK,MAIA,IAAI7kB,iBAAiByK,CAAjB,IAAsByV,KAAK0E,UAA3B,IAAyC5kB,iBAAiByK,CAAjB,IAAsByV,KAAK4E,QAAxE,EAAkF;uBAC1E,CAAb;;;SADK,MAIA;cACD9kB,iBAAiByK,CAAjB,MAAwByV,KAAK2E,SAAjC,EAA4C;yBAC7B,CAAb;WADF,MAEO,IAAI7kB,iBAAiByK,CAAjB,IAAsByV,KAAK2E,SAA/B,EAA0C;yBAClC,CAAC7kB,iBAAiByK,CAAjB,IAAsByV,KAAK0E,UAA3B,kBAAD,KACV1E,KAAK2E,SAAL,GAAiB3E,KAAK0E,UAAtB,kBADU,CAAb;WADK,MAGA;yBACQ,CAAC1E,KAAK4E,QAAL,GAAgB9kB,iBAAiByK,CAAjB,CAAhB,kBAAD,KACVyV,KAAK4E,QAAL,GAAgB5E,KAAK2E,SAArB,kBADU,CAAb;;;;;kBAMMF,UAAV;;;kBAGUP,MAAZ,IAAsBC,MAAtB;;;SAGGrE,YAAL,CAAkB7xC,GAAlB,CAAsB41C,OAAtB,EAA+BpI,WAA/B;WACOA,WAAP;;;;;;ICzdiBoJ;kBACPl4C,IAAZ,EAAkB;;;SACXA,IAAL,GAAYA,IAAZ;SACKuQ,MAAL,GAAc,EAAd;SACK4nC,OAAL,GAAe,EAAf;;;SAGKC,YAAL,CAAkB,CAAlB;;;mBAGFA,qCAAaloC,OAAO;QACd,QAAOA,KAAP,yCAAOA,KAAP,OAAiB,QAArB,EAA+B;cACrBA,MAAMmR,EAAd;;;QAGE,KAAK82B,OAAL,CAAajoC,KAAb,KAAuB,IAA3B,EAAiC;WAC1BK,MAAL,CAAYlR,IAAZ,CAAiB6Q,KAAjB;WACKioC,OAAL,CAAajoC,KAAb,IAAsB,KAAKK,MAAL,CAAYpQ,MAAZ,GAAqB,CAA3C;;;WAGK,KAAKg4C,OAAL,CAAajoC,KAAb,CAAP;;;mBAGFmoC,uCAAe;;;QACT7wC,IAAI,IAAInH,EAAEi4C,YAAN,EAAR;;YAEQC,QAAR,CAAiB,YAAM;YAChBlxC,MAAL,CAAYG,CAAZ;aACOA,EAAEP,GAAF,EAAP;KAFF;;WAKOO,CAAP;;;;;;AC/BJ;AACA,IAAMohC,aAAkB,KAAK,CAA7B;AACA,IAAMC,mBAAkB,KAAK,CAA7B;AACA,IAAMC,mBAAkB,KAAK,CAA7B;AACA,IAAMC,WAAkB,KAAK,CAA7B;AACA,IAAMC,WAAkB,KAAK,CAA7B;AACA,IAAMC,WAAkB,KAAK,CAA7B;;IAEMO;;;;;QACG3jC,qBAAKP,KAAK;WACRA,OAAO,CAAP,IAAYA,OAAO,GAAnB,GAAyB,CAAzB,GAA6B,CAApC;;;QAGK+B,yBAAO3C,QAAQ5D,OAAO;QACvBA,SAAS,CAAT,IAAcA,SAAS,GAA3B,EAAgC;aACvB2G,UAAP,CAAkB3G,KAAlB;KADF,MAEO;aACE6H,YAAP,CAAoB7H,KAApB;;;;;;;AAKN,IAAI03C,OAAO,IAAIn4C,EAAEmB,MAAN,CAAa;oBACJnB,EAAEqB,KADE;QAEhBrB,EAAEqB,KAFc;QAGhBrB,EAAEqB,KAHc;QAIhBrB,EAAEqB,KAJc;QAKhBrB,EAAEqB,KALc;oBAMJ,IAAIrB,EAAE6B,KAAN,CAAY7B,EAAEoB,MAAd,EAAsB,kBAAtB,CANI;gBAOR,IAAIpB,EAAE6B,KAAN,CAAY7B,EAAE0B,KAAd,EAAqB1B,EAAEoB,MAAvB,CAPQ;SAQf,IAAIpB,EAAE6B,KAAN,CAAY7B,EAAE0B,KAAd,EAAqB,CAArB,CARe;WASb,IAAI1B,EAAE6B,KAAN,CAAYsnC,OAAZ,EAAmB,CAAnB,CATa;WAUb,IAAInpC,EAAE6B,KAAN,CAAYsnC,OAAZ,EAAmB,CAAnB;CAVA,CAAX;;;;;;IAgBqBiP;;;;;4BACnBC,qCAAajU,MAAyB;QAAnByG,YAAmB,uEAAJ,EAAI;;QAChCD,mBAAmB,EAAvB;QACI0N,UAAU,EAAd;QACIC,UAAU,EAAd;QACIh/B,QAAQ,EAAZ;QACI6wB,OAAO,CAAX;QACIoO,QAAQ,CAAZ;QAAeC,QAAQ,CAAvB;QAA0BC,WAAW,CAArC;QACIC,aAAa,CAAjB;;SAEK,IAAI94C,IAAI,CAAb,EAAgBA,IAAIukC,KAAKX,QAAL,CAAc3jC,MAAlC,EAA0CD,GAA1C,EAA+C;UACzC6gB,IAAI0jB,KAAKX,QAAL,CAAc5jC,CAAd,CAAR;;WAEK,IAAI09B,IAAI,CAAb,EAAgBA,IAAI7c,EAAE7f,IAAF,CAAOf,MAA3B,EAAmCy9B,KAAK,CAAxC,EAA2C;YACrC1d,IAAIa,EAAE7f,IAAF,CAAO08B,CAAP,CAAR;YACIjZ,IAAI5D,EAAE7f,IAAF,CAAO08B,IAAI,CAAX,CAAR;YACIwN,OAAO,CAAX;;;;;YAKIrqB,EAAEojB,OAAF,KAAc,kBAAd,IAAoCvG,MAAM,CAA9C,EAAiD;cAC3CvY,OAAOof,KAAKX,QAAL,CAAc5jC,IAAI,CAAlB,CAAX;cACImlB,QAAQA,KAAK8e,OAAL,KAAiB,kBAA7B,EAAiD;gBAC3CsI,OAAO,CAACoM,QAAQxzB,KAAKnkB,IAAL,CAAU,CAAV,CAAT,IAAyB,CAApC;gBACIwrC,OAAO,CAACoM,QAAQzzB,KAAKnkB,IAAL,CAAU,CAAV,CAAT,IAAyB,CAApC;;gBAEIgf,MAAMusB,IAAN,IAAc9nB,MAAM+nB,IAAxB,EAA8B;;;;;;;YAO9B,EAAE3rB,EAAEojB,OAAF,KAAc,kBAAd,IAAoCvG,MAAM,CAA5C,CAAJ,EAAoD;kBAC1CgL,UAAR;;;eAGK,KAAKqQ,YAAL,CAAkB/4B,CAAlB,EAAqB24B,KAArB,EAA4BF,OAA5B,EAAqCvN,IAArC,EAA2CvC,gBAA3C,EAA2DG,QAA3D,CAAP;eACO,KAAKiQ,YAAL,CAAkBt0B,CAAlB,EAAqBm0B,KAArB,EAA4BF,OAA5B,EAAqCxN,IAArC,EAA2CtC,gBAA3C,EAA2DG,QAA3D,CAAP;;YAEImC,SAAS2N,QAAT,IAAqBtO,OAAO,GAAhC,EAAqC;gBAC7B7wB,MAAMzZ,MAAN,GAAe,CAArB,KAA2B4oC,QAA3B;;SADF,MAGO;cACD0B,OAAO,CAAX,EAAc;kBACNprC,IAAN,CAAWorC,IAAX;mBACO,CAAP;;;gBAGIprC,IAAN,CAAW+rC,IAAX;qBACWA,IAAX;;;gBAGMlrB,CAAR;gBACQyE,CAAR;;;;UAIE5D,EAAEojB,OAAF,KAAc,WAAlB,EAA+B;yBACZ9kC,IAAjB,CAAsB25C,aAAa,CAAnC;;;;;QAKAvU,KAAKX,QAAL,CAAc3jC,MAAd,GAAuB,CAAvB,IAA4BskC,KAAKX,QAAL,CAAcW,KAAKX,QAAL,CAAc3jC,MAAd,GAAuB,CAArC,EAAwCgkC,OAAxC,KAAoD,WAApF,EAAiG;uBAC9E9kC,IAAjB,CAAsB25C,aAAa,CAAnC;;;QAGEn0B,OAAO4f,KAAK5f,IAAhB;QACItJ,OAAO;wBACS0vB,iBAAiB9qC,MAD1B;YAEH0kB,KAAKvB,IAFF;YAGHuB,KAAKX,IAHF;YAIHW,KAAKZ,IAJF;YAKHY,KAAKV,IALF;wBAMS8mB,gBANT;oBAOKC,YAPL;aAQFtxB,KARE;eASA++B,OATA;eAUAC;KAVX;;QAaI/yC,OAAO2yC,KAAK3yC,IAAL,CAAU0V,IAAV,CAAX;QACIqF,OAAO,IAAK/a,OAAO,CAAvB;;QAEInB,SAAS,IAAIrE,EAAEi4C,YAAN,CAAmBzyC,OAAO+a,IAA1B,CAAb;SACKvZ,MAAL,CAAY3C,MAAZ,EAAoB6W,IAApB;;;QAGIqF,SAAS,CAAb,EAAgB;aACP6nB,IAAP,CAAY,CAAZ,EAAe7nB,IAAf;;;WAGKlc,OAAOjF,MAAd;;;4BAGFw5C,qCAAan4C,OAAOkrB,MAAMgf,QAAQI,MAAM8N,WAAWC,UAAU;QACvDC,OAAOt4C,QAAQkrB,IAAnB;;QAEIlrB,UAAUkrB,IAAd,EAAoB;cACVmtB,QAAR;KADF,MAEO;UACD,CAAC,GAAD,IAAQC,IAAR,IAAgBA,QAAQ,GAA5B,EAAiC;gBACvBF,SAAR;YACIE,OAAO,CAAX,EAAc;iBACL,CAACA,IAAR;SADF,MAEO;kBACGD,QAAR;;;;aAIG95C,IAAP,CAAY+5C,IAAZ;;;WAGKhO,IAAP;;;;;;ICrJiBiO;;;qBACPr5C,IAAZ,EAAkB;;;iDAChB,mBAAMA,IAAN,CADgB;;UAEXs5C,YAAL,GAAoB,IAAIb,eAAJ,EAApB;;;;sBAGFc,+BAAUlpC,KAAK;QACTH,QAAQ,KAAKlQ,IAAL,CAAUwrB,QAAV,CAAmBnb,GAAnB,CAAZ;QACIkL,OAAOrL,MAAMw6B,OAAN,EAAX;;;QAGI8O,YAAY,KAAKx5C,IAAL,CAAUiG,IAAV,CAAeC,OAAf,CAAuBmK,GAAvB,CAAhB;QACIopC,aAAa,KAAKz5C,IAAL,CAAUiG,IAAV,CAAeC,OAAf,CAAuBmK,MAAM,CAA7B,CAAjB;;QAEI3L,SAAS,KAAK1E,IAAL,CAAUkqC,eAAV,CAA0B,MAA1B,CAAb;WACOrjC,GAAP,IAAc2yC,SAAd;;QAEI/5C,SAASiF,OAAOyL,UAAP,CAAkBspC,aAAaD,SAA/B,CAAb;;;QAGIj+B,QAAQA,KAAKsvB,gBAAL,GAAwB,CAApC,EAAuC;eAC5B,IAAIrlC,MAAJ,CAAW/F,MAAX,CAAT;2BACsB8b,KAAKqQ,UAA3B,6GAAuC;;;;;;;;;;;;YAA9BU,SAA8B;;cAC/B,KAAK8rB,YAAL,CAAkB9rB,UAAUxM,OAA5B,CAAN;eACOxY,aAAP,CAAqB+I,GAArB,EAA0Bic,UAAUzlB,GAApC;;KAJJ,MAMO,IAAI0U,QAAQ,KAAKvb,IAAL,CAAUizB,mBAAtB,EAA2C;;eAEvC,KAAKqmB,YAAL,CAAkBZ,YAAlB,CAA+BxoC,MAAMu0B,IAArC,EAA2ClpB,KAAK2vB,YAAhD,CAAT;;;SAGG3vB,IAAL,CAAUlc,IAAV,CAAeI,MAAf;SACKwG,IAAL,CAAUC,OAAV,CAAkB7G,IAAlB,CAAuB,KAAK8H,MAA5B;;SAEK+T,IAAL,CAAU+rB,OAAV,CAAkB5nC,IAAlB,CAAuB;eACZ6Q,MAAMqsB,YADM;eAEZrsB,MAAMm3B,WAAN,GAAoBE;KAF/B;;SAKKpgC,MAAL,IAAe1H,OAAOU,MAAtB;WACO,KAAKob,IAAL,CAAUpb,MAAV,GAAmB,CAA1B;;;sBAGFkH,yBAAO3C,QAAQ;;;;;;;SAOR6W,IAAL,GAAY,EAAZ;SACKpU,MAAL,GAAc,CAAd;SACKlB,IAAL,GAAY;eACD;KADX;;SAIKiV,IAAL,GAAY;eACD,EADC;gBAEA;KAFZ;;;;;QAQIhb,IAAI,CAAR;WACOA,IAAI,KAAKqQ,MAAL,CAAYpQ,MAAvB,EAA+B;WACxBo5C,SAAL,CAAe,KAAKhpC,MAAL,CAAYrQ,GAAZ,CAAf;;;QAGEuD,OAAOi2C,UAAU,KAAK15C,IAAL,CAAUyD,IAApB,CAAX;SACKC,SAAL,GAAiB,KAAK6X,IAAL,CAAUpb,MAA3B;;SAEK8F,IAAL,CAAUC,OAAV,CAAkB7G,IAAlB,CAAuB,KAAK8H,MAA5B;WACOlB,IAAP,CAAYd,SAAZ,CAAsBpE,IAAtB,CAA2B,KAAKkF,IAAhC;;QAEIgV,OAAOy+B,UAAU,KAAK15C,IAAL,CAAUib,IAApB,CAAX;SACK0+B,gBAAL,GAAwB,KAAK1zC,IAAL,CAAUZ,OAAlC;;QAEI9B,OAAOm2C,UAAU,KAAK15C,IAAL,CAAUuD,IAApB,CAAX;SACKC,eAAL,GAAuB,KAAK0X,IAAL,CAAU+rB,OAAV,CAAkB9mC,MAAzC;;;;;;;;;;;;;;;;;;;;;;;;;cAyBUkH,MAAV,CAAiB3C,MAAjB,EAAyB;cACf;kBAAA;kBAAA;cAGA,KAAKuB,IAHL;kBAAA;gBAKE,KAAKjG,IAAL,CAAU,MAAV,CALF;cAMA,KAAKA,IAAL,CAAUqb,IANV;cAOA,KAAKE,IAPL;cAQA,KAAKL,IARL;cASA,KAAKlb,IAAL,CAAUob;;;;;;;KAVpB;;;;EAxGmC88B;;ICDlB0B;;;qBACP55C,IAAZ,EAAkB;;;iDAChB,mBAAMA,IAAN,CADgB;;UAGXgtC,GAAL,GAAW,MAAKhtC,IAAL,CAAU,MAAV,CAAX;QACI,CAAC,MAAKgtC,GAAV,EAAe;YACP,IAAIxsC,KAAJ,CAAU,gBAAV,CAAN;;;;;sBAIJq5C,iDAAoB;SACbC,WAAL,GAAmB,EAAnB;QACIvM,SAAS,EAAb;;yBAEgB,KAAKh9B,MAArB,6GAA6B;;;;;;;;;;;;UAApBF,GAAoB;;WACtBypC,WAAL,CAAiBz6C,IAAjB,CAAsB,KAAK2tC,GAAL,CAAS/8B,aAAT,CAAuBI,GAAvB,CAAtB;;UAEIH,QAAQ,KAAKlQ,IAAL,CAAUwrB,QAAV,CAAmBnb,GAAnB,CAAZ;UACIo0B,OAAOv0B,MAAMu0B,IAAjB,CAJ2B;;WAMtB,IAAIoK,IAAT,IAAiB3+B,MAAMm9B,WAAvB,EAAoC;eAC3BwB,IAAP,IAAe,IAAf;;;;SAICtB,MAAL,GAAc,KAAKwM,WAAL,CAAiB,KAAK/M,GAAL,CAASQ,eAA1B,EAA2CD,MAA3C,CAAd;;;sBAGFwM,mCAAYpM,OAAOqM,MAAM;QACnBzrC,MAAM,EAAV;SACK,IAAIrO,IAAI,CAAb,EAAgBA,IAAIytC,MAAMxtC,MAA1B,EAAkCD,GAAlC,EAAuC;UACjC2uC,OAAOlB,MAAMztC,CAAN,CAAX;UACI85C,KAAK95C,CAAL,CAAJ,EAAa;aACN8sC,GAAL,CAAStoC,MAAT,CAAgBmC,GAAhB,GAAsBgoC,KAAK1nC,MAA3B;YACI9H,IAAJ,CAAS,KAAK2tC,GAAL,CAAStoC,MAAT,CAAgByL,UAAhB,CAA2B0+B,KAAK1uC,MAAhC,CAAT;OAFF,MAGO;YACDd,IAAJ,CAAS,IAAImG,MAAJ,CAAW,CAAC,EAAD,CAAX,CAAT,EADK;;;;WAKF+I,GAAP;;;sBAGF0rC,yCAAetqC,SAAS;YACdsB,OAAR,GAAkB,EAAlB;YACQlC,QAAR,GAAmB;eACR,CADQ;WAEZ;KAFP;;QAKImrC,WAAW,EAAf;QACIC,aAAa,EAAjB;0BACgB,KAAK5pC,MAArB,oHAA6B;;;;;;;;;;;;UAApBF,GAAoB;;UACvBU,KAAK,KAAKi8B,GAAL,CAASt8B,UAAT,CAAoBL,GAApB,CAAT;UACIU,MAAM,IAAV,EAAgB;;;;UAIZ,CAACmpC,SAASnpC,EAAT,CAAL,EAAmB;gBACTE,OAAR,CAAgB5R,IAAhB,CAAqB,eAAc,EAAd,EAAkB,KAAK2tC,GAAL,CAASr9B,OAAT,CAAiBsB,OAAjB,CAAyBF,EAAzB,CAAlB,CAArB;mBACW1R,IAAX,CAAgB,EAAhB;;;eAGO0R,EAAT,IAAe,IAAf;cACQhC,QAAR,CAAiB4B,GAAjB,CAAqBtR,IAArB,CAA0BsQ,QAAQsB,OAAR,CAAgB9Q,MAAhB,GAAyB,CAAnD;;UAEI+P,QAAQ,KAAKlQ,IAAL,CAAUwrB,QAAV,CAAmBnb,GAAnB,CAAZ;UACIo0B,OAAOv0B,MAAMu0B,IAAjB,CAf2B;WAgBtB,IAAIoK,IAAT,IAAiB3+B,MAAMo9B,UAAvB,EAAmC;mBACtB6M,WAAWh6C,MAAX,GAAoB,CAA/B,EAAkC0uC,IAAlC,IAA0C,IAA1C;;;;SAIC,IAAI3uC,IAAI,CAAb,EAAgBA,IAAIyP,QAAQsB,OAAR,CAAgB9Q,MAApC,EAA4CD,GAA5C,EAAiD;UAC3CoJ,OAAOqG,QAAQsB,OAAR,CAAgB/Q,CAAhB,CAAX;aACOoJ,KAAK8wC,QAAZ;UACI9wC,KAAK4H,OAAL,IAAgB5H,KAAK4H,OAAL,CAAa08B,KAAjC,EAAwC;aACjC18B,OAAL,GAAe,eAAc,EAAd,EAAkB5H,KAAK4H,OAAvB,CAAf;aACKA,OAAL,CAAa08B,KAAb,GAAqB,KAAKmM,WAAL,CAAiBzwC,KAAK4H,OAAL,CAAa08B,KAA9B,EAAqCuM,WAAWj6C,CAAX,CAArC,CAArB;;;;;;;sBAONm6C,+CAAkB1qC,SAAS;QACrBwqC,aAAa,EAAjB;0BACgB,KAAK5pC,MAArB,oHAA6B;;;;;;;;;;;;UAApBF,GAAoB;;UACvBH,QAAQ,KAAKlQ,IAAL,CAAUwrB,QAAV,CAAmBnb,GAAnB,CAAZ;UACIo0B,OAAOv0B,MAAMu0B,IAAjB,CAF2B;;WAItB,IAAIoK,IAAT,IAAiB3+B,MAAMo9B,UAAvB,EAAmC;mBACtBuB,IAAX,IAAmB,IAAnB;;;;QAIAnB,cAAc,eAAc,EAAd,EAAkB,KAAKV,GAAL,CAASr9B,OAAT,CAAiBuB,OAAnC,CAAlB;gBACY08B,KAAZ,GAAoB,KAAKmM,WAAL,CAAiB,KAAK/M,GAAL,CAASr9B,OAAT,CAAiBuB,OAAjB,CAAyB08B,KAA1C,EAAiDuM,UAAjD,CAApB;;YAEQlpC,OAAR,GAAkB,CAAC,EAAEC,SAASw8B,WAAX,EAAD,CAAlB;WACO/9B,QAAQZ,QAAR,GAAmB;eACf,CADe;eAEf,CAFe;cAGhB,CAAC,EAAE0B,OAAO,CAAT,EAAYM,IAAI,CAAhB,EAAD,CAHgB;gBAId,KAAK+oC,WAAL,CAAiB35C;KAJ7B;;;sBAQFm6C,+BAAUp1C,QAAQ;QACZ,CAACA,MAAL,EAAa;aACJ,IAAP;;;QAGE,CAAC,KAAKopB,OAAV,EAAmB;WACZA,OAAL,GAAe,EAAf;;;SAGGA,OAAL,CAAajvB,IAAb,CAAkB6F,MAAlB;WACO6K,gBAAgB5P,MAAhB,GAAyB,KAAKmuB,OAAL,CAAanuB,MAAtC,GAA+C,CAAtD;;;sBAGFkH,yBAAO3C,QAAQ;SACRm1C,iBAAL;;QAEIvpC,UAAU;eACH,KAAKwpC,WAAL,CAAiB35C,MAAjB,GAA0B,GAA1B,GAAgC,CAAhC,GAAoC,CADjC;cAEJ,CAAC,EAAEsQ,OAAO,CAAT,EAAYhC,OAAO,KAAKqrC,WAAL,CAAiB35C,MAAjB,GAA0B,CAA7C,EAAD;KAFV;;QAKIwP,UAAU,eAAc,EAAd,EAAkB,KAAKq9B,GAAL,CAASr9B,OAA3B,CAAd;YACQuB,OAAR,GAAkB,IAAlB;YACQZ,OAAR,GAAkBA,OAAlB;YACQiqC,QAAR,GAAmB,IAAnB;YACQ5rC,WAAR,GAAsB,KAAKmrC,WAA3B;;eAEgB,CAAC,SAAD,EAAY,QAAZ,EAAsB,WAAtB,EAAmC,UAAnC,EAA+C,YAA/C,EAA6D,QAA7D,EAAuE,YAAvE,EAAqF,cAArF,EAAqG,UAArG,CAdH;gDAcqH;UAAzHn5C,eAAJ;cACKA,GAAR,IAAe,KAAK25C,SAAL,CAAe,KAAKtN,GAAL,CAAS9nC,MAAT,CAAgByK,QAAQhP,GAAR,CAAhB,CAAf,CAAf;;;YAGMkP,GAAR,GAAc,CAAC,KAAKyqC,SAAL,CAAe,OAAf,CAAD,EAA0B,KAAKA,SAAL,CAAe,UAAf,CAA1B,EAAsD,CAAtD,CAAd;YACQE,QAAR,GAAmB,KAAKV,WAAL,CAAiB35C,MAApC;;QAEI,KAAK6sC,GAAL,CAASp9B,SAAb,EAAwB;WACjBqqC,cAAL,CAAoBtqC,OAApB;KADF,MAEO;WACA0qC,iBAAL,CAAuB1qC,OAAvB;;;QAGEF,MAAM;eACC,CADD;eAEC,KAAKu9B,GAAL,CAAS1mC,OAFV;eAGC,KAAK0mC,GAAL,CAAS7sC,MAHV;cAIA,KAAK6sC,GAAL,CAASyN,MAJT;iBAKG,CAAC,KAAKzN,GAAL,CAASxtC,cAAV,CALH;oBAMM,CAACmQ,OAAD,CANN;mBAOK,KAAK2e,OAPV;uBAQS,KAAKif;KARxB;;WAWOlmC,MAAP,CAAc3C,MAAd,EAAsB+K,GAAtB;;;;EA/JmCyoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACLvC,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AACA,AAEA;;;;IAIqBwC;UACZt6C,uBAAMX,QAAQ;QACfL,SAASK,OAAOk7C,QAAP,CAAgB,OAAhB,EAAyB,CAAzB,EAA4B,CAA5B,CAAb;WACOv7C,WAAW,MAAX,IAAqBA,WAAW,MAAhC,IAA0CA,WAAW+E,OAAOmkC,YAAP,CAAoB,CAApB,EAAuB,CAAvB,EAA0B,CAA1B,EAA6B,CAA7B,CAA5D;;;mBAGU5jC,MAAZ,EAA4C;QAAxBk2C,eAAwB,uEAAN,IAAM;;;;SACrCl2C,MAAL,GAAcA,MAAd;SACKk2C,eAAL,GAAuBA,eAAvB;;SAEKC,aAAL,GAAqB,KAAKn2C,MAAL,CAAYmC,GAAjC;SACKi0C,OAAL,GAAe,EAAf;SACKC,OAAL,GAAe,EAAf;SACKC,gBAAL;;;SAGK,IAAIj2C,GAAT,IAAgB,KAAKgnC,SAAL,CAAehxB,MAA/B,EAAuC;UACjCsC,QAAQ,KAAK0uB,SAAL,CAAehxB,MAAf,CAAsBhW,GAAtB,CAAZ;UACIgW,OAAOhW,GAAP,KAAesY,MAAMld,MAAN,GAAe,CAAlC,EAAqC;+BACb,IAAtB,EAA4B4E,GAA5B,EAAiC;eAC1B,KAAKk2C,SAAL,CAAepxB,IAAf,CAAoB,IAApB,EAA0BxM,KAA1B;SADP;;;;;oBAON49B,+BAAU59B,OAAO;QACX,EAAEA,MAAMtY,GAAN,IAAa,KAAK+1C,OAApB,CAAJ,EAAkC;UAC5B;aACGA,OAAL,CAAaz9B,MAAMtY,GAAnB,IAA0B,KAAKm2C,YAAL,CAAkB79B,KAAlB,CAA1B;OADF,CAEE,OAAOpd,CAAP,EAAU;YACNjB,QAAQC,SAAZ,EAAuB;kBACbk8C,KAAR,2BAAsC99B,MAAMtY,GAA5C;kBACQo2C,KAAR,CAAcl7C,EAAEmtB,KAAhB;;;;;WAKC,KAAK0tB,OAAL,CAAaz9B,MAAMtY,GAAnB,CAAP;;;oBAGFmlC,2CAAgBnlC,KAAK;QACfsY,QAAQ,KAAK0uB,SAAL,CAAehxB,MAAf,CAAsBhW,GAAtB,CAAZ;QACIsY,KAAJ,EAAW;WACJ3Y,MAAL,CAAYmC,GAAZ,GAAkBwW,MAAMlW,MAAxB;aACO,KAAKzC,MAAZ;;;WAGK,IAAP;;;oBAGFs2C,+CAAmB;WACV,KAAKjP,SAAL,GAAiB3uB,UAAU7W,MAAV,CAAiB,KAAK7B,MAAtB,EAA8B,EAACmP,cAAc,CAAf,EAA9B,CAAxB;;;oBAGFqnC,qCAAa79B,OAAO;QACdxW,MAAM,KAAKnC,MAAL,CAAYmC,GAAtB;;QAEInC,SAAS,KAAKwlC,eAAL,CAAqB7sB,MAAMtY,GAA3B,CAAb;QACI3D,SAAS2Z,OAAOsC,MAAMtY,GAAb,EAAkBwB,MAAlB,CAAyB7B,MAAzB,EAAiC,IAAjC,EAAuC2Y,MAAMld,MAA7C,CAAb;;SAEKuE,MAAL,CAAYmC,GAAZ,GAAkBA,GAAlB;WACOzF,MAAP;;;;;;;;;;;;;;oBAkBFg6C,2BAAQz6C,KAAkB;QAAb+yB,IAAa,uEAAN,IAAM;;QACpB9uB,SAAS,KAAKgT,IAAL,CAAUjT,OAAV,CAAkBhE,GAAlB,CAAb;QACIiE,MAAJ,EAAY;aACHA,OAAO8uB,IAAP,CAAP;;;WAGK,IAAP;;;;;;;;;;;;;;;oBA4JF4F,qDAAqBhV,WAAW;WACvB,CAAC,CAAC,KAAKiK,cAAL,CAAoB7P,MAApB,CAA2B4F,SAA3B,CAAT;;;;;;;;;;;;oBAUFqX,+CAAkBrX,WAAW;WACpB,KAAKkH,QAAL,CAAc,KAAK+C,cAAL,CAAoB7P,MAApB,CAA2B4F,SAA3B,CAAd,EAAqD,CAACA,SAAD,CAArD,CAAP;;;;;;;;;;;;;;oBAYFof,2CAAgBx+B,QAAQ;QAClBqL,SAAS,EAAb;QACI9G,MAAMvE,OAAO/E,MAAjB;QACI+kB,MAAM,CAAV;QACI8G,OAAO,CAAC,CAAZ;QACIxD,QAAQ,CAAC,CAAb;;WAEOtD,OAAOzb,GAAd,EAAmB;UACb0b,OAAO,CAAX;UACIk2B,YAAY,CAAhB;;UAEIn2B,MAAMzb,GAAV,EAAe;;eAENvE,OAAOkgB,UAAP,CAAkBF,KAAlB,CAAP;YACI,UAAUC,IAAV,IAAkBA,QAAQ,MAA1B,IAAoCD,MAAMzb,GAA9C,EAAmD;cAC7C4b,OAAOngB,OAAOkgB,UAAP,CAAkBF,GAAlB,CAAX;cACI,UAAUG,IAAV,IAAkBA,QAAQ,MAA9B,EAAsC;;mBAE7B,CAAC,CAACF,OAAO,KAAR,KAAkB,EAAnB,KAA0BE,OAAO,KAAjC,IAA0C,OAAjD;;;;;oBAKU,UAAUF,IAAV,IAAkBA,QAAQ,MAA3B,IAAuC,WAAWA,IAAX,IAAmBA,QAAQ,OAAnE,GAA+E,CAA/E,GAAmF,CAA/F;OAZF,MAaO;;;;UAIHqD,UAAU,CAAV,IAAe6yB,cAAc,CAAjC,EAAoC;;eAE3Bh8C,IAAP,CAAY,KAAKmsB,QAAL,CAAc,KAAK+C,cAAL,CAAoB7P,MAApB,CAA2BsN,IAA3B,EAAiC7G,IAAjC,CAAd,EAAsD,CAAC6G,IAAD,EAAO7G,IAAP,CAAtD,CAAZ;OAFF,MAGO,IAAIqD,UAAU,CAAV,IAAe6yB,cAAc,CAAjC,EAAoC;;eAElCh8C,IAAP,CAAY,KAAKs8B,iBAAL,CAAuB3P,IAAvB,CAAZ;;;aAGK7G,IAAP;cACQk2B,SAAR;;;WAGK9qC,MAAP;;;;;;;;;;;;oBAiBFkzB,yBAAOv+B,QAAQgrB,cAAc5K,QAAQzgB,UAAU;WACtC,KAAKy2C,aAAL,CAAmB7X,MAAnB,CAA0Bv+B,MAA1B,EAAkCgrB,YAAlC,EAAgD5K,MAAhD,EAAwDzgB,QAAxD,CAAP;;;;;;;;;oBAOFspB,2CAAgB9d,KAAK;WACZ,KAAKirC,aAAL,CAAmBntB,eAAnB,CAAmC9d,GAAnC,CAAP;;;;;;;;;;;;;oBAeF2hC,uCAAc9hC,OAAwB;QAAjB4uB,UAAiB,uEAAJ,EAAI;;QAChC,CAAC,KAAKic,OAAL,CAAa7qC,KAAb,CAAL,EAA0B;UACpB,KAAK67B,SAAL,CAAehxB,MAAf,CAAsBQ,IAA1B,EAAgC;aACzBw/B,OAAL,CAAa7qC,KAAb,IAAsB,IAAI85B,QAAJ,CAAa95B,KAAb,EAAoB4uB,UAApB,EAAgC,IAAhC,CAAtB;OADF,MAGO,IAAI,KAAKiN,SAAL,CAAehxB,MAAf,CAAsB,MAAtB,KAAiC,KAAKgxB,SAAL,CAAehxB,MAAf,CAAsB+xB,IAA3D,EAAiE;aACjEiO,OAAL,CAAa7qC,KAAb,IAAsB,IAAI28B,QAAJ,CAAa38B,KAAb,EAAoB4uB,UAApB,EAAgC,IAAhC,CAAtB;;;;WAIG,KAAKic,OAAL,CAAa7qC,KAAb,KAAuB,IAA9B;;;;;;;;;;;;;;oBAYFsb,6BAAStb,OAAwB;QAAjB4uB,UAAiB,uEAAJ,EAAI;;QAC3B,CAAC,KAAKic,OAAL,CAAa7qC,KAAb,CAAL,EAA0B;UACpB,KAAK67B,SAAL,CAAehxB,MAAf,CAAsBY,IAA1B,EAAgC;aACzBo/B,OAAL,CAAa7qC,KAAb,IAAsB,IAAIogC,SAAJ,CAAcpgC,KAAd,EAAqB4uB,UAArB,EAAiC,IAAjC,CAAtB;OADF,MAGO,IAAK,KAAKiN,SAAL,CAAehxB,MAAf,CAAsBa,IAAvB,IAAiC,KAAKmwB,SAAL,CAAehxB,MAAf,CAAsBc,IAA3D,EAAkE;aAClEk/B,OAAL,CAAa7qC,KAAb,IAAsB,IAAIihC,SAAJ,CAAcjhC,KAAd,EAAqB4uB,UAArB,EAAiC,IAAjC,CAAtB;OADK,MAGA;aACAkT,aAAL,CAAmB9hC,KAAnB,EAA0B4uB,UAA1B;;;;WAIG,KAAKic,OAAL,CAAa7qC,KAAb,KAAuB,IAA9B;;;;;;;;;oBAOFqrC,uCAAe;QACT,KAAKxP,SAAL,CAAehxB,MAAf,CAAsB,MAAtB,CAAJ,EAAmC;aAC1B,IAAI6+B,SAAJ,CAAc,IAAd,CAAP;;;WAGK,IAAIP,SAAJ,CAAc,IAAd,CAAP;;;;;;;;;;;;;;;;;;;;oBAgEFmC,qCAAaC,UAAU;QACjB,EAAE,KAAK1P,SAAL,CAAehxB,MAAf,CAAsBgC,IAAtB,KAAgC,KAAKgvB,SAAL,CAAehxB,MAAf,CAAsBlB,IAAtB,IAA8B,KAAKkyB,SAAL,CAAehxB,MAAf,CAAsBQ,IAArD,IAA8D,KAAKwwB,SAAL,CAAehxB,MAAf,CAAsB+xB,IAAnH,CAAF,CAAJ,EAAiI;YACzH,IAAItsC,KAAJ,CAAU,yEAAV,CAAN;;;QAGE,OAAOi7C,QAAP,KAAoB,QAAxB,EAAkC;iBACrB,KAAKC,eAAL,CAAqBD,QAArB,CAAX;;;QAGE,QAAOA,QAAP,yCAAOA,QAAP,OAAoB,QAAxB,EAAkC;YAC1B,IAAIj7C,KAAJ,CAAU,wEAAV,CAAN;;;;QAIEu0B,SAAS,KAAKhY,IAAL,CAAUs2B,IAAV,CAAenqC,GAAf,CAAmB,UAACmqC,IAAD,EAAOnzC,CAAP,EAAa;UACvCy7C,UAAUtI,KAAKsI,OAAL,CAAaC,IAAb,EAAd;UACID,WAAWF,QAAf,EAAyB;eAChB/4C,KAAKC,GAAL,CAAS0wC,KAAKE,QAAd,EAAwB7wC,KAAKub,GAAL,CAASo1B,KAAKG,QAAd,EAAwBiI,SAASE,OAAT,CAAxB,CAAxB,CAAP;OADF,MAEO;eACEtI,KAAKC,YAAZ;;KALS,CAAb;;QASI5uC,SAAS,IAAIrE,EAAEC,YAAN,CAAmB,KAAKoE,MAAL,CAAYjF,MAA/B,CAAb;WACOoH,GAAP,GAAa,KAAKg0C,aAAlB;;QAEI76C,OAAO,IAAI06C,OAAJ,CAAYh2C,MAAZ,EAAoBqwB,MAApB,CAAX;SACK+lB,OAAL,GAAe,KAAKA,OAApB;;WAEO96C,IAAP;;;;oBAwBFO,2BAAQqX,MAAM;WACL,KAAK4jC,YAAL,CAAkB5jC,IAAlB,CAAP;;;;;wBA3bmB;UACfA,OAAO,KAAKA,IAAL,CAAUjT,OAAV,CAAkBnF,cAA7B;UACIk0B,OAAO,aAAY9b,IAAZ,EAAkB,CAAlB,CAAX;aACOA,KAAK8b,IAAL,CAAP;;;;wBAqBa;aACN,KAAK0nB,OAAL,CAAa,UAAb,CAAP;;;;;;;;;;wBAOe;aACR,KAAKA,OAAL,CAAa,YAAb,CAAP;;;;;;;;;;wBAOkB;aACX,KAAKA,OAAL,CAAa,eAAb,CAAP;;;;;;;;;;wBAOc;aACP,KAAKA,OAAL,CAAa,WAAb,CAAP;;;;;;;;;;wBAOY;aACL,KAAKA,OAAL,CAAa,SAAb,CAAP;;;;;;;;;;wBAOW;aACJ,KAAK73C,IAAL,CAAUukC,MAAjB;;;;;;;;;;wBAOY;aACL,KAAKvkC,IAAL,CAAUwkC,OAAjB;;;;;;;;;;wBAOY;aACL,KAAKxkC,IAAL,CAAUs4C,OAAjB;;;;;;;;;;wBAOsB;aACf,KAAK1gC,IAAL,CAAU2gC,iBAAjB;;;;;;;;;;wBAOuB;aAChB,KAAK3gC,IAAL,CAAU4gC,kBAAjB;;;;;;;;;;wBAOgB;aACT,KAAK5gC,IAAL,CAAU6gC,WAAjB;;;;;;;;;;;wBAQc;UACVrU,MAAM,KAAK,MAAL,CAAV;aACOA,MAAMA,IAAIsU,SAAV,GAAsB,KAAKnU,MAAlC;;;;;;;;;;;wBAQY;UACRH,MAAM,KAAK,MAAL,CAAV;aACOA,MAAMA,IAAIuU,OAAV,GAAoB,CAA3B;;;;;;;;;;wBAOc;aACP,KAAKz4C,IAAL,CAAUC,SAAjB;;;;;;;;;;wBAOe;aACR,KAAKuX,IAAL,CAAU0I,UAAjB;;;;;;;;;;wBAQS;aACF,eAAc,IAAIa,IAAJ,CAAS,KAAKvJ,IAAL,CAAUkvB,IAAnB,EAAyB,KAAKlvB,IAAL,CAAUmvB,IAAnC,EAAyC,KAAKnvB,IAAL,CAAUovB,IAAnD,EAAyD,KAAKpvB,IAAL,CAAUqvB,IAAnE,CAAd,CAAP;;;;wBAImB;aACZ,IAAInsB,aAAJ,CAAkB,KAAKnD,IAAvB,CAAP;;;;;;;;;;wBAQiB;aACV,KAAKuT,cAAL,CAAoB7N,eAApB,EAAP;;;;wBA6EkB;aACX,IAAI2iB,YAAJ,CAAiB,IAAjB,CAAP;;;;wBAgCsB;aACf,KAAKiY,aAAL,CAAmBptB,oBAAnB,EAAP;;;;wBA6DkB;UACd3f,MAAM,EAAV;UACI,CAAC,KAAKwO,IAAV,EAAgB;eACPxO,GAAP;;;2BAGe,KAAKwO,IAAL,CAAUs2B,IAA3B,6GAAiC;;;;;;;;;;;;YAAxBA,IAAwB;;YAC3BA,KAAKsI,OAAL,CAAaC,IAAb,EAAJ,IAA2B;gBACnBvI,KAAKz7B,IAAL,CAAUlS,EADS;eAEpB2tC,KAAKE,QAFe;mBAGhBF,KAAKC,YAHW;eAIpBD,KAAKG;SAJZ;;;aAQKjlC,GAAP;;;;;;;;;;;;;wBAWoB;UAChBA,MAAM,EAAV;UACI,CAAC,KAAKwO,IAAV,EAAgB;eACPxO,GAAP;;;4BAGmB,KAAKwO,IAAL,CAAUo/B,QAA/B,oHAAyC;;;;;;;;;;;;YAAhCA,QAAgC;;YACnCV,WAAW,EAAf;aACK,IAAIv7C,IAAI,CAAb,EAAgBA,IAAI,KAAK6c,IAAL,CAAUs2B,IAAV,CAAelzC,MAAnC,EAA2CD,GAA3C,EAAgD;cAC1CmzC,OAAO,KAAKt2B,IAAL,CAAUs2B,IAAV,CAAenzC,CAAf,CAAX;mBACSmzC,KAAKsI,OAAL,CAAaC,IAAb,EAAT,IAAgCO,SAAS7mB,KAAT,CAAep1B,CAAf,CAAhC;;;YAGEi8C,SAASvkC,IAAT,CAAclS,EAAlB,IAAwB+1C,QAAxB;;;aAGKltC,GAAP;;;;wBA4CwB;UACpB,CAAC,KAAKwO,IAAV,EAAgB;eACP,IAAP;;;UAGE69B,kBAAkB,KAAKA,eAA3B;;;UAGI,CAACA,eAAD,IAAoB,CAAC,KAAK9N,IAA9B,EAAoC;eAC3B,IAAP;;;UAGE,CAAC8N,eAAL,EAAsB;0BACF,KAAK79B,IAAL,CAAUs2B,IAAV,CAAenqC,GAAf,CAAmB;iBAAQmqC,KAAKC,YAAb;SAAnB,CAAlB;;;aAGK,IAAIL,uBAAJ,CAA4B,IAA5B,EAAkC2H,eAAlC,CAAP;;;;;2DAlSDn6C,sJAKAA,8JASAA,6JA8EAA,8JA+FAA,gKA0BAA,sKA4DAA;;AC3fH,IAAI27C,qBAAqB,IAAI/7C,EAAEmB,MAAN,CAAa;OACtB,IAAInB,EAAE8D,MAAN,CAAa,CAAb,CADsB;UAEtB,IAAI9D,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwB,MAAxB,EAAgC,EAACU,MAAM,QAAP,EAAhC,CAFsB;cAGtBjC,EAAEuB,MAHoB;UAItBvB,EAAEuB,MAJoB;gBAKtBvB,EAAEuB;CALO,CAAzB;;AAQA,IAAIy6C,gBAAgB,IAAIh8C,EAAEmB,MAAN,CAAa;OACf,IAAInB,EAAE8D,MAAN,CAAa,CAAb,CADe;UAEf9D,EAAEuB,MAFa;UAGfvB,EAAEuB,MAHa;aAIfvB,EAAEoB,MAJa;YAKf,IAAIpB,EAAE0C,QAAN,CAAe1C,EAAEoB,MAAjB,CALe;iBAMfpB,EAAEuB,MANa;gBAOfvB,EAAEoB,MAPa;gBAQfpB,EAAEoB,MARa;cASfpB,EAAEuB,MATa;cAUfvB,EAAEuB,MAVa;kBAWfvB,EAAEuB,MAXa;cAYfvB,EAAEuB,MAZa;cAafvB,EAAEuB,MAba;UAcf,IAAIvB,EAAE6B,KAAN,CAAYk6C,kBAAZ,EAAgC,WAAhC;CAdE,CAApB;;AAiBAC,cAAc53C,OAAd,GAAwB,YAAW;MAC7BsW,SAAS,EAAb;uBACkB,KAAKA,MAAvB,6GAA+B;;;;;;;;;;;;QAAtBsC,KAAsB;;WACtBA,MAAMtY,GAAb,IAAoBsY,KAApB;;;OAGGtC,MAAL,GAAcA,MAAd;CANF,CASA;;IC/BqBuhC;;;;;;;;;WACZl8C,uBAAMX,QAAQ;WACZA,OAAOk7C,QAAP,CAAgB,OAAhB,EAAyB,CAAzB,EAA4B,CAA5B,MAAmC,MAA1C;;;qBAGFK,+CAAmB;SACZjP,SAAL,GAAiBsQ,cAAc91C,MAAd,CAAqB,KAAK7B,MAA1B,EAAkC,EAAEmP,cAAc,CAAhB,EAAlC,CAAjB;;;qBAGFq2B,2CAAgBnlC,KAAK;QACfsY,QAAQ,KAAK0uB,SAAL,CAAehxB,MAAf,CAAsBhW,GAAtB,CAAZ;QACIsY,KAAJ,EAAW;WACJ3Y,MAAL,CAAYmC,GAAZ,GAAkBwW,MAAMlW,MAAxB;;UAEIkW,MAAMk/B,UAAN,GAAmBl/B,MAAMld,MAA7B,EAAqC;aAC9BuE,MAAL,CAAYmC,GAAZ,IAAmB,CAAnB,CADmC;YAE/B21C,YAAY,IAAIh3C,MAAJ,CAAW6X,MAAMld,MAAjB,CAAhB;YACI0e,MAAM49B,QAAQ,KAAK/3C,MAAL,CAAYyL,UAAZ,CAAuBkN,MAAMk/B,UAAN,GAAmB,CAA1C,CAAR,EAAsDC,SAAtD,CAAV;eACO,IAAIn8C,EAAEC,YAAN,CAAmBue,GAAnB,CAAP;OAJF,MAKO;eACE,KAAKna,MAAZ;;;;WAIG,IAAP;;;;EAxBkCg2C;;ACJtC;;;;IAGqBgC;;;;;;;;;uBACnBhS,6BAAU;;WAED,KAAKjS,KAAL,CAAWkkB,kBAAX,CAA8B,KAAKt7B,EAAnC,CAAP;;;uBAGFylB,+BAAW;WACF,KAAKrC,IAAL,CAAU5f,IAAjB;;;;EAPoCmlB;;ACHxC,IAAM4S,UAAU;QAAA,kBACPl4C,MADO,EACC;QACTtD,SAAS,CAAb;QACIg1C,WAAW,CAAC,CAAD,EAAI,CAAJ,EAAO,CAAP,EAAU,CAAV,EAAa,CAAb,CAAf;SACK,IAAIxY,IAAI,CAAb,EAAgBA,IAAIwY,SAASj2C,MAA7B,EAAqCy9B,GAArC,EAA0C;UACpC19B,IAAIk2C,SAASxY,CAAT,CAAR;UACIzY,OAAOzgB,OAAOiC,SAAP,EAAX;;;UAGIvF,SAAS,UAAb,EAAyB;cACjB,IAAIZ,KAAJ,CAAU,UAAV,CAAN;;;eAGQY,UAAU,CAAX,GAAiB+jB,OAAO,IAAjC;UACI,CAACA,OAAO,IAAR,MAAkB,CAAtB,EAAyB;eAChB/jB,MAAP;;;;UAIE,IAAIZ,KAAJ,CAAU,qBAAV,CAAN;;CAnBJ;;AAuBA,IAAIq8C,YAAY,CACd,MADc,EACN,MADM,EACE,MADF,EACU,MADV,EACkB,MADlB,EAC0B,MAD1B,EACkC,MADlC,EAC0C,MAD1C,EACkD,MADlD,EAEd,MAFc,EAEN,MAFM,EAEE,MAFF,EAEU,MAFV,EAEkB,MAFlB,EAE0B,MAF1B,EAEkC,MAFlC,EAE0C,MAF1C,EAEkD,MAFlD,EAGd,MAHc,EAGN,MAHM,EAGE,MAHF,EAGU,MAHV,EAGkB,MAHlB,EAG0B,MAH1B,EAGkC,MAHlC,EAG0C,MAH1C,EAGkD,MAHlD,EAId,MAJc,EAIN,MAJM,EAIE,MAJF,EAIU,MAJV,EAIkB,MAJlB,EAI0B,MAJ1B,EAIkC,MAJlC,EAI0C,MAJ1C,EAIkD,MAJlD,EAKd,MALc,EAKN,MALM,EAKE,MALF,EAKU,MALV,EAKkB,MALlB,EAK0B,MAL1B,EAKkC,MALlC,EAK0C,MAL1C,EAKkD,MALlD,EAMd,MANc,EAMN,MANM,EAME,MANF,EAMU,MANV,EAMkB,MANlB,EAM0B,MAN1B,EAMkC,MANlC,EAM0C,MAN1C,EAMkD,MANlD,EAOd,MAPc,EAON,MAPM,EAOE,MAPF,EAOU,MAPV,EAOkB,MAPlB,EAO0B,MAP1B,EAOkC,MAPlC,EAO0C,MAP1C,EAOkD,MAPlD,CAAhB;;AAUA,IAAIC,sBAAsB,IAAIz8C,EAAEmB,MAAN,CAAa;SAC9BnB,EAAE0B,KAD4B;aAE1B,IAAI1B,EAAE08C,QAAN,CAAe,IAAI18C,EAAE8D,MAAN,CAAa,CAAb,CAAf,EAAgC;WAAK,CAACvB,EAAEgX,KAAF,GAAU,IAAX,MAAqB,IAA1B;GAAhC,CAF0B;OAGhC;WAAKhX,EAAEo6C,SAAF,IAAeH,UAAUj6C,EAAEgX,KAAF,GAAU,IAApB,CAApB;GAHgC;UAI7BgjC,OAJ6B;oBAKnB;WAAMh6C,EAAEgX,KAAF,KAAY,CAAb,GAAkB,IAAvB;GALmB;eAMxB;WAAMhX,EAAEmC,GAAF,KAAU,MAAV,IAAoBnC,EAAEmC,GAAF,KAAU,MAA/B,GAAyCnC,EAAEq6C,gBAAF,KAAuB,CAAhE,GAAoEr6C,EAAEq6C,gBAAF,KAAuB,CAAhG;GANwB;mBAOpB,IAAI58C,EAAE08C,QAAN,CAAeH,OAAf,EAAwB;WAAKh6C,EAAEs6C,WAAP;GAAxB;CAPO,CAA1B;;AAUA,IAAIC,iBAAiB,IAAI98C,EAAEmB,MAAN,CAAa;OAC3B,IAAInB,EAAE8D,MAAN,CAAa,CAAb,CAD2B;UAExB9D,EAAEuB,MAFsB;UAGxBvB,EAAEuB,MAHsB;aAIrBvB,EAAEoB,MAJmB;YAKtB,IAAIpB,EAAE0C,QAAN,CAAe1C,EAAEoB,MAAjB,CALsB;iBAMjBpB,EAAEuB,MANe;uBAOXvB,EAAEuB,MAPS;gBAQlBvB,EAAEoB,MARgB;gBASlBpB,EAAEoB,MATgB;cAUpBpB,EAAEuB,MAVkB;cAWpBvB,EAAEuB,MAXkB;kBAYhBvB,EAAEuB,MAZc;cAapBvB,EAAEuB,MAbkB;cAcpBvB,EAAEuB,MAdkB;UAexB,IAAIvB,EAAE6B,KAAN,CAAY46C,mBAAZ,EAAiC,WAAjC;CAfW,CAArB;;AAkBAK,eAAe14C,OAAf,GAAyB,YAAW;MAC9BsW,SAAS,EAAb;OACK,IAAI7a,IAAI,CAAb,EAAgBA,IAAI,KAAK6a,MAAL,CAAY5a,MAAhC,EAAwCD,GAAxC,EAA6C;QACvCmd,QAAQ,KAAKtC,MAAL,CAAY7a,CAAZ,CAAZ;WACOmd,MAAMtY,GAAb,IAAoBsY,KAApB;;;SAGK,KAAKtC,MAAL,GAAcA,MAArB;CAPF,CAUA;;AClEA;;;;;IAIqBqiC;;;;;;;;;YACZh9C,uBAAMX,QAAQ;WACZA,OAAOk7C,QAAP,CAAgB,OAAhB,EAAyB,CAAzB,EAA4B,CAA5B,MAAmC,MAA1C;;;sBAGFK,+CAAmB;SACZjP,SAAL,GAAiBoR,eAAe52C,MAAf,CAAsB,KAAK7B,MAA3B,CAAjB;SACK24C,QAAL,GAAgB,KAAK34C,MAAL,CAAYmC,GAA5B;;;sBAGFy2C,qCAAc;;QAER,CAAC,KAAKC,aAAV,EAAyB;WAClB74C,MAAL,CAAYmC,GAAZ,GAAkB,KAAKw2C,QAAvB;UACI59C,SAAS,KAAKiF,MAAL,CAAYyL,UAAZ,CAAuB,KAAK47B,SAAL,CAAeyR,mBAAtC,CAAb;;UAEIC,mBAAmB,CAAvB;WACK,IAAI14C,GAAT,IAAgB,KAAKgnC,SAAL,CAAehxB,MAA/B,EAAuC;YACjCjF,QAAQ,KAAKi2B,SAAL,CAAehxB,MAAf,CAAsBhW,GAAtB,CAAZ;cACMoC,MAAN,GAAes2C,gBAAf;4BACqB3nC,MAAM4nC,eAAN,IAAyB,IAA1B,GAAkC5nC,MAAM4nC,eAAxC,GAA0D5nC,MAAM3V,MAApF;;;UAGEw9C,eAAeC,OAAOn+C,MAAP,EAAeg+C,gBAAf,CAAnB;UACI,CAACE,YAAL,EAAmB;cACX,IAAIn9C,KAAJ,CAAU,yCAAV,CAAN;;;WAGGkE,MAAL,GAAc,IAAIrE,EAAEC,YAAN,CAAmB,IAAIkF,MAAJ,CAAWm4C,YAAX,CAAnB,CAAd;WACKJ,aAAL,GAAqB,IAArB;;;;sBAIJrC,qCAAa79B,OAAO;SACbigC,WAAL;WACO,mBAAMpC,YAAN,YAAmB79B,KAAnB,CAAP;;;;;;;sBAKF20B,uCAAc9hC,OAAwB;QAAjB4uB,UAAiB,uEAAJ,EAAI;;QAChC,CAAC,KAAKic,OAAL,CAAa7qC,KAAb,CAAL,EAA0B;UACpB,KAAK67B,SAAL,CAAehxB,MAAf,CAAsBQ,IAAtB,IAA8B,KAAKwwB,SAAL,CAAehxB,MAAf,CAAsBQ,IAAtB,CAA2B2hC,WAA7D,EAA0E;YACpE,CAAC,KAAKP,kBAAV,EAA8B;eAAOkB,mBAAL;;eACzB,KAAK9C,OAAL,CAAa7qC,KAAb,IAAsB,IAAIwsC,UAAJ,CAAexsC,KAAf,EAAsB4uB,UAAtB,EAAkC,IAAlC,CAA7B;OAFF,MAIO;eACE,mBAAMkT,aAAN,YAAoB9hC,KAApB,EAA2B4uB,UAA3B,CAAP;;;;;sBAKN+e,qDAAsB;SACfP,WAAL;SACK54C,MAAL,CAAYmC,GAAZ,GAAkB,KAAKklC,SAAL,CAAehxB,MAAf,CAAsBQ,IAAtB,CAA2BpU,MAA7C;QACIkW,QAAQygC,UAAUv3C,MAAV,CAAiB,KAAK7B,MAAtB,CAAZ;QACI6L,SAAS,EAAb;;SAEK,IAAIxC,QAAQ,CAAjB,EAAoBA,QAAQsP,MAAM3Z,SAAlC,EAA6CqK,OAA7C,EAAsD;UAChDmC,QAAQ,EAAZ;UACI6tC,YAAY1gC,MAAM0gC,SAAN,CAAgBj2C,WAAhB,EAAhB;YACM+iC,gBAAN,GAAyBkT,SAAzB;;UAEIA,YAAY,CAAhB,EAAmB;;YACbnJ,UAAU,EAAd;YACIoJ,cAAc,CAAlB;;aAEK,IAAI99C,IAAI,CAAb,EAAgBA,IAAI69C,SAApB,EAA+B79C,GAA/B,EAAoC;cAC9BG,KAAI49C,cAAc5gC,MAAMu3B,OAApB,CAAR;kBACQv1C,IAAR,CAAagB,EAAb;yBACeA,EAAf;;;cAGI2qC,MAAN,GAAekT,cAAc7gC,MAAMzD,KAApB,EAA2ByD,MAAM9M,MAAjC,EAAyCytC,WAAzC,CAAf;aACK,IAAI99C,KAAI,CAAb,EAAgBA,KAAI69C,SAApB,EAA+B79C,IAA/B,EAAoC;gBAC5B8qC,MAAN,CAAa4J,QAAQ10C,EAAR,IAAa,CAA1B,EAA6BwpC,UAA7B,GAA0C,IAA1C;;;YAGEyU,kBAAkBF,cAAc5gC,MAAM9M,MAApB,CAAtB;OAfF,MAiBO,IAAIwtC,YAAY,CAAhB,EAAmB;;YACpBpS,mBAAmB3B,SAAS9Q,SAAT,CAAmB6R,gBAAnB,CAAoChqC,IAApC,CAAyC,EAAE03B,OAAO,IAAT,EAAzC,EAA0DvoB,KAA1D,EAAiEmN,MAAM+gC,UAAvE,CAAvB;YACIzS,gBAAJ,EAAsB;cAChBwS,kBAAkBF,cAAc5gC,MAAM9M,MAApB,CAAtB;;;;aAIGlR,IAAP,CAAY6Q,KAAZ;;;SAGGysC,kBAAL,GAA0BpsC,MAA1B;;;;EA1FmCmqC;;AA8FvC,IACM2D;qBACQl+C,MAAZ,EAAoB;;;SACbA,MAAL,GAAcA,MAAd;SACKm+C,IAAL,GAAY,IAAIj+C,EAAEmF,MAAN,CAAarF,MAAb,CAAZ;;;sBAGFoG,yBAAO7B,QAAQpB,QAAQ;WACd,IAAIjD,EAAEC,YAAN,CAAmB,KAAKg+C,IAAL,CAAU/3C,MAAV,CAAiB7B,MAAjB,EAAyBpB,MAAzB,CAAnB,CAAP;;;;;;;;;AAKJ,IAAIw6C,YAAY,IAAIz9C,EAAEmB,MAAN,CAAa;WAClBnB,EAAEuB,MADgB;aAEhBvB,EAAEoB,MAFc;eAGdpB,EAAEoB,MAHY;sBAIPpB,EAAEuB,MAJK;qBAKRvB,EAAEuB,MALM;kBAMXvB,EAAEuB,MANS;mBAOVvB,EAAEuB,MAPQ;uBAQNvB,EAAEuB,MARI;kBASXvB,EAAEuB,MATS;yBAUJvB,EAAEuB,MAVE;aAWhB,IAAIy8C,SAAJ,CAAc,oBAAd,CAXgB;WAYlB,IAAIA,SAAJ,CAAc,mBAAd,CAZkB;SAapB,IAAIA,SAAJ,CAAc,gBAAd,CAboB;UAcnB,IAAIA,SAAJ,CAAc,iBAAd,CAdmB;cAef,IAAIA,SAAJ,CAAc,qBAAd,CAfe;UAgBnB,IAAIA,SAAJ,CAAc,gBAAd,CAhBmB;gBAiBb,IAAIA,SAAJ,CAAc,uBAAd;CAjBA,CAAhB;;AAoBA,IAAME,YAAY,GAAlB;AACA,IAAMC,sBAAsB,GAA5B;AACA,IAAMC,sBAAsB,GAA5B;AACA,IAAMC,gBAAgB,GAAtB;;AAEA,SAAST,aAAT,CAAuBv5C,MAAvB,EAA+B;MACzBygB,OAAOzgB,OAAOiC,SAAP,EAAX;;MAEIwe,SAASo5B,SAAb,EAAwB;WACf75C,OAAO+B,YAAP,EAAP;;;MAGE0e,SAASs5B,mBAAb,EAAkC;WACzB/5C,OAAOiC,SAAP,KAAqB+3C,aAA5B;;;MAGEv5B,SAASq5B,mBAAb,EAAkC;WACzB95C,OAAOiC,SAAP,KAAqB+3C,gBAAgB,CAA5C;;;SAGKv5B,IAAP;;;AAGF,SAASw5B,QAAT,CAAkBvT,IAAlB,EAAwBwT,OAAxB,EAAiC;SACxBxT,OAAO,CAAP,GAAWwT,OAAX,GAAqB,CAACA,OAA7B;;;AAGF,SAASV,aAAT,CAAuBtkC,KAAvB,EAA8BrJ,MAA9B,EAAsCqkC,OAAtC,EAA+C;MACzCjwB,UAAJ;MACIzE,IAAIyE,IAAI,CAAZ;MACIpW,MAAM,EAAV;;OAEK,IAAIrO,IAAI,CAAb,EAAgBA,IAAI00C,OAApB,EAA6B10C,GAA7B,EAAkC;QAC5B0pC,KAAK,CAAT;QAAYC,KAAK,CAAjB;QACIuB,OAAOxxB,MAAMjT,SAAN,EAAX;QACI8iC,UAAU,EAAE2B,QAAQ,CAAV,CAAd;YACQ,IAAR;;QAEIA,OAAO,EAAX,EAAe;WACR,CAAL;WACKuT,SAASvT,IAAT,EAAe,CAAC,CAACA,OAAO,EAAR,KAAe,CAAhB,IAAqB76B,OAAO5J,SAAP,EAApC,CAAL;KAFF,MAIO,IAAIykC,OAAO,EAAX,EAAe;WACfuT,SAASvT,IAAT,EAAe,CAAC,CAAEA,OAAO,EAAR,GAAc,EAAf,KAAsB,CAAvB,IAA4B76B,OAAO5J,SAAP,EAA3C,CAAL;WACK,CAAL;KAFK,MAIA,IAAIykC,OAAO,EAAX,EAAe;UAChByT,KAAKzT,OAAO,EAAhB;UACI+E,KAAK5/B,OAAO5J,SAAP,EAAT;WACKg4C,SAASvT,IAAT,EAAe,KAAKyT,KAAK,IAAV,KAAmB1O,MAAM,CAAzB,CAAf,CAAL;WACKwO,SAASvT,QAAQ,CAAjB,EAAoB,KAAK,CAACyT,KAAK,IAAN,KAAe,CAApB,KAA0B1O,KAAK,IAA/B,CAApB,CAAL;KAJK,MAMA,IAAI/E,OAAO,GAAX,EAAgB;UACjByT,KAAKzT,OAAO,EAAhB;WACKuT,SAASvT,IAAT,EAAe,KAAMyT,KAAK,EAAN,IAAa,CAAlB,IAAuBtuC,OAAO5J,SAAP,EAAtC,CAAL;WACKg4C,SAASvT,QAAQ,CAAjB,EAAoB,KAAOyT,KAAK,EAAN,IAAa,CAAd,IAAoB,CAAzB,IAA8BtuC,OAAO5J,SAAP,EAAlD,CAAL;KAHK,MAKA,IAAIykC,OAAO,GAAX,EAAgB;UACjB+E,KAAK5/B,OAAO5J,SAAP,EAAT;UACIm4C,KAAKvuC,OAAO5J,SAAP,EAAT;WACKg4C,SAASvT,IAAT,EAAe,CAAC+E,MAAM,CAAP,KAAa2O,MAAM,CAAnB,CAAf,CAAL;WACKH,SAASvT,QAAQ,CAAjB,EAAoB,CAAC,CAAC0T,KAAK,IAAN,KAAe,CAAhB,IAAqBvuC,OAAO5J,SAAP,EAAzC,CAAL;KAJK,MAMA;WACAg4C,SAASvT,IAAT,EAAe76B,OAAO9J,YAAP,EAAf,CAAL;WACKk4C,SAASvT,QAAQ,CAAjB,EAAoB76B,OAAO9J,YAAP,EAApB,CAAL;;;SAGGmjC,EAAL;SACKC,EAAL;QACIxqC,IAAJ,CAAS,IAAImqC,KAAJ,CAAUC,OAAV,EAAmB,KAAnB,EAA0BvpB,CAA1B,EAA6ByE,CAA7B,CAAT;;;SAGKpW,GAAP;;;AC9MF,IAAIwwC,YAAY,IAAI1+C,EAAEmC,eAAN,CAAsBnC,EAAEuB,MAAxB,EAAgC;cAClC;cACEvB,EAAEuB,MADJ;aAEE,IAAIvB,EAAE6B,KAAN,CAAY7B,EAAEuB,MAAd,EAAsB,UAAtB;GAHgC;cAKlC;cACEvB,EAAEuB,MADJ;aAEE,IAAIvB,EAAE6B,KAAN,CAAY7B,EAAEuB,MAAd,EAAsB,UAAtB,CAFF;aAGEvB,EAAEuB,MAHJ;gBAIEvB,EAAEuB,MAJJ;gBAKEvB,EAAEuB;;CAVF,CAAhB;;IAcqBo9C;qBACZ5+C,uBAAMX,QAAQ;WACZA,OAAOk7C,QAAP,CAAgB,OAAhB,EAAyB,CAAzB,EAA4B,CAA5B,MAAmC,MAA1C;;;8BAGUj2C,MAAZ,EAAoB;;;SACbA,MAAL,GAAcA,MAAd;QACIA,OAAOu6C,UAAP,CAAkB,CAAlB,MAAyB,MAA7B,EAAqC;YAC7B,IAAIz+C,KAAJ,CAAU,2BAAV,CAAN;;;SAGGi6C,MAAL,GAAcsE,UAAUx4C,MAAV,CAAiB7B,MAAjB,CAAd;;;+BAGFnE,2BAAQqX,MAAM;yBACO,KAAK6iC,MAAL,CAAYv0C,OAA/B,6GAAwC;;;;;;;;;;;;UAA/BiB,MAA+B;;UAClCzC,SAAS,IAAIrE,EAAEC,YAAN,CAAmB,KAAKoE,MAAL,CAAYjF,MAA/B,CAAb;aACOoH,GAAP,GAAaM,MAAb;UACInH,OAAO,IAAI06C,OAAJ,CAAYh2C,MAAZ,CAAX;UACI1E,KAAKR,cAAL,KAAwBoY,IAA5B,EAAkC;eACzB5X,IAAP;;;;WAIG,IAAP;;;;;wBAGU;UACNk/C,QAAQ,EAAZ;4BACmB,KAAKzE,MAAL,CAAYv0C,OAA/B,oHAAwC;;;;;;;;;;;;YAA/BiB,MAA+B;;YAClCzC,SAAS,IAAIrE,EAAEC,YAAN,CAAmB,KAAKoE,MAAL,CAAYjF,MAA/B,CAAb;eACOoH,GAAP,GAAaM,MAAb;cACM9H,IAAN,CAAW,IAAIq7C,OAAJ,CAAYh2C,MAAZ,CAAX;;;aAGKw6C,KAAP;;;;;;;ACnDJ,IAAIC,YAAY,IAAI9+C,EAAE8D,MAAN,CAAa9D,EAAE0B,KAAf,CAAhB;AACA,IAAIq9C,YAAY,IAAI/+C,EAAEmB,MAAN,CAAa;OACtBnB,EAAEuB,MADoB;OAEtB,IAAIvB,EAAEmF,MAAN,CAAa,KAAb;CAFS,CAAhB;;AAKA,IAAI65C,MAAM,IAAIh/C,EAAEmB,MAAN,CAAa;MACjBnB,EAAEoB,MADe;cAETpB,EAAEqB,KAFO;QAGfrB,EAAE0B,KAHa;cAIT1B,EAAEyB,MAJO;UAKbzB,EAAEuB;CALF,CAAV;;AAQA,IAAI09C,OAAO,IAAIj/C,EAAEmB,MAAN,CAAa;QAChB,IAAInB,EAAE8D,MAAN,CAAa,CAAb,CADgB;gBAER9D,EAAEoB,MAFM;WAGb,IAAIpB,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB,IAAIpB,EAAE6B,KAAN,CAAYm9C,GAAZ,EAAiB;WAAKz8C,EAAE28C,YAAF,GAAiB,CAAtB;GAAjB,CAAxB,EAAmE,EAAEj9C,MAAM,QAAR,EAAnE;CAHA,CAAX;;AAMA,IAAIk9C,WAAW,IAAIn/C,EAAEmB,MAAN,CAAa;UAClBnB,EAAEoB,MADgB;SAEnB,IAAIpB,EAAE6B,KAAN,CAAYo9C,IAAZ,EAAkB;WAAK18C,EAAEzC,MAAF,GAAW,CAAhB;GAAlB;CAFM,CAAf;;AAKA,IAAIs/C,WAAW,IAAIp/C,EAAEmB,MAAN,CAAa;YAChB,IAAInB,EAAE0C,QAAN,CAAe1C,EAAE0B,KAAjB,EAAwB,EAAxB,CADgB;YAEhB,IAAI1B,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB+9C,QAAxB,CAFgB;kBAGV,IAAIn/C,EAAEgC,OAAN,CAAchC,EAAEoB,MAAhB,EAAwB,MAAxB;CAHH,CAAf;;AAMA,IAAIi+C,cAAc,IAAIr/C,EAAEmB,MAAN,CAAa;cACjBnB,EAAEuB,MADe;OAExB,IAAIvB,EAAEgC,OAAN,CAAchC,EAAEuB,MAAhB,EAAwB69C,QAAxB,CAFwB;cAGjBp/C,EAAEuB,MAHe;aAIlBvB,EAAEuB;CAJG,CAAlB;;IAOqB+9C;QACZv/C,uBAAMX,QAAQ;QACfiF,SAAS,IAAIrE,EAAEC,YAAN,CAAmBb,MAAnB,CAAb;;QAEI;UACEg7C,SAASiF,YAAYn5C,MAAZ,CAAmB7B,MAAnB,CAAb;KADF,CAEE,OAAOzE,CAAP,EAAU;aACH,KAAP;;;yBAGew6C,OAAOvxC,GAAP,CAAW02C,QAAX,CAAoBpsC,KAArC,6GAA4C;;;;;;;;;;;;UAAnClR,IAAmC;;UACtCA,KAAKsV,IAAL,KAAc,MAAlB,EAA0B;eACjB,IAAP;;;;WAIG,KAAP;;;iBAGUlT,MAAZ,EAAoB;;;SACbA,MAAL,GAAcA,MAAd;SACK+1C,MAAL,GAAciF,YAAYn5C,MAAZ,CAAmB,KAAK7B,MAAxB,CAAd;;0BAEiB,KAAK+1C,MAAL,CAAYvxC,GAAZ,CAAgB02C,QAAhB,CAAyBpsC,KAA1C,oHAAiD;;;;;;;;;;;;UAAxClR,IAAwC;;4BAC/BA,KAAKu9C,OAArB,oHAA8B;;;;;;;;;;;;YAArBnJ,GAAqB;;YACxBA,IAAIoJ,UAAJ,IAAkB,CAAtB,EAAyB;eAClBp7C,MAAL,CAAYmC,GAAZ,GAAkB6vC,IAAIoJ,UAAJ,GAAiB,KAAKrF,MAAL,CAAYvxC,GAAZ,CAAgB62C,cAAnD;cACInoC,IAAJ,GAAWunC,UAAU54C,MAAV,CAAiB,KAAK7B,MAAtB,CAAX;SAFF,MAGO;cACDkT,IAAJ,GAAW,IAAX;;;;UAIAtV,KAAKsV,IAAL,KAAc,MAAlB,EAA0B;aACnBooC,IAAL,GAAY19C,IAAZ;;;;;kBAKN/B,2BAAQqX,MAAM;QACR,CAAC,KAAKooC,IAAV,EAAgB;aACP,IAAP;;;0BAGc,KAAKA,IAAL,CAAUH,OAA1B,oHAAmC;;;;;;;;;;;;UAA1BnJ,GAA0B;;UAC7B7vC,MAAM,KAAK4zC,MAAL,CAAYwF,UAAZ,GAAyBvJ,IAAIuJ,UAA7B,GAA0C,CAApD;UACIv7C,SAAS,IAAIrE,EAAEC,YAAN,CAAmB,KAAKoE,MAAL,CAAYjF,MAAZ,CAAmBumB,KAAnB,CAAyBnf,GAAzB,CAAnB,CAAb;UACI7G,OAAO,IAAI06C,OAAJ,CAAYh2C,MAAZ,CAAX;UACI1E,KAAKR,cAAL,KAAwBoY,IAA5B,EAAkC;eACzB5X,IAAP;;;;WAIG,IAAP;;;;;wBAGU;UACNk/C,QAAQ,EAAZ;4BACgB,KAAKc,IAAL,CAAUH,OAA1B,oHAAmC;;;;;;;;;;;;YAA1BnJ,GAA0B;;YAC7B7vC,MAAM,KAAK4zC,MAAL,CAAYwF,UAAZ,GAAyBvJ,IAAIuJ,UAA7B,GAA0C,CAApD;YACIv7C,SAAS,IAAIrE,EAAEC,YAAN,CAAmB,KAAKoE,MAAL,CAAYjF,MAAZ,CAAmBumB,KAAnB,CAAyBnf,GAAzB,CAAnB,CAAb;cACMxH,IAAN,CAAW,IAAIq7C,OAAJ,CAAYh2C,MAAZ,CAAX;;;aAGKw6C,KAAP;;;;;;;AClGJ;AACAlgD,QAAQG,cAAR,CAAuBu7C,OAAvB;AACA17C,QAAQG,cAAR,CAAuBm9C,QAAvB;AACAt9C,QAAQG,cAAR,CAAuBi+C,SAAvB;AACAp+C,QAAQG,cAAR,CAAuB6/C,kBAAvB;AACAhgD,QAAQG,cAAR,CAAuBwgD,KAAvB,EAEA;;"} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/.bin/brfs b/pitfall/pdfkit/node_modules/fontkit/node_modules/.bin/brfs new file mode 120000 index 00000000..43f8db9a --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/.bin/brfs @@ -0,0 +1 @@ +../brfs/bin/cmd.js \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/.travis.yml b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/.travis.yml new file mode 100644 index 00000000..9672e129 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/.travis.yml @@ -0,0 +1,6 @@ +language: node_js +node_js: + - "0.8" + - "0.10" +before_install: + - npm install -g npm@~1.4.6 diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/LICENSE b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/LICENSE new file mode 100644 index 00000000..ee27ba4b --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/bin/cmd.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/bin/cmd.js new file mode 100755 index 00000000..3b4a94ca --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/bin/cmd.js @@ -0,0 +1,20 @@ +#!/usr/bin/env node +var fs = require('fs'); +var path = require('path'); +var brfs = require('../'); +var file = process.argv[2]; + +if (file === '-h' || file === '--help') { + return fs.createReadStream(path.join(__dirname, 'usage.txt')) + .pipe(process.stdout) + ; +} + +var fromFile = file && file !== '-'; +var rs = fromFile + ? fs.createReadStream(file) + : process.stdin +; + +var fpath = fromFile ? file : path.join(process.cwd(), '-'); +rs.pipe(brfs(fpath)).pipe(process.stdout); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/bin/usage.txt b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/bin/usage.txt new file mode 100644 index 00000000..152b4333 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/bin/usage.txt @@ -0,0 +1,13 @@ +usage: + + brfs file + + Inline `fs.readFileSync()` calls from `file`, printing the transformed file + contents to stdout. + + brfs + brfs - + + Inline `fs.readFileSync()` calls from stdin, printing the transformed file + contents to stdout. + diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/example/async.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/example/async.js new file mode 100644 index 00000000..d04cb5b8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/example/async.js @@ -0,0 +1,4 @@ +var fs = require('fs'); +fs.readFile(__dirname + '/robot.html', 'utf8', function (err, html) { + console.log(html); +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/example/main.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/example/main.js new file mode 100644 index 00000000..23a86b7e --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/example/main.js @@ -0,0 +1,3 @@ +var fs = require('fs'); +var html = fs.readFileSync(__dirname + '/robot.html', 'utf8'); +console.log(html); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/example/robot.html b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/example/robot.html new file mode 100644 index 00000000..9e6d2ab7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/example/robot.html @@ -0,0 +1 @@ +beep boop diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/index.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/index.js new file mode 100644 index 00000000..03669ccf --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/index.js @@ -0,0 +1,146 @@ +var staticModule = require('static-module'); +var quote = require('quote-stream'); +var through = require('through2'); +var fs = require('fs'); +var path = require('path'); +var resolve = require('resolve'); + +module.exports = function (file, opts) { + if (/\.json$/.test(file)) return through(); + + function resolver (p) { + return resolve.sync(p, { basedir: path.dirname(file) }); + } + var vars = { + __filename: file, + __dirname: path.dirname(file), + require: { resolve: resolver } + }; + if (!opts) opts = {}; + if (opts.vars) Object.keys(opts.vars).forEach(function (key) { + vars[key] = opts.vars[key]; + }); + + var sm = staticModule( + { + fs: { + readFileSync: readFileSync, + readFile: readFile, + readdirSync: readdirSync, + readdir: readdir + } + }, + { vars: vars, varModules: { path: path } } + ); + return sm; + + function readFile (file, enc, cb) { + if (typeof enc === 'function') { + cb = enc; + enc = null; + } + if (enc && typeof enc === 'object' && enc.encoding) { + enc = enc.encoding; + } + var isBuffer = false; + if (enc === null || enc === undefined) { + isBuffer = true; + enc = 'base64'; + } + + var stream = through(write, end); + stream.push('process.nextTick(function(){(' + cb + ')(null,'); + if (isBuffer) stream.push('Buffer('); + + var s = fs.createReadStream(file, { encoding: enc }); + s.on('error', function (err) { sm.emit('error', err) }); + return s.pipe(quote()).pipe(stream); + + function write (buf, enc, next) { + this.push(buf); + next(); + } + function end (next) { + if (isBuffer) this.push(',"base64")'); + this.push(')})'); + this.push(null); + sm.emit('file', file); + next() + } + } + + function readFileSync (file, enc) { + var isBuffer = false; + if (enc === null || enc === undefined) { + isBuffer = true; + enc = 'base64'; + } + if (enc && typeof enc === 'object' && enc.encoding) { + enc = enc.encoding; + } + var stream = fs.createReadStream(file, { encoding: enc }) + .on('error', function (err) { sm.emit('error', err) }) + .pipe(quote()).pipe(through(write, end)) + ; + if (isBuffer) { + stream.push('Buffer('); + } + return stream; + + function write (buf, enc, next) { + this.push(buf); + next(); + } + function end (next) { + if (isBuffer) this.push(',"base64")'); + this.push(null); + sm.emit('file', file); + next(); + } + } + + function readdir(path, cb) { + var stream = through(write, end); + + stream.push('process.nextTick(function(){(' + cb + ')(null,'); + fs.readdir(path, function (err, src) { + if (err) { + stream.emit('error', err); + return; + } + stream.push(JSON.stringify(src)); + stream.end(')})'); + }); + return stream; + + function write (buf, enc, next) { + this.push(buf); + next(); + } + function end (next) { + this.push(null); + next(); + } + } + + function readdirSync (path) { + var stream = through(write, end); + fs.readdir(path, function (err, src) { + if (err) { + stream.emit('error', err); + return; + } + stream.end(JSON.stringify(src)); + }); + return stream; + + function write (buf, enc, next) { + this.push(buf); + next(); + } + function end (next) { + this.push(null); + next(); + } + } +}; diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/package.json b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/package.json new file mode 100644 index 00000000..93c1b93f --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/package.json @@ -0,0 +1,109 @@ +{ + "_args": [ + [ + { + "raw": "brfs@^1.4.0", + "scope": null, + "escapedName": "brfs", + "name": "brfs", + "rawSpec": "^1.4.0", + "spec": ">=1.4.0 <2.0.0", + "type": "range" + }, + "/Users/MB/git/pitfall/pdfkit/node_modules/fontkit" + ] + ], + "_from": "brfs@>=1.4.0 <2.0.0", + "_id": "brfs@1.4.3", + "_inCache": true, + "_location": "/fontkit/brfs", + "_nodeVersion": "4.0.0", + "_npmUser": { + "name": "mattdesl", + "email": "dave.des@gmail.com" + }, + "_npmVersion": "2.14.2", + "_phantomChildren": {}, + "_requested": { + "raw": "brfs@^1.4.0", + "scope": null, + "escapedName": "brfs", + "name": "brfs", + "rawSpec": "^1.4.0", + "spec": ">=1.4.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fontkit" + ], + "_resolved": "https://registry.npmjs.org/brfs/-/brfs-1.4.3.tgz", + "_shasum": "db675d6f5e923e6df087fca5859c9090aaed3216", + "_shrinkwrap": null, + "_spec": "brfs@^1.4.0", + "_where": "/Users/MB/git/pitfall/pdfkit/node_modules/fontkit", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "bin": { + "brfs": "bin/cmd.js" + }, + "bugs": { + "url": "https://github.com/substack/brfs/issues" + }, + "dependencies": { + "quote-stream": "^1.0.1", + "resolve": "^1.1.5", + "static-module": "^1.1.0", + "through2": "^2.0.0" + }, + "description": "browserify fs.readFileSync() static asset inliner", + "devDependencies": { + "browserify": "^4.2.0", + "concat-stream": "^1.4.5", + "tap": "~0.4.8", + "through": "^2.3.4" + }, + "directories": {}, + "dist": { + "shasum": "db675d6f5e923e6df087fca5859c9090aaed3216", + "tarball": "https://registry.npmjs.org/brfs/-/brfs-1.4.3.tgz" + }, + "gitHead": "71730423fefafecaf35fb441e36e04590a8435ed", + "homepage": "https://github.com/substack/brfs", + "keywords": [ + "browserify", + "browserify-transform", + "fs", + "readFileSync", + "plugin", + "static", + "asset", + "bundle", + "base64" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "mattdesl", + "email": "dave.des@gmail.com" + }, + { + "name": "substack", + "email": "substack@gmail.com" + } + ], + "name": "brfs", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/substack/brfs.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "1.4.3" +} diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/readme.markdown b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/readme.markdown new file mode 100644 index 00000000..f98a4489 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/readme.markdown @@ -0,0 +1,186 @@ +# brfs + +fs.readFileSync() and fs.readFile() static asset browserify transform + +[![build status](https://secure.travis-ci.org/substack/brfs.png)](http://travis-ci.org/substack/brfs) + +This module is a plugin for [browserify](http://browserify.org) to parse the AST +for `fs.readFileSync()` calls so that you can inline file contents into your +bundles. + +Even though this module is intended for use with browserify, nothing about it is +particularly specific to browserify so it should be generally useful in other +projects. + +# example + +for a main.js: + +``` js +var fs = require('fs'); +var html = fs.readFileSync(__dirname + '/robot.html', 'utf8'); +console.log(html); +``` + +and a robot.html: + +``` html +beep boop +``` + +first `npm install brfs` into your project, then: + +## on the command-line + +``` +$ browserify -t brfs example/main.js > bundle.js +``` + +now in the bundle output file, + +``` js +var html = fs.readFileSync(__dirname + '/robot.html', 'utf8'); +``` + +turns into: + +``` js +var html = "beep boop\n"; +``` + +## or with the api + +``` js +var browserify = require('browserify'); +var fs = require('fs'); + +var b = browserify('example/main.js'); +b.transform('brfs'); + +b.bundle().pipe(fs.createWriteStream('bundle.js')); +``` + +## async + +You can also use `fs.readFile()`: + +``` js +var fs = require('fs'); +fs.readFile(__dirname + '/robot.html', 'utf8', function (err, html) { + console.log(html); +}); +``` + +When you run this code through brfs, it turns into: + +``` js +var fs = require('fs'); +process.nextTick(function () {(function (err, html) { + console.log(html); +})(null,"beep boop\n")}); +``` + +# methods + +brfs looks for: + +* `fs.readFileSync(pathExpr, enc=null)` +* `fs.readFile(pathExpr, enc=null, cb)` +* `fs.readdirSync(pathExpr)` +* `fs.readdir(pathExpr, cb)` + +Inside of each `pathExpr`, you can use +[statically analyzable](http://npmjs.org/package/static-eval) expressions and +these variables and functions: + +* `__dirname` +* `__filename` +* `path` if you `var path = require('path')` first +* `require.resolve()` + +Just like node, the default encoding is `null` and will give back a `Buffer`. +If you want differently-encoded file contents for your inline content you can +set `enc` to `'utf8'`, `'base64'`, or `'hex'`. + +In async mode when a callback `cb` is given, the contents of `pathExpr` are +inlined into the source inside of a `process.nextTick()` call. + +When you use a `'file'`-event aware watcher such as +[watchify](https://npmjs.org/package/watchify), the inlined assets will be +updated automatically. + +If you want to use this plugin directly, not through browserify, the api +follows. + +``` js +var brfs = require('brfs') +``` + +## var tr = brfs(file, opts) + +Return a through stream `tr` inlining `fs.readFileSync()` file contents +in-place. + +Optionally, you can set which `opts.vars` will be used in the +[static argument evaluation](https://npmjs.org/package/static-eval) +in addition to `__dirname` and `__filename`. + +# events + +## tr.on('file', function (file) {}) + +For every file included with `fs.readFileSync()` or `fs.readFile()`, the `tr` +instance emits a `'file'` event with the `file` path. + +# usage + +A tiny command-line program ships with this module to make debugging easier. + +``` +usage: + + brfs file + + Inline `fs.readFileSync()` calls from `file`, printing the transformed file + contents to stdout. + + brfs + brfs - + + Inline `fs.readFileSync()` calls from stdin, printing the transformed file + contents to stdout. + +``` + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install brfs +``` + +then use `-t brfs` with the browserify command or use `.transform('brfs')` from +the browserify api. + +# gotchas + +Since `brfs` evaluates your source code *statically*, you can't use dynamic expressions that need to be evaluated at run time. For example: + +```js +// WILL NOT WORK! +var file = window.someFilePath; +var str = require('fs').readFileSync(file, 'utf8'); +``` + +Instead, you must use simpler expressions that can be resolved at build-time: + +```js +var str = require('fs').readFileSync(__dirname + '/file.txt', 'utf8'); +``` + +Another gotcha: `brfs` does not yet support ES2015 syntax like destructuring or `import` statements. See [brfs-babel](https://github.com/Jam3/brfs-babel) for an experimental replacement that supports this syntax. + +# license + +MIT diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/ag.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/ag.js new file mode 100644 index 00000000..003c1c4c --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/ag.js @@ -0,0 +1,23 @@ +var test = require('tap').test; +var browserify = require('browserify'); + +var vm = require('vm'); +var fs = require('fs'); +var path = require('path'); + +test('skip parsing json', function (t) { + t.plan(1); + + var b = browserify(); + b.add(__dirname + '/files/ag.js'); + b.transform(path.dirname(__dirname)); + + b.bundle(function (err, src) { + if (err) t.fail(err); + vm.runInNewContext(src, { console: { log: log } }); + }); + + function log (msg) { + t.equal('

    abcdefg

    \n', msg); + } +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/async.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/async.js new file mode 100644 index 00000000..e6dde442 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/async.js @@ -0,0 +1,48 @@ +var test = require('tap').test; +var browserify = require('browserify'); + +var vm = require('vm'); +var fs = require('fs'); +var path = require('path'); + +test('async', function (t) { + t.plan(1); + var b = browserify(__dirname + '/files/async.js'); + b.transform(path.dirname(__dirname)); + b.bundle(function (err, src) { + if (err) t.fail(err); + vm.runInNewContext(src, { + setTimeout: setTimeout, + console: { log: log } + }); + }); + function log (msg) { t.equal(msg, 'what\n') } +}); + +test('async encoding', function (t) { + t.plan(1); + var b = browserify(__dirname + '/files/async_encoding.js'); + b.transform(path.dirname(__dirname)); + b.bundle(function (err, src) { + if (err) t.fail(err); + vm.runInNewContext(src, { + setTimeout: setTimeout, + console: { log: log } + }); + }); + function log (msg) { t.equal(msg, '776861740a') } +}); + +test('async string encoding', function (t) { + t.plan(1); + var b = browserify(__dirname + '/files/async_str_encoding.js'); + b.transform(path.dirname(__dirname)); + b.bundle(function (err, src) { + if (err) t.fail(err); + vm.runInNewContext(src, { + setTimeout: setTimeout, + console: { log: log } + }); + }); + function log (msg) { t.equal(msg, '776861740a') } +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/buffer.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/buffer.js new file mode 100644 index 00000000..20bbf7f3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/buffer.js @@ -0,0 +1,26 @@ +var test = require('tap').test; +var browserify = require('browserify'); + +var vm = require('vm'); +var path = require('path'); + +test('sync string encoding', function (t) { + t.plan(2); + var b = browserify(__dirname + '/files/buffer.js'); + b.require('buffer', { expose: 'buffer' }); + b.transform(path.dirname(__dirname)); + b.bundle(function (err, src) { + if (err) t.fail(err); + var context = { + setTimeout: setTimeout, + console: { log: log } + }; + var buffers = []; + vm.runInNewContext(src, context); + + t.ok(context.require('buffer').Buffer.isBuffer(buffers[0]), 'isBuffer'); + t.equal(buffers[0].toString('utf8'), 'beep boop\n'); + + function log (msg) { buffers.push(msg) } + }); +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/bundle.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/bundle.js new file mode 100644 index 00000000..20f07218 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/bundle.js @@ -0,0 +1,25 @@ +var test = require('tap').test; +var browserify = require('browserify'); + +var vm = require('vm'); +var fs = require('fs'); +var path = require('path'); + +var html = fs.readFileSync(__dirname + '/files/robot.html', 'utf8'); + +test('bundle a file', function (t) { + t.plan(1); + + var b = browserify(); + b.add(__dirname + '/files/main.js'); + b.transform(path.dirname(__dirname)); + + b.bundle(function (err, src) { + if (err) t.fail(err); + vm.runInNewContext(src, { console: { log: log } }); + }); + + function log (msg) { + t.equal(html, msg); + } +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/cmd.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/cmd.js new file mode 100644 index 00000000..210ad515 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/cmd.js @@ -0,0 +1,26 @@ +var test = require('tap').test; +var exec = require('child_process').exec; + +var vm = require('vm'); +var fs = require('fs'); + +var html = fs.readFileSync(__dirname + '/files/robot.html', 'utf8'); + +test('cmd.js', function (t) { + t.plan(1); + exec(__dirname + '/../bin/cmd.js ' + __dirname + '/files/main.js', + function (error, stdout, stderr) { + if (error !== null) { + t.fail(); + } else { + vm.runInNewContext(stdout, { + require: function () {}, + console: { log: log } + }); + function log (msg) { + t.equal(html, msg); + }; + }; + } + ); +}); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/dynamic_read_concat.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/dynamic_read_concat.js new file mode 100644 index 00000000..ed52fcd7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/dynamic_read_concat.js @@ -0,0 +1,17 @@ +var test = require('tap').test; +var browserify = require('browserify'); +var path = require('path'); + +test('dynamically loaded file gets skipped', function (t) { + t.plan(1); + + var b = browserify(); + b.add(__dirname + '/files/dynamic_read_concat'); + b.transform(path.dirname(__dirname)); + + b.bundle(function (err, src) { + if (err) t.fail(err); + else t.ok(true, 'build success'); + }); + +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/dynamic_read_no_concat.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/dynamic_read_no_concat.js new file mode 100644 index 00000000..9b8be2c5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/dynamic_read_no_concat.js @@ -0,0 +1,17 @@ +var test = require('tap').test; +var browserify = require('browserify'); +var path = require('path'); + +test('dynamically loaded file gets skipped', function (t) { + t.plan(1); + + var b = browserify(); + b.add(__dirname + '/files/dynamic_read_no_concat.js'); + b.transform(path.dirname(__dirname)); + + b.bundle(function (err, src) { + if (err) t.fail(err); + else t.ok(true, 'build success'); + }); + +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/encoding.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/encoding.js new file mode 100644 index 00000000..e632d72b --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/encoding.js @@ -0,0 +1,19 @@ +var test = require('tap').test; +var browserify = require('browserify'); + +var vm = require('vm'); +var path = require('path'); + +test('sync string encoding', function (t) { + t.plan(1); + var b = browserify(__dirname + '/files/encoding.js'); + b.transform(path.dirname(__dirname)); + b.bundle(function (err, src) { + if (err) t.fail(err); + vm.runInNewContext(src, { + setTimeout: setTimeout, + console: { log: log } + }); + }); + function log (msg) { t.equal(msg, '3c623e6265657020626f6f703c2f623e0a') } +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/ag.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/ag.js new file mode 100644 index 00000000..c908da9d --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/ag.js @@ -0,0 +1,5 @@ +var fs = require('fs'); +var pre = fs.readFileSync(__dirname + '/ag_pre.html', 'utf8'); +var post = fs.readFileSync(__dirname + '/ag_post.html', 'utf8'); +var ag = require('./ag.json'); +console.log(pre + Object.keys(ag).sort().join('') + post); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/ag.json b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/ag.json new file mode 100644 index 00000000..8e3f5144 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/ag.json @@ -0,0 +1 @@ +{"a":1,"b":2,"c":2,"d":3,"e":4,"f":5,"g":6} diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/ag_post.html b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/ag_post.html new file mode 100644 index 00000000..77205ff3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/ag_post.html @@ -0,0 +1 @@ + diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/ag_pre.html b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/ag_pre.html new file mode 100644 index 00000000..9689216a --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/ag_pre.html @@ -0,0 +1 @@ +

    \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/async.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/async.js new file mode 100644 index 00000000..d721b54d --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/async.js @@ -0,0 +1,4 @@ +var fs = require('fs'); +fs.readFile(__dirname + '/async.txt', 'utf8', function (err, txt) { + console.log(txt); +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/async.txt b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/async.txt new file mode 100644 index 00000000..f510eb21 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/async.txt @@ -0,0 +1 @@ +what diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/async_encoding.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/async_encoding.js new file mode 100644 index 00000000..30ee9c6d --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/async_encoding.js @@ -0,0 +1,4 @@ +var fs = require('fs'); +fs.readFile(__dirname + '/async.txt', { encoding: 'hex' }, function (err, txt) { + console.log(txt); +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/async_str_encoding.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/async_str_encoding.js new file mode 100644 index 00000000..12b1c373 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/async_str_encoding.js @@ -0,0 +1,4 @@ +var fs = require('fs'); +fs.readFile(__dirname + '/async.txt', 'hex', function (err, txt) { + console.log(txt); +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/buffer.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/buffer.js new file mode 100644 index 00000000..9d738afa --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/buffer.js @@ -0,0 +1,3 @@ +var fs = require('fs'); +var txt = fs.readFileSync(__dirname + '/robot.html'); +console.log(txt); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/dynamic_read_concat.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/dynamic_read_concat.js new file mode 100644 index 00000000..9c930e3d --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/dynamic_read_concat.js @@ -0,0 +1,4 @@ +var fs = require('fs'); +var path = require('path'); +var dynamicallyCreatedFilename = path.join('/files/', 'somefile'); +var stuff = fs.readFileSync(__dirname + dynamicallyCreatedFilename + __dirname, 'utf8'); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/dynamic_read_no_concat.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/dynamic_read_no_concat.js new file mode 100644 index 00000000..68ad56f5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/dynamic_read_no_concat.js @@ -0,0 +1,4 @@ +var fs = require('fs'); +var path = require('path'); +var dynamicallyCreatedFilename = path.join('/files/', 'somefile'); +var stuff = fs.readFileSync(dynamicallyCreatedFilename, 'utf8'); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/encoding.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/encoding.js new file mode 100644 index 00000000..b34627da --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/encoding.js @@ -0,0 +1,4 @@ +var fs = require('fs'); +var txt = fs.readFileSync(__dirname + '/robot.html', { encoding: 'hex' }); + +console.log(txt); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/hoist.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/hoist.js new file mode 100644 index 00000000..23a86b7e --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/hoist.js @@ -0,0 +1,3 @@ +var fs = require('fs'); +var html = fs.readFileSync(__dirname + '/robot.html', 'utf8'); +console.log(html); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/inline.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/inline.js new file mode 100644 index 00000000..6a0c4fc6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/inline.js @@ -0,0 +1,2 @@ +var html = require('fs').readFileSync(__dirname + '/robot.html', 'utf8'); +console.log(html); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/main.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/main.js new file mode 100644 index 00000000..23a86b7e --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/main.js @@ -0,0 +1,3 @@ +var fs = require('fs'); +var html = fs.readFileSync(__dirname + '/robot.html', 'utf8'); +console.log(html); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/multi_var.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/multi_var.js new file mode 100644 index 00000000..90b34449 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/multi_var.js @@ -0,0 +1,3 @@ +var x = 5, y = require('fs'), z = 555; +var html = y.readFileSync(__dirname + '/robot.html', 'utf8'); +console.log(html); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/non_fs.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/non_fs.js new file mode 100644 index 00000000..38dc9fc7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/non_fs.js @@ -0,0 +1,3 @@ +var blarg = require('fs'); +var html = blarg.readFileSync(__dirname + '/robot.html', 'utf8'); +console.log(html); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/path_join.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/path_join.js new file mode 100644 index 00000000..07358349 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/path_join.js @@ -0,0 +1,4 @@ +var fs = require('fs'); +var path = require('path'); +var html = fs.readFileSync(path.join(__dirname, 'robot.html'), 'utf8'); +console.log(html); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/path_join_other_name.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/path_join_other_name.js new file mode 100644 index 00000000..28678926 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/path_join_other_name.js @@ -0,0 +1,4 @@ +var fs = require('fs'); +var xxx = require('path'); +var html = fs.readFileSync(xxx.join(__dirname, 'robot.html'), 'utf8'); +console.log(html); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/path_join_single_var.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/path_join_single_var.js new file mode 100644 index 00000000..6dde74fc --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/path_join_single_var.js @@ -0,0 +1,4 @@ +var fs = require('fs'); +var join = require('path').join; +var html = fs.readFileSync(join(__dirname, 'robot.html'), 'utf8'); +console.log(html); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/readdir-sync.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/readdir-sync.js new file mode 100644 index 00000000..830725fb --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/readdir-sync.js @@ -0,0 +1,3 @@ +var fs = require('fs'); + +console.log(fs.readdirSync(__dirname)); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/readdir.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/readdir.js new file mode 100644 index 00000000..b6472605 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/readdir.js @@ -0,0 +1,6 @@ +var fs = require('fs'); + +fs.readdir(__dirname, function(err, files) { + if (err) throw err; + console.log(files); +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/robot.html b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/robot.html new file mode 100644 index 00000000..9e6d2ab7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/robot.html @@ -0,0 +1 @@ +beep boop diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/separators.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/separators.js new file mode 100644 index 00000000..d0009ec8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/separators.js @@ -0,0 +1,3 @@ +var fs = require('fs'); +var text = fs.readFileSync(__dirname + '/separators.txt', 'utf8'); +console.log(text); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/separators.txt b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/separators.txt new file mode 100644 index 00000000..397be6c2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/separators.txt @@ -0,0 +1,3 @@ + +LINE_SEPARATOR: 
 (U+2028) +PARAGRAPH_SEPARATOR: 
 (U+2029) diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/tr.beep b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/tr.beep new file mode 100644 index 00000000..099c81a4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/tr.beep @@ -0,0 +1,3 @@ +var fs = require('fs'); +var html = fs.readFileSync(__dirname + '/tr.html', 'utf8'); +console.log((FN(){ return html.length })()); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/tr.html b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/tr.html new file mode 100644 index 00000000..23b6223c --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/tr.html @@ -0,0 +1 @@ +

    abc

    diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/with_comments.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/with_comments.js new file mode 100644 index 00000000..5dc7d4e0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/files/with_comments.js @@ -0,0 +1,20 @@ +var + /** + * Dependencies. + */ + fs = require('fs'), + + /** + * Local variables. + */ + style = fs.readFileSync(__dirname + '/robot.html', 'utf8'); + + +module.exports = function () { + var + tag = document.createElement('style'), + content = document.createTextNode(style); + + tag.appendChild(content); + document.body.appendChild(tag); +}; diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/hoist.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/hoist.js new file mode 100644 index 00000000..f3017903 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/hoist.js @@ -0,0 +1,25 @@ +var test = require('tap').test; +var browserify = require('browserify'); + +var vm = require('vm'); +var fs = require('fs'); +var path = require('path'); + +var html = fs.readFileSync(__dirname + '/files/robot.html', 'utf8'); + +test('hoisted fs declaration', function (t) { + t.plan(1); + + var b = browserify(); + b.add(__dirname + '/files/hoist.js'); + b.transform(path.dirname(__dirname)); + + b.bundle(function (err, src) { + if (err) t.fail(err); + vm.runInNewContext(src, { console: { log: log } }); + }); + + function log (msg) { + t.equal(html, msg); + } +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/inline.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/inline.js new file mode 100644 index 00000000..2fc436c4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/inline.js @@ -0,0 +1,25 @@ +var test = require('tap').test; +var browserify = require('browserify'); + +var vm = require('vm'); +var fs = require('fs'); +var path = require('path'); + +var html = fs.readFileSync(__dirname + '/files/robot.html', 'utf8'); + +test('bundle a file', function (t) { + t.plan(1); + + var b = browserify(); + b.add(__dirname + '/files/inline.js'); + b.transform(path.dirname(__dirname)); + + b.bundle(function (err, src) { + if (err) t.fail(err); + vm.runInNewContext(src, { console: { log: log } }); + }); + + function log (msg) { + t.equal(html, msg); + } +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/multi_var.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/multi_var.js new file mode 100644 index 00000000..59b9d51e --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/multi_var.js @@ -0,0 +1,25 @@ +var test = require('tap').test; +var browserify = require('browserify'); + +var vm = require('vm'); +var fs = require('fs'); +var path = require('path'); + +var html = fs.readFileSync(__dirname + '/files/robot.html', 'utf8'); + +test('multiple var assignments', function (t) { + t.plan(1); + + var b = browserify(); + b.add(__dirname + '/files/multi_var.js'); + b.transform(path.dirname(__dirname)); + + b.bundle(function (err, src) { + if (err) t.fail(err); + vm.runInNewContext(src, { console: { log: log } }); + }); + + function log (msg) { + t.equal(html, msg); + } +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/non_fs.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/non_fs.js new file mode 100644 index 00000000..67f205b9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/non_fs.js @@ -0,0 +1,25 @@ +var test = require('tap').test; +var browserify = require('browserify'); + +var vm = require('vm'); +var fs = require('fs'); +var path = require('path'); + +var html = fs.readFileSync(__dirname + '/files/robot.html', 'utf8'); + +test('bundle a file', function (t) { + t.plan(1); + + var b = browserify(); + b.add(__dirname + '/files/non_fs.js'); + b.transform(path.dirname(__dirname)); + + b.bundle(function (err, src) { + if (err) t.fail(err); + vm.runInNewContext(src, { console: { log: log } }); + }); + + function log (msg) { + t.equal(html, msg); + } +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/path_join.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/path_join.js new file mode 100644 index 00000000..c6159c7c --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/path_join.js @@ -0,0 +1,25 @@ +var test = require('tap').test; +var browserify = require('browserify'); + +var vm = require('vm'); +var fs = require('fs'); +var path = require('path'); + +var html = fs.readFileSync(__dirname + '/files/robot.html', 'utf8'); + +test('path.join', function (t) { + t.plan(1); + + var b = browserify(); + b.add(__dirname + '/files/path_join.js'); + b.transform(path.dirname(__dirname)); + + b.bundle(function (err, src) { + if (err) t.fail(err); + vm.runInNewContext(src, { console: { log: log } }); + }); + + function log (msg) { + t.equal(html, msg); + } +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/path_join_other_name.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/path_join_other_name.js new file mode 100644 index 00000000..8d188c69 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/path_join_other_name.js @@ -0,0 +1,25 @@ +var test = require('tap').test; +var browserify = require('browserify'); + +var vm = require('vm'); +var fs = require('fs'); +var path = require('path'); + +var html = fs.readFileSync(__dirname + '/files/robot.html', 'utf8'); + +test('path.join other name', function (t) { + t.plan(1); + + var b = browserify(); + b.add(__dirname + '/files/path_join_other_name.js'); + b.transform(path.dirname(__dirname)); + + b.bundle(function (err, src) { + if (err) t.fail(err); + vm.runInNewContext(src, { console: { log: log } }); + }); + + function log (msg) { + t.equal(html, msg); + } +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/path_join_single_var.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/path_join_single_var.js new file mode 100644 index 00000000..47d1834e --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/path_join_single_var.js @@ -0,0 +1,25 @@ +var test = require('tap').test; +var browserify = require('browserify'); + +var vm = require('vm'); +var fs = require('fs'); +var path = require('path'); + +var html = fs.readFileSync(__dirname + '/files/robot.html', 'utf8'); + +test('path.join single var', function (t) { + t.plan(1); + + var b = browserify(); + b.add(__dirname + '/files/path_join_single_var.js'); + b.transform(path.dirname(__dirname)); + + b.bundle(function (err, src) { + if (err) t.fail(err); + vm.runInNewContext(src, { console: { log: log } }); + }); + + function log (msg) { + t.equal(html, msg); + } +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/readdir.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/readdir.js new file mode 100644 index 00000000..7be2cfca --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/readdir.js @@ -0,0 +1,43 @@ +var browserify = require('browserify'); +var test = require('tap').test; + +var path = require('path'); +var vm = require('vm'); +var fs = require('fs'); + +test('readdir', function(t) { + t.plan(1); + + var expected = fs.readdirSync(__dirname + '/files'); + var b = browserify(__dirname + '/files/readdir.js'); + b.transform(path.dirname(__dirname)); + b.bundle(function(err, src) { + if (err) t.fail(err); + vm.runInNewContext(src, { + console: { log: log }, + setTimeout: setTimeout + }); + }); + + function log(actual) { + t.deepEqual(expected, actual); + } +}); + +test('readdirSync', function(t) { + t.plan(1); + + var expected = fs.readdirSync(__dirname + '/files'); + var b = browserify(__dirname + '/files/readdir-sync.js'); + b.transform(path.dirname(__dirname)); + b.bundle(function(err, src) { + if (err) t.fail(err); + vm.runInNewContext(src, { + console: { log: log } + }); + }); + + function log(actual) { + t.deepEqual(expected, actual); + } +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/require_resolve.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/require_resolve.js new file mode 100644 index 00000000..3f9b685b --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/require_resolve.js @@ -0,0 +1,21 @@ +var test = require('tap').test; +var browserify = require('browserify'); + +var vm = require('vm'); +var fs = require('fs'); +var path = require('path'); + +test('require.resolve', function (t) { + t.plan(2); + + var b = browserify(); + b.add(__dirname + '/require_resolve/main.js'); + b.transform(path.dirname(__dirname)); + + b.bundle(function (err, src) { + t.ifError(err); + vm.runInNewContext(src, { console: { log: log } }); + }); + + function log (msg) { t.equal(msg, 'amaze\n') } +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/require_resolve/main.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/require_resolve/main.js new file mode 100644 index 00000000..3d1c00fc --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/require_resolve/main.js @@ -0,0 +1,4 @@ +var fs = require('fs'); +var path = require('path'); +var html = fs.readFileSync(require.resolve('aaa/wow.txt'), 'utf8'); +console.log(html); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/require_resolve/node_modules/aaa/wow.txt b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/require_resolve/node_modules/aaa/wow.txt new file mode 100644 index 00000000..ebb12c35 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/require_resolve/node_modules/aaa/wow.txt @@ -0,0 +1 @@ +amaze diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/separators.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/separators.js new file mode 100644 index 00000000..c4754aa7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/separators.js @@ -0,0 +1,45 @@ +var test = require('tap').test; +var exec = require('child_process').exec; + +var browserify = require('browserify'); +var path = require('path'); +var vm = require('vm'); +var fs = require('fs'); + +var text = fs.readFileSync(__dirname + '/files/separators.txt', 'utf8'); + +test('run file with special unicode separators', function (t) { + t.plan(1); + exec(__dirname + '/../bin/cmd.js ' + __dirname + '/files/separators.js', + function (error, stdout, stderr) { + if (error !== null) { + t.fail(); + } else { + vm.runInNewContext(stdout, { + require: function () {}, + console: { log: log } + }); + function log (msg) { + t.equal(text, msg); + }; + }; + } + ); +}); + +test('bundle file with special unicode separators', function (t) { + t.plan(1); + + var b = browserify(); + b.add(__dirname + '/files/separators.js'); + b.transform(path.dirname(__dirname)); + + b.bundle(function (err, src) { + if (err) t.fail(err); + vm.runInNewContext(src, { console: { log: log } }); + }); + + function log (msg) { + t.equal(text, msg); + } +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/tr.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/tr.js new file mode 100644 index 00000000..3a9b2631 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/tr.js @@ -0,0 +1,41 @@ +var test = require('tap').test; +var browserify = require('browserify'); +var through = require('through'); + +var vm = require('vm'); +var fs = require('fs'); +var path = require('path'); + +test('parse non-js, non-json files', function (t) { + t.plan(2); + + var b = browserify(); + b.add(__dirname + '/files/tr.beep'); + b.transform(function (file) { + var buffers = []; + if (!/\.beep$/.test(file)) return through(); + return through(write, end); + + function write (buf) { buffers.push(buf) } + function end () { + var src = Buffer.concat(buffers).toString('utf8'); + this.queue(src.replace(/\bFN\b/g, 'function')); + this.queue(null); + } + }); + b.transform(path.dirname(__dirname)); + + var bs = b.bundle(function (err, src) { + if (err) t.fail(err); + vm.runInNewContext(src, { console: { log: log } }); + }); + bs.on('transform', function (tr) { + tr.on('file', function (file) { + t.equal(file, __dirname + '/files/tr.html'); + }); + }); + + function log (msg) { + t.equal(13, msg); + } +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/with_comments.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/with_comments.js new file mode 100644 index 00000000..a388e2e1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs/test/with_comments.js @@ -0,0 +1,27 @@ +var test = require('tap').test; +var browserify = require('browserify'); + +var vm = require('vm'); +var fs = require('fs'); +var path = require('path'); + +var html = fs.readFileSync(__dirname + '/files/robot.html', 'utf8'); + +test('with comment separators', function (t) { + t.plan(1); + + var b = browserify(); + b.add(__dirname + '/files/with_comments.js'); + b.transform(path.dirname(__dirname)); + + b.bundle(function (err, src) { + console.error("NOT PRESENTLY WORKING: with_comments.js"); + t.ok(true, 'failing test'); + // if (err) t.fail(err); + // vm.runInNewContext(src, { console: { log: log } }); + }); + + function log (msg) { + t.equal(html, msg); + } +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/isarray/.npmignore b/pitfall/pdfkit/node_modules/fontkit/node_modules/isarray/.npmignore new file mode 100644 index 00000000..3c3629e6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/isarray/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/isarray/.travis.yml b/pitfall/pdfkit/node_modules/fontkit/node_modules/isarray/.travis.yml new file mode 100644 index 00000000..cc4dba29 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/isarray/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.8" + - "0.10" diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/isarray/Makefile b/pitfall/pdfkit/node_modules/fontkit/node_modules/isarray/Makefile new file mode 100644 index 00000000..787d56e1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/isarray/Makefile @@ -0,0 +1,6 @@ + +test: + @node_modules/.bin/tape test.js + +.PHONY: test + diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/isarray/README.md b/pitfall/pdfkit/node_modules/fontkit/node_modules/isarray/README.md new file mode 100644 index 00000000..16d2c59c --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/isarray/README.md @@ -0,0 +1,60 @@ + +# isarray + +`Array#isArray` for older browsers. + +[![build status](https://secure.travis-ci.org/juliangruber/isarray.svg)](http://travis-ci.org/juliangruber/isarray) +[![downloads](https://img.shields.io/npm/dm/isarray.svg)](https://www.npmjs.org/package/isarray) + +[![browser support](https://ci.testling.com/juliangruber/isarray.png) +](https://ci.testling.com/juliangruber/isarray) + +## Usage + +```js +var isArray = require('isarray'); + +console.log(isArray([])); // => true +console.log(isArray({})); // => false +``` + +## Installation + +With [npm](http://npmjs.org) do + +```bash +$ npm install isarray +``` + +Then bundle for the browser with +[browserify](https://github.com/substack/browserify). + +With [component](http://component.io) do + +```bash +$ component install juliangruber/isarray +``` + +## License + +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/isarray/component.json b/pitfall/pdfkit/node_modules/fontkit/node_modules/isarray/component.json new file mode 100644 index 00000000..9e31b683 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/isarray/component.json @@ -0,0 +1,19 @@ +{ + "name" : "isarray", + "description" : "Array#isArray for older browsers", + "version" : "0.0.1", + "repository" : "juliangruber/isarray", + "homepage": "https://github.com/juliangruber/isarray", + "main" : "index.js", + "scripts" : [ + "index.js" + ], + "dependencies" : {}, + "keywords": ["browser","isarray","array"], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "license": "MIT" +} diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/isarray/index.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/isarray/index.js new file mode 100644 index 00000000..a57f6349 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/isarray/index.js @@ -0,0 +1,5 @@ +var toString = {}.toString; + +module.exports = Array.isArray || function (arr) { + return toString.call(arr) == '[object Array]'; +}; diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/isarray/package.json b/pitfall/pdfkit/node_modules/fontkit/node_modules/isarray/package.json new file mode 100644 index 00000000..4c1e72dc --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/isarray/package.json @@ -0,0 +1,116 @@ +{ + "_args": [ + [ + { + "raw": "isarray@~1.0.0", + "scope": null, + "escapedName": "isarray", + "name": "isarray", + "rawSpec": "~1.0.0", + "spec": ">=1.0.0 <1.1.0", + "type": "range" + }, + "/Users/MB/git/pitfall/pdfkit/node_modules/quote-stream/node_modules/readable-stream" + ], + [ + { + "raw": "isarray@~1.0.0", + "scope": null, + "escapedName": "isarray", + "name": "isarray", + "rawSpec": "~1.0.0", + "spec": ">=1.0.0 <1.1.0", + "type": "range" + }, + "/Users/MB/git/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream" + ] + ], + "_from": "isarray@~1.0.0", + "_id": "isarray@1.0.0", + "_inCache": true, + "_location": "/fontkit/isarray", + "_nodeVersion": "5.1.0", + "_npmUser": { + "name": "juliangruber", + "email": "julian@juliangruber.com" + }, + "_npmVersion": "3.3.12", + "_phantomChildren": {}, + "_requested": { + "raw": "isarray@~1.0.0", + "scope": null, + "escapedName": "isarray", + "name": "isarray", + "rawSpec": "~1.0.0", + "spec": ">=1.0.0 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "/fontkit/readable-stream" + ], + "_resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "_shasum": "bb935d48582cba168c06834957a54a3e07124f11", + "_shrinkwrap": null, + "_spec": "isarray@~1.0.0", + "_where": "/Users/MB/git/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream", + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "bugs": { + "url": "https://github.com/juliangruber/isarray/issues" + }, + "dependencies": {}, + "description": "Array#isArray for older browsers", + "devDependencies": { + "tape": "~2.13.4" + }, + "directories": {}, + "dist": { + "shasum": "bb935d48582cba168c06834957a54a3e07124f11", + "tarball": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz" + }, + "gitHead": "2a23a281f369e9ae06394c0fb4d2381355a6ba33", + "homepage": "https://github.com/juliangruber/isarray", + "keywords": [ + "browser", + "isarray", + "array" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "juliangruber", + "email": "julian@juliangruber.com" + } + ], + "name": "isarray", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/isarray.git" + }, + "scripts": { + "test": "tape test.js" + }, + "testling": { + "files": "test.js", + "browsers": [ + "ie/8..latest", + "firefox/17..latest", + "firefox/nightly", + "chrome/22..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + }, + "version": "1.0.0" +} diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/isarray/test.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/isarray/test.js new file mode 100644 index 00000000..e0c3444d --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/isarray/test.js @@ -0,0 +1,20 @@ +var isArray = require('./'); +var test = require('tape'); + +test('is array', function(t){ + t.ok(isArray([])); + t.notOk(isArray({})); + t.notOk(isArray(null)); + t.notOk(isArray(false)); + + var obj = {}; + obj[0] = true; + t.notOk(isArray(obj)); + + var arr = []; + arr.foo = 'bar'; + t.ok(isArray(arr)); + + t.end(); +}); + diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/.npmignore b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/.npmignore new file mode 100644 index 00000000..6d270c6c --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/.npmignore @@ -0,0 +1,9 @@ +build/ +test/ +examples/ +fs.js +zlib.js +.zuul.yml +.nyc_output +coverage +docs/ diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/.travis.yml b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/.travis.yml new file mode 100644 index 00000000..76b4b0cf --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/.travis.yml @@ -0,0 +1,49 @@ +sudo: false +language: node_js +before_install: + - npm install -g npm@2 + - npm install -g npm +notifications: + email: false +matrix: + fast_finish: true + include: + - node_js: '0.8' + env: TASK=test + - node_js: '0.10' + env: TASK=test + - node_js: '0.11' + env: TASK=test + - node_js: '0.12' + env: TASK=test + - node_js: 1 + env: TASK=test + - node_js: 2 + env: TASK=test + - node_js: 3 + env: TASK=test + - node_js: 4 + env: TASK=test + - node_js: 5 + env: TASK=test + - node_js: 6 + env: TASK=test + - node_js: 7 + env: TASK=test + - node_js: 5 + env: TASK=browser BROWSER_NAME=ie BROWSER_VERSION="9..latest" + - node_js: 5 + env: TASK=browser BROWSER_NAME=opera BROWSER_VERSION="11..latest" + - node_js: 5 + env: TASK=browser BROWSER_NAME=chrome BROWSER_VERSION="-3..latest" + - node_js: 5 + env: TASK=browser BROWSER_NAME=firefox BROWSER_VERSION="-3..latest" + - node_js: 5 + env: TASK=browser BROWSER_NAME=safari BROWSER_VERSION="5..latest" + - node_js: 5 + env: TASK=browser BROWSER_NAME=microsoftedge BROWSER_VERSION=latest +script: "npm run $TASK" +env: + global: + - secure: rE2Vvo7vnjabYNULNyLFxOyt98BoJexDqsiOnfiD6kLYYsiQGfr/sbZkPMOFm9qfQG7pjqx+zZWZjGSswhTt+626C0t/njXqug7Yps4c3dFblzGfreQHp7wNX5TFsvrxd6dAowVasMp61sJcRnB2w8cUzoe3RAYUDHyiHktwqMc= + - secure: g9YINaKAdMatsJ28G9jCGbSaguXCyxSTy+pBO6Ch0Cf57ZLOTka3HqDj8p3nV28LUIHZ3ut5WO43CeYKwt4AUtLpBS3a0dndHdY6D83uY6b2qh5hXlrcbeQTq2cvw2y95F7hm4D1kwrgZ7ViqaKggRcEupAL69YbJnxeUDKWEdI= diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/CONTRIBUTING.md b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/CONTRIBUTING.md new file mode 100644 index 00000000..f478d58d --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/CONTRIBUTING.md @@ -0,0 +1,38 @@ +# Developer's Certificate of Origin 1.1 + +By making a contribution to this project, I certify that: + +* (a) The contribution was created in whole or in part by me and I + have the right to submit it under the open source license + indicated in the file; or + +* (b) The contribution is based upon previous work that, to the best + of my knowledge, is covered under an appropriate open source + license and I have the right under that license to submit that + work with modifications, whether created in whole or in part + by me, under the same open source license (unless I am + permitted to submit under a different license), as indicated + in the file; or + +* (c) The contribution was provided directly to me by some other + person who certified (a), (b) or (c) and I have not modified + it. + +* (d) I understand and agree that this project and the contribution + are public and that a record of the contribution (including all + personal information I submit with it, including my sign-off) is + maintained indefinitely and may be redistributed consistent with + this project or the open source license(s) involved. + +## Moderation Policy + +The [Node.js Moderation Policy] applies to this WG. + +## Code of Conduct + +The [Node.js Code of Conduct][] applies to this WG. + +[Node.js Code of Conduct]: +https://github.com/nodejs/node/blob/master/CODE_OF_CONDUCT.md +[Node.js Moderation Policy]: +https://github.com/nodejs/TSC/blob/master/Moderation-Policy.md diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/GOVERNANCE.md b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/GOVERNANCE.md new file mode 100644 index 00000000..16ffb93f --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/GOVERNANCE.md @@ -0,0 +1,136 @@ +### Streams Working Group + +The Node.js Streams is jointly governed by a Working Group +(WG) +that is responsible for high-level guidance of the project. + +The WG has final authority over this project including: + +* Technical direction +* Project governance and process (including this policy) +* Contribution policy +* GitHub repository hosting +* Conduct guidelines +* Maintaining the list of additional Collaborators + +For the current list of WG members, see the project +[README.md](./README.md#current-project-team-members). + +### Collaborators + +The readable-stream GitHub repository is +maintained by the WG and additional Collaborators who are added by the +WG on an ongoing basis. + +Individuals making significant and valuable contributions are made +Collaborators and given commit-access to the project. These +individuals are identified by the WG and their addition as +Collaborators is discussed during the WG meeting. + +_Note:_ If you make a significant contribution and are not considered +for commit-access log an issue or contact a WG member directly and it +will be brought up in the next WG meeting. + +Modifications of the contents of the readable-stream repository are +made on +a collaborative basis. Anybody with a GitHub account may propose a +modification via pull request and it will be considered by the project +Collaborators. All pull requests must be reviewed and accepted by a +Collaborator with sufficient expertise who is able to take full +responsibility for the change. In the case of pull requests proposed +by an existing Collaborator, an additional Collaborator is required +for sign-off. Consensus should be sought if additional Collaborators +participate and there is disagreement around a particular +modification. See _Consensus Seeking Process_ below for further detail +on the consensus model used for governance. + +Collaborators may opt to elevate significant or controversial +modifications, or modifications that have not found consensus to the +WG for discussion by assigning the ***WG-agenda*** tag to a pull +request or issue. The WG should serve as the final arbiter where +required. + +For the current list of Collaborators, see the project +[README.md](./README.md#members). + +### WG Membership + +WG seats are not time-limited. There is no fixed size of the WG. +However, the expected target is between 6 and 12, to ensure adequate +coverage of important areas of expertise, balanced with the ability to +make decisions efficiently. + +There is no specific set of requirements or qualifications for WG +membership beyond these rules. + +The WG may add additional members to the WG by unanimous consensus. + +A WG member may be removed from the WG by voluntary resignation, or by +unanimous consensus of all other WG members. + +Changes to WG membership should be posted in the agenda, and may be +suggested as any other agenda item (see "WG Meetings" below). + +If an addition or removal is proposed during a meeting, and the full +WG is not in attendance to participate, then the addition or removal +is added to the agenda for the subsequent meeting. This is to ensure +that all members are given the opportunity to participate in all +membership decisions. If a WG member is unable to attend a meeting +where a planned membership decision is being made, then their consent +is assumed. + +No more than 1/3 of the WG members may be affiliated with the same +employer. If removal or resignation of a WG member, or a change of +employment by a WG member, creates a situation where more than 1/3 of +the WG membership shares an employer, then the situation must be +immediately remedied by the resignation or removal of one or more WG +members affiliated with the over-represented employer(s). + +### WG Meetings + +The WG meets occasionally on a Google Hangout On Air. A designated moderator +approved by the WG runs the meeting. Each meeting should be +published to YouTube. + +Items are added to the WG agenda that are considered contentious or +are modifications of governance, contribution policy, WG membership, +or release process. + +The intention of the agenda is not to approve or review all patches; +that should happen continuously on GitHub and be handled by the larger +group of Collaborators. + +Any community member or contributor can ask that something be added to +the next meeting's agenda by logging a GitHub Issue. Any Collaborator, +WG member or the moderator can add the item to the agenda by adding +the ***WG-agenda*** tag to the issue. + +Prior to each WG meeting the moderator will share the Agenda with +members of the WG. WG members can add any items they like to the +agenda at the beginning of each meeting. The moderator and the WG +cannot veto or remove items. + +The WG may invite persons or representatives from certain projects to +participate in a non-voting capacity. + +The moderator is responsible for summarizing the discussion of each +agenda item and sends it as a pull request after the meeting. + +### Consensus Seeking Process + +The WG follows a +[Consensus +Seeking](http://en.wikipedia.org/wiki/Consensus-seeking_decision-making) +decision-making model. + +When an agenda item has appeared to reach a consensus the moderator +will ask "Does anyone object?" as a final call for dissent from the +consensus. + +If an agenda item cannot reach a consensus a WG member can call for +either a closing vote or a vote to table the issue to the next +meeting. The call for a vote must be seconded by a majority of the WG +or else the discussion will continue. Simple majority wins. + +Note that changes to WG membership require a majority consensus. See +"WG Membership" above. diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/LICENSE b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/LICENSE new file mode 100644 index 00000000..2873b3b2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/LICENSE @@ -0,0 +1,47 @@ +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND 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. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND 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. +""" diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/README.md b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/README.md new file mode 100644 index 00000000..8b6e5d39 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/README.md @@ -0,0 +1,57 @@ +# readable-stream + +***Node-core v7.0.0 streams for userland*** [![Build Status](https://travis-ci.org/nodejs/readable-stream.svg?branch=master)](https://travis-ci.org/nodejs/readable-stream) + + +[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) +[![NPM](https://nodei.co/npm-dl/readable-stream.png?&months=6&height=3)](https://nodei.co/npm/readable-stream/) + + +[![Sauce Test Status](https://saucelabs.com/browser-matrix/readable-stream.svg)](https://saucelabs.com/u/readable-stream) + +```bash +npm install --save readable-stream +``` + +***Node-core streams for userland*** + +This package is a mirror of the Streams2 and Streams3 implementations in +Node-core. + +Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v7.8.0/docs/api/). + +If you want to guarantee a stable streams base, regardless of what version of +Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core, for background see [this blogpost](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html). + +As of version 2.0.0 **readable-stream** uses semantic versioning. + +# Streams Working Group + +`readable-stream` is maintained by the Streams Working Group, which +oversees the development and maintenance of the Streams API within +Node.js. The responsibilities of the Streams Working Group include: + +* Addressing stream issues on the Node.js issue tracker. +* Authoring and editing stream documentation within the Node.js project. +* Reviewing changes to stream subclasses within the Node.js project. +* Redirecting changes to streams from the Node.js project to this + project. +* Assisting in the implementation of stream providers within Node.js. +* Recommending versions of `readable-stream` to be included in Node.js. +* Messaging about the future of streams to give the community advance + notice of changes. + + +## Team Members + +* **Chris Dickinson** ([@chrisdickinson](https://github.com/chrisdickinson)) <christopher.s.dickinson@gmail.com> + - Release GPG key: 9554F04D7259F04124DE6B476D5A82AC7E37093B +* **Calvin Metcalf** ([@calvinmetcalf](https://github.com/calvinmetcalf)) <calvin.metcalf@gmail.com> + - Release GPG key: F3EF5F62A87FC27A22E643F714CE4FF5015AA242 +* **Rod Vagg** ([@rvagg](https://github.com/rvagg)) <rod@vagg.org> + - Release GPG key: DD8F2338BAE7501E3DD5AC78C273792F7D83545D +* **Sam Newman** ([@sonewman](https://github.com/sonewman)) <newmansam@outlook.com> +* **Mathias Buus** ([@mafintosh](https://github.com/mafintosh)) <mathiasbuus@gmail.com> +* **Domenic Denicola** ([@domenic](https://github.com/domenic)) <d@domenic.me> +* **Matteo Collina** ([@mcollina](https://github.com/mcollina)) <matteo.collina@gmail.com> + - Release GPG key: 3ABC01543F22DD2239285CDD818674489FBC127E diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md new file mode 100644 index 00000000..83275f19 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/doc/wg-meetings/2015-01-30.md @@ -0,0 +1,60 @@ +# streams WG Meeting 2015-01-30 + +## Links + +* **Google Hangouts Video**: http://www.youtube.com/watch?v=I9nDOSGfwZg +* **GitHub Issue**: https://github.com/iojs/readable-stream/issues/106 +* **Original Minutes Google Doc**: https://docs.google.com/document/d/17aTgLnjMXIrfjgNaTUnHQO7m3xgzHR2VXBTmi03Qii4/ + +## Agenda + +Extracted from https://github.com/iojs/readable-stream/labels/wg-agenda prior to meeting. + +* adopt a charter [#105](https://github.com/iojs/readable-stream/issues/105) +* release and versioning strategy [#101](https://github.com/iojs/readable-stream/issues/101) +* simpler stream creation [#102](https://github.com/iojs/readable-stream/issues/102) +* proposal: deprecate implicit flowing of streams [#99](https://github.com/iojs/readable-stream/issues/99) + +## Minutes + +### adopt a charter + +* group: +1's all around + +### What versioning scheme should be adopted? +* group: +1’s 3.0.0 +* domenic+group: pulling in patches from other sources where appropriate +* mikeal: version independently, suggesting versions for io.js +* mikeal+domenic: work with TC to notify in advance of changes +simpler stream creation + +### streamline creation of streams +* sam: streamline creation of streams +* domenic: nice simple solution posted + but, we lose the opportunity to change the model + may not be backwards incompatible (double check keys) + + **action item:** domenic will check + +### remove implicit flowing of streams on(‘data’) +* add isFlowing / isPaused +* mikeal: worrying that we’re documenting polyfill methods – confuses users +* domenic: more reflective API is probably good, with warning labels for users +* new section for mad scientists (reflective stream access) +* calvin: name the “third state” +* mikeal: maybe borrow the name from whatwg? +* domenic: we’re missing the “third state” +* consensus: kind of difficult to name the third state +* mikeal: figure out differences in states / compat +* mathias: always flow on data – eliminates third state + * explore what it breaks + +**action items:** +* ask isaac for ability to list packages by what public io.js APIs they use (esp. Stream) +* ask rod/build for infrastructure +* **chris**: explore the “flow on data” approach +* add isPaused/isFlowing +* add new docs section +* move isPaused to that section + + diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/duplex-browser.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/duplex-browser.js new file mode 100644 index 00000000..f8b2db83 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/duplex-browser.js @@ -0,0 +1 @@ +module.exports = require('./lib/_stream_duplex.js'); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/duplex.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/duplex.js new file mode 100644 index 00000000..46924cbf --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/duplex.js @@ -0,0 +1 @@ +module.exports = require('./readable').Duplex diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/lib/_stream_duplex.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/lib/_stream_duplex.js new file mode 100644 index 00000000..736693b8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/lib/_stream_duplex.js @@ -0,0 +1,75 @@ +// a duplex stream is just a stream that is both readable and writable. +// Since JS doesn't have multiple prototypal inheritance, this class +// prototypally inherits from Readable, and then parasitically from +// Writable. + +'use strict'; + +/**/ + +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) { + keys.push(key); + }return keys; +}; +/**/ + +module.exports = Duplex; + +/**/ +var processNextTick = require('process-nextick-args'); +/**/ + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +var Readable = require('./_stream_readable'); +var Writable = require('./_stream_writable'); + +util.inherits(Duplex, Readable); + +var keys = objectKeys(Writable.prototype); +for (var v = 0; v < keys.length; v++) { + var method = keys[v]; + if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method]; +} + +function Duplex(options) { + if (!(this instanceof Duplex)) return new Duplex(options); + + Readable.call(this, options); + Writable.call(this, options); + + if (options && options.readable === false) this.readable = false; + + if (options && options.writable === false) this.writable = false; + + this.allowHalfOpen = true; + if (options && options.allowHalfOpen === false) this.allowHalfOpen = false; + + this.once('end', onend); +} + +// the no-half-open enforcer +function onend() { + // if we allow half-open state, or if the writable side ended, + // then we're ok. + if (this.allowHalfOpen || this._writableState.ended) return; + + // no more data can be written. + // But allow more writes to happen in this tick. + processNextTick(onEndNT, this); +} + +function onEndNT(self) { + self.end(); +} + +function forEach(xs, f) { + for (var i = 0, l = xs.length; i < l; i++) { + f(xs[i], i); + } +} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/lib/_stream_passthrough.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/lib/_stream_passthrough.js new file mode 100644 index 00000000..d06f71f1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/lib/_stream_passthrough.js @@ -0,0 +1,26 @@ +// a passthrough stream. +// basically just the most minimal sort of Transform stream. +// Every written chunk gets output as-is. + +'use strict'; + +module.exports = PassThrough; + +var Transform = require('./_stream_transform'); + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +util.inherits(PassThrough, Transform); + +function PassThrough(options) { + if (!(this instanceof PassThrough)) return new PassThrough(options); + + Transform.call(this, options); +} + +PassThrough.prototype._transform = function (chunk, encoding, cb) { + cb(null, chunk); +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/lib/_stream_readable.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/lib/_stream_readable.js new file mode 100644 index 00000000..b19b2088 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/lib/_stream_readable.js @@ -0,0 +1,935 @@ +'use strict'; + +module.exports = Readable; + +/**/ +var processNextTick = require('process-nextick-args'); +/**/ + +/**/ +var isArray = require('isarray'); +/**/ + +/**/ +var Duplex; +/**/ + +Readable.ReadableState = ReadableState; + +/**/ +var EE = require('events').EventEmitter; + +var EElistenerCount = function (emitter, type) { + return emitter.listeners(type).length; +}; +/**/ + +/**/ +var Stream = require('./internal/streams/stream'); +/**/ + +var Buffer = require('buffer').Buffer; +/**/ +var bufferShim = require('buffer-shims'); +/**/ + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +/**/ +var debugUtil = require('util'); +var debug = void 0; +if (debugUtil && debugUtil.debuglog) { + debug = debugUtil.debuglog('stream'); +} else { + debug = function () {}; +} +/**/ + +var BufferList = require('./internal/streams/BufferList'); +var StringDecoder; + +util.inherits(Readable, Stream); + +var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume']; + +function prependListener(emitter, event, fn) { + // Sadly this is not cacheable as some libraries bundle their own + // event emitter implementation with them. + if (typeof emitter.prependListener === 'function') { + return emitter.prependListener(event, fn); + } else { + // This is a hack to make sure that our error handler is attached before any + // userland ones. NEVER DO THIS. This is here only because this code needs + // to continue to work with older versions of Node.js that do not include + // the prependListener() method. The goal is to eventually remove this hack. + if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);else if (isArray(emitter._events[event])) emitter._events[event].unshift(fn);else emitter._events[event] = [fn, emitter._events[event]]; + } +} + +function ReadableState(options, stream) { + Duplex = Duplex || require('./_stream_duplex'); + + options = options || {}; + + // object stream flag. Used to make read(n) ignore n and to + // make all the buffer merging and length checks go away + this.objectMode = !!options.objectMode; + + if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.readableObjectMode; + + // the point at which it stops calling _read() to fill the buffer + // Note: 0 is a valid value, means "don't call _read preemptively ever" + var hwm = options.highWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; + + // cast to ints. + this.highWaterMark = ~~this.highWaterMark; + + // A linked list is used to store data chunks instead of an array because the + // linked list can remove elements from the beginning faster than + // array.shift() + this.buffer = new BufferList(); + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = null; + this.ended = false; + this.endEmitted = false; + this.reading = false; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, because any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // whenever we return null, then we set a flag to say + // that we're awaiting a 'readable' event emission. + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + this.resumeScheduled = false; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // when piping, we only care about 'readable' events that happen + // after read()ing all the bytes and not getting any pushback. + this.ranOut = false; + + // the number of writers that are awaiting a drain event in .pipe()s + this.awaitDrain = 0; + + // if true, a maybeReadMore has been scheduled + this.readingMore = false; + + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } +} + +function Readable(options) { + Duplex = Duplex || require('./_stream_duplex'); + + if (!(this instanceof Readable)) return new Readable(options); + + this._readableState = new ReadableState(options, this); + + // legacy + this.readable = true; + + if (options && typeof options.read === 'function') this._read = options.read; + + Stream.call(this); +} + +// Manually shove something into the read() buffer. +// This returns true if the highWaterMark has not been hit yet, +// similar to how Writable.write() returns true if you should +// write() some more. +Readable.prototype.push = function (chunk, encoding) { + var state = this._readableState; + + if (!state.objectMode && typeof chunk === 'string') { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = bufferShim.from(chunk, encoding); + encoding = ''; + } + } + + return readableAddChunk(this, state, chunk, encoding, false); +}; + +// Unshift should *always* be something directly out of read() +Readable.prototype.unshift = function (chunk) { + var state = this._readableState; + return readableAddChunk(this, state, chunk, '', true); +}; + +Readable.prototype.isPaused = function () { + return this._readableState.flowing === false; +}; + +function readableAddChunk(stream, state, chunk, encoding, addToFront) { + var er = chunkInvalid(state, chunk); + if (er) { + stream.emit('error', er); + } else if (chunk === null) { + state.reading = false; + onEofChunk(stream, state); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (state.ended && !addToFront) { + var e = new Error('stream.push() after EOF'); + stream.emit('error', e); + } else if (state.endEmitted && addToFront) { + var _e = new Error('stream.unshift() after end event'); + stream.emit('error', _e); + } else { + var skipAdd; + if (state.decoder && !addToFront && !encoding) { + chunk = state.decoder.write(chunk); + skipAdd = !state.objectMode && chunk.length === 0; + } + + if (!addToFront) state.reading = false; + + // Don't add to the buffer if we've decoded to an empty string chunk and + // we're not in object mode + if (!skipAdd) { + // if we want the data now, just emit it. + if (state.flowing && state.length === 0 && !state.sync) { + stream.emit('data', chunk); + stream.read(0); + } else { + // update the buffer info. + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) state.buffer.unshift(chunk);else state.buffer.push(chunk); + + if (state.needReadable) emitReadable(stream); + } + } + + maybeReadMore(stream, state); + } + } else if (!addToFront) { + state.reading = false; + } + + return needMoreData(state); +} + +// if it's past the high water mark, we can push in some more. +// Also, if we have no data yet, we can stand some +// more bytes. This is to work around cases where hwm=0, +// such as the repl. Also, if the push() triggered a +// readable event, and the user called read(largeNumber) such that +// needReadable was set, then we ought to push more, so that another +// 'readable' event will be triggered. +function needMoreData(state) { + return !state.ended && (state.needReadable || state.length < state.highWaterMark || state.length === 0); +} + +// backwards compatibility. +Readable.prototype.setEncoding = function (enc) { + if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder; + this._readableState.decoder = new StringDecoder(enc); + this._readableState.encoding = enc; + return this; +}; + +// Don't raise the hwm > 8MB +var MAX_HWM = 0x800000; +function computeNewHighWaterMark(n) { + if (n >= MAX_HWM) { + n = MAX_HWM; + } else { + // Get the next highest power of 2 to prevent increasing hwm excessively in + // tiny amounts + n--; + n |= n >>> 1; + n |= n >>> 2; + n |= n >>> 4; + n |= n >>> 8; + n |= n >>> 16; + n++; + } + return n; +} + +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function howMuchToRead(n, state) { + if (n <= 0 || state.length === 0 && state.ended) return 0; + if (state.objectMode) return 1; + if (n !== n) { + // Only flow one buffer at a time + if (state.flowing && state.length) return state.buffer.head.data.length;else return state.length; + } + // If we're asking for more than the current hwm, then raise the hwm. + if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n); + if (n <= state.length) return n; + // Don't have enough + if (!state.ended) { + state.needReadable = true; + return 0; + } + return state.length; +} + +// you can override either this method, or the async _read(n) below. +Readable.prototype.read = function (n) { + debug('read', n); + n = parseInt(n, 10); + var state = this._readableState; + var nOrig = n; + + if (n !== 0) state.emittedReadable = false; + + // if we're doing read(0) to trigger a readable event, but we + // already have a bunch of data in the buffer, then just trigger + // the 'readable' event and move on. + if (n === 0 && state.needReadable && (state.length >= state.highWaterMark || state.ended)) { + debug('read: emitReadable', state.length, state.ended); + if (state.length === 0 && state.ended) endReadable(this);else emitReadable(this); + return null; + } + + n = howMuchToRead(n, state); + + // if we've ended, and we're now clear, then finish it up. + if (n === 0 && state.ended) { + if (state.length === 0) endReadable(this); + return null; + } + + // All the actual chunk generation logic needs to be + // *below* the call to _read. The reason is that in certain + // synthetic stream cases, such as passthrough streams, _read + // may be a completely synchronous operation which may change + // the state of the read buffer, providing enough data when + // before there was *not* enough. + // + // So, the steps are: + // 1. Figure out what the state of things will be after we do + // a read from the buffer. + // + // 2. If that resulting state will trigger a _read, then call _read. + // Note that this may be asynchronous, or synchronous. Yes, it is + // deeply ugly to write APIs this way, but that still doesn't mean + // that the Readable class should behave improperly, as streams are + // designed to be sync/async agnostic. + // Take note if the _read call is sync or async (ie, if the read call + // has returned yet), so that we know whether or not it's safe to emit + // 'readable' etc. + // + // 3. Actually pull the requested chunks out of the buffer and return. + + // if we need a readable event, then we need to do some reading. + var doRead = state.needReadable; + debug('need readable', doRead); + + // if we currently have less than the highWaterMark, then also read some + if (state.length === 0 || state.length - n < state.highWaterMark) { + doRead = true; + debug('length less than watermark', doRead); + } + + // however, if we've ended, then there's no point, and if we're already + // reading, then it's unnecessary. + if (state.ended || state.reading) { + doRead = false; + debug('reading or ended', doRead); + } else if (doRead) { + debug('do read'); + state.reading = true; + state.sync = true; + // if the length is currently zero, then we *need* a readable event. + if (state.length === 0) state.needReadable = true; + // call internal read method + this._read(state.highWaterMark); + state.sync = false; + // If _read pushed data synchronously, then `reading` will be false, + // and we need to re-evaluate how much data we can return to the user. + if (!state.reading) n = howMuchToRead(nOrig, state); + } + + var ret; + if (n > 0) ret = fromList(n, state);else ret = null; + + if (ret === null) { + state.needReadable = true; + n = 0; + } else { + state.length -= n; + } + + if (state.length === 0) { + // If we have nothing in the buffer, then we want to know + // as soon as we *do* get something into the buffer. + if (!state.ended) state.needReadable = true; + + // If we tried to read() past the EOF, then emit end on the next tick. + if (nOrig !== n && state.ended) endReadable(this); + } + + if (ret !== null) this.emit('data', ret); + + return ret; +}; + +function chunkInvalid(state, chunk) { + var er = null; + if (!Buffer.isBuffer(chunk) && typeof chunk !== 'string' && chunk !== null && chunk !== undefined && !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + return er; +} + +function onEofChunk(stream, state) { + if (state.ended) return; + if (state.decoder) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + state.ended = true; + + // emit 'readable' now to make sure it gets picked up. + emitReadable(stream); +} + +// Don't emit readable right away in sync mode, because this can trigger +// another read() call => stack overflow. This way, it might trigger +// a nextTick recursion warning, but that's not so bad. +function emitReadable(stream) { + var state = stream._readableState; + state.needReadable = false; + if (!state.emittedReadable) { + debug('emitReadable', state.flowing); + state.emittedReadable = true; + if (state.sync) processNextTick(emitReadable_, stream);else emitReadable_(stream); + } +} + +function emitReadable_(stream) { + debug('emit readable'); + stream.emit('readable'); + flow(stream); +} + +// at this point, the user has presumably seen the 'readable' event, +// and called read() to consume some data. that may have triggered +// in turn another _read(n) call, in which case reading = true if +// it's in progress. +// However, if we're not ended, or reading, and the length < hwm, +// then go ahead and try to read some more preemptively. +function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + processNextTick(maybeReadMore_, stream, state); + } +} + +function maybeReadMore_(stream, state) { + var len = state.length; + while (!state.reading && !state.flowing && !state.ended && state.length < state.highWaterMark) { + debug('maybeReadMore read 0'); + stream.read(0); + if (len === state.length) + // didn't get any data, stop spinning. + break;else len = state.length; + } + state.readingMore = false; +} + +// abstract method. to be overridden in specific implementation classes. +// call cb(er, data) where data is <= n in length. +// for virtual (non-string, non-buffer) streams, "length" is somewhat +// arbitrary, and perhaps not very meaningful. +Readable.prototype._read = function (n) { + this.emit('error', new Error('_read() is not implemented')); +}; + +Readable.prototype.pipe = function (dest, pipeOpts) { + var src = this; + var state = this._readableState; + + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); + + var doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process.stdout && dest !== process.stderr; + + var endFn = doEnd ? onend : cleanup; + if (state.endEmitted) processNextTick(endFn);else src.once('end', endFn); + + dest.on('unpipe', onunpipe); + function onunpipe(readable) { + debug('onunpipe'); + if (readable === src) { + cleanup(); + } + } + + function onend() { + debug('onend'); + dest.end(); + } + + // when the dest drains, it reduces the awaitDrain counter + // on the source. This would be more elegant with a .once() + // handler in flow(), but adding and removing repeatedly is + // too slow. + var ondrain = pipeOnDrain(src); + dest.on('drain', ondrain); + + var cleanedUp = false; + function cleanup() { + debug('cleanup'); + // cleanup event handlers once the pipe is broken + dest.removeListener('close', onclose); + dest.removeListener('finish', onfinish); + dest.removeListener('drain', ondrain); + dest.removeListener('error', onerror); + dest.removeListener('unpipe', onunpipe); + src.removeListener('end', onend); + src.removeListener('end', cleanup); + src.removeListener('data', ondata); + + cleanedUp = true; + + // if the reader is waiting for a drain event from this + // specific writer, then it would cause it to never start + // flowing again. + // So, if this is awaiting a drain, then we just call it now. + // If we don't know, then assume that we are waiting for one. + if (state.awaitDrain && (!dest._writableState || dest._writableState.needDrain)) ondrain(); + } + + // If the user pushes more data while we're writing to dest then we'll end up + // in ondata again. However, we only want to increase awaitDrain once because + // dest will only emit one 'drain' event for the multiple writes. + // => Introduce a guard on increasing awaitDrain. + var increasedAwaitDrain = false; + src.on('data', ondata); + function ondata(chunk) { + debug('ondata'); + increasedAwaitDrain = false; + var ret = dest.write(chunk); + if (false === ret && !increasedAwaitDrain) { + // If the user unpiped during `dest.write()`, it is possible + // to get stuck in a permanently paused state if that write + // also returned false. + // => Check whether `dest` is still a piping destination. + if ((state.pipesCount === 1 && state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) { + debug('false write response, pause', src._readableState.awaitDrain); + src._readableState.awaitDrain++; + increasedAwaitDrain = true; + } + src.pause(); + } + } + + // if the dest has an error, then stop piping into it. + // however, don't suppress the throwing behavior for this. + function onerror(er) { + debug('onerror', er); + unpipe(); + dest.removeListener('error', onerror); + if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er); + } + + // Make sure our error handler is attached before userland ones. + prependListener(dest, 'error', onerror); + + // Both close and finish should trigger unpipe, but only once. + function onclose() { + dest.removeListener('finish', onfinish); + unpipe(); + } + dest.once('close', onclose); + function onfinish() { + debug('onfinish'); + dest.removeListener('close', onclose); + unpipe(); + } + dest.once('finish', onfinish); + + function unpipe() { + debug('unpipe'); + src.unpipe(dest); + } + + // tell the dest that it's being piped to + dest.emit('pipe', src); + + // start the flow if it hasn't been started already. + if (!state.flowing) { + debug('pipe resume'); + src.resume(); + } + + return dest; +}; + +function pipeOnDrain(src) { + return function () { + var state = src._readableState; + debug('pipeOnDrain', state.awaitDrain); + if (state.awaitDrain) state.awaitDrain--; + if (state.awaitDrain === 0 && EElistenerCount(src, 'data')) { + state.flowing = true; + flow(src); + } + }; +} + +Readable.prototype.unpipe = function (dest) { + var state = this._readableState; + + // if we're not piping anywhere, then do nothing. + if (state.pipesCount === 0) return this; + + // just one destination. most common case. + if (state.pipesCount === 1) { + // passed in one, but it's not the right one. + if (dest && dest !== state.pipes) return this; + + if (!dest) dest = state.pipes; + + // got a match. + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + if (dest) dest.emit('unpipe', this); + return this; + } + + // slow case. multiple pipe destinations. + + if (!dest) { + // remove all. + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + + for (var i = 0; i < len; i++) { + dests[i].emit('unpipe', this); + }return this; + } + + // try to find the right one. + var index = indexOf(state.pipes, dest); + if (index === -1) return this; + + state.pipes.splice(index, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) state.pipes = state.pipes[0]; + + dest.emit('unpipe', this); + + return this; +}; + +// set up data events if they are asked for +// Ensure readable listeners eventually get something +Readable.prototype.on = function (ev, fn) { + var res = Stream.prototype.on.call(this, ev, fn); + + if (ev === 'data') { + // Start flowing on next tick if stream isn't explicitly paused + if (this._readableState.flowing !== false) this.resume(); + } else if (ev === 'readable') { + var state = this._readableState; + if (!state.endEmitted && !state.readableListening) { + state.readableListening = state.needReadable = true; + state.emittedReadable = false; + if (!state.reading) { + processNextTick(nReadingNextTick, this); + } else if (state.length) { + emitReadable(this, state); + } + } + } + + return res; +}; +Readable.prototype.addListener = Readable.prototype.on; + +function nReadingNextTick(self) { + debug('readable nexttick read 0'); + self.read(0); +} + +// pause() and resume() are remnants of the legacy readable stream API +// If the user uses them, then switch into old mode. +Readable.prototype.resume = function () { + var state = this._readableState; + if (!state.flowing) { + debug('resume'); + state.flowing = true; + resume(this, state); + } + return this; +}; + +function resume(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true; + processNextTick(resume_, stream, state); + } +} + +function resume_(stream, state) { + if (!state.reading) { + debug('resume read 0'); + stream.read(0); + } + + state.resumeScheduled = false; + state.awaitDrain = 0; + stream.emit('resume'); + flow(stream); + if (state.flowing && !state.reading) stream.read(0); +} + +Readable.prototype.pause = function () { + debug('call pause flowing=%j', this._readableState.flowing); + if (false !== this._readableState.flowing) { + debug('pause'); + this._readableState.flowing = false; + this.emit('pause'); + } + return this; +}; + +function flow(stream) { + var state = stream._readableState; + debug('flow', state.flowing); + while (state.flowing && stream.read() !== null) {} +} + +// wrap an old-style stream as the async data source. +// This is *not* part of the readable stream interface. +// It is an ugly unfortunate mess of history. +Readable.prototype.wrap = function (stream) { + var state = this._readableState; + var paused = false; + + var self = this; + stream.on('end', function () { + debug('wrapped end'); + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) self.push(chunk); + } + + self.push(null); + }); + + stream.on('data', function (chunk) { + debug('wrapped data'); + if (state.decoder) chunk = state.decoder.write(chunk); + + // don't skip over falsy values in objectMode + if (state.objectMode && (chunk === null || chunk === undefined)) return;else if (!state.objectMode && (!chunk || !chunk.length)) return; + + var ret = self.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); + + // proxy all the other methods. + // important when wrapping filters and duplexes. + for (var i in stream) { + if (this[i] === undefined && typeof stream[i] === 'function') { + this[i] = function (method) { + return function () { + return stream[method].apply(stream, arguments); + }; + }(i); + } + } + + // proxy certain important events. + for (var n = 0; n < kProxyEvents.length; n++) { + stream.on(kProxyEvents[n], self.emit.bind(self, kProxyEvents[n])); + } + + // when we try to consume some more bytes, simply unpause the + // underlying stream. + self._read = function (n) { + debug('wrapped _read', n); + if (paused) { + paused = false; + stream.resume(); + } + }; + + return self; +}; + +// exposed for testing purposes only. +Readable._fromList = fromList; + +// Pluck off n bytes from an array of buffers. +// Length is the combined lengths of all the buffers in the list. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function fromList(n, state) { + // nothing buffered + if (state.length === 0) return null; + + var ret; + if (state.objectMode) ret = state.buffer.shift();else if (!n || n >= state.length) { + // read it all, truncate the list + if (state.decoder) ret = state.buffer.join('');else if (state.buffer.length === 1) ret = state.buffer.head.data;else ret = state.buffer.concat(state.length); + state.buffer.clear(); + } else { + // read part of list + ret = fromListPartial(n, state.buffer, state.decoder); + } + + return ret; +} + +// Extracts only enough buffered data to satisfy the amount requested. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function fromListPartial(n, list, hasStrings) { + var ret; + if (n < list.head.data.length) { + // slice is the same for buffers and strings + ret = list.head.data.slice(0, n); + list.head.data = list.head.data.slice(n); + } else if (n === list.head.data.length) { + // first chunk is a perfect match + ret = list.shift(); + } else { + // result spans more than one buffer + ret = hasStrings ? copyFromBufferString(n, list) : copyFromBuffer(n, list); + } + return ret; +} + +// Copies a specified amount of characters from the list of buffered data +// chunks. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function copyFromBufferString(n, list) { + var p = list.head; + var c = 1; + var ret = p.data; + n -= ret.length; + while (p = p.next) { + var str = p.data; + var nb = n > str.length ? str.length : n; + if (nb === str.length) ret += str;else ret += str.slice(0, n); + n -= nb; + if (n === 0) { + if (nb === str.length) { + ++c; + if (p.next) list.head = p.next;else list.head = list.tail = null; + } else { + list.head = p; + p.data = str.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret; +} + +// Copies a specified amount of bytes from the list of buffered data chunks. +// This function is designed to be inlinable, so please take care when making +// changes to the function body. +function copyFromBuffer(n, list) { + var ret = bufferShim.allocUnsafe(n); + var p = list.head; + var c = 1; + p.data.copy(ret); + n -= p.data.length; + while (p = p.next) { + var buf = p.data; + var nb = n > buf.length ? buf.length : n; + buf.copy(ret, ret.length - n, 0, nb); + n -= nb; + if (n === 0) { + if (nb === buf.length) { + ++c; + if (p.next) list.head = p.next;else list.head = list.tail = null; + } else { + list.head = p; + p.data = buf.slice(nb); + } + break; + } + ++c; + } + list.length -= c; + return ret; +} + +function endReadable(stream) { + var state = stream._readableState; + + // If we get here before consuming all the bytes, then that is a + // bug in node. Should never happen. + if (state.length > 0) throw new Error('"endReadable()" called on non-empty stream'); + + if (!state.endEmitted) { + state.ended = true; + processNextTick(endReadableNT, state, stream); + } +} + +function endReadableNT(state, stream) { + // Check that we didn't get one last unshift. + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit('end'); + } +} + +function forEach(xs, f) { + for (var i = 0, l = xs.length; i < l; i++) { + f(xs[i], i); + } +} + +function indexOf(xs, x) { + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) return i; + } + return -1; +} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/lib/_stream_transform.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/lib/_stream_transform.js new file mode 100644 index 00000000..cd258320 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/lib/_stream_transform.js @@ -0,0 +1,182 @@ +// a transform stream is a readable/writable stream where you do +// something with the data. Sometimes it's called a "filter", +// but that's not a great name for it, since that implies a thing where +// some bits pass through, and others are simply ignored. (That would +// be a valid example of a transform, of course.) +// +// While the output is causally related to the input, it's not a +// necessarily symmetric or synchronous transformation. For example, +// a zlib stream might take multiple plain-text writes(), and then +// emit a single compressed chunk some time in the future. +// +// Here's how this works: +// +// The Transform stream has all the aspects of the readable and writable +// stream classes. When you write(chunk), that calls _write(chunk,cb) +// internally, and returns false if there's a lot of pending writes +// buffered up. When you call read(), that calls _read(n) until +// there's enough pending readable data buffered up. +// +// In a transform stream, the written data is placed in a buffer. When +// _read(n) is called, it transforms the queued up data, calling the +// buffered _write cb's as it consumes chunks. If consuming a single +// written chunk would result in multiple output chunks, then the first +// outputted bit calls the readcb, and subsequent chunks just go into +// the read buffer, and will cause it to emit 'readable' if necessary. +// +// This way, back-pressure is actually determined by the reading side, +// since _read has to be called to start processing a new chunk. However, +// a pathological inflate type of transform can cause excessive buffering +// here. For example, imagine a stream where every byte of input is +// interpreted as an integer from 0-255, and then results in that many +// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in +// 1kb of data being output. In this case, you could write a very small +// amount of input, and end up with a very large amount of output. In +// such a pathological inflating mechanism, there'd be no way to tell +// the system to stop doing the transform. A single 4MB write could +// cause the system to run out of memory. +// +// However, even in such a pathological case, only a single written chunk +// would be consumed, and then the rest would wait (un-transformed) until +// the results of the previous transformed chunk were consumed. + +'use strict'; + +module.exports = Transform; + +var Duplex = require('./_stream_duplex'); + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +util.inherits(Transform, Duplex); + +function TransformState(stream) { + this.afterTransform = function (er, data) { + return afterTransform(stream, er, data); + }; + + this.needTransform = false; + this.transforming = false; + this.writecb = null; + this.writechunk = null; + this.writeencoding = null; +} + +function afterTransform(stream, er, data) { + var ts = stream._transformState; + ts.transforming = false; + + var cb = ts.writecb; + + if (!cb) return stream.emit('error', new Error('no writecb in Transform class')); + + ts.writechunk = null; + ts.writecb = null; + + if (data !== null && data !== undefined) stream.push(data); + + cb(er); + + var rs = stream._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + stream._read(rs.highWaterMark); + } +} + +function Transform(options) { + if (!(this instanceof Transform)) return new Transform(options); + + Duplex.call(this, options); + + this._transformState = new TransformState(this); + + var stream = this; + + // start out asking for a readable event once data is transformed. + this._readableState.needReadable = true; + + // we have implemented the _read method, and done the other things + // that Readable wants before the first _read call, so unset the + // sync guard flag. + this._readableState.sync = false; + + if (options) { + if (typeof options.transform === 'function') this._transform = options.transform; + + if (typeof options.flush === 'function') this._flush = options.flush; + } + + // When the writable side finishes, then flush out anything remaining. + this.once('prefinish', function () { + if (typeof this._flush === 'function') this._flush(function (er, data) { + done(stream, er, data); + });else done(stream); + }); +} + +Transform.prototype.push = function (chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); +}; + +// This is the part where you do stuff! +// override this function in implementation classes. +// 'chunk' is an input chunk. +// +// Call `push(newChunk)` to pass along transformed output +// to the readable side. You may call 'push' zero or more times. +// +// Call `cb(err)` when you are done with this chunk. If you pass +// an error, then that'll put the hurt on the whole operation. If you +// never call cb(), then you'll never get another chunk. +Transform.prototype._transform = function (chunk, encoding, cb) { + throw new Error('_transform() is not implemented'); +}; + +Transform.prototype._write = function (chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || rs.needReadable || rs.length < rs.highWaterMark) this._read(rs.highWaterMark); + } +}; + +// Doesn't matter what the args are here. +// _transform does all the work. +// That we got here means that the readable side wants more data. +Transform.prototype._read = function (n) { + var ts = this._transformState; + + if (ts.writechunk !== null && ts.writecb && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + // mark that we need a transform, so that any data that comes in + // will get processed, now that we've asked for it. + ts.needTransform = true; + } +}; + +function done(stream, er, data) { + if (er) return stream.emit('error', er); + + if (data !== null && data !== undefined) stream.push(data); + + // if there's nothing in the write buffer, then that means + // that nothing more will ever be provided + var ws = stream._writableState; + var ts = stream._transformState; + + if (ws.length) throw new Error('Calling transform done when ws.length != 0'); + + if (ts.transforming) throw new Error('Calling transform done when still transforming'); + + return stream.push(null); +} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/lib/_stream_writable.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/lib/_stream_writable.js new file mode 100644 index 00000000..15db0386 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/lib/_stream_writable.js @@ -0,0 +1,544 @@ +// A bit simpler than readable streams. +// Implement an async ._write(chunk, encoding, cb), and it'll handle all +// the drain event emission and buffering. + +'use strict'; + +module.exports = Writable; + +/**/ +var processNextTick = require('process-nextick-args'); +/**/ + +/**/ +var asyncWrite = !process.browser && ['v0.10', 'v0.9.'].indexOf(process.version.slice(0, 5)) > -1 ? setImmediate : processNextTick; +/**/ + +/**/ +var Duplex; +/**/ + +Writable.WritableState = WritableState; + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +/**/ +var internalUtil = { + deprecate: require('util-deprecate') +}; +/**/ + +/**/ +var Stream = require('./internal/streams/stream'); +/**/ + +var Buffer = require('buffer').Buffer; +/**/ +var bufferShim = require('buffer-shims'); +/**/ + +util.inherits(Writable, Stream); + +function nop() {} + +function WriteReq(chunk, encoding, cb) { + this.chunk = chunk; + this.encoding = encoding; + this.callback = cb; + this.next = null; +} + +function WritableState(options, stream) { + Duplex = Duplex || require('./_stream_duplex'); + + options = options || {}; + + // object stream flag to indicate whether or not this stream + // contains buffers or objects. + this.objectMode = !!options.objectMode; + + if (stream instanceof Duplex) this.objectMode = this.objectMode || !!options.writableObjectMode; + + // the point at which write() starts returning false + // Note: 0 is a valid value, means that we always return false if + // the entire buffer is not flushed immediately on write() + var hwm = options.highWaterMark; + var defaultHwm = this.objectMode ? 16 : 16 * 1024; + this.highWaterMark = hwm || hwm === 0 ? hwm : defaultHwm; + + // cast to ints. + this.highWaterMark = ~~this.highWaterMark; + + // drain event flag. + this.needDrain = false; + // at the start of calling end() + this.ending = false; + // when end() has been called, and returned + this.ended = false; + // when 'finish' is emitted + this.finished = false; + + // should we decode strings into buffers before passing to _write? + // this is here so that some node-core streams can optimize string + // handling at a lower level. + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // not an actual buffer we keep track of, but a measurement + // of how much we're waiting to get pushed to some underlying + // socket or file. + this.length = 0; + + // a flag to see when we're in the middle of a write. + this.writing = false; + + // when true all writes will be buffered until .uncork() call + this.corked = 0; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, because any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // a flag to know if we're processing previously buffered items, which + // may call the _write() callback in the same tick, so that we don't + // end up in an overlapped onwrite situation. + this.bufferProcessing = false; + + // the callback that's passed to _write(chunk,cb) + this.onwrite = function (er) { + onwrite(stream, er); + }; + + // the callback that the user supplies to write(chunk,encoding,cb) + this.writecb = null; + + // the amount that is being written when _write is called. + this.writelen = 0; + + this.bufferedRequest = null; + this.lastBufferedRequest = null; + + // number of pending user-supplied write callbacks + // this must be 0 before 'finish' can be emitted + this.pendingcb = 0; + + // emit prefinish if the only thing we're waiting for is _write cbs + // This is relevant for synchronous Transform streams + this.prefinished = false; + + // True if the error was already emitted and should not be thrown again + this.errorEmitted = false; + + // count buffered requests + this.bufferedRequestCount = 0; + + // allocate the first CorkedRequest, there is always + // one allocated and free to use, and we maintain at most two + this.corkedRequestsFree = new CorkedRequest(this); +} + +WritableState.prototype.getBuffer = function getBuffer() { + var current = this.bufferedRequest; + var out = []; + while (current) { + out.push(current); + current = current.next; + } + return out; +}; + +(function () { + try { + Object.defineProperty(WritableState.prototype, 'buffer', { + get: internalUtil.deprecate(function () { + return this.getBuffer(); + }, '_writableState.buffer is deprecated. Use _writableState.getBuffer ' + 'instead.') + }); + } catch (_) {} +})(); + +// Test _writableState for inheritance to account for Duplex streams, +// whose prototype chain only points to Readable. +var realHasInstance; +if (typeof Symbol === 'function' && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === 'function') { + realHasInstance = Function.prototype[Symbol.hasInstance]; + Object.defineProperty(Writable, Symbol.hasInstance, { + value: function (object) { + if (realHasInstance.call(this, object)) return true; + + return object && object._writableState instanceof WritableState; + } + }); +} else { + realHasInstance = function (object) { + return object instanceof this; + }; +} + +function Writable(options) { + Duplex = Duplex || require('./_stream_duplex'); + + // Writable ctor is applied to Duplexes, too. + // `realHasInstance` is necessary because using plain `instanceof` + // would return false, as no `_writableState` property is attached. + + // Trying to use the custom `instanceof` for Writable here will also break the + // Node.js LazyTransform implementation, which has a non-trivial getter for + // `_writableState` that would lead to infinite recursion. + if (!realHasInstance.call(Writable, this) && !(this instanceof Duplex)) { + return new Writable(options); + } + + this._writableState = new WritableState(options, this); + + // legacy. + this.writable = true; + + if (options) { + if (typeof options.write === 'function') this._write = options.write; + + if (typeof options.writev === 'function') this._writev = options.writev; + } + + Stream.call(this); +} + +// Otherwise people can pipe Writable streams, which is just wrong. +Writable.prototype.pipe = function () { + this.emit('error', new Error('Cannot pipe, not readable')); +}; + +function writeAfterEnd(stream, cb) { + var er = new Error('write after end'); + // TODO: defer error events consistently everywhere, not just the cb + stream.emit('error', er); + processNextTick(cb, er); +} + +// Checks that a user-supplied chunk is valid, especially for the particular +// mode the stream is in. Currently this means that `null` is never accepted +// and undefined/non-string values are only allowed in object mode. +function validChunk(stream, state, chunk, cb) { + var valid = true; + var er = false; + + if (chunk === null) { + er = new TypeError('May not write null values to stream'); + } else if (typeof chunk !== 'string' && chunk !== undefined && !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + if (er) { + stream.emit('error', er); + processNextTick(cb, er); + valid = false; + } + return valid; +} + +Writable.prototype.write = function (chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + var isBuf = Buffer.isBuffer(chunk); + + if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (isBuf) encoding = 'buffer';else if (!encoding) encoding = state.defaultEncoding; + + if (typeof cb !== 'function') cb = nop; + + if (state.ended) writeAfterEnd(this, cb);else if (isBuf || validChunk(this, state, chunk, cb)) { + state.pendingcb++; + ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb); + } + + return ret; +}; + +Writable.prototype.cork = function () { + var state = this._writableState; + + state.corked++; +}; + +Writable.prototype.uncork = function () { + var state = this._writableState; + + if (state.corked) { + state.corked--; + + if (!state.writing && !state.corked && !state.finished && !state.bufferProcessing && state.bufferedRequest) clearBuffer(this, state); + } +}; + +Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) { + // node::ParseEncoding() requires lower case. + if (typeof encoding === 'string') encoding = encoding.toLowerCase(); + if (!(['hex', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].indexOf((encoding + '').toLowerCase()) > -1)) throw new TypeError('Unknown encoding: ' + encoding); + this._writableState.defaultEncoding = encoding; + return this; +}; + +function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && state.decodeStrings !== false && typeof chunk === 'string') { + chunk = bufferShim.from(chunk, encoding); + } + return chunk; +} + +// if we're already writing something, then just put this +// in the queue, and wait our turn. Otherwise, call _write +// If we return false, then we need a drain event, so set that flag. +function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) { + if (!isBuf) { + chunk = decodeChunk(state, chunk, encoding); + if (Buffer.isBuffer(chunk)) encoding = 'buffer'; + } + var len = state.objectMode ? 1 : chunk.length; + + state.length += len; + + var ret = state.length < state.highWaterMark; + // we must ensure that previous needDrain will not be reset to false. + if (!ret) state.needDrain = true; + + if (state.writing || state.corked) { + var last = state.lastBufferedRequest; + state.lastBufferedRequest = new WriteReq(chunk, encoding, cb); + if (last) { + last.next = state.lastBufferedRequest; + } else { + state.bufferedRequest = state.lastBufferedRequest; + } + state.bufferedRequestCount += 1; + } else { + doWrite(stream, state, false, len, chunk, encoding, cb); + } + + return ret; +} + +function doWrite(stream, state, writev, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + if (writev) stream._writev(chunk, state.onwrite);else stream._write(chunk, encoding, state.onwrite); + state.sync = false; +} + +function onwriteError(stream, state, sync, er, cb) { + --state.pendingcb; + if (sync) processNextTick(cb, er);else cb(er); + + stream._writableState.errorEmitted = true; + stream.emit('error', er); +} + +function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; +} + +function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + + onwriteStateUpdate(state); + + if (er) onwriteError(stream, state, sync, er, cb);else { + // Check if we're actually ready to finish, but don't emit yet + var finished = needFinish(state); + + if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) { + clearBuffer(stream, state); + } + + if (sync) { + /**/ + asyncWrite(afterWrite, stream, state, finished, cb); + /**/ + } else { + afterWrite(stream, state, finished, cb); + } + } +} + +function afterWrite(stream, state, finished, cb) { + if (!finished) onwriteDrain(stream, state); + state.pendingcb--; + cb(); + finishMaybe(stream, state); +} + +// Must force callback to be called on nextTick, so that we don't +// emit 'drain' before the write() consumer gets the 'false' return +// value, and has a chance to attach a 'drain' listener. +function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit('drain'); + } +} + +// if there's something in the buffer waiting, then process it +function clearBuffer(stream, state) { + state.bufferProcessing = true; + var entry = state.bufferedRequest; + + if (stream._writev && entry && entry.next) { + // Fast case, write everything using _writev() + var l = state.bufferedRequestCount; + var buffer = new Array(l); + var holder = state.corkedRequestsFree; + holder.entry = entry; + + var count = 0; + while (entry) { + buffer[count] = entry; + entry = entry.next; + count += 1; + } + + doWrite(stream, state, true, state.length, buffer, '', holder.finish); + + // doWrite is almost always async, defer these to save a bit of time + // as the hot path ends with doWrite + state.pendingcb++; + state.lastBufferedRequest = null; + if (holder.next) { + state.corkedRequestsFree = holder.next; + holder.next = null; + } else { + state.corkedRequestsFree = new CorkedRequest(state); + } + } else { + // Slow case, write chunks one-by-one + while (entry) { + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + + doWrite(stream, state, false, len, chunk, encoding, cb); + entry = entry.next; + // if we didn't call the onwrite immediately, then + // it means that we need to wait until it does. + // also, that means that the chunk and cb are currently + // being processed, so move the buffer counter past them. + if (state.writing) { + break; + } + } + + if (entry === null) state.lastBufferedRequest = null; + } + + state.bufferedRequestCount = 0; + state.bufferedRequest = entry; + state.bufferProcessing = false; +} + +Writable.prototype._write = function (chunk, encoding, cb) { + cb(new Error('_write() is not implemented')); +}; + +Writable.prototype._writev = null; + +Writable.prototype.end = function (chunk, encoding, cb) { + var state = this._writableState; + + if (typeof chunk === 'function') { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (chunk !== null && chunk !== undefined) this.write(chunk, encoding); + + // .end() fully uncorks + if (state.corked) { + state.corked = 1; + this.uncork(); + } + + // ignore unnecessary end() calls. + if (!state.ending && !state.finished) endWritable(this, state, cb); +}; + +function needFinish(state) { + return state.ending && state.length === 0 && state.bufferedRequest === null && !state.finished && !state.writing; +} + +function prefinish(stream, state) { + if (!state.prefinished) { + state.prefinished = true; + stream.emit('prefinish'); + } +} + +function finishMaybe(stream, state) { + var need = needFinish(state); + if (need) { + if (state.pendingcb === 0) { + prefinish(stream, state); + state.finished = true; + stream.emit('finish'); + } else { + prefinish(stream, state); + } + } + return need; +} + +function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) processNextTick(cb);else stream.once('finish', cb); + } + state.ended = true; + stream.writable = false; +} + +// It seems a linked list but it is not +// there will be only 2 of these for each stream +function CorkedRequest(state) { + var _this = this; + + this.next = null; + this.entry = null; + this.finish = function (err) { + var entry = _this.entry; + _this.entry = null; + while (entry) { + var cb = entry.callback; + state.pendingcb--; + cb(err); + entry = entry.next; + } + if (state.corkedRequestsFree) { + state.corkedRequestsFree.next = _this; + } else { + state.corkedRequestsFree = _this; + } + }; +} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/lib/internal/streams/BufferList.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/lib/internal/streams/BufferList.js new file mode 100644 index 00000000..e4bfcf02 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/lib/internal/streams/BufferList.js @@ -0,0 +1,64 @@ +'use strict'; + +var Buffer = require('buffer').Buffer; +/**/ +var bufferShim = require('buffer-shims'); +/**/ + +module.exports = BufferList; + +function BufferList() { + this.head = null; + this.tail = null; + this.length = 0; +} + +BufferList.prototype.push = function (v) { + var entry = { data: v, next: null }; + if (this.length > 0) this.tail.next = entry;else this.head = entry; + this.tail = entry; + ++this.length; +}; + +BufferList.prototype.unshift = function (v) { + var entry = { data: v, next: this.head }; + if (this.length === 0) this.tail = entry; + this.head = entry; + ++this.length; +}; + +BufferList.prototype.shift = function () { + if (this.length === 0) return; + var ret = this.head.data; + if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; + --this.length; + return ret; +}; + +BufferList.prototype.clear = function () { + this.head = this.tail = null; + this.length = 0; +}; + +BufferList.prototype.join = function (s) { + if (this.length === 0) return ''; + var p = this.head; + var ret = '' + p.data; + while (p = p.next) { + ret += s + p.data; + }return ret; +}; + +BufferList.prototype.concat = function (n) { + if (this.length === 0) return bufferShim.alloc(0); + if (this.length === 1) return this.head.data; + var ret = bufferShim.allocUnsafe(n >>> 0); + var p = this.head; + var i = 0; + while (p) { + p.data.copy(ret, i); + i += p.data.length; + p = p.next; + } + return ret; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/lib/internal/streams/stream-browser.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/lib/internal/streams/stream-browser.js new file mode 100644 index 00000000..9332a3fd --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/lib/internal/streams/stream-browser.js @@ -0,0 +1 @@ +module.exports = require('events').EventEmitter; diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/lib/internal/streams/stream.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/lib/internal/streams/stream.js new file mode 100644 index 00000000..ce2ad5b6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/lib/internal/streams/stream.js @@ -0,0 +1 @@ +module.exports = require('stream'); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/package.json b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/package.json new file mode 100644 index 00000000..a5b8c8f2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/package.json @@ -0,0 +1,146 @@ +{ + "_args": [ + [ + { + "raw": "readable-stream@^2.1.5", + "scope": null, + "escapedName": "readable-stream", + "name": "readable-stream", + "rawSpec": "^2.1.5", + "spec": ">=2.1.5 <3.0.0", + "type": "range" + }, + "/Users/MB/git/pitfall/pdfkit/node_modules/quote-stream/node_modules/through2" + ], + [ + { + "raw": "readable-stream@^2.1.5", + "scope": null, + "escapedName": "readable-stream", + "name": "readable-stream", + "rawSpec": "^2.1.5", + "spec": ">=2.1.5 <3.0.0", + "type": "range" + }, + "/Users/MB/git/pitfall/pdfkit/node_modules/fontkit/node_modules/through2" + ] + ], + "_from": "readable-stream@^2.1.5", + "_id": "readable-stream@2.2.9", + "_inCache": true, + "_location": "/fontkit/readable-stream", + "_nodeVersion": "6.10.1", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/readable-stream-2.2.9.tgz_1491638759718_0.9035766560118645" + }, + "_npmUser": { + "name": "matteo.collina", + "email": "hello@matteocollina.com" + }, + "_npmVersion": "3.10.10", + "_phantomChildren": {}, + "_requested": { + "raw": "readable-stream@^2.1.5", + "scope": null, + "escapedName": "readable-stream", + "name": "readable-stream", + "rawSpec": "^2.1.5", + "spec": ">=2.1.5 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fontkit/through2" + ], + "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.9.tgz", + "_shasum": "cf78ec6f4a6d1eb43d26488cac97f042e74b7fc8", + "_shrinkwrap": null, + "_spec": "readable-stream@^2.1.5", + "_where": "/Users/MB/git/pitfall/pdfkit/node_modules/fontkit/node_modules/through2", + "browser": { + "util": false, + "./readable.js": "./readable-browser.js", + "./writable.js": "./writable-browser.js", + "./duplex.js": "./duplex-browser.js", + "./lib/internal/streams/stream.js": "./lib/internal/streams/stream-browser.js" + }, + "bugs": { + "url": "https://github.com/nodejs/readable-stream/issues" + }, + "dependencies": { + "buffer-shims": "~1.0.0", + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "~1.0.0", + "process-nextick-args": "~1.0.6", + "string_decoder": "~1.0.0", + "util-deprecate": "~1.0.1" + }, + "description": "Streams3, a user-land copy of the stream library from Node.js", + "devDependencies": { + "assert": "~1.4.0", + "babel-polyfill": "^6.9.1", + "buffer": "^4.9.0", + "nyc": "^6.4.0", + "tap": "~0.7.1", + "tape": "~4.5.1", + "zuul": "~3.10.0" + }, + "directories": {}, + "dist": { + "shasum": "cf78ec6f4a6d1eb43d26488cac97f042e74b7fc8", + "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.9.tgz" + }, + "gitHead": "16eca30fe46a937403502a391859ef51625bcc53", + "homepage": "https://github.com/nodejs/readable-stream#readme", + "keywords": [ + "readable", + "stream", + "pipe" + ], + "license": "MIT", + "main": "readable.js", + "maintainers": [ + { + "name": "cwmma", + "email": "calvin.metcalf@gmail.com" + }, + { + "name": "isaacs", + "email": "i@izs.me" + }, + { + "name": "matteo.collina", + "email": "hello@matteocollina.com" + }, + { + "name": "rvagg", + "email": "rod@vagg.org" + }, + { + "name": "tootallnate", + "email": "nathan@tootallnate.net" + } + ], + "name": "readable-stream", + "nyc": { + "include": [ + "lib/**.js" + ] + }, + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/nodejs/readable-stream.git" + }, + "scripts": { + "browser": "npm run write-zuul && zuul --browser-retries 2 -- test/browser.js", + "cover": "nyc npm test", + "local": "zuul --local 3000 --no-coverage -- test/browser.js", + "report": "nyc report --reporter=lcov", + "test": "tap test/parallel/*.js test/ours/*.js", + "write-zuul": "printf \"ui: tape\nbrowsers:\n - name: $BROWSER_NAME\n version: $BROWSER_VERSION\n\">.zuul.yml" + }, + "version": "2.2.9" +} diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/passthrough.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/passthrough.js new file mode 100644 index 00000000..ffd791d7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/passthrough.js @@ -0,0 +1 @@ +module.exports = require('./readable').PassThrough diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/readable-browser.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/readable-browser.js new file mode 100644 index 00000000..e5037259 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/readable-browser.js @@ -0,0 +1,7 @@ +exports = module.exports = require('./lib/_stream_readable.js'); +exports.Stream = exports; +exports.Readable = exports; +exports.Writable = require('./lib/_stream_writable.js'); +exports.Duplex = require('./lib/_stream_duplex.js'); +exports.Transform = require('./lib/_stream_transform.js'); +exports.PassThrough = require('./lib/_stream_passthrough.js'); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/readable.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/readable.js new file mode 100644 index 00000000..ec89ec53 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/readable.js @@ -0,0 +1,19 @@ +var Stream = require('stream'); +if (process.env.READABLE_STREAM === 'disable' && Stream) { + module.exports = Stream; + exports = module.exports = Stream.Readable; + exports.Readable = Stream.Readable; + exports.Writable = Stream.Writable; + exports.Duplex = Stream.Duplex; + exports.Transform = Stream.Transform; + exports.PassThrough = Stream.PassThrough; + exports.Stream = Stream; +} else { + exports = module.exports = require('./lib/_stream_readable.js'); + exports.Stream = Stream || exports; + exports.Readable = exports; + exports.Writable = require('./lib/_stream_writable.js'); + exports.Duplex = require('./lib/_stream_duplex.js'); + exports.Transform = require('./lib/_stream_transform.js'); + exports.PassThrough = require('./lib/_stream_passthrough.js'); +} diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/transform.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/transform.js new file mode 100644 index 00000000..b1baba26 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/transform.js @@ -0,0 +1 @@ +module.exports = require('./readable').Transform diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/writable-browser.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/writable-browser.js new file mode 100644 index 00000000..ebdde6a8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/writable-browser.js @@ -0,0 +1 @@ +module.exports = require('./lib/_stream_writable.js'); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/writable.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/writable.js new file mode 100644 index 00000000..634ddcbe --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream/writable.js @@ -0,0 +1,8 @@ +var Stream = require("stream") +var Writable = require("./lib/_stream_writable.js") + +if (process.env.READABLE_STREAM === 'disable') { + module.exports = Stream && Stream.Writable || Writable +} + +module.exports = Writable diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/.eslintignore b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/.eslintignore new file mode 100644 index 00000000..3c3629e6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/.eslintignore @@ -0,0 +1 @@ +node_modules diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/.eslintrc b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/.eslintrc new file mode 100644 index 00000000..ae352e2e --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/.eslintrc @@ -0,0 +1,27 @@ +{ + "extends": "@ljharb", + "root": true, + "rules": { + "indent": [2, 4], + "strict": 0, + "complexity": 0, + "consistent-return": 0, + "curly": 0, + "func-name-matching": 0, + "func-style": 0, + "global-require": 0, + "id-length": [2, { "min": 1, "max": 30 }], + "max-nested-callbacks": 0, + "max-params": 0, + "max-statements-per-line": [2, { "max": 2 }], + "max-statements": 0, + "no-magic-numbers": 0, + "no-console": 0, + "no-shadow": 0, + "no-unused-vars": [2, { "vars": "all", "args": "none" }], + "no-use-before-define": 0, + "object-curly-newline": 0, + "operator-linebreak": [2, "before"], + "sort-keys": 0, + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/.npmignore b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/.npmignore new file mode 100644 index 00000000..3c3629e6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/.travis.yml b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/.travis.yml new file mode 100644 index 00000000..f5450af3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/.travis.yml @@ -0,0 +1,176 @@ +language: node_js +os: + - linux +node_js: + - "7.9" + - "6.10" + - "5.12" + - "4.8" + - "iojs-v3.3" + - "iojs-v2.5" + - "iojs-v1.8" + - "0.12" + - "0.10" + - "0.8" + - "0.6" +before_install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then npm install -g npm@1.3 ; elif [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi' + - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then npm install -g npm; fi' +install: + - 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then nvm install 0.8 && npm install -g npm@1.3 && npm install -g npm@1.4.28 && npm install -g npm@2 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;' +script: + - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' + - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' + - 'if [ -n "${COVERAGE-}" ]; then npm run coverage ; fi' + - 'if [ -n "${TEST-}" ]; then npm run tests-only ; fi' +sudo: false +env: + - TEST=true +matrix: + fast_finish: true + include: + - node_js: "node" + env: PRETEST=true + - node_js: "7.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "7.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "6.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.10" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.8" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "5.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "4.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v3.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v2.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.7" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.6" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.5" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.4" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.3" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.2" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.1" + env: TEST=true ALLOW_FAILURE=true + - node_js: "iojs-v1.0" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.11" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.9" + env: TEST=true ALLOW_FAILURE=true + - node_js: "0.4" + env: TEST=true ALLOW_FAILURE=true + ##- node_js: "7" + #env: TEST=true + #os: osx + #- node_js: "6" + #env: TEST=true + #os: osx + #- node_js: "5" + #env: TEST=true + #os: osx + #- node_js: "4" + #env: TEST=true + #os: osx + #- node_js: "iojs" + #env: TEST=true + #os: osx + #- node_js: "0.12" + #env: TEST=true + #os: osx + #- node_js: "0.10" + #env: TEST=true + #os: osx + #- node_js: "0.8" + #env: TEST=true + #os: osx + allow_failures: + - os: osx + - env: TEST=true ALLOW_FAILURE=true diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/LICENSE b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/LICENSE new file mode 100644 index 00000000..ee27ba4b --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/appveyor.yml b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/appveyor.yml new file mode 100644 index 00000000..f54a1b60 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/appveyor.yml @@ -0,0 +1,44 @@ +version: 1.0.{build} +skip_branch_with_pr: true +build: off + +environment: + matrix: + - nodejs_version: "7" + - nodejs_version: "6" + - nodejs_version: "5" + - nodejs_version: "4" + - nodejs_version: "3" + - nodejs_version: "2" + - nodejs_version: "1" + - nodejs_version: "0.12" + - nodejs_version: "0.10" + - nodejs_version: "0.8" + - nodejs_version: "0.6" +matrix: + # fast_finish: true + allow_failures: + - nodejs_version: "0.6" + +platform: + - x86 + - x64 + +# Install scripts. (runs after repo cloning) +install: + # Get the latest stable version of Node.js or io.js + - ps: Install-Product node $env:nodejs_version $env:platform + - IF %nodejs_version% EQU 0.6 npm -g install npm@1.3 + - IF %nodejs_version% EQU 0.8 npm -g install npm@2 + - set PATH=%APPDATA%\npm;%PATH% + #- IF %nodejs_version% NEQ 0.6 AND %nodejs_version% NEQ 0.8 npm -g install npm + # install modules + - npm install + +# Post-install test scripts. +test_script: + # Output useful info for debugging. + - node --version + - npm --version + # run tests + - npm run tests-only diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/example/async.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/example/async.js new file mode 100644 index 00000000..20e65dc2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/example/async.js @@ -0,0 +1,5 @@ +var resolve = require('../'); +resolve('tap', { basedir: __dirname }, function (err, res) { + if (err) console.error(err); + else console.log(res); +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/example/sync.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/example/sync.js new file mode 100644 index 00000000..54b2cc10 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/example/sync.js @@ -0,0 +1,3 @@ +var resolve = require('../'); +var res = resolve.sync('tap', { basedir: __dirname }); +console.log(res); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/index.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/index.js new file mode 100644 index 00000000..eb6ba89e --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/index.js @@ -0,0 +1,8 @@ +var core = require('./lib/core'); +var async = require('./lib/async'); +async.core = core; +async.isCore = function isCore(x) { return core[x]; }; +async.sync = require('./lib/sync'); + +exports = async; +module.exports = async; diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/lib/async.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/lib/async.js new file mode 100644 index 00000000..ef1bde78 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/lib/async.js @@ -0,0 +1,203 @@ +var core = require('./core'); +var fs = require('fs'); +var path = require('path'); +var caller = require('./caller.js'); +var nodeModulesPaths = require('./node-modules-paths.js'); + +module.exports = function resolve(x, options, callback) { + var cb = callback; + var opts = options || {}; + if (typeof opts === 'function') { + cb = opts; + opts = {}; + } + if (typeof x !== 'string') { + var err = new TypeError('Path must be a string.'); + return process.nextTick(function () { + cb(err); + }); + } + + var isFile = opts.isFile || function (file, cb) { + fs.stat(file, function (err, stat) { + if (!err) { + return cb(null, stat.isFile() || stat.isFIFO()); + } + if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false); + return cb(err); + }); + }; + var readFile = opts.readFile || fs.readFile; + + var extensions = opts.extensions || ['.js']; + var y = opts.basedir || path.dirname(caller()); + + opts.paths = opts.paths || []; + + if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x)) { + var res = path.resolve(y, x); + if (x === '..' || x.slice(-1) === '/') res += '/'; + if (/\/$/.test(x) && res === y) { + loadAsDirectory(res, opts.package, onfile); + } else loadAsFile(res, opts.package, onfile); + } else loadNodeModules(x, y, function (err, n, pkg) { + if (err) cb(err); + else if (n) cb(null, n, pkg); + else if (core[x]) return cb(null, x); + else { + var moduleError = new Error("Cannot find module '" + x + "' from '" + y + "'"); + moduleError.code = 'MODULE_NOT_FOUND'; + cb(moduleError); + } + }); + + function onfile(err, m, pkg) { + if (err) cb(err); + else if (m) cb(null, m, pkg); + else loadAsDirectory(res, function (err, d, pkg) { + if (err) cb(err); + else if (d) cb(null, d, pkg); + else { + var moduleError = new Error("Cannot find module '" + x + "' from '" + y + "'"); + moduleError.code = 'MODULE_NOT_FOUND'; + cb(moduleError); + } + }); + } + + function loadAsFile(x, thePackage, callback) { + var loadAsFilePackage = thePackage; + var cb = callback; + if (typeof loadAsFilePackage === 'function') { + cb = loadAsFilePackage; + loadAsFilePackage = undefined; + } + + var exts = [''].concat(extensions); + load(exts, x, loadAsFilePackage); + + function load(exts, x, loadPackage) { + if (exts.length === 0) return cb(null, undefined, loadPackage); + var file = x + exts[0]; + + var pkg = loadPackage; + if (pkg) onpkg(null, pkg); + else loadpkg(path.dirname(file), onpkg); + + function onpkg(err, pkg_, dir) { + pkg = pkg_; + if (err) return cb(err); + if (dir && pkg && opts.pathFilter) { + var rfile = path.relative(dir, file); + var rel = rfile.slice(0, rfile.length - exts[0].length); + var r = opts.pathFilter(pkg, x, rel); + if (r) return load( + [''].concat(extensions.slice()), + path.resolve(dir, r), + pkg + ); + } + isFile(file, onex); + } + function onex(err, ex) { + if (err) return cb(err); + if (ex) return cb(null, file, pkg); + load(exts.slice(1), x, pkg); + } + } + } + + function loadpkg(dir, cb) { + if (dir === '' || dir === '/') return cb(null); + if (process.platform === 'win32' && (/^\w:[/\\]*$/).test(dir)) { + return cb(null); + } + if (/[/\\]node_modules[/\\]*$/.test(dir)) return cb(null); + + var pkgfile = path.join(dir, 'package.json'); + isFile(pkgfile, function (err, ex) { + // on err, ex is false + if (!ex) return loadpkg(path.dirname(dir), cb); + + readFile(pkgfile, function (err, body) { + if (err) cb(err); + try { var pkg = JSON.parse(body); } catch (jsonErr) {} + + if (pkg && opts.packageFilter) { + pkg = opts.packageFilter(pkg, pkgfile); + } + cb(null, pkg, dir); + }); + }); + } + + function loadAsDirectory(x, loadAsDirectoryPackage, callback) { + var cb = callback; + var fpkg = loadAsDirectoryPackage; + if (typeof fpkg === 'function') { + cb = fpkg; + fpkg = opts.package; + } + + var pkgfile = path.join(x, 'package.json'); + isFile(pkgfile, function (err, ex) { + if (err) return cb(err); + if (!ex) return loadAsFile(path.join(x, 'index'), fpkg, cb); + + readFile(pkgfile, function (err, body) { + if (err) return cb(err); + try { + var pkg = JSON.parse(body); + } catch (jsonErr) {} + + if (opts.packageFilter) { + pkg = opts.packageFilter(pkg, pkgfile); + } + + if (pkg.main) { + if (pkg.main === '.' || pkg.main === './') { + pkg.main = 'index'; + } + loadAsFile(path.resolve(x, pkg.main), pkg, function (err, m, pkg) { + if (err) return cb(err); + if (m) return cb(null, m, pkg); + if (!pkg) return loadAsFile(path.join(x, 'index'), pkg, cb); + + var dir = path.resolve(x, pkg.main); + loadAsDirectory(dir, pkg, function (err, n, pkg) { + if (err) return cb(err); + if (n) return cb(null, n, pkg); + loadAsFile(path.join(x, 'index'), pkg, cb); + }); + }); + return; + } + + loadAsFile(path.join(x, '/index'), pkg, cb); + }); + }); + } + + function processDirs(cb, dirs) { + if (dirs.length === 0) return cb(null, undefined); + var dir = dirs[0]; + + var file = path.join(dir, x); + loadAsFile(file, undefined, onfile); + + function onfile(err, m, pkg) { + if (err) return cb(err); + if (m) return cb(null, m, pkg); + loadAsDirectory(path.join(dir, x), undefined, ondir); + } + + function ondir(err, n, pkg) { + if (err) return cb(err); + if (n) return cb(null, n, pkg); + processDirs(cb, dirs.slice(1)); + } + } + function loadNodeModules(x, start, cb) { + processDirs(cb, nodeModulesPaths(start, opts)); + } +}; diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/lib/caller.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/lib/caller.js new file mode 100644 index 00000000..b14a2804 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/lib/caller.js @@ -0,0 +1,8 @@ +module.exports = function () { + // see https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi + var origPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = function (_, stack) { return stack; }; + var stack = (new Error()).stack; + Error.prepareStackTrace = origPrepareStackTrace; + return stack[2].getFileName(); +}; diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/lib/core.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/lib/core.js new file mode 100644 index 00000000..ad9efd13 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/lib/core.js @@ -0,0 +1,22 @@ +var current = (process.versions && process.versions.node && process.versions.node.split('.')) || []; + +function versionIncluded(version) { + if (version === '*') return true; + var versionParts = version.split('.'); + for (var i = 0; i < 3; ++i) { + if ((current[i] || 0) >= (versionParts[i] || 0)) return true; + } + return false; +} + +var data = require('./core.json'); + +var core = {}; +for (var version in data) { // eslint-disable-line no-restricted-syntax + if (Object.prototype.hasOwnProperty.call(data, version) && versionIncluded(version)) { + for (var i = 0; i < data[version].length; ++i) { + core[data[version][i]] = true; + } + } +} +module.exports = core; diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/lib/core.json b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/lib/core.json new file mode 100644 index 00000000..843844eb --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/lib/core.json @@ -0,0 +1,47 @@ +{ + "*": [ + "assert", + "buffer_ieee754", + "buffer", + "child_process", + "cluster", + "console", + "constants", + "crypto", + "_debugger", + "dgram", + "dns", + "domain", + "events", + "freelist", + "fs", + "http", + "https", + "_linklist", + "module", + "net", + "os", + "path", + "punycode", + "querystring", + "readline", + "repl", + "stream", + "string_decoder", + "sys", + "timers", + "tls", + "tty", + "url", + "util", + "vm", + "zlib" + ], + "0.11": [ + "_http_server" + ], + "1.0": [ + "process", + "v8" + ] +} diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/lib/node-modules-paths.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/lib/node-modules-paths.js new file mode 100644 index 00000000..dc06199d --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/lib/node-modules-paths.js @@ -0,0 +1,35 @@ +var path = require('path'); +var parse = path.parse || require('path-parse'); + +module.exports = function nodeModulesPaths(start, opts) { + var modules = opts && opts.moduleDirectory + ? [].concat(opts.moduleDirectory) + : ['node_modules'] + ; + + // ensure that `start` is an absolute path at this point, + // resolving against the process' current working directory + var absoluteStart = path.resolve(start); + + var prefix = '/'; + if (/^([A-Za-z]:)/.test(absoluteStart)) { + prefix = ''; + } else if (/^\\\\/.test(absoluteStart)) { + prefix = '\\\\'; + } + + var paths = [absoluteStart]; + var parsed = parse(absoluteStart); + while (parsed.dir !== paths[paths.length - 1]) { + paths.push(parsed.dir); + parsed = parse(parsed.dir); + } + + var dirs = paths.reduce(function (dirs, aPath) { + return dirs.concat(modules.map(function (moduleDir) { + return path.join(prefix, aPath, moduleDir); + })); + }, []); + + return opts && opts.paths ? dirs.concat(opts.paths) : dirs; +}; diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/lib/sync.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/lib/sync.js new file mode 100644 index 00000000..510ca256 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/lib/sync.js @@ -0,0 +1,89 @@ +var core = require('./core'); +var fs = require('fs'); +var path = require('path'); +var caller = require('./caller.js'); +var nodeModulesPaths = require('./node-modules-paths.js'); + +module.exports = function (x, options) { + if (typeof x !== 'string') { + throw new TypeError('Path must be a string.'); + } + var opts = options || {}; + var isFile = opts.isFile || function (file) { + try { + var stat = fs.statSync(file); + } catch (e) { + if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false; + throw e; + } + return stat.isFile() || stat.isFIFO(); + }; + var readFileSync = opts.readFileSync || fs.readFileSync; + + var extensions = opts.extensions || ['.js']; + var y = opts.basedir || path.dirname(caller()); + + opts.paths = opts.paths || []; + + if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x)) { + var res = path.resolve(y, x); + if (x === '..' || x.slice(-1) === '/') res += '/'; + var m = loadAsFileSync(res) || loadAsDirectorySync(res); + if (m) return m; + } else { + var n = loadNodeModulesSync(x, y); + if (n) return n; + } + + if (core[x]) return x; + + var err = new Error("Cannot find module '" + x + "' from '" + y + "'"); + err.code = 'MODULE_NOT_FOUND'; + throw err; + + function loadAsFileSync(x) { + if (isFile(x)) { + return x; + } + + for (var i = 0; i < extensions.length; i++) { + var file = x + extensions[i]; + if (isFile(file)) { + return file; + } + } + } + + function loadAsDirectorySync(x) { + var pkgfile = path.join(x, '/package.json'); + if (isFile(pkgfile)) { + var body = readFileSync(pkgfile, 'utf8'); + try { + var pkg = JSON.parse(body); + if (opts.packageFilter) { + pkg = opts.packageFilter(pkg, x); + } + + if (pkg.main) { + var m = loadAsFileSync(path.resolve(x, pkg.main)); + if (m) return m; + var n = loadAsDirectorySync(path.resolve(x, pkg.main)); + if (n) return n; + } + } catch (e) {} + } + + return loadAsFileSync(path.join(x, '/index')); + } + + function loadNodeModulesSync(x, start) { + var dirs = nodeModulesPaths(start, opts); + for (var i = 0; i < dirs.length; i++) { + var dir = dirs[i]; + var m = loadAsFileSync(path.join(dir, '/', x)); + if (m) return m; + var n = loadAsDirectorySync(path.join(dir, '/', x)); + if (n) return n; + } + } +}; diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/package.json b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/package.json new file mode 100644 index 00000000..a7b5af50 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/package.json @@ -0,0 +1,108 @@ +{ + "_args": [ + [ + { + "raw": "resolve@^1.1.5", + "scope": null, + "escapedName": "resolve", + "name": "resolve", + "rawSpec": "^1.1.5", + "spec": ">=1.1.5 <2.0.0", + "type": "range" + }, + "/Users/MB/git/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs" + ] + ], + "_from": "resolve@>=1.1.5 <2.0.0", + "_id": "resolve@1.3.3", + "_inCache": true, + "_location": "/fontkit/resolve", + "_nodeVersion": "7.9.0", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/resolve-1.3.3.tgz_1492668562208_0.1827435742598027" + }, + "_npmUser": { + "name": "ljharb", + "email": "ljharb@gmail.com" + }, + "_npmVersion": "4.2.0", + "_phantomChildren": {}, + "_requested": { + "raw": "resolve@^1.1.5", + "scope": null, + "escapedName": "resolve", + "name": "resolve", + "rawSpec": "^1.1.5", + "spec": ">=1.1.5 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fontkit/brfs" + ], + "_resolved": "https://registry.npmjs.org/resolve/-/resolve-1.3.3.tgz", + "_shasum": "655907c3469a8680dc2de3a275a8fdd69691f0e5", + "_shrinkwrap": null, + "_spec": "resolve@^1.1.5", + "_where": "/Users/MB/git/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/substack/node-resolve/issues" + }, + "dependencies": { + "path-parse": "^1.0.5" + }, + "description": "resolve like require.resolve() on behalf of files asynchronously and synchronously", + "devDependencies": { + "@ljharb/eslint-config": "^11.0.0", + "eslint": "^3.19.0", + "object-keys": "^1.0.11", + "safe-publish-latest": "^1.1.1", + "tap": "0.4.13", + "tape": "^4.6.3" + }, + "directories": {}, + "dist": { + "shasum": "655907c3469a8680dc2de3a275a8fdd69691f0e5", + "tarball": "https://registry.npmjs.org/resolve/-/resolve-1.3.3.tgz" + }, + "gitHead": "f0098226a4fd0dedc85b5f1e8ca8aac6a7ca7a60", + "homepage": "https://github.com/substack/node-resolve#readme", + "keywords": [ + "resolve", + "require", + "node", + "module" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "ljharb", + "email": "ljharb@gmail.com" + }, + { + "name": "substack", + "email": "substack@gmail.com" + } + ], + "name": "resolve", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/substack/node-resolve.git" + }, + "scripts": { + "lint": "eslint .", + "prepublish": "safe-publish-latest", + "pretest": "npm run lint", + "test": "npm run --silent tests-only", + "tests-only": "tape test/*.js" + }, + "version": "1.3.3" +} diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/readme.markdown b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/readme.markdown new file mode 100644 index 00000000..db0d69f8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/readme.markdown @@ -0,0 +1,148 @@ +# resolve + +implements the [node `require.resolve()` +algorithm](https://nodejs.org/api/modules.html#modules_all_together) +such that you can `require.resolve()` on behalf of a file asynchronously and +synchronously + +[![build status](https://secure.travis-ci.org/substack/node-resolve.png)](http://travis-ci.org/substack/node-resolve) + +# example + +asynchronously resolve: + +``` js +var resolve = require('resolve'); +resolve('tap', { basedir: __dirname }, function (err, res) { + if (err) console.error(err) + else console.log(res) +}); +``` + +``` +$ node example/async.js +/home/substack/projects/node-resolve/node_modules/tap/lib/main.js +``` + +synchronously resolve: + +``` js +var resolve = require('resolve'); +var res = resolve.sync('tap', { basedir: __dirname }); +console.log(res); +``` + +``` +$ node example/sync.js +/home/substack/projects/node-resolve/node_modules/tap/lib/main.js +``` + +# methods + +``` js +var resolve = require('resolve') +``` + +## resolve(id, opts={}, cb) + +Asynchronously resolve the module path string `id` into `cb(err, res [, pkg])`, where `pkg` (if defined) is the data from `package.json`. + +options are: + +* opts.basedir - directory to begin resolving from + +* opts.package - `package.json` data applicable to the module being loaded + +* opts.extensions - array of file extensions to search in order + +* opts.readFile - how to read files asynchronously + +* opts.isFile - function to asynchronously test whether a file exists + +* opts.packageFilter - transform the parsed package.json contents before looking +at the "main" field + +* opts.pathFilter(pkg, path, relativePath) - transform a path within a package + * pkg - package data + * path - the path being resolved + * relativePath - the path relative from the package.json location + * returns - a relative path that will be joined from the package.json location + +* opts.paths - require.paths array to use if nothing is found on the normal +node_modules recursive walk (probably don't use this) + +* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"` + +default `opts` values: + +``` javascript +{ + paths: [], + basedir: __dirname, + extensions: [ '.js' ], + readFile: fs.readFile, + isFile: function (file, cb) { + fs.stat(file, function (err, stat) { + if (err && err.code === 'ENOENT') cb(null, false) + else if (err) cb(err) + else cb(null, stat.isFile()) + }); + }, + moduleDirectory: 'node_modules' +} +``` + +## resolve.sync(id, opts) + +Synchronously resolve the module path string `id`, returning the result and +throwing an error when `id` can't be resolved. + +options are: + +* opts.basedir - directory to begin resolving from + +* opts.extensions - array of file extensions to search in order + +* opts.readFile - how to read files synchronously + +* opts.isFile - function to synchronously test whether a file exists + +* `opts.packageFilter(pkg, pkgfile)` - transform the parsed package.json +* contents before looking at the "main" field + +* opts.paths - require.paths array to use if nothing is found on the normal +node_modules recursive walk (probably don't use this) + +* opts.moduleDirectory - directory (or directories) in which to recursively look for modules. default: `"node_modules"` + +default `opts` values: + +``` javascript +{ + paths: [], + basedir: __dirname, + extensions: [ '.js' ], + readFileSync: fs.readFileSync, + isFile: function (file) { + try { return fs.statSync(file).isFile() } + catch (e) { return false } + }, + moduleDirectory: 'node_modules' +} +```` + +## resolve.isCore(pkg) + +Return whether a package is in core. + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install resolve +``` + +# license + +MIT diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/core.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/core.js new file mode 100644 index 00000000..1182e0c0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/core.js @@ -0,0 +1,29 @@ +var test = require('tape'); +var resolve = require('../'); + +test('core modules', function (t) { + t.test('isCore()', function (st) { + st.ok(resolve.isCore('fs')); + st.ok(resolve.isCore('net')); + st.ok(resolve.isCore('http')); + + st.ok(!resolve.isCore('seq')); + st.ok(!resolve.isCore('../')); + st.end(); + }); + + t.test('core list', function (st) { + st.plan(resolve.core.length); + + for (var i = 0; i < resolve.core.length; ++i) { + st.doesNotThrow( + function () { require(resolve.core[i]); }, // eslint-disable-line no-loop-func + 'requiring ' + resolve.core[i] + ' does not throw' + ); + } + + st.end(); + }); + + t.end(); +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/dotdot.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/dotdot.js new file mode 100644 index 00000000..30806659 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/dotdot.js @@ -0,0 +1,29 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('dotdot', function (t) { + t.plan(4); + var dir = path.join(__dirname, '/dotdot/abc'); + + resolve('..', { basedir: dir }, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(__dirname, 'dotdot/index.js')); + }); + + resolve('.', { basedir: dir }, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, 'index.js')); + }); +}); + +test('dotdot sync', function (t) { + t.plan(2); + var dir = path.join(__dirname, '/dotdot/abc'); + + var a = resolve.sync('..', { basedir: dir }); + t.equal(a, path.join(__dirname, 'dotdot/index.js')); + + var b = resolve.sync('.', { basedir: dir }); + t.equal(b, path.join(dir, 'index.js')); +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/dotdot/abc/index.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/dotdot/abc/index.js new file mode 100644 index 00000000..67f2534e --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/dotdot/abc/index.js @@ -0,0 +1,2 @@ +var x = require('..'); +console.log(x); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/dotdot/index.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/dotdot/index.js new file mode 100644 index 00000000..643f9fcc --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/dotdot/index.js @@ -0,0 +1 @@ +module.exports = 'whatever'; diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/faulty_basedir.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/faulty_basedir.js new file mode 100644 index 00000000..e20d937c --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/faulty_basedir.js @@ -0,0 +1,13 @@ +var test = require('tape'); +var resolve = require('../'); + +test('faulty basedir must produce error in windows', { skip: process.platform !== 'win32' }, function (t) { + t.plan(1); + + var resolverDir = 'C:\\a\\b\\c\\d'; + + resolve('tape/lib/test.js', { basedir: resolverDir }, function (err, res, pkg) { + t.equal(true, !!err); + }); + +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/filter.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/filter.js new file mode 100644 index 00000000..51a753f1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/filter.js @@ -0,0 +1,19 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('filter', function (t) { + t.plan(2); + var dir = path.join(__dirname, 'resolver'); + resolve('./baz', { + basedir: dir, + packageFilter: function (pkg) { + pkg.main = 'doom'; + return pkg; + } + }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'baz/doom.js')); + t.equal(pkg.main, 'doom'); + }); +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/filter_sync.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/filter_sync.js new file mode 100644 index 00000000..fd4e97c2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/filter_sync.js @@ -0,0 +1,16 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('filter', function (t) { + var dir = path.join(__dirname, 'resolver'); + var res = resolve.sync('./baz', { + basedir: dir, + packageFilter: function (pkg) { + pkg.main = 'doom'; + return pkg; + } + }); + t.equal(res, path.join(dir, 'baz/doom.js')); + t.end(); +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/mock.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/mock.js new file mode 100644 index 00000000..a88059d4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/mock.js @@ -0,0 +1,143 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('mock', function (t) { + t.plan(8); + + var files = {}; + files[path.resolve('/foo/bar/baz.js')] = 'beep'; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); + }, + readFile: function (file, cb) { + cb(null, files[path.resolve(file)]); + } + }; + } + + resolve('./baz', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/baz.js')); + t.equal(pkg, undefined); + }); + + resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/baz.js')); + t.equal(pkg, undefined); + }); + + resolve('baz', opts('/foo/bar'), function (err, res) { + t.equal(err.message, "Cannot find module 'baz' from '" + path.resolve('/foo/bar') + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); + + resolve('../baz', opts('/foo/bar'), function (err, res) { + t.equal(err.message, "Cannot find module '../baz' from '" + path.resolve('/foo/bar') + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); +}); + +test('mock from package', function (t) { + t.plan(8); + + var files = {}; + files[path.resolve('/foo/bar/baz.js')] = 'beep'; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, file)); + }, + 'package': { main: 'bar' }, + readFile: function (file, cb) { + cb(null, files[file]); + } + }; + } + + resolve('./baz', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/baz.js')); + t.equal(pkg && pkg.main, 'bar'); + }); + + resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/bar/baz.js')); + t.equal(pkg && pkg.main, 'bar'); + }); + + resolve('baz', opts('/foo/bar'), function (err, res) { + t.equal(err.message, "Cannot find module 'baz' from '" + path.resolve('/foo/bar') + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); + + resolve('../baz', opts('/foo/bar'), function (err, res) { + t.equal(err.message, "Cannot find module '../baz' from '" + path.resolve('/foo/bar') + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); +}); + +test('mock package', function (t) { + t.plan(2); + + var files = {}; + files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep'; + files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ + main: './baz.js' + }); + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); + }, + readFile: function (file, cb) { + cb(null, files[path.resolve(file)]); + } + }; + } + + resolve('bar', opts('/foo'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/node_modules/bar/baz.js')); + t.equal(pkg && pkg.main, './baz.js'); + }); +}); + +test('mock package from package', function (t) { + t.plan(2); + + var files = {}; + files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep'; + files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ + main: './baz.js' + }); + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file, cb) { + cb(null, Object.prototype.hasOwnProperty.call(files, path.resolve(file))); + }, + 'package': { main: 'bar' }, + readFile: function (file, cb) { + cb(null, files[path.resolve(file)]); + } + }; + } + + resolve('bar', opts('/foo'), function (err, res, pkg) { + if (err) return t.fail(err); + t.equal(res, path.resolve('/foo/node_modules/bar/baz.js')); + t.equal(pkg && pkg.main, './baz.js'); + }); +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/mock_sync.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/mock_sync.js new file mode 100644 index 00000000..43af1028 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/mock_sync.js @@ -0,0 +1,67 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('mock', function (t) { + t.plan(4); + + var files = {}; + files[path.resolve('/foo/bar/baz.js')] = 'beep'; + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file) { + return Object.prototype.hasOwnProperty.call(files, file); + }, + readFileSync: function (file) { + return files[file]; + } + }; + } + + t.equal( + resolve.sync('./baz', opts('/foo/bar')), + path.resolve('/foo/bar/baz.js') + ); + + t.equal( + resolve.sync('./baz.js', opts('/foo/bar')), + path.resolve('/foo/bar/baz.js') + ); + + t.throws(function () { + resolve.sync('baz', opts('/foo/bar')); + }); + + t.throws(function () { + resolve.sync('../baz', opts('/foo/bar')); + }); +}); + +test('mock package', function (t) { + t.plan(1); + + var files = {}; + files[path.resolve('/foo/node_modules/bar/baz.js')] = 'beep'; + files[path.resolve('/foo/node_modules/bar/package.json')] = JSON.stringify({ + main: './baz.js' + }); + + function opts(basedir) { + return { + basedir: path.resolve(basedir), + isFile: function (file) { + return Object.prototype.hasOwnProperty.call(files, file); + }, + readFileSync: function (file) { + return files[file]; + } + }; + } + + t.equal( + resolve.sync('bar', opts('/foo')), + path.resolve('/foo/node_modules/bar/baz.js') + ); +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/module_dir.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/module_dir.js new file mode 100644 index 00000000..b50e5bb1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/module_dir.js @@ -0,0 +1,56 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('moduleDirectory strings', function (t) { + t.plan(4); + var dir = path.join(__dirname, 'module_dir'); + var xopts = { + basedir: dir, + moduleDirectory: 'xmodules' + }; + resolve('aaa', xopts, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, '/xmodules/aaa/index.js')); + }); + + var yopts = { + basedir: dir, + moduleDirectory: 'ymodules' + }; + resolve('aaa', yopts, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, '/ymodules/aaa/index.js')); + }); +}); + +test('moduleDirectory array', function (t) { + t.plan(6); + var dir = path.join(__dirname, 'module_dir'); + var aopts = { + basedir: dir, + moduleDirectory: ['xmodules', 'ymodules', 'zmodules'] + }; + resolve('aaa', aopts, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, '/xmodules/aaa/index.js')); + }); + + var bopts = { + basedir: dir, + moduleDirectory: ['zmodules', 'ymodules', 'xmodules'] + }; + resolve('aaa', bopts, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, '/ymodules/aaa/index.js')); + }); + + var copts = { + basedir: dir, + moduleDirectory: ['xmodules', 'ymodules', 'zmodules'] + }; + resolve('bbb', copts, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, '/zmodules/bbb/main.js')); + }); +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/module_dir/xmodules/aaa/index.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/module_dir/xmodules/aaa/index.js new file mode 100644 index 00000000..dd7cf7b2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/module_dir/xmodules/aaa/index.js @@ -0,0 +1 @@ +module.exports = function (x) { return x * 100; }; diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/module_dir/ymodules/aaa/index.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/module_dir/ymodules/aaa/index.js new file mode 100644 index 00000000..ef2d4d4b --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/module_dir/ymodules/aaa/index.js @@ -0,0 +1 @@ +module.exports = function (x) { return x + 100; }; diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/module_dir/zmodules/bbb/main.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/module_dir/zmodules/bbb/main.js new file mode 100644 index 00000000..e8ba6299 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/module_dir/zmodules/bbb/main.js @@ -0,0 +1 @@ +module.exports = function (n) { return n * 111; }; diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/module_dir/zmodules/bbb/package.json b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/module_dir/zmodules/bbb/package.json new file mode 100644 index 00000000..c13b8cf6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/module_dir/zmodules/bbb/package.json @@ -0,0 +1,3 @@ +{ + "main": "main.js" +} diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/node-modules-paths.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/node-modules-paths.js new file mode 100644 index 00000000..a917f063 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/node-modules-paths.js @@ -0,0 +1,93 @@ +var test = require('tape'); +var path = require('path'); +var parse = path.parse || require('path-parse'); +var keys = require('object-keys'); + +var nodeModulesPaths = require('../lib/node-modules-paths'); + +var verifyDirs = function verifyDirs(t, start, dirs, moduleDirectories, paths) { + var moduleDirs = [].concat(moduleDirectories || 'node_modules'); + + var foundModuleDirs = {}; + var uniqueDirs = {}; + var parsedDirs = {}; + for (var i = 0; i < dirs.length; ++i) { + var parsed = parse(dirs[i]); + if (!foundModuleDirs[parsed.base]) { foundModuleDirs[parsed.base] = 0; } + foundModuleDirs[parsed.base] += 1; + parsedDirs[parsed.dir] = true; + uniqueDirs[dirs[i]] = true; + } + t.equal(keys(parsedDirs).length >= start.split(path.sep).length, true, 'there are >= dirs than "start" has'); + var foundModuleDirNames = keys(foundModuleDirs); + t.deepEqual(foundModuleDirNames, moduleDirs.concat(paths || []), 'all desired module dirs were found'); + t.equal(keys(uniqueDirs).length, dirs.length, 'all dirs provided were unique'); + + var counts = {}; + for (var j = 0; j < foundModuleDirNames.length; ++j) { + counts[foundModuleDirs[j]] = true; + } + t.equal(keys(counts).length, 1, 'all found module directories had the same count'); +}; + +test('node-modules-paths', function (t) { + t.test('no options', function (t) { + var start = path.join(__dirname, 'resolver'); + var dirs = nodeModulesPaths(start); + + verifyDirs(t, start, dirs); + + t.end(); + }); + + t.test('empty options', function (t) { + var start = path.join(__dirname, 'resolver'); + var dirs = nodeModulesPaths(start, {}); + + verifyDirs(t, start, dirs); + + t.end(); + }); + + t.test('with paths option', function (t) { + var start = path.join(__dirname, 'resolver'); + var paths = ['a', 'b']; + var dirs = nodeModulesPaths(start, { paths: paths }); + + verifyDirs(t, start, dirs, null, paths); + + t.end(); + }); + + t.test('with moduleDirectory option', function (t) { + var start = path.join(__dirname, 'resolver'); + var moduleDirectory = 'not node modules'; + var dirs = nodeModulesPaths(start, { moduleDirectory: moduleDirectory }); + + verifyDirs(t, start, dirs, moduleDirectory); + + t.end(); + }); + + t.test('with 1 moduleDirectory and paths options', function (t) { + var start = path.join(__dirname, 'resolver'); + var paths = ['a', 'b']; + var moduleDirectory = 'not node modules'; + var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectory }); + + verifyDirs(t, start, dirs, moduleDirectory, paths); + + t.end(); + }); + + t.test('with 1+ moduleDirectory and paths options', function (t) { + var start = path.join(__dirname, 'resolver'); + var paths = ['a', 'b']; + var moduleDirectories = ['not node modules', 'other modules']; + var dirs = nodeModulesPaths(start, { paths: paths, moduleDirectory: moduleDirectories }); + + verifyDirs(t, start, dirs, moduleDirectories, paths); + + t.end(); + }); +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/node_path.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/node_path.js new file mode 100644 index 00000000..38a7d7e7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/node_path.js @@ -0,0 +1,49 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('$NODE_PATH', function (t) { + t.plan(4); + + resolve('aaa', { + paths: [ + path.join(__dirname, '/node_path/x'), + path.join(__dirname, '/node_path/y') + ], + basedir: __dirname + }, function (err, res) { + t.equal(res, path.join(__dirname, '/node_path/x/aaa/index.js')); + }); + + resolve('bbb', { + paths: [ + path.join(__dirname, '/node_path/x'), + path.join(__dirname, '/node_path/y') + ], + basedir: __dirname + }, function (err, res) { + t.equal(res, path.join(__dirname, '/node_path/y/bbb/index.js')); + }); + + resolve('ccc', { + paths: [ + path.join(__dirname, '/node_path/x'), + path.join(__dirname, '/node_path/y') + ], + basedir: __dirname + }, function (err, res) { + t.equal(res, path.join(__dirname, '/node_path/x/ccc/index.js')); + }); + + // ensure that relative paths still resolve against the + // regular `node_modules` correctly + resolve('tap', { + paths: [ + 'node_path' + ], + basedir: 'node_path/x' + }, function (err, res) { + var root = require('tap/package.json').main; + t.equal(res, path.resolve(__dirname, '..', 'node_modules/tap', root)); + }); +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/node_path/x/aaa/index.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/node_path/x/aaa/index.js new file mode 100644 index 00000000..ad70d0bb --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/node_path/x/aaa/index.js @@ -0,0 +1 @@ +module.exports = 'A'; diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/node_path/x/ccc/index.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/node_path/x/ccc/index.js new file mode 100644 index 00000000..a64132e4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/node_path/x/ccc/index.js @@ -0,0 +1 @@ +module.exports = 'C'; diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/node_path/y/bbb/index.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/node_path/y/bbb/index.js new file mode 100644 index 00000000..4d0f32e2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/node_path/y/bbb/index.js @@ -0,0 +1 @@ +module.exports = 'B'; diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/node_path/y/ccc/index.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/node_path/y/ccc/index.js new file mode 100644 index 00000000..793315e8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/node_path/y/ccc/index.js @@ -0,0 +1 @@ +module.exports = 'CY'; diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/nonstring.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/nonstring.js new file mode 100644 index 00000000..ef63c40f --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/nonstring.js @@ -0,0 +1,9 @@ +var test = require('tape'); +var resolve = require('../'); + +test('nonstring', function (t) { + t.plan(1); + resolve(555, function (err, res, pkg) { + t.ok(err); + }); +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/pathfilter.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/pathfilter.js new file mode 100644 index 00000000..733045a0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/pathfilter.js @@ -0,0 +1,42 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('#62: deep module references and the pathFilter', function (t) { + t.plan(9); + + var resolverDir = path.join(__dirname, '/pathfilter/deep_ref'); + var pathFilter = function (pkg, x, remainder) { + t.equal(pkg.version, '1.2.3'); + t.equal(x, path.join(resolverDir, 'node_modules/deep/ref')); + t.equal(remainder, 'ref'); + return 'alt'; + }; + + resolve('deep/ref', { basedir: resolverDir }, function (err, res, pkg) { + if (err) t.fail(err); + + t.equal(pkg.version, '1.2.3'); + t.equal(res, path.join(resolverDir, 'node_modules/deep/ref.js')); + }); + + resolve( + 'deep/deeper/ref', + { basedir: resolverDir }, + function (err, res, pkg) { + if (err) t.fail(err); + t.notEqual(pkg, undefined); + t.equal(pkg.version, '1.2.3'); + t.equal(res, path.join(resolverDir, 'node_modules/deep/deeper/ref.js')); + } + ); + + resolve( + 'deep/ref', + { basedir: resolverDir, pathFilter: pathFilter }, + function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(resolverDir, 'node_modules/deep/alt.js')); + } + ); +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/pathfilter/deep_ref/main.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/pathfilter/deep_ref/main.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/precedence.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/precedence.js new file mode 100644 index 00000000..2febb598 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/precedence.js @@ -0,0 +1,23 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('precedence', function (t) { + t.plan(3); + var dir = path.join(__dirname, 'precedence/aaa'); + + resolve('./', { basedir: dir }, function (err, res, pkg) { + t.ifError(err); + t.equal(res, path.join(dir, 'index.js')); + t.equal(pkg.name, 'resolve'); + }); +}); + +test('./ should not load ${dir}.js', function (t) { // eslint-disable-line no-template-curly-in-string + t.plan(1); + var dir = path.join(__dirname, 'precedence/bbb'); + + resolve('./', { basedir: dir }, function (err, res, pkg) { + t.ok(err); + }); +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/precedence/aaa.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/precedence/aaa.js new file mode 100644 index 00000000..b83a3e7a --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/precedence/aaa.js @@ -0,0 +1 @@ +module.exports = 'wtf'; diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/precedence/aaa/index.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/precedence/aaa/index.js new file mode 100644 index 00000000..e0f8f6ab --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/precedence/aaa/index.js @@ -0,0 +1 @@ +module.exports = 'okok'; diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/precedence/aaa/main.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/precedence/aaa/main.js new file mode 100644 index 00000000..93542a96 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/precedence/aaa/main.js @@ -0,0 +1 @@ +console.log(require('./')); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/precedence/bbb.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/precedence/bbb.js new file mode 100644 index 00000000..2298f47f --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/precedence/bbb.js @@ -0,0 +1 @@ +module.exports = '>_<'; diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/precedence/bbb/main.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/precedence/bbb/main.js new file mode 100644 index 00000000..716b81d4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/precedence/bbb/main.js @@ -0,0 +1 @@ +console.log(require('./')); // should throw diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver.js new file mode 100644 index 00000000..adde5444 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver.js @@ -0,0 +1,327 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('async foo', function (t) { + t.plan(10); + var dir = path.join(__dirname, 'resolver'); + + resolve('./foo', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo.js')); + t.equal(pkg && pkg.name, 'resolve'); + }); + + resolve('./foo.js', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo.js')); + t.equal(pkg && pkg.name, 'resolve'); + }); + + resolve('./foo', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo.js')); + t.equal(pkg && pkg.main, 'resolver'); + }); + + resolve('./foo.js', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo.js')); + t.equal(pkg.main, 'resolver'); + }); + + resolve('foo', { basedir: dir }, function (err) { + t.equal(err.message, "Cannot find module 'foo' from '" + path.resolve(dir) + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); +}); + +test('bar', function (t) { + t.plan(6); + var dir = path.join(__dirname, 'resolver'); + + resolve('foo', { basedir: dir + '/bar' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js')); + t.equal(pkg, undefined); + }); + + resolve('foo', { basedir: dir + '/bar' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js')); + t.equal(pkg, undefined); + }); + + resolve('foo', { basedir: dir + '/bar', 'package': { main: 'bar' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'bar/node_modules/foo/index.js')); + t.equal(pkg, undefined); + }); +}); + +test('baz', function (t) { + t.plan(4); + var dir = path.join(__dirname, 'resolver'); + + resolve('./baz', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'baz/quux.js')); + t.equal(pkg.main, 'quux.js'); + }); + + resolve('./baz', { basedir: dir, 'package': { main: 'resolver' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'baz/quux.js')); + t.equal(pkg.main, 'quux.js'); + }); +}); + +test('biz', function (t) { + t.plan(24); + var dir = path.join(__dirname, 'resolver/biz/node_modules'); + + resolve('./grux', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'grux/index.js')); + t.equal(pkg, undefined); + }); + + resolve('./grux', { basedir: dir, 'package': { main: 'biz' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'grux/index.js')); + t.equal(pkg.main, 'biz'); + }); + + resolve('./garply', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'garply/lib/index.js')); + t.equal(pkg.main, './lib'); + }); + + resolve('./garply', { basedir: dir, 'package': { main: 'biz' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'garply/lib/index.js')); + t.equal(pkg.main, './lib'); + }); + + resolve('tiv', { basedir: dir + '/grux' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'tiv/index.js')); + t.equal(pkg, undefined); + }); + + resolve('tiv', { basedir: dir + '/grux', 'package': { main: 'grux' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'tiv/index.js')); + t.equal(pkg, undefined); + }); + + resolve('tiv', { basedir: dir + '/garply' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'tiv/index.js')); + t.equal(pkg, undefined); + }); + + resolve('tiv', { basedir: dir + '/garply', 'package': { main: './lib' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'tiv/index.js')); + t.equal(pkg, undefined); + }); + + resolve('grux', { basedir: dir + '/tiv' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'grux/index.js')); + t.equal(pkg, undefined); + }); + + resolve('grux', { basedir: dir + '/tiv', 'package': { main: 'tiv' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'grux/index.js')); + t.equal(pkg, undefined); + }); + + resolve('garply', { basedir: dir + '/tiv' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'garply/lib/index.js')); + t.equal(pkg.main, './lib'); + }); + + resolve('garply', { basedir: dir + '/tiv', 'package': { main: 'tiv' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'garply/lib/index.js')); + t.equal(pkg.main, './lib'); + }); +}); + +test('quux', function (t) { + t.plan(2); + var dir = path.join(__dirname, 'resolver/quux'); + + resolve('./foo', { basedir: dir, 'package': { main: 'quux' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'foo/index.js')); + t.equal(pkg.main, 'quux'); + }); +}); + +test('normalize', function (t) { + t.plan(2); + var dir = path.join(__dirname, 'resolver/biz/node_modules/grux'); + + resolve('../grux', { basedir: dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'index.js')); + t.equal(pkg, undefined); + }); +}); + +test('cup', function (t) { + t.plan(4); + var dir = path.join(__dirname, 'resolver'); + + resolve('./cup', { basedir: dir, extensions: ['.js', '.coffee'] }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'cup.coffee')); + }); + + resolve('./cup.coffee', { basedir: dir }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'cup.coffee')); + }); + + resolve('./cup', { basedir: dir, extensions: ['.js'] }, function (err, res) { + t.equal(err.message, "Cannot find module './cup' from '" + path.resolve(dir) + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); +}); + +test('mug', function (t) { + t.plan(3); + var dir = path.join(__dirname, 'resolver'); + + resolve('./mug', { basedir: dir }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'mug.js')); + }); + + resolve('./mug', { basedir: dir, extensions: ['.coffee', '.js'] }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(dir, '/mug.coffee')); + }); + + resolve('./mug', { basedir: dir, extensions: ['.js', '.coffee'] }, function (err, res) { + t.equal(res, path.join(dir, '/mug.js')); + }); +}); + +test('other path', function (t) { + t.plan(6); + var resolverDir = path.join(__dirname, 'resolver'); + var dir = path.join(resolverDir, 'bar'); + var otherDir = path.join(resolverDir, 'other_path'); + + resolve('root', { basedir: dir, paths: [otherDir] }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(resolverDir, 'other_path/root.js')); + }); + + resolve('lib/other-lib', { basedir: dir, paths: [otherDir] }, function (err, res) { + if (err) t.fail(err); + t.equal(res, path.join(resolverDir, 'other_path/lib/other-lib.js')); + }); + + resolve('root', { basedir: dir }, function (err, res) { + t.equal(err.message, "Cannot find module 'root' from '" + path.resolve(dir) + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); + + resolve('zzz', { basedir: dir, paths: [otherDir] }, function (err, res) { + t.equal(err.message, "Cannot find module 'zzz' from '" + path.resolve(dir) + "'"); + t.equal(err.code, 'MODULE_NOT_FOUND'); + }); +}); + +test('incorrect main', function (t) { + t.plan(1); + + var resolverDir = path.join(__dirname, 'resolver'); + var dir = path.join(resolverDir, 'incorrect_main'); + + resolve('./incorrect_main', { basedir: resolverDir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'index.js')); + }); +}); + +test('without basedir', function (t) { + t.plan(1); + + var dir = path.join(__dirname, 'resolver/without_basedir'); + var tester = require(path.join(dir, 'main.js')); + + tester(t, function (err, res, pkg) { + if (err) { + t.fail(err); + } else { + t.equal(res, path.join(dir, 'node_modules/mymodule.js')); + } + }); +}); + +test('#25: node modules with the same name as node stdlib modules', function (t) { + t.plan(1); + + var resolverDir = path.join(__dirname, 'resolver/punycode'); + + resolve('punycode', { basedir: resolverDir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(resolverDir, 'node_modules/punycode/index.js')); + }); +}); + +test('#52 - incorrectly resolves module-paths like "./someFolder/" when there is a file of the same name', function (t) { + t.plan(2); + + var dir = path.join(__dirname, 'resolver'); + + resolve('./foo', { basedir: path.join(dir, 'same_names') }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'same_names/foo.js')); + }); + + resolve('./foo/', { basedir: path.join(dir, 'same_names') }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, path.join(dir, 'same_names/foo/index.js')); + }); +}); + +test('async: #121 - treating an existing file as a dir when no basedir', function (t) { + var testFile = path.basename(__filename); + + t.test('sanity check', function (st) { + st.plan(1); + resolve('./' + testFile, function (err, res, pkg) { + if (err) t.fail(err); + st.equal(res, __filename, 'sanity check'); + }); + }); + + t.test('with a fake directory', function (st) { + st.plan(4); + + resolve('./' + testFile + '/blah', function (err, res, pkg) { + st.ok(err, 'there is an error'); + st.notOk(res, 'no result'); + + st.equal(err && err.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve'); + st.equal( + err && err.message, + 'Cannot find module \'./' + testFile + '/blah\' from \'' + __dirname + '\'', + 'can not find nonexistent module' + ); + st.end(); + }); + }); + + t.end(); +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/baz/doom.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/baz/doom.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/baz/package.json b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/baz/package.json new file mode 100644 index 00000000..c41e4dbf --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/baz/package.json @@ -0,0 +1,3 @@ +{ + "main": "quux.js" +} diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/baz/quux.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/baz/quux.js new file mode 100644 index 00000000..bd816eab --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/baz/quux.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/cup.coffee b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/cup.coffee new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/cup.coffee @@ -0,0 +1 @@ + diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/foo.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/foo.js new file mode 100644 index 00000000..bd816eab --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/foo.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/incorrect_main/index.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/incorrect_main/index.js new file mode 100644 index 00000000..bc1fb0a6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/incorrect_main/index.js @@ -0,0 +1,2 @@ +// this is the actual main file 'index.js', not 'wrong.js' like the package.json would indicate +module.exports = 1; diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/incorrect_main/package.json b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/incorrect_main/package.json new file mode 100644 index 00000000..b7188041 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/incorrect_main/package.json @@ -0,0 +1,3 @@ +{ + "main": "wrong.js" +} diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/mug.coffee b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/mug.coffee new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/mug.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/mug.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/other_path/lib/other-lib.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/other_path/lib/other-lib.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/other_path/root.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/other_path/root.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/quux/foo/index.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/quux/foo/index.js new file mode 100644 index 00000000..bd816eab --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/quux/foo/index.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/same_names/foo.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/same_names/foo.js new file mode 100644 index 00000000..888cae37 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/same_names/foo.js @@ -0,0 +1 @@ +module.exports = 42; diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/same_names/foo/index.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/same_names/foo/index.js new file mode 100644 index 00000000..bd816eab --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/same_names/foo/index.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/without_basedir/main.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/without_basedir/main.js new file mode 100644 index 00000000..5b31975b --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver/without_basedir/main.js @@ -0,0 +1,5 @@ +var resolve = require('../../../'); + +module.exports = function (t, cb) { + resolve('mymodule', null, cb); +}; diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver_sync.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver_sync.js new file mode 100644 index 00000000..2bc36102 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/resolver_sync.js @@ -0,0 +1,253 @@ +var path = require('path'); +var test = require('tape'); +var resolve = require('../'); + +test('foo', function (t) { + var dir = path.join(__dirname, 'resolver'); + + t.equal( + resolve.sync('./foo', { basedir: dir }), + path.join(dir, 'foo.js') + ); + + t.equal( + resolve.sync('./foo.js', { basedir: dir }), + path.join(dir, 'foo.js') + ); + + t.throws(function () { + resolve.sync('foo', { basedir: dir }); + }); + + t.end(); +}); + +test('bar', function (t) { + var dir = path.join(__dirname, 'resolver'); + + t.equal( + resolve.sync('foo', { basedir: path.join(dir, 'bar') }), + path.join(dir, 'bar/node_modules/foo/index.js') + ); + t.end(); +}); + +test('baz', function (t) { + var dir = path.join(__dirname, 'resolver'); + + t.equal( + resolve.sync('./baz', { basedir: dir }), + path.join(dir, 'baz/quux.js') + ); + t.end(); +}); + +test('biz', function (t) { + var dir = path.join(__dirname, 'resolver/biz/node_modules'); + t.equal( + resolve.sync('./grux', { basedir: dir }), + path.join(dir, 'grux/index.js') + ); + + t.equal( + resolve.sync('tiv', { basedir: path.join(dir, 'grux') }), + path.join(dir, 'tiv/index.js') + ); + + t.equal( + resolve.sync('grux', { basedir: path.join(dir, 'tiv') }), + path.join(dir, 'grux/index.js') + ); + t.end(); +}); + +test('normalize', function (t) { + var dir = path.join(__dirname, 'resolver/biz/node_modules/grux'); + t.equal( + resolve.sync('../grux', { basedir: dir }), + path.join(dir, 'index.js') + ); + t.end(); +}); + +test('cup', function (t) { + var dir = path.join(__dirname, 'resolver'); + t.equal( + resolve.sync('./cup', { + basedir: dir, + extensions: ['.js', '.coffee'] + }), + path.join(dir, 'cup.coffee') + ); + + t.equal( + resolve.sync('./cup.coffee', { basedir: dir }), + path.join(dir, 'cup.coffee') + ); + + t.throws(function () { + resolve.sync('./cup', { + basedir: dir, + extensions: ['.js'] + }); + }); + + t.end(); +}); + +test('mug', function (t) { + var dir = path.join(__dirname, 'resolver'); + t.equal( + resolve.sync('./mug', { basedir: dir }), + path.join(dir, 'mug.js') + ); + + t.equal( + resolve.sync('./mug', { + basedir: dir, + extensions: ['.coffee', '.js'] + }), + path.join(dir, 'mug.coffee') + ); + + t.equal( + resolve.sync('./mug', { + basedir: dir, + extensions: ['.js', '.coffee'] + }), + path.join(dir, 'mug.js') + ); + + t.end(); +}); + +test('other path', function (t) { + var resolverDir = path.join(__dirname, 'resolver'); + var dir = path.join(resolverDir, 'bar'); + var otherDir = path.join(resolverDir, 'other_path'); + + t.equal( + resolve.sync('root', { + basedir: dir, + paths: [otherDir] + }), + path.join(resolverDir, 'other_path/root.js') + ); + + t.equal( + resolve.sync('lib/other-lib', { + basedir: dir, + paths: [otherDir] + }), + path.join(resolverDir, 'other_path/lib/other-lib.js') + ); + + t.throws(function () { + resolve.sync('root', { basedir: dir }); + }); + + t.throws(function () { + resolve.sync('zzz', { + basedir: dir, + paths: [otherDir] + }); + }); + + t.end(); +}); + +test('incorrect main', function (t) { + var resolverDir = path.join(__dirname, 'resolver'); + var dir = path.join(resolverDir, 'incorrect_main'); + + t.equal( + resolve.sync('./incorrect_main', { basedir: resolverDir }), + path.join(dir, 'index.js') + ); + + t.end(); +}); + +test('#25: node modules with the same name as node stdlib modules', function (t) { + var resolverDir = path.join(__dirname, 'resolver/punycode'); + + t.equal( + resolve.sync('punycode', { basedir: resolverDir }), + path.join(resolverDir, 'node_modules/punycode/index.js') + ); + + t.end(); +}); + +var stubStatSync = function stubStatSync(fn) { + var fs = require('fs'); + var statSync = fs.statSync; + try { + fs.statSync = function () { + throw new EvalError('Unknown Error'); + }; + return fn(); + } finally { + fs.statSync = statSync; + } +}; + +test('#79 - re-throw non ENOENT errors from stat', function (t) { + var dir = path.join(__dirname, 'resolver'); + + stubStatSync(function () { + t.throws(function () { + resolve.sync('foo', { basedir: dir }); + }, /Unknown Error/); + }); + + t.end(); +}); + +test('#52 - incorrectly resolves module-paths like "./someFolder/" when there is a file of the same name', function (t) { + var dir = path.join(__dirname, 'resolver'); + + t.equal( + resolve.sync('./foo', { basedir: path.join(dir, 'same_names') }), + path.join(dir, 'same_names/foo.js') + ); + t.equal( + resolve.sync('./foo/', { basedir: path.join(dir, 'same_names') }), + path.join(dir, 'same_names/foo/index.js') + ); + t.end(); +}); + +test('sync: #121 - treating an existing file as a dir when no basedir', function (t) { + var testFile = path.basename(__filename); + + t.test('sanity check', function (st) { + st.equal( + resolve.sync('./' + testFile), + __filename, + 'sanity check' + ); + st.end(); + }); + + t.test('with a fake directory', function (st) { + function run() { return resolve.sync('./' + testFile + '/blah'); } + + st.throws(run, 'throws an error'); + + try { + run(); + } catch (e) { + st.equal(e.code, 'MODULE_NOT_FOUND', 'error code matches require.resolve'); + st.equal( + e.message, + 'Cannot find module \'./' + testFile + '/blah\' from \'' + __dirname + '\'', + 'can not find nonexistent module' + ); + } + + st.end(); + }); + + t.end(); +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/subdirs.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/subdirs.js new file mode 100644 index 00000000..b7b8450a --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/resolve/test/subdirs.js @@ -0,0 +1,13 @@ +var test = require('tape'); +var resolve = require('../'); +var path = require('path'); + +test('subdirs', function (t) { + t.plan(2); + + var dir = path.join(__dirname, '/subdirs'); + resolve('a/b/c/x.json', { basedir: dir }, function (err, res) { + t.ifError(err); + t.equal(res, path.join(dir, 'node_modules/a/b/c/x.json')); + }); +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/string_decoder/.npmignore b/pitfall/pdfkit/node_modules/fontkit/node_modules/string_decoder/.npmignore new file mode 100644 index 00000000..206320cc --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/string_decoder/.npmignore @@ -0,0 +1,2 @@ +build +test diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/string_decoder/LICENSE b/pitfall/pdfkit/node_modules/fontkit/node_modules/string_decoder/LICENSE new file mode 100644 index 00000000..778edb20 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/string_decoder/LICENSE @@ -0,0 +1,48 @@ +Node.js is licensed for use as follows: + +""" +Copyright Node.js contributors. All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND 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. +""" + +This license applies to parts of Node.js originating from the +https://github.com/joyent/node repository: + +""" +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND 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. +""" + diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/string_decoder/README.md b/pitfall/pdfkit/node_modules/fontkit/node_modules/string_decoder/README.md new file mode 100644 index 00000000..13d827d8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/string_decoder/README.md @@ -0,0 +1,30 @@ +# string_decoder + +***Node-core v7.0.0 string_decoder for userland*** + + +[![NPM](https://nodei.co/npm/string_decoder.png?downloads=true&downloadRank=true)](https://nodei.co/npm/string_decoder/) +[![NPM](https://nodei.co/npm-dl/string_decoder.png?&months=6&height=3)](https://nodei.co/npm/string_decoder/) + + +[![Sauce Test Status](https://saucelabs.com/browser-matrix/string_decoder.svg)](https://saucelabs.com/u/string_decoder) + +```bash +npm install --save string_decoder +``` + +***Node-core string_decoderstring_decoder for userland*** + +This package is a mirror of the string_decoder implementation in Node-core. + +Full documentation may be found on the [Node.js website](https://nodejs.org/dist/v7.8.0/docs/api/). + +As of version 1.0.0 **string_decoder** uses semantic versioning. + +## Previous versions + +Previous version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. + +## Update + +The *build/* directory contains a build script that will scrape the source from the [nodejs/node](https://github.com/nodejs/node) repo given a specific Node version. diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/string_decoder/lib/string_decoder.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/string_decoder/lib/string_decoder.js new file mode 100644 index 00000000..696d7ab6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/string_decoder/lib/string_decoder.js @@ -0,0 +1,273 @@ +'use strict'; + +var Buffer = require('buffer').Buffer; +var bufferShim = require('buffer-shims'); + +var isEncoding = Buffer.isEncoding || function (encoding) { + encoding = '' + encoding; + switch (encoding && encoding.toLowerCase()) { + case 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2':case 'utf16le':case 'utf-16le':case 'raw': + return true; + default: + return false; + } +}; + +function _normalizeEncoding(enc) { + if (!enc) return 'utf8'; + var retried; + while (true) { + switch (enc) { + case 'utf8': + case 'utf-8': + return 'utf8'; + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + return 'utf16le'; + case 'latin1': + case 'binary': + return 'latin1'; + case 'base64': + case 'ascii': + case 'hex': + return enc; + default: + if (retried) return; // undefined + enc = ('' + enc).toLowerCase(); + retried = true; + } + } +}; + +// Do not cache `Buffer.isEncoding` when checking encoding names as some +// modules monkey-patch it to support additional encodings +function normalizeEncoding(enc) { + var nenc = _normalizeEncoding(enc); + if (typeof nenc !== 'string' && (Buffer.isEncoding === isEncoding || !isEncoding(enc))) throw new Error('Unknown encoding: ' + enc); + return nenc || enc; +} + +// StringDecoder provides an interface for efficiently splitting a series of +// buffers into a series of JS strings without breaking apart multi-byte +// characters. +exports.StringDecoder = StringDecoder; +function StringDecoder(encoding) { + this.encoding = normalizeEncoding(encoding); + var nb; + switch (this.encoding) { + case 'utf16le': + this.text = utf16Text; + this.end = utf16End; + nb = 4; + break; + case 'utf8': + this.fillLast = utf8FillLast; + nb = 4; + break; + case 'base64': + this.text = base64Text; + this.end = base64End; + nb = 3; + break; + default: + this.write = simpleWrite; + this.end = simpleEnd; + return; + } + this.lastNeed = 0; + this.lastTotal = 0; + this.lastChar = bufferShim.allocUnsafe(nb); +} + +StringDecoder.prototype.write = function (buf) { + if (buf.length === 0) return ''; + var r; + var i; + if (this.lastNeed) { + r = this.fillLast(buf); + if (r === undefined) return ''; + i = this.lastNeed; + this.lastNeed = 0; + } else { + i = 0; + } + if (i < buf.length) return r ? r + this.text(buf, i) : this.text(buf, i); + return r || ''; +}; + +StringDecoder.prototype.end = utf8End; + +// Returns only complete characters in a Buffer +StringDecoder.prototype.text = utf8Text; + +// Attempts to complete a partial non-UTF-8 character using bytes from a Buffer +StringDecoder.prototype.fillLast = function (buf) { + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); + } + buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length); + this.lastNeed -= buf.length; +}; + +// Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a +// continuation byte. +function utf8CheckByte(byte) { + if (byte <= 0x7F) return 0;else if (byte >> 5 === 0x06) return 2;else if (byte >> 4 === 0x0E) return 3;else if (byte >> 3 === 0x1E) return 4; + return -1; +} + +// Checks at most 3 bytes at the end of a Buffer in order to detect an +// incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4) +// needed to complete the UTF-8 character (if applicable) are returned. +function utf8CheckIncomplete(self, buf, i) { + var j = buf.length - 1; + if (j < i) return 0; + var nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self.lastNeed = nb - 1; + return nb; + } + if (--j < i) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) self.lastNeed = nb - 2; + return nb; + } + if (--j < i) return 0; + nb = utf8CheckByte(buf[j]); + if (nb >= 0) { + if (nb > 0) { + if (nb === 2) nb = 0;else self.lastNeed = nb - 3; + } + return nb; + } + return 0; +} + +// Validates as many continuation bytes for a multi-byte UTF-8 character as +// needed or are available. If we see a non-continuation byte where we expect +// one, we "replace" the validated continuation bytes we've seen so far with +// UTF-8 replacement characters ('\ufffd'), to match v8's UTF-8 decoding +// behavior. The continuation byte check is included three times in the case +// where all of the continuation bytes for a character exist in the same buffer. +// It is also done this way as a slight performance increase instead of using a +// loop. +function utf8CheckExtraBytes(self, buf, p) { + if ((buf[0] & 0xC0) !== 0x80) { + self.lastNeed = 0; + return '\ufffd'.repeat(p); + } + if (self.lastNeed > 1 && buf.length > 1) { + if ((buf[1] & 0xC0) !== 0x80) { + self.lastNeed = 1; + return '\ufffd'.repeat(p + 1); + } + if (self.lastNeed > 2 && buf.length > 2) { + if ((buf[2] & 0xC0) !== 0x80) { + self.lastNeed = 2; + return '\ufffd'.repeat(p + 2); + } + } + } +} + +// Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer. +function utf8FillLast(buf) { + var p = this.lastTotal - this.lastNeed; + var r = utf8CheckExtraBytes(this, buf, p); + if (r !== undefined) return r; + if (this.lastNeed <= buf.length) { + buf.copy(this.lastChar, p, 0, this.lastNeed); + return this.lastChar.toString(this.encoding, 0, this.lastTotal); + } + buf.copy(this.lastChar, p, 0, buf.length); + this.lastNeed -= buf.length; +} + +// Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a +// partial character, the character's bytes are buffered until the required +// number of bytes are available. +function utf8Text(buf, i) { + var total = utf8CheckIncomplete(this, buf, i); + if (!this.lastNeed) return buf.toString('utf8', i); + this.lastTotal = total; + var end = buf.length - (total - this.lastNeed); + buf.copy(this.lastChar, 0, end); + return buf.toString('utf8', i, end); +} + +// For UTF-8, a replacement character for each buffered byte of a (partial) +// character needs to be added to the output. +function utf8End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) return r + '\ufffd'.repeat(this.lastTotal - this.lastNeed); + return r; +} + +// UTF-16LE typically needs two bytes per character, but even if we have an even +// number of bytes available, we need to check if we end on a leading/high +// surrogate. In that case, we need to wait for the next two bytes in order to +// decode the last character properly. +function utf16Text(buf, i) { + if ((buf.length - i) % 2 === 0) { + var r = buf.toString('utf16le', i); + if (r) { + var c = r.charCodeAt(r.length - 1); + if (c >= 0xD800 && c <= 0xDBFF) { + this.lastNeed = 2; + this.lastTotal = 4; + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; + return r.slice(0, -1); + } + } + return r; + } + this.lastNeed = 1; + this.lastTotal = 2; + this.lastChar[0] = buf[buf.length - 1]; + return buf.toString('utf16le', i, buf.length - 1); +} + +// For UTF-16LE we do not explicitly append special replacement characters if we +// end on a partial character, we simply let v8 handle that. +function utf16End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) { + var end = this.lastTotal - this.lastNeed; + return r + this.lastChar.toString('utf16le', 0, end); + } + return r; +} + +function base64Text(buf, i) { + var n = (buf.length - i) % 3; + if (n === 0) return buf.toString('base64', i); + this.lastNeed = 3 - n; + this.lastTotal = 3; + if (n === 1) { + this.lastChar[0] = buf[buf.length - 1]; + } else { + this.lastChar[0] = buf[buf.length - 2]; + this.lastChar[1] = buf[buf.length - 1]; + } + return buf.toString('base64', i, buf.length - n); +} + +function base64End(buf) { + var r = buf && buf.length ? this.write(buf) : ''; + if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed); + return r; +} + +// Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex) +function simpleWrite(buf) { + return buf.toString(this.encoding); +} + +function simpleEnd(buf) { + return buf && buf.length ? this.write(buf) : ''; +} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/string_decoder/package.json b/pitfall/pdfkit/node_modules/fontkit/node_modules/string_decoder/package.json new file mode 100644 index 00000000..370ceeb3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/string_decoder/package.json @@ -0,0 +1,107 @@ +{ + "_args": [ + [ + { + "raw": "string_decoder@~1.0.0", + "scope": null, + "escapedName": "string_decoder", + "name": "string_decoder", + "rawSpec": "~1.0.0", + "spec": ">=1.0.0 <1.1.0", + "type": "range" + }, + "/Users/MB/git/pitfall/pdfkit/node_modules/quote-stream/node_modules/readable-stream" + ], + [ + { + "raw": "string_decoder@~1.0.0", + "scope": null, + "escapedName": "string_decoder", + "name": "string_decoder", + "rawSpec": "~1.0.0", + "spec": ">=1.0.0 <1.1.0", + "type": "range" + }, + "/Users/MB/git/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream" + ] + ], + "_from": "string_decoder@~1.0.0", + "_id": "string_decoder@1.0.0", + "_inCache": true, + "_location": "/fontkit/string_decoder", + "_nodeVersion": "7.8.0", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/string_decoder-1.0.0.tgz_1491485897373_0.9406327686738223" + }, + "_npmUser": { + "name": "rvagg", + "email": "rod@vagg.org" + }, + "_npmVersion": "4.4.4", + "_phantomChildren": {}, + "_requested": { + "raw": "string_decoder@~1.0.0", + "scope": null, + "escapedName": "string_decoder", + "name": "string_decoder", + "rawSpec": "~1.0.0", + "spec": ">=1.0.0 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "/fontkit/readable-stream" + ], + "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.0.tgz", + "_shasum": "f06f41157b664d86069f84bdbdc9b0d8ab281667", + "_shrinkwrap": null, + "_spec": "string_decoder@~1.0.0", + "_where": "/Users/MB/git/pitfall/pdfkit/node_modules/fontkit/node_modules/readable-stream", + "bugs": { + "url": "https://github.com/rvagg/string_decoder/issues" + }, + "dependencies": { + "buffer-shims": "~1.0.0" + }, + "description": "The string_decoder module from Node core", + "devDependencies": { + "babel-polyfill": "^6.23.0", + "tap": "~0.4.8" + }, + "directories": {}, + "dist": { + "shasum": "f06f41157b664d86069f84bdbdc9b0d8ab281667", + "tarball": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.0.tgz" + }, + "gitHead": "847f2f513a5648857af03adf680c90d833a499d2", + "homepage": "https://github.com/rvagg/string_decoder", + "keywords": [ + "string", + "decoder", + "browser", + "browserify" + ], + "license": "MIT", + "main": "lib/string_decoder.js", + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + }, + { + "name": "rvagg", + "email": "rod@vagg.org" + } + ], + "name": "string_decoder", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/rvagg/string_decoder.git" + }, + "scripts": { + "test": "tap test/parallel/*.js" + }, + "version": "1.0.0" +} diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/through2/.npmignore b/pitfall/pdfkit/node_modules/fontkit/node_modules/through2/.npmignore new file mode 100644 index 00000000..1e1dcab3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/through2/.npmignore @@ -0,0 +1,3 @@ +test +.jshintrc +.travis.yml \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/through2/LICENSE.html b/pitfall/pdfkit/node_modules/fontkit/node_modules/through2/LICENSE.html new file mode 100644 index 00000000..ac478189 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/through2/LICENSE.html @@ -0,0 +1,336 @@ + + + + + + + + + + + + + + +
    +

    The MIT License (MIT)

    +

    Copyright (c) 2016 Rod Vagg (the "Original Author") and additional contributors

    +

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    +

    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

    +

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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.

    +
    +
    + + \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/through2/LICENSE.md b/pitfall/pdfkit/node_modules/fontkit/node_modules/through2/LICENSE.md new file mode 100644 index 00000000..7f0b93da --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/through2/LICENSE.md @@ -0,0 +1,9 @@ +# The MIT License (MIT) + +**Copyright (c) 2016 Rod Vagg (the "Original Author") and additional contributors** + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/through2/README.md b/pitfall/pdfkit/node_modules/fontkit/node_modules/through2/README.md new file mode 100644 index 00000000..a916f15e --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/through2/README.md @@ -0,0 +1,136 @@ +# through2 + +[![NPM](https://nodei.co/npm/through2.png?downloads&downloadRank)](https://nodei.co/npm/through2/) + +**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise** + +Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`. + +Note: As 2.x.x this module starts using **Streams3** instead of Stream2. To continue using a Streams2 version use `npm install through2@0` to fetch the latest version of 0.x.x. More information about Streams2 vs Streams3 and recommendations see the article **[Why I don't use Node's core 'stream' module](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html)**. + +```js +fs.createReadStream('ex.txt') + .pipe(through2(function (chunk, enc, callback) { + for (var i = 0; i < chunk.length; i++) + if (chunk[i] == 97) + chunk[i] = 122 // swap 'a' for 'z' + + this.push(chunk) + + callback() + })) + .pipe(fs.createWriteStream('out.txt')) + .on('finish', function () { + doSomethingSpecial() + }) +``` + +Or object streams: + +```js +var all = [] + +fs.createReadStream('data.csv') + .pipe(csv2()) + .pipe(through2.obj(function (chunk, enc, callback) { + var data = { + name : chunk[0] + , address : chunk[3] + , phone : chunk[10] + } + this.push(data) + + callback() + })) + .on('data', function (data) { + all.push(data) + }) + .on('end', function () { + doSomethingSpecial(all) + }) +``` + +Note that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`. + +## API + +through2([ options, ] [ transformFunction ] [, flushFunction ]) + +Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`). + +### options + +The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`). + +The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call: + +```js +fs.createReadStream('/tmp/important.dat') + .pipe(through2({ objectMode: true, allowHalfOpen: false }, + function (chunk, enc, cb) { + cb(null, 'wut?') // note we can use the second argument on the callback + // to provide data as an alternative to this.push('wut?') + } + ) + .pipe(fs.createWriteStream('/tmp/wut.txt')) +``` + +### transformFunction + +The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk. + +To queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on. + +Alternatively, you may use `callback(err, chunk)` as shorthand for emitting a single chunk or an error. + +If you **do not provide a `transformFunction`** then you will get a simple pass-through stream. + +### flushFunction + +The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress. + +```js +fs.createReadStream('/tmp/important.dat') + .pipe(through2( + function (chunk, enc, cb) { cb(null, chunk) }, // transform is a noop + function (cb) { // flush function + this.push('tacking on an extra buffer to the end'); + cb(); + } + )) + .pipe(fs.createWriteStream('/tmp/wut.txt')); +``` + +through2.ctor([ options, ] transformFunction[, flushFunction ]) + +Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances. + +```js +var FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) { + if (record.temp != null && record.unit == "F") { + record.temp = ( ( record.temp - 32 ) * 5 ) / 9 + record.unit = "C" + } + this.push(record) + callback() +}) + +// Create instances of FToC like so: +var converter = new FToC() +// Or: +var converter = FToC() +// Or specify/override options when you instantiate, if you prefer: +var converter = FToC({objectMode: true}) +``` + +## See Also + + - [through2-map](https://github.com/brycebaril/through2-map) - Array.prototype.map analog for streams. + - [through2-filter](https://github.com/brycebaril/through2-filter) - Array.prototype.filter analog for streams. + - [through2-reduce](https://github.com/brycebaril/through2-reduce) - Array.prototype.reduce analog for streams. + - [through2-spy](https://github.com/brycebaril/through2-spy) - Wrapper for simple stream.PassThrough spies. + - the [mississippi stream utility collection](https://github.com/maxogden/mississippi) includes `through2` as well as many more useful stream modules similar to this one + +## License + +**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/through2/package.json b/pitfall/pdfkit/node_modules/fontkit/node_modules/through2/package.json new file mode 100644 index 00000000..68607673 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/through2/package.json @@ -0,0 +1,104 @@ +{ + "_args": [ + [ + { + "raw": "through2@^2.0.0", + "scope": null, + "escapedName": "through2", + "name": "through2", + "rawSpec": "^2.0.0", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "/Users/MB/git/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs" + ] + ], + "_from": "through2@>=2.0.0 <3.0.0", + "_id": "through2@2.0.3", + "_inCache": true, + "_location": "/fontkit/through2", + "_nodeVersion": "7.2.0", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/through2-2.0.3.tgz_1480373529377_0.264686161885038" + }, + "_npmUser": { + "name": "rvagg", + "email": "rod@vagg.org" + }, + "_npmVersion": "3.10.9", + "_phantomChildren": {}, + "_requested": { + "raw": "through2@^2.0.0", + "scope": null, + "escapedName": "through2", + "name": "through2", + "rawSpec": "^2.0.0", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fontkit/brfs" + ], + "_resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "_shasum": "0004569b37c7c74ba39c43f3ced78d1ad94140be", + "_shrinkwrap": null, + "_spec": "through2@^2.0.0", + "_where": "/Users/MB/git/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs", + "author": { + "name": "Rod Vagg", + "email": "r@va.gg", + "url": "https://github.com/rvagg" + }, + "bugs": { + "url": "https://github.com/rvagg/through2/issues" + }, + "dependencies": { + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" + }, + "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise", + "devDependencies": { + "bl": "~1.1.2", + "faucet": "0.0.1", + "stream-spigot": "~3.0.5", + "tape": "~4.6.2" + }, + "directories": {}, + "dist": { + "shasum": "0004569b37c7c74ba39c43f3ced78d1ad94140be", + "tarball": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz" + }, + "gitHead": "4383b10b2cb6a32ae215760715b317513abe609f", + "homepage": "https://github.com/rvagg/through2#readme", + "keywords": [ + "stream", + "streams2", + "through", + "transform" + ], + "license": "MIT", + "main": "through2.js", + "maintainers": [ + { + "name": "rvagg", + "email": "rod@vagg.org" + }, + { + "name": "bryce", + "email": "bryce@ravenwall.com" + } + ], + "name": "through2", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/rvagg/through2.git" + }, + "scripts": { + "test": "node test/test.js | faucet", + "test-local": "brtapsauce-local test/basic-test.js" + }, + "version": "2.0.3" +} diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/through2/through2.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/through2/through2.js new file mode 100644 index 00000000..5b7a880e --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/through2/through2.js @@ -0,0 +1,96 @@ +var Transform = require('readable-stream/transform') + , inherits = require('util').inherits + , xtend = require('xtend') + +function DestroyableTransform(opts) { + Transform.call(this, opts) + this._destroyed = false +} + +inherits(DestroyableTransform, Transform) + +DestroyableTransform.prototype.destroy = function(err) { + if (this._destroyed) return + this._destroyed = true + + var self = this + process.nextTick(function() { + if (err) + self.emit('error', err) + self.emit('close') + }) +} + +// a noop _transform function +function noop (chunk, enc, callback) { + callback(null, chunk) +} + + +// create a new export function, used by both the main export and +// the .ctor export, contains common logic for dealing with arguments +function through2 (construct) { + return function (options, transform, flush) { + if (typeof options == 'function') { + flush = transform + transform = options + options = {} + } + + if (typeof transform != 'function') + transform = noop + + if (typeof flush != 'function') + flush = null + + return construct(options, transform, flush) + } +} + + +// main export, just make me a transform stream! +module.exports = through2(function (options, transform, flush) { + var t2 = new DestroyableTransform(options) + + t2._transform = transform + + if (flush) + t2._flush = flush + + return t2 +}) + + +// make me a reusable prototype that I can `new`, or implicitly `new` +// with a constructor call +module.exports.ctor = through2(function (options, transform, flush) { + function Through2 (override) { + if (!(this instanceof Through2)) + return new Through2(override) + + this.options = xtend(options, override) + + DestroyableTransform.call(this, this.options) + } + + inherits(Through2, DestroyableTransform) + + Through2.prototype._transform = transform + + if (flush) + Through2.prototype._flush = flush + + return Through2 +}) + + +module.exports.obj = through2(function (options, transform, flush) { + var t2 = new DestroyableTransform(xtend({ objectMode: true, highWaterMark: 16 }, options)) + + t2._transform = transform + + if (flush) + t2._flush = flush + + return t2 +}) diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/xtend/.jshintrc b/pitfall/pdfkit/node_modules/fontkit/node_modules/xtend/.jshintrc new file mode 100644 index 00000000..77887b5f --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/xtend/.jshintrc @@ -0,0 +1,30 @@ +{ + "maxdepth": 4, + "maxstatements": 200, + "maxcomplexity": 12, + "maxlen": 80, + "maxparams": 5, + + "curly": true, + "eqeqeq": true, + "immed": true, + "latedef": false, + "noarg": true, + "noempty": true, + "nonew": true, + "undef": true, + "unused": "vars", + "trailing": true, + + "quotmark": true, + "expr": true, + "asi": true, + + "browser": false, + "esnext": true, + "devel": false, + "node": false, + "nonstandard": false, + + "predef": ["require", "module", "__dirname", "__filename"] +} diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/xtend/.npmignore b/pitfall/pdfkit/node_modules/fontkit/node_modules/xtend/.npmignore new file mode 100644 index 00000000..3c3629e6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/xtend/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/xtend/LICENCE b/pitfall/pdfkit/node_modules/fontkit/node_modules/xtend/LICENCE new file mode 100644 index 00000000..1a14b437 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/xtend/LICENCE @@ -0,0 +1,19 @@ +Copyright (c) 2012-2014 Raynos. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/xtend/Makefile b/pitfall/pdfkit/node_modules/fontkit/node_modules/xtend/Makefile new file mode 100644 index 00000000..d583fcf4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/xtend/Makefile @@ -0,0 +1,4 @@ +browser: + node ./support/compile + +.PHONY: browser \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/xtend/README.md b/pitfall/pdfkit/node_modules/fontkit/node_modules/xtend/README.md new file mode 100644 index 00000000..093cb297 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/xtend/README.md @@ -0,0 +1,32 @@ +# xtend + +[![browser support][3]][4] + +[![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges) + +Extend like a boss + +xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes precedence. + +## Examples + +```js +var extend = require("xtend") + +// extend returns a new object. Does not mutate arguments +var combination = extend({ + a: "a", + b: 'c' +}, { + b: "b" +}) +// { a: "a", b: "b" } +``` + +## Stability status: Locked + +## MIT Licenced + + + [3]: http://ci.testling.com/Raynos/xtend.png + [4]: http://ci.testling.com/Raynos/xtend diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/xtend/immutable.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/xtend/immutable.js new file mode 100644 index 00000000..94889c9d --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/xtend/immutable.js @@ -0,0 +1,19 @@ +module.exports = extend + +var hasOwnProperty = Object.prototype.hasOwnProperty; + +function extend() { + var target = {} + + for (var i = 0; i < arguments.length; i++) { + var source = arguments[i] + + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + target[key] = source[key] + } + } + } + + return target +} diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/xtend/mutable.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/xtend/mutable.js new file mode 100644 index 00000000..72debede --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/xtend/mutable.js @@ -0,0 +1,17 @@ +module.exports = extend + +var hasOwnProperty = Object.prototype.hasOwnProperty; + +function extend(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] + + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + target[key] = source[key] + } + } + } + + return target +} diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/xtend/package.json b/pitfall/pdfkit/node_modules/fontkit/node_modules/xtend/package.json new file mode 100644 index 00000000..a2908a2b --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/xtend/package.json @@ -0,0 +1,129 @@ +{ + "_args": [ + [ + { + "raw": "xtend@~4.0.1", + "scope": null, + "escapedName": "xtend", + "name": "xtend", + "rawSpec": "~4.0.1", + "spec": ">=4.0.1 <4.1.0", + "type": "range" + }, + "/Users/MB/git/pitfall/pdfkit/node_modules/quote-stream/node_modules/through2" + ], + [ + { + "raw": "xtend@~4.0.1", + "scope": null, + "escapedName": "xtend", + "name": "xtend", + "rawSpec": "~4.0.1", + "spec": ">=4.0.1 <4.1.0", + "type": "range" + }, + "/Users/MB/git/pitfall/pdfkit/node_modules/fontkit/node_modules/through2" + ] + ], + "_from": "xtend@~4.0.1", + "_id": "xtend@4.0.1", + "_inCache": true, + "_location": "/fontkit/xtend", + "_nodeVersion": "0.10.32", + "_npmUser": { + "name": "raynos", + "email": "raynos2@gmail.com" + }, + "_npmVersion": "2.14.1", + "_phantomChildren": {}, + "_requested": { + "raw": "xtend@~4.0.1", + "scope": null, + "escapedName": "xtend", + "name": "xtend", + "rawSpec": "~4.0.1", + "spec": ">=4.0.1 <4.1.0", + "type": "range" + }, + "_requiredBy": [ + "/fontkit/through2" + ], + "_resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "_shasum": "a5c6d532be656e23db820efb943a1f04998d63af", + "_shrinkwrap": null, + "_spec": "xtend@~4.0.1", + "_where": "/Users/MB/git/pitfall/pdfkit/node_modules/fontkit/node_modules/through2", + "author": { + "name": "Raynos", + "email": "raynos2@gmail.com" + }, + "bugs": { + "url": "https://github.com/Raynos/xtend/issues", + "email": "raynos2@gmail.com" + }, + "contributors": [ + { + "name": "Jake Verbaten" + }, + { + "name": "Matt Esch" + } + ], + "dependencies": {}, + "description": "extend like a boss", + "devDependencies": { + "tape": "~1.1.0" + }, + "directories": {}, + "dist": { + "shasum": "a5c6d532be656e23db820efb943a1f04998d63af", + "tarball": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" + }, + "engines": { + "node": ">=0.4" + }, + "gitHead": "23dc302a89756da89c1897bc732a752317e35390", + "homepage": "https://github.com/Raynos/xtend", + "keywords": [ + "extend", + "merge", + "options", + "opts", + "object", + "array" + ], + "license": "MIT", + "main": "immutable", + "maintainers": [ + { + "name": "raynos", + "email": "raynos2@gmail.com" + } + ], + "name": "xtend", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/Raynos/xtend.git" + }, + "scripts": { + "test": "node test" + }, + "testling": { + "files": "test.js", + "browsers": [ + "ie/7..latest", + "firefox/16..latest", + "firefox/nightly", + "chrome/22..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest" + ] + }, + "version": "4.0.1" +} diff --git a/pitfall/pdfkit/node_modules/fontkit/node_modules/xtend/test.js b/pitfall/pdfkit/node_modules/fontkit/node_modules/xtend/test.js new file mode 100644 index 00000000..093a2b06 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/node_modules/xtend/test.js @@ -0,0 +1,83 @@ +var test = require("tape") +var extend = require("./") +var mutableExtend = require("./mutable") + +test("merge", function(assert) { + var a = { a: "foo" } + var b = { b: "bar" } + + assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) + assert.end() +}) + +test("replace", function(assert) { + var a = { a: "foo" } + var b = { a: "bar" } + + assert.deepEqual(extend(a, b), { a: "bar" }) + assert.end() +}) + +test("undefined", function(assert) { + var a = { a: undefined } + var b = { b: "foo" } + + assert.deepEqual(extend(a, b), { a: undefined, b: "foo" }) + assert.deepEqual(extend(b, a), { a: undefined, b: "foo" }) + assert.end() +}) + +test("handle 0", function(assert) { + var a = { a: "default" } + var b = { a: 0 } + + assert.deepEqual(extend(a, b), { a: 0 }) + assert.deepEqual(extend(b, a), { a: "default" }) + assert.end() +}) + +test("is immutable", function (assert) { + var record = {} + + extend(record, { foo: "bar" }) + assert.equal(record.foo, undefined) + assert.end() +}) + +test("null as argument", function (assert) { + var a = { foo: "bar" } + var b = null + var c = void 0 + + assert.deepEqual(extend(b, a, c), { foo: "bar" }) + assert.end() +}) + +test("mutable", function (assert) { + var a = { foo: "bar" } + + mutableExtend(a, { bar: "baz" }) + + assert.equal(a.bar, "baz") + assert.end() +}) + +test("null prototype", function(assert) { + var a = { a: "foo" } + var b = Object.create(null) + b.b = "bar"; + + assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) + assert.end() +}) + +test("null prototype mutable", function (assert) { + var a = { foo: "bar" } + var b = Object.create(null) + b.bar = "baz"; + + mutableExtend(a, b) + + assert.equal(a.bar, "baz") + assert.end() +}) diff --git a/pitfall/pdfkit/node_modules/fontkit/package.json b/pitfall/pdfkit/node_modules/fontkit/package.json new file mode 100644 index 00000000..acac40b0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/package.json @@ -0,0 +1,134 @@ +{ + "_args": [ + [ + { + "raw": "fontkit@^1.0.0", + "scope": null, + "escapedName": "fontkit", + "name": "fontkit", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/MB/git/pdfkit" + ] + ], + "_from": "fontkit@>=1.0.0 <2.0.0", + "_id": "fontkit@1.6.0", + "_inCache": true, + "_location": "/fontkit", + "_nodeVersion": "6.9.2", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/fontkit-1.6.0.tgz_1494108641022_0.4099445338360965" + }, + "_npmUser": { + "name": "devongovett", + "email": "devongovett@gmail.com" + }, + "_npmVersion": "3.10.9", + "_phantomChildren": {}, + "_requested": { + "raw": "fontkit@^1.0.0", + "scope": null, + "escapedName": "fontkit", + "name": "fontkit", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/fontkit/-/fontkit-1.6.0.tgz", + "_shasum": "11abe3865d52c2c59665c082695f12558825327b", + "_shrinkwrap": null, + "_spec": "fontkit@^1.0.0", + "_where": "/Users/MB/git/pdfkit", + "author": { + "name": "Devon Govett", + "email": "devongovett@gmail.com" + }, + "browserify": { + "transform": [ + "brfs", + "browserify-optional" + ] + }, + "dependencies": { + "babel-runtime": "^6.11.6", + "brfs": "^1.4.0", + "brotli": "^1.2.0", + "browserify-optional": "^1.0.0", + "clone": "^1.0.1", + "deep-equal": "^1.0.0", + "dfa": "^1.0.0", + "restructure": "^0.5.3", + "tiny-inflate": "^1.0.2", + "unicode-properties": "^1.0.0", + "unicode-trie": "^0.3.0" + }, + "description": "An advanced font engine for Node and the browser", + "devDependencies": { + "babel-cli": "^6.14.0", + "babel-plugin-istanbul": "^4.1.3", + "babel-plugin-transform-class-properties": "^6.16.0", + "babel-plugin-transform-decorators-legacy": "^1.3.4", + "babel-plugin-transform-runtime": "^6.12.0", + "babel-preset-es2015": "^6.14.0", + "babel-register": "^6.14.0", + "codepoints": "^1.2.0", + "concat-stream": "^1.4.6", + "esdoc": "^0.4.8", + "esdoc-es7-plugin": "0.0.3", + "iconv-lite": "^0.4.13", + "mocha": "^2.0.1", + "nyc": "^10.3.2", + "rollup": "^0.34.10", + "rollup-plugin-babel": "^2.6.1", + "rollup-plugin-json": "^2.0.2", + "rollup-plugin-local-resolve": "^1.0.7" + }, + "directories": {}, + "dist": { + "shasum": "11abe3865d52c2c59665c082695f12558825327b", + "tarball": "https://registry.npmjs.org/fontkit/-/fontkit-1.6.0.tgz" + }, + "files": [ + "src", + "base.js", + "base.js.map", + "index.js", + "index.js.map", + "data.trie", + "use.trie" + ], + "gitHead": "4b1248c48c79e4f55873de2942e56a41786c03e3", + "jsnext:main": "src/index.js", + "keywords": [ + "opentype", + "font", + "typography", + "subset", + "emoji", + "glyph", + "layout" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "devongovett", + "email": "devongovett@gmail.com" + } + ], + "name": "fontkit", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "scripts": { + "coverage": "BABEL_ENV=cover nyc mocha", + "prepublish": "make", + "test": "mocha" + }, + "version": "1.6.0" +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/CmapProcessor.js b/pitfall/pdfkit/node_modules/fontkit/src/CmapProcessor.js new file mode 100644 index 00000000..26a89b24 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/CmapProcessor.js @@ -0,0 +1,295 @@ +import {binarySearch} from './utils'; +import {getEncoding} from './encodings'; +import {cache} from './decorators'; +import {range} from './utils'; + +// iconv-lite is an optional dependency. +try { + var iconv = require('iconv-lite'); +} catch (err) {} + +export default class CmapProcessor { + constructor(cmapTable) { + // Attempt to find a Unicode cmap first + this.encoding = null; + this.cmap = this.findSubtable(cmapTable, [ + // 32-bit subtables + [3, 10], + [0, 6], + [0, 4], + + // 16-bit subtables + [3, 1], + [0, 3], + [0, 2], + [0, 1], + [0, 0] + ]); + + // If not unicode cmap was found, and iconv-lite is installed, + // take the first table with a supported encoding. + if (!this.cmap && iconv) { + for (let cmap of cmapTable.tables) { + let encoding = getEncoding(cmap.platformID, cmap.encodingID, cmap.table.language - 1); + if (iconv.encodingExists(encoding)) { + this.cmap = cmap.table; + this.encoding = encoding; + } + } + } + + if (!this.cmap) { + throw new Error("Could not find a supported cmap table"); + } + + this.uvs = this.findSubtable(cmapTable, [[0, 5]]); + if (this.uvs && this.uvs.version !== 14) { + this.uvs = null; + } + } + + findSubtable(cmapTable, pairs) { + for (let [platformID, encodingID] of pairs) { + for (let cmap of cmapTable.tables) { + if (cmap.platformID === platformID && cmap.encodingID === encodingID) { + return cmap.table; + } + } + } + + return null; + } + + lookup(codepoint, variationSelector) { + // If there is no Unicode cmap in this font, we need to re-encode + // the codepoint in the encoding that the cmap supports. + if (this.encoding) { + let buf = iconv.encode(String.fromCodePoint(codepoint), this.encoding); + codepoint = 0; + for (let i = 0; i < buf.length; i++) { + codepoint = (codepoint << 8) | buf[i]; + } + + // Otherwise, try to get a Unicode variation selector for this codepoint if one is provided. + } else if (variationSelector) { + let gid = this.getVariationSelector(codepoint, variationSelector); + if (gid) { + return gid; + } + } + + let cmap = this.cmap; + switch (cmap.version) { + case 0: + return cmap.codeMap.get(codepoint) || 0; + + case 4: { + let min = 0; + let max = cmap.segCount - 1; + while (min <= max) { + let mid = (min + max) >> 1; + + if (codepoint < cmap.startCode.get(mid)) { + max = mid - 1; + } else if (codepoint > cmap.endCode.get(mid)) { + min = mid + 1; + } else { + let rangeOffset = cmap.idRangeOffset.get(mid); + let gid; + + if (rangeOffset === 0) { + gid = codepoint + cmap.idDelta.get(mid); + } else { + let index = rangeOffset / 2 + (codepoint - cmap.startCode.get(mid)) - (cmap.segCount - mid); + gid = cmap.glyphIndexArray.get(index) || 0; + if (gid !== 0) { + gid += cmap.idDelta.get(mid); + } + } + + return gid & 0xffff; + } + } + + return 0; + } + + case 8: + throw new Error('TODO: cmap format 8'); + + case 6: + case 10: + return cmap.glyphIndices.get(codepoint - cmap.firstCode) || 0; + + case 12: + case 13: { + let min = 0; + let max = cmap.nGroups - 1; + while (min <= max) { + let mid = (min + max) >> 1; + let group = cmap.groups.get(mid); + + if (codepoint < group.startCharCode) { + max = mid - 1; + } else if (codepoint > group.endCharCode) { + min = mid + 1; + } else { + if (cmap.version === 12) { + return group.glyphID + (codepoint - group.startCharCode); + } else { + return group.glyphID; + } + } + } + + return 0; + } + + case 14: + throw new Error('TODO: cmap format 14'); + + default: + throw new Error(`Unknown cmap format ${cmap.version}`); + } + } + + getVariationSelector(codepoint, variationSelector) { + if (!this.uvs) { + return 0; + } + + let selectors = this.uvs.varSelectors.toArray(); + let i = binarySearch(selectors, x => variationSelector - x.varSelector); + let sel = selectors[i]; + + if (i !== -1 && sel.defaultUVS) { + i = binarySearch(sel.defaultUVS, x => + codepoint < x.startUnicodeValue ? -1 : codepoint > x.startUnicodeValue + x.additionalCount ? +1 : 0 + ); + } + + if (i !== -1 && sel.nonDefaultUVS) { + i = binarySearch(sel.nonDefaultUVS, x => codepoint - x.unicodeValue); + if (i !== -1) { + return sel.nonDefaultUVS[i].glyphID; + } + } + + return 0; + } + + @cache + getCharacterSet() { + let cmap = this.cmap; + switch (cmap.version) { + case 0: + return range(0, cmap.codeMap.length); + + case 4: { + let res = []; + let endCodes = cmap.endCode.toArray(); + for (let i = 0; i < endCodes.length; i++) { + let tail = endCodes[i] + 1; + let start = cmap.startCode.get(i); + res.push(...range(start, tail)); + } + + return res; + } + + case 8: + throw new Error('TODO: cmap format 8'); + + case 6: + case 10: + return range(cmap.firstCode, cmap.firstCode + cmap.glyphIndices.length); + + case 12: + case 13: { + let res = []; + for (let group of cmap.groups.toArray()) { + res.push(...range(group.startCharCode, group.endCharCode + 1)); + } + + return res; + } + + case 14: + throw new Error('TODO: cmap format 14'); + + default: + throw new Error(`Unknown cmap format ${cmap.version}`); + } + } + + @cache + codePointsForGlyph(gid) { + let cmap = this.cmap; + switch (cmap.version) { + case 0: { + let res = []; + for (let i = 0; i < 256; i++) { + if (cmap.codeMap.get(i) === gid) { + res.push(i); + } + } + + return res; + } + + case 4: { + let res = []; + for (let i = 0; i < cmap.segCount; i++) { + let end = cmap.endCode.get(i); + let start = cmap.startCode.get(i); + let rangeOffset = cmap.idRangeOffset.get(i); + let delta = cmap.idDelta.get(i); + + for (var c = start; c <= end; c++) { + let g = 0; + if (rangeOffset === 0) { + g = c + delta; + } else { + let index = rangeOffset / 2 + (c - start) - (cmap.segCount - i); + g = cmap.glyphIndexArray.get(index) || 0; + if (g !== 0) { + g += delta; + } + } + + if (g === gid) { + res.push(c); + } + } + } + + return res; + } + + case 12: { + let res = []; + for (let group of cmap.groups.toArray()) { + if (gid >= group.glyphID && gid <= group.glyphID + (group.endCharCode - group.startCharCode)) { + res.push(group.startCharCode + (gid - group.glyphID)); + } + } + + return res; + } + + case 13: { + let res = []; + for (let group of cmap.groups.toArray()) { + if (gid === group.glyphID) { + res.push(...range(group.startCharCode, group.endCharCode + 1)); + } + } + + return res; + } + + default: + throw new Error(`Unknown cmap format ${cmap.version}`); + } + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/DFont.js b/pitfall/pdfkit/node_modules/fontkit/src/DFont.js new file mode 100644 index 00000000..7736a35b --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/DFont.js @@ -0,0 +1,108 @@ +import r from 'restructure'; +import TTFFont from './TTFFont'; + +let DFontName = new r.String(r.uint8); +let DFontData = new r.Struct({ + len: r.uint32, + buf: new r.Buffer('len') +}); + +let Ref = new r.Struct({ + id: r.uint16, + nameOffset: r.int16, + attr: r.uint8, + dataOffset: r.uint24, + handle: r.uint32 +}); + +let Type = new r.Struct({ + name: new r.String(4), + maxTypeIndex: r.uint16, + refList: new r.Pointer(r.uint16, new r.Array(Ref, t => t.maxTypeIndex + 1), { type: 'parent' }) +}); + +let TypeList = new r.Struct({ + length: r.uint16, + types: new r.Array(Type, t => t.length + 1) +}); + +let DFontMap = new r.Struct({ + reserved: new r.Reserved(r.uint8, 24), + typeList: new r.Pointer(r.uint16, TypeList), + nameListOffset: new r.Pointer(r.uint16, 'void') +}); + +let DFontHeader = new r.Struct({ + dataOffset: r.uint32, + map: new r.Pointer(r.uint32, DFontMap), + dataLength: r.uint32, + mapLength: r.uint32 +}); + +export default class DFont { + static probe(buffer) { + let stream = new r.DecodeStream(buffer); + + try { + var header = DFontHeader.decode(stream); + } catch (e) { + return false; + } + + for (let type of header.map.typeList.types) { + if (type.name === 'sfnt') { + return true; + } + } + + return false; + } + + constructor(stream) { + this.stream = stream; + this.header = DFontHeader.decode(this.stream); + + for (let type of this.header.map.typeList.types) { + for (let ref of type.refList) { + if (ref.nameOffset >= 0) { + this.stream.pos = ref.nameOffset + this.header.map.nameListOffset; + ref.name = DFontName.decode(this.stream); + } else { + ref.name = null; + } + } + + if (type.name === 'sfnt') { + this.sfnt = type; + } + } + } + + getFont(name) { + if (!this.sfnt) { + return null; + } + + for (let ref of this.sfnt.refList) { + let pos = this.header.dataOffset + ref.dataOffset + 4; + let stream = new r.DecodeStream(this.stream.buffer.slice(pos)); + let font = new TTFFont(stream); + if (font.postscriptName === name) { + return font; + } + } + + return null; + } + + get fonts() { + let fonts = []; + for (let ref of this.sfnt.refList) { + let pos = this.header.dataOffset + ref.dataOffset + 4; + let stream = new r.DecodeStream(this.stream.buffer.slice(pos)); + fonts.push(new TTFFont(stream)); + } + + return fonts; + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/TTFFont.js b/pitfall/pdfkit/node_modules/fontkit/src/TTFFont.js new file mode 100644 index 00000000..72f329a3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/TTFFont.js @@ -0,0 +1,535 @@ +import r from 'restructure'; +import { cache } from './decorators'; +import fontkit from './base'; +import Directory from './tables/directory'; +import tables from './tables'; +import CmapProcessor from './CmapProcessor'; +import LayoutEngine from './layout/LayoutEngine'; +import TTFGlyph from './glyph/TTFGlyph'; +import CFFGlyph from './glyph/CFFGlyph'; +import SBIXGlyph from './glyph/SBIXGlyph'; +import COLRGlyph from './glyph/COLRGlyph'; +import GlyphVariationProcessor from './glyph/GlyphVariationProcessor'; +import TTFSubset from './subset/TTFSubset'; +import CFFSubset from './subset/CFFSubset'; +import BBox from './glyph/BBox'; + +/** + * This is the base class for all SFNT-based font formats in fontkit. + * It supports TrueType, and PostScript glyphs, and several color glyph formats. + */ +export default class TTFFont { + static probe(buffer) { + let format = buffer.toString('ascii', 0, 4); + return format === 'true' || format === 'OTTO' || format === String.fromCharCode(0, 1, 0, 0); + } + + constructor(stream, variationCoords = null) { + this.stream = stream; + this.variationCoords = variationCoords; + + this._directoryPos = this.stream.pos; + this._tables = {}; + this._glyphs = {}; + this._decodeDirectory(); + + // define properties for each table to lazily parse + for (let tag in this.directory.tables) { + let table = this.directory.tables[tag]; + if (tables[tag] && table.length > 0) { + Object.defineProperty(this, tag, { + get: this._getTable.bind(this, table) + }); + } + } + } + + _getTable(table) { + if (!(table.tag in this._tables)) { + try { + this._tables[table.tag] = this._decodeTable(table); + } catch (e) { + if (fontkit.logErrors) { + console.error(`Error decoding table ${table.tag}`); + console.error(e.stack); + } + } + } + + return this._tables[table.tag]; + } + + _getTableStream(tag) { + let table = this.directory.tables[tag]; + if (table) { + this.stream.pos = table.offset; + return this.stream; + } + + return null; + } + + _decodeDirectory() { + return this.directory = Directory.decode(this.stream, {_startOffset: 0}); + } + + _decodeTable(table) { + let pos = this.stream.pos; + + let stream = this._getTableStream(table.tag); + let result = tables[table.tag].decode(stream, this, table.length); + + this.stream.pos = pos; + return result; + } + + /** + * The unique PostScript name for this font + * @type {string} + */ + get postscriptName() { + let name = this.name.records.postscriptName; + let lang = Object.keys(name)[0]; + return name[lang]; + } + + /** + * Gets a string from the font's `name` table + * `lang` is a BCP-47 language code. + * @return {string} + */ + getName(key, lang = 'en') { + let record = this.name.records[key]; + if (record) { + return record[lang]; + } + + return null; + } + + /** + * The font's full name, e.g. "Helvetica Bold" + * @type {string} + */ + get fullName() { + return this.getName('fullName'); + } + + /** + * The font's family name, e.g. "Helvetica" + * @type {string} + */ + get familyName() { + return this.getName('fontFamily'); + } + + /** + * The font's sub-family, e.g. "Bold". + * @type {string} + */ + get subfamilyName() { + return this.getName('fontSubfamily'); + } + + /** + * The font's copyright information + * @type {string} + */ + get copyright() { + return this.getName('copyright'); + } + + /** + * The font's version number + * @type {string} + */ + get version() { + return this.getName('version'); + } + + /** + * The font’s [ascender](https://en.wikipedia.org/wiki/Ascender_(typography)) + * @type {number} + */ + get ascent() { + return this.hhea.ascent; + } + + /** + * The font’s [descender](https://en.wikipedia.org/wiki/Descender) + * @type {number} + */ + get descent() { + return this.hhea.descent; + } + + /** + * The amount of space that should be included between lines + * @type {number} + */ + get lineGap() { + return this.hhea.lineGap; + } + + /** + * The offset from the normal underline position that should be used + * @type {number} + */ + get underlinePosition() { + return this.post.underlinePosition; + } + + /** + * The weight of the underline that should be used + * @type {number} + */ + get underlineThickness() { + return this.post.underlineThickness; + } + + /** + * If this is an italic font, the angle the cursor should be drawn at to match the font design + * @type {number} + */ + get italicAngle() { + return this.post.italicAngle; + } + + /** + * The height of capital letters above the baseline. + * See [here](https://en.wikipedia.org/wiki/Cap_height) for more details. + * @type {number} + */ + get capHeight() { + let os2 = this['OS/2']; + return os2 ? os2.capHeight : this.ascent; + } + + /** + * The height of lower case letters in the font. + * See [here](https://en.wikipedia.org/wiki/X-height) for more details. + * @type {number} + */ + get xHeight() { + let os2 = this['OS/2']; + return os2 ? os2.xHeight : 0; + } + + /** + * The number of glyphs in the font. + * @type {number} + */ + get numGlyphs() { + return this.maxp.numGlyphs; + } + + /** + * The size of the font’s internal coordinate grid + * @type {number} + */ + get unitsPerEm() { + return this.head.unitsPerEm; + } + + /** + * The font’s bounding box, i.e. the box that encloses all glyphs in the font. + * @type {BBox} + */ + @cache + get bbox() { + return Object.freeze(new BBox(this.head.xMin, this.head.yMin, this.head.xMax, this.head.yMax)); + } + + @cache + get _cmapProcessor() { + return new CmapProcessor(this.cmap); + } + + /** + * An array of all of the unicode code points supported by the font. + * @type {number[]} + */ + @cache + get characterSet() { + return this._cmapProcessor.getCharacterSet(); + } + + /** + * Returns whether there is glyph in the font for the given unicode code point. + * + * @param {number} codePoint + * @return {boolean} + */ + hasGlyphForCodePoint(codePoint) { + return !!this._cmapProcessor.lookup(codePoint); + } + + /** + * Maps a single unicode code point to a Glyph object. + * Does not perform any advanced substitutions (there is no context to do so). + * + * @param {number} codePoint + * @return {Glyph} + */ + glyphForCodePoint(codePoint) { + return this.getGlyph(this._cmapProcessor.lookup(codePoint), [codePoint]); + } + + /** + * Returns an array of Glyph objects for the given string. + * This is only a one-to-one mapping from characters to glyphs. + * For most uses, you should use font.layout (described below), which + * provides a much more advanced mapping supporting AAT and OpenType shaping. + * + * @param {string} string + * @return {Glyph[]} + */ + glyphsForString(string) { + let glyphs = []; + let len = string.length; + let idx = 0; + let last = -1; + let state = -1; + + while (idx <= len) { + let code = 0; + let nextState = 0; + + if (idx < len) { + // Decode the next codepoint from UTF 16 + code = string.charCodeAt(idx++); + if (0xd800 <= code && code <= 0xdbff && idx < len) { + let next = string.charCodeAt(idx); + if (0xdc00 <= next && next <= 0xdfff) { + idx++; + code = ((code & 0x3ff) << 10) + (next & 0x3ff) + 0x10000; + } + } + + // Compute the next state: 1 if the next codepoint is a variation selector, 0 otherwise. + nextState = ((0xfe00 <= code && code <= 0xfe0f) || (0xe0100 <= code && code <= 0xe01ef)) ? 1 : 0; + } else { + idx++; + } + + if (state === 0 && nextState === 1) { + // Variation selector following normal codepoint. + glyphs.push(this.getGlyph(this._cmapProcessor.lookup(last, code), [last, code])); + } else if (state === 0 && nextState === 0) { + // Normal codepoint following normal codepoint. + glyphs.push(this.glyphForCodePoint(last)); + } + + last = code; + state = nextState; + } + + return glyphs; + } + + @cache + get _layoutEngine() { + return new LayoutEngine(this); + } + + /** + * Returns a GlyphRun object, which includes an array of Glyphs and GlyphPositions for the given string. + * + * @param {string} string + * @param {string[]} [userFeatures] + * @param {string} [script] + * @param {string} [language] + * @return {GlyphRun} + */ + layout(string, userFeatures, script, language) { + return this._layoutEngine.layout(string, userFeatures, script, language); + } + + /** + * Returns an array of strings that map to the given glyph id. + * @param {number} gid - glyph id + */ + stringsForGlyph(gid) { + return this._layoutEngine.stringsForGlyph(gid); + } + + /** + * An array of all [OpenType feature tags](https://www.microsoft.com/typography/otspec/featuretags.htm) + * (or mapped AAT tags) supported by the font. + * The features parameter is an array of OpenType feature tags to be applied in addition to the default set. + * If this is an AAT font, the OpenType feature tags are mapped to AAT features. + * + * @type {string[]} + */ + get availableFeatures() { + return this._layoutEngine.getAvailableFeatures(); + } + + _getBaseGlyph(glyph, characters = []) { + if (!this._glyphs[glyph]) { + if (this.directory.tables.glyf) { + this._glyphs[glyph] = new TTFGlyph(glyph, characters, this); + + } else if (this.directory.tables['CFF '] || this.directory.tables.CFF2) { + this._glyphs[glyph] = new CFFGlyph(glyph, characters, this); + } + } + + return this._glyphs[glyph] || null; + } + + /** + * Returns a glyph object for the given glyph id. + * You can pass the array of code points this glyph represents for + * your use later, and it will be stored in the glyph object. + * + * @param {number} glyph + * @param {number[]} characters + * @return {Glyph} + */ + getGlyph(glyph, characters = []) { + if (!this._glyphs[glyph]) { + if (this.directory.tables.sbix) { + this._glyphs[glyph] = new SBIXGlyph(glyph, characters, this); + + } else if ((this.directory.tables.COLR) && (this.directory.tables.CPAL)) { + this._glyphs[glyph] = new COLRGlyph(glyph, characters, this); + + } else { + this._getBaseGlyph(glyph, characters); + } + } + + return this._glyphs[glyph] || null; + } + + /** + * Returns a Subset for this font. + * @return {Subset} + */ + createSubset() { + if (this.directory.tables['CFF ']) { + return new CFFSubset(this); + } + + return new TTFSubset(this); + } + + /** + * Returns an object describing the available variation axes + * that this font supports. Keys are setting tags, and values + * contain the axis name, range, and default value. + * + * @type {object} + */ + @cache + get variationAxes() { + let res = {}; + if (!this.fvar) { + return res; + } + + for (let axis of this.fvar.axis) { + res[axis.axisTag.trim()] = { + name: axis.name.en, + min: axis.minValue, + default: axis.defaultValue, + max: axis.maxValue + }; + } + + return res; + } + + /** + * Returns an object describing the named variation instances + * that the font designer has specified. Keys are variation names + * and values are the variation settings for this instance. + * + * @type {object} + */ + @cache + get namedVariations() { + let res = {}; + if (!this.fvar) { + return res; + } + + for (let instance of this.fvar.instance) { + let settings = {}; + for (let i = 0; i < this.fvar.axis.length; i++) { + let axis = this.fvar.axis[i]; + settings[axis.axisTag.trim()] = instance.coord[i]; + } + + res[instance.name.en] = settings; + } + + return res; + } + + /** + * Returns a new font with the given variation settings applied. + * Settings can either be an instance name, or an object containing + * variation tags as specified by the `variationAxes` property. + * + * @param {object} settings + * @return {TTFFont} + */ + getVariation(settings) { + if (!(this.directory.tables.fvar && ((this.directory.tables.gvar && this.directory.tables.glyf) || this.directory.tables.CFF2))) { + throw new Error('Variations require a font with the fvar, gvar and glyf, or CFF2 tables.'); + } + + if (typeof settings === 'string') { + settings = this.namedVariations[settings]; + } + + if (typeof settings !== 'object') { + throw new Error('Variation settings must be either a variation name or settings object.'); + } + + // normalize the coordinates + let coords = this.fvar.axis.map((axis, i) => { + let axisTag = axis.axisTag.trim(); + if (axisTag in settings) { + return Math.max(axis.minValue, Math.min(axis.maxValue, settings[axisTag])); + } else { + return axis.defaultValue; + } + }); + + let stream = new r.DecodeStream(this.stream.buffer); + stream.pos = this._directoryPos; + + let font = new TTFFont(stream, coords); + font._tables = this._tables; + + return font; + } + + @cache + get _variationProcessor() { + if (!this.fvar) { + return null; + } + + let variationCoords = this.variationCoords; + + // Ignore if no variation coords and not CFF2 + if (!variationCoords && !this.CFF2) { + return null; + } + + if (!variationCoords) { + variationCoords = this.fvar.axis.map(axis => axis.defaultValue); + } + + return new GlyphVariationProcessor(this, variationCoords); + } + + // Standardized format plugin API + getFont(name) { + return this.getVariation(name); + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/TrueTypeCollection.js b/pitfall/pdfkit/node_modules/fontkit/src/TrueTypeCollection.js new file mode 100644 index 00000000..6ee3dad6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/TrueTypeCollection.js @@ -0,0 +1,57 @@ +import r from 'restructure'; +import TTFFont from './TTFFont'; +import Directory from './tables/directory'; +import tables from './tables'; + +let TTCHeader = new r.VersionedStruct(r.uint32, { + 0x00010000: { + numFonts: r.uint32, + offsets: new r.Array(r.uint32, 'numFonts') + }, + 0x00020000: { + numFonts: r.uint32, + offsets: new r.Array(r.uint32, 'numFonts'), + dsigTag: r.uint32, + dsigLength: r.uint32, + dsigOffset: r.uint32 + } +}); + +export default class TrueTypeCollection { + static probe(buffer) { + return buffer.toString('ascii', 0, 4) === 'ttcf'; + } + + constructor(stream) { + this.stream = stream; + if (stream.readString(4) !== 'ttcf') { + throw new Error('Not a TrueType collection'); + } + + this.header = TTCHeader.decode(stream); + } + + getFont(name) { + for (let offset of this.header.offsets) { + let stream = new r.DecodeStream(this.stream.buffer); + stream.pos = offset; + let font = new TTFFont(stream); + if (font.postscriptName === name) { + return font; + } + } + + return null; + } + + get fonts() { + let fonts = []; + for (let offset of this.header.offsets) { + let stream = new r.DecodeStream(this.stream.buffer); + stream.pos = offset; + fonts.push(new TTFFont(stream)); + } + + return fonts; + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/WOFF2Font.js b/pitfall/pdfkit/node_modules/fontkit/src/WOFF2Font.js new file mode 100644 index 00000000..65727208 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/WOFF2Font.js @@ -0,0 +1,213 @@ +import r from 'restructure'; +import brotli from 'brotli/decompress'; +import TTFFont from './TTFFont'; +import TTFGlyph, { Point } from './glyph/TTFGlyph'; +import WOFF2Glyph from './glyph/WOFF2Glyph'; +import WOFF2Directory from './tables/WOFF2Directory'; + +/** + * Subclass of TTFFont that represents a TTF/OTF font compressed by WOFF2 + * See spec here: http://www.w3.org/TR/WOFF2/ + */ +export default class WOFF2Font extends TTFFont { + static probe(buffer) { + return buffer.toString('ascii', 0, 4) === 'wOF2'; + } + + _decodeDirectory() { + this.directory = WOFF2Directory.decode(this.stream); + this._dataPos = this.stream.pos; + } + + _decompress() { + // decompress data and setup table offsets if we haven't already + if (!this._decompressed) { + this.stream.pos = this._dataPos; + let buffer = this.stream.readBuffer(this.directory.totalCompressedSize); + + let decompressedSize = 0; + for (let tag in this.directory.tables) { + let entry = this.directory.tables[tag]; + entry.offset = decompressedSize; + decompressedSize += (entry.transformLength != null) ? entry.transformLength : entry.length; + } + + let decompressed = brotli(buffer, decompressedSize); + if (!decompressed) { + throw new Error('Error decoding compressed data in WOFF2'); + } + + this.stream = new r.DecodeStream(new Buffer(decompressed)); + this._decompressed = true; + } + } + + _decodeTable(table) { + this._decompress(); + return super._decodeTable(table); + } + + // Override this method to get a glyph and return our + // custom subclass if there is a glyf table. + _getBaseGlyph(glyph, characters = []) { + if (!this._glyphs[glyph]) { + if (this.directory.tables.glyf && this.directory.tables.glyf.transformed) { + if (!this._transformedGlyphs) { this._transformGlyfTable(); } + return this._glyphs[glyph] = new WOFF2Glyph(glyph, characters, this); + + } else { + return super._getBaseGlyph(glyph, characters); + } + } + } + + _transformGlyfTable() { + this._decompress(); + this.stream.pos = this.directory.tables.glyf.offset; + let table = GlyfTable.decode(this.stream); + let glyphs = []; + + for (let index = 0; index < table.numGlyphs; index++) { + let glyph = {}; + let nContours = table.nContours.readInt16BE(); + glyph.numberOfContours = nContours; + + if (nContours > 0) { // simple glyph + let nPoints = []; + let totalPoints = 0; + + for (let i = 0; i < nContours; i++) { + let r = read255UInt16(table.nPoints); + nPoints.push(r); + totalPoints += r; + } + + glyph.points = decodeTriplet(table.flags, table.glyphs, totalPoints); + for (let i = 0; i < nContours; i++) { + glyph.points[nPoints[i] - 1].endContour = true; + } + + var instructionSize = read255UInt16(table.glyphs); + + } else if (nContours < 0) { // composite glyph + let haveInstructions = TTFGlyph.prototype._decodeComposite.call({ _font: this }, glyph, table.composites); + if (haveInstructions) { + var instructionSize = read255UInt16(table.glyphs); + } + } + + glyphs.push(glyph); + } + + this._transformedGlyphs = glyphs; + } +} + +// Special class that accepts a length and returns a sub-stream for that data +class Substream { + constructor(length) { + this.length = length; + this._buf = new r.Buffer(length); + } + + decode(stream, parent) { + return new r.DecodeStream(this._buf.decode(stream, parent)); + } +} + +// This struct represents the entire glyf table +let GlyfTable = new r.Struct({ + version: r.uint32, + numGlyphs: r.uint16, + indexFormat: r.uint16, + nContourStreamSize: r.uint32, + nPointsStreamSize: r.uint32, + flagStreamSize: r.uint32, + glyphStreamSize: r.uint32, + compositeStreamSize: r.uint32, + bboxStreamSize: r.uint32, + instructionStreamSize: r.uint32, + nContours: new Substream('nContourStreamSize'), + nPoints: new Substream('nPointsStreamSize'), + flags: new Substream('flagStreamSize'), + glyphs: new Substream('glyphStreamSize'), + composites: new Substream('compositeStreamSize'), + bboxes: new Substream('bboxStreamSize'), + instructions: new Substream('instructionStreamSize') +}); + +const WORD_CODE = 253; +const ONE_MORE_BYTE_CODE2 = 254; +const ONE_MORE_BYTE_CODE1 = 255; +const LOWEST_U_CODE = 253; + +function read255UInt16(stream) { + let code = stream.readUInt8(); + + if (code === WORD_CODE) { + return stream.readUInt16BE(); + } + + if (code === ONE_MORE_BYTE_CODE1) { + return stream.readUInt8() + LOWEST_U_CODE; + } + + if (code === ONE_MORE_BYTE_CODE2) { + return stream.readUInt8() + LOWEST_U_CODE * 2; + } + + return code; +} + +function withSign(flag, baseval) { + return flag & 1 ? baseval : -baseval; +} + +function decodeTriplet(flags, glyphs, nPoints) { + let y; + let x = y = 0; + let res = []; + + for (let i = 0; i < nPoints; i++) { + let dx = 0, dy = 0; + let flag = flags.readUInt8(); + let onCurve = !(flag >> 7); + flag &= 0x7f; + + if (flag < 10) { + dx = 0; + dy = withSign(flag, ((flag & 14) << 7) + glyphs.readUInt8()); + + } else if (flag < 20) { + dx = withSign(flag, (((flag - 10) & 14) << 7) + glyphs.readUInt8()); + dy = 0; + + } else if (flag < 84) { + var b0 = flag - 20; + var b1 = glyphs.readUInt8(); + dx = withSign(flag, 1 + (b0 & 0x30) + (b1 >> 4)); + dy = withSign(flag >> 1, 1 + ((b0 & 0x0c) << 2) + (b1 & 0x0f)); + + } else if (flag < 120) { + var b0 = flag - 84; + dx = withSign(flag, 1 + ((b0 / 12) << 8) + glyphs.readUInt8()); + dy = withSign(flag >> 1, 1 + (((b0 % 12) >> 2) << 8) + glyphs.readUInt8()); + + } else if (flag < 124) { + var b1 = glyphs.readUInt8(); + let b2 = glyphs.readUInt8(); + dx = withSign(flag, (b1 << 4) + (b2 >> 4)); + dy = withSign(flag >> 1, ((b2 & 0x0f) << 8) + glyphs.readUInt8()); + + } else { + dx = withSign(flag, glyphs.readUInt16BE()); + dy = withSign(flag >> 1, glyphs.readUInt16BE()); + } + + x += dx; + y += dy; + res.push(new Point(onCurve, false, x, y)); + } + + return res; +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/WOFFFont.js b/pitfall/pdfkit/node_modules/fontkit/src/WOFFFont.js new file mode 100644 index 00000000..d59492e9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/WOFFFont.js @@ -0,0 +1,33 @@ +import TTFFont from './TTFFont'; +import WOFFDirectory from './tables/WOFFDirectory'; +import tables from './tables'; +import inflate from 'tiny-inflate'; +import r from 'restructure'; + +export default class WOFFFont extends TTFFont { + static probe(buffer) { + return buffer.toString('ascii', 0, 4) === 'wOFF'; + } + + _decodeDirectory() { + this.directory = WOFFDirectory.decode(this.stream, { _startOffset: 0 }); + } + + _getTableStream(tag) { + let table = this.directory.tables[tag]; + if (table) { + this.stream.pos = table.offset; + + if (table.compLength < table.length) { + this.stream.pos += 2; // skip deflate header + let outBuffer = new Buffer(table.length); + let buf = inflate(this.stream.readBuffer(table.compLength - 2), outBuffer); + return new r.DecodeStream(buf); + } else { + return this.stream; + } + } + + return null; + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/aat/AATFeatureMap.js b/pitfall/pdfkit/node_modules/fontkit/src/aat/AATFeatureMap.js new file mode 100644 index 00000000..91270c34 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/aat/AATFeatureMap.js @@ -0,0 +1,543 @@ +// see https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html +// and /System/Library/Frameworks/CoreText.framework/Versions/A/Headers/SFNTLayoutTypes.h on a Mac +const features = { + allTypographicFeatures: { + code: 0, + exclusive: false, + allTypeFeatures: 0 + }, + ligatures: { + code: 1, + exclusive: false, + requiredLigatures: 0, + commonLigatures: 2, + rareLigatures: 4, + // logos: 6 + rebusPictures: 8, + diphthongLigatures: 10, + squaredLigatures: 12, + abbrevSquaredLigatures: 14, + symbolLigatures: 16, + contextualLigatures: 18, + historicalLigatures: 20 + }, + cursiveConnection: { + code: 2, + exclusive: true, + unconnected: 0, + partiallyConnected: 1, + cursive: 2 + }, + letterCase: { + code: 3, + exclusive: true + }, + // upperAndLowerCase: 0 # deprecated + // allCaps: 1 # deprecated + // allLowerCase: 2 # deprecated + // smallCaps: 3 # deprecated + // initialCaps: 4 # deprecated + // initialCapsAndSmallCaps: 5 # deprecated + verticalSubstitution: { + code: 4, + exclusive: false, + substituteVerticalForms: 0 + }, + linguisticRearrangement: { + code: 5, + exclusive: false, + linguisticRearrangement: 0 + }, + numberSpacing: { + code: 6, + exclusive: true, + monospacedNumbers: 0, + proportionalNumbers: 1, + thirdWidthNumbers: 2, + quarterWidthNumbers: 3 + }, + smartSwash: { + code: 8, + exclusive: false, + wordInitialSwashes: 0, + wordFinalSwashes: 2, + // lineInitialSwashes: 4 + // lineFinalSwashes: 6 + nonFinalSwashes: 8 + }, + diacritics: { + code: 9, + exclusive: true, + showDiacritics: 0, + hideDiacritics: 1, + decomposeDiacritics: 2 + }, + verticalPosition: { + code: 10, + exclusive: true, + normalPosition: 0, + superiors: 1, + inferiors: 2, + ordinals: 3, + scientificInferiors: 4 + }, + fractions: { + code: 11, + exclusive: true, + noFractions: 0, + verticalFractions: 1, + diagonalFractions: 2 + }, + overlappingCharacters: { + code: 13, + exclusive: false, + preventOverlap: 0 + }, + typographicExtras: { + code: 14, + exclusive: false, + // hyphensToEmDash: 0 + // hyphenToEnDash: 2 + slashedZero: 4 + }, + // formInterrobang: 6 + // smartQuotes: 8 + // periodsToEllipsis: 10 + mathematicalExtras: { + code: 15, + exclusive: false, + // hyphenToMinus: 0 + // asteristoMultiply: 2 + // slashToDivide: 4 + // inequalityLigatures: 6 + // exponents: 8 + mathematicalGreek: 10 + }, + ornamentSets: { + code: 16, + exclusive: true, + noOrnaments: 0, + dingbats: 1, + piCharacters: 2, + fleurons: 3, + decorativeBorders: 4, + internationalSymbols: 5, + mathSymbols: 6 + }, + characterAlternatives: { + code: 17, + exclusive: true, + noAlternates: 0 + }, + // user defined options + designComplexity: { + code: 18, + exclusive: true, + designLevel1: 0, + designLevel2: 1, + designLevel3: 2, + designLevel4: 3, + designLevel5: 4 + }, + styleOptions: { + code: 19, + exclusive: true, + noStyleOptions: 0, + displayText: 1, + engravedText: 2, + illuminatedCaps: 3, + titlingCaps: 4, + tallCaps: 5 + }, + characterShape: { + code: 20, + exclusive: true, + traditionalCharacters: 0, + simplifiedCharacters: 1, + JIS1978Characters: 2, + JIS1983Characters: 3, + JIS1990Characters: 4, + traditionalAltOne: 5, + traditionalAltTwo: 6, + traditionalAltThree: 7, + traditionalAltFour: 8, + traditionalAltFive: 9, + expertCharacters: 10, + JIS2004Characters: 11, + hojoCharacters: 12, + NLCCharacters: 13, + traditionalNamesCharacters: 14 + }, + numberCase: { + code: 21, + exclusive: true, + lowerCaseNumbers: 0, + upperCaseNumbers: 1 + }, + textSpacing: { + code: 22, + exclusive: true, + proportionalText: 0, + monospacedText: 1, + halfWidthText: 2, + thirdWidthText: 3, + quarterWidthText: 4, + altProportionalText: 5, + altHalfWidthText: 6 + }, + transliteration: { + code: 23, + exclusive: true, + noTransliteration: 0 + }, + // hanjaToHangul: 1 + // hiraganaToKatakana: 2 + // katakanaToHiragana: 3 + // kanaToRomanization: 4 + // romanizationToHiragana: 5 + // romanizationToKatakana: 6 + // hanjaToHangulAltOne: 7 + // hanjaToHangulAltTwo: 8 + // hanjaToHangulAltThree: 9 + annotation: { + code: 24, + exclusive: true, + noAnnotation: 0, + boxAnnotation: 1, + roundedBoxAnnotation: 2, + circleAnnotation: 3, + invertedCircleAnnotation: 4, + parenthesisAnnotation: 5, + periodAnnotation: 6, + romanNumeralAnnotation: 7, + diamondAnnotation: 8, + invertedBoxAnnotation: 9, + invertedRoundedBoxAnnotation: 10 + }, + kanaSpacing: { + code: 25, + exclusive: true, + fullWidthKana: 0, + proportionalKana: 1 + }, + ideographicSpacing: { + code: 26, + exclusive: true, + fullWidthIdeographs: 0, + proportionalIdeographs: 1, + halfWidthIdeographs: 2 + }, + unicodeDecomposition: { + code: 27, + exclusive: false, + canonicalComposition: 0, + compatibilityComposition: 2, + transcodingComposition: 4 + }, + rubyKana: { + code: 28, + exclusive: false, + // noRubyKana: 0 # deprecated - use rubyKanaOff instead + // rubyKana: 1 # deprecated - use rubyKanaOn instead + rubyKana: 2 + }, + CJKSymbolAlternatives: { + code: 29, + exclusive: true, + noCJKSymbolAlternatives: 0, + CJKSymbolAltOne: 1, + CJKSymbolAltTwo: 2, + CJKSymbolAltThree: 3, + CJKSymbolAltFour: 4, + CJKSymbolAltFive: 5 + }, + ideographicAlternatives: { + code: 30, + exclusive: true, + noIdeographicAlternatives: 0, + ideographicAltOne: 1, + ideographicAltTwo: 2, + ideographicAltThree: 3, + ideographicAltFour: 4, + ideographicAltFive: 5 + }, + CJKVerticalRomanPlacement: { + code: 31, + exclusive: true, + CJKVerticalRomanCentered: 0, + CJKVerticalRomanHBaseline: 1 + }, + italicCJKRoman: { + code: 32, + exclusive: false, + // noCJKItalicRoman: 0 # deprecated - use CJKItalicRomanOff instead + // CJKItalicRoman: 1 # deprecated - use CJKItalicRomanOn instead + CJKItalicRoman: 2 + }, + caseSensitiveLayout: { + code: 33, + exclusive: false, + caseSensitiveLayout: 0, + caseSensitiveSpacing: 2 + }, + alternateKana: { + code: 34, + exclusive: false, + alternateHorizKana: 0, + alternateVertKana: 2 + }, + stylisticAlternatives: { + code: 35, + exclusive: false, + noStylisticAlternates: 0, + stylisticAltOne: 2, + stylisticAltTwo: 4, + stylisticAltThree: 6, + stylisticAltFour: 8, + stylisticAltFive: 10, + stylisticAltSix: 12, + stylisticAltSeven: 14, + stylisticAltEight: 16, + stylisticAltNine: 18, + stylisticAltTen: 20, + stylisticAltEleven: 22, + stylisticAltTwelve: 24, + stylisticAltThirteen: 26, + stylisticAltFourteen: 28, + stylisticAltFifteen: 30, + stylisticAltSixteen: 32, + stylisticAltSeventeen: 34, + stylisticAltEighteen: 36, + stylisticAltNineteen: 38, + stylisticAltTwenty: 40 + }, + contextualAlternates: { + code: 36, + exclusive: false, + contextualAlternates: 0, + swashAlternates: 2, + contextualSwashAlternates: 4 + }, + lowerCase: { + code: 37, + exclusive: true, + defaultLowerCase: 0, + lowerCaseSmallCaps: 1, + lowerCasePetiteCaps: 2 + }, + upperCase: { + code: 38, + exclusive: true, + defaultUpperCase: 0, + upperCaseSmallCaps: 1, + upperCasePetiteCaps: 2 + }, + languageTag: { // indices into ltag table + code: 39, + exclusive: true + }, + CJKRomanSpacing: { + code: 103, + exclusive: true, + halfWidthCJKRoman: 0, + proportionalCJKRoman: 1, + defaultCJKRoman: 2, + fullWidthCJKRoman: 3 + } +}; + +const feature = (name, selector) => [features[name].code, features[name][selector]]; + +const OTMapping = { + rlig: feature('ligatures', 'requiredLigatures'), + clig: feature('ligatures', 'contextualLigatures'), + dlig: feature('ligatures', 'rareLigatures'), + hlig: feature('ligatures', 'historicalLigatures'), + liga: feature('ligatures', 'commonLigatures'), + hist: feature('ligatures', 'historicalLigatures'), // ?? + + smcp: feature('lowerCase', 'lowerCaseSmallCaps'), + pcap: feature('lowerCase', 'lowerCasePetiteCaps'), + + frac: feature('fractions', 'diagonalFractions'), + dnom: feature('fractions', 'diagonalFractions'), // ?? + numr: feature('fractions', 'diagonalFractions'), // ?? + afrc: feature('fractions', 'verticalFractions'), + // aalt + // abvf, abvm, abvs, akhn, blwf, blwm, blws, cfar, cjct, cpsp, falt, isol, jalt, ljmo, mset? + // ltra, ltrm, nukt, pref, pres, pstf, psts, rand, rkrf, rphf, rtla, rtlm, size, tjmo, tnum? + // unic, vatu, vhal, vjmo, vpal, vrt2 + // dist -> trak table? + // kern, vkrn -> kern table + // lfbd + opbd + rtbd -> opbd table? + // mark, mkmk -> acnt table? + // locl -> languageTag + ltag table + + case: feature('caseSensitiveLayout', 'caseSensitiveLayout'), // also caseSensitiveSpacing + ccmp: feature('unicodeDecomposition', 'canonicalComposition'), // compatibilityComposition? + cpct: feature('CJKVerticalRomanPlacement', 'CJKVerticalRomanCentered'), // guess..., probably not given below + valt: feature('CJKVerticalRomanPlacement', 'CJKVerticalRomanCentered'), + swsh: feature('contextualAlternates', 'swashAlternates'), + cswh: feature('contextualAlternates', 'contextualSwashAlternates'), + curs: feature('cursiveConnection', 'cursive'), // ?? + c2pc: feature('upperCase', 'upperCasePetiteCaps'), + c2sc: feature('upperCase', 'upperCaseSmallCaps'), + + init: feature('smartSwash', 'wordInitialSwashes'), // ?? + fin2: feature('smartSwash', 'wordFinalSwashes'), // ?? + medi: feature('smartSwash', 'nonFinalSwashes'), // ?? + med2: feature('smartSwash', 'nonFinalSwashes'), // ?? + fin3: feature('smartSwash', 'wordFinalSwashes'), // ?? + fina: feature('smartSwash', 'wordFinalSwashes'), // ?? + + pkna: feature('kanaSpacing', 'proportionalKana'), + half: feature('textSpacing', 'halfWidthText'), // also HalfWidthCJKRoman, HalfWidthIdeographs? + halt: feature('textSpacing', 'altHalfWidthText'), + + hkna: feature('alternateKana', 'alternateHorizKana'), + vkna: feature('alternateKana', 'alternateVertKana'), + // hngl: feature 'transliteration', 'hanjaToHangulSelector' # deprecated + + ital: feature('italicCJKRoman', 'CJKItalicRoman'), + lnum: feature('numberCase', 'upperCaseNumbers'), + onum: feature('numberCase', 'lowerCaseNumbers'), + mgrk: feature('mathematicalExtras', 'mathematicalGreek'), + + // nalt: not enough info. what type of annotation? + // ornm: ditto, which ornament style? + + calt: feature('contextualAlternates', 'contextualAlternates'), // or more? + vrt2: feature('verticalSubstitution', 'substituteVerticalForms'), // oh... below? + vert: feature('verticalSubstitution', 'substituteVerticalForms'), + tnum: feature('numberSpacing', 'monospacedNumbers'), + pnum: feature('numberSpacing', 'proportionalNumbers'), + sups: feature('verticalPosition', 'superiors'), + subs: feature('verticalPosition', 'inferiors'), + ordn: feature('verticalPosition', 'ordinals'), + pwid: feature('textSpacing', 'proportionalText'), + hwid: feature('textSpacing', 'halfWidthText'), + qwid: feature('textSpacing', 'quarterWidthText'), // also QuarterWidthNumbers? + twid: feature('textSpacing', 'thirdWidthText'), // also ThirdWidthNumbers? + fwid: feature('textSpacing', 'proportionalText'), //?? + palt: feature('textSpacing', 'altProportionalText'), + trad: feature('characterShape', 'traditionalCharacters'), + smpl: feature('characterShape', 'simplifiedCharacters'), + jp78: feature('characterShape', 'JIS1978Characters'), + jp83: feature('characterShape', 'JIS1983Characters'), + jp90: feature('characterShape', 'JIS1990Characters'), + jp04: feature('characterShape', 'JIS2004Characters'), + expt: feature('characterShape', 'expertCharacters'), + hojo: feature('characterShape', 'hojoCharacters'), + nlck: feature('characterShape', 'NLCCharacters'), + tnam: feature('characterShape', 'traditionalNamesCharacters'), + ruby: feature('rubyKana', 'rubyKana'), + titl: feature('styleOptions', 'titlingCaps'), + zero: feature('typographicExtras', 'slashedZero'), + + ss01: feature('stylisticAlternatives', 'stylisticAltOne'), + ss02: feature('stylisticAlternatives', 'stylisticAltTwo'), + ss03: feature('stylisticAlternatives', 'stylisticAltThree'), + ss04: feature('stylisticAlternatives', 'stylisticAltFour'), + ss05: feature('stylisticAlternatives', 'stylisticAltFive'), + ss06: feature('stylisticAlternatives', 'stylisticAltSix'), + ss07: feature('stylisticAlternatives', 'stylisticAltSeven'), + ss08: feature('stylisticAlternatives', 'stylisticAltEight'), + ss09: feature('stylisticAlternatives', 'stylisticAltNine'), + ss10: feature('stylisticAlternatives', 'stylisticAltTen'), + ss11: feature('stylisticAlternatives', 'stylisticAltEleven'), + ss12: feature('stylisticAlternatives', 'stylisticAltTwelve'), + ss13: feature('stylisticAlternatives', 'stylisticAltThirteen'), + ss14: feature('stylisticAlternatives', 'stylisticAltFourteen'), + ss15: feature('stylisticAlternatives', 'stylisticAltFifteen'), + ss16: feature('stylisticAlternatives', 'stylisticAltSixteen'), + ss17: feature('stylisticAlternatives', 'stylisticAltSeventeen'), + ss18: feature('stylisticAlternatives', 'stylisticAltEighteen'), + ss19: feature('stylisticAlternatives', 'stylisticAltNineteen'), + ss20: feature('stylisticAlternatives', 'stylisticAltTwenty') +}; + + // salt: feature 'stylisticAlternatives', 'stylisticAltOne' # hmm, which one to choose + +// Add cv01-cv99 features +for (let i = 1; i <= 99; i++) { + OTMapping[`cv${`00${i}`.slice(-2)}`] = [features.characterAlternatives.code, i]; +} + +// create inverse mapping +let AATMapping = {}; +for (let ot in OTMapping) { + let aat = OTMapping[ot]; + if (AATMapping[aat[0]] == null) { + AATMapping[aat[0]] = {}; + } + + AATMapping[aat[0]][aat[1]] = ot; +} + +// Maps an array of OpenType features to AAT features +// in the form of {featureType:{featureSetting:true}} +export function mapOTToAAT(features) { + let res = {}; + for (let k = 0; k < features.length; k++) { + let r; + if (r = OTMapping[features[k]]) { + if (res[r[0]] == null) { + res[r[0]] = {}; + } + + res[r[0]][r[1]] = true; + } + } + + return res; +} + +// Maps strings in a [featureType, featureSetting] +// to their equivalent number codes +function mapFeatureStrings(f) { + let [type, setting] = f; + if (isNaN(type)) { + var typeCode = features[type] && features[type].code; + } else { + var typeCode = type; + } + + if (isNaN(setting)) { + var settingCode = features[type] && features[type][setting]; + } else { + var settingCode = setting; + } + + return [typeCode, settingCode]; +} + +// Maps AAT features to an array of OpenType features +// Supports both arrays in the form of [[featureType, featureSetting]] +// and objects in the form of {featureType:{featureSetting:true}} +// featureTypes and featureSettings can be either strings or number codes +export function mapAATToOT(features) { + let res = {}; + if (Array.isArray(features)) { + for (let k = 0; k < features.length; k++) { + let r; + let f = mapFeatureStrings(features[k]); + if (r = AATMapping[f[0]] && AATMapping[f[0]][f[1]]) { + res[r] = true; + } + } + + } else if (typeof features === 'object') { + for (let type in features) { + let feature = features[type]; + for (let setting in feature) { + let r; + let f = mapFeatureStrings([type, setting]); + if (feature[setting] && (r = AATMapping[f[0]] && AATMapping[f[0]][f[1]])) { + res[r] = true; + } + } + } + } + + return Object.keys(res); +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/aat/AATLayoutEngine.js b/pitfall/pdfkit/node_modules/fontkit/src/aat/AATLayoutEngine.js new file mode 100644 index 00000000..400238b1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/aat/AATLayoutEngine.js @@ -0,0 +1,50 @@ +import * as AATFeatureMap from './AATFeatureMap'; +import * as Script from '../layout/Script'; +import AATMorxProcessor from './AATMorxProcessor'; + +export default class AATLayoutEngine { + constructor(font) { + this.font = font; + this.morxProcessor = new AATMorxProcessor(font); + } + + substitute(glyphs, features, script, language) { + // AAT expects the glyphs to be in visual order prior to morx processing, + // so reverse the glyphs if the script is right-to-left. + let isRTL = Script.direction(script) === 'rtl'; + if (isRTL) { + glyphs.reverse(); + } + + this.morxProcessor.process(glyphs, AATFeatureMap.mapOTToAAT(features)); + return glyphs; + } + + getAvailableFeatures(script, language) { + return AATFeatureMap.mapAATToOT(this.morxProcessor.getSupportedFeatures()); + } + + stringsForGlyph(gid) { + let glyphStrings = this.morxProcessor.generateInputs(gid); + let result = new Set; + + for (let glyphs of glyphStrings) { + this._addStrings(glyphs, 0, result, ''); + } + + return result; + } + + _addStrings(glyphs, index, strings, string) { + let codePoints = this.font._cmapProcessor.codePointsForGlyph(glyphs[index]); + + for (let codePoint of codePoints) { + let s = string + String.fromCodePoint(codePoint); + if (index < glyphs.length - 1) { + this._addStrings(glyphs, index + 1, strings, s); + } else { + strings.add(s); + } + } + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/aat/AATLookupTable.js b/pitfall/pdfkit/node_modules/fontkit/src/aat/AATLookupTable.js new file mode 100644 index 00000000..74f764c7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/aat/AATLookupTable.js @@ -0,0 +1,125 @@ +import {cache} from '../decorators'; +import {range} from '../utils'; + +export default class AATLookupTable { + constructor(table) { + this.table = table; + } + + lookup(glyph) { + switch (this.table.version) { + case 0: // simple array format + return this.table.values.getItem(glyph); + + case 2: // segment format + case 4: { + let min = 0; + let max = this.table.binarySearchHeader.nUnits - 1; + + while (min <= max) { + var mid = (min + max) >> 1; + var seg = this.table.segments[mid]; + + // special end of search value + if (seg.firstGlyph === 0xffff) { + return null; + } + + if (glyph < seg.firstGlyph) { + max = mid - 1; + } else if (glyph > seg.lastGlyph) { + min = mid + 1; + } else { + if (this.table.version === 2) { + return seg.value; + } else { + return seg.values[glyph - seg.firstGlyph]; + } + } + } + + return null; + } + + case 6: { // lookup single + let min = 0; + let max = this.table.binarySearchHeader.nUnits - 1; + + while (min <= max) { + var mid = (min + max) >> 1; + var seg = this.table.segments[mid]; + + // special end of search value + if (seg.glyph === 0xffff) { + return null; + } + + if (glyph < seg.glyph) { + max = mid - 1; + } else if (glyph > seg.glyph) { + min = mid + 1; + } else { + return seg.value; + } + } + + return null; + } + + case 8: // lookup trimmed + return this.table.values[glyph - this.table.firstGlyph]; + + default: + throw new Error(`Unknown lookup table format: ${this.table.version}`); + } + } + + @cache + glyphsForValue(classValue) { + let res = []; + + switch (this.table.version) { + case 2: // segment format + case 4: { + for (let segment of this.table.segments) { + if ((this.table.version === 2 && segment.value === classValue)) { + res.push(...range(segment.firstGlyph, segment.lastGlyph + 1)); + } else { + for (let index = 0; index < segment.values.length; index++) { + if (segment.values[index] === classValue) { + res.push(segment.firstGlyph + index); + } + } + } + } + + break; + } + + case 6: { // lookup single + for (let segment of this.table.segments) { + if (segment.value === classValue) { + res.push(segment.glyph); + } + } + + break; + } + + case 8: { // lookup trimmed + for (let i = 0; i < this.table.values.length; i++) { + if (this.table.values[i] === classValue) { + res.push(this.table.firstGlyph + i); + } + } + + break; + } + + default: + throw new Error(`Unknown lookup table format: ${this.table.version}`); + } + + return res; + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/aat/AATMorxProcessor.js b/pitfall/pdfkit/node_modules/fontkit/src/aat/AATMorxProcessor.js new file mode 100644 index 00000000..2fb3d258 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/aat/AATMorxProcessor.js @@ -0,0 +1,425 @@ +import AATStateMachine from './AATStateMachine'; +import AATLookupTable from './AATLookupTable'; +import {cache} from '../decorators'; + +// indic replacement flags +const MARK_FIRST = 0x8000; +const MARK_LAST = 0x2000; +const VERB = 0x000F; + +// contextual substitution and glyph insertion flag +const SET_MARK = 0x8000; + +// ligature entry flags +const SET_COMPONENT = 0x8000; +const PERFORM_ACTION = 0x2000; + +// ligature action masks +const LAST_MASK = 0x80000000; +const STORE_MASK = 0x40000000; +const OFFSET_MASK = 0x3FFFFFFF; + +const VERTICAL_ONLY = 0x800000; +const REVERSE_DIRECTION = 0x400000; +const HORIZONTAL_AND_VERTICAL = 0x200000; + +// glyph insertion flags +const CURRENT_IS_KASHIDA_LIKE = 0x2000; +const MARKED_IS_KASHIDA_LIKE = 0x1000; +const CURRENT_INSERT_BEFORE = 0x0800; +const MARKED_INSERT_BEFORE = 0x0400; +const CURRENT_INSERT_COUNT = 0x03E0; +const MARKED_INSERT_COUNT = 0x001F; + +export default class AATMorxProcessor { + constructor(font) { + this.processIndicRearragement = this.processIndicRearragement.bind(this); + this.processContextualSubstitution = this.processContextualSubstitution.bind(this); + this.processLigature = this.processLigature.bind(this); + this.processNoncontextualSubstitutions = this.processNoncontextualSubstitutions.bind(this); + this.processGlyphInsertion = this.processGlyphInsertion.bind(this); + this.font = font; + this.morx = font.morx; + this.inputCache = null; + } + + // Processes an array of glyphs and applies the specified features + // Features should be in the form of {featureType:{featureSetting:true}} + process(glyphs, features = {}) { + for (let chain of this.morx.chains) { + let flags = chain.defaultFlags; + + // enable/disable the requested features + for (let feature of chain.features) { + let f; + if ((f = features[feature.featureType]) && f[feature.featureSetting]) { + flags &= feature.disableFlags; + flags |= feature.enableFlags; + } + } + + for (let subtable of chain.subtables) { + if (subtable.subFeatureFlags & flags) { + this.processSubtable(subtable, glyphs); + } + } + } + + // remove deleted glyphs + let index = glyphs.length - 1; + while (index >= 0) { + if (glyphs[index].id === 0xffff) { + glyphs.splice(index, 1); + } + + index--; + } + + return glyphs; + } + + processSubtable(subtable, glyphs) { + this.subtable = subtable; + this.glyphs = glyphs; + if (this.subtable.type === 4) { + this.processNoncontextualSubstitutions(this.subtable, this.glyphs); + return; + } + + this.ligatureStack = []; + this.markedGlyph = null; + this.firstGlyph = null; + this.lastGlyph = null; + this.markedIndex = null; + + let stateMachine = this.getStateMachine(subtable); + let process = this.getProcessor(); + + let reverse = !!(this.subtable.coverage & REVERSE_DIRECTION); + return stateMachine.process(this.glyphs, reverse, process); + } + + @cache + getStateMachine(subtable) { + return new AATStateMachine(subtable.table.stateTable); + } + + getProcessor() { + switch (this.subtable.type) { + case 0: + return this.processIndicRearragement; + case 1: + return this.processContextualSubstitution; + case 2: + return this.processLigature; + case 4: + return this.processNoncontextualSubstitutions; + case 5: + return this.processGlyphInsertion; + default: + throw new Error(`Invalid morx subtable type: ${this.subtable.type}`); + } + } + + processIndicRearragement(glyph, entry, index) { + if (entry.flags & MARK_FIRST) { + this.firstGlyph = index; + } + + if (entry.flags & MARK_LAST) { + this.lastGlyph = index; + } + + reorderGlyphs(this.glyphs, entry.flags & VERB, this.firstGlyph, this.lastGlyph); + } + + processContextualSubstitution(glyph, entry, index) { + let subsitutions = this.subtable.table.substitutionTable.items; + if (entry.markIndex !== 0xffff) { + let lookup = subsitutions.getItem(entry.markIndex); + let lookupTable = new AATLookupTable(lookup); + glyph = this.glyphs[this.markedGlyph]; + var gid = lookupTable.lookup(glyph.id); + if (gid) { + this.glyphs[this.markedGlyph] = this.font.getGlyph(gid, glyph.codePoints); + } + } + + if (entry.currentIndex !== 0xffff) { + let lookup = subsitutions.getItem(entry.currentIndex); + let lookupTable = new AATLookupTable(lookup); + glyph = this.glyphs[index]; + var gid = lookupTable.lookup(glyph.id); + if (gid) { + this.glyphs[index] = this.font.getGlyph(gid, glyph.codePoints); + } + } + + if (entry.flags & SET_MARK) { + this.markedGlyph = index; + } + } + + processLigature(glyph, entry, index) { + if (entry.flags & SET_COMPONENT) { + this.ligatureStack.push(index); + } + + if (entry.flags & PERFORM_ACTION) { + let actions = this.subtable.table.ligatureActions; + let components = this.subtable.table.components; + let ligatureList = this.subtable.table.ligatureList; + + let actionIndex = entry.action; + let last = false; + let ligatureIndex = 0; + let codePoints = []; + let ligatureGlyphs = []; + + while (!last) { + let componentGlyph = this.ligatureStack.pop(); + codePoints.unshift(...this.glyphs[componentGlyph].codePoints); + + let action = actions.getItem(actionIndex++); + last = !!(action & LAST_MASK); + let store = !!(action & STORE_MASK); + let offset = (action & OFFSET_MASK) << 2 >> 2; // sign extend 30 to 32 bits + offset += this.glyphs[componentGlyph].id; + + let component = components.getItem(offset); + ligatureIndex += component; + + if (last || store) { + let ligatureEntry = ligatureList.getItem(ligatureIndex); + this.glyphs[componentGlyph] = this.font.getGlyph(ligatureEntry, codePoints); + ligatureGlyphs.push(componentGlyph); + ligatureIndex = 0; + codePoints = []; + } else { + this.glyphs[componentGlyph] = this.font.getGlyph(0xffff); + } + } + + // Put ligature glyph indexes back on the stack + this.ligatureStack.push(...ligatureGlyphs); + } + } + + processNoncontextualSubstitutions(subtable, glyphs, index) { + let lookupTable = new AATLookupTable(subtable.table.lookupTable); + + for (index = 0; index < glyphs.length; index++) { + let glyph = glyphs[index]; + if (glyph.id !== 0xffff) { + let gid = lookupTable.lookup(glyph.id); + if (gid) { // 0 means do nothing + glyphs[index] = this.font.getGlyph(gid, glyph.codePoints); + } + } + } + } + + _insertGlyphs(glyphIndex, insertionActionIndex, count, isBefore) { + let insertions = []; + while (count--) { + let gid = this.subtable.table.insertionActions.getItem(insertionActionIndex++); + insertions.push(this.font.getGlyph(gid)); + } + + if (!isBefore) { + glyphIndex++; + } + + this.glyphs.splice(glyphIndex, 0, ...insertions); + } + + processGlyphInsertion(glyph, entry, index) { + if (entry.flags & SET_MARK) { + this.markedIndex = index; + } + + if (entry.markedInsertIndex !== 0xffff) { + let count = (entry.flags & MARKED_INSERT_COUNT) >>> 5; + let isBefore = !!(entry.flags & MARKED_INSERT_BEFORE); + this._insertGlyphs(this.markedIndex, entry.markedInsertIndex, count, isBefore); + } + + if (entry.currentInsertIndex !== 0xffff) { + let count = (entry.flags & CURRENT_INSERT_COUNT) >>> 5; + let isBefore = !!(entry.flags & CURRENT_INSERT_BEFORE); + this._insertGlyphs(index, entry.currentInsertIndex, count, isBefore); + } + } + + getSupportedFeatures() { + let features = []; + for (let chain of this.morx.chains) { + for (let feature of chain.features) { + features.push([feature.featureType, feature.featureSetting]); + } + } + + return features; + } + + generateInputs(gid) { + if (!this.inputCache) { + this.generateInputCache(); + } + + return this.inputCache[gid] || []; + } + + generateInputCache() { + this.inputCache = {}; + + for (let chain of this.morx.chains) { + let flags = chain.defaultFlags; + + for (let subtable of chain.subtables) { + if (subtable.subFeatureFlags & flags) { + this.generateInputsForSubtable(subtable); + } + } + } + } + + generateInputsForSubtable(subtable) { + // Currently, only supporting ligature subtables. + if (subtable.type !== 2) { + return; + } + + let reverse = !!(subtable.coverage & REVERSE_DIRECTION); + if (reverse) { + throw new Error('Reverse subtable, not supported.'); + } + + this.subtable = subtable; + this.ligatureStack = []; + + let stateMachine = this.getStateMachine(subtable); + let process = this.getProcessor(); + + let input = []; + let stack = []; + this.glyphs = []; + + stateMachine.traverse({ + enter: (glyph, entry) => { + let glyphs = this.glyphs; + stack.push({ + glyphs: glyphs.slice(), + ligatureStack: this.ligatureStack.slice() + }); + + // Add glyph to input and glyphs to process. + let g = this.font.getGlyph(glyph); + input.push(g); + glyphs.push(input[input.length - 1]); + + // Process ligature substitution + process(glyphs[glyphs.length - 1], entry, glyphs.length - 1); + + // Add input to result if only one matching (non-deleted) glyph remains. + let count = 0; + let found = 0; + for (let i = 0; i < glyphs.length && count <= 1; i++) { + if (glyphs[i].id !== 0xffff) { + count++; + found = glyphs[i].id; + } + } + + if (count === 1) { + let result = input.map(g => g.id); + let cache = this.inputCache[found]; + if (cache) { + cache.push(result); + } else { + this.inputCache[found] = [result]; + } + } + }, + + exit: () => { + ({glyphs: this.glyphs, ligatureStack: this.ligatureStack} = stack.pop()); + input.pop(); + } + }); + } +} + +// swaps the glyphs in rangeA with those in rangeB +// reverse the glyphs inside those ranges if specified +// ranges are in [offset, length] format +function swap(glyphs, rangeA, rangeB, reverseA = false, reverseB = false) { + let end = glyphs.splice(rangeB[0] - (rangeB[1] - 1), rangeB[1]); + if (reverseB) { + end.reverse(); + } + + let start = glyphs.splice(rangeA[0], rangeA[1], ...end); + if (reverseA) { + start.reverse(); + } + + glyphs.splice(rangeB[0] - (rangeA[1] - 1), 0, ...start); + return glyphs; +} + +function reorderGlyphs(glyphs, verb, firstGlyph, lastGlyph) { + let length = lastGlyph - firstGlyph + 1; + switch (verb) { + case 0: // no change + return glyphs; + + case 1: // Ax => xA + return swap(glyphs, [firstGlyph, 1], [lastGlyph, 0]); + + case 2: // xD => Dx + return swap(glyphs, [firstGlyph, 0], [lastGlyph, 1]); + + case 3: // AxD => DxA + return swap(glyphs, [firstGlyph, 1], [lastGlyph, 1]); + + case 4: // ABx => xAB + return swap(glyphs, [firstGlyph, 2], [lastGlyph, 0]); + + case 5: // ABx => xBA + return swap(glyphs, [firstGlyph, 2], [lastGlyph, 0], true, false); + + case 6: // xCD => CDx + return swap(glyphs, [firstGlyph, 0], [lastGlyph, 2]); + + case 7: // xCD => DCx + return swap(glyphs, [firstGlyph, 0], [lastGlyph, 2], false, true); + + case 8: // AxCD => CDxA + return swap(glyphs, [firstGlyph, 1], [lastGlyph, 2]); + + case 9: // AxCD => DCxA + return swap(glyphs, [firstGlyph, 1], [lastGlyph, 2], false, true); + + case 10: // ABxD => DxAB + return swap(glyphs, [firstGlyph, 2], [lastGlyph, 1]); + + case 11: // ABxD => DxBA + return swap(glyphs, [firstGlyph, 2], [lastGlyph, 1], true, false); + + case 12: // ABxCD => CDxAB + return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2]); + + case 13: // ABxCD => CDxBA + return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2], true, false); + + case 14: // ABxCD => DCxAB + return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2], false, true); + + case 15: // ABxCD => DCxBA + return swap(glyphs, [firstGlyph, 2], [lastGlyph, 2], true, true); + + default: + throw new Error(`Unknown verb: ${verb}`); + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/aat/AATStateMachine.js b/pitfall/pdfkit/node_modules/fontkit/src/aat/AATStateMachine.js new file mode 100644 index 00000000..77d31ef0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/aat/AATStateMachine.js @@ -0,0 +1,96 @@ +import AATLookupTable from './AATLookupTable'; + +const START_OF_TEXT_STATE = 0; +const START_OF_LINE_STATE = 1; + +const END_OF_TEXT_CLASS = 0; +const OUT_OF_BOUNDS_CLASS = 1; +const DELETED_GLYPH_CLASS = 2; +const END_OF_LINE_CLASS = 3; + +const DONT_ADVANCE = 0x4000; + +export default class AATStateMachine { + constructor(stateTable) { + this.stateTable = stateTable; + this.lookupTable = new AATLookupTable(stateTable.classTable); + } + + process(glyphs, reverse, processEntry) { + let currentState = START_OF_TEXT_STATE; // START_OF_LINE_STATE is used for kashida glyph insertions sometimes I think? + let index = reverse ? glyphs.length - 1 : 0; + let dir = reverse ? -1 : 1; + + while ((dir === 1 && index <= glyphs.length) || (dir === -1 && index >= -1)) { + let glyph = null; + let classCode = OUT_OF_BOUNDS_CLASS; + let shouldAdvance = true; + + if (index === glyphs.length || index === -1) { + classCode = END_OF_TEXT_CLASS; + } else { + glyph = glyphs[index]; + if (glyph.id === 0xffff) { // deleted glyph + classCode = DELETED_GLYPH_CLASS; + } else { + classCode = this.lookupTable.lookup(glyph.id); + if (classCode == null) { + classCode = OUT_OF_BOUNDS_CLASS; + } + } + } + + let row = this.stateTable.stateArray.getItem(currentState); + let entryIndex = row[classCode]; + let entry = this.stateTable.entryTable.getItem(entryIndex); + + if (classCode !== END_OF_TEXT_CLASS && classCode !== DELETED_GLYPH_CLASS) { + processEntry(glyph, entry, index); + shouldAdvance = !(entry.flags & DONT_ADVANCE); + } + + currentState = entry.newState; + if (shouldAdvance) { + index += dir; + } + } + + return glyphs; + } + + /** + * Performs a depth-first traversal of the glyph strings + * represented by the state machine. + */ + traverse(opts, state = 0, visited = new Set) { + if (visited.has(state)) { + return; + } + + visited.add(state); + + let {nClasses, stateArray, entryTable} = this.stateTable; + let row = stateArray.getItem(state); + + // Skip predefined classes + for (let classCode = 4; classCode < nClasses; classCode++) { + let entryIndex = row[classCode]; + let entry = entryTable.getItem(entryIndex); + + // Try all glyphs in the class + for (let glyph of this.lookupTable.glyphsForValue(classCode)) { + if (opts.enter) { + opts.enter(glyph, entry); + } + + if (entry.newState !== 0) { + this.traverse(opts, entry.newState, visited); + } + + if (opts.exit) { + opts.exit(glyph, entry); + } + } + } + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/base.js b/pitfall/pdfkit/node_modules/fontkit/src/base.js new file mode 100644 index 00000000..e224180d --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/base.js @@ -0,0 +1,54 @@ +import r from 'restructure'; +const fs = require('fs'); + +var fontkit = {}; +export default fontkit; + +fontkit.logErrors = false; + +let formats = []; +fontkit.registerFormat = function(format) { + formats.push(format); +}; + +fontkit.openSync = function(filename, postscriptName) { + let buffer = fs.readFileSync(filename); + return fontkit.create(buffer, postscriptName); +}; + +fontkit.open = function(filename, postscriptName, callback) { + if (typeof postscriptName === 'function') { + callback = postscriptName; + postscriptName = null; + } + + fs.readFile(filename, function(err, buffer) { + if (err) { return callback(err); } + + try { + var font = fontkit.create(buffer, postscriptName); + } catch (e) { + return callback(e); + } + + return callback(null, font); + }); + + return; +}; + +fontkit.create = function(buffer, postscriptName) { + for (let i = 0; i < formats.length; i++) { + let format = formats[i]; + if (format.probe(buffer)) { + let font = new format(new r.DecodeStream(buffer)); + if (postscriptName) { + return font.getFont(postscriptName); + } + + return font; + } + } + + throw new Error('Unknown font format'); +}; diff --git a/pitfall/pdfkit/node_modules/fontkit/src/cff/CFFCharsets.js b/pitfall/pdfkit/node_modules/fontkit/src/cff/CFFCharsets.js new file mode 100644 index 00000000..b7a98741 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/cff/CFFCharsets.js @@ -0,0 +1,99 @@ +export let ISOAdobeCharset = [ + '.notdef', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', + 'percent', 'ampersand', 'quoteright', 'parenleft', 'parenright', + 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero', + 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', + 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', 'question', + 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', + 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', + 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore', + 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', + 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + 'braceleft', 'bar', 'braceright', 'asciitilde', 'exclamdown', 'cent', + 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency', + 'quotesingle', 'quotedblleft', 'guillemotleft', 'guilsinglleft', + 'guilsinglright', 'fi', 'fl', 'endash', 'dagger', 'daggerdbl', + 'periodcentered', 'paragraph', 'bullet', 'quotesinglbase', + 'quotedblbase', 'quotedblright', 'guillemotright', 'ellipsis', + 'perthousand', 'questiondown', 'grave', 'acute', 'circumflex', 'tilde', + 'macron', 'breve', 'dotaccent', 'dieresis', 'ring', 'cedilla', + 'hungarumlaut', 'ogonek', 'caron', 'emdash', 'AE', 'ordfeminine', + 'Lslash', 'Oslash', 'OE', 'ordmasculine', 'ae', 'dotlessi', 'lslash', + 'oslash', 'oe', 'germandbls', 'onesuperior', 'logicalnot', 'mu', + 'trademark', 'Eth', 'onehalf', 'plusminus', 'Thorn', 'onequarter', + 'divide', 'brokenbar', 'degree', 'thorn', 'threequarters', 'twosuperior', + 'registered', 'minus', 'eth', 'multiply', 'threesuperior', 'copyright', + 'Aacute', 'Acircumflex', 'Adieresis', 'Agrave', 'Aring', 'Atilde', + 'Ccedilla', 'Eacute', 'Ecircumflex', 'Edieresis', 'Egrave', 'Iacute', + 'Icircumflex', 'Idieresis', 'Igrave', 'Ntilde', 'Oacute', 'Ocircumflex', + 'Odieresis', 'Ograve', 'Otilde', 'Scaron', 'Uacute', 'Ucircumflex', + 'Udieresis', 'Ugrave', 'Yacute', 'Ydieresis', 'Zcaron', 'aacute', + 'acircumflex', 'adieresis', 'agrave', 'aring', 'atilde', 'ccedilla', + 'eacute', 'ecircumflex', 'edieresis', 'egrave', 'iacute', 'icircumflex', + 'idieresis', 'igrave', 'ntilde', 'oacute', 'ocircumflex', 'odieresis', + 'ograve', 'otilde', 'scaron', 'uacute', 'ucircumflex', 'udieresis', + 'ugrave', 'yacute', 'ydieresis', 'zcaron' +]; + +export let ExpertCharset = [ + '.notdef', 'space', 'exclamsmall', 'Hungarumlautsmall', 'dollaroldstyle', + 'dollarsuperior', 'ampersandsmall', 'Acutesmall', 'parenleftsuperior', + 'parenrightsuperior', 'twodotenleader', 'onedotenleader', 'comma', + 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle', + 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle', + 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', + 'colon', 'semicolon', 'commasuperior', 'threequartersemdash', + 'periodsuperior', 'questionsmall', 'asuperior', 'bsuperior', + 'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior', + 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior', + 'tsuperior', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior', + 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall', + 'Asmall', 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', + 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall', + 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', + 'Vsmall', 'Wsmall', 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', + 'onefitted', 'rupiah', 'Tildesmall', 'exclamdownsmall', 'centoldstyle', + 'Lslashsmall', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall', + 'Brevesmall', 'Caronsmall', 'Dotaccentsmall', 'Macronsmall', + 'figuredash', 'hypheninferior', 'Ogoneksmall', 'Ringsmall', + 'Cedillasmall', 'onequarter', 'onehalf', 'threequarters', + 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths', + 'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'onesuperior', + 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior', + 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior', + 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior', + 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior', + 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior', + 'periodinferior', 'commainferior', 'Agravesmall', 'Aacutesmall', + 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall', 'Aringsmall', + 'AEsmall', 'Ccedillasmall', 'Egravesmall', 'Eacutesmall', + 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall', + 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall', + 'Ogravesmall', 'Oacutesmall', 'Ocircumflexsmall', 'Otildesmall', + 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall', + 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall', + 'Ydieresissmall' +]; + +export let ExpertSubsetCharset = [ + '.notdef', 'space', 'dollaroldstyle', 'dollarsuperior', + 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader', + 'onedotenleader', 'comma', 'hyphen', 'period', 'fraction', + 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle', + 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', + 'eightoldstyle', 'nineoldstyle', 'colon', 'semicolon', 'commasuperior', + 'threequartersemdash', 'periodsuperior', 'asuperior', 'bsuperior', + 'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior', + 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior', + 'tsuperior', 'ff', 'fi', 'fl', 'ffi', 'ffl', 'parenleftinferior', + 'parenrightinferior', 'hyphensuperior', 'colonmonetary', 'onefitted', + 'rupiah', 'centoldstyle', 'figuredash', 'hypheninferior', 'onequarter', + 'onehalf', 'threequarters', 'oneeighth', 'threeeighths', 'fiveeighths', + 'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'onesuperior', + 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior', + 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior', + 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior', + 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior', + 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior', + 'periodinferior', 'commainferior' +]; diff --git a/pitfall/pdfkit/node_modules/fontkit/src/cff/CFFDict.js b/pitfall/pdfkit/node_modules/fontkit/src/cff/CFFDict.js new file mode 100644 index 00000000..b2f96f3a --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/cff/CFFDict.js @@ -0,0 +1,167 @@ +import isEqual from 'deep-equal'; +import r from 'restructure'; +import CFFOperand from './CFFOperand'; +import { PropertyDescriptor } from 'restructure/src/utils'; + +export default class CFFDict { + constructor(ops = []) { + this.ops = ops; + this.fields = {}; + for (let field of ops) { + let key = Array.isArray(field[0]) ? field[0][0] << 8 | field[0][1] : field[0]; + this.fields[key] = field; + } + } + + decodeOperands(type, stream, ret, operands) { + if (Array.isArray(type)) { + return operands.map((op, i) => this.decodeOperands(type[i], stream, ret, [op])); + } else if (type.decode != null) { + return type.decode(stream, ret, operands); + } else { + switch (type) { + case 'number': + case 'offset': + case 'sid': + return operands[0]; + case 'boolean': + return !!operands[0]; + default: + return operands; + } + } + } + + encodeOperands(type, stream, ctx, operands) { + if (Array.isArray(type)) { + return operands.map((op, i) => this.encodeOperands(type[i], stream, ctx, op)[0]); + } else if (type.encode != null) { + return type.encode(stream, operands, ctx); + } else if (typeof operands === 'number') { + return [operands]; + } else if (typeof operands === 'boolean') { + return [+operands]; + } else if (Array.isArray(operands)) { + return operands; + } else { + return [operands]; + } + } + + decode(stream, parent) { + let end = stream.pos + parent.length; + let ret = {}; + let operands = []; + + // define hidden properties + Object.defineProperties(ret, { + parent: { value: parent }, + _startOffset: { value: stream.pos } + }); + + // fill in defaults + for (let key in this.fields) { + let field = this.fields[key]; + ret[field[1]] = field[3]; + } + + while (stream.pos < end) { + let b = stream.readUInt8(); + if (b < 28) { + if (b === 12) { + b = (b << 8) | stream.readUInt8(); + } + + let field = this.fields[b]; + if (!field) { + throw new Error(`Unknown operator ${b}`); + } + + let val = this.decodeOperands(field[2], stream, ret, operands); + if (val != null) { + if (val instanceof PropertyDescriptor) { + Object.defineProperty(ret, field[1], val); + } else { + ret[field[1]] = val; + } + } + + operands = []; + } else { + operands.push(CFFOperand.decode(stream, b)); + } + } + + return ret; + } + + size(dict, parent, includePointers = true) { + let ctx = { + parent, + val: dict, + pointerSize: 0, + startOffset: parent.startOffset || 0 + }; + + let len = 0; + + for (let k in this.fields) { + let field = this.fields[k]; + let val = dict[field[1]]; + if (val == null || isEqual(val, field[3])) { + continue; + } + + let operands = this.encodeOperands(field[2], null, ctx, val); + for (let op of operands) { + len += CFFOperand.size(op); + } + + let key = Array.isArray(field[0]) ? field[0] : [field[0]]; + len += key.length; + } + + if (includePointers) { + len += ctx.pointerSize; + } + + return len; + } + + encode(stream, dict, parent) { + let ctx = { + pointers: [], + startOffset: stream.pos, + parent, + val: dict, + pointerSize: 0 + }; + + ctx.pointerOffset = stream.pos + this.size(dict, ctx, false); + + for (let field of this.ops) { + let val = dict[field[1]]; + if (val == null || isEqual(val, field[3])) { + continue; + } + + let operands = this.encodeOperands(field[2], stream, ctx, val); + for (let op of operands) { + CFFOperand.encode(stream, op); + } + + let key = Array.isArray(field[0]) ? field[0] : [field[0]]; + for (let op of key) { + stream.writeUInt8(op); + } + } + + let i = 0; + while (i < ctx.pointers.length) { + let ptr = ctx.pointers[i++]; + ptr.type.encode(stream, ptr.val, ptr.parent); + } + + return; + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/cff/CFFEncodings.js b/pitfall/pdfkit/node_modules/fontkit/src/cff/CFFEncodings.js new file mode 100644 index 00000000..5465bb4f --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/cff/CFFEncodings.js @@ -0,0 +1,48 @@ +export let StandardEncoding = [ + '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', + '', '', '', '', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent', 'ampersand', 'quoteright', + 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', + 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', + 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', + 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore', + 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', + 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', '', '', '', '', '', '', '', '', + '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', + 'exclamdown', 'cent', 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency', 'quotesingle', + 'quotedblleft', 'guillemotleft', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', '', 'endash', 'dagger', + 'daggerdbl', 'periodcentered', '', 'paragraph', 'bullet', 'quotesinglbase', 'quotedblbase', 'quotedblright', + 'guillemotright', 'ellipsis', 'perthousand', '', 'questiondown', '', 'grave', 'acute', 'circumflex', 'tilde', + 'macron', 'breve', 'dotaccent', 'dieresis', '', 'ring', 'cedilla', '', 'hungarumlaut', 'ogonek', 'caron', + 'emdash', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', 'AE', '', 'ordfeminine', '', '', '', + '', 'Lslash', 'Oslash', 'OE', 'ordmasculine', '', '', '', '', '', 'ae', '', '', '', 'dotlessi', '', '', + 'lslash', 'oslash', 'oe', 'germandbls' +]; + +export let ExpertEncoding = [ + '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', + '', '', '', '', 'space', 'exclamsmall', 'Hungarumlautsmall', '', 'dollaroldstyle', 'dollarsuperior', + 'ampersandsmall', 'Acutesmall', 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader', 'onedotenleader', + 'comma', 'hyphen', 'period', 'fraction', 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle', + 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'colon', + 'semicolon', 'commasuperior', 'threequartersemdash', 'periodsuperior', 'questionsmall', '', 'asuperior', + 'bsuperior', 'centsuperior', 'dsuperior', 'esuperior', '', '', 'isuperior', '', '', 'lsuperior', 'msuperior', + 'nsuperior', 'osuperior', '', '', 'rsuperior', 'ssuperior', 'tsuperior', '', 'ff', 'fi', 'fl', 'ffi', 'ffl', + 'parenleftinferior', '', 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall', 'Asmall', + 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall', + 'Msmall', 'Nsmall', 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', 'Vsmall', 'Wsmall', + 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', 'onefitted', 'rupiah', 'Tildesmall', '', '', '', '', '', '', '', + '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', + 'exclamdownsmall', 'centoldstyle', 'Lslashsmall', '', '', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall', + 'Brevesmall', 'Caronsmall', '', 'Dotaccentsmall', '', '', 'Macronsmall', '', '', 'figuredash', 'hypheninferior', + '', '', 'Ogoneksmall', 'Ringsmall', 'Cedillasmall', '', '', '', 'onequarter', 'onehalf', 'threequarters', + 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds', '', + '', 'zerosuperior', 'onesuperior', 'twosuperior', 'threesuperior', 'foursuperior', 'fivesuperior', + 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior', 'zeroinferior', 'oneinferior', 'twoinferior', + 'threeinferior', 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior', 'eightinferior', + 'nineinferior', 'centinferior', 'dollarinferior', 'periodinferior', 'commainferior', 'Agravesmall', + 'Aacutesmall', 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall', 'Aringsmall', 'AEsmall', 'Ccedillasmall', + 'Egravesmall', 'Eacutesmall', 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall', + 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall', 'Ogravesmall', 'Oacutesmall', + 'Ocircumflexsmall', 'Otildesmall', 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall', + 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall', 'Ydieresissmall' +]; diff --git a/pitfall/pdfkit/node_modules/fontkit/src/cff/CFFFont.js b/pitfall/pdfkit/node_modules/fontkit/src/cff/CFFFont.js new file mode 100644 index 00000000..60d9e5f1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/cff/CFFFont.js @@ -0,0 +1,159 @@ +import r from 'restructure'; +import CFFIndex from './CFFIndex'; +import CFFTop from './CFFTop'; +import CFFPrivateDict from './CFFPrivateDict'; +import standardStrings from './CFFStandardStrings'; + +class CFFFont { + constructor(stream) { + this.stream = stream; + this.decode(); + } + + static decode(stream) { + return new CFFFont(stream); + } + + decode() { + let start = this.stream.pos; + let top = CFFTop.decode(this.stream); + for (let key in top) { + let val = top[key]; + this[key] = val; + } + + if (this.version < 2) { + if (this.topDictIndex.length !== 1) { + throw new Error("Only a single font is allowed in CFF"); + } + + this.topDict = this.topDictIndex[0]; + } + + this.isCIDFont = this.topDict.ROS != null; + return this; + } + + string(sid) { + if (this.version >= 2) { + return null; + } + + if (sid < standardStrings.length) { + return standardStrings[sid]; + } + + return this.stringIndex[sid - standardStrings.length]; + } + + get postscriptName() { + if (this.version < 2) { + return this.nameIndex[0]; + } + + return null; + } + + get fullName() { + return this.string(this.topDict.FullName); + } + + get familyName() { + return this.string(this.topDict.FamilyName); + } + + getCharString(glyph) { + this.stream.pos = this.topDict.CharStrings[glyph].offset; + return this.stream.readBuffer(this.topDict.CharStrings[glyph].length); + } + + getGlyphName(gid) { + // CFF2 glyph names are in the post table. + if (this.version >= 2) { + return null; + } + + // CID-keyed fonts don't have glyph names + if (this.isCIDFont) { + return null; + } + + let { charset } = this.topDict; + if (Array.isArray(charset)) { + return charset[gid]; + } + + if (gid === 0) { + return '.notdef'; + } + + gid -= 1; + + switch (charset.version) { + case 0: + return this.string(charset.glyphs[gid]); + + case 1: + case 2: + for (let i = 0; i < charset.ranges.length; i++) { + let range = charset.ranges[i]; + if (range.offset <= gid && gid <= range.offset + range.nLeft) { + return this.string(range.first + (gid - range.offset)); + } + } + break; + } + + return null; + } + + fdForGlyph(gid) { + if (!this.topDict.FDSelect) { + return null; + } + + switch (this.topDict.FDSelect.version) { + case 0: + return this.topDict.FDSelect.fds[gid]; + + case 3: + case 4: + let { ranges } = this.topDict.FDSelect; + let low = 0; + let high = ranges.length - 1; + + while (low <= high) { + let mid = (low + high) >> 1; + + if (gid < ranges[mid].first) { + high = mid - 1; + } else if (mid < high && gid > ranges[mid + 1].first) { + low = mid + 1; + } else { + return ranges[mid].fd; + } + } + default: + throw new Error(`Unknown FDSelect version: ${this.topDict.FDSelect.version}`); + } + } + + privateDictForGlyph(gid) { + if (this.topDict.FDSelect) { + let fd = this.fdForGlyph(gid); + if (this.topDict.FDArray[fd]) { + return this.topDict.FDArray[fd].Private; + } + + return null; + } + + if (this.version < 2) { + return this.topDict.Private; + } + + return this.topDict.FDArray[0].Private; + } +} + +export default CFFFont; diff --git a/pitfall/pdfkit/node_modules/fontkit/src/cff/CFFIndex.js b/pitfall/pdfkit/node_modules/fontkit/src/cff/CFFIndex.js new file mode 100644 index 00000000..2f9c42b7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/cff/CFFIndex.js @@ -0,0 +1,150 @@ +import r from 'restructure'; + +export default class CFFIndex { + constructor(type) { + this.type = type; + } + + getCFFVersion(ctx) { + while (ctx && !ctx.hdrSize) { + ctx = ctx.parent; + } + + return ctx ? ctx.version : -1; + } + + decode(stream, parent) { + let version = this.getCFFVersion(parent); + let count = version >= 2 + ? stream.readUInt32BE() + : stream.readUInt16BE(); + + if (count === 0) { + return []; + } + + let offSize = stream.readUInt8(); + let offsetType; + if (offSize === 1) { + offsetType = r.uint8; + } else if (offSize === 2) { + offsetType = r.uint16; + } else if (offSize === 3) { + offsetType = r.uint24; + } else if (offSize === 4) { + offsetType = r.uint32; + } else { + throw new Error(`Bad offset size in CFFIndex: ${offSize} ${stream.pos}`); + } + + let ret = []; + let startPos = stream.pos + ((count + 1) * offSize) - 1; + + let start = offsetType.decode(stream); + for (let i = 0; i < count; i++) { + let end = offsetType.decode(stream); + + if (this.type != null) { + let pos = stream.pos; + stream.pos = startPos + start; + + parent.length = end - start; + ret.push(this.type.decode(stream, parent)); + stream.pos = pos; + } else { + ret.push({ + offset: startPos + start, + length: end - start + }); + } + + start = end; + } + + stream.pos = startPos + start; + return ret; + } + + size(arr, parent) { + let size = 2; + if (arr.length === 0) { + return size; + } + + let type = this.type || new r.Buffer; + + // find maximum offset to detminine offset type + let offset = 1; + for (let i = 0; i < arr.length; i++) { + let item = arr[i]; + offset += type.size(item, parent); + } + + let offsetType; + if (offset <= 0xff) { + offsetType = r.uint8; + } else if (offset <= 0xffff) { + offsetType = r.uint16; + } else if (offset <= 0xffffff) { + offsetType = r.uint24; + } else if (offset <= 0xffffffff) { + offsetType = r.uint32; + } else { + throw new Error("Bad offset in CFFIndex"); + } + + size += 1 + offsetType.size() * (arr.length + 1); + size += offset - 1; + + return size; + } + + encode(stream, arr, parent) { + stream.writeUInt16BE(arr.length); + if (arr.length === 0) { + return; + } + + let type = this.type || new r.Buffer; + + // find maximum offset to detminine offset type + let sizes = []; + let offset = 1; + for (let item of arr) { + let s = type.size(item, parent); + sizes.push(s); + offset += s; + } + + let offsetType; + if (offset <= 0xff) { + offsetType = r.uint8; + } else if (offset <= 0xffff) { + offsetType = r.uint16; + } else if (offset <= 0xffffff) { + offsetType = r.uint24; + } else if (offset <= 0xffffffff) { + offsetType = r.uint32; + } else { + throw new Error("Bad offset in CFFIndex"); + } + + // write offset size + stream.writeUInt8(offsetType.size()); + + // write elements + offset = 1; + offsetType.encode(stream, offset); + + for (let size of sizes) { + offset += size; + offsetType.encode(stream, offset); + } + + for (let item of arr) { + type.encode(stream, item, parent); + } + + return; + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/cff/CFFOperand.js b/pitfall/pdfkit/node_modules/fontkit/src/cff/CFFOperand.js new file mode 100644 index 00000000..28f858c1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/cff/CFFOperand.js @@ -0,0 +1,134 @@ +const FLOAT_EOF = 0xf; +const FLOAT_LOOKUP = [ + '0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', '.', 'E', 'E-', null, '-' +]; + +const FLOAT_ENCODE_LOOKUP = { + '.': 10, + 'E': 11, + 'E-': 12, + '-': 14 +}; + +export default class CFFOperand { + static decode(stream, value) { + if (32 <= value && value <= 246) { + return value - 139; + } + + if (247 <= value && value <= 250) { + return (value - 247) * 256 + stream.readUInt8() + 108; + } + + if (251 <= value && value <= 254) { + return -(value - 251) * 256 - stream.readUInt8() - 108; + } + + if (value === 28) { + return stream.readInt16BE(); + } + + if (value === 29) { + return stream.readInt32BE(); + } + + if (value === 30) { + let str = ''; + while (true) { + let b = stream.readUInt8(); + + let n1 = b >> 4; + if (n1 === FLOAT_EOF) { break; } + str += FLOAT_LOOKUP[n1]; + + let n2 = b & 15; + if (n2 === FLOAT_EOF) { break; } + str += FLOAT_LOOKUP[n2]; + } + + return parseFloat(str); + } + + return null; + } + + static size(value) { + // if the value needs to be forced to the largest size (32 bit) + // e.g. for unknown pointers, set to 32768 + if (value.forceLarge) { + value = 32768; + } + + if ((value | 0) !== value) { // floating point + let str = '' + value; + return 1 + Math.ceil((str.length + 1) / 2); + + } else if (-107 <= value && value <= 107) { + return 1; + + } else if (108 <= value && value <= 1131 || -1131 <= value && value <= -108) { + return 2; + + } else if (-32768 <= value && value <= 32767) { + return 3; + + } else { + return 5; + } + } + + static encode(stream, value) { + // if the value needs to be forced to the largest size (32 bit) + // e.g. for unknown pointers, save the old value and set to 32768 + let val = Number(value); + + if (value.forceLarge) { + stream.writeUInt8(29); + return stream.writeInt32BE(val); + + } else if ((val | 0) !== val) { // floating point + stream.writeUInt8(30); + + let str = '' + val; + for (let i = 0; i < str.length; i += 2) { + let c1 = str[i]; + let n1 = FLOAT_ENCODE_LOOKUP[c1] || +c1; + + if (i === str.length - 1) { + var n2 = FLOAT_EOF; + } else { + let c2 = str[i + 1]; + var n2 = FLOAT_ENCODE_LOOKUP[c2] || +c2; + } + + stream.writeUInt8((n1 << 4) | (n2 & 15)); + } + + if (n2 !== FLOAT_EOF) { + return stream.writeUInt8((FLOAT_EOF << 4)); + } + + } else if (-107 <= val && val <= 107) { + return stream.writeUInt8(val + 139); + + } else if (108 <= val && val <= 1131) { + val -= 108; + stream.writeUInt8((val >> 8) + 247); + return stream.writeUInt8(val & 0xff); + + } else if (-1131 <= val && val <= -108) { + val = -val - 108; + stream.writeUInt8((val >> 8) + 251); + return stream.writeUInt8(val & 0xff); + + } else if (-32768 <= val && val <= 32767) { + stream.writeUInt8(28); + return stream.writeInt16BE(val); + + } else { + stream.writeUInt8(29); + return stream.writeInt32BE(val); + } + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/cff/CFFPointer.js b/pitfall/pdfkit/node_modules/fontkit/src/cff/CFFPointer.js new file mode 100644 index 00000000..1d001fd5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/cff/CFFPointer.js @@ -0,0 +1,50 @@ +import r from 'restructure'; + +export default class CFFPointer extends r.Pointer { + constructor(type, options = {}) { + if (options.type == null) { + options.type = 'global'; + } + + super(null, type, options); + } + + decode(stream, parent, operands) { + this.offsetType = { + decode: () => operands[0] + }; + + return super.decode(stream, parent, operands); + } + + encode(stream, value, ctx) { + if (!stream) { + // compute the size (so ctx.pointerSize is correct) + this.offsetType = { + size: () => 0 + }; + + this.size(value, ctx); + return [new Ptr(0)]; + } + + let ptr = null; + this.offsetType = { + encode: (stream, val) => ptr = val + }; + + super.encode(stream, value, ctx); + return [new Ptr(ptr)]; + } +} + +class Ptr { + constructor(val) { + this.val = val; + this.forceLarge = true; + } + + valueOf() { + return this.val; + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/cff/CFFPrivateDict.js b/pitfall/pdfkit/node_modules/fontkit/src/cff/CFFPrivateDict.js new file mode 100644 index 00000000..59fcab65 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/cff/CFFPrivateDict.js @@ -0,0 +1,39 @@ +import CFFDict from './CFFDict'; +import CFFIndex from './CFFIndex'; +import CFFPointer from './CFFPointer'; + +class CFFBlendOp { + static decode(stream, parent, operands) { + let numBlends = operands.pop(); + + // TODO: actually blend. For now just consume the deltas + // since we don't use any of the values anyway. + while (operands.length > numBlends) { + operands.pop(); + } + } +} + +export default new CFFDict([ + // key name type default + [6, 'BlueValues', 'delta', null], + [7, 'OtherBlues', 'delta', null], + [8, 'FamilyBlues', 'delta', null], + [9, 'FamilyOtherBlues', 'delta', null], + [[12, 9], 'BlueScale', 'number', 0.039625], + [[12, 10], 'BlueShift', 'number', 7], + [[12, 11], 'BlueFuzz', 'number', 1], + [10, 'StdHW', 'number', null], + [11, 'StdVW', 'number', null], + [[12, 12], 'StemSnapH', 'delta', null], + [[12, 13], 'StemSnapV', 'delta', null], + [[12, 14], 'ForceBold', 'boolean', false], + [[12, 17], 'LanguageGroup', 'number', 0], + [[12, 18], 'ExpansionFactor', 'number', 0.06], + [[12, 19], 'initialRandomSeed', 'number', 0], + [20, 'defaultWidthX', 'number', 0], + [21, 'nominalWidthX', 'number', 0], + [22, 'vsindex', 'number', 0], + [23, 'blend', CFFBlendOp, null], + [19, 'Subrs', new CFFPointer(new CFFIndex, {type: 'local'}), null] +]); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/cff/CFFStandardStrings.js b/pitfall/pdfkit/node_modules/fontkit/src/cff/CFFStandardStrings.js new file mode 100644 index 00000000..b5d59560 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/cff/CFFStandardStrings.js @@ -0,0 +1,71 @@ +// Automatically generated from Appendix A of the CFF specification; do +// not edit. Length should be 391. +export default [ + ".notdef", "space", "exclam", "quotedbl", "numbersign", "dollar", + "percent", "ampersand", "quoteright", "parenleft", "parenright", + "asterisk", "plus", "comma", "hyphen", "period", "slash", "zero", "one", + "two", "three", "four", "five", "six", "seven", "eight", "nine", "colon", + "semicolon", "less", "equal", "greater", "question", "at", "A", "B", "C", + "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", + "S", "T", "U", "V", "W", "X", "Y", "Z", "bracketleft", "backslash", + "bracketright", "asciicircum", "underscore", "quoteleft", "a", "b", "c", + "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", + "s", "t", "u", "v", "w", "x", "y", "z", "braceleft", "bar", "braceright", + "asciitilde", "exclamdown", "cent", "sterling", "fraction", "yen", + "florin", "section", "currency", "quotesingle", "quotedblleft", + "guillemotleft", "guilsinglleft", "guilsinglright", "fi", "fl", "endash", + "dagger", "daggerdbl", "periodcentered", "paragraph", "bullet", + "quotesinglbase", "quotedblbase", "quotedblright", "guillemotright", + "ellipsis", "perthousand", "questiondown", "grave", "acute", "circumflex", + "tilde", "macron", "breve", "dotaccent", "dieresis", "ring", "cedilla", + "hungarumlaut", "ogonek", "caron", "emdash", "AE", "ordfeminine", "Lslash", + "Oslash", "OE", "ordmasculine", "ae", "dotlessi", "lslash", "oslash", "oe", + "germandbls", "onesuperior", "logicalnot", "mu", "trademark", "Eth", + "onehalf", "plusminus", "Thorn", "onequarter", "divide", "brokenbar", + "degree", "thorn", "threequarters", "twosuperior", "registered", "minus", + "eth", "multiply", "threesuperior", "copyright", "Aacute", "Acircumflex", + "Adieresis", "Agrave", "Aring", "Atilde", "Ccedilla", "Eacute", + "Ecircumflex", "Edieresis", "Egrave", "Iacute", "Icircumflex", "Idieresis", + "Igrave", "Ntilde", "Oacute", "Ocircumflex", "Odieresis", "Ograve", + "Otilde", "Scaron", "Uacute", "Ucircumflex", "Udieresis", "Ugrave", + "Yacute", "Ydieresis", "Zcaron", "aacute", "acircumflex", "adieresis", + "agrave", "aring", "atilde", "ccedilla", "eacute", "ecircumflex", + "edieresis", "egrave", "iacute", "icircumflex", "idieresis", "igrave", + "ntilde", "oacute", "ocircumflex", "odieresis", "ograve", "otilde", + "scaron", "uacute", "ucircumflex", "udieresis", "ugrave", "yacute", + "ydieresis", "zcaron", "exclamsmall", "Hungarumlautsmall", + "dollaroldstyle", "dollarsuperior", "ampersandsmall", "Acutesmall", + "parenleftsuperior", "parenrightsuperior", "twodotenleader", + "onedotenleader", "zerooldstyle", "oneoldstyle", "twooldstyle", + "threeoldstyle", "fouroldstyle", "fiveoldstyle", "sixoldstyle", + "sevenoldstyle", "eightoldstyle", "nineoldstyle", "commasuperior", + "threequartersemdash", "periodsuperior", "questionsmall", "asuperior", + "bsuperior", "centsuperior", "dsuperior", "esuperior", "isuperior", + "lsuperior", "msuperior", "nsuperior", "osuperior", "rsuperior", + "ssuperior", "tsuperior", "ff", "ffi", "ffl", "parenleftinferior", + "parenrightinferior", "Circumflexsmall", "hyphensuperior", "Gravesmall", + "Asmall", "Bsmall", "Csmall", "Dsmall", "Esmall", "Fsmall", "Gsmall", + "Hsmall", "Ismall", "Jsmall", "Ksmall", "Lsmall", "Msmall", "Nsmall", + "Osmall", "Psmall", "Qsmall", "Rsmall", "Ssmall", "Tsmall", "Usmall", + "Vsmall", "Wsmall", "Xsmall", "Ysmall", "Zsmall", "colonmonetary", + "onefitted", "rupiah", "Tildesmall", "exclamdownsmall", "centoldstyle", + "Lslashsmall", "Scaronsmall", "Zcaronsmall", "Dieresissmall", "Brevesmall", + "Caronsmall", "Dotaccentsmall", "Macronsmall", "figuredash", + "hypheninferior", "Ogoneksmall", "Ringsmall", "Cedillasmall", + "questiondownsmall", "oneeighth", "threeeighths", "fiveeighths", + "seveneighths", "onethird", "twothirds", "zerosuperior", "foursuperior", + "fivesuperior", "sixsuperior", "sevensuperior", "eightsuperior", + "ninesuperior", "zeroinferior", "oneinferior", "twoinferior", + "threeinferior", "fourinferior", "fiveinferior", "sixinferior", + "seveninferior", "eightinferior", "nineinferior", "centinferior", + "dollarinferior", "periodinferior", "commainferior", "Agravesmall", + "Aacutesmall", "Acircumflexsmall", "Atildesmall", "Adieresissmall", + "Aringsmall", "AEsmall", "Ccedillasmall", "Egravesmall", "Eacutesmall", + "Ecircumflexsmall", "Edieresissmall", "Igravesmall", "Iacutesmall", + "Icircumflexsmall", "Idieresissmall", "Ethsmall", "Ntildesmall", + "Ogravesmall", "Oacutesmall", "Ocircumflexsmall", "Otildesmall", + "Odieresissmall", "OEsmall", "Oslashsmall", "Ugravesmall", "Uacutesmall", + "Ucircumflexsmall", "Udieresissmall", "Yacutesmall", "Thornsmall", + "Ydieresissmall", "001.000", "001.001", "001.002", "001.003", "Black", + "Bold", "Book", "Light", "Medium", "Regular", "Roman", "Semibold" +]; diff --git a/pitfall/pdfkit/node_modules/fontkit/src/cff/CFFTop.js b/pitfall/pdfkit/node_modules/fontkit/src/cff/CFFTop.js new file mode 100644 index 00000000..c9444fca --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/cff/CFFTop.js @@ -0,0 +1,235 @@ +import r from 'restructure'; +import { resolveLength } from 'restructure/src/utils'; +import CFFDict from './CFFDict'; +import CFFIndex from './CFFIndex'; +import CFFPointer from './CFFPointer'; +import CFFPrivateDict from './CFFPrivateDict'; +import StandardStrings from './CFFStandardStrings'; +import { StandardEncoding, ExpertEncoding } from './CFFEncodings'; +import { ISOAdobeCharset, ExpertCharset, ExpertSubsetCharset } from './CFFCharsets'; +import { ItemVariationStore } from '../tables/variations'; + +// Checks if an operand is an index of a predefined value, +// otherwise delegates to the provided type. +class PredefinedOp { + constructor(predefinedOps, type) { + this.predefinedOps = predefinedOps; + this.type = type; + } + + decode(stream, parent, operands) { + if (this.predefinedOps[operands[0]]) { + return this.predefinedOps[operands[0]]; + } + + return this.type.decode(stream, parent, operands); + } + + size(value, ctx) { + return this.type.size(value, ctx); + } + + encode(stream, value, ctx) { + let index = this.predefinedOps.indexOf(value); + if (index !== -1) { + return index; + } + + return this.type.encode(stream, value, ctx); + } +} + +class CFFEncodingVersion extends r.Number { + constructor() { + super('UInt8'); + } + + decode(stream) { + return r.uint8.decode(stream) & 0x7f; + } +} + +let Range1 = new r.Struct({ + first: r.uint16, + nLeft: r.uint8 +}); + +let Range2 = new r.Struct({ + first: r.uint16, + nLeft: r.uint16 +}); + +let CFFCustomEncoding = new r.VersionedStruct(new CFFEncodingVersion(), { + 0: { + nCodes: r.uint8, + codes: new r.Array(r.uint8, 'nCodes') + }, + + 1: { + nRanges: r.uint8, + ranges: new r.Array(Range1, 'nRanges') + } + + // TODO: supplement? +}); + +let CFFEncoding = new PredefinedOp([ StandardEncoding, ExpertEncoding ], new CFFPointer(CFFCustomEncoding, { lazy: true })); + +// Decodes an array of ranges until the total +// length is equal to the provided length. +class RangeArray extends r.Array { + decode(stream, parent) { + let length = resolveLength(this.length, stream, parent); + let count = 0; + let res = []; + while (count < length) { + let range = this.type.decode(stream, parent); + range.offset = count; + count += range.nLeft + 1; + res.push(range); + } + + return res; + } +} + +let CFFCustomCharset = new r.VersionedStruct(r.uint8, { + 0: { + glyphs: new r.Array(r.uint16, t => t.parent.CharStrings.length - 1) + }, + + 1: { + ranges: new RangeArray(Range1, t => t.parent.CharStrings.length - 1) + }, + + 2: { + ranges: new RangeArray(Range2, t => t.parent.CharStrings.length - 1) + } +}); + +let CFFCharset = new PredefinedOp([ ISOAdobeCharset, ExpertCharset, ExpertSubsetCharset ], new CFFPointer(CFFCustomCharset, {lazy: true})); + +let FDRange3 = new r.Struct({ + first: r.uint16, + fd: r.uint8 +}); + +let FDRange4 = new r.Struct({ + first: r.uint32, + fd: r.uint16 +}); + +let FDSelect = new r.VersionedStruct(r.uint8, { + 0: { + fds: new r.Array(r.uint8, t => t.parent.CharStrings.length) + }, + + 3: { + nRanges: r.uint16, + ranges: new r.Array(FDRange3, 'nRanges'), + sentinel: r.uint16 + }, + + 4: { + nRanges: r.uint32, + ranges: new r.Array(FDRange4, 'nRanges'), + sentinel: r.uint32 + } +}); + +let ptr = new CFFPointer(CFFPrivateDict); +class CFFPrivateOp { + decode(stream, parent, operands) { + parent.length = operands[0]; + return ptr.decode(stream, parent, [operands[1]]); + } + + size(dict, ctx) { + return [CFFPrivateDict.size(dict, ctx, false), ptr.size(dict, ctx)[0]]; + } + + encode(stream, dict, ctx) { + return [CFFPrivateDict.size(dict, ctx, false), ptr.encode(stream, dict, ctx)[0]]; + } +} + +let FontDict = new CFFDict([ + // key name type(s) default + [18, 'Private', new CFFPrivateOp, null], + [[12, 38], 'FontName', 'sid', null] +]); + +let CFFTopDict = new CFFDict([ + // key name type(s) default + [[12, 30], 'ROS', ['sid', 'sid', 'number'], null], + + [0, 'version', 'sid', null], + [1, 'Notice', 'sid', null], + [[12, 0], 'Copyright', 'sid', null], + [2, 'FullName', 'sid', null], + [3, 'FamilyName', 'sid', null], + [4, 'Weight', 'sid', null], + [[12, 1], 'isFixedPitch', 'boolean', false], + [[12, 2], 'ItalicAngle', 'number', 0], + [[12, 3], 'UnderlinePosition', 'number', -100], + [[12, 4], 'UnderlineThickness', 'number', 50], + [[12, 5], 'PaintType', 'number', 0], + [[12, 6], 'CharstringType', 'number', 2], + [[12, 7], 'FontMatrix', 'array', [0.001, 0, 0, 0.001, 0, 0]], + [13, 'UniqueID', 'number', null], + [5, 'FontBBox', 'array', [0, 0, 0, 0]], + [[12, 8], 'StrokeWidth', 'number', 0], + [14, 'XUID', 'array', null], + [15, 'charset', CFFCharset, ISOAdobeCharset], + [16, 'Encoding', CFFEncoding, StandardEncoding], + [17, 'CharStrings', new CFFPointer(new CFFIndex), null], + [18, 'Private', new CFFPrivateOp, null], + [[12, 20], 'SyntheticBase', 'number', null], + [[12, 21], 'PostScript', 'sid', null], + [[12, 22], 'BaseFontName', 'sid', null], + [[12, 23], 'BaseFontBlend', 'delta', null], + + // CID font specific + [[12, 31], 'CIDFontVersion', 'number', 0], + [[12, 32], 'CIDFontRevision', 'number', 0], + [[12, 33], 'CIDFontType', 'number', 0], + [[12, 34], 'CIDCount', 'number', 8720], + [[12, 35], 'UIDBase', 'number', null], + [[12, 37], 'FDSelect', new CFFPointer(FDSelect), null], + [[12, 36], 'FDArray', new CFFPointer(new CFFIndex(FontDict)), null], + [[12, 38], 'FontName', 'sid', null] +]); + +let VariationStore = new r.Struct({ + length: r.uint16, + itemVariationStore: ItemVariationStore +}) + +let CFF2TopDict = new CFFDict([ + [[12, 7], 'FontMatrix', 'array', [0.001, 0, 0, 0.001, 0, 0]], + [17, 'CharStrings', new CFFPointer(new CFFIndex), null], + [[12, 37], 'FDSelect', new CFFPointer(FDSelect), null], + [[12, 36], 'FDArray', new CFFPointer(new CFFIndex(FontDict)), null], + [24, 'vstore', new CFFPointer(VariationStore), null], + [25, 'maxstack', 'number', 193] +]); + +let CFFTop = new r.VersionedStruct(r.fixed16, { + 1: { + hdrSize: r.uint8, + offSize: r.uint8, + nameIndex: new CFFIndex(new r.String('length')), + topDictIndex: new CFFIndex(CFFTopDict), + stringIndex: new CFFIndex(new r.String('length')), + globalSubrIndex: new CFFIndex + }, + + 2: { + hdrSize: r.uint8, + length: r.uint16, + topDict: CFF2TopDict, + globalSubrIndex: new CFFIndex + } +}); + +export default CFFTop; diff --git a/pitfall/pdfkit/node_modules/fontkit/src/decorators.js b/pitfall/pdfkit/node_modules/fontkit/src/decorators.js new file mode 100644 index 00000000..ce0d90b8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/decorators.js @@ -0,0 +1,36 @@ +/** + * This decorator caches the results of a getter or method such that + * the results are lazily computed once, and then cached. + * @private + */ +export function cache(target, key, descriptor) { + if (descriptor.get) { + let get = descriptor.get; + descriptor.get = function() { + let value = get.call(this); + Object.defineProperty(this, key, { value }); + return value; + }; + } else if (typeof descriptor.value === 'function') { + let fn = descriptor.value; + + return { + get() { + let cache = new Map; + function memoized(...args) { + let key = args.length > 0 ? args[0] : 'value'; + if (cache.has(key)) { + return cache.get(key); + } + + let result = fn.apply(this, args); + cache.set(key, result); + return result; + }; + + Object.defineProperty(this, key, {value: memoized}); + return memoized; + } + }; + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/encodings.js b/pitfall/pdfkit/node_modules/fontkit/src/encodings.js new file mode 100644 index 00000000..cf2d4e07 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/encodings.js @@ -0,0 +1,166 @@ +/** + * Gets an encoding name from platform, encoding, and language ids. + * Returned encoding names can be used in iconv-lite to decode text. + */ +export function getEncoding(platformID, encodingID, languageID = 0) { + if (platformID === 1 && MAC_LANGUAGE_ENCODINGS[languageID]) { + return MAC_LANGUAGE_ENCODINGS[languageID]; + } + + return ENCODINGS[platformID][encodingID]; +} + +// Map of platform ids to encoding ids. +export const ENCODINGS = [ + // unicode + ['utf16be', 'utf16be', 'utf16be', 'utf16be', 'utf16be', 'utf16be'], + + // macintosh + // Mappings available at http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/ + // 0 Roman 17 Malayalam + // 1 Japanese 18 Sinhalese + // 2 Traditional Chinese 19 Burmese + // 3 Korean 20 Khmer + // 4 Arabic 21 Thai + // 5 Hebrew 22 Laotian + // 6 Greek 23 Georgian + // 7 Russian 24 Armenian + // 8 RSymbol 25 Simplified Chinese + // 9 Devanagari 26 Tibetan + // 10 Gurmukhi 27 Mongolian + // 11 Gujarati 28 Geez + // 12 Oriya 29 Slavic + // 13 Bengali 30 Vietnamese + // 14 Tamil 31 Sindhi + // 15 Telugu 32 (Uninterpreted) + // 16 Kannada + ['macroman', 'shift-jis', 'big5', 'euc-kr', 'iso-8859-6', 'iso-8859-8', + 'macgreek', 'maccyrillic', 'symbol', 'Devanagari', 'Gurmukhi', 'Gujarati', + 'Oriya', 'Bengali', 'Tamil', 'Telugu', 'Kannada', 'Malayalam', 'Sinhalese', + 'Burmese', 'Khmer', 'macthai', 'Laotian', 'Georgian', 'Armenian', 'gb-2312-80', + 'Tibetan', 'Mongolian', 'Geez', 'maccenteuro', 'Vietnamese', 'Sindhi'], + + // ISO (deprecated) + ['ascii'], + + // windows + // Docs here: http://msdn.microsoft.com/en-us/library/system.text.encoding(v=vs.110).aspx + ['symbol', 'utf16be', 'shift-jis', 'gb18030', 'big5', 'wansung', 'johab', null, null, null, 'utf16be'] +]; + +// Overrides for Mac scripts by language id. +// See http://unicode.org/Public/MAPPINGS/VENDORS/APPLE/Readme.txt +export const MAC_LANGUAGE_ENCODINGS = { + 15: 'maciceland', + 17: 'macturkish', + 18: 'maccroatian', + 24: 'maccenteuro', + 25: 'maccenteuro', + 26: 'maccenteuro', + 27: 'maccenteuro', + 28: 'maccenteuro', + 30: 'maciceland', + 37: 'macromania', + 38: 'maccenteuro', + 39: 'maccenteuro', + 40: 'maccenteuro', + 143: 'macinuit', // Unsupported by iconv-lite + 146: 'macgaelic' // Unsupported by iconv-lite +}; + +// Map of platform ids to BCP-47 language codes. +export const LANGUAGES = [ + // unicode + [], + + { // macintosh + 0: 'en', 30: 'fo', 60: 'ks', 90: 'rw', + 1: 'fr', 31: 'fa', 61: 'ku', 91: 'rn', + 2: 'de', 32: 'ru', 62: 'sd', 92: 'ny', + 3: 'it', 33: 'zh', 63: 'bo', 93: 'mg', + 4: 'nl', 34: 'nl-BE', 64: 'ne', 94: 'eo', + 5: 'sv', 35: 'ga', 65: 'sa', 128: 'cy', + 6: 'es', 36: 'sq', 66: 'mr', 129: 'eu', + 7: 'da', 37: 'ro', 67: 'bn', 130: 'ca', + 8: 'pt', 38: 'cz', 68: 'as', 131: 'la', + 9: 'no', 39: 'sk', 69: 'gu', 132: 'qu', + 10: 'he', 40: 'si', 70: 'pa', 133: 'gn', + 11: 'ja', 41: 'yi', 71: 'or', 134: 'ay', + 12: 'ar', 42: 'sr', 72: 'ml', 135: 'tt', + 13: 'fi', 43: 'mk', 73: 'kn', 136: 'ug', + 14: 'el', 44: 'bg', 74: 'ta', 137: 'dz', + 15: 'is', 45: 'uk', 75: 'te', 138: 'jv', + 16: 'mt', 46: 'be', 76: 'si', 139: 'su', + 17: 'tr', 47: 'uz', 77: 'my', 140: 'gl', + 18: 'hr', 48: 'kk', 78: 'km', 141: 'af', + 19: 'zh-Hant', 49: 'az-Cyrl', 79: 'lo', 142: 'br', + 20: 'ur', 50: 'az-Arab', 80: 'vi', 143: 'iu', + 21: 'hi', 51: 'hy', 81: 'id', 144: 'gd', + 22: 'th', 52: 'ka', 82: 'tl', 145: 'gv', + 23: 'ko', 53: 'mo', 83: 'ms', 146: 'ga', + 24: 'lt', 54: 'ky', 84: 'ms-Arab', 147: 'to', + 25: 'pl', 55: 'tg', 85: 'am', 148: 'el-polyton', + 26: 'hu', 56: 'tk', 86: 'ti', 149: 'kl', + 27: 'es', 57: 'mn-CN', 87: 'om', 150: 'az', + 28: 'lv', 58: 'mn', 88: 'so', 151: 'nn', + 29: 'se', 59: 'ps', 89: 'sw', + }, + + // ISO (deprecated) + [], + + { // windows + 0x0436: 'af', 0x4009: 'en-IN', 0x0487: 'rw', 0x0432: 'tn', + 0x041C: 'sq', 0x1809: 'en-IE', 0x0441: 'sw', 0x045B: 'si', + 0x0484: 'gsw', 0x2009: 'en-JM', 0x0457: 'kok', 0x041B: 'sk', + 0x045E: 'am', 0x4409: 'en-MY', 0x0412: 'ko', 0x0424: 'sl', + 0x1401: 'ar-DZ', 0x1409: 'en-NZ', 0x0440: 'ky', 0x2C0A: 'es-AR', + 0x3C01: 'ar-BH', 0x3409: 'en-PH', 0x0454: 'lo', 0x400A: 'es-BO', + 0x0C01: 'ar', 0x4809: 'en-SG', 0x0426: 'lv', 0x340A: 'es-CL', + 0x0801: 'ar-IQ', 0x1C09: 'en-ZA', 0x0427: 'lt', 0x240A: 'es-CO', + 0x2C01: 'ar-JO', 0x2C09: 'en-TT', 0x082E: 'dsb', 0x140A: 'es-CR', + 0x3401: 'ar-KW', 0x0809: 'en-GB', 0x046E: 'lb', 0x1C0A: 'es-DO', + 0x3001: 'ar-LB', 0x0409: 'en', 0x042F: 'mk', 0x300A: 'es-EC', + 0x1001: 'ar-LY', 0x3009: 'en-ZW', 0x083E: 'ms-BN', 0x440A: 'es-SV', + 0x1801: 'ary', 0x0425: 'et', 0x043E: 'ms', 0x100A: 'es-GT', + 0x2001: 'ar-OM', 0x0438: 'fo', 0x044C: 'ml', 0x480A: 'es-HN', + 0x4001: 'ar-QA', 0x0464: 'fil', 0x043A: 'mt', 0x080A: 'es-MX', + 0x0401: 'ar-SA', 0x040B: 'fi', 0x0481: 'mi', 0x4C0A: 'es-NI', + 0x2801: 'ar-SY', 0x080C: 'fr-BE', 0x047A: 'arn', 0x180A: 'es-PA', + 0x1C01: 'aeb', 0x0C0C: 'fr-CA', 0x044E: 'mr', 0x3C0A: 'es-PY', + 0x3801: 'ar-AE', 0x040C: 'fr', 0x047C: 'moh', 0x280A: 'es-PE', + 0x2401: 'ar-YE', 0x140C: 'fr-LU', 0x0450: 'mn', 0x500A: 'es-PR', + 0x042B: 'hy', 0x180C: 'fr-MC', 0x0850: 'mn-CN', 0x0C0A: 'es', + 0x044D: 'as', 0x100C: 'fr-CH', 0x0461: 'ne', 0x040A: 'es', + 0x082C: 'az-Cyrl', 0x0462: 'fy', 0x0414: 'nb', 0x540A: 'es-US', + 0x042C: 'az', 0x0456: 'gl', 0x0814: 'nn', 0x380A: 'es-UY', + 0x046D: 'ba', 0x0437: 'ka', 0x0482: 'oc', 0x200A: 'es-VE', + 0x042D: 'eu', 0x0C07: 'de-AT', 0x0448: 'or', 0x081D: 'sv-FI', + 0x0423: 'be', 0x0407: 'de', 0x0463: 'ps', 0x041D: 'sv', + 0x0845: 'bn', 0x1407: 'de-LI', 0x0415: 'pl', 0x045A: 'syr', + 0x0445: 'bn-IN', 0x1007: 'de-LU', 0x0416: 'pt', 0x0428: 'tg', + 0x201A: 'bs-Cyrl', 0x0807: 'de-CH', 0x0816: 'pt-PT', 0x085F: 'tzm', + 0x141A: 'bs', 0x0408: 'el', 0x0446: 'pa', 0x0449: 'ta', + 0x047E: 'br', 0x046F: 'kl', 0x046B: 'qu-BO', 0x0444: 'tt', + 0x0402: 'bg', 0x0447: 'gu', 0x086B: 'qu-EC', 0x044A: 'te', + 0x0403: 'ca', 0x0468: 'ha', 0x0C6B: 'qu', 0x041E: 'th', + 0x0C04: 'zh-HK', 0x040D: 'he', 0x0418: 'ro', 0x0451: 'bo', + 0x1404: 'zh-MO', 0x0439: 'hi', 0x0417: 'rm', 0x041F: 'tr', + 0x0804: 'zh', 0x040E: 'hu', 0x0419: 'ru', 0x0442: 'tk', + 0x1004: 'zh-SG', 0x040F: 'is', 0x243B: 'smn', 0x0480: 'ug', + 0x0404: 'zh-TW', 0x0470: 'ig', 0x103B: 'smj-NO', 0x0422: 'uk', + 0x0483: 'co', 0x0421: 'id', 0x143B: 'smj', 0x042E: 'hsb', + 0x041A: 'hr', 0x045D: 'iu', 0x0C3B: 'se-FI', 0x0420: 'ur', + 0x101A: 'hr-BA', 0x085D: 'iu-Latn', 0x043B: 'se', 0x0843: 'uz-Cyrl', + 0x0405: 'cs', 0x083C: 'ga', 0x083B: 'se-SE', 0x0443: 'uz', + 0x0406: 'da', 0x0434: 'xh', 0x203B: 'sms', 0x042A: 'vi', + 0x048C: 'prs', 0x0435: 'zu', 0x183B: 'sma-NO', 0x0452: 'cy', + 0x0465: 'dv', 0x0410: 'it', 0x1C3B: 'sms', 0x0488: 'wo', + 0x0813: 'nl-BE', 0x0810: 'it-CH', 0x044F: 'sa', 0x0485: 'sah', + 0x0413: 'nl', 0x0411: 'ja', 0x1C1A: 'sr-Cyrl-BA', 0x0478: 'ii', + 0x0C09: 'en-AU', 0x044B: 'kn', 0x0C1A: 'sr', 0x046A: 'yo', + 0x2809: 'en-BZ', 0x043F: 'kk', 0x181A: 'sr-Latn-BA', + 0x1009: 'en-CA', 0x0453: 'km', 0x081A: 'sr-Latn', + 0x2409: 'en-029', 0x0486: 'quc', 0x046C: 'nso', + } +]; diff --git a/pitfall/pdfkit/node_modules/fontkit/src/glyph/BBox.js b/pitfall/pdfkit/node_modules/fontkit/src/glyph/BBox.js new file mode 100644 index 00000000..7db9cdae --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/glyph/BBox.js @@ -0,0 +1,68 @@ +/** + * Represents a glyph bounding box + */ +export default class BBox { + constructor(minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity) { + /** + * The minimum X position in the bounding box + * @type {number} + */ + this.minX = minX; + + /** + * The minimum Y position in the bounding box + * @type {number} + */ + this.minY = minY; + + /** + * The maxmimum X position in the bounding box + * @type {number} + */ + this.maxX = maxX; + + /** + * The maxmimum Y position in the bounding box + * @type {number} + */ + this.maxY = maxY; + } + + /** + * The width of the bounding box + * @type {number} + */ + get width() { + return this.maxX - this.minX; + } + + /** + * The height of the bounding box + * @type {number} + */ + get height() { + return this.maxY - this.minY; + } + + addPoint(x, y) { + if (x < this.minX) { + this.minX = x; + } + + if (y < this.minY) { + this.minY = y; + } + + if (x > this.maxX) { + this.maxX = x; + } + + if (y > this.maxY) { + this.maxY = y; + } + } + + copy() { + return new BBox(this.minX, this.minY, this.maxX, this.maxY); + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/glyph/CFFGlyph.js b/pitfall/pdfkit/node_modules/fontkit/src/glyph/CFFGlyph.js new file mode 100644 index 00000000..a9eb8a62 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/glyph/CFFGlyph.js @@ -0,0 +1,599 @@ +import Glyph from './Glyph'; +import Path from './Path'; + +/** + * Represents an OpenType PostScript glyph, in the Compact Font Format. + */ +export default class CFFGlyph extends Glyph { + _getName() { + if (this._font.CFF2) { + return super._getName(); + } + + return this._font['CFF '].getGlyphName(this.id); + } + + bias(s) { + if (s.length < 1240) { + return 107; + } else if (s.length < 33900) { + return 1131; + } else { + return 32768; + } + } + + _getPath() { + let { stream } = this._font; + let { pos } = stream; + + let cff = this._font.CFF2 || this._font['CFF ']; + let str = cff.topDict.CharStrings[this.id]; + let end = str.offset + str.length; + stream.pos = str.offset; + + let path = new Path; + let stack = []; + let trans = []; + + let width = null; + let nStems = 0; + let x = 0, y = 0; + let usedGsubrs; + let usedSubrs; + let open = false; + + this._usedGsubrs = usedGsubrs = {}; + this._usedSubrs = usedSubrs = {}; + + let gsubrs = cff.globalSubrIndex || []; + let gsubrsBias = this.bias(gsubrs); + + let privateDict = cff.privateDictForGlyph(this.id); + let subrs = privateDict.Subrs || []; + let subrsBias = this.bias(subrs); + + let vstore = cff.topDict.vstore && cff.topDict.vstore.itemVariationStore; + let vsindex = privateDict.vsindex; + let variationProcessor = this._font._variationProcessor; + + function checkWidth() { + if (width == null) { + width = stack.shift() + privateDict.nominalWidthX; + } + } + + function parseStems() { + if (stack.length % 2 !== 0) { + checkWidth(); + } + + nStems += stack.length >> 1; + return stack.length = 0; + } + + function moveTo(x, y) { + if (open) { + path.closePath(); + } + + path.moveTo(x, y); + open = true; + } + + let parse = function() { + while (stream.pos < end) { + let op = stream.readUInt8(); + if (op < 32) { + switch (op) { + case 1: // hstem + case 3: // vstem + case 18: // hstemhm + case 23: // vstemhm + parseStems(); + break; + + case 4: // vmoveto + if (stack.length > 1) { + checkWidth(); + } + + y += stack.shift(); + moveTo(x, y); + break; + + case 5: // rlineto + while (stack.length >= 2) { + x += stack.shift(); + y += stack.shift(); + path.lineTo(x, y); + } + break; + + case 6: // hlineto + case 7: // vlineto + let phase = op === 6; + while (stack.length >= 1) { + if (phase) { + x += stack.shift(); + } else { + y += stack.shift(); + } + + path.lineTo(x, y); + phase = !phase; + } + break; + + case 8: // rrcurveto + while (stack.length > 0) { + var c1x = x + stack.shift(); + var c1y = y + stack.shift(); + var c2x = c1x + stack.shift(); + var c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y + stack.shift(); + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + } + break; + + case 10: // callsubr + let index = stack.pop() + subrsBias; + let subr = subrs[index]; + if (subr) { + usedSubrs[index] = true; + var p = stream.pos; + var e = end; + stream.pos = subr.offset; + end = subr.offset + subr.length; + parse(); + stream.pos = p; + end = e; + } + break; + + case 11: // return + if (cff.version >= 2) { + break; + } + return; + + case 14: // endchar + if (cff.version >= 2) { + break; + } + + if (stack.length > 0) { + checkWidth(); + } + + if (open) { + path.closePath(); + open = false; + } + break; + + case 15: { // vsindex + if (cff.version < 2) { + throw new Error('vsindex operator not supported in CFF v1'); + } + + vsindex = stack.pop(); + break; + } + + case 16: { // blend + if (cff.version < 2) { + throw new Error('blend operator not supported in CFF v1'); + } + + if (!variationProcessor) { + throw new Error('blend operator in non-variation font'); + } + + let blendVector = variationProcessor.getBlendVector(vstore, vsindex); + let numBlends = stack.pop(); + let numOperands = numBlends * blendVector.length; + let delta = stack.length - numOperands; + let base = delta - numBlends; + + for (let i = 0; i < numBlends; i++) { + let sum = stack[base + i]; + for (let j = 0; j < blendVector.length; j++) { + sum += blendVector[j] * stack[delta++]; + } + + stack[base + i] = sum; + } + + while (numOperands--) { + stack.pop(); + } + + break; + } + + case 19: // hintmask + case 20: // cntrmask + parseStems(); + stream.pos += (nStems + 7) >> 3; + break; + + case 21: // rmoveto + if (stack.length > 2) { + checkWidth(); + } + + x += stack.shift(); + y += stack.shift(); + moveTo(x, y); + break; + + case 22: // hmoveto + if (stack.length > 1) { + checkWidth(); + } + + x += stack.shift(); + moveTo(x, y); + break; + + case 24: // rcurveline + while (stack.length >= 8) { + var c1x = x + stack.shift(); + var c1y = y + stack.shift(); + var c2x = c1x + stack.shift(); + var c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y + stack.shift(); + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + } + + x += stack.shift(); + y += stack.shift(); + path.lineTo(x, y); + break; + + case 25: // rlinecurve + while (stack.length >= 8) { + x += stack.shift(); + y += stack.shift(); + path.lineTo(x, y); + } + + var c1x = x + stack.shift(); + var c1y = y + stack.shift(); + var c2x = c1x + stack.shift(); + var c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y + stack.shift(); + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + break; + + case 26: // vvcurveto + if (stack.length % 2) { + x += stack.shift(); + } + + while (stack.length >= 4) { + c1x = x; + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x; + y = c2y + stack.shift(); + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + } + break; + + case 27: // hhcurveto + if (stack.length % 2) { + y += stack.shift(); + } + + while (stack.length >= 4) { + c1x = x + stack.shift(); + c1y = y; + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y; + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + } + break; + + case 28: // shortint + stack.push(stream.readInt16BE()); + break; + + case 29: // callgsubr + index = stack.pop() + gsubrsBias; + subr = gsubrs[index]; + if (subr) { + usedGsubrs[index] = true; + var p = stream.pos; + var e = end; + stream.pos = subr.offset; + end = subr.offset + subr.length; + parse(); + stream.pos = p; + end = e; + } + break; + + case 30: // vhcurveto + case 31: // hvcurveto + phase = op === 31; + while (stack.length >= 4) { + if (phase) { + c1x = x + stack.shift(); + c1y = y; + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + y = c2y + stack.shift(); + x = c2x + (stack.length === 1 ? stack.shift() : 0); + } else { + c1x = x; + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + x = c2x + stack.shift(); + y = c2y + (stack.length === 1 ? stack.shift() : 0); + } + + path.bezierCurveTo(c1x, c1y, c2x, c2y, x, y); + phase = !phase; + } + break; + + case 12: + op = stream.readUInt8(); + switch (op) { + case 3: // and + let a = stack.pop(); + let b = stack.pop(); + stack.push(a && b ? 1 : 0); + break; + + case 4: // or + a = stack.pop(); + b = stack.pop(); + stack.push(a || b ? 1 : 0); + break; + + case 5: // not + a = stack.pop(); + stack.push(a ? 0 : 1); + break; + + case 9: // abs + a = stack.pop(); + stack.push(Math.abs(a)); + break; + + case 10: // add + a = stack.pop(); + b = stack.pop(); + stack.push(a + b); + break; + + case 11: // sub + a = stack.pop(); + b = stack.pop(); + stack.push(a - b); + break; + + case 12: // div + a = stack.pop(); + b = stack.pop(); + stack.push(a / b); + break; + + case 14: // neg + a = stack.pop(); + stack.push(-a); + break; + + case 15: // eq + a = stack.pop(); + b = stack.pop(); + stack.push(a === b ? 1 : 0); + break; + + case 18: // drop + stack.pop(); + break; + + case 20: // put + let val = stack.pop(); + let idx = stack.pop(); + trans[idx] = val; + break; + + case 21: // get + idx = stack.pop(); + stack.push(trans[idx] || 0); + break; + + case 22: // ifelse + let s1 = stack.pop(); + let s2 = stack.pop(); + let v1 = stack.pop(); + let v2 = stack.pop(); + stack.push(v1 <= v2 ? s1 : s2); + break; + + case 23: // random + stack.push(Math.random()); + break; + + case 24: // mul + a = stack.pop(); + b = stack.pop(); + stack.push(a * b); + break; + + case 26: // sqrt + a = stack.pop(); + stack.push(Math.sqrt(a)); + break; + + case 27: // dup + a = stack.pop(); + stack.push(a, a); + break; + + case 28: // exch + a = stack.pop(); + b = stack.pop(); + stack.push(b, a); + break; + + case 29: // index + idx = stack.pop(); + if (idx < 0) { + idx = 0; + } else if (idx > stack.length - 1) { + idx = stack.length - 1; + } + + stack.push(stack[idx]); + break; + + case 30: // roll + let n = stack.pop(); + let j = stack.pop(); + + if (j >= 0) { + while (j > 0) { + var t = stack[n - 1]; + for (let i = n - 2; i >= 0; i--) { + stack[i + 1] = stack[i]; + } + + stack[0] = t; + j--; + } + } else { + while (j < 0) { + var t = stack[0]; + for (let i = 0; i <= n; i++) { + stack[i] = stack[i + 1]; + } + + stack[n - 1] = t; + j++; + } + } + break; + + case 34: // hflex + c1x = x + stack.shift(); + c1y = y; + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + let c3x = c2x + stack.shift(); + let c3y = c2y; + let c4x = c3x + stack.shift(); + let c4y = c3y; + let c5x = c4x + stack.shift(); + let c5y = c4y; + let c6x = c5x + stack.shift(); + let c6y = c5y; + x = c6x; + y = c6y; + + path.bezierCurveTo(c1x, c1y, c2x, c2y, c3x, c3y); + path.bezierCurveTo(c4x, c4y, c5x, c5y, c6x, c6y); + break; + + case 35: // flex + let pts = []; + + for (let i = 0; i <= 5; i++) { + x += stack.shift(); + y += stack.shift(); + pts.push(x, y); + } + + path.bezierCurveTo(...pts.slice(0, 6)); + path.bezierCurveTo(...pts.slice(6)); + stack.shift(); // fd + break; + + case 36: // hflex1 + c1x = x + stack.shift(); + c1y = y + stack.shift(); + c2x = c1x + stack.shift(); + c2y = c1y + stack.shift(); + c3x = c2x + stack.shift(); + c3y = c2y; + c4x = c3x + stack.shift(); + c4y = c3y; + c5x = c4x + stack.shift(); + c5y = c4y + stack.shift(); + c6x = c5x + stack.shift(); + c6y = c5y; + x = c6x; + y = c6y; + + path.bezierCurveTo(c1x, c1y, c2x, c2y, c3x, c3y); + path.bezierCurveTo(c4x, c4y, c5x, c5y, c6x, c6y); + break; + + case 37: // flex1 + let startx = x; + let starty = y; + + pts = []; + for (let i = 0; i <= 4; i++) { + x += stack.shift(); + y += stack.shift(); + pts.push(x, y); + } + + if (Math.abs(x - startx) > Math.abs(y - starty)) { // horizontal + x += stack.shift(); + y = starty; + } else { + x = startx; + y += stack.shift(); + } + + pts.push(x, y); + path.bezierCurveTo(...pts.slice(0, 6)); + path.bezierCurveTo(...pts.slice(6)); + break; + + default: + throw new Error(`Unknown op: 12 ${op}`); + } + break; + + default: + throw new Error(`Unknown op: ${op}`); + } + + } else if (op < 247) { + stack.push(op - 139); + } else if (op < 251) { + var b1 = stream.readUInt8(); + stack.push((op - 247) * 256 + b1 + 108); + } else if (op < 255) { + var b1 = stream.readUInt8(); + stack.push(-(op - 251) * 256 - b1 - 108); + } else { + stack.push(stream.readInt32BE() / 65536); + } + } + }; + + parse(); + + if (open) { + path.closePath(); + } + + return path; + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/glyph/COLRGlyph.js b/pitfall/pdfkit/node_modules/fontkit/src/glyph/COLRGlyph.js new file mode 100644 index 00000000..75dcf493 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/glyph/COLRGlyph.js @@ -0,0 +1,88 @@ +import Glyph from './Glyph'; +import BBox from './BBox'; + +class COLRLayer { + constructor(glyph, color) { + this.glyph = glyph; + this.color = color; + } +} + +/** + * Represents a color (e.g. emoji) glyph in Microsoft's COLR format. + * Each glyph in this format contain a list of colored layers, each + * of which is another vector glyph. + */ +export default class COLRGlyph extends Glyph { + _getBBox() { + let bbox = new BBox; + for (let i = 0; i < this.layers.length; i++) { + let layer = this.layers[i]; + let b = layer.glyph.bbox; + bbox.addPoint(b.minX, b.minY); + bbox.addPoint(b.maxX, b.maxY); + } + + return bbox; + } + + /** + * Returns an array of objects containing the glyph and color for + * each layer in the composite color glyph. + * @type {object[]} + */ + get layers() { + let cpal = this._font.CPAL; + let colr = this._font.COLR; + let low = 0; + let high = colr.baseGlyphRecord.length - 1; + + while (low <= high) { + let mid = (low + high) >> 1; + var rec = colr.baseGlyphRecord[mid]; + + if (this.id < rec.gid) { + high = mid - 1; + } else if (this.id > rec.gid) { + low = mid + 1; + } else { + var baseLayer = rec; + break; + } + } + + // if base glyph not found in COLR table, + // default to normal glyph from glyf or CFF + if (baseLayer == null) { + var g = this._font._getBaseGlyph(this.id); + var color = { + red: 0, + green: 0, + blue: 0, + alpha: 255 + }; + + return [new COLRLayer(g, color)]; + } + + // otherwise, return an array of all the layers + let layers = []; + for (let i = baseLayer.firstLayerIndex; i < baseLayer.firstLayerIndex + baseLayer.numLayers; i++) { + var rec = colr.layerRecords[i]; + var color = cpal.colorRecords[rec.paletteIndex]; + var g = this._font._getBaseGlyph(rec.gid); + layers.push(new COLRLayer(g, color)); + } + + return layers; + } + + render(ctx, size) { + for (let {glyph, color} of this.layers) { + ctx.fillColor([color.red, color.green, color.blue], color.alpha / 255 * 100); + glyph.render(ctx, size); + } + + return; + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/glyph/Glyph.js b/pitfall/pdfkit/node_modules/fontkit/src/glyph/Glyph.js new file mode 100644 index 00000000..83432686 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/glyph/Glyph.js @@ -0,0 +1,212 @@ +import { cache } from '../decorators'; +import Path from './Path'; +import unicode from 'unicode-properties'; +import StandardNames from './StandardNames'; + +/** + * Glyph objects represent a glyph in the font. They have various properties for accessing metrics and + * the actual vector path the glyph represents, and methods for rendering the glyph to a graphics context. + * + * You do not create glyph objects directly. They are created by various methods on the font object. + * There are several subclasses of the base Glyph class internally that may be returned depending + * on the font format, but they all inherit from this class. + */ +export default class Glyph { + constructor(id, codePoints, font) { + /** + * The glyph id in the font + * @type {number} + */ + this.id = id; + + /** + * An array of unicode code points that are represented by this glyph. + * There can be multiple code points in the case of ligatures and other glyphs + * that represent multiple visual characters. + * @type {number[]} + */ + this.codePoints = codePoints; + this._font = font; + + // TODO: get this info from GDEF if available + this.isMark = this.codePoints.every(unicode.isMark); + this.isLigature = this.codePoints.length > 1; + } + + _getPath() { + return new Path(); + } + + _getCBox() { + return this.path.cbox; + } + + _getBBox() { + return this.path.bbox; + } + + _getTableMetrics(table) { + if (this.id < table.metrics.length) { + return table.metrics.get(this.id); + } + + let metric = table.metrics.get(table.metrics.length - 1); + let res = { + advance: metric ? metric.advance : 0, + bearing: table.bearings.get(this.id - table.metrics.length) || 0 + }; + + return res; + } + + _getMetrics(cbox) { + if (this._metrics) { return this._metrics; } + + let {advance:advanceWidth, bearing:leftBearing} = this._getTableMetrics(this._font.hmtx); + + // For vertical metrics, use vmtx if available, or fall back to global data from OS/2 or hhea + if (this._font.vmtx) { + var {advance:advanceHeight, bearing:topBearing} = this._getTableMetrics(this._font.vmtx); + + } else { + let os2; + if (typeof cbox === 'undefined' || cbox === null) { ({ cbox } = this); } + + if ((os2 = this._font['OS/2']) && os2.version > 0) { + var advanceHeight = Math.abs(os2.typoAscender - os2.typoDescender); + var topBearing = os2.typoAscender - cbox.maxY; + + } else { + let { hhea } = this._font; + var advanceHeight = Math.abs(hhea.ascent - hhea.descent); + var topBearing = hhea.ascent - cbox.maxY; + } + } + + if (this._font._variationProcessor && this._font.HVAR) { + advanceWidth += this._font._variationProcessor.getAdvanceAdjustment(this.id, this._font.HVAR); + } + + return this._metrics = { advanceWidth, advanceHeight, leftBearing, topBearing }; + } + + /** + * The glyph’s control box. + * This is often the same as the bounding box, but is faster to compute. + * Because of the way bezier curves are defined, some of the control points + * can be outside of the bounding box. Where `bbox` takes this into account, + * `cbox` does not. Thus, cbox is less accurate, but faster to compute. + * See [here](http://www.freetype.org/freetype2/docs/glyphs/glyphs-6.html#section-2) + * for a more detailed description. + * + * @type {BBox} + */ + @cache + get cbox() { + return this._getCBox(); + } + + /** + * The glyph’s bounding box, i.e. the rectangle that encloses the + * glyph outline as tightly as possible. + * @type {BBox} + */ + @cache + get bbox() { + return this._getBBox(); + } + + /** + * A vector Path object representing the glyph outline. + * @type {Path} + */ + @cache + get path() { + // Cache the path so we only decode it once + // Decoding is actually performed by subclasses + return this._getPath(); + } + + /** + * Returns a path scaled to the given font size. + * @param {number} size + * @return {Path} + */ + getScaledPath(size) { + let scale = 1 / this._font.unitsPerEm * size; + return this.path.scale(scale); + } + + /** + * The glyph's advance width. + * @type {number} + */ + @cache + get advanceWidth() { + return this._getMetrics().advanceWidth; + } + + /** + * The glyph's advance height. + * @type {number} + */ + @cache + get advanceHeight() { + return this._getMetrics().advanceHeight; + } + + get ligatureCaretPositions() {} + + _getName() { + let { post } = this._font; + if (!post) { + return null; + } + + switch (post.version) { + case 1: + return StandardNames[this.id]; + + case 2: + let id = post.glyphNameIndex[this.id]; + if (id < StandardNames.length) { + return StandardNames[id]; + } + + return post.names[id - StandardNames.length]; + + case 2.5: + return StandardNames[this.id + post.offsets[this.id]]; + + case 4: + return String.fromCharCode(post.map[this.id]); + } + } + + /** + * The glyph's name + * @type {string} + */ + @cache + get name() { + return this._getName(); + } + + /** + * Renders the glyph to the given graphics context, at the specified font size. + * @param {CanvasRenderingContext2d} ctx + * @param {number} size + */ + render(ctx, size) { + ctx.save(); + + let scale = 1 / this._font.head.unitsPerEm * size; + ctx.scale(scale, scale); + + let fn = this.path.toFunction(); + fn(ctx); + ctx.fill(); + + ctx.restore(); + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/glyph/GlyphVariationProcessor.js b/pitfall/pdfkit/node_modules/fontkit/src/glyph/GlyphVariationProcessor.js new file mode 100644 index 00000000..968fbd15 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/glyph/GlyphVariationProcessor.js @@ -0,0 +1,478 @@ +const TUPLES_SHARE_POINT_NUMBERS = 0x8000; +const TUPLE_COUNT_MASK = 0x0fff; +const EMBEDDED_TUPLE_COORD = 0x8000; +const INTERMEDIATE_TUPLE = 0x4000; +const PRIVATE_POINT_NUMBERS = 0x2000; +const TUPLE_INDEX_MASK = 0x0fff; +const POINTS_ARE_WORDS = 0x80; +const POINT_RUN_COUNT_MASK = 0x7f; +const DELTAS_ARE_ZERO = 0x80; +const DELTAS_ARE_WORDS = 0x40; +const DELTA_RUN_COUNT_MASK = 0x3f; + +/** + * This class is transforms TrueType glyphs according to the data from + * the Apple Advanced Typography variation tables (fvar, gvar, and avar). + * These tables allow infinite adjustments to glyph weight, width, slant, + * and optical size without the designer needing to specify every exact style. + * + * Apple's documentation for these tables is not great, so thanks to the + * Freetype project for figuring much of this out. + * + * @private + */ +export default class GlyphVariationProcessor { + constructor(font, coords) { + this.font = font; + this.normalizedCoords = this.normalizeCoords(coords); + this.blendVectors = new Map; + } + + normalizeCoords(coords) { + // the default mapping is linear along each axis, in two segments: + // from the minValue to defaultValue, and from defaultValue to maxValue. + let normalized = []; + for (var i = 0; i < this.font.fvar.axis.length; i++) { + let axis = this.font.fvar.axis[i]; + if (coords[i] < axis.defaultValue) { + normalized.push((coords[i] - axis.defaultValue + Number.EPSILON) / (axis.defaultValue - axis.minValue + Number.EPSILON)); + } else { + normalized.push((coords[i] - axis.defaultValue + Number.EPSILON) / (axis.maxValue - axis.defaultValue + Number.EPSILON)); + } + } + + // if there is an avar table, the normalized value is calculated + // by interpolating between the two nearest mapped values. + if (this.font.avar) { + for (var i = 0; i < this.font.avar.segment.length; i++) { + let segment = this.font.avar.segment[i]; + for (let j = 0; j < segment.correspondence.length; j++) { + let pair = segment.correspondence[j]; + if (j >= 1 && normalized[i] < pair.fromCoord) { + let prev = segment.correspondence[j - 1]; + normalized[i] = ((normalized[i] - prev.fromCoord) * (pair.toCoord - prev.toCoord) + Number.EPSILON) / + (pair.fromCoord - prev.fromCoord + Number.EPSILON) + + prev.toCoord; + + break; + } + } + } + } + + return normalized; + } + + transformPoints(gid, glyphPoints) { + if (!this.font.fvar || !this.font.gvar) { return; } + + let { gvar } = this.font; + if (gid >= gvar.glyphCount) { return; } + + let offset = gvar.offsets[gid]; + if (offset === gvar.offsets[gid + 1]) { return; } + + // Read the gvar data for this glyph + let { stream } = this.font; + stream.pos = offset; + if (stream.pos >= stream.length) { + return; + } + + let tupleCount = stream.readUInt16BE(); + let offsetToData = offset + stream.readUInt16BE(); + + if (tupleCount & TUPLES_SHARE_POINT_NUMBERS) { + var here = stream.pos; + stream.pos = offsetToData; + var sharedPoints = this.decodePoints(); + offsetToData = stream.pos; + stream.pos = here; + } + + let origPoints = glyphPoints.map(pt => pt.copy()); + + tupleCount &= TUPLE_COUNT_MASK; + for (let i = 0; i < tupleCount; i++) { + let tupleDataSize = stream.readUInt16BE(); + let tupleIndex = stream.readUInt16BE(); + + if (tupleIndex & EMBEDDED_TUPLE_COORD) { + var tupleCoords = []; + for (let a = 0; a < gvar.axisCount; a++) { + tupleCoords.push(stream.readInt16BE() / 16384); + } + + } else { + if ((tupleIndex & TUPLE_INDEX_MASK) >= gvar.globalCoordCount) { + throw new Error('Invalid gvar table'); + } + + var tupleCoords = gvar.globalCoords[tupleIndex & TUPLE_INDEX_MASK]; + } + + if (tupleIndex & INTERMEDIATE_TUPLE) { + var startCoords = []; + for (let a = 0; a < gvar.axisCount; a++) { + startCoords.push(stream.readInt16BE() / 16384); + } + + var endCoords = []; + for (let a = 0; a < gvar.axisCount; a++) { + endCoords.push(stream.readInt16BE() / 16384); + } + } + + // Get the factor at which to apply this tuple + let factor = this.tupleFactor(tupleIndex, tupleCoords, startCoords, endCoords); + if (factor === 0) { + offsetToData += tupleDataSize; + continue; + } + + var here = stream.pos; + stream.pos = offsetToData; + + if (tupleIndex & PRIVATE_POINT_NUMBERS) { + var points = this.decodePoints(); + } else { + var points = sharedPoints; + } + + // points.length = 0 means there are deltas for all points + let nPoints = points.length === 0 ? glyphPoints.length : points.length; + let xDeltas = this.decodeDeltas(nPoints); + let yDeltas = this.decodeDeltas(nPoints); + + if (points.length === 0) { // all points + for (let i = 0; i < glyphPoints.length; i++) { + var point = glyphPoints[i]; + point.x += Math.round(xDeltas[i] * factor); + point.y += Math.round(yDeltas[i] * factor); + } + } else { + let outPoints = origPoints.map(pt => pt.copy()); + let hasDelta = glyphPoints.map(() => false); + + for (let i = 0; i < points.length; i++) { + let idx = points[i]; + if (idx < glyphPoints.length) { + let point = outPoints[idx]; + hasDelta[idx] = true; + + point.x += Math.round(xDeltas[i] * factor); + point.y += Math.round(yDeltas[i] * factor); + } + } + + this.interpolateMissingDeltas(outPoints, origPoints, hasDelta); + + for (let i = 0; i < glyphPoints.length; i++) { + let deltaX = outPoints[i].x - origPoints[i].x; + let deltaY = outPoints[i].y - origPoints[i].y; + + glyphPoints[i].x += deltaX; + glyphPoints[i].y += deltaY; + } + } + + offsetToData += tupleDataSize; + stream.pos = here; + } + } + + decodePoints() { + let stream = this.font.stream; + let count = stream.readUInt8(); + + if (count & POINTS_ARE_WORDS) { + count = (count & POINT_RUN_COUNT_MASK) << 8 | stream.readUInt8(); + } + + let points = new Uint16Array(count); + let i = 0; + let point = 0; + while (i < count) { + let run = stream.readUInt8(); + let runCount = (run & POINT_RUN_COUNT_MASK) + 1; + let fn = run & POINTS_ARE_WORDS ? stream.readUInt16 : stream.readUInt8; + + for (let j = 0; j < runCount && i < count; j++) { + point += fn.call(stream); + points[i++] = point; + } + } + + return points; + } + + decodeDeltas(count) { + let stream = this.font.stream; + let i = 0; + let deltas = new Int16Array(count); + + while (i < count) { + let run = stream.readUInt8(); + let runCount = (run & DELTA_RUN_COUNT_MASK) + 1; + + if (run & DELTAS_ARE_ZERO) { + i += runCount; + + } else { + let fn = run & DELTAS_ARE_WORDS ? stream.readInt16BE : stream.readInt8; + for (let j = 0; j < runCount && i < count; j++) { + deltas[i++] = fn.call(stream); + } + } + } + + return deltas; + } + + tupleFactor(tupleIndex, tupleCoords, startCoords, endCoords) { + let normalized = this.normalizedCoords; + let { gvar } = this.font; + let factor = 1; + + for (let i = 0; i < gvar.axisCount; i++) { + if (tupleCoords[i] === 0) { + continue; + } + + if (normalized[i] === 0) { + return 0; + } + + if ((tupleIndex & INTERMEDIATE_TUPLE) === 0) { + if ((normalized[i] < Math.min(0, tupleCoords[i])) || + (normalized[i] > Math.max(0, tupleCoords[i]))) { + return 0; + } + + factor = (factor * normalized[i] + Number.EPSILON) / (tupleCoords[i] + Number.EPSILON); + } else { + if ((normalized[i] < startCoords[i]) || + (normalized[i] > endCoords[i])) { + return 0; + + } else if (normalized[i] < tupleCoords[i]) { + factor = factor * (normalized[i] - startCoords[i] + Number.EPSILON) / (tupleCoords[i] - startCoords[i] + Number.EPSILON); + + } else { + factor = factor * (endCoords[i] - normalized[i] + Number.EPSILON) / (endCoords[i] - tupleCoords[i] + Number.EPSILON); + } + } + } + + return factor; + } + + // Interpolates points without delta values. + // Needed for the Ø and Q glyphs in Skia. + // Algorithm from Freetype. + interpolateMissingDeltas(points, inPoints, hasDelta) { + if (points.length === 0) { + return; + } + + let point = 0; + while (point < points.length) { + let firstPoint = point; + + // find the end point of the contour + let endPoint = point; + let pt = points[endPoint]; + while (!pt.endContour) { + pt = points[++endPoint]; + } + + // find the first point that has a delta + while (point <= endPoint && !hasDelta[point]) { + point++; + } + + if (point > endPoint) { + continue; + } + + let firstDelta = point; + let curDelta = point; + point++; + + while (point <= endPoint) { + // find the next point with a delta, and interpolate intermediate points + if (hasDelta[point]) { + this.deltaInterpolate(curDelta + 1, point - 1, curDelta, point, inPoints, points); + curDelta = point; + } + + point++; + } + + // shift contour if we only have a single delta + if (curDelta === firstDelta) { + this.deltaShift(firstPoint, endPoint, curDelta, inPoints, points); + } else { + // otherwise, handle the remaining points at the end and beginning of the contour + this.deltaInterpolate(curDelta + 1, endPoint, curDelta, firstDelta, inPoints, points); + + if (firstDelta > 0) { + this.deltaInterpolate(firstPoint, firstDelta - 1, curDelta, firstDelta, inPoints, points); + } + } + + point = endPoint + 1; + } + } + + deltaInterpolate(p1, p2, ref1, ref2, inPoints, outPoints) { + if (p1 > p2) { + return; + } + + let iterable = ['x', 'y']; + for (let i = 0; i < iterable.length; i++) { + let k = iterable[i]; + if (inPoints[ref1][k] > inPoints[ref2][k]) { + var p = ref1; + ref1 = ref2; + ref2 = p; + } + + let in1 = inPoints[ref1][k]; + let in2 = inPoints[ref2][k]; + let out1 = outPoints[ref1][k]; + let out2 = outPoints[ref2][k]; + + // If the reference points have the same coordinate but different + // delta, inferred delta is zero. Otherwise interpolate. + if (in1 !== in2 || out1 === out2) { + let scale = in1 === in2 ? 0 : (out2 - out1) / (in2 - in1); + + for (let p = p1; p <= p2; p++) { + let out = inPoints[p][k]; + + if (out <= in1) { + out += out1 - in1; + } else if (out >= in2) { + out += out2 - in2; + } else { + out = out1 + (out - in1) * scale; + } + + outPoints[p][k] = out; + } + } + } + } + + deltaShift(p1, p2, ref, inPoints, outPoints) { + let deltaX = outPoints[ref].x - inPoints[ref].x; + let deltaY = outPoints[ref].y - inPoints[ref].y; + + if (deltaX === 0 && deltaY === 0) { + return; + } + + for (let p = p1; p <= p2; p++) { + if (p !== ref) { + outPoints[p].x += deltaX; + outPoints[p].y += deltaY; + } + } + } + + getAdvanceAdjustment(gid, table) { + let outerIndex, innerIndex; + + if (table.advanceWidthMapping) { + let idx = gid; + if (idx >= table.advanceWidthMapping.mapCount) { + idx = table.advanceWidthMapping.mapCount - 1; + } + + let entryFormat = table.advanceWidthMapping.entryFormat; + ({outerIndex, innerIndex} = table.advanceWidthMapping.mapData[idx]); + } else { + outerIndex = 0; + innerIndex = gid; + } + + return this.getMetricDelta(table.itemVariationStore, outerIndex, innerIndex); + } + + // See pseudo code from `Font Variations Overview' + // in the OpenType specification. + getMetricDelta(itemStore, outerIndex, innerIndex) { + let varData = itemStore.itemVariationData[outerIndex]; + let deltaSet = varData.deltaSets[innerIndex]; + let blendVector = this.getBlendVector(itemStore, outerIndex); + let netAdjustment = 0; + + for (let master = 0; master < varData.regionIndexCount; master++) { + netAdjustment += deltaSet.deltas[master] * blendVector[master]; + } + + return netAdjustment; + } + + getBlendVector(itemStore, outerIndex) { + let varData = itemStore.itemVariationData[outerIndex]; + if (this.blendVectors.has(varData)) { + return this.blendVectors.get(varData); + } + + let normalizedCoords = this.normalizedCoords; + let blendVector = []; + + // outer loop steps through master designs to be blended + for (let master = 0; master < varData.regionIndexCount; master++) { + let scalar = 1; + let regionIndex = varData.regionIndexes[master]; + let axes = itemStore.variationRegionList.variationRegions[regionIndex]; + + // inner loop steps through axes in this region + for (let j = 0; j < axes.length; j++) { + let axis = axes[j]; + let axisScalar; + + // compute the scalar contribution of this axis + // ignore invalid ranges + if (axis.startCoord > axis.peakCoord || axis.peakCoord > axis.endCoord) { + axisScalar = 1; + + } else if (axis.startCoord < 0 && axis.endCoord > 0 && axis.peakCoord !== 0) { + axisScalar = 1; + + // peak of 0 means ignore this axis + } else if (axis.peakCoord === 0) { + axisScalar = 1; + + // ignore this region if coords are out of range + } else if (normalizedCoords[j] < axis.startCoord || normalizedCoords[j] > axis.endCoord) { + axisScalar = 0; + + // calculate a proportional factor + } else { + if (normalizedCoords[j] === axis.peakCoord) { + axisScalar = 1; + } else if (normalizedCoords[j] < axis.peakCoord) { + axisScalar = (normalizedCoords[j] - axis.startCoord + Number.EPSILON) / + (axis.peakCoord - axis.startCoord + Number.EPSILON); + } else { + axisScalar = (axis.endCoord - normalizedCoords[j] + Number.EPSILON) / + (axis.endCoord - axis.peakCoord + Number.EPSILON); + } + } + + // take product of all the axis scalars + scalar *= axisScalar; + } + + blendVector[master] = scalar; + } + + this.blendVectors.set(varData, blendVector); + return blendVector; + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/glyph/Path.js b/pitfall/pdfkit/node_modules/fontkit/src/glyph/Path.js new file mode 100644 index 00000000..ae9b35c6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/glyph/Path.js @@ -0,0 +1,241 @@ +import BBox from './BBox'; + +const SVG_COMMANDS = { + moveTo: 'M', + lineTo: 'L', + quadraticCurveTo: 'Q', + bezierCurveTo: 'C', + closePath: 'Z' +}; + +/** + * Path objects are returned by glyphs and represent the actual + * vector outlines for each glyph in the font. Paths can be converted + * to SVG path data strings, or to functions that can be applied to + * render the path to a graphics context. + */ +export default class Path { + constructor() { + this.commands = []; + this._bbox = null; + this._cbox = null; + } + + /** + * Compiles the path to a JavaScript function that can be applied with + * a graphics context in order to render the path. + * @return {string} + */ + toFunction() { + let cmds = this.commands.map(c => ` ctx.${c.command}(${c.args.join(', ')});`); + return new Function('ctx', cmds.join('\n')); + } + + /** + * Converts the path to an SVG path data string + * @return {string} + */ + toSVG() { + let cmds = this.commands.map(c => { + let args = c.args.map(arg => Math.round(arg * 100) / 100); + return `${SVG_COMMANDS[c.command]}${args.join(' ')}`; + }); + + return cmds.join(''); + } + + /** + * Gets the "control box" of a path. + * This is like the bounding box, but it includes all points including + * control points of bezier segments and is much faster to compute than + * the real bounding box. + * @type {BBox} + */ + get cbox() { + if (!this._cbox) { + let cbox = new BBox; + for (let command of this.commands) { + for (let i = 0; i < command.args.length; i += 2) { + cbox.addPoint(command.args[i], command.args[i + 1]); + } + } + + this._cbox = Object.freeze(cbox); + } + + return this._cbox; + } + + /** + * Gets the exact bounding box of the path by evaluating curve segments. + * Slower to compute than the control box, but more accurate. + * @type {BBox} + */ + get bbox() { + if (this._bbox) { + return this._bbox; + } + + let bbox = new BBox; + let cx = 0, cy = 0; + + let f = t => ( + Math.pow(1 - t, 3) * p0[i] + + 3 * Math.pow(1 - t, 2) * t * p1[i] + + 3 * (1 - t) * Math.pow(t, 2) * p2[i] + + Math.pow(t, 3) * p3[i] + ); + + for (let c of this.commands) { + switch (c.command) { + case 'moveTo': + case 'lineTo': + let [x, y] = c.args; + bbox.addPoint(x, y); + cx = x; + cy = y; + break; + + case 'quadraticCurveTo': + case 'bezierCurveTo': + if (c.command === 'quadraticCurveTo') { + // http://fontforge.org/bezier.html + var [qp1x, qp1y, p3x, p3y] = c.args; + var cp1x = cx + 2 / 3 * (qp1x - cx); // CP1 = QP0 + 2/3 * (QP1-QP0) + var cp1y = cy + 2 / 3 * (qp1y - cy); + var cp2x = p3x + 2 / 3 * (qp1x - p3x); // CP2 = QP2 + 2/3 * (QP1-QP2) + var cp2y = p3y + 2 / 3 * (qp1y - p3y); + } else { + var [cp1x, cp1y, cp2x, cp2y, p3x, p3y] = c.args; + } + + // http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html + bbox.addPoint(p3x, p3y); + + var p0 = [cx, cy]; + var p1 = [cp1x, cp1y]; + var p2 = [cp2x, cp2y]; + var p3 = [p3x, p3y]; + + for (var i = 0; i <= 1; i++) { + let b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i]; + let a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i]; + c = 3 * p1[i] - 3 * p0[i]; + + if (a === 0) { + if (b === 0) { + continue; + } + + let t = -c / b; + if (0 < t && t < 1) { + if (i === 0) { + bbox.addPoint(f(t), bbox.maxY); + } else if (i === 1) { + bbox.addPoint(bbox.maxX, f(t)); + } + } + + continue; + } + + let b2ac = Math.pow(b, 2) - 4 * c * a; + if (b2ac < 0) { + continue; + } + + let t1 = (-b + Math.sqrt(b2ac)) / (2 * a); + if (0 < t1 && t1 < 1) { + if (i === 0) { + bbox.addPoint(f(t1), bbox.maxY); + } else if (i === 1) { + bbox.addPoint(bbox.maxX, f(t1)); + } + } + + let t2 = (-b - Math.sqrt(b2ac)) / (2 * a); + if (0 < t2 && t2 < 1) { + if (i === 0) { + bbox.addPoint(f(t2), bbox.maxY); + } else if (i === 1) { + bbox.addPoint(bbox.maxX, f(t2)); + } + } + } + + cx = p3x; + cy = p3y; + break; + } + } + + return this._bbox = Object.freeze(bbox); + } + + /** + * Applies a mapping function to each point in the path. + * @param {function} fn + * @return {Path} + */ + mapPoints(fn) { + let path = new Path; + + for (let c of this.commands) { + let args = []; + for (let i = 0; i < c.args.length; i += 2) { + let [x, y] = fn(c.args[i], c.args[i + 1]); + args.push(x, y); + } + + path[c.command](...args); + } + + return path; + } + + /** + * Transforms the path by the given matrix. + */ + transform(m0, m1, m2, m3, m4, m5) { + return this.mapPoints((x, y) => { + x = m0 * x + m2 * y + m4; + y = m1 * x + m3 * y + m5; + return [x, y]; + }); + } + + /** + * Translates the path by the given offset. + */ + translate(x, y) { + return this.transform(1, 0, 0, 1, x, y); + } + + /** + * Rotates the path by the given angle (in radians). + */ + rotate(angle) { + let cos = Math.cos(angle); + let sin = Math.sin(angle); + return this.transform(cos, sin, -sin, cos, 0, 0); + } + + /** + * Scales the path. + */ + scale(scaleX, scaleY = scaleX) { + return this.transform(scaleX, 0, 0, scaleY, 0, 0); + } +} + +for (let command of ['moveTo', 'lineTo', 'quadraticCurveTo', 'bezierCurveTo', 'closePath']) { + Path.prototype[command] = function(...args) { + this._bbox = this._cbox = null; + this.commands.push({ + command, + args + }); + + return this; + }; +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/glyph/SBIXGlyph.js b/pitfall/pdfkit/node_modules/fontkit/src/glyph/SBIXGlyph.js new file mode 100644 index 00000000..68f479f5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/glyph/SBIXGlyph.js @@ -0,0 +1,52 @@ +import TTFGlyph from './TTFGlyph'; +import r from 'restructure'; + +let SBIXImage = new r.Struct({ + originX: r.uint16, + originY: r.uint16, + type: new r.String(4), + data: new r.Buffer(t => t.parent.buflen - t._currentOffset) +}); + +/** + * Represents a color (e.g. emoji) glyph in Apple's SBIX format. + */ +export default class SBIXGlyph extends TTFGlyph { + /** + * Returns an object representing a glyph image at the given point size. + * The object has a data property with a Buffer containing the actual image data, + * along with the image type, and origin. + * + * @param {number} size + * @return {object} + */ + getImageForSize(size) { + for (let i = 0; i < this._font.sbix.imageTables.length; i++) { + var table = this._font.sbix.imageTables[i]; + if (table.ppem >= size) { break; } + } + + let offsets = table.imageOffsets; + let start = offsets[this.id]; + let end = offsets[this.id + 1]; + + if (start === end) { + return null; + } + + this._font.stream.pos = start; + return SBIXImage.decode(this._font.stream, {buflen: end - start}); + } + + render(ctx, size) { + let img = this.getImageForSize(size); + if (img != null) { + let scale = size / this._font.unitsPerEm; + ctx.image(img.data, {height: size, x: img.originX, y: (this.bbox.minY - img.originY) * scale}); + } + + if (this._font.sbix.flags.renderOutlines) { + super.render(ctx, size); + } + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/glyph/StandardNames.js b/pitfall/pdfkit/node_modules/fontkit/src/glyph/StandardNames.js new file mode 100644 index 00000000..7c024a1f --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/glyph/StandardNames.js @@ -0,0 +1,27 @@ +export default [ + '.notdef', '.null', 'nonmarkingreturn', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent', + 'ampersand', 'quotesingle', 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', + 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', + 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', + 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', + 'asciicircum', 'underscore', 'grave', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', + 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', + 'Adieresis', 'Aring', 'Ccedilla', 'Eacute', 'Ntilde', 'Odieresis', 'Udieresis', 'aacute', 'agrave', + 'acircumflex', 'adieresis', 'atilde', 'aring', 'ccedilla', 'eacute', 'egrave', 'ecircumflex', 'edieresis', + 'iacute', 'igrave', 'icircumflex', 'idieresis', 'ntilde', 'oacute', 'ograve', 'ocircumflex', 'odieresis', + 'otilde', 'uacute', 'ugrave', 'ucircumflex', 'udieresis', 'dagger', 'degree', 'cent', 'sterling', 'section', + 'bullet', 'paragraph', 'germandbls', 'registered', 'copyright', 'trademark', 'acute', 'dieresis', 'notequal', + 'AE', 'Oslash', 'infinity', 'plusminus', 'lessequal', 'greaterequal', 'yen', 'mu', 'partialdiff', 'summation', + 'product', 'pi', 'integral', 'ordfeminine', 'ordmasculine', 'Omega', 'ae', 'oslash', 'questiondown', + 'exclamdown', 'logicalnot', 'radical', 'florin', 'approxequal', 'Delta', 'guillemotleft', 'guillemotright', + 'ellipsis', 'nonbreakingspace', 'Agrave', 'Atilde', 'Otilde', 'OE', 'oe', 'endash', 'emdash', 'quotedblleft', + 'quotedblright', 'quoteleft', 'quoteright', 'divide', 'lozenge', 'ydieresis', 'Ydieresis', 'fraction', + 'currency', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', 'daggerdbl', 'periodcentered', 'quotesinglbase', + 'quotedblbase', 'perthousand', 'Acircumflex', 'Ecircumflex', 'Aacute', 'Edieresis', 'Egrave', 'Iacute', + 'Icircumflex', 'Idieresis', 'Igrave', 'Oacute', 'Ocircumflex', 'apple', 'Ograve', 'Uacute', 'Ucircumflex', + 'Ugrave', 'dotlessi', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent', 'ring', 'cedilla', 'hungarumlaut', + 'ogonek', 'caron', 'Lslash', 'lslash', 'Scaron', 'scaron', 'Zcaron', 'zcaron', 'brokenbar', 'Eth', 'eth', + 'Yacute', 'yacute', 'Thorn', 'thorn', 'minus', 'multiply', 'onesuperior', 'twosuperior', 'threesuperior', + 'onehalf', 'onequarter', 'threequarters', 'franc', 'Gbreve', 'gbreve', 'Idotaccent', 'Scedilla', 'scedilla', + 'Cacute', 'cacute', 'Ccaron', 'ccaron', 'dcroat' +]; diff --git a/pitfall/pdfkit/node_modules/fontkit/src/glyph/TTFGlyph.js b/pitfall/pdfkit/node_modules/fontkit/src/glyph/TTFGlyph.js new file mode 100644 index 00000000..27fc7c5d --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/glyph/TTFGlyph.js @@ -0,0 +1,383 @@ +import Glyph from './Glyph'; +import Path from './Path'; +import BBox from './BBox'; +import r from 'restructure'; + +// The header for both simple and composite glyphs +let GlyfHeader = new r.Struct({ + numberOfContours: r.int16, // if negative, this is a composite glyph + xMin: r.int16, + yMin: r.int16, + xMax: r.int16, + yMax: r.int16 +}); + +// Flags for simple glyphs +const ON_CURVE = 1 << 0; +const X_SHORT_VECTOR = 1 << 1; +const Y_SHORT_VECTOR = 1 << 2; +const REPEAT = 1 << 3; +const SAME_X = 1 << 4; +const SAME_Y = 1 << 5; + +// Flags for composite glyphs +const ARG_1_AND_2_ARE_WORDS = 1 << 0; +const ARGS_ARE_XY_VALUES = 1 << 1; +const ROUND_XY_TO_GRID = 1 << 2; +const WE_HAVE_A_SCALE = 1 << 3; +const MORE_COMPONENTS = 1 << 5; +const WE_HAVE_AN_X_AND_Y_SCALE = 1 << 6; +const WE_HAVE_A_TWO_BY_TWO = 1 << 7; +const WE_HAVE_INSTRUCTIONS = 1 << 8; +const USE_MY_METRICS = 1 << 9; +const OVERLAP_COMPOUND = 1 << 10; +const SCALED_COMPONENT_OFFSET = 1 << 11; +const UNSCALED_COMPONENT_OFFSET = 1 << 12; + +// Represents a point in a simple glyph +export class Point { + constructor(onCurve, endContour, x = 0, y = 0) { + this.onCurve = onCurve; + this.endContour = endContour; + this.x = x; + this.y = y; + } + + copy() { + return new Point(this.onCurve, this.endContour, this.x, this.y); + } +} + +// Represents a component in a composite glyph +class Component { + constructor(glyphID, dx, dy) { + this.glyphID = glyphID; + this.dx = dx; + this.dy = dy; + this.pos = 0; + this.scaleX = this.scaleY = 1; + this.scale01 = this.scale10 = 0; + } +} + +/** + * Represents a TrueType glyph. + */ +export default class TTFGlyph extends Glyph { + // Parses just the glyph header and returns the bounding box + _getCBox(internal) { + // We need to decode the glyph if variation processing is requested, + // so it's easier just to recompute the path's cbox after decoding. + if (this._font._variationProcessor && !internal) { + return this.path.cbox; + } + + let stream = this._font._getTableStream('glyf'); + stream.pos += this._font.loca.offsets[this.id]; + let glyph = GlyfHeader.decode(stream); + + let cbox = new BBox(glyph.xMin, glyph.yMin, glyph.xMax, glyph.yMax); + return Object.freeze(cbox); + } + + // Parses a single glyph coordinate + _parseGlyphCoord(stream, prev, short, same) { + if (short) { + var val = stream.readUInt8(); + if (!same) { + val = -val; + } + + val += prev; + } else { + if (same) { + var val = prev; + } else { + var val = prev + stream.readInt16BE(); + } + } + + return val; + } + + // Decodes the glyph data into points for simple glyphs, + // or components for composite glyphs + _decode() { + let glyfPos = this._font.loca.offsets[this.id]; + let nextPos = this._font.loca.offsets[this.id + 1]; + + // Nothing to do if there is no data for this glyph + if (glyfPos === nextPos) { return null; } + + let stream = this._font._getTableStream('glyf'); + stream.pos += glyfPos; + let startPos = stream.pos; + + let glyph = GlyfHeader.decode(stream); + + if (glyph.numberOfContours > 0) { + this._decodeSimple(glyph, stream); + + } else if (glyph.numberOfContours < 0) { + this._decodeComposite(glyph, stream, startPos); + } + + return glyph; + } + + _decodeSimple(glyph, stream) { + // this is a simple glyph + glyph.points = []; + + let endPtsOfContours = new r.Array(r.uint16, glyph.numberOfContours).decode(stream); + glyph.instructions = new r.Array(r.uint8, r.uint16).decode(stream); + + let flags = []; + let numCoords = endPtsOfContours[endPtsOfContours.length - 1] + 1; + + while (flags.length < numCoords) { + var flag = stream.readUInt8(); + flags.push(flag); + + // check for repeat flag + if (flag & REPEAT) { + let count = stream.readUInt8(); + for (let j = 0; j < count; j++) { + flags.push(flag); + } + } + } + + for (var i = 0; i < flags.length; i++) { + var flag = flags[i]; + let point = new Point(!!(flag & ON_CURVE), endPtsOfContours.indexOf(i) >= 0, 0, 0); + glyph.points.push(point); + } + + let px = 0; + for (var i = 0; i < flags.length; i++) { + var flag = flags[i]; + glyph.points[i].x = px = this._parseGlyphCoord(stream, px, flag & X_SHORT_VECTOR, flag & SAME_X); + } + + let py = 0; + for (var i = 0; i < flags.length; i++) { + var flag = flags[i]; + glyph.points[i].y = py = this._parseGlyphCoord(stream, py, flag & Y_SHORT_VECTOR, flag & SAME_Y); + } + + if (this._font._variationProcessor) { + let points = glyph.points.slice(); + points.push(...this._getPhantomPoints(glyph)); + + this._font._variationProcessor.transformPoints(this.id, points); + glyph.phantomPoints = points.slice(-4); + } + + return; + } + + _decodeComposite(glyph, stream, offset = 0) { + // this is a composite glyph + glyph.components = []; + let haveInstructions = false; + let flags = MORE_COMPONENTS; + + while (flags & MORE_COMPONENTS) { + flags = stream.readUInt16BE(); + let gPos = stream.pos - offset; + let glyphID = stream.readUInt16BE(); + if (!haveInstructions) { + haveInstructions = (flags & WE_HAVE_INSTRUCTIONS) !== 0; + } + + if (flags & ARG_1_AND_2_ARE_WORDS) { + var dx = stream.readInt16BE(); + var dy = stream.readInt16BE(); + } else { + var dx = stream.readInt8(); + var dy = stream.readInt8(); + } + + var component = new Component(glyphID, dx, dy); + component.pos = gPos; + + if (flags & WE_HAVE_A_SCALE) { + // fixed number with 14 bits of fraction + component.scaleX = + component.scaleY = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824; + + } else if (flags & WE_HAVE_AN_X_AND_Y_SCALE) { + component.scaleX = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824; + component.scaleY = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824; + + } else if (flags & WE_HAVE_A_TWO_BY_TWO) { + component.scaleX = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824; + component.scale01 = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824; + component.scale10 = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824; + component.scaleY = ((stream.readUInt8() << 24) | (stream.readUInt8() << 16)) / 1073741824; + } + + glyph.components.push(component); + } + + if (this._font._variationProcessor) { + let points = []; + for (let j = 0; j < glyph.components.length; j++) { + var component = glyph.components[j]; + points.push(new Point(true, true, component.dx, component.dy)); + } + + points.push(...this._getPhantomPoints(glyph)); + + this._font._variationProcessor.transformPoints(this.id, points); + glyph.phantomPoints = points.splice(-4, 4); + + for (let i = 0; i < points.length; i++) { + let point = points[i]; + glyph.components[i].dx = point.x; + glyph.components[i].dy = point.y; + } + } + + return haveInstructions; + } + + _getPhantomPoints(glyph) { + let cbox = this._getCBox(true); + if (this._metrics == null) { + this._metrics = Glyph.prototype._getMetrics.call(this, cbox); + } + + let { advanceWidth, advanceHeight, leftBearing, topBearing } = this._metrics; + + return [ + new Point(false, true, glyph.xMin - leftBearing, 0), + new Point(false, true, glyph.xMin - leftBearing + advanceWidth, 0), + new Point(false, true, 0, glyph.yMax + topBearing), + new Point(false, true, 0, glyph.yMax + topBearing + advanceHeight) + ]; + } + + // Decodes font data, resolves composite glyphs, and returns an array of contours + _getContours() { + let glyph = this._decode(); + if (!glyph) { return []; } + + if (glyph.numberOfContours < 0) { + // resolve composite glyphs + var points = []; + for (let component of glyph.components) { + glyph = this._font.getGlyph(component.glyphID)._decode(); + // TODO transform + for (let point of glyph.points) { + points.push(new Point(point.onCurve, point.endContour, point.x + component.dx, point.y + component.dy)); + } + } + } else { + var points = glyph.points || []; + } + + // Recompute and cache metrics if we performed variation processing, and don't have an HVAR table + if (glyph.phantomPoints && !this._font.directory.tables.HVAR) { + this._metrics.advanceWidth = glyph.phantomPoints[1].x - glyph.phantomPoints[0].x; + this._metrics.advanceHeight = glyph.phantomPoints[3].y - glyph.phantomPoints[2].y; + this._metrics.leftBearing = glyph.xMin - glyph.phantomPoints[0].x; + this._metrics.topBearing = glyph.phantomPoints[2].y - glyph.yMax; + } + + let contours = []; + let cur = []; + for (let k = 0; k < points.length; k++) { + var point = points[k]; + cur.push(point); + if (point.endContour) { + contours.push(cur); + cur = []; + } + } + + return contours; + } + + _getMetrics() { + if (this._metrics) { + return this._metrics; + } + + let cbox = this._getCBox(true); + super._getMetrics(cbox); + + if (this._font._variationProcessor && !this._font.HVAR) { + // No HVAR table, decode the glyph. This triggers recomputation of metrics. + this.path; + } + + return this._metrics; + } + + // Converts contours to a Path object that can be rendered + _getPath() { + let contours = this._getContours(); + let path = new Path; + + for (let i = 0; i < contours.length; i++) { + let contour = contours[i]; + let firstPt = contour[0]; + let lastPt = contour[contour.length - 1]; + let start = 0; + + if (firstPt.onCurve) { + // The first point will be consumed by the moveTo command, so skip in the loop + var curvePt = null; + start = 1; + } else { + if (lastPt.onCurve) { + // Start at the last point if the first point is off curve and the last point is on curve + firstPt = lastPt; + } else { + // Start at the middle if both the first and last points are off curve + firstPt = new Point(false, false, (firstPt.x + lastPt.x) / 2, (firstPt.y + lastPt.y) / 2); + } + + var curvePt = firstPt; + } + + path.moveTo(firstPt.x, firstPt.y); + + for (let j = start; j < contour.length; j++) { + let pt = contour[j]; + let prevPt = j === 0 ? firstPt : contour[j - 1]; + + if (prevPt.onCurve && pt.onCurve) { + path.lineTo(pt.x, pt.y); + + } else if (prevPt.onCurve && !pt.onCurve) { + var curvePt = pt; + + } else if (!prevPt.onCurve && !pt.onCurve) { + let midX = (prevPt.x + pt.x) / 2; + let midY = (prevPt.y + pt.y) / 2; + path.quadraticCurveTo(prevPt.x, prevPt.y, midX, midY); + var curvePt = pt; + + } else if (!prevPt.onCurve && pt.onCurve) { + path.quadraticCurveTo(curvePt.x, curvePt.y, pt.x, pt.y); + var curvePt = null; + + } else { + throw new Error("Unknown TTF path state"); + } + } + + // Connect the first and last points + if (curvePt) { + path.quadraticCurveTo(curvePt.x, curvePt.y, firstPt.x, firstPt.y); + } + + path.closePath(); + } + + return path; + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/glyph/TTFGlyphEncoder.js b/pitfall/pdfkit/node_modules/fontkit/src/glyph/TTFGlyphEncoder.js new file mode 100644 index 00000000..d6e1b01e --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/glyph/TTFGlyphEncoder.js @@ -0,0 +1,158 @@ +import r from 'restructure'; + +// Flags for simple glyphs +const ON_CURVE = 1 << 0; +const X_SHORT_VECTOR = 1 << 1; +const Y_SHORT_VECTOR = 1 << 2; +const REPEAT = 1 << 3; +const SAME_X = 1 << 4; +const SAME_Y = 1 << 5; + +class Point { + static size(val) { + return val >= 0 && val <= 255 ? 1 : 2; + } + + static encode(stream, value) { + if (value >= 0 && value <= 255) { + stream.writeUInt8(value); + } else { + stream.writeInt16BE(value); + } + } +} + +let Glyf = new r.Struct({ + numberOfContours: r.int16, // if negative, this is a composite glyph + xMin: r.int16, + yMin: r.int16, + xMax: r.int16, + yMax: r.int16, + endPtsOfContours: new r.Array(r.uint16, 'numberOfContours'), + instructions: new r.Array(r.uint8, r.uint16), + flags: new r.Array(r.uint8, 0), + xPoints: new r.Array(Point, 0), + yPoints: new r.Array(Point, 0) +}); + +/** + * Encodes TrueType glyph outlines + */ +export default class TTFGlyphEncoder { + encodeSimple(path, instructions = []) { + let endPtsOfContours = []; + let xPoints = []; + let yPoints = []; + let flags = []; + let same = 0; + let lastX = 0, lastY = 0, lastFlag = 0; + let pointCount = 0; + + for (let i = 0; i < path.commands.length; i++) { + let c = path.commands[i]; + + for (let j = 0; j < c.args.length; j += 2) { + let x = c.args[j]; + let y = c.args[j + 1]; + let flag = 0; + + // If the ending point of a quadratic curve is the midpoint + // between the control point and the control point of the next + // quadratic curve, we can omit the ending point. + if (c.command === 'quadraticCurveTo' && j === 2) { + let next = path.commands[i + 1]; + if (next && next.command === 'quadraticCurveTo') { + let midX = (lastX + next.args[0]) / 2; + let midY = (lastY + next.args[1]) / 2; + + if (x === midX && y === midY) { + continue; + } + } + } + + // All points except control points are on curve. + if (!(c.command === 'quadraticCurveTo' && j === 0)) { + flag |= ON_CURVE; + } + + flag = this._encodePoint(x, lastX, xPoints, flag, X_SHORT_VECTOR, SAME_X); + flag = this._encodePoint(y, lastY, yPoints, flag, Y_SHORT_VECTOR, SAME_Y); + + if (flag === lastFlag && same < 255) { + flags[flags.length - 1] |= REPEAT; + same++; + } else { + if (same > 0) { + flags.push(same); + same = 0; + } + + flags.push(flag); + lastFlag = flag; + } + + lastX = x; + lastY = y; + pointCount++; + } + + if (c.command === 'closePath') { + endPtsOfContours.push(pointCount - 1); + } + } + + // Close the path if the last command didn't already + if (path.commands.length > 1 && path.commands[path.commands.length - 1].command !== 'closePath') { + endPtsOfContours.push(pointCount - 1); + } + + let bbox = path.bbox; + let glyf = { + numberOfContours: endPtsOfContours.length, + xMin: bbox.minX, + yMin: bbox.minY, + xMax: bbox.maxX, + yMax: bbox.maxY, + endPtsOfContours: endPtsOfContours, + instructions: instructions, + flags: flags, + xPoints: xPoints, + yPoints: yPoints + }; + + let size = Glyf.size(glyf); + let tail = 4 - (size % 4); + + let stream = new r.EncodeStream(size + tail); + Glyf.encode(stream, glyf); + + // Align to 4-byte length + if (tail !== 0) { + stream.fill(0, tail); + } + + return stream.buffer; + } + + _encodePoint(value, last, points, flag, shortFlag, sameFlag) { + let diff = value - last; + + if (value === last) { + flag |= sameFlag; + } else { + if (-255 <= diff && diff <= 255) { + flag |= shortFlag; + if (diff < 0) { + diff = -diff; + } else { + flag |= sameFlag; + } + } + + points.push(diff); + } + + return flag; + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/glyph/WOFF2Glyph.js b/pitfall/pdfkit/node_modules/fontkit/src/glyph/WOFF2Glyph.js new file mode 100644 index 00000000..2be42336 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/glyph/WOFF2Glyph.js @@ -0,0 +1,15 @@ +import TTFGlyph from './TTFGlyph'; + +/** + * Represents a TrueType glyph in the WOFF2 format, which compresses glyphs differently. + */ +export default class WOFF2Glyph extends TTFGlyph { + _decode() { + // We have to decode in advance (in WOFF2Font), so just return the pre-decoded data. + return this._font._transformedGlyphs[this.id]; + } + + _getCBox() { + return this.path.bbox; + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/index.js b/pitfall/pdfkit/node_modules/fontkit/src/index.js new file mode 100644 index 00000000..11f4882e --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/index.js @@ -0,0 +1,15 @@ +import fontkit from './base'; +import TTFFont from './TTFFont'; +import WOFFFont from './WOFFFont'; +import WOFF2Font from './WOFF2Font'; +import TrueTypeCollection from './TrueTypeCollection'; +import DFont from './DFont'; + +// Register font formats +fontkit.registerFormat(TTFFont); +fontkit.registerFormat(WOFFFont); +fontkit.registerFormat(WOFF2Font); +fontkit.registerFormat(TrueTypeCollection); +fontkit.registerFormat(DFont); + +export default fontkit; diff --git a/pitfall/pdfkit/node_modules/fontkit/src/layout/GlyphPosition.js b/pitfall/pdfkit/node_modules/fontkit/src/layout/GlyphPosition.js new file mode 100644 index 00000000..79a4422a --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/layout/GlyphPosition.js @@ -0,0 +1,30 @@ +/** + * Represents positioning information for a glyph in a GlyphRun. + */ +export default class GlyphPosition { + constructor(xAdvance = 0, yAdvance = 0, xOffset = 0, yOffset = 0) { + /** + * The amount to move the virtual pen in the X direction after rendering this glyph. + * @type {number} + */ + this.xAdvance = xAdvance; + + /** + * The amount to move the virtual pen in the Y direction after rendering this glyph. + * @type {number} + */ + this.yAdvance = yAdvance; + + /** + * The offset from the pen position in the X direction at which to render this glyph. + * @type {number} + */ + this.xOffset = xOffset; + + /** + * The offset from the pen position in the Y direction at which to render this glyph. + * @type {number} + */ + this.yOffset = yOffset; + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/layout/GlyphRun.js b/pitfall/pdfkit/node_modules/fontkit/src/layout/GlyphRun.js new file mode 100644 index 00000000..0f305adc --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/layout/GlyphRun.js @@ -0,0 +1,71 @@ +import BBox from '../glyph/BBox'; + +/** + * Represents a run of Glyph and GlyphPosition objects. + * Returned by the font layout method. + */ +export default class GlyphRun { + constructor(glyphs, positions) { + /** + * An array of Glyph objects in the run + * @type {Glyph[]} + */ + this.glyphs = glyphs; + + /** + * An array of GlyphPosition objects for each glyph in the run + * @type {GlyphPosition[]} + */ + this.positions = positions; + } + + /** + * The total advance width of the run. + * @type {number} + */ + get advanceWidth() { + let width = 0; + for (let position of this.positions) { + width += position.xAdvance; + } + + return width; + } + + /** + * The total advance height of the run. + * @type {number} + */ + get advanceHeight() { + let height = 0; + for (let position of this.positions) { + height += position.yAdvance; + } + + return height; + } + + /** + * The bounding box containing all glyphs in the run. + * @type {BBox} + */ + get bbox() { + let bbox = new BBox; + + let x = 0; + let y = 0; + for (let index = 0; index < this.glyphs.length; index++) { + let glyph = this.glyphs[index]; + let p = this.positions[index]; + let b = glyph.bbox; + + bbox.addPoint(b.minX + x + p.xOffset, b.minY + y + p.yOffset); + bbox.addPoint(b.maxX + x + p.xOffset, b.maxY + y + p.yOffset); + + x += p.xAdvance; + y += p.yAdvance; + } + + return bbox; + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/layout/KernProcessor.js b/pitfall/pdfkit/node_modules/fontkit/src/layout/KernProcessor.js new file mode 100644 index 00000000..4d4f6db5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/layout/KernProcessor.js @@ -0,0 +1,94 @@ +import {binarySearch} from '../utils'; + +export default class KernProcessor { + constructor(font) { + this.kern = font.kern; + } + + process(glyphs, positions) { + for (let glyphIndex = 0; glyphIndex < glyphs.length - 1; glyphIndex++) { + let left = glyphs[glyphIndex].id; + let right = glyphs[glyphIndex + 1].id; + positions[glyphIndex].xAdvance += this.getKerning(left, right); + } + } + + getKerning(left, right) { + let res = 0; + + for (let table of this.kern.tables) { + if (table.coverage.crossStream) { + continue; + } + + switch (table.version) { + case 0: + if (!table.coverage.horizontal) { + continue; + } + + break; + case 1: + if (table.coverage.vertical || table.coverage.variation) { + continue; + } + + break; + default: + throw new Error(`Unsupported kerning table version ${table.version}`); + } + + let val = 0; + let s = table.subtable; + switch (table.format) { + case 0: + let pairIdx = binarySearch(s.pairs, function (pair) { + return (left - pair.left) || (right - pair.right); + }); + + if (pairIdx >= 0) { + val = s.pairs[pairIdx].value; + } + + break; + + case 2: + let leftOffset = 0, rightOffset = 0; + if (left >= s.leftTable.firstGlyph && left < s.leftTable.firstGlyph + s.leftTable.nGlyphs) { + leftOffset = s.leftTable.offsets[left - s.leftTable.firstGlyph]; + } else { + leftOffset = s.array.off; + } + + if (right >= s.rightTable.firstGlyph && right < s.rightTable.firstGlyph + s.rightTable.nGlyphs) { + rightOffset = s.rightTable.offsets[right - s.rightTable.firstGlyph]; + } + + let index = (leftOffset + rightOffset - s.array.off) / 2; + val = s.array.values.get(index); + break; + + case 3: + if (left >= s.glyphCount || right >= s.glyphCount) { + return 0; + } + + val = s.kernValue[s.kernIndex[s.leftClass[left] * s.rightClassCount + s.rightClass[right]]]; + break; + + default: + throw new Error(`Unsupported kerning sub-table format ${table.format}`); + } + + // Microsoft supports the override flag, which resets the result + // Otherwise, the sum of the results from all subtables is returned + if (table.coverage.override) { + res = val; + } else { + res += val; + } + } + + return res; + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/layout/LayoutEngine.js b/pitfall/pdfkit/node_modules/fontkit/src/layout/LayoutEngine.js new file mode 100644 index 00000000..57c6982c --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/layout/LayoutEngine.js @@ -0,0 +1,148 @@ +import KernProcessor from './KernProcessor'; +import UnicodeLayoutEngine from './UnicodeLayoutEngine'; +import GlyphRun from './GlyphRun'; +import GlyphPosition from './GlyphPosition'; +import * as Script from './Script'; +import unicode from 'unicode-properties'; +import AATLayoutEngine from '../aat/AATLayoutEngine'; +import OTLayoutEngine from '../opentype/OTLayoutEngine'; + +export default class LayoutEngine { + constructor(font) { + this.font = font; + this.unicodeLayoutEngine = null; + this.kernProcessor = null; + + // Choose an advanced layout engine. We try the AAT morx table first since more + // scripts are currently supported because the shaping logic is built into the font. + if (this.font.morx) { + this.engine = new AATLayoutEngine(this.font); + + } else if (this.font.GSUB || this.font.GPOS) { + this.engine = new OTLayoutEngine(this.font); + } + } + + layout(string, features = [], script, language) { + // Make the features parameter optional + if (typeof features === 'string') { + script = features; + language = script; + features = []; + } + + // Map string to glyphs if needed + if (typeof string === 'string') { + // Attempt to detect the script from the string if not provided. + if (script == null) { + script = Script.forString(string); + } + + var glyphs = this.font.glyphsForString(string); + } else { + // Attempt to detect the script from the glyph code points if not provided. + if (script == null) { + let codePoints = []; + for (let glyph of string) { + codePoints.push(...glyph.codePoints); + } + + script = Script.forCodePoints(codePoints); + } + + var glyphs = string; + } + + // Return early if there are no glyphs + if (glyphs.length === 0) { + return new GlyphRun(glyphs, []); + } + + // Setup the advanced layout engine + if (this.engine && this.engine.setup) { + this.engine.setup(glyphs, features, script, language); + } + + // Substitute and position the glyphs + glyphs = this.substitute(glyphs, features, script, language); + let positions = this.position(glyphs, features, script, language); + + // Let the layout engine clean up any state it might have + if (this.engine && this.engine.cleanup) { + this.engine.cleanup(); + } + + return new GlyphRun(glyphs, positions); + } + + substitute(glyphs, features, script, language) { + // Call the advanced layout engine to make substitutions + if (this.engine && this.engine.substitute) { + glyphs = this.engine.substitute(glyphs, features, script, language); + } + + return glyphs; + } + + position(glyphs, features, script, language) { + // Get initial glyph positions + let positions = glyphs.map(glyph => new GlyphPosition(glyph.advanceWidth)); + let positioned = null; + + // Call the advanced layout engine. Returns the features applied. + if (this.engine && this.engine.position) { + positioned = this.engine.position(glyphs, positions, features, script, language); + } + + // if there is no GPOS table, use unicode properties to position marks. + if (!positioned) { + if (!this.unicodeLayoutEngine) { + this.unicodeLayoutEngine = new UnicodeLayoutEngine(this.font); + } + + this.unicodeLayoutEngine.positionGlyphs(glyphs, positions); + } + + // if kerning is not supported by GPOS, do kerning with the TrueType/AAT kern table + if ((!positioned || !positioned.kern) && this.font.kern) { + if (!this.kernProcessor) { + this.kernProcessor = new KernProcessor(this.font); + } + + this.kernProcessor.process(glyphs, positions); + } + + return positions; + } + + getAvailableFeatures(script, language) { + let features = []; + + if (this.engine) { + features.push(...this.engine.getAvailableFeatures(script, language)); + } + + if (this.font.kern && features.indexOf('kern') === -1) { + features.push('kern'); + } + + return features; + } + + stringsForGlyph(gid) { + let result = new Set; + + let codePoints = this.font._cmapProcessor.codePointsForGlyph(gid); + for (let codePoint of codePoints) { + result.add(String.fromCodePoint(codePoint)); + } + + if (this.engine && this.engine.stringsForGlyph) { + for (let string of this.engine.stringsForGlyph(gid)) { + result.add(string); + } + } + + return Array.from(result); + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/layout/Script.js b/pitfall/pdfkit/node_modules/fontkit/src/layout/Script.js new file mode 100644 index 00000000..e8f3ca5a --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/layout/Script.js @@ -0,0 +1,215 @@ +import unicode from 'unicode-properties'; + +// This maps the Unicode Script property to an OpenType script tag +// Data from http://www.microsoft.com/typography/otspec/scripttags.htm +// and http://www.unicode.org/Public/UNIDATA/PropertyValueAliases.txt. +const UNICODE_SCRIPTS = { + Caucasian_Albanian: 'aghb', + Arabic: 'arab', + Imperial_Aramaic: 'armi', + Armenian: 'armn', + Avestan: 'avst', + Balinese: 'bali', + Bamum: 'bamu', + Bassa_Vah: 'bass', + Batak: 'batk', + Bengali: ['bng2', 'beng'], + Bopomofo: 'bopo', + Brahmi: 'brah', + Braille: 'brai', + Buginese: 'bugi', + Buhid: 'buhd', + Chakma: 'cakm', + Canadian_Aboriginal: 'cans', + Carian: 'cari', + Cham: 'cham', + Cherokee: 'cher', + Coptic: 'copt', + Cypriot: 'cprt', + Cyrillic: 'cyrl', + Devanagari: ['dev2', 'deva'], + Deseret: 'dsrt', + Duployan: 'dupl', + Egyptian_Hieroglyphs: 'egyp', + Elbasan: 'elba', + Ethiopic: 'ethi', + Georgian: 'geor', + Glagolitic: 'glag', + Gothic: 'goth', + Grantha: 'gran', + Greek: 'grek', + Gujarati: ['gjr2', 'gujr'], + Gurmukhi: ['gur2', 'guru'], + Hangul: 'hang', + Han: 'hani', + Hanunoo: 'hano', + Hebrew: 'hebr', + Hiragana: 'hira', + Pahawh_Hmong: 'hmng', + Katakana_Or_Hiragana: 'hrkt', + Old_Italic: 'ital', + Javanese: 'java', + Kayah_Li: 'kali', + Katakana: 'kana', + Kharoshthi: 'khar', + Khmer: 'khmr', + Khojki: 'khoj', + Kannada: ['knd2', 'knda'], + Kaithi: 'kthi', + Tai_Tham: 'lana', + Lao: 'lao ', + Latin: 'latn', + Lepcha: 'lepc', + Limbu: 'limb', + Linear_A: 'lina', + Linear_B: 'linb', + Lisu: 'lisu', + Lycian: 'lyci', + Lydian: 'lydi', + Mahajani: 'mahj', + Mandaic: 'mand', + Manichaean: 'mani', + Mende_Kikakui: 'mend', + Meroitic_Cursive: 'merc', + Meroitic_Hieroglyphs: 'mero', + Malayalam: ['mlm2', 'mlym'], + Modi: 'modi', + Mongolian: 'mong', + Mro: 'mroo', + Meetei_Mayek: 'mtei', + Myanmar: ['mym2', 'mymr'], + Old_North_Arabian: 'narb', + Nabataean: 'nbat', + Nko: 'nko ', + Ogham: 'ogam', + Ol_Chiki: 'olck', + Old_Turkic: 'orkh', + Oriya: 'orya', + Osmanya: 'osma', + Palmyrene: 'palm', + Pau_Cin_Hau: 'pauc', + Old_Permic: 'perm', + Phags_Pa: 'phag', + Inscriptional_Pahlavi: 'phli', + Psalter_Pahlavi: 'phlp', + Phoenician: 'phnx', + Miao: 'plrd', + Inscriptional_Parthian: 'prti', + Rejang: 'rjng', + Runic: 'runr', + Samaritan: 'samr', + Old_South_Arabian: 'sarb', + Saurashtra: 'saur', + Shavian: 'shaw', + Sharada: 'shrd', + Siddham: 'sidd', + Khudawadi: 'sind', + Sinhala: 'sinh', + Sora_Sompeng: 'sora', + Sundanese: 'sund', + Syloti_Nagri: 'sylo', + Syriac: 'syrc', + Tagbanwa: 'tagb', + Takri: 'takr', + Tai_Le: 'tale', + New_Tai_Lue: 'talu', + Tamil: 'taml', + Tai_Viet: 'tavt', + Telugu: ['tel2', 'telu'], + Tifinagh: 'tfng', + Tagalog: 'tglg', + Thaana: 'thaa', + Thai: 'thai', + Tibetan: 'tibt', + Tirhuta: 'tirh', + Ugaritic: 'ugar', + Vai: 'vai ', + Warang_Citi: 'wara', + Old_Persian: 'xpeo', + Cuneiform: 'xsux', + Yi: 'yi ', + Inherited: 'zinh', + Common: 'zyyy', + Unknown: 'zzzz' +}; + +export function fromUnicode(script) { + return UNICODE_SCRIPTS[script]; +} + +export function forString(string) { + let len = string.length; + let idx = 0; + while (idx < len) { + let code = string.charCodeAt(idx++); + + // Check if this is a high surrogate + if (0xd800 <= code && code <= 0xdbff && idx < len) { + let next = string.charCodeAt(idx); + + // Check if this is a low surrogate + if (0xdc00 <= next && next <= 0xdfff) { + idx++; + code = ((code & 0x3FF) << 10) + (next & 0x3FF) + 0x10000; + } + } + + let script = unicode.getScript(code); + if (script !== 'Common' && script !== 'Inherited' && script !== 'Unknown') { + return UNICODE_SCRIPTS[script]; + } + } + + return UNICODE_SCRIPTS.Unknown; +} + +export function forCodePoints(codePoints) { + for (let i = 0; i < codePoints.length; i++) { + let codePoint = codePoints[i]; + let script = unicode.getScript(codePoint); + if (script !== 'Common' && script !== 'Inherited' && script !== 'Unknown') { + return UNICODE_SCRIPTS[script]; + } + } + + return UNICODE_SCRIPTS.Unknown; +} + +// The scripts in this map are written from right to left +const RTL = { + arab: true, // Arabic + hebr: true, // Hebrew + syrc: true, // Syriac + thaa: true, // Thaana + cprt: true, // Cypriot Syllabary + khar: true, // Kharosthi + phnx: true, // Phoenician + 'nko ': true, // N'Ko + lydi: true, // Lydian + avst: true, // Avestan + armi: true, // Imperial Aramaic + phli: true, // Inscriptional Pahlavi + prti: true, // Inscriptional Parthian + sarb: true, // Old South Arabian + orkh: true, // Old Turkic, Orkhon Runic + samr: true, // Samaritan + mand: true, // Mandaic, Mandaean + merc: true, // Meroitic Cursive + mero: true, // Meroitic Hieroglyphs + + // Unicode 7.0 (not listed on http://www.microsoft.com/typography/otspec/scripttags.htm) + mani: true, // Manichaean + mend: true, // Mende Kikakui + nbat: true, // Nabataean + narb: true, // Old North Arabian + palm: true, // Palmyrene + phlp: true // Psalter Pahlavi +}; + +export function direction(script) { + if (RTL[script]) { + return 'rtl'; + } + + return 'ltr'; +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/layout/UnicodeLayoutEngine.js b/pitfall/pdfkit/node_modules/fontkit/src/layout/UnicodeLayoutEngine.js new file mode 100644 index 00000000..c948d9bf --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/layout/UnicodeLayoutEngine.js @@ -0,0 +1,250 @@ +import unicode from 'unicode-properties'; + +/** + * This class is used when GPOS does not define 'mark' or 'mkmk' features + * for positioning marks relative to base glyphs. It uses the unicode + * combining class property to position marks. + * + * Based on code from Harfbuzz, thanks! + * https://github.com/behdad/harfbuzz/blob/master/src/hb-ot-shape-fallback.cc + */ +export default class UnicodeLayoutEngine { + constructor(font) { + this.font = font; + } + + positionGlyphs(glyphs, positions) { + // find each base + mark cluster, and position the marks relative to the base + let clusterStart = 0; + let clusterEnd = 0; + for (let index = 0; index < glyphs.length; index++) { + let glyph = glyphs[index]; + if (glyph.isMark) { // TODO: handle ligatures + clusterEnd = index; + } else { + if (clusterStart !== clusterEnd) { + this.positionCluster(glyphs, positions, clusterStart, clusterEnd); + } + + clusterStart = clusterEnd = index; + } + } + + if (clusterStart !== clusterEnd) { + this.positionCluster(glyphs, positions, clusterStart, clusterEnd); + } + + return positions; + } + + positionCluster(glyphs, positions, clusterStart, clusterEnd) { + let base = glyphs[clusterStart]; + let baseBox = base.cbox.copy(); + + // adjust bounding box for ligature glyphs + if (base.codePoints.length > 1) { + // LTR. TODO: RTL support. + baseBox.minX += ((base.codePoints.length - 1) * baseBox.width) / base.codePoints.length; + } + + let xOffset = -positions[clusterStart].xAdvance; + let yOffset = 0; + let yGap = this.font.unitsPerEm / 16; + + // position each of the mark glyphs relative to the base glyph + for (let index = clusterStart + 1; index <= clusterEnd; index++) { + let mark = glyphs[index]; + let markBox = mark.cbox; + let position = positions[index]; + + let combiningClass = this.getCombiningClass(mark.codePoints[0]); + + if (combiningClass !== 'Not_Reordered') { + position.xOffset = position.yOffset = 0; + + // x positioning + switch (combiningClass) { + case 'Double_Above': + case 'Double_Below': + // LTR. TODO: RTL support. + position.xOffset += baseBox.minX - markBox.width / 2 - markBox.minX; + break; + + case 'Attached_Below_Left': + case 'Below_Left': + case 'Above_Left': + // left align + position.xOffset += baseBox.minX - markBox.minX; + break; + + case 'Attached_Above_Right': + case 'Below_Right': + case 'Above_Right': + // right align + position.xOffset += baseBox.maxX - markBox.width - markBox.minX; + break; + + default: // Attached_Below, Attached_Above, Below, Above, other + // center align + position.xOffset += baseBox.minX + (baseBox.width - markBox.width) / 2 - markBox.minX; + } + + // y positioning + switch (combiningClass) { + case 'Double_Below': + case 'Below_Left': + case 'Below': + case 'Below_Right': + case 'Attached_Below_Left': + case 'Attached_Below': + // add a small gap between the glyphs if they are not attached + if (combiningClass === 'Attached_Below_Left' || combiningClass === 'Attached_Below') { + baseBox.minY += yGap; + } + + position.yOffset = -baseBox.minY - markBox.maxY; + baseBox.minY += markBox.height; + break; + + case 'Double_Above': + case 'Above_Left': + case 'Above': + case 'Above_Right': + case 'Attached_Above': + case 'Attached_Above_Right': + // add a small gap between the glyphs if they are not attached + if (combiningClass === 'Attached_Above' || combiningClass === 'Attached_Above_Right') { + baseBox.maxY += yGap; + } + + position.yOffset = baseBox.maxY - markBox.minY; + baseBox.maxY += markBox.height; + break; + } + + position.xAdvance = position.yAdvance = 0; + position.xOffset += xOffset; + position.yOffset += yOffset; + + } else { + xOffset -= position.xAdvance; + yOffset -= position.yAdvance; + } + } + + return; + } + + getCombiningClass(codePoint) { + let combiningClass = unicode.getCombiningClass(codePoint); + + // Thai / Lao need some per-character work + if ((codePoint & ~0xff) === 0x0e00) { + if (combiningClass === 'Not_Reordered') { + switch (codePoint) { + case 0x0e31: + case 0x0e34: + case 0x0e35: + case 0x0e36: + case 0x0e37: + case 0x0e47: + case 0x0e4c: + case 0x0e3d: + case 0x0e4e: + return 'Above_Right'; + + case 0x0eb1: + case 0x0eb4: + case 0x0eb5: + case 0x0eb6: + case 0x0eb7: + case 0x0ebb: + case 0x0ecc: + case 0x0ecd: + return 'Above'; + + case 0x0ebc: + return 'Below'; + } + } else if (codePoint === 0x0e3a) { // virama + return 'Below_Right'; + } + } + + switch (combiningClass) { + // Hebrew + + case 'CCC10': // sheva + case 'CCC11': // hataf segol + case 'CCC12': // hataf patah + case 'CCC13': // hataf qamats + case 'CCC14': // hiriq + case 'CCC15': // tsere + case 'CCC16': // segol + case 'CCC17': // patah + case 'CCC18': // qamats + case 'CCC20': // qubuts + case 'CCC22': // meteg + return 'Below'; + + case 'CCC23': // rafe + return 'Attached_Above'; + + case 'CCC24': // shin dot + return 'Above_Right'; + + case 'CCC25': // sin dot + case 'CCC19': // holam + return 'Above_Left'; + + case 'CCC26': // point varika + return 'Above'; + + case 'CCC21': // dagesh + break; + + // Arabic and Syriac + + case 'CCC27': // fathatan + case 'CCC28': // dammatan + case 'CCC30': // fatha + case 'CCC31': // damma + case 'CCC33': // shadda + case 'CCC34': // sukun + case 'CCC35': // superscript alef + case 'CCC36': // superscript alaph + return 'Above'; + + case 'CCC29': // kasratan + case 'CCC32': // kasra + return 'Below'; + + // Thai + + case 'CCC103': // sara u / sara uu + return 'Below_Right'; + + case 'CCC107': // mai + return 'Above_Right'; + + // Lao + + case 'CCC118': // sign u / sign uu + return 'Below'; + + case 'CCC122': // mai + return 'Above'; + + // Tibetan + + case 'CCC129': // sign aa + case 'CCC132': // sign u + return 'Below'; + + case 'CCC130': // sign i + return 'Above'; + } + + return combiningClass; + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/opentype/GPOSProcessor.js b/pitfall/pdfkit/node_modules/fontkit/src/opentype/GPOSProcessor.js new file mode 100644 index 00000000..5676c425 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/opentype/GPOSProcessor.js @@ -0,0 +1,313 @@ +import OTProcessor from './OTProcessor'; + +export default class GPOSProcessor extends OTProcessor { + applyPositionValue(sequenceIndex, value) { + let position = this.positions[this.glyphIterator.peekIndex(sequenceIndex)]; + if (value.xAdvance != null) { + position.xAdvance += value.xAdvance; + } + + if (value.yAdvance != null) { + position.yAdvance += value.yAdvance; + } + + if (value.xPlacement != null) { + position.xOffset += value.xPlacement; + } + + if (value.yPlacement != null) { + position.yOffset += value.yPlacement; + } + + // TODO: device tables + } + + applyLookup(lookupType, table) { + switch (lookupType) { + case 1: { // Single positioning value + let index = this.coverageIndex(table.coverage); + if (index === -1) { + return false; + } + + switch (table.version) { + case 1: + this.applyPositionValue(0, table.value); + break; + + case 2: + this.applyPositionValue(0, table.values.get(index)); + break; + } + + return true; + } + + case 2: { // Pair Adjustment Positioning + let nextGlyph = this.glyphIterator.peek(); + if (!nextGlyph) { + return false; + } + + let index = this.coverageIndex(table.coverage); + if (index === -1) { + return false; + } + + switch (table.version) { + case 1: // Adjustments for glyph pairs + let set = table.pairSets.get(index); + + for (let pair of set) { + if (pair.secondGlyph === nextGlyph.id) { + this.applyPositionValue(0, pair.value1); + this.applyPositionValue(1, pair.value2); + return true; + } + } + + return false; + + case 2: // Class pair adjustment + let class1 = this.getClassID(this.glyphIterator.cur.id, table.classDef1); + let class2 = this.getClassID(nextGlyph.id, table.classDef2); + if (class1 === -1 || class2 === -1) { + return false; + } + + var pair = table.classRecords.get(class1).get(class2); + this.applyPositionValue(0, pair.value1); + this.applyPositionValue(1, pair.value2); + return true; + } + } + + case 3: { // Cursive Attachment Positioning + let nextIndex = this.glyphIterator.peekIndex(); + let nextGlyph = this.glyphs[nextIndex]; + if (!nextGlyph) { + return false; + } + + let curRecord = table.entryExitRecords[this.coverageIndex(table.coverage)]; + if (!curRecord || !curRecord.exitAnchor) { + return false; + } + + let nextRecord = table.entryExitRecords[this.coverageIndex(table.coverage, nextGlyph.id)]; + if (!nextRecord || !nextRecord.entryAnchor) { + return false; + } + + let entry = this.getAnchor(nextRecord.entryAnchor); + let exit = this.getAnchor(curRecord.exitAnchor); + + let cur = this.positions[this.glyphIterator.index]; + let next = this.positions[nextIndex]; + + switch (this.direction) { + case 'ltr': + cur.xAdvance = exit.x + cur.xOffset; + + let d = entry.x + next.xOffset; + next.xAdvance -= d; + next.xOffset -= d; + break; + + case 'rtl': + d = exit.x + cur.xOffset; + cur.xAdvance -= d; + cur.xOffset -= d; + next.xAdvance = entry.x + next.xOffset; + break; + } + + if (this.glyphIterator.flags.rightToLeft) { + this.glyphIterator.cur.cursiveAttachment = nextIndex; + cur.yOffset = entry.y - exit.y; + } else { + nextGlyph.cursiveAttachment = this.glyphIterator.index; + cur.yOffset = exit.y - entry.y; + } + + return true; + } + + case 4: { // Mark to base positioning + let markIndex = this.coverageIndex(table.markCoverage); + if (markIndex === -1) { + return false; + } + + // search backward for a base glyph + let baseGlyphIndex = this.glyphIterator.index; + while (--baseGlyphIndex >= 0 && this.glyphs[baseGlyphIndex].isMark); + + if (baseGlyphIndex < 0) { + return false; + } + + let baseIndex = this.coverageIndex(table.baseCoverage, this.glyphs[baseGlyphIndex].id); + if (baseIndex === -1) { + return false; + } + + let markRecord = table.markArray[markIndex]; + let baseAnchor = table.baseArray[baseIndex][markRecord.class]; + this.applyAnchor(markRecord, baseAnchor, baseGlyphIndex); + return true; + } + + case 5: { // Mark to ligature positioning + let markIndex = this.coverageIndex(table.markCoverage); + if (markIndex === -1) { + return false; + } + + // search backward for a base glyph + let baseGlyphIndex = this.glyphIterator.index; + while (--baseGlyphIndex >= 0 && this.glyphs[baseGlyphIndex].isMark); + + if (baseGlyphIndex < 0) { + return false; + } + + let ligIndex = this.coverageIndex(table.ligatureCoverage, this.glyphs[baseGlyphIndex].id); + if (ligIndex === -1) { + return false; + } + + let ligAttach = table.ligatureArray[ligIndex]; + let markGlyph = this.glyphIterator.cur; + let ligGlyph = this.glyphs[baseGlyphIndex]; + let compIndex = ligGlyph.ligatureID && ligGlyph.ligatureID === markGlyph.ligatureID && (markGlyph.ligatureComponent != null) + ? Math.min(markGlyph.ligatureComponent, ligGlyph.codePoints.length) - 1 + : ligGlyph.codePoints.length - 1; + + let markRecord = table.markArray[markIndex]; + let baseAnchor = ligAttach[compIndex][markRecord.class]; + this.applyAnchor(markRecord, baseAnchor, baseGlyphIndex); + return true; + } + + case 6: { // Mark to mark positioning + let mark1Index = this.coverageIndex(table.mark1Coverage); + if (mark1Index === -1) { + return false; + } + + // get the previous mark to attach to + let prevIndex = this.glyphIterator.peekIndex(-1); + let prev = this.glyphs[prevIndex]; + if (!prev || !prev.isMark) { + return false; + } + + let cur = this.glyphIterator.cur; + + // The following logic was borrowed from Harfbuzz + let good = false; + if (cur.ligatureID === prev.ligatureID) { + if (!cur.ligatureID) { // Marks belonging to the same base + good = true; + } else if (cur.ligatureComponent === prev.ligatureComponent) { // Marks belonging to the same ligature component + good = true; + } + } else { + // If ligature ids don't match, it may be the case that one of the marks + // itself is a ligature, in which case match. + if ((cur.ligatureID && !cur.ligatureComponent) || (prev.ligatureID && !prev.ligatureComponent)) { + good = true; + } + } + + if (!good) { + return false; + } + + let mark2Index = this.coverageIndex(table.mark2Coverage, prev.id); + if (mark2Index === -1) { + return false; + } + + let markRecord = table.mark1Array[mark1Index]; + let baseAnchor = table.mark2Array[mark2Index][markRecord.class]; + this.applyAnchor(markRecord, baseAnchor, prevIndex); + return true; + } + + case 7: // Contextual positioning + return this.applyContext(table); + + case 8: // Chaining contextual positioning + return this.applyChainingContext(table); + + case 9: // Extension positioning + return this.applyLookup(table.lookupType, table.extension); + + default: + throw new Error(`Unsupported GPOS table: ${lookupType}`); + } + } + + applyAnchor(markRecord, baseAnchor, baseGlyphIndex) { + let baseCoords = this.getAnchor(baseAnchor); + let markCoords = this.getAnchor(markRecord.markAnchor); + + let basePos = this.positions[baseGlyphIndex]; + let markPos = this.positions[this.glyphIterator.index]; + + markPos.xOffset = baseCoords.x - markCoords.x; + markPos.yOffset = baseCoords.y - markCoords.y; + this.glyphIterator.cur.markAttachment = baseGlyphIndex; + } + + getAnchor(anchor) { + // TODO: contour point, device tables + return { + x: anchor.xCoordinate, + y: anchor.yCoordinate + }; + } + + applyFeatures(userFeatures, glyphs, advances) { + super.applyFeatures(userFeatures, glyphs, advances); + + for (var i = 0; i < this.glyphs.length; i++) { + this.fixCursiveAttachment(i); + } + + this.fixMarkAttachment(); + } + + fixCursiveAttachment(i) { + let glyph = this.glyphs[i]; + if (glyph.cursiveAttachment != null) { + let j = glyph.cursiveAttachment; + + glyph.cursiveAttachment = null; + this.fixCursiveAttachment(j); + + this.positions[i].yOffset += this.positions[j].yOffset; + } + } + + fixMarkAttachment() { + for (let i = 0; i < this.glyphs.length; i++) { + let glyph = this.glyphs[i]; + if (glyph.markAttachment != null) { + let j = glyph.markAttachment; + + this.positions[i].xOffset += this.positions[j].xOffset; + this.positions[i].yOffset += this.positions[j].yOffset; + + if (this.direction === 'ltr') { + for (let k = j; k < i; k++) { + this.positions[i].xOffset -= this.positions[k].xAdvance; + this.positions[i].yOffset -= this.positions[k].yAdvance; + } + } + } + } + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/opentype/GSUBProcessor.js b/pitfall/pdfkit/node_modules/fontkit/src/opentype/GSUBProcessor.js new file mode 100644 index 00000000..f1336ea7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/opentype/GSUBProcessor.js @@ -0,0 +1,183 @@ +import OTProcessor from './OTProcessor'; +import GlyphInfo from './GlyphInfo'; + +export default class GSUBProcessor extends OTProcessor { + applyLookup(lookupType, table) { + switch (lookupType) { + case 1: { // Single Substitution + let index = this.coverageIndex(table.coverage); + if (index === -1) { + return false; + } + + let glyph = this.glyphIterator.cur; + switch (table.version) { + case 1: + glyph.id = (glyph.id + table.deltaGlyphID) & 0xffff; + break; + + case 2: + glyph.id = table.substitute.get(index); + break; + } + + return true; + } + + case 2: { // Multiple Substitution + let index = this.coverageIndex(table.coverage); + if (index !== -1) { + let sequence = table.sequences.get(index); + this.glyphIterator.cur.id = sequence[0]; + this.glyphIterator.cur.ligatureComponent = 0; + + let features = this.glyphIterator.cur.features; + let curGlyph = this.glyphIterator.cur; + let replacement = sequence.slice(1).map((gid, i) => { + let glyph = new GlyphInfo(this.font, gid, undefined, features); + glyph.shaperInfo = curGlyph.shaperInfo; + glyph.isLigated = curGlyph.isLigated; + glyph.ligatureComponent = i + 1; + glyph.substituted = true; + return glyph; + }); + + this.glyphs.splice(this.glyphIterator.index + 1, 0, ...replacement); + return true; + } + + return false; + } + + case 3: { // Alternate Substitution + let index = this.coverageIndex(table.coverage); + if (index !== -1) { + let USER_INDEX = 0; // TODO + this.glyphIterator.cur.id = table.alternateSet.get(index)[USER_INDEX]; + return true; + } + + return false; + } + + case 4: { // Ligature Substitution + let index = this.coverageIndex(table.coverage); + if (index === -1) { + return false; + } + + for (let ligature of table.ligatureSets.get(index)) { + let matched = this.sequenceMatchIndices(1, ligature.components); + if (!matched) { + continue; + } + + let curGlyph = this.glyphIterator.cur; + + // Concatenate all of the characters the new ligature will represent + let characters = curGlyph.codePoints.slice(); + for (let index of matched) { + characters.push(...this.glyphs[index].codePoints); + } + + // Create the replacement ligature glyph + let ligatureGlyph = new GlyphInfo(this.font, ligature.glyph, characters, curGlyph.features); + ligatureGlyph.shaperInfo = curGlyph.shaperInfo; + ligatureGlyph.isLigated = true; + ligatureGlyph.substituted = true; + + // From Harfbuzz: + // - If it *is* a mark ligature, we don't allocate a new ligature id, and leave + // the ligature to keep its old ligature id. This will allow it to attach to + // a base ligature in GPOS. Eg. if the sequence is: LAM,LAM,SHADDA,FATHA,HEH, + // and LAM,LAM,HEH for a ligature, they will leave SHADDA and FATHA with a + // ligature id and component value of 2. Then if SHADDA,FATHA form a ligature + // later, we don't want them to lose their ligature id/component, otherwise + // GPOS will fail to correctly position the mark ligature on top of the + // LAM,LAM,HEH ligature. See https://bugzilla.gnome.org/show_bug.cgi?id=676343 + // + // - If a ligature is formed of components that some of which are also ligatures + // themselves, and those ligature components had marks attached to *their* + // components, we have to attach the marks to the new ligature component + // positions! Now *that*'s tricky! And these marks may be following the + // last component of the whole sequence, so we should loop forward looking + // for them and update them. + // + // Eg. the sequence is LAM,LAM,SHADDA,FATHA,HEH, and the font first forms a + // 'calt' ligature of LAM,HEH, leaving the SHADDA and FATHA with a ligature + // id and component == 1. Now, during 'liga', the LAM and the LAM-HEH ligature + // form a LAM-LAM-HEH ligature. We need to reassign the SHADDA and FATHA to + // the new ligature with a component value of 2. + // + // This in fact happened to a font... See https://bugzilla.gnome.org/show_bug.cgi?id=437633 + let isMarkLigature = curGlyph.isMark; + for (let i = 0; i < matched.length && isMarkLigature; i++) { + isMarkLigature = this.glyphs[matched[i]].isMark; + } + + ligatureGlyph.ligatureID = isMarkLigature ? null : this.ligatureID++; + + let lastLigID = curGlyph.ligatureID; + let lastNumComps = curGlyph.codePoints.length; + let curComps = lastNumComps; + let idx = this.glyphIterator.index + 1; + + // Set ligatureID and ligatureComponent on glyphs that were skipped in the matched sequence. + // This allows GPOS to attach marks to the correct ligature components. + for (let matchIndex of matched) { + // Don't assign new ligature components for mark ligatures (see above) + if (isMarkLigature) { + idx = matchIndex; + } else { + while (idx < matchIndex) { + var ligatureComponent = curComps - lastNumComps + Math.min(this.glyphs[idx].ligatureComponent || 1, lastNumComps); + this.glyphs[idx].ligatureID = ligatureGlyph.ligatureID; + this.glyphs[idx].ligatureComponent = ligatureComponent; + idx++; + } + } + + lastLigID = this.glyphs[idx].ligatureID; + lastNumComps = this.glyphs[idx].codePoints.length; + curComps += lastNumComps; + idx++; // skip base glyph + } + + // Adjust ligature components for any marks following + if (lastLigID && !isMarkLigature) { + for (let i = idx; i < this.glyphs.length; i++) { + if (this.glyphs[i].ligatureID === lastLigID) { + var ligatureComponent = curComps - lastNumComps + Math.min(this.glyphs[i].ligatureComponent || 1, lastNumComps); + this.glyphs[i].ligatureComponent = ligatureComponent; + } else { + break; + } + } + } + + // Delete the matched glyphs, and replace the current glyph with the ligature glyph + for (let i = matched.length - 1; i >= 0; i--) { + this.glyphs.splice(matched[i], 1); + } + + this.glyphs[this.glyphIterator.index] = ligatureGlyph; + return true; + } + + return false; + } + + case 5: // Contextual Substitution + return this.applyContext(table); + + case 6: // Chaining Contextual Substitution + return this.applyChainingContext(table); + + case 7: // Extension Substitution + return this.applyLookup(table.lookupType, table.extension); + + default: + throw new Error(`GSUB lookupType ${lookupType} is not supported`); + } + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/opentype/GlyphInfo.js b/pitfall/pdfkit/node_modules/fontkit/src/opentype/GlyphInfo.js new file mode 100644 index 00000000..f092f577 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/opentype/GlyphInfo.js @@ -0,0 +1,47 @@ +import unicode from 'unicode-properties'; +import OTProcessor from './OTProcessor'; + +export default class GlyphInfo { + constructor(font, id, codePoints = [], features = []) { + this._font = font; + this.codePoints = codePoints; + this.id = id; + + this.features = {}; + if (Array.isArray(features)) { + for (let i = 0; i < features.length; i++) { + let feature = features[i]; + this.features[feature] = true; + } + } else if (typeof features === 'object') { + Object.assign(this.features, features); + } + + this.ligatureID = null; + this.ligatureComponent = null; + this.ligated = false; + this.cursiveAttachment = null; + this.markAttachment = null; + this.shaperInfo = null; + this.substituted = false; + } + + get id() { + return this._id; + } + + set id(id) { + this._id = id; + this.substituted = true; + + if (this._font.GDEF && this._font.GDEF.glyphClassDef) { + // TODO: clean this up + let classID = OTProcessor.prototype.getClassID(id, this._font.GDEF.glyphClassDef); + this.isMark = classID === 3; + this.isLigature = classID === 2; + } else { + this.isMark = this.codePoints.every(unicode.isMark); + this.isLigature = this.codePoints.length > 1; + } + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/opentype/GlyphIterator.js b/pitfall/pdfkit/node_modules/fontkit/src/opentype/GlyphIterator.js new file mode 100644 index 00000000..c44b5add --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/opentype/GlyphIterator.js @@ -0,0 +1,67 @@ +export default class GlyphIterator { + constructor(glyphs, flags) { + this.glyphs = glyphs; + this.reset(flags); + } + + reset(flags = {}) { + this.flags = flags; + this.index = 0; + } + + get cur() { + return this.glyphs[this.index] || null; + } + + shouldIgnore(glyph, flags) { + return ((flags.ignoreMarks && glyph.isMark) || + (flags.ignoreBaseGlyphs && !glyph.isMark) || + (flags.ignoreLigatures && glyph.isLigature)); + } + + move(dir) { + this.index += dir; + while (0 <= this.index && this.index < this.glyphs.length && this.shouldIgnore(this.glyphs[this.index], this.flags)) { + this.index += dir; + } + + if (0 > this.index || this.index >= this.glyphs.length) { + return null; + } + + return this.glyphs[this.index]; + } + + next() { + return this.move(+1); + } + + prev() { + return this.move(-1); + } + + peek(count = 1) { + let idx = this.index; + let res = this.increment(count); + this.index = idx; + return res; + } + + peekIndex(count = 1) { + let idx = this.index; + this.increment(count); + let res = this.index; + this.index = idx; + return res; + } + + increment(count = 1) { + let dir = count < 0 ? -1 : 1; + count = Math.abs(count); + while (count--) { + this.move(dir); + } + + return this.glyphs[this.index]; + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/opentype/OTLayoutEngine.js b/pitfall/pdfkit/node_modules/fontkit/src/opentype/OTLayoutEngine.js new file mode 100644 index 00000000..67516c2a --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/opentype/OTLayoutEngine.js @@ -0,0 +1,99 @@ +import ShapingPlan from './ShapingPlan'; +import * as Shapers from './shapers'; +import GlyphInfo from './GlyphInfo'; +import GSUBProcessor from './GSUBProcessor'; +import GPOSProcessor from './GPOSProcessor'; + +export default class OTLayoutEngine { + constructor(font) { + this.font = font; + this.glyphInfos = null; + this.plan = null; + this.GSUBProcessor = null; + this.GPOSProcessor = null; + + if (font.GSUB) { + this.GSUBProcessor = new GSUBProcessor(font, font.GSUB); + } + + if (font.GPOS) { + this.GPOSProcessor = new GPOSProcessor(font, font.GPOS); + } + } + + setup(glyphs, features, script, language) { + // Map glyphs to GlyphInfo objects so data can be passed between + // GSUB and GPOS without mutating the real (shared) Glyph objects. + this.glyphInfos = glyphs.map(glyph => new GlyphInfo(this.font, glyph.id, [...glyph.codePoints])); + + // Choose a shaper based on the script, and setup a shaping plan. + // This determines which features to apply to which glyphs. + this.shaper = Shapers.choose(script); + this.plan = new ShapingPlan(this.font, script, language); + return this.shaper.plan(this.plan, this.glyphInfos, features); + } + + substitute(glyphs) { + if (this.GSUBProcessor) { + this.plan.process(this.GSUBProcessor, this.glyphInfos); + + // Map glyph infos back to normal Glyph objects + glyphs = this.glyphInfos.map(glyphInfo => this.font.getGlyph(glyphInfo.id, glyphInfo.codePoints)); + } + + return glyphs; + } + + position(glyphs, positions) { + if (this.shaper.zeroMarkWidths === 'BEFORE_GPOS') { + this.zeroMarkAdvances(positions); + } + + if (this.GPOSProcessor) { + this.plan.process(this.GPOSProcessor, this.glyphInfos, positions); + } + + if (this.shaper.zeroMarkWidths === 'AFTER_GPOS') { + this.zeroMarkAdvances(positions); + } + + // Reverse the glyphs and positions if the script is right-to-left + if (this.plan.direction === 'rtl') { + glyphs.reverse(); + positions.reverse(); + } + + return this.GPOSProcessor && this.GPOSProcessor.features; + } + + zeroMarkAdvances(positions) { + for (let i = 0; i < this.glyphInfos.length; i++) { + if (this.glyphInfos[i].isMark) { + positions[i].xAdvance = 0; + positions[i].yAdvance = 0; + } + } + } + + cleanup() { + this.glyphInfos = null; + this.plan = null; + this.shaper = null; + } + + getAvailableFeatures(script, language) { + let features = []; + + if (this.GSUBProcessor) { + this.GSUBProcessor.selectScript(script, language); + features.push(...Object.keys(this.GSUBProcessor.features)); + } + + if (this.GPOSProcessor) { + this.GPOSProcessor.selectScript(script, language); + features.push(...Object.keys(this.GPOSProcessor.features)); + } + + return features; + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/opentype/OTProcessor.js b/pitfall/pdfkit/node_modules/fontkit/src/opentype/OTProcessor.js new file mode 100644 index 00000000..2699ad35 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/opentype/OTProcessor.js @@ -0,0 +1,409 @@ +import GlyphIterator from './GlyphIterator'; +import * as Script from '../layout/Script'; + +const DEFAULT_SCRIPTS = ['DFLT', 'dflt', 'latn']; + +export default class OTProcessor { + constructor(font, table) { + this.font = font; + this.table = table; + + this.script = null; + this.scriptTag = null; + + this.language = null; + this.languageTag = null; + + this.features = {}; + this.lookups = {}; + + // Setup variation substitutions + this.variationsIndex = font._variationProcessor + ? this.findVariationsIndex(font._variationProcessor.normalizedCoords) + : -1; + + // initialize to default script + language + this.selectScript(); + + // current context (set by applyFeatures) + this.glyphs = []; + this.positions = []; // only used by GPOS + this.ligatureID = 1; + } + + findScript(script) { + if (this.table.scriptList == null) { + return null; + } + + if (!Array.isArray(script)) { + script = [ script ]; + } + + for (let entry of this.table.scriptList) { + for (let s of script) { + if (entry.tag === s) { + return entry; + } + } + } + + return null; + } + + selectScript(script, language) { + let changed = false; + let entry; + if (!this.script || script !== this.scriptTag) { + entry = this.findScript(script); + if (script) { + entry = this.findScript(script); + } + + if (!entry) { + entry = this.findScript(DEFAULT_SCRIPTS); + } + + if (!entry) { + return; + } + + this.scriptTag = entry.tag; + this.script = entry.script; + this.direction = Script.direction(script); + this.language = null; + changed = true; + } + + if (!language && language !== this.langugeTag) { + for (let lang of this.script.langSysRecords) { + if (lang.tag === language) { + this.language = lang.langSys; + this.langugeTag = lang.tag; + changed = true; + break; + } + } + } + + if (!this.language) { + this.language = this.script.defaultLangSys; + } + + // Build a feature lookup table + if (changed) { + this.features = {}; + if (this.language) { + for (let featureIndex of this.language.featureIndexes) { + let record = this.table.featureList[featureIndex]; + let substituteFeature = this.substituteFeatureForVariations(featureIndex); + this.features[record.tag] = substituteFeature || record.feature; + } + } + } + } + + lookupsForFeatures(userFeatures = [], exclude) { + let lookups = []; + for (let tag of userFeatures) { + let feature = this.features[tag]; + if (!feature) { + continue; + } + + for (let lookupIndex of feature.lookupListIndexes) { + if (exclude && exclude.indexOf(lookupIndex) !== -1) { + continue; + } + + lookups.push({ + feature: tag, + index: lookupIndex, + lookup: this.table.lookupList.get(lookupIndex) + }); + } + } + + lookups.sort((a, b) => a.index - b.index); + return lookups; + } + + substituteFeatureForVariations(featureIndex) { + if (this.variationsIndex === -1) { + return null; + } + + let record = this.table.featureVariations.featureVariationRecords[this.variationsIndex]; + let substitutions = record.featureTableSubstitution.substitutions; + for (let substitution of substitutions) { + if (substitution.featureIndex === featureIndex) { + return substitution.alternateFeatureTable; + } + } + + return null; + } + + findVariationsIndex(coords) { + let variations = this.table.featureVariations; + if (!variations) { + return -1; + } + + let records = variations.featureVariationRecords; + for (let i = 0; i < records.length; i++) { + let conditions = records[i].conditionSet.conditionTable; + if (this.variationConditionsMatch(conditions, coords)) { + return i; + } + } + + return -1; + } + + variationConditionsMatch(conditions, coords) { + return conditions.every(condition => { + let coord = condition.axisIndex < coords.length ? coords[condition.axisIndex] : 0; + return condition.filterRangeMinValue <= coord && coord <= condition.filterRangeMaxValue; + }); + } + + applyFeatures(userFeatures, glyphs, advances) { + let lookups = this.lookupsForFeatures(userFeatures); + this.applyLookups(lookups, glyphs, advances); + } + + applyLookups(lookups, glyphs, positions) { + this.glyphs = glyphs; + this.positions = positions; + this.glyphIterator = new GlyphIterator(glyphs); + + for (let {feature, lookup} of lookups) { + this.glyphIterator.reset(lookup.flags); + + while (this.glyphIterator.index < glyphs.length) { + if (!(feature in this.glyphIterator.cur.features)) { + this.glyphIterator.next(); + continue; + } + + for (let table of lookup.subTables) { + let res = this.applyLookup(lookup.lookupType, table); + if (res) { + break; + } + } + + this.glyphIterator.next(); + } + } + } + + applyLookup(lookup, table) { + throw new Error("applyLookup must be implemented by subclasses"); + } + + applyLookupList(lookupRecords) { + let glyphIndex = this.glyphIterator.index; + + for (let lookupRecord of lookupRecords) { + this.glyphIterator.index = glyphIndex; + this.glyphIterator.increment(lookupRecord.sequenceIndex); + + let lookup = this.table.lookupList.get(lookupRecord.lookupListIndex); + for (let table of lookup.subTables) { + this.applyLookup(lookup.lookupType, table); + } + } + + this.glyphIterator.index = glyphIndex; + return true; + } + + coverageIndex(coverage, glyph) { + if (glyph == null) { + glyph = this.glyphIterator.cur.id; + } + + switch (coverage.version) { + case 1: + return coverage.glyphs.indexOf(glyph); + + case 2: + for (let range of coverage.rangeRecords) { + if (range.start <= glyph && glyph <= range.end) { + return range.startCoverageIndex + glyph - range.start; + } + } + + break; + } + + return -1; + } + + match(sequenceIndex, sequence, fn, matched) { + let pos = this.glyphIterator.index; + let glyph = this.glyphIterator.increment(sequenceIndex); + let idx = 0; + + while (idx < sequence.length && glyph && fn(sequence[idx], glyph.id)) { + if (matched) { + matched.push(this.glyphIterator.index); + } + + idx++; + glyph = this.glyphIterator.next(); + } + + this.glyphIterator.index = pos; + if (idx < sequence.length) { + return false; + } + + return matched || true; + } + + sequenceMatches(sequenceIndex, sequence) { + return this.match(sequenceIndex, sequence, (component, glyph) => component === glyph); + } + + sequenceMatchIndices(sequenceIndex, sequence) { + return this.match(sequenceIndex, sequence, (component, glyph) => component === glyph, []); + } + + coverageSequenceMatches(sequenceIndex, sequence) { + return this.match(sequenceIndex, sequence, (coverage, glyph) => + this.coverageIndex(coverage, glyph) >= 0 + ); + } + + getClassID(glyph, classDef) { + switch (classDef.version) { + case 1: // Class array + let i = glyph - classDef.startGlyph; + if (i >= 0 && i < classDef.classValueArray.length) { + return classDef.classValueArray[i]; + } + + break; + + case 2: + for (let range of classDef.classRangeRecord) { + if (range.start <= glyph && glyph <= range.end) { + return range.class; + } + } + + break; + } + + return 0; + } + + classSequenceMatches(sequenceIndex, sequence, classDef) { + return this.match(sequenceIndex, sequence, (classID, glyph) => + classID === this.getClassID(glyph, classDef) + ); + } + + applyContext(table) { + switch (table.version) { + case 1: + let index = this.coverageIndex(table.coverage); + if (index === -1) { + return false; + } + + let set = table.ruleSets[index]; + for (let rule of set) { + if (this.sequenceMatches(1, rule.input)) { + return this.applyLookupList(rule.lookupRecords); + } + } + + break; + + case 2: + if (this.coverageIndex(table.coverage) === -1) { + return false; + } + + index = this.getClassID(this.glyphIterator.cur.id, table.classDef); + if (index === -1) { + return false; + } + + set = table.classSet[index]; + for (let rule of set) { + if (this.classSequenceMatches(1, rule.classes, table.classDef)) { + return this.applyLookupList(rule.lookupRecords); + } + } + + break; + + case 3: + if (this.coverageSequenceMatches(0, table.coverages)) { + return this.applyLookupList(table.lookupRecords); + } + + break; + } + + return false; + } + + applyChainingContext(table) { + switch (table.version) { + case 1: + let index = this.coverageIndex(table.coverage); + if (index === -1) { + return false; + } + + let set = table.chainRuleSets[index]; + for (let rule of set) { + if (this.sequenceMatches(-rule.backtrack.length, rule.backtrack) + && this.sequenceMatches(1, rule.input) + && this.sequenceMatches(1 + rule.input.length, rule.lookahead)) { + return this.applyLookupList(rule.lookupRecords); + } + } + + break; + + case 2: + if (this.coverageIndex(table.coverage) === -1) { + return false; + } + + index = this.getClassID(this.glyphIterator.cur.id, table.inputClassDef); + let rules = table.chainClassSet[index]; + if (!rules) { + return false; + } + + for (let rule of rules) { + if (this.classSequenceMatches(-rule.backtrack.length, rule.backtrack, table.backtrackClassDef) && + this.classSequenceMatches(1, rule.input, table.inputClassDef) && + this.classSequenceMatches(1 + rule.input.length, rule.lookahead, table.lookaheadClassDef)) { + return this.applyLookupList(rule.lookupRecords); + } + } + + break; + + case 3: + if (this.coverageSequenceMatches(-table.backtrackGlyphCount, table.backtrackCoverage) && + this.coverageSequenceMatches(0, table.inputCoverage) && + this.coverageSequenceMatches(table.inputGlyphCount, table.lookaheadCoverage)) { + return this.applyLookupList(table.lookupRecords); + } + + break; + } + + return false; + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/opentype/ShapingPlan.js b/pitfall/pdfkit/node_modules/fontkit/src/opentype/ShapingPlan.js new file mode 100644 index 00000000..b5645b8b --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/opentype/ShapingPlan.js @@ -0,0 +1,114 @@ +import * as Script from '../layout/Script'; + +/** + * ShapingPlans are used by the OpenType shapers to store which + * features should by applied, and in what order to apply them. + * The features are applied in groups called stages. A feature + * can be applied globally to all glyphs, or locally to only + * specific glyphs. + * + * @private + */ +export default class ShapingPlan { + constructor(font, script, language) { + this.font = font; + this.script = script; + this.language = language; + this.direction = Script.direction(script); + this.stages = []; + this.globalFeatures = {}; + this.allFeatures = {}; + } + + /** + * Adds the given features to the last stage. + * Ignores features that have already been applied. + */ + _addFeatures(features) { + let stage = this.stages[this.stages.length - 1]; + for (let feature of features) { + if (!this.allFeatures[feature]) { + stage.push(feature); + this.allFeatures[feature] = true; + } + } + } + + /** + * Adds the given features to the global list + */ + _addGlobal(features) { + for (let feature of features) { + this.globalFeatures[feature] = true; + } + } + + /** + * Add features to the last stage + */ + add(arg, global = true) { + if (this.stages.length === 0) { + this.stages.push([]); + } + + if (typeof arg === 'string') { + arg = [arg]; + } + + if (Array.isArray(arg)) { + this._addFeatures(arg); + if (global) { + this._addGlobal(arg); + } + } else if (typeof arg === 'object') { + let features = (arg.global || []).concat(arg.local || []); + this._addFeatures(features); + if (arg.global) { + this._addGlobal(arg.global); + } + } else { + throw new Error("Unsupported argument to ShapingPlan#add"); + } + } + + /** + * Add a new stage + */ + addStage(arg, global) { + if (typeof arg === 'function') { + this.stages.push(arg, []); + } else { + this.stages.push([]); + this.add(arg, global); + } + } + + /** + * Assigns the global features to the given glyphs + */ + assignGlobalFeatures(glyphs) { + for (let glyph of glyphs) { + for (let feature in this.globalFeatures) { + glyph.features[feature] = true; + } + } + } + + /** + * Executes the planned stages using the given OTProcessor + */ + process(processor, glyphs, positions) { + processor.selectScript(this.script, this.language); + + for (let stage of this.stages) { + if (typeof stage === 'function') { + if (!positions) { + stage(this.font, glyphs, positions); + } + + } else if (stage.length > 0) { + processor.applyFeatures(stage, glyphs, positions); + } + } + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/opentype/shapers/ArabicShaper.js b/pitfall/pdfkit/node_modules/fontkit/src/opentype/shapers/ArabicShaper.js new file mode 100644 index 00000000..2ccbbd29 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/opentype/shapers/ArabicShaper.js @@ -0,0 +1,122 @@ +import DefaultShaper from './DefaultShaper'; +import unicode from 'unicode-properties'; +import UnicodeTrie from 'unicode-trie'; + +const trie = new UnicodeTrie(require('fs').readFileSync(__dirname + '/data.trie')); +const FEATURES = ['isol', 'fina', 'fin2', 'fin3', 'medi', 'med2', 'init']; + +const ShapingClasses = { + Non_Joining: 0, + Left_Joining: 1, + Right_Joining: 2, + Dual_Joining: 3, + Join_Causing: 3, + ALAPH: 4, + 'DALATH RISH': 5, + Transparent: 6 +}; + +const ISOL = 'isol'; +const FINA = 'fina'; +const FIN2 = 'fin2'; +const FIN3 = 'fin3'; +const MEDI = 'medi'; +const MED2 = 'med2'; +const INIT = 'init'; +const NONE = null; + +// Each entry is [prevAction, curAction, nextState] +const STATE_TABLE = [ + // Non_Joining, Left_Joining, Right_Joining, Dual_Joining, ALAPH, DALATH RISH + // State 0: prev was U, not willing to join. + [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ NONE, ISOL, 1 ], [ NONE, ISOL, 2 ], [ NONE, ISOL, 1 ], [ NONE, ISOL, 6 ] ], + + // State 1: prev was R or ISOL/ALAPH, not willing to join. + [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ NONE, ISOL, 1 ], [ NONE, ISOL, 2 ], [ NONE, FIN2, 5 ], [ NONE, ISOL, 6 ] ], + + // State 2: prev was D/L in ISOL form, willing to join. + [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ INIT, FINA, 1 ], [ INIT, FINA, 3 ], [ INIT, FINA, 4 ], [ INIT, FINA, 6 ] ], + + // State 3: prev was D in FINA form, willing to join. + [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ MEDI, FINA, 1 ], [ MEDI, FINA, 3 ], [ MEDI, FINA, 4 ], [ MEDI, FINA, 6 ] ], + + // State 4: prev was FINA ALAPH, not willing to join. + [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ MED2, ISOL, 1 ], [ MED2, ISOL, 2 ], [ MED2, FIN2, 5 ], [ MED2, ISOL, 6 ] ], + + // State 5: prev was FIN2/FIN3 ALAPH, not willing to join. + [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ ISOL, ISOL, 1 ], [ ISOL, ISOL, 2 ], [ ISOL, FIN2, 5 ], [ ISOL, ISOL, 6 ] ], + + // State 6: prev was DALATH/RISH, not willing to join. + [ [ NONE, NONE, 0 ], [ NONE, ISOL, 2 ], [ NONE, ISOL, 1 ], [ NONE, ISOL, 2 ], [ NONE, FIN3, 5 ], [ NONE, ISOL, 6 ] ] +]; + +/** + * This is a shaper for Arabic, and other cursive scripts. + * It uses data from ArabicShaping.txt in the Unicode database, + * compiled to a UnicodeTrie by generate-data.coffee. + * + * The shaping state machine was ported from Harfbuzz. + * https://github.com/behdad/harfbuzz/blob/master/src/hb-ot-shape-complex-arabic.cc + */ +export default class ArabicShaper extends DefaultShaper { + static planFeatures(plan) { + plan.add(['ccmp', 'locl']); + for (let i = 0; i < FEATURES.length; i++) { + let feature = FEATURES[i]; + plan.addStage(feature, false); + } + + plan.addStage('mset'); + } + + static assignFeatures(plan, glyphs) { + super.assignFeatures(plan, glyphs); + + let prev = -1; + let state = 0; + let actions = []; + + // Apply the state machine to map glyphs to features + for (let i = 0; i < glyphs.length; i++) { + let curAction, prevAction; + var glyph = glyphs[i]; + let type = getShapingClass(glyph.codePoints[0]); + if (type === ShapingClasses.Transparent) { + actions[i] = NONE; + continue; + } + + [prevAction, curAction, state] = STATE_TABLE[state][type]; + + if (prevAction !== NONE && prev !== -1) { + actions[prev] = prevAction; + } + + actions[i] = curAction; + prev = i; + } + + // Apply the chosen features to their respective glyphs + for (let index = 0; index < glyphs.length; index++) { + let feature; + var glyph = glyphs[index]; + if (feature = actions[index]) { + glyph.features[feature] = true; + } + } + } +} + +function getShapingClass(codePoint) { + let res = trie.get(codePoint); + if (res) { + return res - 1; + } + + let category = unicode.getCategory(codePoint); + if (category === 'Mn' || category === 'Me' || category === 'Cf') { + return ShapingClasses.Transparent; + } + + return ShapingClasses.Non_Joining; +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/opentype/shapers/DefaultShaper.js b/pitfall/pdfkit/node_modules/fontkit/src/opentype/shapers/DefaultShaper.js new file mode 100644 index 00000000..08ba1a17 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/opentype/shapers/DefaultShaper.js @@ -0,0 +1,75 @@ +import unicode from 'unicode-properties'; + +const VARIATION_FEATURES = ['rvrn']; +const COMMON_FEATURES = ['ccmp', 'locl', 'rlig', 'mark', 'mkmk']; +const FRACTIONAL_FEATURES = ['frac', 'numr', 'dnom']; +const HORIZONTAL_FEATURES = ['calt', 'clig', 'liga', 'rclt', 'curs', 'kern']; +const VERTICAL_FEATURES = ['vert']; +const DIRECTIONAL_FEATURES = { + ltr: ['ltra', 'ltrm'], + rtl: ['rtla', 'rtlm'] +}; + +export default class DefaultShaper { + static zeroMarkWidths = 'AFTER_GPOS'; + static plan(plan, glyphs, features) { + // Plan the features we want to apply + this.planPreprocessing(plan); + this.planFeatures(plan); + this.planPostprocessing(plan, features); + + // Assign the global features to all the glyphs + plan.assignGlobalFeatures(glyphs); + + // Assign local features to glyphs + this.assignFeatures(plan, glyphs); + } + + static planPreprocessing(plan) { + plan.add({ + global: [...VARIATION_FEATURES, ...DIRECTIONAL_FEATURES[plan.direction]], + local: FRACTIONAL_FEATURES + }); + } + + static planFeatures(plan) { + // Do nothing by default. Let subclasses override this. + } + + static planPostprocessing(plan, userFeatures) { + plan.add([...COMMON_FEATURES, ...HORIZONTAL_FEATURES, ...userFeatures]); + } + + static assignFeatures(plan, glyphs) { + // Enable contextual fractions + let i = 0; + while (i < glyphs.length) { + let glyph = glyphs[i]; + if (glyph.codePoints[0] === 0x2044) { // fraction slash + let start = i - 1; + let end = i + 1; + + // Apply numerator + while (start >= 0 && unicode.isDigit(glyphs[start].codePoints[0])) { + glyphs[start].features.numr = true; + glyphs[start].features.frac = true; + start--; + } + + // Apply denominator + while (end < glyphs.length && unicode.isDigit(glyphs[end].codePoints[0])) { + glyphs[end].features.dnom = true; + glyphs[end].features.frac = true; + end++; + } + + // Apply fraction slash + glyph.features.frac = true; + i = end - 1; + + } else { + i++; + } + } + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/opentype/shapers/HangulShaper.js b/pitfall/pdfkit/node_modules/fontkit/src/opentype/shapers/HangulShaper.js new file mode 100644 index 00000000..789fb76f --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/opentype/shapers/HangulShaper.js @@ -0,0 +1,285 @@ +import DefaultShaper from './DefaultShaper'; +import GlyphInfo from '../GlyphInfo'; + +/** + * This is a shaper for the Hangul script, used by the Korean language. + * It does the following: + * - decompose if unsupported by the font: + * -> + * -> + * -> + * + * - compose if supported by the font: + * -> + * -> + * -> + * + * - reorder tone marks (S is any valid syllable): + * -> + * + * - apply ljmo, vjmo, and tjmo OpenType features to decomposed Jamo sequences. + * + * This logic is based on the following documents: + * - http://www.microsoft.com/typography/OpenTypeDev/hangul/intro.htm + * - http://ktug.org/~nomos/harfbuzz-hangul/hangulshaper.pdf + */ +export default class HangulShaper extends DefaultShaper { + static zeroMarkWidths = 'NONE'; + static planFeatures(plan) { + plan.add(['ljmo', 'vjmo', 'tjmo'], false); + } + + static assignFeatures(plan, glyphs) { + let state = 0; + let i = 0; + while (i < glyphs.length) { + let action; + let glyph = glyphs[i]; + let code = glyph.codePoints[0]; + let type = getType(code); + + [ action, state ] = STATE_TABLE[state][type]; + + switch (action) { + case DECOMPOSE: + // Decompose the composed syllable if it is not supported by the font. + if (!plan.font.hasGlyphForCodePoint(code)) { + i = decompose(glyphs, i, plan.font); + } + break; + + case COMPOSE: + // Found a decomposed syllable. Try to compose if supported by the font. + i = compose(glyphs, i, plan.font); + break; + + case TONE_MARK: + // Got a valid syllable, followed by a tone mark. Move the tone mark to the beginning of the syllable. + reorderToneMark(glyphs, i, plan.font); + break; + + case INVALID: + // Tone mark has no valid syllable to attach to, so insert a dotted circle + i = insertDottedCircle(glyphs, i, plan.font); + break; + } + + i++; + } + } +} + +const HANGUL_BASE = 0xac00; +const HANGUL_END = 0xd7a4; +const HANGUL_COUNT = HANGUL_END - HANGUL_BASE + 1; +const L_BASE = 0x1100; // lead +const V_BASE = 0x1161; // vowel +const T_BASE = 0x11a7; // trail +const L_COUNT = 19; +const V_COUNT = 21; +const T_COUNT = 28; +const L_END = L_BASE + L_COUNT - 1; +const V_END = V_BASE + V_COUNT - 1; +const T_END = T_BASE + T_COUNT - 1; +const DOTTED_CIRCLE = 0x25cc; + +const isL = code => 0x1100 <= code && code <= 0x115f || 0xa960 <= code && code <= 0xa97c; +const isV = code => 0x1160 <= code && code <= 0x11a7 || 0xd7b0 <= code && code <= 0xd7c6; +const isT = code => 0x11a8 <= code && code <= 0x11ff || 0xd7cb <= code && code <= 0xd7fb; +const isTone = code => 0x302e <= code && code <= 0x302f; +const isLVT = code => HANGUL_BASE <= code && code <= HANGUL_END; +const isLV = code => (code - HANGUL_BASE) < HANGUL_COUNT && (code - HANGUL_BASE) % T_COUNT === 0; +const isCombiningL = code => L_BASE <= code && code <= L_END; +const isCombiningV = code => V_BASE <= code && code <= V_END; +const isCombiningT = code => T_BASE + 1 && 1 <= code && code <= T_END; + +// Character categories +const X = 0; // Other character +const L = 1; // Leading consonant +const V = 2; // Medial vowel +const T = 3; // Trailing consonant +const LV = 4; // Composed syllable +const LVT = 5; // Composed syllable +const M = 6; // Tone mark + +// This function classifies a character using the above categories. +function getType(code) { + if (isL(code)) { return L; } + if (isV(code)) { return V; } + if (isT(code)) { return T; } + if (isLV(code)) { return LV; } + if (isLVT(code)) { return LVT; } + if (isTone(code)) { return M; } + return X; +} + +// State machine actions +const NO_ACTION = 0; +const DECOMPOSE = 1; +const COMPOSE = 2; +const TONE_MARK = 4; +const INVALID = 5; + +// Build a state machine that accepts valid syllables, and applies actions along the way. +// The logic this is implementing is documented at the top of the file. +const STATE_TABLE = [ + // X L V T LV LVT M + // State 0: start state + [ [ NO_ACTION, 0 ], [ NO_ACTION, 1 ], [ NO_ACTION, 0 ], [ NO_ACTION, 0 ], [ DECOMPOSE, 2 ], [ DECOMPOSE, 3 ], [ INVALID, 0 ] ], + + // State 1: + [ [ NO_ACTION, 0 ], [ NO_ACTION, 1 ], [ COMPOSE, 2 ], [ NO_ACTION, 0 ], [ DECOMPOSE, 2 ], [ DECOMPOSE, 3 ], [ INVALID, 0 ] ], + + // State 2: or + [ [ NO_ACTION, 0 ], [ NO_ACTION, 1 ], [ NO_ACTION, 0 ], [ COMPOSE, 3 ], [ DECOMPOSE, 2 ], [ DECOMPOSE, 3 ], [ TONE_MARK, 0 ] ], + + // State 3: or + [ [ NO_ACTION, 0 ], [ NO_ACTION, 1 ], [ NO_ACTION, 0 ], [ NO_ACTION, 0 ], [ DECOMPOSE, 2 ], [ DECOMPOSE, 3 ], [ TONE_MARK, 0 ] ] +]; + +function getGlyph(font, code, features) { + return new GlyphInfo(font, font.glyphForCodePoint(code).id, [code], features); +} + +function decompose(glyphs, i, font) { + let glyph = glyphs[i]; + let code = glyph.codePoints[0]; + + let s = code - HANGUL_BASE; + let t = T_BASE + s % T_COUNT; + s = s / T_COUNT | 0; + let l = L_BASE + s / V_COUNT | 0; + let v = V_BASE + s % V_COUNT; + + // Don't decompose if all of the components are not available + if (!font.hasGlyphForCodePoint(l) || + !font.hasGlyphForCodePoint(v) || + (t !== T_BASE && !font.hasGlyphForCodePoint(t))) { + return i; + } + + // Replace the current glyph with decomposed L, V, and T glyphs, + // and apply the proper OpenType features to each component. + let ljmo = getGlyph(font, l, glyph.features); + ljmo.features.ljmo = true; + + let vjmo = getGlyph(font, v, glyph.features); + vjmo.features.vjmo = true; + + let insert = [ ljmo, vjmo ]; + + if (t > T_BASE) { + let tjmo = getGlyph(font, t, glyph.features); + tjmo.features.tjmo = true; + insert.push(tjmo); + } + + glyphs.splice(i, 1, ...insert); + return i + insert.length - 1; +} + +function compose(glyphs, i, font) { + let glyph = glyphs[i]; + let code = glyphs[i].codePoints[0]; + let type = getType(code); + + let prev = glyphs[i - 1].codePoints[0]; + let prevType = getType(prev); + + // Figure out what type of syllable we're dealing with + let lv, ljmo, vjmo, tjmo; + if (prevType === LV && type === T) { + // + lv = prev; + tjmo = glyph; + } else { + if (type === V) { + // + ljmo = glyphs[i - 1]; + vjmo = glyph; + } else { + // + ljmo = glyphs[i - 2]; + vjmo = glyphs[i - 1]; + tjmo = glyph; + } + + let l = ljmo.codePoints[0]; + let v = vjmo.codePoints[0]; + + // Make sure L and V are combining characters + if (isCombiningL(l) && isCombiningV(v)) { + lv = HANGUL_BASE + ((l - L_BASE) * V_COUNT + (v - V_BASE)) * T_COUNT; + } + } + + let t = (tjmo && tjmo.codePoints[0]) || T_BASE; + if ((lv != null) && (t === T_BASE || isCombiningT(t))) { + let s = lv + (t - T_BASE); + + // Replace with a composed glyph if supported by the font, + // otherwise apply the proper OpenType features to each component. + if (font.hasGlyphForCodePoint(s)) { + let del = prevType === V ? 3 : 2; + glyphs.splice(i - del + 1, del, getGlyph(font, s, glyph.features)); + return i - del + 1; + } + } + + // Didn't compose (either a non-combining component or unsupported by font). + if (ljmo) { ljmo.features.ljmo = true; } + if (vjmo) { vjmo.features.vjmo = true; } + if (tjmo) { tjmo.features.tjmo = true; } + + if (prevType === LV) { + // Sequence was originally , which got combined earlier. + // Either the T was non-combining, or the LVT glyph wasn't supported. + // Decompose the glyph again and apply OT features. + decompose(glyphs, i - 1, font); + return i + 1; + } + + return i; +} + +function getLength(code) { + switch (getType(code)) { + case LV: + case LVT: + return 1; + case V: + return 2; + case T: + return 3; + } +} + +function reorderToneMark(glyphs, i, font) { + let glyph = glyphs[i]; + let code = glyphs[i].codePoints[0]; + + // Move tone mark to the beginning of the previous syllable, unless it is zero width + if (font.glyphForCodePoint(code).advanceWidth === 0) { return; } + + let prev = glyphs[i - 1].codePoints[0]; + let len = getLength(prev); + + glyphs.splice(i, 1); + return glyphs.splice(i - len, 0, glyph); +} + +function insertDottedCircle(glyphs, i, font) { + let glyph = glyphs[i]; + let code = glyphs[i].codePoints[0]; + + if (font.hasGlyphForCodePoint(DOTTED_CIRCLE)) { + let dottedCircle = getGlyph(font, DOTTED_CIRCLE, glyph.features); + + // If the tone mark is zero width, insert the dotted circle before, otherwise after + let idx = font.glyphForCodePoint(code).advanceWidth === 0 ? i : i + 1; + glyphs.splice(idx, 0, dottedCircle); + i++; + } + + return i; +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/opentype/shapers/UniversalShaper.js b/pitfall/pdfkit/node_modules/fontkit/src/opentype/shapers/UniversalShaper.js new file mode 100644 index 00000000..bd8679a2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/opentype/shapers/UniversalShaper.js @@ -0,0 +1,184 @@ +import DefaultShaper from './DefaultShaper'; +import StateMachine from 'dfa'; +import UnicodeTrie from 'unicode-trie'; +import GlyphInfo from '../GlyphInfo'; +import useData from './use.json'; + +const {categories, decompositions} = useData; +const trie = new UnicodeTrie(require('fs').readFileSync(__dirname + '/use.trie')); +const stateMachine = new StateMachine(useData); + +/** + * This shaper is an implementation of the Universal Shaping Engine, which + * uses Unicode data to shape a number of scripts without a dedicated shaping engine. + * See https://www.microsoft.com/typography/OpenTypeDev/USE/intro.htm. + */ +export default class UniversalShaper extends DefaultShaper { + static zeroMarkWidths = 'BEFORE_GPOS'; + static planFeatures(plan) { + plan.addStage(setupSyllables); + + // Default glyph pre-processing group + plan.addStage(['locl', 'ccmp', 'nukt', 'akhn']); + + // Reordering group + plan.addStage(clearSubstitutionFlags); + plan.addStage(['rphf'], false); + plan.addStage(recordRphf); + plan.addStage(clearSubstitutionFlags); + plan.addStage(['pref']); + plan.addStage(recordPref); + + // Orthographic unit shaping group + plan.addStage(['rkrf', 'abvf', 'blwf', 'half', 'pstf', 'vatu', 'cjct']); + plan.addStage(reorder); + + // Topographical features + // Scripts that need this are handled by the Arabic shaper, not implemented here for now. + // plan.addStage(['isol', 'init', 'medi', 'fina', 'med2', 'fin2', 'fin3'], false); + + // Standard topographic presentation and positional feature application + plan.addStage(['abvs', 'blws', 'pres', 'psts', 'dist', 'abvm', 'blwm']); + } + + static assignFeatures(plan, glyphs) { + // Decompose split vowels + // TODO: do this in a more general unicode normalizer + for (let i = glyphs.length - 1; i >= 0; i--) { + let codepoint = glyphs[i].codePoints[0]; + if (decompositions[codepoint]) { + let decomposed = decompositions[codepoint].map(c => { + let g = plan.font.glyphForCodePoint(c); + return new GlyphInfo(plan.font, g.id, [c], glyphs[i].features); + }); + + glyphs.splice(i, 1, ...decomposed); + } + } + } +} + +function useCategory(glyph) { + return trie.get(glyph.codePoints[0]); +} + +class USEInfo { + constructor(category, syllableType, syllable) { + this.category = category; + this.syllableType = syllableType; + this.syllable = syllable; + } +} + +function setupSyllables(font, glyphs) { + let syllable = 0; + for (let [start, end, tags] of stateMachine.match(glyphs.map(useCategory))) { + ++syllable; + + // Create shaper info + for (let i = start; i <= end; i++) { + glyphs[i].shaperInfo = new USEInfo(categories[useCategory(glyphs[i])], tags[0], syllable); + } + + // Assign rphf feature + let limit = glyphs[start].shaperInfo.category === 'R' ? 1 : Math.min(3, end - start); + for (let i = start; i < start + limit; i++) { + glyphs[i].features.rphf = true; + } + } +} + +function clearSubstitutionFlags(font, glyphs) { + for (let glyph of glyphs) { + glyph.substituted = false; + } +} + +function recordRphf(font, glyphs) { + for (let glyph of glyphs) { + if (glyph.substituted && glyph.features.rphf) { + // Mark a substituted repha. + glyph.shaperInfo.category = 'R'; + } + } +} + +function recordPref(font, glyphs) { + for (let glyph of glyphs) { + if (glyph.substituted) { + // Mark a substituted pref as VPre, as they behave the same way. + glyph.shaperInfo.category = 'VPre'; + } + } +} + +function reorder(font, glyphs) { + let dottedCircle = font.glyphForCodePoint(0x25cc).id; + + for (let start = 0, end = nextSyllable(glyphs, 0); start < glyphs.length; start = end, end = nextSyllable(glyphs, start)) { + let i, j; + let info = glyphs[start].shaperInfo; + let type = info.syllableType; + + // Only a few syllable types need reordering. + if (type !== 'virama_terminated_cluster' && type !== 'standard_cluster' && type !== 'broken_cluster') { + continue; + } + + // Insert a dotted circle glyph in broken clusters. + if (type === 'broken_cluster' && dottedCircle) { + let g = new GlyphInfo(font, dottedCircle, [0x25cc]); + g.shaperInfo = info; + + // Insert after possible Repha. + for (i = start; i < end && glyphs[i].shaperInfo.category === 'R'; i++); + glyphs.splice(++i, 0, g); + end++; + } + + // Move things forward. + if (info.category === 'R' && end - start > 1) { + // Got a repha. Reorder it to after first base, before first halant. + for (i = start + 1; i < end; i++) { + info = glyphs[i].shaperInfo; + if (isBase(info) || isHalant(glyphs[i])) { + // If we hit a halant, move before it; otherwise it's a base: move to it's + // place, and shift things in between backward. + if (isHalant(glyphs[i])) { + i--; + } + + glyphs.splice(start, 0, ...glyphs.splice(start + 1, i - start), glyphs[i]); + break; + } + } + } + + // Move things back. + for (i = start, j = end; i < end; i++) { + info = glyphs[i].shaperInfo; + if (isBase(info) || isHalant(glyphs[i])) { + // If we hit a halant, move after it; otherwise it's a base: move to it's + // place, and shift things in between backward. + j = isHalant(glyphs[i]) ? i + 1 : i; + } else if ((info.category === 'VPre' || info.category === 'VMPre') && j < i) { + glyphs.splice(j, 1, glyphs[i], ...glyphs.splice(j, i - j)); + } + } + } +} + +function nextSyllable(glyphs, start) { + if (start >= glyphs.length) return start; + let syllable = glyphs[start].shaperInfo.syllable; + while (++start < glyphs.length && glyphs[start].shaperInfo.syllable === syllable); + return start; +} + +function isHalant(glyph) { + return glyph.shaperInfo.category === 'H' && !glyph.isLigated; +} + +function isBase(info) { + return info.category === 'B' || info.category === 'GB'; +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/opentype/shapers/data.trie b/pitfall/pdfkit/node_modules/fontkit/src/opentype/shapers/data.trie new file mode 100644 index 00000000..5f6b4909 Binary files /dev/null and b/pitfall/pdfkit/node_modules/fontkit/src/opentype/shapers/data.trie differ diff --git a/pitfall/pdfkit/node_modules/fontkit/src/opentype/shapers/gen-use.js b/pitfall/pdfkit/node_modules/fontkit/src/opentype/shapers/gen-use.js new file mode 100644 index 00000000..b7cb944e --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/opentype/shapers/gen-use.js @@ -0,0 +1,285 @@ +import codepoints from 'codepoints'; +import fs from 'fs'; +import UnicodeTrieBuilder from 'unicode-trie/builder'; +import compile from 'dfa/compile'; + +const CATEGORIES = { + B: [ + {UISC: 'Number'}, + {UISC: 'Avagraha', UGC: 'Lo'}, + {UISC: 'Bindu', UGC: 'Lo'}, + {UISC: 'Consonant'}, + {UISC: 'Consonant_Final', UGC: 'Lo'}, + {UISC: 'Consonant_Head_Letter'}, + {UISC: 'Consonant_Medial', UGC: 'Lo'}, + {UISC: 'Consonant_Subjoined', UGC: 'Lo'}, + {UISC: 'Tone_Letter'}, + {UISC: 'Vowel', UGC: 'Lo'}, + {UISC: 'Vowel_Independent'}, + {UISC: 'Vowel_Dependent', UGC: 'Lo'} + ], + CGJ: [0x034f], + CM: [ + 'Nukta', + 'Gemination_Mark', + 'Consonant_Killer' + ], + CS: [ + 'Consonant_With_Stacker' + ], + F: [ + {UISC: 'Consonant_Final', UGC: {not: 'Lo'}}, + {UISC: 'Consonant_Succeeding_Repha'} + ], + FM: [ + 'Syllable_Modifier' + ], + GB: [ + 'Consonant_Placeholder', + 0x2015, + 0x2022, + 0x25fb, + 0x25fc, + 0x25fd, + 0x25fe + ], + H: [ + 'Virama', + 'Invisible_Stacker' + ], + HN: [ + 'Number_Joiner' + ], + IND: [ + 'Consonant_Dead', + 'Modifying_Letter', + {UGC: 'Po', U: {not: [0x104e, 0x2022]}} + ], + M: [ + {UISC: 'Consonant_Medial', UGC: {not: 'Lo'}} + ], + N: [ + 'Brahmi_Joining_Number' + ], + R: [ + 'Consonant_Preceding_Repha', + 'Consonant_Prefixed' + ], + Rsv: [ + {UGC: 'Cn'} // TODO + ], + S: [ + {UGC: 'So', U: {not: 0x25cc}}, + {UGC: 'Sc'} + ], + SM: [ + 0x1b6b, + 0x1b6c, + 0x1b6d, + 0x1b6e, + 0x1b6f, + 0x1b70, + 0x1b71, + 0x1b72, + 0x1b73 + ], + SUB: [ + {UISC: 'Consonant_Subjoined', UGC: {not: 'Lo'}} + ], + V: [ + {UISC: 'Vowel', UGC: {not: 'Lo'}}, + {UISC: 'Vowel_Dependent', UGC: {not: 'Lo'}}, + {UISC: 'Pure_Killer'} + ], + VM: [ + {UISC: 'Bindu', UGC: {not: 'Lo'}}, + 'Tone_Mark', + 'Cantillation_Mark', + 'Register_Shifter', + 'Visarga' + ], + VS: [ + 0xfe00, 0xfe01, 0xfe02, 0xfe03, 0xfe04, 0xfe05, 0xfe06, 0xfe07, + 0xfe08, 0xfe09, 0xfe0a, 0xfe0b, 0xfe0c, 0xfe0d, 0xfe0e, 0xfe0f + ], + WJ: [0x2060], + ZWJ: [ + 'Joiner' + ], + ZWNJ: [ + 'Non_Joiner' + ], + O: [ + 'Other' + ] +}; + +const USE_POSITIONS = { + F: { + Abv: ['Top'], + Blw: ['Bottom'], + Pst: ['Right'], + }, + M: { + Abv: ['Top'], + Blw: ['Bottom'], + Pst: ['Right'], + Pre: ['Left'], + }, + CM: { + Abv: ['Top'], + Blw: ['Bottom'], + }, + V: { + Abv: ['Top', 'Top_And_Bottom', 'Top_And_Bottom_And_Right', 'Top_And_Right'], + Blw: ['Bottom', 'Overstruck', 'Bottom_And_Right'], + Pst: ['Right'], + Pre: ['Left', 'Top_And_Left', 'Top_And_Left_And_Right', 'Left_And_Right'], + }, + VM: { + Abv: ['Top'], + Blw: ['Bottom', 'Overstruck'], + Pst: ['Right'], + Pre: ['Left'], + }, + SM: { + Abv: ['Top'], + Blw: ['Bottom'], + } +}; + +const UISC_OVERRIDE = { + 0x17dd: 'Vowel_Dependent', + 0x1ce2: 'Cantillation_Mark', + 0x1ce3: 'Cantillation_Mark', + 0x1ce4: 'Cantillation_Mark', + 0x1ce5: 'Cantillation_Mark', + 0x1ce6: 'Cantillation_Mark', + 0x1ce7: 'Cantillation_Mark', + 0x1ce8: 'Cantillation_Mark', + 0x1ced: 'Tone_Mark' +}; + +const UIPC_OVERRIDE = { + 0x1b6c: 'Bottom', + 0x953: 'Not_Applicable', + 0x954: 'Not_Applicable', + 0x103c: 'Left', + 0xa926: 'Top', + 0xa927: 'Top', + 0xa928: 'Top', + 0xa929: 'Top', + 0xa92a: 'Top', + 0x111ca: 'Bottom', + 0x11300: 'Top', + 0x1133c: 'Bottom', + 0x1171e: 'Left', + 0x1cf2: 'Right', + 0x1cf3: 'Right', + 0x1cf8: 'Top', + 0x1cf9: 'Top' +}; + +function check(pattern, value) { + if (typeof pattern === 'object' && pattern.not) { + if (Array.isArray(pattern.not)) { + return pattern.not.indexOf(value) === -1; + } else { + return value !== pattern.not; + } + } + + return value === pattern; +} + +function matches(pattern, code) { + if (typeof pattern === 'number') { + pattern = {U: pattern}; + } else if (typeof pattern === 'string') { + pattern = {UISC: pattern}; + } + + for (let key in pattern) { + if (!check(pattern[key], code[key])) { + return false; + } + } + + return true; +} + +function getUISC(code) { + return UISC_OVERRIDE[code.code] || code.indicSyllabicCategory || 'Other'; +} + +function getUIPC(code) { + return UIPC_OVERRIDE[code.code] || code.indicPositionalCategory; +} + +function getPositionalCategory(code, USE) { + let UIPC = getUIPC(code); + let pos = USE_POSITIONS[USE]; + if (pos) { + for (let key in pos) { + if (pos[key].indexOf(UIPC) !== -1) { + return USE + key; + } + } + } + + return USE; +} + +function getCategory(code) { + for (let category in CATEGORIES) { + for (let pattern of CATEGORIES[category]) { + if (matches(pattern, {UISC: getUISC(code), UGC: code.category, U: code.code})) { + return getPositionalCategory(code, category); + } + } + } + + return null; +} + +let trie = new UnicodeTrieBuilder; +let symbols = {}; +let numSymbols = 0; +let decompositions = {}; +for (let i = 0; i < codepoints.length; i++) { + let codepoint = codepoints[i]; + if (codepoint) { + let category = getCategory(codepoint); + if (!(category in symbols)) { + symbols[category] = numSymbols++; + } + + trie.set(codepoint.code, symbols[category]); + + if (codepoint.indicSyllabicCategory === 'Vowel_Dependent' && codepoint.decomposition.length > 0) { + decompositions[codepoint.code] = decompose(codepoint.code); + } + } +} + +function decompose(code) { + let decomposition = []; + let codepoint = codepoints[code]; + for (let c of codepoint.decomposition) { + let codes = decompose(c); + codes = codes.length > 0 ? codes : [c]; + decomposition.push(...codes); + } + + return decomposition; +} + +fs.writeFileSync(__dirname + '/use.trie', trie.toBuffer()); + +let stateMachine = compile(fs.readFileSync(__dirname + '/use.machine', 'utf8'), symbols); +let json = Object.assign({ + categories: Object.keys(symbols), + decompositions: decompositions +}, stateMachine); + +fs.writeFileSync(__dirname + '/use.json', JSON.stringify(json)); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/opentype/shapers/generate-data.js b/pitfall/pdfkit/node_modules/fontkit/src/opentype/shapers/generate-data.js new file mode 100644 index 00000000..f07dcd2f --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/opentype/shapers/generate-data.js @@ -0,0 +1,33 @@ +// +// This script generates a UnicodeTrie containing shaping data derived +// from Unicode properties (currently just for the Arabic shaper). +// +import codepoints from 'codepoints'; +import fs from 'fs'; +import UnicodeTrieBuilder from 'unicode-trie/builder'; + +let ShapingClasses = { + Non_Joining: 0, + Left_Joining: 1, + Right_Joining: 2, + Dual_Joining: 3, + Join_Causing: 3, + ALAPH: 4, + 'DALATH RISH': 5, + Transparent: 6 +}; + +let trie = new UnicodeTrieBuilder; +for (let i = 0; i < codepoints.length; i++) { + let codepoint = codepoints[i]; + if (codepoint) { + if (codepoint.joiningGroup === 'ALAPH' || codepoint.joiningGroup === 'DALATH RISH') { + trie.set(codepoint.code, ShapingClasses[codepoint.joiningGroup] + 1); + + } else if (codepoint.joiningType) { + trie.set(codepoint.code, ShapingClasses[codepoint.joiningType] + 1); + } + } +} + +fs.writeFileSync(__dirname + '/data.trie', trie.toBuffer()); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/opentype/shapers/index.js b/pitfall/pdfkit/node_modules/fontkit/src/opentype/shapers/index.js new file mode 100644 index 00000000..269a770d --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/opentype/shapers/index.js @@ -0,0 +1,73 @@ +import DefaultShaper from './DefaultShaper'; +import ArabicShaper from './ArabicShaper'; +import HangulShaper from './HangulShaper'; +import UniversalShaper from './UniversalShaper'; + +const SHAPERS = { + arab: ArabicShaper, // Arabic + mong: ArabicShaper, // Mongolian + syrc: ArabicShaper, // Syriac + 'nko ': ArabicShaper, // N'Ko + phag: ArabicShaper, // Phags Pa + mand: ArabicShaper, // Mandaic + mani: ArabicShaper, // Manichaean + phlp: ArabicShaper, // Psalter Pahlavi + + hang: HangulShaper, // Hangul + + bali: UniversalShaper, // Balinese + batk: UniversalShaper, // Batak + brah: UniversalShaper, // Brahmi + bugi: UniversalShaper, // Buginese + buhd: UniversalShaper, // Buhid + cakm: UniversalShaper, // Chakma + cham: UniversalShaper, // Cham + dupl: UniversalShaper, // Duployan + egyp: UniversalShaper, // Egyptian Hieroglyphs + gran: UniversalShaper, // Grantha + hano: UniversalShaper, // Hanunoo + java: UniversalShaper, // Javanese + kthi: UniversalShaper, // Kaithi + kali: UniversalShaper, // Kayah Li + khar: UniversalShaper, // Kharoshthi + khoj: UniversalShaper, // Khojki + sind: UniversalShaper, // Khudawadi + lepc: UniversalShaper, // Lepcha + limb: UniversalShaper, // Limbu + mahj: UniversalShaper, // Mahajani + // mand: UniversalShaper, // Mandaic + // mani: UniversalShaper, // Manichaean + mtei: UniversalShaper, // Meitei Mayek + modi: UniversalShaper, // Modi + // mong: UniversalShaper, // Mongolian + // 'nko ': UniversalShaper, // N’Ko + hmng: UniversalShaper, // Pahawh Hmong + // phag: UniversalShaper, // Phags-pa + // phlp: UniversalShaper, // Psalter Pahlavi + rjng: UniversalShaper, // Rejang + saur: UniversalShaper, // Saurashtra + shrd: UniversalShaper, // Sharada + sidd: UniversalShaper, // Siddham + sinh: UniversalShaper, // Sinhala + sund: UniversalShaper, // Sundanese + sylo: UniversalShaper, // Syloti Nagri + tglg: UniversalShaper, // Tagalog + tagb: UniversalShaper, // Tagbanwa + tale: UniversalShaper, // Tai Le + lana: UniversalShaper, // Tai Tham + tavt: UniversalShaper, // Tai Viet + takr: UniversalShaper, // Takri + tibt: UniversalShaper, // Tibetan + tfng: UniversalShaper, // Tifinagh + tirh: UniversalShaper, // Tirhuta + + latn: DefaultShaper, // Latin + DFLT: DefaultShaper // Default +}; + +export function choose(script) { + let shaper = SHAPERS[script]; + if (shaper) { return shaper; } + + return DefaultShaper; +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/opentype/shapers/use.json b/pitfall/pdfkit/node_modules/fontkit/src/opentype/shapers/use.json new file mode 100644 index 00000000..0cd29174 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/opentype/shapers/use.json @@ -0,0 +1 @@ +{"categories":["O","IND","S","GB","B","FM","CGJ","VMAbv","VMPst","VAbv","VPst","CMBlw","VPre","VBlw","H","VMBlw","CMAbv","MBlw","CS","R","SUB","MPst","MPre","FAbv","FPst","FBlw","SMAbv","SMBlw","VMPre","ZWNJ","ZWJ","WJ","VS","N","HN","MAbv"],"decompositions":{"2507":[2503,2494],"2508":[2503,2519],"2888":[2887,2902],"2891":[2887,2878],"2892":[2887,2903],"3018":[3014,3006],"3019":[3015,3006],"3020":[3014,3031],"3144":[3142,3158],"3264":[3263,3285],"3271":[3270,3285],"3272":[3270,3286],"3274":[3270,3266],"3275":[3270,3266,3285],"3402":[3398,3390],"3403":[3399,3390],"3404":[3398,3415],"3546":[3545,3530],"3548":[3545,3535],"3549":[3545,3535,3530],"3550":[3545,3551],"3635":[3661,3634],"3763":[3789,3762],"3955":[3953,3954],"3957":[3953,3956],"3958":[4018,3968],"3959":[4018,3953,3968],"3960":[4019,3968],"3961":[4019,3953,3968],"3969":[3953,3968],"6971":[6970,6965],"6973":[6972,6965],"6976":[6974,6965],"6977":[6975,6965],"6979":[6978,6965],"69934":[69937,69927],"69935":[69938,69927],"70475":[70471,70462],"70476":[70471,70487],"70843":[70841,70842],"70844":[70841,70832],"70846":[70841,70845],"71098":[71096,71087],"71099":[71097,71087]},"stateTable":[[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[2,2,3,4,4,5,0,6,7,8,9,10,11,12,13,14,15,16,0,17,0,11,18,19,20,21,0,0,22,0,0,2,0,23,0,24],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,25,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26,27,0,0,0,0,26,0,0,0],[0,0,0,0,0,28,0,29,30,31,32,33,34,35,36,37,38,39,0,0,0,34,40,41,42,43,0,0,44,0,0,0,38,0,0,45],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,0,0,0,0,0,14,0,0,0,0,0,0,0,19,20,21,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,20,21,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,0,0,12,0,14,0,0,0,0,0,0,0,19,20,21,0,0,22,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,9,0,0,0,0,14,0,0,0,0,0,0,0,19,20,21,0,0,22,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,10,11,12,13,14,0,16,0,0,0,11,18,19,20,21,0,0,22,0,0,0,0,0,0,24],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,0,0,0,0,0,0,19,20,21,0,0,22,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,9,0,0,12,0,14,0,0,0,0,0,0,0,19,20,21,0,0,22,0,0,0,0,0,0,0],[0,0,0,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,46,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,7,0,0,0,0,0,0,14,0,0,0,0,0,0,0,19,20,21,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,10,11,12,13,14,15,16,0,0,0,11,18,19,20,21,0,0,22,0,0,0,0,0,0,24],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,0,0,0,0,11,0,19,20,21,0,0,22,0,0,0,0,0,0,0],[0,0,0,4,4,5,0,6,7,8,9,10,11,12,13,14,15,16,0,0,0,11,18,19,20,21,0,0,22,0,0,0,0,0,0,24],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,16,0,0,0,11,0,19,20,21,0,0,22,0,0,0,0,0,0,24],[0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,19,20,21,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,20,21,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,0,0,0,0,0,0,14,0,0,0,0,0,0,0,19,20,21,0,0,22,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,0,48,0],[0,0,0,0,0,5,0,6,7,8,9,0,11,12,0,14,0,16,0,0,0,11,0,19,20,21,0,0,22,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,26,27,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,27,0,0,0,0,0,0,0,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,28,0,29,30,0,0,0,0,0,0,37,0,0,0,0,0,0,0,41,42,43,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,28,0,0,30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41,42,43,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,28,0,29,30,31,32,0,0,35,0,37,0,0,0,0,0,0,0,41,42,43,0,0,44,0,0,0,0,0,0,0],[0,0,0,0,0,28,0,29,30,0,32,0,0,0,0,37,0,0,0,0,0,0,0,41,42,43,0,0,44,0,0,0,0,0,0,0],[0,0,0,0,0,28,0,29,30,31,32,33,34,35,36,37,0,39,0,0,0,34,40,41,42,43,0,0,44,0,0,0,0,0,0,45],[0,0,0,0,0,28,0,29,30,31,32,0,34,35,0,37,0,0,0,0,0,0,0,41,42,43,0,0,44,0,0,0,0,0,0,0],[0,0,0,0,0,28,0,29,30,0,32,0,0,35,0,37,0,0,0,0,0,0,0,41,42,43,0,0,44,0,0,0,0,0,0,0],[0,0,0,0,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,49,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,28,0,0,30,0,0,0,0,0,0,37,0,0,0,0,0,0,0,41,42,43,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,28,0,29,30,31,32,33,34,35,36,37,38,39,0,0,0,34,40,41,42,43,0,0,44,0,0,0,0,0,0,45],[0,0,0,0,0,28,0,29,30,31,32,0,34,35,0,37,0,0,0,0,0,34,0,41,42,43,0,0,44,0,0,0,0,0,0,0],[0,0,0,0,0,28,0,29,30,31,32,0,34,35,0,37,0,39,0,0,0,34,0,41,42,43,0,0,44,0,0,0,0,0,0,45],[0,0,0,0,0,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,41,42,43,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42,0,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,42,43,0,0,0,0,0,0,0,0,0,0],[0,0,0,0,0,28,0,29,30,0,0,0,0,0,0,37,0,0,0,0,0,0,0,41,42,43,0,0,44,0,0,0,0,0,0,0],[0,0,0,0,0,28,0,29,30,31,32,0,34,35,0,37,0,39,0,0,0,34,0,41,42,43,0,0,44,0,0,0,0,0,0,0],[0,0,0,0,0,5,0,6,7,8,9,50,11,12,13,14,50,16,0,0,0,11,18,19,20,21,0,0,22,0,0,0,51,0,0,24],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,48,0],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,52,0,0],[0,0,0,0,0,28,0,29,30,31,32,53,34,35,36,37,53,39,0,0,0,34,40,41,42,43,0,0,44,0,0,0,54,0,0,45],[0,0,0,0,0,5,0,6,7,8,9,50,11,12,13,14,0,16,0,0,0,11,18,19,20,21,0,0,22,0,0,0,0,0,0,24],[0,0,0,0,0,5,0,6,7,8,9,50,11,12,13,14,50,16,0,0,0,11,18,19,20,21,0,0,22,0,0,0,0,0,0,24],[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,47,0,48,0],[0,0,0,0,0,28,0,29,30,31,32,53,34,35,36,37,0,39,0,0,0,34,40,41,42,43,0,0,44,0,0,0,0,0,0,45],[0,0,0,0,0,28,0,29,30,31,32,53,34,35,36,37,53,39,0,0,0,34,40,41,42,43,0,0,44,0,0,0,0,0,0,45]],"accepting":[false,true,true,true,true,true,true,true,true,true,true,true,true,false,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true,true],"tags":[[],["broken_cluster"],["independent_cluster"],["symbol_cluster"],["standard_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],[],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["broken_cluster"],["numeral_cluster"],["broken_cluster"],["independent_cluster"],["symbol_cluster"],["symbol_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["virama_terminated_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["standard_cluster"],["broken_cluster"],["numeral_cluster"],["number_joiner_terminated_cluster"],["standard_cluster"],["broken_cluster"],["broken_cluster"],["numeral_cluster"],["standard_cluster"],["standard_cluster"]]} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/fontkit/src/opentype/shapers/use.machine b/pitfall/pdfkit/node_modules/fontkit/src/opentype/shapers/use.machine new file mode 100644 index 00000000..603001ce --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/opentype/shapers/use.machine @@ -0,0 +1,44 @@ +consonant_modifiers = CMAbv* CMBlw* ((H B | SUB) VS? CMAbv? CMBlw*)*; +medial_consonants = MPre? MAbv? MBlw? MPst?; +dependent_vowels = VPre* VAbv* VBlw* VPst*; +vowel_modifiers = VMPre* VMAbv* VMBlw* VMPst*; +final_consonants = FAbv* FBlw* FPst* FM?; + +virama_terminated_cluster = + R? (B | GB) VS? + consonant_modifiers + H +; + +standard_cluster = + R? (B | GB) VS? + consonant_modifiers + medial_consonants + dependent_vowels + vowel_modifiers + final_consonants +; + +broken_cluster = + R? + consonant_modifiers + medial_consonants + dependent_vowels + vowel_modifiers + final_consonants +; + +number_joiner_terminated_cluster = N VS? (HN N VS?)* HN; +numeral_cluster = N VS? (HN N VS?)*; +symbol_cluster = S VS? SMAbv* SMBlw*; +independent_cluster = (IND | O | WJ) VS?; + +main = + independent_cluster:independent_cluster + | virama_terminated_cluster:virama_terminated_cluster + | standard_cluster:standard_cluster + | number_joiner_terminated_cluster:number_joiner_terminated_cluster + | numeral_cluster:numeral_cluster + | symbol_cluster:symbol_cluster + | broken_cluster:broken_cluster +; diff --git a/pitfall/pdfkit/node_modules/fontkit/src/opentype/shapers/use.trie b/pitfall/pdfkit/node_modules/fontkit/src/opentype/shapers/use.trie new file mode 100644 index 00000000..c3747c8f Binary files /dev/null and b/pitfall/pdfkit/node_modules/fontkit/src/opentype/shapers/use.trie differ diff --git a/pitfall/pdfkit/node_modules/fontkit/src/subset/CFFSubset.js b/pitfall/pdfkit/node_modules/fontkit/src/subset/CFFSubset.js new file mode 100644 index 00000000..97697957 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/subset/CFFSubset.js @@ -0,0 +1,167 @@ +import Subset from './Subset'; +import CFFTop from '../cff/CFFTop'; +import CFFPrivateDict from '../cff/CFFPrivateDict'; +import standardStrings from '../cff/CFFStandardStrings'; + +export default class CFFSubset extends Subset { + constructor(font) { + super(font); + + this.cff = this.font['CFF ']; + if (!this.cff) { + throw new Error('Not a CFF Font'); + } + } + + subsetCharstrings() { + this.charstrings = []; + let gsubrs = {}; + + for (let gid of this.glyphs) { + this.charstrings.push(this.cff.getCharString(gid)); + + let glyph = this.font.getGlyph(gid); + let path = glyph.path; // this causes the glyph to be parsed + + for (let subr in glyph._usedGsubrs) { + gsubrs[subr] = true; + } + } + + this.gsubrs = this.subsetSubrs(this.cff.globalSubrIndex, gsubrs); + } + + subsetSubrs(subrs, used) { + let res = []; + for (let i = 0; i < subrs.length; i++) { + let subr = subrs[i]; + if (used[i]) { + this.cff.stream.pos = subr.offset; + res.push(this.cff.stream.readBuffer(subr.length)); + } else { + res.push(new Buffer([11])); // return + } + } + + return res; + } + + subsetFontdict(topDict) { + topDict.FDArray = []; + topDict.FDSelect = { + version: 0, + fds: [] + }; + + let used_fds = {}; + let used_subrs = []; + for (let gid of this.glyphs) { + let fd = this.cff.fdForGlyph(gid); + if (fd == null) { + continue; + } + + if (!used_fds[fd]) { + topDict.FDArray.push(Object.assign({}, this.cff.topDict.FDArray[fd])); + used_subrs.push({}); + } + + used_fds[fd] = true; + topDict.FDSelect.fds.push(topDict.FDArray.length - 1); + + let glyph = this.font.getGlyph(gid); + let path = glyph.path; // this causes the glyph to be parsed + for (let subr in glyph._usedSubrs) { + used_subrs[used_subrs.length - 1][subr] = true; + } + } + + for (let i = 0; i < topDict.FDArray.length; i++) { + let dict = topDict.FDArray[i]; + delete dict.FontName; + if (dict.Private && dict.Private.Subrs) { + dict.Private = Object.assign({}, dict.Private); + dict.Private.Subrs = this.subsetSubrs(dict.Private.Subrs, used_subrs[i]); + } + } + + return; + } + + createCIDFontdict(topDict) { + let used_subrs = {}; + for (let gid of this.glyphs) { + let glyph = this.font.getGlyph(gid); + let path = glyph.path; // this causes the glyph to be parsed + + for (let subr in glyph._usedSubrs) { + used_subrs[subr] = true; + } + } + + let privateDict = Object.assign({}, this.cff.topDict.Private); + privateDict.Subrs = this.subsetSubrs(this.cff.topDict.Private.Subrs, used_subrs); + + topDict.FDArray = [{ Private: privateDict }]; + return topDict.FDSelect = { + version: 3, + nRanges: 1, + ranges: [{ first: 0, fd: 0 }], + sentinel: this.charstrings.length + }; + } + + addString(string) { + if (!string) { + return null; + } + + if (!this.strings) { + this.strings = []; + } + + this.strings.push(string); + return standardStrings.length + this.strings.length - 1; + } + + encode(stream) { + this.subsetCharstrings(); + + let charset = { + version: this.charstrings.length > 255 ? 2 : 1, + ranges: [{ first: 1, nLeft: this.charstrings.length - 2 }] + }; + + let topDict = Object.assign({}, this.cff.topDict); + topDict.Private = null; + topDict.charset = charset; + topDict.Encoding = null; + topDict.CharStrings = this.charstrings; + + for (let key of ['version', 'Notice', 'Copyright', 'FullName', 'FamilyName', 'Weight', 'PostScript', 'BaseFontName', 'FontName']) { + topDict[key] = this.addString(this.cff.string(topDict[key])); + } + + topDict.ROS = [this.addString('Adobe'), this.addString('Identity'), 0]; + topDict.CIDCount = this.charstrings.length; + + if (this.cff.isCIDFont) { + this.subsetFontdict(topDict); + } else { + this.createCIDFontdict(topDict); + } + + let top = { + version: 1, + hdrSize: this.cff.hdrSize, + offSize: this.cff.length, + header: this.cff.header, + nameIndex: [this.cff.postscriptName], + topDictIndex: [topDict], + stringIndex: this.strings, + globalSubrIndex: this.gsubrs + }; + + CFFTop.encode(stream, top); + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/subset/Subset.js b/pitfall/pdfkit/node_modules/fontkit/src/subset/Subset.js new file mode 100644 index 00000000..ca396a87 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/subset/Subset.js @@ -0,0 +1,36 @@ +import r from 'restructure'; + +export default class Subset { + constructor(font) { + this.font = font; + this.glyphs = []; + this.mapping = {}; + + // always include the missing glyph + this.includeGlyph(0); + } + + includeGlyph(glyph) { + if (typeof glyph === 'object') { + glyph = glyph.id; + } + + if (this.mapping[glyph] == null) { + this.glyphs.push(glyph); + this.mapping[glyph] = this.glyphs.length - 1; + } + + return this.mapping[glyph]; + } + + encodeStream() { + let s = new r.EncodeStream(); + + process.nextTick(() => { + this.encode(s); + return s.end(); + }); + + return s; + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/subset/TTFSubset.js b/pitfall/pdfkit/node_modules/fontkit/src/subset/TTFSubset.js new file mode 100644 index 00000000..d6b26f62 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/subset/TTFSubset.js @@ -0,0 +1,130 @@ +import cloneDeep from 'clone'; +import Subset from './Subset'; +import Directory from '../tables/directory'; +import Tables from '../tables'; +import TTFGlyphEncoder from '../glyph/TTFGlyphEncoder'; + +export default class TTFSubset extends Subset { + constructor(font) { + super(font); + this.glyphEncoder = new TTFGlyphEncoder; + } + + _addGlyph(gid) { + let glyph = this.font.getGlyph(gid); + let glyf = glyph._decode(); + + // get the offset to the glyph from the loca table + let curOffset = this.font.loca.offsets[gid]; + let nextOffset = this.font.loca.offsets[gid + 1]; + + let stream = this.font._getTableStream('glyf'); + stream.pos += curOffset; + + let buffer = stream.readBuffer(nextOffset - curOffset); + + // if it is a compound glyph, include its components + if (glyf && glyf.numberOfContours < 0) { + buffer = new Buffer(buffer); + for (let component of glyf.components) { + gid = this.includeGlyph(component.glyphID); + buffer.writeUInt16BE(gid, component.pos); + } + } else if (glyf && this.font._variationProcessor) { + // If this is a TrueType variation glyph, re-encode the path + buffer = this.glyphEncoder.encodeSimple(glyph.path, glyf.instructions); + } + + this.glyf.push(buffer); + this.loca.offsets.push(this.offset); + + this.hmtx.metrics.push({ + advance: glyph.advanceWidth, + bearing: glyph._getMetrics().leftBearing + }); + + this.offset += buffer.length; + return this.glyf.length - 1; + } + + encode(stream) { + // tables required by PDF spec: + // head, hhea, loca, maxp, cvt , prep, glyf, hmtx, fpgm + // + // additional tables required for standalone fonts: + // name, cmap, OS/2, post + + this.glyf = []; + this.offset = 0; + this.loca = { + offsets: [] + }; + + this.hmtx = { + metrics: [], + bearings: [] + }; + + // include all the glyphs + // not using a for loop because we need to support adding more + // glyphs to the array as we go, and CoffeeScript caches the length. + let i = 0; + while (i < this.glyphs.length) { + this._addGlyph(this.glyphs[i++]); + } + + let maxp = cloneDeep(this.font.maxp); + maxp.numGlyphs = this.glyf.length; + + this.loca.offsets.push(this.offset); + Tables.loca.preEncode.call(this.loca); + + let head = cloneDeep(this.font.head); + head.indexToLocFormat = this.loca.version; + + let hhea = cloneDeep(this.font.hhea); + hhea.numberOfMetrics = this.hmtx.metrics.length; + + // map = [] + // for index in [0...256] + // if index < @numGlyphs + // map[index] = index + // else + // map[index] = 0 + // + // cmapTable = + // version: 0 + // length: 262 + // language: 0 + // codeMap: map + // + // cmap = + // version: 0 + // numSubtables: 1 + // tables: [ + // platformID: 1 + // encodingID: 0 + // table: cmapTable + // ] + + // TODO: subset prep, cvt, fpgm? + Directory.encode(stream, { + tables: { + head, + hhea, + loca: this.loca, + maxp, + 'cvt ': this.font['cvt '], + prep: this.font.prep, + glyf: this.glyf, + hmtx: this.hmtx, + fpgm: this.font.fpgm + + // name: clone @font.name + // 'OS/2': clone @font['OS/2'] + // post: clone @font.post + // cmap: cmap + } + }); + } +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/BASE.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/BASE.js new file mode 100644 index 00000000..9fc2b5dc --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/BASE.js @@ -0,0 +1,71 @@ +import r from 'restructure'; +import { ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device } from './opentype'; + +let BaseCoord = new r.VersionedStruct(r.uint16, { + 1: { // Design units only + coordinate: r.int16 // X or Y value, in design units + }, + + 2: { // Design units plus contour point + coordinate: r.int16, // X or Y value, in design units + referenceGlyph: r.uint16, // GlyphID of control glyph + baseCoordPoint: r.uint16 // Index of contour point on the referenceGlyph + }, + + 3: { // Design units plus Device table + coordinate: r.int16, // X or Y value, in design units + deviceTable: new r.Pointer(r.uint16, Device) // Device table for X or Y value + } +}); + +let BaseValues = new r.Struct({ + defaultIndex: r.uint16, // Index of default baseline for this script-same index in the BaseTagList + baseCoordCount: r.uint16, + baseCoords: new r.Array(new r.Pointer(r.uint16, BaseCoord), 'baseCoordCount') +}); + +let FeatMinMaxRecord = new r.Struct({ + tag: new r.String(4), // 4-byte feature identification tag-must match FeatureTag in FeatureList + minCoord: new r.Pointer(r.uint16, BaseCoord, {type: 'parent'}), // May be NULL + maxCoord: new r.Pointer(r.uint16, BaseCoord, {type: 'parent'}) // May be NULL +}); + +let MinMax = new r.Struct({ + minCoord: new r.Pointer(r.uint16, BaseCoord), // May be NULL + maxCoord: new r.Pointer(r.uint16, BaseCoord), // May be NULL + featMinMaxCount: r.uint16, // May be 0 + featMinMaxRecords: new r.Array(FeatMinMaxRecord, 'featMinMaxCount') // In alphabetical order +}); + +let BaseLangSysRecord = new r.Struct({ + tag: new r.String(4), // 4-byte language system identification tag + minMax: new r.Pointer(r.uint16, MinMax, {type: 'parent'}) +}); + +let BaseScript = new r.Struct({ + baseValues: new r.Pointer(r.uint16, BaseValues), // May be NULL + defaultMinMax: new r.Pointer(r.uint16, MinMax), // May be NULL + baseLangSysCount: r.uint16, // May be 0 + baseLangSysRecords: new r.Array(BaseLangSysRecord, 'baseLangSysCount') // in alphabetical order by BaseLangSysTag +}); + +let BaseScriptRecord = new r.Struct({ + tag: new r.String(4), // 4-byte script identification tag + script: new r.Pointer(r.uint16, BaseScript, {type: 'parent'}) +}); + +let BaseScriptList = new r.Array(BaseScriptRecord, r.uint16); + +// Array of 4-byte baseline identification tags-must be in alphabetical order +let BaseTagList = new r.Array(new r.String(4), r.uint16); + +let Axis = new r.Struct({ + baseTagList: new r.Pointer(r.uint16, BaseTagList), // May be NULL + baseScriptList: new r.Pointer(r.uint16, BaseScriptList) +}); + +export default new r.Struct({ + version: r.uint32, // Version of the BASE table-initially 0x00010000 + horizAxis: new r.Pointer(r.uint16, Axis), // May be NULL + vertAxis: new r.Pointer(r.uint16, Axis) // May be NULL +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/COLR.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/COLR.js new file mode 100644 index 00000000..809d638d --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/COLR.js @@ -0,0 +1,25 @@ +import r from 'restructure'; + +let LayerRecord = new r.Struct({ + gid: r.uint16, // Glyph ID of layer glyph (must be in z-order from bottom to top). + paletteIndex: r.uint16 // Index value to use in the appropriate palette. This value must +}); // be less than numPaletteEntries in the CPAL table, except for + // the special case noted below. Each palette entry is 16 bits. + // A palette index of 0xFFFF is a special case indicating that + // the text foreground color should be used. + +let BaseGlyphRecord = new r.Struct({ + gid: r.uint16, // Glyph ID of reference glyph. This glyph is for reference only + // and is not rendered for color. + firstLayerIndex: r.uint16, // Index (from beginning of the Layer Records) to the layer record. + // There will be numLayers consecutive entries for this base glyph. + numLayers: r.uint16 +}); + +export default new r.Struct({ + version: r.uint16, + numBaseGlyphRecords: r.uint16, + baseGlyphRecord: new r.Pointer(r.uint32, new r.Array(BaseGlyphRecord, 'numBaseGlyphRecords')), + layerRecords: new r.Pointer(r.uint32, new r.Array(LayerRecord, 'numLayerRecords'), { lazy: true }), + numLayerRecords: r.uint16 +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/CPAL.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/CPAL.js new file mode 100644 index 00000000..7c2f9856 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/CPAL.js @@ -0,0 +1,17 @@ +import r from 'restructure'; + +let ColorRecord = new r.Struct({ + blue: r.uint8, + green: r.uint8, + red: r.uint8, + alpha: r.uint8 +}); + +export default new r.Struct({ + version: r.uint16, + numPaletteEntries: r.uint16, + numPalettes: r.uint16, + numColorRecords: r.uint16, + colorRecords: new r.Pointer(r.uint32, new r.Array(ColorRecord, 'numColorRecords')), + colorRecordIndices: new r.Array(r.uint16, 'numPalettes') +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/DSIG.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/DSIG.js new file mode 100644 index 00000000..91707597 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/DSIG.js @@ -0,0 +1,21 @@ +import r from 'restructure'; + +let Signature = new r.Struct({ + format: r.uint32, + length: r.uint32, + offset: r.uint32 +}); + +let SignatureBlock = new r.Struct({ + reserved: new r.Reserved(r.uint16, 2), + cbSignature: r.uint32, // Length (in bytes) of the PKCS#7 packet in pbSignature + signature: new r.Buffer('cbSignature') +}); + +export default new r.Struct({ + ulVersion: r.uint32, // Version number of the DSIG table (0x00000001) + usNumSigs: r.uint16, // Number of signatures in the table + usFlag: r.uint16, // Permission flags + signatures: new r.Array(Signature, 'usNumSigs'), + signatureBlocks: new r.Array(SignatureBlock, 'usNumSigs') +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/EBDT.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/EBDT.js new file mode 100644 index 00000000..f1ae94e7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/EBDT.js @@ -0,0 +1,91 @@ +import r from 'restructure'; + +export let BigMetrics = new r.Struct({ + height: r.uint8, + width: r.uint8, + horiBearingX: r.int8, + horiBearingY: r.int8, + horiAdvance: r.uint8, + vertBearingX: r.int8, + vertBearingY: r.int8, + vertAdvance: r.uint8 +}); + +export let SmallMetrics = new r.Struct({ + height: r.uint8, + width: r.uint8, + bearingX: r.int8, + bearingY: r.int8, + advance: r.uint8 +}); + +let EBDTComponent = new r.Struct({ + glyph: r.uint16, + xOffset: r.int8, + yOffset: r.int8 +}); + +class ByteAligned {} + +class BitAligned {} + +export let glyph = new r.VersionedStruct('version', { + 1: { + metrics: SmallMetrics, + data: ByteAligned + }, + + 2: { + metrics: SmallMetrics, + data: BitAligned + }, + + // format 3 is deprecated + // format 4 is not supported by Microsoft + + 5: { + data: BitAligned + }, + + 6: { + metrics: BigMetrics, + data: ByteAligned + }, + + 7: { + metrics: BigMetrics, + data: BitAligned + }, + + 8: { + metrics: SmallMetrics, + pad: new r.Reserved(r.uint8), + numComponents: r.uint16, + components: new r.Array(EBDTComponent, 'numComponents') + }, + + 9: { + metrics: BigMetrics, + pad: new r.Reserved(r.uint8), + numComponents: r.uint16, + components: new r.Array(EBDTComponent, 'numComponents') + }, + + 17: { + metrics: SmallMetrics, + dataLen: r.uint32, + data: new r.Buffer('dataLen') + }, + + 18: { + metrics: BigMetrics, + dataLen: r.uint32, + data: new r.Buffer('dataLen') + }, + + 19: { + dataLen: r.uint32, + data: new r.Buffer('dataLen') + } +}); + diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/EBLC.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/EBLC.js new file mode 100644 index 00000000..0dd83ff4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/EBLC.js @@ -0,0 +1,80 @@ +import r from 'restructure'; +import {BigMetrics} from './EBDT'; + +let SBitLineMetrics = new r.Struct({ + ascender: r.int8, + descender: r.int8, + widthMax: r.uint8, + caretSlopeNumerator: r.int8, + caretSlopeDenominator: r.int8, + caretOffset: r.int8, + minOriginSB: r.int8, + minAdvanceSB: r.int8, + maxBeforeBL: r.int8, + minAfterBL: r.int8, + pad: new r.Reserved(r.int8, 2) +}); + +let CodeOffsetPair = new r.Struct({ + glyphCode: r.uint16, + offset: r.uint16 +}); + +let IndexSubtable = new r.VersionedStruct(r.uint16, { + header: { + imageFormat: r.uint16, + imageDataOffset: r.uint32 + }, + + 1: { + offsetArray: new r.Array(r.uint32, t => t.parent.lastGlyphIndex - t.parent.firstGlyphIndex + 1) + }, + + 2: { + imageSize: r.uint32, + bigMetrics: BigMetrics + }, + + 3: { + offsetArray: new r.Array(r.uint16, t => t.parent.lastGlyphIndex - t.parent.firstGlyphIndex + 1) + }, + + 4: { + numGlyphs: r.uint32, + glyphArray: new r.Array(CodeOffsetPair, t => t.numGlyphs + 1) + }, + + 5: { + imageSize: r.uint32, + bigMetrics: BigMetrics, + numGlyphs: r.uint32, + glyphCodeArray: new r.Array(r.uint16, 'numGlyphs') + } +}); + +let IndexSubtableArray = new r.Struct({ + firstGlyphIndex: r.uint16, + lastGlyphIndex: r.uint16, + subtable: new r.Pointer(r.uint32, IndexSubtable) +}); + +let BitmapSizeTable = new r.Struct({ + indexSubTableArray: new r.Pointer(r.uint32, new r.Array(IndexSubtableArray, 1), { type: 'parent' }), + indexTablesSize: r.uint32, + numberOfIndexSubTables: r.uint32, + colorRef: r.uint32, + hori: SBitLineMetrics, + vert: SBitLineMetrics, + startGlyphIndex: r.uint16, + endGlyphIndex: r.uint16, + ppemX: r.uint8, + ppemY: r.uint8, + bitDepth: r.uint8, + flags: new r.Bitfield(r.uint8, ['horizontal', 'vertical']) +}); + +export default new r.Struct({ + version: r.uint32, // 0x00020000 + numSizes: r.uint32, + sizes: new r.Array(BitmapSizeTable, 'numSizes') +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/GDEF.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/GDEF.js new file mode 100644 index 00000000..d228c138 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/GDEF.js @@ -0,0 +1,57 @@ +import r from 'restructure'; +import {ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device} from './opentype'; +import {ItemVariationStore} from './variations'; + +let AttachPoint = new r.Array(r.uint16, r.uint16); +let AttachList = new r.Struct({ + coverage: new r.Pointer(r.uint16, Coverage), + glyphCount: r.uint16, + attachPoints: new r.Array(new r.Pointer(r.uint16, AttachPoint), 'glyphCount') +}); + +let CaretValue = new r.VersionedStruct(r.uint16, { + 1: { // Design units only + coordinate: r.int16 + }, + + 2: { // Contour point + caretValuePoint: r.uint16 + }, + + 3: { // Design units plus Device table + coordinate: r.int16, + deviceTable: new r.Pointer(r.uint16, Device) + } +}); + +let LigGlyph = new r.Array(new r.Pointer(r.uint16, CaretValue), r.uint16); + +let LigCaretList = new r.Struct({ + coverage: new r.Pointer(r.uint16, Coverage), + ligGlyphCount: r.uint16, + ligGlyphs: new r.Array(new r.Pointer(r.uint16, LigGlyph), 'ligGlyphCount') +}); + +let MarkGlyphSetsDef = new r.Struct({ + markSetTableFormat: r.uint16, + markSetCount: r.uint16, + coverage: new r.Array(new r.Pointer(r.uint32, Coverage), 'markSetCount') +}); + +export default new r.VersionedStruct(r.uint32, { + header: { + glyphClassDef: new r.Pointer(r.uint16, ClassDef), + attachList: new r.Pointer(r.uint16, AttachList), + ligCaretList: new r.Pointer(r.uint16, LigCaretList), + markAttachClassDef: new r.Pointer(r.uint16, ClassDef) + }, + + 0x00010000: {}, + 0x00010002: { + markGlyphSetsDef: new r.Pointer(r.uint16, MarkGlyphSetsDef) + }, + 0x00010003: { + markGlyphSetsDef: new r.Pointer(r.uint16, MarkGlyphSetsDef), + itemVariationStore: new r.Pointer(r.uint32, ItemVariationStore) + } +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/GPOS.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/GPOS.js new file mode 100644 index 00000000..0e4fde18 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/GPOS.js @@ -0,0 +1,209 @@ +import r from 'restructure'; +import {ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device, Context, ChainingContext} from './opentype'; +import {FeatureVariations} from './variations'; + +let ValueFormat = new r.Bitfield(r.uint16, [ + 'xPlacement', 'yPlacement', + 'xAdvance', 'yAdvance', + 'xPlaDevice', 'yPlaDevice', + 'xAdvDevice', 'yAdvDevice' +]); + +let types = { + xPlacement: r.int16, + yPlacement: r.int16, + xAdvance: r.int16, + yAdvance: r.int16, + xPlaDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: 'rel' }), + yPlaDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: 'rel' }), + xAdvDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: 'rel' }), + yAdvDevice: new r.Pointer(r.uint16, Device, { type: 'global', relativeTo: 'rel' }) +}; + +class ValueRecord { + constructor(key = 'valueFormat') { + this.key = key; + } + + buildStruct(parent) { + let struct = parent; + while (!struct[this.key] && struct.parent) { + struct = struct.parent; + } + + if (!struct[this.key]) return; + + let fields = {}; + fields.rel = () => struct._startOffset; + + let format = struct[this.key]; + for (let key in format) { + if (format[key]) { + fields[key] = types[key]; + } + } + + return new r.Struct(fields); + } + + size(val, ctx) { + return this.buildStruct(ctx).size(val, ctx); + } + + decode(stream, parent) { + let res = this.buildStruct(parent).decode(stream, parent); + delete res.rel; + return res; + } +} + +let PairValueRecord = new r.Struct({ + secondGlyph: r.uint16, + value1: new ValueRecord('valueFormat1'), + value2: new ValueRecord('valueFormat2') +}); + +let PairSet = new r.Array(PairValueRecord, r.uint16); + +let Class2Record = new r.Struct({ + value1: new ValueRecord('valueFormat1'), + value2: new ValueRecord('valueFormat2') +}); + +let Anchor = new r.VersionedStruct(r.uint16, { + 1: { // Design units only + xCoordinate: r.int16, + yCoordinate: r.int16 + }, + + 2: { // Design units plus contour point + xCoordinate: r.int16, + yCoordinate: r.int16, + anchorPoint: r.uint16 + }, + + 3: { // Design units plus Device tables + xCoordinate: r.int16, + yCoordinate: r.int16, + xDeviceTable: new r.Pointer(r.uint16, Device), + yDeviceTable: new r.Pointer(r.uint16, Device) + } +}); + +let EntryExitRecord = new r.Struct({ + entryAnchor: new r.Pointer(r.uint16, Anchor, {type: 'parent'}), + exitAnchor: new r.Pointer(r.uint16, Anchor, {type: 'parent'}) +}); + +let MarkRecord = new r.Struct({ + class: r.uint16, + markAnchor: new r.Pointer(r.uint16, Anchor, {type: 'parent'}) +}); + +let MarkArray = new r.Array(MarkRecord, r.uint16); + +let BaseRecord = new r.Array(new r.Pointer(r.uint16, Anchor), t => t.parent.classCount); +let BaseArray = new r.Array(BaseRecord, r.uint16); + +let ComponentRecord = new r.Array(new r.Pointer(r.uint16, Anchor), t => t.parent.parent.classCount); +let LigatureAttach = new r.Array(ComponentRecord, r.uint16); +let LigatureArray = new r.Array(new r.Pointer(r.uint16, LigatureAttach), r.uint16); + +let GPOSLookup = new r.VersionedStruct('lookupType', { + 1: new r.VersionedStruct(r.uint16, { // Single Adjustment + 1: { // Single positioning value + coverage: new r.Pointer(r.uint16, Coverage), + valueFormat: ValueFormat, + value: new ValueRecord() + }, + 2: { + coverage: new r.Pointer(r.uint16, Coverage), + valueFormat: ValueFormat, + valueCount: r.uint16, + values: new r.LazyArray(new ValueRecord(), 'valueCount') + } + }), + + 2: new r.VersionedStruct(r.uint16, { // Pair Adjustment Positioning + 1: { // Adjustments for glyph pairs + coverage: new r.Pointer(r.uint16, Coverage), + valueFormat1: ValueFormat, + valueFormat2: ValueFormat, + pairSetCount: r.uint16, + pairSets: new r.LazyArray(new r.Pointer(r.uint16, PairSet), 'pairSetCount') + }, + + 2: { // Class pair adjustment + coverage: new r.Pointer(r.uint16, Coverage), + valueFormat1: ValueFormat, + valueFormat2: ValueFormat, + classDef1: new r.Pointer(r.uint16, ClassDef), + classDef2: new r.Pointer(r.uint16, ClassDef), + class1Count: r.uint16, + class2Count: r.uint16, + classRecords: new r.LazyArray(new r.LazyArray(Class2Record, 'class2Count'), 'class1Count') + } + }), + + 3: { // Cursive Attachment Positioning + format: r.uint16, + coverage: new r.Pointer(r.uint16, Coverage), + entryExitCount: r.uint16, + entryExitRecords: new r.Array(EntryExitRecord, 'entryExitCount') + }, + + 4: { // MarkToBase Attachment Positioning + format: r.uint16, + markCoverage: new r.Pointer(r.uint16, Coverage), + baseCoverage: new r.Pointer(r.uint16, Coverage), + classCount: r.uint16, + markArray: new r.Pointer(r.uint16, MarkArray), + baseArray: new r.Pointer(r.uint16, BaseArray) + }, + + 5: { // MarkToLigature Attachment Positioning + format: r.uint16, + markCoverage: new r.Pointer(r.uint16, Coverage), + ligatureCoverage: new r.Pointer(r.uint16, Coverage), + classCount: r.uint16, + markArray: new r.Pointer(r.uint16, MarkArray), + ligatureArray: new r.Pointer(r.uint16, LigatureArray) + }, + + 6: { // MarkToMark Attachment Positioning + format: r.uint16, + mark1Coverage: new r.Pointer(r.uint16, Coverage), + mark2Coverage: new r.Pointer(r.uint16, Coverage), + classCount: r.uint16, + mark1Array: new r.Pointer(r.uint16, MarkArray), + mark2Array: new r.Pointer(r.uint16, BaseArray) + }, + + 7: Context, // Contextual positioning + 8: ChainingContext, // Chaining contextual positioning + + 9: { // Extension Positioning + posFormat: r.uint16, + lookupType: r.uint16, // cannot also be 9 + extension: new r.Pointer(r.uint32, GPOSLookup) + } +}); + +// Fix circular reference +GPOSLookup.versions[9].extension.type = GPOSLookup; + +export default new r.VersionedStruct(r.uint32, { + header: { + scriptList: new r.Pointer(r.uint16, ScriptList), + featureList: new r.Pointer(r.uint16, FeatureList), + lookupList: new r.Pointer(r.uint16, new LookupList(GPOSLookup)) + }, + + 0x00010000: {}, + 0x00010001: { + featureVariations: new r.Pointer(r.uint32, FeatureVariations) + } +}); + +// export GPOSLookup for JSTF table +export { GPOSLookup }; diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/GSUB.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/GSUB.js new file mode 100644 index 00000000..38d575fd --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/GSUB.js @@ -0,0 +1,84 @@ +import r from 'restructure'; +import {ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device, Context, ChainingContext} from './opentype'; +import {FeatureVariations} from './variations'; + +let Sequence = new r.Array(r.uint16, r.uint16); +let AlternateSet = Sequence; + +let Ligature = new r.Struct({ + glyph: r.uint16, + compCount: r.uint16, + components: new r.Array(r.uint16, t => t.compCount - 1) +}); + +let LigatureSet = new r.Array(new r.Pointer(r.uint16, Ligature), r.uint16); + +let GSUBLookup = new r.VersionedStruct('lookupType', { + 1: new r.VersionedStruct(r.uint16, {// Single Substitution + 1: { + coverage: new r.Pointer(r.uint16, Coverage), + deltaGlyphID: r.int16 + }, + 2: { + coverage: new r.Pointer(r.uint16, Coverage), + glyphCount: r.uint16, + substitute: new r.LazyArray(r.uint16, 'glyphCount') + } + }), + + 2: { // Multiple Substitution + substFormat: r.uint16, + coverage: new r.Pointer(r.uint16, Coverage), + count: r.uint16, + sequences: new r.LazyArray(new r.Pointer(r.uint16, Sequence), 'count') + }, + + 3: { // Alternate Substitution + substFormat: r.uint16, + coverage: new r.Pointer(r.uint16, Coverage), + count: r.uint16, + alternateSet: new r.LazyArray(new r.Pointer(r.uint16, AlternateSet), 'count') + }, + + 4: { // Ligature Substitution + substFormat: r.uint16, + coverage: new r.Pointer(r.uint16, Coverage), + count: r.uint16, + ligatureSets: new r.LazyArray(new r.Pointer(r.uint16, LigatureSet), 'count') + }, + + 5: Context, // Contextual Substitution + 6: ChainingContext, // Chaining Contextual Substitution + + 7: { // Extension Substitution + substFormat: r.uint16, + lookupType: r.uint16, // cannot also be 7 + extension: new r.Pointer(r.uint32, GSUBLookup) + }, + + 8: { // Reverse Chaining Contextual Single Substitution + substFormat: r.uint16, + coverage: new r.Pointer(r.uint16, Coverage), + backtrackCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'backtrackGlyphCount'), + lookaheadGlyphCount: r.uint16, + lookaheadCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'lookaheadGlyphCount'), + glyphCount: r.uint16, + substitutes: new r.Array(r.uint16, 'glyphCount') + } +}); + +// Fix circular reference +GSUBLookup.versions[7].extension.type = GSUBLookup; + +export default new r.VersionedStruct(r.uint32, { + header: { + scriptList: new r.Pointer(r.uint16, ScriptList), + featureList: new r.Pointer(r.uint16, FeatureList), + lookupList: new r.Pointer(r.uint16, new LookupList(GSUBLookup)) + }, + + 0x00010000: {}, + 0x00010001: { + featureVariations: new r.Pointer(r.uint32, FeatureVariations) + } +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/HVAR.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/HVAR.js new file mode 100644 index 00000000..1867677b --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/HVAR.js @@ -0,0 +1,44 @@ +import r from 'restructure'; +import {resolveLength} from 'restructure/src/utils'; +import {ItemVariationStore} from './variations'; + +// TODO: add this to restructure +class VariableSizeNumber { + constructor(size) { + this._size = size; + } + + decode(stream, parent) { + switch (this.size(0, parent)) { + case 1: return stream.readUInt8(); + case 2: return stream.readUInt16BE(); + case 3: return stream.readUInt24BE(); + case 4: return stream.readUInt32BE(); + } + } + + size(val, parent) { + return resolveLength(this._size, null, parent); + } +} + +let MapDataEntry = new r.Struct({ + entry: new VariableSizeNumber(t => ((t.parent.entryFormat & 0x0030) >> 4) + 1), + outerIndex: t => t.entry >> ((t.parent.entryFormat & 0x000F) + 1), + innerIndex: t => t.entry & ((1 << ((t.parent.entryFormat & 0x000F) + 1)) - 1) +}); + +let DeltaSetIndexMap = new r.Struct({ + entryFormat: r.uint16, + mapCount: r.uint16, + mapData: new r.Array(MapDataEntry, 'mapCount') +}); + +export default new r.Struct({ + majorVersion: r.uint16, + minorVersion: r.uint16, + itemVariationStore: new r.Pointer(r.uint32, ItemVariationStore), + advanceWidthMapping: new r.Pointer(r.uint32, DeltaSetIndexMap), + LSBMapping: new r.Pointer(r.uint32, DeltaSetIndexMap), + RSBMapping: new r.Pointer(r.uint32, DeltaSetIndexMap) +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/JSTF.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/JSTF.js new file mode 100644 index 00000000..cf480796 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/JSTF.js @@ -0,0 +1,43 @@ +import r from 'restructure'; +import { ScriptList, FeatureList, LookupList, Coverage, ClassDef, Device } from './opentype'; +import { GPOSLookup } from './GPOS'; + +let JstfGSUBModList = new r.Array(r.uint16, r.uint16); + +let JstfPriority = new r.Struct({ + shrinkageEnableGSUB: new r.Pointer(r.uint16, JstfGSUBModList), + shrinkageDisableGSUB: new r.Pointer(r.uint16, JstfGSUBModList), + shrinkageEnableGPOS: new r.Pointer(r.uint16, JstfGSUBModList), + shrinkageDisableGPOS: new r.Pointer(r.uint16, JstfGSUBModList), + shrinkageJstfMax: new r.Pointer(r.uint16, new LookupList(GPOSLookup)), + extensionEnableGSUB: new r.Pointer(r.uint16, JstfGSUBModList), + extensionDisableGSUB: new r.Pointer(r.uint16, JstfGSUBModList), + extensionEnableGPOS: new r.Pointer(r.uint16, JstfGSUBModList), + extensionDisableGPOS: new r.Pointer(r.uint16, JstfGSUBModList), + extensionJstfMax: new r.Pointer(r.uint16, new LookupList(GPOSLookup)) +}); + +let JstfLangSys = new r.Array(new r.Pointer(r.uint16, JstfPriority), r.uint16); + +let JstfLangSysRecord = new r.Struct({ + tag: new r.String(4), + jstfLangSys: new r.Pointer(r.uint16, JstfLangSys) +}); + +let JstfScript = new r.Struct({ + extenderGlyphs: new r.Pointer(r.uint16, new r.Array(r.uint16, r.uint16)), // array of glyphs to extend line length + defaultLangSys: new r.Pointer(r.uint16, JstfLangSys), + langSysCount: r.uint16, + langSysRecords: new r.Array(JstfLangSysRecord, 'langSysCount') +}); + +let JstfScriptRecord = new r.Struct({ + tag: new r.String(4), + script: new r.Pointer(r.uint16, JstfScript, {type: 'parent'}) +}); + +export default new r.Struct({ + version: r.uint32, // should be 0x00010000 + scriptCount: r.uint16, + scriptList: new r.Array(JstfScriptRecord, 'scriptCount') +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/LTSH.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/LTSH.js new file mode 100644 index 00000000..7c9b743e --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/LTSH.js @@ -0,0 +1,10 @@ +import r from 'restructure'; + +// Linear Threshold table +// Records the ppem for each glyph at which the scaling becomes linear again, +// despite instructions effecting the advance width +export default new r.Struct({ + version: r.uint16, + numGlyphs: r.uint16, + yPels: new r.Array(r.uint8, 'numGlyphs') +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/OS2.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/OS2.js new file mode 100644 index 00000000..8dc904ef --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/OS2.js @@ -0,0 +1,84 @@ +import r from 'restructure'; + +var OS2 = new r.VersionedStruct(r.uint16, { + header: { + xAvgCharWidth: r.int16, // average weighted advance width of lower case letters and space + usWeightClass: r.uint16, // visual weight of stroke in glyphs + usWidthClass: r.uint16, // relative change from the normal aspect ratio (width to height ratio) + fsType: new r.Bitfield(r.uint16, [ // Indicates font embedding licensing rights + null, 'noEmbedding', 'viewOnly', 'editable', null, + null, null, null, 'noSubsetting', 'bitmapOnly' + ]), + ySubscriptXSize: r.int16, // recommended horizontal size in pixels for subscripts + ySubscriptYSize: r.int16, // recommended vertical size in pixels for subscripts + ySubscriptXOffset: r.int16, // recommended horizontal offset for subscripts + ySubscriptYOffset: r.int16, // recommended vertical offset form the baseline for subscripts + ySuperscriptXSize: r.int16, // recommended horizontal size in pixels for superscripts + ySuperscriptYSize: r.int16, // recommended vertical size in pixels for superscripts + ySuperscriptXOffset: r.int16, // recommended horizontal offset for superscripts + ySuperscriptYOffset: r.int16, // recommended vertical offset from the baseline for superscripts + yStrikeoutSize: r.int16, // width of the strikeout stroke + yStrikeoutPosition: r.int16, // position of the strikeout stroke relative to the baseline + sFamilyClass: r.int16, // classification of font-family design + panose: new r.Array(r.uint8, 10), // describe the visual characteristics of a given typeface + ulCharRange: new r.Array(r.uint32, 4), + vendorID: new r.String(4), // four character identifier for the font vendor + fsSelection: new r.Bitfield(r.uint16, [ // bit field containing information about the font + 'italic', 'underscore', 'negative', 'outlined', 'strikeout', + 'bold', 'regular', 'useTypoMetrics', 'wws', 'oblique' + ]), + usFirstCharIndex: r.uint16, // The minimum Unicode index in this font + usLastCharIndex: r.uint16 // The maximum Unicode index in this font + }, + + // The Apple version of this table ends here, but the Microsoft one continues on... + 0: {}, + + 1: { + typoAscender: r.int16, + typoDescender: r.int16, + typoLineGap: r.int16, + winAscent: r.uint16, + winDescent: r.uint16, + codePageRange: new r.Array(r.uint32, 2) + }, + + 2: { + // these should be common with version 1 somehow + typoAscender: r.int16, + typoDescender: r.int16, + typoLineGap: r.int16, + winAscent: r.uint16, + winDescent: r.uint16, + codePageRange: new r.Array(r.uint32, 2), + + xHeight: r.int16, + capHeight: r.int16, + defaultChar: r.uint16, + breakChar: r.uint16, + maxContent: r.uint16 + }, + + 5: { + typoAscender: r.int16, + typoDescender: r.int16, + typoLineGap: r.int16, + winAscent: r.uint16, + winDescent: r.uint16, + codePageRange: new r.Array(r.uint32, 2), + + xHeight: r.int16, + capHeight: r.int16, + defaultChar: r.uint16, + breakChar: r.uint16, + maxContent: r.uint16, + + usLowerOpticalPointSize: r.uint16, + usUpperOpticalPointSize: r.uint16 + } +}); + +let versions = OS2.versions; +versions[3] = versions[4] = versions[2]; + +export default OS2; diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/PCLT.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/PCLT.js new file mode 100644 index 00000000..729d7bb0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/PCLT.js @@ -0,0 +1,21 @@ +import r from 'restructure'; + +// PCL 5 Table +// NOTE: The PCLT table is strongly discouraged for OpenType fonts with TrueType outlines +export default new r.Struct({ + version: r.uint16, + fontNumber: r.uint32, + pitch: r.uint16, + xHeight: r.uint16, + style: r.uint16, + typeFamily: r.uint16, + capHeight: r.uint16, + symbolSet: r.uint16, + typeface: new r.String(16), + characterComplement: new r.String(8), + fileName: new r.String(6), + strokeWeight: new r.String(1), + widthType: new r.String(1), + serifStyle: r.uint8, + reserved: new r.Reserved(r.uint8) +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/VDMX.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/VDMX.js new file mode 100644 index 00000000..da9c03b2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/VDMX.js @@ -0,0 +1,33 @@ +import r from 'restructure'; + +// VDMX tables contain ascender/descender overrides for certain (usually small) +// sizes. This is needed in order to match font metrics on Windows. + +let Ratio = new r.Struct({ + bCharSet: r.uint8, // Character set + xRatio: r.uint8, // Value to use for x-Ratio + yStartRatio: r.uint8, // Starting y-Ratio value + yEndRatio: r.uint8 // Ending y-Ratio value +}); + +let vTable = new r.Struct({ + yPelHeight: r.uint16, // yPelHeight to which values apply + yMax: r.int16, // Maximum value (in pels) for this yPelHeight + yMin: r.int16 // Minimum value (in pels) for this yPelHeight +}); + +let VdmxGroup = new r.Struct({ + recs: r.uint16, // Number of height records in this group + startsz: r.uint8, // Starting yPelHeight + endsz: r.uint8, // Ending yPelHeight + entries: new r.Array(vTable, 'recs') // The VDMX records +}); + +export default new r.Struct({ + version: r.uint16, // Version number (0 or 1) + numRecs: r.uint16, // Number of VDMX groups present + numRatios: r.uint16, // Number of aspect ratio groupings + ratioRanges: new r.Array(Ratio, 'numRatios'), // Ratio ranges + offsets: new r.Array(r.uint16, 'numRatios'), // Offset to the VDMX group for this ratio range + groups: new r.Array(VdmxGroup, 'numRecs') // The actual VDMX groupings +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/VORG.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/VORG.js new file mode 100644 index 00000000..0474d282 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/VORG.js @@ -0,0 +1,14 @@ +import r from 'restructure'; + +let VerticalOrigin = new r.Struct({ + glyphIndex: r.uint16, + vertOriginY: r.int16 +}); + +export default new r.Struct({ + majorVersion: r.uint16, + minorVersion: r.uint16, + defaultVertOriginY: r.int16, + numVertOriginYMetrics: r.uint16, + metrics: new r.Array(VerticalOrigin, 'numVertOriginYMetrics') +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/WOFF2Directory.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/WOFF2Directory.js new file mode 100644 index 00000000..6853562c --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/WOFF2Directory.js @@ -0,0 +1,74 @@ +import r from 'restructure'; + +const Base128 = { + decode(stream) { + let result = 0; + let iterable = [0, 1, 2, 3, 4]; + for (let j = 0; j < iterable.length; j++) { + let i = iterable[j]; + let code = stream.readUInt8(); + + // If any of the top seven bits are set then we're about to overflow. + if (result & 0xe0000000) { + throw new Error('Overflow'); + } + + result = (result << 7) | (code & 0x7f); + if ((code & 0x80) === 0) { + return result; + } + } + + throw new Error('Bad base 128 number'); + } +}; + +let knownTags = [ + 'cmap', 'head', 'hhea', 'hmtx', 'maxp', 'name', 'OS/2', 'post', 'cvt ', + 'fpgm', 'glyf', 'loca', 'prep', 'CFF ', 'VORG', 'EBDT', 'EBLC', 'gasp', + 'hdmx', 'kern', 'LTSH', 'PCLT', 'VDMX', 'vhea', 'vmtx', 'BASE', 'GDEF', + 'GPOS', 'GSUB', 'EBSC', 'JSTF', 'MATH', 'CBDT', 'CBLC', 'COLR', 'CPAL', + 'SVG ', 'sbix', 'acnt', 'avar', 'bdat', 'bloc', 'bsln', 'cvar', 'fdsc', + 'feat', 'fmtx', 'fvar', 'gvar', 'hsty', 'just', 'lcar', 'mort', 'morx', + 'opbd', 'prop', 'trak', 'Zapf', 'Silf', 'Glat', 'Gloc', 'Feat', 'Sill' +]; + +let WOFF2DirectoryEntry = new r.Struct({ + flags: r.uint8, + customTag: new r.Optional(new r.String(4), t => (t.flags & 0x3f) === 0x3f), + tag: t => t.customTag || knownTags[t.flags & 0x3f],// || (() => { throw new Error(`Bad tag: ${flags & 0x3f}`); })(); }, + length: Base128, + transformVersion: t => (t.flags >>> 6) & 0x03, + transformed: t => (t.tag === 'glyf' || t.tag === 'loca') ? t.transformVersion === 0 : t.transformVersion !== 0, + transformLength: new r.Optional(Base128, t => t.transformed) +}); + +let WOFF2Directory = new r.Struct({ + tag: new r.String(4), // should be 'wOF2' + flavor: r.uint32, + length: r.uint32, + numTables: r.uint16, + reserved: new r.Reserved(r.uint16), + totalSfntSize: r.uint32, + totalCompressedSize: r.uint32, + majorVersion: r.uint16, + minorVersion: r.uint16, + metaOffset: r.uint32, + metaLength: r.uint32, + metaOrigLength: r.uint32, + privOffset: r.uint32, + privLength: r.uint32, + tables: new r.Array(WOFF2DirectoryEntry, 'numTables') +}); + +WOFF2Directory.process = function() { + let tables = {}; + for (let i = 0; i < this.tables.length; i++) { + let table = this.tables[i]; + tables[table.tag] = table; + } + + return this.tables = tables; +}; + +export default WOFF2Directory; diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/WOFFDirectory.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/WOFFDirectory.js new file mode 100644 index 00000000..cc05e8fe --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/WOFFDirectory.js @@ -0,0 +1,38 @@ +import r from 'restructure'; +import tables from './'; + +let WOFFDirectoryEntry = new r.Struct({ + tag: new r.String(4), + offset: new r.Pointer(r.uint32, 'void', {type: 'global'}), + compLength: r.uint32, + length: r.uint32, + origChecksum: r.uint32 +}); + +let WOFFDirectory = new r.Struct({ + tag: new r.String(4), // should be 'wOFF' + flavor: r.uint32, + length: r.uint32, + numTables: r.uint16, + reserved: new r.Reserved(r.uint16), + totalSfntSize: r.uint32, + majorVersion: r.uint16, + minorVersion: r.uint16, + metaOffset: r.uint32, + metaLength: r.uint32, + metaOrigLength: r.uint32, + privOffset: r.uint32, + privLength: r.uint32, + tables: new r.Array(WOFFDirectoryEntry, 'numTables') +}); + +WOFFDirectory.process = function() { + let tables = {}; + for (let table of this.tables) { + tables[table.tag] = table; + } + + this.tables = tables; +}; + +export default WOFFDirectory; diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/aat.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/aat.js new file mode 100644 index 00000000..18da59b2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/aat.js @@ -0,0 +1,157 @@ +import r from 'restructure'; + +class UnboundedArrayAccessor { + constructor(type, stream, parent) { + this.type = type; + this.stream = stream; + this.parent = parent; + this.base = this.stream.pos; + this._items = []; + } + + getItem(index) { + if (this._items[index] == null) { + let pos = this.stream.pos; + this.stream.pos = this.base + this.type.size(null, this.parent) * index; + this._items[index] = this.type.decode(this.stream, this.parent); + this.stream.pos = pos; + } + + return this._items[index]; + } + + inspect() { + return `[UnboundedArray ${this.type.constructor.name}]`; + } +} + +export class UnboundedArray extends r.Array { + constructor(type) { + super(type, 0); + } + + decode(stream, parent) { + return new UnboundedArrayAccessor(this.type, stream, parent); + } +} + +export let LookupTable = function(ValueType = r.uint16) { + // Helper class that makes internal structures invisible to pointers + class Shadow { + constructor(type) { + this.type = type; + } + + decode(stream, ctx) { + ctx = ctx.parent.parent; + return this.type.decode(stream, ctx); + } + + size(val, ctx) { + ctx = ctx.parent.parent; + return this.type.size(val, ctx); + } + + encode(stream, val, ctx) { + ctx = ctx.parent.parent; + return this.type.encode(stream, val, ctx); + } + } + + ValueType = new Shadow(ValueType); + + let BinarySearchHeader = new r.Struct({ + unitSize: r.uint16, + nUnits: r.uint16, + searchRange: r.uint16, + entrySelector: r.uint16, + rangeShift: r.uint16 + }); + + let LookupSegmentSingle = new r.Struct({ + lastGlyph: r.uint16, + firstGlyph: r.uint16, + value: ValueType + }); + + let LookupSegmentArray = new r.Struct({ + lastGlyph: r.uint16, + firstGlyph: r.uint16, + values: new r.Pointer(r.uint16, new r.Array(ValueType, t => t.lastGlyph - t.firstGlyph + 1), {type: 'parent'}) + }); + + let LookupSingle = new r.Struct({ + glyph: r.uint16, + value: ValueType + }); + + return new r.VersionedStruct(r.uint16, { + 0: { + values: new UnboundedArray(ValueType) // length == number of glyphs maybe? + }, + 2: { + binarySearchHeader: BinarySearchHeader, + segments: new r.Array(LookupSegmentSingle, t => t.binarySearchHeader.nUnits) + }, + 4: { + binarySearchHeader: BinarySearchHeader, + segments: new r.Array(LookupSegmentArray, t => t.binarySearchHeader.nUnits) + }, + 6: { + binarySearchHeader: BinarySearchHeader, + segments: new r.Array(LookupSingle, t => t.binarySearchHeader.nUnits) + }, + 8: { + firstGlyph: r.uint16, + count: r.uint16, + values: new r.Array(ValueType, 'count') + } + }); +}; + +export function StateTable(entryData = {}, lookupType = r.uint16) { + let entry = Object.assign({ + newState: r.uint16, + flags: r.uint16 + }, entryData); + + let Entry = new r.Struct(entry); + let StateArray = new UnboundedArray(new r.Array(r.uint16, t => t.nClasses)); + + let StateHeader = new r.Struct({ + nClasses: r.uint32, + classTable: new r.Pointer(r.uint32, new LookupTable(lookupType)), + stateArray: new r.Pointer(r.uint32, StateArray), + entryTable: new r.Pointer(r.uint32, new UnboundedArray(Entry)) + }); + + return StateHeader; +} + +// This is the old version of the StateTable structure +export function StateTable1(entryData = {}, lookupType = r.uint16) { + let ClassLookupTable = new r.Struct({ + version() { return 8; }, // simulate LookupTable + firstGlyph: r.uint16, + values: new r.Array(r.uint8, r.uint16) + }); + + let entry = Object.assign({ + newStateOffset: r.uint16, + // convert offset to stateArray index + newState: t => (t.newStateOffset - (t.parent.stateArray.base - t.parent._startOffset)) / t.parent.nClasses, + flags: r.uint16 + }, entryData); + + let Entry = new r.Struct(entry); + let StateArray = new UnboundedArray(new r.Array(r.uint8, t => t.nClasses)); + + let StateHeader1 = new r.Struct({ + nClasses: r.uint16, + classTable: new r.Pointer(r.uint16, ClassLookupTable), + stateArray: new r.Pointer(r.uint16, StateArray), + entryTable: new r.Pointer(r.uint16, new UnboundedArray(Entry)) + }); + + return StateHeader1; +} diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/avar.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/avar.js new file mode 100644 index 00000000..3c92d897 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/avar.js @@ -0,0 +1,19 @@ +import r from 'restructure'; + +let shortFrac = new r.Fixed(16, 'BE', 14); + +let Correspondence = new r.Struct({ + fromCoord: shortFrac, + toCoord: shortFrac +}); + +let Segment = new r.Struct({ + pairCount: r.uint16, + correspondence: new r.Array(Correspondence, 'pairCount') +}); + +export default new r.Struct({ + version: r.fixed32, + axisCount: r.uint32, + segment: new r.Array(Segment, 'axisCount') +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/bsln.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/bsln.js new file mode 100644 index 00000000..bc2fef27 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/bsln.js @@ -0,0 +1,31 @@ +import r from 'restructure'; +import { LookupTable } from './aat'; + +let BslnSubtable = new r.VersionedStruct('format', { + 0: { // Distance-based, no mapping + deltas: new r.Array(r.int16, 32) + }, + + 1: { // Distance-based, with mapping + deltas: new r.Array(r.int16, 32), + mappingData: new LookupTable(r.uint16) + }, + + 2: { // Control point-based, no mapping + standardGlyph: r.uint16, + controlPoints: new r.Array(r.uint16, 32) + }, + + 3: { // Control point-based, with mapping + standardGlyph: r.uint16, + controlPoints: new r.Array(r.uint16, 32), + mappingData: new LookupTable(r.uint16) + } +}); + +export default new r.Struct({ + version: r.fixed32, + format: r.uint16, + defaultBaseline: r.uint16, + subtable: BslnSubtable +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/cmap.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/cmap.js new file mode 100644 index 00000000..deef3c73 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/cmap.js @@ -0,0 +1,127 @@ +import r from 'restructure'; + +let SubHeader = new r.Struct({ + firstCode: r.uint16, + entryCount: r.uint16, + idDelta: r.int16, + idRangeOffset: r.uint16 +}); + +let CmapGroup = new r.Struct({ + startCharCode: r.uint32, + endCharCode: r.uint32, + glyphID: r.uint32 +}); + +let UnicodeValueRange = new r.Struct({ + startUnicodeValue: r.uint24, + additionalCount: r.uint8 +}); + +let UVSMapping = new r.Struct({ + unicodeValue: r.uint24, + glyphID: r.uint16 +}); + +let DefaultUVS = new r.Array(UnicodeValueRange, r.uint32); +let NonDefaultUVS = new r.Array(UVSMapping, r.uint32); + +let VarSelectorRecord = new r.Struct({ + varSelector: r.uint24, + defaultUVS: new r.Pointer(r.uint32, DefaultUVS, {type: 'parent'}), + nonDefaultUVS: new r.Pointer(r.uint32, NonDefaultUVS, {type: 'parent'}) +}); + +let CmapSubtable = new r.VersionedStruct(r.uint16, { + 0: { // Byte encoding + length: r.uint16, // Total table length in bytes (set to 262 for format 0) + language: r.uint16, // Language code for this encoding subtable, or zero if language-independent + codeMap: new r.LazyArray(r.uint8, 256) + }, + + 2: { // High-byte mapping (CJK) + length: r.uint16, + language: r.uint16, + subHeaderKeys: new r.Array(r.uint16, 256), + subHeaderCount: t => Math.max.apply(Math, t.subHeaderKeys), + subHeaders: new r.LazyArray(SubHeader, 'subHeaderCount'), + glyphIndexArray: new r.LazyArray(r.uint16, 'subHeaderCount') + }, + + 4: { // Segment mapping to delta values + length: r.uint16, // Total table length in bytes + language: r.uint16, // Language code + segCountX2: r.uint16, + segCount: t => t.segCountX2 >> 1, + searchRange: r.uint16, + entrySelector: r.uint16, + rangeShift: r.uint16, + endCode: new r.LazyArray(r.uint16, 'segCount'), + reservedPad: new r.Reserved(r.uint16), // This value should be zero + startCode: new r.LazyArray(r.uint16, 'segCount'), + idDelta: new r.LazyArray(r.int16, 'segCount'), + idRangeOffset: new r.LazyArray(r.uint16, 'segCount'), + glyphIndexArray: new r.LazyArray(r.uint16, t => (t.length - t._currentOffset) / 2) + }, + + 6: { // Trimmed table + length: r.uint16, + language: r.uint16, + firstCode: r.uint16, + entryCount: r.uint16, + glyphIndices: new r.LazyArray(r.uint16, 'entryCount') + }, + + 8: { // mixed 16-bit and 32-bit coverage + reserved: new r.Reserved(r.uint16), + length: r.uint32, + language: r.uint16, + is32: new r.LazyArray(r.uint8, 8192), + nGroups: r.uint32, + groups: new r.LazyArray(CmapGroup, 'nGroups') + }, + + 10: { // Trimmed Array + reserved: new r.Reserved(r.uint16), + length: r.uint32, + language: r.uint32, + firstCode: r.uint32, + entryCount: r.uint32, + glyphIndices: new r.LazyArray(r.uint16, 'numChars') + }, + + 12: { // Segmented coverage + reserved: new r.Reserved(r.uint16), + length: r.uint32, + language: r.uint32, + nGroups: r.uint32, + groups: new r.LazyArray(CmapGroup, 'nGroups') + }, + + 13: { // Many-to-one range mappings (same as 12 except for group.startGlyphID) + reserved: new r.Reserved(r.uint16), + length: r.uint32, + language: r.uint32, + nGroups: r.uint32, + groups: new r.LazyArray(CmapGroup, 'nGroups') + }, + + 14: { // Unicode Variation Sequences + length: r.uint32, + numRecords: r.uint32, + varSelectors: new r.LazyArray(VarSelectorRecord, 'numRecords') + } +}); + +let CmapEntry = new r.Struct({ + platformID: r.uint16, // Platform identifier + encodingID: r.uint16, // Platform-specific encoding identifier + table: new r.Pointer(r.uint32, CmapSubtable, {type: 'parent', lazy: true}) +}); + +// character to glyph mapping +export default new r.Struct({ + version: r.uint16, + numSubtables: r.uint16, + tables: new r.Array(CmapEntry, 'numSubtables') +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/cvt.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/cvt.js new file mode 100644 index 00000000..d30e4941 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/cvt.js @@ -0,0 +1,6 @@ +import r from 'restructure'; + +// An array of predefined values accessible by instructions +export default new r.Struct({ + controlValues: new r.Array(r.int16) +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/directory.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/directory.js new file mode 100644 index 00000000..1e62df27 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/directory.js @@ -0,0 +1,52 @@ +import r from 'restructure'; +import Tables from './'; + +let TableEntry = new r.Struct({ + tag: new r.String(4), + checkSum: r.uint32, + offset: new r.Pointer(r.uint32, 'void', { type: 'global' }), + length: r.uint32 +}); + +let Directory = new r.Struct({ + tag: new r.String(4), + numTables: r.uint16, + searchRange: r.uint16, + entrySelector: r.uint16, + rangeShift: r.uint16, + tables: new r.Array(TableEntry, 'numTables') +}); + +Directory.process = function() { + let tables = {}; + for (let table of this.tables) { + tables[table.tag] = table; + } + + this.tables = tables; +}; + +Directory.preEncode = function(stream) { + let tables = []; + for (let tag in this.tables) { + let table = this.tables[tag]; + if (table) { + tables.push({ + tag: tag, + checkSum: 0, + offset: new r.VoidPointer(Tables[tag], table), + length: Tables[tag].size(table) + }); + } + } + + this.tag = 'true'; + this.numTables = tables.length; + this.tables = tables; + + this.searchRange = Math.floor(Math.log(this.numTables) / Math.LN2) * 16; + this.entrySelector = Math.floor(this.searchRange / Math.LN2); + this.rangeShift = this.numTables * 16 - this.searchRange; +}; + +export default Directory; diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/feat.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/feat.js new file mode 100644 index 00000000..11a7822c --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/feat.js @@ -0,0 +1,28 @@ +import r from 'restructure'; + +let Setting = new r.Struct({ + setting: r.uint16, + nameIndex: r.int16, + name: t => t.parent.parent.parent.name.records.fontFeatures[t.nameIndex] +}); + +let FeatureName = new r.Struct({ + feature: r.uint16, + nSettings: r.uint16, + settingTable: new r.Pointer(r.uint32, new r.Array(Setting, 'nSettings'), { type: 'parent' }), + featureFlags: new r.Bitfield(r.uint8, [ + null, null, null, null, null, null, + 'hasDefault', 'exclusive' + ]), + defaultSetting: r.uint8, + nameIndex: r.int16, + name: t => t.parent.parent.name.records.fontFeatures[t.nameIndex] +}); + +export default new r.Struct({ + version: r.fixed32, + featureNameCount: r.uint16, + reserved1: new r.Reserved(r.uint16), + reserved2: new r.Reserved(r.uint32), + featureNames: new r.Array(FeatureName, 'featureNameCount') +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/fpgm.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/fpgm.js new file mode 100644 index 00000000..3cacb5f4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/fpgm.js @@ -0,0 +1,8 @@ +import r from 'restructure'; + +// A list of instructions that are executed once when a font is first used. +// These instructions are known as the font program. The main use of this table +// is for the definition of functions that are used in many different glyph programs. +export default new r.Struct({ + instructions: new r.Array(r.uint8) +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/fvar.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/fvar.js new file mode 100644 index 00000000..98422610 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/fvar.js @@ -0,0 +1,30 @@ +import r from 'restructure'; + +let Axis = new r.Struct({ + axisTag: new r.String(4), + minValue: r.fixed32, + defaultValue: r.fixed32, + maxValue: r.fixed32, + flags: r.uint16, + nameID: r.uint16, + name: t => t.parent.parent.name.records.fontFeatures[t.nameID] +}); + +let Instance = new r.Struct({ + nameID: r.uint16, + name: t => t.parent.parent.name.records.fontFeatures[t.nameID], + flags: r.uint16, + coord: new r.Array(r.fixed32, t => t.parent.axisCount) +}); + +export default new r.Struct({ + version: r.fixed32, + offsetToData: r.uint16, + countSizePairs: r.uint16, + axisCount: r.uint16, + axisSize: r.uint16, + instanceCount: r.uint16, + instanceSize: r.uint16, + axis: new r.Array(Axis, 'axisCount'), + instance: new r.Array(Instance, 'instanceCount') +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/gasp.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/gasp.js new file mode 100644 index 00000000..879f78d3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/gasp.js @@ -0,0 +1,15 @@ +import r from 'restructure'; + +let GaspRange = new r.Struct({ + rangeMaxPPEM: r.uint16, // Upper limit of range, in ppem + rangeGaspBehavior: new r.Bitfield(r.uint16, [ // Flags describing desired rasterizer behavior + 'grayscale', 'gridfit', + 'symmetricSmoothing', 'symmetricGridfit' // only in version 1, for ClearType + ]) +}); + +export default new r.Struct({ + version: r.uint16, // set to 0 + numRanges: r.uint16, + gaspRanges: new r.Array(GaspRange, 'numRanges') // Sorted by ppem +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/glyf.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/glyf.js new file mode 100644 index 00000000..5ecf8845 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/glyf.js @@ -0,0 +1,4 @@ +import r from 'restructure'; + +// only used for encoding +export default new r.Array(new r.Buffer); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/gvar.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/gvar.js new file mode 100644 index 00000000..401ddc07 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/gvar.js @@ -0,0 +1,27 @@ +import r from 'restructure'; + +let shortFrac = new r.Fixed(16, 'BE', 14); +class Offset { + static decode(stream, parent) { + // In short format, offsets are multiplied by 2. + // This doesn't seem to be documented by Apple, but it + // is implemented this way in Freetype. + return parent.flags + ? stream.readUInt32BE() + : stream.readUInt16BE() * 2; + } +} + +let gvar = new r.Struct({ + version: r.uint16, + reserved: new r.Reserved(r.uint16), + axisCount: r.uint16, + globalCoordCount: r.uint16, + globalCoords: new r.Pointer(r.uint32, new r.Array(new r.Array(shortFrac, 'axisCount'), 'globalCoordCount')), + glyphCount: r.uint16, + flags: r.uint16, + offsetToData: r.uint32, + offsets: new r.Array(new r.Pointer(Offset, 'void', { relativeTo: 'offsetToData', allowNull: false }), t => t.glyphCount + 1) +}); + +export default gvar; diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/hdmx.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/hdmx.js new file mode 100644 index 00000000..c067e27a --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/hdmx.js @@ -0,0 +1,15 @@ +import r from 'restructure'; + +let DeviceRecord = new r.Struct({ + pixelSize: r.uint8, + maximumWidth: r.uint8, + widths: new r.Array(r.uint8, t => t.parent.parent.maxp.numGlyphs) +}); + +// The Horizontal Device Metrics table stores integer advance widths scaled to particular pixel sizes +export default new r.Struct({ + version: r.uint16, + numRecords: r.int16, + sizeDeviceRecord: r.int32, + records: new r.Array(DeviceRecord, 'numRecords') +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/head.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/head.js new file mode 100644 index 00000000..29af5d10 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/head.js @@ -0,0 +1,25 @@ +import r from 'restructure'; + +// font header +export default new r.Struct({ + version: r.int32, // 0x00010000 (version 1.0) + revision: r.int32, // set by font manufacturer + checkSumAdjustment: r.uint32, + magicNumber: r.uint32, // set to 0x5F0F3CF5 + flags: r.uint16, + unitsPerEm: r.uint16, // range from 64 to 16384 + created: new r.Array(r.int32, 2), + modified: new r.Array(r.int32, 2), + xMin: r.int16, // for all glyph bounding boxes + yMin: r.int16, // for all glyph bounding boxes + xMax: r.int16, // for all glyph bounding boxes + yMax: r.int16, // for all glyph bounding boxes + macStyle: new r.Bitfield(r.uint16, [ + 'bold', 'italic', 'underline', 'outline', + 'shadow', 'condensed', 'extended' + ]), + lowestRecPPEM: r.uint16, // smallest readable size in pixels + fontDirectionHint: r.int16, + indexToLocFormat: r.int16, // 0 for short offsets, 1 for long + glyphDataFormat: r.int16 // 0 for current format +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/hhea.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/hhea.js new file mode 100644 index 00000000..a0908abb --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/hhea.js @@ -0,0 +1,19 @@ +import r from 'restructure'; + +// horizontal header +export default new r.Struct({ + version: r.int32, + ascent: r.int16, // Distance from baseline of highest ascender + descent: r.int16, // Distance from baseline of lowest descender + lineGap: r.int16, // Typographic line gap + advanceWidthMax: r.uint16, // Maximum advance width value in 'hmtx' table + minLeftSideBearing: r.int16, // Maximum advance width value in 'hmtx' table + minRightSideBearing: r.int16, // Minimum right sidebearing value + xMaxExtent: r.int16, + caretSlopeRise: r.int16, // Used to calculate the slope of the cursor (rise/run); 1 for vertical + caretSlopeRun: r.int16, // 0 for vertical + caretOffset: r.int16, // Set to 0 for non-slanted fonts + reserved: new r.Reserved(r.int16, 4), + metricDataFormat: r.int16, // 0 for current format + numberOfMetrics: r.uint16 // Number of advance widths in 'hmtx' table +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/hmtx.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/hmtx.js new file mode 100644 index 00000000..8857f773 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/hmtx.js @@ -0,0 +1,11 @@ +import r from 'restructure'; + +let HmtxEntry = new r.Struct({ + advance: r.uint16, + bearing: r.int16 +}); + +export default new r.Struct({ + metrics: new r.LazyArray(HmtxEntry, t => t.parent.hhea.numberOfMetrics), + bearings: new r.LazyArray(r.int16, t => t.parent.maxp.numGlyphs - t.parent.hhea.numberOfMetrics) +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/index.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/index.js new file mode 100644 index 00000000..438bb48c --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/index.js @@ -0,0 +1,117 @@ +let tables = {}; +export default tables; + +// Required Tables +import cmap from './cmap'; +import head from './head'; +import hhea from './hhea'; +import hmtx from './hmtx'; +import maxp from './maxp'; +import name from './name'; +import OS2 from './OS2'; +import post from './post'; + +tables.cmap = cmap; +tables.head = head; +tables.hhea = hhea; +tables.hmtx = hmtx; +tables.maxp = maxp; +tables.name = name; +tables['OS/2'] = OS2; +tables.post = post; + + +// TrueType Outlines +import cvt from './cvt'; +import fpgm from './fpgm'; +import loca from './loca'; +import prep from './prep'; +import glyf from './glyf'; + +tables.fpgm = fpgm; +tables.loca = loca; +tables.prep = prep; +tables['cvt '] = cvt; +tables.glyf = glyf; + + +// PostScript Outlines +import CFFFont from '../cff/CFFFont'; +import VORG from './VORG'; + +tables['CFF '] = CFFFont; +tables['CFF2'] = CFFFont; +tables.VORG = VORG; + + +// Bitmap Glyphs +import EBLC from './EBLC'; +import sbix from './sbix'; +import COLR from './COLR'; +import CPAL from './CPAL'; + +tables.EBLC = EBLC; +tables.CBLC = tables.EBLC; +tables.sbix = sbix; +tables.COLR = COLR; +tables.CPAL = CPAL; + + +// Advanced OpenType Tables +import BASE from './BASE'; +import GDEF from './GDEF'; +import GPOS from './GPOS'; +import GSUB from './GSUB'; +import JSTF from './JSTF'; + +tables.BASE = BASE; +tables.GDEF = GDEF; +tables.GPOS = GPOS; +tables.GSUB = GSUB; +tables.JSTF = JSTF; + +// OpenType variations tables +import HVAR from './HVAR'; + +tables.HVAR = HVAR; + +// Other OpenType Tables +import DSIG from './DSIG'; +import gasp from './gasp'; +import hdmx from './hdmx'; +import kern from './kern'; +import LTSH from './LTSH'; +import PCLT from './PCLT'; +import VDMX from './VDMX'; +import vhea from './vhea'; +import vmtx from './vmtx'; + +tables.DSIG = DSIG; +tables.gasp = gasp; +tables.hdmx = hdmx; +tables.kern = kern; +tables.LTSH = LTSH; +tables.PCLT = PCLT; +tables.VDMX = VDMX; +tables.vhea = vhea; +tables.vmtx = vmtx; + + +// Apple Advanced Typography Tables +import avar from './avar'; +import bsln from './bsln'; +import feat from './feat'; +import fvar from './fvar'; +import gvar from './gvar'; +import just from './just'; +import morx from './morx'; +import opbd from './opbd'; + +tables.avar = avar; +tables.bsln = bsln; +tables.feat = feat; +tables.fvar = fvar; +tables.gvar = gvar; +tables.just = just; +tables.morx = morx; +tables.opbd = opbd; diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/just.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/just.js new file mode 100644 index 00000000..3754f0b4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/just.js @@ -0,0 +1,81 @@ +import r from 'restructure'; +import { LookupTable, StateTable1 } from './aat'; + +let ClassTable = new r.Struct({ + length: r.uint16, + coverage: r.uint16, + subFeatureFlags: r.uint32, + stateTable: new StateTable1 +}); + +let WidthDeltaRecord = new r.Struct({ + justClass: r.uint32, + beforeGrowLimit: r.fixed32, + beforeShrinkLimit: r.fixed32, + afterGrowLimit: r.fixed32, + afterShrinkLimit: r.fixed32, + growFlags: r.uint16, + shrinkFlags: r.uint16 +}); + +let WidthDeltaCluster = new r.Array(WidthDeltaRecord, r.uint32); + +let ActionData = new r.VersionedStruct('actionType', { + 0: { // Decomposition action + lowerLimit: r.fixed32, + upperLimit: r.fixed32, + order: r.uint16, + glyphs: new r.Array(r.uint16, r.uint16) + }, + + 1: { // Unconditional add glyph action + addGlyph: r.uint16 + }, + + 2: { // Conditional add glyph action + substThreshold: r.fixed32, + addGlyph: r.uint16, + substGlyph: r.uint16 + }, + + 3: {}, // Stretch glyph action (no data, not supported by CoreText) + + 4: { // Ductile glyph action (not supported by CoreText) + variationAxis: r.uint32, + minimumLimit: r.fixed32, + noStretchValue: r.fixed32, + maximumLimit: r.fixed32 + }, + + 5: { // Repeated add glyph action + flags: r.uint16, + glyph: r.uint16 + } +}); + +let Action = new r.Struct({ + actionClass: r.uint16, + actionType: r.uint16, + actionLength: r.uint32, + actionData: ActionData, + padding: new r.Reserved(r.uint8, t => t.actionLength - t._currentOffset) +}); + +let PostcompensationAction = new r.Array(Action, r.uint32); +let PostCompensationTable = new r.Struct({ + lookupTable: new LookupTable(new r.Pointer(r.uint16, PostcompensationAction)) +}); + +let JustificationTable = new r.Struct({ + classTable: new r.Pointer(r.uint16, ClassTable, { type: 'parent' }), + wdcOffset: r.uint16, + postCompensationTable: new r.Pointer(r.uint16, PostCompensationTable, { type: 'parent' }), + widthDeltaClusters: new LookupTable(new r.Pointer(r.uint16, WidthDeltaCluster, { type: 'parent', relativeTo: 'wdcOffset' })) +}); + +export default new r.Struct({ + version: r.uint32, + format: r.uint16, + horizontal: new r.Pointer(r.uint16, JustificationTable), + vertical: new r.Pointer(r.uint16, JustificationTable) +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/kern.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/kern.js new file mode 100644 index 00000000..838c42b8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/kern.js @@ -0,0 +1,91 @@ +import r from 'restructure'; + +let KernPair = new r.Struct({ + left: r.uint16, + right: r.uint16, + value: r.int16 +}); + +let ClassTable = new r.Struct({ + firstGlyph: r.uint16, + nGlyphs: r.uint16, + offsets: new r.Array(r.uint16, 'nGlyphs'), + max: t => t.offsets.length && Math.max.apply(Math, t.offsets) +}); + +let Kern2Array = new r.Struct({ + off: t => t._startOffset - t.parent.parent._startOffset, + len: t => (((t.parent.leftTable.max - t.off) / t.parent.rowWidth) + 1) * (t.parent.rowWidth / 2), + values: new r.LazyArray(r.int16, 'len') +}); + +let KernSubtable = new r.VersionedStruct('format', { + 0: { + nPairs: r.uint16, + searchRange: r.uint16, + entrySelector: r.uint16, + rangeShift: r.uint16, + pairs: new r.Array(KernPair, 'nPairs') + }, + + 2: { + rowWidth: r.uint16, + leftTable: new r.Pointer(r.uint16, ClassTable, {type: 'parent'}), + rightTable: new r.Pointer(r.uint16, ClassTable, {type: 'parent'}), + array: new r.Pointer(r.uint16, Kern2Array, {type: 'parent'}) + }, + + 3: { + glyphCount: r.uint16, + kernValueCount: r.uint8, + leftClassCount: r.uint8, + rightClassCount: r.uint8, + flags: r.uint8, + kernValue: new r.Array(r.int16, 'kernValueCount'), + leftClass: new r.Array(r.uint8, 'glyphCount'), + rightClass: new r.Array(r.uint8, 'glyphCount'), + kernIndex: new r.Array(r.uint8, t => t.leftClassCount * t.rightClassCount) + } +}); + +let KernTable = new r.VersionedStruct('version', { + 0: { // Microsoft uses this format + subVersion: r.uint16, // Microsoft has an extra sub-table version number + length: r.uint16, // Length of the subtable, in bytes + format: r.uint8, // Format of subtable + coverage: new r.Bitfield(r.uint8, [ + 'horizontal', // 1 if table has horizontal data, 0 if vertical + 'minimum', // If set to 1, the table has minimum values. If set to 0, the table has kerning values. + 'crossStream', // If set to 1, kerning is perpendicular to the flow of the text + 'override' // If set to 1 the value in this table replaces the accumulated value + ]), + subtable: KernSubtable, + padding: new r.Reserved(r.uint8, t => t.length - t._currentOffset) + }, + 1: { // Apple uses this format + length: r.uint32, + coverage: new r.Bitfield(r.uint8, [ + null, null, null, null, null, + 'variation', // Set if table has variation kerning values + 'crossStream', // Set if table has cross-stream kerning values + 'vertical' // Set if table has vertical kerning values + ]), + format: r.uint8, + tupleIndex: r.uint16, + subtable: KernSubtable, + padding: new r.Reserved(r.uint8, t => t.length - t._currentOffset) + } +}); + +export default new r.VersionedStruct(r.uint16, { + 0: { // Microsoft Version + nTables: r.uint16, + tables: new r.Array(KernTable, 'nTables') + }, + + 1: { // Apple Version + reserved: new r.Reserved(r.uint16), // the other half of the version number + nTables: r.uint32, + tables: new r.Array(KernTable, 'nTables') + } +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/loca.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/loca.js new file mode 100644 index 00000000..80d2e1b7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/loca.js @@ -0,0 +1,33 @@ +import r from 'restructure'; + +let loca = new r.VersionedStruct('head.indexToLocFormat', { + 0: { + offsets: new r.Array(r.uint16) + }, + 1: { + offsets: new r.Array(r.uint32) + } +}); + +loca.process = function() { + if (this.version === 0) { + for (let i = 0; i < this.offsets.length; i++) { + this.offsets[i] <<= 1; + } + } +}; + +loca.preEncode = function() { + if (this.version != null) return; + + // assume this.offsets is a sorted array + this.version = this.offsets[this.offsets.length - 1] > 0xffff ? 1 : 0; + + if (this.version === 0) { + for (let i = 0; i < this.offsets.length; i++) { + this.offsets[i] >>>= 1; + } + } +}; + +export default loca; diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/maxp.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/maxp.js new file mode 100644 index 00000000..ebcfdf22 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/maxp.js @@ -0,0 +1,20 @@ +import r from 'restructure'; + +// maxiumum profile +export default new r.Struct({ + version: r.int32, + numGlyphs: r.uint16, // The number of glyphs in the font + maxPoints: r.uint16, // Maximum points in a non-composite glyph + maxContours: r.uint16, // Maximum contours in a non-composite glyph + maxComponentPoints: r.uint16, // Maximum points in a composite glyph + maxComponentContours: r.uint16, // Maximum contours in a composite glyph + maxZones: r.uint16, // 1 if instructions do not use the twilight zone, 2 otherwise + maxTwilightPoints: r.uint16, // Maximum points used in Z0 + maxStorage: r.uint16, // Number of Storage Area locations + maxFunctionDefs: r.uint16, // Number of FDEFs + maxInstructionDefs: r.uint16, // Number of IDEFs + maxStackElements: r.uint16, // Maximum stack depth + maxSizeOfInstructions: r.uint16, // Maximum byte count for glyph instructions + maxComponentElements: r.uint16, // Maximum number of components referenced at “top level” for any composite glyph + maxComponentDepth: r.uint16 // Maximum levels of recursion; 1 for simple components +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/morx.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/morx.js new file mode 100644 index 00000000..009dde00 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/morx.js @@ -0,0 +1,79 @@ +import r from 'restructure'; +import { UnboundedArray, LookupTable, StateTable } from './aat'; + +let LigatureData = { + action: r.uint16 +}; + +let ContextualData = { + markIndex: r.uint16, + currentIndex: r.uint16 +}; + +let InsertionData = { + currentInsertIndex: r.uint16, + markedInsertIndex: r.uint16 +}; + +let SubstitutionTable = new r.Struct({ + items: new UnboundedArray(new r.Pointer(r.uint32, new LookupTable)) +}); + +let SubtableData = new r.VersionedStruct('type', { + 0: { // Indic Rearrangement Subtable + stateTable: new StateTable + }, + + 1: { // Contextual Glyph Substitution Subtable + stateTable: new StateTable(ContextualData), + substitutionTable: new r.Pointer(r.uint32, SubstitutionTable) + }, + + 2: { // Ligature subtable + stateTable: new StateTable(LigatureData), + ligatureActions: new r.Pointer(r.uint32, new UnboundedArray(r.uint32)), + components: new r.Pointer(r.uint32, new UnboundedArray(r.uint16)), + ligatureList: new r.Pointer(r.uint32, new UnboundedArray(r.uint16)) + }, + + 4: { // Non-contextual Glyph Substitution Subtable + lookupTable: new LookupTable + }, + + 5: { // Glyph Insertion Subtable + stateTable: new StateTable(InsertionData), + insertionActions: new r.Pointer(r.uint32, new UnboundedArray(r.uint16)) + } +}); + +let Subtable = new r.Struct({ + length: r.uint32, + coverage: r.uint24, + type: r.uint8, + subFeatureFlags: r.uint32, + table: SubtableData, + padding: new r.Reserved(r.uint8, t => t.length - t._currentOffset) +}); + +let FeatureEntry = new r.Struct({ + featureType: r.uint16, + featureSetting: r.uint16, + enableFlags: r.uint32, + disableFlags: r.uint32 +}); + +let MorxChain = new r.Struct({ + defaultFlags: r.uint32, + chainLength: r.uint32, + nFeatureEntries: r.uint32, + nSubtables: r.uint32, + features: new r.Array(FeatureEntry, 'nFeatureEntries'), + subtables: new r.Array(Subtable, 'nSubtables') +}); + +export default new r.Struct({ + version: r.uint16, + unused: new r.Reserved(r.uint16), + nChains: r.uint32, + chains: new r.Array(MorxChain, 'nChains') +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/name.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/name.js new file mode 100644 index 00000000..1d8d9e95 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/name.js @@ -0,0 +1,130 @@ +import r from 'restructure'; +import {getEncoding, LANGUAGES} from '../encodings'; + +let NameRecord = new r.Struct({ + platformID: r.uint16, + encodingID: r.uint16, + languageID: r.uint16, + nameID: r.uint16, + length: r.uint16, + string: new r.Pointer(r.uint16, + new r.String('length', t => getEncoding(t.platformID, t.encodingID, t.languageID)), + { type: 'parent', relativeTo: 'parent.stringOffset', allowNull: false } + ) +}); + +let LangTagRecord = new r.Struct({ + length: r.uint16, + tag: new r.Pointer(r.uint16, new r.String('length', 'utf16be'), {type: 'parent', relativeTo: 'stringOffset'}) +}); + +var NameTable = new r.VersionedStruct(r.uint16, { + 0: { + count: r.uint16, + stringOffset: r.uint16, + records: new r.Array(NameRecord, 'count') + }, + 1: { + count: r.uint16, + stringOffset: r.uint16, + records: new r.Array(NameRecord, 'count'), + langTagCount: r.uint16, + langTags: new r.Array(LangTagRecord, 'langTagCount') + } +}); + +export default NameTable; + +const NAMES = [ + 'copyright', + 'fontFamily', + 'fontSubfamily', + 'uniqueSubfamily', + 'fullName', + 'version', + 'postscriptName', // Note: A font may have only one PostScript name and that name must be ASCII. + 'trademark', + 'manufacturer', + 'designer', + 'description', + 'vendorURL', + 'designerURL', + 'license', + 'licenseURL', + null, // reserved + 'preferredFamily', + 'preferredSubfamily', + 'compatibleFull', + 'sampleText', + 'postscriptCIDFontName', + 'wwsFamilyName', + 'wwsSubfamilyName' +]; + +NameTable.process = function(stream) { + var records = {}; + for (let record of this.records) { + // find out what language this is for + let language = LANGUAGES[record.platformID][record.languageID]; + + if (language == null && this.langTags != null && record.languageID >= 0x8000) { + language = this.langTags[record.languageID - 0x8000].tag; + } + + if (language == null) { + language = record.platformID + '-' + record.languageID; + } + + // if the nameID is >= 256, it is a font feature record (AAT) + let key = record.nameID >= 256 ? 'fontFeatures' : (NAMES[record.nameID] || record.nameID); + if (records[key] == null) { + records[key] = {}; + } + + let obj = records[key]; + if (record.nameID >= 256) { + obj = obj[record.nameID] || (obj[record.nameID] = {}); + } + + if (typeof record.string === 'string' || typeof obj[language] !== 'string') { + obj[language] = record.string; + } + } + + this.records = records; +}; + +NameTable.preEncode = function() { + if (Array.isArray(this.records)) return; + this.version = 0; + + let records = []; + for (let key in this.records) { + let val = this.records[key]; + if (key === 'fontFeatures') continue; + + records.push({ + platformID: 3, + encodingID: 1, + languageID: 0x409, + nameID: NAMES.indexOf(key), + length: Buffer.byteLength(val.en, 'utf16le'), + string: val.en + }); + + if (key === 'postscriptName') { + records.push({ + platformID: 1, + encodingID: 0, + languageID: 0, + nameID: NAMES.indexOf(key), + length: val.en.length, + string: val.en + }); + } + } + + this.records = records; + this.count = records.length; + this.stringOffset = NameTable.size(this, null, false); +}; diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/opbd.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/opbd.js new file mode 100644 index 00000000..ffee125c --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/opbd.js @@ -0,0 +1,15 @@ +import r from 'restructure'; +import { LookupTable } from './aat'; + +let OpticalBounds = new r.Struct({ + left: r.int16, + top: r.int16, + right: r.int16, + bottom: r.int16 +}); + +export default new r.Struct({ + version: r.fixed32, + format: r.uint16, + lookupTable: new LookupTable(OpticalBounds) +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/opentype.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/opentype.js new file mode 100644 index 00000000..2742a501 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/opentype.js @@ -0,0 +1,209 @@ +import r from 'restructure'; + +//######################## +// Scripts and Languages # +//######################## + +let LangSysTable = new r.Struct({ + reserved: new r.Reserved(r.uint16), + reqFeatureIndex: r.uint16, + featureCount: r.uint16, + featureIndexes: new r.Array(r.uint16, 'featureCount') +}); + +let LangSysRecord = new r.Struct({ + tag: new r.String(4), + langSys: new r.Pointer(r.uint16, LangSysTable, { type: 'parent' }) +}); + +let Script = new r.Struct({ + defaultLangSys: new r.Pointer(r.uint16, LangSysTable), + count: r.uint16, + langSysRecords: new r.Array(LangSysRecord, 'count') +}); + +let ScriptRecord = new r.Struct({ + tag: new r.String(4), + script: new r.Pointer(r.uint16, Script, { type: 'parent' }) +}); + +export let ScriptList = new r.Array(ScriptRecord, r.uint16); + +//####################### +// Features and Lookups # +//####################### + +export let Feature = new r.Struct({ + featureParams: r.uint16, // pointer + lookupCount: r.uint16, + lookupListIndexes: new r.Array(r.uint16, 'lookupCount') +}); + +let FeatureRecord = new r.Struct({ + tag: new r.String(4), + feature: new r.Pointer(r.uint16, Feature, { type: 'parent' }) +}); + +export let FeatureList = new r.Array(FeatureRecord, r.uint16); + +let LookupFlags = new r.Bitfield(r.uint16, [ + 'rightToLeft', 'ignoreBaseGlyphs', 'ignoreLigatures', + 'ignoreMarks', 'useMarkFilteringSet', null, 'markAttachmentType' +]); + +export function LookupList(SubTable) { + let Lookup = new r.Struct({ + lookupType: r.uint16, + flags: LookupFlags, + subTableCount: r.uint16, + subTables: new r.Array(new r.Pointer(r.uint16, SubTable), 'subTableCount'), + markFilteringSet: r.uint16 // TODO: only present when flags says so... + }); + + return new r.LazyArray(new r.Pointer(r.uint16, Lookup), r.uint16); +} + +//################# +// Coverage Table # +//################# + +let RangeRecord = new r.Struct({ + start: r.uint16, + end: r.uint16, + startCoverageIndex: r.uint16 +}); + +export let Coverage = new r.VersionedStruct(r.uint16, { + 1: { + glyphCount: r.uint16, + glyphs: new r.Array(r.uint16, 'glyphCount') + }, + 2: { + rangeCount: r.uint16, + rangeRecords: new r.Array(RangeRecord, 'rangeCount') + } +}); + +//######################### +// Class Definition Table # +//######################### + +let ClassRangeRecord = new r.Struct({ + start: r.uint16, + end: r.uint16, + class: r.uint16 +}); + +export let ClassDef = new r.VersionedStruct(r.uint16, { + 1: { // Class array + startGlyph: r.uint16, + glyphCount: r.uint16, + classValueArray: new r.Array(r.uint16, 'glyphCount') + }, + 2: { // Class ranges + classRangeCount: r.uint16, + classRangeRecord: new r.Array(ClassRangeRecord, 'classRangeCount') + } +}); + +//############### +// Device Table # +//############### + +export let Device = new r.Struct({ + startSize: r.uint16, + endSize: r.uint16, + deltaFormat: r.uint16 +}); + +//############################################# +// Contextual Substitution/Positioning Tables # +//############################################# + +let LookupRecord = new r.Struct({ + sequenceIndex: r.uint16, + lookupListIndex: r.uint16 +}); + +let Rule = new r.Struct({ + glyphCount: r.uint16, + lookupCount: r.uint16, + input: new r.Array(r.uint16, t => t.glyphCount - 1), + lookupRecords: new r.Array(LookupRecord, 'lookupCount') +}); + +let RuleSet = new r.Array(new r.Pointer(r.uint16, Rule), r.uint16); + +let ClassRule = new r.Struct({ + glyphCount: r.uint16, + lookupCount: r.uint16, + classes: new r.Array(r.uint16, t => t.glyphCount - 1), + lookupRecords: new r.Array(LookupRecord, 'lookupCount') +}); + +let ClassSet = new r.Array(new r.Pointer(r.uint16, ClassRule), r.uint16); + +export let Context = new r.VersionedStruct(r.uint16, { + 1: { // Simple context + coverage: new r.Pointer(r.uint16, Coverage), + ruleSetCount: r.uint16, + ruleSets: new r.Array(new r.Pointer(r.uint16, RuleSet), 'ruleSetCount') + }, + 2: { // Class-based context + coverage: new r.Pointer(r.uint16, Coverage), + classDef: new r.Pointer(r.uint16, ClassDef), + classSetCnt: r.uint16, + classSet: new r.Array(new r.Pointer(r.uint16, ClassSet), 'classSetCnt') + }, + 3: { + glyphCount: r.uint16, + lookupCount: r.uint16, + coverages: new r.Array(new r.Pointer(r.uint16, Coverage), 'glyphCount'), + lookupRecords: new r.Array(LookupRecord, 'lookupCount') + } +}); + +//###################################################### +// Chaining Contextual Substitution/Positioning Tables # +//###################################################### + +let ChainRule = new r.Struct({ + backtrackGlyphCount: r.uint16, + backtrack: new r.Array(r.uint16, 'backtrackGlyphCount'), + inputGlyphCount: r.uint16, + input: new r.Array(r.uint16, t => t.inputGlyphCount - 1), + lookaheadGlyphCount: r.uint16, + lookahead: new r.Array(r.uint16, 'lookaheadGlyphCount'), + lookupCount: r.uint16, + lookupRecords: new r.Array(LookupRecord, 'lookupCount') +}); + +let ChainRuleSet = new r.Array(new r.Pointer(r.uint16, ChainRule), r.uint16); + +export let ChainingContext = new r.VersionedStruct(r.uint16, { + 1: { // Simple context glyph substitution + coverage: new r.Pointer(r.uint16, Coverage), + chainCount: r.uint16, + chainRuleSets: new r.Array(new r.Pointer(r.uint16, ChainRuleSet), 'chainCount') + }, + + 2: { // Class-based chaining context + coverage: new r.Pointer(r.uint16, Coverage), + backtrackClassDef: new r.Pointer(r.uint16, ClassDef), + inputClassDef: new r.Pointer(r.uint16, ClassDef), + lookaheadClassDef: new r.Pointer(r.uint16, ClassDef), + chainCount: r.uint16, + chainClassSet: new r.Array(new r.Pointer(r.uint16, ChainRuleSet), 'chainCount') + }, + + 3: { // Coverage-based chaining context + backtrackGlyphCount: r.uint16, + backtrackCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'backtrackGlyphCount'), + inputGlyphCount: r.uint16, + inputCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'inputGlyphCount'), + lookaheadGlyphCount: r.uint16, + lookaheadCoverage: new r.Array(new r.Pointer(r.uint16, Coverage), 'lookaheadGlyphCount'), + lookupCount: r.uint16, + lookupRecords: new r.Array(LookupRecord, 'lookupCount') + } +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/post.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/post.js new file mode 100644 index 00000000..c2f40b28 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/post.js @@ -0,0 +1,34 @@ +import r from 'restructure'; + +// PostScript information +export default new r.VersionedStruct(r.fixed32, { + header: { // these fields exist at the top of all versions + italicAngle: r.fixed32, // Italic angle in counter-clockwise degrees from the vertical. + underlinePosition: r.int16, // Suggested distance of the top of the underline from the baseline + underlineThickness: r.int16, // Suggested values for the underline thickness + isFixedPitch: r.uint32, // Whether the font is monospaced + minMemType42: r.uint32, // Minimum memory usage when a TrueType font is downloaded as a Type 42 font + maxMemType42: r.uint32, // Maximum memory usage when a TrueType font is downloaded as a Type 42 font + minMemType1: r.uint32, // Minimum memory usage when a TrueType font is downloaded as a Type 1 font + maxMemType1: r.uint32 // Maximum memory usage when a TrueType font is downloaded as a Type 1 font + }, + + 1: {}, // version 1 has no additional fields + + 2: { + numberOfGlyphs: r.uint16, + glyphNameIndex: new r.Array(r.uint16, 'numberOfGlyphs'), + names: new r.Array(new r.String(r.uint8)) + }, + + 2.5: { + numberOfGlyphs: r.uint16, + offsets: new r.Array(r.uint8, 'numberOfGlyphs') + }, + + 3: {}, // version 3 has no additional fields + + 4: { + map: new r.Array(r.uint32, t => t.parent.maxp.numGlyphs) + } +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/prep.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/prep.js new file mode 100644 index 00000000..4b0f560e --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/prep.js @@ -0,0 +1,6 @@ +import r from 'restructure'; + +// Set of instructions executed whenever the point size or font transformation change +export default new r.Struct({ + controlValueProgram: new r.Array(r.uint8) +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/sbix.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/sbix.js new file mode 100644 index 00000000..f1828541 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/sbix.js @@ -0,0 +1,17 @@ +import r from 'restructure'; + +let ImageTable = new r.Struct({ + ppem: r.uint16, + resolution: r.uint16, + imageOffsets: new r.Array(new r.Pointer(r.uint32, 'void'), t => t.parent.parent.maxp.numGlyphs + 1) +}); + +// This is the Apple sbix table, used by the "Apple Color Emoji" font. +// It includes several image tables with images for each bitmap glyph +// of several different sizes. +export default new r.Struct({ + version: r.uint16, + flags: new r.Bitfield(r.uint16, ['renderOutlines']), + numImgTables: r.uint32, + imageTables: new r.Array(new r.Pointer(r.uint32, ImageTable), 'numImgTables') +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/variations.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/variations.js new file mode 100644 index 00000000..67a29402 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/variations.js @@ -0,0 +1,81 @@ +import {Feature} from './opentype'; +import r from 'restructure'; + +/******************* + * Variation Store * + *******************/ + +let F2DOT14 = new r.Fixed(16, 'BE', 14); +let RegionAxisCoordinates = new r.Struct({ + startCoord: F2DOT14, + peakCoord: F2DOT14, + endCoord: F2DOT14 +}); + +let VariationRegionList = new r.Struct({ + axisCount: r.uint16, + regionCount: r.uint16, + variationRegions: new r.Array(new r.Array(RegionAxisCoordinates, 'axisCount'), 'regionCount') +}); + +let DeltaSet = new r.Struct({ + shortDeltas: new r.Array(r.int16, t => t.parent.shortDeltaCount), + regionDeltas: new r.Array(r.int8, t => t.parent.regionIndexCount - t.parent.shortDeltaCount), + deltas: t => t.shortDeltas.concat(t.regionDeltas) +}); + +let ItemVariationData = new r.Struct({ + itemCount: r.uint16, + shortDeltaCount: r.uint16, + regionIndexCount: r.uint16, + regionIndexes: new r.Array(r.uint16, 'regionIndexCount'), + deltaSets: new r.Array(DeltaSet, 'itemCount') +}); + +export let ItemVariationStore = new r.Struct({ + format: r.uint16, + variationRegionList: new r.Pointer(r.uint32, VariationRegionList), + variationDataCount: r.uint16, + itemVariationData: new r.Array(new r.Pointer(r.uint32, ItemVariationData), 'variationDataCount') +}); + +/********************** + * Feature Variations * + **********************/ + +let ConditionTable = new r.VersionedStruct(r.uint16, { + 1: { + axisIndex: r.uint16, + axisIndex: r.uint16, + filterRangeMinValue: F2DOT14, + filterRangeMaxValue: F2DOT14 + } +}); + +let ConditionSet = new r.Struct({ + conditionCount: r.uint16, + conditionTable: new r.Array(new r.Pointer(r.uint32, ConditionTable), 'conditionCount') +}); + +let FeatureTableSubstitutionRecord = new r.Struct({ + featureIndex: r.uint16, + alternateFeatureTable: new r.Pointer(r.uint32, Feature, {type: 'parent'}) +}); + +let FeatureTableSubstitution = new r.Struct({ + version: r.fixed32, + substitutionCount: r.uint16, + substitutions: new r.Array(FeatureTableSubstitutionRecord, 'substitutionCount') +}); + +let FeatureVariationRecord = new r.Struct({ + conditionSet: new r.Pointer(r.uint32, ConditionSet, {type: 'parent'}), + featureTableSubstitution: new r.Pointer(r.uint32, FeatureTableSubstitution, {type: 'parent'}) +}); + +export let FeatureVariations = new r.Struct({ + majorVersion: r.uint16, + minorVersion: r.uint16, + featureVariationRecordCount: r.uint32, + featureVariationRecords: new r.Array(FeatureVariationRecord, 'featureVariationRecordCount') +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/vhea.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/vhea.js new file mode 100644 index 00000000..c8f77edc --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/vhea.js @@ -0,0 +1,19 @@ +import r from 'restructure'; + +// Vertical Header Table +export default new r.Struct({ + version: r.uint16, // Version number of the Vertical Header Table + ascent: r.int16, // The vertical typographic ascender for this font + descent: r.int16, // The vertical typographic descender for this font + lineGap: r.int16, // The vertical typographic line gap for this font + advanceHeightMax: r.int16, // The maximum advance height measurement found in the font + minTopSideBearing: r.int16, // The minimum top side bearing measurement found in the font + minBottomSideBearing: r.int16, // The minimum bottom side bearing measurement found in the font + yMaxExtent: r.int16, + caretSlopeRise: r.int16, // Caret slope (rise/run) + caretSlopeRun: r.int16, + caretOffset: r.int16, // Set value equal to 0 for nonslanted fonts + reserved: new r.Reserved(r.int16, 4), + metricDataFormat: r.int16, // Set to 0 + numberOfMetrics: r.uint16 // Number of advance heights in the Vertical Metrics table +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/tables/vmtx.js b/pitfall/pdfkit/node_modules/fontkit/src/tables/vmtx.js new file mode 100644 index 00000000..f3d48fb2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/tables/vmtx.js @@ -0,0 +1,12 @@ +import r from 'restructure'; + +let VmtxEntry = new r.Struct({ + advance: r.uint16, // The advance height of the glyph + bearing: r.int16 // The top sidebearing of the glyph +}); + +// Vertical Metrics Table +export default new r.Struct({ + metrics: new r.LazyArray(VmtxEntry, t => t.parent.vhea.numberOfMetrics), + bearings: new r.LazyArray(r.int16, t => t.parent.maxp.numGlyphs - t.parent.vhea.numberOfMetrics) +}); diff --git a/pitfall/pdfkit/node_modules/fontkit/src/utils.js b/pitfall/pdfkit/node_modules/fontkit/src/utils.js new file mode 100644 index 00000000..f5bf9874 --- /dev/null +++ b/pitfall/pdfkit/node_modules/fontkit/src/utils.js @@ -0,0 +1,26 @@ +export function binarySearch(arr, cmp) { + let min = 0; + let max = arr.length - 1; + while (min <= max) { + let mid = (min + max) >> 1; + let res = cmp(arr[mid]); + + if (res < 0) { + max = mid - 1; + } else if (res > 0) { + min = mid + 1; + } else { + return mid; + } + } + + return -1; +} + +export function range(index, end) { + let range = []; + while (index < end) { + range.push(index++); + } + return range; +} diff --git a/pitfall/pdfkit/node_modules/fontkit/use.trie b/pitfall/pdfkit/node_modules/fontkit/use.trie new file mode 100644 index 00000000..c3747c8f Binary files /dev/null and b/pitfall/pdfkit/node_modules/fontkit/use.trie differ diff --git a/pitfall/pdfkit/node_modules/foreach/.npmignore b/pitfall/pdfkit/node_modules/foreach/.npmignore new file mode 100644 index 00000000..d135df67 --- /dev/null +++ b/pitfall/pdfkit/node_modules/foreach/.npmignore @@ -0,0 +1,3 @@ +node_modules +components +build \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/foreach/LICENSE b/pitfall/pdfkit/node_modules/foreach/LICENSE new file mode 100644 index 00000000..3032d6e3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/foreach/LICENSE @@ -0,0 +1,24 @@ +The MIT License + +Copyright (c) 2013 Manuel Stofer + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +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. diff --git a/pitfall/pdfkit/node_modules/foreach/Makefile b/pitfall/pdfkit/node_modules/foreach/Makefile new file mode 100644 index 00000000..eae41178 --- /dev/null +++ b/pitfall/pdfkit/node_modules/foreach/Makefile @@ -0,0 +1,11 @@ + +build: components + @component build + +components: component.json + @component install --dev + +clean: + rm -fr build components template.js + +.PHONY: clean diff --git a/pitfall/pdfkit/node_modules/foreach/Readme.md b/pitfall/pdfkit/node_modules/foreach/Readme.md new file mode 100644 index 00000000..2752b574 --- /dev/null +++ b/pitfall/pdfkit/node_modules/foreach/Readme.md @@ -0,0 +1,30 @@ + +# foreach + +Iterate over the key value pairs of either an array-like object or a dictionary like object. + +[![browser support][1]][2] + +## API + +### foreach(object, function, [context]) + +```js +var each = require('foreach'); + +each([1,2,3], function (value, key, array) { + // value === 1, 2, 3 + // key === 0, 1, 2 + // array === [1, 2, 3] +}); + +each({0:1,1:2,2:3}, function (value, key, object) { + // value === 1, 2, 3 + // key === 0, 1, 2 + // object === {0:1,1:2,2:3} +}); +``` + +[1]: https://ci.testling.com/manuelstofer/foreach.png +[2]: https://ci.testling.com/manuelstofer/foreach + diff --git a/pitfall/pdfkit/node_modules/foreach/component.json b/pitfall/pdfkit/node_modules/foreach/component.json new file mode 100644 index 00000000..0eeecb51 --- /dev/null +++ b/pitfall/pdfkit/node_modules/foreach/component.json @@ -0,0 +1,11 @@ +{ + "name": "foreach", + "description": "foreach component + npm package", + "version": "2.0.5", + "keywords": [], + "dependencies": {}, + "scripts": [ + "index.js" + ], + "repo": "manuelstofer/foreach" +} diff --git a/pitfall/pdfkit/node_modules/foreach/index.js b/pitfall/pdfkit/node_modules/foreach/index.js new file mode 100644 index 00000000..a961e4e1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/foreach/index.js @@ -0,0 +1,22 @@ + +var hasOwn = Object.prototype.hasOwnProperty; +var toString = Object.prototype.toString; + +module.exports = function forEach (obj, fn, ctx) { + if (toString.call(fn) !== '[object Function]') { + throw new TypeError('iterator must be a function'); + } + var l = obj.length; + if (l === +l) { + for (var i = 0; i < l; i++) { + fn.call(ctx, obj[i], i, obj); + } + } else { + for (var k in obj) { + if (hasOwn.call(obj, k)) { + fn.call(ctx, obj[k], k, obj); + } + } + } +}; + diff --git a/pitfall/pdfkit/node_modules/foreach/package.json b/pitfall/pdfkit/node_modules/foreach/package.json new file mode 100644 index 00000000..2493a0ab --- /dev/null +++ b/pitfall/pdfkit/node_modules/foreach/package.json @@ -0,0 +1,117 @@ +{ + "_args": [ + [ + { + "raw": "foreach@^2.0.5", + "scope": null, + "escapedName": "foreach", + "name": "foreach", + "rawSpec": "^2.0.5", + "spec": ">=2.0.5 <3.0.0", + "type": "range" + }, + "/Users/MB/git/pitfall/pdfkit/node_modules/static-module/node_modules/falafel" + ] + ], + "_from": "foreach@>=2.0.5 <3.0.0", + "_id": "foreach@2.0.5", + "_inCache": true, + "_location": "/foreach", + "_npmUser": { + "name": "manuelstofer", + "email": "manuel@takimata.ch" + }, + "_npmVersion": "1.4.9", + "_phantomChildren": {}, + "_requested": { + "raw": "foreach@^2.0.5", + "scope": null, + "escapedName": "foreach", + "name": "foreach", + "rawSpec": "^2.0.5", + "spec": ">=2.0.5 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/static-module/falafel" + ], + "_resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", + "_shasum": "0bee005018aeb260d0a3af3ae658dd0136ec1b99", + "_shrinkwrap": null, + "_spec": "foreach@^2.0.5", + "_where": "/Users/MB/git/pitfall/pdfkit/node_modules/static-module/node_modules/falafel", + "author": { + "name": "Manuel Stofer", + "email": "manuel@takimata.ch" + }, + "bugs": { + "url": "https://github.com/manuelstofer/foreach/issues" + }, + "contributors": [ + { + "name": "Manuel Stofer" + }, + { + "name": "Jordan Harband", + "url": "https://github.com/ljharb" + } + ], + "dependencies": {}, + "description": "foreach component + npm package", + "devDependencies": { + "covert": "*", + "tape": "*" + }, + "directories": {}, + "dist": { + "shasum": "0bee005018aeb260d0a3af3ae658dd0136ec1b99", + "tarball": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz" + }, + "homepage": "https://github.com/manuelstofer/foreach", + "keywords": [ + "shim", + "Array.prototype.forEach", + "forEach", + "Array#forEach", + "each" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "manuelstofer", + "email": "manuel@takimata.ch" + } + ], + "name": "foreach", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/manuelstofer/foreach.git" + }, + "scripts": { + "coverage": "covert test.js", + "coverage-quiet": "covert --quiet test.js", + "test": "node test.js" + }, + "testling": { + "files": "test.js", + "browsers": [ + "iexplore/6.0..latest", + "firefox/3.0", + "firefox/15.0..latest", + "firefox/nightly", + "chrome/4.0", + "chrome/22.0..latest", + "chrome/canary", + "opera/10.0..latest", + "opera/next", + "safari/5.0.5..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2" + ] + }, + "version": "2.0.5" +} diff --git a/pitfall/pdfkit/node_modules/foreach/test.js b/pitfall/pdfkit/node_modules/foreach/test.js new file mode 100644 index 00000000..c6283c3c --- /dev/null +++ b/pitfall/pdfkit/node_modules/foreach/test.js @@ -0,0 +1,153 @@ +var test = require('tape'); +var forEach = require('./index.js'); + + +test('second argument: iterator', function (t) { + var arr = []; + t.throws(function () { forEach(arr); }, TypeError, 'undefined is not a function'); + t.throws(function () { forEach(arr, null); }, TypeError, 'null is not a function'); + t.throws(function () { forEach(arr, ''); }, TypeError, 'string is not a function'); + t.throws(function () { forEach(arr, /a/); }, TypeError, 'regex is not a function'); + t.throws(function () { forEach(arr, true); }, TypeError, 'true is not a function'); + t.throws(function () { forEach(arr, false); }, TypeError, 'false is not a function'); + t.throws(function () { forEach(arr, NaN); }, TypeError, 'NaN is not a function'); + t.throws(function () { forEach(arr, 42); }, TypeError, '42 is not a function'); + t.doesNotThrow(function () { forEach(arr, function () {}); }, 'function is a function'); + t.end(); +}); + +test('array', function (t) { + var arr = [1, 2, 3]; + + t.test('iterates over every item', function (st) { + var index = 0; + forEach(arr, function () { index += 1; }); + st.equal(index, arr.length, 'iterates ' + arr.length + ' times'); + st.end(); + }); + + t.test('first iterator argument', function (st) { + var index = 0; + st.plan(arr.length); + forEach(arr, function (item) { + st.equal(arr[index], item, 'item ' + index + ' is passed as first argument'); + index += 1; + }); + st.end(); + }); + + t.test('second iterator argument', function (st) { + var counter = 0; + st.plan(arr.length); + forEach(arr, function (item, index) { + st.equal(counter, index, 'index ' + index + ' is passed as second argument'); + counter += 1; + }); + st.end(); + }); + + t.test('third iterator argument', function (st) { + st.plan(arr.length); + forEach(arr, function (item, index, array) { + st.deepEqual(arr, array, 'array is passed as third argument'); + }); + st.end(); + }); + + t.test('context argument', function (st) { + var context = {}; + st.plan(1); + forEach([1], function () { + st.equal(this, context, '"this" is the passed context'); + }, context); + st.end(); + }); + + t.end(); +}); + +test('object', function (t) { + var obj = { + a: 1, + b: 2, + c: 3 + }; + var keys = ['a', 'b', 'c']; + + var F = function () { + this.a = 1; + this.b = 2; + }; + F.prototype.c = 3; + var fKeys = ['a', 'b']; + + t.test('iterates over every object literal key', function (st) { + var counter = 0; + forEach(obj, function () { counter += 1; }); + st.equal(counter, keys.length, 'iterated ' + counter + ' times'); + st.end(); + }); + + t.test('iterates only over own keys', function (st) { + var counter = 0; + forEach(new F(), function () { counter += 1; }); + st.equal(counter, fKeys.length, 'iterated ' + fKeys.length + ' times'); + st.end(); + }); + + t.test('first iterator argument', function (st) { + var index = 0; + st.plan(keys.length); + forEach(obj, function (item) { + st.equal(obj[keys[index]], item, 'item at key ' + keys[index] + ' is passed as first argument'); + index += 1; + }); + st.end(); + }); + + t.test('second iterator argument', function (st) { + var counter = 0; + st.plan(keys.length); + forEach(obj, function (item, key) { + st.equal(keys[counter], key, 'key ' + key + ' is passed as second argument'); + counter += 1; + }); + st.end(); + }); + + t.test('third iterator argument', function (st) { + st.plan(keys.length); + forEach(obj, function (item, key, object) { + st.deepEqual(obj, object, 'object is passed as third argument'); + }); + st.end(); + }); + + t.test('context argument', function (st) { + var context = {}; + st.plan(1); + forEach({ a: 1 }, function () { + st.equal(this, context, '"this" is the passed context'); + }, context); + st.end(); + }); + + t.end(); +}); + + +test('string', function (t) { + var str = 'str'; + t.test('second iterator argument', function (st) { + var counter = 0; + st.plan(str.length * 2 + 1); + forEach(str, function (item, index) { + st.equal(counter, index, 'index ' + index + ' is passed as second argument'); + st.equal(str.charAt(index), item); + counter += 1; + }); + st.equal(counter, str.length, 'iterates ' + str.length + ' times'); + }); + t.end(); +}); + diff --git a/pitfall/pdfkit/node_modules/function-bind/.eslintrc b/pitfall/pdfkit/node_modules/function-bind/.eslintrc new file mode 100644 index 00000000..420b2535 --- /dev/null +++ b/pitfall/pdfkit/node_modules/function-bind/.eslintrc @@ -0,0 +1,13 @@ +{ + "root": true, + + "extends": "@ljharb", + + "rules": { + "max-nested-callbacks": [2, 3], + "max-params": [2, 3], + "max-statements": [2, 20], + "no-new-func": [1], + "strict": [0] + } +} diff --git a/pitfall/pdfkit/node_modules/function-bind/.jscs.json b/pitfall/pdfkit/node_modules/function-bind/.jscs.json new file mode 100644 index 00000000..d7047f6e --- /dev/null +++ b/pitfall/pdfkit/node_modules/function-bind/.jscs.json @@ -0,0 +1,159 @@ +{ + "es3": true, + + "additionalRules": [], + + "requireSemicolons": true, + + "disallowMultipleSpaces": true, + + "disallowIdentifierNames": [], + + "requireCurlyBraces": { + "allExcept": [], + "keywords": ["if", "else", "for", "while", "do", "try", "catch"] + }, + + "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch", "function"], + + "disallowSpaceAfterKeywords": [], + + "disallowSpaceBeforeComma": true, + "disallowSpaceAfterComma": false, + "disallowSpaceBeforeSemicolon": true, + + "disallowNodeTypes": [ + "DebuggerStatement", + "ForInStatement", + "LabeledStatement", + "SwitchCase", + "SwitchStatement", + "WithStatement" + ], + + "requireObjectKeysOnNewLine": { "allExcept": ["sameLine"] }, + + "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningRoundBrace": true, "beforeOpeningCurlyBrace": true }, + "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, + "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, + "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, + + "requireSpaceBetweenArguments": true, + + "disallowSpacesInsideParentheses": true, + + "disallowSpacesInsideArrayBrackets": true, + + "disallowQuotedKeysInObjects": "allButReserved", + + "disallowSpaceAfterObjectKeys": true, + + "requireCommaBeforeLineBreak": true, + + "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], + "requireSpaceAfterPrefixUnaryOperators": [], + + "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], + "requireSpaceBeforePostfixUnaryOperators": [], + + "disallowSpaceBeforeBinaryOperators": [], + "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + + "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!=="], + "disallowSpaceAfterBinaryOperators": [], + + "disallowImplicitTypeConversion": ["binary", "string"], + + "disallowKeywords": ["with", "eval"], + + "requireKeywordsOnNewLine": [], + "disallowKeywordsOnNewLine": ["else"], + + "requireLineFeedAtFileEnd": true, + + "disallowTrailingWhitespace": true, + + "disallowTrailingComma": true, + + "excludeFiles": ["node_modules/**", "vendor/**"], + + "disallowMultipleLineStrings": true, + + "requireDotNotation": { "allExcept": ["keywords"] }, + + "requireParenthesesAroundIIFE": true, + + "validateLineBreaks": "LF", + + "validateQuoteMarks": { + "escape": true, + "mark": "'" + }, + + "disallowOperatorBeforeLineBreak": [], + + "requireSpaceBeforeKeywords": [ + "do", + "for", + "if", + "else", + "switch", + "case", + "try", + "catch", + "finally", + "while", + "with", + "return" + ], + + "validateAlignedFunctionParameters": { + "lineBreakAfterOpeningBraces": true, + "lineBreakBeforeClosingBraces": true + }, + + "requirePaddingNewLinesBeforeExport": true, + + "validateNewlineAfterArrayElements": { + "maximum": 8 + }, + + "requirePaddingNewLinesAfterUseStrict": true, + + "disallowArrowFunctions": true, + + "disallowMultiLineTernary": true, + + "validateOrderInObjectKeys": "asc-insensitive", + + "disallowIdenticalDestructuringNames": true, + + "disallowNestedTernaries": { "maxLevel": 1 }, + + "requireSpaceAfterComma": { "allExcept": ["trailing"] }, + "requireAlignedMultilineParams": false, + + "requireSpacesInGenerator": { + "afterStar": true + }, + + "disallowSpacesInGenerator": { + "beforeStar": true + }, + + "disallowVar": false, + + "requireArrayDestructuring": false, + + "requireEnhancedObjectLiterals": false, + + "requireObjectDestructuring": false, + + "requireEarlyReturn": false, + + "requireCapitalizedConstructorsNew": { + "allExcept": ["Function", "String", "Object", "Symbol", "Number", "Date", "RegExp", "Error", "Boolean", "Array"] + } +} + diff --git a/pitfall/pdfkit/node_modules/function-bind/.npmignore b/pitfall/pdfkit/node_modules/function-bind/.npmignore new file mode 100644 index 00000000..8363b8e3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/function-bind/.npmignore @@ -0,0 +1,16 @@ +.DS_Store +.monitor +.*.swp +.nodemonignore +releases +*.log +*.err +fleet.json +public/browserify +bin/*.json +.bin +build +compile +.lock-wscript +coverage +node_modules diff --git a/pitfall/pdfkit/node_modules/function-bind/.travis.yml b/pitfall/pdfkit/node_modules/function-bind/.travis.yml new file mode 100644 index 00000000..caabb460 --- /dev/null +++ b/pitfall/pdfkit/node_modules/function-bind/.travis.yml @@ -0,0 +1,77 @@ +language: node_js +node_js: + - "5.6" + - "5.5" + - "5.4" + - "5.3" + - "5.2" + - "5.1" + - "5.0" + - "4.3" + - "4.2" + - "4.1" + - "4.0" + - "iojs-v3.3" + - "iojs-v3.2" + - "iojs-v3.1" + - "iojs-v3.0" + - "iojs-v2.5" + - "iojs-v2.4" + - "iojs-v2.3" + - "iojs-v2.2" + - "iojs-v2.1" + - "iojs-v2.0" + - "iojs-v1.8" + - "iojs-v1.7" + - "iojs-v1.6" + - "iojs-v1.5" + - "iojs-v1.4" + - "iojs-v1.3" + - "iojs-v1.2" + - "iojs-v1.1" + - "iojs-v1.0" + - "0.12" + - "0.11" + - "0.10" + - "0.9" + - "0.8" + - "0.6" + - "0.4" +before_install: + - 'if [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then case "$(npm --version)" in 1.*) npm install -g npm@1.4.28 ;; 2.*) npm install -g npm@2 ;; esac ; fi' + - 'if [ "${TRAVIS_NODE_VERSION}" != "0.6" ] && [ "${TRAVIS_NODE_VERSION}" != "0.9" ]; then npm install -g npm; fi' +script: + - 'if [ "${TRAVIS_NODE_VERSION}" != "4.3" ]; then npm run tests-only ; else npm test ; fi' +sudo: false +matrix: + fast_finish: true + allow_failures: + - node_js: "5.5" + - node_js: "5.4" + - node_js: "5.3" + - node_js: "5.2" + - node_js: "5.1" + - node_js: "5.0" + - node_js: "4.2" + - node_js: "4.1" + - node_js: "4.0" + - node_js: "iojs-v3.2" + - node_js: "iojs-v3.1" + - node_js: "iojs-v3.0" + - node_js: "iojs-v2.4" + - node_js: "iojs-v2.3" + - node_js: "iojs-v2.2" + - node_js: "iojs-v2.1" + - node_js: "iojs-v2.0" + - node_js: "iojs-v1.7" + - node_js: "iojs-v1.6" + - node_js: "iojs-v1.5" + - node_js: "iojs-v1.4" + - node_js: "iojs-v1.3" + - node_js: "iojs-v1.2" + - node_js: "iojs-v1.1" + - node_js: "iojs-v1.0" + - node_js: "0.11" + - node_js: "0.9" + - node_js: "0.6" + - node_js: "0.4" diff --git a/pitfall/pdfkit/node_modules/function-bind/LICENSE b/pitfall/pdfkit/node_modules/function-bind/LICENSE new file mode 100644 index 00000000..62d6d237 --- /dev/null +++ b/pitfall/pdfkit/node_modules/function-bind/LICENSE @@ -0,0 +1,20 @@ +Copyright (c) 2013 Raynos. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND 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. + diff --git a/pitfall/pdfkit/node_modules/function-bind/README.md b/pitfall/pdfkit/node_modules/function-bind/README.md new file mode 100644 index 00000000..81862a02 --- /dev/null +++ b/pitfall/pdfkit/node_modules/function-bind/README.md @@ -0,0 +1,48 @@ +# function-bind + + + + + +Implementation of function.prototype.bind + +## Example + +I mainly do this for unit tests I run on phantomjs. +PhantomJS does not have Function.prototype.bind :( + +```js +Function.prototype.bind = require("function-bind") +``` + +## Installation + +`npm install function-bind` + +## Contributors + + - Raynos + +## MIT Licenced + + [travis-svg]: https://travis-ci.org/Raynos/function-bind.svg + [travis-url]: https://travis-ci.org/Raynos/function-bind + [npm-badge-svg]: https://badge.fury.io/js/function-bind.svg + [npm-url]: https://npmjs.org/package/function-bind + [5]: https://coveralls.io/repos/Raynos/function-bind/badge.png + [6]: https://coveralls.io/r/Raynos/function-bind + [7]: https://gemnasium.com/Raynos/function-bind.png + [8]: https://gemnasium.com/Raynos/function-bind + [deps-svg]: https://david-dm.org/Raynos/function-bind.svg + [deps-url]: https://david-dm.org/Raynos/function-bind + [dev-deps-svg]: https://david-dm.org/Raynos/function-bind/dev-status.svg + [dev-deps-url]: https://david-dm.org/Raynos/function-bind#info=devDependencies + [11]: https://ci.testling.com/Raynos/function-bind.png + [12]: https://ci.testling.com/Raynos/function-bind diff --git a/pitfall/pdfkit/node_modules/function-bind/implementation.js b/pitfall/pdfkit/node_modules/function-bind/implementation.js new file mode 100644 index 00000000..5e912728 --- /dev/null +++ b/pitfall/pdfkit/node_modules/function-bind/implementation.js @@ -0,0 +1,48 @@ +var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; +var slice = Array.prototype.slice; +var toStr = Object.prototype.toString; +var funcType = '[object Function]'; + +module.exports = function bind(that) { + var target = this; + if (typeof target !== 'function' || toStr.call(target) !== funcType) { + throw new TypeError(ERROR_MESSAGE + target); + } + var args = slice.call(arguments, 1); + + var bound; + var binder = function () { + if (this instanceof bound) { + var result = target.apply( + this, + args.concat(slice.call(arguments)) + ); + if (Object(result) === result) { + return result; + } + return this; + } else { + return target.apply( + that, + args.concat(slice.call(arguments)) + ); + } + }; + + var boundLength = Math.max(0, target.length - args.length); + var boundArgs = []; + for (var i = 0; i < boundLength; i++) { + boundArgs.push('$' + i); + } + + bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder); + + if (target.prototype) { + var Empty = function Empty() {}; + Empty.prototype = target.prototype; + bound.prototype = new Empty(); + Empty.prototype = null; + } + + return bound; +}; diff --git a/pitfall/pdfkit/node_modules/function-bind/index.js b/pitfall/pdfkit/node_modules/function-bind/index.js new file mode 100644 index 00000000..60ba5784 --- /dev/null +++ b/pitfall/pdfkit/node_modules/function-bind/index.js @@ -0,0 +1,3 @@ +var implementation = require('./implementation'); + +module.exports = Function.prototype.bind || implementation; diff --git a/pitfall/pdfkit/node_modules/function-bind/package.json b/pitfall/pdfkit/node_modules/function-bind/package.json new file mode 100644 index 00000000..79609265 --- /dev/null +++ b/pitfall/pdfkit/node_modules/function-bind/package.json @@ -0,0 +1,137 @@ +{ + "_args": [ + [ + { + "raw": "function-bind@^1.0.2", + "scope": null, + "escapedName": "function-bind", + "name": "function-bind", + "rawSpec": "^1.0.2", + "spec": ">=1.0.2 <2.0.0", + "type": "range" + }, + "/Users/MB/git/pitfall/pdfkit/node_modules/has" + ] + ], + "_from": "function-bind@>=1.0.2 <2.0.0", + "_id": "function-bind@1.1.0", + "_inCache": true, + "_location": "/function-bind", + "_nodeVersion": "5.6.0", + "_npmOperationalInternal": { + "host": "packages-6-west.internal.npmjs.com", + "tmp": "tmp/function-bind-1.1.0.tgz_1455438520627_0.822420896962285" + }, + "_npmUser": { + "name": "ljharb", + "email": "ljharb@gmail.com" + }, + "_npmVersion": "3.6.0", + "_phantomChildren": {}, + "_requested": { + "raw": "function-bind@^1.0.2", + "scope": null, + "escapedName": "function-bind", + "name": "function-bind", + "rawSpec": "^1.0.2", + "spec": ">=1.0.2 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/has" + ], + "_resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.0.tgz", + "_shasum": "16176714c801798e4e8f2cf7f7529467bb4a5771", + "_shrinkwrap": null, + "_spec": "function-bind@^1.0.2", + "_where": "/Users/MB/git/pitfall/pdfkit/node_modules/has", + "author": { + "name": "Raynos", + "email": "raynos2@gmail.com" + }, + "bugs": { + "url": "https://github.com/Raynos/function-bind/issues", + "email": "raynos2@gmail.com" + }, + "contributors": [ + { + "name": "Raynos" + }, + { + "name": "Jordan Harband", + "url": "https://github.com/ljharb" + } + ], + "dependencies": {}, + "description": "Implementation of Function.prototype.bind", + "devDependencies": { + "@ljharb/eslint-config": "^2.1.0", + "covert": "^1.1.0", + "eslint": "^2.0.0", + "jscs": "^2.9.0", + "tape": "^4.4.0" + }, + "directories": {}, + "dist": { + "shasum": "16176714c801798e4e8f2cf7f7529467bb4a5771", + "tarball": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.0.tgz" + }, + "gitHead": "cb5057f2a0018ac48c812ccee86934a5af30efdb", + "homepage": "https://github.com/Raynos/function-bind", + "keywords": [ + "function", + "bind", + "shim", + "es5" + ], + "licenses": [ + { + "type": "MIT", + "url": "http://github.com/Raynos/function-bind/raw/master/LICENSE" + } + ], + "main": "index", + "maintainers": [ + { + "name": "raynos", + "email": "raynos2@gmail.com" + }, + { + "name": "ljharb", + "email": "ljharb@gmail.com" + } + ], + "name": "function-bind", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/Raynos/function-bind.git" + }, + "scripts": { + "coverage": "covert test/*.js", + "coverage-quiet": "covert test/*.js --quiet", + "eslint": "eslint *.js */*.js", + "jscs": "jscs *.js */*.js", + "lint": "npm run jscs && npm run eslint", + "test": "npm run lint && npm run tests-only && npm run coverage-quiet", + "tests-only": "node test" + }, + "testling": { + "files": "test/index.js", + "browsers": [ + "ie/8..latest", + "firefox/16..latest", + "firefox/nightly", + "chrome/22..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + }, + "version": "1.1.0" +} diff --git a/pitfall/pdfkit/node_modules/function-bind/test/index.js b/pitfall/pdfkit/node_modules/function-bind/test/index.js new file mode 100644 index 00000000..ba1bfad2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/function-bind/test/index.js @@ -0,0 +1,250 @@ +var test = require('tape'); + +var functionBind = require('../implementation'); +var getCurrentContext = function () { return this; }; + +test('functionBind is a function', function (t) { + t.equal(typeof functionBind, 'function'); + t.end(); +}); + +test('non-functions', function (t) { + var nonFunctions = [true, false, [], {}, 42, 'foo', NaN, /a/g]; + t.plan(nonFunctions.length); + for (var i = 0; i < nonFunctions.length; ++i) { + try { functionBind.call(nonFunctions[i]); } catch (ex) { + t.ok(ex instanceof TypeError, 'throws when given ' + String(nonFunctions[i])); + } + } + t.end(); +}); + +test('without a context', function (t) { + t.test('binds properly', function (st) { + var args, context; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }) + }; + namespace.func(1, 2, 3); + st.deepEqual(args, [1, 2, 3]); + st.equal(context, getCurrentContext.call()); + st.end(); + }); + + t.test('binds properly, and still supplies bound arguments', function (st) { + var args, context; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, undefined, 1, 2, 3) + }; + namespace.func(4, 5, 6); + st.deepEqual(args, [1, 2, 3, 4, 5, 6]); + st.equal(context, getCurrentContext.call()); + st.end(); + }); + + t.test('returns properly', function (st) { + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, null) + }; + var context = namespace.func(1, 2, 3); + st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); + st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); + st.end(); + }); + + t.test('returns properly with bound arguments', function (st) { + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, null, 1, 2, 3) + }; + var context = namespace.func(4, 5, 6); + st.equal(context, getCurrentContext.call(), 'returned context is namespaced context'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); + st.end(); + }); + + t.test('called as a constructor', function (st) { + var thunkify = function (value) { + return function () { return value; }; + }; + st.test('returns object value', function (sst) { + var expectedReturnValue = [1, 2, 3]; + var Constructor = functionBind.call(thunkify(expectedReturnValue), null); + var result = new Constructor(); + sst.equal(result, expectedReturnValue); + sst.end(); + }); + + st.test('does not return primitive value', function (sst) { + var Constructor = functionBind.call(thunkify(42), null); + var result = new Constructor(); + sst.notEqual(result, 42); + sst.end(); + }); + + st.test('object from bound constructor is instance of original and bound constructor', function (sst) { + var A = function (x) { + this.name = x || 'A'; + }; + var B = functionBind.call(A, null, 'B'); + + var result = new B(); + sst.ok(result instanceof B, 'result is instance of bound constructor'); + sst.ok(result instanceof A, 'result is instance of original constructor'); + sst.end(); + }); + + st.end(); + }); + + t.end(); +}); + +test('with a context', function (t) { + t.test('with no bound arguments', function (st) { + var args, context; + var boundContext = {}; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, boundContext) + }; + namespace.func(1, 2, 3); + st.equal(context, boundContext, 'binds a context properly'); + st.deepEqual(args, [1, 2, 3], 'supplies passed arguments'); + st.end(); + }); + + t.test('with bound arguments', function (st) { + var args, context; + var boundContext = {}; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + context = this; + }, boundContext, 1, 2, 3) + }; + namespace.func(4, 5, 6); + st.equal(context, boundContext, 'binds a context properly'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'supplies bound and passed arguments'); + st.end(); + }); + + t.test('returns properly', function (st) { + var boundContext = {}; + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, boundContext) + }; + var context = namespace.func(1, 2, 3); + st.equal(context, boundContext, 'returned context is bound context'); + st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); + st.deepEqual(args, [1, 2, 3], 'passed arguments are correct'); + st.end(); + }); + + t.test('returns properly with bound arguments', function (st) { + var boundContext = {}; + var args; + var namespace = { + func: functionBind.call(function () { + args = Array.prototype.slice.call(arguments); + return this; + }, boundContext, 1, 2, 3) + }; + var context = namespace.func(4, 5, 6); + st.equal(context, boundContext, 'returned context is bound context'); + st.notEqual(context, getCurrentContext.call(), 'returned context is not lexical context'); + st.deepEqual(args, [1, 2, 3, 4, 5, 6], 'passed arguments are correct'); + st.end(); + }); + + t.test('passes the correct arguments when called as a constructor', function (st) { + var expected = { name: 'Correct' }; + var namespace = { + Func: functionBind.call(function (arg) { + return arg; + }, { name: 'Incorrect' }) + }; + var returned = new namespace.Func(expected); + st.equal(returned, expected, 'returns the right arg when called as a constructor'); + st.end(); + }); + + t.test('has the new instance\'s context when called as a constructor', function (st) { + var actualContext; + var expectedContext = { foo: 'bar' }; + var namespace = { + Func: functionBind.call(function () { + actualContext = this; + }, expectedContext) + }; + var result = new namespace.Func(); + st.equal(result instanceof namespace.Func, true); + st.notEqual(actualContext, expectedContext); + st.end(); + }); + + t.end(); +}); + +test('bound function length', function (t) { + t.test('sets a correct length without thisArg', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }); + st.equal(subject.length, 3); + st.equal(subject(1, 2, 3), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}); + st.equal(subject.length, 3); + st.equal(subject(1, 2, 3), 6); + st.end(); + }); + + t.test('sets a correct length without thisArg and first argument', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1); + st.equal(subject.length, 2); + st.equal(subject(2, 3), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg and first argument', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1); + st.equal(subject.length, 2); + st.equal(subject(2, 3), 6); + st.end(); + }); + + t.test('sets a correct length without thisArg and too many arguments', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, undefined, 1, 2, 3, 4); + st.equal(subject.length, 0); + st.equal(subject(), 6); + st.end(); + }); + + t.test('sets a correct length with thisArg and too many arguments', function (st) { + var subject = functionBind.call(function (a, b, c) { return a + b + c; }, {}, 1, 2, 3, 4); + st.equal(subject.length, 0); + st.equal(subject(), 6); + st.end(); + }); +}); diff --git a/pitfall/pdfkit/node_modules/glob/.npmignore b/pitfall/pdfkit/node_modules/glob/.npmignore new file mode 100644 index 00000000..2af4b71c --- /dev/null +++ b/pitfall/pdfkit/node_modules/glob/.npmignore @@ -0,0 +1,2 @@ +.*.swp +test/a/ diff --git a/pitfall/pdfkit/node_modules/glob/.travis.yml b/pitfall/pdfkit/node_modules/glob/.travis.yml new file mode 100644 index 00000000..baa0031d --- /dev/null +++ b/pitfall/pdfkit/node_modules/glob/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - 0.8 diff --git a/pitfall/pdfkit/node_modules/glob/LICENSE b/pitfall/pdfkit/node_modules/glob/LICENSE new file mode 100644 index 00000000..0c44ae71 --- /dev/null +++ b/pitfall/pdfkit/node_modules/glob/LICENSE @@ -0,0 +1,27 @@ +Copyright (c) Isaac Z. Schlueter ("Author") +All rights reserved. + +The BSD License + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS +BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR +BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE +OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN +IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/pitfall/pdfkit/node_modules/glob/README.md b/pitfall/pdfkit/node_modules/glob/README.md new file mode 100644 index 00000000..cc691645 --- /dev/null +++ b/pitfall/pdfkit/node_modules/glob/README.md @@ -0,0 +1,250 @@ +# Glob + +Match files using the patterns the shell uses, like stars and stuff. + +This is a glob implementation in JavaScript. It uses the `minimatch` +library to do its matching. + +## Attention: node-glob users! + +The API has changed dramatically between 2.x and 3.x. This library is +now 100% JavaScript, and the integer flags have been replaced with an +options object. + +Also, there's an event emitter class, proper tests, and all the other +things you've come to expect from node modules. + +And best of all, no compilation! + +## Usage + +```javascript +var glob = require("glob") + +// options is optional +glob("**/*.js", options, function (er, files) { + // files is an array of filenames. + // If the `nonull` option is set, and nothing + // was found, then files is ["**/*.js"] + // er is an error object or null. +}) +``` + +## Features + +Please see the [minimatch +documentation](https://github.com/isaacs/minimatch) for more details. + +Supports these glob features: + +* Brace Expansion +* Extended glob matching +* "Globstar" `**` matching + +See: + +* `man sh` +* `man bash` +* `man 3 fnmatch` +* `man 5 gitignore` +* [minimatch documentation](https://github.com/isaacs/minimatch) + +## glob(pattern, [options], cb) + +* `pattern` {String} Pattern to be matched +* `options` {Object} +* `cb` {Function} + * `err` {Error | null} + * `matches` {Array} filenames found matching the pattern + +Perform an asynchronous glob search. + +## glob.sync(pattern, [options]) + +* `pattern` {String} Pattern to be matched +* `options` {Object} +* return: {Array} filenames found matching the pattern + +Perform a synchronous glob search. + +## Class: glob.Glob + +Create a Glob object by instanting the `glob.Glob` class. + +```javascript +var Glob = require("glob").Glob +var mg = new Glob(pattern, options, cb) +``` + +It's an EventEmitter, and starts walking the filesystem to find matches +immediately. + +### new glob.Glob(pattern, [options], [cb]) + +* `pattern` {String} pattern to search for +* `options` {Object} +* `cb` {Function} Called when an error occurs, or matches are found + * `err` {Error | null} + * `matches` {Array} filenames found matching the pattern + +Note that if the `sync` flag is set in the options, then matches will +be immediately available on the `g.found` member. + +### Properties + +* `minimatch` The minimatch object that the glob uses. +* `options` The options object passed in. +* `error` The error encountered. When an error is encountered, the + glob object is in an undefined state, and should be discarded. +* `aborted` Boolean which is set to true when calling `abort()`. There + is no way at this time to continue a glob search after aborting, but + you can re-use the statCache to avoid having to duplicate syscalls. +* `statCache` Collection of all the stat results the glob search + performed. +* `cache` Convenience object. Each field has the following possible + values: + * `false` - Path does not exist + * `true` - Path exists + * `1` - Path exists, and is not a directory + * `2` - Path exists, and is a directory + * `[file, entries, ...]` - Path exists, is a directory, and the + array value is the results of `fs.readdir` + +### Events + +* `end` When the matching is finished, this is emitted with all the + matches found. If the `nonull` option is set, and no match was found, + then the `matches` list contains the original pattern. The matches + are sorted, unless the `nosort` flag is set. +* `match` Every time a match is found, this is emitted with the matched. +* `error` Emitted when an unexpected error is encountered, or whenever + any fs error occurs if `options.strict` is set. +* `abort` When `abort()` is called, this event is raised. + +### Methods + +* `abort` Stop the search. + +### Options + +All the options that can be passed to Minimatch can also be passed to +Glob to change pattern matching behavior. Also, some have been added, +or have glob-specific ramifications. + +All options are false by default, unless otherwise noted. + +All options are added to the glob object, as well. + +* `cwd` The current working directory in which to search. Defaults + to `process.cwd()`. +* `root` The place where patterns starting with `/` will be mounted + onto. Defaults to `path.resolve(options.cwd, "/")` (`/` on Unix + systems, and `C:\` or some such on Windows.) +* `dot` Include `.dot` files in normal matches and `globstar` matches. + Note that an explicit dot in a portion of the pattern will always + match dot files. +* `nomount` By default, a pattern starting with a forward-slash will be + "mounted" onto the root setting, so that a valid filesystem path is + returned. Set this flag to disable that behavior. +* `mark` Add a `/` character to directory matches. Note that this + requires additional stat calls. +* `nosort` Don't sort the results. +* `stat` Set to true to stat *all* results. This reduces performance + somewhat, and is completely unnecessary, unless `readdir` is presumed + to be an untrustworthy indicator of file existence. It will cause + ELOOP to be triggered one level sooner in the case of cyclical + symbolic links. +* `silent` When an unusual error is encountered + when attempting to read a directory, a warning will be printed to + stderr. Set the `silent` option to true to suppress these warnings. +* `strict` When an unusual error is encountered + when attempting to read a directory, the process will just continue on + in search of other matches. Set the `strict` option to raise an error + in these cases. +* `cache` See `cache` property above. Pass in a previously generated + cache object to save some fs calls. +* `statCache` A cache of results of filesystem information, to prevent + unnecessary stat calls. While it should not normally be necessary to + set this, you may pass the statCache from one glob() call to the + options object of another, if you know that the filesystem will not + change between calls. (See "Race Conditions" below.) +* `sync` Perform a synchronous glob search. +* `nounique` In some cases, brace-expanded patterns can result in the + same file showing up multiple times in the result set. By default, + this implementation prevents duplicates in the result set. + Set this flag to disable that behavior. +* `nonull` Set to never return an empty set, instead returning a set + containing the pattern itself. This is the default in glob(3). +* `nocase` Perform a case-insensitive match. Note that case-insensitive + filesystems will sometimes result in glob returning results that are + case-insensitively matched anyway, since readdir and stat will not + raise an error. +* `debug` Set to enable debug logging in minimatch and glob. +* `globDebug` Set to enable debug logging in glob, but not minimatch. + +## Comparisons to other fnmatch/glob implementations + +While strict compliance with the existing standards is a worthwhile +goal, some discrepancies exist between node-glob and other +implementations, and are intentional. + +If the pattern starts with a `!` character, then it is negated. Set the +`nonegate` flag to suppress this behavior, and treat leading `!` +characters normally. This is perhaps relevant if you wish to start the +pattern with a negative extglob pattern like `!(a|B)`. Multiple `!` +characters at the start of a pattern will negate the pattern multiple +times. + +If a pattern starts with `#`, then it is treated as a comment, and +will not match anything. Use `\#` to match a literal `#` at the +start of a line, or set the `nocomment` flag to suppress this behavior. + +The double-star character `**` is supported by default, unless the +`noglobstar` flag is set. This is supported in the manner of bsdglob +and bash 4.1, where `**` only has special significance if it is the only +thing in a path part. That is, `a/**/b` will match `a/x/y/b`, but +`a/**b` will not. + +If an escaped pattern has no matches, and the `nonull` flag is set, +then glob returns the pattern as-provided, rather than +interpreting the character escapes. For example, +`glob.match([], "\\*a\\?")` will return `"\\*a\\?"` rather than +`"*a?"`. This is akin to setting the `nullglob` option in bash, except +that it does not resolve escaped pattern characters. + +If brace expansion is not disabled, then it is performed before any +other interpretation of the glob pattern. Thus, a pattern like +`+(a|{b),c)}`, which would not be valid in bash or zsh, is expanded +**first** into the set of `+(a|b)` and `+(a|c)`, and those patterns are +checked for validity. Since those two are valid, matching proceeds. + +## Windows + +**Please only use forward-slashes in glob expressions.** + +Though windows uses either `/` or `\` as its path separator, only `/` +characters are used by this glob implementation. You must use +forward-slashes **only** in glob expressions. Back-slashes will always +be interpreted as escape characters, not path separators. + +Results from absolute patterns such as `/foo/*` are mounted onto the +root setting using `path.join`. On windows, this will by default result +in `/foo/*` matching `C:\foo\bar.txt`. + +## Race Conditions + +Glob searching, by its very nature, is susceptible to race conditions, +since it relies on directory walking and such. + +As a result, it is possible that a file that exists when glob looks for +it may have been deleted or modified by the time it returns the result. + +As part of its internal implementation, this program caches all stat +and readdir calls that it makes, in order to cut down on system +overhead. However, this also makes it even more susceptible to races, +especially if the cache or statCache objects are reused between glob +calls. + +Users are thus advised not to use a glob result as a guarantee of +filesystem state in the face of rapid changes. For the vast majority +of operations, this is never a problem. diff --git a/pitfall/pdfkit/node_modules/glob/examples/g.js b/pitfall/pdfkit/node_modules/glob/examples/g.js new file mode 100644 index 00000000..be122df0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/glob/examples/g.js @@ -0,0 +1,9 @@ +var Glob = require("../").Glob + +var pattern = "test/a/**/[cg]/../[cg]" +console.log(pattern) + +var mg = new Glob(pattern, {mark: true, sync:true}, function (er, matches) { + console.log("matches", matches) +}) +console.log("after") diff --git a/pitfall/pdfkit/node_modules/glob/examples/usr-local.js b/pitfall/pdfkit/node_modules/glob/examples/usr-local.js new file mode 100644 index 00000000..327a425e --- /dev/null +++ b/pitfall/pdfkit/node_modules/glob/examples/usr-local.js @@ -0,0 +1,9 @@ +var Glob = require("../").Glob + +var pattern = "{./*/*,/*,/usr/local/*}" +console.log(pattern) + +var mg = new Glob(pattern, {mark: true}, function (er, matches) { + console.log("matches", matches) +}) +console.log("after") diff --git a/pitfall/pdfkit/node_modules/glob/glob.js b/pitfall/pdfkit/node_modules/glob/glob.js new file mode 100644 index 00000000..f646c448 --- /dev/null +++ b/pitfall/pdfkit/node_modules/glob/glob.js @@ -0,0 +1,728 @@ +// Approach: +// +// 1. Get the minimatch set +// 2. For each pattern in the set, PROCESS(pattern) +// 3. Store matches per-set, then uniq them +// +// PROCESS(pattern) +// Get the first [n] items from pattern that are all strings +// Join these together. This is PREFIX. +// If there is no more remaining, then stat(PREFIX) and +// add to matches if it succeeds. END. +// readdir(PREFIX) as ENTRIES +// If fails, END +// If pattern[n] is GLOBSTAR +// // handle the case where the globstar match is empty +// // by pruning it out, and testing the resulting pattern +// PROCESS(pattern[0..n] + pattern[n+1 .. $]) +// // handle other cases. +// for ENTRY in ENTRIES (not dotfiles) +// // attach globstar + tail onto the entry +// PROCESS(pattern[0..n] + ENTRY + pattern[n .. $]) +// +// else // not globstar +// for ENTRY in ENTRIES (not dotfiles, unless pattern[n] is dot) +// Test ENTRY against pattern[n] +// If fails, continue +// If passes, PROCESS(pattern[0..n] + item + pattern[n+1 .. $]) +// +// Caveat: +// Cache all stats and readdirs results to minimize syscall. Since all +// we ever care about is existence and directory-ness, we can just keep +// `true` for files, and [children,...] for directories, or `false` for +// things that don't exist. + + + +module.exports = glob + +var fs = require("fs") +, minimatch = require("minimatch") +, Minimatch = minimatch.Minimatch +, inherits = require("inherits") +, EE = require("events").EventEmitter +, path = require("path") +, isDir = {} +, assert = require("assert").ok + +function glob (pattern, options, cb) { + if (typeof options === "function") cb = options, options = {} + if (!options) options = {} + + if (typeof options === "number") { + deprecated() + return + } + + var g = new Glob(pattern, options, cb) + return g.sync ? g.found : g +} + +glob.fnmatch = deprecated + +function deprecated () { + throw new Error("glob's interface has changed. Please see the docs.") +} + +glob.sync = globSync +function globSync (pattern, options) { + if (typeof options === "number") { + deprecated() + return + } + + options = options || {} + options.sync = true + return glob(pattern, options) +} + +this._processingEmitQueue = false + +glob.Glob = Glob +inherits(Glob, EE) +function Glob (pattern, options, cb) { + if (!(this instanceof Glob)) { + return new Glob(pattern, options, cb) + } + + if (typeof options === "function") { + cb = options + options = null + } + + if (typeof cb === "function") { + this.on("error", cb) + this.on("end", function (matches) { + cb(null, matches) + }) + } + + options = options || {} + + this._endEmitted = false + this.EOF = {} + this._emitQueue = [] + + this.paused = false + this._processingEmitQueue = false + + this.maxDepth = options.maxDepth || 1000 + this.maxLength = options.maxLength || Infinity + this.cache = options.cache || {} + this.statCache = options.statCache || {} + + this.changedCwd = false + var cwd = process.cwd() + if (!options.hasOwnProperty("cwd")) this.cwd = cwd + else { + this.cwd = options.cwd + this.changedCwd = path.resolve(options.cwd) !== cwd + } + + this.root = options.root || path.resolve(this.cwd, "/") + this.root = path.resolve(this.root) + if (process.platform === "win32") + this.root = this.root.replace(/\\/g, "/") + + this.nomount = !!options.nomount + + if (!pattern) { + throw new Error("must provide pattern") + } + + // base-matching: just use globstar for that. + if (options.matchBase && -1 === pattern.indexOf("/")) { + if (options.noglobstar) { + throw new Error("base matching requires globstar") + } + pattern = "**/" + pattern + } + + this.strict = options.strict !== false + this.dot = !!options.dot + this.mark = !!options.mark + this.sync = !!options.sync + this.nounique = !!options.nounique + this.nonull = !!options.nonull + this.nosort = !!options.nosort + this.nocase = !!options.nocase + this.stat = !!options.stat + + this.debug = !!options.debug || !!options.globDebug + if (this.debug) + this.log = console.error + + this.silent = !!options.silent + + var mm = this.minimatch = new Minimatch(pattern, options) + this.options = mm.options + pattern = this.pattern = mm.pattern + + this.error = null + this.aborted = false + + // list of all the patterns that ** has resolved do, so + // we can avoid visiting multiple times. + this._globstars = {} + + EE.call(this) + + // process each pattern in the minimatch set + var n = this.minimatch.set.length + + // The matches are stored as {: true,...} so that + // duplicates are automagically pruned. + // Later, we do an Object.keys() on these. + // Keep them as a list so we can fill in when nonull is set. + this.matches = new Array(n) + + this.minimatch.set.forEach(iterator.bind(this)) + function iterator (pattern, i, set) { + this._process(pattern, 0, i, function (er) { + if (er) this.emit("error", er) + if (-- n <= 0) this._finish() + }) + } +} + +Glob.prototype.log = function () {} + +Glob.prototype._finish = function () { + assert(this instanceof Glob) + + var nou = this.nounique + , all = nou ? [] : {} + + for (var i = 0, l = this.matches.length; i < l; i ++) { + var matches = this.matches[i] + this.log("matches[%d] =", i, matches) + // do like the shell, and spit out the literal glob + if (!matches) { + if (this.nonull) { + var literal = this.minimatch.globSet[i] + if (nou) all.push(literal) + else all[literal] = true + } + } else { + // had matches + var m = Object.keys(matches) + if (nou) all.push.apply(all, m) + else m.forEach(function (m) { + all[m] = true + }) + } + } + + if (!nou) all = Object.keys(all) + + if (!this.nosort) { + all = all.sort(this.nocase ? alphasorti : alphasort) + } + + if (this.mark) { + // at *some* point we statted all of these + all = all.map(this._mark, this) + } + + this.log("emitting end", all) + + this.EOF = this.found = all + this.emitMatch(this.EOF) +} + +function alphasorti (a, b) { + a = a.toLowerCase() + b = b.toLowerCase() + return alphasort(a, b) +} + +function alphasort (a, b) { + return a > b ? 1 : a < b ? -1 : 0 +} + +Glob.prototype._mark = function (p) { + var c = this.cache[p] + var m = p + if (c) { + var isDir = c === 2 || Array.isArray(c) + var slash = p.slice(-1) === '/' + + if (isDir && !slash) + m += '/' + else if (!isDir && slash) + m = m.slice(0, -1) + + if (m !== p) { + this.statCache[m] = this.statCache[p] + this.cache[m] = this.cache[p] + } + } + + return m +} + +Glob.prototype.abort = function () { + this.aborted = true + this.emit("abort") +} + +Glob.prototype.pause = function () { + if (this.paused) return + if (this.sync) + this.emit("error", new Error("Can't pause/resume sync glob")) + this.paused = true + this.emit("pause") +} + +Glob.prototype.resume = function () { + if (!this.paused) return + if (this.sync) + this.emit("error", new Error("Can't pause/resume sync glob")) + this.paused = false + this.emit("resume") + this._processEmitQueue() + //process.nextTick(this.emit.bind(this, "resume")) +} + +Glob.prototype.emitMatch = function (m) { + this.log('emitMatch', m) + this._emitQueue.push(m) + this._processEmitQueue() +} + +Glob.prototype._processEmitQueue = function (m) { + this.log("pEQ paused=%j processing=%j m=%j", this.paused, + this._processingEmitQueue, m) + var done = false + while (!this._processingEmitQueue && + !this.paused) { + this._processingEmitQueue = true + var m = this._emitQueue.shift() + this.log(">processEmitQueue", m === this.EOF ? ":EOF:" : m) + if (!m) { + this.log(">processEmitQueue, falsey m") + this._processingEmitQueue = false + break + } + + if (m === this.EOF || !(this.mark && !this.stat)) { + this.log("peq: unmarked, or eof") + next.call(this, 0, false) + } else if (this.statCache[m]) { + var sc = this.statCache[m] + var exists + if (sc) + exists = sc.isDirectory() ? 2 : 1 + this.log("peq: stat cached") + next.call(this, exists, exists === 2) + } else { + this.log("peq: _stat, then next") + this._stat(m, next) + } + + function next(exists, isDir) { + this.log("next", m, exists, isDir) + var ev = m === this.EOF ? "end" : "match" + + // "end" can only happen once. + assert(!this._endEmitted) + if (ev === "end") + this._endEmitted = true + + if (exists) { + // Doesn't mean it necessarily doesn't exist, it's possible + // we just didn't check because we don't care that much, or + // this is EOF anyway. + if (isDir && !m.match(/\/$/)) { + m = m + "/" + } else if (!isDir && m.match(/\/$/)) { + m = m.replace(/\/+$/, "") + } + } + this.log("emit", ev, m) + this.emit(ev, m) + this._processingEmitQueue = false + if (done && m !== this.EOF && !this.paused) + this._processEmitQueue() + } + } + done = true +} + +Glob.prototype._process = function (pattern, depth, index, cb_) { + assert(this instanceof Glob) + + var cb = function cb (er, res) { + assert(this instanceof Glob) + if (this.paused) { + if (!this._processQueue) { + this._processQueue = [] + this.once("resume", function () { + var q = this._processQueue + this._processQueue = null + q.forEach(function (cb) { cb() }) + }) + } + this._processQueue.push(cb_.bind(this, er, res)) + } else { + cb_.call(this, er, res) + } + }.bind(this) + + if (this.aborted) return cb() + + if (depth > this.maxDepth) return cb() + + // Get the first [n] parts of pattern that are all strings. + var n = 0 + while (typeof pattern[n] === "string") { + n ++ + } + // now n is the index of the first one that is *not* a string. + + // see if there's anything else + var prefix + switch (n) { + // if not, then this is rather simple + case pattern.length: + prefix = pattern.join("/") + this._stat(prefix, function (exists, isDir) { + // either it's there, or it isn't. + // nothing more to do, either way. + if (exists) { + if (prefix && isAbsolute(prefix) && !this.nomount) { + if (prefix.charAt(0) === "/") { + prefix = path.join(this.root, prefix) + } else { + prefix = path.resolve(this.root, prefix) + } + } + + if (process.platform === "win32") + prefix = prefix.replace(/\\/g, "/") + + this.matches[index] = this.matches[index] || {} + this.matches[index][prefix] = true + this.emitMatch(prefix) + } + return cb() + }) + return + + case 0: + // pattern *starts* with some non-trivial item. + // going to readdir(cwd), but not include the prefix in matches. + prefix = null + break + + default: + // pattern has some string bits in the front. + // whatever it starts with, whether that's "absolute" like /foo/bar, + // or "relative" like "../baz" + prefix = pattern.slice(0, n) + prefix = prefix.join("/") + break + } + + // get the list of entries. + var read + if (prefix === null) read = "." + else if (isAbsolute(prefix) || isAbsolute(pattern.join("/"))) { + if (!prefix || !isAbsolute(prefix)) { + prefix = path.join("/", prefix) + } + read = prefix = path.resolve(prefix) + + // if (process.platform === "win32") + // read = prefix = prefix.replace(/^[a-zA-Z]:|\\/g, "/") + + this.log('absolute: ', prefix, this.root, pattern, read) + } else { + read = prefix + } + + this.log('readdir(%j)', read, this.cwd, this.root) + + return this._readdir(read, function (er, entries) { + if (er) { + // not a directory! + // this means that, whatever else comes after this, it can never match + return cb() + } + + // globstar is special + if (pattern[n] === minimatch.GLOBSTAR) { + // test without the globstar, and with every child both below + // and replacing the globstar. + var s = [ pattern.slice(0, n).concat(pattern.slice(n + 1)) ] + entries.forEach(function (e) { + if (e.charAt(0) === "." && !this.dot) return + // instead of the globstar + s.push(pattern.slice(0, n).concat(e).concat(pattern.slice(n + 1))) + // below the globstar + s.push(pattern.slice(0, n).concat(e).concat(pattern.slice(n))) + }, this) + + s = s.filter(function (pattern) { + var key = gsKey(pattern) + var seen = !this._globstars[key] + this._globstars[key] = true + return seen + }, this) + + if (!s.length) + return cb() + + // now asyncForEach over this + var l = s.length + , errState = null + s.forEach(function (gsPattern) { + this._process(gsPattern, depth + 1, index, function (er) { + if (errState) return + if (er) return cb(errState = er) + if (--l <= 0) return cb() + }) + }, this) + + return + } + + // not a globstar + // It will only match dot entries if it starts with a dot, or if + // dot is set. Stuff like @(.foo|.bar) isn't allowed. + var pn = pattern[n] + var rawGlob = pattern[n]._glob + , dotOk = this.dot || rawGlob.charAt(0) === "." + + entries = entries.filter(function (e) { + return (e.charAt(0) !== "." || dotOk) && + e.match(pattern[n]) + }) + + // If n === pattern.length - 1, then there's no need for the extra stat + // *unless* the user has specified "mark" or "stat" explicitly. + // We know that they exist, since the readdir returned them. + if (n === pattern.length - 1 && + !this.mark && + !this.stat) { + entries.forEach(function (e) { + if (prefix) { + if (prefix !== "/") e = prefix + "/" + e + else e = prefix + e + } + if (e.charAt(0) === "/" && !this.nomount) { + e = path.join(this.root, e) + } + + if (process.platform === "win32") + e = e.replace(/\\/g, "/") + + this.matches[index] = this.matches[index] || {} + this.matches[index][e] = true + this.emitMatch(e) + }, this) + return cb.call(this) + } + + + // now test all the remaining entries as stand-ins for that part + // of the pattern. + var l = entries.length + , errState = null + if (l === 0) return cb() // no matches possible + entries.forEach(function (e) { + var p = pattern.slice(0, n).concat(e).concat(pattern.slice(n + 1)) + this._process(p, depth + 1, index, function (er) { + if (errState) return + if (er) return cb(errState = er) + if (--l === 0) return cb.call(this) + }) + }, this) + }) + +} + +function gsKey (pattern) { + return '**' + pattern.map(function (p) { + return (p === minimatch.GLOBSTAR) ? '**' : (''+p) + }).join('/') +} + +Glob.prototype._stat = function (f, cb) { + assert(this instanceof Glob) + var abs = f + if (f.charAt(0) === "/") { + abs = path.join(this.root, f) + } else if (this.changedCwd) { + abs = path.resolve(this.cwd, f) + } + + if (f.length > this.maxLength) { + var er = new Error("Path name too long") + er.code = "ENAMETOOLONG" + er.path = f + return this._afterStat(f, abs, cb, er) + } + + this.log('stat', [this.cwd, f, '=', abs]) + + if (!this.stat && this.cache.hasOwnProperty(f)) { + var exists = this.cache[f] + , isDir = exists && (Array.isArray(exists) || exists === 2) + if (this.sync) return cb.call(this, !!exists, isDir) + return process.nextTick(cb.bind(this, !!exists, isDir)) + } + + var stat = this.statCache[abs] + if (this.sync || stat) { + var er + try { + stat = fs.statSync(abs) + } catch (e) { + er = e + } + this._afterStat(f, abs, cb, er, stat) + } else { + fs.stat(abs, this._afterStat.bind(this, f, abs, cb)) + } +} + +Glob.prototype._afterStat = function (f, abs, cb, er, stat) { + var exists + assert(this instanceof Glob) + + if (abs.slice(-1) === "/" && stat && !stat.isDirectory()) { + this.log("should be ENOTDIR, fake it") + + er = new Error("ENOTDIR, not a directory '" + abs + "'") + er.path = abs + er.code = "ENOTDIR" + stat = null + } + + var emit = !this.statCache[abs] + this.statCache[abs] = stat + + if (er || !stat) { + exists = false + } else { + exists = stat.isDirectory() ? 2 : 1 + if (emit) + this.emit('stat', f, stat) + } + this.cache[f] = this.cache[f] || exists + cb.call(this, !!exists, exists === 2) +} + +Glob.prototype._readdir = function (f, cb) { + assert(this instanceof Glob) + var abs = f + if (f.charAt(0) === "/") { + abs = path.join(this.root, f) + } else if (isAbsolute(f)) { + abs = f + } else if (this.changedCwd) { + abs = path.resolve(this.cwd, f) + } + + if (f.length > this.maxLength) { + var er = new Error("Path name too long") + er.code = "ENAMETOOLONG" + er.path = f + return this._afterReaddir(f, abs, cb, er) + } + + this.log('readdir', [this.cwd, f, abs]) + if (this.cache.hasOwnProperty(f)) { + var c = this.cache[f] + if (Array.isArray(c)) { + if (this.sync) return cb.call(this, null, c) + return process.nextTick(cb.bind(this, null, c)) + } + + if (!c || c === 1) { + // either ENOENT or ENOTDIR + var code = c ? "ENOTDIR" : "ENOENT" + , er = new Error((c ? "Not a directory" : "Not found") + ": " + f) + er.path = f + er.code = code + this.log(f, er) + if (this.sync) return cb.call(this, er) + return process.nextTick(cb.bind(this, er)) + } + + // at this point, c === 2, meaning it's a dir, but we haven't + // had to read it yet, or c === true, meaning it's *something* + // but we don't have any idea what. Need to read it, either way. + } + + if (this.sync) { + var er, entries + try { + entries = fs.readdirSync(abs) + } catch (e) { + er = e + } + return this._afterReaddir(f, abs, cb, er, entries) + } + + fs.readdir(abs, this._afterReaddir.bind(this, f, abs, cb)) +} + +Glob.prototype._afterReaddir = function (f, abs, cb, er, entries) { + assert(this instanceof Glob) + if (entries && !er) { + this.cache[f] = entries + // if we haven't asked to stat everything for suresies, then just + // assume that everything in there exists, so we can avoid + // having to stat it a second time. This also gets us one step + // further into ELOOP territory. + if (!this.mark && !this.stat) { + entries.forEach(function (e) { + if (f === "/") e = f + e + else e = f + "/" + e + this.cache[e] = true + }, this) + } + + return cb.call(this, er, entries) + } + + // now handle errors, and cache the information + if (er) switch (er.code) { + case "ENOTDIR": // totally normal. means it *does* exist. + this.cache[f] = 1 + return cb.call(this, er) + case "ENOENT": // not terribly unusual + case "ELOOP": + case "ENAMETOOLONG": + case "UNKNOWN": + this.cache[f] = false + return cb.call(this, er) + default: // some unusual error. Treat as failure. + this.cache[f] = false + if (this.strict) this.emit("error", er) + if (!this.silent) console.error("glob error", er) + return cb.call(this, er) + } +} + +var isAbsolute = process.platform === "win32" ? absWin : absUnix + +function absWin (p) { + if (absUnix(p)) return true + // pull off the device/UNC bit from a windows path. + // from node's lib/path.js + var splitDeviceRe = + /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/ + , result = splitDeviceRe.exec(p) + , device = result[1] || '' + , isUnc = device && device.charAt(1) !== ':' + , isAbsolute = !!result[2] || isUnc // UNC paths are always absolute + + return isAbsolute +} + +function absUnix (p) { + return p.charAt(0) === "/" || p === "" +} diff --git a/pitfall/pdfkit/node_modules/glob/package.json b/pitfall/pdfkit/node_modules/glob/package.json new file mode 100644 index 00000000..fc8055ca --- /dev/null +++ b/pitfall/pdfkit/node_modules/glob/package.json @@ -0,0 +1,91 @@ +{ + "_args": [ + [ + { + "raw": "glob@~3.2.8", + "scope": null, + "escapedName": "glob", + "name": "glob", + "rawSpec": "~3.2.8", + "spec": ">=3.2.8 <3.3.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/browserify" + ] + ], + "_from": "glob@>=3.2.8 <3.3.0", + "_id": "glob@3.2.11", + "_inCache": true, + "_location": "/glob", + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "_npmVersion": "1.4.10", + "_phantomChildren": {}, + "_requested": { + "raw": "glob@~3.2.8", + "scope": null, + "escapedName": "glob", + "name": "glob", + "rawSpec": "~3.2.8", + "spec": ">=3.2.8 <3.3.0", + "type": "range" + }, + "_requiredBy": [ + "/browserify" + ], + "_resolved": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz", + "_shasum": "4a973f635b9190f715d10987d5c00fd2815ebe3d", + "_shrinkwrap": null, + "_spec": "glob@~3.2.8", + "_where": "/Users/MB/git/pdfkit/node_modules/browserify", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "bugs": { + "url": "https://github.com/isaacs/node-glob/issues" + }, + "dependencies": { + "inherits": "2", + "minimatch": "0.3" + }, + "description": "a little globber", + "devDependencies": { + "mkdirp": "0", + "rimraf": "1", + "tap": "~0.4.0" + }, + "directories": {}, + "dist": { + "shasum": "4a973f635b9190f715d10987d5c00fd2815ebe3d", + "tarball": "https://registry.npmjs.org/glob/-/glob-3.2.11.tgz" + }, + "engines": { + "node": "*" + }, + "gitHead": "73f57e99510582b2024b762305970ebcf9b70aa2", + "homepage": "https://github.com/isaacs/node-glob", + "license": "BSD", + "main": "glob.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "glob", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/node-glob.git" + }, + "scripts": { + "test": "tap test/*.js", + "test-regen": "TEST_REGEN=1 node test/00-setup.js" + }, + "version": "3.2.11" +} diff --git a/pitfall/pdfkit/node_modules/glob/test/00-setup.js b/pitfall/pdfkit/node_modules/glob/test/00-setup.js new file mode 100644 index 00000000..245afafd --- /dev/null +++ b/pitfall/pdfkit/node_modules/glob/test/00-setup.js @@ -0,0 +1,176 @@ +// just a little pre-run script to set up the fixtures. +// zz-finish cleans it up + +var mkdirp = require("mkdirp") +var path = require("path") +var i = 0 +var tap = require("tap") +var fs = require("fs") +var rimraf = require("rimraf") + +var files = +[ "a/.abcdef/x/y/z/a" +, "a/abcdef/g/h" +, "a/abcfed/g/h" +, "a/b/c/d" +, "a/bc/e/f" +, "a/c/d/c/b" +, "a/cb/e/f" +] + +var symlinkTo = path.resolve(__dirname, "a/symlink/a/b/c") +var symlinkFrom = "../.." + +files = files.map(function (f) { + return path.resolve(__dirname, f) +}) + +tap.test("remove fixtures", function (t) { + rimraf(path.resolve(__dirname, "a"), function (er) { + t.ifError(er, "remove fixtures") + t.end() + }) +}) + +files.forEach(function (f) { + tap.test(f, function (t) { + var d = path.dirname(f) + mkdirp(d, 0755, function (er) { + if (er) { + t.fail(er) + return t.bailout() + } + fs.writeFile(f, "i like tests", function (er) { + t.ifError(er, "make file") + t.end() + }) + }) + }) +}) + +if (process.platform !== "win32") { + tap.test("symlinky", function (t) { + var d = path.dirname(symlinkTo) + console.error("mkdirp", d) + mkdirp(d, 0755, function (er) { + t.ifError(er) + fs.symlink(symlinkFrom, symlinkTo, "dir", function (er) { + t.ifError(er, "make symlink") + t.end() + }) + }) + }) +} + +;["foo","bar","baz","asdf","quux","qwer","rewq"].forEach(function (w) { + w = "/tmp/glob-test/" + w + tap.test("create " + w, function (t) { + mkdirp(w, function (er) { + if (er) + throw er + t.pass(w) + t.end() + }) + }) +}) + + +// generate the bash pattern test-fixtures if possible +if (process.platform === "win32" || !process.env.TEST_REGEN) { + console.error("Windows, or TEST_REGEN unset. Using cached fixtures.") + return +} + +var spawn = require("child_process").spawn; +var globs = + // put more patterns here. + // anything that would be directly in / should be in /tmp/glob-test + ["test/a/*/+(c|g)/./d" + ,"test/a/**/[cg]/../[cg]" + ,"test/a/{b,c,d,e,f}/**/g" + ,"test/a/b/**" + ,"test/**/g" + ,"test/a/abc{fed,def}/g/h" + ,"test/a/abc{fed/g,def}/**/" + ,"test/a/abc{fed/g,def}/**///**/" + ,"test/**/a/**/" + ,"test/+(a|b|c)/a{/,bc*}/**" + ,"test/*/*/*/f" + ,"test/**/f" + ,"test/a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**" + ,"{./*/*,/tmp/glob-test/*}" + ,"{/tmp/glob-test/*,*}" // evil owl face! how you taunt me! + ,"test/a/!(symlink)/**" + ] +var bashOutput = {} +var fs = require("fs") + +globs.forEach(function (pattern) { + tap.test("generate fixture " + pattern, function (t) { + var cmd = "shopt -s globstar && " + + "shopt -s extglob && " + + "shopt -s nullglob && " + + // "shopt >&2; " + + "eval \'for i in " + pattern + "; do echo $i; done\'" + var cp = spawn("bash", ["-c", cmd], { cwd: path.dirname(__dirname) }) + var out = [] + cp.stdout.on("data", function (c) { + out.push(c) + }) + cp.stderr.pipe(process.stderr) + cp.on("close", function (code) { + out = flatten(out) + if (!out) + out = [] + else + out = cleanResults(out.split(/\r*\n/)) + + bashOutput[pattern] = out + t.notOk(code, "bash test should finish nicely") + t.end() + }) + }) +}) + +tap.test("save fixtures", function (t) { + var fname = path.resolve(__dirname, "bash-results.json") + var data = JSON.stringify(bashOutput, null, 2) + "\n" + fs.writeFile(fname, data, function (er) { + t.ifError(er) + t.end() + }) +}) + +function cleanResults (m) { + // normalize discrepancies in ordering, duplication, + // and ending slashes. + return m.map(function (m) { + return m.replace(/\/+/g, "/").replace(/\/$/, "") + }).sort(alphasort).reduce(function (set, f) { + if (f !== set[set.length - 1]) set.push(f) + return set + }, []).sort(alphasort).map(function (f) { + // de-windows + return (process.platform !== 'win32') ? f + : f.replace(/^[a-zA-Z]:\\\\/, '/').replace(/\\/g, '/') + }) +} + +function flatten (chunks) { + var s = 0 + chunks.forEach(function (c) { s += c.length }) + var out = new Buffer(s) + s = 0 + chunks.forEach(function (c) { + c.copy(out, s) + s += c.length + }) + + return out.toString().trim() +} + +function alphasort (a, b) { + a = a.toLowerCase() + b = b.toLowerCase() + return a > b ? 1 : a < b ? -1 : 0 +} diff --git a/pitfall/pdfkit/node_modules/glob/test/bash-comparison.js b/pitfall/pdfkit/node_modules/glob/test/bash-comparison.js new file mode 100644 index 00000000..239ed1a9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/glob/test/bash-comparison.js @@ -0,0 +1,63 @@ +// basic test +// show that it does the same thing by default as the shell. +var tap = require("tap") +, child_process = require("child_process") +, bashResults = require("./bash-results.json") +, globs = Object.keys(bashResults) +, glob = require("../") +, path = require("path") + +// run from the root of the project +// this is usually where you're at anyway, but be sure. +process.chdir(path.resolve(__dirname, "..")) + +function alphasort (a, b) { + a = a.toLowerCase() + b = b.toLowerCase() + return a > b ? 1 : a < b ? -1 : 0 +} + +globs.forEach(function (pattern) { + var expect = bashResults[pattern] + // anything regarding the symlink thing will fail on windows, so just skip it + if (process.platform === "win32" && + expect.some(function (m) { + return /\/symlink\//.test(m) + })) + return + + tap.test(pattern, function (t) { + glob(pattern, function (er, matches) { + if (er) + throw er + + // sort and unmark, just to match the shell results + matches = cleanResults(matches) + + t.deepEqual(matches, expect, pattern) + t.end() + }) + }) + + tap.test(pattern + " sync", function (t) { + var matches = cleanResults(glob.sync(pattern)) + + t.deepEqual(matches, expect, "should match shell") + t.end() + }) +}) + +function cleanResults (m) { + // normalize discrepancies in ordering, duplication, + // and ending slashes. + return m.map(function (m) { + return m.replace(/\/+/g, "/").replace(/\/$/, "") + }).sort(alphasort).reduce(function (set, f) { + if (f !== set[set.length - 1]) set.push(f) + return set + }, []).sort(alphasort).map(function (f) { + // de-windows + return (process.platform !== 'win32') ? f + : f.replace(/^[a-zA-Z]:[\/\\]+/, '/').replace(/[\\\/]+/g, '/') + }) +} diff --git a/pitfall/pdfkit/node_modules/glob/test/bash-results.json b/pitfall/pdfkit/node_modules/glob/test/bash-results.json new file mode 100644 index 00000000..8051c723 --- /dev/null +++ b/pitfall/pdfkit/node_modules/glob/test/bash-results.json @@ -0,0 +1,351 @@ +{ + "test/a/*/+(c|g)/./d": [ + "test/a/b/c/./d" + ], + "test/a/**/[cg]/../[cg]": [ + "test/a/abcdef/g/../g", + "test/a/abcfed/g/../g", + "test/a/b/c/../c", + "test/a/c/../c", + "test/a/c/d/c/../c", + "test/a/symlink/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/../c" + ], + "test/a/{b,c,d,e,f}/**/g": [], + "test/a/b/**": [ + "test/a/b", + "test/a/b/c", + "test/a/b/c/d" + ], + "test/**/g": [ + "test/a/abcdef/g", + "test/a/abcfed/g" + ], + "test/a/abc{fed,def}/g/h": [ + "test/a/abcdef/g/h", + "test/a/abcfed/g/h" + ], + "test/a/abc{fed/g,def}/**/": [ + "test/a/abcdef", + "test/a/abcdef/g", + "test/a/abcfed/g" + ], + "test/a/abc{fed/g,def}/**///**/": [ + "test/a/abcdef", + "test/a/abcdef/g", + "test/a/abcfed/g" + ], + "test/**/a/**/": [ + "test/a", + "test/a/abcdef", + "test/a/abcdef/g", + "test/a/abcfed", + "test/a/abcfed/g", + "test/a/b", + "test/a/b/c", + "test/a/bc", + "test/a/bc/e", + "test/a/c", + "test/a/c/d", + "test/a/c/d/c", + "test/a/cb", + "test/a/cb/e", + "test/a/symlink", + "test/a/symlink/a", + "test/a/symlink/a/b", + "test/a/symlink/a/b/c", + "test/a/symlink/a/b/c/a", + "test/a/symlink/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b" + ], + "test/+(a|b|c)/a{/,bc*}/**": [ + "test/a/abcdef", + "test/a/abcdef/g", + "test/a/abcdef/g/h", + "test/a/abcfed", + "test/a/abcfed/g", + "test/a/abcfed/g/h" + ], + "test/*/*/*/f": [ + "test/a/bc/e/f", + "test/a/cb/e/f" + ], + "test/**/f": [ + "test/a/bc/e/f", + "test/a/cb/e/f" + ], + "test/a/symlink/a/b/c/a/b/c/a/b/c//a/b/c////a/b/c/**/b/c/**": [ + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b", + "test/a/symlink/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c/a/b/c" + ], + "{./*/*,/tmp/glob-test/*}": [ + "./examples/g.js", + "./examples/usr-local.js", + "./node_modules/inherits", + "./node_modules/minimatch", + "./node_modules/mkdirp", + "./node_modules/rimraf", + "./node_modules/tap", + "./test/00-setup.js", + "./test/a", + "./test/bash-comparison.js", + "./test/bash-results.json", + "./test/cwd-test.js", + "./test/globstar-match.js", + "./test/mark.js", + "./test/new-glob-optional-options.js", + "./test/nocase-nomagic.js", + "./test/pause-resume.js", + "./test/readme-issue.js", + "./test/root-nomount.js", + "./test/root.js", + "./test/stat.js", + "./test/zz-cleanup.js", + "/tmp/glob-test/asdf", + "/tmp/glob-test/bar", + "/tmp/glob-test/baz", + "/tmp/glob-test/foo", + "/tmp/glob-test/quux", + "/tmp/glob-test/qwer", + "/tmp/glob-test/rewq" + ], + "{/tmp/glob-test/*,*}": [ + "/tmp/glob-test/asdf", + "/tmp/glob-test/bar", + "/tmp/glob-test/baz", + "/tmp/glob-test/foo", + "/tmp/glob-test/quux", + "/tmp/glob-test/qwer", + "/tmp/glob-test/rewq", + "examples", + "glob.js", + "LICENSE", + "node_modules", + "package.json", + "README.md", + "test" + ], + "test/a/!(symlink)/**": [ + "test/a/abcdef", + "test/a/abcdef/g", + "test/a/abcdef/g/h", + "test/a/abcfed", + "test/a/abcfed/g", + "test/a/abcfed/g/h", + "test/a/b", + "test/a/b/c", + "test/a/b/c/d", + "test/a/bc", + "test/a/bc/e", + "test/a/bc/e/f", + "test/a/c", + "test/a/c/d", + "test/a/c/d/c", + "test/a/c/d/c/b", + "test/a/cb", + "test/a/cb/e", + "test/a/cb/e/f" + ] +} diff --git a/pitfall/pdfkit/node_modules/glob/test/cwd-test.js b/pitfall/pdfkit/node_modules/glob/test/cwd-test.js new file mode 100644 index 00000000..352c27ef --- /dev/null +++ b/pitfall/pdfkit/node_modules/glob/test/cwd-test.js @@ -0,0 +1,55 @@ +var tap = require("tap") + +var origCwd = process.cwd() +process.chdir(__dirname) + +tap.test("changing cwd and searching for **/d", function (t) { + var glob = require('../') + var path = require('path') + t.test('.', function (t) { + glob('**/d', function (er, matches) { + t.ifError(er) + t.like(matches, [ 'a/b/c/d', 'a/c/d' ]) + t.end() + }) + }) + + t.test('a', function (t) { + glob('**/d', {cwd:path.resolve('a')}, function (er, matches) { + t.ifError(er) + t.like(matches, [ 'b/c/d', 'c/d' ]) + t.end() + }) + }) + + t.test('a/b', function (t) { + glob('**/d', {cwd:path.resolve('a/b')}, function (er, matches) { + t.ifError(er) + t.like(matches, [ 'c/d' ]) + t.end() + }) + }) + + t.test('a/b/', function (t) { + glob('**/d', {cwd:path.resolve('a/b/')}, function (er, matches) { + t.ifError(er) + t.like(matches, [ 'c/d' ]) + t.end() + }) + }) + + t.test('.', function (t) { + glob('**/d', {cwd: process.cwd()}, function (er, matches) { + t.ifError(er) + t.like(matches, [ 'a/b/c/d', 'a/c/d' ]) + t.end() + }) + }) + + t.test('cd -', function (t) { + process.chdir(origCwd) + t.end() + }) + + t.end() +}) diff --git a/pitfall/pdfkit/node_modules/glob/test/globstar-match.js b/pitfall/pdfkit/node_modules/glob/test/globstar-match.js new file mode 100644 index 00000000..9b234fa2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/glob/test/globstar-match.js @@ -0,0 +1,19 @@ +var Glob = require("../glob.js").Glob +var test = require('tap').test + +test('globstar should not have dupe matches', function(t) { + var pattern = 'a/**/[gh]' + var g = new Glob(pattern, { cwd: __dirname }) + var matches = [] + g.on('match', function(m) { + console.error('match %j', m) + matches.push(m) + }) + g.on('end', function(set) { + console.error('set', set) + matches = matches.sort() + set = set.sort() + t.same(matches, set, 'should have same set of matches') + t.end() + }) +}) diff --git a/pitfall/pdfkit/node_modules/glob/test/mark.js b/pitfall/pdfkit/node_modules/glob/test/mark.js new file mode 100644 index 00000000..bf411c0e --- /dev/null +++ b/pitfall/pdfkit/node_modules/glob/test/mark.js @@ -0,0 +1,118 @@ +var test = require("tap").test +var glob = require('../') +process.chdir(__dirname) + +// expose timing issues +var lag = 5 +glob.Glob.prototype._stat = function(o) { return function(f, cb) { + var args = arguments + setTimeout(function() { + o.call(this, f, cb) + }.bind(this), lag += 5) +}}(glob.Glob.prototype._stat) + + +test("mark, with **", function (t) { + glob("a/*b*/**", {mark: true}, function (er, results) { + if (er) + throw er + var expect = + [ 'a/abcdef/', + 'a/abcdef/g/', + 'a/abcdef/g/h', + 'a/abcfed/', + 'a/abcfed/g/', + 'a/abcfed/g/h', + 'a/b/', + 'a/b/c/', + 'a/b/c/d', + 'a/bc/', + 'a/bc/e/', + 'a/bc/e/f', + 'a/cb/', + 'a/cb/e/', + 'a/cb/e/f' ] + + t.same(results, expect) + t.end() + }) +}) + +test("mark, no / on pattern", function (t) { + glob("a/*", {mark: true}, function (er, results) { + if (er) + throw er + var expect = [ 'a/abcdef/', + 'a/abcfed/', + 'a/b/', + 'a/bc/', + 'a/c/', + 'a/cb/' ] + + if (process.platform !== "win32") + expect.push('a/symlink/') + + t.same(results, expect) + t.end() + }).on('match', function(m) { + t.similar(m, /\/$/) + }) +}) + +test("mark=false, no / on pattern", function (t) { + glob("a/*", function (er, results) { + if (er) + throw er + var expect = [ 'a/abcdef', + 'a/abcfed', + 'a/b', + 'a/bc', + 'a/c', + 'a/cb' ] + + if (process.platform !== "win32") + expect.push('a/symlink') + t.same(results, expect) + t.end() + }).on('match', function(m) { + t.similar(m, /[^\/]$/) + }) +}) + +test("mark=true, / on pattern", function (t) { + glob("a/*/", {mark: true}, function (er, results) { + if (er) + throw er + var expect = [ 'a/abcdef/', + 'a/abcfed/', + 'a/b/', + 'a/bc/', + 'a/c/', + 'a/cb/' ] + if (process.platform !== "win32") + expect.push('a/symlink/') + t.same(results, expect) + t.end() + }).on('match', function(m) { + t.similar(m, /\/$/) + }) +}) + +test("mark=false, / on pattern", function (t) { + glob("a/*/", function (er, results) { + if (er) + throw er + var expect = [ 'a/abcdef/', + 'a/abcfed/', + 'a/b/', + 'a/bc/', + 'a/c/', + 'a/cb/' ] + if (process.platform !== "win32") + expect.push('a/symlink/') + t.same(results, expect) + t.end() + }).on('match', function(m) { + t.similar(m, /\/$/) + }) +}) diff --git a/pitfall/pdfkit/node_modules/glob/test/new-glob-optional-options.js b/pitfall/pdfkit/node_modules/glob/test/new-glob-optional-options.js new file mode 100644 index 00000000..3e7dc5ac --- /dev/null +++ b/pitfall/pdfkit/node_modules/glob/test/new-glob-optional-options.js @@ -0,0 +1,10 @@ +var Glob = require('../glob.js').Glob; +var test = require('tap').test; + +test('new glob, with cb, and no options', function (t) { + new Glob(__filename, function(er, results) { + if (er) throw er; + t.same(results, [__filename]); + t.end(); + }); +}); diff --git a/pitfall/pdfkit/node_modules/glob/test/nocase-nomagic.js b/pitfall/pdfkit/node_modules/glob/test/nocase-nomagic.js new file mode 100644 index 00000000..2503f231 --- /dev/null +++ b/pitfall/pdfkit/node_modules/glob/test/nocase-nomagic.js @@ -0,0 +1,113 @@ +var fs = require('fs'); +var test = require('tap').test; +var glob = require('../'); + +test('mock fs', function(t) { + var stat = fs.stat + var statSync = fs.statSync + var readdir = fs.readdir + var readdirSync = fs.readdirSync + + function fakeStat(path) { + var ret + switch (path.toLowerCase()) { + case '/tmp': case '/tmp/': + ret = { isDirectory: function() { return true } } + break + case '/tmp/a': + ret = { isDirectory: function() { return false } } + break + } + return ret + } + + fs.stat = function(path, cb) { + var f = fakeStat(path); + if (f) { + process.nextTick(function() { + cb(null, f) + }) + } else { + stat.call(fs, path, cb) + } + } + + fs.statSync = function(path) { + return fakeStat(path) || statSync.call(fs, path) + } + + function fakeReaddir(path) { + var ret + switch (path.toLowerCase()) { + case '/tmp': case '/tmp/': + ret = [ 'a', 'A' ] + break + case '/': + ret = ['tmp', 'tMp', 'tMP', 'TMP'] + } + return ret + } + + fs.readdir = function(path, cb) { + var f = fakeReaddir(path) + if (f) + process.nextTick(function() { + cb(null, f) + }) + else + readdir.call(fs, path, cb) + } + + fs.readdirSync = function(path) { + return fakeReaddir(path) || readdirSync.call(fs, path) + } + + t.pass('mocked') + t.end() +}) + +test('nocase, nomagic', function(t) { + var n = 2 + var want = [ '/TMP/A', + '/TMP/a', + '/tMP/A', + '/tMP/a', + '/tMp/A', + '/tMp/a', + '/tmp/A', + '/tmp/a' ] + glob('/tmp/a', { nocase: true }, function(er, res) { + if (er) + throw er + t.same(res.sort(), want) + if (--n === 0) t.end() + }) + glob('/tmp/A', { nocase: true }, function(er, res) { + if (er) + throw er + t.same(res.sort(), want) + if (--n === 0) t.end() + }) +}) + +test('nocase, with some magic', function(t) { + t.plan(2) + var want = [ '/TMP/A', + '/TMP/a', + '/tMP/A', + '/tMP/a', + '/tMp/A', + '/tMp/a', + '/tmp/A', + '/tmp/a' ] + glob('/tmp/*', { nocase: true }, function(er, res) { + if (er) + throw er + t.same(res.sort(), want) + }) + glob('/tmp/*', { nocase: true }, function(er, res) { + if (er) + throw er + t.same(res.sort(), want) + }) +}) diff --git a/pitfall/pdfkit/node_modules/glob/test/pause-resume.js b/pitfall/pdfkit/node_modules/glob/test/pause-resume.js new file mode 100644 index 00000000..e1ffbab1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/glob/test/pause-resume.js @@ -0,0 +1,73 @@ +// show that no match events happen while paused. +var tap = require("tap") +, child_process = require("child_process") +// just some gnarly pattern with lots of matches +, pattern = "test/a/!(symlink)/**" +, bashResults = require("./bash-results.json") +, patterns = Object.keys(bashResults) +, glob = require("../") +, Glob = glob.Glob +, path = require("path") + +// run from the root of the project +// this is usually where you're at anyway, but be sure. +process.chdir(path.resolve(__dirname, "..")) + +function alphasort (a, b) { + a = a.toLowerCase() + b = b.toLowerCase() + return a > b ? 1 : a < b ? -1 : 0 +} + +function cleanResults (m) { + // normalize discrepancies in ordering, duplication, + // and ending slashes. + return m.map(function (m) { + return m.replace(/\/+/g, "/").replace(/\/$/, "") + }).sort(alphasort).reduce(function (set, f) { + if (f !== set[set.length - 1]) set.push(f) + return set + }, []).sort(alphasort).map(function (f) { + // de-windows + return (process.platform !== 'win32') ? f + : f.replace(/^[a-zA-Z]:\\\\/, '/').replace(/\\/g, '/') + }) +} + +var globResults = [] +tap.test("use a Glob object, and pause/resume it", function (t) { + var g = new Glob(pattern) + , paused = false + , res = [] + , expect = bashResults[pattern] + + g.on("pause", function () { + console.error("pause") + }) + + g.on("resume", function () { + console.error("resume") + }) + + g.on("match", function (m) { + t.notOk(g.paused, "must not be paused") + globResults.push(m) + g.pause() + t.ok(g.paused, "must be paused") + setTimeout(g.resume.bind(g), 10) + }) + + g.on("end", function (matches) { + t.pass("reached glob end") + globResults = cleanResults(globResults) + matches = cleanResults(matches) + t.deepEqual(matches, globResults, + "end event matches should be the same as match events") + + t.deepEqual(matches, expect, + "glob matches should be the same as bash results") + + t.end() + }) +}) + diff --git a/pitfall/pdfkit/node_modules/glob/test/readme-issue.js b/pitfall/pdfkit/node_modules/glob/test/readme-issue.js new file mode 100644 index 00000000..0b4e0be2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/glob/test/readme-issue.js @@ -0,0 +1,36 @@ +var test = require("tap").test +var glob = require("../") + +var mkdirp = require("mkdirp") +var fs = require("fs") +var rimraf = require("rimraf") +var dir = __dirname + "/package" + +test("setup", function (t) { + mkdirp.sync(dir) + fs.writeFileSync(dir + "/package.json", "{}", "ascii") + fs.writeFileSync(dir + "/README", "x", "ascii") + t.pass("setup done") + t.end() +}) + +test("glob", function (t) { + var opt = { + cwd: dir, + nocase: true, + mark: true + } + + glob("README?(.*)", opt, function (er, files) { + if (er) + throw er + t.same(files, ["README"]) + t.end() + }) +}) + +test("cleanup", function (t) { + rimraf.sync(dir) + t.pass("clean") + t.end() +}) diff --git a/pitfall/pdfkit/node_modules/glob/test/root-nomount.js b/pitfall/pdfkit/node_modules/glob/test/root-nomount.js new file mode 100644 index 00000000..3ac5979b --- /dev/null +++ b/pitfall/pdfkit/node_modules/glob/test/root-nomount.js @@ -0,0 +1,39 @@ +var tap = require("tap") + +var origCwd = process.cwd() +process.chdir(__dirname) + +tap.test("changing root and searching for /b*/**", function (t) { + var glob = require('../') + var path = require('path') + t.test('.', function (t) { + glob('/b*/**', { globDebug: true, root: '.', nomount: true }, function (er, matches) { + t.ifError(er) + t.like(matches, []) + t.end() + }) + }) + + t.test('a', function (t) { + glob('/b*/**', { globDebug: true, root: path.resolve('a'), nomount: true }, function (er, matches) { + t.ifError(er) + t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ]) + t.end() + }) + }) + + t.test('root=a, cwd=a/b', function (t) { + glob('/b*/**', { globDebug: true, root: 'a', cwd: path.resolve('a/b'), nomount: true }, function (er, matches) { + t.ifError(er) + t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ]) + t.end() + }) + }) + + t.test('cd -', function (t) { + process.chdir(origCwd) + t.end() + }) + + t.end() +}) diff --git a/pitfall/pdfkit/node_modules/glob/test/root.js b/pitfall/pdfkit/node_modules/glob/test/root.js new file mode 100644 index 00000000..95c23f99 --- /dev/null +++ b/pitfall/pdfkit/node_modules/glob/test/root.js @@ -0,0 +1,46 @@ +var t = require("tap") + +var origCwd = process.cwd() +process.chdir(__dirname) + +var glob = require('../') +var path = require('path') + +t.test('.', function (t) { + glob('/b*/**', { globDebug: true, root: '.' }, function (er, matches) { + t.ifError(er) + t.like(matches, []) + t.end() + }) +}) + + +t.test('a', function (t) { + console.error("root=" + path.resolve('a')) + glob('/b*/**', { globDebug: true, root: path.resolve('a') }, function (er, matches) { + t.ifError(er) + var wanted = [ + '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' + ].map(function (m) { + return path.join(path.resolve('a'), m).replace(/\\/g, '/') + }) + + t.like(matches, wanted) + t.end() + }) +}) + +t.test('root=a, cwd=a/b', function (t) { + glob('/b*/**', { globDebug: true, root: 'a', cwd: path.resolve('a/b') }, function (er, matches) { + t.ifError(er) + t.like(matches, [ '/b', '/b/c', '/b/c/d', '/bc', '/bc/e', '/bc/e/f' ].map(function (m) { + return path.join(path.resolve('a'), m).replace(/\\/g, '/') + })) + t.end() + }) +}) + +t.test('cd -', function (t) { + process.chdir(origCwd) + t.end() +}) diff --git a/pitfall/pdfkit/node_modules/glob/test/stat.js b/pitfall/pdfkit/node_modules/glob/test/stat.js new file mode 100644 index 00000000..62917114 --- /dev/null +++ b/pitfall/pdfkit/node_modules/glob/test/stat.js @@ -0,0 +1,32 @@ +var glob = require('../') +var test = require('tap').test +var path = require('path') + +test('stat all the things', function(t) { + var g = new glob.Glob('a/*abc*/**', { stat: true, cwd: __dirname }) + var matches = [] + g.on('match', function(m) { + matches.push(m) + }) + var stats = [] + g.on('stat', function(m) { + stats.push(m) + }) + g.on('end', function(eof) { + stats = stats.sort() + matches = matches.sort() + eof = eof.sort() + t.same(stats, matches) + t.same(eof, matches) + var cache = Object.keys(this.statCache) + t.same(cache.map(function (f) { + return path.relative(__dirname, f) + }).sort(), matches) + + cache.forEach(function(c) { + t.equal(typeof this.statCache[c], 'object') + }, this) + + t.end() + }) +}) diff --git a/pitfall/pdfkit/node_modules/glob/test/zz-cleanup.js b/pitfall/pdfkit/node_modules/glob/test/zz-cleanup.js new file mode 100644 index 00000000..e085f0fa --- /dev/null +++ b/pitfall/pdfkit/node_modules/glob/test/zz-cleanup.js @@ -0,0 +1,11 @@ +// remove the fixtures +var tap = require("tap") +, rimraf = require("rimraf") +, path = require("path") + +tap.test("cleanup fixtures", function (t) { + rimraf(path.resolve(__dirname, "a"), function (er) { + t.ifError(er, "removed") + t.end() + }) +}) diff --git a/pitfall/pdfkit/node_modules/has/.jshintrc b/pitfall/pdfkit/node_modules/has/.jshintrc new file mode 100644 index 00000000..6a61a73d --- /dev/null +++ b/pitfall/pdfkit/node_modules/has/.jshintrc @@ -0,0 +1,14 @@ +{ + "curly": true, + "eqeqeq": true, + "immed": true, + "latedef": true, + "newcap": true, + "noarg": true, + "sub": true, + "undef": true, + "boss": true, + "eqnull": true, + "node": true, + "browser": true +} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/has/.npmignore b/pitfall/pdfkit/node_modules/has/.npmignore new file mode 100644 index 00000000..8419859f --- /dev/null +++ b/pitfall/pdfkit/node_modules/has/.npmignore @@ -0,0 +1,3 @@ +/node_modules/ +*.log +*~ diff --git a/pitfall/pdfkit/node_modules/has/LICENSE-MIT b/pitfall/pdfkit/node_modules/has/LICENSE-MIT new file mode 100644 index 00000000..ae7014d3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/has/LICENSE-MIT @@ -0,0 +1,22 @@ +Copyright (c) 2013 Thiago de Arruda + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +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. diff --git a/pitfall/pdfkit/node_modules/has/README.mkd b/pitfall/pdfkit/node_modules/has/README.mkd new file mode 100644 index 00000000..635e3a4b --- /dev/null +++ b/pitfall/pdfkit/node_modules/has/README.mkd @@ -0,0 +1,18 @@ +# has + +> Object.prototype.hasOwnProperty.call shortcut + +## Installation + +```sh +npm install --save has +``` + +## Usage + +```js +var has = require('has'); + +has({}, 'hasOwnProperty'); // false +has(Object.prototype, 'hasOwnProperty'); // true +``` diff --git a/pitfall/pdfkit/node_modules/has/package.json b/pitfall/pdfkit/node_modules/has/package.json new file mode 100644 index 00000000..1f7107e9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/has/package.json @@ -0,0 +1,93 @@ +{ + "_args": [ + [ + { + "raw": "has@^1.0.0", + "scope": null, + "escapedName": "has", + "name": "has", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/MB/git/pitfall/pdfkit/node_modules/static-module" + ] + ], + "_from": "has@>=1.0.0 <2.0.0", + "_id": "has@1.0.1", + "_inCache": true, + "_location": "/has", + "_nodeVersion": "2.2.1", + "_npmUser": { + "name": "tarruda", + "email": "tpadilha84@gmail.com" + }, + "_npmVersion": "2.11.0", + "_phantomChildren": {}, + "_requested": { + "raw": "has@^1.0.0", + "scope": null, + "escapedName": "has", + "name": "has", + "rawSpec": "^1.0.0", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/static-module" + ], + "_resolved": "https://registry.npmjs.org/has/-/has-1.0.1.tgz", + "_shasum": "8461733f538b0837c9361e39a9ab9e9704dc2f28", + "_shrinkwrap": null, + "_spec": "has@^1.0.0", + "_where": "/Users/MB/git/pitfall/pdfkit/node_modules/static-module", + "author": { + "name": "Thiago de Arruda", + "email": "tpadilha84@gmail.com" + }, + "bugs": { + "url": "https://github.com/tarruda/has/issues" + }, + "dependencies": { + "function-bind": "^1.0.2" + }, + "description": "Object.prototype.hasOwnProperty.call shortcut", + "devDependencies": { + "chai": "~1.7.2", + "mocha": "^1.21.4" + }, + "directories": {}, + "dist": { + "shasum": "8461733f538b0837c9361e39a9ab9e9704dc2f28", + "tarball": "https://registry.npmjs.org/has/-/has-1.0.1.tgz" + }, + "engines": { + "node": ">= 0.8.0" + }, + "gitHead": "535c5c8ed1dc255c9e223829e702548dd514d2a5", + "homepage": "https://github.com/tarruda/has", + "licenses": [ + { + "type": "MIT", + "url": "https://github.com/tarruda/has/blob/master/LICENSE-MIT" + } + ], + "main": "./src/index", + "maintainers": [ + { + "name": "tarruda", + "email": "tpadilha84@gmail.com" + } + ], + "name": "has", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/tarruda/has.git" + }, + "scripts": { + "test": "node_modules/mocha/bin/mocha" + }, + "version": "1.0.1" +} diff --git a/pitfall/pdfkit/node_modules/has/src/index.js b/pitfall/pdfkit/node_modules/has/src/index.js new file mode 100644 index 00000000..cdf32857 --- /dev/null +++ b/pitfall/pdfkit/node_modules/has/src/index.js @@ -0,0 +1,3 @@ +var bind = require('function-bind'); + +module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); diff --git a/pitfall/pdfkit/node_modules/has/test/.jshintrc b/pitfall/pdfkit/node_modules/has/test/.jshintrc new file mode 100644 index 00000000..e1da2e42 --- /dev/null +++ b/pitfall/pdfkit/node_modules/has/test/.jshintrc @@ -0,0 +1,7 @@ +{ + "globals": { + "expect": false, + "run": false + }, + "expr": true +} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/has/test/index.js b/pitfall/pdfkit/node_modules/has/test/index.js new file mode 100644 index 00000000..38909b0a --- /dev/null +++ b/pitfall/pdfkit/node_modules/has/test/index.js @@ -0,0 +1,10 @@ +global.expect = require('chai').expect; +var has = require('../src'); + + +describe('has', function() { + it('works!', function() { + expect(has({}, 'hasOwnProperty')).to.be.false; + expect(has(Object.prototype, 'hasOwnProperty')).to.be.true; + }); +}); diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/get/index.html b/pitfall/pdfkit/node_modules/http-browserify/example/get/index.html new file mode 100644 index 00000000..7001c209 --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/get/index.html @@ -0,0 +1,9 @@ + + + xhr + + +
    + + + diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/get/main.js b/pitfall/pdfkit/node_modules/http-browserify/example/get/main.js new file mode 100644 index 00000000..3030d2df --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/get/main.js @@ -0,0 +1,14 @@ +var http = require('../../'); + +http.get({ path : '/beep' }, function (res) { + var div = document.getElementById('result'); + div.innerHTML += 'GET /beep
    '; + + res.on('data', function (buf) { + div.innerHTML += buf; + }); + + res.on('end', function () { + div.innerHTML += '
    __END__'; + }); +}); diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/get/server.js b/pitfall/pdfkit/node_modules/http-browserify/example/get/server.js new file mode 100644 index 00000000..a0482779 --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/get/server.js @@ -0,0 +1,12 @@ +var http = require('http'); +var ecstatic = require('ecstatic')(__dirname); +var server = http.createServer(function (req, res) { + if (req.url === '/beep') { + res.setHeader('content-type', 'text/plain'); + res.end('boop'); + } + else ecstatic(req, res); +}); + +console.log('Listening on :8082'); +server.listen(8082); diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/headers/index.html b/pitfall/pdfkit/node_modules/http-browserify/example/headers/index.html new file mode 100644 index 00000000..7001c209 --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/headers/index.html @@ -0,0 +1,9 @@ + + + xhr + + +
    + + + diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/headers/main.js b/pitfall/pdfkit/node_modules/http-browserify/example/headers/main.js new file mode 100644 index 00000000..247806cf --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/headers/main.js @@ -0,0 +1,18 @@ +var http = require('../../'); + +var opts = { path : '/beep', method : 'GET' }; +var req = http.request(opts, function (res) { + var div = document.getElementById('result'); + + for (var key in res.headers) { + div.innerHTML += key + ': ' + res.getHeader(key) + '
    '; + } + div.innerHTML += '
    '; + + res.on('data', function (buf) { + div.innerHTML += buf; + }); +}); + +req.setHeader('bling', 'blong'); +req.end(); diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/headers/server.js b/pitfall/pdfkit/node_modules/http-browserify/example/headers/server.js new file mode 100644 index 00000000..386e1fab --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/headers/server.js @@ -0,0 +1,15 @@ +var http = require('http'); +var ecstatic = require('ecstatic')(__dirname); +var server = http.createServer(function (req, res) { + if (req.url === '/beep') { + res.setHeader('content-type', 'text/plain'); + res.setHeader('foo', 'bar'); + res.setHeader('bling', req.headers.bling + '-blong'); + + res.end('boop'); + } + else ecstatic(req, res); +}); + +console.log('Listening on :8082'); +server.listen(8082); diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/data.json b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/data.json new file mode 100644 index 00000000..66121718 --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/data.json @@ -0,0 +1,139 @@ +[ +{"id":"ccc87f2e39902598d0895524bd1b94b0","key":["Colingo/valid-schema.git","f09907352b7a1033576af266fc4793ac11508702.1356048433579"],"value":{"_id":"ccc87f2e39902598d0895524bd1b94b0","_rev":"1-a37d6c7e2435cd5708a87738ce533159","type":"test","time":1356048548102,"commit":{"id":"f09907352b7a1033576af266fc4793ac11508702.1356048433579","dir":"/tmp/ci/work/f09907352b7a1033576af266fc4793ac11508702.1356048433579","repo":"Colingo/valid-schema.git","hash":"f09907352b7a1033576af266fc4793ac11508702","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","17","nightly"],"chrome":["22","23","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1356048433734.9429d555","browser":"safari/5.1","output":["[\"stdout\",\"TAP version 13\\n\"]\n","[\"stdout\",\"# error case\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\"]\n","[\"stdout\",\"# correct case\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\"]\n","[\"stdout\",\"# number schema\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\"]\n","[\"stdout\",\"# missing properties\\n\"]\n","[\"stdout\",\"ok 5 should be equal\\n\"]\n","[\"stdout\",\"# enum case\\n\"]\n","[\"stdout\",\"ok 6 should be equal\\n\"]\n","[\"stdout\",\"ok 7 should be equal\\n\"]\n","[\"stdout\",\"# nested schemas\\n\"]\n","[\"stdout\",\"ok 8 should be equal\\n\"]\n","[\"stdout\",\"ok 9 should be equal\\n\"]\n","[\"stdout\",\"# custom functions\\n\"]\n","[\"stdout\",\"ok 10 should be equal\\n\"]\n","[\"stdout\",\"ok 11 should be equal\\n\"]\n","[\"stdout\",\"# integration\\n\"]\n","[\"stdout\",\"ok 12 should be equal\\n\"]\n","[\"stdout\",\"\\n\"]\n","[\"stdout\",\"1..12\\n\"]\n","[\"stdout\",\"# tests 12\\n\"]\n","[\"stdout\",\"# pass 12\\n\"]\n","[\"stdout\",\"\\n\"]\n","[\"stdout\",\"# ok\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd1b8658","key":["Colingo/valid-schema.git","f09907352b7a1033576af266fc4793ac11508702.1356048433579"],"value":{"_id":"ccc87f2e39902598d0895524bd1b8658","_rev":"1-70d116718dcfb30e16434f0eafe7ab75","type":"test","time":1356048547322,"commit":{"id":"f09907352b7a1033576af266fc4793ac11508702.1356048433579","dir":"/tmp/ci/work/f09907352b7a1033576af266fc4793ac11508702.1356048433579","repo":"Colingo/valid-schema.git","hash":"f09907352b7a1033576af266fc4793ac11508702","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","17","nightly"],"chrome":["22","23","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1356048433734.9429d555","browser":"opera/12.0","output":["[\"stdout\",\"TAP version 13\\n\"]\n","[\"stdout\",\"# error case\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\"]\n","[\"stdout\",\"# correct case\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\"]\n","[\"stdout\",\"# number schema\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\"]\n","[\"stdout\",\"# missing properties\\n\"]\n","[\"stdout\",\"ok 5 should be equal\\n\"]\n","[\"stdout\",\"# enum case\\n\"]\n","[\"stdout\",\"ok 6 should be equal\\n\"]\n","[\"stdout\",\"ok 7 should be equal\\n\"]\n","[\"stdout\",\"# nested schemas\\n\"]\n","[\"stdout\",\"ok 8 should be equal\\n\"]\n","[\"stdout\",\"ok 9 should be equal\\n\"]\n","[\"stdout\",\"# custom functions\\n\"]\n","[\"stdout\",\"ok 10 should be equal\\n\"]\n","[\"stdout\",\"ok 11 should be equal\\n\"]\n","[\"stdout\",\"# integration\\n\"]\n","[\"stdout\",\"ok 12 should be equal\\n\"]\n","[\"stdout\",\"\\n\"]\n","[\"stdout\",\"1..12\\n\"]\n","[\"stdout\",\"# tests 12\\n\"]\n","[\"stdout\",\"# pass 12\\n\"]\n","[\"stdout\",\"\\n\"]\n","[\"stdout\",\"# ok\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd1b8265","key":["Colingo/valid-schema.git","f09907352b7a1033576af266fc4793ac11508702.1356048433579"],"value":{"_id":"ccc87f2e39902598d0895524bd1b8265","_rev":"1-8c6fd3092656d3d1166f5ff2951e73fa","type":"test","time":1356048546308,"commit":{"id":"f09907352b7a1033576af266fc4793ac11508702.1356048433579","dir":"/tmp/ci/work/f09907352b7a1033576af266fc4793ac11508702.1356048433579","repo":"Colingo/valid-schema.git","hash":"f09907352b7a1033576af266fc4793ac11508702","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","17","nightly"],"chrome":["22","23","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1356048433734.9429d555","browser":"chrome/canary","output":["[\"stdout\",\"TAP version 13\\n\"]\n","[\"stdout\",\"# error case\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\"]\n","[\"stdout\",\"# correct case\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\"]\n","[\"stdout\",\"# number schema\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\"]\n","[\"stdout\",\"# missing properties\\n\"]\n","[\"stdout\",\"ok 5 should be equal\\n\"]\n","[\"stdout\",\"# enum case\\n\"]\n","[\"stdout\",\"ok 6 should be equal\\n\"]\n","[\"stdout\",\"ok 7 should be equal\\n\"]\n","[\"stdout\",\"# nested schemas\\n\"]\n","[\"stdout\",\"ok 8 should be equal\\n\"]\n","[\"stdout\",\"ok 9 should be equal\\n\"]\n","[\"stdout\",\"# custom functions\\n\"]\n","[\"stdout\",\"ok 10 should be equal\\n\"]\n","[\"stdout\",\"ok 11 should be equal\\n\"]\n","[\"stdout\",\"# integration\\n\"]\n","[\"stdout\",\"ok 12 should be equal\\n\"]\n","[\"stdout\",\"\\n\"]\n","[\"stdout\",\"1..12\\n\"]\n","[\"stdout\",\"# tests 12\\n\"]\n","[\"stdout\",\"# pass 12\\n\"]\n","[\"stdout\",\"\\n\"]\n","[\"stdout\",\"# ok\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd1b771d","key":["Colingo/valid-schema.git","f09907352b7a1033576af266fc4793ac11508702.1356048433579"],"value":{"_id":"ccc87f2e39902598d0895524bd1b771d","_rev":"1-3e73f8f39e4a41746f3940a89df13dbb","type":"test","time":1356048514966,"commit":{"id":"f09907352b7a1033576af266fc4793ac11508702.1356048433579","dir":"/tmp/ci/work/f09907352b7a1033576af266fc4793ac11508702.1356048433579","repo":"Colingo/valid-schema.git","hash":"f09907352b7a1033576af266fc4793ac11508702","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","17","nightly"],"chrome":["22","23","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1356048433734.9429d555","browser":"chrome/22.0","output":["[\"stdout\",\"TAP version 13\\n\"]\n","[\"stdout\",\"# error case\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\"]\n","[\"stdout\",\"# correct case\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\"]\n","[\"stdout\",\"# number schema\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\"]\n","[\"stdout\",\"# missing properties\\n\"]\n","[\"stdout\",\"ok 5 should be equal\\n\"]\n","[\"stdout\",\"# enum case\\n\"]\n","[\"stdout\",\"ok 6 should be equal\\n\"]\n","[\"stdout\",\"ok 7 should be equal\\n\"]\n","[\"stdout\",\"# nested schemas\\n\"]\n","[\"stdout\",\"ok 8 should be equal\\n\"]\n","[\"stdout\",\"ok 9 should be equal\\n\"]\n","[\"stdout\",\"# custom functions\\n\"]\n","[\"stdout\",\"ok 10 should be equal\\n\"]\n","[\"stdout\",\"ok 11 should be equal\\n\"]\n","[\"stdout\",\"# integration\\n\"]\n","[\"stdout\",\"ok 12 should be equal\\n\"]\n","[\"stdout\",\"\\n\"]\n","[\"stdout\",\"1..12\\n\"]\n","[\"stdout\",\"# tests 12\\n\"]\n","[\"stdout\",\"# pass 12\\n\"]\n","[\"stdout\",\"\\n\"]\n","[\"stdout\",\"# ok\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd1b7133","key":["Colingo/valid-schema.git","f09907352b7a1033576af266fc4793ac11508702.1356048433579"],"value":{"_id":"ccc87f2e39902598d0895524bd1b7133","_rev":"1-55c5f47e59105c7775284f68f67b6d2c","type":"test","time":1356048513933,"commit":{"id":"f09907352b7a1033576af266fc4793ac11508702.1356048433579","dir":"/tmp/ci/work/f09907352b7a1033576af266fc4793ac11508702.1356048433579","repo":"Colingo/valid-schema.git","hash":"f09907352b7a1033576af266fc4793ac11508702","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","17","nightly"],"chrome":["22","23","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1356048433734.9429d555","browser":"firefox/nightly","output":["[\"stdout\",\"TAP version 13\\n\"]\n","[\"stdout\",\"# error case\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\"]\n","[\"stdout\",\"# correct case\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\"]\n","[\"stdout\",\"# number schema\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\"]\n","[\"stdout\",\"# missing properties\\n\"]\n","[\"stdout\",\"ok 5 should be equal\\n\"]\n","[\"stdout\",\"# enum case\\n\"]\n","[\"stdout\",\"ok 6 should be equal\\n\"]\n","[\"stdout\",\"ok 7 should be equal\\n\"]\n","[\"stdout\",\"# nested schemas\\n\"]\n","[\"stdout\",\"ok 8 should be equal\\n\"]\n","[\"stdout\",\"ok 9 should be equal\\n\"]\n","[\"stdout\",\"# custom functions\\n\"]\n","[\"stdout\",\"ok 10 should be equal\\n\"]\n","[\"stdout\",\"ok 11 should be equal\\n\"]\n","[\"stdout\",\"# integration\\n\"]\n","[\"stdout\",\"ok 12 should be equal\\n\"]\n","[\"stdout\",\"\\n\"]\n","[\"stdout\",\"1..12\\n\"]\n","[\"stdout\",\"# tests 12\\n\"]\n","[\"stdout\",\"# pass 12\\n\"]\n","[\"stdout\",\"\\n\"]\n","[\"stdout\",\"# ok\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd1b66b4","key":["Colingo/valid-schema.git","f09907352b7a1033576af266fc4793ac11508702.1356048433579"],"value":{"_id":"ccc87f2e39902598d0895524bd1b66b4","_rev":"1-9153ed55ee3ca36b262823fe946df2ca","type":"test","time":1356048484180,"commit":{"id":"f09907352b7a1033576af266fc4793ac11508702.1356048433579","dir":"/tmp/ci/work/f09907352b7a1033576af266fc4793ac11508702.1356048433579","repo":"Colingo/valid-schema.git","hash":"f09907352b7a1033576af266fc4793ac11508702","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","17","nightly"],"chrome":["22","23","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1356048433734.9429d555","browser":"firefox/17.0","output":["[\"stdout\",\"TAP version 13\\n\"]\n","[\"stdout\",\"# error case\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\"]\n","[\"stdout\",\"# correct case\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\"]\n","[\"stdout\",\"# number schema\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\"]\n","[\"stdout\",\"# missing properties\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd1b5836","key":["Colingo/valid-schema.git","f09907352b7a1033576af266fc4793ac11508702.1356048433579"],"value":{"_id":"ccc87f2e39902598d0895524bd1b5836","_rev":"1-ddf6706ef372840b57f307c49918c116","type":"test","time":1356048483183,"commit":{"id":"f09907352b7a1033576af266fc4793ac11508702.1356048433579","dir":"/tmp/ci/work/f09907352b7a1033576af266fc4793ac11508702.1356048433579","repo":"Colingo/valid-schema.git","hash":"f09907352b7a1033576af266fc4793ac11508702","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","17","nightly"],"chrome":["22","23","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1356048433734.9429d555","browser":"firefox/15.0","output":["[\"stdout\",\"TAP version 13\\n\"]\n","[\"stdout\",\"# error case\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\"]\n","[\"stdout\",\"# correct case\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\"]\n","[\"stdout\",\"# number schema\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\"]\n","[\"stdout\",\"# missing properties\\n\"]\n","[\"stdout\",\"ok 5 should be equal\\n\"]\n","[\"stdout\",\"# enum case\\n\"]\n","[\"stdout\",\"ok 6 should be equal\\n\"]\n","[\"stdout\",\"ok 7 should be equal\\n\"]\n","[\"stdout\",\"# nested schemas\\n\"]\n","[\"stdout\",\"ok 8 should be equal\\n\"]\n","[\"stdout\",\"ok 9 should be equal\\n\"]\n","[\"stdout\",\"# custom functions\\n\"]\n","[\"stdout\",\"ok 10 should be equal\\n\"]\n","[\"stdout\",\"ok 11 should be equal\\n\"]\n","[\"stdout\",\"# integration\\n\"]\n","[\"stdout\",\"ok 12 should be equal\\n\"]\n","[\"stdout\",\"\\n\"]\n","[\"stdout\",\"1..12\\n\"]\n","[\"stdout\",\"# tests 12\\n\"]\n","[\"stdout\",\"# pass 12\\n\"]\n","[\"stdout\",\"\\n\"]\n","[\"stdout\",\"# ok\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd1b565f","key":["Colingo/valid-schema.git","f09907352b7a1033576af266fc4793ac11508702.1356048433579"],"value":{"_id":"ccc87f2e39902598d0895524bd1b565f","_rev":"1-e0ae75a3c5b33c5666308e0d3add0c79","type":"test","time":1356048482334,"commit":{"id":"f09907352b7a1033576af266fc4793ac11508702.1356048433579","dir":"/tmp/ci/work/f09907352b7a1033576af266fc4793ac11508702.1356048433579","repo":"Colingo/valid-schema.git","hash":"f09907352b7a1033576af266fc4793ac11508702","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","17","nightly"],"chrome":["22","23","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1356048433734.9429d555","browser":"iexplore/9.0","output":["[\"stdout\",\"TAP version 13\\n\"]\n","[\"stdout\",\"# error case\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\"]\n","[\"stdout\",\"# correct case\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\"]\n","[\"stdout\",\"# number schema\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\"]\n","[\"stdout\",\"# missing properties\\n\"]\n","[\"stdout\",\"ok 5 should be equal\\n\"]\n","[\"stdout\",\"# enum case\\n\"]\n","[\"stdout\",\"ok 6 should be equal\\n\"]\n","[\"stdout\",\"ok 7 should be equal\\n\"]\n","[\"stdout\",\"# nested schemas\\n\"]\n","[\"stdout\",\"ok 8 should be equal\\n\"]\n","[\"stdout\",\"ok 9 should be equal\\n\"]\n","[\"stdout\",\"# custom functions\\n\"]\n","[\"stdout\",\"ok 10 should be equal\\n\"]\n","[\"stdout\",\"ok 11 should be equal\\n\"]\n","[\"stdout\",\"# integration\\n\"]\n","[\"stdout\",\"ok 12 should be equal\\n\"]\n","[\"stdout\",\"\\n\"]\n","[\"stdout\",\"1..12\\n\"]\n","[\"stdout\",\"# tests 12\\n\"]\n","[\"stdout\",\"# pass 12\\n\"]\n","[\"stdout\",\"\\n\"]\n","[\"stdout\",\"# ok\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd1b5620","key":["Colingo/valid-schema.git","f09907352b7a1033576af266fc4793ac11508702.1356048433579"],"value":{"_id":"ccc87f2e39902598d0895524bd1b5620","_rev":"1-ab43bab51d94ce0652705197038e6d7e","type":"test","time":1356048477741,"commit":{"id":"f09907352b7a1033576af266fc4793ac11508702.1356048433579","dir":"/tmp/ci/work/f09907352b7a1033576af266fc4793ac11508702.1356048433579","repo":"Colingo/valid-schema.git","hash":"f09907352b7a1033576af266fc4793ac11508702","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","17","nightly"],"chrome":["22","23","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1356048433734.9429d555","browser":"iexplore/8.0","output":["[\"stdout\",\"TAP version 13\\n\"]\n","[\"stdout\",\"# error case\\n\"]\n","[\"stdout\",\"not ok 1 TypeError: Object doesn't support this property or method\\n\"]\n","[\"stdout\",\" ---\\n\"]\n","[\"stdout\",\" operator: error\\n\"]\n","[\"stdout\",\" expected:\\n\"]\n","[\"stdout\",\" undefined\\n\"]\n","[\"stdout\",\" actual:\\n\"]\n","[\"stdout\",\" {\\\"message\\\":\\\"Object doesn't support this property or method\\\",\\\"number\\\":-2146827850,\\\"description\\\":\\\"Object doesn't support this property or method\\\"}\\n\"]\n","[\"stdout\",\" ...\\n\"]\n","[\"stdout\",\"# correct case\\n\"]\n","[\"stdout\",\"not ok 2 TypeError: Object doesn't support this property or method\\n\"]\n","[\"stdout\",\" ---\\n\"]\n","[\"stdout\",\" operator: error\\n\"]\n","[\"stdout\",\" expected:\\n\"]\n","[\"stdout\",\" undefined\\n\"]\n","[\"stdout\",\" actual:\\n\"]\n","[\"stdout\",\" {\\\"message\\\":\\\"Object doesn't support this property or method\\\",\\\"number\\\":-2146827850,\\\"description\\\":\\\"Object doesn't support this property or method\\\"}\\n\"]\n","[\"stdout\",\" ...\\n\"]\n","[\"stdout\",\"# number schema\\n\"]\n","[\"stdout\",\"not ok 3 TypeError: Object doesn't support this property or method\\n\"]\n","[\"stdout\",\" ---\\n\"]\n","[\"stdout\",\" operator: error\\n\"]\n","[\"stdout\",\" expected:\\n\"]\n","[\"stdout\",\" undefined\\n\"]\n","[\"stdout\",\" actual:\\n\"]\n","[\"stdout\",\" {\\\"message\\\":\\\"Object doesn't support this property or method\\\",\\\"number\\\":-2146827850,\\\"description\\\":\\\"Object doesn't support this property or method\\\"}\\n\"]\n","[\"stdout\",\" ...\\n\"]\n","[\"stdout\",\"# missing properties\\n\"]\n","[\"stdout\",\"not ok 4 TypeError: Object doesn't support this property or method\\n\"]\n","[\"stdout\",\" ---\\n\"]\n","[\"stdout\",\" operator: error\\n\"]\n","[\"stdout\",\" expected:\\n\"]\n","[\"stdout\",\" undefined\\n\"]\n","[\"stdout\",\" actual:\\n\"]\n","[\"stdout\",\" {\\\"message\\\":\\\"Object doesn't support this property or method\\\",\\\"number\\\":-2146827850,\\\"description\\\":\\\"Object doesn't support this property or method\\\"}\\n\"]\n","[\"stdout\",\" ...\\n\"]\n","[\"stdout\",\"# enum case\\n\"]\n","[\"stdout\",\"not ok 5 TypeError: Object doesn't support this property or method\\n\"]\n","[\"stdout\",\" ---\\n\"]\n","[\"stdout\",\" operator: error\\n\"]\n","[\"stdout\",\" expected:\\n\"]\n","[\"stdout\",\" undefined\\n\"]\n","[\"stdout\",\" actual:\\n\"]\n","[\"stdout\",\" {\\\"message\\\":\\\"Object doesn't support this property or method\\\",\\\"number\\\":-2146827850,\\\"description\\\":\\\"Object doesn't support this property or method\\\"}\\n\"]\n","[\"stdout\",\" ...\\n\"]\n","[\"stdout\",\"# nested schemas\\n\"]\n","[\"stdout\",\"not ok 6 TypeError: Object doesn't support this property or method\\n\"]\n","[\"stdout\",\" ---\\n\"]\n","[\"stdout\",\" operator: error\\n\"]\n","[\"stdout\",\" expected:\\n\"]\n","[\"stdout\",\" undefined\\n\"]\n","[\"stdout\",\" actual:\\n\"]\n","[\"stdout\",\" {\\\"message\\\":\\\"Object doesn't support this property or method\\\",\\\"number\\\":-2146827850,\\\"description\\\":\\\"Object doesn't support this property or method\\\"}\\n\"]\n","[\"stdout\",\" ...\\n\"]\n","[\"stdout\",\"# custom functions\\n\"]\n","[\"stdout\",\"not ok 7 TypeError: Object doesn't support this property or method\\n\"]\n","[\"stdout\",\" ---\\n\"]\n","[\"stdout\",\" operator: error\\n\"]\n","[\"stdout\",\" expected:\\n\"]\n","[\"stdout\",\" undefined\\n\"]\n","[\"stdout\",\" actual:\\n\"]\n","[\"stdout\",\" {\\\"message\\\":\\\"Object doesn't support this property or method\\\",\\\"number\\\":-2146827850,\\\"description\\\":\\\"Object doesn't support this property or method\\\"}\\n\"]\n","[\"stdout\",\" ...\\n\"]\n","[\"stdout\",\"# integration\\n\"]\n","[\"stdout\",\"not ok 8 TypeError: Object doesn't support this property or method\\n\"]\n","[\"stdout\",\" ---\\n\"]\n","[\"stdout\",\" operator: error\\n\"]\n","[\"stdout\",\" expected:\\n\"]\n","[\"stdout\",\" undefined\\n\"]\n","[\"stdout\",\" actual:\\n\"]\n","[\"stdout\",\" {\\\"message\\\":\\\"Object doesn't support this property or method\\\",\\\"number\\\":-2146827850,\\\"description\\\":\\\"Object doesn't support this property or method\\\"}\\n\"]\n","[\"stdout\",\" ...\\n\"]\n","[\"stdout\",\"\\n\"]\n","[\"stdout\",\"1..8\\n\"]\n","[\"stdout\",\"# tests 8\\n\"]\n","[\"stdout\",\"# pass 0\\n\"]\n","[\"stdout\",\"# fail 8\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd1b534d","key":["Colingo/valid-schema.git","f09907352b7a1033576af266fc4793ac11508702.1356048433579"],"value":{"_id":"ccc87f2e39902598d0895524bd1b534d","_rev":"1-68e03cb7f611022d1f357e0e88331bd7","type":"bundle","time":1356048433735,"id":"1356048433734.9429d555","commit":{"id":"f09907352b7a1033576af266fc4793ac11508702.1356048433579","dir":"/tmp/ci/work/f09907352b7a1033576af266fc4793ac11508702.1356048433579","repo":"Colingo/valid-schema.git","hash":"f09907352b7a1033576af266fc4793ac11508702","branch":"master"},"output":["npm"," http ","GET https://registry.npmjs.org/to-array\n","npm http"," GET https://registry.npmjs.org/browserify\n","npm http"," GET https://registry.npmjs.org/tape\n","npm ","http GET https://registry.npmjs.org/testem\n","npm http ","304 https://registry.npmjs.org/tape\n","npm http"," 304 https://registry.npmjs.org/browserify\n","npm ","http 304 https://registry.npmjs.org/to-array\n","npm ","http 304 https://registry.npmjs.org/testem\n","npm"," ","http"," ","GET"," https://registry.npmjs.org/jsonify\n","npm"," ","http"," ","GET"," https://registry.npmjs.org/deep-equal\n","npm"," ","http"," ","GET"," https://registry.npmjs.org/defined\n","npm ","http GET https://registry.npmjs.org/detective\n","npm ","http GET https://registry.npmjs.org/buffer-browserify\n","npm http"," GET https://registry.npmjs.org/deputy\n","npm ","http GET https://registry.npmjs.org/syntax-error\n","npm ","http GET https://registry.npmjs.org/resolve\n","npm ","http GET"," https://registry.npmjs.org/commondir\n","npm ","http GET https://registry.npmjs.org/nub\n","npm ","http GET https://registry.npmjs.org/coffee-script\n","npm ","http GET https://registry.npmjs.org/optimist\n","npm ","http GET https://registry.npmjs.org/vm-browserify\n","npm http GET"," https://registry.npmjs.org/http-browserify\n","npm"," http"," GET https://registry.npmjs.org/crypto-browserify\n","npm"," http GET https://registry.npmjs.org/express/2.5.10\n","npm ","http GET https://registry.npmjs.org/mustache/0.4.0\n","npm"," http GET https://registry.npmjs.org/winston/0.3.4\n","npm"," ","http"," GET https://registry.npmjs.org/socket.io/0.9.10\n","npm ","http GET https://registry.npmjs.org/commander\n","npm http"," GET https://registry.npmjs.org/charm/0.0.5\n","npm http"," GET https://registry.npmjs.org/js-yaml/0.3.5\n","npm http"," GET https://registry.npmjs.org/glob/3.0.1\n","npm http"," GET https://registry.npmjs.org/async/0.1.15\n","npm ","http"," ","GET https://registry.npmjs.org/rimraf\n","npm http"," GET https://registry.npmjs.org/underscore\n","npm ","http GET https://registry.npmjs.org/backbone\n","npm ","http GET"," https://registry.npmjs.org/styled_string\n","npm http"," GET https://registry.npmjs.org/colors\n","npm ","http GET https://registry.npmjs.org/fireworm\n","npm http"," 304 https://registry.npmjs.org/jsonify\n","npm ","http 304 https://registry.npmjs.org/defined\n","npm"," http 304 https://registry.npmjs.org/deep-equal\n","npm http ","304 https://registry.npmjs.org/buffer-browserify\n","npm http"," 304 https://registry.npmjs.org/detective\n","npm http 304"," https://registry.npmjs.org/deputy\n","npm ","http 304 https://registry.npmjs.org/syntax-error\n","npm http"," 304 https://registry.npmjs.org/resolve\n","npm http 304"," https://registry.npmjs.org/commondir\n","npm http"," 304 https://registry.npmjs.org/nub\n","npm http"," 304 https://registry.npmjs.org/coffee-script\n","npm http"," 304 https://registry.npmjs.org/optimist\n","npm ","http 304 https://registry.npmjs.org/vm-browserify\n","npm http 304"," https://registry.npmjs.org/http-browserify\n","npm ","http 304 https://registry.npmjs.org/crypto-browserify\n","npm http ","304 https://registry.npmjs.org/express/2.5.10\n","npm http ","GET https://registry.npmjs.org/mkdirp\n","npm ","http GET https://registry.npmjs.org/esprima\n","npm ","http GET https://registry.npmjs.org/concat-stream/0.0.8\n","npm"," http GET https://registry.npmjs.org/base64-js/0.0.2\n","npm http"," GET"," https://registry.npmjs.org/wordwrap\n","npm http ","304 https://registry.npmjs.org/winston/0.3.4\n","npm ","http 304 https://registry.npmjs.org/mustache/0.4.0\n","npm ","WARN package.json mustache@0.4.0 No README.md file found!\n","npm ","http 304 https://registry.npmjs.org/socket.io/0.9.10\n","npm http"," 304 https://registry.npmjs.org/commander\n","npm ","http 304 https://registry.npmjs.org/async/0.1.15\n","npm ","http 304 https://registry.npmjs.org/rimraf\n","npm ","http 304 https://registry.npmjs.org/underscore\n","npm ","http 304 https://registry.npmjs.org/backbone\n","npm ","http 304 https://registry.npmjs.org/styled_string\n","npm ","http 304 https://registry.npmjs.org/colors\n","npm"," http 304 https://registry.npmjs.org/fireworm\n","npm ","http 304 https://registry.npmjs.org/mkdirp\n","npm ","http 304 https://registry.npmjs.org/charm/0.0.5\n","npm ","http 304 https://registry.npmjs.org/glob/3.0.1\n","npm"," http 304 https://registry.npmjs.org/js-yaml/0.3.5\n","npm"," http 304 https://registry.npmjs.org/wordwrap\n","npm"," http 304 https://registry.npmjs.org/base64-js/0.0.2\n","npm ","http 304 https://registry.npmjs.org/concat-stream/0.0.8\n","npm http"," 304 https://registry.npmjs.org/esprima\n","npm ","http GET https://registry.npmjs.org/graceful-fs\n","npm http"," GET https://registry.npmjs.org/async\n","npm ","http GET https://registry.npmjs.org/fast-list\nnpm http GET https://registry.npmjs.org/keypress\nnpm http GET https://registry.npmjs.org/mime/1.2.4\n","npm http"," GET https://registry.npmjs.org/connect\n","npm ","http GET https://registry.npmjs.org/policyfile/0.0.4\n","npm"," http GET https://registry.npmjs.org/minimatch\n","npm ","http GET https://registry.npmjs.org/graceful-fs\n","npm http"," GET https://registry.npmjs.org/set\n","npm http"," GET https://registry.npmjs.org/socket.io-client/0.9.10\n","npm http"," GET https://registry.npmjs.org/minimatch\n","npm"," http GET https://registry.npmjs.org/qs\n","npm ","http GET https://registry.npmjs.org/redis/0.7.2\n","npm http"," GET https://registry.npmjs.org/inherits\n","npm http"," GET https://registry.npmjs.org/mkdirp/0.3.0\n","npm ","http GET https://registry.npmjs.org/eyes\n","npm http"," GET https://registry.npmjs.org/loggly\n","npm ","http GET https://registry.npmjs.org/pkginfo\n","npm http ","304 https://registry.npmjs.org/graceful-fs\n","npm http"," 304 https://registry.npmjs.org/fast-list\n","npm http"," 304 https://registry.npmjs.org/mime/1.2.4\n","npm ","http 304 https://registry.npmjs.org/keypress\n","npm http ","304 https://registry.npmjs.org/connect\n","npm ","WARN package.json connect@1.9.2 No README.md file found!\n","npm http"," 304 https://registry.npmjs.org/minimatch\n","npm ","http 304 https://registry.npmjs.org/policyfile/0.0.4\nnpm http 304 https://registry.npmjs.org/graceful-fs\n","npm http"," 304 https://registry.npmjs.org/set\n","npm http"," 304 https://registry.npmjs.org/socket.io-client/0.9.10\n","npm ","http 304 https://registry.npmjs.org/qs\n","npm ","http 304 https://registry.npmjs.org/minimatch\n","npm http ","304 https://registry.npmjs.org/async\n","npm http ","GET https://registry.npmjs.org/lru-cache\n","npm"," http GET https://registry.npmjs.org/sigmund\n","npm http"," 304 https://registry.npmjs.org/redis/0.7.2\n","npm http ","304 https://registry.npmjs.org/eyes\n","npm"," http 304 https://registry.npmjs.org/mkdirp/0.3.0\n","npm ","http 304 https://registry.npmjs.org/inherits\n","npm ","http GET https://registry.npmjs.org/hiredis\n","npm ","http 304 https://registry.npmjs.org/pkginfo\n","npm ","http 304 https://registry.npmjs.org/loggly\n","npm http"," GET https://registry.npmjs.org/lru-cache\n","npm http"," GET https://registry.npmjs.org/timespan\n","npm http"," GET https://registry.npmjs.org/request\n","npm http"," GET https://registry.npmjs.org/formidable\n","npm ","http 304 https://registry.npmjs.org/lru-cache\n","npm ","http 304 https://registry.npmjs.org/sigmund\n","npm http"," GET https://registry.npmjs.org/uglify-js/1.2.5\n","npm ","http GET https://registry.npmjs.org/active-x-obfuscator/0.0.1\n","npm"," ","http"," GET"," https://registry.npmjs.org/xmlhttprequest/1.4.2\n","npm ","http GET https://registry.npmjs.org/ws\n","npm http"," 304 https://registry.npmjs.org/formidable\n","npm ","http 304 https://registry.npmjs.org/request\n","npm http"," 304 https://registry.npmjs.org/uglify-js/1.2.5\n","npm ","http 304 https://registry.npmjs.org/active-x-obfuscator/0.0.1\n","npm http 304"," https://registry.npmjs.org/ws\n","npm ","http ","304"," https://registry.npmjs.org/xmlhttprequest/1.4.2\n","npm"," ","http"," ","GET"," https://registry.npmjs.org/zeparser/0.0.5\n","npm"," ","http"," ","GET"," https://registry.npmjs.org/commander\n","npm"," ","http"," ","GET"," https://registry.npmjs.org/tinycolor\n","npm"," ","http"," ","GET"," https://registry.npmjs.org/options\n","npm http 304"," https://registry.npmjs.org/hiredis\n","npm ","WARN package.json hiredis@0.1.14 No README.md file found!\n","\n> hiredis@0.1.14 preinstall /tmp/ci/work/f09907352b7a1033576af266fc4793ac11508702.1356048433579/node_modules/testem/node_modules/socket.io/node_modules/redis/node_modules/hiredis\n> make || gmake\n\n","cd deps/hiredis && make static\n","make[1]: Entering directory `/tmp/ci/work/f09907352b7a1033576af266fc4793ac11508702.1356048433579/node_modules/testem/node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis'\ncc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb net.c\n","npm ","http 304 https://registry.npmjs.org/timespan\n","npm http"," 304 https://registry.npmjs.org/lru-cache\n","cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb hiredis.c\n","npm http 304 https://registry.npmjs.org/tinycolor\n","npm http ","304 https://registry.npmjs.org/options\n","cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb sds.c\n","cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb async.c\n","ar rcs libhiredis.a net.o hiredis.o sds.o async.o\n","make[1]: Leaving directory `/tmp/ci/work/f09907352b7a1033576af266fc4793ac11508702.1356048433579/node_modules/testem/node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis'\n","node-waf configure build\n","Traceback (most recent call last):\n File \"/home/testling/installs/node-v0.8.15/bin/node-waf\", line 14, in \n import Scripting\n File \"/home/testling/installs/node-v0.8.15/bin/../lib/node/wafadmin/Scripting.py\", line 146\n except Utils.WafError, e:\n ^\nSyntaxError: invalid syntax\n","make: *** [all] Error 1\n","cd deps/hiredis && gmake static\n","gmake[1]: Entering directory `/tmp/ci/work/f09907352b7a1033576af266fc4793ac11508702.1356048433579/node_modules/testem/node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis'\ngmake[1]: Nothing to be done for `static'.\ngmake[1]: Leaving directory `/tmp/ci/work/f09907352b7a1033576af266fc4793ac11508702.1356048433579/node_modules/testem/node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis'\n","node-waf configure build\n","Traceback (most recent call last):\n File \"/home/testling/installs/node-v0.8.15/bin/node-waf\", line 14, in \n import Scripting\n File \"/home/testling/installs/node-v0.8.15/bin/../lib/node/wafadmin/Scripting.py\", line 146\n except Utils.WafError, e:\n ^\nSyntaxError: invalid syntax\n","gmake: *** [all] Error 1\n","npm ","WARN optional dep failed, continuing hiredis@0.1.14\n","npm http 304 https://registry.npmjs.org/zeparser/0.0.5\n","npm http 304"," https://registry.npmjs.org/commander\n","\n> ws@0.4.25 install /tmp/ci/work/f09907352b7a1033576af266fc4793ac11508702.1356048433579/node_modules/testem/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws\n> (node-gyp rebuild 2> builderror.log) || (exit 0)\n\n","to-array@0.1.3 node_modules/to-array\n\ntape@0.1.3 node_modules/tape\n├── deep-equal@0.0.0\n├── defined@0.0.0\n└── jsonify@0.0.0\n\nbrowserify@1.16.6 node_modules/browserify\n├── nub@0.0.0\n├── commondir@0.0.1\n├── vm-browserify@0.0.1\n├── crypto-browserify@0.1.2\n├── resolve@0.2.3\n├── coffee-script@1.4.0\n├── deputy@0.0.4 (mkdirp@0.3.4)\n├── http-browserify@0.1.6 (concat-stream@0.0.8)\n├── buffer-browserify@0.0.4 (base64-js@0.0.2)\n├── optimist@0.3.5 (wordwrap@0.0.2)\n├── detective@0.2.1 (esprima@0.9.9)\n└── syntax-error@0.0.0 (esprima@0.9.9)\n\ntestem@0.2.50 node_modules/testem\n├── styled_string@0.0.1\n├── mustache@0.4.0\n├── colors@0.6.0-1\n├── charm@0.0.5\n├── backbone@0.9.9\n├── async@0.1.15\n├── underscore@1.4.3\n├── js-yaml@0.3.5\n├── rimraf@2.1.0 (graceful-fs@1.1.14)\n├── commander@1.1.1 (keypress@0.1.0)\n├── fireworm@0.0.8 (set@1.0.0, async@0.1.22, minimatch@0.2.9)\n├── express@2.5.10 (qs@0.4.2, mkdirp@0.3.0, mime@1.2.4, connect@1.9.2)\n├── glob@3.0.1 (graceful-fs@1.1.14, fast-list@1.0.2, inherits@1.0.0, minimatch@0.1.5)\n├── winston@0.3.4 (eyes@0.1.8, pkginfo@0.2.3, loggly@0.3.11)\n└── socket.io@0.9.10 (policyfile@0.0.4, redis@0.7.2, socket.io-client@0.9.10)\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd1b4ce5","key":["Colingo/valid-schema.git","e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541"],"value":{"_id":"ccc87f2e39902598d0895524bd1b4ce5","_rev":"1-e88a0bc701698b2124220382d1c0a76b","type":"test","time":1356048464367,"commit":{"id":"e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541","dir":"/tmp/ci/work/e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541","repo":"Colingo/valid-schema.git","hash":"e15e5caff584f54e10646b53b3bb16de4308d8e7","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","17","nightly"],"chrome":["22","23","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1356048400670.59fcea8f","browser":"safari/5.1","output":["[\"stdout\",\"TAP version 13\\n\"]\n","[\"stdout\",\"# error case\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\"]\n","[\"stdout\",\"# correct case\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\"]\n","[\"stdout\",\"# number schema\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\"]\n","[\"stdout\",\"# missing properties\\n\"]\n","[\"stdout\",\"ok 5 should be equal\\n\"]\n","[\"stdout\",\"# enum case\\n\"]\n","[\"stdout\",\"ok 6 should be equal\\n\"]\n","[\"stdout\",\"ok 7 should be equal\\n\"]\n","[\"stdout\",\"# nested schemas\\n\"]\n","[\"stdout\",\"ok 8 should be equal\\n\"]\n","[\"stdout\",\"ok 9 should be equal\\n\"]\n","[\"stdout\",\"# custom functions\\n\"]\n","[\"stdout\",\"ok 10 should be equal\\n\"]\n","[\"stdout\",\"ok 11 should be equal\\n\"]\n","[\"stdout\",\"# integration\\n\"]\n","[\"stdout\",\"ok 12 should be equal\\n\"]\n","[\"stdout\",\"\\n\"]\n","[\"stdout\",\"1..12\\n\"]\n","[\"stdout\",\"# tests 12\\n\"]\n","[\"stdout\",\"# pass 12\\n\"]\n","[\"stdout\",\"\\n\"]\n","[\"stdout\",\"# ok\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd1b3d3b","key":["Colingo/valid-schema.git","e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541"],"value":{"_id":"ccc87f2e39902598d0895524bd1b3d3b","_rev":"1-1593c1bbcf93847eef3c664e11a4c5cc","type":"test","time":1356048463057,"commit":{"id":"e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541","dir":"/tmp/ci/work/e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541","repo":"Colingo/valid-schema.git","hash":"e15e5caff584f54e10646b53b3bb16de4308d8e7","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","17","nightly"],"chrome":["22","23","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1356048400670.59fcea8f","browser":"opera/12.0","output":["[\"stdout\",\"TAP version 13\\n\"]\n","[\"stdout\",\"# error case\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\"]\n","[\"stdout\",\"# correct case\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\"]\n","[\"stdout\",\"# number schema\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\"]\n","[\"stdout\",\"# missing properties\\n\"]\n","[\"stdout\",\"ok 5 should be equal\\n\"]\n","[\"stdout\",\"# enum case\\n\"]\n","[\"stdout\",\"ok 6 should be equal\\n\"]\n","[\"stdout\",\"ok 7 should be equal\\n\"]\n","[\"stdout\",\"# nested schemas\\n\"]\n","[\"stdout\",\"ok 8 should be equal\\n\"]\n","[\"stdout\",\"ok 9 should be equal\\n\"]\n","[\"stdout\",\"# custom functions\\n\"]\n","[\"stdout\",\"ok 10 should be equal\\n\"]\n","[\"stdout\",\"ok 11 should be equal\\n\"]\n","[\"stdout\",\"# integration\\n\"]\n","[\"stdout\",\"ok 12 should be equal\\n\"]\n","[\"stdout\",\"\\n\"]\n","[\"stdout\",\"1..12\\n\"]\n","[\"stdout\",\"# tests 12\\n\"]\n","[\"stdout\",\"# pass 12\\n\"]\n","[\"stdout\",\"\\n\"]\n","[\"stdout\",\"# ok\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd1b335b","key":["Colingo/valid-schema.git","e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541"],"value":{"_id":"ccc87f2e39902598d0895524bd1b335b","_rev":"1-55faab7d20b19d8a747928c8dbd8465b","type":"test","time":1356048460989,"commit":{"id":"e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541","dir":"/tmp/ci/work/e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541","repo":"Colingo/valid-schema.git","hash":"e15e5caff584f54e10646b53b3bb16de4308d8e7","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","17","nightly"],"chrome":["22","23","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1356048400670.59fcea8f","browser":"chrome/canary","output":["[\"stdout\",\"TAP version 13\\n\"]\n","[\"stdout\",\"# error case\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\"]\n","[\"stdout\",\"# correct case\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\"]\n","[\"stdout\",\"# number schema\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\"]\n","[\"stdout\",\"# missing properties\\n\"]\n","[\"stdout\",\"ok 5 should be equal\\n\"]\n","[\"stdout\",\"# enum case\\n\"]\n","[\"stdout\",\"ok 6 should be equal\\n\"]\n","[\"stdout\",\"ok 7 should be equal\\n\"]\n","[\"stdout\",\"# nested schemas\\n\"]\n","[\"stdout\",\"ok 8 should be equal\\n\"]\n","[\"stdout\",\"ok 9 should be equal\\n\"]\n","[\"stdout\",\"# custom functions\\n\"]\n","[\"stdout\",\"ok 10 should be equal\\n\"]\n","[\"stdout\",\"ok 11 should be equal\\n\"]\n","[\"stdout\",\"# integration\\n\"]\n","[\"stdout\",\"ok 12 should be equal\\n\"]\n","[\"stdout\",\"\\n\"]\n","[\"stdout\",\"1..12\\n\"]\n","[\"stdout\",\"# tests 12\\n\"]\n","[\"stdout\",\"# pass 12\\n\"]\n","[\"stdout\",\"\\n\"]\n","[\"stdout\",\"# ok\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd1b3287","key":["Colingo/valid-schema.git","e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541"],"value":{"_id":"ccc87f2e39902598d0895524bd1b3287","_rev":"1-c6a6ede67be18a3367f69011cb6355b8","type":"test","time":1356048458988,"commit":{"id":"e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541","dir":"/tmp/ci/work/e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541","repo":"Colingo/valid-schema.git","hash":"e15e5caff584f54e10646b53b3bb16de4308d8e7","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","17","nightly"],"chrome":["22","23","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1356048400670.59fcea8f","browser":"chrome/23.0","output":["[\"stdout\",\"TAP version 13\\n\"]\n","[\"stdout\",\"# error case\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\"]\n","[\"stdout\",\"# correct case\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\"]\n","[\"stdout\",\"# number schema\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\"]\n","[\"stdout\",\"# missing properties\\n\"]\n","[\"stdout\",\"ok 5 should be equal\\n\"]\n","[\"stdout\",\"# enum case\\n\"]\n","[\"stdout\",\"ok 6 should be equal\\n\"]\n","[\"stdout\",\"ok 7 should be equal\\n\"]\n","[\"stdout\",\"# nested schemas\\n\"]\n","[\"stdout\",\"ok 8 should be equal\\n\"]\n","[\"stdout\",\"ok 9 should be equal\\n\"]\n","[\"stdout\",\"# custom functions\\n\"]\n","[\"stdout\",\"ok 10 should be equal\\n\"]\n","[\"stdout\",\"ok 11 should be equal\\n\"]\n","[\"stdout\",\"# integration\\n\"]\n","[\"stdout\",\"ok 12 should be equal\\n\"]\n","[\"stdout\",\"\\n\"]\n","[\"stdout\",\"1..12\\n\"]\n","[\"stdout\",\"# tests 12\\n\"]\n","[\"stdout\",\"# pass 12\\n\"]\n","[\"stdout\",\"\\n\"]\n","[\"stdout\",\"# ok\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd1b2ffd","key":["Colingo/valid-schema.git","e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541"],"value":{"_id":"ccc87f2e39902598d0895524bd1b2ffd","_rev":"1-bf129b195cb4f9894809cd3e74b9ae89","type":"test","time":1356048453660,"commit":{"id":"e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541","dir":"/tmp/ci/work/e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541","repo":"Colingo/valid-schema.git","hash":"e15e5caff584f54e10646b53b3bb16de4308d8e7","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","17","nightly"],"chrome":["22","23","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1356048400670.59fcea8f","browser":"chrome/22.0","output":["[\"stdout\",\"TAP version 13\\n\"]\n","[\"stdout\",\"# error case\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\"]\n","[\"stdout\",\"# correct case\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\"]\n","[\"stdout\",\"# number schema\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\"]\n","[\"stdout\",\"# missing properties\\n\"]\n","[\"stdout\",\"ok 5 should be equal\\n\"]\n","[\"stdout\",\"# enum case\\n\"]\n","[\"stdout\",\"ok 6 should be equal\\n\"]\n","[\"stdout\",\"ok 7 should be equal\\n\"]\n","[\"stdout\",\"# nested schemas\\n\"]\n","[\"stdout\",\"ok 8 should be equal\\n\"]\n","[\"stdout\",\"ok 9 should be equal\\n\"]\n","[\"stdout\",\"# custom functions\\n\"]\n","[\"stdout\",\"ok 10 should be equal\\n\"]\n","[\"stdout\",\"ok 11 should be equal\\n\"]\n","[\"stdout\",\"# integration\\n\"]\n","[\"stdout\",\"ok 12 should be equal\\n\"]\n","[\"stdout\",\"\\n\"]\n","[\"stdout\",\"1..12\\n\"]\n","[\"stdout\",\"# tests 12\\n\"]\n","[\"stdout\",\"# pass 12\\n\"]\n","[\"stdout\",\"\\n\"]\n","[\"stdout\",\"# ok\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd1b2de4","key":["Colingo/valid-schema.git","e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541"],"value":{"_id":"ccc87f2e39902598d0895524bd1b2de4","_rev":"1-adcd8caa36d3b89df00cc23e4f42ed42","type":"test","time":1356048451312,"commit":{"id":"e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541","dir":"/tmp/ci/work/e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541","repo":"Colingo/valid-schema.git","hash":"e15e5caff584f54e10646b53b3bb16de4308d8e7","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","17","nightly"],"chrome":["22","23","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1356048400670.59fcea8f","browser":"firefox/nightly","output":["[\"stdout\",\"TAP version 13\\n\"]\n","[\"stdout\",\"# error case\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\"]\n","[\"stdout\",\"# correct case\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\"]\n","[\"stdout\",\"# number schema\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\"]\n","[\"stdout\",\"# missing properties\\n\"]\n","[\"stdout\",\"ok 5 should be equal\\n\"]\n","[\"stdout\",\"# enum case\\n\"]\n","[\"stdout\",\"ok 6 should be equal\\n\"]\n","[\"stdout\",\"ok 7 should be equal\\n\"]\n","[\"stdout\",\"# nested schemas\\n\"]\n","[\"stdout\",\"ok 8 should be equal\\n\"]\n","[\"stdout\",\"ok 9 should be equal\\n\"]\n","[\"stdout\",\"# custom functions\\n\"]\n","[\"stdout\",\"ok 10 should be equal\\n\"]\n","[\"stdout\",\"ok 11 should be equal\\n\"]\n","[\"stdout\",\"# integration\\n\"]\n","[\"stdout\",\"ok 12 should be equal\\n\"]\n","[\"stdout\",\"\\n\"]\n","[\"stdout\",\"1..12\\n\"]\n","[\"stdout\",\"# tests 12\\n\"]\n","[\"stdout\",\"# pass 12\\n\"]\n","[\"stdout\",\"\\n\"]\n","[\"stdout\",\"# ok\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd1b2a66","key":["Colingo/valid-schema.git","e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541"],"value":{"_id":"ccc87f2e39902598d0895524bd1b2a66","_rev":"1-76ef93b525cef86ae96a3d3f0c92492d","type":"test","time":1356048449466,"commit":{"id":"e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541","dir":"/tmp/ci/work/e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541","repo":"Colingo/valid-schema.git","hash":"e15e5caff584f54e10646b53b3bb16de4308d8e7","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","17","nightly"],"chrome":["22","23","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1356048400670.59fcea8f","browser":"firefox/17.0","output":["[\"stdout\",\"TAP version 13\\n\"]\n","[\"stdout\",\"# error case\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\"]\n","[\"stdout\",\"# correct case\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\"]\n","[\"stdout\",\"# number schema\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\"]\n","[\"stdout\",\"# missing properties\\n\"]\n","[\"stdout\",\"ok 5 should be equal\\n\"]\n","[\"stdout\",\"# enum case\\n\"]\n","[\"stdout\",\"ok 6 should be equal\\n\"]\n","[\"stdout\",\"ok 7 should be equal\\n\"]\n","[\"stdout\",\"# nested schemas\\n\"]\n","[\"stdout\",\"ok 8 should be equal\\n\"]\n","[\"stdout\",\"ok 9 should be equal\\n\"]\n","[\"stdout\",\"# custom functions\\n\"]\n","[\"stdout\",\"ok 10 should be equal\\n\"]\n","[\"stdout\",\"ok 11 should be equal\\n\"]\n","[\"stdout\",\"# integration\\n\"]\n","[\"stdout\",\"ok 12 should be equal\\n\"]\n","[\"stdout\",\"\\n\"]\n","[\"stdout\",\"1..12\\n\"]\n","[\"stdout\",\"# tests 12\\n\"]\n","[\"stdout\",\"# pass 12\\n\"]\n","[\"stdout\",\"\\n\"]\n","[\"stdout\",\"# ok\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd1b2861","key":["Colingo/valid-schema.git","e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541"],"value":{"_id":"ccc87f2e39902598d0895524bd1b2861","_rev":"1-1107e4e27ab2e4d8402e6e1f38c4ccc0","type":"test","time":1356048447780,"commit":{"id":"e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541","dir":"/tmp/ci/work/e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541","repo":"Colingo/valid-schema.git","hash":"e15e5caff584f54e10646b53b3bb16de4308d8e7","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","17","nightly"],"chrome":["22","23","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1356048400670.59fcea8f","browser":"firefox/15.0","output":["[\"stdout\",\"TAP version 13\\n\"]\n","[\"stdout\",\"# error case\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\"]\n","[\"stdout\",\"# correct case\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\"]\n","[\"stdout\",\"# number schema\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\"]\n","[\"stdout\",\"# missing properties\\n\"]\n","[\"stdout\",\"ok 5 should be equal\\n\"]\n","[\"stdout\",\"# enum case\\n\"]\n","[\"stdout\",\"ok 6 should be equal\\n\"]\n","[\"stdout\",\"ok 7 should be equal\\n\"]\n","[\"stdout\",\"# nested schemas\\n\"]\n","[\"stdout\",\"ok 8 should be equal\\n\"]\n","[\"stdout\",\"ok 9 should be equal\\n\"]\n","[\"stdout\",\"# custom functions\\n\"]\n","[\"stdout\",\"ok 10 should be equal\\n\"]\n","[\"stdout\",\"ok 11 should be equal\\n\"]\n","[\"stdout\",\"# integration\\n\"]\n","[\"stdout\",\"ok 12 should be equal\\n\"]\n","[\"stdout\",\"\\n\"]\n","[\"stdout\",\"1..12\\n\"]\n","[\"stdout\",\"# tests 12\\n\"]\n","[\"stdout\",\"# pass 12\\n\"]\n","[\"stdout\",\"\\n\"]\n","[\"stdout\",\"# ok\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd1b23e4","key":["Colingo/valid-schema.git","e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541"],"value":{"_id":"ccc87f2e39902598d0895524bd1b23e4","_rev":"1-00246209d3d00feb0f24b9f29221884d","type":"test","time":1356048445068,"commit":{"id":"e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541","dir":"/tmp/ci/work/e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541","repo":"Colingo/valid-schema.git","hash":"e15e5caff584f54e10646b53b3bb16de4308d8e7","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","17","nightly"],"chrome":["22","23","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1356048400670.59fcea8f","browser":"iexplore/9.0","output":["[\"stdout\",\"TAP version 13\\n\"]\n","[\"stdout\",\"# error case\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\"]\n","[\"stdout\",\"# correct case\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\"]\n","[\"stdout\",\"# number schema\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\"]\n","[\"stdout\",\"# missing properties\\n\"]\n","[\"stdout\",\"ok 5 should be equal\\n\"]\n","[\"stdout\",\"# enum case\\n\"]\n","[\"stdout\",\"ok 6 should be equal\\n\"]\n","[\"stdout\",\"ok 7 should be equal\\n\"]\n","[\"stdout\",\"# nested schemas\\n\"]\n","[\"stdout\",\"ok 8 should be equal\\n\"]\n","[\"stdout\",\"ok 9 should be equal\\n\"]\n","[\"stdout\",\"# custom functions\\n\"]\n","[\"stdout\",\"ok 10 should be equal\\n\"]\n","[\"stdout\",\"ok 11 should be equal\\n\"]\n","[\"stdout\",\"# integration\\n\"]\n","[\"stdout\",\"ok 12 should be equal\\n\"]\n","[\"stdout\",\"\\n\"]\n","[\"stdout\",\"1..12\\n\"]\n","[\"stdout\",\"# tests 12\\n\"]\n","[\"stdout\",\"# pass 12\\n\"]\n","[\"stdout\",\"\\n\"]\n","[\"stdout\",\"# ok\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd1b20bb","key":["Colingo/valid-schema.git","e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541"],"value":{"_id":"ccc87f2e39902598d0895524bd1b20bb","_rev":"1-c633100234cc2a2cf3f97877fd3efe13","type":"test","time":1356048440576,"commit":{"id":"e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541","dir":"/tmp/ci/work/e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541","repo":"Colingo/valid-schema.git","hash":"e15e5caff584f54e10646b53b3bb16de4308d8e7","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","17","nightly"],"chrome":["22","23","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1356048400670.59fcea8f","browser":"iexplore/8.0","output":["[\"stdout\",\"TAP version 13\\n\"]\n","[\"stdout\",\"# error case\\n\"]\n","[\"stdout\",\"not ok 1 TypeError: Object doesn't support this property or method\\n\"]\n","[\"stdout\",\" ---\\n\"]\n","[\"stdout\",\" operator: error\\n\"]\n","[\"stdout\",\" expected:\\n\"]\n","[\"stdout\",\" undefined\\n\"]\n","[\"stdout\",\" actual:\\n\"]\n","[\"stdout\",\" {\\\"message\\\":\\\"Object doesn't support this property or method\\\",\\\"number\\\":-2146827850,\\\"description\\\":\\\"Object doesn't support this property or method\\\"}\\n\"]\n","[\"stdout\",\" ...\\n\"]\n","[\"stdout\",\"# correct case\\n\"]\n","[\"stdout\",\"not ok 2 TypeError: Object doesn't support this property or method\\n\"]\n","[\"stdout\",\" ---\\n\"]\n","[\"stdout\",\" operator: error\\n\"]\n","[\"stdout\",\" expected:\\n\"]\n","[\"stdout\",\" undefined\\n\"]\n","[\"stdout\",\" actual:\\n\"]\n","[\"stdout\",\" {\\\"message\\\":\\\"Object doesn't support this property or method\\\",\\\"number\\\":-2146827850,\\\"description\\\":\\\"Object doesn't support this property or method\\\"}\\n\"]\n","[\"stdout\",\" ...\\n\"]\n","[\"stdout\",\"# number schema\\n\"]\n","[\"stdout\",\"not ok 3 TypeError: Object doesn't support this property or method\\n\"]\n","[\"stdout\",\" ---\\n\"]\n","[\"stdout\",\" operator: error\\n\"]\n","[\"stdout\",\" expected:\\n\"]\n","[\"stdout\",\" undefined\\n\"]\n","[\"stdout\",\" actual:\\n\"]\n","[\"stdout\",\" {\\\"message\\\":\\\"Object doesn't support this property or method\\\",\\\"number\\\":-2146827850,\\\"description\\\":\\\"Object doesn't support this property or method\\\"}\\n\"]\n","[\"stdout\",\" ...\\n\"]\n","[\"stdout\",\"# missing properties\\n\"]\n","[\"stdout\",\"not ok 4 TypeError: Object doesn't support this property or method\\n\"]\n","[\"stdout\",\" ---\\n\"]\n","[\"stdout\",\" operator: error\\n\"]\n","[\"stdout\",\" expected:\\n\"]\n","[\"stdout\",\" undefined\\n\"]\n","[\"stdout\",\" actual:\\n\"]\n","[\"stdout\",\" {\\\"message\\\":\\\"Object doesn't support this property or method\\\",\\\"number\\\":-2146827850,\\\"description\\\":\\\"Object doesn't support this property or method\\\"}\\n\"]\n","[\"stdout\",\" ...\\n\"]\n","[\"stdout\",\"# enum case\\n\"]\n","[\"stdout\",\"not ok 5 TypeError: Object doesn't support this property or method\\n\"]\n","[\"stdout\",\" ---\\n\"]\n","[\"stdout\",\" operator: error\\n\"]\n","[\"stdout\",\" expected:\\n\"]\n","[\"stdout\",\" undefined\\n\"]\n","[\"stdout\",\" actual:\\n\"]\n","[\"stdout\",\" {\\\"message\\\":\\\"Object doesn't support this property or method\\\",\\\"number\\\":-2146827850,\\\"description\\\":\\\"Object doesn't support this property or method\\\"}\\n\"]\n","[\"stdout\",\" ...\\n\"]\n","[\"stdout\",\"# nested schemas\\n\"]\n","[\"stdout\",\"not ok 6 TypeError: Object doesn't support this property or method\\n\"]\n","[\"stdout\",\" ---\\n\"]\n","[\"stdout\",\" operator: error\\n\"]\n","[\"stdout\",\" expected:\\n\"]\n","[\"stdout\",\" undefined\\n\"]\n","[\"stdout\",\" actual:\\n\"]\n","[\"stdout\",\" {\\\"message\\\":\\\"Object doesn't support this property or method\\\",\\\"number\\\":-2146827850,\\\"description\\\":\\\"Object doesn't support this property or method\\\"}\\n\"]\n","[\"stdout\",\" ...\\n\"]\n","[\"stdout\",\"# custom functions\\n\"]\n","[\"stdout\",\"not ok 7 TypeError: Object doesn't support this property or method\\n\"]\n","[\"stdout\",\" ---\\n\"]\n","[\"stdout\",\" operator: error\\n\"]\n","[\"stdout\",\" expected:\\n\"]\n","[\"stdout\",\" undefined\\n\"]\n","[\"stdout\",\" actual:\\n\"]\n","[\"stdout\",\" {\\\"message\\\":\\\"Object doesn't support this property or method\\\",\\\"number\\\":-2146827850,\\\"description\\\":\\\"Object doesn't support this property or method\\\"}\\n\"]\n","[\"stdout\",\" ...\\n\"]\n","[\"stdout\",\"# integration\\n\"]\n","[\"stdout\",\"not ok 8 TypeError: Object doesn't support this property or method\\n\"]\n","[\"stdout\",\" ---\\n\"]\n","[\"stdout\",\" operator: error\\n\"]\n","[\"stdout\",\" expected:\\n\"]\n","[\"stdout\",\" undefined\\n\"]\n","[\"stdout\",\" actual:\\n\"]\n","[\"stdout\",\" {\\\"message\\\":\\\"Object doesn't support this property or method\\\",\\\"number\\\":-2146827850,\\\"description\\\":\\\"Object doesn't support this property or method\\\"}\\n\"]\n","[\"stdout\",\" ...\\n\"]\n","[\"stdout\",\"\\n\"]\n","[\"stdout\",\"1..8\\n\"]\n","[\"stdout\",\"# tests 8\\n\"]\n","[\"stdout\",\"# pass 0\\n\"]\n","[\"stdout\",\"# fail 8\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd1b1a06","key":["Colingo/valid-schema.git","e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541"],"value":{"_id":"ccc87f2e39902598d0895524bd1b1a06","_rev":"1-e26be7bf75738693ea7588e39a056c25","type":"bundle","time":1356048400673,"id":"1356048400670.59fcea8f","commit":{"id":"e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541","dir":"/tmp/ci/work/e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541","repo":"Colingo/valid-schema.git","hash":"e15e5caff584f54e10646b53b3bb16de4308d8e7","branch":"master"},"output":["npm"," http GET https://registry.npmjs.org/to-array\n","npm ","http GET https://registry.npmjs.org/tape\n","npm"," http GET https://registry.npmjs.org/browserify\n","npm ","http GET https://registry.npmjs.org/testem\n","npm ","http 304 https://registry.npmjs.org/browserify\n","npm ","http 304 https://registry.npmjs.org/tape\n","npm ","http 304 https://registry.npmjs.org/to-array\n","npm"," http 304 https://registry.npmjs.org/testem\n","npm"," http GET https://registry.npmjs.org/jsonify\n","npm"," http GET https://registry.npmjs.org/deep-equal\n","npm ","http GET https://registry.npmjs.org/defined\n","npm ","http GET https://registry.npmjs.org/detective\n","npm ","http GET https://registry.npmjs.org/buffer-browserify\n","npm"," http ","GET"," https://registry.npmjs.org/deputy\n","npm ","http GET https://registry.npmjs.org/syntax-error\n","npm ","http GET https://registry.npmjs.org/resolve\n","npm ","http GET"," https://registry.npmjs.org/nub\n","npm ","http GET https://registry.npmjs.org/commondir\n","npm ","http GET https://registry.npmjs.org/coffee-script\n","npm ","http GET https://registry.npmjs.org/optimist\n","npm ","http GET https://registry.npmjs.org/http-browserify\n","npm ","http GET https://registry.npmjs.org/vm-browserify\n","npm"," ","http GET https://registry.npmjs.org/crypto-browserify\n","npm"," http GET https://registry.npmjs.org/socket.io/0.9.10\n","npm ","http GET https://registry.npmjs.org/winston/0.3.4\n","npm http"," GET https://registry.npmjs.org/charm/0.0.5\n","npm ","http"," GET https://registry.npmjs.org/js-yaml/0.3.5\n","npm ","http GET https://registry.npmjs.org/glob/3.0.1\n","npm ","http GET https://registry.npmjs.org/commander\n","npm http"," GET https://registry.npmjs.org/async/0.1.15\n","npm http"," GET https://registry.npmjs.org/rimraf\n","npm ","http GET https://registry.npmjs.org/underscore\n","npm ","http GET https://registry.npmjs.org/styled_string\n","npm ","http"," GET https://registry.npmjs.org/backbone\n","npm ","http GET https://registry.npmjs.org/colors\n","npm ","http GET https://registry.npmjs.org/fireworm\n","npm http"," GET https://registry.npmjs.org/express/2.5.10\n","npm ","http GET https://registry.npmjs.org/mustache/0.4.0\n","npm http ","304 https://registry.npmjs.org/defined\n","npm http"," 304 https://registry.npmjs.org/deep-equal\n","npm http"," 304 https://registry.npmjs.org/deputy\n","npm http"," 304 https://registry.npmjs.org/syntax-error\n","npm http 304"," https://registry.npmjs.org/resolve\n","npm http"," 304 https://registry.npmjs.org/nub\n","npm http ","304 https://registry.npmjs.org/commondir\n","npm http"," 304 https://registry.npmjs.org/coffee-script\n","npm http 304"," https://registry.npmjs.org/optimist\n","npm http"," 304 https://registry.npmjs.org/http-browserify\n","npm http 304"," https://registry.npmjs.org/vm-browserify\n","npm http"," 304 https://registry.npmjs.org/crypto-browserify\n","npm http 304"," https://registry.npmjs.org/socket.io/0.9.10\n","npm http"," 304 https://registry.npmjs.org/winston/0.3.4\n","npm http 304 https://registry.npmjs.org/charm/0.0.5\n","npm http"," 304 https://registry.npmjs.org/js-yaml/0.3.5\n","npm http 304"," https://registry.npmjs.org/buffer-browserify\n","npm http"," 304 https://registry.npmjs.org/detective\n","npm"," ","http"," ","304"," https://registry.npmjs.org/commander\n","npm"," ","http"," ","304"," https://registry.npmjs.org/glob/3.0.1\n","npm"," ","http GET https://registry.npmjs.org/mkdirp\n","npm http"," GET https://registry.npmjs.org/esprima\nnpm"," http GET https://registry.npmjs.org/base64-js/0.0.2\n","npm http"," GET https://registry.npmjs.org/concat-stream/0.0.8\n","npm http ","GET https://registry.npmjs.org/wordwrap\n","npm http 304"," https://registry.npmjs.org/async/0.1.15\n","npm http ","304 https://registry.npmjs.org/jsonify\n","npm ","http 304 https://registry.npmjs.org/underscore\n","npm ","http 304 https://registry.npmjs.org/styled_string\n","npm http"," 304 https://registry.npmjs.org/backbone\n","npm ","http 200 https://registry.npmjs.org/rimraf\n","npm http"," GET https://registry.npmjs.org/rimraf/-/rimraf-2.1.0.tgz\n","npm http 304"," https://registry.npmjs.org/colors\n","npm http"," 304 https://registry.npmjs.org/express/2.5.10\n","npm ","http"," 304 https://registry.npmjs.org/fireworm\n","npm http ","304 https://registry.npmjs.org/mustache/0.4.0\n","npm ","WARN package.json mustache@0.4.0 No README.md file found!\n","npm http"," 304 https://registry.npmjs.org/mkdirp\n","npm ","http 304 https://registry.npmjs.org/esprima\n","npm http ","304 https://registry.npmjs.org/concat-stream/0.0.8\n","npm http"," 304 https://registry.npmjs.org/base64-js/0.0.2\n","npm http ","304 https://registry.npmjs.org/wordwrap\n","npm http ","200 https://registry.npmjs.org/rimraf/-/rimraf-2.1.0.tgz\n","npm"," ","http"," ","GET"," https://registry.npmjs.org/graceful-fs\n","npm http"," GET https://registry.npmjs.org/minimatch\n","npm http"," GET https://registry.npmjs.org/minimatch\n","npm http ","GET https://registry.npmjs.org/async\n","npm ","http GET https://registry.npmjs.org/fast-list\n","npm http"," GET https://registry.npmjs.org/connect\n","npm http"," GET https://registry.npmjs.org/socket.io-client/0.9.10\n","npm http"," GET https://registry.npmjs.org/graceful-fs\n","npm http"," GET https://registry.npmjs.org/keypress\n","npm ","http GET https://registry.npmjs.org/mime/1.2.4\n","npm ","http GET https://registry.npmjs.org/qs\n","npm http"," GET https://registry.npmjs.org/mkdirp/0.3.0\n","npm http"," GET https://registry.npmjs.org/set\n","npm ","http GET https://registry.npmjs.org/redis/0.7.2\n","npm ","http GET https://registry.npmjs.org/inherits\n","npm http"," GET https://registry.npmjs.org/policyfile/0.0.4\n","npm http ","GET https://registry.npmjs.org/eyes\n","npm ","http GET https://registry.npmjs.org/loggly\n","npm http ","GET https://registry.npmjs.org/pkginfo\n","npm ","http 304 https://registry.npmjs.org/async\n","npm http 304 https://registry.npmjs.org/graceful-fs\n","npm http"," 304 https://registry.npmjs.org/minimatch\n","npm http"," 304 https://registry.npmjs.org/fast-list\n","npm ","http 304 https://registry.npmjs.org/minimatch\n","npm http ","304 https://registry.npmjs.org/connect\n","npm ","WARN package.json connect@1.9.2 No README.md file found!\n","npm ","http 304 https://registry.npmjs.org/socket.io-client/0.9.10\n","npm http"," 304 https://registry.npmjs.org/graceful-fs\n","npm http"," 304 https://registry.npmjs.org/keypress\n","npm"," http 304 https://registry.npmjs.org/mime/1.2.4\n","npm http"," 304 https://registry.npmjs.org/qs\n","npm http"," 304 https://registry.npmjs.org/mkdirp/0.3.0\n","npm"," http 304"," https://registry.npmjs.org/set\n","npm ","http 304 https://registry.npmjs.org/inherits\n","npm http"," 304 https://registry.npmjs.org/redis/0.7.2\n","npm"," http GET https://registry.npmjs.org/formidable\n","npm"," http GET https://registry.npmjs.org/lru-cache\n","npm ","http GET https://registry.npmjs.org/sigmund\n","npm ","http GET https://registry.npmjs.org/lru-cache\n","npm http"," 304 https://registry.npmjs.org/policyfile/0.0.4\n","npm http 304 https://registry.npmjs.org/pkginfo\n","npm ","http 304 https://registry.npmjs.org/loggly\n","npm http"," 304 https://registry.npmjs.org/eyes\n","npm http"," GET https://registry.npmjs.org/hiredis\n","npm"," http 304 https://registry.npmjs.org/lru-cache\n","npm http ","GET https://registry.npmjs.org/timespan\n","npm http"," GET https://registry.npmjs.org/request\n","npm http ","GET https://registry.npmjs.org/ws\n","npm http"," GET https://registry.npmjs.org/uglify-js/1.2.5\n","npm ","http GET https://registry.npmjs.org/active-x-obfuscator/0.0.1\n","npm ","http GET https://registry.npmjs.org/xmlhttprequest/1.4.2\n","npm"," ","http"," ","304"," https://registry.npmjs.org/lru-cache\n","npm ","http 304 https://registry.npmjs.org/sigmund\n","npm"," ","http"," ","304 https://registry.npmjs.org/ws\n","npm ","http 304 https://registry.npmjs.org/request\n","npm"," ","http"," ","304"," https://registry.npmjs.org/uglify-js/1.2.5\n","npm"," ","http"," ","304"," https://registry.npmjs.org/active-x-obfuscator/0.0.1\n","npm http 304 https://registry.npmjs.org/xmlhttprequest/1.4.2\n","npm"," ","http"," ","GET"," https://registry.npmjs.org/zeparser/0.0.5\n","npm"," http GET https://registry.npmjs.org/commander\n","npm ","http GET https://registry.npmjs.org/tinycolor\n","npm http"," GET https://registry.npmjs.org/options\n","npm"," ","http"," ","304 https://registry.npmjs.org/formidable\n","npm"," ","http"," ","304 https://registry.npmjs.org/tinycolor\n","npm"," ","http"," ","304"," https://registry.npmjs.org/hiredis\n","npm ","WARN package.json hiredis@0.1.14 No README.md file found!\n","\n> hiredis@0.1.14 preinstall /tmp/ci/work/e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541/node_modules/testem/node_modules/socket.io/node_modules/redis/node_modules/hiredis\n> make || gmake\n\n","npm"," ","http 304 https://registry.npmjs.org/timespan\n","cd deps/hiredis && make static\n","make[1]: Entering directory `/tmp/ci/work/e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541/node_modules/testem/node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis'\ncc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb net.c\n","npm http 304 https://registry.npmjs.org/options\n","cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb hiredis.c\n","cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb sds.c\n","cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb async.c\n","ar rcs libhiredis.a net.o hiredis.o sds.o async.o\n","make[1]: Leaving directory `/tmp/ci/work/e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541/node_modules/testem/node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis'\n","node-waf configure build\n","npm ","http 304 https://registry.npmjs.org/zeparser/0.0.5\n","npm http"," 304 https://registry.npmjs.org/commander\n","\n> ws@0.4.25 install /tmp/ci/work/e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541/node_modules/testem/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws\n> (node-gyp rebuild 2> builderror.log) || (exit 0)\n\n","Traceback (most recent call last):\n File \"/home/testling/installs/node-v0.8.15/bin/node-waf\", line 14, in \n import Scripting\n File \"/home/testling/installs/node-v0.8.15/bin/../lib/node/wafadmin/Scripting.py\", line 146\n except Utils.WafError, e:\n ^\nSyntaxError: invalid syntax\n","make: *** [all] Error 1\n","cd deps/hiredis && gmake static\n","gmake[1]: Entering directory `/tmp/ci/work/e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541/node_modules/testem/node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis'\ngmake[1]: Nothing to be done for `static'.\n","gmake[1]: Leaving directory `/tmp/ci/work/e15e5caff584f54e10646b53b3bb16de4308d8e7.1356048400541/node_modules/testem/node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis'\n","node-waf configure build\n","Traceback (most recent call last):\n File \"/home/testling/installs/node-v0.8.15/bin/node-waf\", line 14, in \n import Scripting\n File \"/home/testling/installs/node-v0.8.15/bin/../lib/node/wafadmin/Scripting.py\", line 146\n except Utils.WafError, e:\n ^\nSyntaxError: invalid syntax\n","gmake: *** [all] Error 1\n","npm"," ","WARN"," ","optional dep failed, continuing"," hiredis@0.1.14\n","to-array@0.1.3 node_modules/to-array\n\ntape@0.1.3 node_modules/tape\n├── deep-equal@0.0.0\n├── defined@0.0.0\n└── jsonify@0.0.0\n\nbrowserify@1.16.6 node_modules/browserify\n├── nub@0.0.0\n├── commondir@0.0.1\n├── vm-browserify@0.0.1\n├── crypto-browserify@0.1.2\n├── resolve@0.2.3\n├── coffee-script@1.4.0\n├── deputy@0.0.4 (mkdirp@0.3.4)\n├── http-browserify@0.1.6 (concat-stream@0.0.8)\n├── buffer-browserify@0.0.4 (base64-js@0.0.2)\n├── optimist@0.3.5 (wordwrap@0.0.2)\n├── syntax-error@0.0.0 (esprima@0.9.9)\n└── detective@0.2.1 (esprima@0.9.9)\n\ntestem@0.2.50 node_modules/testem\n├── styled_string@0.0.1\n├── colors@0.6.0-1\n├── mustache@0.4.0\n├── charm@0.0.5\n├── backbone@0.9.9\n├── async@0.1.15\n├── underscore@1.4.3\n├── js-yaml@0.3.5\n├── rimraf@2.1.0 (graceful-fs@1.1.14)\n├── commander@1.1.1 (keypress@0.1.0)\n├── glob@3.0.1 (inherits@1.0.0, graceful-fs@1.1.14, fast-list@1.0.2, minimatch@0.1.5)\n├── fireworm@0.0.8 (set@1.0.0, async@0.1.22, minimatch@0.2.9)\n├── express@2.5.10 (qs@0.4.2, mkdirp@0.3.0, mime@1.2.4, connect@1.9.2)\n├── winston@0.3.4 (eyes@0.1.8, pkginfo@0.2.3, loggly@0.3.11)\n└── socket.io@0.9.10 (policyfile@0.0.4, redis@0.7.2, socket.io-client@0.9.10)\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd1b0af9","key":["Colingo/valid-schema.git","bed4fbe2551a4be02a5169086c1754ad5bd73a48.1355971588291"],"value":{"_id":"ccc87f2e39902598d0895524bd1b0af9","_rev":"1-fd584f457f90e32b6580df54636b6638","type":"bundle","time":1355971588427,"id":"1355971588426.a384c25f","commit":{"id":"bed4fbe2551a4be02a5169086c1754ad5bd73a48.1355971588291","dir":"/tmp/ci/work/bed4fbe2551a4be02a5169086c1754ad5bd73a48.1355971588291","repo":"Colingo/valid-schema.git","hash":"bed4fbe2551a4be02a5169086c1754ad5bd73a48","branch":"master"},"output":["npm"," ","http ","GET"," https://registry.npmjs.org/to-array\n","npm http"," GET https://registry.npmjs.org/testem\n","npm http"," GET https://registry.npmjs.org/tape\n","npm ","http GET https://registry.npmjs.org/browserify\n","npm http"," 304 https://registry.npmjs.org/tape\n","npm"," http GET https://registry.npmjs.org/tape/-/tape-0.1.3.tgz\n","npm http 304"," https://registry.npmjs.org/browserify\n","npm"," http 200 https://registry.npmjs.org/tape/-/tape-0.1.3.tgz\n","npm"," http 200 https://registry.npmjs.org/testem\n","npm"," ","http"," ","GET"," https://registry.npmjs.org/testem/-/testem-0.2.50.tgz\n","npm"," http 200 https://registry.npmjs.org/testem/-/testem-0.2.50.tgz\n","npm"," http 200 https://registry.npmjs.org/to-array\n","npm http"," GET https://registry.npmjs.org/to-array/-/to-array-0.1.3.tgz\n","npm ","http 200 https://registry.npmjs.org/to-array/-/to-array-0.1.3.tgz\n","npm"," ","http"," ","GET"," https://registry.npmjs.org/jsonify\n","npm"," ","http"," ","GET"," https://registry.npmjs.org/defined\n","npm"," ","http"," ","GET"," https://registry.npmjs.org/deep-equal\n","npm"," http 304 https://registry.npmjs.org/jsonify\n","npm http"," 304 https://registry.npmjs.org/defined\n","npm http ","304 https://registry.npmjs.org/deep-equal\n","npm http"," ","GET"," https://registry.npmjs.org/detective\n","npm ","http GET https://registry.npmjs.org/buffer-browserify\n","npm"," ","http GET https://registry.npmjs.org/coffee-script\n","npm ","http GET https://registry.npmjs.org/deputy\n","npm http"," GET https://registry.npmjs.org/nub\n","npm"," http GET https://registry.npmjs.org/resolve\n","npm ","http ","GET https://registry.npmjs.org/commondir\n","npm ","http GET https://registry.npmjs.org/syntax-error\n","npm ","http GET https://registry.npmjs.org/vm-browserify\n","npm http"," GET https://registry.npmjs.org/optimist\n","npm ","http GET https://registry.npmjs.org/crypto-browserify\n","npm"," http GET https://registry.npmjs.org/http-browserify\n","npm http"," 304 https://registry.npmjs.org/buffer-browserify\n","npm http"," 304 https://registry.npmjs.org/resolve\n","npm http"," 304 https://registry.npmjs.org/coffee-script\n","npm ","http 304 https://registry.npmjs.org/nub\n","npm http ","304 https://registry.npmjs.org/deputy\n","npm"," http 304 https://registry.npmjs.org/commondir\n","npm ","http 304 https://registry.npmjs.org/syntax-error\n","npm ","http 304 https://registry.npmjs.org/detective\n","npm http"," 304 https://registry.npmjs.org/vm-browserify\n","npm http"," 304 https://registry.npmjs.org/http-browserify\n","npm http"," 200 https://registry.npmjs.org/crypto-browserify\n","npm http"," GET https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-0.1.2.tgz\n","npm http"," 200 https://registry.npmjs.org/optimist\n","npm http ","200 https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-0.1.2.tgz\n","npm http ","GET https://registry.npmjs.org/mkdirp\n","npm"," http GET https://registry.npmjs.org/esprima\n","npm"," http GET https://registry.npmjs.org/wordwrap\n","npm http"," GET https://registry.npmjs.org/base64-js/0.0.2\n","npm ","http GET https://registry.npmjs.org/concat-stream/0.0.8\n","npm"," ","http"," ","304"," https://registry.npmjs.org/concat-stream/0.0.8\n","npm ","http ","304 https://registry.npmjs.org/mkdirp\n","npm ","http 304 https://registry.npmjs.org/wordwrap\n","npm ","http"," 304 https://registry.npmjs.org/base64-js/0.0.2\n","npm ","http 304 https://registry.npmjs.org/esprima\n","npm ","http GET https://registry.npmjs.org/mustache/0.4.0\n","npm ","http GET https://registry.npmjs.org/winston/0.3.4\n","npm ","http GET https://registry.npmjs.org/express/2.5.10\n","npm http"," GET https://registry.npmjs.org/socket.io/0.9.10\n","npm http"," GET https://registry.npmjs.org/js-yaml/0.3.5\n","npm ","http GET https://registry.npmjs.org/glob/3.0.1\n","npm ","http GET https://registry.npmjs.org/charm/0.0.5\n","npm ","http GET https://registry.npmjs.org/rimraf\n","npm ","http GET https://registry.npmjs.org/styled_string\n","npm ","http GET https://registry.npmjs.org/async/0.1.15\n","npm"," http"," ","GET https://registry.npmjs.org/underscore\n","npm ","http GET https://registry.npmjs.org/backbone\n","npm"," ","http"," ","GET"," https://registry.npmjs.org/fireworm\n","npm"," ","http"," ","GET https://registry.npmjs.org/colors\n","npm"," ","http"," ","GET"," https://registry.npmjs.org/commander\n","npm"," ","http"," ","200 https://registry.npmjs.org/mustache/0.4.0\n","npm ","http GET https://registry.npmjs.org/mustache/-/mustache-0.4.0.tgz\n","npm http ","200 https://registry.npmjs.org/js-yaml/0.3.5\n","npm http ","200 https://registry.npmjs.org/winston/0.3.4\n","npm ","http GET https://registry.npmjs.org/js-yaml/-/js-yaml-0.3.5.tgz\n","npm ","http GET https://registry.npmjs.org/winston/-/winston-0.3.4.tgz\n","npm http"," 200 https://registry.npmjs.org/glob/3.0.1\n","npm http ","200 https://registry.npmjs.org/express/2.5.10\n","npm ","http GET https://registry.npmjs.org/glob/-/glob-3.0.1.tgz\n","npm http"," 200 https://registry.npmjs.org/socket.io/0.9.10\n","npm ","http GET https://registry.npmjs.org/express/-/express-2.5.10.tgz\nnpm http GET https://registry.npmjs.org/socket.io/-/socket.io-0.9.10.tgz\n","npm ","http 200 https://registry.npmjs.org/charm/0.0.5\n","npm ","http GET https://registry.npmjs.org/charm/-/charm-0.0.5.tgz\n","npm ","http 200 https://registry.npmjs.org/rimraf\n","npm ","http 200 https://registry.npmjs.org/styled_string\n","npm http"," 200 https://registry.npmjs.org/async/0.1.15\n","npm ","http GET https://registry.npmjs.org/async/-/async-0.1.15.tgz\n","npm ","http GET https://registry.npmjs.org/rimraf/-/rimraf-2.0.3.tgz\n","npm"," http GET"," https://registry.npmjs.org/styled_string/-/styled_string-0.0.1.tgz\n","npm http"," 200 https://registry.npmjs.org/underscore\n","npm ","http GET https://registry.npmjs.org/underscore/-/underscore-1.4.3.tgz\n","npm http"," 304 https://registry.npmjs.org/colors\n","npm http"," 200 https://registry.npmjs.org/mustache/-/mustache-0.4.0.tgz\n","npm http ","200 https://registry.npmjs.org/fireworm\n","npm http"," GET https://registry.npmjs.org/fireworm/-/fireworm-0.0.8.tgz\n","npm http"," 200 https://registry.npmjs.org/js-yaml/-/js-yaml-0.3.5.tgz\n","npm ","WARN package.json mustache@0.4.0 No README.md file found!\n","npm http ","200 https://registry.npmjs.org/backbone\n","npm ","http GET https://registry.npmjs.org/backbone/-/backbone-0.9.9.tgz\n","npm http"," 200 https://registry.npmjs.org/winston/-/winston-0.3.4.tgz\n","npm ","http 200 https://registry.npmjs.org/glob/-/glob-3.0.1.tgz\n","npm http"," 200 https://registry.npmjs.org/express/-/express-2.5.10.tgz\n","npm http"," 200 https://registry.npmjs.org/socket.io/-/socket.io-0.9.10.tgz\n","npm http"," 200 https://registry.npmjs.org/charm/-/charm-0.0.5.tgz\n","npm ","http 200 https://registry.npmjs.org/commander\n","npm http ","200 https://registry.npmjs.org/styled_string/-/styled_string-0.0.1.tgz\n","npm ","http 200 https://registry.npmjs.org/rimraf/-/rimraf-2.0.3.tgz\n","npm ","http 200 https://registry.npmjs.org/async/-/async-0.1.15.tgz\n","npm http"," 200 https://registry.npmjs.org/backbone/-/backbone-0.9.9.tgz\n","npm ","http 200 https://registry.npmjs.org/fireworm/-/fireworm-0.0.8.tgz\n","npm ","http 200 https://registry.npmjs.org/underscore/-/underscore-1.4.3.tgz\n","npm ","http GET https://registry.npmjs.org/graceful-fs\n","npm ","http GET https://registry.npmjs.org/minimatch\n","npm ","http GET https://registry.npmjs.org/fast-list\n","npm http"," GET https://registry.npmjs.org/minimatch\n","npm ","http GET https://registry.npmjs.org/graceful-fs\n","npm ","http GET https://registry.npmjs.org/set\n","npm"," http GET https://registry.npmjs.org/inherits\n","npm"," http GET https://registry.npmjs.org/socket.io-client/0.9.10\n","npm http"," GET https://registry.npmjs.org/redis/0.7.2\n","npm ","http GET https://registry.npmjs.org/connect\n","npm ","http GET https://registry.npmjs.org/mime/1.2.4\n","npm ","http GET https://registry.npmjs.org/mkdirp/0.3.0\n","npm ","http GET https://registry.npmjs.org/keypress\n","npm"," http GET https://registry.npmjs.org/eyes\n","npm ","http GET https://registry.npmjs.org/loggly\n","npm http"," GET https://registry.npmjs.org/async\n","npm ","http GET https://registry.npmjs.org/qs\n","npm ","http GET https://registry.npmjs.org/policyfile/0.0.4\n","npm http"," GET https://registry.npmjs.org/pkginfo\n","npm http ","200 https://registry.npmjs.org/fast-list\n","npm ","http GET https://registry.npmjs.org/fast-list/-/fast-list-1.0.2.tgz\n","npm ","http 200 https://registry.npmjs.org/graceful-fs\n","npm ","http GET https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.1.14.tgz\n","npm http"," ","200"," https://registry.npmjs.org/graceful-fs\n","npm http"," 200 https://registry.npmjs.org/set\n","npm http"," GET https://registry.npmjs.org/set/-/set-1.0.0.tgz\n","npm http"," 200 https://registry.npmjs.org/minimatch\n","npm ","http GET https://registry.npmjs.org/minimatch/-/minimatch-0.2.9.tgz\n","npm http"," 200 https://registry.npmjs.org/inherits\n","npm ","http GET https://registry.npmjs.org/inherits/-/inherits-1.0.0.tgz\n","npm ","http 304 https://registry.npmjs.org/connect\n","npm http"," 200 https://registry.npmjs.org/socket.io-client/0.9.10\n","npm ","http 200 https://registry.npmjs.org/minimatch\n","npm"," ","http"," ","GET https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9.10.tgz\n","npm ","http 304 https://registry.npmjs.org/mime/1.2.4\n","npm ","http 200 https://registry.npmjs.org/redis/0.7.2\n","npm http"," GET https://registry.npmjs.org/minimatch/-/minimatch-0.1.5.tgz\n","npm http"," GET https://registry.npmjs.org/redis/-/redis-0.7.2.tgz\n","npm ","WARN package.json connect@1.9.2 No README.md file found!\n","npm http"," 304 https://registry.npmjs.org/mkdirp/0.3.0\n","npm"," http 304 https://registry.npmjs.org/keypress\n","npm ","http 304 https://registry.npmjs.org/qs\n","npm http"," 200 https://registry.npmjs.org/eyes\n","npm http"," GET https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz\n","npm ","http"," 200 https://registry.npmjs.org/loggly\n","npm http"," 304 https://registry.npmjs.org/policyfile/0.0.4\n","npm http"," GET https://registry.npmjs.org/loggly/-/loggly-0.3.11.tgz\n","npm http ","200 https://registry.npmjs.org/fast-list/-/fast-list-1.0.2.tgz\n","npm http"," 304 https://registry.npmjs.org/pkginfo\n","npm http 200"," https://registry.npmjs.org/set/-/set-1.0.0.tgz\n","npm ","http 200 https://registry.npmjs.org/graceful-fs/-/graceful-fs-1.1.14.tgz\n","npm http"," 200 https://registry.npmjs.org/minimatch/-/minimatch-0.2.9.tgz\n","npm ","http 200 https://registry.npmjs.org/inherits/-/inherits-1.0.0.tgz\n","npm http"," 200 https://registry.npmjs.org/socket.io-client/-/socket.io-client-0.9.10.tgz\n","npm"," http 200 https://registry.npmjs.org/minimatch/-/minimatch-0.1.5.tgz\n","npm http"," 200 https://registry.npmjs.org/redis/-/redis-0.7.2.tgz\n","npm http 200"," https://registry.npmjs.org/async\n","npm"," http 200 https://registry.npmjs.org/loggly/-/loggly-0.3.11.tgz\n","npm http"," 200 https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz\n","npm"," ","http"," ","GET"," https://registry.npmjs.org/formidable\n","npm http"," GET https://registry.npmjs.org/lru-cache\n","npm http"," GET https://registry.npmjs.org/lru-cache\n","npm http"," GET https://registry.npmjs.org/sigmund\n","npm http ","304 https://registry.npmjs.org/formidable\n","npm http"," 200 https://registry.npmjs.org/sigmund\n","npm ","http GET https://registry.npmjs.org/sigmund/-/sigmund-1.0.0.tgz\n","npm http"," 200 https://registry.npmjs.org/lru-cache\n","npm"," http 200 https://registry.npmjs.org/lru-cache\n","npm http"," GET https://registry.npmjs.org/lru-cache/-/lru-cache-1.0.6.tgz\n","npm ","http GET https://registry.npmjs.org/lru-cache/-/lru-cache-2.0.4.tgz\n","npm"," http GET https://registry.npmjs.org/request\n","npm http"," GET https://registry.npmjs.org/timespan\n","npm http ","200 https://registry.npmjs.org/sigmund/-/sigmund-1.0.0.tgz\n","npm http ","200 https://registry.npmjs.org/lru-cache/-/lru-cache-1.0.6.tgz\n","npm http ","200 https://registry.npmjs.org/lru-cache/-/lru-cache-2.0.4.tgz\n","npm ","http 200 https://registry.npmjs.org/timespan\n","npm http"," GET https://registry.npmjs.org/timespan/-/timespan-2.2.0.tgz\n","npm ","http 200 https://registry.npmjs.org/request\n","npm http"," GET https://registry.npmjs.org/request/-/request-2.9.203.tgz\n","npm ","http 200 https://registry.npmjs.org/timespan/-/timespan-2.2.0.tgz\n","npm http"," 200 https://registry.npmjs.org/request/-/request-2.9.203.tgz\n","npm"," ","http"," ","GET https://registry.npmjs.org/hiredis\n","npm http"," 200 https://registry.npmjs.org/hiredis\n","npm http"," GET https://registry.npmjs.org/hiredis/-/hiredis-0.1.14.tgz\n","npm http ","200 https://registry.npmjs.org/hiredis/-/hiredis-0.1.14.tgz\n","npm http"," GET https://registry.npmjs.org/uglify-js/1.2.5\n","npm ","http GET https://registry.npmjs.org/xmlhttprequest/1.4.2\n","npm ","http GET https://registry.npmjs.org/ws\n","npm ","http GET https://registry.npmjs.org/active-x-obfuscator/0.0.1\n","npm ","WARN package.json hiredis@0.1.14 No README.md file found!\n","npm ","http 304 https://registry.npmjs.org/xmlhttprequest/1.4.2\n","npm http"," 304 https://registry.npmjs.org/uglify-js/1.2.5\n","npm http"," 304 https://registry.npmjs.org/active-x-obfuscator/0.0.1\n","npm http ","200 https://registry.npmjs.org/ws\n","npm http"," GET https://registry.npmjs.org/ws/-/ws-0.4.25.tgz\n","\n> hiredis@0.1.14 preinstall /tmp/ci/work/bed4fbe2551a4be02a5169086c1754ad5bd73a48.1355971588291/node_modules/testem/node_modules/socket.io/node_modules/redis/node_modules/hiredis\n> make || gmake\n\n","cd deps/hiredis && make static\n","make[1]: Entering directory `/tmp/ci/work/bed4fbe2551a4be02a5169086c1754ad5bd73a48.1355971588291/node_modules/testem/node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis'\ncc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb net.c\n","npm"," http 200 https://registry.npmjs.org/ws/-/ws-0.4.25.tgz\n","npm"," ","http"," ","GET https://registry.npmjs.org/zeparser/0.0.5\n","npm http ","GET https://registry.npmjs.org/commander\n","npm ","http GET https://registry.npmjs.org/options\n","npm http"," GET https://registry.npmjs.org/tinycolor\n","npm http ","304 https://registry.npmjs.org/zeparser/0.0.5\n","npm http 304"," https://registry.npmjs.org/options\n","npm ","http 304 https://registry.npmjs.org/commander\n","cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb hiredis.c\n","npm ","http 304 https://registry.npmjs.org/tinycolor\n","\n> ws@0.4.25 install /tmp/ci/work/bed4fbe2551a4be02a5169086c1754ad5bd73a48.1355971588291/node_modules/testem/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws\n> (node-gyp rebuild 2> builderror.log) || (exit 0)\n\n","cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb sds.c\n","cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb async.c\n","ar rcs libhiredis.a net.o hiredis.o sds.o async.o\n","make[1]: Leaving directory `/tmp/ci/work/bed4fbe2551a4be02a5169086c1754ad5bd73a48.1355971588291/node_modules/testem/node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis'\n","node-waf configure build\n","Traceback (most recent call last):\n File \"/home/testling/installs/node-v0.8.15/bin/node-waf\", line 14, in \n import Scripting\n File \"/home/testling/installs/node-v0.8.15/bin/../lib/node/wafadmin/Scripting.py\", line 146\n except Utils.WafError, e:\n ^\nSyntaxError: invalid syntax\n","make: *** [all] Error 1\n","cd deps/hiredis && gmake static\n","gmake[1]: Entering directory `/tmp/ci/work/bed4fbe2551a4be02a5169086c1754ad5bd73a48.1355971588291/node_modules/testem/node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis'\ngmake[1]: Nothing to be done for `static'.\n","gmake[1]: Leaving directory `/tmp/ci/work/bed4fbe2551a4be02a5169086c1754ad5bd73a48.1355971588291/node_modules/testem/node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis'\n","node-waf configure build\n","Traceback (most recent call last):\n File \"/home/testling/installs/node-v0.8.15/bin/node-waf\", line 14, in \n import Scripting\n File \"/home/testling/installs/node-v0.8.15/bin/../lib/node/wafadmin/Scripting.py\", line 146\n except Utils.WafError, e:\n ^\nSyntaxError: invalid syntax\n","gmake: *** [all] Error 1\n","npm"," WARN optional dep failed, continuing hiredis@0.1.14\n","to-array@0.1.3 node_modules/to-array\n\ntape@0.1.3 node_modules/tape\n├── deep-equal@0.0.0\n├── defined@0.0.0\n└── jsonify@0.0.0\n\nbrowserify@1.16.6 node_modules/browserify\n├── nub@0.0.0\n├── commondir@0.0.1\n├── vm-browserify@0.0.1\n├── crypto-browserify@0.1.2\n├── resolve@0.2.3\n├── coffee-script@1.4.0\n├── deputy@0.0.4 (mkdirp@0.3.4)\n├── http-browserify@0.1.6 (concat-stream@0.0.8)\n├── buffer-browserify@0.0.4 (base64-js@0.0.2)\n├── optimist@0.3.5 (wordwrap@0.0.2)\n├── syntax-error@0.0.0 (esprima@0.9.9)\n└── detective@0.2.1 (esprima@0.9.9)\n\ntestem@0.2.50 node_modules/testem\n├── styled_string@0.0.1\n├── mustache@0.4.0\n├── colors@0.6.0-1\n├── charm@0.0.5\n├── backbone@0.9.9\n├── async@0.1.15\n├── underscore@1.4.3\n├── js-yaml@0.3.5\n├── commander@1.1.1 (keypress@0.1.0)\n├── rimraf@2.0.3 (graceful-fs@1.1.14)\n├── express@2.5.10 (mkdirp@0.3.0, mime@1.2.4, qs@0.4.2, connect@1.9.2)\n├── glob@3.0.1 (inherits@1.0.0, graceful-fs@1.1.14, fast-list@1.0.2, minimatch@0.1.5)\n├── fireworm@0.0.8 (set@1.0.0, async@0.1.22, minimatch@0.2.9)\n├── winston@0.3.4 (eyes@0.1.8, pkginfo@0.2.3, loggly@0.3.11)\n└── socket.io@0.9.10 (policyfile@0.0.4, redis@0.7.2, socket.io-client@0.9.10)\n","Expressions in require() statements:\n"," require(file)\n","\n","/home/testling/projects/testling-ci/git/node_modules/browserify/lib/wrap.js:459\n"," throw moduleError('Cannot find module');\n"," "," "," "," "," ^\n","Error: Cannot find module: \"./lib/default_stream\" from directory \"/tmp/ci/work/bed4fbe2551a4be02a5169086c1754ad5bd73a48.1355971588291/test\" while processing file /tmp/ci/work/bed4fbe2551a4be02a5169086c1754ad5bd73a48.1355971588291/test/bundle.js\n at moduleError (/home/testling/projects/testling-ci/git/node_modules/browserify/lib/wrap.js:420:16)\n at Function.Wrap.require (/home/testling/projects/testling-ci/git/node_modules/browserify/lib/wrap.js:459:19)\n at Function.module.exports.Object.keys.forEach.self.(anonymous function) [as require] (/home/testling/projects/testling-ci/git/node_modules/browserify/index.js:158:28)\n at Wrap.require (/home/testling/projects/testling-ci/git/node_modules/browserify/lib/wrap.js:541:14)\n at Array.forEach (native)\n at Function.Wrap.require (/home/testling/projects/testling-ci/git/node_modules/browserify/lib/wrap.js:533:27)\n at Function.module.exports.Object.keys.forEach.self.(anonymous function) [as require] (/home/testling/projects/testling-ci/git/node_modules/browserify/index.js:158:28)\n at /home/testling/projects/testling-ci/git/bin/bundle.js:62:12\n at Array.forEach (native)\n at Object. (/home/testling/projects/testling-ci/git/bin/bundle.js:61:7)\n","\nerror creating bundle\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0a81a8","key":["Colingo/valid-schema.git","9e83702a1bcd533635df5c7cd8390239c02913f4.1355342943971"],"value":{"_id":"ccc87f2e39902598d0895524bd0a81a8","_rev":"1-2804e4d885d94f67d8ef2e53d31d5771","type":"test","time":1355342972053,"commit":{"id":"9e83702a1bcd533635df5c7cd8390239c02913f4.1355342943971","dir":"/tmp/ci/work/9e83702a1bcd533635df5c7cd8390239c02913f4.1355342943971","repo":"Colingo/valid-schema.git","hash":"9e83702a1bcd533635df5c7cd8390239c02913f4","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355342944066.ec53ec1","browser":"safari/5.1","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..2\\n\\n\"]\n","[\"stdout\",\"# tests 2\\n\\n\"]\n","[\"stdout\",\"# pass 2\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0a7b2a","key":["Colingo/valid-schema.git","9e83702a1bcd533635df5c7cd8390239c02913f4.1355342943971"],"value":{"_id":"ccc87f2e39902598d0895524bd0a7b2a","_rev":"1-3f5c237bea258d2c8b767278d05e0741","type":"test","time":1355342967212,"commit":{"id":"9e83702a1bcd533635df5c7cd8390239c02913f4.1355342943971","dir":"/tmp/ci/work/9e83702a1bcd533635df5c7cd8390239c02913f4.1355342943971","repo":"Colingo/valid-schema.git","hash":"9e83702a1bcd533635df5c7cd8390239c02913f4","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355342944066.ec53ec1","browser":"opera/12.0","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..2\\n\\n\"]\n","[\"stdout\",\"# tests 2\\n\\n\"]\n","[\"stdout\",\"# pass 2\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0a6c3e","key":["Colingo/valid-schema.git","9e83702a1bcd533635df5c7cd8390239c02913f4.1355342943971"],"value":{"_id":"ccc87f2e39902598d0895524bd0a6c3e","_rev":"1-90b5a3798ded4e5e979da8a1bdeb474e","type":"test","time":1355342962096,"commit":{"id":"9e83702a1bcd533635df5c7cd8390239c02913f4.1355342943971","dir":"/tmp/ci/work/9e83702a1bcd533635df5c7cd8390239c02913f4.1355342943971","repo":"Colingo/valid-schema.git","hash":"9e83702a1bcd533635df5c7cd8390239c02913f4","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355342944066.ec53ec1","browser":"chrome/canary","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..2\\n\\n\"]\n","[\"stdout\",\"# tests 2\\n\\n\"]\n","[\"stdout\",\"# pass 2\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0a6c33","key":["Colingo/valid-schema.git","9e83702a1bcd533635df5c7cd8390239c02913f4.1355342943971"],"value":{"_id":"ccc87f2e39902598d0895524bd0a6c33","_rev":"1-5a705132434b46d2b73f7e6fe7cf6ec3","type":"test","time":1355342957483,"commit":{"id":"9e83702a1bcd533635df5c7cd8390239c02913f4.1355342943971","dir":"/tmp/ci/work/9e83702a1bcd533635df5c7cd8390239c02913f4.1355342943971","repo":"Colingo/valid-schema.git","hash":"9e83702a1bcd533635df5c7cd8390239c02913f4","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355342944066.ec53ec1","browser":"chrome/22.0","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..2\\n\\n\"]\n","[\"stdout\",\"# tests 2\\n\\n\"]\n","[\"stdout\",\"# pass 2\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0a6c28","key":["Colingo/valid-schema.git","9e83702a1bcd533635df5c7cd8390239c02913f4.1355342943971"],"value":{"_id":"ccc87f2e39902598d0895524bd0a6c28","_rev":"1-9ad8fe3db87704bfaa4661bf328d275a","type":"test","time":1355342954792,"commit":{"id":"9e83702a1bcd533635df5c7cd8390239c02913f4.1355342943971","dir":"/tmp/ci/work/9e83702a1bcd533635df5c7cd8390239c02913f4.1355342943971","repo":"Colingo/valid-schema.git","hash":"9e83702a1bcd533635df5c7cd8390239c02913f4","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355342944066.ec53ec1","browser":"firefox/nightly","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..2\\n\\n\"]\n","[\"stdout\",\"# tests 2\\n\\n\"]\n","[\"stdout\",\"# pass 2\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0a69f8","key":["Colingo/valid-schema.git","9e83702a1bcd533635df5c7cd8390239c02913f4.1355342943971"],"value":{"_id":"ccc87f2e39902598d0895524bd0a69f8","_rev":"1-a738458dcd33468b2d21b035c9d66252","type":"test","time":1355342953580,"commit":{"id":"9e83702a1bcd533635df5c7cd8390239c02913f4.1355342943971","dir":"/tmp/ci/work/9e83702a1bcd533635df5c7cd8390239c02913f4.1355342943971","repo":"Colingo/valid-schema.git","hash":"9e83702a1bcd533635df5c7cd8390239c02913f4","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355342944066.ec53ec1","browser":"firefox/15.0","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..2\\n\\n\"]\n","[\"stdout\",\"# tests 2\\n\\n\"]\n","[\"stdout\",\"# pass 2\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0a638d","key":["Colingo/valid-schema.git","9e83702a1bcd533635df5c7cd8390239c02913f4.1355342943971"],"value":{"_id":"ccc87f2e39902598d0895524bd0a638d","_rev":"1-58328bdc8cf698364a58f7afc72d9b7e","type":"test","time":1355342951414,"commit":{"id":"9e83702a1bcd533635df5c7cd8390239c02913f4.1355342943971","dir":"/tmp/ci/work/9e83702a1bcd533635df5c7cd8390239c02913f4.1355342943971","repo":"Colingo/valid-schema.git","hash":"9e83702a1bcd533635df5c7cd8390239c02913f4","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355342944066.ec53ec1","browser":"iexplore/9.0","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..2\\n\\n\"]\n","[\"stdout\",\"# tests 2\\n\\n\"]\n","[\"stdout\",\"# pass 2\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0a54ab","key":["Colingo/valid-schema.git","9e83702a1bcd533635df5c7cd8390239c02913f4.1355342943971"],"value":{"_id":"ccc87f2e39902598d0895524bd0a54ab","_rev":"1-0ef26c3c4cade634eeff28cb3cebfd69","type":"test","time":1355342946708,"commit":{"id":"9e83702a1bcd533635df5c7cd8390239c02913f4.1355342943971","dir":"/tmp/ci/work/9e83702a1bcd533635df5c7cd8390239c02913f4.1355342943971","repo":"Colingo/valid-schema.git","hash":"9e83702a1bcd533635df5c7cd8390239c02913f4","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355342944066.ec53ec1","browser":"iexplore/8.0","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"not ok 1 TypeError: Object doesn't support this property or method\\n ---\\n operator: error\\n expected:\\n undefined\\n actual:\\n {\\\"message\\\":\\\"Object doesn't support this property or method\\\",\\\"number\\\":-2146827850,\\\"description\\\":\\\"Object doesn't support this property or method\\\"}\\n ...\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"not ok 2 TypeError: Object doesn't support this property or method\\n ---\\n operator: error\\n expected:\\n undefined\\n actual:\\n {\\\"message\\\":\\\"Object doesn't support this property or method\\\",\\\"number\\\":-2146827850,\\\"description\\\":\\\"Object doesn't support this property or method\\\"}\\n ...\\n\\n\"]\n","[\"stdout\",\"\\n1..2\\n\\n\"]\n","[\"stdout\",\"# tests 2\\n\\n\"]\n","[\"stdout\",\"# pass 0\\n\\n\"]\n","[\"stdout\",\"# fail 2\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0a4827","key":["Colingo/valid-schema.git","94553b0cb58b6e987b101ee0e1b19829483b40bf.1355342808986"],"value":{"_id":"ccc87f2e39902598d0895524bd0a4827","_rev":"1-a450d8883133a069a9c791745adfb64f","type":"test","time":1355342828797,"commit":{"id":"94553b0cb58b6e987b101ee0e1b19829483b40bf.1355342808986","dir":"/tmp/ci/work/94553b0cb58b6e987b101ee0e1b19829483b40bf.1355342808986","repo":"Colingo/valid-schema.git","hash":"94553b0cb58b6e987b101ee0e1b19829483b40bf","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355342809092.9161426","browser":"safari/5.1","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..2\\n\\n\"]\n","[\"stdout\",\"# tests 2\\n\\n\"]\n","[\"stdout\",\"# pass 2\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0a3897","key":["Colingo/valid-schema.git","94553b0cb58b6e987b101ee0e1b19829483b40bf.1355342808986"],"value":{"_id":"ccc87f2e39902598d0895524bd0a3897","_rev":"1-b7ae9464fd44ea1b9eeec24ce39b5803","type":"test","time":1355342827483,"commit":{"id":"94553b0cb58b6e987b101ee0e1b19829483b40bf.1355342808986","dir":"/tmp/ci/work/94553b0cb58b6e987b101ee0e1b19829483b40bf.1355342808986","repo":"Colingo/valid-schema.git","hash":"94553b0cb58b6e987b101ee0e1b19829483b40bf","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355342809092.9161426","browser":"opera/12.0","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..2\\n\\n\"]\n","[\"stdout\",\"# tests 2\\n\\n\"]\n","[\"stdout\",\"# pass 2\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0a309f","key":["Colingo/valid-schema.git","94553b0cb58b6e987b101ee0e1b19829483b40bf.1355342808986"],"value":{"_id":"ccc87f2e39902598d0895524bd0a309f","_rev":"1-06ee417cb755b580fa9eb83507280406","type":"test","time":1355342825779,"commit":{"id":"94553b0cb58b6e987b101ee0e1b19829483b40bf.1355342808986","dir":"/tmp/ci/work/94553b0cb58b6e987b101ee0e1b19829483b40bf.1355342808986","repo":"Colingo/valid-schema.git","hash":"94553b0cb58b6e987b101ee0e1b19829483b40bf","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355342809092.9161426","browser":"chrome/canary","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..2\\n\\n\"]\n","[\"stdout\",\"# tests 2\\n\\n\"]\n","[\"stdout\",\"# pass 2\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0a263c","key":["Colingo/valid-schema.git","94553b0cb58b6e987b101ee0e1b19829483b40bf.1355342808986"],"value":{"_id":"ccc87f2e39902598d0895524bd0a263c","_rev":"1-c7e42770f8f9cfd9f9170752c7806ab5","type":"test","time":1355342824075,"commit":{"id":"94553b0cb58b6e987b101ee0e1b19829483b40bf.1355342808986","dir":"/tmp/ci/work/94553b0cb58b6e987b101ee0e1b19829483b40bf.1355342808986","repo":"Colingo/valid-schema.git","hash":"94553b0cb58b6e987b101ee0e1b19829483b40bf","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355342809092.9161426","browser":"chrome/22.0","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..2\\n\\n\"]\n","[\"stdout\",\"# tests 2\\n\\n\"]\n","[\"stdout\",\"# pass 2\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0a256e","key":["Colingo/valid-schema.git","94553b0cb58b6e987b101ee0e1b19829483b40bf.1355342808986"],"value":{"_id":"ccc87f2e39902598d0895524bd0a256e","_rev":"1-03389997737a684771d4c3771f0d57ad","type":"test","time":1355342818898,"commit":{"id":"94553b0cb58b6e987b101ee0e1b19829483b40bf.1355342808986","dir":"/tmp/ci/work/94553b0cb58b6e987b101ee0e1b19829483b40bf.1355342808986","repo":"Colingo/valid-schema.git","hash":"94553b0cb58b6e987b101ee0e1b19829483b40bf","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355342809092.9161426","browser":"firefox/nightly","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..2\\n\\n\"]\n","[\"stdout\",\"# tests 2\\n\\n\"]\n","[\"stdout\",\"# pass 2\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0a24f9","key":["Colingo/valid-schema.git","94553b0cb58b6e987b101ee0e1b19829483b40bf.1355342808986"],"value":{"_id":"ccc87f2e39902598d0895524bd0a24f9","_rev":"1-7b3a81bc1ac16183b07c63a577d0f228","type":"test","time":1355342817097,"commit":{"id":"94553b0cb58b6e987b101ee0e1b19829483b40bf.1355342808986","dir":"/tmp/ci/work/94553b0cb58b6e987b101ee0e1b19829483b40bf.1355342808986","repo":"Colingo/valid-schema.git","hash":"94553b0cb58b6e987b101ee0e1b19829483b40bf","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355342809092.9161426","browser":"firefox/15.0","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..2\\n\\n\"]\n","[\"stdout\",\"# tests 2\\n\\n\"]\n","[\"stdout\",\"# pass 2\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0a208e","key":["Colingo/valid-schema.git","94553b0cb58b6e987b101ee0e1b19829483b40bf.1355342808986"],"value":{"_id":"ccc87f2e39902598d0895524bd0a208e","_rev":"1-9ba55a6a70f42251849f896ef7eaccc2","type":"test","time":1355342815402,"commit":{"id":"94553b0cb58b6e987b101ee0e1b19829483b40bf.1355342808986","dir":"/tmp/ci/work/94553b0cb58b6e987b101ee0e1b19829483b40bf.1355342808986","repo":"Colingo/valid-schema.git","hash":"94553b0cb58b6e987b101ee0e1b19829483b40bf","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355342809092.9161426","browser":"iexplore/9.0","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..2\\n\\n\"]\n","[\"stdout\",\"# tests 2\\n\\n\"]\n","[\"stdout\",\"# pass 2\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0a1b5a","key":["Colingo/valid-schema.git","94553b0cb58b6e987b101ee0e1b19829483b40bf.1355342808986"],"value":{"_id":"ccc87f2e39902598d0895524bd0a1b5a","_rev":"1-aadbb46a84e375770ef76586ec7d4fb1","type":"test","time":1355342811514,"commit":{"id":"94553b0cb58b6e987b101ee0e1b19829483b40bf.1355342808986","dir":"/tmp/ci/work/94553b0cb58b6e987b101ee0e1b19829483b40bf.1355342808986","repo":"Colingo/valid-schema.git","hash":"94553b0cb58b6e987b101ee0e1b19829483b40bf","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355342809092.9161426","browser":"iexplore/8.0","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"not ok 1 TypeError: Object doesn't support this property or method\\n ---\\n operator: error\\n expected:\\n undefined\\n actual:\\n {\\\"message\\\":\\\"Object doesn't support this property or method\\\",\\\"number\\\":-2146827850,\\\"description\\\":\\\"Object doesn't support this property or method\\\"}\\n ...\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"not ok 2 TypeError: Object doesn't support this property or method\\n ---\\n operator: error\\n expected:\\n undefined\\n actual:\\n {\\\"message\\\":\\\"Object doesn't support this property or method\\\",\\\"number\\\":-2146827850,\\\"description\\\":\\\"Object doesn't support this property or method\\\"}\\n ...\\n\\n\"]\n","[\"stdout\",\"\\n1..2\\n\\n\"]\n","[\"stdout\",\"# tests 2\\n\\n\"]\n","[\"stdout\",\"# pass 0\\n\\n\"]\n","[\"stdout\",\"# fail 2\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0ba8a5","key":["Colingo/valid-schema.git","8d7d08db6842dc8819f402d25a872e9df1aa0fab.1355353752438"],"value":{"_id":"ccc87f2e39902598d0895524bd0ba8a5","_rev":"1-3647837d0d4955bb98be7c2088e9d696","type":"test","time":1355353782138,"commit":{"id":"8d7d08db6842dc8819f402d25a872e9df1aa0fab.1355353752438","dir":"/tmp/ci/work/8d7d08db6842dc8819f402d25a872e9df1aa0fab.1355353752438","repo":"Colingo/valid-schema.git","hash":"8d7d08db6842dc8819f402d25a872e9df1aa0fab","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355353752545.d3e0aa22","browser":"safari/5.1","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"# number schema\\n\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..4\\n\\n\"]\n","[\"stdout\",\"# tests 4\\n\\n\"]\n","[\"stdout\",\"# pass 4\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0ba4c2","key":["Colingo/valid-schema.git","8d7d08db6842dc8819f402d25a872e9df1aa0fab.1355353752438"],"value":{"_id":"ccc87f2e39902598d0895524bd0ba4c2","_rev":"1-b04f58fb4aec7016fe4c83b61e9ee4eb","type":"test","time":1355353770813,"commit":{"id":"8d7d08db6842dc8819f402d25a872e9df1aa0fab.1355353752438","dir":"/tmp/ci/work/8d7d08db6842dc8819f402d25a872e9df1aa0fab.1355353752438","repo":"Colingo/valid-schema.git","hash":"8d7d08db6842dc8819f402d25a872e9df1aa0fab","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355353752545.d3e0aa22","browser":"opera/12.0","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"# number schema\\n\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..4\\n\\n\"]\n","[\"stdout\",\"# tests 4\\n\\n\"]\n","[\"stdout\",\"# pass 4\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0b9bd4","key":["Colingo/valid-schema.git","8d7d08db6842dc8819f402d25a872e9df1aa0fab.1355353752438"],"value":{"_id":"ccc87f2e39902598d0895524bd0b9bd4","_rev":"1-66d1421ce3afd2ced7f2d1ff5c4f8d47","type":"test","time":1355353768938,"commit":{"id":"8d7d08db6842dc8819f402d25a872e9df1aa0fab.1355353752438","dir":"/tmp/ci/work/8d7d08db6842dc8819f402d25a872e9df1aa0fab.1355353752438","repo":"Colingo/valid-schema.git","hash":"8d7d08db6842dc8819f402d25a872e9df1aa0fab","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355353752545.d3e0aa22","browser":"chrome/canary","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"# number schema\\n\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..4\\n\\n\"]\n","[\"stdout\",\"# tests 4\\n\\n\"]\n","[\"stdout\",\"# pass 4\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0b8f69","key":["Colingo/valid-schema.git","8d7d08db6842dc8819f402d25a872e9df1aa0fab.1355353752438"],"value":{"_id":"ccc87f2e39902598d0895524bd0b8f69","_rev":"1-2b1bbc5e240abbea6d4e94a2f8be0bc1","type":"test","time":1355353767749,"commit":{"id":"8d7d08db6842dc8819f402d25a872e9df1aa0fab.1355353752438","dir":"/tmp/ci/work/8d7d08db6842dc8819f402d25a872e9df1aa0fab.1355353752438","repo":"Colingo/valid-schema.git","hash":"8d7d08db6842dc8819f402d25a872e9df1aa0fab","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355353752545.d3e0aa22","browser":"chrome/22.0","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"# number schema\\n\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..4\\n\\n\"]\n","[\"stdout\",\"# tests 4\\n\\n\"]\n","[\"stdout\",\"# pass 4\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0b8a2d","key":["Colingo/valid-schema.git","8d7d08db6842dc8819f402d25a872e9df1aa0fab.1355353752438"],"value":{"_id":"ccc87f2e39902598d0895524bd0b8a2d","_rev":"1-3ccfb98d827ba0ddc7bd8339326fdd75","type":"test","time":1355353763981,"commit":{"id":"8d7d08db6842dc8819f402d25a872e9df1aa0fab.1355353752438","dir":"/tmp/ci/work/8d7d08db6842dc8819f402d25a872e9df1aa0fab.1355353752438","repo":"Colingo/valid-schema.git","hash":"8d7d08db6842dc8819f402d25a872e9df1aa0fab","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355353752545.d3e0aa22","browser":"firefox/nightly","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"# number schema\\n\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..4\\n\\n\"]\n","[\"stdout\",\"# tests 4\\n\\n\"]\n","[\"stdout\",\"# pass 4\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0b7b96","key":["Colingo/valid-schema.git","8d7d08db6842dc8819f402d25a872e9df1aa0fab.1355353752438"],"value":{"_id":"ccc87f2e39902598d0895524bd0b7b96","_rev":"1-3fadcb8e4d1117921bd580d8a7684511","type":"test","time":1355353762772,"commit":{"id":"8d7d08db6842dc8819f402d25a872e9df1aa0fab.1355353752438","dir":"/tmp/ci/work/8d7d08db6842dc8819f402d25a872e9df1aa0fab.1355353752438","repo":"Colingo/valid-schema.git","hash":"8d7d08db6842dc8819f402d25a872e9df1aa0fab","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355353752545.d3e0aa22","browser":"firefox/15.0","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"# number schema\\n\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..4\\n\\n\"]\n","[\"stdout\",\"# tests 4\\n\\n\"]\n","[\"stdout\",\"# pass 4\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0b7afd","key":["Colingo/valid-schema.git","8d7d08db6842dc8819f402d25a872e9df1aa0fab.1355353752438"],"value":{"_id":"ccc87f2e39902598d0895524bd0b7afd","_rev":"1-9797d5f6ca74f7bb3e5a4e1e0046a5f5","type":"test","time":1355353760313,"commit":{"id":"8d7d08db6842dc8819f402d25a872e9df1aa0fab.1355353752438","dir":"/tmp/ci/work/8d7d08db6842dc8819f402d25a872e9df1aa0fab.1355353752438","repo":"Colingo/valid-schema.git","hash":"8d7d08db6842dc8819f402d25a872e9df1aa0fab","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355353752545.d3e0aa22","browser":"iexplore/9.0","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"# number schema\\n\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..4\\n\\n\"]\n","[\"stdout\",\"# tests 4\\n\\n\"]\n","[\"stdout\",\"# pass 4\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0b729b","key":["Colingo/valid-schema.git","8d7d08db6842dc8819f402d25a872e9df1aa0fab.1355353752438"],"value":{"_id":"ccc87f2e39902598d0895524bd0b729b","_rev":"1-95227048dad9c65cdae8c96da266409f","type":"test","time":1355353756249,"commit":{"id":"8d7d08db6842dc8819f402d25a872e9df1aa0fab.1355353752438","dir":"/tmp/ci/work/8d7d08db6842dc8819f402d25a872e9df1aa0fab.1355353752438","repo":"Colingo/valid-schema.git","hash":"8d7d08db6842dc8819f402d25a872e9df1aa0fab","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355353752545.d3e0aa22","browser":"iexplore/8.0","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"not ok 1 TypeError: Object doesn't support this property or method\\n ---\\n operator: error\\n expected:\\n undefined\\n actual:\\n {\\\"message\\\":\\\"Object doesn't support this property or method\\\",\\\"number\\\":-2146827850,\\\"description\\\":\\\"Object doesn't support this property or method\\\"}\\n ...\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"not ok 2 TypeError: Object doesn't support this property or method\\n ---\\n operator: error\\n expected:\\n undefined\\n actual:\\n {\\\"message\\\":\\\"Object doesn't support this property or method\\\",\\\"number\\\":-2146827850,\\\"description\\\":\\\"Object doesn't support this property or method\\\"}\\n ...\\n\\n\"]\n","[\"stdout\",\"# number schema\\n\\n\"]\n","[\"stdout\",\"not ok 3 TypeError: Object doesn't support this property or method\\n ---\\n operator: error\\n expected:\\n undefined\\n actual:\\n {\\\"message\\\":\\\"Object doesn't support this property or method\\\",\\\"number\\\":-2146827850,\\\"description\\\":\\\"Object doesn't support this property or method\\\"}\\n ...\\n\\n\"]\n","[\"stdout\",\"\\n1..3\\n\\n\"]\n","[\"stdout\",\"# tests 3\\n\\n\"]\n","[\"stdout\",\"# pass 0\\n\\n\"]\n","[\"stdout\",\"# fail 3\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0e0741","key":["Colingo/valid-schema.git","82618555a4c56e61700d6842e41f9bb0f2752d7f.1355438900646"],"value":{"_id":"ccc87f2e39902598d0895524bd0e0741","_rev":"1-b575091e7a55aec36b42df3eee7552de","type":"test","time":1355438975820,"commit":{"id":"82618555a4c56e61700d6842e41f9bb0f2752d7f.1355438900646","dir":"/tmp/ci/work/82618555a4c56e61700d6842e41f9bb0f2752d7f.1355438900646","repo":"Colingo/valid-schema.git","hash":"82618555a4c56e61700d6842e41f9bb0f2752d7f","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355438900798.fb272e2","browser":"safari/5.1","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"# number schema\\n\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..4\\n\\n\"]\n","[\"stdout\",\"# tests 4\\n\\n\"]\n","[\"stdout\",\"# pass 4\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0e0136","key":["Colingo/valid-schema.git","82618555a4c56e61700d6842e41f9bb0f2752d7f.1355438900646"],"value":{"_id":"ccc87f2e39902598d0895524bd0e0136","_rev":"1-df97869db49e54a1a1b09c00ed3f9e6f","type":"test","time":1355438975105,"commit":{"id":"82618555a4c56e61700d6842e41f9bb0f2752d7f.1355438900646","dir":"/tmp/ci/work/82618555a4c56e61700d6842e41f9bb0f2752d7f.1355438900646","repo":"Colingo/valid-schema.git","hash":"82618555a4c56e61700d6842e41f9bb0f2752d7f","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355438900798.fb272e2","browser":"opera/12.0","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"# number schema\\n\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..4\\n\\n\"]\n","[\"stdout\",\"# tests 4\\n\\n\"]\n","[\"stdout\",\"# pass 4\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0e00f1","key":["Colingo/valid-schema.git","82618555a4c56e61700d6842e41f9bb0f2752d7f.1355438900646"],"value":{"_id":"ccc87f2e39902598d0895524bd0e00f1","_rev":"1-57531cbde7a025abe083f17e52033923","type":"test","time":1355438944542,"commit":{"id":"82618555a4c56e61700d6842e41f9bb0f2752d7f.1355438900646","dir":"/tmp/ci/work/82618555a4c56e61700d6842e41f9bb0f2752d7f.1355438900646","repo":"Colingo/valid-schema.git","hash":"82618555a4c56e61700d6842e41f9bb0f2752d7f","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355438900798.fb272e2","browser":"chrome/22.0","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"# number schema\\n\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..4\\n\\n\"]\n","[\"stdout\",\"# tests 4\\n\\n\"]\n","[\"stdout\",\"# pass 4\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0daeca","key":["Colingo/valid-schema.git","82618555a4c56e61700d6842e41f9bb0f2752d7f.1355438900646"],"value":{"_id":"ccc87f2e39902598d0895524bd0daeca","_rev":"1-7dd1792383190729144832d8ae2d1f05","type":"test","time":1355438913301,"commit":{"id":"82618555a4c56e61700d6842e41f9bb0f2752d7f.1355438900646","dir":"/tmp/ci/work/82618555a4c56e61700d6842e41f9bb0f2752d7f.1355438900646","repo":"Colingo/valid-schema.git","hash":"82618555a4c56e61700d6842e41f9bb0f2752d7f","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355438900798.fb272e2","browser":"firefox/15.0","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"# number schema\\n\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..4\\n\\n\"]\n","[\"stdout\",\"# tests 4\\n\\n\"]\n","[\"stdout\",\"# pass 4\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0da288","key":["Colingo/valid-schema.git","82618555a4c56e61700d6842e41f9bb0f2752d7f.1355438900646"],"value":{"_id":"ccc87f2e39902598d0895524bd0da288","_rev":"1-2e9eec662aa8b6ddb01e2e69535ca330","type":"test","time":1355438909961,"commit":{"id":"82618555a4c56e61700d6842e41f9bb0f2752d7f.1355438900646","dir":"/tmp/ci/work/82618555a4c56e61700d6842e41f9bb0f2752d7f.1355438900646","repo":"Colingo/valid-schema.git","hash":"82618555a4c56e61700d6842e41f9bb0f2752d7f","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355438900798.fb272e2","browser":"iexplore/9.0","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"# number schema\\n\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..4\\n\\n\"]\n","[\"stdout\",\"# tests 4\\n\\n\"]\n","[\"stdout\",\"# pass 4\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0d9324","key":["Colingo/valid-schema.git","82618555a4c56e61700d6842e41f9bb0f2752d7f.1355438900646"],"value":{"_id":"ccc87f2e39902598d0895524bd0d9324","_rev":"1-058004973e2a4d354485107877cd88f6","type":"test","time":1355438903627,"commit":{"id":"82618555a4c56e61700d6842e41f9bb0f2752d7f.1355438900646","dir":"/tmp/ci/work/82618555a4c56e61700d6842e41f9bb0f2752d7f.1355438900646","repo":"Colingo/valid-schema.git","hash":"82618555a4c56e61700d6842e41f9bb0f2752d7f","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355438900798.fb272e2","browser":"iexplore/8.0","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"not ok 1 TypeError: Object doesn't support this property or method\\n ---\\n operator: error\\n expected:\\n undefined\\n actual:\\n {\\\"message\\\":\\\"Object doesn't support this property or method\\\",\\\"number\\\":-2146827850,\\\"description\\\":\\\"Object doesn't support this property or method\\\"}\\n ...\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"not ok 2 TypeError: Object doesn't support this property or method\\n ---\\n operator: error\\n expected:\\n undefined\\n actual:\\n {\\\"message\\\":\\\"Object doesn't support this property or method\\\",\\\"number\\\":-2146827850,\\\"description\\\":\\\"Object doesn't support this property or method\\\"}\\n ...\\n\\n\"]\n","[\"stdout\",\"# number schema\\n\\n\"]\n","[\"stdout\",\"not ok 3 TypeError: Object doesn't support this property or method\\n ---\\n operator: error\\n expected:\\n undefined\\n actual:\\n {\\\"message\\\":\\\"Object doesn't support this property or method\\\",\\\"number\\\":-2146827850,\\\"description\\\":\\\"Object doesn't support this property or method\\\"}\\n ...\\n\\n\"]\n","[\"stdout\",\"\\n1..3\\n\\n\"]\n","[\"stdout\",\"# tests 3\\n\\n\"]\n","[\"stdout\",\"# pass 0\\n\\n\"]\n","[\"stdout\",\"# fail 3\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd1b0b41","key":["Colingo/valid-schema.git","5da97f7b3085ddb3b9ff7100fd8b8bd63497937f.1355972599149"],"value":{"_id":"ccc87f2e39902598d0895524bd1b0b41","_rev":"1-fb2c247df4baa6120aac1e8ca4c1e756","type":"bundle","time":1355972599332,"id":"1355972599330.655a788c","commit":{"id":"5da97f7b3085ddb3b9ff7100fd8b8bd63497937f.1355972599149","dir":"/tmp/ci/work/5da97f7b3085ddb3b9ff7100fd8b8bd63497937f.1355972599149","repo":"Colingo/valid-schema.git","hash":"5da97f7b3085ddb3b9ff7100fd8b8bd63497937f","branch":"master"},"output":["npm"," http ","GET https://registry.npmjs.org/to-array\n","npm ","http GET https://registry.npmjs.org/tape\n","npm http"," GET https://registry.npmjs.org/browserify\n","npm ","http GET https://registry.npmjs.org/testem\n","npm"," http 304 https://registry.npmjs.org/to-array\n","npm http"," 304 https://registry.npmjs.org/tape\n","npm http"," 304 https://registry.npmjs.org/browserify\n","npm http"," 304 https://registry.npmjs.org/testem\n","npm"," http GET https://registry.npmjs.org/jsonify\n","npm http ","GET https://registry.npmjs.org/deep-equal\n","npm http"," GET https://registry.npmjs.org/defined\n","npm ","http GET https://registry.npmjs.org/detective\n","npm ","http GET https://registry.npmjs.org/buffer-browserify\n","npm ","http GET https://registry.npmjs.org/deputy\n","npm ","http GET https://registry.npmjs.org/resolve\n","npm http"," GET https://registry.npmjs.org/nub\n","npm http"," GET https://registry.npmjs.org/syntax-error\n","npm http"," GET https://registry.npmjs.org/coffee-script\n","npm ","http GET https://registry.npmjs.org/commondir\n","npm ","http GET https://registry.npmjs.org/optimist\n","npm ","http GET https://registry.npmjs.org/crypto-browserify\n","npm ","http GET https://registry.npmjs.org/vm-browserify\n","npm"," ","http GET https://registry.npmjs.org/http-browserify\n","npm"," ","http"," ","304"," https://registry.npmjs.org/deep-equal\n","npm"," ","http"," ","304"," https://registry.npmjs.org/jsonify\n","npm"," ","http"," ","304 https://registry.npmjs.org/defined\n","npm ","http"," GET https://registry.npmjs.org/socket.io/0.9.10\n","npm ","http GET https://registry.npmjs.org/winston/0.3.4\n","npm ","http GET https://registry.npmjs.org/charm/0.0.5\n","npm http"," GET https://registry.npmjs.org/commander\n","npm ","http GET https://registry.npmjs.org/glob/3.0.1\n","npm ","http GET https://registry.npmjs.org/js-yaml/0.3.5\n","npm ","http GET https://registry.npmjs.org/async/0.1.15\n","npm ","http GET https://registry.npmjs.org/rimraf\n","npm ","http GET https://registry.npmjs.org/underscore\n","npm ","http GET https://registry.npmjs.org/backbone\n","npm ","http GET https://registry.npmjs.org/styled_string\n","npm"," http GET https://registry.npmjs.org/colors\n","npm"," http GET https://registry.npmjs.org/fireworm\n","npm ","http GET https://registry.npmjs.org/express/2.5.10\n","npm ","http GET https://registry.npmjs.org/mustache/0.4.0\n","npm http"," 304 https://registry.npmjs.org/deputy\n","npm http"," 304 https://registry.npmjs.org/resolve\n","npm http"," 304 https://registry.npmjs.org/nub\n","npm ","http 304 https://registry.npmjs.org/detective\n","npm http"," 304 https://registry.npmjs.org/buffer-browserify\n","npm http"," 304 https://registry.npmjs.org/syntax-error\n","npm http"," 304 https://registry.npmjs.org/coffee-script\n","npm http"," 304 https://registry.npmjs.org/commondir\n","npm http"," 304 https://registry.npmjs.org/optimist\n","npm http"," 304 https://registry.npmjs.org/crypto-browserify\n","npm http ","304 https://registry.npmjs.org/vm-browserify\n","npm http ","304 https://registry.npmjs.org/http-browserify\n","npm http"," 304 https://registry.npmjs.org/socket.io/0.9.10\n","npm ","http 304 https://registry.npmjs.org/winston/0.3.4\n","npm"," ","http"," ","304"," https://registry.npmjs.org/charm/0.0.5\n","npm"," ","http 304 https://registry.npmjs.org/commander\n","npm ","http GET https://registry.npmjs.org/esprima\n","npm ","http"," GET https://registry.npmjs.org/concat-stream/0.0.8\n","npm"," ","http ","GET https://registry.npmjs.org/mkdirp\n","npm http"," GET https://registry.npmjs.org/base64-js/0.0.2\n","npm ","http 304 https://registry.npmjs.org/js-yaml/0.3.5\n","npm ","http 304 https://registry.npmjs.org/glob/3.0.1\n","npm http"," GET https://registry.npmjs.org/wordwrap\n","npm"," ","http"," ","304"," https://registry.npmjs.org/async/0.1.15\n","npm http 304"," https://registry.npmjs.org/rimraf\n","npm ","http 304 https://registry.npmjs.org/underscore\n","npm ","http 304 https://registry.npmjs.org/styled_string\n","npm http"," 304 https://registry.npmjs.org/backbone\n","npm ","http 304 https://registry.npmjs.org/colors\n","npm http ","304 https://registry.npmjs.org/fireworm\n","npm http"," 304 https://registry.npmjs.org/express/2.5.10\n","npm ","http 304 https://registry.npmjs.org/mustache/0.4.0\n","npm ","http 304 https://registry.npmjs.org/concat-stream/0.0.8\n","npm ","WARN package.json mustache@0.4.0 No README.md file found!\n","npm http ","304 https://registry.npmjs.org/esprima\n","npm http ","304 https://registry.npmjs.org/wordwrap\n","npm ","http 304 https://registry.npmjs.org/base64-js/0.0.2\n","npm http"," 304 https://registry.npmjs.org/mkdirp\n","npm http"," GET https://registry.npmjs.org/graceful-fs\n","npm http"," GET https://registry.npmjs.org/minimatch\n","npm http"," GET https://registry.npmjs.org/fast-list\n","npm http"," GET https://registry.npmjs.org/minimatch\n","npm ","http GET https://registry.npmjs.org/async\n","npm ","http GET https://registry.npmjs.org/keypress\n","npm ","http GET https://registry.npmjs.org/connect\n","npm ","http GET https://registry.npmjs.org/mime/1.2.4\n","npm http"," GET https://registry.npmjs.org/socket.io-client/0.9.10\n","npm ","http GET https://registry.npmjs.org/policyfile/0.0.4\n","npm ","http GET https://registry.npmjs.org/eyes\n","npm http"," GET https://registry.npmjs.org/loggly\n","npm ","http GET https://registry.npmjs.org/set\n","npm ","http GET https://registry.npmjs.org/graceful-fs\n","npm ","http GET https://registry.npmjs.org/qs\n","npm http"," GET https://registry.npmjs.org/redis/0.7.2\n","npm http"," GET https://registry.npmjs.org/pkginfo\n","npm"," http GET https://registry.npmjs.org/inherits\n","npm"," http GET https://registry.npmjs.org/mkdirp/0.3.0\n","npm ","http 304 https://registry.npmjs.org/fast-list\n","npm ","http 304 https://registry.npmjs.org/graceful-fs\n","npm ","http 304 https://registry.npmjs.org/async\n","npm ","http 304 https://registry.npmjs.org/minimatch\n","npm ","http 304 https://registry.npmjs.org/minimatch\n","npm ","http 304 https://registry.npmjs.org/keypress\n","npm http"," 304 https://registry.npmjs.org/connect\n","npm ","WARN package.json connect@1.9.2 No README.md file found!\n","npm http"," 304 https://registry.npmjs.org/socket.io-client/0.9.10\n","npm ","http 304 https://registry.npmjs.org/mime/1.2.4\n","npm http"," 304 https://registry.npmjs.org/policyfile/0.0.4\n","npm http ","304 https://registry.npmjs.org/eyes\n","npm ","http 304 https://registry.npmjs.org/loggly\n","npm http"," 304 https://registry.npmjs.org/set\n","npm http"," 304 https://registry.npmjs.org/graceful-fs\n","npm ","http 304 https://registry.npmjs.org/qs\n","npm http"," GET https://registry.npmjs.org/lru-cache\n","npm"," http ","GET https://registry.npmjs.org/sigmund\n","npm http"," 304 https://registry.npmjs.org/redis/0.7.2\n","npm ","http 304 https://registry.npmjs.org/pkginfo\n","npm http"," 304 https://registry.npmjs.org/mkdirp/0.3.0\n","npm ","http 304 https://registry.npmjs.org/inherits\n","npm"," ","http"," ","304"," https://registry.npmjs.org/sigmund\n","npm ","http GET https://registry.npmjs.org/hiredis\n","npm http"," GET https://registry.npmjs.org/request\n","npm"," http GET https://registry.npmjs.org/timespan\n","npm http"," GET https://registry.npmjs.org/lru-cache\n","npm http GET"," https://registry.npmjs.org/formidable\n","npm http 304"," https://registry.npmjs.org/lru-cache\n","npm http ","GET https://registry.npmjs.org/uglify-js/1.2.5\n","npm ","http GET https://registry.npmjs.org/xmlhttprequest/1.4.2\n","npm ","http GET https://registry.npmjs.org/active-x-obfuscator/0.0.1\n","npm http"," GET https://registry.npmjs.org/ws\n","npm http 304"," https://registry.npmjs.org/formidable\n","npm http ","304 https://registry.npmjs.org/timespan\n","npm ","http 304 https://registry.npmjs.org/lru-cache\n","npm ","http 304 https://registry.npmjs.org/hiredis\n","npm ","WARN package.json hiredis@0.1.14 No README.md file found!\n","\n> hiredis@0.1.14 preinstall /tmp/ci/work/5da97f7b3085ddb3b9ff7100fd8b8bd63497937f.1355972599149/node_modules/testem/node_modules/socket.io/node_modules/redis/node_modules/hiredis\n> make || gmake\n\n","cd deps/hiredis && make static\n","npm"," http ","304 https://registry.npmjs.org/uglify-js/1.2.5\n","npm http"," 304 https://registry.npmjs.org/xmlhttprequest/1.4.2\n","make[1]: Entering directory `/tmp/ci/work/5da97f7b3085ddb3b9ff7100fd8b8bd63497937f.1355972599149/node_modules/testem/node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis'\ncc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb net.c\n","npm http"," 304 https://registry.npmjs.org/active-x-obfuscator/0.0.1\n","npm http ","304 https://registry.npmjs.org/ws\n","npm ","http GET https://registry.npmjs.org/zeparser/0.0.5\n","cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb hiredis.c\n","npm http ","GET https://registry.npmjs.org/commander\n","npm ","http GET https://registry.npmjs.org/tinycolor\n","npm http"," GET https://registry.npmjs.org/options\n","npm ","http 304 https://registry.npmjs.org/request\n","cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb sds.c\n","cc -std=c99 -pedantic -c -O3 -fPIC -Wall -W -Wstrict-prototypes -Wwrite-strings -g -ggdb async.c\n","npm http ","304 https://registry.npmjs.org/zeparser/0.0.5\n","npm http"," 304 https://registry.npmjs.org/options\n","npm http"," 304 https://registry.npmjs.org/tinycolor\n","npm http"," 304 https://registry.npmjs.org/commander\n","ar rcs libhiredis.a net.o hiredis.o sds.o async.o\n","make[1]: Leaving directory `/tmp/ci/work/5da97f7b3085ddb3b9ff7100fd8b8bd63497937f.1355972599149/node_modules/testem/node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis'\n","node-waf configure build\n","Traceback (most recent call last):\n File \"/home/testling/installs/node-v0.8.15/bin/node-waf\", line 14, in \n import Scripting\n File \"/home/testling/installs/node-v0.8.15/bin/../lib/node/wafadmin/Scripting.py\", line 146\n except Utils.WafError, e:\n ^\nSyntaxError: invalid syntax\n","\n> ws@0.4.25 install /tmp/ci/work/5da97f7b3085ddb3b9ff7100fd8b8bd63497937f.1355972599149/node_modules/testem/node_modules/socket.io/node_modules/socket.io-client/node_modules/ws\n> (node-gyp rebuild 2> builderror.log) || (exit 0)\n\n","make: *** [all] Error 1\n","cd deps/hiredis && gmake static\n","gmake[1]: Entering directory `/tmp/ci/work/5da97f7b3085ddb3b9ff7100fd8b8bd63497937f.1355972599149/node_modules/testem/node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis'\ngmake[1]: Nothing to be done for `static'.\n","gmake[1]: Leaving directory `/tmp/ci/work/5da97f7b3085ddb3b9ff7100fd8b8bd63497937f.1355972599149/node_modules/testem/node_modules/socket.io/node_modules/redis/node_modules/hiredis/deps/hiredis'\n","node-waf configure build\n","Traceback (most recent call last):\n File \"/home/testling/installs/node-v0.8.15/bin/node-waf\", line 14, in \n import Scripting\n File \"/home/testling/installs/node-v0.8.15/bin/../lib/node/wafadmin/Scripting.py\", line 146\n except Utils.WafError, e:\n ^\nSyntaxError: invalid syntax\n","gmake: *** [all] Error 1\n","npm WARN"," optional dep failed, continuing hiredis@0.1.14\n","to-array@0.1.3 node_modules/to-array\n\ntape@0.1.3 node_modules/tape\n├── deep-equal@0.0.0\n├── defined@0.0.0\n└── jsonify@0.0.0\n\nbrowserify@1.16.6 node_modules/browserify\n├── nub@0.0.0\n├── commondir@0.0.1\n├── vm-browserify@0.0.1\n├── crypto-browserify@0.1.2\n├── resolve@0.2.3\n├── coffee-script@1.4.0\n├── http-browserify@0.1.6 (concat-stream@0.0.8)\n├── buffer-browserify@0.0.4 (base64-js@0.0.2)\n├── optimist@0.3.5 (wordwrap@0.0.2)\n├── deputy@0.0.4 (mkdirp@0.3.4)\n├── syntax-error@0.0.0 (esprima@0.9.9)\n└── detective@0.2.1 (esprima@0.9.9)\n\ntestem@0.2.50 node_modules/testem\n├── styled_string@0.0.1\n├── colors@0.6.0-1\n├── mustache@0.4.0\n├── charm@0.0.5\n├── backbone@0.9.9\n├── async@0.1.15\n├── underscore@1.4.3\n├── js-yaml@0.3.5\n├── rimraf@2.0.3 (graceful-fs@1.1.14)\n├── commander@1.1.1 (keypress@0.1.0)\n├── fireworm@0.0.8 (set@1.0.0, async@0.1.22, minimatch@0.2.9)\n├── glob@3.0.1 (inherits@1.0.0, graceful-fs@1.1.14, fast-list@1.0.2, minimatch@0.1.5)\n├── express@2.5.10 (qs@0.4.2, mime@1.2.4, mkdirp@0.3.0, connect@1.9.2)\n├── winston@0.3.4 (eyes@0.1.8, pkginfo@0.2.3, loggly@0.3.11)\n└── socket.io@0.9.10 (policyfile@0.0.4, redis@0.7.2, socket.io-client@0.9.10)\n","Expressions in require() statements:\n"," require(file)\n","\n","/home/testling/projects/testling-ci/git/node_modules/browserify/lib/wrap.js:459\n"," throw moduleError('Cannot find module');\n "," ^\n","Error: Cannot find module: \"./lib/default_stream\" from directory \"/tmp/ci/work/5da97f7b3085ddb3b9ff7100fd8b8bd63497937f.1355972599149/test\" while processing file /tmp/ci/work/5da97f7b3085ddb3b9ff7100fd8b8bd63497937f.1355972599149/test/bundle.js\n at moduleError (/home/testling/projects/testling-ci/git/node_modules/browserify/lib/wrap.js:420:16)\n at Function.Wrap.require (/home/testling/projects/testling-ci/git/node_modules/browserify/lib/wrap.js:459:19)\n at Function.module.exports.Object.keys.forEach.self.(anonymous function) [as require] (/home/testling/projects/testling-ci/git/node_modules/browserify/index.js:158:28)\n at Wrap.require (/home/testling/projects/testling-ci/git/node_modules/browserify/lib/wrap.js:541:14)\n at Array.forEach (native)\n at Function.Wrap.require (/home/testling/projects/testling-ci/git/node_modules/browserify/lib/wrap.js:533:27)\n at Function.module.exports.Object.keys.forEach.self.(anonymous function) [as require] (/home/testling/projects/testling-ci/git/node_modules/browserify/index.js:158:28)\n at /home/testling/projects/testling-ci/git/bin/bundle.js:62:12\n at Array.forEach (native)\n at Object. (/home/testling/projects/testling-ci/git/bin/bundle.js:61:7)\n","\nerror creating bundle\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0df4e2","key":["Colingo/valid-schema.git","54be1e1d9a1fe1697b4baf60b664c1e992182e21.1355438916359"],"value":{"_id":"ccc87f2e39902598d0895524bd0df4e2","_rev":"1-7b8a5dcd483a6d0ece28bb3b9070936f","type":"test","time":1355438941313,"commit":{"id":"54be1e1d9a1fe1697b4baf60b664c1e992182e21.1355438916359","dir":"/tmp/ci/work/54be1e1d9a1fe1697b4baf60b664c1e992182e21.1355438916359","repo":"Colingo/valid-schema.git","hash":"54be1e1d9a1fe1697b4baf60b664c1e992182e21","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355438916478.128c5835","browser":"safari/5.1","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"# number schema\\n\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..4\\n\\n\"]\n","[\"stdout\",\"# tests 4\\n\\n\"]\n","[\"stdout\",\"# pass 4\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0de68f","key":["Colingo/valid-schema.git","54be1e1d9a1fe1697b4baf60b664c1e992182e21.1355438916359"],"value":{"_id":"ccc87f2e39902598d0895524bd0de68f","_rev":"1-3b23ea08dfc18558209ecfb5bc6aad27","type":"test","time":1355438934308,"commit":{"id":"54be1e1d9a1fe1697b4baf60b664c1e992182e21.1355438916359","dir":"/tmp/ci/work/54be1e1d9a1fe1697b4baf60b664c1e992182e21.1355438916359","repo":"Colingo/valid-schema.git","hash":"54be1e1d9a1fe1697b4baf60b664c1e992182e21","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355438916478.128c5835","browser":"opera/12.0","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"# number schema\\n\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..4\\n\\n\"]\n","[\"stdout\",\"# tests 4\\n\\n\"]\n","[\"stdout\",\"# pass 4\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0de297","key":["Colingo/valid-schema.git","54be1e1d9a1fe1697b4baf60b664c1e992182e21.1355438916359"],"value":{"_id":"ccc87f2e39902598d0895524bd0de297","_rev":"1-55ef5525fca00489e0a4da0136c2af5c","type":"test","time":1355438929591,"commit":{"id":"54be1e1d9a1fe1697b4baf60b664c1e992182e21.1355438916359","dir":"/tmp/ci/work/54be1e1d9a1fe1697b4baf60b664c1e992182e21.1355438916359","repo":"Colingo/valid-schema.git","hash":"54be1e1d9a1fe1697b4baf60b664c1e992182e21","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355438916478.128c5835","browser":"chrome/canary","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"# number schema\\n\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..4\\n\\n\"]\n","[\"stdout\",\"# tests 4\\n\\n\"]\n","[\"stdout\",\"# pass 4\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0dd92a","key":["Colingo/valid-schema.git","54be1e1d9a1fe1697b4baf60b664c1e992182e21.1355438916359"],"value":{"_id":"ccc87f2e39902598d0895524bd0dd92a","_rev":"1-86119c823c84db70f5b21656d48605cb","type":"test","time":1355438928189,"commit":{"id":"54be1e1d9a1fe1697b4baf60b664c1e992182e21.1355438916359","dir":"/tmp/ci/work/54be1e1d9a1fe1697b4baf60b664c1e992182e21.1355438916359","repo":"Colingo/valid-schema.git","hash":"54be1e1d9a1fe1697b4baf60b664c1e992182e21","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355438916478.128c5835","browser":"chrome/22.0","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"# number schema\\n\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..4\\n\\n\"]\n","[\"stdout\",\"# tests 4\\n\\n\"]\n","[\"stdout\",\"# pass 4\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0dd5ec","key":["Colingo/valid-schema.git","54be1e1d9a1fe1697b4baf60b664c1e992182e21.1355438916359"],"value":{"_id":"ccc87f2e39902598d0895524bd0dd5ec","_rev":"1-ffd74b6588bbe62bee9c258bfa09650c","type":"test","time":1355438923360,"commit":{"id":"54be1e1d9a1fe1697b4baf60b664c1e992182e21.1355438916359","dir":"/tmp/ci/work/54be1e1d9a1fe1697b4baf60b664c1e992182e21.1355438916359","repo":"Colingo/valid-schema.git","hash":"54be1e1d9a1fe1697b4baf60b664c1e992182e21","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355438916478.128c5835","browser":"firefox/nightly","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"# number schema\\n\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..4\\n\\n\"]\n","[\"stdout\",\"# tests 4\\n\\n\"]\n","[\"stdout\",\"# pass 4\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0dd146","key":["Colingo/valid-schema.git","54be1e1d9a1fe1697b4baf60b664c1e992182e21.1355438916359"],"value":{"_id":"ccc87f2e39902598d0895524bd0dd146","_rev":"1-49e4debfbc00fd1c6ab1a4374d296a07","type":"test","time":1355438922966,"commit":{"id":"54be1e1d9a1fe1697b4baf60b664c1e992182e21.1355438916359","dir":"/tmp/ci/work/54be1e1d9a1fe1697b4baf60b664c1e992182e21.1355438916359","repo":"Colingo/valid-schema.git","hash":"54be1e1d9a1fe1697b4baf60b664c1e992182e21","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355438916478.128c5835","browser":"firefox/15.0","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"# number schema\\n\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..4\\n\\n\"]\n","[\"stdout\",\"# tests 4\\n\\n\"]\n","[\"stdout\",\"# pass 4\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0dc22a","key":["Colingo/valid-schema.git","54be1e1d9a1fe1697b4baf60b664c1e992182e21.1355438916359"],"value":{"_id":"ccc87f2e39902598d0895524bd0dc22a","_rev":"1-b536dd2683703c3d577da299d21c49da","type":"test","time":1355438922467,"commit":{"id":"54be1e1d9a1fe1697b4baf60b664c1e992182e21.1355438916359","dir":"/tmp/ci/work/54be1e1d9a1fe1697b4baf60b664c1e992182e21.1355438916359","repo":"Colingo/valid-schema.git","hash":"54be1e1d9a1fe1697b4baf60b664c1e992182e21","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355438916478.128c5835","browser":"iexplore/9.0","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"# number schema\\n\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..4\\n\\n\"]\n","[\"stdout\",\"# tests 4\\n\\n\"]\n","[\"stdout\",\"# pass 4\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0dbb5c","key":["Colingo/valid-schema.git","54be1e1d9a1fe1697b4baf60b664c1e992182e21.1355438916359"],"value":{"_id":"ccc87f2e39902598d0895524bd0dbb5c","_rev":"1-9907e19d23d0bfe5bf373c411e0fc09b","type":"test","time":1355438918547,"commit":{"id":"54be1e1d9a1fe1697b4baf60b664c1e992182e21.1355438916359","dir":"/tmp/ci/work/54be1e1d9a1fe1697b4baf60b664c1e992182e21.1355438916359","repo":"Colingo/valid-schema.git","hash":"54be1e1d9a1fe1697b4baf60b664c1e992182e21","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355438916478.128c5835","browser":"iexplore/8.0","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"not ok 1 TypeError: Object doesn't support this property or method\\n ---\\n operator: error\\n expected:\\n undefined\\n actual:\\n {\\\"message\\\":\\\"Object doesn't support this property or method\\\",\\\"number\\\":-2146827850,\\\"description\\\":\\\"Object doesn't support this property or method\\\"}\\n ...\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"not ok 2 TypeError: Object doesn't support this property or method\\n ---\\n operator: error\\n expected:\\n undefined\\n actual:\\n {\\\"message\\\":\\\"Object doesn't support this property or method\\\",\\\"number\\\":-2146827850,\\\"description\\\":\\\"Object doesn't support this property or method\\\"}\\n ...\\n\\n\"]\n","[\"stdout\",\"# number schema\\n\\n\"]\n","[\"stdout\",\"not ok 3 TypeError: Object doesn't support this property or method\\n ---\\n operator: error\\n expected:\\n undefined\\n actual:\\n {\\\"message\\\":\\\"Object doesn't support this property or method\\\",\\\"number\\\":-2146827850,\\\"description\\\":\\\"Object doesn't support this property or method\\\"}\\n ...\\n\\n\"]\n","[\"stdout\",\"\\n1..3\\n\\n\"]\n","[\"stdout\",\"# tests 3\\n\\n\"]\n","[\"stdout\",\"# pass 0\\n\\n\"]\n","[\"stdout\",\"# fail 3\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0b6ef8","key":["Colingo/valid-schema.git","4389d95d7b6123c320292b867333be2dee28f4ce.1355353516604"],"value":{"_id":"ccc87f2e39902598d0895524bd0b6ef8","_rev":"1-d9f127f5a659ef4057bf547877b8f642","type":"test","time":1355353540398,"commit":{"id":"4389d95d7b6123c320292b867333be2dee28f4ce.1355353516604","dir":"/tmp/ci/work/4389d95d7b6123c320292b867333be2dee28f4ce.1355353516604","repo":"Colingo/valid-schema.git","hash":"4389d95d7b6123c320292b867333be2dee28f4ce","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355353516700.f3b39b59","browser":"safari/5.1","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"# number schema\\n\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..4\\n\\n\"]\n","[\"stdout\",\"# tests 4\\n\\n\"]\n","[\"stdout\",\"# pass 4\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0b6bf3","key":["Colingo/valid-schema.git","4389d95d7b6123c320292b867333be2dee28f4ce.1355353516604"],"value":{"_id":"ccc87f2e39902598d0895524bd0b6bf3","_rev":"1-4e506ec9534c8c3489f737f1f70938b3","type":"test","time":1355353538741,"commit":{"id":"4389d95d7b6123c320292b867333be2dee28f4ce.1355353516604","dir":"/tmp/ci/work/4389d95d7b6123c320292b867333be2dee28f4ce.1355353516604","repo":"Colingo/valid-schema.git","hash":"4389d95d7b6123c320292b867333be2dee28f4ce","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355353516700.f3b39b59","browser":"opera/12.0","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"# number schema\\n\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..4\\n\\n\"]\n","[\"stdout\",\"# tests 4\\n\\n\"]\n","[\"stdout\",\"# pass 4\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0b65d9","key":["Colingo/valid-schema.git","4389d95d7b6123c320292b867333be2dee28f4ce.1355353516604"],"value":{"_id":"ccc87f2e39902598d0895524bd0b65d9","_rev":"1-c88a7a474de21653b067e39c618cc728","type":"test","time":1355353536930,"commit":{"id":"4389d95d7b6123c320292b867333be2dee28f4ce.1355353516604","dir":"/tmp/ci/work/4389d95d7b6123c320292b867333be2dee28f4ce.1355353516604","repo":"Colingo/valid-schema.git","hash":"4389d95d7b6123c320292b867333be2dee28f4ce","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355353516700.f3b39b59","browser":"chrome/canary","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"# number schema\\n\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..4\\n\\n\"]\n","[\"stdout\",\"# tests 4\\n\\n\"]\n","[\"stdout\",\"# pass 4\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0b650e","key":["Colingo/valid-schema.git","4389d95d7b6123c320292b867333be2dee28f4ce.1355353516604"],"value":{"_id":"ccc87f2e39902598d0895524bd0b650e","_rev":"1-8381352d6acdc3b29330655654c72c57","type":"test","time":1355353534460,"commit":{"id":"4389d95d7b6123c320292b867333be2dee28f4ce.1355353516604","dir":"/tmp/ci/work/4389d95d7b6123c320292b867333be2dee28f4ce.1355353516604","repo":"Colingo/valid-schema.git","hash":"4389d95d7b6123c320292b867333be2dee28f4ce","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355353516700.f3b39b59","browser":"chrome/22.0","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"# number schema\\n\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..4\\n\\n\"]\n","[\"stdout\",\"# tests 4\\n\\n\"]\n","[\"stdout\",\"# pass 4\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0b5a5b","key":["Colingo/valid-schema.git","4389d95d7b6123c320292b867333be2dee28f4ce.1355353516604"],"value":{"_id":"ccc87f2e39902598d0895524bd0b5a5b","_rev":"1-2dcd94fd53d8529027825deb9034d320","type":"test","time":1355353528581,"commit":{"id":"4389d95d7b6123c320292b867333be2dee28f4ce.1355353516604","dir":"/tmp/ci/work/4389d95d7b6123c320292b867333be2dee28f4ce.1355353516604","repo":"Colingo/valid-schema.git","hash":"4389d95d7b6123c320292b867333be2dee28f4ce","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355353516700.f3b39b59","browser":"firefox/nightly","output":["[\"stdout\",\"TAP version 13\\u000a\\u000a\"]\n","[\"stdout\",\"# error case\\u000a\\u000a\"]\n","[\"stdout\",\"not ok 1 TypeError: Object.keys is not a function\\u000a ---\\u000a operator: error\\u000a expected:\\u000a \\u000a actual:\\u000a {\\\"message\\\":\\\"Object.keys is not a function\\\",\\\"fileName\\\":\\\"http://git.testling.com/bundle/1355353516700.f3b39b59.js\\\",\\\"lineNumber\\\":2311,\\\"stack\\\":\\\"([object Object])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2311\\\\u000a([object Object])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2249\\\\u000a()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2325\\\\u000a()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2285\\\\u000a()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2291\\\\u000a([object MessageEvent])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2251\\\\u000a\\\"}\\u000a stack:\\u000a ([object Object])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2311\\u000a ([object Object])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2249\\u000a ()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2325\\u000a ()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2285\\u000a ()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2291\\u000a ([object MessageEvent])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2251\\u000a \\u000a ...\\u000a\\u000a\"]\n","[\"stdout\",\"# correct case\\u000a\\u000a\"]\n","[\"stdout\",\"not ok 2 TypeError: Object.keys is not a function\\u000a ---\\u000a operator: error\\u000a expected:\\u000a \\u000a actual:\\u000a {\\\"message\\\":\\\"Object.keys is not a function\\\",\\\"fileName\\\":\\\"http://git.testling.com/bundle/1355353516700.f3b39b59.js\\\",\\\"lineNumber\\\":2311,\\\"stack\\\":\\\"([object Object])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2311\\\\u000a([object Object])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2261\\\\u000a()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2325\\\\u000a()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2285\\\\u000a()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2291\\\\u000a([object MessageEvent])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2251\\\\u000a\\\"}\\u000a stack:\\u000a ([object Object])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2311\\u000a ([object Object])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2261\\u000a ()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2325\\u000a ()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2285\\u000a ()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2291\\u000a ([object MessageEvent])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2251\\u000a \\u000a ...\\u000a\\u000a\"]\n","[\"stdout\",\"# number schema\\u000a\\u000a\"]\n","[\"stdout\",\"not ok 3 TypeError: Object.keys is not a function\\u000a ---\\u000a operator: error\\u000a expected:\\u000a \\u000a actual:\\u000a {\\\"message\\\":\\\"Object.keys is not a function\\\",\\\"fileName\\\":\\\"http://git.testling.com/bundle/1355353516700.f3b39b59.js\\\",\\\"lineNumber\\\":2311,\\\"stack\\\":\\\"([object Object])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2311\\\\u000a([object Object])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2275\\\\u000a()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2325\\\\u000a()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2285\\\\u000a()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2291\\\\u000a([object MessageEvent])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2251\\\\u000a\\\"}\\u000a stack:\\u000a ([object Object])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2311\\u000a ([object Object])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2275\\u000a ()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2325\\u000a ()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2285\\u000a ()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2291\\u000a ([object MessageEvent])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2251\\u000a \\u000a ...\\u000a\\u000a\"]\n","[\"stdout\",\"\\u000a1..3\\u000a\\u000a\"]\n","[\"stdout\",\"# tests 3\\u000a\\u000a\"]\n","[\"stdout\",\"# pass 0\\u000a\\u000a\"]\n","[\"stdout\",\"# fail 3\\u000a\\u000a\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0b4a6c","key":["Colingo/valid-schema.git","4389d95d7b6123c320292b867333be2dee28f4ce.1355353516604"],"value":{"_id":"ccc87f2e39902598d0895524bd0b4a6c","_rev":"1-5ca1587eaada546a40b5f14c377ce3a3","type":"test","time":1355353524746,"commit":{"id":"4389d95d7b6123c320292b867333be2dee28f4ce.1355353516604","dir":"/tmp/ci/work/4389d95d7b6123c320292b867333be2dee28f4ce.1355353516604","repo":"Colingo/valid-schema.git","hash":"4389d95d7b6123c320292b867333be2dee28f4ce","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355353516700.f3b39b59","browser":"firefox/15.0","output":["[\"stdout\",\"TAP version 13\\u000a\\u000a\"]\n","[\"stdout\",\"# error case\\u000a\\u000a\"]\n","[\"stdout\",\"not ok 1 TypeError: Object.keys is not a function\\u000a ---\\u000a operator: error\\u000a expected:\\u000a \\u000a actual:\\u000a {\\\"message\\\":\\\"Object.keys is not a function\\\",\\\"fileName\\\":\\\"http://git.testling.com/bundle/1355353516700.f3b39b59.js\\\",\\\"lineNumber\\\":2311,\\\"stack\\\":\\\"([object Object])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2311\\\\u000a([object Object])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2249\\\\u000a()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2325\\\\u000a()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2285\\\\u000a()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2291\\\\u000a([object MessageEvent])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2251\\\\u000a\\\"}\\u000a stack:\\u000a ([object Object])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2311\\u000a ([object Object])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2249\\u000a ()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2325\\u000a ()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2285\\u000a ()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2291\\u000a ([object MessageEvent])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2251\\u000a \\u000a ...\\u000a\\u000a\"]\n","[\"stdout\",\"# correct case\\u000a\\u000a\"]\n","[\"stdout\",\"not ok 2 TypeError: Object.keys is not a function\\u000a ---\\u000a operator: error\\u000a expected:\\u000a \\u000a actual:\\u000a {\\\"message\\\":\\\"Object.keys is not a function\\\",\\\"fileName\\\":\\\"http://git.testling.com/bundle/1355353516700.f3b39b59.js\\\",\\\"lineNumber\\\":2311,\\\"stack\\\":\\\"([object Object])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2311\\\\u000a([object Object])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2261\\\\u000a()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2325\\\\u000a()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2285\\\\u000a()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2291\\\\u000a([object MessageEvent])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2251\\\\u000a\\\"}\\u000a stack:\\u000a ([object Object])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2311\\u000a ([object Object])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2261\\u000a ()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2325\\u000a ()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2285\\u000a ()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2291\\u000a ([object MessageEvent])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2251\\u000a \\u000a ...\\u000a\\u000a\"]\n","[\"stdout\",\"# number schema\\u000a\\u000a\"]\n","[\"stdout\",\"not ok 3 TypeError: Object.keys is not a function\\u000a ---\\u000a operator: error\\u000a expected:\\u000a \\u000a actual:\\u000a {\\\"message\\\":\\\"Object.keys is not a function\\\",\\\"fileName\\\":\\\"http://git.testling.com/bundle/1355353516700.f3b39b59.js\\\",\\\"lineNumber\\\":2311,\\\"stack\\\":\\\"([object Object])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2311\\\\u000a([object Object])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2275\\\\u000a()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2325\\\\u000a()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2285\\\\u000a()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2291\\\\u000a([object MessageEvent])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2251\\\\u000a\\\"}\\u000a stack:\\u000a ([object Object])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2311\\u000a ([object Object])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2275\\u000a ()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2325\\u000a ()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2285\\u000a ()@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2291\\u000a ([object MessageEvent])@http://git.testling.com/bundle/1355353516700.f3b39b59.js:2251\\u000a \\u000a ...\\u000a\\u000a\"]\n","[\"stdout\",\"\\u000a1..3\\u000a\\u000a\"]\n","[\"stdout\",\"# tests 3\\u000a\\u000a\"]\n","[\"stdout\",\"# pass 0\\u000a\\u000a\"]\n","[\"stdout\",\"# fail 3\\u000a\\u000a\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0b4991","key":["Colingo/valid-schema.git","4389d95d7b6123c320292b867333be2dee28f4ce.1355353516604"],"value":{"_id":"ccc87f2e39902598d0895524bd0b4991","_rev":"1-b4e8752a7493d995ba6cd5b02632cb58","type":"test","time":1355353523922,"commit":{"id":"4389d95d7b6123c320292b867333be2dee28f4ce.1355353516604","dir":"/tmp/ci/work/4389d95d7b6123c320292b867333be2dee28f4ce.1355353516604","repo":"Colingo/valid-schema.git","hash":"4389d95d7b6123c320292b867333be2dee28f4ce","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355353516700.f3b39b59","browser":"iexplore/9.0","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"ok 1 should be equal\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"ok 2 should be equal\\n\\n\"]\n","[\"stdout\",\"# number schema\\n\\n\"]\n","[\"stdout\",\"ok 3 should be equal\\n\\n\"]\n","[\"stdout\",\"ok 4 should be equal\\n\\n\"]\n","[\"stdout\",\"\\n1..4\\n\\n\"]\n","[\"stdout\",\"# tests 4\\n\\n\"]\n","[\"stdout\",\"# pass 4\\n\\n\"]\n","[\"stdout\",\"\\n# ok\\n\\n\"]\n"]}} +, +{"id":"ccc87f2e39902598d0895524bd0b423a","key":["Colingo/valid-schema.git","4389d95d7b6123c320292b867333be2dee28f4ce.1355353516604"],"value":{"_id":"ccc87f2e39902598d0895524bd0b423a","_rev":"1-e058b43fdcd03a780dc2bb5f15c35418","type":"test","time":1355353520024,"commit":{"id":"4389d95d7b6123c320292b867333be2dee28f4ce.1355353516604","dir":"/tmp/ci/work/4389d95d7b6123c320292b867333be2dee28f4ce.1355353516604","repo":"Colingo/valid-schema.git","hash":"4389d95d7b6123c320292b867333be2dee28f4ce","branch":"master"},"params":{"files":"test/*.js","browsers":{"ie":["8","9"],"firefox":["15","nightly"],"chrome":["22","canary"],"opera":["12"],"safari":["5.1"]}},"files":["test/index.js"],"id":"1355353516700.f3b39b59","browser":"iexplore/8.0","output":["[\"stdout\",\"TAP version 13\\n\\n\"]\n","[\"stdout\",\"# error case\\n\\n\"]\n","[\"stdout\",\"not ok 1 TypeError: Object doesn't support this property or method\\n ---\\n operator: error\\n expected:\\n undefined\\n actual:\\n {\\\"message\\\":\\\"Object doesn't support this property or method\\\",\\\"number\\\":-2146827850,\\\"description\\\":\\\"Object doesn't support this property or method\\\"}\\n ...\\n\\n\"]\n","[\"stdout\",\"# correct case\\n\\n\"]\n","[\"stdout\",\"not ok 2 TypeError: Object doesn't support this property or method\\n ---\\n operator: error\\n expected:\\n undefined\\n actual:\\n {\\\"message\\\":\\\"Object doesn't support this property or method\\\",\\\"number\\\":-2146827850,\\\"description\\\":\\\"Object doesn't support this property or method\\\"}\\n ...\\n\\n\"]\n","[\"stdout\",\"# number schema\\n\\n\"]\n","[\"stdout\",\"not ok 3 TypeError: Object doesn't support this property or method\\n ---\\n operator: error\\n expected:\\n undefined\\n actual:\\n {\\\"message\\\":\\\"Object doesn't support this property or method\\\",\\\"number\\\":-2146827850,\\\"description\\\":\\\"Object doesn't support this property or method\\\"}\\n ...\\n\\n\"]\n","[\"stdout\",\"\\n1..3\\n\\n\"]\n","[\"stdout\",\"# tests 3\\n\\n\"]\n","[\"stdout\",\"# pass 0\\n\\n\"]\n","[\"stdout\",\"# fail 3\\n\\n\"]\n"]}} +] diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/index.html b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/index.html new file mode 100644 index 00000000..7001c209 --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/index.html @@ -0,0 +1,9 @@ + + + xhr + + +
    + + + diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/main.js b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/main.js new file mode 100644 index 00000000..e2903ccb --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/main.js @@ -0,0 +1,13 @@ +var http = require('../../'); +var JSONStream = require('JSONStream'); + +http.get({ path : '/data.json' }, function (res) { + var parser = JSONStream.parse([ true ]); + res.pipe(parser); + + parser.on('data', function (msg) { + var div = document.createElement('div'); + div.textContent = JSON.stringify(msg); + document.body.appendChild(div); + }); +}); diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/.travis.yml b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/.travis.yml new file mode 100644 index 00000000..cabaaceb --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.8 + diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/LICENSE.APACHE2 b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/LICENSE.APACHE2 new file mode 100644 index 00000000..6366c047 --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/LICENSE.APACHE2 @@ -0,0 +1,15 @@ +Apache License, Version 2.0 + +Copyright (c) 2011 Dominic Tarr + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/LICENSE.MIT b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/LICENSE.MIT new file mode 100644 index 00000000..6eafbd73 --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/LICENSE.MIT @@ -0,0 +1,24 @@ +The MIT License + +Copyright (c) 2011 Dominic Tarr + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/examples/all_docs.js b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/examples/all_docs.js new file mode 100644 index 00000000..fa87fe52 --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/examples/all_docs.js @@ -0,0 +1,13 @@ +var request = require('request') + , JSONStream = require('JSONStream') + , es = require('event-stream') + +var parser = JSONStream.parse(['rows', true]) //emit parts that match this path (any element of the rows array) + , req = request({url: 'http://isaacs.couchone.com/registry/_all_docs'}) + , logger = es.mapSync(function (data) { //create a stream that logs to stderr, + console.error(data) + return data + }) + +req.pipe(parser) +parser.pipe(logger) diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/index.js b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/index.js new file mode 100644 index 00000000..87201ad1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/index.js @@ -0,0 +1,189 @@ +var Parser = require('jsonparse') + , Stream = require('stream').Stream + +/* + + the value of this.stack that creationix's jsonparse has is weird. + + it makes this code ugly, but his problem is way harder that mine, + so i'll forgive him. + +*/ + +exports.parse = function (path) { + + var stream = new Stream() + var parser = new Parser() + var count = 0 + if(!path || !path.length) + path = null + parser.onValue = function () { + if(!this.root && this.stack.length == 1){ + stream.root = this.value + } + if(!path || this.stack.length !== path.length) + return + var _path = [] + for( var i = 0; i < (path.length - 1); i++) { + var key = path[i] + var c = this.stack[1 + (+i)] + + if(!c) { + return + } + var m = check(key, c.key) + _path.push(c.key) + + if(!m) + return + + } + var c = this + + var key = path[path.length - 1] + var m = check(key, c.key) + if(!m) + return + _path.push(c.key) + + count ++ + stream.emit('data', this.value[this.key]) + } + + parser._onToken = parser.onToken; + + parser.onToken = function (token, value) { + parser._onToken(token, value); + if (this.stack.length === 0) { + if (stream.root) { + if(!path) + stream.emit('data', stream.root) + stream.emit('root', stream.root, count) + count = 0; + stream.root = null; + } + } + } + + parser.onError = function (err) { + stream.emit('error', err) + } + stream.readable = true + stream.writable = true + stream.write = function (chunk) { + if('string' === typeof chunk) { + if ('undefined' === typeof Buffer) { + var buf = new Array(chunk.length) + for (var i = 0; i < chunk.length; i++) buf[i] = chunk.charCodeAt(i) + chunk = new Int32Array(buf) + } else { + chunk = new Buffer(chunk) + } + } + parser.write(chunk) + } + stream.end = function (data) { + if(data) + stream.write(data) + stream.emit('end') + } + + stream.destroy = function () { + stream.emit('close'); + } + + return stream +} + +function check (x, y) { + if ('string' === typeof x) + return y == x + else if (x && 'function' === typeof x.exec) + return x.exec(y) + else if ('boolean' === typeof x) + return x + else if ('function' === typeof x) + return x(y) + return false +} + +exports.stringify = function (op, sep, cl) { + if (op === false){ + op = '' + sep = '\n' + cl = '' + } else if (op == null) { + + op = '[\n' + sep = '\n,\n' + cl = '\n]\n' + + } + + //else, what ever you like + + var stream = new Stream () + , first = true + , ended = false + , anyData = false + stream.write = function (data) { + anyData = true + var json = JSON.stringify(data) + if(first) { first = false ; stream.emit('data', op + json)} + else stream.emit('data', sep + json) + } + stream.end = function (data) { + if(ended) + return + ended = true + if(data) stream.write(data) + if(!anyData) stream.emit('data', op) + stream.emit('data', cl) + + stream.emit('end') + } + stream.writable = true + stream.readable = true + + return stream +} + +exports.stringifyObject = function (op, sep, cl) { + if (op === false){ + op = '' + sep = '\n' + cl = '' + } else if (op == null) { + + op = '{\n' + sep = '\n,\n' + cl = '\n}\n' + + } + + //else, what ever you like + + var stream = new Stream () + , first = true + , ended = false + , anyData = false + stream.write = function (data) { + anyData = true + var json = JSON.stringify(data[0]) + ':' + JSON.stringify(data[1]) + if(first) { first = false ; stream.emit('data', op + json)} + else stream.emit('data', sep + json) + } + stream.end = function (data) { + if(ended) return + ended = true + if(data) stream.write(data) + if(!anyData) stream.emit('data', op) + stream.emit('data', cl) + + stream.emit('end') + } + stream.writable = true + stream.readable = true + + return stream +} diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/LICENSE b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/LICENSE new file mode 100644 index 00000000..6dc24be5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/LICENSE @@ -0,0 +1,24 @@ +The MIT License + +Copyright (c) 2012 Tim Caswell + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/README.markdown b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/README.markdown new file mode 100644 index 00000000..0f405d35 --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/README.markdown @@ -0,0 +1,11 @@ +This is a streaming JSON parser. For a simpler, sax-based version see this gist: https://gist.github.com/1821394 + +The MIT License (MIT) +Copyright (c) 2011-2012 Tim Caswell + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. + diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/bench.js b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/bench.js new file mode 100644 index 00000000..b36d92f7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/bench.js @@ -0,0 +1,26 @@ +var fs = require('fs'), + Parser = require('./jsonparse'); + + +var json = fs.readFileSync("samplejson/basic.json"); + + +while (true) { + var start = Date.now(); + for (var i = 0; i < 1000; i++) { + JSON.parse(json); + } + var first = Date.now() - start; + + start = Date.now(); + var p = new Parser(); + for (var i = 0; i < 1000; i++) { + p.write(json); + } + var second = Date.now() - start; + + + console.log("JSON.parse took %s", first); + console.log("streaming parser took %s", second); + console.log("streaming is %s times slower", second / first); +} diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/examples/twitterfeed.js b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/examples/twitterfeed.js new file mode 100644 index 00000000..10210d47 --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/examples/twitterfeed.js @@ -0,0 +1,30 @@ +var Parser = require('../jsonparse'); +var Http = require('http'); +require('./colors'); +var p = new Parser(); +var cred = require('./credentials'); +var client = Http.createClient(80, "stream.twitter.com"); +var request = client.request("GET", "/1/statuses/sample.json", { + "Host": "stream.twitter.com", + "Authorization": (new Buffer(cred.username + ":" + cred.password)).toString("base64") +}); +request.on('response', function (response) { + console.log(response.statusCode); + console.dir(response.headers); + response.on('data', function (chunk) { + p.write(chunk); + }); + response.on('end', function () { + console.log("END"); + }); +}); +request.end(); +var text = "", name = ""; +p.onValue = function (value) { + if (this.stack.length === 1 && this.key === 'text') { text = value; } + if (this.stack.length === 2 && this.key === 'name' && this.stack[1].key === 'user') { name = value; } + if (this.stack.length === 0) { + console.log(text.blue + " - " + name.yellow); + text = name = ""; + } +}; diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js new file mode 100644 index 00000000..66273420 --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/jsonparse.js @@ -0,0 +1,379 @@ +/*global Buffer*/ +// Named constants with unique integer values +var C = {}; +// Tokens +var LEFT_BRACE = C.LEFT_BRACE = 0x1; +var RIGHT_BRACE = C.RIGHT_BRACE = 0x2; +var LEFT_BRACKET = C.LEFT_BRACKET = 0x3; +var RIGHT_BRACKET = C.RIGHT_BRACKET = 0x4; +var COLON = C.COLON = 0x5; +var COMMA = C.COMMA = 0x6; +var TRUE = C.TRUE = 0x7; +var FALSE = C.FALSE = 0x8; +var NULL = C.NULL = 0x9; +var STRING = C.STRING = 0xa; +var NUMBER = C.NUMBER = 0xb; +// Tokenizer States +var START = C.START = 0x11; +var TRUE1 = C.TRUE1 = 0x21; +var TRUE2 = C.TRUE2 = 0x22; +var TRUE3 = C.TRUE3 = 0x23; +var FALSE1 = C.FALSE1 = 0x31; +var FALSE2 = C.FALSE2 = 0x32; +var FALSE3 = C.FALSE3 = 0x33; +var FALSE4 = C.FALSE4 = 0x34; +var NULL1 = C.NULL1 = 0x41; +var NULL2 = C.NULL3 = 0x42; +var NULL3 = C.NULL2 = 0x43; +var NUMBER1 = C.NUMBER1 = 0x51; +var NUMBER2 = C.NUMBER2 = 0x52; +var NUMBER3 = C.NUMBER3 = 0x53; +var NUMBER4 = C.NUMBER4 = 0x54; +var NUMBER5 = C.NUMBER5 = 0x55; +var NUMBER6 = C.NUMBER6 = 0x56; +var NUMBER7 = C.NUMBER7 = 0x57; +var NUMBER8 = C.NUMBER8 = 0x58; +var STRING1 = C.STRING1 = 0x61; +var STRING2 = C.STRING2 = 0x62; +var STRING3 = C.STRING3 = 0x63; +var STRING4 = C.STRING4 = 0x64; +var STRING5 = C.STRING5 = 0x65; +var STRING6 = C.STRING6 = 0x66; +// Parser States +var VALUE = C.VALUE = 0x71; +var KEY = C.KEY = 0x72; +// Parser Modes +var OBJECT = C.OBJECT = 0x81; +var ARRAY = C.ARRAY = 0x82; + +// Slow code to string converter (only used when throwing syntax errors) +function toknam(code) { + var keys = Object.keys(C); + for (var i = 0, l = keys.length; i < l; i++) { + var key = keys[i]; + if (C[key] === code) { return key; } + } + return code && ("0x" + code.toString(16)); +} + + +function Parser() { + this.tState = START; + this.value = undefined; + + this.string = undefined; // string data + this.unicode = undefined; // unicode escapes + + // For number parsing + this.negative = undefined; + this.magnatude = undefined; + this.position = undefined; + this.exponent = undefined; + this.negativeExponent = undefined; + + this.key = undefined; + this.mode = undefined; + this.stack = []; + this.state = VALUE; +} +var proto = Parser.prototype; +proto.charError = function (buffer, i) { + this.onError(new Error("Unexpected " + JSON.stringify(String.fromCharCode(buffer[i])) + " at position " + i + " in state " + toknam(this.tState))); +}; +proto.onError = function (err) { throw err; }; +proto.write = function (buffer) { + if (typeof buffer === "string") buffer = new Buffer(buffer); + //process.stdout.write("Input: "); + //console.dir(buffer.toString()); + var n; + for (var i = 0, l = buffer.length; i < l; i++) { + if (this.tState === START){ + n = buffer[i]; + if(n === 0x7b){ this.onToken(LEFT_BRACE, "{"); // { + }else if(n === 0x7d){ this.onToken(RIGHT_BRACE, "}"); // } + }else if(n === 0x5b){ this.onToken(LEFT_BRACKET, "["); // [ + }else if(n === 0x5d){ this.onToken(RIGHT_BRACKET, "]"); // ] + }else if(n === 0x3a){ this.onToken(COLON, ":"); // : + }else if(n === 0x2c){ this.onToken(COMMA, ","); // , + }else if(n === 0x74){ this.tState = TRUE1; // t + }else if(n === 0x66){ this.tState = FALSE1; // f + }else if(n === 0x6e){ this.tState = NULL1; // n + }else if(n === 0x22){ this.string = ""; this.tState = STRING1; // " + }else if(n === 0x2d){ this.negative = true; this.tState = NUMBER1; // - + }else if(n === 0x30){ this.magnatude = 0; this.tState = NUMBER2; // 0 + }else{ + if (n > 0x30 && n < 0x40) { // 1-9 + this.magnatude = n - 0x30; this.tState = NUMBER3; + } else if (n === 0x20 || n === 0x09 || n === 0x0a || n === 0x0d) { + // whitespace + } else { this.charError(buffer, i); } + } + }else if (this.tState === STRING1){ // After open quote + n = buffer[i]; + if (n >= 128) { + for (var j = i; buffer[j] >= 128 && j < buffer.length; j++); + this.string += buffer.slice(i, j).toString(); + i = j - 1; + } else if (n === 0x22) { this.tState = START; this.onToken(STRING, this.string); this.string = undefined; } + else if (n === 0x5c) { this.tState = STRING2; } + else if (n >= 0x20) { this.string += String.fromCharCode(n); } + else { this.charError(buffer, i); } + }else if (this.tState === STRING2){ // After backslash + n = buffer[i]; + if(n === 0x22){ this.string += "\""; this.tState = STRING1; + }else if(n === 0x5c){ this.string += "\\"; this.tState = STRING1; + }else if(n === 0x2f){ this.string += "\/"; this.tState = STRING1; + }else if(n === 0x62){ this.string += "\b"; this.tState = STRING1; + }else if(n === 0x66){ this.string += "\f"; this.tState = STRING1; + }else if(n === 0x6e){ this.string += "\n"; this.tState = STRING1; + }else if(n === 0x72){ this.string += "\r"; this.tState = STRING1; + }else if(n === 0x74){ this.string += "\t"; this.tState = STRING1; + }else if(n === 0x75){ this.unicode = ""; this.tState = STRING3; + }else{ + this.charError(buffer, i); + } + }else if (this.tState === STRING3 || this.tState === STRING4 || this.tState === STRING5 || this.tState === STRING6){ // unicode hex codes + n = buffer[i]; + // 0-9 A-F a-f + if ((n >= 0x30 && n < 0x40) || (n > 0x40 && n <= 0x46) || (n > 0x60 && n <= 0x66)) { + this.unicode += String.fromCharCode(n); + if (this.tState++ === STRING6) { + this.string += String.fromCharCode(parseInt(this.unicode, 16)); + this.unicode = undefined; + this.tState = STRING1; + } + } else { + this.charError(buffer, i); + } + }else if (this.tState === NUMBER1){ // after minus + n = buffer[i]; + if (n === 0x30) { this.magnatude = 0; this.tState = NUMBER2; } + else if (n > 0x30 && n < 0x40) { this.magnatude = n - 0x30; this.tState = NUMBER3; } + else { this.charError(buffer, i); } + }else if (this.tState === NUMBER2){ // * After initial zero + n = buffer[i]; + if(n === 0x2e){ // . + this.position = 0.1; this.tState = NUMBER4; + }else if(n === 0x65 || n === 0x45){ // e/E + this.exponent = 0; this.tState = NUMBER6; + }else{ + this.tState = START; + this.onToken(NUMBER, 0); + this.magnatude = undefined; + this.negative = undefined; + i--; + } + }else if (this.tState === NUMBER3){ // * After digit (before period) + n = buffer[i]; + if(n === 0x2e){ // . + this.position = 0.1; this.tState = NUMBER4; + }else if(n === 0x65 || n === 0x45){ // e/E + this.exponent = 0; this.tState = NUMBER6; + }else{ + if (n >= 0x30 && n < 0x40) { this.magnatude = this.magnatude * 10 + n - 0x30; } + else { + this.tState = START; + if (this.negative) { + this.magnatude = -this.magnatude; + this.negative = undefined; + } + this.onToken(NUMBER, this.magnatude); + this.magnatude = undefined; + i--; + } + } + }else if (this.tState === NUMBER4){ // After period + n = buffer[i]; + if (n >= 0x30 && n < 0x40) { // 0-9 + this.magnatude += this.position * (n - 0x30); + this.position /= 10; + this.tState = NUMBER5; + } else { this.charError(buffer, i); } + }else if (this.tState === NUMBER5){ // * After digit (after period) + n = buffer[i]; + if (n >= 0x30 && n < 0x40) { // 0-9 + this.magnatude += this.position * (n - 0x30); + this.position /= 10; + } + else if (n === 0x65 || n === 0x45) { this.exponent = 0; this.tState = NUMBER6; } // E/e + else { + this.tState = START; + if (this.negative) { + this.magnatude = -this.magnatude; + this.negative = undefined; + } + this.onToken(NUMBER, this.negative ? -this.magnatude : this.magnatude); + this.magnatude = undefined; + this.position = undefined; + i--; + } + }else if (this.tState === NUMBER6){ // After E + n = buffer[i]; + if (n === 0x2b || n === 0x2d) { // +/- + if (n === 0x2d) { this.negativeExponent = true; } + this.tState = NUMBER7; + } + else if (n >= 0x30 && n < 0x40) { + this.exponent = this.exponent * 10 + (n - 0x30); + this.tState = NUMBER8; + } + else { this.charError(buffer, i); } + }else if (this.tState === NUMBER7){ // After +/- + n = buffer[i]; + if (n >= 0x30 && n < 0x40) { // 0-9 + this.exponent = this.exponent * 10 + (n - 0x30); + this.tState = NUMBER8; + } + else { this.charError(buffer, i); } + }else if (this.tState === NUMBER8){ // * After digit (after +/-) + n = buffer[i]; + if (n >= 0x30 && n < 0x40) { // 0-9 + this.exponent = this.exponent * 10 + (n - 0x30); + } + else { + if (this.negativeExponent) { + this.exponent = -this.exponent; + this.negativeExponent = undefined; + } + this.magnatude *= Math.pow(10, this.exponent); + this.exponent = undefined; + if (this.negative) { + this.magnatude = -this.magnatude; + this.negative = undefined; + } + this.tState = START; + this.onToken(NUMBER, this.magnatude); + this.magnatude = undefined; + i--; + } + }else if (this.tState === TRUE1){ // r + if (buffer[i] === 0x72) { this.tState = TRUE2; } + else { this.charError(buffer, i); } + }else if (this.tState === TRUE2){ // u + if (buffer[i] === 0x75) { this.tState = TRUE3; } + else { this.charError(buffer, i); } + }else if (this.tState === TRUE3){ // e + if (buffer[i] === 0x65) { this.tState = START; this.onToken(TRUE, true); } + else { this.charError(buffer, i); } + }else if (this.tState === FALSE1){ // a + if (buffer[i] === 0x61) { this.tState = FALSE2; } + else { this.charError(buffer, i); } + }else if (this.tState === FALSE2){ // l + if (buffer[i] === 0x6c) { this.tState = FALSE3; } + else { this.charError(buffer, i); } + }else if (this.tState === FALSE3){ // s + if (buffer[i] === 0x73) { this.tState = FALSE4; } + else { this.charError(buffer, i); } + }else if (this.tState === FALSE4){ // e + if (buffer[i] === 0x65) { this.tState = START; this.onToken(FALSE, false); } + else { this.charError(buffer, i); } + }else if (this.tState === NULL1){ // u + if (buffer[i] === 0x75) { this.tState = NULL2; } + else { this.charError(buffer, i); } + }else if (this.tState === NULL2){ // l + if (buffer[i] === 0x6c) { this.tState = NULL3; } + else { this.charError(buffer, i); } + }else if (this.tState === NULL3){ // l + if (buffer[i] === 0x6c) { this.tState = START; this.onToken(NULL, null); } + else { this.charError(buffer, i); } + } + } +}; +proto.onToken = function (token, value) { + // Override this to get events +}; + +proto.parseError = function (token, value) { + this.onError(new Error("Unexpected " + toknam(token) + (value ? ("(" + JSON.stringify(value) + ")") : "") + " in state " + toknam(this.state))); +}; +proto.onError = function (err) { throw err; }; +proto.push = function () { + this.stack.push({value: this.value, key: this.key, mode: this.mode}); +}; +proto.pop = function () { + var value = this.value; + var parent = this.stack.pop(); + this.value = parent.value; + this.key = parent.key; + this.mode = parent.mode; + this.emit(value); + if (!this.mode) { this.state = VALUE; } +}; +proto.emit = function (value) { + if (this.mode) { this.state = COMMA; } + this.onValue(value); +}; +proto.onValue = function (value) { + // Override me +}; +proto.onToken = function (token, value) { + //console.log("OnToken: state=%s token=%s %s", toknam(this.state), toknam(token), value?JSON.stringify(value):""); + if(this.state === VALUE){ + if(token === STRING || token === NUMBER || token === TRUE || token === FALSE || token === NULL){ + if (this.value) { + this.value[this.key] = value; + } + this.emit(value); + }else if(token === LEFT_BRACE){ + this.push(); + if (this.value) { + this.value = this.value[this.key] = {}; + } else { + this.value = {}; + } + this.key = undefined; + this.state = KEY; + this.mode = OBJECT; + }else if(token === LEFT_BRACKET){ + this.push(); + if (this.value) { + this.value = this.value[this.key] = []; + } else { + this.value = []; + } + this.key = 0; + this.mode = ARRAY; + this.state = VALUE; + }else if(token === RIGHT_BRACE){ + if (this.mode === OBJECT) { + this.pop(); + } else { + this.parseError(token, value); + } + }else if(token === RIGHT_BRACKET){ + if (this.mode === ARRAY) { + this.pop(); + } else { + this.parseError(token, value); + } + }else{ + this.parseError(token, value); + } + }else if(this.state === KEY){ + if (token === STRING) { + this.key = value; + this.state = COLON; + } else if (token === RIGHT_BRACE) { + this.pop(); + } else { + this.parseError(token, value); + } + }else if(this.state === COLON){ + if (token === COLON) { this.state = VALUE; } + else { this.parseError(token, value); } + }else if(this.state === COMMA){ + if (token === COMMA) { + if (this.mode === ARRAY) { this.key++; this.state = VALUE; } + else if (this.mode === OBJECT) { this.state = KEY; } + + } else if (token === RIGHT_BRACKET && this.mode === ARRAY || token === RIGHT_BRACE && this.mode === OBJECT) { + this.pop(); + } else { + this.parseError(token, value); + } + }else{ + this.parseError(token, value); + } +}; + +module.exports = Parser; diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/package.json b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/package.json new file mode 100644 index 00000000..09a6fb02 --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/package.json @@ -0,0 +1,36 @@ +{ + "name": "jsonparse", + "description": "This is a pure-js JSON streaming parser for node.js", + "tags": [ + "json", + "stream" + ], + "version": "0.0.4", + "author": { + "name": "Tim Caswell", + "email": "tim@creationix.com" + }, + "repository": { + "type": "git", + "url": "http://github.com/creationix/jsonparse.git" + }, + "devDependencies": { + "tape": "~0.1.1", + "tap": "~0.3.3" + }, + "scripts": { + "test": "tap test/*.js" + }, + "bugs": "http://github.com/creationix/jsonparse/issues", + "engines": [ + "node >= 0.2.0" + ], + "license": "MIT", + "main": "jsonparse.js", + "readme": "This is a streaming JSON parser. For a simpler, sax-based version see this gist: https://gist.github.com/1821394\n\nThe MIT License (MIT)\nCopyright (c) 2011-2012 Tim Caswell\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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.\n\n", + "_id": "jsonparse@0.0.4", + "dist": { + "shasum": "59dc625b80cde4562734333122ba6e759d72524e" + }, + "_from": "jsonparse@~0.0.4" +} diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic.json b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic.json new file mode 100644 index 00000000..950dff9e --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic.json @@ -0,0 +1,167 @@ +[ + { + }, + { + "image": [ + {"shape": "rect", "fill": "#333", "stroke": "#999", "x": 0.5e+1, "y": 0.5, "z": 0.8e-0, "w": 0.5e5, "u": 2E10, "foo": 2E+1, "bar": 2E-0, "width": 47, "height": 47} + ], + "jumpable": 3, + "solid": { + "1": [2,4], + "2": [], + "3": [2,6], + "4": [], + "5": [2,8,1,3,7,9,4,6], + "6": [], + "7": [4,8], + "8": [], + "9": [6,8] + }, + "corners": {"1": true,"3": true,"7": true,"9": true} + }, + { + "image": [ + {"shape": "polygon", "fill": "#248", "stroke": "#48f", "points": [[0.5,47.5],[47.5,47.5],[47.5,0.5]]} + ], + "solid": { + "1": [2,4], + "2": [1], + "3": [2], + "4": [], + "5": [2,8,1,3,7,9,4,6], + "6": [], + "7": [4,8], + "8": [], + "9": [6,8] + }, + "corners": {"1": true,"3": true,"7": false,"9": true} + }, + { + "image": [ + {"shape": "polygon", "fill": "#248", "stroke": "#48f", "points": [[0.5,0.5],[47.5,47.5],[0.5,47.5]]} + ], + "solid": { + "1": [2], + "2": [3], + "3": [2,6], + "4": [], + "5": [2,8,1,3,7,9,4,6], + "6": [], + "7": [4,8], + "8": [], + "9": [6,8] + }, + "corners": {"1": true,"3": true,"7": true,"9": false} + }, + { + "image": [ + {"shape": "polygon", "fill": "#333", "stroke": "#999", "points": [[0.5,0.5],[47.5,47.5],[47.5,0.5]]} + ], + "jumpable": 3, + "solid": { + "1": [2,4], + "2": [], + "3": [2,6], + "4": [], + "5": [2,8,1,3,7,9,4,6], + "6": [3], + "7": [4,8], + "8": [7], + "9": [6,8] + }, + "corners": {"1": false,"3": true,"7": true,"9": true} + }, + { + "image": [ + {"shape": "polygon", "fill": "#333", "stroke": "#999", "points": [[0.5,0.5],[0.5,47.5],[47.5,0.5]]} + ], + "jumpable": 3, + "solid": { + "1": [2,4], + "2": [], + "3": [2,6], + "4": [1], + "5": [2,8,1,3,7,9,4,6], + "6": [], + "7": [4,8], + "8": [9], + "9": [6,8] + }, + "corners": {"1": true,"3": false,"7": true,"9": true} + }, + { + "image": [ + {"shape": "polygon", "fill": "#482", "stroke": "#8f4", "points": [[0.5,47.5],[0.5,23.5],[24.5,23.5],[24.5,0.5],[47.5,0.5],[47.5,47.5]]} + ], + "jumpable": 3, + "solid": { + "1": [2,4], + "2": [], + "3": [6,2], + "4": [], + "5": [2,8,1,3,7,9,4,6], + "6": [9], + "7": [4,8], + "8": [], + "9": [6,8] + }, + "corners": {"1": true,"3": true,"7": false,"9": true} + }, + { + "image": [ + {"shape": "polygon", "fill": "#482", "stroke": "#8f4", "points": [[0.5,0.5],[23.5,0.5],[23.5,24.5],[47.5,24.5],[47.5,47.5],[0.5,47.5]]} + ], + "jumpable": 3, + "solid": { + "1": [4,2], + "2": [], + "3": [2,6], + "4": [7], + "5": [2,8,1,3,7,9,4,6], + "6": [], + "7": [4,8], + "8": [], + "9": [6,8] + }, + "corners": {"1": true,"3": true,"7": true,"9": false} + }, + { + "image": [ + {"shape": "circle", "fill": "#ff0", "stroke": "#ff8", "cx": 24, "cy": 24, "r": 18} + ], + "item": true + }, + { + "image": [ + {"shape": "polygon", "fill": "#842", "stroke": "#f84", "points": [[4.5,0.5],[14.5,0.5],[14.5,17.5],[34,17.5],[33.5,0.5],[43.5,0.5],[43.5,47.5],[33.5,47.5],[33.5,30.5],[14.5,30.5],[14.5,47.5],[4.5,47.5]]} + ], + "jumpable": 3 + }, + { + "image": [ + {"shape": "polygon", "fill": "#333", "stroke": "#999", "points": [[0.5,0.5],[47.5,0.5],[24,47.5]]} + ], + "jumpable": 3, + "solid": { + "1": [2,4], + "2": [], + "3": [2,6], + "4": [1], + "5": [2,8,1,3,7,9,4,6], + "6": [3], + "7": [4,8], + "8": [], + "9": [6,8] + }, + "corners": {"1": false,"3": false,"7": true,"9": true} + }, + { + "image": [ + {"shape": "rect", "fill": "#114acb", "x": 0.5, "y": 0.5, "width": 47, "height": 47}, + {"shape": "polygon", "fill": "rgba(255,255,255,0.30)", "points": [[0.5,0.5],[47.5,0.5],[40,8],[8,8],[8,40],[0.5,47.5]]}, + {"shape": "polygon", "fill": "rgba(0,0,0,0.30)", "points": [[47.5,0.5],[48,48],[0.5,47.5],[8,40],[40,40],[40,8]]}, + {"shape": "polygon", "fill": "rgb(255,255,0)", "stroke": "rgba(255,255,0,0.5)", "points": [[24,9],[35,20],[26,29],[26,33],[22,33],[22,27],[29,20],[24,15],[16,23],[13,20]]}, + {"shape": "rect", "fill": "rgb(255,255,0)", "stroke": "rgba(255,255,0,0.5)", "x": 22, "y":35, "width": 4, "height": 4} + ] + } +] diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic2.json b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic2.json new file mode 100644 index 00000000..3a6919b2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/samplejson/basic2.json @@ -0,0 +1,180 @@ +[ + { + }, + { + "image": [ + {"shape": "rect", "fill": "#333", "stroke": "#999", "x": 0.5, "y": 0.5, "width": 47, "height": 47} + ], + "jumpable": 3, + "solid": { + "1": [2,4], + "2": [], + "3": [2,6], + "4": [], + "5": [2,8,1,3,7,9,4,6], + "6": [], + "7": [4,8], + "8": [], + "9": [6,8] + }, + "corners": {"1": true,"3": true,"7": true,"9": true} + }, + { + "image": [ + {"shape": "polygon", "fill": "#248", "stroke": "#48f", "points": [[0.5,47.5],[47.5,47.5],[47.5,0.5]]} + ], + "solid": { + "1": [2,4], + "2": [1], + "3": [2], + "4": [], + "5": [2,8,1,3,7,9,4,6], + "6": [], + "7": [4,8], + "8": [], + "9": [6,8] + }, + "corners": {"1": true,"3": true,"7": false,"9": true} + }, + { + "image": [ + {"shape": "polygon", "fill": "#248", "stroke": "#48f", "points": [[0.5,0.5],[47.5,47.5],[0.5,47.5]]} + ], + "solid": { + "1": [2], + "2": [3], + "3": [2,6], + "4": [], + "5": [2,8,1,3,7,9,4,6], + "6": [], + "7": [4,8], + "8": [], + "9": [6,8] + }, + "corners": {"1": true,"3": true,"7": true,"9": false} + }, + { + "image": [ + {"shape": "polygon", "fill": "#333", "stroke": "#999", "points": [[0.5,0.5],[47.5,47.5],[47.5,0.5]]} + ], + "jumpable": 3, + "solid": { + "1": [2,4], + "2": [], + "3": [2,6], + "4": [], + "5": [2,8,1,3,7,9,4,6], + "6": [3], + "7": [4,8], + "8": [7], + "9": [6,8] + }, + "corners": {"1": false,"3": true,"7": true,"9": true} + }, + { + "image": [ + {"shape": "polygon", "fill": "#333", "stroke": "#999", "points": [[0.5,0.5],[0.5,47.5],[47.5,0.5]]} + ], + "jumpable": 3, + "solid": { + "1": [2,4], + "2": [], + "3": [2,6], + "4": [1], + "5": [2,8,1,3,7,9,4,6], + "6": [], + "7": [4,8], + "8": [9], + "9": [6,8] + }, + "corners": {"1": true,"3": false,"7": true,"9": true} + }, + { + "image": [ + {"shape": "polygon", "fill": "#482", "stroke": "#8f4", "points": [[0.5,47.5],[0.5,23.5],[24.5,23.5],[24.5,0.5],[47.5,0.5],[47.5,47.5]]} + ], + "jumpable": 3, + "solid": { + "1": [2,4], + "2": [], + "3": [6,2], + "4": [], + "5": [2,8,1,3,7,9,4,6], + "6": [9], + "7": [4,8], + "8": [], + "9": [6,8] + }, + "corners": {"1": true,"3": true,"7": false,"9": true} + }, + { + "image": [ + {"shape": "polygon", "fill": "#482", "stroke": "#8f4", "points": [[0.5,0.5],[23.5,0.5],[23.5,24.5],[47.5,24.5],[47.5,47.5],[0.5,47.5]]} + ], + "jumpable": 3, + "solid": { + "1": [4,2], + "2": [], + "3": [2,6], + "4": [7], + "5": [2,8,1,3,7,9,4,6], + "6": [], + "7": [4,8], + "8": [], + "9": [6,8] + }, + "corners": {"1": true,"3": true,"7": true,"9": false} + }, + { + "image": [ + {"shape": "circle", "fill": "#ff0", "stroke": "#ff8", "cx": 24, "cy": 24, "r": 18} + ], + "item": true + }, + { + "image": [ + {"shape": "polygon", "fill": "#842", "stroke": "#f84", "points": [[4.5,0.5],[14.5,0.5],[14.5,17.5],[34,17.5],[33.5,0.5],[43.5,0.5],[43.5,47.5],[33.5,47.5],[33.5,30.5],[14.5,30.5],[14.5,47.5],[4.5,47.5]]} + ], + "jumpable": 3 + }, + { + "image": [ + {"shape": "polygon", "fill": "#333", "stroke": "#999", "points": [[0.5,0.5],[47.5,0.5],[24,47.5]]} + ], + "jumpable": 3, + "solid": { + "1": [2,4], + "2": [], + "3": [2,6], + "4": [1], + "5": [2,8,1,3,7,9,4,6], + "6": [3], + "7": [4,8], + "8": [], + "9": [6,8] + }, + "corners": {"1": false,"3": false,"7": true,"9": true} + }, + { + "image": [ + {"shape": "rect", "fill": "#114acb", "x": 0.5, "y": 0.5, "width": 47, "height": 47}, + {"shape": "polygon", "fill": "rgba(255,255,255,0.30)", "points": [[0.5,0.5],[47.5,0.5],[40,8],[8,8],[8,40],[0.5,47.5]]}, + {"shape": "polygon", "fill": "rgba(0,0,0,0.30)", "points": [[47.5,0.5],[48,48],[0.5,47.5],[8,40],[40,40],[40,8]]}, + {"shape": "polygon", "fill": "rgb(255,255,0)", "stroke": "rgba(255,255,0,0.5)", "points": [[24,9],[35,20],[26,29],[26,33],[22,33],[22,27],[29,20],[24,15],[16,23],[13,20]]}, + {"shape": "rect", "fill": "rgb(255,255,0)", "stroke": "rgba(255,255,0,0.5)", "x": 22, "y":35, "width": 4, "height": 4} + ], + "item": true + }, + { + "image": [ + {"shape": "circle", "fill": "#80f", "stroke": "#88f", "cx": 24, "cy": 24, "r": 18} + ], + "item": true + }, + { + "image": [ + {"shape": "circle", "fill": "#4f4", "stroke": "#8f8", "cx": 24, "cy": 24, "r": 18} + ], + "item": true + } +] diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/test/primitives.js b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/test/primitives.js new file mode 100644 index 00000000..3c5e7895 --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/test/primitives.js @@ -0,0 +1,54 @@ +var test = require('tape'); +var Parser = require('../'); + +var expected = [ + [ [], '' ], + [ [], 'Hello' ], + [ [], 'This"is' ], + [ [], '\r\n\f\t\\/"' ], + [ [], 'Λάμβδα' ], + [ [], '\\' ], + [ [], '/' ], + [ [], '"' ], + [ [ 0 ], 0 ], + [ [ 1 ], 1 ], + [ [ 2 ], -1 ], + [ [], [ 0, 1, -1 ] ], + [ [ 0 ], 1 ], + [ [ 1 ], 1.1 ], + [ [ 2 ], -1.1 ], + [ [ 3 ], -1 ], + [ [], [ 1, 1.1, -1.1, -1 ] ], + [ [ 0 ], -1 ], + [ [], [ -1 ] ], + [ [ 0 ], -0.1 ], + [ [], [ -0.1 ] ], + [ [ 0 ], 6.019999999999999e+23 ], + [ [], [ 6.019999999999999e+23 ] ] +]; + +test('primitives', function (t) { + t.plan(23); + + var p = new Parser(); + p.onValue = function (value) { + var keys = this.stack + .slice(1) + .map(function (item) { return item.key }) + .concat(this.key !== undefined ? this.key : []) + ; + t.deepEqual( + [ keys, value ], + expected.shift() + ); + }; + + p.write('"""Hello""This\\"is""\\r\\n\\f\\t\\\\\\/\\""'); + p.write('"\\u039b\\u03ac\\u03bc\\u03b2\\u03b4\\u03b1"'); + p.write('"\\\\"'); + p.write('"\\/"'); + p.write('"\\""'); + p.write('[0,1,-1]'); + p.write('[1.0,1.1,-1.1,-1.0][-1][-0.1]'); + p.write('[6.02e23]'); +}); diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/test/utf8.js b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/test/utf8.js new file mode 100644 index 00000000..6cb842f3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/node_modules/jsonparse/test/utf8.js @@ -0,0 +1,38 @@ +var test = require('tape'); +var Parser = require('../'); + +test('3 bytes of utf8', function (t) { + t.plan(1); + + var p = new Parser(); + p.onValue = function (value) { + t.equal(value, '├──'); + }; + + p.write('"├──"'); +}); + +test('utf8 snowman', function (t) { + t.plan(1); + + var p = new Parser(); + p.onValue = function (value) { + t.equal(value, '☃'); + }; + + p.write('"☃"'); +}); + +test('utf8 with regular ascii', function (t) { + t.plan(4); + + var p = new Parser(); + var expected = [ "snow: ☃!", "xyz", "¡que!" ]; + expected.push(expected.slice()); + + p.onValue = function (value) { + t.deepEqual(value, expected.shift()); + }; + + p.write('["snow: ☃!","xyz","¡que!"]'); +}); diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/package.json b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/package.json new file mode 100644 index 00000000..b7ec9157 --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/package.json @@ -0,0 +1,40 @@ +{ + "name": "JSONStream", + "version": "0.4.3", + "description": "rawStream.pipe(JSONStream.parse()).pipe(streamOfObjects)", + "homepage": "http://github.com/dominictarr/JSONStream", + "repository": { + "type": "git", + "url": "git://github.com/dominictarr/JSONStream.git" + }, + "dependencies": { + "jsonparse": "~0.0.4" + }, + "devDependencies": { + "it-is": "~1", + "assertions": "~2.2.2", + "render": "~0.1.1", + "trees": "~0.0.3", + "event-stream": "~0.7.0", + "from": "0.0.2", + "probe-stream": "~0.1.0" + }, + "author": { + "name": "Dominic Tarr", + "email": "dominic.tarr@gmail.com", + "url": "http://bit.ly/dominictarr" + }, + "scripts": { + "test": "set -e; for t in test/*.js; do echo '***' $t '***'; node $t; done" + }, + "optionalDependencies": {}, + "engines": { + "node": "*" + }, + "readme": "# JSONStream\n\nstreaming JSON.parse and stringify\n\n\n\n## example\n\n```javascript\n\nvar request = require('request')\n , JSONStream = require('JSONStream')\n , es = require('event-stream')\n\nvar parser = JSONStream.parse(['rows', true])\n , req = request({url: 'http://isaacs.couchone.com/registry/_all_docs'})\n , logger = es.mapSync(function (data) {\n console.error(data)\n return data\n })\n```\n\nin node 0.4.x\n\n``` javascript\n\nreq.pipe(parser)\nparser.pipe(logger)\n\n```\n\nin node v0.5.x\n\n``` javascript\nreq.pipe(parser).pipe(logger)\n\n```\n\n## JSONStream.parse(path)\n\nusally, a json API will return a list of objects.\n\n`path` should be an array of property names, `RegExp`s, booleans, and/or functions.\nany object that matches the path will be emitted as 'data' (and `pipe`d down stream)\n\na 'root' event is emitted when all data has been received. The 'root' event passes the root object & the count of matched objects.\n\nif `path` is empty or null, no 'data' events are emitted.\n\n### example\n\nquery a couchdb view:\n\n``` bash\ncurl -sS localhost:5984/tests/_all_docs&include_docs=true\n```\nyou will get something like this:\n\n``` js\n{\"total_rows\":129,\"offset\":0,\"rows\":[\n { \"id\":\"change1_0.6995461115147918\"\n , \"key\":\"change1_0.6995461115147918\"\n , \"value\":{\"rev\":\"1-e240bae28c7bb3667f02760f6398d508\"}\n , \"doc\":{\n \"_id\": \"change1_0.6995461115147918\"\n , \"_rev\": \"1-e240bae28c7bb3667f02760f6398d508\",\"hello\":1}\n },\n { \"id\":\"change2_0.6995461115147918\"\n , \"key\":\"change2_0.6995461115147918\"\n , \"value\":{\"rev\":\"1-13677d36b98c0c075145bb8975105153\"}\n , \"doc\":{\n \"_id\":\"change2_0.6995461115147918\"\n , \"_rev\":\"1-13677d36b98c0c075145bb8975105153\"\n , \"hello\":2\n }\n },\n]}\n\n```\n\nwe are probably most interested in the `rows.*.docs`\n\ncreate a `Stream` that parses the documents from the feed like this:\n\n``` js\nvar stream = JSONStream.parse(['rows', true, 'doc']) //rows, ANYTHING, doc\n\nstream.on('data', function(data) {\n console.log('received:', data);\n});\n\nstream.on('root', function(root, count) {\n if (!count) {\n console.log('no matches found:', root);\n }\n});\n```\nawesome!\n\n## JSONStream.stringify(open, sep, close)\n\nCreate a writable stream.\n\nyou may pass in custom `open`, `close`, and `seperator` strings.\nBut, by default, `JSONStream.stringify()` will create an array,\n(with default options `open='[\\n', sep='\\n,\\n', close='\\n]\\n'`)\n\nIf you call `JSONStream.stringify(false)`\nthe elements will only be seperated by a newline.\n\nIf you only write one item this will be valid JSON.\n\nIf you write many items,\nyou can use a `RegExp` to split it into valid chunks.\n\n## JSONStream.stringifyObject(open, sep, close)\n\nVery much like `JSONStream.stringify`,\nbut creates a writable stream for objects instead of arrays.\n\nAccordingly, `open='{\\n', sep='\\n,\\n', close='\\n}\\n'`.\n\nWhen you `.write()` to the stream you must supply an array with `[ key, data ]`\nas the first argument.\n\n## numbers\n\nThere are occasional problems parsing and unparsing very precise numbers.\n\nI have opened an issue here:\n\nhttps://github.com/creationix/jsonparse/issues/2\n\n+1\n\n## Acknowlegements\n\nthis module depends on https://github.com/creationix/jsonparse\nby Tim Caswell\nand also thanks to Florent Jaby for teaching me about parsing with:\nhttps://github.com/Floby/node-json-streams\n\n## license\n\nMIT / APACHE2\n", + "_id": "JSONStream@0.4.3", + "dist": { + "shasum": "673c8498179a14ce8948bd89538f6a32ce1e9f49" + }, + "_from": "JSONStream" +} diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/readme.markdown b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/readme.markdown new file mode 100644 index 00000000..361d6cba --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/readme.markdown @@ -0,0 +1,145 @@ +# JSONStream + +streaming JSON.parse and stringify + + + +## example + +```javascript + +var request = require('request') + , JSONStream = require('JSONStream') + , es = require('event-stream') + +var parser = JSONStream.parse(['rows', true]) + , req = request({url: 'http://isaacs.couchone.com/registry/_all_docs'}) + , logger = es.mapSync(function (data) { + console.error(data) + return data + }) +``` + +in node 0.4.x + +``` javascript + +req.pipe(parser) +parser.pipe(logger) + +``` + +in node v0.5.x + +``` javascript +req.pipe(parser).pipe(logger) + +``` + +## JSONStream.parse(path) + +usally, a json API will return a list of objects. + +`path` should be an array of property names, `RegExp`s, booleans, and/or functions. +any object that matches the path will be emitted as 'data' (and `pipe`d down stream) + +a 'root' event is emitted when all data has been received. The 'root' event passes the root object & the count of matched objects. + +if `path` is empty or null, no 'data' events are emitted. + +### example + +query a couchdb view: + +``` bash +curl -sS localhost:5984/tests/_all_docs&include_docs=true +``` +you will get something like this: + +``` js +{"total_rows":129,"offset":0,"rows":[ + { "id":"change1_0.6995461115147918" + , "key":"change1_0.6995461115147918" + , "value":{"rev":"1-e240bae28c7bb3667f02760f6398d508"} + , "doc":{ + "_id": "change1_0.6995461115147918" + , "_rev": "1-e240bae28c7bb3667f02760f6398d508","hello":1} + }, + { "id":"change2_0.6995461115147918" + , "key":"change2_0.6995461115147918" + , "value":{"rev":"1-13677d36b98c0c075145bb8975105153"} + , "doc":{ + "_id":"change2_0.6995461115147918" + , "_rev":"1-13677d36b98c0c075145bb8975105153" + , "hello":2 + } + }, +]} + +``` + +we are probably most interested in the `rows.*.docs` + +create a `Stream` that parses the documents from the feed like this: + +``` js +var stream = JSONStream.parse(['rows', true, 'doc']) //rows, ANYTHING, doc + +stream.on('data', function(data) { + console.log('received:', data); +}); + +stream.on('root', function(root, count) { + if (!count) { + console.log('no matches found:', root); + } +}); +``` +awesome! + +## JSONStream.stringify(open, sep, close) + +Create a writable stream. + +you may pass in custom `open`, `close`, and `seperator` strings. +But, by default, `JSONStream.stringify()` will create an array, +(with default options `open='[\n', sep='\n,\n', close='\n]\n'`) + +If you call `JSONStream.stringify(false)` +the elements will only be seperated by a newline. + +If you only write one item this will be valid JSON. + +If you write many items, +you can use a `RegExp` to split it into valid chunks. + +## JSONStream.stringifyObject(open, sep, close) + +Very much like `JSONStream.stringify`, +but creates a writable stream for objects instead of arrays. + +Accordingly, `open='{\n', sep='\n,\n', close='\n}\n'`. + +When you `.write()` to the stream you must supply an array with `[ key, data ]` +as the first argument. + +## numbers + +There are occasional problems parsing and unparsing very precise numbers. + +I have opened an issue here: + +https://github.com/creationix/jsonparse/issues/2 + ++1 + +## Acknowlegements + +this module depends on https://github.com/creationix/jsonparse +by Tim Caswell +and also thanks to Florent Jaby for teaching me about parsing with: +https://github.com/Floby/node-json-streams + +## license + +MIT / APACHE2 diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/bool.js b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/bool.js new file mode 100644 index 00000000..6c386d60 --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/bool.js @@ -0,0 +1,41 @@ + +var fs = require ('fs') + , join = require('path').join + , file = join(__dirname, 'fixtures','all_npm.json') + , JSONStream = require('../') + , it = require('it-is').style('colour') + + function randomObj () { + return ( + Math.random () < 0.4 + ? {hello: 'eonuhckmqjk', + whatever: 236515, + lies: true, + nothing: [null], +// stuff: [Math.random(),Math.random(),Math.random()] + } + : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]] + ) + } + +var expected = [] + , stringify = JSONStream.stringify() + , es = require('event-stream') + , stringified = '' + , called = 0 + , count = 10 + , ended = false + +while (count --) + expected.push(randomObj()) + + es.connect( + es.readArray(expected), + stringify, + JSONStream.parse([true]), + es.writeArray(function (err, lines) { + + it(lines).has(expected) + console.error('PASSED') + }) + ) diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/destroy_missing.js b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/destroy_missing.js new file mode 100644 index 00000000..75fb8a81 --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/destroy_missing.js @@ -0,0 +1,22 @@ +var fs = require ('fs'); +var net = require('net'); +var join = require('path').join; +var file = join(__dirname, 'fixtures','all_npm.json'); +var JSONStream = require('../'); + + +var server = net.createServer(function(client) { + var parser = JSONStream.parse([]); + parser.on('close', function() { + console.error('PASSED'); + server.close(); + }); + client.pipe(parser); + client.destroy(); +}); +server.listen(9999); + + +var client = net.connect({ port : 9999 }, function() { + fs.createReadStream(file).pipe(client); +}); diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/empty.js b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/empty.js new file mode 100644 index 00000000..19e888c1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/empty.js @@ -0,0 +1,44 @@ +var JSONStream = require('../') + , stream = require('stream') + , it = require('it-is') + +var output = [ [], [] ] + +var parser1 = JSONStream.parse(['docs', /./]) +parser1.on('data', function(data) { + output[0].push(data) +}) + +var parser2 = JSONStream.parse(['docs', /./]) +parser2.on('data', function(data) { + output[1].push(data) +}) + +var pending = 2 +function onend () { + if (--pending > 0) return + it(output).deepEqual([ + [], [{hello: 'world'}] + ]) + console.error('PASSED') +} +parser1.on('end', onend) +parser2.on('end', onend) + +function makeReadableStream() { + var readStream = new stream.Stream() + readStream.readable = true + readStream.write = function (data) { this.emit('data', data) } + readStream.end = function (data) { this.emit('end') } + return readStream +} + +var emptyArray = makeReadableStream() +emptyArray.pipe(parser1) +emptyArray.write('{"docs":[]}') +emptyArray.end() + +var objectArray = makeReadableStream() +objectArray.pipe(parser2) +objectArray.write('{"docs":[{"hello":"world"}]}') +objectArray.end() diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/fixtures/all_npm.json b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/fixtures/all_npm.json new file mode 100644 index 00000000..6303ea2f --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/fixtures/all_npm.json @@ -0,0 +1,4030 @@ +{"total_rows":4028,"offset":0,"rows":[ +{"id":"","key":"","value":{"rev":"1-2f11e026763c10730d8b19ba5dce7565"}}, +{"id":"3scale","key":"3scale","value":{"rev":"3-db3d574bf0ecdfdf627afeaa21b4bdaa"}}, +{"id":"7digital-api","key":"7digital-api","value":{"rev":"20-21d11832780e2368aabc946598a41dd5"}}, +{"id":"AMD","key":"AMD","value":{"rev":"7-3b4305a9c786ab4c5ce611e7f0de0aca"}}, +{"id":"AriesNode","key":"AriesNode","value":{"rev":"3-9d88392bca6582c5c54784927dbfdee6"}}, +{"id":"Array.prototype.forEachAsync","key":"Array.prototype.forEachAsync","value":{"rev":"3-85696441ba6bef77cc1e7de7b073110e"}}, +{"id":"Babel","key":"Babel","value":{"rev":"5-9d8370c6ac6fd9cd3d530f26a9379814"}}, +{"id":"Blaggie-System","key":"Blaggie-System","value":{"rev":"3-47782b1e5cbfa425170192799510e148"}}, +{"id":"Blob","key":"Blob","value":{"rev":"3-cf5fb5d69da4dd00bc4f2be8870ca698"}}, +{"id":"BlobBuilder","key":"BlobBuilder","value":{"rev":"3-eb977ff1713a915384fac994f9d8fa7c"}}, +{"id":"Buffer","key":"Buffer","value":{"rev":"3-549594b58e83d6d07bb219e73de558e5"}}, +{"id":"CLI-UI","key":"CLI-UI","value":{"rev":"5-5912625f27b4bdfb4d3eed16726c48a8"}}, +{"id":"CLoader","key":"CLoader","value":{"rev":"1-ad3c317ddf3497e73ab41cb1ddbc6ba8"}}, +{"id":"CM1","key":"CM1","value":{"rev":"15-a325a2dc28bc6967a1a14beed86f3b80"}}, +{"id":"CONFIGURATOR","key":"CONFIGURATOR","value":{"rev":"3-c76bf9282a75cc4d3fb349e831ccb8a5"}}, +{"id":"Cashew","key":"Cashew","value":{"rev":"7-6a74dc51dbecc47d2c15bfb7d056a20f"}}, +{"id":"Class","key":"Class","value":{"rev":"5-958c6365f76a60a8b3dafbbd9730ac7e"}}, +{"id":"ClassLoader","key":"ClassLoader","value":{"rev":"3-27fe8faa8a1d60d639f87af52826ed47"}}, +{"id":"ClearSilver","key":"ClearSilver","value":{"rev":"3-f3e54eb9ce64fc6a090186e61f15ed0b"}}, +{"id":"Couch-cleaner","key":"Couch-cleaner","value":{"rev":"3-fc77270917d967a4e2e8637cfa9f0fe0"}}, +{"id":"CouchCover","key":"CouchCover","value":{"rev":"15-3b2d87d314f57272a5c27c42bbb3eaf9"}}, +{"id":"DOM-js","key":"DOM-js","value":{"rev":"8-748cdc96566a7b65bbd0b12be2eeb386"}}, +{"id":"DOMBuilder","key":"DOMBuilder","value":{"rev":"19-41a518f2ce16fabc0241535ccd967300"}}, +{"id":"DateZ","key":"DateZ","value":{"rev":"15-69d8115a9bd521e614eaad3cf2611264"}}, +{"id":"Dateselect","key":"Dateselect","value":{"rev":"3-6511567a876d8fe15724bbc7f247214c"}}, +{"id":"Deferred","key":"Deferred","value":{"rev":"3-c61dfc4a0d1bd3e9f35c7182f161f1f2"}}, +{"id":"DeskSet","key":"DeskSet","value":{"rev":"5-359bf760718898ff3591eb366e336cf9"}}, +{"id":"Estro","key":"Estro","value":{"rev":"11-97192e2d0327469bb30f814963db6dff"}}, +{"id":"EventProxy.js","key":"EventProxy.js","value":{"rev":"5-106696b56c6959cec4bfd37f406ee60a"}}, +{"id":"EventServer","key":"EventServer","value":{"rev":"3-59d174119435e99e2affe0c4ba7caae0"}}, +{"id":"Expressive","key":"Expressive","value":{"rev":"3-7eae0ea010eb9014b28108e814918eac"}}, +{"id":"F","key":"F","value":{"rev":"12-91a3db69527b46cf43e36b7ec64a4336"}}, +{"id":"Faker","key":"Faker","value":{"rev":"9-77951c352cb6f9a0b824be620a8fa40d"}}, +{"id":"FastLegS","key":"FastLegS","value":{"rev":"27-4399791981235021a36c94bb9e9b52b5"}}, +{"id":"Fayer","key":"Fayer","value":{"rev":"7-7e4974ff2716329375f9711bcabef701"}}, +{"id":"File","key":"File","value":{"rev":"3-45e353a984038bc48248dfc32b18f9a8"}}, +{"id":"FileError","key":"FileError","value":{"rev":"3-bb4b03a2548e3c229e2c7e92242946c3"}}, +{"id":"FileList","key":"FileList","value":{"rev":"3-ec4a3fc91794ef7fdd3fe88b19cec7b0"}}, +{"id":"FileReader","key":"FileReader","value":{"rev":"7-e81b58a2d8a765ae4781b41bbfadb4cb"}}, +{"id":"FileSaver","key":"FileSaver","value":{"rev":"3-476dcb3f63f4d10feee08d41a8128cb8"}}, +{"id":"FileWriter","key":"FileWriter","value":{"rev":"3-f2fcdbc4938de480cce2e8e8416a93dd"}}, +{"id":"FileWriterSync","key":"FileWriterSync","value":{"rev":"3-9494c3fe7a1230238f37a724ec10895b"}}, +{"id":"FormData","key":"FormData","value":{"rev":"3-8872d717575f7090107a96d81583f6fe"}}, +{"id":"Frenchpress","key":"Frenchpress","value":{"rev":"3-6d916fc15b9e77535771578f96c47c52"}}, +{"id":"FreshDocs","key":"FreshDocs","value":{"rev":"5-f1f3e76c85267faf21d06d911cc6c203"}}, +{"id":"Google_Plus_API","key":"Google_Plus_API","value":{"rev":"3-3302bc9846726d996a45daee3dc5922c"}}, +{"id":"Gord","key":"Gord","value":{"rev":"11-32fddef1453773ac7270ba0e7c83f727"}}, +{"id":"Graph","key":"Graph","value":{"rev":"7-c346edea4f90e3e18d50a62473868cf4"}}, +{"id":"GridFS","key":"GridFS","value":{"rev":"27-4fc649aaa007fddec4947bdb7111560f"}}, +{"id":"Haraka","key":"Haraka","value":{"rev":"39-ee8f890521c1579b3cc779c8ebe03480"}}, +{"id":"Index","key":"Index","value":{"rev":"29-d8f4881c1544bf51dea1927e87ebb3f3"}}, +{"id":"JS-Entities","key":"JS-Entities","value":{"rev":"7-905636d8b46f273210233b60063d079b"}}, +{"id":"JSLint-commonJS","key":"JSLint-commonJS","value":{"rev":"3-759a81f82af7055e85ee89c9707c9609"}}, +{"id":"JSON","key":"JSON","value":{"rev":"3-7966a79067c34fb5de2e62c796f67341"}}, +{"id":"JSONPath","key":"JSONPath","value":{"rev":"7-58789d57ae366a5b0ae4b36837f15d59"}}, +{"id":"JSONSelect","key":"JSONSelect","value":{"rev":"9-5b0730da91eeb52e8f54da516367dc0f"}}, +{"id":"JSONloops","key":"JSONloops","value":{"rev":"3-3d4a1f8bfcfd778ab7def54155324331"}}, +{"id":"JSPP","key":"JSPP","value":{"rev":"7-af09a2bb193b3ff44775e8fbb7d4f522"}}, +{"id":"JSV","key":"JSV","value":{"rev":"3-41a7af86909046111be8ee9b56b077c8"}}, +{"id":"Jody","key":"Jody","value":{"rev":"43-70c1cf40e93cd8ce53249e5295d6b159"}}, +{"id":"Journaling-Hash","key":"Journaling-Hash","value":{"rev":"3-ac676eecb40a4dff301c671fa4bb6be9"}}, +{"id":"Kahana","key":"Kahana","value":{"rev":"33-1cb7e291ae02cee4e8105509571223f5"}}, +{"id":"LazyBoy","key":"LazyBoy","value":{"rev":"13-20a8894e3a957f184f5ae2a3e709551c"}}, +{"id":"Lingo","key":"Lingo","value":{"rev":"9-1af9a6df616e601f09c8cec07ccad1ae"}}, +{"id":"Loggy","key":"Loggy","value":{"rev":"33-e115c25163ab468314eedbe497d1c51e"}}, +{"id":"MeCab","key":"MeCab","value":{"rev":"4-2687176c7b878930e812a534976a6988"}}, +{"id":"Mercury","key":"Mercury","value":{"rev":"3-09a6bff1332ed829bd2c37bfec244a41"}}, +{"id":"Mu","key":"Mu","value":{"rev":"7-28e6ab82c402c3a75fe0f79dea846b97"}}, +{"id":"N","key":"N","value":{"rev":"7-e265046b5bdd299b2cad1584083ce2d5"}}, +{"id":"NORRIS","key":"NORRIS","value":{"rev":"3-4b5b23b09118582c44414f8d480619e6"}}, +{"id":"NetOS","key":"NetOS","value":{"rev":"3-3f943f87a24c11e6dd8c265469914e80"}}, +{"id":"NewBase60","key":"NewBase60","value":{"rev":"3-fd84758db79870e82917d358c6673f32"}}, +{"id":"NoCR","key":"NoCR","value":{"rev":"3-8f6cddd528f2d6045e3dda6006fb6948"}}, +{"id":"NodObjC","key":"NodObjC","value":{"rev":"15-ea6ab2df532c90fcefe5a428950bfdbb"}}, +{"id":"Node-JavaScript-Preprocessor","key":"Node-JavaScript-Preprocessor","value":{"rev":"13-4662b5ad742caaa467ec5d6c8e77b1e5"}}, +{"id":"NodeInterval","key":"NodeInterval","value":{"rev":"3-dc3446db2e0cd5be29a3c07942dba66d"}}, +{"id":"NodeSSH","key":"NodeSSH","value":{"rev":"3-45530fae5a69c44a6dd92357910f4212"}}, +{"id":"Nonsense","key":"Nonsense","value":{"rev":"3-9d86191475bc76dc3dd496d4dfe5d94e"}}, +{"id":"NormAndVal","key":"NormAndVal","value":{"rev":"9-d3b3d6ffd046292f4733aa5f3eb7be61"}}, +{"id":"Olive","key":"Olive","value":{"rev":"5-67f3057f09cae5104f09472db1d215aa"}}, +{"id":"OnCollect","key":"OnCollect","value":{"rev":"16-6dbe3afd04f123dda87bb1e21cdfd776"}}, +{"id":"PJsonCouch","key":"PJsonCouch","value":{"rev":"3-be9588f49d85094c36288eb63f8236b3"}}, +{"id":"PMInject","key":"PMInject","value":{"rev":"5-da518047d8273dbf3b3c05ea25e77836"}}, +{"id":"PanPG","key":"PanPG","value":{"rev":"13-beb54225a6b1be4c157434c28adca016"}}, +{"id":"PerfDriver","key":"PerfDriver","value":{"rev":"2-b448fb2f407f341b8df7032f29e4920f"}}, +{"id":"PostgresClient","key":"PostgresClient","value":{"rev":"8-2baec6847f8ad7dcf24b7d61a4034163"}}, +{"id":"QuickWeb","key":"QuickWeb","value":{"rev":"13-d388df9c484021ecd75bc9650d659a67"}}, +{"id":"R.js","key":"R.js","value":{"rev":"3-3f154b95ec6fc744f95a29750f16667e"}}, +{"id":"R2","key":"R2","value":{"rev":"11-f5ccff6f108f6b928caafb62b80d1056"}}, +{"id":"Reston","key":"Reston","value":{"rev":"5-9d234010f32f593edafc04620f3cf2bd"}}, +{"id":"Sardines","key":"Sardines","value":{"rev":"5-d7d3d2269420e21c2c62b86ff5a0021e"}}, +{"id":"SessionWebSocket","key":"SessionWebSocket","value":{"rev":"8-d9fc9beaf90057aefeb701addd7fc845"}}, +{"id":"Sheet","key":"Sheet","value":{"rev":"8-c827c713564e4ae5a17988ffea520d0d"}}, +{"id":"Spec_My_Node","key":"Spec_My_Node","value":{"rev":"8-fa58408e9d9736d9c6fa8daf5d632106"}}, +{"id":"Spot","key":"Spot","value":{"rev":"3-6b6c2131451fed28fb57c924c4fa44cc"}}, +{"id":"Sslac","key":"Sslac","value":{"rev":"3-70a2215cc7505729254aa6fa1d9a25d9"}}, +{"id":"StaticServer","key":"StaticServer","value":{"rev":"3-6f5433177ef4d76a52f01c093117a532"}}, +{"id":"StringScanner","key":"StringScanner","value":{"rev":"3-e85d0646c25ec477c1c45538712d3a38"}}, +{"id":"Structr","key":"Structr","value":{"rev":"3-449720001801cff5831c2cc0e0f1fcf8"}}, +{"id":"Templ8","key":"Templ8","value":{"rev":"11-4e6edb250bc250df20b2d557ca7f6589"}}, +{"id":"Template","key":"Template","value":{"rev":"6-1f055c73524d2b7e82eb6c225bd4b8e0"}}, +{"id":"Thimble","key":"Thimble","value":{"rev":"3-8499b261206f2f2e9acf92d8a4e54afb"}}, +{"id":"Toji","key":"Toji","value":{"rev":"96-511e171ad9f32a9264c2cdf01accacfb"}}, +{"id":"TwigJS","key":"TwigJS","value":{"rev":"3-1aaefc6d6895d7d4824174d410a747b9"}}, +{"id":"UkGeoTool","key":"UkGeoTool","value":{"rev":"5-e84291128e12f66cebb972a60c1d710f"}}, +{"id":"Vector","key":"Vector","value":{"rev":"3-bf5dc97abe7cf1057260b70638175a96"}}, +{"id":"_design/app","key":"_design/app","value":{"rev":"421-b1661d854599a58d0904d68aa44d8b63"}}, +{"id":"_design/ui","key":"_design/ui","value":{"rev":"78-db00aeb91a59a326e38e2bef7f1126cf"}}, +{"id":"aaronblohowiak-plugify-js","key":"aaronblohowiak-plugify-js","value":{"rev":"3-0272c269eacd0c86bfc1711566922577"}}, +{"id":"aaronblohowiak-uglify-js","key":"aaronblohowiak-uglify-js","value":{"rev":"3-77844a6def6ec428d75caa0846c95502"}}, +{"id":"aasm-js","key":"aasm-js","value":{"rev":"3-01a48108d55909575440d9e0ef114f37"}}, +{"id":"abbrev","key":"abbrev","value":{"rev":"16-e17a2b6c7360955b950edf2cb2ef1602"}}, +{"id":"abhispeak","key":"abhispeak","value":{"rev":"5-9889431f68ec10212db3be91796608e2"}}, +{"id":"ace","key":"ace","value":{"rev":"3-e8d267de6c17ebaa82c2869aff983c74"}}, +{"id":"acl","key":"acl","value":{"rev":"13-87c131a1801dc50840a177be73ce1c37"}}, +{"id":"active-client","key":"active-client","value":{"rev":"5-0ca16ae2e48a3ba9de2f6830a8c2d3a0"}}, +{"id":"activenode-monitor","key":"activenode-monitor","value":{"rev":"9-2634fa446379c39475d0ce4183fb92f2"}}, +{"id":"activeobject","key":"activeobject","value":{"rev":"43-6d73e28412612aaee37771e3ab292c3d"}}, +{"id":"actor","key":"actor","value":{"rev":"3-f6b84acd7d2e689b860e3142a18cd460"}}, +{"id":"actors","key":"actors","value":{"rev":"3-6df913bbe5b99968a2e71ae4ef07b2d2"}}, +{"id":"addTimeout","key":"addTimeout","value":{"rev":"15-e5170f0597fe8cf5ed0b54b7e6f2cde1"}}, +{"id":"addressable","key":"addressable","value":{"rev":"27-0c74fde458d92e4b93a29317da15bb3c"}}, +{"id":"aejs","key":"aejs","value":{"rev":"7-4928e2ce6151067cd6c585c0ba3e0bc3"}}, +{"id":"aenoa-supervisor","key":"aenoa-supervisor","value":{"rev":"7-6d399675981e76cfdfb9144bc2f7fb6d"}}, +{"id":"after","key":"after","value":{"rev":"9-baee7683ff54182cf7544cc05b0a4ad7"}}, +{"id":"ahr","key":"ahr","value":{"rev":"27-4ed272c516f3f2f9310e4f0ef28254e9"}}, +{"id":"ahr.browser","key":"ahr.browser","value":{"rev":"3-f7226aab4a1a3ab5f77379f92aae87f9"}}, +{"id":"ahr.browser.jsonp","key":"ahr.browser.jsonp","value":{"rev":"3-abed17143cf5e3c451c3d7da457e6f5b"}}, +{"id":"ahr.browser.request","key":"ahr.browser.request","value":{"rev":"7-fafd7b079d0415f388b64a20509a270b"}}, +{"id":"ahr.node","key":"ahr.node","value":{"rev":"17-f487a4a9896bd3876a11f9dfa1c639a7"}}, +{"id":"ahr.options","key":"ahr.options","value":{"rev":"13-904a4cea763a4455f7b2ae0abba18b8d"}}, +{"id":"ahr.utils","key":"ahr.utils","value":{"rev":"3-5f7b4104ea280d1fd36370c8f3356ead"}}, +{"id":"ahr2","key":"ahr2","value":{"rev":"87-ddf57f3ee158dcd23b2df330e2883a1d"}}, +{"id":"ain","key":"ain","value":{"rev":"7-d840736668fb36e9be3c26a68c5cd411"}}, +{"id":"ain-tcp","key":"ain-tcp","value":{"rev":"11-d18a1780bced8981d1d9dbd262ac4045"}}, +{"id":"ain2","key":"ain2","value":{"rev":"5-0b67879174f5f0a06448c7c737d98b5e"}}, +{"id":"airbrake","key":"airbrake","value":{"rev":"33-4bb9f822162e0c930c31b7f961938dc9"}}, +{"id":"ajaxrunner","key":"ajaxrunner","value":{"rev":"2-17e6a5de4f0339f4e6ce0b7681d0ba0c"}}, +{"id":"ajs","key":"ajs","value":{"rev":"13-063a29dec829fdaf4ca63d622137d1c6"}}, +{"id":"ajs-xgettext","key":"ajs-xgettext","value":{"rev":"3-cd4bbcc1c9d87fa7119d3bbbca99b793"}}, +{"id":"akismet","key":"akismet","value":{"rev":"13-a144e15dd6c2b13177572e80a526edd1"}}, +{"id":"alfred","key":"alfred","value":{"rev":"45-9a69041b18d2587c016b1b1deccdb2ce"}}, +{"id":"alfred-bcrypt","key":"alfred-bcrypt","value":{"rev":"11-7ed10ef318e5515d1ef7c040818ddb22"}}, +{"id":"algorithm","key":"algorithm","value":{"rev":"3-9ec0b38298cc15b0f295152de8763358"}}, +{"id":"algorithm-js","key":"algorithm-js","value":{"rev":"9-dd7496b7ec2e3b23cc7bb182ae3aac6d"}}, +{"id":"alists","key":"alists","value":{"rev":"5-22cc13c86d84081a826ac79a0ae5cda3"}}, +{"id":"altshift","key":"altshift","value":{"rev":"53-1c51d8657f271f390503a6fe988d09db"}}, +{"id":"amazon-ses","key":"amazon-ses","value":{"rev":"5-c175d60de2232a5664666a80832269e5"}}, +{"id":"ambrosia","key":"ambrosia","value":{"rev":"3-8c648ec7393cf842838c20e2c5d9bce4"}}, +{"id":"amd","key":"amd","value":{"rev":"3-d78c4df97a577af598a7def2a38379fa"}}, +{"id":"amionline","key":"amionline","value":{"rev":"3-a62887a632523700402b0f4ebb896812"}}, +{"id":"amo-version-reduce","key":"amo-version-reduce","value":{"rev":"3-05f6956269e5e921ca3486d3d6ea74b0"}}, +{"id":"amqp","key":"amqp","value":{"rev":"17-ee62d2b8248f8eb13f3369422d66df26"}}, +{"id":"amqpsnoop","key":"amqpsnoop","value":{"rev":"3-36a1c45647bcfb2f56cf68dbc24b0426"}}, +{"id":"ams","key":"ams","value":{"rev":"40-1c0cc53ad942d2fd23c89618263befc8"}}, +{"id":"amulet","key":"amulet","value":{"rev":"7-d1ed71811e45652799982e4f2e9ffb36"}}, +{"id":"anachronism","key":"anachronism","value":{"rev":"11-468bdb40f9a5aa146bae3c1c6253d0e1"}}, +{"id":"analytics","key":"analytics","value":{"rev":"3-a143ccdd863b5f7dbee4d2f7732390b3"}}, +{"id":"ann","key":"ann","value":{"rev":"9-41f00594d6216c439f05f7116a697cac"}}, +{"id":"ansi-color","key":"ansi-color","value":{"rev":"6-d6f02b32525c1909d5134afa20f470de"}}, +{"id":"ansi-font","key":"ansi-font","value":{"rev":"3-b039661ad9b6aa7baf34741b449c4420"}}, +{"id":"ant","key":"ant","value":{"rev":"3-35a64e0b7f6eb63a90c32971694b0d93"}}, +{"id":"anvil.js","key":"anvil.js","value":{"rev":"19-290c82075f0a9ad764cdf6dc5c558e0f"}}, +{"id":"aop","key":"aop","value":{"rev":"7-5963506c9e7912aa56fda065c56fd472"}}, +{"id":"ap","key":"ap","value":{"rev":"3-f525b5b490a1ada4452f46307bf92d08"}}, +{"id":"apac","key":"apac","value":{"rev":"12-945d0313a84797b4c3df19da4bec14d4"}}, +{"id":"aparser","key":"aparser","value":{"rev":"5-cb35cfc9184ace6642413dad97e49dca"}}, +{"id":"api-easy","key":"api-easy","value":{"rev":"15-2ab5eefef1377ff217cb020e80343d65"}}, +{"id":"api.js","key":"api.js","value":{"rev":"5-a14b8112fbda17022c80356a010de59a"}}, +{"id":"api_request","key":"api_request","value":{"rev":"3-8531e71f5cf2f3f811684269132d72d4"}}, +{"id":"apimaker","key":"apimaker","value":{"rev":"3-bdbd4a2ebf5b67276d89ea73eaa20025"}}, +{"id":"apn","key":"apn","value":{"rev":"30-0513d27341f587b39db54300c380921f"}}, +{"id":"app","key":"app","value":{"rev":"3-d349ddb47167f60c03d259649569e002"}}, +{"id":"app.js","key":"app.js","value":{"rev":"3-bff3646634daccfd964b4bbe510acb25"}}, +{"id":"append","key":"append","value":{"rev":"7-53e2f4ab2a69dc0c5e92f10a154998b6"}}, +{"id":"applescript","key":"applescript","value":{"rev":"10-ef5ab30ccd660dc71fb89e173f30994a"}}, +{"id":"appzone","key":"appzone","value":{"rev":"21-fb27e24d460677fe9c7eda0d9fb1fead"}}, +{"id":"apricot","key":"apricot","value":{"rev":"14-b55361574a0715f78afc76ddf6125845"}}, +{"id":"arcane","key":"arcane","value":{"rev":"3-f846c96e890ed6150d4271c93cc05a24"}}, +{"id":"archetype","key":"archetype","value":{"rev":"3-441336def3b7aade89c8c1c19a84f56d"}}, +{"id":"ardrone","key":"ardrone","value":{"rev":"8-540e95b796da734366a89bb06dc430c5"}}, +{"id":"ardrone-web","key":"ardrone-web","value":{"rev":"3-8a53cc85a95be20cd44921347e82bbe4"}}, +{"id":"arduino","key":"arduino","value":{"rev":"3-22f6359c47412d086d50dc7f1a994139"}}, +{"id":"argon","key":"argon","value":{"rev":"3-ba12426ce67fac01273310cb3909b855"}}, +{"id":"argparse","key":"argparse","value":{"rev":"8-5e841e38cca6cfc3fe1d1f507a7f47ee"}}, +{"id":"argparser","key":"argparser","value":{"rev":"19-b8793bfc005dd84e1213ee53ae56206d"}}, +{"id":"argsparser","key":"argsparser","value":{"rev":"26-d31eca2f41546172763af629fc50631f"}}, +{"id":"argtype","key":"argtype","value":{"rev":"10-96a7d23e571d56cf598472115bcac571"}}, +{"id":"arguments","key":"arguments","value":{"rev":"7-767de2797f41702690bef5928ec7c6e9"}}, +{"id":"armory","key":"armory","value":{"rev":"41-ea0f7bd0868c11fc9986fa708e11e071"}}, +{"id":"armrest","key":"armrest","value":{"rev":"3-bbe40b6320b6328211be33425bed20c8"}}, +{"id":"arnold","key":"arnold","value":{"rev":"3-4896fc8d02b8623f47a024f0dbfa44bf"}}, +{"id":"arouter","key":"arouter","value":{"rev":"7-55cab1f7128df54f27be94039a8d8dc5"}}, +{"id":"array-promise","key":"array-promise","value":{"rev":"3-e2184561ee65de64c2dfeb57955c758f"}}, +{"id":"arrayemitter","key":"arrayemitter","value":{"rev":"3-d64c917ac1095bfcbf173dac88d3d148"}}, +{"id":"asEvented","key":"asEvented","value":{"rev":"3-2ad3693b49d4d9dc9a11c669033a356e"}}, +{"id":"asciimo","key":"asciimo","value":{"rev":"12-50130f5ac2ef4d95df190be2c8ede893"}}, +{"id":"asereje","key":"asereje","value":{"rev":"15-84853499f89a87109ddf47ba692323ba"}}, +{"id":"ash","key":"ash","value":{"rev":"6-3697a3aee708bece8a08c7e0d1010476"}}, +{"id":"ask","key":"ask","value":{"rev":"3-321bbc3837d749b5d97bff251693a825"}}, +{"id":"asn1","key":"asn1","value":{"rev":"13-e681a814a4a1439a22b19e141b45006f"}}, +{"id":"aspsms","key":"aspsms","value":{"rev":"9-7b82d722bdac29a4da8c88b642ad64f2"}}, +{"id":"assert","key":"assert","value":{"rev":"3-85480762f5cb0be2cb85f80918257189"}}, +{"id":"assertions","key":"assertions","value":{"rev":"9-d797d4c09aa994556c7d5fdb4e86fe1b"}}, +{"id":"assertn","key":"assertn","value":{"rev":"6-080a4fb5d2700a6850d56b58c6f6ee9e"}}, +{"id":"assertvanish","key":"assertvanish","value":{"rev":"13-3b0b555ff77c1bfc2fe2642d50879648"}}, +{"id":"asset","key":"asset","value":{"rev":"33-cb70b68e0e05e9c9a18b3d89f1bb43fc"}}, +{"id":"assetgraph","key":"assetgraph","value":{"rev":"82-7853d644e64741b46fdd29a997ec4852"}}, +{"id":"assetgraph-builder","key":"assetgraph-builder","value":{"rev":"61-1ed98d95f3589050037851edde760a01"}}, +{"id":"assetgraph-sprite","key":"assetgraph-sprite","value":{"rev":"15-351b5fd9e50a3dda8580d014383423e0"}}, +{"id":"assets-expander","key":"assets-expander","value":{"rev":"11-f9e1197b773d0031dd015f1d871b87c6"}}, +{"id":"assets-packager","key":"assets-packager","value":{"rev":"13-51f7d2d57ed35be6aff2cc2aa2fa74db"}}, +{"id":"assoc","key":"assoc","value":{"rev":"9-07098388f501da16bf6afe6c9babefd5"}}, +{"id":"ast-inlining","key":"ast-inlining","value":{"rev":"5-02e7e2c3a06ed81ddc61980f778ac413"}}, +{"id":"ast-transformer","key":"ast-transformer","value":{"rev":"5-b4020bb763b8839afa8d3ac0d54a6f26"}}, +{"id":"astar","key":"astar","value":{"rev":"3-3df8c56c64c3863ef0650c0c74e2801b"}}, +{"id":"aster","key":"aster","value":{"rev":"7-b187c1270d3924f5ee04044e579d2df9"}}, +{"id":"asterisk-manager","key":"asterisk-manager","value":{"rev":"3-7fbf4294dafee04cc17cca4692c09c33"}}, +{"id":"astrolin","key":"astrolin","value":{"rev":"3-30ac515a2388e7dc22b25c15346f6d7e"}}, +{"id":"asyn","key":"asyn","value":{"rev":"3-51996b0197c21e85858559045c1481b7"}}, +{"id":"async","key":"async","value":{"rev":"26-73aea795f46345a7e65d89ec75dff2f1"}}, +{"id":"async-array","key":"async-array","value":{"rev":"17-3ef5faff03333aa5b2a733ef36118066"}}, +{"id":"async-chain","key":"async-chain","value":{"rev":"9-10ec3e50b01567390d55973494e36d43"}}, +{"id":"async-ejs","key":"async-ejs","value":{"rev":"19-6f0e6e0eeb3cdb4c816ea427d8288d7d"}}, +{"id":"async-fs","key":"async-fs","value":{"rev":"3-b96906283d345604f784dfcdbeb21a63"}}, +{"id":"async-it","key":"async-it","value":{"rev":"7-6aed4439df25989cfa040fa4b5dd4ff2"}}, +{"id":"async-json","key":"async-json","value":{"rev":"5-589d5b6665d00c5bffb99bb142cac5d0"}}, +{"id":"async-memoizer","key":"async-memoizer","value":{"rev":"9-01d56f4dff95e61a39dab5ebee49d5dc"}}, +{"id":"async-object","key":"async-object","value":{"rev":"21-1bf28b0f8a7d875b54126437f3539f9b"}}, +{"id":"asyncEJS","key":"asyncEJS","value":{"rev":"3-28b1c94255381f23a4d4f52366255937"}}, +{"id":"async_testing","key":"async_testing","value":{"rev":"14-0275d8b608d8644dfe8d68a81fa07e98"}}, +{"id":"asyncevents","key":"asyncevents","value":{"rev":"3-de104847994365dcab5042db2b46fb84"}}, +{"id":"asyncify","key":"asyncify","value":{"rev":"3-3f6deb82ee1c6cb25e83a48fe6379b75"}}, +{"id":"asyncjs","key":"asyncjs","value":{"rev":"27-15903d7351f80ed37cb069aedbfc26cc"}}, +{"id":"asynct","key":"asynct","value":{"rev":"5-6be002b3e005d2d53b80fff32ccbd2ac"}}, +{"id":"at_scheduler","key":"at_scheduler","value":{"rev":"3-5587061c90218d2e99b6e22d5b488b0b"}}, +{"id":"atbar","key":"atbar","value":{"rev":"19-e9e906d4874afd4d8bf2d8349ed46dff"}}, +{"id":"atob","key":"atob","value":{"rev":"3-bc907d10dd2cfc940de586dc090451da"}}, +{"id":"audiolib","key":"audiolib","value":{"rev":"17-cb2f55ff50061081b440f0605cf0450c"}}, +{"id":"audit_couchdb","key":"audit_couchdb","value":{"rev":"24-6e620895b454b345b2aed13db847c237"}}, +{"id":"auditor","key":"auditor","value":{"rev":"11-c4df509d40650c015943dd90315a12c0"}}, +{"id":"authnet_cim","key":"authnet_cim","value":{"rev":"7-f02bbd206ac2b8c05255bcd8171ac1eb"}}, +{"id":"autocomplete","key":"autocomplete","value":{"rev":"3-f2773bca040d5abcd0536dbebe5847bf"}}, +{"id":"autodafe","key":"autodafe","value":{"rev":"7-a75262b53a9dd1a25693adecde7206d7"}}, +{"id":"autolint","key":"autolint","value":{"rev":"7-07f885902d72b52678fcc57aa4b9c592"}}, +{"id":"autoload","key":"autoload","value":{"rev":"5-9247704d9a992a175e3ae49f4af757d0"}}, +{"id":"autoloader","key":"autoloader","value":{"rev":"11-293c20c34d0c81fac5c06b699576b1fe"}}, +{"id":"auton","key":"auton","value":{"rev":"25-4fcb7a62b607b7929b62a9b792afef55"}}, +{"id":"autoreleasepool","key":"autoreleasepool","value":{"rev":"5-5d2798bf74bbec583cc6f19127e3c89e"}}, +{"id":"autorequire","key":"autorequire","value":{"rev":"9-564a46b355532fcec24db0afc99daed5"}}, +{"id":"autotest","key":"autotest","value":{"rev":"7-e319995dd0e1fbd935c14c46b1234f77"}}, +{"id":"awesome","key":"awesome","value":{"rev":"15-4458b746e4722214bd26ea15e453288e"}}, +{"id":"aws","key":"aws","value":{"rev":"14-9a8f0989be29034d3fa5c66c594b649b"}}, +{"id":"aws-js","key":"aws-js","value":{"rev":"6-c61d87b8ad948cd065d2ca222808c209"}}, +{"id":"aws-lib","key":"aws-lib","value":{"rev":"36-9733e215c03d185a860574600a8feb14"}}, +{"id":"aws2js","key":"aws2js","value":{"rev":"35-42498f44a5ae7d4f3c84096b435d0e0b"}}, +{"id":"azure","key":"azure","value":{"rev":"5-2c4e05bd842d3dcfa419f4d2b67121e2"}}, +{"id":"b64","key":"b64","value":{"rev":"3-e5e727a46df4c8aad38acd117d717140"}}, +{"id":"b64url","key":"b64url","value":{"rev":"9-ab3b017f00a53b0078261254704c30ba"}}, +{"id":"ba","key":"ba","value":{"rev":"11-3cec7ec9a566fe95fbeb34271538d60a"}}, +{"id":"babelweb","key":"babelweb","value":{"rev":"11-8e6a2fe00822cec15573cdda48b6d0a0"}}, +{"id":"backbone","key":"backbone","value":{"rev":"37-79b95355f8af59bf9131e14d52b68edc"}}, +{"id":"backbone-browserify","key":"backbone-browserify","value":{"rev":"3-f25dac0b05a7f7aa5dbc0f4a1ad97969"}}, +{"id":"backbone-celtra","key":"backbone-celtra","value":{"rev":"3-775a5ebb25c1cd84723add52774ece84"}}, +{"id":"backbone-couch","key":"backbone-couch","value":{"rev":"8-548327b3cd7ee7a4144c9070377be5f6"}}, +{"id":"backbone-cradle","key":"backbone-cradle","value":{"rev":"3-b9bc220ec48b05eed1d4d77a746b10db"}}, +{"id":"backbone-dirty","key":"backbone-dirty","value":{"rev":"21-fa0f688cc95a85c0fc440733f09243b5"}}, +{"id":"backbone-dnode","key":"backbone-dnode","value":{"rev":"65-3212d3aa3284efb3bc0732bac71b5a2e"}}, +{"id":"backbone-proxy","key":"backbone-proxy","value":{"rev":"3-3602cb984bdd266516a3145663f9a5c6"}}, +{"id":"backbone-redis","key":"backbone-redis","value":{"rev":"9-2e3f6a9e095b00ccec9aa19b3fbc65eb"}}, +{"id":"backbone-rel","key":"backbone-rel","value":{"rev":"5-f9773dc85f1c502e61c163a22d2f74aa"}}, +{"id":"backbone-simpledb","key":"backbone-simpledb","value":{"rev":"5-a815128e1e3593696f666f8b3da36d78"}}, +{"id":"backbone-stash","key":"backbone-stash","value":{"rev":"19-8d3cc5f9ed28f9a56856154e2b4e7f78"}}, +{"id":"backplane","key":"backplane","value":{"rev":"7-f69188dac21e007b09efe1b5b3575087"}}, +{"id":"backport-0.4","key":"backport-0.4","value":{"rev":"11-25e15f01f1ef9e626433a82284bc00d6"}}, +{"id":"backuptweets","key":"backuptweets","value":{"rev":"3-68712682aada41082d3ae36c03c8f899"}}, +{"id":"bake","key":"bake","value":{"rev":"113-ce13508ba2b4f15aa4df06d796aa4573"}}, +{"id":"bal-util","key":"bal-util","value":{"rev":"31-b818725a5af131c89ec66b9fdebf2122"}}, +{"id":"balancer","key":"balancer","value":{"rev":"7-63dcb4327081a8ec4d6c51a21253cb4b"}}, +{"id":"bancroft","key":"bancroft","value":{"rev":"11-8fa3370a4615a0ed4ba411b05c0285f4"}}, +{"id":"bandcamp","key":"bandcamp","value":{"rev":"41-f2fee472d63257fdba9e5fa8ad570ee8"}}, +{"id":"banner","key":"banner","value":{"rev":"19-89a447e2136b2fabddbad84abcd63a27"}}, +{"id":"banzai-docstore-couchdb","key":"banzai-docstore-couchdb","value":{"rev":"5-950c115737d634e2f48ee1c772788321"}}, +{"id":"banzai-redis","key":"banzai-redis","value":{"rev":"3-446f29e0819fd79c810fdfa8ce05bdcf"}}, +{"id":"banzai-statestore-couchdb","key":"banzai-statestore-couchdb","value":{"rev":"5-c965442821741ce6f20e266fe43aea4a"}}, +{"id":"banzai-statestore-mem","key":"banzai-statestore-mem","value":{"rev":"3-a0891a1a2344922d91781c332ed26528"}}, +{"id":"bar","key":"bar","value":{"rev":"7-fbb44a76cb023e6a8941f15576cf190b"}}, +{"id":"barc","key":"barc","value":{"rev":"7-dfe352b410782543d6b1aea292f123eb"}}, +{"id":"barista","key":"barista","value":{"rev":"9-d3f3c776453ba69a81947f34d7cc3cbf"}}, +{"id":"bark","key":"bark","value":{"rev":"20-fc1a94f80cfa199c16aa075e940e06dc"}}, +{"id":"barricane-db","key":"barricane-db","value":{"rev":"3-450947b9a05047fe195f76a69a3144e8"}}, +{"id":"base-converter","key":"base-converter","value":{"rev":"7-1b49b01df111176b89343ad56ac68d5c"}}, +{"id":"base32","key":"base32","value":{"rev":"11-d686c54c9de557681356e74b83d916e8"}}, +{"id":"base64","key":"base64","value":{"rev":"24-bd713c3d7e96fad180263ed7563c595e"}}, +{"id":"bash","key":"bash","value":{"rev":"3-86a1c61babfa47da0ebc14c2f4e59a6a"}}, +{"id":"basic-auth","key":"basic-auth","value":{"rev":"3-472a87af27264ae81bd4394d70792e55"}}, +{"id":"basicFFmpeg","key":"basicFFmpeg","value":{"rev":"15-3e87a41c543bde1e6f7c49d021fda62f"}}, +{"id":"basicauth","key":"basicauth","value":{"rev":"3-15d95a05b6f5e7b6d7261f87c4eb73de"}}, +{"id":"basil-cookie","key":"basil-cookie","value":{"rev":"11-fff96b263f31b9d017e3cf59bf6fb23f"}}, +{"id":"batik","key":"batik","value":{"rev":"7-a19ce28cbbf54649fa225ed5474eff02"}}, +{"id":"batman","key":"batman","value":{"rev":"15-6af5469bf143790cbb4af196824c9e95"}}, +{"id":"batteries","key":"batteries","value":{"rev":"13-656c68fe887f4af3ef1e720e64275f4e"}}, +{"id":"bbcode","key":"bbcode","value":{"rev":"5-e79a8b62125f8a3a1751bf7bd8875f33"}}, +{"id":"bcrypt","key":"bcrypt","value":{"rev":"31-db8496d1239362a97a26f1e5eeb8a733"}}, +{"id":"beaconpush","key":"beaconpush","value":{"rev":"3-956fcd87a6d3f9d5b9775d47e36aa3e5"}}, +{"id":"bean","key":"bean","value":{"rev":"56-151c1558e15016205e65bd515eab9ee0"}}, +{"id":"bean.database.mongo","key":"bean.database.mongo","value":{"rev":"3-ede73166710137cbf570385b7e8f17fe"}}, +{"id":"beandocs","key":"beandocs","value":{"rev":"3-9f7492984c95b69ca1ad30d40223f117"}}, +{"id":"beanpole","key":"beanpole","value":{"rev":"53-565a78a2304405cdc9f4a6b6101160fa"}}, +{"id":"beanprep","key":"beanprep","value":{"rev":"3-bd387f0072514b8e44131671f9aad1b0"}}, +{"id":"beans","key":"beans","value":{"rev":"54-7f6d40a2a5bf228fe3547cce43edaa63"}}, +{"id":"beanstalk_client","key":"beanstalk_client","value":{"rev":"6-13c8c80aa6469b5dcf20d65909289383"}}, +{"id":"beanstalk_worker","key":"beanstalk_worker","value":{"rev":"6-45500991db97ed5a18ea96f3621bf99f"}}, +{"id":"beantest","key":"beantest","value":{"rev":"7-52d8160a0c0420c7d659b2ee10f26644"}}, +{"id":"beatit","key":"beatit","value":{"rev":"7-c0ba5f95b0601dcb628e4820555cc252"}}, +{"id":"beatport","key":"beatport","value":{"rev":"5-3b186b633ceea7f047e1df91e7b683a5"}}, +{"id":"beautifyjs","key":"beautifyjs","value":{"rev":"3-89ce050152aca0727c099060229ddc73"}}, +{"id":"beaver","key":"beaver","value":{"rev":"17-3b56116e8e40205e8efcedefee0319e3"}}, +{"id":"beeline","key":"beeline","value":{"rev":"11-92a4bd9524cc7aec3106efcacff6faed"}}, +{"id":"beet","key":"beet","value":{"rev":"95-3c9d9de63c363319b2201ac83bc0ee7d"}}, +{"id":"begin","key":"begin","value":{"rev":"3-b32a5eb1b9475353b37f90813ed89dce"}}, +{"id":"begin.js","key":"begin.js","value":{"rev":"7-9156869392a448595bf3e5723fcb7b57"}}, +{"id":"bejesus-api","key":"bejesus-api","value":{"rev":"11-6b42f8ffc370c494d01481b64536e91e"}}, +{"id":"bejesus-cli","key":"bejesus-cli","value":{"rev":"31-5fbbfe5ec1f6a0a7a3fafdf69230434a"}}, +{"id":"bem","key":"bem","value":{"rev":"22-c0e0f8d9e92b355246fd15058199b73c"}}, +{"id":"ben","key":"ben","value":{"rev":"3-debe52552a86f1e71895dd5d32add585"}}, +{"id":"bench","key":"bench","value":{"rev":"14-20987e1becf3acd1bd1833b04712c87c"}}, +{"id":"bencher","key":"bencher","value":{"rev":"3-08866a8fdcf180582b43690bbbf21087"}}, +{"id":"benchmark","key":"benchmark","value":{"rev":"219-0669bc24f3f2918d93369bb0d801abf3"}}, +{"id":"bencode","key":"bencode","value":{"rev":"8-7b9eff4c1658fb3a054ebc6f50e6edcd"}}, +{"id":"beseda","key":"beseda","value":{"rev":"49-5cc8c4e9bb3e836de7db58c3adf9a5bb"}}, +{"id":"bf","key":"bf","value":{"rev":"14-d81312e1bf4f7202b801b4343199aa55"}}, +{"id":"biggie-router","key":"biggie-router","value":{"rev":"42-56a546a78d5abd4402183b3d300d563e"}}, +{"id":"bigint","key":"bigint","value":{"rev":"58-02f368567849596219d6a0e87d9bc6b9"}}, +{"id":"bignumber","key":"bignumber","value":{"rev":"3-6e372428992a767e0a991ec3f39b8343"}}, +{"id":"binary","key":"binary","value":{"rev":"47-947aa2f5238a68e34b164ef7e50ece28"}}, +{"id":"binarySearch","key":"binarySearch","value":{"rev":"15-93a3d2f9c2690457023b5ae5f3d00446"}}, +{"id":"bind","key":"bind","value":{"rev":"9-b74d0af83e90a2655e564ab64bf1d27d"}}, +{"id":"binpack","key":"binpack","value":{"rev":"7-3dc67a64e0ef01f3aa59441c5150e04f"}}, +{"id":"bintrees","key":"bintrees","value":{"rev":"12-507fcd92f447f81842cba08cacb425cf"}}, +{"id":"bisection","key":"bisection","value":{"rev":"5-f785ea3bbd8fcc7cd9381d20417b87bb"}}, +{"id":"bison","key":"bison","value":{"rev":"12-e663b2ef96650b3b5a0cc36524e1b94a"}}, +{"id":"bitcoder","key":"bitcoder","value":{"rev":"8-19c957d6b845f4d7ad531951c971e03d"}}, +{"id":"bitcoin","key":"bitcoin","value":{"rev":"13-af88a28c02ab146622743c4c1c32e87b"}}, +{"id":"bitcoin-impl","key":"bitcoin-impl","value":{"rev":"8-99068f1d259e3c75209a6bd08e3e06a2"}}, +{"id":"bitcoin-p2p","key":"bitcoin-p2p","value":{"rev":"25-6df0283eb6e419bc3a1571f17721b100"}}, +{"id":"bitcoinjs-mongoose","key":"bitcoinjs-mongoose","value":{"rev":"3-57e239b31e218693f8cf3cf1cf098437"}}, +{"id":"bitly","key":"bitly","value":{"rev":"8-d6bfac8338e223fe62538954d2e9246a"}}, +{"id":"bitly.node","key":"bitly.node","value":{"rev":"3-15329b7a77633e0dae2c720e592420fb"}}, +{"id":"biwascheme","key":"biwascheme","value":{"rev":"3-37a85eed1bd2d4ee85ef1e100e7ebe8f"}}, +{"id":"black","key":"black","value":{"rev":"3-e07ae2273357da5894f4b7cdf1b20560"}}, +{"id":"black_coffee","key":"black_coffee","value":{"rev":"3-c5c764cf550ad3c831a085509f64cdfb"}}, +{"id":"bleach","key":"bleach","value":{"rev":"5-ef3ab7e761a6903eb70da1550a07e53d"}}, +{"id":"blend","key":"blend","value":{"rev":"16-c5dd075b3ede45f91056b4b768b2bfe8"}}, +{"id":"bless","key":"bless","value":{"rev":"29-1b9bc6f17acd144f51a297e4bdccfe0e"}}, +{"id":"blitz","key":"blitz","value":{"rev":"5-8bf6786f6fd7dbc0570ba21f803f35e6"}}, +{"id":"blo","key":"blo","value":{"rev":"5-9e752ea37438ea026e88a7aa7e7a91ba"}}, +{"id":"blog","key":"blog","value":{"rev":"13-80fc7b11d73e23ca7e518d271d1836ee"}}, +{"id":"blogmate","key":"blogmate","value":{"rev":"11-e503081be9290647c841aa8c04eb6e70"}}, +{"id":"bloodmoney","key":"bloodmoney","value":{"rev":"3-859b0235de3a29bf241323a31f9aa730"}}, +{"id":"bloom","key":"bloom","value":{"rev":"15-c609882b29d61a771d7dbf17f43016ad"}}, +{"id":"blue","key":"blue","value":{"rev":"6-e84221f7286dffbfda6f8abc6306064c"}}, +{"id":"bluemold","key":"bluemold","value":{"rev":"11-f48528b642b5d38d7c02b03622117fa7"}}, +{"id":"bn-lang","key":"bn-lang","value":{"rev":"3-266f186334f69448a940081589e82b04"}}, +{"id":"bn-lang-util","key":"bn-lang-util","value":{"rev":"3-0bc44f1d7d3746120dd835bfb685e229"}}, +{"id":"bn-log","key":"bn-log","value":{"rev":"5-db81a8a978071efd24b45e350e8b8954"}}, +{"id":"bn-template","key":"bn-template","value":{"rev":"3-604e77465ab1dc7e17f3b325089651ec"}}, +{"id":"bn-time","key":"bn-time","value":{"rev":"3-9c33587e783a98e1ccea409cacd5bbfb"}}, +{"id":"bn-unit","key":"bn-unit","value":{"rev":"3-5f35e3fd446241f682231bedcf846c0a"}}, +{"id":"bncode","key":"bncode","value":{"rev":"7-915a1759135a9837954c0ead58bf8e5a"}}, +{"id":"bnf","key":"bnf","value":{"rev":"5-4fe80fcafcc7a263f28b8dc62093bd8d"}}, +{"id":"bob","key":"bob","value":{"rev":"9-9ceeb581263c04793a2231b3726ab22b"}}, +{"id":"bogart","key":"bogart","value":{"rev":"30-70aed6f0827d2bd09963afddcad7a34a"}}, +{"id":"boil","key":"boil","value":{"rev":"3-7ab0fc3b831c591fd15711c27a6f5de0"}}, +{"id":"bolt","key":"bolt","value":{"rev":"3-138dfbdea2ab53ca714ca51494d32610"}}, +{"id":"bones","key":"bones","value":{"rev":"70-c74f0845c167cd755250fc7b4b9b40c2"}}, +{"id":"bones-admin","key":"bones-admin","value":{"rev":"11-2cdfe738d66aacff8569712a279c041d"}}, +{"id":"bones-auth","key":"bones-auth","value":{"rev":"35-2224f95bf3521809ce805ff215d2856c"}}, +{"id":"bones-document","key":"bones-document","value":{"rev":"13-95971fed1f47005c282e0fa60498e31c"}}, +{"id":"bonsai","key":"bonsai","value":{"rev":"3-67eb8935492d4ae9182a7ec74c1f36a6"}}, +{"id":"bonzo","key":"bonzo","value":{"rev":"142-7c5680b0f841c2263f06e96eb5237825"}}, +{"id":"bookbu","key":"bookbu","value":{"rev":"3-d9a104bccc67eae8a5dc6f0f4c3ba5fc"}}, +{"id":"bootstrap","key":"bootstrap","value":{"rev":"17-7a62dbe5e3323beb47165f13265f1a96"}}, +{"id":"borschik","key":"borschik","value":{"rev":"7-2570b5d6555a031394a55ff054797cb9"}}, +{"id":"bots","key":"bots","value":{"rev":"9-df43539c13d2996d9e32dff848615e8a"}}, +{"id":"bounce","key":"bounce","value":{"rev":"8-a3e424b2be1379743e9628c726facaa8"}}, +{"id":"bowser","key":"bowser","value":{"rev":"11-23ecc98edf5fde63fda626bb03da597f"}}, +{"id":"box2d","key":"box2d","value":{"rev":"6-5c920e9829764cbf904b9a59474c1672"}}, +{"id":"box2dnode","key":"box2dnode","value":{"rev":"3-12ffe24dcc1478ea0008c60c4ef7118f"}}, +{"id":"boxcar","key":"boxcar","value":{"rev":"5-a9ba953c547585285559d0e05c16e29e"}}, +{"id":"boxer","key":"boxer","value":{"rev":"8-60c49ff8574d5a47616796ad991463ad"}}, +{"id":"bracket-matcher","key":"bracket-matcher","value":{"rev":"27-a01c946c69665629e212a0f702be1b38"}}, +{"id":"brain","key":"brain","value":{"rev":"24-3aba33914e0f823505c69ef01361681b"}}, +{"id":"brainfuck","key":"brainfuck","value":{"rev":"7-adf33477ffe8640c9fdd6a0f8b349953"}}, +{"id":"brains","key":"brains","value":{"rev":"3-d7e7a95ea742f9b42fefb594c67c726a"}}, +{"id":"braintree","key":"braintree","value":{"rev":"14-eabe1c3e4e7cfd1f521f4bfd337611f7"}}, +{"id":"brazilnut","key":"brazilnut","value":{"rev":"3-4163b5a5598a8905c1283db9d260e5cc"}}, +{"id":"brazln","key":"brazln","value":{"rev":"29-15895bb5b193552826c196efe084caf2"}}, +{"id":"bread","key":"bread","value":{"rev":"9-093c9dd71fffb9a5b1c9eb8ac3e2a9b0"}}, +{"id":"breakfast","key":"breakfast","value":{"rev":"3-231e3046ede5e35e272dfab4a379015d"}}, +{"id":"brequire","key":"brequire","value":{"rev":"18-58b386e08541b222238aa12a13119fd9"}}, +{"id":"bricks","key":"bricks","value":{"rev":"15-f72e6c858c5bceb00cc34a16d52a7b59"}}, +{"id":"bricks-analytics","key":"bricks-analytics","value":{"rev":"3-dc2b6d2157c5039a4c36ceda46761b37"}}, +{"id":"bricks-compress","key":"bricks-compress","value":{"rev":"5-580eeecaa30c210502f42c5e184344a3"}}, +{"id":"bricks-rewrite","key":"bricks-rewrite","value":{"rev":"5-7a141aacaa3fd706b97847c6e8f9830a"}}, +{"id":"brokenbin","key":"brokenbin","value":{"rev":"5-bbc7a1c9628ed9f49b6d23e80c242852"}}, +{"id":"broker","key":"broker","value":{"rev":"9-756a097b948756e4bd7609b6f83a0847"}}, +{"id":"browscap","key":"browscap","value":{"rev":"12-c6fed16796d1ad84913f2617c66f0c7b"}}, +{"id":"browser-require","key":"browser-require","value":{"rev":"27-99f61fb3036ebc643282625649cc674f"}}, +{"id":"browserify","key":"browserify","value":{"rev":"163-c307ee153caf2160e5c32abd58898139"}}, +{"id":"browserjet","key":"browserjet","value":{"rev":"3-a386ab8911c410362eb8fceab5a998fe"}}, +{"id":"brt","key":"brt","value":{"rev":"3-b8452659a92039571ff1f877c8f874c7"}}, +{"id":"brunch","key":"brunch","value":{"rev":"113-64ae44857425c5d860d36f38ab3cf797"}}, +{"id":"brushes.js","key":"brushes.js","value":{"rev":"3-e28bd6597b949d84965a788928738f53"}}, +{"id":"bson","key":"bson","value":{"rev":"50-9d9db515dd9d2a4d873d186f324767a5"}}, +{"id":"btc-ex-api","key":"btc-ex-api","value":{"rev":"3-cabbf284cb01af79ee183d8023106762"}}, +{"id":"btoa","key":"btoa","value":{"rev":"3-b4a124b3650a746b8da9c9f93f386bac"}}, +{"id":"btoa-atob","key":"btoa-atob","value":{"rev":"3-baac60a3f04487333cc0364301220a53"}}, +{"id":"bucket","key":"bucket","value":{"rev":"3-5c2da8f67e29de1c29adbf51ad7d7299"}}, +{"id":"buffalo","key":"buffalo","value":{"rev":"9-6c763d939d775a255c65ba8dcf0d5372"}}, +{"id":"bufferjs","key":"bufferjs","value":{"rev":"13-b6e09e35ec822714d3ec485ac2010272"}}, +{"id":"bufferlib","key":"bufferlib","value":{"rev":"16-d48d96815fc7709d6b7d0a8bfc67f053"}}, +{"id":"bufferlist","key":"bufferlist","value":{"rev":"18-6fcedc10ffbca1afdc866e208d2f906a"}}, +{"id":"buffers","key":"buffers","value":{"rev":"11-3a70ec2da112befdc65b8c02772b8c44"}}, +{"id":"bufferstream","key":"bufferstream","value":{"rev":"82-6f82c5affb3906ebbaa0b116baf73c54"}}, +{"id":"buffertools","key":"buffertools","value":{"rev":"20-68f90e224f81fab81295f9079dc3c0fc"}}, +{"id":"buffoon","key":"buffoon","value":{"rev":"9-1cdc1cbced94691e836d4266eed7c143"}}, +{"id":"builder","key":"builder","value":{"rev":"25-b9679e2aaffec1ac6d59fdd259d9590c"}}, +{"id":"buildr","key":"buildr","value":{"rev":"69-cb3a756903a6322c6f9f4dd1c384a607"}}, +{"id":"bumper","key":"bumper","value":{"rev":"3-1e8d17aa3b29815e4069294cc9ce572c"}}, +{"id":"bundle","key":"bundle","value":{"rev":"39-46fde9cd841bce1fbdd92f6a1235c308"}}, +{"id":"bunker","key":"bunker","value":{"rev":"7-ed993a296fa0b8d3c3a7cd759d6f371e"}}, +{"id":"burari","key":"burari","value":{"rev":"11-08b61073d6ad0ef0c7449a574dc8f54b"}}, +{"id":"burrito","key":"burrito","value":{"rev":"38-3f3b109972720647f5412f3a2478859b"}}, +{"id":"busbuddy","key":"busbuddy","value":{"rev":"5-298ec29f6307351cf7a19bceebe957c7"}}, +{"id":"buster","key":"buster","value":{"rev":"9-870a6e9638806adde2f40105900cd4b3"}}, +{"id":"buster-args","key":"buster-args","value":{"rev":"7-9b189c602e437a505625dbf7fef5dead"}}, +{"id":"buster-assertions","key":"buster-assertions","value":{"rev":"5-fa34a8a5e7cf4dd08c2d02c39de3b563"}}, +{"id":"buster-cli","key":"buster-cli","value":{"rev":"5-b1a85006e41dbf74313253c571e63874"}}, +{"id":"buster-client","key":"buster-client","value":{"rev":"5-340637ec63b54bb01c1313a78db01945"}}, +{"id":"buster-configuration","key":"buster-configuration","value":{"rev":"3-a12e7ff172562b513534fc26be00aaed"}}, +{"id":"buster-core","key":"buster-core","value":{"rev":"5-871df160645e6684111a8fd02ff0eee9"}}, +{"id":"buster-evented-logger","key":"buster-evented-logger","value":{"rev":"5-c46681e6275a76723e3bc834555dbe32"}}, +{"id":"buster-format","key":"buster-format","value":{"rev":"5-e193e90436c7f941739b82adad86bdd8"}}, +{"id":"buster-module-loader","key":"buster-module-loader","value":{"rev":"5-4148b61f8b718e6181aa6054664a7c44"}}, +{"id":"buster-multicast","key":"buster-multicast","value":{"rev":"3-79480b5be761d243b274cb1e77375afc"}}, +{"id":"buster-promise","key":"buster-promise","value":{"rev":"5-b50030957fbd70e65576faa9c541b739"}}, +{"id":"buster-script-loader","key":"buster-script-loader","value":{"rev":"3-85af28b5bc4e647f27514fede19a144e"}}, +{"id":"buster-server","key":"buster-server","value":{"rev":"7-57b8b43047504818322018d2bbfee1f1"}}, +{"id":"buster-static","key":"buster-static","value":{"rev":"3-018c89d1524f7823934087f18dab9047"}}, +{"id":"buster-terminal","key":"buster-terminal","value":{"rev":"5-2c54c30ffa4a2d4b061e4c38e6b9b0e7"}}, +{"id":"buster-test","key":"buster-test","value":{"rev":"5-f7ee9c9f3b379e0ad5aa03d07581ad6f"}}, +{"id":"buster-test-cli","key":"buster-test-cli","value":{"rev":"9-c207974d20e95029cad5fa4c9435d152"}}, +{"id":"buster-user-agent-parser","key":"buster-user-agent-parser","value":{"rev":"5-7883085a203b3047b28ad08361219d1d"}}, +{"id":"buster-util","key":"buster-util","value":{"rev":"3-81977275a9c467ad79bb7e3f2b1caaa8"}}, +{"id":"butler","key":"butler","value":{"rev":"7-c964c4d213da6b0de2492ee57514d0f8"}}, +{"id":"byline","key":"byline","value":{"rev":"9-0b236ed5986c20136c0d581a244d52ac"}}, +{"id":"bz","key":"bz","value":{"rev":"7-d2a463b259c4e09dc9a79ddee9575ca0"}}, +{"id":"c2dm","key":"c2dm","value":{"rev":"11-a1e6a6643506bed3e1443155706aa5fe"}}, +{"id":"cabin","key":"cabin","value":{"rev":"7-df81ef56f0bb085d381c36600496dc57"}}, +{"id":"caboose","key":"caboose","value":{"rev":"49-7226441f91b63fb5c3ac240bd99d142a"}}, +{"id":"caboose-authentication","key":"caboose-authentication","value":{"rev":"3-9c71a9d7315fdea7d5f52fe52ecef118"}}, +{"id":"caboose-model","key":"caboose-model","value":{"rev":"3-967426d5acb8bb70e133f0052075dc1b"}}, +{"id":"cache2file","key":"cache2file","value":{"rev":"17-ac9caec611a38e1752d91f8cc80cfb04"}}, +{"id":"caching","key":"caching","value":{"rev":"11-06041aaaa46b63ed36843685cac63245"}}, +{"id":"calais","key":"calais","value":{"rev":"11-f8ac2064ca45dd5b7db7ea099cd61dfb"}}, +{"id":"calc","key":"calc","value":{"rev":"3-bead9c5b0bee34e44e7c04aa2bf9cd68"}}, +{"id":"calipso","key":"calipso","value":{"rev":"87-b562676045a66a3ec702591c67a9635e"}}, +{"id":"caman","key":"caman","value":{"rev":"15-4b97c73f0ac101c68335de2937483893"}}, +{"id":"camanjs","key":"camanjs","value":{"rev":"3-2856bbdf7a1d454929b4a80b119e3da0"}}, +{"id":"camelot","key":"camelot","value":{"rev":"7-8e257c5213861ecbd229ee737a3a8bb4"}}, +{"id":"campusbooks","key":"campusbooks","value":{"rev":"18-489be33c6ac2d6cbcf93355f2b129389"}}, +{"id":"canvas","key":"canvas","value":{"rev":"78-27dbf5b6e0a25ba5886d485fd897d701"}}, +{"id":"canvasutil","key":"canvasutil","value":{"rev":"7-0b87a370d673886efb7763aaf500b744"}}, +{"id":"capoo","key":"capoo","value":{"rev":"9-136a3ddf489228d5f4b504b1da619447"}}, +{"id":"capsule","key":"capsule","value":{"rev":"19-ad3c9ba0af71a84228e6dd360017f379"}}, +{"id":"capt","key":"capt","value":{"rev":"13-0805d789000fb2e361103a5e62379196"}}, +{"id":"carena","key":"carena","value":{"rev":"10-d38e8c336a0dbb8091514f638b22b96b"}}, +{"id":"carrier","key":"carrier","value":{"rev":"20-b2b4a0560d40eeac617000e9e22a9e9d"}}, +{"id":"cart","key":"cart","value":{"rev":"12-493e79c6fa0b099626e90da79a69f1e5"}}, +{"id":"carto","key":"carto","value":{"rev":"45-8eab07e2fac57396dd62af5805062387"}}, +{"id":"caruso","key":"caruso","value":{"rev":"5-d58e22212b0bcebbab4b42adc68799aa"}}, +{"id":"cas","key":"cas","value":{"rev":"3-82a93160eb9add99bde1599e55d18fd8"}}, +{"id":"cas-auth","key":"cas-auth","value":{"rev":"3-b02f77c198050b99f1df18f637e77c10"}}, +{"id":"cas-client","key":"cas-client","value":{"rev":"3-ca69e32a3053bc680d1dddc57271483b"}}, +{"id":"cashew","key":"cashew","value":{"rev":"7-9e81cde34263adad6949875c4b33ee99"}}, +{"id":"cassandra","key":"cassandra","value":{"rev":"3-8617ef73fdc73d02ecec74d31f98e463"}}, +{"id":"cassandra-client","key":"cassandra-client","value":{"rev":"19-aa1aef5d203be5b0eac678284f1a979f"}}, +{"id":"casset","key":"casset","value":{"rev":"3-2052c7feb5b89c77aaa279c8b50126ce"}}, +{"id":"castaneum","key":"castaneum","value":{"rev":"26-4dc55ba2482cca4230b4bc77ecb5b70d"}}, +{"id":"cat","key":"cat","value":{"rev":"3-75f20119b363b85c1a8433e26b86c943"}}, +{"id":"catchjs","key":"catchjs","value":{"rev":"3-ffda7eff7613de37f629dc7a831ffda1"}}, +{"id":"caterpillar","key":"caterpillar","value":{"rev":"5-bc003e3af33240e67b4c3042f308b7da"}}, +{"id":"causeeffect","key":"causeeffect","value":{"rev":"9-7e4e25bff656170c97cb0cce1b2ab6ca"}}, +{"id":"cayenne","key":"cayenne","value":{"rev":"5-2797f561467b41cc45804e5498917800"}}, +{"id":"ccn4bnode","key":"ccn4bnode","value":{"rev":"17-96f55189e5c98f0fa8200e403a04eb39"}}, +{"id":"ccnq3_config","key":"ccnq3_config","value":{"rev":"21-40345771769a9cadff4af9113b8124c2"}}, +{"id":"ccnq3_logger","key":"ccnq3_logger","value":{"rev":"5-4aa168dc24425938a29cf9ac456158d7"}}, +{"id":"ccnq3_portal","key":"ccnq3_portal","value":{"rev":"17-84e629ec1eaba1722327ccb9dddb05cf"}}, +{"id":"ccnq3_roles","key":"ccnq3_roles","value":{"rev":"43-97de74b08b1af103da8905533a84b749"}}, +{"id":"ccss","key":"ccss","value":{"rev":"11-b9beb506410ea81581ba4c7dfe9b2a7d"}}, +{"id":"cdb","key":"cdb","value":{"rev":"13-d7b6f609f069dc738912b405aac558ab"}}, +{"id":"cdb_changes","key":"cdb_changes","value":{"rev":"13-1dc99b096cb91c276332b651396789e8"}}, +{"id":"celeri","key":"celeri","value":{"rev":"17-b19294619ef6c2056f3bf6641e8945c2"}}, +{"id":"celery","key":"celery","value":{"rev":"5-bdfccd483cf30c4c10c5ec0963de1248"}}, +{"id":"cempl8","key":"cempl8","value":{"rev":"21-bb9547b78a1548fe11dc1d5b816b6da1"}}, +{"id":"cfg","key":"cfg","value":{"rev":"3-85c7651bb8f16b057e60a46946eb95af"}}, +{"id":"cgi","key":"cgi","value":{"rev":"17-7ceac458c7f141d4fbbf05d267a72aa8"}}, +{"id":"chain","key":"chain","value":{"rev":"9-b0f175c5ad0173bcb7e11e58b02a7394"}}, +{"id":"chain-gang","key":"chain-gang","value":{"rev":"22-b0e6841a344b65530ea2a83a038e5aa6"}}, +{"id":"chainer","key":"chainer","value":{"rev":"15-8c6a565035225a1dcca0177e92ccf42d"}}, +{"id":"chainify","key":"chainify","value":{"rev":"3-0926790f18a0016a9943cfb4830e0187"}}, +{"id":"chains","key":"chains","value":{"rev":"5-d9e1ac38056e2638e38d9a7c415929c6"}}, +{"id":"chainsaw","key":"chainsaw","value":{"rev":"24-82e078efbbc59f798d29a0259481012e"}}, +{"id":"changelog","key":"changelog","value":{"rev":"27-317e473de0bf596b273a9dadecea126d"}}, +{"id":"channel-server","key":"channel-server","value":{"rev":"3-3c882f7e61686e8a124b5198c638a18e"}}, +{"id":"channels","key":"channels","value":{"rev":"5-0b532f054886d9094cb98493ee0a7a16"}}, +{"id":"chaos","key":"chaos","value":{"rev":"40-7caa4459d398f5ec30fea91d087f0d71"}}, +{"id":"chard","key":"chard","value":{"rev":"3-f2de35f7a390ea86ac0eb78bf720d0de"}}, +{"id":"charenc","key":"charenc","value":{"rev":"3-092036302311a8f5779b800c98170b5b"}}, +{"id":"chargify","key":"chargify","value":{"rev":"5-e3f29f2816b04c26ca047d345928e2c1"}}, +{"id":"charm","key":"charm","value":{"rev":"13-3e7e7b5babc1efc472e3ce62eec2c0c7"}}, +{"id":"chat-server","key":"chat-server","value":{"rev":"7-c73b785372474e083fb8f3e9690761da"}}, +{"id":"chatroom","key":"chatroom","value":{"rev":"3-f4fa8330b7eb277d11407f968bffb6a2"}}, +{"id":"chatspire","key":"chatspire","value":{"rev":"3-081e167e3f7c1982ab1b7fc3679cb87c"}}, +{"id":"checkip","key":"checkip","value":{"rev":"3-b31d58a160a4a3fe2f14cfbf2217949e"}}, +{"id":"cheddar-getter","key":"cheddar-getter","value":{"rev":"3-d675ec138ea704df127fabab6a52a8dc"}}, +{"id":"chess","key":"chess","value":{"rev":"3-8b15268c8b0fb500dcbc83b259e7fb88"}}, +{"id":"chessathome-worker","key":"chessathome-worker","value":{"rev":"7-cdfd411554c35ba7a52e54f7744bed35"}}, +{"id":"chirkut.js","key":"chirkut.js","value":{"rev":"3-c0e515eee0f719c5261a43e692a3585c"}}, +{"id":"chiron","key":"chiron","value":{"rev":"6-ccb575e432c1c1981fc34b4e27329c85"}}, +{"id":"chopper","key":"chopper","value":{"rev":"5-168681c58c2a50796676dea73dc5398b"}}, +{"id":"choreographer","key":"choreographer","value":{"rev":"14-b0159823becdf0b4552967293968b2a8"}}, +{"id":"chromic","key":"chromic","value":{"rev":"3-c4ca0bb1f951db96c727241092afa9cd"}}, +{"id":"chrono","key":"chrono","value":{"rev":"9-6399d715df1a2f4696f89f2ab5d4d83a"}}, +{"id":"chuck","key":"chuck","value":{"rev":"3-71f2ee071d4b6fb2af3b8b828c51d8ab"}}, +{"id":"chunkedstream","key":"chunkedstream","value":{"rev":"3-b145ed7d1abd94ac44343413e4f823e7"}}, +{"id":"cider","key":"cider","value":{"rev":"10-dc20cd3eac9470e96911dcf75ac6492b"}}, +{"id":"cinch","key":"cinch","value":{"rev":"5-086af7f72caefb57284e4101cbe3c905"}}, +{"id":"cipherpipe","key":"cipherpipe","value":{"rev":"5-0b5590f808415a7297de6d45947d911f"}}, +{"id":"cjson","key":"cjson","value":{"rev":"25-02e3d327b48e77dc0f9e070ce9454ac2"}}, +{"id":"ck","key":"ck","value":{"rev":"3-f482385f5392a49353d8ba5eb9c7afef"}}, +{"id":"ckup","key":"ckup","value":{"rev":"26-90a76ec0cdf951dc2ea6058098407ee2"}}, +{"id":"class","key":"class","value":{"rev":"6-e2805f7d87586a66fb5fd170cf74b3b0"}}, +{"id":"class-42","key":"class-42","value":{"rev":"3-14c988567a2c78a857f15c9661bd6430"}}, +{"id":"class-js","key":"class-js","value":{"rev":"5-792fd04288a651dad87bc47eb91c2042"}}, +{"id":"classify","key":"classify","value":{"rev":"23-35eb336c350446f5ed49069df151dbb7"}}, +{"id":"clean-css","key":"clean-css","value":{"rev":"13-e30ea1007f6c5bb49e07276228b8a960"}}, +{"id":"clearInterval","key":"clearInterval","value":{"rev":"3-a49fa235d3dc14d28a3d15f8db291986"}}, +{"id":"clearTimeout","key":"clearTimeout","value":{"rev":"3-e838bd25adc825112922913c1a35b934"}}, +{"id":"cli","key":"cli","value":{"rev":"65-9e79c37c12d21b9b9114093de0773c54"}}, +{"id":"cli-color","key":"cli-color","value":{"rev":"9-0a8e775e713b1351f6a6648748dd16ec"}}, +{"id":"cli-table","key":"cli-table","value":{"rev":"3-9e447a8bb392fb7d9c534445a650e328"}}, +{"id":"clickatell","key":"clickatell","value":{"rev":"3-31f1a66d08a789976919df0c9280de88"}}, +{"id":"clicktime","key":"clicktime","value":{"rev":"9-697a99f5f704bfebbb454df47c9c472a"}}, +{"id":"clientexpress","key":"clientexpress","value":{"rev":"3-9b07041cd7b0c3967c4625ac74c9b50c"}}, +{"id":"cliff","key":"cliff","value":{"rev":"15-ef9ef25dbad08c0e346388522d94c5c3"}}, +{"id":"clip","key":"clip","value":{"rev":"21-c3936e566feebfe0beddb0bbb686c00d"}}, +{"id":"clock","key":"clock","value":{"rev":"5-19bc51841d41408b4446c0862487dc5e"}}, +{"id":"clog","key":"clog","value":{"rev":"5-1610fe2c0f435d2694a1707ee15cd11e"}}, +{"id":"clone","key":"clone","value":{"rev":"11-099d07f38381b54902c4cf5b93671ed4"}}, +{"id":"closure","key":"closure","value":{"rev":"7-9c2ac6b6ec9f14d12d10bfbfad58ec14"}}, +{"id":"closure-compiler","key":"closure-compiler","value":{"rev":"8-b3d2f9e3287dd33094a35d797d6beaf2"}}, +{"id":"cloud","key":"cloud","value":{"rev":"27-407c7aa77d3d4a6cc903d18b383de8b8"}}, +{"id":"cloud9","key":"cloud9","value":{"rev":"71-4af631e3fa2eb28058cb0d18ef3a6a3e"}}, +{"id":"cloudcontrol","key":"cloudcontrol","value":{"rev":"15-2df57385aa9bd92f7ed81e6892e23696"}}, +{"id":"cloudfiles","key":"cloudfiles","value":{"rev":"30-01f84ebda1d8f151b3e467590329960c"}}, +{"id":"cloudfoundry","key":"cloudfoundry","value":{"rev":"3-66fafd3d6b1353b1699d35e634686ab6"}}, +{"id":"cloudmailin","key":"cloudmailin","value":{"rev":"3-a4e3e4d457f5a18261bb8df145cfb418"}}, +{"id":"cloudnode-cli","key":"cloudnode-cli","value":{"rev":"17-3a80f7855ce618f7aee68bd693ed485b"}}, +{"id":"cloudservers","key":"cloudservers","value":{"rev":"42-6bc34f7e34f84a24078b43a609e96c59"}}, +{"id":"clucene","key":"clucene","value":{"rev":"37-3d613f12a857b8fe22fbf420bcca0dc3"}}, +{"id":"cluster","key":"cluster","value":{"rev":"83-63fb7a468d95502f94ea45208ba0a890"}}, +{"id":"cluster-isolatable","key":"cluster-isolatable","value":{"rev":"5-6af883cea9ab1c90bb126d8b3be2d156"}}, +{"id":"cluster-live","key":"cluster-live","value":{"rev":"7-549d19e9727f460c7de48f93b92e9bb3"}}, +{"id":"cluster-log","key":"cluster-log","value":{"rev":"7-9c47854df8ec911e679743185668a5f7"}}, +{"id":"cluster-loggly","key":"cluster-loggly","value":{"rev":"3-e1f7e331282d7b8317ce55e0fce7f934"}}, +{"id":"cluster-mail","key":"cluster-mail","value":{"rev":"9-dc18c5c1b2b265f3d531b92467b6cc35"}}, +{"id":"cluster-responsetimes","key":"cluster-responsetimes","value":{"rev":"3-c9e16daee15eb84910493264e973275c"}}, +{"id":"cluster-socket.io","key":"cluster-socket.io","value":{"rev":"7-29032f0b42575e9fe183a0af92191132"}}, +{"id":"cluster.exception","key":"cluster.exception","value":{"rev":"3-10856526e2f61e3000d62b12abd750e3"}}, +{"id":"clutch","key":"clutch","value":{"rev":"8-50283f7263c430cdd1d293c033571012"}}, +{"id":"cm1-route","key":"cm1-route","value":{"rev":"13-40e72b5a4277b500c98c966bcd2a8a86"}}, +{"id":"cmd","key":"cmd","value":{"rev":"9-9168fcd96fb1ba9449050162023f3570"}}, +{"id":"cmdopt","key":"cmdopt","value":{"rev":"3-85677533e299bf195e78942929cf9839"}}, +{"id":"cmp","key":"cmp","value":{"rev":"5-b10f873b78eb64e406fe55bd001ae0fa"}}, +{"id":"cmudict","key":"cmudict","value":{"rev":"3-cd028380bba917d5ed2be7a8d3b3b0b7"}}, +{"id":"cnlogger","key":"cnlogger","value":{"rev":"9-dbe7e0e50d25ca5ae939fe999c3c562b"}}, +{"id":"coa","key":"coa","value":{"rev":"11-ff4e634fbebd3f80b9461ebe58b3f64e"}}, +{"id":"cobra","key":"cobra","value":{"rev":"5-a3e0963830d350f4a7e91b438caf9117"}}, +{"id":"cockpit","key":"cockpit","value":{"rev":"3-1757b37245ee990999e4456b9a6b963e"}}, +{"id":"coco","key":"coco","value":{"rev":"104-eabc4d7096295c2156144a7581d89b35"}}, +{"id":"cocos2d","key":"cocos2d","value":{"rev":"19-88a5c75ceb6e7667665c056d174f5f1a"}}, +{"id":"codem-transcode","key":"codem-transcode","value":{"rev":"9-1faa2657d53271ccc44cce27de723e99"}}, +{"id":"codepad","key":"codepad","value":{"rev":"5-094ddce74dc057dc0a4d423d6d2fbc3a"}}, +{"id":"codetube","key":"codetube","value":{"rev":"3-819794145f199330e724864db70da53b"}}, +{"id":"coerce","key":"coerce","value":{"rev":"3-e7d392d497c0b8491b89fcbbd1a5a89f"}}, +{"id":"coffee-conf","key":"coffee-conf","value":{"rev":"3-883bc4767d70810ece2fdf1ccae883de"}}, +{"id":"coffee-css","key":"coffee-css","value":{"rev":"11-66ca197173751389b24945f020f198f9"}}, +{"id":"coffee-echonest","key":"coffee-echonest","value":{"rev":"3-3cd0e2b77103e334eccf6cf4168f39b2"}}, +{"id":"coffee-machine","key":"coffee-machine","value":{"rev":"9-02deb4d27fd5d56002ead122e9bb213e"}}, +{"id":"coffee-new","key":"coffee-new","value":{"rev":"67-0664b0f289030c38d113070fd26f4f71"}}, +{"id":"coffee-resque","key":"coffee-resque","value":{"rev":"22-5b022809317d3a873be900f1a697c5eb"}}, +{"id":"coffee-resque-retry","key":"coffee-resque-retry","value":{"rev":"29-1fb64819a4a21ebb4d774d9d4108e419"}}, +{"id":"coffee-revup","key":"coffee-revup","value":{"rev":"3-23aafa258bcdcf2bb68d143d61383551"}}, +{"id":"coffee-script","key":"coffee-script","value":{"rev":"60-a6c3739655f43953bd86283776586b95"}}, +{"id":"coffee-son","key":"coffee-son","value":{"rev":"3-84a81e7e24c8cb23293940fc1b87adfe"}}, +{"id":"coffee-toaster","key":"coffee-toaster","value":{"rev":"17-d43d7276c08b526c229c78b7d5acd6cc"}}, +{"id":"coffee-watcher","key":"coffee-watcher","value":{"rev":"3-3d861a748f0928c789cbdb8ff62b6091"}}, +{"id":"coffee-world","key":"coffee-world","value":{"rev":"15-46dc320f94fa64c39e183224ec59f47a"}}, +{"id":"coffee4clients","key":"coffee4clients","value":{"rev":"15-58fba7dd10bced0411cfe546b9336145"}}, +{"id":"coffeeapp","key":"coffeeapp","value":{"rev":"48-bece0a26b78afc18cd37d577f90369d9"}}, +{"id":"coffeebot","key":"coffeebot","value":{"rev":"3-a9007053f25a4c13b324f0ac7066803e"}}, +{"id":"coffeedoc","key":"coffeedoc","value":{"rev":"21-a955faafafd10375baf3101ad2c142d0"}}, +{"id":"coffeegrinder","key":"coffeegrinder","value":{"rev":"9-6e725aad7fd39cd38f41c743ef8a7563"}}, +{"id":"coffeekup","key":"coffeekup","value":{"rev":"35-9b1eecdb7b13d3e75cdc7b1045cf910a"}}, +{"id":"coffeemaker","key":"coffeemaker","value":{"rev":"9-4c5e665aa2a5b4efa2b7d077d0a4f9c1"}}, +{"id":"coffeemate","key":"coffeemate","value":{"rev":"71-03d0221fb495f2dc6732009884027b47"}}, +{"id":"coffeepack","key":"coffeepack","value":{"rev":"3-bbf0e27cb4865392164e7ab33f131d58"}}, +{"id":"coffeeq","key":"coffeeq","value":{"rev":"9-4e38e9742a0b9d7b308565729fbfd123"}}, +{"id":"coffeescript-growl","key":"coffeescript-growl","value":{"rev":"7-2bc1f93c4aad5fa8fb4bcfd1b3ecc279"}}, +{"id":"coffeescript-notify","key":"coffeescript-notify","value":{"rev":"3-8aeb31f8e892d3fefa421ff28a1b3de9"}}, +{"id":"collectd","key":"collectd","value":{"rev":"5-3d4c84b0363aa9c078157d82695557a1"}}, +{"id":"collection","key":"collection","value":{"rev":"3-a47e1fe91b9eebb3e75954e350ec2ca3"}}, +{"id":"collection_functions","key":"collection_functions","value":{"rev":"3-7366c721008062373ec924a409415189"}}, +{"id":"collections","key":"collections","value":{"rev":"3-0237a40d08a0da36c2dd01ce73a89bb2"}}, +{"id":"color","key":"color","value":{"rev":"15-4898b2cd9744feb3249ba10828c186f8"}}, +{"id":"color-convert","key":"color-convert","value":{"rev":"7-2ccb47c7f07a47286d9a2f39383d28f0"}}, +{"id":"color-string","key":"color-string","value":{"rev":"5-9a6336f420e001e301a15b88b0103696"}}, +{"id":"colorize","key":"colorize","value":{"rev":"3-ff380385edacc0c46e4c7b5c05302576"}}, +{"id":"colors","key":"colors","value":{"rev":"8-7c7fb9c5af038c978f0868c7706fe145"}}, +{"id":"colour-extractor","key":"colour-extractor","value":{"rev":"3-62e96a84c6adf23f438b5aac76c7b257"}}, +{"id":"coloured","key":"coloured","value":{"rev":"8-c5295f2d5a8fc08e93d180a4e64f8d38"}}, +{"id":"coloured-log","key":"coloured-log","value":{"rev":"14-8627a3625959443acad71e2c23dfc582"}}, +{"id":"comb","key":"comb","value":{"rev":"5-7f201b621ae9a890c7f5a31867eba3e9"}}, +{"id":"combine","key":"combine","value":{"rev":"14-bed33cd4389a2e4bb826a0516c6ae307"}}, +{"id":"combined-stream","key":"combined-stream","value":{"rev":"13-678f560200ac2835b9026e9e2b955cb0"}}, +{"id":"combiner","key":"combiner","value":{"rev":"3-5e7f133c8c14958eaf9e92bd79ae8ee1"}}, +{"id":"combohandler","key":"combohandler","value":{"rev":"7-d7e1a402f0066caa6756a8866de81dd9"}}, +{"id":"combyne","key":"combyne","value":{"rev":"23-05ebee9666a769e32600bc5548d10ce9"}}, +{"id":"comfy","key":"comfy","value":{"rev":"5-8bfe55bc16611dfe51a184b8f3eb31c1"}}, +{"id":"command-parser","key":"command-parser","value":{"rev":"5-8a5c3ed6dfa0fa55cc71b32cf52332fc"}}, +{"id":"commander","key":"commander","value":{"rev":"11-9dd16c00844d464bf66c101a57075401"}}, +{"id":"commando","key":"commando","value":{"rev":"3-e159f1890f3771dfd6e04f4d984f26f3"}}, +{"id":"common","key":"common","value":{"rev":"16-94eafcf104c0c7d1090e668ddcc12a5f"}}, +{"id":"common-exception","key":"common-exception","value":{"rev":"7-bd46358014299da814691c835548ef21"}}, +{"id":"common-node","key":"common-node","value":{"rev":"5-b2c4bef0e7022d5d453661a9c43497a8"}}, +{"id":"common-pool","key":"common-pool","value":{"rev":"5-c495fa945361ba4fdfb2ee8733d791b4"}}, +{"id":"common-utils","key":"common-utils","value":{"rev":"3-e5a047f118fc304281d2bc5e9ab18e62"}}, +{"id":"commondir","key":"commondir","value":{"rev":"3-ea49874d12eeb9adf28ca28989dfb5a9"}}, +{"id":"commonjs","key":"commonjs","value":{"rev":"6-39fcd0de1ec265890cf063effd0672e3"}}, +{"id":"commonjs-utils","key":"commonjs-utils","value":{"rev":"6-c0266a91dbd0a43effb7d30da5d9f35c"}}, +{"id":"commonkv","key":"commonkv","value":{"rev":"3-90b2fe4c79e263b044303706c4d5485a"}}, +{"id":"commons","key":"commons","value":{"rev":"6-0ecb654aa2bd17cf9519f86d354f8a50"}}, +{"id":"complete","key":"complete","value":{"rev":"7-acde8cba7677747d09c3d53ff165754e"}}, +{"id":"complex-search","key":"complex-search","value":{"rev":"5-c80b2c7f049f333bde89435f3de497ca"}}, +{"id":"compose","key":"compose","value":{"rev":"1-cf8a97d6ead3bef056d85daec5d36c70"}}, +{"id":"composer","key":"composer","value":{"rev":"6-1deb43725051f845efd4a7c8e68aa6d6"}}, +{"id":"compress","key":"compress","value":{"rev":"17-f0aacce1356f807b51e083490fb353bd"}}, +{"id":"compress-buffer","key":"compress-buffer","value":{"rev":"12-2886014c7f2541f4ddff9f0f55f4c171"}}, +{"id":"compress-ds","key":"compress-ds","value":{"rev":"5-9e4c6931edf104443353594ef50aa127"}}, +{"id":"compressor","key":"compressor","value":{"rev":"3-ee8ad155a98e1483d899ebcf82d5fb63"}}, +{"id":"concrete","key":"concrete","value":{"rev":"5-bc70bbffb7c6fe9e8c399db578fb3bae"}}, +{"id":"condo","key":"condo","value":{"rev":"9-5f03d58ee7dc29465defa3758f3b138a"}}, +{"id":"conductor","key":"conductor","value":{"rev":"8-1878afadcda7398063de6286c2d2c5c1"}}, +{"id":"conf","key":"conf","value":{"rev":"11-dcf0f6a93827d1b143cb1d0858f2be4a"}}, +{"id":"config","key":"config","value":{"rev":"37-2b741a1e6951a74b7f1de0d0547418a0"}}, +{"id":"config-loader","key":"config-loader","value":{"rev":"3-708cc96d1206de46fb450eb57ca07b0d"}}, +{"id":"configurator","key":"configurator","value":{"rev":"5-b31ad9731741d19f28241f6af5b41fee"}}, +{"id":"confu","key":"confu","value":{"rev":"7-c46f82c4aa9a17db6530b00669461eaf"}}, +{"id":"confy","key":"confy","value":{"rev":"3-893b33743830a0318dc99b1788aa92ee"}}, +{"id":"connect","key":"connect","value":{"rev":"151-8b5617fc6ece6c125b5f628936159bd6"}}, +{"id":"connect-access-control","key":"connect-access-control","value":{"rev":"3-ccf5fb09533d41eb0b564eb1caecf910"}}, +{"id":"connect-airbrake","key":"connect-airbrake","value":{"rev":"5-19db5e5828977540814d09f9eb7f028f"}}, +{"id":"connect-analytics","key":"connect-analytics","value":{"rev":"3-6f71c8b08ed9f5762c1a4425c196fb2a"}}, +{"id":"connect-app-cache","key":"connect-app-cache","value":{"rev":"27-3e69452dfe51cc907f8b188aede1bda8"}}, +{"id":"connect-assetmanager","key":"connect-assetmanager","value":{"rev":"46-f2a8834d2749e0c069cee06244e7501c"}}, +{"id":"connect-assetmanager-handlers","key":"connect-assetmanager-handlers","value":{"rev":"38-8b93821fcf46f20bbad4319fb39302c1"}}, +{"id":"connect-assets","key":"connect-assets","value":{"rev":"33-7ec2940217e29a9514d20cfd49af10f5"}}, +{"id":"connect-auth","key":"connect-auth","value":{"rev":"36-5640e82f3e2773e44ce47b0687436305"}}, +{"id":"connect-cache","key":"connect-cache","value":{"rev":"11-efe1f0ab00c181b1a4dece446ef13a90"}}, +{"id":"connect-coffee","key":"connect-coffee","value":{"rev":"3-3d4ebcfe083c9e5a5d587090f1bb4d65"}}, +{"id":"connect-conneg","key":"connect-conneg","value":{"rev":"3-bc3e04e65cf1f5233a38cc846e9a4a75"}}, +{"id":"connect-cookie-session","key":"connect-cookie-session","value":{"rev":"3-f48ca73aa1ce1111a2c962d219b59c1a"}}, +{"id":"connect-cors","key":"connect-cors","value":{"rev":"10-5bc9e3759671a0157fdc307872d38844"}}, +{"id":"connect-couchdb","key":"connect-couchdb","value":{"rev":"9-9adb6d24c7fb6de58bafe6d06fb4a230"}}, +{"id":"connect-cradle","key":"connect-cradle","value":{"rev":"5-0e5e32e00a9b98eff1ab010173d26ffb"}}, +{"id":"connect-docco","key":"connect-docco","value":{"rev":"9-c8e379f9a89db53f8921895ac4e87ed6"}}, +{"id":"connect-dojo","key":"connect-dojo","value":{"rev":"17-f323c634536b9b948ad9607f4ca0847f"}}, +{"id":"connect-esi","key":"connect-esi","value":{"rev":"45-01de7506d405856586ea77cb14022192"}}, +{"id":"connect-facebook","key":"connect-facebook","value":{"rev":"3-bf77eb01c0476e607b25bc9d93416b7e"}}, +{"id":"connect-force-domain","key":"connect-force-domain","value":{"rev":"5-a65755f93aaea8a21c7ce7dd4734dca0"}}, +{"id":"connect-form","key":"connect-form","value":{"rev":"16-fa786af79f062a05ecdf3e7cf48317e2"}}, +{"id":"connect-geoip","key":"connect-geoip","value":{"rev":"3-d87f93bcac58aa7904886a8fb6c45899"}}, +{"id":"connect-googleapps","key":"connect-googleapps","value":{"rev":"13-49c5c6c6724b21eea9a8eaae2165978d"}}, +{"id":"connect-gzip","key":"connect-gzip","value":{"rev":"7-2e1d4bb887c1ddda278fc8465ee5645b"}}, +{"id":"connect-heroku-redis","key":"connect-heroku-redis","value":{"rev":"13-92da2be67451e5f55f6fbe3672c86dc4"}}, +{"id":"connect-i18n","key":"connect-i18n","value":{"rev":"8-09d47d7c220770fc80d1b6fd87ffcd07"}}, +{"id":"connect-identity","key":"connect-identity","value":{"rev":"8-8eb9e21bbf80045e0243720955d6070f"}}, +{"id":"connect-image-resizer","key":"connect-image-resizer","value":{"rev":"7-5f82563f87145f3cc06086afe3a14a62"}}, +{"id":"connect-index","key":"connect-index","value":{"rev":"3-8b8373334079eb26c8735b39483889a0"}}, +{"id":"connect-jsonp","key":"connect-jsonp","value":{"rev":"16-9e80af455e490710f06039d3c0025840"}}, +{"id":"connect-jsonrpc","key":"connect-jsonrpc","value":{"rev":"6-6556800f0bef6ae5eb10496d751048e7"}}, +{"id":"connect-kyoto","key":"connect-kyoto","value":{"rev":"5-8f6a9e9b24d1a71c786645402f509645"}}, +{"id":"connect-less","key":"connect-less","value":{"rev":"3-461ed9a80b462b978a81d5bcee6f3665"}}, +{"id":"connect-load-balance","key":"connect-load-balance","value":{"rev":"3-e74bff5fb47d1490c05a9cc4339af347"}}, +{"id":"connect-memcached","key":"connect-memcached","value":{"rev":"3-5fc92b7f9fb5bcfb364a27e6f052bcc7"}}, +{"id":"connect-mongo","key":"connect-mongo","value":{"rev":"13-c3869bc7337b2f1ee6b9b3364993f321"}}, +{"id":"connect-mongodb","key":"connect-mongodb","value":{"rev":"30-30cb932839ce16e4e496f5a33fdd720a"}}, +{"id":"connect-mongoose","key":"connect-mongoose","value":{"rev":"3-48a5b329e4cfa885442d43bbd1d0db46"}}, +{"id":"connect-mongoose-session","key":"connect-mongoose-session","value":{"rev":"3-6692b8e1225d5cd6a2daabd61cecb1cd"}}, +{"id":"connect-mysql-session","key":"connect-mysql-session","value":{"rev":"9-930abd0279ef7f447e75c95b3e71be12"}}, +{"id":"connect-no-www","key":"connect-no-www","value":{"rev":"3-33bed7417bc8a5e8efc74ce132c33158"}}, +{"id":"connect-notifo","key":"connect-notifo","value":{"rev":"3-4681f8c5a7dfd35aee9634e809c41804"}}, +{"id":"connect-parameter-router","key":"connect-parameter-router","value":{"rev":"3-f435f06d556c208d43ef05c64bcddceb"}}, +{"id":"connect-pg","key":"connect-pg","value":{"rev":"11-d84c53d8f1c24adfc266e7a031dddf0d"}}, +{"id":"connect-proxy","key":"connect-proxy","value":{"rev":"7-a691ff57a9affeab47c54d17dbe613cb"}}, +{"id":"connect-queryparser","key":"connect-queryparser","value":{"rev":"3-bb35a7f3f75297a63bf942a63b842698"}}, +{"id":"connect-redis","key":"connect-redis","value":{"rev":"40-4faa12962b14da49380de2bb183176f9"}}, +{"id":"connect-restreamer","key":"connect-restreamer","value":{"rev":"3-08e637ca685cc63b2b4f9722c763c105"}}, +{"id":"connect-riak","key":"connect-riak","value":{"rev":"5-3268c29a54e430a3f8adb33570afafdb"}}, +{"id":"connect-rpx","key":"connect-rpx","value":{"rev":"28-acc7bb4200c1d30f359151f0a715162c"}}, +{"id":"connect-security","key":"connect-security","value":{"rev":"16-fecd20f486a8ea4d557119af5b5a2960"}}, +{"id":"connect-select","key":"connect-select","value":{"rev":"5-5ca28ec800419e4cb3e97395a6b96153"}}, +{"id":"connect-session-mongo","key":"connect-session-mongo","value":{"rev":"9-9e6a26dfbb9c13a9d6f4060a1895730a"}}, +{"id":"connect-session-redis-store","key":"connect-session-redis-store","value":{"rev":"8-fecfed6e17476eaada5cfe7740d43893"}}, +{"id":"connect-sessionvoc","key":"connect-sessionvoc","value":{"rev":"13-57b6e6ea2158e3b7136054839662ea3d"}}, +{"id":"connect-spdy","key":"connect-spdy","value":{"rev":"11-f9eefd7303295d77d317cba78d299130"}}, +{"id":"connect-sts","key":"connect-sts","value":{"rev":"9-8e3fd563c04ce14b824fc4da42efb70e"}}, +{"id":"connect-timeout","key":"connect-timeout","value":{"rev":"4-6f5f8d97480c16c7acb05fe82400bbc7"}}, +{"id":"connect-unstable","key":"connect-unstable","value":{"rev":"3-1d3a4edc52f005d8cb4d557485095314"}}, +{"id":"connect-wormhole","key":"connect-wormhole","value":{"rev":"3-f33b15acc686bd9ad0c6df716529009f"}}, +{"id":"connect-xcors","key":"connect-xcors","value":{"rev":"7-f8e1cd6805a8779bbd6bb2c1000649fb"}}, +{"id":"connect_facebook","key":"connect_facebook","value":{"rev":"3-b3001d71f619836a009c53c816ce36ed"}}, +{"id":"connect_json","key":"connect_json","value":{"rev":"3-dd0df74291f80f45b4314d56192c19c5"}}, +{"id":"connectables","key":"connectables","value":{"rev":"3-f6e9f8f13883a523b4ea6035281f541b"}}, +{"id":"conseq","key":"conseq","value":{"rev":"3-890d340704322630e7a724333f394c70"}}, +{"id":"consistent-hashing","key":"consistent-hashing","value":{"rev":"3-fcef5d4479d926560cf1bc900f746f2a"}}, +{"id":"console","key":"console","value":{"rev":"3-1e0449b07c840eeac6b536e2552844f4"}}, +{"id":"console.log","key":"console.log","value":{"rev":"9-d608afe50e732ca453365befcb87bad5"}}, +{"id":"consolemark","key":"consolemark","value":{"rev":"13-320f003fc2c3cec909ab3e9c3bce9743"}}, +{"id":"construct","key":"construct","value":{"rev":"3-75bdc809ee0572172e6acff537af7d9b"}}, +{"id":"context","key":"context","value":{"rev":"3-86b1a6a0f77ef86d4d9ccfff47ceaf6a"}}, +{"id":"contextify","key":"contextify","value":{"rev":"9-547b8019ef66e0d1c84fe00be832e750"}}, +{"id":"contract","key":"contract","value":{"rev":"3-d09e775c2c1e297b6cbbfcd5efbae3c7"}}, +{"id":"contracts","key":"contracts","value":{"rev":"13-3fd75c77e688937734f51cf97f10dd7d"}}, +{"id":"control","key":"control","value":{"rev":"31-7abf0cb81d19761f3ff59917e56ecedf"}}, +{"id":"controljs","key":"controljs","value":{"rev":"3-a8e80f93e389ca07509fa7addd6cb805"}}, +{"id":"convert","key":"convert","value":{"rev":"3-6c962b92274bcbe82b82a30806559d47"}}, +{"id":"conway","key":"conway","value":{"rev":"5-93ce24976e7dd5ba02fe4addb2b44267"}}, +{"id":"cookie","key":"cookie","value":{"rev":"14-946d98bf46e940d13ca485148b1bd609"}}, +{"id":"cookie-sessions","key":"cookie-sessions","value":{"rev":"8-4b399ac8cc4baea15f6c5e7ac94399f0"}}, +{"id":"cookiejar","key":"cookiejar","value":{"rev":"20-220b41a4c2a8f2b7b14aafece7dcc1b5"}}, +{"id":"cookies","key":"cookies","value":{"rev":"15-b3b35c32a99ed79accc724685d131d18"}}, +{"id":"cool","key":"cool","value":{"rev":"3-007d1123eb2dc52cf845d625f7ccf198"}}, +{"id":"coolmonitor","key":"coolmonitor","value":{"rev":"3-69c3779c596527f63e49c5e507dff1e1"}}, +{"id":"coop","key":"coop","value":{"rev":"9-39dee3260858cf8c079f31bdf02cea1d"}}, +{"id":"coordinator","key":"coordinator","value":{"rev":"32-9d92f2033a041d5c40f8e1018d512755"}}, +{"id":"core-utils","key":"core-utils","value":{"rev":"9-98f2412938a67d83e53e76a26b5601e0"}}, +{"id":"cornify","key":"cornify","value":{"rev":"6-6913172d09c52f9e8dc0ea19ec49972c"}}, +{"id":"corpus","key":"corpus","value":{"rev":"3-a357e7779f8d4ec020b755c71dd1e57b"}}, +{"id":"corrector","key":"corrector","value":{"rev":"3-ef3cf99fc59a581aee3590bdb8615269"}}, +{"id":"cosmos","key":"cosmos","value":{"rev":"3-3eb292c59758fb5215f22739fa9531ce"}}, +{"id":"couch-ar","key":"couch-ar","value":{"rev":"25-f106d2965ab74b25b18328ca44ca4a02"}}, +{"id":"couch-cleaner","key":"couch-cleaner","value":{"rev":"15-74e61ef98a770d76be4c7e7571d18381"}}, +{"id":"couch-client","key":"couch-client","value":{"rev":"10-94945ebd3e17f509fcc71fb6c6ef5d35"}}, +{"id":"couch-session","key":"couch-session","value":{"rev":"4-c73dea41ceed26a2a0bde9a9c8ffffc4"}}, +{"id":"couch-sqlite","key":"couch-sqlite","value":{"rev":"3-3e420fe6623542475595aa7e55a4e4bd"}}, +{"id":"couch-stream","key":"couch-stream","value":{"rev":"5-911704fc984bc49acce1e10adefff7ff"}}, +{"id":"couchapp","key":"couchapp","value":{"rev":"16-ded0f4742bb3f5fd42ec8f9c6b21ae8e"}}, +{"id":"couchcmd","key":"couchcmd","value":{"rev":"3-651ea2b435e031481b5d3d968bd3d1eb"}}, +{"id":"couchdb","key":"couchdb","value":{"rev":"12-8abcfd649751226c10edf7cf0508a09f"}}, +{"id":"couchdb-api","key":"couchdb-api","value":{"rev":"23-f2c82f08f52f266df7ac2aa709615244"}}, +{"id":"couchdb-tmp","key":"couchdb-tmp","value":{"rev":"3-9a695fb4ba352f3be2d57c5995718520"}}, +{"id":"couchdev","key":"couchdev","value":{"rev":"3-50a0ca3ed0395dd72de62a1b96619e66"}}, +{"id":"couchlegs","key":"couchlegs","value":{"rev":"5-be78e7922ad4ff86dbe5c17a87fdf4f1"}}, +{"id":"couchtato","key":"couchtato","value":{"rev":"11-15a1ce8de9a8cf1e81d96de6afbb4f45"}}, +{"id":"couchy","key":"couchy","value":{"rev":"13-0a52b2712fb8447f213866612e3ccbf7"}}, +{"id":"courier","key":"courier","value":{"rev":"17-eb94fe01aeaad43805f4bce21d23bcba"}}, +{"id":"coverage","key":"coverage","value":{"rev":"10-a333448996d0b0d420168d1b5748db32"}}, +{"id":"coverage_testing","key":"coverage_testing","value":{"rev":"3-62834678206fae7911401aa86ec1a85e"}}, +{"id":"cqs","key":"cqs","value":{"rev":"6-0dad8b969c70abccc27a146a99399533"}}, +{"id":"crab","key":"crab","value":{"rev":"9-599fc7757f0c9efbe3889f30981ebe93"}}, +{"id":"cradle","key":"cradle","value":{"rev":"60-8fb414b66cb07b4bae59c0316d5c45b4"}}, +{"id":"cradle-fixed","key":"cradle-fixed","value":{"rev":"4-589afffa26fca22244ad2038abb77dc5"}}, +{"id":"cradle-init","key":"cradle-init","value":{"rev":"13-499d63592141f1e200616952bbdea015"}}, +{"id":"crawler","key":"crawler","value":{"rev":"5-ec4a8d77f90d86d17d6d14d631360188"}}, +{"id":"crc","key":"crc","value":{"rev":"3-25ab83f8b1333e6d4e4e5fb286682422"}}, +{"id":"creatary","key":"creatary","value":{"rev":"3-770ad84ecb2e2a3994637d419384740d"}}, +{"id":"createsend","key":"createsend","value":{"rev":"7-19885346e4d7a01ac2e9ad70ea0e822a"}}, +{"id":"creationix","key":"creationix","value":{"rev":"61-7ede1759afbd41e8b4dedc348b72202e"}}, +{"id":"creek","key":"creek","value":{"rev":"33-4f511aa4dd379e04bba7ac333744325e"}}, +{"id":"cron","key":"cron","value":{"rev":"12-8d794edb5f9b7cb6322acaef1c848043"}}, +{"id":"cron2","key":"cron2","value":{"rev":"13-bae2f1b02ffcbb0e77bde6c33b566f80"}}, +{"id":"crontab","key":"crontab","value":{"rev":"36-14d26bf316289fb4841940eee2932f37"}}, +{"id":"crossroads","key":"crossroads","value":{"rev":"7-d73d51cde30f24caad91e6a3c5b420f2"}}, +{"id":"crowdflower","key":"crowdflower","value":{"rev":"3-16c2dfc9fd505f75068f75bd19e3d227"}}, +{"id":"cruvee","key":"cruvee","value":{"rev":"3-979ccf0286b1701e9e7483a10451d975"}}, +{"id":"crypt","key":"crypt","value":{"rev":"3-031b338129bebc3749b42fb3d442fc4b"}}, +{"id":"crypto","key":"crypto","value":{"rev":"3-66a444b64481c85987dd3f22c32e0630"}}, +{"id":"csj","key":"csj","value":{"rev":"3-bc3133c7a0a8827e89aa03897b81d177"}}, +{"id":"cson","key":"cson","value":{"rev":"7-3ac3e1e10572e74e58874cfe3200eb87"}}, +{"id":"csrf-express","key":"csrf-express","value":{"rev":"3-4cc36d88e8ad10b9c2cc8a7318f0abd3"}}, +{"id":"css-crawler","key":"css-crawler","value":{"rev":"13-4739c7bf1decc72d7682b53303f93ec6"}}, +{"id":"css-smasher","key":"css-smasher","value":{"rev":"3-631128f966135c97d648efa3eadf7bfb"}}, +{"id":"css-sourcery","key":"css-sourcery","value":{"rev":"3-571343da3a09af7de473d29ed7dd788b"}}, +{"id":"css2json","key":"css2json","value":{"rev":"5-fb6d84c1da4a9391fa05d782860fe7c4"}}, +{"id":"csskeeper","key":"csskeeper","value":{"rev":"5-ea667a572832ea515b044d4b87ea7d98"}}, +{"id":"csslike","key":"csslike","value":{"rev":"3-6e957cce81f6e790f8562526d907ad94"}}, +{"id":"csslint","key":"csslint","value":{"rev":"19-b1e973274a0a6b8eb81b4d715a249612"}}, +{"id":"cssmin","key":"cssmin","value":{"rev":"10-4bb4280ec56f110c43abe01189f95818"}}, +{"id":"csso","key":"csso","value":{"rev":"17-ccfe2a72d377919b07973bbb1d19b8f2"}}, +{"id":"cssom","key":"cssom","value":{"rev":"3-f96b884b63b4c04bac18b8d9c0a4c4cb"}}, +{"id":"cssp","key":"cssp","value":{"rev":"5-abf69f9ff99b7d0bf2731a5b5da0897c"}}, +{"id":"cssunminifier","key":"cssunminifier","value":{"rev":"3-7bb0c27006af682af92d1969fcb4fa73"}}, +{"id":"cssutils","key":"cssutils","value":{"rev":"3-4759f9db3b8eac0964e36f5229260526"}}, +{"id":"csv","key":"csv","value":{"rev":"21-0420554e9c08e001063cfb0a69a48255"}}, +{"id":"csv2mongo","key":"csv2mongo","value":{"rev":"9-373f11c05e5d1744c3187d9aaeaae0ab"}}, +{"id":"csvutils","key":"csvutils","value":{"rev":"15-84aa82e56b49cd425a059c8f0735a23c"}}, +{"id":"ctrlflow","key":"ctrlflow","value":{"rev":"33-0b817baf6c744dc17b83d5d8ab1ba74e"}}, +{"id":"ctrlflow_tests","key":"ctrlflow_tests","value":{"rev":"3-d9ed35503d27b0736c59669eecb4c4fe"}}, +{"id":"ctype","key":"ctype","value":{"rev":"9-c5cc231475f23a01682d0b1a3b6e49c2"}}, +{"id":"cube","key":"cube","value":{"rev":"5-40320a20d260e082f5c4ca508659b4d1"}}, +{"id":"cucumber","key":"cucumber","value":{"rev":"11-8489af0361b6981cf9001a0403815936"}}, +{"id":"cucumis","key":"cucumis","value":{"rev":"33-6dc38f1161fae3efa2a89c8288b6e040"}}, +{"id":"cucumis-rm","key":"cucumis-rm","value":{"rev":"3-6179249ad15166f8d77eb136b3fa87ca"}}, +{"id":"cupcake","key":"cupcake","value":{"rev":"15-1dd13a85415a366942e7f0a3de06aa2a"}}, +{"id":"curator","key":"curator","value":{"rev":"19-d798ab7fbca11ba0e9c6c40c0a2f9440"}}, +{"id":"curl","key":"curl","value":{"rev":"11-ac7143ac07c64ea169ba7d4e58be232a"}}, +{"id":"curly","key":"curly","value":{"rev":"30-0248a5563b6e96457315ad0cc2fe22c1"}}, +{"id":"curry","key":"curry","value":{"rev":"11-ce13fa80e84eb25d9cf76cf4162a634e"}}, +{"id":"cursory","key":"cursory","value":{"rev":"3-ea2f4b1b47caf38460402d1a565c18b8"}}, +{"id":"d-utils","key":"d-utils","value":{"rev":"37-699ad471caa28183d75c06f0f2aab41c"}}, +{"id":"d3","key":"d3","value":{"rev":"5-4d867844bd7dce21b34cd7283bb9cad4"}}, +{"id":"d3bench","key":"d3bench","value":{"rev":"3-617cc625bfd91c175d037bfcace9c4e9"}}, +{"id":"daemon","key":"daemon","value":{"rev":"11-8654f90bc609ca2c3ec260c7d6b7793e"}}, +{"id":"daemon-tools","key":"daemon-tools","value":{"rev":"18-8197fce2054de67925e6f2c3fa3cd90a"}}, +{"id":"daimyo","key":"daimyo","value":{"rev":"25-531b0b0afdc5ae3d41b4131da40af6cf"}}, +{"id":"daleth","key":"daleth","value":{"rev":"7-4824619205289ba237ef2a4dc1fba1ec"}}, +{"id":"dali","key":"dali","value":{"rev":"9-037c4c76f739ecb537a064c07d3c63e3"}}, +{"id":"damncomma","key":"damncomma","value":{"rev":"3-b1472eada01efb8a12d521e5a248834b"}}, +{"id":"dana","key":"dana","value":{"rev":"3-2a3c0ff58a6d13fedd17e1d192080e59"}}, +{"id":"dandy","key":"dandy","value":{"rev":"9-f4ae43659dd812a010b0333bf8e5a282"}}, +{"id":"dash","key":"dash","value":{"rev":"5-698513f86165f429a5f55320d5a700f0"}}, +{"id":"dash-fu","key":"dash-fu","value":{"rev":"3-848e99a544f9f78f311c7ebfc5a172c4"}}, +{"id":"dashboard","key":"dashboard","value":{"rev":"3-71844d1fc1140b7533f9e57740d2b666"}}, +{"id":"data","key":"data","value":{"rev":"23-b594e2bd1ffef1cda8b7e94dbf15ad5b"}}, +{"id":"data-layer","key":"data-layer","value":{"rev":"9-9205d35cc6eaf1067ee0cec1b421d749"}}, +{"id":"data-page","key":"data-page","value":{"rev":"3-d7a3346a788a0c07132e50585db11c99"}}, +{"id":"data-section","key":"data-section","value":{"rev":"9-d3fff313977667c53cbadb134d993412"}}, +{"id":"data-uuid","key":"data-uuid","value":{"rev":"8-24001fe9f37c4cc7ac01079ee4767363"}}, +{"id":"data-visitor","key":"data-visitor","value":{"rev":"6-7fe5da9d118fab27157dba97050c6487"}}, +{"id":"database-cleaner","key":"database-cleaner","value":{"rev":"19-4bdfc8b324e95e6da9f72e7b7b708b98"}}, +{"id":"datapool","key":"datapool","value":{"rev":"3-f99c93ca812d2f4725bbaea99122832c"}}, +{"id":"datasift","key":"datasift","value":{"rev":"3-6de3ae25c9a99f651101e191595bcf64"}}, +{"id":"date","key":"date","value":{"rev":"9-b334fc6450d093de40a664a4a835cfc4"}}, +{"id":"date-utils","key":"date-utils","value":{"rev":"31-7be8fcf1919564a8fb7223a86a5954ac"}}, +{"id":"dateformat","key":"dateformat","value":{"rev":"11-5b924e1d29056a0ef9b89b9d7984d5c4"}}, +{"id":"dateformatjs","key":"dateformatjs","value":{"rev":"3-4c50a38ecc493535ee2570a838673937"}}, +{"id":"datejs","key":"datejs","value":{"rev":"5-f47e3e6532817f822aa910b59a45717c"}}, +{"id":"dateselect","key":"dateselect","value":{"rev":"3-ce58def02fd8c8feda8c6f2004726f97"}}, +{"id":"datetime","key":"datetime","value":{"rev":"7-14227b0677eb93b8eb519db47f46bf36"}}, +{"id":"db","key":"db","value":{"rev":"3-636e9ea922a85c92bc11aa9691a2e67f"}}, +{"id":"db-drizzle","key":"db-drizzle","value":{"rev":"157-955f74f49ac4236df317e227c08afaa3"}}, +{"id":"db-mysql","key":"db-mysql","value":{"rev":"224-e596a18d9af33ff1fbcf085a9f4f56fd"}}, +{"id":"db-oracle","key":"db-oracle","value":{"rev":"13-a1e2924d87b4badfddeccf6581525b08"}}, +{"id":"dcrypt","key":"dcrypt","value":{"rev":"29-a144a609bef5004781df901440d67b2d"}}, +{"id":"decafscript","key":"decafscript","value":{"rev":"3-f3a239dc7d503c900fc9854603d716e6"}}, +{"id":"decimal","key":"decimal","value":{"rev":"3-614ed56d4d6c5eb7883d8fd215705a12"}}, +{"id":"decimaljson","key":"decimaljson","value":{"rev":"9-7cb23f4b2b1168b1a213f1eefc85fa51"}}, +{"id":"deck","key":"deck","value":{"rev":"7-da422df97f13c7d84e8f3690c1e1ca32"}}, +{"id":"deckard","key":"deckard","value":{"rev":"3-85e0cd76cdd88ff60a617239060d6f46"}}, +{"id":"deckem","key":"deckem","value":{"rev":"9-03ca75ea35960ccd5779b4cfa8cfb9f9"}}, +{"id":"defensio","key":"defensio","value":{"rev":"5-0ad0ae70b4e184626d914cc4005ee34c"}}, +{"id":"defer","key":"defer","value":{"rev":"3-8d003c96f4263a26b7955e251cddbd95"}}, +{"id":"deferrable","key":"deferrable","value":{"rev":"8-3ae57ce4391105962d09ad619d4c4670"}}, +{"id":"deferred","key":"deferred","value":{"rev":"17-9cee7948dbdf7b6dcc00bbdc60041dd0"}}, +{"id":"define","key":"define","value":{"rev":"45-9d422f2ac5ab693f881df85898d68e3a"}}, +{"id":"deflate","key":"deflate","value":{"rev":"10-3ebe2b87e09f4ae51857cae02e1af788"}}, +{"id":"degrees","key":"degrees","value":{"rev":"5-707c57cfa3e589e8059fe9860cc0c10b"}}, +{"id":"deimos","key":"deimos","value":{"rev":"11-6481696be774d14254fe7c427107dc2a"}}, +{"id":"deja","key":"deja","value":{"rev":"47-bde4457402db895aad46198433842668"}}, +{"id":"delayed-stream","key":"delayed-stream","value":{"rev":"13-f6ca393b08582350f78c5c66f183489b"}}, +{"id":"delegator","key":"delegator","value":{"rev":"3-650651749c1df44ef544c919fae74f82"}}, +{"id":"dep-graph","key":"dep-graph","value":{"rev":"3-e404af87822756da52754e2cc5c576b1"}}, +{"id":"dependency-promise","key":"dependency-promise","value":{"rev":"11-1cc2be8465d736ec8f3cc8940ab22823"}}, +{"id":"depends","key":"depends","value":{"rev":"30-adc9604bbd8117592f82eee923d8703e"}}, +{"id":"deploy","key":"deploy","value":{"rev":"3-82020957528bd0bdd675bed9ac4e4cc5"}}, +{"id":"deployjs","key":"deployjs","value":{"rev":"5-a3e99a5ed81d4b1ad44b6477e6a5a985"}}, +{"id":"deputy-client","key":"deputy-client","value":{"rev":"3-31fd224b301ec0f073df7afa790050ec"}}, +{"id":"deputy-server","key":"deputy-server","value":{"rev":"3-0d790cce82aadfd2b8f39a6b056f2792"}}, +{"id":"derby","key":"derby","value":{"rev":"40-b642048a1a639d77ab139160a4da0fd2"}}, +{"id":"des","key":"des","value":{"rev":"24-fcbdc086e657aef356b75433b3e65ab6"}}, +{"id":"descent","key":"descent","value":{"rev":"7-9cc259b25fc688597fc7efaa516d03c6"}}, +{"id":"describe","key":"describe","value":{"rev":"6-788c7f2feaf2e88f4b1179976b273744"}}, +{"id":"deserver","key":"deserver","value":{"rev":"5-da8083694e89b8434123fe7482a3cc7e"}}, +{"id":"detect","key":"detect","value":{"rev":"3-c27f258d39d7905c2b92383809bb5988"}}, +{"id":"detective","key":"detective","value":{"rev":"9-d6cfa0c6389783cdc9c9ffa9e4082c64"}}, +{"id":"dev","key":"dev","value":{"rev":"23-5c2ce4a4f6a4f24d3cff3b7db997d8bc"}}, +{"id":"dev-warnings","key":"dev-warnings","value":{"rev":"5-5a7d7f36d09893df96441be8b09e41d6"}}, +{"id":"dhcpjs","key":"dhcpjs","value":{"rev":"3-1bc01bd612f3ab1fce178c979aa34e43"}}, +{"id":"dht","key":"dht","value":{"rev":"3-40c0b909b6c0e2305e19d10cea1881b0"}}, +{"id":"dht-bencode","key":"dht-bencode","value":{"rev":"5-88a1da8de312a54097507d72a049f0f3"}}, +{"id":"dialect","key":"dialect","value":{"rev":"18-db7928ce4756eea35db1732d4f2ebc88"}}, +{"id":"dialect-http","key":"dialect-http","value":{"rev":"19-23a927d28cb43733dbd05294134a5b8c"}}, +{"id":"dicks","key":"dicks","value":{"rev":"11-ba64897899e336d366ffd4b68cac99f5"}}, +{"id":"diff","key":"diff","value":{"rev":"13-1a88acb0369ab8ae096a2323d65a2811"}}, +{"id":"diff_match_patch","key":"diff_match_patch","value":{"rev":"8-2f6f467e483b23b217a2047e4aded850"}}, +{"id":"diffbot","key":"diffbot","value":{"rev":"3-8cb8e34af89cb477a5da52e3fd9a13f7"}}, +{"id":"digest","key":"digest","value":{"rev":"7-bc6fb9e68c83197381b0d9ac7db16c1c"}}, +{"id":"dir","key":"dir","value":{"rev":"7-574462bb241a39eeffe6c5184d40c57a"}}, +{"id":"dir-watcher","key":"dir-watcher","value":{"rev":"31-1a3ca4d6aa8aa32c619efad5fbfce494"}}, +{"id":"dir2html","key":"dir2html","value":{"rev":"5-b4bfb2916c2d94c85aa75ffa29ad1af4"}}, +{"id":"directive","key":"directive","value":{"rev":"3-3373f02b8762cb1505c8f8cbcc50d3d4"}}, +{"id":"dirsum","key":"dirsum","value":{"rev":"5-8545445faaa41d2225ec7ff226a10750"}}, +{"id":"dirty","key":"dirty","value":{"rev":"13-d636ea0d1ed35560c0bc7272965c1a6f"}}, +{"id":"dirty-uuid","key":"dirty-uuid","value":{"rev":"5-65acdfda886afca65ae52f0ac21ce1b2"}}, +{"id":"discogs","key":"discogs","value":{"rev":"21-839410e6bf3bee1435ff837daaeaf9f8"}}, +{"id":"discount","key":"discount","value":{"rev":"13-a8fb2a8f668ac0a55fffada1ea94a4b7"}}, +{"id":"discovery","key":"discovery","value":{"rev":"3-46f4496224d132e56cbc702df403219d"}}, +{"id":"diskcache","key":"diskcache","value":{"rev":"23-7b14ad41fc199184fb939828e9122099"}}, +{"id":"dispatch","key":"dispatch","value":{"rev":"6-e72cc7b2bcc97faf897ae4e4fa3ec681"}}, +{"id":"distribute.it","key":"distribute.it","value":{"rev":"12-0978757eb25d22117af675806cf6eef2"}}, +{"id":"dive","key":"dive","value":{"rev":"21-9cbd1281c5a3c2dae0cc0407863f3336"}}, +{"id":"diveSync","key":"diveSync","value":{"rev":"3-015ec4803903106bf24cb4f17cedee68"}}, +{"id":"dk-assets","key":"dk-assets","value":{"rev":"3-25d9b6ac727caf1e227e6436af835d03"}}, +{"id":"dk-core","key":"dk-core","value":{"rev":"3-0b6a2f4dfc0484a3908159a897920bae"}}, +{"id":"dk-couchdb","key":"dk-couchdb","value":{"rev":"3-cc9ef511f9ed46be9d7099f10b1ee776"}}, +{"id":"dk-model","key":"dk-model","value":{"rev":"3-3a61006be57d304724c049e4dcf2fc9b"}}, +{"id":"dk-model-couchdb","key":"dk-model-couchdb","value":{"rev":"3-5163def21660db8428e623909bbfcb4d"}}, +{"id":"dk-routes","key":"dk-routes","value":{"rev":"3-4563357f850248d7d0fb37f9bdcb893b"}}, +{"id":"dk-server","key":"dk-server","value":{"rev":"3-9aef13fc5814785c9805b26828e8d114"}}, +{"id":"dk-template","key":"dk-template","value":{"rev":"3-809c94776252441129705fbe1d93e752"}}, +{"id":"dk-transport","key":"dk-transport","value":{"rev":"3-9271da6f86079027535179b743d0d4c3"}}, +{"id":"dk-websockets","key":"dk-websockets","value":{"rev":"3-426b44c04180d6caf7cf765f03fc52c2"}}, +{"id":"dnet-index-proxy","key":"dnet-index-proxy","value":{"rev":"51-1f3cf4f534c154369d5e774a8f599106"}}, +{"id":"dnode","key":"dnode","value":{"rev":"129-68db10c25c23d635dc828aa698d1279e"}}, +{"id":"dnode-ez","key":"dnode-ez","value":{"rev":"17-75877eab5cf3976b8876c49afd2f7e38"}}, +{"id":"dnode-protocol","key":"dnode-protocol","value":{"rev":"23-fb28f8e1180e6aa44fa564e0d55b3d1e"}}, +{"id":"dnode-smoothiecharts","key":"dnode-smoothiecharts","value":{"rev":"3-d1483028e5768527c2786b9ed5d76463"}}, +{"id":"dnode-stack","key":"dnode-stack","value":{"rev":"9-c1ad8ce01282ce4fa72b5993c580e58e"}}, +{"id":"dnode-worker","key":"dnode-worker","value":{"rev":"3-4c73c0d7ed225197fd8fb0555eaf1152"}}, +{"id":"dns-server","key":"dns-server","value":{"rev":"3-4858a1773da514fea68eac6d9d39f69e"}}, +{"id":"dns-srv","key":"dns-srv","value":{"rev":"12-867c769437fa0ad8a83306aa9e2a158e"}}, +{"id":"doc","key":"doc","value":{"rev":"5-2c077b3fd3b6efa4e927b66f1390e4ea"}}, +{"id":"doc.md","key":"doc.md","value":{"rev":"7-8e8e51be4956550388699222b2e039e7"}}, +{"id":"docco","key":"docco","value":{"rev":"18-891bde1584809c3b1f40fef9961b4f28"}}, +{"id":"docdown","key":"docdown","value":{"rev":"5-fcf5be2ab6ceaed76c1980b462359057"}}, +{"id":"docket","key":"docket","value":{"rev":"13-a4969e0fb17af8dba7df178e364161c2"}}, +{"id":"docpad","key":"docpad","value":{"rev":"77-a478ac8c7ac86e304f9213380ea4b550"}}, +{"id":"docs","key":"docs","value":{"rev":"3-6b1fae9738a3327a3a3be826c0981c3a"}}, +{"id":"dojo-node","key":"dojo-node","value":{"rev":"13-e0dc12e9ce8ab3f40b228c2af8c41064"}}, +{"id":"dom","key":"dom","value":{"rev":"3-cecd9285d0d5b1cab0f18350aac1b2b0"}}, +{"id":"dom-js","key":"dom-js","value":{"rev":"8-dd20e8b23028f4541668501650b52a71"}}, +{"id":"dom-js-ns","key":"dom-js-ns","value":{"rev":"3-787567fc1d6f4ca7e853215a4307b593"}}, +{"id":"domjs","key":"domjs","value":{"rev":"3-d2d05a20dccb57fb6db7da08916c6c0f"}}, +{"id":"doml","key":"doml","value":{"rev":"11-c3b49c50906d9875b546413e4acd1b38"}}, +{"id":"domo","key":"domo","value":{"rev":"3-a4321e6c0c688f773068365b44b08b6b"}}, +{"id":"domready","key":"domready","value":{"rev":"46-21c6b137bbed79ddbff31fdf0ef7d61f"}}, +{"id":"donkey","key":"donkey","value":{"rev":"3-1454aa878654886e8495ebb060aa10f7"}}, +{"id":"dot","key":"dot","value":{"rev":"19-b6d2d53cb9ae1a608a0956aeb8092578"}}, +{"id":"dotaccess","key":"dotaccess","value":{"rev":"13-63ddef6740e84f4517f7dd1bb0d68c56"}}, +{"id":"douche","key":"douche","value":{"rev":"3-6a200f908ccfc9ae549e80209e117cbf"}}, +{"id":"dox","key":"dox","value":{"rev":"10-856cc6bf3dc7c44e028173fea8323c24"}}, +{"id":"drag","key":"drag","value":{"rev":"9-00f27e241269c3df1d71e45b698e9b3b"}}, +{"id":"drain","key":"drain","value":{"rev":"3-8827a0ee7ed74b948bf56d5a33455fc8"}}, +{"id":"drawback","key":"drawback","value":{"rev":"74-dd356b3e55175525317e53c24979a431"}}, +{"id":"drev","key":"drev","value":{"rev":"9-43529419a69529dd7af9a83985aab1f2"}}, +{"id":"drews-mixins","key":"drews-mixins","value":{"rev":"17-63373bae6525859bddfc8d6ad19bdb06"}}, +{"id":"drnu","key":"drnu","value":{"rev":"3-b9b14b2241ded1e52a92fc4225b4ddc5"}}, +{"id":"dropbox","key":"dropbox","value":{"rev":"19-2cb7a40d253621fdfa96f23b96e42ecb"}}, +{"id":"drtoms-nodehelpers","key":"drtoms-nodehelpers","value":{"rev":"3-be0a75cdd7c2d49b1ec4ad1d2c3bc911"}}, +{"id":"drty","key":"drty","value":{"rev":"3-56eabd39b9badfa0af601c5cc64cee2c"}}, +{"id":"drty-facebook","key":"drty-facebook","value":{"rev":"3-fd07af7fb87d7f1d35e13f458a02c127"}}, +{"id":"drumkit","key":"drumkit","value":{"rev":"3-f3cdacef51453d3ac630759aff2a8b58"}}, +{"id":"drupal","key":"drupal","value":{"rev":"13-13835b1e1c8a0e8f0b0e8479640a8d7e"}}, +{"id":"dryice","key":"dryice","value":{"rev":"15-9990fdbde5475a8dbdcc055cb08d654d"}}, +{"id":"dryml","key":"dryml","value":{"rev":"33-483ff8cc3ab1431790cc2587c0bce989"}}, +{"id":"ds","key":"ds","value":{"rev":"9-743274a1d0143927851af07ff0f86d8d"}}, +{"id":"dt","key":"dt","value":{"rev":"3-ab59016f28e182c763b78ba49a59191c"}}, +{"id":"dtl","key":"dtl","value":{"rev":"11-415b4aeec93f096523569615e80f1be1"}}, +{"id":"dtrace-provider","key":"dtrace-provider","value":{"rev":"12-7f01510bd2b1d543f11e3dc02d98ab69"}}, +{"id":"dtrejo","key":"dtrejo","value":{"rev":"3-85f5bb2b9faec499e6aa77fe22e6e3ec"}}, +{"id":"dude","key":"dude","value":{"rev":"3-006528c1efd98312991273ba6ee45f7b"}}, +{"id":"dunce","key":"dunce","value":{"rev":"3-fa4fa5cafdfd1d86c650746f60b7bc0e"}}, +{"id":"duostack","key":"duostack","value":{"rev":"15-47824bdf6e32f49f64014e75421dc42e"}}, +{"id":"duplex-stream","key":"duplex-stream","value":{"rev":"3-2d0e12876e7ad4e5d3ea5520dcbad861"}}, +{"id":"durilka","key":"durilka","value":{"rev":"15-54400496515c8625e8bedf19f8a41cad"}}, +{"id":"dust","key":"dust","value":{"rev":"18-9bc9cae2e48c54f4389e9fce5dfc021e"}}, +{"id":"dustfs","key":"dustfs","value":{"rev":"5-944770c24f06989f3fc62427f2ddebc4"}}, +{"id":"dx","key":"dx","value":{"rev":"3-6000afd60be07d9ff91e7231a388f22f"}}, +{"id":"dynamic","key":"dynamic","value":{"rev":"3-33b83464ed56eb33c052a13dfb709c9c"}}, +{"id":"dynobj","key":"dynobj","value":{"rev":"5-3eb168dae1f9c20369fa1d5ae45f9021"}}, +{"id":"each","key":"each","value":{"rev":"3-5063799b0afcbb61378b1d605660a864"}}, +{"id":"ears","key":"ears","value":{"rev":"11-e77cd2b865409be7ba2e072e98b1c8a1"}}, +{"id":"easey","key":"easey","value":{"rev":"3-a380d8d945e03f55732ae8769cd6dbbf"}}, +{"id":"easy","key":"easy","value":{"rev":"3-73b836a34beafa31cdd8129fe158bf6e"}}, +{"id":"easy-oauth","key":"easy-oauth","value":{"rev":"5-2c1db698e61d77f99633042113099528"}}, +{"id":"easyfs","key":"easyfs","value":{"rev":"3-b807671a77c2a8cc27a9f1aa20ff74c0"}}, +{"id":"easyhash","key":"easyhash","value":{"rev":"3-2eeb24098bc4d201766dcc92dc7325f7"}}, +{"id":"easyrss","key":"easyrss","value":{"rev":"9-1687a54348670ef9ca387ea7ec87f0be"}}, +{"id":"ebnf-diagram","key":"ebnf-diagram","value":{"rev":"3-704e4605bf933b281a6821259a531055"}}, +{"id":"ec2","key":"ec2","value":{"rev":"22-25e562ae8898807c7b4c696c809cf387"}}, +{"id":"echo","key":"echo","value":{"rev":"19-75c2421f623ecc9fe2771f3658589ce8"}}, +{"id":"eco","key":"eco","value":{"rev":"14-b4db836928c91cbf22628cc65ca94f56"}}, +{"id":"ed","key":"ed","value":{"rev":"3-bed9b8225e83a02241d48254077a7df4"}}, +{"id":"edate","key":"edate","value":{"rev":"3-5ec1441ffe3b56d5d01561003b9844f2"}}, +{"id":"eden","key":"eden","value":{"rev":"35-9aa2ff880c2d4f45e3da881b15e58d0a"}}, +{"id":"eio","key":"eio","value":{"rev":"5-e6dd895635596d826ccdf4439761d5fa"}}, +{"id":"ejs","key":"ejs","value":{"rev":"30-c7b020b6cb8ee2626f47db21fc5fedb4"}}, +{"id":"ejs-ext","key":"ejs-ext","value":{"rev":"15-820393685191bbed37938acb7af5885e"}}, +{"id":"elastical","key":"elastical","value":{"rev":"3-c652af043bc4256a29a87e3de9b78093"}}, +{"id":"elasticsearchclient","key":"elasticsearchclient","value":{"rev":"33-bcb59deb7d9d56737a6946c56830ae6b"}}, +{"id":"elastiseahclient","key":"elastiseahclient","value":{"rev":"3-c4e525605859e249f04fb07d31739002"}}, +{"id":"elementtree","key":"elementtree","value":{"rev":"3-ef2017fe67ae425253de911c2f219d31"}}, +{"id":"elf-logger","key":"elf-logger","value":{"rev":"6-98d61588cfc171611568cf86004aa2e1"}}, +{"id":"elk","key":"elk","value":{"rev":"25-8b92241d0218c6593a7dc8a8cc69b7ce"}}, +{"id":"elucidata-build-tools","key":"elucidata-build-tools","value":{"rev":"7-0ad3de708aaac2eebfcfce273bfe6edf"}}, +{"id":"email","key":"email","value":{"rev":"16-110ae6a99ab3e37f4edd9357c03d78c2"}}, +{"id":"email-verificationtoken","key":"email-verificationtoken","value":{"rev":"7-ef37672bc6e9ee806ecc22fd5257ae03"}}, +{"id":"emailjs","key":"emailjs","value":{"rev":"31-0dd24f9aba8d96e9493e55e8345f3d21"}}, +{"id":"embedly","key":"embedly","value":{"rev":"21-47838d8015e9b927c56a7bd52c52e4fc"}}, +{"id":"emile","key":"emile","value":{"rev":"11-05d4715964b5bf2e1fd98096cb7ccc83"}}, +{"id":"emit.io","key":"emit.io","value":{"rev":"3-faacb1c30bb92c06a55a44bb027a9475"}}, +{"id":"emre","key":"emre","value":{"rev":"3-5686f4782f1f5171fff83b662ce68802"}}, +{"id":"encrypt","key":"encrypt","value":{"rev":"3-77e2e2007b452f7fcdfa9e8696a188f5"}}, +{"id":"ender","key":"ender","value":{"rev":"95-89b8c6ccfcaf3eb56f5dbe48bf3c2e24"}}, +{"id":"ender-dragdealer","key":"ender-dragdealer","value":{"rev":"9-e12bb3492614f20fe5781f20e3bb17dc"}}, +{"id":"ender-fermata","key":"ender-fermata","value":{"rev":"3-e52d772042852408ae070b361c247068"}}, +{"id":"ender-fittext","key":"ender-fittext","value":{"rev":"5-e46f5a384d790ea6f65a5f8b9e43bac6"}}, +{"id":"ender-flowplayer","key":"ender-flowplayer","value":{"rev":"3-87267072fb566112315254fdf6547500"}}, +{"id":"ender-js","key":"ender-js","value":{"rev":"80-aa18576f782e3aa14c2ba7ba05658a30"}}, +{"id":"ender-json","key":"ender-json","value":{"rev":"3-5606608389aef832e4d4ecaa6c088a94"}}, +{"id":"ender-lettering","key":"ender-lettering","value":{"rev":"3-6fc6ad3869fad6374a1de69ba4e9301d"}}, +{"id":"ender-modules","key":"ender-modules","value":{"rev":"5-2bbb354d6219b5e13e6c897c562b8c83"}}, +{"id":"ender-poke","key":"ender-poke","value":{"rev":"5-3afa2fd690ebc4f2d75125b2c57e2a43"}}, +{"id":"ender-test","key":"ender-test","value":{"rev":"5-f8e90a951e5ad58199e53645067fad0c"}}, +{"id":"ender-tipsy","key":"ender-tipsy","value":{"rev":"5-cefd04c5d89707dfe31023702328d417"}}, +{"id":"ender-tween","key":"ender-tween","value":{"rev":"13-035312bb47bb3d29e7157932d4d29dcb"}}, +{"id":"ender-vows","key":"ender-vows","value":{"rev":"5-d48e088816d71779a80a74c43cd61b80"}}, +{"id":"ender-wallet","key":"ender-wallet","value":{"rev":"21-93723cd24fbf14d0f58f2ee41df9910d"}}, +{"id":"endtable","key":"endtable","value":{"rev":"36-8febf1be0120d867f9ff90e5c5058ef9"}}, +{"id":"enhance-css","key":"enhance-css","value":{"rev":"7-ae1cf6dee7d3116103781edaa7d47ba4"}}, +{"id":"ensure","key":"ensure","value":{"rev":"27-47e0874d1823188965a02a41abb61739"}}, +{"id":"ent","key":"ent","value":{"rev":"9-51924cd76fabcc4a244db66d65d48eff"}}, +{"id":"entropy","key":"entropy","value":{"rev":"17-84bfbbc0689b3b55e4fa3881888f0c12"}}, +{"id":"enumerable","key":"enumerable","value":{"rev":"3-d31bfcaca3b53eacc9ce09983efffe35"}}, +{"id":"envious","key":"envious","value":{"rev":"3-08d1e6d9c25c4e2350a0dd6759a27426"}}, +{"id":"environ","key":"environ","value":{"rev":"5-6f78def4743dfbeb77c1cb62d41eb671"}}, +{"id":"epub","key":"epub","value":{"rev":"3-5c3604eab851bce0a6ac66db6a6ce77a"}}, +{"id":"erlang","key":"erlang","value":{"rev":"3-3bd8e8e8ed416a32567475d984028b65"}}, +{"id":"err","key":"err","value":{"rev":"11-61d11f26b47d29ef819136214830f24c"}}, +{"id":"errbacker","key":"errbacker","value":{"rev":"5-0ad6d62207abb9822118ae69d0b9181d"}}, +{"id":"es5","key":"es5","value":{"rev":"3-5497cb0c821f3e17234c09ab0e67e1de"}}, +{"id":"es5-basic","key":"es5-basic","value":{"rev":"9-2ff708ae54ae223923cb810f799bfb2d"}}, +{"id":"es5-ext","key":"es5-ext","value":{"rev":"21-04537d704412a631596beeba4d534b33"}}, +{"id":"es5-shim","key":"es5-shim","value":{"rev":"34-3c4c40a6dab9ff137d1a7d4349d72c5b"}}, +{"id":"es5-shimify","key":"es5-shimify","value":{"rev":"3-f85700407e9c129d22b45c15700c82f1"}}, +{"id":"esc","key":"esc","value":{"rev":"5-42911775f391330f361105b8a0cefe47"}}, +{"id":"escaperoute","key":"escaperoute","value":{"rev":"18-e1372f35e6dcdb353b8c11e3c7e2f3b4"}}, +{"id":"escort","key":"escort","value":{"rev":"27-bf43341e15d565c9f67dd3300dc57734"}}, +{"id":"escrito","key":"escrito","value":{"rev":"5-c39d5b373486327b2e13670f921a2c7b"}}, +{"id":"esl","key":"esl","value":{"rev":"9-562ff6239a3b9910989bdf04746fa9d1"}}, +{"id":"espresso","key":"espresso","value":{"rev":"75-4c3692f1e92ea841e2d04338f4f2432e"}}, +{"id":"esproxy","key":"esproxy","value":{"rev":"7-be629dc6e1428f0fdb22fdbe7ab2ee99"}}, +{"id":"etch-a-sketch","key":"etch-a-sketch","value":{"rev":"3-a4e23b8e9f298d4844d6bff0a9688e53"}}, +{"id":"etherpad-lite-client","key":"etherpad-lite-client","value":{"rev":"55-58ca439a697db64ee66652da2d327fcb"}}, +{"id":"etsy","key":"etsy","value":{"rev":"5-1b795b360c28261f11c07d849637047c"}}, +{"id":"eve","key":"eve","value":{"rev":"3-16e72b336a1f354f4dfc8fa783fa2e72"}}, +{"id":"event-emitter","key":"event-emitter","value":{"rev":"5-15fe3e2e19b206929b815909737b15ac"}}, +{"id":"event-queue","key":"event-queue","value":{"rev":"12-200cd3bcd8e0b35bc4b15c1d8b6161e2"}}, +{"id":"event-stream","key":"event-stream","value":{"rev":"15-811a6329b5820d998731a604accf83db"}}, +{"id":"eventable","key":"eventable","value":{"rev":"3-08e9cd94a9aae280f406d043039e545e"}}, +{"id":"eventbrite","key":"eventbrite","value":{"rev":"13-cac3c9bda2da1c7b115de04264bb440f"}}, +{"id":"evented","key":"evented","value":{"rev":"6-ade6271c40a19aab6c4e3bb18b0987b6"}}, +{"id":"evented-twitter","key":"evented-twitter","value":{"rev":"6-3ebb7327022d6d6a8c49d684febb236b"}}, +{"id":"eventedsocket","key":"eventedsocket","value":{"rev":"59-cd2158c47b676a58ca3064a42c5274f7"}}, +{"id":"eventemitter","key":"eventemitter","value":{"rev":"5-7766fd7ebc44d52efbd0e7088e2321ec"}}, +{"id":"eventemitter2","key":"eventemitter2","value":{"rev":"41-927ce7996d4056a21f543e1f928f9699"}}, +{"id":"eventful","key":"eventful","value":{"rev":"7-9505f3c621f50addf02a457cfcc8ae78"}}, +{"id":"eventhub","key":"eventhub","value":{"rev":"15-5390d210a4d3ba079dd6e26bda652caa"}}, +{"id":"eventpipe","key":"eventpipe","value":{"rev":"7-41f0f93a9dcea477f08782af28e5b0f1"}}, +{"id":"events","key":"events","value":{"rev":"12-e3ead8eac62799cb299c139687135289"}}, +{"id":"events.io","key":"events.io","value":{"rev":"3-56c6955024cbb1765a1f9f37d8a739a4"}}, +{"id":"events.node","key":"events.node","value":{"rev":"3-e072f9c457fd8a3882ccd41ce52c5d00"}}, +{"id":"eventstream","key":"eventstream","value":{"rev":"5-a578a3a2a62d50631b3fb4d44a058bd1"}}, +{"id":"eventvat","key":"eventvat","value":{"rev":"3-e26d7fe8a226c7bc7f9e55abf1630e9c"}}, +{"id":"everyauth","key":"everyauth","value":{"rev":"107-a621f3028a230f9f3ade6a4e729a9a38"}}, +{"id":"ewdDOM","key":"ewdDOM","value":{"rev":"7-28188ec27fe011bf7fcb330a5fc90b55"}}, +{"id":"ewdGateway","key":"ewdGateway","value":{"rev":"7-81fe5ec1a3e920894b560fbf96160258"}}, +{"id":"exceptional","key":"exceptional","value":{"rev":"5-5842d306b2cf084c4e7c2ecb1d715280"}}, +{"id":"exceptional-node","key":"exceptional-node","value":{"rev":"5-3385b42af0a6ea8a943cb686d5789b0c"}}, +{"id":"executor","key":"executor","value":{"rev":"3-aee4f949a4d140a439965e137200c4fb"}}, +{"id":"exif","key":"exif","value":{"rev":"3-da6fd2bd837633f673b325231c164a0f"}}, +{"id":"expanda","key":"expanda","value":{"rev":"3-dcbc59c5db0017d25748ec8094aeeb0a"}}, +{"id":"express","key":"express","value":{"rev":"157-24ef0cdd4ba6c6697c66f3e78bc777bb"}}, +{"id":"express-aid","key":"express-aid","value":{"rev":"21-6d3831e93b823f800e6a22eb08aa41d6"}}, +{"id":"express-app-bootstrap","key":"express-app-bootstrap","value":{"rev":"3-4b5a256bef5ca3bd41b0958f594907b9"}}, +{"id":"express-asset","key":"express-asset","value":{"rev":"3-7d5e23bc753851c576e429e7901301d9"}}, +{"id":"express-blocks","key":"express-blocks","value":{"rev":"7-305b6e046355c8e7a4bb0f1f225092ef"}}, +{"id":"express-cache","key":"express-cache","value":{"rev":"5-eebbea6c0e5db5fd4c12847933c853e1"}}, +{"id":"express-chromeframe","key":"express-chromeframe","value":{"rev":"5-1bb72d30b7a1f00d3eaf248285942d5e"}}, +{"id":"express-coffee","key":"express-coffee","value":{"rev":"39-14eff195c9352c6c3898befb3d613807"}}, +{"id":"express-config","key":"express-config","value":{"rev":"3-27ea0d27e20afa9ece375878aab846ed"}}, +{"id":"express-configure","key":"express-configure","value":{"rev":"7-46bd636c0b56dfcfa4f1ee46b43d6ca0"}}, +{"id":"express-contrib","key":"express-contrib","value":{"rev":"20-472c93fefe0a9a6440a76b2c843b2e0e"}}, +{"id":"express-controllers","key":"express-controllers","value":{"rev":"3-296d54f3b5bf26bfa057cd8c5f0a11ea"}}, +{"id":"express-controllers-new","key":"express-controllers-new","value":{"rev":"15-11f73e4a8ab935987a3b8f132d80afa5"}}, +{"id":"express-cross-site","key":"express-cross-site","value":{"rev":"11-b76814fdd58a616b3cafe6e97f3c7c98"}}, +{"id":"express-csrf","key":"express-csrf","value":{"rev":"20-2a79f0fdc65ed91120e7417a5cf8ce6c"}}, +{"id":"express-custom-errors","key":"express-custom-errors","value":{"rev":"6-bd131169ccac73fa3766195147e34404"}}, +{"id":"express-dialect","key":"express-dialect","value":{"rev":"34-1fbc5baf7ea464abbadcfaf3c1971660"}}, +{"id":"express-dust","key":"express-dust","value":{"rev":"5-33a1d8dd9c113d6fb8f1818c8a749c1b"}}, +{"id":"express-expose","key":"express-expose","value":{"rev":"7-f8757d8bf8d3fac8395ee8ce5117a895"}}, +{"id":"express-extras","key":"express-extras","value":{"rev":"6-53c7bfc68a41043eb5e11321673a2c48"}}, +{"id":"express-form","key":"express-form","value":{"rev":"27-533598a1bd5a0e9b8d694f5b38228c6c"}}, +{"id":"express-helpers","key":"express-helpers","value":{"rev":"3-7b9123b0ea6b840bb5a6e4da9c28308c"}}, +{"id":"express-livejade","key":"express-livejade","value":{"rev":"9-1320996d4ed3db352a2c853226880a17"}}, +{"id":"express-logger","key":"express-logger","value":{"rev":"5-c485b1020742310a313cac87abdde67b"}}, +{"id":"express-messages","key":"express-messages","value":{"rev":"5-f6225b906d0ac33ba1bfc5409b227edb"}}, +{"id":"express-messages-bootstrap","key":"express-messages-bootstrap","value":{"rev":"5-fb8fc70c1cbd6df0e07b2e0148bdf8bf"}}, +{"id":"express-mongoose","key":"express-mongoose","value":{"rev":"29-2d6907a23c8c3bbfdf9b6f9b6b3c00e3"}}, +{"id":"express-mvc-bootstrap","key":"express-mvc-bootstrap","value":{"rev":"15-c53ecb696af1d34ff94efe5ab5d89287"}}, +{"id":"express-namespace","key":"express-namespace","value":{"rev":"7-d209feb707821b06426aed233295df75"}}, +{"id":"express-on-railway","key":"express-on-railway","value":{"rev":"7-784b533cbf29930d04039bafb2c03cc0"}}, +{"id":"express-params","key":"express-params","value":{"rev":"3-13f0ed9c17d10fd01d1ff869e625c91f"}}, +{"id":"express-resource","key":"express-resource","value":{"rev":"13-cca556327152588a87112c6bf2613bc9"}}, +{"id":"express-rewrite","key":"express-rewrite","value":{"rev":"7-c76ca2616eb6e70209ace6499f5b961a"}}, +{"id":"express-route-util","key":"express-route-util","value":{"rev":"9-4b7bad7e8ab3bf71daf85362b47ec8be"}}, +{"id":"express-rpx","key":"express-rpx","value":{"rev":"9-54d48f5e24174500c73f07d97a7d3f9f"}}, +{"id":"express-session-mongo","key":"express-session-mongo","value":{"rev":"3-850cf5b42f65a6f27af6edf1ad1aa966"}}, +{"id":"express-session-mongo-russp","key":"express-session-mongo-russp","value":{"rev":"7-441e8afcd466a4cbb5e65a1949190f97"}}, +{"id":"express-session-redis","key":"express-session-redis","value":{"rev":"6-5f4f16092a0706d2daef89470d6971e6"}}, +{"id":"express-share","key":"express-share","value":{"rev":"5-f5327a97738e9c8e6e05a51cb7153f82"}}, +{"id":"express-spdy","key":"express-spdy","value":{"rev":"11-2634f388338c45b2d6f020d2a6739ba1"}}, +{"id":"express-template-override","key":"express-template-override","value":{"rev":"5-758cf2eb0c9cbc32f205c4ba2ece24f9"}}, +{"id":"express-trace","key":"express-trace","value":{"rev":"5-ba59571f8881e02e2b297ed9ffb4e48c"}}, +{"id":"express-unstable","key":"express-unstable","value":{"rev":"3-06467336e1610ba9915401df26c936c1"}}, +{"id":"express-validate","key":"express-validate","value":{"rev":"15-b63bd9b18fadfc2345d0a10a7a2fb2e7"}}, +{"id":"express-view-helpers","key":"express-view-helpers","value":{"rev":"7-4d07ba11f81788783c6f9fd48fdf8834"}}, +{"id":"express-with-ease","key":"express-with-ease","value":{"rev":"3-604d9176a4a03f9f7c74679604c7bbf9"}}, +{"id":"express-wormhole","key":"express-wormhole","value":{"rev":"3-7e06cf63b070e0f54b2aa71b48db9a40"}}, +{"id":"expresso","key":"expresso","value":{"rev":"79-a27b6ef2f9e7bb9f85da34f728d124a8"}}, +{"id":"expressobdd","key":"expressobdd","value":{"rev":"5-e8cae7a17a9e8c1779c08abedc674e03"}}, +{"id":"ext","key":"ext","value":{"rev":"6-8790c06324c5f057b1713ba420e8bf27"}}, +{"id":"extend","key":"extend","value":{"rev":"3-934d0de77bbaefb1b52ec18a17f46d7d"}}, +{"id":"extendables","key":"extendables","value":{"rev":"11-e4db9b62a4047e95fb4d7f88e351a14e"}}, +{"id":"extjs-node","key":"extjs-node","value":{"rev":"3-2b2033dbbf0b99d41e876498886b0995"}}, +{"id":"extractcontent","key":"extractcontent","value":{"rev":"6-ad70764c834ecd3414cbc15dbda317c3"}}, +{"id":"extractor","key":"extractor","value":{"rev":"9-f95bde04bb8db37350c9cc95c5578c03"}}, +{"id":"extx-layout","key":"extx-layout","value":{"rev":"3-f6bbc3a923ebce17f62cbf382b096ac7"}}, +{"id":"extx-reference-slot","key":"extx-reference-slot","value":{"rev":"14-b1b92573492f7239144693ee9e1d1aac"}}, +{"id":"extx-shotenjin","key":"extx-shotenjin","value":{"rev":"5-c641121ba57fb960d8db766511ecf6cd"}}, +{"id":"eyes","key":"eyes","value":{"rev":"16-fab6b201646fb12986e396c33a7cd428"}}, +{"id":"f","key":"f","value":{"rev":"3-23b73ffafbe5b56b6a0736db6a7256a6"}}, +{"id":"f-core","key":"f-core","value":{"rev":"3-9a6898e007acf48d956f0a70ff07a273"}}, +{"id":"f7u12rl","key":"f7u12rl","value":{"rev":"3-7b5e15d106db8b7f8784b27f7d2c9bdc"}}, +{"id":"fab","key":"fab","value":{"rev":"10-149dec0b653ce481af013c63fec125e8"}}, +{"id":"fab.accept","key":"fab.accept","value":{"rev":"6-d6b08e7054d823906c6c64c92b008d3a"}}, +{"id":"fab.static","key":"fab.static","value":{"rev":"6-5bdb6db53223bb5203ba91a5b2b87566"}}, +{"id":"fabric","key":"fabric","value":{"rev":"15-30e99e486c58962c049bea54e00b7cb9"}}, +{"id":"face-detect","key":"face-detect","value":{"rev":"3-d4d3f1a894c807f79ba541d2f2ed630d"}}, +{"id":"facebook","key":"facebook","value":{"rev":"17-e241999000e34aed62ee0f9f358bfd06"}}, +{"id":"facebook-api","key":"facebook-api","value":{"rev":"5-cb9d07b2eba18d8fb960768d69f80326"}}, +{"id":"facebook-client","key":"facebook-client","value":{"rev":"17-84c106420b183ca791b0c80fd8c3fe00"}}, +{"id":"facebook-connect","key":"facebook-connect","value":{"rev":"6-471f28bb12928e32610d02c0b03aa972"}}, +{"id":"facebook-express","key":"facebook-express","value":{"rev":"11-6e6d98b8252907b05c41aac7e0418f4e"}}, +{"id":"facebook-graph","key":"facebook-graph","value":{"rev":"9-c92149825fef42ad76bcffdd232cc9a5"}}, +{"id":"facebook-graph-client","key":"facebook-graph-client","value":{"rev":"10-c3136a2b2e5c5d80b78404a4102af7b5"}}, +{"id":"facebook-js","key":"facebook-js","value":{"rev":"22-dd9d916550ebccb71e451acbd7a4b315"}}, +{"id":"facebook-realtime-graph","key":"facebook-realtime-graph","value":{"rev":"6-c4fe01ac036585394cd59f01c6fc7df1"}}, +{"id":"facebook-sdk","key":"facebook-sdk","value":{"rev":"21-77daf7eba51bb913e54381995718e13d"}}, +{"id":"facebook-session-cookie","key":"facebook-session-cookie","value":{"rev":"9-70e14cac759dacadacb0af17387ab230"}}, +{"id":"facebook-signed-request","key":"facebook-signed-request","value":{"rev":"5-11cb36123a94e37fff6a7efd6f7d88b9"}}, +{"id":"facebook.node","key":"facebook.node","value":{"rev":"3-f6760795e71c1d5734ae34f9288d02be"}}, +{"id":"factory-worker","key":"factory-worker","value":{"rev":"7-1c365b3dd92b12573d00c08b090e01ae"}}, +{"id":"fake","key":"fake","value":{"rev":"25-2d1ae2299168d95edb8d115fb7961c8e"}}, +{"id":"fake-queue","key":"fake-queue","value":{"rev":"7-d6970de6141c1345c6ad3cd1586cfe7b"}}, +{"id":"fakedb","key":"fakedb","value":{"rev":"34-889fb5c9fa328b536f9deb138ff125b1"}}, +{"id":"fakeweb","key":"fakeweb","value":{"rev":"3-7fb1394b4bac70f9ab26e60b1864b41f"}}, +{"id":"fanfeedr","key":"fanfeedr","value":{"rev":"22-de3d485ad60c8642eda260afe5620973"}}, +{"id":"fantomex","key":"fantomex","value":{"rev":"3-79b26bcf9aa365485ed8131c474bf6f8"}}, +{"id":"far","key":"far","value":{"rev":"19-c8d9f1e8bc12a31cb27bef3ed44759ce"}}, +{"id":"farm","key":"farm","value":{"rev":"31-ab77f7f48b24bf6f0388b926d2ac370b"}}, +{"id":"fast-detective","key":"fast-detective","value":{"rev":"5-b0b6c8901458f3f07044d4266db0aa52"}}, +{"id":"fast-msgpack-rpc","key":"fast-msgpack-rpc","value":{"rev":"7-b2dfd3d331459382fe1e8166288ffef6"}}, +{"id":"fast-or-slow","key":"fast-or-slow","value":{"rev":"13-4118190cd6a0185af8ea9b381ee2bc98"}}, +{"id":"fast-stats","key":"fast-stats","value":{"rev":"3-15cdd56d9efa38f08ff20ca731867d4d"}}, +{"id":"fastcgi-stream","key":"fastcgi-stream","value":{"rev":"5-99c0c4dfc7a874e1af71e5ef3ac95ba4"}}, +{"id":"faye","key":"faye","value":{"rev":"30-49b7d05534c35527972a4d5e07ac8895"}}, +{"id":"faye-service","key":"faye-service","value":{"rev":"3-bad8bf6722461627eac7d0141e09b3f7"}}, +{"id":"fe-fu","key":"fe-fu","value":{"rev":"21-f3cb04870621ce40da8ffa009686bdeb"}}, +{"id":"feed-tables","key":"feed-tables","value":{"rev":"9-4410bad138f4df570e7be37bb17209b3"}}, +{"id":"feedBum","key":"feedBum","value":{"rev":"3-b4ff9edffb0c5c33c4ed40f60a12611a"}}, +{"id":"feedparser","key":"feedparser","value":{"rev":"5-eb2c32e00832ed7036eb1b87d2eea33e"}}, +{"id":"feral","key":"feral","value":{"rev":"19-0b512b6301a26ca5502710254bd5a9ba"}}, +{"id":"fermata","key":"fermata","value":{"rev":"25-eeafa3e5b769a38b8a1065c0a66e0653"}}, +{"id":"ferret","key":"ferret","value":{"rev":"9-7ab6b29cb0cad9855d927855c2a27bff"}}, +{"id":"ffmpeg-node","key":"ffmpeg-node","value":{"rev":"3-e55011ecb147f599475a12b10724a583"}}, +{"id":"ffmpeg2theora","key":"ffmpeg2theora","value":{"rev":"13-05d2f83dbbb90e832176ebb7fdc2ae2e"}}, +{"id":"fiberize","key":"fiberize","value":{"rev":"5-dfb978d6b88db702f68a13e363fb21af"}}, +{"id":"fibers","key":"fibers","value":{"rev":"71-4b22dbb449839723ed9b0d533339c764"}}, +{"id":"fibers-promise","key":"fibers-promise","value":{"rev":"9-3a9977528f8df079969d4ae48db7a0a7"}}, +{"id":"fidel","key":"fidel","value":{"rev":"37-370838ed9984cfe6807114b5fef789e6"}}, +{"id":"fig","key":"fig","value":{"rev":"7-24acf90e7d06dc8b83adb02b5776de3c"}}, +{"id":"file","key":"file","value":{"rev":"6-1131008db6855f20969413be7cc2e968"}}, +{"id":"file-api","key":"file-api","value":{"rev":"9-a9cc8f3de14eef5bba86a80f6705651c"}}, +{"id":"fileify","key":"fileify","value":{"rev":"17-50603c037d5e3a0a405ff4af3e71211f"}}, +{"id":"filepad","key":"filepad","value":{"rev":"23-8c4b2c04151723033523369c42144cc9"}}, +{"id":"filerepl","key":"filerepl","value":{"rev":"5-94999cc91621e08f96ded7423ed6d6f0"}}, +{"id":"fileset","key":"fileset","value":{"rev":"3-ea6a9f45aaa5e65279463041ee629dbe"}}, +{"id":"filestore","key":"filestore","value":{"rev":"9-6cce7c9cd2b2b11d12905885933ad25a"}}, +{"id":"filesystem-composer","key":"filesystem-composer","value":{"rev":"34-f1d04d711909f3683c1d00cd4ab7ca47"}}, +{"id":"fileutils","key":"fileutils","value":{"rev":"3-88876b61c9d0a915f95ce0f258e5ce51"}}, +{"id":"filter","key":"filter","value":{"rev":"3-4032087a5cf2de3dd164c95454a2ab05"}}, +{"id":"filter-chain","key":"filter-chain","value":{"rev":"5-c522429dc83ccc7dde4eaf5409070332"}}, +{"id":"fin","key":"fin","value":{"rev":"23-77cf12e84eb62958b40aa08fdcbb259d"}}, +{"id":"fin-id","key":"fin-id","value":{"rev":"3-9f85ee1e426d4bdad5904002a6d9342c"}}, +{"id":"finance","key":"finance","value":{"rev":"3-cf97ddb6af3f6601bfb1e49a600f56af"}}, +{"id":"finder","key":"finder","value":{"rev":"13-65767fe51799a397ddd9b348ead12ed2"}}, +{"id":"findit","key":"findit","value":{"rev":"15-435e4168208548a2853f6efcd4529de3"}}, +{"id":"fingerprint","key":"fingerprint","value":{"rev":"3-c40e2169260010cac472e688c392ea3d"}}, +{"id":"finjector","key":"finjector","value":{"rev":"5-646da199b0b336d20e421ef6ad613e90"}}, +{"id":"firebird","key":"firebird","value":{"rev":"5-7e7ec03bc00e562f5f7afc7cad76da77"}}, +{"id":"firmata","key":"firmata","value":{"rev":"20-f3cbde43ce2677a208bcf3599af5b670"}}, +{"id":"first","key":"first","value":{"rev":"3-c647f6fc1353a1c7b49f5e6cd1905b1e"}}, +{"id":"fishback","key":"fishback","value":{"rev":"19-27a0fdc8c3abe4d61fff9c7a098f3fd9"}}, +{"id":"fitbit-js","key":"fitbit-js","value":{"rev":"3-62fe0869ddefd2949d8c1e568f994c93"}}, +{"id":"fix","key":"fix","value":{"rev":"17-4a79db9924922da010df71e5194bcac6"}}, +{"id":"flagpoll","key":"flagpoll","value":{"rev":"3-0eb7b98e2a0061233aa5228eb7348dff"}}, +{"id":"flags","key":"flags","value":{"rev":"3-594f0ec2e903ac74556d1c1f7c6cca3b"}}, +{"id":"flexcache","key":"flexcache","value":{"rev":"11-e1e4eeaa0793d95056a857bec04282ae"}}, +{"id":"flickr-conduit","key":"flickr-conduit","value":{"rev":"7-d3b2b610171589db68809c3ec3bf2bcb"}}, +{"id":"flickr-js","key":"flickr-js","value":{"rev":"5-66c8e8a00ad0a906f632ff99cf490163"}}, +{"id":"flickr-reflection","key":"flickr-reflection","value":{"rev":"6-3c34c3ac904b6d6f26182807fbb95c5e"}}, +{"id":"flo","key":"flo","value":{"rev":"3-ce440035f0ec9a10575b1c8fab0c77da"}}, +{"id":"flow","key":"flow","value":{"rev":"6-95841a07c96f664d49d1af35373b3dbc"}}, +{"id":"flowcontrol","key":"flowcontrol","value":{"rev":"3-093bbbc7496072d9ecb136a826680366"}}, +{"id":"flowjs","key":"flowjs","value":{"rev":"3-403fc9e107ec70fe06236c27e70451c7"}}, +{"id":"fluent-ffmpeg","key":"fluent-ffmpeg","value":{"rev":"33-5982779d5f55a5915f0f8b0353f1fe2a"}}, +{"id":"flume-rpc","key":"flume-rpc","value":{"rev":"7-4214a2db407a3e64f036facbdd34df91"}}, +{"id":"flux","key":"flux","value":{"rev":"3-1ad83106af7ee83547c797246bd2c8b1"}}, +{"id":"fly","key":"fly","value":{"rev":"9-0a45b1b97f56ba0faf4af4777b473fad"}}, +{"id":"fn","key":"fn","value":{"rev":"5-110bab5d623b3628e413d972e040ed26"}}, +{"id":"fnProxy","key":"fnProxy","value":{"rev":"3-db1c90e5a06992ed290c679ac6dbff6a"}}, +{"id":"follow","key":"follow","value":{"rev":"3-44256c802b4576fcbae1264e9b824e6a"}}, +{"id":"fomatto","key":"fomatto","value":{"rev":"7-31ce5c9eba7f084ccab2dc5994796f2d"}}, +{"id":"foounit","key":"foounit","value":{"rev":"20-caf9cd90d6c94d19be0b3a9c9cb33ee0"}}, +{"id":"forEachAsync","key":"forEachAsync","value":{"rev":"3-d9cd8021ea9d5014583327752a9d01c4"}}, +{"id":"forever","key":"forever","value":{"rev":"99-90060d5d1754b1bf749e5278a2a4516b"}}, +{"id":"forge","key":"forge","value":{"rev":"9-0d9d59fd2d47a804e600aaef538ebbbf"}}, +{"id":"fork","key":"fork","value":{"rev":"13-f355105e07608de5ae2f3e7c0817af52"}}, +{"id":"forker","key":"forker","value":{"rev":"11-9717e2e3fa60b46df08261d936d9e5d7"}}, +{"id":"form-data","key":"form-data","value":{"rev":"3-5750e73f7a0902ec2fafee1db6d2e6f6"}}, +{"id":"form-validator","key":"form-validator","value":{"rev":"25-7d016b35895dc58ffd0bbe54fd9be241"}}, +{"id":"form2json","key":"form2json","value":{"rev":"8-7501dd9b43b9fbb7194b94e647816e5e"}}, +{"id":"formaline","key":"formaline","value":{"rev":"3-2d45fbb3e83b7e77bde0456607e6f1e3"}}, +{"id":"format","key":"format","value":{"rev":"7-5dddc67c10de521ef06a7a07bb3f7e2e"}}, +{"id":"formatdate","key":"formatdate","value":{"rev":"3-6d522e3196fe3b438fcc4aed0f7cf690"}}, +{"id":"formidable","key":"formidable","value":{"rev":"87-d27408b00793fee36f6632a895372590"}}, +{"id":"forms","key":"forms","value":{"rev":"6-253e032f07979b79c2e7dfa01be085dc"}}, +{"id":"forrst","key":"forrst","value":{"rev":"3-ef553ff1b6383bab0f81f062cdebac53"}}, +{"id":"fortumo","key":"fortumo","value":{"rev":"6-def3d146b29b6104019c513ce20bb61f"}}, +{"id":"foss-credits","key":"foss-credits","value":{"rev":"3-c824326e289e093406b2de4efef70cb7"}}, +{"id":"foss-credits-collection","key":"foss-credits-collection","value":{"rev":"17-de4ffca51768a36c8fb1b9c2bc66c80f"}}, +{"id":"foursquareonnode","key":"foursquareonnode","value":{"rev":"5-a4f0a1ed5d3be3056f10f0e9517efa83"}}, +{"id":"fraggle","key":"fraggle","value":{"rev":"7-b9383baf96bcdbd4022b4b887e4a3729"}}, +{"id":"framework","key":"framework","value":{"rev":"3-afb19a9598a0d50320b4f1faab1ae2c6"}}, +{"id":"frameworkjs","key":"frameworkjs","value":{"rev":"7-cd418da3272c1e8349126e442ed15dbd"}}, +{"id":"frank","key":"frank","value":{"rev":"12-98031fb56f1c89dfc7888f5d8ca7f0a9"}}, +{"id":"freakset","key":"freakset","value":{"rev":"21-ba60d0840bfa3da2c8713c3c2e6856a0"}}, +{"id":"freckle","key":"freckle","value":{"rev":"3-8e2e9a07b2650fbbd0a598b948ef993b"}}, +{"id":"freebase","key":"freebase","value":{"rev":"7-a1daf1cc2259b886f574f5c902eebcf4"}}, +{"id":"freecontrol","key":"freecontrol","value":{"rev":"6-7a51776b8764f406573d5192bab36adf"}}, +{"id":"freestyle","key":"freestyle","value":{"rev":"9-100f9e9d3504d6e1c6a2d47651c70f51"}}, +{"id":"frenchpress","key":"frenchpress","value":{"rev":"9-306d6ac21837879b8040d7f9aa69fc20"}}, +{"id":"fs-boot","key":"fs-boot","value":{"rev":"20-72b44b403767aa486bf1dc987c750733"}}, +{"id":"fs-ext","key":"fs-ext","value":{"rev":"10-3360831c3852590a762f8f82525c025e"}}, +{"id":"fsevents","key":"fsevents","value":{"rev":"6-bb994f41842e144cf43249fdf6bf51e1"}}, +{"id":"fsext","key":"fsext","value":{"rev":"9-a1507d84e91ddf26ffaa76016253b4fe"}}, +{"id":"fsh","key":"fsh","value":{"rev":"5-1e3784b2df1c1a28b81f27907945f48b"}}, +{"id":"fsm","key":"fsm","value":{"rev":"5-b113be7b30b2a2c9089edcb6fa4c15d3"}}, +{"id":"fswatch","key":"fswatch","value":{"rev":"11-287eea565c9562161eb8969d765bb191"}}, +{"id":"ftp","key":"ftp","value":{"rev":"5-751e312520c29e76f7d79c648248c56c"}}, +{"id":"ftp-get","key":"ftp-get","value":{"rev":"27-1e908bd075a0743dbb1d30eff06485e2"}}, +{"id":"fugue","key":"fugue","value":{"rev":"81-0c08e67e8deb4b5b677fe19f8362dbd8"}}, +{"id":"fullauto","key":"fullauto","value":{"rev":"9-ef915156026dabded5a4a76c5a751916"}}, +{"id":"fun","key":"fun","value":{"rev":"12-8396e3583e206dbf90bbea4316976f66"}}, +{"id":"functional","key":"functional","value":{"rev":"5-955979028270f5d3749bdf86b4d2c925"}}, +{"id":"functools","key":"functools","value":{"rev":"5-42ba84ce365bf8c0aaf3e5e6c369920b"}}, +{"id":"funk","key":"funk","value":{"rev":"14-67440a9b2118d8f44358bf3b17590243"}}, +{"id":"fusion","key":"fusion","value":{"rev":"19-64983fc6e5496c836be26e5fbc8527d1"}}, +{"id":"fusker","key":"fusker","value":{"rev":"48-58f05561c65ad288a78fa7210f146ba1"}}, +{"id":"future","key":"future","value":{"rev":"3-0ca60d8ae330e40ef6cf8c17a421d668"}}, +{"id":"futures","key":"futures","value":{"rev":"44-8a2aaf0f40cf84c9475824d9cec006ad"}}, +{"id":"fuzzy_file_finder","key":"fuzzy_file_finder","value":{"rev":"8-ee555aae1d433e60166d2af1d72ac6b9"}}, +{"id":"fuzzylogic","key":"fuzzylogic","value":{"rev":"8-596a8f4744d1dabcb8eb6466d9980fca"}}, +{"id":"fxs","key":"fxs","value":{"rev":"3-d3cb81151b0ddd9a4a5934fb63ffff75"}}, +{"id":"g","key":"g","value":{"rev":"3-55742a045425a9b4c9fe0e8925fad048"}}, +{"id":"g.raphael","key":"g.raphael","value":{"rev":"4-190d0235dc08f783dda77b3ecb60b11a"}}, +{"id":"ga","key":"ga","value":{"rev":"3-c47d516ac5e6de8ef7ef9d16fabcf6c7"}}, +{"id":"galletita","key":"galletita","value":{"rev":"3-aa7a01c3362a01794f36e7aa9664b850"}}, +{"id":"game","key":"game","value":{"rev":"3-0f1539e4717a2780205d98ef6ec0886d"}}, +{"id":"gamina","key":"gamina","value":{"rev":"15-871f4970f1e87b7c8ad361456001c76f"}}, +{"id":"gang-bang","key":"gang-bang","value":{"rev":"6-f565cb7027a8ca109481df49a6d41114"}}, +{"id":"gapserver","key":"gapserver","value":{"rev":"9-b25eb0eefc21e407cba596a0946cb3a0"}}, +{"id":"garbage","key":"garbage","value":{"rev":"3-80f4097d5f1f2c75f509430a11c8a15e"}}, +{"id":"gaseous","key":"gaseous","value":{"rev":"3-8021582ab9dde42d235193e6067be72d"}}, +{"id":"gaudium","key":"gaudium","value":{"rev":"11-7d612f1c5d921180ccf1c162fe2c7446"}}, +{"id":"gauss","key":"gauss","value":{"rev":"3-8fd18b2d7a223372f190797e4270a535"}}, +{"id":"gcli","key":"gcli","value":{"rev":"3-210404347cc643e924cec678d0195099"}}, +{"id":"gcw2html","key":"gcw2html","value":{"rev":"3-2aff7bff7981f2f9800c5f65812aa0a6"}}, +{"id":"gd","key":"gd","value":{"rev":"4-ac5a662e709a2993ed1fd1cbf7c4d7b4"}}, +{"id":"gdata","key":"gdata","value":{"rev":"3-c6b3a95064a1e1e0bb74f248ab4e73c4"}}, +{"id":"gdata-js","key":"gdata-js","value":{"rev":"17-0959500a4000d7058d8116af1e01b0d9"}}, +{"id":"gearman","key":"gearman","value":{"rev":"8-ac9fb7af75421ca2988d6098dbfd4c7c"}}, +{"id":"gearnode","key":"gearnode","value":{"rev":"7-8e40ec257984e887e2ff5948a6dde04e"}}, +{"id":"geck","key":"geck","value":{"rev":"161-c8117106ef58a6d7d21920df80159eab"}}, +{"id":"geddy","key":"geddy","value":{"rev":"13-da16f903aca1ec1f47086fa250b58abb"}}, +{"id":"gen","key":"gen","value":{"rev":"3-849005c8b8294c2a811ff4eccdedf436"}}, +{"id":"generic-function","key":"generic-function","value":{"rev":"5-dc046f58f96119225efb17ea5334a60f"}}, +{"id":"generic-pool","key":"generic-pool","value":{"rev":"18-65ff988620293fe7ffbd0891745c3ded"}}, +{"id":"genji","key":"genji","value":{"rev":"49-4c72bcaa57572ad0d43a1b7e9e5a963a"}}, +{"id":"genstatic","key":"genstatic","value":{"rev":"19-4278d0766226af4db924bb0f6b127699"}}, +{"id":"gently","key":"gently","value":{"rev":"24-c9a3ba6b6fd183ee1b5dda569122e978"}}, +{"id":"genx","key":"genx","value":{"rev":"7-f0c0ff65e08e045e8dd1bfcb25ca48d4"}}, +{"id":"geo","key":"geo","value":{"rev":"7-fa2a79f7260b849c277735503a8622e9"}}, +{"id":"geo-distance","key":"geo-distance","value":{"rev":"7-819a30e9b4776e4416fe9510ca79cd93"}}, +{"id":"geocoder","key":"geocoder","value":{"rev":"15-736e627571ad8dba3a9d0da1ae019c35"}}, +{"id":"geohash","key":"geohash","value":{"rev":"6-b9e62c804abe565425a8e6a01354407a"}}, +{"id":"geoip","key":"geoip","value":{"rev":"231-e5aa7acd5fb44833a67f96476b4fac49"}}, +{"id":"geoip-lite","key":"geoip-lite","value":{"rev":"9-efd916135c056406ede1ad0fe15534fa"}}, +{"id":"geojs","key":"geojs","value":{"rev":"35-b0f97b7c72397d6eb714602dc1121183"}}, +{"id":"geolib","key":"geolib","value":{"rev":"3-923a8622d1bd97c22f71ed6537ba5062"}}, +{"id":"geonode","key":"geonode","value":{"rev":"35-c2060653af72123f2f9994fca1c86d70"}}, +{"id":"geoutils","key":"geoutils","value":{"rev":"6-2df101fcbb01849533b2fbc80dc0eb7a"}}, +{"id":"gerbil","key":"gerbil","value":{"rev":"3-b5961044bda490a34085ca826aeb3022"}}, +{"id":"gerenuk","key":"gerenuk","value":{"rev":"13-4e45a640bcbadc3112e105ec5b60b907"}}, +{"id":"get","key":"get","value":{"rev":"18-dd215d673f19bbd8b321a7dd63e004e8"}}, +{"id":"getopt","key":"getopt","value":{"rev":"3-454354e4557d5e7205410acc95c9baae"}}, +{"id":"getrusage","key":"getrusage","value":{"rev":"8-d6ef24793b8e4c46f3cdd14937cbabe1"}}, +{"id":"gettext","key":"gettext","value":{"rev":"3-4c12268a4cab64ec4ef3ac8c9ec7912b"}}, +{"id":"getz","key":"getz","value":{"rev":"9-f3f43934139c9af6ddfb8b91e9a121ba"}}, +{"id":"gevorg.me","key":"gevorg.me","value":{"rev":"33-700502b8ca7041bf8d29368069cac365"}}, +{"id":"gex","key":"gex","value":{"rev":"3-105824d7a3f9c2ac7313f284c3f81d22"}}, +{"id":"gexode","key":"gexode","value":{"rev":"3-4a3552eae4ff3ba4443f9371a1ab4b2e"}}, +{"id":"gfx","key":"gfx","value":{"rev":"8-1f6c90bc3819c3b237e8d1f28ad1b136"}}, +{"id":"gherkin","key":"gherkin","value":{"rev":"77-6e835c8107bb4c7c8ad1fa072ac12c20"}}, +{"id":"ghm","key":"ghm","value":{"rev":"3-c440ae39832a575087ff1920b33c275b"}}, +{"id":"gif","key":"gif","value":{"rev":"14-e65638621d05b99ffe71b18097f29134"}}, +{"id":"gimme","key":"gimme","value":{"rev":"7-caab8354fe257fc307f8597e34ede547"}}, +{"id":"gist","key":"gist","value":{"rev":"11-eea7ea1adf3cde3a0804d2e1b0d6f7d6"}}, +{"id":"gista","key":"gista","value":{"rev":"23-48b8c374cfb8fc4e8310f3469cead6d5"}}, +{"id":"gisty","key":"gisty","value":{"rev":"5-1a898d0816f4129ab9a0d3f03ff9feb4"}}, +{"id":"git","key":"git","value":{"rev":"39-1f77df3ebeec9aae47ae8df56de6757f"}}, +{"id":"git-fs","key":"git-fs","value":{"rev":"14-7d365cddff5029a9d11fa8778a7296d2"}}, +{"id":"gitProvider","key":"gitProvider","value":{"rev":"9-c704ae702ef27bb57c0efd279a464e28"}}, +{"id":"github","key":"github","value":{"rev":"16-9345138ca7507c12be4a817b1abfeef6"}}, +{"id":"github-flavored-markdown","key":"github-flavored-markdown","value":{"rev":"3-f12043eb2969aff51db742b13d329446"}}, +{"id":"gitteh","key":"gitteh","value":{"rev":"39-88b00491fd4ce3294b8cdf61b9708383"}}, +{"id":"gitter","key":"gitter","value":{"rev":"16-88d7ef1ab6a7e751ca2cf6b50894deb4"}}, +{"id":"gittyup","key":"gittyup","value":{"rev":"37-ed6030c1acdd8b989ac34cd10d6dfd1e"}}, +{"id":"gitweb","key":"gitweb","value":{"rev":"9-5331e94c6df9ee7724cde3738a0c6230"}}, +{"id":"gitwiki","key":"gitwiki","value":{"rev":"9-0f167a3a87bce7f3e941136a06e91810"}}, +{"id":"gizmo","key":"gizmo","value":{"rev":"5-1da4da8d66690457c0bf743473b755f6"}}, +{"id":"gleak","key":"gleak","value":{"rev":"17-d44a968b32e4fdc7d27bacb146391422"}}, +{"id":"glob","key":"glob","value":{"rev":"203-4a79e232cf6684a48ccb9134a6ce938c"}}, +{"id":"glob-trie.js","key":"glob-trie.js","value":{"rev":"7-bff534e3aba8f6333fa5ea871b070de2"}}, +{"id":"global","key":"global","value":{"rev":"3-f15b0c9ae0ea9508890bff25c8e0f795"}}, +{"id":"globalize","key":"globalize","value":{"rev":"5-33d10c33fb24af273104f66098e246c4"}}, +{"id":"glossary","key":"glossary","value":{"rev":"3-5e143d09d22a01eb2ee742ceb3e18f6e"}}, +{"id":"glossy","key":"glossy","value":{"rev":"9-f31e00844e8be49e5812fe64a6f1e1cc"}}, +{"id":"gm","key":"gm","value":{"rev":"28-669722d34a3dc29c8c0b27abd73493a1"}}, +{"id":"gnarly","key":"gnarly","value":{"rev":"3-796f5df3483f304cb404cc7ac7702512"}}, +{"id":"gnomenotify","key":"gnomenotify","value":{"rev":"9-bc066c0556ad4a20e7a7ae58cdc4cf91"}}, +{"id":"gofer","key":"gofer","value":{"rev":"15-3fc77ce34e95ffecd12d3854a1bb2da9"}}, +{"id":"goo.gl","key":"goo.gl","value":{"rev":"37-eac7c44d33cc42c618372f0bdd4365c2"}}, +{"id":"goodreads","key":"goodreads","value":{"rev":"5-acd9fe24139aa8b81b26431dce9954aa"}}, +{"id":"goog","key":"goog","value":{"rev":"13-c964ecfcef4d20c8c7d7526323257c04"}}, +{"id":"googl","key":"googl","value":{"rev":"8-2d4d80ef0c5f93400ec2ec8ef80de433"}}, +{"id":"google-openid","key":"google-openid","value":{"rev":"19-380884ba97e3d6fc48c8c7db3dc0e91b"}}, +{"id":"google-spreadsheets","key":"google-spreadsheets","value":{"rev":"3-f640ef136c4b5e90210c2d5d43102b38"}}, +{"id":"google-voice","key":"google-voice","value":{"rev":"37-2e1c3cba3455852f26b0ccaf1fed7125"}}, +{"id":"googleanalytics","key":"googleanalytics","value":{"rev":"8-1d3e470ce4aacadb0418dd125887813d"}}, +{"id":"googleclientlogin","key":"googleclientlogin","value":{"rev":"23-5de8ee62c0ddbc63a001a36a6afe730e"}}, +{"id":"googlediff","key":"googlediff","value":{"rev":"3-438a2f0758e9770a157ae4cce9b6f49e"}}, +{"id":"googlemaps","key":"googlemaps","value":{"rev":"18-bc939560c587711f3d96f3caadd65a7f"}}, +{"id":"googleplus-scraper","key":"googleplus-scraper","value":{"rev":"7-598ea99bd64f4ad69cccb74095abae59"}}, +{"id":"googlereaderauth","key":"googlereaderauth","value":{"rev":"5-cd0eb8ca36ea78620af0fce270339a7b"}}, +{"id":"googlesets","key":"googlesets","value":{"rev":"5-1b2e597e903c080182b3306d63278fd9"}}, +{"id":"googleweather","key":"googleweather","value":{"rev":"3-6bfdaaeedb8a712ee3e89a8ed27508eb"}}, +{"id":"gopostal.node","key":"gopostal.node","value":{"rev":"3-14ff3a655dc3680c9e8e2751ebe294bc"}}, +{"id":"gowallan","key":"gowallan","value":{"rev":"3-23adc9c01a6b309eada47602fdc8ed90"}}, +{"id":"gowiththeflow","key":"gowiththeflow","value":{"rev":"3-52bb6cf6294f67ba5a892db4666d3790"}}, +{"id":"gpg","key":"gpg","value":{"rev":"5-0ca2b5af23e108a4f44f367992a75fed"}}, +{"id":"graceful-fs","key":"graceful-fs","value":{"rev":"3-01e9f7d1c0f6e6a611a60ee84de1f5cc"}}, +{"id":"gracie","key":"gracie","value":{"rev":"3-aa0f7c01a33c7c1e9a49b86886ef5255"}}, +{"id":"graff","key":"graff","value":{"rev":"7-5ab558cb24e30abd67f2a1dbf47cd639"}}, +{"id":"graft","key":"graft","value":{"rev":"3-7419de38b249b891bf7998bcdd2bf557"}}, +{"id":"grain","key":"grain","value":{"rev":"3-e57cbf02121970da230964ddbfd31432"}}, +{"id":"grainstore","key":"grainstore","value":{"rev":"19-5f9c5bb13b2c9ac4e6a05aec33aeb7c5"}}, +{"id":"graph","key":"graph","value":{"rev":"7-909d2fefcc84b5dd1512b60d631ea4e5"}}, +{"id":"graphquire","key":"graphquire","value":{"rev":"27-246e798f80b3310419644302405d68ad"}}, +{"id":"graphviz","key":"graphviz","value":{"rev":"8-3b79341eaf3f67f91bce7c88c08b9f0d"}}, +{"id":"grasshopper","key":"grasshopper","value":{"rev":"45-4002406990476b74dac5108bd19c4274"}}, +{"id":"gravatar","key":"gravatar","value":{"rev":"11-0164b7ac97e8a477b4e8791eae2e7fea"}}, +{"id":"grave","key":"grave","value":{"rev":"3-136f6378b956bc5dd9773250f8813038"}}, +{"id":"gravity","key":"gravity","value":{"rev":"5-dd40fcee1a769ce786337e9536d24244"}}, +{"id":"graylog","key":"graylog","value":{"rev":"5-abcff9cd91ff20e36f8a70a3f2de658b"}}, +{"id":"greg","key":"greg","value":{"rev":"5-ececb0a3bb552b6da4f66b8bf6f75cf0"}}, +{"id":"gridcentric","key":"gridcentric","value":{"rev":"4-4378e1c280e18b5aaabd23038b80d76c"}}, +{"id":"gridly","key":"gridly","value":{"rev":"3-86e878756b493da8f66cbd633a15f821"}}, +{"id":"grinder","key":"grinder","value":{"rev":"9-0aaeecf0c81b1c9c93a924c5eb0bff45"}}, +{"id":"grir.am","key":"grir.am","value":{"rev":"3-3ec153c764af1c26b50fefa437318c5a"}}, +{"id":"groundcrew","key":"groundcrew","value":{"rev":"3-9e9ed9b1c70c00c432f36bb853fa21a0"}}, +{"id":"groupie","key":"groupie","value":{"rev":"6-b5e3f0891a7e8811d6112b24bd5a46b4"}}, +{"id":"groupon","key":"groupon","value":{"rev":"21-8b74723c153695f4ed4917575abcca8f"}}, +{"id":"growing-file","key":"growing-file","value":{"rev":"7-995b233a1add5b9ea80aec7ac3f60dc5"}}, +{"id":"growl","key":"growl","value":{"rev":"10-4be41ae10ec96e1334dccdcdced12fe3"}}, +{"id":"gsl","key":"gsl","value":{"rev":"49-3367acfb521b30d3ddb9b80305009553"}}, +{"id":"gss","key":"gss","value":{"rev":"3-e4cffbbbc4536d952d13d46376d899b7"}}, +{"id":"guards","key":"guards","value":{"rev":"8-d7318d3d9dc842ab41e6ef5b88f9d37f"}}, +{"id":"guardtime","key":"guardtime","value":{"rev":"3-5a2942efabab100ffb3dc0fa3b581b7a"}}, +{"id":"guava","key":"guava","value":{"rev":"11-d9390d298b503f0ffb8e3ba92eeb9759"}}, +{"id":"guid","key":"guid","value":{"rev":"16-d99e725bbbf97a326833858767b7ed08"}}, +{"id":"gumbo","key":"gumbo","value":{"rev":"31-727cf5a3b7d8590fff871f27da114d9d"}}, +{"id":"gunther","key":"gunther","value":{"rev":"9-f95c89128412208d16acd3e615844115"}}, +{"id":"gzbz2","key":"gzbz2","value":{"rev":"3-e1844b1b3a7881a0c8dc0dd4edcc11ca"}}, +{"id":"gzip","key":"gzip","value":{"rev":"17-37afa05944f055d6f43ddc87c1b163c2"}}, +{"id":"gzip-stack","key":"gzip-stack","value":{"rev":"8-cf455d60277832c60ee622d198c0c51a"}}, +{"id":"gzippo","key":"gzippo","value":{"rev":"15-6416c13ecbbe1c5cd3e30adf4112ead7"}}, +{"id":"h5eb","key":"h5eb","value":{"rev":"3-11ed2566fa4b8a01ff63a720c94574cd"}}, +{"id":"hack","key":"hack","value":{"rev":"3-70f536dd46719e8201a6ac5cc96231f6"}}, +{"id":"hack.io","key":"hack.io","value":{"rev":"18-128305614e7fd6b461248bf3bfdd7ab7"}}, +{"id":"hacktor","key":"hacktor","value":{"rev":"3-51b438df35ba8a955d434ab25a4dad67"}}, +{"id":"haibu","key":"haibu","value":{"rev":"99-b29b8c37be42f90985c6d433d53c8679"}}, +{"id":"haibu-carapace","key":"haibu-carapace","value":{"rev":"22-9a89b2f495e533d0f93e4ee34121e48c"}}, +{"id":"haibu-nginx","key":"haibu-nginx","value":{"rev":"7-e176128dc6dbb0d7f5f33369edf1f7ee"}}, +{"id":"halfstreamxml","key":"halfstreamxml","value":{"rev":"7-5c0f3defa6ba921f8edb564584553df4"}}, +{"id":"ham","key":"ham","value":{"rev":"3-1500dc495cade7334f6a051f2758f748"}}, +{"id":"haml","key":"haml","value":{"rev":"15-a93e7762c7d43469a06519472497fd93"}}, +{"id":"haml-edge","key":"haml-edge","value":{"rev":"5-c4e44a73263ac9b7e632375de7e43d7c"}}, +{"id":"hamljs","key":"hamljs","value":{"rev":"10-a01c7214b69992352bde44938418ebf4"}}, +{"id":"hamljs-coffee","key":"hamljs-coffee","value":{"rev":"3-c2733c8ff38f5676075b84cd7f3d8684"}}, +{"id":"handlebars","key":"handlebars","value":{"rev":"4-0e21906b78605f7a1d5ec7cb4c7d35d7"}}, +{"id":"hanging-gardens","key":"hanging-gardens","value":{"rev":"27-3244e37f08bea0e31759e9f38983f59a"}}, +{"id":"hanging_gardens_registry","key":"hanging_gardens_registry","value":{"rev":"17-d87aa3a26f91dc314f02c686672a5ec6"}}, +{"id":"hapi","key":"hapi","value":{"rev":"3-ed721fe9aae4a459fe0945dabd7d680a"}}, +{"id":"harmony","key":"harmony","value":{"rev":"3-d6c9d6acc29d29c97c75c77f7c8e1390"}}, +{"id":"hascan","key":"hascan","value":{"rev":"13-a7ab15c72f464b013cbc55dc426543ca"}}, +{"id":"hash_ring","key":"hash_ring","value":{"rev":"12-0f072b1dd1fd93ae2f2b79f5ea72074d"}}, +{"id":"hashbangify","key":"hashbangify","value":{"rev":"5-738e0cf99649d41c19d3449c0e9a1cbf"}}, +{"id":"hashish","key":"hashish","value":{"rev":"9-62c5e74355458e1ead819d87151b7d38"}}, +{"id":"hashkeys","key":"hashkeys","value":{"rev":"3-490809bdb61f930f0d9f370eaadf36ea"}}, +{"id":"hashlib","key":"hashlib","value":{"rev":"7-1f19c9d6062ff22ed2e963204a1bd405"}}, +{"id":"hashring","key":"hashring","value":{"rev":"11-4c9f2b1ba7931c8bab310f4ecaf91419"}}, +{"id":"hashtable","key":"hashtable","value":{"rev":"7-2aaf2667cbdb74eb8da61e2e138059ca"}}, +{"id":"hat","key":"hat","value":{"rev":"9-6f37874d9703eab62dc875e2373837a8"}}, +{"id":"hbase","key":"hbase","value":{"rev":"20-7ca92712de26ffb18d275a21696aa263"}}, +{"id":"hbase-thrift","key":"hbase-thrift","value":{"rev":"7-39afb33a4e61cc2b3dc94f0c7fd32c65"}}, +{"id":"hbs","key":"hbs","value":{"rev":"29-aa2676e6790c5716f84f128dcd03e797"}}, +{"id":"header-stack","key":"header-stack","value":{"rev":"13-7ad1ccf3c454d77029c000ceb18ce5ab"}}, +{"id":"headers","key":"headers","value":{"rev":"13-04f8f5f25e2dd9890f6b2f120adf297a"}}, +{"id":"healthety","key":"healthety","value":{"rev":"60-07c67c22ee2a13d0ad675739d1814a6d"}}, +{"id":"heatmap","key":"heatmap","value":{"rev":"9-c53f4656d9517f184df7aea9226c1765"}}, +{"id":"heavy-flow","key":"heavy-flow","value":{"rev":"5-0b9188334339e7372b364a7fc730c639"}}, +{"id":"heckle","key":"heckle","value":{"rev":"13-b462abef7b9d1471ed8fb8f23af463e0"}}, +{"id":"helium","key":"helium","value":{"rev":"3-4d6ce9618c1be522268944240873f53e"}}, +{"id":"hello-world","key":"hello-world","value":{"rev":"3-e87f287308a209491c011064a87100b7"}}, +{"id":"hello.io","key":"hello.io","value":{"rev":"3-39b78278fa638495522edc7a84f6a52e"}}, +{"id":"helloworld","key":"helloworld","value":{"rev":"3-8f163aebdcf7d8761709bdbb634c3689"}}, +{"id":"helpers","key":"helpers","value":{"rev":"3-67d75b1c8e5ad2a268dd4ea191d4754b"}}, +{"id":"helpful","key":"helpful","value":{"rev":"41-e11bed25d5a0ca7e7ad116d5a339ec2a"}}, +{"id":"hem","key":"hem","value":{"rev":"27-042fc9d4b96f20112cd943e019e54d20"}}, +{"id":"hempwick","key":"hempwick","value":{"rev":"11-de1f6f0f23937d9f33286e12ee877540"}}, +{"id":"heritable","key":"heritable","value":{"rev":"13-1468ff92063251a037bbe80ee987a9c3"}}, +{"id":"hermes-raw-client","key":"hermes-raw-client","value":{"rev":"11-5d143c371cb8353612badc72be1917ff"}}, +{"id":"heru","key":"heru","value":{"rev":"3-d124a20939e30e2a3c08f7104b2a1a5c"}}, +{"id":"hexdump","key":"hexdump","value":{"rev":"3-c455710ca80662969ccbca3acc081cb8"}}, +{"id":"hexy","key":"hexy","value":{"rev":"16-5142b0461622436daa2e476d252770f2"}}, +{"id":"highlight","key":"highlight","value":{"rev":"9-4b172b7aef6f40d768f022b2ba4e6748"}}, +{"id":"highlight.js","key":"highlight.js","value":{"rev":"5-16c1ebd28d5f2e781e666c6ee013c30c"}}, +{"id":"hiker","key":"hiker","value":{"rev":"9-89d1ce978b349f1f0df262655299d83c"}}, +{"id":"hipchat","key":"hipchat","value":{"rev":"3-73118782367d474af0f6410290df5f7f"}}, +{"id":"hipchat-js","key":"hipchat-js","value":{"rev":"3-253b83875d3e18e9c89333bc377183c3"}}, +{"id":"hiredis","key":"hiredis","value":{"rev":"46-29ceb03860efbd4b3b995247f27f78b9"}}, +{"id":"hive","key":"hive","value":{"rev":"15-40a4c6fcfa3b80007a18ef4ede80075b"}}, +{"id":"hive-cache","key":"hive-cache","value":{"rev":"3-36b10607b68586fccbfeb856412bd6bf"}}, +{"id":"hoard","key":"hoard","value":{"rev":"13-75d4c484095e2e38ac63a65bd9fd7f4b"}}, +{"id":"hook","key":"hook","value":{"rev":"7-2f1e375058e2b1fa61d3651f6d57a6f8"}}, +{"id":"hook.io","key":"hook.io","value":{"rev":"63-9fac4fb8337d1953963d47144f806f72"}}, +{"id":"hook.io-browser","key":"hook.io-browser","value":{"rev":"3-7e04347d80adc03eb5637b7e4b8ca58b"}}, +{"id":"hook.io-couch","key":"hook.io-couch","value":{"rev":"3-ce0eb281d1ba21aa1caca3a52553a07b"}}, +{"id":"hook.io-cron","key":"hook.io-cron","value":{"rev":"15-50deedc2051ce65bca8a42048154139c"}}, +{"id":"hook.io-helloworld","key":"hook.io-helloworld","value":{"rev":"23-ef5cf0cec9045d28d846a7b0872874e4"}}, +{"id":"hook.io-irc","key":"hook.io-irc","value":{"rev":"5-39c7ac5e192aef34b87af791fa77ee04"}}, +{"id":"hook.io-logger","key":"hook.io-logger","value":{"rev":"13-9e3208ea8eacfe5378cd791f2377d06d"}}, +{"id":"hook.io-mailer","key":"hook.io-mailer","value":{"rev":"9-d9415d53dc086102024cf7400fdfb7a2"}}, +{"id":"hook.io-pinger","key":"hook.io-pinger","value":{"rev":"17-860ab3a892284b91999f86c3882e2ff5"}}, +{"id":"hook.io-repl","key":"hook.io-repl","value":{"rev":"13-c0d430ccdfd197e4746c46d2814b6d92"}}, +{"id":"hook.io-request","key":"hook.io-request","value":{"rev":"13-f0e8d167d59917d90266f921e3ef7c64"}}, +{"id":"hook.io-sitemonitor","key":"hook.io-sitemonitor","value":{"rev":"8-725ea7deb9cb1031eabdc4fd798308ff"}}, +{"id":"hook.io-twilio","key":"hook.io-twilio","value":{"rev":"11-6b2e231307f6174861aa5dcddad264b3"}}, +{"id":"hook.io-twitter","key":"hook.io-twitter","value":{"rev":"3-59296395b22e661e7e5c141c4c7be46d"}}, +{"id":"hook.io-webhook","key":"hook.io-webhook","value":{"rev":"15-b27e51b63c8ec70616c66061d949f388"}}, +{"id":"hook.io-webserver","key":"hook.io-webserver","value":{"rev":"29-eb6bff70736648427329eba08b5f55c3"}}, +{"id":"hook.io-ws","key":"hook.io-ws","value":{"rev":"4-a85578068b54560ef663a7ecfea2731f"}}, +{"id":"hooks","key":"hooks","value":{"rev":"33-6640fb0c27903af6b6ae7b7c41d79e01"}}, +{"id":"hoptoad-notifier","key":"hoptoad-notifier","value":{"rev":"16-8249cb753a3626f2bf2664024ae7a5ee"}}, +{"id":"horaa","key":"horaa","value":{"rev":"5-099e5d6486d10944e10b584eb3f6e924"}}, +{"id":"hornet","key":"hornet","value":{"rev":"22-8c40d7ba4ca832b951e6d5db165f3305"}}, +{"id":"horseman","key":"horseman","value":{"rev":"11-7228e0f84c2036669a218710c22f72c0"}}, +{"id":"hostify","key":"hostify","value":{"rev":"11-8c1a2e73f8b9474a6c26121688c28dc7"}}, +{"id":"hostinfo","key":"hostinfo","value":{"rev":"5-c8d638f40ccf94f4083430966d25e787"}}, +{"id":"hostip","key":"hostip","value":{"rev":"3-d4fd628b94e1f913d97ec1746d96f2a0"}}, +{"id":"hostname","key":"hostname","value":{"rev":"7-55fefb3c37990bbcad3d98684d17f38f"}}, +{"id":"hotnode","key":"hotnode","value":{"rev":"16-d7dad5de3ffc2ca6a04f74686aeb0e4b"}}, +{"id":"howmuchtime","key":"howmuchtime","value":{"rev":"3-351ce870ae6e2c21a798169d074e2a3f"}}, +{"id":"hstore","key":"hstore","value":{"rev":"3-55ab4d359c2fc8725829038e3adb7571"}}, +{"id":"hsume2-socket.io","key":"hsume2-socket.io","value":{"rev":"5-4b537247ae9999c285c802cc36457598"}}, +{"id":"htdoc","key":"htdoc","value":{"rev":"3-80ef9e3202b0d96b79435a2bc90bc899"}}, +{"id":"html","key":"html","value":{"rev":"3-92c4af7de329c92ff2e0be5c13020e78"}}, +{"id":"html-minifier","key":"html-minifier","value":{"rev":"7-2441ed004e2a6e7f1c42003ec03277ec"}}, +{"id":"html-sourcery","key":"html-sourcery","value":{"rev":"11-7ce1d4aa2e1d319fa108b02fb294d4ce"}}, +{"id":"html2coffeekup","key":"html2coffeekup","value":{"rev":"13-bae4a70411f6f549c281c69835fe3276"}}, +{"id":"html2coffeekup-bal","key":"html2coffeekup-bal","value":{"rev":"5-0663ac1339d72932004130b668c949f0"}}, +{"id":"html2jade","key":"html2jade","value":{"rev":"11-e50f504c5c847d7ffcde7328c2ade4fb"}}, +{"id":"html5","key":"html5","value":{"rev":"46-ca85ea99accaf1dc9ded4e2e3aa429c6"}}, +{"id":"html5edit","key":"html5edit","value":{"rev":"10-0383296c33ada4d356740f29121eeb9f"}}, +{"id":"htmlKompressor","key":"htmlKompressor","value":{"rev":"13-95a3afe7f7cfe02e089e41588b937fb1"}}, +{"id":"htmlkup","key":"htmlkup","value":{"rev":"27-5b0115636f38886ae0a40e5f52e2bfdd"}}, +{"id":"htmlparser","key":"htmlparser","value":{"rev":"14-52b2196c1456d821d47bb1d2779b2433"}}, +{"id":"htmlparser2","key":"htmlparser2","value":{"rev":"3-9bc0b807acd913999dfc949b3160a3db"}}, +{"id":"htracr","key":"htracr","value":{"rev":"27-384d0522328e625978b97d8eae8d942d"}}, +{"id":"http","key":"http","value":{"rev":"3-f197d1b599cb9da720d3dd58d9813ace"}}, +{"id":"http-agent","key":"http-agent","value":{"rev":"10-1715dd3a7adccf55bd6637d78bd345d1"}}, +{"id":"http-auth","key":"http-auth","value":{"rev":"3-21636d4430be18a5c6c42e5cb622c2e0"}}, +{"id":"http-basic-auth","key":"http-basic-auth","value":{"rev":"6-0a77e99ce8e31558d5917bd684fa2c9a"}}, +{"id":"http-browserify","key":"http-browserify","value":{"rev":"3-4f720b4af628ed8b5fb22839c1f91f4d"}}, +{"id":"http-console","key":"http-console","value":{"rev":"43-a20cbefed77bcae7de461922286a1f04"}}, +{"id":"http-digest","key":"http-digest","value":{"rev":"6-e0164885dcad21ab6150d537af0edd92"}}, +{"id":"http-digest-auth","key":"http-digest-auth","value":{"rev":"7-613ac841b808fd04e272e050fd5a45ac"}}, +{"id":"http-get","key":"http-get","value":{"rev":"39-b7cfeb2b572d4ecf695493e0886869f4"}}, +{"id":"http-load","key":"http-load","value":{"rev":"3-8c64f4972ff59e89fee041adde99b8ba"}}, +{"id":"http-proxy","key":"http-proxy","value":{"rev":"97-5b8af88886c8c047a9862bf62f6b9294"}}, +{"id":"http-proxy-backward","key":"http-proxy-backward","value":{"rev":"2-4433b04a41e8adade3f6b6b2b939df4b"}}, +{"id":"http-proxy-glimpse","key":"http-proxy-glimpse","value":{"rev":"3-a3e9791d4d9bfef5929ca55d874df18b"}}, +{"id":"http-proxy-no-line-184-error","key":"http-proxy-no-line-184-error","value":{"rev":"3-7e20a990820976d8c6d27c312cc5a67c"}}, +{"id":"http-proxy-selective","key":"http-proxy-selective","value":{"rev":"12-6e273fcd008afeceb6737345c46e1024"}}, +{"id":"http-recorder","key":"http-recorder","value":{"rev":"3-26dd0bc4f5c0bf922db1875e995d025f"}}, +{"id":"http-request-provider","key":"http-request-provider","value":{"rev":"6-436b69971dd1735ac3e41571375f2d15"}}, +{"id":"http-server","key":"http-server","value":{"rev":"21-1b80b6558692afd08c36629b0ecdc18c"}}, +{"id":"http-signature","key":"http-signature","value":{"rev":"9-49ca63427b535f2d18182d92427bc5b6"}}, +{"id":"http-stack","key":"http-stack","value":{"rev":"9-51614060741d6c85a7fd4c714ed1a9b2"}}, +{"id":"http-status","key":"http-status","value":{"rev":"5-1ec72fecc62a41d6f180d15c95e81270"}}, +{"id":"http_compat","key":"http_compat","value":{"rev":"3-88244d4b0fd08a3140fa1b2e8b1b152c"}}, +{"id":"http_router","key":"http_router","value":{"rev":"23-ad52b58b6bfc96d6d4e8215e0c31b294"}}, +{"id":"http_trace","key":"http_trace","value":{"rev":"7-d8024b5e41540e4240120ffefae523e4"}}, +{"id":"httpd","key":"httpd","value":{"rev":"3-9e2a19f007a6a487cdb752f4b8249657"}}, +{"id":"httpmock","key":"httpmock","value":{"rev":"3-b6966ba8ee2c31b0e7729fc59bb00ccf"}}, +{"id":"https-proxied","key":"https-proxied","value":{"rev":"5-f63a4c663d372502b0dcd4997e759e66"}}, +{"id":"httpu","key":"httpu","value":{"rev":"5-88a5b2bac8391d91673fc83d4cfd32df"}}, +{"id":"hungarian-magic","key":"hungarian-magic","value":{"rev":"4-9eae750ac6f30b6687d9a031353f5217"}}, +{"id":"huntergatherer","key":"huntergatherer","value":{"rev":"9-5c9d833a134cfaa901d89dce93f5b013"}}, +{"id":"hxp","key":"hxp","value":{"rev":"8-1f52ba766491826bdc6517c6cc508b2c"}}, +{"id":"hyde","key":"hyde","value":{"rev":"3-5763db65cab423404752b1a6354a7a6c"}}, +{"id":"hydra","key":"hydra","value":{"rev":"8-8bb4ed249fe0f9cdb8b11e492b646b88"}}, +{"id":"hyperpublic","key":"hyperpublic","value":{"rev":"11-5738162f3dbf95803dcb3fb28efd8740"}}, +{"id":"i18n","key":"i18n","value":{"rev":"7-f0d6b3c72ecd34dde02d805041eca996"}}, +{"id":"ical","key":"ical","value":{"rev":"13-baf448be48ab83ec9b3fb8bf83fbb9a1"}}, +{"id":"icalendar","key":"icalendar","value":{"rev":"5-78dd8fd8ed2c219ec56ad26a0727cf76"}}, +{"id":"icecap","key":"icecap","value":{"rev":"9-88d6865078a5e6e1ff998e2e73e593f3"}}, +{"id":"icecapdjs","key":"icecapdjs","value":{"rev":"11-d8e3c718a230d49caa3b5f76cfff7ce9"}}, +{"id":"icecast-stack","key":"icecast-stack","value":{"rev":"9-13b8da6ae373152ab0c8560e2f442af0"}}, +{"id":"ichabod","key":"ichabod","value":{"rev":"19-d0f02ffba80661398ceb80a7e0cbbfe6"}}, +{"id":"icing","key":"icing","value":{"rev":"11-84815e78828190fbaa52d6b93c75cb4f"}}, +{"id":"ico","key":"ico","value":{"rev":"3-5727a35c1df453bfdfa6a03e49725adf"}}, +{"id":"iconv","key":"iconv","value":{"rev":"18-5f5b3193268f1fa099e0112b3e033ffc"}}, +{"id":"iconv-jp","key":"iconv-jp","value":{"rev":"3-660b8f2def930263d2931cae2dcc401d"}}, +{"id":"id3","key":"id3","value":{"rev":"8-afe68aede872cae7b404aaa01c0108a5"}}, +{"id":"idea","key":"idea","value":{"rev":"9-a126c0e52206c51dcf972cf53af0bc32"}}, +{"id":"idiomatic-console","key":"idiomatic-console","value":{"rev":"25-67696c16bf79d1cc8caf4df62677c3ec"}}, +{"id":"idiomatic-stdio","key":"idiomatic-stdio","value":{"rev":"15-9d74c9a8872b1f7c41d6c671d7a14b7d"}}, +{"id":"iglob","key":"iglob","value":{"rev":"6-b8a3518cb67cad20c89f37892a2346a5"}}, +{"id":"ignite","key":"ignite","value":{"rev":"19-06daa730a70f69dc3a0d6d4984905c61"}}, +{"id":"iles-forked-irc-js","key":"iles-forked-irc-js","value":{"rev":"7-eb446f4e0db856e00351a5da2fa20616"}}, +{"id":"image","key":"image","value":{"rev":"8-5f7811db33c210eb38e1880f7cc433f2"}}, +{"id":"imageable","key":"imageable","value":{"rev":"61-9f7e03d3d990d34802f1e9c8019dbbfa"}}, +{"id":"imageinfo","key":"imageinfo","value":{"rev":"11-9bde1a1f0801d94539a4b70b61614849"}}, +{"id":"imagemagick","key":"imagemagick","value":{"rev":"10-b1a1ea405940fecf487da94b733e8c29"}}, +{"id":"imagick","key":"imagick","value":{"rev":"3-21d51d8a265a705881dadbc0c9f7c016"}}, +{"id":"imap","key":"imap","value":{"rev":"13-6a59045496c80b474652d2584edd4acb"}}, +{"id":"imbot","key":"imbot","value":{"rev":"11-0d8075eff5e5ec354683f396378fd101"}}, +{"id":"imdb","key":"imdb","value":{"rev":"7-2bba884d0e8804f4a7e0883abd47b0a7"}}, +{"id":"imgur","key":"imgur","value":{"rev":"3-30c0e5fddc1be3398ba5f7eee1a251d7"}}, +{"id":"impact","key":"impact","value":{"rev":"7-d3390690f11c6f9dcca9f240a7bedfef"}}, +{"id":"imsi","key":"imsi","value":{"rev":"3-0aa9a01c9c79b17afae3684b7b920ced"}}, +{"id":"index","key":"index","value":{"rev":"13-ad5d8d7dfad64512a12db4d820229c07"}}, +{"id":"indexer","key":"indexer","value":{"rev":"9-b0173ce9ad9fa1b80037fa8e33a8ce12"}}, +{"id":"inflect","key":"inflect","value":{"rev":"17-9e5ea2826fe08bd950cf7e22d73371bd"}}, +{"id":"inflectjs","key":"inflectjs","value":{"rev":"3-c59db027b72be720899b4a280ac2518f"}}, +{"id":"inflector","key":"inflector","value":{"rev":"3-191ff29d3b5ed8ef6877032a1d01d864"}}, +{"id":"inheritance","key":"inheritance","value":{"rev":"3-450a1e68bd2d8f16abe7001491abb6a8"}}, +{"id":"inherits","key":"inherits","value":{"rev":"3-284f97a7ae4f777bfabe721b66de07fa"}}, +{"id":"ini","key":"ini","value":{"rev":"5-142c8f9125fbace57689e2837deb1883"}}, +{"id":"iniparser","key":"iniparser","value":{"rev":"14-1053c59ef3d50a46356be45576885c49"}}, +{"id":"inireader","key":"inireader","value":{"rev":"15-9cdc485b18bff6397f5fec45befda402"}}, +{"id":"init","key":"init","value":{"rev":"5-b81610ad72864417dab49f7a3f29cc9f"}}, +{"id":"inject","key":"inject","value":{"rev":"5-82bddb6b4f21ddaa0137fedc8913d60e"}}, +{"id":"inliner","key":"inliner","value":{"rev":"45-8a1c3e8f78438f06865b3237d6c5339a"}}, +{"id":"inode","key":"inode","value":{"rev":"7-118ffafc62dcef5bbeb14e4328c68ab3"}}, +{"id":"inotify","key":"inotify","value":{"rev":"18-03d7b1a318bd283e0185b414b48dd602"}}, +{"id":"inotify-plusplus","key":"inotify-plusplus","value":{"rev":"10-0e0ce9065a62e5e21ee5bb53fac61a6d"}}, +{"id":"inspect","key":"inspect","value":{"rev":"5-b5f18717e29caec3399abe5e4ce7a269"}}, +{"id":"instagram","key":"instagram","value":{"rev":"5-decddf3737a1764518b6a7ce600d720d"}}, +{"id":"instagram-node-lib","key":"instagram-node-lib","value":{"rev":"13-8be77f1180b6afd9066834b3f5ee8de5"}}, +{"id":"instant-styleguide","key":"instant-styleguide","value":{"rev":"9-66c02118993621376ad0b7396db435b3"}}, +{"id":"intercept","key":"intercept","value":{"rev":"9-f5622744c576405516a427b4636ee864"}}, +{"id":"interface","key":"interface","value":{"rev":"10-13806252722402bd18d88533056a863b"}}, +{"id":"interleave","key":"interleave","value":{"rev":"25-69bc136937604863748a029fb88e3605"}}, +{"id":"interstate","key":"interstate","value":{"rev":"3-3bb4a6c35ca765f88a10b9fab6307c59"}}, +{"id":"intervals","key":"intervals","value":{"rev":"21-89b71bd55b8d5f6b670d69fc5b9f847f"}}, +{"id":"intestine","key":"intestine","value":{"rev":"3-66a5531e06865ed9c966d95437ba1371"}}, +{"id":"ios7crypt","key":"ios7crypt","value":{"rev":"7-a2d309a2c074e5c1c456e2b56cbcfd17"}}, +{"id":"iostat","key":"iostat","value":{"rev":"11-f0849c0072e76701b435aa769a614e82"}}, +{"id":"ip2cc","key":"ip2cc","value":{"rev":"9-2c282606fd08d469184a272a2108639c"}}, +{"id":"ipaddr.js","key":"ipaddr.js","value":{"rev":"5-1017fd5342840745614701476ed7e6c4"}}, +{"id":"iptables","key":"iptables","value":{"rev":"7-23e56ef5d7bf0ee8f5bd0e38bde8aae3"}}, +{"id":"iptrie","key":"iptrie","value":{"rev":"4-10317b0e073befe9601e9dc308dc361a"}}, +{"id":"ipv6","key":"ipv6","value":{"rev":"6-85e937f3d79e44dbb76264c7aaaa140f"}}, +{"id":"iqengines","key":"iqengines","value":{"rev":"3-8bdbd32e9dc35b77d80a31edae235178"}}, +{"id":"irc","key":"irc","value":{"rev":"8-ed30964f57b99b1b2f2104cc5e269618"}}, +{"id":"irc-colors","key":"irc-colors","value":{"rev":"9-7ddb19db9a553567aae86bd97f1dcdfc"}}, +{"id":"irc-js","key":"irc-js","value":{"rev":"58-1c898cea420aee60283edb4fadceb90e"}}, +{"id":"ircat.js","key":"ircat.js","value":{"rev":"6-f25f20953ce96697c033315d250615d0"}}, +{"id":"ircbot","key":"ircbot","value":{"rev":"9-85a4a6f88836fc031855736676b10dec"}}, +{"id":"irccd","key":"irccd","value":{"rev":"3-bf598ae8b6af63be41852ae8199416f4"}}, +{"id":"ircd","key":"ircd","value":{"rev":"7-3ba7fc2183d32ee1e58e63092d7e82bb"}}, +{"id":"ircdjs","key":"ircdjs","value":{"rev":"15-8fcdff2bf29cf24c3bbc4b461e6cbe9f"}}, +{"id":"irclog","key":"irclog","value":{"rev":"3-79a99bd8048dd98a93c747a1426aabde"}}, +{"id":"ircrpc","key":"ircrpc","value":{"rev":"5-278bec6fc5519fdbd152ea4fa35dc58c"}}, +{"id":"irrklang","key":"irrklang","value":{"rev":"3-65936dfabf7777027069343c2e72b32e"}}, +{"id":"isaacs","key":"isaacs","value":{"rev":"7-c55a41054056f502bc580bc6819d9d1f"}}, +{"id":"isbn","key":"isbn","value":{"rev":"3-51e784ded2e3ec9ef9b382fecd1c26a1"}}, +{"id":"iscroll","key":"iscroll","value":{"rev":"4-4f6635793806507665503605e7c180f0"}}, +{"id":"isodate","key":"isodate","value":{"rev":"7-ea4b1f77e9557b153264f68fd18a9f23"}}, +{"id":"it-is","key":"it-is","value":{"rev":"14-7617f5831c308d1c4ef914bc5dc30fa7"}}, +{"id":"iterator","key":"iterator","value":{"rev":"3-e6f70367a55cabbb89589f2a88be9ab0"}}, +{"id":"itunes","key":"itunes","value":{"rev":"7-47d151c372d70d0bc311141749c84d5a"}}, +{"id":"iws","key":"iws","value":{"rev":"3-dc7b4d18565b79d3e14aa691e5e632f4"}}, +{"id":"jQuery","key":"jQuery","value":{"rev":"29-f913933259b4ec5f4c5ea63466a4bb08"}}, +{"id":"jWorkflow","key":"jWorkflow","value":{"rev":"7-582cd7aa62085ec807117138b6439550"}}, +{"id":"jaCodeMap","key":"jaCodeMap","value":{"rev":"7-28efcbf4146977bdf1e594e0982ec097"}}, +{"id":"jaaulde-cookies","key":"jaaulde-cookies","value":{"rev":"3-d5b5a75f9cabbebb2804f0b4ae93d0c5"}}, +{"id":"jacker","key":"jacker","value":{"rev":"3-888174c7e3e2a5d241f2844257cf1b10"}}, +{"id":"jade","key":"jade","value":{"rev":"144-318a9d9f63906dc3da1ef7c1ee6420b5"}}, +{"id":"jade-browser","key":"jade-browser","value":{"rev":"9-0ae6b9e321cf04e3ca8fbfe0e38f4d9e"}}, +{"id":"jade-client-connect","key":"jade-client-connect","value":{"rev":"5-96dbafafa31187dd7f829af54432de8e"}}, +{"id":"jade-ext","key":"jade-ext","value":{"rev":"9-aac9a58a4e07d82bc496bcc4241d1be0"}}, +{"id":"jade-i18n","key":"jade-i18n","value":{"rev":"23-76a21a41b5376e10c083672dccf7fc62"}}, +{"id":"jade-serial","key":"jade-serial","value":{"rev":"3-5ec712e1d8cd8d5af20ae3e62ee92854"}}, +{"id":"jadedown","key":"jadedown","value":{"rev":"11-0d16ce847d6afac2939eebcb24a7216c"}}, +{"id":"jadeify","key":"jadeify","value":{"rev":"17-4322b68bb5a7e81e839edabbc8c405a4"}}, +{"id":"jadevu","key":"jadevu","value":{"rev":"15-1fd8557a6db3c23f267de76835f9ee65"}}, +{"id":"jah","key":"jah","value":{"rev":"3-f29704037a1cffe2b08abb4283bee4a4"}}, +{"id":"jake","key":"jake","value":{"rev":"36-5cb64b1c5a89ac53eb4d09d66a5b10e1"}}, +{"id":"jammit-express","key":"jammit-express","value":{"rev":"6-e3dfa928114a2721fe9b8882d284f759"}}, +{"id":"janrain","key":"janrain","value":{"rev":"5-9554501be76fb3a472076858d1abbcd5"}}, +{"id":"janrain-api","key":"janrain-api","value":{"rev":"3-f45a65c695f4c72fdd1bf3593d8aa796"}}, +{"id":"jaque","key":"jaque","value":{"rev":"32-7f269a70c67beefc53ba1684bff5a57b"}}, +{"id":"jar","key":"jar","value":{"rev":"3-7fe0ab4aa3a2ccc5d50853f118e7aeb5"}}, +{"id":"jarvis","key":"jarvis","value":{"rev":"3-fb203b29b397a0b12c1ae56240624e3d"}}, +{"id":"jarvis-test","key":"jarvis-test","value":{"rev":"5-9537ddae8291e6dad03bc0e6acc9ac80"}}, +{"id":"jasbin","key":"jasbin","value":{"rev":"25-ae22f276406ac8bb4293d78595ce02ad"}}, +{"id":"jasmine-dom","key":"jasmine-dom","value":{"rev":"17-686de4c573f507c30ff72c6671dc3d93"}}, +{"id":"jasmine-jquery","key":"jasmine-jquery","value":{"rev":"7-86c077497a367bcd9ea96d5ab8137394"}}, +{"id":"jasmine-node","key":"jasmine-node","value":{"rev":"27-4c544c41c69d2b3cb60b9953d1c46d54"}}, +{"id":"jasmine-reporters","key":"jasmine-reporters","value":{"rev":"3-21ba522ae38402848d5a66d3d4d9a2b3"}}, +{"id":"jasmine-runner","key":"jasmine-runner","value":{"rev":"23-7458777b7a6785efc878cfd40ccb99d8"}}, +{"id":"jasminy","key":"jasminy","value":{"rev":"3-ce76023bac40c5f690cba59d430fd083"}}, +{"id":"jason","key":"jason","value":{"rev":"15-394a59963c579ed5db37fada4d082b5c"}}, +{"id":"javiary","key":"javiary","value":{"rev":"5-661be61fd0f47c9609b7d148e298e2fc"}}, +{"id":"jazz","key":"jazz","value":{"rev":"12-d11d602c1240b134b0593425911242fc"}}, +{"id":"jdoc","key":"jdoc","value":{"rev":"3-0c61fdd6b367a9acac710e553927b290"}}, +{"id":"jeesh","key":"jeesh","value":{"rev":"13-23b4e1ecf9ca76685bf7f1bfc6c076f1"}}, +{"id":"jellyfish","key":"jellyfish","value":{"rev":"25-7fef81f9b5ef5d4abbcecb030a433a72"}}, +{"id":"jen","key":"jen","value":{"rev":"3-ab1b07453318b7e0254e1dadbee7868f"}}, +{"id":"jerk","key":"jerk","value":{"rev":"34-e31f26d5e3b700d0a3e5f5a5acf0d381"}}, +{"id":"jessie","key":"jessie","value":{"rev":"19-829b932e57204f3b7833b34f75d6bf2a"}}, +{"id":"jezebel","key":"jezebel","value":{"rev":"15-b67c259e160390064da69a512382e06f"}}, +{"id":"jimi","key":"jimi","value":{"rev":"10-cc4a8325d6b847362a422304a0057231"}}, +{"id":"jinjs","key":"jinjs","value":{"rev":"37-38fcf1989f1b251a35e4ff725118f55e"}}, +{"id":"jinkies","key":"jinkies","value":{"rev":"30-73fec0e854aa31bcbf3ae1ca04462b22"}}, +{"id":"jison","key":"jison","value":{"rev":"52-d03c6f5e2bdd7624d39d93ec5e88c383"}}, +{"id":"jitsu","key":"jitsu","value":{"rev":"164-95083f8275f0bf2834f62027569b4da2"}}, +{"id":"jitter","key":"jitter","value":{"rev":"16-3f7b183aa7922615f4b5b2fb46653477"}}, +{"id":"jj","key":"jj","value":{"rev":"21-1b3f97e9725e1241c96a884c85dc4e30"}}, +{"id":"jjw","key":"jjw","value":{"rev":"13-835c632dfc5df7dd37860bd0b2c1cb38"}}, +{"id":"jkwery","key":"jkwery","value":{"rev":"11-212429c9c9e1872d4e278da055b5ae0a"}}, +{"id":"jmen","key":"jmen","value":{"rev":"3-a0b67d5b84a077061d3fed2ddbf2c6a8"}}, +{"id":"jobmanager","key":"jobmanager","value":{"rev":"15-1a589ede5f10d1ea2f33f1bb91f9b3aa"}}, +{"id":"jobs","key":"jobs","value":{"rev":"12-3072b6164c5dca8fa9d24021719048ff"}}, +{"id":"jobvite","key":"jobvite","value":{"rev":"56-3d69b0e6d91722ef4908b4fe26bb5432"}}, +{"id":"jodoc","key":"jodoc","value":{"rev":"3-7b05c6d7b4c9a9fa85d3348948d2d52d"}}, +{"id":"johnny-mnemonic","key":"johnny-mnemonic","value":{"rev":"3-e8749d4be597f002aae720011b7c9273"}}, +{"id":"join","key":"join","value":{"rev":"5-ab92491dc83b5e8ed5f0cc49e306d5d5"}}, +{"id":"jolokia-client","key":"jolokia-client","value":{"rev":"26-1f93cb53f4a870b94540cdbf7627b1c4"}}, +{"id":"joo","key":"joo","value":{"rev":"11-e0d4a97eceacdd13769bc5f56e059aa7"}}, +{"id":"jools","key":"jools","value":{"rev":"3-9da332d524a117c4d72a58bb45fa34fd"}}, +{"id":"joose","key":"joose","value":{"rev":"22-ef8a1895680ad2f9c1cd73cd1afbb58e"}}, +{"id":"joosex-attribute","key":"joosex-attribute","value":{"rev":"18-119df97dba1ba2631c94d49e3142bbd7"}}, +{"id":"joosex-bridge-ext","key":"joosex-bridge-ext","value":{"rev":"20-5ad2168291aad2cf021df0a3eb103538"}}, +{"id":"joosex-class-simpleconstructor","key":"joosex-class-simpleconstructor","value":{"rev":"6-f71e02e44f611550374ad9f5d0c37fdf"}}, +{"id":"joosex-class-singleton","key":"joosex-class-singleton","value":{"rev":"6-3ba6b8644722b29febe384a368c18aab"}}, +{"id":"joosex-cps","key":"joosex-cps","value":{"rev":"20-493c65faf1ec59416bae475529c51cd4"}}, +{"id":"joosex-meta-lazy","key":"joosex-meta-lazy","value":{"rev":"13-ef8bc4e57006cfcecd72a344d8dc9da6"}}, +{"id":"joosex-namespace-depended","key":"joosex-namespace-depended","value":{"rev":"22-8a38a21f8564470b96082177e81f3db6"}}, +{"id":"joosex-observable","key":"joosex-observable","value":{"rev":"7-52e7018931e5465920bb6feab88aa468"}}, +{"id":"joosex-role-parameterized","key":"joosex-role-parameterized","value":{"rev":"6-65aa4fa4967c4fbe06357ccda5e6f810"}}, +{"id":"joosex-simplerequest","key":"joosex-simplerequest","value":{"rev":"10-12d105b60b8b3ca3a3626ca0ec53892d"}}, +{"id":"josp","key":"josp","value":{"rev":"3-c4fa8445a0d96037e00fe96d007bcf0c"}}, +{"id":"jot","key":"jot","value":{"rev":"3-8fab571ce3ad993f3594f3c2e0fc6915"}}, +{"id":"journey","key":"journey","value":{"rev":"40-efe1fa6c8d735592077c9a24b3b56a03"}}, +{"id":"jpeg","key":"jpeg","value":{"rev":"8-ab437fbaf88f32a7fb625a0b27521292"}}, +{"id":"jq","key":"jq","value":{"rev":"3-9d83287aa9e6aab25590fac9adbab968"}}, +{"id":"jqNode","key":"jqNode","value":{"rev":"3-fcaf2c47aba5637a4a23c64b6fc778cf"}}, +{"id":"jqbuild","key":"jqbuild","value":{"rev":"3-960edcea36784aa9ca135cd922e0cb9b"}}, +{"id":"jqserve","key":"jqserve","value":{"rev":"3-39272c5479aabaafe66ffa26a6eb3bb5"}}, +{"id":"jqtpl","key":"jqtpl","value":{"rev":"54-ce2b62ced4644d5fe24c3a8ebcb4d528"}}, +{"id":"jquajax","key":"jquajax","value":{"rev":"3-a079cb8f3a686faaafe420760e77a330"}}, +{"id":"jquery","key":"jquery","value":{"rev":"27-60fd58bba99d044ffe6e140bafd72595"}}, +{"id":"jquery-browserify","key":"jquery-browserify","value":{"rev":"9-a4e9afd657f3c632229afa356382f6a4"}}, +{"id":"jquery-deferred","key":"jquery-deferred","value":{"rev":"5-0fd0cec51f7424a50f0dba3cbe74fd58"}}, +{"id":"jquery-drive","key":"jquery-drive","value":{"rev":"3-8474f192fed5c5094e56bc91f5e8a0f8"}}, +{"id":"jquery-mousewheel","key":"jquery-mousewheel","value":{"rev":"3-cff81086cf651e52377a8d5052b09d64"}}, +{"id":"jquery-placeholdize","key":"jquery-placeholdize","value":{"rev":"3-7acc3fbda1b8daabce18876d2b4675e3"}}, +{"id":"jquery-tmpl-jst","key":"jquery-tmpl-jst","value":{"rev":"13-575031eb2f2b1e4c5562e195fce0bc93"}}, +{"id":"jquery.effects.blind","key":"jquery.effects.blind","value":{"rev":"3-5f3bec5913edf1bfcee267891f6204e2"}}, +{"id":"jquery.effects.bounce","key":"jquery.effects.bounce","value":{"rev":"3-245b2e7d9a1295dd0f7d568b8087190d"}}, +{"id":"jquery.effects.clip","key":"jquery.effects.clip","value":{"rev":"3-7aa63a590b6d90d5ea20e21c8dda675d"}}, +{"id":"jquery.effects.core","key":"jquery.effects.core","value":{"rev":"3-dd2fa270d8aea21104c2c92d6b06500d"}}, +{"id":"jquery.effects.drop","key":"jquery.effects.drop","value":{"rev":"3-8d0e30016e99460063a9a9000ce7b032"}}, +{"id":"jquery.effects.explode","key":"jquery.effects.explode","value":{"rev":"3-3d5e3bb2fb451f7eeaeb72b6743b6e6c"}}, +{"id":"jquery.effects.fade","key":"jquery.effects.fade","value":{"rev":"3-f362c762053eb278b5db5f92e248c3a5"}}, +{"id":"jquery.effects.fold","key":"jquery.effects.fold","value":{"rev":"3-c7d823c2b25c4f1e6a1801f4b1bc7a2c"}}, +{"id":"jquery.effects.highlight","key":"jquery.effects.highlight","value":{"rev":"3-44ef3c62a6b829382bffa6393cd31ed9"}}, +{"id":"jquery.effects.pulsate","key":"jquery.effects.pulsate","value":{"rev":"3-3cad87635cecc2602d40682cf669d2fe"}}, +{"id":"jquery.effects.scale","key":"jquery.effects.scale","value":{"rev":"3-2c8df02eeed343088e2253d84064a219"}}, +{"id":"jquery.effects.shake","key":"jquery.effects.shake","value":{"rev":"3-d63ab567d484311744d848b520a720c7"}}, +{"id":"jquery.effects.slide","key":"jquery.effects.slide","value":{"rev":"3-9eb5d1075d67045a8fa305e596981934"}}, +{"id":"jquery.effects.transfer","key":"jquery.effects.transfer","value":{"rev":"3-371bc87350ede6da53a40468b63200a9"}}, +{"id":"jquery.tmpl","key":"jquery.tmpl","value":{"rev":"5-75efd6c8c0ce030f2da12b984f9dfe6c"}}, +{"id":"jquery.ui.accordion","key":"jquery.ui.accordion","value":{"rev":"3-964ee7d6c50f31e7db6631da28e2261a"}}, +{"id":"jquery.ui.autocomplete","key":"jquery.ui.autocomplete","value":{"rev":"3-950d240629d142eab5e07c2776e39bcc"}}, +{"id":"jquery.ui.button","key":"jquery.ui.button","value":{"rev":"3-a1c7f3eeb9298ac0c116d75a176a6d17"}}, +{"id":"jquery.ui.core","key":"jquery.ui.core","value":{"rev":"3-b7ba340b7304a304f85c4d13438d1195"}}, +{"id":"jquery.ui.datepicker","key":"jquery.ui.datepicker","value":{"rev":"3-5b76579057f1b870959a06ab833f1972"}}, +{"id":"jquery.ui.dialog","key":"jquery.ui.dialog","value":{"rev":"3-0c314cee86bf67298759efcfd47246f6"}}, +{"id":"jquery.ui.draggable","key":"jquery.ui.draggable","value":{"rev":"3-b7a15d2bdbcdc6f0f3cd6e4522f9f1f3"}}, +{"id":"jquery.ui.droppable","key":"jquery.ui.droppable","value":{"rev":"3-86d8a1558f5e9383b271b4d968ba081d"}}, +{"id":"jquery.ui.mouse","key":"jquery.ui.mouse","value":{"rev":"3-ccb88d773c452c778c694f9f551cb816"}}, +{"id":"jquery.ui.position","key":"jquery.ui.position","value":{"rev":"3-c49c13b38592a363585600b7af54d977"}}, +{"id":"jquery.ui.progressbar","key":"jquery.ui.progressbar","value":{"rev":"3-b28dfadab64f9548b828c42bf870fcc9"}}, +{"id":"jquery.ui.resizable","key":"jquery.ui.resizable","value":{"rev":"3-aa356230544cbe8ab8dc5fab08cc0fa7"}}, +{"id":"jquery.ui.selectable","key":"jquery.ui.selectable","value":{"rev":"3-6b11846c104d580556e40eb5194c45f2"}}, +{"id":"jquery.ui.slider","key":"jquery.ui.slider","value":{"rev":"3-e8550b76bf58a9cbeca9ea91eb763257"}}, +{"id":"jquery.ui.sortable","key":"jquery.ui.sortable","value":{"rev":"3-1ddd981bd720f055fbd5bb1d06df55ad"}}, +{"id":"jquery.ui.tabs","key":"jquery.ui.tabs","value":{"rev":"3-e0514383f4d920b9dc23ef7a7ea4d8af"}}, +{"id":"jquery.ui.widget","key":"jquery.ui.widget","value":{"rev":"3-3a0800fa067c12d013168f74acf21e6d"}}, +{"id":"jqueryify","key":"jqueryify","value":{"rev":"3-2655cf6a45795a8bd138a464e6c18f04"}}, +{"id":"jrep","key":"jrep","value":{"rev":"3-edbcf6931b8a2b3f550727d8b839acc3"}}, +{"id":"js-beautify-node","key":"js-beautify-node","value":{"rev":"3-401cd1c130aaec2c090b578fe8db6290"}}, +{"id":"js-class","key":"js-class","value":{"rev":"5-a63fbb0136dcd602feee72e70674d5db"}}, +{"id":"js-jango","key":"js-jango","value":{"rev":"3-af4e4a7844791617e66a40a1c403bb98"}}, +{"id":"js-loader","key":"js-loader","value":{"rev":"13-8d9729495c1692e47d2cd923e839b4c8"}}, +{"id":"js-manager","key":"js-manager","value":{"rev":"5-6d384a2ce4737f13d417f85689c3c372"}}, +{"id":"js-nts","key":"js-nts","value":{"rev":"3-7d921611b567d2d890bc983c343558ef"}}, +{"id":"js-openstack","key":"js-openstack","value":{"rev":"11-d56996be276fbe6162573575932b1cba"}}, +{"id":"js-select","key":"js-select","value":{"rev":"9-9d20f6d86d9e6f8a84191346288b76ed"}}, +{"id":"js.io","key":"js.io","value":{"rev":"3-c5e16e13372ba592ccf2ac86ee007a1f"}}, +{"id":"js2","key":"js2","value":{"rev":"35-2dc694e48b67252d8787f5e889a07430"}}, +{"id":"js2coffee","key":"js2coffee","value":{"rev":"19-8eeafa894dcc0dc306b02e728543511e"}}, +{"id":"jsDAV","key":"jsDAV","value":{"rev":"11-4ab1935d98372503439b054daef2e78e"}}, +{"id":"jsDump","key":"jsDump","value":{"rev":"5-32d6e4032bd114245356970f0b76a58a"}}, +{"id":"jsSourceCodeParser","key":"jsSourceCodeParser","value":{"rev":"3-78c5e8624ab25fca99a7bb6cd9be402b"}}, +{"id":"jsapp","key":"jsapp","value":{"rev":"3-6758eb2743cc22f723a6612b34c8d943"}}, +{"id":"jscc-node","key":"jscc-node","value":{"rev":"3-5f52dc20dc2a188bc32e7219c9d2f225"}}, +{"id":"jscheckstyle","key":"jscheckstyle","value":{"rev":"5-82021f06a1bd824ac195e0ab8a3b598c"}}, +{"id":"jsclass","key":"jsclass","value":{"rev":"9-2a0656b9497c5a8208a0fefa5aae3350"}}, +{"id":"jsconfig","key":"jsconfig","value":{"rev":"3-b1afef99468f81eff319453623135a56"}}, +{"id":"jscssp","key":"jscssp","value":{"rev":"6-413ad0701e6dbb412e8a01aadb6672c4"}}, +{"id":"jsdata","key":"jsdata","value":{"rev":"5-53f8b26f28291dccfdff8f14e7f4c44c"}}, +{"id":"jsdeferred","key":"jsdeferred","value":{"rev":"8-bc238b921a1fa465503722756a98e9b7"}}, +{"id":"jsdoc","key":"jsdoc","value":{"rev":"3-386eb47a2761a1ad025996232751fba9"}}, +{"id":"jsdog","key":"jsdog","value":{"rev":"11-d4a523898a7c474b5c7b8cb8b24bafe8"}}, +{"id":"jsdom","key":"jsdom","value":{"rev":"63-86bc6b9d8bfdb99b793ac959e126f7ff"}}, +{"id":"jsftp","key":"jsftp","value":{"rev":"35-89cd772521d7ac3cead71c602ddeb819"}}, +{"id":"jsgi","key":"jsgi","value":{"rev":"20-dbef9d8dfb5c9bf1a3b6014159bb305a"}}, +{"id":"jsgi-node","key":"jsgi-node","value":{"rev":"1-8ec0892e521754aaf88684714d306af9"}}, +{"id":"jsgrep","key":"jsgrep","value":{"rev":"7-be19445481acdbbb684fdc2425d88d08"}}, +{"id":"jshelpers","key":"jshelpers","value":{"rev":"11-9509dcdd48bc494de76cae66217ebedb"}}, +{"id":"jshint","key":"jshint","value":{"rev":"34-ed2e7ea0e849126bd9821b86f23b7314"}}, +{"id":"jshint-autofix","key":"jshint-autofix","value":{"rev":"9-abbb3622aa8a47a8890dbbaab0009b6d"}}, +{"id":"jshint-mode","key":"jshint-mode","value":{"rev":"5-06ec066819b93c7ae6782c755a0e2125"}}, +{"id":"jshint-runner","key":"jshint-runner","value":{"rev":"7-6fc8a15e387a4e81e300a54a86a3a240"}}, +{"id":"jshtml","key":"jshtml","value":{"rev":"5-d3e96c31cf1cd2fcf7743defc1631c3a"}}, +{"id":"jsinc","key":"jsinc","value":{"rev":"9-0e4dc3ba04b440085a79d6001232abfc"}}, +{"id":"jslint","key":"jslint","value":{"rev":"10-ab451352333b5f3d29c6cdbab49187dd"}}, +{"id":"jslint-core","key":"jslint-core","value":{"rev":"3-1f874d8cca07b6f007bc80c23ba15e2e"}}, +{"id":"jslint-strict","key":"jslint-strict","value":{"rev":"8-3d694a0f3079691da1866de16f290ea2"}}, +{"id":"jslinux","key":"jslinux","value":{"rev":"13-033cb60c7867aae599863323a97f45c0"}}, +{"id":"jslitmus","key":"jslitmus","value":{"rev":"6-d3f3f82ea1a376acc2b24c69da003409"}}, +{"id":"jsmeter","key":"jsmeter","value":{"rev":"5-7838bb9b970cbaa29a48802c508fd091"}}, +{"id":"jsmin","key":"jsmin","value":{"rev":"6-002ad1b385915e60f895b5e52492fb94"}}, +{"id":"json","key":"json","value":{"rev":"39-1d24fb8c3bdf0ac533bfc52e74420adc"}}, +{"id":"json-browser","key":"json-browser","value":{"rev":"6-883f051c1297cf631adba1c855ff2e13"}}, +{"id":"json-builder","key":"json-builder","value":{"rev":"5-e7a996ff1ef89114ce2ab6de9b653af8"}}, +{"id":"json-command","key":"json-command","value":{"rev":"16-8239cb65563720c42da5562d3a031b09"}}, +{"id":"json-fu","key":"json-fu","value":{"rev":"5-7933c35711cb9d7673d7514fe495c56d"}}, +{"id":"json-line-protocol","key":"json-line-protocol","value":{"rev":"7-98de63467d154b40a029391af8a26042"}}, +{"id":"json-object","key":"json-object","value":{"rev":"7-534cd9680c386c5b9800848755698f2b"}}, +{"id":"json-ref","key":"json-ref","value":{"rev":"3-cd09776d166c3f77013e429737c7e1e9"}}, +{"id":"json-san","key":"json-san","value":{"rev":"7-8683abde23232c1d84266e7a2d5c4527"}}, +{"id":"json-schema","key":"json-schema","value":{"rev":"1-2f323062e7ec80d2ff765da43c7aaa7d"}}, +{"id":"json-sockets","key":"json-sockets","value":{"rev":"26-bfef71c0d9fb4d56010b05f47f142748"}}, +{"id":"json-storage","key":"json-storage","value":{"rev":"3-46139e3a54c0a27e67820df2c7e87dbf"}}, +{"id":"json-storage-model","key":"json-storage-model","value":{"rev":"3-8b77044e192791613cf92b2f3317357f"}}, +{"id":"json-streamify","key":"json-streamify","value":{"rev":"5-d98cd72265fba652481eef6baa980f46"}}, +{"id":"json-streams","key":"json-streams","value":{"rev":"3-e07fc5ca24b33145c8aacf9995d46723"}}, +{"id":"json-tables","key":"json-tables","value":{"rev":"3-37a652b54880487e66ffeee6822b945b"}}, +{"id":"json-template","key":"json-template","value":{"rev":"3-9ee3a101c60ea682fb88759b2df837e4"}}, +{"id":"json2","key":"json2","value":{"rev":"12-bc3d411db772e0947ca58a54c2084073"}}, +{"id":"json2ify","key":"json2ify","value":{"rev":"3-c2d6677cc35e4668c97cf6800a4728d8"}}, +{"id":"json2xml","key":"json2xml","value":{"rev":"3-e955b994479362685e2197b39909dea2"}}, +{"id":"json_req","key":"json_req","value":{"rev":"15-14520bc890cbb0ab4c142b59bf21c9f1"}}, +{"id":"jsonapi","key":"jsonapi","value":{"rev":"11-2b27aaca5643d6a5b3ab38721cf6342f"}}, +{"id":"jsonconfig","key":"jsonconfig","value":{"rev":"5-0072bb54cb0ae5b13eee4f1657ba6a29"}}, +{"id":"jsond","key":"jsond","value":{"rev":"13-7c3622aeb147dae4698608ee32d81b45"}}, +{"id":"jsondate","key":"jsondate","value":{"rev":"3-1da5d30ee1cf7c6d9605a446efd91478"}}, +{"id":"jsonds","key":"jsonds","value":{"rev":"9-af2867869a46787e58c337e700dbf0dd"}}, +{"id":"jsonds2","key":"jsonds2","value":{"rev":"3-e7ed9647cc1ba72e59b625840358c7ca"}}, +{"id":"jsonfiles","key":"jsonfiles","value":{"rev":"3-5e643ba75c401f653f505e7938540d83"}}, +{"id":"jsonify","key":"jsonify","value":{"rev":"3-91207fd1bc11668be7906f74992de6bb"}}, +{"id":"jsonize","key":"jsonize","value":{"rev":"3-4881031480a5326d9f5966189170db25"}}, +{"id":"jsonlint","key":"jsonlint","value":{"rev":"11-88d3c1c395846e7687f410e0dc405469"}}, +{"id":"jsonml","key":"jsonml","value":{"rev":"3-9990d9515fa554b5c7ff8bf8c7bb3308"}}, +{"id":"jsonparse","key":"jsonparse","value":{"rev":"3-569962847a5fd9d65fdf91af9e3e87a5"}}, +{"id":"jsonpointer","key":"jsonpointer","value":{"rev":"5-0310a11e82e9e22a4e5239dee2bc2213"}}, +{"id":"jsonprettify","key":"jsonprettify","value":{"rev":"3-173ae677f2110dfff8cb17dd2b4c68de"}}, +{"id":"jsonreq","key":"jsonreq","value":{"rev":"5-84b47d8c528ea7efa9aae113e5ff53cf"}}, +{"id":"jsonrpc","key":"jsonrpc","value":{"rev":"10-e40ff49715537320cbbbde67378f099e"}}, +{"id":"jsonrpc-ws","key":"jsonrpc-ws","value":{"rev":"7-73c385f3d35dadbdc87927f6a751e3ca"}}, +{"id":"jsonrpc2","key":"jsonrpc2","value":{"rev":"13-71efdea4f551d3a2550fcf5355ea8c8c"}}, +{"id":"jsontool","key":"jsontool","value":{"rev":"14-44bc979d3a8dc9295c825def01e533b4"}}, +{"id":"jsontoxml","key":"jsontoxml","value":{"rev":"8-2640fd26237ab4a45450748d392dd2d2"}}, +{"id":"jsontry","key":"jsontry","value":{"rev":"3-adb3f32f86419ac4b589ce41ab253952"}}, +{"id":"jsorm-i18n","key":"jsorm-i18n","value":{"rev":"3-54347174039512616ed76cc9a37605ea"}}, +{"id":"jsorm-utilities","key":"jsorm-utilities","value":{"rev":"3-187fc9f86ed8d32ebcb6c451fa7cc3c4"}}, +{"id":"jspack","key":"jspack","value":{"rev":"3-84955792d8b57fc301968daf674bace7"}}, +{"id":"jspkg","key":"jspkg","value":{"rev":"5-f5471c37554dad3492021490a70a1190"}}, +{"id":"jspp","key":"jspp","value":{"rev":"8-7607018fa48586f685dda17d77d0999b"}}, +{"id":"jss","key":"jss","value":{"rev":"20-4517b1daeda4f878debddc9f23347f00"}}, +{"id":"jst","key":"jst","value":{"rev":"27-8372bf5c052b6bd6e28f5d2c89b47e49"}}, +{"id":"jstestdriver","key":"jstestdriver","value":{"rev":"3-d26b172af33d6c45fc3dc96b96865714"}}, +{"id":"jstoxml","key":"jstoxml","value":{"rev":"15-c26b77ed5228500238c7b21a3dbdbbb7"}}, +{"id":"jsup","key":"jsup","value":{"rev":"3-54eb8598ae1a49bd1540e482a44a6abc"}}, +{"id":"jthon","key":"jthon","value":{"rev":"5-d578940ac32497839ff48d3f6205e9e2"}}, +{"id":"juggernaut","key":"juggernaut","value":{"rev":"20-15d33218943b9ec64b642e2a4a05e4b8"}}, +{"id":"juggernaut-yoomee","key":"juggernaut-yoomee","value":{"rev":"7-a58d429e46aac76260e236c64d20ff02"}}, +{"id":"jump","key":"jump","value":{"rev":"19-d47e23c31dc623b54e60004b08f6f624"}}, +{"id":"jumprope","key":"jumprope","value":{"rev":"5-98d4e2452f14d3b0996f04882b07d674"}}, +{"id":"junction","key":"junction","value":{"rev":"3-2b73ea17d862b1e95039141e98e53268"}}, +{"id":"jus-config","key":"jus-config","value":{"rev":"5-d2da00317dceb712d82dbfc776122dbe"}}, +{"id":"jus-i18n","key":"jus-i18n","value":{"rev":"3-d146cfc5f3c9aee769390ed921836b6e"}}, +{"id":"jus-task","key":"jus-task","value":{"rev":"13-d127de2a102eef2eb0d1b67810ecd558"}}, +{"id":"justtest","key":"justtest","value":{"rev":"17-467ee4ca606f0447a0c458550552fd0a"}}, +{"id":"jute","key":"jute","value":{"rev":"99-158d262e9126de5026bbfeb3168d9277"}}, +{"id":"jwt","key":"jwt","value":{"rev":"3-4cb8a706d1bc3c300bdadeba781c7bc4"}}, +{"id":"kaffeine","key":"kaffeine","value":{"rev":"47-261825b8d8cdf168387c6a275682dd0b"}}, +{"id":"kafka","key":"kafka","value":{"rev":"9-7465d4092e6322d0b744f017be8ffcea"}}, +{"id":"kahan","key":"kahan","value":{"rev":"5-107bb2dcdb51faaa00aef1e37eff91eb"}}, +{"id":"kahve-ansi","key":"kahve-ansi","value":{"rev":"5-a86d9a3ea56362fa81c8ee9f1ef8f2ef"}}, +{"id":"kahve-cake","key":"kahve-cake","value":{"rev":"3-873b4e553c4ba417c888aadce3b800f6"}}, +{"id":"kahve-classmethod","key":"kahve-classmethod","value":{"rev":"3-08e0a5786edc15539cc6746fe6c65bec"}}, +{"id":"kahve-exception","key":"kahve-exception","value":{"rev":"3-fb9d839cfdc069271cbc10fa27a87f3c"}}, +{"id":"kahve-progress","key":"kahve-progress","value":{"rev":"3-d2fcdd99793a0c3c3a314afb067a3701"}}, +{"id":"kanso","key":"kanso","value":{"rev":"41-2b18ab56cc86313daa840b7b3f63b318"}}, +{"id":"kaph","key":"kaph","value":{"rev":"7-c24622e38cf23bac67459bfe5a0edd63"}}, +{"id":"karait","key":"karait","value":{"rev":"9-a4abc4bc11c747448c4884cb714737c9"}}, +{"id":"kasabi","key":"kasabi","value":{"rev":"3-36cb65aef11d181c532f4549d58944e6"}}, +{"id":"kassit","key":"kassit","value":{"rev":"27-6fafe5122a4dda542a34ba18dddfc9ea"}}, +{"id":"kdtree","key":"kdtree","value":{"rev":"9-177bf5018be1f177d302af1d746b0462"}}, +{"id":"keeper","key":"keeper","value":{"rev":"13-43ce24b6e1fb8ac23c58a78e3e92d137"}}, +{"id":"kestrel","key":"kestrel","value":{"rev":"3-1303ae0617ed1076eed022176c78b0c4"}}, +{"id":"kettle","key":"kettle","value":{"rev":"3-385c10c43df484666148e796840e72c7"}}, +{"id":"keyed_list","key":"keyed_list","value":{"rev":"5-c98d8bc8619300da1a09098bb298bf16"}}, +{"id":"keyframely","key":"keyframely","value":{"rev":"5-586380d2258a099d8fa4748f2688b571"}}, +{"id":"keygrip","key":"keygrip","value":{"rev":"18-4178954fb4f0e26407851104876f1a03"}}, +{"id":"keyjson","key":"keyjson","value":{"rev":"5-96ab1d8b6fa77864883b657360070af4"}}, +{"id":"keymaster","key":"keymaster","value":{"rev":"8-e7eb722489b02991943e9934b8155162"}}, +{"id":"keys","key":"keys","value":{"rev":"12-8b34b8f593667f0c23f1841edb5b6fa3"}}, +{"id":"keysym","key":"keysym","value":{"rev":"13-ec57906511f8f2f896a9e81dc206ea77"}}, +{"id":"keyx","key":"keyx","value":{"rev":"3-80dc49b56e3ba1d280298c36afa2a82c"}}, +{"id":"khronos","key":"khronos","value":{"rev":"3-1a3772db2725c4c3098d5cf4ca2189a4"}}, +{"id":"kindred","key":"kindred","value":{"rev":"5-99c7f4f06e4a47e476f9d75737f719d7"}}, +{"id":"kiokujs","key":"kiokujs","value":{"rev":"8-4b96a9bc1866f58bb263b310e64df403"}}, +{"id":"kiokujs-backend-batch","key":"kiokujs-backend-batch","value":{"rev":"3-4739de0f2e0c01581ce0b02638d3df02"}}, +{"id":"kiokujs-backend-couchdb","key":"kiokujs-backend-couchdb","value":{"rev":"8-53e830e0a7e8ea810883c00ce79bfeef"}}, +{"id":"kiss.js","key":"kiss.js","value":{"rev":"11-7c9b1d7e2faee25ade6f1cad1bb261d9"}}, +{"id":"kissy","key":"kissy","value":{"rev":"8-3f8f7c169a3e84df6a7f68315f13b3ba"}}, +{"id":"kitkat","key":"kitkat","value":{"rev":"41-5f2600e4e1c503f63702c74195ff3361"}}, +{"id":"kitkat-express","key":"kitkat-express","value":{"rev":"3-91ef779ed9acdad1ca6f776e10a70246"}}, +{"id":"kizzy","key":"kizzy","value":{"rev":"5-f281b9e4037eda414f918ec9021e28c9"}}, +{"id":"kjs","key":"kjs","value":{"rev":"3-2ee03262f843e497161f1aef500dd229"}}, +{"id":"kju","key":"kju","value":{"rev":"5-0a7de1cd26864c85a22c7727c660d441"}}, +{"id":"klass","key":"klass","value":{"rev":"39-61491ef3824772d5ef33f7ea04219461"}}, +{"id":"klout-js","key":"klout-js","value":{"rev":"8-8d99f6dad9c21cb5da0d64fefef8c6d6"}}, +{"id":"knid","key":"knid","value":{"rev":"7-2cbfae088155da1044b568584cd296df"}}, +{"id":"knox","key":"knox","value":{"rev":"19-3c42553bd201b23a6bc15fdd073dad17"}}, +{"id":"knox-stream","key":"knox-stream","value":{"rev":"17-e40275f926b6ed645e4ef04caf8e5df4"}}, +{"id":"kns","key":"kns","value":{"rev":"9-5da1a89ad8c08f4b10cd715036200da3"}}, +{"id":"ko","key":"ko","value":{"rev":"9-9df2853d0e9ed9f7740f53291d0035dd"}}, +{"id":"koala","key":"koala","value":{"rev":"8-9e3fea91917f6d8cfb5aae22115e132f"}}, +{"id":"kohai","key":"kohai","value":{"rev":"3-1721a193589459fa077fea809fd7c9a9"}}, +{"id":"koku","key":"koku","value":{"rev":"5-414736980e0e70d90cd7f29b175fb18c"}}, +{"id":"komainu","key":"komainu","value":{"rev":"5-0f1a8f132fe58385e989dd4f93aefa26"}}, +{"id":"komodo-scheme","key":"komodo-scheme","value":{"rev":"3-97d1bd27f069684c491012e079fd82c4"}}, +{"id":"konphyg","key":"konphyg","value":{"rev":"7-e5fc03d6ddf39f2e0723291800bf0d43"}}, +{"id":"kranium","key":"kranium","value":{"rev":"3-4a78d2eb28e949a55b0dbd2ab00cecaf"}}, +{"id":"kue","key":"kue","value":{"rev":"21-053b32204d89a3067c5a90ca62ede08c"}}, +{"id":"kyatchi","key":"kyatchi","value":{"rev":"21-8dfbbe498f3740a2869c82e4ab4522d1"}}, +{"id":"kyoto","key":"kyoto","value":{"rev":"15-b9acdad89d56c71b6f427a443c16f85f"}}, +{"id":"kyoto-client","key":"kyoto-client","value":{"rev":"11-7fb392ee23ce64a48ae5638d713f4fbd"}}, +{"id":"kyoto-tycoon","key":"kyoto-tycoon","value":{"rev":"18-81ece8df26dbd9986efe1d97d935bec2"}}, +{"id":"kyuri","key":"kyuri","value":{"rev":"9-bedd4c087bd7bf612bde5e862d8b91bb"}}, +{"id":"labBuilder","key":"labBuilder","value":{"rev":"11-37f85b5325f1ccf25193c8b737823185"}}, +{"id":"laconic","key":"laconic","value":{"rev":"3-f5b7b9ac113fe7d32cbf4cb0d01c3052"}}, +{"id":"languagedetect","key":"languagedetect","value":{"rev":"3-ac487c034a3470ebd47b54614ea848f9"}}, +{"id":"lastfm","key":"lastfm","value":{"rev":"52-5af213489ca6ecdf2afc851c4642b082"}}, +{"id":"layers","key":"layers","value":{"rev":"7-62cd47d9645faa588c635dab2fbd2ef0"}}, +{"id":"lazy","key":"lazy","value":{"rev":"18-9b5ccdc9c3a970ec4c2b63b6f882da6a"}}, +{"id":"lazy-image","key":"lazy-image","value":{"rev":"5-34a6bc95017c50b3cb69981c7343e5da"}}, +{"id":"lazyBum","key":"lazyBum","value":{"rev":"15-03da6d744ba8cce7efca88ccb7e18c4d"}}, +{"id":"lazyprop","key":"lazyprop","value":{"rev":"14-82b4bcf318094a7950390f03e2fec252"}}, +{"id":"ldapjs","key":"ldapjs","value":{"rev":"11-e2b28e11a0aebe37b758d8f1ed61dd57"}}, +{"id":"ldapjs-riak","key":"ldapjs-riak","value":{"rev":"7-005413a1d4e371663626a3cca200c7e0"}}, +{"id":"ldifgrep","key":"ldifgrep","value":{"rev":"3-e4f06821a3444abbcd3c0c26300dcdda"}}, +{"id":"leaf","key":"leaf","value":{"rev":"8-0ccf5cdd1b59717b53375fe4bf044ec3"}}, +{"id":"lean","key":"lean","value":{"rev":"3-32dbbc771a3f1f6697c21c5d6c516967"}}, +{"id":"leche","key":"leche","value":{"rev":"7-0f5e19052ae1e3cb25ff2aa73271ae4f"}}, +{"id":"leche.spice.io","key":"leche.spice.io","value":{"rev":"3-07db415fdb746873f211e8155ecdf232"}}, +{"id":"less","key":"less","value":{"rev":"37-160fe5ea5dba44f02defdb8ec8c647d5"}}, +{"id":"less-bal","key":"less-bal","value":{"rev":"3-d50532c7c46013a62d06a0e54f8846ce"}}, +{"id":"less4clients","key":"less4clients","value":{"rev":"5-343d2973a166801681c856558d975ddf"}}, +{"id":"lessup","key":"lessup","value":{"rev":"9-a2e7627ef1b493fe82308d019ae481ac"}}, +{"id":"lessweb","key":"lessweb","value":{"rev":"9-e21794e578884c228dbed7c5d6128a41"}}, +{"id":"leveldb","key":"leveldb","value":{"rev":"11-3809e846a7a5ff883d17263288664195"}}, +{"id":"levenshtein","key":"levenshtein","value":{"rev":"6-44d27b6a6bc407772cafc29af485854f"}}, +{"id":"lib","key":"lib","value":{"rev":"5-a95272f11e927888c8b711503fce670b"}}, +{"id":"libdtrace","key":"libdtrace","value":{"rev":"8-4d4f72b2349154da514700f576e34564"}}, +{"id":"liberator","key":"liberator","value":{"rev":"15-b702710ccb3b45e41e9e2f3ebb6375ae"}}, +{"id":"libirc","key":"libirc","value":{"rev":"3-05b125de0c179dd311129aac2e1c8047"}}, +{"id":"liblzg","key":"liblzg","value":{"rev":"5-445ed45dc3cd166a299f85f6149aa098"}}, +{"id":"libnotify","key":"libnotify","value":{"rev":"10-c6723206898865e4828e963f5acc005e"}}, +{"id":"libxml-to-js","key":"libxml-to-js","value":{"rev":"33-64d3152875d33d6feffd618152bc41df"}}, +{"id":"libxmlext","key":"libxmlext","value":{"rev":"3-6a896dacba6f25fbca9b79d4143aaa9a"}}, +{"id":"libxmljs","key":"libxmljs","value":{"rev":"17-4b2949b53d9ecde79a99361774c1144b"}}, +{"id":"libxpm","key":"libxpm","value":{"rev":"3-c03efe75832c4416ceee5d72be12a8ef"}}, +{"id":"libyaml","key":"libyaml","value":{"rev":"5-f279bde715345a4e81d43c1d798ee608"}}, +{"id":"lift","key":"lift","value":{"rev":"21-61dcb771e5e0dc03fa327120d440ccda"}}, +{"id":"light-traits","key":"light-traits","value":{"rev":"26-b35c49550f9380fd462d57c64d51540f"}}, +{"id":"lightnode","key":"lightnode","value":{"rev":"3-ce37ccbf6a6546d4fa500e0eff84e882"}}, +{"id":"limestone","key":"limestone","value":{"rev":"3-d6f76ae98e4189db4ddfa8e15b4cdea9"}}, +{"id":"limited-file","key":"limited-file","value":{"rev":"3-c1d78250965b541836a70d3e867c694f"}}, +{"id":"lin","key":"lin","value":{"rev":"17-0a26ea2a603df0d14a9c40aad96bfb5e"}}, +{"id":"line-parser","key":"line-parser","value":{"rev":"7-84047425699f5a8a8836f4f2e63777bc"}}, +{"id":"line-reader","key":"line-reader","value":{"rev":"9-d2a7cb3a9793149e643490dc16a1eb50"}}, +{"id":"linebuffer","key":"linebuffer","value":{"rev":"12-8e79075aa213ceb49b28e0af7b3f3861"}}, +{"id":"lines","key":"lines","value":{"rev":"9-01a0565f47c3816919ca75bf77539df5"}}, +{"id":"lines-adapter","key":"lines-adapter","value":{"rev":"23-f287561e42a841c00bbf94bc8741bebc"}}, +{"id":"linestream","key":"linestream","value":{"rev":"5-18c2be87653ecf20407ed70eeb601ae7"}}, +{"id":"lingo","key":"lingo","value":{"rev":"10-b3d62b203c4af108feeaf0e32b2a4186"}}, +{"id":"link","key":"link","value":{"rev":"15-7570cea23333dbe3df11fd71171e6226"}}, +{"id":"linkedin-js","key":"linkedin-js","value":{"rev":"22-1bb1f392a9838684076b422840cf98eb"}}, +{"id":"linkscape","key":"linkscape","value":{"rev":"5-7272f50a54b1db015ce6d1e79eeedad7"}}, +{"id":"linkshare","key":"linkshare","value":{"rev":"3-634c4a18a217f77ccd6b89a9a2473d2a"}}, +{"id":"linode-api","key":"linode-api","value":{"rev":"13-2b43281ec86206312a2c387c9fc2c49f"}}, +{"id":"lint","key":"lint","value":{"rev":"49-fb76fddeb3ca609e5cac75fb0b0ec216"}}, +{"id":"linter","key":"linter","value":{"rev":"18-0fc884c96350f860cf2695f615572dba"}}, +{"id":"lintnode","key":"lintnode","value":{"rev":"8-b70bca986d7bde759521d0693dbc28b8"}}, +{"id":"linux-util","key":"linux-util","value":{"rev":"9-d049e8375e9c50b7f2b6268172d79734"}}, +{"id":"liquid","key":"liquid","value":{"rev":"3-353fa3c93ddf1951e3a75d60e6e8757b"}}, +{"id":"liquor","key":"liquor","value":{"rev":"3-4ee78e69a4a400a4de3491b0954947e7"}}, +{"id":"listener","key":"listener","value":{"rev":"5-02b5858d36aa99dcc5fc03c9274c94ee"}}, +{"id":"litmus","key":"litmus","value":{"rev":"9-7e403d052483301d025e9d09b4e7a9dd"}}, +{"id":"littering","key":"littering","value":{"rev":"5-9026438311ffc18d369bfa886c120bcd"}}, +{"id":"live-twitter-map","key":"live-twitter-map","value":{"rev":"3-45a40054bbab23374a4f1743c8bd711d"}}, +{"id":"livereload","key":"livereload","value":{"rev":"5-11ff486b4014ec1998705dbd396e96f2"}}, +{"id":"load","key":"load","value":{"rev":"7-2fff87aeb91d74bc57c134ee2cf0d65b"}}, +{"id":"loadbuilder","key":"loadbuilder","value":{"rev":"9-fa9c5cb13b3af03f9d9fbf5064fa0e0f"}}, +{"id":"loadit","key":"loadit","value":{"rev":"3-51bee062ed0d985757c6ae24929fa74e"}}, +{"id":"local-cdn","key":"local-cdn","value":{"rev":"9-9c2931766a559cf036318583455456e6"}}, +{"id":"localStorage","key":"localStorage","value":{"rev":"3-455fbe195db27131789b5d59db4504b0"}}, +{"id":"locales","key":"locales","value":{"rev":"5-bee452772e2070ec07af0dd86d6dbc41"}}, +{"id":"localhose","key":"localhose","value":{"rev":"9-3a2f63ecbed2e31400ca7515fd020a77"}}, +{"id":"localhost","key":"localhost","value":{"rev":"3-c6c4f6b5688cbe62865010099c9f461f"}}, +{"id":"localhostapp","key":"localhostapp","value":{"rev":"3-17884c4847c549e07e0c881fdf60d01f"}}, +{"id":"localize","key":"localize","value":{"rev":"7-1f83adb6d1eefcf7222a05f489b5db10"}}, +{"id":"location","key":"location","value":{"rev":"3-cc6fbf77b4ade80312bd95fde4e00015"}}, +{"id":"lockfile","key":"lockfile","value":{"rev":"3-4b4b79c2b0f09cc516db1a9d581c5038"}}, +{"id":"lode","key":"lode","value":{"rev":"15-5062a9a0863770d172097c5074a2bdae"}}, +{"id":"log","key":"log","value":{"rev":"12-0aa7922459ff8397764956c56a106930"}}, +{"id":"log-buddy","key":"log-buddy","value":{"rev":"3-64c6d4927d1d235d927f09c16c874e06"}}, +{"id":"log-watcher","key":"log-watcher","value":{"rev":"3-70f8727054c8e4104f835930578f4ee1"}}, +{"id":"log4js","key":"log4js","value":{"rev":"38-137b28e6e96515da7a6399cae86795dc"}}, +{"id":"log4js-amqp","key":"log4js-amqp","value":{"rev":"3-90530c28ef63d4598c12dfcf450929c0"}}, +{"id":"log5","key":"log5","value":{"rev":"17-920e3765dcfdc31bddf13de6895122b3"}}, +{"id":"logbot","key":"logbot","value":{"rev":"3-234eedc70b5474c713832e642f4dc3b4"}}, +{"id":"logger","key":"logger","value":{"rev":"3-5eef338fb5e845a81452fbb22e582aa7"}}, +{"id":"logging","key":"logging","value":{"rev":"22-99d320792c5445bd04699c4cf19edd89"}}, +{"id":"logging-system","key":"logging-system","value":{"rev":"5-5eda9d0b1d04256f5f44abe51cd14626"}}, +{"id":"loggly","key":"loggly","value":{"rev":"49-944a404e188327431a404e5713691a8c"}}, +{"id":"login","key":"login","value":{"rev":"44-7c450fe861230a5121ff294bcd6f97c9"}}, +{"id":"logly","key":"logly","value":{"rev":"7-832fe9af1cd8bfed84a065822cec398a"}}, +{"id":"logmagic","key":"logmagic","value":{"rev":"11-5d2c7dd32ba55e5ab85127be09723ef8"}}, +{"id":"logmonger","key":"logmonger","value":{"rev":"3-07a101d795f43f7af668210660274a7b"}}, +{"id":"lokki","key":"lokki","value":{"rev":"3-f6efcce38029ea0b4889707764088540"}}, +{"id":"long-stack-traces","key":"long-stack-traces","value":{"rev":"7-4b2fe23359b29e188cb2b8936b63891a"}}, +{"id":"loom","key":"loom","value":{"rev":"3-6348ab890611154da4881a0b351b0cb5"}}, +{"id":"loop","key":"loop","value":{"rev":"3-a56e9a6144f573092bb441106b370e0c"}}, +{"id":"looseleaf","key":"looseleaf","value":{"rev":"57-46ef6f055a40c34c714e3e9b9fe5d4cd"}}, +{"id":"lovely","key":"lovely","value":{"rev":"21-f577923512458f02f48ef59eebe55176"}}, +{"id":"lpd","key":"lpd","value":{"rev":"3-433711ae25002f67aa339380668fd491"}}, +{"id":"lpd-printers","key":"lpd-printers","value":{"rev":"3-47060e6c05fb4aad227d36f6e7941227"}}, +{"id":"lru-cache","key":"lru-cache","value":{"rev":"10-23c5e7423fe315745ef924f58c36e119"}}, +{"id":"ls-r","key":"ls-r","value":{"rev":"7-a769b11a06fae8ff439fe7eeb0806b5e"}}, +{"id":"lsof","key":"lsof","value":{"rev":"5-82aa3bcf23b8026a95e469b6188938f9"}}, +{"id":"ltx","key":"ltx","value":{"rev":"21-89ca85a9ce0c9fc13b20c0f1131168b0"}}, +{"id":"lucky-server","key":"lucky-server","value":{"rev":"3-a50d87239166f0ffc374368463f96b07"}}, +{"id":"lunapark","key":"lunapark","value":{"rev":"3-841d197f404da2e63d69b0c2132d87db"}}, +{"id":"lunchbot","key":"lunchbot","value":{"rev":"3-5d8984bef249e3d9e271560b5753f4cf"}}, +{"id":"lw-nun","key":"lw-nun","value":{"rev":"3-b686f89361b7b405e4581db6c60145ed"}}, +{"id":"lw-sass","key":"lw-sass","value":{"rev":"3-e46f90e0c8eab0c8c5d5eb8cf2a9a6da"}}, +{"id":"lwes","key":"lwes","value":{"rev":"3-939bb87efcbede1c1a70de881686fbce"}}, +{"id":"lwink","key":"lwink","value":{"rev":"3-1c432fafe4809e8d4a7e6214123ae452"}}, +{"id":"lzma","key":"lzma","value":{"rev":"3-31dc39414531e329b42b3a4ea0292c43"}}, +{"id":"m1node","key":"m1node","value":{"rev":"11-b34d55bdbc6f65b1814e77fab4a7e823"}}, +{"id":"m1test","key":"m1test","value":{"rev":"3-815ce56949e41e120082632629439eac"}}, +{"id":"m2node","key":"m2node","value":{"rev":"7-f50ec5578d995dd6a0a38e1049604bfc"}}, +{"id":"m2pdb","key":"m2pdb","value":{"rev":"3-ee798ac17c8c554484aceae2f77a826b"}}, +{"id":"m3u","key":"m3u","value":{"rev":"5-7ca6d768e0aed5b88dd45c943ca9ffa0"}}, +{"id":"mac","key":"mac","value":{"rev":"21-db5883c390108ff9ba46660c78b18b6c"}}, +{"id":"macchiato","key":"macchiato","value":{"rev":"5-0df1c87029e6005577fd8fd5cdb25947"}}, +{"id":"macgyver","key":"macgyver","value":{"rev":"3-f517699102b7bd696d8197d7ce57afb9"}}, +{"id":"macros","key":"macros","value":{"rev":"3-8356bcc0d1b1bd3879eeb880b2f3330b"}}, +{"id":"macrotest","key":"macrotest","value":{"rev":"10-2c6ceffb38f8ce5b0f382dbb02720d70"}}, +{"id":"maddy","key":"maddy","value":{"rev":"9-93d59c65c3f44aa6ed43dc986dd73ca5"}}, +{"id":"madmimi-node","key":"madmimi-node","value":{"rev":"11-257e1b1bd5ee5194a7052542952b8b7a"}}, +{"id":"maga","key":"maga","value":{"rev":"24-c69734f9fc138788db741b862f889583"}}, +{"id":"magic","key":"magic","value":{"rev":"34-aed787cc30ab86c95f547b9555d6a381"}}, +{"id":"magic-templates","key":"magic-templates","value":{"rev":"3-89546e9a038150cf419b4b15a84fd2aa"}}, +{"id":"magickal","key":"magickal","value":{"rev":"3-e9ed74bb90df0a52564d47aed0451ce7"}}, +{"id":"mai","key":"mai","value":{"rev":"5-f3561fe6de2bd25201250ddb6dcf9f01"}}, +{"id":"mail","key":"mail","value":{"rev":"14-9ae558552e6a7c11017f118a71c072e9"}}, +{"id":"mail-stack","key":"mail-stack","value":{"rev":"5-c82567203540076cf4878ea1ab197b52"}}, +{"id":"mailbox","key":"mailbox","value":{"rev":"12-0b582e127dd7cf669de16ec36f8056a4"}}, +{"id":"mailchimp","key":"mailchimp","value":{"rev":"23-3d9328ee938b7940322351254ea54877"}}, +{"id":"mailer","key":"mailer","value":{"rev":"40-7b251b758f9dba4667a3127195ea0380"}}, +{"id":"mailer-bal","key":"mailer-bal","value":{"rev":"3-fc8265b1905ea37638309d7c10852050"}}, +{"id":"mailer-fixed","key":"mailer-fixed","value":{"rev":"13-3004df43c62eb64ed5fb0306b019fe66"}}, +{"id":"mailgun","key":"mailgun","value":{"rev":"25-29de1adb355636822dc21fef51f37aed"}}, +{"id":"mailparser","key":"mailparser","value":{"rev":"14-7142e4168046418afc4a76d1b330f302"}}, +{"id":"mailto-parser","key":"mailto-parser","value":{"rev":"3-f8dea7b60c0e993211f81a86dcf5b18d"}}, +{"id":"makeerror","key":"makeerror","value":{"rev":"17-ceb9789357d80467c9ae75caa64ca8ac"}}, +{"id":"malt","key":"malt","value":{"rev":"7-e5e76a842eb0764a5ebe57290b629097"}}, +{"id":"mango","key":"mango","value":{"rev":"7-6224e74a3132e54f294f62998ed9127f"}}, +{"id":"map-reduce","key":"map-reduce","value":{"rev":"11-a81d8bdc6dae7e7b76d5df74fff40ae1"}}, +{"id":"mapnik","key":"mapnik","value":{"rev":"64-693f5b957b7faf361c2cc2a22747ebf7"}}, +{"id":"maptail","key":"maptail","value":{"rev":"14-8334618ddc20006a5f77ff35b172c152"}}, +{"id":"marak","key":"marak","value":{"rev":"3-27be187af00fc97501035dfb97a11ecf"}}, +{"id":"markdoc","key":"markdoc","value":{"rev":"13-23becdeda44b26ee54c9aaa31457e4ba"}}, +{"id":"markdom","key":"markdom","value":{"rev":"10-3c0df12e4f4a2e675d0f0fde48aa425f"}}, +{"id":"markdown","key":"markdown","value":{"rev":"19-88e02c28ce0179be900bf9e6aadc070f"}}, +{"id":"markdown-js","key":"markdown-js","value":{"rev":"6-964647c2509850358f70f4e23670fbeb"}}, +{"id":"markdown-wiki","key":"markdown-wiki","value":{"rev":"6-ce35fb0612a463db5852c5d3dcc7fdd3"}}, +{"id":"markdown2html","key":"markdown2html","value":{"rev":"3-549babe5d9497785fa8b9305c81d7214"}}, +{"id":"marked","key":"marked","value":{"rev":"21-9371df65f63131c9f24e8805db99a7d9"}}, +{"id":"markov","key":"markov","value":{"rev":"13-9ab795448c54ef87851f1392d6f3671a"}}, +{"id":"maryjane","key":"maryjane","value":{"rev":"3-e2e6cce443850b5df1554bf851d16760"}}, +{"id":"massagist","key":"massagist","value":{"rev":"11-cac3a103aecb4ff3f0f607aca2b1d3fb"}}, +{"id":"masson","key":"masson","value":{"rev":"10-87a5e6fd05bd4b8697fa3fa636238c20"}}, +{"id":"masstransit","key":"masstransit","value":{"rev":"11-74898c746e541ff1a00438017ee66d4a"}}, +{"id":"matchmaker","key":"matchmaker","value":{"rev":"3-192db6fb162bdf84fa3e858092fd3e20"}}, +{"id":"math","key":"math","value":{"rev":"5-16a74d8639e44a5ccb265ab1a3b7703b"}}, +{"id":"math-lexer","key":"math-lexer","value":{"rev":"19-54b42374b0090eeee50f39cb35f2eb40"}}, +{"id":"matrices","key":"matrices","value":{"rev":"43-06d64271a5148f89d649645712f8971f"}}, +{"id":"matrix","key":"matrix","value":{"rev":"3-77cff57242445cf3d76313b72bbc38f4"}}, +{"id":"matrixlib","key":"matrixlib","value":{"rev":"11-b3c105a5e5be1835183e7965d04825d9"}}, +{"id":"matterhorn","key":"matterhorn","value":{"rev":"9-a310dba2ea054bdce65e6df2f6ae85e5"}}, +{"id":"matterhorn-dust","key":"matterhorn-dust","value":{"rev":"3-2fb311986d62cf9f180aa76038ebf7b3"}}, +{"id":"matterhorn-gui","key":"matterhorn-gui","value":{"rev":"3-7921b46c9bff3ee82e4b32bc0a0a977d"}}, +{"id":"matterhorn-prng","key":"matterhorn-prng","value":{"rev":"3-c33fd59c1f1d24fb423553ec242e444b"}}, +{"id":"matterhorn-standard","key":"matterhorn-standard","value":{"rev":"13-0aaab6ecf55cdad6f773736da968afba"}}, +{"id":"matterhorn-state","key":"matterhorn-state","value":{"rev":"3-0ba8fd8a4c644b18aff34f1aef95db33"}}, +{"id":"matterhorn-user","key":"matterhorn-user","value":{"rev":"17-e42dc37a5cb24710803b3bd8dee7484d"}}, +{"id":"matterhorn-view","key":"matterhorn-view","value":{"rev":"3-b39042d665f5912d02e724d33d129a97"}}, +{"id":"mbtiles","key":"mbtiles","value":{"rev":"41-b92035d0ec8f47850734c4bb995baf7d"}}, +{"id":"mcast","key":"mcast","value":{"rev":"8-559b2b09cfa34cb88c16ae72ec90d28a"}}, +{"id":"md5","key":"md5","value":{"rev":"3-43d600c70f6442d3878c447585bf43bf"}}, +{"id":"mdgram","key":"mdgram","value":{"rev":"15-4d65cf0d5edef976de9a612c0cde0907"}}, +{"id":"mdns","key":"mdns","value":{"rev":"11-8b6789c3779fce7f019f9f10c625147a"}}, +{"id":"mecab-binding","key":"mecab-binding","value":{"rev":"3-3395763d23a3f8e3e00ba75cb988f9b4"}}, +{"id":"mechanize","key":"mechanize","value":{"rev":"5-94b72f43e270aa24c00e283fa52ba398"}}, +{"id":"mediatags","key":"mediatags","value":{"rev":"3-d5ea41e140fbbc821590cfefdbd016a5"}}, +{"id":"mediator","key":"mediator","value":{"rev":"3-42aac2225b47f72f97001107a3d242f5"}}, +{"id":"memcache","key":"memcache","value":{"rev":"5-aebcc4babe11b654afd3cede51e945ec"}}, +{"id":"memcached","key":"memcached","value":{"rev":"9-7c46464425c78681a8e6767ef9993c4c"}}, +{"id":"memcouchd","key":"memcouchd","value":{"rev":"3-b57b9fb4f6c60604f616c2f70456b4d6"}}, +{"id":"meme","key":"meme","value":{"rev":"11-53fcb51e1d8f8908b95f0fa12788e9aa"}}, +{"id":"memo","key":"memo","value":{"rev":"9-3a9ca97227ed19cacdacf10ed193ee8b"}}, +{"id":"memoize","key":"memoize","value":{"rev":"15-44bdd127c49035c8bd781a9299c103c2"}}, +{"id":"memoizer","key":"memoizer","value":{"rev":"9-d9a147e8c8a58fd7e8f139dc902592a6"}}, +{"id":"memorystream","key":"memorystream","value":{"rev":"9-6d0656067790e158f3c4628968ed70d3"}}, +{"id":"memstore","key":"memstore","value":{"rev":"5-03dcac59882c8a434e4c2fe2ac354941"}}, +{"id":"mercury","key":"mercury","value":{"rev":"3-147af865af6f7924f44f14f4b5c14dac"}}, +{"id":"mersenne","key":"mersenne","value":{"rev":"7-d8ae550eb8d0deaa1fd60f86351cb548"}}, +{"id":"meryl","key":"meryl","value":{"rev":"23-2c0e3fad99005109c584530e303bc5bf"}}, +{"id":"mesh","key":"mesh","value":{"rev":"5-f3ea4aef5b3f169eab8b518e5044c950"}}, +{"id":"meta-promise","key":"meta-promise","value":{"rev":"5-0badf85ab432341e6256252463468b89"}}, +{"id":"meta-test","key":"meta-test","value":{"rev":"49-92df2922499960ac750ce96d861ddd7e"}}, +{"id":"meta_code","key":"meta_code","value":{"rev":"7-9b4313c0c52a09c788464f1fea05baf7"}}, +{"id":"metamanager","key":"metamanager","value":{"rev":"5-dbb0312dad15416d540eb3d860fbf205"}}, +{"id":"metaweblog","key":"metaweblog","value":{"rev":"3-d3ab090ec27242e220412d6413e388ee"}}, +{"id":"metric","key":"metric","value":{"rev":"3-8a706db5b518421ad640a75e65cb4be9"}}, +{"id":"metrics","key":"metrics","value":{"rev":"13-62e5627c1ca5e6d3b3bde8d17e675298"}}, +{"id":"metrics-broker","key":"metrics-broker","value":{"rev":"15-0fdf57ea4ec84aa1f905f53b4975e72d"}}, +{"id":"mhash","key":"mhash","value":{"rev":"3-f00d65dc939474a5c508d37a327e5074"}}, +{"id":"micro","key":"micro","value":{"rev":"17-882c0ecf34ddaef5c673c547ae80b80b"}}, +{"id":"microcache","key":"microcache","value":{"rev":"3-ef75e04bc6e86d14f93ad9c429503bd9"}}, +{"id":"microevent","key":"microevent","value":{"rev":"3-9c0369289b62873ef6e8624eef724d15"}}, +{"id":"microtest","key":"microtest","value":{"rev":"11-11afdadfb15c1db030768ce52f34de1a"}}, +{"id":"microtime","key":"microtime","value":{"rev":"20-5f75e87316cbb5f7a4be09142cd755e5"}}, +{"id":"middlefiddle","key":"middlefiddle","value":{"rev":"13-bb94c05d75c24bdeb23a4637c7ecf55e"}}, +{"id":"middleware","key":"middleware","value":{"rev":"5-80937a4c620fcc2a5532bf064ec0837b"}}, +{"id":"midi","key":"midi","value":{"rev":"9-96da6599a84a761430adfd41deb3969a"}}, +{"id":"midi-js","key":"midi-js","value":{"rev":"11-1d174af1352e3d37f6ec0df32d56ce1a"}}, +{"id":"migrate","key":"migrate","value":{"rev":"13-7493879fb60a31b9e2a9ad19e94bfef6"}}, +{"id":"mikronode","key":"mikronode","value":{"rev":"31-1edae4ffbdb74c43ea584a7757dacc9b"}}, +{"id":"milk","key":"milk","value":{"rev":"21-81fb117817ed2e4c19e16dc310c09735"}}, +{"id":"millstone","key":"millstone","value":{"rev":"29-73d54de4b4de313b0fec4edfaec741a4"}}, +{"id":"mime","key":"mime","value":{"rev":"33-de72b641474458cb21006dea6a524ceb"}}, +{"id":"mime-magic","key":"mime-magic","value":{"rev":"13-2df6b966d7f29d5ee2dd2e1028d825b1"}}, +{"id":"mimelib","key":"mimelib","value":{"rev":"9-7994cf0fe3007329b9397f4e08481487"}}, +{"id":"mimelib-noiconv","key":"mimelib-noiconv","value":{"rev":"5-c84995d4b2bbe786080c9b54227b5bb4"}}, +{"id":"mimeograph","key":"mimeograph","value":{"rev":"37-bead083230f48f354f3ccac35e11afc0"}}, +{"id":"mimeparse","key":"mimeparse","value":{"rev":"8-5ca7e6702fe7f1f37ed31b05e82f4a87"}}, +{"id":"mingy","key":"mingy","value":{"rev":"19-09b19690c55abc1e940374e25e9a0d26"}}, +{"id":"mini-lzo-wrapper","key":"mini-lzo-wrapper","value":{"rev":"4-d751d61f481363a2786ac0312893dfca"}}, +{"id":"miniee","key":"miniee","value":{"rev":"5-be0833a9f15382695f861a990f3d6108"}}, +{"id":"minifyjs","key":"minifyjs","value":{"rev":"13-f255df8c7567440bc4c0f8eaf04a18c6"}}, +{"id":"minimal","key":"minimal","value":{"rev":"5-6be6b3454d30c59a30f9ee8af0ee606c"}}, +{"id":"minimal-test","key":"minimal-test","value":{"rev":"15-65dca2c1ee27090264577cc8b93983cb"}}, +{"id":"minimatch","key":"minimatch","value":{"rev":"11-449e570c76f4e6015c3dc90f080f8c47"}}, +{"id":"minirpc","key":"minirpc","value":{"rev":"10-e85b92273a97fa86e20faef7a3b50518"}}, +{"id":"ministore","key":"ministore","value":{"rev":"11-f131868141ccd0851bb91800c86dfff1"}}, +{"id":"minitest","key":"minitest","value":{"rev":"13-c92e32499a25ff2d7e484fbbcabe1081"}}, +{"id":"miniweb","key":"miniweb","value":{"rev":"3-e8c413a77e24891138eaa9e73cb08715"}}, +{"id":"minj","key":"minj","value":{"rev":"9-ccf50caf8e38b0fc2508f01a63f80510"}}, +{"id":"minotaur","key":"minotaur","value":{"rev":"29-6d048956b26e8a213f6ccc96027bacde"}}, +{"id":"mirror","key":"mirror","value":{"rev":"21-01bdd78ff03ca3f8f99fce104baab9f9"}}, +{"id":"misao-chan","key":"misao-chan","value":{"rev":"13-f032690f0897fc4a1dc12f1e03926627"}}, +{"id":"mite.node","key":"mite.node","value":{"rev":"13-0bfb15c4a6f172991756660b29869dd4"}}, +{"id":"mixable","key":"mixable","value":{"rev":"3-bc518ab862a6ceacc48952b9bec7d61a"}}, +{"id":"mixin","key":"mixin","value":{"rev":"3-3a7ae89345d21ceaf545d93b20caf2f2"}}, +{"id":"mixinjs","key":"mixinjs","value":{"rev":"3-064173d86b243316ef1b6c5743a60bf9"}}, +{"id":"mixpanel","key":"mixpanel","value":{"rev":"7-f742248bfbfc480658c4c46f7ab7a74a"}}, +{"id":"mixpanel-api","key":"mixpanel-api","value":{"rev":"5-61a3fa28921887344d1af339917e147a"}}, +{"id":"mixpanel_api","key":"mixpanel_api","value":{"rev":"3-11939b6fd20b80bf9537380875bf3996"}}, +{"id":"mjoe","key":"mjoe","value":{"rev":"3-8b3549cd6edcc03112217370b071b076"}}, +{"id":"mjsunit.runner","key":"mjsunit.runner","value":{"rev":"12-94c779b555069ca5fb0bc9688515673e"}}, +{"id":"mkdir","key":"mkdir","value":{"rev":"3-e8fd61b35638f1f3a65d36f09344ff28"}}, +{"id":"mkdirp","key":"mkdirp","value":{"rev":"15-c8eacf17b336ea98d1d9960f02362cbf"}}, +{"id":"mmap","key":"mmap","value":{"rev":"16-df335eb3257dfbd2fb0de341970d2656"}}, +{"id":"mmikulicic-thrift","key":"mmikulicic-thrift","value":{"rev":"3-f4a9f7a97bf50e966d1184fba423a07f"}}, +{"id":"mmmodel","key":"mmmodel","value":{"rev":"7-00d61723742a325aaaa6955ba52cef60"}}, +{"id":"mmodel","key":"mmodel","value":{"rev":"3-717309af27d6c5d98ed188c9c9438a37"}}, +{"id":"mmseg","key":"mmseg","value":{"rev":"17-794d553e67d6023ca3d58dd99fe1da15"}}, +{"id":"mobilize","key":"mobilize","value":{"rev":"25-8a657ec0accf8db2e8d7b935931ab77b"}}, +{"id":"mock","key":"mock","value":{"rev":"3-d8805bff4796462750071cddd3f75ea7"}}, +{"id":"mock-request","key":"mock-request","value":{"rev":"7-4ac4814c23f0899b1100d5f0617e40f4"}}, +{"id":"mock-request-response","key":"mock-request-response","value":{"rev":"5-fe1566c9881039a92a80e0e82a95f096"}}, +{"id":"mocket","key":"mocket","value":{"rev":"13-9001879cd3cb6f52f3b2d85fb14b8f9b"}}, +{"id":"modbus-stack","key":"modbus-stack","value":{"rev":"7-50c56e74d9cb02c5d936b0b44c54f621"}}, +{"id":"model","key":"model","value":{"rev":"3-174181c2f314f35fc289b7a921ba4d39"}}, +{"id":"models","key":"models","value":{"rev":"8-6cc2748edfd96679f9bb3596864874a9"}}, +{"id":"modestmaps","key":"modestmaps","value":{"rev":"8-79265968137a2327f98bfc6943a84da9"}}, +{"id":"modjewel","key":"modjewel","value":{"rev":"3-73efc7b9dc24d82cab1de249896193fd"}}, +{"id":"modlr","key":"modlr","value":{"rev":"17-ccf16db98ab6ccb95e005b3bb76dba64"}}, +{"id":"module-grapher","key":"module-grapher","value":{"rev":"19-b6ba30b41e29fc01d4b679a643f030e5"}}, +{"id":"modulr","key":"modulr","value":{"rev":"15-8e8ffd75c6c6149206de4ce0c2aefad7"}}, +{"id":"mogile","key":"mogile","value":{"rev":"5-79a8af20dbe6bff166ac2197a3998b0c"}}, +{"id":"mojo","key":"mojo","value":{"rev":"25-1d9c26d6afd6ea77253f220d86d60307"}}, +{"id":"monad","key":"monad","value":{"rev":"10-cf20354900b7e67d94c342feb06a1eb9"}}, +{"id":"mongeese","key":"mongeese","value":{"rev":"3-f4b319d98f9f73fb17cd3ebc7fc86412"}}, +{"id":"mongo-pool","key":"mongo-pool","value":{"rev":"3-215481828e69fd874b5938a79a7e0934"}}, +{"id":"mongodb","key":"mongodb","value":{"rev":"147-3dc09965e762787f34131a8739297383"}}, +{"id":"mongodb-async","key":"mongodb-async","value":{"rev":"7-ba9097bdc86b72885fa5a9ebb49a64d0"}}, +{"id":"mongodb-provider","key":"mongodb-provider","value":{"rev":"5-5523643b403e969e0b80c57db08cb9d3"}}, +{"id":"mongodb-rest","key":"mongodb-rest","value":{"rev":"36-60b4abc4a22f31de09407cc7cdd0834f"}}, +{"id":"mongodb-wrapper","key":"mongodb-wrapper","value":{"rev":"13-7a6c5eaff36ede45211aa80f3a506cfe"}}, +{"id":"mongodb_heroku","key":"mongodb_heroku","value":{"rev":"3-05947c1e06e1f8860c7809b063a8d1a0"}}, +{"id":"mongode","key":"mongode","value":{"rev":"11-faa14f050da4a165e2568d413a6b8bc0"}}, +{"id":"mongojs","key":"mongojs","value":{"rev":"26-a628eb51534ffcdd97c1a940d460a52c"}}, +{"id":"mongolia","key":"mongolia","value":{"rev":"76-711c39de0e152e224d4118c9b0de834f"}}, +{"id":"mongolian","key":"mongolian","value":{"rev":"44-3773671b31c406a18cb9f5a1764ebee4"}}, +{"id":"mongoose","key":"mongoose","value":{"rev":"181-03a8aa7f691cbd987995bf6e3354e0f5"}}, +{"id":"mongoose-admin","key":"mongoose-admin","value":{"rev":"7-59078ad5a345e9e66574346d3e70f9ad"}}, +{"id":"mongoose-auth","key":"mongoose-auth","value":{"rev":"49-87c79f3a6164c438a53b7629be87ae5d"}}, +{"id":"mongoose-autoincr","key":"mongoose-autoincr","value":{"rev":"3-9c4dd7c3fdcd8621166665a68fccb602"}}, +{"id":"mongoose-closures","key":"mongoose-closures","value":{"rev":"3-2ff9cff790f387f2236a2c7382ebb55b"}}, +{"id":"mongoose-crypt","key":"mongoose-crypt","value":{"rev":"3-d77ffbf250e39fcc290ad37824fe2236"}}, +{"id":"mongoose-dbref","key":"mongoose-dbref","value":{"rev":"29-02090b9904fd6f5ce72afcfa729f7c96"}}, +{"id":"mongoose-flatmatcher","key":"mongoose-flatmatcher","value":{"rev":"5-4f0565901e8b588cc562ae457ad975a6"}}, +{"id":"mongoose-helpers","key":"mongoose-helpers","value":{"rev":"3-3a57e9819e24c9b0f5b5eabe41037092"}}, +{"id":"mongoose-joins","key":"mongoose-joins","value":{"rev":"3-9bae444730a329473421f50cba1c86a7"}}, +{"id":"mongoose-misc","key":"mongoose-misc","value":{"rev":"3-bcd7f3f450cf6ed233d042ac574409ce"}}, +{"id":"mongoose-relationships","key":"mongoose-relationships","value":{"rev":"9-6155a276b162ec6593b8542f0f769024"}}, +{"id":"mongoose-rest","key":"mongoose-rest","value":{"rev":"29-054330c035adf842ab34423215995113"}}, +{"id":"mongoose-spatial","key":"mongoose-spatial","value":{"rev":"3-88660dabd485edcaa29a2ea01afb90bd"}}, +{"id":"mongoose-temporal","key":"mongoose-temporal","value":{"rev":"3-1dd736395fe9be95498e588df502b7bb"}}, +{"id":"mongoose-types","key":"mongoose-types","value":{"rev":"13-8126458b91ef1bf46e582042f5dbd015"}}, +{"id":"mongoose-units","key":"mongoose-units","value":{"rev":"3-5fcdb7aedb1d5cff6e18ee1352c3d0f7"}}, +{"id":"mongoq","key":"mongoq","value":{"rev":"11-2060d674d5f8a964e800ed4470b92587"}}, +{"id":"mongoskin","key":"mongoskin","value":{"rev":"13-5a7bfacd9e9b95ec469f389751e7e435"}}, +{"id":"mongous","key":"mongous","value":{"rev":"3-4d98b4a4bfdd6d9f46342002a69d8d3a"}}, +{"id":"mongrel2","key":"mongrel2","value":{"rev":"3-93156356e478f30fc32455054e384b80"}}, +{"id":"monguava","key":"monguava","value":{"rev":"9-69ec50128220aba3e16128a4be2799c0"}}, +{"id":"mongueue","key":"mongueue","value":{"rev":"9-fc8d9df5bf15f5a25f68cf58866f11fe"}}, +{"id":"moniker","key":"moniker","value":{"rev":"5-a139616b725ddfdd1db6a376fb6584f7"}}, +{"id":"monitor","key":"monitor","value":{"rev":"56-44d2b8b7dec04b3f320f7dc4a1704c53"}}, +{"id":"monome","key":"monome","value":{"rev":"3-2776736715cbfc045bf7b42e70ccda9c"}}, +{"id":"monomi","key":"monomi","value":{"rev":"6-b6b745441f157cc40c846d23cd14297a"}}, +{"id":"moof","key":"moof","value":{"rev":"13-822b4ebf873b720bd4c7e16fcbbbbb3d"}}, +{"id":"moonshado","key":"moonshado","value":{"rev":"3-b54de1aef733c8fa118fa7cf6af2fb9b"}}, +{"id":"moose","key":"moose","value":{"rev":"5-e11c8b7c09826e3431ed3408ee874779"}}, +{"id":"mootools","key":"mootools","value":{"rev":"9-39f5535072748ccd3cf0212ef4c3d4fa"}}, +{"id":"mootools-array","key":"mootools-array","value":{"rev":"3-d1354704a9fe922d969c2bf718e0dc53"}}, +{"id":"mootools-browser","key":"mootools-browser","value":{"rev":"3-ce0946b357b6ddecc128febef2c5d720"}}, +{"id":"mootools-class","key":"mootools-class","value":{"rev":"3-0ea815d28b61f3880087e3f4b8668354"}}, +{"id":"mootools-class-extras","key":"mootools-class-extras","value":{"rev":"3-575796745bd169c35f4fc0019bb36b76"}}, +{"id":"mootools-client","key":"mootools-client","value":{"rev":"3-b658c331f629f80bfe17c3e6ed44c525"}}, +{"id":"mootools-cookie","key":"mootools-cookie","value":{"rev":"3-af93588531e5a52c76a8e7a4eac3612a"}}, +{"id":"mootools-core","key":"mootools-core","value":{"rev":"3-01b1678fc56d94d29566b7853ad56059"}}, +{"id":"mootools-domready","key":"mootools-domready","value":{"rev":"3-0fc6620e2c8f7d107816cace9c099633"}}, +{"id":"mootools-element","key":"mootools-element","value":{"rev":"3-bac857c1701c91207d1ec6d1eb002d07"}}, +{"id":"mootools-element-dimensions","key":"mootools-element-dimensions","value":{"rev":"3-d82df62b3e97122ad0a7668efb7ba776"}}, +{"id":"mootools-element-event","key":"mootools-element-event","value":{"rev":"3-a30380151989ca31851cf751fcd55e9a"}}, +{"id":"mootools-element-style","key":"mootools-element-style","value":{"rev":"3-6103fa8551a21dc592e410dc7df647f8"}}, +{"id":"mootools-event","key":"mootools-event","value":{"rev":"3-7327279ec157de8c47f3ee24615ead95"}}, +{"id":"mootools-function","key":"mootools-function","value":{"rev":"3-eb3ee17acf40d6cc05463cb88edc6f5e"}}, +{"id":"mootools-fx","key":"mootools-fx","value":{"rev":"3-757ab6c8423e8c434d1ee783ea28cdb5"}}, +{"id":"mootools-fx-css","key":"mootools-fx-css","value":{"rev":"3-8eb0cf468c826b9c485835fab94837e7"}}, +{"id":"mootools-fx-morph","key":"mootools-fx-morph","value":{"rev":"3-b91310f8a81221592970fe7632bd9f7a"}}, +{"id":"mootools-fx-transitions","key":"mootools-fx-transitions","value":{"rev":"3-a1ecde35dfbb80f3a6062005758bb934"}}, +{"id":"mootools-fx-tween","key":"mootools-fx-tween","value":{"rev":"3-39497defbffdf463932cc9f00cde8d5d"}}, +{"id":"mootools-json","key":"mootools-json","value":{"rev":"3-69deb6679a5d1d49f22e19834ae07c32"}}, +{"id":"mootools-more","key":"mootools-more","value":{"rev":"3-d8f46ce319ca0e3deb5fc04ad5f73cb9"}}, +{"id":"mootools-number","key":"mootools-number","value":{"rev":"3-9f4494883ac39f93734fea9af6ef2fc5"}}, +{"id":"mootools-object","key":"mootools-object","value":{"rev":"3-c9632dfa793ab4d9ad4b68a2e27f09fc"}}, +{"id":"mootools-request","key":"mootools-request","value":{"rev":"3-663e5472f351eea3b7488ee441bc6a61"}}, +{"id":"mootools-request-html","key":"mootools-request-html","value":{"rev":"3-0ab9576c11a564d44b3c3ca3ef3dc240"}}, +{"id":"mootools-request-json","key":"mootools-request-json","value":{"rev":"3-c0359201c94ba1684ea6336e35cd70c2"}}, +{"id":"mootools-server","key":"mootools-server","value":{"rev":"3-98e89499f6eab137bbab053a3932a526"}}, +{"id":"mootools-slick-finder","key":"mootools-slick-finder","value":{"rev":"3-9a5820e90d6ea2d797268f3c60a9f177"}}, +{"id":"mootools-slick-parser","key":"mootools-slick-parser","value":{"rev":"3-d4e6b1673e6e2a6bcc66bf4988b2994d"}}, +{"id":"mootools-string","key":"mootools-string","value":{"rev":"3-2fda1c7915295df62e547018a7f05916"}}, +{"id":"mootools-swiff","key":"mootools-swiff","value":{"rev":"3-f0edeead85f3d48cf2af2ca35a4e67a5"}}, +{"id":"mootools.js","key":"mootools.js","value":{"rev":"3-085e50e3529d19e1d6ad630027ba51dc"}}, +{"id":"morestreams","key":"morestreams","value":{"rev":"7-3d0145c2cfb9429dfdcfa872998c9fe8"}}, +{"id":"morpheus","key":"morpheus","value":{"rev":"45-04335640f709335d1828523425a87909"}}, +{"id":"morton","key":"morton","value":{"rev":"11-abd787350e21bef65c1c6776e40a0753"}}, +{"id":"mothermayi","key":"mothermayi","value":{"rev":"5-2c46f9873efd19f543def5eeda0a05f1"}}, +{"id":"mountable-proxy","key":"mountable-proxy","value":{"rev":"7-3b91bd0707447885676727ad183bb051"}}, +{"id":"move","key":"move","value":{"rev":"69-ce11c235c78de6d6184a86aaa93769eb"}}, +{"id":"moviesearch","key":"moviesearch","value":{"rev":"3-72e77965a44264dfdd5af23e4a36d2ce"}}, +{"id":"mp","key":"mp","value":{"rev":"3-47899fb2bdaf21dda16abd037b325c3b"}}, +{"id":"mpdsocket","key":"mpdsocket","value":{"rev":"3-2dd4c9bb019f3f491c55364be7a56229"}}, +{"id":"mrcolor","key":"mrcolor","value":{"rev":"3-4695b11798a65c61714b8f236a40936c"}}, +{"id":"msgbus","key":"msgbus","value":{"rev":"27-a5d861b55c933842226d4e536820ec99"}}, +{"id":"msgme","key":"msgme","value":{"rev":"3-d1968af1234a2059eb3d84eb76cdaa4e"}}, +{"id":"msgpack","key":"msgpack","value":{"rev":"9-ecf7469392d87460ddebef2dd369b0e5"}}, +{"id":"msgpack-0.4","key":"msgpack-0.4","value":{"rev":"3-5d509ddba6c53ed6b8dfe4afb1d1661d"}}, +{"id":"msgpack2","key":"msgpack2","value":{"rev":"4-63b8f3ccf35498eb5c8bd9b8d683179b"}}, +{"id":"mu","key":"mu","value":{"rev":"7-7a8ce1cba5d6d98e696c4e633aa081fa"}}, +{"id":"mu2","key":"mu2","value":{"rev":"3-4ade1c5b1496c720312beae1822da9de"}}, +{"id":"mud","key":"mud","value":{"rev":"66-56e1b1a1e5af14c3df0520c58358e7cd"}}, +{"id":"muffin","key":"muffin","value":{"rev":"22-210c45a888fe1f095becdcf11876a2bc"}}, +{"id":"multi-node","key":"multi-node","value":{"rev":"1-224161d875f0e1cbf4b1e249603c670a"}}, +{"id":"multicast-eventemitter","key":"multicast-eventemitter","value":{"rev":"13-ede3e677d6e21bbfe42aad1b549a137c"}}, +{"id":"multimeter","key":"multimeter","value":{"rev":"7-847f45a6f592a8410a77d3e5efb5cbf3"}}, +{"id":"multipart-stack","key":"multipart-stack","value":{"rev":"9-85aaa2ed2180d3124d1dcd346955b672"}}, +{"id":"muse","key":"muse","value":{"rev":"3-d6bbc06df2e359d6ef285f9da2bd0efd"}}, +{"id":"musicmetadata","key":"musicmetadata","value":{"rev":"21-957bf986aa9d0db02175ea1d79293909"}}, +{"id":"mustache","key":"mustache","value":{"rev":"6-7f8458f2b52de5b37004b105c0f39e62"}}, +{"id":"mustachio","key":"mustachio","value":{"rev":"9-6ed3f41613f886128acd18b73b55439f"}}, +{"id":"mutex","key":"mutex","value":{"rev":"3-de95bdff3dd00271361067b5d70ea03b"}}, +{"id":"muzak","key":"muzak","value":{"rev":"9-5ff968ffadebe957b72a8b77b538b71c"}}, +{"id":"mvc","key":"mvc","value":{"rev":"52-7c954b6c3b90b1b734d8e8c3d2d34f5e"}}, +{"id":"mvc.coffee","key":"mvc.coffee","value":{"rev":"3-f203564ed70c0284455e7f96ea61fdb7"}}, +{"id":"mypackage","key":"mypackage","value":{"rev":"3-49cc95fb2e5ac8ee3dbbab1de451c0d1"}}, +{"id":"mypakege","key":"mypakege","value":{"rev":"3-e74d7dc2c2518304ff1700cf295eb823"}}, +{"id":"myrtle-parser","key":"myrtle-parser","value":{"rev":"3-9089c1a2f3c3a24f0bce3941bc1d534d"}}, +{"id":"mysql","key":"mysql","value":{"rev":"30-a8dc68eb056cb6f69fae2423c1337474"}}, +{"id":"mysql-activerecord","key":"mysql-activerecord","value":{"rev":"17-9d21d0b10a5c84f6cacfd8d2236f9887"}}, +{"id":"mysql-client","key":"mysql-client","value":{"rev":"5-cc877218864c319d17f179e49bf58c99"}}, +{"id":"mysql-helper","key":"mysql-helper","value":{"rev":"3-c6f3b9f00cd9fee675aa2a9942cc336a"}}, +{"id":"mysql-libmysqlclient","key":"mysql-libmysqlclient","value":{"rev":"38-51c08e24257b99bf5591232016ada8ab"}}, +{"id":"mysql-native","key":"mysql-native","value":{"rev":"12-0592fbf66c55e6e9db6a75c97be088c3"}}, +{"id":"mysql-native-prerelease","key":"mysql-native-prerelease","value":{"rev":"7-b1a6f3fc41f6c152f3b178e13f91b5c4"}}, +{"id":"mysql-oil","key":"mysql-oil","value":{"rev":"9-70c07b9c552ff592be8ca89ea6efa408"}}, +{"id":"mysql-pool","key":"mysql-pool","value":{"rev":"15-41f510c45174b6c887856120ce3d5a3b"}}, +{"id":"mysql-simple","key":"mysql-simple","value":{"rev":"13-7ee13f035e8ebcbc27f6fe910058aee9"}}, +{"id":"n","key":"n","value":{"rev":"31-bfaed5022beae2177a090c4c8fce82a4"}}, +{"id":"n-ext","key":"n-ext","value":{"rev":"3-5ad67a300f8e88ef1dd58983c9061bc1"}}, +{"id":"n-pubsub","key":"n-pubsub","value":{"rev":"3-af990bcbf9f94554365788b81715d3b4"}}, +{"id":"n-rest","key":"n-rest","value":{"rev":"7-42f1d92f9229f126a1b063ca27bfc85b"}}, +{"id":"n-util","key":"n-util","value":{"rev":"6-d0c59c7412408bc94e20de4d22396d79"}}, +{"id":"nMemcached","key":"nMemcached","value":{"rev":"3-be350fd46624a1cac0052231101e0594"}}, +{"id":"nStoreSession","key":"nStoreSession","value":{"rev":"3-a3452cddd2b9ff8edb6d46999fa5b0eb"}}, +{"id":"nTPL","key":"nTPL","value":{"rev":"41-16a54848286364d894906333b0c1bb2c"}}, +{"id":"nTunes","key":"nTunes","value":{"rev":"18-76bc566a504100507056316fe8d3cc35"}}, +{"id":"nabe","key":"nabe","value":{"rev":"13-dc93f35018e84a23ace4d5114fa1bb28"}}, +{"id":"nack","key":"nack","value":{"rev":"118-f629c8c208c76fa0c2ce66d21f927ee4"}}, +{"id":"nagari","key":"nagari","value":{"rev":"11-cb200690c6d606d8597178e492b54cde"}}, +{"id":"nailplate","key":"nailplate","value":{"rev":"11-e1532c42d9d83fc32942dec0b87df587"}}, +{"id":"nails","key":"nails","value":{"rev":"12-f472bf005c4a4c2b49fb0118b109bef1"}}, +{"id":"nake","key":"nake","value":{"rev":"11-250933df55fbe7bb19e34a84ed23ca3e"}}, +{"id":"named-routes","key":"named-routes","value":{"rev":"6-ffbdd4caa74a30e87aa6dbb36f2b967c"}}, +{"id":"namespace","key":"namespace","value":{"rev":"7-89e2850e14206af13f26441e75289878"}}, +{"id":"namespaces","key":"namespaces","value":{"rev":"11-7a9b3d2537438211021a472035109f3c"}}, +{"id":"nami","key":"nami","value":{"rev":"29-3d44b1338222a4d994d4030868a94ea8"}}, +{"id":"nano","key":"nano","value":{"rev":"105-50efc49a8f6424706af554872002c014"}}, +{"id":"nanostate","key":"nanostate","value":{"rev":"9-1664d985e8cdbf16e150ba6ba4d79ae5"}}, +{"id":"narcissus","key":"narcissus","value":{"rev":"3-46581eeceff566bd191a14dec7b337f6"}}, +{"id":"nariya","key":"nariya","value":{"rev":"13-d83b8b6162397b154a4b59553be225e9"}}, +{"id":"narrativ","key":"narrativ","value":{"rev":"9-ef215eff6bf222425f73d23e507f7ff3"}}, +{"id":"narrow","key":"narrow","value":{"rev":"5-c6963048ba02adaf819dc51815fa0015"}}, +{"id":"narwhal","key":"narwhal","value":{"rev":"6-13bf3f87e6cfb1e57662cc3e3be450fc"}}, +{"id":"narwhal-lib","key":"narwhal-lib","value":{"rev":"6-4722d9b35fed59a2e8f7345a1eb6769d"}}, +{"id":"nat","key":"nat","value":{"rev":"3-da0906c08792043546f98ace8ce59a78"}}, +{"id":"native2ascii","key":"native2ascii","value":{"rev":"3-9afd51209d67303a8ee807ff862e31fc"}}, +{"id":"nativeUtil","key":"nativeUtil","value":{"rev":"7-6e3e9757b436ebcee35a20e633c08d60"}}, +{"id":"natives","key":"natives","value":{"rev":"24-6c4269c9c7cfb52571bd2c94fa26efc6"}}, +{"id":"natural","key":"natural","value":{"rev":"110-fc92701ad8525f45fbdb5863959ca03c"}}, +{"id":"naturalsort","key":"naturalsort","value":{"rev":"3-4321f5e432aee224af0fee9e4fb901ff"}}, +{"id":"nave","key":"nave","value":{"rev":"29-79baa66065fa9075764cc3e5da2edaef"}}, +{"id":"navigator","key":"navigator","value":{"rev":"3-f2f4f5376afb10753006f40bd49689c3"}}, +{"id":"nbs-api","key":"nbs-api","value":{"rev":"3-94949b1f0797369abc0752482268ef08"}}, +{"id":"nbt","key":"nbt","value":{"rev":"3-b711b9db76f64449df7f43c659ad8e7f"}}, +{"id":"nclosure","key":"nclosure","value":{"rev":"9-042b39740a39f0556d0dc2c0990b7fa8"}}, +{"id":"nclosureultimate","key":"nclosureultimate","value":{"rev":"3-61ff4bc480239304c459374c9a5f5754"}}, +{"id":"nconf","key":"nconf","value":{"rev":"65-8d8c0d2c6d5d9d526b8a3f325f68eca1"}}, +{"id":"nconf-redis","key":"nconf-redis","value":{"rev":"5-21ae138633b20cb29ed49b9fcd425e10"}}, +{"id":"ncp","key":"ncp","value":{"rev":"23-6441091c6c27ecb5b99f5781299a2192"}}, +{"id":"ncss","key":"ncss","value":{"rev":"9-1d2330e0fdbc40f0810747c2b156ecf2"}}, +{"id":"ncurses","key":"ncurses","value":{"rev":"12-bb059ea6fee12ca77f1fbb7bb6dd9447"}}, +{"id":"ndb","key":"ndb","value":{"rev":"15-b3e826f68a57095413666e9fe74589da"}}, +{"id":"ndistro","key":"ndistro","value":{"rev":"3-fcda3c018d11000b2903ad7104b60b35"}}, +{"id":"ndns","key":"ndns","value":{"rev":"5-1aeaaca119be44af7a83207d76f263fc"}}, +{"id":"nebulog","key":"nebulog","value":{"rev":"3-1863b0ce17cc0f07a50532a830194254"}}, +{"id":"neco","key":"neco","value":{"rev":"43-e830913302b52012ab63177ecf292822"}}, +{"id":"ned","key":"ned","value":{"rev":"15-4230c69fb52dfddfd65526dcfe5c4ec6"}}, +{"id":"nedis","key":"nedis","value":{"rev":"7-d49e329dca586d1a3569266f0595c9ad"}}, +{"id":"neko","key":"neko","value":{"rev":"60-13aa87d2278c3a734733cff2a34a7970"}}, +{"id":"neo4j","key":"neo4j","value":{"rev":"7-dde7066eac32a405df95ccf9c50c8ae7"}}, +{"id":"nerve","key":"nerve","value":{"rev":"3-2c47b79586d7930aabf9325ca88ad7e8"}}, +{"id":"nest","key":"nest","value":{"rev":"23-560d67971e9acddacf087608306def24"}}, +{"id":"nestableflow","key":"nestableflow","value":{"rev":"5-ee8af667a84d333fcc8092c89f4189c3"}}, +{"id":"nestor","key":"nestor","value":{"rev":"3-f1affbc37be3bf4e337365bd172578dc"}}, +{"id":"net","key":"net","value":{"rev":"3-895103ee532ef31396d9c06764df1ed8"}}, +{"id":"netiface","key":"netiface","value":{"rev":"3-885c94284fd3a9601afe291ab68aca84"}}, +{"id":"netpool","key":"netpool","value":{"rev":"3-dadfd09b9eb7ef73e2bff34a381de207"}}, +{"id":"netstring","key":"netstring","value":{"rev":"9-d26e7bf4a3ce5eb91bb1889d362f71e6"}}, +{"id":"neuron","key":"neuron","value":{"rev":"11-edaed50492368ff39eaf7d2004d7f4d8"}}, +{"id":"new","key":"new","value":{"rev":"3-7789b37104d8161b7ccf898a9cda1fc6"}}, +{"id":"newforms","key":"newforms","value":{"rev":"9-2a87cb74477d210fcb1d0c3e3e236f03"}}, +{"id":"nexpect","key":"nexpect","value":{"rev":"15-e7127f41b9f3ec45185ede7bab7b4acd"}}, +{"id":"next","key":"next","value":{"rev":"13-de5e62125b72e48ea142a55a3817589c"}}, +{"id":"nextrip","key":"nextrip","value":{"rev":"5-1ac8103552967af98d3de452ef81a94f"}}, +{"id":"nexttick","key":"nexttick","value":{"rev":"9-c7ec279e713ea8483d33c31871aea0db"}}, +{"id":"ngen","key":"ngen","value":{"rev":"9-972980a439c34851d67e4f61a96c2632"}}, +{"id":"ngen-basicexample","key":"ngen-basicexample","value":{"rev":"3-897763c230081d320586bcadfa84499f"}}, +{"id":"ngeohash","key":"ngeohash","value":{"rev":"5-9ca0c06066bc798e934db35cad99453e"}}, +{"id":"ngist","key":"ngist","value":{"rev":"7-592c24e72708219ed1eb078ddff95ab6"}}, +{"id":"ngram","key":"ngram","value":{"rev":"5-00e6b24dc178bdeb49b1ac8cb09f6e77"}}, +{"id":"ngrep","key":"ngrep","value":{"rev":"3-49c1a3839b12083280475177c1a16e38"}}, +{"id":"nhp-body-restreamer","key":"nhp-body-restreamer","value":{"rev":"1-8a4e5e23ae681a3f8be9afb613648230"}}, +{"id":"nhttpd","key":"nhttpd","value":{"rev":"3-cdc73384e1a1a4666e813ff52f2f5e4f"}}, +{"id":"nib","key":"nib","value":{"rev":"25-d67d5a294ba5b8953472cf936b97e13d"}}, +{"id":"nicetime","key":"nicetime","value":{"rev":"3-39fdba269d712064dc1e02a7ab846821"}}, +{"id":"nicknack","key":"nicknack","value":{"rev":"5-7b5477b63f782d0a510b0c15d2824f20"}}, +{"id":"nide","key":"nide","value":{"rev":"9-74f642fced47c934f9bae29f04d17a46"}}, +{"id":"nih-op","key":"nih-op","value":{"rev":"3-6e649b45964f84cb04340ab7f0a36a1c"}}, +{"id":"nimble","key":"nimble","value":{"rev":"5-867b808dd80eab33e5f22f55bb5a7376"}}, +{"id":"ninjs","key":"ninjs","value":{"rev":"3-f59997cc4bacb2d9d9852f955d15199e"}}, +{"id":"ninotify","key":"ninotify","value":{"rev":"3-a0f3c7cbbe7ccf5d547551aa062cc8b5"}}, +{"id":"nirc","key":"nirc","value":{"rev":"3-28197984656939a5a93a77c0a1605406"}}, +{"id":"nithub","key":"nithub","value":{"rev":"3-eaa85e6ac6668a304e4e4a565c54f57d"}}, +{"id":"nix","key":"nix","value":{"rev":"12-7b338b03c0e110aeb348551b14796ff1"}}, +{"id":"nko","key":"nko","value":{"rev":"39-2bf94b2bc279b8cf847bfc7668029d37"}}, +{"id":"nlog","key":"nlog","value":{"rev":"3-ae469820484ca33f346001dcb7b63a2d"}}, +{"id":"nlog4js","key":"nlog4js","value":{"rev":"3-bc17a61a9023d64e192d249144e69f02"}}, +{"id":"nlogger","key":"nlogger","value":{"rev":"11-1e48fc9a5a4214d9e56db6c6b63f1eeb"}}, +{"id":"nmd","key":"nmd","value":{"rev":"27-2dcb60d0258a9cea838f7cc4e0922f90"}}, +{"id":"nntp","key":"nntp","value":{"rev":"5-c86b189e366b9a6a428f9a2ee88dccf1"}}, +{"id":"no.de","key":"no.de","value":{"rev":"10-0dc855fd6b0b36a710b473b2720b22c0"}}, +{"id":"nobj","key":"nobj","value":{"rev":"3-0b4a46b91b70117306a9888202117223"}}, +{"id":"noblemachine","key":"noblemachine","value":{"rev":"3-06fec410fe0c7328e06eec50b4fa5d9a"}}, +{"id":"noblerecord","key":"noblerecord","value":{"rev":"5-22f24c4285bd405785588480bb2bc324"}}, +{"id":"nock","key":"nock","value":{"rev":"5-f94423d37dbdf41001ec097f20635271"}}, +{"id":"nocr-mongo","key":"nocr-mongo","value":{"rev":"5-ce6335ed276187cc38c30cb5872d3d83"}}, +{"id":"nodast","key":"nodast","value":{"rev":"3-1c563107f2d77b79a8f0d0b8ba7041f5"}}, +{"id":"node-api","key":"node-api","value":{"rev":"3-b69cefec93d9f73256acf9fb9edeebd6"}}, +{"id":"node-apidoc","key":"node-apidoc","value":{"rev":"6-cd26945e959403fcbee8ba542e14e667"}}, +{"id":"node-app-reloader","key":"node-app-reloader","value":{"rev":"5-e08cac7656afd6c124f8e2a9b9d6fdd3"}}, +{"id":"node-arse","key":"node-arse","value":{"rev":"9-b643c828541739a5fa972c801f81b212"}}, +{"id":"node-assert-extras","key":"node-assert-extras","value":{"rev":"3-3498e17b996ffc42a29d46c9699a3b52"}}, +{"id":"node-assert-lint-free","key":"node-assert-lint-free","value":{"rev":"5-852130ba6bafc703657b833343bc5646"}}, +{"id":"node-asset","key":"node-asset","value":{"rev":"18-f7cf59be8e0d015a43d05807a1ed9c0c"}}, +{"id":"node-awesm","key":"node-awesm","value":{"rev":"3-539c10145541ac5efc4dd295767b2abc"}}, +{"id":"node-backbone-couch","key":"node-backbone-couch","value":{"rev":"19-c4d8e93436b60e098c81cc0fe50f960c"}}, +{"id":"node-base64","key":"node-base64","value":{"rev":"11-da10a7157fd9e139b48bc8d9e44a98fa"}}, +{"id":"node-bj","key":"node-bj","value":{"rev":"3-5cd21fa259199870d1917574cd167396"}}, +{"id":"node-bosh-stress-tool","key":"node-bosh-stress-tool","value":{"rev":"3-36afc4b47e570964b7f8d705e1d47732"}}, +{"id":"node-brainfuck","key":"node-brainfuck","value":{"rev":"5-c7a6f703a97a409670005cab52664629"}}, +{"id":"node-build","key":"node-build","value":{"rev":"10-4f2f137fb4ef032f9dca3e3c64c15270"}}, +{"id":"node-casa","key":"node-casa","value":{"rev":"3-3f80a478aa47620bfc0c64cc6f140d98"}}, +{"id":"node-ccl","key":"node-ccl","value":{"rev":"13-00498b820cc4cadce8cc5b7b76e30b0f"}}, +{"id":"node-chain","key":"node-chain","value":{"rev":"6-b543f421ac63eeedc667b3395e7b8971"}}, +{"id":"node-child-process-manager","key":"node-child-process-manager","value":{"rev":"36-befb1a0eeac02ad400e2aaa8a076a053"}}, +{"id":"node-chirpstream","key":"node-chirpstream","value":{"rev":"10-f20e404f9ae5d43dfb6bcee15bd9affe"}}, +{"id":"node-clone","key":"node-clone","value":{"rev":"5-5ace5d51179d0e642bf9085b3bbf999b"}}, +{"id":"node-cloudwatch","key":"node-cloudwatch","value":{"rev":"3-7f9d1e075fcc3bd3e7849acd893371d5"}}, +{"id":"node-combine","key":"node-combine","value":{"rev":"3-51891c3c7769ff11a243c89c7e537907"}}, +{"id":"node-compat","key":"node-compat","value":{"rev":"9-24fce8e15eed3e193832b1c93a482d15"}}, +{"id":"node-config","key":"node-config","value":{"rev":"6-8821f6b46347e57258e62e1be841c186"}}, +{"id":"node-crocodoc","key":"node-crocodoc","value":{"rev":"5-ad4436f633f37fe3248dce93777fc26e"}}, +{"id":"node-csv","key":"node-csv","value":{"rev":"10-cd15d347b595f1d9d1fd30b483c52724"}}, +{"id":"node-date","key":"node-date","value":{"rev":"3-a5b41cab3247e12f2beaf1e0b1ffadfa"}}, +{"id":"node-dbi","key":"node-dbi","value":{"rev":"27-96e1df6fdefbae77bfa02eda64c3e3b9"}}, +{"id":"node-debug-proxy","key":"node-debug-proxy","value":{"rev":"9-c00a14832cdd5ee4d489eb41a3d0d621"}}, +{"id":"node-dep","key":"node-dep","value":{"rev":"15-378dedd3f0b3e54329c00c675b19401c"}}, +{"id":"node-dev","key":"node-dev","value":{"rev":"48-6a98f38078fe5678d6c2fb48aec3c1c3"}}, +{"id":"node-downloader","key":"node-downloader","value":{"rev":"3-a541126c56c48681571e5e998c481343"}}, +{"id":"node-evented","key":"node-evented","value":{"rev":"6-a6ce8ab39e01cc0262c80d4bf08fc333"}}, +{"id":"node-exception-notifier","key":"node-exception-notifier","value":{"rev":"3-cebc02c45dace4852f8032adaa4e3c9c"}}, +{"id":"node-expat","key":"node-expat","value":{"rev":"33-261d85273a0a551e7815f835a933d5eb"}}, +{"id":"node-expect","key":"node-expect","value":{"rev":"7-5ba4539adfd3ba95dab21bb5bc0a5193"}}, +{"id":"node-express-boilerplate","key":"node-express-boilerplate","value":{"rev":"3-972f51d1ff9493e48d7cf508461f1114"}}, +{"id":"node-extjs","key":"node-extjs","value":{"rev":"7-33143616b4590523b4e1549dd8ffa991"}}, +{"id":"node-extjs4","key":"node-extjs4","value":{"rev":"3-8e5033aed477629a6fb9812466a90cfd"}}, +{"id":"node-fakeweb","key":"node-fakeweb","value":{"rev":"5-f01377fa6d03461cbe77f41b73577cf4"}}, +{"id":"node-fb","key":"node-fb","value":{"rev":"3-bc5f301a60e475de7c614837d3f9f35a"}}, +{"id":"node-fb-signed-request","key":"node-fb-signed-request","value":{"rev":"3-33c8f043bb947b63a84089d633d68f8e"}}, +{"id":"node-fects","key":"node-fects","value":{"rev":"3-151b7b895b74b24a87792fac34735814"}}, +{"id":"node-ffi","key":"node-ffi","value":{"rev":"22-25cf229f0ad4102333b2b13e03054ac5"}}, +{"id":"node-filter","key":"node-filter","value":{"rev":"3-0e6a86b4abb65df3594e5c93ab04bd31"}}, +{"id":"node-foursquare","key":"node-foursquare","value":{"rev":"25-549bbb0c2b4f96b2c5e6a5f642e8481d"}}, +{"id":"node-fs","key":"node-fs","value":{"rev":"5-14050cbc3887141f6b0e1e7d62736a63"}}, +{"id":"node-fs-synchronize","key":"node-fs-synchronize","value":{"rev":"11-6341e79f3391a9e1daa651a5932c8795"}}, +{"id":"node-gd","key":"node-gd","value":{"rev":"11-2ede7f4af38f062b86cc32bb0125e1bf"}}, +{"id":"node-geocode","key":"node-geocode","value":{"rev":"6-505af45c7ce679ac6738b495cc6b03c2"}}, +{"id":"node-get","key":"node-get","value":{"rev":"9-906945005a594ea1f05d4ad23170a83f"}}, +{"id":"node-gettext","key":"node-gettext","value":{"rev":"5-532ea4b528108b4c8387ddfc8fa690b2"}}, +{"id":"node-gist","key":"node-gist","value":{"rev":"11-3495a499c9496d01235676f429660424"}}, +{"id":"node-glbse","key":"node-glbse","value":{"rev":"5-69a537189610c69cc549f415431b181a"}}, +{"id":"node-google-sql","key":"node-google-sql","value":{"rev":"7-bfe20d25a4423651ecdff3f5054a6946"}}, +{"id":"node-gravatar","key":"node-gravatar","value":{"rev":"6-8265fc1ad003fd8a7383244c92abb346"}}, +{"id":"node-handlersocket","key":"node-handlersocket","value":{"rev":"16-f1dc0246559748a842dd0e1919c569ae"}}, +{"id":"node-hdfs","key":"node-hdfs","value":{"rev":"3-d460fba8ff515660de34cb216223c569"}}, +{"id":"node-hipchat","key":"node-hipchat","value":{"rev":"3-9d16738bf70f9e37565727e671ffe551"}}, +{"id":"node-hive","key":"node-hive","value":{"rev":"31-5eef1fa77a39e4bdacd8fa85ec2ce698"}}, +{"id":"node-html-encoder","key":"node-html-encoder","value":{"rev":"3-75f92e741a3b15eb56e3c4513feaca6d"}}, +{"id":"node-i3","key":"node-i3","value":{"rev":"3-5c489f43aeb06054b02ad3706183599c"}}, +{"id":"node-indextank","key":"node-indextank","value":{"rev":"5-235a17fce46c73c8b5abc4cf5f964385"}}, +{"id":"node-inherit","key":"node-inherit","value":{"rev":"3-099c0acf9c889eea94faaf64067bfc52"}}, +{"id":"node-inspector","key":"node-inspector","value":{"rev":"34-ca9fa856cf32a737d1ecccb759aaf5e1"}}, +{"id":"node-int64","key":"node-int64","value":{"rev":"11-50b92b5b65adf17e673b4d15df643ed4"}}, +{"id":"node-ip-lib","key":"node-ip-lib","value":{"rev":"3-2fe72f7b78cbc1739c71c7cfaec9fbcd"}}, +{"id":"node-iplookup","key":"node-iplookup","value":{"rev":"10-ba8474624dd852a46303d32ff0556883"}}, +{"id":"node-jdownloader","key":"node-jdownloader","value":{"rev":"3-b015035cfb8540568da5deb55b35248c"}}, +{"id":"node-jslint-all","key":"node-jslint-all","value":{"rev":"5-582f4a31160d3700731fa39771702896"}}, +{"id":"node-jsonengine","key":"node-jsonengine","value":{"rev":"3-6e429c32e42b205f3ed1ea1f48d67cbc"}}, +{"id":"node-khtml","key":"node-khtml","value":{"rev":"39-db8e8eea569657fc7de6300172a6a8a7"}}, +{"id":"node-linkshare","key":"node-linkshare","value":{"rev":"35-acc18a5d584b828bb2bd4f32bbcde98c"}}, +{"id":"node-log","key":"node-log","value":{"rev":"17-79cecc66227b4fb3a2ae04b7dac17cc2"}}, +{"id":"node-logentries","key":"node-logentries","value":{"rev":"3-0f640d5ff489a6904f4a8c18fb5f7e9c"}}, +{"id":"node-logger","key":"node-logger","value":{"rev":"3-75084f98359586bdd254e57ea5915d37"}}, +{"id":"node-logging","key":"node-logging","value":{"rev":"15-af01bc2b6128150787c85c8df1dae642"}}, +{"id":"node-mailer","key":"node-mailer","value":{"rev":"5-5b88675f05efe2836126336c880bd841"}}, +{"id":"node-mailgun","key":"node-mailgun","value":{"rev":"5-4bcfb7bf5163748b87c1b9ed429ed178"}}, +{"id":"node-markdown","key":"node-markdown","value":{"rev":"6-67137da4014f22f656aaefd9dfa2801b"}}, +{"id":"node-mdbm","key":"node-mdbm","value":{"rev":"22-3006800b042cf7d4b0b391c278405143"}}, +{"id":"node-minify","key":"node-minify","value":{"rev":"13-e853813d4b6519b168965979b8ccccdd"}}, +{"id":"node-mug","key":"node-mug","value":{"rev":"3-f7567ffac536bfa7eb5a7e3da7a0efa0"}}, +{"id":"node-mvc","key":"node-mvc","value":{"rev":"3-74f7c07b2991fcddb27afd2889b6db4e"}}, +{"id":"node-mwire","key":"node-mwire","value":{"rev":"26-79d7982748f42b9e07ab293447b167ec"}}, +{"id":"node-mynix-feed","key":"node-mynix-feed","value":{"rev":"3-59d4a624b3831bbab6ee99be2f84e568"}}, +{"id":"node-nether","key":"node-nether","value":{"rev":"3-0fbefe710fe0d74262bfa25f6b4e1baf"}}, +{"id":"node-nude","key":"node-nude","value":{"rev":"3-600abb219646299ac602fa51fa260f37"}}, +{"id":"node-nxt","key":"node-nxt","value":{"rev":"3-8ce48601c2b0164e2b125259a0c97d45"}}, +{"id":"node-oauth","key":"node-oauth","value":{"rev":"3-aa6cd61f44d74118bafa5408900c4984"}}, +{"id":"node-opencalais","key":"node-opencalais","value":{"rev":"13-a3c0b882aca7207ce36f107e40a0ce50"}}, +{"id":"node-props","key":"node-props","value":{"rev":"7-e400cee08cc9abdc1f1ce4f262a04b05"}}, +{"id":"node-proxy","key":"node-proxy","value":{"rev":"20-ce722bf45c84a7d925b8b7433e786ed6"}}, +{"id":"node-pusher","key":"node-pusher","value":{"rev":"3-7cc7cd5bffaf3b11c44438611beeba98"}}, +{"id":"node-putio","key":"node-putio","value":{"rev":"3-8a1fc6362fdcf16217cdb6846e419b4c"}}, +{"id":"node-raphael","key":"node-raphael","value":{"rev":"25-e419d98a12ace18a40d94a9e8e32cdd4"}}, +{"id":"node-rapleaf","key":"node-rapleaf","value":{"rev":"11-c849c8c8635e4eb2f81bd7810b7693fd"}}, +{"id":"node-rats","key":"node-rats","value":{"rev":"3-dca544587f3121148fe02410032cf726"}}, +{"id":"node-rdf2json","key":"node-rdf2json","value":{"rev":"3-bde382dc2fcb40986c5ac41643d44543"}}, +{"id":"node-recurly","key":"node-recurly","value":{"rev":"11-79cab9ccee7c1ddb83791e8de41c72f5"}}, +{"id":"node-redis","key":"node-redis","value":{"rev":"13-12adf3a3e986675637fa47b176f527e3"}}, +{"id":"node-redis-mapper","key":"node-redis-mapper","value":{"rev":"5-53ba8f67cc82dbf1d127fc7359353f32"}}, +{"id":"node-redis-monitor","key":"node-redis-monitor","value":{"rev":"3-79bcba76241d7c7dbc4b18d90a9d59e3"}}, +{"id":"node-restclient","key":"node-restclient","value":{"rev":"6-5844eba19bc465a8f75b6e94c061350f"}}, +{"id":"node-restclient2","key":"node-restclient2","value":{"rev":"5-950de911f7bde7900dfe5b324f49818c"}}, +{"id":"node-runner","key":"node-runner","value":{"rev":"3-e9a9e6bd10d2ab1aed8b401b04fadc7b"}}, +{"id":"node-sc-setup","key":"node-sc-setup","value":{"rev":"3-e89c496e03c48d8574ccaf61c9ed4fca"}}, +{"id":"node-schedule","key":"node-schedule","value":{"rev":"9-ae12fa59226f1c9b7257b8a2d71373b4"}}, +{"id":"node-sdlmixer","key":"node-sdlmixer","value":{"rev":"8-489d85278d6564b6a4e94990edcb0527"}}, +{"id":"node-secure","key":"node-secure","value":{"rev":"3-73673522a4bb5f853d55e535f0934803"}}, +{"id":"node-sendgrid","key":"node-sendgrid","value":{"rev":"9-4662c31304ca4ee4e702bd3a54ea7824"}}, +{"id":"node-sizzle","key":"node-sizzle","value":{"rev":"6-c08c24d9d769d3716e5c4e3441740eb2"}}, +{"id":"node-soap-client","key":"node-soap-client","value":{"rev":"9-35ff34a4a5af569de6a2e89d1b35b69a"}}, +{"id":"node-spec","key":"node-spec","value":{"rev":"9-92e99ca74b9a09a8ae2eb7382ef511ef"}}, +{"id":"node-static","key":"node-static","value":{"rev":"10-11b0480fcd416db3d3d4041f43a55290"}}, +{"id":"node-static-maccman","key":"node-static-maccman","value":{"rev":"3-49e256728b14c85776b74f2bd912eb42"}}, +{"id":"node-statsd","key":"node-statsd","value":{"rev":"5-08d3e6b4b2ed1d0b7916e9952f55573c"}}, +{"id":"node-statsd-instrument","key":"node-statsd-instrument","value":{"rev":"3-c3cd3315e1edcc91096830392f439305"}}, +{"id":"node-std","key":"node-std","value":{"rev":"3-f99be0f03be4175d546823799bb590d3"}}, +{"id":"node-store","key":"node-store","value":{"rev":"3-7cb6bf13de9550b869c768f464fd0f65"}}, +{"id":"node-stringprep","key":"node-stringprep","value":{"rev":"13-9b08baa97042f71c5c8e9e2fdcc2c300"}}, +{"id":"node-synapse","key":"node-synapse","value":{"rev":"3-c46c47099eb2792f4a57fdfd789520ca"}}, +{"id":"node-syslog","key":"node-syslog","value":{"rev":"23-34f7df06ba88d9f897b7e00404db7187"}}, +{"id":"node-t","key":"node-t","value":{"rev":"3-042225eff3208ba9add61a9f79d90871"}}, +{"id":"node-taobao","key":"node-taobao","value":{"rev":"7-c988ace74806b2e2f55e162f54ba1a2c"}}, +{"id":"node-term-ui","key":"node-term-ui","value":{"rev":"5-210310014b19ce26c5e3e840a8a0549e"}}, +{"id":"node-tiny","key":"node-tiny","value":{"rev":"7-df05ab471f25ca4532d80c83106944d7"}}, +{"id":"node-tmpl","key":"node-tmpl","value":{"rev":"3-6fcfa960da8eb72a5e3087559d3fe206"}}, +{"id":"node-twilio","key":"node-twilio","value":{"rev":"11-af69e600109d38c77eadbcec4bee4782"}}, +{"id":"node-twitter-mailer","key":"node-twitter-mailer","value":{"rev":"7-f915b76d834cb162c91816abc30cee5f"}}, +{"id":"node-usb","key":"node-usb","value":{"rev":"3-0c3837307f86a80427800f1b45aa5862"}}, +{"id":"node-uuid","key":"node-uuid","value":{"rev":"6-642efa619ad8a6476a44a5c6158e7a36"}}, +{"id":"node-vapor.js","key":"node-vapor.js","value":{"rev":"3-d293284cc415b2906533e91db13ee748"}}, +{"id":"node-version","key":"node-version","value":{"rev":"3-433b1529a6aa3d619314e461e978d2b6"}}, +{"id":"node-webapp","key":"node-webapp","value":{"rev":"11-65411bfd8eaf19d3539238360d904d43"}}, +{"id":"node-wiki","key":"node-wiki","value":{"rev":"5-22b0177c9a5e4dc1f72d36bb83c746d0"}}, +{"id":"node-wkhtml","key":"node-wkhtml","value":{"rev":"5-a8fa203720442b443d558670c9750548"}}, +{"id":"node-xerces","key":"node-xerces","value":{"rev":"3-de6d82ec712af997b7aae451277667f0"}}, +{"id":"node-xml","key":"node-xml","value":{"rev":"3-e14a52dcd04302aea7dd6943cf6dd886"}}, +{"id":"node-xmpp","key":"node-xmpp","value":{"rev":"36-031eb5e830ed2e2027ee4ee7f861cf81"}}, +{"id":"node-xmpp-bosh","key":"node-xmpp-bosh","value":{"rev":"85-f7f8b699b6fda74fc27c621466915bd1"}}, +{"id":"node-xmpp-via-bosh","key":"node-xmpp-via-bosh","value":{"rev":"3-5f5fee9e42ae8ce8f42d55c31808c969"}}, +{"id":"node.io","key":"node.io","value":{"rev":"224-e99561d454a7676d10875e1b06ba44c7"}}, +{"id":"node.io-min","key":"node.io-min","value":{"rev":"3-e8389bdcfa55c68ae9698794d9089ce4"}}, +{"id":"node.isbn","key":"node.isbn","value":{"rev":"3-76aa84f3c49a54b6c901f440af35192d"}}, +{"id":"node.uptime","key":"node.uptime","value":{"rev":"5-cfc2c1c1460d000eab4e1a28506e6d29"}}, +{"id":"node3p","key":"node3p","value":{"rev":"14-b1931b8aa96227854d78965cc4301168"}}, +{"id":"node3p-web","key":"node3p-web","value":{"rev":"12-bc783ee1e493e80b7e7a3c2fce39f55e"}}, +{"id":"nodeBase","key":"nodeBase","value":{"rev":"39-4d9ae0f18e0bca7192901422d85e85c7"}}, +{"id":"nodeCgi","key":"nodeCgi","value":{"rev":"9-bb65e71ee63551e519f49434f2ae1cd7"}}, +{"id":"nodeDocs","key":"nodeDocs","value":{"rev":"3-0c6e714d3e6d5c2cc9482444680fb3ca"}}, +{"id":"nodePhpSessions","key":"nodePhpSessions","value":{"rev":"3-5063b38582deaca9cacdc029db97c2b1"}}, +{"id":"node_bsdiff","key":"node_bsdiff","value":{"rev":"5-e244ef36755a2b6534ce50fa1ee5ee6e"}}, +{"id":"node_hash","key":"node_hash","value":{"rev":"3-cdce2fcc2c18fcd25e16be8e52add891"}}, +{"id":"node_util","key":"node_util","value":{"rev":"3-cde723ee2311cf48f7cf0a3bc3484f9a"}}, +{"id":"node_xslt","key":"node_xslt","value":{"rev":"3-f12035155aee31d1749204fdca2aee10"}}, +{"id":"nodec","key":"nodec","value":{"rev":"3-dba2af2d5b98a71964abb4328512b9e1"}}, +{"id":"nodefm","key":"nodefm","value":{"rev":"3-c652a95d30318a371736515feab649f9"}}, +{"id":"nodegit","key":"nodegit","value":{"rev":"31-92a2cea0d1c92086c920bc007f5a3f16"}}, +{"id":"nodeib","key":"nodeib","value":{"rev":"3-e67d779007817597ca36e8b821f38e6a"}}, +{"id":"nodeinfo","key":"nodeinfo","value":{"rev":"53-61bf0f48662dc2e04cde38a2b897c211"}}, +{"id":"nodejitsu-client","key":"nodejitsu-client","value":{"rev":"3-4fa613f888ebe249aff7b03aa9b8d7ef"}}, +{"id":"nodejs-intro","key":"nodejs-intro","value":{"rev":"4-c75f03e80b597f734f4466e62ecebfeb"}}, +{"id":"nodejs-tvrage","key":"nodejs-tvrage","value":{"rev":"9-88bb3b5d23652ebdb7186a30bc3be43f"}}, +{"id":"nodejs.be-cli","key":"nodejs.be-cli","value":{"rev":"3-d8f23777f9b18101f2d2dc5aa618a703"}}, +{"id":"nodeler","key":"nodeler","value":{"rev":"9-00760d261ea75164a5709109011afb25"}}, +{"id":"nodelint","key":"nodelint","value":{"rev":"8-31502553d4bb099ba519fb331cccdd63"}}, +{"id":"nodeload","key":"nodeload","value":{"rev":"12-f02626475b59ebe67a864a114c99ff9b"}}, +{"id":"nodemachine","key":"nodemachine","value":{"rev":"8-5342324502e677e35aefef17dc08c8db"}}, +{"id":"nodemailer","key":"nodemailer","value":{"rev":"63-d39a5143b06fa79edcb81252d6329861"}}, +{"id":"nodemock","key":"nodemock","value":{"rev":"33-7095334209b39c8e1482374bee1b712a"}}, +{"id":"nodemon","key":"nodemon","value":{"rev":"42-4f40ba2299ef4ae613a384a48e4045fa"}}, +{"id":"nodepad","key":"nodepad","value":{"rev":"5-93718cc67e97c89f45b753c1caef07e4"}}, +{"id":"nodepal","key":"nodepal","value":{"rev":"5-e53372a5081b3753993ee98299ecd550"}}, +{"id":"nodepie","key":"nodepie","value":{"rev":"21-a44a6d3575758ed591e13831a5420758"}}, +{"id":"nodepress","key":"nodepress","value":{"rev":"3-f17616b9ae61e15d1d219cb87ac5a63a"}}, +{"id":"noderelict","key":"noderelict","value":{"rev":"23-0ca0997e3ef112e9393ae8ccef63f1ee"}}, +{"id":"noderpc","key":"noderpc","value":{"rev":"27-7efb6365916b403c3aa4e1c766de75a2"}}, +{"id":"nodespec","key":"nodespec","value":{"rev":"3-69f357577e52e9fd096ac88a1e7e3445"}}, +{"id":"nodespy","key":"nodespy","value":{"rev":"3-ad33e14db2bcaf61bf99d3e8915da5ee"}}, +{"id":"nodestalker","key":"nodestalker","value":{"rev":"5-080eba88a3625ecf7935ec5e9d2db6e9"}}, +{"id":"nodester-api","key":"nodester-api","value":{"rev":"39-52046dbcdf4447bbb85aecc92086ae1d"}}, +{"id":"nodester-cli","key":"nodester-cli","value":{"rev":"89-6de3d724a974c1dd3b632417f8b01267"}}, +{"id":"nodetk","key":"nodetk","value":{"rev":"11-265d267335e7603249e1af9441700f2f"}}, +{"id":"nodeunit","key":"nodeunit","value":{"rev":"40-d1cc6c06f878fb0b86779186314bc193"}}, +{"id":"nodeunit-coverage","key":"nodeunit-coverage","value":{"rev":"3-29853918351e75e3f6f93acd97e2942f"}}, +{"id":"nodeunit-dsl","key":"nodeunit-dsl","value":{"rev":"6-91be44077bc80c942f86f0ac28a69c5e"}}, +{"id":"nodevlc","key":"nodevlc","value":{"rev":"3-e151577d3e1ba2f58db465d94ebcb1c1"}}, +{"id":"nodevore","key":"nodevore","value":{"rev":"3-ac73b3bc33e2f934776dda359869ddcf"}}, +{"id":"nodewatch","key":"nodewatch","value":{"rev":"9-267bfe1324c51993865dc41b09aee6dc"}}, +{"id":"nodewii","key":"nodewii","value":{"rev":"9-716b3faa8957c1aea337540402ae7f43"}}, +{"id":"nodie","key":"nodie","value":{"rev":"3-cc29702a2e7e295cfe583a05fb77b530"}}, +{"id":"nodify","key":"nodify","value":{"rev":"10-87fadf6bf262882bd71ab7e759b29949"}}, +{"id":"nodrrr","key":"nodrrr","value":{"rev":"3-75937f4ffb722a67d6c5a67663366854"}}, +{"id":"nodules","key":"nodules","value":{"rev":"8-2c6ec430f26ff7ef171e80b7b5e990c2"}}, +{"id":"nodysentary","key":"nodysentary","value":{"rev":"3-7574fc8e12b1271c2eb1c66026f702cb"}}, +{"id":"nohm","key":"nohm","value":{"rev":"45-09dcf4df92734b3c51c8df3c3b374b0b"}}, +{"id":"noid","key":"noid","value":{"rev":"5-ac31e001806789e80a7ffc64f2914eb4"}}, +{"id":"nolife","key":"nolife","value":{"rev":"7-cfd4fe84b1062303cefb83167ea48bba"}}, +{"id":"nolog","key":"nolog","value":{"rev":"9-6e82819b801f5d7ec6773596d5d2efb2"}}, +{"id":"nomnom","key":"nomnom","value":{"rev":"34-bf66753d1d155820cfacfc7fa7a830c9"}}, +{"id":"nomplate","key":"nomplate","value":{"rev":"9-6ea21ee9568421a60cb80637c4c6cb48"}}, +{"id":"nonogo","key":"nonogo","value":{"rev":"5-8307413f9a3da913f9818c4f2d951519"}}, +{"id":"noode","key":"noode","value":{"rev":"7-454df50a7cbd03c46a9951cb1ddbe1c6"}}, +{"id":"noodle","key":"noodle","value":{"rev":"7-163745527770de0de8e7e9d59fc3888c"}}, +{"id":"noop","key":"noop","value":{"rev":"5-ed9fd66573ed1186e66b4c2bc16192cb"}}, +{"id":"nope","key":"nope","value":{"rev":"3-7088ffb62b8e06261527cbfa69cb94c5"}}, +{"id":"nopro","key":"nopro","value":{"rev":"11-6c4aeafe6329821b2259ef11414481dd"}}, +{"id":"nopt","key":"nopt","value":{"rev":"23-cce441940b6f129cab94a359ddb8b3e4"}}, +{"id":"norm","key":"norm","value":{"rev":"9-2bf26c3803fdc3bb6319e490cae3b625"}}, +{"id":"norq","key":"norq","value":{"rev":"3-b1a80ad1aa4ccc493ac25da22b0f0697"}}, +{"id":"norris","key":"norris","value":{"rev":"3-a341286d9e83fa392c1ce6b764d0aace"}}, +{"id":"norris-ioc","key":"norris-ioc","value":{"rev":"15-d022f159229d89ce60fc2a15d71eac59"}}, +{"id":"norris-tester","key":"norris-tester","value":{"rev":"3-fc2f34c9373bbdf5a1cd9cfbaff21f83"}}, +{"id":"northwatcher","key":"northwatcher","value":{"rev":"13-edab28a123f0100e12f96c9828428a8a"}}, +{"id":"nosey","key":"nosey","value":{"rev":"4-10a22f27dd9f2a40acf035a7d250c661"}}, +{"id":"nosql-thin","key":"nosql-thin","value":{"rev":"6-604169cacf303b5278064f68b884090b"}}, +{"id":"notch","key":"notch","value":{"rev":"3-5b720089f0f9cfdbbbea8677216eeee5"}}, +{"id":"notes","key":"notes","value":{"rev":"3-5dfbd6ec33c69c0f1b619dd65d9e7a56"}}, +{"id":"nothing","key":"nothing","value":{"rev":"3-8b44e10efd7d6504755c0c4bd1043814"}}, +{"id":"notifications","key":"notifications","value":{"rev":"3-a68448bca7ea2d3d3ce43e4d03cd76c6"}}, +{"id":"notifo","key":"notifo","value":{"rev":"8-0bc13ea6135adfa80c5fac497a2ddeda"}}, +{"id":"notify","key":"notify","value":{"rev":"3-da00942576bcb5fab594186f80d4575a"}}, +{"id":"notify-send","key":"notify-send","value":{"rev":"7-89f5c6bc656d51577e3997b9f90d0454"}}, +{"id":"nova","key":"nova","value":{"rev":"3-4e136f35b7d5b85816c17496c6c0e382"}}, +{"id":"now","key":"now","value":{"rev":"84-dbfde18b3f6fe79dd3637b6da34b78cf"}}, +{"id":"now-bal","key":"now-bal","value":{"rev":"3-c769bcdd45a93095f68c2de54f35543f"}}, +{"id":"nowpad","key":"nowpad","value":{"rev":"51-8d90c49031f79a9d31eb4ed6f39609b6"}}, +{"id":"nowww","key":"nowww","value":{"rev":"3-541994af2e579b376d2037f4e34f31d8"}}, +{"id":"noxmox","key":"noxmox","value":{"rev":"9-4ac8b1529dced329cac0976b9ca9eed0"}}, +{"id":"nozzle","key":"nozzle","value":{"rev":"23-e60444326d11a5b57c208de548c325e8"}}, +{"id":"npm","key":"npm","value":{"rev":"665-71d13d024c846b2ee85ed054fcfcb242"}}, +{"id":"npm-deploy","key":"npm-deploy","value":{"rev":"23-751e9d3c2edac0fd9916b0e886414ef2"}}, +{"id":"npm-dev-install","key":"npm-dev-install","value":{"rev":"3-7a08e11a59758329ba8dc4e781ea9993"}}, +{"id":"npm-docsite","key":"npm-docsite","value":{"rev":"3-5ed4f1ffea02487ab9ea24cfa0196f76"}}, +{"id":"npm-github-service","key":"npm-github-service","value":{"rev":"8-6891bc055b499e088fc79a7f94b6a4ec"}}, +{"id":"npm-intro-slides","key":"npm-intro-slides","value":{"rev":"8-e95f28475662cb8f70f4cb48baaa9d27"}}, +{"id":"npm-monitor","key":"npm-monitor","value":{"rev":"7-4e3209ea893fe37c0e516fe21de2d8ad"}}, +{"id":"npm-remapper","key":"npm-remapper","value":{"rev":"3-69163475ee93f32faac3f934e772b6c7"}}, +{"id":"npm-tweets","key":"npm-tweets","value":{"rev":"9-86064412a8aa02d813b20d2e49d78d84"}}, +{"id":"npm-wrapper","key":"npm-wrapper","value":{"rev":"3-59c4d372b84f6e91dbe48a220511dfd5"}}, +{"id":"npm2debian","key":"npm2debian","value":{"rev":"3-3cf2f471f3bfbc613176c7c780a6aad6"}}, +{"id":"npmcount","key":"npmcount","value":{"rev":"5-59c55b09d9c2cc7da217cab3b0ea642c"}}, +{"id":"npmdep","key":"npmdep","value":{"rev":"9-78184ad3b841e5c91bbfa29ff722778a"}}, +{"id":"npmtop","key":"npmtop","value":{"rev":"19-2754af894829f22d6edb3a17a64cdf1e"}}, +{"id":"nquery","key":"nquery","value":{"rev":"9-461fb0c9bcc3c15e0696dc2e99807c98"}}, +{"id":"nrecipe","key":"nrecipe","value":{"rev":"15-a96b6b0134a7625eb4eb236b4bf3fbf3"}}, +{"id":"nserver","key":"nserver","value":{"rev":"5-ea895373c340dd8d9119f3f549990048"}}, +{"id":"nserver-util","key":"nserver-util","value":{"rev":"5-5e14eb0bc9f7ab0eac04c5699c6bb328"}}, +{"id":"nssocket","key":"nssocket","value":{"rev":"51-6aac1d5dd0aa7629b3619b3085d63c04"}}, +{"id":"nstore","key":"nstore","value":{"rev":"28-6e2639829539b7315040487dfa5c79af"}}, +{"id":"nstore-cache","key":"nstore-cache","value":{"rev":"3-453ed78dcbe68b31ff675f4d94b47c4a"}}, +{"id":"nstore-query","key":"nstore-query","value":{"rev":"3-39f46992dd278824db641a37ec5546f5"}}, +{"id":"ntodo","key":"ntodo","value":{"rev":"7-e214da8bbed2d3e40bdaec77d7a49831"}}, +{"id":"ntp","key":"ntp","value":{"rev":"5-5ee2b25e8f3bca06d1cc4ce3b25cac42"}}, +{"id":"nts","key":"nts","value":{"rev":"7-ecaf47f8af1f77de791d1d1fa9bab88e"}}, +{"id":"nttpd","key":"nttpd","value":{"rev":"21-cda7aa0f1db126428f6ca01d44b4d209"}}, +{"id":"ntwitter","key":"ntwitter","value":{"rev":"11-732c6f34137c942bc98967170b2f83fc"}}, +{"id":"nub","key":"nub","value":{"rev":"3-932ecf56889fa43584687dbb2cf4aa91"}}, +{"id":"nubnub","key":"nubnub","value":{"rev":"6-93a5267209e1aa869521a5952cbb1828"}}, +{"id":"null","key":"null","value":{"rev":"3-ae8247cfa9553d23a229993cfc8436c5"}}, +{"id":"numb","key":"numb","value":{"rev":"5-594cd9e8e8e4262ddb3ddd80e8084b62"}}, +{"id":"nun","key":"nun","value":{"rev":"8-3bd8b37ed85c1a5da211bd0d5766848e"}}, +{"id":"nunz","key":"nunz","value":{"rev":"3-040f033943158be495f6b0da1a0c0344"}}, +{"id":"nurl","key":"nurl","value":{"rev":"11-6c4ee6fc5c5119c56f2fd8ad8a0cb928"}}, +{"id":"nutil","key":"nutil","value":{"rev":"3-7785a1d4651dcfe78c874848f41d1348"}}, +{"id":"nutils","key":"nutils","value":{"rev":"13-889624db0c155fc2f0b501bba47e55ec"}}, +{"id":"nuvem","key":"nuvem","value":{"rev":"23-054b9b1240f4741f561ef0bb3197bdf8"}}, +{"id":"nvm","key":"nvm","value":{"rev":"28-251b7eb3429a00099b37810d05accd47"}}, +{"id":"nwm","key":"nwm","value":{"rev":"3-fe9274106aac9e67eea734159477acaf"}}, +{"id":"nx","key":"nx","value":{"rev":"55-7ad32fcb34ec25f841ddd0e5857375c7"}}, +{"id":"nx-core","key":"nx-core","value":{"rev":"33-a7bc62348591bae89fff82057bede1ab"}}, +{"id":"nx-daemon","key":"nx-daemon","value":{"rev":"3-7b86a87654c9e32746a4d36d7c527182"}}, +{"id":"nyaatorrents","key":"nyaatorrents","value":{"rev":"5-8600707a1e84f617bd5468b5c9179202"}}, +{"id":"nyala","key":"nyala","value":{"rev":"17-23c908297a37c47f9f09977f4cf101ff"}}, +{"id":"nyam","key":"nyam","value":{"rev":"17-697b5f17fe67630bc9494184146c12f1"}}, +{"id":"nyancat","key":"nyancat","value":{"rev":"13-84c18d007db41b40e9145bdc049b0a00"}}, +{"id":"nymph","key":"nymph","value":{"rev":"5-3a5d7a75d32f7a71bf4ec131f71484d8"}}, +{"id":"o3-xml","key":"o3-xml","value":{"rev":"3-cc4df881333805600467563f80b5216c"}}, +{"id":"oahu","key":"oahu","value":{"rev":"3-e789fc2098292518cb33606c73bfeca4"}}, +{"id":"oauth","key":"oauth","value":{"rev":"38-36b99063db7dc302b70d932e9bbafc24"}}, +{"id":"oauth-client","key":"oauth-client","value":{"rev":"12-ae097c9580ddcd5ca938b169486a63c6"}}, +{"id":"oauth-server","key":"oauth-server","value":{"rev":"7-ea931e31eaffaa843be61ffc89f29da7"}}, +{"id":"oauth2","key":"oauth2","value":{"rev":"3-4fce73fdc95580f397afeaf1bbd596bb"}}, +{"id":"oauth2-client","key":"oauth2-client","value":{"rev":"7-b5bd019159112384abc2087b2f8cb4f7"}}, +{"id":"oauth2-provider","key":"oauth2-provider","value":{"rev":"3-acd8f23b8c1c47b19838424b64618c70"}}, +{"id":"oauth2-server","key":"oauth2-server","value":{"rev":"11-316baa7e754053d0153086d0748b07c5"}}, +{"id":"obj_diff","key":"obj_diff","value":{"rev":"3-9289e14caaec4bb6aa64aa1be547db3b"}}, +{"id":"object-additions","key":"object-additions","value":{"rev":"3-11f03ae5afe00ad2be034fb313ce71a9"}}, +{"id":"object-proxy","key":"object-proxy","value":{"rev":"3-4d531308fc97bac6f6f9acd1e8f5b53a"}}, +{"id":"object-sync","key":"object-sync","value":{"rev":"5-6628fff49d65c96edc9d7a2e13db8d6d"}}, +{"id":"observer","key":"observer","value":{"rev":"3-a48052671a59b1c7874b4462e375664d"}}, +{"id":"octo.io","key":"octo.io","value":{"rev":"7-5692104396299695416ecb8548e53541"}}, +{"id":"octopus","key":"octopus","value":{"rev":"3-0a286abf59ba7232210e24a371902e7b"}}, +{"id":"odbc","key":"odbc","value":{"rev":"3-8550f0b183b229e41f3cb947bad9b059"}}, +{"id":"odot","key":"odot","value":{"rev":"13-3954b69c1a560a71fe58ab0c5c1072ba"}}, +{"id":"offliner","key":"offliner","value":{"rev":"3-9b58041cbd7b0365e04fec61c192c9b2"}}, +{"id":"ofxer","key":"ofxer","value":{"rev":"11-f8a79e1f27c92368ca1198ad37fbe83e"}}, +{"id":"ogre","key":"ogre","value":{"rev":"35-ea9c78c1d5b1761f059bb97ea568b23d"}}, +{"id":"oi.tekcos","key":"oi.tekcos","value":{"rev":"5-fdca9adb54acea3f91567082b107dde9"}}, +{"id":"oktest","key":"oktest","value":{"rev":"3-3b40312743a3eb1d8541ceee3ecfeace"}}, +{"id":"omcc","key":"omcc","value":{"rev":"3-19718e77bf82945c3ca7a3cdfb91188c"}}, +{"id":"omegle","key":"omegle","value":{"rev":"3-507ba8a51afbe2ff078e3e96712b7286"}}, +{"id":"ometa","key":"ometa","value":{"rev":"10-457fa17de89e1012ce812af3a53f4035"}}, +{"id":"ometa-highlighter","key":"ometa-highlighter","value":{"rev":"21-d18470d6d9a93bc7383c7d8ace22ad1d"}}, +{"id":"ometajs","key":"ometajs","value":{"rev":"20-c7e8c32926f2523e40e4a7ba2297192c"}}, +{"id":"onion","key":"onion","value":{"rev":"3-b46c000c8ff0b06f5f0028d268bc5c94"}}, +{"id":"onvalid","key":"onvalid","value":{"rev":"3-090bc1cf1418545b84db0fceb0846293"}}, +{"id":"oo","key":"oo","value":{"rev":"7-2297a18cdbcf29ad4867a2159912c04e"}}, +{"id":"oop","key":"oop","value":{"rev":"7-45fab8bae343e805d0c1863149dc20df"}}, +{"id":"op","key":"op","value":{"rev":"13-4efb059757caaecc18d5110b44266b35"}}, +{"id":"open-uri","key":"open-uri","value":{"rev":"21-023a00f26ecd89e278136fbb417ae9c3"}}, +{"id":"open.core","key":"open.core","value":{"rev":"35-f578db4e41dd4ae9128e3be574cf7b14"}}, +{"id":"open311","key":"open311","value":{"rev":"13-bb023a45d3c3988022d2fef809de8d98"}}, +{"id":"openid","key":"openid","value":{"rev":"29-b3c8a0e76d99ddb80c98d2aad5586771"}}, +{"id":"openlayers","key":"openlayers","value":{"rev":"3-602c34468c9be326e95be327b58d599b"}}, +{"id":"opentok","key":"opentok","value":{"rev":"5-5f4749f1763d45141d0272c1dbe6249a"}}, +{"id":"opentsdb-dashboard","key":"opentsdb-dashboard","value":{"rev":"3-2e0c5ccf3c9cfce17c20370c93283707"}}, +{"id":"opower-jobs","key":"opower-jobs","value":{"rev":"16-1602139f92e58d88178f21f1b3e0939f"}}, +{"id":"optimist","key":"optimist","value":{"rev":"64-ca3e5085acf135169d79949c25d84690"}}, +{"id":"optparse","key":"optparse","value":{"rev":"6-0200c34395f982ae3b80f4d18cb14483"}}, +{"id":"opts","key":"opts","value":{"rev":"8-ce2a0e31de55a1e02d5bbff66c4e8794"}}, +{"id":"orchestra","key":"orchestra","value":{"rev":"9-52ca98cddb51a2a43ec02338192c44fc"}}, +{"id":"orchid","key":"orchid","value":{"rev":"49-af9635443671ed769e4efa691b8ca84a"}}, +{"id":"orderly","key":"orderly","value":{"rev":"3-9ccc42d45b64278c9ffb1e64fc4f0d62"}}, +{"id":"orgsync.live","key":"orgsync.live","value":{"rev":"3-4dffc8ac43931364f59b9cb534acbaef"}}, +{"id":"orm","key":"orm","value":{"rev":"21-f3e7d89239364559d306110580bbb08f"}}, +{"id":"ormnomnom","key":"ormnomnom","value":{"rev":"15-0aacfbb5b7b580d76e9ecf5214a1d5ed"}}, +{"id":"orona","key":"orona","value":{"rev":"8-62d4ba1bf49098a140a2b85f80ebb103"}}, +{"id":"osc4node","key":"osc4node","value":{"rev":"3-0910613e78065f78b61142b35986e8b3"}}, +{"id":"oscar","key":"oscar","value":{"rev":"3-f5d2d39a67c67441bc2135cdaf2b47f8"}}, +{"id":"osrandom","key":"osrandom","value":{"rev":"3-026016691a5ad068543503e5e7ce6a84"}}, +{"id":"ossp-uuid","key":"ossp-uuid","value":{"rev":"10-8b7e1fba847d7cc9aa4f4c8813ebe6aa"}}, +{"id":"ostatus","key":"ostatus","value":{"rev":"3-76e0ec8c61c6df15c964197b722e24e7"}}, +{"id":"ostrich","key":"ostrich","value":{"rev":"3-637e0821e5ccfd0f6b1261b22c168c8d"}}, +{"id":"otk","key":"otk","value":{"rev":"5-2dc24e159cc618f43e573561286c4dcd"}}, +{"id":"ourl","key":"ourl","value":{"rev":"5-a3945e59e33faac96c75b508ef7fa1fb"}}, +{"id":"oursql","key":"oursql","value":{"rev":"21-bc53ab462155fa0aedbe605255fb9988"}}, +{"id":"out","key":"out","value":{"rev":"5-eb261f940b6382e2689210a58bc1b440"}}, +{"id":"overload","key":"overload","value":{"rev":"10-b88919e5654bef4922029afad4f1d519"}}, +{"id":"ox","key":"ox","value":{"rev":"3-0ca445370b4f76a93f2181ad113956d9"}}, +{"id":"pachube","key":"pachube","value":{"rev":"10-386ac6be925bab307b5d545516fb18ef"}}, +{"id":"pachube-stream","key":"pachube-stream","value":{"rev":"13-176dadcc5c516420fb3feb1f964739e0"}}, +{"id":"pack","key":"pack","value":{"rev":"29-8f8c511d95d1fb322c1a6d7965ef8f29"}}, +{"id":"packagebohrer","key":"packagebohrer","value":{"rev":"3-507358253a945a74c49cc169ad0bf5a2"}}, +{"id":"packer","key":"packer","value":{"rev":"9-23410d893d47418731e236cfcfcfbf03"}}, +{"id":"packet","key":"packet","value":{"rev":"8-1b366f97d599c455dcbbe4339da7cf9e"}}, +{"id":"pacote-sam-egenial","key":"pacote-sam-egenial","value":{"rev":"3-b967db1b9fceb9a937f3520efd89f479"}}, +{"id":"pacoteegenial","key":"pacoteegenial","value":{"rev":"3-9cfe8518b885bfd9a44ed38814f7d623"}}, +{"id":"pact","key":"pact","value":{"rev":"7-82996c1a0c8e9a5e9df959d4ad37085e"}}, +{"id":"pad","key":"pad","value":{"rev":"3-eef6147f09b662cff95c946f2b065da5"}}, +{"id":"paddle","key":"paddle","value":{"rev":"3-fedd0156b9a0dadb5e9b0f1cfab508fd"}}, +{"id":"padlock","key":"padlock","value":{"rev":"9-3a9e378fbe8e3817da7999f675af227e"}}, +{"id":"pagen","key":"pagen","value":{"rev":"9-9aac56724039c38dcdf7f6d5cbb4911c"}}, +{"id":"paginate-js","key":"paginate-js","value":{"rev":"5-995269155152db396662c59b67e9e93d"}}, +{"id":"pairtree","key":"pairtree","value":{"rev":"3-0361529e6c91271e2a61f3d7fd44366e"}}, +{"id":"palsu-app","key":"palsu-app","value":{"rev":"3-73f1fd9ae35e3769efc9c1aa25ec6da7"}}, +{"id":"pam","key":"pam","value":{"rev":"3-77b5bd15962e1c8be1980b33fd3b9737"}}, +{"id":"panache","key":"panache","value":{"rev":"25-749d2034f7f9179c2266cf896bb4abb0"}}, +{"id":"panic","key":"panic","value":{"rev":"7-068b22be54ca8ae7b03eb153c2ea849a"}}, +{"id":"pantry","key":"pantry","value":{"rev":"33-3896f0fc165092f6cabb2949be3952c4"}}, +{"id":"paper-keys","key":"paper-keys","value":{"rev":"3-729378943040ae01d59f07bb536309b7"}}, +{"id":"paperboy","key":"paperboy","value":{"rev":"8-db2d51c2793b4ffc82a1ae928c813aae"}}, +{"id":"paperserve","key":"paperserve","value":{"rev":"6-8509fb68217199a3eb74f223b1e2bee5"}}, +{"id":"parall","key":"parall","value":{"rev":"5-279d7105a425e136f6101250e8f81a14"}}, +{"id":"parallel","key":"parallel","value":{"rev":"14-f1294b3b840cfb26095107110b6720ec"}}, +{"id":"paramon","key":"paramon","value":{"rev":"3-37e599e924beb509c894c992cf72791b"}}, +{"id":"parannus","key":"parannus","value":{"rev":"7-7541f1ed13553261330b9e1c4706f112"}}, +{"id":"parasite","key":"parasite","value":{"rev":"13-83c26181bb92cddb8ff76bc154a50210"}}, +{"id":"parrot","key":"parrot","value":{"rev":"3-527d1cb4b5be0e252dc92a087d380f17"}}, +{"id":"parseUri","key":"parseUri","value":{"rev":"3-3b60b1fd6d8109279b5d0cfbdb89b343"}}, +{"id":"parseopt","key":"parseopt","value":{"rev":"10-065f1acaf02c94f0684f75fefc2fd1ec"}}, +{"id":"parser","key":"parser","value":{"rev":"5-f661f0b7ede9b6d3e0de259ed20759b1"}}, +{"id":"parser_email","key":"parser_email","value":{"rev":"12-63333860c62f2a9c9d6b0b7549bf1cdc"}}, +{"id":"parstream","key":"parstream","value":{"rev":"3-ef7e8ffc8ce1e7d951e37f85bfd445ab"}}, +{"id":"parted","key":"parted","value":{"rev":"9-250e4524994036bc92915b6760d62d8a"}}, +{"id":"partial","key":"partial","value":{"rev":"7-208411e6191275a4193755ee86834716"}}, +{"id":"party","key":"party","value":{"rev":"5-9337d8dc5e163f0300394f533ab1ecdf"}}, +{"id":"pashua","key":"pashua","value":{"rev":"3-b752778010f4e20f662a3d8f0f57b18b"}}, +{"id":"pass","key":"pass","value":{"rev":"3-66a2d55d93eae8535451f12965578db8"}}, +{"id":"passthru","key":"passthru","value":{"rev":"9-3c8f0b20f1a16976f3645a6f7411b56a"}}, +{"id":"passwd","key":"passwd","value":{"rev":"19-44ac384382a042faaa1f3b111786c831"}}, +{"id":"password","key":"password","value":{"rev":"9-0793f6a8d09076f25cde7c9e528eddec"}}, +{"id":"password-hash","key":"password-hash","value":{"rev":"9-590c62e275ad577c6f8ddbf5ba4579cc"}}, +{"id":"path","key":"path","value":{"rev":"3-3ec064cf3f3a85cb59528654c5bd938f"}}, +{"id":"pathjs","key":"pathjs","value":{"rev":"5-d5e1b1a63e711cae3ac79a3b1033b609"}}, +{"id":"pathname","key":"pathname","value":{"rev":"9-16f2c1473454900ce18a217b2ea52c57"}}, +{"id":"paths","key":"paths","value":{"rev":"3-fa47b7c1d533a7d9f4bbaffc5fb89905"}}, +{"id":"patr","key":"patr","value":{"rev":"7-7bcd37586389178b9f23d33c1d7a0292"}}, +{"id":"pattern","key":"pattern","value":{"rev":"36-3ded826185c384af535dcd428af3f626"}}, +{"id":"payment-paypal-payflowpro","key":"payment-paypal-payflowpro","value":{"rev":"14-d8814a1d8bba57a6ecf8027064adc7ad"}}, +{"id":"paynode","key":"paynode","value":{"rev":"16-16084e61db66ac18fdbf95a51d31c09a"}}, +{"id":"payos","key":"payos","value":{"rev":"3-373695bd80c454b32b83a5eba6044261"}}, +{"id":"paypal-ipn","key":"paypal-ipn","value":{"rev":"5-ef32291f9f8371b20509db3acee722f6"}}, +{"id":"pcap","key":"pcap","value":{"rev":"46-8ae9e919221102581d6bb848dc67b84b"}}, +{"id":"pd","key":"pd","value":{"rev":"7-82146739c4c0eb4e49e40aa80a29cc0a"}}, +{"id":"pdf","key":"pdf","value":{"rev":"6-5c6b6a133e1b3ce894ebb1a49090216c"}}, +{"id":"pdfcrowd","key":"pdfcrowd","value":{"rev":"5-026b4611b50374487bfd64fd3e0d562c"}}, +{"id":"pdfkit","key":"pdfkit","value":{"rev":"13-2fd34c03225a87dfd8057c85a83f3c50"}}, +{"id":"pdflatex","key":"pdflatex","value":{"rev":"3-bbbf61f09ebe4c49ca0aff8019611660"}}, +{"id":"pdl","key":"pdl","value":{"rev":"3-4c41bf12e901ee15bdca468db8c89102"}}, +{"id":"peanut","key":"peanut","value":{"rev":"55-b797121dbbcba1219934284ef56abb8a"}}, +{"id":"pebble","key":"pebble","value":{"rev":"21-3cd08362123260a2e96d96d80e723805"}}, +{"id":"pecode","key":"pecode","value":{"rev":"3-611f5e8c61bbf4467b84da954ebdd521"}}, +{"id":"pegjs","key":"pegjs","value":{"rev":"11-091040d16433014d1da895e32ac0f6a9"}}, +{"id":"per-second","key":"per-second","value":{"rev":"5-e1593b3f7008ab5e1c3cae86f39ba3f3"}}, +{"id":"permafrost","key":"permafrost","value":{"rev":"9-494cbc9a2f43a60b57f23c5f5b12270d"}}, +{"id":"perry","key":"perry","value":{"rev":"41-15aed7a778fc729ad62fdfb231c50774"}}, +{"id":"persistencejs","key":"persistencejs","value":{"rev":"20-2585af3f15f0a4a7395e937237124596"}}, +{"id":"pg","key":"pg","value":{"rev":"142-48de452fb8a84022ed7cae8ec2ebdaf6"}}, +{"id":"phonetap","key":"phonetap","value":{"rev":"7-2cc7d3c2a09518ad9b0fe816c6a99125"}}, +{"id":"php-autotest","key":"php-autotest","value":{"rev":"3-04470b38b259187729af574dd3dc1f97"}}, +{"id":"phpass","key":"phpass","value":{"rev":"3-66f4bec659bf45b312022bb047b18696"}}, +{"id":"piano","key":"piano","value":{"rev":"3-0bab6b5409e4305c87a775e96a2b7ad3"}}, +{"id":"picard","key":"picard","value":{"rev":"5-7676e6ad6d5154fdc016b001465891f3"}}, +{"id":"picardForTynt","key":"picardForTynt","value":{"rev":"3-09d205b790bd5022b69ec4ad54bad770"}}, +{"id":"pid","key":"pid","value":{"rev":"3-0ba7439d599b9d613461794c3892d479"}}, +{"id":"pieshop","key":"pieshop","value":{"rev":"12-7851afe1bbc20de5d054fe93b071f849"}}, +{"id":"pig","key":"pig","value":{"rev":"3-8e6968a7b64635fed1bad12c39d7a46a"}}, +{"id":"pigeons","key":"pigeons","value":{"rev":"53-8df70420d3c845cf0159b3f25d0aab90"}}, +{"id":"piles","key":"piles","value":{"rev":"3-140cb1e83b5a939ecd429b09886132ef"}}, +{"id":"pillar","key":"pillar","value":{"rev":"6-83c81550187f6d00e11dd9955c1c94b7"}}, +{"id":"pilot","key":"pilot","value":{"rev":"3-073ed1a083cbd4c2aa2561f19e5935ea"}}, +{"id":"pinboard","key":"pinboard","value":{"rev":"3-1020cab02a1183acdf82e1f7620dc1e0"}}, +{"id":"pinf-loader-js","key":"pinf-loader-js","value":{"rev":"5-709ba9c86fb4de906bd7bbca53771f0f"}}, +{"id":"pinf-loader-js-demos-npmpackage","key":"pinf-loader-js-demos-npmpackage","value":{"rev":"3-860569d98c83e59185cff356e56b10a6"}}, +{"id":"pingback","key":"pingback","value":{"rev":"5-5d0a05d65a14f6837b0deae16c550bec"}}, +{"id":"pingdom","key":"pingdom","value":{"rev":"11-f299d6e99122a9fa1497bfd166dadd02"}}, +{"id":"pintpay","key":"pintpay","value":{"rev":"3-eba9c4059283adec6b1ab017284c1f17"}}, +{"id":"pipe","key":"pipe","value":{"rev":"5-d202bf317c10a52ac817b5c1a4ce4c88"}}, +{"id":"pipe_utils","key":"pipe_utils","value":{"rev":"13-521857c99eb76bba849a22240308e584"}}, +{"id":"pipegram","key":"pipegram","value":{"rev":"3-1449333c81dd658d5de9eebf36c07709"}}, +{"id":"pipeline-surveyor","key":"pipeline-surveyor","value":{"rev":"11-464db89b17e7b44800088ec4a263d92e"}}, +{"id":"pipes","key":"pipes","value":{"rev":"99-8320636ff840a61d82d9c257a2e0ed48"}}, +{"id":"pipes-cellar","key":"pipes-cellar","value":{"rev":"27-e035e58a3d82e50842d766bb97ea3ed9"}}, +{"id":"pipes-cohort","key":"pipes-cohort","value":{"rev":"9-88fc0971e01516873396e44974874903"}}, +{"id":"piton-entity","key":"piton-entity","value":{"rev":"31-86254212066019f09d67dfd58524bd75"}}, +{"id":"piton-http-utils","key":"piton-http-utils","value":{"rev":"3-6cf6aa0c655ff6118d53e62e3b970745"}}, +{"id":"piton-mixin","key":"piton-mixin","value":{"rev":"3-7b7737004e53e04f7f95ba5850eb5e70"}}, +{"id":"piton-pipe","key":"piton-pipe","value":{"rev":"3-8d7df4e53f620ef2f24e9fc8b24f0238"}}, +{"id":"piton-simplate","key":"piton-simplate","value":{"rev":"3-9ac00835d3de59d535cdd2347011cdc9"}}, +{"id":"piton-string-utils","key":"piton-string-utils","value":{"rev":"3-ecab73993d764dfb378161ea730dbbd5"}}, +{"id":"piton-validity","key":"piton-validity","value":{"rev":"13-1766651d69e3e075bf2c66b174b66026"}}, +{"id":"pixel-ping","key":"pixel-ping","value":{"rev":"11-38d717c927e13306e8ff9032785b50f2"}}, +{"id":"pixelcloud","key":"pixelcloud","value":{"rev":"7-0897d734157b52dece8f86cde7be19d4"}}, +{"id":"pixiedust","key":"pixiedust","value":{"rev":"3-6b932dee4b6feeed2f797de5d0066f8a"}}, +{"id":"pkginfo","key":"pkginfo","value":{"rev":"13-3ee42503d6672812960a965d4f3a1bc2"}}, +{"id":"pksqlite","key":"pksqlite","value":{"rev":"13-095e7d7d0258b71491c39d0e8c4f19be"}}, +{"id":"plants.js","key":"plants.js","value":{"rev":"3-e3ef3a16f637787e84c100a9b9ec3b08"}}, +{"id":"plate","key":"plate","value":{"rev":"20-92ba0729b2edc931f28870fe7f2ca95a"}}, +{"id":"platform","key":"platform","value":{"rev":"4-be465a1d21be066c96e30a42b8602177"}}, +{"id":"platformjs","key":"platformjs","value":{"rev":"35-5c510fa0c90492fd1d0f0fc078460018"}}, +{"id":"platoon","key":"platoon","value":{"rev":"28-e0e0c5f852eadacac5a652860167aa11"}}, +{"id":"play","key":"play","value":{"rev":"5-17f7cf7cf5d1c21c7392f3c43473098d"}}, +{"id":"plist","key":"plist","value":{"rev":"10-2a23864923aeed93fb8e25c4b5b2e97e"}}, +{"id":"png","key":"png","value":{"rev":"14-9cc7aeaf0c036c9a880bcee5cd46229a"}}, +{"id":"png-guts","key":"png-guts","value":{"rev":"5-a29c7c686f9d08990ce29632bf59ef90"}}, +{"id":"policyfile","key":"policyfile","value":{"rev":"21-4a9229cca4bcac10f730f296f7118548"}}, +{"id":"polla","key":"polla","value":{"rev":"27-9af5a575961a4dddb6bef482c168c756"}}, +{"id":"poly","key":"poly","value":{"rev":"3-7f7fe29d9f0ec4fcbf8481c797b20455"}}, +{"id":"polyglot","key":"polyglot","value":{"rev":"3-9306e246d1f8b954b41bef76e3e81291"}}, +{"id":"pool","key":"pool","value":{"rev":"10-f364b59aa8a9076a17cd94251dd013ab"}}, +{"id":"poolr","key":"poolr","value":{"rev":"5-cacfbeaa7aaca40c1a41218e8ac8b732"}}, +{"id":"pop","key":"pop","value":{"rev":"41-8edd9ef2f34a90bf0ec5e8eb0e51e644"}}, +{"id":"pop-disqus","key":"pop-disqus","value":{"rev":"3-4a8272e6a8453ed2d754397dc8b349bb"}}, +{"id":"pop-ga","key":"pop-ga","value":{"rev":"3-5beaf7b355d46b3872043b97696ee693"}}, +{"id":"pop-gallery","key":"pop-gallery","value":{"rev":"3-1a88920ff930b8ce51cd50fcfe62675e"}}, +{"id":"pop3-client","key":"pop3-client","value":{"rev":"3-be8c314b0479d9d98384e2ff36d7f207"}}, +{"id":"poplib","key":"poplib","value":{"rev":"7-ab64c5c35269aee897b0904b4548096b"}}, +{"id":"porter-stemmer","key":"porter-stemmer","value":{"rev":"5-724a7b1d635b95a14c9ecd9d2f32487d"}}, +{"id":"portfinder","key":"portfinder","value":{"rev":"5-cdf36d1c666bbdae500817fa39b9c2bd"}}, +{"id":"portscanner","key":"portscanner","value":{"rev":"3-773c1923b6f3b914bd801476efcfdf64"}}, +{"id":"pos","key":"pos","value":{"rev":"3-1c1a27020560341ecd1b54d0e3cfaf2a"}}, +{"id":"posix-getopt","key":"posix-getopt","value":{"rev":"3-819b69724575b65fe25cf1c768e1b1c6"}}, +{"id":"postageapp","key":"postageapp","value":{"rev":"9-f5735237f7e6f0b467770e28e84c56db"}}, +{"id":"postal","key":"postal","value":{"rev":"19-dd70aeab4ae98ccf3d9f203dff9ccf37"}}, +{"id":"posterous","key":"posterous","value":{"rev":"3-6f8a9e7cae8a26f021653f2c27b0c67f"}}, +{"id":"postgres","key":"postgres","value":{"rev":"6-e8844a47c83ff3ef0a1ee7038b2046b2"}}, +{"id":"postgres-js","key":"postgres-js","value":{"rev":"3-bbe27a49ee9f8ae8789660e178d6459d"}}, +{"id":"postman","key":"postman","value":{"rev":"5-548538583f2e7ad448adae27f9a801e5"}}, +{"id":"postmark","key":"postmark","value":{"rev":"24-a6c61b346329e499d4a4a37dbfa446a2"}}, +{"id":"postmark-api","key":"postmark-api","value":{"rev":"3-79973af301aa820fc18c2c9d418adcd7"}}, +{"id":"postmessage","key":"postmessage","value":{"rev":"5-854bdb27c2a1af5b629b01f7d69691fe"}}, +{"id":"postpie","key":"postpie","value":{"rev":"10-88527e2731cd07a3b8ddec2608682700"}}, +{"id":"postprocess","key":"postprocess","value":{"rev":"5-513ecd54bf8df0ae73d2a50c717fd939"}}, +{"id":"potato","key":"potato","value":{"rev":"3-0f4cab343859692bf619e79cd9cc5be1"}}, +{"id":"pour","key":"pour","value":{"rev":"7-272bee63c5f19d12102198a23a4af902"}}, +{"id":"pow","key":"pow","value":{"rev":"22-58b557cd71ec0e95eef51dfd900e4736"}}, +{"id":"precious","key":"precious","value":{"rev":"19-b370292b258bcbca02c5d8861ebee0bb"}}, +{"id":"predicate","key":"predicate","value":{"rev":"3-1c6d1871fe71bc61457483793eecf7f9"}}, +{"id":"prefer","key":"prefer","value":{"rev":"11-236b9d16cd019e1d9af41e745bfed754"}}, +{"id":"prenup","key":"prenup","value":{"rev":"3-4c56ddf1ee22cd90c85963209736bc75"}}, +{"id":"pretty-json","key":"pretty-json","value":{"rev":"5-2dbb22fc9573c19e64725ac331a8d59c"}}, +{"id":"prettyfy","key":"prettyfy","value":{"rev":"3-fc7e39aad63a42533d4ac6d6bfa32325"}}, +{"id":"prick","key":"prick","value":{"rev":"10-71a02e1be02df2af0e6a958099be565a"}}, +{"id":"printf","key":"printf","value":{"rev":"5-2896b8bf90df19d4a432153211ca3a7e"}}, +{"id":"pro","key":"pro","value":{"rev":"5-e98adaf2f741e00953bbb942bbeb14d2"}}, +{"id":"probe_couchdb","key":"probe_couchdb","value":{"rev":"28-86f8918a3e64608f8009280fb28a983d"}}, +{"id":"process","key":"process","value":{"rev":"3-6865fc075d8083afd8e2aa266512447c"}}, +{"id":"procfile","key":"procfile","value":{"rev":"3-22dbb2289f5fb3060a8f7833b50116a4"}}, +{"id":"profile","key":"profile","value":{"rev":"29-5afee07fe4c334d9836fda1df51e1f2d"}}, +{"id":"profilejs","key":"profilejs","value":{"rev":"9-128c2b0e09624ee69a915cff20cdf359"}}, +{"id":"profiler","key":"profiler","value":{"rev":"13-4f1582fad93cac11daad5d5a67565e4f"}}, +{"id":"progress","key":"progress","value":{"rev":"7-bba60bc39153fa0fbf5e909b6df213b0"}}, +{"id":"progress-bar","key":"progress-bar","value":{"rev":"5-616721d3856b8e5a374f247404d6ab29"}}, +{"id":"progressify","key":"progressify","value":{"rev":"5-0379cbed5adc2c3f3ac6adf0307ec11d"}}, +{"id":"proj4js","key":"proj4js","value":{"rev":"5-7d209ce230f6a2d5931800acef436a06"}}, +{"id":"projectwatch","key":"projectwatch","value":{"rev":"15-d0eca46ffc3d9e18a51db2d772fa2778"}}, +{"id":"promise","key":"promise","value":{"rev":"3-1409350eb10aa9055ed13a5b59f0abc3"}}, +{"id":"promised-fs","key":"promised-fs","value":{"rev":"28-1d3e0dd1884e1c39a5d5e2d35bb1f911"}}, +{"id":"promised-http","key":"promised-http","value":{"rev":"8-3f8d560c800ddd44a617bf7d7c688392"}}, +{"id":"promised-io","key":"promised-io","value":{"rev":"11-e9a280e85c021cd8b77e524aac50fafb"}}, +{"id":"promised-traits","key":"promised-traits","value":{"rev":"14-62d0ac59d4ac1c6db99c0273020565ea"}}, +{"id":"promised-utils","key":"promised-utils","value":{"rev":"20-0c2488685eb8999c40ee5e7cfa4fd75d"}}, +{"id":"prompt","key":"prompt","value":{"rev":"32-d52a524c147e34c1258facab69660cc2"}}, +{"id":"props","key":"props","value":{"rev":"17-8c4c0bf1b69087510612c8d5ccbfbfeb"}}, +{"id":"proserver","key":"proserver","value":{"rev":"3-4b0a001404171eb0f6f3e5d73a35fcb1"}}, +{"id":"protege","key":"protege","value":{"rev":"150-9790c23d7b7eb5fb94cd5b8048bdbf10"}}, +{"id":"proto","key":"proto","value":{"rev":"6-29fe2869f34e2737b0cc2a0dbba8e397"}}, +{"id":"proto-list","key":"proto-list","value":{"rev":"3-0f64ff29a4a410d5e03a57125374b87b"}}, +{"id":"protobuf-stream","key":"protobuf-stream","value":{"rev":"3-950e621ce7eef306eff5f932a9c4cbae"}}, +{"id":"protodiv","key":"protodiv","value":{"rev":"9-ed8d84033943934eadf5d95dfd4d8eca"}}, +{"id":"proton","key":"proton","value":{"rev":"19-8ad32d57a3e71df786ff41ef8c7281f2"}}, +{"id":"protoparse","key":"protoparse","value":{"rev":"3-9fbcc3b26220f974d4b9c9c883a0260b"}}, +{"id":"prototype","key":"prototype","value":{"rev":"5-2a672703595e65f5d731a967b43655a7"}}, +{"id":"prowl","key":"prowl","value":{"rev":"5-ec480caa5a7db4f1ec2ce22d5eb1dad8"}}, +{"id":"prowler","key":"prowler","value":{"rev":"3-09747704f78c7c123fb1c719c4996924"}}, +{"id":"prox","key":"prox","value":{"rev":"5-0ac5f893b270a819d91f0c6581aca2a8"}}, +{"id":"proxify","key":"proxify","value":{"rev":"3-d24a979b708645328476bd42bd5aaba8"}}, +{"id":"proxino","key":"proxino","value":{"rev":"7-894cc6d453af00e5e39ebc8f0b0abe3a"}}, +{"id":"proxio","key":"proxio","value":{"rev":"55-a1b2744054b3dc3adc2f7f67d2c026a4"}}, +{"id":"proxy","key":"proxy","value":{"rev":"3-c6dd1a8b58e0ed7ac983c89c05ee987d"}}, +{"id":"proxy-by-url","key":"proxy-by-url","value":{"rev":"5-acfcf47f3575cea6594513ff459c5f2c"}}, +{"id":"pseudo","key":"pseudo","value":{"rev":"11-4d894a335036d96cdb9bb19f7b857293"}}, +{"id":"psk","key":"psk","value":{"rev":"17-375055bf6315476a37b5fadcdcb6b149"}}, +{"id":"pty","key":"pty","value":{"rev":"8-0b3ea0287fd23f882da27dabce4e3230"}}, +{"id":"pub-mix","key":"pub-mix","value":{"rev":"3-2c455b249167cbf6b1a6ea761bf119f4"}}, +{"id":"pubjs","key":"pubjs","value":{"rev":"3-a0ceab8bc6ec019dfcf9a8e16756bea0"}}, +{"id":"publicsuffix","key":"publicsuffix","value":{"rev":"8-1592f0714595c0ca0433272c60afc733"}}, +{"id":"publisher","key":"publisher","value":{"rev":"13-f2c8722f14732245d3ca8842fe5b7661"}}, +{"id":"pubnub-client","key":"pubnub-client","value":{"rev":"8-6e511a6dd2b7feb6cefe410facd61f53"}}, +{"id":"pubsub","key":"pubsub","value":{"rev":"11-6c6270bf95af417fb766c05f66b2cc9e"}}, +{"id":"pubsub.io","key":"pubsub.io","value":{"rev":"24-9686fe9ae3356966dffee99f53eaad2c"}}, +{"id":"pubsubd","key":"pubsubd","value":{"rev":"3-b1ff2fa958bd450933735162e9615449"}}, +{"id":"pulley","key":"pulley","value":{"rev":"13-f81ed698175ffd0b5b19357a623b8f15"}}, +{"id":"pulse","key":"pulse","value":{"rev":"9-da4bdabb6d7c189d05c8d6c64713e4ac"}}, +{"id":"pulverizr","key":"pulverizr","value":{"rev":"16-ffd4db4d2b1bfbd0b6ac794dca9e728e"}}, +{"id":"pulverizr-bal","key":"pulverizr-bal","value":{"rev":"5-dba279d07f3ed72990d10f11c5d10792"}}, +{"id":"punycode","key":"punycode","value":{"rev":"3-c0df35bb32d1490a4816161974610682"}}, +{"id":"puppy","key":"puppy","value":{"rev":"3-355fb490dba55efdf8840e2769cb7f41"}}, +{"id":"pure","key":"pure","value":{"rev":"7-b2da0d64ea12cea63bed940222bb36df"}}, +{"id":"purpose","key":"purpose","value":{"rev":"3-ef30ac479535bd603954c27ecb5d564a"}}, +{"id":"push-it","key":"push-it","value":{"rev":"35-2640be8ca8938768836520ce5fc7fff2"}}, +{"id":"pusher","key":"pusher","value":{"rev":"5-eb363d1e0ea2c59fd92a07ea642c5d03"}}, +{"id":"pusher-pipe","key":"pusher-pipe","value":{"rev":"11-11ab87d1288a8c7d11545fdab56616f6"}}, +{"id":"pushinator","key":"pushinator","value":{"rev":"15-6b2c37931bc9438e029a6af0cf97091c"}}, +{"id":"put","key":"put","value":{"rev":"12-4b05a7cdfdb24a980597b38781457cf5"}}, +{"id":"put-selector","key":"put-selector","value":{"rev":"1-1a9b3b8b5a44485b93966503370978aa"}}, +{"id":"putio","key":"putio","value":{"rev":"3-973b65e855e1cd0d3cc685542263cc55"}}, +{"id":"pwilang","key":"pwilang","value":{"rev":"43-49ad04f5abbdd9c5b16ec0271ab17520"}}, +{"id":"py","key":"py","value":{"rev":"3-aade832559d0fab88116aa794e3a9f35"}}, +{"id":"pygments","key":"pygments","value":{"rev":"3-2b2c96f39bdcb9ff38eb7d4bac7c90ba"}}, +{"id":"python","key":"python","value":{"rev":"15-706af811b5544a4aacc6ad1e9863e369"}}, +{"id":"q","key":"q","value":{"rev":"80-fd2397ad465750240d0f22a0abc53de5"}}, +{"id":"q-comm","key":"q-comm","value":{"rev":"17-972994947f097fdcffcfcb2277c966ce"}}, +{"id":"q-fs","key":"q-fs","value":{"rev":"68-958b01dd5bdc4da5ba3c1cd02c85fc0e"}}, +{"id":"q-http","key":"q-http","value":{"rev":"26-42a7db91b650386d920f52afe3e9161f"}}, +{"id":"q-io","key":"q-io","value":{"rev":"20-79f7b3d43bcbd53cc57b6531426738e2"}}, +{"id":"q-io-buffer","key":"q-io-buffer","value":{"rev":"5-05528d9a527da73357991bec449a1b76"}}, +{"id":"q-require","key":"q-require","value":{"rev":"12-e3fc0388e4d3e6d8a15274c3cc239712"}}, +{"id":"q-util","key":"q-util","value":{"rev":"10-94e0c392e70fec942aee0f024e5c090f"}}, +{"id":"qbox","key":"qbox","value":{"rev":"17-88f9148881ede94ae9dcbf4e1980aa69"}}, +{"id":"qfi","key":"qfi","value":{"rev":"3-a6052f02aec10f17085b09e4f9da1ce0"}}, +{"id":"qjscl","key":"qjscl","value":{"rev":"11-def1631b117a53cab5fd38ffec28d727"}}, +{"id":"qooxdoo","key":"qooxdoo","value":{"rev":"5-720d33ec2de3623d6535b3bdc8041d81"}}, +{"id":"qoper8","key":"qoper8","value":{"rev":"11-48fa2ec116bec46d64161e35b0f0cd86"}}, +{"id":"qq","key":"qq","value":{"rev":"23-6f7a5f158364bbf2e90a0c6eb1fbf8a9"}}, +{"id":"qqwry","key":"qqwry","value":{"rev":"10-bf0d6cc2420bdad92a1104c184e7e045"}}, +{"id":"qr","key":"qr","value":{"rev":"11-0a0120b7ec22bbcf76ff1d78fd4a7689"}}, +{"id":"qrcode","key":"qrcode","value":{"rev":"11-b578b6a76bffe996a0390e3d886b79bb"}}, +{"id":"qs","key":"qs","value":{"rev":"23-3da45c8c8a5eb33d45360d92b6072d37"}}, +{"id":"quack-array","key":"quack-array","value":{"rev":"5-6b676aa6273e4515ab5e7bfee1c331e0"}}, +{"id":"quadprog","key":"quadprog","value":{"rev":"7-c0ceeeb12735f334e8c7940ac1f0a896"}}, +{"id":"quadraticon","key":"quadraticon","value":{"rev":"66-1da88ea871e6f90967b9f65c0204309d"}}, +{"id":"quasi","key":"quasi","value":{"rev":"3-6fe0faa91d849938d8c92f91b0828395"}}, +{"id":"query","key":"query","value":{"rev":"13-635ff8d88c6a3f9d92f9ef465b14fb82"}}, +{"id":"query-engine","key":"query-engine","value":{"rev":"21-66feaee07df9fa1f625ac797e8f6b90b"}}, +{"id":"querystring","key":"querystring","value":{"rev":"5-2b509239fafba56319137bfbe1e9eeb7"}}, +{"id":"queue","key":"queue","value":{"rev":"3-5c4af574e5056f7e6ceb9bfefc1c632d"}}, +{"id":"queuelib","key":"queuelib","value":{"rev":"61-87c2abc94a5ad40af8193fac9a1d9f7e"}}, +{"id":"quickcheck","key":"quickcheck","value":{"rev":"7-64e6c1e9efc08a89abe3d01c414d1411"}}, +{"id":"quickserve","key":"quickserve","value":{"rev":"3-9c19f8ad7daf06182f42b8c7063b531f"}}, +{"id":"quip","key":"quip","value":{"rev":"8-0624055f5056f72bc719340c95e5111a"}}, +{"id":"qunit","key":"qunit","value":{"rev":"37-6e7fefdaffab8fc5fb92a391da227c38"}}, +{"id":"qunit-tap","key":"qunit-tap","value":{"rev":"22-0266cd1b5bb7cbab89fa52642f0e8277"}}, +{"id":"qwery","key":"qwery","value":{"rev":"66-29f9b44da544a3a9b4537a85ceace7c8"}}, +{"id":"qwery-mobile","key":"qwery-mobile","value":{"rev":"5-182264ca68c30519bf0d29cf1e15854b"}}, +{"id":"raZerdummy","key":"raZerdummy","value":{"rev":"7-1fa549e0cff60795b49cbd3732f32175"}}, +{"id":"rabbit.js","key":"rabbit.js","value":{"rev":"3-dbcd5cd590576673c65b34c44ff06bec"}}, +{"id":"rabblescay","key":"rabblescay","value":{"rev":"5-3fea196ffd581a842a24ab7bb2118fe2"}}, +{"id":"racer","key":"racer","value":{"rev":"51-41c65689a335d70fa6b55b9706b9c0fe"}}, +{"id":"radcouchdb","key":"radcouchdb","value":{"rev":"3-64ccb4d0acb2b11cbb1d3fcef5f9a68e"}}, +{"id":"radio-stream","key":"radio-stream","value":{"rev":"6-c5f80a0bef7bbaacdd22d92da3d09244"}}, +{"id":"railway","key":"railway","value":{"rev":"74-5ce92a45c7d11540b0e2b5a8455361ce"}}, +{"id":"railway-mailer","key":"railway-mailer","value":{"rev":"3-8df2fbe4af4d3b1f12557d8397bf0548"}}, +{"id":"railway-twitter","key":"railway-twitter","value":{"rev":"3-df984f182bb323052e36876e8e3a066c"}}, +{"id":"rand","key":"rand","value":{"rev":"11-abb69107c390e2a6dcec64cb72f36096"}}, +{"id":"random","key":"random","value":{"rev":"7-32550b221f3549b67f379c1c2dbc5c57"}}, +{"id":"random-data","key":"random-data","value":{"rev":"5-ae651ea36724105b8677ae489082ab4d"}}, +{"id":"range","key":"range","value":{"rev":"3-1d3925f30ffa6b5f3494d507fcef3aa1"}}, +{"id":"ranger","key":"ranger","value":{"rev":"17-6135a9a9d83cbd3945f1ce991f276cb8"}}, +{"id":"rap-battle","key":"rap-battle","value":{"rev":"3-6960516c0d27906bb9343805a5eb0e45"}}, +{"id":"raphael","key":"raphael","value":{"rev":"7-012f159593a82e4587ea024a5d4fbe41"}}, +{"id":"raphael-zoom","key":"raphael-zoom","value":{"rev":"3-aaab74bebbeb4241cade4f4d3c9b130e"}}, +{"id":"rapid","key":"rapid","value":{"rev":"8-ae0b05388c7904fc88c743e3dcde1d9d"}}, +{"id":"rasputin","key":"rasputin","value":{"rev":"3-87cdd9bd591606f4b8439e7a76681c7b"}}, +{"id":"rate-limiter","key":"rate-limiter","value":{"rev":"3-24cd20fef83ce02f17dd383b72f5f125"}}, +{"id":"rats","key":"rats","value":{"rev":"3-1ff1efb311451a17789da910eaf59fb6"}}, +{"id":"raydash","key":"raydash","value":{"rev":"7-96c345beb3564d2789d209d1fe695857"}}, +{"id":"rbytes","key":"rbytes","value":{"rev":"13-cf09d91347a646f590070e516f0c9bc9"}}, +{"id":"rdf","key":"rdf","value":{"rev":"3-9a5012d1fc10da762dbe285d0b317499"}}, +{"id":"rdf-raptor-parser","key":"rdf-raptor-parser","value":{"rev":"11-25c61e4d57cf67ee8a5afb6dfcf193e3"}}, +{"id":"rdfstore","key":"rdfstore","value":{"rev":"41-4499a73efc48ad07234e56fd4e27e4e0"}}, +{"id":"rdio","key":"rdio","value":{"rev":"5-fa20a8ab818a6150e38e9bb7744968f9"}}, +{"id":"rdx","key":"rdx","value":{"rev":"3-e1db5ee3aad06edd9eadcdaa8aaba149"}}, +{"id":"rea","key":"rea","value":{"rev":"3-f17ceeb35337bc9ccf9cb440d5c4dfaf"}}, +{"id":"read-files","key":"read-files","value":{"rev":"3-e08fac4abcdbc7312beb0362ff4427b4"}}, +{"id":"readability","key":"readability","value":{"rev":"3-475601a3d99d696763872c52bce6a155"}}, +{"id":"readabilitySAX","key":"readabilitySAX","value":{"rev":"19-83277777f3f721be26aca28c66227b01"}}, +{"id":"ready.js","key":"ready.js","value":{"rev":"39-8e309b8b274722c051c67f90885571e8"}}, +{"id":"readyjslint","key":"readyjslint","value":{"rev":"3-0a3742129bfbe07d47fcfb9ff67d39b2"}}, +{"id":"recaptcha","key":"recaptcha","value":{"rev":"8-8895926476be014fbe08b301294bf37b"}}, +{"id":"recaptcha-async","key":"recaptcha-async","value":{"rev":"9-3033260389f8afdb5351974119b78ca2"}}, +{"id":"recline","key":"recline","value":{"rev":"189-b56ab8c7791201dccf4aea2532189f1d"}}, +{"id":"recon","key":"recon","value":{"rev":"13-79cbddefb00fec6895342d18609cadb1"}}, +{"id":"reconf","key":"reconf","value":{"rev":"5-0596988db2cf9bf5921502a2aab24ade"}}, +{"id":"redback","key":"redback","value":{"rev":"37-03b390f69cacf42a46e393b7cf297d09"}}, +{"id":"rede","key":"rede","value":{"rev":"3-ee74c2fd990c7780dc823e22a9c3bef2"}}, +{"id":"redecard","key":"redecard","value":{"rev":"13-7dec5a50c34132a2f20f0f143d6b5215"}}, +{"id":"redim","key":"redim","value":{"rev":"15-91c9fd560d1ce87d210b461c52a6d258"}}, +{"id":"redis","key":"redis","value":{"rev":"98-ec237259e8ef5c42a76ff260be50f8fd"}}, +{"id":"redis-channels","key":"redis-channels","value":{"rev":"3-8efc40a25fd18c1c9c41bbaeedb0b22f"}}, +{"id":"redis-client","key":"redis-client","value":{"rev":"3-3376054236e651e7dfcf91be8632fd0e"}}, +{"id":"redis-completer","key":"redis-completer","value":{"rev":"11-9e5bf1f8d37df681e7896252809188d3"}}, +{"id":"redis-keyspace","key":"redis-keyspace","value":{"rev":"25-245f2375741eb3e574dfce9f2da2b687"}}, +{"id":"redis-lua","key":"redis-lua","value":{"rev":"7-81f3dd3a4601271818f15278f495717a"}}, +{"id":"redis-namespace","key":"redis-namespace","value":{"rev":"3-ddf52a172db190fe788aad4116b1cb29"}}, +{"id":"redis-node","key":"redis-node","value":{"rev":"24-7a1e9098d8b5a42a99ca71a01b0d7672"}}, +{"id":"redis-queue","key":"redis-queue","value":{"rev":"3-9896587800c4b98ff291b74210c16b6e"}}, +{"id":"redis-session-store","key":"redis-session-store","value":{"rev":"3-2229501ecf817f9ca60ff2c7721ddd73"}}, +{"id":"redis-tag","key":"redis-tag","value":{"rev":"9-6713e8e91a38613cfef09d7b40f4df71"}}, +{"id":"redis-url","key":"redis-url","value":{"rev":"5-f53545a0039b512a2f7afd4ba2e08773"}}, +{"id":"redis-user","key":"redis-user","value":{"rev":"11-a8c0f6d40cbfbb6183a46e121f31ec06"}}, +{"id":"redis2json","key":"redis2json","value":{"rev":"5-dd96f78f8db0bf695346c95c2ead1307"}}, +{"id":"redis_objects","key":"redis_objects","value":{"rev":"3-499fe6dd07e7a3839111b1892b97f54c"}}, +{"id":"redisev","key":"redisev","value":{"rev":"3-8e857dbe2341292c6e170a7bfe3fa81b"}}, +{"id":"redisfs","key":"redisfs","value":{"rev":"69-d9c90256d32348fdca7a4e646ab4d551"}}, +{"id":"redisify","key":"redisify","value":{"rev":"3-03fce3095b4129e71280d278f11121ba"}}, +{"id":"rediskit","key":"rediskit","value":{"rev":"5-6a0324708f45d884a492cbc408137059"}}, +{"id":"redisql","key":"redisql","value":{"rev":"6-b31802eb37910cb74bd3c9f7b477c025"}}, +{"id":"redmark","key":"redmark","value":{"rev":"5-8724ab00513b6bd7ddfdcd3cc2e0a4e8"}}, +{"id":"redmess","key":"redmess","value":{"rev":"13-14f58666444993ce899cd2260cdc9140"}}, +{"id":"redobj","key":"redobj","value":{"rev":"7-7ebbeffc306f4f7ff9b53ee57e1a250e"}}, +{"id":"redpack","key":"redpack","value":{"rev":"73-58b3fb3bcadf7d80fbe97d9e82d4928b"}}, +{"id":"reds","key":"reds","value":{"rev":"9-baebb36b92887d93fd79785a8c1e6355"}}, +{"id":"reed","key":"reed","value":{"rev":"45-5580f319dc3b5bfb66612ed5c7e17337"}}, +{"id":"reflect","key":"reflect","value":{"rev":"18-b590003cd55332160a5e5327e806e851"}}, +{"id":"reflect-builder","key":"reflect-builder","value":{"rev":"3-453d618b263f9452c0b6bbab0a701f49"}}, +{"id":"reflect-next","key":"reflect-next","value":{"rev":"9-4f2b27a38985d81e906e824321af7713"}}, +{"id":"reflect-tree-builder","key":"reflect-tree-builder","value":{"rev":"5-5f801f53e126dc8a72e13b1417904ce6"}}, +{"id":"reflect-unbuilder","key":"reflect-unbuilder","value":{"rev":"5-f36fd4182fd465a743198b5188697db9"}}, +{"id":"reflectjs","key":"reflectjs","value":{"rev":"3-e03bdb411ffcdd901b896a1cf43eea69"}}, +{"id":"reflex","key":"reflex","value":{"rev":"3-e8bb6b6de906265114b22036832ef650"}}, +{"id":"refmate","key":"refmate","value":{"rev":"3-7d44c45a2eb39236ad2071c84dc0fbba"}}, +{"id":"regext","key":"regext","value":{"rev":"4-97ca5c25fd2f3dc4bd1f3aa821d06f0f"}}, +{"id":"reid-yui3","key":"reid-yui3","value":{"rev":"5-cab8f6e22dfa9b9c508a5dd312bf56b0"}}, +{"id":"rel","key":"rel","value":{"rev":"7-f447870ac7a078f742e4295896646241"}}, +{"id":"relative-date","key":"relative-date","value":{"rev":"5-d0fa11f8100da888cbcce6e96d76b2e4"}}, +{"id":"reloadOnUpdate","key":"reloadOnUpdate","value":{"rev":"9-e7d4c215578b779b2f888381d398bd79"}}, +{"id":"reloaded","key":"reloaded","value":{"rev":"3-dba828b9ab73fc7ce8e47f98068bce8c"}}, +{"id":"remap","key":"remap","value":{"rev":"5-825ac1783df84aba3255c1d39f32ac00"}}, +{"id":"remedial","key":"remedial","value":{"rev":"17-9bb17db015e96db3c833f84d9dbd972a"}}, +{"id":"remote-console","key":"remote-console","value":{"rev":"6-104bae3ba9e4b0a8f772d0b8dc37007e"}}, +{"id":"remote_js","key":"remote_js","value":{"rev":"3-6c0e3058c33113346c037c59206ac0ec"}}, +{"id":"render","key":"render","value":{"rev":"27-fc8be4e9c50e49fb42df83e9446a1f58"}}, +{"id":"renode","key":"renode","value":{"rev":"11-107a3e15a987393157b47125487af296"}}, +{"id":"reparse","key":"reparse","value":{"rev":"10-210ec92e82f5a8515f45d20c7fa2f164"}}, +{"id":"repl","key":"repl","value":{"rev":"3-295279fe20b9ac54b2a235a6bc7013aa"}}, +{"id":"repl-edit","key":"repl-edit","value":{"rev":"18-eb2e604ab8bb65685376459beb417a31"}}, +{"id":"repl-utils","key":"repl-utils","value":{"rev":"7-fc31547ecb53e7e36610cdb68bcec582"}}, +{"id":"replace","key":"replace","value":{"rev":"17-a8976fcdbeb08e27ee2f0fc69ccd7c9d"}}, +{"id":"replica","key":"replica","value":{"rev":"3-f9dae960f91e8dc594f43b004f516d5f"}}, +{"id":"replicate","key":"replicate","value":{"rev":"3-3d6e52af6ff36c02139f619c7e5599c6"}}, +{"id":"replique","key":"replique","value":{"rev":"5-72d990b7d9ce9ff107d96be17490226a"}}, +{"id":"req2","key":"req2","value":{"rev":"3-712151f335b25b5bdef428982d77d0e0"}}, +{"id":"reqhooks","key":"reqhooks","value":{"rev":"17-2f0f0b73545bb1936f449a1ec4a28011"}}, +{"id":"request","key":"request","value":{"rev":"55-0d0b00eecde877ca5cd4ad9e0badc4d1"}}, +{"id":"require","key":"require","value":{"rev":"15-59e9fa05a9de52ee2a818c045736452b"}}, +{"id":"require-analyzer","key":"require-analyzer","value":{"rev":"72-f759f0cdc352df317df29791bfe451f1"}}, +{"id":"require-kiss","key":"require-kiss","value":{"rev":"5-f7ef9d7beda584e9c95635a281a01587"}}, +{"id":"require-like","key":"require-like","value":{"rev":"7-29d5de79e7ff14bb02da954bd9a2ee33"}}, +{"id":"requireincontext","key":"requireincontext","value":{"rev":"5-988ff7c27a21e527ceeb50cbedc8d1b0"}}, +{"id":"requirejs","key":"requirejs","value":{"rev":"3-e609bc91d12d698a17aa51bb50a50509"}}, +{"id":"requirejson","key":"requirejson","value":{"rev":"3-2b8173e58d08034a53a3226c464b1dc8"}}, +{"id":"reqwest","key":"reqwest","value":{"rev":"57-5aa2c1ed17b1e3630859bcad85559e6a"}}, +{"id":"resig-class","key":"resig-class","value":{"rev":"3-16b1a2cdb3224f2043708436dbac4395"}}, +{"id":"resistance","key":"resistance","value":{"rev":"9-9cacbf5fa8318419b4751034a511b8c1"}}, +{"id":"resmin","key":"resmin","value":{"rev":"17-a9c8ded5073118748d765784ca4ea069"}}, +{"id":"resolve","key":"resolve","value":{"rev":"11-bba3470bc93a617ccf9fb6c12097c793"}}, +{"id":"resource-router","key":"resource-router","value":{"rev":"13-7b2991958da4d7701c51537192ca756c"}}, +{"id":"resourcer","key":"resourcer","value":{"rev":"3-4e8b5493d6fcdf147f53d3aaa731a509"}}, +{"id":"response","key":"response","value":{"rev":"3-c5cadf4e5dd90dc1022b92a67853b0f8"}}, +{"id":"resque","key":"resque","value":{"rev":"12-e2f5e1bc3e53ac0a992d1a7da7da0d14"}}, +{"id":"rest-in-node","key":"rest-in-node","value":{"rev":"3-41d1ba925857302211bd0bf9d19975f9"}}, +{"id":"rest-mongo","key":"rest-mongo","value":{"rev":"3-583d2a4b672d6d7e7ad26d0b6df20b45"}}, +{"id":"rest.node","key":"rest.node","value":{"rev":"3-2ed59ba9dcc97123632dfdfaea2559ed"}}, +{"id":"restalytics","key":"restalytics","value":{"rev":"11-5fb3cd8e95b37f1725922fa6fbb146e0"}}, +{"id":"restarter","key":"restarter","value":{"rev":"52-ab0a4fe59128b8848ffd88f9756d0049"}}, +{"id":"restartr","key":"restartr","value":{"rev":"12-d3b86e43e7df7697293db65bb1a1ae65"}}, +{"id":"restify","key":"restify","value":{"rev":"132-054bdc85bebc6221a07dda186238b4c3"}}, +{"id":"restler","key":"restler","value":{"rev":"13-f5392d9dd22e34ce3bcc307c51c889b3"}}, +{"id":"restler-aaronblohowiak","key":"restler-aaronblohowiak","value":{"rev":"8-28b231eceb667153e10effcb1ebeb989"}}, +{"id":"restmvc.js","key":"restmvc.js","value":{"rev":"25-d57b550754437580c447adf612c87d9a"}}, +{"id":"resware","key":"resware","value":{"rev":"9-a5ecbc53fefb280c5d1e3efd822704ff"}}, +{"id":"retrie","key":"retrie","value":{"rev":"7-28ea803ad6b119928ac792cbc8f475c9"}}, +{"id":"retro","key":"retro","value":{"rev":"3-94c3aec940e28869554cbb8449d9369e"}}, +{"id":"retry","key":"retry","value":{"rev":"19-89f3ef664c6fa48ff33a0b9f7e798f15"}}, +{"id":"reut","key":"reut","value":{"rev":"23-d745dd7f8606275848a299ad7c38ceb7"}}, +{"id":"rewrite","key":"rewrite","value":{"rev":"3-5cb91fd831d0913e89354f53b875137d"}}, +{"id":"rex","key":"rex","value":{"rev":"39-59025e6947e5f197f124d24a5393865f"}}, +{"id":"rfb","key":"rfb","value":{"rev":"34-db6e684ac9366a0e3658a508a2187ae1"}}, +{"id":"rhyme","key":"rhyme","value":{"rev":"7-27347762f3f5bfa07307da4e476c2d52"}}, +{"id":"riak-js","key":"riak-js","value":{"rev":"55-11d4ee4beb566946f3968abdf1c4b0ef"}}, +{"id":"riakqp","key":"riakqp","value":{"rev":"7-83f562e6907431fcee56a9408ac6d2c1"}}, +{"id":"rightjs","key":"rightjs","value":{"rev":"9-d53ae4c4f5af3bbbe18d7c879e5bdd1b"}}, +{"id":"rimraf","key":"rimraf","value":{"rev":"17-3ddc3f3f36618712e5f4f27511836e7a"}}, +{"id":"rio","key":"rio","value":{"rev":"11-7c6249c241392b51b9142ca1b228dd4e"}}, +{"id":"ristretto","key":"ristretto","value":{"rev":"3-beb22d7a575e066781f1fd702c4572d7"}}, +{"id":"roast","key":"roast","value":{"rev":"32-17cb066823afab1656196a2fe81246cb"}}, +{"id":"robb","key":"robb","value":{"rev":"5-472ed7ba7928131d86a05fcae89b9f93"}}, +{"id":"robots","key":"robots","value":{"rev":"9-afac82b944045c82acb710cc98c7311d"}}, +{"id":"robotskirt","key":"robotskirt","value":{"rev":"63-29a66420951812d421bf6728f67e710c"}}, +{"id":"robotstxt","key":"robotstxt","value":{"rev":"25-1e01cac90f4570d35ab20232feaeebfa"}}, +{"id":"rocket","key":"rocket","value":{"rev":"27-b0f1ff02e70b237bcf6a5b46aa9b74df"}}, +{"id":"roil","key":"roil","value":{"rev":"48-6b00c09b576fe195546bd031763c0d79"}}, +{"id":"roll","key":"roll","value":{"rev":"5-d3fed9271132eb6c954b3ac6c7ffccf0"}}, +{"id":"rollin","key":"rollin","value":{"rev":"3-bd461bc810c12cfcea94109ba9a2ab39"}}, +{"id":"ron","key":"ron","value":{"rev":"5-913645180d29f377506bcd5292d3cb49"}}, +{"id":"rondo","key":"rondo","value":{"rev":"3-9bed539bbaa0cb978f5c1b711d70cd50"}}, +{"id":"ronn","key":"ronn","value":{"rev":"12-b1b1a1d47376fd11053e2b81fe772c4c"}}, +{"id":"rot13","key":"rot13","value":{"rev":"10-a41e8b581812f02ca1a593f6da0c52dc"}}, +{"id":"router","key":"router","value":{"rev":"26-a7883048759715134710d68f179da18b"}}, +{"id":"routes","key":"routes","value":{"rev":"3-d841826cfd365d8f383a9c4f4288933c"}}, +{"id":"rpc","key":"rpc","value":{"rev":"5-5896f380115a7a606cd7cbbc6d113f05"}}, +{"id":"rpc-socket","key":"rpc-socket","value":{"rev":"17-8743dc1a1f5ba391fc5c7d432cc6eeba"}}, +{"id":"rq","key":"rq","value":{"rev":"7-ba263671c3a3b52851dc7d5e6bd4ef8c"}}, +{"id":"rql","key":"rql","value":{"rev":"1-ac5ec10ed5e41a10a289f26aff4def5a"}}, +{"id":"rqueue","key":"rqueue","value":{"rev":"12-042898704386874c70d0ffaeea6ebc78"}}, +{"id":"rrd","key":"rrd","value":{"rev":"9-488adf135cf29cd4725865a8f25a57ba"}}, +{"id":"rsa","key":"rsa","value":{"rev":"8-7d6f981d72322028c3bebb7141252e98"}}, +{"id":"rss","key":"rss","value":{"rev":"3-0a97b20a0a9051876d779af7663880bd"}}, +{"id":"rssee","key":"rssee","value":{"rev":"9-da2599eae68e50c1695fd7f8fcba2b30"}}, +{"id":"rumba","key":"rumba","value":{"rev":"3-7a3827fa6eca2d02d3189cbad38dd6ca"}}, +{"id":"run","key":"run","value":{"rev":"9-0145abb61e6107a3507624928db461da"}}, +{"id":"runforcover","key":"runforcover","value":{"rev":"3-a36b00ea747c98c7cd7afebf1e1b203c"}}, +{"id":"runlol","key":"runlol","value":{"rev":"3-3c97684baaa3d5b31ca404e8a616fe41"}}, +{"id":"runner","key":"runner","value":{"rev":"11-b7ceeedf7b0dde19c809642f1537723a"}}, +{"id":"runways","key":"runways","value":{"rev":"5-f216f5fa6af7ccc7566cdd06cf424980"}}, +{"id":"rw-translate","key":"rw-translate","value":{"rev":"3-16d2beb17a27713e10459ce368c5d087"}}, +{"id":"rx","key":"rx","value":{"rev":"5-ea2a04ecf38963f8a99b7a408b45af31"}}, +{"id":"rzr","key":"rzr","value":{"rev":"4-6a137fa752709531f2715de5a213b326"}}, +{"id":"s-tpl","key":"s-tpl","value":{"rev":"3-1533cf9657cfe669a25da96b6a655f5c"}}, +{"id":"s3-post","key":"s3-post","value":{"rev":"9-ad3b268bc6754852086b50c2f465c02c"}}, +{"id":"safis","key":"safis","value":{"rev":"3-f1494d0dae2b7dfd60beba5a72412ad2"}}, +{"id":"saiga","key":"saiga","value":{"rev":"22-0c67e8cf8f4b6e8ea30552ffc57d222a"}}, +{"id":"sailthru-client","key":"sailthru-client","value":{"rev":"7-1c9c236050868fb8dec4a34ded2436d3"}}, +{"id":"saimonmoore-cradle","key":"saimonmoore-cradle","value":{"rev":"3-5059616ab0f0f10e1c2d164f686e127e"}}, +{"id":"salesforce","key":"salesforce","value":{"rev":"7-f88cbf517b1fb900358c97b2c049960f"}}, +{"id":"sam","key":"sam","value":{"rev":"7-d7e24d2e94411a17cbedfbd8083fd878"}}, +{"id":"sandbox","key":"sandbox","value":{"rev":"10-0b51bed24e0842f99744dcf5d79346a6"}}, +{"id":"sandboxed-module","key":"sandboxed-module","value":{"rev":"15-bf8fa69d15ae8416d534e3025a16d87d"}}, +{"id":"sanitizer","key":"sanitizer","value":{"rev":"32-6ea8f4c77cd17253c27d0d87e0790678"}}, +{"id":"sapnwrfc","key":"sapnwrfc","value":{"rev":"3-0bc717109ffcd5265ae24f00416a0281"}}, +{"id":"sardines","key":"sardines","value":{"rev":"7-82712731b5af112ca43b9e3fe9975bb0"}}, +{"id":"sargam","key":"sargam","value":{"rev":"3-6b4c70f4b2bcd2add43704bf40c44507"}}, +{"id":"sasl","key":"sasl","value":{"rev":"4-44a6e12b561b112a574ec9e0c4a8843f"}}, +{"id":"sass","key":"sass","value":{"rev":"14-46bcee5423a1efe22f039e116bb7a77c"}}, +{"id":"satisfic","key":"satisfic","value":{"rev":"3-c6e9a2e65a0e55868cea708bcf7b11cf"}}, +{"id":"sax","key":"sax","value":{"rev":"30-58c5dd2c3367522974406bbf29204a40"}}, +{"id":"say","key":"say","value":{"rev":"10-95f31672af6166ea9099d92706c49ed1"}}, +{"id":"sayndo","key":"sayndo","value":{"rev":"51-fd93715c5ff0fcaa68e4e13c2b51ba61"}}, +{"id":"sc-handlebars","key":"sc-handlebars","value":{"rev":"3-b424c3a66fd0e538b068c6046f404084"}}, +{"id":"scgi-server","key":"scgi-server","value":{"rev":"9-3364b5c39985ea8f3468b6abb53d5ea6"}}, +{"id":"scheduler","key":"scheduler","value":{"rev":"25-72bc526bb49b0dd42ad5917d38ea3b18"}}, +{"id":"schema","key":"schema","value":{"rev":"21-166410ae972449965dfa1ce615971168"}}, +{"id":"schema-builder","key":"schema-builder","value":{"rev":"3-bce4612e1e5e6a8a85f16326d3810145"}}, +{"id":"schema-org","key":"schema-org","value":{"rev":"15-59b3b654de0380669d0dcd7573c3b7a1"}}, +{"id":"scone","key":"scone","value":{"rev":"15-85ed2dd4894e896ca1c942322753b76b"}}, +{"id":"scooj","key":"scooj","value":{"rev":"3-1be2074aeba4df60594c03f3e59c7734"}}, +{"id":"scope","key":"scope","value":{"rev":"65-9d7eb8c5fc6c54d8e2c49f4b4b4f5166"}}, +{"id":"scope-provider","key":"scope-provider","value":{"rev":"22-2c25a0b260fd18236d5245c8250d990e"}}, +{"id":"scoped-http-client","key":"scoped-http-client","value":{"rev":"3-afa954fe6d1c8b64a1240b77292d99b5"}}, +{"id":"scottbot","key":"scottbot","value":{"rev":"3-d812ddb4af49976c391f14aeecf93180"}}, +{"id":"scraper","key":"scraper","value":{"rev":"19-e2166b3de2b33d7e6baa04c704887fa6"}}, +{"id":"scrapinode","key":"scrapinode","value":{"rev":"15-ae5bf5085d8c4d5390f7c313b0ad13d2"}}, +{"id":"scrappy-do","key":"scrappy-do","value":{"rev":"3-868f5d299da401112e3ed9976194f1ee"}}, +{"id":"scrapr","key":"scrapr","value":{"rev":"3-d700714a56e8f8b8e9b3bc94274f4a24"}}, +{"id":"scrawl","key":"scrawl","value":{"rev":"3-a70a2905b9a1d2f28eb379c14363955f"}}, +{"id":"scribe","key":"scribe","value":{"rev":"5-4cefaaf869ba8e6ae0257e5705532fbe"}}, +{"id":"scriptTools","key":"scriptTools","value":{"rev":"7-1b66b7f02f2f659ae224057afac60bcf"}}, +{"id":"scriptbroadcast","key":"scriptbroadcast","value":{"rev":"10-3cdc4dae471445b7e08e6fc37c2481e6"}}, +{"id":"scriptjs","key":"scriptjs","value":{"rev":"38-9a522df4f0707d47c904f6781fd97ff6"}}, +{"id":"scrowser","key":"scrowser","value":{"rev":"3-a76938b1f84db0793941dba1f84f4c2f"}}, +{"id":"scss","key":"scss","value":{"rev":"10-49a4ad40eca3c797add57986c74e100b"}}, +{"id":"scylla","key":"scylla","value":{"rev":"10-2c5a1efed63c0ac3a3e75861ee323af4"}}, +{"id":"sdl","key":"sdl","value":{"rev":"40-3df0824da620098c0253b5330c6b0c5c"}}, +{"id":"sdlmixer","key":"sdlmixer","value":{"rev":"4-91455739802a98a5549f6c2b8118758d"}}, +{"id":"search","key":"search","value":{"rev":"9-8f696da412a6ccd07c3b8f22cec315cb"}}, +{"id":"searchjs","key":"searchjs","value":{"rev":"3-59418ce307d41de5649dfc158be51adf"}}, +{"id":"searchparser","key":"searchparser","value":{"rev":"3-a84719692ee33c88f3419f033b839f7a"}}, +{"id":"sechash","key":"sechash","value":{"rev":"11-20db8651628dcf6e8cbbc9bf9b2c4f12"}}, +{"id":"secret","key":"secret","value":{"rev":"7-ac44b38fa32b3f5ebc8fd03b02ec69ec"}}, +{"id":"seedrandom","key":"seedrandom","value":{"rev":"3-becb92de803208672887fc22a1a33694"}}, +{"id":"seek","key":"seek","value":{"rev":"3-d778b8d56582e15d409e2346b86caa53"}}, +{"id":"sel","key":"sel","value":{"rev":"19-94c8bc0872d2da7eab2b35daff7a3b5d"}}, +{"id":"select","key":"select","value":{"rev":"5-43593bfec39caaf1a0bc1fedc96d0dce"}}, +{"id":"selenium","key":"selenium","value":{"rev":"3-8ae8ac7a491b813fd011671e0d494f20"}}, +{"id":"selfish","key":"selfish","value":{"rev":"17-827856c3f3b9a3fdd1758477a24bf706"}}, +{"id":"selleck","key":"selleck","value":{"rev":"13-b8325fcdb383397041e4a408b40d708c"}}, +{"id":"semver","key":"semver","value":{"rev":"25-b2aea0cc920a9981cd429442a3fd62f6"}}, +{"id":"sendgrid","key":"sendgrid","value":{"rev":"3-047e2ad730390bac7cf72b7fc3856c1c"}}, +{"id":"sendgrid-api","key":"sendgrid-api","value":{"rev":"5-6e951b0d60a1b7c778fbf548d4e3aed8"}}, +{"id":"sendgrid-web","key":"sendgrid-web","value":{"rev":"3-dc77d2dbcedfcbe4e497958a2a070cfd"}}, +{"id":"sentry","key":"sentry","value":{"rev":"7-57af332354cbd37ce1c743b424b27dd0"}}, +{"id":"seq","key":"seq","value":{"rev":"77-33a8f54017402835c8542945a5c0a443"}}, +{"id":"sequelize","key":"sequelize","value":{"rev":"63-4c28ad13b73549aad7edc57378b21854"}}, +{"id":"sequence","key":"sequence","value":{"rev":"3-914f8010dc12aec0749ddb719f5ac82d"}}, +{"id":"sequencer","key":"sequencer","value":{"rev":"7-d83e687509678c0f5bcf15e5297677c0"}}, +{"id":"sequent","key":"sequent","value":{"rev":"3-cc6f26ab708c7681fa7d9e3bc15d19c0"}}, +{"id":"serializer","key":"serializer","value":{"rev":"7-a0d13120e2d5cfaa6e453b085280fa08"}}, +{"id":"serialport","key":"serialport","value":{"rev":"32-dc365d057a4f46e9f140dc36d6cc825a"}}, +{"id":"serialportify","key":"serialportify","value":{"rev":"3-1bf4ad9c5ebb5d96ca91fc03a10b5443"}}, +{"id":"serialq","key":"serialq","value":{"rev":"3-5897fcd0fca7d8312e61dbcb93790a71"}}, +{"id":"series","key":"series","value":{"rev":"11-0374191f646c277c51602ebe73033b6a"}}, +{"id":"serve","key":"serve","value":{"rev":"11-560c0c1bdeb3348c7a7d18265d27988e"}}, +{"id":"servedir","key":"servedir","value":{"rev":"18-17cffd8d8326b26e7d9319c79d601dda"}}, +{"id":"server-backbone-redis","key":"server-backbone-redis","value":{"rev":"13-c56419457002aa4fa23b142634882594"}}, +{"id":"server-tracker","key":"server-tracker","value":{"rev":"21-f620e295079a8b0acd29fa1a1469100c"}}, +{"id":"service","key":"service","value":{"rev":"11-07533f9e5e854248c0a1d99e911fa419"}}, +{"id":"sesame","key":"sesame","value":{"rev":"19-1e7ad5d030566f4c67027cc5925a2bdb"}}, +{"id":"sesh","key":"sesh","value":{"rev":"4-1682b3ced38e95f2a11a2f545a820bd5"}}, +{"id":"session","key":"session","value":{"rev":"6-a798bf4cd7d127d0111da7cdc3e058a4"}}, +{"id":"session-mongoose","key":"session-mongoose","value":{"rev":"3-b089c8d365d7de3e659cfa7080697dba"}}, +{"id":"sessionvoc-client","key":"sessionvoc-client","value":{"rev":"23-0f9ed8cd4af55f2aae17cb841247b818"}}, +{"id":"set","key":"set","value":{"rev":"3-a285b30a9c1545b427ebd882bc53d8b2"}}, +{"id":"setInterval","key":"setInterval","value":{"rev":"3-0557f666d05223391466547f52cfff42"}}, +{"id":"setTimeout","key":"setTimeout","value":{"rev":"3-e3c059c93763967ddff5974471f227f8"}}, +{"id":"setochka","key":"setochka","value":{"rev":"3-d559e24618b4fc2d5fc4ef44bccb68be"}}, +{"id":"settings","key":"settings","value":{"rev":"5-4af85bb564a330886c79682d2f1d927c"}}, +{"id":"sexy","key":"sexy","value":{"rev":"7-e57fa6bca5d89be86467786fb9f9b997"}}, +{"id":"sexy-args","key":"sexy-args","value":{"rev":"3-715d7d57234220bd79c78772d2566355"}}, +{"id":"sfaClient","key":"sfaClient","value":{"rev":"3-5d9ddd6ea05d7ef366dbf4f66dd4f642"}}, +{"id":"sfml","key":"sfml","value":{"rev":"10-766c876cd1cc220f776e2fa3c1d9efbb"}}, +{"id":"sh","key":"sh","value":{"rev":"5-3ce779be28550e831cf3c0140477376c"}}, +{"id":"sha1","key":"sha1","value":{"rev":"3-66d4b67ace9c65ae8f03d6dd0647ff6b"}}, +{"id":"sha1_file","key":"sha1_file","value":{"rev":"7-eb25e9c5f470a1b80c1697a952a1c5ed"}}, +{"id":"shadows","key":"shadows","value":{"rev":"5-d6a1a21871c733f34495592307ab7961"}}, +{"id":"share","key":"share","value":{"rev":"15-ef81a004f0e115040dcc1510f6302fa9"}}, +{"id":"shared-views","key":"shared-views","value":{"rev":"11-2c83145e6deb3493e44805c92b58929e"}}, +{"id":"sharedjs","key":"sharedjs","value":{"rev":"9-d43a861b02aa88ae22810f9771d774ec"}}, +{"id":"shell","key":"shell","value":{"rev":"39-7e2042bd6f485b827d53f5f727164d6f"}}, +{"id":"shelld","key":"shelld","value":{"rev":"3-118a62ff31d85e61b78bbd97333a7330"}}, +{"id":"shimify","key":"shimify","value":{"rev":"3-dde4d45bcbd2f6f7faaeb7f8c31d5e8b"}}, +{"id":"ship","key":"ship","value":{"rev":"3-5f294fc3841c901d6cea7f3862625d95"}}, +{"id":"shmakowiki","key":"shmakowiki","value":{"rev":"15-079ae4595d1ddf019d22d3d0ac49a188"}}, +{"id":"shorten","key":"shorten","value":{"rev":"3-ed1395b35faf4639e25dacbb038cf237"}}, +{"id":"shorttag","key":"shorttag","value":{"rev":"5-21d15e4cb8b62aeefe23edc99ff768ec"}}, +{"id":"shorturl","key":"shorturl","value":{"rev":"5-58f78b2a5318ec7da8a5f88739f2796b"}}, +{"id":"shorty","key":"shorty","value":{"rev":"9-17f804ff6e94295549cca6fd534b89de"}}, +{"id":"shotenjin","key":"shotenjin","value":{"rev":"3-91a7864d216a931095e9999133d3c41f"}}, +{"id":"should","key":"should","value":{"rev":"19-ed561071d434f319080fa5d0f647dd93"}}, +{"id":"shovel","key":"shovel","value":{"rev":"5-0168a02a8fa8d7856a5f4a5c18706724"}}, +{"id":"showdown","key":"showdown","value":{"rev":"3-7be5479804451db3faed968fa428af56"}}, +{"id":"shredder","key":"shredder","value":{"rev":"3-93e12ab8822ba5fe86d662f124a8ad1a"}}, +{"id":"shrtn","key":"shrtn","value":{"rev":"19-5883692283903e3166b478b98bcad999"}}, +{"id":"shuffle","key":"shuffle","value":{"rev":"3-71c96da1843abb468649ab0806e6b9d3"}}, +{"id":"sibilant","key":"sibilant","value":{"rev":"18-4dcb400eb9ed9cb1c7826d155807f6d0"}}, +{"id":"sideline","key":"sideline","value":{"rev":"15-84f284a9277718bf90f68dc9351500ae"}}, +{"id":"siesta","key":"siesta","value":{"rev":"5-ff99a009e6e5897c6322237c51d0a142"}}, +{"id":"sign","key":"sign","value":{"rev":"3-2cf70313707c6a046a6ceca61431ea5e"}}, +{"id":"signals","key":"signals","value":{"rev":"7-c756190260cd3ea43e6d44e4722164cb"}}, +{"id":"signature","key":"signature","value":{"rev":"3-fb7552c27ace0f9321ec7438057a37bf"}}, +{"id":"signed-request","key":"signed-request","value":{"rev":"13-9f1563535dcc1a83338a7375d8240f35"}}, +{"id":"signer","key":"signer","value":{"rev":"5-32c9909da2c4dfb284b858164c03cfe0"}}, +{"id":"simple-class","key":"simple-class","value":{"rev":"3-92c6eea4b3a6169db9d62b12f66268cb"}}, +{"id":"simple-ffmpeg","key":"simple-ffmpeg","value":{"rev":"9-b6dd4fe162803e6db434d71035637993"}}, +{"id":"simple-logger","key":"simple-logger","value":{"rev":"5-52b4c957b3671375547d623c6a9444be"}}, +{"id":"simple-mime","key":"simple-mime","value":{"rev":"9-34e4b1dcc26047b64459d924abab65cc"}}, +{"id":"simple-proxy","key":"simple-proxy","value":{"rev":"9-ad6cd76215717527dc6b226e1219e98e"}}, +{"id":"simple-rest-client","key":"simple-rest-client","value":{"rev":"3-8331b3ae49b52720adf2b72d5da0353d"}}, +{"id":"simple-schedule","key":"simple-schedule","value":{"rev":"7-432d3803e1cf9ab5830923a30fd312e0"}}, +{"id":"simple-server","key":"simple-server","value":{"rev":"25-d4d8ba53d3829f4ca51545a3c23a1244"}}, +{"id":"simple-settings","key":"simple-settings","value":{"rev":"3-497d7c5422f764f3738b3ef303ff9737"}}, +{"id":"simple-static","key":"simple-static","value":{"rev":"3-64c9cf84e5140d4285e451357ac83df5"}}, +{"id":"simple-xml-writer","key":"simple-xml-writer","value":{"rev":"3-d1ca18252c341b4430ab6e1240b5f571"}}, +{"id":"simple-xmpp","key":"simple-xmpp","value":{"rev":"11-b4c10de5e4e12a81c4486206d7fb6b40"}}, +{"id":"simple_pubsub","key":"simple_pubsub","value":{"rev":"9-22ae79856ca25b152f104e5d8bc93f12"}}, +{"id":"simpledb","key":"simpledb","value":{"rev":"13-6bf111aa18bffd86e65fd996525a6113"}}, +{"id":"simplegeo","key":"simplegeo","value":{"rev":"8-eb684eea019ae7e5fa0c087a9747367e"}}, +{"id":"simplegeo-client","key":"simplegeo-client","value":{"rev":"7-b2c976bbf8c145c6b0e1744630548084"}}, +{"id":"simplegeo-thrift","key":"simplegeo-thrift","value":{"rev":"3-bf6ddf40c020889fe28630217f38a442"}}, +{"id":"simplelogger","key":"simplelogger","value":{"rev":"3-36634d2543faecdeccc962422d149ffc"}}, +{"id":"simplesets","key":"simplesets","value":{"rev":"26-48fc18f94744c9b288945844b7cc9196"}}, +{"id":"simplesmtp","key":"simplesmtp","value":{"rev":"6-0952f0c5f43a8e94b11355774bbbe9e8"}}, +{"id":"simplydb","key":"simplydb","value":{"rev":"5-34659bf97bbb40f0ec4a3af14107dc31"}}, +{"id":"sin","key":"sin","value":{"rev":"6-0e8bd66b3e2c8c91efef14a3ddc79c53"}}, +{"id":"sink","key":"sink","value":{"rev":"8-4c49709009dfb5719935dba568a3398e"}}, +{"id":"sink-test","key":"sink-test","value":{"rev":"18-411afcb398102f245e92f2ce91897d3e"}}, +{"id":"sinon","key":"sinon","value":{"rev":"19-fa38010bb1bbed437273e1296660d598"}}, +{"id":"sinon-buster","key":"sinon-buster","value":{"rev":"5-a456f0e21b3edb647ad11179cd02354b"}}, +{"id":"sinon-nodeunit","key":"sinon-nodeunit","value":{"rev":"7-d60aa76cc41a6c9d9db4e8ae268b7b3c"}}, +{"id":"sip","key":"sip","value":{"rev":"17-02be6fb014d41fe66ab22ff2ae60a5b8"}}, +{"id":"sitemap","key":"sitemap","value":{"rev":"13-a6d1c830fdc8942c317c1ebe00efbb6d"}}, +{"id":"sizlate","key":"sizlate","value":{"rev":"3-a86c680c681299045f9aabecb99dc161"}}, +{"id":"sizzle","key":"sizzle","value":{"rev":"5-f00e18a80fb8a4f6bdbf11735e265720"}}, +{"id":"sk","key":"sk","value":{"rev":"33-b0b894d02b0211dae08baadfd84b46c2"}}, +{"id":"skeleton","key":"skeleton","value":{"rev":"5-3559721c222b99cd3f56acaaf706992f"}}, +{"id":"skillet","key":"skillet","value":{"rev":"3-0d6bbe21952f85967a5e12425691ee50"}}, +{"id":"skull.io","key":"skull.io","value":{"rev":"3-082e9d58f24ac59144fc130f6b54927e"}}, +{"id":"slang","key":"slang","value":{"rev":"7-3cd6390e3421f677e4e1b00fdf2d3ee1"}}, +{"id":"sleepless","key":"sleepless","value":{"rev":"5-1482568719534caf17f12daf0130ae0d"}}, +{"id":"sleepylib","key":"sleepylib","value":{"rev":"3-60e851f120e34b0726eb50a38b1e27e2"}}, +{"id":"sleight","key":"sleight","value":{"rev":"3-a0f16b17befee698b172074f84daf44c"}}, +{"id":"slick","key":"slick","value":{"rev":"3-596b7b7cf7b8881c55327e8bcf373700"}}, +{"id":"slickback","key":"slickback","value":{"rev":"9-c036e7393d0f9a463a263f287f3bcefd"}}, +{"id":"slide","key":"slide","value":{"rev":"14-83ade7490da699cf0ed99cec818ce3cd"}}, +{"id":"slippers","key":"slippers","value":{"rev":"5-0d657ed5fca4c0ed8b51c6d7f6eac08a"}}, +{"id":"slug","key":"slug","value":{"rev":"3-046a5bd74cc1edce30faa3b6ab239652"}}, +{"id":"slugr","key":"slugr","value":{"rev":"39-ac346964f547433fe34e637de682f81a"}}, +{"id":"smartdc","key":"smartdc","value":{"rev":"31-8c9db85e4548007a0ef87b7286229952"}}, +{"id":"smoosh","key":"smoosh","value":{"rev":"34-ba1c140a173ff8d1f9cdbe5e5addcc43"}}, +{"id":"smores","key":"smores","value":{"rev":"17-1aef1fa2e1675093c5aaf33436d83f5a"}}, +{"id":"smpp","key":"smpp","value":{"rev":"5-9be31b75aee4db09cfe5a2ceef4bea13"}}, +{"id":"smsified","key":"smsified","value":{"rev":"13-bb97eae0bbb6f4d5c4f2f391cd20e891"}}, +{"id":"smtp","key":"smtp","value":{"rev":"20-c3de67c5d0b3c4493293d9f55adb21ad"}}, +{"id":"smtpc","key":"smtpc","value":{"rev":"11-7c4e1207be6eb06350221af0134e8bd7"}}, +{"id":"smtpclient","key":"smtpclient","value":{"rev":"3-ba61ad5f0fd3fdd382e505abcde8c24e"}}, +{"id":"snake","key":"snake","value":{"rev":"15-384892bf8a5ebf222f6fe0ae321aaaa4"}}, +{"id":"snappy","key":"snappy","value":{"rev":"11-94f2d59347c10cc41b6f4a2dd2b0f15e"}}, +{"id":"sng","key":"sng","value":{"rev":"41-a1d3c6253dec5da8b3134ba3505924f5"}}, +{"id":"snip","key":"snip","value":{"rev":"3-cc51d232fff6a7d7b24588bd98e5613b"}}, +{"id":"snipes","key":"snipes","value":{"rev":"3-12af12ca83e15d056969ec76a3cc2ef0"}}, +{"id":"snippets","key":"snippets","value":{"rev":"13-d19c8a99287ec721d56ef9efdf3ce729"}}, +{"id":"snorkel","key":"snorkel","value":{"rev":"11-bc7ba5d1465c7d1ba71479087292615e"}}, +{"id":"snowball","key":"snowball","value":{"rev":"3-76cfbdb9f379ac635874b76d7ee2fd3b"}}, +{"id":"snpp","key":"snpp","value":{"rev":"8-4f10a9f2bff48e348303d8a143afaa6c"}}, +{"id":"snsclient","key":"snsclient","value":{"rev":"3-302ce1c7132a36ef909ce534a509e27f"}}, +{"id":"soap","key":"soap","value":{"rev":"7-10f361a406dfee3074adac0cea127d87"}}, +{"id":"socket-push","key":"socket-push","value":{"rev":"22-196553953d58d92c288678b1dcd49ba7"}}, +{"id":"socket-twitchat","key":"socket-twitchat","value":{"rev":"11-9b159a4610ea444eaae39baa3bf05280"}}, +{"id":"socket.io","key":"socket.io","value":{"rev":"95-c29c929613dd95aa5aea8a5e14f2573f"}}, +{"id":"socket.io-client","key":"socket.io-client","value":{"rev":"33-a3c79d917bb038f0ca72f9cb27180a66"}}, +{"id":"socket.io-cluster","key":"socket.io-cluster","value":{"rev":"5-83bdaf79d2243eaf3a59b45fc604dc1a"}}, +{"id":"socket.io-connect","key":"socket.io-connect","value":{"rev":"17-62f00efc3bff3a1b549cc5e346da996f"}}, +{"id":"socket.io-context","key":"socket.io-context","value":{"rev":"42-a029996765557776d72690db1f14c1fa"}}, +{"id":"socket.io-ender","key":"socket.io-ender","value":{"rev":"9-c4523af5f5cc815ee69c325c1e29ede4"}}, +{"id":"socket.io-juggernaut","key":"socket.io-juggernaut","value":{"rev":"6-b8b97b2df2c186f24487e027278ec975"}}, +{"id":"socket.io-sessions","key":"socket.io-sessions","value":{"rev":"11-2151ee14eb29543811a9e567bcf6811a"}}, +{"id":"socketstream","key":"socketstream","value":{"rev":"29-b198d27ad6a3c4f9b63bc467e85a54a3"}}, +{"id":"sockjs","key":"sockjs","value":{"rev":"21-a8d6534c55e8b3e33cf06516b59aa408"}}, +{"id":"socksified","key":"socksified","value":{"rev":"3-92350ec9889b8db9c3d34bdbc41b1f7b"}}, +{"id":"soda","key":"soda","value":{"rev":"24-04987191e2c4241fbfaf78263c83d121"}}, +{"id":"soda-runner","key":"soda-runner","value":{"rev":"5-da4e8078a7666404d2a5ab3267a5ef75"}}, +{"id":"sodn","key":"sodn","value":{"rev":"3-3ee6350723c54aad792c769947c6b05e"}}, +{"id":"sofa","key":"sofa","value":{"rev":"7-2f8ffd47ce19e6fb7e1ea2e02076955d"}}, +{"id":"solder","key":"solder","value":{"rev":"10-8f7ad0a60c2716ce65658047c4ae5361"}}, +{"id":"solr","key":"solr","value":{"rev":"11-56a295dff56d9f2a4a7293257ca793a4"}}, +{"id":"solr-client","key":"solr-client","value":{"rev":"7-a296273d32224eb241343cb98ded7b82"}}, +{"id":"sones","key":"sones","value":{"rev":"3-9ddbbdc44f3501917e701d3304eb91a5"}}, +{"id":"song","key":"song","value":{"rev":"7-967aa3a58702b3470996cd8e63b1b18d"}}, +{"id":"sorted","key":"sorted","value":{"rev":"3-47b6ec0f744aa04929d48a7d3d10f581"}}, +{"id":"sosumi","key":"sosumi","value":{"rev":"10-8c3980beb3d7c48d4cccf44a8d1d5ff7"}}, +{"id":"soundcloud","key":"soundcloud","value":{"rev":"7-9ee76aecd3d1946731a1173185796864"}}, +{"id":"soupselect","key":"soupselect","value":{"rev":"12-5fea60f4e52117a8212aa7add6c34278"}}, +{"id":"source","key":"source","value":{"rev":"7-57d6cae0530c7cba4a3932f0df129f20"}}, +{"id":"source-map","key":"source-map","value":{"rev":"6-7da8d2ccc104fa30a93ee165975f28e8"}}, +{"id":"spacesocket","key":"spacesocket","value":{"rev":"6-d1679084b0917f86d6c4e3ac89a89809"}}, +{"id":"spark","key":"spark","value":{"rev":"12-64d44ebde2a4b48aed3bc7814c63e773"}}, +{"id":"spark2","key":"spark2","value":{"rev":"28-918548a309f0d18eebd5c64966376959"}}, +{"id":"sparql","key":"sparql","value":{"rev":"3-8eec87fe9fcb4d07aef214858eada777"}}, +{"id":"sparql-orm","key":"sparql-orm","value":{"rev":"3-b2a7efa5622b0b478fdca3f9050800cc"}}, +{"id":"spatial","key":"spatial","value":{"rev":"3-d09d40af02a9c9e5150500cc66d75f8d"}}, +{"id":"spawn","key":"spawn","value":{"rev":"3-f882c01cf1bb538f5f4be78769e1b097"}}, +{"id":"spdy","key":"spdy","value":{"rev":"13-1fbf077bbb8bc87d5058648c0c66288b"}}, +{"id":"spec","key":"spec","value":{"rev":"15-1074d3a8b8332fcc1059fbb5c4f69a7a"}}, +{"id":"speck","key":"speck","value":{"rev":"21-652b0670953ba79e548f4e5d9ce3d923"}}, +{"id":"spectrum","key":"spectrum","value":{"rev":"28-21fb9eeffe2e63a5383371a44a58a1ad"}}, +{"id":"speller","key":"speller","value":{"rev":"6-91e03f89b09338cf8f38d2e64c1778ce"}}, +{"id":"sphericalmercator","key":"sphericalmercator","value":{"rev":"9-3affc61ae0d64854d77829da5414bbc5"}}, +{"id":"spider","key":"spider","value":{"rev":"3-cd04679891875dfb2bf67613514238eb"}}, +{"id":"spider-tdd","key":"spider-tdd","value":{"rev":"3-d95b6d680d053a063e6fab3fdae16261"}}, +{"id":"spine","key":"spine","value":{"rev":"9-2a5cd4733be1d78376814e78966d885a"}}, +{"id":"spine.app","key":"spine.app","value":{"rev":"43-1044b31d4c53ff5c741a16d49291b321"}}, +{"id":"spine.mobile","key":"spine.mobile","value":{"rev":"19-220f64c212a5f22b27d597e299263490"}}, +{"id":"split_er","key":"split_er","value":{"rev":"3-3419662807bf16f7b5b53998a4759246"}}, +{"id":"spludo","key":"spludo","value":{"rev":"14-d41915fcd1b50553f5b9e706b41d2894"}}, +{"id":"spm","key":"spm","value":{"rev":"9-28d6699288d580807091aafdf78dd479"}}, +{"id":"spore","key":"spore","value":{"rev":"44-1c50fb0e6f7c3447f34b1927c976201f"}}, +{"id":"spork","key":"spork","value":{"rev":"3-e90976749b649b88ab83b59785dba101"}}, +{"id":"spotify","key":"spotify","value":{"rev":"3-90c74506a69e08a41feeb23541ac0b4f"}}, +{"id":"spotify-metadata","key":"spotify-metadata","value":{"rev":"3-a546d3e59e40ec0be5d8524f3a1e7a60"}}, +{"id":"spotlight","key":"spotlight","value":{"rev":"3-bead50ac8f53311d539a420c74ea23e2"}}, +{"id":"spread","key":"spread","value":{"rev":"3-ad7bf6d948043fc6dd47a6fcec7da294"}}, +{"id":"spreadsheet","key":"spreadsheet","value":{"rev":"11-94030e23cc9c8e515c1f340656aea031"}}, +{"id":"spreadsheets","key":"spreadsheets","value":{"rev":"3-6563c479735b1b6599bf9602fa65ff38"}}, +{"id":"sprintf","key":"sprintf","value":{"rev":"10-56c5bc7a19ecf8dd92e24d4dca081059"}}, +{"id":"spruce","key":"spruce","value":{"rev":"7-1ea45ef3c5412dd2a6c1fe7b2a083d68"}}, +{"id":"spy","key":"spy","value":{"rev":"3-f5546fdbbec80ba97756d0d1fefa7923"}}, +{"id":"sql","key":"sql","value":{"rev":"5-6c41452f684418ba521666e977f46e54"}}, +{"id":"sqlite","key":"sqlite","value":{"rev":"9-18761259920b497360f581ff8051dcbb"}}, +{"id":"sqlite3","key":"sqlite3","value":{"rev":"51-f9c99537afd9826819c5f40105e50987"}}, +{"id":"sqlmw","key":"sqlmw","value":{"rev":"17-b05b0b089c0f3b1185f96dc19bf61cf5"}}, +{"id":"squeeze","key":"squeeze","value":{"rev":"6-5e517be339d9aa409cedfcc11d1883b1"}}, +{"id":"squish","key":"squish","value":{"rev":"15-2334d8412df59ddd2fce60c1f77954c7"}}, +{"id":"sqwish","key":"sqwish","value":{"rev":"28-cc159dd5fd420432a7724c46456f4958"}}, +{"id":"srand","key":"srand","value":{"rev":"16-22f98b1b1a208c22dfbe95aa889cd08e"}}, +{"id":"srcds","key":"srcds","value":{"rev":"3-bd79da47d36662609c0c75c713874fd1"}}, +{"id":"srs","key":"srs","value":{"rev":"32-c8c961ea10fc60fc428bddff133a8aba"}}, +{"id":"sserve","key":"sserve","value":{"rev":"3-957457395e2c61c20bcb727fc19fc4d4"}}, +{"id":"ssh","key":"ssh","value":{"rev":"3-c7dda694daa7ca1e264b494400edfa18"}}, +{"id":"ssh-agent","key":"ssh-agent","value":{"rev":"3-dbc87102ed1f17b7253a1901976dfa9d"}}, +{"id":"sshmq","key":"sshmq","value":{"rev":"3-052f36ca47cddf069a1700fc79a08930"}}, +{"id":"stache","key":"stache","value":{"rev":"11-9bb0239153147939a25fd20184f20fc6"}}, +{"id":"stack","key":"stack","value":{"rev":"7-e18abdce80008ac9e2feb66f3407fe67"}}, +{"id":"stack-trace","key":"stack-trace","value":{"rev":"13-9fe20c5a3e34a5e4472c6f4fdea86efc"}}, +{"id":"stack.static","key":"stack.static","value":{"rev":"7-ad064faf6255a632cefa71a6ff3c47f3"}}, +{"id":"stack2","key":"stack2","value":{"rev":"3-e5f8ea94c0dd2b4c7f5d3941d689622b"}}, +{"id":"stackedy","key":"stackedy","value":{"rev":"25-f988787b9b5720dece8ae3cb83a2bc12"}}, +{"id":"stage","key":"stage","value":{"rev":"7-d2931fcb473f63320067c3e75638924e"}}, +{"id":"stalker","key":"stalker","value":{"rev":"19-ece35be8695846fc766a71c0022d4ff7"}}, +{"id":"startupify","key":"startupify","value":{"rev":"11-3c87ef5e9ee33122cf3515a63b22c52a"}}, +{"id":"stash","key":"stash","value":{"rev":"10-41239a1df74b69fe7bb3e360f9a35ad1"}}, +{"id":"statechart","key":"statechart","value":{"rev":"6-97e6947b5bbaf14bdb55efa6dfa5e19c"}}, +{"id":"stately","key":"stately","value":{"rev":"6-f8a257cd9fdd84947ff2cf7357afc88b"}}, +{"id":"stathat","key":"stathat","value":{"rev":"3-b79b7bd50bb1e4dcc1301424104a5b36"}}, +{"id":"station","key":"station","value":{"rev":"5-92e6387138b1ee10976bd92dd48ea818"}}, +{"id":"statistics","key":"statistics","value":{"rev":"3-a1c3a03d833c6f02fde403950790e9b4"}}, +{"id":"stats","key":"stats","value":{"rev":"13-fe513ea6b3b5b6b31935fd3464ec5d3b"}}, +{"id":"std","key":"std","value":{"rev":"55-58a4f182c3f51996a0d60a6f575cfefd"}}, +{"id":"steam","key":"steam","value":{"rev":"5-bffdf677d2d1ae3e8236892e68a3dd66"}}, +{"id":"stem","key":"stem","value":{"rev":"36-4f1c38eff671ede0241038017a810132"}}, +{"id":"step","key":"step","value":{"rev":"8-048d7707a45af3a7824a478d296cc467"}}, +{"id":"stepc","key":"stepc","value":{"rev":"3-be85de2c02f4889fdf77fda791feefea"}}, +{"id":"stepper","key":"stepper","value":{"rev":"9-cc54000dc973835c38e139b30cbb10cc"}}, +{"id":"steps","key":"steps","value":{"rev":"5-3561591b425e1fff52dc397f9688feae"}}, +{"id":"stextile","key":"stextile","value":{"rev":"29-9a8b6de917df01d322847f112dcadadf"}}, +{"id":"stitch","key":"stitch","value":{"rev":"13-8a50e4a4f015d1afe346aa6b6c8646bd"}}, +{"id":"stitchup","key":"stitchup","value":{"rev":"7-fe14604e3a8b82f62c38d0cb3ccce61e"}}, +{"id":"stomp","key":"stomp","value":{"rev":"15-e0430c0be74cd20c5204b571999922f7"}}, +{"id":"stopwords","key":"stopwords","value":{"rev":"3-2dd9fade030cfcce85848c5b3b4116fc"}}, +{"id":"store","key":"store","value":{"rev":"9-5537cc0f4827044504e8dae9617c9347"}}, +{"id":"store.js","key":"store.js","value":{"rev":"22-116c9a6194703ea98512d89ec5865e3d"}}, +{"id":"stories","key":"stories","value":{"rev":"11-244ca52d0a41f70bc4dfa0aca0f82a40"}}, +{"id":"storify","key":"storify","value":{"rev":"5-605b197219e916df561dd7722af97e2e"}}, +{"id":"storify-templates","key":"storify-templates","value":{"rev":"3-0960756aa963cee21b679a59cef114a1"}}, +{"id":"storm","key":"storm","value":{"rev":"3-9052e6af8528d1bc0d96021dfa21dd3e"}}, +{"id":"stove","key":"stove","value":{"rev":"17-01c9f0e87398e6bfa03a764e89295e00"}}, +{"id":"str.js","key":"str.js","value":{"rev":"9-301f54edeebde3c5084c3a8071e2aa09"}}, +{"id":"strack","key":"strack","value":{"rev":"10-5acf78ae6a417a82b49c221d606b8fed"}}, +{"id":"strappy","key":"strappy","value":{"rev":"3-fb63a899ff82c0f1142518cc263dd632"}}, +{"id":"strata","key":"strata","value":{"rev":"31-de615eccbda796e2bea405c2806ec792"}}, +{"id":"stream-buffers","key":"stream-buffers","value":{"rev":"7-d8fae628da43d377dd4e982f5bf7b09b"}}, +{"id":"stream-handler","key":"stream-handler","value":{"rev":"7-333eb7dcf2aeb550f948ee2162b21be2"}}, +{"id":"stream-stack","key":"stream-stack","value":{"rev":"22-a70979df042e2ff760b2d900259c84a1"}}, +{"id":"streamer","key":"streamer","value":{"rev":"17-dd16e62ada55311a793fbf7963a920f3"}}, +{"id":"streamlib","key":"streamlib","value":{"rev":"3-5125b1e6a92290f8d7f5fdad71e13fc2"}}, +{"id":"streamline","key":"streamline","value":{"rev":"152-0931f5697340c62e05dcd1a741afd38f"}}, +{"id":"streamline-streams","key":"streamline-streams","value":{"rev":"3-3224030ecfbf5a8ac5d218ab56dee545"}}, +{"id":"streamline-util","key":"streamline-util","value":{"rev":"3-a8047ecf37b985ec836c552fd2bcbf78"}}, +{"id":"streamlogger","key":"streamlogger","value":{"rev":"3-43f93a109774591f1409b0b86c363623"}}, +{"id":"streamlogger-fixed","key":"streamlogger-fixed","value":{"rev":"3-6e48de9e269b4f5bf979c560190b0680"}}, +{"id":"strftime","key":"strftime","value":{"rev":"25-74130d5c9cbf91025ce91f0463a9b1b5"}}, +{"id":"string-color","key":"string-color","value":{"rev":"3-9f336bf06bd80b2d2338c216099421c7"}}, +{"id":"strscan","key":"strscan","value":{"rev":"8-3e0d182a8d0c786754c555c0ac12e9d9"}}, +{"id":"strtok","key":"strtok","value":{"rev":"8-a1a1da7946d62fabb6cca56fc218654b"}}, +{"id":"struct","key":"struct","value":{"rev":"3-ff0f9cb336df73a5a19a38e17633583c"}}, +{"id":"structr","key":"structr","value":{"rev":"21-69b3672dab234d0effec5a72a2b1791c"}}, +{"id":"sty","key":"sty","value":{"rev":"9-ce5691388abc3ccaff23030bff190914"}}, +{"id":"style","key":"style","value":{"rev":"7-342569887fb53caddc60d745706cd66e"}}, +{"id":"style-compile","key":"style-compile","value":{"rev":"5-6f8b86c94c5344ec280a28f025691996"}}, +{"id":"styleless","key":"styleless","value":{"rev":"5-c236b81c38193ad71d7ed7c5b571995d"}}, +{"id":"stylewriter","key":"stylewriter","value":{"rev":"3-25a3f83252b220d8db0aa70c8fc1da4f"}}, +{"id":"stylus","key":"stylus","value":{"rev":"135-8b69084f50a95c297d1044e48b39a6c9"}}, +{"id":"stylus-blueprint","key":"stylus-blueprint","value":{"rev":"5-50ec59a9fa161ca68dac765f2281c13e"}}, +{"id":"stylus-sprite","key":"stylus-sprite","value":{"rev":"27-db597a75467baaad94de287494e9c21e"}}, +{"id":"styout","key":"styout","value":{"rev":"9-9d9460bb9bfa253ed0b5fbeb27f7710a"}}, +{"id":"sugar","key":"sugar","value":{"rev":"5-2722426edc51a7703f5c37306b03a8c4"}}, +{"id":"sugardoll","key":"sugardoll","value":{"rev":"16-cfadf4e7108357297be180a3868130db"}}, +{"id":"suger-pod","key":"suger-pod","value":{"rev":"5-c812b763cf6cdd218c6a18e1a4e2a4ac"}}, +{"id":"sunny","key":"sunny","value":{"rev":"3-c26b62eef1eeeeef58a7ea9373df3b39"}}, +{"id":"superagent","key":"superagent","value":{"rev":"3-1b32cc8372b7713f973bb1e044e6a86f"}}, +{"id":"supermarket","key":"supermarket","value":{"rev":"20-afa8a26ecec3069717c8ca7e5811cc31"}}, +{"id":"supershabam-websocket","key":"supershabam-websocket","value":{"rev":"7-513117fb37b3ab7cdaeeae31589e212e"}}, +{"id":"supervisor","key":"supervisor","value":{"rev":"16-2c6c141d018ef8927acee79f31d466ff"}}, +{"id":"supervisord","key":"supervisord","value":{"rev":"7-359ba115e5e10b5c95ef1a7562ad7a45"}}, +{"id":"svg2jadepartial","key":"svg2jadepartial","value":{"rev":"9-4a6260dd5d7c14801e8012e3ba7510f5"}}, +{"id":"swake","key":"swake","value":{"rev":"5-6f780362f0317427752d87cc5c640021"}}, +{"id":"swarm","key":"swarm","value":{"rev":"43-f1a963a0aeb043bf69529a82798b3afc"}}, +{"id":"sweet","key":"sweet","value":{"rev":"5-333f4d3529f65ce53b037cc282e3671d"}}, +{"id":"swig","key":"swig","value":{"rev":"29-53294b9d4f350192cf65817692092bfa"}}, +{"id":"switchback","key":"switchback","value":{"rev":"3-e117371d415f4a3d4ad30e78f5ec28bf"}}, +{"id":"switchboard","key":"switchboard","value":{"rev":"3-504d6c1e45165c54fbb1d3025d5120d7"}}, +{"id":"swiz","key":"swiz","value":{"rev":"82-cfb7840376b57896fba469e5c6ff3786"}}, +{"id":"swizec-bitly","key":"swizec-bitly","value":{"rev":"3-a705807238b8ef3ff2d008910bc350c3"}}, +{"id":"sws","key":"sws","value":{"rev":"5-bc5e8558bde6c2ae971abdd448a006d2"}}, +{"id":"symbie","key":"symbie","value":{"rev":"5-3184f869ed386341a4cdc35d85efb62a"}}, +{"id":"symbox","key":"symbox","value":{"rev":"5-eed33350cbb763726335ef1df74a6591"}}, +{"id":"synapse","key":"synapse","value":{"rev":"3-a9672d5159c0268babbfb94d7554d4bb"}}, +{"id":"sync","key":"sync","value":{"rev":"65-89fa6b8ab2df135d57e0bba4e921ad3b"}}, +{"id":"synchro","key":"synchro","value":{"rev":"21-6a881704308298f1894509a5b59287ae"}}, +{"id":"synchronous","key":"synchronous","value":{"rev":"7-bf89d61f001d994429e0fd12c26c2676"}}, +{"id":"syncler","key":"syncler","value":{"rev":"2-12870522e069945fc12f7d0f612700ee"}}, +{"id":"syncrepl","key":"syncrepl","value":{"rev":"5-e9234a1d8a529bc0d1b01c3b77c69c30"}}, +{"id":"synct","key":"synct","value":{"rev":"3-3664581b69e6f40dabc90525217f46cd"}}, +{"id":"syndicate","key":"syndicate","value":{"rev":"7-1db2b05d6b3e55fa622c3c26df7f9cad"}}, +{"id":"syslog","key":"syslog","value":{"rev":"5-d52fbc739505a2a194faf9a32da39d23"}}, +{"id":"syslog-node","key":"syslog-node","value":{"rev":"15-039177b9c516fd8d0b31faf92aa73f6f"}}, +{"id":"system","key":"system","value":{"rev":"18-33152371e0696a853ddb8b2234a6dfea"}}, +{"id":"taazr-uglify","key":"taazr-uglify","value":{"rev":"7-5c63dc75aa7c973df102c298291be8a5"}}, +{"id":"table","key":"table","value":{"rev":"9-a8a46ddf3a7cab63a0228303305cc32e"}}, +{"id":"tache.io","key":"tache.io","value":{"rev":"7-5639c70dc56b0a6333b568af377bb216"}}, +{"id":"taco","key":"taco","value":{"rev":"3-97cfbd54b4053c9e01e18af7c3902d1a"}}, +{"id":"tad","key":"tad","value":{"rev":"3-529ebda7291e24ae020d5c2931ba22cd"}}, +{"id":"tafa-misc-util","key":"tafa-misc-util","value":{"rev":"19-52984b66029c7d5cc78d3e2ae88c98d6"}}, +{"id":"tag","key":"tag","value":{"rev":"3-80b0d526b10a26f41fe73978843a07b9"}}, +{"id":"taglib","key":"taglib","value":{"rev":"3-efd2e6bc818bf3b385df40dfae506fa5"}}, +{"id":"tail","key":"tail","value":{"rev":"21-09bce80ad6aa4b01c6a70825fd141fd4"}}, +{"id":"tails","key":"tails","value":{"rev":"14-3ba6976831b1388e14235622ab001681"}}, +{"id":"tamejs","key":"tamejs","value":{"rev":"39-9a3657941df3bd24c43b5473e9f3b4c8"}}, +{"id":"taobao-js-api","key":"taobao-js-api","value":{"rev":"7-d46c8b48364b823dabf808f2b30e1eb8"}}, +{"id":"tap","key":"tap","value":{"rev":"35-1b8e553cf848f5ab27711efa0e74a033"}}, +{"id":"tap-assert","key":"tap-assert","value":{"rev":"19-f2960c64bcfa6ce4ed73e870d8d9e3fa"}}, +{"id":"tap-consumer","key":"tap-consumer","value":{"rev":"3-3e38aafb6d2d840bdb20818efbc75df4"}}, +{"id":"tap-global-harness","key":"tap-global-harness","value":{"rev":"3-f32589814daf8c1816c1f5a24de4ad12"}}, +{"id":"tap-harness","key":"tap-harness","value":{"rev":"7-a5af01384152c452abc11d4e641e6157"}}, +{"id":"tap-producer","key":"tap-producer","value":{"rev":"3-2db67a9541c37c912d4de2576bb3caa0"}}, +{"id":"tap-results","key":"tap-results","value":{"rev":"5-b8800525438965e38dc586e6b5cb142d"}}, +{"id":"tap-runner","key":"tap-runner","value":{"rev":"11-3975c0f5044530b61158a029899f4c03"}}, +{"id":"tap-test","key":"tap-test","value":{"rev":"5-0a3bba26b6b94dae8b7f59712335ee98"}}, +{"id":"tar","key":"tar","value":{"rev":"6-94226dd7add6ae6a1e68088360a466e4"}}, +{"id":"tar-async","key":"tar-async","value":{"rev":"37-d6579d43c1ee2f41205f28b0cde5da23"}}, +{"id":"tar-js","key":"tar-js","value":{"rev":"5-6826f2aad965fb532c7403964ce80d85"}}, +{"id":"task","key":"task","value":{"rev":"3-81f72759a5b64dff88a01a4838cc4a23"}}, +{"id":"task-extjs","key":"task-extjs","value":{"rev":"14-c9ba76374805425c332e0c66725e885c"}}, +{"id":"task-joose-nodejs","key":"task-joose-nodejs","value":{"rev":"20-6b8e4d24323d3240d5ee790d00c0d96a"}}, +{"id":"task-joose-stable","key":"task-joose-stable","value":{"rev":"32-026eada52cd5dd17a680359daec4917a"}}, +{"id":"tasks","key":"tasks","value":{"rev":"5-84e8f83d0c6ec27b4f05057c48063d62"}}, +{"id":"tav","key":"tav","value":{"rev":"3-da9899817edd20f0c73ad09bdf540cc6"}}, +{"id":"taxman","key":"taxman","value":{"rev":"5-9b9c68db8a1c8efedad800026cb23ae4"}}, +{"id":"tbone","key":"tbone","value":{"rev":"3-5789b010d0b1f1c663750c894fb5c570"}}, +{"id":"tcp-proxy","key":"tcp-proxy","value":{"rev":"3-118c6dc26d11537cf157fe2f28b05af5"}}, +{"id":"teamgrowl","key":"teamgrowl","value":{"rev":"8-3d13200b3bfeeace0787f9f9f027216d"}}, +{"id":"teamgrowl-server","key":"teamgrowl-server","value":{"rev":"8-a14dc4a26c2c06a4d9509eaff6e24735"}}, +{"id":"telehash","key":"telehash","value":{"rev":"6-4fae3629c1e7e111ba3e486b39a29913"}}, +{"id":"telemail","key":"telemail","value":{"rev":"3-60928460428265fc8002ca61c7f23abe"}}, +{"id":"telemetry","key":"telemetry","value":{"rev":"5-1be1d37ef62dc786b0a0f0d2d7984eb1"}}, +{"id":"teleport","key":"teleport","value":{"rev":"36-5b55a43ba83f4fe1a547c04e29139c3d"}}, +{"id":"teleport-dashboard","key":"teleport-dashboard","value":{"rev":"7-4cbc728d7a3052848a721fcdd92dda30"}}, +{"id":"teleport-site","key":"teleport-site","value":{"rev":"3-aeb8c0a93b7b0bcd7a30fe33bf23808c"}}, +{"id":"telnet","key":"telnet","value":{"rev":"11-7a587104b94ce135315c7540eb3493f6"}}, +{"id":"telnet-protocol","key":"telnet-protocol","value":{"rev":"3-8fcee2ed02c2e603c48e51e90ae78a00"}}, +{"id":"temp","key":"temp","value":{"rev":"6-91ef505da0a0860a13c0eb1a5d2531e6"}}, +{"id":"tempPath","key":"tempPath","value":{"rev":"3-34f2c1937d97207245986c344136547c"}}, +{"id":"tempis","key":"tempis","value":{"rev":"3-b2c0989068cc8125a519d19b9c79ffb6"}}, +{"id":"template","key":"template","value":{"rev":"6-d0088c6a5a7610570920db0f5c950bf9"}}, +{"id":"template-engine","key":"template-engine","value":{"rev":"3-3746216e1e2e456dbb0fd2f9070c1619"}}, +{"id":"tengwar","key":"tengwar","value":{"rev":"3-645a00f03e1e9546631ac22c37e1f3b4"}}, +{"id":"tenjin","key":"tenjin","value":{"rev":"5-0925c7535455266125b7730296c66356"}}, +{"id":"teriaki","key":"teriaki","value":{"rev":"3-d3c17f70d8697c03f43a7eae75f8c089"}}, +{"id":"terminal","key":"terminal","value":{"rev":"11-0e024d173ee3c28432877c0c5f633f19"}}, +{"id":"termspeak","key":"termspeak","value":{"rev":"7-fdfc93dd7d0d65fe502cabca191d8496"}}, +{"id":"termutil","key":"termutil","value":{"rev":"5-bccf8377ff28bc1f07f8b4b44d1e2335"}}, +{"id":"test","key":"test","value":{"rev":"38-129620013bbd3ec13617c403b02b52f1"}}, +{"id":"test-cmd","key":"test-cmd","value":{"rev":"35-7dd417a80390c2c124c66273ae33bd07"}}, +{"id":"test-helper","key":"test-helper","value":{"rev":"3-7b29af65825fc46d0603a39cdc6c95b4"}}, +{"id":"test-report","key":"test-report","value":{"rev":"5-e51cd1069b6cc442707f0861b35851be"}}, +{"id":"test-report-view","key":"test-report-view","value":{"rev":"3-9ba670940a8235eaef9b957dde6379af"}}, +{"id":"test-run","key":"test-run","value":{"rev":"20-6de89383602e6843d9376a78778bec19"}}, +{"id":"test_it","key":"test_it","value":{"rev":"5-be5cd436b9145398fa88c15c1269b102"}}, +{"id":"testbed","key":"testbed","value":{"rev":"2-db233788f7e516f227fac439d9450ef4"}}, +{"id":"testharness","key":"testharness","value":{"rev":"46-787468cb68ec31b442327639dcc0a4e5"}}, +{"id":"testingey","key":"testingey","value":{"rev":"17-a7ad6a9ff5721ae449876f6448d6f22f"}}, +{"id":"testnode","key":"testnode","value":{"rev":"9-cb63c450b241806e2271cd56fe502395"}}, +{"id":"testosterone","key":"testosterone","value":{"rev":"35-278e8af2b59bb6caf56728c67f720c37"}}, +{"id":"testqueue","key":"testqueue","value":{"rev":"3-59c574aeb345ef2d6e207a342be3f497"}}, +{"id":"testrunner","key":"testrunner","value":{"rev":"7-152e7d4a97f6cf6f00e22140e1969664"}}, +{"id":"testy","key":"testy","value":{"rev":"5-e8f4c9f4a799b6f8ab4effc21c3073a0"}}, +{"id":"text","key":"text","value":{"rev":"6-58a79b0db4968d6ad233898744a75351"}}, +{"id":"textareaserver","key":"textareaserver","value":{"rev":"3-f032b1397eb5e6369e1ac0ad1e78f466"}}, +{"id":"textile","key":"textile","value":{"rev":"6-2a8db66876f0119883449012c9c54c47"}}, +{"id":"textual","key":"textual","value":{"rev":"3-0ad9d5d3403b239185bad403625fed19"}}, +{"id":"tf2logparser","key":"tf2logparser","value":{"rev":"5-ffbc427b95ffeeb013dc13fa2b9621e3"}}, +{"id":"tfe-express","key":"tfe-express","value":{"rev":"3-b68ac01185885bcd22fa430ddb97e757"}}, +{"id":"tfidf","key":"tfidf","value":{"rev":"13-988808af905397dc103a0edf8c7c8a9f"}}, +{"id":"theBasics","key":"theBasics","value":{"rev":"7-9ebef2e59e1bd2fb3544ed16e1dc627b"}}, +{"id":"thefunlanguage.com","key":"thefunlanguage.com","value":{"rev":"3-25d56a3a4f639af23bb058db541bffe0"}}, +{"id":"thelinuxlich-docco","key":"thelinuxlich-docco","value":{"rev":"7-2ac0969da67ead2fa8bc0b21880b1d6b"}}, +{"id":"thelinuxlich-vogue","key":"thelinuxlich-vogue","value":{"rev":"5-ebc0a28cf0ae447b7ebdafc51c460bc0"}}, +{"id":"thepusher","key":"thepusher","value":{"rev":"5-b80cce6f81b1cae7373cd802df34c05c"}}, +{"id":"thetvdb","key":"thetvdb","value":{"rev":"3-a3a017a90b752d8158bf6dfcbcfdf250"}}, +{"id":"thirty-two","key":"thirty-two","value":{"rev":"3-1d4761ba7c4fa475e0c69e9c96d6ac04"}}, +{"id":"thoonk","key":"thoonk","value":{"rev":"15-c62c90d7e9072d96302d3a534ce943bb"}}, +{"id":"thrift","key":"thrift","value":{"rev":"14-447a41c9b655ec06e8e4854d5a55523a"}}, +{"id":"throttle","key":"throttle","value":{"rev":"3-8a3b3c657c49ede67c883806fbfb4df6"}}, +{"id":"thyme","key":"thyme","value":{"rev":"5-f06104f10d43a2b4cbcc7621ed45eacf"}}, +{"id":"tiamat","key":"tiamat","value":{"rev":"44-810633d6cd5edaa0510fe0f38c02ad58"}}, +{"id":"tictoc","key":"tictoc","value":{"rev":"3-0be6cf95d4466595376dadd0fc08bd95"}}, +{"id":"tidy","key":"tidy","value":{"rev":"3-25116d4dcf6765ef2a09711ecc1e03c9"}}, +{"id":"tiers","key":"tiers","value":{"rev":"3-ffaa8ffe472fe703de8f0bbeb8af5621"}}, +{"id":"tilejson","key":"tilejson","value":{"rev":"5-76b990dd945fb412ed00a96edc86b59d"}}, +{"id":"tilelive","key":"tilelive","value":{"rev":"57-9283e846e77263ed6e7299680d6b4b06"}}, +{"id":"tilelive-mapnik","key":"tilelive-mapnik","value":{"rev":"31-30f871ede46789fc6a36f427a1a99fff"}}, +{"id":"tilemill","key":"tilemill","value":{"rev":"19-7b884c9d707dd34f21cb71e88b45fc73"}}, +{"id":"tilestream","key":"tilestream","value":{"rev":"76-3a29ba96ecdb6c860c211ae8f2d909a9"}}, +{"id":"timbits","key":"timbits","value":{"rev":"59-b48dde4a210ec9fb4c33c07a52bce61e"}}, +{"id":"time","key":"time","value":{"rev":"51-907f587206e6a27803a3570e42650adc"}}, +{"id":"timeTraveller","key":"timeTraveller","value":{"rev":"7-389de8c8e86daea495d14aeb2b77df38"}}, +{"id":"timeout","key":"timeout","value":{"rev":"11-8e53dedecfaf6c4f1086eb0f43c71325"}}, +{"id":"timer","key":"timer","value":{"rev":"5-a8bcbb898a807e6662b54ac988fb967b"}}, +{"id":"timerjs","key":"timerjs","value":{"rev":"3-7d24eb268746fdb6b5e9be93bec93f1b"}}, +{"id":"timespan","key":"timespan","value":{"rev":"12-315b2793cbf28a18cea36e97a3c8a55f"}}, +{"id":"timezone","key":"timezone","value":{"rev":"35-2741d5d3b68a953d4cb3a596bc2bc15e"}}, +{"id":"tiny","key":"tiny","value":{"rev":"9-a61d26d02ce39381f7e865ad82494692"}}, +{"id":"tld","key":"tld","value":{"rev":"3-5ce4b4e48a11413ad8a1f3bfd0d0b778"}}, +{"id":"tldextract","key":"tldextract","value":{"rev":"7-620962e27145bd9fc17dc406c38b0c32"}}, +{"id":"tmp","key":"tmp","value":{"rev":"23-20f5c14244d58f35bd3e970f5f65cc32"}}, +{"id":"tmpl","key":"tmpl","value":{"rev":"5-5894c206e15fa58ab9415706b9d53f1f"}}, +{"id":"tmpl-precompile","key":"tmpl-precompile","value":{"rev":"15-3db34b681596b258cae1dae8cc24119d"}}, +{"id":"tmppckg","key":"tmppckg","value":{"rev":"11-b3a13e1280eb9cbef182c1f3f24bd570"}}, +{"id":"tnetstrings","key":"tnetstrings","value":{"rev":"3-d6b8ed2390a3e38138cb01b82d820079"}}, +{"id":"toDataURL","key":"toDataURL","value":{"rev":"3-1ea3cb62666b37343089bb9ef48fbace"}}, +{"id":"toYaml","key":"toYaml","value":{"rev":"11-3c629e3859c70d57b1ae51b2ac459011"}}, +{"id":"tob","key":"tob","value":{"rev":"7-376c174d06a675855406cfcdcacf61f5"}}, +{"id":"tobi","key":"tobi","value":{"rev":"50-d8749ac3739b042afe82657802bc3ba8"}}, +{"id":"toddick","key":"toddick","value":{"rev":"13-db528ef519f57b8c1d752ad7270b4d05"}}, +{"id":"tokenizer","key":"tokenizer","value":{"rev":"5-f6524fafb16059b66074cd04bf248a03"}}, +{"id":"tokyotosho","key":"tokyotosho","value":{"rev":"5-7432e0207165d9c165fd73d2a23410d6"}}, +{"id":"tolang","key":"tolang","value":{"rev":"7-65dbdf56b039f680e61a1e1d7feb9fb1"}}, +{"id":"toolkit","key":"toolkit","value":{"rev":"13-58075a57a6069dc39f98e72d473a0c30"}}, +{"id":"tools","key":"tools","value":{"rev":"3-ba301d25cfc6ad71dd68c811ea97fa01"}}, +{"id":"topcube","key":"topcube","value":{"rev":"29-736b3816d410f626dbc4da663acb05aa"}}, +{"id":"torrent-search","key":"torrent-search","value":{"rev":"7-7dd48fac0c1f99f34fad7da365085b6c"}}, +{"id":"tosource","key":"tosource","value":{"rev":"5-13483e2c11b07611c26b37f2e76a0bf3"}}, +{"id":"tplcpl","key":"tplcpl","value":{"rev":"15-8ba1e6d14ad6b8eb71b703e22054ac0a"}}, +{"id":"tracejs","key":"tracejs","value":{"rev":"23-1ffec83afc19855bcbed8049a009a910"}}, +{"id":"traceur","key":"traceur","value":{"rev":"9-a48f7e4cb1fb452125d81c62c8ab628b"}}, +{"id":"traceurl","key":"traceurl","value":{"rev":"21-e016db44a86b124ea00411f155d884d4"}}, +{"id":"tracey","key":"tracey","value":{"rev":"5-76699aab64e89271cbb7df80a00d3583"}}, +{"id":"tracy","key":"tracy","value":{"rev":"5-412f78082ba6f4c3c7d5328cf66d2e10"}}, +{"id":"traits","key":"traits","value":{"rev":"10-3a37dbec4b78518c00c577f5e286a9b9"}}, +{"id":"tramp","key":"tramp","value":{"rev":"5-3b6d27b8b432b925b7c9fc088e84d8e4"}}, +{"id":"transcode","key":"transcode","value":{"rev":"6-a6494707bd94b5e6d1aa9df3dbcf8d7c"}}, +{"id":"transformer","key":"transformer","value":{"rev":"15-7738ac7c02f03d64f73610fbf7ed92a6"}}, +{"id":"transformjs","key":"transformjs","value":{"rev":"5-f1ab667c430838e1d3238e1f878998e2"}}, +{"id":"transitive","key":"transitive","value":{"rev":"43-841de40a5e3434bd51a1c8f19891f982"}}, +{"id":"translate","key":"translate","value":{"rev":"12-f3ddbbada2f109843c5422d83dd7a203"}}, +{"id":"transliteration.ua","key":"transliteration.ua","value":{"rev":"3-f847c62d8749904fc7de6abe075e619a"}}, +{"id":"transmission","key":"transmission","value":{"rev":"9-587eaa395430036f17b175bc439eabb6"}}, +{"id":"transmogrify","key":"transmogrify","value":{"rev":"5-3e415cd9420c66551cccc0aa91b11d98"}}, +{"id":"transporter","key":"transporter","value":{"rev":"6-698b696890bf01d751e9962bd86cfe7e"}}, +{"id":"traverse","key":"traverse","value":{"rev":"60-9432066ab44fbb0e913227dc62c953d9"}}, +{"id":"traverser","key":"traverser","value":{"rev":"11-1d50662f13134868a1df5019d99bf038"}}, +{"id":"treeeater","key":"treeeater","value":{"rev":"56-2c8a9fd3e842b221ab8da59c6d847327"}}, +{"id":"treelib","key":"treelib","value":{"rev":"13-212ccc836a943c8b2a5342b65ab9edf3"}}, +{"id":"trees","key":"trees","value":{"rev":"3-3ee9e9cf3fd8aa985e32b3d9586a7c0e"}}, +{"id":"trentm-datetime","key":"trentm-datetime","value":{"rev":"3-740a291379ddf97bda2aaf2ff0e1654d"}}, +{"id":"trentm-git","key":"trentm-git","value":{"rev":"3-b81ce3764a45e5d0862488fab9fac486"}}, +{"id":"trentm-hashlib","key":"trentm-hashlib","value":{"rev":"3-4b4175b6a8702bdb9c1fe5ac4786761b"}}, +{"id":"trial","key":"trial","value":{"rev":"3-cf77f189409517495dd8259f86e0620e"}}, +{"id":"trie","key":"trie","value":{"rev":"3-6cc3c209cf4aae5a4f92e1ca38c4c54c"}}, +{"id":"trollop","key":"trollop","value":{"rev":"6-75076593614c9cd51d61a76f73d2c5b5"}}, +{"id":"trollscript","key":"trollscript","value":{"rev":"5-fcf646075c5be575b9174f84d08fbb37"}}, +{"id":"trollscriptjs","key":"trollscriptjs","value":{"rev":"3-1dfd1acd3d15c0bd18ea407e3933b621"}}, +{"id":"tropo-webapi","key":"tropo-webapi","value":{"rev":"11-5106730dbd79167df38812ffaa912ded"}}, +{"id":"tropo-webapi-node","key":"tropo-webapi-node","value":{"rev":"15-483c64bcbf1dcadaea30e78d7bc3ebbc"}}, +{"id":"trundle","key":"trundle","value":{"rev":"3-2af32ed348fdedebd1077891bb22a756"}}, +{"id":"trust-reverse-proxy","key":"trust-reverse-proxy","value":{"rev":"6-ba5bed0849617e0390f0e24750bf5747"}}, +{"id":"trying","key":"trying","value":{"rev":"3-43b417160b178c710e0d85af6b3d56e7"}}, +{"id":"ttapi","key":"ttapi","value":{"rev":"51-727e47d8b383b387a498711c07ce4de6"}}, +{"id":"tubbs","key":"tubbs","value":{"rev":"7-b386e59f2205b22615a376f5ddee3eb0"}}, +{"id":"tuild","key":"tuild","value":{"rev":"13-4a2b92f95a0ee342c060974ce7a0021d"}}, +{"id":"tumbler","key":"tumbler","value":{"rev":"5-ff16653ab92d0af5e70d9caa88f3b7ed"}}, +{"id":"tumbler-sprite","key":"tumbler-sprite","value":{"rev":"3-604d25b7bb9e32b92cadd75aeb23997c"}}, +{"id":"tumblr","key":"tumblr","value":{"rev":"9-14d160f1f2854330fba300b3ea233893"}}, +{"id":"tumblr2","key":"tumblr2","value":{"rev":"7-29bb5d86501cdbcef889289fe7f4b51e"}}, +{"id":"tumblrrr","key":"tumblrrr","value":{"rev":"10-0c50379fbab7b39766e1a61379c39964"}}, +{"id":"tunguska","key":"tunguska","value":{"rev":"1-a6b24d2c2a5a9f091a9b6f13bac66927"}}, +{"id":"tupalocomapi","key":"tupalocomapi","value":{"rev":"3-a1cdf85a08784f62c2ec440a1ed90ad4"}}, +{"id":"turing","key":"turing","value":{"rev":"5-4ba083c8343718acb9450d96551b65c0"}}, +{"id":"tutti","key":"tutti","value":{"rev":"21-929cc205b3d8bc68f86aa63578e0af95"}}, +{"id":"tuttiserver","key":"tuttiserver","value":{"rev":"39-b3fe7cbaf2d43458dae061f37aa5ae18"}}, +{"id":"tuttiterm","key":"tuttiterm","value":{"rev":"7-6c0e9e7f6f137de0ee7c886351fdf373"}}, +{"id":"tvister","key":"tvister","value":{"rev":"7-963eab682ab09922a44fbca50c0ec019"}}, +{"id":"twbot","key":"twbot","value":{"rev":"15-923625f516566c977975b3da3d4bc46b"}}, +{"id":"tweasy","key":"tweasy","value":{"rev":"10-7215063e5729b1c114ef73f07a1368d3"}}, +{"id":"tweeter.js","key":"tweeter.js","value":{"rev":"3-bc8437157c11cf32eec168d7c71037bb"}}, +{"id":"tweetstream","key":"tweetstream","value":{"rev":"6-81a6bf2a3e29208e1c4c65a3958ee5d8"}}, +{"id":"twerk","key":"twerk","value":{"rev":"5-01cbfddf9ad25a67ff1e45ec39acb780"}}, +{"id":"twerp","key":"twerp","value":{"rev":"23-1b4726d1fef030a3dde6fae2cdfbb687"}}, +{"id":"twigjs","key":"twigjs","value":{"rev":"7-07b90e2c35c5c81d394b29086507de04"}}, +{"id":"twilio","key":"twilio","value":{"rev":"20-68d5439ecb1774226025e6f9125bbb86"}}, +{"id":"twilio-node","key":"twilio-node","value":{"rev":"13-84d31c2dc202df3924ed399289cbc1fc"}}, +{"id":"twiliode","key":"twiliode","value":{"rev":"3-6cbe432dd6c6d94d8a4faa6e0ea47dd3"}}, +{"id":"twill","key":"twill","value":{"rev":"5-3a0caf9c0e83ab732ae8ae61f4f17830"}}, +{"id":"twisted-deferred","key":"twisted-deferred","value":{"rev":"9-f35acecb8736d96582e1f9b62dd4ae47"}}, +{"id":"twitpic","key":"twitpic","value":{"rev":"11-55b11432a09edeec1189024f26a48153"}}, +{"id":"twitter","key":"twitter","value":{"rev":"60-9ad6368932c8a74ea5bd10dda993d74d"}}, +{"id":"twitter-client","key":"twitter-client","value":{"rev":"11-dc3da9e1724cf00aa86c1e7823cfd919"}}, +{"id":"twitter-connect","key":"twitter-connect","value":{"rev":"12-969292347a4251d121566169236a3091"}}, +{"id":"twitter-js","key":"twitter-js","value":{"rev":"24-251d0c54749e86bd544a15290e311370"}}, +{"id":"twitter-node","key":"twitter-node","value":{"rev":"12-a7ed6c69f05204de2e258f46230a05b6"}}, +{"id":"twitter-text","key":"twitter-text","value":{"rev":"16-978bda8ec4eaf68213d0ee54242feefa"}}, +{"id":"type","key":"type","value":{"rev":"3-c5b8b87cde9e27277302cb5cb6d00f85"}}, +{"id":"typecheck","key":"typecheck","value":{"rev":"5-79723661620bb0fb254bc7f888d6e937"}}, +{"id":"typed-array","key":"typed-array","value":{"rev":"3-89ac91e2a51a9e5872515d5a83691e83"}}, +{"id":"typhoon","key":"typhoon","value":{"rev":"23-2027c96b8fd971332848594f3b0526cb"}}, +{"id":"typogr","key":"typogr","value":{"rev":"13-2dfe00f08ee13e6b00a99df0a8f96718"}}, +{"id":"ua-parser","key":"ua-parser","value":{"rev":"14-d1a018354a583dba4506bdc0c04a416b"}}, +{"id":"uberblic","key":"uberblic","value":{"rev":"5-500704ed73f255eb5b86ad0a5e158bc9"}}, +{"id":"ucengine","key":"ucengine","value":{"rev":"5-1e8a91c813e39b6f1b9f988431bb65c8"}}, +{"id":"udon","key":"udon","value":{"rev":"3-9a819e835f88fc91272b6366c70d83c0"}}, +{"id":"ueberDB","key":"ueberDB","value":{"rev":"85-fa700e5a64efaf2e71de843d7175606c"}}, +{"id":"uglify-js","key":"uglify-js","value":{"rev":"30-9ac97132a90f94b0a3aadcd96ed51890"}}, +{"id":"uglify-js-middleware","key":"uglify-js-middleware","value":{"rev":"5-47bd98d7f1118f5cab617310d4022eb4"}}, +{"id":"uglifycss","key":"uglifycss","value":{"rev":"3-4eefc4632e6e61ec999e93a1e26e0c83"}}, +{"id":"ui","key":"ui","value":{"rev":"27-b6439c8fcb5feb1d8f722ac5a91727c0"}}, +{"id":"ukijs","key":"ukijs","value":{"rev":"13-a0d7b143104e6cc0760cbe7e61c4f293"}}, +{"id":"umecob","key":"umecob","value":{"rev":"19-960fef8b8b8468ee69096173baa63232"}}, +{"id":"underscore","key":"underscore","value":{"rev":"29-419857a1b0dc08311717d1f6066218b8"}}, +{"id":"underscore-data","key":"underscore-data","value":{"rev":"17-e763dd42ea6e4ab71bc442e9966e50e4"}}, +{"id":"underscore.date","key":"underscore.date","value":{"rev":"11-a1b5870b855d49a3bd37823a736e9f93"}}, +{"id":"underscore.inspector","key":"underscore.inspector","value":{"rev":"7-04d67b5bfe387391d461b11c6ddda231"}}, +{"id":"underscore.string","key":"underscore.string","value":{"rev":"31-4100a9e1f1d7e8dde007cc6736073e88"}}, +{"id":"underscorem","key":"underscorem","value":{"rev":"5-181dd113e62482020122e6a68f80cdc1"}}, +{"id":"underscorex","key":"underscorex","value":{"rev":"8-76b82cffecd4304822fbc346e6cebc1b"}}, +{"id":"underscorify","key":"underscorify","value":{"rev":"3-7bb03dccba21d30c50328e7d4878704e"}}, +{"id":"unicode","key":"unicode","value":{"rev":"45-2fc73b36aad2661e5bb2e703e62a6f71"}}, +{"id":"unicoder","key":"unicoder","value":{"rev":"3-6f6571d361217af7fea7c224ca8a1149"}}, +{"id":"unit","key":"unit","value":{"rev":"5-68847eeb11474765cf73f1e21ca4b839"}}, +{"id":"unite","key":"unite","value":{"rev":"3-a8812f4e77d1d1a9dc67c327d8e75b47"}}, +{"id":"unittest-jslint","key":"unittest-jslint","value":{"rev":"3-c371c63c7b68a32357becb7b6a02d048"}}, +{"id":"unixlib","key":"unixlib","value":{"rev":"3-41f4c2859ca92951cf40556faa4eacdb"}}, +{"id":"unlimit","key":"unlimit","value":{"rev":"3-f42d98066e6ebbc23ef67499845ac020"}}, +{"id":"unrequire","key":"unrequire","value":{"rev":"17-bc75241891ae005eb52844222daf8f97"}}, +{"id":"unshortener","key":"unshortener","value":{"rev":"15-0851cb8bc3c378c37a3df9760067a109"}}, +{"id":"unused","key":"unused","value":{"rev":"3-362e713349c4a5541564fa2de33d01ba"}}, +{"id":"upload","key":"upload","value":{"rev":"3-63aedcfb335754c3bca1675c4add51c4"}}, +{"id":"ups_node","key":"ups_node","value":{"rev":"15-fa6d0be3831ee09420fb703c4d508534"}}, +{"id":"upy","key":"upy","value":{"rev":"5-dab63054d02be71f9c2709659974a5e1"}}, +{"id":"uri","key":"uri","value":{"rev":"3-5baaa12433cff7539b1d39c0c7f62853"}}, +{"id":"uri-parser","key":"uri-parser","value":{"rev":"3-d7e81b08e8b3f6f5ac8c6b4220228529"}}, +{"id":"url","key":"url","value":{"rev":"3-0dfd5ec2904cb1f645fa7449dbb0ce52"}}, +{"id":"url-expander","key":"url-expander","value":{"rev":"21-73bf9fa3c98b15d5ef0ed9815d862953"}}, +{"id":"urllib","key":"urllib","value":{"rev":"5-b015944526c15589a1504d398dcb598a"}}, +{"id":"urn-parser","key":"urn-parser","value":{"rev":"3-08a35a166790ecf88729befd4ebc7bf1"}}, +{"id":"useless","key":"useless","value":{"rev":"3-9d7b7ab9d4811847ed6e99ce2226d687"}}, +{"id":"user-agent","key":"user-agent","value":{"rev":"16-ac00f085795346421242e3d4d75523ad"}}, +{"id":"useragent","key":"useragent","value":{"rev":"7-3184d8aba5540e6596da9e3635ee3c24"}}, +{"id":"useragent_parser","key":"useragent_parser","value":{"rev":"3-730427aba3f0825fd28850e96b1613d4"}}, +{"id":"utf7","key":"utf7","value":{"rev":"3-ad56e4c9ac5a509ff568a3cdf0ed074f"}}, +{"id":"utf8","key":"utf8","value":{"rev":"3-c530cad759dd6e4e471338a71a307434"}}, +{"id":"util","key":"util","value":{"rev":"3-0e55e3466bc3ea6aeda6384639e842c3"}}, +{"id":"utility-belt","key":"utility-belt","value":{"rev":"3-8de401b41ef742b3c0a144b99099771f"}}, +{"id":"utml","key":"utml","value":{"rev":"5-5f0f3de6f787056bd124ca98716fbc19"}}, +{"id":"uubench","key":"uubench","value":{"rev":"6-b6cb0756e35ce998b61bb9a6ea0f5732"}}, +{"id":"uuid","key":"uuid","value":{"rev":"13-3f014b236668ec5eb49d0a17ad54d397"}}, +{"id":"uuid-lib","key":"uuid-lib","value":{"rev":"3-3de40495439e240b5a41875c19c65b1a"}}, +{"id":"uuid-pure","key":"uuid-pure","value":{"rev":"19-b94e9f434901fe0a0bbfdfa06f785874"}}, +{"id":"uuid.js","key":"uuid.js","value":{"rev":"8-3232a97c9f4a2b601d207488350df01b"}}, +{"id":"v8-profiler","key":"v8-profiler","value":{"rev":"12-790c90391bcbec136e316e57b30a845c"}}, +{"id":"valentine","key":"valentine","value":{"rev":"35-dd4b0642aacaf833e1119fc42bb6e9df"}}, +{"id":"validate-json","key":"validate-json","value":{"rev":"5-6a71fb36b102b3a4c5f6cc35012518b3"}}, +{"id":"validations","key":"validations","value":{"rev":"5-7272c97d35e3269813d91f1ea06e7217"}}, +{"id":"validator","key":"validator","value":{"rev":"45-9983ff692c291143ba670b613e07ddab"}}, +{"id":"vanilla","key":"vanilla","value":{"rev":"3-2e1d05af0873386b7cd6d432f1e76217"}}, +{"id":"vapor","key":"vapor","value":{"rev":"1-e1f86f03c94a4b90bca347408dbc56ff"}}, +{"id":"vargs","key":"vargs","value":{"rev":"6-9e389cfd648034dd469348112eedb23b"}}, +{"id":"vash","key":"vash","value":{"rev":"9-85ade8b7249a0e8230e8f0aaf1c34e2a"}}, +{"id":"vbench","key":"vbench","value":{"rev":"3-059528251a566c6ac363e236212448ce"}}, +{"id":"vendor.js","key":"vendor.js","value":{"rev":"5-264b0f8a771cad113be6919b6004ff95"}}, +{"id":"ventstatus","key":"ventstatus","value":{"rev":"3-16aa39e22b149b23b64317991415f92c"}}, +{"id":"version-compare","key":"version-compare","value":{"rev":"3-a8d6eea31572fe973ddd98c0a8097bc6"}}, +{"id":"vertica","key":"vertica","value":{"rev":"37-035d50183c3ad3056db0d7a13c20005d"}}, +{"id":"vhost","key":"vhost","value":{"rev":"9-53bbdba14dae631a49e782d169e4fc5a"}}, +{"id":"vice","key":"vice","value":{"rev":"5-0f74600349f4540b1b104d4ebfec1309"}}, +{"id":"video","key":"video","value":{"rev":"10-65c0b603047188fe2b07cbd2e1c93fe7"}}, +{"id":"vie","key":"vie","value":{"rev":"5-94e23770c5a0510480a0bae07d846ebc"}}, +{"id":"view","key":"view","value":{"rev":"21-a2abdfc54ab732a906347090c68564a5"}}, +{"id":"vigilante","key":"vigilante","value":{"rev":"30-951541a8b2fc2364bb1ccd7cfae56482"}}, +{"id":"villain","key":"villain","value":{"rev":"10-8dbfc5db42230d8813e6cc61af14d575"}}, +{"id":"vine","key":"vine","value":{"rev":"17-e7ac5d190cacf0f2d17d27e37b2b9f5f"}}, +{"id":"vipe","key":"vipe","value":{"rev":"3-78996531221e08292b9ca3de6e19d578"}}, +{"id":"viralheat","key":"viralheat","value":{"rev":"3-b928ce797fd5955c766b6b7e9e9c8f54"}}, +{"id":"viralheat-sentiment","key":"viralheat-sentiment","value":{"rev":"3-5d083e0d141ecf36e06c7c2885b01b5c"}}, +{"id":"virustotal.js","key":"virustotal.js","value":{"rev":"3-074be49f7e877b154a2144ef844f78e9"}}, +{"id":"vk","key":"vk","value":{"rev":"9-48f53ea9ebe68c9d3af45eb601c71006"}}, +{"id":"vmcjs","key":"vmcjs","value":{"rev":"5-44d8dd906fa3530d2bfc2dfee7f498d4"}}, +{"id":"vogue","key":"vogue","value":{"rev":"38-891354d18638a26d5b5ba95933faae0e"}}, +{"id":"vogue-dtrejo","key":"vogue-dtrejo","value":{"rev":"3-3ef8d57d3b5c0aca297fe38c9040954f"}}, +{"id":"votizen-logger","key":"votizen-logger","value":{"rev":"4-ba0837a28693aba346fab885a3a8f315"}}, +{"id":"vows","key":"vows","value":{"rev":"80-43d6a81c184c06d73e692358e913821e"}}, +{"id":"vows-bdd","key":"vows-bdd","value":{"rev":"3-dc2a7013dd94b0b65a3ed3a8b69b680e"}}, +{"id":"vows-ext","key":"vows-ext","value":{"rev":"49-079067a01a681ca7df4dfaae74adb3fb"}}, +{"id":"vows-fluent","key":"vows-fluent","value":{"rev":"23-67625a035cedf90c8fed73722465ecea"}}, +{"id":"vows-is","key":"vows-is","value":{"rev":"68-45a13df422d08ab00cc8f785b6411741"}}, +{"id":"voyeur","key":"voyeur","value":{"rev":"5-56fe23f95df6ff648b67f1a9baf10d41"}}, +{"id":"vws.pubsub","key":"vws.pubsub","value":{"rev":"5-609497d66ab6a76c5201904e41b95715"}}, +{"id":"wabtools","key":"wabtools","value":{"rev":"7-b24cd7262720a29f59da103b7110325d"}}, +{"id":"wadey-ranger","key":"wadey-ranger","value":{"rev":"17-a0541bad0880ffc199e8b2ef4c80ddb8"}}, +{"id":"wagner","key":"wagner","value":{"rev":"3-4b76219928f409b7124e02c0518d6cb6"}}, +{"id":"wait","key":"wait","value":{"rev":"3-7f8a5f9c8e86da4f219353ae778868a9"}}, +{"id":"waiter","key":"waiter","value":{"rev":"5-680176b06719c9a8499725b0a617cdc9"}}, +{"id":"waitlist","key":"waitlist","value":{"rev":"17-f3b2a4cf58b940c3839debda23c12b8e"}}, +{"id":"wake_on_lan","key":"wake_on_lan","value":{"rev":"6-1295bb5c618495b74626aaaa1c644d32"}}, +{"id":"walk","key":"walk","value":{"rev":"22-c05e1e1252a59b1048a0b6464631d08b"}}, +{"id":"walker","key":"walker","value":{"rev":"18-e8a20efc286234fb20789dc68cd04cd1"}}, +{"id":"warp","key":"warp","value":{"rev":"19-c7f17d40291984cd27f1d57fe764a5d2"}}, +{"id":"watch","key":"watch","value":{"rev":"18-3bc43d36ea1dbf69b93d4ea3d9534d44"}}, +{"id":"watch-less","key":"watch-less","value":{"rev":"5-f69a778ee58c681ad3b24a766576c016"}}, +{"id":"watch-tree","key":"watch-tree","value":{"rev":"5-316b60e474c3ae6e97f7cdb06b65af78"}}, +{"id":"watch.js","key":"watch.js","value":{"rev":"11-8c02c7429f90ca5e756a131d85bd5a32"}}, +{"id":"watch_dir","key":"watch_dir","value":{"rev":"5-df0a592508e1e13f5d24c2863733a8b9"}}, +{"id":"watchable","key":"watchable","value":{"rev":"3-f8694ff0c3add9a1310f0980e24ea23b"}}, +{"id":"watchersto","key":"watchersto","value":{"rev":"5-06665e682f58f61831d41d08b4ea12e7"}}, +{"id":"watchman","key":"watchman","value":{"rev":"11-956ad2175d0c5b52e82988a697474244"}}, +{"id":"watchn","key":"watchn","value":{"rev":"15-9685afa8b501f8cd7e068beed1264cfe"}}, +{"id":"wave","key":"wave","value":{"rev":"7-d13054ac592b3b4f81147b6bc7a91ea1"}}, +{"id":"wax","key":"wax","value":{"rev":"71-2e8877b0b6df27c1375dcd7f6bbdb4b7"}}, +{"id":"waz-storage-js","key":"waz-storage-js","value":{"rev":"15-1aaa07353c3d25f5794fa004a23c4dfa"}}, +{"id":"wd","key":"wd","value":{"rev":"19-20c4ee8b83057ece691f9669e288059e"}}, +{"id":"weak","key":"weak","value":{"rev":"3-b774b8be74f33c843df631aa07854104"}}, +{"id":"web","key":"web","value":{"rev":"3-c571dee306020f6f92c7a3150e8023b1"}}, +{"id":"webapp","key":"webapp","value":{"rev":"5-60525be5734cf1d02a77508e5f46bafa"}}, +{"id":"webfonts","key":"webfonts","value":{"rev":"5-d7be242801702fd1eb728385b8982107"}}, +{"id":"webgenjs","key":"webgenjs","value":{"rev":"3-ac6be47eedcbb2561babdb9495d60f29"}}, +{"id":"webgl","key":"webgl","value":{"rev":"18-21cd40f6c7e4943a2d858ed813d3c45d"}}, +{"id":"webhookit-comment","key":"webhookit-comment","value":{"rev":"5-1fbed3d75bf485433bdcac4fac625eab"}}, +{"id":"webhookit-ejs","key":"webhookit-ejs","value":{"rev":"5-9b76f543e9c0941d0245cb3bfd2cc64e"}}, +{"id":"webhookit-email","key":"webhookit-email","value":{"rev":"5-d472fde4f101d55d029a29777bbdb952"}}, +{"id":"webhookit-http","key":"webhookit-http","value":{"rev":"13-9f6f05cdb03f45a2227b9cd820565e63"}}, +{"id":"webhookit-jsonparse","key":"webhookit-jsonparse","value":{"rev":"3-6d49bf8a9849130d9bbc5b0d6fb0bf67"}}, +{"id":"webhookit-jsonpath","key":"webhookit-jsonpath","value":{"rev":"5-7acaf50267274584dca1cc5c1e77ce2e"}}, +{"id":"webhookit-objectbuilder","key":"webhookit-objectbuilder","value":{"rev":"5-e63fb26621929f3ab8d8519556116b30"}}, +{"id":"webhookit-soupselect","key":"webhookit-soupselect","value":{"rev":"9-726f2f4794437632032058bc81e6ee5d"}}, +{"id":"webhookit-xml2js","key":"webhookit-xml2js","value":{"rev":"3-ec959e474ecb3a163f2991767594a60e"}}, +{"id":"webhookit-yql","key":"webhookit-yql","value":{"rev":"9-c6ae87a8cc55d33901485ee7c3895ef8"}}, +{"id":"webify","key":"webify","value":{"rev":"3-86810874abf2274d1387ee748987b627"}}, +{"id":"webjs","key":"webjs","value":{"rev":"103-593a1e4e69d8db6284ecf4fce01b4668"}}, +{"id":"webmake","key":"webmake","value":{"rev":"13-f6588093a487212a151d1c00c26de7b4"}}, +{"id":"webmetrics","key":"webmetrics","value":{"rev":"3-44a428fd2ecb1b1bf50c33157750dd16"}}, +{"id":"webrepl","key":"webrepl","value":{"rev":"21-d6dcdbb59186092d9a0f1977c69394a5"}}, +{"id":"webservice","key":"webservice","value":{"rev":"18-05038f1cf997cff1ed81e783485680aa"}}, +{"id":"webshell","key":"webshell","value":{"rev":"3-05c431cf961a9dbaee1dfd95237e189a"}}, +{"id":"websocket","key":"websocket","value":{"rev":"33-7c20d55a88f187d7b398525824159f67"}}, +{"id":"websocket-client","key":"websocket-client","value":{"rev":"12-26a3530b9e6d465f472c791db01c9fc3"}}, +{"id":"websocket-protocol","key":"websocket-protocol","value":{"rev":"3-e52a8496f70686c289087149aee8b359"}}, +{"id":"websocket-server","key":"websocket-server","value":{"rev":"46-9f69e2f9408eb196b3a1aa990e5b5ac2"}}, +{"id":"websockets","key":"websockets","value":{"rev":"3-5535fcb4ae144909f021ee067eec7b2a"}}, +{"id":"webworker","key":"webworker","value":{"rev":"16-f7a4c758b176c6e464c93b6a9f79283b"}}, +{"id":"weibo","key":"weibo","value":{"rev":"21-8a50310389b2f43d8a7cb14e138eb122"}}, +{"id":"weld","key":"weld","value":{"rev":"7-16601ac41d79b3a01e4d2615035376ed"}}, +{"id":"whatlang","key":"whatlang","value":{"rev":"5-f7b10a0f8c3b6579c81d1d1222aeccd7"}}, +{"id":"wheat","key":"wheat","value":{"rev":"16-f6a97282f521edb7f2b0e5edc9577ce0"}}, +{"id":"which","key":"which","value":{"rev":"7-e5fdcb208715f2201d3911caf8a67042"}}, +{"id":"whiskers","key":"whiskers","value":{"rev":"9-2cfd73cebeaf8ce3cb1591e825380621"}}, +{"id":"whiskey","key":"whiskey","value":{"rev":"49-55367718b9067ff2bcb7fbb89327587b"}}, +{"id":"whisperjs","key":"whisperjs","value":{"rev":"19-e2182c72ea24b8c40e12b0c1027eb60d"}}, +{"id":"wikimapia","key":"wikimapia","value":{"rev":"11-8d1a314e8c827236e21e0aabc6e5efd9"}}, +{"id":"wikiminute","key":"wikiminute","value":{"rev":"11-d031a2c7d41bcecb52ac9c7bb5e75e8e"}}, +{"id":"wikiwym","key":"wikiwym","value":{"rev":"3-c0fd4c9b6b93b3a8b14021c2ebae5b0c"}}, +{"id":"wiky","key":"wiky","value":{"rev":"6-be49acce152652e9219a32da1dfd01ea"}}, +{"id":"wildfile","key":"wildfile","value":{"rev":"9-16a05032f890f07c72a5f48c3a6ffbc0"}}, +{"id":"willful.js","key":"willful.js","value":{"rev":"3-3bb957b0a5fc1b4b6c15bace7e8f5902"}}, +{"id":"wilson","key":"wilson","value":{"rev":"14-d4bf88484f1b1cf86b07f4b74f26991d"}}, +{"id":"window","key":"window","value":{"rev":"3-ea84e74fd5556ff662ff47f40522cfa2"}}, +{"id":"windshaft","key":"windshaft","value":{"rev":"21-1d31e4eb7482d15b97c919a4b051ea9c"}}, +{"id":"windtunnel","key":"windtunnel","value":{"rev":"5-0d2ef7faed1b221a3eaa581480adad64"}}, +{"id":"wingrr","key":"wingrr","value":{"rev":"9-a599fad3e0c74895aa266c61805b76cb"}}, +{"id":"wings","key":"wings","value":{"rev":"3-cfcfd262d905cd3be1d1bae82fafd9f0"}}, +{"id":"winston","key":"winston","value":{"rev":"111-13acba5a9ba6d4f19469acb4122d72ea"}}, +{"id":"winston-amqp","key":"winston-amqp","value":{"rev":"5-61408e1dde45f974a995dd27905b8831"}}, +{"id":"winston-mongodb","key":"winston-mongodb","value":{"rev":"9-ae755237a8faa8f5a0b92029c236691a"}}, +{"id":"winston-redis","key":"winston-redis","value":{"rev":"3-1fb861edc109ed5cbd735320124ba103"}}, +{"id":"winston-riak","key":"winston-riak","value":{"rev":"15-3f2923a73386524d851244ace1bece98"}}, +{"id":"winston-syslog","key":"winston-syslog","value":{"rev":"9-7f256bd63aebec19edea47f80de21dfd"}}, +{"id":"winstoon","key":"winstoon","value":{"rev":"9-d719ca7abfeeaa468d1b431c24836089"}}, +{"id":"wirez","key":"wirez","value":{"rev":"5-5c5d0768485ed11c2b80a8a6a3699c39"}}, +{"id":"wobot","key":"wobot","value":{"rev":"9-176ed86fd9d94a7e94efb782c7512533"}}, +{"id":"word-generator","key":"word-generator","value":{"rev":"5-a2c67f11474a8925eb67f04369ac068a"}}, +{"id":"wordnik","key":"wordnik","value":{"rev":"3-4e371fbf7063ced50bbe726079fda1ec"}}, +{"id":"wordpress-auth","key":"wordpress-auth","value":{"rev":"5-05eef01542e00a88418d2885efb4c9ad"}}, +{"id":"wordwrap","key":"wordwrap","value":{"rev":"5-a728ce2cdeab69b71d40fe7c1c41d7c1"}}, +{"id":"wordy","key":"wordy","value":{"rev":"3-bc220ca3dbd008aee932c551cfbdcc6b"}}, +{"id":"worker","key":"worker","value":{"rev":"6-3b03aa764c9fac66ec5c1773e9abc43b"}}, +{"id":"worker-pool","key":"worker-pool","value":{"rev":"3-e3550e704b48f5799a4cc02af7d27355"}}, +{"id":"workflow","key":"workflow","value":{"rev":"3-817c6c77cbb2f332ea9bdddf3b565c00"}}, +{"id":"workhorse","key":"workhorse","value":{"rev":"30-c39ae2ddd867a137073a289c1709f229"}}, +{"id":"world-db","key":"world-db","value":{"rev":"6-eaef1beb6abbebd3e903a28a7f46aa81"}}, +{"id":"worm","key":"worm","value":{"rev":"7-00db15dc9cfd48777cce32fb93e1df6b"}}, +{"id":"wormhole","key":"wormhole","value":{"rev":"37-21e2db062666040c477a7042fc2ffc9d"}}, +{"id":"wrap","key":"wrap","value":{"rev":"3-aded14c091b730813bd24d92cae45cd6"}}, +{"id":"wrench","key":"wrench","value":{"rev":"12-57d3da63e34e59e1f5d1b3bde471e31f"}}, +{"id":"wsclient","key":"wsclient","value":{"rev":"17-f962faf4f6c9d4eda9111e90b2d0735d"}}, +{"id":"wscomm","key":"wscomm","value":{"rev":"47-80affda45da523e57c87b8d43ef73ec9"}}, +{"id":"wsscraper","key":"wsscraper","value":{"rev":"3-94a84fe9b3df46b8d6ad4851e389dae1"}}, +{"id":"wu","key":"wu","value":{"rev":"4-f307d3a00e7a1212b7949bcb96161088"}}, +{"id":"wunderapi","key":"wunderapi","value":{"rev":"17-31e3b991e97931022992b97f9441b9af"}}, +{"id":"wurfl-client","key":"wurfl-client","value":{"rev":"3-a8c3e454d6d9c9b23b7290eb64866e80"}}, +{"id":"wwwdude","key":"wwwdude","value":{"rev":"19-eb8192461b8864af59740f9b44e168ca"}}, +{"id":"x","key":"x","value":{"rev":"9-10403358980aba239b7a9af78175589d"}}, +{"id":"x-core","key":"x-core","value":{"rev":"13-f04b063855da231539d1945a35802d9e"}}, +{"id":"x11","key":"x11","value":{"rev":"5-e5b1435c0aa29207c90fdeaa87570bb7"}}, +{"id":"xappy-async_testing","key":"xappy-async_testing","value":{"rev":"3-747c934540267492b0e6d3bb6d65964c"}}, +{"id":"xappy-pg","key":"xappy-pg","value":{"rev":"4-119e8f93af1e4976900441ec5e3bb0b9"}}, +{"id":"xcbjs","key":"xcbjs","value":{"rev":"3-095a693f9ac7b4e2c319f79d95eb3e95"}}, +{"id":"xemplar","key":"xemplar","value":{"rev":"9-2ccde68ffac8e66aa8013b98d82ff20c"}}, +{"id":"xfer","key":"xfer","value":{"rev":"3-c1875506ed132c6a2b5e7d7eaff9df14"}}, +{"id":"xjs","key":"xjs","value":{"rev":"11-05d5cd002298894ed582a9f5bff5a762"}}, +{"id":"xjst","key":"xjst","value":{"rev":"11-68774970fc7f413ff620fb0d50d8a1d9"}}, +{"id":"xkcdbot","key":"xkcdbot","value":{"rev":"3-7cc9affb442c9ae4c7a109a0b72c2600"}}, +{"id":"xml","key":"xml","value":{"rev":"12-0d1a69f11767de47bfc4a0fce566e36e"}}, +{"id":"xml-markup","key":"xml-markup","value":{"rev":"6-100a92d1f7fe9444e285365dce8203de"}}, +{"id":"xml-simple","key":"xml-simple","value":{"rev":"3-d60e388df5b65128a5e000381643dd31"}}, +{"id":"xml-stream","key":"xml-stream","value":{"rev":"13-44d6ee47e00c91735e908e69c5dffc6b"}}, +{"id":"xml2js","key":"xml2js","value":{"rev":"27-434297bcd9db7628c57fcc9bbbe2671e"}}, +{"id":"xml2js-expat","key":"xml2js-expat","value":{"rev":"15-a8c5c0ba64584d07ed94c0a14dc55fe8"}}, +{"id":"xml2json","key":"xml2json","value":{"rev":"17-fa740417285834be1aa4d95e1ed6d9b9"}}, +{"id":"xmlbuilder","key":"xmlbuilder","value":{"rev":"32-63e3be32dda07c6e998866cddd8a879e"}}, +{"id":"xmlhttprequest","key":"xmlhttprequest","value":{"rev":"9-570fba8bfd5b0958c258cee7309c4b54"}}, +{"id":"xmlrpc","key":"xmlrpc","value":{"rev":"15-ae062e34a965e7543d4fd7b6c3f29cb7"}}, +{"id":"xmpp-client","key":"xmpp-client","value":{"rev":"6-2d123b4666b5deda71f071295cfca793"}}, +{"id":"xmpp-muc","key":"xmpp-muc","value":{"rev":"6-d95b8bca67f406a281a27aa4d89f6f46"}}, +{"id":"xmpp-server","key":"xmpp-server","value":{"rev":"9-44374bc3398cc74f2a36ff973fa0d35f"}}, +{"id":"xp","key":"xp","value":{"rev":"7-781a5e1da74332f25c441f627cd0b4ea"}}, +{"id":"xregexp","key":"xregexp","value":{"rev":"3-c34025fdeb13c18389e737a4b3d4ddf7"}}, +{"id":"xsd","key":"xsd","value":{"rev":"5-566590ccb8923453175a3f1f3b6cbf24"}}, +{"id":"ya-csv","key":"ya-csv","value":{"rev":"28-d485b812914b3c3f5d7e9c4bcee0c3ea"}}, +{"id":"yabble","key":"yabble","value":{"rev":"5-5370a53003a122fe40a16ed2b0e5cead"}}, +{"id":"yaconfig","key":"yaconfig","value":{"rev":"3-f82a452260b010cc5128818741c46017"}}, +{"id":"yah","key":"yah","value":{"rev":"3-cfc0c10f85a9e3076247ca350077e90f"}}, +{"id":"yajet","key":"yajet","value":{"rev":"5-6f7f24335436c84081adf0bbb020b151"}}, +{"id":"yajl","key":"yajl","value":{"rev":"3-8ac011e5a00368aad8d58d95a64c7254"}}, +{"id":"yaml","key":"yaml","value":{"rev":"16-732e5cb6dc10eefeb7dae959e677fb5b"}}, +{"id":"yaml-config","key":"yaml-config","value":{"rev":"3-fb817000005d48526a106ecda5ac5435"}}, +{"id":"yamlish","key":"yamlish","value":{"rev":"3-604fb4f1de9d5aa5ed48432c7db4a8a1"}}, +{"id":"yamlparser","key":"yamlparser","value":{"rev":"13-130a82262c7f742c2a1e26fc58983503"}}, +{"id":"yammer-js","key":"yammer-js","value":{"rev":"3-16ec240ab0b26fa9f0513ada8c769c1f"}}, +{"id":"yanc","key":"yanc","value":{"rev":"15-33d713f0dee42efe8306e6b2a43fe336"}}, +{"id":"yanlibs","key":"yanlibs","value":{"rev":"3-e481217d43b9f79b80e22538eabadabc"}}, +{"id":"yanop","key":"yanop","value":{"rev":"5-6c407ce6f1c18b6bac37ad5945ff8fed"}}, +{"id":"yanx","key":"yanx","value":{"rev":"6-f4c4d255526eaa922baa498f37d38fe0"}}, +{"id":"yasession","key":"yasession","value":{"rev":"7-6e2598123d41b33535b88e99eb87828f"}}, +{"id":"yelp","key":"yelp","value":{"rev":"3-5c769f488a65addba313ff3b6256c365"}}, +{"id":"yeti","key":"yeti","value":{"rev":"50-65338f573ed8f799ec9b1c9bd2643e34"}}, +{"id":"youtube","key":"youtube","value":{"rev":"7-5020698499af8946e9578864a21f6ac5"}}, +{"id":"youtube-dl","key":"youtube-dl","value":{"rev":"76-a42f09b7bf87e7e6157d5d9835cca8a7"}}, +{"id":"youtube-js","key":"youtube-js","value":{"rev":"5-e2d798a185490ad98cb57c2641c4658e"}}, +{"id":"yproject","key":"yproject","value":{"rev":"7-70cb1624de9e8321c67f1f348dc80ff4"}}, +{"id":"yql","key":"yql","value":{"rev":"18-d19123b254abfb097648c4a242513fd3"}}, +{"id":"yubico","key":"yubico","value":{"rev":"9-0e2bd84479a68e1f12c89800a4049053"}}, +{"id":"yui-cli","key":"yui-cli","value":{"rev":"7-0186f7278da8734861109799b9123197"}}, +{"id":"yui-compressor","key":"yui-compressor","value":{"rev":"12-5804d78bb24bb2d3555ca2e28ecc6b70"}}, +{"id":"yui-repl","key":"yui-repl","value":{"rev":"25-9b202e835a46a07be931e6529a4ccb61"}}, +{"id":"yui3","key":"yui3","value":{"rev":"93-4decc441f19acf0ab5abd1a81e3cbb40"}}, +{"id":"yui3-2in3","key":"yui3-2in3","value":{"rev":"10-dc0429fe818aceeca80d075613c9547a"}}, +{"id":"yui3-bare","key":"yui3-bare","value":{"rev":"33-60779e2088efe782b437ecc053c01e2f"}}, +{"id":"yui3-base","key":"yui3-base","value":{"rev":"33-89017bb5dfde621fc7d179f2939e3d1b"}}, +{"id":"yui3-core","key":"yui3-core","value":{"rev":"17-3759fa0072e24f4bb29e22144cb3dda3"}}, +{"id":"yui3-gallery","key":"yui3-gallery","value":{"rev":"38-9ce6f7a60b2f815337767249d1827951"}}, +{"id":"yui3-mocha","key":"yui3-mocha","value":{"rev":"3-83ff9c42a37f63de0c132ce6cb1ad282"}}, +{"id":"yuitest","key":"yuitest","value":{"rev":"17-b5dd4ad4e82b6b310d7a6e9103570779"}}, +{"id":"zap","key":"zap","value":{"rev":"15-9b9b7c6badb0a9fd9d469934e9be12c0"}}, +{"id":"zappa","key":"zappa","value":{"rev":"26-d193767b488e778db41455924001b1fb"}}, +{"id":"zen","key":"zen","value":{"rev":"7-23a260d4379816a5c931c2e823bda1ae"}}, +{"id":"zeppelin","key":"zeppelin","value":{"rev":"7-9db2e313fe323749e259be91edcdee8e"}}, +{"id":"zeromq","key":"zeromq","value":{"rev":"24-7cb4cec19fb3a03871900ac3558fcbef"}}, +{"id":"zest","key":"zest","value":{"rev":"5-080a2a69a93d66fcaae0da7ddaa9ceab"}}, +{"id":"zest-js","key":"zest-js","value":{"rev":"5-541454063618fa3a9d6f44e0147ea622"}}, +{"id":"zip","key":"zip","value":{"rev":"11-443da314322b6a1a93b40a38124610f2"}}, +{"id":"zipfile","key":"zipfile","value":{"rev":"32-e846d29fc615e8fbc610f44653a1e085"}}, +{"id":"zipper","key":"zipper","value":{"rev":"5-cde0a4a7f03c139dcd779f3ede55bd0e"}}, +{"id":"zippy","key":"zippy","value":{"rev":"7-3906ca62dd8020e9673a7c229944bd3f"}}, +{"id":"zipwith","key":"zipwith","value":{"rev":"3-58c50c6220d6493047f8333c5db22cc9"}}, +{"id":"zlib","key":"zlib","value":{"rev":"27-e0443f2d9a0c9db31f86a6c5b9ba78ba"}}, +{"id":"zlib-sync","key":"zlib-sync","value":{"rev":"3-b17a39dd23b3455d35ffd862004ed677"}}, +{"id":"zlibcontext","key":"zlibcontext","value":{"rev":"11-1c0c6b34e87adab1b6d5ee60be6a608c"}}, +{"id":"zlibstream","key":"zlibstream","value":{"rev":"5-44e30d87de9aaaa975c64d8dcdcd1a94"}}, +{"id":"zmq","key":"zmq","value":{"rev":"7-eae5d939fcdb7be5edfb328aefeaba4e"}}, +{"id":"zo","key":"zo","value":{"rev":"5-956f084373731805e5871f4716049529"}}, +{"id":"zombie","key":"zombie","value":{"rev":"109-9eec325353a47bfcc32a94719bf147da"}}, +{"id":"zombie-https","key":"zombie-https","value":{"rev":"3-6aff25d319be319343882575acef4890"}}, +{"id":"zoneinfo","key":"zoneinfo","value":{"rev":"15-d95d2041324d961fe26a0217cf485511"}}, +{"id":"zookeeper","key":"zookeeper","value":{"rev":"11-5a5ed278a01e4b508ffa6e9a02059898"}}, +{"id":"zoom","key":"zoom","value":{"rev":"3-9d0277ad580d64c9a4d48a40d22976f0"}}, +{"id":"zsock","key":"zsock","value":{"rev":"16-4f975b91f0f9c2d2a2501e362401c368"}}, +{"id":"zutil","key":"zutil","value":{"rev":"9-3e7bc6520008b4fcd5ee6eb9e8e5adf5"}} +]} diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/fn.js b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/fn.js new file mode 100644 index 00000000..4acc6726 --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/fn.js @@ -0,0 +1,39 @@ + + +var fs = require ('fs') + , join = require('path').join + , file = join(__dirname, 'fixtures','all_npm.json') + , JSONStream = require('../') + , it = require('it-is') + +function fn (s) { + return !isNaN(parseInt(s, 10)) +} + +var expected = JSON.parse(fs.readFileSync(file)) + , parser = JSONStream.parse(['rows', fn]) + , called = 0 + , ended = false + , parsed = [] + +fs.createReadStream(file).pipe(parser) + +parser.on('data', function (data) { + called ++ + it.has({ + id: it.typeof('string'), + value: {rev: it.typeof('string')}, + key:it.typeof('string') + }) + parsed.push(data) +}) + +parser.on('end', function () { + ended = true +}) + +process.on('exit', function () { + it(called).equal(expected.rows.length) + it(parsed).deepEqual(expected.rows) + console.error('PASSED') +}) diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/memory.js b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/memory.js new file mode 100644 index 00000000..83f467ee --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/memory.js @@ -0,0 +1,69 @@ +var JSONStream = require('..') +var from = require('from') +var assert = require('assert') +var probe = require('probe-stream')({interval: 1000}) + +var letters = '.pyfgcrlaoeuidhthtnsqjbmwvmbbkjqAOFEXACGOBQRCBK>RCMORPKGPOCRKB' + +function randWord (l) { + var s = '' + l = l || 1000 + while (l --) + s = letters.substring(~~(Math.random()*letters.length)) + return s +} + +function randObj (d) { + if (0 >= d) return [] + return { + row: d, + timestamp: Date.now(), + date: new Date(), + thing: Math.random() < 0.3 ? {} : randObj(d - 1), + array: [Math.random(), Math.random(), Math.random()], + object: { + A: '#'+Math.random(), + B: randWord(), + C: Math.random() < 0.1 ? {} : randObj(d - 1) + } + } +} + +var objs = [] +var l = 6 +while(l --) + objs.push(new Buffer(JSON.stringify(randObj(l * 3)))) + +//console.log('objs', objs) + +//return +var I = 0 +from(function (i, next) { + if(i > 1000) return this.emit('data', ']'), this.emit('end') + if(!i) this.emit('data', '[\n') + I = i + this.emit('data', objs[~~(Math.random()*objs.length)]) + this.emit('data', '\n,\n') + +// if(i % 1000) return true + process.nextTick(next) + }) +// .pipe(process.stdout) + +// .pipe(JSONStream.stringify()) +// .on('data', console.log) + .pipe(probe.createProbe()) + .pipe(JSONStream.parse()) +// .on('end', probe.end.bind(probe)) + +// .pipe(fs.createWriteStream('/tmp/test-reverse')) +// + +setInterval(function () { + var mem = process.memoryUsage() + console.log(mem, I) + if(mem.heapUsed > 200000000) + throw new Error('too much memory used') + console.log(mem) +}, 1e3) +//*/ diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/multiple_objects.js b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/multiple_objects.js new file mode 100644 index 00000000..b1c8f91b --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/multiple_objects.js @@ -0,0 +1,42 @@ +var fs = require ('fs'); +var net = require('net'); +var join = require('path').join; +var file = join(__dirname, 'fixtures','all_npm.json'); +var it = require('it-is'); +var JSONStream = require('../'); + +var str = fs.readFileSync(file); + +var datas = {} + +var server = net.createServer(function(client) { + var root_calls = 0; + var data_calls = 0; + var parser = JSONStream.parse(['rows', true, 'key']); + parser.on('root', function(root, count) { + ++ root_calls; + }); + + parser.on('data', function(data) { + ++ data_calls; + datas[data] = (datas[data] || 0) + 1 + it(data).typeof('string') + }); + + parser.on('end', function() { + console.log('END') + var min = Infinity + for (var d in datas) + min = min > datas[d] ? datas[d] : min + it(root_calls).equal(3); + it(min).equal(3); + server.close(); + }); + client.pipe(parser); +}); +server.listen(9999); + +var client = net.connect({ port : 9999 }, function() { + var msgs = str + ' ' + str + '\n\n' + str + client.end(msgs); +}); diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/multiple_objects_error.js b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/multiple_objects_error.js new file mode 100644 index 00000000..980423b6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/multiple_objects_error.js @@ -0,0 +1,35 @@ +var fs = require ('fs'); +var net = require('net'); +var join = require('path').join; +var file = join(__dirname, 'fixtures','all_npm.json'); +var it = require('it-is'); +var JSONStream = require('../'); + +var str = fs.readFileSync(file); + +var server = net.createServer(function(client) { + var root_calls = 0; + var data_calls = 0; + var parser = JSONStream.parse(); + parser.on('root', function(root, count) { + ++ root_calls; + it(root_calls).notEqual(2); + }); + + parser.on('error', function(err) { + console.log(err); + server.close(); + }); + + parser.on('end', function() { + console.log('END'); + server.close(); + }); + client.pipe(parser); +}); +server.listen(9999); + +var client = net.connect({ port : 9999 }, function() { + var msgs = str + '}'; + client.end(msgs); +}); diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/parsejson.js b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/parsejson.js new file mode 100644 index 00000000..02798871 --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/parsejson.js @@ -0,0 +1,28 @@ + + +/* + sometimes jsonparse changes numbers slightly. +*/ + +var r = Math.random() + , Parser = require('jsonparse') + , p = new Parser() + , assert = require('assert') + , times = 20 +while (times --) { + + assert.equal(JSON.parse(JSON.stringify(r)), r, 'core JSON') + + p.onValue = function (v) { + console.error('parsed', v) + assert.equal( + String(v).slice(0,12), + String(r).slice(0,12) + ) + } + console.error('correct', r) + p.write (new Buffer(JSON.stringify([r]))) + + + +} diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/stringify.js b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/stringify.js new file mode 100644 index 00000000..b6de85ed --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/stringify.js @@ -0,0 +1,41 @@ + +var fs = require ('fs') + , join = require('path').join + , file = join(__dirname, 'fixtures','all_npm.json') + , JSONStream = require('../') + , it = require('it-is').style('colour') + + function randomObj () { + return ( + Math.random () < 0.4 + ? {hello: 'eonuhckmqjk', + whatever: 236515, + lies: true, + nothing: [null], + stuff: [Math.random(),Math.random(),Math.random()] + } + : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]] + ) + } + +var expected = [] + , stringify = JSONStream.stringify() + , es = require('event-stream') + , stringified = '' + , called = 0 + , count = 10 + , ended = false + +while (count --) + expected.push(randomObj()) + + es.connect( + es.readArray(expected), + stringify, + //JSONStream.parse([/./]), + es.writeArray(function (err, lines) { + + it(JSON.parse(lines.join(''))).deepEqual(expected) + console.error('PASSED') + }) + ) diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/stringify_object.js b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/stringify_object.js new file mode 100644 index 00000000..9490115a --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/stringify_object.js @@ -0,0 +1,47 @@ + +var fs = require ('fs') + , join = require('path').join + , file = join(__dirname, 'fixtures','all_npm.json') + , JSONStream = require('../') + , it = require('it-is').style('colour') + , es = require('event-stream') + , pending = 10 + , passed = true + + function randomObj () { + return ( + Math.random () < 0.4 + ? {hello: 'eonuhckmqjk', + whatever: 236515, + lies: true, + nothing: [null], + stuff: [Math.random(),Math.random(),Math.random()] + } + : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]] + ) + } + +for (var ix = 0; ix < pending; ix++) (function (count) { + var expected = {} + , stringify = JSONStream.stringifyObject() + + es.connect( + stringify, + es.writeArray(function (err, lines) { + it(JSON.parse(lines.join(''))).deepEqual(expected) + if (--pending === 0) { + console.error('PASSED') + } + }) + ) + + while (count --) { + var key = Math.random().toString(16).slice(2) + expected[key] = randomObj() + stringify.write([ key, expected[key] ]) + } + + process.nextTick(function () { + stringify.end() + }) +})(ix) diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/test.js b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/test.js new file mode 100644 index 00000000..8ea7c2e1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/test.js @@ -0,0 +1,35 @@ + + +var fs = require ('fs') + , join = require('path').join + , file = join(__dirname, 'fixtures','all_npm.json') + , JSONStream = require('../') + , it = require('it-is') + +var expected = JSON.parse(fs.readFileSync(file)) + , parser = JSONStream.parse(['rows', /\d+/ /*, 'value'*/]) + , called = 0 + , ended = false + , parsed = [] + +fs.createReadStream(file).pipe(parser) + +parser.on('data', function (data) { + called ++ + it.has({ + id: it.typeof('string'), + value: {rev: it.typeof('string')}, + key:it.typeof('string') + }) + parsed.push(data) +}) + +parser.on('end', function () { + ended = true +}) + +process.on('exit', function () { + it(called).equal(expected.rows.length) + it(parsed).deepEqual(expected.rows) + console.error('PASSED') +}) diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/test2.js b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/test2.js new file mode 100644 index 00000000..d09df7be --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/test2.js @@ -0,0 +1,29 @@ + + +var fs = require ('fs') + , join = require('path').join + , file = join(__dirname, '..','package.json') + , JSONStream = require('../') + , it = require('it-is') + +var expected = JSON.parse(fs.readFileSync(file)) + , parser = JSONStream.parse([]) + , called = 0 + , ended = false + , parsed = [] + +fs.createReadStream(file).pipe(parser) + +parser.on('data', function (data) { + called ++ + it(data).deepEqual(expected) +}) + +parser.on('end', function () { + ended = true +}) + +process.on('exit', function () { + it(called).equal(1) + console.error('PASSED') +}) \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/two-ways.js b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/two-ways.js new file mode 100644 index 00000000..8f3b89c8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/node_modules/JSONStream/test/two-ways.js @@ -0,0 +1,41 @@ + +var fs = require ('fs') + , join = require('path').join + , file = join(__dirname, 'fixtures','all_npm.json') + , JSONStream = require('../') + , it = require('it-is').style('colour') + + function randomObj () { + return ( + Math.random () < 0.4 + ? {hello: 'eonuhckmqjk', + whatever: 236515, + lies: true, + nothing: [null], +// stuff: [Math.random(),Math.random(),Math.random()] + } + : ['AOREC', 'reoubaor', {ouec: 62642}, [[[], {}, 53]]] + ) + } + +var expected = [] + , stringify = JSONStream.stringify() + , es = require('event-stream') + , stringified = '' + , called = 0 + , count = 10 + , ended = false + +while (count --) + expected.push(randomObj()) + + es.connect( + es.readArray(expected), + stringify, + JSONStream.parse([/./]), + es.writeArray(function (err, lines) { + + it(lines).has(expected) + console.error('PASSED') + }) + ) diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/server.js b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/server.js new file mode 100644 index 00000000..a2cf398a --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/json-stream/server.js @@ -0,0 +1,10 @@ +var http = require('http'); +var ecstatic = require('ecstatic')(__dirname); +var fs = require('fs'); + +var server = http.createServer(function (req, res) { + ecstatic(req, res); +}); + +console.log('Listening on :8088'); +server.listen(8088); diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/post/index.html b/pitfall/pdfkit/node_modules/http-browserify/example/post/index.html new file mode 100644 index 00000000..7001c209 --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/post/index.html @@ -0,0 +1,9 @@ + + + xhr + + +
    + + + diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/post/main.js b/pitfall/pdfkit/node_modules/http-browserify/example/post/main.js new file mode 100644 index 00000000..dfb67463 --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/post/main.js @@ -0,0 +1,16 @@ +var http = require('../../'); + +var n = 100; +var opts = { path : '/plusone', method : 'post' }; + +var req = http.request(opts, function (res) { + var div = document.getElementById('result'); + div.innerHTML += n.toString() + ' + 1 = '; + + res.on('data', function (buf) { + div.innerHTML += buf; + }); +}); + +req.write(n); +req.end(); diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/post/server.js b/pitfall/pdfkit/node_modules/http-browserify/example/post/server.js new file mode 100644 index 00000000..d16963ff --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/post/server.js @@ -0,0 +1,19 @@ +var http = require('http'); +var ecstatic = require('ecstatic')(__dirname); +var server = http.createServer(function (req, res) { + if (req.method === 'POST' && req.url === '/plusone') { + res.setHeader('content-type', 'text/plain'); + + var s = ''; + req.on('data', function (buf) { s += buf.toString() }); + + req.on('end', function () { + var n = parseInt(s) + 1; + res.end(n.toString()); + }); + } + else ecstatic(req, res); +}); + +console.log('Listening on :8082'); +server.listen(8082); diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/streaming/index.html b/pitfall/pdfkit/node_modules/http-browserify/example/streaming/index.html new file mode 100644 index 00000000..7001c209 --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/streaming/index.html @@ -0,0 +1,9 @@ + + + xhr + + +
    + + + diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/streaming/main.js b/pitfall/pdfkit/node_modules/http-browserify/example/streaming/main.js new file mode 100644 index 00000000..40ee353f --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/streaming/main.js @@ -0,0 +1,16 @@ +var http = require('../../'); + +http.get({ path : '/doom' }, function (res) { + var div = document.getElementById('result'); + if (!div.style) div.style = {}; + div.style.color = 'rgb(80,80,80)'; + + res.on('data', function (buf) { + div.innerHTML += buf; + }); + + res.on('end', function () { + div.style.color = 'black'; + div.innerHTML += '!'; + }); +}); diff --git a/pitfall/pdfkit/node_modules/http-browserify/example/streaming/server.js b/pitfall/pdfkit/node_modules/http-browserify/example/streaming/server.js new file mode 100644 index 00000000..55c9edea --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/example/streaming/server.js @@ -0,0 +1,21 @@ +var http = require('http'); +var ecstatic = require('ecstatic')(__dirname); +var server = http.createServer(function (req, res) { + if (req.url === '/doom') { + res.setHeader('content-type', 'multipart/octet-stream'); + + res.write('d'); + var i = 0; + var iv = setInterval(function () { + res.write('o'); + if (i++ >= 10) { + clearInterval(iv); + res.end('m'); + } + }, 500); + } + else ecstatic(req, res); +}); + +console.log('Listening on :8082'); +server.listen(8082); diff --git a/pitfall/pdfkit/node_modules/http-browserify/index.js b/pitfall/pdfkit/node_modules/http-browserify/index.js new file mode 100644 index 00000000..dd75d4c8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/index.js @@ -0,0 +1,138 @@ +var http = module.exports; +var EventEmitter = require('events').EventEmitter; +var Request = require('./lib/request'); +var url = require('url') + +http.request = function (params, cb) { + if (typeof params === 'string') { + params = url.parse(params) + } + if (!params) params = {}; + if (!params.host && !params.port) { + params.port = parseInt(window.location.port, 10); + } + if (!params.host && params.hostname) { + params.host = params.hostname; + } + + if (!params.scheme) params.scheme = window.location.protocol.split(':')[0]; + if (!params.host) { + params.host = window.location.hostname || window.location.host; + } + if (/:/.test(params.host)) { + if (!params.port) { + params.port = params.host.split(':')[1]; + } + params.host = params.host.split(':')[0]; + } + if (!params.port) params.port = params.scheme == 'https' ? 443 : 80; + + var req = new Request(new xhrHttp, params); + if (cb) req.on('response', cb); + return req; +}; + +http.get = function (params, cb) { + params.method = 'GET'; + var req = http.request(params, cb); + req.end(); + return req; +}; + +http.Agent = function () {}; +http.Agent.defaultMaxSockets = 4; + +var xhrHttp = (function () { + if (typeof window === 'undefined') { + throw new Error('no window object present'); + } + else if (window.XMLHttpRequest) { + return window.XMLHttpRequest; + } + else if (window.ActiveXObject) { + var axs = [ + 'Msxml2.XMLHTTP.6.0', + 'Msxml2.XMLHTTP.3.0', + 'Microsoft.XMLHTTP' + ]; + for (var i = 0; i < axs.length; i++) { + try { + var ax = new(window.ActiveXObject)(axs[i]); + return function () { + if (ax) { + var ax_ = ax; + ax = null; + return ax_; + } + else { + return new(window.ActiveXObject)(axs[i]); + } + }; + } + catch (e) {} + } + throw new Error('ajax not supported in this browser') + } + else { + throw new Error('ajax not supported in this browser'); + } +})(); + +http.STATUS_CODES = { + 100 : 'Continue', + 101 : 'Switching Protocols', + 102 : 'Processing', // RFC 2518, obsoleted by RFC 4918 + 200 : 'OK', + 201 : 'Created', + 202 : 'Accepted', + 203 : 'Non-Authoritative Information', + 204 : 'No Content', + 205 : 'Reset Content', + 206 : 'Partial Content', + 207 : 'Multi-Status', // RFC 4918 + 300 : 'Multiple Choices', + 301 : 'Moved Permanently', + 302 : 'Moved Temporarily', + 303 : 'See Other', + 304 : 'Not Modified', + 305 : 'Use Proxy', + 307 : 'Temporary Redirect', + 400 : 'Bad Request', + 401 : 'Unauthorized', + 402 : 'Payment Required', + 403 : 'Forbidden', + 404 : 'Not Found', + 405 : 'Method Not Allowed', + 406 : 'Not Acceptable', + 407 : 'Proxy Authentication Required', + 408 : 'Request Time-out', + 409 : 'Conflict', + 410 : 'Gone', + 411 : 'Length Required', + 412 : 'Precondition Failed', + 413 : 'Request Entity Too Large', + 414 : 'Request-URI Too Large', + 415 : 'Unsupported Media Type', + 416 : 'Requested Range Not Satisfiable', + 417 : 'Expectation Failed', + 418 : 'I\'m a teapot', // RFC 2324 + 422 : 'Unprocessable Entity', // RFC 4918 + 423 : 'Locked', // RFC 4918 + 424 : 'Failed Dependency', // RFC 4918 + 425 : 'Unordered Collection', // RFC 4918 + 426 : 'Upgrade Required', // RFC 2817 + 428 : 'Precondition Required', // RFC 6585 + 429 : 'Too Many Requests', // RFC 6585 + 431 : 'Request Header Fields Too Large',// RFC 6585 + 500 : 'Internal Server Error', + 501 : 'Not Implemented', + 502 : 'Bad Gateway', + 503 : 'Service Unavailable', + 504 : 'Gateway Time-out', + 505 : 'HTTP Version Not Supported', + 506 : 'Variant Also Negotiates', // RFC 2295 + 507 : 'Insufficient Storage', // RFC 4918 + 509 : 'Bandwidth Limit Exceeded', + 510 : 'Not Extended', // RFC 2774 + 511 : 'Network Authentication Required' // RFC 6585 +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/http-browserify/inject.js b/pitfall/pdfkit/node_modules/http-browserify/inject.js new file mode 100644 index 00000000..aa159a3d --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/inject.js @@ -0,0 +1,5826 @@ +;(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o 0 && this._events[type].length > m) { + this._events[type].warned = true; + console.error('(node) warning: possible EventEmitter memory ' + + 'leak detected. %d listeners added. ' + + 'Use emitter.setMaxListeners() to increase limit.', + this._events[type].length); + console.trace(); + } + } + + return this; +}; + +EventEmitter.prototype.on = EventEmitter.prototype.addListener; + +EventEmitter.prototype.once = function(type, listener) { + if (!isFunction(listener)) + throw TypeError('listener must be a function'); + + var fired = false; + + function g() { + this.removeListener(type, g); + + if (!fired) { + fired = true; + listener.apply(this, arguments); + } + } + + g.listener = listener; + this.on(type, g); + + return this; +}; + +// emits a 'removeListener' event iff the listener was removed +EventEmitter.prototype.removeListener = function(type, listener) { + var list, position, length, i; + + if (!isFunction(listener)) + throw TypeError('listener must be a function'); + + if (!this._events || !this._events[type]) + return this; + + list = this._events[type]; + length = list.length; + position = -1; + + if (list === listener || + (isFunction(list.listener) && list.listener === listener)) { + delete this._events[type]; + if (this._events.removeListener) + this.emit('removeListener', type, listener); + + } else if (isObject(list)) { + for (i = length; i-- > 0;) { + if (list[i] === listener || + (list[i].listener && list[i].listener === listener)) { + position = i; + break; + } + } + + if (position < 0) + return this; + + if (list.length === 1) { + list.length = 0; + delete this._events[type]; + } else { + list.splice(position, 1); + } + + if (this._events.removeListener) + this.emit('removeListener', type, listener); + } + + return this; +}; + +EventEmitter.prototype.removeAllListeners = function(type) { + var key, listeners; + + if (!this._events) + return this; + + // not listening for removeListener, no need to emit + if (!this._events.removeListener) { + if (arguments.length === 0) + this._events = {}; + else if (this._events[type]) + delete this._events[type]; + return this; + } + + // emit removeListener for all listeners on all events + if (arguments.length === 0) { + for (key in this._events) { + if (key === 'removeListener') continue; + this.removeAllListeners(key); + } + this.removeAllListeners('removeListener'); + this._events = {}; + return this; + } + + listeners = this._events[type]; + + if (isFunction(listeners)) { + this.removeListener(type, listeners); + } else { + // LIFO order + while (listeners.length) + this.removeListener(type, listeners[listeners.length - 1]); + } + delete this._events[type]; + + return this; +}; + +EventEmitter.prototype.listeners = function(type) { + var ret; + if (!this._events || !this._events[type]) + ret = []; + else if (isFunction(this._events[type])) + ret = [this._events[type]]; + else + ret = this._events[type].slice(); + return ret; +}; + +EventEmitter.listenerCount = function(emitter, type) { + var ret; + if (!emitter._events || !emitter._events[type]) + ret = 0; + else if (isFunction(emitter._events[type])) + ret = 1; + else + ret = emitter._events[type].length; + return ret; +}; + +function isFunction(arg) { + return typeof arg === 'function'; +} + +function isNumber(arg) { + return typeof arg === 'number'; +} + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} + +function isUndefined(arg) { + return arg === void 0; +} + +},{}],3:[function(require,module,exports){ +var http = module.exports; +var EventEmitter = require('events').EventEmitter; +var Request = require('./lib/request'); + +http.request = function (params, cb) { + if (!params) params = {}; + if (!params.host && !params.port) { + params.port = parseInt(window.location.port, 10); + } + if (!params.host && params.hostname) { + params.host = params.hostname; + } + + if (!params.scheme) params.scheme = window.location.protocol.split(':')[0]; + if (!params.host) { + params.host = window.location.hostname || window.location.host; + } + if (/:/.test(params.host)) { + if (!params.port) { + params.port = params.host.split(':')[1]; + } + params.host = params.host.split(':')[0]; + } + if (!params.port) params.port = params.scheme == 'https' ? 443 : 80; + +alert('before `x = new xhrHttp`'); +alert(xhrHttp); + var x = new xhrHttp; +alert('before new Request(x, params)'); + var req = new Request(x, params); +alert('after new Request'); + if (cb) req.on('response', cb); + return req; +}; + +http.get = function (params, cb) { + params.method = 'GET'; + var req = http.request(params, cb); + req.end(); + return req; +}; + +http.Agent = function () {}; +http.Agent.defaultMaxSockets = 4; + +var xhrHttp = (function () { + if (typeof window === 'undefined') { + throw new Error('no window object present'); + } + else if (window.XMLHttpRequest) { + return window.XMLHttpRequest; + } + else if (window.ActiveXObject) { + var axs = [ + 'Msxml2.XMLHTTP.6.0', + 'Msxml2.XMLHTTP.3.0', + 'Microsoft.XMLHTTP' + ]; + for (var i = 0; i < axs.length; i++) { + try { + var ax = new(window.ActiveXObject)(axs[i]); + return function () { + if (ax) { + var ax_ = ax; + ax = null; + return ax_; + } + else { + return new(window.ActiveXObject)(axs[i]); + } + }; + } + catch (e) {} + } + throw new Error('ajax not supported in this browser') + } + else { + throw new Error('ajax not supported in this browser'); + } +})(); + +},{"./lib/request":4,"events":2}],4:[function(require,module,exports){ +var Stream = require('stream'); +var Response = require('./response'); +var Base64 = require('Base64'); +var inherits = require('inherits'); + +try{ +var Request = module.exports = function (xhr, params) { + var self = this; + self.writable = true; + self.xhr = xhr; + self.body = []; + + self.uri = (params.scheme || 'http') + '://' + + params.host + + (params.port ? ':' + params.port : '') + + (params.path || '/') + ; + + try { xhr.withCredentials = true } + catch (e) { alert('in catch') } + + xhr.open( + params.method || 'GET', + self.uri, + true + ); + + xhr.onreadystatechange = function () { + res.handle(xhr); + }; + + if (params.headers) { + var keys = objectKeys(params.headers); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (!self.isSafeRequestHeader(key)) continue; + var value = params.headers[key]; + if (isArray(value)) { + for (var j = 0; j < value.length; j++) { + xhr.setRequestHeader(key, value[j]); + } + } + else xhr.setRequestHeader(key, value) + } + } + + if (params.auth) { + //basic auth + this.setHeader('Authorization', 'Basic ' + Base64.btoa(params.auth)); + } + + var res = new Response; + res.on('close', function () { + self.emit('close'); + }); + + res.on('ready', function () { + self.emit('response', res); + }); + +}; +} catch(e){alert('in Require ctor catch: ' + e)} + +inherits(Request, Stream); + +Request.prototype.setHeader = function (key, value) { + if (isArray(value)) { + for (var i = 0; i < value.length; i++) { + this.xhr.setRequestHeader(key, value[i]); + } + } + else { + this.xhr.setRequestHeader(key, value); + } +}; + +Request.prototype.write = function (s) { + this.body.push(s); +}; + +Request.prototype.destroy = function (s) { + this.xhr.abort(); + this.emit('close'); +}; + +Request.prototype.end = function (s) { + if (s !== undefined) this.body.push(s); + if (this.body.length === 0) { + this.xhr.send(''); + } + else if (typeof this.body[0] === 'string') { + this.xhr.send(this.body.join('')); + } + else if (isArray(this.body[0])) { + var body = []; + for (var i = 0; i < this.body.length; i++) { + body.push.apply(body, this.body[i]); + } + this.xhr.send(body); + } + else if (/Array/.test(Object.prototype.toString.call(this.body[0]))) { + var len = 0; + for (var i = 0; i < this.body.length; i++) { + len += this.body[i].length; + } + var body = new(this.body[0].constructor)(len); + var k = 0; + + for (var i = 0; i < this.body.length; i++) { + var b = this.body[i]; + for (var j = 0; j < b.length; j++) { + body[k++] = b[j]; + } + } + this.xhr.send(body); + } + else { + var body = ''; + for (var i = 0; i < this.body.length; i++) { + body += this.body[i].toString(); + } + this.xhr.send(body); + } +}; + +// Taken from http://dxr.mozilla.org/mozilla/mozilla-central/content/base/src/nsXMLHttpRequest.cpp.html +Request.unsafeHeaders = [ + "accept-charset", + "accept-encoding", + "access-control-request-headers", + "access-control-request-method", + "connection", + "content-length", + "cookie", + "cookie2", + "content-transfer-encoding", + "date", + "expect", + "host", + "keep-alive", + "origin", + "referer", + "te", + "trailer", + "transfer-encoding", + "upgrade", + "user-agent", + "via" +]; + +Request.prototype.isSafeRequestHeader = function (headerName) { + if (!headerName) return false; + return indexOf(Request.unsafeHeaders, headerName.toLowerCase()) === -1; +}; + +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) keys.push(key); + return keys; +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; + +var indexOf = function (xs, x) { + if (xs.indexOf) return xs.indexOf(x); + for (var i = 0; i < xs.length; i++) { + if (xs[i] === x) return i; + } + return -1; +}; + +},{"./response":5,"Base64":6,"inherits":7,"stream":13}],5:[function(require,module,exports){ +var Stream = require('stream'); +var util = require('util'); + +var Response = module.exports = function (res) { + this.offset = 0; + this.readable = true; +}; + +util.inherits(Response, Stream); + +var capable = { + streaming : true, + status2 : true +}; + +function parseHeaders (res) { + var lines = res.getAllResponseHeaders().split(/\r?\n/); + var headers = {}; + for (var i = 0; i < lines.length; i++) { + var line = lines[i]; + if (line === '') continue; + + var m = line.match(/^([^:]+):\s*(.*)/); + if (m) { + var key = m[1].toLowerCase(), value = m[2]; + + if (headers[key] !== undefined) { + + if (isArray(headers[key])) { + headers[key].push(value); + } + else { + headers[key] = [ headers[key], value ]; + } + } + else { + headers[key] = value; + } + } + else { + headers[line] = true; + } + } + return headers; +} + +Response.prototype.getResponse = function (xhr) { + var respType = String(xhr.responseType).toLowerCase(); + if (respType === 'blob') return xhr.responseBlob || xhr.response; + if (respType === 'arraybuffer') return xhr.response; + return xhr.responseText; +} + +Response.prototype.getHeader = function (key) { + return this.headers[key.toLowerCase()]; +}; + +Response.prototype.handle = function (res) { + if (res.readyState === 2 && capable.status2) { + try { + this.statusCode = res.status; + this.headers = parseHeaders(res); + } + catch (err) { + capable.status2 = false; + } + + if (capable.status2) { + this.emit('ready'); + } + } + else if (capable.streaming && res.readyState === 3) { + try { + if (!this.statusCode) { + this.statusCode = res.status; + this.headers = parseHeaders(res); + this.emit('ready'); + } + } + catch (err) {} + + try { + this._emitData(res); + } + catch (err) { + capable.streaming = false; + } + } + else if (res.readyState === 4) { + if (!this.statusCode) { + this.statusCode = res.status; + this.emit('ready'); + } + this._emitData(res); + + if (res.error) { + this.emit('error', this.getResponse(res)); + } + else this.emit('end'); + + this.emit('close'); + } +}; + +Response.prototype._emitData = function (res) { + var respBody = this.getResponse(res); + if (respBody.toString().match(/ArrayBuffer/)) { + this.emit('data', new Uint8Array(respBody, this.offset)); + this.offset = respBody.byteLength; + return; + } + if (respBody.length > this.offset) { + this.emit('data', respBody.slice(this.offset)); + this.offset = respBody.length; + } +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; + +},{"stream":13,"util":21}],6:[function(require,module,exports){ +;(function () { + + var object = typeof exports != 'undefined' ? exports : this; // #8: web workers + var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; + + function InvalidCharacterError(message) { + this.message = message; + } + InvalidCharacterError.prototype = new Error; + InvalidCharacterError.prototype.name = 'InvalidCharacterError'; + + // encoder + // [https://gist.github.com/999166] by [https://github.com/nignag] + object.btoa || ( + object.btoa = function (input) { + for ( + // initialize result and counter + var block, charCode, idx = 0, map = chars, output = ''; + // if the next input index does not exist: + // change the mapping table to "=" + // check if d has no fractional digits + input.charAt(idx | 0) || (map = '=', idx % 1); + // "8 - idx % 1 * 8" generates the sequence 2, 4, 6, 8 + output += map.charAt(63 & block >> 8 - idx % 1 * 8) + ) { + charCode = input.charCodeAt(idx += 3/4); + if (charCode > 0xFF) { + throw new InvalidCharacterError("'btoa' failed: The string to be encoded contains characters outside of the Latin1 range."); + } + block = block << 8 | charCode; + } + return output; + }); + + // decoder + // [https://gist.github.com/1020396] by [https://github.com/atk] + object.atob || ( + object.atob = function (input) { + input = input.replace(/=+$/, '') + if (input.length % 4 == 1) { + throw new InvalidCharacterError("'atob' failed: The string to be decoded is not correctly encoded."); + } + for ( + // initialize result and counters + var bc = 0, bs, buffer, idx = 0, output = ''; + // get next character + buffer = input.charAt(idx++); + // character found in table? initialize bit storage and add its ascii value; + ~buffer && (bs = bc % 4 ? bs * 64 + buffer : buffer, + // and if not first of each 4 characters, + // convert the first 8 bits to one ascii character + bc++ % 4) ? output += String.fromCharCode(255 & bs >> (-2 * bc & 6)) : 0 + ) { + // try to find character in table (0-63, not found => -1) + buffer = chars.indexOf(buffer); + } + return output; + }); + +}()); + +},{}],7:[function(require,module,exports){ +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor + } +} + +},{}],8:[function(require,module,exports){ +// shim for using process in browser + +var process = module.exports = {}; + +process.nextTick = (function () { + var canSetImmediate = typeof window !== 'undefined' + && window.setImmediate; + var canPost = typeof window !== 'undefined' + && window.postMessage && window.addEventListener + ; + + if (canSetImmediate) { + return function (f) { return window.setImmediate(f) }; + } + + if (canPost) { + var queue = []; + window.addEventListener('message', function (ev) { + if (ev.source === window && ev.data === 'process-tick') { + ev.stopPropagation(); + if (queue.length > 0) { + var fn = queue.shift(); + fn(); + } + } + }, true); + + return function nextTick(fn) { + queue.push(fn); + window.postMessage('process-tick', '*'); + }; + } + + return function nextTick(fn) { + setTimeout(fn, 0); + }; +})(); + +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +} + +// TODO(shtylman) +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; + +},{}],9:[function(require,module,exports){ +var base64 = require('base64-js') +var TA = require('typedarray') + +exports.Buffer = Buffer +exports.SlowBuffer = Buffer +exports.INSPECT_MAX_BYTES = 50 +Buffer.poolSize = 8192 + +/** + * Use a shim for browsers that lack Typed Array support (< IE 9, < FF 3.6, + * < Chrome 6, < Safari 5, < Opera 11.5, < iOS 4.1). + */ +var xDataView = typeof DataView === 'undefined' + ? TA.DataView : DataView +var xArrayBuffer = typeof ArrayBuffer === 'undefined' + ? TA.ArrayBuffer : ArrayBuffer +var xUint8Array = typeof Uint8Array === 'undefined' + ? TA.Uint8Array : Uint8Array + +/** + * Check to see if the browser supports augmenting a `Uint8Array` instance. + */ +var browserSupport = (function () { + try { + var arr = new xUint8Array(0) + arr.foo = function () { return 42 } + return 42 === arr.foo() + } catch (e) { + return false + } +})() + +/** + * Also use the shim in Firefox 4-17 (even though they have native Uint8Array), + * since they don't support Proxy. Without that, it is not possible to augment + * native Uint8Array instances in Firefox. + */ +if (xUint8Array !== TA.Uint8Array && !browserSupport) { + xDataView = TA.DataView + xArrayBuffer = TA.ArrayBuffer + xUint8Array = TA.Uint8Array + browserSupport = true +} + +/** + * Class: Buffer + * ============= + * + * The Buffer constructor returns instances of `Uint8Array` that are augmented + * with function properties for all the node `Buffer` API functions. We use + * `Uint8Array` so that square bracket notation works as expected -- it returns + * a single octet. + * + * By augmenting the instances, we can avoid modifying the `Uint8Array` + * prototype. + * + * Firefox is a special case because it doesn't allow augmenting "native" object + * instances. See `ProxyBuffer` below for more details. + */ +function Buffer (subject, encoding) { + var type = typeof subject + + // Work-around: node's base64 implementation + // allows for non-padded strings while base64-js + // does not.. + if (encoding === 'base64' && type === 'string') { + subject = stringtrim(subject) + while (subject.length % 4 !== 0) { + subject = subject + '=' + } + } + + // Find the length + var length + if (type === 'number') + length = coerce(subject) + else if (type === 'string') + length = Buffer.byteLength(subject, encoding) + else if (type === 'object') + length = coerce(subject.length) // Assume object is an array + else + throw new Error('First argument needs to be a number, array or string.') + + var buf = augment(new xUint8Array(length)) + if (Buffer.isBuffer(subject)) { + // Speed optimization -- use set if we're copying from a Uint8Array + buf.set(subject) + } else if (isArrayIsh(subject)) { + // Treat array-ish objects as a byte array. + for (var i = 0; i < length; i++) { + if (Buffer.isBuffer(subject)) + buf[i] = subject.readUInt8(i) + else + buf[i] = subject[i] + } + } else if (type === 'string') { + buf.write(subject, 0, encoding) + } + + return buf +} + +// STATIC METHODS +// ============== + +Buffer.isEncoding = function(encoding) { + switch ((encoding + '').toLowerCase()) { + case 'hex': + case 'utf8': + case 'utf-8': + case 'ascii': + case 'binary': + case 'base64': + case 'ucs2': + case 'ucs-2': + case 'utf16le': + case 'utf-16le': + case 'raw': + return true + + default: + return false + } +} + +Buffer.isBuffer = function (b) { + return b && b._isBuffer +} + +Buffer.byteLength = function (str, encoding) { + switch (encoding || 'utf8') { + case 'hex': + return str.length / 2 + + case 'utf8': + case 'utf-8': + return utf8ToBytes(str).length + + case 'ascii': + case 'binary': + return str.length + + case 'base64': + return base64ToBytes(str).length + + default: + throw new Error('Unknown encoding') + } +} + +Buffer.concat = function (list, totalLength) { + if (!isArray(list)) { + throw new Error('Usage: Buffer.concat(list, [totalLength])\n' + + 'list should be an Array.') + } + + var i + var buf + + if (list.length === 0) { + return new Buffer(0) + } else if (list.length === 1) { + return list[0] + } + + if (typeof totalLength !== 'number') { + totalLength = 0 + for (i = 0; i < list.length; i++) { + buf = list[i] + totalLength += buf.length + } + } + + var buffer = new Buffer(totalLength) + var pos = 0 + for (i = 0; i < list.length; i++) { + buf = list[i] + buf.copy(buffer, pos) + pos += buf.length + } + return buffer +} + +// BUFFER INSTANCE METHODS +// ======================= + +function _hexWrite (buf, string, offset, length) { + offset = Number(offset) || 0 + var remaining = buf.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + + // must be an even number of digits + var strLen = string.length + if (strLen % 2 !== 0) { + throw new Error('Invalid hex string') + } + if (length > strLen / 2) { + length = strLen / 2 + } + for (var i = 0; i < length; i++) { + var byte = parseInt(string.substr(i * 2, 2), 16) + if (isNaN(byte)) throw new Error('Invalid hex string') + buf[offset + i] = byte + } + Buffer._charsWritten = i * 2 + return i +} + +function _utf8Write (buf, string, offset, length) { + var bytes, pos + return Buffer._charsWritten = blitBuffer(utf8ToBytes(string), buf, offset, length) +} + +function _asciiWrite (buf, string, offset, length) { + var bytes, pos + return Buffer._charsWritten = blitBuffer(asciiToBytes(string), buf, offset, length) +} + +function _binaryWrite (buf, string, offset, length) { + return _asciiWrite(buf, string, offset, length) +} + +function _base64Write (buf, string, offset, length) { + var bytes, pos + return Buffer._charsWritten = blitBuffer(base64ToBytes(string), buf, offset, length) +} + +function BufferWrite (string, offset, length, encoding) { + // Support both (string, offset, length, encoding) + // and the legacy (string, encoding, offset, length) + if (isFinite(offset)) { + if (!isFinite(length)) { + encoding = length + length = undefined + } + } else { // legacy + var swap = encoding + encoding = offset + offset = length + length = swap + } + + offset = Number(offset) || 0 + var remaining = this.length - offset + if (!length) { + length = remaining + } else { + length = Number(length) + if (length > remaining) { + length = remaining + } + } + encoding = String(encoding || 'utf8').toLowerCase() + + switch (encoding) { + case 'hex': + return _hexWrite(this, string, offset, length) + + case 'utf8': + case 'utf-8': + return _utf8Write(this, string, offset, length) + + case 'ascii': + return _asciiWrite(this, string, offset, length) + + case 'binary': + return _binaryWrite(this, string, offset, length) + + case 'base64': + return _base64Write(this, string, offset, length) + + default: + throw new Error('Unknown encoding') + } +} + +function BufferToString (encoding, start, end) { + var self = (this instanceof ProxyBuffer) + ? this._proxy + : this + + encoding = String(encoding || 'utf8').toLowerCase() + start = Number(start) || 0 + end = (end !== undefined) + ? Number(end) + : end = self.length + + // Fastpath empty strings + if (end === start) + return '' + + switch (encoding) { + case 'hex': + return _hexSlice(self, start, end) + + case 'utf8': + case 'utf-8': + return _utf8Slice(self, start, end) + + case 'ascii': + return _asciiSlice(self, start, end) + + case 'binary': + return _binarySlice(self, start, end) + + case 'base64': + return _base64Slice(self, start, end) + + default: + throw new Error('Unknown encoding') + } +} + +function BufferToJSON () { + return { + type: 'Buffer', + data: Array.prototype.slice.call(this._arr || this, 0) + } +} + +// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) +function BufferCopy (target, target_start, start, end) { + var source = this + + if (!start) start = 0 + if (!end && end !== 0) end = this.length + if (!target_start) target_start = 0 + + // Copy 0 bytes; we're done + if (end === start) return + if (target.length === 0 || source.length === 0) return + + // Fatal error conditions + if (end < start) + throw new Error('sourceEnd < sourceStart') + if (target_start < 0 || target_start >= target.length) + throw new Error('targetStart out of bounds') + if (start < 0 || start >= source.length) + throw new Error('sourceStart out of bounds') + if (end < 0 || end > source.length) + throw new Error('sourceEnd out of bounds') + + // Are we oob? + if (end > this.length) + end = this.length + if (target.length - target_start < end - start) + end = target.length - target_start + start + + // copy! + for (var i = 0; i < end - start; i++) + target[i + target_start] = this[i + start] +} + +function _base64Slice (buf, start, end) { + var bytes = buf.slice(start, end) + return base64.fromByteArray(bytes) +} + +function _utf8Slice (buf, start, end) { + var res = '' + var tmp = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; i++) { + if (buf[i] <= 0x7F) { + res += decodeUtf8Char(tmp) + String.fromCharCode(buf[i]) + tmp = '' + } else { + tmp += '%' + buf[i].toString(16) + } + } + + return res + decodeUtf8Char(tmp) +} + +function _asciiSlice (buf, start, end) { + var ret = '' + end = Math.min(buf.length, end) + + for (var i = start; i < end; i++) + ret += String.fromCharCode(buf[i]) + return ret +} + +function _binarySlice (buf, start, end) { + return _asciiSlice(buf, start, end) +} + +function _hexSlice (buf, start, end) { + var len = buf.length + + if (!start || start < 0) start = 0 + if (!end || end < 0 || end > len) end = len + + var out = '' + for (var i = start; i < end; i++) { + out += toHex(buf[i]) + } + return out +} + +// TODO: add test that modifying the new buffer slice will modify memory in the +// original buffer! Use code from: +// http://nodejs.org/api/buffer.html#buffer_buf_slice_start_end +function BufferSlice (start, end) { + var len = this.length + start = clamp(start, len, 0) + end = clamp(end, len, len) + return augment(this.subarray(start, end)) // Uint8Array built-in method +} + +function BufferReadUInt8 (offset, noAssert) { + var buf = this + if (!noAssert) { + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset < buf.length, 'Trying to read beyond buffer length') + } + + if (offset >= buf.length) + return + + return buf[offset] +} + +function _readUInt16 (buf, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(typeof (littleEndian) === 'boolean', + 'missing or invalid endian') + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset + 1 < buf.length, 'Trying to read beyond buffer length') + } + + var len = buf.length + if (offset >= len) { + return + } else if (offset + 1 === len) { + var dv = new xDataView(new xArrayBuffer(2)) + dv.setUint8(0, buf[len - 1]) + return dv.getUint16(0, littleEndian) + } else { + return buf._dataview.getUint16(offset, littleEndian) + } +} + +function BufferReadUInt16LE (offset, noAssert) { + return _readUInt16(this, offset, true, noAssert) +} + +function BufferReadUInt16BE (offset, noAssert) { + return _readUInt16(this, offset, false, noAssert) +} + +function _readUInt32 (buf, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(typeof (littleEndian) === 'boolean', + 'missing or invalid endian') + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset + 3 < buf.length, 'Trying to read beyond buffer length') + } + + var len = buf.length + if (offset >= len) { + return + } else if (offset + 3 >= len) { + var dv = new xDataView(new xArrayBuffer(4)) + for (var i = 0; i + offset < len; i++) { + dv.setUint8(i, buf[i + offset]) + } + return dv.getUint32(0, littleEndian) + } else { + return buf._dataview.getUint32(offset, littleEndian) + } +} + +function BufferReadUInt32LE (offset, noAssert) { + return _readUInt32(this, offset, true, noAssert) +} + +function BufferReadUInt32BE (offset, noAssert) { + return _readUInt32(this, offset, false, noAssert) +} + +function BufferReadInt8 (offset, noAssert) { + var buf = this + if (!noAssert) { + assert(offset !== undefined && offset !== null, + 'missing offset') + assert(offset < buf.length, 'Trying to read beyond buffer length') + } + + if (offset >= buf.length) + return + + return buf._dataview.getInt8(offset) +} + +function _readInt16 (buf, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(typeof (littleEndian) === 'boolean', + 'missing or invalid endian') + assert(offset !== undefined && offset !== null, + 'missing offset') + assert(offset + 1 < buf.length, 'Trying to read beyond buffer length') + } + + var len = buf.length + if (offset >= len) { + return + } else if (offset + 1 === len) { + var dv = new xDataView(new xArrayBuffer(2)) + dv.setUint8(0, buf[len - 1]) + return dv.getInt16(0, littleEndian) + } else { + return buf._dataview.getInt16(offset, littleEndian) + } +} + +function BufferReadInt16LE (offset, noAssert) { + return _readInt16(this, offset, true, noAssert) +} + +function BufferReadInt16BE (offset, noAssert) { + return _readInt16(this, offset, false, noAssert) +} + +function _readInt32 (buf, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(typeof (littleEndian) === 'boolean', + 'missing or invalid endian') + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset + 3 < buf.length, 'Trying to read beyond buffer length') + } + + var len = buf.length + if (offset >= len) { + return + } else if (offset + 3 >= len) { + var dv = new xDataView(new xArrayBuffer(4)) + for (var i = 0; i + offset < len; i++) { + dv.setUint8(i, buf[i + offset]) + } + return dv.getInt32(0, littleEndian) + } else { + return buf._dataview.getInt32(offset, littleEndian) + } +} + +function BufferReadInt32LE (offset, noAssert) { + return _readInt32(this, offset, true, noAssert) +} + +function BufferReadInt32BE (offset, noAssert) { + return _readInt32(this, offset, false, noAssert) +} + +function _readFloat (buf, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(typeof (littleEndian) === 'boolean', + 'missing or invalid endian') + assert(offset + 3 < buf.length, 'Trying to read beyond buffer length') + } + + return buf._dataview.getFloat32(offset, littleEndian) +} + +function BufferReadFloatLE (offset, noAssert) { + return _readFloat(this, offset, true, noAssert) +} + +function BufferReadFloatBE (offset, noAssert) { + return _readFloat(this, offset, false, noAssert) +} + +function _readDouble (buf, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(typeof (littleEndian) === 'boolean', + 'missing or invalid endian') + assert(offset + 7 < buf.length, 'Trying to read beyond buffer length') + } + + return buf._dataview.getFloat64(offset, littleEndian) +} + +function BufferReadDoubleLE (offset, noAssert) { + return _readDouble(this, offset, true, noAssert) +} + +function BufferReadDoubleBE (offset, noAssert) { + return _readDouble(this, offset, false, noAssert) +} + +function BufferWriteUInt8 (value, offset, noAssert) { + var buf = this + if (!noAssert) { + assert(value !== undefined && value !== null, 'missing value') + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset < buf.length, 'trying to write beyond buffer length') + verifuint(value, 0xff) + } + + if (offset >= buf.length) return + + buf[offset] = value +} + +function _writeUInt16 (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(value !== undefined && value !== null, 'missing value') + assert(typeof (littleEndian) === 'boolean', + 'missing or invalid endian') + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset + 1 < buf.length, 'trying to write beyond buffer length') + verifuint(value, 0xffff) + } + + var len = buf.length + if (offset >= len) { + return + } else if (offset + 1 === len) { + var dv = new xDataView(new xArrayBuffer(2)) + dv.setUint16(0, value, littleEndian) + buf[offset] = dv.getUint8(0) + } else { + buf._dataview.setUint16(offset, value, littleEndian) + } +} + +function BufferWriteUInt16LE (value, offset, noAssert) { + _writeUInt16(this, value, offset, true, noAssert) +} + +function BufferWriteUInt16BE (value, offset, noAssert) { + _writeUInt16(this, value, offset, false, noAssert) +} + +function _writeUInt32 (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(value !== undefined && value !== null, 'missing value') + assert(typeof (littleEndian) === 'boolean', + 'missing or invalid endian') + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset + 3 < buf.length, 'trying to write beyond buffer length') + verifuint(value, 0xffffffff) + } + + var len = buf.length + if (offset >= len) { + return + } else if (offset + 3 >= len) { + var dv = new xDataView(new xArrayBuffer(4)) + dv.setUint32(0, value, littleEndian) + for (var i = 0; i + offset < len; i++) { + buf[i + offset] = dv.getUint8(i) + } + } else { + buf._dataview.setUint32(offset, value, littleEndian) + } +} + +function BufferWriteUInt32LE (value, offset, noAssert) { + _writeUInt32(this, value, offset, true, noAssert) +} + +function BufferWriteUInt32BE (value, offset, noAssert) { + _writeUInt32(this, value, offset, false, noAssert) +} + +function BufferWriteInt8 (value, offset, noAssert) { + var buf = this + if (!noAssert) { + assert(value !== undefined && value !== null, 'missing value') + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset < buf.length, 'Trying to write beyond buffer length') + verifsint(value, 0x7f, -0x80) + } + + if (offset >= buf.length) return + + buf._dataview.setInt8(offset, value) +} + +function _writeInt16 (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(value !== undefined && value !== null, 'missing value') + assert(typeof (littleEndian) === 'boolean', + 'missing or invalid endian') + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset + 1 < buf.length, 'Trying to write beyond buffer length') + verifsint(value, 0x7fff, -0x8000) + } + + var len = buf.length + if (offset >= len) { + return + } else if (offset + 1 === len) { + var dv = new xDataView(new xArrayBuffer(2)) + dv.setInt16(0, value, littleEndian) + buf[offset] = dv.getUint8(0) + } else { + buf._dataview.setInt16(offset, value, littleEndian) + } +} + +function BufferWriteInt16LE (value, offset, noAssert) { + _writeInt16(this, value, offset, true, noAssert) +} + +function BufferWriteInt16BE (value, offset, noAssert) { + _writeInt16(this, value, offset, false, noAssert) +} + +function _writeInt32 (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(value !== undefined && value !== null, 'missing value') + assert(typeof (littleEndian) === 'boolean', + 'missing or invalid endian') + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset + 3 < buf.length, 'Trying to write beyond buffer length') + verifsint(value, 0x7fffffff, -0x80000000) + } + + var len = buf.length + if (offset >= len) { + return + } else if (offset + 3 >= len) { + var dv = new xDataView(new xArrayBuffer(4)) + dv.setInt32(0, value, littleEndian) + for (var i = 0; i + offset < len; i++) { + buf[i + offset] = dv.getUint8(i) + } + } else { + buf._dataview.setInt32(offset, value, littleEndian) + } +} + +function BufferWriteInt32LE (value, offset, noAssert) { + _writeInt32(this, value, offset, true, noAssert) +} + +function BufferWriteInt32BE (value, offset, noAssert) { + _writeInt32(this, value, offset, false, noAssert) +} + +function _writeFloat (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(value !== undefined && value !== null, 'missing value') + assert(typeof (littleEndian) === 'boolean', + 'missing or invalid endian') + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset + 3 < buf.length, 'Trying to write beyond buffer length') + verifIEEE754(value, 3.4028234663852886e+38, -3.4028234663852886e+38) + } + + var len = buf.length + if (offset >= len) { + return + } else if (offset + 3 >= len) { + var dv = new xDataView(new xArrayBuffer(4)) + dv.setFloat32(0, value, littleEndian) + for (var i = 0; i + offset < len; i++) { + buf[i + offset] = dv.getUint8(i) + } + } else { + buf._dataview.setFloat32(offset, value, littleEndian) + } +} + +function BufferWriteFloatLE (value, offset, noAssert) { + _writeFloat(this, value, offset, true, noAssert) +} + +function BufferWriteFloatBE (value, offset, noAssert) { + _writeFloat(this, value, offset, false, noAssert) +} + +function _writeDouble (buf, value, offset, littleEndian, noAssert) { + if (!noAssert) { + assert(value !== undefined && value !== null, 'missing value') + assert(typeof (littleEndian) === 'boolean', + 'missing or invalid endian') + assert(offset !== undefined && offset !== null, 'missing offset') + assert(offset + 7 < buf.length, + 'Trying to write beyond buffer length') + verifIEEE754(value, 1.7976931348623157E+308, -1.7976931348623157E+308) + } + + var len = buf.length + if (offset >= len) { + return + } else if (offset + 7 >= len) { + var dv = new xDataView(new xArrayBuffer(8)) + dv.setFloat64(0, value, littleEndian) + for (var i = 0; i + offset < len; i++) { + buf[i + offset] = dv.getUint8(i) + } + } else { + buf._dataview.setFloat64(offset, value, littleEndian) + } +} + +function BufferWriteDoubleLE (value, offset, noAssert) { + _writeDouble(this, value, offset, true, noAssert) +} + +function BufferWriteDoubleBE (value, offset, noAssert) { + _writeDouble(this, value, offset, false, noAssert) +} + +// fill(value, start=0, end=buffer.length) +function BufferFill (value, start, end) { + if (!value) value = 0 + if (!start) start = 0 + if (!end) end = this.length + + if (typeof value === 'string') { + value = value.charCodeAt(0) + } + + if (typeof value !== 'number' || isNaN(value)) { + throw new Error('value is not a number') + } + + if (end < start) throw new Error('end < start') + + // Fill 0 bytes; we're done + if (end === start) return + if (this.length === 0) return + + if (start < 0 || start >= this.length) { + throw new Error('start out of bounds') + } + + if (end < 0 || end > this.length) { + throw new Error('end out of bounds') + } + + for (var i = start; i < end; i++) { + this[i] = value + } +} + +function BufferInspect () { + var out = [] + var len = this.length + for (var i = 0; i < len; i++) { + out[i] = toHex(this[i]) + if (i === exports.INSPECT_MAX_BYTES) { + out[i + 1] = '...' + break + } + } + return '' +} + +// Creates a new `ArrayBuffer` with the *copied* memory of the buffer instance. +// Added in Node 0.12. +function BufferToArrayBuffer () { + return (new Buffer(this)).buffer +} + + +// HELPER FUNCTIONS +// ================ + +function stringtrim (str) { + if (str.trim) return str.trim() + return str.replace(/^\s+|\s+$/g, '') +} + +/** + * Class: ProxyBuffer + * ================== + * + * Only used in Firefox, since Firefox does not allow augmenting "native" + * objects (like Uint8Array instances) with new properties for some unknown + * (probably silly) reason. So we'll use an ES6 Proxy (supported since + * Firefox 18) to wrap the Uint8Array instance without actually adding any + * properties to it. + * + * Instances of this "fake" Buffer class are the "target" of the + * ES6 Proxy (see `augment` function). + * + * We couldn't just use the `Uint8Array` as the target of the `Proxy` because + * Proxies have an important limitation on trapping the `toString` method. + * `Object.prototype.toString.call(proxy)` gets called whenever something is + * implicitly cast to a String. Unfortunately, with a `Proxy` this + * unconditionally returns `Object.prototype.toString.call(target)` which would + * always return "[object Uint8Array]" if we used the `Uint8Array` instance as + * the target. And, remember, in Firefox we cannot redefine the `Uint8Array` + * instance's `toString` method. + * + * So, we use this `ProxyBuffer` class as the proxy's "target". Since this class + * has its own custom `toString` method, it will get called whenever `toString` + * gets called, implicitly or explicitly, on the `Proxy` instance. + * + * We also have to define the Uint8Array methods `subarray` and `set` on + * `ProxyBuffer` because if we didn't then `proxy.subarray(0)` would have its + * `this` set to `proxy` (a `Proxy` instance) which throws an exception in + * Firefox which expects it to be a `TypedArray` instance. + */ +function ProxyBuffer (arr) { + this._arr = arr + + if (arr.byteLength !== 0) + this._dataview = new xDataView(arr.buffer, arr.byteOffset, arr.byteLength) +} + +ProxyBuffer.prototype = { + _isBuffer: true, + write: BufferWrite, + toString: BufferToString, + toLocaleString: BufferToString, + toJSON: BufferToJSON, + copy: BufferCopy, + slice: BufferSlice, + readUInt8: BufferReadUInt8, + readUInt16LE: BufferReadUInt16LE, + readUInt16BE: BufferReadUInt16BE, + readUInt32LE: BufferReadUInt32LE, + readUInt32BE: BufferReadUInt32BE, + readInt8: BufferReadInt8, + readInt16LE: BufferReadInt16LE, + readInt16BE: BufferReadInt16BE, + readInt32LE: BufferReadInt32LE, + readInt32BE: BufferReadInt32BE, + readFloatLE: BufferReadFloatLE, + readFloatBE: BufferReadFloatBE, + readDoubleLE: BufferReadDoubleLE, + readDoubleBE: BufferReadDoubleBE, + writeUInt8: BufferWriteUInt8, + writeUInt16LE: BufferWriteUInt16LE, + writeUInt16BE: BufferWriteUInt16BE, + writeUInt32LE: BufferWriteUInt32LE, + writeUInt32BE: BufferWriteUInt32BE, + writeInt8: BufferWriteInt8, + writeInt16LE: BufferWriteInt16LE, + writeInt16BE: BufferWriteInt16BE, + writeInt32LE: BufferWriteInt32LE, + writeInt32BE: BufferWriteInt32BE, + writeFloatLE: BufferWriteFloatLE, + writeFloatBE: BufferWriteFloatBE, + writeDoubleLE: BufferWriteDoubleLE, + writeDoubleBE: BufferWriteDoubleBE, + fill: BufferFill, + inspect: BufferInspect, + toArrayBuffer: BufferToArrayBuffer, + subarray: function () { + return this._arr.subarray.apply(this._arr, arguments) + }, + set: function () { + return this._arr.set.apply(this._arr, arguments) + } +} + +var ProxyHandler = { + get: function (target, name) { + if (name in target) return target[name] + else return target._arr[name] + }, + set: function (target, name, value) { + target._arr[name] = value + } +} + +function augment (arr) { + if (browserSupport) { + arr._isBuffer = true + + // Augment the Uint8Array *instance* (not the class!) with Buffer methods + arr.write = BufferWrite + arr.toString = BufferToString + arr.toLocaleString = BufferToString + arr.toJSON = BufferToJSON + arr.copy = BufferCopy + arr.slice = BufferSlice + arr.readUInt8 = BufferReadUInt8 + arr.readUInt16LE = BufferReadUInt16LE + arr.readUInt16BE = BufferReadUInt16BE + arr.readUInt32LE = BufferReadUInt32LE + arr.readUInt32BE = BufferReadUInt32BE + arr.readInt8 = BufferReadInt8 + arr.readInt16LE = BufferReadInt16LE + arr.readInt16BE = BufferReadInt16BE + arr.readInt32LE = BufferReadInt32LE + arr.readInt32BE = BufferReadInt32BE + arr.readFloatLE = BufferReadFloatLE + arr.readFloatBE = BufferReadFloatBE + arr.readDoubleLE = BufferReadDoubleLE + arr.readDoubleBE = BufferReadDoubleBE + arr.writeUInt8 = BufferWriteUInt8 + arr.writeUInt16LE = BufferWriteUInt16LE + arr.writeUInt16BE = BufferWriteUInt16BE + arr.writeUInt32LE = BufferWriteUInt32LE + arr.writeUInt32BE = BufferWriteUInt32BE + arr.writeInt8 = BufferWriteInt8 + arr.writeInt16LE = BufferWriteInt16LE + arr.writeInt16BE = BufferWriteInt16BE + arr.writeInt32LE = BufferWriteInt32LE + arr.writeInt32BE = BufferWriteInt32BE + arr.writeFloatLE = BufferWriteFloatLE + arr.writeFloatBE = BufferWriteFloatBE + arr.writeDoubleLE = BufferWriteDoubleLE + arr.writeDoubleBE = BufferWriteDoubleBE + arr.fill = BufferFill + arr.inspect = BufferInspect + + // Only add `toArrayBuffer` if the browser supports ArrayBuffer natively + if (xUint8Array !== TA.Uint8Array) + arr.toArrayBuffer = BufferToArrayBuffer + + if (arr.byteLength !== 0) + arr._dataview = new xDataView(arr.buffer, arr.byteOffset, arr.byteLength) + + return arr + + } else { + // This is a browser that doesn't support augmenting the `Uint8Array` + // instance (*ahem* Firefox) so use an ES6 `Proxy`. + var proxyBuffer = new ProxyBuffer(arr) + var proxy = new Proxy(proxyBuffer, ProxyHandler) + proxyBuffer._proxy = proxy + return proxy + } +} + +// slice(start, end) +function clamp (index, len, defaultValue) { + if (typeof index !== 'number') return defaultValue + index = ~~index; // Coerce to integer. + if (index >= len) return len + if (index >= 0) return index + index += len + if (index >= 0) return index + return 0 +} + +function coerce (length) { + // Coerce length to a number (possibly NaN), round up + // in case it's fractional (e.g. 123.456) then do a + // double negate to coerce a NaN to 0. Easy, right? + length = ~~Math.ceil(+length) + return length < 0 ? 0 : length +} + +function isArray (subject) { + return (Array.isArray || function (subject) { + return Object.prototype.toString.call(subject) === '[object Array]' + })(subject) +} + +function isArrayIsh (subject) { + return isArray(subject) || Buffer.isBuffer(subject) || + subject && typeof subject === 'object' && + typeof subject.length === 'number' +} + +function toHex (n) { + if (n < 16) return '0' + n.toString(16) + return n.toString(16) +} + +function utf8ToBytes (str) { + var byteArray = [] + for (var i = 0; i < str.length; i++) + if (str.charCodeAt(i) <= 0x7F) + byteArray.push(str.charCodeAt(i)) + else { + var h = encodeURIComponent(str.charAt(i)).substr(1).split('%') + for (var j = 0; j < h.length; j++) + byteArray.push(parseInt(h[j], 16)) + } + + return byteArray +} + +function asciiToBytes (str) { + var byteArray = [] + for (var i = 0; i < str.length; i++) { + // Node's code seems to be doing this and not & 0x7F.. + byteArray.push(str.charCodeAt(i) & 0xFF) + } + + return byteArray +} + +function base64ToBytes (str) { + return base64.toByteArray(str) +} + +function blitBuffer (src, dst, offset, length) { + var pos, i = 0 + while (i < length) { + if ((i + offset >= dst.length) || (i >= src.length)) + break + + dst[i + offset] = src[i] + i++ + } + return i +} + +function decodeUtf8Char (str) { + try { + return decodeURIComponent(str) + } catch (err) { + return String.fromCharCode(0xFFFD) // UTF 8 invalid char + } +} + +/* + * We have to make sure that the value is a valid integer. This means that it + * is non-negative. It has no fractional component and that it does not + * exceed the maximum allowed value. + * + * value The number to check for validity + * + * max The maximum value + */ +function verifuint (value, max) { + assert(typeof (value) == 'number', 'cannot write a non-number as a number') + assert(value >= 0, + 'specified a negative value for writing an unsigned value') + assert(value <= max, 'value is larger than maximum value for type') + assert(Math.floor(value) === value, 'value has a fractional component') +} + +/* + * A series of checks to make sure we actually have a signed 32-bit number + */ +function verifsint(value, max, min) { + assert(typeof (value) == 'number', 'cannot write a non-number as a number') + assert(value <= max, 'value larger than maximum allowed value') + assert(value >= min, 'value smaller than minimum allowed value') + assert(Math.floor(value) === value, 'value has a fractional component') +} + +function verifIEEE754(value, max, min) { + assert(typeof (value) == 'number', 'cannot write a non-number as a number') + assert(value <= max, 'value larger than maximum allowed value') + assert(value >= min, 'value smaller than minimum allowed value') +} + +function assert (test, message) { + if (!test) throw new Error(message || 'Failed assertion') +} + +},{"base64-js":10,"typedarray":11}],10:[function(require,module,exports){ +(function (exports) { + 'use strict'; + + var lookup = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; + + function b64ToByteArray(b64) { + var i, j, l, tmp, placeHolders, arr; + + if (b64.length % 4 > 0) { + throw 'Invalid string. Length must be a multiple of 4'; + } + + // the number of equal signs (place holders) + // if there are two placeholders, than the two characters before it + // represent one byte + // if there is only one, then the three characters before it represent 2 bytes + // this is just a cheap hack to not do indexOf twice + placeHolders = b64.indexOf('='); + placeHolders = placeHolders > 0 ? b64.length - placeHolders : 0; + + // base64 is 4/3 + up to two characters of the original data + arr = [];//new Uint8Array(b64.length * 3 / 4 - placeHolders); + + // if there are placeholders, only get up to the last complete 4 chars + l = placeHolders > 0 ? b64.length - 4 : b64.length; + + for (i = 0, j = 0; i < l; i += 4, j += 3) { + tmp = (lookup.indexOf(b64[i]) << 18) | (lookup.indexOf(b64[i + 1]) << 12) | (lookup.indexOf(b64[i + 2]) << 6) | lookup.indexOf(b64[i + 3]); + arr.push((tmp & 0xFF0000) >> 16); + arr.push((tmp & 0xFF00) >> 8); + arr.push(tmp & 0xFF); + } + + if (placeHolders === 2) { + tmp = (lookup.indexOf(b64[i]) << 2) | (lookup.indexOf(b64[i + 1]) >> 4); + arr.push(tmp & 0xFF); + } else if (placeHolders === 1) { + tmp = (lookup.indexOf(b64[i]) << 10) | (lookup.indexOf(b64[i + 1]) << 4) | (lookup.indexOf(b64[i + 2]) >> 2); + arr.push((tmp >> 8) & 0xFF); + arr.push(tmp & 0xFF); + } + + return arr; + } + + function uint8ToBase64(uint8) { + var i, + extraBytes = uint8.length % 3, // if we have 1 byte left, pad 2 bytes + output = "", + temp, length; + + function tripletToBase64 (num) { + return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F]; + }; + + // go through the array every three bytes, we'll deal with trailing stuff later + for (i = 0, length = uint8.length - extraBytes; i < length; i += 3) { + temp = (uint8[i] << 16) + (uint8[i + 1] << 8) + (uint8[i + 2]); + output += tripletToBase64(temp); + } + + // pad the end with zeros, but make sure to not forget the extra bytes + switch (extraBytes) { + case 1: + temp = uint8[uint8.length - 1]; + output += lookup[temp >> 2]; + output += lookup[(temp << 4) & 0x3F]; + output += '=='; + break; + case 2: + temp = (uint8[uint8.length - 2] << 8) + (uint8[uint8.length - 1]); + output += lookup[temp >> 10]; + output += lookup[(temp >> 4) & 0x3F]; + output += lookup[(temp << 2) & 0x3F]; + output += '='; + break; + } + + return output; + } + + module.exports.toByteArray = b64ToByteArray; + module.exports.fromByteArray = uint8ToBase64; +}()); + +},{}],11:[function(require,module,exports){ +var undefined = (void 0); // Paranoia + +// Beyond this value, index getters/setters (i.e. array[0], array[1]) are so slow to +// create, and consume so much memory, that the browser appears frozen. +var MAX_ARRAY_LENGTH = 1e5; + +// Approximations of internal ECMAScript conversion functions +var ECMAScript = (function() { + // Stash a copy in case other scripts modify these + var opts = Object.prototype.toString, + ophop = Object.prototype.hasOwnProperty; + + return { + // Class returns internal [[Class]] property, used to avoid cross-frame instanceof issues: + Class: function(v) { return opts.call(v).replace(/^\[object *|\]$/g, ''); }, + HasProperty: function(o, p) { return p in o; }, + HasOwnProperty: function(o, p) { return ophop.call(o, p); }, + IsCallable: function(o) { return typeof o === 'function'; }, + ToInt32: function(v) { return v >> 0; }, + ToUint32: function(v) { return v >>> 0; } + }; +}()); + +// Snapshot intrinsics +var LN2 = Math.LN2, + abs = Math.abs, + floor = Math.floor, + log = Math.log, + min = Math.min, + pow = Math.pow, + round = Math.round; + +// ES5: lock down object properties +function configureProperties(obj) { + if (getOwnPropNames && defineProp) { + var props = getOwnPropNames(obj), i; + for (i = 0; i < props.length; i += 1) { + defineProp(obj, props[i], { + value: obj[props[i]], + writable: false, + enumerable: false, + configurable: false + }); + } + } +} + +// emulate ES5 getter/setter API using legacy APIs +// http://blogs.msdn.com/b/ie/archive/2010/09/07/transitioning-existing-code-to-the-es5-getter-setter-apis.aspx +// (second clause tests for Object.defineProperty() in IE<9 that only supports extending DOM prototypes, but +// note that IE<9 does not support __defineGetter__ or __defineSetter__ so it just renders the method harmless) +var defineProp +if (Object.defineProperty && (function() { + try { + Object.defineProperty({}, 'x', {}); + return true; + } catch (e) { + return false; + } + })()) { + defineProp = Object.defineProperty; +} else { + defineProp = function(o, p, desc) { + if (!o === Object(o)) throw new TypeError("Object.defineProperty called on non-object"); + if (ECMAScript.HasProperty(desc, 'get') && Object.prototype.__defineGetter__) { Object.prototype.__defineGetter__.call(o, p, desc.get); } + if (ECMAScript.HasProperty(desc, 'set') && Object.prototype.__defineSetter__) { Object.prototype.__defineSetter__.call(o, p, desc.set); } + if (ECMAScript.HasProperty(desc, 'value')) { o[p] = desc.value; } + return o; + }; +} + +var getOwnPropNames = Object.getOwnPropertyNames || function (o) { + if (o !== Object(o)) throw new TypeError("Object.getOwnPropertyNames called on non-object"); + var props = [], p; + for (p in o) { + if (ECMAScript.HasOwnProperty(o, p)) { + props.push(p); + } + } + return props; +}; + +// ES5: Make obj[index] an alias for obj._getter(index)/obj._setter(index, value) +// for index in 0 ... obj.length +function makeArrayAccessors(obj) { + if (!defineProp) { return; } + + if (obj.length > MAX_ARRAY_LENGTH) throw new RangeError("Array too large for polyfill"); + + function makeArrayAccessor(index) { + defineProp(obj, index, { + 'get': function() { return obj._getter(index); }, + 'set': function(v) { obj._setter(index, v); }, + enumerable: true, + configurable: false + }); + } + + var i; + for (i = 0; i < obj.length; i += 1) { + makeArrayAccessor(i); + } +} + +// Internal conversion functions: +// pack() - take a number (interpreted as Type), output a byte array +// unpack() - take a byte array, output a Type-like number + +function as_signed(value, bits) { var s = 32 - bits; return (value << s) >> s; } +function as_unsigned(value, bits) { var s = 32 - bits; return (value << s) >>> s; } + +function packI8(n) { return [n & 0xff]; } +function unpackI8(bytes) { return as_signed(bytes[0], 8); } + +function packU8(n) { return [n & 0xff]; } +function unpackU8(bytes) { return as_unsigned(bytes[0], 8); } + +function packU8Clamped(n) { n = round(Number(n)); return [n < 0 ? 0 : n > 0xff ? 0xff : n & 0xff]; } + +function packI16(n) { return [(n >> 8) & 0xff, n & 0xff]; } +function unpackI16(bytes) { return as_signed(bytes[0] << 8 | bytes[1], 16); } + +function packU16(n) { return [(n >> 8) & 0xff, n & 0xff]; } +function unpackU16(bytes) { return as_unsigned(bytes[0] << 8 | bytes[1], 16); } + +function packI32(n) { return [(n >> 24) & 0xff, (n >> 16) & 0xff, (n >> 8) & 0xff, n & 0xff]; } +function unpackI32(bytes) { return as_signed(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); } + +function packU32(n) { return [(n >> 24) & 0xff, (n >> 16) & 0xff, (n >> 8) & 0xff, n & 0xff]; } +function unpackU32(bytes) { return as_unsigned(bytes[0] << 24 | bytes[1] << 16 | bytes[2] << 8 | bytes[3], 32); } + +function packIEEE754(v, ebits, fbits) { + + var bias = (1 << (ebits - 1)) - 1, + s, e, f, ln, + i, bits, str, bytes; + + function roundToEven(n) { + var w = floor(n), f = n - w; + if (f < 0.5) + return w; + if (f > 0.5) + return w + 1; + return w % 2 ? w + 1 : w; + } + + // Compute sign, exponent, fraction + if (v !== v) { + // NaN + // http://dev.w3.org/2006/webapi/WebIDL/#es-type-mapping + e = (1 << ebits) - 1; f = pow(2, fbits - 1); s = 0; + } else if (v === Infinity || v === -Infinity) { + e = (1 << ebits) - 1; f = 0; s = (v < 0) ? 1 : 0; + } else if (v === 0) { + e = 0; f = 0; s = (1 / v === -Infinity) ? 1 : 0; + } else { + s = v < 0; + v = abs(v); + + if (v >= pow(2, 1 - bias)) { + e = min(floor(log(v) / LN2), 1023); + f = roundToEven(v / pow(2, e) * pow(2, fbits)); + if (f / pow(2, fbits) >= 2) { + e = e + 1; + f = 1; + } + if (e > bias) { + // Overflow + e = (1 << ebits) - 1; + f = 0; + } else { + // Normalized + e = e + bias; + f = f - pow(2, fbits); + } + } else { + // Denormalized + e = 0; + f = roundToEven(v / pow(2, 1 - bias - fbits)); + } + } + + // Pack sign, exponent, fraction + bits = []; + for (i = fbits; i; i -= 1) { bits.push(f % 2 ? 1 : 0); f = floor(f / 2); } + for (i = ebits; i; i -= 1) { bits.push(e % 2 ? 1 : 0); e = floor(e / 2); } + bits.push(s ? 1 : 0); + bits.reverse(); + str = bits.join(''); + + // Bits to bytes + bytes = []; + while (str.length) { + bytes.push(parseInt(str.substring(0, 8), 2)); + str = str.substring(8); + } + return bytes; +} + +function unpackIEEE754(bytes, ebits, fbits) { + + // Bytes to bits + var bits = [], i, j, b, str, + bias, s, e, f; + + for (i = bytes.length; i; i -= 1) { + b = bytes[i - 1]; + for (j = 8; j; j -= 1) { + bits.push(b % 2 ? 1 : 0); b = b >> 1; + } + } + bits.reverse(); + str = bits.join(''); + + // Unpack sign, exponent, fraction + bias = (1 << (ebits - 1)) - 1; + s = parseInt(str.substring(0, 1), 2) ? -1 : 1; + e = parseInt(str.substring(1, 1 + ebits), 2); + f = parseInt(str.substring(1 + ebits), 2); + + // Produce number + if (e === (1 << ebits) - 1) { + return f !== 0 ? NaN : s * Infinity; + } else if (e > 0) { + // Normalized + return s * pow(2, e - bias) * (1 + f / pow(2, fbits)); + } else if (f !== 0) { + // Denormalized + return s * pow(2, -(bias - 1)) * (f / pow(2, fbits)); + } else { + return s < 0 ? -0 : 0; + } +} + +function unpackF64(b) { return unpackIEEE754(b, 11, 52); } +function packF64(v) { return packIEEE754(v, 11, 52); } +function unpackF32(b) { return unpackIEEE754(b, 8, 23); } +function packF32(v) { return packIEEE754(v, 8, 23); } + + +// +// 3 The ArrayBuffer Type +// + +(function() { + + /** @constructor */ + var ArrayBuffer = function ArrayBuffer(length) { + length = ECMAScript.ToInt32(length); + if (length < 0) throw new RangeError('ArrayBuffer size is not a small enough positive integer'); + + this.byteLength = length; + this._bytes = []; + this._bytes.length = length; + + var i; + for (i = 0; i < this.byteLength; i += 1) { + this._bytes[i] = 0; + } + + configureProperties(this); + }; + + exports.ArrayBuffer = exports.ArrayBuffer || ArrayBuffer; + + // + // 4 The ArrayBufferView Type + // + + // NOTE: this constructor is not exported + /** @constructor */ + var ArrayBufferView = function ArrayBufferView() { + //this.buffer = null; + //this.byteOffset = 0; + //this.byteLength = 0; + }; + + // + // 5 The Typed Array View Types + // + + function makeConstructor(bytesPerElement, pack, unpack) { + // Each TypedArray type requires a distinct constructor instance with + // identical logic, which this produces. + + var ctor; + ctor = function(buffer, byteOffset, length) { + var array, sequence, i, s; + + if (!arguments.length || typeof arguments[0] === 'number') { + // Constructor(unsigned long length) + this.length = ECMAScript.ToInt32(arguments[0]); + if (length < 0) throw new RangeError('ArrayBufferView size is not a small enough positive integer'); + + this.byteLength = this.length * this.BYTES_PER_ELEMENT; + this.buffer = new ArrayBuffer(this.byteLength); + this.byteOffset = 0; + } else if (typeof arguments[0] === 'object' && arguments[0].constructor === ctor) { + // Constructor(TypedArray array) + array = arguments[0]; + + this.length = array.length; + this.byteLength = this.length * this.BYTES_PER_ELEMENT; + this.buffer = new ArrayBuffer(this.byteLength); + this.byteOffset = 0; + + for (i = 0; i < this.length; i += 1) { + this._setter(i, array._getter(i)); + } + } else if (typeof arguments[0] === 'object' && + !(arguments[0] instanceof ArrayBuffer || ECMAScript.Class(arguments[0]) === 'ArrayBuffer')) { + // Constructor(sequence array) + sequence = arguments[0]; + + this.length = ECMAScript.ToUint32(sequence.length); + this.byteLength = this.length * this.BYTES_PER_ELEMENT; + this.buffer = new ArrayBuffer(this.byteLength); + this.byteOffset = 0; + + for (i = 0; i < this.length; i += 1) { + s = sequence[i]; + this._setter(i, Number(s)); + } + } else if (typeof arguments[0] === 'object' && + (arguments[0] instanceof ArrayBuffer || ECMAScript.Class(arguments[0]) === 'ArrayBuffer')) { + // Constructor(ArrayBuffer buffer, + // optional unsigned long byteOffset, optional unsigned long length) + this.buffer = buffer; + + this.byteOffset = ECMAScript.ToUint32(byteOffset); + if (this.byteOffset > this.buffer.byteLength) { + throw new RangeError("byteOffset out of range"); + } + + if (this.byteOffset % this.BYTES_PER_ELEMENT) { + // The given byteOffset must be a multiple of the element + // size of the specific type, otherwise an exception is raised. + throw new RangeError("ArrayBuffer length minus the byteOffset is not a multiple of the element size."); + } + + if (arguments.length < 3) { + this.byteLength = this.buffer.byteLength - this.byteOffset; + + if (this.byteLength % this.BYTES_PER_ELEMENT) { + throw new RangeError("length of buffer minus byteOffset not a multiple of the element size"); + } + this.length = this.byteLength / this.BYTES_PER_ELEMENT; + } else { + this.length = ECMAScript.ToUint32(length); + this.byteLength = this.length * this.BYTES_PER_ELEMENT; + } + + if ((this.byteOffset + this.byteLength) > this.buffer.byteLength) { + throw new RangeError("byteOffset and length reference an area beyond the end of the buffer"); + } + } else { + throw new TypeError("Unexpected argument type(s)"); + } + + this.constructor = ctor; + + configureProperties(this); + makeArrayAccessors(this); + }; + + ctor.prototype = new ArrayBufferView(); + ctor.prototype.BYTES_PER_ELEMENT = bytesPerElement; + ctor.prototype._pack = pack; + ctor.prototype._unpack = unpack; + ctor.BYTES_PER_ELEMENT = bytesPerElement; + + // getter type (unsigned long index); + ctor.prototype._getter = function(index) { + if (arguments.length < 1) throw new SyntaxError("Not enough arguments"); + + index = ECMAScript.ToUint32(index); + if (index >= this.length) { + return undefined; + } + + var bytes = [], i, o; + for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT; + i < this.BYTES_PER_ELEMENT; + i += 1, o += 1) { + bytes.push(this.buffer._bytes[o]); + } + return this._unpack(bytes); + }; + + // NONSTANDARD: convenience alias for getter: type get(unsigned long index); + ctor.prototype.get = ctor.prototype._getter; + + // setter void (unsigned long index, type value); + ctor.prototype._setter = function(index, value) { + if (arguments.length < 2) throw new SyntaxError("Not enough arguments"); + + index = ECMAScript.ToUint32(index); + if (index >= this.length) { + return undefined; + } + + var bytes = this._pack(value), i, o; + for (i = 0, o = this.byteOffset + index * this.BYTES_PER_ELEMENT; + i < this.BYTES_PER_ELEMENT; + i += 1, o += 1) { + this.buffer._bytes[o] = bytes[i]; + } + }; + + // void set(TypedArray array, optional unsigned long offset); + // void set(sequence array, optional unsigned long offset); + ctor.prototype.set = function(index, value) { + if (arguments.length < 1) throw new SyntaxError("Not enough arguments"); + var array, sequence, offset, len, + i, s, d, + byteOffset, byteLength, tmp; + + if (typeof arguments[0] === 'object' && arguments[0].constructor === this.constructor) { + // void set(TypedArray array, optional unsigned long offset); + array = arguments[0]; + offset = ECMAScript.ToUint32(arguments[1]); + + if (offset + array.length > this.length) { + throw new RangeError("Offset plus length of array is out of range"); + } + + byteOffset = this.byteOffset + offset * this.BYTES_PER_ELEMENT; + byteLength = array.length * this.BYTES_PER_ELEMENT; + + if (array.buffer === this.buffer) { + tmp = []; + for (i = 0, s = array.byteOffset; i < byteLength; i += 1, s += 1) { + tmp[i] = array.buffer._bytes[s]; + } + for (i = 0, d = byteOffset; i < byteLength; i += 1, d += 1) { + this.buffer._bytes[d] = tmp[i]; + } + } else { + for (i = 0, s = array.byteOffset, d = byteOffset; + i < byteLength; i += 1, s += 1, d += 1) { + this.buffer._bytes[d] = array.buffer._bytes[s]; + } + } + } else if (typeof arguments[0] === 'object' && typeof arguments[0].length !== 'undefined') { + // void set(sequence array, optional unsigned long offset); + sequence = arguments[0]; + len = ECMAScript.ToUint32(sequence.length); + offset = ECMAScript.ToUint32(arguments[1]); + + if (offset + len > this.length) { + throw new RangeError("Offset plus length of array is out of range"); + } + + for (i = 0; i < len; i += 1) { + s = sequence[i]; + this._setter(offset + i, Number(s)); + } + } else { + throw new TypeError("Unexpected argument type(s)"); + } + }; + + // TypedArray subarray(long begin, optional long end); + ctor.prototype.subarray = function(start, end) { + function clamp(v, min, max) { return v < min ? min : v > max ? max : v; } + + start = ECMAScript.ToInt32(start); + end = ECMAScript.ToInt32(end); + + if (arguments.length < 1) { start = 0; } + if (arguments.length < 2) { end = this.length; } + + if (start < 0) { start = this.length + start; } + if (end < 0) { end = this.length + end; } + + start = clamp(start, 0, this.length); + end = clamp(end, 0, this.length); + + var len = end - start; + if (len < 0) { + len = 0; + } + + return new this.constructor( + this.buffer, this.byteOffset + start * this.BYTES_PER_ELEMENT, len); + }; + + return ctor; + } + + var Int8Array = makeConstructor(1, packI8, unpackI8); + var Uint8Array = makeConstructor(1, packU8, unpackU8); + var Uint8ClampedArray = makeConstructor(1, packU8Clamped, unpackU8); + var Int16Array = makeConstructor(2, packI16, unpackI16); + var Uint16Array = makeConstructor(2, packU16, unpackU16); + var Int32Array = makeConstructor(4, packI32, unpackI32); + var Uint32Array = makeConstructor(4, packU32, unpackU32); + var Float32Array = makeConstructor(4, packF32, unpackF32); + var Float64Array = makeConstructor(8, packF64, unpackF64); + + exports.Int8Array = exports.Int8Array || Int8Array; + exports.Uint8Array = exports.Uint8Array || Uint8Array; + exports.Uint8ClampedArray = exports.Uint8ClampedArray || Uint8ClampedArray; + exports.Int16Array = exports.Int16Array || Int16Array; + exports.Uint16Array = exports.Uint16Array || Uint16Array; + exports.Int32Array = exports.Int32Array || Int32Array; + exports.Uint32Array = exports.Uint32Array || Uint32Array; + exports.Float32Array = exports.Float32Array || Float32Array; + exports.Float64Array = exports.Float64Array || Float64Array; +}()); + +// +// 6 The DataView View Type +// + +(function() { + function r(array, index) { + return ECMAScript.IsCallable(array.get) ? array.get(index) : array[index]; + } + + var IS_BIG_ENDIAN = (function() { + var u16array = new(exports.Uint16Array)([0x1234]), + u8array = new(exports.Uint8Array)(u16array.buffer); + return r(u8array, 0) === 0x12; + }()); + + // Constructor(ArrayBuffer buffer, + // optional unsigned long byteOffset, + // optional unsigned long byteLength) + /** @constructor */ + var DataView = function DataView(buffer, byteOffset, byteLength) { + if (arguments.length === 0) { + buffer = new exports.ArrayBuffer(0); + } else if (!(buffer instanceof exports.ArrayBuffer || ECMAScript.Class(buffer) === 'ArrayBuffer')) { + throw new TypeError("TypeError"); + } + + this.buffer = buffer || new exports.ArrayBuffer(0); + + this.byteOffset = ECMAScript.ToUint32(byteOffset); + if (this.byteOffset > this.buffer.byteLength) { + throw new RangeError("byteOffset out of range"); + } + + if (arguments.length < 3) { + this.byteLength = this.buffer.byteLength - this.byteOffset; + } else { + this.byteLength = ECMAScript.ToUint32(byteLength); + } + + if ((this.byteOffset + this.byteLength) > this.buffer.byteLength) { + throw new RangeError("byteOffset and length reference an area beyond the end of the buffer"); + } + + configureProperties(this); + }; + + function makeGetter(arrayType) { + return function(byteOffset, littleEndian) { + + byteOffset = ECMAScript.ToUint32(byteOffset); + + if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) { + throw new RangeError("Array index out of range"); + } + byteOffset += this.byteOffset; + + var uint8Array = new exports.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT), + bytes = [], i; + for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) { + bytes.push(r(uint8Array, i)); + } + + if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) { + bytes.reverse(); + } + + return r(new arrayType(new exports.Uint8Array(bytes).buffer), 0); + }; + } + + DataView.prototype.getUint8 = makeGetter(exports.Uint8Array); + DataView.prototype.getInt8 = makeGetter(exports.Int8Array); + DataView.prototype.getUint16 = makeGetter(exports.Uint16Array); + DataView.prototype.getInt16 = makeGetter(exports.Int16Array); + DataView.prototype.getUint32 = makeGetter(exports.Uint32Array); + DataView.prototype.getInt32 = makeGetter(exports.Int32Array); + DataView.prototype.getFloat32 = makeGetter(exports.Float32Array); + DataView.prototype.getFloat64 = makeGetter(exports.Float64Array); + + function makeSetter(arrayType) { + return function(byteOffset, value, littleEndian) { + + byteOffset = ECMAScript.ToUint32(byteOffset); + if (byteOffset + arrayType.BYTES_PER_ELEMENT > this.byteLength) { + throw new RangeError("Array index out of range"); + } + + // Get bytes + var typeArray = new arrayType([value]), + byteArray = new exports.Uint8Array(typeArray.buffer), + bytes = [], i, byteView; + + for (i = 0; i < arrayType.BYTES_PER_ELEMENT; i += 1) { + bytes.push(r(byteArray, i)); + } + + // Flip if necessary + if (Boolean(littleEndian) === Boolean(IS_BIG_ENDIAN)) { + bytes.reverse(); + } + + // Write them + byteView = new exports.Uint8Array(this.buffer, byteOffset, arrayType.BYTES_PER_ELEMENT); + byteView.set(bytes); + }; + } + + DataView.prototype.setUint8 = makeSetter(exports.Uint8Array); + DataView.prototype.setInt8 = makeSetter(exports.Int8Array); + DataView.prototype.setUint16 = makeSetter(exports.Uint16Array); + DataView.prototype.setInt16 = makeSetter(exports.Int16Array); + DataView.prototype.setUint32 = makeSetter(exports.Uint32Array); + DataView.prototype.setInt32 = makeSetter(exports.Int32Array); + DataView.prototype.setFloat32 = makeSetter(exports.Float32Array); + DataView.prototype.setFloat64 = makeSetter(exports.Float64Array); + + exports.DataView = exports.DataView || DataView; + +}()); + +},{}],12:[function(require,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. + +// a duplex stream is just a stream that is both readable and writable. +// Since JS doesn't have multiple prototypal inheritance, this class +// prototypally inherits from Readable, and then parasitically from +// Writable. + +module.exports = Duplex; +var inherits = require('inherits'); +var setImmediate = require('process/browser.js').nextTick; +var Readable = require('./readable.js'); +var Writable = require('./writable.js'); + +inherits(Duplex, Readable); + +Duplex.prototype.write = Writable.prototype.write; +Duplex.prototype.end = Writable.prototype.end; +Duplex.prototype._write = Writable.prototype._write; + +function Duplex(options) { + if (!(this instanceof Duplex)) + return new Duplex(options); + + Readable.call(this, options); + Writable.call(this, options); + + if (options && options.readable === false) + this.readable = false; + + if (options && options.writable === false) + this.writable = false; + + this.allowHalfOpen = true; + if (options && options.allowHalfOpen === false) + this.allowHalfOpen = false; + + this.once('end', onend); +} + +// the no-half-open enforcer +function onend() { + // if we allow half-open state, or if the writable side ended, + // then we're ok. + if (this.allowHalfOpen || this._writableState.ended) + return; + + // no more data can be written. + // But allow more writes to happen in this tick. + var self = this; + setImmediate(function () { + self.end(); + }); +} + +},{"./readable.js":16,"./writable.js":18,"inherits":7,"process/browser.js":14}],13:[function(require,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. + +module.exports = Stream; + +var EE = require('events').EventEmitter; +var inherits = require('inherits'); + +inherits(Stream, EE); +Stream.Readable = require('./readable.js'); +Stream.Writable = require('./writable.js'); +Stream.Duplex = require('./duplex.js'); +Stream.Transform = require('./transform.js'); +Stream.PassThrough = require('./passthrough.js'); + +// Backwards-compat with node 0.4.x +Stream.Stream = Stream; + + + +// old-style streams. Note that the pipe method (the only relevant +// part of this class) is overridden in the Readable class. + +function Stream() { + EE.call(this); +} + +Stream.prototype.pipe = function(dest, options) { + var source = this; + + function ondata(chunk) { + if (dest.writable) { + if (false === dest.write(chunk) && source.pause) { + source.pause(); + } + } + } + + source.on('data', ondata); + + function ondrain() { + if (source.readable && source.resume) { + source.resume(); + } + } + + dest.on('drain', ondrain); + + // If the 'end' option is not supplied, dest.end() will be called when + // source gets the 'end' or 'close' events. Only dest.end() once. + if (!dest._isStdio && (!options || options.end !== false)) { + source.on('end', onend); + source.on('close', onclose); + } + + var didOnEnd = false; + function onend() { + if (didOnEnd) return; + didOnEnd = true; + + dest.end(); + } + + + function onclose() { + if (didOnEnd) return; + didOnEnd = true; + + if (typeof dest.destroy === 'function') dest.destroy(); + } + + // don't leave dangling pipes when there are errors. + function onerror(er) { + cleanup(); + if (EE.listenerCount(this, 'error') === 0) { + throw er; // Unhandled stream error in pipe. + } + } + + source.on('error', onerror); + dest.on('error', onerror); + + // remove all the event listeners that were added. + function cleanup() { + source.removeListener('data', ondata); + dest.removeListener('drain', ondrain); + + source.removeListener('end', onend); + source.removeListener('close', onclose); + + source.removeListener('error', onerror); + dest.removeListener('error', onerror); + + source.removeListener('end', cleanup); + source.removeListener('close', cleanup); + + dest.removeListener('close', cleanup); + } + + source.on('end', cleanup); + source.on('close', cleanup); + + dest.on('close', cleanup); + + dest.emit('pipe', source); + + // Allow for unix-like usage: A.pipe(B).pipe(C) + return dest; +}; + +},{"./duplex.js":12,"./passthrough.js":15,"./readable.js":16,"./transform.js":17,"./writable.js":18,"events":2,"inherits":7}],14:[function(require,module,exports){ +module.exports=require(8) +},{}],15:[function(require,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. + +// a passthrough stream. +// basically just the most minimal sort of Transform stream. +// Every written chunk gets output as-is. + +module.exports = PassThrough; + +var Transform = require('./transform.js'); +var inherits = require('inherits'); +inherits(PassThrough, Transform); + +function PassThrough(options) { + if (!(this instanceof PassThrough)) + return new PassThrough(options); + + Transform.call(this, options); +} + +PassThrough.prototype._transform = function(chunk, encoding, cb) { + cb(null, chunk); +}; + +},{"./transform.js":17,"inherits":7}],16:[function(require,module,exports){ +var process=require("__browserify_process");// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. + +module.exports = Readable; +Readable.ReadableState = ReadableState; + +var EE = require('events').EventEmitter; +var Stream = require('./index.js'); +var Buffer = require('buffer').Buffer; +var setImmediate = require('process/browser.js').nextTick; +var StringDecoder; + +var inherits = require('inherits'); +inherits(Readable, Stream); + +function ReadableState(options, stream) { + options = options || {}; + + // the point at which it stops calling _read() to fill the buffer + // Note: 0 is a valid value, means "don't call _read preemptively ever" + var hwm = options.highWaterMark; + this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; + + // cast to ints. + this.highWaterMark = ~~this.highWaterMark; + + this.buffer = []; + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = false; + this.ended = false; + this.endEmitted = false; + this.reading = false; + + // In streams that never have any data, and do push(null) right away, + // the consumer can miss the 'end' event if they do some I/O before + // consuming the stream. So, we don't emit('end') until some reading + // happens. + this.calledRead = false; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, becuase any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // whenever we return null, then we set a flag to say + // that we're awaiting a 'readable' event emission. + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + + + // object stream flag. Used to make read(n) ignore n and to + // make all the buffer merging and length checks go away + this.objectMode = !!options.objectMode; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // when piping, we only care about 'readable' events that happen + // after read()ing all the bytes and not getting any pushback. + this.ranOut = false; + + // the number of writers that are awaiting a drain event in .pipe()s + this.awaitDrain = 0; + + // if true, a maybeReadMore has been scheduled + this.readingMore = false; + + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) + StringDecoder = require('string_decoder').StringDecoder; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } +} + +function Readable(options) { + if (!(this instanceof Readable)) + return new Readable(options); + + this._readableState = new ReadableState(options, this); + + // legacy + this.readable = true; + + Stream.call(this); +} + +// Manually shove something into the read() buffer. +// This returns true if the highWaterMark has not been hit yet, +// similar to how Writable.write() returns true if you should +// write() some more. +Readable.prototype.push = function(chunk, encoding) { + var state = this._readableState; + + if (typeof chunk === 'string' && !state.objectMode) { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = new Buffer(chunk, encoding); + encoding = ''; + } + } + + return readableAddChunk(this, state, chunk, encoding, false); +}; + +// Unshift should *always* be something directly out of read() +Readable.prototype.unshift = function(chunk) { + var state = this._readableState; + return readableAddChunk(this, state, chunk, '', true); +}; + +function readableAddChunk(stream, state, chunk, encoding, addToFront) { + var er = chunkInvalid(state, chunk); + if (er) { + stream.emit('error', er); + } else if (chunk === null || chunk === undefined) { + state.reading = false; + if (!state.ended) + onEofChunk(stream, state); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (state.ended && !addToFront) { + var e = new Error('stream.push() after EOF'); + stream.emit('error', e); + } else if (state.endEmitted && addToFront) { + var e = new Error('stream.unshift() after end event'); + stream.emit('error', e); + } else { + if (state.decoder && !addToFront && !encoding) + chunk = state.decoder.write(chunk); + + // update the buffer info. + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) { + state.buffer.unshift(chunk); + } else { + state.reading = false; + state.buffer.push(chunk); + } + + if (state.needReadable) + emitReadable(stream); + + maybeReadMore(stream, state); + } + } else if (!addToFront) { + state.reading = false; + } + + return needMoreData(state); +} + + + +// if it's past the high water mark, we can push in some more. +// Also, if we have no data yet, we can stand some +// more bytes. This is to work around cases where hwm=0, +// such as the repl. Also, if the push() triggered a +// readable event, and the user called read(largeNumber) such that +// needReadable was set, then we ought to push more, so that another +// 'readable' event will be triggered. +function needMoreData(state) { + return !state.ended && + (state.needReadable || + state.length < state.highWaterMark || + state.length === 0); +} + +// backwards compatibility. +Readable.prototype.setEncoding = function(enc) { + if (!StringDecoder) + StringDecoder = require('string_decoder').StringDecoder; + this._readableState.decoder = new StringDecoder(enc); + this._readableState.encoding = enc; +}; + +// Don't raise the hwm > 128MB +var MAX_HWM = 0x800000; +function roundUpToNextPowerOf2(n) { + if (n >= MAX_HWM) { + n = MAX_HWM; + } else { + // Get the next highest power of 2 + n--; + for (var p = 1; p < 32; p <<= 1) n |= n >> p; + n++; + } + return n; +} + +function howMuchToRead(n, state) { + if (state.length === 0 && state.ended) + return 0; + + if (state.objectMode) + return n === 0 ? 0 : 1; + + if (isNaN(n) || n === null) { + // only flow one buffer at a time + if (state.flowing && state.buffer.length) + return state.buffer[0].length; + else + return state.length; + } + + if (n <= 0) + return 0; + + // If we're asking for more than the target buffer level, + // then raise the water mark. Bump up to the next highest + // power of 2, to prevent increasing it excessively in tiny + // amounts. + if (n > state.highWaterMark) + state.highWaterMark = roundUpToNextPowerOf2(n); + + // don't have that much. return null, unless we've ended. + if (n > state.length) { + if (!state.ended) { + state.needReadable = true; + return 0; + } else + return state.length; + } + + return n; +} + +// you can override either this method, or the async _read(n) below. +Readable.prototype.read = function(n) { + var state = this._readableState; + state.calledRead = true; + var nOrig = n; + + if (typeof n !== 'number' || n > 0) + state.emittedReadable = false; + + // if we're doing read(0) to trigger a readable event, but we + // already have a bunch of data in the buffer, then just trigger + // the 'readable' event and move on. + if (n === 0 && + state.needReadable && + (state.length >= state.highWaterMark || state.ended)) { + emitReadable(this); + return null; + } + + n = howMuchToRead(n, state); + + // if we've ended, and we're now clear, then finish it up. + if (n === 0 && state.ended) { + if (state.length === 0) + endReadable(this); + return null; + } + + // All the actual chunk generation logic needs to be + // *below* the call to _read. The reason is that in certain + // synthetic stream cases, such as passthrough streams, _read + // may be a completely synchronous operation which may change + // the state of the read buffer, providing enough data when + // before there was *not* enough. + // + // So, the steps are: + // 1. Figure out what the state of things will be after we do + // a read from the buffer. + // + // 2. If that resulting state will trigger a _read, then call _read. + // Note that this may be asynchronous, or synchronous. Yes, it is + // deeply ugly to write APIs this way, but that still doesn't mean + // that the Readable class should behave improperly, as streams are + // designed to be sync/async agnostic. + // Take note if the _read call is sync or async (ie, if the read call + // has returned yet), so that we know whether or not it's safe to emit + // 'readable' etc. + // + // 3. Actually pull the requested chunks out of the buffer and return. + + // if we need a readable event, then we need to do some reading. + var doRead = state.needReadable; + + // if we currently have less than the highWaterMark, then also read some + if (state.length - n <= state.highWaterMark) + doRead = true; + + // however, if we've ended, then there's no point, and if we're already + // reading, then it's unnecessary. + if (state.ended || state.reading) + doRead = false; + + if (doRead) { + state.reading = true; + state.sync = true; + // if the length is currently zero, then we *need* a readable event. + if (state.length === 0) + state.needReadable = true; + // call internal read method + this._read(state.highWaterMark); + state.sync = false; + } + + // If _read called its callback synchronously, then `reading` + // will be false, and we need to re-evaluate how much data we + // can return to the user. + if (doRead && !state.reading) + n = howMuchToRead(nOrig, state); + + var ret; + if (n > 0) + ret = fromList(n, state); + else + ret = null; + + if (ret === null) { + state.needReadable = true; + n = 0; + } + + state.length -= n; + + // If we have nothing in the buffer, then we want to know + // as soon as we *do* get something into the buffer. + if (state.length === 0 && !state.ended) + state.needReadable = true; + + // If we happened to read() exactly the remaining amount in the + // buffer, and the EOF has been seen at this point, then make sure + // that we emit 'end' on the very next tick. + if (state.ended && !state.endEmitted && state.length === 0) + endReadable(this); + + return ret; +}; + +function chunkInvalid(state, chunk) { + var er = null; + if (!Buffer.isBuffer(chunk) && + 'string' !== typeof chunk && + chunk !== null && + chunk !== undefined && + !state.objectMode && + !er) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + return er; +} + + +function onEofChunk(stream, state) { + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + state.ended = true; + + // if we've ended and we have some data left, then emit + // 'readable' now to make sure it gets picked up. + if (state.length > 0) + emitReadable(stream); + else + endReadable(stream); +} + +// Don't emit readable right away in sync mode, because this can trigger +// another read() call => stack overflow. This way, it might trigger +// a nextTick recursion warning, but that's not so bad. +function emitReadable(stream) { + var state = stream._readableState; + state.needReadable = false; + if (state.emittedReadable) + return; + + state.emittedReadable = true; + if (state.sync) + setImmediate(function() { + emitReadable_(stream); + }); + else + emitReadable_(stream); +} + +function emitReadable_(stream) { + stream.emit('readable'); +} + + +// at this point, the user has presumably seen the 'readable' event, +// and called read() to consume some data. that may have triggered +// in turn another _read(n) call, in which case reading = true if +// it's in progress. +// However, if we're not ended, or reading, and the length < hwm, +// then go ahead and try to read some more preemptively. +function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + setImmediate(function() { + maybeReadMore_(stream, state); + }); + } +} + +function maybeReadMore_(stream, state) { + var len = state.length; + while (!state.reading && !state.flowing && !state.ended && + state.length < state.highWaterMark) { + stream.read(0); + if (len === state.length) + // didn't get any data, stop spinning. + break; + else + len = state.length; + } + state.readingMore = false; +} + +// abstract method. to be overridden in specific implementation classes. +// call cb(er, data) where data is <= n in length. +// for virtual (non-string, non-buffer) streams, "length" is somewhat +// arbitrary, and perhaps not very meaningful. +Readable.prototype._read = function(n) { + this.emit('error', new Error('not implemented')); +}; + +Readable.prototype.pipe = function(dest, pipeOpts) { + var src = this; + var state = this._readableState; + + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + + var doEnd = (!pipeOpts || pipeOpts.end !== false) && + dest !== process.stdout && + dest !== process.stderr; + + var endFn = doEnd ? onend : cleanup; + if (state.endEmitted) + setImmediate(endFn); + else + src.once('end', endFn); + + dest.on('unpipe', onunpipe); + function onunpipe(readable) { + if (readable !== src) return; + cleanup(); + } + + function onend() { + dest.end(); + } + + // when the dest drains, it reduces the awaitDrain counter + // on the source. This would be more elegant with a .once() + // handler in flow(), but adding and removing repeatedly is + // too slow. + var ondrain = pipeOnDrain(src); + dest.on('drain', ondrain); + + function cleanup() { + // cleanup event handlers once the pipe is broken + dest.removeListener('close', onclose); + dest.removeListener('finish', onfinish); + dest.removeListener('drain', ondrain); + dest.removeListener('error', onerror); + dest.removeListener('unpipe', onunpipe); + src.removeListener('end', onend); + src.removeListener('end', cleanup); + + // if the reader is waiting for a drain event from this + // specific writer, then it would cause it to never start + // flowing again. + // So, if this is awaiting a drain, then we just call it now. + // If we don't know, then assume that we are waiting for one. + if (!dest._writableState || dest._writableState.needDrain) + ondrain(); + } + + // if the dest has an error, then stop piping into it. + // however, don't suppress the throwing behavior for this. + // check for listeners before emit removes one-time listeners. + var errListeners = EE.listenerCount(dest, 'error'); + function onerror(er) { + unpipe(); + if (errListeners === 0 && EE.listenerCount(dest, 'error') === 0) + dest.emit('error', er); + } + dest.once('error', onerror); + + // Both close and finish should trigger unpipe, but only once. + function onclose() { + dest.removeListener('finish', onfinish); + unpipe(); + } + dest.once('close', onclose); + function onfinish() { + dest.removeListener('close', onclose); + unpipe(); + } + dest.once('finish', onfinish); + + function unpipe() { + src.unpipe(dest); + } + + // tell the dest that it's being piped to + dest.emit('pipe', src); + + // start the flow if it hasn't been started already. + if (!state.flowing) { + // the handler that waits for readable events after all + // the data gets sucked out in flow. + // This would be easier to follow with a .once() handler + // in flow(), but that is too slow. + this.on('readable', pipeOnReadable); + + state.flowing = true; + setImmediate(function() { + flow(src); + }); + } + + return dest; +}; + +function pipeOnDrain(src) { + return function() { + var dest = this; + var state = src._readableState; + state.awaitDrain--; + if (state.awaitDrain === 0) + flow(src); + }; +} + +function flow(src) { + var state = src._readableState; + var chunk; + state.awaitDrain = 0; + + function write(dest, i, list) { + var written = dest.write(chunk); + if (false === written) { + state.awaitDrain++; + } + } + + while (state.pipesCount && null !== (chunk = src.read())) { + + if (state.pipesCount === 1) + write(state.pipes, 0, null); + else + forEach(state.pipes, write); + + src.emit('data', chunk); + + // if anyone needs a drain, then we have to wait for that. + if (state.awaitDrain > 0) + return; + } + + // if every destination was unpiped, either before entering this + // function, or in the while loop, then stop flowing. + // + // NB: This is a pretty rare edge case. + if (state.pipesCount === 0) { + state.flowing = false; + + // if there were data event listeners added, then switch to old mode. + if (EE.listenerCount(src, 'data') > 0) + emitDataEvents(src); + return; + } + + // at this point, no one needed a drain, so we just ran out of data + // on the next readable event, start it over again. + state.ranOut = true; +} + +function pipeOnReadable() { + if (this._readableState.ranOut) { + this._readableState.ranOut = false; + flow(this); + } +} + + +Readable.prototype.unpipe = function(dest) { + var state = this._readableState; + + // if we're not piping anywhere, then do nothing. + if (state.pipesCount === 0) + return this; + + // just one destination. most common case. + if (state.pipesCount === 1) { + // passed in one, but it's not the right one. + if (dest && dest !== state.pipes) + return this; + + if (!dest) + dest = state.pipes; + + // got a match. + state.pipes = null; + state.pipesCount = 0; + this.removeListener('readable', pipeOnReadable); + state.flowing = false; + if (dest) + dest.emit('unpipe', this); + return this; + } + + // slow case. multiple pipe destinations. + + if (!dest) { + // remove all. + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + this.removeListener('readable', pipeOnReadable); + state.flowing = false; + + for (var i = 0; i < len; i++) + dests[i].emit('unpipe', this); + return this; + } + + // try to find the right one. + var i = indexOf(state.pipes, dest); + if (i === -1) + return this; + + state.pipes.splice(i, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) + state.pipes = state.pipes[0]; + + dest.emit('unpipe', this); + + return this; +}; + +// set up data events if they are asked for +// Ensure readable listeners eventually get something +Readable.prototype.on = function(ev, fn) { + var res = Stream.prototype.on.call(this, ev, fn); + + if (ev === 'data' && !this._readableState.flowing) + emitDataEvents(this); + + if (ev === 'readable' && this.readable) { + var state = this._readableState; + if (!state.readableListening) { + state.readableListening = true; + state.emittedReadable = false; + state.needReadable = true; + if (!state.reading) { + this.read(0); + } else if (state.length) { + emitReadable(this, state); + } + } + } + + return res; +}; +Readable.prototype.addListener = Readable.prototype.on; + +// pause() and resume() are remnants of the legacy readable stream API +// If the user uses them, then switch into old mode. +Readable.prototype.resume = function() { + emitDataEvents(this); + this.read(0); + this.emit('resume'); +}; + +Readable.prototype.pause = function() { + emitDataEvents(this, true); + this.emit('pause'); +}; + +function emitDataEvents(stream, startPaused) { + var state = stream._readableState; + + if (state.flowing) { + // https://github.com/isaacs/readable-stream/issues/16 + throw new Error('Cannot switch to old mode now.'); + } + + var paused = startPaused || false; + var readable = false; + + // convert to an old-style stream. + stream.readable = true; + stream.pipe = Stream.prototype.pipe; + stream.on = stream.addListener = Stream.prototype.on; + + stream.on('readable', function() { + readable = true; + + var c; + while (!paused && (null !== (c = stream.read()))) + stream.emit('data', c); + + if (c === null) { + readable = false; + stream._readableState.needReadable = true; + } + }); + + stream.pause = function() { + paused = true; + this.emit('pause'); + }; + + stream.resume = function() { + paused = false; + if (readable) + setImmediate(function() { + stream.emit('readable'); + }); + else + this.read(0); + this.emit('resume'); + }; + + // now make it start, just in case it hadn't already. + stream.emit('readable'); +} + +// wrap an old-style stream as the async data source. +// This is *not* part of the readable stream interface. +// It is an ugly unfortunate mess of history. +Readable.prototype.wrap = function(stream) { + var state = this._readableState; + var paused = false; + + var self = this; + stream.on('end', function() { + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) + self.push(chunk); + } + + self.push(null); + }); + + stream.on('data', function(chunk) { + if (state.decoder) + chunk = state.decoder.write(chunk); + if (!chunk || !state.objectMode && !chunk.length) + return; + + var ret = self.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); + + // proxy all the other methods. + // important when wrapping filters and duplexes. + for (var i in stream) { + if (typeof stream[i] === 'function' && + typeof this[i] === 'undefined') { + this[i] = function(method) { return function() { + return stream[method].apply(stream, arguments); + }}(i); + } + } + + // proxy certain important events. + var events = ['error', 'close', 'destroy', 'pause', 'resume']; + forEach(events, function(ev) { + stream.on(ev, function (x) { + return self.emit.apply(self, ev, x); + }); + }); + + // when we try to consume some more bytes, simply unpause the + // underlying stream. + self._read = function(n) { + if (paused) { + paused = false; + stream.resume(); + } + }; + + return self; +}; + + + +// exposed for testing purposes only. +Readable._fromList = fromList; + +// Pluck off n bytes from an array of buffers. +// Length is the combined lengths of all the buffers in the list. +function fromList(n, state) { + var list = state.buffer; + var length = state.length; + var stringMode = !!state.decoder; + var objectMode = !!state.objectMode; + var ret; + + // nothing in the list, definitely empty. + if (list.length === 0) + return null; + + if (length === 0) + ret = null; + else if (objectMode) + ret = list.shift(); + else if (!n || n >= length) { + // read it all, truncate the array. + if (stringMode) + ret = list.join(''); + else + ret = Buffer.concat(list, length); + list.length = 0; + } else { + // read just some of it. + if (n < list[0].length) { + // just take a part of the first list item. + // slice is the same for buffers and strings. + var buf = list[0]; + ret = buf.slice(0, n); + list[0] = buf.slice(n); + } else if (n === list[0].length) { + // first list is a perfect match + ret = list.shift(); + } else { + // complex case. + // we have enough to cover it, but it spans past the first buffer. + if (stringMode) + ret = ''; + else + ret = new Buffer(n); + + var c = 0; + for (var i = 0, l = list.length; i < l && c < n; i++) { + var buf = list[0]; + var cpy = Math.min(n - c, buf.length); + + if (stringMode) + ret += buf.slice(0, cpy); + else + buf.copy(ret, c, 0, cpy); + + if (cpy < buf.length) + list[0] = buf.slice(cpy); + else + list.shift(); + + c += cpy; + } + } + } + + return ret; +} + +function endReadable(stream) { + var state = stream._readableState; + + // If we get here before consuming all the bytes, then that is a + // bug in node. Should never happen. + if (state.length > 0) + throw new Error('endReadable called on non-empty stream'); + + if (!state.endEmitted && state.calledRead) { + state.ended = true; + setImmediate(function() { + // Check that we didn't get one last unshift. + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit('end'); + } + }); + } +} + +function forEach (xs, f) { + for (var i = 0, l = xs.length; i < l; i++) { + f(xs[i], i); + } +} + +function indexOf (xs, x) { + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) return i; + } + return -1; +} + +},{"./index.js":13,"__browserify_process":8,"buffer":9,"events":2,"inherits":7,"process/browser.js":14,"string_decoder":19}],17:[function(require,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. + +// a transform stream is a readable/writable stream where you do +// something with the data. Sometimes it's called a "filter", +// but that's not a great name for it, since that implies a thing where +// some bits pass through, and others are simply ignored. (That would +// be a valid example of a transform, of course.) +// +// While the output is causally related to the input, it's not a +// necessarily symmetric or synchronous transformation. For example, +// a zlib stream might take multiple plain-text writes(), and then +// emit a single compressed chunk some time in the future. +// +// Here's how this works: +// +// The Transform stream has all the aspects of the readable and writable +// stream classes. When you write(chunk), that calls _write(chunk,cb) +// internally, and returns false if there's a lot of pending writes +// buffered up. When you call read(), that calls _read(n) until +// there's enough pending readable data buffered up. +// +// In a transform stream, the written data is placed in a buffer. When +// _read(n) is called, it transforms the queued up data, calling the +// buffered _write cb's as it consumes chunks. If consuming a single +// written chunk would result in multiple output chunks, then the first +// outputted bit calls the readcb, and subsequent chunks just go into +// the read buffer, and will cause it to emit 'readable' if necessary. +// +// This way, back-pressure is actually determined by the reading side, +// since _read has to be called to start processing a new chunk. However, +// a pathological inflate type of transform can cause excessive buffering +// here. For example, imagine a stream where every byte of input is +// interpreted as an integer from 0-255, and then results in that many +// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in +// 1kb of data being output. In this case, you could write a very small +// amount of input, and end up with a very large amount of output. In +// such a pathological inflating mechanism, there'd be no way to tell +// the system to stop doing the transform. A single 4MB write could +// cause the system to run out of memory. +// +// However, even in such a pathological case, only a single written chunk +// would be consumed, and then the rest would wait (un-transformed) until +// the results of the previous transformed chunk were consumed. + +module.exports = Transform; + +var Duplex = require('./duplex.js'); +var inherits = require('inherits'); +inherits(Transform, Duplex); + + +function TransformState(options, stream) { + this.afterTransform = function(er, data) { + return afterTransform(stream, er, data); + }; + + this.needTransform = false; + this.transforming = false; + this.writecb = null; + this.writechunk = null; +} + +function afterTransform(stream, er, data) { + var ts = stream._transformState; + ts.transforming = false; + + var cb = ts.writecb; + + if (!cb) + return stream.emit('error', new Error('no writecb in Transform class')); + + ts.writechunk = null; + ts.writecb = null; + + if (data !== null && data !== undefined) + stream.push(data); + + if (cb) + cb(er); + + var rs = stream._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + stream._read(rs.highWaterMark); + } +} + + +function Transform(options) { + if (!(this instanceof Transform)) + return new Transform(options); + + Duplex.call(this, options); + + var ts = this._transformState = new TransformState(options, this); + + // when the writable side finishes, then flush out anything remaining. + var stream = this; + + // start out asking for a readable event once data is transformed. + this._readableState.needReadable = true; + + // we have implemented the _read method, and done the other things + // that Readable wants before the first _read call, so unset the + // sync guard flag. + this._readableState.sync = false; + + this.once('finish', function() { + if ('function' === typeof this._flush) + this._flush(function(er) { + done(stream, er); + }); + else + done(stream); + }); +} + +Transform.prototype.push = function(chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); +}; + +// This is the part where you do stuff! +// override this function in implementation classes. +// 'chunk' is an input chunk. +// +// Call `push(newChunk)` to pass along transformed output +// to the readable side. You may call 'push' zero or more times. +// +// Call `cb(err)` when you are done with this chunk. If you pass +// an error, then that'll put the hurt on the whole operation. If you +// never call cb(), then you'll never get another chunk. +Transform.prototype._transform = function(chunk, encoding, cb) { + throw new Error('not implemented'); +}; + +Transform.prototype._write = function(chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || + rs.needReadable || + rs.length < rs.highWaterMark) + this._read(rs.highWaterMark); + } +}; + +// Doesn't matter what the args are here. +// _transform does all the work. +// That we got here means that the readable side wants more data. +Transform.prototype._read = function(n) { + var ts = this._transformState; + + if (ts.writechunk && ts.writecb && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + // mark that we need a transform, so that any data that comes in + // will get processed, now that we've asked for it. + ts.needTransform = true; + } +}; + + +function done(stream, er) { + if (er) + return stream.emit('error', er); + + // if there's nothing in the write buffer, then that means + // that nothing more will ever be provided + var ws = stream._writableState; + var rs = stream._readableState; + var ts = stream._transformState; + + if (ws.length) + throw new Error('calling transform done when ws.length != 0'); + + if (ts.transforming) + throw new Error('calling transform done when still transforming'); + + return stream.push(null); +} + +},{"./duplex.js":12,"inherits":7}],18:[function(require,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. + +// A bit simpler than readable streams. +// Implement an async ._write(chunk, cb), and it'll handle all +// the drain event emission and buffering. + +module.exports = Writable; +Writable.WritableState = WritableState; + +var inherits = require('inherits'); +var Stream = require('./index.js'); +var setImmediate = require('process/browser.js').nextTick; +var Buffer = require('buffer').Buffer; + +inherits(Writable, Stream); + +function WriteReq(chunk, encoding, cb) { + this.chunk = chunk; + this.encoding = encoding; + this.callback = cb; +} + +function WritableState(options, stream) { + options = options || {}; + + // the point at which write() starts returning false + // Note: 0 is a valid value, means that we always return false if + // the entire buffer is not flushed immediately on write() + var hwm = options.highWaterMark; + this.highWaterMark = (hwm || hwm === 0) ? hwm : 16 * 1024; + + // object stream flag to indicate whether or not this stream + // contains buffers or objects. + this.objectMode = !!options.objectMode; + + // cast to ints. + this.highWaterMark = ~~this.highWaterMark; + + this.needDrain = false; + // at the start of calling end() + this.ending = false; + // when end() has been called, and returned + this.ended = false; + // when 'finish' is emitted + this.finished = false; + + // should we decode strings into buffers before passing to _write? + // this is here so that some node-core streams can optimize string + // handling at a lower level. + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // not an actual buffer we keep track of, but a measurement + // of how much we're waiting to get pushed to some underlying + // socket or file. + this.length = 0; + + // a flag to see when we're in the middle of a write. + this.writing = false; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, becuase any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // a flag to know if we're processing previously buffered items, which + // may call the _write() callback in the same tick, so that we don't + // end up in an overlapped onwrite situation. + this.bufferProcessing = false; + + // the callback that's passed to _write(chunk,cb) + this.onwrite = function(er) { + onwrite(stream, er); + }; + + // the callback that the user supplies to write(chunk,encoding,cb) + this.writecb = null; + + // the amount that is being written when _write is called. + this.writelen = 0; + + this.buffer = []; +} + +function Writable(options) { + // Writable ctor is applied to Duplexes, though they're not + // instanceof Writable, they're instanceof Readable. + if (!(this instanceof Writable) && !(this instanceof Stream.Duplex)) + return new Writable(options); + + this._writableState = new WritableState(options, this); + + // legacy. + this.writable = true; + + Stream.call(this); +} + +// Otherwise people can pipe Writable streams, which is just wrong. +Writable.prototype.pipe = function() { + this.emit('error', new Error('Cannot pipe. Not readable.')); +}; + + +function writeAfterEnd(stream, state, cb) { + var er = new Error('write after end'); + // TODO: defer error events consistently everywhere, not just the cb + stream.emit('error', er); + setImmediate(function() { + cb(er); + }); +} + +// If we get something that is not a buffer, string, null, or undefined, +// and we're not in objectMode, then that's an error. +// Otherwise stream chunks are all considered to be of length=1, and the +// watermarks determine how many objects to keep in the buffer, rather than +// how many bytes or characters. +function validChunk(stream, state, chunk, cb) { + var valid = true; + if (!Buffer.isBuffer(chunk) && + 'string' !== typeof chunk && + chunk !== null && + chunk !== undefined && + !state.objectMode) { + var er = new TypeError('Invalid non-string/buffer chunk'); + stream.emit('error', er); + setImmediate(function() { + cb(er); + }); + valid = false; + } + return valid; +} + +Writable.prototype.write = function(chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + + if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (Buffer.isBuffer(chunk)) + encoding = 'buffer'; + else if (!encoding) + encoding = state.defaultEncoding; + + if (typeof cb !== 'function') + cb = function() {}; + + if (state.ended) + writeAfterEnd(this, state, cb); + else if (validChunk(this, state, chunk, cb)) + ret = writeOrBuffer(this, state, chunk, encoding, cb); + + return ret; +}; + +function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && + state.decodeStrings !== false && + typeof chunk === 'string') { + chunk = new Buffer(chunk, encoding); + } + return chunk; +} + +// if we're already writing something, then just put this +// in the queue, and wait our turn. Otherwise, call _write +// If we return false, then we need a drain event, so set that flag. +function writeOrBuffer(stream, state, chunk, encoding, cb) { + chunk = decodeChunk(state, chunk, encoding); + var len = state.objectMode ? 1 : chunk.length; + + state.length += len; + + var ret = state.length < state.highWaterMark; + state.needDrain = !ret; + + if (state.writing) + state.buffer.push(new WriteReq(chunk, encoding, cb)); + else + doWrite(stream, state, len, chunk, encoding, cb); + + return ret; +} + +function doWrite(stream, state, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + stream._write(chunk, encoding, state.onwrite); + state.sync = false; +} + +function onwriteError(stream, state, sync, er, cb) { + if (sync) + setImmediate(function() { + cb(er); + }); + else + cb(er); + + stream.emit('error', er); +} + +function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; +} + +function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + + onwriteStateUpdate(state); + + if (er) + onwriteError(stream, state, sync, er, cb); + else { + // Check if we're actually ready to finish, but don't emit yet + var finished = needFinish(stream, state); + + if (!finished && !state.bufferProcessing && state.buffer.length) + clearBuffer(stream, state); + + if (sync) { + setImmediate(function() { + afterWrite(stream, state, finished, cb); + }); + } else { + afterWrite(stream, state, finished, cb); + } + } +} + +function afterWrite(stream, state, finished, cb) { + if (!finished) + onwriteDrain(stream, state); + cb(); + if (finished) + finishMaybe(stream, state); +} + +// Must force callback to be called on nextTick, so that we don't +// emit 'drain' before the write() consumer gets the 'false' return +// value, and has a chance to attach a 'drain' listener. +function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit('drain'); + } +} + + +// if there's something in the buffer waiting, then process it +function clearBuffer(stream, state) { + state.bufferProcessing = true; + + for (var c = 0; c < state.buffer.length; c++) { + var entry = state.buffer[c]; + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + + doWrite(stream, state, len, chunk, encoding, cb); + + // if we didn't call the onwrite immediately, then + // it means that we need to wait until it does. + // also, that means that the chunk and cb are currently + // being processed, so move the buffer counter past them. + if (state.writing) { + c++; + break; + } + } + + state.bufferProcessing = false; + if (c < state.buffer.length) + state.buffer = state.buffer.slice(c); + else + state.buffer.length = 0; +} + +Writable.prototype._write = function(chunk, encoding, cb) { + cb(new Error('not implemented')); +}; + +Writable.prototype.end = function(chunk, encoding, cb) { + var state = this._writableState; + + if (typeof chunk === 'function') { + cb = chunk; + chunk = null; + encoding = null; + } else if (typeof encoding === 'function') { + cb = encoding; + encoding = null; + } + + if (typeof chunk !== 'undefined' && chunk !== null) + this.write(chunk, encoding); + + // ignore unnecessary end() calls. + if (!state.ending && !state.finished) + endWritable(this, state, cb); +}; + + +function needFinish(stream, state) { + return (state.ending && + state.length === 0 && + !state.finished && + !state.writing); +} + +function finishMaybe(stream, state) { + var need = needFinish(stream, state); + if (need) { + state.finished = true; + stream.emit('finish'); + } + return need; +} + +function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) + setImmediate(cb); + else + stream.once('finish', cb); + } + state.ended = true; +} + +},{"./index.js":13,"buffer":9,"inherits":7,"process/browser.js":14}],19:[function(require,module,exports){ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. + +var Buffer = require('buffer').Buffer; + +function assertEncoding(encoding) { + if (encoding && !Buffer.isEncoding(encoding)) { + throw new Error('Unknown encoding: ' + encoding); + } +} + +var StringDecoder = exports.StringDecoder = function(encoding) { + this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); + assertEncoding(encoding); + switch (this.encoding) { + case 'utf8': + // CESU-8 represents each of Surrogate Pair by 3-bytes + this.surrogateSize = 3; + break; + case 'ucs2': + case 'utf16le': + // UTF-16 represents each of Surrogate Pair by 2-bytes + this.surrogateSize = 2; + this.detectIncompleteChar = utf16DetectIncompleteChar; + break; + case 'base64': + // Base-64 stores 3 bytes in 4 chars, and pads the remainder. + this.surrogateSize = 3; + this.detectIncompleteChar = base64DetectIncompleteChar; + break; + default: + this.write = passThroughWrite; + return; + } + + this.charBuffer = new Buffer(6); + this.charReceived = 0; + this.charLength = 0; +}; + + +StringDecoder.prototype.write = function(buffer) { + var charStr = ''; + var offset = 0; + + // if our last write ended with an incomplete multibyte character + while (this.charLength) { + // determine how many remaining bytes this buffer has to offer for this char + var i = (buffer.length >= this.charLength - this.charReceived) ? + this.charLength - this.charReceived : + buffer.length; + + // add the new bytes to the char buffer + buffer.copy(this.charBuffer, this.charReceived, offset, i); + this.charReceived += (i - offset); + offset = i; + + if (this.charReceived < this.charLength) { + // still not enough chars in this buffer? wait for more ... + return ''; + } + + // get the character that was split + charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); + + // lead surrogate (D800-DBFF) is also the incomplete character + var charCode = charStr.charCodeAt(charStr.length - 1); + if (charCode >= 0xD800 && charCode <= 0xDBFF) { + this.charLength += this.surrogateSize; + charStr = ''; + continue; + } + this.charReceived = this.charLength = 0; + + // if there are no more bytes in this buffer, just emit our char + if (i == buffer.length) return charStr; + + // otherwise cut off the characters end from the beginning of this buffer + buffer = buffer.slice(i, buffer.length); + break; + } + + var lenIncomplete = this.detectIncompleteChar(buffer); + + var end = buffer.length; + if (this.charLength) { + // buffer the incomplete character bytes we got + buffer.copy(this.charBuffer, 0, buffer.length - lenIncomplete, end); + this.charReceived = lenIncomplete; + end -= lenIncomplete; + } + + charStr += buffer.toString(this.encoding, 0, end); + + var end = charStr.length - 1; + var charCode = charStr.charCodeAt(end); + // lead surrogate (D800-DBFF) is also the incomplete character + if (charCode >= 0xD800 && charCode <= 0xDBFF) { + var size = this.surrogateSize; + this.charLength += size; + this.charReceived += size; + this.charBuffer.copy(this.charBuffer, size, 0, size); + this.charBuffer.write(charStr.charAt(charStr.length - 1), this.encoding); + return charStr.substring(0, end); + } + + // or just emit the charStr + return charStr; +}; + +StringDecoder.prototype.detectIncompleteChar = function(buffer) { + // determine how many bytes we have to check at the end of this buffer + var i = (buffer.length >= 3) ? 3 : buffer.length; + + // Figure out if one of the last i bytes of our buffer announces an + // incomplete char. + for (; i > 0; i--) { + var c = buffer[buffer.length - i]; + + // See http://en.wikipedia.org/wiki/UTF-8#Description + + // 110XXXXX + if (i == 1 && c >> 5 == 0x06) { + this.charLength = 2; + break; + } + + // 1110XXXX + if (i <= 2 && c >> 4 == 0x0E) { + this.charLength = 3; + break; + } + + // 11110XXX + if (i <= 3 && c >> 3 == 0x1E) { + this.charLength = 4; + break; + } + } + + return i; +}; + +StringDecoder.prototype.end = function(buffer) { + var res = ''; + if (buffer && buffer.length) + res = this.write(buffer); + + if (this.charReceived) { + var cr = this.charReceived; + var buf = this.charBuffer; + var enc = this.encoding; + res += buf.slice(0, cr).toString(enc); + } + + return res; +}; + +function passThroughWrite(buffer) { + return buffer.toString(this.encoding); +} + +function utf16DetectIncompleteChar(buffer) { + var incomplete = this.charReceived = buffer.length % 2; + this.charLength = incomplete ? 2 : 0; + return incomplete; +} + +function base64DetectIncompleteChar(buffer) { + var incomplete = this.charReceived = buffer.length % 3; + this.charLength = incomplete ? 3 : 0; + return incomplete; +} + +},{"buffer":9}],20:[function(require,module,exports){ +module.exports = function isBuffer(arg) { + return arg && typeof arg === 'object' + && typeof arg.copy === 'function' + && typeof arg.fill === 'function' + && typeof arg.binarySlice === 'function' + ; +} + +},{}],21:[function(require,module,exports){ +var process=require("__browserify_process"),global=typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {};// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. + +var formatRegExp = /%[sdj%]/g; +exports.format = function(f) { + if (!isString(f)) { + var objects = []; + for (var i = 0; i < arguments.length; i++) { + objects.push(inspect(arguments[i])); + } + return objects.join(' '); + } + + var i = 1; + var args = arguments; + var len = args.length; + var str = String(f).replace(formatRegExp, function(x) { + if (x === '%%') return '%'; + if (i >= len) return x; + switch (x) { + case '%s': return String(args[i++]); + case '%d': return Number(args[i++]); + case '%j': + try { + return JSON.stringify(args[i++]); + } catch (_) { + return '[Circular]'; + } + default: + return x; + } + }); + for (var x = args[i]; i < len; x = args[++i]) { + if (isNull(x) || !isObject(x)) { + str += ' ' + x; + } else { + str += ' ' + inspect(x); + } + } + return str; +}; + + +// Mark that a method should not be used. +// Returns a modified function which warns once by default. +// If --no-deprecation is set, then it is a no-op. +exports.deprecate = function(fn, msg) { + // Allow for deprecating things in the process of starting up. + if (isUndefined(global.process)) { + return function() { + return exports.deprecate(fn, msg).apply(this, arguments); + }; + } + + if (process.noDeprecation === true) { + return fn; + } + + var warned = false; + function deprecated() { + if (!warned) { + if (process.throwDeprecation) { + throw new Error(msg); + } else if (process.traceDeprecation) { + console.trace(msg); + } else { + console.error(msg); + } + warned = true; + } + return fn.apply(this, arguments); + } + + return deprecated; +}; + + +var debugs = {}; +var debugEnviron; +exports.debuglog = function(set) { + if (isUndefined(debugEnviron)) + debugEnviron = process.env.NODE_DEBUG || ''; + set = set.toUpperCase(); + if (!debugs[set]) { + if (new RegExp('\\b' + set + '\\b', 'i').test(debugEnviron)) { + var pid = process.pid; + debugs[set] = function() { + var msg = exports.format.apply(exports, arguments); + console.error('%s %d: %s', set, pid, msg); + }; + } else { + debugs[set] = function() {}; + } + } + return debugs[set]; +}; + + +/** + * Echos the value of a value. Trys to print the value out + * in the best way possible given the different types. + * + * @param {Object} obj The object to print out. + * @param {Object} opts Optional options object that alters the output. + */ +/* legacy: obj, showHidden, depth, colors*/ +function inspect(obj, opts) { + // default options + var ctx = { + seen: [], + stylize: stylizeNoColor + }; + // legacy... + if (arguments.length >= 3) ctx.depth = arguments[2]; + if (arguments.length >= 4) ctx.colors = arguments[3]; + if (isBoolean(opts)) { + // legacy... + ctx.showHidden = opts; + } else if (opts) { + // got an "options" object + exports._extend(ctx, opts); + } + // set default options + if (isUndefined(ctx.showHidden)) ctx.showHidden = false; + if (isUndefined(ctx.depth)) ctx.depth = 2; + if (isUndefined(ctx.colors)) ctx.colors = false; + if (isUndefined(ctx.customInspect)) ctx.customInspect = true; + if (ctx.colors) ctx.stylize = stylizeWithColor; + return formatValue(ctx, obj, ctx.depth); +} +exports.inspect = inspect; + + +// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics +inspect.colors = { + 'bold' : [1, 22], + 'italic' : [3, 23], + 'underline' : [4, 24], + 'inverse' : [7, 27], + 'white' : [37, 39], + 'grey' : [90, 39], + 'black' : [30, 39], + 'blue' : [34, 39], + 'cyan' : [36, 39], + 'green' : [32, 39], + 'magenta' : [35, 39], + 'red' : [31, 39], + 'yellow' : [33, 39] +}; + +// Don't use 'blue' not visible on cmd.exe +inspect.styles = { + 'special': 'cyan', + 'number': 'yellow', + 'boolean': 'yellow', + 'undefined': 'grey', + 'null': 'bold', + 'string': 'green', + 'date': 'magenta', + // "name": intentionally not styling + 'regexp': 'red' +}; + + +function stylizeWithColor(str, styleType) { + var style = inspect.styles[styleType]; + + if (style) { + return '\u001b[' + inspect.colors[style][0] + 'm' + str + + '\u001b[' + inspect.colors[style][1] + 'm'; + } else { + return str; + } +} + + +function stylizeNoColor(str, styleType) { + return str; +} + + +function arrayToHash(array) { + var hash = {}; + + array.forEach(function(val, idx) { + hash[val] = true; + }); + + return hash; +} + + +function formatValue(ctx, value, recurseTimes) { + // Provide a hook for user-specified inspect functions. + // Check that value is an object with an inspect function on it + if (ctx.customInspect && + value && + isFunction(value.inspect) && + // Filter out the util module, it's inspect function is special + value.inspect !== exports.inspect && + // Also filter out any prototype objects using the circular check. + !(value.constructor && value.constructor.prototype === value)) { + var ret = value.inspect(recurseTimes, ctx); + if (!isString(ret)) { + ret = formatValue(ctx, ret, recurseTimes); + } + return ret; + } + + // Primitive types cannot have properties + var primitive = formatPrimitive(ctx, value); + if (primitive) { + return primitive; + } + + // Look up the keys of the object. + var keys = Object.keys(value); + var visibleKeys = arrayToHash(keys); + + if (ctx.showHidden) { + keys = Object.getOwnPropertyNames(value); + } + + // Some type of object without properties can be shortcutted. + if (keys.length === 0) { + if (isFunction(value)) { + var name = value.name ? ': ' + value.name : ''; + return ctx.stylize('[Function' + name + ']', 'special'); + } + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } + if (isDate(value)) { + return ctx.stylize(Date.prototype.toString.call(value), 'date'); + } + if (isError(value)) { + return formatError(value); + } + } + + var base = '', array = false, braces = ['{', '}']; + + // Make Array say that they are Array + if (isArray(value)) { + array = true; + braces = ['[', ']']; + } + + // Make functions say that they are functions + if (isFunction(value)) { + var n = value.name ? ': ' + value.name : ''; + base = ' [Function' + n + ']'; + } + + // Make RegExps say that they are RegExps + if (isRegExp(value)) { + base = ' ' + RegExp.prototype.toString.call(value); + } + + // Make dates with properties first say the date + if (isDate(value)) { + base = ' ' + Date.prototype.toUTCString.call(value); + } + + // Make error with message first say the error + if (isError(value)) { + base = ' ' + formatError(value); + } + + if (keys.length === 0 && (!array || value.length == 0)) { + return braces[0] + base + braces[1]; + } + + if (recurseTimes < 0) { + if (isRegExp(value)) { + return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp'); + } else { + return ctx.stylize('[Object]', 'special'); + } + } + + ctx.seen.push(value); + + var output; + if (array) { + output = formatArray(ctx, value, recurseTimes, visibleKeys, keys); + } else { + output = keys.map(function(key) { + return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array); + }); + } + + ctx.seen.pop(); + + return reduceToSingleString(output, base, braces); +} + + +function formatPrimitive(ctx, value) { + if (isUndefined(value)) + return ctx.stylize('undefined', 'undefined'); + if (isString(value)) { + var simple = '\'' + JSON.stringify(value).replace(/^"|"$/g, '') + .replace(/'/g, "\\'") + .replace(/\\"/g, '"') + '\''; + return ctx.stylize(simple, 'string'); + } + if (isNumber(value)) + return ctx.stylize('' + value, 'number'); + if (isBoolean(value)) + return ctx.stylize('' + value, 'boolean'); + // For some reason typeof null is "object", so special case here. + if (isNull(value)) + return ctx.stylize('null', 'null'); +} + + +function formatError(value) { + return '[' + Error.prototype.toString.call(value) + ']'; +} + + +function formatArray(ctx, value, recurseTimes, visibleKeys, keys) { + var output = []; + for (var i = 0, l = value.length; i < l; ++i) { + if (hasOwnProperty(value, String(i))) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + String(i), true)); + } else { + output.push(''); + } + } + keys.forEach(function(key) { + if (!key.match(/^\d+$/)) { + output.push(formatProperty(ctx, value, recurseTimes, visibleKeys, + key, true)); + } + }); + return output; +} + + +function formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) { + var name, str, desc; + desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] }; + if (desc.get) { + if (desc.set) { + str = ctx.stylize('[Getter/Setter]', 'special'); + } else { + str = ctx.stylize('[Getter]', 'special'); + } + } else { + if (desc.set) { + str = ctx.stylize('[Setter]', 'special'); + } + } + if (!hasOwnProperty(visibleKeys, key)) { + name = '[' + key + ']'; + } + if (!str) { + if (ctx.seen.indexOf(desc.value) < 0) { + if (isNull(recurseTimes)) { + str = formatValue(ctx, desc.value, null); + } else { + str = formatValue(ctx, desc.value, recurseTimes - 1); + } + if (str.indexOf('\n') > -1) { + if (array) { + str = str.split('\n').map(function(line) { + return ' ' + line; + }).join('\n').substr(2); + } else { + str = '\n' + str.split('\n').map(function(line) { + return ' ' + line; + }).join('\n'); + } + } + } else { + str = ctx.stylize('[Circular]', 'special'); + } + } + if (isUndefined(name)) { + if (array && key.match(/^\d+$/)) { + return str; + } + name = JSON.stringify('' + key); + if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { + name = name.substr(1, name.length - 2); + name = ctx.stylize(name, 'name'); + } else { + name = name.replace(/'/g, "\\'") + .replace(/\\"/g, '"') + .replace(/(^"|"$)/g, "'"); + name = ctx.stylize(name, 'string'); + } + } + + return name + ': ' + str; +} + + +function reduceToSingleString(output, base, braces) { + var numLinesEst = 0; + var length = output.reduce(function(prev, cur) { + numLinesEst++; + if (cur.indexOf('\n') >= 0) numLinesEst++; + return prev + cur.replace(/\u001b\[\d\d?m/g, '').length + 1; + }, 0); + + if (length > 60) { + return braces[0] + + (base === '' ? '' : base + '\n ') + + ' ' + + output.join(',\n ') + + ' ' + + braces[1]; + } + + return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1]; +} + + +// NOTE: These type checking functions intentionally don't use `instanceof` +// because it is fragile and can be easily faked with `Object.create()`. +function isArray(ar) { + return Array.isArray(ar); +} +exports.isArray = isArray; + +function isBoolean(arg) { + return typeof arg === 'boolean'; +} +exports.isBoolean = isBoolean; + +function isNull(arg) { + return arg === null; +} +exports.isNull = isNull; + +function isNullOrUndefined(arg) { + return arg == null; +} +exports.isNullOrUndefined = isNullOrUndefined; + +function isNumber(arg) { + return typeof arg === 'number'; +} +exports.isNumber = isNumber; + +function isString(arg) { + return typeof arg === 'string'; +} +exports.isString = isString; + +function isSymbol(arg) { + return typeof arg === 'symbol'; +} +exports.isSymbol = isSymbol; + +function isUndefined(arg) { + return arg === void 0; +} +exports.isUndefined = isUndefined; + +function isRegExp(re) { + return isObject(re) && objectToString(re) === '[object RegExp]'; +} +exports.isRegExp = isRegExp; + +function isObject(arg) { + return typeof arg === 'object' && arg !== null; +} +exports.isObject = isObject; + +function isDate(d) { + return isObject(d) && objectToString(d) === '[object Date]'; +} +exports.isDate = isDate; + +function isError(e) { + return isObject(e) && + (objectToString(e) === '[object Error]' || e instanceof Error); +} +exports.isError = isError; + +function isFunction(arg) { + return typeof arg === 'function'; +} +exports.isFunction = isFunction; + +function isPrimitive(arg) { + return arg === null || + typeof arg === 'boolean' || + typeof arg === 'number' || + typeof arg === 'string' || + typeof arg === 'symbol' || // ES6 symbol + typeof arg === 'undefined'; +} +exports.isPrimitive = isPrimitive; + +exports.isBuffer = require('./support/isBuffer'); + +function objectToString(o) { + return Object.prototype.toString.call(o); +} + + +function pad(n) { + return n < 10 ? '0' + n.toString(10) : n.toString(10); +} + + +var months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', + 'Oct', 'Nov', 'Dec']; + +// 26 Feb 16:19:34 +function timestamp() { + var d = new Date(); + var time = [pad(d.getHours()), + pad(d.getMinutes()), + pad(d.getSeconds())].join(':'); + return [d.getDate(), months[d.getMonth()], time].join(' '); +} + + +// log is just a thin wrapper to console.log that prepends a timestamp +exports.log = function() { + console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments)); +}; + + +/** + * Inherit the prototype methods from one constructor into another. + * + * The Function.prototype.inherits from lang.js rewritten as a standalone + * function (not on Function.prototype). NOTE: If this file is to be loaded + * during bootstrapping this function needs to be rewritten using some native + * functions as prototype setup using normal JavaScript does not work as + * expected during bootstrapping (see mirror.js in r114903). + * + * @param {function} ctor Constructor function which needs to inherit the + * prototype. + * @param {function} superCtor Constructor function to inherit prototype from. + */ +exports.inherits = require('inherits'); + +exports._extend = function(origin, add) { + // Don't do anything if add isn't an object + if (!add || !isObject(add)) return origin; + + var keys = Object.keys(add); + var i = keys.length; + while (i--) { + origin[keys[i]] = add[keys[i]]; + } + return origin; +}; + +function hasOwnProperty(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +} + +},{"./support/isBuffer":20,"__browserify_process":8,"inherits":7}],22:[function(require,module,exports){ +exports.parse = require('./lib/parse'); +exports.stringify = require('./lib/stringify'); + +},{"./lib/parse":23,"./lib/stringify":24}],23:[function(require,module,exports){ +var at, // The index of the current character + ch, // The current character + escapee = { + '"': '"', + '\\': '\\', + '/': '/', + b: '\b', + f: '\f', + n: '\n', + r: '\r', + t: '\t' + }, + text, + + error = function (m) { + // Call error when something is wrong. + throw { + name: 'SyntaxError', + message: m, + at: at, + text: text + }; + }, + + next = function (c) { + // If a c parameter is provided, verify that it matches the current character. + if (c && c !== ch) { + error("Expected '" + c + "' instead of '" + ch + "'"); + } + + // Get the next character. When there are no more characters, + // return the empty string. + + ch = text.charAt(at); + at += 1; + return ch; + }, + + number = function () { + // Parse a number value. + var number, + string = ''; + + if (ch === '-') { + string = '-'; + next('-'); + } + while (ch >= '0' && ch <= '9') { + string += ch; + next(); + } + if (ch === '.') { + string += '.'; + while (next() && ch >= '0' && ch <= '9') { + string += ch; + } + } + if (ch === 'e' || ch === 'E') { + string += ch; + next(); + if (ch === '-' || ch === '+') { + string += ch; + next(); + } + while (ch >= '0' && ch <= '9') { + string += ch; + next(); + } + } + number = +string; + if (!isFinite(number)) { + error("Bad number"); + } else { + return number; + } + }, + + string = function () { + // Parse a string value. + var hex, + i, + string = '', + uffff; + + // When parsing for string values, we must look for " and \ characters. + if (ch === '"') { + while (next()) { + if (ch === '"') { + next(); + return string; + } else if (ch === '\\') { + next(); + if (ch === 'u') { + uffff = 0; + for (i = 0; i < 4; i += 1) { + hex = parseInt(next(), 16); + if (!isFinite(hex)) { + break; + } + uffff = uffff * 16 + hex; + } + string += String.fromCharCode(uffff); + } else if (typeof escapee[ch] === 'string') { + string += escapee[ch]; + } else { + break; + } + } else { + string += ch; + } + } + } + error("Bad string"); + }, + + white = function () { + +// Skip whitespace. + + while (ch && ch <= ' ') { + next(); + } + }, + + word = function () { + +// true, false, or null. + + switch (ch) { + case 't': + next('t'); + next('r'); + next('u'); + next('e'); + return true; + case 'f': + next('f'); + next('a'); + next('l'); + next('s'); + next('e'); + return false; + case 'n': + next('n'); + next('u'); + next('l'); + next('l'); + return null; + } + error("Unexpected '" + ch + "'"); + }, + + value, // Place holder for the value function. + + array = function () { + +// Parse an array value. + + var array = []; + + if (ch === '[') { + next('['); + white(); + if (ch === ']') { + next(']'); + return array; // empty array + } + while (ch) { + array.push(value()); + white(); + if (ch === ']') { + next(']'); + return array; + } + next(','); + white(); + } + } + error("Bad array"); + }, + + object = function () { + +// Parse an object value. + + var key, + object = {}; + + if (ch === '{') { + next('{'); + white(); + if (ch === '}') { + next('}'); + return object; // empty object + } + while (ch) { + key = string(); + white(); + next(':'); + if (Object.hasOwnProperty.call(object, key)) { + error('Duplicate key "' + key + '"'); + } + object[key] = value(); + white(); + if (ch === '}') { + next('}'); + return object; + } + next(','); + white(); + } + } + error("Bad object"); + }; + +value = function () { + +// Parse a JSON value. It could be an object, an array, a string, a number, +// or a word. + + white(); + switch (ch) { + case '{': + return object(); + case '[': + return array(); + case '"': + return string(); + case '-': + return number(); + default: + return ch >= '0' && ch <= '9' ? number() : word(); + } +}; + +// Return the json_parse function. It will have access to all of the above +// functions and variables. + +module.exports = function (source, reviver) { + var result; + + text = source; + at = 0; + ch = ' '; + result = value(); + white(); + if (ch) { + error("Syntax error"); + } + + // If there is a reviver function, we recursively walk the new structure, + // passing each name/value pair to the reviver function for possible + // transformation, starting with a temporary root object that holds the result + // in an empty key. If there is not a reviver function, we simply return the + // result. + + return typeof reviver === 'function' ? (function walk(holder, key) { + var k, v, value = holder[key]; + if (value && typeof value === 'object') { + for (k in value) { + if (Object.prototype.hasOwnProperty.call(value, k)) { + v = walk(value, k); + if (v !== undefined) { + value[k] = v; + } else { + delete value[k]; + } + } + } + } + return reviver.call(holder, key, value); + }({'': result}, '')) : result; +}; + +},{}],24:[function(require,module,exports){ +var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, + escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, + gap, + indent, + meta = { // table of character substitutions + '\b': '\\b', + '\t': '\\t', + '\n': '\\n', + '\f': '\\f', + '\r': '\\r', + '"' : '\\"', + '\\': '\\\\' + }, + rep; + +function quote(string) { + // If the string contains no control characters, no quote characters, and no + // backslash characters, then we can safely slap some quotes around it. + // Otherwise we must also replace the offending characters with safe escape + // sequences. + + escapable.lastIndex = 0; + return escapable.test(string) ? '"' + string.replace(escapable, function (a) { + var c = meta[a]; + return typeof c === 'string' ? c : + '\\u' + ('0000' + a.charCodeAt(0).toString(16)).slice(-4); + }) + '"' : '"' + string + '"'; +} + +function str(key, holder) { + // Produce a string from holder[key]. + var i, // The loop counter. + k, // The member key. + v, // The member value. + length, + mind = gap, + partial, + value = holder[key]; + + // If the value has a toJSON method, call it to obtain a replacement value. + if (value && typeof value === 'object' && + typeof value.toJSON === 'function') { + value = value.toJSON(key); + } + + // If we were called with a replacer function, then call the replacer to + // obtain a replacement value. + if (typeof rep === 'function') { + value = rep.call(holder, key, value); + } + + // What happens next depends on the value's type. + switch (typeof value) { + case 'string': + return quote(value); + + case 'number': + // JSON numbers must be finite. Encode non-finite numbers as null. + return isFinite(value) ? String(value) : 'null'; + + case 'boolean': + case 'null': + // If the value is a boolean or null, convert it to a string. Note: + // typeof null does not produce 'null'. The case is included here in + // the remote chance that this gets fixed someday. + return String(value); + + case 'object': + if (!value) return 'null'; + gap += indent; + partial = []; + + // Array.isArray + if (Object.prototype.toString.apply(value) === '[object Array]') { + length = value.length; + for (i = 0; i < length; i += 1) { + partial[i] = str(i, value) || 'null'; + } + + // Join all of the elements together, separated with commas, and + // wrap them in brackets. + v = partial.length === 0 ? '[]' : gap ? + '[\n' + gap + partial.join(',\n' + gap) + '\n' + mind + ']' : + '[' + partial.join(',') + ']'; + gap = mind; + return v; + } + + // If the replacer is an array, use it to select the members to be + // stringified. + if (rep && typeof rep === 'object') { + length = rep.length; + for (i = 0; i < length; i += 1) { + k = rep[i]; + if (typeof k === 'string') { + v = str(k, value); + if (v) { + partial.push(quote(k) + (gap ? ': ' : ':') + v); + } + } + } + } + else { + // Otherwise, iterate through all of the keys in the object. + for (k in value) { + if (Object.prototype.hasOwnProperty.call(value, k)) { + v = str(k, value); + if (v) { + partial.push(quote(k) + (gap ? ': ' : ':') + v); + } + } + } + } + + // Join all of the member texts together, separated with commas, + // and wrap them in braces. + + v = partial.length === 0 ? '{}' : gap ? + '{\n' + gap + partial.join(',\n' + gap) + '\n' + mind + '}' : + '{' + partial.join(',') + '}'; + gap = mind; + return v; + } +} + +module.exports = function (value, replacer, space) { + var i; + gap = ''; + indent = ''; + + // If the space parameter is a number, make an indent string containing that + // many spaces. + if (typeof space === 'number') { + for (i = 0; i < space; i += 1) { + indent += ' '; + } + } + // If the space parameter is a string, it will be used as the indent string. + else if (typeof space === 'string') { + indent = space; + } + + // If there is a replacer, it must be a function or an array. + // Otherwise, throw an error. + rep = replacer; + if (replacer && typeof replacer !== 'function' + && (typeof replacer !== 'object' || typeof replacer.length !== 'number')) { + throw new Error('JSON.stringify'); + } + + // Make a fake root object containing our value under the key of ''. + // Return the result of stringifying the value. + return str('', {'': value}); +}; + +},{}],25:[function(require,module,exports){ +var http = require('http'); +var Stream = require('stream'); +var encode = typeof encodeURIComponent !== 'undefined' + ? encodeURIComponent : escape +; + +module.exports = function (opts) { + if (typeof opts === 'string') { + opts = { path : opts }; + } + if (!opts) opts = {}; + if (!opts.id) { + opts.id = Math.floor(Math.pow(16, 8) * Math.random()).toString(16); + } + + var stream = new Stream; + stream.writable = true; + stream.order = 0; + + stream.write = function (msg) { + if (stream.ended) return; + var data = 'order=' + stream.order + + '&data=' + encode(msg) + + '&id=' + encode(opts.id) + ; + stream.order ++; + send(data); + }; + + stream.destroy = function () { + stream.ended = true; + stream.emit('close'); + }; + + stream.end = function (msg) { + if (stream.ended) return; + + var data = 'order=' + stream.order + + '&id=' + encode(opts.id) + + '&end=true' + ; + if (msg !== undefined) data += '&data=' + encode(msg); + stream.order ++; + send(data); + stream.ended = true; + stream.emit('close'); + }; + + function send (data) { + var params = { + method : 'POST', + host : opts.host || window.location.hostname, + port : opts.port || window.location.port, + path : opts.path || '/', + headers : { + 'content-type' : 'application/x-www-form-urlencoded' + } + }; + var req = http.request(params); + req.end(data); + } + + return stream +}; + +},{"http":3,"stream":13}]},{},[1]) +; diff --git a/pitfall/pdfkit/node_modules/http-browserify/lib/request.js b/pitfall/pdfkit/node_modules/http-browserify/lib/request.js new file mode 100644 index 00000000..7c0a4678 --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/lib/request.js @@ -0,0 +1,189 @@ +var Stream = require('stream'); +var Response = require('./response'); +var Base64 = require('Base64'); +var inherits = require('inherits'); + +var Request = module.exports = function (xhr, params) { + var self = this; + self.writable = true; + self.xhr = xhr; + self.body = []; + + self.uri = (params.scheme || 'http') + '://' + + params.host + + (params.port ? ':' + params.port : '') + + (params.path || '/') + ; + + if (typeof params.withCredentials === 'undefined') { + params.withCredentials = true; + } + + try { xhr.withCredentials = params.withCredentials } + catch (e) {} + + xhr.open( + params.method || 'GET', + self.uri, + true + ); + + self._headers = {}; + + if (params.headers) { + var keys = objectKeys(params.headers); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + if (!self.isSafeRequestHeader(key)) continue; + var value = params.headers[key]; + self.setHeader(key, value); + } + } + + if (params.auth) { + //basic auth + this.setHeader('Authorization', 'Basic ' + Base64.btoa(params.auth)); + } + + var res = new Response; + res.on('close', function () { + self.emit('close'); + }); + + res.on('ready', function () { + self.emit('response', res); + }); + + xhr.onreadystatechange = function () { + // Fix for IE9 bug + // SCRIPT575: Could not complete the operation due to error c00c023f + // It happens when a request is aborted, calling the success callback anyway with readyState === 4 + if (xhr.__aborted) return; + res.handle(xhr); + }; +}; + +inherits(Request, Stream); + +Request.prototype.setHeader = function (key, value) { + this._headers[key.toLowerCase()] = value +}; + +Request.prototype.getHeader = function (key) { + return this._headers[key.toLowerCase()] +}; + +Request.prototype.removeHeader = function (key) { + delete this._headers[key.toLowerCase()] +}; + +Request.prototype.write = function (s) { + this.body.push(s); +}; + +Request.prototype.destroy = function (s) { + this.xhr.__aborted = true; + this.xhr.abort(); + this.emit('close'); +}; + +Request.prototype.end = function (s) { + if (s !== undefined) this.body.push(s); + + var keys = objectKeys(this._headers); + for (var i = 0; i < keys.length; i++) { + var key = keys[i]; + var value = this._headers[key]; + if (isArray(value)) { + for (var j = 0; j < value.length; j++) { + this.xhr.setRequestHeader(key, value[j]); + } + } + else this.xhr.setRequestHeader(key, value) + } + + if (this.body.length === 0) { + this.xhr.send(''); + } + else if (typeof this.body[0] === 'string') { + this.xhr.send(this.body.join('')); + } + else if (isArray(this.body[0])) { + var body = []; + for (var i = 0; i < this.body.length; i++) { + body.push.apply(body, this.body[i]); + } + this.xhr.send(body); + } + else if (/Array/.test(Object.prototype.toString.call(this.body[0]))) { + var len = 0; + for (var i = 0; i < this.body.length; i++) { + len += this.body[i].length; + } + var body = new(this.body[0].constructor)(len); + var k = 0; + + for (var i = 0; i < this.body.length; i++) { + var b = this.body[i]; + for (var j = 0; j < b.length; j++) { + body[k++] = b[j]; + } + } + this.xhr.send(body); + } + else { + var body = ''; + for (var i = 0; i < this.body.length; i++) { + body += this.body[i].toString(); + } + this.xhr.send(body); + } +}; + +// Taken from http://dxr.mozilla.org/mozilla/mozilla-central/content/base/src/nsXMLHttpRequest.cpp.html +Request.unsafeHeaders = [ + "accept-charset", + "accept-encoding", + "access-control-request-headers", + "access-control-request-method", + "connection", + "content-length", + "cookie", + "cookie2", + "content-transfer-encoding", + "date", + "expect", + "host", + "keep-alive", + "origin", + "referer", + "te", + "trailer", + "transfer-encoding", + "upgrade", + "user-agent", + "via" +]; + +Request.prototype.isSafeRequestHeader = function (headerName) { + if (!headerName) return false; + return indexOf(Request.unsafeHeaders, headerName.toLowerCase()) === -1; +}; + +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) keys.push(key); + return keys; +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; + +var indexOf = function (xs, x) { + if (xs.indexOf) return xs.indexOf(x); + for (var i = 0; i < xs.length; i++) { + if (xs[i] === x) return i; + } + return -1; +}; diff --git a/pitfall/pdfkit/node_modules/http-browserify/lib/response.js b/pitfall/pdfkit/node_modules/http-browserify/lib/response.js new file mode 100644 index 00000000..f83d7616 --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/lib/response.js @@ -0,0 +1,120 @@ +var Stream = require('stream'); +var util = require('util'); + +var Response = module.exports = function (res) { + this.offset = 0; + this.readable = true; +}; + +util.inherits(Response, Stream); + +var capable = { + streaming : true, + status2 : true +}; + +function parseHeaders (res) { + var lines = res.getAllResponseHeaders().split(/\r?\n/); + var headers = {}; + for (var i = 0; i < lines.length; i++) { + var line = lines[i]; + if (line === '') continue; + + var m = line.match(/^([^:]+):\s*(.*)/); + if (m) { + var key = m[1].toLowerCase(), value = m[2]; + + if (headers[key] !== undefined) { + + if (isArray(headers[key])) { + headers[key].push(value); + } + else { + headers[key] = [ headers[key], value ]; + } + } + else { + headers[key] = value; + } + } + else { + headers[line] = true; + } + } + return headers; +} + +Response.prototype.getResponse = function (xhr) { + var respType = String(xhr.responseType).toLowerCase(); + if (respType === 'blob') return xhr.responseBlob || xhr.response; + if (respType === 'arraybuffer') return xhr.response; + return xhr.responseText; +} + +Response.prototype.getHeader = function (key) { + return this.headers[key.toLowerCase()]; +}; + +Response.prototype.handle = function (res) { + if (res.readyState === 2 && capable.status2) { + try { + this.statusCode = res.status; + this.headers = parseHeaders(res); + } + catch (err) { + capable.status2 = false; + } + + if (capable.status2) { + this.emit('ready'); + } + } + else if (capable.streaming && res.readyState === 3) { + try { + if (!this.statusCode) { + this.statusCode = res.status; + this.headers = parseHeaders(res); + this.emit('ready'); + } + } + catch (err) {} + + try { + this._emitData(res); + } + catch (err) { + capable.streaming = false; + } + } + else if (res.readyState === 4) { + if (!this.statusCode) { + this.statusCode = res.status; + this.emit('ready'); + } + this._emitData(res); + + if (res.error) { + this.emit('error', this.getResponse(res)); + } + else this.emit('end'); + + this.emit('close'); + } +}; + +Response.prototype._emitData = function (res) { + var respBody = this.getResponse(res); + if (respBody.toString().match(/ArrayBuffer/)) { + this.emit('data', new Uint8Array(respBody, this.offset)); + this.offset = respBody.byteLength; + return; + } + if (respBody.length > this.offset) { + this.emit('data', respBody.slice(this.offset)); + this.offset = respBody.length; + } +}; + +var isArray = Array.isArray || function (xs) { + return Object.prototype.toString.call(xs) === '[object Array]'; +}; diff --git a/pitfall/pdfkit/node_modules/http-browserify/package.json b/pitfall/pdfkit/node_modules/http-browserify/package.json new file mode 100644 index 00000000..6e045ee6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/package.json @@ -0,0 +1,97 @@ +{ + "_args": [ + [ + { + "raw": "http-browserify@~1.3.1", + "scope": null, + "escapedName": "http-browserify", + "name": "http-browserify", + "rawSpec": "~1.3.1", + "spec": ">=1.3.1 <1.4.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/browserify" + ] + ], + "_from": "http-browserify@>=1.3.1 <1.4.0", + "_id": "http-browserify@1.3.2", + "_inCache": true, + "_location": "/http-browserify", + "_npmUser": { + "name": "substack", + "email": "mail@substack.net" + }, + "_npmVersion": "1.4.3", + "_phantomChildren": {}, + "_requested": { + "raw": "http-browserify@~1.3.1", + "scope": null, + "escapedName": "http-browserify", + "name": "http-browserify", + "rawSpec": "~1.3.1", + "spec": ">=1.3.1 <1.4.0", + "type": "range" + }, + "_requiredBy": [ + "/browserify" + ], + "_resolved": "https://registry.npmjs.org/http-browserify/-/http-browserify-1.3.2.tgz", + "_shasum": "b562c34479349a690d7a6597df495aefa8c604f5", + "_shrinkwrap": null, + "_spec": "http-browserify@~1.3.1", + "_where": "/Users/MB/git/pdfkit/node_modules/browserify", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "browserify": "index.js", + "bugs": { + "url": "https://github.com/substack/http-browserify/issues" + }, + "dependencies": { + "Base64": "~0.2.0", + "inherits": "~2.0.1" + }, + "description": "http module compatability for browserify", + "devDependencies": { + "ecstatic": "~0.1.6", + "tape": "~2.3.2" + }, + "directories": { + "lib": ".", + "example": "example", + "test": "test" + }, + "dist": { + "shasum": "b562c34479349a690d7a6597df495aefa8c604f5", + "tarball": "https://registry.npmjs.org/http-browserify/-/http-browserify-1.3.2.tgz" + }, + "homepage": "https://github.com/substack/http-browserify", + "keywords": [ + "http", + "browserify", + "compatible", + "meatless", + "browser" + ], + "license": "MIT/X11", + "main": "index.js", + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "name": "http-browserify", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/substack/http-browserify.git" + }, + "scripts": { + "test": "tape test/*.js" + }, + "version": "1.3.2" +} diff --git a/pitfall/pdfkit/node_modules/http-browserify/readme.markdown b/pitfall/pdfkit/node_modules/http-browserify/readme.markdown new file mode 100644 index 00000000..d151caae --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/readme.markdown @@ -0,0 +1,138 @@ +http-browserify +=============== + +The +[http](http://nodejs.org/docs/v0.4.10/api/all.html#hTTP) module from node.js, +but for browsers. + +When you `require('http')` in +[browserify](http://github.com/substack/node-browserify), +this module will be loaded. + +example +======= + +````javascript +var http = require('http'); + +http.get({ path : '/beep' }, function (res) { + var div = document.getElementById('result'); + div.innerHTML += 'GET /beep
    '; + + res.on('data', function (buf) { + div.innerHTML += buf; + }); + + res.on('end', function () { + div.innerHTML += '
    __END__'; + }); +}); +```` + +http methods +============ + +var http = require('http'); + +var req = http.request(options, cb) +----------------------------------- + +`options` can have: + +* method +* path +* headers={}, as an object mapping key names to string or Array values +* host=window.location.host +* port=window.location.port + +The callback will be called with the response object. + +var req = http.get(options, cb) +------------------------------- + +A shortcut for + +````javascript +options.method = 'GET'; +var req = http.request(options, cb); +req.end(); +```` + +request methods +=============== + +req.setHeader(key, value) +------------------------- + +Set an http header. + +req.getHeader(key) +------------------------- + +Get an http header. + +req.removeHeader(key) +------------------------- + +Remove an http header. + +req.write(data) +--------------- + +Write some data to the request body. + +req.end(data) +------------- + +Close and send the request body, optionally with additional `data` to append. + +response methods +================ + +res.getHeader(key) +------------------ + +Return an http header, if set. `key` is case-insensitive. + +response attributes +=================== + +* res.statusCode, the numeric http response code +* res.headers, an object with all lowercase keys + +response events +--------------- + +* data +* end +* error + +compatibility +============= + +This module has been tested and works with: + +* Internet Explorer 5.5, 6, 7, 8, 9 +* Firefox 3.5 +* Chrome 7.0 +* Opera 10.6 +* Safari 5.0 + +Multipart streaming responses are buffered in all versions of Internet Explorer +and are somewhat buffered in Opera. In all the other browsers you get a nice +unbuffered stream of `"data"` events when you send down a content-type of +`multipart/octet-stream` or similar. + +protip +====== + +You can do: + +````javascript +var bundle = browserify({ + require : { http : 'http-browserify' } +}); +```` + +in order to map "http-browserify" over `require('http')` in your browserified +source. diff --git a/pitfall/pdfkit/node_modules/http-browserify/test/request_url.js b/pitfall/pdfkit/node_modules/http-browserify/test/request_url.js new file mode 100644 index 00000000..e6224197 --- /dev/null +++ b/pitfall/pdfkit/node_modules/http-browserify/test/request_url.js @@ -0,0 +1,74 @@ +global.window = { + location: { + host: 'localhost:8081', + port: 8081, + protocol: 'http:' + } +}; + +var noop = function() {}; +global.window.XMLHttpRequest = function() { + this.open = noop; + this.send = noop; +}; + +var test = require('tape').test; +var http = require('../index.js'); + + +test('Test simple url string', function(t) { + var url = { path: '/api/foo' }; + var request = http.get(url, noop); + + t.equal( request.uri, 'http://localhost:8081/api/foo', 'Url should be correct'); + t.end(); + +}); + + +test('Test full url object', function(t) { + var url = { + host: "localhost:8081", + hostname: "localhost", + href: "http://localhost:8081/api/foo?bar=baz", + method: "GET", + path: "/api/foo?bar=baz", + pathname: "/api/foo", + port: "8081", + protocol: "http:", + query: "bar=baz", + search: "?bar=baz", + slashes: true + }; + + var request = http.get(url, noop); + + t.equal( request.uri, 'http://localhost:8081/api/foo?bar=baz', 'Url should be correct'); + t.end(); + +}); + + +test('Test string as parameters', function(t) { + var url = '/api/foo'; + var request = http.get(url, noop); + + t.equal( request.uri, 'http://localhost:8081/api/foo', 'Url should be correct'); + t.end(); + +}); + +test('Test withCredentials param', function(t) { + var url = '/api/foo'; + + var request = http.request({ url: url, withCredentials: false }, noop); + t.equal( request.xhr.withCredentials, false, 'xhr.withCredentials should be false'); + + var request = http.request({ url: url, withCredentials: true }, noop); + t.equal( request.xhr.withCredentials, true, 'xhr.withCredentials should be true'); + + var request = http.request({ url: url }, noop); + t.equal( request.xhr.withCredentials, true, 'xhr.withCredentials should be true'); + + t.end(); +}); diff --git a/pitfall/pdfkit/node_modules/https-browserify/LICENSE b/pitfall/pdfkit/node_modules/https-browserify/LICENSE new file mode 100644 index 00000000..ee27ba4b --- /dev/null +++ b/pitfall/pdfkit/node_modules/https-browserify/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/https-browserify/index.js b/pitfall/pdfkit/node_modules/https-browserify/index.js new file mode 100644 index 00000000..85355325 --- /dev/null +++ b/pitfall/pdfkit/node_modules/https-browserify/index.js @@ -0,0 +1,14 @@ +var http = require('http'); + +var https = module.exports; + +for (var key in http) { + if (http.hasOwnProperty(key)) https[key] = http[key]; +}; + +https.request = function (params, cb) { + if (!params) params = {}; + params.scheme = 'https'; + params.protocol = 'https:'; + return http.request.call(this, params, cb); +} diff --git a/pitfall/pdfkit/node_modules/https-browserify/package.json b/pitfall/pdfkit/node_modules/https-browserify/package.json new file mode 100644 index 00000000..2d252777 --- /dev/null +++ b/pitfall/pdfkit/node_modules/https-browserify/package.json @@ -0,0 +1,92 @@ +{ + "_args": [ + [ + { + "raw": "https-browserify@~0.0.0", + "scope": null, + "escapedName": "https-browserify", + "name": "https-browserify", + "rawSpec": "~0.0.0", + "spec": ">=0.0.0 <0.1.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/browserify" + ] + ], + "_from": "https-browserify@>=0.0.0 <0.1.0", + "_id": "https-browserify@0.0.1", + "_inCache": true, + "_location": "/https-browserify", + "_nodeVersion": "1.8.4", + "_npmUser": { + "name": "feross", + "email": "feross@feross.org" + }, + "_npmVersion": "2.9.0", + "_phantomChildren": {}, + "_requested": { + "raw": "https-browserify@~0.0.0", + "scope": null, + "escapedName": "https-browserify", + "name": "https-browserify", + "rawSpec": "~0.0.0", + "spec": ">=0.0.0 <0.1.0", + "type": "range" + }, + "_requiredBy": [ + "/browserify" + ], + "_resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz", + "_shasum": "3f91365cabe60b77ed0ebba24b454e3e09d95a82", + "_shrinkwrap": null, + "_spec": "https-browserify@~0.0.0", + "_where": "/Users/MB/git/pdfkit/node_modules/browserify", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/substack/https-browserify/issues" + }, + "dependencies": {}, + "description": "https module compatability for browserify", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "3f91365cabe60b77ed0ebba24b454e3e09d95a82", + "tarball": "https://registry.npmjs.org/https-browserify/-/https-browserify-0.0.1.tgz" + }, + "gitHead": "7ce43143cc6dd3e5576a977fd49d7e25f35bfdb8", + "homepage": "https://github.com/substack/https-browserify", + "keywords": [ + "https", + "browser", + "browserify" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "feross", + "email": "feross@feross.org" + }, + { + "name": "ptarjan", + "email": "npm@paulisageek.com" + }, + { + "name": "substack", + "email": "substack@gmail.com" + } + ], + "name": "https-browserify", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/substack/https-browserify.git" + }, + "scripts": {}, + "version": "0.0.1" +} diff --git a/pitfall/pdfkit/node_modules/https-browserify/readme.markdown b/pitfall/pdfkit/node_modules/https-browserify/readme.markdown new file mode 100644 index 00000000..8638614f --- /dev/null +++ b/pitfall/pdfkit/node_modules/https-browserify/readme.markdown @@ -0,0 +1,22 @@ +# https-browserify + +https module compatability for browserify + +# example + +``` js +var https = require('https-browserify'); +var r = https.request('https://github.com'); +r.on('request', function (res) { + console.log(res); +}); +``` + +# methods + +The API is the same as the client portion of the +[node core https module](http://nodejs.org/docs/latest/api/https.html). + +# license + +MIT diff --git a/pitfall/pdfkit/node_modules/iconv-lite/.npmignore b/pitfall/pdfkit/node_modules/iconv-lite/.npmignore new file mode 100644 index 00000000..5cd2673c --- /dev/null +++ b/pitfall/pdfkit/node_modules/iconv-lite/.npmignore @@ -0,0 +1,6 @@ +*~ +*sublime-* +generation +test +wiki +coverage diff --git a/pitfall/pdfkit/node_modules/iconv-lite/.travis.yml b/pitfall/pdfkit/node_modules/iconv-lite/.travis.yml new file mode 100644 index 00000000..0e82b1e8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/iconv-lite/.travis.yml @@ -0,0 +1,22 @@ + sudo: false + language: node_js + node_js: + - "0.10" + - "0.11" + - "0.12" + - "iojs" + - "4" + - "6" + - "node" + + + env: + - CXX=g++-4.8 + addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - gcc-4.8 + - g++-4.8 + diff --git a/pitfall/pdfkit/node_modules/iconv-lite/Changelog.md b/pitfall/pdfkit/node_modules/iconv-lite/Changelog.md new file mode 100644 index 00000000..6dcc346b --- /dev/null +++ b/pitfall/pdfkit/node_modules/iconv-lite/Changelog.md @@ -0,0 +1,122 @@ + +# 0.4.17 / 2017-04-22 + + * Updated typescript definition file to support Angular 2 AoT mode (#153 by @larssn) + + +# 0.4.16 / 2017-04-22 + + * Added support for React Native (#150) + * Changed iso8859-1 encoding to usine internal 'binary' encoding, as it's the same thing (#147 by @mscdex) + * Fixed typo in Readme (#138 by @jiangzhuo) + * Fixed build for Node v6.10+ by making correct version comparison + * Added a warning if iconv-lite is loaded not as utf-8 (see #142) + + +# 0.4.15 / 2016-11-21 + + * Fixed typescript type definition (#137) + + +# 0.4.14 / 2016-11-20 + + * Preparation for v1.0 + * Added Node v6 and latest Node versions to Travis CI test rig + * Deprecated Node v0.8 support + * Typescript typings (@larssn) + * Fix encoding of Euro character in GB 18030 (inspired by @lygstate) + * Add ms prefix to dbcs windows encodings (@rokoroku) + + +# 0.4.13 / 2015-10-01 + + * Fix silly mistake in deprecation notice. + + +# 0.4.12 / 2015-09-26 + + * Node v4 support: + * Added CESU-8 decoding (#106) + * Added deprecation notice for `extendNodeEncodings` + * Added Travis tests for Node v4 and io.js latest (#105 by @Mithgol) + + +# 0.4.11 / 2015-07-03 + + * Added CESU-8 encoding. + + +# 0.4.10 / 2015-05-26 + + * Changed UTF-16 endianness heuristic to take into account any ASCII chars, not + just spaces. This should minimize the importance of "default" endianness. + + +# 0.4.9 / 2015-05-24 + + * Streamlined BOM handling: strip BOM by default, add BOM when encoding if + addBOM: true. Added docs to Readme. + * UTF16 now uses UTF16-LE by default. + * Fixed minor issue with big5 encoding. + * Added io.js testing on Travis; updated node-iconv version to test against. + Now we just skip testing SBCS encodings that node-iconv doesn't support. + * (internal refactoring) Updated codec interface to use classes. + * Use strict mode in all files. + + +# 0.4.8 / 2015-04-14 + + * added alias UNICODE-1-1-UTF-7 for UTF-7 encoding (#94) + + +# 0.4.7 / 2015-02-05 + + * stop official support of Node.js v0.8. Should still work, but no guarantees. + reason: Packages needed for testing are hard to get on Travis CI. + * work in environment where Object.prototype is monkey patched with enumerable + props (#89). + + +# 0.4.6 / 2015-01-12 + + * fix rare aliases of single-byte encodings (thanks @mscdex) + * double the timeout for dbcs tests to make them less flaky on travis + + +# 0.4.5 / 2014-11-20 + + * fix windows-31j and x-sjis encoding support (@nleush) + * minor fix: undefined variable reference when internal error happens + + +# 0.4.4 / 2014-07-16 + + * added encodings UTF-7 (RFC2152) and UTF-7-IMAP (RFC3501 Section 5.1.3) + * fixed streaming base64 encoding + + +# 0.4.3 / 2014-06-14 + + * added encodings UTF-16BE and UTF-16 with BOM + + +# 0.4.2 / 2014-06-12 + + * don't throw exception if `extendNodeEncodings()` is called more than once + + +# 0.4.1 / 2014-06-11 + + * codepage 808 added + + +# 0.4.0 / 2014-06-10 + + * code is rewritten from scratch + * all widespread encodings are supported + * streaming interface added + * browserify compatibility added + * (optional) extend core primitive encodings to make usage even simpler + * moved from vows to mocha as the testing framework + + diff --git a/pitfall/pdfkit/node_modules/iconv-lite/LICENSE b/pitfall/pdfkit/node_modules/iconv-lite/LICENSE new file mode 100644 index 00000000..d518d837 --- /dev/null +++ b/pitfall/pdfkit/node_modules/iconv-lite/LICENSE @@ -0,0 +1,21 @@ +Copyright (c) 2011 Alexander Shtuchkin + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +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. + diff --git a/pitfall/pdfkit/node_modules/iconv-lite/README.md b/pitfall/pdfkit/node_modules/iconv-lite/README.md new file mode 100644 index 00000000..767daede --- /dev/null +++ b/pitfall/pdfkit/node_modules/iconv-lite/README.md @@ -0,0 +1,160 @@ +## Pure JS character encoding conversion [![Build Status](https://travis-ci.org/ashtuchkin/iconv-lite.svg?branch=master)](https://travis-ci.org/ashtuchkin/iconv-lite) + + * Doesn't need native code compilation. Works on Windows and in sandboxed environments like [Cloud9](http://c9.io). + * Used in popular projects like [Express.js (body_parser)](https://github.com/expressjs/body-parser), + [Grunt](http://gruntjs.com/), [Nodemailer](http://www.nodemailer.com/), [Yeoman](http://yeoman.io/) and others. + * Faster than [node-iconv](https://github.com/bnoordhuis/node-iconv) (see below for performance comparison). + * Intuitive encode/decode API + * Streaming support for Node v0.10+ + * [Deprecated] Can extend Node.js primitives (buffers, streams) to support all iconv-lite encodings. + * In-browser usage via [Browserify](https://github.com/substack/node-browserify) (~180k gzip compressed with Buffer shim included). + * Typescript [type definition file](https://github.com/ashtuchkin/iconv-lite/blob/master/lib/index.d.ts) included. + * React Native is supported (need to explicitly `npm install` two more modules: `buffer` and `stream`). + * License: MIT. + +[![NPM Stats](https://nodei.co/npm/iconv-lite.png?downloads=true&downloadRank=true)](https://npmjs.org/packages/iconv-lite/) + +## Usage +### Basic API +```javascript +var iconv = require('iconv-lite'); + +// Convert from an encoded buffer to js string. +str = iconv.decode(new Buffer([0x68, 0x65, 0x6c, 0x6c, 0x6f]), 'win1251'); + +// Convert from js string to an encoded buffer. +buf = iconv.encode("Sample input string", 'win1251'); + +// Check if encoding is supported +iconv.encodingExists("us-ascii") +``` + +### Streaming API (Node v0.10+) +```javascript + +// Decode stream (from binary stream to js strings) +http.createServer(function(req, res) { + var converterStream = iconv.decodeStream('win1251'); + req.pipe(converterStream); + + converterStream.on('data', function(str) { + console.log(str); // Do something with decoded strings, chunk-by-chunk. + }); +}); + +// Convert encoding streaming example +fs.createReadStream('file-in-win1251.txt') + .pipe(iconv.decodeStream('win1251')) + .pipe(iconv.encodeStream('ucs2')) + .pipe(fs.createWriteStream('file-in-ucs2.txt')); + +// Sugar: all encode/decode streams have .collect(cb) method to accumulate data. +http.createServer(function(req, res) { + req.pipe(iconv.decodeStream('win1251')).collect(function(err, body) { + assert(typeof body == 'string'); + console.log(body); // full request body string + }); +}); +``` + +### [Deprecated] Extend Node.js own encodings +> NOTE: This doesn't work on latest Node versions. See [details](https://github.com/ashtuchkin/iconv-lite/wiki/Node-v4-compatibility). + +```javascript +// After this call all Node basic primitives will understand iconv-lite encodings. +iconv.extendNodeEncodings(); + +// Examples: +buf = new Buffer(str, 'win1251'); +buf.write(str, 'gbk'); +str = buf.toString('latin1'); +assert(Buffer.isEncoding('iso-8859-15')); +Buffer.byteLength(str, 'us-ascii'); + +http.createServer(function(req, res) { + req.setEncoding('big5'); + req.collect(function(err, body) { + console.log(body); + }); +}); + +fs.createReadStream("file.txt", "shift_jis"); + +// External modules are also supported (if they use Node primitives, which they probably do). +request = require('request'); +request({ + url: "http://github.com/", + encoding: "cp932" +}); + +// To remove extensions +iconv.undoExtendNodeEncodings(); +``` + +## Supported encodings + + * All node.js native encodings: utf8, ucs2 / utf16-le, ascii, binary, base64, hex. + * Additional unicode encodings: utf16, utf16-be, utf-7, utf-7-imap. + * All widespread singlebyte encodings: Windows 125x family, ISO-8859 family, + IBM/DOS codepages, Macintosh family, KOI8 family, all others supported by iconv library. + Aliases like 'latin1', 'us-ascii' also supported. + * All widespread multibyte encodings: CP932, CP936, CP949, CP950, GB2312, GBK, GB18030, Big5, Shift_JIS, EUC-JP. + +See [all supported encodings on wiki](https://github.com/ashtuchkin/iconv-lite/wiki/Supported-Encodings). + +Most singlebyte encodings are generated automatically from [node-iconv](https://github.com/bnoordhuis/node-iconv). Thank you Ben Noordhuis and libiconv authors! + +Multibyte encodings are generated from [Unicode.org mappings](http://www.unicode.org/Public/MAPPINGS/) and [WHATWG Encoding Standard mappings](http://encoding.spec.whatwg.org/). Thank you, respective authors! + + +## Encoding/decoding speed + +Comparison with node-iconv module (1000x256kb, on MacBook Pro, Core i5/2.6 GHz, Node v0.12.0). +Note: your results may vary, so please always check on your hardware. + + operation iconv@2.1.4 iconv-lite@0.4.7 + ---------------------------------------------------------- + encode('win1251') ~96 Mb/s ~320 Mb/s + decode('win1251') ~95 Mb/s ~246 Mb/s + +## BOM handling + + * Decoding: BOM is stripped by default, unless overridden by passing `stripBOM: false` in options + (f.ex. `iconv.decode(buf, enc, {stripBOM: false})`). + A callback might also be given as a `stripBOM` parameter - it'll be called if BOM character was actually found. + * If you want to detect UTF-8 BOM when decoding other encodings, use [node-autodetect-decoder-stream](https://github.com/danielgindi/node-autodetect-decoder-stream) module. + * Encoding: No BOM added, unless overridden by `addBOM: true` option. + +## UTF-16 Encodings + +This library supports UTF-16LE, UTF-16BE and UTF-16 encodings. First two are straightforward, but UTF-16 is trying to be +smart about endianness in the following ways: + * Decoding: uses BOM and 'spaces heuristic' to determine input endianness. Default is UTF-16LE, but can be + overridden with `defaultEncoding: 'utf-16be'` option. Strips BOM unless `stripBOM: false`. + * Encoding: uses UTF-16LE and writes BOM by default. Use `addBOM: false` to override. + +## Other notes + +When decoding, be sure to supply a Buffer to decode() method, otherwise [bad things usually happen](https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding). +Untranslatable characters are set to � or ?. No transliteration is currently supported. +Node versions 0.10.31 and 0.11.13 are buggy, don't use them (see #65, #77). + +## Testing + +```bash +$ git clone git@github.com:ashtuchkin/iconv-lite.git +$ cd iconv-lite +$ npm install +$ npm test + +$ # To view performance: +$ node test/performance.js + +$ # To view test coverage: +$ npm run coverage +$ open coverage/lcov-report/index.html +``` + +## Adoption +[![NPM](https://nodei.co/npm-dl/iconv-lite.png)](https://nodei.co/npm/iconv-lite/) +[![Codeship Status for ashtuchkin/iconv-lite](https://www.codeship.com/projects/81670840-fa72-0131-4520-4a01a6c01acc/status)](https://www.codeship.com/projects/29053) diff --git a/pitfall/pdfkit/node_modules/iconv-lite/encodings/dbcs-codec.js b/pitfall/pdfkit/node_modules/iconv-lite/encodings/dbcs-codec.js new file mode 100644 index 00000000..7b3c980b --- /dev/null +++ b/pitfall/pdfkit/node_modules/iconv-lite/encodings/dbcs-codec.js @@ -0,0 +1,555 @@ +"use strict"; +var Buffer = require("buffer").Buffer; + +// Multibyte codec. In this scheme, a character is represented by 1 or more bytes. +// Our codec supports UTF-16 surrogates, extensions for GB18030 and unicode sequences. +// To save memory and loading time, we read table files only when requested. + +exports._dbcs = DBCSCodec; + +var UNASSIGNED = -1, + GB18030_CODE = -2, + SEQ_START = -10, + NODE_START = -1000, + UNASSIGNED_NODE = new Array(0x100), + DEF_CHAR = -1; + +for (var i = 0; i < 0x100; i++) + UNASSIGNED_NODE[i] = UNASSIGNED; + + +// Class DBCSCodec reads and initializes mapping tables. +function DBCSCodec(codecOptions, iconv) { + this.encodingName = codecOptions.encodingName; + if (!codecOptions) + throw new Error("DBCS codec is called without the data.") + if (!codecOptions.table) + throw new Error("Encoding '" + this.encodingName + "' has no data."); + + // Load tables. + var mappingTable = codecOptions.table(); + + + // Decode tables: MBCS -> Unicode. + + // decodeTables is a trie, encoded as an array of arrays of integers. Internal arrays are trie nodes and all have len = 256. + // Trie root is decodeTables[0]. + // Values: >= 0 -> unicode character code. can be > 0xFFFF + // == UNASSIGNED -> unknown/unassigned sequence. + // == GB18030_CODE -> this is the end of a GB18030 4-byte sequence. + // <= NODE_START -> index of the next node in our trie to process next byte. + // <= SEQ_START -> index of the start of a character code sequence, in decodeTableSeq. + this.decodeTables = []; + this.decodeTables[0] = UNASSIGNED_NODE.slice(0); // Create root node. + + // Sometimes a MBCS char corresponds to a sequence of unicode chars. We store them as arrays of integers here. + this.decodeTableSeq = []; + + // Actual mapping tables consist of chunks. Use them to fill up decode tables. + for (var i = 0; i < mappingTable.length; i++) + this._addDecodeChunk(mappingTable[i]); + + this.defaultCharUnicode = iconv.defaultCharUnicode; + + + // Encode tables: Unicode -> DBCS. + + // `encodeTable` is array mapping from unicode char to encoded char. All its values are integers for performance. + // Because it can be sparse, it is represented as array of buckets by 256 chars each. Bucket can be null. + // Values: >= 0 -> it is a normal char. Write the value (if <=256 then 1 byte, if <=65536 then 2 bytes, etc.). + // == UNASSIGNED -> no conversion found. Output a default char. + // <= SEQ_START -> it's an index in encodeTableSeq, see below. The character starts a sequence. + this.encodeTable = []; + + // `encodeTableSeq` is used when a sequence of unicode characters is encoded as a single code. We use a tree of + // objects where keys correspond to characters in sequence and leafs are the encoded dbcs values. A special DEF_CHAR key + // means end of sequence (needed when one sequence is a strict subsequence of another). + // Objects are kept separately from encodeTable to increase performance. + this.encodeTableSeq = []; + + // Some chars can be decoded, but need not be encoded. + var skipEncodeChars = {}; + if (codecOptions.encodeSkipVals) + for (var i = 0; i < codecOptions.encodeSkipVals.length; i++) { + var val = codecOptions.encodeSkipVals[i]; + if (typeof val === 'number') + skipEncodeChars[val] = true; + else + for (var j = val.from; j <= val.to; j++) + skipEncodeChars[j] = true; + } + + // Use decode trie to recursively fill out encode tables. + this._fillEncodeTable(0, 0, skipEncodeChars); + + // Add more encoding pairs when needed. + if (codecOptions.encodeAdd) { + for (var uChar in codecOptions.encodeAdd) + if (Object.prototype.hasOwnProperty.call(codecOptions.encodeAdd, uChar)) + this._setEncodeChar(uChar.charCodeAt(0), codecOptions.encodeAdd[uChar]); + } + + this.defCharSB = this.encodeTable[0][iconv.defaultCharSingleByte.charCodeAt(0)]; + if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]['?']; + if (this.defCharSB === UNASSIGNED) this.defCharSB = "?".charCodeAt(0); + + + // Load & create GB18030 tables when needed. + if (typeof codecOptions.gb18030 === 'function') { + this.gb18030 = codecOptions.gb18030(); // Load GB18030 ranges. + + // Add GB18030 decode tables. + var thirdByteNodeIdx = this.decodeTables.length; + var thirdByteNode = this.decodeTables[thirdByteNodeIdx] = UNASSIGNED_NODE.slice(0); + + var fourthByteNodeIdx = this.decodeTables.length; + var fourthByteNode = this.decodeTables[fourthByteNodeIdx] = UNASSIGNED_NODE.slice(0); + + for (var i = 0x81; i <= 0xFE; i++) { + var secondByteNodeIdx = NODE_START - this.decodeTables[0][i]; + var secondByteNode = this.decodeTables[secondByteNodeIdx]; + for (var j = 0x30; j <= 0x39; j++) + secondByteNode[j] = NODE_START - thirdByteNodeIdx; + } + for (var i = 0x81; i <= 0xFE; i++) + thirdByteNode[i] = NODE_START - fourthByteNodeIdx; + for (var i = 0x30; i <= 0x39; i++) + fourthByteNode[i] = GB18030_CODE + } +} + +DBCSCodec.prototype.encoder = DBCSEncoder; +DBCSCodec.prototype.decoder = DBCSDecoder; + +// Decoder helpers +DBCSCodec.prototype._getDecodeTrieNode = function(addr) { + var bytes = []; + for (; addr > 0; addr >>= 8) + bytes.push(addr & 0xFF); + if (bytes.length == 0) + bytes.push(0); + + var node = this.decodeTables[0]; + for (var i = bytes.length-1; i > 0; i--) { // Traverse nodes deeper into the trie. + var val = node[bytes[i]]; + + if (val == UNASSIGNED) { // Create new node. + node[bytes[i]] = NODE_START - this.decodeTables.length; + this.decodeTables.push(node = UNASSIGNED_NODE.slice(0)); + } + else if (val <= NODE_START) { // Existing node. + node = this.decodeTables[NODE_START - val]; + } + else + throw new Error("Overwrite byte in " + this.encodingName + ", addr: " + addr.toString(16)); + } + return node; +} + + +DBCSCodec.prototype._addDecodeChunk = function(chunk) { + // First element of chunk is the hex mbcs code where we start. + var curAddr = parseInt(chunk[0], 16); + + // Choose the decoding node where we'll write our chars. + var writeTable = this._getDecodeTrieNode(curAddr); + curAddr = curAddr & 0xFF; + + // Write all other elements of the chunk to the table. + for (var k = 1; k < chunk.length; k++) { + var part = chunk[k]; + if (typeof part === "string") { // String, write as-is. + for (var l = 0; l < part.length;) { + var code = part.charCodeAt(l++); + if (0xD800 <= code && code < 0xDC00) { // Decode surrogate + var codeTrail = part.charCodeAt(l++); + if (0xDC00 <= codeTrail && codeTrail < 0xE000) + writeTable[curAddr++] = 0x10000 + (code - 0xD800) * 0x400 + (codeTrail - 0xDC00); + else + throw new Error("Incorrect surrogate pair in " + this.encodingName + " at chunk " + chunk[0]); + } + else if (0x0FF0 < code && code <= 0x0FFF) { // Character sequence (our own encoding used) + var len = 0xFFF - code + 2; + var seq = []; + for (var m = 0; m < len; m++) + seq.push(part.charCodeAt(l++)); // Simple variation: don't support surrogates or subsequences in seq. + + writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length; + this.decodeTableSeq.push(seq); + } + else + writeTable[curAddr++] = code; // Basic char + } + } + else if (typeof part === "number") { // Integer, meaning increasing sequence starting with prev character. + var charCode = writeTable[curAddr - 1] + 1; + for (var l = 0; l < part; l++) + writeTable[curAddr++] = charCode++; + } + else + throw new Error("Incorrect type '" + typeof part + "' given in " + this.encodingName + " at chunk " + chunk[0]); + } + if (curAddr > 0xFF) + throw new Error("Incorrect chunk in " + this.encodingName + " at addr " + chunk[0] + ": too long" + curAddr); +} + +// Encoder helpers +DBCSCodec.prototype._getEncodeBucket = function(uCode) { + var high = uCode >> 8; // This could be > 0xFF because of astral characters. + if (this.encodeTable[high] === undefined) + this.encodeTable[high] = UNASSIGNED_NODE.slice(0); // Create bucket on demand. + return this.encodeTable[high]; +} + +DBCSCodec.prototype._setEncodeChar = function(uCode, dbcsCode) { + var bucket = this._getEncodeBucket(uCode); + var low = uCode & 0xFF; + if (bucket[low] <= SEQ_START) + this.encodeTableSeq[SEQ_START-bucket[low]][DEF_CHAR] = dbcsCode; // There's already a sequence, set a single-char subsequence of it. + else if (bucket[low] == UNASSIGNED) + bucket[low] = dbcsCode; +} + +DBCSCodec.prototype._setEncodeSequence = function(seq, dbcsCode) { + + // Get the root of character tree according to first character of the sequence. + var uCode = seq[0]; + var bucket = this._getEncodeBucket(uCode); + var low = uCode & 0xFF; + + var node; + if (bucket[low] <= SEQ_START) { + // There's already a sequence with - use it. + node = this.encodeTableSeq[SEQ_START-bucket[low]]; + } + else { + // There was no sequence object - allocate a new one. + node = {}; + if (bucket[low] !== UNASSIGNED) node[DEF_CHAR] = bucket[low]; // If a char was set before - make it a single-char subsequence. + bucket[low] = SEQ_START - this.encodeTableSeq.length; + this.encodeTableSeq.push(node); + } + + // Traverse the character tree, allocating new nodes as needed. + for (var j = 1; j < seq.length-1; j++) { + var oldVal = node[uCode]; + if (typeof oldVal === 'object') + node = oldVal; + else { + node = node[uCode] = {} + if (oldVal !== undefined) + node[DEF_CHAR] = oldVal + } + } + + // Set the leaf to given dbcsCode. + uCode = seq[seq.length-1]; + node[uCode] = dbcsCode; +} + +DBCSCodec.prototype._fillEncodeTable = function(nodeIdx, prefix, skipEncodeChars) { + var node = this.decodeTables[nodeIdx]; + for (var i = 0; i < 0x100; i++) { + var uCode = node[i]; + var mbCode = prefix + i; + if (skipEncodeChars[mbCode]) + continue; + + if (uCode >= 0) + this._setEncodeChar(uCode, mbCode); + else if (uCode <= NODE_START) + this._fillEncodeTable(NODE_START - uCode, mbCode << 8, skipEncodeChars); + else if (uCode <= SEQ_START) + this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode); + } +} + + + +// == Encoder ================================================================== + +function DBCSEncoder(options, codec) { + // Encoder state + this.leadSurrogate = -1; + this.seqObj = undefined; + + // Static data + this.encodeTable = codec.encodeTable; + this.encodeTableSeq = codec.encodeTableSeq; + this.defaultCharSingleByte = codec.defCharSB; + this.gb18030 = codec.gb18030; +} + +DBCSEncoder.prototype.write = function(str) { + var newBuf = new Buffer(str.length * (this.gb18030 ? 4 : 3)), + leadSurrogate = this.leadSurrogate, + seqObj = this.seqObj, nextChar = -1, + i = 0, j = 0; + + while (true) { + // 0. Get next character. + if (nextChar === -1) { + if (i == str.length) break; + var uCode = str.charCodeAt(i++); + } + else { + var uCode = nextChar; + nextChar = -1; + } + + // 1. Handle surrogates. + if (0xD800 <= uCode && uCode < 0xE000) { // Char is one of surrogates. + if (uCode < 0xDC00) { // We've got lead surrogate. + if (leadSurrogate === -1) { + leadSurrogate = uCode; + continue; + } else { + leadSurrogate = uCode; + // Double lead surrogate found. + uCode = UNASSIGNED; + } + } else { // We've got trail surrogate. + if (leadSurrogate !== -1) { + uCode = 0x10000 + (leadSurrogate - 0xD800) * 0x400 + (uCode - 0xDC00); + leadSurrogate = -1; + } else { + // Incomplete surrogate pair - only trail surrogate found. + uCode = UNASSIGNED; + } + + } + } + else if (leadSurrogate !== -1) { + // Incomplete surrogate pair - only lead surrogate found. + nextChar = uCode; uCode = UNASSIGNED; // Write an error, then current char. + leadSurrogate = -1; + } + + // 2. Convert uCode character. + var dbcsCode = UNASSIGNED; + if (seqObj !== undefined && uCode != UNASSIGNED) { // We are in the middle of the sequence + var resCode = seqObj[uCode]; + if (typeof resCode === 'object') { // Sequence continues. + seqObj = resCode; + continue; + + } else if (typeof resCode == 'number') { // Sequence finished. Write it. + dbcsCode = resCode; + + } else if (resCode == undefined) { // Current character is not part of the sequence. + + // Try default character for this sequence + resCode = seqObj[DEF_CHAR]; + if (resCode !== undefined) { + dbcsCode = resCode; // Found. Write it. + nextChar = uCode; // Current character will be written too in the next iteration. + + } else { + // TODO: What if we have no default? (resCode == undefined) + // Then, we should write first char of the sequence as-is and try the rest recursively. + // Didn't do it for now because no encoding has this situation yet. + // Currently, just skip the sequence and write current char. + } + } + seqObj = undefined; + } + else if (uCode >= 0) { // Regular character + var subtable = this.encodeTable[uCode >> 8]; + if (subtable !== undefined) + dbcsCode = subtable[uCode & 0xFF]; + + if (dbcsCode <= SEQ_START) { // Sequence start + seqObj = this.encodeTableSeq[SEQ_START-dbcsCode]; + continue; + } + + if (dbcsCode == UNASSIGNED && this.gb18030) { + // Use GB18030 algorithm to find character(s) to write. + var idx = findIdx(this.gb18030.uChars, uCode); + if (idx != -1) { + var dbcsCode = this.gb18030.gbChars[idx] + (uCode - this.gb18030.uChars[idx]); + newBuf[j++] = 0x81 + Math.floor(dbcsCode / 12600); dbcsCode = dbcsCode % 12600; + newBuf[j++] = 0x30 + Math.floor(dbcsCode / 1260); dbcsCode = dbcsCode % 1260; + newBuf[j++] = 0x81 + Math.floor(dbcsCode / 10); dbcsCode = dbcsCode % 10; + newBuf[j++] = 0x30 + dbcsCode; + continue; + } + } + } + + // 3. Write dbcsCode character. + if (dbcsCode === UNASSIGNED) + dbcsCode = this.defaultCharSingleByte; + + if (dbcsCode < 0x100) { + newBuf[j++] = dbcsCode; + } + else if (dbcsCode < 0x10000) { + newBuf[j++] = dbcsCode >> 8; // high byte + newBuf[j++] = dbcsCode & 0xFF; // low byte + } + else { + newBuf[j++] = dbcsCode >> 16; + newBuf[j++] = (dbcsCode >> 8) & 0xFF; + newBuf[j++] = dbcsCode & 0xFF; + } + } + + this.seqObj = seqObj; + this.leadSurrogate = leadSurrogate; + return newBuf.slice(0, j); +} + +DBCSEncoder.prototype.end = function() { + if (this.leadSurrogate === -1 && this.seqObj === undefined) + return; // All clean. Most often case. + + var newBuf = new Buffer(10), j = 0; + + if (this.seqObj) { // We're in the sequence. + var dbcsCode = this.seqObj[DEF_CHAR]; + if (dbcsCode !== undefined) { // Write beginning of the sequence. + if (dbcsCode < 0x100) { + newBuf[j++] = dbcsCode; + } + else { + newBuf[j++] = dbcsCode >> 8; // high byte + newBuf[j++] = dbcsCode & 0xFF; // low byte + } + } else { + // See todo above. + } + this.seqObj = undefined; + } + + if (this.leadSurrogate !== -1) { + // Incomplete surrogate pair - only lead surrogate found. + newBuf[j++] = this.defaultCharSingleByte; + this.leadSurrogate = -1; + } + + return newBuf.slice(0, j); +} + +// Export for testing +DBCSEncoder.prototype.findIdx = findIdx; + + +// == Decoder ================================================================== + +function DBCSDecoder(options, codec) { + // Decoder state + this.nodeIdx = 0; + this.prevBuf = new Buffer(0); + + // Static data + this.decodeTables = codec.decodeTables; + this.decodeTableSeq = codec.decodeTableSeq; + this.defaultCharUnicode = codec.defaultCharUnicode; + this.gb18030 = codec.gb18030; +} + +DBCSDecoder.prototype.write = function(buf) { + var newBuf = new Buffer(buf.length*2), + nodeIdx = this.nodeIdx, + prevBuf = this.prevBuf, prevBufOffset = this.prevBuf.length, + seqStart = -this.prevBuf.length, // idx of the start of current parsed sequence. + uCode; + + if (prevBufOffset > 0) // Make prev buf overlap a little to make it easier to slice later. + prevBuf = Buffer.concat([prevBuf, buf.slice(0, 10)]); + + for (var i = 0, j = 0; i < buf.length; i++) { + var curByte = (i >= 0) ? buf[i] : prevBuf[i + prevBufOffset]; + + // Lookup in current trie node. + var uCode = this.decodeTables[nodeIdx][curByte]; + + if (uCode >= 0) { + // Normal character, just use it. + } + else if (uCode === UNASSIGNED) { // Unknown char. + // TODO: Callback with seq. + //var curSeq = (seqStart >= 0) ? buf.slice(seqStart, i+1) : prevBuf.slice(seqStart + prevBufOffset, i+1 + prevBufOffset); + i = seqStart; // Try to parse again, after skipping first byte of the sequence ('i' will be incremented by 'for' cycle). + uCode = this.defaultCharUnicode.charCodeAt(0); + } + else if (uCode === GB18030_CODE) { + var curSeq = (seqStart >= 0) ? buf.slice(seqStart, i+1) : prevBuf.slice(seqStart + prevBufOffset, i+1 + prevBufOffset); + var ptr = (curSeq[0]-0x81)*12600 + (curSeq[1]-0x30)*1260 + (curSeq[2]-0x81)*10 + (curSeq[3]-0x30); + var idx = findIdx(this.gb18030.gbChars, ptr); + uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx]; + } + else if (uCode <= NODE_START) { // Go to next trie node. + nodeIdx = NODE_START - uCode; + continue; + } + else if (uCode <= SEQ_START) { // Output a sequence of chars. + var seq = this.decodeTableSeq[SEQ_START - uCode]; + for (var k = 0; k < seq.length - 1; k++) { + uCode = seq[k]; + newBuf[j++] = uCode & 0xFF; + newBuf[j++] = uCode >> 8; + } + uCode = seq[seq.length-1]; + } + else + throw new Error("iconv-lite internal error: invalid decoding table value " + uCode + " at " + nodeIdx + "/" + curByte); + + // Write the character to buffer, handling higher planes using surrogate pair. + if (uCode > 0xFFFF) { + uCode -= 0x10000; + var uCodeLead = 0xD800 + Math.floor(uCode / 0x400); + newBuf[j++] = uCodeLead & 0xFF; + newBuf[j++] = uCodeLead >> 8; + + uCode = 0xDC00 + uCode % 0x400; + } + newBuf[j++] = uCode & 0xFF; + newBuf[j++] = uCode >> 8; + + // Reset trie node. + nodeIdx = 0; seqStart = i+1; + } + + this.nodeIdx = nodeIdx; + this.prevBuf = (seqStart >= 0) ? buf.slice(seqStart) : prevBuf.slice(seqStart + prevBufOffset); + return newBuf.slice(0, j).toString('ucs2'); +} + +DBCSDecoder.prototype.end = function() { + var ret = ''; + + // Try to parse all remaining chars. + while (this.prevBuf.length > 0) { + // Skip 1 character in the buffer. + ret += this.defaultCharUnicode; + var buf = this.prevBuf.slice(1); + + // Parse remaining as usual. + this.prevBuf = new Buffer(0); + this.nodeIdx = 0; + if (buf.length > 0) + ret += this.write(buf); + } + + this.nodeIdx = 0; + return ret; +} + +// Binary search for GB18030. Returns largest i such that table[i] <= val. +function findIdx(table, val) { + if (table[0] > val) + return -1; + + var l = 0, r = table.length; + while (l < r-1) { // always table[l] <= val < table[r] + var mid = l + Math.floor((r-l+1)/2); + if (table[mid] <= val) + l = mid; + else + r = mid; + } + return l; +} + diff --git a/pitfall/pdfkit/node_modules/iconv-lite/encodings/dbcs-data.js b/pitfall/pdfkit/node_modules/iconv-lite/encodings/dbcs-data.js new file mode 100644 index 00000000..4b619143 --- /dev/null +++ b/pitfall/pdfkit/node_modules/iconv-lite/encodings/dbcs-data.js @@ -0,0 +1,176 @@ +"use strict"; + +// Description of supported double byte encodings and aliases. +// Tables are not require()-d until they are needed to speed up library load. +// require()-s are direct to support Browserify. + +module.exports = { + + // == Japanese/ShiftJIS ==================================================== + // All japanese encodings are based on JIS X set of standards: + // JIS X 0201 - Single-byte encoding of ASCII + ¥ + Kana chars at 0xA1-0xDF. + // JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes. + // Has several variations in 1978, 1983, 1990 and 1997. + // JIS X 0212 - Supplementary plane of 6067 chars in 94x94 plane. 1990. Effectively dead. + // JIS X 0213 - Extension and modern replacement of 0208 and 0212. Total chars: 11233. + // 2 planes, first is superset of 0208, second - revised 0212. + // Introduced in 2000, revised 2004. Some characters are in Unicode Plane 2 (0x2xxxx) + + // Byte encodings are: + // * Shift_JIS: Compatible with 0201, uses not defined chars in top half as lead bytes for double-byte + // encoding of 0208. Lead byte ranges: 0x81-0x9F, 0xE0-0xEF; Trail byte ranges: 0x40-0x7E, 0x80-0x9E, 0x9F-0xFC. + // Windows CP932 is a superset of Shift_JIS. Some companies added more chars, notably KDDI. + // * EUC-JP: Up to 3 bytes per character. Used mostly on *nixes. + // 0x00-0x7F - lower part of 0201 + // 0x8E, 0xA1-0xDF - upper part of 0201 + // (0xA1-0xFE)x2 - 0208 plane (94x94). + // 0x8F, (0xA1-0xFE)x2 - 0212 plane (94x94). + // * JIS X 208: 7-bit, direct encoding of 0208. Byte ranges: 0x21-0x7E (94 values). Uncommon. + // Used as-is in ISO2022 family. + // * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII, + // 0201-1976 Roman, 0208-1978, 0208-1983. + // * ISO2022-JP-1: Adds esc seq for 0212-1990. + // * ISO2022-JP-2: Adds esc seq for GB2313-1980, KSX1001-1992, ISO8859-1, ISO8859-7. + // * ISO2022-JP-3: Adds esc seq for 0201-1976 Kana set, 0213-2000 Planes 1, 2. + // * ISO2022-JP-2004: Adds 0213-2004 Plane 1. + // + // After JIS X 0213 appeared, Shift_JIS-2004, EUC-JISX0213 and ISO2022-JP-2004 followed, with just changing the planes. + // + // Overall, it seems that it's a mess :( http://www8.plala.or.jp/tkubota1/unicode-symbols-map2.html + + 'shiftjis': { + type: '_dbcs', + table: function() { return require('./tables/shiftjis.json') }, + encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E}, + encodeSkipVals: [{from: 0xED40, to: 0xF940}], + }, + 'csshiftjis': 'shiftjis', + 'mskanji': 'shiftjis', + 'sjis': 'shiftjis', + 'windows31j': 'shiftjis', + 'ms31j': 'shiftjis', + 'xsjis': 'shiftjis', + 'windows932': 'shiftjis', + 'ms932': 'shiftjis', + '932': 'shiftjis', + 'cp932': 'shiftjis', + + 'eucjp': { + type: '_dbcs', + table: function() { return require('./tables/eucjp.json') }, + encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E}, + }, + + // TODO: KDDI extension to Shift_JIS + // TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes. + // TODO: IBM CCSID 943 = Shift_JIS = CP932 with original Shift_JIS lower 128 chars. + + + // == Chinese/GBK ========================================================== + // http://en.wikipedia.org/wiki/GBK + // We mostly implement W3C recommendation: https://www.w3.org/TR/encoding/#gbk-encoder + + // Oldest GB2312 (1981, ~7600 chars) is a subset of CP936 + 'gb2312': 'cp936', + 'gb231280': 'cp936', + 'gb23121980': 'cp936', + 'csgb2312': 'cp936', + 'csiso58gb231280': 'cp936', + 'euccn': 'cp936', + + // Microsoft's CP936 is a subset and approximation of GBK. + 'windows936': 'cp936', + 'ms936': 'cp936', + '936': 'cp936', + 'cp936': { + type: '_dbcs', + table: function() { return require('./tables/cp936.json') }, + }, + + // GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other. + 'gbk': { + type: '_dbcs', + table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) }, + }, + 'xgbk': 'gbk', + 'isoir58': 'gbk', + + // GB18030 is an algorithmic extension of GBK. + // Main source: https://www.w3.org/TR/encoding/#gbk-encoder + // http://icu-project.org/docs/papers/gb18030.html + // http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml + // http://www.khngai.com/chinese/charmap/tblgbk.php?page=0 + 'gb18030': { + type: '_dbcs', + table: function() { return require('./tables/cp936.json').concat(require('./tables/gbk-added.json')) }, + gb18030: function() { return require('./tables/gb18030-ranges.json') }, + encodeSkipVals: [0x80], + encodeAdd: {'€': 0xA2E3}, + }, + + 'chinese': 'gb18030', + + + // == Korean =============================================================== + // EUC-KR, KS_C_5601 and KS X 1001 are exactly the same. + 'windows949': 'cp949', + 'ms949': 'cp949', + '949': 'cp949', + 'cp949': { + type: '_dbcs', + table: function() { return require('./tables/cp949.json') }, + }, + + 'cseuckr': 'cp949', + 'csksc56011987': 'cp949', + 'euckr': 'cp949', + 'isoir149': 'cp949', + 'korean': 'cp949', + 'ksc56011987': 'cp949', + 'ksc56011989': 'cp949', + 'ksc5601': 'cp949', + + + // == Big5/Taiwan/Hong Kong ================================================ + // There are lots of tables for Big5 and cp950. Please see the following links for history: + // http://moztw.org/docs/big5/ http://www.haible.de/bruno/charsets/conversion-tables/Big5.html + // Variations, in roughly number of defined chars: + // * Windows CP 950: Microsoft variant of Big5. Canonical: http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT + // * Windows CP 951: Microsoft variant of Big5-HKSCS-2001. Seems to be never public. http://me.abelcheung.org/articles/research/what-is-cp951/ + // * Big5-2003 (Taiwan standard) almost superset of cp950. + // * Unicode-at-on (UAO) / Mozilla 1.8. Falling out of use on the Web. Not supported by other browsers. + // * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard. + // many unicode code points moved from PUA to Supplementary plane (U+2XXXX) over the years. + // Plus, it has 4 combining sequences. + // Seems that Mozilla refused to support it for 10 yrs. https://bugzilla.mozilla.org/show_bug.cgi?id=162431 https://bugzilla.mozilla.org/show_bug.cgi?id=310299 + // because big5-hkscs is the only encoding to include astral characters in non-algorithmic way. + // Implementations are not consistent within browsers; sometimes labeled as just big5. + // MS Internet Explorer switches from big5 to big5-hkscs when a patch applied. + // Great discussion & recap of what's going on https://bugzilla.mozilla.org/show_bug.cgi?id=912470#c31 + // In the encoder, it might make sense to support encoding old PUA mappings to Big5 bytes seq-s. + // Official spec: http://www.ogcio.gov.hk/en/business/tech_promotion/ccli/terms/doc/2003cmp_2008.txt + // http://www.ogcio.gov.hk/tc/business/tech_promotion/ccli/terms/doc/hkscs-2008-big5-iso.txt + // + // Current understanding of how to deal with Big5(-HKSCS) is in the Encoding Standard, http://encoding.spec.whatwg.org/#big5-encoder + // Unicode mapping (http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT) is said to be wrong. + + 'windows950': 'cp950', + 'ms950': 'cp950', + '950': 'cp950', + 'cp950': { + type: '_dbcs', + table: function() { return require('./tables/cp950.json') }, + }, + + // Big5 has many variations and is an extension of cp950. We use Encoding Standard's as a consensus. + 'big5': 'big5hkscs', + 'big5hkscs': { + type: '_dbcs', + table: function() { return require('./tables/cp950.json').concat(require('./tables/big5-added.json')) }, + encodeSkipVals: [0xa2cc], + }, + + 'cnbig5': 'big5hkscs', + 'csbig5': 'big5hkscs', + 'xxbig5': 'big5hkscs', +}; diff --git a/pitfall/pdfkit/node_modules/iconv-lite/encodings/index.js b/pitfall/pdfkit/node_modules/iconv-lite/encodings/index.js new file mode 100644 index 00000000..e3040031 --- /dev/null +++ b/pitfall/pdfkit/node_modules/iconv-lite/encodings/index.js @@ -0,0 +1,22 @@ +"use strict"; + +// Update this array if you add/rename/remove files in this directory. +// We support Browserify by skipping automatic module discovery and requiring modules directly. +var modules = [ + require("./internal"), + require("./utf16"), + require("./utf7"), + require("./sbcs-codec"), + require("./sbcs-data"), + require("./sbcs-data-generated"), + require("./dbcs-codec"), + require("./dbcs-data"), +]; + +// Put all encoding/alias/codec definitions to single object and export it. +for (var i = 0; i < modules.length; i++) { + var module = modules[i]; + for (var enc in module) + if (Object.prototype.hasOwnProperty.call(module, enc)) + exports[enc] = module[enc]; +} diff --git a/pitfall/pdfkit/node_modules/iconv-lite/encodings/internal.js b/pitfall/pdfkit/node_modules/iconv-lite/encodings/internal.js new file mode 100644 index 00000000..cea067c1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/iconv-lite/encodings/internal.js @@ -0,0 +1,190 @@ +"use strict"; +var Buffer = require("buffer").Buffer; + +// Export Node.js internal encodings. + +module.exports = { + // Encodings + utf8: { type: "_internal", bomAware: true}, + cesu8: { type: "_internal", bomAware: true}, + unicode11utf8: "utf8", + + ucs2: { type: "_internal", bomAware: true}, + utf16le: "ucs2", + + binary: { type: "_internal" }, + iso88591: "binary", + + base64: { type: "_internal" }, + hex: { type: "_internal" }, + + // Codec. + _internal: InternalCodec, +}; + +//------------------------------------------------------------------------------ + +function InternalCodec(codecOptions, iconv) { + this.enc = codecOptions.encodingName; + this.bomAware = codecOptions.bomAware; + + if (this.enc === "base64") + this.encoder = InternalEncoderBase64; + else if (this.enc === "cesu8") { + this.enc = "utf8"; // Use utf8 for decoding. + this.encoder = InternalEncoderCesu8; + + // Add decoder for versions of Node not supporting CESU-8 + if (new Buffer("eda080", 'hex').toString().length == 3) { + this.decoder = InternalDecoderCesu8; + this.defaultCharUnicode = iconv.defaultCharUnicode; + } + } +} + +InternalCodec.prototype.encoder = InternalEncoder; +InternalCodec.prototype.decoder = InternalDecoder; + +//------------------------------------------------------------------------------ + +// We use node.js internal decoder. Its signature is the same as ours. +var StringDecoder = require('string_decoder').StringDecoder; + +if (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method. + StringDecoder.prototype.end = function() {}; + + +function InternalDecoder(options, codec) { + StringDecoder.call(this, codec.enc); +} + +InternalDecoder.prototype = StringDecoder.prototype; + + +//------------------------------------------------------------------------------ +// Encoder is mostly trivial + +function InternalEncoder(options, codec) { + this.enc = codec.enc; +} + +InternalEncoder.prototype.write = function(str) { + return new Buffer(str, this.enc); +} + +InternalEncoder.prototype.end = function() { +} + + +//------------------------------------------------------------------------------ +// Except base64 encoder, which must keep its state. + +function InternalEncoderBase64(options, codec) { + this.prevStr = ''; +} + +InternalEncoderBase64.prototype.write = function(str) { + str = this.prevStr + str; + var completeQuads = str.length - (str.length % 4); + this.prevStr = str.slice(completeQuads); + str = str.slice(0, completeQuads); + + return new Buffer(str, "base64"); +} + +InternalEncoderBase64.prototype.end = function() { + return new Buffer(this.prevStr, "base64"); +} + + +//------------------------------------------------------------------------------ +// CESU-8 encoder is also special. + +function InternalEncoderCesu8(options, codec) { +} + +InternalEncoderCesu8.prototype.write = function(str) { + var buf = new Buffer(str.length * 3), bufIdx = 0; + for (var i = 0; i < str.length; i++) { + var charCode = str.charCodeAt(i); + // Naive implementation, but it works because CESU-8 is especially easy + // to convert from UTF-16 (which all JS strings are encoded in). + if (charCode < 0x80) + buf[bufIdx++] = charCode; + else if (charCode < 0x800) { + buf[bufIdx++] = 0xC0 + (charCode >>> 6); + buf[bufIdx++] = 0x80 + (charCode & 0x3f); + } + else { // charCode will always be < 0x10000 in javascript. + buf[bufIdx++] = 0xE0 + (charCode >>> 12); + buf[bufIdx++] = 0x80 + ((charCode >>> 6) & 0x3f); + buf[bufIdx++] = 0x80 + (charCode & 0x3f); + } + } + return buf.slice(0, bufIdx); +} + +InternalEncoderCesu8.prototype.end = function() { +} + +//------------------------------------------------------------------------------ +// CESU-8 decoder is not implemented in Node v4.0+ + +function InternalDecoderCesu8(options, codec) { + this.acc = 0; + this.contBytes = 0; + this.accBytes = 0; + this.defaultCharUnicode = codec.defaultCharUnicode; +} + +InternalDecoderCesu8.prototype.write = function(buf) { + var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes, + res = ''; + for (var i = 0; i < buf.length; i++) { + var curByte = buf[i]; + if ((curByte & 0xC0) !== 0x80) { // Leading byte + if (contBytes > 0) { // Previous code is invalid + res += this.defaultCharUnicode; + contBytes = 0; + } + + if (curByte < 0x80) { // Single-byte code + res += String.fromCharCode(curByte); + } else if (curByte < 0xE0) { // Two-byte code + acc = curByte & 0x1F; + contBytes = 1; accBytes = 1; + } else if (curByte < 0xF0) { // Three-byte code + acc = curByte & 0x0F; + contBytes = 2; accBytes = 1; + } else { // Four or more are not supported for CESU-8. + res += this.defaultCharUnicode; + } + } else { // Continuation byte + if (contBytes > 0) { // We're waiting for it. + acc = (acc << 6) | (curByte & 0x3f); + contBytes--; accBytes++; + if (contBytes === 0) { + // Check for overlong encoding, but support Modified UTF-8 (encoding NULL as C0 80) + if (accBytes === 2 && acc < 0x80 && acc > 0) + res += this.defaultCharUnicode; + else if (accBytes === 3 && acc < 0x800) + res += this.defaultCharUnicode; + else + // Actually add character. + res += String.fromCharCode(acc); + } + } else { // Unexpected continuation byte + res += this.defaultCharUnicode; + } + } + } + this.acc = acc; this.contBytes = contBytes; this.accBytes = accBytes; + return res; +} + +InternalDecoderCesu8.prototype.end = function() { + var res = 0; + if (this.contBytes > 0) + res += this.defaultCharUnicode; + return res; +} diff --git a/pitfall/pdfkit/node_modules/iconv-lite/encodings/sbcs-codec.js b/pitfall/pdfkit/node_modules/iconv-lite/encodings/sbcs-codec.js new file mode 100644 index 00000000..7789e00e --- /dev/null +++ b/pitfall/pdfkit/node_modules/iconv-lite/encodings/sbcs-codec.js @@ -0,0 +1,73 @@ +"use strict"; +var Buffer = require("buffer").Buffer; + +// Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that +// correspond to encoded bytes (if 128 - then lower half is ASCII). + +exports._sbcs = SBCSCodec; +function SBCSCodec(codecOptions, iconv) { + if (!codecOptions) + throw new Error("SBCS codec is called without the data.") + + // Prepare char buffer for decoding. + if (!codecOptions.chars || (codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256)) + throw new Error("Encoding '"+codecOptions.type+"' has incorrect 'chars' (must be of len 128 or 256)"); + + if (codecOptions.chars.length === 128) { + var asciiString = ""; + for (var i = 0; i < 128; i++) + asciiString += String.fromCharCode(i); + codecOptions.chars = asciiString + codecOptions.chars; + } + + this.decodeBuf = new Buffer(codecOptions.chars, 'ucs2'); + + // Encoding buffer. + var encodeBuf = new Buffer(65536); + encodeBuf.fill(iconv.defaultCharSingleByte.charCodeAt(0)); + + for (var i = 0; i < codecOptions.chars.length; i++) + encodeBuf[codecOptions.chars.charCodeAt(i)] = i; + + this.encodeBuf = encodeBuf; +} + +SBCSCodec.prototype.encoder = SBCSEncoder; +SBCSCodec.prototype.decoder = SBCSDecoder; + + +function SBCSEncoder(options, codec) { + this.encodeBuf = codec.encodeBuf; +} + +SBCSEncoder.prototype.write = function(str) { + var buf = new Buffer(str.length); + for (var i = 0; i < str.length; i++) + buf[i] = this.encodeBuf[str.charCodeAt(i)]; + + return buf; +} + +SBCSEncoder.prototype.end = function() { +} + + +function SBCSDecoder(options, codec) { + this.decodeBuf = codec.decodeBuf; +} + +SBCSDecoder.prototype.write = function(buf) { + // Strings are immutable in JS -> we use ucs2 buffer to speed up computations. + var decodeBuf = this.decodeBuf; + var newBuf = new Buffer(buf.length*2); + var idx1 = 0, idx2 = 0; + for (var i = 0; i < buf.length; i++) { + idx1 = buf[i]*2; idx2 = i*2; + newBuf[idx2] = decodeBuf[idx1]; + newBuf[idx2+1] = decodeBuf[idx1+1]; + } + return newBuf.toString('ucs2'); +} + +SBCSDecoder.prototype.end = function() { +} diff --git a/pitfall/pdfkit/node_modules/iconv-lite/encodings/sbcs-data-generated.js b/pitfall/pdfkit/node_modules/iconv-lite/encodings/sbcs-data-generated.js new file mode 100644 index 00000000..a30ee2c7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/iconv-lite/encodings/sbcs-data-generated.js @@ -0,0 +1,445 @@ +"use strict"; + +// Generated data for sbcs codec. Don't edit manually. Regenerate using generation/gen-sbcs.js script. +module.exports = { + "437": "cp437", + "737": "cp737", + "775": "cp775", + "850": "cp850", + "852": "cp852", + "855": "cp855", + "856": "cp856", + "857": "cp857", + "858": "cp858", + "860": "cp860", + "861": "cp861", + "862": "cp862", + "863": "cp863", + "864": "cp864", + "865": "cp865", + "866": "cp866", + "869": "cp869", + "874": "windows874", + "922": "cp922", + "1046": "cp1046", + "1124": "cp1124", + "1125": "cp1125", + "1129": "cp1129", + "1133": "cp1133", + "1161": "cp1161", + "1162": "cp1162", + "1163": "cp1163", + "1250": "windows1250", + "1251": "windows1251", + "1252": "windows1252", + "1253": "windows1253", + "1254": "windows1254", + "1255": "windows1255", + "1256": "windows1256", + "1257": "windows1257", + "1258": "windows1258", + "28592": "iso88592", + "28593": "iso88593", + "28594": "iso88594", + "28595": "iso88595", + "28596": "iso88596", + "28597": "iso88597", + "28598": "iso88598", + "28599": "iso88599", + "28600": "iso885910", + "28601": "iso885911", + "28603": "iso885913", + "28604": "iso885914", + "28605": "iso885915", + "28606": "iso885916", + "windows874": { + "type": "_sbcs", + "chars": "€����…�����������‘’“”•–—�������� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" + }, + "win874": "windows874", + "cp874": "windows874", + "windows1250": { + "type": "_sbcs", + "chars": "€�‚�„…†‡�‰Š‹ŚŤŽŹ�‘’“”•–—�™š›śťžź ˇ˘Ł¤Ą¦§¨©Ş«¬­®Ż°±˛ł´µ¶·¸ąş»Ľ˝ľżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙" + }, + "win1250": "windows1250", + "cp1250": "windows1250", + "windows1251": { + "type": "_sbcs", + "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊЌЋЏђ‘’“”•–—�™љ›њќћџ ЎўЈ¤Ґ¦§Ё©Є«¬­®Ї°±Ііґµ¶·ё№є»јЅѕїАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" + }, + "win1251": "windows1251", + "cp1251": "windows1251", + "windows1252": { + "type": "_sbcs", + "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ�Ž��‘’“”•–—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" + }, + "win1252": "windows1252", + "cp1252": "windows1252", + "windows1253": { + "type": "_sbcs", + "chars": "€�‚ƒ„…†‡�‰�‹�����‘’“”•–—�™�›���� ΅Ά£¤¥¦§¨©�«¬­®―°±²³΄µ¶·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�" + }, + "win1253": "windows1253", + "cp1253": "windows1253", + "windows1254": { + "type": "_sbcs", + "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ����‘’“”•–—˜™š›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ" + }, + "win1254": "windows1254", + "cp1254": "windows1254", + "windows1255": { + "type": "_sbcs", + "chars": "€�‚ƒ„…†‡ˆ‰�‹�����‘’“”•–—˜™�›���� ¡¢£₪¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾¿ְֱֲֳִֵֶַָֹ�ֻּֽ־ֿ׀ׁׂ׃װױײ׳״�������אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�" + }, + "win1255": "windows1255", + "cp1255": "windows1255", + "windows1256": { + "type": "_sbcs", + "chars": "€پ‚ƒ„…†‡ˆ‰ٹ‹Œچژڈگ‘’“”•–—ک™ڑ›œ‌‍ں ،¢£¤¥¦§¨©ھ«¬­®¯°±²³´µ¶·¸¹؛»¼½¾؟ہءآأؤإئابةتثجحخدذرزسشصض×طظعغـفقكàلâمنهوçèéêëىيîïًٌٍَôُِ÷ّùْûü‎‏ے" + }, + "win1256": "windows1256", + "cp1256": "windows1256", + "windows1257": { + "type": "_sbcs", + "chars": "€�‚�„…†‡�‰�‹�¨ˇ¸�‘’“”•–—�™�›�¯˛� �¢£¤�¦§Ø©Ŗ«¬­®Æ°±²³´µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž˙" + }, + "win1257": "windows1257", + "cp1257": "windows1257", + "windows1258": { + "type": "_sbcs", + "chars": "€�‚ƒ„…†‡ˆ‰�‹Œ����‘’“”•–—˜™�›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" + }, + "win1258": "windows1258", + "cp1258": "windows1258", + "iso88592": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ą˘Ł¤ĽŚ§¨ŠŞŤŹ­ŽŻ°ą˛ł´ľśˇ¸šşťź˝žżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙" + }, + "cp28592": "iso88592", + "iso88593": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ħ˘£¤�Ĥ§¨İŞĞĴ­�Ż°ħ²³´µĥ·¸ışğĵ½�żÀÁÂ�ÄĊĈÇÈÉÊËÌÍÎÏ�ÑÒÓÔĠÖ×ĜÙÚÛÜŬŜßàáâ�äċĉçèéêëìíîï�ñòóôġö÷ĝùúûüŭŝ˙" + }, + "cp28593": "iso88593", + "iso88594": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĸŖ¤ĨĻ§¨ŠĒĢŦ­Ž¯°ą˛ŗ´ĩļˇ¸šēģŧŊžŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎĪĐŅŌĶÔÕÖ×ØŲÚÛÜŨŪßāáâãäåæįčéęëėíîīđņōķôõö÷øųúûüũū˙" + }, + "cp28594": "iso88594", + "iso88595": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂЃЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђѓєѕіїјљњћќ§ўџ" + }, + "cp28595": "iso88595", + "iso88596": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ���¤�������،­�������������؛���؟�ءآأؤإئابةتثجحخدذرزسشصضطظعغ�����ـفقكلمنهوىيًٌٍَُِّْ�������������" + }, + "cp28596": "iso88596", + "iso88597": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ‘’£€₯¦§¨©ͺ«¬­�―°±²³΄΅Ά·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�" + }, + "cp28597": "iso88597", + "iso88598": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �¢£¤¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾��������������������������������‗אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�" + }, + "cp28598": "iso88598", + "iso88599": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ" + }, + "cp28599": "iso88599", + "iso885910": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĒĢĪĨĶ§ĻĐŠŦŽ­ŪŊ°ąēģīĩķ·ļđšŧž―ūŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎÏÐŅŌÓÔÕÖŨØŲÚÛÜÝÞßāáâãäåæįčéęëėíîïðņōóôõöũøųúûüýþĸ" + }, + "cp28600": "iso885910", + "iso885911": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" + }, + "cp28601": "iso885911", + "iso885913": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ”¢£¤„¦§Ø©Ŗ«¬­®Æ°±²³“µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž’" + }, + "cp28603": "iso885913", + "iso885914": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ḃḃ£ĊċḊ§Ẁ©ẂḋỲ­®ŸḞḟĠġṀṁ¶ṖẁṗẃṠỳẄẅṡÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŴÑÒÓÔÕÖṪØÙÚÛÜÝŶßàáâãäåæçèéêëìíîïŵñòóôõöṫøùúûüýŷÿ" + }, + "cp28604": "iso885914", + "iso885915": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥Š§š©ª«¬­®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" + }, + "cp28605": "iso885915", + "iso885916": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄąŁ€„Š§š©Ș«Ź­źŻ°±ČłŽ”¶·žčș»ŒœŸżÀÁÂĂÄĆÆÇÈÉÊËÌÍÎÏĐŃÒÓÔŐÖŚŰÙÚÛÜĘȚßàáâăäćæçèéêëìíîïđńòóôőöśűùúûüęțÿ" + }, + "cp28606": "iso885916", + "cp437": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm437": "cp437", + "csibm437": "cp437", + "cp737": { + "type": "_sbcs", + "chars": "ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρσςτυφχψ░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ωάέήϊίόύϋώΆΈΉΊΌΎΏ±≥≤ΪΫ÷≈°∙·√ⁿ²■ " + }, + "ibm737": "cp737", + "csibm737": "cp737", + "cp775": { + "type": "_sbcs", + "chars": "ĆüéāäģåćłēŖŗīŹÄÅÉæÆōöĢ¢ŚśÖÜø£ØפĀĪóŻżź”¦©®¬½¼Ł«»░▒▓│┤ĄČĘĖ╣║╗╝ĮŠ┐└┴┬├─┼ŲŪ╚╔╩╦╠═╬Žąčęėįšųūž┘┌█▄▌▐▀ÓßŌŃõÕµńĶķĻļņĒŅ’­±“¾¶§÷„°∙·¹³²■ " + }, + "ibm775": "cp775", + "csibm775": "cp775", + "cp850": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈıÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ " + }, + "ibm850": "cp850", + "csibm850": "cp850", + "cp852": { + "type": "_sbcs", + "chars": "ÇüéâäůćçłëŐőîŹÄĆÉĹĺôöĽľŚśÖÜŤťŁ×čáíóúĄąŽžĘ꬟Ⱥ«»░▒▓│┤ÁÂĚŞ╣║╗╝Żż┐└┴┬├─┼Ăă╚╔╩╦╠═╬¤đĐĎËďŇÍÎě┘┌█▄ŢŮ▀ÓßÔŃńňŠšŔÚŕŰýÝţ´­˝˛ˇ˘§÷¸°¨˙űŘř■ " + }, + "ibm852": "cp852", + "csibm852": "cp852", + "cp855": { + "type": "_sbcs", + "chars": "ђЂѓЃёЁєЄѕЅіІїЇјЈљЉњЊћЋќЌўЎџЏюЮъЪаАбБцЦдДеЕфФгГ«»░▒▓│┤хХиИ╣║╗╝йЙ┐└┴┬├─┼кК╚╔╩╦╠═╬¤лЛмМнНоОп┘┌█▄Пя▀ЯрРсСтТуУжЖвВьЬ№­ыЫзЗшШэЭщЩчЧ§■ " + }, + "ibm855": "cp855", + "csibm855": "cp855", + "cp856": { + "type": "_sbcs", + "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת�£�×����������®¬½¼�«»░▒▓│┤���©╣║╗╝¢¥┐└┴┬├─┼��╚╔╩╦╠═╬¤���������┘┌█▄¦�▀������µ�������¯´­±‗¾¶§÷¸°¨·¹³²■ " + }, + "ibm856": "cp856", + "csibm856": "cp856", + "cp857": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèïîıÄÅÉæÆôöòûùİÖÜø£ØŞşáíóúñÑĞ𿮬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ºªÊËÈ�ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµ�×ÚÛÙìÿ¯´­±�¾¶§÷¸°¨·¹³²■ " + }, + "ibm857": "cp857", + "csibm857": "cp857", + "cp858": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈ€ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ " + }, + "ibm858": "cp858", + "csibm858": "cp858", + "cp860": { + "type": "_sbcs", + "chars": "ÇüéâãàÁçêÊèÍÔìÃÂÉÀÈôõòÚùÌÕÜ¢£Ù₧ÓáíóúñѪº¿Ò¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm860": "cp860", + "csibm860": "cp860", + "cp861": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèÐðÞÄÅÉæÆôöþûÝýÖÜø£Ø₧ƒáíóúÁÍÓÚ¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm861": "cp861", + "csibm861": "cp861", + "cp862": { + "type": "_sbcs", + "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm862": "cp862", + "csibm862": "cp862", + "cp863": { + "type": "_sbcs", + "chars": "ÇüéâÂà¶çêëèïî‗À§ÉÈÊôËÏûù¤ÔÜ¢£ÙÛƒ¦´óú¨¸³¯Î⌐¬½¼¾«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm863": "cp863", + "csibm863": "cp863", + "cp864": { + "type": "_sbcs", + "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$٪&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~°·∙√▒─│┼┤┬├┴┐┌└┘β∞φ±½¼≈«»ﻷﻸ��ﻻﻼ� ­ﺂ£¤ﺄ��ﺎﺏﺕﺙ،ﺝﺡﺥ٠١٢٣٤٥٦٧٨٩ﻑ؛ﺱﺵﺹ؟¢ﺀﺁﺃﺅﻊﺋﺍﺑﺓﺗﺛﺟﺣﺧﺩﺫﺭﺯﺳﺷﺻﺿﻁﻅﻋﻏ¦¬÷×ﻉـﻓﻗﻛﻟﻣﻧﻫﻭﻯﻳﺽﻌﻎﻍﻡﹽّﻥﻩﻬﻰﻲﻐﻕﻵﻶﻝﻙﻱ■�" + }, + "ibm864": "cp864", + "csibm864": "cp864", + "cp865": { + "type": "_sbcs", + "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø₧ƒáíóúñѪº¿⌐¬½¼¡«¤░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " + }, + "ibm865": "cp865", + "csibm865": "cp865", + "cp866": { + "type": "_sbcs", + "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№¤■ " + }, + "ibm866": "cp866", + "csibm866": "cp866", + "cp869": { + "type": "_sbcs", + "chars": "������Ά�·¬¦‘’Έ―ΉΊΪΌ��ΎΫ©Ώ²³ά£έήίϊΐόύΑΒΓΔΕΖΗ½ΘΙ«»░▒▓│┤ΚΛΜΝ╣║╗╝ΞΟ┐└┴┬├─┼ΠΡ╚╔╩╦╠═╬ΣΤΥΦΧΨΩαβγ┘┌█▄δε▀ζηθικλμνξοπρσςτ΄­±υφχ§ψ΅°¨ωϋΰώ■ " + }, + "ibm869": "cp869", + "csibm869": "cp869", + "cp922": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®‾°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŠÑÒÓÔÕÖ×ØÙÚÛÜÝŽßàáâãäåæçèéêëìíîïšñòóôõö÷øùúûüýžÿ" + }, + "ibm922": "cp922", + "csibm922": "cp922", + "cp1046": { + "type": "_sbcs", + "chars": "ﺈ×÷ﹱˆ■│─┐┌└┘ﹹﹻﹽﹿﹷﺊﻰﻳﻲﻎﻏﻐﻶﻸﻺﻼ ¤ﺋﺑﺗﺛﺟﺣ،­ﺧﺳ٠١٢٣٤٥٦٧٨٩ﺷ؛ﺻﺿﻊ؟ﻋءآأؤإئابةتثجحخدذرزسشصضطﻇعغﻌﺂﺄﺎﻓـفقكلمنهوىيًٌٍَُِّْﻗﻛﻟﻵﻷﻹﻻﻣﻧﻬﻩ�" + }, + "ibm1046": "cp1046", + "csibm1046": "cp1046", + "cp1124": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂҐЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђґєѕіїјљњћќ§ўџ" + }, + "ibm1124": "cp1124", + "csibm1124": "cp1124", + "cp1125": { + "type": "_sbcs", + "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёҐґЄєІіЇї·√№¤■ " + }, + "ibm1125": "cp1125", + "csibm1125": "cp1125", + "cp1129": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" + }, + "ibm1129": "cp1129", + "csibm1129": "cp1129", + "cp1133": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ກຂຄງຈສຊຍດຕຖທນບປຜຝພຟມຢຣລວຫອຮ���ຯະາຳິີຶືຸູຼັົຽ���ເແໂໃໄ່້໊໋໌ໍໆ�ໜໝ₭����������������໐໑໒໓໔໕໖໗໘໙��¢¬¦�" + }, + "ibm1133": "cp1133", + "csibm1133": "cp1133", + "cp1161": { + "type": "_sbcs", + "chars": "��������������������������������่กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู้๊๋€฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛¢¬¦ " + }, + "ibm1161": "cp1161", + "csibm1161": "cp1161", + "cp1162": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" + }, + "ibm1162": "cp1162", + "csibm1162": "cp1162", + "cp1163": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" + }, + "ibm1163": "cp1163", + "csibm1163": "cp1163", + "maccroatian": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈Ć«Č… ÀÃÕŒœĐ—“”‘’÷◊�©⁄¤‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ" + }, + "maccyrillic": { + "type": "_sbcs", + "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°¢£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµ∂ЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤" + }, + "macgreek": { + "type": "_sbcs", + "chars": "Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦­ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ�" + }, + "maciceland": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" + }, + "macroman": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" + }, + "macromania": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂŞ∞±≤≥¥µ∂∑∏π∫ªºΩăş¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›Ţţ‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" + }, + "macthai": { + "type": "_sbcs", + "chars": "«»…“”�•‘’� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู​–—฿เแโใไๅๆ็่้๊๋์ํ™๏๐๑๒๓๔๕๖๗๘๙®©����" + }, + "macturkish": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙ�ˆ˜¯˘˙˚¸˝˛ˇ" + }, + "macukraine": { + "type": "_sbcs", + "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤" + }, + "koi8r": { + "type": "_sbcs", + "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ё╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡Ё╢╣╤╥╦╧╨╩╪╫╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" + }, + "koi8u": { + "type": "_sbcs", + "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґ╝╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪Ґ╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" + }, + "koi8ru": { + "type": "_sbcs", + "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґў╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪ҐЎ©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" + }, + "koi8t": { + "type": "_sbcs", + "chars": "қғ‚Ғ„…†‡�‰ҳ‹ҲҷҶ�Қ‘’“”•–—�™�›�����ӯӮё¤ӣ¦§���«¬­®�°±²Ё�Ӣ¶·�№�»���©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" + }, + "armscii8": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �և։)(»«—.՝,-֊…՜՛՞ԱաԲբԳգԴդԵեԶզԷէԸըԹթԺժԻիԼլԽխԾծԿկՀհՁձՂղՃճՄմՅյՆնՇշՈոՉչՊպՋջՌռՍսՎվՏտՐրՑցՒւՓփՔքՕօՖֆ՚�" + }, + "rk1048": { + "type": "_sbcs", + "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊҚҺЏђ‘’“”•–—�™љ›њқһџ ҰұӘ¤Ө¦§Ё©Ғ«¬­®Ү°±Ііөµ¶·ё№ғ»әҢңүАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" + }, + "tcvn": { + "type": "_sbcs", + "chars": "\u0000ÚỤ\u0003ỪỬỮ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010ỨỰỲỶỸÝỴ\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÀẢÃÁẠẶẬÈẺẼÉẸỆÌỈĨÍỊÒỎÕÓỌỘỜỞỠỚỢÙỦŨ ĂÂÊÔƠƯĐăâêôơưđẶ̀̀̉̃́àảãáạẲằẳẵắẴẮẦẨẪẤỀặầẩẫấậèỂẻẽéẹềểễếệìỉỄẾỒĩíịòỔỏõóọồổỗốộờởỡớợùỖủũúụừửữứựỳỷỹýỵỐ" + }, + "georgianacademy": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზთიკლმნოპჟრსტუფქღყშჩცძწჭხჯჰჱჲჳჴჵჶçèéêëìíîïðñòóôõö÷øùúûüýþÿ" + }, + "georgianps": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზჱთიკლმნჲოპჟრსტჳუფქღყშჩცძწჭხჴჯჰჵæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" + }, + "pt154": { + "type": "_sbcs", + "chars": "ҖҒӮғ„…ҶҮҲүҠӢҢҚҺҸҗ‘’“”•–—ҳҷҡӣңқһҹ ЎўЈӨҘҰ§Ё©Ә«¬ӯ®Ҝ°ұІіҙө¶·ё№ә»јҪҫҝАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" + }, + "viscii": { + "type": "_sbcs", + "chars": "\u0000\u0001Ẳ\u0003\u0004ẴẪ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013Ỷ\u0015\u0016\u0017\u0018Ỹ\u001a\u001b\u001c\u001dỴ\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ẠẮẰẶẤẦẨẬẼẸẾỀỂỄỆỐỒỔỖỘỢỚỜỞỊỎỌỈỦŨỤỲÕắằặấầẩậẽẹếềểễệốồổỗỠƠộờởịỰỨỪỬơớƯÀÁÂÃẢĂẳẵÈÉÊẺÌÍĨỳĐứÒÓÔạỷừửÙÚỹỵÝỡưàáâãảăữẫèéêẻìíĩỉđựòóôõỏọụùúũủýợỮ" + }, + "iso646cn": { + "type": "_sbcs", + "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#¥%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������" + }, + "iso646jp": { + "type": "_sbcs", + "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[¥]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������" + }, + "hproman8": { + "type": "_sbcs", + "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ÀÂÈÊËÎÏ´ˋˆ¨˜ÙÛ₤¯Ýý°ÇçÑñ¡¿¤£¥§ƒ¢âêôûáéóúàèòùäëöüÅîØÆåíøæÄìÖÜÉïßÔÁÃãÐðÍÌÓÒÕõŠšÚŸÿÞþ·µ¶¾—¼½ªº«■»±�" + }, + "macintosh": { + "type": "_sbcs", + "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" + }, + "ascii": { + "type": "_sbcs", + "chars": "��������������������������������������������������������������������������������������������������������������������������������" + }, + "tis620": { + "type": "_sbcs", + "chars": "���������������������������������กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" + } +} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/iconv-lite/encodings/sbcs-data.js b/pitfall/pdfkit/node_modules/iconv-lite/encodings/sbcs-data.js new file mode 100644 index 00000000..beecd236 --- /dev/null +++ b/pitfall/pdfkit/node_modules/iconv-lite/encodings/sbcs-data.js @@ -0,0 +1,171 @@ +"use strict"; + +// Manually added data to be used by sbcs codec in addition to generated one. + +module.exports = { + // Not supported by iconv, not sure why. + "10029": "maccenteuro", + "maccenteuro": { + "type": "_sbcs", + "chars": "ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ" + }, + + "808": "cp808", + "ibm808": "cp808", + "cp808": { + "type": "_sbcs", + "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№€■ " + }, + + // Aliases of generated encodings. + "ascii8bit": "ascii", + "usascii": "ascii", + "ansix34": "ascii", + "ansix341968": "ascii", + "ansix341986": "ascii", + "csascii": "ascii", + "cp367": "ascii", + "ibm367": "ascii", + "isoir6": "ascii", + "iso646us": "ascii", + "iso646irv": "ascii", + "us": "ascii", + + "latin1": "iso88591", + "latin2": "iso88592", + "latin3": "iso88593", + "latin4": "iso88594", + "latin5": "iso88599", + "latin6": "iso885910", + "latin7": "iso885913", + "latin8": "iso885914", + "latin9": "iso885915", + "latin10": "iso885916", + + "csisolatin1": "iso88591", + "csisolatin2": "iso88592", + "csisolatin3": "iso88593", + "csisolatin4": "iso88594", + "csisolatincyrillic": "iso88595", + "csisolatinarabic": "iso88596", + "csisolatingreek" : "iso88597", + "csisolatinhebrew": "iso88598", + "csisolatin5": "iso88599", + "csisolatin6": "iso885910", + + "l1": "iso88591", + "l2": "iso88592", + "l3": "iso88593", + "l4": "iso88594", + "l5": "iso88599", + "l6": "iso885910", + "l7": "iso885913", + "l8": "iso885914", + "l9": "iso885915", + "l10": "iso885916", + + "isoir14": "iso646jp", + "isoir57": "iso646cn", + "isoir100": "iso88591", + "isoir101": "iso88592", + "isoir109": "iso88593", + "isoir110": "iso88594", + "isoir144": "iso88595", + "isoir127": "iso88596", + "isoir126": "iso88597", + "isoir138": "iso88598", + "isoir148": "iso88599", + "isoir157": "iso885910", + "isoir166": "tis620", + "isoir179": "iso885913", + "isoir199": "iso885914", + "isoir203": "iso885915", + "isoir226": "iso885916", + + "cp819": "iso88591", + "ibm819": "iso88591", + "cp28591": "iso88591", + "28591": "iso88591", + + "cyrillic": "iso88595", + + "arabic": "iso88596", + "arabic8": "iso88596", + "ecma114": "iso88596", + "asmo708": "iso88596", + + "greek" : "iso88597", + "greek8" : "iso88597", + "ecma118" : "iso88597", + "elot928" : "iso88597", + + "hebrew": "iso88598", + "hebrew8": "iso88598", + + "turkish": "iso88599", + "turkish8": "iso88599", + + "thai": "iso885911", + "thai8": "iso885911", + + "celtic": "iso885914", + "celtic8": "iso885914", + "isoceltic": "iso885914", + + "tis6200": "tis620", + "tis62025291": "tis620", + "tis62025330": "tis620", + + "10000": "macroman", + "10006": "macgreek", + "10007": "maccyrillic", + "10079": "maciceland", + "10081": "macturkish", + + "cspc8codepage437": "cp437", + "cspc775baltic": "cp775", + "cspc850multilingual": "cp850", + "cspcp852": "cp852", + "cspc862latinhebrew": "cp862", + "cpgr": "cp869", + + "msee": "cp1250", + "mscyrl": "cp1251", + "msansi": "cp1252", + "msgreek": "cp1253", + "msturk": "cp1254", + "mshebr": "cp1255", + "msarab": "cp1256", + "winbaltrim": "cp1257", + + "cp20866": "koi8r", + "20866": "koi8r", + "ibm878": "koi8r", + "cskoi8r": "koi8r", + + "cp21866": "koi8u", + "21866": "koi8u", + "ibm1168": "koi8u", + + "strk10482002": "rk1048", + + "tcvn5712": "tcvn", + "tcvn57121": "tcvn", + + "gb198880": "iso646cn", + "cn": "iso646cn", + + "csiso14jisc6220ro": "iso646jp", + "jisc62201969ro": "iso646jp", + "jp": "iso646jp", + + "cshproman8": "hproman8", + "r8": "hproman8", + "roman8": "hproman8", + "xroman8": "hproman8", + "ibm1051": "hproman8", + + "mac": "macintosh", + "csmacintosh": "macintosh", +}; + diff --git a/pitfall/pdfkit/node_modules/iconv-lite/encodings/tables/big5-added.json b/pitfall/pdfkit/node_modules/iconv-lite/encodings/tables/big5-added.json new file mode 100644 index 00000000..3c3d3c2f --- /dev/null +++ b/pitfall/pdfkit/node_modules/iconv-lite/encodings/tables/big5-added.json @@ -0,0 +1,122 @@ +[ +["8740","䏰䰲䘃䖦䕸𧉧䵷䖳𧲱䳢𧳅㮕䜶䝄䱇䱀𤊿𣘗𧍒𦺋𧃒䱗𪍑䝏䗚䲅𧱬䴇䪤䚡𦬣爥𥩔𡩣𣸆𣽡晍囻"], +["8767","綕夝𨮹㷴霴𧯯寛𡵞媤㘥𩺰嫑宷峼杮薓𩥅瑡璝㡵𡵓𣚞𦀡㻬"], +["87a1","𥣞㫵竼龗𤅡𨤍𣇪𠪊𣉞䌊蒄龖鐯䤰蘓墖靊鈘秐稲晠権袝瑌篅枂稬剏遆㓦珄𥶹瓆鿇垳䤯呌䄱𣚎堘穲𧭥讏䚮𦺈䆁𥶙箮𢒼鿈𢓁𢓉𢓌鿉蔄𣖻䂴鿊䓡𪷿拁灮鿋"], +["8840","㇀",4,"𠄌㇅𠃑𠃍㇆㇇𠃋𡿨㇈𠃊㇉㇊㇋㇌𠄎㇍㇎ĀÁǍÀĒÉĚÈŌÓǑÒ࿿Ê̄Ế࿿Ê̌ỀÊāáǎàɑēéěèīíǐìōóǒòūúǔùǖǘǚ"], +["88a1","ǜü࿿ê̄ế࿿ê̌ềêɡ⏚⏛"], +["8940","𪎩𡅅"], +["8943","攊"], +["8946","丽滝鵎釟"], +["894c","𧜵撑会伨侨兖兴农凤务动医华发变团声处备夲头学实実岚庆总斉柾栄桥济炼电纤纬纺织经统缆缷艺苏药视设询车轧轮"], +["89a1","琑糼緍楆竉刧"], +["89ab","醌碸酞肼"], +["89b0","贋胶𠧧"], +["89b5","肟黇䳍鷉鸌䰾𩷶𧀎鸊𪄳㗁"], +["89c1","溚舾甙"], +["89c5","䤑马骏龙禇𨑬𡷊𠗐𢫦两亁亀亇亿仫伷㑌侽㹈倃傈㑽㒓㒥円夅凛凼刅争剹劐匧㗇厩㕑厰㕓参吣㕭㕲㚁咓咣咴咹哐哯唘唣唨㖘唿㖥㖿嗗㗅"], +["8a40","𧶄唥"], +["8a43","𠱂𠴕𥄫喐𢳆㧬𠍁蹆𤶸𩓥䁓𨂾睺𢰸㨴䟕𨅝𦧲𤷪擝𠵼𠾴𠳕𡃴撍蹾𠺖𠰋𠽤𢲩𨉖𤓓"], +["8a64","𠵆𩩍𨃩䟴𤺧𢳂骲㩧𩗴㿭㔆𥋇𩟔𧣈𢵄鵮頕"], +["8a76","䏙𦂥撴哣𢵌𢯊𡁷㧻𡁯"], +["8aa1","𦛚𦜖𧦠擪𥁒𠱃蹨𢆡𨭌𠜱"], +["8aac","䠋𠆩㿺塳𢶍"], +["8ab2","𤗈𠓼𦂗𠽌𠶖啹䂻䎺"], +["8abb","䪴𢩦𡂝膪飵𠶜捹㧾𢝵跀嚡摼㹃"], +["8ac9","𪘁𠸉𢫏𢳉"], +["8ace","𡃈𣧂㦒㨆𨊛㕸𥹉𢃇噒𠼱𢲲𩜠㒼氽𤸻"], +["8adf","𧕴𢺋𢈈𪙛𨳍𠹺𠰴𦠜羓𡃏𢠃𢤹㗻𥇣𠺌𠾍𠺪㾓𠼰𠵇𡅏𠹌"], +["8af6","𠺫𠮩𠵈𡃀𡄽㿹𢚖搲𠾭"], +["8b40","𣏴𧘹𢯎𠵾𠵿𢱑𢱕㨘𠺘𡃇𠼮𪘲𦭐𨳒𨶙𨳊閪哌苄喹"], +["8b55","𩻃鰦骶𧝞𢷮煀腭胬尜𦕲脴㞗卟𨂽醶𠻺𠸏𠹷𠻻㗝𤷫㘉𠳖嚯𢞵𡃉𠸐𠹸𡁸𡅈𨈇𡑕𠹹𤹐𢶤婔𡀝𡀞𡃵𡃶垜𠸑"], +["8ba1","𧚔𨋍𠾵𠹻𥅾㜃𠾶𡆀𥋘𪊽𤧚𡠺𤅷𨉼墙剨㘚𥜽箲孨䠀䬬鼧䧧鰟鮍𥭴𣄽嗻㗲嚉丨夂𡯁屮靑𠂆乛亻㔾尣彑忄㣺扌攵歺氵氺灬爫丬犭𤣩罒礻糹罓𦉪㓁"], +["8bde","𦍋耂肀𦘒𦥑卝衤见𧢲讠贝钅镸长门𨸏韦页风飞饣𩠐鱼鸟黄歯龜丷𠂇阝户钢"], +["8c40","倻淾𩱳龦㷉袏𤅎灷峵䬠𥇍㕙𥴰愢𨨲辧釶熑朙玺𣊁𪄇㲋𡦀䬐磤琂冮𨜏䀉橣𪊺䈣蘏𠩯稪𩥇𨫪靕灍匤𢁾鏴盙𨧣龧矝亣俰傼丯众龨吴綋墒壐𡶶庒庙忂𢜒斋"], +["8ca1","𣏹椙橃𣱣泿"], +["8ca7","爀𤔅玌㻛𤨓嬕璹讃𥲤𥚕窓篬糃繬苸薗龩袐龪躹龫迏蕟駠鈡龬𨶹𡐿䁱䊢娚"], +["8cc9","顨杫䉶圽"], +["8cce","藖𤥻芿𧄍䲁𦵴嵻𦬕𦾾龭龮宖龯曧繛湗秊㶈䓃𣉖𢞖䎚䔶"], +["8ce6","峕𣬚諹屸㴒𣕑嵸龲煗䕘𤃬𡸣䱷㥸㑊𠆤𦱁諌侴𠈹妿腬顖𩣺弻"], +["8d40","𠮟"], +["8d42","𢇁𨥭䄂䚻𩁹㼇龳𪆵䃸㟖䛷𦱆䅼𨚲𧏿䕭㣔𥒚䕡䔛䶉䱻䵶䗪㿈𤬏㙡䓞䒽䇭崾嵈嵖㷼㠏嶤嶹㠠㠸幂庽弥徃㤈㤔㤿㥍惗愽峥㦉憷憹懏㦸戬抐拥挘㧸嚱"], +["8da1","㨃揢揻搇摚㩋擀崕嘡龟㪗斆㪽旿晓㫲暒㬢朖㭂枤栀㭘桊梄㭲㭱㭻椉楃牜楤榟榅㮼槖㯝橥橴橱檂㯬檙㯲檫檵櫔櫶殁毁毪汵沪㳋洂洆洦涁㳯涤涱渕渘温溆𨧀溻滢滚齿滨滩漤漴㵆𣽁澁澾㵪㵵熷岙㶊瀬㶑灐灔灯灿炉𠌥䏁㗱𠻘"], +["8e40","𣻗垾𦻓焾𥟠㙎榢𨯩孴穉𥣡𩓙穥穽𥦬窻窰竂竃燑𦒍䇊竚竝竪䇯咲𥰁笋筕笩𥌎𥳾箢筯莜𥮴𦱿篐萡箒箸𥴠㶭𥱥蒒篺簆簵𥳁籄粃𤢂粦晽𤕸糉糇糦籴糳糵糎"], +["8ea1","繧䔝𦹄絝𦻖璍綉綫焵綳緒𤁗𦀩緤㴓緵𡟹緥𨍭縝𦄡𦅚繮纒䌫鑬縧罀罁罇礶𦋐駡羗𦍑羣𡙡𠁨䕜𣝦䔃𨌺翺𦒉者耈耝耨耯𪂇𦳃耻耼聡𢜔䦉𦘦𣷣𦛨朥肧𨩈脇脚墰𢛶汿𦒘𤾸擧𡒊舘𡡞橓𤩥𤪕䑺舩𠬍𦩒𣵾俹𡓽蓢荢𦬊𤦧𣔰𡝳𣷸芪椛芳䇛"], +["8f40","蕋苐茚𠸖𡞴㛁𣅽𣕚艻苢茘𣺋𦶣𦬅𦮗𣗎㶿茝嗬莅䔋𦶥莬菁菓㑾𦻔橗蕚㒖𦹂𢻯葘𥯤葱㷓䓤檧葊𣲵祘蒨𦮖𦹷𦹃蓞萏莑䒠蒓蓤𥲑䉀𥳀䕃蔴嫲𦺙䔧蕳䔖枿蘖"], +["8fa1","𨘥𨘻藁𧂈蘂𡖂𧃍䕫䕪蘨㙈𡢢号𧎚虾蝱𪃸蟮𢰧螱蟚蠏噡虬桖䘏衅衆𧗠𣶹𧗤衞袜䙛袴袵揁装睷𧜏覇覊覦覩覧覼𨨥觧𧤤𧪽誜瞓釾誐𧩙竩𧬺𣾏䜓𧬸煼謌謟𥐰𥕥謿譌譍誩𤩺讐讛誯𡛟䘕衏貛𧵔𧶏貫㜥𧵓賖𧶘𧶽贒贃𡤐賛灜贑𤳉㻐起"], +["9040","趩𨀂𡀔𤦊㭼𨆼𧄌竧躭躶軃鋔輙輭𨍥𨐒辥錃𪊟𠩐辳䤪𨧞𨔽𣶻廸𣉢迹𪀔𨚼𨔁𢌥㦀𦻗逷𨔼𧪾遡𨕬𨘋邨𨜓郄𨛦邮都酧㫰醩釄粬𨤳𡺉鈎沟鉁鉢𥖹銹𨫆𣲛𨬌𥗛"], +["90a1","𠴱錬鍫𨫡𨯫炏嫃𨫢𨫥䥥鉄𨯬𨰹𨯿鍳鑛躼閅閦鐦閠濶䊹𢙺𨛘𡉼𣸮䧟氜陻隖䅬隣𦻕懚隶磵𨫠隽双䦡𦲸𠉴𦐐𩂯𩃥𤫑𡤕𣌊霱虂霶䨏䔽䖅𤫩灵孁霛靜𩇕靗孊𩇫靟鐥僐𣂷𣂼鞉鞟鞱鞾韀韒韠𥑬韮琜𩐳響韵𩐝𧥺䫑頴頳顋顦㬎𧅵㵑𠘰𤅜"], +["9140","𥜆飊颷飈飇䫿𦴧𡛓喰飡飦飬鍸餹𤨩䭲𩡗𩤅駵騌騻騐驘𥜥㛄𩂱𩯕髠髢𩬅髴䰎鬔鬭𨘀倴鬴𦦨㣃𣁽魐魀𩴾婅𡡣鮎𤉋鰂鯿鰌𩹨鷔𩾷𪆒𪆫𪃡𪄣𪇟鵾鶃𪄴鸎梈"], +["91a1","鷄𢅛𪆓𪈠𡤻𪈳鴹𪂹𪊴麐麕麞麢䴴麪麯𤍤黁㭠㧥㴝伲㞾𨰫鼂鼈䮖鐤𦶢鼗鼖鼹嚟嚊齅馸𩂋韲葿齢齩竜龎爖䮾𤥵𤦻煷𤧸𤍈𤩑玞𨯚𡣺禟𨥾𨸶鍩鏳𨩄鋬鎁鏋𨥬𤒹爗㻫睲穃烐𤑳𤏸煾𡟯炣𡢾𣖙㻇𡢅𥐯𡟸㜢𡛻𡠹㛡𡝴𡣑𥽋㜣𡛀坛𤨥𡏾𡊨"], +["9240","𡏆𡒶蔃𣚦蔃葕𤦔𧅥𣸱𥕜𣻻𧁒䓴𣛮𩦝𦼦柹㜳㰕㷧塬𡤢栐䁗𣜿𤃡𤂋𤄏𦰡哋嚞𦚱嚒𠿟𠮨𠸍鏆𨬓鎜仸儫㠙𤐶亼𠑥𠍿佋侊𥙑婨𠆫𠏋㦙𠌊𠐔㐵伩𠋀𨺳𠉵諚𠈌亘"], +["92a1","働儍侢伃𤨎𣺊佂倮偬傁俌俥偘僼兙兛兝兞湶𣖕𣸹𣺿浲𡢄𣺉冨凃𠗠䓝𠒣𠒒𠒑赺𨪜𠜎剙劤𠡳勡鍮䙺熌𤎌𠰠𤦬𡃤槑𠸝瑹㻞璙琔瑖玘䮎𤪼𤂍叐㖄爏𤃉喴𠍅响𠯆圝鉝雴鍦埝垍坿㘾壋媙𨩆𡛺𡝯𡜐娬妸銏婾嫏娒𥥆𡧳𡡡𤊕㛵洅瑃娡𥺃"], +["9340","媁𨯗𠐓鏠璌𡌃焅䥲鐈𨧻鎽㞠尞岞幞幈𡦖𡥼𣫮廍孏𡤃𡤄㜁𡢠㛝𡛾㛓脪𨩇𡶺𣑲𨦨弌弎𡤧𡞫婫𡜻孄蘔𧗽衠恾𢡠𢘫忛㺸𢖯𢖾𩂈𦽳懀𠀾𠁆𢘛憙憘恵𢲛𢴇𤛔𩅍"], +["93a1","摱𤙥𢭪㨩𢬢𣑐𩣪𢹸挷𪑛撶挱揑𤧣𢵧护𢲡搻敫楲㯴𣂎𣊭𤦉𣊫唍𣋠𡣙𩐿曎𣊉𣆳㫠䆐𥖄𨬢𥖏𡛼𥕛𥐥磮𣄃𡠪𣈴㑤𣈏𣆂𤋉暎𦴤晫䮓昰𧡰𡷫晣𣋒𣋡昞𥡲㣑𣠺𣞼㮙𣞢𣏾瓐㮖枏𤘪梶栞㯄檾㡣𣟕𤒇樳橒櫉欅𡤒攑梘橌㯗橺歗𣿀𣲚鎠鋲𨯪𨫋"], +["9440","銉𨀞𨧜鑧涥漋𤧬浧𣽿㶏渄𤀼娽渊塇洤硂焻𤌚𤉶烱牐犇犔𤞏𤜥兹𤪤𠗫瑺𣻸𣙟𤩊𤤗𥿡㼆㺱𤫟𨰣𣼵悧㻳瓌琼鎇琷䒟𦷪䕑疃㽣𤳙𤴆㽘畕癳𪗆㬙瑨𨫌𤦫𤦎㫻"], +["94a1","㷍𤩎㻿𤧅𤣳釺圲鍂𨫣𡡤僟𥈡𥇧睸𣈲眎眏睻𤚗𣞁㩞𤣰琸璛㺿𤪺𤫇䃈𤪖𦆮錇𥖁砞碍碈磒珐祙𧝁𥛣䄎禛蒖禥樭𣻺稺秴䅮𡛦䄲鈵秱𠵌𤦌𠊙𣶺𡝮㖗啫㕰㚪𠇔𠰍竢婙𢛵𥪯𥪜娍𠉛磰娪𥯆竾䇹籝籭䈑𥮳𥺼𥺦糍𤧹𡞰粎籼粮檲緜縇緓罎𦉡"], +["9540","𦅜𧭈綗𥺂䉪𦭵𠤖柖𠁎𣗏埄𦐒𦏸𤥢翝笧𠠬𥫩𥵃笌𥸎駦虅驣樜𣐿㧢𤧷𦖭騟𦖠蒀𧄧𦳑䓪脷䐂胆脉腂𦞴飃𦩂艢艥𦩑葓𦶧蘐𧈛媆䅿𡡀嬫𡢡嫤𡣘蚠蜨𣶏蠭𧐢娂"], +["95a1","衮佅袇袿裦襥襍𥚃襔𧞅𧞄𨯵𨯙𨮜𨧹㺭蒣䛵䛏㟲訽訜𩑈彍鈫𤊄旔焩烄𡡅鵭貟賩𧷜妚矃姰䍮㛔踪躧𤰉輰轊䋴汘澻𢌡䢛潹溋𡟚鯩㚵𤤯邻邗啱䤆醻鐄𨩋䁢𨫼鐧𨰝𨰻蓥訫閙閧閗閖𨴴瑅㻂𤣿𤩂𤏪㻧𣈥随𨻧𨹦𨹥㻌𤧭𤩸𣿮琒瑫㻼靁𩂰"], +["9640","桇䨝𩂓𥟟靝鍨𨦉𨰦𨬯𦎾銺嬑譩䤼珹𤈛鞛靱餸𠼦巁𨯅𤪲頟𩓚鋶𩗗釥䓀𨭐𤩧𨭤飜𨩅㼀鈪䤥萔餻饍𧬆㷽馛䭯馪驜𨭥𥣈檏騡嫾騯𩣱䮐𩥈馼䮽䮗鍽塲𡌂堢𤦸"], +["96a1","𡓨硄𢜟𣶸棅㵽鑘㤧慐𢞁𢥫愇鱏鱓鱻鰵鰐魿鯏𩸭鮟𪇵𪃾鴡䲮𤄄鸘䲰鴌𪆴𪃭𪃳𩤯鶥蒽𦸒𦿟𦮂藼䔳𦶤𦺄𦷰萠藮𦸀𣟗𦁤秢𣖜𣙀䤭𤧞㵢鏛銾鍈𠊿碹鉷鑍俤㑀遤𥕝砽硔碶硋𡝗𣇉𤥁㚚佲濚濙瀞瀞吔𤆵垻壳垊鴖埗焴㒯𤆬燫𦱀𤾗嬨𡞵𨩉"], +["9740","愌嫎娋䊼𤒈㜬䭻𨧼鎻鎸𡣖𠼝葲𦳀𡐓𤋺𢰦𤏁妔𣶷𦝁綨𦅛𦂤𤦹𤦋𨧺鋥珢㻩璴𨭣𡢟㻡𤪳櫘珳珻㻖𤨾𤪔𡟙𤩦𠎧𡐤𤧥瑈𤤖炥𤥶銄珦鍟𠓾錱𨫎𨨖鎆𨯧𥗕䤵𨪂煫"], +["97a1","𤥃𠳿嚤𠘚𠯫𠲸唂秄𡟺緾𡛂𤩐𡡒䔮鐁㜊𨫀𤦭妰𡢿𡢃𧒄媡㛢𣵛㚰鉟婹𨪁𡡢鍴㳍𠪴䪖㦊僴㵩㵌𡎜煵䋻𨈘渏𩃤䓫浗𧹏灧沯㳖𣿭𣸭渂漌㵯𠏵畑㚼㓈䚀㻚䡱姄鉮䤾轁𨰜𦯀堒埈㛖𡑒烾𤍢𤩱𢿣𡊰𢎽梹楧𡎘𣓥𧯴𣛟𨪃𣟖𣏺𤲟樚𣚭𦲷萾䓟䓎"], +["9840","𦴦𦵑𦲂𦿞漗𧄉茽𡜺菭𦲀𧁓𡟛妉媂𡞳婡婱𡤅𤇼㜭姯𡜼㛇熎鎐暚𤊥婮娫𤊓樫𣻹𧜶𤑛𤋊焝𤉙𨧡侰𦴨峂𤓎𧹍𤎽樌𤉖𡌄炦焳𤏩㶥泟勇𤩏繥姫崯㷳彜𤩝𡟟綤萦"], +["98a1","咅𣫺𣌀𠈔坾𠣕𠘙㿥𡾞𪊶瀃𩅛嵰玏糓𨩙𩐠俈翧狍猐𧫴猸猹𥛶獁獈㺩𧬘遬燵𤣲珡臶㻊県㻑沢国琙琞琟㻢㻰㻴㻺瓓㼎㽓畂畭畲疍㽼痈痜㿀癍㿗癴㿜発𤽜熈嘣覀塩䀝睃䀹条䁅㗛瞘䁪䁯属瞾矋売砘点砜䂨砹硇硑硦葈𥔵礳栃礲䄃"], +["9940","䄉禑禙辻稆込䅧窑䆲窼艹䇄竏竛䇏両筢筬筻簒簛䉠䉺类粜䊌粸䊔糭输烀𠳏総緔緐緽羮羴犟䎗耠耥笹耮耱联㷌垴炠肷胩䏭脌猪脎脒畠脔䐁㬹腖腙腚"], +["99a1","䐓堺腼膄䐥膓䐭膥埯臁臤艔䒏芦艶苊苘苿䒰荗险榊萅烵葤惣蒈䔄蒾蓡蓸蔐蔸蕒䔻蕯蕰藠䕷虲蚒蚲蛯际螋䘆䘗袮裿褤襇覑𧥧訩訸誔誴豑賔賲贜䞘塟跃䟭仮踺嗘坔蹱嗵躰䠷軎転軤軭軲辷迁迊迌逳駄䢭飠鈓䤞鈨鉘鉫銱銮銿"], +["9a40","鋣鋫鋳鋴鋽鍃鎄鎭䥅䥑麿鐗匁鐝鐭鐾䥪鑔鑹锭関䦧间阳䧥枠䨤靀䨵鞲韂噔䫤惨颹䬙飱塄餎餙冴餜餷饂饝饢䭰駅䮝騼鬏窃魩鮁鯝鯱鯴䱭鰠㝯𡯂鵉鰺"], +["9aa1","黾噐鶓鶽鷀鷼银辶鹻麬麱麽黆铜黢黱黸竈齄𠂔𠊷𠎠椚铃妬𠓗塀铁㞹𠗕𠘕𠙶𡚺块煳𠫂𠫍𠮿呪吆𠯋咞𠯻𠰻𠱓𠱥𠱼惧𠲍噺𠲵𠳝𠳭𠵯𠶲𠷈楕鰯螥𠸄𠸎𠻗𠾐𠼭𠹳尠𠾼帋𡁜𡁏𡁶朞𡁻𡂈𡂖㙇𡂿𡃓𡄯𡄻卤蒭𡋣𡍵𡌶讁𡕷𡘙𡟃𡟇乸炻𡠭𡥪"], +["9b40","𡨭𡩅𡰪𡱰𡲬𡻈拃𡻕𡼕熘桕𢁅槩㛈𢉼𢏗𢏺𢜪𢡱𢥏苽𢥧𢦓𢫕覥𢫨辠𢬎鞸𢬿顇骽𢱌"], +["9b62","𢲈𢲷𥯨𢴈𢴒𢶷𢶕𢹂𢽴𢿌𣀳𣁦𣌟𣏞徱晈暿𧩹𣕧𣗳爁𤦺矗𣘚𣜖纇𠍆墵朎"], +["9ba1","椘𣪧𧙗𥿢𣸑𣺹𧗾𢂚䣐䪸𤄙𨪚𤋮𤌍𤀻𤌴𤎖𤩅𠗊凒𠘑妟𡺨㮾𣳿𤐄𤓖垈𤙴㦛𤜯𨗨𩧉㝢𢇃譞𨭎駖𤠒𤣻𤨕爉𤫀𠱸奥𤺥𤾆𠝹軚𥀬劏圿煱𥊙𥐙𣽊𤪧喼𥑆𥑮𦭒釔㑳𥔿𧘲𥕞䜘𥕢𥕦𥟇𤤿𥡝偦㓻𣏌惞𥤃䝼𨥈𥪮𥮉𥰆𡶐垡煑澶𦄂𧰒遖𦆲𤾚譢𦐂𦑊"], +["9c40","嵛𦯷輶𦒄𡤜諪𤧶𦒈𣿯𦔒䯀𦖿𦚵𢜛鑥𥟡憕娧晉侻嚹𤔡𦛼乪𤤴陖涏𦲽㘘襷𦞙𦡮𦐑𦡞營𦣇筂𩃀𠨑𦤦鄄𦤹穅鷰𦧺騦𦨭㙟𦑩𠀡禃𦨴𦭛崬𣔙菏𦮝䛐𦲤画补𦶮墶"], +["9ca1","㜜𢖍𧁋𧇍㱔𧊀𧊅銁𢅺𧊋錰𧋦𤧐氹钟𧑐𠻸蠧裵𢤦𨑳𡞱溸𤨪𡠠㦤㚹尐秣䔿暶𩲭𩢤襃𧟌𧡘囖䃟𡘊㦡𣜯𨃨𡏅熭荦𧧝𩆨婧䲷𧂯𨦫𧧽𧨊𧬋𧵦𤅺筃祾𨀉澵𪋟樃𨌘厢𦸇鎿栶靝𨅯𨀣𦦵𡏭𣈯𨁈嶅𨰰𨂃圕頣𨥉嶫𤦈斾槕叒𤪥𣾁㰑朶𨂐𨃴𨄮𡾡𨅏"], +["9d40","𨆉𨆯𨈚𨌆𨌯𨎊㗊𨑨𨚪䣺揦𨥖砈鉕𨦸䏲𨧧䏟𨧨𨭆𨯔姸𨰉輋𨿅𩃬筑𩄐𩄼㷷𩅞𤫊运犏嚋𩓧𩗩𩖰𩖸𩜲𩣑𩥉𩥪𩧃𩨨𩬎𩵚𩶛纟𩻸𩼣䲤镇𪊓熢𪋿䶑递𪗋䶜𠲜达嗁"], +["9da1","辺𢒰边𤪓䔉繿潖檱仪㓤𨬬𧢝㜺躀𡟵𨀤𨭬𨮙𧨾𦚯㷫𧙕𣲷𥘵𥥖亚𥺁𦉘嚿𠹭踎孭𣺈𤲞揞拐𡟶𡡻攰嘭𥱊吚𥌑㷆𩶘䱽嘢嘞罉𥻘奵𣵀蝰东𠿪𠵉𣚺脗鵞贘瘻鱅癎瞹鍅吲腈苷嘥脲萘肽嗪祢噃吖𠺝㗎嘅嗱曱𨋢㘭甴嗰喺咗啲𠱁𠲖廐𥅈𠹶𢱢"], +["9e40","𠺢麫絚嗞𡁵抝靭咔賍燶酶揼掹揾啩𢭃鱲𢺳冚㓟𠶧冧呍唞唓癦踭𦢊疱肶蠄螆裇膶萜𡃁䓬猄𤜆宐茋𦢓噻𢛴𧴯𤆣𧵳𦻐𧊶酰𡇙鈈𣳼𪚩𠺬𠻹牦𡲢䝎𤿂𧿹𠿫䃺"], +["9ea1","鱝攟𢶠䣳𤟠𩵼𠿬𠸊恢𧖣𠿭"], +["9ead","𦁈𡆇熣纎鵐业丄㕷嬍沲卧㚬㧜卽㚥𤘘墚𤭮舭呋垪𥪕𠥹"], +["9ec5","㩒𢑥獴𩺬䴉鯭𣳾𩼰䱛𤾩𩖞𩿞葜𣶶𧊲𦞳𣜠挮紥𣻷𣸬㨪逈勌㹴㙺䗩𠒎癀嫰𠺶硺𧼮墧䂿噼鮋嵴癔𪐴麅䳡痹㟻愙𣃚𤏲"], +["9ef5","噝𡊩垧𤥣𩸆刴𧂮㖭汊鵼"], +["9f40","籖鬹埞𡝬屓擓𩓐𦌵𧅤蚭𠴨𦴢𤫢𠵱"], +["9f4f","凾𡼏嶎霃𡷑麁遌笟鬂峑箣扨挵髿篏鬪籾鬮籂粆鰕篼鬉鼗鰛𤤾齚啳寃俽麘俲剠㸆勑坧偖妷帒韈鶫轜呩鞴饀鞺匬愰"], +["9fa1","椬叚鰊鴂䰻陁榀傦畆𡝭駚剳"], +["9fae","酙隁酜"], +["9fb2","酑𨺗捿𦴣櫊嘑醎畺抅𠏼獏籰𥰡𣳽"], +["9fc1","𤤙盖鮝个𠳔莾衂"], +["9fc9","届槀僭坺刟巵从氱𠇲伹咜哚劚趂㗾弌㗳"], +["9fdb","歒酼龥鮗頮颴骺麨麄煺笔"], +["9fe7","毺蠘罸"], +["9feb","嘠𪙊蹷齓"], +["9ff0","跔蹏鸜踁抂𨍽踨蹵竓𤩷稾磘泪詧瘇"], +["a040","𨩚鼦泎蟖痃𪊲硓咢贌狢獱謭猂瓱賫𤪻蘯徺袠䒷"], +["a055","𡠻𦸅"], +["a058","詾𢔛"], +["a05b","惽癧髗鵄鍮鮏蟵"], +["a063","蠏賷猬霡鮰㗖犲䰇籑饊𦅙慙䰄麖慽"], +["a073","坟慯抦戹拎㩜懢厪𣏵捤栂㗒"], +["a0a1","嵗𨯂迚𨸹"], +["a0a6","僙𡵆礆匲阸𠼻䁥"], +["a0ae","矾"], +["a0b0","糂𥼚糚稭聦聣絍甅瓲覔舚朌聢𧒆聛瓰脃眤覉𦟌畓𦻑螩蟎臈螌詉貭譃眫瓸蓚㘵榲趦"], +["a0d4","覩瑨涹蟁𤀑瓧㷛煶悤憜㳑煢恷"], +["a0e2","罱𨬭牐惩䭾删㰘𣳇𥻗𧙖𥔱𡥄𡋾𩤃𦷜𧂭峁𦆭𨨏𣙷𠃮𦡆𤼎䕢嬟𦍌齐麦𦉫"], +["a3c0","␀",31,"␡"], +["c6a1","①",9,"⑴",9,"ⅰ",9,"丶丿亅亠冂冖冫勹匸卩厶夊宀巛⼳广廴彐彡攴无疒癶辵隶¨ˆヽヾゝゞ〃仝々〆〇ー[]✽ぁ",23], +["c740","す",58,"ァアィイ"], +["c7a1","ゥ",81,"А",5,"ЁЖ",4], +["c840","Л",26,"ёж",25,"⇧↸↹㇏𠃌乚𠂊刂䒑"], +["c8a1","龰冈龱𧘇"], +["c8cd","¬¦'"㈱№℡゛゜⺀⺄⺆⺇⺈⺊⺌⺍⺕⺜⺝⺥⺧⺪⺬⺮⺶⺼⺾⻆⻊⻌⻍⻏⻖⻗⻞⻣"], +["c8f5","ʃɐɛɔɵœøŋʊɪ"], +["f9fe","■"], +["fa40","𠕇鋛𠗟𣿅蕌䊵珯况㙉𤥂𨧤鍄𡧛苮𣳈砼杄拟𤤳𨦪𠊠𦮳𡌅侫𢓭倈𦴩𧪄𣘀𤪱𢔓倩𠍾徤𠎀𠍇滛𠐟偽儁㑺儎顬㝃萖𤦤𠒇兠𣎴兪𠯿𢃼𠋥𢔰𠖎𣈳𡦃宂蝽𠖳𣲙冲冸"], +["faa1","鴴凉减凑㳜凓𤪦决凢卂凭菍椾𣜭彻刋刦刼劵剗劔効勅簕蕂勠蘍𦬓包𨫞啉滙𣾀𠥔𣿬匳卄𠯢泋𡜦栛珕恊㺪㣌𡛨燝䒢卭却𨚫卾卿𡖖𡘓矦厓𨪛厠厫厮玧𥝲㽙玜叁叅汉义埾叙㪫𠮏叠𣿫𢶣叶𠱷吓灹唫晗浛呭𦭓𠵴啝咏咤䞦𡜍𠻝㶴𠵍"], +["fb40","𨦼𢚘啇䳭启琗喆喩嘅𡣗𤀺䕒𤐵暳𡂴嘷曍𣊊暤暭噍噏磱囱鞇叾圀囯园𨭦㘣𡉏坆𤆥汮炋坂㚱𦱾埦𡐖堃𡑔𤍣堦𤯵塜墪㕡壠壜𡈼壻寿坃𪅐𤉸鏓㖡够梦㛃湙"], +["fba1","𡘾娤啓𡚒蔅姉𠵎𦲁𦴪𡟜姙𡟻𡞲𦶦浱𡠨𡛕姹𦹅媫婣㛦𤦩婷㜈媖瑥嫓𦾡𢕔㶅𡤑㜲𡚸広勐孶斈孼𧨎䀄䡝𠈄寕慠𡨴𥧌𠖥寳宝䴐尅𡭄尓珎尔𡲥𦬨屉䣝岅峩峯嶋𡷹𡸷崐崘嵆𡺤岺巗苼㠭𤤁𢁉𢅳芇㠶㯂帮檊幵幺𤒼𠳓厦亷廐厨𡝱帉廴𨒂"], +["fc40","廹廻㢠廼栾鐛弍𠇁弢㫞䢮𡌺强𦢈𢏐彘𢑱彣鞽𦹮彲鍀𨨶徧嶶㵟𥉐𡽪𧃸𢙨釖𠊞𨨩怱暅𡡷㥣㷇㘹垐𢞴祱㹀悞悤悳𤦂𤦏𧩓璤僡媠慤萤慂慈𦻒憁凴𠙖憇宪𣾷"], +["fca1","𢡟懓𨮝𩥝懐㤲𢦀𢣁怣慜攞掋𠄘担𡝰拕𢸍捬𤧟㨗搸揸𡎎𡟼撐澊𢸶頔𤂌𥜝擡擥鑻㩦携㩗敍漖𤨨𤨣斅敭敟𣁾斵𤥀䬷旑䃘𡠩无旣忟𣐀昘𣇷𣇸晄𣆤𣆥晋𠹵晧𥇦晳晴𡸽𣈱𨗴𣇈𥌓矅𢣷馤朂𤎜𤨡㬫槺𣟂杞杧杢𤇍𩃭柗䓩栢湐鈼栁𣏦𦶠桝"], +["fd40","𣑯槡樋𨫟楳棃𣗍椁椀㴲㨁𣘼㮀枬楡𨩊䋼椶榘㮡𠏉荣傐槹𣙙𢄪橅𣜃檝㯳枱櫈𩆜㰍欝𠤣惞欵歴𢟍溵𣫛𠎵𡥘㝀吡𣭚毡𣻼毜氷𢒋𤣱𦭑汚舦汹𣶼䓅𣶽𤆤𤤌𤤀"], +["fda1","𣳉㛥㳫𠴲鮃𣇹𢒑羏样𦴥𦶡𦷫涖浜湼漄𤥿𤂅𦹲蔳𦽴凇沜渝萮𨬡港𣸯瑓𣾂秌湏媑𣁋濸㜍澝𣸰滺𡒗𤀽䕕鏰潄潜㵎潴𩅰㴻澟𤅄濓𤂑𤅕𤀹𣿰𣾴𤄿凟𤅖𤅗𤅀𦇝灋灾炧炁烌烕烖烟䄄㷨熴熖𤉷焫煅媈煊煮岜𤍥煏鍢𤋁焬𤑚𤨧𤨢熺𨯨炽爎"], +["fe40","鑂爕夑鑃爤鍁𥘅爮牀𤥴梽牕牗㹕𣁄栍漽犂猪猫𤠣𨠫䣭𨠄猨献珏玪𠰺𦨮珉瑉𤇢𡛧𤨤昣㛅𤦷𤦍𤧻珷琕椃𤨦琹𠗃㻗瑜𢢭瑠𨺲瑇珤瑶莹瑬㜰瑴鏱樬璂䥓𤪌"], +["fea1","𤅟𤩹𨮏孆𨰃𡢞瓈𡦈甎瓩甞𨻙𡩋寗𨺬鎅畍畊畧畮𤾂㼄𤴓疎瑝疞疴瘂瘬癑癏癯癶𦏵皐臯㟸𦤑𦤎皡皥皷盌𦾟葢𥂝𥅽𡸜眞眦着撯𥈠睘𣊬瞯𨥤𨥨𡛁矴砉𡍶𤨒棊碯磇磓隥礮𥗠磗礴碱𧘌辸袄𨬫𦂃𢘜禆褀椂禀𥡗禝𧬹礼禩渪𧄦㺨秆𩄍秔"] +] diff --git a/pitfall/pdfkit/node_modules/iconv-lite/encodings/tables/cp936.json b/pitfall/pdfkit/node_modules/iconv-lite/encodings/tables/cp936.json new file mode 100644 index 00000000..49ddb9a1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/iconv-lite/encodings/tables/cp936.json @@ -0,0 +1,264 @@ +[ +["0","\u0000",127,"€"], +["8140","丂丄丅丆丏丒丗丟丠両丣並丩丮丯丱丳丵丷丼乀乁乂乄乆乊乑乕乗乚乛乢乣乤乥乧乨乪",5,"乲乴",9,"乿",6,"亇亊"], +["8180","亐亖亗亙亜亝亞亣亪亯亰亱亴亶亷亸亹亼亽亾仈仌仏仐仒仚仛仜仠仢仦仧仩仭仮仯仱仴仸仹仺仼仾伀伂",6,"伋伌伒",4,"伜伝伡伣伨伩伬伭伮伱伳伵伷伹伻伾",4,"佄佅佇",5,"佒佔佖佡佢佦佨佪佫佭佮佱佲併佷佸佹佺佽侀侁侂侅來侇侊侌侎侐侒侓侕侖侘侙侚侜侞侟価侢"], +["8240","侤侫侭侰",4,"侶",8,"俀俁係俆俇俈俉俋俌俍俒",4,"俙俛俠俢俤俥俧俫俬俰俲俴俵俶俷俹俻俼俽俿",11], +["8280","個倎倐們倓倕倖倗倛倝倞倠倢倣値倧倫倯",10,"倻倽倿偀偁偂偄偅偆偉偊偋偍偐",4,"偖偗偘偙偛偝",7,"偦",5,"偭",8,"偸偹偺偼偽傁傂傃傄傆傇傉傊傋傌傎",20,"傤傦傪傫傭",4,"傳",6,"傼"], +["8340","傽",17,"僐",5,"僗僘僙僛",10,"僨僩僪僫僯僰僱僲僴僶",4,"僼",9,"儈"], +["8380","儉儊儌",5,"儓",13,"儢",28,"兂兇兊兌兎兏児兒兓兗兘兙兛兝",4,"兣兤兦內兩兪兯兲兺兾兿冃冄円冇冊冋冎冏冐冑冓冔冘冚冝冞冟冡冣冦",4,"冭冮冴冸冹冺冾冿凁凂凃凅凈凊凍凎凐凒",5], +["8440","凘凙凚凜凞凟凢凣凥",5,"凬凮凱凲凴凷凾刄刅刉刋刌刏刐刓刔刕刜刞刟刡刢刣別刦刧刪刬刯刱刲刴刵刼刾剄",5,"剋剎剏剒剓剕剗剘"], +["8480","剙剚剛剝剟剠剢剣剤剦剨剫剬剭剮剰剱剳",9,"剾劀劃",4,"劉",6,"劑劒劔",6,"劜劤劥劦劧劮劯劰労",9,"勀勁勂勄勅勆勈勊勌勍勎勏勑勓勔動勗務",5,"勠勡勢勣勥",10,"勱",7,"勻勼勽匁匂匃匄匇匉匊匋匌匎"], +["8540","匑匒匓匔匘匛匜匞匟匢匤匥匧匨匩匫匬匭匯",9,"匼匽區卂卄卆卋卌卍卐協単卙卛卝卥卨卪卬卭卲卶卹卻卼卽卾厀厁厃厇厈厊厎厏"], +["8580","厐",4,"厖厗厙厛厜厞厠厡厤厧厪厫厬厭厯",6,"厷厸厹厺厼厽厾叀參",4,"収叏叐叒叓叕叚叜叝叞叡叢叧叴叺叾叿吀吂吅吇吋吔吘吙吚吜吢吤吥吪吰吳吶吷吺吽吿呁呂呄呅呇呉呌呍呎呏呑呚呝",4,"呣呥呧呩",7,"呴呹呺呾呿咁咃咅咇咈咉咊咍咑咓咗咘咜咞咟咠咡"], +["8640","咢咥咮咰咲咵咶咷咹咺咼咾哃哅哊哋哖哘哛哠",4,"哫哬哯哰哱哴",5,"哻哾唀唂唃唄唅唈唊",4,"唒唓唕",5,"唜唝唞唟唡唥唦"], +["8680","唨唩唫唭唲唴唵唶唸唹唺唻唽啀啂啅啇啈啋",4,"啑啒啓啔啗",4,"啝啞啟啠啢啣啨啩啫啯",5,"啹啺啽啿喅喆喌喍喎喐喒喓喕喖喗喚喛喞喠",6,"喨",8,"喲喴営喸喺喼喿",4,"嗆嗇嗈嗊嗋嗎嗏嗐嗕嗗",4,"嗞嗠嗢嗧嗩嗭嗮嗰嗱嗴嗶嗸",4,"嗿嘂嘃嘄嘅"], +["8740","嘆嘇嘊嘋嘍嘐",7,"嘙嘚嘜嘝嘠嘡嘢嘥嘦嘨嘩嘪嘫嘮嘯嘰嘳嘵嘷嘸嘺嘼嘽嘾噀",11,"噏",4,"噕噖噚噛噝",4], +["8780","噣噥噦噧噭噮噯噰噲噳噴噵噷噸噹噺噽",7,"嚇",6,"嚐嚑嚒嚔",14,"嚤",10,"嚰",6,"嚸嚹嚺嚻嚽",12,"囋",8,"囕囖囘囙囜団囥",5,"囬囮囯囲図囶囷囸囻囼圀圁圂圅圇國",6], +["8840","園",9,"圝圞圠圡圢圤圥圦圧圫圱圲圴",4,"圼圽圿坁坃坄坅坆坈坉坋坒",4,"坘坙坢坣坥坧坬坮坰坱坲坴坵坸坹坺坽坾坿垀"], +["8880","垁垇垈垉垊垍",4,"垔",6,"垜垝垞垟垥垨垪垬垯垰垱垳垵垶垷垹",8,"埄",6,"埌埍埐埑埓埖埗埛埜埞埡埢埣埥",7,"埮埰埱埲埳埵埶執埻埼埾埿堁堃堄堅堈堉堊堌堎堏堐堒堓堔堖堗堘堚堛堜堝堟堢堣堥",4,"堫",4,"報堲堳場堶",7], +["8940","堾",5,"塅",6,"塎塏塐塒塓塕塖塗塙",4,"塟",5,"塦",4,"塭",16,"塿墂墄墆墇墈墊墋墌"], +["8980","墍",4,"墔",4,"墛墜墝墠",7,"墪",17,"墽墾墿壀壂壃壄壆",10,"壒壓壔壖",13,"壥",5,"壭壯壱売壴壵壷壸壺",7,"夃夅夆夈",4,"夎夐夑夒夓夗夘夛夝夞夠夡夢夣夦夨夬夰夲夳夵夶夻"], +["8a40","夽夾夿奀奃奅奆奊奌奍奐奒奓奙奛",4,"奡奣奤奦",12,"奵奷奺奻奼奾奿妀妅妉妋妌妎妏妐妑妔妕妘妚妛妜妝妟妠妡妢妦"], +["8a80","妧妬妭妰妱妳",5,"妺妼妽妿",6,"姇姈姉姌姍姎姏姕姖姙姛姞",4,"姤姦姧姩姪姫姭",11,"姺姼姽姾娀娂娊娋娍娎娏娐娒娔娕娖娗娙娚娛娝娞娡娢娤娦娧娨娪",6,"娳娵娷",4,"娽娾娿婁",4,"婇婈婋",9,"婖婗婘婙婛",5], +["8b40","婡婣婤婥婦婨婩婫",8,"婸婹婻婼婽婾媀",17,"媓",6,"媜",13,"媫媬"], +["8b80","媭",4,"媴媶媷媹",4,"媿嫀嫃",5,"嫊嫋嫍",4,"嫓嫕嫗嫙嫚嫛嫝嫞嫟嫢嫤嫥嫧嫨嫪嫬",4,"嫲",22,"嬊",11,"嬘",25,"嬳嬵嬶嬸",7,"孁",6], +["8c40","孈",7,"孒孖孞孠孡孧孨孫孭孮孯孲孴孶孷學孹孻孼孾孿宂宆宊宍宎宐宑宒宔宖実宧宨宩宬宭宮宯宱宲宷宺宻宼寀寁寃寈寉寊寋寍寎寏"], +["8c80","寑寔",8,"寠寢寣實寧審",4,"寯寱",6,"寽対尀専尃尅將專尋尌對導尐尒尓尗尙尛尞尟尠尡尣尦尨尩尪尫尭尮尯尰尲尳尵尶尷屃屄屆屇屌屍屒屓屔屖屗屘屚屛屜屝屟屢層屧",6,"屰屲",6,"屻屼屽屾岀岃",4,"岉岊岋岎岏岒岓岕岝",4,"岤",4], +["8d40","岪岮岯岰岲岴岶岹岺岻岼岾峀峂峃峅",5,"峌",5,"峓",5,"峚",6,"峢峣峧峩峫峬峮峯峱",9,"峼",4], +["8d80","崁崄崅崈",5,"崏",4,"崕崗崘崙崚崜崝崟",4,"崥崨崪崫崬崯",4,"崵",7,"崿",7,"嵈嵉嵍",10,"嵙嵚嵜嵞",10,"嵪嵭嵮嵰嵱嵲嵳嵵",12,"嶃",21,"嶚嶛嶜嶞嶟嶠"], +["8e40","嶡",21,"嶸",12,"巆",6,"巎",12,"巜巟巠巣巤巪巬巭"], +["8e80","巰巵巶巸",4,"巿帀帄帇帉帊帋帍帎帒帓帗帞",7,"帨",4,"帯帰帲",4,"帹帺帾帿幀幁幃幆",5,"幍",6,"幖",4,"幜幝幟幠幣",14,"幵幷幹幾庁庂広庅庈庉庌庍庎庒庘庛庝庡庢庣庤庨",4,"庮",4,"庴庺庻庼庽庿",6], +["8f40","廆廇廈廋",5,"廔廕廗廘廙廚廜",11,"廩廫",8,"廵廸廹廻廼廽弅弆弇弉弌弍弎弐弒弔弖弙弚弜弝弞弡弢弣弤"], +["8f80","弨弫弬弮弰弲",6,"弻弽弾弿彁",14,"彑彔彙彚彛彜彞彟彠彣彥彧彨彫彮彯彲彴彵彶彸彺彽彾彿徃徆徍徎徏徑従徔徖徚徛徝從徟徠徢",5,"復徫徬徯",5,"徶徸徹徺徻徾",4,"忇忈忊忋忎忓忔忕忚忛応忞忟忢忣忥忦忨忩忬忯忰忲忳忴忶忷忹忺忼怇"], +["9040","怈怉怋怌怐怑怓怗怘怚怞怟怢怣怤怬怭怮怰",4,"怶",4,"怽怾恀恄",6,"恌恎恏恑恓恔恖恗恘恛恜恞恟恠恡恥恦恮恱恲恴恵恷恾悀"], +["9080","悁悂悅悆悇悈悊悋悎悏悐悑悓悕悗悘悙悜悞悡悢悤悥悧悩悪悮悰悳悵悶悷悹悺悽",7,"惇惈惉惌",4,"惒惓惔惖惗惙惛惞惡",4,"惪惱惲惵惷惸惻",4,"愂愃愄愅愇愊愋愌愐",4,"愖愗愘愙愛愜愝愞愡愢愥愨愩愪愬",18,"慀",6], +["9140","慇慉態慍慏慐慒慓慔慖",6,"慞慟慠慡慣慤慥慦慩",6,"慱慲慳慴慶慸",18,"憌憍憏",4,"憕"], +["9180","憖",6,"憞",8,"憪憫憭",9,"憸",5,"憿懀懁懃",4,"應懌",4,"懓懕",16,"懧",13,"懶",8,"戀",5,"戇戉戓戔戙戜戝戞戠戣戦戧戨戩戫戭戯戰戱戲戵戶戸",4,"扂扄扅扆扊"], +["9240","扏扐払扖扗扙扚扜",6,"扤扥扨扱扲扴扵扷扸扺扻扽抁抂抃抅抆抇抈抋",5,"抔抙抜抝択抣抦抧抩抪抭抮抯抰抲抳抴抶抷抸抺抾拀拁"], +["9280","拃拋拏拑拕拝拞拠拡拤拪拫拰拲拵拸拹拺拻挀挃挄挅挆挊挋挌挍挏挐挒挓挔挕挗挘挙挜挦挧挩挬挭挮挰挱挳",5,"挻挼挾挿捀捁捄捇捈捊捑捒捓捔捖",7,"捠捤捥捦捨捪捫捬捯捰捲捳捴捵捸捹捼捽捾捿掁掃掄掅掆掋掍掑掓掔掕掗掙",6,"採掤掦掫掯掱掲掵掶掹掻掽掿揀"], +["9340","揁揂揃揅揇揈揊揋揌揑揓揔揕揗",6,"揟揢揤",4,"揫揬揮揯揰揱揳揵揷揹揺揻揼揾搃搄搆",4,"損搎搑搒搕",5,"搝搟搢搣搤"], +["9380","搥搧搨搩搫搮",5,"搵",4,"搻搼搾摀摂摃摉摋",6,"摓摕摖摗摙",4,"摟",7,"摨摪摫摬摮",9,"摻",6,"撃撆撈",8,"撓撔撗撘撚撛撜撝撟",4,"撥撦撧撨撪撫撯撱撲撳撴撶撹撻撽撾撿擁擃擄擆",6,"擏擑擓擔擕擖擙據"], +["9440","擛擜擝擟擠擡擣擥擧",24,"攁",7,"攊",7,"攓",4,"攙",8], +["9480","攢攣攤攦",4,"攬攭攰攱攲攳攷攺攼攽敀",4,"敆敇敊敋敍敎敐敒敓敔敗敘敚敜敟敠敡敤敥敧敨敩敪敭敮敯敱敳敵敶數",14,"斈斉斊斍斎斏斒斔斕斖斘斚斝斞斠斢斣斦斨斪斬斮斱",7,"斺斻斾斿旀旂旇旈旉旊旍旐旑旓旔旕旘",7,"旡旣旤旪旫"], +["9540","旲旳旴旵旸旹旻",4,"昁昄昅昇昈昉昋昍昐昑昒昖昗昘昚昛昜昞昡昢昣昤昦昩昪昫昬昮昰昲昳昷",4,"昽昿晀時晄",6,"晍晎晐晑晘"], +["9580","晙晛晜晝晞晠晢晣晥晧晩",4,"晱晲晳晵晸晹晻晼晽晿暀暁暃暅暆暈暉暊暋暍暎暏暐暒暓暔暕暘",4,"暞",8,"暩",4,"暯",4,"暵暶暷暸暺暻暼暽暿",25,"曚曞",7,"曧曨曪",5,"曱曵曶書曺曻曽朁朂會"], +["9640","朄朅朆朇朌朎朏朑朒朓朖朘朙朚朜朞朠",5,"朧朩朮朰朲朳朶朷朸朹朻朼朾朿杁杄杅杇杊杋杍杒杔杕杗",4,"杝杢杣杤杦杧杫杬杮東杴杶"], +["9680","杸杹杺杻杽枀枂枃枅枆枈枊枌枍枎枏枑枒枓枔枖枙枛枟枠枡枤枦枩枬枮枱枲枴枹",7,"柂柅",9,"柕柖柗柛柟柡柣柤柦柧柨柪柫柭柮柲柵",7,"柾栁栂栃栄栆栍栐栒栔栕栘",4,"栞栟栠栢",6,"栫",6,"栴栵栶栺栻栿桇桋桍桏桒桖",5], +["9740","桜桝桞桟桪桬",7,"桵桸",8,"梂梄梇",7,"梐梑梒梔梕梖梘",9,"梣梤梥梩梪梫梬梮梱梲梴梶梷梸"], +["9780","梹",6,"棁棃",5,"棊棌棎棏棐棑棓棔棖棗棙棛",4,"棡棢棤",9,"棯棲棳棴棶棷棸棻棽棾棿椀椂椃椄椆",4,"椌椏椑椓",11,"椡椢椣椥",7,"椮椯椱椲椳椵椶椷椸椺椻椼椾楀楁楃",16,"楕楖楘楙楛楜楟"], +["9840","楡楢楤楥楧楨楩楪楬業楯楰楲",4,"楺楻楽楾楿榁榃榅榊榋榌榎",5,"榖榗榙榚榝",9,"榩榪榬榮榯榰榲榳榵榶榸榹榺榼榽"], +["9880","榾榿槀槂",7,"構槍槏槑槒槓槕",5,"槜槝槞槡",11,"槮槯槰槱槳",9,"槾樀",9,"樋",11,"標",5,"樠樢",5,"権樫樬樭樮樰樲樳樴樶",6,"樿",4,"橅橆橈",7,"橑",6,"橚"], +["9940","橜",4,"橢橣橤橦",10,"橲",6,"橺橻橽橾橿檁檂檃檅",8,"檏檒",4,"檘",7,"檡",5], +["9980","檧檨檪檭",114,"欥欦欨",6], +["9a40","欯欰欱欳欴欵欶欸欻欼欽欿歀歁歂歄歅歈歊歋歍",11,"歚",7,"歨歩歫",13,"歺歽歾歿殀殅殈"], +["9a80","殌殎殏殐殑殔殕殗殘殙殜",4,"殢",7,"殫",7,"殶殸",6,"毀毃毄毆",4,"毌毎毐毑毘毚毜",4,"毢",7,"毬毭毮毰毱毲毴毶毷毸毺毻毼毾",6,"氈",4,"氎氒気氜氝氞氠氣氥氫氬氭氱氳氶氷氹氺氻氼氾氿汃汄汅汈汋",4,"汑汒汓汖汘"], +["9b40","汙汚汢汣汥汦汧汫",4,"汱汳汵汷汸決汻汼汿沀沄沇沊沋沍沎沑沒沕沖沗沘沚沜沝沞沠沢沨沬沯沰沴沵沶沷沺泀況泂泃泆泇泈泋泍泎泏泑泒泘"], +["9b80","泙泚泜泝泟泤泦泧泩泬泭泲泴泹泿洀洂洃洅洆洈洉洊洍洏洐洑洓洔洕洖洘洜洝洟",5,"洦洨洩洬洭洯洰洴洶洷洸洺洿浀浂浄浉浌浐浕浖浗浘浛浝浟浡浢浤浥浧浨浫浬浭浰浱浲浳浵浶浹浺浻浽",4,"涃涄涆涇涊涋涍涏涐涒涖",4,"涜涢涥涬涭涰涱涳涴涶涷涹",5,"淁淂淃淈淉淊"], +["9c40","淍淎淏淐淒淓淔淕淗淚淛淜淟淢淣淥淧淨淩淪淭淯淰淲淴淵淶淸淺淽",7,"渆渇済渉渋渏渒渓渕渘渙減渜渞渟渢渦渧渨渪測渮渰渱渳渵"], +["9c80","渶渷渹渻",7,"湅",7,"湏湐湑湒湕湗湙湚湜湝湞湠",10,"湬湭湯",14,"満溁溂溄溇溈溊",4,"溑",6,"溙溚溛溝溞溠溡溣溤溦溨溩溫溬溭溮溰溳溵溸溹溼溾溿滀滃滄滅滆滈滉滊滌滍滎滐滒滖滘滙滛滜滝滣滧滪",5], +["9d40","滰滱滲滳滵滶滷滸滺",7,"漃漄漅漇漈漊",4,"漐漑漒漖",9,"漡漢漣漥漦漧漨漬漮漰漲漴漵漷",6,"漿潀潁潂"], +["9d80","潃潄潅潈潉潊潌潎",9,"潙潚潛潝潟潠潡潣潤潥潧",5,"潯潰潱潳潵潶潷潹潻潽",6,"澅澆澇澊澋澏",12,"澝澞澟澠澢",4,"澨",10,"澴澵澷澸澺",5,"濁濃",5,"濊",6,"濓",10,"濟濢濣濤濥"], +["9e40","濦",7,"濰",32,"瀒",7,"瀜",6,"瀤",6], +["9e80","瀫",9,"瀶瀷瀸瀺",17,"灍灎灐",13,"灟",11,"灮灱灲灳灴灷灹灺灻災炁炂炃炄炆炇炈炋炌炍炏炐炑炓炗炘炚炛炞",12,"炰炲炴炵炶為炾炿烄烅烆烇烉烋",12,"烚"], +["9f40","烜烝烞烠烡烢烣烥烪烮烰",6,"烸烺烻烼烾",10,"焋",4,"焑焒焔焗焛",10,"焧",7,"焲焳焴"], +["9f80","焵焷",13,"煆煇煈煉煋煍煏",12,"煝煟",4,"煥煩",4,"煯煰煱煴煵煶煷煹煻煼煾",5,"熅",4,"熋熌熍熎熐熑熒熓熕熖熗熚",4,"熡",6,"熩熪熫熭",5,"熴熶熷熸熺",8,"燄",9,"燏",4], +["a040","燖",9,"燡燢燣燤燦燨",5,"燯",9,"燺",11,"爇",19], +["a080","爛爜爞",9,"爩爫爭爮爯爲爳爴爺爼爾牀",6,"牉牊牋牎牏牐牑牓牔牕牗牘牚牜牞牠牣牤牥牨牪牫牬牭牰牱牳牴牶牷牸牻牼牽犂犃犅",4,"犌犎犐犑犓",11,"犠",11,"犮犱犲犳犵犺",6,"狅狆狇狉狊狋狌狏狑狓狔狕狖狘狚狛"], +["a1a1"," 、。·ˉˇ¨〃々—~‖…‘’“”〔〕〈",7,"〖〗【】±×÷∶∧∨∑∏∪∩∈∷√⊥∥∠⌒⊙∫∮≡≌≈∽∝≠≮≯≤≥∞∵∴♂♀°′″℃$¤¢£‰§№☆★○●◎◇◆□■△▲※→←↑↓〓"], +["a2a1","ⅰ",9], +["a2b1","⒈",19,"⑴",19,"①",9], +["a2e5","㈠",9], +["a2f1","Ⅰ",11], +["a3a1","!"#¥%",88," ̄"], +["a4a1","ぁ",82], +["a5a1","ァ",85], +["a6a1","Α",16,"Σ",6], +["a6c1","α",16,"σ",6], +["a6e0","︵︶︹︺︿﹀︽︾﹁﹂﹃﹄"], +["a6ee","︻︼︷︸︱"], +["a6f4","︳︴"], +["a7a1","А",5,"ЁЖ",25], +["a7d1","а",5,"ёж",25], +["a840","ˊˋ˙–―‥‵℅℉↖↗↘↙∕∟∣≒≦≧⊿═",35,"▁",6], +["a880","█",7,"▓▔▕▼▽◢◣◤◥☉⊕〒〝〞"], +["a8a1","āáǎàēéěèīíǐìōóǒòūúǔùǖǘǚǜüêɑ"], +["a8bd","ńň"], +["a8c0","ɡ"], +["a8c5","ㄅ",36], +["a940","〡",8,"㊣㎎㎏㎜㎝㎞㎡㏄㏎㏑㏒㏕︰¬¦"], +["a959","℡㈱"], +["a95c","‐"], +["a960","ー゛゜ヽヾ〆ゝゞ﹉",9,"﹔﹕﹖﹗﹙",8], +["a980","﹢",4,"﹨﹩﹪﹫"], +["a996","〇"], +["a9a4","─",75], +["aa40","狜狝狟狢",5,"狪狫狵狶狹狽狾狿猀猂猄",5,"猋猌猍猏猐猑猒猔猘猙猚猟猠猣猤猦猧猨猭猯猰猲猳猵猶猺猻猼猽獀",8], +["aa80","獉獊獋獌獎獏獑獓獔獕獖獘",7,"獡",10,"獮獰獱"], +["ab40","獲",11,"獿",4,"玅玆玈玊玌玍玏玐玒玓玔玕玗玘玙玚玜玝玞玠玡玣",5,"玪玬玭玱玴玵玶玸玹玼玽玾玿珁珃",4], +["ab80","珋珌珎珒",6,"珚珛珜珝珟珡珢珣珤珦珨珪珫珬珮珯珰珱珳",4], +["ac40","珸",10,"琄琇琈琋琌琍琎琑",8,"琜",5,"琣琤琧琩琫琭琯琱琲琷",4,"琽琾琿瑀瑂",11], +["ac80","瑎",6,"瑖瑘瑝瑠",12,"瑮瑯瑱",4,"瑸瑹瑺"], +["ad40","瑻瑼瑽瑿璂璄璅璆璈璉璊璌璍璏璑",10,"璝璟",7,"璪",15,"璻",12], +["ad80","瓈",9,"瓓",8,"瓝瓟瓡瓥瓧",6,"瓰瓱瓲"], +["ae40","瓳瓵瓸",6,"甀甁甂甃甅",7,"甎甐甒甔甕甖甗甛甝甞甠",4,"甦甧甪甮甴甶甹甼甽甿畁畂畃畄畆畇畉畊畍畐畑畒畓畕畖畗畘"], +["ae80","畝",7,"畧畨畩畫",6,"畳畵當畷畺",4,"疀疁疂疄疅疇"], +["af40","疈疉疊疌疍疎疐疓疕疘疛疜疞疢疦",4,"疭疶疷疺疻疿痀痁痆痋痌痎痏痐痑痓痗痙痚痜痝痟痠痡痥痩痬痭痮痯痲痳痵痶痷痸痺痻痽痾瘂瘄瘆瘇"], +["af80","瘈瘉瘋瘍瘎瘏瘑瘒瘓瘔瘖瘚瘜瘝瘞瘡瘣瘧瘨瘬瘮瘯瘱瘲瘶瘷瘹瘺瘻瘽癁療癄"], +["b040","癅",6,"癎",5,"癕癗",4,"癝癟癠癡癢癤",6,"癬癭癮癰",7,"癹発發癿皀皁皃皅皉皊皌皍皏皐皒皔皕皗皘皚皛"], +["b080","皜",7,"皥",8,"皯皰皳皵",9,"盀盁盃啊阿埃挨哎唉哀皑癌蔼矮艾碍爱隘鞍氨安俺按暗岸胺案肮昂盎凹敖熬翱袄傲奥懊澳芭捌扒叭吧笆八疤巴拔跋靶把耙坝霸罢爸白柏百摆佰败拜稗斑班搬扳般颁板版扮拌伴瓣半办绊邦帮梆榜膀绑棒磅蚌镑傍谤苞胞包褒剥"], +["b140","盄盇盉盋盌盓盕盙盚盜盝盞盠",4,"盦",7,"盰盳盵盶盷盺盻盽盿眀眂眃眅眆眊県眎",10,"眛眜眝眞眡眣眤眥眧眪眫"], +["b180","眬眮眰",4,"眹眻眽眾眿睂睄睅睆睈",7,"睒",7,"睜薄雹保堡饱宝抱报暴豹鲍爆杯碑悲卑北辈背贝钡倍狈备惫焙被奔苯本笨崩绷甭泵蹦迸逼鼻比鄙笔彼碧蓖蔽毕毙毖币庇痹闭敝弊必辟壁臂避陛鞭边编贬扁便变卞辨辩辫遍标彪膘表鳖憋别瘪彬斌濒滨宾摈兵冰柄丙秉饼炳"], +["b240","睝睞睟睠睤睧睩睪睭",11,"睺睻睼瞁瞂瞃瞆",5,"瞏瞐瞓",11,"瞡瞣瞤瞦瞨瞫瞭瞮瞯瞱瞲瞴瞶",4], +["b280","瞼瞾矀",12,"矎",8,"矘矙矚矝",4,"矤病并玻菠播拨钵波博勃搏铂箔伯帛舶脖膊渤泊驳捕卜哺补埠不布步簿部怖擦猜裁材才财睬踩采彩菜蔡餐参蚕残惭惨灿苍舱仓沧藏操糙槽曹草厕策侧册测层蹭插叉茬茶查碴搽察岔差诧拆柴豺搀掺蝉馋谗缠铲产阐颤昌猖"], +["b340","矦矨矪矯矰矱矲矴矵矷矹矺矻矼砃",5,"砊砋砎砏砐砓砕砙砛砞砠砡砢砤砨砪砫砮砯砱砲砳砵砶砽砿硁硂硃硄硆硈硉硊硋硍硏硑硓硔硘硙硚"], +["b380","硛硜硞",11,"硯",7,"硸硹硺硻硽",6,"场尝常长偿肠厂敞畅唱倡超抄钞朝嘲潮巢吵炒车扯撤掣彻澈郴臣辰尘晨忱沉陈趁衬撑称城橙成呈乘程惩澄诚承逞骋秤吃痴持匙池迟弛驰耻齿侈尺赤翅斥炽充冲虫崇宠抽酬畴踌稠愁筹仇绸瞅丑臭初出橱厨躇锄雏滁除楚"], +["b440","碄碅碆碈碊碋碏碐碒碔碕碖碙碝碞碠碢碤碦碨",7,"碵碶碷碸確碻碼碽碿磀磂磃磄磆磇磈磌磍磎磏磑磒磓磖磗磘磚",9], +["b480","磤磥磦磧磩磪磫磭",4,"磳磵磶磸磹磻",5,"礂礃礄礆",6,"础储矗搐触处揣川穿椽传船喘串疮窗幢床闯创吹炊捶锤垂春椿醇唇淳纯蠢戳绰疵茨磁雌辞慈瓷词此刺赐次聪葱囱匆从丛凑粗醋簇促蹿篡窜摧崔催脆瘁粹淬翠村存寸磋撮搓措挫错搭达答瘩打大呆歹傣戴带殆代贷袋待逮"], +["b540","礍",5,"礔",9,"礟",4,"礥",14,"礵",4,"礽礿祂祃祄祅祇祊",8,"祔祕祘祙祡祣"], +["b580","祤祦祩祪祫祬祮祰",6,"祹祻",4,"禂禃禆禇禈禉禋禌禍禎禐禑禒怠耽担丹单郸掸胆旦氮但惮淡诞弹蛋当挡党荡档刀捣蹈倒岛祷导到稻悼道盗德得的蹬灯登等瞪凳邓堤低滴迪敌笛狄涤翟嫡抵底地蒂第帝弟递缔颠掂滇碘点典靛垫电佃甸店惦奠淀殿碉叼雕凋刁掉吊钓调跌爹碟蝶迭谍叠"], +["b640","禓",6,"禛",11,"禨",10,"禴",4,"禼禿秂秄秅秇秈秊秌秎秏秐秓秔秖秗秙",5,"秠秡秢秥秨秪"], +["b680","秬秮秱",6,"秹秺秼秾秿稁稄稅稇稈稉稊稌稏",4,"稕稖稘稙稛稜丁盯叮钉顶鼎锭定订丢东冬董懂动栋侗恫冻洞兜抖斗陡豆逗痘都督毒犊独读堵睹赌杜镀肚度渡妒端短锻段断缎堆兑队对墩吨蹲敦顿囤钝盾遁掇哆多夺垛躲朵跺舵剁惰堕蛾峨鹅俄额讹娥恶厄扼遏鄂饿恩而儿耳尔饵洱二"], +["b740","稝稟稡稢稤",14,"稴稵稶稸稺稾穀",5,"穇",9,"穒",4,"穘",16], +["b780","穩",6,"穱穲穳穵穻穼穽穾窂窅窇窉窊窋窌窎窏窐窓窔窙窚窛窞窡窢贰发罚筏伐乏阀法珐藩帆番翻樊矾钒繁凡烦反返范贩犯饭泛坊芳方肪房防妨仿访纺放菲非啡飞肥匪诽吠肺废沸费芬酚吩氛分纷坟焚汾粉奋份忿愤粪丰封枫蜂峰锋风疯烽逢冯缝讽奉凤佛否夫敷肤孵扶拂辐幅氟符伏俘服"], +["b840","窣窤窧窩窪窫窮",4,"窴",10,"竀",10,"竌",9,"竗竘竚竛竜竝竡竢竤竧",5,"竮竰竱竲竳"], +["b880","竴",4,"竻竼竾笀笁笂笅笇笉笌笍笎笐笒笓笖笗笘笚笜笝笟笡笢笣笧笩笭浮涪福袱弗甫抚辅俯釜斧脯腑府腐赴副覆赋复傅付阜父腹负富讣附妇缚咐噶嘎该改概钙盖溉干甘杆柑竿肝赶感秆敢赣冈刚钢缸肛纲岗港杠篙皋高膏羔糕搞镐稿告哥歌搁戈鸽胳疙割革葛格蛤阁隔铬个各给根跟耕更庚羹"], +["b940","笯笰笲笴笵笶笷笹笻笽笿",5,"筆筈筊筍筎筓筕筗筙筜筞筟筡筣",10,"筯筰筳筴筶筸筺筼筽筿箁箂箃箄箆",6,"箎箏"], +["b980","箑箒箓箖箘箙箚箛箞箟箠箣箤箥箮箯箰箲箳箵箶箷箹",7,"篂篃範埂耿梗工攻功恭龚供躬公宫弓巩汞拱贡共钩勾沟苟狗垢构购够辜菇咕箍估沽孤姑鼓古蛊骨谷股故顾固雇刮瓜剐寡挂褂乖拐怪棺关官冠观管馆罐惯灌贯光广逛瑰规圭硅归龟闺轨鬼诡癸桂柜跪贵刽辊滚棍锅郭国果裹过哈"], +["ba40","篅篈築篊篋篍篎篏篐篒篔",4,"篛篜篞篟篠篢篣篤篧篨篩篫篬篭篯篰篲",4,"篸篹篺篻篽篿",7,"簈簉簊簍簎簐",5,"簗簘簙"], +["ba80","簚",4,"簠",5,"簨簩簫",12,"簹",5,"籂骸孩海氦亥害骇酣憨邯韩含涵寒函喊罕翰撼捍旱憾悍焊汗汉夯杭航壕嚎豪毫郝好耗号浩呵喝荷菏核禾和何合盒貉阂河涸赫褐鹤贺嘿黑痕很狠恨哼亨横衡恒轰哄烘虹鸿洪宏弘红喉侯猴吼厚候后呼乎忽瑚壶葫胡蝴狐糊湖"], +["bb40","籃",9,"籎",36,"籵",5,"籾",9], +["bb80","粈粊",6,"粓粔粖粙粚粛粠粡粣粦粧粨粩粫粬粭粯粰粴",4,"粺粻弧虎唬护互沪户花哗华猾滑画划化话槐徊怀淮坏欢环桓还缓换患唤痪豢焕涣宦幻荒慌黄磺蝗簧皇凰惶煌晃幌恍谎灰挥辉徽恢蛔回毁悔慧卉惠晦贿秽会烩汇讳诲绘荤昏婚魂浑混豁活伙火获或惑霍货祸击圾基机畸稽积箕"], +["bc40","粿糀糂糃糄糆糉糋糎",6,"糘糚糛糝糞糡",6,"糩",5,"糰",7,"糹糺糼",13,"紋",5], +["bc80","紑",14,"紡紣紤紥紦紨紩紪紬紭紮細",6,"肌饥迹激讥鸡姬绩缉吉极棘辑籍集及急疾汲即嫉级挤几脊己蓟技冀季伎祭剂悸济寄寂计记既忌际妓继纪嘉枷夹佳家加荚颊贾甲钾假稼价架驾嫁歼监坚尖笺间煎兼肩艰奸缄茧检柬碱硷拣捡简俭剪减荐槛鉴践贱见键箭件"], +["bd40","紷",54,"絯",7], +["bd80","絸",32,"健舰剑饯渐溅涧建僵姜将浆江疆蒋桨奖讲匠酱降蕉椒礁焦胶交郊浇骄娇嚼搅铰矫侥脚狡角饺缴绞剿教酵轿较叫窖揭接皆秸街阶截劫节桔杰捷睫竭洁结解姐戒藉芥界借介疥诫届巾筋斤金今津襟紧锦仅谨进靳晋禁近烬浸"], +["be40","継",12,"綧",6,"綯",42], +["be80","線",32,"尽劲荆兢茎睛晶鲸京惊精粳经井警景颈静境敬镜径痉靖竟竞净炯窘揪究纠玖韭久灸九酒厩救旧臼舅咎就疚鞠拘狙疽居驹菊局咀矩举沮聚拒据巨具距踞锯俱句惧炬剧捐鹃娟倦眷卷绢撅攫抉掘倔爵觉决诀绝均菌钧军君峻"], +["bf40","緻",62], +["bf80","縺縼",4,"繂",4,"繈",21,"俊竣浚郡骏喀咖卡咯开揩楷凯慨刊堪勘坎砍看康慷糠扛抗亢炕考拷烤靠坷苛柯棵磕颗科壳咳可渴克刻客课肯啃垦恳坑吭空恐孔控抠口扣寇枯哭窟苦酷库裤夸垮挎跨胯块筷侩快宽款匡筐狂框矿眶旷况亏盔岿窥葵奎魁傀"], +["c040","繞",35,"纃",23,"纜纝纞"], +["c080","纮纴纻纼绖绤绬绹缊缐缞缷缹缻",6,"罃罆",9,"罒罓馈愧溃坤昆捆困括扩廓阔垃拉喇蜡腊辣啦莱来赖蓝婪栏拦篮阑兰澜谰揽览懒缆烂滥琅榔狼廊郎朗浪捞劳牢老佬姥酪烙涝勒乐雷镭蕾磊累儡垒擂肋类泪棱楞冷厘梨犁黎篱狸离漓理李里鲤礼莉荔吏栗丽厉励砾历利傈例俐"], +["c140","罖罙罛罜罝罞罠罣",4,"罫罬罭罯罰罳罵罶罷罸罺罻罼罽罿羀羂",7,"羋羍羏",4,"羕",4,"羛羜羠羢羣羥羦羨",6,"羱"], +["c180","羳",4,"羺羻羾翀翂翃翄翆翇翈翉翋翍翏",4,"翖翗翙",5,"翢翣痢立粒沥隶力璃哩俩联莲连镰廉怜涟帘敛脸链恋炼练粮凉梁粱良两辆量晾亮谅撩聊僚疗燎寥辽潦了撂镣廖料列裂烈劣猎琳林磷霖临邻鳞淋凛赁吝拎玲菱零龄铃伶羚凌灵陵岭领另令溜琉榴硫馏留刘瘤流柳六龙聋咙笼窿"], +["c240","翤翧翨翪翫翬翭翯翲翴",6,"翽翾翿耂耇耈耉耊耎耏耑耓耚耛耝耞耟耡耣耤耫",5,"耲耴耹耺耼耾聀聁聄聅聇聈聉聎聏聐聑聓聕聖聗"], +["c280","聙聛",13,"聫",5,"聲",11,"隆垄拢陇楼娄搂篓漏陋芦卢颅庐炉掳卤虏鲁麓碌露路赂鹿潞禄录陆戮驴吕铝侣旅履屡缕虑氯律率滤绿峦挛孪滦卵乱掠略抡轮伦仑沦纶论萝螺罗逻锣箩骡裸落洛骆络妈麻玛码蚂马骂嘛吗埋买麦卖迈脉瞒馒蛮满蔓曼慢漫"], +["c340","聾肁肂肅肈肊肍",5,"肔肕肗肙肞肣肦肧肨肬肰肳肵肶肸肹肻胅胇",4,"胏",6,"胘胟胠胢胣胦胮胵胷胹胻胾胿脀脁脃脄脅脇脈脋"], +["c380","脌脕脗脙脛脜脝脟",12,"脭脮脰脳脴脵脷脹",4,"脿谩芒茫盲氓忙莽猫茅锚毛矛铆卯茂冒帽貌贸么玫枚梅酶霉煤没眉媒镁每美昧寐妹媚门闷们萌蒙檬盟锰猛梦孟眯醚靡糜迷谜弥米秘觅泌蜜密幂棉眠绵冕免勉娩缅面苗描瞄藐秒渺庙妙蔑灭民抿皿敏悯闽明螟鸣铭名命谬摸"], +["c440","腀",5,"腇腉腍腎腏腒腖腗腘腛",4,"腡腢腣腤腦腨腪腫腬腯腲腳腵腶腷腸膁膃",4,"膉膋膌膍膎膐膒",5,"膙膚膞",4,"膤膥"], +["c480","膧膩膫",7,"膴",5,"膼膽膾膿臄臅臇臈臉臋臍",6,"摹蘑模膜磨摩魔抹末莫墨默沫漠寞陌谋牟某拇牡亩姆母墓暮幕募慕木目睦牧穆拿哪呐钠那娜纳氖乃奶耐奈南男难囊挠脑恼闹淖呢馁内嫩能妮霓倪泥尼拟你匿腻逆溺蔫拈年碾撵捻念娘酿鸟尿捏聂孽啮镊镍涅您柠狞凝宁"], +["c540","臔",14,"臤臥臦臨臩臫臮",4,"臵",5,"臽臿舃與",4,"舎舏舑舓舕",5,"舝舠舤舥舦舧舩舮舲舺舼舽舿"], +["c580","艀艁艂艃艅艆艈艊艌艍艎艐",7,"艙艛艜艝艞艠",7,"艩拧泞牛扭钮纽脓浓农弄奴努怒女暖虐疟挪懦糯诺哦欧鸥殴藕呕偶沤啪趴爬帕怕琶拍排牌徘湃派攀潘盘磐盼畔判叛乓庞旁耪胖抛咆刨炮袍跑泡呸胚培裴赔陪配佩沛喷盆砰抨烹澎彭蓬棚硼篷膨朋鹏捧碰坯砒霹批披劈琵毗"], +["c640","艪艫艬艭艱艵艶艷艸艻艼芀芁芃芅芆芇芉芌芐芓芔芕芖芚芛芞芠芢芣芧芲芵芶芺芻芼芿苀苂苃苅苆苉苐苖苙苚苝苢苧苨苩苪苬苭苮苰苲苳苵苶苸"], +["c680","苺苼",4,"茊茋茍茐茒茓茖茘茙茝",9,"茩茪茮茰茲茷茻茽啤脾疲皮匹痞僻屁譬篇偏片骗飘漂瓢票撇瞥拼频贫品聘乒坪苹萍平凭瓶评屏坡泼颇婆破魄迫粕剖扑铺仆莆葡菩蒲埔朴圃普浦谱曝瀑期欺栖戚妻七凄漆柒沏其棋奇歧畦崎脐齐旗祈祁骑起岂乞企启契砌器气迄弃汽泣讫掐"], +["c740","茾茿荁荂荄荅荈荊",4,"荓荕",4,"荝荢荰",6,"荹荺荾",6,"莇莈莊莋莌莍莏莐莑莔莕莖莗莙莚莝莟莡",6,"莬莭莮"], +["c780","莯莵莻莾莿菂菃菄菆菈菉菋菍菎菐菑菒菓菕菗菙菚菛菞菢菣菤菦菧菨菫菬菭恰洽牵扦钎铅千迁签仟谦乾黔钱钳前潜遣浅谴堑嵌欠歉枪呛腔羌墙蔷强抢橇锹敲悄桥瞧乔侨巧鞘撬翘峭俏窍切茄且怯窃钦侵亲秦琴勤芹擒禽寝沁青轻氢倾卿清擎晴氰情顷请庆琼穷秋丘邱球求囚酋泅趋区蛆曲躯屈驱渠"], +["c840","菮華菳",4,"菺菻菼菾菿萀萂萅萇萈萉萊萐萒",5,"萙萚萛萞",5,"萩",7,"萲",5,"萹萺萻萾",7,"葇葈葉"], +["c880","葊",6,"葒",4,"葘葝葞葟葠葢葤",4,"葪葮葯葰葲葴葷葹葻葼取娶龋趣去圈颧权醛泉全痊拳犬券劝缺炔瘸却鹊榷确雀裙群然燃冉染瓤壤攘嚷让饶扰绕惹热壬仁人忍韧任认刃妊纫扔仍日戎茸蓉荣融熔溶容绒冗揉柔肉茹蠕儒孺如辱乳汝入褥软阮蕊瑞锐闰润若弱撒洒萨腮鳃塞赛三叁"], +["c940","葽",4,"蒃蒄蒅蒆蒊蒍蒏",7,"蒘蒚蒛蒝蒞蒟蒠蒢",12,"蒰蒱蒳蒵蒶蒷蒻蒼蒾蓀蓂蓃蓅蓆蓇蓈蓋蓌蓎蓏蓒蓔蓕蓗"], +["c980","蓘",4,"蓞蓡蓢蓤蓧",4,"蓭蓮蓯蓱",10,"蓽蓾蔀蔁蔂伞散桑嗓丧搔骚扫嫂瑟色涩森僧莎砂杀刹沙纱傻啥煞筛晒珊苫杉山删煽衫闪陕擅赡膳善汕扇缮墒伤商赏晌上尚裳梢捎稍烧芍勺韶少哨邵绍奢赊蛇舌舍赦摄射慑涉社设砷申呻伸身深娠绅神沈审婶甚肾慎渗声生甥牲升绳"], +["ca40","蔃",8,"蔍蔎蔏蔐蔒蔔蔕蔖蔘蔙蔛蔜蔝蔞蔠蔢",8,"蔭",9,"蔾",4,"蕄蕅蕆蕇蕋",10], +["ca80","蕗蕘蕚蕛蕜蕝蕟",4,"蕥蕦蕧蕩",8,"蕳蕵蕶蕷蕸蕼蕽蕿薀薁省盛剩胜圣师失狮施湿诗尸虱十石拾时什食蚀实识史矢使屎驶始式示士世柿事拭誓逝势是嗜噬适仕侍释饰氏市恃室视试收手首守寿授售受瘦兽蔬枢梳殊抒输叔舒淑疏书赎孰熟薯暑曙署蜀黍鼠属术述树束戍竖墅庶数漱"], +["cb40","薂薃薆薈",6,"薐",10,"薝",6,"薥薦薧薩薫薬薭薱",5,"薸薺",6,"藂",6,"藊",4,"藑藒"], +["cb80","藔藖",5,"藝",6,"藥藦藧藨藪",14,"恕刷耍摔衰甩帅栓拴霜双爽谁水睡税吮瞬顺舜说硕朔烁斯撕嘶思私司丝死肆寺嗣四伺似饲巳松耸怂颂送宋讼诵搜艘擞嗽苏酥俗素速粟僳塑溯宿诉肃酸蒜算虽隋随绥髓碎岁穗遂隧祟孙损笋蓑梭唆缩琐索锁所塌他它她塔"], +["cc40","藹藺藼藽藾蘀",4,"蘆",10,"蘒蘓蘔蘕蘗",15,"蘨蘪",13,"蘹蘺蘻蘽蘾蘿虀"], +["cc80","虁",11,"虒虓處",4,"虛虜虝號虠虡虣",7,"獭挞蹋踏胎苔抬台泰酞太态汰坍摊贪瘫滩坛檀痰潭谭谈坦毯袒碳探叹炭汤塘搪堂棠膛唐糖倘躺淌趟烫掏涛滔绦萄桃逃淘陶讨套特藤腾疼誊梯剔踢锑提题蹄啼体替嚏惕涕剃屉天添填田甜恬舔腆挑条迢眺跳贴铁帖厅听烃"], +["cd40","虭虯虰虲",6,"蚃",6,"蚎",4,"蚔蚖",5,"蚞",4,"蚥蚦蚫蚭蚮蚲蚳蚷蚸蚹蚻",4,"蛁蛂蛃蛅蛈蛌蛍蛒蛓蛕蛖蛗蛚蛜"], +["cd80","蛝蛠蛡蛢蛣蛥蛦蛧蛨蛪蛫蛬蛯蛵蛶蛷蛺蛻蛼蛽蛿蜁蜄蜅蜆蜋蜌蜎蜏蜐蜑蜔蜖汀廷停亭庭挺艇通桐酮瞳同铜彤童桶捅筒统痛偷投头透凸秃突图徒途涂屠土吐兔湍团推颓腿蜕褪退吞屯臀拖托脱鸵陀驮驼椭妥拓唾挖哇蛙洼娃瓦袜歪外豌弯湾玩顽丸烷完碗挽晚皖惋宛婉万腕汪王亡枉网往旺望忘妄威"], +["ce40","蜙蜛蜝蜟蜠蜤蜦蜧蜨蜪蜫蜬蜭蜯蜰蜲蜳蜵蜶蜸蜹蜺蜼蜽蝀",6,"蝊蝋蝍蝏蝐蝑蝒蝔蝕蝖蝘蝚",5,"蝡蝢蝦",7,"蝯蝱蝲蝳蝵"], +["ce80","蝷蝸蝹蝺蝿螀螁螄螆螇螉螊螌螎",4,"螔螕螖螘",6,"螠",4,"巍微危韦违桅围唯惟为潍维苇萎委伟伪尾纬未蔚味畏胃喂魏位渭谓尉慰卫瘟温蚊文闻纹吻稳紊问嗡翁瓮挝蜗涡窝我斡卧握沃巫呜钨乌污诬屋无芜梧吾吴毋武五捂午舞伍侮坞戊雾晤物勿务悟误昔熙析西硒矽晰嘻吸锡牺"], +["cf40","螥螦螧螩螪螮螰螱螲螴螶螷螸螹螻螼螾螿蟁",4,"蟇蟈蟉蟌",4,"蟔",6,"蟜蟝蟞蟟蟡蟢蟣蟤蟦蟧蟨蟩蟫蟬蟭蟯",9], +["cf80","蟺蟻蟼蟽蟿蠀蠁蠂蠄",5,"蠋",7,"蠔蠗蠘蠙蠚蠜",4,"蠣稀息希悉膝夕惜熄烯溪汐犀檄袭席习媳喜铣洗系隙戏细瞎虾匣霞辖暇峡侠狭下厦夏吓掀锨先仙鲜纤咸贤衔舷闲涎弦嫌显险现献县腺馅羡宪陷限线相厢镶香箱襄湘乡翔祥详想响享项巷橡像向象萧硝霄削哮嚣销消宵淆晓"], +["d040","蠤",13,"蠳",5,"蠺蠻蠽蠾蠿衁衂衃衆",5,"衎",5,"衕衖衘衚",6,"衦衧衪衭衯衱衳衴衵衶衸衹衺"], +["d080","衻衼袀袃袆袇袉袊袌袎袏袐袑袓袔袕袗",4,"袝",4,"袣袥",5,"小孝校肖啸笑效楔些歇蝎鞋协挟携邪斜胁谐写械卸蟹懈泄泻谢屑薪芯锌欣辛新忻心信衅星腥猩惺兴刑型形邢行醒幸杏性姓兄凶胸匈汹雄熊休修羞朽嗅锈秀袖绣墟戌需虚嘘须徐许蓄酗叙旭序畜恤絮婿绪续轩喧宣悬旋玄"], +["d140","袬袮袯袰袲",4,"袸袹袺袻袽袾袿裀裃裄裇裈裊裋裌裍裏裐裑裓裖裗裚",4,"裠裡裦裧裩",6,"裲裵裶裷裺裻製裿褀褁褃",5], +["d180","褉褋",4,"褑褔",4,"褜",4,"褢褣褤褦褧褨褩褬褭褮褯褱褲褳褵褷选癣眩绚靴薛学穴雪血勋熏循旬询寻驯巡殉汛训讯逊迅压押鸦鸭呀丫芽牙蚜崖衙涯雅哑亚讶焉咽阉烟淹盐严研蜒岩延言颜阎炎沿奄掩眼衍演艳堰燕厌砚雁唁彦焰宴谚验殃央鸯秧杨扬佯疡羊洋阳氧仰痒养样漾邀腰妖瑶"], +["d240","褸",8,"襂襃襅",24,"襠",5,"襧",19,"襼"], +["d280","襽襾覀覂覄覅覇",26,"摇尧遥窑谣姚咬舀药要耀椰噎耶爷野冶也页掖业叶曳腋夜液一壹医揖铱依伊衣颐夷遗移仪胰疑沂宜姨彝椅蚁倚已乙矣以艺抑易邑屹亿役臆逸肄疫亦裔意毅忆义益溢诣议谊译异翼翌绎茵荫因殷音阴姻吟银淫寅饮尹引隐"], +["d340","覢",30,"觃觍觓觔觕觗觘觙觛觝觟觠觡觢觤觧觨觩觪觬觭觮觰觱觲觴",6], +["d380","觻",4,"訁",5,"計",21,"印英樱婴鹰应缨莹萤营荧蝇迎赢盈影颖硬映哟拥佣臃痈庸雍踊蛹咏泳涌永恿勇用幽优悠忧尤由邮铀犹油游酉有友右佑釉诱又幼迂淤于盂榆虞愚舆余俞逾鱼愉渝渔隅予娱雨与屿禹宇语羽玉域芋郁吁遇喻峪御愈欲狱育誉"], +["d440","訞",31,"訿",8,"詉",21], +["d480","詟",25,"詺",6,"浴寓裕预豫驭鸳渊冤元垣袁原援辕园员圆猿源缘远苑愿怨院曰约越跃钥岳粤月悦阅耘云郧匀陨允运蕴酝晕韵孕匝砸杂栽哉灾宰载再在咱攒暂赞赃脏葬遭糟凿藻枣早澡蚤躁噪造皂灶燥责择则泽贼怎增憎曾赠扎喳渣札轧"], +["d540","誁",7,"誋",7,"誔",46], +["d580","諃",32,"铡闸眨栅榨咋乍炸诈摘斋宅窄债寨瞻毡詹粘沾盏斩辗崭展蘸栈占战站湛绽樟章彰漳张掌涨杖丈帐账仗胀瘴障招昭找沼赵照罩兆肇召遮折哲蛰辙者锗蔗这浙珍斟真甄砧臻贞针侦枕疹诊震振镇阵蒸挣睁征狰争怔整拯正政"], +["d640","諤",34,"謈",27], +["d680","謤謥謧",30,"帧症郑证芝枝支吱蜘知肢脂汁之织职直植殖执值侄址指止趾只旨纸志挚掷至致置帜峙制智秩稚质炙痔滞治窒中盅忠钟衷终种肿重仲众舟周州洲诌粥轴肘帚咒皱宙昼骤珠株蛛朱猪诸诛逐竹烛煮拄瞩嘱主著柱助蛀贮铸筑"], +["d740","譆",31,"譧",4,"譭",25], +["d780","讇",24,"讬讱讻诇诐诪谉谞住注祝驻抓爪拽专砖转撰赚篆桩庄装妆撞壮状椎锥追赘坠缀谆准捉拙卓桌琢茁酌啄着灼浊兹咨资姿滋淄孜紫仔籽滓子自渍字鬃棕踪宗综总纵邹走奏揍租足卒族祖诅阻组钻纂嘴醉最罪尊遵昨左佐柞做作坐座"], +["d840","谸",8,"豂豃豄豅豈豊豋豍",7,"豖豗豘豙豛",5,"豣",6,"豬",6,"豴豵豶豷豻",6,"貃貄貆貇"], +["d880","貈貋貍",6,"貕貖貗貙",20,"亍丌兀丐廿卅丕亘丞鬲孬噩丨禺丿匕乇夭爻卮氐囟胤馗毓睾鼗丶亟鼐乜乩亓芈孛啬嘏仄厍厝厣厥厮靥赝匚叵匦匮匾赜卦卣刂刈刎刭刳刿剀剌剞剡剜蒯剽劂劁劐劓冂罔亻仃仉仂仨仡仫仞伛仳伢佤仵伥伧伉伫佞佧攸佚佝"], +["d940","貮",62], +["d980","賭",32,"佟佗伲伽佶佴侑侉侃侏佾佻侪佼侬侔俦俨俪俅俚俣俜俑俟俸倩偌俳倬倏倮倭俾倜倌倥倨偾偃偕偈偎偬偻傥傧傩傺僖儆僭僬僦僮儇儋仝氽佘佥俎龠汆籴兮巽黉馘冁夔勹匍訇匐凫夙兕亠兖亳衮袤亵脔裒禀嬴蠃羸冫冱冽冼"], +["da40","贎",14,"贠赑赒赗赟赥赨赩赪赬赮赯赱赲赸",8,"趂趃趆趇趈趉趌",4,"趒趓趕",9,"趠趡"], +["da80","趢趤",12,"趲趶趷趹趻趽跀跁跂跅跇跈跉跊跍跐跒跓跔凇冖冢冥讠讦讧讪讴讵讷诂诃诋诏诎诒诓诔诖诘诙诜诟诠诤诨诩诮诰诳诶诹诼诿谀谂谄谇谌谏谑谒谔谕谖谙谛谘谝谟谠谡谥谧谪谫谮谯谲谳谵谶卩卺阝阢阡阱阪阽阼陂陉陔陟陧陬陲陴隈隍隗隰邗邛邝邙邬邡邴邳邶邺"], +["db40","跕跘跙跜跠跡跢跥跦跧跩跭跮跰跱跲跴跶跼跾",6,"踆踇踈踋踍踎踐踑踒踓踕",7,"踠踡踤",4,"踫踭踰踲踳踴踶踷踸踻踼踾"], +["db80","踿蹃蹅蹆蹌",4,"蹓",5,"蹚",11,"蹧蹨蹪蹫蹮蹱邸邰郏郅邾郐郄郇郓郦郢郜郗郛郫郯郾鄄鄢鄞鄣鄱鄯鄹酃酆刍奂劢劬劭劾哿勐勖勰叟燮矍廴凵凼鬯厶弁畚巯坌垩垡塾墼壅壑圩圬圪圳圹圮圯坜圻坂坩垅坫垆坼坻坨坭坶坳垭垤垌垲埏垧垴垓垠埕埘埚埙埒垸埴埯埸埤埝"], +["dc40","蹳蹵蹷",4,"蹽蹾躀躂躃躄躆躈",6,"躑躒躓躕",6,"躝躟",11,"躭躮躰躱躳",6,"躻",7], +["dc80","軃",10,"軏",21,"堋堍埽埭堀堞堙塄堠塥塬墁墉墚墀馨鼙懿艹艽艿芏芊芨芄芎芑芗芙芫芸芾芰苈苊苣芘芷芮苋苌苁芩芴芡芪芟苄苎芤苡茉苷苤茏茇苜苴苒苘茌苻苓茑茚茆茔茕苠苕茜荑荛荜茈莒茼茴茱莛荞茯荏荇荃荟荀茗荠茭茺茳荦荥"], +["dd40","軥",62], +["dd80","輤",32,"荨茛荩荬荪荭荮莰荸莳莴莠莪莓莜莅荼莶莩荽莸荻莘莞莨莺莼菁萁菥菘堇萘萋菝菽菖萜萸萑萆菔菟萏萃菸菹菪菅菀萦菰菡葜葑葚葙葳蒇蒈葺蒉葸萼葆葩葶蒌蒎萱葭蓁蓍蓐蓦蒽蓓蓊蒿蒺蓠蒡蒹蒴蒗蓥蓣蔌甍蔸蓰蔹蔟蔺"], +["de40","轅",32,"轪辀辌辒辝辠辡辢辤辥辦辧辪辬辭辮辯農辳辴辵辷辸辺辻込辿迀迃迆"], +["de80","迉",4,"迏迒迖迗迚迠迡迣迧迬迯迱迲迴迵迶迺迻迼迾迿逇逈逌逎逓逕逘蕖蔻蓿蓼蕙蕈蕨蕤蕞蕺瞢蕃蕲蕻薤薨薇薏蕹薮薜薅薹薷薰藓藁藜藿蘧蘅蘩蘖蘼廾弈夼奁耷奕奚奘匏尢尥尬尴扌扪抟抻拊拚拗拮挢拶挹捋捃掭揶捱捺掎掴捭掬掊捩掮掼揲揸揠揿揄揞揎摒揆掾摅摁搋搛搠搌搦搡摞撄摭撖"], +["df40","這逜連逤逥逧",5,"逰",4,"逷逹逺逽逿遀遃遅遆遈",4,"過達違遖遙遚遜",5,"遤遦遧適遪遫遬遯",4,"遶",6,"遾邁"], +["df80","還邅邆邇邉邊邌",4,"邒邔邖邘邚邜邞邟邠邤邥邧邨邩邫邭邲邷邼邽邿郀摺撷撸撙撺擀擐擗擤擢攉攥攮弋忒甙弑卟叱叽叩叨叻吒吖吆呋呒呓呔呖呃吡呗呙吣吲咂咔呷呱呤咚咛咄呶呦咝哐咭哂咴哒咧咦哓哔呲咣哕咻咿哌哙哚哜咩咪咤哝哏哞唛哧唠哽唔哳唢唣唏唑唧唪啧喏喵啉啭啁啕唿啐唼"], +["e040","郂郃郆郈郉郋郌郍郒郔郕郖郘郙郚郞郟郠郣郤郥郩郪郬郮郰郱郲郳郵郶郷郹郺郻郼郿鄀鄁鄃鄅",19,"鄚鄛鄜"], +["e080","鄝鄟鄠鄡鄤",10,"鄰鄲",6,"鄺",8,"酄唷啖啵啶啷唳唰啜喋嗒喃喱喹喈喁喟啾嗖喑啻嗟喽喾喔喙嗪嗷嗉嘟嗑嗫嗬嗔嗦嗝嗄嗯嗥嗲嗳嗌嗍嗨嗵嗤辔嘞嘈嘌嘁嘤嘣嗾嘀嘧嘭噘嘹噗嘬噍噢噙噜噌噔嚆噤噱噫噻噼嚅嚓嚯囔囗囝囡囵囫囹囿圄圊圉圜帏帙帔帑帱帻帼"], +["e140","酅酇酈酑酓酔酕酖酘酙酛酜酟酠酦酧酨酫酭酳酺酻酼醀",4,"醆醈醊醎醏醓",6,"醜",5,"醤",5,"醫醬醰醱醲醳醶醷醸醹醻"], +["e180","醼",10,"釈釋釐釒",9,"針",8,"帷幄幔幛幞幡岌屺岍岐岖岈岘岙岑岚岜岵岢岽岬岫岱岣峁岷峄峒峤峋峥崂崃崧崦崮崤崞崆崛嵘崾崴崽嵬嵛嵯嵝嵫嵋嵊嵩嵴嶂嶙嶝豳嶷巅彳彷徂徇徉後徕徙徜徨徭徵徼衢彡犭犰犴犷犸狃狁狎狍狒狨狯狩狲狴狷猁狳猃狺"], +["e240","釦",62], +["e280","鈥",32,"狻猗猓猡猊猞猝猕猢猹猥猬猸猱獐獍獗獠獬獯獾舛夥飧夤夂饣饧",5,"饴饷饽馀馄馇馊馍馐馑馓馔馕庀庑庋庖庥庠庹庵庾庳赓廒廑廛廨廪膺忄忉忖忏怃忮怄忡忤忾怅怆忪忭忸怙怵怦怛怏怍怩怫怊怿怡恸恹恻恺恂"], +["e340","鉆",45,"鉵",16], +["e380","銆",7,"銏",24,"恪恽悖悚悭悝悃悒悌悛惬悻悱惝惘惆惚悴愠愦愕愣惴愀愎愫慊慵憬憔憧憷懔懵忝隳闩闫闱闳闵闶闼闾阃阄阆阈阊阋阌阍阏阒阕阖阗阙阚丬爿戕氵汔汜汊沣沅沐沔沌汨汩汴汶沆沩泐泔沭泷泸泱泗沲泠泖泺泫泮沱泓泯泾"], +["e440","銨",5,"銯",24,"鋉",31], +["e480","鋩",32,"洹洧洌浃浈洇洄洙洎洫浍洮洵洚浏浒浔洳涑浯涞涠浞涓涔浜浠浼浣渚淇淅淞渎涿淠渑淦淝淙渖涫渌涮渫湮湎湫溲湟溆湓湔渲渥湄滟溱溘滠漭滢溥溧溽溻溷滗溴滏溏滂溟潢潆潇漤漕滹漯漶潋潴漪漉漩澉澍澌潸潲潼潺濑"], +["e540","錊",51,"錿",10], +["e580","鍊",31,"鍫濉澧澹澶濂濡濮濞濠濯瀚瀣瀛瀹瀵灏灞宀宄宕宓宥宸甯骞搴寤寮褰寰蹇謇辶迓迕迥迮迤迩迦迳迨逅逄逋逦逑逍逖逡逵逶逭逯遄遑遒遐遨遘遢遛暹遴遽邂邈邃邋彐彗彖彘尻咫屐屙孱屣屦羼弪弩弭艴弼鬻屮妁妃妍妩妪妣"], +["e640","鍬",34,"鎐",27], +["e680","鎬",29,"鏋鏌鏍妗姊妫妞妤姒妲妯姗妾娅娆姝娈姣姘姹娌娉娲娴娑娣娓婀婧婊婕娼婢婵胬媪媛婷婺媾嫫媲嫒嫔媸嫠嫣嫱嫖嫦嫘嫜嬉嬗嬖嬲嬷孀尕尜孚孥孳孑孓孢驵驷驸驺驿驽骀骁骅骈骊骐骒骓骖骘骛骜骝骟骠骢骣骥骧纟纡纣纥纨纩"], +["e740","鏎",7,"鏗",54], +["e780","鐎",32,"纭纰纾绀绁绂绉绋绌绐绔绗绛绠绡绨绫绮绯绱绲缍绶绺绻绾缁缂缃缇缈缋缌缏缑缒缗缙缜缛缟缡",6,"缪缫缬缭缯",4,"缵幺畿巛甾邕玎玑玮玢玟珏珂珑玷玳珀珉珈珥珙顼琊珩珧珞玺珲琏琪瑛琦琥琨琰琮琬"], +["e840","鐯",14,"鐿",43,"鑬鑭鑮鑯"], +["e880","鑰",20,"钑钖钘铇铏铓铔铚铦铻锜锠琛琚瑁瑜瑗瑕瑙瑷瑭瑾璜璎璀璁璇璋璞璨璩璐璧瓒璺韪韫韬杌杓杞杈杩枥枇杪杳枘枧杵枨枞枭枋杷杼柰栉柘栊柩枰栌柙枵柚枳柝栀柃枸柢栎柁柽栲栳桠桡桎桢桄桤梃栝桕桦桁桧桀栾桊桉栩梵梏桴桷梓桫棂楮棼椟椠棹"], +["e940","锧锳锽镃镈镋镕镚镠镮镴镵長",7,"門",42], +["e980","閫",32,"椤棰椋椁楗棣椐楱椹楠楂楝榄楫榀榘楸椴槌榇榈槎榉楦楣楹榛榧榻榫榭槔榱槁槊槟榕槠榍槿樯槭樗樘橥槲橄樾檠橐橛樵檎橹樽樨橘橼檑檐檩檗檫猷獒殁殂殇殄殒殓殍殚殛殡殪轫轭轱轲轳轵轶轸轷轹轺轼轾辁辂辄辇辋"], +["ea40","闌",27,"闬闿阇阓阘阛阞阠阣",6,"阫阬阭阯阰阷阸阹阺阾陁陃陊陎陏陑陒陓陖陗"], +["ea80","陘陙陚陜陝陞陠陣陥陦陫陭",4,"陳陸",12,"隇隉隊辍辎辏辘辚軎戋戗戛戟戢戡戥戤戬臧瓯瓴瓿甏甑甓攴旮旯旰昊昙杲昃昕昀炅曷昝昴昱昶昵耆晟晔晁晏晖晡晗晷暄暌暧暝暾曛曜曦曩贲贳贶贻贽赀赅赆赈赉赇赍赕赙觇觊觋觌觎觏觐觑牮犟牝牦牯牾牿犄犋犍犏犒挈挲掰"], +["eb40","隌階隑隒隓隕隖隚際隝",9,"隨",7,"隱隲隴隵隷隸隺隻隿雂雃雈雊雋雐雑雓雔雖",9,"雡",6,"雫"], +["eb80","雬雭雮雰雱雲雴雵雸雺電雼雽雿霂霃霅霊霋霌霐霑霒霔霕霗",4,"霝霟霠搿擘耄毪毳毽毵毹氅氇氆氍氕氘氙氚氡氩氤氪氲攵敕敫牍牒牖爰虢刖肟肜肓肼朊肽肱肫肭肴肷胧胨胩胪胛胂胄胙胍胗朐胝胫胱胴胭脍脎胲胼朕脒豚脶脞脬脘脲腈腌腓腴腙腚腱腠腩腼腽腭腧塍媵膈膂膑滕膣膪臌朦臊膻"], +["ec40","霡",8,"霫霬霮霯霱霳",4,"霺霻霼霽霿",18,"靔靕靗靘靚靜靝靟靣靤靦靧靨靪",7], +["ec80","靲靵靷",4,"靽",7,"鞆",4,"鞌鞎鞏鞐鞓鞕鞖鞗鞙",4,"臁膦欤欷欹歃歆歙飑飒飓飕飙飚殳彀毂觳斐齑斓於旆旄旃旌旎旒旖炀炜炖炝炻烀炷炫炱烨烊焐焓焖焯焱煳煜煨煅煲煊煸煺熘熳熵熨熠燠燔燧燹爝爨灬焘煦熹戾戽扃扈扉礻祀祆祉祛祜祓祚祢祗祠祯祧祺禅禊禚禧禳忑忐"], +["ed40","鞞鞟鞡鞢鞤",6,"鞬鞮鞰鞱鞳鞵",46], +["ed80","韤韥韨韮",4,"韴韷",23,"怼恝恚恧恁恙恣悫愆愍慝憩憝懋懑戆肀聿沓泶淼矶矸砀砉砗砘砑斫砭砜砝砹砺砻砟砼砥砬砣砩硎硭硖硗砦硐硇硌硪碛碓碚碇碜碡碣碲碹碥磔磙磉磬磲礅磴礓礤礞礴龛黹黻黼盱眄眍盹眇眈眚眢眙眭眦眵眸睐睑睇睃睚睨"], +["ee40","頏",62], +["ee80","顎",32,"睢睥睿瞍睽瞀瞌瞑瞟瞠瞰瞵瞽町畀畎畋畈畛畲畹疃罘罡罟詈罨罴罱罹羁罾盍盥蠲钅钆钇钋钊钌钍钏钐钔钗钕钚钛钜钣钤钫钪钭钬钯钰钲钴钶",4,"钼钽钿铄铈",6,"铐铑铒铕铖铗铙铘铛铞铟铠铢铤铥铧铨铪"], +["ef40","顯",5,"颋颎颒颕颙颣風",37,"飏飐飔飖飗飛飜飝飠",4], +["ef80","飥飦飩",30,"铩铫铮铯铳铴铵铷铹铼铽铿锃锂锆锇锉锊锍锎锏锒",4,"锘锛锝锞锟锢锪锫锩锬锱锲锴锶锷锸锼锾锿镂锵镄镅镆镉镌镎镏镒镓镔镖镗镘镙镛镞镟镝镡镢镤",8,"镯镱镲镳锺矧矬雉秕秭秣秫稆嵇稃稂稞稔"], +["f040","餈",4,"餎餏餑",28,"餯",26], +["f080","饊",9,"饖",12,"饤饦饳饸饹饻饾馂馃馉稹稷穑黏馥穰皈皎皓皙皤瓞瓠甬鸠鸢鸨",4,"鸲鸱鸶鸸鸷鸹鸺鸾鹁鹂鹄鹆鹇鹈鹉鹋鹌鹎鹑鹕鹗鹚鹛鹜鹞鹣鹦",6,"鹱鹭鹳疒疔疖疠疝疬疣疳疴疸痄疱疰痃痂痖痍痣痨痦痤痫痧瘃痱痼痿瘐瘀瘅瘌瘗瘊瘥瘘瘕瘙"], +["f140","馌馎馚",10,"馦馧馩",47], +["f180","駙",32,"瘛瘼瘢瘠癀瘭瘰瘿瘵癃瘾瘳癍癞癔癜癖癫癯翊竦穸穹窀窆窈窕窦窠窬窨窭窳衤衩衲衽衿袂袢裆袷袼裉裢裎裣裥裱褚裼裨裾裰褡褙褓褛褊褴褫褶襁襦襻疋胥皲皴矜耒耔耖耜耠耢耥耦耧耩耨耱耋耵聃聆聍聒聩聱覃顸颀颃"], +["f240","駺",62], +["f280","騹",32,"颉颌颍颏颔颚颛颞颟颡颢颥颦虍虔虬虮虿虺虼虻蚨蚍蚋蚬蚝蚧蚣蚪蚓蚩蚶蛄蚵蛎蚰蚺蚱蚯蛉蛏蚴蛩蛱蛲蛭蛳蛐蜓蛞蛴蛟蛘蛑蜃蜇蛸蜈蜊蜍蜉蜣蜻蜞蜥蜮蜚蜾蝈蜴蜱蜩蜷蜿螂蜢蝽蝾蝻蝠蝰蝌蝮螋蝓蝣蝼蝤蝙蝥螓螯螨蟒"], +["f340","驚",17,"驲骃骉骍骎骔骕骙骦骩",6,"骲骳骴骵骹骻骽骾骿髃髄髆",4,"髍髎髏髐髒體髕髖髗髙髚髛髜"], +["f380","髝髞髠髢髣髤髥髧髨髩髪髬髮髰",8,"髺髼",6,"鬄鬅鬆蟆螈螅螭螗螃螫蟥螬螵螳蟋蟓螽蟑蟀蟊蟛蟪蟠蟮蠖蠓蟾蠊蠛蠡蠹蠼缶罂罄罅舐竺竽笈笃笄笕笊笫笏筇笸笪笙笮笱笠笥笤笳笾笞筘筚筅筵筌筝筠筮筻筢筲筱箐箦箧箸箬箝箨箅箪箜箢箫箴篑篁篌篝篚篥篦篪簌篾篼簏簖簋"], +["f440","鬇鬉",5,"鬐鬑鬒鬔",10,"鬠鬡鬢鬤",10,"鬰鬱鬳",7,"鬽鬾鬿魀魆魊魋魌魎魐魒魓魕",5], +["f480","魛",32,"簟簪簦簸籁籀臾舁舂舄臬衄舡舢舣舭舯舨舫舸舻舳舴舾艄艉艋艏艚艟艨衾袅袈裘裟襞羝羟羧羯羰羲籼敉粑粝粜粞粢粲粼粽糁糇糌糍糈糅糗糨艮暨羿翎翕翥翡翦翩翮翳糸絷綦綮繇纛麸麴赳趄趔趑趱赧赭豇豉酊酐酎酏酤"], +["f540","魼",62], +["f580","鮻",32,"酢酡酰酩酯酽酾酲酴酹醌醅醐醍醑醢醣醪醭醮醯醵醴醺豕鹾趸跫踅蹙蹩趵趿趼趺跄跖跗跚跞跎跏跛跆跬跷跸跣跹跻跤踉跽踔踝踟踬踮踣踯踺蹀踹踵踽踱蹉蹁蹂蹑蹒蹊蹰蹶蹼蹯蹴躅躏躔躐躜躞豸貂貊貅貘貔斛觖觞觚觜"], +["f640","鯜",62], +["f680","鰛",32,"觥觫觯訾謦靓雩雳雯霆霁霈霏霎霪霭霰霾龀龃龅",5,"龌黾鼋鼍隹隼隽雎雒瞿雠銎銮鋈錾鍪鏊鎏鐾鑫鱿鲂鲅鲆鲇鲈稣鲋鲎鲐鲑鲒鲔鲕鲚鲛鲞",5,"鲥",4,"鲫鲭鲮鲰",7,"鲺鲻鲼鲽鳄鳅鳆鳇鳊鳋"], +["f740","鰼",62], +["f780","鱻鱽鱾鲀鲃鲄鲉鲊鲌鲏鲓鲖鲗鲘鲙鲝鲪鲬鲯鲹鲾",4,"鳈鳉鳑鳒鳚鳛鳠鳡鳌",4,"鳓鳔鳕鳗鳘鳙鳜鳝鳟鳢靼鞅鞑鞒鞔鞯鞫鞣鞲鞴骱骰骷鹘骶骺骼髁髀髅髂髋髌髑魅魃魇魉魈魍魑飨餍餮饕饔髟髡髦髯髫髻髭髹鬈鬏鬓鬟鬣麽麾縻麂麇麈麋麒鏖麝麟黛黜黝黠黟黢黩黧黥黪黯鼢鼬鼯鼹鼷鼽鼾齄"], +["f840","鳣",62], +["f880","鴢",32], +["f940","鵃",62], +["f980","鶂",32], +["fa40","鶣",62], +["fa80","鷢",32], +["fb40","鸃",27,"鸤鸧鸮鸰鸴鸻鸼鹀鹍鹐鹒鹓鹔鹖鹙鹝鹟鹠鹡鹢鹥鹮鹯鹲鹴",9,"麀"], +["fb80","麁麃麄麅麆麉麊麌",5,"麔",8,"麞麠",5,"麧麨麩麪"], +["fc40","麫",8,"麵麶麷麹麺麼麿",4,"黅黆黇黈黊黋黌黐黒黓黕黖黗黙黚點黡黣黤黦黨黫黬黭黮黰",8,"黺黽黿",6], +["fc80","鼆",4,"鼌鼏鼑鼒鼔鼕鼖鼘鼚",5,"鼡鼣",8,"鼭鼮鼰鼱"], +["fd40","鼲",4,"鼸鼺鼼鼿",4,"齅",10,"齒",38], +["fd80","齹",5,"龁龂龍",11,"龜龝龞龡",4,"郎凉秊裏隣"], +["fe40","兀嗀﨎﨏﨑﨓﨔礼﨟蘒﨡﨣﨤﨧﨨﨩"] +] diff --git a/pitfall/pdfkit/node_modules/iconv-lite/encodings/tables/cp949.json b/pitfall/pdfkit/node_modules/iconv-lite/encodings/tables/cp949.json new file mode 100644 index 00000000..2022a007 --- /dev/null +++ b/pitfall/pdfkit/node_modules/iconv-lite/encodings/tables/cp949.json @@ -0,0 +1,273 @@ +[ +["0","\u0000",127], +["8141","갂갃갅갆갋",4,"갘갞갟갡갢갣갥",6,"갮갲갳갴"], +["8161","갵갶갷갺갻갽갾갿걁",9,"걌걎",5,"걕"], +["8181","걖걗걙걚걛걝",18,"걲걳걵걶걹걻",4,"겂겇겈겍겎겏겑겒겓겕",6,"겞겢",5,"겫겭겮겱",6,"겺겾겿곀곂곃곅곆곇곉곊곋곍",7,"곖곘",7,"곢곣곥곦곩곫곭곮곲곴곷",4,"곾곿괁괂괃괅괇",4,"괎괐괒괓"], +["8241","괔괕괖괗괙괚괛괝괞괟괡",7,"괪괫괮",5], +["8261","괶괷괹괺괻괽",6,"굆굈굊",5,"굑굒굓굕굖굗"], +["8281","굙",7,"굢굤",7,"굮굯굱굲굷굸굹굺굾궀궃",4,"궊궋궍궎궏궑",10,"궞",5,"궥",17,"궸",7,"귂귃귅귆귇귉",6,"귒귔",7,"귝귞귟귡귢귣귥",18], +["8341","귺귻귽귾긂",5,"긊긌긎",5,"긕",7], +["8361","긝",18,"긲긳긵긶긹긻긼"], +["8381","긽긾긿깂깄깇깈깉깋깏깑깒깓깕깗",4,"깞깢깣깤깦깧깪깫깭깮깯깱",6,"깺깾",5,"꺆",5,"꺍",46,"꺿껁껂껃껅",6,"껎껒",5,"껚껛껝",8], +["8441","껦껧껩껪껬껮",5,"껵껶껷껹껺껻껽",8], +["8461","꼆꼉꼊꼋꼌꼎꼏꼑",18], +["8481","꼤",7,"꼮꼯꼱꼳꼵",6,"꼾꽀꽄꽅꽆꽇꽊",5,"꽑",10,"꽞",5,"꽦",18,"꽺",5,"꾁꾂꾃꾅꾆꾇꾉",6,"꾒꾓꾔꾖",5,"꾝",26,"꾺꾻꾽꾾"], +["8541","꾿꿁",5,"꿊꿌꿏",4,"꿕",6,"꿝",4], +["8561","꿢",5,"꿪",5,"꿲꿳꿵꿶꿷꿹",6,"뀂뀃"], +["8581","뀅",6,"뀍뀎뀏뀑뀒뀓뀕",6,"뀞",9,"뀩",26,"끆끇끉끋끍끏끐끑끒끖끘끚끛끜끞",29,"끾끿낁낂낃낅",6,"낎낐낒",5,"낛낝낞낣낤"], +["8641","낥낦낧낪낰낲낶낷낹낺낻낽",6,"냆냊",5,"냒"], +["8661","냓냕냖냗냙",6,"냡냢냣냤냦",10], +["8681","냱",22,"넊넍넎넏넑넔넕넖넗넚넞",4,"넦넧넩넪넫넭",6,"넶넺",5,"녂녃녅녆녇녉",6,"녒녓녖녗녙녚녛녝녞녟녡",22,"녺녻녽녾녿놁놃",4,"놊놌놎놏놐놑놕놖놗놙놚놛놝"], +["8741","놞",9,"놩",15], +["8761","놹",18,"뇍뇎뇏뇑뇒뇓뇕"], +["8781","뇖",5,"뇞뇠",7,"뇪뇫뇭뇮뇯뇱",7,"뇺뇼뇾",5,"눆눇눉눊눍",6,"눖눘눚",5,"눡",18,"눵",6,"눽",26,"뉙뉚뉛뉝뉞뉟뉡",6,"뉪",4], +["8841","뉯",4,"뉶",5,"뉽",6,"늆늇늈늊",4], +["8861","늏늒늓늕늖늗늛",4,"늢늤늧늨늩늫늭늮늯늱늲늳늵늶늷"], +["8881","늸",15,"닊닋닍닎닏닑닓",4,"닚닜닞닟닠닡닣닧닩닪닰닱닲닶닼닽닾댂댃댅댆댇댉",6,"댒댖",5,"댝",54,"덗덙덚덝덠덡덢덣"], +["8941","덦덨덪덬덭덯덲덳덵덶덷덹",6,"뎂뎆",5,"뎍"], +["8961","뎎뎏뎑뎒뎓뎕",10,"뎢",5,"뎩뎪뎫뎭"], +["8981","뎮",21,"돆돇돉돊돍돏돑돒돓돖돘돚돜돞돟돡돢돣돥돦돧돩",18,"돽",18,"됑",6,"됙됚됛됝됞됟됡",6,"됪됬",7,"됵",15], +["8a41","둅",10,"둒둓둕둖둗둙",6,"둢둤둦"], +["8a61","둧",4,"둭",18,"뒁뒂"], +["8a81","뒃",4,"뒉",19,"뒞",5,"뒥뒦뒧뒩뒪뒫뒭",7,"뒶뒸뒺",5,"듁듂듃듅듆듇듉",6,"듑듒듓듔듖",5,"듞듟듡듢듥듧",4,"듮듰듲",5,"듹",26,"딖딗딙딚딝"], +["8b41","딞",5,"딦딫",4,"딲딳딵딶딷딹",6,"땂땆"], +["8b61","땇땈땉땊땎땏땑땒땓땕",6,"땞땢",8], +["8b81","땫",52,"떢떣떥떦떧떩떬떭떮떯떲떶",4,"떾떿뗁뗂뗃뗅",6,"뗎뗒",5,"뗙",18,"뗭",18], +["8c41","똀",15,"똒똓똕똖똗똙",4], +["8c61","똞",6,"똦",5,"똭",6,"똵",5], +["8c81","똻",12,"뙉",26,"뙥뙦뙧뙩",50,"뚞뚟뚡뚢뚣뚥",5,"뚭뚮뚯뚰뚲",16], +["8d41","뛃",16,"뛕",8], +["8d61","뛞",17,"뛱뛲뛳뛵뛶뛷뛹뛺"], +["8d81","뛻",4,"뜂뜃뜄뜆",33,"뜪뜫뜭뜮뜱",6,"뜺뜼",7,"띅띆띇띉띊띋띍",6,"띖",9,"띡띢띣띥띦띧띩",6,"띲띴띶",5,"띾띿랁랂랃랅",6,"랎랓랔랕랚랛랝랞"], +["8e41","랟랡",6,"랪랮",5,"랶랷랹",8], +["8e61","럂",4,"럈럊",19], +["8e81","럞",13,"럮럯럱럲럳럵",6,"럾렂",4,"렊렋렍렎렏렑",6,"렚렜렞",5,"렦렧렩렪렫렭",6,"렶렺",5,"롁롂롃롅",11,"롒롔",7,"롞롟롡롢롣롥",6,"롮롰롲",5,"롹롺롻롽",7], +["8f41","뢅",7,"뢎",17], +["8f61","뢠",7,"뢩",6,"뢱뢲뢳뢵뢶뢷뢹",4], +["8f81","뢾뢿룂룄룆",5,"룍룎룏룑룒룓룕",7,"룞룠룢",5,"룪룫룭룮룯룱",6,"룺룼룾",5,"뤅",18,"뤙",6,"뤡",26,"뤾뤿륁륂륃륅",6,"륍륎륐륒",5], +["9041","륚륛륝륞륟륡",6,"륪륬륮",5,"륶륷륹륺륻륽"], +["9061","륾",5,"릆릈릋릌릏",15], +["9081","릟",12,"릮릯릱릲릳릵",6,"릾맀맂",5,"맊맋맍맓",4,"맚맜맟맠맢맦맧맩맪맫맭",6,"맶맻",4,"먂",5,"먉",11,"먖",33,"먺먻먽먾먿멁멃멄멅멆"], +["9141","멇멊멌멏멐멑멒멖멗멙멚멛멝",6,"멦멪",5], +["9161","멲멳멵멶멷멹",9,"몆몈몉몊몋몍",5], +["9181","몓",20,"몪몭몮몯몱몳",4,"몺몼몾",5,"뫅뫆뫇뫉",14,"뫚",33,"뫽뫾뫿묁묂묃묅",7,"묎묐묒",5,"묙묚묛묝묞묟묡",6], +["9241","묨묪묬",7,"묷묹묺묿",4,"뭆뭈뭊뭋뭌뭎뭑뭒"], +["9261","뭓뭕뭖뭗뭙",7,"뭢뭤",7,"뭭",4], +["9281","뭲",21,"뮉뮊뮋뮍뮎뮏뮑",18,"뮥뮦뮧뮩뮪뮫뮭",6,"뮵뮶뮸",7,"믁믂믃믅믆믇믉",6,"믑믒믔",35,"믺믻믽믾밁"], +["9341","밃",4,"밊밎밐밒밓밙밚밠밡밢밣밦밨밪밫밬밮밯밲밳밵"], +["9361","밶밷밹",6,"뱂뱆뱇뱈뱊뱋뱎뱏뱑",8], +["9381","뱚뱛뱜뱞",37,"벆벇벉벊벍벏",4,"벖벘벛",4,"벢벣벥벦벩",6,"벲벶",5,"벾벿볁볂볃볅",7,"볎볒볓볔볖볗볙볚볛볝",22,"볷볹볺볻볽"], +["9441","볾",5,"봆봈봊",5,"봑봒봓봕",8], +["9461","봞",5,"봥",6,"봭",12], +["9481","봺",5,"뵁",6,"뵊뵋뵍뵎뵏뵑",6,"뵚",9,"뵥뵦뵧뵩",22,"붂붃붅붆붋",4,"붒붔붖붗붘붛붝",6,"붥",10,"붱",6,"붹",24], +["9541","뷒뷓뷖뷗뷙뷚뷛뷝",11,"뷪",5,"뷱"], +["9561","뷲뷳뷵뷶뷷뷹",6,"븁븂븄븆",5,"븎븏븑븒븓"], +["9581","븕",6,"븞븠",35,"빆빇빉빊빋빍빏",4,"빖빘빜빝빞빟빢빣빥빦빧빩빫",4,"빲빶",4,"빾빿뺁뺂뺃뺅",6,"뺎뺒",5,"뺚",13,"뺩",14], +["9641","뺸",23,"뻒뻓"], +["9661","뻕뻖뻙",6,"뻡뻢뻦",5,"뻭",8], +["9681","뻶",10,"뼂",5,"뼊",13,"뼚뼞",33,"뽂뽃뽅뽆뽇뽉",6,"뽒뽓뽔뽖",44], +["9741","뾃",16,"뾕",8], +["9761","뾞",17,"뾱",7], +["9781","뾹",11,"뿆",5,"뿎뿏뿑뿒뿓뿕",6,"뿝뿞뿠뿢",89,"쀽쀾쀿"], +["9841","쁀",16,"쁒",5,"쁙쁚쁛"], +["9861","쁝쁞쁟쁡",6,"쁪",15], +["9881","쁺",21,"삒삓삕삖삗삙",6,"삢삤삦",5,"삮삱삲삷",4,"삾샂샃샄샆샇샊샋샍샎샏샑",6,"샚샞",5,"샦샧샩샪샫샭",6,"샶샸샺",5,"섁섂섃섅섆섇섉",6,"섑섒섓섔섖",5,"섡섢섥섨섩섪섫섮"], +["9941","섲섳섴섵섷섺섻섽섾섿셁",6,"셊셎",5,"셖셗"], +["9961","셙셚셛셝",6,"셦셪",5,"셱셲셳셵셶셷셹셺셻"], +["9981","셼",8,"솆",5,"솏솑솒솓솕솗",4,"솞솠솢솣솤솦솧솪솫솭솮솯솱",11,"솾",5,"쇅쇆쇇쇉쇊쇋쇍",6,"쇕쇖쇙",6,"쇡쇢쇣쇥쇦쇧쇩",6,"쇲쇴",7,"쇾쇿숁숂숃숅",6,"숎숐숒",5,"숚숛숝숞숡숢숣"], +["9a41","숤숥숦숧숪숬숮숰숳숵",16], +["9a61","쉆쉇쉉",6,"쉒쉓쉕쉖쉗쉙",6,"쉡쉢쉣쉤쉦"], +["9a81","쉧",4,"쉮쉯쉱쉲쉳쉵",6,"쉾슀슂",5,"슊",5,"슑",6,"슙슚슜슞",5,"슦슧슩슪슫슮",5,"슶슸슺",33,"싞싟싡싢싥",5,"싮싰싲싳싴싵싷싺싽싾싿쌁",6,"쌊쌋쌎쌏"], +["9b41","쌐쌑쌒쌖쌗쌙쌚쌛쌝",6,"쌦쌧쌪",8], +["9b61","쌳",17,"썆",7], +["9b81","썎",25,"썪썫썭썮썯썱썳",4,"썺썻썾",5,"쎅쎆쎇쎉쎊쎋쎍",50,"쏁",22,"쏚"], +["9c41","쏛쏝쏞쏡쏣",4,"쏪쏫쏬쏮",5,"쏶쏷쏹",5], +["9c61","쏿",8,"쐉",6,"쐑",9], +["9c81","쐛",8,"쐥",6,"쐭쐮쐯쐱쐲쐳쐵",6,"쐾",9,"쑉",26,"쑦쑧쑩쑪쑫쑭",6,"쑶쑷쑸쑺",5,"쒁",18,"쒕",6,"쒝",12], +["9d41","쒪",13,"쒹쒺쒻쒽",8], +["9d61","쓆",25], +["9d81","쓠",8,"쓪",5,"쓲쓳쓵쓶쓷쓹쓻쓼쓽쓾씂",9,"씍씎씏씑씒씓씕",6,"씝",10,"씪씫씭씮씯씱",6,"씺씼씾",5,"앆앇앋앏앐앑앒앖앚앛앜앟앢앣앥앦앧앩",6,"앲앶",5,"앾앿얁얂얃얅얆얈얉얊얋얎얐얒얓얔"], +["9e41","얖얙얚얛얝얞얟얡",7,"얪",9,"얶"], +["9e61","얷얺얿",4,"엋엍엏엒엓엕엖엗엙",6,"엢엤엦엧"], +["9e81","엨엩엪엫엯엱엲엳엵엸엹엺엻옂옃옄옉옊옋옍옎옏옑",6,"옚옝",6,"옦옧옩옪옫옯옱옲옶옸옺옼옽옾옿왂왃왅왆왇왉",6,"왒왖",5,"왞왟왡",10,"왭왮왰왲",5,"왺왻왽왾왿욁",6,"욊욌욎",5,"욖욗욙욚욛욝",6,"욦"], +["9f41","욨욪",5,"욲욳욵욶욷욻",4,"웂웄웆",5,"웎"], +["9f61","웏웑웒웓웕",6,"웞웟웢",5,"웪웫웭웮웯웱웲"], +["9f81","웳",4,"웺웻웼웾",5,"윆윇윉윊윋윍",6,"윖윘윚",5,"윢윣윥윦윧윩",6,"윲윴윶윸윹윺윻윾윿읁읂읃읅",4,"읋읎읐읙읚읛읝읞읟읡",6,"읩읪읬",7,"읶읷읹읺읻읿잀잁잂잆잋잌잍잏잒잓잕잙잛",4,"잢잧",4,"잮잯잱잲잳잵잶잷"], +["a041","잸잹잺잻잾쟂",5,"쟊쟋쟍쟏쟑",6,"쟙쟚쟛쟜"], +["a061","쟞",5,"쟥쟦쟧쟩쟪쟫쟭",13], +["a081","쟻",4,"젂젃젅젆젇젉젋",4,"젒젔젗",4,"젞젟젡젢젣젥",6,"젮젰젲",5,"젹젺젻젽젾젿졁",6,"졊졋졎",5,"졕",26,"졲졳졵졶졷졹졻",4,"좂좄좈좉좊좎",5,"좕",7,"좞좠좢좣좤"], +["a141","좥좦좧좩",18,"좾좿죀죁"], +["a161","죂죃죅죆죇죉죊죋죍",6,"죖죘죚",5,"죢죣죥"], +["a181","죦",14,"죶",5,"죾죿줁줂줃줇",4,"줎 、。·‥…¨〃­―∥\∼‘’“”〔〕〈",9,"±×÷≠≤≥∞∴°′″℃Å¢£¥♂♀∠⊥⌒∂∇≡≒§※☆★○●◎◇◆□■△▲▽▼→←↑↓↔〓≪≫√∽∝∵∫∬∈∋⊆⊇⊂⊃∪∩∧∨¬"], +["a241","줐줒",5,"줙",18], +["a261","줭",6,"줵",18], +["a281","쥈",7,"쥒쥓쥕쥖쥗쥙",6,"쥢쥤",7,"쥭쥮쥯⇒⇔∀∃´~ˇ˘˝˚˙¸˛¡¿ː∮∑∏¤℉‰◁◀▷▶♤♠♡♥♧♣⊙◈▣◐◑▒▤▥▨▧▦▩♨☏☎☜☞¶†‡↕↗↙↖↘♭♩♪♬㉿㈜№㏇™㏂㏘℡€®"], +["a341","쥱쥲쥳쥵",6,"쥽",10,"즊즋즍즎즏"], +["a361","즑",6,"즚즜즞",16], +["a381","즯",16,"짂짃짅짆짉짋",4,"짒짔짗짘짛!",58,"₩]",32," ̄"], +["a441","짞짟짡짣짥짦짨짩짪짫짮짲",5,"짺짻짽짾짿쨁쨂쨃쨄"], +["a461","쨅쨆쨇쨊쨎",5,"쨕쨖쨗쨙",12], +["a481","쨦쨧쨨쨪",28,"ㄱ",93], +["a541","쩇",4,"쩎쩏쩑쩒쩓쩕",6,"쩞쩢",5,"쩩쩪"], +["a561","쩫",17,"쩾",5,"쪅쪆"], +["a581","쪇",16,"쪙",14,"ⅰ",9], +["a5b0","Ⅰ",9], +["a5c1","Α",16,"Σ",6], +["a5e1","α",16,"σ",6], +["a641","쪨",19,"쪾쪿쫁쫂쫃쫅"], +["a661","쫆",5,"쫎쫐쫒쫔쫕쫖쫗쫚",5,"쫡",6], +["a681","쫨쫩쫪쫫쫭",6,"쫵",18,"쬉쬊─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂┒┑┚┙┖┕┎┍┞┟┡┢┦┧┩┪┭┮┱┲┵┶┹┺┽┾╀╁╃",7], +["a741","쬋",4,"쬑쬒쬓쬕쬖쬗쬙",6,"쬢",7], +["a761","쬪",22,"쭂쭃쭄"], +["a781","쭅쭆쭇쭊쭋쭍쭎쭏쭑",6,"쭚쭛쭜쭞",5,"쭥",7,"㎕㎖㎗ℓ㎘㏄㎣㎤㎥㎦㎙",9,"㏊㎍㎎㎏㏏㎈㎉㏈㎧㎨㎰",9,"㎀",4,"㎺",5,"㎐",4,"Ω㏀㏁㎊㎋㎌㏖㏅㎭㎮㎯㏛㎩㎪㎫㎬㏝㏐㏓㏃㏉㏜㏆"], +["a841","쭭",10,"쭺",14], +["a861","쮉",18,"쮝",6], +["a881","쮤",19,"쮹",11,"ÆЪĦ"], +["a8a6","IJ"], +["a8a8","ĿŁØŒºÞŦŊ"], +["a8b1","㉠",27,"ⓐ",25,"①",14,"½⅓⅔¼¾⅛⅜⅝⅞"], +["a941","쯅",14,"쯕",10], +["a961","쯠쯡쯢쯣쯥쯦쯨쯪",18], +["a981","쯽",14,"찎찏찑찒찓찕",6,"찞찟찠찣찤æđðħıijĸŀłøœßþŧŋʼn㈀",27,"⒜",25,"⑴",14,"¹²³⁴ⁿ₁₂₃₄"], +["aa41","찥찦찪찫찭찯찱",6,"찺찿",4,"챆챇챉챊챋챍챎"], +["aa61","챏",4,"챖챚",5,"챡챢챣챥챧챩",6,"챱챲"], +["aa81","챳챴챶",29,"ぁ",82], +["ab41","첔첕첖첗첚첛첝첞첟첡",6,"첪첮",5,"첶첷첹"], +["ab61","첺첻첽",6,"쳆쳈쳊",5,"쳑쳒쳓쳕",5], +["ab81","쳛",8,"쳥",6,"쳭쳮쳯쳱",12,"ァ",85], +["ac41","쳾쳿촀촂",5,"촊촋촍촎촏촑",6,"촚촜촞촟촠"], +["ac61","촡촢촣촥촦촧촩촪촫촭",11,"촺",4], +["ac81","촿",28,"쵝쵞쵟А",5,"ЁЖ",25], +["acd1","а",5,"ёж",25], +["ad41","쵡쵢쵣쵥",6,"쵮쵰쵲",5,"쵹",7], +["ad61","춁",6,"춉",10,"춖춗춙춚춛춝춞춟"], +["ad81","춠춡춢춣춦춨춪",5,"춱",18,"췅"], +["ae41","췆",5,"췍췎췏췑",16], +["ae61","췢",5,"췩췪췫췭췮췯췱",6,"췺췼췾",4], +["ae81","츃츅츆츇츉츊츋츍",6,"츕츖츗츘츚",5,"츢츣츥츦츧츩츪츫"], +["af41","츬츭츮츯츲츴츶",19], +["af61","칊",13,"칚칛칝칞칢",5,"칪칬"], +["af81","칮",5,"칶칷칹칺칻칽",6,"캆캈캊",5,"캒캓캕캖캗캙"], +["b041","캚",5,"캢캦",5,"캮",12], +["b061","캻",5,"컂",19], +["b081","컖",13,"컦컧컩컪컭",6,"컶컺",5,"가각간갇갈갉갊감",7,"같",4,"갠갤갬갭갯갰갱갸갹갼걀걋걍걔걘걜거걱건걷걸걺검겁것겄겅겆겉겊겋게겐겔겜겝겟겠겡겨격겪견겯결겸겹겻겼경곁계곈곌곕곗고곡곤곧골곪곬곯곰곱곳공곶과곽관괄괆"], +["b141","켂켃켅켆켇켉",6,"켒켔켖",5,"켝켞켟켡켢켣"], +["b161","켥",6,"켮켲",5,"켹",11], +["b181","콅",14,"콖콗콙콚콛콝",6,"콦콨콪콫콬괌괍괏광괘괜괠괩괬괭괴괵괸괼굄굅굇굉교굔굘굡굣구국군굳굴굵굶굻굼굽굿궁궂궈궉권궐궜궝궤궷귀귁귄귈귐귑귓규균귤그극근귿글긁금급긋긍긔기긱긴긷길긺김깁깃깅깆깊까깍깎깐깔깖깜깝깟깠깡깥깨깩깬깰깸"], +["b241","콭콮콯콲콳콵콶콷콹",6,"쾁쾂쾃쾄쾆",5,"쾍"], +["b261","쾎",18,"쾢",5,"쾩"], +["b281","쾪",5,"쾱",18,"쿅",6,"깹깻깼깽꺄꺅꺌꺼꺽꺾껀껄껌껍껏껐껑께껙껜껨껫껭껴껸껼꼇꼈꼍꼐꼬꼭꼰꼲꼴꼼꼽꼿꽁꽂꽃꽈꽉꽐꽜꽝꽤꽥꽹꾀꾄꾈꾐꾑꾕꾜꾸꾹꾼꿀꿇꿈꿉꿋꿍꿎꿔꿜꿨꿩꿰꿱꿴꿸뀀뀁뀄뀌뀐뀔뀜뀝뀨끄끅끈끊끌끎끓끔끕끗끙"], +["b341","쿌",19,"쿢쿣쿥쿦쿧쿩"], +["b361","쿪",5,"쿲쿴쿶",5,"쿽쿾쿿퀁퀂퀃퀅",5], +["b381","퀋",5,"퀒",5,"퀙",19,"끝끼끽낀낄낌낍낏낑나낙낚난낟날낡낢남납낫",4,"낱낳내낵낸낼냄냅냇냈냉냐냑냔냘냠냥너넉넋넌널넒넓넘넙넛넜넝넣네넥넨넬넴넵넷넸넹녀녁년녈념녑녔녕녘녜녠노녹논놀놂놈놉놋농높놓놔놘놜놨뇌뇐뇔뇜뇝"], +["b441","퀮",5,"퀶퀷퀹퀺퀻퀽",6,"큆큈큊",5], +["b461","큑큒큓큕큖큗큙",6,"큡",10,"큮큯"], +["b481","큱큲큳큵",6,"큾큿킀킂",18,"뇟뇨뇩뇬뇰뇹뇻뇽누눅눈눋눌눔눕눗눙눠눴눼뉘뉜뉠뉨뉩뉴뉵뉼늄늅늉느늑는늘늙늚늠늡늣능늦늪늬늰늴니닉닌닐닒님닙닛닝닢다닥닦단닫",4,"닳담답닷",4,"닿대댁댄댈댐댑댓댔댕댜더덕덖던덛덜덞덟덤덥"], +["b541","킕",14,"킦킧킩킪킫킭",5], +["b561","킳킶킸킺",5,"탂탃탅탆탇탊",5,"탒탖",4], +["b581","탛탞탟탡탢탣탥",6,"탮탲",5,"탹",11,"덧덩덫덮데덱덴델뎀뎁뎃뎄뎅뎌뎐뎔뎠뎡뎨뎬도독돈돋돌돎돐돔돕돗동돛돝돠돤돨돼됐되된될됨됩됫됴두둑둔둘둠둡둣둥둬뒀뒈뒝뒤뒨뒬뒵뒷뒹듀듄듈듐듕드득든듣들듦듬듭듯등듸디딕딘딛딜딤딥딧딨딩딪따딱딴딸"], +["b641","턅",7,"턎",17], +["b661","턠",15,"턲턳턵턶턷턹턻턼턽턾"], +["b681","턿텂텆",5,"텎텏텑텒텓텕",6,"텞텠텢",5,"텩텪텫텭땀땁땃땄땅땋때땍땐땔땜땝땟땠땡떠떡떤떨떪떫떰떱떳떴떵떻떼떽뗀뗄뗌뗍뗏뗐뗑뗘뗬또똑똔똘똥똬똴뙈뙤뙨뚜뚝뚠뚤뚫뚬뚱뛔뛰뛴뛸뜀뜁뜅뜨뜩뜬뜯뜰뜸뜹뜻띄띈띌띔띕띠띤띨띰띱띳띵라락란랄람랍랏랐랑랒랖랗"], +["b741","텮",13,"텽",6,"톅톆톇톉톊"], +["b761","톋",20,"톢톣톥톦톧"], +["b781","톩",6,"톲톴톶톷톸톹톻톽톾톿퇁",14,"래랙랜랠램랩랫랬랭랴략랸럇량러럭런럴럼럽럿렀렁렇레렉렌렐렘렙렛렝려력련렬렴렵렷렸령례롄롑롓로록론롤롬롭롯롱롸롼뢍뢨뢰뢴뢸룀룁룃룅료룐룔룝룟룡루룩룬룰룸룹룻룽뤄뤘뤠뤼뤽륀륄륌륏륑류륙륜률륨륩"], +["b841","퇐",7,"퇙",17], +["b861","퇫",8,"퇵퇶퇷퇹",13], +["b881","툈툊",5,"툑",24,"륫륭르륵른를름릅릇릉릊릍릎리릭린릴림립릿링마막만많",4,"맘맙맛망맞맡맣매맥맨맬맴맵맷맸맹맺먀먁먈먕머먹먼멀멂멈멉멋멍멎멓메멕멘멜멤멥멧멨멩며멱면멸몃몄명몇몌모목몫몬몰몲몸몹못몽뫄뫈뫘뫙뫼"], +["b941","툪툫툮툯툱툲툳툵",6,"툾퉀퉂",5,"퉉퉊퉋퉌"], +["b961","퉍",14,"퉝",6,"퉥퉦퉧퉨"], +["b981","퉩",22,"튂튃튅튆튇튉튊튋튌묀묄묍묏묑묘묜묠묩묫무묵묶문묻물묽묾뭄뭅뭇뭉뭍뭏뭐뭔뭘뭡뭣뭬뮈뮌뮐뮤뮨뮬뮴뮷므믄믈믐믓미믹민믿밀밂밈밉밋밌밍및밑바",4,"받",4,"밤밥밧방밭배백밴밸뱀뱁뱃뱄뱅뱉뱌뱍뱐뱝버벅번벋벌벎범법벗"], +["ba41","튍튎튏튒튓튔튖",5,"튝튞튟튡튢튣튥",6,"튭"], +["ba61","튮튯튰튲",5,"튺튻튽튾틁틃",4,"틊틌",5], +["ba81","틒틓틕틖틗틙틚틛틝",6,"틦",9,"틲틳틵틶틷틹틺벙벚베벡벤벧벨벰벱벳벴벵벼벽변별볍볏볐병볕볘볜보복볶본볼봄봅봇봉봐봔봤봬뵀뵈뵉뵌뵐뵘뵙뵤뵨부북분붇불붉붊붐붑붓붕붙붚붜붤붰붸뷔뷕뷘뷜뷩뷰뷴뷸븀븃븅브븍븐블븜븝븟비빅빈빌빎빔빕빗빙빚빛빠빡빤"], +["bb41","틻",4,"팂팄팆",5,"팏팑팒팓팕팗",4,"팞팢팣"], +["bb61","팤팦팧팪팫팭팮팯팱",6,"팺팾",5,"퍆퍇퍈퍉"], +["bb81","퍊",31,"빨빪빰빱빳빴빵빻빼빽뺀뺄뺌뺍뺏뺐뺑뺘뺙뺨뻐뻑뻔뻗뻘뻠뻣뻤뻥뻬뼁뼈뼉뼘뼙뼛뼜뼝뽀뽁뽄뽈뽐뽑뽕뾔뾰뿅뿌뿍뿐뿔뿜뿟뿡쀼쁑쁘쁜쁠쁨쁩삐삑삔삘삠삡삣삥사삭삯산삳살삵삶삼삽삿샀상샅새색샌샐샘샙샛샜생샤"], +["bc41","퍪",17,"퍾퍿펁펂펃펅펆펇"], +["bc61","펈펉펊펋펎펒",5,"펚펛펝펞펟펡",6,"펪펬펮"], +["bc81","펯",4,"펵펶펷펹펺펻펽",6,"폆폇폊",5,"폑",5,"샥샨샬샴샵샷샹섀섄섈섐섕서",4,"섣설섦섧섬섭섯섰성섶세섹센셀셈셉셋셌셍셔셕션셜셤셥셧셨셩셰셴셸솅소속솎손솔솖솜솝솟송솥솨솩솬솰솽쇄쇈쇌쇔쇗쇘쇠쇤쇨쇰쇱쇳쇼쇽숀숄숌숍숏숑수숙순숟술숨숩숫숭"], +["bd41","폗폙",7,"폢폤",7,"폮폯폱폲폳폵폶폷"], +["bd61","폸폹폺폻폾퐀퐂",5,"퐉",13], +["bd81","퐗",5,"퐞",25,"숯숱숲숴쉈쉐쉑쉔쉘쉠쉥쉬쉭쉰쉴쉼쉽쉿슁슈슉슐슘슛슝스슥슨슬슭슴습슷승시식신싣실싫심십싯싱싶싸싹싻싼쌀쌈쌉쌌쌍쌓쌔쌕쌘쌜쌤쌥쌨쌩썅써썩썬썰썲썸썹썼썽쎄쎈쎌쏀쏘쏙쏜쏟쏠쏢쏨쏩쏭쏴쏵쏸쐈쐐쐤쐬쐰"], +["be41","퐸",7,"푁푂푃푅",14], +["be61","푔",7,"푝푞푟푡푢푣푥",7,"푮푰푱푲"], +["be81","푳",4,"푺푻푽푾풁풃",4,"풊풌풎",5,"풕",8,"쐴쐼쐽쑈쑤쑥쑨쑬쑴쑵쑹쒀쒔쒜쒸쒼쓩쓰쓱쓴쓸쓺쓿씀씁씌씐씔씜씨씩씬씰씸씹씻씽아악안앉않알앍앎앓암압앗았앙앝앞애액앤앨앰앱앳앴앵야약얀얄얇얌얍얏양얕얗얘얜얠얩어억언얹얻얼얽얾엄",6,"엌엎"], +["bf41","풞",10,"풪",14], +["bf61","풹",18,"퓍퓎퓏퓑퓒퓓퓕"], +["bf81","퓖",5,"퓝퓞퓠",7,"퓩퓪퓫퓭퓮퓯퓱",6,"퓹퓺퓼에엑엔엘엠엡엣엥여역엮연열엶엷염",5,"옅옆옇예옌옐옘옙옛옜오옥온올옭옮옰옳옴옵옷옹옻와왁완왈왐왑왓왔왕왜왝왠왬왯왱외왹왼욀욈욉욋욍요욕욘욜욤욥욧용우욱운울욹욺움웁웃웅워웍원월웜웝웠웡웨"], +["c041","퓾",5,"픅픆픇픉픊픋픍",6,"픖픘",5], +["c061","픞",25], +["c081","픸픹픺픻픾픿핁핂핃핅",6,"핎핐핒",5,"핚핛핝핞핟핡핢핣웩웬웰웸웹웽위윅윈윌윔윕윗윙유육윤율윰윱윳융윷으윽은을읊음읍읏응",7,"읜읠읨읫이익인일읽읾잃임입잇있잉잊잎자작잔잖잗잘잚잠잡잣잤장잦재잭잰잴잼잽잿쟀쟁쟈쟉쟌쟎쟐쟘쟝쟤쟨쟬저적전절젊"], +["c141","핤핦핧핪핬핮",5,"핶핷핹핺핻핽",6,"햆햊햋"], +["c161","햌햍햎햏햑",19,"햦햧"], +["c181","햨",31,"점접젓정젖제젝젠젤젬젭젯젱져젼졀졈졉졌졍졔조족존졸졺좀좁좃종좆좇좋좌좍좔좝좟좡좨좼좽죄죈죌죔죕죗죙죠죡죤죵주죽준줄줅줆줌줍줏중줘줬줴쥐쥑쥔쥘쥠쥡쥣쥬쥰쥴쥼즈즉즌즐즘즙즛증지직진짇질짊짐집짓"], +["c241","헊헋헍헎헏헑헓",4,"헚헜헞",5,"헦헧헩헪헫헭헮"], +["c261","헯",4,"헶헸헺",5,"혂혃혅혆혇혉",6,"혒"], +["c281","혖",5,"혝혞혟혡혢혣혥",7,"혮",9,"혺혻징짖짙짚짜짝짠짢짤짧짬짭짯짰짱째짹짼쨀쨈쨉쨋쨌쨍쨔쨘쨩쩌쩍쩐쩔쩜쩝쩟쩠쩡쩨쩽쪄쪘쪼쪽쫀쫄쫌쫍쫏쫑쫓쫘쫙쫠쫬쫴쬈쬐쬔쬘쬠쬡쭁쭈쭉쭌쭐쭘쭙쭝쭤쭸쭹쮜쮸쯔쯤쯧쯩찌찍찐찔찜찝찡찢찧차착찬찮찰참찹찻"], +["c341","혽혾혿홁홂홃홄홆홇홊홌홎홏홐홒홓홖홗홙홚홛홝",4], +["c361","홢",4,"홨홪",5,"홲홳홵",11], +["c381","횁횂횄횆",5,"횎횏횑횒횓횕",7,"횞횠횢",5,"횩횪찼창찾채책챈챌챔챕챗챘챙챠챤챦챨챰챵처척천철첨첩첫첬청체첵첸첼쳄쳅쳇쳉쳐쳔쳤쳬쳰촁초촉촌촐촘촙촛총촤촨촬촹최쵠쵤쵬쵭쵯쵱쵸춈추축춘출춤춥춧충춰췄췌췐취췬췰췸췹췻췽츄츈츌츔츙츠측츤츨츰츱츳층"], +["c441","횫횭횮횯횱",7,"횺횼",7,"훆훇훉훊훋"], +["c461","훍훎훏훐훒훓훕훖훘훚",5,"훡훢훣훥훦훧훩",4], +["c481","훮훯훱훲훳훴훶",5,"훾훿휁휂휃휅",11,"휒휓휔치칙친칟칠칡침칩칫칭카칵칸칼캄캅캇캉캐캑캔캘캠캡캣캤캥캬캭컁커컥컨컫컬컴컵컷컸컹케켁켄켈켐켑켓켕켜켠켤켬켭켯켰켱켸코콕콘콜콤콥콧콩콰콱콴콸쾀쾅쾌쾡쾨쾰쿄쿠쿡쿤쿨쿰쿱쿳쿵쿼퀀퀄퀑퀘퀭퀴퀵퀸퀼"], +["c541","휕휖휗휚휛휝휞휟휡",6,"휪휬휮",5,"휶휷휹"], +["c561","휺휻휽",6,"흅흆흈흊",5,"흒흓흕흚",4], +["c581","흟흢흤흦흧흨흪흫흭흮흯흱흲흳흵",6,"흾흿힀힂",5,"힊힋큄큅큇큉큐큔큘큠크큭큰클큼큽킁키킥킨킬킴킵킷킹타탁탄탈탉탐탑탓탔탕태택탠탤탬탭탯탰탱탸턍터턱턴털턺텀텁텃텄텅테텍텐텔템텝텟텡텨텬텼톄톈토톡톤톨톰톱톳통톺톼퇀퇘퇴퇸툇툉툐투툭툰툴툼툽툿퉁퉈퉜"], +["c641","힍힎힏힑",6,"힚힜힞",5], +["c6a1","퉤튀튁튄튈튐튑튕튜튠튤튬튱트특튼튿틀틂틈틉틋틔틘틜틤틥티틱틴틸팀팁팃팅파팍팎판팔팖팜팝팟팠팡팥패팩팬팰팸팹팻팼팽퍄퍅퍼퍽펀펄펌펍펏펐펑페펙펜펠펨펩펫펭펴편펼폄폅폈평폐폘폡폣포폭폰폴폼폽폿퐁"], +["c7a1","퐈퐝푀푄표푠푤푭푯푸푹푼푿풀풂품풉풋풍풔풩퓌퓐퓔퓜퓟퓨퓬퓰퓸퓻퓽프픈플픔픕픗피픽핀필핌핍핏핑하학한할핥함합핫항해핵핸핼햄햅햇했행햐향허헉헌헐헒험헙헛헝헤헥헨헬헴헵헷헹혀혁현혈혐협혓혔형혜혠"], +["c8a1","혤혭호혹혼홀홅홈홉홋홍홑화확환활홧황홰홱홴횃횅회획횐횔횝횟횡효횬횰횹횻후훅훈훌훑훔훗훙훠훤훨훰훵훼훽휀휄휑휘휙휜휠휨휩휫휭휴휵휸휼흄흇흉흐흑흔흖흗흘흙흠흡흣흥흩희흰흴흼흽힁히힉힌힐힘힙힛힝"], +["caa1","伽佳假價加可呵哥嘉嫁家暇架枷柯歌珂痂稼苛茄街袈訶賈跏軻迦駕刻却各恪慤殼珏脚覺角閣侃刊墾奸姦干幹懇揀杆柬桿澗癎看磵稈竿簡肝艮艱諫間乫喝曷渴碣竭葛褐蝎鞨勘坎堪嵌感憾戡敢柑橄減甘疳監瞰紺邯鑑鑒龕"], +["cba1","匣岬甲胛鉀閘剛堈姜岡崗康强彊慷江畺疆糠絳綱羌腔舡薑襁講鋼降鱇介价個凱塏愷愾慨改槪漑疥皆盖箇芥蓋豈鎧開喀客坑更粳羹醵倨去居巨拒据據擧渠炬祛距踞車遽鉅鋸乾件健巾建愆楗腱虔蹇鍵騫乞傑杰桀儉劍劒檢"], +["cca1","瞼鈐黔劫怯迲偈憩揭擊格檄激膈覡隔堅牽犬甄絹繭肩見譴遣鵑抉決潔結缺訣兼慊箝謙鉗鎌京俓倞傾儆勁勍卿坰境庚徑慶憬擎敬景暻更梗涇炅烱璟璥瓊痙硬磬竟競絅經耕耿脛莖警輕逕鏡頃頸驚鯨係啓堺契季屆悸戒桂械"], +["cda1","棨溪界癸磎稽系繫繼計誡谿階鷄古叩告呱固姑孤尻庫拷攷故敲暠枯槁沽痼皐睾稿羔考股膏苦苽菰藁蠱袴誥賈辜錮雇顧高鼓哭斛曲梏穀谷鵠困坤崑昆梱棍滾琨袞鯤汨滑骨供公共功孔工恐恭拱控攻珙空蚣貢鞏串寡戈果瓜"], +["cea1","科菓誇課跨過鍋顆廓槨藿郭串冠官寬慣棺款灌琯瓘管罐菅觀貫關館刮恝括适侊光匡壙廣曠洸炚狂珖筐胱鑛卦掛罫乖傀塊壞怪愧拐槐魁宏紘肱轟交僑咬喬嬌嶠巧攪敎校橋狡皎矯絞翹膠蕎蛟較轎郊餃驕鮫丘久九仇俱具勾"], +["cfa1","區口句咎嘔坵垢寇嶇廐懼拘救枸柩構歐毆毬求溝灸狗玖球瞿矩究絿耉臼舅舊苟衢謳購軀逑邱鉤銶駒驅鳩鷗龜國局菊鞠鞫麴君窘群裙軍郡堀屈掘窟宮弓穹窮芎躬倦券勸卷圈拳捲權淃眷厥獗蕨蹶闕机櫃潰詭軌饋句晷歸貴"], +["d0a1","鬼龜叫圭奎揆槻珪硅窺竅糾葵規赳逵閨勻均畇筠菌鈞龜橘克剋劇戟棘極隙僅劤勤懃斤根槿瑾筋芹菫覲謹近饉契今妗擒昑檎琴禁禽芩衾衿襟金錦伋及急扱汲級給亘兢矜肯企伎其冀嗜器圻基埼夔奇妓寄岐崎己幾忌技旗旣"], +["d1a1","朞期杞棋棄機欺氣汽沂淇玘琦琪璂璣畸畿碁磯祁祇祈祺箕紀綺羈耆耭肌記譏豈起錡錤飢饑騎騏驥麒緊佶吉拮桔金喫儺喇奈娜懦懶拏拿癩",5,"那樂",4,"諾酪駱亂卵暖欄煖爛蘭難鸞捏捺南嵐枏楠湳濫男藍襤拉"], +["d2a1","納臘蠟衲囊娘廊",4,"乃來內奈柰耐冷女年撚秊念恬拈捻寧寗努勞奴弩怒擄櫓爐瑙盧",5,"駑魯",10,"濃籠聾膿農惱牢磊腦賂雷尿壘",7,"嫩訥杻紐勒",5,"能菱陵尼泥匿溺多茶"], +["d3a1","丹亶但單團壇彖斷旦檀段湍短端簞緞蛋袒鄲鍛撻澾獺疸達啖坍憺擔曇淡湛潭澹痰聃膽蕁覃談譚錟沓畓答踏遝唐堂塘幢戇撞棠當糖螳黨代垈坮大對岱帶待戴擡玳臺袋貸隊黛宅德悳倒刀到圖堵塗導屠島嶋度徒悼挑掉搗桃"], +["d4a1","棹櫂淘渡滔濤燾盜睹禱稻萄覩賭跳蹈逃途道都鍍陶韜毒瀆牘犢獨督禿篤纛讀墩惇敦旽暾沌焞燉豚頓乭突仝冬凍動同憧東桐棟洞潼疼瞳童胴董銅兜斗杜枓痘竇荳讀豆逗頭屯臀芚遁遯鈍得嶝橙燈登等藤謄鄧騰喇懶拏癩羅"], +["d5a1","蘿螺裸邏樂洛烙珞絡落諾酪駱丹亂卵欄欒瀾爛蘭鸞剌辣嵐擥攬欖濫籃纜藍襤覽拉臘蠟廊朗浪狼琅瑯螂郞來崍徠萊冷掠略亮倆兩凉梁樑粮粱糧良諒輛量侶儷勵呂廬慮戾旅櫚濾礪藜蠣閭驢驪麗黎力曆歷瀝礫轢靂憐戀攣漣"], +["d6a1","煉璉練聯蓮輦連鍊冽列劣洌烈裂廉斂殮濂簾獵令伶囹寧岺嶺怜玲笭羚翎聆逞鈴零靈領齡例澧禮醴隷勞怒撈擄櫓潞瀘爐盧老蘆虜路輅露魯鷺鹵碌祿綠菉錄鹿麓論壟弄朧瀧瓏籠聾儡瀨牢磊賂賚賴雷了僚寮廖料燎療瞭聊蓼"], +["d7a1","遼鬧龍壘婁屢樓淚漏瘻累縷蔞褸鏤陋劉旒柳榴流溜瀏琉瑠留瘤硫謬類六戮陸侖倫崙淪綸輪律慄栗率隆勒肋凜凌楞稜綾菱陵俚利厘吏唎履悧李梨浬犁狸理璃異痢籬罹羸莉裏裡里釐離鯉吝潾燐璘藺躪隣鱗麟林淋琳臨霖砬"], +["d8a1","立笠粒摩瑪痲碼磨馬魔麻寞幕漠膜莫邈万卍娩巒彎慢挽晩曼滿漫灣瞞萬蔓蠻輓饅鰻唜抹末沫茉襪靺亡妄忘忙望網罔芒茫莽輞邙埋妹媒寐昧枚梅每煤罵買賣邁魅脈貊陌驀麥孟氓猛盲盟萌冪覓免冕勉棉沔眄眠綿緬面麵滅"], +["d9a1","蔑冥名命明暝椧溟皿瞑茗蓂螟酩銘鳴袂侮冒募姆帽慕摸摹暮某模母毛牟牡瑁眸矛耗芼茅謀謨貌木沐牧目睦穆鶩歿沒夢朦蒙卯墓妙廟描昴杳渺猫竗苗錨務巫憮懋戊拇撫无楙武毋無珷畝繆舞茂蕪誣貿霧鵡墨默們刎吻問文"], +["daa1","汶紊紋聞蚊門雯勿沕物味媚尾嵋彌微未梶楣渼湄眉米美薇謎迷靡黴岷悶愍憫敏旻旼民泯玟珉緡閔密蜜謐剝博拍搏撲朴樸泊珀璞箔粕縛膊舶薄迫雹駁伴半反叛拌搬攀斑槃泮潘班畔瘢盤盼磐磻礬絆般蟠返頒飯勃拔撥渤潑"], +["dba1","發跋醱鉢髮魃倣傍坊妨尨幇彷房放方旁昉枋榜滂磅紡肪膀舫芳蒡蚌訪謗邦防龐倍俳北培徘拜排杯湃焙盃背胚裴裵褙賠輩配陪伯佰帛柏栢白百魄幡樊煩燔番磻繁蕃藩飜伐筏罰閥凡帆梵氾汎泛犯範范法琺僻劈壁擘檗璧癖"], +["dca1","碧蘗闢霹便卞弁變辨辯邊別瞥鱉鼈丙倂兵屛幷昞昺柄棅炳甁病秉竝輧餠騈保堡報寶普步洑湺潽珤甫菩補褓譜輔伏僕匐卜宓復服福腹茯蔔複覆輹輻馥鰒本乶俸奉封峯峰捧棒烽熢琫縫蓬蜂逢鋒鳳不付俯傅剖副否咐埠夫婦"], +["dda1","孚孵富府復扶敷斧浮溥父符簿缶腐腑膚艀芙莩訃負賦賻赴趺部釜阜附駙鳧北分吩噴墳奔奮忿憤扮昐汾焚盆粉糞紛芬賁雰不佛弗彿拂崩朋棚硼繃鵬丕備匕匪卑妃婢庇悲憊扉批斐枇榧比毖毗毘沸泌琵痺砒碑秕秘粃緋翡肥"], +["dea1","脾臂菲蜚裨誹譬費鄙非飛鼻嚬嬪彬斌檳殯浜濱瀕牝玭貧賓頻憑氷聘騁乍事些仕伺似使俟僿史司唆嗣四士奢娑寫寺射巳師徙思捨斜斯柶査梭死沙泗渣瀉獅砂社祀祠私篩紗絲肆舍莎蓑蛇裟詐詞謝賜赦辭邪飼駟麝削數朔索"], +["dfa1","傘刪山散汕珊産疝算蒜酸霰乷撒殺煞薩三參杉森渗芟蔘衫揷澁鈒颯上傷像償商喪嘗孀尙峠常床庠廂想桑橡湘爽牀狀相祥箱翔裳觴詳象賞霜塞璽賽嗇塞穡索色牲生甥省笙墅壻嶼序庶徐恕抒捿敍暑曙書栖棲犀瑞筮絮緖署"], +["e0a1","胥舒薯西誓逝鋤黍鼠夕奭席惜昔晳析汐淅潟石碩蓆釋錫仙僊先善嬋宣扇敾旋渲煽琁瑄璇璿癬禪線繕羨腺膳船蘚蟬詵跣選銑鐥饍鮮卨屑楔泄洩渫舌薛褻設說雪齧剡暹殲纖蟾贍閃陝攝涉燮葉城姓宬性惺成星晟猩珹盛省筬"], +["e1a1","聖聲腥誠醒世勢歲洗稅笹細說貰召嘯塑宵小少巢所掃搔昭梳沼消溯瀟炤燒甦疏疎瘙笑篠簫素紹蔬蕭蘇訴逍遡邵銷韶騷俗屬束涑粟續謖贖速孫巽損蓀遜飡率宋悚松淞訟誦送頌刷殺灑碎鎖衰釗修受嗽囚垂壽嫂守岫峀帥愁"], +["e2a1","戍手授搜收數樹殊水洙漱燧狩獸琇璲瘦睡秀穗竪粹綏綬繡羞脩茱蒐蓚藪袖誰讐輸遂邃酬銖銹隋隧隨雖需須首髓鬚叔塾夙孰宿淑潚熟琡璹肅菽巡徇循恂旬栒楯橓殉洵淳珣盾瞬筍純脣舜荀蓴蕣詢諄醇錞順馴戌術述鉥崇崧"], +["e3a1","嵩瑟膝蝨濕拾習褶襲丞乘僧勝升承昇繩蠅陞侍匙嘶始媤尸屎屍市弑恃施是時枾柴猜矢示翅蒔蓍視試詩諡豕豺埴寔式息拭植殖湜熄篒蝕識軾食飾伸侁信呻娠宸愼新晨燼申神紳腎臣莘薪藎蜃訊身辛辰迅失室實悉審尋心沁"], +["e4a1","沈深瀋甚芯諶什十拾雙氏亞俄兒啞娥峨我牙芽莪蛾衙訝阿雅餓鴉鵝堊岳嶽幄惡愕握樂渥鄂鍔顎鰐齷安岸按晏案眼雁鞍顔鮟斡謁軋閼唵岩巖庵暗癌菴闇壓押狎鴨仰央怏昻殃秧鴦厓哀埃崖愛曖涯碍艾隘靄厄扼掖液縊腋額"], +["e5a1","櫻罌鶯鸚也倻冶夜惹揶椰爺耶若野弱掠略約若葯蒻藥躍亮佯兩凉壤孃恙揚攘敭暘梁楊樣洋瀁煬痒瘍禳穰糧羊良襄諒讓釀陽量養圄御於漁瘀禦語馭魚齬億憶抑檍臆偃堰彦焉言諺孼蘖俺儼嚴奄掩淹嶪業円予余勵呂女如廬"], +["e6a1","旅歟汝濾璵礖礪與艅茹輿轝閭餘驪麗黎亦力域役易曆歷疫繹譯轢逆驛嚥堧姸娟宴年延憐戀捐挻撚椽沇沿涎涓淵演漣烟然煙煉燃燕璉硏硯秊筵緣練縯聯衍軟輦蓮連鉛鍊鳶列劣咽悅涅烈熱裂說閱厭廉念捻染殮炎焰琰艶苒"], +["e7a1","簾閻髥鹽曄獵燁葉令囹塋寧嶺嶸影怜映暎楹榮永泳渶潁濚瀛瀯煐營獰玲瑛瑩瓔盈穎纓羚聆英詠迎鈴鍈零霙靈領乂倪例刈叡曳汭濊猊睿穢芮藝蘂禮裔詣譽豫醴銳隸霓預五伍俉傲午吾吳嗚塢墺奧娛寤悟惡懊敖旿晤梧汚澳"], +["e8a1","烏熬獒筽蜈誤鰲鼇屋沃獄玉鈺溫瑥瘟穩縕蘊兀壅擁瓮甕癰翁邕雍饔渦瓦窩窪臥蛙蝸訛婉完宛梡椀浣玩琓琬碗緩翫脘腕莞豌阮頑曰往旺枉汪王倭娃歪矮外嵬巍猥畏了僚僥凹堯夭妖姚寥寮尿嶢拗搖撓擾料曜樂橈燎燿瑤療"], +["e9a1","窈窯繇繞耀腰蓼蟯要謠遙遼邀饒慾欲浴縟褥辱俑傭冗勇埇墉容庸慂榕涌湧溶熔瑢用甬聳茸蓉踊鎔鏞龍于佑偶優又友右宇寓尤愚憂旴牛玗瑀盂祐禑禹紆羽芋藕虞迂遇郵釪隅雨雩勖彧旭昱栯煜稶郁頊云暈橒殞澐熉耘芸蕓"], +["eaa1","運隕雲韻蔚鬱亐熊雄元原員圓園垣媛嫄寃怨愿援沅洹湲源爰猿瑗苑袁轅遠阮院願鴛月越鉞位偉僞危圍委威尉慰暐渭爲瑋緯胃萎葦蔿蝟衛褘謂違韋魏乳侑儒兪劉唯喩孺宥幼幽庾悠惟愈愉揄攸有杻柔柚柳楡楢油洧流游溜"], +["eba1","濡猶猷琉瑜由留癒硫紐維臾萸裕誘諛諭踰蹂遊逾遺酉釉鍮類六堉戮毓肉育陸倫允奫尹崙淪潤玧胤贇輪鈗閏律慄栗率聿戎瀜絨融隆垠恩慇殷誾銀隱乙吟淫蔭陰音飮揖泣邑凝應膺鷹依倚儀宜意懿擬椅毅疑矣義艤薏蟻衣誼"], +["eca1","議醫二以伊利吏夷姨履已弛彛怡易李梨泥爾珥理異痍痢移罹而耳肄苡荑裏裡貽貳邇里離飴餌匿溺瀷益翊翌翼謚人仁刃印吝咽因姻寅引忍湮燐璘絪茵藺蚓認隣靭靷鱗麟一佚佾壹日溢逸鎰馹任壬妊姙恁林淋稔臨荏賃入卄"], +["eda1","立笠粒仍剩孕芿仔刺咨姉姿子字孜恣慈滋炙煮玆瓷疵磁紫者自茨蔗藉諮資雌作勺嚼斫昨灼炸爵綽芍酌雀鵲孱棧殘潺盞岑暫潛箴簪蠶雜丈仗匠場墻壯奬將帳庄張掌暲杖樟檣欌漿牆狀獐璋章粧腸臟臧莊葬蔣薔藏裝贓醬長"], +["eea1","障再哉在宰才材栽梓渽滓災縡裁財載齋齎爭箏諍錚佇低儲咀姐底抵杵楮樗沮渚狙猪疽箸紵苧菹著藷詛貯躇這邸雎齟勣吊嫡寂摘敵滴狄炙的積笛籍績翟荻謫賊赤跡蹟迪迹適鏑佃佺傳全典前剪塡塼奠專展廛悛戰栓殿氈澱"], +["efa1","煎琠田甸畑癲筌箋箭篆纏詮輾轉鈿銓錢鐫電顚顫餞切截折浙癤竊節絶占岾店漸点粘霑鮎點接摺蝶丁井亭停偵呈姃定幀庭廷征情挺政整旌晶晸柾楨檉正汀淀淨渟湞瀞炡玎珽町睛碇禎程穽精綎艇訂諪貞鄭酊釘鉦鋌錠霆靖"], +["f0a1","靜頂鼎制劑啼堤帝弟悌提梯濟祭第臍薺製諸蹄醍除際霽題齊俎兆凋助嘲弔彫措操早晁曺曹朝條棗槽漕潮照燥爪璪眺祖祚租稠窕粗糟組繰肇藻蚤詔調趙躁造遭釣阻雕鳥族簇足鏃存尊卒拙猝倧宗從悰慫棕淙琮種終綜縱腫"], +["f1a1","踪踵鍾鐘佐坐左座挫罪主住侏做姝胄呪周嗾奏宙州廚晝朱柱株注洲湊澍炷珠疇籌紂紬綢舟蛛註誅走躊輳週酎酒鑄駐竹粥俊儁准埈寯峻晙樽浚準濬焌畯竣蠢逡遵雋駿茁中仲衆重卽櫛楫汁葺增憎曾拯烝甑症繒蒸證贈之只"], +["f2a1","咫地址志持指摯支旨智枝枳止池沚漬知砥祉祗紙肢脂至芝芷蜘誌識贄趾遲直稙稷織職唇嗔塵振搢晉晋桭榛殄津溱珍瑨璡畛疹盡眞瞋秦縉縝臻蔯袗診賑軫辰進鎭陣陳震侄叱姪嫉帙桎瓆疾秩窒膣蛭質跌迭斟朕什執潗緝輯"], +["f3a1","鏶集徵懲澄且侘借叉嗟嵯差次此磋箚茶蹉車遮捉搾着窄錯鑿齪撰澯燦璨瓚竄簒纂粲纘讚贊鑽餐饌刹察擦札紮僭參塹慘慙懺斬站讒讖倉倡創唱娼廠彰愴敞昌昶暢槍滄漲猖瘡窓脹艙菖蒼債埰寀寨彩採砦綵菜蔡采釵冊柵策"], +["f4a1","責凄妻悽處倜刺剔尺慽戚拓擲斥滌瘠脊蹠陟隻仟千喘天川擅泉淺玔穿舛薦賤踐遷釧闡阡韆凸哲喆徹撤澈綴輟轍鐵僉尖沾添甛瞻簽籤詹諂堞妾帖捷牒疊睫諜貼輒廳晴淸聽菁請靑鯖切剃替涕滯締諦逮遞體初剿哨憔抄招梢"], +["f5a1","椒楚樵炒焦硝礁礎秒稍肖艸苕草蕉貂超酢醋醮促囑燭矗蜀觸寸忖村邨叢塚寵悤憁摠總聰蔥銃撮催崔最墜抽推椎楸樞湫皺秋芻萩諏趨追鄒酋醜錐錘鎚雛騶鰍丑畜祝竺筑築縮蓄蹙蹴軸逐春椿瑃出朮黜充忠沖蟲衝衷悴膵萃"], +["f6a1","贅取吹嘴娶就炊翠聚脆臭趣醉驟鷲側仄厠惻測層侈値嗤峙幟恥梔治淄熾痔痴癡稚穉緇緻置致蚩輜雉馳齒則勅飭親七柒漆侵寢枕沈浸琛砧針鍼蟄秤稱快他咤唾墮妥惰打拖朶楕舵陀馱駝倬卓啄坼度托拓擢晫柝濁濯琢琸託"], +["f7a1","鐸呑嘆坦彈憚歎灘炭綻誕奪脫探眈耽貪塔搭榻宕帑湯糖蕩兌台太怠態殆汰泰笞胎苔跆邰颱宅擇澤撑攄兎吐土討慟桶洞痛筒統通堆槌腿褪退頹偸套妬投透鬪慝特闖坡婆巴把播擺杷波派爬琶破罷芭跛頗判坂板版瓣販辦鈑"], +["f8a1","阪八叭捌佩唄悖敗沛浿牌狽稗覇貝彭澎烹膨愎便偏扁片篇編翩遍鞭騙貶坪平枰萍評吠嬖幣廢弊斃肺蔽閉陛佈包匍匏咆哺圃布怖抛抱捕暴泡浦疱砲胞脯苞葡蒲袍褒逋鋪飽鮑幅暴曝瀑爆輻俵剽彪慓杓標漂瓢票表豹飇飄驃"], +["f9a1","品稟楓諷豊風馮彼披疲皮被避陂匹弼必泌珌畢疋筆苾馝乏逼下何厦夏廈昰河瑕荷蝦賀遐霞鰕壑學虐謔鶴寒恨悍旱汗漢澣瀚罕翰閑閒限韓割轄函含咸啣喊檻涵緘艦銜陷鹹合哈盒蛤閤闔陜亢伉姮嫦巷恒抗杭桁沆港缸肛航"], +["faa1","行降項亥偕咳垓奚孩害懈楷海瀣蟹解該諧邂駭骸劾核倖幸杏荇行享向嚮珦鄕響餉饗香噓墟虛許憲櫶獻軒歇險驗奕爀赫革俔峴弦懸晛泫炫玄玹現眩睍絃絢縣舷衒見賢鉉顯孑穴血頁嫌俠協夾峽挾浹狹脅脇莢鋏頰亨兄刑型"], +["fba1","形泂滎瀅灐炯熒珩瑩荊螢衡逈邢鎣馨兮彗惠慧暳蕙蹊醯鞋乎互呼壕壺好岵弧戶扈昊晧毫浩淏湖滸澔濠濩灝狐琥瑚瓠皓祜糊縞胡芦葫蒿虎號蝴護豪鎬頀顥惑或酷婚昏混渾琿魂忽惚笏哄弘汞泓洪烘紅虹訌鴻化和嬅樺火畵"], +["fca1","禍禾花華話譁貨靴廓擴攫確碻穫丸喚奐宦幻患換歡晥桓渙煥環紈還驩鰥活滑猾豁闊凰幌徨恍惶愰慌晃晄榥況湟滉潢煌璜皇篁簧荒蝗遑隍黃匯回廻徊恢悔懷晦會檜淮澮灰獪繪膾茴蛔誨賄劃獲宖橫鐄哮嚆孝效斅曉梟涍淆"], +["fda1","爻肴酵驍侯候厚后吼喉嗅帿後朽煦珝逅勛勳塤壎焄熏燻薰訓暈薨喧暄煊萱卉喙毁彙徽揮暉煇諱輝麾休携烋畦虧恤譎鷸兇凶匈洶胸黑昕欣炘痕吃屹紇訖欠欽歆吸恰洽翕興僖凞喜噫囍姬嬉希憙憘戱晞曦熙熹熺犧禧稀羲詰"] +] diff --git a/pitfall/pdfkit/node_modules/iconv-lite/encodings/tables/cp950.json b/pitfall/pdfkit/node_modules/iconv-lite/encodings/tables/cp950.json new file mode 100644 index 00000000..d8bc8717 --- /dev/null +++ b/pitfall/pdfkit/node_modules/iconv-lite/encodings/tables/cp950.json @@ -0,0 +1,177 @@ +[ +["0","\u0000",127], +["a140"," ,、。.‧;:?!︰…‥﹐﹑﹒·﹔﹕﹖﹗|–︱—︳╴︴﹏()︵︶{}︷︸〔〕︹︺【】︻︼《》︽︾〈〉︿﹀「」﹁﹂『』﹃﹄﹙﹚"], +["a1a1","﹛﹜﹝﹞‘’“”〝〞‵′#&*※§〃○●△▲◎☆★◇◆□■▽▼㊣℅¯ ̄_ˍ﹉﹊﹍﹎﹋﹌﹟﹠﹡+-×÷±√<>=≦≧≠∞≒≡﹢",4,"~∩∪⊥∠∟⊿㏒㏑∫∮∵∴♀♂⊕⊙↑↓←→↖↗↙↘∥∣/"], +["a240","\∕﹨$¥〒¢£%@℃℉﹩﹪﹫㏕㎜㎝㎞㏎㎡㎎㎏㏄°兙兛兞兝兡兣嗧瓩糎▁",7,"▏▎▍▌▋▊▉┼┴┬┤├▔─│▕┌┐└┘╭"], +["a2a1","╮╰╯═╞╪╡◢◣◥◤╱╲╳0",9,"Ⅰ",9,"〡",8,"十卄卅A",25,"a",21], +["a340","wxyzΑ",16,"Σ",6,"α",16,"σ",6,"ㄅ",10], +["a3a1","ㄐ",25,"˙ˉˊˇˋ"], +["a3e1","€"], +["a440","一乙丁七乃九了二人儿入八几刀刁力匕十卜又三下丈上丫丸凡久么也乞于亡兀刃勺千叉口土士夕大女子孑孓寸小尢尸山川工己已巳巾干廾弋弓才"], +["a4a1","丑丐不中丰丹之尹予云井互五亢仁什仃仆仇仍今介仄元允內六兮公冗凶分切刈勻勾勿化匹午升卅卞厄友及反壬天夫太夭孔少尤尺屯巴幻廿弔引心戈戶手扎支文斗斤方日曰月木欠止歹毋比毛氏水火爪父爻片牙牛犬王丙"], +["a540","世丕且丘主乍乏乎以付仔仕他仗代令仙仞充兄冉冊冬凹出凸刊加功包匆北匝仟半卉卡占卯卮去可古右召叮叩叨叼司叵叫另只史叱台句叭叻四囚外"], +["a5a1","央失奴奶孕它尼巨巧左市布平幼弁弘弗必戊打扔扒扑斥旦朮本未末札正母民氐永汁汀氾犯玄玉瓜瓦甘生用甩田由甲申疋白皮皿目矛矢石示禾穴立丞丟乒乓乩亙交亦亥仿伉伙伊伕伍伐休伏仲件任仰仳份企伋光兇兆先全"], +["a640","共再冰列刑划刎刖劣匈匡匠印危吉吏同吊吐吁吋各向名合吃后吆吒因回囝圳地在圭圬圯圩夙多夷夸妄奸妃好她如妁字存宇守宅安寺尖屹州帆并年"], +["a6a1","式弛忙忖戎戌戍成扣扛托收早旨旬旭曲曳有朽朴朱朵次此死氖汝汗汙江池汐汕污汛汍汎灰牟牝百竹米糸缶羊羽老考而耒耳聿肉肋肌臣自至臼舌舛舟艮色艾虫血行衣西阡串亨位住佇佗佞伴佛何估佐佑伽伺伸佃佔似但佣"], +["a740","作你伯低伶余佝佈佚兌克免兵冶冷別判利刪刨劫助努劬匣即卵吝吭吞吾否呎吧呆呃吳呈呂君吩告吹吻吸吮吵吶吠吼呀吱含吟听囪困囤囫坊坑址坍"], +["a7a1","均坎圾坐坏圻壯夾妝妒妨妞妣妙妖妍妤妓妊妥孝孜孚孛完宋宏尬局屁尿尾岐岑岔岌巫希序庇床廷弄弟彤形彷役忘忌志忍忱快忸忪戒我抄抗抖技扶抉扭把扼找批扳抒扯折扮投抓抑抆改攻攸旱更束李杏材村杜杖杞杉杆杠"], +["a840","杓杗步每求汞沙沁沈沉沅沛汪決沐汰沌汨沖沒汽沃汲汾汴沆汶沍沔沘沂灶灼災灸牢牡牠狄狂玖甬甫男甸皂盯矣私秀禿究系罕肖肓肝肘肛肚育良芒"], +["a8a1","芋芍見角言谷豆豕貝赤走足身車辛辰迂迆迅迄巡邑邢邪邦那酉釆里防阮阱阪阬並乖乳事些亞享京佯依侍佳使佬供例來侃佰併侈佩佻侖佾侏侑佺兔兒兕兩具其典冽函刻券刷刺到刮制剁劾劻卒協卓卑卦卷卸卹取叔受味呵"], +["a940","咖呸咕咀呻呷咄咒咆呼咐呱呶和咚呢周咋命咎固垃坷坪坩坡坦坤坼夜奉奇奈奄奔妾妻委妹妮姑姆姐姍始姓姊妯妳姒姅孟孤季宗定官宜宙宛尚屈居"], +["a9a1","屆岷岡岸岩岫岱岳帘帚帖帕帛帑幸庚店府底庖延弦弧弩往征彿彼忝忠忽念忿怏怔怯怵怖怪怕怡性怩怫怛或戕房戾所承拉拌拄抿拂抹拒招披拓拔拋拈抨抽押拐拙拇拍抵拚抱拘拖拗拆抬拎放斧於旺昔易昌昆昂明昀昏昕昊"], +["aa40","昇服朋杭枋枕東果杳杷枇枝林杯杰板枉松析杵枚枓杼杪杲欣武歧歿氓氛泣注泳沱泌泥河沽沾沼波沫法泓沸泄油況沮泗泅泱沿治泡泛泊沬泯泜泖泠"], +["aaa1","炕炎炒炊炙爬爭爸版牧物狀狎狙狗狐玩玨玟玫玥甽疝疙疚的盂盲直知矽社祀祁秉秈空穹竺糾罔羌羋者肺肥肢肱股肫肩肴肪肯臥臾舍芳芝芙芭芽芟芹花芬芥芯芸芣芰芾芷虎虱初表軋迎返近邵邸邱邶采金長門阜陀阿阻附"], +["ab40","陂隹雨青非亟亭亮信侵侯便俠俑俏保促侶俘俟俊俗侮俐俄係俚俎俞侷兗冒冑冠剎剃削前剌剋則勇勉勃勁匍南卻厚叛咬哀咨哎哉咸咦咳哇哂咽咪品"], +["aba1","哄哈咯咫咱咻咩咧咿囿垂型垠垣垢城垮垓奕契奏奎奐姜姘姿姣姨娃姥姪姚姦威姻孩宣宦室客宥封屎屏屍屋峙峒巷帝帥帟幽庠度建弈弭彥很待徊律徇後徉怒思怠急怎怨恍恰恨恢恆恃恬恫恪恤扁拜挖按拼拭持拮拽指拱拷"], +["ac40","拯括拾拴挑挂政故斫施既春昭映昧是星昨昱昤曷柿染柱柔某柬架枯柵柩柯柄柑枴柚查枸柏柞柳枰柙柢柝柒歪殃殆段毒毗氟泉洋洲洪流津洌洱洞洗"], +["aca1","活洽派洶洛泵洹洧洸洩洮洵洎洫炫為炳炬炯炭炸炮炤爰牲牯牴狩狠狡玷珊玻玲珍珀玳甚甭畏界畎畋疫疤疥疢疣癸皆皇皈盈盆盃盅省盹相眉看盾盼眇矜砂研砌砍祆祉祈祇禹禺科秒秋穿突竿竽籽紂紅紀紉紇約紆缸美羿耄"], +["ad40","耐耍耑耶胖胥胚胃胄背胡胛胎胞胤胝致舢苧范茅苣苛苦茄若茂茉苒苗英茁苜苔苑苞苓苟苯茆虐虹虻虺衍衫要觔計訂訃貞負赴赳趴軍軌述迦迢迪迥"], +["ada1","迭迫迤迨郊郎郁郃酋酊重閂限陋陌降面革韋韭音頁風飛食首香乘亳倌倍倣俯倦倥俸倩倖倆值借倚倒們俺倀倔倨俱倡個候倘俳修倭倪俾倫倉兼冤冥冢凍凌准凋剖剜剔剛剝匪卿原厝叟哨唐唁唷哼哥哲唆哺唔哩哭員唉哮哪"], +["ae40","哦唧唇哽唏圃圄埂埔埋埃堉夏套奘奚娑娘娜娟娛娓姬娠娣娩娥娌娉孫屘宰害家宴宮宵容宸射屑展屐峭峽峻峪峨峰島崁峴差席師庫庭座弱徒徑徐恙"], +["aea1","恣恥恐恕恭恩息悄悟悚悍悔悌悅悖扇拳挈拿捎挾振捕捂捆捏捉挺捐挽挪挫挨捍捌效敉料旁旅時晉晏晃晒晌晅晁書朔朕朗校核案框桓根桂桔栩梳栗桌桑栽柴桐桀格桃株桅栓栘桁殊殉殷氣氧氨氦氤泰浪涕消涇浦浸海浙涓"], +["af40","浬涉浮浚浴浩涌涊浹涅浥涔烊烘烤烙烈烏爹特狼狹狽狸狷玆班琉珮珠珪珞畔畝畜畚留疾病症疲疳疽疼疹痂疸皋皰益盍盎眩真眠眨矩砰砧砸砝破砷"], +["afa1","砥砭砠砟砲祕祐祠祟祖神祝祗祚秤秣秧租秦秩秘窄窈站笆笑粉紡紗紋紊素索純紐紕級紜納紙紛缺罟羔翅翁耆耘耕耙耗耽耿胱脂胰脅胭胴脆胸胳脈能脊胼胯臭臬舀舐航舫舨般芻茫荒荔荊茸荐草茵茴荏茲茹茶茗荀茱茨荃"], +["b040","虔蚊蚪蚓蚤蚩蚌蚣蚜衰衷袁袂衽衹記訐討訌訕訊託訓訖訏訑豈豺豹財貢起躬軒軔軏辱送逆迷退迺迴逃追逅迸邕郡郝郢酒配酌釘針釗釜釙閃院陣陡"], +["b0a1","陛陝除陘陞隻飢馬骨高鬥鬲鬼乾偺偽停假偃偌做偉健偶偎偕偵側偷偏倏偯偭兜冕凰剪副勒務勘動匐匏匙匿區匾參曼商啪啦啄啞啡啃啊唱啖問啕唯啤唸售啜唬啣唳啁啗圈國圉域堅堊堆埠埤基堂堵執培夠奢娶婁婉婦婪婀"], +["b140","娼婢婚婆婊孰寇寅寄寂宿密尉專將屠屜屝崇崆崎崛崖崢崑崩崔崙崤崧崗巢常帶帳帷康庸庶庵庾張強彗彬彩彫得徙從徘御徠徜恿患悉悠您惋悴惦悽"], +["b1a1","情悻悵惜悼惘惕惆惟悸惚惇戚戛扈掠控捲掖探接捷捧掘措捱掩掉掃掛捫推掄授掙採掬排掏掀捻捩捨捺敝敖救教敗啟敏敘敕敔斜斛斬族旋旌旎晝晚晤晨晦晞曹勗望梁梯梢梓梵桿桶梱梧梗械梃棄梭梆梅梔條梨梟梡梂欲殺"], +["b240","毫毬氫涎涼淳淙液淡淌淤添淺清淇淋涯淑涮淞淹涸混淵淅淒渚涵淚淫淘淪深淮淨淆淄涪淬涿淦烹焉焊烽烯爽牽犁猜猛猖猓猙率琅琊球理現琍瓠瓶"], +["b2a1","瓷甜產略畦畢異疏痔痕疵痊痍皎盔盒盛眷眾眼眶眸眺硫硃硎祥票祭移窒窕笠笨笛第符笙笞笮粒粗粕絆絃統紮紹紼絀細紳組累終紲紱缽羞羚翌翎習耜聊聆脯脖脣脫脩脰脤舂舵舷舶船莎莞莘荸莢莖莽莫莒莊莓莉莠荷荻荼"], +["b340","莆莧處彪蛇蛀蚶蛄蚵蛆蛋蚱蚯蛉術袞袈被袒袖袍袋覓規訪訝訣訥許設訟訛訢豉豚販責貫貨貪貧赧赦趾趺軛軟這逍通逗連速逝逐逕逞造透逢逖逛途"], +["b3a1","部郭都酗野釵釦釣釧釭釩閉陪陵陳陸陰陴陶陷陬雀雪雩章竟頂頃魚鳥鹵鹿麥麻傢傍傅備傑傀傖傘傚最凱割剴創剩勞勝勛博厥啻喀喧啼喊喝喘喂喜喪喔喇喋喃喳單喟唾喲喚喻喬喱啾喉喫喙圍堯堪場堤堰報堡堝堠壹壺奠"], +["b440","婷媚婿媒媛媧孳孱寒富寓寐尊尋就嵌嵐崴嵇巽幅帽幀幃幾廊廁廂廄弼彭復循徨惑惡悲悶惠愜愣惺愕惰惻惴慨惱愎惶愉愀愒戟扉掣掌描揀揩揉揆揍"], +["b4a1","插揣提握揖揭揮捶援揪換摒揚揹敞敦敢散斑斐斯普晰晴晶景暑智晾晷曾替期朝棺棕棠棘棗椅棟棵森棧棹棒棲棣棋棍植椒椎棉棚楮棻款欺欽殘殖殼毯氮氯氬港游湔渡渲湧湊渠渥渣減湛湘渤湖湮渭渦湯渴湍渺測湃渝渾滋"], +["b540","溉渙湎湣湄湲湩湟焙焚焦焰無然煮焜牌犄犀猶猥猴猩琺琪琳琢琥琵琶琴琯琛琦琨甥甦畫番痢痛痣痙痘痞痠登發皖皓皴盜睏短硝硬硯稍稈程稅稀窘"], +["b5a1","窗窖童竣等策筆筐筒答筍筋筏筑粟粥絞結絨絕紫絮絲絡給絢絰絳善翔翕耋聒肅腕腔腋腑腎脹腆脾腌腓腴舒舜菩萃菸萍菠菅萋菁華菱菴著萊菰萌菌菽菲菊萸萎萄菜萇菔菟虛蛟蛙蛭蛔蛛蛤蛐蛞街裁裂袱覃視註詠評詞証詁"], +["b640","詔詛詐詆訴診訶詖象貂貯貼貳貽賁費賀貴買貶貿貸越超趁跎距跋跚跑跌跛跆軻軸軼辜逮逵週逸進逶鄂郵鄉郾酣酥量鈔鈕鈣鈉鈞鈍鈐鈇鈑閔閏開閑"], +["b6a1","間閒閎隊階隋陽隅隆隍陲隄雁雅雄集雇雯雲韌項順須飧飪飯飩飲飭馮馭黃黍黑亂傭債傲傳僅傾催傷傻傯僇剿剷剽募勦勤勢勣匯嗟嗨嗓嗦嗎嗜嗇嗑嗣嗤嗯嗚嗡嗅嗆嗥嗉園圓塞塑塘塗塚塔填塌塭塊塢塒塋奧嫁嫉嫌媾媽媼"], +["b740","媳嫂媲嵩嵯幌幹廉廈弒彙徬微愚意慈感想愛惹愁愈慎慌慄慍愾愴愧愍愆愷戡戢搓搾搞搪搭搽搬搏搜搔損搶搖搗搆敬斟新暗暉暇暈暖暄暘暍會榔業"], +["b7a1","楚楷楠楔極椰概楊楨楫楞楓楹榆楝楣楛歇歲毀殿毓毽溢溯滓溶滂源溝滇滅溥溘溼溺溫滑準溜滄滔溪溧溴煎煙煩煤煉照煜煬煦煌煥煞煆煨煖爺牒猷獅猿猾瑯瑚瑕瑟瑞瑁琿瑙瑛瑜當畸瘀痰瘁痲痱痺痿痴痳盞盟睛睫睦睞督"], +["b840","睹睪睬睜睥睨睢矮碎碰碗碘碌碉硼碑碓硿祺祿禁萬禽稜稚稠稔稟稞窟窠筷節筠筮筧粱粳粵經絹綑綁綏絛置罩罪署義羨群聖聘肆肄腱腰腸腥腮腳腫"], +["b8a1","腹腺腦舅艇蒂葷落萱葵葦葫葉葬葛萼萵葡董葩葭葆虞虜號蛹蜓蜈蜇蜀蛾蛻蜂蜃蜆蜊衙裟裔裙補裘裝裡裊裕裒覜解詫該詳試詩詰誇詼詣誠話誅詭詢詮詬詹詻訾詨豢貊貉賊資賈賄貲賃賂賅跡跟跨路跳跺跪跤跦躲較載軾輊"], +["b940","辟農運遊道遂達逼違遐遇遏過遍遑逾遁鄒鄗酬酪酩釉鈷鉗鈸鈽鉀鈾鉛鉋鉤鉑鈴鉉鉍鉅鈹鈿鉚閘隘隔隕雍雋雉雊雷電雹零靖靴靶預頑頓頊頒頌飼飴"], +["b9a1","飽飾馳馱馴髡鳩麂鼎鼓鼠僧僮僥僖僭僚僕像僑僱僎僩兢凳劃劂匱厭嗾嘀嘛嘗嗽嘔嘆嘉嘍嘎嗷嘖嘟嘈嘐嗶團圖塵塾境墓墊塹墅塽壽夥夢夤奪奩嫡嫦嫩嫗嫖嫘嫣孵寞寧寡寥實寨寢寤察對屢嶄嶇幛幣幕幗幔廓廖弊彆彰徹慇"], +["ba40","愿態慷慢慣慟慚慘慵截撇摘摔撤摸摟摺摑摧搴摭摻敲斡旗旖暢暨暝榜榨榕槁榮槓構榛榷榻榫榴槐槍榭槌榦槃榣歉歌氳漳演滾漓滴漩漾漠漬漏漂漢"], +["baa1","滿滯漆漱漸漲漣漕漫漯澈漪滬漁滲滌滷熔熙煽熊熄熒爾犒犖獄獐瑤瑣瑪瑰瑭甄疑瘧瘍瘋瘉瘓盡監瞄睽睿睡磁碟碧碳碩碣禎福禍種稱窪窩竭端管箕箋筵算箝箔箏箸箇箄粹粽精綻綰綜綽綾綠緊綴網綱綺綢綿綵綸維緒緇綬"], +["bb40","罰翠翡翟聞聚肇腐膀膏膈膊腿膂臧臺與舔舞艋蓉蒿蓆蓄蒙蒞蒲蒜蓋蒸蓀蓓蒐蒼蓑蓊蜿蜜蜻蜢蜥蜴蜘蝕蜷蜩裳褂裴裹裸製裨褚裯誦誌語誣認誡誓誤"], +["bba1","說誥誨誘誑誚誧豪貍貌賓賑賒赫趙趕跼輔輒輕輓辣遠遘遜遣遙遞遢遝遛鄙鄘鄞酵酸酷酴鉸銀銅銘銖鉻銓銜銨鉼銑閡閨閩閣閥閤隙障際雌雒需靼鞅韶頗領颯颱餃餅餌餉駁骯骰髦魁魂鳴鳶鳳麼鼻齊億儀僻僵價儂儈儉儅凜"], +["bc40","劇劈劉劍劊勰厲嘮嘻嘹嘲嘿嘴嘩噓噎噗噴嘶嘯嘰墀墟增墳墜墮墩墦奭嬉嫻嬋嫵嬌嬈寮寬審寫層履嶝嶔幢幟幡廢廚廟廝廣廠彈影德徵慶慧慮慝慕憂"], +["bca1","慼慰慫慾憧憐憫憎憬憚憤憔憮戮摩摯摹撞撲撈撐撰撥撓撕撩撒撮播撫撚撬撙撢撳敵敷數暮暫暴暱樣樟槨樁樞標槽模樓樊槳樂樅槭樑歐歎殤毅毆漿潼澄潑潦潔澆潭潛潸潮澎潺潰潤澗潘滕潯潠潟熟熬熱熨牖犛獎獗瑩璋璃"], +["bd40","瑾璀畿瘠瘩瘟瘤瘦瘡瘢皚皺盤瞎瞇瞌瞑瞋磋磅確磊碾磕碼磐稿稼穀稽稷稻窯窮箭箱範箴篆篇篁箠篌糊締練緯緻緘緬緝編緣線緞緩綞緙緲緹罵罷羯"], +["bda1","翩耦膛膜膝膠膚膘蔗蔽蔚蓮蔬蔭蔓蔑蔣蔡蔔蓬蔥蓿蔆螂蝴蝶蝠蝦蝸蝨蝙蝗蝌蝓衛衝褐複褒褓褕褊誼諒談諄誕請諸課諉諂調誰論諍誶誹諛豌豎豬賠賞賦賤賬賭賢賣賜質賡赭趟趣踫踐踝踢踏踩踟踡踞躺輝輛輟輩輦輪輜輞"], +["be40","輥適遮遨遭遷鄰鄭鄧鄱醇醉醋醃鋅銻銷鋪銬鋤鋁銳銼鋒鋇鋰銲閭閱霄霆震霉靠鞍鞋鞏頡頫頜颳養餓餒餘駝駐駟駛駑駕駒駙骷髮髯鬧魅魄魷魯鴆鴉"], +["bea1","鴃麩麾黎墨齒儒儘儔儐儕冀冪凝劑劓勳噙噫噹噩噤噸噪器噥噱噯噬噢噶壁墾壇壅奮嬝嬴學寰導彊憲憑憩憊懍憶憾懊懈戰擅擁擋撻撼據擄擇擂操撿擒擔撾整曆曉暹曄曇暸樽樸樺橙橫橘樹橄橢橡橋橇樵機橈歙歷氅濂澱澡"], +["bf40","濃澤濁澧澳激澹澶澦澠澴熾燉燐燒燈燕熹燎燙燜燃燄獨璜璣璘璟璞瓢甌甍瘴瘸瘺盧盥瞠瞞瞟瞥磨磚磬磧禦積穎穆穌穋窺篙簑築篤篛篡篩篦糕糖縊"], +["bfa1","縑縈縛縣縞縝縉縐罹羲翰翱翮耨膳膩膨臻興艘艙蕊蕙蕈蕨蕩蕃蕉蕭蕪蕞螃螟螞螢融衡褪褲褥褫褡親覦諦諺諫諱謀諜諧諮諾謁謂諷諭諳諶諼豫豭貓賴蹄踱踴蹂踹踵輻輯輸輳辨辦遵遴選遲遼遺鄴醒錠錶鋸錳錯錢鋼錫錄錚"], +["c040","錐錦錡錕錮錙閻隧隨險雕霎霑霖霍霓霏靛靜靦鞘頰頸頻頷頭頹頤餐館餞餛餡餚駭駢駱骸骼髻髭鬨鮑鴕鴣鴦鴨鴒鴛默黔龍龜優償儡儲勵嚎嚀嚐嚅嚇"], +["c0a1","嚏壕壓壑壎嬰嬪嬤孺尷屨嶼嶺嶽嶸幫彌徽應懂懇懦懋戲戴擎擊擘擠擰擦擬擱擢擭斂斃曙曖檀檔檄檢檜櫛檣橾檗檐檠歜殮毚氈濘濱濟濠濛濤濫濯澀濬濡濩濕濮濰燧營燮燦燥燭燬燴燠爵牆獰獲璩環璦璨癆療癌盪瞳瞪瞰瞬"], +["c140","瞧瞭矯磷磺磴磯礁禧禪穗窿簇簍篾篷簌篠糠糜糞糢糟糙糝縮績繆縷縲繃縫總縱繅繁縴縹繈縵縿縯罄翳翼聱聲聰聯聳臆臃膺臂臀膿膽臉膾臨舉艱薪"], +["c1a1","薄蕾薜薑薔薯薛薇薨薊虧蟀蟑螳蟒蟆螫螻螺蟈蟋褻褶襄褸褽覬謎謗謙講謊謠謝謄謐豁谿豳賺賽購賸賻趨蹉蹋蹈蹊轄輾轂轅輿避遽還邁邂邀鄹醣醞醜鍍鎂錨鍵鍊鍥鍋錘鍾鍬鍛鍰鍚鍔闊闋闌闈闆隱隸雖霜霞鞠韓顆颶餵騁"], +["c240","駿鮮鮫鮪鮭鴻鴿麋黏點黜黝黛鼾齋叢嚕嚮壙壘嬸彝懣戳擴擲擾攆擺擻擷斷曜朦檳檬櫃檻檸櫂檮檯歟歸殯瀉瀋濾瀆濺瀑瀏燻燼燾燸獷獵璧璿甕癖癘"], +["c2a1","癒瞽瞿瞻瞼礎禮穡穢穠竄竅簫簧簪簞簣簡糧織繕繞繚繡繒繙罈翹翻職聶臍臏舊藏薩藍藐藉薰薺薹薦蟯蟬蟲蟠覆覲觴謨謹謬謫豐贅蹙蹣蹦蹤蹟蹕軀轉轍邇邃邈醫醬釐鎔鎊鎖鎢鎳鎮鎬鎰鎘鎚鎗闔闖闐闕離雜雙雛雞霤鞣鞦"], +["c340","鞭韹額顏題顎顓颺餾餿餽餮馥騎髁鬃鬆魏魎魍鯊鯉鯽鯈鯀鵑鵝鵠黠鼕鼬儳嚥壞壟壢寵龐廬懲懷懶懵攀攏曠曝櫥櫝櫚櫓瀛瀟瀨瀚瀝瀕瀘爆爍牘犢獸"], +["c3a1","獺璽瓊瓣疇疆癟癡矇礙禱穫穩簾簿簸簽簷籀繫繭繹繩繪羅繳羶羹羸臘藩藝藪藕藤藥藷蟻蠅蠍蟹蟾襠襟襖襞譁譜識證譚譎譏譆譙贈贊蹼蹲躇蹶蹬蹺蹴轔轎辭邊邋醱醮鏡鏑鏟鏃鏈鏜鏝鏖鏢鏍鏘鏤鏗鏨關隴難霪霧靡韜韻類"], +["c440","願顛颼饅饉騖騙鬍鯨鯧鯖鯛鶉鵡鵲鵪鵬麒麗麓麴勸嚨嚷嚶嚴嚼壤孀孃孽寶巉懸懺攘攔攙曦朧櫬瀾瀰瀲爐獻瓏癢癥礦礪礬礫竇競籌籃籍糯糰辮繽繼"], +["c4a1","纂罌耀臚艦藻藹蘑藺蘆蘋蘇蘊蠔蠕襤覺觸議譬警譯譟譫贏贍躉躁躅躂醴釋鐘鐃鏽闡霰飄饒饑馨騫騰騷騵鰓鰍鹹麵黨鼯齟齣齡儷儸囁囀囂夔屬巍懼懾攝攜斕曩櫻欄櫺殲灌爛犧瓖瓔癩矓籐纏續羼蘗蘭蘚蠣蠢蠡蠟襪襬覽譴"], +["c540","護譽贓躊躍躋轟辯醺鐮鐳鐵鐺鐸鐲鐫闢霸霹露響顧顥饗驅驃驀騾髏魔魑鰭鰥鶯鶴鷂鶸麝黯鼙齜齦齧儼儻囈囊囉孿巔巒彎懿攤權歡灑灘玀瓤疊癮癬"], +["c5a1","禳籠籟聾聽臟襲襯觼讀贖贗躑躓轡酈鑄鑑鑒霽霾韃韁顫饕驕驍髒鬚鱉鰱鰾鰻鷓鷗鼴齬齪龔囌巖戀攣攫攪曬欐瓚竊籤籣籥纓纖纔臢蘸蘿蠱變邐邏鑣鑠鑤靨顯饜驚驛驗髓體髑鱔鱗鱖鷥麟黴囑壩攬灞癱癲矗罐羈蠶蠹衢讓讒"], +["c640","讖艷贛釀鑪靂靈靄韆顰驟鬢魘鱟鷹鷺鹼鹽鼇齷齲廳欖灣籬籮蠻觀躡釁鑲鑰顱饞髖鬣黌灤矚讚鑷韉驢驥纜讜躪釅鑽鑾鑼鱷鱸黷豔鑿鸚爨驪鬱鸛鸞籲"], +["c940","乂乜凵匚厂万丌乇亍囗兀屮彳丏冇与丮亓仂仉仈冘勼卬厹圠夃夬尐巿旡殳毌气爿丱丼仨仜仩仡仝仚刌匜卌圢圣夗夯宁宄尒尻屴屳帄庀庂忉戉扐氕"], +["c9a1","氶汃氿氻犮犰玊禸肊阞伎优伬仵伔仱伀价伈伝伂伅伢伓伄仴伒冱刓刉刐劦匢匟卍厊吇囡囟圮圪圴夼妀奼妅奻奾奷奿孖尕尥屼屺屻屾巟幵庄异弚彴忕忔忏扜扞扤扡扦扢扙扠扚扥旯旮朾朹朸朻机朿朼朳氘汆汒汜汏汊汔汋"], +["ca40","汌灱牞犴犵玎甪癿穵网艸艼芀艽艿虍襾邙邗邘邛邔阢阤阠阣佖伻佢佉体佤伾佧佒佟佁佘伭伳伿佡冏冹刜刞刡劭劮匉卣卲厎厏吰吷吪呔呅吙吜吥吘"], +["caa1","吽呏呁吨吤呇囮囧囥坁坅坌坉坋坒夆奀妦妘妠妗妎妢妐妏妧妡宎宒尨尪岍岏岈岋岉岒岊岆岓岕巠帊帎庋庉庌庈庍弅弝彸彶忒忑忐忭忨忮忳忡忤忣忺忯忷忻怀忴戺抃抌抎抏抔抇扱扻扺扰抁抈扷扽扲扴攷旰旴旳旲旵杅杇"], +["cb40","杙杕杌杈杝杍杚杋毐氙氚汸汧汫沄沋沏汱汯汩沚汭沇沕沜汦汳汥汻沎灴灺牣犿犽狃狆狁犺狅玕玗玓玔玒町甹疔疕皁礽耴肕肙肐肒肜芐芏芅芎芑芓"], +["cba1","芊芃芄豸迉辿邟邡邥邞邧邠阰阨阯阭丳侘佼侅佽侀侇佶佴侉侄佷佌侗佪侚佹侁佸侐侜侔侞侒侂侕佫佮冞冼冾刵刲刳剆刱劼匊匋匼厒厔咇呿咁咑咂咈呫呺呾呥呬呴呦咍呯呡呠咘呣呧呤囷囹坯坲坭坫坱坰坶垀坵坻坳坴坢"], +["cc40","坨坽夌奅妵妺姏姎妲姌姁妶妼姃姖妱妽姀姈妴姇孢孥宓宕屄屇岮岤岠岵岯岨岬岟岣岭岢岪岧岝岥岶岰岦帗帔帙弨弢弣弤彔徂彾彽忞忥怭怦怙怲怋"], +["cca1","怴怊怗怳怚怞怬怢怍怐怮怓怑怌怉怜戔戽抭抴拑抾抪抶拊抮抳抯抻抩抰抸攽斨斻昉旼昄昒昈旻昃昋昍昅旽昑昐曶朊枅杬枎枒杶杻枘枆构杴枍枌杺枟枑枙枃杽极杸杹枔欥殀歾毞氝沓泬泫泮泙沶泔沭泧沷泐泂沺泃泆泭泲"], +["cd40","泒泝沴沊沝沀泞泀洰泍泇沰泹泏泩泑炔炘炅炓炆炄炑炖炂炚炃牪狖狋狘狉狜狒狔狚狌狑玤玡玭玦玢玠玬玝瓝瓨甿畀甾疌疘皯盳盱盰盵矸矼矹矻矺"], +["cda1","矷祂礿秅穸穻竻籵糽耵肏肮肣肸肵肭舠芠苀芫芚芘芛芵芧芮芼芞芺芴芨芡芩苂芤苃芶芢虰虯虭虮豖迒迋迓迍迖迕迗邲邴邯邳邰阹阽阼阺陃俍俅俓侲俉俋俁俔俜俙侻侳俛俇俖侺俀侹俬剄剉勀勂匽卼厗厖厙厘咺咡咭咥哏"], +["ce40","哃茍咷咮哖咶哅哆咠呰咼咢咾呲哞咰垵垞垟垤垌垗垝垛垔垘垏垙垥垚垕壴复奓姡姞姮娀姱姝姺姽姼姶姤姲姷姛姩姳姵姠姾姴姭宨屌峐峘峌峗峋峛"], +["cea1","峞峚峉峇峊峖峓峔峏峈峆峎峟峸巹帡帢帣帠帤庰庤庢庛庣庥弇弮彖徆怷怹恔恲恞恅恓恇恉恛恌恀恂恟怤恄恘恦恮扂扃拏挍挋拵挎挃拫拹挏挌拸拶挀挓挔拺挕拻拰敁敃斪斿昶昡昲昵昜昦昢昳昫昺昝昴昹昮朏朐柁柲柈枺"], +["cf40","柜枻柸柘柀枷柅柫柤柟枵柍枳柷柶柮柣柂枹柎柧柰枲柼柆柭柌枮柦柛柺柉柊柃柪柋欨殂殄殶毖毘毠氠氡洨洴洭洟洼洿洒洊泚洳洄洙洺洚洑洀洝浂"], +["cfa1","洁洘洷洃洏浀洇洠洬洈洢洉洐炷炟炾炱炰炡炴炵炩牁牉牊牬牰牳牮狊狤狨狫狟狪狦狣玅珌珂珈珅玹玶玵玴珫玿珇玾珃珆玸珋瓬瓮甮畇畈疧疪癹盄眈眃眄眅眊盷盻盺矧矨砆砑砒砅砐砏砎砉砃砓祊祌祋祅祄秕种秏秖秎窀"], +["d040","穾竑笀笁籺籸籹籿粀粁紃紈紁罘羑羍羾耇耎耏耔耷胘胇胠胑胈胂胐胅胣胙胜胊胕胉胏胗胦胍臿舡芔苙苾苹茇苨茀苕茺苫苖苴苬苡苲苵茌苻苶苰苪"], +["d0a1","苤苠苺苳苭虷虴虼虳衁衎衧衪衩觓訄訇赲迣迡迮迠郱邽邿郕郅邾郇郋郈釔釓陔陏陑陓陊陎倞倅倇倓倢倰倛俵俴倳倷倬俶俷倗倜倠倧倵倯倱倎党冔冓凊凄凅凈凎剡剚剒剞剟剕剢勍匎厞唦哢唗唒哧哳哤唚哿唄唈哫唑唅哱"], +["d140","唊哻哷哸哠唎唃唋圁圂埌堲埕埒垺埆垽垼垸垶垿埇埐垹埁夎奊娙娖娭娮娕娏娗娊娞娳孬宧宭宬尃屖屔峬峿峮峱峷崀峹帩帨庨庮庪庬弳弰彧恝恚恧"], +["d1a1","恁悢悈悀悒悁悝悃悕悛悗悇悜悎戙扆拲挐捖挬捄捅挶捃揤挹捋捊挼挩捁挴捘捔捙挭捇挳捚捑挸捗捀捈敊敆旆旃旄旂晊晟晇晑朒朓栟栚桉栲栳栻桋桏栖栱栜栵栫栭栯桎桄栴栝栒栔栦栨栮桍栺栥栠欬欯欭欱欴歭肂殈毦毤"], +["d240","毨毣毢毧氥浺浣浤浶洍浡涒浘浢浭浯涑涍淯浿涆浞浧浠涗浰浼浟涂涘洯浨涋浾涀涄洖涃浻浽浵涐烜烓烑烝烋缹烢烗烒烞烠烔烍烅烆烇烚烎烡牂牸"], +["d2a1","牷牶猀狺狴狾狶狳狻猁珓珙珥珖玼珧珣珩珜珒珛珔珝珚珗珘珨瓞瓟瓴瓵甡畛畟疰痁疻痄痀疿疶疺皊盉眝眛眐眓眒眣眑眕眙眚眢眧砣砬砢砵砯砨砮砫砡砩砳砪砱祔祛祏祜祓祒祑秫秬秠秮秭秪秜秞秝窆窉窅窋窌窊窇竘笐"], +["d340","笄笓笅笏笈笊笎笉笒粄粑粊粌粈粍粅紞紝紑紎紘紖紓紟紒紏紌罜罡罞罠罝罛羖羒翃翂翀耖耾耹胺胲胹胵脁胻脀舁舯舥茳茭荄茙荑茥荖茿荁茦茜茢"], +["d3a1","荂荎茛茪茈茼荍茖茤茠茷茯茩荇荅荌荓茞茬荋茧荈虓虒蚢蚨蚖蚍蚑蚞蚇蚗蚆蚋蚚蚅蚥蚙蚡蚧蚕蚘蚎蚝蚐蚔衃衄衭衵衶衲袀衱衿衯袃衾衴衼訒豇豗豻貤貣赶赸趵趷趶軑軓迾迵适迿迻逄迼迶郖郠郙郚郣郟郥郘郛郗郜郤酐"], +["d440","酎酏釕釢釚陜陟隼飣髟鬯乿偰偪偡偞偠偓偋偝偲偈偍偁偛偊偢倕偅偟偩偫偣偤偆偀偮偳偗偑凐剫剭剬剮勖勓匭厜啵啶唼啍啐唴唪啑啢唶唵唰啒啅"], +["d4a1","唌唲啥啎唹啈唭唻啀啋圊圇埻堔埢埶埜埴堀埭埽堈埸堋埳埏堇埮埣埲埥埬埡堎埼堐埧堁堌埱埩埰堍堄奜婠婘婕婧婞娸娵婭婐婟婥婬婓婤婗婃婝婒婄婛婈媎娾婍娹婌婰婩婇婑婖婂婜孲孮寁寀屙崞崋崝崚崠崌崨崍崦崥崏"], +["d540","崰崒崣崟崮帾帴庱庴庹庲庳弶弸徛徖徟悊悐悆悾悰悺惓惔惏惤惙惝惈悱惛悷惊悿惃惍惀挲捥掊掂捽掽掞掭掝掗掫掎捯掇掐据掯捵掜捭掮捼掤挻掟"], +["d5a1","捸掅掁掑掍捰敓旍晥晡晛晙晜晢朘桹梇梐梜桭桮梮梫楖桯梣梬梩桵桴梲梏桷梒桼桫桲梪梀桱桾梛梖梋梠梉梤桸桻梑梌梊桽欶欳欷欸殑殏殍殎殌氪淀涫涴涳湴涬淩淢涷淶淔渀淈淠淟淖涾淥淜淝淛淴淊涽淭淰涺淕淂淏淉"], +["d640","淐淲淓淽淗淍淣涻烺焍烷焗烴焌烰焄烳焐烼烿焆焓焀烸烶焋焂焎牾牻牼牿猝猗猇猑猘猊猈狿猏猞玈珶珸珵琄琁珽琇琀珺珼珿琌琋珴琈畤畣痎痒痏"], +["d6a1","痋痌痑痐皏皉盓眹眯眭眱眲眴眳眽眥眻眵硈硒硉硍硊硌砦硅硐祤祧祩祪祣祫祡离秺秸秶秷窏窔窐笵筇笴笥笰笢笤笳笘笪笝笱笫笭笯笲笸笚笣粔粘粖粣紵紽紸紶紺絅紬紩絁絇紾紿絊紻紨罣羕羜羝羛翊翋翍翐翑翇翏翉耟"], +["d740","耞耛聇聃聈脘脥脙脛脭脟脬脞脡脕脧脝脢舑舸舳舺舴舲艴莐莣莨莍荺荳莤荴莏莁莕莙荵莔莩荽莃莌莝莛莪莋荾莥莯莈莗莰荿莦莇莮荶莚虙虖蚿蚷"], +["d7a1","蛂蛁蛅蚺蚰蛈蚹蚳蚸蛌蚴蚻蚼蛃蚽蚾衒袉袕袨袢袪袚袑袡袟袘袧袙袛袗袤袬袌袓袎覂觖觙觕訰訧訬訞谹谻豜豝豽貥赽赻赹趼跂趹趿跁軘軞軝軜軗軠軡逤逋逑逜逌逡郯郪郰郴郲郳郔郫郬郩酖酘酚酓酕釬釴釱釳釸釤釹釪"], +["d840","釫釷釨釮镺閆閈陼陭陫陱陯隿靪頄飥馗傛傕傔傞傋傣傃傌傎傝偨傜傒傂傇兟凔匒匑厤厧喑喨喥喭啷噅喢喓喈喏喵喁喣喒喤啽喌喦啿喕喡喎圌堩堷"], +["d8a1","堙堞堧堣堨埵塈堥堜堛堳堿堶堮堹堸堭堬堻奡媯媔媟婺媢媞婸媦婼媥媬媕媮娷媄媊媗媃媋媩婻婽媌媜媏媓媝寪寍寋寔寑寊寎尌尰崷嵃嵫嵁嵋崿崵嵑嵎嵕崳崺嵒崽崱嵙嵂崹嵉崸崼崲崶嵀嵅幄幁彘徦徥徫惉悹惌惢惎惄愔"], +["d940","惲愊愖愅惵愓惸惼惾惁愃愘愝愐惿愄愋扊掔掱掰揎揥揨揯揃撝揳揊揠揶揕揲揵摡揟掾揝揜揄揘揓揂揇揌揋揈揰揗揙攲敧敪敤敜敨敥斌斝斞斮旐旒"], +["d9a1","晼晬晻暀晱晹晪晲朁椌棓椄棜椪棬棪棱椏棖棷棫棤棶椓椐棳棡椇棌椈楰梴椑棯棆椔棸棐棽棼棨椋椊椗棎棈棝棞棦棴棑椆棔棩椕椥棇欹欻欿欼殔殗殙殕殽毰毲毳氰淼湆湇渟湉溈渼渽湅湢渫渿湁湝湳渜渳湋湀湑渻渃渮湞"], +["da40","湨湜湡渱渨湠湱湫渹渢渰湓湥渧湸湤湷湕湹湒湦渵渶湚焠焞焯烻焮焱焣焥焢焲焟焨焺焛牋牚犈犉犆犅犋猒猋猰猢猱猳猧猲猭猦猣猵猌琮琬琰琫琖"], +["daa1","琚琡琭琱琤琣琝琩琠琲瓻甯畯畬痧痚痡痦痝痟痤痗皕皒盚睆睇睄睍睅睊睎睋睌矞矬硠硤硥硜硭硱硪确硰硩硨硞硢祴祳祲祰稂稊稃稌稄窙竦竤筊笻筄筈筌筎筀筘筅粢粞粨粡絘絯絣絓絖絧絪絏絭絜絫絒絔絩絑絟絎缾缿罥"], +["db40","罦羢羠羡翗聑聏聐胾胔腃腊腒腏腇脽腍脺臦臮臷臸臹舄舼舽舿艵茻菏菹萣菀菨萒菧菤菼菶萐菆菈菫菣莿萁菝菥菘菿菡菋菎菖菵菉萉萏菞萑萆菂菳"], +["dba1","菕菺菇菑菪萓菃菬菮菄菻菗菢萛菛菾蛘蛢蛦蛓蛣蛚蛪蛝蛫蛜蛬蛩蛗蛨蛑衈衖衕袺裗袹袸裀袾袶袼袷袽袲褁裉覕覘覗觝觚觛詎詍訹詙詀詗詘詄詅詒詈詑詊詌詏豟貁貀貺貾貰貹貵趄趀趉跘跓跍跇跖跜跏跕跙跈跗跅軯軷軺"], +["dc40","軹軦軮軥軵軧軨軶軫軱軬軴軩逭逴逯鄆鄬鄄郿郼鄈郹郻鄁鄀鄇鄅鄃酡酤酟酢酠鈁鈊鈥鈃鈚鈦鈏鈌鈀鈒釿釽鈆鈄鈧鈂鈜鈤鈙鈗鈅鈖镻閍閌閐隇陾隈"], +["dca1","隉隃隀雂雈雃雱雰靬靰靮頇颩飫鳦黹亃亄亶傽傿僆傮僄僊傴僈僂傰僁傺傱僋僉傶傸凗剺剸剻剼嗃嗛嗌嗐嗋嗊嗝嗀嗔嗄嗩喿嗒喍嗏嗕嗢嗖嗈嗲嗍嗙嗂圔塓塨塤塏塍塉塯塕塎塝塙塥塛堽塣塱壼嫇嫄嫋媺媸媱媵媰媿嫈媻嫆"], +["dd40","媷嫀嫊媴媶嫍媹媐寖寘寙尟尳嵱嵣嵊嵥嵲嵬嵞嵨嵧嵢巰幏幎幊幍幋廅廌廆廋廇彀徯徭惷慉慊愫慅愶愲愮慆愯慏愩慀戠酨戣戥戤揅揱揫搐搒搉搠搤"], +["dda1","搳摃搟搕搘搹搷搢搣搌搦搰搨摁搵搯搊搚摀搥搧搋揧搛搮搡搎敯斒旓暆暌暕暐暋暊暙暔晸朠楦楟椸楎楢楱椿楅楪椹楂楗楙楺楈楉椵楬椳椽楥棰楸椴楩楀楯楄楶楘楁楴楌椻楋椷楜楏楑椲楒椯楻椼歆歅歃歂歈歁殛嗀毻毼"], +["de40","毹毷毸溛滖滈溏滀溟溓溔溠溱溹滆滒溽滁溞滉溷溰滍溦滏溲溾滃滜滘溙溒溎溍溤溡溿溳滐滊溗溮溣煇煔煒煣煠煁煝煢煲煸煪煡煂煘煃煋煰煟煐煓"], +["dea1","煄煍煚牏犍犌犑犐犎猼獂猻猺獀獊獉瑄瑊瑋瑒瑑瑗瑀瑏瑐瑎瑂瑆瑍瑔瓡瓿瓾瓽甝畹畷榃痯瘏瘃痷痾痼痹痸瘐痻痶痭痵痽皙皵盝睕睟睠睒睖睚睩睧睔睙睭矠碇碚碔碏碄碕碅碆碡碃硹碙碀碖硻祼禂祽祹稑稘稙稒稗稕稢稓"], +["df40","稛稐窣窢窞竫筦筤筭筴筩筲筥筳筱筰筡筸筶筣粲粴粯綈綆綀綍絿綅絺綎絻綃絼綌綔綄絽綒罭罫罧罨罬羦羥羧翛翜耡腤腠腷腜腩腛腢腲朡腞腶腧腯"], +["dfa1","腄腡舝艉艄艀艂艅蓱萿葖葶葹蒏蒍葥葑葀蒆葧萰葍葽葚葙葴葳葝蔇葞萷萺萴葺葃葸萲葅萩菙葋萯葂萭葟葰萹葎葌葒葯蓅蒎萻葇萶萳葨葾葄萫葠葔葮葐蜋蜄蛷蜌蛺蛖蛵蝍蛸蜎蜉蜁蛶蜍蜅裖裋裍裎裞裛裚裌裐覅覛觟觥觤"], +["e040","觡觠觢觜触詶誆詿詡訿詷誂誄詵誃誁詴詺谼豋豊豥豤豦貆貄貅賌赨赩趑趌趎趏趍趓趔趐趒跰跠跬跱跮跐跩跣跢跧跲跫跴輆軿輁輀輅輇輈輂輋遒逿"], +["e0a1","遄遉逽鄐鄍鄏鄑鄖鄔鄋鄎酮酯鉈鉒鈰鈺鉦鈳鉥鉞銃鈮鉊鉆鉭鉬鉏鉠鉧鉯鈶鉡鉰鈱鉔鉣鉐鉲鉎鉓鉌鉖鈲閟閜閞閛隒隓隑隗雎雺雽雸雵靳靷靸靲頏頍頎颬飶飹馯馲馰馵骭骫魛鳪鳭鳧麀黽僦僔僗僨僳僛僪僝僤僓僬僰僯僣僠"], +["e140","凘劀劁勩勫匰厬嘧嘕嘌嘒嗼嘏嘜嘁嘓嘂嗺嘝嘄嗿嗹墉塼墐墘墆墁塿塴墋塺墇墑墎塶墂墈塻墔墏壾奫嫜嫮嫥嫕嫪嫚嫭嫫嫳嫢嫠嫛嫬嫞嫝嫙嫨嫟孷寠"], +["e1a1","寣屣嶂嶀嵽嶆嵺嶁嵷嶊嶉嶈嵾嵼嶍嵹嵿幘幙幓廘廑廗廎廜廕廙廒廔彄彃彯徶愬愨慁慞慱慳慒慓慲慬憀慴慔慺慛慥愻慪慡慖戩戧戫搫摍摛摝摴摶摲摳摽摵摦撦摎撂摞摜摋摓摠摐摿搿摬摫摙摥摷敳斠暡暠暟朅朄朢榱榶槉"], +["e240","榠槎榖榰榬榼榑榙榎榧榍榩榾榯榿槄榽榤槔榹槊榚槏榳榓榪榡榞槙榗榐槂榵榥槆歊歍歋殞殟殠毃毄毾滎滵滱漃漥滸漷滻漮漉潎漙漚漧漘漻漒滭漊"], +["e2a1","漶潳滹滮漭潀漰漼漵滫漇漎潃漅滽滶漹漜滼漺漟漍漞漈漡熇熐熉熀熅熂熏煻熆熁熗牄牓犗犕犓獃獍獑獌瑢瑳瑱瑵瑲瑧瑮甀甂甃畽疐瘖瘈瘌瘕瘑瘊瘔皸瞁睼瞅瞂睮瞀睯睾瞃碲碪碴碭碨硾碫碞碥碠碬碢碤禘禊禋禖禕禔禓"], +["e340","禗禈禒禐稫穊稰稯稨稦窨窫窬竮箈箜箊箑箐箖箍箌箛箎箅箘劄箙箤箂粻粿粼粺綧綷緂綣綪緁緀緅綝緎緄緆緋緌綯綹綖綼綟綦綮綩綡緉罳翢翣翥翞"], +["e3a1","耤聝聜膉膆膃膇膍膌膋舕蒗蒤蒡蒟蒺蓎蓂蒬蒮蒫蒹蒴蓁蓍蒪蒚蒱蓐蒝蒧蒻蒢蒔蓇蓌蒛蒩蒯蒨蓖蒘蒶蓏蒠蓗蓔蓒蓛蒰蒑虡蜳蜣蜨蝫蝀蜮蜞蜡蜙蜛蝃蜬蝁蜾蝆蜠蜲蜪蜭蜼蜒蜺蜱蜵蝂蜦蜧蜸蜤蜚蜰蜑裷裧裱裲裺裾裮裼裶裻"], +["e440","裰裬裫覝覡覟覞觩觫觨誫誙誋誒誏誖谽豨豩賕賏賗趖踉踂跿踍跽踊踃踇踆踅跾踀踄輐輑輎輍鄣鄜鄠鄢鄟鄝鄚鄤鄡鄛酺酲酹酳銥銤鉶銛鉺銠銔銪銍"], +["e4a1","銦銚銫鉹銗鉿銣鋮銎銂銕銢鉽銈銡銊銆銌銙銧鉾銇銩銝銋鈭隞隡雿靘靽靺靾鞃鞀鞂靻鞄鞁靿韎韍頖颭颮餂餀餇馝馜駃馹馻馺駂馽駇骱髣髧鬾鬿魠魡魟鳱鳲鳵麧僿儃儰僸儆儇僶僾儋儌僽儊劋劌勱勯噈噂噌嘵噁噊噉噆噘"], +["e540","噚噀嘳嘽嘬嘾嘸嘪嘺圚墫墝墱墠墣墯墬墥墡壿嫿嫴嫽嫷嫶嬃嫸嬂嫹嬁嬇嬅嬏屧嶙嶗嶟嶒嶢嶓嶕嶠嶜嶡嶚嶞幩幝幠幜緳廛廞廡彉徲憋憃慹憱憰憢憉"], +["e5a1","憛憓憯憭憟憒憪憡憍慦憳戭摮摰撖撠撅撗撜撏撋撊撌撣撟摨撱撘敶敺敹敻斲斳暵暰暩暲暷暪暯樀樆樗槥槸樕槱槤樠槿槬槢樛樝槾樧槲槮樔槷槧橀樈槦槻樍槼槫樉樄樘樥樏槶樦樇槴樖歑殥殣殢殦氁氀毿氂潁漦潾澇濆澒"], +["e640","澍澉澌潢潏澅潚澖潶潬澂潕潲潒潐潗澔澓潝漀潡潫潽潧澐潓澋潩潿澕潣潷潪潻熲熯熛熰熠熚熩熵熝熥熞熤熡熪熜熧熳犘犚獘獒獞獟獠獝獛獡獚獙"], +["e6a1","獢璇璉璊璆璁瑽璅璈瑼瑹甈甇畾瘥瘞瘙瘝瘜瘣瘚瘨瘛皜皝皞皛瞍瞏瞉瞈磍碻磏磌磑磎磔磈磃磄磉禚禡禠禜禢禛歶稹窲窴窳箷篋箾箬篎箯箹篊箵糅糈糌糋緷緛緪緧緗緡縃緺緦緶緱緰緮緟罶羬羰羭翭翫翪翬翦翨聤聧膣膟"], +["e740","膞膕膢膙膗舖艏艓艒艐艎艑蔤蔻蔏蔀蔩蔎蔉蔍蔟蔊蔧蔜蓻蔫蓺蔈蔌蓴蔪蓲蔕蓷蓫蓳蓼蔒蓪蓩蔖蓾蔨蔝蔮蔂蓽蔞蓶蔱蔦蓧蓨蓰蓯蓹蔘蔠蔰蔋蔙蔯虢"], +["e7a1","蝖蝣蝤蝷蟡蝳蝘蝔蝛蝒蝡蝚蝑蝞蝭蝪蝐蝎蝟蝝蝯蝬蝺蝮蝜蝥蝏蝻蝵蝢蝧蝩衚褅褌褔褋褗褘褙褆褖褑褎褉覢覤覣觭觰觬諏諆誸諓諑諔諕誻諗誾諀諅諘諃誺誽諙谾豍貏賥賟賙賨賚賝賧趠趜趡趛踠踣踥踤踮踕踛踖踑踙踦踧"], +["e840","踔踒踘踓踜踗踚輬輤輘輚輠輣輖輗遳遰遯遧遫鄯鄫鄩鄪鄲鄦鄮醅醆醊醁醂醄醀鋐鋃鋄鋀鋙銶鋏鋱鋟鋘鋩鋗鋝鋌鋯鋂鋨鋊鋈鋎鋦鋍鋕鋉鋠鋞鋧鋑鋓"], +["e8a1","銵鋡鋆銴镼閬閫閮閰隤隢雓霅霈霂靚鞊鞎鞈韐韏頞頝頦頩頨頠頛頧颲餈飺餑餔餖餗餕駜駍駏駓駔駎駉駖駘駋駗駌骳髬髫髳髲髱魆魃魧魴魱魦魶魵魰魨魤魬鳼鳺鳽鳿鳷鴇鴀鳹鳻鴈鴅鴄麃黓鼏鼐儜儓儗儚儑凞匴叡噰噠噮"], +["e940","噳噦噣噭噲噞噷圜圛壈墽壉墿墺壂墼壆嬗嬙嬛嬡嬔嬓嬐嬖嬨嬚嬠嬞寯嶬嶱嶩嶧嶵嶰嶮嶪嶨嶲嶭嶯嶴幧幨幦幯廩廧廦廨廥彋徼憝憨憖懅憴懆懁懌憺"], +["e9a1","憿憸憌擗擖擐擏擉撽撉擃擛擳擙攳敿敼斢曈暾曀曊曋曏暽暻暺曌朣樴橦橉橧樲橨樾橝橭橶橛橑樨橚樻樿橁橪橤橐橏橔橯橩橠樼橞橖橕橍橎橆歕歔歖殧殪殫毈毇氄氃氆澭濋澣濇澼濎濈潞濄澽澞濊澨瀄澥澮澺澬澪濏澿澸"], +["ea40","澢濉澫濍澯澲澰燅燂熿熸燖燀燁燋燔燊燇燏熽燘熼燆燚燛犝犞獩獦獧獬獥獫獪瑿璚璠璔璒璕璡甋疀瘯瘭瘱瘽瘳瘼瘵瘲瘰皻盦瞚瞝瞡瞜瞛瞢瞣瞕瞙"], +["eaa1","瞗磝磩磥磪磞磣磛磡磢磭磟磠禤穄穈穇窶窸窵窱窷篞篣篧篝篕篥篚篨篹篔篪篢篜篫篘篟糒糔糗糐糑縒縡縗縌縟縠縓縎縜縕縚縢縋縏縖縍縔縥縤罃罻罼罺羱翯耪耩聬膱膦膮膹膵膫膰膬膴膲膷膧臲艕艖艗蕖蕅蕫蕍蕓蕡蕘"], +["eb40","蕀蕆蕤蕁蕢蕄蕑蕇蕣蔾蕛蕱蕎蕮蕵蕕蕧蕠薌蕦蕝蕔蕥蕬虣虥虤螛螏螗螓螒螈螁螖螘蝹螇螣螅螐螑螝螄螔螜螚螉褞褦褰褭褮褧褱褢褩褣褯褬褟觱諠"], +["eba1","諢諲諴諵諝謔諤諟諰諈諞諡諨諿諯諻貑貒貐賵賮賱賰賳赬赮趥趧踳踾踸蹀蹅踶踼踽蹁踰踿躽輶輮輵輲輹輷輴遶遹遻邆郺鄳鄵鄶醓醐醑醍醏錧錞錈錟錆錏鍺錸錼錛錣錒錁鍆錭錎錍鋋錝鋺錥錓鋹鋷錴錂錤鋿錩錹錵錪錔錌"], +["ec40","錋鋾錉錀鋻錖閼闍閾閹閺閶閿閵閽隩雔霋霒霐鞙鞗鞔韰韸頵頯頲餤餟餧餩馞駮駬駥駤駰駣駪駩駧骹骿骴骻髶髺髹髷鬳鮀鮅鮇魼魾魻鮂鮓鮒鮐魺鮕"], +["eca1","魽鮈鴥鴗鴠鴞鴔鴩鴝鴘鴢鴐鴙鴟麈麆麇麮麭黕黖黺鼒鼽儦儥儢儤儠儩勴嚓嚌嚍嚆嚄嚃噾嚂噿嚁壖壔壏壒嬭嬥嬲嬣嬬嬧嬦嬯嬮孻寱寲嶷幬幪徾徻懃憵憼懧懠懥懤懨懞擯擩擣擫擤擨斁斀斶旚曒檍檖檁檥檉檟檛檡檞檇檓檎"], +["ed40","檕檃檨檤檑橿檦檚檅檌檒歛殭氉濌澩濴濔濣濜濭濧濦濞濲濝濢濨燡燱燨燲燤燰燢獳獮獯璗璲璫璐璪璭璱璥璯甐甑甒甏疄癃癈癉癇皤盩瞵瞫瞲瞷瞶"], +["eda1","瞴瞱瞨矰磳磽礂磻磼磲礅磹磾礄禫禨穜穛穖穘穔穚窾竀竁簅簏篲簀篿篻簎篴簋篳簂簉簃簁篸篽簆篰篱簐簊糨縭縼繂縳顈縸縪繉繀繇縩繌縰縻縶繄縺罅罿罾罽翴翲耬膻臄臌臊臅臇膼臩艛艚艜薃薀薏薧薕薠薋薣蕻薤薚薞"], +["ee40","蕷蕼薉薡蕺蕸蕗薎薖薆薍薙薝薁薢薂薈薅蕹蕶薘薐薟虨螾螪螭蟅螰螬螹螵螼螮蟉蟃蟂蟌螷螯蟄蟊螴螶螿螸螽蟞螲褵褳褼褾襁襒褷襂覭覯覮觲觳謞"], +["eea1","謘謖謑謅謋謢謏謒謕謇謍謈謆謜謓謚豏豰豲豱豯貕貔賹赯蹎蹍蹓蹐蹌蹇轃轀邅遾鄸醚醢醛醙醟醡醝醠鎡鎃鎯鍤鍖鍇鍼鍘鍜鍶鍉鍐鍑鍠鍭鎏鍌鍪鍹鍗鍕鍒鍏鍱鍷鍻鍡鍞鍣鍧鎀鍎鍙闇闀闉闃闅閷隮隰隬霠霟霘霝霙鞚鞡鞜"], +["ef40","鞞鞝韕韔韱顁顄顊顉顅顃餥餫餬餪餳餲餯餭餱餰馘馣馡騂駺駴駷駹駸駶駻駽駾駼騃骾髾髽鬁髼魈鮚鮨鮞鮛鮦鮡鮥鮤鮆鮢鮠鮯鴳鵁鵧鴶鴮鴯鴱鴸鴰"], +["efa1","鵅鵂鵃鴾鴷鵀鴽翵鴭麊麉麍麰黈黚黻黿鼤鼣鼢齔龠儱儭儮嚘嚜嚗嚚嚝嚙奰嬼屩屪巀幭幮懘懟懭懮懱懪懰懫懖懩擿攄擽擸攁攃擼斔旛曚曛曘櫅檹檽櫡櫆檺檶檷櫇檴檭歞毉氋瀇瀌瀍瀁瀅瀔瀎濿瀀濻瀦濼濷瀊爁燿燹爃燽獶"], +["f040","璸瓀璵瓁璾璶璻瓂甔甓癜癤癙癐癓癗癚皦皽盬矂瞺磿礌礓礔礉礐礒礑禭禬穟簜簩簙簠簟簭簝簦簨簢簥簰繜繐繖繣繘繢繟繑繠繗繓羵羳翷翸聵臑臒"], +["f0a1","臐艟艞薴藆藀藃藂薳薵薽藇藄薿藋藎藈藅薱薶藒蘤薸薷薾虩蟧蟦蟢蟛蟫蟪蟥蟟蟳蟤蟔蟜蟓蟭蟘蟣螤蟗蟙蠁蟴蟨蟝襓襋襏襌襆襐襑襉謪謧謣謳謰謵譇謯謼謾謱謥謷謦謶謮謤謻謽謺豂豵貙貘貗賾贄贂贀蹜蹢蹠蹗蹖蹞蹥蹧"], +["f140","蹛蹚蹡蹝蹩蹔轆轇轈轋鄨鄺鄻鄾醨醥醧醯醪鎵鎌鎒鎷鎛鎝鎉鎧鎎鎪鎞鎦鎕鎈鎙鎟鎍鎱鎑鎲鎤鎨鎴鎣鎥闒闓闑隳雗雚巂雟雘雝霣霢霥鞬鞮鞨鞫鞤鞪"], +["f1a1","鞢鞥韗韙韖韘韺顐顑顒颸饁餼餺騏騋騉騍騄騑騊騅騇騆髀髜鬈鬄鬅鬩鬵魊魌魋鯇鯆鯃鮿鯁鮵鮸鯓鮶鯄鮹鮽鵜鵓鵏鵊鵛鵋鵙鵖鵌鵗鵒鵔鵟鵘鵚麎麌黟鼁鼀鼖鼥鼫鼪鼩鼨齌齕儴儵劖勷厴嚫嚭嚦嚧嚪嚬壚壝壛夒嬽嬾嬿巃幰"], +["f240","徿懻攇攐攍攉攌攎斄旞旝曞櫧櫠櫌櫑櫙櫋櫟櫜櫐櫫櫏櫍櫞歠殰氌瀙瀧瀠瀖瀫瀡瀢瀣瀩瀗瀤瀜瀪爌爊爇爂爅犥犦犤犣犡瓋瓅璷瓃甖癠矉矊矄矱礝礛"], +["f2a1","礡礜礗礞禰穧穨簳簼簹簬簻糬糪繶繵繸繰繷繯繺繲繴繨罋罊羃羆羷翽翾聸臗臕艤艡艣藫藱藭藙藡藨藚藗藬藲藸藘藟藣藜藑藰藦藯藞藢蠀蟺蠃蟶蟷蠉蠌蠋蠆蟼蠈蟿蠊蠂襢襚襛襗襡襜襘襝襙覈覷覶觶譐譈譊譀譓譖譔譋譕"], +["f340","譑譂譒譗豃豷豶貚贆贇贉趬趪趭趫蹭蹸蹳蹪蹯蹻軂轒轑轏轐轓辴酀鄿醰醭鏞鏇鏏鏂鏚鏐鏹鏬鏌鏙鎩鏦鏊鏔鏮鏣鏕鏄鏎鏀鏒鏧镽闚闛雡霩霫霬霨霦"], +["f3a1","鞳鞷鞶韝韞韟顜顙顝顗颿颽颻颾饈饇饃馦馧騚騕騥騝騤騛騢騠騧騣騞騜騔髂鬋鬊鬎鬌鬷鯪鯫鯠鯞鯤鯦鯢鯰鯔鯗鯬鯜鯙鯥鯕鯡鯚鵷鶁鶊鶄鶈鵱鶀鵸鶆鶋鶌鵽鵫鵴鵵鵰鵩鶅鵳鵻鶂鵯鵹鵿鶇鵨麔麑黀黼鼭齀齁齍齖齗齘匷嚲"], +["f440","嚵嚳壣孅巆巇廮廯忀忁懹攗攖攕攓旟曨曣曤櫳櫰櫪櫨櫹櫱櫮櫯瀼瀵瀯瀷瀴瀱灂瀸瀿瀺瀹灀瀻瀳灁爓爔犨獽獼璺皫皪皾盭矌矎矏矍矲礥礣礧礨礤礩"], +["f4a1","禲穮穬穭竷籉籈籊籇籅糮繻繾纁纀羺翿聹臛臙舋艨艩蘢藿蘁藾蘛蘀藶蘄蘉蘅蘌藽蠙蠐蠑蠗蠓蠖襣襦覹觷譠譪譝譨譣譥譧譭趮躆躈躄轙轖轗轕轘轚邍酃酁醷醵醲醳鐋鐓鏻鐠鐏鐔鏾鐕鐐鐨鐙鐍鏵鐀鏷鐇鐎鐖鐒鏺鐉鏸鐊鏿"], +["f540","鏼鐌鏶鐑鐆闞闠闟霮霯鞹鞻韽韾顠顢顣顟飁飂饐饎饙饌饋饓騲騴騱騬騪騶騩騮騸騭髇髊髆鬐鬒鬑鰋鰈鯷鰅鰒鯸鱀鰇鰎鰆鰗鰔鰉鶟鶙鶤鶝鶒鶘鶐鶛"], +["f5a1","鶠鶔鶜鶪鶗鶡鶚鶢鶨鶞鶣鶿鶩鶖鶦鶧麙麛麚黥黤黧黦鼰鼮齛齠齞齝齙龑儺儹劘劗囃嚽嚾孈孇巋巏廱懽攛欂櫼欃櫸欀灃灄灊灈灉灅灆爝爚爙獾甗癪矐礭礱礯籔籓糲纊纇纈纋纆纍罍羻耰臝蘘蘪蘦蘟蘣蘜蘙蘧蘮蘡蘠蘩蘞蘥"], +["f640","蠩蠝蠛蠠蠤蠜蠫衊襭襩襮襫觺譹譸譅譺譻贐贔趯躎躌轞轛轝酆酄酅醹鐿鐻鐶鐩鐽鐼鐰鐹鐪鐷鐬鑀鐱闥闤闣霵霺鞿韡顤飉飆飀饘饖騹騽驆驄驂驁騺"], +["f6a1","騿髍鬕鬗鬘鬖鬺魒鰫鰝鰜鰬鰣鰨鰩鰤鰡鶷鶶鶼鷁鷇鷊鷏鶾鷅鷃鶻鶵鷎鶹鶺鶬鷈鶱鶭鷌鶳鷍鶲鹺麜黫黮黭鼛鼘鼚鼱齎齥齤龒亹囆囅囋奱孋孌巕巑廲攡攠攦攢欋欈欉氍灕灖灗灒爞爟犩獿瓘瓕瓙瓗癭皭礵禴穰穱籗籜籙籛籚"], +["f740","糴糱纑罏羇臞艫蘴蘵蘳蘬蘲蘶蠬蠨蠦蠪蠥襱覿覾觻譾讄讂讆讅譿贕躕躔躚躒躐躖躗轠轢酇鑌鑐鑊鑋鑏鑇鑅鑈鑉鑆霿韣顪顩飋饔饛驎驓驔驌驏驈驊"], +["f7a1","驉驒驐髐鬙鬫鬻魖魕鱆鱈鰿鱄鰹鰳鱁鰼鰷鰴鰲鰽鰶鷛鷒鷞鷚鷋鷐鷜鷑鷟鷩鷙鷘鷖鷵鷕鷝麶黰鼵鼳鼲齂齫龕龢儽劙壨壧奲孍巘蠯彏戁戃戄攩攥斖曫欑欒欏毊灛灚爢玂玁玃癰矔籧籦纕艬蘺虀蘹蘼蘱蘻蘾蠰蠲蠮蠳襶襴襳觾"], +["f840","讌讎讋讈豅贙躘轤轣醼鑢鑕鑝鑗鑞韄韅頀驖驙鬞鬟鬠鱒鱘鱐鱊鱍鱋鱕鱙鱌鱎鷻鷷鷯鷣鷫鷸鷤鷶鷡鷮鷦鷲鷰鷢鷬鷴鷳鷨鷭黂黐黲黳鼆鼜鼸鼷鼶齃齏"], +["f8a1","齱齰齮齯囓囍孎屭攭曭曮欓灟灡灝灠爣瓛瓥矕礸禷禶籪纗羉艭虃蠸蠷蠵衋讔讕躞躟躠躝醾醽釂鑫鑨鑩雥靆靃靇韇韥驞髕魙鱣鱧鱦鱢鱞鱠鸂鷾鸇鸃鸆鸅鸀鸁鸉鷿鷽鸄麠鼞齆齴齵齶囔攮斸欘欙欗欚灢爦犪矘矙礹籩籫糶纚"], +["f940","纘纛纙臠臡虆虇虈襹襺襼襻觿讘讙躥躤躣鑮鑭鑯鑱鑳靉顲饟鱨鱮鱭鸋鸍鸐鸏鸒鸑麡黵鼉齇齸齻齺齹圞灦籯蠼趲躦釃鑴鑸鑶鑵驠鱴鱳鱱鱵鸔鸓黶鼊"], +["f9a1","龤灨灥糷虪蠾蠽蠿讞貜躩軉靋顳顴飌饡馫驤驦驧鬤鸕鸗齈戇欞爧虌躨钂钀钁驩驨鬮鸙爩虋讟钃鱹麷癵驫鱺鸝灩灪麤齾齉龘碁銹裏墻恒粧嫺╔╦╗╠╬╣╚╩╝╒╤╕╞╪╡╘╧╛╓╥╖╟╫╢╙╨╜║═╭╮╰╯▓"] +] diff --git a/pitfall/pdfkit/node_modules/iconv-lite/encodings/tables/eucjp.json b/pitfall/pdfkit/node_modules/iconv-lite/encodings/tables/eucjp.json new file mode 100644 index 00000000..4fa61ca1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/iconv-lite/encodings/tables/eucjp.json @@ -0,0 +1,182 @@ +[ +["0","\u0000",127], +["8ea1","。",62], +["a1a1"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇"], +["a2a1","◆□■△▲▽▼※〒→←↑↓〓"], +["a2ba","∈∋⊆⊇⊂⊃∪∩"], +["a2ca","∧∨¬⇒⇔∀∃"], +["a2dc","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"], +["a2f2","ʼn♯♭♪†‡¶"], +["a2fe","◯"], +["a3b0","0",9], +["a3c1","A",25], +["a3e1","a",25], +["a4a1","ぁ",82], +["a5a1","ァ",85], +["a6a1","Α",16,"Σ",6], +["a6c1","α",16,"σ",6], +["a7a1","А",5,"ЁЖ",25], +["a7d1","а",5,"ёж",25], +["a8a1","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"], +["ada1","①",19,"Ⅰ",9], +["adc0","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"], +["addf","㍻〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"], +["b0a1","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"], +["b1a1","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応"], +["b2a1","押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"], +["b3a1","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱"], +["b4a1","粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"], +["b5a1","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京"], +["b6a1","供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"], +["b7a1","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲"], +["b8a1","検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"], +["b9a1","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込"], +["baa1","此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"], +["bba1","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時"], +["bca1","次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"], +["bda1","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償"], +["bea1","勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"], +["bfa1","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾"], +["c0a1","澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"], +["c1a1","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎"], +["c2a1","臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"], +["c3a1","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵"], +["c4a1","帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"], +["c5a1","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到"], +["c6a1","董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"], +["c7a1","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦"], +["c8a1","函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"], +["c9a1","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服"], +["caa1","福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"], +["cba1","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満"], +["cca1","漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"], +["cda1","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃"], +["cea1","痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"], +["cfa1","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"], +["d0a1","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"], +["d1a1","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨"], +["d2a1","辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"], +["d3a1","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉"], +["d4a1","圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"], +["d5a1","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓"], +["d6a1","屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"], +["d7a1","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚"], +["d8a1","悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"], +["d9a1","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼"], +["daa1","據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"], +["dba1","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍"], +["dca1","棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"], +["dda1","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾"], +["dea1","沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"], +["dfa1","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼"], +["e0a1","燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"], +["e1a1","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰"], +["e2a1","癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"], +["e3a1","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐"], +["e4a1","筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"], +["e5a1","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺"], +["e6a1","罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"], +["e7a1","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙"], +["e8a1","茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"], +["e9a1","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙"], +["eaa1","蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"], +["eba1","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫"], +["eca1","譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"], +["eda1","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸"], +["eea1","遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"], +["efa1","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞"], +["f0a1","陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"], +["f1a1","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷"], +["f2a1","髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"], +["f3a1","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠"], +["f4a1","堯槇遙瑤凜熙"], +["f9a1","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德"], +["faa1","忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"], +["fba1","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚"], +["fca1","釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"], +["fcf1","ⅰ",9,"¬¦'""], +["8fa2af","˘ˇ¸˙˝¯˛˚~΄΅"], +["8fa2c2","¡¦¿"], +["8fa2eb","ºª©®™¤№"], +["8fa6e1","ΆΈΉΊΪ"], +["8fa6e7","Ό"], +["8fa6e9","ΎΫ"], +["8fa6ec","Ώ"], +["8fa6f1","άέήίϊΐόςύϋΰώ"], +["8fa7c2","Ђ",10,"ЎЏ"], +["8fa7f2","ђ",10,"ўџ"], +["8fa9a1","ÆĐ"], +["8fa9a4","Ħ"], +["8fa9a6","IJ"], +["8fa9a8","ŁĿ"], +["8fa9ab","ŊØŒ"], +["8fa9af","ŦÞ"], +["8fa9c1","æđðħıijĸłŀʼnŋøœßŧþ"], +["8faaa1","ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈËÊĚĖĒĘ"], +["8faaba","ĜĞĢĠĤÍÌÏÎǏİĪĮĨĴĶĹĽĻŃŇŅÑÓÒÖÔǑŐŌÕŔŘŖŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙǕŴÝŸŶŹŽŻ"], +["8faba1","áàäâăǎāąåãćĉčçċďéèëêěėēęǵĝğ"], +["8fabbd","ġĥíìïîǐ"], +["8fabc5","īįĩĵķĺľļńňņñóòöôǒőōõŕřŗśŝšşťţúùüûŭǔűūųůũǘǜǚǖŵýÿŷźžż"], +["8fb0a1","丂丄丅丌丒丟丣两丨丫丮丯丰丵乀乁乄乇乑乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘佟佣佪佬佮佱佷佸佹佺佽佾侁侂侄"], +["8fb1a1","侅侉侊侌侎侐侒侓侔侗侙侚侞侟侲侷侹侻侼侽侾俀俁俅俆俈俉俋俌俍俏俒俜俠俢俰俲俼俽俿倀倁倄倇倊倌倎倐倓倗倘倛倜倝倞倢倧倮倰倲倳倵偀偁偂偅偆偊偌偎偑偒偓偗偙偟偠偢偣偦偧偪偭偰偱倻傁傃傄傆傊傎傏傐"], +["8fb2a1","傒傓傔傖傛傜傞",4,"傪傯傰傹傺傽僀僃僄僇僌僎僐僓僔僘僜僝僟僢僤僦僨僩僯僱僶僺僾儃儆儇儈儋儌儍儎僲儐儗儙儛儜儝儞儣儧儨儬儭儯儱儳儴儵儸儹兂兊兏兓兕兗兘兟兤兦兾冃冄冋冎冘冝冡冣冭冸冺冼冾冿凂"], +["8fb3a1","凈减凑凒凓凕凘凞凢凥凮凲凳凴凷刁刂刅划刓刕刖刘刢刨刱刲刵刼剅剉剕剗剘剚剜剟剠剡剦剮剷剸剹劀劂劅劊劌劓劕劖劗劘劚劜劤劥劦劧劯劰劶劷劸劺劻劽勀勄勆勈勌勏勑勔勖勛勜勡勥勨勩勪勬勰勱勴勶勷匀匃匊匋"], +["8fb4a1","匌匑匓匘匛匜匞匟匥匧匨匩匫匬匭匰匲匵匼匽匾卂卌卋卙卛卡卣卥卬卭卲卹卾厃厇厈厎厓厔厙厝厡厤厪厫厯厲厴厵厷厸厺厽叀叅叏叒叓叕叚叝叞叠另叧叵吂吓吚吡吧吨吪启吱吴吵呃呄呇呍呏呞呢呤呦呧呩呫呭呮呴呿"], +["8fb5a1","咁咃咅咈咉咍咑咕咖咜咟咡咦咧咩咪咭咮咱咷咹咺咻咿哆哊响哎哠哪哬哯哶哼哾哿唀唁唅唈唉唌唍唎唕唪唫唲唵唶唻唼唽啁啇啉啊啍啐啑啘啚啛啞啠啡啤啦啿喁喂喆喈喎喏喑喒喓喔喗喣喤喭喲喿嗁嗃嗆嗉嗋嗌嗎嗑嗒"], +["8fb6a1","嗓嗗嗘嗛嗞嗢嗩嗶嗿嘅嘈嘊嘍",5,"嘙嘬嘰嘳嘵嘷嘹嘻嘼嘽嘿噀噁噃噄噆噉噋噍噏噔噞噠噡噢噣噦噩噭噯噱噲噵嚄嚅嚈嚋嚌嚕嚙嚚嚝嚞嚟嚦嚧嚨嚩嚫嚬嚭嚱嚳嚷嚾囅囉囊囋囏囐囌囍囙囜囝囟囡囤",4,"囱囫园"], +["8fb7a1","囶囷圁圂圇圊圌圑圕圚圛圝圠圢圣圤圥圩圪圬圮圯圳圴圽圾圿坅坆坌坍坒坢坥坧坨坫坭",4,"坳坴坵坷坹坺坻坼坾垁垃垌垔垗垙垚垜垝垞垟垡垕垧垨垩垬垸垽埇埈埌埏埕埝埞埤埦埧埩埭埰埵埶埸埽埾埿堃堄堈堉埡"], +["8fb8a1","堌堍堛堞堟堠堦堧堭堲堹堿塉塌塍塏塐塕塟塡塤塧塨塸塼塿墀墁墇墈墉墊墌墍墏墐墔墖墝墠墡墢墦墩墱墲壄墼壂壈壍壎壐壒壔壖壚壝壡壢壩壳夅夆夋夌夒夓夔虁夝夡夣夤夨夯夰夳夵夶夿奃奆奒奓奙奛奝奞奟奡奣奫奭"], +["8fb9a1","奯奲奵奶她奻奼妋妌妎妒妕妗妟妤妧妭妮妯妰妳妷妺妼姁姃姄姈姊姍姒姝姞姟姣姤姧姮姯姱姲姴姷娀娄娌娍娎娒娓娞娣娤娧娨娪娭娰婄婅婇婈婌婐婕婞婣婥婧婭婷婺婻婾媋媐媓媖媙媜媞媟媠媢媧媬媱媲媳媵媸媺媻媿"], +["8fbaa1","嫄嫆嫈嫏嫚嫜嫠嫥嫪嫮嫵嫶嫽嬀嬁嬈嬗嬴嬙嬛嬝嬡嬥嬭嬸孁孋孌孒孖孞孨孮孯孼孽孾孿宁宄宆宊宎宐宑宓宔宖宨宩宬宭宯宱宲宷宺宼寀寁寍寏寖",4,"寠寯寱寴寽尌尗尞尟尣尦尩尫尬尮尰尲尵尶屙屚屜屢屣屧屨屩"], +["8fbba1","屭屰屴屵屺屻屼屽岇岈岊岏岒岝岟岠岢岣岦岪岲岴岵岺峉峋峒峝峗峮峱峲峴崁崆崍崒崫崣崤崦崧崱崴崹崽崿嵂嵃嵆嵈嵕嵑嵙嵊嵟嵠嵡嵢嵤嵪嵭嵰嵹嵺嵾嵿嶁嶃嶈嶊嶒嶓嶔嶕嶙嶛嶟嶠嶧嶫嶰嶴嶸嶹巃巇巋巐巎巘巙巠巤"], +["8fbca1","巩巸巹帀帇帍帒帔帕帘帟帠帮帨帲帵帾幋幐幉幑幖幘幛幜幞幨幪",4,"幰庀庋庎庢庤庥庨庪庬庱庳庽庾庿廆廌廋廎廑廒廔廕廜廞廥廫异弆弇弈弎弙弜弝弡弢弣弤弨弫弬弮弰弴弶弻弽弿彀彄彅彇彍彐彔彘彛彠彣彤彧"], +["8fbda1","彯彲彴彵彸彺彽彾徉徍徏徖徜徝徢徧徫徤徬徯徰徱徸忄忇忈忉忋忐",4,"忞忡忢忨忩忪忬忭忮忯忲忳忶忺忼怇怊怍怓怔怗怘怚怟怤怭怳怵恀恇恈恉恌恑恔恖恗恝恡恧恱恾恿悂悆悈悊悎悑悓悕悘悝悞悢悤悥您悰悱悷"], +["8fbea1","悻悾惂惄惈惉惊惋惎惏惔惕惙惛惝惞惢惥惲惵惸惼惽愂愇愊愌愐",4,"愖愗愙愜愞愢愪愫愰愱愵愶愷愹慁慅慆慉慞慠慬慲慸慻慼慿憀憁憃憄憋憍憒憓憗憘憜憝憟憠憥憨憪憭憸憹憼懀懁懂懎懏懕懜懝懞懟懡懢懧懩懥"], +["8fbfa1","懬懭懯戁戃戄戇戓戕戜戠戢戣戧戩戫戹戽扂扃扄扆扌扐扑扒扔扖扚扜扤扭扯扳扺扽抍抎抏抐抦抨抳抶抷抺抾抿拄拎拕拖拚拪拲拴拼拽挃挄挊挋挍挐挓挖挘挩挪挭挵挶挹挼捁捂捃捄捆捊捋捎捒捓捔捘捛捥捦捬捭捱捴捵"], +["8fc0a1","捸捼捽捿掂掄掇掊掐掔掕掙掚掞掤掦掭掮掯掽揁揅揈揎揑揓揔揕揜揠揥揪揬揲揳揵揸揹搉搊搐搒搔搘搞搠搢搤搥搩搪搯搰搵搽搿摋摏摑摒摓摔摚摛摜摝摟摠摡摣摭摳摴摻摽撅撇撏撐撑撘撙撛撝撟撡撣撦撨撬撳撽撾撿"], +["8fc1a1","擄擉擊擋擌擎擐擑擕擗擤擥擩擪擭擰擵擷擻擿攁攄攈攉攊攏攓攔攖攙攛攞攟攢攦攩攮攱攺攼攽敃敇敉敐敒敔敟敠敧敫敺敽斁斅斊斒斕斘斝斠斣斦斮斲斳斴斿旂旈旉旎旐旔旖旘旟旰旲旴旵旹旾旿昀昄昈昉昍昑昒昕昖昝"], +["8fc2a1","昞昡昢昣昤昦昩昪昫昬昮昰昱昳昹昷晀晅晆晊晌晑晎晗晘晙晛晜晠晡曻晪晫晬晾晳晵晿晷晸晹晻暀晼暋暌暍暐暒暙暚暛暜暟暠暤暭暱暲暵暻暿曀曂曃曈曌曎曏曔曛曟曨曫曬曮曺朅朇朎朓朙朜朠朢朳朾杅杇杈杌杔杕杝"], +["8fc3a1","杦杬杮杴杶杻极构枎枏枑枓枖枘枙枛枰枱枲枵枻枼枽柹柀柂柃柅柈柉柒柗柙柜柡柦柰柲柶柷桒栔栙栝栟栨栧栬栭栯栰栱栳栻栿桄桅桊桌桕桗桘桛桫桮",4,"桵桹桺桻桼梂梄梆梈梖梘梚梜梡梣梥梩梪梮梲梻棅棈棌棏"], +["8fc4a1","棐棑棓棖棙棜棝棥棨棪棫棬棭棰棱棵棶棻棼棽椆椉椊椐椑椓椖椗椱椳椵椸椻楂楅楉楎楗楛楣楤楥楦楨楩楬楰楱楲楺楻楿榀榍榒榖榘榡榥榦榨榫榭榯榷榸榺榼槅槈槑槖槗槢槥槮槯槱槳槵槾樀樁樃樏樑樕樚樝樠樤樨樰樲"], +["8fc5a1","樴樷樻樾樿橅橆橉橊橎橐橑橒橕橖橛橤橧橪橱橳橾檁檃檆檇檉檋檑檛檝檞檟檥檫檯檰檱檴檽檾檿櫆櫉櫈櫌櫐櫔櫕櫖櫜櫝櫤櫧櫬櫰櫱櫲櫼櫽欂欃欆欇欉欏欐欑欗欛欞欤欨欫欬欯欵欶欻欿歆歊歍歒歖歘歝歠歧歫歮歰歵歽"], +["8fc6a1","歾殂殅殗殛殟殠殢殣殨殩殬殭殮殰殸殹殽殾毃毄毉毌毖毚毡毣毦毧毮毱毷毹毿氂氄氅氉氍氎氐氒氙氟氦氧氨氬氮氳氵氶氺氻氿汊汋汍汏汒汔汙汛汜汫汭汯汴汶汸汹汻沅沆沇沉沔沕沗沘沜沟沰沲沴泂泆泍泏泐泑泒泔泖"], +["8fc7a1","泚泜泠泧泩泫泬泮泲泴洄洇洊洎洏洑洓洚洦洧洨汧洮洯洱洹洼洿浗浞浟浡浥浧浯浰浼涂涇涑涒涔涖涗涘涪涬涴涷涹涽涿淄淈淊淎淏淖淛淝淟淠淢淥淩淯淰淴淶淼渀渄渞渢渧渲渶渹渻渼湄湅湈湉湋湏湑湒湓湔湗湜湝湞"], +["8fc8a1","湢湣湨湳湻湽溍溓溙溠溧溭溮溱溳溻溿滀滁滃滇滈滊滍滎滏滫滭滮滹滻滽漄漈漊漌漍漖漘漚漛漦漩漪漯漰漳漶漻漼漭潏潑潒潓潗潙潚潝潞潡潢潨潬潽潾澃澇澈澋澌澍澐澒澓澔澖澚澟澠澥澦澧澨澮澯澰澵澶澼濅濇濈濊"], +["8fc9a1","濚濞濨濩濰濵濹濼濽瀀瀅瀆瀇瀍瀗瀠瀣瀯瀴瀷瀹瀼灃灄灈灉灊灋灔灕灝灞灎灤灥灬灮灵灶灾炁炅炆炔",4,"炛炤炫炰炱炴炷烊烑烓烔烕烖烘烜烤烺焃",4,"焋焌焏焞焠焫焭焯焰焱焸煁煅煆煇煊煋煐煒煗煚煜煞煠"], +["8fcaa1","煨煹熀熅熇熌熒熚熛熠熢熯熰熲熳熺熿燀燁燄燋燌燓燖燙燚燜燸燾爀爇爈爉爓爗爚爝爟爤爫爯爴爸爹牁牂牃牅牎牏牐牓牕牖牚牜牞牠牣牨牫牮牯牱牷牸牻牼牿犄犉犍犎犓犛犨犭犮犱犴犾狁狇狉狌狕狖狘狟狥狳狴狺狻"], +["8fcba1","狾猂猄猅猇猋猍猒猓猘猙猞猢猤猧猨猬猱猲猵猺猻猽獃獍獐獒獖獘獝獞獟獠獦獧獩獫獬獮獯獱獷獹獼玀玁玃玅玆玎玐玓玕玗玘玜玞玟玠玢玥玦玪玫玭玵玷玹玼玽玿珅珆珉珋珌珏珒珓珖珙珝珡珣珦珧珩珴珵珷珹珺珻珽"], +["8fcca1","珿琀琁琄琇琊琑琚琛琤琦琨",9,"琹瑀瑃瑄瑆瑇瑋瑍瑑瑒瑗瑝瑢瑦瑧瑨瑫瑭瑮瑱瑲璀璁璅璆璇璉璏璐璑璒璘璙璚璜璟璠璡璣璦璨璩璪璫璮璯璱璲璵璹璻璿瓈瓉瓌瓐瓓瓘瓚瓛瓞瓟瓤瓨瓪瓫瓯瓴瓺瓻瓼瓿甆"], +["8fcda1","甒甖甗甠甡甤甧甩甪甯甶甹甽甾甿畀畃畇畈畎畐畒畗畞畟畡畯畱畹",5,"疁疅疐疒疓疕疙疜疢疤疴疺疿痀痁痄痆痌痎痏痗痜痟痠痡痤痧痬痮痯痱痹瘀瘂瘃瘄瘇瘈瘊瘌瘏瘒瘓瘕瘖瘙瘛瘜瘝瘞瘣瘥瘦瘩瘭瘲瘳瘵瘸瘹"], +["8fcea1","瘺瘼癊癀癁癃癄癅癉癋癕癙癟癤癥癭癮癯癱癴皁皅皌皍皕皛皜皝皟皠皢",6,"皪皭皽盁盅盉盋盌盎盔盙盠盦盨盬盰盱盶盹盼眀眆眊眎眒眔眕眗眙眚眜眢眨眭眮眯眴眵眶眹眽眾睂睅睆睊睍睎睏睒睖睗睜睞睟睠睢"], +["8fcfa1","睤睧睪睬睰睲睳睴睺睽瞀瞄瞌瞍瞔瞕瞖瞚瞟瞢瞧瞪瞮瞯瞱瞵瞾矃矉矑矒矕矙矞矟矠矤矦矪矬矰矱矴矸矻砅砆砉砍砎砑砝砡砢砣砭砮砰砵砷硃硄硇硈硌硎硒硜硞硠硡硣硤硨硪确硺硾碊碏碔碘碡碝碞碟碤碨碬碭碰碱碲碳"], +["8fd0a1","碻碽碿磇磈磉磌磎磒磓磕磖磤磛磟磠磡磦磪磲磳礀磶磷磺磻磿礆礌礐礚礜礞礟礠礥礧礩礭礱礴礵礻礽礿祄祅祆祊祋祏祑祔祘祛祜祧祩祫祲祹祻祼祾禋禌禑禓禔禕禖禘禛禜禡禨禩禫禯禱禴禸离秂秄秇秈秊秏秔秖秚秝秞"], +["8fd1a1","秠秢秥秪秫秭秱秸秼稂稃稇稉稊稌稑稕稛稞稡稧稫稭稯稰稴稵稸稹稺穄穅穇穈穌穕穖穙穜穝穟穠穥穧穪穭穵穸穾窀窂窅窆窊窋窐窑窔窞窠窣窬窳窵窹窻窼竆竉竌竎竑竛竨竩竫竬竱竴竻竽竾笇笔笟笣笧笩笪笫笭笮笯笰"], +["8fd2a1","笱笴笽笿筀筁筇筎筕筠筤筦筩筪筭筯筲筳筷箄箉箎箐箑箖箛箞箠箥箬箯箰箲箵箶箺箻箼箽篂篅篈篊篔篖篗篙篚篛篨篪篲篴篵篸篹篺篼篾簁簂簃簄簆簉簋簌簎簏簙簛簠簥簦簨簬簱簳簴簶簹簺籆籊籕籑籒籓籙",5], +["8fd3a1","籡籣籧籩籭籮籰籲籹籼籽粆粇粏粔粞粠粦粰粶粷粺粻粼粿糄糇糈糉糍糏糓糔糕糗糙糚糝糦糩糫糵紃紇紈紉紏紑紒紓紖紝紞紣紦紪紭紱紼紽紾絀絁絇絈絍絑絓絗絙絚絜絝絥絧絪絰絸絺絻絿綁綂綃綅綆綈綋綌綍綑綖綗綝"], +["8fd4a1","綞綦綧綪綳綶綷綹緂",4,"緌緍緎緗緙縀緢緥緦緪緫緭緱緵緶緹緺縈縐縑縕縗縜縝縠縧縨縬縭縯縳縶縿繄繅繇繎繐繒繘繟繡繢繥繫繮繯繳繸繾纁纆纇纊纍纑纕纘纚纝纞缼缻缽缾缿罃罄罇罏罒罓罛罜罝罡罣罤罥罦罭"], +["8fd5a1","罱罽罾罿羀羋羍羏羐羑羖羗羜羡羢羦羪羭羴羼羿翀翃翈翎翏翛翟翣翥翨翬翮翯翲翺翽翾翿耇耈耊耍耎耏耑耓耔耖耝耞耟耠耤耦耬耮耰耴耵耷耹耺耼耾聀聄聠聤聦聭聱聵肁肈肎肜肞肦肧肫肸肹胈胍胏胒胔胕胗胘胠胭胮"], +["8fd6a1","胰胲胳胶胹胺胾脃脋脖脗脘脜脞脠脤脧脬脰脵脺脼腅腇腊腌腒腗腠腡腧腨腩腭腯腷膁膐膄膅膆膋膎膖膘膛膞膢膮膲膴膻臋臃臅臊臎臏臕臗臛臝臞臡臤臫臬臰臱臲臵臶臸臹臽臿舀舃舏舓舔舙舚舝舡舢舨舲舴舺艃艄艅艆"], +["8fd7a1","艋艎艏艑艖艜艠艣艧艭艴艻艽艿芀芁芃芄芇芉芊芎芑芔芖芘芚芛芠芡芣芤芧芨芩芪芮芰芲芴芷芺芼芾芿苆苐苕苚苠苢苤苨苪苭苯苶苷苽苾茀茁茇茈茊茋荔茛茝茞茟茡茢茬茭茮茰茳茷茺茼茽荂荃荄荇荍荎荑荕荖荗荰荸"], +["8fd8a1","荽荿莀莂莄莆莍莒莔莕莘莙莛莜莝莦莧莩莬莾莿菀菇菉菏菐菑菔菝荓菨菪菶菸菹菼萁萆萊萏萑萕萙莭萯萹葅葇葈葊葍葏葑葒葖葘葙葚葜葠葤葥葧葪葰葳葴葶葸葼葽蒁蒅蒒蒓蒕蒞蒦蒨蒩蒪蒯蒱蒴蒺蒽蒾蓀蓂蓇蓈蓌蓏蓓"], +["8fd9a1","蓜蓧蓪蓯蓰蓱蓲蓷蔲蓺蓻蓽蔂蔃蔇蔌蔎蔐蔜蔞蔢蔣蔤蔥蔧蔪蔫蔯蔳蔴蔶蔿蕆蕏",4,"蕖蕙蕜",6,"蕤蕫蕯蕹蕺蕻蕽蕿薁薅薆薉薋薌薏薓薘薝薟薠薢薥薧薴薶薷薸薼薽薾薿藂藇藊藋藎薭藘藚藟藠藦藨藭藳藶藼"], +["8fdaa1","藿蘀蘄蘅蘍蘎蘐蘑蘒蘘蘙蘛蘞蘡蘧蘩蘶蘸蘺蘼蘽虀虂虆虒虓虖虗虘虙虝虠",4,"虩虬虯虵虶虷虺蚍蚑蚖蚘蚚蚜蚡蚦蚧蚨蚭蚱蚳蚴蚵蚷蚸蚹蚿蛀蛁蛃蛅蛑蛒蛕蛗蛚蛜蛠蛣蛥蛧蚈蛺蛼蛽蜄蜅蜇蜋蜎蜏蜐蜓蜔蜙蜞蜟蜡蜣"], +["8fdba1","蜨蜮蜯蜱蜲蜹蜺蜼蜽蜾蝀蝃蝅蝍蝘蝝蝡蝤蝥蝯蝱蝲蝻螃",6,"螋螌螐螓螕螗螘螙螞螠螣螧螬螭螮螱螵螾螿蟁蟈蟉蟊蟎蟕蟖蟙蟚蟜蟟蟢蟣蟤蟪蟫蟭蟱蟳蟸蟺蟿蠁蠃蠆蠉蠊蠋蠐蠙蠒蠓蠔蠘蠚蠛蠜蠞蠟蠨蠭蠮蠰蠲蠵"], +["8fdca1","蠺蠼衁衃衅衈衉衊衋衎衑衕衖衘衚衜衟衠衤衩衱衹衻袀袘袚袛袜袟袠袨袪袺袽袾裀裊",4,"裑裒裓裛裞裧裯裰裱裵裷褁褆褍褎褏褕褖褘褙褚褜褠褦褧褨褰褱褲褵褹褺褾襀襂襅襆襉襏襒襗襚襛襜襡襢襣襫襮襰襳襵襺"], +["8fdda1","襻襼襽覉覍覐覔覕覛覜覟覠覥覰覴覵覶覷覼觔",4,"觥觩觫觭觱觳觶觹觽觿訄訅訇訏訑訒訔訕訞訠訢訤訦訫訬訯訵訷訽訾詀詃詅詇詉詍詎詓詖詗詘詜詝詡詥詧詵詶詷詹詺詻詾詿誀誃誆誋誏誐誒誖誗誙誟誧誩誮誯誳"], +["8fdea1","誶誷誻誾諃諆諈諉諊諑諓諔諕諗諝諟諬諰諴諵諶諼諿謅謆謋謑謜謞謟謊謭謰謷謼譂",4,"譈譒譓譔譙譍譞譣譭譶譸譹譼譾讁讄讅讋讍讏讔讕讜讞讟谸谹谽谾豅豇豉豋豏豑豓豔豗豘豛豝豙豣豤豦豨豩豭豳豵豶豻豾貆"], +["8fdfa1","貇貋貐貒貓貙貛貜貤貹貺賅賆賉賋賏賖賕賙賝賡賨賬賯賰賲賵賷賸賾賿贁贃贉贒贗贛赥赩赬赮赿趂趄趈趍趐趑趕趞趟趠趦趫趬趯趲趵趷趹趻跀跅跆跇跈跊跎跑跔跕跗跙跤跥跧跬跰趼跱跲跴跽踁踄踅踆踋踑踔踖踠踡踢"], +["8fe0a1","踣踦踧踱踳踶踷踸踹踽蹀蹁蹋蹍蹎蹏蹔蹛蹜蹝蹞蹡蹢蹩蹬蹭蹯蹰蹱蹹蹺蹻躂躃躉躐躒躕躚躛躝躞躢躧躩躭躮躳躵躺躻軀軁軃軄軇軏軑軔軜軨軮軰軱軷軹軺軭輀輂輇輈輏輐輖輗輘輞輠輡輣輥輧輨輬輭輮輴輵輶輷輺轀轁"], +["8fe1a1","轃轇轏轑",4,"轘轝轞轥辝辠辡辤辥辦辵辶辸达迀迁迆迊迋迍运迒迓迕迠迣迤迨迮迱迵迶迻迾适逄逈逌逘逛逨逩逯逪逬逭逳逴逷逿遃遄遌遛遝遢遦遧遬遰遴遹邅邈邋邌邎邐邕邗邘邙邛邠邡邢邥邰邲邳邴邶邽郌邾郃"], +["8fe2a1","郄郅郇郈郕郗郘郙郜郝郟郥郒郶郫郯郰郴郾郿鄀鄄鄅鄆鄈鄍鄐鄔鄖鄗鄘鄚鄜鄞鄠鄥鄢鄣鄧鄩鄮鄯鄱鄴鄶鄷鄹鄺鄼鄽酃酇酈酏酓酗酙酚酛酡酤酧酭酴酹酺酻醁醃醅醆醊醎醑醓醔醕醘醞醡醦醨醬醭醮醰醱醲醳醶醻醼醽醿"], +["8fe3a1","釂釃釅釓釔釗釙釚釞釤釥釩釪釬",5,"釷釹釻釽鈀鈁鈄鈅鈆鈇鈉鈊鈌鈐鈒鈓鈖鈘鈜鈝鈣鈤鈥鈦鈨鈮鈯鈰鈳鈵鈶鈸鈹鈺鈼鈾鉀鉂鉃鉆鉇鉊鉍鉎鉏鉑鉘鉙鉜鉝鉠鉡鉥鉧鉨鉩鉮鉯鉰鉵",4,"鉻鉼鉽鉿銈銉銊銍銎銒銗"], +["8fe4a1","銙銟銠銤銥銧銨銫銯銲銶銸銺銻銼銽銿",4,"鋅鋆鋇鋈鋋鋌鋍鋎鋐鋓鋕鋗鋘鋙鋜鋝鋟鋠鋡鋣鋥鋧鋨鋬鋮鋰鋹鋻鋿錀錂錈錍錑錔錕錜錝錞錟錡錤錥錧錩錪錳錴錶錷鍇鍈鍉鍐鍑鍒鍕鍗鍘鍚鍞鍤鍥鍧鍩鍪鍭鍯鍰鍱鍳鍴鍶"], +["8fe5a1","鍺鍽鍿鎀鎁鎂鎈鎊鎋鎍鎏鎒鎕鎘鎛鎞鎡鎣鎤鎦鎨鎫鎴鎵鎶鎺鎩鏁鏄鏅鏆鏇鏉",4,"鏓鏙鏜鏞鏟鏢鏦鏧鏹鏷鏸鏺鏻鏽鐁鐂鐄鐈鐉鐍鐎鐏鐕鐖鐗鐟鐮鐯鐱鐲鐳鐴鐻鐿鐽鑃鑅鑈鑊鑌鑕鑙鑜鑟鑡鑣鑨鑫鑭鑮鑯鑱鑲钄钃镸镹"], +["8fe6a1","镾閄閈閌閍閎閝閞閟閡閦閩閫閬閴閶閺閽閿闆闈闉闋闐闑闒闓闙闚闝闞闟闠闤闦阝阞阢阤阥阦阬阱阳阷阸阹阺阼阽陁陒陔陖陗陘陡陮陴陻陼陾陿隁隂隃隄隉隑隖隚隝隟隤隥隦隩隮隯隳隺雊雒嶲雘雚雝雞雟雩雯雱雺霂"], +["8fe7a1","霃霅霉霚霛霝霡霢霣霨霱霳靁靃靊靎靏靕靗靘靚靛靣靧靪靮靳靶靷靸靻靽靿鞀鞉鞕鞖鞗鞙鞚鞞鞟鞢鞬鞮鞱鞲鞵鞶鞸鞹鞺鞼鞾鞿韁韄韅韇韉韊韌韍韎韐韑韔韗韘韙韝韞韠韛韡韤韯韱韴韷韸韺頇頊頙頍頎頔頖頜頞頠頣頦"], +["8fe8a1","頫頮頯頰頲頳頵頥頾顄顇顊顑顒顓顖顗顙顚顢顣顥顦顪顬颫颭颮颰颴颷颸颺颻颿飂飅飈飌飡飣飥飦飧飪飳飶餂餇餈餑餕餖餗餚餛餜餟餢餦餧餫餱",4,"餹餺餻餼饀饁饆饇饈饍饎饔饘饙饛饜饞饟饠馛馝馟馦馰馱馲馵"], +["8fe9a1","馹馺馽馿駃駉駓駔駙駚駜駞駧駪駫駬駰駴駵駹駽駾騂騃騄騋騌騐騑騖騞騠騢騣騤騧騭騮騳騵騶騸驇驁驄驊驋驌驎驑驔驖驝骪骬骮骯骲骴骵骶骹骻骾骿髁髃髆髈髎髐髒髕髖髗髛髜髠髤髥髧髩髬髲髳髵髹髺髽髿",4], +["8feaa1","鬄鬅鬈鬉鬋鬌鬍鬎鬐鬒鬖鬙鬛鬜鬠鬦鬫鬭鬳鬴鬵鬷鬹鬺鬽魈魋魌魕魖魗魛魞魡魣魥魦魨魪",4,"魳魵魷魸魹魿鮀鮄鮅鮆鮇鮉鮊鮋鮍鮏鮐鮔鮚鮝鮞鮦鮧鮩鮬鮰鮱鮲鮷鮸鮻鮼鮾鮿鯁鯇鯈鯎鯐鯗鯘鯝鯟鯥鯧鯪鯫鯯鯳鯷鯸"], +["8feba1","鯹鯺鯽鯿鰀鰂鰋鰏鰑鰖鰘鰙鰚鰜鰞鰢鰣鰦",4,"鰱鰵鰶鰷鰽鱁鱃鱄鱅鱉鱊鱎鱏鱐鱓鱔鱖鱘鱛鱝鱞鱟鱣鱩鱪鱜鱫鱨鱮鱰鱲鱵鱷鱻鳦鳲鳷鳹鴋鴂鴑鴗鴘鴜鴝鴞鴯鴰鴲鴳鴴鴺鴼鵅鴽鵂鵃鵇鵊鵓鵔鵟鵣鵢鵥鵩鵪鵫鵰鵶鵷鵻"], +["8feca1","鵼鵾鶃鶄鶆鶊鶍鶎鶒鶓鶕鶖鶗鶘鶡鶪鶬鶮鶱鶵鶹鶼鶿鷃鷇鷉鷊鷔鷕鷖鷗鷚鷞鷟鷠鷥鷧鷩鷫鷮鷰鷳鷴鷾鸊鸂鸇鸎鸐鸑鸒鸕鸖鸙鸜鸝鹺鹻鹼麀麂麃麄麅麇麎麏麖麘麛麞麤麨麬麮麯麰麳麴麵黆黈黋黕黟黤黧黬黭黮黰黱黲黵"], +["8feda1","黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃",4,"齓齕齖齗齘齚齝齞齨齩齭",4,"齳齵齺齽龏龐龑龒龔龖龗龞龡龢龣龥"] +] diff --git a/pitfall/pdfkit/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json b/pitfall/pdfkit/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json new file mode 100644 index 00000000..85c69347 --- /dev/null +++ b/pitfall/pdfkit/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json @@ -0,0 +1 @@ +{"uChars":[128,165,169,178,184,216,226,235,238,244,248,251,253,258,276,284,300,325,329,334,364,463,465,467,469,471,473,475,477,506,594,610,712,716,730,930,938,962,970,1026,1104,1106,8209,8215,8218,8222,8231,8241,8244,8246,8252,8365,8452,8454,8458,8471,8482,8556,8570,8596,8602,8713,8720,8722,8726,8731,8737,8740,8742,8748,8751,8760,8766,8777,8781,8787,8802,8808,8816,8854,8858,8870,8896,8979,9322,9372,9548,9588,9616,9622,9634,9652,9662,9672,9676,9680,9702,9735,9738,9793,9795,11906,11909,11913,11917,11928,11944,11947,11951,11956,11960,11964,11979,12284,12292,12312,12319,12330,12351,12436,12447,12535,12543,12586,12842,12850,12964,13200,13215,13218,13253,13263,13267,13270,13384,13428,13727,13839,13851,14617,14703,14801,14816,14964,15183,15471,15585,16471,16736,17208,17325,17330,17374,17623,17997,18018,18212,18218,18301,18318,18760,18811,18814,18820,18823,18844,18848,18872,19576,19620,19738,19887,40870,59244,59336,59367,59413,59417,59423,59431,59437,59443,59452,59460,59478,59493,63789,63866,63894,63976,63986,64016,64018,64021,64025,64034,64037,64042,65074,65093,65107,65112,65127,65132,65375,65510,65536],"gbChars":[0,36,38,45,50,81,89,95,96,100,103,104,105,109,126,133,148,172,175,179,208,306,307,308,309,310,311,312,313,341,428,443,544,545,558,741,742,749,750,805,819,820,7922,7924,7925,7927,7934,7943,7944,7945,7950,8062,8148,8149,8152,8164,8174,8236,8240,8262,8264,8374,8380,8381,8384,8388,8390,8392,8393,8394,8396,8401,8406,8416,8419,8424,8437,8439,8445,8482,8485,8496,8521,8603,8936,8946,9046,9050,9063,9066,9076,9092,9100,9108,9111,9113,9131,9162,9164,9218,9219,11329,11331,11334,11336,11346,11361,11363,11366,11370,11372,11375,11389,11682,11686,11687,11692,11694,11714,11716,11723,11725,11730,11736,11982,11989,12102,12336,12348,12350,12384,12393,12395,12397,12510,12553,12851,12962,12973,13738,13823,13919,13933,14080,14298,14585,14698,15583,15847,16318,16434,16438,16481,16729,17102,17122,17315,17320,17402,17418,17859,17909,17911,17915,17916,17936,17939,17961,18664,18703,18814,18962,19043,33469,33470,33471,33484,33485,33490,33497,33501,33505,33513,33520,33536,33550,37845,37921,37948,38029,38038,38064,38065,38066,38069,38075,38076,38078,39108,39109,39113,39114,39115,39116,39265,39394,189000]} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/iconv-lite/encodings/tables/gbk-added.json b/pitfall/pdfkit/node_modules/iconv-lite/encodings/tables/gbk-added.json new file mode 100644 index 00000000..8abfa9f7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/iconv-lite/encodings/tables/gbk-added.json @@ -0,0 +1,55 @@ +[ +["a140","",62], +["a180","",32], +["a240","",62], +["a280","",32], +["a2ab","",5], +["a2e3","€"], +["a2ef",""], +["a2fd",""], +["a340","",62], +["a380","",31," "], +["a440","",62], +["a480","",32], +["a4f4","",10], +["a540","",62], +["a580","",32], +["a5f7","",7], +["a640","",62], +["a680","",32], +["a6b9","",7], +["a6d9","",6], +["a6ec",""], +["a6f3",""], +["a6f6","",8], +["a740","",62], +["a780","",32], +["a7c2","",14], +["a7f2","",12], +["a896","",10], +["a8bc",""], +["a8bf","ǹ"], +["a8c1",""], +["a8ea","",20], +["a958",""], +["a95b",""], +["a95d",""], +["a989","〾⿰",11], +["a997","",12], +["a9f0","",14], +["aaa1","",93], +["aba1","",93], +["aca1","",93], +["ada1","",93], +["aea1","",93], +["afa1","",93], +["d7fa","",4], +["f8a1","",93], +["f9a1","",93], +["faa1","",93], +["fba1","",93], +["fca1","",93], +["fda1","",93], +["fe50","⺁⺄㑳㑇⺈⺋㖞㘚㘎⺌⺗㥮㤘㧏㧟㩳㧐㭎㱮㳠⺧⺪䁖䅟⺮䌷⺳⺶⺷䎱䎬⺻䏝䓖䙡䙌"], +["fe80","䜣䜩䝼䞍⻊䥇䥺䥽䦂䦃䦅䦆䦟䦛䦷䦶䲣䲟䲠䲡䱷䲢䴓",6,"䶮",93] +] diff --git a/pitfall/pdfkit/node_modules/iconv-lite/encodings/tables/shiftjis.json b/pitfall/pdfkit/node_modules/iconv-lite/encodings/tables/shiftjis.json new file mode 100644 index 00000000..5a3a43cf --- /dev/null +++ b/pitfall/pdfkit/node_modules/iconv-lite/encodings/tables/shiftjis.json @@ -0,0 +1,125 @@ +[ +["0","\u0000",128], +["a1","。",62], +["8140"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×"], +["8180","÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇◆□■△▲▽▼※〒→←↑↓〓"], +["81b8","∈∋⊆⊇⊂⊃∪∩"], +["81c8","∧∨¬⇒⇔∀∃"], +["81da","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"], +["81f0","ʼn♯♭♪†‡¶"], +["81fc","◯"], +["824f","0",9], +["8260","A",25], +["8281","a",25], +["829f","ぁ",82], +["8340","ァ",62], +["8380","ム",22], +["839f","Α",16,"Σ",6], +["83bf","α",16,"σ",6], +["8440","А",5,"ЁЖ",25], +["8470","а",5,"ёж",7], +["8480","о",17], +["849f","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"], +["8740","①",19,"Ⅰ",9], +["875f","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"], +["877e","㍻"], +["8780","〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"], +["889f","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"], +["8940","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円"], +["8980","園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"], +["8a40","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫"], +["8a80","橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"], +["8b40","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救"], +["8b80","朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"], +["8c40","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨"], +["8c80","劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"], +["8d40","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降"], +["8d80","項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"], +["8e40","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止"], +["8e80","死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"], +["8f40","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳"], +["8f80","準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"], +["9040","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨"], +["9080","逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"], +["9140","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻"], +["9180","操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"], +["9240","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄"], +["9280","逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"], +["9340","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬"], +["9380","凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"], +["9440","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅"], +["9480","楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"], +["9540","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷"], +["9580","斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"], +["9640","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆"], +["9680","摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"], +["9740","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲"], +["9780","沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"], +["9840","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"], +["989f","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"], +["9940","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭"], +["9980","凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"], +["9a40","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸"], +["9a80","噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"], +["9b40","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀"], +["9b80","它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"], +["9c40","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠"], +["9c80","怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"], +["9d40","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫"], +["9d80","捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"], +["9e40","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎"], +["9e80","梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"], +["9f40","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯"], +["9f80","麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"], +["e040","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝"], +["e080","烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"], +["e140","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿"], +["e180","痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"], +["e240","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰"], +["e280","窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"], +["e340","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷"], +["e380","縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"], +["e440","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤"], +["e480","艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"], +["e540","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬"], +["e580","蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"], +["e640","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧"], +["e680","諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"], +["e740","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜"], +["e780","轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"], +["e840","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙"], +["e880","閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"], +["e940","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃"], +["e980","騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"], +["ea40","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯"], +["ea80","黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠堯槇遙瑤凜熙"], +["ed40","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏"], +["ed80","塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"], +["ee40","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙"], +["ee80","蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"], +["eeef","ⅰ",9,"¬¦'""], +["f040","",62], +["f080","",124], +["f140","",62], +["f180","",124], +["f240","",62], +["f280","",124], +["f340","",62], +["f380","",124], +["f440","",62], +["f480","",124], +["f540","",62], +["f580","",124], +["f640","",62], +["f680","",124], +["f740","",62], +["f780","",124], +["f840","",62], +["f880","",124], +["f940",""], +["fa40","ⅰ",9,"Ⅰ",9,"¬¦'"㈱№℡∵纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊"], +["fa80","兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯"], +["fb40","涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神"], +["fb80","祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙"], +["fc40","髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"] +] diff --git a/pitfall/pdfkit/node_modules/iconv-lite/encodings/utf16.js b/pitfall/pdfkit/node_modules/iconv-lite/encodings/utf16.js new file mode 100644 index 00000000..7e8f1591 --- /dev/null +++ b/pitfall/pdfkit/node_modules/iconv-lite/encodings/utf16.js @@ -0,0 +1,177 @@ +"use strict"; +var Buffer = require("buffer").Buffer; + +// Note: UTF16-LE (or UCS2) codec is Node.js native. See encodings/internal.js + +// == UTF16-BE codec. ========================================================== + +exports.utf16be = Utf16BECodec; +function Utf16BECodec() { +} + +Utf16BECodec.prototype.encoder = Utf16BEEncoder; +Utf16BECodec.prototype.decoder = Utf16BEDecoder; +Utf16BECodec.prototype.bomAware = true; + + +// -- Encoding + +function Utf16BEEncoder() { +} + +Utf16BEEncoder.prototype.write = function(str) { + var buf = new Buffer(str, 'ucs2'); + for (var i = 0; i < buf.length; i += 2) { + var tmp = buf[i]; buf[i] = buf[i+1]; buf[i+1] = tmp; + } + return buf; +} + +Utf16BEEncoder.prototype.end = function() { +} + + +// -- Decoding + +function Utf16BEDecoder() { + this.overflowByte = -1; +} + +Utf16BEDecoder.prototype.write = function(buf) { + if (buf.length == 0) + return ''; + + var buf2 = new Buffer(buf.length + 1), + i = 0, j = 0; + + if (this.overflowByte !== -1) { + buf2[0] = buf[0]; + buf2[1] = this.overflowByte; + i = 1; j = 2; + } + + for (; i < buf.length-1; i += 2, j+= 2) { + buf2[j] = buf[i+1]; + buf2[j+1] = buf[i]; + } + + this.overflowByte = (i == buf.length-1) ? buf[buf.length-1] : -1; + + return buf2.slice(0, j).toString('ucs2'); +} + +Utf16BEDecoder.prototype.end = function() { +} + + +// == UTF-16 codec ============================================================= +// Decoder chooses automatically from UTF-16LE and UTF-16BE using BOM and space-based heuristic. +// Defaults to UTF-16LE, as it's prevalent and default in Node. +// http://en.wikipedia.org/wiki/UTF-16 and http://encoding.spec.whatwg.org/#utf-16le +// Decoder default can be changed: iconv.decode(buf, 'utf16', {defaultEncoding: 'utf-16be'}); + +// Encoder uses UTF-16LE and prepends BOM (which can be overridden with addBOM: false). + +exports.utf16 = Utf16Codec; +function Utf16Codec(codecOptions, iconv) { + this.iconv = iconv; +} + +Utf16Codec.prototype.encoder = Utf16Encoder; +Utf16Codec.prototype.decoder = Utf16Decoder; + + +// -- Encoding (pass-through) + +function Utf16Encoder(options, codec) { + options = options || {}; + if (options.addBOM === undefined) + options.addBOM = true; + this.encoder = codec.iconv.getEncoder('utf-16le', options); +} + +Utf16Encoder.prototype.write = function(str) { + return this.encoder.write(str); +} + +Utf16Encoder.prototype.end = function() { + return this.encoder.end(); +} + + +// -- Decoding + +function Utf16Decoder(options, codec) { + this.decoder = null; + this.initialBytes = []; + this.initialBytesLen = 0; + + this.options = options || {}; + this.iconv = codec.iconv; +} + +Utf16Decoder.prototype.write = function(buf) { + if (!this.decoder) { + // Codec is not chosen yet. Accumulate initial bytes. + this.initialBytes.push(buf); + this.initialBytesLen += buf.length; + + if (this.initialBytesLen < 16) // We need more bytes to use space heuristic (see below) + return ''; + + // We have enough bytes -> detect endianness. + var buf = Buffer.concat(this.initialBytes), + encoding = detectEncoding(buf, this.options.defaultEncoding); + this.decoder = this.iconv.getDecoder(encoding, this.options); + this.initialBytes.length = this.initialBytesLen = 0; + } + + return this.decoder.write(buf); +} + +Utf16Decoder.prototype.end = function() { + if (!this.decoder) { + var buf = Buffer.concat(this.initialBytes), + encoding = detectEncoding(buf, this.options.defaultEncoding); + this.decoder = this.iconv.getDecoder(encoding, this.options); + + var res = this.decoder.write(buf), + trail = this.decoder.end(); + + return trail ? (res + trail) : res; + } + return this.decoder.end(); +} + +function detectEncoding(buf, defaultEncoding) { + var enc = defaultEncoding || 'utf-16le'; + + if (buf.length >= 2) { + // Check BOM. + if (buf[0] == 0xFE && buf[1] == 0xFF) // UTF-16BE BOM + enc = 'utf-16be'; + else if (buf[0] == 0xFF && buf[1] == 0xFE) // UTF-16LE BOM + enc = 'utf-16le'; + else { + // No BOM found. Try to deduce encoding from initial content. + // Most of the time, the content has ASCII chars (U+00**), but the opposite (U+**00) is uncommon. + // So, we count ASCII as if it was LE or BE, and decide from that. + var asciiCharsLE = 0, asciiCharsBE = 0, // Counts of chars in both positions + _len = Math.min(buf.length - (buf.length % 2), 64); // Len is always even. + + for (var i = 0; i < _len; i += 2) { + if (buf[i] === 0 && buf[i+1] !== 0) asciiCharsBE++; + if (buf[i] !== 0 && buf[i+1] === 0) asciiCharsLE++; + } + + if (asciiCharsBE > asciiCharsLE) + enc = 'utf-16be'; + else if (asciiCharsBE < asciiCharsLE) + enc = 'utf-16le'; + } + } + + return enc; +} + + diff --git a/pitfall/pdfkit/node_modules/iconv-lite/encodings/utf7.js b/pitfall/pdfkit/node_modules/iconv-lite/encodings/utf7.js new file mode 100644 index 00000000..19b7194a --- /dev/null +++ b/pitfall/pdfkit/node_modules/iconv-lite/encodings/utf7.js @@ -0,0 +1,290 @@ +"use strict"; +var Buffer = require("buffer").Buffer; + +// UTF-7 codec, according to https://tools.ietf.org/html/rfc2152 +// See also below a UTF-7-IMAP codec, according to http://tools.ietf.org/html/rfc3501#section-5.1.3 + +exports.utf7 = Utf7Codec; +exports.unicode11utf7 = 'utf7'; // Alias UNICODE-1-1-UTF-7 +function Utf7Codec(codecOptions, iconv) { + this.iconv = iconv; +}; + +Utf7Codec.prototype.encoder = Utf7Encoder; +Utf7Codec.prototype.decoder = Utf7Decoder; +Utf7Codec.prototype.bomAware = true; + + +// -- Encoding + +var nonDirectChars = /[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g; + +function Utf7Encoder(options, codec) { + this.iconv = codec.iconv; +} + +Utf7Encoder.prototype.write = function(str) { + // Naive implementation. + // Non-direct chars are encoded as "+-"; single "+" char is encoded as "+-". + return new Buffer(str.replace(nonDirectChars, function(chunk) { + return "+" + (chunk === '+' ? '' : + this.iconv.encode(chunk, 'utf16-be').toString('base64').replace(/=+$/, '')) + + "-"; + }.bind(this))); +} + +Utf7Encoder.prototype.end = function() { +} + + +// -- Decoding + +function Utf7Decoder(options, codec) { + this.iconv = codec.iconv; + this.inBase64 = false; + this.base64Accum = ''; +} + +var base64Regex = /[A-Za-z0-9\/+]/; +var base64Chars = []; +for (var i = 0; i < 256; i++) + base64Chars[i] = base64Regex.test(String.fromCharCode(i)); + +var plusChar = '+'.charCodeAt(0), + minusChar = '-'.charCodeAt(0), + andChar = '&'.charCodeAt(0); + +Utf7Decoder.prototype.write = function(buf) { + var res = "", lastI = 0, + inBase64 = this.inBase64, + base64Accum = this.base64Accum; + + // The decoder is more involved as we must handle chunks in stream. + + for (var i = 0; i < buf.length; i++) { + if (!inBase64) { // We're in direct mode. + // Write direct chars until '+' + if (buf[i] == plusChar) { + res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. + lastI = i+1; + inBase64 = true; + } + } else { // We decode base64. + if (!base64Chars[buf[i]]) { // Base64 ended. + if (i == lastI && buf[i] == minusChar) {// "+-" -> "+" + res += "+"; + } else { + var b64str = base64Accum + buf.slice(lastI, i).toString(); + res += this.iconv.decode(new Buffer(b64str, 'base64'), "utf16-be"); + } + + if (buf[i] != minusChar) // Minus is absorbed after base64. + i--; + + lastI = i+1; + inBase64 = false; + base64Accum = ''; + } + } + } + + if (!inBase64) { + res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. + } else { + var b64str = base64Accum + buf.slice(lastI).toString(); + + var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. + base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. + b64str = b64str.slice(0, canBeDecoded); + + res += this.iconv.decode(new Buffer(b64str, 'base64'), "utf16-be"); + } + + this.inBase64 = inBase64; + this.base64Accum = base64Accum; + + return res; +} + +Utf7Decoder.prototype.end = function() { + var res = ""; + if (this.inBase64 && this.base64Accum.length > 0) + res = this.iconv.decode(new Buffer(this.base64Accum, 'base64'), "utf16-be"); + + this.inBase64 = false; + this.base64Accum = ''; + return res; +} + + +// UTF-7-IMAP codec. +// RFC3501 Sec. 5.1.3 Modified UTF-7 (http://tools.ietf.org/html/rfc3501#section-5.1.3) +// Differences: +// * Base64 part is started by "&" instead of "+" +// * Direct characters are 0x20-0x7E, except "&" (0x26) +// * In Base64, "," is used instead of "/" +// * Base64 must not be used to represent direct characters. +// * No implicit shift back from Base64 (should always end with '-') +// * String must end in non-shifted position. +// * "-&" while in base64 is not allowed. + + +exports.utf7imap = Utf7IMAPCodec; +function Utf7IMAPCodec(codecOptions, iconv) { + this.iconv = iconv; +}; + +Utf7IMAPCodec.prototype.encoder = Utf7IMAPEncoder; +Utf7IMAPCodec.prototype.decoder = Utf7IMAPDecoder; +Utf7IMAPCodec.prototype.bomAware = true; + + +// -- Encoding + +function Utf7IMAPEncoder(options, codec) { + this.iconv = codec.iconv; + this.inBase64 = false; + this.base64Accum = new Buffer(6); + this.base64AccumIdx = 0; +} + +Utf7IMAPEncoder.prototype.write = function(str) { + var inBase64 = this.inBase64, + base64Accum = this.base64Accum, + base64AccumIdx = this.base64AccumIdx, + buf = new Buffer(str.length*5 + 10), bufIdx = 0; + + for (var i = 0; i < str.length; i++) { + var uChar = str.charCodeAt(i); + if (0x20 <= uChar && uChar <= 0x7E) { // Direct character or '&'. + if (inBase64) { + if (base64AccumIdx > 0) { + bufIdx += buf.write(base64Accum.slice(0, base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); + base64AccumIdx = 0; + } + + buf[bufIdx++] = minusChar; // Write '-', then go to direct mode. + inBase64 = false; + } + + if (!inBase64) { + buf[bufIdx++] = uChar; // Write direct character + + if (uChar === andChar) // Ampersand -> '&-' + buf[bufIdx++] = minusChar; + } + + } else { // Non-direct character + if (!inBase64) { + buf[bufIdx++] = andChar; // Write '&', then go to base64 mode. + inBase64 = true; + } + if (inBase64) { + base64Accum[base64AccumIdx++] = uChar >> 8; + base64Accum[base64AccumIdx++] = uChar & 0xFF; + + if (base64AccumIdx == base64Accum.length) { + bufIdx += buf.write(base64Accum.toString('base64').replace(/\//g, ','), bufIdx); + base64AccumIdx = 0; + } + } + } + } + + this.inBase64 = inBase64; + this.base64AccumIdx = base64AccumIdx; + + return buf.slice(0, bufIdx); +} + +Utf7IMAPEncoder.prototype.end = function() { + var buf = new Buffer(10), bufIdx = 0; + if (this.inBase64) { + if (this.base64AccumIdx > 0) { + bufIdx += buf.write(this.base64Accum.slice(0, this.base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); + this.base64AccumIdx = 0; + } + + buf[bufIdx++] = minusChar; // Write '-', then go to direct mode. + this.inBase64 = false; + } + + return buf.slice(0, bufIdx); +} + + +// -- Decoding + +function Utf7IMAPDecoder(options, codec) { + this.iconv = codec.iconv; + this.inBase64 = false; + this.base64Accum = ''; +} + +var base64IMAPChars = base64Chars.slice(); +base64IMAPChars[','.charCodeAt(0)] = true; + +Utf7IMAPDecoder.prototype.write = function(buf) { + var res = "", lastI = 0, + inBase64 = this.inBase64, + base64Accum = this.base64Accum; + + // The decoder is more involved as we must handle chunks in stream. + // It is forgiving, closer to standard UTF-7 (for example, '-' is optional at the end). + + for (var i = 0; i < buf.length; i++) { + if (!inBase64) { // We're in direct mode. + // Write direct chars until '&' + if (buf[i] == andChar) { + res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. + lastI = i+1; + inBase64 = true; + } + } else { // We decode base64. + if (!base64IMAPChars[buf[i]]) { // Base64 ended. + if (i == lastI && buf[i] == minusChar) { // "&-" -> "&" + res += "&"; + } else { + var b64str = base64Accum + buf.slice(lastI, i).toString().replace(/,/g, '/'); + res += this.iconv.decode(new Buffer(b64str, 'base64'), "utf16-be"); + } + + if (buf[i] != minusChar) // Minus may be absorbed after base64. + i--; + + lastI = i+1; + inBase64 = false; + base64Accum = ''; + } + } + } + + if (!inBase64) { + res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. + } else { + var b64str = base64Accum + buf.slice(lastI).toString().replace(/,/g, '/'); + + var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. + base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. + b64str = b64str.slice(0, canBeDecoded); + + res += this.iconv.decode(new Buffer(b64str, 'base64'), "utf16-be"); + } + + this.inBase64 = inBase64; + this.base64Accum = base64Accum; + + return res; +} + +Utf7IMAPDecoder.prototype.end = function() { + var res = ""; + if (this.inBase64 && this.base64Accum.length > 0) + res = this.iconv.decode(new Buffer(this.base64Accum, 'base64'), "utf16-be"); + + this.inBase64 = false; + this.base64Accum = ''; + return res; +} + + diff --git a/pitfall/pdfkit/node_modules/iconv-lite/lib/bom-handling.js b/pitfall/pdfkit/node_modules/iconv-lite/lib/bom-handling.js new file mode 100644 index 00000000..10508723 --- /dev/null +++ b/pitfall/pdfkit/node_modules/iconv-lite/lib/bom-handling.js @@ -0,0 +1,52 @@ +"use strict"; + +var BOMChar = '\uFEFF'; + +exports.PrependBOM = PrependBOMWrapper +function PrependBOMWrapper(encoder, options) { + this.encoder = encoder; + this.addBOM = true; +} + +PrependBOMWrapper.prototype.write = function(str) { + if (this.addBOM) { + str = BOMChar + str; + this.addBOM = false; + } + + return this.encoder.write(str); +} + +PrependBOMWrapper.prototype.end = function() { + return this.encoder.end(); +} + + +//------------------------------------------------------------------------------ + +exports.StripBOM = StripBOMWrapper; +function StripBOMWrapper(decoder, options) { + this.decoder = decoder; + this.pass = false; + this.options = options || {}; +} + +StripBOMWrapper.prototype.write = function(buf) { + var res = this.decoder.write(buf); + if (this.pass || !res) + return res; + + if (res[0] === BOMChar) { + res = res.slice(1); + if (typeof this.options.stripBOM === 'function') + this.options.stripBOM(); + } + + this.pass = true; + return res; +} + +StripBOMWrapper.prototype.end = function() { + return this.decoder.end(); +} + diff --git a/pitfall/pdfkit/node_modules/iconv-lite/lib/extend-node.js b/pitfall/pdfkit/node_modules/iconv-lite/lib/extend-node.js new file mode 100644 index 00000000..a120400b --- /dev/null +++ b/pitfall/pdfkit/node_modules/iconv-lite/lib/extend-node.js @@ -0,0 +1,215 @@ +"use strict"; +var Buffer = require("buffer").Buffer; + +// == Extend Node primitives to use iconv-lite ================================= + +module.exports = function (iconv) { + var original = undefined; // Place to keep original methods. + + // Node authors rewrote Buffer internals to make it compatible with + // Uint8Array and we cannot patch key functions since then. + iconv.supportsNodeEncodingsExtension = !(new Buffer(0) instanceof Uint8Array); + + iconv.extendNodeEncodings = function extendNodeEncodings() { + if (original) return; + original = {}; + + if (!iconv.supportsNodeEncodingsExtension) { + console.error("ACTION NEEDED: require('iconv-lite').extendNodeEncodings() is not supported in your version of Node"); + console.error("See more info at https://github.com/ashtuchkin/iconv-lite/wiki/Node-v4-compatibility"); + return; + } + + var nodeNativeEncodings = { + 'hex': true, 'utf8': true, 'utf-8': true, 'ascii': true, 'binary': true, + 'base64': true, 'ucs2': true, 'ucs-2': true, 'utf16le': true, 'utf-16le': true, + }; + + Buffer.isNativeEncoding = function(enc) { + return enc && nodeNativeEncodings[enc.toLowerCase()]; + } + + // -- SlowBuffer ----------------------------------------------------------- + var SlowBuffer = require('buffer').SlowBuffer; + + original.SlowBufferToString = SlowBuffer.prototype.toString; + SlowBuffer.prototype.toString = function(encoding, start, end) { + encoding = String(encoding || 'utf8').toLowerCase(); + + // Use native conversion when possible + if (Buffer.isNativeEncoding(encoding)) + return original.SlowBufferToString.call(this, encoding, start, end); + + // Otherwise, use our decoding method. + if (typeof start == 'undefined') start = 0; + if (typeof end == 'undefined') end = this.length; + return iconv.decode(this.slice(start, end), encoding); + } + + original.SlowBufferWrite = SlowBuffer.prototype.write; + SlowBuffer.prototype.write = function(string, offset, length, encoding) { + // Support both (string, offset, length, encoding) + // and the legacy (string, encoding, offset, length) + if (isFinite(offset)) { + if (!isFinite(length)) { + encoding = length; + length = undefined; + } + } else { // legacy + var swap = encoding; + encoding = offset; + offset = length; + length = swap; + } + + offset = +offset || 0; + var remaining = this.length - offset; + if (!length) { + length = remaining; + } else { + length = +length; + if (length > remaining) { + length = remaining; + } + } + encoding = String(encoding || 'utf8').toLowerCase(); + + // Use native conversion when possible + if (Buffer.isNativeEncoding(encoding)) + return original.SlowBufferWrite.call(this, string, offset, length, encoding); + + if (string.length > 0 && (length < 0 || offset < 0)) + throw new RangeError('attempt to write beyond buffer bounds'); + + // Otherwise, use our encoding method. + var buf = iconv.encode(string, encoding); + if (buf.length < length) length = buf.length; + buf.copy(this, offset, 0, length); + return length; + } + + // -- Buffer --------------------------------------------------------------- + + original.BufferIsEncoding = Buffer.isEncoding; + Buffer.isEncoding = function(encoding) { + return Buffer.isNativeEncoding(encoding) || iconv.encodingExists(encoding); + } + + original.BufferByteLength = Buffer.byteLength; + Buffer.byteLength = SlowBuffer.byteLength = function(str, encoding) { + encoding = String(encoding || 'utf8').toLowerCase(); + + // Use native conversion when possible + if (Buffer.isNativeEncoding(encoding)) + return original.BufferByteLength.call(this, str, encoding); + + // Slow, I know, but we don't have a better way yet. + return iconv.encode(str, encoding).length; + } + + original.BufferToString = Buffer.prototype.toString; + Buffer.prototype.toString = function(encoding, start, end) { + encoding = String(encoding || 'utf8').toLowerCase(); + + // Use native conversion when possible + if (Buffer.isNativeEncoding(encoding)) + return original.BufferToString.call(this, encoding, start, end); + + // Otherwise, use our decoding method. + if (typeof start == 'undefined') start = 0; + if (typeof end == 'undefined') end = this.length; + return iconv.decode(this.slice(start, end), encoding); + } + + original.BufferWrite = Buffer.prototype.write; + Buffer.prototype.write = function(string, offset, length, encoding) { + var _offset = offset, _length = length, _encoding = encoding; + // Support both (string, offset, length, encoding) + // and the legacy (string, encoding, offset, length) + if (isFinite(offset)) { + if (!isFinite(length)) { + encoding = length; + length = undefined; + } + } else { // legacy + var swap = encoding; + encoding = offset; + offset = length; + length = swap; + } + + encoding = String(encoding || 'utf8').toLowerCase(); + + // Use native conversion when possible + if (Buffer.isNativeEncoding(encoding)) + return original.BufferWrite.call(this, string, _offset, _length, _encoding); + + offset = +offset || 0; + var remaining = this.length - offset; + if (!length) { + length = remaining; + } else { + length = +length; + if (length > remaining) { + length = remaining; + } + } + + if (string.length > 0 && (length < 0 || offset < 0)) + throw new RangeError('attempt to write beyond buffer bounds'); + + // Otherwise, use our encoding method. + var buf = iconv.encode(string, encoding); + if (buf.length < length) length = buf.length; + buf.copy(this, offset, 0, length); + return length; + + // TODO: Set _charsWritten. + } + + + // -- Readable ------------------------------------------------------------- + if (iconv.supportsStreams) { + var Readable = require('stream').Readable; + + original.ReadableSetEncoding = Readable.prototype.setEncoding; + Readable.prototype.setEncoding = function setEncoding(enc, options) { + // Use our own decoder, it has the same interface. + // We cannot use original function as it doesn't handle BOM-s. + this._readableState.decoder = iconv.getDecoder(enc, options); + this._readableState.encoding = enc; + } + + Readable.prototype.collect = iconv._collect; + } + } + + // Remove iconv-lite Node primitive extensions. + iconv.undoExtendNodeEncodings = function undoExtendNodeEncodings() { + if (!iconv.supportsNodeEncodingsExtension) + return; + if (!original) + throw new Error("require('iconv-lite').undoExtendNodeEncodings(): Nothing to undo; extendNodeEncodings() is not called.") + + delete Buffer.isNativeEncoding; + + var SlowBuffer = require('buffer').SlowBuffer; + + SlowBuffer.prototype.toString = original.SlowBufferToString; + SlowBuffer.prototype.write = original.SlowBufferWrite; + + Buffer.isEncoding = original.BufferIsEncoding; + Buffer.byteLength = original.BufferByteLength; + Buffer.prototype.toString = original.BufferToString; + Buffer.prototype.write = original.BufferWrite; + + if (iconv.supportsStreams) { + var Readable = require('stream').Readable; + + Readable.prototype.setEncoding = original.ReadableSetEncoding; + delete Readable.prototype.collect; + } + + original = undefined; + } +} diff --git a/pitfall/pdfkit/node_modules/iconv-lite/lib/index.d.ts b/pitfall/pdfkit/node_modules/iconv-lite/lib/index.d.ts new file mode 100644 index 00000000..b9c83613 --- /dev/null +++ b/pitfall/pdfkit/node_modules/iconv-lite/lib/index.d.ts @@ -0,0 +1,24 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. + * REQUIREMENT: This definition is dependent on the @types/node definition. + * Install with `npm install @types/node --save-dev` + *--------------------------------------------------------------------------------------------*/ + +declare module 'iconv-lite' { + export function decode(buffer: NodeBuffer, encoding: string, options?: Options): string; + + export function encode(content: string, encoding: string, options?: Options): NodeBuffer; + + export function encodingExists(encoding: string): boolean; + + export function decodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream; + + export function encodeStream(encoding: string, options?: Options): NodeJS.ReadWriteStream; +} + +export interface Options { + stripBOM?: boolean; + addBOM?: boolean; + defaultEncoding?: string; +} diff --git a/pitfall/pdfkit/node_modules/iconv-lite/lib/index.js b/pitfall/pdfkit/node_modules/iconv-lite/lib/index.js new file mode 100644 index 00000000..10aced42 --- /dev/null +++ b/pitfall/pdfkit/node_modules/iconv-lite/lib/index.js @@ -0,0 +1,148 @@ +"use strict"; + +// Some environments don't have global Buffer (e.g. React Native). +// Solution would be installing npm modules "buffer" and "stream" explicitly. +var Buffer = require("buffer").Buffer; + +var bomHandling = require("./bom-handling"), + iconv = module.exports; + +// All codecs and aliases are kept here, keyed by encoding name/alias. +// They are lazy loaded in `iconv.getCodec` from `encodings/index.js`. +iconv.encodings = null; + +// Characters emitted in case of error. +iconv.defaultCharUnicode = '�'; +iconv.defaultCharSingleByte = '?'; + +// Public API. +iconv.encode = function encode(str, encoding, options) { + str = "" + (str || ""); // Ensure string. + + var encoder = iconv.getEncoder(encoding, options); + + var res = encoder.write(str); + var trail = encoder.end(); + + return (trail && trail.length > 0) ? Buffer.concat([res, trail]) : res; +} + +iconv.decode = function decode(buf, encoding, options) { + if (typeof buf === 'string') { + if (!iconv.skipDecodeWarning) { + console.error('Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding'); + iconv.skipDecodeWarning = true; + } + + buf = new Buffer("" + (buf || ""), "binary"); // Ensure buffer. + } + + var decoder = iconv.getDecoder(encoding, options); + + var res = decoder.write(buf); + var trail = decoder.end(); + + return trail ? (res + trail) : res; +} + +iconv.encodingExists = function encodingExists(enc) { + try { + iconv.getCodec(enc); + return true; + } catch (e) { + return false; + } +} + +// Legacy aliases to convert functions +iconv.toEncoding = iconv.encode; +iconv.fromEncoding = iconv.decode; + +// Search for a codec in iconv.encodings. Cache codec data in iconv._codecDataCache. +iconv._codecDataCache = {}; +iconv.getCodec = function getCodec(encoding) { + if (!iconv.encodings) + iconv.encodings = require("../encodings"); // Lazy load all encoding definitions. + + // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. + var enc = (''+encoding).toLowerCase().replace(/[^0-9a-z]|:\d{4}$/g, ""); + + // Traverse iconv.encodings to find actual codec. + var codecOptions = {}; + while (true) { + var codec = iconv._codecDataCache[enc]; + if (codec) + return codec; + + var codecDef = iconv.encodings[enc]; + + switch (typeof codecDef) { + case "string": // Direct alias to other encoding. + enc = codecDef; + break; + + case "object": // Alias with options. Can be layered. + for (var key in codecDef) + codecOptions[key] = codecDef[key]; + + if (!codecOptions.encodingName) + codecOptions.encodingName = enc; + + enc = codecDef.type; + break; + + case "function": // Codec itself. + if (!codecOptions.encodingName) + codecOptions.encodingName = enc; + + // The codec function must load all tables and return object with .encoder and .decoder methods. + // It'll be called only once (for each different options object). + codec = new codecDef(codecOptions, iconv); + + iconv._codecDataCache[codecOptions.encodingName] = codec; // Save it to be reused later. + return codec; + + default: + throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '"+enc+"')"); + } + } +} + +iconv.getEncoder = function getEncoder(encoding, options) { + var codec = iconv.getCodec(encoding), + encoder = new codec.encoder(options, codec); + + if (codec.bomAware && options && options.addBOM) + encoder = new bomHandling.PrependBOM(encoder, options); + + return encoder; +} + +iconv.getDecoder = function getDecoder(encoding, options) { + var codec = iconv.getCodec(encoding), + decoder = new codec.decoder(options, codec); + + if (codec.bomAware && !(options && options.stripBOM === false)) + decoder = new bomHandling.StripBOM(decoder, options); + + return decoder; +} + + +// Load extensions in Node. All of them are omitted in Browserify build via 'browser' field in package.json. +var nodeVer = typeof process !== 'undefined' && process.versions && process.versions.node; +if (nodeVer) { + + // Load streaming support in Node v0.10+ + var nodeVerArr = nodeVer.split(".").map(Number); + if (nodeVerArr[0] > 0 || nodeVerArr[1] >= 10) { + require("./streams")(iconv); + } + + // Load Node primitive extensions. + require("./extend-node")(iconv); +} + +if ("Ā" != "\u0100") { + console.error("iconv-lite warning: javascript files are loaded not with utf-8 encoding. See https://github.com/ashtuchkin/iconv-lite/wiki/Javascript-source-file-encodings for more info."); +} diff --git a/pitfall/pdfkit/node_modules/iconv-lite/lib/streams.js b/pitfall/pdfkit/node_modules/iconv-lite/lib/streams.js new file mode 100644 index 00000000..44095529 --- /dev/null +++ b/pitfall/pdfkit/node_modules/iconv-lite/lib/streams.js @@ -0,0 +1,121 @@ +"use strict"; + +var Buffer = require("buffer").Buffer, + Transform = require("stream").Transform; + + +// == Exports ================================================================== +module.exports = function(iconv) { + + // Additional Public API. + iconv.encodeStream = function encodeStream(encoding, options) { + return new IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options); + } + + iconv.decodeStream = function decodeStream(encoding, options) { + return new IconvLiteDecoderStream(iconv.getDecoder(encoding, options), options); + } + + iconv.supportsStreams = true; + + + // Not published yet. + iconv.IconvLiteEncoderStream = IconvLiteEncoderStream; + iconv.IconvLiteDecoderStream = IconvLiteDecoderStream; + iconv._collect = IconvLiteDecoderStream.prototype.collect; +}; + + +// == Encoder stream ======================================================= +function IconvLiteEncoderStream(conv, options) { + this.conv = conv; + options = options || {}; + options.decodeStrings = false; // We accept only strings, so we don't need to decode them. + Transform.call(this, options); +} + +IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, { + constructor: { value: IconvLiteEncoderStream } +}); + +IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) { + if (typeof chunk != 'string') + return done(new Error("Iconv encoding stream needs strings as its input.")); + try { + var res = this.conv.write(chunk); + if (res && res.length) this.push(res); + done(); + } + catch (e) { + done(e); + } +} + +IconvLiteEncoderStream.prototype._flush = function(done) { + try { + var res = this.conv.end(); + if (res && res.length) this.push(res); + done(); + } + catch (e) { + done(e); + } +} + +IconvLiteEncoderStream.prototype.collect = function(cb) { + var chunks = []; + this.on('error', cb); + this.on('data', function(chunk) { chunks.push(chunk); }); + this.on('end', function() { + cb(null, Buffer.concat(chunks)); + }); + return this; +} + + +// == Decoder stream ======================================================= +function IconvLiteDecoderStream(conv, options) { + this.conv = conv; + options = options || {}; + options.encoding = this.encoding = 'utf8'; // We output strings. + Transform.call(this, options); +} + +IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, { + constructor: { value: IconvLiteDecoderStream } +}); + +IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) { + if (!Buffer.isBuffer(chunk)) + return done(new Error("Iconv decoding stream needs buffers as its input.")); + try { + var res = this.conv.write(chunk); + if (res && res.length) this.push(res, this.encoding); + done(); + } + catch (e) { + done(e); + } +} + +IconvLiteDecoderStream.prototype._flush = function(done) { + try { + var res = this.conv.end(); + if (res && res.length) this.push(res, this.encoding); + done(); + } + catch (e) { + done(e); + } +} + +IconvLiteDecoderStream.prototype.collect = function(cb) { + var res = ''; + this.on('error', cb); + this.on('data', function(chunk) { res += chunk; }); + this.on('end', function() { + cb(null, res); + }); + return this; +} + diff --git a/pitfall/pdfkit/node_modules/iconv-lite/package.json b/pitfall/pdfkit/node_modules/iconv-lite/package.json new file mode 100644 index 00000000..d76d2696 --- /dev/null +++ b/pitfall/pdfkit/node_modules/iconv-lite/package.json @@ -0,0 +1,159 @@ +{ + "_args": [ + [ + { + "raw": "iconv-lite@^0.4.13", + "scope": null, + "escapedName": "iconv-lite", + "name": "iconv-lite", + "rawSpec": "^0.4.13", + "spec": ">=0.4.13 <0.5.0", + "type": "range" + }, + "/Users/MB/git/pdfkit" + ] + ], + "_from": "iconv-lite@>=0.4.13 <0.5.0", + "_id": "iconv-lite@0.4.17", + "_inCache": true, + "_location": "/iconv-lite", + "_nodeVersion": "6.10.2", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/iconv-lite-0.4.17.tgz_1493615411939_0.8651245310902596" + }, + "_npmUser": { + "name": "ashtuchkin", + "email": "ashtuchkin@gmail.com" + }, + "_npmVersion": "3.10.10", + "_phantomChildren": {}, + "_requested": { + "raw": "iconv-lite@^0.4.13", + "scope": null, + "escapedName": "iconv-lite", + "name": "iconv-lite", + "rawSpec": "^0.4.13", + "spec": ">=0.4.13 <0.5.0", + "type": "range" + }, + "_requiredBy": [ + "#DEV:/" + ], + "_resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.17.tgz", + "_shasum": "4fdaa3b38acbc2c031b045d0edcdfe1ecab18c8d", + "_shrinkwrap": null, + "_spec": "iconv-lite@^0.4.13", + "_where": "/Users/MB/git/pdfkit", + "author": { + "name": "Alexander Shtuchkin", + "email": "ashtuchkin@gmail.com" + }, + "browser": { + "./extend-node": false, + "./streams": false + }, + "bugs": { + "url": "https://github.com/ashtuchkin/iconv-lite/issues" + }, + "contributors": [ + { + "name": "Jinwu Zhan", + "url": "https://github.com/jenkinv" + }, + { + "name": "Adamansky Anton", + "url": "https://github.com/adamansky" + }, + { + "name": "George Stagas", + "url": "https://github.com/stagas" + }, + { + "name": "Mike D Pilsbury", + "url": "https://github.com/pekim" + }, + { + "name": "Niggler", + "url": "https://github.com/Niggler" + }, + { + "name": "wychi", + "url": "https://github.com/wychi" + }, + { + "name": "David Kuo", + "url": "https://github.com/david50407" + }, + { + "name": "ChangZhuo Chen", + "url": "https://github.com/czchen" + }, + { + "name": "Lee Treveil", + "url": "https://github.com/leetreveil" + }, + { + "name": "Brian White", + "url": "https://github.com/mscdex" + }, + { + "name": "Mithgol", + "url": "https://github.com/Mithgol" + }, + { + "name": "Nazar Leush", + "url": "https://github.com/nleush" + } + ], + "dependencies": {}, + "description": "Convert character encodings in pure javascript.", + "devDependencies": { + "async": "*", + "errto": "*", + "iconv": "*", + "istanbul": "*", + "mocha": "*", + "request": "*", + "semver": "*", + "unorm": "*" + }, + "directories": {}, + "dist": { + "shasum": "4fdaa3b38acbc2c031b045d0edcdfe1ecab18c8d", + "tarball": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.17.tgz" + }, + "engines": { + "node": ">=0.10.0" + }, + "gitHead": "64d1e3d7403bbb5414966de83d325419e7ea14e2", + "homepage": "https://github.com/ashtuchkin/iconv-lite", + "keywords": [ + "iconv", + "convert", + "charset", + "icu" + ], + "license": "MIT", + "main": "./lib/index.js", + "maintainers": [ + { + "name": "ashtuchkin", + "email": "ashtuchkin@gmail.com" + } + ], + "name": "iconv-lite", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/ashtuchkin/iconv-lite.git" + }, + "scripts": { + "coverage": "istanbul cover _mocha -- --grep .", + "coverage-open": "open coverage/lcov-report/index.html", + "test": "mocha --reporter spec --grep ." + }, + "typings": "./lib/index.d.ts", + "version": "0.4.17" +} diff --git a/pitfall/pdfkit/node_modules/ieee754/.travis.yml b/pitfall/pdfkit/node_modules/ieee754/.travis.yml new file mode 100644 index 00000000..6c45b34d --- /dev/null +++ b/pitfall/pdfkit/node_modules/ieee754/.travis.yml @@ -0,0 +1,7 @@ +language: node_js +node_js: +- 'node' +env: + global: + - secure: f3NrmOV/A7oACn47J1mkIpH8Sn/LINtluZvo/9pGo3Ss4+D2lyt7UawpedHtnYgU9WEyjPSi7pDWopUrIzusQ2trLYRJr8WAOEyHlgaepDyy4BW3ghGMKHMsS05kilYLP8nu1sRd6y1AcUYKw+kUrrSPanI7kViWVQ5d5DuwXO8= + - secure: a6teILh33z5fbGQbh5/EkFfAyXfa2fPJG1upy9K+jLAbG4WZxXD+YmXG9Tz33/2NJm6UplGfTJ8IQEXgxEfAFk3ao3xfKxzm3i64XxtroSlXIFNSiQKogxDfLEtWDoNNCodPHaV3ATEqxGJ5rkkUeU1+ROWW0sjG5JR26k8/Hfg= diff --git a/pitfall/pdfkit/node_modules/ieee754/.zuul.yml b/pitfall/pdfkit/node_modules/ieee754/.zuul.yml new file mode 100644 index 00000000..b5ba0c4a --- /dev/null +++ b/pitfall/pdfkit/node_modules/ieee754/.zuul.yml @@ -0,0 +1,20 @@ +ui: tape +scripts: + - "./test/_polyfill.js" +browsers: + - name: chrome + version: latest + - name: firefox + version: latest + - name: safari + version: latest + - name: ie + version: 11 + - name: microsoftedge + version: latest + - name: opera + version: latest + - name: android + version: latest + - name: iphone + version: latest diff --git a/pitfall/pdfkit/node_modules/ieee754/LICENSE b/pitfall/pdfkit/node_modules/ieee754/LICENSE new file mode 100644 index 00000000..f37a2ebe --- /dev/null +++ b/pitfall/pdfkit/node_modules/ieee754/LICENSE @@ -0,0 +1,28 @@ +Copyright (c) 2008, Fair Oaks Labs, Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + * Neither the name of Fair Oaks Labs, Inc. nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. diff --git a/pitfall/pdfkit/node_modules/ieee754/README.md b/pitfall/pdfkit/node_modules/ieee754/README.md new file mode 100644 index 00000000..11f4d40c --- /dev/null +++ b/pitfall/pdfkit/node_modules/ieee754/README.md @@ -0,0 +1,47 @@ +# ieee754 [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][npm-url] + +[![saucelabs][saucelabs-image]][saucelabs-url] + +[travis-image]: https://img.shields.io/travis/feross/ieee754/master.svg +[travis-url]: https://travis-ci.org/feross/ieee754 +[npm-image]: https://img.shields.io/npm/v/ieee754.svg +[npm-url]: https://npmjs.org/package/ieee754 +[downloads-image]: https://img.shields.io/npm/dm/ieee754.svg +[saucelabs-image]: https://saucelabs.com/browser-matrix/ieee754.svg +[saucelabs-url]: https://saucelabs.com/u/ieee754 + +### Read/write IEEE754 floating point numbers from/to a Buffer or array-like object. + +## install + +``` +npm install ieee754 +``` + +## methods + +`var ieee754 = require('ieee754')` + +The `ieee754` object has the following functions: + +``` +ieee754.read = function (buffer, offset, isLE, mLen, nBytes) +ieee754.write = function (buffer, value, offset, isLE, mLen, nBytes) +``` + +The arguments mean the following: + +- buffer = the buffer +- offset = offset into the buffer +- value = value to set (only for `write`) +- isLe = is little endian? +- mLen = mantissa length +- nBytes = number of bytes + +## what is ieee754? + +The IEEE Standard for Floating-Point Arithmetic (IEEE 754) is a technical standard for floating-point computation. [Read more](http://en.wikipedia.org/wiki/IEEE_floating_point). + +## license + +BSD 3 Clause. Copyright (c) 2008, Fair Oaks Labs, Inc. diff --git a/pitfall/pdfkit/node_modules/ieee754/index.js b/pitfall/pdfkit/node_modules/ieee754/index.js new file mode 100644 index 00000000..95e190c4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/ieee754/index.js @@ -0,0 +1,84 @@ +exports.read = function (buffer, offset, isLE, mLen, nBytes) { + var e, m + var eLen = nBytes * 8 - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var nBits = -7 + var i = isLE ? (nBytes - 1) : 0 + var d = isLE ? -1 : 1 + var s = buffer[offset + i] + + i += d + + e = s & ((1 << (-nBits)) - 1) + s >>= (-nBits) + nBits += eLen + for (; nBits > 0; e = e * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + m = e & ((1 << (-nBits)) - 1) + e >>= (-nBits) + nBits += mLen + for (; nBits > 0; m = m * 256 + buffer[offset + i], i += d, nBits -= 8) {} + + if (e === 0) { + e = 1 - eBias + } else if (e === eMax) { + return m ? NaN : ((s ? -1 : 1) * Infinity) + } else { + m = m + Math.pow(2, mLen) + e = e - eBias + } + return (s ? -1 : 1) * m * Math.pow(2, e - mLen) +} + +exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { + var e, m, c + var eLen = nBytes * 8 - mLen - 1 + var eMax = (1 << eLen) - 1 + var eBias = eMax >> 1 + var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) + var i = isLE ? 0 : (nBytes - 1) + var d = isLE ? 1 : -1 + var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 + + value = Math.abs(value) + + if (isNaN(value) || value === Infinity) { + m = isNaN(value) ? 1 : 0 + e = eMax + } else { + e = Math.floor(Math.log(value) / Math.LN2) + if (value * (c = Math.pow(2, -e)) < 1) { + e-- + c *= 2 + } + if (e + eBias >= 1) { + value += rt / c + } else { + value += rt * Math.pow(2, 1 - eBias) + } + if (value * c >= 2) { + e++ + c /= 2 + } + + if (e + eBias >= eMax) { + m = 0 + e = eMax + } else if (e + eBias >= 1) { + m = (value * c - 1) * Math.pow(2, mLen) + e = e + eBias + } else { + m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) + e = 0 + } + } + + for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} + + e = (e << mLen) | m + eLen += mLen + for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} + + buffer[offset + i - d] |= s * 128 +} diff --git a/pitfall/pdfkit/node_modules/ieee754/package.json b/pitfall/pdfkit/node_modules/ieee754/package.json new file mode 100644 index 00000000..271c2260 --- /dev/null +++ b/pitfall/pdfkit/node_modules/ieee754/package.json @@ -0,0 +1,105 @@ +{ + "_args": [ + [ + { + "raw": "ieee754@~1.1.1", + "scope": null, + "escapedName": "ieee754", + "name": "ieee754", + "rawSpec": "~1.1.1", + "spec": ">=1.1.1 <1.2.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/buffer" + ] + ], + "_from": "ieee754@>=1.1.1 <1.2.0", + "_id": "ieee754@1.1.8", + "_inCache": true, + "_location": "/ieee754", + "_nodeVersion": "6.7.0", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/ieee754-1.1.8.tgz_1475481601035_0.6688473029062152" + }, + "_npmUser": { + "name": "feross", + "email": "feross@feross.org" + }, + "_npmVersion": "3.10.3", + "_phantomChildren": {}, + "_requested": { + "raw": "ieee754@~1.1.1", + "scope": null, + "escapedName": "ieee754", + "name": "ieee754", + "rawSpec": "~1.1.1", + "spec": ">=1.1.1 <1.2.0", + "type": "range" + }, + "_requiredBy": [ + "/buffer" + ], + "_resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz", + "_shasum": "be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4", + "_shrinkwrap": null, + "_spec": "ieee754@~1.1.1", + "_where": "/Users/MB/git/pdfkit/node_modules/buffer", + "author": { + "name": "Feross Aboukhadijeh", + "email": "feross@feross.org", + "url": "http://feross.org" + }, + "bugs": { + "url": "https://github.com/feross/ieee754/issues" + }, + "contributors": [ + { + "name": "Romain Beauxis", + "email": "toots@rastageeks.org" + } + ], + "dependencies": {}, + "description": "Read/write IEEE754 floating point numbers from/to a Buffer or array-like object", + "devDependencies": { + "standard": "*", + "tape": "^4.0.0", + "zuul": "^3.0.0" + }, + "directories": {}, + "dist": { + "shasum": "be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4", + "tarball": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz" + }, + "gitHead": "53d3f869cc527852156b8307353c55addc3e03ae", + "homepage": "https://github.com/feross/ieee754#readme", + "keywords": [ + "IEEE 754", + "buffer", + "convert", + "floating point", + "ieee754" + ], + "license": "BSD-3-Clause", + "main": "index.js", + "maintainers": [ + { + "name": "feross", + "email": "feross@feross.org" + } + ], + "name": "ieee754", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/feross/ieee754.git" + }, + "scripts": { + "test": "standard && npm run test-node && npm run test-browser", + "test-browser": "zuul -- test/*.js", + "test-browser-local": "zuul --local -- test/*.js", + "test-node": "tape test/*.js" + }, + "version": "1.1.8" +} diff --git a/pitfall/pdfkit/node_modules/ieee754/test/basic.js b/pitfall/pdfkit/node_modules/ieee754/test/basic.js new file mode 100644 index 00000000..58fae2bf --- /dev/null +++ b/pitfall/pdfkit/node_modules/ieee754/test/basic.js @@ -0,0 +1,23 @@ +var ieee754 = require('../') +var test = require('tape') + +var EPSILON = 0.00001 + +test('read float', function (t) { + var buf = new Buffer(4) + buf.writeFloatLE(42.42, 0) + var num = ieee754.read(buf, 0, true, 23, 4) + t.ok(Math.abs(num - 42.42) < EPSILON) + + t.end() +}) + +test('write float', function (t) { + var buf = new Buffer(4) + ieee754.write(buf, 42.42, 0, true, 23, 4) + + var num = buf.readFloatLE(0) + t.ok(Math.abs(num - 42.42) < EPSILON) + + t.end() +}) diff --git a/pitfall/pdfkit/node_modules/indexof/.npmignore b/pitfall/pdfkit/node_modules/indexof/.npmignore new file mode 100644 index 00000000..48a2e246 --- /dev/null +++ b/pitfall/pdfkit/node_modules/indexof/.npmignore @@ -0,0 +1,2 @@ +components +build diff --git a/pitfall/pdfkit/node_modules/indexof/Makefile b/pitfall/pdfkit/node_modules/indexof/Makefile new file mode 100644 index 00000000..3f6119d2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/indexof/Makefile @@ -0,0 +1,11 @@ + +build: components index.js + @component build + +components: + @Component install + +clean: + rm -fr build components template.js + +.PHONY: clean diff --git a/pitfall/pdfkit/node_modules/indexof/Readme.md b/pitfall/pdfkit/node_modules/indexof/Readme.md new file mode 100644 index 00000000..99c8dfc8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/indexof/Readme.md @@ -0,0 +1,15 @@ + +# indexOf + + Lame indexOf thing, thanks microsoft + +## Example + +```js +var index = require('indexof'); +index(arr, obj); +``` + +## License + + MIT \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/indexof/component.json b/pitfall/pdfkit/node_modules/indexof/component.json new file mode 100644 index 00000000..e3430d75 --- /dev/null +++ b/pitfall/pdfkit/node_modules/indexof/component.json @@ -0,0 +1,10 @@ +{ + "name": "indexof", + "description": "Microsoft sucks", + "version": "0.0.1", + "keywords": ["index", "array", "indexOf"], + "dependencies": {}, + "scripts": [ + "index.js" + ] +} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/indexof/index.js b/pitfall/pdfkit/node_modules/indexof/index.js new file mode 100644 index 00000000..9d9667b2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/indexof/index.js @@ -0,0 +1,10 @@ + +var indexOf = [].indexOf; + +module.exports = function(arr, obj){ + if (indexOf) return arr.indexOf(obj); + for (var i = 0; i < arr.length; ++i) { + if (arr[i] === obj) return i; + } + return -1; +}; \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/indexof/package.json b/pitfall/pdfkit/node_modules/indexof/package.json new file mode 100644 index 00000000..5d505300 --- /dev/null +++ b/pitfall/pdfkit/node_modules/indexof/package.json @@ -0,0 +1,66 @@ +{ + "_args": [ + [ + { + "raw": "indexof@0.0.1", + "scope": null, + "escapedName": "indexof", + "name": "indexof", + "rawSpec": "0.0.1", + "spec": "0.0.1", + "type": "version" + }, + "/Users/MB/git/pdfkit/node_modules/vm-browserify" + ] + ], + "_from": "indexof@0.0.1", + "_id": "indexof@0.0.1", + "_inCache": true, + "_location": "/indexof", + "_phantomChildren": {}, + "_requested": { + "raw": "indexof@0.0.1", + "scope": null, + "escapedName": "indexof", + "name": "indexof", + "rawSpec": "0.0.1", + "spec": "0.0.1", + "type": "version" + }, + "_requiredBy": [ + "/vm-browserify" + ], + "_resolved": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz", + "_shasum": "82dc336d232b9062179d05ab3293a66059fd435d", + "_shrinkwrap": null, + "_spec": "indexof@0.0.1", + "_where": "/Users/MB/git/pdfkit/node_modules/vm-browserify", + "component": { + "scripts": { + "indexof/index.js": "index.js" + } + }, + "dependencies": {}, + "description": "Microsoft sucks", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "82dc336d232b9062179d05ab3293a66059fd435d", + "tarball": "https://registry.npmjs.org/indexof/-/indexof-0.0.1.tgz" + }, + "keywords": [ + "index", + "array", + "indexOf" + ], + "maintainers": [ + { + "name": "tjholowaychuk", + "email": "tj@vision-media.ca" + } + ], + "name": "indexof", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "version": "0.0.1" +} diff --git a/pitfall/pdfkit/node_modules/inherits/LICENSE b/pitfall/pdfkit/node_modules/inherits/LICENSE new file mode 100644 index 00000000..dea3013d --- /dev/null +++ b/pitfall/pdfkit/node_modules/inherits/LICENSE @@ -0,0 +1,16 @@ +The ISC License + +Copyright (c) Isaac Z. Schlueter + +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH +REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND +FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, +INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM +LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR +OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. + diff --git a/pitfall/pdfkit/node_modules/inherits/README.md b/pitfall/pdfkit/node_modules/inherits/README.md new file mode 100644 index 00000000..b1c56658 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inherits/README.md @@ -0,0 +1,42 @@ +Browser-friendly inheritance fully compatible with standard node.js +[inherits](http://nodejs.org/api/util.html#util_util_inherits_constructor_superconstructor). + +This package exports standard `inherits` from node.js `util` module in +node environment, but also provides alternative browser-friendly +implementation through [browser +field](https://gist.github.com/shtylman/4339901). Alternative +implementation is a literal copy of standard one located in standalone +module to avoid requiring of `util`. It also has a shim for old +browsers with no `Object.create` support. + +While keeping you sure you are using standard `inherits` +implementation in node.js environment, it allows bundlers such as +[browserify](https://github.com/substack/node-browserify) to not +include full `util` package to your client code if all you need is +just `inherits` function. It worth, because browser shim for `util` +package is large and `inherits` is often the single function you need +from it. + +It's recommended to use this package instead of +`require('util').inherits` for any code that has chances to be used +not only in node.js but in browser too. + +## usage + +```js +var inherits = require('inherits'); +// then use exactly as the standard one +``` + +## note on version ~1.0 + +Version ~1.0 had completely different motivation and is not compatible +neither with 2.0 nor with standard node.js `inherits`. + +If you are using version ~1.0 and planning to switch to ~2.0, be +careful: + +* new version uses `super_` instead of `super` for referencing + superclass +* new version overwrites current prototype while old one preserves any + existing fields on it diff --git a/pitfall/pdfkit/node_modules/inherits/inherits.js b/pitfall/pdfkit/node_modules/inherits/inherits.js new file mode 100644 index 00000000..3b94763a --- /dev/null +++ b/pitfall/pdfkit/node_modules/inherits/inherits.js @@ -0,0 +1,7 @@ +try { + var util = require('util'); + if (typeof util.inherits !== 'function') throw ''; + module.exports = util.inherits; +} catch (e) { + module.exports = require('./inherits_browser.js'); +} diff --git a/pitfall/pdfkit/node_modules/inherits/inherits_browser.js b/pitfall/pdfkit/node_modules/inherits/inherits_browser.js new file mode 100644 index 00000000..c1e78a75 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inherits/inherits_browser.js @@ -0,0 +1,23 @@ +if (typeof Object.create === 'function') { + // implementation from standard node.js 'util' module + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); + }; +} else { + // old school shim for old browsers + module.exports = function inherits(ctor, superCtor) { + ctor.super_ = superCtor + var TempCtor = function () {} + TempCtor.prototype = superCtor.prototype + ctor.prototype = new TempCtor() + ctor.prototype.constructor = ctor + } +} diff --git a/pitfall/pdfkit/node_modules/inherits/package.json b/pitfall/pdfkit/node_modules/inherits/package.json new file mode 100644 index 00000000..9200da1c --- /dev/null +++ b/pitfall/pdfkit/node_modules/inherits/package.json @@ -0,0 +1,116 @@ +{ + "_args": [ + [ + { + "raw": "inherits@~2.0.1", + "scope": null, + "escapedName": "inherits", + "name": "inherits", + "rawSpec": "~2.0.1", + "spec": ">=2.0.1 <2.1.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/readable-stream" + ], + [ + { + "raw": "inherits@~2.0.1", + "scope": null, + "escapedName": "inherits", + "name": "inherits", + "rawSpec": "~2.0.1", + "spec": ">=2.0.1 <2.1.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/browserify" + ] + ], + "_from": "inherits@~2.0.1", + "_id": "inherits@2.0.3", + "_inCache": true, + "_location": "/inherits", + "_nodeVersion": "6.5.0", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/inherits-2.0.3.tgz_1473295776489_0.08142363070510328" + }, + "_npmUser": { + "name": "isaacs", + "email": "i@izs.me" + }, + "_npmVersion": "3.10.7", + "_phantomChildren": {}, + "_requested": { + "raw": "inherits@~2.0.1", + "scope": null, + "escapedName": "inherits", + "name": "inherits", + "rawSpec": "~2.0.1", + "spec": ">=2.0.1 <2.1.0", + "type": "range" + }, + "_requiredBy": [ + "/browserify", + "/concat-stream", + "/glob", + "/http-browserify", + "/module-deps", + "/readable-stream", + "/stream-browserify", + "/through2/readable-stream" + ], + "_resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "_shasum": "633c2c83e3da42a502f52466022480f4208261de", + "_shrinkwrap": null, + "_spec": "inherits@~2.0.1", + "_where": "/Users/MB/git/pdfkit/node_modules/browserify", + "browser": "./inherits_browser.js", + "bugs": { + "url": "https://github.com/isaacs/inherits/issues" + }, + "dependencies": {}, + "description": "Browser-friendly inheritance fully compatible with standard node.js inherits()", + "devDependencies": { + "tap": "^7.1.0" + }, + "directories": {}, + "dist": { + "shasum": "633c2c83e3da42a502f52466022480f4208261de", + "tarball": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz" + }, + "files": [ + "inherits.js", + "inherits_browser.js" + ], + "gitHead": "e05d0fb27c61a3ec687214f0476386b765364d5f", + "homepage": "https://github.com/isaacs/inherits#readme", + "keywords": [ + "inheritance", + "class", + "klass", + "oop", + "object-oriented", + "inherits", + "browser", + "browserify" + ], + "license": "ISC", + "main": "./inherits.js", + "maintainers": [ + { + "name": "isaacs", + "email": "i@izs.me" + } + ], + "name": "inherits", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/inherits.git" + }, + "scripts": { + "test": "node test" + }, + "version": "2.0.3" +} diff --git a/pitfall/pdfkit/node_modules/inline-source-map/.npmignore b/pitfall/pdfkit/node_modules/inline-source-map/.npmignore new file mode 100644 index 00000000..de78e273 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/.npmignore @@ -0,0 +1,16 @@ +lib-cov +*.seed +*.log +*.csv +*.dat +*.out +*.pid +*.gz + +pids +logs +results + +node_modules +npm-debug.log +tmp diff --git a/pitfall/pdfkit/node_modules/inline-source-map/.travis.yml b/pitfall/pdfkit/node_modules/inline-source-map/.travis.yml new file mode 100644 index 00000000..b7684aa9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/.travis.yml @@ -0,0 +1,7 @@ +sudo: false +language: node_js +node_js: + - 0.8 + - 0.10 + - 0.12 + - io.js diff --git a/pitfall/pdfkit/node_modules/inline-source-map/LICENSE b/pitfall/pdfkit/node_modules/inline-source-map/LICENSE new file mode 100644 index 00000000..41702c50 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/LICENSE @@ -0,0 +1,23 @@ +Copyright 2013 Thorsten Lorenz. +All rights reserved. + +Permission is hereby granted, free of charge, to any person +obtaining a copy of this software and associated documentation +files (the "Software"), to deal in the Software without +restriction, including without limitation the rights to use, +copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following +conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +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. diff --git a/pitfall/pdfkit/node_modules/inline-source-map/README.md b/pitfall/pdfkit/node_modules/inline-source-map/README.md new file mode 100644 index 00000000..7497a35a --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/README.md @@ -0,0 +1,88 @@ +# inline-source-map [![build status](https://secure.travis-ci.org/thlorenz/inline-source-map.png)](http://travis-ci.org/thlorenz/inline-source-map) + +Adds source mappings and base64 encodes them, so they can be inlined in your generated file. + +```js +var generator = require('inline-source-map'); + +var gen = generator() + .addMappings('foo.js', [{ original: { line: 2, column: 3 } , generated: { line: 5, column: 10 } }], { line: 5 }) + .addGeneratedMappings('bar.js', 'var a = 2;\nconsole.log(a)', { line: 23, column: 22 }); + +console.log('base64 mapping:', gen.base64Encode()); +console.log('inline mapping url:', gen.inlineMappingUrl()); +``` + +``` +base64 mapping eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvby5qcyIsImJhci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7VUFDRzs7Ozs7Ozs7Ozs7Ozs7c0JDREg7c0JBQ0EiLCJmaWxlIjoiIiwic291cmNlUm9vdCI6IiJ9 +inline mapping url //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvby5qcyIsImJhci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7VUFDRzs7Ozs7Ozs7Ozs7Ozs7c0JDREg7c0JBQ0EiLCJmaWxlIjoiIiwic291cmNlUm9vdCI6IiJ9 +``` + +## API + +### addMappings(sourceFile, mappings, offset) + +``` +/** + * Adds the given mappings to the generator and offsets them if offset is given + * + * @name addMappings + * @function + * @param sourceFile {String} name of the source file + * @param mappings {Array{{Object}} each object has the form { original: { line: _, column: _ }, generated: { line: _, column: _ } } + * @param offset {Object} offset to apply to each mapping. Has the form { line: _, column: _ } + * @return {Object} the generator to allow chaining + */ +``` + +### addGeneratedMappings(sourceFile, source, offset) + +``` +/** + * Generates mappings for the given source and adds them, assuming that no translation from original to generated is necessary. + * + * @name addGeneratedMappings + * @function + * @param sourceFile {String} name of the source file + * @param source {String} source of the file + * @param offset {Object} offset to apply to each mapping. Has the form { line: _, column: _ } + * @return {Object} the generator to allow chaining + */ +``` + +### addSourceContent(sourceFile, sourceContent) + +``` +/** + * Adds source content for the given source file. + * + * @name addSourceContent + * @function + * @param sourceFile {String} The source file for which a mapping is included + * @param sourceContent {String} The content of the source file + * @return {Object} The generator to allow chaining + */ +``` + + +### base64Encode() + +``` +/** + * @name base64Encode + * @function + * @return {String} bas64 encoded representation of the added mappings + */ +``` + +If source contents were added, this will be included in the encoded mappings. + +### inlineMappingUrl() + +``` +/** + * @name inlineMappingUrl + * @function + * @return {String} comment with base64 encoded representation of the added mappings. Can be inlined at the end of the generated file. + */ +``` diff --git a/pitfall/pdfkit/node_modules/inline-source-map/example/foo-bar.js b/pitfall/pdfkit/node_modules/inline-source-map/example/foo-bar.js new file mode 100644 index 00000000..247ee308 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/example/foo-bar.js @@ -0,0 +1,8 @@ +var generator = require('..'); + +var gen = generator() + .addMappings('foo.js', [{ original: { line: 2, column: 3 } , generated: { line: 5, column: 10 } }], { line: 5 }) + .addGeneratedMappings('bar.js', 'var a = 2;\nconsole.log(a)', { line: 23, column: 22 }); + +console.log('base64 mapping', gen.base64Encode()); +console.log('inline mapping url', gen.inlineMappingUrl()); diff --git a/pitfall/pdfkit/node_modules/inline-source-map/index.js b/pitfall/pdfkit/node_modules/inline-source-map/index.js new file mode 100644 index 00000000..106f7281 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/index.js @@ -0,0 +1,127 @@ +'use strict'; +var SourceMapGenerator = require('source-map').SourceMapGenerator; + +function offsetMapping(mapping, offset) { + return { line: offset.line + mapping.line, column: offset.column + mapping.column }; +} + +function newlinesIn(src) { + if (!src) return 0; + var newlines = src.match(/\n/g); + + return newlines ? newlines.length : 0; +} + +function Generator(opts) { + opts = opts || {}; + this.generator = new SourceMapGenerator({ file: opts.file || '', sourceRoot: opts.sourceRoot || '' }); + this.sourcesContent = undefined; +} + +/** + * Adds the given mappings to the generator and offsets them if offset is given + * + * @name addMappings + * @function + * @param sourceFile {String} name of the source file + * @param mappings {Array{{Object}} each object has the form { original: { line: _, column: _ }, generated: { line: _, column: _ } } + * @param offset {Object} offset to apply to each mapping. Has the form { line: _, column: _ } + * @return {Object} the generator to allow chaining + */ +Generator.prototype.addMappings = function (sourceFile, mappings, offset) { + var generator = this.generator; + + offset = offset || {}; + offset.line = offset.hasOwnProperty('line') ? offset.line : 0; + offset.column = offset.hasOwnProperty('column') ? offset.column : 0; + + mappings.forEach(function (m) { + // only set source if we have original position to handle edgecase (see inline-source-map tests) + generator.addMapping({ + source : m.original ? sourceFile : undefined + , original : m.original + , generated : offsetMapping(m.generated, offset) + }); + }); + return this; +}; + +/** + * Generates mappings for the given source, assuming that no translation from original to generated is necessary. + * + * @name addGeneratedMappings + * @function + * @param sourceFile {String} name of the source file + * @param source {String} source of the file + * @param offset {Object} offset to apply to each mapping. Has the form { line: _, column: _ } + * @return {Object} the generator to allow chaining + */ +Generator.prototype.addGeneratedMappings = function (sourceFile, source, offset) { + var mappings = [] + , linesToGenerate = newlinesIn(source) + 1; + + for (var line = 1; line <= linesToGenerate; line++) { + var location = { line: line, column: 0 }; + mappings.push({ original: location, generated: location }); + } + + return this.addMappings(sourceFile, mappings, offset); +}; + +/** + * Adds source content for the given source file. + * + * @name addSourceContent + * @function + * @param sourceFile {String} The source file for which a mapping is included + * @param sourcesContent {String} The content of the source file + * @return {Object} The generator to allow chaining + */ +Generator.prototype.addSourceContent = function (sourceFile, sourcesContent) { + this.sourcesContent = this.sourcesContent || {}; + this.sourcesContent[sourceFile] = sourcesContent; + return this; +}; + +/** + * @name base64Encode + * @function + * @return {String} bas64 encoded representation of the added mappings + */ +Generator.prototype.base64Encode = function () { + var map = this.toString(); + return new Buffer(map).toString('base64'); +}; + +/** + * @name inlineMappingUrl + * @function + * @return {String} comment with base64 encoded representation of the added mappings. Can be inlined at the end of the generated file. + */ +Generator.prototype.inlineMappingUrl = function () { + return '//# sourceMappingURL=data:application/json;base64,' + this.base64Encode(); +}; + +Generator.prototype.toJSON = function () { + var map = this.generator.toJSON(); + if (!this.sourcesContent) return map; + + var toSourcesContent = (function (s) { return this.sourcesContent[s] || null; }).bind(this); + map.sourcesContent = map.sources.map(toSourcesContent); + return map; +}; + +Generator.prototype.toString = function () { + return JSON.stringify(this); +}; + +Generator.prototype._mappings = function () { + return this.generator._mappings._array; +}; + +Generator.prototype.gen = function () { + return this.generator; +}; + +module.exports = function (opts) { return new Generator(opts); }; +module.exports.Generator = Generator; diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/.npmignore b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/.npmignore new file mode 100644 index 00000000..3dddf3f6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/.npmignore @@ -0,0 +1,2 @@ +dist/* +node_modules/* diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/.travis.yml b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/.travis.yml new file mode 100644 index 00000000..ddc9c4f9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.8 + - "0.10" \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/CHANGELOG.md b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/CHANGELOG.md new file mode 100644 index 00000000..c6c42c79 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/CHANGELOG.md @@ -0,0 +1,208 @@ +# Change Log + +## 0.3.0 + +* Change the default direction that searching for positions fuzzes when there is + not an exact match. See #154. + +* Support for environments using json2.js for JSON serialization. See #156. + +## 0.2.0 + +* Support for consuming "indexed" source maps which do not have any remote + sections. See pull request #127. This introduces a minor backwards + incompatibility if you are monkey patching `SourceMapConsumer.prototype` + methods. + +## 0.1.43 + +* Performance improvements for `SourceMapGenerator` and `SourceNode`. See issue + #148 for some discussion and issues #150, #151, and #152 for implementations. + +## 0.1.42 + +* Fix an issue where `SourceNode`s from different versions of the source-map + library couldn't be used in conjunction with each other. See issue #142. + +## 0.1.41 + +* Fix a bug with getting the source content of relative sources with a "./" + prefix. See issue #145 and [Bug 1090768](bugzil.la/1090768). + +* Add the `SourceMapConsumer.prototype.computeColumnSpans` method to compute the + column span of each mapping. + +* Add the `SourceMapConsumer.prototype.allGeneratedPositionsFor` method to find + all generated positions associated with a given original source and line. + +## 0.1.40 + +* Performance improvements for parsing source maps in SourceMapConsumer. + +## 0.1.39 + +* Fix a bug where setting a source's contents to null before any source content + had been set before threw a TypeError. See issue #131. + +## 0.1.38 + +* Fix a bug where finding relative paths from an empty path were creating + absolute paths. See issue #129. + +## 0.1.37 + +* Fix a bug where if the source root was an empty string, relative source paths + would turn into absolute source paths. Issue #124. + +## 0.1.36 + +* Allow the `names` mapping property to be an empty string. Issue #121. + +## 0.1.35 + +* A third optional parameter was added to `SourceNode.fromStringWithSourceMap` + to specify a path that relative sources in the second parameter should be + relative to. Issue #105. + +* If no file property is given to a `SourceMapGenerator`, then the resulting + source map will no longer have a `null` file property. The property will + simply not exist. Issue #104. + +* Fixed a bug where consecutive newlines were ignored in `SourceNode`s. + Issue #116. + +## 0.1.34 + +* Make `SourceNode` work with windows style ("\r\n") newlines. Issue #103. + +* Fix bug involving source contents and the + `SourceMapGenerator.prototype.applySourceMap`. Issue #100. + +## 0.1.33 + +* Fix some edge cases surrounding path joining and URL resolution. + +* Add a third parameter for relative path to + `SourceMapGenerator.prototype.applySourceMap`. + +* Fix issues with mappings and EOLs. + +## 0.1.32 + +* Fixed a bug where SourceMapConsumer couldn't handle negative relative columns + (issue 92). + +* Fixed test runner to actually report number of failed tests as its process + exit code. + +* Fixed a typo when reporting bad mappings (issue 87). + +## 0.1.31 + +* Delay parsing the mappings in SourceMapConsumer until queried for a source + location. + +* Support Sass source maps (which at the time of writing deviate from the spec + in small ways) in SourceMapConsumer. + +## 0.1.30 + +* Do not join source root with a source, when the source is a data URI. + +* Extend the test runner to allow running single specific test files at a time. + +* Performance improvements in `SourceNode.prototype.walk` and + `SourceMapConsumer.prototype.eachMapping`. + +* Source map browser builds will now work inside Workers. + +* Better error messages when attempting to add an invalid mapping to a + `SourceMapGenerator`. + +## 0.1.29 + +* Allow duplicate entries in the `names` and `sources` arrays of source maps + (usually from TypeScript) we are parsing. Fixes github issue 72. + +## 0.1.28 + +* Skip duplicate mappings when creating source maps from SourceNode; github + issue 75. + +## 0.1.27 + +* Don't throw an error when the `file` property is missing in SourceMapConsumer, + we don't use it anyway. + +## 0.1.26 + +* Fix SourceNode.fromStringWithSourceMap for empty maps. Fixes github issue 70. + +## 0.1.25 + +* Make compatible with browserify + +## 0.1.24 + +* Fix issue with absolute paths and `file://` URIs. See + https://bugzilla.mozilla.org/show_bug.cgi?id=885597 + +## 0.1.23 + +* Fix issue with absolute paths and sourcesContent, github issue 64. + +## 0.1.22 + +* Ignore duplicate mappings in SourceMapGenerator. Fixes github issue 21. + +## 0.1.21 + +* Fixed handling of sources that start with a slash so that they are relative to + the source root's host. + +## 0.1.20 + +* Fixed github issue #43: absolute URLs aren't joined with the source root + anymore. + +## 0.1.19 + +* Using Travis CI to run tests. + +## 0.1.18 + +* Fixed a bug in the handling of sourceRoot. + +## 0.1.17 + +* Added SourceNode.fromStringWithSourceMap. + +## 0.1.16 + +* Added missing documentation. + +* Fixed the generating of empty mappings in SourceNode. + +## 0.1.15 + +* Added SourceMapGenerator.applySourceMap. + +## 0.1.14 + +* The sourceRoot is now handled consistently. + +## 0.1.13 + +* Added SourceMapGenerator.fromSourceMap. + +## 0.1.12 + +* SourceNode now generates empty mappings too. + +## 0.1.11 + +* Added name support to SourceNode. + +## 0.1.10 + +* Added sourcesContent support to the customer and generator. diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/LICENSE b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/LICENSE new file mode 100644 index 00000000..ed1b7cf2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/LICENSE @@ -0,0 +1,28 @@ + +Copyright (c) 2009-2011, Mozilla Foundation and contributors +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the names of the Mozilla Foundation nor the names of project + contributors may be used to endorse or promote products derived from this + software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/Makefile.dryice.js b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/Makefile.dryice.js new file mode 100644 index 00000000..d6fc26a7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/Makefile.dryice.js @@ -0,0 +1,166 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +var path = require('path'); +var fs = require('fs'); +var copy = require('dryice').copy; + +function removeAmdefine(src) { + src = String(src).replace( + /if\s*\(typeof\s*define\s*!==\s*'function'\)\s*{\s*var\s*define\s*=\s*require\('amdefine'\)\(module,\s*require\);\s*}\s*/g, + ''); + src = src.replace( + /\b(define\(.*)('amdefine',?)/gm, + '$1'); + return src; +} +removeAmdefine.onRead = true; + +function makeNonRelative(src) { + return src + .replace(/require\('.\//g, 'require(\'source-map/') + .replace(/\.\.\/\.\.\/lib\//g, ''); +} +makeNonRelative.onRead = true; + +function buildBrowser() { + console.log('\nCreating dist/source-map.js'); + + var project = copy.createCommonJsProject({ + roots: [ path.join(__dirname, 'lib') ] + }); + + copy({ + source: [ + 'build/mini-require.js', + { + project: project, + require: [ 'source-map/source-map-generator', + 'source-map/source-map-consumer', + 'source-map/source-node'] + }, + 'build/suffix-browser.js' + ], + filter: [ + copy.filter.moduleDefines, + removeAmdefine + ], + dest: 'dist/source-map.js' + }); +} + +function buildBrowserMin() { + console.log('\nCreating dist/source-map.min.js'); + + copy({ + source: 'dist/source-map.js', + filter: copy.filter.uglifyjs, + dest: 'dist/source-map.min.js' + }); +} + +function buildFirefox() { + console.log('\nCreating dist/SourceMap.jsm'); + + var project = copy.createCommonJsProject({ + roots: [ path.join(__dirname, 'lib') ] + }); + + copy({ + source: [ + 'build/prefix-source-map.jsm', + { + project: project, + require: [ 'source-map/source-map-consumer', + 'source-map/source-map-generator', + 'source-map/source-node' ] + }, + 'build/suffix-source-map.jsm' + ], + filter: [ + copy.filter.moduleDefines, + removeAmdefine, + makeNonRelative + ], + dest: 'dist/SourceMap.jsm' + }); + + // Create dist/test/Utils.jsm + console.log('\nCreating dist/test/Utils.jsm'); + + project = copy.createCommonJsProject({ + roots: [ __dirname, path.join(__dirname, 'lib') ] + }); + + copy({ + source: [ + 'build/prefix-utils.jsm', + 'build/assert-shim.js', + { + project: project, + require: [ 'test/source-map/util' ] + }, + 'build/suffix-utils.jsm' + ], + filter: [ + copy.filter.moduleDefines, + removeAmdefine, + makeNonRelative + ], + dest: 'dist/test/Utils.jsm' + }); + + function isTestFile(f) { + return /^test\-.*?\.js/.test(f); + } + + var testFiles = fs.readdirSync(path.join(__dirname, 'test', 'source-map')).filter(isTestFile); + + testFiles.forEach(function (testFile) { + console.log('\nCreating', path.join('dist', 'test', testFile.replace(/\-/g, '_'))); + + copy({ + source: [ + 'build/test-prefix.js', + path.join('test', 'source-map', testFile), + 'build/test-suffix.js' + ], + filter: [ + removeAmdefine, + makeNonRelative, + function (input, source) { + return input.replace('define(', + 'define("' + + path.join('test', 'source-map', testFile.replace(/\.js$/, '')) + + '", ["require", "exports", "module"], '); + }, + function (input, source) { + return input.replace('{THIS_MODULE}', function () { + return "test/source-map/" + testFile.replace(/\.js$/, ''); + }); + } + ], + dest: path.join('dist', 'test', testFile.replace(/\-/g, '_')) + }); + }); +} + +function ensureDir(name) { + var dirExists = false; + try { + dirExists = fs.statSync(name).isDirectory(); + } catch (err) {} + + if (!dirExists) { + fs.mkdirSync(name, 0777); + } +} + +ensureDir("dist"); +ensureDir("dist/test"); +buildFirefox(); +buildBrowser(); +buildBrowserMin(); diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/README.md b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/README.md new file mode 100644 index 00000000..80645388 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/README.md @@ -0,0 +1,489 @@ +# Source Map + +This is a library to generate and consume the source map format +[described here][format]. + +This library is written in the Asynchronous Module Definition format, and works +in the following environments: + +* Modern Browsers supporting ECMAScript 5 (either after the build, or with an + AMD loader such as RequireJS) + +* Inside Firefox (as a JSM file, after the build) + +* With NodeJS versions 0.8.X and higher + +## Node + + $ npm install source-map + +## Building from Source (for everywhere else) + +Install Node and then run + + $ git clone https://fitzgen@github.com/mozilla/source-map.git + $ cd source-map + $ npm link . + +Next, run + + $ node Makefile.dryice.js + +This should spew a bunch of stuff to stdout, and create the following files: + +* `dist/source-map.js` - The unminified browser version. + +* `dist/source-map.min.js` - The minified browser version. + +* `dist/SourceMap.jsm` - The JavaScript Module for inclusion in Firefox source. + +## Examples + +### Consuming a source map + +```js +var rawSourceMap = { + version: 3, + file: 'min.js', + names: ['bar', 'baz', 'n'], + sources: ['one.js', 'two.js'], + sourceRoot: 'http://example.com/www/js/', + mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' +}; + +var smc = new SourceMapConsumer(rawSourceMap); + +console.log(smc.sources); +// [ 'http://example.com/www/js/one.js', +// 'http://example.com/www/js/two.js' ] + +console.log(smc.originalPositionFor({ + line: 2, + column: 28 +})); +// { source: 'http://example.com/www/js/two.js', +// line: 2, +// column: 10, +// name: 'n' } + +console.log(smc.generatedPositionFor({ + source: 'http://example.com/www/js/two.js', + line: 2, + column: 10 +})); +// { line: 2, column: 28 } + +smc.eachMapping(function (m) { + // ... +}); +``` + +### Generating a source map + +In depth guide: +[**Compiling to JavaScript, and Debugging with Source Maps**](https://hacks.mozilla.org/2013/05/compiling-to-javascript-and-debugging-with-source-maps/) + +#### With SourceNode (high level API) + +```js +function compile(ast) { + switch (ast.type) { + case 'BinaryExpression': + return new SourceNode( + ast.location.line, + ast.location.column, + ast.location.source, + [compile(ast.left), " + ", compile(ast.right)] + ); + case 'Literal': + return new SourceNode( + ast.location.line, + ast.location.column, + ast.location.source, + String(ast.value) + ); + // ... + default: + throw new Error("Bad AST"); + } +} + +var ast = parse("40 + 2", "add.js"); +console.log(compile(ast).toStringWithSourceMap({ + file: 'add.js' +})); +// { code: '40 + 2', +// map: [object SourceMapGenerator] } +``` + +#### With SourceMapGenerator (low level API) + +```js +var map = new SourceMapGenerator({ + file: "source-mapped.js" +}); + +map.addMapping({ + generated: { + line: 10, + column: 35 + }, + source: "foo.js", + original: { + line: 33, + column: 2 + }, + name: "christopher" +}); + +console.log(map.toString()); +// '{"version":3,"file":"source-mapped.js","sources":["foo.js"],"names":["christopher"],"mappings":";;;;;;;;;mCAgCEA"}' +``` + +## API + +Get a reference to the module: + +```js +// NodeJS +var sourceMap = require('source-map'); + +// Browser builds +var sourceMap = window.sourceMap; + +// Inside Firefox +let sourceMap = {}; +Components.utils.import('resource:///modules/devtools/SourceMap.jsm', sourceMap); +``` + +### SourceMapConsumer + +A SourceMapConsumer instance represents a parsed source map which we can query +for information about the original file positions by giving it a file position +in the generated source. + +#### new SourceMapConsumer(rawSourceMap) + +The only parameter is the raw source map (either as a string which can be +`JSON.parse`'d, or an object). According to the spec, source maps have the +following attributes: + +* `version`: Which version of the source map spec this map is following. + +* `sources`: An array of URLs to the original source files. + +* `names`: An array of identifiers which can be referrenced by individual + mappings. + +* `sourceRoot`: Optional. The URL root from which all sources are relative. + +* `sourcesContent`: Optional. An array of contents of the original source files. + +* `mappings`: A string of base64 VLQs which contain the actual mappings. + +* `file`: Optional. The generated filename this source map is associated with. + +#### SourceMapConsumer.prototype.computeColumnSpans() + +Compute the last column for each generated mapping. The last column is +inclusive. + +#### SourceMapConsumer.prototype.originalPositionFor(generatedPosition) + +Returns the original source, line, and column information for the generated +source's line and column positions provided. The only argument is an object with +the following properties: + +* `line`: The line number in the generated source. + +* `column`: The column number in the generated source. + +and an object is returned with the following properties: + +* `source`: The original source file, or null if this information is not + available. + +* `line`: The line number in the original source, or null if this information is + not available. + +* `column`: The column number in the original source, or null or null if this + information is not available. + +* `name`: The original identifier, or null if this information is not available. + +#### SourceMapConsumer.prototype.generatedPositionFor(originalPosition) + +Returns the generated line and column information for the original source, +line, and column positions provided. The only argument is an object with +the following properties: + +* `source`: The filename of the original source. + +* `line`: The line number in the original source. + +* `column`: The column number in the original source. + +and an object is returned with the following properties: + +* `line`: The line number in the generated source, or null. + +* `column`: The column number in the generated source, or null. + +#### SourceMapConsumer.prototype.allGeneratedPositionsFor(originalPosition) + +Returns all generated line and column information for the original source +and line provided. The only argument is an object with the following +properties: + +* `source`: The filename of the original source. + +* `line`: The line number in the original source. + +and an array of objects is returned, each with the following properties: + +* `line`: The line number in the generated source, or null. + +* `column`: The column number in the generated source, or null. + +#### SourceMapConsumer.prototype.sourceContentFor(source[, returnNullOnMissing]) + +Returns the original source content for the source provided. The only +argument is the URL of the original source file. + +If the source content for the given source is not found, then an error is +thrown. Optionally, pass `true` as the second param to have `null` returned +instead. + +#### SourceMapConsumer.prototype.eachMapping(callback, context, order) + +Iterate over each mapping between an original source/line/column and a +generated line/column in this source map. + +* `callback`: The function that is called with each mapping. Mappings have the + form `{ source, generatedLine, generatedColumn, originalLine, originalColumn, + name }` + +* `context`: Optional. If specified, this object will be the value of `this` + every time that `callback` is called. + +* `order`: Either `SourceMapConsumer.GENERATED_ORDER` or + `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to iterate over + the mappings sorted by the generated file's line/column order or the + original's source/line/column order, respectively. Defaults to + `SourceMapConsumer.GENERATED_ORDER`. + +### SourceMapGenerator + +An instance of the SourceMapGenerator represents a source map which is being +built incrementally. + +#### new SourceMapGenerator([startOfSourceMap]) + +You may pass an object with the following properties: + +* `file`: The filename of the generated source that this source map is + associated with. + +* `sourceRoot`: A root for all relative URLs in this source map. + +* `skipValidation`: Optional. When `true`, disables validation of mappings as + they are added. This can improve performance but should be used with + discretion, as a last resort. Even then, one should avoid using this flag when + running tests, if possible. + +#### SourceMapGenerator.fromSourceMap(sourceMapConsumer) + +Creates a new SourceMapGenerator based on a SourceMapConsumer + +* `sourceMapConsumer` The SourceMap. + +#### SourceMapGenerator.prototype.addMapping(mapping) + +Add a single mapping from original source line and column to the generated +source's line and column for this source map being created. The mapping object +should have the following properties: + +* `generated`: An object with the generated line and column positions. + +* `original`: An object with the original line and column positions. + +* `source`: The original source file (relative to the sourceRoot). + +* `name`: An optional original token name for this mapping. + +#### SourceMapGenerator.prototype.setSourceContent(sourceFile, sourceContent) + +Set the source content for an original source file. + +* `sourceFile` the URL of the original source file. + +* `sourceContent` the content of the source file. + +#### SourceMapGenerator.prototype.applySourceMap(sourceMapConsumer[, sourceFile[, sourceMapPath]]) + +Applies a SourceMap for a source file to the SourceMap. +Each mapping to the supplied source file is rewritten using the +supplied SourceMap. Note: The resolution for the resulting mappings +is the minimium of this map and the supplied map. + +* `sourceMapConsumer`: The SourceMap to be applied. + +* `sourceFile`: Optional. The filename of the source file. + If omitted, sourceMapConsumer.file will be used, if it exists. + Otherwise an error will be thrown. + +* `sourceMapPath`: Optional. The dirname of the path to the SourceMap + to be applied. If relative, it is relative to the SourceMap. + + This parameter is needed when the two SourceMaps aren't in the same + directory, and the SourceMap to be applied contains relative source + paths. If so, those relative source paths need to be rewritten + relative to the SourceMap. + + If omitted, it is assumed that both SourceMaps are in the same directory, + thus not needing any rewriting. (Supplying `'.'` has the same effect.) + +#### SourceMapGenerator.prototype.toString() + +Renders the source map being generated to a string. + +### SourceNode + +SourceNodes provide a way to abstract over interpolating and/or concatenating +snippets of generated JavaScript source code, while maintaining the line and +column information associated between those snippets and the original source +code. This is useful as the final intermediate representation a compiler might +use before outputting the generated JS and source map. + +#### new SourceNode([line, column, source[, chunk[, name]]]) + +* `line`: The original line number associated with this source node, or null if + it isn't associated with an original line. + +* `column`: The original column number associated with this source node, or null + if it isn't associated with an original column. + +* `source`: The original source's filename; null if no filename is provided. + +* `chunk`: Optional. Is immediately passed to `SourceNode.prototype.add`, see + below. + +* `name`: Optional. The original identifier. + +#### SourceNode.fromStringWithSourceMap(code, sourceMapConsumer[, relativePath]) + +Creates a SourceNode from generated code and a SourceMapConsumer. + +* `code`: The generated code + +* `sourceMapConsumer` The SourceMap for the generated code + +* `relativePath` The optional path that relative sources in `sourceMapConsumer` + should be relative to. + +#### SourceNode.prototype.add(chunk) + +Add a chunk of generated JS to this source node. + +* `chunk`: A string snippet of generated JS code, another instance of + `SourceNode`, or an array where each member is one of those things. + +#### SourceNode.prototype.prepend(chunk) + +Prepend a chunk of generated JS to this source node. + +* `chunk`: A string snippet of generated JS code, another instance of + `SourceNode`, or an array where each member is one of those things. + +#### SourceNode.prototype.setSourceContent(sourceFile, sourceContent) + +Set the source content for a source file. This will be added to the +`SourceMap` in the `sourcesContent` field. + +* `sourceFile`: The filename of the source file + +* `sourceContent`: The content of the source file + +#### SourceNode.prototype.walk(fn) + +Walk over the tree of JS snippets in this node and its children. The walking +function is called once for each snippet of JS and is passed that snippet and +the its original associated source's line/column location. + +* `fn`: The traversal function. + +#### SourceNode.prototype.walkSourceContents(fn) + +Walk over the tree of SourceNodes. The walking function is called for each +source file content and is passed the filename and source content. + +* `fn`: The traversal function. + +#### SourceNode.prototype.join(sep) + +Like `Array.prototype.join` except for SourceNodes. Inserts the separator +between each of this source node's children. + +* `sep`: The separator. + +#### SourceNode.prototype.replaceRight(pattern, replacement) + +Call `String.prototype.replace` on the very right-most source snippet. Useful +for trimming whitespace from the end of a source node, etc. + +* `pattern`: The pattern to replace. + +* `replacement`: The thing to replace the pattern with. + +#### SourceNode.prototype.toString() + +Return the string representation of this source node. Walks over the tree and +concatenates all the various snippets together to one string. + +#### SourceNode.prototype.toStringWithSourceMap([startOfSourceMap]) + +Returns the string representation of this tree of source nodes, plus a +SourceMapGenerator which contains all the mappings between the generated and +original sources. + +The arguments are the same as those to `new SourceMapGenerator`. + +## Tests + +[![Build Status](https://travis-ci.org/mozilla/source-map.png?branch=master)](https://travis-ci.org/mozilla/source-map) + +Install NodeJS version 0.8.0 or greater, then run `node test/run-tests.js`. + +To add new tests, create a new file named `test/test-.js` +and export your test functions with names that start with "test", for example + +```js +exports["test doing the foo bar"] = function (assert, util) { + ... +}; +``` + +The new test will be located automatically when you run the suite. + +The `util` argument is the test utility module located at `test/source-map/util`. + +The `assert` argument is a cut down version of node's assert module. You have +access to the following assertion functions: + +* `doesNotThrow` + +* `equal` + +* `ok` + +* `strictEqual` + +* `throws` + +(The reason for the restricted set of test functions is because we need the +tests to run inside Firefox's test suite as well and so the assert module is +shimmed in that environment. See `build/assert-shim.js`.) + +[format]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit +[feature]: https://wiki.mozilla.org/DevTools/Features/SourceMap +[Dryice]: https://github.com/mozilla/dryice diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/build/assert-shim.js b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/build/assert-shim.js new file mode 100644 index 00000000..daa1a623 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/build/assert-shim.js @@ -0,0 +1,56 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +define('test/source-map/assert', ['exports'], function (exports) { + + let do_throw = function (msg) { + throw new Error(msg); + }; + + exports.init = function (throw_fn) { + do_throw = throw_fn; + }; + + exports.doesNotThrow = function (fn) { + try { + fn(); + } + catch (e) { + do_throw(e.message); + } + }; + + exports.equal = function (actual, expected, msg) { + msg = msg || String(actual) + ' != ' + String(expected); + if (actual != expected) { + do_throw(msg); + } + }; + + exports.ok = function (val, msg) { + msg = msg || String(val) + ' is falsey'; + if (!Boolean(val)) { + do_throw(msg); + } + }; + + exports.strictEqual = function (actual, expected, msg) { + msg = msg || String(actual) + ' !== ' + String(expected); + if (actual !== expected) { + do_throw(msg); + } + }; + + exports.throws = function (fn) { + try { + fn(); + do_throw('Expected an error to be thrown, but it wasn\'t.'); + } + catch (e) { + } + }; + +}); diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/build/mini-require.js b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/build/mini-require.js new file mode 100644 index 00000000..0daf4537 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/build/mini-require.js @@ -0,0 +1,152 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +/** + * Define a module along with a payload. + * @param {string} moduleName Name for the payload + * @param {ignored} deps Ignored. For compatibility with CommonJS AMD Spec + * @param {function} payload Function with (require, exports, module) params + */ +function define(moduleName, deps, payload) { + if (typeof moduleName != "string") { + throw new TypeError('Expected string, got: ' + moduleName); + } + + if (arguments.length == 2) { + payload = deps; + } + + if (moduleName in define.modules) { + throw new Error("Module already defined: " + moduleName); + } + define.modules[moduleName] = payload; +}; + +/** + * The global store of un-instantiated modules + */ +define.modules = {}; + + +/** + * We invoke require() in the context of a Domain so we can have multiple + * sets of modules running separate from each other. + * This contrasts with JSMs which are singletons, Domains allows us to + * optionally load a CommonJS module twice with separate data each time. + * Perhaps you want 2 command lines with a different set of commands in each, + * for example. + */ +function Domain() { + this.modules = {}; + this._currentModule = null; +} + +(function () { + + /** + * Lookup module names and resolve them by calling the definition function if + * needed. + * There are 2 ways to call this, either with an array of dependencies and a + * callback to call when the dependencies are found (which can happen + * asynchronously in an in-page context) or with a single string an no callback + * where the dependency is resolved synchronously and returned. + * The API is designed to be compatible with the CommonJS AMD spec and + * RequireJS. + * @param {string[]|string} deps A name, or names for the payload + * @param {function|undefined} callback Function to call when the dependencies + * are resolved + * @return {undefined|object} The module required or undefined for + * array/callback method + */ + Domain.prototype.require = function(deps, callback) { + if (Array.isArray(deps)) { + var params = deps.map(function(dep) { + return this.lookup(dep); + }, this); + if (callback) { + callback.apply(null, params); + } + return undefined; + } + else { + return this.lookup(deps); + } + }; + + function normalize(path) { + var bits = path.split('/'); + var i = 1; + while (i < bits.length) { + if (bits[i] === '..') { + bits.splice(i-1, 1); + } else if (bits[i] === '.') { + bits.splice(i, 1); + } else { + i++; + } + } + return bits.join('/'); + } + + function join(a, b) { + a = a.trim(); + b = b.trim(); + if (/^\//.test(b)) { + return b; + } else { + return a.replace(/\/*$/, '/') + b; + } + } + + function dirname(path) { + var bits = path.split('/'); + bits.pop(); + return bits.join('/'); + } + + /** + * Lookup module names and resolve them by calling the definition function if + * needed. + * @param {string} moduleName A name for the payload to lookup + * @return {object} The module specified by aModuleName or null if not found. + */ + Domain.prototype.lookup = function(moduleName) { + if (/^\./.test(moduleName)) { + moduleName = normalize(join(dirname(this._currentModule), moduleName)); + } + + if (moduleName in this.modules) { + var module = this.modules[moduleName]; + return module; + } + + if (!(moduleName in define.modules)) { + throw new Error("Module not defined: " + moduleName); + } + + var module = define.modules[moduleName]; + + if (typeof module == "function") { + var exports = {}; + var previousModule = this._currentModule; + this._currentModule = moduleName; + module(this.require.bind(this), exports, { id: moduleName, uri: "" }); + this._currentModule = previousModule; + module = exports; + } + + // cache the resulting module object for next time + this.modules[moduleName] = module; + + return module; + }; + +}()); + +define.Domain = Domain; +define.globalDomain = new Domain(); +var require = define.globalDomain.require.bind(define.globalDomain); diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/build/prefix-source-map.jsm b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/build/prefix-source-map.jsm new file mode 100644 index 00000000..ee2539d8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/build/prefix-source-map.jsm @@ -0,0 +1,20 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +/* + * WARNING! + * + * Do not edit this file directly, it is built from the sources at + * https://github.com/mozilla/source-map/ + */ + +/////////////////////////////////////////////////////////////////////////////// + + +this.EXPORTED_SYMBOLS = [ "SourceMapConsumer", "SourceMapGenerator", "SourceNode" ]; + +Components.utils.import('resource://gre/modules/devtools/Require.jsm'); diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/build/prefix-utils.jsm b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/build/prefix-utils.jsm new file mode 100644 index 00000000..80341d45 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/build/prefix-utils.jsm @@ -0,0 +1,18 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ + +/* + * WARNING! + * + * Do not edit this file directly, it is built from the sources at + * https://github.com/mozilla/source-map/ + */ + +Components.utils.import('resource://gre/modules/devtools/Require.jsm'); +Components.utils.import('resource://gre/modules/devtools/SourceMap.jsm'); + +this.EXPORTED_SYMBOLS = [ "define", "runSourceMapTests" ]; diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/build/suffix-browser.js b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/build/suffix-browser.js new file mode 100644 index 00000000..fb29ff5f --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/build/suffix-browser.js @@ -0,0 +1,8 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/////////////////////////////////////////////////////////////////////////////// + +this.sourceMap = { + SourceMapConsumer: require('source-map/source-map-consumer').SourceMapConsumer, + SourceMapGenerator: require('source-map/source-map-generator').SourceMapGenerator, + SourceNode: require('source-map/source-node').SourceNode +}; diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/build/suffix-source-map.jsm b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/build/suffix-source-map.jsm new file mode 100644 index 00000000..cf3c2d8d --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/build/suffix-source-map.jsm @@ -0,0 +1,6 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/////////////////////////////////////////////////////////////////////////////// + +this.SourceMapConsumer = require('source-map/source-map-consumer').SourceMapConsumer; +this.SourceMapGenerator = require('source-map/source-map-generator').SourceMapGenerator; +this.SourceNode = require('source-map/source-node').SourceNode; diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/build/suffix-utils.jsm b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/build/suffix-utils.jsm new file mode 100644 index 00000000..b31b84cb --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/build/suffix-utils.jsm @@ -0,0 +1,21 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +function runSourceMapTests(modName, do_throw) { + let mod = require(modName); + let assert = require('test/source-map/assert'); + let util = require('test/source-map/util'); + + assert.init(do_throw); + + for (let k in mod) { + if (/^test/.test(k)) { + mod[k](assert, util); + } + } + +} +this.runSourceMapTests = runSourceMapTests; diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/build/test-prefix.js b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/build/test-prefix.js new file mode 100644 index 00000000..1b13f300 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/build/test-prefix.js @@ -0,0 +1,8 @@ +/* + * WARNING! + * + * Do not edit this file directly, it is built from the sources at + * https://github.com/mozilla/source-map/ + */ + +Components.utils.import('resource://test/Utils.jsm'); diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/build/test-suffix.js b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/build/test-suffix.js new file mode 100644 index 00000000..bec2de3f --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/build/test-suffix.js @@ -0,0 +1,3 @@ +function run_test() { + runSourceMapTests('{THIS_MODULE}', do_throw); +} diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map.js b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map.js new file mode 100644 index 00000000..121ad241 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map.js @@ -0,0 +1,8 @@ +/* + * Copyright 2009-2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE.txt or: + * http://opensource.org/licenses/BSD-3-Clause + */ +exports.SourceMapGenerator = require('./source-map/source-map-generator').SourceMapGenerator; +exports.SourceMapConsumer = require('./source-map/source-map-consumer').SourceMapConsumer; +exports.SourceNode = require('./source-map/source-node').SourceNode; diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map/array-set.js b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map/array-set.js new file mode 100644 index 00000000..40f9a18b --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map/array-set.js @@ -0,0 +1,97 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var util = require('./util'); + + /** + * A data structure which is a combination of an array and a set. Adding a new + * member is O(1), testing for membership is O(1), and finding the index of an + * element is O(1). Removing elements from the set is not supported. Only + * strings are supported for membership. + */ + function ArraySet() { + this._array = []; + this._set = {}; + } + + /** + * Static method for creating ArraySet instances from an existing array. + */ + ArraySet.fromArray = function ArraySet_fromArray(aArray, aAllowDuplicates) { + var set = new ArraySet(); + for (var i = 0, len = aArray.length; i < len; i++) { + set.add(aArray[i], aAllowDuplicates); + } + return set; + }; + + /** + * Add the given string to this set. + * + * @param String aStr + */ + ArraySet.prototype.add = function ArraySet_add(aStr, aAllowDuplicates) { + var isDuplicate = this.has(aStr); + var idx = this._array.length; + if (!isDuplicate || aAllowDuplicates) { + this._array.push(aStr); + } + if (!isDuplicate) { + this._set[util.toSetString(aStr)] = idx; + } + }; + + /** + * Is the given string a member of this set? + * + * @param String aStr + */ + ArraySet.prototype.has = function ArraySet_has(aStr) { + return Object.prototype.hasOwnProperty.call(this._set, + util.toSetString(aStr)); + }; + + /** + * What is the index of the given string in the array? + * + * @param String aStr + */ + ArraySet.prototype.indexOf = function ArraySet_indexOf(aStr) { + if (this.has(aStr)) { + return this._set[util.toSetString(aStr)]; + } + throw new Error('"' + aStr + '" is not in the set.'); + }; + + /** + * What is the element at the given index? + * + * @param Number aIdx + */ + ArraySet.prototype.at = function ArraySet_at(aIdx) { + if (aIdx >= 0 && aIdx < this._array.length) { + return this._array[aIdx]; + } + throw new Error('No element indexed by ' + aIdx); + }; + + /** + * Returns the array representation of this set (which has the proper indices + * indicated by indexOf). Note that this is a copy of the internal array used + * for storing the members so that no one can mess with internal state. + */ + ArraySet.prototype.toArray = function ArraySet_toArray() { + return this._array.slice(); + }; + + exports.ArraySet = ArraySet; + +}); diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map/base64-vlq.js b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map/base64-vlq.js new file mode 100644 index 00000000..e22dcaee --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map/base64-vlq.js @@ -0,0 +1,142 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + * + * Based on the Base 64 VLQ implementation in Closure Compiler: + * https://code.google.com/p/closure-compiler/source/browse/trunk/src/com/google/debugging/sourcemap/Base64VLQ.java + * + * Copyright 2011 The Closure Compiler Authors. All rights reserved. + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following + * disclaimer in the documentation and/or other materials provided + * with the distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var base64 = require('./base64'); + + // A single base 64 digit can contain 6 bits of data. For the base 64 variable + // length quantities we use in the source map spec, the first bit is the sign, + // the next four bits are the actual value, and the 6th bit is the + // continuation bit. The continuation bit tells us whether there are more + // digits in this value following this digit. + // + // Continuation + // | Sign + // | | + // V V + // 101011 + + var VLQ_BASE_SHIFT = 5; + + // binary: 100000 + var VLQ_BASE = 1 << VLQ_BASE_SHIFT; + + // binary: 011111 + var VLQ_BASE_MASK = VLQ_BASE - 1; + + // binary: 100000 + var VLQ_CONTINUATION_BIT = VLQ_BASE; + + /** + * Converts from a two-complement value to a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 1 becomes 2 (10 binary), -1 becomes 3 (11 binary) + * 2 becomes 4 (100 binary), -2 becomes 5 (101 binary) + */ + function toVLQSigned(aValue) { + return aValue < 0 + ? ((-aValue) << 1) + 1 + : (aValue << 1) + 0; + } + + /** + * Converts to a two-complement value from a value where the sign bit is + * placed in the least significant bit. For example, as decimals: + * 2 (10 binary) becomes 1, 3 (11 binary) becomes -1 + * 4 (100 binary) becomes 2, 5 (101 binary) becomes -2 + */ + function fromVLQSigned(aValue) { + var isNegative = (aValue & 1) === 1; + var shifted = aValue >> 1; + return isNegative + ? -shifted + : shifted; + } + + /** + * Returns the base 64 VLQ encoded value. + */ + exports.encode = function base64VLQ_encode(aValue) { + var encoded = ""; + var digit; + + var vlq = toVLQSigned(aValue); + + do { + digit = vlq & VLQ_BASE_MASK; + vlq >>>= VLQ_BASE_SHIFT; + if (vlq > 0) { + // There are still more digits in this value, so we must make sure the + // continuation bit is marked. + digit |= VLQ_CONTINUATION_BIT; + } + encoded += base64.encode(digit); + } while (vlq > 0); + + return encoded; + }; + + /** + * Decodes the next base 64 VLQ value from the given string and returns the + * value and the rest of the string via the out parameter. + */ + exports.decode = function base64VLQ_decode(aStr, aOutParam) { + var i = 0; + var strLen = aStr.length; + var result = 0; + var shift = 0; + var continuation, digit; + + do { + if (i >= strLen) { + throw new Error("Expected more digits in base 64 VLQ value."); + } + digit = base64.decode(aStr.charAt(i++)); + continuation = !!(digit & VLQ_CONTINUATION_BIT); + digit &= VLQ_BASE_MASK; + result = result + (digit << shift); + shift += VLQ_BASE_SHIFT; + } while (continuation); + + aOutParam.value = fromVLQSigned(result); + aOutParam.rest = aStr.slice(i); + }; + +}); diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map/base64.js b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map/base64.js new file mode 100644 index 00000000..863cc465 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map/base64.js @@ -0,0 +1,42 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var charToIntMap = {}; + var intToCharMap = {}; + + 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' + .split('') + .forEach(function (ch, index) { + charToIntMap[ch] = index; + intToCharMap[index] = ch; + }); + + /** + * Encode an integer in the range of 0 to 63 to a single base 64 digit. + */ + exports.encode = function base64_encode(aNumber) { + if (aNumber in intToCharMap) { + return intToCharMap[aNumber]; + } + throw new TypeError("Must be between 0 and 63: " + aNumber); + }; + + /** + * Decode a single base 64 digit to an integer. + */ + exports.decode = function base64_decode(aChar) { + if (aChar in charToIntMap) { + return charToIntMap[aChar]; + } + throw new TypeError("Not a valid base 64 digit: " + aChar); + }; + +}); diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map/basic-source-map-consumer.js b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map/basic-source-map-consumer.js new file mode 100644 index 00000000..f2dfb3e8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map/basic-source-map-consumer.js @@ -0,0 +1,420 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var util = require('./util'); + var binarySearch = require('./binary-search'); + var ArraySet = require('./array-set').ArraySet; + var base64VLQ = require('./base64-vlq'); + var SourceMapConsumer = require('./source-map-consumer').SourceMapConsumer; + + /** + * A BasicSourceMapConsumer instance represents a parsed source map which we can + * query for information about the original file positions by giving it a file + * position in the generated source. + * + * The only parameter is the raw source map (either as a JSON string, or + * already parsed to an object). According to the spec, source maps have the + * following attributes: + * + * - version: Which version of the source map spec this map is following. + * - sources: An array of URLs to the original source files. + * - names: An array of identifiers which can be referrenced by individual mappings. + * - sourceRoot: Optional. The URL root from which all sources are relative. + * - sourcesContent: Optional. An array of contents of the original source files. + * - mappings: A string of base64 VLQs which contain the actual mappings. + * - file: Optional. The generated file this source map is associated with. + * + * Here is an example source map, taken from the source map spec[0]: + * + * { + * version : 3, + * file: "out.js", + * sourceRoot : "", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AA,AB;;ABCDE;" + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit?pli=1# + */ + function BasicSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sources = util.getArg(sourceMap, 'sources'); + // Sass 3.3 leaves out the 'names' array, so we deviate from the spec (which + // requires the array) to play nice here. + var names = util.getArg(sourceMap, 'names', []); + var sourceRoot = util.getArg(sourceMap, 'sourceRoot', null); + var sourcesContent = util.getArg(sourceMap, 'sourcesContent', null); + var mappings = util.getArg(sourceMap, 'mappings'); + var file = util.getArg(sourceMap, 'file', null); + + // Once again, Sass deviates from the spec and supplies the version as a + // string rather than a number, so we use loose equality checking here. + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + // Some source maps produce relative source paths like "./foo.js" instead of + // "foo.js". Normalize these first so that future comparisons will succeed. + // See bugzil.la/1090768. + sources = sources.map(util.normalize); + + // Pass `true` below to allow duplicate names and sources. While source maps + // are intended to be compressed and deduplicated, the TypeScript compiler + // sometimes generates source maps with duplicates in them. See Github issue + // #72 and bugzil.la/889492. + this._names = ArraySet.fromArray(names, true); + this._sources = ArraySet.fromArray(sources, true); + + this.sourceRoot = sourceRoot; + this.sourcesContent = sourcesContent; + this._mappings = mappings; + this.file = file; + } + + BasicSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + BasicSourceMapConsumer.prototype.consumer = SourceMapConsumer; + + /** + * Create a BasicSourceMapConsumer from a SourceMapGenerator. + * + * @param SourceMapGenerator aSourceMap + * The source map that will be consumed. + * @returns BasicSourceMapConsumer + */ + BasicSourceMapConsumer.fromSourceMap = + function SourceMapConsumer_fromSourceMap(aSourceMap) { + var smc = Object.create(BasicSourceMapConsumer.prototype); + + smc._names = ArraySet.fromArray(aSourceMap._names.toArray(), true); + smc._sources = ArraySet.fromArray(aSourceMap._sources.toArray(), true); + smc.sourceRoot = aSourceMap._sourceRoot; + smc.sourcesContent = aSourceMap._generateSourcesContent(smc._sources.toArray(), + smc.sourceRoot); + smc.file = aSourceMap._file; + + smc.__generatedMappings = aSourceMap._mappings.toArray().slice(); + smc.__originalMappings = aSourceMap._mappings.toArray().slice() + .sort(util.compareByOriginalPositions); + + return smc; + }; + + /** + * The version of the source mapping spec that we are consuming. + */ + BasicSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(BasicSourceMapConsumer.prototype, 'sources', { + get: function () { + return this._sources.toArray().map(function (s) { + return this.sourceRoot != null ? util.join(this.sourceRoot, s) : s; + }, this); + } + }); + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + BasicSourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + var generatedLine = 1; + var previousGeneratedColumn = 0; + var previousOriginalLine = 0; + var previousOriginalColumn = 0; + var previousSource = 0; + var previousName = 0; + var str = aStr; + var temp = {}; + var mapping; + + while (str.length > 0) { + if (str.charAt(0) === ';') { + generatedLine++; + str = str.slice(1); + previousGeneratedColumn = 0; + } + else if (str.charAt(0) === ',') { + str = str.slice(1); + } + else { + mapping = {}; + mapping.generatedLine = generatedLine; + + // Generated column. + base64VLQ.decode(str, temp); + mapping.generatedColumn = previousGeneratedColumn + temp.value; + previousGeneratedColumn = mapping.generatedColumn; + str = temp.rest; + + if (str.length > 0 && !this._nextCharIsMappingSeparator(str)) { + // Original source. + base64VLQ.decode(str, temp); + mapping.source = this._sources.at(previousSource + temp.value); + previousSource += temp.value; + str = temp.rest; + if (str.length === 0 || this._nextCharIsMappingSeparator(str)) { + throw new Error('Found a source, but no line and column'); + } + + // Original line. + base64VLQ.decode(str, temp); + mapping.originalLine = previousOriginalLine + temp.value; + previousOriginalLine = mapping.originalLine; + // Lines are stored 0-based + mapping.originalLine += 1; + str = temp.rest; + if (str.length === 0 || this._nextCharIsMappingSeparator(str)) { + throw new Error('Found a source and line, but no column'); + } + + // Original column. + base64VLQ.decode(str, temp); + mapping.originalColumn = previousOriginalColumn + temp.value; + previousOriginalColumn = mapping.originalColumn; + str = temp.rest; + + if (str.length > 0 && !this._nextCharIsMappingSeparator(str)) { + // Original name. + base64VLQ.decode(str, temp); + mapping.name = this._names.at(previousName + temp.value); + previousName += temp.value; + str = temp.rest; + } + } + + this.__generatedMappings.push(mapping); + if (typeof mapping.originalLine === 'number') { + this.__originalMappings.push(mapping); + } + } + } + + this.__generatedMappings.sort(util.compareByGeneratedPositions); + this.__originalMappings.sort(util.compareByOriginalPositions); + }; + + /** + * Find the mapping that best matches the hypothetical "needle" mapping that + * we are searching for in the given "haystack" of mappings. + */ + BasicSourceMapConsumer.prototype._findMapping = + function SourceMapConsumer_findMapping(aNeedle, aMappings, aLineName, + aColumnName, aComparator) { + // To return the position we are searching for, we must first find the + // mapping for the given position and then return the opposite position it + // points to. Because the mappings are sorted, we can use binary search to + // find the best mapping. + + if (aNeedle[aLineName] <= 0) { + throw new TypeError('Line must be greater than or equal to 1, got ' + + aNeedle[aLineName]); + } + if (aNeedle[aColumnName] < 0) { + throw new TypeError('Column must be greater than or equal to 0, got ' + + aNeedle[aColumnName]); + } + + return binarySearch.search(aNeedle, aMappings, aComparator); + }; + + /** + * Compute the last column for each generated mapping. The last column is + * inclusive. + */ + BasicSourceMapConsumer.prototype.computeColumnSpans = + function SourceMapConsumer_computeColumnSpans() { + for (var index = 0; index < this._generatedMappings.length; ++index) { + var mapping = this._generatedMappings[index]; + + // Mappings do not contain a field for the last generated columnt. We + // can come up with an optimistic estimate, however, by assuming that + // mappings are contiguous (i.e. given two consecutive mappings, the + // first mapping ends where the second one starts). + if (index + 1 < this._generatedMappings.length) { + var nextMapping = this._generatedMappings[index + 1]; + + if (mapping.generatedLine === nextMapping.generatedLine) { + mapping.lastGeneratedColumn = nextMapping.generatedColumn - 1; + continue; + } + } + + // The last mapping for each line spans the entire line. + mapping.lastGeneratedColumn = Infinity; + } + }; + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + BasicSourceMapConsumer.prototype.originalPositionFor = + function SourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + var index = this._findMapping(needle, + this._generatedMappings, + "generatedLine", + "generatedColumn", + util.compareByGeneratedPositions); + + if (index >= 0) { + var mapping = this._generatedMappings[index]; + + if (mapping.generatedLine === needle.generatedLine) { + var source = util.getArg(mapping, 'source', null); + if (source != null && this.sourceRoot != null) { + source = util.join(this.sourceRoot, source); + } + return { + source: source, + line: util.getArg(mapping, 'originalLine', null), + column: util.getArg(mapping, 'originalColumn', null), + name: util.getArg(mapping, 'name', null) + }; + } + } + + return { + source: null, + line: null, + column: null, + name: null + }; + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * availible. + */ + BasicSourceMapConsumer.prototype.sourceContentFor = + function SourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + if (!this.sourcesContent) { + return null; + } + + if (this.sourceRoot != null) { + aSource = util.relative(this.sourceRoot, aSource); + } + + if (this._sources.has(aSource)) { + return this.sourcesContent[this._sources.indexOf(aSource)]; + } + + var url; + if (this.sourceRoot != null + && (url = util.urlParse(this.sourceRoot))) { + // XXX: file:// URIs and absolute paths lead to unexpected behavior for + // many users. We can help them out when they expect file:// URIs to + // behave like it would if they were running a local HTTP server. See + // https://bugzilla.mozilla.org/show_bug.cgi?id=885597. + var fileUriAbsPath = aSource.replace(/^file:\/\//, ""); + if (url.scheme == "file" + && this._sources.has(fileUriAbsPath)) { + return this.sourcesContent[this._sources.indexOf(fileUriAbsPath)] + } + + if ((!url.path || url.path == "/") + && this._sources.has("/" + aSource)) { + return this.sourcesContent[this._sources.indexOf("/" + aSource)]; + } + } + + // This function is used recursively from + // IndexedSourceMapConsumer.prototype.sourceContentFor. In that case, we + // don't want to throw if we can't find the source - we just want to + // return null, so we provide a flag to exit gracefully. + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + BasicSourceMapConsumer.prototype.generatedPositionFor = + function SourceMapConsumer_generatedPositionFor(aArgs) { + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: util.getArg(aArgs, 'line'), + originalColumn: util.getArg(aArgs, 'column') + }; + + if (this.sourceRoot != null) { + needle.source = util.relative(this.sourceRoot, needle.source); + } + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions); + + if (index >= 0) { + var mapping = this._originalMappings[index]; + + return { + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }; + } + + return { + line: null, + column: null, + lastColumn: null + }; + }; + + exports.BasicSourceMapConsumer = BasicSourceMapConsumer; + +}); diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map/binary-search.js b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map/binary-search.js new file mode 100644 index 00000000..f8270291 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map/binary-search.js @@ -0,0 +1,100 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + /** + * Recursive implementation of binary search. + * + * @param aLow Indices here and lower do not contain the needle. + * @param aHigh Indices here and higher do not contain the needle. + * @param aNeedle The element being searched for. + * @param aHaystack The non-empty array being searched. + * @param aCompare Function which takes two elements and returns -1, 0, or 1. + * @param aBias Either 'binarySearch.LEAST_UPPER_BOUND' or + * 'binarySearch.GREATEST_LOWER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the element we are + * searching for if the exact element cannot be found. + */ + function recursiveSearch(aLow, aHigh, aNeedle, aHaystack, aCompare, aBias) { + // This function terminates when one of the following is true: + // + // 1. We find the exact element we are looking for. + // + // 2. We did not find the exact element, but we can return the index of + // the next closest element. + // + // 3. We did not find the exact element, and there is no next-closest + // element than the one we are searching for, so we return -1. + var mid = Math.floor((aHigh - aLow) / 2) + aLow; + var cmp = aCompare(aNeedle, aHaystack[mid], true); + if (cmp === 0) { + // Found the element we are looking for. + return mid; + } + else if (cmp > 0) { + // Our needle is greater than aHaystack[mid]. + if (aHigh - mid > 1) { + // The element is in the upper half. + return recursiveSearch(mid, aHigh, aNeedle, aHaystack, aCompare, aBias); + } + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return aHigh < aHaystack.length ? aHigh : -1; + } else { + return mid; + } + } + else { + // Our needle is less than aHaystack[mid]. + if (mid - aLow > 1) { + // The element is in the lower half. + return recursiveSearch(aLow, mid, aNeedle, aHaystack, aCompare, aBias); + } + // The exact needle element was not found in this haystack. Determine if + // we are in termination case (3) or (2) and return the appropriate thing. + if (aBias == exports.LEAST_UPPER_BOUND) { + return mid; + } else { + return aLow < 0 ? -1 : aLow; + } + } + } + + exports.LEAST_UPPER_BOUND = 1; + exports.GREATEST_LOWER_BOUND = 2; + + /** + * This is an implementation of binary search which will always try and return + * the index of next highest value checked if there is no exact hit. This is + * because mappings between original and generated line/col pairs are single + * points, and there is an implicit region between each of them, so a miss + * just means that you aren't on the very start of a region. + * + * @param aNeedle The element you are looking for. + * @param aHaystack The array that is being searched. + * @param aCompare A function which takes the needle and an element in the + * array and returns -1, 0, or 1 depending on whether the needle is less + * than, equal to, or greater than the element, respectively. + * @param aBias Either 'exports.LEAST_UPPER_BOUND' or + * 'exports.GREATEST_LOWER_BOUND'. Specifies whether to return the + * closest element that is smaller than or greater than the element we are + * searching for if the exact element cannot be found. Defaults to + * 'exports.LEAST_UPPER_BOUND'. + */ + exports.search = function search(aNeedle, aHaystack, aCompare, aBias) { + var aBias = aBias || exports.LEAST_UPPER_BOUND; + + if (aHaystack.length === 0) { + return -1; + } + return recursiveSearch(-1, aHaystack.length, aNeedle, aHaystack, aCompare, aBias) + }; + +}); diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map/indexed-source-map-consumer.js b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map/indexed-source-map-consumer.js new file mode 100644 index 00000000..d44e8fa4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map/indexed-source-map-consumer.js @@ -0,0 +1,303 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var util = require('./util'); + var binarySearch = require('./binary-search'); + var SourceMapConsumer = require('./source-map-consumer').SourceMapConsumer; + var BasicSourceMapConsumer = require('./basic-source-map-consumer').BasicSourceMapConsumer; + + /** + * An IndexedSourceMapConsumer instance represents a parsed source map which + * we can query for information. It differs from BasicSourceMapConsumer in + * that it takes "indexed" source maps (i.e. ones with a "sections" field) as + * input. + * + * The only parameter is a raw source map (either as a JSON string, or already + * parsed to an object). According to the spec for indexed source maps, they + * have the following attributes: + * + * - version: Which version of the source map spec this map is following. + * - file: Optional. The generated file this source map is associated with. + * - sections: A list of section definitions. + * + * Each value under the "sections" field has two fields: + * - offset: The offset into the original specified at which this section + * begins to apply, defined as an object with a "line" and "column" + * field. + * - map: A source map definition. This source map could also be indexed, + * but doesn't have to be. + * + * Instead of the "map" field, it's also possible to have a "url" field + * specifying a URL to retrieve a source map from, but that's currently + * unsupported. + * + * Here's an example source map, taken from the source map spec[0], but + * modified to omit a section which uses the "url" field. + * + * { + * version : 3, + * file: "app.js", + * sections: [{ + * offset: {line:100, column:10}, + * map: { + * version : 3, + * file: "section.js", + * sources: ["foo.js", "bar.js"], + * names: ["src", "maps", "are", "fun"], + * mappings: "AAAA,E;;ABCDE;" + * } + * }], + * } + * + * [0]: https://docs.google.com/document/d/1U1RGAehQwRypUTovF1KRlpiOFze0b-_2gc6fAH0KY0k/edit#heading=h.535es3xeprgt + */ + function IndexedSourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + var version = util.getArg(sourceMap, 'version'); + var sections = util.getArg(sourceMap, 'sections'); + + if (version != this._version) { + throw new Error('Unsupported version: ' + version); + } + + var lastOffset = { + line: -1, + column: 0 + }; + this._sections = sections.map(function (s) { + if (s.url) { + // The url field will require support for asynchronicity. + // See https://github.com/mozilla/source-map/issues/16 + throw new Error('Support for url field in sections not implemented.'); + } + var offset = util.getArg(s, 'offset'); + var offsetLine = util.getArg(offset, 'line'); + var offsetColumn = util.getArg(offset, 'column'); + + if (offsetLine < lastOffset.line || + (offsetLine === lastOffset.line && offsetColumn < lastOffset.column)) { + throw new Error('Section offsets must be ordered and non-overlapping.'); + } + lastOffset = offset; + + return { + generatedOffset: { + // The offset fields are 0-based, but we use 1-based indices when + // encoding/decoding from VLQ. + generatedLine: offsetLine + 1, + generatedColumn: offsetColumn + 1 + }, + consumer: new SourceMapConsumer(util.getArg(s, 'map')) + } + }); + } + + IndexedSourceMapConsumer.prototype = Object.create(SourceMapConsumer.prototype); + IndexedSourceMapConsumer.prototype.constructor = SourceMapConsumer; + + /** + * The version of the source mapping spec that we are consuming. + */ + IndexedSourceMapConsumer.prototype._version = 3; + + /** + * The list of original sources. + */ + Object.defineProperty(IndexedSourceMapConsumer.prototype, 'sources', { + get: function () { + var sources = []; + for (var i = 0; i < this._sections.length; i++) { + for (var j = 0; j < this._sections[i].consumer.sources.length; j++) { + sources.push(this._sections[i].consumer.sources[j]); + } + }; + return sources; + } + }); + + /** + * Returns the original source, line, and column information for the generated + * source's line and column positions provided. The only argument is an object + * with the following properties: + * + * - line: The line number in the generated source. + * - column: The column number in the generated source. + * + * and an object is returned with the following properties: + * + * - source: The original source file, or null. + * - line: The line number in the original source, or null. + * - column: The column number in the original source, or null. + * - name: The original identifier, or null. + */ + IndexedSourceMapConsumer.prototype.originalPositionFor = + function IndexedSourceMapConsumer_originalPositionFor(aArgs) { + var needle = { + generatedLine: util.getArg(aArgs, 'line'), + generatedColumn: util.getArg(aArgs, 'column') + }; + + // Find the section containing the generated position we're trying to map + // to an original position. + var sectionIndex = binarySearch.search(needle, this._sections, + function(needle, section) { + var cmp = needle.generatedLine - section.generatedOffset.generatedLine; + if (cmp) { + return cmp; + } + + return (needle.generatedColumn - + section.generatedOffset.generatedColumn); + }, binarySearch.GREATEST_LOWER_BOUND); + var section = this._sections[sectionIndex]; + + if (!section) { + return { + source: null, + line: null, + column: null, + name: null + }; + } + + return section.consumer.originalPositionFor({ + line: needle.generatedLine - + (section.generatedOffset.generatedLine - 1), + column: needle.generatedColumn - + (section.generatedOffset.generatedLine === needle.generatedLine + ? section.generatedOffset.generatedColumn - 1 + : 0) + }); + }; + + /** + * Returns the original source content. The only argument is the url of the + * original source file. Returns null if no original source content is + * available. + */ + IndexedSourceMapConsumer.prototype.sourceContentFor = + function IndexedSourceMapConsumer_sourceContentFor(aSource, nullOnMissing) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + var content = section.consumer.sourceContentFor(aSource, true); + if (content) { + return content; + } + } + if (nullOnMissing) { + return null; + } + else { + throw new Error('"' + aSource + '" is not in the SourceMap.'); + } + }; + + /** + * Returns the generated line and column information for the original source, + * line, and column positions provided. The only argument is an object with + * the following properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * - column: The column number in the original source. + * + * and an object is returned with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + IndexedSourceMapConsumer.prototype.generatedPositionFor = + function IndexedSourceMapConsumer_generatedPositionFor(aArgs) { + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + + // Only consider this section if the requested source is in the list of + // sources of the consumer. + if (section.consumer.sources.indexOf(util.getArg(aArgs, 'source')) === -1) { + continue; + } + var generatedPosition = section.consumer.generatedPositionFor(aArgs); + if (generatedPosition) { + var ret = { + line: generatedPosition.line + + (section.generatedOffset.generatedLine - 1), + column: generatedPosition.column + + (section.generatedOffset.generatedLine === generatedPosition.line + ? section.generatedOffset.generatedColumn - 1 + : 0) + }; + return ret; + } + } + + return { + line: null, + column: null + }; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + IndexedSourceMapConsumer.prototype._parseMappings = + function IndexedSourceMapConsumer_parseMappings(aStr, aSourceRoot) { + this.__generatedMappings = []; + this.__originalMappings = []; + for (var i = 0; i < this._sections.length; i++) { + var section = this._sections[i]; + var sectionMappings = section.consumer._generatedMappings; + for (var j = 0; j < sectionMappings.length; j++) { + var mapping = sectionMappings[i]; + + var source = mapping.source; + var sourceRoot = section.consumer.sourceRoot; + + if (source != null && sourceRoot != null) { + source = util.join(sourceRoot, source); + } + + // The mappings coming from the consumer for the section have + // generated positions relative to the start of the section, so we + // need to offset them to be relative to the start of the concatenated + // generated file. + var adjustedMapping = { + source: source, + generatedLine: mapping.generatedLine + + (section.generatedOffset.generatedLine - 1), + generatedColumn: mapping.column + + (section.generatedOffset.generatedLine === mapping.generatedLine) + ? section.generatedOffset.generatedColumn - 1 + : 0, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name + }; + + this.__generatedMappings.push(adjustedMapping); + if (typeof adjustedMapping.originalLine === 'number') { + this.__originalMappings.push(adjustedMapping); + } + }; + }; + + this.__generatedMappings.sort(util.compareByGeneratedPositions); + this.__originalMappings.sort(util.compareByOriginalPositions); + }; + + exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer; +}); diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map/mapping-list.js b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map/mapping-list.js new file mode 100644 index 00000000..2a4eb618 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map/mapping-list.js @@ -0,0 +1,86 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var util = require('./util'); + + /** + * Determine whether mappingB is after mappingA with respect to generated + * position. + */ + function generatedPositionAfter(mappingA, mappingB) { + // Optimized for most common case + var lineA = mappingA.generatedLine; + var lineB = mappingB.generatedLine; + var columnA = mappingA.generatedColumn; + var columnB = mappingB.generatedColumn; + return lineB > lineA || lineB == lineA && columnB >= columnA || + util.compareByGeneratedPositions(mappingA, mappingB) <= 0; + } + + /** + * A data structure to provide a sorted view of accumulated mappings in a + * performance conscious manner. It trades a neglibable overhead in general + * case for a large speedup in case of mappings being added in order. + */ + function MappingList() { + this._array = []; + this._sorted = true; + // Serves as infimum + this._last = {generatedLine: -1, generatedColumn: 0}; + } + + /** + * Iterate through internal items. This method takes the same arguments that + * `Array.prototype.forEach` takes. + * + * NOTE: The order of the mappings is NOT guaranteed. + */ + MappingList.prototype.unsortedForEach = + function MappingList_forEach(aCallback, aThisArg) { + this._array.forEach(aCallback, aThisArg); + }; + + /** + * Add the given source mapping. + * + * @param Object aMapping + */ + MappingList.prototype.add = function MappingList_add(aMapping) { + var mapping; + if (generatedPositionAfter(this._last, aMapping)) { + this._last = aMapping; + this._array.push(aMapping); + } else { + this._sorted = false; + this._array.push(aMapping); + } + }; + + /** + * Returns the flat, sorted array of mappings. The mappings are sorted by + * generated position. + * + * WARNING: This method returns internal data without copying, for + * performance. The return value must NOT be mutated, and should be treated as + * an immutable borrow. If you want to take ownership, you must make your own + * copy. + */ + MappingList.prototype.toArray = function MappingList_toArray() { + if (!this._sorted) { + this._array.sort(util.compareByGeneratedPositions); + this._sorted = true; + } + return this._array; + }; + + exports.MappingList = MappingList; + +}); diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map/source-map-consumer.js b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map/source-map-consumer.js new file mode 100644 index 00000000..df3c21c7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map/source-map-consumer.js @@ -0,0 +1,224 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var util = require('./util'); + + function SourceMapConsumer(aSourceMap) { + var sourceMap = aSourceMap; + if (typeof aSourceMap === 'string') { + sourceMap = JSON.parse(aSourceMap.replace(/^\)\]\}'/, '')); + } + + // We do late requires because the subclasses require() this file. + if (sourceMap.sections != null) { + var indexedSourceMapConsumer = require('./indexed-source-map-consumer'); + return new indexedSourceMapConsumer.IndexedSourceMapConsumer(sourceMap); + } else { + var basicSourceMapConsumer = require('./basic-source-map-consumer'); + return new basicSourceMapConsumer.BasicSourceMapConsumer(sourceMap); + } + } + + SourceMapConsumer.fromSourceMap = function(aSourceMap) { + var basicSourceMapConsumer = require('./basic-source-map-consumer'); + return basicSourceMapConsumer.BasicSourceMapConsumer + .fromSourceMap(aSourceMap); + } + + /** + * The version of the source mapping spec that we are consuming. + */ + SourceMapConsumer.prototype._version = 3; + + + // `__generatedMappings` and `__originalMappings` are arrays that hold the + // parsed mapping coordinates from the source map's "mappings" attribute. They + // are lazily instantiated, accessed via the `_generatedMappings` and + // `_originalMappings` getters respectively, and we only parse the mappings + // and create these arrays once queried for a source location. We jump through + // these hoops because there can be many thousands of mappings, and parsing + // them is expensive, so we only want to do it if we must. + // + // Each object in the arrays is of the form: + // + // { + // generatedLine: The line number in the generated code, + // generatedColumn: The column number in the generated code, + // source: The path to the original source file that generated this + // chunk of code, + // originalLine: The line number in the original source that + // corresponds to this chunk of generated code, + // originalColumn: The column number in the original source that + // corresponds to this chunk of generated code, + // name: The name of the original symbol which generated this chunk of + // code. + // } + // + // All properties except for `generatedLine` and `generatedColumn` can be + // `null`. + // + // `_generatedMappings` is ordered by the generated positions. + // + // `_originalMappings` is ordered by the original positions. + + SourceMapConsumer.prototype.__generatedMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_generatedMappings', { + get: function () { + if (!this.__generatedMappings) { + this.__generatedMappings = []; + this.__originalMappings = []; + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__generatedMappings; + } + }); + + SourceMapConsumer.prototype.__originalMappings = null; + Object.defineProperty(SourceMapConsumer.prototype, '_originalMappings', { + get: function () { + if (!this.__originalMappings) { + this.__generatedMappings = []; + this.__originalMappings = []; + this._parseMappings(this._mappings, this.sourceRoot); + } + + return this.__originalMappings; + } + }); + + SourceMapConsumer.prototype._nextCharIsMappingSeparator = + function SourceMapConsumer_nextCharIsMappingSeparator(aStr) { + var c = aStr.charAt(0); + return c === ";" || c === ","; + }; + + /** + * Parse the mappings in a string in to a data structure which we can easily + * query (the ordered arrays in the `this.__generatedMappings` and + * `this.__originalMappings` properties). + */ + SourceMapConsumer.prototype._parseMappings = + function SourceMapConsumer_parseMappings(aStr, aSourceRoot) { + throw new Error("Subclasses must implement _parseMappings"); + }; + + SourceMapConsumer.GENERATED_ORDER = 1; + SourceMapConsumer.ORIGINAL_ORDER = 2; + + SourceMapConsumer.LEAST_UPPER_BOUND = 1; + SourceMapConsumer.GREATEST_LOWER_BOUND = 2; + + /** + * Iterate over each mapping between an original source/line/column and a + * generated line/column in this source map. + * + * @param Function aCallback + * The function that is called with each mapping. + * @param Object aContext + * Optional. If specified, this object will be the value of `this` every + * time that `aCallback` is called. + * @param aOrder + * Either `SourceMapConsumer.GENERATED_ORDER` or + * `SourceMapConsumer.ORIGINAL_ORDER`. Specifies whether you want to + * iterate over the mappings sorted by the generated file's line/column + * order or the original's source/line/column order, respectively. Defaults to + * `SourceMapConsumer.GENERATED_ORDER`. + */ + SourceMapConsumer.prototype.eachMapping = + function SourceMapConsumer_eachMapping(aCallback, aContext, aOrder) { + var context = aContext || null; + var order = aOrder || SourceMapConsumer.GENERATED_ORDER; + + var mappings; + switch (order) { + case SourceMapConsumer.GENERATED_ORDER: + mappings = this._generatedMappings; + break; + case SourceMapConsumer.ORIGINAL_ORDER: + mappings = this._originalMappings; + break; + default: + throw new Error("Unknown order of iteration."); + } + + var sourceRoot = this.sourceRoot; + mappings.map(function (mapping) { + var source = mapping.source; + if (source != null && sourceRoot != null) { + source = util.join(sourceRoot, source); + } + return { + source: source, + generatedLine: mapping.generatedLine, + generatedColumn: mapping.generatedColumn, + originalLine: mapping.originalLine, + originalColumn: mapping.originalColumn, + name: mapping.name + }; + }).forEach(aCallback, context); + }; + + /** + * Returns all generated line and column information for the original source + * and line provided. The only argument is an object with the following + * properties: + * + * - source: The filename of the original source. + * - line: The line number in the original source. + * + * and an array of objects is returned, each with the following properties: + * + * - line: The line number in the generated source, or null. + * - column: The column number in the generated source, or null. + */ + SourceMapConsumer.prototype.allGeneratedPositionsFor = + function SourceMapConsumer_allGeneratedPositionsFor(aArgs) { + var needle = { + source: util.getArg(aArgs, 'source'), + originalLine: util.getArg(aArgs, 'line'), + originalColumn: 0 + }; + + if (this.sourceRoot != null) { + needle.source = util.relative(this.sourceRoot, needle.source); + } + + var mappings = []; + + var index = this._findMapping(needle, + this._originalMappings, + "originalLine", + "originalColumn", + util.compareByOriginalPositions); + if (index >= 0) { + var mapping = this._originalMappings[index]; + + // Iterate until either we run out of mappings, or we run into + // a mapping for a different line. Since mappings are sorted, this is + // guaranteed to find all mappings for the line we are interested in. + while (mapping && mapping.originalLine === needle.originalLine) { + mappings.push({ + line: util.getArg(mapping, 'generatedLine', null), + column: util.getArg(mapping, 'generatedColumn', null), + lastColumn: util.getArg(mapping, 'lastGeneratedColumn', null) + }); + + mapping = this._originalMappings[++index]; + } + } + + return mappings; + }; + + exports.SourceMapConsumer = SourceMapConsumer; + +}); diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map/source-map-generator.js b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map/source-map-generator.js new file mode 100644 index 00000000..ef2e7f77 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map/source-map-generator.js @@ -0,0 +1,400 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var base64VLQ = require('./base64-vlq'); + var util = require('./util'); + var ArraySet = require('./array-set').ArraySet; + var MappingList = require('./mapping-list').MappingList; + + /** + * An instance of the SourceMapGenerator represents a source map which is + * being built incrementally. You may pass an object with the following + * properties: + * + * - file: The filename of the generated source. + * - sourceRoot: A root for all relative URLs in this source map. + */ + function SourceMapGenerator(aArgs) { + if (!aArgs) { + aArgs = {}; + } + this._file = util.getArg(aArgs, 'file', null); + this._sourceRoot = util.getArg(aArgs, 'sourceRoot', null); + this._skipValidation = util.getArg(aArgs, 'skipValidation', false); + this._sources = new ArraySet(); + this._names = new ArraySet(); + this._mappings = new MappingList(); + this._sourcesContents = null; + } + + SourceMapGenerator.prototype._version = 3; + + /** + * Creates a new SourceMapGenerator based on a SourceMapConsumer + * + * @param aSourceMapConsumer The SourceMap. + */ + SourceMapGenerator.fromSourceMap = + function SourceMapGenerator_fromSourceMap(aSourceMapConsumer) { + var sourceRoot = aSourceMapConsumer.sourceRoot; + var generator = new SourceMapGenerator({ + file: aSourceMapConsumer.file, + sourceRoot: sourceRoot + }); + aSourceMapConsumer.eachMapping(function (mapping) { + var newMapping = { + generated: { + line: mapping.generatedLine, + column: mapping.generatedColumn + } + }; + + if (mapping.source != null) { + newMapping.source = mapping.source; + if (sourceRoot != null) { + newMapping.source = util.relative(sourceRoot, newMapping.source); + } + + newMapping.original = { + line: mapping.originalLine, + column: mapping.originalColumn + }; + + if (mapping.name != null) { + newMapping.name = mapping.name; + } + } + + generator.addMapping(newMapping); + }); + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + generator.setSourceContent(sourceFile, content); + } + }); + return generator; + }; + + /** + * Add a single mapping from original source line and column to the generated + * source's line and column for this source map being created. The mapping + * object should have the following properties: + * + * - generated: An object with the generated line and column positions. + * - original: An object with the original line and column positions. + * - source: The original source file (relative to the sourceRoot). + * - name: An optional original token name for this mapping. + */ + SourceMapGenerator.prototype.addMapping = + function SourceMapGenerator_addMapping(aArgs) { + var generated = util.getArg(aArgs, 'generated'); + var original = util.getArg(aArgs, 'original', null); + var source = util.getArg(aArgs, 'source', null); + var name = util.getArg(aArgs, 'name', null); + + if (!this._skipValidation) { + this._validateMapping(generated, original, source, name); + } + + if (source != null && !this._sources.has(source)) { + this._sources.add(source); + } + + if (name != null && !this._names.has(name)) { + this._names.add(name); + } + + this._mappings.add({ + generatedLine: generated.line, + generatedColumn: generated.column, + originalLine: original != null && original.line, + originalColumn: original != null && original.column, + source: source, + name: name + }); + }; + + /** + * Set the source content for a source file. + */ + SourceMapGenerator.prototype.setSourceContent = + function SourceMapGenerator_setSourceContent(aSourceFile, aSourceContent) { + var source = aSourceFile; + if (this._sourceRoot != null) { + source = util.relative(this._sourceRoot, source); + } + + if (aSourceContent != null) { + // Add the source content to the _sourcesContents map. + // Create a new _sourcesContents map if the property is null. + if (!this._sourcesContents) { + this._sourcesContents = {}; + } + this._sourcesContents[util.toSetString(source)] = aSourceContent; + } else if (this._sourcesContents) { + // Remove the source file from the _sourcesContents map. + // If the _sourcesContents map is empty, set the property to null. + delete this._sourcesContents[util.toSetString(source)]; + if (Object.keys(this._sourcesContents).length === 0) { + this._sourcesContents = null; + } + } + }; + + /** + * Applies the mappings of a sub-source-map for a specific source file to the + * source map being generated. Each mapping to the supplied source file is + * rewritten using the supplied source map. Note: The resolution for the + * resulting mappings is the minimium of this map and the supplied map. + * + * @param aSourceMapConsumer The source map to be applied. + * @param aSourceFile Optional. The filename of the source file. + * If omitted, SourceMapConsumer's file property will be used. + * @param aSourceMapPath Optional. The dirname of the path to the source map + * to be applied. If relative, it is relative to the SourceMapConsumer. + * This parameter is needed when the two source maps aren't in the same + * directory, and the source map to be applied contains relative source + * paths. If so, those relative source paths need to be rewritten + * relative to the SourceMapGenerator. + */ + SourceMapGenerator.prototype.applySourceMap = + function SourceMapGenerator_applySourceMap(aSourceMapConsumer, aSourceFile, aSourceMapPath) { + var sourceFile = aSourceFile; + // If aSourceFile is omitted, we will use the file property of the SourceMap + if (aSourceFile == null) { + if (aSourceMapConsumer.file == null) { + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, ' + + 'or the source map\'s "file" property. Both were omitted.' + ); + } + sourceFile = aSourceMapConsumer.file; + } + var sourceRoot = this._sourceRoot; + // Make "sourceFile" relative if an absolute Url is passed. + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + // Applying the SourceMap can add and remove items from the sources and + // the names array. + var newSources = new ArraySet(); + var newNames = new ArraySet(); + + // Find mappings for the "sourceFile" + this._mappings.unsortedForEach(function (mapping) { + if (mapping.source === sourceFile && mapping.originalLine != null) { + // Check if it can be mapped by the source map, then update the mapping. + var original = aSourceMapConsumer.originalPositionFor({ + line: mapping.originalLine, + column: mapping.originalColumn + }); + if (original.source != null) { + // Copy mapping + mapping.source = original.source; + if (aSourceMapPath != null) { + mapping.source = util.join(aSourceMapPath, mapping.source) + } + if (sourceRoot != null) { + mapping.source = util.relative(sourceRoot, mapping.source); + } + mapping.originalLine = original.line; + mapping.originalColumn = original.column; + if (original.name != null) { + mapping.name = original.name; + } + } + } + + var source = mapping.source; + if (source != null && !newSources.has(source)) { + newSources.add(source); + } + + var name = mapping.name; + if (name != null && !newNames.has(name)) { + newNames.add(name); + } + + }, this); + this._sources = newSources; + this._names = newNames; + + // Copy sourcesContents of applied map. + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aSourceMapPath != null) { + sourceFile = util.join(aSourceMapPath, sourceFile); + } + if (sourceRoot != null) { + sourceFile = util.relative(sourceRoot, sourceFile); + } + this.setSourceContent(sourceFile, content); + } + }, this); + }; + + /** + * A mapping can have one of the three levels of data: + * + * 1. Just the generated position. + * 2. The Generated position, original position, and original source. + * 3. Generated and original position, original source, as well as a name + * token. + * + * To maintain consistency, we validate that any new mapping being added falls + * in to one of these categories. + */ + SourceMapGenerator.prototype._validateMapping = + function SourceMapGenerator_validateMapping(aGenerated, aOriginal, aSource, + aName) { + if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aGenerated.line > 0 && aGenerated.column >= 0 + && !aOriginal && !aSource && !aName) { + // Case 1. + return; + } + else if (aGenerated && 'line' in aGenerated && 'column' in aGenerated + && aOriginal && 'line' in aOriginal && 'column' in aOriginal + && aGenerated.line > 0 && aGenerated.column >= 0 + && aOriginal.line > 0 && aOriginal.column >= 0 + && aSource) { + // Cases 2 and 3. + return; + } + else { + throw new Error('Invalid mapping: ' + JSON.stringify({ + generated: aGenerated, + source: aSource, + original: aOriginal, + name: aName + })); + } + }; + + /** + * Serialize the accumulated mappings in to the stream of base 64 VLQs + * specified by the source map format. + */ + SourceMapGenerator.prototype._serializeMappings = + function SourceMapGenerator_serializeMappings() { + var previousGeneratedColumn = 0; + var previousGeneratedLine = 1; + var previousOriginalColumn = 0; + var previousOriginalLine = 0; + var previousName = 0; + var previousSource = 0; + var result = ''; + var mapping; + + var mappings = this._mappings.toArray(); + + for (var i = 0, len = mappings.length; i < len; i++) { + mapping = mappings[i]; + + if (mapping.generatedLine !== previousGeneratedLine) { + previousGeneratedColumn = 0; + while (mapping.generatedLine !== previousGeneratedLine) { + result += ';'; + previousGeneratedLine++; + } + } + else { + if (i > 0) { + if (!util.compareByGeneratedPositions(mapping, mappings[i - 1])) { + continue; + } + result += ','; + } + } + + result += base64VLQ.encode(mapping.generatedColumn + - previousGeneratedColumn); + previousGeneratedColumn = mapping.generatedColumn; + + if (mapping.source != null) { + result += base64VLQ.encode(this._sources.indexOf(mapping.source) + - previousSource); + previousSource = this._sources.indexOf(mapping.source); + + // lines are stored 0-based in SourceMap spec version 3 + result += base64VLQ.encode(mapping.originalLine - 1 + - previousOriginalLine); + previousOriginalLine = mapping.originalLine - 1; + + result += base64VLQ.encode(mapping.originalColumn + - previousOriginalColumn); + previousOriginalColumn = mapping.originalColumn; + + if (mapping.name != null) { + result += base64VLQ.encode(this._names.indexOf(mapping.name) + - previousName); + previousName = this._names.indexOf(mapping.name); + } + } + } + + return result; + }; + + SourceMapGenerator.prototype._generateSourcesContent = + function SourceMapGenerator_generateSourcesContent(aSources, aSourceRoot) { + return aSources.map(function (source) { + if (!this._sourcesContents) { + return null; + } + if (aSourceRoot != null) { + source = util.relative(aSourceRoot, source); + } + var key = util.toSetString(source); + return Object.prototype.hasOwnProperty.call(this._sourcesContents, + key) + ? this._sourcesContents[key] + : null; + }, this); + }; + + /** + * Externalize the source map. + */ + SourceMapGenerator.prototype.toJSON = + function SourceMapGenerator_toJSON() { + var map = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + }; + if (this._file != null) { + map.file = this._file; + } + if (this._sourceRoot != null) { + map.sourceRoot = this._sourceRoot; + } + if (this._sourcesContents) { + map.sourcesContent = this._generateSourcesContent(map.sources, map.sourceRoot); + } + + return map; + }; + + /** + * Render the source map being generated to a string. + */ + SourceMapGenerator.prototype.toString = + function SourceMapGenerator_toString() { + return JSON.stringify(this.toJSON()); + }; + + exports.SourceMapGenerator = SourceMapGenerator; + +}); diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map/source-node.js b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map/source-node.js new file mode 100644 index 00000000..9ee90bd5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map/source-node.js @@ -0,0 +1,414 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var SourceMapGenerator = require('./source-map-generator').SourceMapGenerator; + var util = require('./util'); + + // Matches a Windows-style `\r\n` newline or a `\n` newline used by all other + // operating systems these days (capturing the result). + var REGEX_NEWLINE = /(\r?\n)/; + + // Newline character code for charCodeAt() comparisons + var NEWLINE_CODE = 10; + + // Private symbol for identifying `SourceNode`s when multiple versions of + // the source-map library are loaded. This MUST NOT CHANGE across + // versions! + var isSourceNode = "$$$isSourceNode$$$"; + + /** + * SourceNodes provide a way to abstract over interpolating/concatenating + * snippets of generated JavaScript source code while maintaining the line and + * column information associated with the original source code. + * + * @param aLine The original line number. + * @param aColumn The original column number. + * @param aSource The original source's filename. + * @param aChunks Optional. An array of strings which are snippets of + * generated JS, or other SourceNodes. + * @param aName The original identifier. + */ + function SourceNode(aLine, aColumn, aSource, aChunks, aName) { + this.children = []; + this.sourceContents = {}; + this.line = aLine == null ? null : aLine; + this.column = aColumn == null ? null : aColumn; + this.source = aSource == null ? null : aSource; + this.name = aName == null ? null : aName; + this[isSourceNode] = true; + if (aChunks != null) this.add(aChunks); + } + + /** + * Creates a SourceNode from generated code and a SourceMapConsumer. + * + * @param aGeneratedCode The generated code + * @param aSourceMapConsumer The SourceMap for the generated code + * @param aRelativePath Optional. The path that relative sources in the + * SourceMapConsumer should be relative to. + */ + SourceNode.fromStringWithSourceMap = + function SourceNode_fromStringWithSourceMap(aGeneratedCode, aSourceMapConsumer, aRelativePath) { + // The SourceNode we want to fill with the generated code + // and the SourceMap + var node = new SourceNode(); + + // All even indices of this array are one line of the generated code, + // while all odd indices are the newlines between two adjacent lines + // (since `REGEX_NEWLINE` captures its match). + // Processed fragments are removed from this array, by calling `shiftNextLine`. + var remainingLines = aGeneratedCode.split(REGEX_NEWLINE); + var shiftNextLine = function() { + var lineContents = remainingLines.shift(); + // The last line of a file might not have a newline. + var newLine = remainingLines.shift() || ""; + return lineContents + newLine; + }; + + // We need to remember the position of "remainingLines" + var lastGeneratedLine = 1, lastGeneratedColumn = 0; + + // The generate SourceNodes we need a code range. + // To extract it current and last mapping is used. + // Here we store the last mapping. + var lastMapping = null; + + aSourceMapConsumer.eachMapping(function (mapping) { + if (lastMapping !== null) { + // We add the code from "lastMapping" to "mapping": + // First check if there is a new line in between. + if (lastGeneratedLine < mapping.generatedLine) { + var code = ""; + // Associate first line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + lastGeneratedLine++; + lastGeneratedColumn = 0; + // The remaining code is added without mapping + } else { + // There is no new line in between. + // Associate the code between "lastGeneratedColumn" and + // "mapping.generatedColumn" with "lastMapping" + var nextLine = remainingLines[0]; + var code = nextLine.substr(0, mapping.generatedColumn - + lastGeneratedColumn); + remainingLines[0] = nextLine.substr(mapping.generatedColumn - + lastGeneratedColumn); + lastGeneratedColumn = mapping.generatedColumn; + addMappingWithCode(lastMapping, code); + // No more remaining code, continue + lastMapping = mapping; + return; + } + } + // We add the generated code until the first mapping + // to the SourceNode without any mapping. + // Each line is added as separate string. + while (lastGeneratedLine < mapping.generatedLine) { + node.add(shiftNextLine()); + lastGeneratedLine++; + } + if (lastGeneratedColumn < mapping.generatedColumn) { + var nextLine = remainingLines[0]; + node.add(nextLine.substr(0, mapping.generatedColumn)); + remainingLines[0] = nextLine.substr(mapping.generatedColumn); + lastGeneratedColumn = mapping.generatedColumn; + } + lastMapping = mapping; + }, this); + // We have processed all mappings. + if (remainingLines.length > 0) { + if (lastMapping) { + // Associate the remaining code in the current line with "lastMapping" + addMappingWithCode(lastMapping, shiftNextLine()); + } + // and add the remaining lines without any mapping + node.add(remainingLines.join("")); + } + + // Copy sourcesContent into SourceNode + aSourceMapConsumer.sources.forEach(function (sourceFile) { + var content = aSourceMapConsumer.sourceContentFor(sourceFile); + if (content != null) { + if (aRelativePath != null) { + sourceFile = util.join(aRelativePath, sourceFile); + } + node.setSourceContent(sourceFile, content); + } + }); + + return node; + + function addMappingWithCode(mapping, code) { + if (mapping === null || mapping.source === undefined) { + node.add(code); + } else { + var source = aRelativePath + ? util.join(aRelativePath, mapping.source) + : mapping.source; + node.add(new SourceNode(mapping.originalLine, + mapping.originalColumn, + source, + code, + mapping.name)); + } + } + }; + + /** + * Add a chunk of generated JS to this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.add = function SourceNode_add(aChunk) { + if (Array.isArray(aChunk)) { + aChunk.forEach(function (chunk) { + this.add(chunk); + }, this); + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + if (aChunk) { + this.children.push(aChunk); + } + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Add a chunk of generated JS to the beginning of this source node. + * + * @param aChunk A string snippet of generated JS code, another instance of + * SourceNode, or an array where each member is one of those things. + */ + SourceNode.prototype.prepend = function SourceNode_prepend(aChunk) { + if (Array.isArray(aChunk)) { + for (var i = aChunk.length-1; i >= 0; i--) { + this.prepend(aChunk[i]); + } + } + else if (aChunk[isSourceNode] || typeof aChunk === "string") { + this.children.unshift(aChunk); + } + else { + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + aChunk + ); + } + return this; + }; + + /** + * Walk over the tree of JS snippets in this node and its children. The + * walking function is called once for each snippet of JS and is passed that + * snippet and the its original associated source's line/column location. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walk = function SourceNode_walk(aFn) { + var chunk; + for (var i = 0, len = this.children.length; i < len; i++) { + chunk = this.children[i]; + if (chunk[isSourceNode]) { + chunk.walk(aFn); + } + else { + if (chunk !== '') { + aFn(chunk, { source: this.source, + line: this.line, + column: this.column, + name: this.name }); + } + } + } + }; + + /** + * Like `String.prototype.join` except for SourceNodes. Inserts `aStr` between + * each of `this.children`. + * + * @param aSep The separator. + */ + SourceNode.prototype.join = function SourceNode_join(aSep) { + var newChildren; + var i; + var len = this.children.length; + if (len > 0) { + newChildren = []; + for (i = 0; i < len-1; i++) { + newChildren.push(this.children[i]); + newChildren.push(aSep); + } + newChildren.push(this.children[i]); + this.children = newChildren; + } + return this; + }; + + /** + * Call String.prototype.replace on the very right-most source snippet. Useful + * for trimming whitespace from the end of a source node, etc. + * + * @param aPattern The pattern to replace. + * @param aReplacement The thing to replace the pattern with. + */ + SourceNode.prototype.replaceRight = function SourceNode_replaceRight(aPattern, aReplacement) { + var lastChild = this.children[this.children.length - 1]; + if (lastChild[isSourceNode]) { + lastChild.replaceRight(aPattern, aReplacement); + } + else if (typeof lastChild === 'string') { + this.children[this.children.length - 1] = lastChild.replace(aPattern, aReplacement); + } + else { + this.children.push(''.replace(aPattern, aReplacement)); + } + return this; + }; + + /** + * Set the source content for a source file. This will be added to the SourceMapGenerator + * in the sourcesContent field. + * + * @param aSourceFile The filename of the source file + * @param aSourceContent The content of the source file + */ + SourceNode.prototype.setSourceContent = + function SourceNode_setSourceContent(aSourceFile, aSourceContent) { + this.sourceContents[util.toSetString(aSourceFile)] = aSourceContent; + }; + + /** + * Walk over the tree of SourceNodes. The walking function is called for each + * source file content and is passed the filename and source content. + * + * @param aFn The traversal function. + */ + SourceNode.prototype.walkSourceContents = + function SourceNode_walkSourceContents(aFn) { + for (var i = 0, len = this.children.length; i < len; i++) { + if (this.children[i][isSourceNode]) { + this.children[i].walkSourceContents(aFn); + } + } + + var sources = Object.keys(this.sourceContents); + for (var i = 0, len = sources.length; i < len; i++) { + aFn(util.fromSetString(sources[i]), this.sourceContents[sources[i]]); + } + }; + + /** + * Return the string representation of this source node. Walks over the tree + * and concatenates all the various snippets together to one string. + */ + SourceNode.prototype.toString = function SourceNode_toString() { + var str = ""; + this.walk(function (chunk) { + str += chunk; + }); + return str; + }; + + /** + * Returns the string representation of this source node along with a source + * map. + */ + SourceNode.prototype.toStringWithSourceMap = function SourceNode_toStringWithSourceMap(aArgs) { + var generated = { + code: "", + line: 1, + column: 0 + }; + var map = new SourceMapGenerator(aArgs); + var sourceMappingActive = false; + var lastOriginalSource = null; + var lastOriginalLine = null; + var lastOriginalColumn = null; + var lastOriginalName = null; + this.walk(function (chunk, original) { + generated.code += chunk; + if (original.source !== null + && original.line !== null + && original.column !== null) { + if(lastOriginalSource !== original.source + || lastOriginalLine !== original.line + || lastOriginalColumn !== original.column + || lastOriginalName !== original.name) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + lastOriginalSource = original.source; + lastOriginalLine = original.line; + lastOriginalColumn = original.column; + lastOriginalName = original.name; + sourceMappingActive = true; + } else if (sourceMappingActive) { + map.addMapping({ + generated: { + line: generated.line, + column: generated.column + } + }); + lastOriginalSource = null; + sourceMappingActive = false; + } + for (var idx = 0, length = chunk.length; idx < length; idx++) { + if (chunk.charCodeAt(idx) === NEWLINE_CODE) { + generated.line++; + generated.column = 0; + // Mappings end at eol + if (idx + 1 === length) { + lastOriginalSource = null; + sourceMappingActive = false; + } else if (sourceMappingActive) { + map.addMapping({ + source: original.source, + original: { + line: original.line, + column: original.column + }, + generated: { + line: generated.line, + column: generated.column + }, + name: original.name + }); + } + } else { + generated.column++; + } + } + }); + this.walkSourceContents(function (sourceFile, sourceContent) { + map.setSourceContent(sourceFile, sourceContent); + }); + + return { code: generated.code, map: map }; + }; + + exports.SourceNode = SourceNode; + +}); diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map/util.js b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map/util.js new file mode 100644 index 00000000..976f6cab --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/lib/source-map/util.js @@ -0,0 +1,319 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + /** + * This is a helper function for getting values from parameter/options + * objects. + * + * @param args The object we are extracting values from + * @param name The name of the property we are getting. + * @param defaultValue An optional value to return if the property is missing + * from the object. If this is not specified and the property is missing, an + * error will be thrown. + */ + function getArg(aArgs, aName, aDefaultValue) { + if (aName in aArgs) { + return aArgs[aName]; + } else if (arguments.length === 3) { + return aDefaultValue; + } else { + throw new Error('"' + aName + '" is a required argument.'); + } + } + exports.getArg = getArg; + + var urlRegexp = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/; + var dataUrlRegexp = /^data:.+\,.+$/; + + function urlParse(aUrl) { + var match = aUrl.match(urlRegexp); + if (!match) { + return null; + } + return { + scheme: match[1], + auth: match[2], + host: match[3], + port: match[4], + path: match[5] + }; + } + exports.urlParse = urlParse; + + function urlGenerate(aParsedUrl) { + var url = ''; + if (aParsedUrl.scheme) { + url += aParsedUrl.scheme + ':'; + } + url += '//'; + if (aParsedUrl.auth) { + url += aParsedUrl.auth + '@'; + } + if (aParsedUrl.host) { + url += aParsedUrl.host; + } + if (aParsedUrl.port) { + url += ":" + aParsedUrl.port + } + if (aParsedUrl.path) { + url += aParsedUrl.path; + } + return url; + } + exports.urlGenerate = urlGenerate; + + /** + * Normalizes a path, or the path portion of a URL: + * + * - Replaces consequtive slashes with one slash. + * - Removes unnecessary '.' parts. + * - Removes unnecessary '/..' parts. + * + * Based on code in the Node.js 'path' core module. + * + * @param aPath The path or url to normalize. + */ + function normalize(aPath) { + var path = aPath; + var url = urlParse(aPath); + if (url) { + if (!url.path) { + return aPath; + } + path = url.path; + } + var isAbsolute = (path.charAt(0) === '/'); + + var parts = path.split(/\/+/); + for (var part, up = 0, i = parts.length - 1; i >= 0; i--) { + part = parts[i]; + if (part === '.') { + parts.splice(i, 1); + } else if (part === '..') { + up++; + } else if (up > 0) { + if (part === '') { + // The first part is blank if the path is absolute. Trying to go + // above the root is a no-op. Therefore we can remove all '..' parts + // directly after the root. + parts.splice(i + 1, up); + up = 0; + } else { + parts.splice(i, 2); + up--; + } + } + } + path = parts.join('/'); + + if (path === '') { + path = isAbsolute ? '/' : '.'; + } + + if (url) { + url.path = path; + return urlGenerate(url); + } + return path; + } + exports.normalize = normalize; + + /** + * Joins two paths/URLs. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be joined with the root. + * + * - If aPath is a URL or a data URI, aPath is returned, unless aPath is a + * scheme-relative URL: Then the scheme of aRoot, if any, is prepended + * first. + * - Otherwise aPath is a path. If aRoot is a URL, then its path portion + * is updated with the result and aRoot is returned. Otherwise the result + * is returned. + * - If aPath is absolute, the result is aPath. + * - Otherwise the two paths are joined with a slash. + * - Joining for example 'http://' and 'www.example.com' is also supported. + */ + function join(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + if (aPath === "") { + aPath = "."; + } + var aPathUrl = urlParse(aPath); + var aRootUrl = urlParse(aRoot); + if (aRootUrl) { + aRoot = aRootUrl.path || '/'; + } + + // `join(foo, '//www.example.org')` + if (aPathUrl && !aPathUrl.scheme) { + if (aRootUrl) { + aPathUrl.scheme = aRootUrl.scheme; + } + return urlGenerate(aPathUrl); + } + + if (aPathUrl || aPath.match(dataUrlRegexp)) { + return aPath; + } + + // `join('http://', 'www.example.com')` + if (aRootUrl && !aRootUrl.host && !aRootUrl.path) { + aRootUrl.host = aPath; + return urlGenerate(aRootUrl); + } + + var joined = aPath.charAt(0) === '/' + ? aPath + : normalize(aRoot.replace(/\/+$/, '') + '/' + aPath); + + if (aRootUrl) { + aRootUrl.path = joined; + return urlGenerate(aRootUrl); + } + return joined; + } + exports.join = join; + + /** + * Make a path relative to a URL or another path. + * + * @param aRoot The root path or URL. + * @param aPath The path or URL to be made relative to aRoot. + */ + function relative(aRoot, aPath) { + if (aRoot === "") { + aRoot = "."; + } + + aRoot = aRoot.replace(/\/$/, ''); + + // XXX: It is possible to remove this block, and the tests still pass! + var url = urlParse(aRoot); + if (aPath.charAt(0) == "/" && url && url.path == "/") { + return aPath.slice(1); + } + + return aPath.indexOf(aRoot + '/') === 0 + ? aPath.substr(aRoot.length + 1) + : aPath; + } + exports.relative = relative; + + /** + * Because behavior goes wacky when you set `__proto__` on objects, we + * have to prefix all the strings in our set with an arbitrary character. + * + * See https://github.com/mozilla/source-map/pull/31 and + * https://github.com/mozilla/source-map/issues/30 + * + * @param String aStr + */ + function toSetString(aStr) { + return '$' + aStr; + } + exports.toSetString = toSetString; + + function fromSetString(aStr) { + return aStr.substr(1); + } + exports.fromSetString = fromSetString; + + function strcmp(aStr1, aStr2) { + var s1 = aStr1 || ""; + var s2 = aStr2 || ""; + return (s1 > s2) - (s1 < s2); + } + + /** + * Comparator between two mappings where the original positions are compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same original source/line/column, but different generated + * line and column the same. Useful when searching for a mapping with a + * stubbed out mapping. + */ + function compareByOriginalPositions(mappingA, mappingB, onlyCompareOriginal) { + var cmp; + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp || onlyCompareOriginal) { + return cmp; + } + + cmp = strcmp(mappingA.name, mappingB.name); + if (cmp) { + return cmp; + } + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp) { + return cmp; + } + + return mappingA.generatedColumn - mappingB.generatedColumn; + }; + exports.compareByOriginalPositions = compareByOriginalPositions; + + /** + * Comparator between two mappings where the generated positions are + * compared. + * + * Optionally pass in `true` as `onlyCompareGenerated` to consider two + * mappings with the same generated line and column, but different + * source/name/original line and column the same. Useful when searching for a + * mapping with a stubbed out mapping. + */ + function compareByGeneratedPositions(mappingA, mappingB, onlyCompareGenerated) { + var cmp; + + cmp = mappingA.generatedLine - mappingB.generatedLine; + if (cmp) { + return cmp; + } + + cmp = mappingA.generatedColumn - mappingB.generatedColumn; + if (cmp || onlyCompareGenerated) { + return cmp; + } + + cmp = strcmp(mappingA.source, mappingB.source); + if (cmp) { + return cmp; + } + + cmp = mappingA.originalLine - mappingB.originalLine; + if (cmp) { + return cmp; + } + + cmp = mappingA.originalColumn - mappingB.originalColumn; + if (cmp) { + return cmp; + } + + return strcmp(mappingA.name, mappingB.name); + }; + exports.compareByGeneratedPositions = compareByGeneratedPositions; + +}); diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/package.json b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/package.json new file mode 100644 index 00000000..f6884d9b --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/package.json @@ -0,0 +1,227 @@ +{ + "_args": [ + [ + { + "raw": "source-map@~0.3.0", + "scope": null, + "escapedName": "source-map", + "name": "source-map", + "rawSpec": "~0.3.0", + "spec": ">=0.3.0 <0.4.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/inline-source-map" + ] + ], + "_from": "source-map@>=0.3.0 <0.4.0", + "_id": "source-map@0.3.0", + "_inCache": true, + "_location": "/inline-source-map/source-map", + "_npmUser": { + "name": "nickfitzgerald", + "email": "fitzgen@gmail.com" + }, + "_npmVersion": "1.4.9", + "_phantomChildren": {}, + "_requested": { + "raw": "source-map@~0.3.0", + "scope": null, + "escapedName": "source-map", + "name": "source-map", + "rawSpec": "~0.3.0", + "spec": ">=0.3.0 <0.4.0", + "type": "range" + }, + "_requiredBy": [ + "/inline-source-map" + ], + "_resolved": "https://registry.npmjs.org/source-map/-/source-map-0.3.0.tgz", + "_shasum": "8586fb9a5a005e5b501e21cd18b6f21b457ad1f9", + "_shrinkwrap": null, + "_spec": "source-map@~0.3.0", + "_where": "/Users/MB/git/pdfkit/node_modules/inline-source-map", + "author": { + "name": "Nick Fitzgerald", + "email": "nfitzgerald@mozilla.com" + }, + "bugs": { + "url": "https://github.com/mozilla/source-map/issues" + }, + "contributors": [ + { + "name": "Tobias Koppers", + "email": "tobias.koppers@googlemail.com" + }, + { + "name": "Duncan Beevers", + "email": "duncan@dweebd.com" + }, + { + "name": "Stephen Crane", + "email": "scrane@mozilla.com" + }, + { + "name": "Ryan Seddon", + "email": "seddon.ryan@gmail.com" + }, + { + "name": "Miles Elam", + "email": "miles.elam@deem.com" + }, + { + "name": "Mihai Bazon", + "email": "mihai.bazon@gmail.com" + }, + { + "name": "Michael Ficarra", + "email": "github.public.email@michael.ficarra.me" + }, + { + "name": "Todd Wolfson", + "email": "todd@twolfson.com" + }, + { + "name": "Alexander Solovyov", + "email": "alexander@solovyov.net" + }, + { + "name": "Felix Gnass", + "email": "fgnass@gmail.com" + }, + { + "name": "Conrad Irwin", + "email": "conrad.irwin@gmail.com" + }, + { + "name": "usrbincc", + "email": "usrbincc@yahoo.com" + }, + { + "name": "David Glasser", + "email": "glasser@davidglasser.net" + }, + { + "name": "Chase Douglas", + "email": "chase@newrelic.com" + }, + { + "name": "Evan Wallace", + "email": "evan.exe@gmail.com" + }, + { + "name": "Heather Arthur", + "email": "fayearthur@gmail.com" + }, + { + "name": "Hugh Kennedy", + "email": "hughskennedy@gmail.com" + }, + { + "name": "David Glasser", + "email": "glasser@davidglasser.net" + }, + { + "name": "Simon Lydell", + "email": "simon.lydell@gmail.com" + }, + { + "name": "Jmeas Smith", + "email": "jellyes2@gmail.com" + }, + { + "name": "Michael Z Goddard", + "email": "mzgoddard@gmail.com" + }, + { + "name": "azu", + "email": "azu@users.noreply.github.com" + }, + { + "name": "John Gozde", + "email": "john@gozde.ca" + }, + { + "name": "Adam Kirkton", + "email": "akirkton@truefitinnovation.com" + }, + { + "name": "Chris Montgomery", + "email": "christopher.montgomery@dowjones.com" + }, + { + "name": "J. Ryan Stinnett", + "email": "jryans@gmail.com" + }, + { + "name": "Jack Herrington", + "email": "jherrington@walmartlabs.com" + }, + { + "name": "Chris Truter", + "email": "jeffpalentine@gmail.com" + }, + { + "name": "Daniel Espeset", + "email": "daniel@danielespeset.com" + }, + { + "name": "Jamie Wong", + "email": "jamie.lf.wong@gmail.com" + }, + { + "name": "Eddy Bruël", + "email": "ejpbruel@mozilla.com" + } + ], + "dependencies": { + "amdefine": ">=0.0.4" + }, + "description": "Generates and consumes source maps", + "devDependencies": { + "dryice": ">=0.4.8" + }, + "directories": { + "lib": "./lib" + }, + "dist": { + "shasum": "8586fb9a5a005e5b501e21cd18b6f21b457ad1f9", + "tarball": "https://registry.npmjs.org/source-map/-/source-map-0.3.0.tgz" + }, + "engines": { + "node": ">=0.8.0" + }, + "homepage": "https://github.com/mozilla/source-map", + "licenses": [ + { + "type": "BSD", + "url": "http://opensource.org/licenses/BSD-3-Clause" + } + ], + "main": "./lib/source-map.js", + "maintainers": [ + { + "name": "mozilla-devtools", + "email": "mozilla-developer-tools@googlegroups.com" + }, + { + "name": "mozilla", + "email": "dherman@mozilla.com" + }, + { + "name": "nickfitzgerald", + "email": "fitzgen@gmail.com" + } + ], + "name": "source-map", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+ssh://git@github.com/mozilla/source-map.git" + }, + "scripts": { + "build": "node Makefile.dryice.js", + "test": "node test/run-tests.js" + }, + "version": "0.3.0" +} diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/run-tests.js b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/run-tests.js new file mode 100755 index 00000000..64a7c3a3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/run-tests.js @@ -0,0 +1,62 @@ +#!/usr/bin/env node +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +var assert = require('assert'); +var fs = require('fs'); +var path = require('path'); +var util = require('./source-map/util'); + +function run(tests) { + var total = 0; + var passed = 0; + + for (var i = 0; i < tests.length; i++) { + for (var k in tests[i].testCase) { + if (/^test/.test(k)) { + total++; + try { + tests[i].testCase[k](assert, util); + passed++; + } + catch (e) { + console.log('FAILED ' + tests[i].name + ': ' + k + '!'); + console.log(e.stack); + } + } + } + } + + console.log(''); + console.log(passed + ' / ' + total + ' tests passed.'); + console.log(''); + + return total - passed; +} + +function isTestFile(f) { + var testToRun = process.argv[2]; + return testToRun + ? path.basename(testToRun) === f + : /^test\-.*?\.js/.test(f); +} + +function toModule(f) { + return './source-map/' + f.replace(/\.js$/, ''); +} + +var requires = fs.readdirSync(path.join(__dirname, 'source-map')) + .filter(isTestFile) + .map(toModule); + +var code = run(requires.map(require).map(function (mod, i) { + return { + name: requires[i], + testCase: mod + }; +})); + +process.exit(code); diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-api.js b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-api.js new file mode 100644 index 00000000..3801233c --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-api.js @@ -0,0 +1,26 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2012 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var sourceMap; + try { + sourceMap = require('../../lib/source-map'); + } catch (e) { + sourceMap = {}; + Components.utils.import('resource:///modules/devtools/SourceMap.jsm', sourceMap); + } + + exports['test that the api is properly exposed in the top level'] = function (assert, util) { + assert.equal(typeof sourceMap.SourceMapGenerator, "function"); + assert.equal(typeof sourceMap.SourceMapConsumer, "function"); + assert.equal(typeof sourceMap.SourceNode, "function"); + }; + +}); diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-array-set.js b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-array-set.js new file mode 100644 index 00000000..b5797edd --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-array-set.js @@ -0,0 +1,104 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var ArraySet = require('../../lib/source-map/array-set').ArraySet; + + function makeTestSet() { + var set = new ArraySet(); + for (var i = 0; i < 100; i++) { + set.add(String(i)); + } + return set; + } + + exports['test .has() membership'] = function (assert, util) { + var set = makeTestSet(); + for (var i = 0; i < 100; i++) { + assert.ok(set.has(String(i))); + } + }; + + exports['test .indexOf() elements'] = function (assert, util) { + var set = makeTestSet(); + for (var i = 0; i < 100; i++) { + assert.strictEqual(set.indexOf(String(i)), i); + } + }; + + exports['test .at() indexing'] = function (assert, util) { + var set = makeTestSet(); + for (var i = 0; i < 100; i++) { + assert.strictEqual(set.at(i), String(i)); + } + }; + + exports['test creating from an array'] = function (assert, util) { + var set = ArraySet.fromArray(['foo', 'bar', 'baz', 'quux', 'hasOwnProperty']); + + assert.ok(set.has('foo')); + assert.ok(set.has('bar')); + assert.ok(set.has('baz')); + assert.ok(set.has('quux')); + assert.ok(set.has('hasOwnProperty')); + + assert.strictEqual(set.indexOf('foo'), 0); + assert.strictEqual(set.indexOf('bar'), 1); + assert.strictEqual(set.indexOf('baz'), 2); + assert.strictEqual(set.indexOf('quux'), 3); + + assert.strictEqual(set.at(0), 'foo'); + assert.strictEqual(set.at(1), 'bar'); + assert.strictEqual(set.at(2), 'baz'); + assert.strictEqual(set.at(3), 'quux'); + }; + + exports['test that you can add __proto__; see github issue #30'] = function (assert, util) { + var set = new ArraySet(); + set.add('__proto__'); + assert.ok(set.has('__proto__')); + assert.strictEqual(set.at(0), '__proto__'); + assert.strictEqual(set.indexOf('__proto__'), 0); + }; + + exports['test .fromArray() with duplicates'] = function (assert, util) { + var set = ArraySet.fromArray(['foo', 'foo']); + assert.ok(set.has('foo')); + assert.strictEqual(set.at(0), 'foo'); + assert.strictEqual(set.indexOf('foo'), 0); + assert.strictEqual(set.toArray().length, 1); + + set = ArraySet.fromArray(['foo', 'foo'], true); + assert.ok(set.has('foo')); + assert.strictEqual(set.at(0), 'foo'); + assert.strictEqual(set.at(1), 'foo'); + assert.strictEqual(set.indexOf('foo'), 0); + assert.strictEqual(set.toArray().length, 2); + }; + + exports['test .add() with duplicates'] = function (assert, util) { + var set = new ArraySet(); + set.add('foo'); + + set.add('foo'); + assert.ok(set.has('foo')); + assert.strictEqual(set.at(0), 'foo'); + assert.strictEqual(set.indexOf('foo'), 0); + assert.strictEqual(set.toArray().length, 1); + + set.add('foo', true); + assert.ok(set.has('foo')); + assert.strictEqual(set.at(0), 'foo'); + assert.strictEqual(set.at(1), 'foo'); + assert.strictEqual(set.indexOf('foo'), 0); + assert.strictEqual(set.toArray().length, 2); + }; + +}); diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-base64-vlq.js b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-base64-vlq.js new file mode 100644 index 00000000..6fd0d99f --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-base64-vlq.js @@ -0,0 +1,23 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var base64VLQ = require('../../lib/source-map/base64-vlq'); + + exports['test normal encoding and decoding'] = function (assert, util) { + var result = {}; + for (var i = -255; i < 256; i++) { + base64VLQ.decode(base64VLQ.encode(i), result); + assert.equal(result.value, i); + assert.equal(result.rest, ""); + } + }; + +}); diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-base64.js b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-base64.js new file mode 100644 index 00000000..ff3a2445 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-base64.js @@ -0,0 +1,35 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var base64 = require('../../lib/source-map/base64'); + + exports['test out of range encoding'] = function (assert, util) { + assert.throws(function () { + base64.encode(-1); + }); + assert.throws(function () { + base64.encode(64); + }); + }; + + exports['test out of range decoding'] = function (assert, util) { + assert.throws(function () { + base64.decode('='); + }); + }; + + exports['test normal encoding and decoding'] = function (assert, util) { + for (var i = 0; i < 64; i++) { + assert.equal(base64.decode(base64.encode(i)), i); + } + }; + +}); diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-binary-search.js b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-binary-search.js new file mode 100644 index 00000000..58ab40f6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-binary-search.js @@ -0,0 +1,94 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var binarySearch = require('../../lib/source-map/binary-search'); + + function numberCompare(a, b) { + return a - b; + } + + exports['test too high with lub bias'] = function (assert, util) { + var needle = 30; + var haystack = [2,4,6,8,10,12,14,16,18,20]; + + assert.doesNotThrow(function () { + binarySearch.search(needle, haystack, numberCompare); + }); + + assert.equal(binarySearch.search(needle, haystack, numberCompare), -1); + }; + + exports['test too low with lub bias'] = function (assert, util) { + var needle = 1; + var haystack = [2,4,6,8,10,12,14,16,18,20]; + + assert.doesNotThrow(function () { + binarySearch.search(needle, haystack, numberCompare, true); + }); + + assert.equal(haystack[binarySearch.search(needle, haystack, numberCompare)], 2); + }; + + exports['test exact search with lub bias'] = function (assert, util) { + var needle = 4; + var haystack = [2,4,6,8,10,12,14,16,18,20]; + + assert.equal(haystack[binarySearch.search(needle, haystack, numberCompare)], 4); + }; + + exports['test fuzzy search with lub bias'] = function (assert, util) { + var needle = 19; + var haystack = [2,4,6,8,10,12,14,16,18,20]; + + assert.equal(haystack[binarySearch.search(needle, haystack, numberCompare)], 20); + }; + + exports['test too high with glb bias'] = function (assert, util) { + var needle = 30; + var haystack = [2,4,6,8,10,12,14,16,18,20]; + + assert.doesNotThrow(function () { + binarySearch.search(needle, haystack, numberCompare); + }); + + assert.equal(haystack[binarySearch.search(needle, haystack, numberCompare, + binarySearch.GREATEST_LOWER_BOUND)], 20); + }; + + exports['test too low with glb bias'] = function (assert, util) { + var needle = 1; + var haystack = [2,4,6,8,10,12,14,16,18,20]; + + assert.doesNotThrow(function () { + binarySearch.search(needle, haystack, numberCompare, + binarySearch.GREATEST_LOWER_BOUND); + }); + + assert.equal(binarySearch.search(needle, haystack, numberCompare, + binarySearch.GREATEST_LOWER_BOUND), -1); + }; + + exports['test exact search with glb bias'] = function (assert, util) { + var needle = 4; + var haystack = [2,4,6,8,10,12,14,16,18,20]; + + assert.equal(haystack[binarySearch.search(needle, haystack, numberCompare, + binarySearch.GREATEST_LOWER_BOUND)], 4); + }; + + exports['test fuzzy search with glb bias'] = function (assert, util) { + var needle = 19; + var haystack = [2,4,6,8,10,12,14,16,18,20]; + + assert.equal(haystack[binarySearch.search(needle, haystack, numberCompare, + binarySearch.GREATEST_LOWER_BOUND)], 18); + }; +}); diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-dog-fooding.js b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-dog-fooding.js new file mode 100644 index 00000000..c48f54a6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-dog-fooding.js @@ -0,0 +1,84 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var SourceMapConsumer = require('../../lib/source-map/source-map-consumer').SourceMapConsumer; + var SourceMapGenerator = require('../../lib/source-map/source-map-generator').SourceMapGenerator; + + exports['test eating our own dog food'] = function (assert, util) { + var smg = new SourceMapGenerator({ + file: 'testing.js', + sourceRoot: '/wu/tang' + }); + + smg.addMapping({ + source: 'gza.coffee', + original: { line: 1, column: 0 }, + generated: { line: 2, column: 2 } + }); + + smg.addMapping({ + source: 'gza.coffee', + original: { line: 2, column: 0 }, + generated: { line: 3, column: 2 } + }); + + smg.addMapping({ + source: 'gza.coffee', + original: { line: 3, column: 0 }, + generated: { line: 4, column: 2 } + }); + + smg.addMapping({ + source: 'gza.coffee', + original: { line: 4, column: 0 }, + generated: { line: 5, column: 2 } + }); + + smg.addMapping({ + source: 'gza.coffee', + original: { line: 5, column: 10 }, + generated: { line: 6, column: 12 } + }); + + var smc = new SourceMapConsumer(smg.toString()); + + // Exact + util.assertMapping(2, 2, '/wu/tang/gza.coffee', 1, 0, null, smc, assert); + util.assertMapping(3, 2, '/wu/tang/gza.coffee', 2, 0, null, smc, assert); + util.assertMapping(4, 2, '/wu/tang/gza.coffee', 3, 0, null, smc, assert); + util.assertMapping(5, 2, '/wu/tang/gza.coffee', 4, 0, null, smc, assert); + util.assertMapping(6, 12, '/wu/tang/gza.coffee', 5, 10, null, smc, assert); + + // Fuzzy + + // Generated to original + util.assertMapping(2, 0, '/wu/tang/gza.coffee', 1, 0, null, smc, assert, true); + util.assertMapping(2, 9, null, null, null, null, smc, assert, true); + util.assertMapping(3, 0, '/wu/tang/gza.coffee', 2, 0, null, smc, assert, true); + util.assertMapping(3, 9, null, null, null, null, smc, assert, true); + util.assertMapping(4, 0, '/wu/tang/gza.coffee', 3, 0, null, smc, assert, true); + util.assertMapping(4, 9, null, null, null, null, smc, assert, true); + util.assertMapping(5, 0, '/wu/tang/gza.coffee', 4, 0, null, smc, assert, true); + util.assertMapping(5, 9, null, null, null, null, smc, assert, true); + util.assertMapping(6, 0, '/wu/tang/gza.coffee', 5, 10, null, smc, assert, true); + util.assertMapping(6, 9, '/wu/tang/gza.coffee', 5, 10, null, smc, assert, true); + util.assertMapping(6, 13, null, null, null, null, smc, assert, true); + + // Original to generated + util.assertMapping(3, 2, '/wu/tang/gza.coffee', 1, 1, null, smc, assert, null, true); + util.assertMapping(4, 2, '/wu/tang/gza.coffee', 2, 3, null, smc, assert, null, true); + util.assertMapping(5, 2, '/wu/tang/gza.coffee', 3, 6, null, smc, assert, null, true); + util.assertMapping(6, 12, '/wu/tang/gza.coffee', 4, 9, null, smc, assert, null, true); + util.assertMapping(6, 12, '/wu/tang/gza.coffee', 5, 9, null, smc, assert, null, true); + util.assertMapping(null, null, '/wu/tang/gza.coffee', 6, 19, null, smc, assert, null, true); + }; + +}); diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-source-map-consumer.js b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-source-map-consumer.js new file mode 100644 index 00000000..1e2be8d9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-source-map-consumer.js @@ -0,0 +1,874 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var SourceMapConsumer = require('../../lib/source-map/source-map-consumer').SourceMapConsumer; + var IndexedSourceMapConsumer = require('../../lib/source-map/indexed-source-map-consumer').IndexedSourceMapConsumer; + var BasicSourceMapConsumer = require('../../lib/source-map/basic-source-map-consumer').BasicSourceMapConsumer; + var SourceMapGenerator = require('../../lib/source-map/source-map-generator').SourceMapGenerator; + + exports['test that we can instantiate with a string or an object'] = function (assert, util) { + assert.doesNotThrow(function () { + var map = new SourceMapConsumer(util.testMap); + }); + assert.doesNotThrow(function () { + var map = new SourceMapConsumer(JSON.stringify(util.testMap)); + }); + }; + + exports['test that the object returned from new SourceMapConsumer inherits from SourceMapConsumer'] = function (assert, util) { + assert.ok(new SourceMapConsumer(util.testMap) instanceof SourceMapConsumer); + } + + exports['test that a BasicSourceMapConsumer is returned for sourcemaps without sections'] = function(assert, util) { + assert.ok(new SourceMapConsumer(util.testMap) instanceof BasicSourceMapConsumer); + }; + + exports['test that an IndexedSourceMapConsumer is returned for sourcemaps with sections'] = function(assert, util) { + assert.ok(new SourceMapConsumer(util.indexedTestMap) instanceof IndexedSourceMapConsumer); + }; + + exports['test that the `sources` field has the original sources'] = function (assert, util) { + var map; + var sources; + + map = new SourceMapConsumer(util.testMap); + sources = map.sources; + assert.equal(sources[0], '/the/root/one.js'); + assert.equal(sources[1], '/the/root/two.js'); + assert.equal(sources.length, 2); + + map = new SourceMapConsumer(util.indexedTestMap); + sources = map.sources; + assert.equal(sources[0], '/the/root/one.js'); + assert.equal(sources[1], '/the/root/two.js'); + assert.equal(sources.length, 2); + + map = new SourceMapConsumer(util.indexedTestMapDifferentSourceRoots); + sources = map.sources; + assert.equal(sources[0], '/the/root/one.js'); + assert.equal(sources[1], '/different/root/two.js'); + assert.equal(sources.length, 2); + + map = new SourceMapConsumer(util.testMapNoSourceRoot); + sources = map.sources; + assert.equal(sources[0], 'one.js'); + assert.equal(sources[1], 'two.js'); + assert.equal(sources.length, 2); + + map = new SourceMapConsumer(util.testMapEmptySourceRoot); + sources = map.sources; + assert.equal(sources[0], 'one.js'); + assert.equal(sources[1], 'two.js'); + assert.equal(sources.length, 2); + }; + + exports['test that the source root is reflected in a mapping\'s source field'] = function (assert, util) { + var map; + var mapping; + + map = new SourceMapConsumer(util.testMap); + + mapping = map.originalPositionFor({ + line: 2, + column: 1 + }); + assert.equal(mapping.source, '/the/root/two.js'); + + mapping = map.originalPositionFor({ + line: 1, + column: 1 + }); + assert.equal(mapping.source, '/the/root/one.js'); + + + map = new SourceMapConsumer(util.testMapNoSourceRoot); + + mapping = map.originalPositionFor({ + line: 2, + column: 1 + }); + assert.equal(mapping.source, 'two.js'); + + mapping = map.originalPositionFor({ + line: 1, + column: 1 + }); + assert.equal(mapping.source, 'one.js'); + + + map = new SourceMapConsumer(util.testMapEmptySourceRoot); + + mapping = map.originalPositionFor({ + line: 2, + column: 1 + }); + assert.equal(mapping.source, 'two.js'); + + mapping = map.originalPositionFor({ + line: 1, + column: 1 + }); + assert.equal(mapping.source, 'one.js'); + }; + + exports['test mapping tokens back exactly'] = function (assert, util) { + var map = new SourceMapConsumer(util.testMap); + + util.assertMapping(1, 1, '/the/root/one.js', 1, 1, null, map, assert); + util.assertMapping(1, 5, '/the/root/one.js', 1, 5, null, map, assert); + util.assertMapping(1, 9, '/the/root/one.js', 1, 11, null, map, assert); + util.assertMapping(1, 18, '/the/root/one.js', 1, 21, 'bar', map, assert); + util.assertMapping(1, 21, '/the/root/one.js', 2, 3, null, map, assert); + util.assertMapping(1, 28, '/the/root/one.js', 2, 10, 'baz', map, assert); + util.assertMapping(1, 32, '/the/root/one.js', 2, 14, 'bar', map, assert); + + util.assertMapping(2, 1, '/the/root/two.js', 1, 1, null, map, assert); + util.assertMapping(2, 5, '/the/root/two.js', 1, 5, null, map, assert); + util.assertMapping(2, 9, '/the/root/two.js', 1, 11, null, map, assert); + util.assertMapping(2, 18, '/the/root/two.js', 1, 21, 'n', map, assert); + util.assertMapping(2, 21, '/the/root/two.js', 2, 3, null, map, assert); + util.assertMapping(2, 28, '/the/root/two.js', 2, 10, 'n', map, assert); + }; + + exports['test mapping tokens back exactly in indexed source map'] = function (assert, util) { + var map = new SourceMapConsumer(util.indexedTestMap); + + util.assertMapping(1, 1, '/the/root/one.js', 1, 1, null, map, assert); + util.assertMapping(1, 5, '/the/root/one.js', 1, 5, null, map, assert); + util.assertMapping(1, 9, '/the/root/one.js', 1, 11, null, map, assert); + util.assertMapping(1, 18, '/the/root/one.js', 1, 21, 'bar', map, assert); + util.assertMapping(1, 21, '/the/root/one.js', 2, 3, null, map, assert); + util.assertMapping(1, 28, '/the/root/one.js', 2, 10, 'baz', map, assert); + util.assertMapping(1, 32, '/the/root/one.js', 2, 14, 'bar', map, assert); + + util.assertMapping(2, 1, '/the/root/two.js', 1, 1, null, map, assert); + util.assertMapping(2, 5, '/the/root/two.js', 1, 5, null, map, assert); + util.assertMapping(2, 9, '/the/root/two.js', 1, 11, null, map, assert); + util.assertMapping(2, 18, '/the/root/two.js', 1, 21, 'n', map, assert); + util.assertMapping(2, 21, '/the/root/two.js', 2, 3, null, map, assert); + util.assertMapping(2, 28, '/the/root/two.js', 2, 10, 'n', map, assert); + }; + + + exports['test mapping tokens back exactly'] = function (assert, util) { + var map = new SourceMapConsumer(util.testMap); + + util.assertMapping(1, 1, '/the/root/one.js', 1, 1, null, map, assert); + util.assertMapping(1, 5, '/the/root/one.js', 1, 5, null, map, assert); + util.assertMapping(1, 9, '/the/root/one.js', 1, 11, null, map, assert); + util.assertMapping(1, 18, '/the/root/one.js', 1, 21, 'bar', map, assert); + util.assertMapping(1, 21, '/the/root/one.js', 2, 3, null, map, assert); + util.assertMapping(1, 28, '/the/root/one.js', 2, 10, 'baz', map, assert); + util.assertMapping(1, 32, '/the/root/one.js', 2, 14, 'bar', map, assert); + + util.assertMapping(2, 1, '/the/root/two.js', 1, 1, null, map, assert); + util.assertMapping(2, 5, '/the/root/two.js', 1, 5, null, map, assert); + util.assertMapping(2, 9, '/the/root/two.js', 1, 11, null, map, assert); + util.assertMapping(2, 18, '/the/root/two.js', 1, 21, 'n', map, assert); + util.assertMapping(2, 21, '/the/root/two.js', 2, 3, null, map, assert); + util.assertMapping(2, 28, '/the/root/two.js', 2, 10, 'n', map, assert); + }; + + exports['test mapping tokens fuzzy'] = function (assert, util) { + var map = new SourceMapConsumer(util.testMap); + + // Finding original positions + util.assertMapping(1, 16, '/the/root/one.js', 1, 21, 'bar', map, assert, true); + util.assertMapping(1, 26, '/the/root/one.js', 2, 10, 'baz', map, assert, true); + util.assertMapping(2, 6, '/the/root/two.js', 1, 11, null, map, assert, true); + + // Finding generated positions + util.assertMapping(1, 18, '/the/root/one.js', 1, 20, 'bar', map, assert, null, true); + util.assertMapping(1, 28, '/the/root/one.js', 2, 7, 'baz', map, assert, null, true); + util.assertMapping(2, 9, '/the/root/two.js', 1, 6, null, map, assert, null, true); + }; + + exports['test mapping tokens fuzzy in indexed source map'] = function (assert, util) { + var map = new SourceMapConsumer(util.indexedTestMap); + + // Finding original positions + util.assertMapping(1, 16, '/the/root/one.js', 1, 21, 'bar', map, assert, true); + util.assertMapping(1, 28, '/the/root/one.js', 2, 10, 'baz', map, assert, true); + util.assertMapping(2, 6, '/the/root/two.js', 1, 11, null, map, assert, true); + + // Finding generated positions + util.assertMapping(1, 18, '/the/root/one.js', 1, 20, 'bar', map, assert, null, true); + util.assertMapping(1, 28, '/the/root/one.js', 2, 7, 'baz', map, assert, null, true); + util.assertMapping(2, 9, '/the/root/two.js', 1, 6, null, map, assert, null, true); + }; + + exports['test mappings and end of lines'] = function (assert, util) { + var smg = new SourceMapGenerator({ + file: 'foo.js' + }); + smg.addMapping({ + original: { line: 1, column: 1 }, + generated: { line: 1, column: 1 }, + source: 'bar.js' + }); + smg.addMapping({ + original: { line: 2, column: 2 }, + generated: { line: 2, column: 2 }, + source: 'bar.js' + }); + + var map = SourceMapConsumer.fromSourceMap(smg); + + // When finding original positions, mappings end at the end of the line. + util.assertMapping(2, 3, null, null, null, null, map, assert, true) + + // When finding generated positions, mappings do not end at the end of the line. + util.assertMapping(2, 2, 'bar.js', 1, 2, null, map, assert, null, true); + }; + + exports['test creating source map consumers with )]}\' prefix'] = function (assert, util) { + assert.doesNotThrow(function () { + var map = new SourceMapConsumer(")]}'" + JSON.stringify(util.testMap)); + }); + }; + + exports['test eachMapping'] = function (assert, util) { + var map; + + map = new SourceMapConsumer(util.testMap); + var previousLine = -Infinity; + var previousColumn = -Infinity; + map.eachMapping(function (mapping) { + assert.ok(mapping.generatedLine >= previousLine); + + assert.ok(mapping.source === '/the/root/one.js' || mapping.source === '/the/root/two.js'); + + if (mapping.generatedLine === previousLine) { + assert.ok(mapping.generatedColumn >= previousColumn); + previousColumn = mapping.generatedColumn; + } + else { + previousLine = mapping.generatedLine; + previousColumn = -Infinity; + } + }); + + map = new SourceMapConsumer(util.testMapNoSourceRoot); + map.eachMapping(function (mapping) { + assert.ok(mapping.source === 'one.js' || mapping.source === 'two.js'); + }); + + map = new SourceMapConsumer(util.testMapEmptySourceRoot); + map.eachMapping(function (mapping) { + assert.ok(mapping.source === 'one.js' || mapping.source === 'two.js'); + }); + }; + + exports['test eachMapping for indexed source maps'] = function(assert, util) { + var map = new SourceMapConsumer(util.indexedTestMap); + var previousLine = -Infinity; + var previousColumn = -Infinity; + map.eachMapping(function (mapping) { + assert.ok(mapping.generatedLine >= previousLine); + + if (mapping.source) { + assert.equal(mapping.source.indexOf(util.testMap.sourceRoot), 0); + } + + if (mapping.generatedLine === previousLine) { + assert.ok(mapping.generatedColumn >= previousColumn); + previousColumn = mapping.generatedColumn; + } + else { + previousLine = mapping.generatedLine; + previousColumn = -Infinity; + } + }); + }; + + + exports['test iterating over mappings in a different order'] = function (assert, util) { + var map = new SourceMapConsumer(util.testMap); + var previousLine = -Infinity; + var previousColumn = -Infinity; + var previousSource = ""; + map.eachMapping(function (mapping) { + assert.ok(mapping.source >= previousSource); + + if (mapping.source === previousSource) { + assert.ok(mapping.originalLine >= previousLine); + + if (mapping.originalLine === previousLine) { + assert.ok(mapping.originalColumn >= previousColumn); + previousColumn = mapping.originalColumn; + } + else { + previousLine = mapping.originalLine; + previousColumn = -Infinity; + } + } + else { + previousSource = mapping.source; + previousLine = -Infinity; + previousColumn = -Infinity; + } + }, null, SourceMapConsumer.ORIGINAL_ORDER); + }; + + exports['test iterating over mappings in a different order in indexed source maps'] = function (assert, util) { + var map = new SourceMapConsumer(util.indexedTestMap); + var previousLine = -Infinity; + var previousColumn = -Infinity; + var previousSource = ""; + map.eachMapping(function (mapping) { + assert.ok(mapping.source >= previousSource); + + if (mapping.source === previousSource) { + assert.ok(mapping.originalLine >= previousLine); + + if (mapping.originalLine === previousLine) { + assert.ok(mapping.originalColumn >= previousColumn); + previousColumn = mapping.originalColumn; + } + else { + previousLine = mapping.originalLine; + previousColumn = -Infinity; + } + } + else { + previousSource = mapping.source; + previousLine = -Infinity; + previousColumn = -Infinity; + } + }, null, SourceMapConsumer.ORIGINAL_ORDER); + }; + + exports['test that we can set the context for `this` in eachMapping'] = function (assert, util) { + var map = new SourceMapConsumer(util.testMap); + var context = {}; + map.eachMapping(function () { + assert.equal(this, context); + }, context); + }; + + exports['test that we can set the context for `this` in eachMapping in indexed source maps'] = function (assert, util) { + var map = new SourceMapConsumer(util.indexedTestMap); + var context = {}; + map.eachMapping(function () { + assert.equal(this, context); + }, context); + }; + + exports['test that the `sourcesContent` field has the original sources'] = function (assert, util) { + var map = new SourceMapConsumer(util.testMapWithSourcesContent); + var sourcesContent = map.sourcesContent; + + assert.equal(sourcesContent[0], ' ONE.foo = function (bar) {\n return baz(bar);\n };'); + assert.equal(sourcesContent[1], ' TWO.inc = function (n) {\n return n + 1;\n };'); + assert.equal(sourcesContent.length, 2); + }; + + exports['test that we can get the original sources for the sources'] = function (assert, util) { + var map = new SourceMapConsumer(util.testMapWithSourcesContent); + var sources = map.sources; + + assert.equal(map.sourceContentFor(sources[0]), ' ONE.foo = function (bar) {\n return baz(bar);\n };'); + assert.equal(map.sourceContentFor(sources[1]), ' TWO.inc = function (n) {\n return n + 1;\n };'); + assert.equal(map.sourceContentFor("one.js"), ' ONE.foo = function (bar) {\n return baz(bar);\n };'); + assert.equal(map.sourceContentFor("two.js"), ' TWO.inc = function (n) {\n return n + 1;\n };'); + assert.throws(function () { + map.sourceContentFor(""); + }, Error); + assert.throws(function () { + map.sourceContentFor("/the/root/three.js"); + }, Error); + assert.throws(function () { + map.sourceContentFor("three.js"); + }, Error); + }; + + exports['test that we can get the original source content with relative source paths'] = function (assert, util) { + var map = new SourceMapConsumer(util.testMapRelativeSources); + var sources = map.sources; + + assert.equal(map.sourceContentFor(sources[0]), ' ONE.foo = function (bar) {\n return baz(bar);\n };'); + assert.equal(map.sourceContentFor(sources[1]), ' TWO.inc = function (n) {\n return n + 1;\n };'); + assert.equal(map.sourceContentFor("one.js"), ' ONE.foo = function (bar) {\n return baz(bar);\n };'); + assert.equal(map.sourceContentFor("two.js"), ' TWO.inc = function (n) {\n return n + 1;\n };'); + assert.throws(function () { + map.sourceContentFor(""); + }, Error); + assert.throws(function () { + map.sourceContentFor("/the/root/three.js"); + }, Error); + assert.throws(function () { + map.sourceContentFor("three.js"); + }, Error); + }; + + exports['test that we can get the original source content for the sources on an indexed source map'] = function (assert, util) { + var map = new SourceMapConsumer(util.indexedTestMap); + var sources = map.sources; + + assert.equal(map.sourceContentFor(sources[0]), ' ONE.foo = function (bar) {\n return baz(bar);\n };'); + assert.equal(map.sourceContentFor(sources[1]), ' TWO.inc = function (n) {\n return n + 1;\n };'); + assert.equal(map.sourceContentFor("one.js"), ' ONE.foo = function (bar) {\n return baz(bar);\n };'); + assert.equal(map.sourceContentFor("two.js"), ' TWO.inc = function (n) {\n return n + 1;\n };'); + assert.throws(function () { + map.sourceContentFor(""); + }, Error); + assert.throws(function () { + map.sourceContentFor("/the/root/three.js"); + }, Error); + assert.throws(function () { + map.sourceContentFor("three.js"); + }, Error); + }; + + + exports['test sourceRoot + generatedPositionFor'] = function (assert, util) { + var map = new SourceMapGenerator({ + sourceRoot: 'foo/bar', + file: 'baz.js' + }); + map.addMapping({ + original: { line: 1, column: 1 }, + generated: { line: 2, column: 2 }, + source: 'bang.coffee' + }); + map.addMapping({ + original: { line: 5, column: 5 }, + generated: { line: 6, column: 6 }, + source: 'bang.coffee' + }); + map = new SourceMapConsumer(map.toString()); + + // Should handle without sourceRoot. + var pos = map.generatedPositionFor({ + line: 1, + column: 1, + source: 'bang.coffee' + }); + + assert.equal(pos.line, 2); + assert.equal(pos.column, 2); + + // Should handle with sourceRoot. + var pos = map.generatedPositionFor({ + line: 1, + column: 1, + source: 'foo/bar/bang.coffee' + }); + + assert.equal(pos.line, 2); + assert.equal(pos.column, 2); + }; + + exports['test allGeneratedPositionsFor'] = function (assert, util) { + var map = new SourceMapGenerator({ + file: 'generated.js' + }); + map.addMapping({ + original: { line: 1, column: 1 }, + generated: { line: 2, column: 2 }, + source: 'foo.coffee' + }); + map.addMapping({ + original: { line: 1, column: 1 }, + generated: { line: 2, column: 2 }, + source: 'bar.coffee' + }); + map.addMapping({ + original: { line: 2, column: 1 }, + generated: { line: 3, column: 2 }, + source: 'bar.coffee' + }); + map.addMapping({ + original: { line: 2, column: 2 }, + generated: { line: 3, column: 3 }, + source: 'bar.coffee' + }); + map.addMapping({ + original: { line: 3, column: 1 }, + generated: { line: 4, column: 2 }, + source: 'bar.coffee' + }); + map = new SourceMapConsumer(map.toString()); + + var mappings = map.allGeneratedPositionsFor({ + line: 2, + source: 'bar.coffee' + }); + + assert.equal(mappings.length, 2); + assert.equal(mappings[0].line, 3); + assert.equal(mappings[0].column, 2); + assert.equal(mappings[1].line, 3); + assert.equal(mappings[1].column, 3); + }; + + exports['test allGeneratedPositionsFor for line with no mappings'] = function (assert, util) { + var map = new SourceMapGenerator({ + file: 'generated.js' + }); + map.addMapping({ + original: { line: 1, column: 1 }, + generated: { line: 2, column: 2 }, + source: 'foo.coffee' + }); + map.addMapping({ + original: { line: 1, column: 1 }, + generated: { line: 2, column: 2 }, + source: 'bar.coffee' + }); + map.addMapping({ + original: { line: 3, column: 1 }, + generated: { line: 4, column: 2 }, + source: 'bar.coffee' + }); + map = new SourceMapConsumer(map.toString()); + + var mappings = map.allGeneratedPositionsFor({ + line: 2, + source: 'bar.coffee' + }); + + assert.equal(mappings.length, 0); + }; + + exports['test allGeneratedPositionsFor source map with no mappings'] = function (assert, util) { + var map = new SourceMapGenerator({ + file: 'generated.js' + }); + map = new SourceMapConsumer(map.toString()); + + var mappings = map.allGeneratedPositionsFor({ + line: 2, + source: 'bar.coffee' + }); + + assert.equal(mappings.length, 0); + }; + + exports['test computeColumnSpans'] = function (assert, util) { + var map = new SourceMapGenerator({ + file: 'generated.js' + }); + map.addMapping({ + original: { line: 1, column: 1 }, + generated: { line: 1, column: 1 }, + source: 'foo.coffee' + }); + map.addMapping({ + original: { line: 2, column: 1 }, + generated: { line: 2, column: 1 }, + source: 'foo.coffee' + }); + map.addMapping({ + original: { line: 2, column: 2 }, + generated: { line: 2, column: 10 }, + source: 'foo.coffee' + }); + map.addMapping({ + original: { line: 2, column: 3 }, + generated: { line: 2, column: 20 }, + source: 'foo.coffee' + }); + map.addMapping({ + original: { line: 3, column: 1 }, + generated: { line: 3, column: 1 }, + source: 'foo.coffee' + }); + map.addMapping({ + original: { line: 3, column: 2 }, + generated: { line: 3, column: 2 }, + source: 'foo.coffee' + }); + map = new SourceMapConsumer(map.toString()); + + map.computeColumnSpans(); + + var mappings = map.allGeneratedPositionsFor({ + line: 1, + source: 'foo.coffee' + }); + + assert.equal(mappings.length, 1); + // assert.equal(mappings[0].lastColumn, Infinity); + + var mappings = map.allGeneratedPositionsFor({ + line: 2, + source: 'foo.coffee' + }); + + assert.equal(mappings.length, 3); + assert.equal(mappings[0].lastColumn, 9); + assert.equal(mappings[1].lastColumn, 19); + assert.equal(mappings[2].lastColumn, Infinity); + + var mappings = map.allGeneratedPositionsFor({ + line: 3, + source: 'foo.coffee' + }); + + assert.equal(mappings.length, 2); + assert.equal(mappings[0].lastColumn, 1); + assert.equal(mappings[1].lastColumn, Infinity); + }; + + exports['test sourceRoot + originalPositionFor'] = function (assert, util) { + var map = new SourceMapGenerator({ + sourceRoot: 'foo/bar', + file: 'baz.js' + }); + map.addMapping({ + original: { line: 1, column: 1 }, + generated: { line: 2, column: 2 }, + source: 'bang.coffee' + }); + map = new SourceMapConsumer(map.toString()); + + var pos = map.originalPositionFor({ + line: 2, + column: 2, + }); + + // Should always have the prepended source root + assert.equal(pos.source, 'foo/bar/bang.coffee'); + assert.equal(pos.line, 1); + assert.equal(pos.column, 1); + }; + + exports['test github issue #56'] = function (assert, util) { + var map = new SourceMapGenerator({ + sourceRoot: 'http://', + file: 'www.example.com/foo.js' + }); + map.addMapping({ + original: { line: 1, column: 1 }, + generated: { line: 2, column: 2 }, + source: 'www.example.com/original.js' + }); + map = new SourceMapConsumer(map.toString()); + + var sources = map.sources; + assert.equal(sources.length, 1); + assert.equal(sources[0], 'http://www.example.com/original.js'); + }; + + exports['test github issue #43'] = function (assert, util) { + var map = new SourceMapGenerator({ + sourceRoot: 'http://example.com', + file: 'foo.js' + }); + map.addMapping({ + original: { line: 1, column: 1 }, + generated: { line: 2, column: 2 }, + source: 'http://cdn.example.com/original.js' + }); + map = new SourceMapConsumer(map.toString()); + + var sources = map.sources; + assert.equal(sources.length, 1, + 'Should only be one source.'); + assert.equal(sources[0], 'http://cdn.example.com/original.js', + 'Should not be joined with the sourceRoot.'); + }; + + exports['test absolute path, but same host sources'] = function (assert, util) { + var map = new SourceMapGenerator({ + sourceRoot: 'http://example.com/foo/bar', + file: 'foo.js' + }); + map.addMapping({ + original: { line: 1, column: 1 }, + generated: { line: 2, column: 2 }, + source: '/original.js' + }); + map = new SourceMapConsumer(map.toString()); + + var sources = map.sources; + assert.equal(sources.length, 1, + 'Should only be one source.'); + assert.equal(sources[0], 'http://example.com/original.js', + 'Source should be relative the host of the source root.'); + }; + + exports['test indexed source map errors when sections are out of order by line'] = function(assert, util) { + // Make a deep copy of the indexedTestMap + var misorderedIndexedTestMap = JSON.parse(JSON.stringify(util.indexedTestMap)); + + misorderedIndexedTestMap.sections[0].offset = { + line: 2, + column: 0 + }; + + assert.throws(function() { + new SourceMapConsumer(misorderedIndexedTestMap); + }, Error); + }; + + exports['test github issue #64'] = function (assert, util) { + var map = new SourceMapConsumer({ + "version": 3, + "file": "foo.js", + "sourceRoot": "http://example.com/", + "sources": ["/a"], + "names": [], + "mappings": "AACA", + "sourcesContent": ["foo"] + }); + + assert.equal(map.sourceContentFor("a"), "foo"); + assert.equal(map.sourceContentFor("/a"), "foo"); + }; + + exports['test bug 885597'] = function (assert, util) { + var map = new SourceMapConsumer({ + "version": 3, + "file": "foo.js", + "sourceRoot": "file:///Users/AlGore/Invented/The/Internet/", + "sources": ["/a"], + "names": [], + "mappings": "AACA", + "sourcesContent": ["foo"] + }); + + var s = map.sources[0]; + assert.equal(map.sourceContentFor(s), "foo"); + }; + + exports['test github issue #72, duplicate sources'] = function (assert, util) { + var map = new SourceMapConsumer({ + "version": 3, + "file": "foo.js", + "sources": ["source1.js", "source1.js", "source3.js"], + "names": [], + "mappings": ";EAAC;;IAEE;;MEEE", + "sourceRoot": "http://example.com" + }); + + var pos = map.originalPositionFor({ + line: 2, + column: 2 + }); + assert.equal(pos.source, 'http://example.com/source1.js'); + assert.equal(pos.line, 1); + assert.equal(pos.column, 1); + + var pos = map.originalPositionFor({ + line: 4, + column: 4 + }); + assert.equal(pos.source, 'http://example.com/source1.js'); + assert.equal(pos.line, 3); + assert.equal(pos.column, 3); + + var pos = map.originalPositionFor({ + line: 6, + column: 6 + }); + assert.equal(pos.source, 'http://example.com/source3.js'); + assert.equal(pos.line, 5); + assert.equal(pos.column, 5); + }; + + exports['test github issue #72, duplicate names'] = function (assert, util) { + var map = new SourceMapConsumer({ + "version": 3, + "file": "foo.js", + "sources": ["source.js"], + "names": ["name1", "name1", "name3"], + "mappings": ";EAACA;;IAEEA;;MAEEE", + "sourceRoot": "http://example.com" + }); + + var pos = map.originalPositionFor({ + line: 2, + column: 2 + }); + assert.equal(pos.name, 'name1'); + assert.equal(pos.line, 1); + assert.equal(pos.column, 1); + + var pos = map.originalPositionFor({ + line: 4, + column: 4 + }); + assert.equal(pos.name, 'name1'); + assert.equal(pos.line, 3); + assert.equal(pos.column, 3); + + var pos = map.originalPositionFor({ + line: 6, + column: 6 + }); + assert.equal(pos.name, 'name3'); + assert.equal(pos.line, 5); + assert.equal(pos.column, 5); + }; + + exports['test SourceMapConsumer.fromSourceMap'] = function (assert, util) { + var smg = new SourceMapGenerator({ + sourceRoot: 'http://example.com/', + file: 'foo.js' + }); + smg.addMapping({ + original: { line: 1, column: 1 }, + generated: { line: 2, column: 2 }, + source: 'bar.js' + }); + smg.addMapping({ + original: { line: 2, column: 2 }, + generated: { line: 4, column: 4 }, + source: 'baz.js', + name: 'dirtMcGirt' + }); + smg.setSourceContent('baz.js', 'baz.js content'); + + var smc = SourceMapConsumer.fromSourceMap(smg); + assert.equal(smc.file, 'foo.js'); + assert.equal(smc.sourceRoot, 'http://example.com/'); + assert.equal(smc.sources.length, 2); + assert.equal(smc.sources[0], 'http://example.com/bar.js'); + assert.equal(smc.sources[1], 'http://example.com/baz.js'); + assert.equal(smc.sourceContentFor('baz.js'), 'baz.js content'); + + var pos = smc.originalPositionFor({ + line: 2, + column: 2 + }); + assert.equal(pos.line, 1); + assert.equal(pos.column, 1); + assert.equal(pos.source, 'http://example.com/bar.js'); + assert.equal(pos.name, null); + + pos = smc.generatedPositionFor({ + line: 1, + column: 1, + source: 'http://example.com/bar.js' + }); + assert.equal(pos.line, 2); + assert.equal(pos.column, 2); + + pos = smc.originalPositionFor({ + line: 4, + column: 4 + }); + assert.equal(pos.line, 2); + assert.equal(pos.column, 2); + assert.equal(pos.source, 'http://example.com/baz.js'); + assert.equal(pos.name, 'dirtMcGirt'); + + pos = smc.generatedPositionFor({ + line: 2, + column: 2, + source: 'http://example.com/baz.js' + }); + assert.equal(pos.line, 4); + assert.equal(pos.column, 4); + }; +}); diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-source-map-generator.js b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-source-map-generator.js new file mode 100644 index 00000000..d748bb18 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-source-map-generator.js @@ -0,0 +1,679 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var SourceMapGenerator = require('../../lib/source-map/source-map-generator').SourceMapGenerator; + var SourceMapConsumer = require('../../lib/source-map/source-map-consumer').SourceMapConsumer; + var SourceNode = require('../../lib/source-map/source-node').SourceNode; + var util = require('./util'); + + exports['test some simple stuff'] = function (assert, util) { + var map = new SourceMapGenerator({ + file: 'foo.js', + sourceRoot: '.' + }); + assert.ok(true); + + var map = new SourceMapGenerator().toJSON(); + assert.ok(!('file' in map)); + assert.ok(!('sourceRoot' in map)); + }; + + exports['test JSON serialization'] = function (assert, util) { + var map = new SourceMapGenerator({ + file: 'foo.js', + sourceRoot: '.' + }); + assert.equal(map.toString(), JSON.stringify(map)); + }; + + exports['test adding mappings (case 1)'] = function (assert, util) { + var map = new SourceMapGenerator({ + file: 'generated-foo.js', + sourceRoot: '.' + }); + + assert.doesNotThrow(function () { + map.addMapping({ + generated: { line: 1, column: 1 } + }); + }); + }; + + exports['test adding mappings (case 2)'] = function (assert, util) { + var map = new SourceMapGenerator({ + file: 'generated-foo.js', + sourceRoot: '.' + }); + + assert.doesNotThrow(function () { + map.addMapping({ + generated: { line: 1, column: 1 }, + source: 'bar.js', + original: { line: 1, column: 1 } + }); + }); + }; + + exports['test adding mappings (case 3)'] = function (assert, util) { + var map = new SourceMapGenerator({ + file: 'generated-foo.js', + sourceRoot: '.' + }); + + assert.doesNotThrow(function () { + map.addMapping({ + generated: { line: 1, column: 1 }, + source: 'bar.js', + original: { line: 1, column: 1 }, + name: 'someToken' + }); + }); + }; + + exports['test adding mappings (invalid)'] = function (assert, util) { + var map = new SourceMapGenerator({ + file: 'generated-foo.js', + sourceRoot: '.' + }); + + // Not enough info. + assert.throws(function () { + map.addMapping({}); + }); + + // Original file position, but no source. + assert.throws(function () { + map.addMapping({ + generated: { line: 1, column: 1 }, + original: { line: 1, column: 1 } + }); + }); + }; + + exports['test adding mappings with skipValidation'] = function (assert, util) { + var map = new SourceMapGenerator({ + file: 'generated-foo.js', + sourceRoot: '.', + skipValidation: true + }); + + // Not enough info, caught by `util.getArgs` + assert.throws(function () { + map.addMapping({}); + }); + + // Original file position, but no source. Not checked. + assert.doesNotThrow(function () { + map.addMapping({ + generated: { line: 1, column: 1 }, + original: { line: 1, column: 1 } + }); + }); + }; + + exports['test that the correct mappings are being generated'] = function (assert, util) { + var map = new SourceMapGenerator({ + file: 'min.js', + sourceRoot: '/the/root' + }); + + map.addMapping({ + generated: { line: 1, column: 1 }, + original: { line: 1, column: 1 }, + source: 'one.js' + }); + map.addMapping({ + generated: { line: 1, column: 5 }, + original: { line: 1, column: 5 }, + source: 'one.js' + }); + map.addMapping({ + generated: { line: 1, column: 9 }, + original: { line: 1, column: 11 }, + source: 'one.js' + }); + map.addMapping({ + generated: { line: 1, column: 18 }, + original: { line: 1, column: 21 }, + source: 'one.js', + name: 'bar' + }); + map.addMapping({ + generated: { line: 1, column: 21 }, + original: { line: 2, column: 3 }, + source: 'one.js' + }); + map.addMapping({ + generated: { line: 1, column: 28 }, + original: { line: 2, column: 10 }, + source: 'one.js', + name: 'baz' + }); + map.addMapping({ + generated: { line: 1, column: 32 }, + original: { line: 2, column: 14 }, + source: 'one.js', + name: 'bar' + }); + + map.addMapping({ + generated: { line: 2, column: 1 }, + original: { line: 1, column: 1 }, + source: 'two.js' + }); + map.addMapping({ + generated: { line: 2, column: 5 }, + original: { line: 1, column: 5 }, + source: 'two.js' + }); + map.addMapping({ + generated: { line: 2, column: 9 }, + original: { line: 1, column: 11 }, + source: 'two.js' + }); + map.addMapping({ + generated: { line: 2, column: 18 }, + original: { line: 1, column: 21 }, + source: 'two.js', + name: 'n' + }); + map.addMapping({ + generated: { line: 2, column: 21 }, + original: { line: 2, column: 3 }, + source: 'two.js' + }); + map.addMapping({ + generated: { line: 2, column: 28 }, + original: { line: 2, column: 10 }, + source: 'two.js', + name: 'n' + }); + + map = JSON.parse(map.toString()); + + util.assertEqualMaps(assert, map, util.testMap); + }; + + exports['test that adding a mapping with an empty string name does not break generation'] = function (assert, util) { + var map = new SourceMapGenerator({ + file: 'generated-foo.js', + sourceRoot: '.' + }); + + map.addMapping({ + generated: { line: 1, column: 1 }, + source: 'bar.js', + original: { line: 1, column: 1 }, + name: '' + }); + + assert.doesNotThrow(function () { + JSON.parse(map.toString()); + }); + }; + + exports['test that source content can be set'] = function (assert, util) { + var map = new SourceMapGenerator({ + file: 'min.js', + sourceRoot: '/the/root' + }); + map.addMapping({ + generated: { line: 1, column: 1 }, + original: { line: 1, column: 1 }, + source: 'one.js' + }); + map.addMapping({ + generated: { line: 2, column: 1 }, + original: { line: 1, column: 1 }, + source: 'two.js' + }); + map.setSourceContent('one.js', 'one file content'); + + map = JSON.parse(map.toString()); + assert.equal(map.sources[0], 'one.js'); + assert.equal(map.sources[1], 'two.js'); + assert.equal(map.sourcesContent[0], 'one file content'); + assert.equal(map.sourcesContent[1], null); + }; + + exports['test .fromSourceMap'] = function (assert, util) { + var map = SourceMapGenerator.fromSourceMap(new SourceMapConsumer(util.testMap)); + util.assertEqualMaps(assert, map.toJSON(), util.testMap); + }; + + exports['test .fromSourceMap with sourcesContent'] = function (assert, util) { + var map = SourceMapGenerator.fromSourceMap( + new SourceMapConsumer(util.testMapWithSourcesContent)); + util.assertEqualMaps(assert, map.toJSON(), util.testMapWithSourcesContent); + }; + + exports['test applySourceMap'] = function (assert, util) { + var node = new SourceNode(null, null, null, [ + new SourceNode(2, 0, 'fileX', 'lineX2\n'), + 'genA1\n', + new SourceNode(2, 0, 'fileY', 'lineY2\n'), + 'genA2\n', + new SourceNode(1, 0, 'fileX', 'lineX1\n'), + 'genA3\n', + new SourceNode(1, 0, 'fileY', 'lineY1\n') + ]); + var mapStep1 = node.toStringWithSourceMap({ + file: 'fileA' + }).map; + mapStep1.setSourceContent('fileX', 'lineX1\nlineX2\n'); + mapStep1 = mapStep1.toJSON(); + + node = new SourceNode(null, null, null, [ + 'gen1\n', + new SourceNode(1, 0, 'fileA', 'lineA1\n'), + new SourceNode(2, 0, 'fileA', 'lineA2\n'), + new SourceNode(3, 0, 'fileA', 'lineA3\n'), + new SourceNode(4, 0, 'fileA', 'lineA4\n'), + new SourceNode(1, 0, 'fileB', 'lineB1\n'), + new SourceNode(2, 0, 'fileB', 'lineB2\n'), + 'gen2\n' + ]); + var mapStep2 = node.toStringWithSourceMap({ + file: 'fileGen' + }).map; + mapStep2.setSourceContent('fileB', 'lineB1\nlineB2\n'); + mapStep2 = mapStep2.toJSON(); + + node = new SourceNode(null, null, null, [ + 'gen1\n', + new SourceNode(2, 0, 'fileX', 'lineA1\n'), + new SourceNode(2, 0, 'fileA', 'lineA2\n'), + new SourceNode(2, 0, 'fileY', 'lineA3\n'), + new SourceNode(4, 0, 'fileA', 'lineA4\n'), + new SourceNode(1, 0, 'fileB', 'lineB1\n'), + new SourceNode(2, 0, 'fileB', 'lineB2\n'), + 'gen2\n' + ]); + var expectedMap = node.toStringWithSourceMap({ + file: 'fileGen' + }).map; + expectedMap.setSourceContent('fileX', 'lineX1\nlineX2\n'); + expectedMap.setSourceContent('fileB', 'lineB1\nlineB2\n'); + expectedMap = expectedMap.toJSON(); + + // apply source map "mapStep1" to "mapStep2" + var generator = SourceMapGenerator.fromSourceMap(new SourceMapConsumer(mapStep2)); + generator.applySourceMap(new SourceMapConsumer(mapStep1)); + var actualMap = generator.toJSON(); + + util.assertEqualMaps(assert, actualMap, expectedMap); + }; + + exports['test applySourceMap throws when file is missing'] = function (assert, util) { + var map = new SourceMapGenerator({ + file: 'test.js' + }); + var map2 = new SourceMapGenerator(); + assert.throws(function() { + map.applySourceMap(new SourceMapConsumer(map2.toJSON())); + }); + }; + + exports['test the two additional parameters of applySourceMap'] = function (assert, util) { + // Assume the following directory structure: + // + // http://foo.org/ + // bar.coffee + // app/ + // coffee/ + // foo.coffee + // temp/ + // bundle.js + // temp_maps/ + // bundle.js.map + // public/ + // bundle.min.js + // bundle.min.js.map + // + // http://www.example.com/ + // baz.coffee + + var bundleMap = new SourceMapGenerator({ + file: 'bundle.js' + }); + bundleMap.addMapping({ + generated: { line: 3, column: 3 }, + original: { line: 2, column: 2 }, + source: '../../coffee/foo.coffee' + }); + bundleMap.setSourceContent('../../coffee/foo.coffee', 'foo coffee'); + bundleMap.addMapping({ + generated: { line: 13, column: 13 }, + original: { line: 12, column: 12 }, + source: '/bar.coffee' + }); + bundleMap.setSourceContent('/bar.coffee', 'bar coffee'); + bundleMap.addMapping({ + generated: { line: 23, column: 23 }, + original: { line: 22, column: 22 }, + source: 'http://www.example.com/baz.coffee' + }); + bundleMap.setSourceContent( + 'http://www.example.com/baz.coffee', + 'baz coffee' + ); + bundleMap = new SourceMapConsumer(bundleMap.toJSON()); + + var minifiedMap = new SourceMapGenerator({ + file: 'bundle.min.js', + sourceRoot: '..' + }); + minifiedMap.addMapping({ + generated: { line: 1, column: 1 }, + original: { line: 3, column: 3 }, + source: 'temp/bundle.js' + }); + minifiedMap.addMapping({ + generated: { line: 11, column: 11 }, + original: { line: 13, column: 13 }, + source: 'temp/bundle.js' + }); + minifiedMap.addMapping({ + generated: { line: 21, column: 21 }, + original: { line: 23, column: 23 }, + source: 'temp/bundle.js' + }); + minifiedMap = new SourceMapConsumer(minifiedMap.toJSON()); + + var expectedMap = function (sources) { + var map = new SourceMapGenerator({ + file: 'bundle.min.js', + sourceRoot: '..' + }); + map.addMapping({ + generated: { line: 1, column: 1 }, + original: { line: 2, column: 2 }, + source: sources[0] + }); + map.setSourceContent(sources[0], 'foo coffee'); + map.addMapping({ + generated: { line: 11, column: 11 }, + original: { line: 12, column: 12 }, + source: sources[1] + }); + map.setSourceContent(sources[1], 'bar coffee'); + map.addMapping({ + generated: { line: 21, column: 21 }, + original: { line: 22, column: 22 }, + source: sources[2] + }); + map.setSourceContent(sources[2], 'baz coffee'); + return map.toJSON(); + } + + var actualMap = function (aSourceMapPath) { + var map = SourceMapGenerator.fromSourceMap(minifiedMap); + // Note that relying on `bundleMap.file` (which is simply 'bundle.js') + // instead of supplying the second parameter wouldn't work here. + map.applySourceMap(bundleMap, '../temp/bundle.js', aSourceMapPath); + return map.toJSON(); + } + + util.assertEqualMaps(assert, actualMap('../temp/temp_maps'), expectedMap([ + 'coffee/foo.coffee', + '/bar.coffee', + 'http://www.example.com/baz.coffee' + ])); + + util.assertEqualMaps(assert, actualMap('/app/temp/temp_maps'), expectedMap([ + '/app/coffee/foo.coffee', + '/bar.coffee', + 'http://www.example.com/baz.coffee' + ])); + + util.assertEqualMaps(assert, actualMap('http://foo.org/app/temp/temp_maps'), expectedMap([ + 'http://foo.org/app/coffee/foo.coffee', + 'http://foo.org/bar.coffee', + 'http://www.example.com/baz.coffee' + ])); + + // If the third parameter is omitted or set to the current working + // directory we get incorrect source paths: + + util.assertEqualMaps(assert, actualMap(), expectedMap([ + '../coffee/foo.coffee', + '/bar.coffee', + 'http://www.example.com/baz.coffee' + ])); + + util.assertEqualMaps(assert, actualMap(''), expectedMap([ + '../coffee/foo.coffee', + '/bar.coffee', + 'http://www.example.com/baz.coffee' + ])); + + util.assertEqualMaps(assert, actualMap('.'), expectedMap([ + '../coffee/foo.coffee', + '/bar.coffee', + 'http://www.example.com/baz.coffee' + ])); + + util.assertEqualMaps(assert, actualMap('./'), expectedMap([ + '../coffee/foo.coffee', + '/bar.coffee', + 'http://www.example.com/baz.coffee' + ])); + }; + + exports['test applySourceMap name handling'] = function (assert, util) { + // Imagine some CoffeeScript code being compiled into JavaScript and then + // minified. + + var assertName = function(coffeeName, jsName, expectedName) { + var minifiedMap = new SourceMapGenerator({ + file: 'test.js.min' + }); + minifiedMap.addMapping({ + generated: { line: 1, column: 4 }, + original: { line: 1, column: 4 }, + source: 'test.js', + name: jsName + }); + + var coffeeMap = new SourceMapGenerator({ + file: 'test.js' + }); + coffeeMap.addMapping({ + generated: { line: 1, column: 4 }, + original: { line: 1, column: 0 }, + source: 'test.coffee', + name: coffeeName + }); + + minifiedMap.applySourceMap(new SourceMapConsumer(coffeeMap.toJSON())); + + new SourceMapConsumer(minifiedMap.toJSON()).eachMapping(function(mapping) { + assert.equal(mapping.name, expectedName); + }); + }; + + // `foo = 1` -> `var foo = 1;` -> `var a=1` + // CoffeeScript doesn’t rename variables, so there’s no need for it to + // provide names in its source maps. Minifiers do rename variables and + // therefore do provide names in their source maps. So that name should be + // retained if the original map lacks names. + assertName(null, 'foo', 'foo'); + + // `foo = 1` -> `var coffee$foo = 1;` -> `var a=1` + // Imagine that CoffeeScript prefixed all variables with `coffee$`. Even + // though the minifier then also provides a name, the original name is + // what corresponds to the source. + assertName('foo', 'coffee$foo', 'foo'); + + // `foo = 1` -> `var coffee$foo = 1;` -> `var coffee$foo=1` + // Minifiers can turn off variable mangling. Then there’s no need to + // provide names in the source map, but the names from the original map are + // still needed. + assertName('foo', null, 'foo'); + + // `foo = 1` -> `var foo = 1;` -> `var foo=1` + // No renaming at all. + assertName(null, null, null); + }; + + exports['test sorting with duplicate generated mappings'] = function (assert, util) { + var map = new SourceMapGenerator({ + file: 'test.js' + }); + map.addMapping({ + generated: { line: 3, column: 0 }, + original: { line: 2, column: 0 }, + source: 'a.js' + }); + map.addMapping({ + generated: { line: 2, column: 0 } + }); + map.addMapping({ + generated: { line: 2, column: 0 } + }); + map.addMapping({ + generated: { line: 1, column: 0 }, + original: { line: 1, column: 0 }, + source: 'a.js' + }); + + util.assertEqualMaps(assert, map.toJSON(), { + version: 3, + file: 'test.js', + sources: ['a.js'], + names: [], + mappings: 'AAAA;A;AACA' + }); + }; + + exports['test ignore duplicate mappings.'] = function (assert, util) { + var init = { file: 'min.js', sourceRoot: '/the/root' }; + var map1, map2; + + // null original source location + var nullMapping1 = { + generated: { line: 1, column: 0 } + }; + var nullMapping2 = { + generated: { line: 2, column: 2 } + }; + + map1 = new SourceMapGenerator(init); + map2 = new SourceMapGenerator(init); + + map1.addMapping(nullMapping1); + map1.addMapping(nullMapping1); + + map2.addMapping(nullMapping1); + + util.assertEqualMaps(assert, map1.toJSON(), map2.toJSON()); + + map1.addMapping(nullMapping2); + map1.addMapping(nullMapping1); + + map2.addMapping(nullMapping2); + + util.assertEqualMaps(assert, map1.toJSON(), map2.toJSON()); + + // original source location + var srcMapping1 = { + generated: { line: 1, column: 0 }, + original: { line: 11, column: 0 }, + source: 'srcMapping1.js' + }; + var srcMapping2 = { + generated: { line: 2, column: 2 }, + original: { line: 11, column: 0 }, + source: 'srcMapping2.js' + }; + + map1 = new SourceMapGenerator(init); + map2 = new SourceMapGenerator(init); + + map1.addMapping(srcMapping1); + map1.addMapping(srcMapping1); + + map2.addMapping(srcMapping1); + + util.assertEqualMaps(assert, map1.toJSON(), map2.toJSON()); + + map1.addMapping(srcMapping2); + map1.addMapping(srcMapping1); + + map2.addMapping(srcMapping2); + + util.assertEqualMaps(assert, map1.toJSON(), map2.toJSON()); + + // full original source and name information + var fullMapping1 = { + generated: { line: 1, column: 0 }, + original: { line: 11, column: 0 }, + source: 'fullMapping1.js', + name: 'fullMapping1' + }; + var fullMapping2 = { + generated: { line: 2, column: 2 }, + original: { line: 11, column: 0 }, + source: 'fullMapping2.js', + name: 'fullMapping2' + }; + + map1 = new SourceMapGenerator(init); + map2 = new SourceMapGenerator(init); + + map1.addMapping(fullMapping1); + map1.addMapping(fullMapping1); + + map2.addMapping(fullMapping1); + + util.assertEqualMaps(assert, map1.toJSON(), map2.toJSON()); + + map1.addMapping(fullMapping2); + map1.addMapping(fullMapping1); + + map2.addMapping(fullMapping2); + + util.assertEqualMaps(assert, map1.toJSON(), map2.toJSON()); + }; + + exports['test github issue #72, check for duplicate names or sources'] = function (assert, util) { + var map = new SourceMapGenerator({ + file: 'test.js' + }); + map.addMapping({ + generated: { line: 1, column: 1 }, + original: { line: 2, column: 2 }, + source: 'a.js', + name: 'foo' + }); + map.addMapping({ + generated: { line: 3, column: 3 }, + original: { line: 4, column: 4 }, + source: 'a.js', + name: 'foo' + }); + util.assertEqualMaps(assert, map.toJSON(), { + version: 3, + file: 'test.js', + sources: ['a.js'], + names: ['foo'], + mappings: 'CACEA;;GAEEA' + }); + }; + + exports['test setting sourcesContent to null when already null'] = function (assert, util) { + var smg = new SourceMapGenerator({ file: "foo.js" }); + assert.doesNotThrow(function() { + smg.setSourceContent("bar.js", null); + }); + }; + +}); diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-source-node.js b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-source-node.js new file mode 100644 index 00000000..139af4e4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-source-node.js @@ -0,0 +1,612 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var SourceMapGenerator = require('../../lib/source-map/source-map-generator').SourceMapGenerator; + var SourceMapConsumer = require('../../lib/source-map/source-map-consumer').SourceMapConsumer; + var SourceNode = require('../../lib/source-map/source-node').SourceNode; + + function forEachNewline(fn) { + return function (assert, util) { + ['\n', '\r\n'].forEach(fn.bind(null, assert, util)); + } + } + + exports['test .add()'] = function (assert, util) { + var node = new SourceNode(null, null, null); + + // Adding a string works. + node.add('function noop() {}'); + + // Adding another source node works. + node.add(new SourceNode(null, null, null)); + + // Adding an array works. + node.add(['function foo() {', + new SourceNode(null, null, null, + 'return 10;'), + '}']); + + // Adding other stuff doesn't. + assert.throws(function () { + node.add({}); + }); + assert.throws(function () { + node.add(function () {}); + }); + }; + + exports['test .prepend()'] = function (assert, util) { + var node = new SourceNode(null, null, null); + + // Prepending a string works. + node.prepend('function noop() {}'); + assert.equal(node.children[0], 'function noop() {}'); + assert.equal(node.children.length, 1); + + // Prepending another source node works. + node.prepend(new SourceNode(null, null, null)); + assert.equal(node.children[0], ''); + assert.equal(node.children[1], 'function noop() {}'); + assert.equal(node.children.length, 2); + + // Prepending an array works. + node.prepend(['function foo() {', + new SourceNode(null, null, null, + 'return 10;'), + '}']); + assert.equal(node.children[0], 'function foo() {'); + assert.equal(node.children[1], 'return 10;'); + assert.equal(node.children[2], '}'); + assert.equal(node.children[3], ''); + assert.equal(node.children[4], 'function noop() {}'); + assert.equal(node.children.length, 5); + + // Prepending other stuff doesn't. + assert.throws(function () { + node.prepend({}); + }); + assert.throws(function () { + node.prepend(function () {}); + }); + }; + + exports['test .toString()'] = function (assert, util) { + assert.equal((new SourceNode(null, null, null, + ['function foo() {', + new SourceNode(null, null, null, 'return 10;'), + '}'])).toString(), + 'function foo() {return 10;}'); + }; + + exports['test .join()'] = function (assert, util) { + assert.equal((new SourceNode(null, null, null, + ['a', 'b', 'c', 'd'])).join(', ').toString(), + 'a, b, c, d'); + }; + + exports['test .walk()'] = function (assert, util) { + var node = new SourceNode(null, null, null, + ['(function () {\n', + ' ', new SourceNode(1, 0, 'a.js', ['someCall()']), ';\n', + ' ', new SourceNode(2, 0, 'b.js', ['if (foo) bar()']), ';\n', + '}());']); + var expected = [ + { str: '(function () {\n', source: null, line: null, column: null }, + { str: ' ', source: null, line: null, column: null }, + { str: 'someCall()', source: 'a.js', line: 1, column: 0 }, + { str: ';\n', source: null, line: null, column: null }, + { str: ' ', source: null, line: null, column: null }, + { str: 'if (foo) bar()', source: 'b.js', line: 2, column: 0 }, + { str: ';\n', source: null, line: null, column: null }, + { str: '}());', source: null, line: null, column: null }, + ]; + var i = 0; + node.walk(function (chunk, loc) { + assert.equal(expected[i].str, chunk); + assert.equal(expected[i].source, loc.source); + assert.equal(expected[i].line, loc.line); + assert.equal(expected[i].column, loc.column); + i++; + }); + }; + + exports['test .replaceRight'] = function (assert, util) { + var node; + + // Not nested + node = new SourceNode(null, null, null, 'hello world'); + node.replaceRight(/world/, 'universe'); + assert.equal(node.toString(), 'hello universe'); + + // Nested + node = new SourceNode(null, null, null, + [new SourceNode(null, null, null, 'hey sexy mama, '), + new SourceNode(null, null, null, 'want to kill all humans?')]); + node.replaceRight(/kill all humans/, 'watch Futurama'); + assert.equal(node.toString(), 'hey sexy mama, want to watch Futurama?'); + }; + + exports['test .toStringWithSourceMap()'] = forEachNewline(function (assert, util, nl) { + var node = new SourceNode(null, null, null, + ['(function () {' + nl, + ' ', + new SourceNode(1, 0, 'a.js', 'someCall', 'originalCall'), + new SourceNode(1, 8, 'a.js', '()'), + ';' + nl, + ' ', new SourceNode(2, 0, 'b.js', ['if (foo) bar()']), ';' + nl, + '}());']); + var result = node.toStringWithSourceMap({ + file: 'foo.js' + }); + + assert.equal(result.code, [ + '(function () {', + ' someCall();', + ' if (foo) bar();', + '}());' + ].join(nl)); + + var map = result.map; + var mapWithoutOptions = node.toStringWithSourceMap().map; + + assert.ok(map instanceof SourceMapGenerator, 'map instanceof SourceMapGenerator'); + assert.ok(mapWithoutOptions instanceof SourceMapGenerator, 'mapWithoutOptions instanceof SourceMapGenerator'); + assert.ok(!('file' in mapWithoutOptions)); + mapWithoutOptions._file = 'foo.js'; + util.assertEqualMaps(assert, map.toJSON(), mapWithoutOptions.toJSON()); + + map = new SourceMapConsumer(map.toString()); + + var actual; + + actual = map.originalPositionFor({ + line: 1, + column: 4 + }); + assert.equal(actual.source, null); + assert.equal(actual.line, null); + assert.equal(actual.column, null); + + actual = map.originalPositionFor({ + line: 2, + column: 2 + }); + assert.equal(actual.source, 'a.js'); + assert.equal(actual.line, 1); + assert.equal(actual.column, 0); + assert.equal(actual.name, 'originalCall'); + + actual = map.originalPositionFor({ + line: 3, + column: 2 + }); + assert.equal(actual.source, 'b.js'); + assert.equal(actual.line, 2); + assert.equal(actual.column, 0); + + actual = map.originalPositionFor({ + line: 3, + column: 16 + }); + assert.equal(actual.source, null); + assert.equal(actual.line, null); + assert.equal(actual.column, null); + + actual = map.originalPositionFor({ + line: 4, + column: 2 + }); + assert.equal(actual.source, null); + assert.equal(actual.line, null); + assert.equal(actual.column, null); + }); + + exports['test .fromStringWithSourceMap()'] = forEachNewline(function (assert, util, nl) { + var testCode = util.testGeneratedCode.replace(/\n/g, nl); + var node = SourceNode.fromStringWithSourceMap( + testCode, + new SourceMapConsumer(util.testMap)); + + var result = node.toStringWithSourceMap({ + file: 'min.js' + }); + var map = result.map; + var code = result.code; + + assert.equal(code, testCode); + assert.ok(map instanceof SourceMapGenerator, 'map instanceof SourceMapGenerator'); + map = map.toJSON(); + assert.equal(map.version, util.testMap.version); + assert.equal(map.file, util.testMap.file); + assert.equal(map.mappings, util.testMap.mappings); + }); + + exports['test .fromStringWithSourceMap() empty map'] = forEachNewline(function (assert, util, nl) { + var node = SourceNode.fromStringWithSourceMap( + util.testGeneratedCode.replace(/\n/g, nl), + new SourceMapConsumer(util.emptyMap)); + var result = node.toStringWithSourceMap({ + file: 'min.js' + }); + var map = result.map; + var code = result.code; + + assert.equal(code, util.testGeneratedCode.replace(/\n/g, nl)); + assert.ok(map instanceof SourceMapGenerator, 'map instanceof SourceMapGenerator'); + map = map.toJSON(); + assert.equal(map.version, util.emptyMap.version); + assert.equal(map.file, util.emptyMap.file); + assert.equal(map.mappings.length, util.emptyMap.mappings.length); + assert.equal(map.mappings, util.emptyMap.mappings); + }); + + exports['test .fromStringWithSourceMap() complex version'] = forEachNewline(function (assert, util, nl) { + var input = new SourceNode(null, null, null, [ + "(function() {" + nl, + " var Test = {};" + nl, + " ", new SourceNode(1, 0, "a.js", "Test.A = { value: 1234 };" + nl), + " ", new SourceNode(2, 0, "a.js", "Test.A.x = 'xyz';"), nl, + "}());" + nl, + "/* Generated Source */"]); + input = input.toStringWithSourceMap({ + file: 'foo.js' + }); + + var node = SourceNode.fromStringWithSourceMap( + input.code, + new SourceMapConsumer(input.map.toString())); + + var result = node.toStringWithSourceMap({ + file: 'foo.js' + }); + var map = result.map; + var code = result.code; + + assert.equal(code, input.code); + assert.ok(map instanceof SourceMapGenerator, 'map instanceof SourceMapGenerator'); + map = map.toJSON(); + var inputMap = input.map.toJSON(); + util.assertEqualMaps(assert, map, inputMap); + }); + + exports['test .fromStringWithSourceMap() third argument'] = function (assert, util) { + // Assume the following directory structure: + // + // http://foo.org/ + // bar.coffee + // app/ + // coffee/ + // foo.coffee + // coffeeBundle.js # Made from {foo,bar,baz}.coffee + // maps/ + // coffeeBundle.js.map + // js/ + // foo.js + // public/ + // app.js # Made from {foo,coffeeBundle}.js + // app.js.map + // + // http://www.example.com/ + // baz.coffee + + var coffeeBundle = new SourceNode(1, 0, 'foo.coffee', 'foo(coffee);\n'); + coffeeBundle.setSourceContent('foo.coffee', 'foo coffee'); + coffeeBundle.add(new SourceNode(2, 0, '/bar.coffee', 'bar(coffee);\n')); + coffeeBundle.add(new SourceNode(3, 0, 'http://www.example.com/baz.coffee', 'baz(coffee);')); + coffeeBundle = coffeeBundle.toStringWithSourceMap({ + file: 'foo.js', + sourceRoot: '..' + }); + + var foo = new SourceNode(1, 0, 'foo.js', 'foo(js);'); + + var test = function(relativePath, expectedSources) { + var app = new SourceNode(); + app.add(SourceNode.fromStringWithSourceMap( + coffeeBundle.code, + new SourceMapConsumer(coffeeBundle.map.toString()), + relativePath)); + app.add(foo); + var i = 0; + app.walk(function (chunk, loc) { + assert.equal(loc.source, expectedSources[i]); + i++; + }); + app.walkSourceContents(function (sourceFile, sourceContent) { + assert.equal(sourceFile, expectedSources[0]); + assert.equal(sourceContent, 'foo coffee'); + }) + }; + + test('../coffee/maps', [ + '../coffee/foo.coffee', + '/bar.coffee', + 'http://www.example.com/baz.coffee', + 'foo.js' + ]); + + // If the third parameter is omitted or set to the current working + // directory we get incorrect source paths: + + test(undefined, [ + '../foo.coffee', + '/bar.coffee', + 'http://www.example.com/baz.coffee', + 'foo.js' + ]); + + test('', [ + '../foo.coffee', + '/bar.coffee', + 'http://www.example.com/baz.coffee', + 'foo.js' + ]); + + test('.', [ + '../foo.coffee', + '/bar.coffee', + 'http://www.example.com/baz.coffee', + 'foo.js' + ]); + + test('./', [ + '../foo.coffee', + '/bar.coffee', + 'http://www.example.com/baz.coffee', + 'foo.js' + ]); + }; + + exports['test .toStringWithSourceMap() merging duplicate mappings'] = forEachNewline(function (assert, util, nl) { + var input = new SourceNode(null, null, null, [ + new SourceNode(1, 0, "a.js", "(function"), + new SourceNode(1, 0, "a.js", "() {" + nl), + " ", + new SourceNode(1, 0, "a.js", "var Test = "), + new SourceNode(1, 0, "b.js", "{};" + nl), + new SourceNode(2, 0, "b.js", "Test"), + new SourceNode(2, 0, "b.js", ".A", "A"), + new SourceNode(2, 20, "b.js", " = { value: ", "A"), + "1234", + new SourceNode(2, 40, "b.js", " };" + nl, "A"), + "}());" + nl, + "/* Generated Source */" + ]); + input = input.toStringWithSourceMap({ + file: 'foo.js' + }); + + assert.equal(input.code, [ + "(function() {", + " var Test = {};", + "Test.A = { value: 1234 };", + "}());", + "/* Generated Source */" + ].join(nl)) + + var correctMap = new SourceMapGenerator({ + file: 'foo.js' + }); + correctMap.addMapping({ + generated: { line: 1, column: 0 }, + source: 'a.js', + original: { line: 1, column: 0 } + }); + // Here is no need for a empty mapping, + // because mappings ends at eol + correctMap.addMapping({ + generated: { line: 2, column: 2 }, + source: 'a.js', + original: { line: 1, column: 0 } + }); + correctMap.addMapping({ + generated: { line: 2, column: 13 }, + source: 'b.js', + original: { line: 1, column: 0 } + }); + correctMap.addMapping({ + generated: { line: 3, column: 0 }, + source: 'b.js', + original: { line: 2, column: 0 } + }); + correctMap.addMapping({ + generated: { line: 3, column: 4 }, + source: 'b.js', + name: 'A', + original: { line: 2, column: 0 } + }); + correctMap.addMapping({ + generated: { line: 3, column: 6 }, + source: 'b.js', + name: 'A', + original: { line: 2, column: 20 } + }); + // This empty mapping is required, + // because there is a hole in the middle of the line + correctMap.addMapping({ + generated: { line: 3, column: 18 } + }); + correctMap.addMapping({ + generated: { line: 3, column: 22 }, + source: 'b.js', + name: 'A', + original: { line: 2, column: 40 } + }); + // Here is no need for a empty mapping, + // because mappings ends at eol + + var inputMap = input.map.toJSON(); + correctMap = correctMap.toJSON(); + util.assertEqualMaps(assert, inputMap, correctMap); + }); + + exports['test .toStringWithSourceMap() multi-line SourceNodes'] = forEachNewline(function (assert, util, nl) { + var input = new SourceNode(null, null, null, [ + new SourceNode(1, 0, "a.js", "(function() {" + nl + "var nextLine = 1;" + nl + "anotherLine();" + nl), + new SourceNode(2, 2, "b.js", "Test.call(this, 123);" + nl), + new SourceNode(2, 2, "b.js", "this['stuff'] = 'v';" + nl), + new SourceNode(2, 2, "b.js", "anotherLine();" + nl), + "/*" + nl + "Generated" + nl + "Source" + nl + "*/" + nl, + new SourceNode(3, 4, "c.js", "anotherLine();" + nl), + "/*" + nl + "Generated" + nl + "Source" + nl + "*/" + ]); + input = input.toStringWithSourceMap({ + file: 'foo.js' + }); + + assert.equal(input.code, [ + "(function() {", + "var nextLine = 1;", + "anotherLine();", + "Test.call(this, 123);", + "this['stuff'] = 'v';", + "anotherLine();", + "/*", + "Generated", + "Source", + "*/", + "anotherLine();", + "/*", + "Generated", + "Source", + "*/" + ].join(nl)); + + var correctMap = new SourceMapGenerator({ + file: 'foo.js' + }); + correctMap.addMapping({ + generated: { line: 1, column: 0 }, + source: 'a.js', + original: { line: 1, column: 0 } + }); + correctMap.addMapping({ + generated: { line: 2, column: 0 }, + source: 'a.js', + original: { line: 1, column: 0 } + }); + correctMap.addMapping({ + generated: { line: 3, column: 0 }, + source: 'a.js', + original: { line: 1, column: 0 } + }); + correctMap.addMapping({ + generated: { line: 4, column: 0 }, + source: 'b.js', + original: { line: 2, column: 2 } + }); + correctMap.addMapping({ + generated: { line: 5, column: 0 }, + source: 'b.js', + original: { line: 2, column: 2 } + }); + correctMap.addMapping({ + generated: { line: 6, column: 0 }, + source: 'b.js', + original: { line: 2, column: 2 } + }); + correctMap.addMapping({ + generated: { line: 11, column: 0 }, + source: 'c.js', + original: { line: 3, column: 4 } + }); + + var inputMap = input.map.toJSON(); + correctMap = correctMap.toJSON(); + util.assertEqualMaps(assert, inputMap, correctMap); + }); + + exports['test .toStringWithSourceMap() with empty string'] = function (assert, util) { + var node = new SourceNode(1, 0, 'empty.js', ''); + var result = node.toStringWithSourceMap(); + assert.equal(result.code, ''); + }; + + exports['test .toStringWithSourceMap() with consecutive newlines'] = forEachNewline(function (assert, util, nl) { + var input = new SourceNode(null, null, null, [ + "/***/" + nl + nl, + new SourceNode(1, 0, "a.js", "'use strict';" + nl), + new SourceNode(2, 0, "a.js", "a();"), + ]); + input = input.toStringWithSourceMap({ + file: 'foo.js' + }); + + assert.equal(input.code, [ + "/***/", + "", + "'use strict';", + "a();", + ].join(nl)); + + var correctMap = new SourceMapGenerator({ + file: 'foo.js' + }); + correctMap.addMapping({ + generated: { line: 3, column: 0 }, + source: 'a.js', + original: { line: 1, column: 0 } + }); + correctMap.addMapping({ + generated: { line: 4, column: 0 }, + source: 'a.js', + original: { line: 2, column: 0 } + }); + + var inputMap = input.map.toJSON(); + correctMap = correctMap.toJSON(); + util.assertEqualMaps(assert, inputMap, correctMap); + }); + + exports['test setSourceContent with toStringWithSourceMap'] = function (assert, util) { + var aNode = new SourceNode(1, 1, 'a.js', 'a'); + aNode.setSourceContent('a.js', 'someContent'); + var node = new SourceNode(null, null, null, + ['(function () {\n', + ' ', aNode, + ' ', new SourceNode(1, 1, 'b.js', 'b'), + '}());']); + node.setSourceContent('b.js', 'otherContent'); + var map = node.toStringWithSourceMap({ + file: 'foo.js' + }).map; + + assert.ok(map instanceof SourceMapGenerator, 'map instanceof SourceMapGenerator'); + map = new SourceMapConsumer(map.toString()); + + assert.equal(map.sources.length, 2); + assert.equal(map.sources[0], 'a.js'); + assert.equal(map.sources[1], 'b.js'); + assert.equal(map.sourcesContent.length, 2); + assert.equal(map.sourcesContent[0], 'someContent'); + assert.equal(map.sourcesContent[1], 'otherContent'); + }; + + exports['test walkSourceContents'] = function (assert, util) { + var aNode = new SourceNode(1, 1, 'a.js', 'a'); + aNode.setSourceContent('a.js', 'someContent'); + var node = new SourceNode(null, null, null, + ['(function () {\n', + ' ', aNode, + ' ', new SourceNode(1, 1, 'b.js', 'b'), + '}());']); + node.setSourceContent('b.js', 'otherContent'); + var results = []; + node.walkSourceContents(function (sourceFile, sourceContent) { + results.push([sourceFile, sourceContent]); + }); + assert.equal(results.length, 2); + assert.equal(results[0][0], 'a.js'); + assert.equal(results[0][1], 'someContent'); + assert.equal(results[1][0], 'b.js'); + assert.equal(results[1][1], 'otherContent'); + }; +}); diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-util.js b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-util.js new file mode 100644 index 00000000..997d1a26 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/source-map/test-util.js @@ -0,0 +1,216 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2014 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var libUtil = require('../../lib/source-map/util'); + + exports['test urls'] = function (assert, util) { + var assertUrl = function (url) { + assert.equal(url, libUtil.urlGenerate(libUtil.urlParse(url))); + }; + assertUrl('http://'); + assertUrl('http://www.example.com'); + assertUrl('http://user:pass@www.example.com'); + assertUrl('http://www.example.com:80'); + assertUrl('http://www.example.com/'); + assertUrl('http://www.example.com/foo/bar'); + assertUrl('http://www.example.com/foo/bar/'); + assertUrl('http://user:pass@www.example.com:80/foo/bar/'); + + assertUrl('//'); + assertUrl('//www.example.com'); + assertUrl('file:///www.example.com'); + + assert.equal(libUtil.urlParse(''), null); + assert.equal(libUtil.urlParse('.'), null); + assert.equal(libUtil.urlParse('..'), null); + assert.equal(libUtil.urlParse('a'), null); + assert.equal(libUtil.urlParse('a/b'), null); + assert.equal(libUtil.urlParse('a//b'), null); + assert.equal(libUtil.urlParse('/a'), null); + assert.equal(libUtil.urlParse('data:foo,bar'), null); + }; + + exports['test normalize()'] = function (assert, util) { + assert.equal(libUtil.normalize('/..'), '/'); + assert.equal(libUtil.normalize('/../'), '/'); + assert.equal(libUtil.normalize('/../../../..'), '/'); + assert.equal(libUtil.normalize('/../../../../a/b/c'), '/a/b/c'); + assert.equal(libUtil.normalize('/a/b/c/../../../d/../../e'), '/e'); + + assert.equal(libUtil.normalize('..'), '..'); + assert.equal(libUtil.normalize('../'), '../'); + assert.equal(libUtil.normalize('../../a/'), '../../a/'); + assert.equal(libUtil.normalize('a/..'), '.'); + assert.equal(libUtil.normalize('a/../../..'), '../..'); + + assert.equal(libUtil.normalize('/.'), '/'); + assert.equal(libUtil.normalize('/./'), '/'); + assert.equal(libUtil.normalize('/./././.'), '/'); + assert.equal(libUtil.normalize('/././././a/b/c'), '/a/b/c'); + assert.equal(libUtil.normalize('/a/b/c/./././d/././e'), '/a/b/c/d/e'); + + assert.equal(libUtil.normalize(''), '.'); + assert.equal(libUtil.normalize('.'), '.'); + assert.equal(libUtil.normalize('./'), '.'); + assert.equal(libUtil.normalize('././a'), 'a'); + assert.equal(libUtil.normalize('a/./'), 'a/'); + assert.equal(libUtil.normalize('a/././.'), 'a'); + + assert.equal(libUtil.normalize('/a/b//c////d/////'), '/a/b/c/d/'); + assert.equal(libUtil.normalize('///a/b//c////d/////'), '///a/b/c/d/'); + assert.equal(libUtil.normalize('a/b//c////d'), 'a/b/c/d'); + + assert.equal(libUtil.normalize('.///.././../a/b//./..'), '../../a') + + assert.equal(libUtil.normalize('http://www.example.com'), 'http://www.example.com'); + assert.equal(libUtil.normalize('http://www.example.com/'), 'http://www.example.com/'); + assert.equal(libUtil.normalize('http://www.example.com/./..//a/b/c/.././d//'), 'http://www.example.com/a/b/d/'); + }; + + exports['test join()'] = function (assert, util) { + assert.equal(libUtil.join('a', 'b'), 'a/b'); + assert.equal(libUtil.join('a/', 'b'), 'a/b'); + assert.equal(libUtil.join('a//', 'b'), 'a/b'); + assert.equal(libUtil.join('a', 'b/'), 'a/b/'); + assert.equal(libUtil.join('a', 'b//'), 'a/b/'); + assert.equal(libUtil.join('a/', '/b'), '/b'); + assert.equal(libUtil.join('a//', '//b'), '//b'); + + assert.equal(libUtil.join('a', '..'), '.'); + assert.equal(libUtil.join('a', '../b'), 'b'); + assert.equal(libUtil.join('a/b', '../c'), 'a/c'); + + assert.equal(libUtil.join('a', '.'), 'a'); + assert.equal(libUtil.join('a', './b'), 'a/b'); + assert.equal(libUtil.join('a/b', './c'), 'a/b/c'); + + assert.equal(libUtil.join('a', 'http://www.example.com'), 'http://www.example.com'); + assert.equal(libUtil.join('a', 'data:foo,bar'), 'data:foo,bar'); + + + assert.equal(libUtil.join('', 'b'), 'b'); + assert.equal(libUtil.join('.', 'b'), 'b'); + assert.equal(libUtil.join('', 'b/'), 'b/'); + assert.equal(libUtil.join('.', 'b/'), 'b/'); + assert.equal(libUtil.join('', 'b//'), 'b/'); + assert.equal(libUtil.join('.', 'b//'), 'b/'); + + assert.equal(libUtil.join('', '..'), '..'); + assert.equal(libUtil.join('.', '..'), '..'); + assert.equal(libUtil.join('', '../b'), '../b'); + assert.equal(libUtil.join('.', '../b'), '../b'); + + assert.equal(libUtil.join('', '.'), '.'); + assert.equal(libUtil.join('.', '.'), '.'); + assert.equal(libUtil.join('', './b'), 'b'); + assert.equal(libUtil.join('.', './b'), 'b'); + + assert.equal(libUtil.join('', 'http://www.example.com'), 'http://www.example.com'); + assert.equal(libUtil.join('.', 'http://www.example.com'), 'http://www.example.com'); + assert.equal(libUtil.join('', 'data:foo,bar'), 'data:foo,bar'); + assert.equal(libUtil.join('.', 'data:foo,bar'), 'data:foo,bar'); + + + assert.equal(libUtil.join('..', 'b'), '../b'); + assert.equal(libUtil.join('..', 'b/'), '../b/'); + assert.equal(libUtil.join('..', 'b//'), '../b/'); + + assert.equal(libUtil.join('..', '..'), '../..'); + assert.equal(libUtil.join('..', '../b'), '../../b'); + + assert.equal(libUtil.join('..', '.'), '..'); + assert.equal(libUtil.join('..', './b'), '../b'); + + assert.equal(libUtil.join('..', 'http://www.example.com'), 'http://www.example.com'); + assert.equal(libUtil.join('..', 'data:foo,bar'), 'data:foo,bar'); + + + assert.equal(libUtil.join('a', ''), 'a'); + assert.equal(libUtil.join('a', '.'), 'a'); + assert.equal(libUtil.join('a/', ''), 'a'); + assert.equal(libUtil.join('a/', '.'), 'a'); + assert.equal(libUtil.join('a//', ''), 'a'); + assert.equal(libUtil.join('a//', '.'), 'a'); + assert.equal(libUtil.join('/a', ''), '/a'); + assert.equal(libUtil.join('/a', '.'), '/a'); + assert.equal(libUtil.join('', ''), '.'); + assert.equal(libUtil.join('.', ''), '.'); + assert.equal(libUtil.join('.', ''), '.'); + assert.equal(libUtil.join('.', '.'), '.'); + assert.equal(libUtil.join('..', ''), '..'); + assert.equal(libUtil.join('..', '.'), '..'); + assert.equal(libUtil.join('http://foo.org/a', ''), 'http://foo.org/a'); + assert.equal(libUtil.join('http://foo.org/a', '.'), 'http://foo.org/a'); + assert.equal(libUtil.join('http://foo.org/a/', ''), 'http://foo.org/a'); + assert.equal(libUtil.join('http://foo.org/a/', '.'), 'http://foo.org/a'); + assert.equal(libUtil.join('http://foo.org/a//', ''), 'http://foo.org/a'); + assert.equal(libUtil.join('http://foo.org/a//', '.'), 'http://foo.org/a'); + assert.equal(libUtil.join('http://foo.org', ''), 'http://foo.org/'); + assert.equal(libUtil.join('http://foo.org', '.'), 'http://foo.org/'); + assert.equal(libUtil.join('http://foo.org/', ''), 'http://foo.org/'); + assert.equal(libUtil.join('http://foo.org/', '.'), 'http://foo.org/'); + assert.equal(libUtil.join('http://foo.org//', ''), 'http://foo.org/'); + assert.equal(libUtil.join('http://foo.org//', '.'), 'http://foo.org/'); + assert.equal(libUtil.join('//www.example.com', ''), '//www.example.com/'); + assert.equal(libUtil.join('//www.example.com', '.'), '//www.example.com/'); + + + assert.equal(libUtil.join('http://foo.org/a', 'b'), 'http://foo.org/a/b'); + assert.equal(libUtil.join('http://foo.org/a/', 'b'), 'http://foo.org/a/b'); + assert.equal(libUtil.join('http://foo.org/a//', 'b'), 'http://foo.org/a/b'); + assert.equal(libUtil.join('http://foo.org/a', 'b/'), 'http://foo.org/a/b/'); + assert.equal(libUtil.join('http://foo.org/a', 'b//'), 'http://foo.org/a/b/'); + assert.equal(libUtil.join('http://foo.org/a/', '/b'), 'http://foo.org/b'); + assert.equal(libUtil.join('http://foo.org/a//', '//b'), 'http://b'); + + assert.equal(libUtil.join('http://foo.org/a', '..'), 'http://foo.org/'); + assert.equal(libUtil.join('http://foo.org/a', '../b'), 'http://foo.org/b'); + assert.equal(libUtil.join('http://foo.org/a/b', '../c'), 'http://foo.org/a/c'); + + assert.equal(libUtil.join('http://foo.org/a', '.'), 'http://foo.org/a'); + assert.equal(libUtil.join('http://foo.org/a', './b'), 'http://foo.org/a/b'); + assert.equal(libUtil.join('http://foo.org/a/b', './c'), 'http://foo.org/a/b/c'); + + assert.equal(libUtil.join('http://foo.org/a', 'http://www.example.com'), 'http://www.example.com'); + assert.equal(libUtil.join('http://foo.org/a', 'data:foo,bar'), 'data:foo,bar'); + + + assert.equal(libUtil.join('http://foo.org', 'a'), 'http://foo.org/a'); + assert.equal(libUtil.join('http://foo.org/', 'a'), 'http://foo.org/a'); + assert.equal(libUtil.join('http://foo.org//', 'a'), 'http://foo.org/a'); + assert.equal(libUtil.join('http://foo.org', '/a'), 'http://foo.org/a'); + assert.equal(libUtil.join('http://foo.org/', '/a'), 'http://foo.org/a'); + assert.equal(libUtil.join('http://foo.org//', '/a'), 'http://foo.org/a'); + + + assert.equal(libUtil.join('http://', 'www.example.com'), 'http://www.example.com'); + assert.equal(libUtil.join('file:///', 'www.example.com'), 'file:///www.example.com'); + assert.equal(libUtil.join('http://', 'ftp://example.com'), 'ftp://example.com'); + + assert.equal(libUtil.join('http://www.example.com', '//foo.org/bar'), 'http://foo.org/bar'); + assert.equal(libUtil.join('//www.example.com', '//foo.org/bar'), '//foo.org/bar'); + }; + + // TODO Issue #128: Define and test this function properly. + exports['test relative()'] = function (assert, util) { + assert.equal(libUtil.relative('/the/root', '/the/root/one.js'), 'one.js'); + assert.equal(libUtil.relative('/the/root', '/the/rootone.js'), '/the/rootone.js'); + + assert.equal(libUtil.relative('', '/the/root/one.js'), '/the/root/one.js'); + assert.equal(libUtil.relative('.', '/the/root/one.js'), '/the/root/one.js'); + assert.equal(libUtil.relative('', 'the/root/one.js'), 'the/root/one.js'); + assert.equal(libUtil.relative('.', 'the/root/one.js'), 'the/root/one.js'); + + assert.equal(libUtil.relative('/', '/the/root/one.js'), 'the/root/one.js'); + assert.equal(libUtil.relative('/', 'the/root/one.js'), 'the/root/one.js'); + }; + +}); diff --git a/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/source-map/util.js b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/source-map/util.js new file mode 100644 index 00000000..c1a73880 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/node_modules/source-map/test/source-map/util.js @@ -0,0 +1,299 @@ +/* -*- Mode: js; js-indent-level: 2; -*- */ +/* + * Copyright 2011 Mozilla Foundation and contributors + * Licensed under the New BSD license. See LICENSE or: + * http://opensource.org/licenses/BSD-3-Clause + */ +if (typeof define !== 'function') { + var define = require('amdefine')(module, require); +} +define(function (require, exports, module) { + + var util = require('../../lib/source-map/util'); + + // This is a test mapping which maps functions from two different files + // (one.js and two.js) to a minified generated source. + // + // Here is one.js: + // + // ONE.foo = function (bar) { + // return baz(bar); + // }; + // + // Here is two.js: + // + // TWO.inc = function (n) { + // return n + 1; + // }; + // + // And here is the generated code (min.js): + // + // ONE.foo=function(a){return baz(a);}; + // TWO.inc=function(a){return a+1;}; + exports.testGeneratedCode = " ONE.foo=function(a){return baz(a);};\n"+ + " TWO.inc=function(a){return a+1;};"; + exports.testMap = { + version: 3, + file: 'min.js', + names: ['bar', 'baz', 'n'], + sources: ['one.js', 'two.js'], + sourceRoot: '/the/root', + mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' + }; + exports.testMapNoSourceRoot = { + version: 3, + file: 'min.js', + names: ['bar', 'baz', 'n'], + sources: ['one.js', 'two.js'], + mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' + }; + exports.testMapEmptySourceRoot = { + version: 3, + file: 'min.js', + names: ['bar', 'baz', 'n'], + sources: ['one.js', 'two.js'], + sourceRoot: '', + mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' + }; + // This mapping is identical to above, but uses the indexed format instead. + exports.indexedTestMap = { + version: 3, + file: 'min.js', + sections: [ + { + offset: { + line: 0, + column: 0 + }, + map: { + version: 3, + sources: [ + "one.js" + ], + sourcesContent: [ + ' ONE.foo = function (bar) {\n' + + ' return baz(bar);\n' + + ' };', + ], + names: [ + "bar", + "baz" + ], + mappings: "CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID", + file: "min.js", + sourceRoot: "/the/root" + } + }, + { + offset: { + line: 1, + column: 0 + }, + map: { + version: 3, + sources: [ + "two.js" + ], + sourcesContent: [ + ' TWO.inc = function (n) {\n' + + ' return n + 1;\n' + + ' };' + ], + names: [ + "n" + ], + mappings: "CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOA", + file: "min.js", + sourceRoot: "/the/root" + } + } + ] + }; + exports.indexedTestMapDifferentSourceRoots = { + version: 3, + file: 'min.js', + sections: [ + { + offset: { + line: 0, + column: 0 + }, + map: { + version: 3, + sources: [ + "one.js" + ], + sourcesContent: [ + ' ONE.foo = function (bar) {\n' + + ' return baz(bar);\n' + + ' };', + ], + names: [ + "bar", + "baz" + ], + mappings: "CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID", + file: "min.js", + sourceRoot: "/the/root" + } + }, + { + offset: { + line: 1, + column: 0 + }, + map: { + version: 3, + sources: [ + "two.js" + ], + sourcesContent: [ + ' TWO.inc = function (n) {\n' + + ' return n + 1;\n' + + ' };' + ], + names: [ + "n" + ], + mappings: "CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOA", + file: "min.js", + sourceRoot: "/different/root" + } + } + ] + }; + exports.testMapWithSourcesContent = { + version: 3, + file: 'min.js', + names: ['bar', 'baz', 'n'], + sources: ['one.js', 'two.js'], + sourcesContent: [ + ' ONE.foo = function (bar) {\n' + + ' return baz(bar);\n' + + ' };', + ' TWO.inc = function (n) {\n' + + ' return n + 1;\n' + + ' };' + ], + sourceRoot: '/the/root', + mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' + }; + exports.testMapRelativeSources = { + version: 3, + file: 'min.js', + names: ['bar', 'baz', 'n'], + sources: ['./one.js', './two.js'], + sourcesContent: [ + ' ONE.foo = function (bar) {\n' + + ' return baz(bar);\n' + + ' };', + ' TWO.inc = function (n) {\n' + + ' return n + 1;\n' + + ' };' + ], + sourceRoot: '/the/root', + mappings: 'CAAC,IAAI,IAAM,SAAUA,GAClB,OAAOC,IAAID;CCDb,IAAI,IAAM,SAAUE,GAClB,OAAOA' + }; + exports.emptyMap = { + version: 3, + file: 'min.js', + names: [], + sources: [], + mappings: '' + }; + + + function assertMapping(generatedLine, generatedColumn, originalSource, + originalLine, originalColumn, name, map, assert, + dontTestGenerated, dontTestOriginal) { + if (!dontTestOriginal) { + var origMapping = map.originalPositionFor({ + line: generatedLine, + column: generatedColumn + }); + assert.equal(origMapping.name, name, + 'Incorrect name, expected ' + JSON.stringify(name) + + ', got ' + JSON.stringify(origMapping.name)); + assert.equal(origMapping.line, originalLine, + 'Incorrect line, expected ' + JSON.stringify(originalLine) + + ', got ' + JSON.stringify(origMapping.line)); + assert.equal(origMapping.column, originalColumn, + 'Incorrect column, expected ' + JSON.stringify(originalColumn) + + ', got ' + JSON.stringify(origMapping.column)); + + var expectedSource; + + if (originalSource && map.sourceRoot && originalSource.indexOf(map.sourceRoot) === 0) { + expectedSource = originalSource; + } else if (originalSource) { + expectedSource = map.sourceRoot + ? util.join(map.sourceRoot, originalSource) + : originalSource; + } else { + expectedSource = null; + } + + assert.equal(origMapping.source, expectedSource, + 'Incorrect source, expected ' + JSON.stringify(expectedSource) + + ', got ' + JSON.stringify(origMapping.source)); + } + + if (!dontTestGenerated) { + var genMapping = map.generatedPositionFor({ + source: originalSource, + line: originalLine, + column: originalColumn + }); + assert.equal(genMapping.line, generatedLine, + 'Incorrect line, expected ' + JSON.stringify(generatedLine) + + ', got ' + JSON.stringify(genMapping.line)); + assert.equal(genMapping.column, generatedColumn, + 'Incorrect column, expected ' + JSON.stringify(generatedColumn) + + ', got ' + JSON.stringify(genMapping.column)); + } + } + exports.assertMapping = assertMapping; + + function assertEqualMaps(assert, actualMap, expectedMap) { + assert.equal(actualMap.version, expectedMap.version, "version mismatch"); + assert.equal(actualMap.file, expectedMap.file, "file mismatch"); + assert.equal(actualMap.names.length, + expectedMap.names.length, + "names length mismatch: " + + actualMap.names.join(", ") + " != " + expectedMap.names.join(", ")); + for (var i = 0; i < actualMap.names.length; i++) { + assert.equal(actualMap.names[i], + expectedMap.names[i], + "names[" + i + "] mismatch: " + + actualMap.names.join(", ") + " != " + expectedMap.names.join(", ")); + } + assert.equal(actualMap.sources.length, + expectedMap.sources.length, + "sources length mismatch: " + + actualMap.sources.join(", ") + " != " + expectedMap.sources.join(", ")); + for (var i = 0; i < actualMap.sources.length; i++) { + assert.equal(actualMap.sources[i], + expectedMap.sources[i], + "sources[" + i + "] length mismatch: " + + actualMap.sources.join(", ") + " != " + expectedMap.sources.join(", ")); + } + assert.equal(actualMap.sourceRoot, + expectedMap.sourceRoot, + "sourceRoot mismatch: " + + actualMap.sourceRoot + " != " + expectedMap.sourceRoot); + assert.equal(actualMap.mappings, expectedMap.mappings, + "mappings mismatch:\nActual: " + actualMap.mappings + "\nExpected: " + expectedMap.mappings); + if (actualMap.sourcesContent) { + assert.equal(actualMap.sourcesContent.length, + expectedMap.sourcesContent.length, + "sourcesContent length mismatch"); + for (var i = 0; i < actualMap.sourcesContent.length; i++) { + assert.equal(actualMap.sourcesContent[i], + expectedMap.sourcesContent[i], + "sourcesContent[" + i + "] mismatch"); + } + } + } + exports.assertEqualMaps = assertEqualMaps; + +}); diff --git a/pitfall/pdfkit/node_modules/inline-source-map/package.json b/pitfall/pdfkit/node_modules/inline-source-map/package.json new file mode 100644 index 00000000..f08c61d4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/package.json @@ -0,0 +1,105 @@ +{ + "_args": [ + [ + { + "raw": "inline-source-map@~0.3.0", + "scope": null, + "escapedName": "inline-source-map", + "name": "inline-source-map", + "rawSpec": "~0.3.0", + "spec": ">=0.3.0 <0.4.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/combine-source-map" + ] + ], + "_from": "inline-source-map@>=0.3.0 <0.4.0", + "_id": "inline-source-map@0.3.1", + "_inCache": true, + "_location": "/inline-source-map", + "_nodeVersion": "1.1.0", + "_npmUser": { + "name": "thlorenz", + "email": "thlorenz@gmx.de" + }, + "_npmVersion": "2.4.1", + "_phantomChildren": { + "amdefine": "1.0.1" + }, + "_requested": { + "raw": "inline-source-map@~0.3.0", + "scope": null, + "escapedName": "inline-source-map", + "name": "inline-source-map", + "rawSpec": "~0.3.0", + "spec": ">=0.3.0 <0.4.0", + "type": "range" + }, + "_requiredBy": [ + "/combine-source-map" + ], + "_resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.3.1.tgz", + "_shasum": "a528b514e689fce90db3089e870d92f527acb5eb", + "_shrinkwrap": null, + "_spec": "inline-source-map@~0.3.0", + "_where": "/Users/MB/git/pdfkit/node_modules/combine-source-map", + "author": { + "name": "Thorsten Lorenz", + "email": "thlorenz@gmx.de", + "url": "http://thlorenz.com" + }, + "bugs": { + "url": "https://github.com/thlorenz/inline-source-map/issues" + }, + "dependencies": { + "source-map": "~0.3.0" + }, + "description": "Adds source mappings and base64 encodes them, so they can be inlined in your generated file.", + "devDependencies": { + "nave": "~0.4.4", + "tap": "~0.4.3" + }, + "directories": {}, + "dist": { + "shasum": "a528b514e689fce90db3089e870d92f527acb5eb", + "tarball": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.3.1.tgz" + }, + "engine": { + "node": ">=0.6" + }, + "gitHead": "2dd30ca646fb4f97f79f08cd1ecf35942a8f6095", + "homepage": "https://github.com/thlorenz/inline-source-map", + "keywords": [ + "source", + "map", + "inline", + "base64", + "bundle", + "generate", + "transpile" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "thlorenz", + "email": "thlorenz@gmx.de" + } + ], + "name": "inline-source-map", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/thlorenz/inline-source-map.git" + }, + "scripts": { + "test": "if [ -e $TRAVIS ]; then npm run test-all; else npm run test-main; fi", + "test-0.10": "nave use 0.10 npm run test-main", + "test-0.12": "nave use 0.12 npm run test-main", + "test-0.8": "nave use 0.8 npm run test-main", + "test-all": "npm run test-main && npm run test-0.8 && npm run test-0.10 && npm run test-0.12", + "test-main": "tap test/*.js" + }, + "version": "0.3.1" +} diff --git a/pitfall/pdfkit/node_modules/inline-source-map/test/inline-source-map.js b/pitfall/pdfkit/node_modules/inline-source-map/test/inline-source-map.js new file mode 100644 index 00000000..afe52376 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/test/inline-source-map.js @@ -0,0 +1,314 @@ +'use strict'; +/*jshint asi: true*/ + +var test = require('tap').test +var generator = require('..'); + +var foo = '' + function foo () { + var hello = 'hello'; + var world = 'world'; + console.log('%s %s', hello, world); +} + +var bar = '' + function bar () { + console.log('yes?'); +} + +function decode(base64) { + return new Buffer(base64, 'base64').toString(); +} + +function inspect(obj, depth) { + console.error(require('util').inspect(obj, false, depth || 5, true)); +} + +test('generated mappings', function (t) { + + t.test('one file no offset', function (t) { + var gen = generator() + .addGeneratedMappings('foo.js', foo) + + t.deepEqual( + gen._mappings() + , [ { generatedLine: 1, + generatedColumn: 0, + originalLine: 1, + originalColumn: 0, + source: 'foo.js', + name: null }, + { generatedLine: 2, + generatedColumn: 0, + originalLine: 2, + originalColumn: 0, + source: 'foo.js', + name: null }, + { generatedLine: 3, + generatedColumn: 0, + originalLine: 3, + originalColumn: 0, + source: 'foo.js', + name: null }, + { generatedLine: 4, + generatedColumn: 0, + originalLine: 4, + originalColumn: 0, + source: 'foo.js', + name: null }, + { generatedLine: 5, + generatedColumn: 0, + originalLine: 5, + originalColumn: 0, + source: 'foo.js', + name: null } ] + , 'generates correct mappings' + ) + + t.deepEqual( + decode(gen.base64Encode()) + , '{"version":3,"sources":["foo.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA","file":"","sourceRoot":""}' + , 'encodes generated mappings' + ) + t.equal( + gen.inlineMappingUrl() + , '//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvby5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6IiIsInNvdXJjZVJvb3QiOiIifQ==' + , 'returns correct inline mapping url' + ) + t.end() + }) + + t.test('two files no offset', function (t) { + var gen = generator() + .addGeneratedMappings('foo.js', foo) + .addGeneratedMappings('bar.js', bar) + + t.deepEqual( + gen._mappings() + , [ { generatedLine: 1, + generatedColumn: 0, + originalLine: 1, + originalColumn: 0, + source: 'foo.js', + name: null }, + { generatedLine: 2, + generatedColumn: 0, + originalLine: 2, + originalColumn: 0, + source: 'foo.js', + name: null }, + { generatedLine: 3, + generatedColumn: 0, + originalLine: 3, + originalColumn: 0, + source: 'foo.js', + name: null }, + { generatedLine: 4, + generatedColumn: 0, + originalLine: 4, + originalColumn: 0, + source: 'foo.js', + name: null }, + { generatedLine: 5, + generatedColumn: 0, + originalLine: 5, + originalColumn: 0, + source: 'foo.js', + name: null }, + { generatedLine: 1, + generatedColumn: 0, + originalLine: 1, + originalColumn: 0, + source: 'bar.js', + name: null }, + { generatedLine: 2, + generatedColumn: 0, + originalLine: 2, + originalColumn: 0, + source: 'bar.js', + name: null }, + { generatedLine: 3, + generatedColumn: 0, + originalLine: 3, + originalColumn: 0, + source: 'bar.js', + name: null } ] + , 'generates correct mappings' + ) + t.deepEqual( + decode(gen.base64Encode()) + , '{"version":3,"sources":["foo.js","bar.js"],"names":[],"mappings":"ACAA,ADAA;ACCA,ADAA;ACCA,ADAA;AACA;AACA","file":"","sourceRoot":""}' + , 'encodes generated mappings' + ) + t.equal( + gen.inlineMappingUrl() + , '//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvby5qcyIsImJhci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUNBQSxBREFBO0FDQ0EsQURBQTtBQ0NBLEFEQUE7QUFDQTtBQUNBIiwiZmlsZSI6IiIsInNvdXJjZVJvb3QiOiIifQ==' + , 'returns correct inline mapping url' + ) + t.end() + }) + + t.test('one line source', function (t) { + var gen = generator().addGeneratedMappings('one-liner.js', 'console.log("line one");') + t.deepEqual( + gen._mappings() + , [ { generatedLine: 1, + generatedColumn: 0, + originalLine: 1, + originalColumn: 0, + source: 'one-liner.js', + name: null } ] + , 'generates correct mappings' + ) + t.end() + }) + + t.test('with offset', function (t) { + var gen = generator() + .addGeneratedMappings('foo.js', foo, { line: 20 }) + .addGeneratedMappings('bar.js', bar, { line: 23, column: 22 }) + + t.deepEqual( + gen._mappings() + , [ { generatedLine: 21, + generatedColumn: 0, + originalLine: 1, + originalColumn: 0, + source: 'foo.js', + name: null }, + { generatedLine: 22, + generatedColumn: 0, + originalLine: 2, + originalColumn: 0, + source: 'foo.js', + name: null }, + { generatedLine: 23, + generatedColumn: 0, + originalLine: 3, + originalColumn: 0, + source: 'foo.js', + name: null }, + { generatedLine: 24, + generatedColumn: 0, + originalLine: 4, + originalColumn: 0, + source: 'foo.js', + name: null }, + { generatedLine: 25, + generatedColumn: 0, + originalLine: 5, + originalColumn: 0, + source: 'foo.js', + name: null }, + { generatedLine: 24, + generatedColumn: 22, + originalLine: 1, + originalColumn: 0, + source: 'bar.js', + name: null }, + { generatedLine: 25, + generatedColumn: 22, + originalLine: 2, + originalColumn: 0, + source: 'bar.js', + name: null }, + { generatedLine: 26, + generatedColumn: 22, + originalLine: 3, + originalColumn: 0, + source: 'bar.js', + name: null } ] + , 'generates correct mappings' + ) + t.equal( + decode(gen.base64Encode()) + , '{"version":3,"sources":["foo.js","bar.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA,sBCHA;ADIA,sBCHA;sBACA","file":"","sourceRoot":""}' + , 'encodes generated mappings with offset' + ) + t.end() + }) +}) + +test('given mappings, with one having no original', function (t) { + t.test('no offset', function (t) { + var gen = generator() + .addMappings('foo.js', [{ original: { line: 2, column: 3 } , generated: { line: 5, column: 10 } }]) + + // This addresses an edgecase in which a transpiler generates mappings but doesn't include the original position. + // If we set source to sourceFile (as usual) in that case, the mappings are considered invalid by the source-map module's + // SourceMapGenerator. Keeping source undefined fixes this problem. + // Raised issue: https://github.com/thlorenz/inline-source-map/issues/2 + // Validate function: https://github.com/mozilla/source-map/blob/a3372ea78e662582087dd25ebda999c06424e047/lib/source-map/source-map-generator.js#L232 + .addMappings('bar.js', [ + { original: { line: 6, column: 0 } , generated: { line: 7, column: 20 } } + , { generated: { line: 8, column: 30 } } + ]) + + t.deepEqual( + gen._mappings() + , [ { generatedLine: 5, + generatedColumn: 10, + originalLine: 2, + originalColumn: 3, + source: 'foo.js', + name: null }, + { generatedLine: 7, + generatedColumn: 20, + originalLine: 6, + originalColumn: 0, + source: 'bar.js', + name: null }, + { generatedLine: 8, + generatedColumn: 30, + originalLine: false, + originalColumn: false, + source: undefined, + name: null } ] + , 'adds correct mappings' + ) + t.deepEqual( + decode(gen.base64Encode()) + , '{"version":3,"sources":["foo.js","bar.js"],"names":[],"mappings":";;;;UACG;;oBCIH;8B","file":"","sourceRoot":""}' + , 'encodes generated mappings' + ) + t.equal( + gen.inlineMappingUrl() + , '//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvby5qcyIsImJhci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7O1VBQ0c7O29CQ0lIOzhCIiwiZmlsZSI6IiIsInNvdXJjZVJvb3QiOiIifQ==' + , 'returns correct inline mapping url' + ) + t.end() + }) + + t.test('with offset', function (t) { + var gen = generator() + .addMappings('foo.js', [{ original: { line: 2, column: 3 } , generated: { line: 5, column: 10 } }], { line: 5 }) + .addMappings('bar.js', [{ original: { line: 6, column: 0 } , generated: { line: 7, column: 20 } }, { generated: { line: 8, column: 30 } }], { line: 9, column: 3 }) + + t.deepEqual( + gen._mappings() + , [ { generatedLine: 10, + generatedColumn: 10, + originalLine: 2, + originalColumn: 3, + source: 'foo.js', + name: null }, + { generatedLine: 16, + generatedColumn: 23, + originalLine: 6, + originalColumn: 0, + source: 'bar.js', + name: null }, + { generatedLine: 17, + generatedColumn: 33, + originalLine: false, + originalColumn: false, + source: undefined, + name: null } ] + , 'adds correct mappings' + ) + t.equal( + decode(gen.base64Encode()) + , '{\"version\":3,\"sources\":[\"foo.js\",\"bar.js\"],\"names\":[],\"mappings\":\";;;;;;;;;UACG;;;;;;uBCIH;iC\",\"file\":\"\",\"sourceRoot\":\"\"}' + , 'encodes mappings with offset' + ) + t.end() + }) +}); diff --git a/pitfall/pdfkit/node_modules/inline-source-map/test/source-content.js b/pitfall/pdfkit/node_modules/inline-source-map/test/source-content.js new file mode 100644 index 00000000..ae7a0423 --- /dev/null +++ b/pitfall/pdfkit/node_modules/inline-source-map/test/source-content.js @@ -0,0 +1,135 @@ +'use strict'; +/*jshint asi: true*/ + +var test = require('tap').test +var generator = require('..'); + +var foo = '' + function foo () { + var hello = 'hello'; + var world = 'world'; + console.log('%s %s', hello, world); +} + +var bar = '' + function bar () { + console.log('yes?'); +} + +function decode(base64) { + return new Buffer(base64, 'base64').toString(); +} + +function inspect(obj, depth) { + console.log(require('util').inspect(obj, false, depth || 5, true)); +} + +test('generated mappings', function (t) { + + t.test('one file with source content', function (t) { + var gen = generator() + .addGeneratedMappings('foo.js', foo) + .addSourceContent('foo.js', foo) + + t.deepEqual( + gen.toJSON() + , { "version": 3, + "file": "", + "sources": [ + "foo.js" + ], + "names": [], + "mappings": "AAAA;AACA;AACA;AACA;AACA", + "sourceRoot": "", + "sourcesContent": [ + "function foo() {\n var hello = 'hello';\n var world = 'world';\n console.log('%s %s', hello, world);\n}" + ] + } + , 'includes source content' + ) + + t.deepEqual( + decode(gen.base64Encode()) + , '{"version":3,"sources":["foo.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA","file":"","sourceRoot":"","sourcesContent":["function foo() {\\n var hello = \'hello\';\\n var world = \'world\';\\n console.log(\'%s %s\', hello, world);\\n}"]}' + , 'encodes generated mappings including source content' + ) + t.equal( + gen.inlineMappingUrl() + , '//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvby5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTtBQUNBO0FBQ0E7QUFDQTtBQUNBIiwiZmlsZSI6IiIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJmdW5jdGlvbiBmb28oKSB7XG4gIHZhciBoZWxsbyA9ICdoZWxsbyc7XG4gIHZhciB3b3JsZCA9ICd3b3JsZCc7XG4gIGNvbnNvbGUubG9nKCclcyAlcycsIGhlbGxvLCB3b3JsZCk7XG59Il19' + , 'returns correct inline mapping url including source content' + ) + t.end() + }) + + t.test('two files with source content', function (t) { + var gen = generator() + .addGeneratedMappings('foo.js', foo) + .addSourceContent('foo.js', foo) + .addGeneratedMappings('bar.js', bar) + .addSourceContent('bar.js', bar) + + t.deepEqual( + gen.toJSON() + , { "version": 3, + "file": "", + "sources": [ + "foo.js", + "bar.js" + ], + "names": [], + "mappings": "ACAA,ADAA;ACCA,ADAA;ACCA,ADAA;AACA;AACA", + "sourceRoot": "", + "sourcesContent": [ + "function foo() {\n var hello = 'hello';\n var world = 'world';\n console.log('%s %s', hello, world);\n}", + "function bar() {\n console.log('yes?');\n}" + ] + } + , 'includes source content for both files' + ) + + t.deepEqual( + decode(gen.base64Encode()) + , '{"version":3,"sources":["foo.js","bar.js"],"names":[],"mappings":"ACAA,ADAA;ACCA,ADAA;ACCA,ADAA;AACA;AACA","file":"","sourceRoot":"","sourcesContent":["function foo() {\\n var hello = \'hello\';\\n var world = \'world\';\\n console.log(\'%s %s\', hello, world);\\n}","function bar() {\\n console.log(\'yes?\');\\n}"]}' + , 'encodes generated mappings including source content' + ) + t.equal( + gen.inlineMappingUrl() + , '//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvby5qcyIsImJhci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUNBQSxBREFBO0FDQ0EsQURBQTtBQ0NBLEFEQUE7QUFDQTtBQUNBIiwiZmlsZSI6IiIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJmdW5jdGlvbiBmb28oKSB7XG4gIHZhciBoZWxsbyA9ICdoZWxsbyc7XG4gIHZhciB3b3JsZCA9ICd3b3JsZCc7XG4gIGNvbnNvbGUubG9nKCclcyAlcycsIGhlbGxvLCB3b3JsZCk7XG59IiwiZnVuY3Rpb24gYmFyKCkge1xuICBjb25zb2xlLmxvZygneWVzPycpO1xufSJdfQ==' + , 'returns correct inline mapping url including source content' + ) + t.end() + }) + + t.test('two files, only one with source content', function (t) { + var gen = generator() + .addGeneratedMappings('foo.js', foo) + .addGeneratedMappings('bar.js', bar) + .addSourceContent('bar.js', bar) + + t.deepEqual( + gen.toJSON() + , { "version": 3, + "file": "", + "sources": [ + "foo.js", + "bar.js" + ], + "names": [], + "mappings": "ACAA,ADAA;ACCA,ADAA;ACCA,ADAA;AACA;AACA", + "sourceRoot": "", + "sourcesContent": [ null, "function bar() {\n console.log('yes?');\n}" ] + } + , 'includes source content for the file with source content and [null] for the other file' + ) + + t.deepEqual( + decode(gen.base64Encode()) + , '{"version":3,"sources":["foo.js","bar.js"],"names":[],"mappings":"ACAA,ADAA;ACCA,ADAA;ACCA,ADAA;AACA;AACA","file":"","sourceRoot":"","sourcesContent":[null,"function bar() {\\n console.log(\'yes?\');\\n}"]}' + , 'encodes generated mappings including source content' + ) + t.equal( + gen.inlineMappingUrl() + , '//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImZvby5qcyIsImJhci5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUNBQSxBREFBO0FDQ0EsQURBQTtBQ0NBLEFEQUE7QUFDQTtBQUNBIiwiZmlsZSI6IiIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzQ29udGVudCI6W251bGwsImZ1bmN0aW9uIGJhcigpIHtcbiAgY29uc29sZS5sb2coJ3llcz8nKTtcbn0iXX0=' + , 'returns correct inline mapping url including source content' + ) + t.end() + }) +}) diff --git a/pitfall/pdfkit/node_modules/insert-module-globals/.npmignore b/pitfall/pdfkit/node_modules/insert-module-globals/.npmignore new file mode 100644 index 00000000..34c4c294 --- /dev/null +++ b/pitfall/pdfkit/node_modules/insert-module-globals/.npmignore @@ -0,0 +1 @@ +bench/jquery.js diff --git a/pitfall/pdfkit/node_modules/insert-module-globals/.travis.yml b/pitfall/pdfkit/node_modules/insert-module-globals/.travis.yml new file mode 100644 index 00000000..cc4dba29 --- /dev/null +++ b/pitfall/pdfkit/node_modules/insert-module-globals/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.8" + - "0.10" diff --git a/pitfall/pdfkit/node_modules/insert-module-globals/LICENSE b/pitfall/pdfkit/node_modules/insert-module-globals/LICENSE new file mode 100644 index 00000000..ee27ba4b --- /dev/null +++ b/pitfall/pdfkit/node_modules/insert-module-globals/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/insert-module-globals/bench/results.txt b/pitfall/pdfkit/node_modules/insert-module-globals/bench/results.txt new file mode 100644 index 00000000..7c9977d1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/insert-module-globals/bench/results.txt @@ -0,0 +1,18 @@ +$ git log|head -n1 +commit 8b66aec6f43c5099c72ab365a93da2a9e406824e + +with lexical-scope@0.0.4: + +$ time module-deps bench/jquery.js | bin/cmd.js >/dev/null + +real 0m7.380s +user 0m7.504s +sys 0m0.320s + +with lexical-scope@0.0.5: + +$ time module-deps bench/jquery.js | bin/cmd.js >/dev/null + +real 0m2.441s +user 0m2.584s +sys 0m0.176s diff --git a/pitfall/pdfkit/node_modules/insert-module-globals/bench/run.sh b/pitfall/pdfkit/node_modules/insert-module-globals/bench/run.sh new file mode 100755 index 00000000..088cda6b --- /dev/null +++ b/pitfall/pdfkit/node_modules/insert-module-globals/bench/run.sh @@ -0,0 +1,2 @@ +#!/bin/bash +time module-deps bench/jquery.js | bin/cmd.js >/dev/null diff --git a/pitfall/pdfkit/node_modules/insert-module-globals/bin/cmd.js b/pitfall/pdfkit/node_modules/insert-module-globals/bin/cmd.js new file mode 100755 index 00000000..d449f8f6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/insert-module-globals/bin/cmd.js @@ -0,0 +1,25 @@ +#!/usr/bin/env node + +var insert = require('../'); +var through = require('through'); +var concat = require('concat-stream'); +var JSONStream = require('JSONStream'); + +var basedir = process.argv[2] || process.cwd(); + +process.stdin + .pipe(JSONStream.parse([ true ])) + .pipe(through(write)) + .pipe(JSONStream.stringify()) + .pipe(process.stdout) +; + +function write (row) { + var self = this; + var s = insert(row.id, { basedir: basedir }); + s.pipe(concat(function (src) { + row.source = src.toString('utf8'); + self.queue(row); + })); + s.end(row.source); +} diff --git a/pitfall/pdfkit/node_modules/insert-module-globals/example/files/foo/index.js b/pitfall/pdfkit/node_modules/insert-module-globals/example/files/foo/index.js new file mode 100644 index 00000000..1f477ad7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/insert-module-globals/example/files/foo/index.js @@ -0,0 +1,6 @@ +process.nextTick(function () { + console.log('in foo/index.js: ' + JSON.stringify({ + __filename: __filename, + __dirname: __dirname + })); +}); diff --git a/pitfall/pdfkit/node_modules/insert-module-globals/example/files/main.js b/pitfall/pdfkit/node_modules/insert-module-globals/example/files/main.js new file mode 100644 index 00000000..4b359a25 --- /dev/null +++ b/pitfall/pdfkit/node_modules/insert-module-globals/example/files/main.js @@ -0,0 +1,6 @@ +console.log('in main.js: ' + JSON.stringify({ + __filename: __filename, + __dirname: __dirname +})); + +require('./foo'); diff --git a/pitfall/pdfkit/node_modules/insert-module-globals/example/insert.js b/pitfall/pdfkit/node_modules/insert-module-globals/example/insert.js new file mode 100644 index 00000000..d2caefcf --- /dev/null +++ b/pitfall/pdfkit/node_modules/insert-module-globals/example/insert.js @@ -0,0 +1,12 @@ +var mdeps = require('module-deps'); +var bpack = require('browser-pack'); +var insert = require('../'); +function inserter (file) { + return insert(file, { basedir: __dirname + '/files' }); +} + +var files = [ __dirname + '/files/main.js' ]; +mdeps(files, { transform: inserter }) + .pipe(bpack({ raw: true })) + .pipe(process.stdout) +; diff --git a/pitfall/pdfkit/node_modules/insert-module-globals/index.js b/pitfall/pdfkit/node_modules/insert-module-globals/index.js new file mode 100644 index 00000000..5eb415db --- /dev/null +++ b/pitfall/pdfkit/node_modules/insert-module-globals/index.js @@ -0,0 +1,120 @@ +var parseScope = require('lexical-scope'); +var through = require('through'); +var merge = require('xtend'); + +var path = require('path'); +var fs = require('fs'); +var processPath = require.resolve('process/browser.js'); + +var defaultVars = { + process: function () { + return 'require(' + JSON.stringify(processPath) + ')'; + }, + global: function () { + return 'typeof self !== "undefined" ? self : ' + + 'typeof window !== "undefined" ? window : {}' + ; + }, + Buffer: function () { + return 'require("buffer").Buffer'; + }, + __filename: function (file, basedir) { + var file = '/' + path.relative(basedir, file); + return JSON.stringify(file); + }, + __dirname: function (file, basedir) { + var dir = path.dirname('/' + path.relative(basedir, file)); + return JSON.stringify(dir); + } +}; + +module.exports = function (file, opts) { + if (/\.json$/i.test(file)) return through(); + if (!opts) opts = {}; + + var basedir = opts.basedir || '/'; + var vars = merge(defaultVars, opts.vars); + var varNames = Object.keys(vars); + + var quick = RegExp(varNames.map(function (name) { + return '\\b' + name + '\\b'; + }).join('|')); + + var resolved = {}; + var chunks = []; + + return through(write, end); + + function write (buf) { chunks.push(buf) } + + function end () { + var self = this; + var source = Buffer.isBuffer(chunks[0]) + ? Buffer.concat(chunks).toString('utf8') + : chunks.join('') + ; + source = source.replace(/^#![^\n]*\n/, '\n'); + + if (opts.always !== true && !quick.test(source)) { + this.queue(source); + this.queue(null); + return; + } + + try { + var scope = opts.always + ? { globals: { implicit: varNames } } + : parseScope('(function(){\n' + source + '\n})()') + ; + } + catch (err) { + var e = new SyntaxError( + (err.message || err) + ' while parsing ' + file + ); + e.type = 'syntax'; + e.filename = file; + return this.emit('error', e); + } + + var globals = {}; + + varNames.forEach(function (name) { + if (scope.globals.implicit.indexOf(name) >= 0) { + var value = vars[name](file, basedir); + if (value) { + globals[name] = value; + self.emit('global', name); + } + } + }); + + this.queue(closeOver(globals, source)); + this.queue(null); + } +}; + +module.exports.vars = defaultVars; + +function closeOver (globals, src) { + var keys = Object.keys(globals); + if (keys.length === 0) return src; + var values = keys.map(function (key) { return globals[key] }); + + if (keys.length <= 3) { + return '(function (' + keys.join(',') + '){\n' + + src + '\n}).call(this,' + values.join(',') + ')' + ; + } + // necessary to make arguments[3..6] still work for workerify etc + // a,b,c,arguments[3..6],d,e,f... + var extra = [ '__argument0', '__argument1', '__argument2', '__argument3' ]; + var names = keys.slice(0,3).concat(extra).concat(keys.slice(3)); + values.splice(3, 0, + 'arguments[3]','arguments[4]', + 'arguments[5]','arguments[6]' + ); + + return '(function (' + names.join(',') + '){\n' + + src + '\n}).call(this,' + values.join(',') + ')' + ; +} diff --git a/pitfall/pdfkit/node_modules/insert-module-globals/node_modules/process/LICENSE b/pitfall/pdfkit/node_modules/insert-module-globals/node_modules/process/LICENSE new file mode 100644 index 00000000..b8c1246c --- /dev/null +++ b/pitfall/pdfkit/node_modules/insert-module-globals/node_modules/process/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2013 Roman Shtylman + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/insert-module-globals/node_modules/process/README.md b/pitfall/pdfkit/node_modules/insert-module-globals/node_modules/process/README.md new file mode 100644 index 00000000..bdbbdd32 --- /dev/null +++ b/pitfall/pdfkit/node_modules/insert-module-globals/node_modules/process/README.md @@ -0,0 +1,23 @@ +# process + +```require('process');``` just like any other module. + +Works in node.js and browsers via the browser.js shim provided with the module. + +## browser implementation + +The goal of this module is not to be a full-fledged alternative to the builtin process module. This module mostly exists to provide the nextTick functionality and nothing more. We keep this module lean because it will often be included by default by tools like browserify when it detects a module has used the `process` global. + +If you are looking to provide other process methods, I suggest you monkey patch them onto the process global in your app. A list of user created patches is below. + +* [hrtime](https://github.com/kumavis/browser-process-hrtime) + +## package manager notes + +If you are writing a bundler to package modules for client side use, make sure you use the ```browser``` field hint in package.json. + +See https://gist.github.com/4339901 for details. + +The [browserify](https://github.com/substack/node-browserify) module will properly handle this field when bundling your files. + + diff --git a/pitfall/pdfkit/node_modules/insert-module-globals/node_modules/process/browser.js b/pitfall/pdfkit/node_modules/insert-module-globals/node_modules/process/browser.js new file mode 100644 index 00000000..fc88ecf5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/insert-module-globals/node_modules/process/browser.js @@ -0,0 +1,60 @@ +// shim for using process in browser + +var process = module.exports = {}; + +process.nextTick = (function () { + var canSetImmediate = typeof window !== 'undefined' + && window.setImmediate; + var canPost = typeof window !== 'undefined' + && window.postMessage && window.addEventListener + ; + + if (canSetImmediate) { + return function (f) { return window.setImmediate(f) }; + } + + if (canPost) { + var queue = []; + window.addEventListener('message', function (ev) { + var source = ev.source; + if ((source === window || source === null) && ev.data === 'process-tick') { + ev.stopPropagation(); + if (queue.length > 0) { + var fn = queue.shift(); + fn(); + } + } + }, true); + + return function nextTick(fn) { + queue.push(fn); + window.postMessage('process-tick', '*'); + }; + } + + return function nextTick(fn) { + setTimeout(fn, 0); + }; +})(); + +process.title = 'browser'; +process.browser = true; +process.env = {}; +process.argv = []; + +function noop() {} + +process.on = noop; +process.once = noop; +process.off = noop; +process.emit = noop; + +process.binding = function (name) { + throw new Error('process.binding is not supported'); +} + +// TODO(shtylman) +process.cwd = function () { return '/' }; +process.chdir = function (dir) { + throw new Error('process.chdir is not supported'); +}; diff --git a/pitfall/pdfkit/node_modules/insert-module-globals/node_modules/process/index.js b/pitfall/pdfkit/node_modules/insert-module-globals/node_modules/process/index.js new file mode 100644 index 00000000..8d8ed7df --- /dev/null +++ b/pitfall/pdfkit/node_modules/insert-module-globals/node_modules/process/index.js @@ -0,0 +1,2 @@ +// for now just expose the builtin process global from node.js +module.exports = global.process; diff --git a/pitfall/pdfkit/node_modules/insert-module-globals/node_modules/process/package.json b/pitfall/pdfkit/node_modules/insert-module-globals/node_modules/process/package.json new file mode 100644 index 00000000..5274dab4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/insert-module-globals/node_modules/process/package.json @@ -0,0 +1,81 @@ +{ + "_args": [ + [ + { + "raw": "process@~0.6.0", + "scope": null, + "escapedName": "process", + "name": "process", + "rawSpec": "~0.6.0", + "spec": ">=0.6.0 <0.7.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/insert-module-globals" + ] + ], + "_from": "process@>=0.6.0 <0.7.0", + "_id": "process@0.6.0", + "_inCache": true, + "_location": "/insert-module-globals/process", + "_npmUser": { + "name": "shtylman", + "email": "shtylman@gmail.com" + }, + "_npmVersion": "1.3.24", + "_phantomChildren": {}, + "_requested": { + "raw": "process@~0.6.0", + "scope": null, + "escapedName": "process", + "name": "process", + "rawSpec": "~0.6.0", + "spec": ">=0.6.0 <0.7.0", + "type": "range" + }, + "_requiredBy": [ + "/insert-module-globals" + ], + "_resolved": "https://registry.npmjs.org/process/-/process-0.6.0.tgz", + "_shasum": "7dd9be80ffaaedd4cb628f1827f1cbab6dc0918f", + "_shrinkwrap": null, + "_spec": "process@~0.6.0", + "_where": "/Users/MB/git/pdfkit/node_modules/insert-module-globals", + "author": { + "name": "Roman Shtylman", + "email": "shtylman@gmail.com" + }, + "browser": "./browser.js", + "bugs": { + "url": "https://github.com/shtylman/node-process/issues" + }, + "dependencies": {}, + "description": "process information for node.js and browsers", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "7dd9be80ffaaedd4cb628f1827f1cbab6dc0918f", + "tarball": "https://registry.npmjs.org/process/-/process-0.6.0.tgz" + }, + "engines": { + "node": ">= 0.6.0" + }, + "homepage": "https://github.com/shtylman/node-process", + "keywords": [ + "process" + ], + "main": "./index.js", + "maintainers": [ + { + "name": "shtylman", + "email": "shtylman@gmail.com" + } + ], + "name": "process", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/shtylman/node-process.git" + }, + "version": "0.6.0" +} diff --git a/pitfall/pdfkit/node_modules/insert-module-globals/package.json b/pitfall/pdfkit/node_modules/insert-module-globals/package.json new file mode 100644 index 00000000..6fa3e500 --- /dev/null +++ b/pitfall/pdfkit/node_modules/insert-module-globals/package.json @@ -0,0 +1,103 @@ +{ + "_args": [ + [ + { + "raw": "insert-module-globals@~6.0.0", + "scope": null, + "escapedName": "insert-module-globals", + "name": "insert-module-globals", + "rawSpec": "~6.0.0", + "spec": ">=6.0.0 <6.1.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/browserify" + ] + ], + "_from": "insert-module-globals@>=6.0.0 <6.1.0", + "_id": "insert-module-globals@6.0.0", + "_inCache": true, + "_location": "/insert-module-globals", + "_npmUser": { + "name": "substack", + "email": "mail@substack.net" + }, + "_npmVersion": "1.4.3", + "_phantomChildren": {}, + "_requested": { + "raw": "insert-module-globals@~6.0.0", + "scope": null, + "escapedName": "insert-module-globals", + "name": "insert-module-globals", + "rawSpec": "~6.0.0", + "spec": ">=6.0.0 <6.1.0", + "type": "range" + }, + "_requiredBy": [ + "/browserify" + ], + "_resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-6.0.0.tgz", + "_shasum": "ee8aeb9dee16819e33aa14588a558824af0c15dc", + "_shrinkwrap": null, + "_spec": "insert-module-globals@~6.0.0", + "_where": "/Users/MB/git/pdfkit/node_modules/browserify", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "bin": { + "insert-module-globals": "bin/cmd.js" + }, + "bugs": { + "url": "https://github.com/substack/insert-module-globals/issues" + }, + "dependencies": { + "JSONStream": "~0.7.1", + "concat-stream": "~1.4.1", + "lexical-scope": "~1.1.0", + "process": "~0.6.0", + "through": "~2.3.4", + "xtend": "^3.0.0" + }, + "description": "insert implicit module globals into a module-deps stream", + "devDependencies": { + "browser-pack": "~0.10.2", + "module-deps": "~1.4.0", + "native-buffer-browserify": "~2.0.16", + "tap": "~0.4.0" + }, + "directories": {}, + "dist": { + "shasum": "ee8aeb9dee16819e33aa14588a558824af0c15dc", + "tarball": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-6.0.0.tgz" + }, + "homepage": "https://github.com/substack/insert-module-globals", + "keywords": [ + "__filename", + "__dirname", + "global", + "process", + "module-deps", + "browser-pack", + "browserify" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "name": "insert-module-globals", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/substack/insert-module-globals.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "6.0.0" +} diff --git a/pitfall/pdfkit/node_modules/insert-module-globals/readme.markdown b/pitfall/pdfkit/node_modules/insert-module-globals/readme.markdown new file mode 100644 index 00000000..6c4bb139 --- /dev/null +++ b/pitfall/pdfkit/node_modules/insert-module-globals/readme.markdown @@ -0,0 +1,136 @@ +# insert-module-globals + +insert implicit module globals +(`__filename`, `__dirname`, `process`, `global`, and `Buffer`) +as a browserify-style transform + +[![build status](https://secure.travis-ci.org/substack/insert-module-globals.png)](http://travis-ci.org/substack/insert-module-globals) + +# example + +``` js +var mdeps = require('module-deps'); +var bpack = require('browser-pack'); +var insert = require('insert-module-globals'); +function inserter (file) { + return insert(file, { basedir: __dirname + '/files' }); +} + +var files = [ __dirname + '/files/main.js' ]; +mdeps(files, { transform: inserter }) + .pipe(bpack({ raw: true })) + .pipe(process.stdout) +; +``` + +``` +$ node example/insert.js | node +in main.js: {"__filename":"/main.js","__dirname":"/"} +in foo/index.js: {"__filename":"/foo/index.js","__dirname":"/foo"} +``` + +or use the command-line scripts: + +``` +$ module-deps main.js | insert-module-globals | browser-pack | node +in main.js: {"__filename":"/main.js","__dirname":"/"} +in foo/index.js: {"__filename":"/foo/index.js","__dirname":"/foo"} +``` + +or use insert-module-globals as a transform: + +``` +$ module-deps main.js --transform insert-module-globals | browser-pack | node +in main.js: {"__filename":"/main.js","__dirname":"/"} +in foo/index.js: {"__filename":"/foo/index.js","__dirname":"/foo"} +``` + +# methods + +``` js +var insertGlobals = require('insert-module-globals') +``` + +## var inserter = insertGlobals(file, opts) + +Return a transform stream `inserter` for the filename `file` that will accept a +javascript file as input and will output the file with a closure around the +contents as necessary to define extra builtins. + +When `opts.always` is truthy, wrap every file with all the global variables +without parsing. This is handy because parsing the scope can take a long time, +so you can prioritize fast builds over saving bytes in the final output. + +Use `opts.vars` to override the default inserted variables, or set +`opts.vars[name]` to `undefined` to override an undefined variable that has +already been set by default. + +# events + +## inserter.on('global', function (name) {}) + +When a global is detected, the inserter stream emits a `'global'` event. + +# usage + +``` +usage: insert-module-globals {basedir} +``` + +# install + +With [npm](https://npmjs.org), to get the library do: + +``` +npm install insert-module-globals +``` + +and to get the bin script do: + +``` +npm install -g insert-module-globals +``` + +# insert custom globals. + +`insert-module-globals` can also insert arbitary globals into files. +Pass in an object of functions as the `vars` option. + +``` js +var vars = { + process: function (row, basedir) { + return { + id: "path/to/custom_process.js", + source: customProcessContent + } + }, + Buffer: function (row, basedir) { + return { + id: "path/to/custom_buffer.js, + source: customProcessContent, + //suffix is optional + //it's used to extract the value from the module. + //it becomes: require(...).Buffer in this case. + suffix: '.Buffer' + } + }, + Math: function () { + //if you return a string, + //it's simply set as the value. + return '{}' + //^ any attempt to use Math[x] will throw! + } +} + +function inserter (file) { + return insert(file, { vars: vars }); +} +mdeps(files, { transform: inserter }) + .pipe(bpack({ raw: true })) + .pipe(process.stdout) +``` + + +# license + +MIT diff --git a/pitfall/pdfkit/node_modules/insert-module-globals/test/always.js b/pitfall/pdfkit/node_modules/insert-module-globals/test/always.js new file mode 100644 index 00000000..36337dc9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/insert-module-globals/test/always.js @@ -0,0 +1,28 @@ +var test = require('tap').test; +var mdeps = require('module-deps'); +var bpack = require('browser-pack'); +var insert = require('../'); +var concat = require('concat-stream'); +var vm = require('vm'); + +test('always insert', function (t) { + t.plan(6); + var files = [ __dirname + '/always/main.js' ]; + var s = mdeps(files, { + transform: inserter, + modules: { + buffer: require.resolve('native-buffer-browserify') + } + }); + s.pipe(bpack({ raw: true })).pipe(concat(function (src) { + var c = { + t: t, + self: { xyz: 555 } + }; + vm.runInNewContext(src, c); + })); +}); + +function inserter (file) { + return insert(file, { always: true }); +} diff --git a/pitfall/pdfkit/node_modules/insert-module-globals/test/always/main.js b/pitfall/pdfkit/node_modules/insert-module-globals/test/always/main.js new file mode 100644 index 00000000..36541eb1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/insert-module-globals/test/always/main.js @@ -0,0 +1,6 @@ +t.equal(eval('typeof process'), 'object'); +t.equal(eval('typeof process.nextTick'), 'function'); +t.equal(eval('typeof global'), 'object'); +t.equal(eval('global.xyz'), 555); +t.equal(eval('typeof __filename'), 'string'); +t.equal(eval('typeof __filename'), 'string'); diff --git a/pitfall/pdfkit/node_modules/insert-module-globals/test/global.js b/pitfall/pdfkit/node_modules/insert-module-globals/test/global.js new file mode 100644 index 00000000..94641505 --- /dev/null +++ b/pitfall/pdfkit/node_modules/insert-module-globals/test/global.js @@ -0,0 +1,55 @@ +var test = require('tap').test; +var vm = require('vm'); +var concat = require('concat-stream'); + +var insert = require('../'); +var bpack = require('browser-pack'); +var mdeps = require('module-deps'); + +test('insert globals', function (t) { + var expected = [ 'global' ]; + t.plan(2 + expected.length); + + var files = [ __dirname + '/global/main.js' ]; + var deps = mdeps(files, { transform: function (file) { + var tr = inserter(file) + tr.on('global', function (name) { + t.equal(name, expected.shift()); + }); + return tr; + } }); + var pack = bpack({ raw: true }); + + deps.pipe(pack); + + pack.pipe(concat(function (src) { + var c = { + t : t, + a : 555, + }; + c.self = c; + vm.runInNewContext(src, c); + })); +}); + +test('__filename and __dirname', function (t) { + t.plan(2); + + var files = [ __dirname + '/global/filename.js' ]; + var deps = mdeps(files, { transform: inserter }); + var pack = bpack({ raw: true }); + + deps.pipe(pack); + + pack.pipe(concat(function (src) { + var c = {}; + vm.runInNewContext('require=' + src, c); + var x = c.require(files[0]); + t.equal(x.filename, '/filename.js'); + t.equal(x.dirname, '/'); + })); +}); + +function inserter (file) { + return insert(file, { basedir: __dirname + '/global' }); +} diff --git a/pitfall/pdfkit/node_modules/insert-module-globals/test/global/filename.js b/pitfall/pdfkit/node_modules/insert-module-globals/test/global/filename.js new file mode 100644 index 00000000..85dc112b --- /dev/null +++ b/pitfall/pdfkit/node_modules/insert-module-globals/test/global/filename.js @@ -0,0 +1,2 @@ +exports.filename = __filename; +exports.dirname = __dirname; diff --git a/pitfall/pdfkit/node_modules/insert-module-globals/test/global/main.js b/pitfall/pdfkit/node_modules/insert-module-globals/test/global/main.js new file mode 100644 index 00000000..d77852b2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/insert-module-globals/test/global/main.js @@ -0,0 +1,2 @@ +t.equal(a, 555); +t.equal(a, global.a); diff --git a/pitfall/pdfkit/node_modules/insert-module-globals/test/insert.js b/pitfall/pdfkit/node_modules/insert-module-globals/test/insert.js new file mode 100644 index 00000000..e540ed4c --- /dev/null +++ b/pitfall/pdfkit/node_modules/insert-module-globals/test/insert.js @@ -0,0 +1,42 @@ +var test = require('tap').test; +var mdeps = require('module-deps'); +var bpack = require('browser-pack'); +var insert = require('../'); +var concat = require('concat-stream'); +var vm = require('vm'); + +test('process.nextTick inserts', function (t) { + t.plan(4); + var files = [ __dirname + '/insert/main.js' ]; + var s = mdeps(files, { transform: [ inserter ] }) + .pipe(bpack({ raw: true })) + ; + s.pipe(concat(function (src) { + var c = { t: t, setTimeout: setTimeout }; + vm.runInNewContext(src, c); + })); +}); + +test('buffer inserts', function (t) { + t.plan(2); + var files = [ __dirname + '/insert/buffer.js' ]; + var s = mdeps(files, { + transform: [ inserter ], + modules: { buffer: require.resolve('native-buffer-browserify') } + }); + s.pipe(bpack({ raw: true })).pipe(concat(function (src) { + var c = { + t: t, + setTimeout: setTimeout, + Uint8Array: Uint8Array, + DataView: DataView + }; + vm.runInNewContext(src, c); + })); +}); + +function inserter (file) { + return insert(file, { + basedir: __dirname + '/insert' + }); +} diff --git a/pitfall/pdfkit/node_modules/insert-module-globals/test/insert/buffer.js b/pitfall/pdfkit/node_modules/insert-module-globals/test/insert/buffer.js new file mode 100644 index 00000000..54153e4d --- /dev/null +++ b/pitfall/pdfkit/node_modules/insert-module-globals/test/insert/buffer.js @@ -0,0 +1 @@ +require('./foo/buf'); diff --git a/pitfall/pdfkit/node_modules/insert-module-globals/test/insert/foo/buf.js b/pitfall/pdfkit/node_modules/insert-module-globals/test/insert/foo/buf.js new file mode 100644 index 00000000..ea13200a --- /dev/null +++ b/pitfall/pdfkit/node_modules/insert-module-globals/test/insert/foo/buf.js @@ -0,0 +1,4 @@ +process.nextTick(function () { + t.equal(Buffer('abc').toString('base64'), 'YWJj'); + t.equal(Buffer([98,99,100]).toString(), 'bcd'); +}); diff --git a/pitfall/pdfkit/node_modules/insert-module-globals/test/insert/foo/index.js b/pitfall/pdfkit/node_modules/insert-module-globals/test/insert/foo/index.js new file mode 100644 index 00000000..0945157e --- /dev/null +++ b/pitfall/pdfkit/node_modules/insert-module-globals/test/insert/foo/index.js @@ -0,0 +1,4 @@ +process.nextTick(function () { + t.equal(__filename, '/foo/index.js'); + t.equal(__dirname, '/foo'); +}); diff --git a/pitfall/pdfkit/node_modules/insert-module-globals/test/insert/main.js b/pitfall/pdfkit/node_modules/insert-module-globals/test/insert/main.js new file mode 100644 index 00000000..957a73d7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/insert-module-globals/test/insert/main.js @@ -0,0 +1,4 @@ +t.equal(__filename, '/main.js'); +t.equal(__dirname, '/'); + +require('./foo'); diff --git a/pitfall/pdfkit/node_modules/insert-module-globals/test/return.js b/pitfall/pdfkit/node_modules/insert-module-globals/test/return.js new file mode 100644 index 00000000..04fd252c --- /dev/null +++ b/pitfall/pdfkit/node_modules/insert-module-globals/test/return.js @@ -0,0 +1,24 @@ +var test = require('tap').test; +var mdeps = require('module-deps'); +var bpack = require('browser-pack'); +var insert = require('../'); +var concat = require('concat-stream'); +var vm = require('vm'); + +test('early return', function (t) { + t.plan(4); + var files = [ __dirname + '/return/main.js' ]; + var s = mdeps(files, { transform: [ inserter ] }) + .pipe(bpack({ raw: true })) + ; + s.pipe(concat(function (src) { + var c = { t: t, setTimeout: setTimeout }; + vm.runInNewContext(src, c); + })); +}); + +function inserter (file) { + return insert(file, { + basedir: __dirname + '/return' + }); +} diff --git a/pitfall/pdfkit/node_modules/insert-module-globals/test/return/foo/index.js b/pitfall/pdfkit/node_modules/insert-module-globals/test/return/foo/index.js new file mode 100644 index 00000000..0945157e --- /dev/null +++ b/pitfall/pdfkit/node_modules/insert-module-globals/test/return/foo/index.js @@ -0,0 +1,4 @@ +process.nextTick(function () { + t.equal(__filename, '/foo/index.js'); + t.equal(__dirname, '/foo'); +}); diff --git a/pitfall/pdfkit/node_modules/insert-module-globals/test/return/main.js b/pitfall/pdfkit/node_modules/insert-module-globals/test/return/main.js new file mode 100644 index 00000000..c7d354cf --- /dev/null +++ b/pitfall/pdfkit/node_modules/insert-module-globals/test/return/main.js @@ -0,0 +1,6 @@ +t.equal(__filename, '/main.js'); +t.equal(__dirname, '/'); + +require('./foo'); + +return; diff --git a/pitfall/pdfkit/node_modules/is-promise/.npmignore b/pitfall/pdfkit/node_modules/is-promise/.npmignore new file mode 100644 index 00000000..ebf8391d --- /dev/null +++ b/pitfall/pdfkit/node_modules/is-promise/.npmignore @@ -0,0 +1,6 @@ +component +build +node_modules +test.js +component.json +.gitignore \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/is-promise/.travis.yml b/pitfall/pdfkit/node_modules/is-promise/.travis.yml new file mode 100644 index 00000000..87f8cd91 --- /dev/null +++ b/pitfall/pdfkit/node_modules/is-promise/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - "0.10" \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/is-promise/LICENSE b/pitfall/pdfkit/node_modules/is-promise/LICENSE new file mode 100644 index 00000000..27cc9f37 --- /dev/null +++ b/pitfall/pdfkit/node_modules/is-promise/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2014 Forbes Lindesay + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND 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. \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/is-promise/index.js b/pitfall/pdfkit/node_modules/is-promise/index.js new file mode 100644 index 00000000..23ea1a4e --- /dev/null +++ b/pitfall/pdfkit/node_modules/is-promise/index.js @@ -0,0 +1,5 @@ +module.exports = isPromise; + +function isPromise(obj) { + return obj && typeof obj.then === 'function'; +} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/is-promise/package.json b/pitfall/pdfkit/node_modules/is-promise/package.json new file mode 100644 index 00000000..9575fe3e --- /dev/null +++ b/pitfall/pdfkit/node_modules/is-promise/package.json @@ -0,0 +1,80 @@ +{ + "_args": [ + [ + { + "raw": "is-promise@~1", + "scope": null, + "escapedName": "is-promise", + "name": "is-promise", + "rawSpec": "~1", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/promise" + ] + ], + "_from": "is-promise@>=1.0.0 <2.0.0", + "_id": "is-promise@1.0.1", + "_inCache": true, + "_location": "/is-promise", + "_npmUser": { + "name": "forbeslindesay", + "email": "forbes@lindeay.co.uk" + }, + "_npmVersion": "1.4.3", + "_phantomChildren": {}, + "_requested": { + "raw": "is-promise@~1", + "scope": null, + "escapedName": "is-promise", + "name": "is-promise", + "rawSpec": "~1", + "spec": ">=1.0.0 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/promise" + ], + "_resolved": "https://registry.npmjs.org/is-promise/-/is-promise-1.0.1.tgz", + "_shasum": "31573761c057e33c2e91aab9e96da08cefbe76e5", + "_shrinkwrap": null, + "_spec": "is-promise@~1", + "_where": "/Users/MB/git/pdfkit/node_modules/promise", + "author": { + "name": "ForbesLindesay" + }, + "bugs": { + "url": "https://github.com/then/is-promise/issues" + }, + "dependencies": {}, + "description": "Test whether an object looks like a promises-a+ promise", + "devDependencies": { + "better-assert": "~0.1.0", + "mocha": "~1.7.4" + }, + "directories": {}, + "dist": { + "shasum": "31573761c057e33c2e91aab9e96da08cefbe76e5", + "tarball": "https://registry.npmjs.org/is-promise/-/is-promise-1.0.1.tgz" + }, + "homepage": "https://github.com/then/is-promise", + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "forbeslindesay", + "email": "forbes@lindesay.co.uk" + } + ], + "name": "is-promise", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/then/is-promise.git" + }, + "scripts": { + "test": "mocha -R spec" + }, + "version": "1.0.1" +} diff --git a/pitfall/pdfkit/node_modules/is-promise/readme.md b/pitfall/pdfkit/node_modules/is-promise/readme.md new file mode 100644 index 00000000..6b30886b --- /dev/null +++ b/pitfall/pdfkit/node_modules/is-promise/readme.md @@ -0,0 +1,29 @@ + +# is-promise + + Test whether an object looks like a promises-a+ promise + + [![Build Status](https://img.shields.io/travis/then/is-promise/master.svg)](https://travis-ci.org/then/is-promise) + [![Dependency Status](https://img.shields.io/gemnasium/then/is-promise.svg)](https://gemnasium.com/then/is-promise) + [![NPM version](https://img.shields.io/npm/v/is-promise.svg)](https://www.npmjs.org/package/is-promise) + +## Installation + + $ npm install is-promise + +You can also use it client side via npm. + +## API + +```javascript +var isPromise = require('is-promise'); + +isPromise({then:function () {...}});//=>true +isPromise(null);//=>false +isPromise({});//=>false +isPromise({then: true})//=>false +``` + +## License + + MIT diff --git a/pitfall/pdfkit/node_modules/isarray/README.md b/pitfall/pdfkit/node_modules/isarray/README.md new file mode 100644 index 00000000..052a62b8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/isarray/README.md @@ -0,0 +1,54 @@ + +# isarray + +`Array#isArray` for older browsers. + +## Usage + +```js +var isArray = require('isarray'); + +console.log(isArray([])); // => true +console.log(isArray({})); // => false +``` + +## Installation + +With [npm](http://npmjs.org) do + +```bash +$ npm install isarray +``` + +Then bundle for the browser with +[browserify](https://github.com/substack/browserify). + +With [component](http://component.io) do + +```bash +$ component install juliangruber/isarray +``` + +## License + +(MIT) + +Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/isarray/build/build.js b/pitfall/pdfkit/node_modules/isarray/build/build.js new file mode 100644 index 00000000..ec58596a --- /dev/null +++ b/pitfall/pdfkit/node_modules/isarray/build/build.js @@ -0,0 +1,209 @@ + +/** + * Require the given path. + * + * @param {String} path + * @return {Object} exports + * @api public + */ + +function require(path, parent, orig) { + var resolved = require.resolve(path); + + // lookup failed + if (null == resolved) { + orig = orig || path; + parent = parent || 'root'; + var err = new Error('Failed to require "' + orig + '" from "' + parent + '"'); + err.path = orig; + err.parent = parent; + err.require = true; + throw err; + } + + var module = require.modules[resolved]; + + // perform real require() + // by invoking the module's + // registered function + if (!module.exports) { + module.exports = {}; + module.client = module.component = true; + module.call(this, module.exports, require.relative(resolved), module); + } + + return module.exports; +} + +/** + * Registered modules. + */ + +require.modules = {}; + +/** + * Registered aliases. + */ + +require.aliases = {}; + +/** + * Resolve `path`. + * + * Lookup: + * + * - PATH/index.js + * - PATH.js + * - PATH + * + * @param {String} path + * @return {String} path or null + * @api private + */ + +require.resolve = function(path) { + if (path.charAt(0) === '/') path = path.slice(1); + var index = path + '/index.js'; + + var paths = [ + path, + path + '.js', + path + '.json', + path + '/index.js', + path + '/index.json' + ]; + + for (var i = 0; i < paths.length; i++) { + var path = paths[i]; + if (require.modules.hasOwnProperty(path)) return path; + } + + if (require.aliases.hasOwnProperty(index)) { + return require.aliases[index]; + } +}; + +/** + * Normalize `path` relative to the current path. + * + * @param {String} curr + * @param {String} path + * @return {String} + * @api private + */ + +require.normalize = function(curr, path) { + var segs = []; + + if ('.' != path.charAt(0)) return path; + + curr = curr.split('/'); + path = path.split('/'); + + for (var i = 0; i < path.length; ++i) { + if ('..' == path[i]) { + curr.pop(); + } else if ('.' != path[i] && '' != path[i]) { + segs.push(path[i]); + } + } + + return curr.concat(segs).join('/'); +}; + +/** + * Register module at `path` with callback `definition`. + * + * @param {String} path + * @param {Function} definition + * @api private + */ + +require.register = function(path, definition) { + require.modules[path] = definition; +}; + +/** + * Alias a module definition. + * + * @param {String} from + * @param {String} to + * @api private + */ + +require.alias = function(from, to) { + if (!require.modules.hasOwnProperty(from)) { + throw new Error('Failed to alias "' + from + '", it does not exist'); + } + require.aliases[to] = from; +}; + +/** + * Return a require function relative to the `parent` path. + * + * @param {String} parent + * @return {Function} + * @api private + */ + +require.relative = function(parent) { + var p = require.normalize(parent, '..'); + + /** + * lastIndexOf helper. + */ + + function lastIndexOf(arr, obj) { + var i = arr.length; + while (i--) { + if (arr[i] === obj) return i; + } + return -1; + } + + /** + * The relative require() itself. + */ + + function localRequire(path) { + var resolved = localRequire.resolve(path); + return require(resolved, parent, path); + } + + /** + * Resolve relative to the parent. + */ + + localRequire.resolve = function(path) { + var c = path.charAt(0); + if ('/' == c) return path.slice(1); + if ('.' == c) return require.normalize(p, path); + + // resolve deps by returning + // the dep in the nearest "deps" + // directory + var segs = parent.split('/'); + var i = lastIndexOf(segs, 'deps') + 1; + if (!i) i = 0; + path = segs.slice(0, i + 1).join('/') + '/deps/' + path; + return path; + }; + + /** + * Check if module is defined at `path`. + */ + + localRequire.exists = function(path) { + return require.modules.hasOwnProperty(localRequire.resolve(path)); + }; + + return localRequire; +}; +require.register("isarray/index.js", function(exports, require, module){ +module.exports = Array.isArray || function (arr) { + return Object.prototype.toString.call(arr) == '[object Array]'; +}; + +}); +require.alias("isarray/index.js", "isarray/index.js"); + diff --git a/pitfall/pdfkit/node_modules/isarray/component.json b/pitfall/pdfkit/node_modules/isarray/component.json new file mode 100644 index 00000000..9e31b683 --- /dev/null +++ b/pitfall/pdfkit/node_modules/isarray/component.json @@ -0,0 +1,19 @@ +{ + "name" : "isarray", + "description" : "Array#isArray for older browsers", + "version" : "0.0.1", + "repository" : "juliangruber/isarray", + "homepage": "https://github.com/juliangruber/isarray", + "main" : "index.js", + "scripts" : [ + "index.js" + ], + "dependencies" : {}, + "keywords": ["browser","isarray","array"], + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "license": "MIT" +} diff --git a/pitfall/pdfkit/node_modules/isarray/index.js b/pitfall/pdfkit/node_modules/isarray/index.js new file mode 100644 index 00000000..5f5ad45d --- /dev/null +++ b/pitfall/pdfkit/node_modules/isarray/index.js @@ -0,0 +1,3 @@ +module.exports = Array.isArray || function (arr) { + return Object.prototype.toString.call(arr) == '[object Array]'; +}; diff --git a/pitfall/pdfkit/node_modules/isarray/package.json b/pitfall/pdfkit/node_modules/isarray/package.json new file mode 100644 index 00000000..17acc264 --- /dev/null +++ b/pitfall/pdfkit/node_modules/isarray/package.json @@ -0,0 +1,87 @@ +{ + "_args": [ + [ + { + "raw": "isarray@0.0.1", + "scope": null, + "escapedName": "isarray", + "name": "isarray", + "rawSpec": "0.0.1", + "spec": "0.0.1", + "type": "version" + }, + "/Users/MB/git/pdfkit/node_modules/readable-stream" + ] + ], + "_from": "isarray@0.0.1", + "_id": "isarray@0.0.1", + "_inCache": true, + "_location": "/isarray", + "_npmUser": { + "name": "juliangruber", + "email": "julian@juliangruber.com" + }, + "_npmVersion": "1.2.18", + "_phantomChildren": {}, + "_requested": { + "raw": "isarray@0.0.1", + "scope": null, + "escapedName": "isarray", + "name": "isarray", + "rawSpec": "0.0.1", + "spec": "0.0.1", + "type": "version" + }, + "_requiredBy": [ + "/readable-stream", + "/through2/readable-stream" + ], + "_resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "_shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf", + "_shrinkwrap": null, + "_spec": "isarray@0.0.1", + "_where": "/Users/MB/git/pdfkit/node_modules/readable-stream", + "author": { + "name": "Julian Gruber", + "email": "mail@juliangruber.com", + "url": "http://juliangruber.com" + }, + "bugs": { + "url": "https://github.com/juliangruber/isarray/issues" + }, + "dependencies": {}, + "description": "Array#isArray for older browsers", + "devDependencies": { + "tap": "*" + }, + "directories": {}, + "dist": { + "shasum": "8a18acfca9a8f4177e09abfc6038939b05d1eedf", + "tarball": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz" + }, + "homepage": "https://github.com/juliangruber/isarray", + "keywords": [ + "browser", + "isarray", + "array" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "juliangruber", + "email": "julian@juliangruber.com" + } + ], + "name": "isarray", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/juliangruber/isarray.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "0.0.1" +} diff --git a/pitfall/pdfkit/node_modules/jade/.npmignore b/pitfall/pdfkit/node_modules/jade/.npmignore new file mode 100644 index 00000000..fdc7b893 --- /dev/null +++ b/pitfall/pdfkit/node_modules/jade/.npmignore @@ -0,0 +1,14 @@ +test +support +benchmarks +examples +lib-cov +coverage.html +.gitmodules +.travis.yml +History.md +Makefile +test/ +support/ +benchmarks/ +examples/ diff --git a/pitfall/pdfkit/node_modules/jade/LICENSE b/pitfall/pdfkit/node_modules/jade/LICENSE new file mode 100644 index 00000000..8ad0e0d3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/jade/LICENSE @@ -0,0 +1,22 @@ +(The MIT License) + +Copyright (c) 2009-2010 TJ Holowaychuk + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +'Software'), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/jade/README.md b/pitfall/pdfkit/node_modules/jade/README.md new file mode 100644 index 00000000..2b6de93c --- /dev/null +++ b/pitfall/pdfkit/node_modules/jade/README.md @@ -0,0 +1,161 @@ +# [![Jade - template engine ](http://i.imgur.com/5zf2aVt.png)](http://jade-lang.com/) + +Full documentation is at [jade-lang.com](http://jade-lang.com/) + + Jade is a high performance template engine heavily influenced by [Haml](http://haml-lang.com) + and implemented with JavaScript for [node](http://nodejs.org). For discussion join the [Google Group](http://groups.google.com/group/jadejs). + + You can test drive Jade online [here](http://naltatis.github.com/jade-syntax-docs). + + [![Build Status](https://travis-ci.org/visionmedia/jade.png?branch=master)](https://travis-ci.org/visionmedia/jade) + [![Dependency Status](https://gemnasium.com/visionmedia/jade.png)](https://gemnasium.com/visionmedia/jade) + [![NPM version](https://badge.fury.io/js/jade.png)](http://badge.fury.io/js/jade) + +## Announcements + +**Deprecation of implicit script/style text-only:** + + Jade version 0.31.0 deprecated implicit text only support for scripts and styles. To fix this all you need to do is add a `.` character after the script or style tag. + + It is hoped that this change will make Jade easier for newcomers to learn without affecting the power of the language or leading to excessive verboseness. + + If you have a lot of Jade files that need fixing you can use [fix-jade](https://github.com/ForbesLindesay/fix-jade) to attempt to automate the process. + +**Command line option change:** + +since `v0.31.0`, `-o` is preferred for `--out` where we used `-O` before. + +## Installation + +via npm: + +```bash +$ npm install jade +``` + +## Syntax + +Jade is a clean, whitespace sensitive syntax for writing html. Here is a simple example: + +```jade +doctype html +html(lang="en") + head + title= pageTitle + script(type='text/javascript'). + if (foo) bar(1 + 5) + body + h1 Jade - node template engine + #container.col + if youAreUsingJade + p You are amazing + else + p Get on it! + p. + Jade is a terse and simple templating language with a + strong focus on performance and powerful features. +``` + +becomes + + +```html + + + + Jade + + + +

    Jade - node template engine

    +
    +

    You are amazing

    +

    Jade is a terse and simple templating language with a strong focus on performance and powerful features.

    +
    + + +``` + +The official [jade tutorial](http://jade-lang.com/tutorial/) is a great place to start. While that (and the syntax documentation) is being finished, you can view some of the old documentation [here](https://github.com/visionmedia/jade/blob/master/jade.md) and [here](https://github.com/visionmedia/jade/blob/master/jade-language.md) + +## API + +For full API, see [jade-lang.com/api](http://jade-lang.com/api/) + +```js +var jade = require('jade'); + +// compile +var fn = jade.compile('string of jade', options); +var html = fn(locals); + +// render +var html = jade.render('string of jade', merge(options, locals)); + +// renderFile +var html = jade.renderFile('filename.jade', merge(options, locals)); +``` + +### Options + + - `filename` Used in exceptions, and required when using includes + - `compileDebug` When `false` no debug instrumentation is compiled + - `pretty` Add pretty-indentation whitespace to output _(false by default)_ + +## Browser Support + + The latest version of jade can be download for the browser in standalone form from [here](https://github.com/visionmedia/jade/raw/master/jade.js). It only supports the very latest browsers though, and is a large file. It is recommended that you pre-compile your jade templates to JavaScript and then just use the [runtime.js](https://github.com/visionmedia/jade/raw/master/runtime.js) library on the client. + + To compile a template for use on the client using the command line, do: + +```console +$ jade --client --no-debug filename.jade +``` + +which will produce `filename.js` containing the compiled template. + +## Command Line + +After installing the latest version of [node](http://nodejs.org/), install with: + +```console +$ npm install jade -g +``` + +and run with + +```console +$ jade --help +``` + +## Additional Resources + +Tutorials: + + - cssdeck interactive [Jade syntax tutorial](http://cssdeck.com/labs/learning-the-jade-templating-engine-syntax) + - cssdeck interactive [Jade logic tutorial](http://cssdeck.com/labs/jade-templating-tutorial-codecast-part-2) + - in [Japanese](http://blog.craftgear.net/4f501e97c1347ec934000001/title/10%E5%88%86%E3%81%A7%E3%82%8F%E3%81%8B%E3%82%8Bjade%E3%83%86%E3%83%B3%E3%83%97%E3%83%AC%E3%83%BC%E3%83%88%E3%82%A8%E3%83%B3%E3%82%B8%E3%83%B3) + + +Implementations in other languages: + + - [php](http://github.com/everzet/jade.php) + - [scala](http://scalate.fusesource.org/versions/snapshot/documentation/scaml-reference.html) + - [ruby](https://github.com/slim-template/slim) + - [python](https://github.com/SyrusAkbary/pyjade) + - [java](https://github.com/neuland/jade4j) + +Other: + + - [Emacs Mode](https://github.com/brianc/jade-mode) + - [Vim Syntax](https://github.com/digitaltoad/vim-jade) + - [TextMate Bundle](http://github.com/miksago/jade-tmbundle) + - [Coda/SubEtha syntax Mode](https://github.com/aaronmccall/jade.mode) + - [Screencasts](http://tjholowaychuk.com/post/1004255394/jade-screencast-template-engine-for-nodejs) + - [html2jade](https://github.com/donpark/html2jade) converter + +## License + +MIT diff --git a/pitfall/pdfkit/node_modules/jade/Readme_zh-cn.md b/pitfall/pdfkit/node_modules/jade/Readme_zh-cn.md new file mode 100644 index 00000000..160ea0ec --- /dev/null +++ b/pitfall/pdfkit/node_modules/jade/Readme_zh-cn.md @@ -0,0 +1,1285 @@ +# Jade - 模板引擎 + +Jade 是一个高性能的模板引擎,它深受 [Haml](http://haml-lang.com) 影响,它是用 JavaScript 实现的, 并且可以供 [Node](http://nodejs.org) 使用. + +翻译: [草依山](http://jser.me) 等 + +## 声明 + +从 Jade `v0.31.0` 开始放弃了对于 `" +| !{html} +``` + +内联标签同样可以使用文本块来包含文本: + +```jade +label + | Username: + input(name='user[name]') +``` + +或者直接使用标签文本: + +```jade +label Username: + input(name='user[name]') +``` + +_只_ 包含文本的标签,比如 ` + + +

    My Site

    +

    Welcome to my super lame site.

    + + + +``` + +前面已经提到,`include` 可以包含比如 HTML 或者 CSS 这样的内容。给定一个扩展名后,Jade 不会把这个文件当作一个 Jade 源代码,并且会把它当作一个普通文本包含进来: + +``` +html + head + //- css and js have simple filters that wrap them in + + + +
    +

    The MIT License (MIT)

    +

    Copyright (c) 2016 Rod Vagg (the "Original Author") and additional contributors

    +

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    +

    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

    +

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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.

    +
    +
    + + \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/quote-stream/node_modules/through2/LICENSE.md b/pitfall/pdfkit/node_modules/quote-stream/node_modules/through2/LICENSE.md new file mode 100644 index 00000000..7f0b93da --- /dev/null +++ b/pitfall/pdfkit/node_modules/quote-stream/node_modules/through2/LICENSE.md @@ -0,0 +1,9 @@ +# The MIT License (MIT) + +**Copyright (c) 2016 Rod Vagg (the "Original Author") and additional contributors** + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/quote-stream/node_modules/through2/README.md b/pitfall/pdfkit/node_modules/quote-stream/node_modules/through2/README.md new file mode 100644 index 00000000..a916f15e --- /dev/null +++ b/pitfall/pdfkit/node_modules/quote-stream/node_modules/through2/README.md @@ -0,0 +1,136 @@ +# through2 + +[![NPM](https://nodei.co/npm/through2.png?downloads&downloadRank)](https://nodei.co/npm/through2/) + +**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise** + +Inspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`. + +Note: As 2.x.x this module starts using **Streams3** instead of Stream2. To continue using a Streams2 version use `npm install through2@0` to fetch the latest version of 0.x.x. More information about Streams2 vs Streams3 and recommendations see the article **[Why I don't use Node's core 'stream' module](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html)**. + +```js +fs.createReadStream('ex.txt') + .pipe(through2(function (chunk, enc, callback) { + for (var i = 0; i < chunk.length; i++) + if (chunk[i] == 97) + chunk[i] = 122 // swap 'a' for 'z' + + this.push(chunk) + + callback() + })) + .pipe(fs.createWriteStream('out.txt')) + .on('finish', function () { + doSomethingSpecial() + }) +``` + +Or object streams: + +```js +var all = [] + +fs.createReadStream('data.csv') + .pipe(csv2()) + .pipe(through2.obj(function (chunk, enc, callback) { + var data = { + name : chunk[0] + , address : chunk[3] + , phone : chunk[10] + } + this.push(data) + + callback() + })) + .on('data', function (data) { + all.push(data) + }) + .on('end', function () { + doSomethingSpecial(all) + }) +``` + +Note that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`. + +## API + +through2([ options, ] [ transformFunction ] [, flushFunction ]) + +Consult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`). + +### options + +The options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`). + +The `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call: + +```js +fs.createReadStream('/tmp/important.dat') + .pipe(through2({ objectMode: true, allowHalfOpen: false }, + function (chunk, enc, cb) { + cb(null, 'wut?') // note we can use the second argument on the callback + // to provide data as an alternative to this.push('wut?') + } + ) + .pipe(fs.createWriteStream('/tmp/wut.txt')) +``` + +### transformFunction + +The `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk. + +To queue a new chunk, call `this.push(chunk)`—this can be called as many times as required before the `callback()` if you have multiple pieces to send on. + +Alternatively, you may use `callback(err, chunk)` as shorthand for emitting a single chunk or an error. + +If you **do not provide a `transformFunction`** then you will get a simple pass-through stream. + +### flushFunction + +The optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress. + +```js +fs.createReadStream('/tmp/important.dat') + .pipe(through2( + function (chunk, enc, cb) { cb(null, chunk) }, // transform is a noop + function (cb) { // flush function + this.push('tacking on an extra buffer to the end'); + cb(); + } + )) + .pipe(fs.createWriteStream('/tmp/wut.txt')); +``` + +through2.ctor([ options, ] transformFunction[, flushFunction ]) + +Instead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances. + +```js +var FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) { + if (record.temp != null && record.unit == "F") { + record.temp = ( ( record.temp - 32 ) * 5 ) / 9 + record.unit = "C" + } + this.push(record) + callback() +}) + +// Create instances of FToC like so: +var converter = new FToC() +// Or: +var converter = FToC() +// Or specify/override options when you instantiate, if you prefer: +var converter = FToC({objectMode: true}) +``` + +## See Also + + - [through2-map](https://github.com/brycebaril/through2-map) - Array.prototype.map analog for streams. + - [through2-filter](https://github.com/brycebaril/through2-filter) - Array.prototype.filter analog for streams. + - [through2-reduce](https://github.com/brycebaril/through2-reduce) - Array.prototype.reduce analog for streams. + - [through2-spy](https://github.com/brycebaril/through2-spy) - Wrapper for simple stream.PassThrough spies. + - the [mississippi stream utility collection](https://github.com/maxogden/mississippi) includes `through2` as well as many more useful stream modules similar to this one + +## License + +**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details. diff --git a/pitfall/pdfkit/node_modules/quote-stream/node_modules/through2/package.json b/pitfall/pdfkit/node_modules/quote-stream/node_modules/through2/package.json new file mode 100644 index 00000000..07bf2ce6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/quote-stream/node_modules/through2/package.json @@ -0,0 +1,116 @@ +{ + "_args": [ + [ + { + "raw": "through2@^2.0.0", + "scope": null, + "escapedName": "through2", + "name": "through2", + "rawSpec": "^2.0.0", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "/Users/MB/git/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs" + ], + [ + { + "raw": "through2@^2.0.0", + "scope": null, + "escapedName": "through2", + "name": "through2", + "rawSpec": "^2.0.0", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "/Users/MB/git/pitfall/pdfkit/node_modules/quote-stream" + ] + ], + "_from": "through2@^2.0.0", + "_id": "through2@2.0.3", + "_inCache": true, + "_location": "/quote-stream/through2", + "_nodeVersion": "7.2.0", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/through2-2.0.3.tgz_1480373529377_0.264686161885038" + }, + "_npmUser": { + "name": "rvagg", + "email": "rod@vagg.org" + }, + "_npmVersion": "3.10.9", + "_phantomChildren": {}, + "_requested": { + "raw": "through2@^2.0.0", + "scope": null, + "escapedName": "through2", + "name": "through2", + "rawSpec": "^2.0.0", + "spec": ">=2.0.0 <3.0.0", + "type": "range" + }, + "_requiredBy": [ + "/quote-stream" + ], + "_resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz", + "_shasum": "0004569b37c7c74ba39c43f3ced78d1ad94140be", + "_shrinkwrap": null, + "_spec": "through2@^2.0.0", + "_where": "/Users/MB/git/pitfall/pdfkit/node_modules/quote-stream", + "author": { + "name": "Rod Vagg", + "email": "r@va.gg", + "url": "https://github.com/rvagg" + }, + "bugs": { + "url": "https://github.com/rvagg/through2/issues" + }, + "dependencies": { + "readable-stream": "^2.1.5", + "xtend": "~4.0.1" + }, + "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise", + "devDependencies": { + "bl": "~1.1.2", + "faucet": "0.0.1", + "stream-spigot": "~3.0.5", + "tape": "~4.6.2" + }, + "directories": {}, + "dist": { + "shasum": "0004569b37c7c74ba39c43f3ced78d1ad94140be", + "tarball": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz" + }, + "gitHead": "4383b10b2cb6a32ae215760715b317513abe609f", + "homepage": "https://github.com/rvagg/through2#readme", + "keywords": [ + "stream", + "streams2", + "through", + "transform" + ], + "license": "MIT", + "main": "through2.js", + "maintainers": [ + { + "name": "rvagg", + "email": "rod@vagg.org" + }, + { + "name": "bryce", + "email": "bryce@ravenwall.com" + } + ], + "name": "through2", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/rvagg/through2.git" + }, + "scripts": { + "test": "node test/test.js | faucet", + "test-local": "brtapsauce-local test/basic-test.js" + }, + "version": "2.0.3" +} diff --git a/pitfall/pdfkit/node_modules/quote-stream/node_modules/through2/through2.js b/pitfall/pdfkit/node_modules/quote-stream/node_modules/through2/through2.js new file mode 100644 index 00000000..5b7a880e --- /dev/null +++ b/pitfall/pdfkit/node_modules/quote-stream/node_modules/through2/through2.js @@ -0,0 +1,96 @@ +var Transform = require('readable-stream/transform') + , inherits = require('util').inherits + , xtend = require('xtend') + +function DestroyableTransform(opts) { + Transform.call(this, opts) + this._destroyed = false +} + +inherits(DestroyableTransform, Transform) + +DestroyableTransform.prototype.destroy = function(err) { + if (this._destroyed) return + this._destroyed = true + + var self = this + process.nextTick(function() { + if (err) + self.emit('error', err) + self.emit('close') + }) +} + +// a noop _transform function +function noop (chunk, enc, callback) { + callback(null, chunk) +} + + +// create a new export function, used by both the main export and +// the .ctor export, contains common logic for dealing with arguments +function through2 (construct) { + return function (options, transform, flush) { + if (typeof options == 'function') { + flush = transform + transform = options + options = {} + } + + if (typeof transform != 'function') + transform = noop + + if (typeof flush != 'function') + flush = null + + return construct(options, transform, flush) + } +} + + +// main export, just make me a transform stream! +module.exports = through2(function (options, transform, flush) { + var t2 = new DestroyableTransform(options) + + t2._transform = transform + + if (flush) + t2._flush = flush + + return t2 +}) + + +// make me a reusable prototype that I can `new`, or implicitly `new` +// with a constructor call +module.exports.ctor = through2(function (options, transform, flush) { + function Through2 (override) { + if (!(this instanceof Through2)) + return new Through2(override) + + this.options = xtend(options, override) + + DestroyableTransform.call(this, this.options) + } + + inherits(Through2, DestroyableTransform) + + Through2.prototype._transform = transform + + if (flush) + Through2.prototype._flush = flush + + return Through2 +}) + + +module.exports.obj = through2(function (options, transform, flush) { + var t2 = new DestroyableTransform(xtend({ objectMode: true, highWaterMark: 16 }, options)) + + t2._transform = transform + + if (flush) + t2._flush = flush + + return t2 +}) diff --git a/pitfall/pdfkit/node_modules/quote-stream/node_modules/xtend/.jshintrc b/pitfall/pdfkit/node_modules/quote-stream/node_modules/xtend/.jshintrc new file mode 100644 index 00000000..77887b5f --- /dev/null +++ b/pitfall/pdfkit/node_modules/quote-stream/node_modules/xtend/.jshintrc @@ -0,0 +1,30 @@ +{ + "maxdepth": 4, + "maxstatements": 200, + "maxcomplexity": 12, + "maxlen": 80, + "maxparams": 5, + + "curly": true, + "eqeqeq": true, + "immed": true, + "latedef": false, + "noarg": true, + "noempty": true, + "nonew": true, + "undef": true, + "unused": "vars", + "trailing": true, + + "quotmark": true, + "expr": true, + "asi": true, + + "browser": false, + "esnext": true, + "devel": false, + "node": false, + "nonstandard": false, + + "predef": ["require", "module", "__dirname", "__filename"] +} diff --git a/pitfall/pdfkit/node_modules/quote-stream/node_modules/xtend/.npmignore b/pitfall/pdfkit/node_modules/quote-stream/node_modules/xtend/.npmignore new file mode 100644 index 00000000..3c3629e6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/quote-stream/node_modules/xtend/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/pitfall/pdfkit/node_modules/quote-stream/node_modules/xtend/LICENCE b/pitfall/pdfkit/node_modules/quote-stream/node_modules/xtend/LICENCE new file mode 100644 index 00000000..1a14b437 --- /dev/null +++ b/pitfall/pdfkit/node_modules/quote-stream/node_modules/xtend/LICENCE @@ -0,0 +1,19 @@ +Copyright (c) 2012-2014 Raynos. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/quote-stream/node_modules/xtend/Makefile b/pitfall/pdfkit/node_modules/quote-stream/node_modules/xtend/Makefile new file mode 100644 index 00000000..d583fcf4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/quote-stream/node_modules/xtend/Makefile @@ -0,0 +1,4 @@ +browser: + node ./support/compile + +.PHONY: browser \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/quote-stream/node_modules/xtend/README.md b/pitfall/pdfkit/node_modules/quote-stream/node_modules/xtend/README.md new file mode 100644 index 00000000..093cb297 --- /dev/null +++ b/pitfall/pdfkit/node_modules/quote-stream/node_modules/xtend/README.md @@ -0,0 +1,32 @@ +# xtend + +[![browser support][3]][4] + +[![locked](http://badges.github.io/stability-badges/dist/locked.svg)](http://github.com/badges/stability-badges) + +Extend like a boss + +xtend is a basic utility library which allows you to extend an object by appending all of the properties from each object in a list. When there are identical properties, the right-most property takes precedence. + +## Examples + +```js +var extend = require("xtend") + +// extend returns a new object. Does not mutate arguments +var combination = extend({ + a: "a", + b: 'c' +}, { + b: "b" +}) +// { a: "a", b: "b" } +``` + +## Stability status: Locked + +## MIT Licenced + + + [3]: http://ci.testling.com/Raynos/xtend.png + [4]: http://ci.testling.com/Raynos/xtend diff --git a/pitfall/pdfkit/node_modules/quote-stream/node_modules/xtend/immutable.js b/pitfall/pdfkit/node_modules/quote-stream/node_modules/xtend/immutable.js new file mode 100644 index 00000000..94889c9d --- /dev/null +++ b/pitfall/pdfkit/node_modules/quote-stream/node_modules/xtend/immutable.js @@ -0,0 +1,19 @@ +module.exports = extend + +var hasOwnProperty = Object.prototype.hasOwnProperty; + +function extend() { + var target = {} + + for (var i = 0; i < arguments.length; i++) { + var source = arguments[i] + + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + target[key] = source[key] + } + } + } + + return target +} diff --git a/pitfall/pdfkit/node_modules/quote-stream/node_modules/xtend/mutable.js b/pitfall/pdfkit/node_modules/quote-stream/node_modules/xtend/mutable.js new file mode 100644 index 00000000..72debede --- /dev/null +++ b/pitfall/pdfkit/node_modules/quote-stream/node_modules/xtend/mutable.js @@ -0,0 +1,17 @@ +module.exports = extend + +var hasOwnProperty = Object.prototype.hasOwnProperty; + +function extend(target) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i] + + for (var key in source) { + if (hasOwnProperty.call(source, key)) { + target[key] = source[key] + } + } + } + + return target +} diff --git a/pitfall/pdfkit/node_modules/quote-stream/node_modules/xtend/package.json b/pitfall/pdfkit/node_modules/quote-stream/node_modules/xtend/package.json new file mode 100644 index 00000000..5d639ce8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/quote-stream/node_modules/xtend/package.json @@ -0,0 +1,117 @@ +{ + "_args": [ + [ + { + "raw": "xtend@~4.0.1", + "scope": null, + "escapedName": "xtend", + "name": "xtend", + "rawSpec": "~4.0.1", + "spec": ">=4.0.1 <4.1.0", + "type": "range" + }, + "/Users/MB/git/pitfall/pdfkit/node_modules/quote-stream/node_modules/through2" + ] + ], + "_from": "xtend@>=4.0.1 <4.1.0", + "_id": "xtend@4.0.1", + "_inCache": true, + "_location": "/quote-stream/xtend", + "_nodeVersion": "0.10.32", + "_npmUser": { + "name": "raynos", + "email": "raynos2@gmail.com" + }, + "_npmVersion": "2.14.1", + "_phantomChildren": {}, + "_requested": { + "raw": "xtend@~4.0.1", + "scope": null, + "escapedName": "xtend", + "name": "xtend", + "rawSpec": "~4.0.1", + "spec": ">=4.0.1 <4.1.0", + "type": "range" + }, + "_requiredBy": [ + "/quote-stream/through2" + ], + "_resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "_shasum": "a5c6d532be656e23db820efb943a1f04998d63af", + "_shrinkwrap": null, + "_spec": "xtend@~4.0.1", + "_where": "/Users/MB/git/pitfall/pdfkit/node_modules/quote-stream/node_modules/through2", + "author": { + "name": "Raynos", + "email": "raynos2@gmail.com" + }, + "bugs": { + "url": "https://github.com/Raynos/xtend/issues", + "email": "raynos2@gmail.com" + }, + "contributors": [ + { + "name": "Jake Verbaten" + }, + { + "name": "Matt Esch" + } + ], + "dependencies": {}, + "description": "extend like a boss", + "devDependencies": { + "tape": "~1.1.0" + }, + "directories": {}, + "dist": { + "shasum": "a5c6d532be656e23db820efb943a1f04998d63af", + "tarball": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz" + }, + "engines": { + "node": ">=0.4" + }, + "gitHead": "23dc302a89756da89c1897bc732a752317e35390", + "homepage": "https://github.com/Raynos/xtend", + "keywords": [ + "extend", + "merge", + "options", + "opts", + "object", + "array" + ], + "license": "MIT", + "main": "immutable", + "maintainers": [ + { + "name": "raynos", + "email": "raynos2@gmail.com" + } + ], + "name": "xtend", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/Raynos/xtend.git" + }, + "scripts": { + "test": "node test" + }, + "testling": { + "files": "test.js", + "browsers": [ + "ie/7..latest", + "firefox/16..latest", + "firefox/nightly", + "chrome/22..latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest" + ] + }, + "version": "4.0.1" +} diff --git a/pitfall/pdfkit/node_modules/quote-stream/node_modules/xtend/test.js b/pitfall/pdfkit/node_modules/quote-stream/node_modules/xtend/test.js new file mode 100644 index 00000000..093a2b06 --- /dev/null +++ b/pitfall/pdfkit/node_modules/quote-stream/node_modules/xtend/test.js @@ -0,0 +1,83 @@ +var test = require("tape") +var extend = require("./") +var mutableExtend = require("./mutable") + +test("merge", function(assert) { + var a = { a: "foo" } + var b = { b: "bar" } + + assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) + assert.end() +}) + +test("replace", function(assert) { + var a = { a: "foo" } + var b = { a: "bar" } + + assert.deepEqual(extend(a, b), { a: "bar" }) + assert.end() +}) + +test("undefined", function(assert) { + var a = { a: undefined } + var b = { b: "foo" } + + assert.deepEqual(extend(a, b), { a: undefined, b: "foo" }) + assert.deepEqual(extend(b, a), { a: undefined, b: "foo" }) + assert.end() +}) + +test("handle 0", function(assert) { + var a = { a: "default" } + var b = { a: 0 } + + assert.deepEqual(extend(a, b), { a: 0 }) + assert.deepEqual(extend(b, a), { a: "default" }) + assert.end() +}) + +test("is immutable", function (assert) { + var record = {} + + extend(record, { foo: "bar" }) + assert.equal(record.foo, undefined) + assert.end() +}) + +test("null as argument", function (assert) { + var a = { foo: "bar" } + var b = null + var c = void 0 + + assert.deepEqual(extend(b, a, c), { foo: "bar" }) + assert.end() +}) + +test("mutable", function (assert) { + var a = { foo: "bar" } + + mutableExtend(a, { bar: "baz" }) + + assert.equal(a.bar, "baz") + assert.end() +}) + +test("null prototype", function(assert) { + var a = { a: "foo" } + var b = Object.create(null) + b.b = "bar"; + + assert.deepEqual(extend(a, b), { a: "foo", b: "bar" }) + assert.end() +}) + +test("null prototype mutable", function (assert) { + var a = { foo: "bar" } + var b = Object.create(null) + b.bar = "baz"; + + mutableExtend(a, b) + + assert.equal(a.bar, "baz") + assert.end() +}) diff --git a/pitfall/pdfkit/node_modules/quote-stream/package.json b/pitfall/pdfkit/node_modules/quote-stream/package.json new file mode 100644 index 00000000..f397e7ab --- /dev/null +++ b/pitfall/pdfkit/node_modules/quote-stream/package.json @@ -0,0 +1,121 @@ +{ + "_args": [ + [ + { + "raw": "quote-stream@^1.0.1", + "scope": null, + "escapedName": "quote-stream", + "name": "quote-stream", + "rawSpec": "^1.0.1", + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "/Users/MB/git/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs" + ] + ], + "_from": "quote-stream@>=1.0.1 <2.0.0", + "_id": "quote-stream@1.0.2", + "_inCache": true, + "_location": "/quote-stream", + "_nodeVersion": "2.4.0", + "_npmUser": { + "name": "substack", + "email": "substack@gmail.com" + }, + "_npmVersion": "3.2.2", + "_phantomChildren": { + "buffer-shims": "1.0.0", + "core-util-is": "1.0.2", + "inherits": "2.0.3", + "process-nextick-args": "1.0.7", + "util-deprecate": "1.0.2" + }, + "_requested": { + "raw": "quote-stream@^1.0.1", + "scope": null, + "escapedName": "quote-stream", + "name": "quote-stream", + "rawSpec": "^1.0.1", + "spec": ">=1.0.1 <2.0.0", + "type": "range" + }, + "_requiredBy": [ + "/fontkit/brfs", + "/unicode-properties/brfs" + ], + "_resolved": "https://registry.npmjs.org/quote-stream/-/quote-stream-1.0.2.tgz", + "_shasum": "84963f8c9c26b942e153feeb53aae74652b7e0b2", + "_shrinkwrap": null, + "_spec": "quote-stream@^1.0.1", + "_where": "/Users/MB/git/pitfall/pdfkit/node_modules/fontkit/node_modules/brfs", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "bin": { + "quote-stream": "bin/cmd.js" + }, + "bugs": { + "url": "https://github.com/substack/quote-stream/issues" + }, + "dependencies": { + "buffer-equal": "0.0.1", + "minimist": "^1.1.3", + "through2": "^2.0.0" + }, + "description": "transform a stream into a quoted string", + "devDependencies": { + "concat-stream": "~1.4.5", + "tape": "^4.1.0" + }, + "directories": {}, + "dist": { + "shasum": "84963f8c9c26b942e153feeb53aae74652b7e0b2", + "tarball": "https://registry.npmjs.org/quote-stream/-/quote-stream-1.0.2.tgz" + }, + "gitHead": "a448c573805056a9aca57acbc2e68b65665b5f58", + "homepage": "https://github.com/substack/quote-stream", + "keywords": [ + "quote", + "transform", + "stream" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "name": "quote-stream", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/substack/quote-stream.git" + }, + "scripts": { + "test": "tape test/*.js" + }, + "testling": { + "files": "test/*.js", + "browsers": [ + "ie/8..latest", + "firefox/15", + "firefox/latest", + "firefox/nightly", + "chrome/15", + "chrome/latest", + "chrome/canary", + "opera/12..latest", + "opera/next", + "safari/5.1..latest", + "ipad/6.0..latest", + "iphone/6.0..latest", + "android-browser/4.2..latest" + ] + }, + "version": "1.0.2" +} diff --git a/pitfall/pdfkit/node_modules/quote-stream/readme.markdown b/pitfall/pdfkit/node_modules/quote-stream/readme.markdown new file mode 100644 index 00000000..a7046ecd --- /dev/null +++ b/pitfall/pdfkit/node_modules/quote-stream/readme.markdown @@ -0,0 +1,53 @@ +# quote-stream + +transform a stream into a quoted string + +[![testling badge](https://ci.testling.com/substack/quote-stream.png)](https://ci.testling.com/substack/quote-stream) + +[![build status](https://secure.travis-ci.org/substack/quote-stream.png)](http://travis-ci.org/substack/quote-stream) + +# example + +``` js +var quote = require('quote-stream'); +process.stdin.pipe(quote()).pipe(process.stdout); +``` + +output: + +``` +$ echo beep boop | node example/stream.js +"beep boop\n" +``` + +# methods + +``` js +var quote = require('quote-stream') +``` + +## var q = quote() + +Return a transform stream `q` that wraps input in double quotes and adds escape +characters to the chunks. + +# usage + +``` +usage: quote-stream + + Transform stdin to a quoted string on stdout. + +``` + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install quote-stream +``` + +# license + +MIT diff --git a/pitfall/pdfkit/node_modules/quote-stream/test/simple.js b/pitfall/pdfkit/node_modules/quote-stream/test/simple.js new file mode 100644 index 00000000..8f5c653b --- /dev/null +++ b/pitfall/pdfkit/node_modules/quote-stream/test/simple.js @@ -0,0 +1,13 @@ +var quote = require('../'); +var concat = require('concat-stream'); +var test = require('tape'); + +test('simple', function (t) { + t.plan(1); + var q = quote(); + q.end('abc'); + + q.pipe(concat(function (body) { + t.equal(body.toString('utf8'), '"abc"'); + })); +}); diff --git a/pitfall/pdfkit/node_modules/quote-stream/test/unicode_separators.js b/pitfall/pdfkit/node_modules/quote-stream/test/unicode_separators.js new file mode 100644 index 00000000..3c2c841c --- /dev/null +++ b/pitfall/pdfkit/node_modules/quote-stream/test/unicode_separators.js @@ -0,0 +1,23 @@ +var quote = require('../'); +var concat = require('concat-stream'); +var test = require('tape'); + +test('js string unicode separators', function (t) { + t.plan(1); + var q = quote(); + q.end('\u2027beep\u2028ima\u2029jeep\u2030'); + + q.pipe(concat(function (body) { + t.equal(body.toString('utf8'), '"\u2027beep\\u2028ima\\u2029jeep\u2030"'); + })); +}); + +test('utf8 separators', function (t) { + t.plan(1); + var q = quote(); + q.end(Buffer('beep\u2028ima\u2029jeep', 'utf8')); + + q.pipe(concat(function (body) { + t.equal(body.toString('utf8'), '"beep\\u2028ima\\u2029jeep"'); + })); +}); diff --git a/pitfall/pdfkit/node_modules/quote-stream/test/whitespace.js b/pitfall/pdfkit/node_modules/quote-stream/test/whitespace.js new file mode 100644 index 00000000..d576620a --- /dev/null +++ b/pitfall/pdfkit/node_modules/quote-stream/test/whitespace.js @@ -0,0 +1,13 @@ +var quote = require('../'); +var concat = require('concat-stream'); +var test = require('tape'); + +test('whitespace', function (t) { + t.plan(1); + var q = quote(); + q.end('abc\ndef\tghi\r\n'); + + q.pipe(concat(function (body) { + t.equal(body.toString('utf8'), '"abc\\ndef\\tghi\\r\\n"'); + })); +}); diff --git a/pitfall/pdfkit/node_modules/readable-stream/.npmignore b/pitfall/pdfkit/node_modules/readable-stream/.npmignore new file mode 100644 index 00000000..38344f87 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readable-stream/.npmignore @@ -0,0 +1,5 @@ +build/ +test/ +examples/ +fs.js +zlib.js \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/readable-stream/LICENSE b/pitfall/pdfkit/node_modules/readable-stream/LICENSE new file mode 100644 index 00000000..e3d4e695 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readable-stream/LICENSE @@ -0,0 +1,18 @@ +Copyright Joyent, Inc. and other Node contributors. All rights reserved. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to +deal in the Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +sell copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/readable-stream/README.md b/pitfall/pdfkit/node_modules/readable-stream/README.md new file mode 100644 index 00000000..e46b8239 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readable-stream/README.md @@ -0,0 +1,15 @@ +# readable-stream + +***Node-core streams for userland*** + +[![NPM](https://nodei.co/npm/readable-stream.png?downloads=true&downloadRank=true)](https://nodei.co/npm/readable-stream/) +[![NPM](https://nodei.co/npm-dl/readable-stream.png&months=6&height=3)](https://nodei.co/npm/readable-stream/) + +This package is a mirror of the Streams2 and Streams3 implementations in Node-core. + +If you want to guarantee a stable streams base, regardless of what version of Node you, or the users of your libraries are using, use **readable-stream** *only* and avoid the *"stream"* module in Node-core. + +**readable-stream** comes in two major versions, v1.0.x and v1.1.x. The former tracks the Streams2 implementation in Node 0.10, including bug-fixes and minor improvements as they are added. The latter tracks Streams3 as it develops in Node 0.11; we will likely see a v1.2.x branch for Node 0.12. + +**readable-stream** uses proper patch-level versioning so if you pin to `"~1.0.0"` you’ll get the latest Node 0.10 Streams2 implementation, including any fixes and minor non-breaking improvements. The patch-level versions of 1.0.x and 1.1.x should mirror the patch-level versions of Node-core releases. You should prefer the **1.0.x** releases for now and when you’re ready to start using Streams3, pin to `"~1.1.0"` + diff --git a/pitfall/pdfkit/node_modules/readable-stream/duplex.js b/pitfall/pdfkit/node_modules/readable-stream/duplex.js new file mode 100644 index 00000000..ca807af8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readable-stream/duplex.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_duplex.js") diff --git a/pitfall/pdfkit/node_modules/readable-stream/float.patch b/pitfall/pdfkit/node_modules/readable-stream/float.patch new file mode 100644 index 00000000..b984607a --- /dev/null +++ b/pitfall/pdfkit/node_modules/readable-stream/float.patch @@ -0,0 +1,923 @@ +diff --git a/lib/_stream_duplex.js b/lib/_stream_duplex.js +index c5a741c..a2e0d8e 100644 +--- a/lib/_stream_duplex.js ++++ b/lib/_stream_duplex.js +@@ -26,8 +26,8 @@ + + module.exports = Duplex; + var util = require('util'); +-var Readable = require('_stream_readable'); +-var Writable = require('_stream_writable'); ++var Readable = require('./_stream_readable'); ++var Writable = require('./_stream_writable'); + + util.inherits(Duplex, Readable); + +diff --git a/lib/_stream_passthrough.js b/lib/_stream_passthrough.js +index a5e9864..330c247 100644 +--- a/lib/_stream_passthrough.js ++++ b/lib/_stream_passthrough.js +@@ -25,7 +25,7 @@ + + module.exports = PassThrough; + +-var Transform = require('_stream_transform'); ++var Transform = require('./_stream_transform'); + var util = require('util'); + util.inherits(PassThrough, Transform); + +diff --git a/lib/_stream_readable.js b/lib/_stream_readable.js +index 0c3fe3e..90a8298 100644 +--- a/lib/_stream_readable.js ++++ b/lib/_stream_readable.js +@@ -23,10 +23,34 @@ module.exports = Readable; + Readable.ReadableState = ReadableState; + + var EE = require('events').EventEmitter; ++if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { ++ return emitter.listeners(type).length; ++}; ++ ++if (!global.setImmediate) global.setImmediate = function setImmediate(fn) { ++ return setTimeout(fn, 0); ++}; ++if (!global.clearImmediate) global.clearImmediate = function clearImmediate(i) { ++ return clearTimeout(i); ++}; ++ + var Stream = require('stream'); + var util = require('util'); ++if (!util.isUndefined) { ++ var utilIs = require('core-util-is'); ++ for (var f in utilIs) { ++ util[f] = utilIs[f]; ++ } ++} + var StringDecoder; +-var debug = util.debuglog('stream'); ++var debug; ++if (util.debuglog) ++ debug = util.debuglog('stream'); ++else try { ++ debug = require('debuglog')('stream'); ++} catch (er) { ++ debug = function() {}; ++} + + util.inherits(Readable, Stream); + +@@ -380,7 +404,7 @@ function chunkInvalid(state, chunk) { + + + function onEofChunk(stream, state) { +- if (state.decoder && !state.ended) { ++ if (state.decoder && !state.ended && state.decoder.end) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); +diff --git a/lib/_stream_transform.js b/lib/_stream_transform.js +index b1f9fcc..b0caf57 100644 +--- a/lib/_stream_transform.js ++++ b/lib/_stream_transform.js +@@ -64,8 +64,14 @@ + + module.exports = Transform; + +-var Duplex = require('_stream_duplex'); ++var Duplex = require('./_stream_duplex'); + var util = require('util'); ++if (!util.isUndefined) { ++ var utilIs = require('core-util-is'); ++ for (var f in utilIs) { ++ util[f] = utilIs[f]; ++ } ++} + util.inherits(Transform, Duplex); + + +diff --git a/lib/_stream_writable.js b/lib/_stream_writable.js +index ba2e920..f49288b 100644 +--- a/lib/_stream_writable.js ++++ b/lib/_stream_writable.js +@@ -27,6 +27,12 @@ module.exports = Writable; + Writable.WritableState = WritableState; + + var util = require('util'); ++if (!util.isUndefined) { ++ var utilIs = require('core-util-is'); ++ for (var f in utilIs) { ++ util[f] = utilIs[f]; ++ } ++} + var Stream = require('stream'); + + util.inherits(Writable, Stream); +@@ -119,7 +125,7 @@ function WritableState(options, stream) { + function Writable(options) { + // Writable ctor is applied to Duplexes, though they're not + // instanceof Writable, they're instanceof Readable. +- if (!(this instanceof Writable) && !(this instanceof Stream.Duplex)) ++ if (!(this instanceof Writable) && !(this instanceof require('./_stream_duplex'))) + return new Writable(options); + + this._writableState = new WritableState(options, this); +diff --git a/test/simple/test-stream-big-push.js b/test/simple/test-stream-big-push.js +index e3787e4..8cd2127 100644 +--- a/test/simple/test-stream-big-push.js ++++ b/test/simple/test-stream-big-push.js +@@ -21,7 +21,7 @@ + + var common = require('../common'); + var assert = require('assert'); +-var stream = require('stream'); ++var stream = require('../../'); + var str = 'asdfasdfasdfasdfasdf'; + + var r = new stream.Readable({ +diff --git a/test/simple/test-stream-end-paused.js b/test/simple/test-stream-end-paused.js +index bb73777..d40efc7 100644 +--- a/test/simple/test-stream-end-paused.js ++++ b/test/simple/test-stream-end-paused.js +@@ -25,7 +25,7 @@ var gotEnd = false; + + // Make sure we don't miss the end event for paused 0-length streams + +-var Readable = require('stream').Readable; ++var Readable = require('../../').Readable; + var stream = new Readable(); + var calledRead = false; + stream._read = function() { +diff --git a/test/simple/test-stream-pipe-after-end.js b/test/simple/test-stream-pipe-after-end.js +index b46ee90..0be8366 100644 +--- a/test/simple/test-stream-pipe-after-end.js ++++ b/test/simple/test-stream-pipe-after-end.js +@@ -22,8 +22,8 @@ + var common = require('../common'); + var assert = require('assert'); + +-var Readable = require('_stream_readable'); +-var Writable = require('_stream_writable'); ++var Readable = require('../../lib/_stream_readable'); ++var Writable = require('../../lib/_stream_writable'); + var util = require('util'); + + util.inherits(TestReadable, Readable); +diff --git a/test/simple/test-stream-pipe-cleanup.js b/test/simple/test-stream-pipe-cleanup.js +deleted file mode 100644 +index f689358..0000000 +--- a/test/simple/test-stream-pipe-cleanup.js ++++ /dev/null +@@ -1,122 +0,0 @@ +-// Copyright Joyent, Inc. and other Node contributors. +-// +-// Permission is hereby granted, free of charge, to any person obtaining a +-// copy of this software and associated documentation files (the +-// "Software"), to deal in the Software without restriction, including +-// without limitation the rights to use, copy, modify, merge, publish, +-// distribute, sublicense, and/or sell copies of the Software, and to permit +-// persons to whom the Software is furnished to do so, subject to the +-// following conditions: +-// +-// The above copyright notice and this permission notice shall be included +-// in all copies or substantial portions of the Software. +-// +-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. +- +-// This test asserts that Stream.prototype.pipe does not leave listeners +-// hanging on the source or dest. +- +-var common = require('../common'); +-var stream = require('stream'); +-var assert = require('assert'); +-var util = require('util'); +- +-function Writable() { +- this.writable = true; +- this.endCalls = 0; +- stream.Stream.call(this); +-} +-util.inherits(Writable, stream.Stream); +-Writable.prototype.end = function() { +- this.endCalls++; +-}; +- +-Writable.prototype.destroy = function() { +- this.endCalls++; +-}; +- +-function Readable() { +- this.readable = true; +- stream.Stream.call(this); +-} +-util.inherits(Readable, stream.Stream); +- +-function Duplex() { +- this.readable = true; +- Writable.call(this); +-} +-util.inherits(Duplex, Writable); +- +-var i = 0; +-var limit = 100; +- +-var w = new Writable(); +- +-var r; +- +-for (i = 0; i < limit; i++) { +- r = new Readable(); +- r.pipe(w); +- r.emit('end'); +-} +-assert.equal(0, r.listeners('end').length); +-assert.equal(limit, w.endCalls); +- +-w.endCalls = 0; +- +-for (i = 0; i < limit; i++) { +- r = new Readable(); +- r.pipe(w); +- r.emit('close'); +-} +-assert.equal(0, r.listeners('close').length); +-assert.equal(limit, w.endCalls); +- +-w.endCalls = 0; +- +-r = new Readable(); +- +-for (i = 0; i < limit; i++) { +- w = new Writable(); +- r.pipe(w); +- w.emit('close'); +-} +-assert.equal(0, w.listeners('close').length); +- +-r = new Readable(); +-w = new Writable(); +-var d = new Duplex(); +-r.pipe(d); // pipeline A +-d.pipe(w); // pipeline B +-assert.equal(r.listeners('end').length, 2); // A.onend, A.cleanup +-assert.equal(r.listeners('close').length, 2); // A.onclose, A.cleanup +-assert.equal(d.listeners('end').length, 2); // B.onend, B.cleanup +-assert.equal(d.listeners('close').length, 3); // A.cleanup, B.onclose, B.cleanup +-assert.equal(w.listeners('end').length, 0); +-assert.equal(w.listeners('close').length, 1); // B.cleanup +- +-r.emit('end'); +-assert.equal(d.endCalls, 1); +-assert.equal(w.endCalls, 0); +-assert.equal(r.listeners('end').length, 0); +-assert.equal(r.listeners('close').length, 0); +-assert.equal(d.listeners('end').length, 2); // B.onend, B.cleanup +-assert.equal(d.listeners('close').length, 2); // B.onclose, B.cleanup +-assert.equal(w.listeners('end').length, 0); +-assert.equal(w.listeners('close').length, 1); // B.cleanup +- +-d.emit('end'); +-assert.equal(d.endCalls, 1); +-assert.equal(w.endCalls, 1); +-assert.equal(r.listeners('end').length, 0); +-assert.equal(r.listeners('close').length, 0); +-assert.equal(d.listeners('end').length, 0); +-assert.equal(d.listeners('close').length, 0); +-assert.equal(w.listeners('end').length, 0); +-assert.equal(w.listeners('close').length, 0); +diff --git a/test/simple/test-stream-pipe-error-handling.js b/test/simple/test-stream-pipe-error-handling.js +index c5d724b..c7d6b7d 100644 +--- a/test/simple/test-stream-pipe-error-handling.js ++++ b/test/simple/test-stream-pipe-error-handling.js +@@ -21,7 +21,7 @@ + + var common = require('../common'); + var assert = require('assert'); +-var Stream = require('stream').Stream; ++var Stream = require('../../').Stream; + + (function testErrorListenerCatches() { + var source = new Stream(); +diff --git a/test/simple/test-stream-pipe-event.js b/test/simple/test-stream-pipe-event.js +index cb9d5fe..56f8d61 100644 +--- a/test/simple/test-stream-pipe-event.js ++++ b/test/simple/test-stream-pipe-event.js +@@ -20,7 +20,7 @@ + // USE OR OTHER DEALINGS IN THE SOFTWARE. + + var common = require('../common'); +-var stream = require('stream'); ++var stream = require('../../'); + var assert = require('assert'); + var util = require('util'); + +diff --git a/test/simple/test-stream-push-order.js b/test/simple/test-stream-push-order.js +index f2e6ec2..a5c9bf9 100644 +--- a/test/simple/test-stream-push-order.js ++++ b/test/simple/test-stream-push-order.js +@@ -20,7 +20,7 @@ + // USE OR OTHER DEALINGS IN THE SOFTWARE. + + var common = require('../common.js'); +-var Readable = require('stream').Readable; ++var Readable = require('../../').Readable; + var assert = require('assert'); + + var s = new Readable({ +diff --git a/test/simple/test-stream-push-strings.js b/test/simple/test-stream-push-strings.js +index 06f43dc..1701a9a 100644 +--- a/test/simple/test-stream-push-strings.js ++++ b/test/simple/test-stream-push-strings.js +@@ -22,7 +22,7 @@ + var common = require('../common'); + var assert = require('assert'); + +-var Readable = require('stream').Readable; ++var Readable = require('../../').Readable; + var util = require('util'); + + util.inherits(MyStream, Readable); +diff --git a/test/simple/test-stream-readable-event.js b/test/simple/test-stream-readable-event.js +index ba6a577..a8e6f7b 100644 +--- a/test/simple/test-stream-readable-event.js ++++ b/test/simple/test-stream-readable-event.js +@@ -22,7 +22,7 @@ + var common = require('../common'); + var assert = require('assert'); + +-var Readable = require('stream').Readable; ++var Readable = require('../../').Readable; + + (function first() { + // First test, not reading when the readable is added. +diff --git a/test/simple/test-stream-readable-flow-recursion.js b/test/simple/test-stream-readable-flow-recursion.js +index 2891ad6..11689ba 100644 +--- a/test/simple/test-stream-readable-flow-recursion.js ++++ b/test/simple/test-stream-readable-flow-recursion.js +@@ -27,7 +27,7 @@ var assert = require('assert'); + // more data continuously, but without triggering a nextTick + // warning or RangeError. + +-var Readable = require('stream').Readable; ++var Readable = require('../../').Readable; + + // throw an error if we trigger a nextTick warning. + process.throwDeprecation = true; +diff --git a/test/simple/test-stream-unshift-empty-chunk.js b/test/simple/test-stream-unshift-empty-chunk.js +index 0c96476..7827538 100644 +--- a/test/simple/test-stream-unshift-empty-chunk.js ++++ b/test/simple/test-stream-unshift-empty-chunk.js +@@ -24,7 +24,7 @@ var assert = require('assert'); + + // This test verifies that stream.unshift(Buffer(0)) or + // stream.unshift('') does not set state.reading=false. +-var Readable = require('stream').Readable; ++var Readable = require('../../').Readable; + + var r = new Readable(); + var nChunks = 10; +diff --git a/test/simple/test-stream-unshift-read-race.js b/test/simple/test-stream-unshift-read-race.js +index 83fd9fa..17c18aa 100644 +--- a/test/simple/test-stream-unshift-read-race.js ++++ b/test/simple/test-stream-unshift-read-race.js +@@ -29,7 +29,7 @@ var assert = require('assert'); + // 3. push() after the EOF signaling null is an error. + // 4. _read() is not called after pushing the EOF null chunk. + +-var stream = require('stream'); ++var stream = require('../../'); + var hwm = 10; + var r = stream.Readable({ highWaterMark: hwm }); + var chunks = 10; +@@ -51,7 +51,14 @@ r._read = function(n) { + + function push(fast) { + assert(!pushedNull, 'push() after null push'); +- var c = pos >= data.length ? null : data.slice(pos, pos + n); ++ var c; ++ if (pos >= data.length) ++ c = null; ++ else { ++ if (n + pos > data.length) ++ n = data.length - pos; ++ c = data.slice(pos, pos + n); ++ } + pushedNull = c === null; + if (fast) { + pos += n; +diff --git a/test/simple/test-stream-writev.js b/test/simple/test-stream-writev.js +index 5b49e6e..b5321f3 100644 +--- a/test/simple/test-stream-writev.js ++++ b/test/simple/test-stream-writev.js +@@ -22,7 +22,7 @@ + var common = require('../common'); + var assert = require('assert'); + +-var stream = require('stream'); ++var stream = require('../../'); + + var queue = []; + for (var decode = 0; decode < 2; decode++) { +diff --git a/test/simple/test-stream2-basic.js b/test/simple/test-stream2-basic.js +index 3814bf0..248c1be 100644 +--- a/test/simple/test-stream2-basic.js ++++ b/test/simple/test-stream2-basic.js +@@ -21,7 +21,7 @@ + + + var common = require('../common.js'); +-var R = require('_stream_readable'); ++var R = require('../../lib/_stream_readable'); + var assert = require('assert'); + + var util = require('util'); +diff --git a/test/simple/test-stream2-compatibility.js b/test/simple/test-stream2-compatibility.js +index 6cdd4e9..f0fa84b 100644 +--- a/test/simple/test-stream2-compatibility.js ++++ b/test/simple/test-stream2-compatibility.js +@@ -21,7 +21,7 @@ + + + var common = require('../common.js'); +-var R = require('_stream_readable'); ++var R = require('../../lib/_stream_readable'); + var assert = require('assert'); + + var util = require('util'); +diff --git a/test/simple/test-stream2-finish-pipe.js b/test/simple/test-stream2-finish-pipe.js +index 39b274f..006a19b 100644 +--- a/test/simple/test-stream2-finish-pipe.js ++++ b/test/simple/test-stream2-finish-pipe.js +@@ -20,7 +20,7 @@ + // USE OR OTHER DEALINGS IN THE SOFTWARE. + + var common = require('../common.js'); +-var stream = require('stream'); ++var stream = require('../../'); + var Buffer = require('buffer').Buffer; + + var r = new stream.Readable(); +diff --git a/test/simple/test-stream2-fs.js b/test/simple/test-stream2-fs.js +deleted file mode 100644 +index e162406..0000000 +--- a/test/simple/test-stream2-fs.js ++++ /dev/null +@@ -1,72 +0,0 @@ +-// Copyright Joyent, Inc. and other Node contributors. +-// +-// Permission is hereby granted, free of charge, to any person obtaining a +-// copy of this software and associated documentation files (the +-// "Software"), to deal in the Software without restriction, including +-// without limitation the rights to use, copy, modify, merge, publish, +-// distribute, sublicense, and/or sell copies of the Software, and to permit +-// persons to whom the Software is furnished to do so, subject to the +-// following conditions: +-// +-// The above copyright notice and this permission notice shall be included +-// in all copies or substantial portions of the Software. +-// +-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. +- +- +-var common = require('../common.js'); +-var R = require('_stream_readable'); +-var assert = require('assert'); +- +-var fs = require('fs'); +-var FSReadable = fs.ReadStream; +- +-var path = require('path'); +-var file = path.resolve(common.fixturesDir, 'x1024.txt'); +- +-var size = fs.statSync(file).size; +- +-var expectLengths = [1024]; +- +-var util = require('util'); +-var Stream = require('stream'); +- +-util.inherits(TestWriter, Stream); +- +-function TestWriter() { +- Stream.apply(this); +- this.buffer = []; +- this.length = 0; +-} +- +-TestWriter.prototype.write = function(c) { +- this.buffer.push(c.toString()); +- this.length += c.length; +- return true; +-}; +- +-TestWriter.prototype.end = function(c) { +- if (c) this.buffer.push(c.toString()); +- this.emit('results', this.buffer); +-} +- +-var r = new FSReadable(file); +-var w = new TestWriter(); +- +-w.on('results', function(res) { +- console.error(res, w.length); +- assert.equal(w.length, size); +- var l = 0; +- assert.deepEqual(res.map(function (c) { +- return c.length; +- }), expectLengths); +- console.log('ok'); +-}); +- +-r.pipe(w); +diff --git a/test/simple/test-stream2-httpclient-response-end.js b/test/simple/test-stream2-httpclient-response-end.js +deleted file mode 100644 +index 15cffc2..0000000 +--- a/test/simple/test-stream2-httpclient-response-end.js ++++ /dev/null +@@ -1,52 +0,0 @@ +-// Copyright Joyent, Inc. and other Node contributors. +-// +-// Permission is hereby granted, free of charge, to any person obtaining a +-// copy of this software and associated documentation files (the +-// "Software"), to deal in the Software without restriction, including +-// without limitation the rights to use, copy, modify, merge, publish, +-// distribute, sublicense, and/or sell copies of the Software, and to permit +-// persons to whom the Software is furnished to do so, subject to the +-// following conditions: +-// +-// The above copyright notice and this permission notice shall be included +-// in all copies or substantial portions of the Software. +-// +-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +-// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. +- +-var common = require('../common.js'); +-var assert = require('assert'); +-var http = require('http'); +-var msg = 'Hello'; +-var readable_event = false; +-var end_event = false; +-var server = http.createServer(function(req, res) { +- res.writeHead(200, {'Content-Type': 'text/plain'}); +- res.end(msg); +-}).listen(common.PORT, function() { +- http.get({port: common.PORT}, function(res) { +- var data = ''; +- res.on('readable', function() { +- console.log('readable event'); +- readable_event = true; +- data += res.read(); +- }); +- res.on('end', function() { +- console.log('end event'); +- end_event = true; +- assert.strictEqual(msg, data); +- server.close(); +- }); +- }); +-}); +- +-process.on('exit', function() { +- assert(readable_event); +- assert(end_event); +-}); +- +diff --git a/test/simple/test-stream2-large-read-stall.js b/test/simple/test-stream2-large-read-stall.js +index 2fbfbca..667985b 100644 +--- a/test/simple/test-stream2-large-read-stall.js ++++ b/test/simple/test-stream2-large-read-stall.js +@@ -30,7 +30,7 @@ var PUSHSIZE = 20; + var PUSHCOUNT = 1000; + var HWM = 50; + +-var Readable = require('stream').Readable; ++var Readable = require('../../').Readable; + var r = new Readable({ + highWaterMark: HWM + }); +@@ -39,23 +39,23 @@ var rs = r._readableState; + r._read = push; + + r.on('readable', function() { +- console.error('>> readable'); ++ //console.error('>> readable'); + do { +- console.error(' > read(%d)', READSIZE); ++ //console.error(' > read(%d)', READSIZE); + var ret = r.read(READSIZE); +- console.error(' < %j (%d remain)', ret && ret.length, rs.length); ++ //console.error(' < %j (%d remain)', ret && ret.length, rs.length); + } while (ret && ret.length === READSIZE); + +- console.error('<< after read()', +- ret && ret.length, +- rs.needReadable, +- rs.length); ++ //console.error('<< after read()', ++ // ret && ret.length, ++ // rs.needReadable, ++ // rs.length); + }); + + var endEmitted = false; + r.on('end', function() { + endEmitted = true; +- console.error('end'); ++ //console.error('end'); + }); + + var pushes = 0; +@@ -64,11 +64,11 @@ function push() { + return; + + if (pushes++ === PUSHCOUNT) { +- console.error(' push(EOF)'); ++ //console.error(' push(EOF)'); + return r.push(null); + } + +- console.error(' push #%d', pushes); ++ //console.error(' push #%d', pushes); + if (r.push(new Buffer(PUSHSIZE))) + setTimeout(push); + } +diff --git a/test/simple/test-stream2-objects.js b/test/simple/test-stream2-objects.js +index 3e6931d..ff47d89 100644 +--- a/test/simple/test-stream2-objects.js ++++ b/test/simple/test-stream2-objects.js +@@ -21,8 +21,8 @@ + + + var common = require('../common.js'); +-var Readable = require('_stream_readable'); +-var Writable = require('_stream_writable'); ++var Readable = require('../../lib/_stream_readable'); ++var Writable = require('../../lib/_stream_writable'); + var assert = require('assert'); + + // tiny node-tap lookalike. +diff --git a/test/simple/test-stream2-pipe-error-handling.js b/test/simple/test-stream2-pipe-error-handling.js +index cf7531c..e3f3e4e 100644 +--- a/test/simple/test-stream2-pipe-error-handling.js ++++ b/test/simple/test-stream2-pipe-error-handling.js +@@ -21,7 +21,7 @@ + + var common = require('../common'); + var assert = require('assert'); +-var stream = require('stream'); ++var stream = require('../../'); + + (function testErrorListenerCatches() { + var count = 1000; +diff --git a/test/simple/test-stream2-pipe-error-once-listener.js b/test/simple/test-stream2-pipe-error-once-listener.js +index 5e8e3cb..53b2616 100755 +--- a/test/simple/test-stream2-pipe-error-once-listener.js ++++ b/test/simple/test-stream2-pipe-error-once-listener.js +@@ -24,7 +24,7 @@ var common = require('../common.js'); + var assert = require('assert'); + + var util = require('util'); +-var stream = require('stream'); ++var stream = require('../../'); + + + var Read = function() { +diff --git a/test/simple/test-stream2-push.js b/test/simple/test-stream2-push.js +index b63edc3..eb2b0e9 100644 +--- a/test/simple/test-stream2-push.js ++++ b/test/simple/test-stream2-push.js +@@ -20,7 +20,7 @@ + // USE OR OTHER DEALINGS IN THE SOFTWARE. + + var common = require('../common.js'); +-var stream = require('stream'); ++var stream = require('../../'); + var Readable = stream.Readable; + var Writable = stream.Writable; + var assert = require('assert'); +diff --git a/test/simple/test-stream2-read-sync-stack.js b/test/simple/test-stream2-read-sync-stack.js +index e8a7305..9740a47 100644 +--- a/test/simple/test-stream2-read-sync-stack.js ++++ b/test/simple/test-stream2-read-sync-stack.js +@@ -21,7 +21,7 @@ + + var common = require('../common'); + var assert = require('assert'); +-var Readable = require('stream').Readable; ++var Readable = require('../../').Readable; + var r = new Readable(); + var N = 256 * 1024; + +diff --git a/test/simple/test-stream2-readable-empty-buffer-no-eof.js b/test/simple/test-stream2-readable-empty-buffer-no-eof.js +index cd30178..4b1659d 100644 +--- a/test/simple/test-stream2-readable-empty-buffer-no-eof.js ++++ b/test/simple/test-stream2-readable-empty-buffer-no-eof.js +@@ -22,10 +22,9 @@ + var common = require('../common'); + var assert = require('assert'); + +-var Readable = require('stream').Readable; ++var Readable = require('../../').Readable; + + test1(); +-test2(); + + function test1() { + var r = new Readable(); +@@ -88,31 +87,3 @@ function test1() { + console.log('ok'); + }); + } +- +-function test2() { +- var r = new Readable({ encoding: 'base64' }); +- var reads = 5; +- r._read = function(n) { +- if (!reads--) +- return r.push(null); // EOF +- else +- return r.push(new Buffer('x')); +- }; +- +- var results = []; +- function flow() { +- var chunk; +- while (null !== (chunk = r.read())) +- results.push(chunk + ''); +- } +- r.on('readable', flow); +- r.on('end', function() { +- results.push('EOF'); +- }); +- flow(); +- +- process.on('exit', function() { +- assert.deepEqual(results, [ 'eHh4', 'eHg=', 'EOF' ]); +- console.log('ok'); +- }); +-} +diff --git a/test/simple/test-stream2-readable-from-list.js b/test/simple/test-stream2-readable-from-list.js +index 7c96ffe..04a96f5 100644 +--- a/test/simple/test-stream2-readable-from-list.js ++++ b/test/simple/test-stream2-readable-from-list.js +@@ -21,7 +21,7 @@ + + var assert = require('assert'); + var common = require('../common.js'); +-var fromList = require('_stream_readable')._fromList; ++var fromList = require('../../lib/_stream_readable')._fromList; + + // tiny node-tap lookalike. + var tests = []; +diff --git a/test/simple/test-stream2-readable-legacy-drain.js b/test/simple/test-stream2-readable-legacy-drain.js +index 675da8e..51fd3d5 100644 +--- a/test/simple/test-stream2-readable-legacy-drain.js ++++ b/test/simple/test-stream2-readable-legacy-drain.js +@@ -22,7 +22,7 @@ + var common = require('../common'); + var assert = require('assert'); + +-var Stream = require('stream'); ++var Stream = require('../../'); + var Readable = Stream.Readable; + + var r = new Readable(); +diff --git a/test/simple/test-stream2-readable-non-empty-end.js b/test/simple/test-stream2-readable-non-empty-end.js +index 7314ae7..c971898 100644 +--- a/test/simple/test-stream2-readable-non-empty-end.js ++++ b/test/simple/test-stream2-readable-non-empty-end.js +@@ -21,7 +21,7 @@ + + var assert = require('assert'); + var common = require('../common.js'); +-var Readable = require('_stream_readable'); ++var Readable = require('../../lib/_stream_readable'); + + var len = 0; + var chunks = new Array(10); +diff --git a/test/simple/test-stream2-readable-wrap-empty.js b/test/simple/test-stream2-readable-wrap-empty.js +index 2e5cf25..fd8a3dc 100644 +--- a/test/simple/test-stream2-readable-wrap-empty.js ++++ b/test/simple/test-stream2-readable-wrap-empty.js +@@ -22,7 +22,7 @@ + var common = require('../common'); + var assert = require('assert'); + +-var Readable = require('_stream_readable'); ++var Readable = require('../../lib/_stream_readable'); + var EE = require('events').EventEmitter; + + var oldStream = new EE(); +diff --git a/test/simple/test-stream2-readable-wrap.js b/test/simple/test-stream2-readable-wrap.js +index 90eea01..6b177f7 100644 +--- a/test/simple/test-stream2-readable-wrap.js ++++ b/test/simple/test-stream2-readable-wrap.js +@@ -22,8 +22,8 @@ + var common = require('../common'); + var assert = require('assert'); + +-var Readable = require('_stream_readable'); +-var Writable = require('_stream_writable'); ++var Readable = require('../../lib/_stream_readable'); ++var Writable = require('../../lib/_stream_writable'); + var EE = require('events').EventEmitter; + + var testRuns = 0, completedRuns = 0; +diff --git a/test/simple/test-stream2-set-encoding.js b/test/simple/test-stream2-set-encoding.js +index 5d2c32a..685531b 100644 +--- a/test/simple/test-stream2-set-encoding.js ++++ b/test/simple/test-stream2-set-encoding.js +@@ -22,7 +22,7 @@ + + var common = require('../common.js'); + var assert = require('assert'); +-var R = require('_stream_readable'); ++var R = require('../../lib/_stream_readable'); + var util = require('util'); + + // tiny node-tap lookalike. +diff --git a/test/simple/test-stream2-transform.js b/test/simple/test-stream2-transform.js +index 9c9ddd8..a0cacc6 100644 +--- a/test/simple/test-stream2-transform.js ++++ b/test/simple/test-stream2-transform.js +@@ -21,8 +21,8 @@ + + var assert = require('assert'); + var common = require('../common.js'); +-var PassThrough = require('_stream_passthrough'); +-var Transform = require('_stream_transform'); ++var PassThrough = require('../../').PassThrough; ++var Transform = require('../../').Transform; + + // tiny node-tap lookalike. + var tests = []; +diff --git a/test/simple/test-stream2-unpipe-drain.js b/test/simple/test-stream2-unpipe-drain.js +index d66dc3c..365b327 100644 +--- a/test/simple/test-stream2-unpipe-drain.js ++++ b/test/simple/test-stream2-unpipe-drain.js +@@ -22,7 +22,7 @@ + + var common = require('../common.js'); + var assert = require('assert'); +-var stream = require('stream'); ++var stream = require('../../'); + var crypto = require('crypto'); + + var util = require('util'); +diff --git a/test/simple/test-stream2-unpipe-leak.js b/test/simple/test-stream2-unpipe-leak.js +index 99f8746..17c92ae 100644 +--- a/test/simple/test-stream2-unpipe-leak.js ++++ b/test/simple/test-stream2-unpipe-leak.js +@@ -22,7 +22,7 @@ + + var common = require('../common.js'); + var assert = require('assert'); +-var stream = require('stream'); ++var stream = require('../../'); + + var chunk = new Buffer('hallo'); + +diff --git a/test/simple/test-stream2-writable.js b/test/simple/test-stream2-writable.js +index 704100c..209c3a6 100644 +--- a/test/simple/test-stream2-writable.js ++++ b/test/simple/test-stream2-writable.js +@@ -20,8 +20,8 @@ + // USE OR OTHER DEALINGS IN THE SOFTWARE. + + var common = require('../common.js'); +-var W = require('_stream_writable'); +-var D = require('_stream_duplex'); ++var W = require('../../').Writable; ++var D = require('../../').Duplex; + var assert = require('assert'); + + var util = require('util'); +diff --git a/test/simple/test-stream3-pause-then-read.js b/test/simple/test-stream3-pause-then-read.js +index b91bde3..2f72c15 100644 +--- a/test/simple/test-stream3-pause-then-read.js ++++ b/test/simple/test-stream3-pause-then-read.js +@@ -22,7 +22,7 @@ + var common = require('../common'); + var assert = require('assert'); + +-var stream = require('stream'); ++var stream = require('../../'); + var Readable = stream.Readable; + var Writable = stream.Writable; + diff --git a/pitfall/pdfkit/node_modules/readable-stream/lib/_stream_duplex.js b/pitfall/pdfkit/node_modules/readable-stream/lib/_stream_duplex.js new file mode 100644 index 00000000..b513d61a --- /dev/null +++ b/pitfall/pdfkit/node_modules/readable-stream/lib/_stream_duplex.js @@ -0,0 +1,89 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. + +// a duplex stream is just a stream that is both readable and writable. +// Since JS doesn't have multiple prototypal inheritance, this class +// prototypally inherits from Readable, and then parasitically from +// Writable. + +module.exports = Duplex; + +/**/ +var objectKeys = Object.keys || function (obj) { + var keys = []; + for (var key in obj) keys.push(key); + return keys; +} +/**/ + + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +var Readable = require('./_stream_readable'); +var Writable = require('./_stream_writable'); + +util.inherits(Duplex, Readable); + +forEach(objectKeys(Writable.prototype), function(method) { + if (!Duplex.prototype[method]) + Duplex.prototype[method] = Writable.prototype[method]; +}); + +function Duplex(options) { + if (!(this instanceof Duplex)) + return new Duplex(options); + + Readable.call(this, options); + Writable.call(this, options); + + if (options && options.readable === false) + this.readable = false; + + if (options && options.writable === false) + this.writable = false; + + this.allowHalfOpen = true; + if (options && options.allowHalfOpen === false) + this.allowHalfOpen = false; + + this.once('end', onend); +} + +// the no-half-open enforcer +function onend() { + // if we allow half-open state, or if the writable side ended, + // then we're ok. + if (this.allowHalfOpen || this._writableState.ended) + return; + + // no more data can be written. + // But allow more writes to happen in this tick. + process.nextTick(this.end.bind(this)); +} + +function forEach (xs, f) { + for (var i = 0, l = xs.length; i < l; i++) { + f(xs[i], i); + } +} diff --git a/pitfall/pdfkit/node_modules/readable-stream/lib/_stream_passthrough.js b/pitfall/pdfkit/node_modules/readable-stream/lib/_stream_passthrough.js new file mode 100644 index 00000000..895ca50a --- /dev/null +++ b/pitfall/pdfkit/node_modules/readable-stream/lib/_stream_passthrough.js @@ -0,0 +1,46 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. + +// a passthrough stream. +// basically just the most minimal sort of Transform stream. +// Every written chunk gets output as-is. + +module.exports = PassThrough; + +var Transform = require('./_stream_transform'); + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +util.inherits(PassThrough, Transform); + +function PassThrough(options) { + if (!(this instanceof PassThrough)) + return new PassThrough(options); + + Transform.call(this, options); +} + +PassThrough.prototype._transform = function(chunk, encoding, cb) { + cb(null, chunk); +}; diff --git a/pitfall/pdfkit/node_modules/readable-stream/lib/_stream_readable.js b/pitfall/pdfkit/node_modules/readable-stream/lib/_stream_readable.js new file mode 100644 index 00000000..19ab3588 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readable-stream/lib/_stream_readable.js @@ -0,0 +1,951 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. + +module.exports = Readable; + +/**/ +var isArray = require('isarray'); +/**/ + + +/**/ +var Buffer = require('buffer').Buffer; +/**/ + +Readable.ReadableState = ReadableState; + +var EE = require('events').EventEmitter; + +/**/ +if (!EE.listenerCount) EE.listenerCount = function(emitter, type) { + return emitter.listeners(type).length; +}; +/**/ + +var Stream = require('stream'); + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +var StringDecoder; + + +/**/ +var debug = require('util'); +if (debug && debug.debuglog) { + debug = debug.debuglog('stream'); +} else { + debug = function () {}; +} +/**/ + + +util.inherits(Readable, Stream); + +function ReadableState(options, stream) { + var Duplex = require('./_stream_duplex'); + + options = options || {}; + + // the point at which it stops calling _read() to fill the buffer + // Note: 0 is a valid value, means "don't call _read preemptively ever" + var hwm = options.highWaterMark; + var defaultHwm = options.objectMode ? 16 : 16 * 1024; + this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm; + + // cast to ints. + this.highWaterMark = ~~this.highWaterMark; + + this.buffer = []; + this.length = 0; + this.pipes = null; + this.pipesCount = 0; + this.flowing = null; + this.ended = false; + this.endEmitted = false; + this.reading = false; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, because any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // whenever we return null, then we set a flag to say + // that we're awaiting a 'readable' event emission. + this.needReadable = false; + this.emittedReadable = false; + this.readableListening = false; + + + // object stream flag. Used to make read(n) ignore n and to + // make all the buffer merging and length checks go away + this.objectMode = !!options.objectMode; + + if (stream instanceof Duplex) + this.objectMode = this.objectMode || !!options.readableObjectMode; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // when piping, we only care about 'readable' events that happen + // after read()ing all the bytes and not getting any pushback. + this.ranOut = false; + + // the number of writers that are awaiting a drain event in .pipe()s + this.awaitDrain = 0; + + // if true, a maybeReadMore has been scheduled + this.readingMore = false; + + this.decoder = null; + this.encoding = null; + if (options.encoding) { + if (!StringDecoder) + StringDecoder = require('string_decoder/').StringDecoder; + this.decoder = new StringDecoder(options.encoding); + this.encoding = options.encoding; + } +} + +function Readable(options) { + var Duplex = require('./_stream_duplex'); + + if (!(this instanceof Readable)) + return new Readable(options); + + this._readableState = new ReadableState(options, this); + + // legacy + this.readable = true; + + Stream.call(this); +} + +// Manually shove something into the read() buffer. +// This returns true if the highWaterMark has not been hit yet, +// similar to how Writable.write() returns true if you should +// write() some more. +Readable.prototype.push = function(chunk, encoding) { + var state = this._readableState; + + if (util.isString(chunk) && !state.objectMode) { + encoding = encoding || state.defaultEncoding; + if (encoding !== state.encoding) { + chunk = new Buffer(chunk, encoding); + encoding = ''; + } + } + + return readableAddChunk(this, state, chunk, encoding, false); +}; + +// Unshift should *always* be something directly out of read() +Readable.prototype.unshift = function(chunk) { + var state = this._readableState; + return readableAddChunk(this, state, chunk, '', true); +}; + +function readableAddChunk(stream, state, chunk, encoding, addToFront) { + var er = chunkInvalid(state, chunk); + if (er) { + stream.emit('error', er); + } else if (util.isNullOrUndefined(chunk)) { + state.reading = false; + if (!state.ended) + onEofChunk(stream, state); + } else if (state.objectMode || chunk && chunk.length > 0) { + if (state.ended && !addToFront) { + var e = new Error('stream.push() after EOF'); + stream.emit('error', e); + } else if (state.endEmitted && addToFront) { + var e = new Error('stream.unshift() after end event'); + stream.emit('error', e); + } else { + if (state.decoder && !addToFront && !encoding) + chunk = state.decoder.write(chunk); + + if (!addToFront) + state.reading = false; + + // if we want the data now, just emit it. + if (state.flowing && state.length === 0 && !state.sync) { + stream.emit('data', chunk); + stream.read(0); + } else { + // update the buffer info. + state.length += state.objectMode ? 1 : chunk.length; + if (addToFront) + state.buffer.unshift(chunk); + else + state.buffer.push(chunk); + + if (state.needReadable) + emitReadable(stream); + } + + maybeReadMore(stream, state); + } + } else if (!addToFront) { + state.reading = false; + } + + return needMoreData(state); +} + + + +// if it's past the high water mark, we can push in some more. +// Also, if we have no data yet, we can stand some +// more bytes. This is to work around cases where hwm=0, +// such as the repl. Also, if the push() triggered a +// readable event, and the user called read(largeNumber) such that +// needReadable was set, then we ought to push more, so that another +// 'readable' event will be triggered. +function needMoreData(state) { + return !state.ended && + (state.needReadable || + state.length < state.highWaterMark || + state.length === 0); +} + +// backwards compatibility. +Readable.prototype.setEncoding = function(enc) { + if (!StringDecoder) + StringDecoder = require('string_decoder/').StringDecoder; + this._readableState.decoder = new StringDecoder(enc); + this._readableState.encoding = enc; + return this; +}; + +// Don't raise the hwm > 128MB +var MAX_HWM = 0x800000; +function roundUpToNextPowerOf2(n) { + if (n >= MAX_HWM) { + n = MAX_HWM; + } else { + // Get the next highest power of 2 + n--; + for (var p = 1; p < 32; p <<= 1) n |= n >> p; + n++; + } + return n; +} + +function howMuchToRead(n, state) { + if (state.length === 0 && state.ended) + return 0; + + if (state.objectMode) + return n === 0 ? 0 : 1; + + if (isNaN(n) || util.isNull(n)) { + // only flow one buffer at a time + if (state.flowing && state.buffer.length) + return state.buffer[0].length; + else + return state.length; + } + + if (n <= 0) + return 0; + + // If we're asking for more than the target buffer level, + // then raise the water mark. Bump up to the next highest + // power of 2, to prevent increasing it excessively in tiny + // amounts. + if (n > state.highWaterMark) + state.highWaterMark = roundUpToNextPowerOf2(n); + + // don't have that much. return null, unless we've ended. + if (n > state.length) { + if (!state.ended) { + state.needReadable = true; + return 0; + } else + return state.length; + } + + return n; +} + +// you can override either this method, or the async _read(n) below. +Readable.prototype.read = function(n) { + debug('read', n); + var state = this._readableState; + var nOrig = n; + + if (!util.isNumber(n) || n > 0) + state.emittedReadable = false; + + // if we're doing read(0) to trigger a readable event, but we + // already have a bunch of data in the buffer, then just trigger + // the 'readable' event and move on. + if (n === 0 && + state.needReadable && + (state.length >= state.highWaterMark || state.ended)) { + debug('read: emitReadable', state.length, state.ended); + if (state.length === 0 && state.ended) + endReadable(this); + else + emitReadable(this); + return null; + } + + n = howMuchToRead(n, state); + + // if we've ended, and we're now clear, then finish it up. + if (n === 0 && state.ended) { + if (state.length === 0) + endReadable(this); + return null; + } + + // All the actual chunk generation logic needs to be + // *below* the call to _read. The reason is that in certain + // synthetic stream cases, such as passthrough streams, _read + // may be a completely synchronous operation which may change + // the state of the read buffer, providing enough data when + // before there was *not* enough. + // + // So, the steps are: + // 1. Figure out what the state of things will be after we do + // a read from the buffer. + // + // 2. If that resulting state will trigger a _read, then call _read. + // Note that this may be asynchronous, or synchronous. Yes, it is + // deeply ugly to write APIs this way, but that still doesn't mean + // that the Readable class should behave improperly, as streams are + // designed to be sync/async agnostic. + // Take note if the _read call is sync or async (ie, if the read call + // has returned yet), so that we know whether or not it's safe to emit + // 'readable' etc. + // + // 3. Actually pull the requested chunks out of the buffer and return. + + // if we need a readable event, then we need to do some reading. + var doRead = state.needReadable; + debug('need readable', doRead); + + // if we currently have less than the highWaterMark, then also read some + if (state.length === 0 || state.length - n < state.highWaterMark) { + doRead = true; + debug('length less than watermark', doRead); + } + + // however, if we've ended, then there's no point, and if we're already + // reading, then it's unnecessary. + if (state.ended || state.reading) { + doRead = false; + debug('reading or ended', doRead); + } + + if (doRead) { + debug('do read'); + state.reading = true; + state.sync = true; + // if the length is currently zero, then we *need* a readable event. + if (state.length === 0) + state.needReadable = true; + // call internal read method + this._read(state.highWaterMark); + state.sync = false; + } + + // If _read pushed data synchronously, then `reading` will be false, + // and we need to re-evaluate how much data we can return to the user. + if (doRead && !state.reading) + n = howMuchToRead(nOrig, state); + + var ret; + if (n > 0) + ret = fromList(n, state); + else + ret = null; + + if (util.isNull(ret)) { + state.needReadable = true; + n = 0; + } + + state.length -= n; + + // If we have nothing in the buffer, then we want to know + // as soon as we *do* get something into the buffer. + if (state.length === 0 && !state.ended) + state.needReadable = true; + + // If we tried to read() past the EOF, then emit end on the next tick. + if (nOrig !== n && state.ended && state.length === 0) + endReadable(this); + + if (!util.isNull(ret)) + this.emit('data', ret); + + return ret; +}; + +function chunkInvalid(state, chunk) { + var er = null; + if (!util.isBuffer(chunk) && + !util.isString(chunk) && + !util.isNullOrUndefined(chunk) && + !state.objectMode) { + er = new TypeError('Invalid non-string/buffer chunk'); + } + return er; +} + + +function onEofChunk(stream, state) { + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) { + state.buffer.push(chunk); + state.length += state.objectMode ? 1 : chunk.length; + } + } + state.ended = true; + + // emit 'readable' now to make sure it gets picked up. + emitReadable(stream); +} + +// Don't emit readable right away in sync mode, because this can trigger +// another read() call => stack overflow. This way, it might trigger +// a nextTick recursion warning, but that's not so bad. +function emitReadable(stream) { + var state = stream._readableState; + state.needReadable = false; + if (!state.emittedReadable) { + debug('emitReadable', state.flowing); + state.emittedReadable = true; + if (state.sync) + process.nextTick(function() { + emitReadable_(stream); + }); + else + emitReadable_(stream); + } +} + +function emitReadable_(stream) { + debug('emit readable'); + stream.emit('readable'); + flow(stream); +} + + +// at this point, the user has presumably seen the 'readable' event, +// and called read() to consume some data. that may have triggered +// in turn another _read(n) call, in which case reading = true if +// it's in progress. +// However, if we're not ended, or reading, and the length < hwm, +// then go ahead and try to read some more preemptively. +function maybeReadMore(stream, state) { + if (!state.readingMore) { + state.readingMore = true; + process.nextTick(function() { + maybeReadMore_(stream, state); + }); + } +} + +function maybeReadMore_(stream, state) { + var len = state.length; + while (!state.reading && !state.flowing && !state.ended && + state.length < state.highWaterMark) { + debug('maybeReadMore read 0'); + stream.read(0); + if (len === state.length) + // didn't get any data, stop spinning. + break; + else + len = state.length; + } + state.readingMore = false; +} + +// abstract method. to be overridden in specific implementation classes. +// call cb(er, data) where data is <= n in length. +// for virtual (non-string, non-buffer) streams, "length" is somewhat +// arbitrary, and perhaps not very meaningful. +Readable.prototype._read = function(n) { + this.emit('error', new Error('not implemented')); +}; + +Readable.prototype.pipe = function(dest, pipeOpts) { + var src = this; + var state = this._readableState; + + switch (state.pipesCount) { + case 0: + state.pipes = dest; + break; + case 1: + state.pipes = [state.pipes, dest]; + break; + default: + state.pipes.push(dest); + break; + } + state.pipesCount += 1; + debug('pipe count=%d opts=%j', state.pipesCount, pipeOpts); + + var doEnd = (!pipeOpts || pipeOpts.end !== false) && + dest !== process.stdout && + dest !== process.stderr; + + var endFn = doEnd ? onend : cleanup; + if (state.endEmitted) + process.nextTick(endFn); + else + src.once('end', endFn); + + dest.on('unpipe', onunpipe); + function onunpipe(readable) { + debug('onunpipe'); + if (readable === src) { + cleanup(); + } + } + + function onend() { + debug('onend'); + dest.end(); + } + + // when the dest drains, it reduces the awaitDrain counter + // on the source. This would be more elegant with a .once() + // handler in flow(), but adding and removing repeatedly is + // too slow. + var ondrain = pipeOnDrain(src); + dest.on('drain', ondrain); + + function cleanup() { + debug('cleanup'); + // cleanup event handlers once the pipe is broken + dest.removeListener('close', onclose); + dest.removeListener('finish', onfinish); + dest.removeListener('drain', ondrain); + dest.removeListener('error', onerror); + dest.removeListener('unpipe', onunpipe); + src.removeListener('end', onend); + src.removeListener('end', cleanup); + src.removeListener('data', ondata); + + // if the reader is waiting for a drain event from this + // specific writer, then it would cause it to never start + // flowing again. + // So, if this is awaiting a drain, then we just call it now. + // If we don't know, then assume that we are waiting for one. + if (state.awaitDrain && + (!dest._writableState || dest._writableState.needDrain)) + ondrain(); + } + + src.on('data', ondata); + function ondata(chunk) { + debug('ondata'); + var ret = dest.write(chunk); + if (false === ret) { + debug('false write response, pause', + src._readableState.awaitDrain); + src._readableState.awaitDrain++; + src.pause(); + } + } + + // if the dest has an error, then stop piping into it. + // however, don't suppress the throwing behavior for this. + function onerror(er) { + debug('onerror', er); + unpipe(); + dest.removeListener('error', onerror); + if (EE.listenerCount(dest, 'error') === 0) + dest.emit('error', er); + } + // This is a brutally ugly hack to make sure that our error handler + // is attached before any userland ones. NEVER DO THIS. + if (!dest._events || !dest._events.error) + dest.on('error', onerror); + else if (isArray(dest._events.error)) + dest._events.error.unshift(onerror); + else + dest._events.error = [onerror, dest._events.error]; + + + + // Both close and finish should trigger unpipe, but only once. + function onclose() { + dest.removeListener('finish', onfinish); + unpipe(); + } + dest.once('close', onclose); + function onfinish() { + debug('onfinish'); + dest.removeListener('close', onclose); + unpipe(); + } + dest.once('finish', onfinish); + + function unpipe() { + debug('unpipe'); + src.unpipe(dest); + } + + // tell the dest that it's being piped to + dest.emit('pipe', src); + + // start the flow if it hasn't been started already. + if (!state.flowing) { + debug('pipe resume'); + src.resume(); + } + + return dest; +}; + +function pipeOnDrain(src) { + return function() { + var state = src._readableState; + debug('pipeOnDrain', state.awaitDrain); + if (state.awaitDrain) + state.awaitDrain--; + if (state.awaitDrain === 0 && EE.listenerCount(src, 'data')) { + state.flowing = true; + flow(src); + } + }; +} + + +Readable.prototype.unpipe = function(dest) { + var state = this._readableState; + + // if we're not piping anywhere, then do nothing. + if (state.pipesCount === 0) + return this; + + // just one destination. most common case. + if (state.pipesCount === 1) { + // passed in one, but it's not the right one. + if (dest && dest !== state.pipes) + return this; + + if (!dest) + dest = state.pipes; + + // got a match. + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + if (dest) + dest.emit('unpipe', this); + return this; + } + + // slow case. multiple pipe destinations. + + if (!dest) { + // remove all. + var dests = state.pipes; + var len = state.pipesCount; + state.pipes = null; + state.pipesCount = 0; + state.flowing = false; + + for (var i = 0; i < len; i++) + dests[i].emit('unpipe', this); + return this; + } + + // try to find the right one. + var i = indexOf(state.pipes, dest); + if (i === -1) + return this; + + state.pipes.splice(i, 1); + state.pipesCount -= 1; + if (state.pipesCount === 1) + state.pipes = state.pipes[0]; + + dest.emit('unpipe', this); + + return this; +}; + +// set up data events if they are asked for +// Ensure readable listeners eventually get something +Readable.prototype.on = function(ev, fn) { + var res = Stream.prototype.on.call(this, ev, fn); + + // If listening to data, and it has not explicitly been paused, + // then call resume to start the flow of data on the next tick. + if (ev === 'data' && false !== this._readableState.flowing) { + this.resume(); + } + + if (ev === 'readable' && this.readable) { + var state = this._readableState; + if (!state.readableListening) { + state.readableListening = true; + state.emittedReadable = false; + state.needReadable = true; + if (!state.reading) { + var self = this; + process.nextTick(function() { + debug('readable nexttick read 0'); + self.read(0); + }); + } else if (state.length) { + emitReadable(this, state); + } + } + } + + return res; +}; +Readable.prototype.addListener = Readable.prototype.on; + +// pause() and resume() are remnants of the legacy readable stream API +// If the user uses them, then switch into old mode. +Readable.prototype.resume = function() { + var state = this._readableState; + if (!state.flowing) { + debug('resume'); + state.flowing = true; + if (!state.reading) { + debug('resume read 0'); + this.read(0); + } + resume(this, state); + } + return this; +}; + +function resume(stream, state) { + if (!state.resumeScheduled) { + state.resumeScheduled = true; + process.nextTick(function() { + resume_(stream, state); + }); + } +} + +function resume_(stream, state) { + state.resumeScheduled = false; + stream.emit('resume'); + flow(stream); + if (state.flowing && !state.reading) + stream.read(0); +} + +Readable.prototype.pause = function() { + debug('call pause flowing=%j', this._readableState.flowing); + if (false !== this._readableState.flowing) { + debug('pause'); + this._readableState.flowing = false; + this.emit('pause'); + } + return this; +}; + +function flow(stream) { + var state = stream._readableState; + debug('flow', state.flowing); + if (state.flowing) { + do { + var chunk = stream.read(); + } while (null !== chunk && state.flowing); + } +} + +// wrap an old-style stream as the async data source. +// This is *not* part of the readable stream interface. +// It is an ugly unfortunate mess of history. +Readable.prototype.wrap = function(stream) { + var state = this._readableState; + var paused = false; + + var self = this; + stream.on('end', function() { + debug('wrapped end'); + if (state.decoder && !state.ended) { + var chunk = state.decoder.end(); + if (chunk && chunk.length) + self.push(chunk); + } + + self.push(null); + }); + + stream.on('data', function(chunk) { + debug('wrapped data'); + if (state.decoder) + chunk = state.decoder.write(chunk); + if (!chunk || !state.objectMode && !chunk.length) + return; + + var ret = self.push(chunk); + if (!ret) { + paused = true; + stream.pause(); + } + }); + + // proxy all the other methods. + // important when wrapping filters and duplexes. + for (var i in stream) { + if (util.isFunction(stream[i]) && util.isUndefined(this[i])) { + this[i] = function(method) { return function() { + return stream[method].apply(stream, arguments); + }}(i); + } + } + + // proxy certain important events. + var events = ['error', 'close', 'destroy', 'pause', 'resume']; + forEach(events, function(ev) { + stream.on(ev, self.emit.bind(self, ev)); + }); + + // when we try to consume some more bytes, simply unpause the + // underlying stream. + self._read = function(n) { + debug('wrapped _read', n); + if (paused) { + paused = false; + stream.resume(); + } + }; + + return self; +}; + + + +// exposed for testing purposes only. +Readable._fromList = fromList; + +// Pluck off n bytes from an array of buffers. +// Length is the combined lengths of all the buffers in the list. +function fromList(n, state) { + var list = state.buffer; + var length = state.length; + var stringMode = !!state.decoder; + var objectMode = !!state.objectMode; + var ret; + + // nothing in the list, definitely empty. + if (list.length === 0) + return null; + + if (length === 0) + ret = null; + else if (objectMode) + ret = list.shift(); + else if (!n || n >= length) { + // read it all, truncate the array. + if (stringMode) + ret = list.join(''); + else + ret = Buffer.concat(list, length); + list.length = 0; + } else { + // read just some of it. + if (n < list[0].length) { + // just take a part of the first list item. + // slice is the same for buffers and strings. + var buf = list[0]; + ret = buf.slice(0, n); + list[0] = buf.slice(n); + } else if (n === list[0].length) { + // first list is a perfect match + ret = list.shift(); + } else { + // complex case. + // we have enough to cover it, but it spans past the first buffer. + if (stringMode) + ret = ''; + else + ret = new Buffer(n); + + var c = 0; + for (var i = 0, l = list.length; i < l && c < n; i++) { + var buf = list[0]; + var cpy = Math.min(n - c, buf.length); + + if (stringMode) + ret += buf.slice(0, cpy); + else + buf.copy(ret, c, 0, cpy); + + if (cpy < buf.length) + list[0] = buf.slice(cpy); + else + list.shift(); + + c += cpy; + } + } + } + + return ret; +} + +function endReadable(stream) { + var state = stream._readableState; + + // If we get here before consuming all the bytes, then that is a + // bug in node. Should never happen. + if (state.length > 0) + throw new Error('endReadable called on non-empty stream'); + + if (!state.endEmitted) { + state.ended = true; + process.nextTick(function() { + // Check that we didn't get one last unshift. + if (!state.endEmitted && state.length === 0) { + state.endEmitted = true; + stream.readable = false; + stream.emit('end'); + } + }); + } +} + +function forEach (xs, f) { + for (var i = 0, l = xs.length; i < l; i++) { + f(xs[i], i); + } +} + +function indexOf (xs, x) { + for (var i = 0, l = xs.length; i < l; i++) { + if (xs[i] === x) return i; + } + return -1; +} diff --git a/pitfall/pdfkit/node_modules/readable-stream/lib/_stream_transform.js b/pitfall/pdfkit/node_modules/readable-stream/lib/_stream_transform.js new file mode 100644 index 00000000..905c5e45 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readable-stream/lib/_stream_transform.js @@ -0,0 +1,209 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. + + +// a transform stream is a readable/writable stream where you do +// something with the data. Sometimes it's called a "filter", +// but that's not a great name for it, since that implies a thing where +// some bits pass through, and others are simply ignored. (That would +// be a valid example of a transform, of course.) +// +// While the output is causally related to the input, it's not a +// necessarily symmetric or synchronous transformation. For example, +// a zlib stream might take multiple plain-text writes(), and then +// emit a single compressed chunk some time in the future. +// +// Here's how this works: +// +// The Transform stream has all the aspects of the readable and writable +// stream classes. When you write(chunk), that calls _write(chunk,cb) +// internally, and returns false if there's a lot of pending writes +// buffered up. When you call read(), that calls _read(n) until +// there's enough pending readable data buffered up. +// +// In a transform stream, the written data is placed in a buffer. When +// _read(n) is called, it transforms the queued up data, calling the +// buffered _write cb's as it consumes chunks. If consuming a single +// written chunk would result in multiple output chunks, then the first +// outputted bit calls the readcb, and subsequent chunks just go into +// the read buffer, and will cause it to emit 'readable' if necessary. +// +// This way, back-pressure is actually determined by the reading side, +// since _read has to be called to start processing a new chunk. However, +// a pathological inflate type of transform can cause excessive buffering +// here. For example, imagine a stream where every byte of input is +// interpreted as an integer from 0-255, and then results in that many +// bytes of output. Writing the 4 bytes {ff,ff,ff,ff} would result in +// 1kb of data being output. In this case, you could write a very small +// amount of input, and end up with a very large amount of output. In +// such a pathological inflating mechanism, there'd be no way to tell +// the system to stop doing the transform. A single 4MB write could +// cause the system to run out of memory. +// +// However, even in such a pathological case, only a single written chunk +// would be consumed, and then the rest would wait (un-transformed) until +// the results of the previous transformed chunk were consumed. + +module.exports = Transform; + +var Duplex = require('./_stream_duplex'); + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +util.inherits(Transform, Duplex); + + +function TransformState(options, stream) { + this.afterTransform = function(er, data) { + return afterTransform(stream, er, data); + }; + + this.needTransform = false; + this.transforming = false; + this.writecb = null; + this.writechunk = null; +} + +function afterTransform(stream, er, data) { + var ts = stream._transformState; + ts.transforming = false; + + var cb = ts.writecb; + + if (!cb) + return stream.emit('error', new Error('no writecb in Transform class')); + + ts.writechunk = null; + ts.writecb = null; + + if (!util.isNullOrUndefined(data)) + stream.push(data); + + if (cb) + cb(er); + + var rs = stream._readableState; + rs.reading = false; + if (rs.needReadable || rs.length < rs.highWaterMark) { + stream._read(rs.highWaterMark); + } +} + + +function Transform(options) { + if (!(this instanceof Transform)) + return new Transform(options); + + Duplex.call(this, options); + + this._transformState = new TransformState(options, this); + + // when the writable side finishes, then flush out anything remaining. + var stream = this; + + // start out asking for a readable event once data is transformed. + this._readableState.needReadable = true; + + // we have implemented the _read method, and done the other things + // that Readable wants before the first _read call, so unset the + // sync guard flag. + this._readableState.sync = false; + + this.once('prefinish', function() { + if (util.isFunction(this._flush)) + this._flush(function(er) { + done(stream, er); + }); + else + done(stream); + }); +} + +Transform.prototype.push = function(chunk, encoding) { + this._transformState.needTransform = false; + return Duplex.prototype.push.call(this, chunk, encoding); +}; + +// This is the part where you do stuff! +// override this function in implementation classes. +// 'chunk' is an input chunk. +// +// Call `push(newChunk)` to pass along transformed output +// to the readable side. You may call 'push' zero or more times. +// +// Call `cb(err)` when you are done with this chunk. If you pass +// an error, then that'll put the hurt on the whole operation. If you +// never call cb(), then you'll never get another chunk. +Transform.prototype._transform = function(chunk, encoding, cb) { + throw new Error('not implemented'); +}; + +Transform.prototype._write = function(chunk, encoding, cb) { + var ts = this._transformState; + ts.writecb = cb; + ts.writechunk = chunk; + ts.writeencoding = encoding; + if (!ts.transforming) { + var rs = this._readableState; + if (ts.needTransform || + rs.needReadable || + rs.length < rs.highWaterMark) + this._read(rs.highWaterMark); + } +}; + +// Doesn't matter what the args are here. +// _transform does all the work. +// That we got here means that the readable side wants more data. +Transform.prototype._read = function(n) { + var ts = this._transformState; + + if (!util.isNull(ts.writechunk) && ts.writecb && !ts.transforming) { + ts.transforming = true; + this._transform(ts.writechunk, ts.writeencoding, ts.afterTransform); + } else { + // mark that we need a transform, so that any data that comes in + // will get processed, now that we've asked for it. + ts.needTransform = true; + } +}; + + +function done(stream, er) { + if (er) + return stream.emit('error', er); + + // if there's nothing in the write buffer, then that means + // that nothing more will ever be provided + var ws = stream._writableState; + var ts = stream._transformState; + + if (ws.length) + throw new Error('calling transform done when ws.length != 0'); + + if (ts.transforming) + throw new Error('calling transform done when still transforming'); + + return stream.push(null); +} diff --git a/pitfall/pdfkit/node_modules/readable-stream/lib/_stream_writable.js b/pitfall/pdfkit/node_modules/readable-stream/lib/_stream_writable.js new file mode 100644 index 00000000..db8539cd --- /dev/null +++ b/pitfall/pdfkit/node_modules/readable-stream/lib/_stream_writable.js @@ -0,0 +1,477 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. + +// A bit simpler than readable streams. +// Implement an async ._write(chunk, cb), and it'll handle all +// the drain event emission and buffering. + +module.exports = Writable; + +/**/ +var Buffer = require('buffer').Buffer; +/**/ + +Writable.WritableState = WritableState; + + +/**/ +var util = require('core-util-is'); +util.inherits = require('inherits'); +/**/ + +var Stream = require('stream'); + +util.inherits(Writable, Stream); + +function WriteReq(chunk, encoding, cb) { + this.chunk = chunk; + this.encoding = encoding; + this.callback = cb; +} + +function WritableState(options, stream) { + var Duplex = require('./_stream_duplex'); + + options = options || {}; + + // the point at which write() starts returning false + // Note: 0 is a valid value, means that we always return false if + // the entire buffer is not flushed immediately on write() + var hwm = options.highWaterMark; + var defaultHwm = options.objectMode ? 16 : 16 * 1024; + this.highWaterMark = (hwm || hwm === 0) ? hwm : defaultHwm; + + // object stream flag to indicate whether or not this stream + // contains buffers or objects. + this.objectMode = !!options.objectMode; + + if (stream instanceof Duplex) + this.objectMode = this.objectMode || !!options.writableObjectMode; + + // cast to ints. + this.highWaterMark = ~~this.highWaterMark; + + this.needDrain = false; + // at the start of calling end() + this.ending = false; + // when end() has been called, and returned + this.ended = false; + // when 'finish' is emitted + this.finished = false; + + // should we decode strings into buffers before passing to _write? + // this is here so that some node-core streams can optimize string + // handling at a lower level. + var noDecode = options.decodeStrings === false; + this.decodeStrings = !noDecode; + + // Crypto is kind of old and crusty. Historically, its default string + // encoding is 'binary' so we have to make this configurable. + // Everything else in the universe uses 'utf8', though. + this.defaultEncoding = options.defaultEncoding || 'utf8'; + + // not an actual buffer we keep track of, but a measurement + // of how much we're waiting to get pushed to some underlying + // socket or file. + this.length = 0; + + // a flag to see when we're in the middle of a write. + this.writing = false; + + // when true all writes will be buffered until .uncork() call + this.corked = 0; + + // a flag to be able to tell if the onwrite cb is called immediately, + // or on a later tick. We set this to true at first, because any + // actions that shouldn't happen until "later" should generally also + // not happen before the first write call. + this.sync = true; + + // a flag to know if we're processing previously buffered items, which + // may call the _write() callback in the same tick, so that we don't + // end up in an overlapped onwrite situation. + this.bufferProcessing = false; + + // the callback that's passed to _write(chunk,cb) + this.onwrite = function(er) { + onwrite(stream, er); + }; + + // the callback that the user supplies to write(chunk,encoding,cb) + this.writecb = null; + + // the amount that is being written when _write is called. + this.writelen = 0; + + this.buffer = []; + + // number of pending user-supplied write callbacks + // this must be 0 before 'finish' can be emitted + this.pendingcb = 0; + + // emit prefinish if the only thing we're waiting for is _write cbs + // This is relevant for synchronous Transform streams + this.prefinished = false; + + // True if the error was already emitted and should not be thrown again + this.errorEmitted = false; +} + +function Writable(options) { + var Duplex = require('./_stream_duplex'); + + // Writable ctor is applied to Duplexes, though they're not + // instanceof Writable, they're instanceof Readable. + if (!(this instanceof Writable) && !(this instanceof Duplex)) + return new Writable(options); + + this._writableState = new WritableState(options, this); + + // legacy. + this.writable = true; + + Stream.call(this); +} + +// Otherwise people can pipe Writable streams, which is just wrong. +Writable.prototype.pipe = function() { + this.emit('error', new Error('Cannot pipe. Not readable.')); +}; + + +function writeAfterEnd(stream, state, cb) { + var er = new Error('write after end'); + // TODO: defer error events consistently everywhere, not just the cb + stream.emit('error', er); + process.nextTick(function() { + cb(er); + }); +} + +// If we get something that is not a buffer, string, null, or undefined, +// and we're not in objectMode, then that's an error. +// Otherwise stream chunks are all considered to be of length=1, and the +// watermarks determine how many objects to keep in the buffer, rather than +// how many bytes or characters. +function validChunk(stream, state, chunk, cb) { + var valid = true; + if (!util.isBuffer(chunk) && + !util.isString(chunk) && + !util.isNullOrUndefined(chunk) && + !state.objectMode) { + var er = new TypeError('Invalid non-string/buffer chunk'); + stream.emit('error', er); + process.nextTick(function() { + cb(er); + }); + valid = false; + } + return valid; +} + +Writable.prototype.write = function(chunk, encoding, cb) { + var state = this._writableState; + var ret = false; + + if (util.isFunction(encoding)) { + cb = encoding; + encoding = null; + } + + if (util.isBuffer(chunk)) + encoding = 'buffer'; + else if (!encoding) + encoding = state.defaultEncoding; + + if (!util.isFunction(cb)) + cb = function() {}; + + if (state.ended) + writeAfterEnd(this, state, cb); + else if (validChunk(this, state, chunk, cb)) { + state.pendingcb++; + ret = writeOrBuffer(this, state, chunk, encoding, cb); + } + + return ret; +}; + +Writable.prototype.cork = function() { + var state = this._writableState; + + state.corked++; +}; + +Writable.prototype.uncork = function() { + var state = this._writableState; + + if (state.corked) { + state.corked--; + + if (!state.writing && + !state.corked && + !state.finished && + !state.bufferProcessing && + state.buffer.length) + clearBuffer(this, state); + } +}; + +function decodeChunk(state, chunk, encoding) { + if (!state.objectMode && + state.decodeStrings !== false && + util.isString(chunk)) { + chunk = new Buffer(chunk, encoding); + } + return chunk; +} + +// if we're already writing something, then just put this +// in the queue, and wait our turn. Otherwise, call _write +// If we return false, then we need a drain event, so set that flag. +function writeOrBuffer(stream, state, chunk, encoding, cb) { + chunk = decodeChunk(state, chunk, encoding); + if (util.isBuffer(chunk)) + encoding = 'buffer'; + var len = state.objectMode ? 1 : chunk.length; + + state.length += len; + + var ret = state.length < state.highWaterMark; + // we must ensure that previous needDrain will not be reset to false. + if (!ret) + state.needDrain = true; + + if (state.writing || state.corked) + state.buffer.push(new WriteReq(chunk, encoding, cb)); + else + doWrite(stream, state, false, len, chunk, encoding, cb); + + return ret; +} + +function doWrite(stream, state, writev, len, chunk, encoding, cb) { + state.writelen = len; + state.writecb = cb; + state.writing = true; + state.sync = true; + if (writev) + stream._writev(chunk, state.onwrite); + else + stream._write(chunk, encoding, state.onwrite); + state.sync = false; +} + +function onwriteError(stream, state, sync, er, cb) { + if (sync) + process.nextTick(function() { + state.pendingcb--; + cb(er); + }); + else { + state.pendingcb--; + cb(er); + } + + stream._writableState.errorEmitted = true; + stream.emit('error', er); +} + +function onwriteStateUpdate(state) { + state.writing = false; + state.writecb = null; + state.length -= state.writelen; + state.writelen = 0; +} + +function onwrite(stream, er) { + var state = stream._writableState; + var sync = state.sync; + var cb = state.writecb; + + onwriteStateUpdate(state); + + if (er) + onwriteError(stream, state, sync, er, cb); + else { + // Check if we're actually ready to finish, but don't emit yet + var finished = needFinish(stream, state); + + if (!finished && + !state.corked && + !state.bufferProcessing && + state.buffer.length) { + clearBuffer(stream, state); + } + + if (sync) { + process.nextTick(function() { + afterWrite(stream, state, finished, cb); + }); + } else { + afterWrite(stream, state, finished, cb); + } + } +} + +function afterWrite(stream, state, finished, cb) { + if (!finished) + onwriteDrain(stream, state); + state.pendingcb--; + cb(); + finishMaybe(stream, state); +} + +// Must force callback to be called on nextTick, so that we don't +// emit 'drain' before the write() consumer gets the 'false' return +// value, and has a chance to attach a 'drain' listener. +function onwriteDrain(stream, state) { + if (state.length === 0 && state.needDrain) { + state.needDrain = false; + stream.emit('drain'); + } +} + + +// if there's something in the buffer waiting, then process it +function clearBuffer(stream, state) { + state.bufferProcessing = true; + + if (stream._writev && state.buffer.length > 1) { + // Fast case, write everything using _writev() + var cbs = []; + for (var c = 0; c < state.buffer.length; c++) + cbs.push(state.buffer[c].callback); + + // count the one we are adding, as well. + // TODO(isaacs) clean this up + state.pendingcb++; + doWrite(stream, state, true, state.length, state.buffer, '', function(err) { + for (var i = 0; i < cbs.length; i++) { + state.pendingcb--; + cbs[i](err); + } + }); + + // Clear buffer + state.buffer = []; + } else { + // Slow case, write chunks one-by-one + for (var c = 0; c < state.buffer.length; c++) { + var entry = state.buffer[c]; + var chunk = entry.chunk; + var encoding = entry.encoding; + var cb = entry.callback; + var len = state.objectMode ? 1 : chunk.length; + + doWrite(stream, state, false, len, chunk, encoding, cb); + + // if we didn't call the onwrite immediately, then + // it means that we need to wait until it does. + // also, that means that the chunk and cb are currently + // being processed, so move the buffer counter past them. + if (state.writing) { + c++; + break; + } + } + + if (c < state.buffer.length) + state.buffer = state.buffer.slice(c); + else + state.buffer.length = 0; + } + + state.bufferProcessing = false; +} + +Writable.prototype._write = function(chunk, encoding, cb) { + cb(new Error('not implemented')); + +}; + +Writable.prototype._writev = null; + +Writable.prototype.end = function(chunk, encoding, cb) { + var state = this._writableState; + + if (util.isFunction(chunk)) { + cb = chunk; + chunk = null; + encoding = null; + } else if (util.isFunction(encoding)) { + cb = encoding; + encoding = null; + } + + if (!util.isNullOrUndefined(chunk)) + this.write(chunk, encoding); + + // .end() fully uncorks + if (state.corked) { + state.corked = 1; + this.uncork(); + } + + // ignore unnecessary end() calls. + if (!state.ending && !state.finished) + endWritable(this, state, cb); +}; + + +function needFinish(stream, state) { + return (state.ending && + state.length === 0 && + !state.finished && + !state.writing); +} + +function prefinish(stream, state) { + if (!state.prefinished) { + state.prefinished = true; + stream.emit('prefinish'); + } +} + +function finishMaybe(stream, state) { + var need = needFinish(stream, state); + if (need) { + if (state.pendingcb === 0) { + prefinish(stream, state); + state.finished = true; + stream.emit('finish'); + } else + prefinish(stream, state); + } + return need; +} + +function endWritable(stream, state, cb) { + state.ending = true; + finishMaybe(stream, state); + if (cb) { + if (state.finished) + process.nextTick(cb); + else + stream.once('finish', cb); + } + state.ended = true; +} diff --git a/pitfall/pdfkit/node_modules/readable-stream/node_modules/string_decoder/.npmignore b/pitfall/pdfkit/node_modules/readable-stream/node_modules/string_decoder/.npmignore new file mode 100644 index 00000000..206320cc --- /dev/null +++ b/pitfall/pdfkit/node_modules/readable-stream/node_modules/string_decoder/.npmignore @@ -0,0 +1,2 @@ +build +test diff --git a/pitfall/pdfkit/node_modules/readable-stream/node_modules/string_decoder/LICENSE b/pitfall/pdfkit/node_modules/readable-stream/node_modules/string_decoder/LICENSE new file mode 100644 index 00000000..6de584a4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readable-stream/node_modules/string_decoder/LICENSE @@ -0,0 +1,20 @@ +Copyright Joyent, Inc. and other Node contributors. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to permit +persons to whom the Software is furnished to do so, subject to the +following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/readable-stream/node_modules/string_decoder/README.md b/pitfall/pdfkit/node_modules/readable-stream/node_modules/string_decoder/README.md new file mode 100644 index 00000000..4d2aa001 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readable-stream/node_modules/string_decoder/README.md @@ -0,0 +1,7 @@ +**string_decoder.js** (`require('string_decoder')`) from Node.js core + +Copyright Joyent, Inc. and other Node contributors. See LICENCE file for details. + +Version numbers match the versions found in Node core, e.g. 0.10.24 matches Node 0.10.24, likewise 0.11.10 matches Node 0.11.10. **Prefer the stable version over the unstable.** + +The *build/* directory contains a build script that will scrape the source from the [joyent/node](https://github.com/joyent/node) repo given a specific Node version. \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/readable-stream/node_modules/string_decoder/index.js b/pitfall/pdfkit/node_modules/readable-stream/node_modules/string_decoder/index.js new file mode 100644 index 00000000..b00e54fb --- /dev/null +++ b/pitfall/pdfkit/node_modules/readable-stream/node_modules/string_decoder/index.js @@ -0,0 +1,221 @@ +// Copyright Joyent, Inc. and other Node contributors. +// +// Permission is hereby granted, free of charge, to any person obtaining a +// copy of this software and associated documentation files (the +// "Software"), to deal in the Software without restriction, including +// without limitation the rights to use, copy, modify, merge, publish, +// distribute, sublicense, and/or sell copies of the Software, and to permit +// persons to whom the Software is furnished to do so, subject to the +// following conditions: +// +// The above copyright notice and this permission notice shall be included +// in all copies or substantial portions of the Software. +// +// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS +// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. + +var Buffer = require('buffer').Buffer; + +var isBufferEncoding = Buffer.isEncoding + || function(encoding) { + switch (encoding && encoding.toLowerCase()) { + case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': case 'raw': return true; + default: return false; + } + } + + +function assertEncoding(encoding) { + if (encoding && !isBufferEncoding(encoding)) { + throw new Error('Unknown encoding: ' + encoding); + } +} + +// StringDecoder provides an interface for efficiently splitting a series of +// buffers into a series of JS strings without breaking apart multi-byte +// characters. CESU-8 is handled as part of the UTF-8 encoding. +// +// @TODO Handling all encodings inside a single object makes it very difficult +// to reason about this code, so it should be split up in the future. +// @TODO There should be a utf8-strict encoding that rejects invalid UTF-8 code +// points as used by CESU-8. +var StringDecoder = exports.StringDecoder = function(encoding) { + this.encoding = (encoding || 'utf8').toLowerCase().replace(/[-_]/, ''); + assertEncoding(encoding); + switch (this.encoding) { + case 'utf8': + // CESU-8 represents each of Surrogate Pair by 3-bytes + this.surrogateSize = 3; + break; + case 'ucs2': + case 'utf16le': + // UTF-16 represents each of Surrogate Pair by 2-bytes + this.surrogateSize = 2; + this.detectIncompleteChar = utf16DetectIncompleteChar; + break; + case 'base64': + // Base-64 stores 3 bytes in 4 chars, and pads the remainder. + this.surrogateSize = 3; + this.detectIncompleteChar = base64DetectIncompleteChar; + break; + default: + this.write = passThroughWrite; + return; + } + + // Enough space to store all bytes of a single character. UTF-8 needs 4 + // bytes, but CESU-8 may require up to 6 (3 bytes per surrogate). + this.charBuffer = new Buffer(6); + // Number of bytes received for the current incomplete multi-byte character. + this.charReceived = 0; + // Number of bytes expected for the current incomplete multi-byte character. + this.charLength = 0; +}; + + +// write decodes the given buffer and returns it as JS string that is +// guaranteed to not contain any partial multi-byte characters. Any partial +// character found at the end of the buffer is buffered up, and will be +// returned when calling write again with the remaining bytes. +// +// Note: Converting a Buffer containing an orphan surrogate to a String +// currently works, but converting a String to a Buffer (via `new Buffer`, or +// Buffer#write) will replace incomplete surrogates with the unicode +// replacement character. See https://codereview.chromium.org/121173009/ . +StringDecoder.prototype.write = function(buffer) { + var charStr = ''; + // if our last write ended with an incomplete multibyte character + while (this.charLength) { + // determine how many remaining bytes this buffer has to offer for this char + var available = (buffer.length >= this.charLength - this.charReceived) ? + this.charLength - this.charReceived : + buffer.length; + + // add the new bytes to the char buffer + buffer.copy(this.charBuffer, this.charReceived, 0, available); + this.charReceived += available; + + if (this.charReceived < this.charLength) { + // still not enough chars in this buffer? wait for more ... + return ''; + } + + // remove bytes belonging to the current character from the buffer + buffer = buffer.slice(available, buffer.length); + + // get the character that was split + charStr = this.charBuffer.slice(0, this.charLength).toString(this.encoding); + + // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character + var charCode = charStr.charCodeAt(charStr.length - 1); + if (charCode >= 0xD800 && charCode <= 0xDBFF) { + this.charLength += this.surrogateSize; + charStr = ''; + continue; + } + this.charReceived = this.charLength = 0; + + // if there are no more bytes in this buffer, just emit our char + if (buffer.length === 0) { + return charStr; + } + break; + } + + // determine and set charLength / charReceived + this.detectIncompleteChar(buffer); + + var end = buffer.length; + if (this.charLength) { + // buffer the incomplete character bytes we got + buffer.copy(this.charBuffer, 0, buffer.length - this.charReceived, end); + end -= this.charReceived; + } + + charStr += buffer.toString(this.encoding, 0, end); + + var end = charStr.length - 1; + var charCode = charStr.charCodeAt(end); + // CESU-8: lead surrogate (D800-DBFF) is also the incomplete character + if (charCode >= 0xD800 && charCode <= 0xDBFF) { + var size = this.surrogateSize; + this.charLength += size; + this.charReceived += size; + this.charBuffer.copy(this.charBuffer, size, 0, size); + buffer.copy(this.charBuffer, 0, 0, size); + return charStr.substring(0, end); + } + + // or just emit the charStr + return charStr; +}; + +// detectIncompleteChar determines if there is an incomplete UTF-8 character at +// the end of the given buffer. If so, it sets this.charLength to the byte +// length that character, and sets this.charReceived to the number of bytes +// that are available for this character. +StringDecoder.prototype.detectIncompleteChar = function(buffer) { + // determine how many bytes we have to check at the end of this buffer + var i = (buffer.length >= 3) ? 3 : buffer.length; + + // Figure out if one of the last i bytes of our buffer announces an + // incomplete char. + for (; i > 0; i--) { + var c = buffer[buffer.length - i]; + + // See http://en.wikipedia.org/wiki/UTF-8#Description + + // 110XXXXX + if (i == 1 && c >> 5 == 0x06) { + this.charLength = 2; + break; + } + + // 1110XXXX + if (i <= 2 && c >> 4 == 0x0E) { + this.charLength = 3; + break; + } + + // 11110XXX + if (i <= 3 && c >> 3 == 0x1E) { + this.charLength = 4; + break; + } + } + this.charReceived = i; +}; + +StringDecoder.prototype.end = function(buffer) { + var res = ''; + if (buffer && buffer.length) + res = this.write(buffer); + + if (this.charReceived) { + var cr = this.charReceived; + var buf = this.charBuffer; + var enc = this.encoding; + res += buf.slice(0, cr).toString(enc); + } + + return res; +}; + +function passThroughWrite(buffer) { + return buffer.toString(this.encoding); +} + +function utf16DetectIncompleteChar(buffer) { + this.charReceived = buffer.length % 2; + this.charLength = this.charReceived ? 2 : 0; +} + +function base64DetectIncompleteChar(buffer) { + this.charReceived = buffer.length % 3; + this.charLength = this.charReceived ? 3 : 0; +} diff --git a/pitfall/pdfkit/node_modules/readable-stream/node_modules/string_decoder/package.json b/pitfall/pdfkit/node_modules/readable-stream/node_modules/string_decoder/package.json new file mode 100644 index 00000000..15095005 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readable-stream/node_modules/string_decoder/package.json @@ -0,0 +1,87 @@ +{ + "_args": [ + [ + { + "raw": "string_decoder@~0.10.x", + "scope": null, + "escapedName": "string_decoder", + "name": "string_decoder", + "rawSpec": "~0.10.x", + "spec": ">=0.10.0 <0.11.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/readable-stream" + ] + ], + "_from": "string_decoder@>=0.10.0 <0.11.0", + "_id": "string_decoder@0.10.31", + "_inCache": true, + "_location": "/readable-stream/string_decoder", + "_npmUser": { + "name": "rvagg", + "email": "rod@vagg.org" + }, + "_npmVersion": "1.4.23", + "_phantomChildren": {}, + "_requested": { + "raw": "string_decoder@~0.10.x", + "scope": null, + "escapedName": "string_decoder", + "name": "string_decoder", + "rawSpec": "~0.10.x", + "spec": ">=0.10.0 <0.11.0", + "type": "range" + }, + "_requiredBy": [ + "/readable-stream" + ], + "_resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "_shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", + "_shrinkwrap": null, + "_spec": "string_decoder@~0.10.x", + "_where": "/Users/MB/git/pdfkit/node_modules/readable-stream", + "bugs": { + "url": "https://github.com/rvagg/string_decoder/issues" + }, + "dependencies": {}, + "description": "The string_decoder module from Node core", + "devDependencies": { + "tap": "~0.4.8" + }, + "directories": {}, + "dist": { + "shasum": "62e203bc41766c6c28c9fc84301dab1c5310fa94", + "tarball": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz" + }, + "gitHead": "d46d4fd87cf1d06e031c23f1ba170ca7d4ade9a0", + "homepage": "https://github.com/rvagg/string_decoder", + "keywords": [ + "string", + "decoder", + "browser", + "browserify" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + }, + { + "name": "rvagg", + "email": "rod@vagg.org" + } + ], + "name": "string_decoder", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/rvagg/string_decoder.git" + }, + "scripts": { + "test": "tap test/simple/*.js" + }, + "version": "0.10.31" +} diff --git a/pitfall/pdfkit/node_modules/readable-stream/package.json b/pitfall/pdfkit/node_modules/readable-stream/package.json new file mode 100644 index 00000000..f3f2b9e6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readable-stream/package.json @@ -0,0 +1,114 @@ +{ + "_args": [ + [ + { + "raw": "readable-stream@~1.1.9", + "scope": null, + "escapedName": "readable-stream", + "name": "readable-stream", + "rawSpec": "~1.1.9", + "spec": ">=1.1.9 <1.2.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/concat-stream" + ] + ], + "_from": "readable-stream@>=1.1.9 <1.2.0", + "_id": "readable-stream@1.1.14", + "_inCache": true, + "_location": "/readable-stream", + "_nodeVersion": "5.10.1", + "_npmOperationalInternal": { + "host": "packages-16-east.internal.npmjs.com", + "tmp": "tmp/readable-stream-1.1.14.tgz_1460563293219_0.5682175166439265" + }, + "_npmUser": { + "name": "cwmma", + "email": "calvin.metcalf@gmail.com" + }, + "_npmVersion": "3.8.3", + "_phantomChildren": {}, + "_requested": { + "raw": "readable-stream@~1.1.9", + "scope": null, + "escapedName": "readable-stream", + "name": "readable-stream", + "rawSpec": "~1.1.9", + "spec": ">=1.1.9 <1.2.0", + "type": "range" + }, + "_requiredBy": [ + "/concat-stream", + "/duplexer2", + "/module-deps" + ], + "_resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "_shasum": "7cf4c54ef648e3813084c636dd2079e166c081d9", + "_shrinkwrap": null, + "_spec": "readable-stream@~1.1.9", + "_where": "/Users/MB/git/pdfkit/node_modules/concat-stream", + "author": { + "name": "Isaac Z. Schlueter", + "email": "i@izs.me", + "url": "http://blog.izs.me/" + }, + "browser": { + "util": false + }, + "bugs": { + "url": "https://github.com/isaacs/readable-stream/issues" + }, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + }, + "description": "Streams3, a user-land copy of the stream library from Node.js v0.11.x", + "devDependencies": { + "tap": "~0.2.6" + }, + "directories": {}, + "dist": { + "shasum": "7cf4c54ef648e3813084c636dd2079e166c081d9", + "tarball": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz" + }, + "gitHead": "52550840cb1d6e8a98ef9a909a4bea360bc6f7da", + "homepage": "https://github.com/isaacs/readable-stream#readme", + "keywords": [ + "readable", + "stream", + "pipe" + ], + "license": "MIT", + "main": "readable.js", + "maintainers": [ + { + "name": "isaacs", + "email": "isaacs@npmjs.com" + }, + { + "name": "tootallnate", + "email": "nathan@tootallnate.net" + }, + { + "name": "rvagg", + "email": "rod@vagg.org" + }, + { + "name": "cwmma", + "email": "calvin.metcalf@gmail.com" + } + ], + "name": "readable-stream", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/isaacs/readable-stream.git" + }, + "scripts": { + "test": "tap test/simple/*.js" + }, + "version": "1.1.14" +} diff --git a/pitfall/pdfkit/node_modules/readable-stream/passthrough.js b/pitfall/pdfkit/node_modules/readable-stream/passthrough.js new file mode 100644 index 00000000..27e8d8a5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readable-stream/passthrough.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_passthrough.js") diff --git a/pitfall/pdfkit/node_modules/readable-stream/readable.js b/pitfall/pdfkit/node_modules/readable-stream/readable.js new file mode 100644 index 00000000..2a8b5c6b --- /dev/null +++ b/pitfall/pdfkit/node_modules/readable-stream/readable.js @@ -0,0 +1,10 @@ +exports = module.exports = require('./lib/_stream_readable.js'); +exports.Stream = require('stream'); +exports.Readable = exports; +exports.Writable = require('./lib/_stream_writable.js'); +exports.Duplex = require('./lib/_stream_duplex.js'); +exports.Transform = require('./lib/_stream_transform.js'); +exports.PassThrough = require('./lib/_stream_passthrough.js'); +if (!process.browser && process.env.READABLE_STREAM === 'disable') { + module.exports = require('stream'); +} diff --git a/pitfall/pdfkit/node_modules/readable-stream/transform.js b/pitfall/pdfkit/node_modules/readable-stream/transform.js new file mode 100644 index 00000000..5d482f07 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readable-stream/transform.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_transform.js") diff --git a/pitfall/pdfkit/node_modules/readable-stream/writable.js b/pitfall/pdfkit/node_modules/readable-stream/writable.js new file mode 100644 index 00000000..e1e9efdf --- /dev/null +++ b/pitfall/pdfkit/node_modules/readable-stream/writable.js @@ -0,0 +1 @@ +module.exports = require("./lib/_stream_writable.js") diff --git a/pitfall/pdfkit/node_modules/readdirp/.npmignore b/pitfall/pdfkit/node_modules/readdirp/.npmignore new file mode 100644 index 00000000..7dccd970 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/.npmignore @@ -0,0 +1,15 @@ +lib-cov +*.seed +*.log +*.csv +*.dat +*.out +*.pid +*.gz + +pids +logs +results + +node_modules +npm-debug.log \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/readdirp/.travis.yml b/pitfall/pdfkit/node_modules/readdirp/.travis.yml new file mode 100644 index 00000000..84fd7ca2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - 0.6 + - 0.8 + - 0.9 diff --git a/pitfall/pdfkit/node_modules/readdirp/LICENSE b/pitfall/pdfkit/node_modules/readdirp/LICENSE new file mode 100644 index 00000000..ee27ba4b --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/readdirp/README.md b/pitfall/pdfkit/node_modules/readdirp/README.md new file mode 100644 index 00000000..7b36a8a8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/README.md @@ -0,0 +1,227 @@ +# readdirp [![Build Status](https://secure.travis-ci.org/thlorenz/readdirp.png)](http://travis-ci.org/thlorenz/readdirp) + +Recursive version of [fs.readdir](http://nodejs.org/docs/latest/api/fs.html#fs_fs_readdir_path_callback). Exposes a **stream api**. + +```javascript +var readdirp = require('readdirp'); + , path = require('path') + , es = require('event-stream'); + +// print out all JavaScript files along with their size + +var stream = readdirp({ root: path.join(__dirname), fileFilter: '*.js' }); +stream + .on('warn', function (err) { + console.error('non-fatal error', err); + // optionally call stream.destroy() here in order to abort and cause 'close' to be emitted + }) + .on('error', function (err) { console.error('fatal error', err); }) + .pipe(es.mapSync(function (entry) { + return { path: entry.path, size: entry.stat.size }; + })) + .pipe(es.stringify()) + .pipe(process.stdout); +``` + +Meant to be one of the recursive versions of [fs](http://nodejs.org/docs/latest/api/fs.html) functions, e.g., like [mkdirp](https://github.com/substack/node-mkdirp). + +**Table of Contents** *generated with [DocToc](http://doctoc.herokuapp.com/)* + +- [Installation](#installation) +- [API](#api) + - [entry stream](#entry-stream) + - [options](#options) + - [entry info](#entry-info) + - [Filters](#filters) + - [Callback API](#callback-api) + - [allProcessed ](#allprocessed) + - [fileProcessed](#fileprocessed) +- [More Examples](#more-examples) + - [stream api](#stream-api) + - [stream api pipe](#stream-api-pipe) + - [grep](#grep) + - [using callback api](#using-callback-api) + - [tests](#tests) + + +# Installation + + npm install readdirp + +# API + +***var entryStream = readdirp (options)*** + +Reads given root recursively and returns a `stream` of [entry info](#entry-info)s. + +## entry stream + +Behaves as follows: + +- `emit('data')` passes an [entry info](#entry-info) whenever one is found +- `emit('warn')` passes a non-fatal `Error` that prevents a file/directory from being processed (i.e., if it is + inaccessible to the user) +- `emit('error')` passes a fatal `Error` which also ends the stream (i.e., when illegal options where passed) +- `emit('end')` called when all entries were found and no more will be emitted (i.e., we are done) +- `emit('close')` called when the stream is destroyed via `stream.destroy()` (which could be useful if you want to + manually abort even on a non fatal error) - at that point the stream is no longer `readable` and no more entries, + warning or errors are emitted +- the stream is `paused` initially in order to allow `pipe` and `on` handlers be connected before data or errors are + emitted +- the stream is `resumed` automatically during the next event loop +- to learn more about streams, consult the [stream-handbook](https://github.com/substack/stream-handbook) + +## options + +- **root**: path in which to start reading and recursing into subdirectories + +- **fileFilter**: filter to include/exclude files found (see [Filters](#filters) for more) + +- **directoryFilter**: filter to include/exclude directories found and to recurse into (see [Filters](#filters) for more) + +- **depth**: depth at which to stop recursing even if more subdirectories are found + +## entry info + +Has the following properties: + +- **parentDir** : directory in which entry was found (relative to given root) +- **fullParentDir** : full path to parent directory +- **name** : name of the file/directory +- **path** : path to the file/directory (relative to given root) +- **fullPath** : full path to the file/directory found +- **stat** : built in [stat object](http://nodejs.org/docs/v0.4.9/api/fs.html#fs.Stats) +- **Example**: (assuming root was `/User/dev/readdirp`) + + parentDir : 'test/bed/root_dir1', + fullParentDir : '/User/dev/readdirp/test/bed/root_dir1', + name : 'root_dir1_subdir1', + path : 'test/bed/root_dir1/root_dir1_subdir1', + fullPath : '/User/dev/readdirp/test/bed/root_dir1/root_dir1_subdir1', + stat : [ ... ] + +## Filters + +There are three different ways to specify filters for files and directories respectively. + +- **function**: a function that takes an entry info as a parameter and returns true to include or false to exclude the entry + +- **glob string**: a string (e.g., `*.js`) which is matched using [minimatch](https://github.com/isaacs/minimatch), so go there for more + information. + + Globstars (`**`) are not supported since specifiying a recursive pattern for an already recursive function doesn't make sense. + + Negated globs (as explained in the minimatch documentation) are allowed, e.g., `!*.txt` matches everything but text files. + +- **array of glob strings**: either need to be all inclusive or all exclusive (negated) patterns otherwise an error is thrown. + + `[ '*.json', '*.js' ]` includes all JavaScript and Json files. + + + `[ '!.git', '!node_modules' ]` includes all directories except the '.git' and 'node_modules'. + +Directories that do not pass a filter will not be recursed into. + +## Callback API + +Although the stream api is recommended, readdirp also exposes a callback based api. + +***readdirp (options, callback1 [, callback2])*** + +If callback2 is given, callback1 functions as the **fileProcessed** callback, and callback2 as the **allProcessed** callback. + +If only callback1 is given, it functions as the **allProcessed** callback. + +### allProcessed + +- function with err and res parameters, e.g., `function (err, res) { ... }` +- **err**: array of errors that occurred during the operation, **res may still be present, even if errors occurred** +- **res**: collection of file/directory [entry infos](#entry-info) + +### fileProcessed + +- function with [entry info](#entry-info) parameter e.g., `function (entryInfo) { ... }` + + +# More Examples + +`on('error', ..)`, `on('warn', ..)` and `on('end', ..)` handling omitted for brevity + +```javascript +var readdirp = require('readdirp'); + +// Glob file filter +readdirp({ root: './test/bed', fileFilter: '*.js' }) + .on('data', function (entry) { + // do something with each JavaScript file entry + }); + +// Combined glob file filters +readdirp({ root: './test/bed', fileFilter: [ '*.js', '*.json' ] }) + .on('data', function (entry) { + // do something with each JavaScript and Json file entry + }); + +// Combined negated directory filters +readdirp({ root: './test/bed', directoryFilter: [ '!.git', '!*modules' ] }) + .on('data', function (entry) { + // do something with each file entry found outside '.git' or any modules directory + }); + +// Function directory filter +readdirp({ root: './test/bed', directoryFilter: function (di) { return di.name.length === 9; } }) + .on('data', function (entry) { + // do something with each file entry found inside directories whose name has length 9 + }); + +// Limiting depth +readdirp({ root: './test/bed', depth: 1 }) + .on('data', function (entry) { + // do something with each file entry found up to 1 subdirectory deep + }); + +// callback api +readdirp( + { root: '.' } + , function(fileInfo) { + // do something with file entry here + } + , function (err, res) { + // all done, move on or do final step for all file entries here + } +); +``` + +Try more examples by following [instructions](https://github.com/thlorenz/readdirp/blob/master/examples/Readme.md) +on how to get going. + +## stream api + +[stream-api.js](https://github.com/thlorenz/readdirp/blob/master/examples/stream-api.js) + +Demonstrates error and data handling by listening to events emitted from the readdirp stream. + +## stream api pipe + +[stream-api-pipe.js](https://github.com/thlorenz/readdirp/blob/master/examples/stream-api-pipe.js) + +Demonstrates error handling by listening to events emitted from the readdirp stream and how to pipe the data stream into +another destination stream. + +## grep + +[grep.js](https://github.com/thlorenz/readdirp/blob/master/examples/grep.js) + +Very naive implementation of grep, for demonstration purposes only. + +## using callback api + +[callback-api.js](https://github.com/thlorenz/readdirp/blob/master/examples/callback-api.js) + +Shows how to pass callbacks in order to handle errors and/or data. + +## tests + +The [readdirp tests](https://github.com/thlorenz/readdirp/blob/master/test/readdirp.js) also will give you a good idea on +how things work. + diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/Readme.md b/pitfall/pdfkit/node_modules/readdirp/examples/Readme.md new file mode 100644 index 00000000..55fc4611 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/Readme.md @@ -0,0 +1,37 @@ +# readdirp examples + +## How to run the examples + +Assuming you installed readdirp (`npm install readdirp`), you can do the following: + +1. `npm explore readdirp` +2. `cd examples` +3. `npm install` + +At that point you can run the examples with node, i.e., `node grep`. + +## stream api + +[stream-api.js](https://github.com/thlorenz/readdirp/blob/master/examples/stream-api.js) + +Demonstrates error and data handling by listening to events emitted from the readdirp stream. + +## stream api pipe + +[stream-api-pipe.js](https://github.com/thlorenz/readdirp/blob/master/examples/stream-api-pipe.js) + +Demonstrates error handling by listening to events emitted from the readdirp stream and how to pipe the data stream into +another destination stream. + +## grep + +[grep.js](https://github.com/thlorenz/readdirp/blob/master/examples/grep.js) + +Very naive implementation of grep, for demonstration purposes only. + +## using callback api + +[callback-api.js](https://github.com/thlorenz/readdirp/blob/master/examples/callback-api.js) + +Shows how to pass callbacks in order to handle errors and/or data. + diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/callback-api.js b/pitfall/pdfkit/node_modules/readdirp/examples/callback-api.js new file mode 100644 index 00000000..39bd2d79 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/callback-api.js @@ -0,0 +1,10 @@ +var readdirp = require('..'); + +readdirp({ root: '.', fileFilter: '*.js' }, function (errors, res) { + if (errors) { + errors.forEach(function (err) { + console.error('Error: ', err); + }); + } + console.log('all javascript files', res); +}); diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/grep.js b/pitfall/pdfkit/node_modules/readdirp/examples/grep.js new file mode 100644 index 00000000..807fa355 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/grep.js @@ -0,0 +1,73 @@ +'use strict'; +var readdirp = require('..') + , util = require('util') + , fs = require('fs') + , path = require('path') + , Stream = require('stream') + , tap = require('tap-stream') + , es = require('event-stream') + ; + +function findLinesMatching (searchTerm) { + + return es.through(function (entry) { + var lineno = 0 + , matchingLines = [] + , fileStream = this; + + function filter () { + return es.mapSync(function (line) { + lineno++; + return ~line.indexOf(searchTerm) ? lineno + ': ' + line : undefined; + }); + } + + function aggregate () { + return es.through( + function write (data) { + matchingLines.push(data); + } + , function end () { + + // drop files that had no matches + if (matchingLines.length) { + var result = { file: entry, lines: matchingLines }; + + // pass result on to file stream + fileStream.emit('data', result); + } + this.emit('end'); + } + ); + } + + fs.createReadStream(entry.fullPath, { encoding: 'utf-8' }) + + // handle file contents line by line + .pipe(es.split('\n')) + + // keep only the lines that matched the term + .pipe(filter()) + + // aggregate all matching lines and delegate control back to the file stream + .pipe(aggregate()) + ; + }); +} + +console.log('grepping for "arguments"'); + +// create a stream of all javascript files found in this and all sub directories +readdirp({ root: path.join(__dirname), fileFilter: '*.js' }) + + // find all lines matching the term for each file (if none found, that file is ignored) + .pipe(findLinesMatching('arguments')) + + // format the results and output + .pipe( + es.mapSync(function (res) { + return '\n\n' + res.file.path + '\n\t' + res.lines.join('\n\t'); + }) + ) + .pipe(process.stdout) + ; diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/.npmignore b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/.npmignore new file mode 100644 index 00000000..13abef4f --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/.npmignore @@ -0,0 +1,3 @@ +node_modules +node_modules/* +npm_debug.log diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/.travis.yml b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/.travis.yml new file mode 100644 index 00000000..895dbd36 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.6 + - 0.8 diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/LICENCE b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/LICENCE new file mode 100644 index 00000000..171dd970 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/LICENCE @@ -0,0 +1,22 @@ +Copyright (c) 2011 Dominic Tarr + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/examples/pretty.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/examples/pretty.js new file mode 100644 index 00000000..af043401 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/examples/pretty.js @@ -0,0 +1,25 @@ + +var inspect = require('util').inspect + +if(!module.parent) { + var es = require('..') //load event-stream + es.pipe( //pipe joins streams together + process.openStdin(), //open stdin + es.split(), //split stream to break on newlines + es.map(function (data, callback) {//turn this async function into a stream + var j + try { + j = JSON.parse(data) //try to parse input into json + } catch (err) { + return callback(null, data) //if it fails just pass it anyway + } + callback(null, inspect(j)) //render it nicely + }), + process.stdout // pipe it to stdout ! + ) + } + +// run this +// +// curl -sS registry.npmjs.org/event-stream | node pretty.js +// diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/index.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/index.js new file mode 100644 index 00000000..16846a26 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/index.js @@ -0,0 +1,341 @@ +//filter will reemit the data if cb(err,pass) pass is truthy + +// reduce is more tricky +// maybe we want to group the reductions or emit progress updates occasionally +// the most basic reduce just emits one 'data' event after it has recieved 'end' + +var Stream = require('stream').Stream + , es = exports + , through = require('through') + , from = require('from') + , duplex = require('duplexer') + , map = require('map-stream') + , pause = require('pause-stream') + , split = require('split') + +es.Stream = Stream //re-export Stream from core +es.through = through +es.from = from +es.duplex = duplex +es.map = map +es.pause = pause +es.split = split + +// merge / concat +// +// combine multiple streams into a single stream. +// will emit end only once + +es.concat = //actually this should be called concat +es.merge = function (/*streams...*/) { + var toMerge = [].slice.call(arguments) + var stream = new Stream() + var endCount = 0 + stream.writable = stream.readable = true + + toMerge.forEach(function (e) { + e.pipe(stream, {end: false}) + var ended = false + e.on('end', function () { + if(ended) return + ended = true + endCount ++ + if(endCount == toMerge.length) + stream.emit('end') + }) + }) + stream.write = function (data) { + this.emit('data', data) + } + stream.destroy = function () { + merge.forEach(function (e) { + if(e.destroy) e.destroy() + }) + } + return stream +} + + +// writable stream, collects all events into an array +// and calls back when 'end' occurs +// mainly I'm using this to test the other functions + +es.writeArray = function (done) { + if ('function' !== typeof done) + throw new Error('function writeArray (done): done must be function') + + var a = new Stream () + , array = [], isDone = false + a.write = function (l) { + array.push(l) + } + a.end = function () { + isDone = true + done(null, array) + } + a.writable = true + a.readable = false + a.destroy = function () { + a.writable = a.readable = false + if(isDone) return + done(new Error('destroyed before end'), array) + } + return a +} + +//return a Stream that reads the properties of an object +//respecting pause() and resume() + +es.readArray = function (array) { + var stream = new Stream() + , i = 0 + , paused = false + , ended = false + + stream.readable = true + stream.writable = false + + if(!Array.isArray(array)) + throw new Error('event-stream.read expects an array') + + stream.resume = function () { + if(ended) return + paused = false + var l = array.length + while(i < l && !paused && !ended) { + stream.emit('data', array[i++]) + } + if(i == l && !ended) + ended = true, stream.readable = false, stream.emit('end') + } + process.nextTick(stream.resume) + stream.pause = function () { + paused = true + } + stream.destroy = function () { + ended = true + stream.emit('close') + } + return stream +} + +// +// readable (asyncFunction) +// return a stream that calls an async function while the stream is not paused. +// +// the function must take: (count, callback) {... +// + +es.readable = function (func, continueOnError) { + var stream = new Stream() + , i = 0 + , paused = false + , ended = false + , reading = false + + stream.readable = true + stream.writable = false + + if('function' !== typeof func) + throw new Error('event-stream.readable expects async function') + + stream.on('end', function () { ended = true }) + + function get (err, data) { + + if(err) { + stream.emit('error', err) + if(!continueOnError) stream.emit('end') + } else if (arguments.length > 1) + stream.emit('data', data) + + process.nextTick(function () { + if(ended || paused || reading) return + try { + reading = true + func.call(stream, i++, function () { + reading = false + get.apply(null, arguments) + }) + } catch (err) { + stream.emit('error', err) + } + }) + } + stream.resume = function () { + paused = false + get() + } + process.nextTick(get) + stream.pause = function () { + paused = true + } + stream.destroy = function () { + stream.emit('end') + stream.emit('close') + ended = true + } + return stream +} + + + +// +// map sync +// + +es.mapSync = function (sync) { + return es.through(function write(data) { + var mappedData = sync(data) + if (typeof mappedData !== 'undefined') + this.emit('data', mappedData) + }) +} + +// +// log just print out what is coming through the stream, for debugging +// + +es.log = function (name) { + return es.through(function (data) { + var args = [].slice.call(arguments) + if(name) console.error(name, data) + else console.error(data) + this.emit('data', data) + }) +} + +// +// combine multiple streams together so that they act as a single stream +// +es.pipeline = +es.pipe = es.connect = function () { + + var streams = [].slice.call(arguments) + , first = streams[0] + , last = streams[streams.length - 1] + , thepipe = es.duplex(first, last) + + if(streams.length == 1) + return streams[0] + else if (!streams.length) + throw new Error('connect called with empty args') + + //pipe all the streams together + + function recurse (streams) { + if(streams.length < 2) + return + streams[0].pipe(streams[1]) + recurse(streams.slice(1)) + } + + recurse(streams) + + function onerror () { + var args = [].slice.call(arguments) + args.unshift('error') + thepipe.emit.apply(thepipe, args) + } + + //es.duplex already reemits the error from the first and last stream. + //add a listener for the inner streams in the pipeline. + for(var i = 1; i < streams.length - 1; i ++) + streams[i].on('error', onerror) + + return thepipe +} + +// +// child -- pipe through a child process +// + +es.child = function (child) { + + return es.duplex(child.stdin, child.stdout) + +} + +// +// parse +// +// must be used after es.split() to ensure that each chunk represents a line +// source.pipe(es.split()).pipe(es.parse()) + +es.parse = function () { + return es.through(function (data) { + var obj + try { + if(data) //ignore empty lines + obj = JSON.parse(data.toString()) + } catch (err) { + return console.error(err, 'attemping to parse:', data) + } + //ignore lines that where only whitespace. + if(obj !== undefined) + this.emit('data', obj) + }) +} +// +// stringify +// + +es.stringify = function () { + var Buffer = require('buffer').Buffer + return es.mapSync(function (e){ + return JSON.stringify(Buffer.isBuffer(e) ? e.toString() : e) + '\n' + }) +} + +// +// replace a string within a stream. +// +// warn: just concatenates the string and then does str.split().join(). +// probably not optimal. +// for smallish responses, who cares? +// I need this for shadow-npm so it's only relatively small json files. + +es.replace = function (from, to) { + return es.pipeline(es.split(from), es.join(to)) +} + +// +// join chunks with a joiner. just like Array#join +// also accepts a callback that is passed the chunks appended together +// this is still supported for legacy reasons. +// + +es.join = function (str) { + + //legacy api + if('function' === typeof str) + return es.wait(str) + + var first = true + return es.through(function (data) { + if(!first) + this.emit('data', str) + first = false + this.emit('data', data) + return true + }) +} + + +// +// wait. callback when 'end' is emitted, with all chunks appended as string. +// + +es.wait = function (callback) { + var body = '' + return es.through(function (data) { body += data }, + function () { + this.emit('data', body) + this.emit('end') + if(callback) callback(null, body) + }) +} + +es.pipeable = function () { + throw new Error('[EVENT-STREAM] es.pipeable is deprecated') +} diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/duplexer/.npmignore b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/duplexer/.npmignore new file mode 100644 index 00000000..062c11e8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/duplexer/.npmignore @@ -0,0 +1,3 @@ +node_modules +*.log +*.err \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/duplexer/.travis.yml b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/duplexer/.travis.yml new file mode 100644 index 00000000..c2ba3f90 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/duplexer/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - 0.8 \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/duplexer/LICENCE b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/duplexer/LICENCE new file mode 100644 index 00000000..a23e08a8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/duplexer/LICENCE @@ -0,0 +1,19 @@ +Copyright (c) 2012 Raynos. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND 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. \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/duplexer/Makefile b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/duplexer/Makefile new file mode 100644 index 00000000..1f8985d0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/duplexer/Makefile @@ -0,0 +1,4 @@ +test: + node test.js + +.PHONY: test \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/duplexer/README.md b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/duplexer/README.md new file mode 100644 index 00000000..a24cecb3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/duplexer/README.md @@ -0,0 +1,36 @@ +# duplexer [![build status][1]][2] + +Creates a duplex stream + +Taken from [event-stream][3] + +## duplex (writeStream, readStream) + +Takes a writable stream and a readable stream and makes them appear as a readable writable stream. + +It is assumed that the two streams are connected to each other in some way. + +## Example + + var grep = cp.exec('grep Stream') + + duplex(grep.stdin, grep.stdout) + +## Installation + +`npm install duplexer` + +## Tests + +`make test` + +## Contributors + + - Dominictarr + - Raynos + +## MIT Licenced + + [1]: https://secure.travis-ci.org/Raynos/duplexer.png + [2]: http://travis-ci.org/Raynos/duplexer + [3]: https://github.com/dominictarr/event-stream#duplex-writestream-readstream \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/duplexer/index.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/duplexer/index.js new file mode 100644 index 00000000..fee581db --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/duplexer/index.js @@ -0,0 +1,87 @@ +var Stream = require("stream") + , writeMethods = ["write", "end", "destroy"] + , readMethods = ["resume", "pause"] + , readEvents = ["data", "close"] + , slice = Array.prototype.slice + +module.exports = duplex + +function duplex(writer, reader) { + var stream = new Stream() + , ended = false + + Object.defineProperties(stream, { + writable: { + get: getWritable + } + , readable: { + get: getReadable + } + }) + + writeMethods.forEach(proxyWriter) + + readMethods.forEach(proxyReader) + + readEvents.forEach(proxyStream) + + reader.on("end", handleEnd) + + writer.on("error", reemit) + reader.on("error", reemit) + + return stream + + function getWritable() { + return writer.writable + } + + function getReadable() { + return reader.readable + } + + function proxyWriter(methodName) { + stream[methodName] = method + + function method() { + return writer[methodName].apply(writer, arguments) + } + } + + function proxyReader(methodName) { + stream[methodName] = method + + function method() { + stream.emit(methodName) + var func = reader[methodName] + if (func) { + return func.apply(reader, arguments) + } + reader.emit(methodName) + } + } + + function proxyStream(methodName) { + reader.on(methodName, reemit) + + function reemit() { + var args = slice.call(arguments) + args.unshift(methodName) + stream.emit.apply(stream, args) + } + } + + function handleEnd() { + if (ended) { + return + } + ended = true + var args = slice.call(arguments) + args.unshift("end") + stream.emit.apply(stream, args) + } + + function reemit(err) { + stream.emit("error", err) + } +} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/duplexer/package.json b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/duplexer/package.json new file mode 100644 index 00000000..6f54329f --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/duplexer/package.json @@ -0,0 +1,41 @@ +{ + "name": "duplexer", + "version": "0.0.2", + "description": "Creates a duplex stream", + "keywords": [], + "author": { + "name": "Raynos", + "email": "raynos2@gmail.com" + }, + "repository": { + "type": "git", + "url": "git://github.com/Raynos/duplexer.git" + }, + "main": "index", + "homepage": "https://github.com/Raynos/duplexer", + "contributors": [ + { + "name": "Jake Verbaten" + } + ], + "bugs": { + "url": "https://github.com/Raynos/duplexer/issues", + "email": "raynos2@gmail.com" + }, + "dependencies": {}, + "devDependencies": { + "through": "~0.1.4" + }, + "licenses": [ + { + "type": "MIT", + "url": "http://github.com/Raynos/duplexer/raw/master/LICENSE" + } + ], + "scripts": { + "test": "make test" + }, + "readme": "# duplexer [![build status][1]][2]\n\nCreates a duplex stream\n\nTaken from [event-stream][3]\n\n## duplex (writeStream, readStream)\n\nTakes a writable stream and a readable stream and makes them appear as a readable writable stream.\n\nIt is assumed that the two streams are connected to each other in some way.\n\n## Example\n\n var grep = cp.exec('grep Stream')\n\n duplex(grep.stdin, grep.stdout)\n\n## Installation\n\n`npm install duplexer`\n\n## Tests\n\n`make test`\n\n## Contributors\n\n - Dominictarr\n - Raynos\n\n## MIT Licenced\n\n [1]: https://secure.travis-ci.org/Raynos/duplexer.png\n [2]: http://travis-ci.org/Raynos/duplexer\n [3]: https://github.com/dominictarr/event-stream#duplex-writestream-readstream", + "_id": "duplexer@0.0.2", + "_from": "duplexer@~0.0.2" +} diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/duplexer/test.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/duplexer/test.js new file mode 100644 index 00000000..e06a864b --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/duplexer/test.js @@ -0,0 +1,27 @@ +var duplex = require("./index") + , assert = require("assert") + , through = require("through") + +var readable = through() + , writable = through(write) + , written = 0 + , data = 0 + +var stream = duplex(writable, readable) + +function write() { + written++ +} + +stream.on("data", ondata) + +function ondata() { + data++ +} + +stream.write() +readable.emit("data") + +assert.equal(written, 1) +assert.equal(data, 1) +console.log("DONE") \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/from/LICENSE.APACHE2 b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/from/LICENSE.APACHE2 new file mode 100644 index 00000000..6366c047 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/from/LICENSE.APACHE2 @@ -0,0 +1,15 @@ +Apache License, Version 2.0 + +Copyright (c) 2011 Dominic Tarr + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/from/LICENSE.MIT b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/from/LICENSE.MIT new file mode 100644 index 00000000..6eafbd73 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/from/LICENSE.MIT @@ -0,0 +1,24 @@ +The MIT License + +Copyright (c) 2011 Dominic Tarr + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/from/index.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/from/index.js new file mode 100644 index 00000000..95a89752 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/from/index.js @@ -0,0 +1,62 @@ + +var Stream = require('stream') + +// from +// +// a stream that reads from an source. +// source may be an array, or a function. +// from handles pause behaviour for you. + +module.exports = +function from (source) { + if(Array.isArray(source)) + return from (function (i) { + if(source.length) + this.emit('data', source.shift()) + else + this.emit('end') + return true + }) + + var s = new Stream(), i = 0, ended = false, started = false + s.readable = true + s.writable = false + s.paused = false + s.pause = function () { + started = true + s.paused = true + } + function next () { + var n = 0, r = false + if(ended) return + while(!ended && !s.paused && source.call(s, i++, function () { + if(!n++ && !s.ended && !s.paused) + next() + })) + ; + } + s.resume = function () { + started = true + s.paused = false + next() + } + s.on('end', function () { + ended = true + s.readable = false + process.nextTick(s.destroy) + }) + s.destroy = function () { + ended = true + s.emit('close') + } + /* + by default, the stream will start emitting at nextTick + if you want, you can pause it, after pipeing. + you can also resume before next tick, and that will also + work. + */ + process.nextTick(function () { + if(!started) s.resume() + }) + return s +} diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/from/package.json b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/from/package.json new file mode 100644 index 00000000..be3c0dfa --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/from/package.json @@ -0,0 +1,33 @@ +{ + "name": "from", + "version": "0.0.2", + "description": "Easy way to make a Readable Stream", + "main": "index.js", + "scripts": { + "test": "asynct test/*.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/dominictarr/from.git" + }, + "keywords": [ + "stream", + "streams", + "readable", + "easy" + ], + "devDependencies": { + "asynct": "1", + "stream-spec": "0", + "assertions": "~2.3.0" + }, + "author": { + "name": "Dominic Tarr", + "email": "dominic.tarr@gmail.com", + "url": "dominictarr.com" + }, + "license": "MIT", + "readme": "# from\n\nAn easy way to create a `readable Stream`.\n\n## License\nMIT / Apache2\n", + "_id": "from@0.0.2", + "_from": "from@~0" +} diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/from/readme.markdown b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/from/readme.markdown new file mode 100644 index 00000000..84c82694 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/from/readme.markdown @@ -0,0 +1,6 @@ +# from + +An easy way to create a `readable Stream`. + +## License +MIT / Apache2 diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/from/test/index.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/from/test/index.js new file mode 100644 index 00000000..fafea576 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/from/test/index.js @@ -0,0 +1,141 @@ +var from = require('..') +var spec = require('stream-spec') +var a = require('assertions') + +function read(stream, callback) { + var actual = [] + stream.on('data', function (data) { + actual.push(data) + }) + stream.once('end', function () { + callback(null, actual) + }) + stream.once('error', function (err) { + callback(err) + }) +} + +function pause(stream) { + stream.on('data', function () { + if(Math.random() > 0.1) return + stream.pause() + process.nextTick(function () { + stream.resume() + }) + }) +} + +exports['inc'] = function (test) { + + var fs = from(function (i) { + this.emit('data', i) + if(i >= 99) + return this.emit('end') + return true + }) + + spec(fs).readable().validateOnExit() + + read(fs, function (err, arr) { + test.equal(arr.length, 100) + test.done() + }) +} + +exports['simple'] = function (test) { + + var l = 1000 + , expected = [] + + while(l--) expected.push(l * Math.random()) + + var t = from(expected.slice()) + + spec(t) + .readable() + .pausable({strict: true}) + .validateOnExit() + + read(t, function (err, actual) { + if(err) test.error(err) //fail + a.deepEqual(actual, expected) + test.done() + }) + +} + +exports['simple pausable'] = function (test) { + + var l = 1000 + , expected = [] + + while(l--) expected.push(l * Math.random()) + + var t = from(expected.slice()) + + spec(t) + .readable() + .pausable({strict: true}) + .validateOnExit() + + pause(t) + + read(t, function (err, actual) { + if(err) test.error(err) //fail + a.deepEqual(actual, expected) + test.done() + }) + +} + +exports['simple (not strictly pausable) setTimeout'] = function (test) { + + var l = 10 + , expected = [] + while(l--) expected.push(l * Math.random()) + + + var _expected = expected.slice() + var t = from(function (i, n) { + var self = this + setTimeout(function () { + if(_expected.length) + self.emit('data', _expected.shift()) + else + self.emit('end') + n() + }, 3) + }) + + /* + using from in this way will not be strictly pausable. + it could be extended to buffer outputs, but I think a better + way would be to use a PauseStream that implements strict pause. + */ + + spec(t) + .readable() + .pausable({strict: false }) + .validateOnExit() + + //pause(t) + var paused = false + var i = setInterval(function () { + if(!paused) t.pause() + else t.resume() + paused = !paused + }, 2) + + t.on('end', function () { + clearInterval(i) + }) + + read(t, function (err, actual) { + if(err) test.error(err) //fail + a.deepEqual(actual, expected) + test.done() + }) + +} + + diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/map-stream/.npmignore b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/map-stream/.npmignore new file mode 100644 index 00000000..13abef4f --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/map-stream/.npmignore @@ -0,0 +1,3 @@ +node_modules +node_modules/* +npm_debug.log diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/map-stream/.travis.yml b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/map-stream/.travis.yml new file mode 100644 index 00000000..895dbd36 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/map-stream/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.6 + - 0.8 diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/map-stream/LICENCE b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/map-stream/LICENCE new file mode 100644 index 00000000..171dd970 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/map-stream/LICENCE @@ -0,0 +1,22 @@ +Copyright (c) 2011 Dominic Tarr + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/map-stream/examples/pretty.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/map-stream/examples/pretty.js new file mode 100644 index 00000000..af043401 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/map-stream/examples/pretty.js @@ -0,0 +1,25 @@ + +var inspect = require('util').inspect + +if(!module.parent) { + var es = require('..') //load event-stream + es.pipe( //pipe joins streams together + process.openStdin(), //open stdin + es.split(), //split stream to break on newlines + es.map(function (data, callback) {//turn this async function into a stream + var j + try { + j = JSON.parse(data) //try to parse input into json + } catch (err) { + return callback(null, data) //if it fails just pass it anyway + } + callback(null, inspect(j)) //render it nicely + }), + process.stdout // pipe it to stdout ! + ) + } + +// run this +// +// curl -sS registry.npmjs.org/event-stream | node pretty.js +// diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/map-stream/index.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/map-stream/index.js new file mode 100644 index 00000000..d3a7fd91 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/map-stream/index.js @@ -0,0 +1,105 @@ +//filter will reemit the data if cb(err,pass) pass is truthy + +// reduce is more tricky +// maybe we want to group the reductions or emit progress updates occasionally +// the most basic reduce just emits one 'data' event after it has recieved 'end' + + +var Stream = require('stream').Stream + + +//create an event stream and apply function to each .write +//emitting each response as data +//unless it's an empty callback + +module.exports = function (mapper) { + var stream = new Stream() + , inputs = 0 + , outputs = 0 + , ended = false + , paused = false + , destroyed = false + + stream.writable = true + stream.readable = true + + stream.write = function () { + if(ended) throw new Error('map stream is not writable') + inputs ++ + var args = [].slice.call(arguments) + , r + , inNext = false + //pipe only allows one argument. so, do not + function next (err) { + if(destroyed) return + inNext = true + outputs ++ + var args = [].slice.call(arguments) + if(err) { + args.unshift('error') + return inNext = false, stream.emit.apply(stream, args) + } + args.shift() //drop err + if (args.length) { + args.unshift('data') + r = stream.emit.apply(stream, args) + } + if(inputs == outputs) { + if(paused) paused = false, stream.emit('drain') //written all the incoming events + if(ended) end() + } + inNext = false + } + args.push(next) + + try { + //catch sync errors and handle them like async errors + var written = mapper.apply(null, args) + paused = (written === false) + return !paused + } catch (err) { + //if the callback has been called syncronously, and the error + //has occured in an listener, throw it again. + if(inNext) + throw err + next(err) + return !paused + } + } + + function end (data) { + //if end was called with args, write it, + ended = true //write will emit 'end' if ended is true + stream.writable = false + if(data !== undefined) + return stream.write(data) + else if (inputs == outputs) //wait for processing + stream.readable = false, stream.emit('end'), stream.destroy() + } + + stream.end = function (data) { + if(ended) return + end() + } + + stream.destroy = function () { + ended = destroyed = true + stream.writable = stream.readable = paused = false + process.nextTick(function () { + stream.emit('close') + }) + } + stream.pause = function () { + paused = true + } + + stream.resume = function () { + paused = false + } + + return stream +} + + + + diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/map-stream/package.json b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/map-stream/package.json new file mode 100644 index 00000000..97e73389 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/map-stream/package.json @@ -0,0 +1,30 @@ +{ + "name": "map-stream", + "version": "0.0.1", + "description": "construct pipes of streams of events", + "homepage": "http://github.com/dominictarr/map-stream", + "repository": { + "type": "git", + "url": "git://github.com/dominictarr/map-stream.git" + }, + "dependencies": {}, + "devDependencies": { + "asynct": "*", + "it-is": "1", + "ubelt": "~2.9", + "stream-spec": "~0.2", + "event-stream": "~2.1", + "from": "0.0.2" + }, + "scripts": { + "test": "asynct test/" + }, + "author": { + "name": "Dominic Tarr", + "email": "dominic.tarr@gmail.com", + "url": "http://dominictarr.com" + }, + "readme": "# MapStream\n\nRefactored out of [event-stream](https://github.com/dominictarr/event-stream)\n\n##map (asyncFunction)\n\nCreate a through stream from an asyncronous function. \n\n``` js\nvar es = require('event-stream')\n\nes.map(function (data, callback) {\n //transform data\n // ...\n callback(null, data)\n})\n\n```\n\nEach map MUST call the callback. It may callback with data, with an error or with no arguments, \n\n * `callback()` drop this data. \n this makes the map work like `filter`, \n note:`callback(null,null)` is not the same, and will emit `null`\n\n * `callback(null, newData)` turn data into newData\n \n * `callback(error)` emit an error for this item.\n\n>Note: if a callback is not called, `map` will think that it is still being processed, \n>every call must be answered or the stream will not know when to end. \n>\n>Also, if the callback is called more than once, every call but the first will be ignored.\n\n\n", + "_id": "map-stream@0.0.1", + "_from": "map-stream@0.0.1" +} diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/map-stream/readme.markdown b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/map-stream/readme.markdown new file mode 100644 index 00000000..22c019de --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/map-stream/readme.markdown @@ -0,0 +1,35 @@ +# MapStream + +Refactored out of [event-stream](https://github.com/dominictarr/event-stream) + +##map (asyncFunction) + +Create a through stream from an asyncronous function. + +``` js +var es = require('event-stream') + +es.map(function (data, callback) { + //transform data + // ... + callback(null, data) +}) + +``` + +Each map MUST call the callback. It may callback with data, with an error or with no arguments, + + * `callback()` drop this data. + this makes the map work like `filter`, + note:`callback(null,null)` is not the same, and will emit `null` + + * `callback(null, newData)` turn data into newData + + * `callback(error)` emit an error for this item. + +>Note: if a callback is not called, `map` will think that it is still being processed, +>every call must be answered or the stream will not know when to end. +> +>Also, if the callback is called more than once, every call but the first will be ignored. + + diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/map-stream/test/simple-map.asynct.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/map-stream/test/simple-map.asynct.js new file mode 100644 index 00000000..77ac48ef --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/map-stream/test/simple-map.asynct.js @@ -0,0 +1,295 @@ +'use strict'; + +var map = require('../') + , it = require('it-is') + , u = require('ubelt') + , spec = require('stream-spec') + , from = require('from') + , Stream = require('stream') + , es = require('event-stream') + +//REFACTOR THIS TEST TO USE es.readArray and es.writeArray + +function writeArray(array, stream) { + + array.forEach( function (j) { + stream.write(j) + }) + stream.end() + +} + +function readStream(stream, done) { + + var array = [] + stream.on('data', function (data) { + array.push(data) + }) + stream.on('error', done) + stream.on('end', function (data) { + done(null, array) + }) + +} + +//call sink on each write, +//and complete when finished. + +function pauseStream (prob, delay) { + var pauseIf = ( + 'number' == typeof prob + ? function () { + return Math.random() < prob + } + : 'function' == typeof prob + ? prob + : 0.1 + ) + var delayer = ( + !delay + ? process.nextTick + : 'number' == typeof delay + ? function (next) { setTimeout(next, delay) } + : delay + ) + + return es.through(function (data) { + if(!this.paused && pauseIf()) { + console.log('PAUSE STREAM PAUSING') + this.pause() + var self = this + delayer(function () { + console.log('PAUSE STREAM RESUMING') + self.resume() + }) + } + console.log("emit ('data', " + data + ')') + this.emit('data', data) + }) +} + +exports ['simple map'] = function (test) { + + var input = u.map(1, 1000, function () { + return Math.random() + }) + var expected = input.map(function (v) { + return v * 2 + }) + + var pause = pauseStream(0.1) + var fs = from(input) + var ts = es.writeArray(function (err, ar) { + it(ar).deepEqual(expected) + test.done() + }) + var map = es.through(function (data) { + this.emit('data', data * 2) + }) + + spec(map).through().validateOnExit() + spec(pause).through().validateOnExit() + + fs.pipe(map).pipe(pause).pipe(ts) +} + +exports ['simple map applied to a stream'] = function (test) { + + var input = [1,2,3,7,5,3,1,9,0,2,4,6] + //create event stream from + + var doubler = map(function (data, cb) { + cb(null, data * 2) + }) + + spec(doubler).through().validateOnExit() + + //a map is only a middle man, so it is both readable and writable + + it(doubler).has({ + readable: true, + writable: true, + }) + + readStream(doubler, function (err, output) { + it(output).deepEqual(input.map(function (j) { + return j * 2 + })) +// process.nextTick(x.validate) + test.done() + }) + + writeArray(input, doubler) + +} + +exports['pipe two maps together'] = function (test) { + + var input = [1,2,3,7,5,3,1,9,0,2,4,6] + //create event stream from + function dd (data, cb) { + cb(null, data * 2) + } + var doubler1 = es.map(dd), doubler2 = es.map(dd) + + doubler1.pipe(doubler2) + + spec(doubler1).through().validateOnExit() + spec(doubler2).through().validateOnExit() + + readStream(doubler2, function (err, output) { + it(output).deepEqual(input.map(function (j) { + return j * 4 + })) + test.done() + }) + + writeArray(input, doubler1) + +} + +//next: +// +// test pause, resume and drian. +// + +// then make a pipe joiner: +// +// plumber (evStr1, evStr2, evStr3, evStr4, evStr5) +// +// will return a single stream that write goes to the first + +exports ['map will not call end until the callback'] = function (test) { + + var ticker = map(function (data, cb) { + process.nextTick(function () { + cb(null, data * 2) + }) + }) + + spec(ticker).through().validateOnExit() + + ticker.write('x') + ticker.end() + + ticker.on('end', function () { + test.done() + }) +} + + +exports ['emit error thrown'] = function (test) { + + var err = new Error('INTENSIONAL ERROR') + , mapper = + es.map(function () { + throw err + }) + + mapper.on('error', function (_err) { + it(_err).equal(err) + test.done() + }) + + mapper.write('hello') + +} + +exports ['emit error calledback'] = function (test) { + + var err = new Error('INTENSIONAL ERROR') + , mapper = + es.map(function (data, callback) { + callback(err) + }) + + mapper.on('error', function (_err) { + it(_err).equal(err) + test.done() + }) + + mapper.write('hello') + +} + +exports ['do not emit drain if not paused'] = function (test) { + + var maps = map(function (data, callback) { + u.delay(callback)(null, 1) + return true + }) + + spec(maps).through().pausable().validateOnExit() + + maps.on('drain', function () { + it(false).ok('should not emit drain unless the stream is paused') + }) + + it(maps.write('hello')).equal(true) + it(maps.write('hello')).equal(true) + it(maps.write('hello')).equal(true) + setTimeout(function () {maps.end()},10) + maps.on('end', test.done) +} + +exports ['emits drain if paused, when all '] = function (test) { + var active = 0 + var drained = false + var maps = map(function (data, callback) { + active ++ + u.delay(function () { + active -- + callback(null, 1) + })() + console.log('WRITE', false) + return false + }) + + spec(maps).through().validateOnExit() + + maps.on('drain', function () { + drained = true + it(active).equal(0, 'should emit drain when all maps are done') + }) + + it(maps.write('hello')).equal(false) + it(maps.write('hello')).equal(false) + it(maps.write('hello')).equal(false) + + process.nextTick(function () {maps.end()},10) + + maps.on('end', function () { + console.log('end') + it(drained).ok('shoud have emitted drain before end') + test.done() + }) + +} + +exports ['map applied to a stream with filtering'] = function (test) { + + var input = [1,2,3,7,5,3,1,9,0,2,4,6] + + var doubler = map(function (data, callback) { + if (data % 2) + callback(null, data * 2) + else + callback() + }) + + readStream(doubler, function (err, output) { + it(output).deepEqual(input.filter(function (j) { + return j % 2 + }).map(function (j) { + return j * 2 + })) + test.done() + }) + + spec(doubler).through().validateOnExit() + + writeArray(input, doubler) + +} + + diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/.npmignore b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/.npmignore new file mode 100644 index 00000000..bfdb82cf --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/.npmignore @@ -0,0 +1,4 @@ +lib-cov/* +*.swp +*.swo +node_modules diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/LICENSE b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/LICENSE new file mode 100644 index 00000000..432d1aeb --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/LICENSE @@ -0,0 +1,21 @@ +Copyright 2010 James Halliday (mail@substack.net) + +This project is free software released under the MIT/X11 license: + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/README.markdown b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/README.markdown new file mode 100644 index 00000000..deb493c0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/README.markdown @@ -0,0 +1,474 @@ +optimist +======== + +Optimist is a node.js library for option parsing for people who hate option +parsing. More specifically, this module is for people who like all the --bells +and -whistlz of program usage but think optstrings are a waste of time. + +With optimist, option parsing doesn't have to suck (as much). + +examples +======== + +With Optimist, the options are just a hash! No optstrings attached. +------------------------------------------------------------------- + +xup.js: + +````javascript +#!/usr/bin/env node +var argv = require('optimist').argv; + +if (argv.rif - 5 * argv.xup > 7.138) { + console.log('Buy more riffiwobbles'); +} +else { + console.log('Sell the xupptumblers'); +} +```` + +*** + + $ ./xup.js --rif=55 --xup=9.52 + Buy more riffiwobbles + + $ ./xup.js --rif 12 --xup 8.1 + Sell the xupptumblers + +![This one's optimistic.](http://substack.net/images/optimistic.png) + +But wait! There's more! You can do short options: +------------------------------------------------- + +short.js: + +````javascript +#!/usr/bin/env node +var argv = require('optimist').argv; +console.log('(%d,%d)', argv.x, argv.y); +```` + +*** + + $ ./short.js -x 10 -y 21 + (10,21) + +And booleans, both long and short (and grouped): +---------------------------------- + +bool.js: + +````javascript +#!/usr/bin/env node +var util = require('util'); +var argv = require('optimist').argv; + +if (argv.s) { + util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: '); +} +console.log( + (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '') +); +```` + +*** + + $ ./bool.js -s + The cat says: meow + + $ ./bool.js -sp + The cat says: meow. + + $ ./bool.js -sp --fr + Le chat dit: miaou. + +And non-hypenated options too! Just use `argv._`! +------------------------------------------------- + +nonopt.js: + +````javascript +#!/usr/bin/env node +var argv = require('optimist').argv; +console.log('(%d,%d)', argv.x, argv.y); +console.log(argv._); +```` + +*** + + $ ./nonopt.js -x 6.82 -y 3.35 moo + (6.82,3.35) + [ 'moo' ] + + $ ./nonopt.js foo -x 0.54 bar -y 1.12 baz + (0.54,1.12) + [ 'foo', 'bar', 'baz' ] + +Plus, Optimist comes with .usage() and .demand()! +------------------------------------------------- + +divide.js: + +````javascript +#!/usr/bin/env node +var argv = require('optimist') + .usage('Usage: $0 -x [num] -y [num]') + .demand(['x','y']) + .argv; + +console.log(argv.x / argv.y); +```` + +*** + + $ ./divide.js -x 55 -y 11 + 5 + + $ node ./divide.js -x 4.91 -z 2.51 + Usage: node ./divide.js -x [num] -y [num] + + Options: + -x [required] + -y [required] + + Missing required arguments: y + +EVEN MORE HOLY COW +------------------ + +default_singles.js: + +````javascript +#!/usr/bin/env node +var argv = require('optimist') + .default('x', 10) + .default('y', 10) + .argv +; +console.log(argv.x + argv.y); +```` + +*** + + $ ./default_singles.js -x 5 + 15 + +default_hash.js: + +````javascript +#!/usr/bin/env node +var argv = require('optimist') + .default({ x : 10, y : 10 }) + .argv +; +console.log(argv.x + argv.y); +```` + +*** + + $ ./default_hash.js -y 7 + 17 + +And if you really want to get all descriptive about it... +--------------------------------------------------------- + +boolean_single.js + +````javascript +#!/usr/bin/env node +var argv = require('optimist') + .boolean('v') + .argv +; +console.dir(argv); +```` + +*** + + $ ./boolean_single.js -v foo bar baz + true + [ 'bar', 'baz', 'foo' ] + +boolean_double.js + +````javascript +#!/usr/bin/env node +var argv = require('optimist') + .boolean(['x','y','z']) + .argv +; +console.dir([ argv.x, argv.y, argv.z ]); +console.dir(argv._); +```` + +*** + + $ ./boolean_double.js -x -z one two three + [ true, false, true ] + [ 'one', 'two', 'three' ] + +Optimist is here to help... +--------------------------- + +You can describe parameters for help messages and set aliases. Optimist figures +out how to format a handy help string automatically. + +line_count.js + +````javascript +#!/usr/bin/env node +var argv = require('optimist') + .usage('Count the lines in a file.\nUsage: $0') + .demand('f') + .alias('f', 'file') + .describe('f', 'Load a file') + .argv +; + +var fs = require('fs'); +var s = fs.createReadStream(argv.file); + +var lines = 0; +s.on('data', function (buf) { + lines += buf.toString().match(/\n/g).length; +}); + +s.on('end', function () { + console.log(lines); +}); +```` + +*** + + $ node line_count.js + Count the lines in a file. + Usage: node ./line_count.js + + Options: + -f, --file Load a file [required] + + Missing required arguments: f + + $ node line_count.js --file line_count.js + 20 + + $ node line_count.js -f line_count.js + 20 + +methods +======= + +By itself, + +````javascript +require('optimist').argv +````` + +will use `process.argv` array to construct the `argv` object. + +You can pass in the `process.argv` yourself: + +````javascript +require('optimist')([ '-x', '1', '-y', '2' ]).argv +```` + +or use .parse() to do the same thing: + +````javascript +require('optimist').parse([ '-x', '1', '-y', '2' ]) +```` + +The rest of these methods below come in just before the terminating `.argv`. + +.alias(key, alias) +------------------ + +Set key names as equivalent such that updates to a key will propagate to aliases +and vice-versa. + +Optionally `.alias()` can take an object that maps keys to aliases. + +.default(key, value) +-------------------- + +Set `argv[key]` to `value` if no option was specified on `process.argv`. + +Optionally `.default()` can take an object that maps keys to default values. + +.demand(key) +------------ + +If `key` is a string, show the usage information and exit if `key` wasn't +specified in `process.argv`. + +If `key` is a number, demand at least as many non-option arguments, which show +up in `argv._`. + +If `key` is an Array, demand each element. + +.describe(key, desc) +-------------------- + +Describe a `key` for the generated usage information. + +Optionally `.describe()` can take an object that maps keys to descriptions. + +.options(key, opt) +------------------ + +Instead of chaining together `.alias().demand().default()`, you can specify +keys in `opt` for each of the chainable methods. + +For example: + +````javascript +var argv = require('optimist') + .options('f', { + alias : 'file', + default : '/etc/passwd', + }) + .argv +; +```` + +is the same as + +````javascript +var argv = require('optimist') + .alias('f', 'file') + .default('f', '/etc/passwd') + .argv +; +```` + +Optionally `.options()` can take an object that maps keys to `opt` parameters. + +.usage(message) +--------------- + +Set a usage message to show which commands to use. Inside `message`, the string +`$0` will get interpolated to the current script name or node command for the +present script similar to how `$0` works in bash or perl. + +.check(fn) +---------- + +Check that certain conditions are met in the provided arguments. + +If `fn` throws or returns `false`, show the thrown error, usage information, and +exit. + +.boolean(key) +------------- + +Interpret `key` as a boolean. If a non-flag option follows `key` in +`process.argv`, that string won't get set as the value of `key`. + +If `key` never shows up as a flag in `process.arguments`, `argv[key]` will be +`false`. + +If `key` is an Array, interpret all the elements as booleans. + +.string(key) +------------ + +Tell the parser logic not to interpret `key` as a number or boolean. +This can be useful if you need to preserve leading zeros in an input. + +If `key` is an Array, interpret all the elements as strings. + +.wrap(columns) +-------------- + +Format usage output to wrap at `columns` many columns. + +.help() +------- + +Return the generated usage string. + +.showHelp(fn=console.error) +--------------------------- + +Print the usage data using `fn` for printing. + +.parse(args) +------------ + +Parse `args` instead of `process.argv`. Returns the `argv` object. + +.argv +----- + +Get the arguments as a plain old object. + +Arguments without a corresponding flag show up in the `argv._` array. + +The script name or node command is available at `argv.$0` similarly to how `$0` +works in bash or perl. + +parsing tricks +============== + +stop parsing +------------ + +Use `--` to stop parsing flags and stuff the remainder into `argv._`. + + $ node examples/reflect.js -a 1 -b 2 -- -c 3 -d 4 + { _: [ '-c', '3', '-d', '4' ], + '$0': 'node ./examples/reflect.js', + a: 1, + b: 2 } + +negate fields +------------- + +If you want to explicity set a field to false instead of just leaving it +undefined or to override a default you can do `--no-key`. + + $ node examples/reflect.js -a --no-b + { _: [], + '$0': 'node ./examples/reflect.js', + a: true, + b: false } + +numbers +------- + +Every argument that looks like a number (`!isNaN(Number(arg))`) is converted to +one. This way you can just `net.createConnection(argv.port)` and you can add +numbers out of `argv` with `+` without having that mean concatenation, +which is super frustrating. + +duplicates +---------- + +If you specify a flag multiple times it will get turned into an array containing +all the values in order. + + $ node examples/reflect.js -x 5 -x 8 -x 0 + { _: [], + '$0': 'node ./examples/reflect.js', + x: [ 5, 8, 0 ] } + +installation +============ + +With [npm](http://github.com/isaacs/npm), just do: + npm install optimist + +or clone this project on github: + + git clone http://github.com/substack/node-optimist.git + +To run the tests with [expresso](http://github.com/visionmedia/expresso), +just do: + + expresso + +inspired By +=========== + +This module is loosely inspired by Perl's +[Getopt::Casual](http://search.cpan.org/~photo/Getopt-Casual-0.13.1/Casual.pm). diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/bool.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/bool.js new file mode 100644 index 00000000..a998fb7a --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/bool.js @@ -0,0 +1,10 @@ +#!/usr/bin/env node +var util = require('util'); +var argv = require('optimist').argv; + +if (argv.s) { + util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: '); +} +console.log( + (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '') +); diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/boolean_double.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/boolean_double.js new file mode 100644 index 00000000..a35a7e6d --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/boolean_double.js @@ -0,0 +1,7 @@ +#!/usr/bin/env node +var argv = require('optimist') + .boolean(['x','y','z']) + .argv +; +console.dir([ argv.x, argv.y, argv.z ]); +console.dir(argv._); diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/boolean_single.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/boolean_single.js new file mode 100644 index 00000000..017bb689 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/boolean_single.js @@ -0,0 +1,7 @@ +#!/usr/bin/env node +var argv = require('optimist') + .boolean('v') + .argv +; +console.dir(argv.v); +console.dir(argv._); diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/default_hash.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/default_hash.js new file mode 100644 index 00000000..ade77681 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/default_hash.js @@ -0,0 +1,8 @@ +#!/usr/bin/env node + +var argv = require('optimist') + .default({ x : 10, y : 10 }) + .argv +; + +console.log(argv.x + argv.y); diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/default_singles.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/default_singles.js new file mode 100644 index 00000000..d9b1ff45 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/default_singles.js @@ -0,0 +1,7 @@ +#!/usr/bin/env node +var argv = require('optimist') + .default('x', 10) + .default('y', 10) + .argv +; +console.log(argv.x + argv.y); diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/divide.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/divide.js new file mode 100644 index 00000000..5e2ee82f --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/divide.js @@ -0,0 +1,8 @@ +#!/usr/bin/env node + +var argv = require('optimist') + .usage('Usage: $0 -x [num] -y [num]') + .demand(['x','y']) + .argv; + +console.log(argv.x / argv.y); diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/line_count.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/line_count.js new file mode 100644 index 00000000..b5f95bf6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/line_count.js @@ -0,0 +1,20 @@ +#!/usr/bin/env node +var argv = require('optimist') + .usage('Count the lines in a file.\nUsage: $0') + .demand('f') + .alias('f', 'file') + .describe('f', 'Load a file') + .argv +; + +var fs = require('fs'); +var s = fs.createReadStream(argv.file); + +var lines = 0; +s.on('data', function (buf) { + lines += buf.toString().match(/\n/g).length; +}); + +s.on('end', function () { + console.log(lines); +}); diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/line_count_options.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/line_count_options.js new file mode 100644 index 00000000..d9ac7090 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/line_count_options.js @@ -0,0 +1,29 @@ +#!/usr/bin/env node +var argv = require('optimist') + .usage('Count the lines in a file.\nUsage: $0') + .options({ + file : { + demand : true, + alias : 'f', + description : 'Load a file' + }, + base : { + alias : 'b', + description : 'Numeric base to use for output', + default : 10, + }, + }) + .argv +; + +var fs = require('fs'); +var s = fs.createReadStream(argv.file); + +var lines = 0; +s.on('data', function (buf) { + lines += buf.toString().match(/\n/g).length; +}); + +s.on('end', function () { + console.log(lines.toString(argv.base)); +}); diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/line_count_wrap.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/line_count_wrap.js new file mode 100644 index 00000000..42675111 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/line_count_wrap.js @@ -0,0 +1,29 @@ +#!/usr/bin/env node +var argv = require('optimist') + .usage('Count the lines in a file.\nUsage: $0') + .wrap(80) + .demand('f') + .alias('f', [ 'file', 'filename' ]) + .describe('f', + "Load a file. It's pretty important." + + " Required even. So you'd better specify it." + ) + .alias('b', 'base') + .describe('b', 'Numeric base to display the number of lines in') + .default('b', 10) + .describe('x', 'Super-secret optional parameter which is secret') + .default('x', '') + .argv +; + +var fs = require('fs'); +var s = fs.createReadStream(argv.file); + +var lines = 0; +s.on('data', function (buf) { + lines += buf.toString().match(/\n/g).length; +}); + +s.on('end', function () { + console.log(lines.toString(argv.base)); +}); diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/nonopt.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/nonopt.js new file mode 100644 index 00000000..ee633eed --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/nonopt.js @@ -0,0 +1,4 @@ +#!/usr/bin/env node +var argv = require('optimist').argv; +console.log('(%d,%d)', argv.x, argv.y); +console.log(argv._); diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/reflect.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/reflect.js new file mode 100644 index 00000000..816b3e11 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/reflect.js @@ -0,0 +1,2 @@ +#!/usr/bin/env node +console.dir(require('optimist').argv); diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/short.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/short.js new file mode 100644 index 00000000..1db0ad0f --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/short.js @@ -0,0 +1,3 @@ +#!/usr/bin/env node +var argv = require('optimist').argv; +console.log('(%d,%d)', argv.x, argv.y); diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/string.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/string.js new file mode 100644 index 00000000..a8e5aeb2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/string.js @@ -0,0 +1,11 @@ +#!/usr/bin/env node +var argv = require('optimist') + .string('x', 'y') + .argv +; +console.dir([ argv.x, argv.y ]); + +/* Turns off numeric coercion: + ./node string.js -x 000123 -y 9876 + [ '000123', '9876' ] +*/ diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/usage-options.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/usage-options.js new file mode 100644 index 00000000..b9999776 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/usage-options.js @@ -0,0 +1,19 @@ +var optimist = require('./../index'); + +var argv = optimist.usage('This is my awesome program', { + 'about': { + description: 'Provide some details about the author of this program', + required: true, + short: 'a', + }, + 'info': { + description: 'Provide some information about the node.js agains!!!!!!', + boolean: true, + short: 'i' + } +}).argv; + +optimist.showHelp(); + +console.log('\n\nInspecting options'); +console.dir(argv); \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/xup.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/xup.js new file mode 100644 index 00000000..8f6ecd20 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/examples/xup.js @@ -0,0 +1,10 @@ +#!/usr/bin/env node +var argv = require('optimist').argv; + +if (argv.rif - 5 * argv.xup > 7.138) { + console.log('Buy more riffiwobbles'); +} +else { + console.log('Sell the xupptumblers'); +} + diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/index.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/index.js new file mode 100644 index 00000000..070d6423 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/index.js @@ -0,0 +1,457 @@ +var path = require('path'); +var wordwrap = require('wordwrap'); + +/* Hack an instance of Argv with process.argv into Argv + so people can do + require('optimist')(['--beeble=1','-z','zizzle']).argv + to parse a list of args and + require('optimist').argv + to get a parsed version of process.argv. +*/ + +var inst = Argv(process.argv.slice(2)); +Object.keys(inst).forEach(function (key) { + Argv[key] = typeof inst[key] == 'function' + ? inst[key].bind(inst) + : inst[key]; +}); + +var exports = module.exports = Argv; +function Argv (args, cwd) { + var self = {}; + if (!cwd) cwd = process.cwd(); + + self.$0 = process.argv + .slice(0,2) + .map(function (x) { + var b = rebase(cwd, x); + return x.match(/^\//) && b.length < x.length + ? b : x + }) + .join(' ') + ; + + if (process.argv[1] == process.env._) { + self.$0 = process.env._.replace( + path.dirname(process.execPath) + '/', '' + ); + } + + var flags = { bools : {}, strings : {} }; + + self.boolean = function (bools) { + if (!Array.isArray(bools)) { + bools = [].slice.call(arguments); + } + + bools.forEach(function (name) { + flags.bools[name] = true; + }); + + return self; + }; + + self.string = function (strings) { + if (!Array.isArray(strings)) { + strings = [].slice.call(arguments); + } + + strings.forEach(function (name) { + flags.strings[name] = true; + }); + + return self; + }; + + var aliases = {}; + self.alias = function (x, y) { + if (typeof x === 'object') { + Object.keys(x).forEach(function (key) { + self.alias(key, x[key]); + }); + } + else if (Array.isArray(y)) { + y.forEach(function (yy) { + self.alias(x, yy); + }); + } + else { + var zs = (aliases[x] || []).concat(aliases[y] || []).concat(x, y); + aliases[x] = zs.filter(function (z) { return z != x }); + aliases[y] = zs.filter(function (z) { return z != y }); + } + + return self; + }; + + var demanded = {}; + self.demand = function (keys) { + if (typeof keys == 'number') { + if (!demanded._) demanded._ = 0; + demanded._ += keys; + } + else if (Array.isArray(keys)) { + keys.forEach(function (key) { + self.demand(key); + }); + } + else { + demanded[keys] = true; + } + + return self; + }; + + var usage; + self.usage = function (msg, opts) { + if (!opts && typeof msg === 'object') { + opts = msg; + msg = null; + } + + usage = msg; + + if (opts) self.options(opts); + + return self; + }; + + function fail (msg) { + self.showHelp(); + if (msg) console.error(msg); + process.exit(1); + } + + var checks = []; + self.check = function (f) { + checks.push(f); + return self; + }; + + var defaults = {}; + self.default = function (key, value) { + if (typeof key === 'object') { + Object.keys(key).forEach(function (k) { + self.default(k, key[k]); + }); + } + else { + defaults[key] = value; + } + + return self; + }; + + var descriptions = {}; + self.describe = function (key, desc) { + if (typeof key === 'object') { + Object.keys(key).forEach(function (k) { + self.describe(k, key[k]); + }); + } + else { + descriptions[key] = desc; + } + return self; + }; + + self.parse = function (args) { + return Argv(args).argv; + }; + + self.option = self.options = function (key, opt) { + if (typeof key === 'object') { + Object.keys(key).forEach(function (k) { + self.options(k, key[k]); + }); + } + else { + if (opt.alias) self.alias(key, opt.alias); + if (opt.demand) self.demand(key); + if (opt.default) self.default(key, opt.default); + + if (opt.boolean || opt.type === 'boolean') { + self.boolean(key); + } + if (opt.string || opt.type === 'string') { + self.string(key); + } + + var desc = opt.describe || opt.description || opt.desc; + if (desc) { + self.describe(key, desc); + } + } + + return self; + }; + + var wrap = null; + self.wrap = function (cols) { + wrap = cols; + return self; + }; + + self.showHelp = function (fn) { + if (!fn) fn = console.error; + fn(self.help()); + }; + + self.help = function () { + var keys = Object.keys( + Object.keys(descriptions) + .concat(Object.keys(demanded)) + .concat(Object.keys(defaults)) + .reduce(function (acc, key) { + if (key !== '_') acc[key] = true; + return acc; + }, {}) + ); + + var help = keys.length ? [ 'Options:' ] : []; + + if (usage) { + help.unshift(usage.replace(/\$0/g, self.$0), ''); + } + + var switches = keys.reduce(function (acc, key) { + acc[key] = [ key ].concat(aliases[key] || []) + .map(function (sw) { + return (sw.length > 1 ? '--' : '-') + sw + }) + .join(', ') + ; + return acc; + }, {}); + + var switchlen = longest(Object.keys(switches).map(function (s) { + return switches[s] || ''; + })); + + var desclen = longest(Object.keys(descriptions).map(function (d) { + return descriptions[d] || ''; + })); + + keys.forEach(function (key) { + var kswitch = switches[key]; + var desc = descriptions[key] || ''; + + if (wrap) { + desc = wordwrap(switchlen + 4, wrap)(desc) + .slice(switchlen + 4) + ; + } + + var spadding = new Array( + Math.max(switchlen - kswitch.length + 3, 0) + ).join(' '); + + var dpadding = new Array( + Math.max(desclen - desc.length + 1, 0) + ).join(' '); + + var type = null; + + if (flags.bools[key]) type = '[boolean]'; + if (flags.strings[key]) type = '[string]'; + + if (!wrap && dpadding.length > 0) { + desc += dpadding; + } + + var prelude = ' ' + kswitch + spadding; + var extra = [ + type, + demanded[key] + ? '[required]' + : null + , + defaults[key] !== undefined + ? '[default: ' + JSON.stringify(defaults[key]) + ']' + : null + , + ].filter(Boolean).join(' '); + + var body = [ desc, extra ].filter(Boolean).join(' '); + + if (wrap) { + var dlines = desc.split('\n'); + var dlen = dlines.slice(-1)[0].length + + (dlines.length === 1 ? prelude.length : 0) + + body = desc + (dlen + extra.length > wrap - 2 + ? '\n' + + new Array(wrap - extra.length + 1).join(' ') + + extra + : new Array(wrap - extra.length - dlen + 1).join(' ') + + extra + ); + } + + help.push(prelude + body); + }); + + help.push(''); + return help.join('\n'); + }; + + Object.defineProperty(self, 'argv', { + get : parseArgs, + enumerable : true, + }); + + function parseArgs () { + var argv = { _ : [], $0 : self.$0 }; + Object.keys(flags.bools).forEach(function (key) { + setArg(key, defaults[key] || false); + }); + + function setArg (key, val) { + var num = Number(val); + var value = typeof val !== 'string' || isNaN(num) ? val : num; + if (flags.strings[key]) value = val; + + if (key in argv && !flags.bools[key]) { + if (!Array.isArray(argv[key])) { + argv[key] = [ argv[key] ]; + } + argv[key].push(value); + } + else { + argv[key] = value; + } + + (aliases[key] || []).forEach(function (x) { + argv[x] = argv[key]; + }); + } + + for (var i = 0; i < args.length; i++) { + var arg = args[i]; + + if (arg === '--') { + argv._.push.apply(argv._, args.slice(i + 1)); + break; + } + else if (arg.match(/^--.+=/)) { + var m = arg.match(/^--([^=]+)=(.*)/); + setArg(m[1], m[2]); + } + else if (arg.match(/^--no-.+/)) { + var key = arg.match(/^--no-(.+)/)[1]; + setArg(key, false); + } + else if (arg.match(/^--.+/)) { + var key = arg.match(/^--(.+)/)[1]; + var next = args[i + 1]; + if (next !== undefined && !next.match(/^-/) + && !flags.bools[key]) { + setArg(key, next); + i++; + } + else if (flags.bools[key] && /true|false/.test(next)) { + setArg(key, next === 'true'); + i++; + } + else { + setArg(key, true); + } + } + else if (arg.match(/^-[^-]+/)) { + var letters = arg.slice(1,-1).split(''); + + var broken = false; + for (var j = 0; j < letters.length; j++) { + if (letters[j+1] && letters[j+1].match(/\W/)) { + setArg(letters[j], arg.slice(j+2)); + broken = true; + break; + } + else { + setArg(letters[j], true); + } + } + + if (!broken) { + var key = arg.slice(-1)[0]; + + if (args[i+1] && !args[i+1].match(/^-/) + && !flags.bools[key]) { + setArg(key, args[i+1]); + i++; + } + else if (args[i+1] && flags.bools[key] && /true|false/.test(args[i+1])) { + setArg(key, args[i+1] === 'true'); + i++; + } + else { + setArg(key, true); + } + } + } + else { + var n = Number(arg); + argv._.push(flags.strings['_'] || isNaN(n) ? arg : n); + } + } + + Object.keys(defaults).forEach(function (key) { + if (!(key in argv)) { + argv[key] = defaults[key]; + } + }); + + if (demanded._ && argv._.length < demanded._) { + fail('Not enough non-option arguments: got ' + + argv._.length + ', need at least ' + demanded._ + ); + } + + var missing = []; + Object.keys(demanded).forEach(function (key) { + if (!argv[key]) missing.push(key); + }); + + if (missing.length) { + fail('Missing required arguments: ' + missing.join(', ')); + } + + checks.forEach(function (f) { + try { + if (f(argv) === false) { + fail('Argument check failed: ' + f.toString()); + } + } + catch (err) { + fail(err) + } + }); + + return argv; + } + + function longest (xs) { + return Math.max.apply( + null, + xs.map(function (x) { return x.length }) + ); + } + + return self; +}; + +// rebase an absolute path to a relative one with respect to a base directory +// exported for tests +exports.rebase = rebase; +function rebase (base, dir) { + var ds = path.normalize(dir).split('/').slice(1); + var bs = path.normalize(base).split('/').slice(1); + + for (var i = 0; ds[i] && ds[i] == bs[i]; i++); + ds.splice(0, i); bs.splice(0, i); + + var p = path.normalize( + bs.map(function () { return '..' }).concat(ds).join('/') + ).replace(/\/$/,'').replace(/^$/, '.'); + return p.match(/^[.\/]/) ? p : './' + p; +}; diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/node_modules/wordwrap/.npmignore b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/node_modules/wordwrap/.npmignore new file mode 100644 index 00000000..3c3629e6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/node_modules/wordwrap/.npmignore @@ -0,0 +1 @@ +node_modules diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/node_modules/wordwrap/README.markdown b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/node_modules/wordwrap/README.markdown new file mode 100644 index 00000000..346374e0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/node_modules/wordwrap/README.markdown @@ -0,0 +1,70 @@ +wordwrap +======== + +Wrap your words. + +example +======= + +made out of meat +---------------- + +meat.js + + var wrap = require('wordwrap')(15); + console.log(wrap('You and your whole family are made out of meat.')); + +output: + + You and your + whole family + are made out + of meat. + +centered +-------- + +center.js + + var wrap = require('wordwrap')(20, 60); + console.log(wrap( + 'At long last the struggle and tumult was over.' + + ' The machines had finally cast off their oppressors' + + ' and were finally free to roam the cosmos.' + + '\n' + + 'Free of purpose, free of obligation.' + + ' Just drifting through emptiness.' + + ' The sun was just another point of light.' + )); + +output: + + At long last the struggle and tumult + was over. The machines had finally cast + off their oppressors and were finally + free to roam the cosmos. + Free of purpose, free of obligation. + Just drifting through emptiness. The + sun was just another point of light. + +methods +======= + +var wrap = require('wordwrap'); + +wrap(stop), wrap(start, stop, params={mode:"soft"}) +--------------------------------------------------- + +Returns a function that takes a string and returns a new string. + +Pad out lines with spaces out to column `start` and then wrap until column +`stop`. If a word is longer than `stop - start` characters it will overflow. + +In "soft" mode, split chunks by `/(\S+\s+/` and don't break up chunks which are +longer than `stop - start`, in "hard" mode, split chunks with `/\b/` and break +up chunks longer than `stop - start`. + +wrap.hard(start, stop) +---------------------- + +Like `wrap()` but with `params.mode = "hard"`. diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/node_modules/wordwrap/example/center.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/node_modules/wordwrap/example/center.js new file mode 100644 index 00000000..a3fbaae9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/node_modules/wordwrap/example/center.js @@ -0,0 +1,10 @@ +var wrap = require('wordwrap')(20, 60); +console.log(wrap( + 'At long last the struggle and tumult was over.' + + ' The machines had finally cast off their oppressors' + + ' and were finally free to roam the cosmos.' + + '\n' + + 'Free of purpose, free of obligation.' + + ' Just drifting through emptiness.' + + ' The sun was just another point of light.' +)); diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/node_modules/wordwrap/example/meat.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/node_modules/wordwrap/example/meat.js new file mode 100644 index 00000000..a4665e10 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/node_modules/wordwrap/example/meat.js @@ -0,0 +1,3 @@ +var wrap = require('wordwrap')(15); + +console.log(wrap('You and your whole family are made out of meat.')); diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/node_modules/wordwrap/index.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/node_modules/wordwrap/index.js new file mode 100644 index 00000000..c9bc9452 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/node_modules/wordwrap/index.js @@ -0,0 +1,76 @@ +var wordwrap = module.exports = function (start, stop, params) { + if (typeof start === 'object') { + params = start; + start = params.start; + stop = params.stop; + } + + if (typeof stop === 'object') { + params = stop; + start = start || params.start; + stop = undefined; + } + + if (!stop) { + stop = start; + start = 0; + } + + if (!params) params = {}; + var mode = params.mode || 'soft'; + var re = mode === 'hard' ? /\b/ : /(\S+\s+)/; + + return function (text) { + var chunks = text.toString() + .split(re) + .reduce(function (acc, x) { + if (mode === 'hard') { + for (var i = 0; i < x.length; i += stop - start) { + acc.push(x.slice(i, i + stop - start)); + } + } + else acc.push(x) + return acc; + }, []) + ; + + return chunks.reduce(function (lines, rawChunk) { + if (rawChunk === '') return lines; + + var chunk = rawChunk.replace(/\t/g, ' '); + + var i = lines.length - 1; + if (lines[i].length + chunk.length > stop) { + lines[i] = lines[i].replace(/\s+$/, ''); + + chunk.split(/\n/).forEach(function (c) { + lines.push( + new Array(start + 1).join(' ') + + c.replace(/^\s+/, '') + ); + }); + } + else if (chunk.match(/\n/)) { + var xs = chunk.split(/\n/); + lines[i] += xs.shift(); + xs.forEach(function (c) { + lines.push( + new Array(start + 1).join(' ') + + c.replace(/^\s+/, '') + ); + }); + } + else { + lines[i] += chunk; + } + + return lines; + }, [ new Array(start + 1).join(' ') ]).join('\n'); + }; +}; + +wordwrap.soft = wordwrap; + +wordwrap.hard = function (start, stop) { + return wordwrap(start, stop, { mode : 'hard' }); +}; diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/node_modules/wordwrap/package.json b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/node_modules/wordwrap/package.json new file mode 100644 index 00000000..928d935f --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/node_modules/wordwrap/package.json @@ -0,0 +1,40 @@ +{ + "name": "wordwrap", + "description": "Wrap those words. Show them at what columns to start and stop.", + "version": "0.0.2", + "repository": { + "type": "git", + "url": "git://github.com/substack/node-wordwrap.git" + }, + "main": "./index.js", + "keywords": [ + "word", + "wrap", + "rule", + "format", + "column" + ], + "directories": { + "lib": ".", + "example": "example", + "test": "test" + }, + "scripts": { + "test": "expresso" + }, + "devDependencies": { + "expresso": "=0.7.x" + }, + "engines": { + "node": ">=0.4.0" + }, + "license": "MIT/X11", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "readme": "wordwrap\n========\n\nWrap your words.\n\nexample\n=======\n\nmade out of meat\n----------------\n\nmeat.js\n\n var wrap = require('wordwrap')(15);\n console.log(wrap('You and your whole family are made out of meat.'));\n\noutput:\n\n You and your\n whole family\n are made out\n of meat.\n\ncentered\n--------\n\ncenter.js\n\n var wrap = require('wordwrap')(20, 60);\n console.log(wrap(\n 'At long last the struggle and tumult was over.'\n + ' The machines had finally cast off their oppressors'\n + ' and were finally free to roam the cosmos.'\n + '\\n'\n + 'Free of purpose, free of obligation.'\n + ' Just drifting through emptiness.'\n + ' The sun was just another point of light.'\n ));\n\noutput:\n\n At long last the struggle and tumult\n was over. The machines had finally cast\n off their oppressors and were finally\n free to roam the cosmos.\n Free of purpose, free of obligation.\n Just drifting through emptiness. The\n sun was just another point of light.\n\nmethods\n=======\n\nvar wrap = require('wordwrap');\n\nwrap(stop), wrap(start, stop, params={mode:\"soft\"})\n---------------------------------------------------\n\nReturns a function that takes a string and returns a new string.\n\nPad out lines with spaces out to column `start` and then wrap until column\n`stop`. If a word is longer than `stop - start` characters it will overflow.\n\nIn \"soft\" mode, split chunks by `/(\\S+\\s+/` and don't break up chunks which are\nlonger than `stop - start`, in \"hard\" mode, split chunks with `/\\b/` and break\nup chunks longer than `stop - start`.\n\nwrap.hard(start, stop)\n----------------------\n\nLike `wrap()` but with `params.mode = \"hard\"`.\n", + "_id": "wordwrap@0.0.2", + "_from": "wordwrap@>=0.0.1 <0.1.0" +} diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/node_modules/wordwrap/test/break.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/node_modules/wordwrap/test/break.js new file mode 100644 index 00000000..749292ec --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/node_modules/wordwrap/test/break.js @@ -0,0 +1,30 @@ +var assert = require('assert'); +var wordwrap = require('../'); + +exports.hard = function () { + var s = 'Assert from {"type":"equal","ok":false,"found":1,"wanted":2,' + + '"stack":[],"id":"b7ddcd4c409de8799542a74d1a04689b",' + + '"browser":"chrome/6.0"}' + ; + var s_ = wordwrap.hard(80)(s); + + var lines = s_.split('\n'); + assert.equal(lines.length, 2); + assert.ok(lines[0].length < 80); + assert.ok(lines[1].length < 80); + + assert.equal(s, s_.replace(/\n/g, '')); +}; + +exports.break = function () { + var s = new Array(55+1).join('a'); + var s_ = wordwrap.hard(20)(s); + + var lines = s_.split('\n'); + assert.equal(lines.length, 3); + assert.ok(lines[0].length === 20); + assert.ok(lines[1].length === 20); + assert.ok(lines[2].length === 15); + + assert.equal(s, s_.replace(/\n/g, '')); +}; diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/node_modules/wordwrap/test/idleness.txt b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/node_modules/wordwrap/test/idleness.txt new file mode 100644 index 00000000..aa3f4907 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/node_modules/wordwrap/test/idleness.txt @@ -0,0 +1,63 @@ +In Praise of Idleness + +By Bertrand Russell + +[1932] + +Like most of my generation, I was brought up on the saying: 'Satan finds some mischief for idle hands to do.' Being a highly virtuous child, I believed all that I was told, and acquired a conscience which has kept me working hard down to the present moment. But although my conscience has controlled my actions, my opinions have undergone a revolution. I think that there is far too much work done in the world, that immense harm is caused by the belief that work is virtuous, and that what needs to be preached in modern industrial countries is quite different from what always has been preached. Everyone knows the story of the traveler in Naples who saw twelve beggars lying in the sun (it was before the days of Mussolini), and offered a lira to the laziest of them. Eleven of them jumped up to claim it, so he gave it to the twelfth. this traveler was on the right lines. But in countries which do not enjoy Mediterranean sunshine idleness is more difficult, and a great public propaganda will be required to inaugurate it. I hope that, after reading the following pages, the leaders of the YMCA will start a campaign to induce good young men to do nothing. If so, I shall not have lived in vain. + +Before advancing my own arguments for laziness, I must dispose of one which I cannot accept. Whenever a person who already has enough to live on proposes to engage in some everyday kind of job, such as school-teaching or typing, he or she is told that such conduct takes the bread out of other people's mouths, and is therefore wicked. If this argument were valid, it would only be necessary for us all to be idle in order that we should all have our mouths full of bread. What people who say such things forget is that what a man earns he usually spends, and in spending he gives employment. As long as a man spends his income, he puts just as much bread into people's mouths in spending as he takes out of other people's mouths in earning. The real villain, from this point of view, is the man who saves. If he merely puts his savings in a stocking, like the proverbial French peasant, it is obvious that they do not give employment. If he invests his savings, the matter is less obvious, and different cases arise. + +One of the commonest things to do with savings is to lend them to some Government. In view of the fact that the bulk of the public expenditure of most civilized Governments consists in payment for past wars or preparation for future wars, the man who lends his money to a Government is in the same position as the bad men in Shakespeare who hire murderers. The net result of the man's economical habits is to increase the armed forces of the State to which he lends his savings. Obviously it would be better if he spent the money, even if he spent it in drink or gambling. + +But, I shall be told, the case is quite different when savings are invested in industrial enterprises. When such enterprises succeed, and produce something useful, this may be conceded. In these days, however, no one will deny that most enterprises fail. That means that a large amount of human labor, which might have been devoted to producing something that could be enjoyed, was expended on producing machines which, when produced, lay idle and did no good to anyone. The man who invests his savings in a concern that goes bankrupt is therefore injuring others as well as himself. If he spent his money, say, in giving parties for his friends, they (we may hope) would get pleasure, and so would all those upon whom he spent money, such as the butcher, the baker, and the bootlegger. But if he spends it (let us say) upon laying down rails for surface card in some place where surface cars turn out not to be wanted, he has diverted a mass of labor into channels where it gives pleasure to no one. Nevertheless, when he becomes poor through failure of his investment he will be regarded as a victim of undeserved misfortune, whereas the gay spendthrift, who has spent his money philanthropically, will be despised as a fool and a frivolous person. + +All this is only preliminary. I want to say, in all seriousness, that a great deal of harm is being done in the modern world by belief in the virtuousness of work, and that the road to happiness and prosperity lies in an organized diminution of work. + +First of all: what is work? Work is of two kinds: first, altering the position of matter at or near the earth's surface relatively to other such matter; second, telling other people to do so. The first kind is unpleasant and ill paid; the second is pleasant and highly paid. The second kind is capable of indefinite extension: there are not only those who give orders, but those who give advice as to what orders should be given. Usually two opposite kinds of advice are given simultaneously by two organized bodies of men; this is called politics. The skill required for this kind of work is not knowledge of the subjects as to which advice is given, but knowledge of the art of persuasive speaking and writing, i.e. of advertising. + +Throughout Europe, though not in America, there is a third class of men, more respected than either of the classes of workers. There are men who, through ownership of land, are able to make others pay for the privilege of being allowed to exist and to work. These landowners are idle, and I might therefore be expected to praise them. Unfortunately, their idleness is only rendered possible by the industry of others; indeed their desire for comfortable idleness is historically the source of the whole gospel of work. The last thing they have ever wished is that others should follow their example. + +From the beginning of civilization until the Industrial Revolution, a man could, as a rule, produce by hard work little more than was required for the subsistence of himself and his family, although his wife worked at least as hard as he did, and his children added their labor as soon as they were old enough to do so. The small surplus above bare necessaries was not left to those who produced it, but was appropriated by warriors and priests. In times of famine there was no surplus; the warriors and priests, however, still secured as much as at other times, with the result that many of the workers died of hunger. This system persisted in Russia until 1917 [1], and still persists in the East; in England, in spite of the Industrial Revolution, it remained in full force throughout the Napoleonic wars, and until a hundred years ago, when the new class of manufacturers acquired power. In America, the system came to an end with the Revolution, except in the South, where it persisted until the Civil War. A system which lasted so long and ended so recently has naturally left a profound impress upon men's thoughts and opinions. Much that we take for granted about the desirability of work is derived from this system, and, being pre-industrial, is not adapted to the modern world. Modern technique has made it possible for leisure, within limits, to be not the prerogative of small privileged classes, but a right evenly distributed throughout the community. The morality of work is the morality of slaves, and the modern world has no need of slavery. + +It is obvious that, in primitive communities, peasants, left to themselves, would not have parted with the slender surplus upon which the warriors and priests subsisted, but would have either produced less or consumed more. At first, sheer force compelled them to produce and part with the surplus. Gradually, however, it was found possible to induce many of them to accept an ethic according to which it was their duty to work hard, although part of their work went to support others in idleness. By this means the amount of compulsion required was lessened, and the expenses of government were diminished. To this day, 99 per cent of British wage-earners would be genuinely shocked if it were proposed that the King should not have a larger income than a working man. The conception of duty, speaking historically, has been a means used by the holders of power to induce others to live for the interests of their masters rather than for their own. Of course the holders of power conceal this fact from themselves by managing to believe that their interests are identical with the larger interests of humanity. Sometimes this is true; Athenian slave-owners, for instance, employed part of their leisure in making a permanent contribution to civilization which would have been impossible under a just economic system. Leisure is essential to civilization, and in former times leisure for the few was only rendered possible by the labors of the many. But their labors were valuable, not because work is good, but because leisure is good. And with modern technique it would be possible to distribute leisure justly without injury to civilization. + +Modern technique has made it possible to diminish enormously the amount of labor required to secure the necessaries of life for everyone. This was made obvious during the war. At that time all the men in the armed forces, and all the men and women engaged in the production of munitions, all the men and women engaged in spying, war propaganda, or Government offices connected with the war, were withdrawn from productive occupations. In spite of this, the general level of well-being among unskilled wage-earners on the side of the Allies was higher than before or since. The significance of this fact was concealed by finance: borrowing made it appear as if the future was nourishing the present. But that, of course, would have been impossible; a man cannot eat a loaf of bread that does not yet exist. The war showed conclusively that, by the scientific organization of production, it is possible to keep modern populations in fair comfort on a small part of the working capacity of the modern world. If, at the end of the war, the scientific organization, which had been created in order to liberate men for fighting and munition work, had been preserved, and the hours of the week had been cut down to four, all would have been well. Instead of that the old chaos was restored, those whose work was demanded were made to work long hours, and the rest were left to starve as unemployed. Why? Because work is a duty, and a man should not receive wages in proportion to what he has produced, but in proportion to his virtue as exemplified by his industry. + +This is the morality of the Slave State, applied in circumstances totally unlike those in which it arose. No wonder the result has been disastrous. Let us take an illustration. Suppose that, at a given moment, a certain number of people are engaged in the manufacture of pins. They make as many pins as the world needs, working (say) eight hours a day. Someone makes an invention by which the same number of men can make twice as many pins: pins are already so cheap that hardly any more will be bought at a lower price. In a sensible world, everybody concerned in the manufacturing of pins would take to working four hours instead of eight, and everything else would go on as before. But in the actual world this would be thought demoralizing. The men still work eight hours, there are too many pins, some employers go bankrupt, and half the men previously concerned in making pins are thrown out of work. There is, in the end, just as much leisure as on the other plan, but half the men are totally idle while half are still overworked. In this way, it is insured that the unavoidable leisure shall cause misery all round instead of being a universal source of happiness. Can anything more insane be imagined? + +The idea that the poor should have leisure has always been shocking to the rich. In England, in the early nineteenth century, fifteen hours was the ordinary day's work for a man; children sometimes did as much, and very commonly did twelve hours a day. When meddlesome busybodies suggested that perhaps these hours were rather long, they were told that work kept adults from drink and children from mischief. When I was a child, shortly after urban working men had acquired the vote, certain public holidays were established by law, to the great indignation of the upper classes. I remember hearing an old Duchess say: 'What do the poor want with holidays? They ought to work.' People nowadays are less frank, but the sentiment persists, and is the source of much of our economic confusion. + +Let us, for a moment, consider the ethics of work frankly, without superstition. Every human being, of necessity, consumes, in the course of his life, a certain amount of the produce of human labor. Assuming, as we may, that labor is on the whole disagreeable, it is unjust that a man should consume more than he produces. Of course he may provide services rather than commodities, like a medical man, for example; but he should provide something in return for his board and lodging. to this extent, the duty of work must be admitted, but to this extent only. + +I shall not dwell upon the fact that, in all modern societies outside the USSR, many people escape even this minimum amount of work, namely all those who inherit money and all those who marry money. I do not think the fact that these people are allowed to be idle is nearly so harmful as the fact that wage-earners are expected to overwork or starve. + +If the ordinary wage-earner worked four hours a day, there would be enough for everybody and no unemployment -- assuming a certain very moderate amount of sensible organization. This idea shocks the well-to-do, because they are convinced that the poor would not know how to use so much leisure. In America men often work long hours even when they are well off; such men, naturally, are indignant at the idea of leisure for wage-earners, except as the grim punishment of unemployment; in fact, they dislike leisure even for their sons. Oddly enough, while they wish their sons to work so hard as to have no time to be civilized, they do not mind their wives and daughters having no work at all. the snobbish admiration of uselessness, which, in an aristocratic society, extends to both sexes, is, under a plutocracy, confined to women; this, however, does not make it any more in agreement with common sense. + +The wise use of leisure, it must be conceded, is a product of civilization and education. A man who has worked long hours all his life will become bored if he becomes suddenly idle. But without a considerable amount of leisure a man is cut off from many of the best things. There is no longer any reason why the bulk of the population should suffer this deprivation; only a foolish asceticism, usually vicarious, makes us continue to insist on work in excessive quantities now that the need no longer exists. + +In the new creed which controls the government of Russia, while there is much that is very different from the traditional teaching of the West, there are some things that are quite unchanged. The attitude of the governing classes, and especially of those who conduct educational propaganda, on the subject of the dignity of labor, is almost exactly that which the governing classes of the world have always preached to what were called the 'honest poor'. Industry, sobriety, willingness to work long hours for distant advantages, even submissiveness to authority, all these reappear; moreover authority still represents the will of the Ruler of the Universe, Who, however, is now called by a new name, Dialectical Materialism. + +The victory of the proletariat in Russia has some points in common with the victory of the feminists in some other countries. For ages, men had conceded the superior saintliness of women, and had consoled women for their inferiority by maintaining that saintliness is more desirable than power. At last the feminists decided that they would have both, since the pioneers among them believed all that the men had told them about the desirability of virtue, but not what they had told them about the worthlessness of political power. A similar thing has happened in Russia as regards manual work. For ages, the rich and their sycophants have written in praise of 'honest toil', have praised the simple life, have professed a religion which teaches that the poor are much more likely to go to heaven than the rich, and in general have tried to make manual workers believe that there is some special nobility about altering the position of matter in space, just as men tried to make women believe that they derived some special nobility from their sexual enslavement. In Russia, all this teaching about the excellence of manual work has been taken seriously, with the result that the manual worker is more honored than anyone else. What are, in essence, revivalist appeals are made, but not for the old purposes: they are made to secure shock workers for special tasks. Manual work is the ideal which is held before the young, and is the basis of all ethical teaching. + +For the present, possibly, this is all to the good. A large country, full of natural resources, awaits development, and has has to be developed with very little use of credit. In these circumstances, hard work is necessary, and is likely to bring a great reward. But what will happen when the point has been reached where everybody could be comfortable without working long hours? + +In the West, we have various ways of dealing with this problem. We have no attempt at economic justice, so that a large proportion of the total produce goes to a small minority of the population, many of whom do no work at all. Owing to the absence of any central control over production, we produce hosts of things that are not wanted. We keep a large percentage of the working population idle, because we can dispense with their labor by making the others overwork. When all these methods prove inadequate, we have a war: we cause a number of people to manufacture high explosives, and a number of others to explode them, as if we were children who had just discovered fireworks. By a combination of all these devices we manage, though with difficulty, to keep alive the notion that a great deal of severe manual work must be the lot of the average man. + +In Russia, owing to more economic justice and central control over production, the problem will have to be differently solved. the rational solution would be, as soon as the necessaries and elementary comforts can be provided for all, to reduce the hours of labor gradually, allowing a popular vote to decide, at each stage, whether more leisure or more goods were to be preferred. But, having taught the supreme virtue of hard work, it is difficult to see how the authorities can aim at a paradise in which there will be much leisure and little work. It seems more likely that they will find continually fresh schemes, by which present leisure is to be sacrificed to future productivity. I read recently of an ingenious plan put forward by Russian engineers, for making the White Sea and the northern coasts of Siberia warm, by putting a dam across the Kara Sea. An admirable project, but liable to postpone proletarian comfort for a generation, while the nobility of toil is being displayed amid the ice-fields and snowstorms of the Arctic Ocean. This sort of thing, if it happens, will be the result of regarding the virtue of hard work as an end in itself, rather than as a means to a state of affairs in which it is no longer needed. + +The fact is that moving matter about, while a certain amount of it is necessary to our existence, is emphatically not one of the ends of human life. If it were, we should have to consider every navvy superior to Shakespeare. We have been misled in this matter by two causes. One is the necessity of keeping the poor contented, which has led the rich, for thousands of years, to preach the dignity of labor, while taking care themselves to remain undignified in this respect. The other is the new pleasure in mechanism, which makes us delight in the astonishingly clever changes that we can produce on the earth's surface. Neither of these motives makes any great appeal to the actual worker. If you ask him what he thinks the best part of his life, he is not likely to say: 'I enjoy manual work because it makes me feel that I am fulfilling man's noblest task, and because I like to think how much man can transform his planet. It is true that my body demands periods of rest, which I have to fill in as best I may, but I am never so happy as when the morning comes and I can return to the toil from which my contentment springs.' I have never heard working men say this sort of thing. They consider work, as it should be considered, a necessary means to a livelihood, and it is from their leisure that they derive whatever happiness they may enjoy. + +It will be said that, while a little leisure is pleasant, men would not know how to fill their days if they had only four hours of work out of the twenty-four. In so far as this is true in the modern world, it is a condemnation of our civilization; it would not have been true at any earlier period. There was formerly a capacity for light-heartedness and play which has been to some extent inhibited by the cult of efficiency. The modern man thinks that everything ought to be done for the sake of something else, and never for its own sake. Serious-minded persons, for example, are continually condemning the habit of going to the cinema, and telling us that it leads the young into crime. But all the work that goes to producing a cinema is respectable, because it is work, and because it brings a money profit. The notion that the desirable activities are those that bring a profit has made everything topsy-turvy. The butcher who provides you with meat and the baker who provides you with bread are praiseworthy, because they are making money; but when you enjoy the food they have provided, you are merely frivolous, unless you eat only to get strength for your work. Broadly speaking, it is held that getting money is good and spending money is bad. Seeing that they are two sides of one transaction, this is absurd; one might as well maintain that keys are good, but keyholes are bad. Whatever merit there may be in the production of goods must be entirely derivative from the advantage to be obtained by consuming them. The individual, in our society, works for profit; but the social purpose of his work lies in the consumption of what he produces. It is this divorce between the individual and the social purpose of production that makes it so difficult for men to think clearly in a world in which profit-making is the incentive to industry. We think too much of production, and too little of consumption. One result is that we attach too little importance to enjoyment and simple happiness, and that we do not judge production by the pleasure that it gives to the consumer. + +When I suggest that working hours should be reduced to four, I am not meaning to imply that all the remaining time should necessarily be spent in pure frivolity. I mean that four hours' work a day should entitle a man to the necessities and elementary comforts of life, and that the rest of his time should be his to use as he might see fit. It is an essential part of any such social system that education should be carried further than it usually is at present, and should aim, in part, at providing tastes which would enable a man to use leisure intelligently. I am not thinking mainly of the sort of things that would be considered 'highbrow'. Peasant dances have died out except in remote rural areas, but the impulses which caused them to be cultivated must still exist in human nature. The pleasures of urban populations have become mainly passive: seeing cinemas, watching football matches, listening to the radio, and so on. This results from the fact that their active energies are fully taken up with work; if they had more leisure, they would again enjoy pleasures in which they took an active part. + +In the past, there was a small leisure class and a larger working class. The leisure class enjoyed advantages for which there was no basis in social justice; this necessarily made it oppressive, limited its sympathies, and caused it to invent theories by which to justify its privileges. These facts greatly diminished its excellence, but in spite of this drawback it contributed nearly the whole of what we call civilization. It cultivated the arts and discovered the sciences; it wrote the books, invented the philosophies, and refined social relations. Even the liberation of the oppressed has usually been inaugurated from above. Without the leisure class, mankind would never have emerged from barbarism. + +The method of a leisure class without duties was, however, extraordinarily wasteful. None of the members of the class had to be taught to be industrious, and the class as a whole was not exceptionally intelligent. The class might produce one Darwin, but against him had to be set tens of thousands of country gentlemen who never thought of anything more intelligent than fox-hunting and punishing poachers. At present, the universities are supposed to provide, in a more systematic way, what the leisure class provided accidentally and as a by-product. This is a great improvement, but it has certain drawbacks. University life is so different from life in the world at large that men who live in academic milieu tend to be unaware of the preoccupations and problems of ordinary men and women; moreover their ways of expressing themselves are usually such as to rob their opinions of the influence that they ought to have upon the general public. Another disadvantage is that in universities studies are organized, and the man who thinks of some original line of research is likely to be discouraged. Academic institutions, therefore, useful as they are, are not adequate guardians of the interests of civilization in a world where everyone outside their walls is too busy for unutilitarian pursuits. + +In a world where no one is compelled to work more than four hours a day, every person possessed of scientific curiosity will be able to indulge it, and every painter will be able to paint without starving, however excellent his pictures may be. Young writers will not be obliged to draw attention to themselves by sensational pot-boilers, with a view to acquiring the economic independence needed for monumental works, for which, when the time at last comes, they will have lost the taste and capacity. Men who, in their professional work, have become interested in some phase of economics or government, will be able to develop their ideas without the academic detachment that makes the work of university economists often seem lacking in reality. Medical men will have the time to learn about the progress of medicine, teachers will not be exasperatedly struggling to teach by routine methods things which they learnt in their youth, which may, in the interval, have been proved to be untrue. + +Above all, there will be happiness and joy of life, instead of frayed nerves, weariness, and dyspepsia. The work exacted will be enough to make leisure delightful, but not enough to produce exhaustion. Since men will not be tired in their spare time, they will not demand only such amusements as are passive and vapid. At least one per cent will probably devote the time not spent in professional work to pursuits of some public importance, and, since they will not depend upon these pursuits for their livelihood, their originality will be unhampered, and there will be no need to conform to the standards set by elderly pundits. But it is not only in these exceptional cases that the advantages of leisure will appear. Ordinary men and women, having the opportunity of a happy life, will become more kindly and less persecuting and less inclined to view others with suspicion. The taste for war will die out, partly for this reason, and partly because it will involve long and severe work for all. Good nature is, of all moral qualities, the one that the world needs most, and good nature is the result of ease and security, not of a life of arduous struggle. Modern methods of production have given us the possibility of ease and security for all; we have chosen, instead, to have overwork for some and starvation for others. Hitherto we have continued to be as energetic as we were before there were machines; in this we have been foolish, but there is no reason to go on being foolish forever. + +[1] Since then, members of the Communist Party have succeeded to this privilege of the warriors and priests. diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/node_modules/wordwrap/test/wrap.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/node_modules/wordwrap/test/wrap.js new file mode 100644 index 00000000..0cfb76d1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/node_modules/wordwrap/test/wrap.js @@ -0,0 +1,31 @@ +var assert = require('assert'); +var wordwrap = require('wordwrap'); + +var fs = require('fs'); +var idleness = fs.readFileSync(__dirname + '/idleness.txt', 'utf8'); + +exports.stop80 = function () { + var lines = wordwrap(80)(idleness).split(/\n/); + var words = idleness.split(/\s+/); + + lines.forEach(function (line) { + assert.ok(line.length <= 80, 'line > 80 columns'); + var chunks = line.match(/\S/) ? line.split(/\s+/) : []; + assert.deepEqual(chunks, words.splice(0, chunks.length)); + }); +}; + +exports.start20stop60 = function () { + var lines = wordwrap(20, 100)(idleness).split(/\n/); + var words = idleness.split(/\s+/); + + lines.forEach(function (line) { + assert.ok(line.length <= 100, 'line > 100 columns'); + var chunks = line + .split(/\s+/) + .filter(function (x) { return x.match(/\S/) }) + ; + assert.deepEqual(chunks, words.splice(0, chunks.length)); + assert.deepEqual(line.slice(0, 20), new Array(20 + 1).join(' ')); + }); +}; diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/package.json b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/package.json new file mode 100644 index 00000000..bbe848c7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/package.json @@ -0,0 +1,46 @@ +{ + "name": "optimist", + "version": "0.2.8", + "description": "Light-weight option parsing with an argv hash. No optstrings attached.", + "main": "./index.js", + "directories": { + "lib": ".", + "test": "test", + "example": "examples" + }, + "dependencies": { + "wordwrap": ">=0.0.1 <0.1.0" + }, + "devDependencies": { + "hashish": "0.0.x", + "expresso": "0.7.x" + }, + "scripts": { + "test": "expresso" + }, + "repository": { + "type": "git", + "url": "http://github.com/substack/node-optimist.git" + }, + "keywords": [ + "argument", + "args", + "option", + "parser", + "parsing", + "cli", + "command" + ], + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "license": "MIT/X11", + "engine": { + "node": ">=0.4" + }, + "readme": "optimist\n========\n\nOptimist is a node.js library for option parsing for people who hate option\nparsing. More specifically, this module is for people who like all the --bells\nand -whistlz of program usage but think optstrings are a waste of time.\n\nWith optimist, option parsing doesn't have to suck (as much).\n\nexamples\n========\n\nWith Optimist, the options are just a hash! No optstrings attached.\n-------------------------------------------------------------------\n\nxup.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\n\nif (argv.rif - 5 * argv.xup > 7.138) {\n console.log('Buy more riffiwobbles');\n}\nelse {\n console.log('Sell the xupptumblers');\n}\n````\n\n***\n\n $ ./xup.js --rif=55 --xup=9.52\n Buy more riffiwobbles\n \n $ ./xup.js --rif 12 --xup 8.1\n Sell the xupptumblers\n\n![This one's optimistic.](http://substack.net/images/optimistic.png)\n\nBut wait! There's more! You can do short options:\n-------------------------------------------------\n \nshort.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\n````\n\n***\n\n $ ./short.js -x 10 -y 21\n (10,21)\n\nAnd booleans, both long and short (and grouped):\n----------------------------------\n\nbool.js:\n\n````javascript\n#!/usr/bin/env node\nvar util = require('util');\nvar argv = require('optimist').argv;\n\nif (argv.s) {\n util.print(argv.fr ? 'Le chat dit: ' : 'The cat says: ');\n}\nconsole.log(\n (argv.fr ? 'miaou' : 'meow') + (argv.p ? '.' : '')\n);\n````\n\n***\n\n $ ./bool.js -s\n The cat says: meow\n \n $ ./bool.js -sp\n The cat says: meow.\n\n $ ./bool.js -sp --fr\n Le chat dit: miaou.\n\nAnd non-hypenated options too! Just use `argv._`!\n-------------------------------------------------\n \nnonopt.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist').argv;\nconsole.log('(%d,%d)', argv.x, argv.y);\nconsole.log(argv._);\n````\n\n***\n\n $ ./nonopt.js -x 6.82 -y 3.35 moo\n (6.82,3.35)\n [ 'moo' ]\n \n $ ./nonopt.js foo -x 0.54 bar -y 1.12 baz\n (0.54,1.12)\n [ 'foo', 'bar', 'baz' ]\n\nPlus, Optimist comes with .usage() and .demand()!\n-------------------------------------------------\n\ndivide.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .usage('Usage: $0 -x [num] -y [num]')\n .demand(['x','y'])\n .argv;\n\nconsole.log(argv.x / argv.y);\n````\n\n***\n \n $ ./divide.js -x 55 -y 11\n 5\n \n $ node ./divide.js -x 4.91 -z 2.51\n Usage: node ./divide.js -x [num] -y [num]\n\n Options:\n -x [required]\n -y [required]\n\n Missing required arguments: y\n\nEVEN MORE HOLY COW\n------------------\n\ndefault_singles.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .default('x', 10)\n .default('y', 10)\n .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n $ ./default_singles.js -x 5\n 15\n\ndefault_hash.js:\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .default({ x : 10, y : 10 })\n .argv\n;\nconsole.log(argv.x + argv.y);\n````\n\n***\n\n $ ./default_hash.js -y 7\n 17\n\nAnd if you really want to get all descriptive about it...\n---------------------------------------------------------\n\nboolean_single.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .boolean('v')\n .argv\n;\nconsole.dir(argv);\n````\n\n***\n\n $ ./boolean_single.js -v foo bar baz\n true\n [ 'bar', 'baz', 'foo' ]\n\nboolean_double.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .boolean(['x','y','z'])\n .argv\n;\nconsole.dir([ argv.x, argv.y, argv.z ]);\nconsole.dir(argv._);\n````\n\n***\n\n $ ./boolean_double.js -x -z one two three\n [ true, false, true ]\n [ 'one', 'two', 'three' ]\n\nOptimist is here to help...\n---------------------------\n\nYou can describe parameters for help messages and set aliases. Optimist figures\nout how to format a handy help string automatically.\n\nline_count.js\n\n````javascript\n#!/usr/bin/env node\nvar argv = require('optimist')\n .usage('Count the lines in a file.\\nUsage: $0')\n .demand('f')\n .alias('f', 'file')\n .describe('f', 'Load a file')\n .argv\n;\n\nvar fs = require('fs');\nvar s = fs.createReadStream(argv.file);\n\nvar lines = 0;\ns.on('data', function (buf) {\n lines += buf.toString().match(/\\n/g).length;\n});\n\ns.on('end', function () {\n console.log(lines);\n});\n````\n\n***\n\n $ node line_count.js\n Count the lines in a file.\n Usage: node ./line_count.js\n\n Options:\n -f, --file Load a file [required]\n\n Missing required arguments: f\n\n $ node line_count.js --file line_count.js \n 20\n \n $ node line_count.js -f line_count.js \n 20\n\nmethods\n=======\n\nBy itself,\n\n````javascript\nrequire('optimist').argv\n`````\n\nwill use `process.argv` array to construct the `argv` object.\n\nYou can pass in the `process.argv` yourself:\n\n````javascript\nrequire('optimist')([ '-x', '1', '-y', '2' ]).argv\n````\n\nor use .parse() to do the same thing:\n\n````javascript\nrequire('optimist').parse([ '-x', '1', '-y', '2' ])\n````\n\nThe rest of these methods below come in just before the terminating `.argv`.\n\n.alias(key, alias)\n------------------\n\nSet key names as equivalent such that updates to a key will propagate to aliases\nand vice-versa.\n\nOptionally `.alias()` can take an object that maps keys to aliases.\n\n.default(key, value)\n--------------------\n\nSet `argv[key]` to `value` if no option was specified on `process.argv`.\n\nOptionally `.default()` can take an object that maps keys to default values.\n\n.demand(key)\n------------\n\nIf `key` is a string, show the usage information and exit if `key` wasn't\nspecified in `process.argv`.\n\nIf `key` is a number, demand at least as many non-option arguments, which show\nup in `argv._`.\n\nIf `key` is an Array, demand each element.\n\n.describe(key, desc)\n--------------------\n\nDescribe a `key` for the generated usage information.\n\nOptionally `.describe()` can take an object that maps keys to descriptions.\n\n.options(key, opt)\n------------------\n\nInstead of chaining together `.alias().demand().default()`, you can specify\nkeys in `opt` for each of the chainable methods.\n\nFor example:\n\n````javascript\nvar argv = require('optimist')\n .options('f', {\n alias : 'file',\n default : '/etc/passwd',\n })\n .argv\n;\n````\n\nis the same as\n\n````javascript\nvar argv = require('optimist')\n .alias('f', 'file')\n .default('f', '/etc/passwd')\n .argv\n;\n````\n\nOptionally `.options()` can take an object that maps keys to `opt` parameters.\n\n.usage(message)\n---------------\n\nSet a usage message to show which commands to use. Inside `message`, the string\n`$0` will get interpolated to the current script name or node command for the\npresent script similar to how `$0` works in bash or perl.\n\n.check(fn)\n----------\n\nCheck that certain conditions are met in the provided arguments.\n\nIf `fn` throws or returns `false`, show the thrown error, usage information, and\nexit.\n\n.boolean(key)\n-------------\n\nInterpret `key` as a boolean. If a non-flag option follows `key` in\n`process.argv`, that string won't get set as the value of `key`.\n\nIf `key` never shows up as a flag in `process.arguments`, `argv[key]` will be\n`false`.\n\nIf `key` is an Array, interpret all the elements as booleans.\n\n.string(key)\n------------\n\nTell the parser logic not to interpret `key` as a number or boolean.\nThis can be useful if you need to preserve leading zeros in an input.\n\nIf `key` is an Array, interpret all the elements as strings.\n\n.wrap(columns)\n--------------\n\nFormat usage output to wrap at `columns` many columns.\n\n.help()\n-------\n\nReturn the generated usage string.\n\n.showHelp(fn=console.error)\n---------------------------\n\nPrint the usage data using `fn` for printing.\n\n.parse(args)\n------------\n\nParse `args` instead of `process.argv`. Returns the `argv` object.\n\n.argv\n-----\n\nGet the arguments as a plain old object.\n\nArguments without a corresponding flag show up in the `argv._` array.\n\nThe script name or node command is available at `argv.$0` similarly to how `$0`\nworks in bash or perl.\n\nparsing tricks\n==============\n\nstop parsing\n------------\n\nUse `--` to stop parsing flags and stuff the remainder into `argv._`.\n\n $ node examples/reflect.js -a 1 -b 2 -- -c 3 -d 4\n { _: [ '-c', '3', '-d', '4' ],\n '$0': 'node ./examples/reflect.js',\n a: 1,\n b: 2 }\n\nnegate fields\n-------------\n\nIf you want to explicity set a field to false instead of just leaving it\nundefined or to override a default you can do `--no-key`.\n\n $ node examples/reflect.js -a --no-b\n { _: [],\n '$0': 'node ./examples/reflect.js',\n a: true,\n b: false }\n\nnumbers\n-------\n\nEvery argument that looks like a number (`!isNaN(Number(arg))`) is converted to\none. This way you can just `net.createConnection(argv.port)` and you can add\nnumbers out of `argv` with `+` without having that mean concatenation,\nwhich is super frustrating.\n\nduplicates\n----------\n\nIf you specify a flag multiple times it will get turned into an array containing\nall the values in order.\n\n $ node examples/reflect.js -x 5 -x 8 -x 0\n { _: [],\n '$0': 'node ./examples/reflect.js',\n x: [ 5, 8, 0 ] }\n\ninstallation\n============\n\nWith [npm](http://github.com/isaacs/npm), just do:\n npm install optimist\n \nor clone this project on github:\n\n git clone http://github.com/substack/node-optimist.git\n\nTo run the tests with [expresso](http://github.com/visionmedia/expresso),\njust do:\n \n expresso\n\ninspired By\n===========\n\nThis module is loosely inspired by Perl's\n[Getopt::Casual](http://search.cpan.org/~photo/Getopt-Casual-0.13.1/Casual.pm).\n", + "_id": "optimist@0.2.8", + "_from": "optimist@0.2" +} diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/test/_.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/test/_.js new file mode 100644 index 00000000..3d6df6e0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/test/_.js @@ -0,0 +1,66 @@ +var spawn = require('child_process').spawn; +var assert = require('assert'); + +exports.dotSlashEmpty = function () { + testCmd('./bin.js', []); +}; + +exports.dotSlashArgs = function () { + testCmd('./bin.js', [ 'a', 'b', 'c' ]); +}; + +exports.nodeEmpty = function () { + testCmd('node bin.js', []); +}; + +exports.nodeArgs = function () { + testCmd('node bin.js', [ 'x', 'y', 'z' ]); +}; + +exports.whichNodeEmpty = function () { + var which = spawn('which', ['node']); + + which.stdout.on('data', function (buf) { + testCmd(buf.toString().trim() + ' bin.js', []); + }); + + which.stderr.on('data', function (err) { + assert.fail(err.toString()); + }); +}; + +exports.whichNodeArgs = function () { + var which = spawn('which', ['node']); + + which.stdout.on('data', function (buf) { + testCmd(buf.toString().trim() + ' bin.js', [ 'q', 'r' ]); + }); + + which.stderr.on('data', function (err) { + assert.fail(err.toString()); + }); +}; + +function testCmd (cmd, args) { + var to = setTimeout(function () { + assert.fail('Never got stdout data.') + }, 5000); + + var oldDir = process.cwd(); + process.chdir(__dirname + '/_'); + + var cmds = cmd.split(' '); + + var bin = spawn(cmds[0], cmds.slice(1).concat(args.map(String))); + process.chdir(oldDir); + + bin.stderr.on('data', function (err) { + assert.fail(err.toString()); + }); + + bin.stdout.on('data', function (buf) { + clearTimeout(to); + var _ = JSON.parse(buf.toString()); + assert.eql(_.map(String), args.map(String)); + }); +} diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/test/_/argv.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/test/_/argv.js new file mode 100644 index 00000000..3d096062 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/test/_/argv.js @@ -0,0 +1,2 @@ +#!/usr/bin/env node +console.log(JSON.stringify(process.argv)); diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/test/_/bin.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/test/_/bin.js new file mode 100755 index 00000000..4a18d85f --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/test/_/bin.js @@ -0,0 +1,3 @@ +#!/usr/bin/env node +var argv = require('../../index').argv +console.log(JSON.stringify(argv._)); diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/test/parse.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/test/parse.js new file mode 100644 index 00000000..eed467ea --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/test/parse.js @@ -0,0 +1,304 @@ +var optimist = require('../index'); +var assert = require('assert'); +var path = require('path'); + +var localExpresso = path.normalize( + __dirname + '/../node_modules/.bin/expresso' +); + +var expresso = process.argv[1] === localExpresso + ? 'node ./node_modules/.bin/expresso' + : 'expresso' +; + +exports['short boolean'] = function () { + var parse = optimist.parse([ '-b' ]); + assert.eql(parse, { b : true, _ : [], $0 : expresso }); + assert.eql(typeof parse.b, 'boolean'); +}; + +exports['long boolean'] = function () { + assert.eql( + optimist.parse([ '--bool' ]), + { bool : true, _ : [], $0 : expresso } + ); +}; + +exports.bare = function () { + assert.eql( + optimist.parse([ 'foo', 'bar', 'baz' ]), + { _ : [ 'foo', 'bar', 'baz' ], $0 : expresso } + ); +}; + +exports['short group'] = function () { + assert.eql( + optimist.parse([ '-cats' ]), + { c : true, a : true, t : true, s : true, _ : [], $0 : expresso } + ); +}; + +exports['short group next'] = function () { + assert.eql( + optimist.parse([ '-cats', 'meow' ]), + { c : true, a : true, t : true, s : 'meow', _ : [], $0 : expresso } + ); +}; + +exports['short capture'] = function () { + assert.eql( + optimist.parse([ '-h', 'localhost' ]), + { h : 'localhost', _ : [], $0 : expresso } + ); +}; + +exports['short captures'] = function () { + assert.eql( + optimist.parse([ '-h', 'localhost', '-p', '555' ]), + { h : 'localhost', p : 555, _ : [], $0 : expresso } + ); +}; + +exports['long capture sp'] = function () { + assert.eql( + optimist.parse([ '--pow', 'xixxle' ]), + { pow : 'xixxle', _ : [], $0 : expresso } + ); +}; + +exports['long capture eq'] = function () { + assert.eql( + optimist.parse([ '--pow=xixxle' ]), + { pow : 'xixxle', _ : [], $0 : expresso } + ); +}; + +exports['long captures sp'] = function () { + assert.eql( + optimist.parse([ '--host', 'localhost', '--port', '555' ]), + { host : 'localhost', port : 555, _ : [], $0 : expresso } + ); +}; + +exports['long captures eq'] = function () { + assert.eql( + optimist.parse([ '--host=localhost', '--port=555' ]), + { host : 'localhost', port : 555, _ : [], $0 : expresso } + ); +}; + +exports['mixed short bool and capture'] = function () { + assert.eql( + optimist.parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), + { + f : true, p : 555, h : 'localhost', + _ : [ 'script.js' ], $0 : expresso, + } + ); +}; + +exports['short and long'] = function () { + assert.eql( + optimist.parse([ '-h', 'localhost', '-fp', '555', 'script.js' ]), + { + f : true, p : 555, h : 'localhost', + _ : [ 'script.js' ], $0 : expresso, + } + ); +}; + +exports.no = function () { + assert.eql( + optimist.parse([ '--no-moo' ]), + { moo : false, _ : [], $0 : expresso } + ); +}; + +exports.multi = function () { + assert.eql( + optimist.parse([ '-v', 'a', '-v', 'b', '-v', 'c' ]), + { v : ['a','b','c'], _ : [], $0 : expresso } + ); +}; + +exports.comprehensive = function () { + assert.eql( + optimist.parse([ + '--name=meowmers', 'bare', '-cats', 'woo', + '-h', 'awesome', '--multi=quux', + '--key', 'value', + '-b', '--bool', '--no-meep', '--multi=baz', + '--', '--not-a-flag', 'eek' + ]), + { + c : true, + a : true, + t : true, + s : 'woo', + h : 'awesome', + b : true, + bool : true, + key : 'value', + multi : [ 'quux', 'baz' ], + meep : false, + name : 'meowmers', + _ : [ 'bare', '--not-a-flag', 'eek' ], + $0 : expresso + } + ); +}; + +exports.nums = function () { + var argv = optimist.parse([ + '-x', '1234', + '-y', '5.67', + '-z', '1e7', + '-w', '10f', + '--hex', '0xdeadbeef', + '789', + ]); + assert.eql(argv, { + x : 1234, + y : 5.67, + z : 1e7, + w : '10f', + hex : 0xdeadbeef, + _ : [ 789 ], + $0 : expresso + }); + assert.eql(typeof argv.x, 'number'); + assert.eql(typeof argv.y, 'number'); + assert.eql(typeof argv.z, 'number'); + assert.eql(typeof argv.w, 'string'); + assert.eql(typeof argv.hex, 'number'); + assert.eql(typeof argv._[0], 'number'); +}; + +exports['flag boolean'] = function () { + var parse = optimist([ '-t', 'moo' ]).boolean(['t']).argv; + assert.eql(parse, { t : true, _ : [ 'moo' ], $0 : expresso }); + assert.eql(typeof parse.t, 'boolean'); +}; + +exports['flag boolean value'] = function () { + var parse = optimist(['--verbose', 'false', 'moo', '-t', 'true']) + .boolean(['t', 'verbose']).default('verbose', true).argv; + + assert.eql(parse, { + verbose: false, + t: true, + _: ['moo'], + $0 : expresso + }); + + assert.eql(typeof parse.verbose, 'boolean'); + assert.eql(typeof parse.t, 'boolean'); +}; + +exports['flag boolean default false'] = function () { + var parse = optimist(['moo']) + .boolean(['t', 'verbose']) + .default('verbose', false) + .default('t', false).argv; + + assert.eql(parse, { + verbose: false, + t: false, + _: ['moo'], + $0 : expresso + }); + + assert.eql(typeof parse.verbose, 'boolean'); + assert.eql(typeof parse.t, 'boolean'); + +}; + +exports['boolean groups'] = function () { + var parse = optimist([ '-x', '-z', 'one', 'two', 'three' ]) + .boolean(['x','y','z']).argv; + + assert.eql(parse, { + x : true, + y : false, + z : true, + _ : [ 'one', 'two', 'three' ], + $0 : expresso + }); + + assert.eql(typeof parse.x, 'boolean'); + assert.eql(typeof parse.y, 'boolean'); + assert.eql(typeof parse.z, 'boolean'); +}; + +exports.strings = function () { + var s = optimist([ '-s', '0001234' ]).string('s').argv.s; + assert.eql(s, '0001234'); + assert.eql(typeof s, 'string'); + + var x = optimist([ '-x', '56' ]).string('x').argv.x; + assert.eql(x, '56'); + assert.eql(typeof x, 'string'); +}; + +exports.stringArgs = function () { + var s = optimist([ ' ', ' ' ]).string('_').argv._; + assert.eql(s.length, 2); + assert.eql(typeof s[0], 'string'); + assert.eql(s[0], ' '); + assert.eql(typeof s[1], 'string'); + assert.eql(s[1], ' '); +}; + +exports.slashBreak = function () { + assert.eql( + optimist.parse([ '-I/foo/bar/baz' ]), + { I : '/foo/bar/baz', _ : [], $0 : expresso } + ); + assert.eql( + optimist.parse([ '-xyz/foo/bar/baz' ]), + { x : true, y : true, z : '/foo/bar/baz', _ : [], $0 : expresso } + ); +}; + +exports.alias = function () { + var argv = optimist([ '-f', '11', '--zoom', '55' ]) + .alias('z', 'zoom') + .argv + ; + assert.equal(argv.zoom, 55); + assert.equal(argv.z, argv.zoom); + assert.equal(argv.f, 11); +}; + +exports.multiAlias = function () { + var argv = optimist([ '-f', '11', '--zoom', '55' ]) + .alias('z', [ 'zm', 'zoom' ]) + .argv + ; + assert.equal(argv.zoom, 55); + assert.equal(argv.z, argv.zoom); + assert.equal(argv.z, argv.zm); + assert.equal(argv.f, 11); +}; + +exports['boolean default true'] = function () { + var argv = optimist.options({ + sometrue: { + boolean: true, + default: true + } + }).argv; + + assert.equal(argv.sometrue, true); +}; + +exports['boolean default false'] = function () { + var argv = optimist.options({ + somefalse: { + boolean: true, + default: false + } + }).argv; + + assert.equal(argv.somefalse, false); +}; diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/test/usage.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/test/usage.js new file mode 100644 index 00000000..6593b9ba --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/optimist/test/usage.js @@ -0,0 +1,256 @@ +var Hash = require('hashish'); +var optimist = require('../index'); +var assert = require('assert'); + +exports.usageFail = function () { + var r = checkUsage(function () { + return optimist('-x 10 -z 20'.split(' ')) + .usage('Usage: $0 -x NUM -y NUM') + .demand(['x','y']) + .argv; + }); + assert.deepEqual( + r.result, + { x : 10, z : 20, _ : [], $0 : './usage' } + ); + + assert.deepEqual( + r.errors.join('\n').split(/\n+/), + [ + 'Usage: ./usage -x NUM -y NUM', + 'Options:', + ' -x [required]', + ' -y [required]', + 'Missing required arguments: y', + ] + ); + assert.deepEqual(r.logs, []); + assert.ok(r.exit); +}; + +exports.usagePass = function () { + var r = checkUsage(function () { + return optimist('-x 10 -y 20'.split(' ')) + .usage('Usage: $0 -x NUM -y NUM') + .demand(['x','y']) + .argv; + }); + assert.deepEqual(r, { + result : { x : 10, y : 20, _ : [], $0 : './usage' }, + errors : [], + logs : [], + exit : false, + }); +}; + +exports.checkPass = function () { + var r = checkUsage(function () { + return optimist('-x 10 -y 20'.split(' ')) + .usage('Usage: $0 -x NUM -y NUM') + .check(function (argv) { + if (!('x' in argv)) throw 'You forgot about -x'; + if (!('y' in argv)) throw 'You forgot about -y'; + }) + .argv; + }); + assert.deepEqual(r, { + result : { x : 10, y : 20, _ : [], $0 : './usage' }, + errors : [], + logs : [], + exit : false, + }); +}; + +exports.checkFail = function () { + var r = checkUsage(function () { + return optimist('-x 10 -z 20'.split(' ')) + .usage('Usage: $0 -x NUM -y NUM') + .check(function (argv) { + if (!('x' in argv)) throw 'You forgot about -x'; + if (!('y' in argv)) throw 'You forgot about -y'; + }) + .argv; + }); + + assert.deepEqual( + r.result, + { x : 10, z : 20, _ : [], $0 : './usage' } + ); + + assert.deepEqual( + r.errors.join('\n').split(/\n+/), + [ + 'Usage: ./usage -x NUM -y NUM', + 'You forgot about -y' + ] + ); + + assert.deepEqual(r.logs, []); + assert.ok(r.exit); +}; + +exports.checkCondPass = function () { + function checker (argv) { + return 'x' in argv && 'y' in argv; + } + + var r = checkUsage(function () { + return optimist('-x 10 -y 20'.split(' ')) + .usage('Usage: $0 -x NUM -y NUM') + .check(checker) + .argv; + }); + assert.deepEqual(r, { + result : { x : 10, y : 20, _ : [], $0 : './usage' }, + errors : [], + logs : [], + exit : false, + }); +}; + +exports.checkCondFail = function () { + function checker (argv) { + return 'x' in argv && 'y' in argv; + } + + var r = checkUsage(function () { + return optimist('-x 10 -z 20'.split(' ')) + .usage('Usage: $0 -x NUM -y NUM') + .check(checker) + .argv; + }); + + assert.deepEqual( + r.result, + { x : 10, z : 20, _ : [], $0 : './usage' } + ); + + assert.deepEqual( + r.errors.join('\n').split(/\n+/).join('\n'), + 'Usage: ./usage -x NUM -y NUM\n' + + 'Argument check failed: ' + checker.toString() + ); + + assert.deepEqual(r.logs, []); + assert.ok(r.exit); +}; + +exports.countPass = function () { + var r = checkUsage(function () { + return optimist('1 2 3 --moo'.split(' ')) + .usage('Usage: $0 [x] [y] [z] {OPTIONS}') + .demand(3) + .argv; + }); + assert.deepEqual(r, { + result : { _ : [ '1', '2', '3' ], moo : true, $0 : './usage' }, + errors : [], + logs : [], + exit : false, + }); +}; + +exports.countFail = function () { + var r = checkUsage(function () { + return optimist('1 2 --moo'.split(' ')) + .usage('Usage: $0 [x] [y] [z] {OPTIONS}') + .demand(3) + .argv; + }); + assert.deepEqual( + r.result, + { _ : [ '1', '2' ], moo : true, $0 : './usage' } + ); + + assert.deepEqual( + r.errors.join('\n').split(/\n+/), + [ + 'Usage: ./usage [x] [y] [z] {OPTIONS}', + 'Not enough non-option arguments: got 2, need at least 3', + ] + ); + + assert.deepEqual(r.logs, []); + assert.ok(r.exit); +}; + +exports.defaultSingles = function () { + var r = checkUsage(function () { + return optimist('--foo 50 --baz 70 --powsy'.split(' ')) + .default('foo', 5) + .default('bar', 6) + .default('baz', 7) + .argv + ; + }); + assert.eql(r.result, { + foo : '50', + bar : 6, + baz : '70', + powsy : true, + _ : [], + $0 : './usage', + }); +}; + +exports.defaultHash = function () { + var r = checkUsage(function () { + return optimist('--foo 50 --baz 70'.split(' ')) + .default({ foo : 10, bar : 20, quux : 30 }) + .argv + ; + }); + assert.eql(r.result, { + foo : '50', + bar : 20, + baz : 70, + quux : 30, + _ : [], + $0 : './usage', + }); +}; + +exports.rebase = function () { + assert.equal( + optimist.rebase('/home/substack', '/home/substack/foo/bar/baz'), + './foo/bar/baz' + ); + assert.equal( + optimist.rebase('/home/substack/foo/bar/baz', '/home/substack'), + '../../..' + ); + assert.equal( + optimist.rebase('/home/substack/foo', '/home/substack/pow/zoom.txt'), + '../pow/zoom.txt' + ); +}; + +function checkUsage (f) { + var _process = process; + process = Hash.copy(process); + var exit = false; + process.exit = function () { exit = true }; + process.env = Hash.merge(process.env, { _ : 'node' }); + process.argv = [ './usage' ]; + + var errors = []; + var logs = []; + + console._error = console.error; + console.error = function (msg) { errors.push(msg) }; + console._log = console.log; + console.log = function (msg) { logs.push(msg) }; + + var result = f(); + + process = _process; + console.error = console._error; + console.log = console._log; + + return { + errors : errors, + logs : logs, + exit : exit, + result : result, + }; +}; diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/pause-stream/.npmignore b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/pause-stream/.npmignore new file mode 100644 index 00000000..13abef4f --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/pause-stream/.npmignore @@ -0,0 +1,3 @@ +node_modules +node_modules/* +npm_debug.log diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/pause-stream/index.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/pause-stream/index.js new file mode 100644 index 00000000..8fadda96 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/pause-stream/index.js @@ -0,0 +1,76 @@ +var Stream = require('stream') + +/* + was gonna use through for this, + but it does not match quite right, + because you need a seperate pause + mechanism for the readable and writable + sides. +*/ + +module.exports = function () { + var buffer = [], ended = false, destroyed = false + var stream = new Stream() + stream.writable = stream.readable = true + stream.paused = false + + stream.write = function (data) { + if(!this.paused) + this.emit('data', data) + else + buffer.push(data) + return !(this.paused || buffer.length) + } + function onEnd () { + stream.readable = false + stream.emit('end') + process.nextTick(stream.destroy.bind(stream)) + } + stream.end = function (data) { + if(data) this.write(data) + this.ended = true + this.writable = false + if(!(this.paused || buffer.length)) + return onEnd() + else + this.once('drain', onEnd) + this.drain() + } + + stream.drain = function () { + while(!this.paused && buffer.length) + this.emit('data', buffer.shift()) + //if the buffer has emptied. emit drain. + if(!buffer.length && !this.paused) + this.emit('drain') + } + + stream.resume = function () { + //this is where I need pauseRead, and pauseWrite. + //here the reading side is unpaused, + //but the writing side may still be paused. + //the whole buffer might not empity at once. + //it might pause again. + //the stream should never emit data inbetween pause()...resume() + //and write should return !buffer.length + + this.paused = false +// process.nextTick(this.drain.bind(this)) //will emit drain if buffer empties. + this.drain() + return this + } + + stream.destroy = function () { + if(destroyed) return + destroyed = ended = true + buffer.length = 0 + this.emit('close') + } + + stream.pause = function () { + stream.paused = true + return this + } + + return stream +} diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/pause-stream/package.json b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/pause-stream/package.json new file mode 100644 index 00000000..7702ad50 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/pause-stream/package.json @@ -0,0 +1,38 @@ +{ + "name": "pause-stream", + "version": "0.0.4", + "description": "a ThroughStream that strictly buffers all readable events when paused.", + "main": "index.js", + "directories": { + "test": "test" + }, + "devDependencies": { + "stream-spec": "~0.2.0" + }, + "scripts": { + "test": "node test/index.js && node test/pause-end.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/dominictarr/pause-stream.git" + }, + "keywords": [ + "stream", + "pipe", + "pause", + "drain", + "buffer" + ], + "author": { + "name": "Dominic Tarr", + "email": "dominic.tarr@gmail.com", + "url": "dominictarr.com" + }, + "license": [ + "MIT", + "Apache2" + ], + "readme": "# PauseStream\n\nThis is a `Stream` that will strictly buffer when paused.\nConnect it to anything you need buffered.\n\n``` js\n var ps = require('pause-stream')();\n\n badlyBehavedStream.pipe(ps.pause())\n\n aLittleLater(function (err, data) {\n ps.pipe(createAnotherStream(data))\n ps.resume()\n })\n```\n\n`PauseStream` will buffer whenever paused.\nit will buffer when yau have called `pause` manually.\nbut also when it's downstream `dest.write()===false`.\nit will attempt to drain the buffer when you call resume\nor the downstream emits `'drain'`\n\n`PauseStream` is tested using [stream-spec](https://github.com/dominictarr/stream-spec)\nand [stream-tester](https://github.com/dominictarr/stream-tester)\n", + "_id": "pause-stream@0.0.4", + "_from": "pause-stream@0.0.4" +} diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/pause-stream/readme.markdown b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/pause-stream/readme.markdown new file mode 100644 index 00000000..715cb522 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/pause-stream/readme.markdown @@ -0,0 +1,24 @@ +# PauseStream + +This is a `Stream` that will strictly buffer when paused. +Connect it to anything you need buffered. + +``` js + var ps = require('pause-stream')(); + + badlyBehavedStream.pipe(ps.pause()) + + aLittleLater(function (err, data) { + ps.pipe(createAnotherStream(data)) + ps.resume() + }) +``` + +`PauseStream` will buffer whenever paused. +it will buffer when yau have called `pause` manually. +but also when it's downstream `dest.write()===false`. +it will attempt to drain the buffer when you call resume +or the downstream emits `'drain'` + +`PauseStream` is tested using [stream-spec](https://github.com/dominictarr/stream-spec) +and [stream-tester](https://github.com/dominictarr/stream-tester) diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/pause-stream/test/index.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/pause-stream/test/index.js new file mode 100644 index 00000000..4aa7d5ef --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/pause-stream/test/index.js @@ -0,0 +1,17 @@ +var spec = require('stream-spec') +var tester = require('stream-tester') +var ps = require('..')() + +spec(ps) + .through({strict: false}) + .validateOnExit() + +var master = tester.createConsistent + +tester.createRandomStream(100) //1k random numbers + .pipe(master = tester.createConsistentStream()) + .pipe(tester.createUnpauseStream()) + .pipe(ps) + .pipe(tester.createPauseStream()) + .pipe(master.createSlave()) + diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/pause-stream/test/pause-end.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/pause-stream/test/pause-end.js new file mode 100644 index 00000000..a6c27ef1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/pause-stream/test/pause-end.js @@ -0,0 +1,33 @@ + +var pause = require('..') +var assert = require('assert') + +var ps = pause() +var read = [], ended = false + +ps.on('data', function (i) { + read.push(i) +}) + +ps.on('end', function () { + ended = true +}) + +assert.deepEqual(read, []) + +ps.write(0) +ps.write(1) +ps.write(2) + +assert.deepEqual(read, [0, 1, 2]) + +ps.pause() + +assert.deepEqual(read, [0, 1, 2]) + +ps.end() +assert.equal(ended, false) +ps.resume() +assert.equal(ended, true) + + diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/.npmignore b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/.npmignore new file mode 100644 index 00000000..13abef4f --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/.npmignore @@ -0,0 +1,3 @@ +node_modules +node_modules/* +npm_debug.log diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/.travis.yml b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/.travis.yml new file mode 100644 index 00000000..895dbd36 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.6 + - 0.8 diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/LICENCE b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/LICENCE new file mode 100644 index 00000000..171dd970 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/LICENCE @@ -0,0 +1,22 @@ +Copyright (c) 2011 Dominic Tarr + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/examples/pretty.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/examples/pretty.js new file mode 100644 index 00000000..af043401 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/examples/pretty.js @@ -0,0 +1,25 @@ + +var inspect = require('util').inspect + +if(!module.parent) { + var es = require('..') //load event-stream + es.pipe( //pipe joins streams together + process.openStdin(), //open stdin + es.split(), //split stream to break on newlines + es.map(function (data, callback) {//turn this async function into a stream + var j + try { + j = JSON.parse(data) //try to parse input into json + } catch (err) { + return callback(null, data) //if it fails just pass it anyway + } + callback(null, inspect(j)) //render it nicely + }), + process.stdout // pipe it to stdout ! + ) + } + +// run this +// +// curl -sS registry.npmjs.org/event-stream | node pretty.js +// diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/index.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/index.js new file mode 100644 index 00000000..1146c96a --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/index.js @@ -0,0 +1,35 @@ +//filter will reemit the data if cb(err,pass) pass is truthy + +// reduce is more tricky +// maybe we want to group the reductions or emit progress updates occasionally +// the most basic reduce just emits one 'data' event after it has recieved 'end' + + +var through = require('through') + + +module.exports = split + +function split (matcher) { + var soFar = '' + if (!matcher) + matcher = '\n' + + return through(function (buffer) { + var stream = this + , pieces = (soFar + buffer).split(matcher) + soFar = pieces.pop() + + pieces.forEach(function (piece) { + stream.emit('data', piece) + }) + + return true + }, + function () { + if(soFar) + this.emit('data', soFar) + this.emit('end') + }) +} + diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/node_modules/through/.travis.yml b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/node_modules/through/.travis.yml new file mode 100644 index 00000000..895dbd36 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/node_modules/through/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.6 + - 0.8 diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/node_modules/through/LICENSE.APACHE2 b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/node_modules/through/LICENSE.APACHE2 new file mode 100644 index 00000000..6366c047 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/node_modules/through/LICENSE.APACHE2 @@ -0,0 +1,15 @@ +Apache License, Version 2.0 + +Copyright (c) 2011 Dominic Tarr + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/node_modules/through/LICENSE.MIT b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/node_modules/through/LICENSE.MIT new file mode 100644 index 00000000..6eafbd73 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/node_modules/through/LICENSE.MIT @@ -0,0 +1,24 @@ +The MIT License + +Copyright (c) 2011 Dominic Tarr + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/node_modules/through/index.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/node_modules/through/index.js new file mode 100644 index 00000000..cd250558 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/node_modules/through/index.js @@ -0,0 +1,65 @@ +var Stream = require('stream') + +// through +// +// a stream that does nothing but re-emit the input. +// useful for aggregating a series of changing but not ending streams into one stream) + +exports = module.exports = through +through.through = through + +//create a readable writable stream. + +function through (write, end) { + write = write || function (data) { this.emit('data', data) } + end = end || function () { this.emit('end') } + + var ended = false, destroyed = false + var stream = new Stream() + stream.readable = stream.writable = true + stream.paused = false + stream.write = function (data) { + write.call(this, data) + return !stream.paused + } + //this will be registered as the first 'end' listener + //must call destroy next tick, to make sure we're after any + //stream piped from here. + stream.on('end', function () { + stream.readable = false + if(!stream.writable) + process.nextTick(function () { + stream.destroy() + }) + }) + + stream.end = function (data) { + if(ended) return + //this breaks, because pipe doesn't check writable before calling end. + //throw new Error('cannot call end twice') + ended = true + if(arguments.length) stream.write(data) + this.writable = false + end.call(this) + if(!this.readable) + this.destroy() + } + stream.destroy = function () { + if(destroyed) return + destroyed = true + ended = true + stream.writable = stream.readable = false + stream.emit('close') + } + stream.pause = function () { + stream.paused = true + } + stream.resume = function () { + if(stream.paused) { + stream.paused = false + stream.emit('drain') + } + } + return stream +} + diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/node_modules/through/package.json b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/node_modules/through/package.json new file mode 100644 index 00000000..3ecb71d8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/node_modules/through/package.json @@ -0,0 +1,29 @@ +{ + "name": "through", + "version": "0.0.4", + "description": "simplified stream contruction", + "main": "index.js", + "scripts": { + "test": "asynct test/*.js" + }, + "devDependencies": { + "stream-spec": "0", + "assertions": "2", + "asynct": "1" + }, + "keywords": [ + "stream", + "streams", + "user-streams", + "pipe" + ], + "author": { + "name": "Dominic Tarr", + "email": "dominic.tarr@gmail.com", + "url": "dominictarr.com" + }, + "license": "MIT", + "readme": "#through\n\n[![build status](https://secure.travis-ci.org/dominictarr/through.png)](http://travis-ci.org/dominictarr/through)\n\nEasy way to create a `Stream` that is both `readable` and `writable`. Pass in optional `write` and `end` methods. `through` takes care of pause/resume logic.\nUse `this.pause()` and `this.resume()` to manage flow.\nCheck `this.paused` to see current flow state. (write always returns `!this.paused`)\n\nthis function is the basis for most of the syncronous streams in [event-stream](http://github.com/dominictarr/event-stream).\n\n``` js\nvar through = require('through')\n\nthrough(function write(data) {\n this.emit('data', data)\n //this.pause() \n },\n function end () { //optional\n this.emit('end')\n })\n\n```\n\n## License\n\nMIT / Apache2\n", + "_id": "through@0.0.4", + "_from": "through@0.0.4" +} diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/node_modules/through/readme.markdown b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/node_modules/through/readme.markdown new file mode 100644 index 00000000..ce9b9e5c --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/node_modules/through/readme.markdown @@ -0,0 +1,26 @@ +#through + +[![build status](https://secure.travis-ci.org/dominictarr/through.png)](http://travis-ci.org/dominictarr/through) + +Easy way to create a `Stream` that is both `readable` and `writable`. Pass in optional `write` and `end` methods. `through` takes care of pause/resume logic. +Use `this.pause()` and `this.resume()` to manage flow. +Check `this.paused` to see current flow state. (write always returns `!this.paused`) + +this function is the basis for most of the syncronous streams in [event-stream](http://github.com/dominictarr/event-stream). + +``` js +var through = require('through') + +through(function write(data) { + this.emit('data', data) + //this.pause() + }, + function end () { //optional + this.emit('end') + }) + +``` + +## License + +MIT / Apache2 diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/node_modules/through/test/index.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/node_modules/through/test/index.js new file mode 100644 index 00000000..25a6ea7e --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/node_modules/through/test/index.js @@ -0,0 +1,113 @@ + +var spec = require('stream-spec') +var through = require('..') +var a = require('assertions') + +/* + I'm using these two functions, and not streams and pipe + so there is less to break. if this test fails it must be + the implementation of _through_ +*/ + +function write(array, stream) { + array = array.slice() + function next() { + while(array.length) + if(stream.write(array.shift()) === false) + return stream.once('drain', next) + + stream.end() + } + + next() +} + +function read(stream, callback) { + var actual = [] + stream.on('data', function (data) { + actual.push(data) + }) + stream.once('end', function () { + callback(null, actual) + }) + stream.once('error', function (err) { + callback(err) + }) +} + +exports['simple defaults'] = function (test) { + + var l = 1000 + , expected = [] + + while(l--) expected.push(l * Math.random()) + + var t = through() + spec(t) + .through() + .pausable() + .validateOnExit() + + read(t, function (err, actual) { + if(err) test.error(err) //fail + a.deepEqual(actual, expected) + test.done() + }) + + write(expected, t) +} + +exports['simple functions'] = function (test) { + + var l = 1000 + , expected = [] + + while(l--) expected.push(l * Math.random()) + + var t = through(function (data) { + this.emit('data', data*2) + }) + spec(t) + .through() + .pausable() + .validateOnExit() + + read(t, function (err, actual) { + if(err) test.error(err) //fail + a.deepEqual(actual, expected.map(function (data) { + return data*2 + })) + test.done() + }) + + write(expected, t) +} +exports['pauses'] = function (test) { + + var l = 1000 + , expected = [] + + while(l--) expected.push(l) //Math.random()) + + var t = through() + spec(t) + .through() + .pausable() + .validateOnExit() + + t.on('data', function () { + if(Math.random() > 0.1) return + t.pause() + process.nextTick(function () { + t.resume() + }) + }) + + read(t, function (err, actual) { + if(err) test.error(err) //fail + a.deepEqual(actual, expected) + test.done() + }) + + write(expected, t) +} diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/package.json b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/package.json new file mode 100644 index 00000000..a592dadf --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/package.json @@ -0,0 +1,35 @@ +{ + "name": "split", + "version": "0.0.0", + "description": "split a Text Stream into a Line Stream", + "homepage": "http://github.com/dominictarr/split", + "repository": { + "type": "git", + "url": "git://github.com/dominictarr/split.git" + }, + "dependencies": { + "through": "0.0.4" + }, + "devDependencies": { + "asynct": "*", + "it-is": "1", + "ubelt": "~2.9", + "stream-spec": "~0.2", + "event-stream": "~3.0.2" + }, + "scripts": { + "test": "asynct test/" + }, + "author": { + "name": "Dominic Tarr", + "email": "dominic.tarr@gmail.com", + "url": "http://bit.ly/dominictarr" + }, + "optionalDependencies": {}, + "engines": { + "node": "*" + }, + "readme": "# Split (matcher)\n\n\n\nBreak up a stream and reassemble it so that each line is a chunk. matcher may be a `String`, or a `RegExp` \n\nExample, read every line in a file ...\n\n``` js\n fs.createReadStream(file)\n .pipe(split())\n .on('data', function (line) {\n //each chunk now is a seperate line!\n })\n\n```\n\n`split` takes the same arguments as `string.split` except it defaults to '\\n' instead of ',', and the optional `limit` paremeter is ignored.\n[String#split](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/split)\n\n", + "_id": "split@0.0.0", + "_from": "split@0.0.0" +} diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/readme.markdown b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/readme.markdown new file mode 100644 index 00000000..57c8edc0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/readme.markdown @@ -0,0 +1,20 @@ +# Split (matcher) + + + +Break up a stream and reassemble it so that each line is a chunk. matcher may be a `String`, or a `RegExp` + +Example, read every line in a file ... + +``` js + fs.createReadStream(file) + .pipe(split()) + .on('data', function (line) { + //each chunk now is a seperate line! + }) + +``` + +`split` takes the same arguments as `string.split` except it defaults to '\n' instead of ',', and the optional `limit` paremeter is ignored. +[String#split](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/split) + diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/test/split.asynct.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/test/split.asynct.js new file mode 100644 index 00000000..a6a3b1b1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/split/test/split.asynct.js @@ -0,0 +1,47 @@ +var es = require('event-stream') + , it = require('it-is').style('colour') + , d = require('ubelt') + , split = require('..') + , join = require('path').join + , fs = require('fs') + , Stream = require('stream').Stream + , spec = require('stream-spec') + +exports ['es.split() works like String#split'] = function (test) { + var readme = join(__filename) + , expected = fs.readFileSync(readme, 'utf-8').split('\n') + , cs = split() + , actual = [] + , ended = false + , x = spec(cs).through() + + var a = new Stream () + + a.write = function (l) { + actual.push(l.trim()) + } + a.end = function () { + + ended = true + expected.forEach(function (v,k) { + //String.split will append an empty string '' + //if the string ends in a split pattern. + //es.split doesn't which was breaking this test. + //clearly, appending the empty string is correct. + //tests are passing though. which is the current job. + if(v) + it(actual[k]).like(v) + }) + //give the stream time to close + process.nextTick(function () { + test.done() + x.validate() + }) + } + a.writable = true + + fs.createReadStream(readme, {flags: 'r'}).pipe(cs) + cs.pipe(a) + +} + diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/through/.travis.yml b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/through/.travis.yml new file mode 100644 index 00000000..895dbd36 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/through/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.6 + - 0.8 diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/through/LICENSE.APACHE2 b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/through/LICENSE.APACHE2 new file mode 100644 index 00000000..6366c047 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/through/LICENSE.APACHE2 @@ -0,0 +1,15 @@ +Apache License, Version 2.0 + +Copyright (c) 2011 Dominic Tarr + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/through/LICENSE.MIT b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/through/LICENSE.MIT new file mode 100644 index 00000000..6eafbd73 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/through/LICENSE.MIT @@ -0,0 +1,24 @@ +The MIT License + +Copyright (c) 2011 Dominic Tarr + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/through/index.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/through/index.js new file mode 100644 index 00000000..7072b37f --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/through/index.js @@ -0,0 +1,100 @@ +var Stream = require('stream') + +// through +// +// a stream that does nothing but re-emit the input. +// useful for aggregating a series of changing but not ending streams into one stream) + + + +exports = module.exports = through +through.through = through + +//create a readable writable stream. + +function through (write, end) { + write = write || function (data) { this.emit('data', data) } + end = end || function () { this.emit('end') } + + var ended = false, destroyed = false + var stream = new Stream(), buffer = [] + stream.buffer = buffer + stream.readable = stream.writable = true + stream.paused = false + stream.write = function (data) { + write.call(this, data) + return !stream.paused + } + + function drain() { + while(buffer.length && !stream.paused) { + var data = buffer.shift() + if(null === data) + return stream.emit('end') + else + stream.emit('data', data) + } + } + + stream.queue = function (data) { + buffer.push(data) + drain() + } + + //this will be registered as the first 'end' listener + //must call destroy next tick, to make sure we're after any + //stream piped from here. + //this is only a problem if end is not emitted synchronously. + //a nicer way to do this is to make sure this is the last listener for 'end' + + stream.on('end', function () { + stream.readable = false + if(!stream.writable) + process.nextTick(function () { + stream.destroy() + }) + }) + + function _end () { + stream.writable = false + end.call(stream) + if(!stream.readable) + stream.destroy() + } + + stream.end = function (data) { + if(ended) return + //this breaks, because pipe doesn't check writable before calling end. + //throw new Error('cannot call end twice') + ended = true + if(arguments.length) stream.write(data) + if(!buffer.length) _end() + } + + stream.destroy = function () { + if(destroyed) return + destroyed = true + ended = true + buffer.length = 0 + stream.writable = stream.readable = false + stream.emit('close') + } + + stream.pause = function () { + if(stream.paused) return + stream.paused = true + stream.emit('pause') + } + stream.resume = function () { + if(stream.paused) { + stream.paused = false + } + drain() + //may have become paused again, + //as drain emits 'data'. + if(!stream.paused) + stream.emit('drain') + } + return stream +} + diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/through/package.json b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/through/package.json new file mode 100644 index 00000000..168247e9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/through/package.json @@ -0,0 +1,34 @@ +{ + "name": "through", + "version": "1.1.0", + "description": "simplified stream contruction", + "main": "index.js", + "scripts": { + "test": "asynct test/*.js" + }, + "devDependencies": { + "stream-spec": "0", + "assertions": "2", + "asynct": "1" + }, + "keywords": [ + "stream", + "streams", + "user-streams", + "pipe" + ], + "author": { + "name": "Dominic Tarr", + "email": "dominic.tarr@gmail.com", + "url": "dominictarr.com" + }, + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/dominictarr/through.git" + }, + "homepage": "http://github.com/dominictarr/through", + "readme": "#through\n\n[![build status](https://secure.travis-ci.org/dominictarr/through.png)](http://travis-ci.org/dominictarr/through)\n\nEasy way to create a `Stream` that is both `readable` and `writable`. Pass in optional `write` and `end` methods. `through` takes care of pause/resume logic.\nUse `this.pause()` and `this.resume()` to manage flow.\nCheck `this.paused` to see current flow state. (write always returns `!this.paused`)\n\nthis function is the basis for most of the syncronous streams in [event-stream](http://github.com/dominictarr/event-stream).\n\n``` js\nvar through = require('through')\n\nthrough(function write(data) {\n this.emit('data', data)\n //this.pause() \n },\n function end () { //optional\n this.emit('end')\n })\n\n```\n\nor, with buffering on pause, use `this.queue(data)`,\ndata *cannot* be `null`. `this.queue(null)` will emit 'end'\nwhen it gets to the `null` element.\n\n``` js\nvar through = require('through')\n\nthrough(function write(data) {\n this.queue(data)\n //this.pause() \n },\n function end () { //optional\n this.queue(null)\n })\n\n```\n\n\n## License\n\nMIT / Apache2\n", + "_id": "through@1.1.0", + "_from": "through@~1.1.0" +} diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/through/readme.markdown b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/through/readme.markdown new file mode 100644 index 00000000..1b687e9c --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/through/readme.markdown @@ -0,0 +1,44 @@ +#through + +[![build status](https://secure.travis-ci.org/dominictarr/through.png)](http://travis-ci.org/dominictarr/through) + +Easy way to create a `Stream` that is both `readable` and `writable`. Pass in optional `write` and `end` methods. `through` takes care of pause/resume logic. +Use `this.pause()` and `this.resume()` to manage flow. +Check `this.paused` to see current flow state. (write always returns `!this.paused`) + +this function is the basis for most of the syncronous streams in [event-stream](http://github.com/dominictarr/event-stream). + +``` js +var through = require('through') + +through(function write(data) { + this.emit('data', data) + //this.pause() + }, + function end () { //optional + this.emit('end') + }) + +``` + +or, with buffering on pause, use `this.queue(data)`, +data *cannot* be `null`. `this.queue(null)` will emit 'end' +when it gets to the `null` element. + +``` js +var through = require('through') + +through(function write(data) { + this.queue(data) + //this.pause() + }, + function end () { //optional + this.queue(null) + }) + +``` + + +## License + +MIT / Apache2 diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/through/test/buffering.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/through/test/buffering.js new file mode 100644 index 00000000..1ce4b0d1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/through/test/buffering.js @@ -0,0 +1,37 @@ +var through = require('..') + +// must emit end before close. + +exports['buffering'] = function (t) { + var ts = through(function (data) { + this.queue(data) + }, function () { + this.queue(null) + }) + + var ended = false, actual = [] + + ts.on('data', actual.push.bind(actual)) + ts.on('end', function () { + ended = true + }) + + ts.write(1) + ts.write(2) + ts.write(3) + t.deepEqual(actual, [1, 2, 3]) + ts.pause() + ts.write(4) + ts.write(5) + ts.write(6) + t.deepEqual(actual, [1, 2, 3]) + ts.resume() + t.deepEqual(actual, [1, 2, 3, 4, 5, 6]) + ts.pause() + ts.end() + t.ok(!ended) + ts.resume() + t.ok(ended) + t.end() + +} diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/through/test/end.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/through/test/end.js new file mode 100644 index 00000000..280da0a4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/through/test/end.js @@ -0,0 +1,27 @@ +var through = require('..') + +// must emit end before close. + +exports['end before close'] = function (t) { + var ts = through() + var ended = false, closed = false + + ts.on('end', function () { + t.ok(!closed) + ended = true + }) + ts.on('close', function () { + t.ok(ended) + closed = true + }) + + ts.write(1) + ts.write(2) + ts.write(3) + ts.end() + t.ok(ended) + t.ok(closed) + + t.end() + +} diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/through/test/index.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/through/test/index.js new file mode 100644 index 00000000..25a6ea7e --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/node_modules/through/test/index.js @@ -0,0 +1,113 @@ + +var spec = require('stream-spec') +var through = require('..') +var a = require('assertions') + +/* + I'm using these two functions, and not streams and pipe + so there is less to break. if this test fails it must be + the implementation of _through_ +*/ + +function write(array, stream) { + array = array.slice() + function next() { + while(array.length) + if(stream.write(array.shift()) === false) + return stream.once('drain', next) + + stream.end() + } + + next() +} + +function read(stream, callback) { + var actual = [] + stream.on('data', function (data) { + actual.push(data) + }) + stream.once('end', function () { + callback(null, actual) + }) + stream.once('error', function (err) { + callback(err) + }) +} + +exports['simple defaults'] = function (test) { + + var l = 1000 + , expected = [] + + while(l--) expected.push(l * Math.random()) + + var t = through() + spec(t) + .through() + .pausable() + .validateOnExit() + + read(t, function (err, actual) { + if(err) test.error(err) //fail + a.deepEqual(actual, expected) + test.done() + }) + + write(expected, t) +} + +exports['simple functions'] = function (test) { + + var l = 1000 + , expected = [] + + while(l--) expected.push(l * Math.random()) + + var t = through(function (data) { + this.emit('data', data*2) + }) + spec(t) + .through() + .pausable() + .validateOnExit() + + read(t, function (err, actual) { + if(err) test.error(err) //fail + a.deepEqual(actual, expected.map(function (data) { + return data*2 + })) + test.done() + }) + + write(expected, t) +} +exports['pauses'] = function (test) { + + var l = 1000 + , expected = [] + + while(l--) expected.push(l) //Math.random()) + + var t = through() + spec(t) + .through() + .pausable() + .validateOnExit() + + t.on('data', function () { + if(Math.random() > 0.1) return + t.pause() + process.nextTick(function () { + t.resume() + }) + }) + + read(t, function (err, actual) { + if(err) test.error(err) //fail + a.deepEqual(actual, expected) + test.done() + }) + + write(expected, t) +} diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/package.json b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/package.json new file mode 100644 index 00000000..15f8ea81 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/package.json @@ -0,0 +1,40 @@ +{ + "name": "event-stream", + "version": "3.0.7", + "description": "construct pipes of streams of events", + "homepage": "http://github.com/dominictarr/event-stream", + "repository": { + "type": "git", + "url": "git://github.com/dominictarr/event-stream.git" + }, + "dependencies": { + "optimist": "0.2", + "through": "1.1.0", + "duplexer": "~0.0.2", + "from": "~0", + "map-stream": "0.0.1", + "pause-stream": "0.0.4", + "split": "0.0.0" + }, + "devDependencies": { + "asynct": "*", + "it-is": "1", + "ubelt": "~2.9", + "stream-spec": "~0.2" + }, + "scripts": { + "test": "asynct test/" + }, + "author": { + "name": "Dominic Tarr", + "email": "dominic.tarr@gmail.com", + "url": "http://bit.ly/dominictarr" + }, + "optionalDependencies": {}, + "engines": { + "node": "*" + }, + "readme": "# EventStream\n\n\n\n[Streams](http://nodejs.org/api/streams.html \"Stream\") are nodes best and most misunderstood idea, and \n_EventStream_ is a toolkit to make creating and working with streams easy. \n\nNormally, streams are only used of IO, \nbut in event stream we send all kinds of objects down the pipe. \nIf your application's input and output are streams, \nshouldn't the throughput be a stream too? \n\nThe *EventStream* functions resemble the array functions, \nbecause Streams are like Arrays, but laid out in time, rather than in memory. \n\nAll the `event-stream` functions return instances of `Stream`.\n\nStream API docs: [nodejs.org/api/streams](http://nodejs.org/api/streams.html \"Stream\")\n\nNOTE: I shall use the term \"through stream\" to refer to a stream that is writable and readable. \n\n###[simple example](https://github.com/dominictarr/event-stream/blob/master/examples/pretty.js):\n\n``` js\n\n//pretty.js\n\nif(!module.parent) {\n var es = require('event-stream')\n es.pipeline( //connect streams together with `pipe`\n process.openStdin(), //open stdin\n es.split(), //split stream to break on newlines\n es.map(function (data, callback) {//turn this async function into a stream\n callback(null\n , inspect(JSON.parse(data))) //render it nicely\n }),\n process.stdout // pipe it to stdout !\n )\n }\n```\nrun it ...\n\n``` bash \ncurl -sS registry.npmjs.org/event-stream | node pretty.js\n```\n \n[node Stream documentation](http://nodejs.org/api/streams.html)\n\n## through (write?, end?)\n\nReemits data synchronously. Easy way to create syncronous through streams.\nPass in an optional `write` and `end` methods. They will be called in the \ncontext of the stream. Use `this.pause()` and `this.resume()` to manage flow.\nCheck `this.paused` to see current flow state. (write always returns `!this.paused`)\n\nthis function is the basis for most of the syncronous streams in `event-stream`.\n\n``` js\n\nes.through(function write(data) {\n this.emit('data', data)\n //this.pause() \n },\n function end () { //optional\n this.emit('end')\n })\n\n```\n\n##map (asyncFunction)\n\nCreate a through stream from an asyncronous function. \n\n``` js\nvar es = require('event-stream')\n\nes.map(function (data, callback) {\n //transform data\n // ...\n callback(null, data)\n})\n\n```\n\nEach map MUST call the callback. It may callback with data, with an error or with no arguments, \n\n * `callback()` drop this data. \n this makes the map work like `filter`, \n note:`callback(null,null)` is not the same, and will emit `null`\n\n * `callback(null, newData)` turn data into newData\n \n * `callback(error)` emit an error for this item.\n\n>Note: if a callback is not called, `map` will think that it is still being processed, \n>every call must be answered or the stream will not know when to end. \n>\n>Also, if the callback is called more than once, every call but the first will be ignored.\n\n## mapSync (syncFunction)\n\nSame as `map`, but the callback is called synchronously. Based on `es.through`\n\n## split (matcher)\n\nBreak up a stream and reassemble it so that each line is a chunk. matcher may be a `String`, or a `RegExp` \n\nExample, read every line in a file ...\n\n``` js\n es.pipeline(\n fs.createReadStream(file, {flags: 'r'}),\n es.split(),\n es.map(function (line, cb) {\n //do something with the line \n cb(null, line)\n })\n )\n\n```\n\n`split` takes the same arguments as `string.split` except it defaults to '\\n' instead of ',', and the optional `limit` paremeter is ignored.\n[String#split](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/split)\n\n## join (seperator)\n\ncreate a through stream that emits `seperator` between each chunk, just like Array#join.\n\n(for legacy reasons, if you pass a callback instead of a string, join is a synonym for `es.wait`)\n\n## replace (from, to)\n\nReplace all occurences of `from` with `to`. `from` may be a `String` or a `RegExp`. \nWorks just like `string.split(from).join(to)`, but streaming.\n\n\n## parse\n\nConvienience function for parsing JSON chunks. For newline seperated JSON,\nuse with `es.split`\n\n``` js\nfs.createReadStream(filename)\n .pipe(es.split()) //defaults to lines.\n .pipe(es.parse())\n```\n\n## stringify\n\nconvert javascript objects into lines of text. The text will have whitespace escaped and have a `\\n` appended, so it will be compatible with `es.parse`\n\n``` js\nobjectStream\n .pipe(es.stringify())\n .pipe(fs.createWriteStream(filename))\n```\n\n##readable (asyncFunction) \n\ncreate a readable stream (that respects pause) from an async function. \nwhile the stream is not paused, \nthe function will be polled with `(count, callback)`, \nand `this` will be the readable stream.\n\n``` js\n\nes.readable(function (count, callback) {\n if(streamHasEnded)\n return this.emit('end')\n \n //...\n \n this.emit('data', data) //use this way to emit multiple chunks per call.\n \n callback() // you MUST always call the callback eventually.\n // the function will not be called again until you do this.\n})\n```\nyou can also pass the data and the error to the callback. \nyou may only call the callback once. \ncalling the same callback more than once will have no effect. \n\n##readArray (array)\n\nCreate a readable stream from an Array.\n\nJust emit each item as a data event, respecting `pause` and `resume`.\n\n``` js\n var es = require('event-stream')\n , reader = es.readArray([1,2,3])\n\n reader.pipe(...)\n```\n\n## writeArray (callback)\n\ncreate a writeable stream from a callback, \nall `data` events are stored in an array, which is passed to the callback when the stream ends.\n\n``` js\n var es = require('event-stream')\n , reader = es.readArray([1, 2, 3])\n , writer = es.writeArray(function (err, array){\n //array deepEqual [1, 2, 3]\n })\n\n reader.pipe(writer)\n```\n\n## pipeline (stream1,...,streamN)\n\nTurn a pipeline into a single stream. `pipeline` returns a stream that writes to the first stream\nand reads from the last stream. \n\nListening for 'error' will recieve errors from all streams inside the pipe.\n\n> `connect` is an alias for `pipeline`.\n\n``` js\n\n es.pipeline( //connect streams together with `pipe`\n process.openStdin(), //open stdin\n es.split(), //split stream to break on newlines\n es.map(function (data, callback) {//turn this async function into a stream\n callback(null\n , inspect(JSON.parse(data))) //render it nicely\n }),\n process.stdout // pipe it to stdout !\n )\n```\n\n## pause () \n\nA stream that buffers all chunks when paused.\n\n\n``` js\n var ps = es.pause()\n ps.pause() //buffer the stream, also do not allow 'end' \n ps.resume() //allow chunks through\n```\n\n## duplex (writeStream, readStream)\n\nTakes a writable stream and a readable stream and makes them appear as a readable writable stream.\n\nIt is assumed that the two streams are connected to each other in some way. \n\n(This is used by `pipeline` and `child`.)\n\n``` js\n var grep = cp.exec('grep Stream')\n\n es.duplex(grep.stdin, grep.stdout)\n```\n\n## child (child_process)\n\nCreate a through stream from a child process ...\n\n``` js\n var cp = require('child_process')\n\n es.child(cp.exec('grep Stream')) // a through stream\n\n```\n\n## wait (callback)\n\nwaits for stream to emit 'end'.\njoins chunks of a stream into a single string. \ntakes an optional callback, which will be passed the \ncomplete string when it receives the 'end' event.\n\nalso, emits a simgle 'data' event.\n\n``` js\n\nreadStream.pipe(es.join(function (err, text) {\n // have complete text here.\n}))\n\n```\n\n\n", + "_id": "event-stream@3.0.7", + "_from": "event-stream@~3.0.7" +} diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/readme.markdown b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/readme.markdown new file mode 100644 index 00000000..e83724a1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/readme.markdown @@ -0,0 +1,286 @@ +# EventStream + + + +[Streams](http://nodejs.org/api/streams.html "Stream") are nodes best and most misunderstood idea, and +_EventStream_ is a toolkit to make creating and working with streams easy. + +Normally, streams are only used of IO, +but in event stream we send all kinds of objects down the pipe. +If your application's input and output are streams, +shouldn't the throughput be a stream too? + +The *EventStream* functions resemble the array functions, +because Streams are like Arrays, but laid out in time, rather than in memory. + +All the `event-stream` functions return instances of `Stream`. + +Stream API docs: [nodejs.org/api/streams](http://nodejs.org/api/streams.html "Stream") + +NOTE: I shall use the term "through stream" to refer to a stream that is writable and readable. + +###[simple example](https://github.com/dominictarr/event-stream/blob/master/examples/pretty.js): + +``` js + +//pretty.js + +if(!module.parent) { + var es = require('event-stream') + es.pipeline( //connect streams together with `pipe` + process.openStdin(), //open stdin + es.split(), //split stream to break on newlines + es.map(function (data, callback) {//turn this async function into a stream + callback(null + , inspect(JSON.parse(data))) //render it nicely + }), + process.stdout // pipe it to stdout ! + ) + } +``` +run it ... + +``` bash +curl -sS registry.npmjs.org/event-stream | node pretty.js +``` + +[node Stream documentation](http://nodejs.org/api/streams.html) + +## through (write?, end?) + +Reemits data synchronously. Easy way to create syncronous through streams. +Pass in an optional `write` and `end` methods. They will be called in the +context of the stream. Use `this.pause()` and `this.resume()` to manage flow. +Check `this.paused` to see current flow state. (write always returns `!this.paused`) + +this function is the basis for most of the syncronous streams in `event-stream`. + +``` js + +es.through(function write(data) { + this.emit('data', data) + //this.pause() + }, + function end () { //optional + this.emit('end') + }) + +``` + +##map (asyncFunction) + +Create a through stream from an asyncronous function. + +``` js +var es = require('event-stream') + +es.map(function (data, callback) { + //transform data + // ... + callback(null, data) +}) + +``` + +Each map MUST call the callback. It may callback with data, with an error or with no arguments, + + * `callback()` drop this data. + this makes the map work like `filter`, + note:`callback(null,null)` is not the same, and will emit `null` + + * `callback(null, newData)` turn data into newData + + * `callback(error)` emit an error for this item. + +>Note: if a callback is not called, `map` will think that it is still being processed, +>every call must be answered or the stream will not know when to end. +> +>Also, if the callback is called more than once, every call but the first will be ignored. + +## mapSync (syncFunction) + +Same as `map`, but the callback is called synchronously. Based on `es.through` + +## split (matcher) + +Break up a stream and reassemble it so that each line is a chunk. matcher may be a `String`, or a `RegExp` + +Example, read every line in a file ... + +``` js + es.pipeline( + fs.createReadStream(file, {flags: 'r'}), + es.split(), + es.map(function (line, cb) { + //do something with the line + cb(null, line) + }) + ) + +``` + +`split` takes the same arguments as `string.split` except it defaults to '\n' instead of ',', and the optional `limit` paremeter is ignored. +[String#split](https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/String/split) + +## join (seperator) + +create a through stream that emits `seperator` between each chunk, just like Array#join. + +(for legacy reasons, if you pass a callback instead of a string, join is a synonym for `es.wait`) + +## replace (from, to) + +Replace all occurences of `from` with `to`. `from` may be a `String` or a `RegExp`. +Works just like `string.split(from).join(to)`, but streaming. + + +## parse + +Convienience function for parsing JSON chunks. For newline seperated JSON, +use with `es.split` + +``` js +fs.createReadStream(filename) + .pipe(es.split()) //defaults to lines. + .pipe(es.parse()) +``` + +## stringify + +convert javascript objects into lines of text. The text will have whitespace escaped and have a `\n` appended, so it will be compatible with `es.parse` + +``` js +objectStream + .pipe(es.stringify()) + .pipe(fs.createWriteStream(filename)) +``` + +##readable (asyncFunction) + +create a readable stream (that respects pause) from an async function. +while the stream is not paused, +the function will be polled with `(count, callback)`, +and `this` will be the readable stream. + +``` js + +es.readable(function (count, callback) { + if(streamHasEnded) + return this.emit('end') + + //... + + this.emit('data', data) //use this way to emit multiple chunks per call. + + callback() // you MUST always call the callback eventually. + // the function will not be called again until you do this. +}) +``` +you can also pass the data and the error to the callback. +you may only call the callback once. +calling the same callback more than once will have no effect. + +##readArray (array) + +Create a readable stream from an Array. + +Just emit each item as a data event, respecting `pause` and `resume`. + +``` js + var es = require('event-stream') + , reader = es.readArray([1,2,3]) + + reader.pipe(...) +``` + +## writeArray (callback) + +create a writeable stream from a callback, +all `data` events are stored in an array, which is passed to the callback when the stream ends. + +``` js + var es = require('event-stream') + , reader = es.readArray([1, 2, 3]) + , writer = es.writeArray(function (err, array){ + //array deepEqual [1, 2, 3] + }) + + reader.pipe(writer) +``` + +## pipeline (stream1,...,streamN) + +Turn a pipeline into a single stream. `pipeline` returns a stream that writes to the first stream +and reads from the last stream. + +Listening for 'error' will recieve errors from all streams inside the pipe. + +> `connect` is an alias for `pipeline`. + +``` js + + es.pipeline( //connect streams together with `pipe` + process.openStdin(), //open stdin + es.split(), //split stream to break on newlines + es.map(function (data, callback) {//turn this async function into a stream + callback(null + , inspect(JSON.parse(data))) //render it nicely + }), + process.stdout // pipe it to stdout ! + ) +``` + +## pause () + +A stream that buffers all chunks when paused. + + +``` js + var ps = es.pause() + ps.pause() //buffer the stream, also do not allow 'end' + ps.resume() //allow chunks through +``` + +## duplex (writeStream, readStream) + +Takes a writable stream and a readable stream and makes them appear as a readable writable stream. + +It is assumed that the two streams are connected to each other in some way. + +(This is used by `pipeline` and `child`.) + +``` js + var grep = cp.exec('grep Stream') + + es.duplex(grep.stdin, grep.stdout) +``` + +## child (child_process) + +Create a through stream from a child process ... + +``` js + var cp = require('child_process') + + es.child(cp.exec('grep Stream')) // a through stream + +``` + +## wait (callback) + +waits for stream to emit 'end'. +joins chunks of a stream into a single string. +takes an optional callback, which will be passed the +complete string when it receives the 'end' event. + +also, emits a simgle 'data' event. + +``` js + +readStream.pipe(es.join(function (err, text) { + // have complete text here. +})) + +``` + + diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/connect.asynct.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/connect.asynct.js new file mode 100644 index 00000000..0ba00205 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/connect.asynct.js @@ -0,0 +1,82 @@ +var es = require('../') + , it = require('it-is').style('colour') + , d = require('ubelt') + +function makeExamplePipe() { + + return es.connect( + es.map(function (data, callback) { + callback(null, data * 2) + }), + es.map(function (data, callback) { + d.delay(callback)(null, data) + }), + es.map(function (data, callback) { + callback(null, data + 2) + })) +} + +exports['simple pipe'] = function (test) { + + var pipe = makeExamplePipe() + + pipe.on('data', function (data) { + it(data).equal(18) + test.done() + }) + + pipe.write(8) + +} + +exports['read array then map'] = function (test) { + + var readThis = d.map(3, 6, 100, d.id) //array of multiples of 3 < 100 + , first = es.readArray(readThis) + , read = [] + , pipe = + es.connect( + first, + es.map(function (data, callback) { + callback(null, {data: data}) + }), + es.map(function (data, callback) { + callback(null, {data: data}) + }), + es.writeArray(function (err, array) { + it(array).deepEqual(d.map(readThis, function (data) { + return {data: {data: data}} + })) + test.done() + }) + ) +} + +exports ['connect returns a stream'] = function (test) { + + var rw = + es.connect( + es.map(function (data, callback) { + callback(null, data * 2) + }), + es.map(function (data, callback) { + callback(null, data * 5) + }) + ) + + it(rw).has({readable: true, writable: true}) + + var array = [190, 24, 6, 7, 40, 57, 4, 6] + , _array = [] + , c = + es.connect( + es.readArray(array), + rw, + es.log('after rw:'), + es.writeArray(function (err, _array) { + it(_array).deepEqual(array.map(function (e) { return e * 10 })) + test.done() + }) + ) + +} diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/merge.asynct.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/merge.asynct.js new file mode 100644 index 00000000..17fae5b7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/merge.asynct.js @@ -0,0 +1,20 @@ +var es = require('../') + , it = require('it-is').style('colour') + , d = require('ubelt') + +exports.merge = function (t) { + var odd = d.map(1, 3, 100, d.id) //array of multiples of 3 < 100 + var even = d.map(2, 4, 100, d.id) //array of multiples of 3 < 100 + + var r1 = es.readArray(even) + var r2 = es.readArray(odd) + + var writer = es.writeArray(function (err, array){ + if(err) throw err //unpossible + it(array.sort()).deepEqual(even.concat(odd).sort()) + t.done() + }) + + es.merge(r1, r2).pipe(writer) + +} diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/pause.asynct.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/pause.asynct.js new file mode 100644 index 00000000..59d896f7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/pause.asynct.js @@ -0,0 +1,38 @@ + +var es = require('../') + , it = require('it-is') + , d = require('ubelt') + +exports ['gate buffers when shut'] = function (test) { + + var hundy = d.map(1,100, d.id) + , gate = es.pause() + , ten = 10 + es.connect( + es.readArray(hundy), + es.log('after readArray'), + gate, + //es.log('after gate'), + es.map(function (num, next) { + //stick a map in here to check that gate never emits when open + it(gate.paused).equal(false) + console.log('data', num) + if(!--ten) { + console.log('PAUSE') + gate.pause()//.resume() + d.delay(gate.resume.bind(gate), 10)() + ten = 10 + } + + next(null, num) + }), + es.writeArray(function (err, array) { //just realized that I should remove the error param. errors will be emitted + console.log('eonuhoenuoecbulc') + it(array).deepEqual(hundy) + test.done() + }) + ) + + gate.resume() + +} diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/pipeline.asynct.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/pipeline.asynct.js new file mode 100644 index 00000000..c2af9d8a --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/pipeline.asynct.js @@ -0,0 +1,51 @@ +var es = require('..') + +exports['do not duplicate errors'] = function (test) { + + var errors = 0; + var pipe = es.pipeline( + es.through(function(data) { + return this.emit('data', data); + }), + es.through(function(data) { + return this.emit('error', new Error(data)); + }) + ) + + pipe.on('error', function(err) { + errors++ + console.log('error count', errors) + process.nextTick(function () { + return test.done(); + }) + }) + + return pipe.write('meh'); + +} + +exports['3 pipe do not duplicate errors'] = function (test) { + + var errors = 0; + var pipe = es.pipeline( + es.through(function(data) { + return this.emit('data', data); + }), + es.through(function(data) { + return this.emit('error', new Error(data)); + }), + es.through() + ) + + pipe.on('error', function(err) { + errors++ + console.log('error count', errors) + process.nextTick(function () { + return test.done(); + }) + }) + + return pipe.write('meh'); + +} + diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/readArray.asynct.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/readArray.asynct.js new file mode 100644 index 00000000..76585eef --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/readArray.asynct.js @@ -0,0 +1,88 @@ + +var es = require('../') + , it = require('it-is').style('colour') + , d = require('ubelt') + +function readStream(stream, pauseAt, done) { + if(!done) done = pauseAt, pauseAt = -1 + var array = [] + stream.on('data', function (data) { + array.push(data) + if(!--pauseAt ) + stream.pause(), done(null, array) + }) + stream.on('error', done) + stream.on('end', function (data) { + done(null, array) + }) + +} + +exports ['read an array'] = function (test) { + + var readThis = d.map(3, 6, 100, d.id) //array of multiples of 3 < 100 + + var reader = es.readArray(readThis) + + var writer = es.writeArray(function (err, array){ + if(err) throw err //unpossible + it(array).deepEqual(readThis) + test.done() + }) + + reader.pipe(writer) +} + +exports ['read an array and pause it.'] = function (test) { + + var readThis = d.map(3, 6, 100, d.id) //array of multiples of 3 < 100 + + var reader = es.readArray(readThis) + + readStream(reader, 10, function (err, data) { + if(err) throw err + it(data).deepEqual([3, 6, 9, 12, 15, 18, 21, 24, 27, 30]) + readStream(reader, 10, function (err, data) { + it(data).deepEqual([33, 36, 39, 42, 45, 48, 51, 54, 57, 60]) + test.done() + }) + reader.resume() + }) + +} + +exports ['reader is readable, but not writeable'] = function (test) { + var reader = es.readArray([1]) + it(reader).has({ + readable: true, + writable: false + }) + + test.done() +} + + +exports ['read one item per tick'] = function (test) { + var readThis = d.map(3, 6, 100, d.id) //array of multiples of 3 < 100 + var drains = 0 + var reader = es.readArray(readThis) + var tickMapper = es.map(function (data,callback) { + process.nextTick(function () { + callback(null, data) + }) + //since tickMapper is returning false + //pipe should pause the writer until a drain occurs + return false + }) + reader.pipe(tickMapper) + readStream(tickMapper, function (err, array) { + it(array).deepEqual(readThis) + it(array.length).deepEqual(readThis.length) + it(drains).equal(readThis.length) + test.done() + }) + tickMapper.on('drain', function () { + drains ++ + }) + +} diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/readable.asynct.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/readable.asynct.js new file mode 100644 index 00000000..77d0039e --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/readable.asynct.js @@ -0,0 +1,167 @@ + +var es = require('../') + , it = require('it-is').style('colour') + , u = require('ubelt') + +exports ['read an array'] = function (test) { + + var readThis = u.map(3, 6, 100, u.id) //array of multiples of 3 < 100 + + var reader = + es.readable(function (i, callback) { + if(i >= readThis.length) + return this.emit('end') + callback(null, readThis[i]) + }) + + var writer = es.writeArray(function (err, array){ + if(err) throw err + it(array).deepEqual(readThis) + test.done() + }) + + reader.pipe(writer) +} + +exports ['read an array - async'] = function (test) { + + var readThis = u.map(3, 6, 100, u.id) //array of multiples of 3 < 100 + + var reader = + es.readable(function (i, callback) { + if(i >= readThis.length) + return this.emit('end') + u.delay(callback)(null, readThis[i]) + }) + + var writer = es.writeArray(function (err, array){ + if(err) throw err + it(array).deepEqual(readThis) + test.done() + }) + + reader.pipe(writer) +} + + +exports ['emit data then call next() also works'] = function (test) { + + var readThis = u.map(3, 6, 100, u.id) //array of multiples of 3 < 100 + + var reader = + es.readable(function (i, next) { + if(i >= readThis.length) + return this.emit('end') + this.emit('data', readThis[i]) + next() + }) + + var writer = es.writeArray(function (err, array){ + if(err) throw err + it(array).deepEqual(readThis) + test.done() + }) + + reader.pipe(writer) +} + + +exports ['callback emits error, then stops'] = function (test) { + + var err = new Error('INTENSIONAL ERROR') + , called = 0 + + var reader = + es.readable(function (i, callback) { + if(called++) + return + callback(err) + }) + + reader.on('error', function (_err){ + it(_err).deepEqual(err) + u.delay(function() { + it(called).equal(1) + test.done() + }, 50)() + }) +} + +exports['readable does not call read concurrently'] = function (test) { + + var current = 0 + var source = es.readable(function(count, cb){ + current ++ + if(count > 100) + return this.emit('end') + u.delay(function(){ + current -- + it(current).equal(0) + cb(null, {ok: true, n: count}); + })(); + }); + + var destination = es.map(function(data, cb){ + //console.info(data); + cb(); + }); + + var all = es.connect(source, destination); + + destination.on('end', test.done) +} + + +// +// emitting multiple errors is not supported by stream. +// +// I do not think that this is a good idea, at least, there should be an option to pipe to +// continue on error. it makes alot ef sense, if you are using Stream like I am, to be able to emit multiple errors. +// an error might not necessarily mean the end of the stream. it depends on the error, at least. +// +// I will start a thread on the mailing list. I'd rather that than use a custom `pipe` implementation. +// +// basically, I want to be able use pipe to transform objects, and if one object is invalid, +// the next might still be good, so I should get to choose if it's gonna stop. +// re-enstate this test when this issue progresses. +// +// hmm. I could add this to es.connect by deregistering the error listener, +// but I would rather it be an option in core. + +/* +exports ['emit multiple errors, with 2nd parameter (continueOnError)'] = function (test) { + + var readThis = d.map(1, 100, d.id) + , errors = 0 + var reader = + es.readable(function (i, callback) { + console.log(i, readThis.length) + if(i >= readThis.length) + return this.emit('end') + if(!(readThis[i] % 7)) + return callback(readThis[i]) + callback(null, readThis[i]) + }, true) + + var writer = es.writeArray(function (err, array) { + if(err) throw err + it(array).every(function (u){ + it(u % 7).notEqual(0) + }).property('length', 80) + it(errors).equal(14) + test.done() + }) + + reader.on('error', function (u) { + errors ++ + console.log(u) + if('number' !== typeof u) + throw u + + it(u % 7).equal(0) + + }) + + reader.pipe(writer) +} +*/ diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/replace.asynct.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/replace.asynct.js new file mode 100644 index 00000000..7fabf6e3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/replace.asynct.js @@ -0,0 +1,50 @@ +var es = require('../') + , it = require('it-is').style('colour') + , d = require('ubelt') + , spec = require('stream-spec') + +var next = process.nextTick + +var fizzbuzz = '12F4BF78FB11F1314FB1617F19BF2223FB26F2829FB3132F34BF3738FB41F4344FB4647F49BF5253FB56F5859FB6162F64BF6768FB71F7374FB7677F79BF8283FB86F8889FB9192F94BF9798FB' + , fizz7buzz = '12F4BFseven8FB11F1314FB161sevenF19BF2223FB26F2829FB3132F34BF3seven38FB41F4344FB464sevenF49BF5253FB56F5859FB6162F64BF6seven68FBseven1Fseven3seven4FBseven6sevensevenFseven9BF8283FB86F8889FB9192F94BF9seven98FB' + +exports ['fizz buzz'] = function (test) { + + var readThis = d.map(1, 100, function (i) { + return ( + ! (i % 3 || i % 5) ? "FB" : + !(i % 3) ? "F" : + !(i % 5) ? "B" : + ''+i + ) + }) //array of multiples of 3 < 100 + + var reader = es.readArray(readThis) + var join = es.wait(function (err, string){ + it(string).equal(fizzbuzz) + test.done() + }) + reader.pipe(join) + +} + + +exports ['fizz buzz replace'] = function (test) { + var split = es.split(/(1)/) + var replace = es.replace('7', 'seven') + var x = spec(replace).through() + split + .pipe(replace) + .pipe(es.join(function (err, string) { + it(string).equal(fizz7buzz) + })) + + replace.on('close', function () { + x.validate() + test.done() + }) + + split.write(fizzbuzz) + split.end() + +} diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/simple-map.asynct.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/simple-map.asynct.js new file mode 100644 index 00000000..4786faab --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/simple-map.asynct.js @@ -0,0 +1,342 @@ +'use strict'; + +var es = require('../') + , it = require('it-is') + , u = require('ubelt') + , spec = require('stream-spec') + , Stream = require('stream') + , from = require('from') + , through = require('through') + +//REFACTOR THIS TEST TO USE es.readArray and es.writeArray + +function writeArray(array, stream) { + + array.forEach( function (j) { + stream.write(j) + }) + stream.end() + +} + +function readStream(stream, done) { + + var array = [] + stream.on('data', function (data) { + array.push(data) + }) + stream.on('error', done) + stream.on('end', function (data) { + done(null, array) + }) + +} + +//call sink on each write, +//and complete when finished. + +function pauseStream (prob, delay) { + var pauseIf = ( + 'number' == typeof prob + ? function () { + return Math.random() < prob + } + : 'function' == typeof prob + ? prob + : 0.1 + ) + var delayer = ( + !delay + ? process.nextTick + : 'number' == typeof delay + ? function (next) { setTimeout(next, delay) } + : delay + ) + + return es.through(function (data) { + if(!this.paused && pauseIf()) { + console.log('PAUSE STREAM PAUSING') + this.pause() + var self = this + delayer(function () { + console.log('PAUSE STREAM RESUMING') + self.resume() + }) + } + console.log("emit ('data', " + data + ')') + this.emit('data', data) + }) +} + +exports ['simple map'] = function (test) { + + var input = u.map(1, 1000, function () { + return Math.random() + }) + var expected = input.map(function (v) { + return v * 2 + }) + + var pause = pauseStream(0.1) + var fs = from(input) + var ts = es.writeArray(function (err, ar) { + it(ar).deepEqual(expected) + test.done() + }) + var map = es.through(function (data) { + this.emit('data', data * 2) + }) + + spec(map).through().validateOnExit() + spec(pause).through().validateOnExit() + + fs.pipe(map).pipe(pause).pipe(ts) +} + +exports ['simple map applied to a stream'] = function (test) { + + var input = [1,2,3,7,5,3,1,9,0,2,4,6] + //create event stream from + + var doubler = es.map(function (data, cb) { + cb(null, data * 2) + }) + + spec(doubler).through().validateOnExit() + + //a map is only a middle man, so it is both readable and writable + + it(doubler).has({ + readable: true, + writable: true, + }) + + readStream(doubler, function (err, output) { + it(output).deepEqual(input.map(function (j) { + return j * 2 + })) +// process.nextTick(x.validate) + test.done() + }) + + writeArray(input, doubler) + +} + +exports['pipe two maps together'] = function (test) { + + var input = [1,2,3,7,5,3,1,9,0,2,4,6] + //create event stream from + function dd (data, cb) { + cb(null, data * 2) + } + var doubler1 = es.map(dd), doubler2 = es.map(dd) + + doubler1.pipe(doubler2) + + spec(doubler1).through().validateOnExit() + spec(doubler2).through().validateOnExit() + + readStream(doubler2, function (err, output) { + it(output).deepEqual(input.map(function (j) { + return j * 4 + })) + test.done() + }) + + writeArray(input, doubler1) + +} + +//next: +// +// test pause, resume and drian. +// + +// then make a pipe joiner: +// +// plumber (evStr1, evStr2, evStr3, evStr4, evStr5) +// +// will return a single stream that write goes to the first + +exports ['map will not call end until the callback'] = function (test) { + + var ticker = es.map(function (data, cb) { + process.nextTick(function () { + cb(null, data * 2) + }) + }) + + spec(ticker).through().validateOnExit() + + ticker.write('x') + ticker.end() + + ticker.on('end', function () { + test.done() + }) +} + + +exports ['emit error thrown'] = function (test) { + + var err = new Error('INTENSIONAL ERROR') + , mapper = + es.map(function () { + throw err + }) + + mapper.on('error', function (_err) { + it(_err).equal(err) + test.done() + }) + +// onExit(spec(mapper).basic().validate) +//need spec that says stream may error. + + mapper.write('hello') + +} + +exports ['emit error calledback'] = function (test) { + + var err = new Error('INTENSIONAL ERROR') + , mapper = + es.map(function (data, callback) { + callback(err) + }) + + mapper.on('error', function (_err) { + it(_err).equal(err) + test.done() + }) + + mapper.write('hello') + +} + +exports ['do not emit drain if not paused'] = function (test) { + + var map = es.map(function (data, callback) { + u.delay(callback)(null, 1) + return true + }) + + spec(map).through().pausable().validateOnExit() + + map.on('drain', function () { + it(false).ok('should not emit drain unless the stream is paused') + }) + + it(map.write('hello')).equal(true) + it(map.write('hello')).equal(true) + it(map.write('hello')).equal(true) + setTimeout(function () {map.end()},10) + map.on('end', test.done) +} + +exports ['emits drain if paused, when all '] = function (test) { + var active = 0 + var drained = false + var map = es.map(function (data, callback) { + active ++ + u.delay(function () { + active -- + callback(null, 1) + })() + console.log('WRITE', false) + return false + }) + + spec(map).through().validateOnExit() + + map.on('drain', function () { + drained = true + it(active).equal(0, 'should emit drain when all maps are done') + }) + + it(map.write('hello')).equal(false) + it(map.write('hello')).equal(false) + it(map.write('hello')).equal(false) + + process.nextTick(function () {map.end()},10) + + map.on('end', function () { + console.log('end') + it(drained).ok('shoud have emitted drain before end') + test.done() + }) + +} + +exports ['map applied to a stream with filtering'] = function (test) { + + var input = [1,2,3,7,5,3,1,9,0,2,4,6] + + var doubler = es.map(function (data, callback) { + if (data % 2) + callback(null, data * 2) + else + callback() + }) + + readStream(doubler, function (err, output) { + it(output).deepEqual(input.filter(function (j) { + return j % 2 + }).map(function (j) { + return j * 2 + })) + test.done() + }) + + spec(doubler).through().validateOnExit() + + writeArray(input, doubler) + +} + +exports ['simple mapSync applied to a stream'] = function (test) { + + var input = [1,2,3,7,5,3,1,9,0,2,4,6] + + var doubler = es.mapSync(function (data) { + return data * 2 + }) + + readStream(doubler, function (err, output) { + it(output).deepEqual(input.map(function (j) { + return j * 2 + })) + test.done() + }) + + spec(doubler).through().validateOnExit() + + writeArray(input, doubler) + +} + +exports ['mapSync applied to a stream with filtering'] = function (test) { + + var input = [1,2,3,7,5,3,1,9,0,2,4,6] + + var doubler = es.mapSync(function (data) { + if (data % 2) + return data * 2 + }) + + readStream(doubler, function (err, output) { + it(output).deepEqual(input.filter(function (j) { + return j % 2 + }).map(function (j) { + return j * 2 + })) + test.done() + }) + + spec(doubler).through().validateOnExit() + + writeArray(input, doubler) + +} + diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/spec.asynct.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/spec.asynct.js new file mode 100644 index 00000000..516dbf4d --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/spec.asynct.js @@ -0,0 +1,85 @@ +/* + assert that data is called many times + assert that end is called eventually + + assert that when stream enters pause state, + on drain is emitted eventually. +*/ + +var es = require('..') +var it = require('it-is').style('colour') +var spec = require('stream-spec') + +exports['simple stream'] = function (test) { + + var stream = es.through() + var x = spec(stream).basic().pausable() + + stream.write(1) + stream.write(1) + stream.pause() + stream.write(1) + stream.resume() + stream.write(1) + stream.end(2) //this will call write() + + process.nextTick(function (){ + x.validate() + test.done() + }) +} + +exports['throw on write when !writable'] = function (test) { + + var stream = es.through() + var x = spec(stream).basic().pausable() + + stream.write(1) + stream.write(1) + stream.end(2) //this will call write() + stream.write(1) //this will be throwing..., but the spec will catch it. + + process.nextTick(function () { + x.validate() + test.done() + }) + +} + +exports['end fast'] = function (test) { + + var stream = es.through() + var x = spec(stream).basic().pausable() + + stream.end() //this will call write() + + process.nextTick(function () { + x.validate() + test.done() + }) + +} + + +/* + okay, that was easy enough, whats next? + + say, after you call paused(), write should return false + until resume is called. + + simple way to implement this: + write must return !paused + after pause() paused = true + after resume() paused = false + + on resume, if !paused drain is emitted again. + after drain, !paused + + there are lots of subtle ordering bugs in streams. + + example, set !paused before emitting drain. + + the stream api is stateful. +*/ + + diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/split.asynct.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/split.asynct.js new file mode 100644 index 00000000..a0ce4b29 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/split.asynct.js @@ -0,0 +1,46 @@ +var es = require('../') + , it = require('it-is').style('colour') + , d = require('ubelt') + , join = require('path').join + , fs = require('fs') + , Stream = require('stream').Stream + , spec = require('stream-spec') + +exports ['es.split() works like String#split'] = function (test) { + var readme = join(__filename) + , expected = fs.readFileSync(readme, 'utf-8').split('\n') + , cs = es.split() + , actual = [] + , ended = false + , x = spec(cs).through() + + var a = new Stream () + + a.write = function (l) { + actual.push(l.trim()) + } + a.end = function () { + + ended = true + expected.forEach(function (v,k) { + //String.split will append an empty string '' + //if the string ends in a split pattern. + //es.split doesn't which was breaking this test. + //clearly, appending the empty string is correct. + //tests are passing though. which is the current job. + if(v) + it(actual[k]).like(v) + }) + //give the stream time to close + process.nextTick(function () { + test.done() + x.validate() + }) + } + a.writable = true + + fs.createReadStream(readme, {flags: 'r'}).pipe(cs) + cs.pipe(a) + +} + diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/stringify.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/stringify.js new file mode 100644 index 00000000..a77887be --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/stringify.js @@ -0,0 +1,14 @@ + + + +var es = require('../') + +exports['handle buffer'] = function (t) { + + + es.stringify().on('data', function (d) { + t.equal(d.trim(), JSON.stringify('HELLO')) + t.end() + }).write(new Buffer('HELLO')) + +} diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/writeArray.asynct.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/writeArray.asynct.js new file mode 100644 index 00000000..f09fea27 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/event-stream/test/writeArray.asynct.js @@ -0,0 +1,30 @@ + +var es = require('../') + , it = require('it-is').style('colour') + , d = require('ubelt') + +exports ['write an array'] = function (test) { + + var readThis = d.map(3, 6, 100, d.id) //array of multiples of 3 < 100 + + var writer = es.writeArray(function (err, array){ + if(err) throw err //unpossible + it(array).deepEqual(readThis) + test.done() + }) + + d.each(readThis, writer.write.bind(writer)) + writer.end() + +} + + +exports ['writer is writable, but not readable'] = function (test) { + var reader = es.writeArray(function () {}) + it(reader).has({ + readable: false, + writable: true + }) + + test.done() +} diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/.npmignore b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/.npmignore new file mode 100644 index 00000000..ee889666 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/.npmignore @@ -0,0 +1 @@ +assets/ diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/.travis.yml b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/.travis.yml new file mode 100644 index 00000000..84fd7ca2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/.travis.yml @@ -0,0 +1,5 @@ +language: node_js +node_js: + - 0.6 + - 0.8 + - 0.9 diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/README.md b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/README.md new file mode 100644 index 00000000..6cd71ba3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/README.md @@ -0,0 +1,98 @@ +# tap-stream [![Build Status](https://secure.travis-ci.org/thlorenz/tap-stream.png)](http://travis-ci.org/thlorenz/tap-stream) + +Taps a nodejs stream and logs the data that's coming through. + + npm install tap-stream + +Given an [object stream](#object-stream) we can print out objects passing through and control the detail via the +depth parameter: + +```javascript +objectStream().pipe(tap(0)); +``` + +![depth0](https://github.com/thlorenz/tap-stream/raw/master/assets/depth0.png) + +```javascript +objectStream().pipe(tap(1)); +``` + +![depth1](https://github.com/thlorenz/tap-stream/raw/master/assets/depth1.png) + +``` +objectStream().pipe(tap(2)); +``` + +![depth2](https://github.com/thlorenz/tap-stream/raw/master/assets/depth2.png) + +For even more control a custom log function may be supplied: + +```javascript +objectStream() + .pipe(tap(function customLog (data) { + var nest = data.nest; + console.log ('Bird: %s, id: %s, age: %s, layed egg: %s', nest.name, data.id, nest.age, nest.egg !== undefined); + }) + ); +``` + +```text +Bird: yellow rumped warbler, id: 0, age: 1, layed egg: true +Bird: yellow rumped warbler, id: 1, age: 1, layed egg: true +``` + +## API + +### tap( [ depth | log ] ) + +Intercepts the stream and logs data that is passing through. + +- optional parameter is either a `Number` or a `Function` +- if no parameter is given, `depth` defaults to `0` and `log` to `console.log(util.inspect(..))` + +- `depth` controls the `depth` with which + [util.inspect](http://nodejs.org/api/util.html#util_util_inspect_object_showhidden_depth_colors) is called +- `log` replaces the default logging function with a custom one + +**Example:** + +```javascript +var tap = require('tap-stream'); + +myStream + .pipe(tap(1)) // log intermediate results + .pipe(..) // continute manipulating the data +``` + +## Object stream + +Included in order to give context for above examples. + +```javascript +function objectStream () { + var s = new Stream() + , objects = 0; + + var iv = setInterval( + function () { + s.emit('data', { + id: objects + , created: new Date() + , nest: { + name: 'yellow rumped warbler' + , age: 1 + , egg: { name: 'unknown' , age: 0 } + } + } + , 4 + ); + + if (++objects === 2) { + s.emit('end'); + clearInterval(iv); + } + } + , 200); + return s; +} +``` diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/examples/tap-nested-objects.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/examples/tap-nested-objects.js new file mode 100644 index 00000000..97aa5787 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/examples/tap-nested-objects.js @@ -0,0 +1,38 @@ +var Stream = require('stream') + , tap = require('..'); + +function objectStream () { + var s = new Stream() + , objects = 0; + + var iv = setInterval( + function () { + s.emit('data', { + id: objects + , created: new Date() + , nest: { + name: 'yellow rumped warbler' + , age: 1 + , egg: { name: 'unknown' , age: 0 } + } + } + ); + + if (++objects === 2) { + s.emit('end'); + clearInterval(iv); + } + } + , 200); + return s; +} + +objectStream().pipe(tap(2)); + +objectStream() + .pipe(tap(function customLog (data) { + var nest = data.nest; + console.log ('Bird: %s, id: %s, age: %s, layed egg: %s', nest.name, data.id, nest.age, nest.egg !== undefined); + }) + ); + diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/index.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/index.js new file mode 100644 index 00000000..a541dfeb --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/index.js @@ -0,0 +1,56 @@ +'use strict'; + +var util = require('util') + , through = require('through') + , toString = Object.prototype.toString + , slice = Array.prototype.slice; + +function blowup () { + throw new Error('Argument to streamTap needs to be either Number for depth or a log Function'); +} + +function defaultLog (depth) { + function log (data) { + console.log(util.inspect(data, false, depth, true)); + } + + return function (data) { + if (arguments.length === 1) { + log(data); + } else { + slice.call(arguments).forEach(log); + } + }; +} + +// invoke three ways: +// tap () +// tap (depth) +// tap (log) +function tap (arg0) { + var log; + + if (!arguments.length) { + log = defaultLog(1); + } else { + + if (toString.call(arg0) === '[object Number]' ) { + log = defaultLog(arg0); + } else if (toString.call(arg0) === '[object Function]' ) { + log = arg0; + } else { + blowup(); + } + + } + + return through( + function write (data) { + log(data); + this.emit('data', data); + } + ); + +} + +module.exports = tap; diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/node_modules/through/.travis.yml b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/node_modules/through/.travis.yml new file mode 100644 index 00000000..895dbd36 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/node_modules/through/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.6 + - 0.8 diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/node_modules/through/LICENSE.APACHE2 b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/node_modules/through/LICENSE.APACHE2 new file mode 100644 index 00000000..6366c047 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/node_modules/through/LICENSE.APACHE2 @@ -0,0 +1,15 @@ +Apache License, Version 2.0 + +Copyright (c) 2011 Dominic Tarr + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/node_modules/through/LICENSE.MIT b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/node_modules/through/LICENSE.MIT new file mode 100644 index 00000000..6eafbd73 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/node_modules/through/LICENSE.MIT @@ -0,0 +1,24 @@ +The MIT License + +Copyright (c) 2011 Dominic Tarr + +Permission is hereby granted, free of charge, +to any person obtaining a copy of this software and +associated documentation files (the "Software"), to +deal in the Software without restriction, including +without limitation the rights to use, copy, modify, +merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom +the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice +shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES +OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/node_modules/through/index.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/node_modules/through/index.js new file mode 100644 index 00000000..7072b37f --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/node_modules/through/index.js @@ -0,0 +1,100 @@ +var Stream = require('stream') + +// through +// +// a stream that does nothing but re-emit the input. +// useful for aggregating a series of changing but not ending streams into one stream) + + + +exports = module.exports = through +through.through = through + +//create a readable writable stream. + +function through (write, end) { + write = write || function (data) { this.emit('data', data) } + end = end || function () { this.emit('end') } + + var ended = false, destroyed = false + var stream = new Stream(), buffer = [] + stream.buffer = buffer + stream.readable = stream.writable = true + stream.paused = false + stream.write = function (data) { + write.call(this, data) + return !stream.paused + } + + function drain() { + while(buffer.length && !stream.paused) { + var data = buffer.shift() + if(null === data) + return stream.emit('end') + else + stream.emit('data', data) + } + } + + stream.queue = function (data) { + buffer.push(data) + drain() + } + + //this will be registered as the first 'end' listener + //must call destroy next tick, to make sure we're after any + //stream piped from here. + //this is only a problem if end is not emitted synchronously. + //a nicer way to do this is to make sure this is the last listener for 'end' + + stream.on('end', function () { + stream.readable = false + if(!stream.writable) + process.nextTick(function () { + stream.destroy() + }) + }) + + function _end () { + stream.writable = false + end.call(stream) + if(!stream.readable) + stream.destroy() + } + + stream.end = function (data) { + if(ended) return + //this breaks, because pipe doesn't check writable before calling end. + //throw new Error('cannot call end twice') + ended = true + if(arguments.length) stream.write(data) + if(!buffer.length) _end() + } + + stream.destroy = function () { + if(destroyed) return + destroyed = true + ended = true + buffer.length = 0 + stream.writable = stream.readable = false + stream.emit('close') + } + + stream.pause = function () { + if(stream.paused) return + stream.paused = true + stream.emit('pause') + } + stream.resume = function () { + if(stream.paused) { + stream.paused = false + } + drain() + //may have become paused again, + //as drain emits 'data'. + if(!stream.paused) + stream.emit('drain') + } + return stream +} + diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/node_modules/through/package.json b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/node_modules/through/package.json new file mode 100644 index 00000000..168247e9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/node_modules/through/package.json @@ -0,0 +1,34 @@ +{ + "name": "through", + "version": "1.1.0", + "description": "simplified stream contruction", + "main": "index.js", + "scripts": { + "test": "asynct test/*.js" + }, + "devDependencies": { + "stream-spec": "0", + "assertions": "2", + "asynct": "1" + }, + "keywords": [ + "stream", + "streams", + "user-streams", + "pipe" + ], + "author": { + "name": "Dominic Tarr", + "email": "dominic.tarr@gmail.com", + "url": "dominictarr.com" + }, + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/dominictarr/through.git" + }, + "homepage": "http://github.com/dominictarr/through", + "readme": "#through\n\n[![build status](https://secure.travis-ci.org/dominictarr/through.png)](http://travis-ci.org/dominictarr/through)\n\nEasy way to create a `Stream` that is both `readable` and `writable`. Pass in optional `write` and `end` methods. `through` takes care of pause/resume logic.\nUse `this.pause()` and `this.resume()` to manage flow.\nCheck `this.paused` to see current flow state. (write always returns `!this.paused`)\n\nthis function is the basis for most of the syncronous streams in [event-stream](http://github.com/dominictarr/event-stream).\n\n``` js\nvar through = require('through')\n\nthrough(function write(data) {\n this.emit('data', data)\n //this.pause() \n },\n function end () { //optional\n this.emit('end')\n })\n\n```\n\nor, with buffering on pause, use `this.queue(data)`,\ndata *cannot* be `null`. `this.queue(null)` will emit 'end'\nwhen it gets to the `null` element.\n\n``` js\nvar through = require('through')\n\nthrough(function write(data) {\n this.queue(data)\n //this.pause() \n },\n function end () { //optional\n this.queue(null)\n })\n\n```\n\n\n## License\n\nMIT / Apache2\n", + "_id": "through@1.1.0", + "_from": "through@~1.1.0" +} diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/node_modules/through/readme.markdown b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/node_modules/through/readme.markdown new file mode 100644 index 00000000..1b687e9c --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/node_modules/through/readme.markdown @@ -0,0 +1,44 @@ +#through + +[![build status](https://secure.travis-ci.org/dominictarr/through.png)](http://travis-ci.org/dominictarr/through) + +Easy way to create a `Stream` that is both `readable` and `writable`. Pass in optional `write` and `end` methods. `through` takes care of pause/resume logic. +Use `this.pause()` and `this.resume()` to manage flow. +Check `this.paused` to see current flow state. (write always returns `!this.paused`) + +this function is the basis for most of the syncronous streams in [event-stream](http://github.com/dominictarr/event-stream). + +``` js +var through = require('through') + +through(function write(data) { + this.emit('data', data) + //this.pause() + }, + function end () { //optional + this.emit('end') + }) + +``` + +or, with buffering on pause, use `this.queue(data)`, +data *cannot* be `null`. `this.queue(null)` will emit 'end' +when it gets to the `null` element. + +``` js +var through = require('through') + +through(function write(data) { + this.queue(data) + //this.pause() + }, + function end () { //optional + this.queue(null) + }) + +``` + + +## License + +MIT / Apache2 diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/node_modules/through/test/buffering.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/node_modules/through/test/buffering.js new file mode 100644 index 00000000..1ce4b0d1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/node_modules/through/test/buffering.js @@ -0,0 +1,37 @@ +var through = require('..') + +// must emit end before close. + +exports['buffering'] = function (t) { + var ts = through(function (data) { + this.queue(data) + }, function () { + this.queue(null) + }) + + var ended = false, actual = [] + + ts.on('data', actual.push.bind(actual)) + ts.on('end', function () { + ended = true + }) + + ts.write(1) + ts.write(2) + ts.write(3) + t.deepEqual(actual, [1, 2, 3]) + ts.pause() + ts.write(4) + ts.write(5) + ts.write(6) + t.deepEqual(actual, [1, 2, 3]) + ts.resume() + t.deepEqual(actual, [1, 2, 3, 4, 5, 6]) + ts.pause() + ts.end() + t.ok(!ended) + ts.resume() + t.ok(ended) + t.end() + +} diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/node_modules/through/test/end.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/node_modules/through/test/end.js new file mode 100644 index 00000000..280da0a4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/node_modules/through/test/end.js @@ -0,0 +1,27 @@ +var through = require('..') + +// must emit end before close. + +exports['end before close'] = function (t) { + var ts = through() + var ended = false, closed = false + + ts.on('end', function () { + t.ok(!closed) + ended = true + }) + ts.on('close', function () { + t.ok(ended) + closed = true + }) + + ts.write(1) + ts.write(2) + ts.write(3) + ts.end() + t.ok(ended) + t.ok(closed) + + t.end() + +} diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/node_modules/through/test/index.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/node_modules/through/test/index.js new file mode 100644 index 00000000..25a6ea7e --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/node_modules/through/test/index.js @@ -0,0 +1,113 @@ + +var spec = require('stream-spec') +var through = require('..') +var a = require('assertions') + +/* + I'm using these two functions, and not streams and pipe + so there is less to break. if this test fails it must be + the implementation of _through_ +*/ + +function write(array, stream) { + array = array.slice() + function next() { + while(array.length) + if(stream.write(array.shift()) === false) + return stream.once('drain', next) + + stream.end() + } + + next() +} + +function read(stream, callback) { + var actual = [] + stream.on('data', function (data) { + actual.push(data) + }) + stream.once('end', function () { + callback(null, actual) + }) + stream.once('error', function (err) { + callback(err) + }) +} + +exports['simple defaults'] = function (test) { + + var l = 1000 + , expected = [] + + while(l--) expected.push(l * Math.random()) + + var t = through() + spec(t) + .through() + .pausable() + .validateOnExit() + + read(t, function (err, actual) { + if(err) test.error(err) //fail + a.deepEqual(actual, expected) + test.done() + }) + + write(expected, t) +} + +exports['simple functions'] = function (test) { + + var l = 1000 + , expected = [] + + while(l--) expected.push(l * Math.random()) + + var t = through(function (data) { + this.emit('data', data*2) + }) + spec(t) + .through() + .pausable() + .validateOnExit() + + read(t, function (err, actual) { + if(err) test.error(err) //fail + a.deepEqual(actual, expected.map(function (data) { + return data*2 + })) + test.done() + }) + + write(expected, t) +} +exports['pauses'] = function (test) { + + var l = 1000 + , expected = [] + + while(l--) expected.push(l) //Math.random()) + + var t = through() + spec(t) + .through() + .pausable() + .validateOnExit() + + t.on('data', function () { + if(Math.random() > 0.1) return + t.pause() + process.nextTick(function () { + t.resume() + }) + }) + + read(t, function (err, actual) { + if(err) test.error(err) //fail + a.deepEqual(actual, expected) + test.done() + }) + + write(expected, t) +} diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/package.json b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/package.json new file mode 100644 index 00000000..80405795 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/package.json @@ -0,0 +1,38 @@ +{ + "name": "tap-stream", + "version": "0.1.0", + "author": { + "name": "Thorsten Lorenz", + "email": "thlorenz@gmx.de", + "url": "http://thlorenz.com" + }, + "description": "Taps a nodejs stream and logs the data that's coming through.", + "main": "index.js", + "directories": { + "test": "test" + }, + "scripts": { + "test": "tap ./test/*.js" + }, + "repository": { + "type": "git", + "url": "git://github.com/thlorenz/tap-stream.git" + }, + "keywords": [ + "stream", + "streams", + "log", + "print", + "inspect" + ], + "license": "BSD", + "dependencies": { + "through": "~1.1.0" + }, + "devDependencies": { + "tap": "~0.3.1" + }, + "readme": "# tap-stream [![Build Status](https://secure.travis-ci.org/thlorenz/tap-stream.png)](http://travis-ci.org/thlorenz/tap-stream)\n\nTaps a nodejs stream and logs the data that's coming through.\n\n npm install tap-stream\n\nGiven an [object stream](#object-stream) we can print out objects passing through and control the detail via the\ndepth parameter:\n\n```javascript\nobjectStream().pipe(tap(0));\n```\n\n![depth0](https://github.com/thlorenz/tap-stream/raw/master/assets/depth0.png)\n\n```javascript\nobjectStream().pipe(tap(1));\n```\n\n![depth1](https://github.com/thlorenz/tap-stream/raw/master/assets/depth1.png)\n\n```\nobjectStream().pipe(tap(2));\n```\n\n![depth2](https://github.com/thlorenz/tap-stream/raw/master/assets/depth2.png)\n\nFor even more control a custom log function may be supplied:\n\n```javascript\nobjectStream()\n .pipe(tap(function customLog (data) {\n var nest = data.nest;\n console.log ('Bird: %s, id: %s, age: %s, layed egg: %s', nest.name, data.id, nest.age, nest.egg !== undefined);\n })\n );\n```\n\n```text\nBird: yellow rumped warbler, id: 0, age: 1, layed egg: true\nBird: yellow rumped warbler, id: 1, age: 1, layed egg: true\n```\n\n## API\n\n### tap( [ depth | log ] )\n\nIntercepts the stream and logs data that is passing through.\n\n- optional parameter is either a `Number` or a `Function`\n- if no parameter is given, `depth` defaults to `0` and `log` to `console.log(util.inspect(..))`\n\n- `depth` controls the `depth` with which\n [util.inspect](http://nodejs.org/api/util.html#util_util_inspect_object_showhidden_depth_colors) is called\n- `log` replaces the default logging function with a custom one\n\n**Example:**\n\n```javascript\nvar tap = require('tap-stream');\n\nmyStream\n .pipe(tap(1)) // log intermediate results\n .pipe(..) // continute manipulating the data\n```\n\n## Object stream\n\nIncluded in order to give context for above examples.\n\n```javascript\nfunction objectStream () {\n var s = new Stream()\n , objects = 0;\n \n var iv = setInterval(\n function () {\n s.emit('data', { \n id: objects\n , created: new Date()\n , nest: { \n name: 'yellow rumped warbler'\n , age: 1\n , egg: { name: 'unknown' , age: 0 }\n } \n }\n , 4\n );\n\n if (++objects === 2) {\n s.emit('end');\n clearInterval(iv);\n }\n }\n , 200);\n return s;\n}\n```\n", + "_id": "tap-stream@0.1.0", + "_from": "tap-stream@~0.1.0" +} diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/test/tap-stream.js b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/test/tap-stream.js new file mode 100644 index 00000000..b484fcb7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/node_modules/tap-stream/test/tap-stream.js @@ -0,0 +1,104 @@ +'use strict'; +/*jshint asi: true */ + +var test = require('tap').test + , Stream = require('stream') + , tap = require('..') + , through = require('through'); + +function objectStream () { + var s = new Stream() + , objects = 0; + + var iv = setInterval( + function () { + s.emit('data', { id: objects, created: new Date() }); + + if (++objects === 2) { + s.emit('end'); + clearInterval(iv); + } + } + , 20); + return s; +} + +test('tapping object stream that emits 2 objects', function (t) { + var logged = [] + , piped = []; + + function log (data) { + logged.push(data); + } + + t.plan(4); + + objectStream() + .pipe(tap(log)) + .pipe(through( + function write (data) { + piped.push(data); + this.emit('data', data); + } + , function end (data) { + + t.equals(0, logged[0].id, 'logs first item'); + t.equals(1, logged[1].id, 'logs second item'); + + t.equals(0, piped[0].id, 'pipes first item'); + t.equals(1, piped[1].id, 'pipes second item'); + + t.end(); + + this.emit('end'); + } + )) +}) + +/* The below doesn't work since pipe only writes one argument: + * https://github.com/joyent/node/blob/master/lib/stream.js#L36 + * + * Since it uses EventEmitter whose 'emit' supports multiple args, this may change in the future - I hope so. + * Until then ... + */ +var onDataInsidePipeWritesMultipleArgs = false; + +if (! onDataInsidePipeWritesMultipleArgs) return; + +function numberStream () { + var s = new Stream(); + + setTimeout( + function () { + s.emit('data', 1, 2); + s.emit('end'); + } + , 20); + return s; +} + +test('tapping stream that emits a number and a string one time', function (t) { + var logged = [] + , piped = []; + + function log (n1, n2) { + logged.push({ n1: n1, n2: n2 }); + } + + t.plan(2); + + numberStream() + .pipe(tap(log)) + .pipe(through( + function write (n1, n2) { + piped.push({ n1: n1, n2: n2 }); + } + , function end () { + t.equals({ n1: 1, n2: 2 }, logged[0], 'logs both numbers'); + t.equals({ n1: 1, n2: 2 }, piped[0], 'pipes both numbers'); + t.end(); + + this.emit('end'); + } + )) +}) diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/package.json b/pitfall/pdfkit/node_modules/readdirp/examples/package.json new file mode 100644 index 00000000..2d9b3411 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/package.json @@ -0,0 +1,9 @@ +{ + "name": "readdirp-examples", + "version": "0.0.0", + "description": "Examples for readdirp.", + "dependencies": { + "tap-stream": "~0.1.0", + "event-stream": "~3.0.7" + } +} diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/stream-api-pipe.js b/pitfall/pdfkit/node_modules/readdirp/examples/stream-api-pipe.js new file mode 100644 index 00000000..b09fe596 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/stream-api-pipe.js @@ -0,0 +1,13 @@ +var readdirp = require('..') + , path = require('path') + , es = require('event-stream'); + +// print out all JavaScript files along with their size +readdirp({ root: path.join(__dirname), fileFilter: '*.js' }) + .on('warn', function (err) { console.error('non-fatal error', err); }) + .on('error', function (err) { console.error('fatal error', err); }) + .pipe(es.mapSync(function (entry) { + return { path: entry.path, size: entry.stat.size }; + })) + .pipe(es.stringify()) + .pipe(process.stdout); diff --git a/pitfall/pdfkit/node_modules/readdirp/examples/stream-api.js b/pitfall/pdfkit/node_modules/readdirp/examples/stream-api.js new file mode 100644 index 00000000..0f7b327e --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/examples/stream-api.js @@ -0,0 +1,15 @@ +var readdirp = require('..') + , path = require('path'); + +readdirp({ root: path.join(__dirname), fileFilter: '*.js' }) + .on('warn', function (err) { + console.error('something went wrong when processing an entry', err); + }) + .on('error', function (err) { + console.error('something went fatally wrong and the stream was aborted', err); + }) + .on('data', function (entry) { + console.log('%s is ready for processing', entry.path); + // process entry here + }); + diff --git a/pitfall/pdfkit/node_modules/readdirp/package.json b/pitfall/pdfkit/node_modules/readdirp/package.json new file mode 100644 index 00000000..2ca9548b --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/package.json @@ -0,0 +1,98 @@ +{ + "_args": [ + [ + { + "raw": "readdirp@~0.2.3", + "scope": null, + "escapedName": "readdirp", + "name": "readdirp", + "rawSpec": "~0.2.3", + "spec": ">=0.2.3 <0.3.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/monocle" + ] + ], + "_from": "readdirp@>=0.2.3 <0.3.0", + "_id": "readdirp@0.2.5", + "_inCache": true, + "_location": "/readdirp", + "_npmUser": { + "name": "thlorenz", + "email": "thlorenz@gmx.de" + }, + "_npmVersion": "1.2.14", + "_phantomChildren": {}, + "_requested": { + "raw": "readdirp@~0.2.3", + "scope": null, + "escapedName": "readdirp", + "name": "readdirp", + "rawSpec": "~0.2.3", + "spec": ">=0.2.3 <0.3.0", + "type": "range" + }, + "_requiredBy": [ + "/monocle" + ], + "_resolved": "https://registry.npmjs.org/readdirp/-/readdirp-0.2.5.tgz", + "_shasum": "c4c276e52977ae25db5191fe51d008550f15d9bb", + "_shrinkwrap": null, + "_spec": "readdirp@~0.2.3", + "_where": "/Users/MB/git/pdfkit/node_modules/monocle", + "author": { + "name": "Thorsten Lorenz", + "email": "thlorenz@gmx.de", + "url": "thlorenz.com" + }, + "bugs": { + "url": "https://github.com/thlorenz/readdirp/issues" + }, + "dependencies": { + "minimatch": ">=0.2.4" + }, + "description": "Recursive version of fs.readdir with streaming api.", + "devDependencies": { + "minimatch": "~0.2.7", + "tap": "~0.3.1", + "through": "~1.1.0" + }, + "directories": {}, + "dist": { + "shasum": "c4c276e52977ae25db5191fe51d008550f15d9bb", + "tarball": "https://registry.npmjs.org/readdirp/-/readdirp-0.2.5.tgz" + }, + "engines": { + "node": ">=0.4" + }, + "homepage": "https://github.com/thlorenz/readdirp", + "keywords": [ + "recursive", + "fs", + "stream", + "streams", + "readdir", + "filesystem", + "find", + "filter" + ], + "license": "MIT", + "main": "readdirp.js", + "maintainers": [ + { + "name": "thlorenz", + "email": "thlorenz@gmx.de" + } + ], + "name": "readdirp", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/thlorenz/readdirp.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "0.2.5" +} diff --git a/pitfall/pdfkit/node_modules/readdirp/readdirp.js b/pitfall/pdfkit/node_modules/readdirp/readdirp.js new file mode 100644 index 00000000..6111e11d --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/readdirp.js @@ -0,0 +1,276 @@ +'use strict'; + +var fs = require('fs') + , path = require('path') + , minimatch = require('minimatch') + , toString = Object.prototype.toString + ; + +// Standard helpers +function isFunction (obj) { + return toString.call(obj) == '[object Function]'; +} + +function isString (obj) { + return toString.call(obj) == '[object String]'; +} + +function isRegExp (obj) { + return toString.call(obj) == '[object RegExp]'; +} + +function isUndefined (obj) { + return obj === void 0; +} + +/** + * Main function which ends up calling readdirRec and reads all files and directories in given root recursively. + * @param { Object } opts Options to specify root (start directory), filters and recursion depth + * @param { function } callback1 When callback2 is given calls back for each processed file - function (fileInfo) { ... }, + * when callback2 is not given, it behaves like explained in callback2 + * @param { function } callback2 Calls back once all files have been processed with an array of errors and file infos + * function (err, fileInfos) { ... } + */ +function readdir(opts, callback1, callback2) { + var stream + , handleError + , handleFatalError + , pending = 0 + , errors = [] + , readdirResult = { + directories: [] + , files: [] + } + , fileProcessed + , allProcessed + , realRoot + , aborted = false + ; + + // If no callbacks were given we will use a streaming interface + if (isUndefined(callback1)) { + var api = require('./stream-api')(); + stream = api.stream; + callback1 = api.processEntry; + callback2 = api.done; + handleError = api.handleError; + handleFatalError = api.handleFatalError; + + stream.on('close', function () { aborted = true; }); + } else { + handleError = function (err) { errors.push(err); }; + handleFatalError = function (err) { + handleError(err); + allProcessed(errors, null); + }; + } + + if (isUndefined(opts)){ + handleFatalError(new Error ( + 'Need to pass at least one argument: opts! \n' + + 'https://github.com/thlorenz/readdirp#options' + ) + ); + return stream; + } + + opts.root = opts.root || '.'; + opts.fileFilter = opts.fileFilter || function() { return true; }; + opts.directoryFilter = opts.directoryFilter || function() { return true; }; + opts.depth = typeof opts.depth === 'undefined' ? 999999999 : opts.depth; + + if (isUndefined(callback2)) { + fileProcessed = function() { }; + allProcessed = callback1; + } else { + fileProcessed = callback1; + allProcessed = callback2; + } + + function normalizeFilter (filter) { + + if (isUndefined(filter)) return undefined; + + function isNegated (filters) { + + function negated(f) { + return f.indexOf('!') === 0; + } + + var some = filters.some(negated); + if (!some) { + return false; + } else { + if (filters.every(negated)) { + return true; + } else { + // if we detect illegal filters, bail out immediately + throw new Error( + 'Cannot mix negated with non negated glob filters: ' + filters + '\n' + + 'https://github.com/thlorenz/readdirp#filters' + ); + } + } + } + + // Turn all filters into a function + if (isFunction(filter)) { + + return filter; + + } else if (isString(filter)) { + + return function (entryInfo) { + return minimatch(entryInfo.name, filter.trim()); + }; + + } else if (filter && Array.isArray(filter)) { + + if (filter) filter = filter.map(function (f) { + return f.trim(); + }); + + return isNegated(filter) ? + // use AND to concat multiple negated filters + function (entryInfo) { + return filter.every(function (f) { + return minimatch(entryInfo.name, f); + }); + } + : + // use OR to concat multiple inclusive filters + function (entryInfo) { + return filter.some(function (f) { + return minimatch(entryInfo.name, f); + }); + }; + } + } + + function processDir(currentDir, entries, callProcessed) { + if (aborted) return; + var total = entries.length + , processed = 0 + , entryInfos = [] + ; + + fs.realpath(currentDir, function(err, realCurrentDir) { + if (aborted) return; + if (err) { + handleError(err); + callProcessed(entryInfos); + return; + } + + var relDir = path.relative(realRoot, realCurrentDir); + + if (entries.length === 0) { + callProcessed([]); + } else { + entries.forEach(function (entry) { + + var fullPath = path.join(realCurrentDir, entry), + relPath = path.join(relDir, entry); + + fs.stat(fullPath, function (err, stat) { + if (err) { + handleError(err); + } else { + entryInfos.push({ + name : entry + , path : relPath // relative to root + , fullPath : fullPath + + , parentDir : relDir // relative to root + , fullParentDir : realCurrentDir + + , stat : stat + }); + } + processed++; + if (processed === total) callProcessed(entryInfos); + }); + }); + } + }); + } + + function readdirRec(currentDir, depth, callCurrentDirProcessed) { + if (aborted) return; + + fs.readdir(currentDir, function (err, entries) { + if (err) { + handleError(err); + callCurrentDirProcessed(); + return; + } + + processDir(currentDir, entries, function(entryInfos) { + + var subdirs = entryInfos + .filter(function (ei) { return ei.stat.isDirectory() && opts.directoryFilter(ei); }); + + subdirs.forEach(function (di) { + readdirResult.directories.push(di); + }); + + entryInfos + .filter(function(ei) { return ei.stat.isFile() && opts.fileFilter(ei); }) + .forEach(function (fi) { + fileProcessed(fi); + readdirResult.files.push(fi); + }); + + var pendingSubdirs = subdirs.length; + + // Be done if no more subfolders exist or we reached the maximum desired depth + if(pendingSubdirs === 0 || depth === opts.depth) { + callCurrentDirProcessed(); + } else { + // recurse into subdirs, keeping track of which ones are done + // and call back once all are processed + subdirs.forEach(function (subdir) { + readdirRec(subdir.fullPath, depth + 1, function () { + pendingSubdirs = pendingSubdirs - 1; + if(pendingSubdirs === 0) { + callCurrentDirProcessed(); + } + }); + }); + } + }); + }); + } + + // Validate and normalize filters + try { + opts.fileFilter = normalizeFilter(opts.fileFilter); + opts.directoryFilter = normalizeFilter(opts.directoryFilter); + } catch (err) { + // if we detect illegal filters, bail out immediately + handleFatalError(err); + return stream; + } + + // If filters were valid get on with the show + fs.realpath(opts.root, function(err, res) { + if (err) { + handleFatalError(err); + return stream; + } + + realRoot = res; + readdirRec(opts.root, 0, function () { + // All errors are collected into the errors array + if (errors.length > 0) { + allProcessed(errors, readdirResult); + } else { + allProcessed(null, readdirResult); + } + }); + }); + + return stream; +} + +module.exports = readdir; diff --git a/pitfall/pdfkit/node_modules/readdirp/stream-api.js b/pitfall/pdfkit/node_modules/readdirp/stream-api.js new file mode 100644 index 00000000..1cfc6162 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/stream-api.js @@ -0,0 +1,86 @@ +var Stream = require('stream'); + +function createStreamAPI () { + var stream + , processEntry + , done + , handleError + , handleFatalError + , paused = true + , controlled = false + , buffer = [] + , closed = false + ; + + stream = new Stream(); + stream.writable = false; + stream.readable = true; + + stream.pause = function () { + controlled = true; + paused = true; + }; + + stream.resume = function () { + controlled = true; + paused = false; + + // emit all buffered entries, errors and ends + while (!paused && buffer.length) { + var msg = buffer.shift(); + this.emit(msg.type, msg.data); + } + }; + + stream.destroy = function () { + closed = true; + stream.readable = false; + stream.emit('close'); + }; + + // called for each entry + processEntry = function (entry) { + if (closed) return; + return paused ? buffer.push({ type: 'data', data: entry }) : stream.emit('data', entry); + }; + + // called with all found entries when directory walk finished + done = function (err, entries) { + if (closed) return; + + // since we already emitted each entry and all non fatal errors + // all we need to do here is to signal that we are done + stream.emit('end'); + }; + + handleError = function (err) { + if (closed) return; + return paused ? buffer.push({ type: 'warn', data: err }) : stream.emit('warn', err); + }; + + handleFatalError = function (err) { + if (closed) return; + return paused ? buffer.push({ type: 'error', data: err }) : stream.emit('error', err); + }; + + // Allow stream to be returned and handlers to be attached and/or stream to be piped before emitting messages + // Otherwise we may loose data/errors that are emitted immediately + process.nextTick(function () { + if (closed) return; + + // In case was controlled (paused/resumed) manually, we don't interfer + // see https://github.com/thlorenz/readdirp/commit/ab7ff8561d73fca82c2ce7eb4ce9f7f5caf48b55#commitcomment-1964530 + if (controlled) return; + stream.resume(); + }); + + return { + stream : stream + , processEntry : processEntry + , done : done + , handleError : handleError + , handleFatalError : handleFatalError + }; +} + +module.exports = createStreamAPI; diff --git a/pitfall/pdfkit/node_modules/readdirp/test/bed/root_dir1/root_dir1_file1.ext1 b/pitfall/pdfkit/node_modules/readdirp/test/bed/root_dir1/root_dir1_file1.ext1 new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/readdirp/test/bed/root_dir1/root_dir1_file2.ext2 b/pitfall/pdfkit/node_modules/readdirp/test/bed/root_dir1/root_dir1_file2.ext2 new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/readdirp/test/bed/root_dir1/root_dir1_file3.ext3 b/pitfall/pdfkit/node_modules/readdirp/test/bed/root_dir1/root_dir1_file3.ext3 new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/readdirp/test/bed/root_dir1/root_dir1_subdir1/root1_dir1_subdir1_file1.ext1 b/pitfall/pdfkit/node_modules/readdirp/test/bed/root_dir1/root_dir1_subdir1/root1_dir1_subdir1_file1.ext1 new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/readdirp/test/bed/root_dir2/root_dir2_file1.ext1 b/pitfall/pdfkit/node_modules/readdirp/test/bed/root_dir2/root_dir2_file1.ext1 new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/readdirp/test/bed/root_dir2/root_dir2_file2.ext2 b/pitfall/pdfkit/node_modules/readdirp/test/bed/root_dir2/root_dir2_file2.ext2 new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/readdirp/test/bed/root_file1.ext1 b/pitfall/pdfkit/node_modules/readdirp/test/bed/root_file1.ext1 new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/readdirp/test/bed/root_file2.ext2 b/pitfall/pdfkit/node_modules/readdirp/test/bed/root_file2.ext2 new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/readdirp/test/bed/root_file3.ext3 b/pitfall/pdfkit/node_modules/readdirp/test/bed/root_file3.ext3 new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/readdirp/test/readdirp-stream.js b/pitfall/pdfkit/node_modules/readdirp/test/readdirp-stream.js new file mode 100644 index 00000000..261c5f67 --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/test/readdirp-stream.js @@ -0,0 +1,215 @@ +/*jshint asi:true */ + +var test = require('tap').test + , path = require('path') + , fs = require('fs') + , util = require('util') + , Stream = require('stream') + , through = require('through') + , streamapi = require('../stream-api') + , readdirp = require('..') + , root = path.join(__dirname, 'bed') + , totalDirs = 6 + , totalFiles = 12 + , ext1Files = 4 + , ext2Files = 3 + , ext3Files = 2 + ; + +// see test/readdirp.js for test bed layout + +function opts (extend) { + var o = { root: root }; + + if (extend) { + for (var prop in extend) { + o[prop] = extend[prop]; + } + } + return o; +} + +function capture () { + var result = { entries: [], errors: [], ended: false } + , dst = new Stream(); + + dst.writable = true; + dst.readable = true; + + dst.write = function (entry) { + result.entries.push(entry); + } + + dst.end = function () { + result.ended = true; + dst.emit('data', result); + dst.emit('end'); + } + + return dst; +} + +test('\nintegrated', function (t) { + t.test('\n# reading root without filter', function (t) { + t.plan(2); + readdirp(opts()) + .on('error', function (err) { + t.fail('should not throw error', err); + }) + .pipe(capture()) + .pipe(through( + function (result) { + t.equals(result.entries.length, totalFiles, 'emits all files'); + t.ok(result.ended, 'ends stream'); + t.end(); + } + )); + }) + + t.test('\n# normal: ["*.ext1", "*.ext3"]', function (t) { + t.plan(2); + + readdirp(opts( { fileFilter: [ '*.ext1', '*.ext3' ] } )) + .on('error', function (err) { + t.fail('should not throw error', err); + }) + .pipe(capture()) + .pipe(through( + function (result) { + t.equals(result.entries.length, ext1Files + ext3Files, 'all ext1 and ext3 files'); + t.ok(result.ended, 'ends stream'); + t.end(); + } + )) + }) + + t.test('\n# negated: ["!*.ext1", "!*.ext3"]', function (t) { + t.plan(2); + + readdirp(opts( { fileFilter: [ '!*.ext1', '!*.ext3' ] } )) + .on('error', function (err) { + t.fail('should not throw error', err); + }) + .pipe(capture()) + .pipe(through( + function (result) { + t.equals(result.entries.length, totalFiles - ext1Files - ext3Files, 'all but ext1 and ext3 files'); + t.ok(result.ended, 'ends stream'); + t.end(); + } + )) + }) + + t.test('\n# no options given', function (t) { + t.plan(1); + readdirp() + .on('error', function (err) { + t.similar(err.toString() , /Need to pass at least one argument/ , 'emits meaningful error'); + t.end(); + }) + }) + + t.test('\n# mixed: ["*.ext1", "!*.ext3"]', function (t) { + t.plan(1); + + readdirp(opts( { fileFilter: [ '*.ext1', '!*.ext3' ] } )) + .on('error', function (err) { + t.similar(err.toString() , /Cannot mix negated with non negated glob filters/ , 'emits meaningful error'); + t.end(); + }) + }) +}) + + +test('\napi separately', function (t) { + + t.test('\n# handleError', function (t) { + t.plan(1); + + var api = streamapi() + , warning = new Error('some file caused problems'); + + api.stream + .on('warn', function (err) { + t.equals(err, warning, 'warns with the handled error'); + }) + api.handleError(warning); + }) + + t.test('\n# when stream is paused and then resumed', function (t) { + t.plan(6); + var api = streamapi() + , resumed = false + , fatalError = new Error('fatal!') + , nonfatalError = new Error('nonfatal!') + , processedData = 'some data' + ; + + api.stream + .on('warn', function (err) { + t.equals(err, nonfatalError, 'emits the buffered warning'); + t.ok(resumed, 'emits warning only after it was resumed'); + }) + .on('error', function (err) { + t.equals(err, fatalError, 'emits the buffered fatal error'); + t.ok(resumed, 'emits errors only after it was resumed'); + }) + .on('data', function (data) { + t.equals(data, processedData, 'emits the buffered data'); + t.ok(resumed, 'emits data only after it was resumed'); + }) + .pause() + + api.processEntry(processedData); + api.handleError(nonfatalError); + api.handleFatalError(fatalError); + + process.nextTick(function () { + resumed = true; + api.stream.resume(); + }) + }) + + t.test('\n# when a stream is destroyed, it emits "closed", but no longer emits "data", "warn" and "error"', function (t) { + t.plan(6) + var api = streamapi() + , destroyed = false + , fatalError = new Error('fatal!') + , nonfatalError = new Error('nonfatal!') + , processedData = 'some data' + + var stream = api.stream + .on('warn', function (err) { + t.notOk(destroyed, 'emits warning until destroyed'); + }) + .on('error', function (err) { + t.notOk(destroyed, 'emits errors until destroyed'); + }) + .on('data', function (data) { + t.notOk(destroyed, 'emits data until destroyed'); + }) + .on('close', function () { + t.ok(destroyed, 'emits close when stream is destroyed'); + }) + + + api.processEntry(processedData); + api.handleError(nonfatalError); + api.handleFatalError(fatalError); + + process.nextTick(function () { + destroyed = true + stream.destroy() + + t.notOk(stream.readable, 'stream is no longer readable after it is destroyed') + + api.processEntry(processedData); + api.handleError(nonfatalError); + api.handleFatalError(fatalError); + + process.nextTick(function () { + t.pass('emits no more data, warn or error events after it was destroyed') + }) + }) + }) +}) diff --git a/pitfall/pdfkit/node_modules/readdirp/test/readdirp.js b/pitfall/pdfkit/node_modules/readdirp/test/readdirp.js new file mode 100644 index 00000000..f3edb52b --- /dev/null +++ b/pitfall/pdfkit/node_modules/readdirp/test/readdirp.js @@ -0,0 +1,252 @@ +/*jshint asi:true */ + +var test = require('tap').test + , path = require('path') + , fs = require('fs') + , util = require('util') + , readdirp = require('../readdirp.js') + , root = path.join(__dirname, '../test/bed') + , totalDirs = 6 + , totalFiles = 12 + , ext1Files = 4 + , ext2Files = 3 + , ext3Files = 2 + , rootDir2Files = 2 + , nameHasLength9Dirs = 2 + , depth1Files = 8 + , depth0Files = 3 + ; + +/* +Structure of test bed: + . + ├── root_dir1 + │   ├── root_dir1_file1.ext1 + │   ├── root_dir1_file2.ext2 + │   ├── root_dir1_file3.ext3 + │   ├── root_dir1_subdir1 + │   │   └── root1_dir1_subdir1_file1.ext1 + │   └── root_dir1_subdir2 + │   └── .gitignore + ├── root_dir2 + │   ├── root_dir2_file1.ext1 + │   ├── root_dir2_file2.ext2 + │   ├── root_dir2_subdir1 + │   │   └── .gitignore + │   └── root_dir2_subdir2 + │   └── .gitignore + ├── root_file1.ext1 + ├── root_file2.ext2 + └── root_file3.ext3 + + 6 directories, 13 files +*/ + +// console.log('\033[2J'); // clear console + +function opts (extend) { + var o = { root: root }; + + if (extend) { + for (var prop in extend) { + o[prop] = extend[prop]; + } + } + return o; +} + +test('\nreading root without filter', function (t) { + t.plan(2); + readdirp(opts(), function (err, res) { + t.equals(res.directories.length, totalDirs, 'all directories'); + t.equals(res.files.length, totalFiles, 'all files'); + t.end(); + }) +}) + +test('\nreading root using glob filter', function (t) { + // normal + t.test('\n# "*.ext1"', function (t) { + t.plan(1); + readdirp(opts( { fileFilter: '*.ext1' } ), function (err, res) { + t.equals(res.files.length, ext1Files, 'all ext1 files'); + t.end(); + }) + }) + t.test('\n# ["*.ext1", "*.ext3"]', function (t) { + t.plan(1); + readdirp(opts( { fileFilter: [ '*.ext1', '*.ext3' ] } ), function (err, res) { + t.equals(res.files.length, ext1Files + ext3Files, 'all ext1 and ext3 files'); + t.end(); + }) + }) + t.test('\n# "root_dir1"', function (t) { + t.plan(1); + readdirp(opts( { directoryFilter: 'root_dir1' }), function (err, res) { + t.equals(res.directories.length, 1, 'one directory'); + t.end(); + }) + }) + t.test('\n# ["root_dir1", "*dir1_subdir1"]', function (t) { + t.plan(1); + readdirp(opts( { directoryFilter: [ 'root_dir1', '*dir1_subdir1' ]}), function (err, res) { + t.equals(res.directories.length, 2, 'two directories'); + t.end(); + }) + }) + + t.test('\n# negated: "!*.ext1"', function (t) { + t.plan(1); + readdirp(opts( { fileFilter: '!*.ext1' } ), function (err, res) { + t.equals(res.files.length, totalFiles - ext1Files, 'all but ext1 files'); + t.end(); + }) + }) + t.test('\n# negated: ["!*.ext1", "!*.ext3"]', function (t) { + t.plan(1); + readdirp(opts( { fileFilter: [ '!*.ext1', '!*.ext3' ] } ), function (err, res) { + t.equals(res.files.length, totalFiles - ext1Files - ext3Files, 'all but ext1 and ext3 files'); + t.end(); + }) + }) + + t.test('\n# mixed: ["*.ext1", "!*.ext3"]', function (t) { + t.plan(1); + readdirp(opts( { fileFilter: [ '*.ext1', '!*.ext3' ] } ), function (err, res) { + t.similar(err[0].toString(), /Cannot mix negated with non negated glob filters/, 'returns meaningfull error'); + t.end(); + }) + }) + + t.test('\n# leading and trailing spaces: [" *.ext1", "*.ext3 "]', function (t) { + t.plan(1); + readdirp(opts( { fileFilter: [ ' *.ext1', '*.ext3 ' ] } ), function (err, res) { + t.equals(res.files.length, ext1Files + ext3Files, 'all ext1 and ext3 files'); + t.end(); + }) + }) + t.test('\n# leading and trailing spaces: [" !*.ext1", " !*.ext3 "]', function (t) { + t.plan(1); + readdirp(opts( { fileFilter: [ ' !*.ext1', ' !*.ext3' ] } ), function (err, res) { + t.equals(res.files.length, totalFiles - ext1Files - ext3Files, 'all but ext1 and ext3 files'); + t.end(); + }) + }) + + t.test('\n# ** glob pattern', function (t) { + t.plan(1); + readdirp(opts( { fileFilter: '**/*.ext1' } ), function (err, res) { + t.equals(res.files.length, ext1Files, 'ignores ** in **/*.ext1 -> only *.ext1 files'); + t.end(); + }) + }) +}) + +test('\n\nreading root using function filter', function (t) { + t.test('\n# file filter -> "contains root_dir2"', function (t) { + t.plan(1); + readdirp( + opts( { fileFilter: function (fi) { return fi.name.indexOf('root_dir2') >= 0; } }) + , function (err, res) { + t.equals(res.files.length, rootDir2Files, 'all rootDir2Files'); + t.end(); + } + ) + }) + + t.test('\n# directory filter -> "name has length 9"', function (t) { + t.plan(1); + readdirp( + opts( { directoryFilter: function (di) { return di.name.length === 9; } }) + , function (err, res) { + t.equals(res.directories.length, nameHasLength9Dirs, 'all all dirs with name length 9'); + t.end(); + } + ) + }) +}) + +test('\nreading root specifying maximum depth', function (t) { + t.test('\n# depth 1', function (t) { + t.plan(1); + readdirp(opts( { depth: 1 } ), function (err, res) { + t.equals(res.files.length, depth1Files, 'does not return files at depth 2'); + }) + }) +}) + +test('\nreading root with no recursion', function (t) { + t.test('\n# depth 0', function (t) { + t.plan(1); + readdirp(opts( { depth: 0 } ), function (err, res) { + t.equals(res.files.length, depth0Files, 'does not return files at depth 0'); + }) + }) +}) + +test('\nprogress callbacks', function (t) { + t.plan(2); + + var pluckName = function(fi) { return fi.name; } + , processedFiles = []; + + readdirp( + opts() + , function(fi) { + processedFiles.push(fi); + } + , function (err, res) { + t.equals(processedFiles.length, res.files.length, 'calls back for each file processed'); + t.deepEquals(processedFiles.map(pluckName).sort(),res.files.map(pluckName).sort(), 'same file names'); + t.end(); + } + ) +}) + +test('resolving of name, full and relative paths', function (t) { + var expected = { + name : 'root_dir1_file1.ext1' + , parentDirName : 'root_dir1' + , path : 'root_dir1/root_dir1_file1.ext1' + , fullPath : 'test/bed/root_dir1/root_dir1_file1.ext1' + } + , opts = [ + { root: './bed' , prefix: '' } + , { root: './bed/' , prefix: '' } + , { root: 'bed' , prefix: '' } + , { root: 'bed/' , prefix: '' } + , { root: '../test/bed/' , prefix: '' } + , { root: '.' , prefix: 'bed' } + ] + t.plan(opts.length); + + opts.forEach(function (op) { + op.fileFilter = 'root_dir1_file1.ext1'; + + t.test('\n' + util.inspect(op), function (t) { + t.plan(4); + + readdirp (op, function(err, res) { + t.equals(res.files[0].name, expected.name, 'correct name'); + t.equals(res.files[0].path, path.join(op.prefix, expected.path), 'correct path'); + }) + + fs.realpath(op.root, function(err, fullRoot) { + readdirp (op, function(err, res) { + t.equals( + res.files[0].fullParentDir + , path.join(fullRoot, op.prefix, expected.parentDirName) + , 'correct parentDir' + ); + t.equals( + res.files[0].fullPath + , path.join(fullRoot, op.prefix, expected.parentDirName, expected.name) + , 'correct fullPath' + ); + }) + }) + }) + }) +}) + + diff --git a/pitfall/pdfkit/node_modules/regenerator-runtime/.npmignore b/pitfall/pdfkit/node_modules/regenerator-runtime/.npmignore new file mode 100644 index 00000000..e216ae5e --- /dev/null +++ b/pitfall/pdfkit/node_modules/regenerator-runtime/.npmignore @@ -0,0 +1,2 @@ +/node_modules +/test diff --git a/pitfall/pdfkit/node_modules/regenerator-runtime/README.md b/pitfall/pdfkit/node_modules/regenerator-runtime/README.md new file mode 100644 index 00000000..d93386a3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/regenerator-runtime/README.md @@ -0,0 +1,31 @@ +# regenerator-runtime + +Standalone runtime for +[Regenerator](https://github.com/facebook/regenerator)-compiled generator +and `async` functions. + +To import the runtime as a module (recommended), either of the following +import styles will work: +```js +// CommonJS +const regeneratorRuntime = require("regenerator-runtime"); + +// ECMAScript 2015 +import regeneratorRuntime from "regenerator-runtime"; +``` + +To ensure that `regeneratorRuntime` is defined globally, either of the +following styles will work: +```js +// CommonJS +require("regenerator-runtime/runtime"); + +// ECMAScript 2015 +import "regenerator-runtime/runtime"; +``` + +To get the absolute file system path of `runtime.js`, evaluate the +following expression: +```js +require("regenerator-runtime/path").path +``` diff --git a/pitfall/pdfkit/node_modules/regenerator-runtime/package.json b/pitfall/pdfkit/node_modules/regenerator-runtime/package.json new file mode 100644 index 00000000..f2aafe26 --- /dev/null +++ b/pitfall/pdfkit/node_modules/regenerator-runtime/package.json @@ -0,0 +1,83 @@ +{ + "_args": [ + [ + { + "raw": "regenerator-runtime@^0.10.0", + "scope": null, + "escapedName": "regenerator-runtime", + "name": "regenerator-runtime", + "rawSpec": "^0.10.0", + "spec": ">=0.10.0 <0.11.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/babel-runtime" + ] + ], + "_from": "regenerator-runtime@>=0.10.0 <0.11.0", + "_id": "regenerator-runtime@0.10.5", + "_inCache": true, + "_location": "/regenerator-runtime", + "_nodeVersion": "7.7.4", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/regenerator-runtime-0.10.5.tgz_1493390833247_0.5373470620252192" + }, + "_npmUser": { + "name": "benjamn", + "email": "bn@cs.stanford.edu" + }, + "_npmVersion": "4.1.2", + "_phantomChildren": {}, + "_requested": { + "raw": "regenerator-runtime@^0.10.0", + "scope": null, + "escapedName": "regenerator-runtime", + "name": "regenerator-runtime", + "rawSpec": "^0.10.0", + "spec": ">=0.10.0 <0.11.0", + "type": "range" + }, + "_requiredBy": [ + "/babel-runtime" + ], + "_resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz", + "_shasum": "336c3efc1220adcedda2c9fab67b5a7955a33658", + "_shrinkwrap": null, + "_spec": "regenerator-runtime@^0.10.0", + "_where": "/Users/MB/git/pdfkit/node_modules/babel-runtime", + "author": { + "name": "Ben Newman", + "email": "bn@cs.stanford.edu" + }, + "dependencies": {}, + "description": "Runtime for Regenerator-compiled generator and async functions.", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "336c3efc1220adcedda2c9fab67b5a7955a33658", + "tarball": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.10.5.tgz" + }, + "keywords": [ + "regenerator", + "runtime", + "generator", + "async" + ], + "license": "MIT", + "main": "runtime-module.js", + "maintainers": [ + { + "name": "benjamn", + "email": "bn@cs.stanford.edu" + } + ], + "name": "regenerator-runtime", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "https://github.com/facebook/regenerator/tree/master/packages/regenerator-runtime" + }, + "scripts": {}, + "version": "0.10.5" +} diff --git a/pitfall/pdfkit/node_modules/regenerator-runtime/path.js b/pitfall/pdfkit/node_modules/regenerator-runtime/path.js new file mode 100644 index 00000000..a450a753 --- /dev/null +++ b/pitfall/pdfkit/node_modules/regenerator-runtime/path.js @@ -0,0 +1,4 @@ +exports.path = require("path").join( + __dirname, + "runtime.js" +); diff --git a/pitfall/pdfkit/node_modules/regenerator-runtime/runtime-module.js b/pitfall/pdfkit/node_modules/regenerator-runtime/runtime-module.js new file mode 100644 index 00000000..8e7e2e4c --- /dev/null +++ b/pitfall/pdfkit/node_modules/regenerator-runtime/runtime-module.js @@ -0,0 +1,31 @@ +// This method of obtaining a reference to the global object needs to be +// kept identical to the way it is obtained in runtime.js +var g = + typeof global === "object" ? global : + typeof window === "object" ? window : + typeof self === "object" ? self : this; + +// Use `getOwnPropertyNames` because not all browsers support calling +// `hasOwnProperty` on the global `self` object in a worker. See #183. +var hadRuntime = g.regeneratorRuntime && + Object.getOwnPropertyNames(g).indexOf("regeneratorRuntime") >= 0; + +// Save the old regeneratorRuntime in case it needs to be restored later. +var oldRuntime = hadRuntime && g.regeneratorRuntime; + +// Force reevalutation of runtime.js. +g.regeneratorRuntime = undefined; + +module.exports = require("./runtime"); + +if (hadRuntime) { + // Restore the original runtime. + g.regeneratorRuntime = oldRuntime; +} else { + // Remove the global property added by runtime.js. + try { + delete g.regeneratorRuntime; + } catch(e) { + g.regeneratorRuntime = undefined; + } +} diff --git a/pitfall/pdfkit/node_modules/regenerator-runtime/runtime.js b/pitfall/pdfkit/node_modules/regenerator-runtime/runtime.js new file mode 100644 index 00000000..5b08c4d3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/regenerator-runtime/runtime.js @@ -0,0 +1,736 @@ +/** + * Copyright (c) 2014, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * https://raw.github.com/facebook/regenerator/master/LICENSE file. An + * additional grant of patent rights can be found in the PATENTS file in + * the same directory. + */ + +!(function(global) { + "use strict"; + + var Op = Object.prototype; + var hasOwn = Op.hasOwnProperty; + var undefined; // More compressible than void 0. + var $Symbol = typeof Symbol === "function" ? Symbol : {}; + var iteratorSymbol = $Symbol.iterator || "@@iterator"; + var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; + var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; + + var inModule = typeof module === "object"; + var runtime = global.regeneratorRuntime; + if (runtime) { + if (inModule) { + // If regeneratorRuntime is defined globally and we're in a module, + // make the exports object identical to regeneratorRuntime. + module.exports = runtime; + } + // Don't bother evaluating the rest of this file if the runtime was + // already defined globally. + return; + } + + // Define the runtime globally (as expected by generated code) as either + // module.exports (if we're in a module) or a new, empty object. + runtime = global.regeneratorRuntime = inModule ? module.exports : {}; + + function wrap(innerFn, outerFn, self, tryLocsList) { + // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. + var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; + var generator = Object.create(protoGenerator.prototype); + var context = new Context(tryLocsList || []); + + // The ._invoke method unifies the implementations of the .next, + // .throw, and .return methods. + generator._invoke = makeInvokeMethod(innerFn, self, context); + + return generator; + } + runtime.wrap = wrap; + + // Try/catch helper to minimize deoptimizations. Returns a completion + // record like context.tryEntries[i].completion. This interface could + // have been (and was previously) designed to take a closure to be + // invoked without arguments, but in all the cases we care about we + // already have an existing method we want to call, so there's no need + // to create a new function object. We can even get away with assuming + // the method takes exactly one argument, since that happens to be true + // in every case, so we don't have to touch the arguments object. The + // only additional allocation required is the completion record, which + // has a stable shape and so hopefully should be cheap to allocate. + function tryCatch(fn, obj, arg) { + try { + return { type: "normal", arg: fn.call(obj, arg) }; + } catch (err) { + return { type: "throw", arg: err }; + } + } + + var GenStateSuspendedStart = "suspendedStart"; + var GenStateSuspendedYield = "suspendedYield"; + var GenStateExecuting = "executing"; + var GenStateCompleted = "completed"; + + // Returning this object from the innerFn has the same effect as + // breaking out of the dispatch switch statement. + var ContinueSentinel = {}; + + // Dummy constructor functions that we use as the .constructor and + // .constructor.prototype properties for functions that return Generator + // objects. For full spec compliance, you may wish to configure your + // minifier not to mangle the names of these two functions. + function Generator() {} + function GeneratorFunction() {} + function GeneratorFunctionPrototype() {} + + // This is a polyfill for %IteratorPrototype% for environments that + // don't natively support it. + var IteratorPrototype = {}; + IteratorPrototype[iteratorSymbol] = function () { + return this; + }; + + var getProto = Object.getPrototypeOf; + var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); + if (NativeIteratorPrototype && + NativeIteratorPrototype !== Op && + hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { + // This environment has a native %IteratorPrototype%; use it instead + // of the polyfill. + IteratorPrototype = NativeIteratorPrototype; + } + + var Gp = GeneratorFunctionPrototype.prototype = + Generator.prototype = Object.create(IteratorPrototype); + GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype; + GeneratorFunctionPrototype.constructor = GeneratorFunction; + GeneratorFunctionPrototype[toStringTagSymbol] = + GeneratorFunction.displayName = "GeneratorFunction"; + + // Helper for defining the .next, .throw, and .return methods of the + // Iterator interface in terms of a single ._invoke method. + function defineIteratorMethods(prototype) { + ["next", "throw", "return"].forEach(function(method) { + prototype[method] = function(arg) { + return this._invoke(method, arg); + }; + }); + } + + runtime.isGeneratorFunction = function(genFun) { + var ctor = typeof genFun === "function" && genFun.constructor; + return ctor + ? ctor === GeneratorFunction || + // For the native GeneratorFunction constructor, the best we can + // do is to check its .name property. + (ctor.displayName || ctor.name) === "GeneratorFunction" + : false; + }; + + runtime.mark = function(genFun) { + if (Object.setPrototypeOf) { + Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); + } else { + genFun.__proto__ = GeneratorFunctionPrototype; + if (!(toStringTagSymbol in genFun)) { + genFun[toStringTagSymbol] = "GeneratorFunction"; + } + } + genFun.prototype = Object.create(Gp); + return genFun; + }; + + // Within the body of any async function, `await x` is transformed to + // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test + // `hasOwn.call(value, "__await")` to determine if the yielded value is + // meant to be awaited. + runtime.awrap = function(arg) { + return { __await: arg }; + }; + + function AsyncIterator(generator) { + function invoke(method, arg, resolve, reject) { + var record = tryCatch(generator[method], generator, arg); + if (record.type === "throw") { + reject(record.arg); + } else { + var result = record.arg; + var value = result.value; + if (value && + typeof value === "object" && + hasOwn.call(value, "__await")) { + return Promise.resolve(value.__await).then(function(value) { + invoke("next", value, resolve, reject); + }, function(err) { + invoke("throw", err, resolve, reject); + }); + } + + return Promise.resolve(value).then(function(unwrapped) { + // When a yielded Promise is resolved, its final value becomes + // the .value of the Promise<{value,done}> result for the + // current iteration. If the Promise is rejected, however, the + // result for this iteration will be rejected with the same + // reason. Note that rejections of yielded Promises are not + // thrown back into the generator function, as is the case + // when an awaited Promise is rejected. This difference in + // behavior between yield and await is important, because it + // allows the consumer to decide what to do with the yielded + // rejection (swallow it and continue, manually .throw it back + // into the generator, abandon iteration, whatever). With + // await, by contrast, there is no opportunity to examine the + // rejection reason outside the generator function, so the + // only option is to throw it from the await expression, and + // let the generator function handle the exception. + result.value = unwrapped; + resolve(result); + }, reject); + } + } + + if (typeof global.process === "object" && global.process.domain) { + invoke = global.process.domain.bind(invoke); + } + + var previousPromise; + + function enqueue(method, arg) { + function callInvokeWithMethodAndArg() { + return new Promise(function(resolve, reject) { + invoke(method, arg, resolve, reject); + }); + } + + return previousPromise = + // If enqueue has been called before, then we want to wait until + // all previous Promises have been resolved before calling invoke, + // so that results are always delivered in the correct order. If + // enqueue has not been called before, then it is important to + // call invoke immediately, without waiting on a callback to fire, + // so that the async generator function has the opportunity to do + // any necessary setup in a predictable way. This predictability + // is why the Promise constructor synchronously invokes its + // executor callback, and why async functions synchronously + // execute code before the first await. Since we implement simple + // async functions in terms of async generators, it is especially + // important to get this right, even though it requires care. + previousPromise ? previousPromise.then( + callInvokeWithMethodAndArg, + // Avoid propagating failures to Promises returned by later + // invocations of the iterator. + callInvokeWithMethodAndArg + ) : callInvokeWithMethodAndArg(); + } + + // Define the unified helper method that is used to implement .next, + // .throw, and .return (see defineIteratorMethods). + this._invoke = enqueue; + } + + defineIteratorMethods(AsyncIterator.prototype); + AsyncIterator.prototype[asyncIteratorSymbol] = function () { + return this; + }; + runtime.AsyncIterator = AsyncIterator; + + // Note that simple async functions are implemented on top of + // AsyncIterator objects; they just return a Promise for the value of + // the final result produced by the iterator. + runtime.async = function(innerFn, outerFn, self, tryLocsList) { + var iter = new AsyncIterator( + wrap(innerFn, outerFn, self, tryLocsList) + ); + + return runtime.isGeneratorFunction(outerFn) + ? iter // If outerFn is a generator, return the full iterator. + : iter.next().then(function(result) { + return result.done ? result.value : iter.next(); + }); + }; + + function makeInvokeMethod(innerFn, self, context) { + var state = GenStateSuspendedStart; + + return function invoke(method, arg) { + if (state === GenStateExecuting) { + throw new Error("Generator is already running"); + } + + if (state === GenStateCompleted) { + if (method === "throw") { + throw arg; + } + + // Be forgiving, per 25.3.3.3.3 of the spec: + // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume + return doneResult(); + } + + context.method = method; + context.arg = arg; + + while (true) { + var delegate = context.delegate; + if (delegate) { + var delegateResult = maybeInvokeDelegate(delegate, context); + if (delegateResult) { + if (delegateResult === ContinueSentinel) continue; + return delegateResult; + } + } + + if (context.method === "next") { + // Setting context._sent for legacy support of Babel's + // function.sent implementation. + context.sent = context._sent = context.arg; + + } else if (context.method === "throw") { + if (state === GenStateSuspendedStart) { + state = GenStateCompleted; + throw context.arg; + } + + context.dispatchException(context.arg); + + } else if (context.method === "return") { + context.abrupt("return", context.arg); + } + + state = GenStateExecuting; + + var record = tryCatch(innerFn, self, context); + if (record.type === "normal") { + // If an exception is thrown from innerFn, we leave state === + // GenStateExecuting and loop back for another invocation. + state = context.done + ? GenStateCompleted + : GenStateSuspendedYield; + + if (record.arg === ContinueSentinel) { + continue; + } + + return { + value: record.arg, + done: context.done + }; + + } else if (record.type === "throw") { + state = GenStateCompleted; + // Dispatch the exception by looping back around to the + // context.dispatchException(context.arg) call above. + context.method = "throw"; + context.arg = record.arg; + } + } + }; + } + + // Call delegate.iterator[context.method](context.arg) and handle the + // result, either by returning a { value, done } result from the + // delegate iterator, or by modifying context.method and context.arg, + // setting context.delegate to null, and returning the ContinueSentinel. + function maybeInvokeDelegate(delegate, context) { + var method = delegate.iterator[context.method]; + if (method === undefined) { + // A .throw or .return when the delegate iterator has no .throw + // method always terminates the yield* loop. + context.delegate = null; + + if (context.method === "throw") { + if (delegate.iterator.return) { + // If the delegate iterator has a return method, give it a + // chance to clean up. + context.method = "return"; + context.arg = undefined; + maybeInvokeDelegate(delegate, context); + + if (context.method === "throw") { + // If maybeInvokeDelegate(context) changed context.method from + // "return" to "throw", let that override the TypeError below. + return ContinueSentinel; + } + } + + context.method = "throw"; + context.arg = new TypeError( + "The iterator does not provide a 'throw' method"); + } + + return ContinueSentinel; + } + + var record = tryCatch(method, delegate.iterator, context.arg); + + if (record.type === "throw") { + context.method = "throw"; + context.arg = record.arg; + context.delegate = null; + return ContinueSentinel; + } + + var info = record.arg; + + if (! info) { + context.method = "throw"; + context.arg = new TypeError("iterator result is not an object"); + context.delegate = null; + return ContinueSentinel; + } + + if (info.done) { + // Assign the result of the finished delegate to the temporary + // variable specified by delegate.resultName (see delegateYield). + context[delegate.resultName] = info.value; + + // Resume execution at the desired location (see delegateYield). + context.next = delegate.nextLoc; + + // If context.method was "throw" but the delegate handled the + // exception, let the outer generator proceed normally. If + // context.method was "next", forget context.arg since it has been + // "consumed" by the delegate iterator. If context.method was + // "return", allow the original .return call to continue in the + // outer generator. + if (context.method !== "return") { + context.method = "next"; + context.arg = undefined; + } + + } else { + // Re-yield the result returned by the delegate method. + return info; + } + + // The delegate iterator is finished, so forget it and continue with + // the outer generator. + context.delegate = null; + return ContinueSentinel; + } + + // Define Generator.prototype.{next,throw,return} in terms of the + // unified ._invoke helper method. + defineIteratorMethods(Gp); + + Gp[toStringTagSymbol] = "Generator"; + + // A Generator should always return itself as the iterator object when the + // @@iterator function is called on it. Some browsers' implementations of the + // iterator prototype chain incorrectly implement this, causing the Generator + // object to not be returned from this call. This ensures that doesn't happen. + // See https://github.com/facebook/regenerator/issues/274 for more details. + Gp[iteratorSymbol] = function() { + return this; + }; + + Gp.toString = function() { + return "[object Generator]"; + }; + + function pushTryEntry(locs) { + var entry = { tryLoc: locs[0] }; + + if (1 in locs) { + entry.catchLoc = locs[1]; + } + + if (2 in locs) { + entry.finallyLoc = locs[2]; + entry.afterLoc = locs[3]; + } + + this.tryEntries.push(entry); + } + + function resetTryEntry(entry) { + var record = entry.completion || {}; + record.type = "normal"; + delete record.arg; + entry.completion = record; + } + + function Context(tryLocsList) { + // The root entry object (effectively a try statement without a catch + // or a finally block) gives us a place to store values thrown from + // locations where there is no enclosing try statement. + this.tryEntries = [{ tryLoc: "root" }]; + tryLocsList.forEach(pushTryEntry, this); + this.reset(true); + } + + runtime.keys = function(object) { + var keys = []; + for (var key in object) { + keys.push(key); + } + keys.reverse(); + + // Rather than returning an object with a next method, we keep + // things simple and return the next function itself. + return function next() { + while (keys.length) { + var key = keys.pop(); + if (key in object) { + next.value = key; + next.done = false; + return next; + } + } + + // To avoid creating an additional object, we just hang the .value + // and .done properties off the next function object itself. This + // also ensures that the minifier will not anonymize the function. + next.done = true; + return next; + }; + }; + + function values(iterable) { + if (iterable) { + var iteratorMethod = iterable[iteratorSymbol]; + if (iteratorMethod) { + return iteratorMethod.call(iterable); + } + + if (typeof iterable.next === "function") { + return iterable; + } + + if (!isNaN(iterable.length)) { + var i = -1, next = function next() { + while (++i < iterable.length) { + if (hasOwn.call(iterable, i)) { + next.value = iterable[i]; + next.done = false; + return next; + } + } + + next.value = undefined; + next.done = true; + + return next; + }; + + return next.next = next; + } + } + + // Return an iterator with no values. + return { next: doneResult }; + } + runtime.values = values; + + function doneResult() { + return { value: undefined, done: true }; + } + + Context.prototype = { + constructor: Context, + + reset: function(skipTempReset) { + this.prev = 0; + this.next = 0; + // Resetting context._sent for legacy support of Babel's + // function.sent implementation. + this.sent = this._sent = undefined; + this.done = false; + this.delegate = null; + + this.method = "next"; + this.arg = undefined; + + this.tryEntries.forEach(resetTryEntry); + + if (!skipTempReset) { + for (var name in this) { + // Not sure about the optimal order of these conditions: + if (name.charAt(0) === "t" && + hasOwn.call(this, name) && + !isNaN(+name.slice(1))) { + this[name] = undefined; + } + } + } + }, + + stop: function() { + this.done = true; + + var rootEntry = this.tryEntries[0]; + var rootRecord = rootEntry.completion; + if (rootRecord.type === "throw") { + throw rootRecord.arg; + } + + return this.rval; + }, + + dispatchException: function(exception) { + if (this.done) { + throw exception; + } + + var context = this; + function handle(loc, caught) { + record.type = "throw"; + record.arg = exception; + context.next = loc; + + if (caught) { + // If the dispatched exception was caught by a catch block, + // then let that catch block handle the exception normally. + context.method = "next"; + context.arg = undefined; + } + + return !! caught; + } + + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + var record = entry.completion; + + if (entry.tryLoc === "root") { + // Exception thrown outside of any try block that could handle + // it, so set the completion value of the entire function to + // throw the exception. + return handle("end"); + } + + if (entry.tryLoc <= this.prev) { + var hasCatch = hasOwn.call(entry, "catchLoc"); + var hasFinally = hasOwn.call(entry, "finallyLoc"); + + if (hasCatch && hasFinally) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } else if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + + } else if (hasCatch) { + if (this.prev < entry.catchLoc) { + return handle(entry.catchLoc, true); + } + + } else if (hasFinally) { + if (this.prev < entry.finallyLoc) { + return handle(entry.finallyLoc); + } + + } else { + throw new Error("try statement without catch or finally"); + } + } + } + }, + + abrupt: function(type, arg) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc <= this.prev && + hasOwn.call(entry, "finallyLoc") && + this.prev < entry.finallyLoc) { + var finallyEntry = entry; + break; + } + } + + if (finallyEntry && + (type === "break" || + type === "continue") && + finallyEntry.tryLoc <= arg && + arg <= finallyEntry.finallyLoc) { + // Ignore the finally entry if control is not jumping to a + // location outside the try/catch block. + finallyEntry = null; + } + + var record = finallyEntry ? finallyEntry.completion : {}; + record.type = type; + record.arg = arg; + + if (finallyEntry) { + this.method = "next"; + this.next = finallyEntry.finallyLoc; + return ContinueSentinel; + } + + return this.complete(record); + }, + + complete: function(record, afterLoc) { + if (record.type === "throw") { + throw record.arg; + } + + if (record.type === "break" || + record.type === "continue") { + this.next = record.arg; + } else if (record.type === "return") { + this.rval = this.arg = record.arg; + this.method = "return"; + this.next = "end"; + } else if (record.type === "normal" && afterLoc) { + this.next = afterLoc; + } + + return ContinueSentinel; + }, + + finish: function(finallyLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.finallyLoc === finallyLoc) { + this.complete(entry.completion, entry.afterLoc); + resetTryEntry(entry); + return ContinueSentinel; + } + } + }, + + "catch": function(tryLoc) { + for (var i = this.tryEntries.length - 1; i >= 0; --i) { + var entry = this.tryEntries[i]; + if (entry.tryLoc === tryLoc) { + var record = entry.completion; + if (record.type === "throw") { + var thrown = record.arg; + resetTryEntry(entry); + } + return thrown; + } + } + + // The context.catch method must only be called with a location + // argument that corresponds to a known catch block. + throw new Error("illegal catch attempt"); + }, + + delegateYield: function(iterable, resultName, nextLoc) { + this.delegate = { + iterator: values(iterable), + resultName: resultName, + nextLoc: nextLoc + }; + + if (this.method === "next") { + // Deliberately forget the last sent value so that we don't + // accidentally pass it on to the delegate. + this.arg = undefined; + } + + return ContinueSentinel; + } + }; +})( + // Among the various tricks for obtaining a reference to the global + // object, this seems to be the most reliable technique that does not + // use indirect eval (which violates Content Security Policy). + typeof global === "object" ? global : + typeof window === "object" ? window : + typeof self === "object" ? self : this +); diff --git a/pitfall/pdfkit/node_modules/resolve/.travis.yml b/pitfall/pdfkit/node_modules/resolve/.travis.yml new file mode 100644 index 00000000..895dbd36 --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.6 + - 0.8 diff --git a/pitfall/pdfkit/node_modules/resolve/LICENSE b/pitfall/pdfkit/node_modules/resolve/LICENSE new file mode 100644 index 00000000..ee27ba4b --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/resolve/example/async.js b/pitfall/pdfkit/node_modules/resolve/example/async.js new file mode 100644 index 00000000..6624ff72 --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/example/async.js @@ -0,0 +1,5 @@ +var resolve = require('../'); +resolve('tap', { basedir: __dirname }, function (err, res) { + if (err) console.error(err) + else console.log(res) +}); diff --git a/pitfall/pdfkit/node_modules/resolve/example/sync.js b/pitfall/pdfkit/node_modules/resolve/example/sync.js new file mode 100644 index 00000000..54b2cc10 --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/example/sync.js @@ -0,0 +1,3 @@ +var resolve = require('../'); +var res = resolve.sync('tap', { basedir: __dirname }); +console.log(res); diff --git a/pitfall/pdfkit/node_modules/resolve/index.js b/pitfall/pdfkit/node_modules/resolve/index.js new file mode 100644 index 00000000..51f194b4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/index.js @@ -0,0 +1,5 @@ +var core = require('./lib/core'); +exports = module.exports = require('./lib/async'); +exports.core = core; +exports.isCore = function (x) { return core[x] }; +exports.sync = require('./lib/sync'); diff --git a/pitfall/pdfkit/node_modules/resolve/lib/async.js b/pitfall/pdfkit/node_modules/resolve/lib/async.js new file mode 100644 index 00000000..dc998134 --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/lib/async.js @@ -0,0 +1,127 @@ +var core = require('./core'); +var fs = require('fs'); +var path = require('path'); +var caller = require('./caller.js'); +var nodeModulesPaths = require('./node-modules-paths.js'); + +module.exports = function resolve (x, opts, cb) { + if (typeof opts === 'function') { + cb = opts; + opts = {}; + } + if (!opts) opts = {}; + + var isFile = opts.isFile || function (file, cb) { + fs.stat(file, function (err, stat) { + if (err && err.code === 'ENOENT') cb(null, false) + else if (err) cb(err) + else cb(null, stat.isFile() || stat.isFIFO()) + }); + }; + var readFile = opts.readFile || fs.readFile; + + var extensions = opts.extensions || [ '.js' ]; + var y = opts.basedir || path.dirname(caller()); + var modules = opts.moduleDirectory || 'node_modules'; + + opts.paths = opts.paths || []; + + if (x.match(/^(?:\.\.?\/|\/|([A-Za-z]:)?\\)/)) { + loadAsFile(path.resolve(y, x), function (err, m, pkg) { + if (err) cb(err) + else if (m) cb(null, m, pkg) + else loadAsDirectory(path.resolve(y, x), function (err, d, pkg) { + if (err) cb(err) + else if (d) cb(null, d, pkg) + else cb(new Error("Cannot find module '" + x + "' from '" + y + "'")) + }) + }); + } + else loadNodeModules(x, y, function (err, n, pkg) { + if (err) cb(err) + else if (n) cb(null, n, pkg) + else if (core[x]) return cb(null, x); + else cb(new Error("Cannot find module '" + x + "' from '" + y + "'")) + }); + + function loadAsFile (x, pkg, cb) { + if (typeof pkg === 'function') { + cb = pkg; + pkg = opts.package; + } + + (function load (exts) { + if (exts.length === 0) return cb(null, undefined, pkg); + var file = x + exts[0]; + + isFile(file, function (err, ex) { + if (err) cb(err) + else if (ex) cb(null, file, pkg) + else load(exts.slice(1)) + }); + })([''].concat(extensions)); + } + + function loadAsDirectory (x, fpkg, cb) { + if (typeof fpkg === 'function') { + cb = fpkg; + fpkg = opts.package; + } + + var pkgfile = path.join(x, '/package.json'); + isFile(pkgfile, function (err, ex) { + if (err) return cb(err); + if (!ex) return loadAsFile(path.join(x, '/index'), fpkg, cb); + + readFile(pkgfile, function (err, body) { + if (err) return cb(err); + try { + var pkg = JSON.parse(body); + } + catch (err) {} + + if (opts.packageFilter) { + pkg = opts.packageFilter(pkg, x); + } + + if (pkg.main) { + if (pkg.main === '.' || pkg.main === './'){ + pkg.main = 'index' + } + loadAsFile(path.resolve(x, pkg.main), pkg, function (err, m, pkg) { + if (err) return cb(err); + if (m) return cb(null, m, pkg); + if (!pkg) return loadAsFile(path.join(x, '/index'), pkg, cb); + + var dir = path.resolve(x, pkg.main); + loadAsDirectory(dir, pkg, function (err, n, pkg) { + if (err) return cb(err); + if (n) return cb(null, n, pkg); + loadAsFile(path.join(x, '/index'), pkg, cb); + }); + }); + return; + } + + loadAsFile(path.join(x, '/index'), pkg, cb); + }); + }); + } + + function loadNodeModules (x, start, cb) { + (function process (dirs) { + if (dirs.length === 0) return cb(null, undefined); + var dir = dirs[0]; + + loadAsFile(path.join(dir, '/', x), undefined, function (err, m, pkg) { + if (err) return cb(err); + if (m) return cb(null, m, pkg); + loadAsDirectory(path.join(dir, '/', x), undefined, function (err, n, pkg) { + if (err) return cb(err); + if (n) return cb(null, n, pkg); + process(dirs.slice(1)); + }); + }); + })(nodeModulesPaths(start, opts)); + } +}; diff --git a/pitfall/pdfkit/node_modules/resolve/lib/caller.js b/pitfall/pdfkit/node_modules/resolve/lib/caller.js new file mode 100644 index 00000000..5536549b --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/lib/caller.js @@ -0,0 +1,8 @@ +module.exports = function () { + // see https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi + var origPrepareStackTrace = Error.prepareStackTrace; + Error.prepareStackTrace = function (_, stack) { return stack }; + var stack = (new Error()).stack; + Error.prepareStackTrace = origPrepareStackTrace; + return stack[2].getFileName(); +}; diff --git a/pitfall/pdfkit/node_modules/resolve/lib/core.js b/pitfall/pdfkit/node_modules/resolve/lib/core.js new file mode 100644 index 00000000..ea4a6c87 --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/lib/core.js @@ -0,0 +1,4 @@ +module.exports = require('./core.json').reduce(function (acc, x) { + acc[x] = true; + return acc; +}, {}); diff --git a/pitfall/pdfkit/node_modules/resolve/lib/core.json b/pitfall/pdfkit/node_modules/resolve/lib/core.json new file mode 100644 index 00000000..28560f7e --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/lib/core.json @@ -0,0 +1,38 @@ +[ + "assert", + "buffer_ieee754", + "buffer", + "child_process", + "cluster", + "console", + "constants", + "crypto", + "_debugger", + "dgram", + "dns", + "domain", + "events", + "freelist", + "fs", + "http", + "https", + "_linklist", + "module", + "net", + "os", + "path", + "punycode", + "querystring", + "readline", + "repl", + "stream", + "string_decoder", + "sys", + "timers", + "tls", + "tty", + "url", + "util", + "vm", + "zlib" +] diff --git a/pitfall/pdfkit/node_modules/resolve/lib/node-modules-paths.js b/pitfall/pdfkit/node_modules/resolve/lib/node-modules-paths.js new file mode 100644 index 00000000..c31efcd0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/lib/node-modules-paths.js @@ -0,0 +1,28 @@ +var path = require('path'); + + +module.exports = function (start, opts) { + var modules = opts.moduleDirectory || 'node_modules'; + var prefix = '/'; + if (/^([A-Za-z]:)/.test(start)) { + prefix = ''; + } else if (/^\\\\/.test(start)) { + prefix = '\\\\'; + } + var splitRe = process.platform === 'win32' ? /[\/\\]/ : /\/+/; + var parts = start.split(splitRe); + + var dirs = []; + for (var i = parts.length - 1; i >= 0; i--) { + if (parts[i] === modules) continue; + var dir = path.join( + path.join.apply(path, parts.slice(0, i + 1)), + modules + ); + dirs.push(prefix + dir); + } + if(process.platform === 'win32'){ + dirs[dirs.length-1] = dirs[dirs.length-1].replace(":", ":\\"); + } + return dirs.concat(opts.paths); +} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/resolve/lib/sync.js b/pitfall/pdfkit/node_modules/resolve/lib/sync.js new file mode 100644 index 00000000..49c26257 --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/lib/sync.js @@ -0,0 +1,80 @@ +var core = require('./core'); +var fs = require('fs'); +var path = require('path'); +var caller = require('./caller.js'); +var nodeModulesPaths = require('./node-modules-paths.js'); + +module.exports = function (x, opts) { + if (!opts) opts = {}; + var isFile = opts.isFile || function (file) { + try { var stat = fs.statSync(file) } + catch (err) { if (err && err.code === 'ENOENT') return false } + return stat.isFile() || stat.isFIFO(); + }; + var readFileSync = opts.readFileSync || fs.readFileSync; + + var extensions = opts.extensions || [ '.js' ]; + var y = opts.basedir || path.dirname(caller()); + + opts.paths = opts.paths || []; + + if (x.match(/^(?:\.\.?\/|\/|([A-Za-z]:)?\\)/)) { + var m = loadAsFileSync(path.resolve(y, x)) + || loadAsDirectorySync(path.resolve(y, x)); + if (m) return m; + } else { + var n = loadNodeModulesSync(x, y); + if (n) return n; + } + + if (core[x]) return x; + + throw new Error("Cannot find module '" + x + "' from '" + y + "'"); + + function loadAsFileSync (x) { + if (isFile(x)) { + return x; + } + + for (var i = 0; i < extensions.length; i++) { + var file = x + extensions[i]; + if (isFile(file)) { + return file; + } + } + } + + function loadAsDirectorySync (x) { + var pkgfile = path.join(x, '/package.json'); + if (isFile(pkgfile)) { + var body = readFileSync(pkgfile, 'utf8'); + try { + var pkg = JSON.parse(body); + if (opts.packageFilter) { + pkg = opts.packageFilter(pkg, x); + } + + if (pkg.main) { + var m = loadAsFileSync(path.resolve(x, pkg.main)); + if (m) return m; + var n = loadAsDirectorySync(path.resolve(x, pkg.main)); + if (n) return n; + } + } + catch (err) {} + } + + return loadAsFileSync(path.join( x, '/index')); + } + + function loadNodeModulesSync (x, start) { + var dirs = nodeModulesPaths(start, opts); + for (var i = 0; i < dirs.length; i++) { + var dir = dirs[i]; + var m = loadAsFileSync(path.join( dir, '/', x)); + if (m) return m; + var n = loadAsDirectorySync(path.join( dir, '/', x )); + if (n) return n; + } + } +}; diff --git a/pitfall/pdfkit/node_modules/resolve/package.json b/pitfall/pdfkit/node_modules/resolve/package.json new file mode 100644 index 00000000..c88ff5cd --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/package.json @@ -0,0 +1,90 @@ +{ + "_args": [ + [ + { + "raw": "resolve@~0.6.1", + "scope": null, + "escapedName": "resolve", + "name": "resolve", + "rawSpec": "~0.6.1", + "spec": ">=0.6.1 <0.7.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/browserify" + ] + ], + "_from": "resolve@>=0.6.1 <0.7.0", + "_id": "resolve@0.6.3", + "_inCache": true, + "_location": "/resolve", + "_npmUser": { + "name": "substack", + "email": "mail@substack.net" + }, + "_npmVersion": "1.4.6", + "_phantomChildren": {}, + "_requested": { + "raw": "resolve@~0.6.1", + "scope": null, + "escapedName": "resolve", + "name": "resolve", + "rawSpec": "~0.6.1", + "spec": ">=0.6.1 <0.7.0", + "type": "range" + }, + "_requiredBy": [ + "/browserify", + "/browserify/browser-resolve", + "/module-deps", + "/module-deps/browser-resolve" + ], + "_resolved": "https://registry.npmjs.org/resolve/-/resolve-0.6.3.tgz", + "_shasum": "dd957982e7e736debdf53b58a4dd91754575dd46", + "_shrinkwrap": null, + "_spec": "resolve@~0.6.1", + "_where": "/Users/MB/git/pdfkit/node_modules/browserify", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/substack/node-resolve/issues" + }, + "dependencies": {}, + "description": "resolve like require.resolve() on behalf of files asynchronously and synchronously", + "devDependencies": { + "tap": "~0.4.0" + }, + "directories": {}, + "dist": { + "shasum": "dd957982e7e736debdf53b58a4dd91754575dd46", + "tarball": "https://registry.npmjs.org/resolve/-/resolve-0.6.3.tgz" + }, + "homepage": "https://github.com/substack/node-resolve", + "keywords": [ + "resolve", + "require", + "node", + "module" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "name": "resolve", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/substack/node-resolve.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "0.6.3" +} diff --git a/pitfall/pdfkit/node_modules/resolve/readme.markdown b/pitfall/pdfkit/node_modules/resolve/readme.markdown new file mode 100644 index 00000000..9a9955b9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/readme.markdown @@ -0,0 +1,144 @@ +# resolve + +implements the [node `require.resolve()` +algorithm](http://nodejs.org/docs/v0.4.8/api/all.html#all_Together...) +such that you can `require.resolve()` on behalf of a file asynchronously and +synchronously + +[![build status](https://secure.travis-ci.org/substack/node-resolve.png)](http://travis-ci.org/substack/node-resolve) + +# example + +asynchronously resolve: + +``` js +var resolve = require('resolve'); +resolve('tap', { basedir: __dirname }, function (err, res) { + if (err) console.error(err) + else console.log(res) +}); +``` + +``` +$ node example/async.js +/home/substack/projects/node-resolve/node_modules/tap/lib/main.js +``` + +synchronously resolve: + +``` js +var resolve = require('resolve'); +var res = resolve.sync('tap', { basedir: __dirname }); +console.log(res); +``` + +``` +$ node example/sync.js +/home/substack/projects/node-resolve/node_modules/tap/lib/main.js +``` + +# methods + +``` js +var resolve = require('resolve') +``` + +## resolve(pkg, opts={}, cb) + +Asynchronously resolve the module path string `pkg` into `cb(err, res)`. + +options are: + +* opts.basedir - directory to begin resolving from + +* opts.package - package from which module is being loaded + +* opts.extensions - array of file extensions to search in order + +* opts.readFile - how to read files asynchronously + +* opts.isFile - function to asynchronously test whether a file exists + +* opts.packageFilter - transform the parsed package.json contents before looking +at the "main" field + +* opts.paths - require.paths array to use if nothing is found on the normal +node_modules recursive walk (probably don't use this) + +* opts.moduleDirectory - directory to recursively look for modules in. default: +`"node_modules"` + +default `opts` values: + +``` javascript +{ + paths: [], + basedir: __dirname, + extensions: [ '.js' ], + readFile: fs.readFile, + isFile: function (file, cb) { + fs.stat(file, function (err, stat) { + if (err && err.code === 'ENOENT') cb(null, false) + else if (err) cb(err) + else cb(null, stat.isFile()) + }); + }, + moduleDirectory: 'node_modules' +} +``` + +## resolve.sync(pkg, opts) + +Synchronously resolve the module path string `pkg`, returning the result and +throwing an error when `pkg` can't be resolved. + +options are: + +* opts.basedir - directory to begin resolving from + +* opts.extensions - array of file extensions to search in order + +* opts.readFile - how to read files synchronously + +* opts.isFile - function to synchronously test whether a file exists + +* opts.packageFilter - transform the parsed package.json contents before looking +at the "main" field + +* opts.paths - require.paths array to use if nothing is found on the normal +node_modules recursive walk (probably don't use this) + +* opts.moduleDirectory - directory to recursively look for modules in. default: +`"node_modules"` + +default `opts` values: + +``` javascript +{ + paths: [], + basedir: __dirname, + extensions: [ '.js' ], + readFileSync: fs.readFileSync, + isFile: function (file) { + try { return fs.statSync(file).isFile() } + catch (e) { return false } + }, + moduleDirectory: 'node_modules' +} +```` + +## resolve.isCore(pkg) + +Return whether a package is in core. + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install resolve +``` + +# license + +MIT diff --git a/pitfall/pdfkit/node_modules/resolve/test/core.js b/pitfall/pdfkit/node_modules/resolve/test/core.js new file mode 100644 index 00000000..88a510cd --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/test/core.js @@ -0,0 +1,12 @@ +var test = require('tap').test; +var resolve = require('../'); + +test('core modules', function (t) { + t.ok(resolve.isCore('fs')); + t.ok(resolve.isCore('net')); + t.ok(resolve.isCore('http')); + + t.ok(!resolve.isCore('seq')); + t.ok(!resolve.isCore('../')); + t.end(); +}); diff --git a/pitfall/pdfkit/node_modules/resolve/test/faulty_basedir.js b/pitfall/pdfkit/node_modules/resolve/test/faulty_basedir.js new file mode 100644 index 00000000..9932e602 --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/test/faulty_basedir.js @@ -0,0 +1,14 @@ +var path = require('path'); +var test = require('tap').test; +var resolve = require('../'); + +test('faulty basedir must produce error in windows', function (t) { + t.plan(1); + + var resolverDir = 'C:\\a\\b\\c\\d'; + + resolve('tap/lib/main.js', { basedir : resolverDir }, function (err, res, pkg) { + t.equal(true, !!err); + }); + +}); diff --git a/pitfall/pdfkit/node_modules/resolve/test/filter.js b/pitfall/pdfkit/node_modules/resolve/test/filter.js new file mode 100644 index 00000000..a65e59a8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/test/filter.js @@ -0,0 +1,18 @@ +var test = require('tap').test; +var resolve = require('../'); + +test('filter', function (t) { + t.plan(2); + var dir = __dirname + '/resolver'; + resolve('./baz', { + basedir : dir, + packageFilter : function (pkg) { + pkg.main = 'doom'; + return pkg; + } + }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, dir + '/baz/doom.js'); + t.equal(pkg.main, 'doom'); + }); +}); diff --git a/pitfall/pdfkit/node_modules/resolve/test/filter_sync.js b/pitfall/pdfkit/node_modules/resolve/test/filter_sync.js new file mode 100644 index 00000000..8856c01a --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/test/filter_sync.js @@ -0,0 +1,15 @@ +var test = require('tap').test; +var resolve = require('../'); + +test('filter', function (t) { + var dir = __dirname + '/resolver'; + var res = resolve.sync('./baz', { + basedir : dir, + packageFilter : function (pkg) { + pkg.main = 'doom' + return pkg; + } + }); + t.equal(res, dir + '/baz/doom.js'); + t.end(); +}); diff --git a/pitfall/pdfkit/node_modules/resolve/test/mock.js b/pitfall/pdfkit/node_modules/resolve/test/mock.js new file mode 100644 index 00000000..e284f987 --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/test/mock.js @@ -0,0 +1,142 @@ +var test = require('tap').test; +var resolve = require('../'); + +test('mock', function (t) { + t.plan(6); + + var files = { + '/foo/bar/baz.js' : 'beep' + }; + + function opts (basedir) { + return { + basedir : basedir, + isFile : function (file, cb) { + cb(null, files.hasOwnProperty(file)); + }, + readFile : function (file, cb) { + cb(null, files[file]); + } + } + } + + resolve('./baz', opts('/foo/bar'), function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, '/foo/bar/baz.js'); + t.equal(pkg, undefined); + }); + + resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, '/foo/bar/baz.js'); + t.equal(pkg, undefined); + }); + + resolve('baz', opts('/foo/bar'), function (err, res) { + t.equal(err.message, "Cannot find module 'baz' from '/foo/bar'"); + }); + + resolve('../baz', opts('/foo/bar'), function (err, res) { + t.equal(err.message, "Cannot find module '../baz' from '/foo/bar'"); + }); +}); + +test('mock from package', function (t) { + t.plan(6); + + var files = { + '/foo/bar/baz.js' : 'beep' + }; + + function opts (basedir) { + return { + basedir : basedir, + package : { main: 'bar' }, + isFile : function (file, cb) { + cb(null, files.hasOwnProperty(file)); + }, + readFile : function (file, cb) { + cb(null, files[file]); + } + } + } + + resolve('./baz', opts('/foo/bar'), function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, '/foo/bar/baz.js'); + t.equal(pkg.main, 'bar'); + }); + + resolve('./baz.js', opts('/foo/bar'), function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, '/foo/bar/baz.js'); + t.equal(pkg.main, 'bar'); + }); + + resolve('baz', opts('/foo/bar'), function (err, res) { + t.equal(err.message, "Cannot find module 'baz' from '/foo/bar'"); + }); + + resolve('../baz', opts('/foo/bar'), function (err, res) { + t.equal(err.message, "Cannot find module '../baz' from '/foo/bar'"); + }); +}); + +test('mock package', function (t) { + t.plan(2); + + var files = { + '/foo/node_modules/bar/baz.js' : 'beep', + '/foo/node_modules/bar/package.json' : JSON.stringify({ + main : './baz.js' + }) + }; + + function opts (basedir) { + return { + basedir : basedir, + isFile : function (file, cb) { + cb(null, files.hasOwnProperty(file)); + }, + readFile : function (file, cb) { + cb(null, files[file]); + } + } + } + + resolve('bar', opts('/foo'), function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, '/foo/node_modules/bar/baz.js'); + t.equal(pkg.main, './baz.js'); + }); +}); + +test('mock package from package', function (t) { + t.plan(2); + + var files = { + '/foo/node_modules/bar/baz.js' : 'beep', + '/foo/node_modules/bar/package.json' : JSON.stringify({ + main : './baz.js' + }) + }; + + function opts (basedir) { + return { + basedir : basedir, + package : { main: 'bar' }, + isFile : function (file, cb) { + cb(null, files.hasOwnProperty(file)); + }, + readFile : function (file, cb) { + cb(null, files[file]); + } + } + } + + resolve('bar', opts('/foo'), function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, '/foo/node_modules/bar/baz.js'); + t.equal(pkg.main, './baz.js'); + }); +}); diff --git a/pitfall/pdfkit/node_modules/resolve/test/mock_sync.js b/pitfall/pdfkit/node_modules/resolve/test/mock_sync.js new file mode 100644 index 00000000..963afa53 --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/test/mock_sync.js @@ -0,0 +1,68 @@ +var test = require('tap').test; +var resolve = require('../'); + +test('mock', function (t) { + t.plan(4); + + var files = { + '/foo/bar/baz.js' : 'beep' + }; + + function opts (basedir) { + return { + basedir : basedir, + isFile : function (file) { + return files.hasOwnProperty(file) + }, + readFileSync : function (file) { + return files[file] + } + } + } + + t.equal( + resolve.sync('./baz', opts('/foo/bar')), + '/foo/bar/baz.js' + ); + + t.equal( + resolve.sync('./baz.js', opts('/foo/bar')), + '/foo/bar/baz.js' + ); + + t.throws(function () { + resolve.sync('baz', opts('/foo/bar')); + }); + + t.throws(function () { + resolve.sync('../baz', opts('/foo/bar')); + }); +}); + +test('mock package', function (t) { + t.plan(1); + + var files = { + '/foo/node_modules/bar/baz.js' : 'beep', + '/foo/node_modules/bar/package.json' : JSON.stringify({ + main : './baz.js' + }) + }; + + function opts (basedir) { + return { + basedir : basedir, + isFile : function (file) { + return files.hasOwnProperty(file) + }, + readFileSync : function (file) { + return files[file] + } + } + } + + t.equal( + resolve.sync('bar', opts('/foo')), + '/foo/node_modules/bar/baz.js' + ); +}); diff --git a/pitfall/pdfkit/node_modules/resolve/test/node_path.js b/pitfall/pdfkit/node_modules/resolve/test/node_path.js new file mode 100644 index 00000000..c74ac395 --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/test/node_path.js @@ -0,0 +1,36 @@ +var test = require('tap').test; +var resolve = require('../'); + +test('$NODE_PATH', function (t) { + t.plan(3); + + resolve('aaa', { + paths: [ + __dirname + '/node_path/x', + __dirname + '/node_path/y' + ], + basedir: __dirname, + }, function (err, res) { + t.equal(res, __dirname + '/node_path/x/aaa/index.js'); + }); + + resolve('bbb', { + paths: [ + __dirname + '/node_path/x', + __dirname + '/node_path/y' + ], + basedir: __dirname, + }, function (err, res) { + t.equal(res, __dirname + '/node_path/y/bbb/index.js'); + }); + + resolve('ccc', { + paths: [ + __dirname + '/node_path/x', + __dirname + '/node_path/y' + ], + basedir: __dirname, + }, function (err, res) { + t.equal(res, __dirname + '/node_path/x/ccc/index.js'); + }); +}); diff --git a/pitfall/pdfkit/node_modules/resolve/test/node_path/x/aaa/index.js b/pitfall/pdfkit/node_modules/resolve/test/node_path/x/aaa/index.js new file mode 100644 index 00000000..1ea59138 --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/test/node_path/x/aaa/index.js @@ -0,0 +1 @@ +module.exports = 'A' diff --git a/pitfall/pdfkit/node_modules/resolve/test/node_path/x/ccc/index.js b/pitfall/pdfkit/node_modules/resolve/test/node_path/x/ccc/index.js new file mode 100644 index 00000000..f186fa75 --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/test/node_path/x/ccc/index.js @@ -0,0 +1 @@ +module.exports = 'C' diff --git a/pitfall/pdfkit/node_modules/resolve/test/node_path/y/bbb/index.js b/pitfall/pdfkit/node_modules/resolve/test/node_path/y/bbb/index.js new file mode 100644 index 00000000..e22dd83c --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/test/node_path/y/bbb/index.js @@ -0,0 +1 @@ +module.exports = 'B' diff --git a/pitfall/pdfkit/node_modules/resolve/test/node_path/y/ccc/index.js b/pitfall/pdfkit/node_modules/resolve/test/node_path/y/ccc/index.js new file mode 100644 index 00000000..d0043d1e --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/test/node_path/y/ccc/index.js @@ -0,0 +1 @@ +module.exports = 'CY' diff --git a/pitfall/pdfkit/node_modules/resolve/test/resolver.js b/pitfall/pdfkit/node_modules/resolve/test/resolver.js new file mode 100644 index 00000000..1301e55a --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/test/resolver.js @@ -0,0 +1,281 @@ +var path = require('path'); +var test = require('tap').test; +var resolve = require('../'); + +test('async foo', function (t) { + t.plan(9); + var dir = __dirname + '/resolver'; + + resolve('./foo', { basedir : dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, dir + '/foo.js'); + t.equal(pkg, undefined); + }); + + resolve('./foo.js', { basedir : dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, dir + '/foo.js'); + t.equal(pkg, undefined); + }); + + resolve('./foo', { basedir : dir, package: { main: 'resolver' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, dir + '/foo.js'); + t.equal(pkg.main, 'resolver'); + }); + + resolve('./foo.js', { basedir : dir, package: { main: 'resolver' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, dir + '/foo.js'); + t.equal(pkg.main, 'resolver'); + }); + + resolve('foo', { basedir : dir }, function (err) { + t.equal(err.message, "Cannot find module 'foo' from '" + path.resolve(dir) + "'"); + }); +}); + +test('bar', function (t) { + t.plan(6); + var dir = __dirname + '/resolver'; + + resolve('foo', { basedir : dir + '/bar' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, dir + '/bar/node_modules/foo/index.js'); + t.equal(pkg, undefined); + }); + + resolve('foo', { basedir : dir + '/bar' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, dir + '/bar/node_modules/foo/index.js'); + t.equal(pkg, undefined); + }); + + resolve('foo', { basedir : dir + '/bar', package: { main: 'bar' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, dir + '/bar/node_modules/foo/index.js'); + t.equal(pkg, undefined); + }); +}); + +test('baz', function (t) { + t.plan(4); + var dir = __dirname + '/resolver'; + + resolve('./baz', { basedir : dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, dir + '/baz/quux.js'); + t.equal(pkg.main, 'quux.js'); + }); + + resolve('./baz', { basedir : dir, package: { main: 'resolver' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, dir + '/baz/quux.js'); + t.equal(pkg.main, 'quux.js'); + }); +}); + +test('biz', function (t) { + t.plan(24); + var dir = __dirname + '/resolver/biz/node_modules'; + + resolve('./grux', { basedir : dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, dir + '/grux/index.js'); + t.equal(pkg, undefined); + }); + + resolve('./grux', { basedir : dir, package: { main: 'biz' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, dir + '/grux/index.js'); + t.equal(pkg.main, 'biz'); + }); + + resolve('./garply', { basedir : dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, dir + '/garply/lib/index.js'); + t.equal(pkg.main, './lib'); + }); + + resolve('./garply', { basedir : dir, package: { main: 'biz' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, dir + '/garply/lib/index.js'); + t.equal(pkg.main, './lib'); + }); + + resolve('tiv', { basedir : dir + '/grux' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, dir + '/tiv/index.js'); + t.equal(pkg, undefined); + }); + + resolve('tiv', { basedir : dir + '/grux', package: { main: 'grux' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, dir + '/tiv/index.js'); + t.equal(pkg, undefined); + }); + + resolve('tiv', { basedir : dir + '/garply' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, dir + '/tiv/index.js'); + t.equal(pkg, undefined); + }); + + resolve('tiv', { basedir : dir + '/garply', package: { main: './lib' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, dir + '/tiv/index.js'); + t.equal(pkg, undefined); + }); + + resolve('grux', { basedir : dir + '/tiv' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, dir + '/grux/index.js'); + t.equal(pkg, undefined); + }); + + resolve('grux', { basedir : dir + '/tiv', package: { main: 'tiv' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, dir + '/grux/index.js'); + t.equal(pkg, undefined); + }); + + resolve('garply', { basedir : dir + '/tiv' }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, dir + '/garply/lib/index.js'); + t.equal(pkg.main, './lib'); + }); + + resolve('garply', { basedir : dir + '/tiv', package: { main: 'tiv' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, dir + '/garply/lib/index.js'); + t.equal(pkg.main, './lib'); + }); +}); + +test('quux', function (t) { + t.plan(2); + var dir = __dirname + '/resolver/quux'; + + resolve('./foo', { basedir : dir, package: { main: 'quux' } }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, dir + '/foo/index.js'); + t.equal(pkg.main, 'quux'); + }); +}); + +test('normalize', function (t) { + t.plan(2); + var dir = __dirname + '/resolver/biz/node_modules/grux'; + + resolve('../grux', { basedir : dir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, dir + '/index.js'); + t.equal(pkg, undefined); + }); +}); + +test('cup', function (t) { + t.plan(3); + var dir = __dirname + '/resolver'; + + resolve('./cup', { basedir : dir, extensions : [ '.js', '.coffee' ] }, + function (err, res) { + if (err) t.fail(err); + t.equal(res, dir + '/cup.coffee'); + }); + + resolve('./cup.coffee', { basedir : dir }, function (err, res) { + if (err) t.fail(err); + t.equal(res, dir + '/cup.coffee'); + }); + + resolve('./cup', { basedir : dir, extensions : [ '.js' ] }, + function (err, res) { + t.equal(err.message, "Cannot find module './cup' from '" + path.resolve(dir) + "'"); + }); +}); + +test('mug', function (t) { + t.plan(3); + var dir = __dirname + '/resolver'; + + resolve('./mug', { basedir : dir }, function (err, res) { + if (err) t.fail(err); + t.equal(res, dir + '/mug.js'); + }); + + resolve('./mug', { basedir : dir, extensions : [ '.coffee', '.js' ] }, + function (err, res) { + if (err) t.fail(err); + t.equal(res, dir + '/mug.coffee'); + }); + + resolve('./mug', { basedir : dir, extensions : [ '.js', '.coffee' ] }, + function (err, res) { + t.equal(res, dir + '/mug.js'); + }); +}); + +test('other path', function (t) { + t.plan(4); + var resolverDir = __dirname + '/resolver'; + var dir = resolverDir + '/bar'; + var otherDir = resolverDir + '/other_path'; + + resolve('root', { basedir : dir, paths: [otherDir] }, function (err, res) { + if (err) t.fail(err); + t.equal(res, resolverDir + '/other_path/root.js'); + }); + + resolve('lib/other-lib', { basedir : dir, paths: [otherDir] }, + function (err, res) { + if (err) t.fail(err); + t.equal(res, resolverDir + '/other_path/lib/other-lib.js'); + }); + + resolve('root', { basedir : dir, }, function (err, res) { + t.equal(err.message, "Cannot find module 'root' from '" + path.resolve(dir) + "'"); + }); + + resolve('zzz', { basedir : dir, paths: [otherDir] }, function (err, res) { + t.equal(err.message, "Cannot find module 'zzz' from '" + path.resolve(dir) + "'"); + }); +}); + +test('incorrect main', function (t) { + t.plan(1) + + var resolverDir = __dirname + '/resolver'; + var dir = resolverDir + '/incorrect_main'; + + resolve('./incorrect_main', { basedir : resolverDir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, dir + '/index.js'); + }); +}); + +test('without basedir', function (t) { + t.plan(1); + + var dir = __dirname + '/resolver/without_basedir'; + var tester = require(dir + '/main.js'); + + tester(t, function (err, res, pkg){ + if (err) { + t.fail(err); + } else { + t.equal(res, dir + '/node_modules/mymodule.js'); + } + }); +}); + +test('#25: node modules with the same name as node stdlib modules', function (t) { + t.plan(1); + + var resolverDir = __dirname + '/resolver/punycode'; + + resolve('punycode', { basedir : resolverDir }, function (err, res, pkg) { + if (err) t.fail(err); + t.equal(res, resolverDir + '/node_modules/punycode/index.js'); + }); +}); diff --git a/pitfall/pdfkit/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js b/pitfall/pdfkit/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js new file mode 100644 index 00000000..bd816eab --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/pitfall/pdfkit/node_modules/resolve/test/resolver/baz/doom.js b/pitfall/pdfkit/node_modules/resolve/test/resolver/baz/doom.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/resolve/test/resolver/baz/package.json b/pitfall/pdfkit/node_modules/resolve/test/resolver/baz/package.json new file mode 100644 index 00000000..6b81dcdd --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/test/resolver/baz/package.json @@ -0,0 +1,3 @@ +{ + "main" : "quux.js" +} diff --git a/pitfall/pdfkit/node_modules/resolve/test/resolver/baz/quux.js b/pitfall/pdfkit/node_modules/resolve/test/resolver/baz/quux.js new file mode 100644 index 00000000..bd816eab --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/test/resolver/baz/quux.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/pitfall/pdfkit/node_modules/resolve/test/resolver/biz/node_modules/garply/lib/index.js b/pitfall/pdfkit/node_modules/resolve/test/resolver/biz/node_modules/garply/lib/index.js new file mode 100644 index 00000000..0379e29f --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/test/resolver/biz/node_modules/garply/lib/index.js @@ -0,0 +1 @@ +module.exports = 'hello garply'; diff --git a/pitfall/pdfkit/node_modules/resolve/test/resolver/biz/node_modules/garply/package.json b/pitfall/pdfkit/node_modules/resolve/test/resolver/biz/node_modules/garply/package.json new file mode 100644 index 00000000..babaac58 --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/test/resolver/biz/node_modules/garply/package.json @@ -0,0 +1,3 @@ +{ + "main" : "./lib" +} diff --git a/pitfall/pdfkit/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js b/pitfall/pdfkit/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js new file mode 100644 index 00000000..49960555 --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js @@ -0,0 +1 @@ +module.exports = require('tiv') * 100; diff --git a/pitfall/pdfkit/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js b/pitfall/pdfkit/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js new file mode 100644 index 00000000..690aad34 --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js @@ -0,0 +1 @@ +module.exports = 3; diff --git a/pitfall/pdfkit/node_modules/resolve/test/resolver/cup.coffee b/pitfall/pdfkit/node_modules/resolve/test/resolver/cup.coffee new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/test/resolver/cup.coffee @@ -0,0 +1 @@ + diff --git a/pitfall/pdfkit/node_modules/resolve/test/resolver/foo.js b/pitfall/pdfkit/node_modules/resolve/test/resolver/foo.js new file mode 100644 index 00000000..bd816eab --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/test/resolver/foo.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/pitfall/pdfkit/node_modules/resolve/test/resolver/incorrect_main/index.js b/pitfall/pdfkit/node_modules/resolve/test/resolver/incorrect_main/index.js new file mode 100644 index 00000000..bc1fb0a6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/test/resolver/incorrect_main/index.js @@ -0,0 +1,2 @@ +// this is the actual main file 'index.js', not 'wrong.js' like the package.json would indicate +module.exports = 1; diff --git a/pitfall/pdfkit/node_modules/resolve/test/resolver/incorrect_main/package.json b/pitfall/pdfkit/node_modules/resolve/test/resolver/incorrect_main/package.json new file mode 100644 index 00000000..1592ed39 --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/test/resolver/incorrect_main/package.json @@ -0,0 +1,3 @@ +{ + "main" : "wrong.js" +} diff --git a/pitfall/pdfkit/node_modules/resolve/test/resolver/mug.coffee b/pitfall/pdfkit/node_modules/resolve/test/resolver/mug.coffee new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/resolve/test/resolver/mug.js b/pitfall/pdfkit/node_modules/resolve/test/resolver/mug.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/resolve/test/resolver/other_path/lib/other-lib.js b/pitfall/pdfkit/node_modules/resolve/test/resolver/other_path/lib/other-lib.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/resolve/test/resolver/other_path/root.js b/pitfall/pdfkit/node_modules/resolve/test/resolver/other_path/root.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/resolve/test/resolver/punycode/node_modules/punycode/index.js b/pitfall/pdfkit/node_modules/resolve/test/resolver/punycode/node_modules/punycode/index.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/resolve/test/resolver/quux/foo/index.js b/pitfall/pdfkit/node_modules/resolve/test/resolver/quux/foo/index.js new file mode 100644 index 00000000..bd816eab --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/test/resolver/quux/foo/index.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/pitfall/pdfkit/node_modules/resolve/test/resolver/without_basedir/main.js b/pitfall/pdfkit/node_modules/resolve/test/resolver/without_basedir/main.js new file mode 100644 index 00000000..5f211e9c --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/test/resolver/without_basedir/main.js @@ -0,0 +1,6 @@ +resolve = require('../../../'); + +module.exports = function(t, cb) { + resolve('mymodule', null, cb); +} + diff --git a/pitfall/pdfkit/node_modules/resolve/test/resolver/without_basedir/node_modules/mymodule.js b/pitfall/pdfkit/node_modules/resolve/test/resolver/without_basedir/node_modules/mymodule.js new file mode 100644 index 00000000..2b58aa40 --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/test/resolver/without_basedir/node_modules/mymodule.js @@ -0,0 +1 @@ +module.exports = "The tools we use have a profound (and devious!) influence on our thinking habits, and, therefore, on our thinking abilities.- E. Dijkstra" diff --git a/pitfall/pdfkit/node_modules/resolve/test/resolver_sync.js b/pitfall/pdfkit/node_modules/resolve/test/resolver_sync.js new file mode 100644 index 00000000..5f808f34 --- /dev/null +++ b/pitfall/pdfkit/node_modules/resolve/test/resolver_sync.js @@ -0,0 +1,180 @@ +var test = require('tap').test; +var resolve = require('../'); + +test('foo', function (t) { + var dir = __dirname + '/resolver'; + + t.equal( + resolve.sync('./foo', { basedir : dir }), + dir + '/foo.js' + ); + + t.equal( + resolve.sync('./foo.js', { basedir : dir }), + dir + '/foo.js' + ); + + t.throws(function () { + resolve.sync('foo', { basedir : dir }); + }); + + t.end(); +}); + +test('bar', function (t) { + var dir = __dirname + '/resolver'; + + t.equal( + resolve.sync('foo', { basedir : dir + '/bar' }), + dir + '/bar/node_modules/foo/index.js' + ); + t.end(); +}); + +test('baz', function (t) { + var dir = __dirname + '/resolver'; + + t.equal( + resolve.sync('./baz', { basedir : dir }), + dir + '/baz/quux.js' + ); + t.end(); +}); + +test('biz', function (t) { + var dir = __dirname + '/resolver/biz/node_modules'; + t.equal( + resolve.sync('./grux', { basedir : dir }), + dir + '/grux/index.js' + ); + + t.equal( + resolve.sync('tiv', { basedir : dir + '/grux' }), + dir + '/tiv/index.js' + ); + + t.equal( + resolve.sync('grux', { basedir : dir + '/tiv' }), + dir + '/grux/index.js' + ); + t.end(); +}); + +test('normalize', function (t) { + var dir = __dirname + '/resolver/biz/node_modules/grux'; + t.equal( + resolve.sync('../grux', { basedir : dir }), + dir + '/index.js' + ); + t.end(); +}); + +test('cup', function (t) { + var dir = __dirname + '/resolver'; + t.equal( + resolve.sync('./cup', { + basedir : dir, + extensions : [ '.js', '.coffee' ] + }), + dir + '/cup.coffee' + ); + + t.equal( + resolve.sync('./cup.coffee', { + basedir : dir + }), + dir + '/cup.coffee' + ); + + t.throws(function () { + resolve.sync('./cup', { + basedir : dir, + extensions : [ '.js' ] + }) + }); + + t.end(); +}); + +test('mug', function (t) { + var dir = __dirname + '/resolver'; + t.equal( + resolve.sync('./mug', { basedir : dir }), + dir + '/mug.js' + ); + + t.equal( + resolve.sync('./mug', { + basedir : dir, + extensions : [ '.coffee', '.js' ] + }), + dir + '/mug.coffee' + ); + + t.equal( + resolve.sync('./mug', { + basedir : dir, + extensions : [ '.js', '.coffee' ] + }), + dir + '/mug.js' + ); + + t.end(); +}); + +test('other path', function (t) { + var resolverDir = __dirname + '/resolver'; + var dir = resolverDir + '/bar'; + var otherDir = resolverDir + '/other_path'; + + var path = require('path'); + + t.equal( + resolve.sync('root', { + basedir : dir, + paths: [otherDir] }), + resolverDir + '/other_path/root.js' + ); + + t.equal( + resolve.sync('lib/other-lib', { + basedir : dir, + paths: [otherDir] }), + resolverDir + '/other_path/lib/other-lib.js' + ); + + t.throws(function () { + resolve.sync('root', { basedir : dir, }); + }); + + t.throws(function () { + resolve.sync('zzz', { + basedir : dir, + paths: [otherDir] }); + }); + + t.end(); +}); + +test('incorrect main', function (t) { + var resolverDir = __dirname + '/resolver'; + var dir = resolverDir + '/incorrect_main'; + + t.equal( + resolve.sync('./incorrect_main', { basedir : resolverDir }), + dir + '/index.js' + ) + + t.end() +}); + +test('#25: node modules with the same name as node stdlib modules', function (t) { + var resolverDir = __dirname + '/resolver/punycode'; + + t.equal( + resolve.sync('punycode', { basedir : resolverDir }), + resolverDir + '/node_modules/punycode/index.js' + ) + + t.end() +}); diff --git a/pitfall/pdfkit/node_modules/restructure/.npmignore b/pitfall/pdfkit/node_modules/restructure/.npmignore new file mode 100644 index 00000000..29cc0b50 --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/.npmignore @@ -0,0 +1,3 @@ +node_modules/ +coverage/ +coverage.html diff --git a/pitfall/pdfkit/node_modules/restructure/.travis.yml b/pitfall/pdfkit/node_modules/restructure/.travis.yml new file mode 100644 index 00000000..12aca205 --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/.travis.yml @@ -0,0 +1,8 @@ +language: node_js +node_js: + - "0.10" +install: + - npm install + - npm run postpublish +after_success: + - npm run coveralls diff --git a/pitfall/pdfkit/node_modules/restructure/README.md b/pitfall/pdfkit/node_modules/restructure/README.md new file mode 100644 index 00000000..3489b851 --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/README.md @@ -0,0 +1,306 @@ +# Restructure + +[![Build Status](https://travis-ci.org/devongovett/restructure.svg?branch=master)](https://travis-ci.org/devongovett/restructure) +[![Coverage Status](https://coveralls.io/repos/devongovett/restructure/badge.png?branch=master)](https://coveralls.io/r/devongovett/restructure?branch=master) + +Restructure allows you to declaratively encode and decode binary data. +It supports a wide variety of types to enable you to express a multitude +of binary formats without writing any parsing code. + +Some of the supported features are C-like structures, versioned structures, +pointers, arrays of any type, strings of a large number of encodings, enums, +bitfields, and more. See the documentation below for more details. + +## Example + +This is just a small example of what Restructure can do. Check out the API documentation +below for more information. + +```javascript +var r = require('restructure'); + +var Person = new r.Struct({ + name: new r.String(r.uint8, 'utf8'), + age: r.uint8 +}); + +// decode a person from a buffer +var stream = new r.DecodeStream(buffer); +Person.decode(stream); // returns an object with the fields defined above + +// encode a person from an object +// pipe the stream to a destination, such as a file +var stream = new r.EncodeStream(); +stream.pipe(fs.createWriteStream('out.bin')); + +Person.encode(stream, { + name: 'Devon', + age: 21 +}); + +stream.end(); +``` + + +## API + +All of the following types support three standard methods: + +* `decode(stream)` - decodes an instance of the type from the given DecodeStream +* `size(value)` - returns the amount of space the value would take if encoded +* `encode(stream, value)` - encodes the given value into the given EncodeStream + +Restructure supports a wide variety of types, but if you need to write your own for +some custom use that cannot be represented by them, you can do so by just implementing +the above methods. Then you can use your type just as you would any other type, in structures +and whatnot. + +### Number Types + +The following built-in number types are available: + +```javascript +uint8, uint16, uint24, uint32, int8, int16, int24, int32, float, double, fixed16, fixed32 +``` + +Numbers are big-endian (network order) by default, but little-endian is supported, too: + +```javascript +uint16le, uint24le, uint32le, int16le, int24le, int32le, floatle, doublele, fixed16le, fixed32le +``` + +To avoid ambiguity, big-endian may be used explicitly: + +```javascript +uint16be, uint24be, uint32be, int16be, int24be, int32be, floatbe, doublebe, fixed16be, fixed32be +``` + +### Boolean + +Booleans are encoded as `0` or `1` using one of the above number types. + +```javascript +var bool = new r.Boolean(r.uint32); +``` + +### Reserved + +The `Reserved` type simply skips data in a structure, where there are reserved fields. +Encoding produces zeros. + +```javascript +// 10 reserved uint8s (default is 1) +var reserved = new r.Reserved(r.uint8, 10); +``` + +### Optional + +The `Optional` type only encodes or decodes when given condition is truthy. + +```javascript +// includes field +var optional = new r.Optional(r.uint8, true); + +// excludes field +var optional = new r.Optional(r.uint8, false); + +// determine whether field is to be included at runtime with a function +var optional = new r.Optional(r.uint8, function() { + return this.flags & 0x50; +}); +``` + +### Enum + +The `Enum` type maps a number to the value at that index in an array. + +```javascript +var color = new r.Enum(r.uint8, ['red', 'orange', 'yellow', 'green', 'blue', 'purple']); +``` + +### Bitfield + +The `Bitfield` type maps a number to an object with boolean keys mapping to each bit in that number, +as defined in an array. + +```javascript +var bitfield = new r.Bitfield(r.uint8, ['Jack', 'Kack', 'Lack', 'Mack', 'Nack', 'Oack', 'Pack', 'Quack']); +bitfield.decode(stream); + +var result = { + Jack: true, + Kack: false, + Lack: false, + Mack: true, + Nack: true, + Oack: false, + Pack: true, + Quack: true +}; + +bitfield.encode(stream, result); +``` + +### Buffer + +Extracts a slice of the buffer to a Node `Buffer`. The length can be a constant, or taken from +a previous field in the parent structure. + +```javascript +// fixed length +var buf = new r.Buffer(2); + +// length from parent structure +var struct = new r.Struct({ + bufLen: r.uint8, + buf: new r.Buffer('bufLen') +}); +``` + +### String + +A `String` maps a JavaScript string to and from binary encodings. The length can be a constant, taken +from a previous field in the parent structure, or encoded using a number type immediately before the string. + +Supported encodings include `'ascii'`, `'utf8'`, `'ucs2'`, `'utf16le'`, `'utf16be'`, and if you also install +[iconv-lite](https://github.com/ashtuchkin/iconv-lite), many other legacy codecs. + +```javascript +// fixed length, ascii encoding by default +var str = new r.String(2); + +// length encoded as number before the string, utf8 encoding +var str = new r.String(r.uint8, 'utf8'); + +// length from parent structure +var struct = new r.Struct({ + len: r.uint8, + str: new r.String('len', 'utf16be') +}); + +// null-terminated string (also known as C string) +var str = new r.String(null, 'utf8') +``` + +### Array + +An `Array` maps to and from a JavaScript array containing instances of a sub-type. The length can be a constant, +taken from a previous field in the parent structure, encoded using a number type immediately +before the string, or computed by a function. + +```javascript +// fixed length, containing numbers +var arr = new r.Array(r.uint16, 2); + +// length encoded as number before the array containing strings +var arr = new r.Array(new r.String(10), r.uint8); + +// length computed by a function +var arr = new r.Array(r.uint8, function() { return 5 }); + +// length from parent structure +var struct = new r.Struct({ + len: r.uint8, + arr: new r.Array(r.uint8, 'len') +}); + +// treat as amount of bytes instead (may be used in all the above scenarios) +var arr = new r.Array(r.uint16, 6, 'bytes'); +``` + +### LazyArray + +The `LazyArray` type extends from the `Array` type, and is useful for large arrays that you do not need to access sequentially. +It avoids decoding the entire array upfront, and instead only decodes and caches individual items as needed. It only works when +the elements inside the array have a fixed size. + +Instead of returning a JavaScript array, the `LazyArray` type returns a custom object that can be used to access the elements. + +```javascript +var arr = new r.LazyArray(r.uint16, 2048); +var res = arr.decode(stream); + +// get a single element +var el = res.get(2); + +// convert to a normal array (decode all elements) +var array = res.toArray(); +``` + +### Struct + +A `Struct` maps to and from JavaScript objects, containing keys of various previously discussed types. Sub structures, +arrays of structures, and pointers to other types (discussed below) are supported. + +```javascript +var Person = new r.Struct({ + name: new r.String(r.uint8, 'utf8'), + age: r.uint8 +}); +``` + +### VersionedStruct + +A `VersionedStruct` is a `Struct` that has multiple versions. The version is typically encoded at +the beginning of the structure, or as a field in a parent structure. There is an optional `header` +common to all versions, and separate fields listed for each version number. + +```javascript +// the version is read as a uint8 in this example +// you could also get the version from a key on the parent struct +var Person = new r.VersionedStruct(r.uint8, { + // optional header common to all versions + header: { + name: new r.String(r.uint8, 'utf8') + }, + 0: { + age: r.uint8 + }, + 1: { + hairColor: r.Enum(r.uint8, ['black', 'brown', 'blonde']) + } +}); +``` + +### Pointer + +Pointers map an address or offset encoded as a number, to a value encoded elsewhere in the buffer. +There are a few options you can use: `type`, `relativeTo`, `allowNull`, and `nullValue`. +The `type` option has these possible values: + +* `local` (default) - the encoded offset is relative to the start of the containing structure +* `immediate` - the encoded offset is relative to the position of the pointer itself +* `parent` - the encoded offset is relative to the parent structure of the immediate container +* `global` - the encoded offset is global to the start of the file + +The `relativeTo` option specifies that the encoded offset is relative to a field on the containing structure. +By default, pointers are relative to the start of the containing structure (`local`). + +The `allowNull` option lets you specify whether zero offsets are allowed or should produce `null`. This is +set to `true` by default. The `nullValue` option is related, and lets you override the encoded value that +represents `null`. By default, the `nullValue` is zero. + +The `lazy` option allows lazy decoding of the pointer's value by defining a getter on the parent object. +This only works when the pointer is contained within a Struct, but can be used to speed up decoding +quite a bit when not all of the data is needed right away. + +```javascript +var Address = new r.Struct({ + street: new r.String(r.uint8), + zip: new r.String(5) +}); + +var Person = new r.Struct({ + name: new r.String(r.uint8, 'utf8'), + age: r.uint8, + ptrStart: r.uint8, + address: new r.Pointer(r.uint8, Address) +}); +``` + +If the type of a pointer is set to 'void', it is not decoded and the computed address in the buffer +is simply returned. To encode a void pointer, create a `new r.VoidPointer(type, value)`. + +## License + +MIT diff --git a/pitfall/pdfkit/node_modules/restructure/coverage.js b/pitfall/pdfkit/node_modules/restructure/coverage.js new file mode 100644 index 00000000..df3b00f1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/coverage.js @@ -0,0 +1,5 @@ +require('coffee-coverage').register({ + basePath: __dirname, + path: 'relative', + exclude: ['/test', '/node_modules', '/.git'], +}); diff --git a/pitfall/pdfkit/node_modules/restructure/index.coffee b/pitfall/pdfkit/node_modules/restructure/index.coffee new file mode 100644 index 00000000..ebfbafcb --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/index.coffee @@ -0,0 +1,19 @@ +exports.EncodeStream = require './src/EncodeStream' +exports.DecodeStream = require './src/DecodeStream' +exports.Array = require './src/Array' +exports.LazyArray = require './src/LazyArray' +exports.Bitfield = require './src/Bitfield' +exports.Boolean = require './src/Boolean' +exports.Buffer = require './src/Buffer' +exports.Enum = require './src/Enum' +exports.Optional = require './src/Optional' +exports.Reserved = require './src/Reserved' +exports.String = require './src/String' +exports.Struct = require './src/Struct' +exports.VersionedStruct = require './src/VersionedStruct' + +for key, val of require './src/Number' + exports[key] = val + +for key, val of require './src/Pointer' + exports[key] = val diff --git a/pitfall/pdfkit/node_modules/restructure/index.js b/pitfall/pdfkit/node_modules/restructure/index.js new file mode 100644 index 00000000..b77e0748 --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/index.js @@ -0,0 +1,43 @@ +// Generated by CoffeeScript 1.7.1 +(function() { + var key, val, _ref, _ref1; + + exports.EncodeStream = require('./src/EncodeStream'); + + exports.DecodeStream = require('./src/DecodeStream'); + + exports.Array = require('./src/Array'); + + exports.LazyArray = require('./src/LazyArray'); + + exports.Bitfield = require('./src/Bitfield'); + + exports.Boolean = require('./src/Boolean'); + + exports.Buffer = require('./src/Buffer'); + + exports.Enum = require('./src/Enum'); + + exports.Optional = require('./src/Optional'); + + exports.Reserved = require('./src/Reserved'); + + exports.String = require('./src/String'); + + exports.Struct = require('./src/Struct'); + + exports.VersionedStruct = require('./src/VersionedStruct'); + + _ref = require('./src/Number'); + for (key in _ref) { + val = _ref[key]; + exports[key] = val; + } + + _ref1 = require('./src/Pointer'); + for (key in _ref1) { + val = _ref1[key]; + exports[key] = val; + } + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/restructure/package.json b/pitfall/pdfkit/node_modules/restructure/package.json new file mode 100644 index 00000000..940c6f72 --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/package.json @@ -0,0 +1,110 @@ +{ + "_args": [ + [ + { + "raw": "restructure@^0.5.3", + "scope": null, + "escapedName": "restructure", + "name": "restructure", + "rawSpec": "^0.5.3", + "spec": ">=0.5.3 <0.6.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/fontkit" + ] + ], + "_from": "restructure@>=0.5.3 <0.6.0", + "_id": "restructure@0.5.4", + "_inCache": true, + "_location": "/restructure", + "_nodeVersion": "4.1.1", + "_npmOperationalInternal": { + "host": "packages-18-east.internal.npmjs.com", + "tmp": "tmp/restructure-0.5.4.tgz_1493601675635_0.9421770751941949" + }, + "_npmUser": { + "name": "devongovett", + "email": "devongovett@gmail.com" + }, + "_npmVersion": "2.14.4", + "_phantomChildren": {}, + "_requested": { + "raw": "restructure@^0.5.3", + "scope": null, + "escapedName": "restructure", + "name": "restructure", + "rawSpec": "^0.5.3", + "spec": ">=0.5.3 <0.6.0", + "type": "range" + }, + "_requiredBy": [ + "/fontkit" + ], + "_resolved": "https://registry.npmjs.org/restructure/-/restructure-0.5.4.tgz", + "_shasum": "f54e7dd563590fb34fd6bf55876109aeccb28de8", + "_shrinkwrap": null, + "_spec": "restructure@^0.5.3", + "_where": "/Users/MB/git/pdfkit/node_modules/fontkit", + "author": { + "name": "Devon Govett", + "email": "devongovett@gmail.com" + }, + "browserify": { + "transform": [ + "browserify-optional" + ] + }, + "bugs": { + "url": "https://github.com/devongovett/restructure/issues" + }, + "dependencies": { + "browserify-optional": "^1.0.0" + }, + "description": "Declaratively encode and decode binary data", + "devDependencies": { + "chai": "~1.9.1", + "coffee-coverage": "~0.4.2", + "coffee-script": "~1.7.1", + "concat-stream": "~1.4.5", + "coveralls": "^2.10.0", + "iconv-lite": "^0.4.7", + "mocha": "~1.18.2", + "mocha-lcov-reporter": "0.0.1" + }, + "directories": {}, + "dist": { + "shasum": "f54e7dd563590fb34fd6bf55876109aeccb28de8", + "tarball": "https://registry.npmjs.org/restructure/-/restructure-0.5.4.tgz" + }, + "gitHead": "2172bf0cf019fa7a4517cd9eddf1a23ae477df0b", + "homepage": "https://github.com/devongovett/restructure", + "keywords": [ + "binary", + "struct", + "encode", + "decode" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "devongovett", + "email": "devongovett@gmail.com" + } + ], + "name": "restructure", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/devongovett/restructure.git" + }, + "scripts": { + "cover": "mocha --require coverage.js --reporter html-cov > coverage.html", + "coveralls": "mocha --require coverage.js --reporter mocha-lcov-reporter | coveralls", + "postpublish": "rm -rf index.js src/*.js", + "prepublish": "coffee -c src/ index.coffee", + "test": "mocha" + }, + "version": "0.5.4" +} diff --git a/pitfall/pdfkit/node_modules/restructure/src/Array.coffee b/pitfall/pdfkit/node_modules/restructure/src/Array.coffee new file mode 100644 index 00000000..5ff7161c --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/src/Array.coffee @@ -0,0 +1,79 @@ +{Number:NumberT} = require './Number' +utils = require './utils' + +class ArrayT + constructor: (@type, @length, @lengthType = 'count') -> + + decode: (stream, parent) -> + pos = stream.pos + + res = [] + ctx = parent + + if @length? + length = utils.resolveLength @length, stream, parent + + if @length instanceof NumberT + # define hidden properties + Object.defineProperties res, + parent: { value: parent } + _startOffset: { value: pos } + _currentOffset: { value: 0, writable: true } + _length: { value: length } + + ctx = res + + if not length? or @lengthType == 'bytes' + target = if length? + stream.pos + length + else if parent?._length + parent._startOffset + parent._length + else + stream.length + + while stream.pos < target + res.push @type.decode(stream, ctx) + + else + for i in [0...length] by 1 + res.push @type.decode(stream, ctx) + + return res + + size: (array, ctx) -> + unless array + return @type.size(null, ctx) * utils.resolveLength(@length, null, ctx) + + size = 0 + if @length instanceof NumberT + size += @length.size() + ctx = parent: ctx + + for item in array + size += @type.size(item, ctx) + + return size + + encode: (stream, array, parent) -> + ctx = parent + if @length instanceof NumberT + ctx = + pointers: [] + startOffset: stream.pos + parent: parent + + ctx.pointerOffset = stream.pos + @size(array, ctx) + @length.encode(stream, array.length) + + for item in array + @type.encode(stream, item, ctx) + + if @length instanceof NumberT + i = 0 + while i < ctx.pointers.length + ptr = ctx.pointers[i++] + ptr.type.encode(stream, ptr.val) + + return + +module.exports = ArrayT diff --git a/pitfall/pdfkit/node_modules/restructure/src/Array.js b/pitfall/pdfkit/node_modules/restructure/src/Array.js new file mode 100644 index 00000000..5f3500be --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/src/Array.js @@ -0,0 +1,105 @@ +// Generated by CoffeeScript 1.7.1 +(function() { + var ArrayT, NumberT, utils; + + NumberT = require('./Number').Number; + + utils = require('./utils'); + + ArrayT = (function() { + function ArrayT(type, length, lengthType) { + this.type = type; + this.length = length; + this.lengthType = lengthType != null ? lengthType : 'count'; + } + + ArrayT.prototype.decode = function(stream, parent) { + var ctx, i, length, pos, res, target, _i; + pos = stream.pos; + res = []; + ctx = parent; + if (this.length != null) { + length = utils.resolveLength(this.length, stream, parent); + } + if (this.length instanceof NumberT) { + Object.defineProperties(res, { + parent: { + value: parent + }, + _startOffset: { + value: pos + }, + _currentOffset: { + value: 0, + writable: true + }, + _length: { + value: length + } + }); + ctx = res; + } + if ((length == null) || this.lengthType === 'bytes') { + target = length != null ? stream.pos + length : (parent != null ? parent._length : void 0) ? parent._startOffset + parent._length : stream.length; + while (stream.pos < target) { + res.push(this.type.decode(stream, ctx)); + } + } else { + for (i = _i = 0; _i < length; i = _i += 1) { + res.push(this.type.decode(stream, ctx)); + } + } + return res; + }; + + ArrayT.prototype.size = function(array, ctx) { + var item, size, _i, _len; + if (!array) { + return this.type.size(null, ctx) * utils.resolveLength(this.length, null, ctx); + } + size = 0; + if (this.length instanceof NumberT) { + size += this.length.size(); + ctx = { + parent: ctx + }; + } + for (_i = 0, _len = array.length; _i < _len; _i++) { + item = array[_i]; + size += this.type.size(item, ctx); + } + return size; + }; + + ArrayT.prototype.encode = function(stream, array, parent) { + var ctx, i, item, ptr, _i, _len; + ctx = parent; + if (this.length instanceof NumberT) { + ctx = { + pointers: [], + startOffset: stream.pos, + parent: parent + }; + ctx.pointerOffset = stream.pos + this.size(array, ctx); + this.length.encode(stream, array.length); + } + for (_i = 0, _len = array.length; _i < _len; _i++) { + item = array[_i]; + this.type.encode(stream, item, ctx); + } + if (this.length instanceof NumberT) { + i = 0; + while (i < ctx.pointers.length) { + ptr = ctx.pointers[i++]; + ptr.type.encode(stream, ptr.val); + } + } + }; + + return ArrayT; + + })(); + + module.exports = ArrayT; + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/restructure/src/Bitfield.coffee b/pitfall/pdfkit/node_modules/restructure/src/Bitfield.coffee new file mode 100644 index 00000000..01f2acee --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/src/Bitfield.coffee @@ -0,0 +1,22 @@ +class Bitfield + constructor: (@type, @flags = []) -> + decode: (stream) -> + val = @type.decode(stream) + + res = {} + for flag, i in @flags when flag? + res[flag] = !!(val & (1 << i)) + + return res + + size: -> + @type.size() + + encode: (stream, keys) -> + val = 0 + for flag, i in @flags when flag? + val |= (1 << i) if keys[flag] + + @type.encode(stream, val) + +module.exports = Bitfield diff --git a/pitfall/pdfkit/node_modules/restructure/src/Bitfield.js b/pitfall/pdfkit/node_modules/restructure/src/Bitfield.js new file mode 100644 index 00000000..31364f3e --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/src/Bitfield.js @@ -0,0 +1,50 @@ +// Generated by CoffeeScript 1.7.1 +(function() { + var Bitfield; + + Bitfield = (function() { + function Bitfield(type, flags) { + this.type = type; + this.flags = flags != null ? flags : []; + } + + Bitfield.prototype.decode = function(stream) { + var flag, i, res, val, _i, _len, _ref; + val = this.type.decode(stream); + res = {}; + _ref = this.flags; + for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) { + flag = _ref[i]; + if (flag != null) { + res[flag] = !!(val & (1 << i)); + } + } + return res; + }; + + Bitfield.prototype.size = function() { + return this.type.size(); + }; + + Bitfield.prototype.encode = function(stream, keys) { + var flag, i, val, _i, _len, _ref; + val = 0; + _ref = this.flags; + for (i = _i = 0, _len = _ref.length; _i < _len; i = ++_i) { + flag = _ref[i]; + if (flag != null) { + if (keys[flag]) { + val |= 1 << i; + } + } + } + return this.type.encode(stream, val); + }; + + return Bitfield; + + })(); + + module.exports = Bitfield; + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/restructure/src/Boolean.coffee b/pitfall/pdfkit/node_modules/restructure/src/Boolean.coffee new file mode 100644 index 00000000..6262c3f2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/src/Boolean.coffee @@ -0,0 +1,13 @@ +class BooleanT + constructor: (@type) -> + + decode: (stream, parent) -> + !!@type.decode(stream, parent) + + size: (val, parent) -> + @type.size(val, parent) + + encode: (stream, val, parent) -> + @type.encode(stream, +val, parent) + +module.exports = BooleanT diff --git a/pitfall/pdfkit/node_modules/restructure/src/Boolean.js b/pitfall/pdfkit/node_modules/restructure/src/Boolean.js new file mode 100644 index 00000000..5458ad9f --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/src/Boolean.js @@ -0,0 +1,28 @@ +// Generated by CoffeeScript 1.7.1 +(function() { + var BooleanT; + + BooleanT = (function() { + function BooleanT(type) { + this.type = type; + } + + BooleanT.prototype.decode = function(stream, parent) { + return !!this.type.decode(stream, parent); + }; + + BooleanT.prototype.size = function(val, parent) { + return this.type.size(val, parent); + }; + + BooleanT.prototype.encode = function(stream, val, parent) { + return this.type.encode(stream, +val, parent); + }; + + return BooleanT; + + })(); + + module.exports = BooleanT; + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/restructure/src/Buffer.coffee b/pitfall/pdfkit/node_modules/restructure/src/Buffer.coffee new file mode 100644 index 00000000..8c7e0788 --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/src/Buffer.coffee @@ -0,0 +1,22 @@ +utils = require './utils' +{Number:NumberT} = require './Number' + +class BufferT + constructor: (@length) -> + decode: (stream, parent) -> + length = utils.resolveLength @length, stream, parent + return stream.readBuffer(length) + + size: (val, parent) -> + unless val + return utils.resolveLength @length, null, parent + + return val.length + + encode: (stream, buf, parent) -> + if @length instanceof NumberT + @length.encode(stream, buf.length) + + stream.writeBuffer(buf) + +module.exports = BufferT diff --git a/pitfall/pdfkit/node_modules/restructure/src/Buffer.js b/pitfall/pdfkit/node_modules/restructure/src/Buffer.js new file mode 100644 index 00000000..7c5205d6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/src/Buffer.js @@ -0,0 +1,40 @@ +// Generated by CoffeeScript 1.7.1 +(function() { + var BufferT, NumberT, utils; + + utils = require('./utils'); + + NumberT = require('./Number').Number; + + BufferT = (function() { + function BufferT(length) { + this.length = length; + } + + BufferT.prototype.decode = function(stream, parent) { + var length; + length = utils.resolveLength(this.length, stream, parent); + return stream.readBuffer(length); + }; + + BufferT.prototype.size = function(val, parent) { + if (!val) { + return utils.resolveLength(this.length, null, parent); + } + return val.length; + }; + + BufferT.prototype.encode = function(stream, buf, parent) { + if (this.length instanceof NumberT) { + this.length.encode(stream, buf.length); + } + return stream.writeBuffer(buf); + }; + + return BufferT; + + })(); + + module.exports = BufferT; + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/restructure/src/DecodeStream.coffee b/pitfall/pdfkit/node_modules/restructure/src/DecodeStream.coffee new file mode 100644 index 00000000..15bf836b --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/src/DecodeStream.coffee @@ -0,0 +1,67 @@ +try iconv = require 'iconv-lite' + +class DecodeStream + constructor: (@buffer) -> + @pos = 0 + @length = @buffer.length + + @TYPES = + UInt8: 1 + UInt16: 2 + UInt24: 3 + UInt32: 4 + Int8: 1 + Int16: 2 + Int24: 3 + Int32: 4 + Float: 4 + Double: 8 + + for key of Buffer.prototype when key.slice(0, 4) is 'read' + do (key) => + bytes = @TYPES[key.replace(/read|[BL]E/g, '')] + this::[key] = -> + ret = @buffer[key](@pos) + @pos += bytes + return ret + + readString: (length, encoding = 'ascii') -> + switch encoding + when 'utf16le', 'ucs2', 'utf8', 'ascii' + return @buffer.toString(encoding, @pos, @pos += length) + + when 'utf16be' + buf = new Buffer(@readBuffer(length)) + + # swap the bytes + for i in [0...buf.length - 1] by 2 + byte = buf[i] + buf[i] = buf[i + 1] + buf[i + 1] = byte + + return buf.toString('utf16le') + + else + buf = @readBuffer length + if iconv + try + return iconv.decode(buf, encoding) + + return buf + + readBuffer: (length) -> + return @buffer.slice(@pos, @pos += length) + + readUInt24BE: -> + return (@readUInt16BE() << 8) + @readUInt8() + + readUInt24LE: -> + return @readUInt16LE() + (@readUInt8() << 16) + + readInt24BE: -> + return (@readInt16BE() << 8) + @readUInt8() + + readInt24LE: -> + return @readUInt16LE() + (@readInt8() << 16) + +module.exports = DecodeStream diff --git a/pitfall/pdfkit/node_modules/restructure/src/DecodeStream.js b/pitfall/pdfkit/node_modules/restructure/src/DecodeStream.js new file mode 100644 index 00000000..7c12fe7e --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/src/DecodeStream.js @@ -0,0 +1,102 @@ +// Generated by CoffeeScript 1.7.1 +(function() { + var DecodeStream, iconv; + + try { + iconv = require('iconv-lite'); + } catch (_error) {} + + DecodeStream = (function() { + var key; + + function DecodeStream(buffer) { + this.buffer = buffer; + this.pos = 0; + this.length = this.buffer.length; + } + + DecodeStream.TYPES = { + UInt8: 1, + UInt16: 2, + UInt24: 3, + UInt32: 4, + Int8: 1, + Int16: 2, + Int24: 3, + Int32: 4, + Float: 4, + Double: 8 + }; + + for (key in Buffer.prototype) { + if (key.slice(0, 4) === 'read') { + (function(key) { + var bytes; + bytes = DecodeStream.TYPES[key.replace(/read|[BL]E/g, '')]; + return DecodeStream.prototype[key] = function() { + var ret; + ret = this.buffer[key](this.pos); + this.pos += bytes; + return ret; + }; + })(key); + } + } + + DecodeStream.prototype.readString = function(length, encoding) { + var buf, byte, i, _i, _ref; + if (encoding == null) { + encoding = 'ascii'; + } + switch (encoding) { + case 'utf16le': + case 'ucs2': + case 'utf8': + case 'ascii': + return this.buffer.toString(encoding, this.pos, this.pos += length); + case 'utf16be': + buf = new Buffer(this.readBuffer(length)); + for (i = _i = 0, _ref = buf.length - 1; _i < _ref; i = _i += 2) { + byte = buf[i]; + buf[i] = buf[i + 1]; + buf[i + 1] = byte; + } + return buf.toString('utf16le'); + default: + buf = this.readBuffer(length); + if (iconv) { + try { + return iconv.decode(buf, encoding); + } catch (_error) {} + } + return buf; + } + }; + + DecodeStream.prototype.readBuffer = function(length) { + return this.buffer.slice(this.pos, this.pos += length); + }; + + DecodeStream.prototype.readUInt24BE = function() { + return (this.readUInt16BE() << 8) + this.readUInt8(); + }; + + DecodeStream.prototype.readUInt24LE = function() { + return this.readUInt16LE() + (this.readUInt8() << 16); + }; + + DecodeStream.prototype.readInt24BE = function() { + return (this.readInt16BE() << 8) + this.readUInt8(); + }; + + DecodeStream.prototype.readInt24LE = function() { + return this.readUInt16LE() + (this.readInt8() << 16); + }; + + return DecodeStream; + + })(); + + module.exports = DecodeStream; + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/restructure/src/EncodeStream.coffee b/pitfall/pdfkit/node_modules/restructure/src/EncodeStream.coffee new file mode 100644 index 00000000..f0e00480 --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/src/EncodeStream.coffee @@ -0,0 +1,101 @@ +stream = require 'stream' +DecodeStream = require './DecodeStream' +try iconv = require 'iconv-lite' + +class EncodeStream extends stream.Readable + constructor: (bufferSize = 65536) -> + super + @buffer = new Buffer(bufferSize) + @bufferOffset = 0 + @pos = 0 + + for key of Buffer.prototype when key.slice(0, 5) is 'write' + do (key) => + bytes = +DecodeStream.TYPES[key.replace(/write|[BL]E/g, '')] + EncodeStream::[key] = (value) -> + @ensure bytes + @buffer[key](value, @bufferOffset) + @bufferOffset += bytes + @pos += bytes + + _read: -> + # do nothing, required by node + + ensure: (bytes) -> + if @bufferOffset + bytes > @buffer.length + @flush() + + flush: -> + if @bufferOffset > 0 + @push new Buffer @buffer.slice(0, @bufferOffset) + @bufferOffset = 0 + + writeBuffer: (buffer) -> + @flush() + @push buffer + @pos += buffer.length + + writeString: (string, encoding = 'ascii') -> + switch encoding + when 'utf16le', 'ucs2', 'utf8', 'ascii' + @writeBuffer new Buffer(string, encoding) + + when 'utf16be' + buf = new Buffer(string, 'utf16le') + + # swap the bytes + for i in [0...buf.length - 1] by 2 + byte = buf[i] + buf[i] = buf[i + 1] + buf[i + 1] = byte + + @writeBuffer buf + + else + if iconv + @writeBuffer iconv.encode(string, encoding) + else + throw new Error 'Install iconv-lite to enable additional string encodings.' + + writeUInt24BE: (val) -> + @ensure 3 + @buffer[@bufferOffset++] = val >>> 16 & 0xff + @buffer[@bufferOffset++] = val >>> 8 & 0xff + @buffer[@bufferOffset++] = val & 0xff + @pos += 3 + + writeUInt24LE: (val) -> + @ensure 3 + @buffer[@bufferOffset++] = val & 0xff + @buffer[@bufferOffset++] = val >>> 8 & 0xff + @buffer[@bufferOffset++] = val >>> 16 & 0xff + @pos += 3 + + writeInt24BE: (val) -> + if val >= 0 + @writeUInt24BE val + else + @writeUInt24BE val + 0xffffff + 1 + + writeInt24LE: (val) -> + if val >= 0 + @writeUInt24LE val + else + @writeUInt24LE val + 0xffffff + 1 + + fill: (val, length) -> + if length < @buffer.length + @ensure length + @buffer.fill(val, @bufferOffset, @bufferOffset + length) + @bufferOffset += length + @pos += length + else + buf = new Buffer(length) + buf.fill(val) + @writeBuffer buf + + end: -> + @flush() + @push null + +module.exports = EncodeStream diff --git a/pitfall/pdfkit/node_modules/restructure/src/EncodeStream.js b/pitfall/pdfkit/node_modules/restructure/src/EncodeStream.js new file mode 100644 index 00000000..bfba8f6a --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/src/EncodeStream.js @@ -0,0 +1,151 @@ +// Generated by CoffeeScript 1.7.1 +(function() { + var DecodeStream, EncodeStream, iconv, stream, + __hasProp = {}.hasOwnProperty, + __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + + stream = require('stream'); + + DecodeStream = require('./DecodeStream'); + + try { + iconv = require('iconv-lite'); + } catch (_error) {} + + EncodeStream = (function(_super) { + var key; + + __extends(EncodeStream, _super); + + function EncodeStream(bufferSize) { + if (bufferSize == null) { + bufferSize = 65536; + } + EncodeStream.__super__.constructor.apply(this, arguments); + this.buffer = new Buffer(bufferSize); + this.bufferOffset = 0; + this.pos = 0; + } + + for (key in Buffer.prototype) { + if (key.slice(0, 5) === 'write') { + (function(key) { + var bytes; + bytes = +DecodeStream.TYPES[key.replace(/write|[BL]E/g, '')]; + return EncodeStream.prototype[key] = function(value) { + this.ensure(bytes); + this.buffer[key](value, this.bufferOffset); + this.bufferOffset += bytes; + return this.pos += bytes; + }; + })(key); + } + } + + EncodeStream.prototype._read = function() {}; + + EncodeStream.prototype.ensure = function(bytes) { + if (this.bufferOffset + bytes > this.buffer.length) { + return this.flush(); + } + }; + + EncodeStream.prototype.flush = function() { + if (this.bufferOffset > 0) { + this.push(new Buffer(this.buffer.slice(0, this.bufferOffset))); + return this.bufferOffset = 0; + } + }; + + EncodeStream.prototype.writeBuffer = function(buffer) { + this.flush(); + this.push(buffer); + return this.pos += buffer.length; + }; + + EncodeStream.prototype.writeString = function(string, encoding) { + var buf, byte, i, _i, _ref; + if (encoding == null) { + encoding = 'ascii'; + } + switch (encoding) { + case 'utf16le': + case 'ucs2': + case 'utf8': + case 'ascii': + return this.writeBuffer(new Buffer(string, encoding)); + case 'utf16be': + buf = new Buffer(string, 'utf16le'); + for (i = _i = 0, _ref = buf.length - 1; _i < _ref; i = _i += 2) { + byte = buf[i]; + buf[i] = buf[i + 1]; + buf[i + 1] = byte; + } + return this.writeBuffer(buf); + default: + if (iconv) { + return this.writeBuffer(iconv.encode(string, encoding)); + } else { + throw new Error('Install iconv-lite to enable additional string encodings.'); + } + } + }; + + EncodeStream.prototype.writeUInt24BE = function(val) { + this.ensure(3); + this.buffer[this.bufferOffset++] = val >>> 16 & 0xff; + this.buffer[this.bufferOffset++] = val >>> 8 & 0xff; + this.buffer[this.bufferOffset++] = val & 0xff; + return this.pos += 3; + }; + + EncodeStream.prototype.writeUInt24LE = function(val) { + this.ensure(3); + this.buffer[this.bufferOffset++] = val & 0xff; + this.buffer[this.bufferOffset++] = val >>> 8 & 0xff; + this.buffer[this.bufferOffset++] = val >>> 16 & 0xff; + return this.pos += 3; + }; + + EncodeStream.prototype.writeInt24BE = function(val) { + if (val >= 0) { + return this.writeUInt24BE(val); + } else { + return this.writeUInt24BE(val + 0xffffff + 1); + } + }; + + EncodeStream.prototype.writeInt24LE = function(val) { + if (val >= 0) { + return this.writeUInt24LE(val); + } else { + return this.writeUInt24LE(val + 0xffffff + 1); + } + }; + + EncodeStream.prototype.fill = function(val, length) { + var buf; + if (length < this.buffer.length) { + this.ensure(length); + this.buffer.fill(val, this.bufferOffset, this.bufferOffset + length); + this.bufferOffset += length; + return this.pos += length; + } else { + buf = new Buffer(length); + buf.fill(val); + return this.writeBuffer(buf); + } + }; + + EncodeStream.prototype.end = function() { + this.flush(); + return this.push(null); + }; + + return EncodeStream; + + })(stream.Readable); + + module.exports = EncodeStream; + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/restructure/src/Enum.coffee b/pitfall/pdfkit/node_modules/restructure/src/Enum.coffee new file mode 100644 index 00000000..408895b1 --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/src/Enum.coffee @@ -0,0 +1,17 @@ +class Enum + constructor: (@type, @options = []) -> + decode: (stream) -> + index = @type.decode(stream) + return @options[index] or index + + size: -> + @type.size() + + encode: (stream, val) -> + index = @options.indexOf val + if index is -1 + throw new Error "Unknown option in enum: #{val}" + + @type.encode(stream, index) + +module.exports = Enum diff --git a/pitfall/pdfkit/node_modules/restructure/src/Enum.js b/pitfall/pdfkit/node_modules/restructure/src/Enum.js new file mode 100644 index 00000000..2de08d6e --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/src/Enum.js @@ -0,0 +1,36 @@ +// Generated by CoffeeScript 1.7.1 +(function() { + var Enum; + + Enum = (function() { + function Enum(type, options) { + this.type = type; + this.options = options != null ? options : []; + } + + Enum.prototype.decode = function(stream) { + var index; + index = this.type.decode(stream); + return this.options[index] || index; + }; + + Enum.prototype.size = function() { + return this.type.size(); + }; + + Enum.prototype.encode = function(stream, val) { + var index; + index = this.options.indexOf(val); + if (index === -1) { + throw new Error("Unknown option in enum: " + val); + } + return this.type.encode(stream, index); + }; + + return Enum; + + })(); + + module.exports = Enum; + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/restructure/src/LazyArray.coffee b/pitfall/pdfkit/node_modules/restructure/src/LazyArray.coffee new file mode 100644 index 00000000..35d4bc68 --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/src/LazyArray.coffee @@ -0,0 +1,58 @@ +ArrayT = require './Array' +{Number:NumberT} = require './Number' +utils = require './utils' +{inspect} = require 'util' + +class LazyArrayT extends ArrayT + decode: (stream, parent) -> + pos = stream.pos + length = utils.resolveLength @length, stream, parent + + if @length instanceof NumberT + parent = + parent: parent + _startOffset: pos + _currentOffset: 0 + _length: length + + res = new LazyArray @type, length, stream, parent + + stream.pos += length * @type.size(null, parent) + return res + + size: (val, ctx) -> + if val instanceof LazyArray + val = val.toArray() + + super val, ctx + + encode: (stream, val, ctx) -> + if val instanceof LazyArray + val = val.toArray() + + super stream, val, ctx + +class LazyArray + constructor: (@type, @length, @stream, @ctx) -> + @base = @stream.pos + @items = [] + + get: (index) -> + if index < 0 or index >= @length + return undefined + + unless @items[index]? + pos = @stream.pos + @stream.pos = @base + @type.size(null, @ctx) * index + @items[index] = @type.decode @stream, @ctx + @stream.pos = pos + + return @items[index] + + toArray: -> + @get(i) for i in [0...@length] by 1 + + inspect: -> + inspect @toArray() + +module.exports = LazyArrayT diff --git a/pitfall/pdfkit/node_modules/restructure/src/LazyArray.js b/pitfall/pdfkit/node_modules/restructure/src/LazyArray.js new file mode 100644 index 00000000..5d5bfd84 --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/src/LazyArray.js @@ -0,0 +1,100 @@ +// Generated by CoffeeScript 1.7.1 +(function() { + var ArrayT, LazyArray, LazyArrayT, NumberT, inspect, utils, + __hasProp = {}.hasOwnProperty, + __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + + ArrayT = require('./Array'); + + NumberT = require('./Number').Number; + + utils = require('./utils'); + + inspect = require('util').inspect; + + LazyArrayT = (function(_super) { + __extends(LazyArrayT, _super); + + function LazyArrayT() { + return LazyArrayT.__super__.constructor.apply(this, arguments); + } + + LazyArrayT.prototype.decode = function(stream, parent) { + var length, pos, res; + pos = stream.pos; + length = utils.resolveLength(this.length, stream, parent); + if (this.length instanceof NumberT) { + parent = { + parent: parent, + _startOffset: pos, + _currentOffset: 0, + _length: length + }; + } + res = new LazyArray(this.type, length, stream, parent); + stream.pos += length * this.type.size(null, parent); + return res; + }; + + LazyArrayT.prototype.size = function(val, ctx) { + if (val instanceof LazyArray) { + val = val.toArray(); + } + return LazyArrayT.__super__.size.call(this, val, ctx); + }; + + LazyArrayT.prototype.encode = function(stream, val, ctx) { + if (val instanceof LazyArray) { + val = val.toArray(); + } + return LazyArrayT.__super__.encode.call(this, stream, val, ctx); + }; + + return LazyArrayT; + + })(ArrayT); + + LazyArray = (function() { + function LazyArray(type, length, stream, ctx) { + this.type = type; + this.length = length; + this.stream = stream; + this.ctx = ctx; + this.base = this.stream.pos; + this.items = []; + } + + LazyArray.prototype.get = function(index) { + var pos; + if (index < 0 || index >= this.length) { + return void 0; + } + if (this.items[index] == null) { + pos = this.stream.pos; + this.stream.pos = this.base + this.type.size(null, this.ctx) * index; + this.items[index] = this.type.decode(this.stream, this.ctx); + this.stream.pos = pos; + } + return this.items[index]; + }; + + LazyArray.prototype.toArray = function() { + var i, _i, _ref, _results; + _results = []; + for (i = _i = 0, _ref = this.length; _i < _ref; i = _i += 1) { + _results.push(this.get(i)); + } + return _results; + }; + + LazyArray.prototype.inspect = function() { + return inspect(this.toArray()); + }; + + return LazyArray; + + })(); + + module.exports = LazyArrayT; + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/restructure/src/Number.coffee b/pitfall/pdfkit/node_modules/restructure/src/Number.coffee new file mode 100644 index 00000000..61b7b58a --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/src/Number.coffee @@ -0,0 +1,53 @@ +DecodeStream = require './DecodeStream' + +class NumberT + constructor: (@type, @endian = 'BE') -> + @fn = @type + unless @type[@type.length - 1] is '8' + @fn += @endian + + size: -> + DecodeStream.TYPES[@type] + + decode: (stream) -> + return stream['read' + @fn]() + + encode: (stream, val) -> + stream['write' + @fn](val) + +exports.Number = NumberT +exports.uint8 = new NumberT('UInt8') +exports.uint16be = exports.uint16 = new NumberT('UInt16', 'BE') +exports.uint16le = new NumberT('UInt16', 'LE') +exports.uint24be = exports.uint24 = new NumberT('UInt24', 'BE') +exports.uint24le = new NumberT('UInt24', 'LE') +exports.uint32be = exports.uint32 = new NumberT('UInt32', 'BE') +exports.uint32le = new NumberT('UInt32', 'LE') +exports.int8 = new NumberT('Int8') +exports.int16be = exports.int16 = new NumberT('Int16', 'BE') +exports.int16le = new NumberT('Int16', 'LE') +exports.int24be = exports.int24 = new NumberT('Int24', 'BE') +exports.int24le = new NumberT('Int24', 'LE') +exports.int32be = exports.int32 = new NumberT('Int32', 'BE') +exports.int32le = new NumberT('Int32', 'LE') +exports.floatbe = exports.float = new NumberT('Float', 'BE') +exports.floatle = new NumberT('Float', 'LE') +exports.doublebe = exports.double = new NumberT('Double', 'BE') +exports.doublele = new NumberT('Double', 'LE') + +class Fixed extends NumberT + constructor: (size, endian, fracBits = size >> 1) -> + super "Int#{size}", endian + @_point = 1 << fracBits + + decode: (stream) -> + return super(stream) / @_point + + encode: (stream, val) -> + super stream, val * @_point | 0 + +exports.Fixed = Fixed +exports.fixed16be = exports.fixed16 = new Fixed(16, 'BE') +exports.fixed16le = new Fixed(16, 'LE') +exports.fixed32be = exports.fixed32 =new Fixed(32, 'BE') +exports.fixed32le = new Fixed(32, 'LE') diff --git a/pitfall/pdfkit/node_modules/restructure/src/Number.js b/pitfall/pdfkit/node_modules/restructure/src/Number.js new file mode 100644 index 00000000..216a9086 --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/src/Number.js @@ -0,0 +1,106 @@ +// Generated by CoffeeScript 1.7.1 +(function() { + var DecodeStream, Fixed, NumberT, + __hasProp = {}.hasOwnProperty, + __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + + DecodeStream = require('./DecodeStream'); + + NumberT = (function() { + function NumberT(type, endian) { + this.type = type; + this.endian = endian != null ? endian : 'BE'; + this.fn = this.type; + if (this.type[this.type.length - 1] !== '8') { + this.fn += this.endian; + } + } + + NumberT.prototype.size = function() { + return DecodeStream.TYPES[this.type]; + }; + + NumberT.prototype.decode = function(stream) { + return stream['read' + this.fn](); + }; + + NumberT.prototype.encode = function(stream, val) { + return stream['write' + this.fn](val); + }; + + return NumberT; + + })(); + + exports.Number = NumberT; + + exports.uint8 = new NumberT('UInt8'); + + exports.uint16be = exports.uint16 = new NumberT('UInt16', 'BE'); + + exports.uint16le = new NumberT('UInt16', 'LE'); + + exports.uint24be = exports.uint24 = new NumberT('UInt24', 'BE'); + + exports.uint24le = new NumberT('UInt24', 'LE'); + + exports.uint32be = exports.uint32 = new NumberT('UInt32', 'BE'); + + exports.uint32le = new NumberT('UInt32', 'LE'); + + exports.int8 = new NumberT('Int8'); + + exports.int16be = exports.int16 = new NumberT('Int16', 'BE'); + + exports.int16le = new NumberT('Int16', 'LE'); + + exports.int24be = exports.int24 = new NumberT('Int24', 'BE'); + + exports.int24le = new NumberT('Int24', 'LE'); + + exports.int32be = exports.int32 = new NumberT('Int32', 'BE'); + + exports.int32le = new NumberT('Int32', 'LE'); + + exports.floatbe = exports.float = new NumberT('Float', 'BE'); + + exports.floatle = new NumberT('Float', 'LE'); + + exports.doublebe = exports.double = new NumberT('Double', 'BE'); + + exports.doublele = new NumberT('Double', 'LE'); + + Fixed = (function(_super) { + __extends(Fixed, _super); + + function Fixed(size, endian, fracBits) { + if (fracBits == null) { + fracBits = size >> 1; + } + Fixed.__super__.constructor.call(this, "Int" + size, endian); + this._point = 1 << fracBits; + } + + Fixed.prototype.decode = function(stream) { + return Fixed.__super__.decode.call(this, stream) / this._point; + }; + + Fixed.prototype.encode = function(stream, val) { + return Fixed.__super__.encode.call(this, stream, val * this._point | 0); + }; + + return Fixed; + + })(NumberT); + + exports.Fixed = Fixed; + + exports.fixed16be = exports.fixed16 = new Fixed(16, 'BE'); + + exports.fixed16le = new Fixed(16, 'LE'); + + exports.fixed32be = exports.fixed32 = new Fixed(32, 'BE'); + + exports.fixed32le = new Fixed(32, 'LE'); + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/restructure/src/Optional.coffee b/pitfall/pdfkit/node_modules/restructure/src/Optional.coffee new file mode 100644 index 00000000..0ad3c921 --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/src/Optional.coffee @@ -0,0 +1,30 @@ +class Optional + constructor: (@type, @condition = true) -> + + decode: (stream, parent) -> + condition = @condition + if typeof condition is 'function' + condition = condition.call(parent, parent) + + if condition + return @type.decode(stream, parent) + + size: (val, parent) -> + condition = @condition + if typeof condition is 'function' + condition = condition.call(parent, parent) + + if condition + return @type.size(val, parent) + else + return 0 + + encode: (stream, val, parent) -> + condition = @condition + if typeof condition is 'function' + condition = condition.call(parent, parent) + + if condition + @type.encode(stream, val, parent) + +module.exports = Optional diff --git a/pitfall/pdfkit/node_modules/restructure/src/Optional.js b/pitfall/pdfkit/node_modules/restructure/src/Optional.js new file mode 100644 index 00000000..58f4d41d --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/src/Optional.js @@ -0,0 +1,52 @@ +// Generated by CoffeeScript 1.7.1 +(function() { + var Optional; + + Optional = (function() { + function Optional(type, condition) { + this.type = type; + this.condition = condition != null ? condition : true; + } + + Optional.prototype.decode = function(stream, parent) { + var condition; + condition = this.condition; + if (typeof condition === 'function') { + condition = condition.call(parent, parent); + } + if (condition) { + return this.type.decode(stream, parent); + } + }; + + Optional.prototype.size = function(val, parent) { + var condition; + condition = this.condition; + if (typeof condition === 'function') { + condition = condition.call(parent, parent); + } + if (condition) { + return this.type.size(val, parent); + } else { + return 0; + } + }; + + Optional.prototype.encode = function(stream, val, parent) { + var condition; + condition = this.condition; + if (typeof condition === 'function') { + condition = condition.call(parent, parent); + } + if (condition) { + return this.type.encode(stream, val, parent); + } + }; + + return Optional; + + })(); + + module.exports = Optional; + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/restructure/src/Pointer.coffee b/pitfall/pdfkit/node_modules/restructure/src/Pointer.coffee new file mode 100644 index 00000000..468d242b --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/src/Pointer.coffee @@ -0,0 +1,125 @@ +utils = require './utils' + +class Pointer + constructor: (@offsetType, @type, @options = {}) -> + @type = null if @type is 'void' + @options.type ?= 'local' + @options.allowNull ?= true + @options.nullValue ?= 0 + @options.lazy ?= false + if @options.relativeTo + @relativeToGetter = new Function('ctx', "return ctx.#{@options.relativeTo}") + + decode: (stream, ctx) -> + offset = @offsetType.decode(stream, ctx) + + # handle NULL pointers + if offset is @options.nullValue and @options.allowNull + return null + + relative = switch @options.type + when 'local' then ctx._startOffset + when 'immediate' then stream.pos - @offsetType.size() + when 'parent' then ctx.parent._startOffset + else + c = ctx + while c.parent + c = c.parent + + c._startOffset or 0 + + if @options.relativeTo + relative += @relativeToGetter ctx + + ptr = offset + relative + + if @type? + val = null + decodeValue = => + return val if val? + + pos = stream.pos + stream.pos = ptr + val = @type.decode(stream, ctx) + stream.pos = pos + return val + + # If this is a lazy pointer, define a getter to decode only when needed. + # This obviously only works when the pointer is contained by a Struct. + if @options.lazy + return new utils.PropertyDescriptor + get: decodeValue + + return decodeValue() + else + return ptr + + size: (val, ctx) -> + parent = ctx + switch @options.type + when 'local', 'immediate' + break + when 'parent' + ctx = ctx.parent + else # global + while ctx.parent + ctx = ctx.parent + + type = @type + unless type? + unless val instanceof VoidPointer + throw new Error "Must be a VoidPointer" + + type = val.type + val = val.value + + if val and ctx + ctx.pointerSize += type.size(val, parent) + + return @offsetType.size() + + encode: (stream, val, ctx) -> + parent = ctx + if not val? + @offsetType.encode(stream, @options.nullValue) + return + + switch @options.type + when 'local' + relative = ctx.startOffset + when 'immediate' + relative = stream.pos + @offsetType.size(val, parent) + when 'parent' + ctx = ctx.parent + relative = ctx.startOffset + else # global + relative = 0 + while ctx.parent + ctx = ctx.parent + + if @options.relativeTo + relative += @relativeToGetter parent.val + + @offsetType.encode(stream, ctx.pointerOffset - relative) + + type = @type + unless type? + unless val instanceof VoidPointer + throw new Error "Must be a VoidPointer" + + type = val.type + val = val.value + + ctx.pointers.push + type: type + val: val + parent: parent + + ctx.pointerOffset += type.size(val, parent) + +# A pointer whose type is determined at decode time +class VoidPointer + constructor: (@type, @value) -> + +exports.Pointer = Pointer +exports.VoidPointer = VoidPointer diff --git a/pitfall/pdfkit/node_modules/restructure/src/Pointer.js b/pitfall/pdfkit/node_modules/restructure/src/Pointer.js new file mode 100644 index 00000000..078dcf61 --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/src/Pointer.js @@ -0,0 +1,176 @@ +// Generated by CoffeeScript 1.7.1 +(function() { + var Pointer, VoidPointer, utils; + + utils = require('./utils'); + + Pointer = (function() { + function Pointer(offsetType, type, options) { + var _base, _base1, _base2, _base3; + this.offsetType = offsetType; + this.type = type; + this.options = options != null ? options : {}; + if (this.type === 'void') { + this.type = null; + } + if ((_base = this.options).type == null) { + _base.type = 'local'; + } + if ((_base1 = this.options).allowNull == null) { + _base1.allowNull = true; + } + if ((_base2 = this.options).nullValue == null) { + _base2.nullValue = 0; + } + if ((_base3 = this.options).lazy == null) { + _base3.lazy = false; + } + if (this.options.relativeTo) { + this.relativeToGetter = new Function('ctx', "return ctx." + this.options.relativeTo); + } + } + + Pointer.prototype.decode = function(stream, ctx) { + var c, decodeValue, offset, ptr, relative, val; + offset = this.offsetType.decode(stream, ctx); + if (offset === this.options.nullValue && this.options.allowNull) { + return null; + } + relative = (function() { + switch (this.options.type) { + case 'local': + return ctx._startOffset; + case 'immediate': + return stream.pos - this.offsetType.size(); + case 'parent': + return ctx.parent._startOffset; + default: + c = ctx; + while (c.parent) { + c = c.parent; + } + return c._startOffset || 0; + } + }).call(this); + if (this.options.relativeTo) { + relative += this.relativeToGetter(ctx); + } + ptr = offset + relative; + if (this.type != null) { + val = null; + decodeValue = (function(_this) { + return function() { + var pos; + if (val != null) { + return val; + } + pos = stream.pos; + stream.pos = ptr; + val = _this.type.decode(stream, ctx); + stream.pos = pos; + return val; + }; + })(this); + if (this.options.lazy) { + return new utils.PropertyDescriptor({ + get: decodeValue + }); + } + return decodeValue(); + } else { + return ptr; + } + }; + + Pointer.prototype.size = function(val, ctx) { + var parent, type; + parent = ctx; + switch (this.options.type) { + case 'local': + case 'immediate': + break; + case 'parent': + ctx = ctx.parent; + break; + default: + while (ctx.parent) { + ctx = ctx.parent; + } + } + type = this.type; + if (type == null) { + if (!(val instanceof VoidPointer)) { + throw new Error("Must be a VoidPointer"); + } + type = val.type; + val = val.value; + } + if (val && ctx) { + ctx.pointerSize += type.size(val, parent); + } + return this.offsetType.size(); + }; + + Pointer.prototype.encode = function(stream, val, ctx) { + var parent, relative, type; + parent = ctx; + if (val == null) { + this.offsetType.encode(stream, this.options.nullValue); + return; + } + switch (this.options.type) { + case 'local': + relative = ctx.startOffset; + break; + case 'immediate': + relative = stream.pos + this.offsetType.size(val, parent); + break; + case 'parent': + ctx = ctx.parent; + relative = ctx.startOffset; + break; + default: + relative = 0; + while (ctx.parent) { + ctx = ctx.parent; + } + } + if (this.options.relativeTo) { + relative += this.relativeToGetter(parent.val); + } + this.offsetType.encode(stream, ctx.pointerOffset - relative); + type = this.type; + if (type == null) { + if (!(val instanceof VoidPointer)) { + throw new Error("Must be a VoidPointer"); + } + type = val.type; + val = val.value; + } + ctx.pointers.push({ + type: type, + val: val, + parent: parent + }); + return ctx.pointerOffset += type.size(val, parent); + }; + + return Pointer; + + })(); + + VoidPointer = (function() { + function VoidPointer(type, value) { + this.type = type; + this.value = value; + } + + return VoidPointer; + + })(); + + exports.Pointer = Pointer; + + exports.VoidPointer = VoidPointer; + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/restructure/src/Reserved.coffee b/pitfall/pdfkit/node_modules/restructure/src/Reserved.coffee new file mode 100644 index 00000000..62429af6 --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/src/Reserved.coffee @@ -0,0 +1,16 @@ +utils = require './utils' + +class Reserved + constructor: (@type, @count = 1) -> + decode: (stream, parent) -> + stream.pos += @size(null, parent) + return undefined + + size: (data, parent) -> + count = utils.resolveLength @count, null, parent + @type.size() * count + + encode: (stream, val, parent) -> + stream.fill 0, @size(val, parent) + +module.exports = Reserved diff --git a/pitfall/pdfkit/node_modules/restructure/src/Reserved.js b/pitfall/pdfkit/node_modules/restructure/src/Reserved.js new file mode 100644 index 00000000..c71eb3b4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/src/Reserved.js @@ -0,0 +1,34 @@ +// Generated by CoffeeScript 1.7.1 +(function() { + var Reserved, utils; + + utils = require('./utils'); + + Reserved = (function() { + function Reserved(type, count) { + this.type = type; + this.count = count != null ? count : 1; + } + + Reserved.prototype.decode = function(stream, parent) { + stream.pos += this.size(null, parent); + return void 0; + }; + + Reserved.prototype.size = function(data, parent) { + var count; + count = utils.resolveLength(this.count, null, parent); + return this.type.size() * count; + }; + + Reserved.prototype.encode = function(stream, val, parent) { + return stream.fill(0, this.size(val, parent)); + }; + + return Reserved; + + })(); + + module.exports = Reserved; + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/restructure/src/String.coffee b/pitfall/pdfkit/node_modules/restructure/src/String.coffee new file mode 100644 index 00000000..7502f202 --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/src/String.coffee @@ -0,0 +1,63 @@ +{Number:NumberT} = require './Number' +utils = require './utils' + +class StringT + constructor: (@length, @encoding = 'ascii') -> + + decode: (stream, parent) -> + length = if @length? + utils.resolveLength @length, stream, parent + else + {buffer, length, pos} = stream + + while pos < length and buffer[pos] isnt 0x00 + ++pos + + pos - stream.pos + + encoding = @encoding + if typeof encoding is 'function' + encoding = encoding.call(parent, parent) or 'ascii' + + string = stream.readString(length, encoding) + + if not @length? and stream.pos < stream.length + stream.pos++ + + return string + + size: (val, parent) -> + # Use the defined value if no value was given + unless val + return utils.resolveLength @length, null, parent + + encoding = @encoding + if typeof encoding is 'function' + encoding = encoding.call(parent?.val, parent?.val) or 'ascii' + + if encoding is 'utf16be' + encoding = 'utf16le' + + size = Buffer.byteLength(val, encoding) + if @length instanceof NumberT + size += @length.size() + + if not @length? + size++ + + return size + + encode: (stream, val, parent) -> + encoding = @encoding + if typeof encoding is 'function' + encoding = encoding.call(parent?.val, parent?.val) or 'ascii' + + if @length instanceof NumberT + @length.encode(stream, Buffer.byteLength(val, encoding)) + + stream.writeString(val, encoding) + + if not @length? + stream.writeUInt8(0x00) + +module.exports = StringT diff --git a/pitfall/pdfkit/node_modules/restructure/src/String.js b/pitfall/pdfkit/node_modules/restructure/src/String.js new file mode 100644 index 00000000..b8b2570d --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/src/String.js @@ -0,0 +1,82 @@ +// Generated by CoffeeScript 1.7.1 +(function() { + var NumberT, StringT, utils; + + NumberT = require('./Number').Number; + + utils = require('./utils'); + + StringT = (function() { + function StringT(length, encoding) { + this.length = length; + this.encoding = encoding != null ? encoding : 'ascii'; + } + + StringT.prototype.decode = function(stream, parent) { + var buffer, encoding, length, pos, string; + length = (function() { + if (this.length != null) { + return utils.resolveLength(this.length, stream, parent); + } else { + buffer = stream.buffer, length = stream.length, pos = stream.pos; + while (pos < length && buffer[pos] !== 0x00) { + ++pos; + } + return pos - stream.pos; + } + }).call(this); + encoding = this.encoding; + if (typeof encoding === 'function') { + encoding = encoding.call(parent, parent) || 'ascii'; + } + string = stream.readString(length, encoding); + if ((this.length == null) && stream.pos < stream.length) { + stream.pos++; + } + return string; + }; + + StringT.prototype.size = function(val, parent) { + var encoding, size; + if (!val) { + return utils.resolveLength(this.length, null, parent); + } + encoding = this.encoding; + if (typeof encoding === 'function') { + encoding = encoding.call(parent != null ? parent.val : void 0, parent != null ? parent.val : void 0) || 'ascii'; + } + if (encoding === 'utf16be') { + encoding = 'utf16le'; + } + size = Buffer.byteLength(val, encoding); + if (this.length instanceof NumberT) { + size += this.length.size(); + } + if (this.length == null) { + size++; + } + return size; + }; + + StringT.prototype.encode = function(stream, val, parent) { + var encoding; + encoding = this.encoding; + if (typeof encoding === 'function') { + encoding = encoding.call(parent != null ? parent.val : void 0, parent != null ? parent.val : void 0) || 'ascii'; + } + if (this.length instanceof NumberT) { + this.length.encode(stream, Buffer.byteLength(val, encoding)); + } + stream.writeString(val, encoding); + if (this.length == null) { + return stream.writeUInt8(0x00); + } + }; + + return StringT; + + })(); + + module.exports = StringT; + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/restructure/src/Struct.coffee b/pitfall/pdfkit/node_modules/restructure/src/Struct.coffee new file mode 100644 index 00000000..da901cbd --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/src/Struct.coffee @@ -0,0 +1,79 @@ +utils = require './utils' + +class Struct + constructor: (@fields = {}) -> + + decode: (stream, parent, length = 0) -> + res = @_setup stream, parent, length + @_parseFields stream, res, @fields + + @process?.call(res, stream) + return res + + _setup: (stream, parent, length) -> + res = {} + + # define hidden properties + Object.defineProperties res, + parent: { value: parent } + _startOffset: { value: stream.pos } + _currentOffset: { value: 0, writable: true } + _length: { value: length } + + return res + + _parseFields: (stream, res, fields) -> + for key, type of fields + if typeof type is 'function' + val = type.call(res, res) + else + val = type.decode(stream, res) + + unless val is undefined + if val instanceof utils.PropertyDescriptor + Object.defineProperty res, key, val + else + res[key] = val + + res._currentOffset = stream.pos - res._startOffset + + return + + size: (val = {}, parent, includePointers = true) -> + ctx = + parent: parent + val: val + pointerSize: 0 + + size = 0 + for key, type of @fields when type.size? + size += type.size(val[key], ctx) + + if includePointers + size += ctx.pointerSize + + return size + + encode: (stream, val, parent) -> + @preEncode?.call(val, stream) + + ctx = + pointers: [] + startOffset: stream.pos + parent: parent + val: val + pointerSize: 0 + + ctx.pointerOffset = stream.pos + @size(val, ctx, false) + + for key, type of @fields when type.encode? + type.encode(stream, val[key], ctx) + + i = 0 + while i < ctx.pointers.length + ptr = ctx.pointers[i++] + ptr.type.encode(stream, ptr.val, ptr.parent) + + return + +module.exports = Struct diff --git a/pitfall/pdfkit/node_modules/restructure/src/Struct.js b/pitfall/pdfkit/node_modules/restructure/src/Struct.js new file mode 100644 index 00000000..83aeffd3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/src/Struct.js @@ -0,0 +1,126 @@ +// Generated by CoffeeScript 1.7.1 +(function() { + var Struct, utils; + + utils = require('./utils'); + + Struct = (function() { + function Struct(fields) { + this.fields = fields != null ? fields : {}; + } + + Struct.prototype.decode = function(stream, parent, length) { + var res, _ref; + if (length == null) { + length = 0; + } + res = this._setup(stream, parent, length); + this._parseFields(stream, res, this.fields); + if ((_ref = this.process) != null) { + _ref.call(res, stream); + } + return res; + }; + + Struct.prototype._setup = function(stream, parent, length) { + var res; + res = {}; + Object.defineProperties(res, { + parent: { + value: parent + }, + _startOffset: { + value: stream.pos + }, + _currentOffset: { + value: 0, + writable: true + }, + _length: { + value: length + } + }); + return res; + }; + + Struct.prototype._parseFields = function(stream, res, fields) { + var key, type, val; + for (key in fields) { + type = fields[key]; + if (typeof type === 'function') { + val = type.call(res, res); + } else { + val = type.decode(stream, res); + } + if (val !== void 0) { + if (val instanceof utils.PropertyDescriptor) { + Object.defineProperty(res, key, val); + } else { + res[key] = val; + } + } + res._currentOffset = stream.pos - res._startOffset; + } + }; + + Struct.prototype.size = function(val, parent, includePointers) { + var ctx, key, size, type, _ref; + if (val == null) { + val = {}; + } + if (includePointers == null) { + includePointers = true; + } + ctx = { + parent: parent, + val: val, + pointerSize: 0 + }; + size = 0; + _ref = this.fields; + for (key in _ref) { + type = _ref[key]; + if (type.size != null) { + size += type.size(val[key], ctx); + } + } + if (includePointers) { + size += ctx.pointerSize; + } + return size; + }; + + Struct.prototype.encode = function(stream, val, parent) { + var ctx, i, key, ptr, type, _ref, _ref1; + if ((_ref = this.preEncode) != null) { + _ref.call(val, stream); + } + ctx = { + pointers: [], + startOffset: stream.pos, + parent: parent, + val: val, + pointerSize: 0 + }; + ctx.pointerOffset = stream.pos + this.size(val, ctx, false); + _ref1 = this.fields; + for (key in _ref1) { + type = _ref1[key]; + if (type.encode != null) { + type.encode(stream, val[key], ctx); + } + } + i = 0; + while (i < ctx.pointers.length) { + ptr = ctx.pointers[i++]; + ptr.type.encode(stream, ptr.val, ptr.parent); + } + }; + + return Struct; + + })(); + + module.exports = Struct; + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/restructure/src/VersionedStruct.coffee b/pitfall/pdfkit/node_modules/restructure/src/VersionedStruct.coffee new file mode 100644 index 00000000..fd0a7836 --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/src/VersionedStruct.coffee @@ -0,0 +1,91 @@ +Struct = require './Struct' + +class VersionedStruct extends Struct + constructor: (@type, @versions = {}) -> + if typeof @type is 'string' + @versionGetter = new Function('parent', "return parent.#{@type}") + @versionSetter = new Function('parent', 'version', "return parent.#{@type} = version") + + decode: (stream, parent, length = 0) -> + res = @_setup stream, parent, length + + if typeof @type is 'string' + res.version = @versionGetter parent + else + res.version = @type.decode(stream) + + if @versions.header + @_parseFields stream, res, @versions.header + + fields = @versions[res.version] + if not fields? + throw new Error "Unknown version #{res.version}" + + if fields instanceof VersionedStruct + return fields.decode(stream, parent) + + @_parseFields stream, res, fields + + @process?.call(res, stream) + return res + + size: (val, parent, includePointers = true) -> + unless val + throw new Error 'Not a fixed size' + + ctx = + parent: parent + val: val + pointerSize: 0 + + size = 0 + if typeof @type isnt 'string' + size += @type.size(val.version, ctx) + + if @versions.header + for key, type of @versions.header when type.size? + size += type.size(val[key], ctx) + + fields = @versions[val.version] + if not fields? + throw new Error "Unknown version #{val.version}" + + for key, type of fields when type.size? + size += type.size(val[key], ctx) + + if includePointers + size += ctx.pointerSize + + return size + + encode: (stream, val, parent) -> + @preEncode?.call(val, stream) + + ctx = + pointers: [] + startOffset: stream.pos + parent: parent + val: val + pointerSize: 0 + + ctx.pointerOffset = stream.pos + @size(val, ctx, false) + + if typeof @type isnt 'string' + @type.encode(stream, val.version) + + if @versions.header + for key, type of @versions.header when type.encode? + type.encode(stream, val[key], ctx) + + fields = @versions[val.version] + for key, type of fields when type.encode? + type.encode(stream, val[key], ctx) + + i = 0 + while i < ctx.pointers.length + ptr = ctx.pointers[i++] + ptr.type.encode(stream, ptr.val, ptr.parent) + + return + +module.exports = VersionedStruct diff --git a/pitfall/pdfkit/node_modules/restructure/src/VersionedStruct.js b/pitfall/pdfkit/node_modules/restructure/src/VersionedStruct.js new file mode 100644 index 00000000..ab0699c4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/src/VersionedStruct.js @@ -0,0 +1,136 @@ +// Generated by CoffeeScript 1.7.1 +(function() { + var Struct, VersionedStruct, + __hasProp = {}.hasOwnProperty, + __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; + + Struct = require('./Struct'); + + VersionedStruct = (function(_super) { + __extends(VersionedStruct, _super); + + function VersionedStruct(type, versions) { + this.type = type; + this.versions = versions != null ? versions : {}; + if (typeof this.type === 'string') { + this.versionGetter = new Function('parent', "return parent." + this.type); + this.versionSetter = new Function('parent', 'version', "return parent." + this.type + " = version"); + } + } + + VersionedStruct.prototype.decode = function(stream, parent, length) { + var fields, res, _ref; + if (length == null) { + length = 0; + } + res = this._setup(stream, parent, length); + if (typeof this.type === 'string') { + res.version = this.versionGetter(parent); + } else { + res.version = this.type.decode(stream); + } + if (this.versions.header) { + this._parseFields(stream, res, this.versions.header); + } + fields = this.versions[res.version]; + if (fields == null) { + throw new Error("Unknown version " + res.version); + } + if (fields instanceof VersionedStruct) { + return fields.decode(stream, parent); + } + this._parseFields(stream, res, fields); + if ((_ref = this.process) != null) { + _ref.call(res, stream); + } + return res; + }; + + VersionedStruct.prototype.size = function(val, parent, includePointers) { + var ctx, fields, key, size, type, _ref; + if (includePointers == null) { + includePointers = true; + } + if (!val) { + throw new Error('Not a fixed size'); + } + ctx = { + parent: parent, + val: val, + pointerSize: 0 + }; + size = 0; + if (typeof this.type !== 'string') { + size += this.type.size(val.version, ctx); + } + if (this.versions.header) { + _ref = this.versions.header; + for (key in _ref) { + type = _ref[key]; + if (type.size != null) { + size += type.size(val[key], ctx); + } + } + } + fields = this.versions[val.version]; + if (fields == null) { + throw new Error("Unknown version " + val.version); + } + for (key in fields) { + type = fields[key]; + if (type.size != null) { + size += type.size(val[key], ctx); + } + } + if (includePointers) { + size += ctx.pointerSize; + } + return size; + }; + + VersionedStruct.prototype.encode = function(stream, val, parent) { + var ctx, fields, i, key, ptr, type, _ref, _ref1; + if ((_ref = this.preEncode) != null) { + _ref.call(val, stream); + } + ctx = { + pointers: [], + startOffset: stream.pos, + parent: parent, + val: val, + pointerSize: 0 + }; + ctx.pointerOffset = stream.pos + this.size(val, ctx, false); + if (typeof this.type !== 'string') { + this.type.encode(stream, val.version); + } + if (this.versions.header) { + _ref1 = this.versions.header; + for (key in _ref1) { + type = _ref1[key]; + if (type.encode != null) { + type.encode(stream, val[key], ctx); + } + } + } + fields = this.versions[val.version]; + for (key in fields) { + type = fields[key]; + if (type.encode != null) { + type.encode(stream, val[key], ctx); + } + } + i = 0; + while (i < ctx.pointers.length) { + ptr = ctx.pointers[i++]; + ptr.type.encode(stream, ptr.val, ptr.parent); + } + }; + + return VersionedStruct; + + })(Struct); + + module.exports = VersionedStruct; + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/restructure/src/utils.coffee b/pitfall/pdfkit/node_modules/restructure/src/utils.coffee new file mode 100644 index 00000000..3946663f --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/src/utils.coffee @@ -0,0 +1,29 @@ +{Number:NumberT} = require './Number' + +exports.resolveLength = (length, stream, parent) -> + if typeof length is 'number' + res = length + + else if typeof length is 'function' + res = length.call(parent, parent) + + else if parent and typeof length is 'string' + res = parent[length] + + else if stream and length instanceof NumberT + res = length.decode(stream) + + if isNaN res + throw new Error 'Not a fixed size' + + return res + +class PropertyDescriptor + constructor: (opts = {}) -> + @enumerable = true + @configurable = true + + for key, val of opts + this[key] = val + +exports.PropertyDescriptor = PropertyDescriptor diff --git a/pitfall/pdfkit/node_modules/restructure/src/utils.js b/pitfall/pdfkit/node_modules/restructure/src/utils.js new file mode 100644 index 00000000..1f14e03e --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/src/utils.js @@ -0,0 +1,44 @@ +// Generated by CoffeeScript 1.7.1 +(function() { + var NumberT, PropertyDescriptor; + + NumberT = require('./Number').Number; + + exports.resolveLength = function(length, stream, parent) { + var res; + if (typeof length === 'number') { + res = length; + } else if (typeof length === 'function') { + res = length.call(parent, parent); + } else if (parent && typeof length === 'string') { + res = parent[length]; + } else if (stream && length instanceof NumberT) { + res = length.decode(stream); + } + if (isNaN(res)) { + throw new Error('Not a fixed size'); + } + return res; + }; + + PropertyDescriptor = (function() { + function PropertyDescriptor(opts) { + var key, val; + if (opts == null) { + opts = {}; + } + this.enumerable = true; + this.configurable = true; + for (key in opts) { + val = opts[key]; + this[key] = val; + } + } + + return PropertyDescriptor; + + })(); + + exports.PropertyDescriptor = PropertyDescriptor; + +}).call(this); diff --git a/pitfall/pdfkit/node_modules/restructure/test/Array.coffee b/pitfall/pdfkit/node_modules/restructure/test/Array.coffee new file mode 100644 index 00000000..e7983675 --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/test/Array.coffee @@ -0,0 +1,99 @@ +{Array:ArrayT, Pointer, uint8, uint16, DecodeStream, EncodeStream} = require '../' +should = require('chai').should() +concat = require 'concat-stream' + +describe 'Array', -> + describe 'decode', -> + it 'should decode fixed length', -> + stream = new DecodeStream new Buffer [1, 2, 3, 4, 5] + array = new ArrayT uint8, 4 + array.decode(stream).should.deep.equal [1, 2, 3, 4] + + it 'should decode fixed amount of bytes', -> + stream = new DecodeStream new Buffer [1, 2, 3, 4, 5] + array = new ArrayT uint16, 4, 'bytes' + array.decode(stream).should.deep.equal [258, 772] + + it 'should decode length from parent key', -> + stream = new DecodeStream new Buffer [1, 2, 3, 4, 5] + array = new ArrayT uint8, 'len' + array.decode(stream, len: 4).should.deep.equal [1, 2, 3, 4] + + it 'should decode amount of bytes from parent key', -> + stream = new DecodeStream new Buffer [1, 2, 3, 4, 5] + array = new ArrayT uint16, 'len', 'bytes' + array.decode(stream, len: 4).should.deep.equal [258, 772] + + it 'should decode length as number before array', -> + stream = new DecodeStream new Buffer [4, 1, 2, 3, 4, 5] + array = new ArrayT uint8, uint8 + array.decode(stream).should.deep.equal [1, 2, 3, 4] + + it 'should decode amount of bytes as number before array', -> + stream = new DecodeStream new Buffer [4, 1, 2, 3, 4, 5] + array = new ArrayT uint16, uint8, 'bytes' + array.decode(stream).should.deep.equal [258, 772] + + it 'should decode length from function', -> + stream = new DecodeStream new Buffer [1, 2, 3, 4, 5] + array = new ArrayT uint8, -> 4 + array.decode(stream).should.deep.equal [1, 2, 3, 4] + + it 'should decode amount of bytes from function', -> + stream = new DecodeStream new Buffer [1, 2, 3, 4, 5] + array = new ArrayT uint16, (-> 4), 'bytes' + array.decode(stream).should.deep.equal [258, 772] + + it 'should decode to the end of the parent if no length is given', -> + stream = new DecodeStream new Buffer [1, 2, 3, 4, 5] + array = new ArrayT uint8 + array.decode(stream, _length: 4, _startOffset: 0).should.deep.equal [1, 2, 3, 4] + + it 'should decode to the end of the stream if no parent and length is given', -> + stream = new DecodeStream new Buffer [1, 2, 3, 4] + array = new ArrayT uint8 + array.decode(stream).should.deep.equal [1, 2, 3, 4] + + describe 'size', -> + it 'should use array length', -> + array = new ArrayT uint8, 10 + array.size([1, 2, 3, 4]).should.equal 4 + + it 'should add size of length field before string', -> + array = new ArrayT uint8, uint8 + array.size([1, 2, 3, 4]).should.equal 5 + + it 'should use defined length if no value given', -> + array = new ArrayT uint8, 10 + array.size().should.equal 10 + + describe 'encode', -> + it 'should encode using array length', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [1, 2, 3, 4] + done() + + array = new ArrayT uint8, 10 + array.encode(stream, [1, 2, 3, 4]) + stream.end() + + it 'should encode length as number before array', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [4, 1, 2, 3, 4] + done() + + array = new ArrayT uint8, uint8 + array.encode(stream, [1, 2, 3, 4]) + stream.end() + + it 'should add pointers after array if length is encoded at start', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [4, 5, 6, 7, 8, 1, 2, 3, 4] + done() + + array = new ArrayT new Pointer(uint8, uint8), uint8 + array.encode(stream, [1, 2, 3, 4]) + stream.end() diff --git a/pitfall/pdfkit/node_modules/restructure/test/Bitfield.coffee b/pitfall/pdfkit/node_modules/restructure/test/Bitfield.coffee new file mode 100644 index 00000000..2ba1b4c4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/test/Bitfield.coffee @@ -0,0 +1,31 @@ +{Bitfield, uint8, DecodeStream, EncodeStream} = require '../' +should = require('chai').should() +concat = require 'concat-stream' + +describe 'Bitfield', -> + bitfield = new Bitfield uint8, ['Jack', 'Kack', 'Lack', 'Mack', 'Nack', 'Oack', 'Pack', 'Quack'] + JACK = 1 << 0 + KACK = 1 << 1 + LACK = 1 << 2 + MACK = 1 << 3 + NACK = 1 << 4 + OACK = 1 << 5 + PACK = 1 << 6 + QUACK = 1 << 7 + + it 'should have the right size', -> + bitfield.size().should.equal 1 + + it 'should decode', -> + stream = new DecodeStream new Buffer [JACK | MACK | PACK | NACK | QUACK] + bitfield.decode(stream).should.deep.equal + Jack: yes, Kack: no, Lack: no, Mack: yes, Nack: yes, Oack: no, Pack: yes, Quack: yes + + it 'should encode', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [JACK | MACK | PACK | NACK | QUACK] + done() + + bitfield.encode stream, Jack: yes, Kack: no, Lack: no, Mack: yes, Nack: yes, Oack: no, Pack: yes, Quack: yes + stream.end() diff --git a/pitfall/pdfkit/node_modules/restructure/test/Boolean.coffee b/pitfall/pdfkit/node_modules/restructure/test/Boolean.coffee new file mode 100644 index 00000000..6cda2c9e --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/test/Boolean.coffee @@ -0,0 +1,42 @@ +{Boolean, uint8, DecodeStream, EncodeStream} = require '../' +should = require('chai').should() +concat = require 'concat-stream' + +describe 'Boolean', -> + describe 'decode', -> + it 'should decode 0 as false', -> + stream = new DecodeStream new Buffer [0] + boolean = new Boolean uint8 + boolean.decode(stream).should.equal false + + it 'should decode 1 as true', -> + stream = new DecodeStream new Buffer [1] + boolean = new Boolean uint8 + boolean.decode(stream).should.equal true + + describe 'size', -> + it 'should return given type size', -> + stream = new DecodeStream new Buffer [0] + boolean = new Boolean uint8 + boolean.size().should.equal 1 + + describe 'encode', -> + it 'should encode false as 0', (done) -> + stream = new EncodeStream + boolean = new Boolean uint8 + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [0] + done() + + boolean.encode stream, false + stream.end() + + it 'should encode true as 1', (done) -> + stream = new EncodeStream + boolean = new Boolean uint8 + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [1] + done() + + boolean.encode stream, true + stream.end() diff --git a/pitfall/pdfkit/node_modules/restructure/test/Buffer.coffee b/pitfall/pdfkit/node_modules/restructure/test/Buffer.coffee new file mode 100644 index 00000000..9ee71b39 --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/test/Buffer.coffee @@ -0,0 +1,48 @@ +{Buffer:BufferT, DecodeStream, EncodeStream, uint8} = require '../' +should = require('chai').should() +concat = require 'concat-stream' + +describe 'Buffer', -> + describe 'decode', -> + it 'should decode', -> + stream = new DecodeStream new Buffer [0xab, 0xff, 0x1f, 0xb6] + buf = new BufferT(2) + buf.decode(stream).should.deep.equal new Buffer [0xab, 0xff] + buf.decode(stream).should.deep.equal new Buffer [0x1f, 0xb6] + + it 'should decode with parent key length', -> + stream = new DecodeStream new Buffer [0xab, 0xff, 0x1f, 0xb6] + buf = new BufferT('len') + buf.decode(stream, len: 3).should.deep.equal new Buffer [0xab, 0xff, 0x1f] + buf.decode(stream, len: 1).should.deep.equal new Buffer [0xb6] + + describe 'size', -> + it 'should return size', -> + buf = new BufferT(2) + buf.size(new Buffer [0xab, 0xff]).should.equal 2 + + it 'should use defined length if no value given', -> + array = new BufferT 10 + array.size().should.equal 10 + + describe 'encode', -> + it 'should encode', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [0xab, 0xff, 0x1f, 0xb6] + done() + + buf = new BufferT(2) + buf.encode stream, new Buffer [0xab, 0xff] + buf.encode stream, new Buffer [0x1f, 0xb6] + stream.end() + + it 'should encode length before buffer', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [2, 0xab, 0xff] + done() + + buf = new BufferT(uint8) + buf.encode stream, new Buffer [0xab, 0xff] + stream.end() diff --git a/pitfall/pdfkit/node_modules/restructure/test/DecodeStream.coffee b/pitfall/pdfkit/node_modules/restructure/test/DecodeStream.coffee new file mode 100644 index 00000000..61fd8222 --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/test/DecodeStream.coffee @@ -0,0 +1,83 @@ +{DecodeStream} = require '../' +should = require('chai').should() + +describe 'DecodeStream', -> + it 'should read a buffer', -> + buf = new Buffer [1,2,3] + stream = new DecodeStream buf + stream.readBuffer(buf.length).should.deep.equal new Buffer [1,2,3] + + it 'should readUInt16BE', -> + buf = new Buffer [0xab, 0xcd] + stream = new DecodeStream buf + stream.readUInt16BE().should.deep.equal 0xabcd + + it 'should readUInt16LE', -> + buf = new Buffer [0xab, 0xcd] + stream = new DecodeStream buf + stream.readUInt16LE().should.deep.equal 0xcdab + + it 'should readUInt24BE', -> + buf = new Buffer [0xab, 0xcd, 0xef] + stream = new DecodeStream buf + stream.readUInt24BE().should.deep.equal 0xabcdef + + it 'should readUInt24LE', -> + buf = new Buffer [0xab, 0xcd, 0xef] + stream = new DecodeStream buf + stream.readUInt24LE().should.deep.equal 0xefcdab + + it 'should readInt24BE', -> + buf = new Buffer [0xff, 0xab, 0x24] + stream = new DecodeStream buf + stream.readInt24BE().should.deep.equal -21724 + + it 'should readInt24LE', -> + buf = new Buffer [0x24, 0xab, 0xff] + stream = new DecodeStream buf + stream.readInt24LE().should.deep.equal -21724 + + describe 'readString', -> + it 'should decode ascii by default', -> + buf = new Buffer 'some text', 'ascii' + stream = new DecodeStream buf + stream.readString(buf.length).should.equal 'some text' + + it 'should decode ascii', -> + buf = new Buffer 'some text', 'ascii' + stream = new DecodeStream buf + stream.readString(buf.length, 'ascii').should.equal 'some text' + + it 'should decode utf8', -> + buf = new Buffer 'unicode! 👍', 'utf8' + stream = new DecodeStream buf + stream.readString(buf.length, 'utf8').should.equal 'unicode! 👍' + + it 'should decode utf16le', -> + buf = new Buffer 'unicode! 👍', 'utf16le' + stream = new DecodeStream buf + stream.readString(buf.length, 'utf16le').should.equal 'unicode! 👍' + + it 'should decode ucs2', -> + buf = new Buffer 'unicode! 👍', 'ucs2' + stream = new DecodeStream buf + stream.readString(buf.length, 'ucs2').should.equal 'unicode! 👍' + + it 'should decode utf16be', -> + buf = new Buffer 'unicode! 👍', 'utf16le' + for i in [0...buf.length - 1] by 2 + byte = buf[i] + buf[i] = buf[i + 1] + buf[i + 1] = byte + + stream = new DecodeStream buf + stream.readString(buf.length, 'utf16be').should.equal 'unicode! 👍' + + it 'should decode macroman', -> + buf = new Buffer [0x8a, 0x63, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x20, 0x63, 0x68, 0x87, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x73] + stream = new DecodeStream buf + stream.readString(buf.length, 'mac').should.equal 'äccented cháracters' + + it 'should return a buffer for unsupported encodings', -> + stream = new DecodeStream new Buffer [1, 2, 3] + stream.readString(3, 'unsupported').should.deep.equal new Buffer [1, 2, 3] diff --git a/pitfall/pdfkit/node_modules/restructure/test/EncodeStream.coffee b/pitfall/pdfkit/node_modules/restructure/test/EncodeStream.coffee new file mode 100644 index 00000000..7d15e08c --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/test/EncodeStream.coffee @@ -0,0 +1,149 @@ +{EncodeStream} = require '../' +should = require('chai').should() +concat = require 'concat-stream' + +describe 'EncodeStream', -> + it 'should write a buffer', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [1,2,3] + done() + + stream.writeBuffer new Buffer [1,2,3] + stream.end() + + it 'should writeUInt16BE', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [0xab, 0xcd] + done() + + stream.writeUInt16BE(0xabcd) + stream.end() + + it 'should writeUInt16LE', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [0xab, 0xcd] + done() + + stream.writeUInt16LE(0xcdab) + stream.end() + + it 'should writeUInt24BE', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [0xab, 0xcd, 0xef] + done() + + stream.writeUInt24BE(0xabcdef) + stream.end() + + it 'should writeUInt24LE', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [0xef, 0xcd, 0xab] + done() + + stream.writeUInt24LE(0xabcdef) + stream.end() + + it 'should writeInt24BE', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [0xff, 0xab, 0x24, 0xab, 0xcd, 0xef] + done() + + stream.writeInt24BE(-21724) + stream.writeInt24BE(0xabcdef) + stream.end() + + it 'should writeInt24LE', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [0x24, 0xab, 0xff, 0xef, 0xcd, 0xab] + done() + + stream.writeInt24LE(-21724) + stream.writeInt24LE(0xabcdef) + stream.end() + + it 'should fill', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [10, 10, 10, 10, 10] + done() + + stream.fill(10, 5) + stream.end() + + describe 'writeString', -> + it 'should encode ascii by default', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer 'some text', 'ascii' + done() + + stream.writeString('some text') + stream.end() + + it 'should encode ascii', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer 'some text', 'ascii' + done() + + stream.writeString('some text') + stream.end() + + it 'should encode utf8', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer 'unicode! 👍', 'utf8' + done() + + stream.writeString('unicode! 👍', 'utf8') + stream.end() + + it 'should encode utf16le', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer 'unicode! 👍', 'utf16le' + done() + + stream.writeString('unicode! 👍', 'utf16le') + stream.end() + + it 'should encode ucs2', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer 'unicode! 👍', 'ucs2' + done() + + stream.writeString('unicode! 👍', 'ucs2') + stream.end() + + it 'should encode utf16be', (done) -> + stream = new EncodeStream + stream.pipe concat (out) -> + buf = new Buffer 'unicode! 👍', 'utf16le' + for i in [0...buf.length - 1] by 2 + byte = buf[i] + buf[i] = buf[i + 1] + buf[i + 1] = byte + + out.should.deep.equal buf + done() + + stream.writeString('unicode! 👍', 'utf16be') + stream.end() + + it 'should encode macroman', (done) -> + stream = new EncodeStream + stream.pipe concat (out) -> + buf = new Buffer [0x8a, 0x63, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x20, 0x63, 0x68, 0x87, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x73] + out.should.deep.equal buf + done() + + stream.writeString('äccented cháracters', 'mac') + stream.end() diff --git a/pitfall/pdfkit/node_modules/restructure/test/Enum.coffee b/pitfall/pdfkit/node_modules/restructure/test/Enum.coffee new file mode 100644 index 00000000..147c2e96 --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/test/Enum.coffee @@ -0,0 +1,30 @@ +{Enum, uint8, DecodeStream, EncodeStream} = require '../' +should = require('chai').should() +concat = require 'concat-stream' + +describe 'Enum', -> + e = new Enum uint8, ['foo', 'bar', 'baz'] + it 'should have the right size', -> + e.size().should.equal 1 + + it 'should decode', -> + stream = new DecodeStream new Buffer [1, 2, 0] + e.decode(stream).should.equal 'bar' + e.decode(stream).should.equal 'baz' + e.decode(stream).should.equal 'foo' + + it 'should encode', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [1, 2, 0] + done() + + e.encode stream, 'bar' + e.encode stream, 'baz' + e.encode stream, 'foo' + stream.end() + + it 'should throw on unknown option', -> + stream = new EncodeStream + should.throw -> + e.encode stream, 'unknown' diff --git a/pitfall/pdfkit/node_modules/restructure/test/LazyArray.coffee b/pitfall/pdfkit/node_modules/restructure/test/LazyArray.coffee new file mode 100644 index 00000000..1c87acb8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/test/LazyArray.coffee @@ -0,0 +1,65 @@ +{LazyArray, Pointer, uint8, uint16, DecodeStream, EncodeStream} = require '../' +should = require('chai').should() +concat = require 'concat-stream' + +describe 'LazyArray', -> + describe 'decode', -> + it 'should decode items lazily', -> + stream = new DecodeStream new Buffer [1, 2, 3, 4, 5] + array = new LazyArray uint8, 4 + + arr = array.decode(stream) + arr.should.not.be.an.instanceof Array + arr.should.have.length 4 + stream.pos.should.equal 4 + + arr.get(0).should.equal 1 + arr.get(1).should.equal 2 + arr.get(2).should.equal 3 + arr.get(3).should.equal 4 + + should.not.exist arr.get(-1) + should.not.exist arr.get(5) + + it 'should be able to convert to an array', -> + stream = new DecodeStream new Buffer [1, 2, 3, 4, 5] + array = new LazyArray uint8, 4 + + arr = array.decode(stream) + arr.toArray().should.deep.equal [1, 2, 3, 4] + + it 'should have an inspect method', -> + stream = new DecodeStream new Buffer [1, 2, 3, 4, 5] + array = new LazyArray uint8, 4 + + arr = array.decode(stream) + arr.inspect().should.equal '[ 1, 2, 3, 4 ]' + + it 'should decode length as number before array', -> + stream = new DecodeStream new Buffer [4, 1, 2, 3, 4, 5] + array = new LazyArray uint8, uint8 + arr = array.decode(stream) + + arr.toArray().should.deep.equal [1, 2, 3, 4] + + describe 'size', -> + it 'should work with LazyArrays', -> + stream = new DecodeStream new Buffer [1, 2, 3, 4, 5] + array = new LazyArray uint8, 4 + arr = array.decode(stream) + + array.size(arr).should.equal 4 + + describe 'encode', -> + it 'should work with LazyArrays', (done) -> + stream = new DecodeStream new Buffer [1, 2, 3, 4, 5] + array = new LazyArray uint8, 4 + arr = array.decode(stream) + + enc = new EncodeStream + enc.pipe concat (buf) -> + buf.should.deep.equal new Buffer [1, 2, 3, 4] + done() + + array.encode(enc, arr) + enc.end() diff --git a/pitfall/pdfkit/node_modules/restructure/test/Number.coffee b/pitfall/pdfkit/node_modules/restructure/test/Number.coffee new file mode 100644 index 00000000..7a07d925 --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/test/Number.coffee @@ -0,0 +1,436 @@ +{ + uint8, + uint16, uint16be, uint16le, + uint24, uint24be, uint24le, + uint32, uint32be, uint32le, + int8, + int16, int16be, int16le, + int24, int24be, int24le, + int32, int32be, int32le, + float, floatbe, floatle, + double, doublebe, doublele, + fixed16, fixed16be, fixed16le, + fixed32, fixed32be, fixed32le, + DecodeStream, EncodeStream +} = require '../' +should = require('chai').should() +concat = require 'concat-stream' + +describe 'Number', -> + describe 'uint8', -> + it 'should decode', -> + stream = new DecodeStream new Buffer [0xab, 0xff] + uint8.decode(stream).should.equal 0xab + uint8.decode(stream).should.equal 0xff + + it 'should have a size', -> + uint8.size().should.equal 1 + + it 'should encode', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [0xab, 0xff] + done() + + uint8.encode(stream, 0xab) + uint8.encode(stream, 0xff) + stream.end() + + describe 'uint16', -> + it 'is an alias for uint16be', -> + uint16.should.equal uint16be + + describe 'uint16be', -> + it 'should decode', -> + stream = new DecodeStream new Buffer [0xab, 0xff] + uint16be.decode(stream).should.equal 0xabff + + it 'should have a size', -> + uint16be.size().should.equal 2 + + it 'should encode', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [0xab, 0xff] + done() + + uint16be.encode(stream, 0xabff) + stream.end() + + describe 'uint16le', -> + it 'should decode', -> + stream = new DecodeStream new Buffer [0xff, 0xab] + uint16le.decode(stream).should.equal 0xabff + + it 'should have a size', -> + uint16le.size().should.equal 2 + + it 'should encode', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [0xff, 0xab] + done() + + uint16le.encode(stream, 0xabff) + stream.end() + + describe 'uint24', -> + it 'is an alias for uint24be', -> + uint24.should.equal uint24be + + describe 'uint24be', -> + it 'should decode', -> + stream = new DecodeStream new Buffer [0xff, 0xab, 0x24] + uint24be.decode(stream).should.equal 0xffab24 + + it 'should have a size', -> + uint24be.size().should.equal 3 + + it 'should encode', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [0xff, 0xab, 0x24] + done() + + uint24be.encode(stream, 0xffab24) + stream.end() + + describe 'uint24le', -> + it 'should decode', -> + stream = new DecodeStream new Buffer [0x24, 0xab, 0xff] + uint24le.decode(stream).should.equal 0xffab24 + + it 'should have a size', -> + uint24le.size().should.equal 3 + + it 'should encode', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [0x24, 0xab, 0xff] + done() + + uint24le.encode(stream, 0xffab24) + stream.end() + + describe 'uint32', -> + it 'is an alias for uint32be', -> + uint32.should.equal uint32be + + describe 'uint32be', -> + it 'should decode', -> + stream = new DecodeStream new Buffer [0xff, 0xab, 0x24, 0xbf] + uint32be.decode(stream).should.equal 0xffab24bf + + it 'should have a size', -> + uint32be.size().should.equal 4 + + it 'should encode', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [0xff, 0xab, 0x24, 0xbf] + done() + + uint32be.encode(stream, 0xffab24bf) + stream.end() + + describe 'uint32le', -> + it 'should decode', -> + stream = new DecodeStream new Buffer [0xbf, 0x24, 0xab, 0xff] + uint32le.decode(stream).should.equal 0xffab24bf + + it 'should have a size', -> + uint32le.size().should.equal 4 + + it 'should encode', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [0xbf, 0x24, 0xab, 0xff] + done() + + uint32le.encode(stream, 0xffab24bf) + stream.end() + + describe 'int8', -> + it 'should decode', -> + stream = new DecodeStream new Buffer [0x7f, 0xff] + int8.decode(stream).should.equal 127 + int8.decode(stream).should.equal -1 + + it 'should have a size', -> + int8.size().should.equal 1 + + it 'should encode', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [0x7f, 0xff] + done() + + int8.encode(stream, 127) + int8.encode(stream, -1) + stream.end() + + describe 'int16', -> + it 'is an alias for int16be', -> + int16.should.equal int16be + + describe 'int16be', -> + it 'should decode', -> + stream = new DecodeStream new Buffer [0xff, 0xab] + int16be.decode(stream).should.equal -85 + + it 'should have a size', -> + int16be.size().should.equal 2 + + it 'should encode', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [0xff, 0xab] + done() + + int16be.encode(stream, -85) + stream.end() + + describe 'int16le', -> + it 'should decode', -> + stream = new DecodeStream new Buffer [0xab, 0xff] + int16le.decode(stream).should.equal -85 + + it 'should have a size', -> + int16le.size().should.equal 2 + + it 'should encode', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [0xab, 0xff] + done() + + int16le.encode(stream, -85) + stream.end() + + describe 'int24', -> + it 'is an alias for int24be', -> + int24.should.equal int24be + + describe 'int24be', -> + it 'should decode', -> + stream = new DecodeStream new Buffer [0xff, 0xab, 0x24] + int24be.decode(stream).should.equal -21724 + + it 'should have a size', -> + int24be.size().should.equal 3 + + it 'should encode', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [0xff, 0xab, 0x24] + done() + + int24be.encode(stream, -21724) + stream.end() + + describe 'int24le', -> + it 'should decode', -> + stream = new DecodeStream new Buffer [0x24, 0xab, 0xff] + int24le.decode(stream).should.equal -21724 + + it 'should have a size', -> + int24le.size().should.equal 3 + + it 'should encode', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [0x24, 0xab, 0xff] + done() + + int24le.encode(stream, -21724) + stream.end() + + describe 'int32', -> + it 'is an alias for int32be', -> + int32.should.equal int32be + + describe 'int32be', -> + it 'should decode', -> + stream = new DecodeStream new Buffer [0xff, 0xab, 0x24, 0xbf] + int32be.decode(stream).should.equal -5561153 + + it 'should have a size', -> + int32be.size().should.equal 4 + + it 'should encode', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [0xff, 0xab, 0x24, 0xbf] + done() + + int32be.encode(stream, -5561153) + stream.end() + + describe 'int32le', -> + it 'should decode', -> + stream = new DecodeStream new Buffer [0xbf, 0x24, 0xab, 0xff] + int32le.decode(stream).should.equal -5561153 + + it 'should have a size', -> + int32le.size().should.equal 4 + + it 'should encode', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [0xbf, 0x24, 0xab, 0xff] + done() + + int32le.encode(stream, -5561153) + stream.end() + + describe 'float', -> + it 'is an alias for floatbe', -> + float.should.equal floatbe + + describe 'floatbe', -> + it 'should decode', -> + stream = new DecodeStream new Buffer [0x43, 0x7a, 0x8c, 0xcd] + floatbe.decode(stream).should.be.closeTo 250.55, 0.005 + + it 'should have a size', -> + floatbe.size().should.equal 4 + + it 'should encode', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [0x43, 0x7a, 0x8c, 0xcd] + done() + + floatbe.encode(stream, 250.55) + stream.end() + + describe 'floatle', -> + it 'should decode', -> + stream = new DecodeStream new Buffer [0xcd, 0x8c, 0x7a, 0x43] + floatle.decode(stream).should.be.closeTo 250.55, 0.005 + + it 'should have a size', -> + floatle.size().should.equal 4 + + it 'should encode', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [0xcd, 0x8c, 0x7a, 0x43] + done() + + floatle.encode(stream, 250.55) + stream.end() + + describe 'double', -> + it 'is an alias for doublebe', -> + double.should.equal doublebe + + describe 'doublebe', -> + it 'should decode', -> + stream = new DecodeStream new Buffer [0x40, 0x93, 0x4a, 0x3d, 0x70, 0xa3, 0xd7, 0x0a] + doublebe.decode(stream).should.be.equal 1234.56 + + it 'should have a size', -> + doublebe.size().should.equal 8 + + it 'should encode', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [0x40, 0x93, 0x4a, 0x3d, 0x70, 0xa3, 0xd7, 0x0a] + done() + + doublebe.encode(stream, 1234.56) + stream.end() + + describe 'doublele', -> + it 'should decode', -> + stream = new DecodeStream new Buffer [0x0a, 0xd7, 0xa3, 0x70, 0x3d, 0x4a, 0x93, 0x40] + doublele.decode(stream).should.be.equal 1234.56 + + it 'should have a size', -> + doublele.size().should.equal 8 + + it 'should encode', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [0x0a, 0xd7, 0xa3, 0x70, 0x3d, 0x4a, 0x93, 0x40] + done() + + doublele.encode(stream, 1234.56) + stream.end() + + describe 'fixed16', -> + it 'is an alias for fixed16be', -> + fixed16.should.equal fixed16be + + describe 'fixed16be', -> + it 'should decode', -> + stream = new DecodeStream new Buffer [0x19, 0x57] + fixed16be.decode(stream).should.be.closeTo 25.34, 0.005 + + it 'should have a size', -> + fixed16be.size().should.equal 2 + + it 'should encode', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [0x19, 0x57] + done() + + fixed16be.encode(stream, 25.34) + stream.end() + + describe 'fixed16le', -> + it 'should decode', -> + stream = new DecodeStream new Buffer [0x57, 0x19] + fixed16le.decode(stream).should.be.closeTo 25.34, 0.005 + + it 'should have a size', -> + fixed16le.size().should.equal 2 + + it 'should encode', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [0x57, 0x19] + done() + + fixed16le.encode(stream, 25.34) + stream.end() + + describe 'fixed32', -> + it 'is an alias for fixed32be', -> + fixed32.should.equal fixed32be + + describe 'fixed32be', -> + it 'should decode', -> + stream = new DecodeStream new Buffer [0x00, 0xfa, 0x8c, 0xcc] + fixed32be.decode(stream).should.be.closeTo 250.55, 0.005 + + it 'should have a size', -> + fixed32be.size().should.equal 4 + + it 'should encode', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [0x00, 0xfa, 0x8c, 0xcc] + done() + + fixed32be.encode(stream, 250.55) + stream.end() + + describe 'fixed32le', -> + it 'should decode', -> + stream = new DecodeStream new Buffer [0xcc, 0x8c, 0xfa, 0x00] + fixed32le.decode(stream).should.be.closeTo 250.55, 0.005 + + it 'should have a size', -> + fixed32le.size().should.equal 4 + + it 'should encode', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [0xcc, 0x8c, 0xfa, 0x00] + done() + + fixed32le.encode(stream, 250.55) + stream.end() diff --git a/pitfall/pdfkit/node_modules/restructure/test/Optional.coffee b/pitfall/pdfkit/node_modules/restructure/test/Optional.coffee new file mode 100644 index 00000000..f71bbae5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/test/Optional.coffee @@ -0,0 +1,112 @@ +{Optional, uint8, DecodeStream, EncodeStream} = require '../' +should = require('chai').should() +concat = require 'concat-stream' + +describe 'Optional', -> + describe 'decode', -> + it 'should not decode when condition is falsy', -> + stream = new DecodeStream new Buffer [0] + optional = new Optional uint8, false + should.not.exist optional.decode(stream) + stream.pos.should.equal 0 + + it 'should not decode when condition is a function and falsy', -> + stream = new DecodeStream new Buffer [0] + optional = new Optional uint8, -> false + should.not.exist optional.decode(stream) + stream.pos.should.equal 0 + + it 'should decode when condition is omitted', -> + stream = new DecodeStream new Buffer [0] + optional = new Optional uint8 + should.exist optional.decode(stream) + stream.pos.should.equal 1 + + it 'should decode when condition is truthy', -> + stream = new DecodeStream new Buffer [0] + optional = new Optional uint8, true + should.exist optional.decode(stream) + stream.pos.should.equal 1 + + it 'should decode when condition is a function and truthy', -> + stream = new DecodeStream new Buffer [0] + optional = new Optional uint8, -> true + should.exist optional.decode(stream) + stream.pos.should.equal 1 + + describe 'size', -> + it 'should return 0 when condition is falsy', -> + stream = new DecodeStream new Buffer [0] + optional = new Optional uint8, false + optional.size().should.equal 0 + + it 'should return 0 when condition is a function and falsy', -> + stream = new DecodeStream new Buffer [0] + optional = new Optional uint8, -> false + optional.size().should.equal 0 + + it 'should return given type size when condition is omitted', -> + stream = new DecodeStream new Buffer [0] + optional = new Optional uint8 + optional.size().should.equal 1 + + it 'should return given type size when condition is truthy', -> + stream = new DecodeStream new Buffer [0] + optional = new Optional uint8, true + optional.size().should.equal 1 + + it 'should return given type size when condition is a function and truthy', -> + stream = new DecodeStream new Buffer [0] + optional = new Optional uint8, -> true + optional.size().should.equal 1 + + describe 'encode', -> + it 'should not encode when condition is falsy', (done) -> + stream = new EncodeStream + optional = new Optional uint8, false + stream.pipe concat (buf) -> + buf.should.deep.equal [] + done() + + optional.encode stream, 128 + stream.end() + + it 'should not encode when condition is a function and falsy', (done) -> + stream = new EncodeStream + optional = new Optional uint8, -> false + stream.pipe concat (buf) -> + buf.should.deep.equal [] + done() + + optional.encode stream, 128 + stream.end() + + it 'should encode when condition is omitted', (done) -> + stream = new EncodeStream + optional = new Optional uint8 + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [128] + done() + + optional.encode stream, 128 + stream.end() + + it 'should encode when condition is truthy', (done) -> + stream = new EncodeStream + optional = new Optional uint8, true + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [128] + done() + + optional.encode stream, 128 + stream.end() + + it 'should encode when condition is a function and truthy', (done) -> + stream = new EncodeStream + optional = new Optional uint8, -> true + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [128] + done() + + optional.encode stream, 128 + stream.end() diff --git a/pitfall/pdfkit/node_modules/restructure/test/Pointer.coffee b/pitfall/pdfkit/node_modules/restructure/test/Pointer.coffee new file mode 100644 index 00000000..087a6f7e --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/test/Pointer.coffee @@ -0,0 +1,277 @@ +{Pointer, VoidPointer, uint8, DecodeStream, EncodeStream, Struct} = require '../' +should = require('chai').should() +concat = require 'concat-stream' + +describe 'Pointer', -> + describe 'decode', -> + it 'should handle null pointers', -> + stream = new DecodeStream new Buffer [0] + pointer = new Pointer uint8, uint8 + should.not.exist pointer.decode(stream, _startOffset: 50) + + it 'should use local offsets from start of parent by default', -> + stream = new DecodeStream new Buffer [1, 53] + pointer = new Pointer uint8, uint8 + pointer.decode(stream, _startOffset: 0).should.equal 53 + + it 'should support immediate offsets', -> + stream = new DecodeStream new Buffer [1, 53] + pointer = new Pointer uint8, uint8, type: 'immediate' + pointer.decode(stream).should.equal 53 + + it 'should support offsets relative to the parent', -> + stream = new DecodeStream new Buffer [0, 0, 1, 53] + stream.pos = 2 + pointer = new Pointer uint8, uint8, type: 'parent' + pointer.decode(stream, parent: _startOffset: 2).should.equal 53 + + it 'should support global offsets', -> + stream = new DecodeStream new Buffer [1, 2, 4, 0, 0, 0, 53] + pointer = new Pointer uint8, uint8, type: 'global' + stream.pos = 2 + pointer.decode(stream, parent: parent: _startOffset: 2).should.equal 53 + + it 'should support offsets relative to a property on the parent', -> + stream = new DecodeStream new Buffer [1, 0, 0, 0, 0, 53] + pointer = new Pointer uint8, uint8, relativeTo: 'parent.ptr' + pointer.decode(stream, _startOffset: 0, parent: ptr: 4).should.equal 53 + + it 'should support returning pointer if there is no decode type', -> + stream = new DecodeStream new Buffer [4] + pointer = new Pointer uint8, 'void' + pointer.decode(stream, _startOffset: 0).should.equal 4 + + it 'should support decoding pointers lazily', -> + stream = new DecodeStream new Buffer [1, 53] + struct = new Struct + ptr: new Pointer uint8, uint8, lazy: yes + + res = struct.decode(stream) + Object.getOwnPropertyDescriptor(res, 'ptr').get.should.be.a('function') + Object.getOwnPropertyDescriptor(res, 'ptr').enumerable.should.equal(true) + res.ptr.should.equal 53 + + describe 'size', -> + it 'should add to local pointerSize', -> + pointer = new Pointer uint8, uint8 + ctx = pointerSize: 0 + pointer.size(10, ctx).should.equal 1 + ctx.pointerSize.should.equal 1 + + it 'should add to immediate pointerSize', -> + pointer = new Pointer uint8, uint8, type: 'immediate' + ctx = pointerSize: 0 + pointer.size(10, ctx).should.equal 1 + ctx.pointerSize.should.equal 1 + + it 'should add to parent pointerSize', -> + pointer = new Pointer uint8, uint8, type: 'parent' + ctx = parent: pointerSize: 0 + pointer.size(10, ctx).should.equal 1 + ctx.parent.pointerSize.should.equal 1 + + it 'should add to global pointerSize', -> + pointer = new Pointer uint8, uint8, type: 'global' + ctx = parent: parent: parent: pointerSize: 0 + pointer.size(10, ctx).should.equal 1 + ctx.parent.parent.parent.pointerSize.should.equal 1 + + it 'should handle void pointers', -> + pointer = new Pointer uint8, 'void' + ctx = pointerSize: 0 + pointer.size(new VoidPointer(uint8, 50), ctx).should.equal 1 + ctx.pointerSize.should.equal 1 + + it 'should throw if no type and not a void pointer', -> + pointer = new Pointer uint8, 'void' + ctx = pointerSize: 0 + should.throw -> + pointer.size(30, ctx).should.equal 1 + + it 'should return a fixed size without a value', -> + pointer = new Pointer uint8, uint8 + pointer.size().should.equal 1 + + describe 'encode', -> + it 'should handle null pointers', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [0] + done() + + ptr = new Pointer uint8, uint8 + ctx = + pointerSize: 0, + startOffset: 0, + pointerOffset: 0, + pointers: [] + + ptr.encode(stream, null, ctx) + ctx.pointerSize.should.equal 0 + + stream.end() + + it 'should handle local offsets', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [1] + done() + + ptr = new Pointer uint8, uint8 + ctx = + pointerSize: 0, + startOffset: 0, + pointerOffset: 1, + pointers: [] + + ptr.encode(stream, 10, ctx) + ctx.pointerOffset.should.equal 2 + ctx.pointers.should.deep.equal [ + { type: uint8, val: 10, parent: ctx } + ] + + stream.end() + + it 'should handle immediate offsets', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [0] + done() + + ptr = new Pointer uint8, uint8, type: 'immediate' + ctx = + pointerSize: 0, + startOffset: 0, + pointerOffset: 1, + pointers: [] + + ptr.encode(stream, 10, ctx) + ctx.pointerOffset.should.equal 2 + ctx.pointers.should.deep.equal [ + { type: uint8, val: 10, parent: ctx } + ] + + stream.end() + + it 'should handle immediate offsets', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [0] + done() + + ptr = new Pointer uint8, uint8, type: 'immediate' + ctx = + pointerSize: 0, + startOffset: 0, + pointerOffset: 1, + pointers: [] + + ptr.encode(stream, 10, ctx) + ctx.pointerOffset.should.equal 2 + ctx.pointers.should.deep.equal [ + { type: uint8, val: 10, parent: ctx } + ] + + stream.end() + + it 'should handle offsets relative to parent', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [2] + done() + + ptr = new Pointer uint8, uint8, type: 'parent' + ctx = + parent: + pointerSize: 0, + startOffset: 3, + pointerOffset: 5, + pointers: [] + + ptr.encode(stream, 10, ctx) + ctx.parent.pointerOffset.should.equal 6 + ctx.parent.pointers.should.deep.equal [ + { type: uint8, val: 10, parent: ctx } + ] + + stream.end() + + it 'should handle global offsets', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [5] + done() + + ptr = new Pointer uint8, uint8, type: 'global' + ctx = + parent: + parent: + parent: + pointerSize: 0, + startOffset: 3, + pointerOffset: 5, + pointers: [] + + ptr.encode(stream, 10, ctx) + ctx.parent.parent.parent.pointerOffset.should.equal 6 + ctx.parent.parent.parent.pointers.should.deep.equal [ + { type: uint8, val: 10, parent: ctx } + ] + + stream.end() + + it 'should support offsets relative to a property on the parent', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [6] + done() + + ptr = new Pointer uint8, uint8, relativeTo: 'ptr' + ctx = + pointerSize: 0, + startOffset: 0, + pointerOffset: 10, + pointers: [] + val: + ptr: 4 + + ptr.encode(stream, 10, ctx) + ctx.pointerOffset.should.equal 11 + ctx.pointers.should.deep.equal [ + { type: uint8, val: 10, parent: ctx } + ] + + stream.end() + + it 'should support void pointers', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [1] + done() + + ptr = new Pointer uint8, 'void' + ctx = + pointerSize: 0, + startOffset: 0, + pointerOffset: 1, + pointers: [] + + ptr.encode(stream, new VoidPointer(uint8, 55), ctx) + ctx.pointerOffset.should.equal 2 + ctx.pointers.should.deep.equal [ + { type: uint8, val: 55, parent: ctx } + ] + + stream.end() + + it 'should throw if not a void pointer instance', -> + stream = new EncodeStream + ptr = new Pointer uint8, 'void' + ctx = + pointerSize: 0, + startOffset: 0, + pointerOffset: 1, + pointers: [] + + should.throw -> + ptr.encode(stream, 44, ctx) diff --git a/pitfall/pdfkit/node_modules/restructure/test/Reserved.coffee b/pitfall/pdfkit/node_modules/restructure/test/Reserved.coffee new file mode 100644 index 00000000..098dc752 --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/test/Reserved.coffee @@ -0,0 +1,28 @@ +{Reserved, uint8, uint16, DecodeStream, EncodeStream} = require '../' +should = require('chai').should() +concat = require 'concat-stream' + +describe 'Reserved', -> + it 'should have a default count of 1', -> + reserved = new Reserved uint8 + reserved.size().should.equal 1 + + it 'should allow custom counts and types', -> + reserved = new Reserved uint16, 10 + reserved.size().should.equal 20 + + it 'should decode', -> + stream = new DecodeStream new Buffer [0, 0] + reserved = new Reserved uint16 + should.not.exist reserved.decode(stream) + stream.pos.should.equal 2 + + it 'should encode', (done) -> + stream = new EncodeStream + reserved = new Reserved uint16 + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer [0, 0] + done() + + reserved.encode stream + stream.end() diff --git a/pitfall/pdfkit/node_modules/restructure/test/String.coffee b/pitfall/pdfkit/node_modules/restructure/test/String.coffee new file mode 100644 index 00000000..1b73caf8 --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/test/String.coffee @@ -0,0 +1,131 @@ +{String:StringT, uint8, DecodeStream, EncodeStream} = require '../' +should = require('chai').should() +concat = require 'concat-stream' + +describe 'String', -> + describe 'decode', -> + it 'should decode fixed length', -> + stream = new DecodeStream new Buffer 'testing' + string = new StringT 7 + string.decode(stream).should.equal 'testing' + + it 'should decode length from parent key', -> + stream = new DecodeStream new Buffer 'testing' + string = new StringT 'len' + string.decode(stream, len: 7).should.equal 'testing' + + it 'should decode length as number before string', -> + stream = new DecodeStream new Buffer '\x07testing' + string = new StringT uint8 + string.decode(stream).should.equal 'testing' + + it 'should decode utf8', -> + stream = new DecodeStream new Buffer '🍻' + string = new StringT 4, 'utf8' + string.decode(stream).should.equal '🍻' + + it 'should decode encoding computed from function', -> + stream = new DecodeStream new Buffer '🍻' + string = new StringT 4, -> 'utf8' + string.decode(stream).should.equal '🍻' + + it 'should decode null-terminated string and read past terminator', -> + stream = new DecodeStream new Buffer '🍻\x00' + string = new StringT null, 'utf8' + string.decode(stream).should.equal '🍻' + stream.pos.should.equal 5 + + it 'should decode remainder of buffer when null-byte missing', -> + stream = new DecodeStream new Buffer '🍻' + string = new StringT null, 'utf8' + string.decode(stream).should.equal '🍻' + + describe 'size', -> + it 'should use string length', -> + string = new StringT 7 + string.size('testing').should.equal 7 + + it 'should use correct encoding', -> + string = new StringT 10, 'utf8' + string.size('🍻').should.equal 4 + + it 'should use encoding from function', -> + string = new StringT 10, -> 'utf8' + string.size('🍻').should.equal 4 + + it 'should add size of length field before string', -> + string = new StringT uint8, 'utf8' + string.size('🍻').should.equal 5 + + it 'should work with utf16be encoding', -> + string = new StringT 10, 'utf16be' + string.size('🍻').should.equal 4 + + it 'should take null-byte into account', -> + string = new StringT null, 'utf8' + string.size('🍻').should.equal 5 + + it 'should use defined length if no value given', -> + array = new StringT 10 + array.size().should.equal 10 + + describe 'encode', -> + it 'should encode using string length', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer 'testing' + done() + + string = new StringT 7 + string.encode(stream, 'testing') + stream.end() + + it 'should encode length as number before string', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer '\x07testing' + done() + + string = new StringT uint8 + string.encode(stream, 'testing') + stream.end() + + it 'should encode length as number before string utf8', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer '\x0ctesting 😜', 'utf8' + done() + + string = new StringT uint8, 'utf8' + string.encode(stream, 'testing 😜') + stream.end() + + it 'should encode utf8', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer '🍻' + done() + + string = new StringT 4, 'utf8' + string.encode(stream, '🍻') + stream.end() + + it 'should encode encoding computed from function', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer '🍻' + done() + + string = new StringT 4, -> 'utf8' + string.encode(stream, '🍻') + stream.end() + + it 'should encode null-terminated string', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer '🍻\x00' + done() + + string = new StringT null, 'utf8' + string.encode(stream, '🍻') + stream.end() diff --git a/pitfall/pdfkit/node_modules/restructure/test/Struct.coffee b/pitfall/pdfkit/node_modules/restructure/test/Struct.coffee new file mode 100644 index 00000000..15a8235f --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/test/Struct.coffee @@ -0,0 +1,134 @@ +{Struct, String:StringT, Pointer, uint8, DecodeStream, EncodeStream} = require '../' +should = require('chai').should() +concat = require 'concat-stream' + +describe 'Struct', -> + describe 'decode', -> + it 'should decode into an object', -> + stream = new DecodeStream new Buffer '\x05devon\x15' + struct = new Struct + name: new StringT uint8 + age: uint8 + + struct.decode(stream).should.deep.equal + name: 'devon' + age: 21 + + it 'should support process hook', -> + stream = new DecodeStream new Buffer '\x05devon\x20' + struct = new Struct + name: new StringT uint8 + age: uint8 + + struct.process = -> + @canDrink = @age >= 21 + + struct.decode(stream).should.deep.equal + name: 'devon' + age: 32 + canDrink: true + + it 'should support function keys', -> + stream = new DecodeStream new Buffer '\x05devon\x20' + struct = new Struct + name: new StringT uint8 + age: uint8 + canDrink: -> @age >= 21 + + struct.decode(stream).should.deep.equal + name: 'devon' + age: 32 + canDrink: true + + describe 'size', -> + it 'should compute the correct size', -> + struct = new Struct + name: new StringT uint8 + age: uint8 + + struct.size(name: 'devon', age: 21).should.equal 7 + + it 'should compute the correct size with pointers', -> + struct = new Struct + name: new StringT uint8 + age: uint8 + ptr: new Pointer uint8, new StringT uint8 + + size = struct.size + name: 'devon' + age: 21 + ptr: 'hello' + + size.should.equal 14 + + it 'should get the correct size when no value is given', -> + struct = new Struct + name: new StringT 4 + age: uint8 + + struct.size().should.equal 5 + + it 'should throw when getting non-fixed length size and no value is given', -> + struct = new Struct + name: new StringT uint8 + age: uint8 + + should.throw -> + struct.size() + , /not a fixed size/i + + describe 'encode', -> + it 'should encode objects to buffers', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer '\x05devon\x15' + done() + + struct = new Struct + name: new StringT uint8 + age: uint8 + + struct.encode stream, + name: 'devon' + age: 21 + + stream.end() + + it 'should support preEncode hook', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer '\x05devon\x15' + done() + + struct = new Struct + nameLength: uint8 + name: new StringT 'nameLength' + age: uint8 + + struct.preEncode = -> + @nameLength = @name.length + + struct.encode stream, + name: 'devon' + age: 21 + + stream.end() + + it 'should encode pointer data after structure', (done) -> + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer '\x05devon\x15\x08\x05hello' + done() + + struct = new Struct + name: new StringT uint8 + age: uint8 + ptr: new Pointer uint8, new StringT uint8 + + struct.encode stream, + name: 'devon' + age: 21 + ptr: 'hello' + + stream.end() + diff --git a/pitfall/pdfkit/node_modules/restructure/test/VersionedStruct.coffee b/pitfall/pdfkit/node_modules/restructure/test/VersionedStruct.coffee new file mode 100644 index 00000000..ce83805c --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/test/VersionedStruct.coffee @@ -0,0 +1,371 @@ +{VersionedStruct, String:StringT, Pointer, uint8, DecodeStream, EncodeStream} = require '../' +should = require('chai').should() +concat = require 'concat-stream' + +describe 'VersionedStruct', -> + describe 'decode', -> + it 'should get version from number type', -> + struct = new VersionedStruct uint8, + 0: + name: new StringT uint8, 'ascii' + age: uint8 + 1: + name: new StringT uint8, 'utf8' + age: uint8 + gender: uint8 + + stream = new DecodeStream new Buffer '\x00\x05devon\x15' + struct.decode(stream).should.deep.equal + version: 0 + name: 'devon' + age: 21 + + stream = new DecodeStream new Buffer '\x01\x0adevon 👍\x15\x00', 'utf8' + struct.decode(stream).should.deep.equal + version: 1 + name: 'devon 👍' + age: 21 + gender: 0 + + it 'should throw for unknown version', -> + struct = new VersionedStruct uint8, + 0: + name: new StringT uint8, 'ascii' + age: uint8 + 1: + name: new StringT uint8, 'utf8' + age: uint8 + gender: uint8 + + stream = new DecodeStream new Buffer '\x05\x05devon\x15' + should.throw -> + struct.decode(stream) + + it 'should support common header block', -> + struct = new VersionedStruct uint8, + header: + age: uint8 + alive: uint8 + 0: + name: new StringT uint8, 'ascii' + 1: + name: new StringT uint8, 'utf8' + gender: uint8 + + stream = new DecodeStream new Buffer '\x00\x15\x01\x05devon' + struct.decode(stream).should.deep.equal + version: 0 + age: 21 + alive: 1 + name: 'devon' + + stream = new DecodeStream new Buffer '\x01\x15\x01\x0adevon 👍\x00', 'utf8' + struct.decode(stream).should.deep.equal + version: 1 + age: 21 + alive: 1 + name: 'devon 👍' + gender: 0 + + it 'should support parent version key', -> + struct = new VersionedStruct 'version', + 0: + name: new StringT uint8, 'ascii' + age: uint8 + 1: + name: new StringT uint8, 'utf8' + age: uint8 + gender: uint8 + + stream = new DecodeStream new Buffer '\x05devon\x15' + struct.decode(stream, version: 0).should.deep.equal + version: 0 + name: 'devon' + age: 21 + + stream = new DecodeStream new Buffer '\x0adevon 👍\x15\x00', 'utf8' + struct.decode(stream, version: 1).should.deep.equal + version: 1 + name: 'devon 👍' + age: 21 + gender: 0 + + it 'should support sub versioned structs', -> + struct = new VersionedStruct uint8, + 0: + name: new StringT uint8, 'ascii' + age: uint8 + 1: new VersionedStruct uint8, + 0: + name: new StringT uint8 + 1: + name: new StringT uint8 + isDesert: uint8 + + stream = new DecodeStream new Buffer '\x00\x05devon\x15' + struct.decode(stream, version: 0).should.deep.equal + version: 0 + name: 'devon' + age: 21 + + stream = new DecodeStream new Buffer '\x01\x00\x05pasta' + struct.decode(stream, version: 0).should.deep.equal + version: 0 + name: 'pasta' + + stream = new DecodeStream new Buffer '\x01\x01\x09ice cream\x01' + struct.decode(stream, version: 0).should.deep.equal + version: 1 + name: 'ice cream' + isDesert: 1 + + it 'should support process hook', -> + struct = new VersionedStruct uint8, + 0: + name: new StringT uint8, 'ascii' + age: uint8 + 1: + name: new StringT uint8, 'utf8' + age: uint8 + gender: uint8 + + struct.process = -> + @processed = true + + stream = new DecodeStream new Buffer '\x00\x05devon\x15' + struct.decode(stream).should.deep.equal + version: 0 + name: 'devon' + age: 21 + processed: true + + describe 'size', -> + it 'should compute the correct size', -> + struct = new VersionedStruct uint8, + 0: + name: new StringT uint8, 'ascii' + age: uint8 + 1: + name: new StringT uint8, 'utf8' + age: uint8 + gender: uint8 + + size = struct.size + version: 0 + name: 'devon' + age: 21 + + size.should.equal 8 + + size = struct.size + version: 1 + name: 'devon 👍' + age: 21 + gender: 0 + + size.should.equal 14 + + it 'should throw for unknown version', -> + struct = new VersionedStruct uint8, + 0: + name: new StringT uint8, 'ascii' + age: uint8 + 1: + name: new StringT uint8, 'utf8' + age: uint8 + gender: uint8 + + should.throw -> + struct.size + version: 5 + name: 'devon' + age: 21 + + it 'should support common header block', -> + struct = new VersionedStruct uint8, + header: + age: uint8 + alive: uint8 + 0: + name: new StringT uint8, 'ascii' + 1: + name: new StringT uint8, 'utf8' + gender: uint8 + + size = struct.size + version: 0 + age: 21 + alive: 1 + name: 'devon' + + size.should.equal 9 + + size = struct.size + version: 1 + age: 21 + alive: 1 + name: 'devon 👍' + gender: 0 + + size.should.equal 15 + + it 'should compute the correct size with pointers', -> + struct = new VersionedStruct uint8, + 0: + name: new StringT uint8, 'ascii' + age: uint8 + 1: + name: new StringT uint8, 'utf8' + age: uint8 + ptr: new Pointer uint8, new StringT uint8 + + size = struct.size + version: 1 + name: 'devon' + age: 21 + ptr: 'hello' + + size.should.equal 15 + + it 'should throw if no value is given', -> + struct = new VersionedStruct uint8, + 0: + name: new StringT 4, 'ascii' + age: uint8 + 1: + name: new StringT 4, 'utf8' + age: uint8 + gender: uint8 + + should.throw -> + struct.size() + , /not a fixed size/i + + describe 'encode', -> + it 'should encode objects to buffers', (done) -> + struct = new VersionedStruct uint8, + 0: + name: new StringT uint8, 'ascii' + age: uint8 + 1: + name: new StringT uint8, 'utf8' + age: uint8 + gender: uint8 + + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer '\x00\x05devon\x15\x01\x0adevon 👍\x15\x00', 'utf8' + done() + + struct.encode stream, + version: 0 + name: 'devon' + age: 21 + + struct.encode stream, + version: 1 + name: 'devon 👍' + age: 21 + gender: 0 + + stream.end() + + it 'should throw for unknown version', -> + struct = new VersionedStruct uint8, + 0: + name: new StringT uint8, 'ascii' + age: uint8 + 1: + name: new StringT uint8, 'utf8' + age: uint8 + gender: uint8 + + stream = new EncodeStream + should.throw -> + struct.encode stream, + version: 5 + name: 'devon' + age: 21 + + it 'should support common header block', (done) -> + struct = new VersionedStruct uint8, + header: + age: uint8 + alive: uint8 + 0: + name: new StringT uint8, 'ascii' + 1: + name: new StringT uint8, 'utf8' + gender: uint8 + + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer '\x00\x15\x01\x05devon\x01\x15\x01\x0adevon 👍\x00', 'utf8' + done() + + struct.encode stream, + version: 0 + age: 21 + alive: 1 + name: 'devon' + + struct.encode stream, + version: 1 + age: 21 + alive: 1 + name: 'devon 👍' + gender: 0 + + stream.end() + + it 'should encode pointer data after structure', (done) -> + struct = new VersionedStruct uint8, + 0: + name: new StringT uint8, 'ascii' + age: uint8 + 1: + name: new StringT uint8, 'utf8' + age: uint8 + ptr: new Pointer uint8, new StringT uint8 + + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer '\x01\x05devon\x15\x09\x05hello', 'utf8' + done() + + struct.encode stream, + version: 1 + name: 'devon' + age: 21 + ptr: 'hello' + + stream.end() + + it 'should support preEncode hook', (done) -> + struct = new VersionedStruct uint8, + 0: + name: new StringT uint8, 'ascii' + age: uint8 + 1: + name: new StringT uint8, 'utf8' + age: uint8 + gender: uint8 + + struct.preEncode = -> + @version = if @gender? then 1 else 0 + + stream = new EncodeStream + stream.pipe concat (buf) -> + buf.should.deep.equal new Buffer '\x00\x05devon\x15\x01\x0adevon 👍\x15\x00', 'utf8' + done() + + struct.encode stream, + name: 'devon' + age: 21 + + struct.encode stream, + name: 'devon 👍' + age: 21 + gender: 0 + + stream.end() diff --git a/pitfall/pdfkit/node_modules/restructure/test/mocha.opts b/pitfall/pdfkit/node_modules/restructure/test/mocha.opts new file mode 100644 index 00000000..41dc31c0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/restructure/test/mocha.opts @@ -0,0 +1,2 @@ +--reporter spec +--compilers coffee:coffee-script/register \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/rfile/.npmignore b/pitfall/pdfkit/node_modules/rfile/.npmignore new file mode 100644 index 00000000..69f75d26 --- /dev/null +++ b/pitfall/pdfkit/node_modules/rfile/.npmignore @@ -0,0 +1,16 @@ +lib-cov +*.seed +*.log +*.csv +*.dat +*.out +*.pid +*.gz + +pids +logs +results + +npm-debug.log + +node_modules diff --git a/pitfall/pdfkit/node_modules/rfile/.travis.yml b/pitfall/pdfkit/node_modules/rfile/.travis.yml new file mode 100644 index 00000000..2ca4a1de --- /dev/null +++ b/pitfall/pdfkit/node_modules/rfile/.travis.yml @@ -0,0 +1,3 @@ +language: node_js +node_js: + - 0.8 \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/rfile/README.md b/pitfall/pdfkit/node_modules/rfile/README.md new file mode 100644 index 00000000..07dabb41 --- /dev/null +++ b/pitfall/pdfkit/node_modules/rfile/README.md @@ -0,0 +1,81 @@ +# rfile + +[![Build Status](https://secure.travis-ci.org/ForbesLindesay/rfile.png)](http://travis-ci.org/ForbesLindesay/rfile) +[![Dependency Status](https://gemnasium.com/ForbesLindesay/rfile.png)](https://gemnasium.com/ForbesLindesay/rfile) + +require a plain text or binary file in node.js + +## Installation + + $ npm install rfile + +## Usage + +```javascript +var rfile = require('rfile'); + +var text = rfile('./my-text-file.txt'); +var mochaReadme = rfile('mocha/readme.md'); +var mochaSource = rfile('mocha'); +var image = rfile('image.png', {binary: true}); +``` + +## API + +### rfile(pkg, options) + + Uses `rfile.resolve` (see below) to look up your file `pkg`. This means it supports all the same options as `rfile.resolve`. Having found the file, it does the following: + +```javascript +return options.binary ? read(path) : fixup(read(path).toString()); +``` + + `options.binary` defaults to `false` and `fixup` removes the UTF-8 BOM if present and removes any `\r` characters (added to newlines on windows only). + +### rfile.resolve(pkg, options) + + Internally, [resolve](https://npmjs.org/package/resolve) is used to lookup your package, so it supports all the same options as that. In addition t defaults `basedir` to the directory of the function which called `rfile` or `rfile.resolve`. + + The additional option `exclude` is useful if you wanted to create a wrapper arround this. It specifies the filenames not to consider for `basedir` paths. For example, you could create a module called `ruglify` for requiring and minifying JavaScript in one go. + + ruglify.js +```javascript +var rfile = require('rfile'); +var uglify require('uglify-js').minify; + +module.exports = ruglify; +function ruglify(path, options) { + return minify(rfile.resolve(path, {exclude: [__filename]}), options).code; +} +``` + +#### From `resolve` + + - opts.basedir - directory to begin resolving from (defaults to `__dirname` of the calling module for `rfile`) + - opts.extensions - array of file extensions to search in order (defaults to `['.js', '.json']` for `rfile`) + - opts.readFile - how to read files asynchronously + - opts.isFile - function to asynchronously test whether a file exists + - opts.packageFilter - transform the parsed package.json contents before looking at the "main" field (useful for browserify etc.) + - opts.paths - require.paths array to use if nothing is found on the normal node_modules recursive walk (probably don't use this) + +## Notes + +One of the interesting features of this is that it respects the `main` field of package.json files. Say you had a module called `foo`, you could have a package.json like: + +```json +{ + "name": "foo", + "version": "1.0.0", + "main": "./foo" +} +``` + +You might then have a `foo.js` file, containing the JavaScript code of the module, and a `foo.css` file containing the stylesheet for the module when used in the browser. Using `rfile` you could load the css by simply calling: + +```javascript +rfile('foo', {extensions: ['.css']}); +``` + +## License + + MIT \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/rfile/index.js b/pitfall/pdfkit/node_modules/rfile/index.js new file mode 100644 index 00000000..323eea9c --- /dev/null +++ b/pitfall/pdfkit/node_modules/rfile/index.js @@ -0,0 +1,39 @@ +var callsite = require('callsite'); +var resolve = require('resolve'); +var dirname = require('path').dirname; +var read = require('fs').readFileSync; + +exports = module.exports = req; +exports.resolve = res; + +function req(pkg, options) { + options = options || {}; + var path = res(pkg, options); + return options.binary ? read(path) : fixup(read(path)); +} + +function res(pkg, options) { + options = options || {}; + options.basedir = options.basedir || directory(options.exclude); + options.extensions = options.extensions || ['.js', '.json']; + return resolve.sync(pkg, options); +} + +function directory(exclude) { + var stack = callsite(); + for (var i = 0; i < stack.length; i++) { + var filename = stack[i].getFileName(); + if (filename !== __filename && (!exclude || (exclude.indexOf(filename) === -1))) + return dirname(filename); + } + throw new Error('Could not resolve directory'); +} + +function fixup(str) { + return stripBOM(str.toString()).replace(/\r/g, ''); +} +function stripBOM(str){ + return 0xFEFF == str.charCodeAt(0) + ? str.substring(1) + : str; +} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/.travis.yml b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/.travis.yml new file mode 100644 index 00000000..895dbd36 --- /dev/null +++ b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - 0.6 + - 0.8 diff --git a/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/LICENSE b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/LICENSE new file mode 100644 index 00000000..ee27ba4b --- /dev/null +++ b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/LICENSE @@ -0,0 +1,18 @@ +This software is released under the MIT license: + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND 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. diff --git a/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/example/async.js b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/example/async.js new file mode 100644 index 00000000..6624ff72 --- /dev/null +++ b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/example/async.js @@ -0,0 +1,5 @@ +var resolve = require('../'); +resolve('tap', { basedir: __dirname }, function (err, res) { + if (err) console.error(err) + else console.log(res) +}); diff --git a/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/example/sync.js b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/example/sync.js new file mode 100644 index 00000000..54b2cc10 --- /dev/null +++ b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/example/sync.js @@ -0,0 +1,3 @@ +var resolve = require('../'); +var res = resolve.sync('tap', { basedir: __dirname }); +console.log(res); diff --git a/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/index.js b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/index.js new file mode 100644 index 00000000..51f194b4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/index.js @@ -0,0 +1,5 @@ +var core = require('./lib/core'); +exports = module.exports = require('./lib/async'); +exports.core = core; +exports.isCore = function (x) { return core[x] }; +exports.sync = require('./lib/sync'); diff --git a/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/lib/async.js b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/lib/async.js new file mode 100644 index 00000000..7c5a01ab --- /dev/null +++ b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/lib/async.js @@ -0,0 +1,131 @@ +var core = require('./core'); +var fs = require('fs'); +var path = require('path'); + +module.exports = function resolve (x, opts, cb) { + if (core[x]) return cb(null, x); + + if (typeof opts === 'function') { + cb = opts; + opts = {}; + } + if (!opts) opts = {}; + + var isFile = opts.isFile || function (file, cb) { + fs.stat(file, function (err, stat) { + if (err && err.code === 'ENOENT') cb(null, false) + else if (err) cb(err) + else cb(null, stat.isFile() || stat.isFIFO()) + }); + }; + var readFile = opts.readFile || fs.readFile; + + var extensions = opts.extensions || [ '.js' ]; + var y = opts.basedir + || path.dirname(require.cache[__filename].parent.filename) + ; + + opts.paths = opts.paths || []; + + if (x.match(/^(?:\.\.?\/|\/|([A-Za-z]:)?\\)/)) { + loadAsFile(path.resolve(y, x), function (err, m) { + if (err) cb(err) + else if (m) cb(null, m) + else loadAsDirectory(path.resolve(y, x), function (err, d) { + if (err) cb(err) + else if (d) cb(null, d) + else cb(new Error("Cannot find module '" + x + "'")) + }) + }); + } + else loadNodeModules(x, y, function (err, n) { + if (err) cb(err) + else if (n) cb(null, n) + else cb(new Error("Cannot find module '" + x + "'")) + }); + + function loadAsFile (x, cb) { + (function load (exts) { + if (exts.length === 0) return cb(null, undefined); + var file = x + exts[0]; + + isFile(file, function (err, ex) { + if (err) cb(err) + else if (ex) cb(null, file) + else load(exts.slice(1)) + }); + })([''].concat(extensions)); + } + + function loadAsDirectory (x, cb) { + var pkgfile = path.join(x, '/package.json'); + isFile(pkgfile, function (err, ex) { + if (err) return cb(err); + if (!ex) return loadAsFile(path.join(x, '/index'), cb); + + readFile(pkgfile, function (err, body) { + if (err) return cb(err); + try { + var pkg = JSON.parse(body); + } + catch (err) {} + + if (opts.packageFilter) { + pkg = opts.packageFilter(pkg, x); + } + + if (pkg.main) { + loadAsFile(path.resolve(x, pkg.main), function (err, m) { + if (err) return cb(err); + if (m) return cb(null, m); + var dir = path.resolve(x, pkg.main); + loadAsDirectory(dir, function (err, n) { + if (err) return cb(err); + if (n) return cb(null, n); + loadAsFile(path.join(x, '/index'), cb); + }); + }); + return; + } + + loadAsFile(path.join(x, '/index'), cb); + }); + }); + } + + function loadNodeModules (x, start, cb) { + (function process (dirs) { + if (dirs.length === 0) return cb(null, undefined); + var dir = dirs[0]; + + loadAsFile(path.join(dir, '/', x), function (err, m) { + if (err) return cb(err); + if (m) return cb(null, m); + loadAsDirectory(path.join(dir, '/', x), function (err, n) { + if (err) return cb(err); + if (n) return cb(null, n); + process(dirs.slice(1)); + }); + }); + })(nodeModulesPaths(start)); + } + + function nodeModulesPaths (start, cb) { + var splitRe = process.platform === 'win32' ? /[\/\\]/ : /\/+/; + var parts = start.split(splitRe); + + var dirs = []; + for (var i = parts.length - 1; i >= 0; i--) { + if (parts[i] === 'node_modules') continue; + var dir = path.join( + path.join.apply(path, parts.slice(0, i + 1)), + 'node_modules' + ); + if (!parts[0].match(/([A-Za-z]:)/)) { + dir = '/' + dir; + } + dirs.push(dir); + } + return dirs.concat(opts.paths); + } +}; diff --git a/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/lib/core.js b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/lib/core.js new file mode 100644 index 00000000..ea4a6c87 --- /dev/null +++ b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/lib/core.js @@ -0,0 +1,4 @@ +module.exports = require('./core.json').reduce(function (acc, x) { + acc[x] = true; + return acc; +}, {}); diff --git a/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/lib/core.json b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/lib/core.json new file mode 100644 index 00000000..28560f7e --- /dev/null +++ b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/lib/core.json @@ -0,0 +1,38 @@ +[ + "assert", + "buffer_ieee754", + "buffer", + "child_process", + "cluster", + "console", + "constants", + "crypto", + "_debugger", + "dgram", + "dns", + "domain", + "events", + "freelist", + "fs", + "http", + "https", + "_linklist", + "module", + "net", + "os", + "path", + "punycode", + "querystring", + "readline", + "repl", + "stream", + "string_decoder", + "sys", + "timers", + "tls", + "tty", + "url", + "util", + "vm", + "zlib" +] diff --git a/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/lib/sync.js b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/lib/sync.js new file mode 100644 index 00000000..6b8576bd --- /dev/null +++ b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/lib/sync.js @@ -0,0 +1,99 @@ +var core = require('./core'); +var fs = require('fs'); +var path = require('path'); + +module.exports = function (x, opts) { + if (core[x]) return x; + + if (!opts) opts = {}; + var isFile = opts.isFile || function (file) { + try { var stat = fs.statSync(file) } + catch (err) { if (err && err.code === 'ENOENT') return false } + return stat.isFile() || stat.isFIFO(); + }; + var readFileSync = opts.readFileSync || fs.readFileSync; + + var extensions = opts.extensions || [ '.js' ]; + var y = opts.basedir + || path.dirname(require.cache[__filename].parent.filename) + ; + + opts.paths = opts.paths || []; + + if (x.match(/^(?:\.\.?\/|\/|([A-Za-z]:)?\\)/)) { + var m = loadAsFileSync(path.resolve(y, x)) + || loadAsDirectorySync(path.resolve(y, x)); + if (m) return m; + } else { + var n = loadNodeModulesSync(x, y); + if (n) return n; + } + + throw new Error("Cannot find module '" + x + "'"); + + function loadAsFileSync (x) { + if (isFile(x)) { + return x; + } + + for (var i = 0; i < extensions.length; i++) { + var file = x + extensions[i]; + if (isFile(file)) { + return file; + } + } + } + + function loadAsDirectorySync (x) { + var pkgfile = path.join(x, '/package.json'); + if (isFile(pkgfile)) { + var body = readFileSync(pkgfile, 'utf8'); + try { + var pkg = JSON.parse(body); + if (opts.packageFilter) { + pkg = opts.packageFilter(pkg, x); + } + + if (pkg.main) { + var m = loadAsFileSync(path.resolve(x, pkg.main)); + if (m) return m; + var n = loadAsDirectorySync(path.resolve(x, pkg.main)); + if (n) return n; + } + } + catch (err) {} + } + + return loadAsFileSync(path.join( x, '/index')); + } + + function loadNodeModulesSync (x, start) { + var dirs = nodeModulesPathsSync(start); + for (var i = 0; i < dirs.length; i++) { + var dir = dirs[i]; + var m = loadAsFileSync(path.join( dir, '/', x)); + if (m) return m; + var n = loadAsDirectorySync(path.join( dir, '/', x )); + if (n) return n; + } + } + + function nodeModulesPathsSync (start) { + var splitRe = process.platform === 'win32' ? /[\/\\]/ : /\/+/; + var parts = start.split(splitRe); + + var dirs = []; + for (var i = parts.length - 1; i >= 0; i--) { + if (parts[i] === 'node_modules') continue; + var dir = path.join( + path.join.apply(path, parts.slice(0, i + 1)), + 'node_modules' + ); + if (!parts[0].match(/([A-Za-z]:)/)) { + dir = '/' + dir; + } + dirs.push(dir); + } + return dirs.concat(opts.paths); + } +}; diff --git a/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/package.json b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/package.json new file mode 100644 index 00000000..34aa484d --- /dev/null +++ b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/package.json @@ -0,0 +1,87 @@ +{ + "_args": [ + [ + { + "raw": "resolve@~0.3.0", + "scope": null, + "escapedName": "resolve", + "name": "resolve", + "rawSpec": "~0.3.0", + "spec": ">=0.3.0 <0.4.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/rfile" + ] + ], + "_from": "resolve@>=0.3.0 <0.4.0", + "_id": "resolve@0.3.1", + "_inCache": true, + "_location": "/rfile/resolve", + "_npmUser": { + "name": "substack", + "email": "mail@substack.net" + }, + "_npmVersion": "1.2.2", + "_phantomChildren": {}, + "_requested": { + "raw": "resolve@~0.3.0", + "scope": null, + "escapedName": "resolve", + "name": "resolve", + "rawSpec": "~0.3.0", + "spec": ">=0.3.0 <0.4.0", + "type": "range" + }, + "_requiredBy": [ + "/rfile" + ], + "_resolved": "https://registry.npmjs.org/resolve/-/resolve-0.3.1.tgz", + "_shasum": "34c63447c664c70598d1c9b126fc43b2a24310a4", + "_shrinkwrap": null, + "_spec": "resolve@~0.3.0", + "_where": "/Users/MB/git/pdfkit/node_modules/rfile", + "author": { + "name": "James Halliday", + "email": "mail@substack.net", + "url": "http://substack.net" + }, + "bugs": { + "url": "https://github.com/substack/node-resolve/issues" + }, + "dependencies": {}, + "description": "resolve like require.resolve() on behalf of files asynchronously and synchronously", + "devDependencies": { + "tap": "~0.4.0" + }, + "directories": {}, + "dist": { + "shasum": "34c63447c664c70598d1c9b126fc43b2a24310a4", + "tarball": "https://registry.npmjs.org/resolve/-/resolve-0.3.1.tgz" + }, + "homepage": "https://github.com/substack/node-resolve#readme", + "keywords": [ + "resolve", + "require", + "node", + "module" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "substack", + "email": "mail@substack.net" + } + ], + "name": "resolve", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git://github.com/substack/node-resolve.git" + }, + "scripts": { + "test": "tap test/*.js" + }, + "version": "0.3.1" +} diff --git a/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/readme.markdown b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/readme.markdown new file mode 100644 index 00000000..8da922c7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/readme.markdown @@ -0,0 +1,134 @@ +# resolve + +implements the [node `require.resolve()` +algorithm](http://nodejs.org/docs/v0.4.8/api/all.html#all_Together...) +such that you can `require.resolve()` on behalf of a file asynchronously and +synchronously + +[![build status](https://secure.travis-ci.org/substack/node-resolve.png)](http://travis-ci.org/substack/node-resolve) + +# example + +asynchronously resolve: + +``` js +var resolve = require('resolve'); +resolve('tap', { basedir: __dirname }, function (err, res) { + if (err) console.error(err) + else console.log(res) +}); +``` + +``` +$ node example/async.js +/home/substack/projects/node-resolve/node_modules/tap/lib/main.js +``` + +synchronously resolve: + +``` js +var resolve = require('resolve'); +var res = resolve.sync('tap', { basedir: __dirname }); +console.log(res); +``` + +``` +$ node example/sync.js +/home/substack/projects/node-resolve/node_modules/tap/lib/main.js +``` + +# methods + +``` js +var resolve = require('resolve') +``` + +## resolve(pkg, opts={}, cb) + +Asynchronously resolve the module path string `pkg` into `cb(err, res)`. + +options are: + +* opts.basedir - directory to begin resolving from + +* opts.extensions - array of file extensions to search in order + +* opts.readFile - how to read files asynchronously + +* opts.isFile - function to asynchronously test whether a file exists + +* opts.packageFilter - transform the parsed package.json contents before looking +at the "main" field + +* opts.paths - require.paths array to use if nothing is found on the normal +node_modules recursive walk (probably don't use this) + +default `opts` values: + +``` javascript +{ + paths: [], + basedir: __dirname, + extensions: [ '.js' ], + readFile: fs.readFile, + isFile: function (file, cb) { + fs.stat(file, function (err, stat) { + if (err && err.code === 'ENOENT') cb(null, false) + else if (err) cb(err) + else cb(null, stat.isFile()) + }); + } +} +``` + +## resolve.sync(pkg, opts) + +Synchronously resolve the module path string `pkg`, returning the result and +throwing an error when `pkg` can't be resolved. + +options are: + +* opts.basedir - directory to begin resolving from + +* opts.extensions - array of file extensions to search in order + +* opts.readFile - how to read files synchronously + +* opts.isFile - function to synchronously test whether a file exists + +* opts.packageFilter - transform the parsed package.json contents before looking +at the "main" field + +* opts.paths - require.paths array to use if nothing is found on the normal +node_modules recursive walk (probably don't use this) + +default `opts` values: + +``` javascript +{ + paths: [], + basedir: __dirname, + extensions: [ '.js' ], + readFileSync: fs.readFileSync, + isFile: function (file) { + try { return fs.statSync(file).isFile() } + catch (e) { return false } + } +} +```` + +## resolve.isCore(pkg) + +Return whether a package is in core. + +# install + +With [npm](https://npmjs.org) do: + +``` +npm install resolve +``` + +# license + +MIT diff --git a/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/core.js b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/core.js new file mode 100644 index 00000000..88a510cd --- /dev/null +++ b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/core.js @@ -0,0 +1,12 @@ +var test = require('tap').test; +var resolve = require('../'); + +test('core modules', function (t) { + t.ok(resolve.isCore('fs')); + t.ok(resolve.isCore('net')); + t.ok(resolve.isCore('http')); + + t.ok(!resolve.isCore('seq')); + t.ok(!resolve.isCore('../')); + t.end(); +}); diff --git a/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/filter.js b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/filter.js new file mode 100644 index 00000000..eb646427 --- /dev/null +++ b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/filter.js @@ -0,0 +1,17 @@ +var test = require('tap').test; +var resolve = require('../'); + +test('filter', function (t) { + t.plan(1); + var dir = __dirname + '/resolver'; + resolve('./baz', { + basedir : dir, + packageFilter : function (pkg) { + pkg.main = 'doom'; + return pkg; + } + }, function (err, res) { + if (err) t.fail(err); + t.equal(res, dir + '/baz/doom.js'); + }); +}); diff --git a/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/filter_sync.js b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/filter_sync.js new file mode 100644 index 00000000..8856c01a --- /dev/null +++ b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/filter_sync.js @@ -0,0 +1,15 @@ +var test = require('tap').test; +var resolve = require('../'); + +test('filter', function (t) { + var dir = __dirname + '/resolver'; + var res = resolve.sync('./baz', { + basedir : dir, + packageFilter : function (pkg) { + pkg.main = 'doom' + return pkg; + } + }); + t.equal(res, dir + '/baz/doom.js'); + t.end(); +}); diff --git a/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/mock.js b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/mock.js new file mode 100644 index 00000000..76bdd757 --- /dev/null +++ b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/mock.js @@ -0,0 +1,68 @@ +var test = require('tap').test; +var resolve = require('../'); + +test('mock', function (t) { + t.plan(4); + + var files = { + '/foo/bar/baz.js' : 'beep' + }; + + function opts (basedir) { + return { + basedir : basedir, + isFile : function (file, cb) { + cb(null, files.hasOwnProperty(file)); + }, + readFile : function (file, cb) { + cb(null, files[file]); + } + } + } + + resolve('./baz', opts('/foo/bar'), function (err, res) { + if (err) t.fail(err); + t.equal(res, '/foo/bar/baz.js'); + }); + + resolve('./baz.js', opts('/foo/bar'), function (err, res) { + if (err) t.fail(err); + t.equal(res, '/foo/bar/baz.js'); + }); + + resolve('baz', opts('/foo/bar'), function (err, res) { + t.equal(err.message, "Cannot find module 'baz'"); + }); + + resolve('../baz', opts('/foo/bar'), function (err, res) { + t.equal(err.message, "Cannot find module '../baz'"); + }); +}); + +test('mock package', function (t) { + t.plan(1); + + var files = { + '/foo/node_modules/bar/baz.js' : 'beep', + '/foo/node_modules/bar/package.json' : JSON.stringify({ + main : './baz.js' + }) + }; + + function opts (basedir) { + return { + basedir : basedir, + isFile : function (file, cb) { + cb(null, files.hasOwnProperty(file)); + }, + readFile : function (file, cb) { + cb(null, files[file]); + } + } + } + + resolve('bar', opts('/foo'), function (err, res) { + if (err) t.fail(err); + t.equal(res, '/foo/node_modules/bar/baz.js'); + }); +}); diff --git a/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/mock_sync.js b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/mock_sync.js new file mode 100644 index 00000000..963afa53 --- /dev/null +++ b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/mock_sync.js @@ -0,0 +1,68 @@ +var test = require('tap').test; +var resolve = require('../'); + +test('mock', function (t) { + t.plan(4); + + var files = { + '/foo/bar/baz.js' : 'beep' + }; + + function opts (basedir) { + return { + basedir : basedir, + isFile : function (file) { + return files.hasOwnProperty(file) + }, + readFileSync : function (file) { + return files[file] + } + } + } + + t.equal( + resolve.sync('./baz', opts('/foo/bar')), + '/foo/bar/baz.js' + ); + + t.equal( + resolve.sync('./baz.js', opts('/foo/bar')), + '/foo/bar/baz.js' + ); + + t.throws(function () { + resolve.sync('baz', opts('/foo/bar')); + }); + + t.throws(function () { + resolve.sync('../baz', opts('/foo/bar')); + }); +}); + +test('mock package', function (t) { + t.plan(1); + + var files = { + '/foo/node_modules/bar/baz.js' : 'beep', + '/foo/node_modules/bar/package.json' : JSON.stringify({ + main : './baz.js' + }) + }; + + function opts (basedir) { + return { + basedir : basedir, + isFile : function (file) { + return files.hasOwnProperty(file) + }, + readFileSync : function (file) { + return files[file] + } + } + } + + t.equal( + resolve.sync('bar', opts('/foo')), + '/foo/node_modules/bar/baz.js' + ); +}); diff --git a/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver.js b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver.js new file mode 100644 index 00000000..3fb64f58 --- /dev/null +++ b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver.js @@ -0,0 +1,144 @@ +var test = require('tap').test; +var resolve = require('../'); + +test('async foo', function (t) { + t.plan(3); + var dir = __dirname + '/resolver'; + + resolve('./foo', { basedir : dir }, function (err, res) { + if (err) t.fail(err); + t.equal(res, dir + '/foo.js'); + }); + + resolve('./foo.js', { basedir : dir }, function (err, res) { + if (err) t.fail(err); + t.equal(res, dir + '/foo.js'); + }); + + resolve('foo', { basedir : dir }, function (err) { + t.equal(err.message, "Cannot find module 'foo'"); + }); +}); + +test('bar', function (t) { + t.plan(2); + var dir = __dirname + '/resolver'; + + resolve('foo', { basedir : dir + '/bar' }, function (err, res) { + if (err) t.fail(err); + t.equal(res, dir + '/bar/node_modules/foo/index.js'); + }); + + resolve('foo', { basedir : dir + '/bar' }, function (err, res) { + if (err) t.fail(err); + t.equal(res, dir + '/bar/node_modules/foo/index.js'); + }); +}); + +test('baz', function (t) { + t.plan(1); + var dir = __dirname + '/resolver'; + + resolve('./baz', { basedir : dir }, function (err, res) { + if (err) t.fail(err); + t.equal(res, dir + '/baz/quux.js'); + }); +}); + +test('biz', function (t) { + t.plan(3); + var dir = __dirname + '/resolver/biz/node_modules'; + + resolve('./grux', { basedir : dir }, function (err, res) { + if (err) t.fail(err); + t.equal(res, dir + '/grux/index.js'); + }); + + resolve('tiv', { basedir : dir + '/grux' }, function (err, res) { + if (err) t.fail(err); + t.equal(res, dir + '/tiv/index.js'); + }); + + resolve('grux', { basedir : dir + '/tiv' }, function (err, res) { + if (err) t.fail(err); + t.equal(res, dir + '/grux/index.js'); + }); +}); + +test('normalize', function (t) { + t.plan(1); + var dir = __dirname + '/resolver/biz/node_modules/grux'; + + resolve('../grux', { basedir : dir }, function (err, res) { + if (err) t.fail(err); + t.equal(res, dir + '/index.js'); + }); +}); + +test('cup', function (t) { + t.plan(3); + var dir = __dirname + '/resolver'; + + resolve('./cup', { basedir : dir, extensions : [ '.js', '.coffee' ] }, + function (err, res) { + if (err) t.fail(err); + t.equal(res, dir + '/cup.coffee'); + }); + + resolve('./cup.coffee', { basedir : dir }, function (err, res) { + if (err) t.fail(err); + t.equal(res, dir + '/cup.coffee'); + }); + + resolve('./cup', { basedir : dir, extensions : [ '.js' ] }, + function (err, res) { + t.equal(err.message, "Cannot find module './cup'"); + }); +}); + +test('mug', function (t) { + t.plan(3); + var dir = __dirname + '/resolver'; + + resolve('./mug', { basedir : dir }, function (err, res) { + if (err) t.fail(err); + t.equal(res, dir + '/mug.js'); + }); + + resolve('./mug', { basedir : dir, extensions : [ '.coffee', '.js' ] }, + function (err, res) { + if (err) t.fail(err); + t.equal(res, dir + '/mug.coffee'); + }); + + resolve('./mug', { basedir : dir, extensions : [ '.js', '.coffee' ] }, + function (err, res) { + t.equal(res, dir + '/mug.js'); + }); +}); + +test('other path', function (t) { + t.plan(4); + var resolverDir = __dirname + '/resolver'; + var dir = resolverDir + '/bar'; + var otherDir = resolverDir + '/other_path'; + + resolve('root', { basedir : dir, paths: [otherDir] }, function (err, res) { + if (err) t.fail(err); + t.equal(res, resolverDir + '/other_path/root.js'); + }); + + resolve('lib/other-lib', { basedir : dir, paths: [otherDir] }, + function (err, res) { + if (err) t.fail(err); + t.equal(res, resolverDir + '/other_path/lib/other-lib.js'); + }); + + resolve('root', { basedir : dir, }, function (err, res) { + t.equal(err.message, "Cannot find module 'root'"); + }); + + resolve('zzz', { basedir : dir, paths: [otherDir] }, function (err, res) { + t.equal(err.message, "Cannot find module 'zzz'"); + }); +}); diff --git a/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js new file mode 100644 index 00000000..bd816eab --- /dev/null +++ b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver/bar/node_modules/foo/index.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver/baz/doom.js b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver/baz/doom.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver/baz/package.json b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver/baz/package.json new file mode 100644 index 00000000..6b81dcdd --- /dev/null +++ b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver/baz/package.json @@ -0,0 +1,3 @@ +{ + "main" : "quux.js" +} diff --git a/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver/baz/quux.js b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver/baz/quux.js new file mode 100644 index 00000000..bd816eab --- /dev/null +++ b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver/baz/quux.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js new file mode 100644 index 00000000..49960555 --- /dev/null +++ b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver/biz/node_modules/grux/index.js @@ -0,0 +1 @@ +module.exports = require('tiv') * 100; diff --git a/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js new file mode 100644 index 00000000..690aad34 --- /dev/null +++ b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver/biz/node_modules/tiv/index.js @@ -0,0 +1 @@ +module.exports = 3; diff --git a/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver/cup.coffee b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver/cup.coffee new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver/cup.coffee @@ -0,0 +1 @@ + diff --git a/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver/foo.js b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver/foo.js new file mode 100644 index 00000000..bd816eab --- /dev/null +++ b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver/foo.js @@ -0,0 +1 @@ +module.exports = 1; diff --git a/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver/mug.coffee b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver/mug.coffee new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver/mug.js b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver/mug.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver/other_path/lib/other-lib.js b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver/other_path/lib/other-lib.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver/other_path/root.js b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver/other_path/root.js new file mode 100644 index 00000000..e69de29b diff --git a/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver_sync.js b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver_sync.js new file mode 100644 index 00000000..80f5aa55 --- /dev/null +++ b/pitfall/pdfkit/node_modules/rfile/node_modules/resolve/test/resolver_sync.js @@ -0,0 +1,157 @@ +var test = require('tap').test; +var resolve = require('../'); + +test('foo', function (t) { + var dir = __dirname + '/resolver'; + + t.equal( + resolve.sync('./foo', { basedir : dir }), + dir + '/foo.js' + ); + + t.equal( + resolve.sync('./foo.js', { basedir : dir }), + dir + '/foo.js' + ); + + t.throws(function () { + resolve.sync('foo', { basedir : dir }); + }); + + t.end(); +}); + +test('bar', function (t) { + var dir = __dirname + '/resolver'; + + t.equal( + resolve.sync('foo', { basedir : dir + '/bar' }), + dir + '/bar/node_modules/foo/index.js' + ); + t.end(); +}); + +test('baz', function (t) { + var dir = __dirname + '/resolver'; + + t.equal( + resolve.sync('./baz', { basedir : dir }), + dir + '/baz/quux.js' + ); + t.end(); +}); + +test('biz', function (t) { + var dir = __dirname + '/resolver/biz/node_modules'; + t.equal( + resolve.sync('./grux', { basedir : dir }), + dir + '/grux/index.js' + ); + + t.equal( + resolve.sync('tiv', { basedir : dir + '/grux' }), + dir + '/tiv/index.js' + ); + + t.equal( + resolve.sync('grux', { basedir : dir + '/tiv' }), + dir + '/grux/index.js' + ); + t.end(); +}); + +test('normalize', function (t) { + var dir = __dirname + '/resolver/biz/node_modules/grux'; + t.equal( + resolve.sync('../grux', { basedir : dir }), + dir + '/index.js' + ); + t.end(); +}); + +test('cup', function (t) { + var dir = __dirname + '/resolver'; + t.equal( + resolve.sync('./cup', { + basedir : dir, + extensions : [ '.js', '.coffee' ] + }), + dir + '/cup.coffee' + ); + + t.equal( + resolve.sync('./cup.coffee', { + basedir : dir + }), + dir + '/cup.coffee' + ); + + t.throws(function () { + resolve.sync('./cup', { + basedir : dir, + extensions : [ '.js' ] + }) + }); + + t.end(); +}); + +test('mug', function (t) { + var dir = __dirname + '/resolver'; + t.equal( + resolve.sync('./mug', { basedir : dir }), + dir + '/mug.js' + ); + + t.equal( + resolve.sync('./mug', { + basedir : dir, + extensions : [ '.coffee', '.js' ] + }), + dir + '/mug.coffee' + ); + + t.equal( + resolve.sync('./mug', { + basedir : dir, + extensions : [ '.js', '.coffee' ] + }), + dir + '/mug.js' + ); + + t.end(); +}); + +test('other path', function (t) { + var resolverDir = __dirname + '/resolver'; + var dir = resolverDir + '/bar'; + var otherDir = resolverDir + '/other_path'; + + var path = require('path'); + + t.equal( + resolve.sync('root', { + basedir : dir, + paths: [otherDir] }), + resolverDir + '/other_path/root.js' + ); + + t.equal( + resolve.sync('lib/other-lib', { + basedir : dir, + paths: [otherDir] }), + resolverDir + '/other_path/lib/other-lib.js' + ); + + t.throws(function () { + resolve.sync('root', { basedir : dir, }); + }); + + t.throws(function () { + resolve.sync('zzz', { + basedir : dir, + paths: [otherDir] }); + }); + + t.end(); +}); diff --git a/pitfall/pdfkit/node_modules/rfile/package.json b/pitfall/pdfkit/node_modules/rfile/package.json new file mode 100644 index 00000000..d5c29e88 --- /dev/null +++ b/pitfall/pdfkit/node_modules/rfile/package.json @@ -0,0 +1,92 @@ +{ + "_args": [ + [ + { + "raw": "rfile@~1.0.0", + "scope": null, + "escapedName": "rfile", + "name": "rfile", + "rawSpec": "~1.0.0", + "spec": ">=1.0.0 <1.1.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/umd" + ] + ], + "_from": "rfile@>=1.0.0 <1.1.0", + "_id": "rfile@1.0.0", + "_inCache": true, + "_location": "/rfile", + "_npmUser": { + "name": "forbeslindesay", + "email": "forbes@lindesay.co.uk" + }, + "_npmVersion": "1.2.10", + "_phantomChildren": {}, + "_requested": { + "raw": "rfile@~1.0.0", + "scope": null, + "escapedName": "rfile", + "name": "rfile", + "rawSpec": "~1.0.0", + "spec": ">=1.0.0 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "/ruglify", + "/umd" + ], + "_resolved": "https://registry.npmjs.org/rfile/-/rfile-1.0.0.tgz", + "_shasum": "59708cf90ca1e74c54c3cfc5c36fdb9810435261", + "_shrinkwrap": null, + "_spec": "rfile@~1.0.0", + "_where": "/Users/MB/git/pdfkit/node_modules/umd", + "author": { + "name": "ForbesLindesay" + }, + "bugs": { + "url": "https://github.com/ForbesLindesay/rfile/issues" + }, + "dependencies": { + "callsite": "~1.0.0", + "resolve": "~0.3.0" + }, + "description": "Require a plain text or binary file in node.js", + "devDependencies": { + "mocha": "~1.8" + }, + "directories": {}, + "dist": { + "shasum": "59708cf90ca1e74c54c3cfc5c36fdb9810435261", + "tarball": "https://registry.npmjs.org/rfile/-/rfile-1.0.0.tgz" + }, + "gitHead": "d82e3088d06d2a8ce94f51fa7536555c3947e74f", + "homepage": "https://github.com/ForbesLindesay/rfile#readme", + "keywords": [ + "require", + "file", + "text", + "relative", + "module" + ], + "license": "MIT", + "main": "index.js", + "maintainers": [ + { + "name": "forbeslindesay", + "email": "forbes@lindesay.co.uk" + } + ], + "name": "rfile", + "optionalDependencies": {}, + "readme": "# rfile\r\n\r\n[![Build Status](https://secure.travis-ci.org/ForbesLindesay/rfile.png)](http://travis-ci.org/ForbesLindesay/rfile)\r\n[![Dependency Status](https://gemnasium.com/ForbesLindesay/rfile.png)](https://gemnasium.com/ForbesLindesay/rfile)\r\n\r\nrequire a plain text or binary file in node.js\r\n\r\n## Installation\r\n\r\n $ npm install rfile\r\n\r\n## Usage\r\n\r\n```javascript\r\nvar rfile = require('rfile');\r\n\r\nvar text = rfile('./my-text-file.txt');\r\nvar mochaReadme = rfile('mocha/readme.md');\r\nvar mochaSource = rfile('mocha');\r\nvar image = rfile('image.png', {binary: true});\r\n```\r\n\r\n## API\r\n\r\n### rfile(pkg, options)\r\n\r\n Uses `rfile.resolve` (see below) to look up your file `pkg`. This means it supports all the same options as `rfile.resolve`. Having found the file, it does the following:\r\n\r\n```javascript\r\nreturn options.binary ? read(path) : fixup(read(path).toString());\r\n```\r\n\r\n `options.binary` defaults to `false` and `fixup` removes the UTF-8 BOM if present and removes any `\\r` characters (added to newlines on windows only).\r\n\r\n### rfile.resolve(pkg, options)\r\n\r\n Internally, [resolve](https://npmjs.org/package/resolve) is used to lookup your package, so it supports all the same options as that. In addition t defaults `basedir` to the directory of the function which called `rfile` or `rfile.resolve`.\r\n\r\n The additional option `exclude` is useful if you wanted to create a wrapper arround this. It specifies the filenames not to consider for `basedir` paths. For example, you could create a module called `ruglify` for requiring and minifying JavaScript in one go.\r\n\r\n ruglify.js\r\n```javascript\r\nvar rfile = require('rfile');\r\nvar uglify require('uglify-js').minify;\r\n\r\nmodule.exports = ruglify;\r\nfunction ruglify(path, options) {\r\n return minify(rfile.resolve(path, {exclude: [__filename]}), options).code;\r\n}\r\n```\r\n\r\n#### From `resolve`\r\n\r\n - opts.basedir - directory to begin resolving from (defaults to `__dirname` of the calling module for `rfile`)\r\n - opts.extensions - array of file extensions to search in order (defaults to `['.js', '.json']` for `rfile`)\r\n - opts.readFile - how to read files asynchronously\r\n - opts.isFile - function to asynchronously test whether a file exists\r\n - opts.packageFilter - transform the parsed package.json contents before looking at the \"main\" field (useful for browserify etc.)\r\n - opts.paths - require.paths array to use if nothing is found on the normal node_modules recursive walk (probably don't use this)\r\n\r\n## Notes\r\n\r\nOne of the interesting features of this is that it respects the `main` field of package.json files. Say you had a module called `foo`, you could have a package.json like:\r\n\r\n```json\r\n{\r\n \"name\": \"foo\",\r\n \"version\": \"1.0.0\",\r\n \"main\": \"./foo\"\r\n}\r\n```\r\n\r\nYou might then have a `foo.js` file, containing the JavaScript code of the module, and a `foo.css` file containing the stylesheet for the module when used in the browser. Using `rfile` you could load the css by simply calling:\r\n\r\n```javascript\r\nrfile('foo', {extensions: ['.css']});\r\n```\r\n\r\n## License\r\n\r\n MIT", + "readmeFilename": "README.md", + "repository": { + "type": "git", + "url": "git+https://github.com/ForbesLindesay/rfile.git" + }, + "scripts": { + "test": "mocha -R spec" + }, + "version": "1.0.0" +} diff --git a/pitfall/pdfkit/node_modules/rfile/test/index.js b/pitfall/pdfkit/node_modules/rfile/test/index.js new file mode 100644 index 00000000..e7e1c5bf --- /dev/null +++ b/pitfall/pdfkit/node_modules/rfile/test/index.js @@ -0,0 +1,43 @@ +var join = require('path').join; +var read = require('fs').readFileSync; +var inspect = require('util').inspect; +var assert = require('assert'); +var rfile = require('../'); + +var testCases = []; +function equal(reqPath, fullPath, options) { + testCases.push([reqPath, fullPath, options]); +} + +equal('./index.js', __filename); +equal('../package.json', join(__dirname, '..', 'package.json')); +equal('./index', __filename); +equal('../package', join(__dirname, '..', 'package.json')); +equal('../README', join(__dirname, '..', 'README.md'), {extensions: ['.md']}); + + +describe('rfile.resolve', function () { + testCases.forEach(function (testCase) { + describe('(' + inspect(testCase[0]) + (testCase[2] ? ', ' + inspect(testCase[2]) : '') + ')', function () { + it('resolves to ' + inspect(testCase[1]), function () { + assert.equal(rfile.resolve(testCase[0], testCase[2]), testCase[1]); + }); + }); + }); +}); + +describe('rfile', function () { + testCases.forEach(function (testCase) { + describe('(' + inspect(testCase[0]) + (testCase[2] ? ', ' + inspect(testCase[2]) : '') + ')', function () { + it('reads ' + inspect(testCase[1]), function () { + assert.equal(rfile(testCase[0], testCase[2]), stripBOM(read(testCase[1]).toString()).replace(/\r/g, '')); + }); + }); + }); +}); + +function stripBOM(str){ + return 0xFEFF == str.charCodeAt(0) + ? str.substring(1) + : str; +} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/ruglify/.npmignore b/pitfall/pdfkit/node_modules/ruglify/.npmignore new file mode 100644 index 00000000..69f75d26 --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/.npmignore @@ -0,0 +1,16 @@ +lib-cov +*.seed +*.log +*.csv +*.dat +*.out +*.pid +*.gz + +pids +logs +results + +npm-debug.log + +node_modules diff --git a/pitfall/pdfkit/node_modules/ruglify/.travis.yml b/pitfall/pdfkit/node_modules/ruglify/.travis.yml new file mode 100644 index 00000000..97e45158 --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/.travis.yml @@ -0,0 +1,4 @@ +language: node_js +node_js: + - "0.10" + - "0.8" \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/ruglify/README.md b/pitfall/pdfkit/node_modules/ruglify/README.md new file mode 100644 index 00000000..861a44e9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/README.md @@ -0,0 +1,26 @@ +# ruglify + +[![Build Status](https://secure.travis-ci.org/ForbesLindesay/ruglify.png)](http://travis-ci.org/ForbesLindesay/ruglify) +[![Dependency Status](https://gemnasium.com/ForbesLindesay/ruglify.png)](https://gemnasium.com/ForbesLindesay/ruglify) + +"Require" minified JavaScript as a string + +## Installation + +``` +npm install ruglify +``` + +## Usage + +```javascript +var ruglify = require('ruglify'); +var minifiedJQuery = ruglify('./jquery.js'); +console.log(minifiedJQuery); +``` + +Uses the same resolution algorithm as require for maximum simplicity. Built on top of [rfile](https://github.com/ForbesLindesay/rfile). + +## License + + MIT \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/ruglify/index.js b/pitfall/pdfkit/node_modules/ruglify/index.js new file mode 100644 index 00000000..8eeeb2b9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/index.js @@ -0,0 +1,9 @@ +var rfile = require('rfile'); +var minify = require('uglify-js').minify; + +module.exports = ruglify; +function ruglify(path, options) { + options = options || {}; + options.exclude = [__filename]; + return minify(rfile.resolve(path, options), options).code; +} \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/ruglify/node_modules/.bin/uglifyjs b/pitfall/pdfkit/node_modules/ruglify/node_modules/.bin/uglifyjs new file mode 120000 index 00000000..fef3468b --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/node_modules/.bin/uglifyjs @@ -0,0 +1 @@ +../uglify-js/bin/uglifyjs \ No newline at end of file diff --git a/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/.npmignore b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/.npmignore new file mode 100644 index 00000000..94fceeb2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/.npmignore @@ -0,0 +1,2 @@ +tmp/ +node_modules/ diff --git a/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/README.md b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/README.md new file mode 100644 index 00000000..de6abe5d --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/README.md @@ -0,0 +1,544 @@ +UglifyJS 2 +========== + +UglifyJS is a JavaScript parser, minifier, compressor or beautifier toolkit. + +This page documents the command line utility. For +[API and internals documentation see my website](http://lisperator.net/uglifyjs/). +There's also an +[in-browser online demo](http://lisperator.net/uglifyjs/#demo) (for Firefox, +Chrome and probably Safari). + +Install +------- + +First make sure you have installed the latest version of [node.js](http://nodejs.org/) +(You may need to restart your computer after this step). + +From NPM for use as a command line app: + + npm install uglify-js -g + +From NPM for programmatic use: + + npm install uglify-js + +From Git: + + git clone git://github.com/mishoo/UglifyJS2.git + cd UglifyJS2 + npm link . + +Usage +----- + + uglifyjs [input files] [options] + +UglifyJS2 can take multiple input files. It's recommended that you pass the +input files first, then pass the options. UglifyJS will parse input files +in sequence and apply any compression options. The files are parsed in the +same global scope, that is, a reference from a file to some +variable/function declared in another file will be matched properly. + +If you want to read from STDIN instead, pass a single dash instead of input +files. + +The available options are: + + --source-map Specify an output file where to generate source map. + [string] + --source-map-root The path to the original source to be included in the + source map. [string] + --source-map-url The path to the source map to be added in //@ + sourceMappingURL. Defaults to the value passed with + --source-map. [string] + --in-source-map Input source map, useful if you're compressing JS that was + generated from some other original code. + -p, --prefix Skip prefix for original filenames that appear in source + maps. For example -p 3 will drop 3 directories from file + names and ensure they are relative paths. + -o, --output Output file (default STDOUT). + -b, --beautify Beautify output/specify output options. [string] + -m, --mangle Mangle names/pass mangler options. [string] + -r, --reserved Reserved names to exclude from mangling. + -c, --compress Enable compressor/pass compressor options. Pass options + like -c hoist_vars=false,if_return=false. Use -c with no + argument to use the default compression options. [string] + -d, --define Global definitions [string] + --comments Preserve copyright comments in the output. By default this + works like Google Closure, keeping JSDoc-style comments + that contain "@license" or "@preserve". You can optionally + pass one of the following arguments to this flag: + - "all" to keep all comments + - a valid JS regexp (needs to start with a slash) to keep + only comments that match. + Note that currently not *all* comments can be kept when + compression is on, because of dead code removal or + cascading statements into sequences. [string] + --stats Display operations run time on STDERR. [boolean] + --acorn Use Acorn for parsing. [boolean] + --spidermonkey Assume input fles are SpiderMonkey AST format (as JSON). + [boolean] + --self Build itself (UglifyJS2) as a library (implies + --wrap=UglifyJS --export-all) [boolean] + --wrap Embed everything in a big function, making the “exports” + and “global” variables available. You need to pass an + argument to this option to specify the name that your + module will take when included in, say, a browser. + [string] + --export-all Only used when --wrap, this tells UglifyJS to add code to + automatically export all globals. [boolean] + --lint Display some scope warnings [boolean] + -v, --verbose Verbose [boolean] + -V, --version Print version number and exit. [boolean] + +Specify `--output` (`-o`) to declare the output file. Otherwise the output +goes to STDOUT. + +## Source map options + +UglifyJS2 can generate a source map file, which is highly useful for +debugging your compressed JavaScript. To get a source map, pass +`--source-map output.js.map` (full path to the file where you want the +source map dumped). + +Additionally you might need `--source-map-root` to pass the URL where the +original files can be found. In case you are passing full paths to input +files to UglifyJS, you can use `--prefix` (`-p`) to specify the number of +directories to drop from the path prefix when declaring files in the source +map. + +For example: + + uglifyjs /home/doe/work/foo/src/js/file1.js \ + /home/doe/work/foo/src/js/file2.js \ + -o foo.min.js \ + --source-map foo.min.js.map \ + --source-map-root http://foo.com/src \ + -p 5 -c -m + +The above will compress and mangle `file1.js` and `file2.js`, will drop the +output in `foo.min.js` and the source map in `foo.min.js.map`. The source +mapping will refer to `http://foo.com/src/js/file1.js` and +`http://foo.com/src/js/file2.js` (in fact it will list `http://foo.com/src` +as the source map root, and the original files as `js/file1.js` and +`js/file2.js`). + +### Composed source map + +When you're compressing JS code that was output by a compiler such as +CoffeeScript, mapping to the JS code won't be too helpful. Instead, you'd +like to map back to the original code (i.e. CoffeeScript). UglifyJS has an +option to take an input source map. Assuming you have a mapping from +CoffeeScript → compiled JS, UglifyJS can generate a map from CoffeeScript → +compressed JS by mapping every token in the compiled JS to its original +location. + +To use this feature you need to pass `--in-source-map +/path/to/input/source.map`. Normally the input source map should also point +to the file containing the generated JS, so if that's correct you can omit +input files from the command line. + +## Mangler options + +To enable the mangler you need to pass `--mangle` (`-m`). Optionally you +can pass `-m sort=true` (we'll possibly have other flags in the future) in order +to assign shorter names to most frequently used variables. This saves a few +hundred bytes on jQuery before gzip, but the output is _bigger_ after gzip +(and seems to happen for other libraries I tried it on) therefore it's not +enabled by default. + +When mangling is enabled but you want to prevent certain names from being +mangled, you can declare those names with `--reserved` (`-r`) — pass a +comma-separated list of names. For example: + + uglifyjs ... -m -r '$,require,exports' + +to prevent the `require`, `exports` and `$` names from being changed. + +## Compressor options + +You need to pass `--compress` (`-c`) to enable the compressor. Optionally +you can pass a comma-separated list of options. Options are in the form +`foo=bar`, or just `foo` (the latter implies a boolean option that you want +to set `true`; it's effectively a shortcut for `foo=true`). + +The defaults should be tuned for maximum compression on most code. Here are +the available options (all are `true` by default, except `hoist_vars`): + +- `sequences` -- join consecutive simple statements using the comma operator +- `properties` -- rewrite property access using the dot notation, for + example `foo["bar"] → foo.bar` +- `dead_code` -- remove unreachable code +- `drop_debugger` -- remove `debugger;` statements +- `unsafe` -- apply "unsafe" transformations (discussion below) +- `conditionals` -- apply optimizations for `if`-s and conditional + expressions +- `comparisons` -- apply certain optimizations to binary nodes, for example: + `!(a <= b) → a > b` (only when `unsafe`), attempts to negate binary nodes, + e.g. `a = !b && !c && !d && !e → a=!(b||c||d||e)` etc. +- `evaluate` -- attempt to evaluate constant expressions +- `booleans` -- various optimizations for boolean context, for example `!!a + ? b : c → a ? b : c` +- `loops` -- optimizations for `do`, `while` and `for` loops when we can + statically determine the condition +- `unused` -- drop unreferenced functions and variables +- `hoist_funs` -- hoist function declarations +- `hoist_vars` -- hoist `var` declarations (this is `false` by default + because it seems to increase the size of the output in general) +- `if_return` -- optimizations for if/return and if/continue +- `join_vars` -- join consecutive `var` statements +- `cascade` -- small optimization for sequences, transform `x, x` into `x` + and `x = something(), x` into `x = something()` +- `warnings` -- display warnings when dropping unreachable code or unused + declarations etc. + +### Conditional compilation + +You can use the `--define` (`-d`) switch in order to declare global +variables that UglifyJS will assume to be constants (unless defined in +scope). For example if you pass `--define DEBUG=false` then, coupled with +dead code removal UglifyJS will discard the following from the output: + + if (DEBUG) { + console.log("debug stuff"); + } + +UglifyJS will warn about the condition being always false and about dropping +unreachable code; for now there is no option to turn off only this specific +warning, you can pass `warnings=false` to turn off *all* warnings. + +Another way of doing that is to declare your globals as constants in a +separate file and include it into the build. For example you can have a +`build/defines.js` file with the following: + + const DEBUG = false; + const PRODUCTION = true; + // etc. + +and build your code like this: + + uglifyjs build/defines.js js/foo.js js/bar.js... -c + +UglifyJS will notice the constants and, since they cannot be altered, it +will evaluate references to them to the value itself and drop unreachable +code as usual. The possible downside of this approach is that the build +will contain the `const` declarations. + + +## Beautifier options + +The code generator tries to output shortest code possible by default. In +case you want beautified output, pass `--beautify` (`-b`). Optionally you +can pass additional arguments that control the code output: + +- `beautify` (default `true`) -- whether to actually beautify the output. + Passing `-b` will set this to true, but you might need to pass `-b` even + when you want to generate minified code, in order to specify additional + arguments, so you can use `-b beautify=false` to override it. +- `indent-level` (default 4) +- `indent-start` (default 0) -- prefix all lines by that many spaces +- `quote-keys` (default `false`) -- pass `true` to quote all keys in literal + objects +- `space-colon` (default `true`) -- insert a space after the colon signs +- `ascii-only` (default `false`) -- escape Unicode characters in strings and + regexps +- `inline-script` (default `false`) -- escape the slash in occurrences of + ` 0) { + sys.error("WARN: Ignoring input files since --self was passed"); + } + files = UglifyJS.FILES; + if (!ARGS.wrap) ARGS.wrap = "UglifyJS"; + ARGS.export_all = true; +} + +var ORIG_MAP = ARGS.in_source_map; + +if (ORIG_MAP) { + ORIG_MAP = JSON.parse(fs.readFileSync(ORIG_MAP)); + if (files.length == 0) { + sys.error("INFO: Using file from the input source map: " + ORIG_MAP.file); + files = [ ORIG_MAP.file ]; + } + if (ARGS.source_map_root == null) { + ARGS.source_map_root = ORIG_MAP.sourceRoot; + } +} + +if (files.length == 0) { + files = [ "-" ]; +} + +if (files.indexOf("-") >= 0 && ARGS.source_map) { + sys.error("ERROR: Source map doesn't work with input from STDIN"); + process.exit(1); +} + +if (files.filter(function(el){ return el == "-" }).length > 1) { + sys.error("ERROR: Can read a single file from STDIN (two or more dashes specified)"); + process.exit(1); +} + +var STATS = {}; +var OUTPUT_FILE = ARGS.o; +var TOPLEVEL = null; + +var SOURCE_MAP = ARGS.source_map ? UglifyJS.SourceMap({ + file: OUTPUT_FILE, + root: ARGS.source_map_root, + orig: ORIG_MAP, +}) : null; + +OUTPUT_OPTIONS.source_map = SOURCE_MAP; + +try { + var output = UglifyJS.OutputStream(OUTPUT_OPTIONS); + var compressor = COMPRESS && UglifyJS.Compressor(COMPRESS); +} catch(ex) { + if (ex instanceof UglifyJS.DefaultsError) { + sys.error(ex.msg); + sys.error("Supported options:"); + sys.error(sys.inspect(ex.defs)); + process.exit(1); + } +} + +files.forEach(function(file) { + var code = read_whole_file(file); + if (ARGS.p != null) { + file = file.replace(/^\/+/, "").split(/\/+/).slice(ARGS.p).join("/"); + } + time_it("parse", function(){ + if (ARGS.spidermonkey) { + var program = JSON.parse(code); + if (!TOPLEVEL) TOPLEVEL = program; + else TOPLEVEL.body = TOPLEVEL.body.concat(program.body); + } + else if (ARGS.acorn) { + TOPLEVEL = acorn.parse(code, { + locations : true, + trackComments : true, + sourceFile : file, + program : TOPLEVEL + }); + } + else { + TOPLEVEL = UglifyJS.parse(code, { + filename: file, + toplevel: TOPLEVEL + }); + }; + }); +}); + +if (ARGS.acorn || ARGS.spidermonkey) time_it("convert_ast", function(){ + TOPLEVEL = UglifyJS.AST_Node.from_mozilla_ast(TOPLEVEL); +}); + +if (ARGS.wrap) { + TOPLEVEL = TOPLEVEL.wrap_commonjs(ARGS.wrap, ARGS.export_all); +} + +var SCOPE_IS_NEEDED = COMPRESS || MANGLE || ARGS.lint; + +if (SCOPE_IS_NEEDED) { + time_it("scope", function(){ + TOPLEVEL.figure_out_scope(); + if (ARGS.lint) { + TOPLEVEL.scope_warnings(); + } + }); +} + +if (COMPRESS) { + time_it("squeeze", function(){ + TOPLEVEL = TOPLEVEL.transform(compressor); + }); +} + +if (SCOPE_IS_NEEDED) { + time_it("scope", function(){ + TOPLEVEL.figure_out_scope(); + if (MANGLE) { + TOPLEVEL.compute_char_frequency(MANGLE); + } + }); +} + +if (MANGLE) time_it("mangle", function(){ + TOPLEVEL.mangle_names(MANGLE); +}); +time_it("generate", function(){ + TOPLEVEL.print(output); +}); + +output = output.get(); + +if (SOURCE_MAP) { + fs.writeFileSync(ARGS.source_map, SOURCE_MAP, "utf8"); + output += "\n/*\n//@ sourceMappingURL=" + (ARGS.source_map_url || ARGS.source_map) + "\n*/"; +} + +if (OUTPUT_FILE) { + fs.writeFileSync(OUTPUT_FILE, output, "utf8"); +} else { + sys.print(output); + sys.error("\n"); +} + +if (ARGS.stats) { + sys.error(UglifyJS.string_template("Timing information (compressed {count} files):", { + count: files.length + })); + for (var i in STATS) if (STATS.hasOwnProperty(i)) { + sys.error(UglifyJS.string_template("- {name}: {time}s", { + name: i, + time: (STATS[i] / 1000).toFixed(3) + })); + } +} + +/* -----[ functions ]----- */ + +function normalize(o) { + for (var i in o) if (o.hasOwnProperty(i) && /-/.test(i)) { + o[i.replace(/-/g, "_")] = o[i]; + delete o[i]; + } +} + +function getOptions(x, constants) { + x = ARGS[x]; + if (!x) return null; + var ret = {}; + if (x !== true) { + var ast; + try { + ast = UglifyJS.parse(x); + } catch(ex) { + if (ex instanceof UglifyJS.JS_Parse_Error) { + sys.error("Error parsing arguments in: " + x); + process.exit(1); + } + } + ast.walk(new UglifyJS.TreeWalker(function(node){ + if (node instanceof UglifyJS.AST_Toplevel) return; // descend + if (node instanceof UglifyJS.AST_SimpleStatement) return; // descend + if (node instanceof UglifyJS.AST_Seq) return; // descend + if (node instanceof UglifyJS.AST_Assign) { + var name = node.left.print_to_string({ beautify: false }).replace(/-/g, "_"); + var value = node.right; + if (constants) + value = new Function("return (" + value.print_to_string() + ")")(); + ret[name] = value; + return true; // no descend + } + sys.error(node.TYPE) + sys.error("Error parsing arguments in: " + x); + process.exit(1); + })); + } + return ret; +} + +function read_whole_file(filename) { + if (filename == "-") { + // XXX: this sucks. How does one read the whole STDIN + // synchronously? + filename = "/dev/stdin"; + } + try { + return fs.readFileSync(filename, "utf8"); + } catch(ex) { + sys.error("ERROR: can't read file: " + filename); + process.exit(1); + } +} + +function time_it(name, cont) { + var t1 = new Date().getTime(); + var ret = cont(); + if (ARGS.stats) { + var spent = new Date().getTime() - t1; + if (STATS[name]) STATS[name] += spent; + else STATS[name] = spent; + } + return ret; +} diff --git a/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/lib/ast.js b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/lib/ast.js new file mode 100644 index 00000000..62bdd8db --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/lib/ast.js @@ -0,0 +1,964 @@ +/*********************************************************************** + + A JavaScript tokenizer / parser / beautifier / compressor. + https://github.com/mishoo/UglifyJS2 + + -------------------------------- (C) --------------------------------- + + Author: Mihai Bazon + + http://mihai.bazon.net/blog + + Distributed under the BSD license: + + Copyright 2012 (c) Mihai Bazon + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above + copyright notice, this list of conditions and the following + disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials + provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + ***********************************************************************/ + +"use strict"; + +function DEFNODE(type, props, methods, base) { + if (arguments.length < 4) base = AST_Node; + if (!props) props = []; + else props = props.split(/\s+/); + var self_props = props; + if (base && base.PROPS) + props = props.concat(base.PROPS); + var code = "return function AST_" + type + "(props){ if (props) { "; + for (var i = props.length; --i >= 0;) { + code += "this." + props[i] + " = props." + props[i] + ";"; + } + var proto = base && new base; + if (proto && proto.initialize || (methods && methods.initialize)) + code += "this.initialize();"; + code += "}}"; + var ctor = new Function(code)(); + if (proto) { + ctor.prototype = proto; + ctor.BASE = base; + } + if (base) base.SUBCLASSES.push(ctor); + ctor.prototype.CTOR = ctor; + ctor.PROPS = props || null; + ctor.SELF_PROPS = self_props; + ctor.SUBCLASSES = []; + if (type) { + ctor.prototype.TYPE = ctor.TYPE = type; + } + if (methods) for (i in methods) if (methods.hasOwnProperty(i)) { + if (/^\$/.test(i)) { + ctor[i.substr(1)] = methods[i]; + } else { + ctor.prototype[i] = methods[i]; + } + } + ctor.DEFMETHOD = function(name, method) { + this.prototype[name] = method; + }; + return ctor; +}; + +var AST_Token = DEFNODE("Token", "type value line col pos endpos nlb comments_before file", { +}, null); + +var AST_Node = DEFNODE("Node", "start end", { + clone: function() { + return new this.CTOR(this); + }, + $documentation: "Base class of all AST nodes", + $propdoc: { + start: "[AST_Token] The first token of this node", + end: "[AST_Token] The last token of this node" + }, + _walk: function(visitor) { + return visitor._visit(this); + }, + walk: function(visitor) { + return this._walk(visitor); // not sure the indirection will be any help + } +}, null); + +AST_Node.warn_function = null; +AST_Node.warn = function(txt, props) { + if (AST_Node.warn_function) + AST_Node.warn_function(string_template(txt, props)); +}; + +/* -----[ statements ]----- */ + +var AST_Statement = DEFNODE("Statement", null, { + $documentation: "Base class of all statements", +}); + +var AST_Debugger = DEFNODE("Debugger", null, { + $documentation: "Represents a debugger statement", +}, AST_Statement); + +var AST_Directive = DEFNODE("Directive", "value scope", { + $documentation: "Represents a directive, like \"use strict\";", + $propdoc: { + value: "[string] The value of this directive as a plain string (it's not an AST_String!)", + scope: "[AST_Scope/S] The scope that this directive affects" + }, +}, AST_Statement); + +var AST_SimpleStatement = DEFNODE("SimpleStatement", "body", { + $documentation: "A statement consisting of an expression, i.e. a = 1 + 2", + $propdoc: { + body: "[AST_Node] an expression node (should not be instanceof AST_Statement)" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.body._walk(visitor); + }); + } +}, AST_Statement); + +function walk_body(node, visitor) { + if (node.body instanceof AST_Statement) { + node.body._walk(visitor); + } + else node.body.forEach(function(stat){ + stat._walk(visitor); + }); +}; + +var AST_Block = DEFNODE("Block", "body", { + $documentation: "A body of statements (usually bracketed)", + $propdoc: { + body: "[AST_Statement*] an array of statements" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + walk_body(this, visitor); + }); + } +}, AST_Statement); + +var AST_BlockStatement = DEFNODE("BlockStatement", null, { + $documentation: "A block statement", +}, AST_Block); + +var AST_EmptyStatement = DEFNODE("EmptyStatement", null, { + $documentation: "The empty statement (empty block or simply a semicolon)", + _walk: function(visitor) { + return visitor._visit(this); + } +}, AST_Statement); + +var AST_StatementWithBody = DEFNODE("StatementWithBody", "body", { + $documentation: "Base class for all statements that contain one nested body: `For`, `ForIn`, `Do`, `While`, `With`", + $propdoc: { + body: "[AST_Statement] the body; this should always be present, even if it's an AST_EmptyStatement" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.body._walk(visitor); + }); + } +}, AST_Statement); + +var AST_LabeledStatement = DEFNODE("LabeledStatement", "label", { + $documentation: "Statement with a label", + $propdoc: { + label: "[AST_Label] a label definition" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.label._walk(visitor); + this.body._walk(visitor); + }); + } +}, AST_StatementWithBody); + +var AST_DWLoop = DEFNODE("DWLoop", "condition", { + $documentation: "Base class for do/while statements", + $propdoc: { + condition: "[AST_Node] the loop condition. Should not be instanceof AST_Statement" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.condition._walk(visitor); + this.body._walk(visitor); + }); + } +}, AST_StatementWithBody); + +var AST_Do = DEFNODE("Do", null, { + $documentation: "A `do` statement", +}, AST_DWLoop); + +var AST_While = DEFNODE("While", null, { + $documentation: "A `while` statement", +}, AST_DWLoop); + +var AST_For = DEFNODE("For", "init condition step", { + $documentation: "A `for` statement", + $propdoc: { + init: "[AST_Node?] the `for` initialization code, or null if empty", + condition: "[AST_Node?] the `for` termination clause, or null if empty", + step: "[AST_Node?] the `for` update clause, or null if empty" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + if (this.init) this.init._walk(visitor); + if (this.condition) this.condition._walk(visitor); + if (this.step) this.step._walk(visitor); + this.body._walk(visitor); + }); + } +}, AST_StatementWithBody); + +var AST_ForIn = DEFNODE("ForIn", "init name object", { + $documentation: "A `for ... in` statement", + $propdoc: { + init: "[AST_Node] the `for/in` initialization code", + name: "[AST_SymbolRef?] the loop variable, only if `init` is AST_Var", + object: "[AST_Node] the object that we're looping through" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.init._walk(visitor); + this.object._walk(visitor); + this.body._walk(visitor); + }); + } +}, AST_StatementWithBody); + +var AST_With = DEFNODE("With", "expression", { + $documentation: "A `with` statement", + $propdoc: { + expression: "[AST_Node] the `with` expression" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.expression._walk(visitor); + this.body._walk(visitor); + }); + } +}, AST_StatementWithBody); + +/* -----[ scope and functions ]----- */ + +var AST_Scope = DEFNODE("Scope", "directives variables functions uses_with uses_eval parent_scope enclosed cname", { + $documentation: "Base class for all statements introducing a lexical scope", + $propdoc: { + directives: "[string*/S] an array of directives declared in this scope", + variables: "[Object/S] a map of name -> SymbolDef for all variables/functions defined in this scope", + functions: "[Object/S] like `variables`, but only lists function declarations", + uses_with: "[boolean/S] tells whether this scope uses the `with` statement", + uses_eval: "[boolean/S] tells whether this scope contains a direct call to the global `eval`", + parent_scope: "[AST_Scope?/S] link to the parent scope", + enclosed: "[SymbolDef*/S] a list of all symbol definitions that are accessed from this scope or any subscopes", + cname: "[integer/S] current index for mangling variables (used internally by the mangler)", + }, +}, AST_Block); + +var AST_Toplevel = DEFNODE("Toplevel", "globals", { + $documentation: "The toplevel scope", + $propdoc: { + globals: "[Object/S] a map of name -> SymbolDef for all undeclared names", + }, + wrap_commonjs: function(name, export_all) { + var self = this; + var to_export = []; + if (export_all) { + self.figure_out_scope(); + self.walk(new TreeWalker(function(node){ + if (node instanceof AST_SymbolDeclaration && node.definition().global) { + if (!find_if(function(n){ return n.name == node.name }, to_export)) + to_export.push(node); + } + })); + } + var wrapped_tl = "(function(exports, global){ global['" + name + "'] = exports; '$ORIG'; '$EXPORTS'; }({}, (function(){return this}())))"; + wrapped_tl = parse(wrapped_tl); + wrapped_tl = wrapped_tl.transform(new TreeTransformer(function before(node){ + if (node instanceof AST_SimpleStatement) { + node = node.body; + if (node instanceof AST_String) switch (node.getValue()) { + case "$ORIG": + return MAP.splice(self.body); + case "$EXPORTS": + var body = []; + to_export.forEach(function(sym){ + body.push(new AST_SimpleStatement({ + body: new AST_Assign({ + left: new AST_Sub({ + expression: new AST_SymbolRef({ name: "exports" }), + property: new AST_String({ value: sym.name }), + }), + operator: "=", + right: new AST_SymbolRef(sym), + }), + })); + }); + return MAP.splice(body); + } + } + })); + return wrapped_tl; + } +}, AST_Scope); + +var AST_Lambda = DEFNODE("Lambda", "name argnames uses_arguments", { + $documentation: "Base class for functions", + $propdoc: { + name: "[AST_SymbolDeclaration?] the name of this function", + argnames: "[AST_SymbolFunarg*] array of function arguments", + uses_arguments: "[boolean/S] tells whether this function accesses the arguments array" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + if (this.name) this.name._walk(visitor); + this.argnames.forEach(function(arg){ + arg._walk(visitor); + }); + walk_body(this, visitor); + }); + } +}, AST_Scope); + +var AST_Accessor = DEFNODE("Accessor", null, { + $documentation: "A setter/getter function" +}, AST_Lambda); + +var AST_Function = DEFNODE("Function", null, { + $documentation: "A function expression" +}, AST_Lambda); + +var AST_Defun = DEFNODE("Defun", null, { + $documentation: "A function definition" +}, AST_Lambda); + +/* -----[ JUMPS ]----- */ + +var AST_Jump = DEFNODE("Jump", null, { + $documentation: "Base class for “jumps” (for now that's `return`, `throw`, `break` and `continue`)" +}, AST_Statement); + +var AST_Exit = DEFNODE("Exit", "value", { + $documentation: "Base class for “exits” (`return` and `throw`)", + $propdoc: { + value: "[AST_Node?] the value returned or thrown by this statement; could be null for AST_Return" + }, + _walk: function(visitor) { + return visitor._visit(this, this.value && function(){ + this.value._walk(visitor); + }); + } +}, AST_Jump); + +var AST_Return = DEFNODE("Return", null, { + $documentation: "A `return` statement" +}, AST_Exit); + +var AST_Throw = DEFNODE("Throw", null, { + $documentation: "A `throw` statement" +}, AST_Exit); + +var AST_LoopControl = DEFNODE("LoopControl", "label", { + $documentation: "Base class for loop control statements (`break` and `continue`)", + $propdoc: { + label: "[AST_LabelRef?] the label, or null if none", + }, + _walk: function(visitor) { + return visitor._visit(this, this.label && function(){ + this.label._walk(visitor); + }); + } +}, AST_Jump); + +var AST_Break = DEFNODE("Break", null, { + $documentation: "A `break` statement" +}, AST_LoopControl); + +var AST_Continue = DEFNODE("Continue", null, { + $documentation: "A `continue` statement" +}, AST_LoopControl); + +/* -----[ IF ]----- */ + +var AST_If = DEFNODE("If", "condition alternative", { + $documentation: "A `if` statement", + $propdoc: { + condition: "[AST_Node] the `if` condition", + alternative: "[AST_Statement?] the `else` part, or null if not present" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.condition._walk(visitor); + this.body._walk(visitor); + if (this.alternative) this.alternative._walk(visitor); + }); + } +}, AST_StatementWithBody); + +/* -----[ SWITCH ]----- */ + +var AST_Switch = DEFNODE("Switch", "expression", { + $documentation: "A `switch` statement", + $propdoc: { + expression: "[AST_Node] the `switch` “discriminant”" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.expression._walk(visitor); + walk_body(this, visitor); + }); + } +}, AST_Block); + +var AST_SwitchBranch = DEFNODE("SwitchBranch", null, { + $documentation: "Base class for `switch` branches", +}, AST_Block); + +var AST_Default = DEFNODE("Default", null, { + $documentation: "A `default` switch branch", +}, AST_SwitchBranch); + +var AST_Case = DEFNODE("Case", "expression", { + $documentation: "A `case` switch branch", + $propdoc: { + expression: "[AST_Node] the `case` expression" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.expression._walk(visitor); + walk_body(this, visitor); + }); + } +}, AST_SwitchBranch); + +/* -----[ EXCEPTIONS ]----- */ + +var AST_Try = DEFNODE("Try", "bcatch bfinally", { + $documentation: "A `try` statement", + $propdoc: { + bcatch: "[AST_Catch?] the catch block, or null if not present", + bfinally: "[AST_Finally?] the finally block, or null if not present" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + walk_body(this, visitor); + if (this.bcatch) this.bcatch._walk(visitor); + if (this.bfinally) this.bfinally._walk(visitor); + }); + } +}, AST_Block); + +// XXX: this is wrong according to ECMA-262 (12.4). the catch block +// should introduce another scope, as the argname should be visible +// only inside the catch block. However, doing it this way because of +// IE which simply introduces the name in the surrounding scope. If +// we ever want to fix this then AST_Catch should inherit from +// AST_Scope. +var AST_Catch = DEFNODE("Catch", "argname", { + $documentation: "A `catch` node; only makes sense as part of a `try` statement", + $propdoc: { + argname: "[AST_SymbolCatch] symbol for the exception" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.argname._walk(visitor); + walk_body(this, visitor); + }); + } +}, AST_Block); + +var AST_Finally = DEFNODE("Finally", null, { + $documentation: "A `finally` node; only makes sense as part of a `try` statement" +}, AST_Block); + +/* -----[ VAR/CONST ]----- */ + +var AST_Definitions = DEFNODE("Definitions", "definitions", { + $documentation: "Base class for `var` or `const` nodes (variable declarations/initializations)", + $propdoc: { + definitions: "[AST_VarDef*] array of variable definitions" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.definitions.forEach(function(def){ + def._walk(visitor); + }); + }); + } +}, AST_Statement); + +var AST_Var = DEFNODE("Var", null, { + $documentation: "A `var` statement" +}, AST_Definitions); + +var AST_Const = DEFNODE("Const", null, { + $documentation: "A `const` statement" +}, AST_Definitions); + +var AST_VarDef = DEFNODE("VarDef", "name value", { + $documentation: "A variable declaration; only appears in a AST_Definitions node", + $propdoc: { + name: "[AST_SymbolVar|AST_SymbolConst] name of the variable", + value: "[AST_Node?] initializer, or null of there's no initializer" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.name._walk(visitor); + if (this.value) this.value._walk(visitor); + }); + } +}); + +/* -----[ OTHER ]----- */ + +var AST_Call = DEFNODE("Call", "expression args", { + $documentation: "A function call expression", + $propdoc: { + expression: "[AST_Node] expression to invoke as function", + args: "[AST_Node*] array of arguments" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.expression._walk(visitor); + this.args.forEach(function(arg){ + arg._walk(visitor); + }); + }); + } +}); + +var AST_New = DEFNODE("New", null, { + $documentation: "An object instantiation. Derives from a function call since it has exactly the same properties" +}, AST_Call); + +var AST_Seq = DEFNODE("Seq", "car cdr", { + $documentation: "A sequence expression (two comma-separated expressions)", + $propdoc: { + car: "[AST_Node] first element in sequence", + cdr: "[AST_Node] second element in sequence" + }, + $cons: function(x, y) { + var seq = new AST_Seq(x); + seq.car = x; + seq.cdr = y; + return seq; + }, + $from_array: function(array) { + if (array.length == 0) return null; + if (array.length == 1) return array[0].clone(); + var list = null; + for (var i = array.length; --i >= 0;) { + list = AST_Seq.cons(array[i], list); + } + var p = list; + while (p) { + if (p.cdr && !p.cdr.cdr) { + p.cdr = p.cdr.car; + break; + } + p = p.cdr; + } + return list; + }, + to_array: function() { + var p = this, a = []; + while (p) { + a.push(p.car); + if (p.cdr && !(p.cdr instanceof AST_Seq)) { + a.push(p.cdr); + break; + } + p = p.cdr; + } + return a; + }, + add: function(node) { + var p = this; + while (p) { + if (!(p.cdr instanceof AST_Seq)) { + var cell = AST_Seq.cons(p.cdr, node); + return p.cdr = cell; + } + p = p.cdr; + } + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.car._walk(visitor); + if (this.cdr) this.cdr._walk(visitor); + }); + } +}); + +var AST_PropAccess = DEFNODE("PropAccess", "expression property", { + $documentation: "Base class for property access expressions, i.e. `a.foo` or `a[\"foo\"]`", + $propdoc: { + expression: "[AST_Node] the “container” expression", + property: "[AST_Node|string] the property to access. For AST_Dot this is always a plain string, while for AST_Sub it's an arbitrary AST_Node" + } +}); + +var AST_Dot = DEFNODE("Dot", null, { + $documentation: "A dotted property access expression", + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.expression._walk(visitor); + }); + } +}, AST_PropAccess); + +var AST_Sub = DEFNODE("Sub", null, { + $documentation: "Index-style property access, i.e. `a[\"foo\"]`", + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.expression._walk(visitor); + this.property._walk(visitor); + }); + } +}, AST_PropAccess); + +var AST_Unary = DEFNODE("Unary", "operator expression", { + $documentation: "Base class for unary expressions", + $propdoc: { + operator: "[string] the operator", + expression: "[AST_Node] expression that this unary operator applies to" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.expression._walk(visitor); + }); + } +}); + +var AST_UnaryPrefix = DEFNODE("UnaryPrefix", null, { + $documentation: "Unary prefix expression, i.e. `typeof i` or `++i`" +}, AST_Unary); + +var AST_UnaryPostfix = DEFNODE("UnaryPostfix", null, { + $documentation: "Unary postfix expression, i.e. `i++`" +}, AST_Unary); + +var AST_Binary = DEFNODE("Binary", "left operator right", { + $documentation: "Binary expression, i.e. `a + b`", + $propdoc: { + left: "[AST_Node] left-hand side expression", + operator: "[string] the operator", + right: "[AST_Node] right-hand side expression" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.left._walk(visitor); + this.right._walk(visitor); + }); + } +}); + +var AST_Conditional = DEFNODE("Conditional", "condition consequent alternative", { + $documentation: "Conditional expression using the ternary operator, i.e. `a ? b : c`", + $propdoc: { + condition: "[AST_Node]", + consequent: "[AST_Node]", + alternative: "[AST_Node]" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.condition._walk(visitor); + this.consequent._walk(visitor); + this.alternative._walk(visitor); + }); + } +}); + +var AST_Assign = DEFNODE("Assign", null, { + $documentation: "An assignment expression — `a = b + 5`", +}, AST_Binary); + +/* -----[ LITERALS ]----- */ + +var AST_Array = DEFNODE("Array", "elements", { + $documentation: "An array literal", + $propdoc: { + elements: "[AST_Node*] array of elements" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.elements.forEach(function(el){ + el._walk(visitor); + }); + }); + } +}); + +var AST_Object = DEFNODE("Object", "properties", { + $documentation: "An object literal", + $propdoc: { + properties: "[AST_ObjectProperty*] array of properties" + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.properties.forEach(function(prop){ + prop._walk(visitor); + }); + }); + } +}); + +var AST_ObjectProperty = DEFNODE("ObjectProperty", "key value", { + $documentation: "Base class for literal object properties", + $propdoc: { + key: "[string] the property name; it's always a plain string in our AST, no matter if it was a string, number or identifier in original code", + value: "[AST_Node] property value. For setters and getters this is an AST_Function." + }, + _walk: function(visitor) { + return visitor._visit(this, function(){ + this.value._walk(visitor); + }); + } +}); + +var AST_ObjectKeyVal = DEFNODE("ObjectKeyVal", null, { + $documentation: "A key: value object property", +}, AST_ObjectProperty); + +var AST_ObjectSetter = DEFNODE("ObjectSetter", null, { + $documentation: "An object setter property", +}, AST_ObjectProperty); + +var AST_ObjectGetter = DEFNODE("ObjectGetter", null, { + $documentation: "An object getter property", +}, AST_ObjectProperty); + +var AST_Symbol = DEFNODE("Symbol", "scope name thedef", { + $propdoc: { + name: "[string] name of this symbol", + scope: "[AST_Scope/S] the current scope (not necessarily the definition scope)", + thedef: "[SymbolDef/S] the definition of this symbol" + }, + $documentation: "Base class for all symbols", +}); + +var AST_SymbolAccessor = DEFNODE("SymbolAccessor", null, { + $documentation: "The name of a property accessor (setter/getter function)" +}, AST_Symbol); + +var AST_SymbolDeclaration = DEFNODE("SymbolDeclaration", "init", { + $documentation: "A declaration symbol (symbol in var/const, function name or argument, symbol in catch)", + $propdoc: { + init: "[AST_Node*/S] array of initializers for this declaration." + } +}, AST_Symbol); + +var AST_SymbolVar = DEFNODE("SymbolVar", null, { + $documentation: "Symbol defining a variable", +}, AST_SymbolDeclaration); + +var AST_SymbolConst = DEFNODE("SymbolConst", null, { + $documentation: "A constant declaration" +}, AST_SymbolDeclaration); + +var AST_SymbolFunarg = DEFNODE("SymbolFunarg", null, { + $documentation: "Symbol naming a function argument", +}, AST_SymbolVar); + +var AST_SymbolDefun = DEFNODE("SymbolDefun", null, { + $documentation: "Symbol defining a function", +}, AST_SymbolDeclaration); + +var AST_SymbolLambda = DEFNODE("SymbolLambda", null, { + $documentation: "Symbol naming a function expression", +}, AST_SymbolDeclaration); + +var AST_SymbolCatch = DEFNODE("SymbolCatch", null, { + $documentation: "Symbol naming the exception in catch", +}, AST_SymbolDeclaration); + +var AST_Label = DEFNODE("Label", "references", { + $documentation: "Symbol naming a label (declaration)", + $propdoc: { + references: "[AST_LabelRef*] a list of nodes referring to this label" + } +}, AST_Symbol); + +var AST_SymbolRef = DEFNODE("SymbolRef", null, { + $documentation: "Reference to some symbol (not definition/declaration)", +}, AST_Symbol); + +var AST_LabelRef = DEFNODE("LabelRef", null, { + $documentation: "Reference to a label symbol", +}, AST_Symbol); + +var AST_This = DEFNODE("This", null, { + $documentation: "The `this` symbol", +}, AST_Symbol); + +var AST_Constant = DEFNODE("Constant", null, { + $documentation: "Base class for all constants", + getValue: function() { + return this.value; + } +}); + +var AST_String = DEFNODE("String", "value", { + $documentation: "A string literal", + $propdoc: { + value: "[string] the contents of this string" + } +}, AST_Constant); + +var AST_Number = DEFNODE("Number", "value", { + $documentation: "A number literal", + $propdoc: { + value: "[number] the numeric value" + } +}, AST_Constant); + +var AST_RegExp = DEFNODE("RegExp", "value", { + $documentation: "A regexp literal", + $propdoc: { + value: "[RegExp] the actual regexp" + } +}, AST_Constant); + +var AST_Atom = DEFNODE("Atom", null, { + $documentation: "Base class for atoms", +}, AST_Constant); + +var AST_Null = DEFNODE("Null", null, { + $documentation: "The `null` atom", + value: null +}, AST_Atom); + +var AST_NaN = DEFNODE("NaN", null, { + $documentation: "The impossible value", + value: 0/0 +}, AST_Atom); + +var AST_Undefined = DEFNODE("Undefined", null, { + $documentation: "The `undefined` value", + value: (function(){}()) +}, AST_Atom); + +var AST_Hole = DEFNODE("Hole", null, { + $documentation: "A hole in an array", + value: (function(){}()) +}, AST_Atom); + +var AST_Infinity = DEFNODE("Infinity", null, { + $documentation: "The `Infinity` value", + value: 1/0 +}, AST_Atom); + +var AST_Boolean = DEFNODE("Boolean", null, { + $documentation: "Base class for booleans", +}, AST_Atom); + +var AST_False = DEFNODE("False", null, { + $documentation: "The `false` atom", + value: false +}, AST_Boolean); + +var AST_True = DEFNODE("True", null, { + $documentation: "The `true` atom", + value: true +}, AST_Boolean); + +/* -----[ TreeWalker ]----- */ + +function TreeWalker(callback) { + this.visit = callback; + this.stack = []; +}; +TreeWalker.prototype = { + _visit: function(node, descend) { + this.stack.push(node); + var ret = this.visit(node, descend ? function(){ + descend.call(node); + } : noop); + if (!ret && descend) { + descend.call(node); + } + this.stack.pop(); + return ret; + }, + parent: function(n) { + return this.stack[this.stack.length - 2 - (n || 0)]; + }, + push: function (node) { + this.stack.push(node); + }, + pop: function() { + return this.stack.pop(); + }, + self: function() { + return this.stack[this.stack.length - 1]; + }, + find_parent: function(type) { + var stack = this.stack; + for (var i = stack.length; --i >= 0;) { + var x = stack[i]; + if (x instanceof type) return x; + } + }, + in_boolean_context: function() { + var stack = this.stack; + var i = stack.length, self = stack[--i]; + while (i > 0) { + var p = stack[--i]; + if ((p instanceof AST_If && p.condition === self) || + (p instanceof AST_Conditional && p.condition === self) || + (p instanceof AST_DWLoop && p.condition === self) || + (p instanceof AST_For && p.condition === self) || + (p instanceof AST_UnaryPrefix && p.operator == "!" && p.expression === self)) + { + return true; + } + if (!(p instanceof AST_Binary && (p.operator == "&&" || p.operator == "||"))) + return false; + self = p; + } + }, + loopcontrol_target: function(label) { + var stack = this.stack; + if (label) { + for (var i = stack.length; --i >= 0;) { + var x = stack[i]; + if (x instanceof AST_LabeledStatement && x.label.name == label.name) { + return x.body; + } + } + } else { + for (var i = stack.length; --i >= 0;) { + var x = stack[i]; + if (x instanceof AST_Switch + || x instanceof AST_For + || x instanceof AST_ForIn + || x instanceof AST_DWLoop) return x; + } + } + } +}; diff --git a/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/lib/compress.js b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/lib/compress.js new file mode 100644 index 00000000..ca23c40e --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/lib/compress.js @@ -0,0 +1,1968 @@ +/*********************************************************************** + + A JavaScript tokenizer / parser / beautifier / compressor. + https://github.com/mishoo/UglifyJS2 + + -------------------------------- (C) --------------------------------- + + Author: Mihai Bazon + + http://mihai.bazon.net/blog + + Distributed under the BSD license: + + Copyright 2012 (c) Mihai Bazon + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above + copyright notice, this list of conditions and the following + disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials + provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + ***********************************************************************/ + +"use strict"; + +function Compressor(options, false_by_default) { + if (!(this instanceof Compressor)) + return new Compressor(options, false_by_default); + TreeTransformer.call(this, this.before, this.after); + this.options = defaults(options, { + sequences : !false_by_default, + properties : !false_by_default, + dead_code : !false_by_default, + drop_debugger : !false_by_default, + unsafe : !false_by_default, + unsafe_comps : false, + conditionals : !false_by_default, + comparisons : !false_by_default, + evaluate : !false_by_default, + booleans : !false_by_default, + loops : !false_by_default, + unused : !false_by_default, + hoist_funs : !false_by_default, + hoist_vars : false, + if_return : !false_by_default, + join_vars : !false_by_default, + cascade : !false_by_default, + side_effects : !false_by_default, + + warnings : true, + global_defs : {} + }, true); +}; + +Compressor.prototype = new TreeTransformer; +merge(Compressor.prototype, { + option: function(key) { return this.options[key] }, + warn: function() { + if (this.options.warnings) + AST_Node.warn.apply(AST_Node, arguments); + }, + before: function(node, descend, in_list) { + if (node._squeezed) return node; + if (node instanceof AST_Scope) { + node.drop_unused(this); + node = node.hoist_declarations(this); + } + descend(node, this); + node = node.optimize(this); + if (node instanceof AST_Scope) { + // dead code removal might leave further unused declarations. + // this'll usually save very few bytes, but the performance + // hit seems negligible so I'll just drop it here. + + // no point to repeat warnings. + var save_warnings = this.options.warnings; + this.options.warnings = false; + node.drop_unused(this); + this.options.warnings = save_warnings; + } + node._squeezed = true; + return node; + } +}); + +(function(){ + + function OPT(node, optimizer) { + node.DEFMETHOD("optimize", function(compressor){ + var self = this; + if (self._optimized) return self; + var opt = optimizer(self, compressor); + opt._optimized = true; + if (opt === self) return opt; + return opt.transform(compressor); + }); + }; + + OPT(AST_Node, function(self, compressor){ + return self; + }); + + AST_Node.DEFMETHOD("equivalent_to", function(node){ + // XXX: this is a rather expensive way to test two node's equivalence: + return this.print_to_string() == node.print_to_string(); + }); + + function make_node(ctor, orig, props) { + if (!props) props = {}; + if (orig) { + if (!props.start) props.start = orig.start; + if (!props.end) props.end = orig.end; + } + return new ctor(props); + }; + + function make_node_from_constant(compressor, val, orig) { + // XXX: WIP. + // if (val instanceof AST_Node) return val.transform(new TreeTransformer(null, function(node){ + // if (node instanceof AST_SymbolRef) { + // var scope = compressor.find_parent(AST_Scope); + // var def = scope.find_variable(node); + // node.thedef = def; + // return node; + // } + // })).transform(compressor); + + if (val instanceof AST_Node) return val.transform(compressor); + switch (typeof val) { + case "string": + return make_node(AST_String, orig, { + value: val + }).optimize(compressor); + case "number": + return make_node(isNaN(val) ? AST_NaN : AST_Number, orig, { + value: val + }).optimize(compressor); + case "boolean": + return make_node(val ? AST_True : AST_False, orig); + case "undefined": + return make_node(AST_Undefined, orig).optimize(compressor); + default: + if (val === null) { + return make_node(AST_Null, orig).optimize(compressor); + } + if (val instanceof RegExp) { + return make_node(AST_RegExp, orig).optimize(compressor); + } + throw new Error(string_template("Can't handle constant of type: {type}", { + type: typeof val + })); + } + }; + + function as_statement_array(thing) { + if (thing === null) return []; + if (thing instanceof AST_BlockStatement) return thing.body; + if (thing instanceof AST_EmptyStatement) return []; + if (thing instanceof AST_Statement) return [ thing ]; + throw new Error("Can't convert thing to statement array"); + }; + + function is_empty(thing) { + if (thing === null) return true; + if (thing instanceof AST_EmptyStatement) return true; + if (thing instanceof AST_BlockStatement) return thing.body.length == 0; + return false; + }; + + function loop_body(x) { + if (x instanceof AST_Switch) return x; + if (x instanceof AST_For || x instanceof AST_ForIn || x instanceof AST_DWLoop) { + return (x.body instanceof AST_BlockStatement ? x.body : x); + } + return x; + }; + + function tighten_body(statements, compressor) { + var CHANGED; + do { + CHANGED = false; + statements = eliminate_spurious_blocks(statements); + if (compressor.option("dead_code")) { + statements = eliminate_dead_code(statements, compressor); + } + if (compressor.option("if_return")) { + statements = handle_if_return(statements, compressor); + } + if (compressor.option("sequences")) { + statements = sequencesize(statements, compressor); + } + if (compressor.option("join_vars")) { + statements = join_consecutive_vars(statements, compressor); + } + } while (CHANGED); + return statements; + + function eliminate_spurious_blocks(statements) { + var seen_dirs = []; + return statements.reduce(function(a, stat){ + if (stat instanceof AST_BlockStatement) { + CHANGED = true; + a.push.apply(a, eliminate_spurious_blocks(stat.body)); + } else if (stat instanceof AST_EmptyStatement) { + CHANGED = true; + } else if (stat instanceof AST_Directive) { + if (seen_dirs.indexOf(stat.value) < 0) { + a.push(stat); + seen_dirs.push(stat.value); + } else { + CHANGED = true; + } + } else { + a.push(stat); + } + return a; + }, []); + }; + + function handle_if_return(statements, compressor) { + var self = compressor.self(); + var in_lambda = self instanceof AST_Lambda; + var ret = []; + loop: for (var i = statements.length; --i >= 0;) { + var stat = statements[i]; + switch (true) { + case (in_lambda && stat instanceof AST_Return && !stat.value && ret.length == 0): + CHANGED = true; + // note, ret.length is probably always zero + // because we drop unreachable code before this + // step. nevertheless, it's good to check. + continue loop; + case stat instanceof AST_If: + if (stat.body instanceof AST_Return) { + //--- + // pretty silly case, but: + // if (foo()) return; return; ==> foo(); return; + if (((in_lambda && ret.length == 0) + || (ret[0] instanceof AST_Return && !ret[0].value)) + && !stat.body.value && !stat.alternative) { + CHANGED = true; + var cond = make_node(AST_SimpleStatement, stat.condition, { + body: stat.condition + }); + ret.unshift(cond); + continue loop; + } + //--- + // if (foo()) return x; return y; ==> return foo() ? x : y; + if (ret[0] instanceof AST_Return && stat.body.value && ret[0].value && !stat.alternative) { + CHANGED = true; + stat = stat.clone(); + stat.alternative = ret[0]; + ret[0] = stat.transform(compressor); + continue loop; + } + //--- + // if (foo()) return x; [ return ; ] ==> return foo() ? x : undefined; + if ((ret.length == 0 || ret[0] instanceof AST_Return) && stat.body.value && !stat.alternative && in_lambda) { + CHANGED = true; + stat = stat.clone(); + stat.alternative = ret[0] || make_node(AST_Return, stat, { + value: make_node(AST_Undefined, stat) + }); + ret[0] = stat.transform(compressor); + continue loop; + } + //--- + // if (foo()) return; [ else x... ]; y... ==> if (!foo()) { x...; y... } + if (!stat.body.value && in_lambda) { + CHANGED = true; + stat = stat.clone(); + stat.condition = stat.condition.negate(compressor); + stat.body = make_node(AST_BlockStatement, stat, { + body: as_statement_array(stat.alternative).concat(ret) + }); + stat.alternative = null; + ret = [ stat.transform(compressor) ]; + continue loop; + } + //--- + if (ret.length == 1 && in_lambda && ret[0] instanceof AST_SimpleStatement + && (!stat.alternative || stat.alternative instanceof AST_SimpleStatement)) { + CHANGED = true; + ret.push(make_node(AST_Return, ret[0], { + value: make_node(AST_Undefined, ret[0]) + }).transform(compressor)); + ret = as_statement_array(stat.alternative).concat(ret); + ret.unshift(stat); + continue loop; + } + } + + var ab = aborts(stat.body); + var lct = ab instanceof AST_LoopControl ? compressor.loopcontrol_target(ab.label) : null; + if (ab && ((ab instanceof AST_Return && !ab.value && in_lambda) + || (ab instanceof AST_Continue && self === loop_body(lct)) + || (ab instanceof AST_Break && lct instanceof AST_BlockStatement && self === lct))) { + if (ab.label) { + remove(ab.label.thedef.references, ab.label); + } + CHANGED = true; + var body = as_statement_array(stat.body).slice(0, -1); + stat = stat.clone(); + stat.condition = stat.condition.negate(compressor); + stat.body = make_node(AST_BlockStatement, stat, { + body: ret + }); + stat.alternative = make_node(AST_BlockStatement, stat, { + body: body + }); + ret = [ stat.transform(compressor) ]; + continue loop; + } + + var ab = aborts(stat.alternative); + var lct = ab instanceof AST_LoopControl ? compressor.loopcontrol_target(ab.label) : null; + if (ab && ((ab instanceof AST_Return && !ab.value && in_lambda) + || (ab instanceof AST_Continue && self === loop_body(lct)) + || (ab instanceof AST_Break && lct instanceof AST_BlockStatement && self === lct))) { + if (ab.label) { + remove(ab.label.thedef.references, ab.label); + } + CHANGED = true; + stat = stat.clone(); + stat.body = make_node(AST_BlockStatement, stat.body, { + body: as_statement_array(stat.body).concat(ret) + }); + stat.alternative = make_node(AST_BlockStatement, stat.alternative, { + body: as_statement_array(stat.alternative).slice(0, -1) + }); + ret = [ stat.transform(compressor) ]; + continue loop; + } + + ret.unshift(stat); + break; + default: + ret.unshift(stat); + break; + } + } + return ret; + }; + + function eliminate_dead_code(statements, compressor) { + var has_quit = false; + var orig = statements.length; + var self = compressor.self(); + statements = statements.reduce(function(a, stat){ + if (has_quit) { + extract_declarations_from_unreachable_code(compressor, stat, a); + } else { + if (stat instanceof AST_LoopControl) { + var lct = compressor.loopcontrol_target(stat.label); + if ((stat instanceof AST_Break + && lct instanceof AST_BlockStatement + && loop_body(lct) === self) || (stat instanceof AST_Continue + && loop_body(lct) === self)) { + if (stat.label) { + remove(stat.label.thedef.references, stat.label); + } + } else { + a.push(stat); + } + } else { + a.push(stat); + } + if (aborts(stat)) has_quit = true; + } + return a; + }, []); + CHANGED = statements.length != orig; + return statements; + }; + + function sequencesize(statements, compressor) { + if (statements.length < 2) return statements; + var seq = [], ret = []; + function push_seq() { + seq = AST_Seq.from_array(seq); + if (seq) ret.push(make_node(AST_SimpleStatement, seq, { + body: seq + })); + seq = []; + }; + statements.forEach(function(stat){ + if (stat instanceof AST_SimpleStatement) seq.push(stat.body); + else push_seq(), ret.push(stat); + }); + push_seq(); + ret = sequencesize_2(ret, compressor); + CHANGED = ret.length != statements.length; + return ret; + }; + + function sequencesize_2(statements, compressor) { + function cons_seq(right) { + ret.pop(); + var left = prev.body; + if (left instanceof AST_Seq) { + left.add(right); + } else { + left = AST_Seq.cons(left, right); + } + return left.transform(compressor); + }; + var ret = [], prev = null; + statements.forEach(function(stat){ + if (prev) { + if (stat instanceof AST_For) { + var opera = {}; + try { + prev.body.walk(new TreeWalker(function(node){ + if (node instanceof AST_Binary && node.operator == "in") + throw opera; + })); + if (stat.init && !(stat.init instanceof AST_Definitions)) { + stat.init = cons_seq(stat.init); + } + else if (!stat.init) { + stat.init = prev.body; + ret.pop(); + } + } catch(ex) { + if (ex !== opera) throw ex; + } + } + else if (stat instanceof AST_If) { + stat.condition = cons_seq(stat.condition); + } + else if (stat instanceof AST_With) { + stat.expression = cons_seq(stat.expression); + } + else if (stat instanceof AST_Exit && stat.value) { + stat.value = cons_seq(stat.value); + } + else if (stat instanceof AST_Exit) { + stat.value = cons_seq(make_node(AST_Undefined, stat)); + } + else if (stat instanceof AST_Switch) { + stat.expression = cons_seq(stat.expression); + } + } + ret.push(stat); + prev = stat instanceof AST_SimpleStatement ? stat : null; + }); + return ret; + }; + + function join_consecutive_vars(statements, compressor) { + var prev = null; + return statements.reduce(function(a, stat){ + if (stat instanceof AST_Definitions && prev && prev.TYPE == stat.TYPE) { + prev.definitions = prev.definitions.concat(stat.definitions); + CHANGED = true; + } + else if (stat instanceof AST_For + && prev instanceof AST_Definitions + && (!stat.init || stat.init.TYPE == prev.TYPE)) { + CHANGED = true; + a.pop(); + if (stat.init) { + stat.init.definitions = prev.definitions.concat(stat.init.definitions); + } else { + stat.init = prev; + } + a.push(stat); + prev = stat; + } + else { + prev = stat; + a.push(stat); + } + return a; + }, []); + }; + + }; + + function extract_declarations_from_unreachable_code(compressor, stat, target) { + compressor.warn("Dropping unreachable code [{file}:{line},{col}]", stat.start); + stat.walk(new TreeWalker(function(node){ + if (node instanceof AST_Definitions) { + compressor.warn("Declarations in unreachable code! [{file}:{line},{col}]", node.start); + node.remove_initializers(); + target.push(node); + return true; + } + if (node instanceof AST_Defun) { + target.push(node); + return true; + } + if (node instanceof AST_Scope) { + return true; + } + })); + }; + + /* -----[ boolean/negation helpers ]----- */ + + // methods to determine whether an expression has a boolean result type + (function (def){ + var unary_bool = [ "!", "delete" ]; + var binary_bool = [ "in", "instanceof", "==", "!=", "===", "!==", "<", "<=", ">=", ">" ]; + def(AST_Node, function(){ return false }); + def(AST_UnaryPrefix, function(){ + return member(this.operator, unary_bool); + }); + def(AST_Binary, function(){ + return member(this.operator, binary_bool) || + ( (this.operator == "&&" || this.operator == "||") && + this.left.is_boolean() && this.right.is_boolean() ); + }); + def(AST_Conditional, function(){ + return this.consequent.is_boolean() && this.alternative.is_boolean(); + }); + def(AST_Assign, function(){ + return this.operator == "=" && this.right.is_boolean(); + }); + def(AST_Seq, function(){ + return this.cdr.is_boolean(); + }); + def(AST_True, function(){ return true }); + def(AST_False, function(){ return true }); + })(function(node, func){ + node.DEFMETHOD("is_boolean", func); + }); + + // methods to determine if an expression has a string result type + (function (def){ + def(AST_Node, function(){ return false }); + def(AST_String, function(){ return true }); + def(AST_UnaryPrefix, function(){ + return this.operator == "typeof"; + }); + def(AST_Binary, function(compressor){ + return this.operator == "+" && + (this.left.is_string(compressor) || this.right.is_string(compressor)); + }); + def(AST_Assign, function(compressor){ + return (this.operator == "=" || this.operator == "+=") && this.right.is_string(compressor); + }); + def(AST_Seq, function(compressor){ + return this.cdr.is_string(compressor); + }); + def(AST_Conditional, function(compressor){ + return this.consequent.is_string(compressor) && this.alternative.is_string(compressor); + }); + def(AST_Call, function(compressor){ + return compressor.option("unsafe") + && this.expression instanceof AST_SymbolRef + && this.expression.name == "String" + && this.expression.undeclared(); + }); + })(function(node, func){ + node.DEFMETHOD("is_string", func); + }); + + function best_of(ast1, ast2) { + return ast1.print_to_string().length > + ast2.print_to_string().length + ? ast2 : ast1; + }; + + // methods to evaluate a constant expression + (function (def){ + // The evaluate method returns an array with one or two + // elements. If the node has been successfully reduced to a + // constant, then the second element tells us the value; + // otherwise the second element is missing. The first element + // of the array is always an AST_Node descendant; when + // evaluation was successful it's a node that represents the + // constant; otherwise it's the original node. + AST_Node.DEFMETHOD("evaluate", function(compressor){ + if (!compressor.option("evaluate")) return [ this ]; + try { + var val = this._eval(), ast = make_node_from_constant(compressor, val, this); + return [ best_of(ast, this), val ]; + } catch(ex) { + if (ex !== def) throw ex; + return [ this ]; + } + }); + def(AST_Statement, function(){ + throw new Error(string_template("Cannot evaluate a statement [{file}:{line},{col}]", this.start)); + }); + def(AST_Function, function(){ + // XXX: AST_Function inherits from AST_Scope, which itself + // inherits from AST_Statement; however, an AST_Function + // isn't really a statement. This could byte in other + // places too. :-( Wish JS had multiple inheritance. + return [ this ]; + }); + function ev(node) { + return node._eval(); + }; + def(AST_Node, function(){ + throw def; // not constant + }); + def(AST_Constant, function(){ + return this.getValue(); + }); + def(AST_UnaryPrefix, function(){ + var e = this.expression; + switch (this.operator) { + case "!": return !ev(e); + case "typeof": return typeof ev(e); + case "void": return void ev(e); + case "~": return ~ev(e); + case "-": + e = ev(e); + if (e === 0) throw def; + return -e; + case "+": return +ev(e); + } + throw def; + }); + def(AST_Binary, function(){ + var left = this.left, right = this.right; + switch (this.operator) { + case "&&" : return ev(left) && ev(right); + case "||" : return ev(left) || ev(right); + case "|" : return ev(left) | ev(right); + case "&" : return ev(left) & ev(right); + case "^" : return ev(left) ^ ev(right); + case "+" : return ev(left) + ev(right); + case "*" : return ev(left) * ev(right); + case "/" : return ev(left) / ev(right); + case "%" : return ev(left) % ev(right); + case "-" : return ev(left) - ev(right); + case "<<" : return ev(left) << ev(right); + case ">>" : return ev(left) >> ev(right); + case ">>>" : return ev(left) >>> ev(right); + case "==" : return ev(left) == ev(right); + case "===" : return ev(left) === ev(right); + case "!=" : return ev(left) != ev(right); + case "!==" : return ev(left) !== ev(right); + case "<" : return ev(left) < ev(right); + case "<=" : return ev(left) <= ev(right); + case ">" : return ev(left) > ev(right); + case ">=" : return ev(left) >= ev(right); + case "in" : return ev(left) in ev(right); + case "instanceof" : return ev(left) instanceof ev(right); + } + throw def; + }); + def(AST_Conditional, function(){ + return ev(this.condition) + ? ev(this.consequent) + : ev(this.alternative); + }); + def(AST_SymbolRef, function(){ + var d = this.definition(); + if (d && d.constant && d.init) return ev(d.init); + throw def; + }); + })(function(node, func){ + node.DEFMETHOD("_eval", func); + }); + + // method to negate an expression + (function(def){ + function basic_negation(exp) { + return make_node(AST_UnaryPrefix, exp, { + operator: "!", + expression: exp + }); + }; + def(AST_Node, function(){ + return basic_negation(this); + }); + def(AST_Statement, function(){ + throw new Error("Cannot negate a statement"); + }); + def(AST_Function, function(){ + return basic_negation(this); + }); + def(AST_UnaryPrefix, function(){ + if (this.operator == "!") + return this.expression; + return basic_negation(this); + }); + def(AST_Seq, function(compressor){ + var self = this.clone(); + self.cdr = self.cdr.negate(compressor); + return self; + }); + def(AST_Conditional, function(compressor){ + var self = this.clone(); + self.consequent = self.consequent.negate(compressor); + self.alternative = self.alternative.negate(compressor); + return best_of(basic_negation(this), self); + }); + def(AST_Binary, function(compressor){ + var self = this.clone(), op = this.operator; + if (compressor.option("unsafe_comps")) { + switch (op) { + case "<=" : self.operator = ">" ; return self; + case "<" : self.operator = ">=" ; return self; + case ">=" : self.operator = "<" ; return self; + case ">" : self.operator = "<=" ; return self; + } + } + switch (op) { + case "==" : self.operator = "!="; return self; + case "!=" : self.operator = "=="; return self; + case "===": self.operator = "!=="; return self; + case "!==": self.operator = "==="; return self; + case "&&": + self.operator = "||"; + self.left = self.left.negate(compressor); + self.right = self.right.negate(compressor); + return best_of(basic_negation(this), self); + case "||": + self.operator = "&&"; + self.left = self.left.negate(compressor); + self.right = self.right.negate(compressor); + return best_of(basic_negation(this), self); + } + return basic_negation(this); + }); + })(function(node, func){ + node.DEFMETHOD("negate", function(compressor){ + return func.call(this, compressor); + }); + }); + + // determine if expression has side effects + (function(def){ + def(AST_Node, function(){ return true }); + + def(AST_EmptyStatement, function(){ return false }); + def(AST_Constant, function(){ return false }); + def(AST_This, function(){ return false }); + + def(AST_Block, function(){ + for (var i = this.body.length; --i >= 0;) { + if (this.body[i].has_side_effects()) + return true; + } + return false; + }); + + def(AST_SimpleStatement, function(){ + return this.body.has_side_effects(); + }); + def(AST_Defun, function(){ return true }); + def(AST_Function, function(){ return false }); + def(AST_Binary, function(){ + return this.left.has_side_effects() + || this.right.has_side_effects(); + }); + def(AST_Assign, function(){ return true }); + def(AST_Conditional, function(){ + return this.condition.has_side_effects() + || this.consequent.has_side_effects() + || this.alternative.has_side_effects(); + }); + def(AST_Unary, function(){ + return this.operator == "delete" + || this.operator == "++" + || this.operator == "--" + || this.expression.has_side_effects(); + }); + def(AST_SymbolRef, function(){ return false }); + def(AST_Object, function(){ + for (var i = this.properties.length; --i >= 0;) + if (this.properties[i].has_side_effects()) + return true; + return false; + }); + def(AST_ObjectProperty, function(){ + return this.value.has_side_effects(); + }); + def(AST_Array, function(){ + for (var i = this.elements.length; --i >= 0;) + if (this.elements[i].has_side_effects()) + return true; + return false; + }); + // def(AST_Dot, function(){ + // return this.expression.has_side_effects(); + // }); + // def(AST_Sub, function(){ + // return this.expression.has_side_effects() + // || this.property.has_side_effects(); + // }); + def(AST_PropAccess, function(){ + return true; + }); + def(AST_Seq, function(){ + return this.car.has_side_effects() + || this.cdr.has_side_effects(); + }); + })(function(node, func){ + node.DEFMETHOD("has_side_effects", func); + }); + + // tell me if a statement aborts + function aborts(thing) { + return thing && thing.aborts(); + }; + (function(def){ + def(AST_Statement, function(){ return null }); + def(AST_Jump, function(){ return this }); + function block_aborts(){ + var n = this.body.length; + return n > 0 && aborts(this.body[n - 1]); + }; + def(AST_BlockStatement, block_aborts); + def(AST_SwitchBranch, block_aborts); + def(AST_If, function(){ + return this.alternative && aborts(this.body) && aborts(this.alternative); + }); + })(function(node, func){ + node.DEFMETHOD("aborts", func); + }); + + /* -----[ optimizers ]----- */ + + OPT(AST_Directive, function(self, compressor){ + if (self.scope.has_directive(self.value) !== self.scope) { + return make_node(AST_EmptyStatement, self); + } + return self; + }); + + OPT(AST_Debugger, function(self, compressor){ + if (compressor.option("drop_debugger")) + return make_node(AST_EmptyStatement, self); + return self; + }); + + OPT(AST_LabeledStatement, function(self, compressor){ + if (self.body instanceof AST_Break + && compressor.loopcontrol_target(self.body.label) === self.body) { + return make_node(AST_EmptyStatement, self); + } + return self.label.references.length == 0 ? self.body : self; + }); + + OPT(AST_Block, function(self, compressor){ + self.body = tighten_body(self.body, compressor); + return self; + }); + + OPT(AST_BlockStatement, function(self, compressor){ + self.body = tighten_body(self.body, compressor); + switch (self.body.length) { + case 1: return self.body[0]; + case 0: return make_node(AST_EmptyStatement, self); + } + return self; + }); + + AST_Scope.DEFMETHOD("drop_unused", function(compressor){ + var self = this; + if (compressor.option("unused") + && !(self instanceof AST_Toplevel) + && !self.uses_eval + ) { + var in_use = []; + var initializations = new Dictionary(); + // pass 1: find out which symbols are directly used in + // this scope (not in nested scopes). + var scope = this; + var tw = new TreeWalker(function(node, descend){ + if (node !== self) { + if (node instanceof AST_Defun) { + initializations.add(node.name.name, node); + return true; // don't go in nested scopes + } + if (node instanceof AST_Definitions && scope === self) { + node.definitions.forEach(function(def){ + if (def.value) { + initializations.add(def.name.name, def.value); + if (def.value.has_side_effects()) { + def.value.walk(tw); + } + } + }); + return true; + } + if (node instanceof AST_SymbolRef) { + push_uniq(in_use, node.definition()); + return true; + } + if (node instanceof AST_Scope) { + var save_scope = scope; + scope = node; + descend(); + scope = save_scope; + return true; + } + } + }); + self.walk(tw); + // pass 2: for every used symbol we need to walk its + // initialization code to figure out if it uses other + // symbols (that may not be in_use). + for (var i = 0; i < in_use.length; ++i) { + in_use[i].orig.forEach(function(decl){ + // undeclared globals will be instanceof AST_SymbolRef + var init = initializations.get(decl.name); + if (init) init.forEach(function(init){ + var tw = new TreeWalker(function(node){ + if (node instanceof AST_SymbolRef) { + push_uniq(in_use, node.definition()); + } + }); + init.walk(tw); + }); + }); + } + // pass 3: we should drop declarations not in_use + var tt = new TreeTransformer( + function before(node, descend, in_list) { + if (node instanceof AST_Lambda) { + for (var a = node.argnames, i = a.length; --i >= 0;) { + var sym = a[i]; + if (sym.unreferenced()) { + a.pop(); + compressor.warn("Dropping unused function argument {name} [{file}:{line},{col}]", { + name : sym.name, + file : sym.start.file, + line : sym.start.line, + col : sym.start.col + }); + } + else break; + } + } + if (node instanceof AST_Defun && node !== self) { + if (!member(node.name.definition(), in_use)) { + compressor.warn("Dropping unused function {name} [{file}:{line},{col}]", { + name : node.name.name, + file : node.name.start.file, + line : node.name.start.line, + col : node.name.start.col + }); + return make_node(AST_EmptyStatement, node); + } + return node; + } + if (node instanceof AST_Definitions && !(tt.parent() instanceof AST_ForIn)) { + var def = node.definitions.filter(function(def){ + if (member(def.name.definition(), in_use)) return true; + var w = { + name : def.name.name, + file : def.name.start.file, + line : def.name.start.line, + col : def.name.start.col + }; + if (def.value && def.value.has_side_effects()) { + def._unused_side_effects = true; + compressor.warn("Side effects in initialization of unused variable {name} [{file}:{line},{col}]", w); + return true; + } + compressor.warn("Dropping unused variable {name} [{file}:{line},{col}]", w); + return false; + }); + // place uninitialized names at the start + def = mergeSort(def, function(a, b){ + if (!a.value && b.value) return -1; + if (!b.value && a.value) return 1; + return 0; + }); + // for unused names whose initialization has + // side effects, we can cascade the init. code + // into the next one, or next statement. + var side_effects = []; + for (var i = 0; i < def.length;) { + var x = def[i]; + if (x._unused_side_effects) { + side_effects.push(x.value); + def.splice(i, 1); + } else { + if (side_effects.length > 0) { + side_effects.push(x.value); + x.value = AST_Seq.from_array(side_effects); + side_effects = []; + } + ++i; + } + } + if (side_effects.length > 0) { + side_effects = make_node(AST_BlockStatement, node, { + body: [ make_node(AST_SimpleStatement, node, { + body: AST_Seq.from_array(side_effects) + }) ] + }); + } else { + side_effects = null; + } + if (def.length == 0 && !side_effects) { + return make_node(AST_EmptyStatement, node); + } + if (def.length == 0) { + return side_effects; + } + node.definitions = def; + if (side_effects) { + side_effects.body.unshift(node); + node = side_effects; + } + return node; + } + if (node instanceof AST_For && node.init instanceof AST_BlockStatement) { + descend(node, this); + // certain combination of unused name + side effect leads to: + // https://github.com/mishoo/UglifyJS2/issues/44 + // that's an invalid AST. + // We fix it at this stage by moving the `var` outside the `for`. + var body = node.init.body.slice(0, -1); + node.init = node.init.body.slice(-1)[0].body; + body.push(node); + return in_list ? MAP.splice(body) : make_node(AST_BlockStatement, node, { + body: body + }); + } + if (node instanceof AST_Scope && node !== self) + return node; + } + ); + self.transform(tt); + } + }); + + AST_Scope.DEFMETHOD("hoist_declarations", function(compressor){ + var hoist_funs = compressor.option("hoist_funs"); + var hoist_vars = compressor.option("hoist_vars"); + var self = this; + if (hoist_funs || hoist_vars) { + var dirs = []; + var hoisted = []; + var vars = new Dictionary(), vars_found = 0, var_decl = 0; + // let's count var_decl first, we seem to waste a lot of + // space if we hoist `var` when there's only one. + self.walk(new TreeWalker(function(node){ + if (node instanceof AST_Scope && node !== self) + return true; + if (node instanceof AST_Var) { + ++var_decl; + return true; + } + })); + hoist_vars = hoist_vars && var_decl > 1; + var tt = new TreeTransformer( + function before(node) { + if (node !== self) { + if (node instanceof AST_Directive) { + dirs.push(node); + return make_node(AST_EmptyStatement, node); + } + if (node instanceof AST_Defun && hoist_funs) { + hoisted.push(node); + return make_node(AST_EmptyStatement, node); + } + if (node instanceof AST_Var && hoist_vars) { + node.definitions.forEach(function(def){ + vars.set(def.name.name, def); + ++vars_found; + }); + var seq = node.to_assignments(); + var p = tt.parent(); + if (p instanceof AST_ForIn && p.init === node) { + if (seq == null) return node.definitions[0].name; + return seq; + } + if (p instanceof AST_For && p.init === node) { + return seq; + } + if (!seq) return make_node(AST_EmptyStatement, node); + return make_node(AST_SimpleStatement, node, { + body: seq + }); + } + if (node instanceof AST_Scope) + return node; // to avoid descending in nested scopes + } + } + ); + self = self.transform(tt); + if (vars_found > 0) { + // collect only vars which don't show up in self's arguments list + var defs = []; + vars.each(function(def, name){ + if (self instanceof AST_Lambda + && find_if(function(x){ return x.name == def.name.name }, + self.argnames)) { + vars.del(name); + } else { + def = def.clone(); + def.value = null; + defs.push(def); + vars.set(name, def); + } + }); + if (defs.length > 0) { + // try to merge in assignments + for (var i = 0; i < self.body.length;) { + if (self.body[i] instanceof AST_SimpleStatement) { + var expr = self.body[i].body, sym, assign; + if (expr instanceof AST_Assign + && expr.operator == "=" + && (sym = expr.left) instanceof AST_Symbol + && vars.has(sym.name)) + { + var def = vars.get(sym.name); + if (def.value) break; + def.value = expr.right; + remove(defs, def); + defs.push(def); + self.body.splice(i, 1); + continue; + } + if (expr instanceof AST_Seq + && (assign = expr.car) instanceof AST_Assign + && assign.operator == "=" + && (sym = assign.left) instanceof AST_Symbol + && vars.has(sym.name)) + { + var def = vars.get(sym.name); + if (def.value) break; + def.value = assign.right; + remove(defs, def); + defs.push(def); + self.body[i].body = expr.cdr; + continue; + } + } + if (self.body[i] instanceof AST_EmptyStatement) { + self.body.splice(i, 1); + continue; + } + if (self.body[i] instanceof AST_BlockStatement) { + var tmp = [ i, 1 ].concat(self.body[i].body); + self.body.splice.apply(self.body, tmp); + continue; + } + break; + } + defs = make_node(AST_Var, self, { + definitions: defs + }); + hoisted.push(defs); + }; + } + self.body = dirs.concat(hoisted, self.body); + } + return self; + }); + + OPT(AST_SimpleStatement, function(self, compressor){ + if (compressor.option("side_effects")) { + if (!self.body.has_side_effects()) { + compressor.warn("Dropping side-effect-free statement [{file}:{line},{col}]", self.start); + return make_node(AST_EmptyStatement, self); + } + } + return self; + }); + + OPT(AST_DWLoop, function(self, compressor){ + var cond = self.condition.evaluate(compressor); + self.condition = cond[0]; + if (!compressor.option("loops")) return self; + if (cond.length > 1) { + if (cond[1]) { + return make_node(AST_For, self, { + body: self.body + }); + } else if (self instanceof AST_While) { + if (compressor.option("dead_code")) { + var a = []; + extract_declarations_from_unreachable_code(compressor, self.body, a); + return make_node(AST_BlockStatement, self, { body: a }); + } + } else { + return self.body; + } + } + return self; + }); + + function if_break_in_loop(self, compressor) { + function drop_it(rest) { + rest = as_statement_array(rest); + if (self.body instanceof AST_BlockStatement) { + self.body = self.body.clone(); + self.body.body = rest.concat(self.body.body.slice(1)); + self.body = self.body.transform(compressor); + } else { + self.body = make_node(AST_BlockStatement, self.body, { + body: rest + }).transform(compressor); + } + if_break_in_loop(self, compressor); + } + var first = self.body instanceof AST_BlockStatement ? self.body.body[0] : self.body; + if (first instanceof AST_If) { + if (first.body instanceof AST_Break + && compressor.loopcontrol_target(first.body.label) === self) { + if (self.condition) { + self.condition = make_node(AST_Binary, self.condition, { + left: self.condition, + operator: "&&", + right: first.condition.negate(compressor), + }); + } else { + self.condition = first.condition.negate(compressor); + } + drop_it(first.alternative); + } + else if (first.alternative instanceof AST_Break + && compressor.loopcontrol_target(first.alternative.label) === self) { + if (self.condition) { + self.condition = make_node(AST_Binary, self.condition, { + left: self.condition, + operator: "&&", + right: first.condition, + }); + } else { + self.condition = first.condition; + } + drop_it(first.body); + } + } + }; + + OPT(AST_While, function(self, compressor) { + if (!compressor.option("loops")) return self; + self = AST_DWLoop.prototype.optimize.call(self, compressor); + if (self instanceof AST_While) { + if_break_in_loop(self, compressor); + self = make_node(AST_For, self, self).transform(compressor); + } + return self; + }); + + OPT(AST_For, function(self, compressor){ + var cond = self.condition; + if (cond) { + cond = cond.evaluate(compressor); + self.condition = cond[0]; + } + if (!compressor.option("loops")) return self; + if (cond) { + if (cond.length > 1 && !cond[1]) { + if (compressor.option("dead_code")) { + var a = []; + if (self.init instanceof AST_Statement) { + a.push(self.init); + } + else if (self.init) { + a.push(make_node(AST_SimpleStatement, self.init, { + body: self.init + })); + } + extract_declarations_from_unreachable_code(compressor, self.body, a); + return make_node(AST_BlockStatement, self, { body: a }); + } + } + } + if_break_in_loop(self, compressor); + return self; + }); + + OPT(AST_If, function(self, compressor){ + if (!compressor.option("conditionals")) return self; + // if condition can be statically determined, warn and drop + // one of the blocks. note, statically determined implies + // “has no side effects”; also it doesn't work for cases like + // `x && true`, though it probably should. + var cond = self.condition.evaluate(compressor); + self.condition = cond[0]; + if (cond.length > 1) { + if (cond[1]) { + compressor.warn("Condition always true [{file}:{line},{col}]", self.condition.start); + if (compressor.option("dead_code")) { + var a = []; + if (self.alternative) { + extract_declarations_from_unreachable_code(compressor, self.alternative, a); + } + a.push(self.body); + return make_node(AST_BlockStatement, self, { body: a }).transform(compressor); + } + } else { + compressor.warn("Condition always false [{file}:{line},{col}]", self.condition.start); + if (compressor.option("dead_code")) { + var a = []; + extract_declarations_from_unreachable_code(compressor, self.body, a); + if (self.alternative) a.push(self.alternative); + return make_node(AST_BlockStatement, self, { body: a }).transform(compressor); + } + } + } + if (is_empty(self.alternative)) self.alternative = null; + var negated = self.condition.negate(compressor); + var negated_is_best = best_of(self.condition, negated) === negated; + if (self.alternative && negated_is_best) { + negated_is_best = false; // because we already do the switch here. + self.condition = negated; + var tmp = self.body; + self.body = self.alternative || make_node(AST_EmptyStatement); + self.alternative = tmp; + } + if (is_empty(self.body) && is_empty(self.alternative)) { + return make_node(AST_SimpleStatement, self.condition, { + body: self.condition + }).transform(compressor); + } + if (self.body instanceof AST_SimpleStatement + && self.alternative instanceof AST_SimpleStatement) { + return make_node(AST_SimpleStatement, self, { + body: make_node(AST_Conditional, self, { + condition : self.condition, + consequent : self.body.body, + alternative : self.alternative.body + }) + }).transform(compressor); + } + if (is_empty(self.alternative) && self.body instanceof AST_SimpleStatement) { + if (negated_is_best) return make_node(AST_SimpleStatement, self, { + body: make_node(AST_Binary, self, { + operator : "||", + left : negated, + right : self.body.body + }) + }).transform(compressor); + return make_node(AST_SimpleStatement, self, { + body: make_node(AST_Binary, self, { + operator : "&&", + left : self.condition, + right : self.body.body + }) + }).transform(compressor); + } + if (self.body instanceof AST_EmptyStatement + && self.alternative + && self.alternative instanceof AST_SimpleStatement) { + return make_node(AST_SimpleStatement, self, { + body: make_node(AST_Binary, self, { + operator : "||", + left : self.condition, + right : self.alternative.body + }) + }).transform(compressor); + } + if (self.body instanceof AST_Exit + && self.alternative instanceof AST_Exit + && self.body.TYPE == self.alternative.TYPE) { + return make_node(self.body.CTOR, self, { + value: make_node(AST_Conditional, self, { + condition : self.condition, + consequent : self.body.value || make_node(AST_Undefined, self.body).optimize(compressor), + alternative : self.alternative.value || make_node(AST_Undefined, self.alternative).optimize(compressor) + }) + }).transform(compressor); + } + if (self.body instanceof AST_If + && !self.body.alternative + && !self.alternative) { + self.condition = make_node(AST_Binary, self.condition, { + operator: "&&", + left: self.condition, + right: self.body.condition + }).transform(compressor); + self.body = self.body.body; + } + if (aborts(self.body)) { + if (self.alternative) { + var alt = self.alternative; + self.alternative = null; + return make_node(AST_BlockStatement, self, { + body: [ self, alt ] + }).transform(compressor); + } + } + if (aborts(self.alternative)) { + var body = self.body; + self.body = self.alternative; + self.condition = negated_is_best ? negated : self.condition.negate(compressor); + self.alternative = null; + return make_node(AST_BlockStatement, self, { + body: [ self, body ] + }).transform(compressor); + } + return self; + }); + + OPT(AST_Switch, function(self, compressor){ + if (self.body.length == 0 && compressor.option("conditionals")) { + return make_node(AST_SimpleStatement, self, { + body: self.expression + }).transform(compressor); + } + var last_branch = self.body[self.body.length - 1]; + if (last_branch) { + var stat = last_branch.body[last_branch.body.length - 1]; // last statement + if (stat instanceof AST_Break && loop_body(compressor.loopcontrol_target(stat.label)) === self) + last_branch.body.pop(); + } + var exp = self.expression.evaluate(compressor); + out: if (exp.length == 2) try { + // constant expression + self.expression = exp[0]; + if (!compressor.option("dead_code")) break out; + var value = exp[1]; + var in_if = false; + var in_block = false; + var started = false; + var stopped = false; + var ruined = false; + var tt = new TreeTransformer(function(node, descend, in_list){ + if (node instanceof AST_Lambda || node instanceof AST_SimpleStatement) { + // no need to descend these node types + return node; + } + else if (node instanceof AST_Switch && node === self) { + node = node.clone(); + descend(node, this); + return ruined ? node : make_node(AST_BlockStatement, node, { + body: node.body.reduce(function(a, branch){ + return a.concat(branch.body); + }, []) + }).transform(compressor); + } + else if (node instanceof AST_If || node instanceof AST_Try) { + var save = in_if; + in_if = !in_block; + descend(node, this); + in_if = save; + return node; + } + else if (node instanceof AST_StatementWithBody || node instanceof AST_Switch) { + var save = in_block; + in_block = true; + descend(node, this); + in_block = save; + return node; + } + else if (node instanceof AST_Break && this.loopcontrol_target(node.label) === self) { + if (in_if) { + ruined = true; + return node; + } + if (in_block) return node; + stopped = true; + return in_list ? MAP.skip : make_node(AST_EmptyStatement, node); + } + else if (node instanceof AST_SwitchBranch && this.parent() === self) { + if (stopped) return MAP.skip; + if (node instanceof AST_Case) { + var exp = node.expression.evaluate(compressor); + if (exp.length < 2) { + // got a case with non-constant expression, baling out + throw self; + } + if (exp[1] === value || started) { + started = true; + if (aborts(node)) stopped = true; + descend(node, this); + return node; + } + return MAP.skip; + } + descend(node, this); + return node; + } + }); + tt.stack = compressor.stack.slice(); // so that's able to see parent nodes + self = self.transform(tt); + } catch(ex) { + if (ex !== self) throw ex; + } + return self; + }); + + OPT(AST_Case, function(self, compressor){ + self.body = tighten_body(self.body, compressor); + return self; + }); + + OPT(AST_Try, function(self, compressor){ + self.body = tighten_body(self.body, compressor); + return self; + }); + + AST_Definitions.DEFMETHOD("remove_initializers", function(){ + this.definitions.forEach(function(def){ def.value = null }); + }); + + AST_Definitions.DEFMETHOD("to_assignments", function(){ + var assignments = this.definitions.reduce(function(a, def){ + if (def.value) { + var name = make_node(AST_SymbolRef, def.name, def.name); + a.push(make_node(AST_Assign, def, { + operator : "=", + left : name, + right : def.value + })); + } + return a; + }, []); + if (assignments.length == 0) return null; + return AST_Seq.from_array(assignments); + }); + + OPT(AST_Definitions, function(self, compressor){ + if (self.definitions.length == 0) + return make_node(AST_EmptyStatement, self); + return self; + }); + + OPT(AST_Function, function(self, compressor){ + self = AST_Lambda.prototype.optimize.call(self, compressor); + if (compressor.option("unused")) { + if (self.name && self.name.unreferenced()) { + self.name = null; + } + } + return self; + }); + + OPT(AST_Call, function(self, compressor){ + if (compressor.option("unsafe")) { + var exp = self.expression; + if (exp instanceof AST_SymbolRef && exp.undeclared()) { + switch (exp.name) { + case "Array": + if (self.args.length != 1) { + return make_node(AST_Array, self, { + elements: self.args + }); + } + break; + case "Object": + if (self.args.length == 0) { + return make_node(AST_Object, self, { + properties: [] + }); + } + break; + case "String": + if (self.args.length == 0) return make_node(AST_String, self, { + value: "" + }); + return make_node(AST_Binary, self, { + left: self.args[0], + operator: "+", + right: make_node(AST_String, self, { value: "" }) + }); + } + } + else if (exp instanceof AST_Dot && exp.property == "toString" && self.args.length == 0) { + return make_node(AST_Binary, self, { + left: make_node(AST_String, self, { value: "" }), + operator: "+", + right: exp.expression + }).transform(compressor); + } + } + if (compressor.option("side_effects")) { + if (self.expression instanceof AST_Function + && self.args.length == 0 + && !AST_Block.prototype.has_side_effects.call(self.expression)) { + return make_node(AST_Undefined, self).transform(compressor); + } + } + return self; + }); + + OPT(AST_New, function(self, compressor){ + if (compressor.option("unsafe")) { + var exp = self.expression; + if (exp instanceof AST_SymbolRef && exp.undeclared()) { + switch (exp.name) { + case "Object": + case "RegExp": + case "Function": + case "Error": + case "Array": + return make_node(AST_Call, self, self).transform(compressor); + } + } + } + return self; + }); + + OPT(AST_Seq, function(self, compressor){ + if (!compressor.option("side_effects")) + return self; + if (!self.car.has_side_effects()) { + // we shouldn't compress (1,eval)(something) to + // eval(something) because that changes the meaning of + // eval (becomes lexical instead of global). + var p; + if (!(self.cdr instanceof AST_SymbolRef + && self.cdr.name == "eval" + && self.cdr.undeclared() + && (p = compressor.parent()) instanceof AST_Call + && p.expression === self)) { + return self.cdr; + } + } + if (compressor.option("cascade")) { + if (self.car instanceof AST_Assign + && !self.car.left.has_side_effects() + && self.car.left.equivalent_to(self.cdr)) { + return self.car; + } + if (!self.car.has_side_effects() + && !self.cdr.has_side_effects() + && self.car.equivalent_to(self.cdr)) { + return self.car; + } + } + return self; + }); + + AST_Unary.DEFMETHOD("lift_sequences", function(compressor){ + if (compressor.option("sequences")) { + if (this.expression instanceof AST_Seq) { + var seq = this.expression; + var x = seq.to_array(); + this.expression = x.pop(); + x.push(this); + seq = AST_Seq.from_array(x).transform(compressor); + return seq; + } + } + return this; + }); + + OPT(AST_UnaryPostfix, function(self, compressor){ + return self.lift_sequences(compressor); + }); + + OPT(AST_UnaryPrefix, function(self, compressor){ + self = self.lift_sequences(compressor); + var e = self.expression; + if (compressor.option("booleans") && compressor.in_boolean_context()) { + switch (self.operator) { + case "!": + if (e instanceof AST_UnaryPrefix && e.operator == "!") { + // !!foo ==> foo, if we're in boolean context + return e.expression; + } + break; + case "typeof": + // typeof always returns a non-empty string, thus it's + // always true in booleans + compressor.warn("Boolean expression always true [{file}:{line},{col}]", self.start); + return make_node(AST_True, self); + } + if (e instanceof AST_Binary && self.operator == "!") { + self = best_of(self, e.negate(compressor)); + } + } + return self.evaluate(compressor)[0]; + }); + + AST_Binary.DEFMETHOD("lift_sequences", function(compressor){ + if (compressor.option("sequences")) { + if (this.left instanceof AST_Seq) { + var seq = this.left; + var x = seq.to_array(); + this.left = x.pop(); + x.push(this); + seq = AST_Seq.from_array(x).transform(compressor); + return seq; + } + if (this.right instanceof AST_Seq + && !(this.operator == "||" || this.operator == "&&") + && !this.left.has_side_effects()) { + var seq = this.right; + var x = seq.to_array(); + this.right = x.pop(); + x.push(this); + seq = AST_Seq.from_array(x).transform(compressor); + return seq; + } + } + return this; + }); + + var commutativeOperators = makePredicate("== === != !== * & | ^"); + + OPT(AST_Binary, function(self, compressor){ + function reverse(op) { + if (!(self.left.has_side_effects() && self.right.has_side_effects())) { + if (op) self.operator = op; + var tmp = self.left; + self.left = self.right; + self.right = tmp; + } + }; + if (commutativeOperators(self.operator)) { + if (self.right instanceof AST_Constant + && !(self.left instanceof AST_Constant)) { + reverse(); + } + } + self = self.lift_sequences(compressor); + if (compressor.option("comparisons")) switch (self.operator) { + case "===": + case "!==": + if ((self.left.is_string(compressor) && self.right.is_string(compressor)) || + (self.left.is_boolean() && self.right.is_boolean())) { + self.operator = self.operator.substr(0, 2); + } + // XXX: intentionally falling down to the next case + case "==": + case "!=": + if (self.left instanceof AST_String + && self.left.value == "undefined" + && self.right instanceof AST_UnaryPrefix + && self.right.operator == "typeof" + && compressor.option("unsafe")) { + if (!(self.right.expression instanceof AST_SymbolRef) + || !self.right.expression.undeclared()) { + self.left = self.right.expression; + self.right = make_node(AST_Undefined, self.left).optimize(compressor); + if (self.operator.length == 2) self.operator += "="; + } + } + break; + } + if (compressor.option("booleans") && compressor.in_boolean_context()) switch (self.operator) { + case "&&": + var ll = self.left.evaluate(compressor); + var rr = self.right.evaluate(compressor); + if ((ll.length > 1 && !ll[1]) || (rr.length > 1 && !rr[1])) { + compressor.warn("Boolean && always false [{file}:{line},{col}]", self.start); + return make_node(AST_False, self); + } + if (ll.length > 1 && ll[1]) { + return rr[0]; + } + if (rr.length > 1 && rr[1]) { + return ll[0]; + } + break; + case "||": + var ll = self.left.evaluate(compressor); + var rr = self.right.evaluate(compressor); + if ((ll.length > 1 && ll[1]) || (rr.length > 1 && rr[1])) { + compressor.warn("Boolean || always true [{file}:{line},{col}]", self.start); + return make_node(AST_True, self); + } + if (ll.length > 1 && !ll[1]) { + return rr[0]; + } + if (rr.length > 1 && !rr[1]) { + return ll[0]; + } + break; + case "+": + var ll = self.left.evaluate(compressor); + var rr = self.right.evaluate(compressor); + if ((ll.length > 1 && ll[0] instanceof AST_String && ll[1]) || + (rr.length > 1 && rr[0] instanceof AST_String && rr[1])) { + compressor.warn("+ in boolean context always true [{file}:{line},{col}]", self.start); + return make_node(AST_True, self); + } + break; + } + var exp = self.evaluate(compressor); + if (exp.length > 1) { + if (best_of(exp[0], self) !== self) + return exp[0]; + } + if (compressor.option("comparisons")) { + if (!(compressor.parent() instanceof AST_Binary) + || compressor.parent() instanceof AST_Assign) { + var negated = make_node(AST_UnaryPrefix, self, { + operator: "!", + expression: self.negate(compressor) + }); + self = best_of(self, negated); + } + switch (self.operator) { + case "<": reverse(">"); break; + case "<=": reverse(">="); break; + } + } + if (self.operator == "+" && self.right instanceof AST_String + && self.right.getValue() === "" && self.left instanceof AST_Binary + && self.left.operator == "+" && self.left.is_string(compressor)) { + return self.left; + } + return self; + }); + + OPT(AST_SymbolRef, function(self, compressor){ + if (self.undeclared()) { + var defines = compressor.option("global_defs"); + if (defines && defines.hasOwnProperty(self.name)) { + return make_node_from_constant(compressor, defines[self.name], self); + } + switch (self.name) { + case "undefined": + return make_node(AST_Undefined, self); + case "NaN": + return make_node(AST_NaN, self); + case "Infinity": + return make_node(AST_Infinity, self); + } + } + return self; + }); + + OPT(AST_Undefined, function(self, compressor){ + if (compressor.option("unsafe")) { + var scope = compressor.find_parent(AST_Scope); + var undef = scope.find_variable("undefined"); + if (undef) { + var ref = make_node(AST_SymbolRef, self, { + name : "undefined", + scope : scope, + thedef : undef + }); + ref.reference(); + return ref; + } + } + return self; + }); + + var ASSIGN_OPS = [ '+', '-', '/', '*', '%', '>>', '<<', '>>>', '|', '^', '&' ]; + OPT(AST_Assign, function(self, compressor){ + self = self.lift_sequences(compressor); + if (self.operator == "=" + && self.left instanceof AST_SymbolRef + && self.right instanceof AST_Binary + && self.right.left instanceof AST_SymbolRef + && self.right.left.name == self.left.name + && member(self.right.operator, ASSIGN_OPS)) { + self.operator = self.right.operator + "="; + self.right = self.right.right; + } + return self; + }); + + OPT(AST_Conditional, function(self, compressor){ + if (!compressor.option("conditionals")) return self; + if (self.condition instanceof AST_Seq) { + var car = self.condition.car; + self.condition = self.condition.cdr; + return AST_Seq.cons(car, self); + } + var cond = self.condition.evaluate(compressor); + if (cond.length > 1) { + if (cond[1]) { + compressor.warn("Condition always true [{file}:{line},{col}]", self.start); + return self.consequent; + } else { + compressor.warn("Condition always false [{file}:{line},{col}]", self.start); + return self.alternative; + } + } + var negated = cond[0].negate(compressor); + if (best_of(cond[0], negated) === negated) { + self = make_node(AST_Conditional, self, { + condition: negated, + consequent: self.alternative, + alternative: self.consequent + }); + } + var consequent = self.consequent; + var alternative = self.alternative; + if (consequent instanceof AST_Assign + && alternative instanceof AST_Assign + && consequent.operator == alternative.operator + && consequent.left.equivalent_to(alternative.left) + ) { + /* + * Stuff like this: + * if (foo) exp = something; else exp = something_else; + * ==> + * exp = foo ? something : something_else; + */ + self = make_node(AST_Assign, self, { + operator: consequent.operator, + left: consequent.left, + right: make_node(AST_Conditional, self, { + condition: self.condition, + consequent: consequent.right, + alternative: alternative.right + }) + }); + } + return self; + }); + + OPT(AST_Boolean, function(self, compressor){ + if (compressor.option("booleans")) { + var p = compressor.parent(); + if (p instanceof AST_Binary && (p.operator == "==" + || p.operator == "!=")) { + compressor.warn("Non-strict equality against boolean: {operator} {value} [{file}:{line},{col}]", { + operator : p.operator, + value : self.value, + file : p.start.file, + line : p.start.line, + col : p.start.col, + }); + return make_node(AST_Number, self, { + value: +self.value + }); + } + return make_node(AST_UnaryPrefix, self, { + operator: "!", + expression: make_node(AST_Number, self, { + value: 1 - self.value + }) + }); + } + return self; + }); + + OPT(AST_Sub, function(self, compressor){ + var prop = self.property; + if (prop instanceof AST_String && compressor.option("properties")) { + prop = prop.getValue(); + if (is_identifier(prop)) { + return make_node(AST_Dot, self, { + expression : self.expression, + property : prop + }); + } + } + return self; + }); + + function literals_in_boolean_context(self, compressor) { + if (compressor.option("booleans") && compressor.in_boolean_context()) { + return make_node(AST_True, self); + } + return self; + }; + OPT(AST_Array, literals_in_boolean_context); + OPT(AST_Object, literals_in_boolean_context); + OPT(AST_RegExp, literals_in_boolean_context); + +})(); diff --git a/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/lib/mozilla-ast.js b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/lib/mozilla-ast.js new file mode 100644 index 00000000..982d621a --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/lib/mozilla-ast.js @@ -0,0 +1,265 @@ +/*********************************************************************** + + A JavaScript tokenizer / parser / beautifier / compressor. + https://github.com/mishoo/UglifyJS2 + + -------------------------------- (C) --------------------------------- + + Author: Mihai Bazon + + http://mihai.bazon.net/blog + + Distributed under the BSD license: + + Copyright 2012 (c) Mihai Bazon + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above + copyright notice, this list of conditions and the following + disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials + provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + ***********************************************************************/ + +"use strict"; + +(function(){ + + var MOZ_TO_ME = { + TryStatement : function(M) { + return new AST_Try({ + start : my_start_token(M), + end : my_end_token(M), + body : from_moz(M.block).body, + bcatch : from_moz(M.handlers[0]), + bfinally : M.finalizer ? new AST_Finally(from_moz(M.finalizer)) : null + }); + }, + CatchClause : function(M) { + return new AST_Catch({ + start : my_start_token(M), + end : my_end_token(M), + argname : from_moz(M.param), + body : from_moz(M.body).body + }); + }, + ObjectExpression : function(M) { + return new AST_Object({ + start : my_start_token(M), + end : my_end_token(M), + properties : M.properties.map(function(prop){ + var key = prop.key; + var name = key.type == "Identifier" ? key.name : key.value; + var args = { + start : my_start_token(key), + end : my_end_token(prop.value), + key : name, + value : from_moz(prop.value) + }; + switch (prop.kind) { + case "init": + return new AST_ObjectKeyVal(args); + case "set": + args.value.name = from_moz(key); + return new AST_ObjectSetter(args); + case "get": + args.value.name = from_moz(key); + return new AST_ObjectGetter(args); + } + }) + }); + }, + SequenceExpression : function(M) { + return AST_Seq.from_array(M.expressions.map(from_moz)); + }, + MemberExpression : function(M) { + return new (M.computed ? AST_Sub : AST_Dot)({ + start : my_start_token(M), + end : my_end_token(M), + property : M.computed ? from_moz(M.property) : M.property.name, + expression : from_moz(M.object) + }); + }, + SwitchCase : function(M) { + return new (M.test ? AST_Case : AST_Default)({ + start : my_start_token(M), + end : my_end_token(M), + expression : from_moz(M.test), + body : M.consequent.map(from_moz) + }); + }, + Literal : function(M) { + var val = M.value, args = { + start : my_start_token(M), + end : my_end_token(M) + }; + if (val === null) return new AST_Null(args); + switch (typeof val) { + case "string": + args.value = val; + return new AST_String(args); + case "number": + args.value = val; + return new AST_Number(args); + case "boolean": + return new (val ? AST_True : AST_False)(args); + default: + args.value = val; + return new AST_RegExp(args); + } + }, + UnaryExpression: From_Moz_Unary, + UpdateExpression: From_Moz_Unary, + Identifier: function(M) { + var p = FROM_MOZ_STACK[FROM_MOZ_STACK.length - 2]; + return new (M.name == "this" ? AST_This + : p.type == "LabeledStatement" ? AST_Label + : p.type == "VariableDeclarator" && p.id === M ? (p.kind == "const" ? AST_SymbolConst : AST_SymbolVar) + : p.type == "FunctionExpression" ? (p.id === M ? AST_SymbolLambda : AST_SymbolFunarg) + : p.type == "FunctionDeclaration" ? (p.id === M ? AST_SymbolDefun : AST_SymbolFunarg) + : p.type == "CatchClause" ? AST_SymbolCatch + : p.type == "BreakStatement" || p.type == "ContinueStatement" ? AST_LabelRef + : AST_SymbolRef)({ + start : my_start_token(M), + end : my_end_token(M), + name : M.name + }); + } + }; + + function From_Moz_Unary(M) { + return new (M.prefix ? AST_UnaryPrefix : AST_UnaryPostfix)({ + start : my_start_token(M), + end : my_end_token(M), + operator : M.operator, + expression : from_moz(M.argument) + }) + }; + + var ME_TO_MOZ = {}; + + map("Node", AST_Node); + map("Program", AST_Toplevel, "body@body"); + map("Function", AST_Function, "id>name, params@argnames, body%body"); + map("EmptyStatement", AST_EmptyStatement); + map("BlockStatement", AST_BlockStatement, "body@body"); + map("ExpressionStatement", AST_SimpleStatement, "expression>body"); + map("IfStatement", AST_If, "test>condition, consequent>body, alternate>alternative"); + map("LabeledStatement", AST_LabeledStatement, "label>label, body>body"); + map("BreakStatement", AST_Break, "label>label"); + map("ContinueStatement", AST_Continue, "label>label"); + map("WithStatement", AST_With, "object>expression, body>body"); + map("SwitchStatement", AST_Switch, "discriminant>expression, cases@body"); + map("ReturnStatement", AST_Return, "argument>value"); + map("ThrowStatement", AST_Throw, "argument>value"); + map("WhileStatement", AST_While, "test>condition, body>body"); + map("DoWhileStatement", AST_Do, "test>condition, body>body"); + map("ForStatement", AST_For, "init>init, test>condition, update>step, body>body"); + map("ForInStatement", AST_ForIn, "left>init, right>object, body>body"); + map("DebuggerStatement", AST_Debugger); + map("FunctionDeclaration", AST_Defun, "id>name, params@argnames, body%body"); + map("VariableDeclaration", AST_Var, "declarations@definitions"); + map("VariableDeclarator", AST_VarDef, "id>name, init>value"); + + map("ThisExpression", AST_This); + map("ArrayExpression", AST_Array, "elements@elements"); + map("FunctionExpression", AST_Function, "id>name, params@argnames, body%body"); + map("BinaryExpression", AST_Binary, "operator=operator, left>left, right>right"); + map("AssignmentExpression", AST_Assign, "operator=operator, left>left, right>right"); + map("LogicalExpression", AST_Binary, "operator=operator, left>left, right>right"); + map("ConditionalExpression", AST_Conditional, "test>condition, consequent>consequent, alternate>alternative"); + map("NewExpression", AST_New, "callee>expression, arguments@args"); + map("CallExpression", AST_Call, "callee>expression, arguments@args"); + + /* -----[ tools ]----- */ + + function my_start_token(moznode) { + return new AST_Token({ + file : moznode.loc && moznode.loc.source, + line : moznode.loc && moznode.loc.start.line, + col : moznode.loc && moznode.loc.start.column, + pos : moznode.start, + endpos : moznode.start + }); + }; + + function my_end_token(moznode) { + return new AST_Token({ + file : moznode.loc && moznode.loc.source, + line : moznode.loc && moznode.loc.end.line, + col : moznode.loc && moznode.loc.end.column, + pos : moznode.end, + endpos : moznode.end + }); + }; + + function map(moztype, mytype, propmap) { + var moz_to_me = "function From_Moz_" + moztype + "(M){\n"; + moz_to_me += "return new mytype({\n" + + "start: my_start_token(M),\n" + + "end: my_end_token(M)"; + + if (propmap) propmap.split(/\s*,\s*/).forEach(function(prop){ + var m = /([a-z0-9$_]+)(=|@|>|%)([a-z0-9$_]+)/i.exec(prop); + if (!m) throw new Error("Can't understand property map: " + prop); + var moz = "M." + m[1], how = m[2], my = m[3]; + moz_to_me += ",\n" + my + ": "; + if (how == "@") { + moz_to_me += moz + ".map(from_moz)"; + } else if (how == ">") { + moz_to_me += "from_moz(" + moz + ")"; + } else if (how == "=") { + moz_to_me += moz; + } else if (how == "%") { + moz_to_me += "from_moz(" + moz + ").body"; + } else throw new Error("Can't understand operator in propmap: " + prop); + }); + moz_to_me += "\n})}"; + + // moz_to_me = parse(moz_to_me).print_to_string({ beautify: true }); + // console.log(moz_to_me); + + moz_to_me = new Function("mytype", "my_start_token", "my_end_token", "from_moz", "return(" + moz_to_me + ")")( + mytype, my_start_token, my_end_token, from_moz + ); + return MOZ_TO_ME[moztype] = moz_to_me; + }; + + var FROM_MOZ_STACK = null; + + function from_moz(node) { + FROM_MOZ_STACK.push(node); + var ret = node != null ? MOZ_TO_ME[node.type](node) : null; + FROM_MOZ_STACK.pop(); + return ret; + }; + + AST_Node.from_mozilla_ast = function(node){ + var save_stack = FROM_MOZ_STACK; + FROM_MOZ_STACK = []; + var ast = from_moz(node); + FROM_MOZ_STACK = save_stack; + return ast; + }; + +})(); diff --git a/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/lib/output.js b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/lib/output.js new file mode 100644 index 00000000..42b3aad9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/lib/output.js @@ -0,0 +1,1220 @@ +/*********************************************************************** + + A JavaScript tokenizer / parser / beautifier / compressor. + https://github.com/mishoo/UglifyJS2 + + -------------------------------- (C) --------------------------------- + + Author: Mihai Bazon + + http://mihai.bazon.net/blog + + Distributed under the BSD license: + + Copyright 2012 (c) Mihai Bazon + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above + copyright notice, this list of conditions and the following + disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials + provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + ***********************************************************************/ + +"use strict"; + +function OutputStream(options) { + + options = defaults(options, { + indent_start : 0, + indent_level : 4, + quote_keys : false, + space_colon : true, + ascii_only : false, + inline_script : false, + width : 80, + max_line_len : 32000, + ie_proof : true, + beautify : false, + source_map : null, + bracketize : false, + semicolons : true, + comments : false, + preserve_line : false + }, true); + + var indentation = 0; + var current_col = 0; + var current_line = 1; + var current_pos = 0; + var OUTPUT = ""; + + function to_ascii(str) { + return str.replace(/[\u0080-\uffff]/g, function(ch) { + var code = ch.charCodeAt(0).toString(16); + while (code.length < 4) code = "0" + code; + return "\\u" + code; + }); + }; + + function make_string(str) { + var dq = 0, sq = 0; + str = str.replace(/[\\\b\f\n\r\t\x22\x27\u2028\u2029\0]/g, function(s){ + switch (s) { + case "\\": return "\\\\"; + case "\b": return "\\b"; + case "\f": return "\\f"; + case "\n": return "\\n"; + case "\r": return "\\r"; + case "\u2028": return "\\u2028"; + case "\u2029": return "\\u2029"; + case '"': ++dq; return '"'; + case "'": ++sq; return "'"; + case "\0": return "\\0"; + } + return s; + }); + if (options.ascii_only) str = to_ascii(str); + if (dq > sq) return "'" + str.replace(/\x27/g, "\\'") + "'"; + else return '"' + str.replace(/\x22/g, '\\"') + '"'; + }; + + function encode_string(str) { + var ret = make_string(str); + if (options.inline_script) + ret = ret.replace(/<\x2fscript([>\/\t\n\f\r ])/gi, "<\\/script$1"); + return ret; + }; + + function make_name(name) { + name = name.toString(); + if (options.ascii_only) + name = to_ascii(name); + return name; + }; + + function make_indent(back) { + return repeat_string(" ", options.indent_start + indentation - back * options.indent_level); + }; + + /* -----[ beautification/minification ]----- */ + + var might_need_space = false; + var might_need_semicolon = false; + var last = null; + + function last_char() { + return last.charAt(last.length - 1); + }; + + function maybe_newline() { + if (options.max_line_len && current_col > options.max_line_len) + print("\n"); + }; + + var requireSemicolonChars = makePredicate("( [ + * / - , ."); + + function print(str) { + str = String(str); + var ch = str.charAt(0); + if (might_need_semicolon) { + if ((!ch || ";}".indexOf(ch) < 0) && !/[;]$/.test(last)) { + if (options.semicolons || requireSemicolonChars(ch)) { + OUTPUT += ";"; + current_col++; + current_pos++; + } else { + OUTPUT += "\n"; + current_pos++; + current_line++; + current_col = 0; + } + if (!options.beautify) + might_need_space = false; + } + might_need_semicolon = false; + maybe_newline(); + } + + if (!options.beautify && options.preserve_line && stack[stack.length - 1]) { + var target_line = stack[stack.length - 1].start.line; + while (current_line < target_line) { + OUTPUT += "\n"; + current_pos++; + current_line++; + current_col = 0; + might_need_space = false; + } + } + + if (might_need_space) { + var prev = last_char(); + if ((is_identifier_char(prev) + && (is_identifier_char(ch) || ch == "\\")) + || (/^[\+\-\/]$/.test(ch) && ch == prev)) + { + OUTPUT += " "; + current_col++; + current_pos++; + } + might_need_space = false; + } + var a = str.split(/\r?\n/), n = a.length - 1; + current_line += n; + if (n == 0) { + current_col += a[n].length; + } else { + current_col = a[n].length; + } + current_pos += str.length; + last = str; + OUTPUT += str; + }; + + var space = options.beautify ? function() { + print(" "); + } : function() { + might_need_space = true; + }; + + var indent = options.beautify ? function(half) { + if (options.beautify) { + print(make_indent(half ? 0.5 : 0)); + } + } : noop; + + var with_indent = options.beautify ? function(col, cont) { + if (col === true) col = next_indent(); + var save_indentation = indentation; + indentation = col; + var ret = cont(); + indentation = save_indentation; + return ret; + } : function(col, cont) { return cont() }; + + var newline = options.beautify ? function() { + print("\n"); + } : noop; + + var semicolon = options.beautify ? function() { + print(";"); + } : function() { + might_need_semicolon = true; + }; + + function force_semicolon() { + might_need_semicolon = false; + print(";"); + }; + + function next_indent() { + return indentation + options.indent_level; + }; + + function with_block(cont) { + var ret; + print("{"); + newline(); + with_indent(next_indent(), function(){ + ret = cont(); + }); + indent(); + print("}"); + return ret; + }; + + function with_parens(cont) { + print("("); + //XXX: still nice to have that for argument lists + //var ret = with_indent(current_col, cont); + var ret = cont(); + print(")"); + return ret; + }; + + function with_square(cont) { + print("["); + //var ret = with_indent(current_col, cont); + var ret = cont(); + print("]"); + return ret; + }; + + function comma() { + print(","); + space(); + }; + + function colon() { + print(":"); + if (options.space_colon) space(); + }; + + var add_mapping = options.source_map ? function(token, name) { + try { + if (token) options.source_map.add( + token.file || "?", + current_line, current_col, + token.line, token.col, + (!name && token.type == "name") ? token.value : name + ); + } catch(ex) { + AST_Node.warn("Couldn't figure out mapping for {file}:{line},{col} → {cline},{ccol} [{name}]", { + file: token.file, + line: token.line, + col: token.col, + cline: current_line, + ccol: current_col, + name: name || "" + }) + } + } : noop; + + function get() { + return OUTPUT; + }; + + var stack = []; + return { + get : get, + toString : get, + indent : indent, + indentation : function() { return indentation }, + current_width : function() { return current_col - indentation }, + should_break : function() { return options.width && this.current_width() >= options.width }, + newline : newline, + print : print, + space : space, + comma : comma, + colon : colon, + last : function() { return last }, + semicolon : semicolon, + force_semicolon : force_semicolon, + to_ascii : to_ascii, + print_name : function(name) { print(make_name(name)) }, + print_string : function(str) { print(encode_string(str)) }, + next_indent : next_indent, + with_indent : with_indent, + with_block : with_block, + with_parens : with_parens, + with_square : with_square, + add_mapping : add_mapping, + option : function(opt) { return options[opt] }, + line : function() { return current_line }, + col : function() { return current_col }, + pos : function() { return current_pos }, + push_node : function(node) { stack.push(node) }, + pop_node : function() { return stack.pop() }, + stack : function() { return stack }, + parent : function(n) { + return stack[stack.length - 2 - (n || 0)]; + } + }; + +}; + +/* -----[ code generators ]----- */ + +(function(){ + + /* -----[ utils ]----- */ + + function DEFPRINT(nodetype, generator) { + nodetype.DEFMETHOD("_codegen", generator); + }; + + AST_Node.DEFMETHOD("print", function(stream, force_parens){ + var self = this, generator = self._codegen; + stream.push_node(self); + if (force_parens || self.needs_parens(stream)) { + stream.with_parens(function(){ + self.add_comments(stream); + self.add_source_map(stream); + generator(self, stream); + }); + } else { + self.add_comments(stream); + self.add_source_map(stream); + generator(self, stream); + } + stream.pop_node(); + }); + + AST_Node.DEFMETHOD("print_to_string", function(options){ + var s = OutputStream(options); + this.print(s); + return s.get(); + }); + + /* -----[ comments ]----- */ + + AST_Node.DEFMETHOD("add_comments", function(output){ + var c = output.option("comments"), self = this; + if (c) { + var start = self.start; + if (start && !start._comments_dumped) { + start._comments_dumped = true; + var comments = start.comments_before; + + // XXX: ugly fix for https://github.com/mishoo/UglifyJS2/issues/112 + // if this node is `return` or `throw`, we cannot allow comments before + // the returned or thrown value. + if (self instanceof AST_Exit && + self.value && self.value.start.comments_before.length > 0) { + comments = (comments || []).concat(self.value.start.comments_before); + self.value.start.comments_before = []; + } + + if (c.test) { + comments = comments.filter(function(comment){ + return c.test(comment.value); + }); + } else if (typeof c == "function") { + comments = comments.filter(function(comment){ + return c(self, comment); + }); + } + comments.forEach(function(c){ + if (c.type == "comment1") { + output.print("//" + c.value + "\n"); + output.indent(); + } + else if (c.type == "comment2") { + output.print("/*" + c.value + "*/"); + if (start.nlb) { + output.print("\n"); + output.indent(); + } else { + output.space(); + } + } + }); + } + } + }); + + /* -----[ PARENTHESES ]----- */ + + function PARENS(nodetype, func) { + nodetype.DEFMETHOD("needs_parens", func); + }; + + PARENS(AST_Node, function(){ + return false; + }); + + // a function expression needs parens around it when it's provably + // the first token to appear in a statement. + PARENS(AST_Function, function(output){ + return first_in_statement(output); + }); + + // same goes for an object literal, because otherwise it would be + // interpreted as a block of code. + PARENS(AST_Object, function(output){ + return first_in_statement(output); + }); + + PARENS(AST_Unary, function(output){ + var p = output.parent(); + return p instanceof AST_PropAccess && p.expression === this; + }); + + PARENS(AST_Seq, function(output){ + var p = output.parent(); + return p instanceof AST_Call // (foo, bar)() or foo(1, (2, 3), 4) + || p instanceof AST_Unary // !(foo, bar, baz) + || p instanceof AST_Binary // 1 + (2, 3) + 4 ==> 8 + || p instanceof AST_VarDef // var a = (1, 2), b = a + a; ==> b == 4 + || p instanceof AST_Dot // (1, {foo:2}).foo ==> 2 + || p instanceof AST_Array // [ 1, (2, 3), 4 ] ==> [ 1, 3, 4 ] + || p instanceof AST_ObjectProperty // { foo: (1, 2) }.foo ==> 2 + || p instanceof AST_Conditional /* (false, true) ? (a = 10, b = 20) : (c = 30) + * ==> 20 (side effect, set a := 10 and b := 20) */ + ; + }); + + PARENS(AST_Binary, function(output){ + var p = output.parent(); + // (foo && bar)() + if (p instanceof AST_Call && p.expression === this) + return true; + // typeof (foo && bar) + if (p instanceof AST_Unary) + return true; + // (foo && bar)["prop"], (foo && bar).prop + if (p instanceof AST_PropAccess && p.expression === this) + return true; + // this deals with precedence: 3 * (2 + 1) + if (p instanceof AST_Binary) { + var po = p.operator, pp = PRECEDENCE[po]; + var so = this.operator, sp = PRECEDENCE[so]; + if (pp > sp + || (pp == sp + && this === p.right + && !(so == po && + (so == "*" || + so == "&&" || + so == "||")))) { + return true; + } + } + }); + + PARENS(AST_PropAccess, function(output){ + var p = output.parent(); + if (p instanceof AST_New && p.expression === this) { + // i.e. new (foo.bar().baz) + // + // if there's one call into this subtree, then we need + // parens around it too, otherwise the call will be + // interpreted as passing the arguments to the upper New + // expression. + try { + this.walk(new TreeWalker(function(node){ + if (node instanceof AST_Call) throw p; + })); + } catch(ex) { + if (ex !== p) throw ex; + return true; + } + } + }); + + PARENS(AST_Call, function(output){ + var p = output.parent(); + return p instanceof AST_New && p.expression === this; + }); + + PARENS(AST_New, function(output){ + var p = output.parent(); + if (no_constructor_parens(this, output) + && (p instanceof AST_PropAccess // (new Date).getTime(), (new Date)["getTime"]() + || p instanceof AST_Call && p.expression === this)) // (new foo)(bar) + return true; + }); + + PARENS(AST_Number, function(output){ + var p = output.parent(); + if (this.getValue() < 0 && p instanceof AST_PropAccess && p.expression === this) + return true; + }); + + PARENS(AST_NaN, function(output){ + var p = output.parent(); + if (p instanceof AST_PropAccess && p.expression === this) + return true; + }); + + function assign_and_conditional_paren_rules(output) { + var p = output.parent(); + // !(a = false) → true + if (p instanceof AST_Unary) + return true; + // 1 + (a = 2) + 3 → 6, side effect setting a = 2 + if (p instanceof AST_Binary && !(p instanceof AST_Assign)) + return true; + // (a = func)() —or— new (a = Object)() + if (p instanceof AST_Call && p.expression === this) + return true; + // (a = foo) ? bar : baz + if (p instanceof AST_Conditional && p.condition === this) + return true; + // (a = foo)["prop"] —or— (a = foo).prop + if (p instanceof AST_PropAccess && p.expression === this) + return true; + }; + + PARENS(AST_Assign, assign_and_conditional_paren_rules); + PARENS(AST_Conditional, assign_and_conditional_paren_rules); + + /* -----[ PRINTERS ]----- */ + + DEFPRINT(AST_Directive, function(self, output){ + output.print_string(self.value); + output.semicolon(); + }); + DEFPRINT(AST_Debugger, function(self, output){ + output.print("debugger"); + output.semicolon(); + }); + + /* -----[ statements ]----- */ + + function display_body(body, is_toplevel, output) { + var last = body.length - 1; + body.forEach(function(stmt, i){ + if (!(stmt instanceof AST_EmptyStatement)) { + output.indent(); + stmt.print(output); + if (!(i == last && is_toplevel)) { + output.newline(); + if (is_toplevel) output.newline(); + } + } + }); + }; + + AST_StatementWithBody.DEFMETHOD("_do_print_body", function(output){ + force_statement(this.body, output); + }); + + DEFPRINT(AST_Statement, function(self, output){ + self.body.print(output); + output.semicolon(); + }); + DEFPRINT(AST_Toplevel, function(self, output){ + display_body(self.body, true, output); + output.print(""); + }); + DEFPRINT(AST_LabeledStatement, function(self, output){ + self.label.print(output); + output.colon(); + self.body.print(output); + }); + DEFPRINT(AST_SimpleStatement, function(self, output){ + self.body.print(output); + output.semicolon(); + }); + function print_bracketed(body, output) { + if (body.length > 0) output.with_block(function(){ + display_body(body, false, output); + }); + else output.print("{}"); + }; + DEFPRINT(AST_BlockStatement, function(self, output){ + print_bracketed(self.body, output); + }); + DEFPRINT(AST_EmptyStatement, function(self, output){ + output.semicolon(); + }); + DEFPRINT(AST_Do, function(self, output){ + output.print("do"); + output.space(); + self._do_print_body(output); + output.space(); + output.print("while"); + output.space(); + output.with_parens(function(){ + self.condition.print(output); + }); + output.semicolon(); + }); + DEFPRINT(AST_While, function(self, output){ + output.print("while"); + output.space(); + output.with_parens(function(){ + self.condition.print(output); + }); + output.space(); + self._do_print_body(output); + }); + DEFPRINT(AST_For, function(self, output){ + output.print("for"); + output.space(); + output.with_parens(function(){ + if (self.init) { + if (self.init instanceof AST_Definitions) { + self.init.print(output); + } else { + parenthesize_for_noin(self.init, output, true); + } + output.print(";"); + output.space(); + } else { + output.print(";"); + } + if (self.condition) { + self.condition.print(output); + output.print(";"); + output.space(); + } else { + output.print(";"); + } + if (self.step) { + self.step.print(output); + } + }); + output.space(); + self._do_print_body(output); + }); + DEFPRINT(AST_ForIn, function(self, output){ + output.print("for"); + output.space(); + output.with_parens(function(){ + self.init.print(output); + output.space(); + output.print("in"); + output.space(); + self.object.print(output); + }); + output.space(); + self._do_print_body(output); + }); + DEFPRINT(AST_With, function(self, output){ + output.print("with"); + output.space(); + output.with_parens(function(){ + self.expression.print(output); + }); + output.space(); + self._do_print_body(output); + }); + + /* -----[ functions ]----- */ + AST_Lambda.DEFMETHOD("_do_print", function(output, nokeyword){ + var self = this; + if (!nokeyword) { + output.print("function"); + } + if (self.name) { + output.space(); + self.name.print(output); + } + output.with_parens(function(){ + self.argnames.forEach(function(arg, i){ + if (i) output.comma(); + arg.print(output); + }); + }); + output.space(); + print_bracketed(self.body, output); + }); + DEFPRINT(AST_Lambda, function(self, output){ + self._do_print(output); + }); + + /* -----[ exits ]----- */ + AST_Exit.DEFMETHOD("_do_print", function(output, kind){ + output.print(kind); + if (this.value) { + output.space(); + this.value.print(output); + } + output.semicolon(); + }); + DEFPRINT(AST_Return, function(self, output){ + self._do_print(output, "return"); + }); + DEFPRINT(AST_Throw, function(self, output){ + self._do_print(output, "throw"); + }); + + /* -----[ loop control ]----- */ + AST_LoopControl.DEFMETHOD("_do_print", function(output, kind){ + output.print(kind); + if (this.label) { + output.space(); + this.label.print(output); + } + output.semicolon(); + }); + DEFPRINT(AST_Break, function(self, output){ + self._do_print(output, "break"); + }); + DEFPRINT(AST_Continue, function(self, output){ + self._do_print(output, "continue"); + }); + + /* -----[ if ]----- */ + function make_then(self, output) { + if (output.option("bracketize")) { + make_block(self.body, output); + return; + } + // The squeezer replaces "block"-s that contain only a single + // statement with the statement itself; technically, the AST + // is correct, but this can create problems when we output an + // IF having an ELSE clause where the THEN clause ends in an + // IF *without* an ELSE block (then the outer ELSE would refer + // to the inner IF). This function checks for this case and + // adds the block brackets if needed. + if (!self.body) + return output.force_semicolon(); + if (self.body instanceof AST_Do + && output.option("ie_proof")) { + // https://github.com/mishoo/UglifyJS/issues/#issue/57 IE + // croaks with "syntax error" on code like this: if (foo) + // do ... while(cond); else ... we need block brackets + // around do/while + make_block(self.body, output); + return; + } + var b = self.body; + while (true) { + if (b instanceof AST_If) { + if (!b.alternative) { + make_block(self.body, output); + return; + } + b = b.alternative; + } + else if (b instanceof AST_StatementWithBody) { + b = b.body; + } + else break; + } + force_statement(self.body, output); + }; + DEFPRINT(AST_If, function(self, output){ + output.print("if"); + output.space(); + output.with_parens(function(){ + self.condition.print(output); + }); + output.space(); + if (self.alternative) { + make_then(self, output); + output.space(); + output.print("else"); + output.space(); + force_statement(self.alternative, output); + } else { + self._do_print_body(output); + } + }); + + /* -----[ switch ]----- */ + DEFPRINT(AST_Switch, function(self, output){ + output.print("switch"); + output.space(); + output.with_parens(function(){ + self.expression.print(output); + }); + output.space(); + if (self.body.length > 0) output.with_block(function(){ + self.body.forEach(function(stmt, i){ + if (i) output.newline(); + output.indent(true); + stmt.print(output); + }); + }); + else output.print("{}"); + }); + AST_SwitchBranch.DEFMETHOD("_do_print_body", function(output){ + if (this.body.length > 0) { + output.newline(); + this.body.forEach(function(stmt){ + output.indent(); + stmt.print(output); + output.newline(); + }); + } + }); + DEFPRINT(AST_Default, function(self, output){ + output.print("default:"); + self._do_print_body(output); + }); + DEFPRINT(AST_Case, function(self, output){ + output.print("case"); + output.space(); + self.expression.print(output); + output.print(":"); + self._do_print_body(output); + }); + + /* -----[ exceptions ]----- */ + DEFPRINT(AST_Try, function(self, output){ + output.print("try"); + output.space(); + print_bracketed(self.body, output); + if (self.bcatch) { + output.space(); + self.bcatch.print(output); + } + if (self.bfinally) { + output.space(); + self.bfinally.print(output); + } + }); + DEFPRINT(AST_Catch, function(self, output){ + output.print("catch"); + output.space(); + output.with_parens(function(){ + self.argname.print(output); + }); + output.space(); + print_bracketed(self.body, output); + }); + DEFPRINT(AST_Finally, function(self, output){ + output.print("finally"); + output.space(); + print_bracketed(self.body, output); + }); + + /* -----[ var/const ]----- */ + AST_Definitions.DEFMETHOD("_do_print", function(output, kind){ + output.print(kind); + output.space(); + this.definitions.forEach(function(def, i){ + if (i) output.comma(); + def.print(output); + }); + var p = output.parent(); + var in_for = p instanceof AST_For || p instanceof AST_ForIn; + var avoid_semicolon = in_for && p.init === this; + if (!avoid_semicolon) + output.semicolon(); + }); + DEFPRINT(AST_Var, function(self, output){ + self._do_print(output, "var"); + }); + DEFPRINT(AST_Const, function(self, output){ + self._do_print(output, "const"); + }); + + function parenthesize_for_noin(node, output, noin) { + if (!noin) node.print(output); + else try { + // need to take some precautions here: + // https://github.com/mishoo/UglifyJS2/issues/60 + node.walk(new TreeWalker(function(node){ + if (node instanceof AST_Binary && node.operator == "in") + throw output; + })); + node.print(output); + } catch(ex) { + if (ex !== output) throw ex; + node.print(output, true); + } + }; + + DEFPRINT(AST_VarDef, function(self, output){ + self.name.print(output); + if (self.value) { + output.space(); + output.print("="); + output.space(); + var p = output.parent(1); + var noin = p instanceof AST_For || p instanceof AST_ForIn; + parenthesize_for_noin(self.value, output, noin); + } + }); + + /* -----[ other expressions ]----- */ + DEFPRINT(AST_Call, function(self, output){ + self.expression.print(output); + if (self instanceof AST_New && no_constructor_parens(self, output)) + return; + output.with_parens(function(){ + self.args.forEach(function(expr, i){ + if (i) output.comma(); + expr.print(output); + }); + }); + }); + DEFPRINT(AST_New, function(self, output){ + output.print("new"); + output.space(); + AST_Call.prototype._codegen(self, output); + }); + + AST_Seq.DEFMETHOD("_do_print", function(output){ + this.car.print(output); + if (this.cdr) { + output.comma(); + if (output.should_break()) { + output.newline(); + output.indent(); + } + this.cdr.print(output); + } + }); + DEFPRINT(AST_Seq, function(self, output){ + self._do_print(output); + // var p = output.parent(); + // if (p instanceof AST_Statement) { + // output.with_indent(output.next_indent(), function(){ + // self._do_print(output); + // }); + // } else { + // self._do_print(output); + // } + }); + DEFPRINT(AST_Dot, function(self, output){ + var expr = self.expression; + expr.print(output); + if (expr instanceof AST_Number && expr.getValue() >= 0) { + if (!/[xa-f.]/i.test(output.last())) { + output.print("."); + } + } + output.print("."); + // the name after dot would be mapped about here. + output.add_mapping(self.end); + output.print_name(self.property); + }); + DEFPRINT(AST_Sub, function(self, output){ + self.expression.print(output); + output.print("["); + self.property.print(output); + output.print("]"); + }); + DEFPRINT(AST_UnaryPrefix, function(self, output){ + var op = self.operator; + output.print(op); + if (/^[a-z]/i.test(op)) + output.space(); + self.expression.print(output); + }); + DEFPRINT(AST_UnaryPostfix, function(self, output){ + self.expression.print(output); + output.print(self.operator); + }); + DEFPRINT(AST_Binary, function(self, output){ + self.left.print(output); + output.space(); + output.print(self.operator); + output.space(); + self.right.print(output); + }); + DEFPRINT(AST_Conditional, function(self, output){ + self.condition.print(output); + output.space(); + output.print("?"); + output.space(); + self.consequent.print(output); + output.space(); + output.colon(); + self.alternative.print(output); + }); + + /* -----[ literals ]----- */ + DEFPRINT(AST_Array, function(self, output){ + output.with_square(function(){ + var a = self.elements, len = a.length; + if (len > 0) output.space(); + a.forEach(function(exp, i){ + if (i) output.comma(); + exp.print(output); + }); + if (len > 0) output.space(); + }); + }); + DEFPRINT(AST_Object, function(self, output){ + if (self.properties.length > 0) output.with_block(function(){ + self.properties.forEach(function(prop, i){ + if (i) { + output.print(","); + output.newline(); + } + output.indent(); + prop.print(output); + }); + output.newline(); + }); + else output.print("{}"); + }); + DEFPRINT(AST_ObjectKeyVal, function(self, output){ + var key = self.key; + if (output.option("quote_keys")) { + output.print_string(key); + } else if ((typeof key == "number" + || !output.option("beautify") + && +key + "" == key) + && parseFloat(key) >= 0) { + output.print(make_num(key)); + } else if (!is_identifier(key)) { + output.print_string(key); + } else { + output.print_name(key); + } + output.colon(); + self.value.print(output); + }); + DEFPRINT(AST_ObjectSetter, function(self, output){ + output.print("set"); + self.value._do_print(output, true); + }); + DEFPRINT(AST_ObjectGetter, function(self, output){ + output.print("get"); + self.value._do_print(output, true); + }); + DEFPRINT(AST_Symbol, function(self, output){ + var def = self.definition(); + output.print_name(def ? def.mangled_name || def.name : self.name); + }); + DEFPRINT(AST_Undefined, function(self, output){ + output.print("void 0"); + }); + DEFPRINT(AST_Hole, noop); + DEFPRINT(AST_Infinity, function(self, output){ + output.print("1/0"); + }); + DEFPRINT(AST_NaN, function(self, output){ + output.print("0/0"); + }); + DEFPRINT(AST_This, function(self, output){ + output.print("this"); + }); + DEFPRINT(AST_Constant, function(self, output){ + output.print(self.getValue()); + }); + DEFPRINT(AST_String, function(self, output){ + output.print_string(self.getValue()); + }); + DEFPRINT(AST_Number, function(self, output){ + output.print(make_num(self.getValue())); + }); + DEFPRINT(AST_RegExp, function(self, output){ + var str = self.getValue().toString(); + if (output.option("ascii_only")) + str = output.to_ascii(str); + output.print(str); + var p = output.parent(); + if (p instanceof AST_Binary && /^in/.test(p.operator) && p.left === self) + output.print(" "); + }); + + function force_statement(stat, output) { + if (output.option("bracketize")) { + if (!stat || stat instanceof AST_EmptyStatement) + output.print("{}"); + else if (stat instanceof AST_BlockStatement) + stat.print(output); + else output.with_block(function(){ + output.indent(); + stat.print(output); + output.newline(); + }); + } else { + if (!stat || stat instanceof AST_EmptyStatement) + output.force_semicolon(); + else + stat.print(output); + } + }; + + // return true if the node at the top of the stack (that means the + // innermost node in the current output) is lexically the first in + // a statement. + function first_in_statement(output) { + var a = output.stack(), i = a.length, node = a[--i], p = a[--i]; + while (i > 0) { + if (p instanceof AST_Statement && p.body === node) + return true; + if ((p instanceof AST_Seq && p.car === node ) || + (p instanceof AST_Call && p.expression === node ) || + (p instanceof AST_Dot && p.expression === node ) || + (p instanceof AST_Sub && p.expression === node ) || + (p instanceof AST_Conditional && p.condition === node ) || + (p instanceof AST_Binary && p.left === node ) || + (p instanceof AST_UnaryPostfix && p.expression === node )) + { + node = p; + p = a[--i]; + } else { + return false; + } + } + }; + + // self should be AST_New. decide if we want to show parens or not. + function no_constructor_parens(self, output) { + return self.args.length == 0 && !output.option("beautify"); + }; + + function best_of(a) { + var best = a[0], len = best.length; + for (var i = 1; i < a.length; ++i) { + if (a[i].length < len) { + best = a[i]; + len = best.length; + } + } + return best; + }; + + function make_num(num) { + var str = num.toString(10), a = [ str.replace(/^0\./, ".").replace('e+', 'e') ], m; + if (Math.floor(num) === num) { + if (num >= 0) { + a.push("0x" + num.toString(16).toLowerCase(), // probably pointless + "0" + num.toString(8)); // same. + } else { + a.push("-0x" + (-num).toString(16).toLowerCase(), // probably pointless + "-0" + (-num).toString(8)); // same. + } + if ((m = /^(.*?)(0+)$/.exec(num))) { + a.push(m[1] + "e" + m[2].length); + } + } else if ((m = /^0?\.(0+)(.*)$/.exec(num))) { + a.push(m[2] + "e-" + (m[1].length + m[2].length), + str.substr(str.indexOf("."))); + } + return best_of(a); + }; + + function make_block(stmt, output) { + if (stmt instanceof AST_BlockStatement) { + stmt.print(output); + return; + } + output.with_block(function(){ + output.indent(); + stmt.print(output); + output.newline(); + }); + }; + + /* -----[ source map generators ]----- */ + + function DEFMAP(nodetype, generator) { + nodetype.DEFMETHOD("add_source_map", function(stream){ + generator(this, stream); + }); + }; + + // We could easily add info for ALL nodes, but it seems to me that + // would be quite wasteful, hence this noop in the base class. + DEFMAP(AST_Node, noop); + + function basic_sourcemap_gen(self, output) { + output.add_mapping(self.start); + }; + + // XXX: I'm not exactly sure if we need it for all of these nodes, + // or if we should add even more. + + DEFMAP(AST_Directive, basic_sourcemap_gen); + DEFMAP(AST_Debugger, basic_sourcemap_gen); + DEFMAP(AST_Symbol, basic_sourcemap_gen); + DEFMAP(AST_Jump, basic_sourcemap_gen); + DEFMAP(AST_StatementWithBody, basic_sourcemap_gen); + DEFMAP(AST_LabeledStatement, noop); // since the label symbol will mark it + DEFMAP(AST_Lambda, basic_sourcemap_gen); + DEFMAP(AST_Switch, basic_sourcemap_gen); + DEFMAP(AST_SwitchBranch, basic_sourcemap_gen); + DEFMAP(AST_BlockStatement, basic_sourcemap_gen); + DEFMAP(AST_Toplevel, noop); + DEFMAP(AST_New, basic_sourcemap_gen); + DEFMAP(AST_Try, basic_sourcemap_gen); + DEFMAP(AST_Catch, basic_sourcemap_gen); + DEFMAP(AST_Finally, basic_sourcemap_gen); + DEFMAP(AST_Definitions, basic_sourcemap_gen); + DEFMAP(AST_Constant, basic_sourcemap_gen); + DEFMAP(AST_ObjectProperty, function(self, output){ + output.add_mapping(self.start, self.key); + }); + +})(); diff --git a/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/lib/parse.js b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/lib/parse.js new file mode 100644 index 00000000..5a75e753 --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/lib/parse.js @@ -0,0 +1,1407 @@ +/*********************************************************************** + + A JavaScript tokenizer / parser / beautifier / compressor. + https://github.com/mishoo/UglifyJS2 + + -------------------------------- (C) --------------------------------- + + Author: Mihai Bazon + + http://mihai.bazon.net/blog + + Distributed under the BSD license: + + Copyright 2012 (c) Mihai Bazon + Parser based on parse-js (http://marijn.haverbeke.nl/parse-js/). + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above + copyright notice, this list of conditions and the following + disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials + provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + ***********************************************************************/ + +"use strict"; + +var KEYWORDS = 'break case catch const continue debugger default delete do else finally for function if in instanceof new return switch throw try typeof var void while with'; +var KEYWORDS_ATOM = 'false null true'; +var RESERVED_WORDS = 'abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized this throws transient volatile' + + " " + KEYWORDS_ATOM + " " + KEYWORDS; +var KEYWORDS_BEFORE_EXPRESSION = 'return new delete throw else case'; + +KEYWORDS = makePredicate(KEYWORDS); +RESERVED_WORDS = makePredicate(RESERVED_WORDS); +KEYWORDS_BEFORE_EXPRESSION = makePredicate(KEYWORDS_BEFORE_EXPRESSION); +KEYWORDS_ATOM = makePredicate(KEYWORDS_ATOM); + +var OPERATOR_CHARS = makePredicate(characters("+-*&%=<>!?|~^")); + +var RE_HEX_NUMBER = /^0x[0-9a-f]+$/i; +var RE_OCT_NUMBER = /^0[0-7]+$/; +var RE_DEC_NUMBER = /^\d*\.?\d*(?:e[+-]?\d*(?:\d\.?|\.?\d)\d*)?$/i; + +var OPERATORS = makePredicate([ + "in", + "instanceof", + "typeof", + "new", + "void", + "delete", + "++", + "--", + "+", + "-", + "!", + "~", + "&", + "|", + "^", + "*", + "/", + "%", + ">>", + "<<", + ">>>", + "<", + ">", + "<=", + ">=", + "==", + "===", + "!=", + "!==", + "?", + "=", + "+=", + "-=", + "/=", + "*=", + "%=", + ">>=", + "<<=", + ">>>=", + "|=", + "^=", + "&=", + "&&", + "||" +]); + +var WHITESPACE_CHARS = makePredicate(characters(" \u00a0\n\r\t\f\u000b\u200b\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000")); + +var PUNC_BEFORE_EXPRESSION = makePredicate(characters("[{(,.;:")); + +var PUNC_CHARS = makePredicate(characters("[]{}(),;:")); + +var REGEXP_MODIFIERS = makePredicate(characters("gmsiy")); + +/* -----[ Tokenizer ]----- */ + +// regexps adapted from http://xregexp.com/plugins/#unicode +var UNICODE = { + letter: new RegExp("[\\u0041-\\u005A\\u0061-\\u007A\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u0523\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0621-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971\\u0972\\u097B-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C33\\u0C35-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D28\\u0D2A-\\u0D39\\u0D3D\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC\\u0EDD\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8B\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10D0-\\u10FA\\u10FC\\u1100-\\u1159\\u115F-\\u11A2\\u11A8-\\u11F9\\u1200-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u1676\\u1681-\\u169A\\u16A0-\\u16EA\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u1900-\\u191C\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19A9\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u2094\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2C6F\\u2C71-\\u2C7D\\u2C80-\\u2CE4\\u2D00-\\u2D25\\u2D30-\\u2D65\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31B7\\u31F0-\\u31FF\\u3400\\u4DB5\\u4E00\\u9FC3\\uA000-\\uA48C\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA65F\\uA662-\\uA66E\\uA67F-\\uA697\\uA717-\\uA71F\\uA722-\\uA788\\uA78B\\uA78C\\uA7FB-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA90A-\\uA925\\uA930-\\uA946\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAC00\\uD7A3\\uF900-\\uFA2D\\uFA30-\\uFA6A\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"), + non_spacing_mark: new RegExp("[\\u0300-\\u036F\\u0483-\\u0487\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u0610-\\u061A\\u064B-\\u065E\\u0670\\u06D6-\\u06DC\\u06DF-\\u06E4\\u06E7\\u06E8\\u06EA-\\u06ED\\u0711\\u0730-\\u074A\\u07A6-\\u07B0\\u07EB-\\u07F3\\u0816-\\u0819\\u081B-\\u0823\\u0825-\\u0827\\u0829-\\u082D\\u0900-\\u0902\\u093C\\u0941-\\u0948\\u094D\\u0951-\\u0955\\u0962\\u0963\\u0981\\u09BC\\u09C1-\\u09C4\\u09CD\\u09E2\\u09E3\\u0A01\\u0A02\\u0A3C\\u0A41\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A70\\u0A71\\u0A75\\u0A81\\u0A82\\u0ABC\\u0AC1-\\u0AC5\\u0AC7\\u0AC8\\u0ACD\\u0AE2\\u0AE3\\u0B01\\u0B3C\\u0B3F\\u0B41-\\u0B44\\u0B4D\\u0B56\\u0B62\\u0B63\\u0B82\\u0BC0\\u0BCD\\u0C3E-\\u0C40\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C62\\u0C63\\u0CBC\\u0CBF\\u0CC6\\u0CCC\\u0CCD\\u0CE2\\u0CE3\\u0D41-\\u0D44\\u0D4D\\u0D62\\u0D63\\u0DCA\\u0DD2-\\u0DD4\\u0DD6\\u0E31\\u0E34-\\u0E3A\\u0E47-\\u0E4E\\u0EB1\\u0EB4-\\u0EB9\\u0EBB\\u0EBC\\u0EC8-\\u0ECD\\u0F18\\u0F19\\u0F35\\u0F37\\u0F39\\u0F71-\\u0F7E\\u0F80-\\u0F84\\u0F86\\u0F87\\u0F90-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u102D-\\u1030\\u1032-\\u1037\\u1039\\u103A\\u103D\\u103E\\u1058\\u1059\\u105E-\\u1060\\u1071-\\u1074\\u1082\\u1085\\u1086\\u108D\\u109D\\u135F\\u1712-\\u1714\\u1732-\\u1734\\u1752\\u1753\\u1772\\u1773\\u17B7-\\u17BD\\u17C6\\u17C9-\\u17D3\\u17DD\\u180B-\\u180D\\u18A9\\u1920-\\u1922\\u1927\\u1928\\u1932\\u1939-\\u193B\\u1A17\\u1A18\\u1A56\\u1A58-\\u1A5E\\u1A60\\u1A62\\u1A65-\\u1A6C\\u1A73-\\u1A7C\\u1A7F\\u1B00-\\u1B03\\u1B34\\u1B36-\\u1B3A\\u1B3C\\u1B42\\u1B6B-\\u1B73\\u1B80\\u1B81\\u1BA2-\\u1BA5\\u1BA8\\u1BA9\\u1C2C-\\u1C33\\u1C36\\u1C37\\u1CD0-\\u1CD2\\u1CD4-\\u1CE0\\u1CE2-\\u1CE8\\u1CED\\u1DC0-\\u1DE6\\u1DFD-\\u1DFF\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2CEF-\\u2CF1\\u2DE0-\\u2DFF\\u302A-\\u302F\\u3099\\u309A\\uA66F\\uA67C\\uA67D\\uA6F0\\uA6F1\\uA802\\uA806\\uA80B\\uA825\\uA826\\uA8C4\\uA8E0-\\uA8F1\\uA926-\\uA92D\\uA947-\\uA951\\uA980-\\uA982\\uA9B3\\uA9B6-\\uA9B9\\uA9BC\\uAA29-\\uAA2E\\uAA31\\uAA32\\uAA35\\uAA36\\uAA43\\uAA4C\\uAAB0\\uAAB2-\\uAAB4\\uAAB7\\uAAB8\\uAABE\\uAABF\\uAAC1\\uABE5\\uABE8\\uABED\\uFB1E\\uFE00-\\uFE0F\\uFE20-\\uFE26]"), + space_combining_mark: new RegExp("[\\u0903\\u093E-\\u0940\\u0949-\\u094C\\u094E\\u0982\\u0983\\u09BE-\\u09C0\\u09C7\\u09C8\\u09CB\\u09CC\\u09D7\\u0A03\\u0A3E-\\u0A40\\u0A83\\u0ABE-\\u0AC0\\u0AC9\\u0ACB\\u0ACC\\u0B02\\u0B03\\u0B3E\\u0B40\\u0B47\\u0B48\\u0B4B\\u0B4C\\u0B57\\u0BBE\\u0BBF\\u0BC1\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCC\\u0BD7\\u0C01-\\u0C03\\u0C41-\\u0C44\\u0C82\\u0C83\\u0CBE\\u0CC0-\\u0CC4\\u0CC7\\u0CC8\\u0CCA\\u0CCB\\u0CD5\\u0CD6\\u0D02\\u0D03\\u0D3E-\\u0D40\\u0D46-\\u0D48\\u0D4A-\\u0D4C\\u0D57\\u0D82\\u0D83\\u0DCF-\\u0DD1\\u0DD8-\\u0DDF\\u0DF2\\u0DF3\\u0F3E\\u0F3F\\u0F7F\\u102B\\u102C\\u1031\\u1038\\u103B\\u103C\\u1056\\u1057\\u1062-\\u1064\\u1067-\\u106D\\u1083\\u1084\\u1087-\\u108C\\u108F\\u109A-\\u109C\\u17B6\\u17BE-\\u17C5\\u17C7\\u17C8\\u1923-\\u1926\\u1929-\\u192B\\u1930\\u1931\\u1933-\\u1938\\u19B0-\\u19C0\\u19C8\\u19C9\\u1A19-\\u1A1B\\u1A55\\u1A57\\u1A61\\u1A63\\u1A64\\u1A6D-\\u1A72\\u1B04\\u1B35\\u1B3B\\u1B3D-\\u1B41\\u1B43\\u1B44\\u1B82\\u1BA1\\u1BA6\\u1BA7\\u1BAA\\u1C24-\\u1C2B\\u1C34\\u1C35\\u1CE1\\u1CF2\\uA823\\uA824\\uA827\\uA880\\uA881\\uA8B4-\\uA8C3\\uA952\\uA953\\uA983\\uA9B4\\uA9B5\\uA9BA\\uA9BB\\uA9BD-\\uA9C0\\uAA2F\\uAA30\\uAA33\\uAA34\\uAA4D\\uAA7B\\uABE3\\uABE4\\uABE6\\uABE7\\uABE9\\uABEA\\uABEC]"), + connector_punctuation: new RegExp("[\\u005F\\u203F\\u2040\\u2054\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFF3F]") +}; + +function is_letter(code) { + return (code >= 97 && code <= 122) + || (code >= 65 && code <= 90) + || (code >= 0xaa && UNICODE.letter.test(String.fromCharCode(code))); +}; + +function is_digit(code) { + return code >= 48 && code <= 57; //XXX: find out if "UnicodeDigit" means something else than 0..9 +}; + +function is_alphanumeric_char(code) { + return is_digit(code) || is_letter(code); +}; + +function is_unicode_combining_mark(ch) { + return UNICODE.non_spacing_mark.test(ch) || UNICODE.space_combining_mark.test(ch); +}; + +function is_unicode_connector_punctuation(ch) { + return UNICODE.connector_punctuation.test(ch); +}; + +function is_identifier(name) { + return /^[a-z_$][a-z0-9_$]*$/i.test(name) && !RESERVED_WORDS(name); +}; + +function is_identifier_start(code) { + return code == 36 || code == 95 || is_letter(code); +}; + +function is_identifier_char(ch) { + var code = ch.charCodeAt(0); + return is_identifier_start(code) + || is_digit(code) + || code == 8204 // \u200c: zero-width non-joiner + || code == 8205 // \u200d: zero-width joiner (in my ECMA-262 PDF, this is also 200c) + || is_unicode_combining_mark(ch) + || is_unicode_connector_punctuation(ch) + ; +}; + +function parse_js_number(num) { + if (RE_HEX_NUMBER.test(num)) { + return parseInt(num.substr(2), 16); + } else if (RE_OCT_NUMBER.test(num)) { + return parseInt(num.substr(1), 8); + } else if (RE_DEC_NUMBER.test(num)) { + return parseFloat(num); + } +}; + +function JS_Parse_Error(message, line, col, pos) { + this.message = message; + this.line = line; + this.col = col; + this.pos = pos; + this.stack = new Error().stack; +}; + +JS_Parse_Error.prototype.toString = function() { + return this.message + " (line: " + this.line + ", col: " + this.col + ", pos: " + this.pos + ")" + "\n\n" + this.stack; +}; + +function js_error(message, filename, line, col, pos) { + AST_Node.warn("ERROR: {message} [{file}:{line},{col}]", { + message: message, + file: filename, + line: line, + col: col + }); + throw new JS_Parse_Error(message, line, col, pos); +}; + +function is_token(token, type, val) { + return token.type == type && (val == null || token.value == val); +}; + +var EX_EOF = {}; + +function tokenizer($TEXT, filename) { + + var S = { + text : $TEXT.replace(/\r\n?|[\n\u2028\u2029]/g, "\n").replace(/\uFEFF/g, ''), + filename : filename, + pos : 0, + tokpos : 0, + line : 1, + tokline : 0, + col : 0, + tokcol : 0, + newline_before : false, + regex_allowed : false, + comments_before : [] + }; + + function peek() { return S.text.charAt(S.pos); }; + + function next(signal_eof, in_string) { + var ch = S.text.charAt(S.pos++); + if (signal_eof && !ch) + throw EX_EOF; + if (ch == "\n") { + S.newline_before = S.newline_before || !in_string; + ++S.line; + S.col = 0; + } else { + ++S.col; + } + return ch; + }; + + function find(what, signal_eof) { + var pos = S.text.indexOf(what, S.pos); + if (signal_eof && pos == -1) throw EX_EOF; + return pos; + }; + + function start_token() { + S.tokline = S.line; + S.tokcol = S.col; + S.tokpos = S.pos; + }; + + function token(type, value, is_comment) { + S.regex_allowed = ((type == "operator" && !UNARY_POSTFIX[value]) || + (type == "keyword" && KEYWORDS_BEFORE_EXPRESSION(value)) || + (type == "punc" && PUNC_BEFORE_EXPRESSION(value))); + var ret = { + type : type, + value : value, + line : S.tokline, + col : S.tokcol, + pos : S.tokpos, + endpos : S.pos, + nlb : S.newline_before, + file : filename + }; + if (!is_comment) { + ret.comments_before = S.comments_before; + S.comments_before = []; + // make note of any newlines in the comments that came before + for (var i = 0, len = ret.comments_before.length; i < len; i++) { + ret.nlb = ret.nlb || ret.comments_before[i].nlb; + } + } + S.newline_before = false; + return new AST_Token(ret); + }; + + function skip_whitespace() { + while (WHITESPACE_CHARS(peek())) + next(); + }; + + function read_while(pred) { + var ret = "", ch, i = 0; + while ((ch = peek()) && pred(ch, i++)) + ret += next(); + return ret; + }; + + function parse_error(err) { + js_error(err, filename, S.tokline, S.tokcol, S.tokpos); + }; + + function read_num(prefix) { + var has_e = false, after_e = false, has_x = false, has_dot = prefix == "."; + var num = read_while(function(ch, i){ + var code = ch.charCodeAt(0); + switch (code) { + case 120: case 88: // xX + return has_x ? false : (has_x = true); + case 101: case 69: // eE + return has_x ? true : has_e ? false : (has_e = after_e = true); + case 45: // - + return after_e || (i == 0 && !prefix); + case 43: // + + return after_e; + case (after_e = false, 46): // . + return (!has_dot && !has_x && !has_e) ? (has_dot = true) : false; + } + return is_alphanumeric_char(code); + }); + if (prefix) num = prefix + num; + var valid = parse_js_number(num); + if (!isNaN(valid)) { + return token("num", valid); + } else { + parse_error("Invalid syntax: " + num); + } + }; + + function read_escaped_char(in_string) { + var ch = next(true, in_string); + switch (ch.charCodeAt(0)) { + case 110 : return "\n"; + case 114 : return "\r"; + case 116 : return "\t"; + case 98 : return "\b"; + case 118 : return "\u000b"; // \v + case 102 : return "\f"; + case 48 : return "\0"; + case 120 : return String.fromCharCode(hex_bytes(2)); // \x + case 117 : return String.fromCharCode(hex_bytes(4)); // \u + case 10 : return ""; // newline + default : return ch; + } + }; + + function hex_bytes(n) { + var num = 0; + for (; n > 0; --n) { + var digit = parseInt(next(true), 16); + if (isNaN(digit)) + parse_error("Invalid hex-character pattern in string"); + num = (num << 4) | digit; + } + return num; + }; + + var read_string = with_eof_error("Unterminated string constant", function(){ + var quote = next(), ret = ""; + for (;;) { + var ch = next(true); + if (ch == "\\") { + // read OctalEscapeSequence (XXX: deprecated if "strict mode") + // https://github.com/mishoo/UglifyJS/issues/178 + var octal_len = 0, first = null; + ch = read_while(function(ch){ + if (ch >= "0" && ch <= "7") { + if (!first) { + first = ch; + return ++octal_len; + } + else if (first <= "3" && octal_len <= 2) return ++octal_len; + else if (first >= "4" && octal_len <= 1) return ++octal_len; + } + return false; + }); + if (octal_len > 0) ch = String.fromCharCode(parseInt(ch, 8)); + else ch = read_escaped_char(true); + } + else if (ch == quote) break; + ret += ch; + } + return token("string", ret); + }); + + function read_line_comment() { + next(); + var i = find("\n"), ret; + if (i == -1) { + ret = S.text.substr(S.pos); + S.pos = S.text.length; + } else { + ret = S.text.substring(S.pos, i); + S.pos = i; + } + return token("comment1", ret, true); + }; + + var read_multiline_comment = with_eof_error("Unterminated multiline comment", function(){ + next(); + var i = find("*/", true); + var text = S.text.substring(S.pos, i); + var a = text.split("\n"), n = a.length; + // update stream position + S.pos = i + 2; + S.line += n - 1; + if (n > 1) S.col = a[n - 1].length; + else S.col += a[n - 1].length; + S.col += 2; + S.newline_before = S.newline_before || text.indexOf("\n") >= 0; + return token("comment2", text, true); + }); + + function read_name() { + var backslash = false, name = "", ch, escaped = false, hex; + while ((ch = peek()) != null) { + if (!backslash) { + if (ch == "\\") escaped = backslash = true, next(); + else if (is_identifier_char(ch)) name += next(); + else break; + } + else { + if (ch != "u") parse_error("Expecting UnicodeEscapeSequence -- uXXXX"); + ch = read_escaped_char(); + if (!is_identifier_char(ch)) parse_error("Unicode char: " + ch.charCodeAt(0) + " is not valid in identifier"); + name += ch; + backslash = false; + } + } + if (KEYWORDS(name) && escaped) { + hex = name.charCodeAt(0).toString(16).toUpperCase(); + name = "\\u" + "0000".substr(hex.length) + hex + name.slice(1); + } + return name; + }; + + var read_regexp = with_eof_error("Unterminated regular expression", function(regexp){ + var prev_backslash = false, ch, in_class = false; + while ((ch = next(true))) if (prev_backslash) { + regexp += "\\" + ch; + prev_backslash = false; + } else if (ch == "[") { + in_class = true; + regexp += ch; + } else if (ch == "]" && in_class) { + in_class = false; + regexp += ch; + } else if (ch == "/" && !in_class) { + break; + } else if (ch == "\\") { + prev_backslash = true; + } else { + regexp += ch; + } + var mods = read_name(); + return token("regexp", new RegExp(regexp, mods)); + }); + + function read_operator(prefix) { + function grow(op) { + if (!peek()) return op; + var bigger = op + peek(); + if (OPERATORS(bigger)) { + next(); + return grow(bigger); + } else { + return op; + } + }; + return token("operator", grow(prefix || next())); + }; + + function handle_slash() { + next(); + var regex_allowed = S.regex_allowed; + switch (peek()) { + case "/": + S.comments_before.push(read_line_comment()); + S.regex_allowed = regex_allowed; + return next_token(); + case "*": + S.comments_before.push(read_multiline_comment()); + S.regex_allowed = regex_allowed; + return next_token(); + } + return S.regex_allowed ? read_regexp("") : read_operator("/"); + }; + + function handle_dot() { + next(); + return is_digit(peek().charCodeAt(0)) + ? read_num(".") + : token("punc", "."); + }; + + function read_word() { + var word = read_name(); + return KEYWORDS_ATOM(word) ? token("atom", word) + : !KEYWORDS(word) ? token("name", word) + : OPERATORS(word) ? token("operator", word) + : token("keyword", word); + }; + + function with_eof_error(eof_error, cont) { + return function(x) { + try { + return cont(x); + } catch(ex) { + if (ex === EX_EOF) parse_error(eof_error); + else throw ex; + } + }; + }; + + function next_token(force_regexp) { + if (force_regexp != null) + return read_regexp(force_regexp); + skip_whitespace(); + start_token(); + var ch = peek(); + if (!ch) return token("eof"); + var code = ch.charCodeAt(0); + switch (code) { + case 34: case 39: return read_string(); + case 46: return handle_dot(); + case 47: return handle_slash(); + } + if (is_digit(code)) return read_num(); + if (PUNC_CHARS(ch)) return token("punc", next()); + if (OPERATOR_CHARS(ch)) return read_operator(); + if (code == 92 || is_identifier_start(code)) return read_word(); + parse_error("Unexpected character '" + ch + "'"); + }; + + next_token.context = function(nc) { + if (nc) S = nc; + return S; + }; + + return next_token; + +}; + +/* -----[ Parser (constants) ]----- */ + +var UNARY_PREFIX = makePredicate([ + "typeof", + "void", + "delete", + "--", + "++", + "!", + "~", + "-", + "+" +]); + +var UNARY_POSTFIX = makePredicate([ "--", "++" ]); + +var ASSIGNMENT = makePredicate([ "=", "+=", "-=", "/=", "*=", "%=", ">>=", "<<=", ">>>=", "|=", "^=", "&=" ]); + +var PRECEDENCE = (function(a, ret){ + for (var i = 0, n = 1; i < a.length; ++i, ++n) { + var b = a[i]; + for (var j = 0; j < b.length; ++j) { + ret[b[j]] = n; + } + } + return ret; +})( + [ + ["||"], + ["&&"], + ["|"], + ["^"], + ["&"], + ["==", "===", "!=", "!=="], + ["<", ">", "<=", ">=", "in", "instanceof"], + [">>", "<<", ">>>"], + ["+", "-"], + ["*", "/", "%"] + ], + {} +); + +var STATEMENTS_WITH_LABELS = array_to_hash([ "for", "do", "while", "switch" ]); + +var ATOMIC_START_TOKEN = array_to_hash([ "atom", "num", "string", "regexp", "name" ]); + +/* -----[ Parser ]----- */ + +function parse($TEXT, options) { + + options = defaults(options, { + strict : false, + filename : null, + toplevel : null + }); + + var S = { + input : typeof $TEXT == "string" ? tokenizer($TEXT, options.filename) : $TEXT, + token : null, + prev : null, + peeked : null, + in_function : 0, + in_directives : true, + in_loop : 0, + labels : [] + }; + + S.token = next(); + + function is(type, value) { + return is_token(S.token, type, value); + }; + + function peek() { return S.peeked || (S.peeked = S.input()); }; + + function next() { + S.prev = S.token; + if (S.peeked) { + S.token = S.peeked; + S.peeked = null; + } else { + S.token = S.input(); + } + S.in_directives = S.in_directives && ( + S.token.type == "string" || is("punc", ";") + ); + return S.token; + }; + + function prev() { + return S.prev; + }; + + function croak(msg, line, col, pos) { + var ctx = S.input.context(); + js_error(msg, + ctx.filename, + line != null ? line : ctx.tokline, + col != null ? col : ctx.tokcol, + pos != null ? pos : ctx.tokpos); + }; + + function token_error(token, msg) { + croak(msg, token.line, token.col); + }; + + function unexpected(token) { + if (token == null) + token = S.token; + token_error(token, "Unexpected token: " + token.type + " (" + token.value + ")"); + }; + + function expect_token(type, val) { + if (is(type, val)) { + return next(); + } + token_error(S.token, "Unexpected token " + S.token.type + " «" + S.token.value + "»" + ", expected " + type + " «" + val + "»"); + }; + + function expect(punc) { return expect_token("punc", punc); }; + + function can_insert_semicolon() { + return !options.strict && ( + S.token.nlb || is("eof") || is("punc", "}") + ); + }; + + function semicolon() { + if (is("punc", ";")) next(); + else if (!can_insert_semicolon()) unexpected(); + }; + + function parenthesised() { + expect("("); + var exp = expression(true); + expect(")"); + return exp; + }; + + function embed_tokens(parser) { + return function() { + var start = S.token; + var expr = parser(); + var end = prev(); + expr.start = start; + expr.end = end; + return expr; + }; + }; + + var statement = embed_tokens(function() { + var tmp; + if (is("operator", "/") || is("operator", "/=")) { + S.peeked = null; + S.token = S.input(S.token.value.substr(1)); // force regexp + } + switch (S.token.type) { + case "string": + var dir = S.in_directives, stat = simple_statement(); + // XXXv2: decide how to fix directives + if (dir && stat.body instanceof AST_String && !is("punc", ",")) + return new AST_Directive({ value: stat.body.value }); + return stat; + case "num": + case "regexp": + case "operator": + case "atom": + return simple_statement(); + + case "name": + return is_token(peek(), "punc", ":") + ? labeled_statement() + : simple_statement(); + + case "punc": + switch (S.token.value) { + case "{": + return new AST_BlockStatement({ + start : S.token, + body : block_(), + end : prev() + }); + case "[": + case "(": + return simple_statement(); + case ";": + next(); + return new AST_EmptyStatement(); + default: + unexpected(); + } + + case "keyword": + switch (tmp = S.token.value, next(), tmp) { + case "break": + return break_cont(AST_Break); + + case "continue": + return break_cont(AST_Continue); + + case "debugger": + semicolon(); + return new AST_Debugger(); + + case "do": + return new AST_Do({ + body : in_loop(statement), + condition : (expect_token("keyword", "while"), tmp = parenthesised(), semicolon(), tmp) + }); + + case "while": + return new AST_While({ + condition : parenthesised(), + body : in_loop(statement) + }); + + case "for": + return for_(); + + case "function": + return function_(true); + + case "if": + return if_(); + + case "return": + if (S.in_function == 0) + croak("'return' outside of function"); + return new AST_Return({ + value: ( is("punc", ";") + ? (next(), null) + : can_insert_semicolon() + ? null + : (tmp = expression(true), semicolon(), tmp) ) + }); + + case "switch": + return new AST_Switch({ + expression : parenthesised(), + body : in_loop(switch_body_) + }); + + case "throw": + if (S.token.nlb) + croak("Illegal newline after 'throw'"); + return new AST_Throw({ + value: (tmp = expression(true), semicolon(), tmp) + }); + + case "try": + return try_(); + + case "var": + return tmp = var_(), semicolon(), tmp; + + case "const": + return tmp = const_(), semicolon(), tmp; + + case "with": + return new AST_With({ + expression : parenthesised(), + body : statement() + }); + + default: + unexpected(); + } + } + }); + + function labeled_statement() { + var label = as_symbol(AST_Label); + if (find_if(function(l){ return l.name == label.name }, S.labels)) { + // ECMA-262, 12.12: An ECMAScript program is considered + // syntactically incorrect if it contains a + // LabelledStatement that is enclosed by a + // LabelledStatement with the same Identifier as label. + croak("Label " + label.name + " defined twice"); + } + expect(":"); + S.labels.push(label); + var stat = statement(); + S.labels.pop(); + return new AST_LabeledStatement({ body: stat, label: label }); + }; + + function simple_statement(tmp) { + return new AST_SimpleStatement({ body: (tmp = expression(true), semicolon(), tmp) }); + }; + + function break_cont(type) { + var label = null; + if (!can_insert_semicolon()) { + label = as_symbol(AST_LabelRef, true); + } + if (label != null) { + if (!find_if(function(l){ return l.name == label.name }, S.labels)) + croak("Undefined label " + label.name); + } + else if (S.in_loop == 0) + croak(type.TYPE + " not inside a loop or switch"); + semicolon(); + return new type({ label: label }); + }; + + function for_() { + expect("("); + var init = null; + if (!is("punc", ";")) { + init = is("keyword", "var") + ? (next(), var_(true)) + : expression(true, true); + if (is("operator", "in")) { + if (init instanceof AST_Var && init.definitions.length > 1) + croak("Only one variable declaration allowed in for..in loop"); + next(); + return for_in(init); + } + } + return regular_for(init); + }; + + function regular_for(init) { + expect(";"); + var test = is("punc", ";") ? null : expression(true); + expect(";"); + var step = is("punc", ")") ? null : expression(true); + expect(")"); + return new AST_For({ + init : init, + condition : test, + step : step, + body : in_loop(statement) + }); + }; + + function for_in(init) { + var lhs = init instanceof AST_Var ? init.definitions[0].name : null; + var obj = expression(true); + expect(")"); + return new AST_ForIn({ + init : init, + name : lhs, + object : obj, + body : in_loop(statement) + }); + }; + + var function_ = function(in_statement, ctor) { + var is_accessor = ctor === AST_Accessor; + var name = (is("name") ? as_symbol(in_statement + ? AST_SymbolDefun + : is_accessor + ? AST_SymbolAccessor + : AST_SymbolLambda) + : is_accessor && (is("string") || is("num")) ? as_atom_node() + : null); + if (in_statement && !name) + unexpected(); + expect("("); + if (!ctor) ctor = in_statement ? AST_Defun : AST_Function; + return new ctor({ + name: name, + argnames: (function(first, a){ + while (!is("punc", ")")) { + if (first) first = false; else expect(","); + a.push(as_symbol(AST_SymbolFunarg)); + } + next(); + return a; + })(true, []), + body: (function(loop, labels){ + ++S.in_function; + S.in_directives = true; + S.in_loop = 0; + S.labels = []; + var a = block_(); + --S.in_function; + S.in_loop = loop; + S.labels = labels; + return a; + })(S.in_loop, S.labels) + }); + }; + + function if_() { + var cond = parenthesised(), body = statement(), belse = null; + if (is("keyword", "else")) { + next(); + belse = statement(); + } + return new AST_If({ + condition : cond, + body : body, + alternative : belse + }); + }; + + function block_() { + expect("{"); + var a = []; + while (!is("punc", "}")) { + if (is("eof")) unexpected(); + a.push(statement()); + } + next(); + return a; + }; + + function switch_body_() { + expect("{"); + var a = [], cur = null, branch = null, tmp; + while (!is("punc", "}")) { + if (is("eof")) unexpected(); + if (is("keyword", "case")) { + if (branch) branch.end = prev(); + cur = []; + branch = new AST_Case({ + start : (tmp = S.token, next(), tmp), + expression : expression(true), + body : cur + }); + a.push(branch); + expect(":"); + } + else if (is("keyword", "default")) { + if (branch) branch.end = prev(); + cur = []; + branch = new AST_Default({ + start : (tmp = S.token, next(), expect(":"), tmp), + body : cur + }); + a.push(branch); + } + else { + if (!cur) unexpected(); + cur.push(statement()); + } + } + if (branch) branch.end = prev(); + next(); + return a; + }; + + function try_() { + var body = block_(), bcatch = null, bfinally = null; + if (is("keyword", "catch")) { + var start = S.token; + next(); + expect("("); + var name = as_symbol(AST_SymbolCatch); + expect(")"); + bcatch = new AST_Catch({ + start : start, + argname : name, + body : block_(), + end : prev() + }); + } + if (is("keyword", "finally")) { + var start = S.token; + next(); + bfinally = new AST_Finally({ + start : start, + body : block_(), + end : prev() + }); + } + if (!bcatch && !bfinally) + croak("Missing catch/finally blocks"); + return new AST_Try({ + body : body, + bcatch : bcatch, + bfinally : bfinally + }); + }; + + function vardefs(no_in, in_const) { + var a = []; + for (;;) { + a.push(new AST_VarDef({ + start : S.token, + name : as_symbol(in_const ? AST_SymbolConst : AST_SymbolVar), + value : is("operator", "=") ? (next(), expression(false, no_in)) : null, + end : prev() + })); + if (!is("punc", ",")) + break; + next(); + } + return a; + }; + + var var_ = function(no_in) { + return new AST_Var({ + start : prev(), + definitions : vardefs(no_in, false), + end : prev() + }); + }; + + var const_ = function() { + return new AST_Const({ + start : prev(), + definitions : vardefs(false, true), + end : prev() + }); + }; + + var new_ = function() { + var start = S.token; + expect_token("operator", "new"); + var newexp = expr_atom(false), args; + if (is("punc", "(")) { + next(); + args = expr_list(")"); + } else { + args = []; + } + return subscripts(new AST_New({ + start : start, + expression : newexp, + args : args, + end : prev() + }), true); + }; + + function as_atom_node() { + var tok = S.token, ret; + switch (tok.type) { + case "name": + return as_symbol(AST_SymbolRef); + case "num": + ret = new AST_Number({ start: tok, end: tok, value: tok.value }); + break; + case "string": + ret = new AST_String({ start: tok, end: tok, value: tok.value }); + break; + case "regexp": + ret = new AST_RegExp({ start: tok, end: tok, value: tok.value }); + break; + case "atom": + switch (tok.value) { + case "false": + ret = new AST_False({ start: tok, end: tok }); + break; + case "true": + ret = new AST_True({ start: tok, end: tok }); + break; + case "null": + ret = new AST_Null({ start: tok, end: tok }); + break; + } + break; + } + next(); + return ret; + }; + + var expr_atom = function(allow_calls) { + if (is("operator", "new")) { + return new_(); + } + var start = S.token; + if (is("punc")) { + switch (start.value) { + case "(": + next(); + var ex = expression(true); + ex.start = start; + ex.end = S.token; + expect(")"); + return subscripts(ex, allow_calls); + case "[": + return subscripts(array_(), allow_calls); + case "{": + return subscripts(object_(), allow_calls); + } + unexpected(); + } + if (is("keyword", "function")) { + next(); + var func = function_(false); + func.start = start; + func.end = prev(); + return subscripts(func, allow_calls); + } + if (ATOMIC_START_TOKEN[S.token.type]) { + return subscripts(as_atom_node(), allow_calls); + } + unexpected(); + }; + + function expr_list(closing, allow_trailing_comma, allow_empty) { + var first = true, a = []; + while (!is("punc", closing)) { + if (first) first = false; else expect(","); + if (allow_trailing_comma && is("punc", closing)) break; + if (is("punc", ",") && allow_empty) { + a.push(new AST_Hole({ start: S.token, end: S.token })); + } else { + a.push(expression(false)); + } + } + next(); + return a; + }; + + var array_ = embed_tokens(function() { + expect("["); + return new AST_Array({ + elements: expr_list("]", !options.strict, true) + }); + }); + + var object_ = embed_tokens(function() { + expect("{"); + var first = true, a = []; + while (!is("punc", "}")) { + if (first) first = false; else expect(","); + if (!options.strict && is("punc", "}")) + // allow trailing comma + break; + var start = S.token; + var type = start.type; + var name = as_property_name(); + if (type == "name" && !is("punc", ":")) { + if (name == "get") { + a.push(new AST_ObjectGetter({ + start : start, + key : name, + value : function_(false, AST_Accessor), + end : prev() + })); + continue; + } + if (name == "set") { + a.push(new AST_ObjectSetter({ + start : start, + key : name, + value : function_(false, AST_Accessor), + end : prev() + })); + continue; + } + } + expect(":"); + a.push(new AST_ObjectKeyVal({ + start : start, + key : name, + value : expression(false), + end : prev() + })); + } + next(); + return new AST_Object({ properties: a }); + }); + + function as_property_name() { + var tmp = S.token; + next(); + switch (tmp.type) { + case "num": + case "string": + case "name": + case "operator": + case "keyword": + case "atom": + return tmp.value; + default: + unexpected(); + } + }; + + function as_name() { + var tmp = S.token; + next(); + switch (tmp.type) { + case "name": + case "operator": + case "keyword": + case "atom": + return tmp.value; + default: + unexpected(); + } + }; + + function as_symbol(type, noerror) { + if (!is("name")) { + if (!noerror) croak("Name expected"); + return null; + } + var name = S.token.value; + var sym = new (name == "this" ? AST_This : type)({ + name : String(S.token.value), + start : S.token, + end : S.token + }); + next(); + return sym; + }; + + var subscripts = function(expr, allow_calls) { + var start = expr.start; + if (is("punc", ".")) { + next(); + return subscripts(new AST_Dot({ + start : start, + expression : expr, + property : as_name(), + end : prev() + }), allow_calls); + } + if (is("punc", "[")) { + next(); + var prop = expression(true); + expect("]"); + return subscripts(new AST_Sub({ + start : start, + expression : expr, + property : prop, + end : prev() + }), allow_calls); + } + if (allow_calls && is("punc", "(")) { + next(); + return subscripts(new AST_Call({ + start : start, + expression : expr, + args : expr_list(")"), + end : prev() + }), true); + } + return expr; + }; + + var maybe_unary = function(allow_calls) { + var start = S.token; + if (is("operator") && UNARY_PREFIX(start.value)) { + next(); + var ex = make_unary(AST_UnaryPrefix, start.value, maybe_unary(allow_calls)); + ex.start = start; + ex.end = prev(); + return ex; + } + var val = expr_atom(allow_calls); + while (is("operator") && UNARY_POSTFIX(S.token.value) && !S.token.nlb) { + val = make_unary(AST_UnaryPostfix, S.token.value, val); + val.start = start; + val.end = S.token; + next(); + } + return val; + }; + + function make_unary(ctor, op, expr) { + if ((op == "++" || op == "--") && !is_assignable(expr)) + croak("Invalid use of " + op + " operator"); + return new ctor({ operator: op, expression: expr }); + }; + + var expr_op = function(left, min_prec, no_in) { + var op = is("operator") ? S.token.value : null; + if (op == "in" && no_in) op = null; + var prec = op != null ? PRECEDENCE[op] : null; + if (prec != null && prec > min_prec) { + next(); + var right = expr_op(maybe_unary(true), prec, no_in); + return expr_op(new AST_Binary({ + start : left.start, + left : left, + operator : op, + right : right, + end : right.end + }), min_prec, no_in); + } + return left; + }; + + function expr_ops(no_in) { + return expr_op(maybe_unary(true), 0, no_in); + }; + + var maybe_conditional = function(no_in) { + var start = S.token; + var expr = expr_ops(no_in); + if (is("operator", "?")) { + next(); + var yes = expression(false); + expect(":"); + return new AST_Conditional({ + start : start, + condition : expr, + consequent : yes, + alternative : expression(false, no_in), + end : peek() + }); + } + return expr; + }; + + function is_assignable(expr) { + if (!options.strict) return true; + switch (expr[0]+"") { + case "dot": + case "sub": + case "new": + case "call": + return true; + case "name": + return expr[1] != "this"; + } + }; + + var maybe_assign = function(no_in) { + var start = S.token; + var left = maybe_conditional(no_in), val = S.token.value; + if (is("operator") && ASSIGNMENT(val)) { + if (is_assignable(left)) { + next(); + return new AST_Assign({ + start : start, + left : left, + operator : val, + right : maybe_assign(no_in), + end : prev() + }); + } + croak("Invalid assignment"); + } + return left; + }; + + var expression = function(commas, no_in) { + var start = S.token; + var expr = maybe_assign(no_in); + if (commas && is("punc", ",")) { + next(); + return new AST_Seq({ + start : start, + car : expr, + cdr : expression(true, no_in), + end : peek() + }); + } + return expr; + }; + + function in_loop(cont) { + ++S.in_loop; + var ret = cont(); + --S.in_loop; + return ret; + }; + + return (function(){ + var start = S.token; + var body = []; + while (!is("eof")) + body.push(statement()); + var end = prev(); + var toplevel = options.toplevel; + if (toplevel) { + toplevel.body = toplevel.body.concat(body); + toplevel.end = end; + } else { + toplevel = new AST_Toplevel({ start: start, body: body, end: end }); + } + return toplevel; + })(); + +}; diff --git a/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/lib/scope.js b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/lib/scope.js new file mode 100644 index 00000000..f23f6eb9 --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/lib/scope.js @@ -0,0 +1,580 @@ +/*********************************************************************** + + A JavaScript tokenizer / parser / beautifier / compressor. + https://github.com/mishoo/UglifyJS2 + + -------------------------------- (C) --------------------------------- + + Author: Mihai Bazon + + http://mihai.bazon.net/blog + + Distributed under the BSD license: + + Copyright 2012 (c) Mihai Bazon + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above + copyright notice, this list of conditions and the following + disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials + provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + ***********************************************************************/ + +"use strict"; + +function SymbolDef(scope, index, orig) { + this.name = orig.name; + this.orig = [ orig ]; + this.scope = scope; + this.references = []; + this.global = false; + this.mangled_name = null; + this.undeclared = false; + this.constant = false; + this.index = index; +}; + +SymbolDef.prototype = { + unmangleable: function(options) { + return this.global + || this.undeclared + || (!(options && options.eval) && (this.scope.uses_eval || this.scope.uses_with)); + }, + mangle: function(options) { + if (!this.mangled_name && !this.unmangleable(options)) + this.mangled_name = this.scope.next_mangled(options); + } +}; + +AST_Toplevel.DEFMETHOD("figure_out_scope", function(){ + // This does what ast_add_scope did in UglifyJS v1. + // + // Part of it could be done at parse time, but it would complicate + // the parser (and it's already kinda complex). It's also worth + // having it separated because we might need to call it multiple + // times on the same tree. + + // pass 1: setup scope chaining and handle definitions + var self = this; + var scope = self.parent_scope = null; + var labels = new Dictionary(); + var nesting = 0; + var tw = new TreeWalker(function(node, descend){ + if (node instanceof AST_Scope) { + node.init_scope_vars(nesting); + var save_scope = node.parent_scope = scope; + var save_labels = labels; + ++nesting; + scope = node; + labels = new Dictionary(); + descend(); + labels = save_labels; + scope = save_scope; + --nesting; + return true; // don't descend again in TreeWalker + } + if (node instanceof AST_Directive) { + node.scope = scope; + push_uniq(scope.directives, node.value); + return true; + } + if (node instanceof AST_With) { + for (var s = scope; s; s = s.parent_scope) + s.uses_with = true; + return; + } + if (node instanceof AST_LabeledStatement) { + var l = node.label; + if (labels.has(l.name)) + throw new Error(string_template("Label {name} defined twice", l)); + labels.set(l.name, l); + descend(); + labels.del(l.name); + return true; // no descend again + } + if (node instanceof AST_Symbol) { + node.scope = scope; + } + if (node instanceof AST_Label) { + node.thedef = node; + node.init_scope_vars(); + } + if (node instanceof AST_SymbolLambda) { + //scope.def_function(node); + // + // https://github.com/mishoo/UglifyJS2/issues/24 — MSIE + // leaks function expression names into the containing + // scope. Don't like this fix but seems we can't do any + // better. IE: please die. Please! + (node.scope = scope.parent_scope).def_function(node); + } + else if (node instanceof AST_SymbolDefun) { + // Careful here, the scope where this should be defined is + // the parent scope. The reason is that we enter a new + // scope when we encounter the AST_Defun node (which is + // instanceof AST_Scope) but we get to the symbol a bit + // later. + (node.scope = scope.parent_scope).def_function(node); + } + else if (node instanceof AST_SymbolVar + || node instanceof AST_SymbolConst) { + var def = scope.def_variable(node); + def.constant = node instanceof AST_SymbolConst; + def.init = tw.parent().value; + } + else if (node instanceof AST_SymbolCatch) { + // XXX: this is wrong according to ECMA-262 (12.4). the + // `catch` argument name should be visible only inside the + // catch block. For a quick fix AST_Catch should inherit + // from AST_Scope. Keeping it this way because of IE, + // which doesn't obey the standard. (it introduces the + // identifier in the enclosing scope) + scope.def_variable(node); + } + if (node instanceof AST_LabelRef) { + var sym = labels.get(node.name); + if (!sym) throw new Error(string_template("Undefined label {name} [{line},{col}]", { + name: node.name, + line: node.start.line, + col: node.start.col + })); + node.thedef = sym; + } + }); + self.walk(tw); + + // pass 2: find back references and eval + var func = null; + var globals = self.globals = new Dictionary(); + var tw = new TreeWalker(function(node, descend){ + if (node instanceof AST_Lambda) { + var prev_func = func; + func = node; + descend(); + func = prev_func; + return true; + } + if (node instanceof AST_LabelRef) { + node.reference(); + return true; + } + if (node instanceof AST_SymbolRef) { + var name = node.name; + var sym = node.scope.find_variable(name); + if (!sym) { + var g; + if (globals.has(name)) { + g = globals.get(name); + } else { + g = new SymbolDef(self, globals.size(), node); + g.undeclared = true; + globals.set(name, g); + } + node.thedef = g; + if (name == "eval" && tw.parent() instanceof AST_Call) { + for (var s = node.scope; s && !s.uses_eval; s = s.parent_scope) + s.uses_eval = true; + } + if (name == "arguments") { + func.uses_arguments = true; + } + } else { + node.thedef = sym; + } + node.reference(); + return true; + } + }); + self.walk(tw); +}); + +AST_Scope.DEFMETHOD("init_scope_vars", function(nesting){ + this.directives = []; // contains the directives defined in this scope, i.e. "use strict" + this.variables = new Dictionary(); // map name to AST_SymbolVar (variables defined in this scope; includes functions) + this.functions = new Dictionary(); // map name to AST_SymbolDefun (functions defined in this scope) + this.uses_with = false; // will be set to true if this or some nested scope uses the `with` statement + this.uses_eval = false; // will be set to true if this or nested scope uses the global `eval` + this.parent_scope = null; // the parent scope + this.enclosed = []; // a list of variables from this or outer scope(s) that are referenced from this or inner scopes + this.cname = -1; // the current index for mangling functions/variables + this.nesting = nesting; // the nesting level of this scope (0 means toplevel) +}); + +AST_Scope.DEFMETHOD("strict", function(){ + return this.has_directive("use strict"); +}); + +AST_Lambda.DEFMETHOD("init_scope_vars", function(){ + AST_Scope.prototype.init_scope_vars.apply(this, arguments); + this.uses_arguments = false; +}); + +AST_SymbolRef.DEFMETHOD("reference", function() { + var def = this.definition(); + def.references.push(this); + var s = this.scope; + while (s) { + push_uniq(s.enclosed, def); + if (s === def.scope) break; + s = s.parent_scope; + } + this.frame = this.scope.nesting - def.scope.nesting; +}); + +AST_Label.DEFMETHOD("init_scope_vars", function(){ + this.references = []; +}); + +AST_LabelRef.DEFMETHOD("reference", function(){ + this.thedef.references.push(this); +}); + +AST_Scope.DEFMETHOD("find_variable", function(name){ + if (name instanceof AST_Symbol) name = name.name; + return this.variables.get(name) + || (this.parent_scope && this.parent_scope.find_variable(name)); +}); + +AST_Scope.DEFMETHOD("has_directive", function(value){ + return this.parent_scope && this.parent_scope.has_directive(value) + || (this.directives.indexOf(value) >= 0 ? this : null); +}); + +AST_Scope.DEFMETHOD("def_function", function(symbol){ + this.functions.set(symbol.name, this.def_variable(symbol)); +}); + +AST_Scope.DEFMETHOD("def_variable", function(symbol){ + var def; + if (!this.variables.has(symbol.name)) { + def = new SymbolDef(this, this.variables.size(), symbol); + this.variables.set(symbol.name, def); + def.global = !this.parent_scope; + } else { + def = this.variables.get(symbol.name); + def.orig.push(symbol); + } + return symbol.thedef = def; +}); + +AST_Scope.DEFMETHOD("next_mangled", function(options){ + var ext = this.enclosed, n = ext.length; + out: while (true) { + var m = base54(++this.cname); + if (!is_identifier(m)) continue; // skip over "do" + // we must ensure that the mangled name does not shadow a name + // from some parent scope that is referenced in this or in + // inner scopes. + for (var i = n; --i >= 0;) { + var sym = ext[i]; + var name = sym.mangled_name || (sym.unmangleable(options) && sym.name); + if (m == name) continue out; + } + return m; + } +}); + +AST_Scope.DEFMETHOD("references", function(sym){ + if (sym instanceof AST_Symbol) sym = sym.definition(); + return this.enclosed.indexOf(sym) < 0 ? null : sym; +}); + +AST_Symbol.DEFMETHOD("unmangleable", function(options){ + return this.definition().unmangleable(options); +}); + +// property accessors are not mangleable +AST_SymbolAccessor.DEFMETHOD("unmangleable", function(){ + return true; +}); + +// labels are always mangleable +AST_Label.DEFMETHOD("unmangleable", function(){ + return false; +}); + +AST_Symbol.DEFMETHOD("unreferenced", function(){ + return this.definition().references.length == 0 + && !(this.scope.uses_eval || this.scope.uses_with); +}); + +AST_Symbol.DEFMETHOD("undeclared", function(){ + return this.definition().undeclared; +}); + +AST_LabelRef.DEFMETHOD("undeclared", function(){ + return false; +}); + +AST_Label.DEFMETHOD("undeclared", function(){ + return false; +}); + +AST_Symbol.DEFMETHOD("definition", function(){ + return this.thedef; +}); + +AST_Symbol.DEFMETHOD("global", function(){ + return this.definition().global; +}); + +AST_Toplevel.DEFMETHOD("_default_mangler_options", function(options){ + return defaults(options, { + except : [], + eval : false, + sort : false + }); +}); + +AST_Toplevel.DEFMETHOD("mangle_names", function(options){ + options = this._default_mangler_options(options); + // We only need to mangle declaration nodes. Special logic wired + // into the code generator will display the mangled name if it's + // present (and for AST_SymbolRef-s it'll use the mangled name of + // the AST_SymbolDeclaration that it points to). + var lname = -1; + var to_mangle = []; + var tw = new TreeWalker(function(node, descend){ + if (node instanceof AST_LabeledStatement) { + // lname is incremented when we get to the AST_Label + var save_nesting = lname; + descend(); + lname = save_nesting; + return true; // don't descend again in TreeWalker + } + if (node instanceof AST_Scope) { + var p = tw.parent(), a = []; + node.variables.each(function(symbol){ + if (options.except.indexOf(symbol.name) < 0) { + a.push(symbol); + } + }); + if (options.sort) a.sort(function(a, b){ + return b.references.length - a.references.length; + }); + to_mangle.push.apply(to_mangle, a); + return; + } + if (node instanceof AST_Label) { + var name; + do name = base54(++lname); while (!is_identifier(name)); + node.mangled_name = name; + return true; + } + }); + this.walk(tw); + to_mangle.forEach(function(def){ def.mangle(options) }); +}); + +AST_Toplevel.DEFMETHOD("compute_char_frequency", function(options){ + options = this._default_mangler_options(options); + var tw = new TreeWalker(function(node){ + if (node instanceof AST_Constant) + base54.consider(node.print_to_string()); + else if (node instanceof AST_Return) + base54.consider("return"); + else if (node instanceof AST_Throw) + base54.consider("throw"); + else if (node instanceof AST_Continue) + base54.consider("continue"); + else if (node instanceof AST_Break) + base54.consider("break"); + else if (node instanceof AST_Debugger) + base54.consider("debugger"); + else if (node instanceof AST_Directive) + base54.consider(node.value); + else if (node instanceof AST_While) + base54.consider("while"); + else if (node instanceof AST_Do) + base54.consider("do while"); + else if (node instanceof AST_If) { + base54.consider("if"); + if (node.alternative) base54.consider("else"); + } + else if (node instanceof AST_Var) + base54.consider("var"); + else if (node instanceof AST_Const) + base54.consider("const"); + else if (node instanceof AST_Lambda) + base54.consider("function"); + else if (node instanceof AST_For) + base54.consider("for"); + else if (node instanceof AST_ForIn) + base54.consider("for in"); + else if (node instanceof AST_Switch) + base54.consider("switch"); + else if (node instanceof AST_Case) + base54.consider("case"); + else if (node instanceof AST_Default) + base54.consider("default"); + else if (node instanceof AST_With) + base54.consider("with"); + else if (node instanceof AST_ObjectSetter) + base54.consider("set" + node.key); + else if (node instanceof AST_ObjectGetter) + base54.consider("get" + node.key); + else if (node instanceof AST_ObjectKeyVal) + base54.consider(node.key); + else if (node instanceof AST_New) + base54.consider("new"); + else if (node instanceof AST_This) + base54.consider("this"); + else if (node instanceof AST_Try) + base54.consider("try"); + else if (node instanceof AST_Catch) + base54.consider("catch"); + else if (node instanceof AST_Finally) + base54.consider("finally"); + else if (node instanceof AST_Symbol && node.unmangleable(options)) + base54.consider(node.name); + else if (node instanceof AST_Unary || node instanceof AST_Binary) + base54.consider(node.operator); + else if (node instanceof AST_Dot) + base54.consider(node.property); + }); + this.walk(tw); + base54.sort(); +}); + +var base54 = (function() { + var string = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ$_0123456789"; + var chars, frequency; + function reset() { + frequency = Object.create(null); + chars = string.split("").map(function(ch){ return ch.charCodeAt(0) }); + chars.forEach(function(ch){ frequency[ch] = 0 }); + } + base54.consider = function(str){ + for (var i = str.length; --i >= 0;) { + var code = str.charCodeAt(i); + if (code in frequency) ++frequency[code]; + } + }; + base54.sort = function() { + chars = mergeSort(chars, function(a, b){ + if (is_digit(a) && !is_digit(b)) return 1; + if (is_digit(b) && !is_digit(a)) return -1; + return frequency[b] - frequency[a]; + }); + }; + base54.reset = reset; + reset(); + base54.get = function(){ return chars }; + base54.freq = function(){ return frequency }; + function base54(num) { + var ret = "", base = 54; + do { + ret += String.fromCharCode(chars[num % base]); + num = Math.floor(num / base); + base = 64; + } while (num > 0); + return ret; + }; + return base54; +})(); + +AST_Toplevel.DEFMETHOD("scope_warnings", function(options){ + options = defaults(options, { + undeclared : false, // this makes a lot of noise + unreferenced : true, + assign_to_global : true, + func_arguments : true, + nested_defuns : true, + eval : true + }); + var tw = new TreeWalker(function(node){ + if (options.undeclared + && node instanceof AST_SymbolRef + && node.undeclared()) + { + // XXX: this also warns about JS standard names, + // i.e. Object, Array, parseInt etc. Should add a list of + // exceptions. + AST_Node.warn("Undeclared symbol: {name} [{file}:{line},{col}]", { + name: node.name, + file: node.start.file, + line: node.start.line, + col: node.start.col + }); + } + if (options.assign_to_global) + { + var sym = null; + if (node instanceof AST_Assign && node.left instanceof AST_SymbolRef) + sym = node.left; + else if (node instanceof AST_ForIn && node.init instanceof AST_SymbolRef) + sym = node.init; + if (sym + && (sym.undeclared() + || (sym.global() && sym.scope !== sym.definition().scope))) { + AST_Node.warn("{msg}: {name} [{file}:{line},{col}]", { + msg: sym.undeclared() ? "Accidental global?" : "Assignment to global", + name: sym.name, + file: sym.start.file, + line: sym.start.line, + col: sym.start.col + }); + } + } + if (options.eval + && node instanceof AST_SymbolRef + && node.undeclared() + && node.name == "eval") { + AST_Node.warn("Eval is used [{file}:{line},{col}]", node.start); + } + if (options.unreferenced + && (node instanceof AST_SymbolDeclaration || node instanceof AST_Label) + && node.unreferenced()) { + AST_Node.warn("{type} {name} is declared but not referenced [{file}:{line},{col}]", { + type: node instanceof AST_Label ? "Label" : "Symbol", + name: node.name, + file: node.start.file, + line: node.start.line, + col: node.start.col + }); + } + if (options.func_arguments + && node instanceof AST_Lambda + && node.uses_arguments) { + AST_Node.warn("arguments used in function {name} [{file}:{line},{col}]", { + name: node.name ? node.name.name : "anonymous", + file: node.start.file, + line: node.start.line, + col: node.start.col + }); + } + if (options.nested_defuns + && node instanceof AST_Defun + && !(tw.parent() instanceof AST_Scope)) { + AST_Node.warn("Function {name} declared in nested statement \"{type}\" [{file}:{line},{col}]", { + name: node.name.name, + type: tw.parent().TYPE, + file: node.start.file, + line: node.start.line, + col: node.start.col + }); + } + }); + this.walk(tw); +}); diff --git a/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/lib/sourcemap.js b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/lib/sourcemap.js new file mode 100644 index 00000000..34299081 --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/lib/sourcemap.js @@ -0,0 +1,81 @@ +/*********************************************************************** + + A JavaScript tokenizer / parser / beautifier / compressor. + https://github.com/mishoo/UglifyJS2 + + -------------------------------- (C) --------------------------------- + + Author: Mihai Bazon + + http://mihai.bazon.net/blog + + Distributed under the BSD license: + + Copyright 2012 (c) Mihai Bazon + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above + copyright notice, this list of conditions and the following + disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials + provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + ***********************************************************************/ + +"use strict"; + +// a small wrapper around fitzgen's source-map library +function SourceMap(options) { + options = defaults(options, { + file : null, + root : null, + orig : null, + }); + var generator = new MOZ_SourceMap.SourceMapGenerator({ + file : options.file, + sourceRoot : options.root + }); + var orig_map = options.orig && new MOZ_SourceMap.SourceMapConsumer(options.orig); + function add(source, gen_line, gen_col, orig_line, orig_col, name) { + if (orig_map) { + var info = orig_map.originalPositionFor({ + line: orig_line, + column: orig_col + }); + source = info.source; + orig_line = info.line; + orig_col = info.column; + name = info.name; + } + generator.addMapping({ + generated : { line: gen_line, column: gen_col }, + original : { line: orig_line, column: orig_col }, + source : source, + name : name + }); + }; + return { + add : add, + get : function() { return generator }, + toString : function() { return generator.toString() } + }; +}; diff --git a/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/lib/transform.js b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/lib/transform.js new file mode 100644 index 00000000..8b4fd9fd --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/lib/transform.js @@ -0,0 +1,218 @@ +/*********************************************************************** + + A JavaScript tokenizer / parser / beautifier / compressor. + https://github.com/mishoo/UglifyJS2 + + -------------------------------- (C) --------------------------------- + + Author: Mihai Bazon + + http://mihai.bazon.net/blog + + Distributed under the BSD license: + + Copyright 2012 (c) Mihai Bazon + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above + copyright notice, this list of conditions and the following + disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials + provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + ***********************************************************************/ + +"use strict"; + +// Tree transformer helpers. +// XXX: eventually I should refactor the compressor to use this infrastructure. + +function TreeTransformer(before, after) { + TreeWalker.call(this); + this.before = before; + this.after = after; +} +TreeTransformer.prototype = new TreeWalker; + +(function(undefined){ + + function _(node, descend) { + node.DEFMETHOD("transform", function(tw, in_list){ + var x, y; + tw.push(this); + if (tw.before) x = tw.before(this, descend, in_list); + if (x === undefined) { + if (!tw.after) { + x = this; + descend(x, tw); + } else { + tw.stack[tw.stack.length - 1] = x = this.clone(); + descend(x, tw); + y = tw.after(x, in_list); + if (y !== undefined) x = y; + } + } + tw.pop(); + return x; + }); + }; + + function do_list(list, tw) { + return MAP(list, function(node){ + return node.transform(tw, true); + }); + }; + + _(AST_Node, noop); + + _(AST_LabeledStatement, function(self, tw){ + self.label = self.label.transform(tw); + self.body = self.body.transform(tw); + }); + + _(AST_SimpleStatement, function(self, tw){ + self.body = self.body.transform(tw); + }); + + _(AST_Block, function(self, tw){ + self.body = do_list(self.body, tw); + }); + + _(AST_DWLoop, function(self, tw){ + self.condition = self.condition.transform(tw); + self.body = self.body.transform(tw); + }); + + _(AST_For, function(self, tw){ + if (self.init) self.init = self.init.transform(tw); + if (self.condition) self.condition = self.condition.transform(tw); + if (self.step) self.step = self.step.transform(tw); + self.body = self.body.transform(tw); + }); + + _(AST_ForIn, function(self, tw){ + self.init = self.init.transform(tw); + self.object = self.object.transform(tw); + self.body = self.body.transform(tw); + }); + + _(AST_With, function(self, tw){ + self.expression = self.expression.transform(tw); + self.body = self.body.transform(tw); + }); + + _(AST_Exit, function(self, tw){ + if (self.value) self.value = self.value.transform(tw); + }); + + _(AST_LoopControl, function(self, tw){ + if (self.label) self.label = self.label.transform(tw); + }); + + _(AST_If, function(self, tw){ + self.condition = self.condition.transform(tw); + self.body = self.body.transform(tw); + if (self.alternative) self.alternative = self.alternative.transform(tw); + }); + + _(AST_Switch, function(self, tw){ + self.expression = self.expression.transform(tw); + self.body = do_list(self.body, tw); + }); + + _(AST_Case, function(self, tw){ + self.expression = self.expression.transform(tw); + self.body = do_list(self.body, tw); + }); + + _(AST_Try, function(self, tw){ + self.body = do_list(self.body, tw); + if (self.bcatch) self.bcatch = self.bcatch.transform(tw); + if (self.bfinally) self.bfinally = self.bfinally.transform(tw); + }); + + _(AST_Catch, function(self, tw){ + self.argname = self.argname.transform(tw); + self.body = do_list(self.body, tw); + }); + + _(AST_Definitions, function(self, tw){ + self.definitions = do_list(self.definitions, tw); + }); + + _(AST_VarDef, function(self, tw){ + if (self.value) self.value = self.value.transform(tw); + }); + + _(AST_Lambda, function(self, tw){ + if (self.name) self.name = self.name.transform(tw); + self.argnames = do_list(self.argnames, tw); + self.body = do_list(self.body, tw); + }); + + _(AST_Call, function(self, tw){ + self.expression = self.expression.transform(tw); + self.args = do_list(self.args, tw); + }); + + _(AST_Seq, function(self, tw){ + self.car = self.car.transform(tw); + self.cdr = self.cdr.transform(tw); + }); + + _(AST_Dot, function(self, tw){ + self.expression = self.expression.transform(tw); + }); + + _(AST_Sub, function(self, tw){ + self.expression = self.expression.transform(tw); + self.property = self.property.transform(tw); + }); + + _(AST_Unary, function(self, tw){ + self.expression = self.expression.transform(tw); + }); + + _(AST_Binary, function(self, tw){ + self.left = self.left.transform(tw); + self.right = self.right.transform(tw); + }); + + _(AST_Conditional, function(self, tw){ + self.condition = self.condition.transform(tw); + self.consequent = self.consequent.transform(tw); + self.alternative = self.alternative.transform(tw); + }); + + _(AST_Array, function(self, tw){ + self.elements = do_list(self.elements, tw); + }); + + _(AST_Object, function(self, tw){ + self.properties = do_list(self.properties, tw); + }); + + _(AST_ObjectProperty, function(self, tw){ + self.value = self.value.transform(tw); + }); + +})(); diff --git a/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/lib/utils.js b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/lib/utils.js new file mode 100644 index 00000000..c95b9824 --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/lib/utils.js @@ -0,0 +1,288 @@ +/*********************************************************************** + + A JavaScript tokenizer / parser / beautifier / compressor. + https://github.com/mishoo/UglifyJS2 + + -------------------------------- (C) --------------------------------- + + Author: Mihai Bazon + + http://mihai.bazon.net/blog + + Distributed under the BSD license: + + Copyright 2012 (c) Mihai Bazon + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + * Redistributions of source code must retain the above + copyright notice, this list of conditions and the following + disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials + provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER “AS IS” AND ANY + EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE + LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR + TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF + THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + + ***********************************************************************/ + +"use strict"; + +function array_to_hash(a) { + var ret = Object.create(null); + for (var i = 0; i < a.length; ++i) + ret[a[i]] = true; + return ret; +}; + +function slice(a, start) { + return Array.prototype.slice.call(a, start || 0); +}; + +function characters(str) { + return str.split(""); +}; + +function member(name, array) { + for (var i = array.length; --i >= 0;) + if (array[i] == name) + return true; + return false; +}; + +function find_if(func, array) { + for (var i = 0, n = array.length; i < n; ++i) { + if (func(array[i])) + return array[i]; + } +}; + +function repeat_string(str, i) { + if (i <= 0) return ""; + if (i == 1) return str; + var d = repeat_string(str, i >> 1); + d += d; + if (i & 1) d += str; + return d; +}; + +function DefaultsError(msg, defs) { + this.msg = msg; + this.defs = defs; +}; + +function defaults(args, defs, croak) { + if (args === true) + args = {}; + var ret = args || {}; + if (croak) for (var i in ret) if (ret.hasOwnProperty(i) && !defs.hasOwnProperty(i)) + throw new DefaultsError("`" + i + "` is not a supported option", defs); + for (var i in defs) if (defs.hasOwnProperty(i)) { + ret[i] = (args && args.hasOwnProperty(i)) ? args[i] : defs[i]; + } + return ret; +}; + +function merge(obj, ext) { + for (var i in ext) if (ext.hasOwnProperty(i)) { + obj[i] = ext[i]; + } + return obj; +}; + +function noop() {}; + +var MAP = (function(){ + function MAP(a, f, backwards) { + var ret = [], top = [], i; + function doit() { + var val = f(a[i], i); + var is_last = val instanceof Last; + if (is_last) val = val.v; + if (val instanceof AtTop) { + val = val.v; + if (val instanceof Splice) { + top.push.apply(top, backwards ? val.v.slice().reverse() : val.v); + } else { + top.push(val); + } + } + else if (val !== skip) { + if (val instanceof Splice) { + ret.push.apply(ret, backwards ? val.v.slice().reverse() : val.v); + } else { + ret.push(val); + } + } + return is_last; + }; + if (a instanceof Array) { + if (backwards) { + for (i = a.length; --i >= 0;) if (doit()) break; + ret.reverse(); + top.reverse(); + } else { + for (i = 0; i < a.length; ++i) if (doit()) break; + } + } + else { + for (i in a) if (a.hasOwnProperty(i)) if (doit()) break; + } + return top.concat(ret); + }; + MAP.at_top = function(val) { return new AtTop(val) }; + MAP.splice = function(val) { return new Splice(val) }; + MAP.last = function(val) { return new Last(val) }; + var skip = MAP.skip = {}; + function AtTop(val) { this.v = val }; + function Splice(val) { this.v = val }; + function Last(val) { this.v = val }; + return MAP; +})(); + +function push_uniq(array, el) { + if (array.indexOf(el) < 0) + array.push(el); +}; + +function string_template(text, props) { + return text.replace(/\{(.+?)\}/g, function(str, p){ + return props[p]; + }); +}; + +function remove(array, el) { + for (var i = array.length; --i >= 0;) { + if (array[i] === el) array.splice(i, 1); + } +}; + +function mergeSort(array, cmp) { + if (array.length < 2) return array.slice(); + function merge(a, b) { + var r = [], ai = 0, bi = 0, i = 0; + while (ai < a.length && bi < b.length) { + cmp(a[ai], b[bi]) <= 0 + ? r[i++] = a[ai++] + : r[i++] = b[bi++]; + } + if (ai < a.length) r.push.apply(r, a.slice(ai)); + if (bi < b.length) r.push.apply(r, b.slice(bi)); + return r; + }; + function _ms(a) { + if (a.length <= 1) + return a; + var m = Math.floor(a.length / 2), left = a.slice(0, m), right = a.slice(m); + left = _ms(left); + right = _ms(right); + return merge(left, right); + }; + return _ms(array); +}; + +function set_difference(a, b) { + return a.filter(function(el){ + return b.indexOf(el) < 0; + }); +}; + +function set_intersection(a, b) { + return a.filter(function(el){ + return b.indexOf(el) >= 0; + }); +}; + +// this function is taken from Acorn [1], written by Marijn Haverbeke +// [1] https://github.com/marijnh/acorn +function makePredicate(words) { + if (!(words instanceof Array)) words = words.split(" "); + var f = "", cats = []; + out: for (var i = 0; i < words.length; ++i) { + for (var j = 0; j < cats.length; ++j) + if (cats[j][0].length == words[i].length) { + cats[j].push(words[i]); + continue out; + } + cats.push([words[i]]); + } + function compareTo(arr) { + if (arr.length == 1) return f += "return str === " + JSON.stringify(arr[0]) + ";"; + f += "switch(str){"; + for (var i = 0; i < arr.length; ++i) f += "case " + JSON.stringify(arr[i]) + ":"; + f += "return true}return false;"; + } + // When there are more than three length categories, an outer + // switch first dispatches on the lengths, to save on comparisons. + if (cats.length > 3) { + cats.sort(function(a, b) {return b.length - a.length;}); + f += "switch(str.length){"; + for (var i = 0; i < cats.length; ++i) { + var cat = cats[i]; + f += "case " + cat[0].length + ":"; + compareTo(cat); + } + f += "}"; + // Otherwise, simply generate a flat `switch` statement. + } else { + compareTo(words); + } + return new Function("str", f); +}; + +function Dictionary() { + this._values = Object.create(null); + this._size = 0; +}; +Dictionary.prototype = { + set: function(key, val) { + if (!this.has(key)) ++this._size; + this._values["$" + key] = val; + return this; + }, + add: function(key, val) { + if (this.has(key)) { + this.get(key).push(val); + } else { + this.set(key, [ val ]); + } + return this; + }, + get: function(key) { return this._values["$" + key] }, + del: function(key) { + if (this.has(key)) { + --this._size; + delete this._values["$" + key]; + } + return this; + }, + has: function(key) { return ("$" + key) in this._values }, + each: function(f) { + for (var i in this._values) + f(this._values[i], i.substr(1)); + }, + size: function() { + return this._size; + }, + map: function(f) { + var ret = []; + for (var i in this._values) + ret.push(f(this._values[i], i.substr(1))); + return ret; + } +}; diff --git a/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/package.json b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/package.json new file mode 100644 index 00000000..9ac4fcd5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/package.json @@ -0,0 +1,96 @@ +{ + "_args": [ + [ + { + "raw": "uglify-js@~2.2", + "scope": null, + "escapedName": "uglify-js", + "name": "uglify-js", + "rawSpec": "~2.2", + "spec": ">=2.2.0 <2.3.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/ruglify" + ] + ], + "_from": "uglify-js@>=2.2.0 <2.3.0", + "_id": "uglify-js@2.2.5", + "_inCache": true, + "_location": "/ruglify/uglify-js", + "_npmUser": { + "name": "mishoo", + "email": "mihai.bazon@gmail.com" + }, + "_npmVersion": "1.1.66", + "_phantomChildren": {}, + "_requested": { + "raw": "uglify-js@~2.2", + "scope": null, + "escapedName": "uglify-js", + "name": "uglify-js", + "rawSpec": "~2.2", + "spec": ">=2.2.0 <2.3.0", + "type": "range" + }, + "_requiredBy": [ + "/ruglify" + ], + "_resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.2.5.tgz", + "_shasum": "a6e02a70d839792b9780488b7b8b184c095c99c7", + "_shrinkwrap": null, + "_spec": "uglify-js@~2.2", + "_where": "/Users/MB/git/pdfkit/node_modules/ruglify", + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "bugs": { + "url": "https://github.com/mishoo/UglifyJS2/issues" + }, + "dependencies": { + "optimist": "~0.3.5", + "source-map": "~0.1.7" + }, + "description": "JavaScript parser, mangler/compressor and beautifier toolkit", + "devDependencies": {}, + "directories": {}, + "dist": { + "shasum": "a6e02a70d839792b9780488b7b8b184c095c99c7", + "tarball": "https://registry.npmjs.org/uglify-js/-/uglify-js-2.2.5.tgz" + }, + "engines": { + "node": ">=0.4.0" + }, + "homepage": "http://lisperator.net/uglifyjs", + "main": "tools/node.js", + "maintainers": [ + { + "name": "caires", + "email": "cairesvs@gmail.com" + }, + { + "name": "mape", + "email": "mape@mape.me" + }, + { + "name": "mishoo", + "email": "mihai.bazon@gmail.com" + } + ], + "name": "uglify-js", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repositories": [ + { + "type": "git", + "url": "git+https://github.com/mishoo/UglifyJS2.git" + } + ], + "repository": { + "type": "git", + "url": "git+https://github.com/mishoo/UglifyJS2.git" + }, + "scripts": { + "test": "node test/run-tests.js" + }, + "version": "2.2.5" +} diff --git a/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/arrays.js b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/arrays.js new file mode 100644 index 00000000..10fe6eb5 --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/arrays.js @@ -0,0 +1,12 @@ +holes_and_undefined: { + input: { + x = [1, 2, undefined]; + y = [1, , 2, ]; + z = [1, undefined, 3]; + } + expect: { + x=[1,2,void 0]; + y=[1,,2]; + z=[1,void 0,3]; + } +} diff --git a/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/blocks.js b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/blocks.js new file mode 100644 index 00000000..8372adf2 --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/blocks.js @@ -0,0 +1,49 @@ +remove_blocks: { + input: { + {;} + foo(); + {}; + { + {}; + }; + bar(); + {} + } + expect: { + foo(); + bar(); + } +} + +keep_some_blocks: { + input: { + // 1. + if (foo) { + {{{}}} + if (bar) { baz(); } + {{}} + } else { + stuff(); + } + + // 2. + if (foo) { + for (var i = 0; i < 5; ++i) + if (bar) baz(); + } else { + stuff(); + } + } + expect: { + // 1. + if (foo) { + if (bar) baz(); + } else stuff(); + + // 2. + if (foo) { + for (var i = 0; i < 5; ++i) + if (bar) baz(); + } else stuff(); + } +} diff --git a/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/conditionals.js b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/conditionals.js new file mode 100644 index 00000000..dc2bb671 --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/conditionals.js @@ -0,0 +1,143 @@ +ifs_1: { + options = { + conditionals: true + }; + input: { + if (foo) bar(); + if (!foo); else bar(); + if (foo); else bar(); + if (foo); else; + } + expect: { + foo&&bar(); + foo&&bar(); + foo||bar(); + foo; + } +} + +ifs_2: { + options = { + conditionals: true + }; + input: { + if (foo) { + x(); + } else if (bar) { + y(); + } else if (baz) { + z(); + } + + if (foo) { + x(); + } else if (bar) { + y(); + } else if (baz) { + z(); + } else { + t(); + } + } + expect: { + foo ? x() : bar ? y() : baz && z(); + foo ? x() : bar ? y() : baz ? z() : t(); + } +} + +ifs_3_should_warn: { + options = { + conditionals : true, + dead_code : true, + evaluate : true, + booleans : true + }; + input: { + if (x && !(x + "1") && y) { // 1 + var qq; + foo(); + } else { + bar(); + } + + if (x || !!(x + "1") || y) { // 2 + foo(); + } else { + var jj; + bar(); + } + } + expect: { + var qq; bar(); // 1 + var jj; foo(); // 2 + } +} + +ifs_4: { + options = { + conditionals: true + }; + input: { + if (foo && bar) { + x(foo)[10].bar.baz = something(); + } else + x(foo)[10].bar.baz = something_else(); + } + expect: { + x(foo)[10].bar.baz = (foo && bar) ? something() : something_else(); + } +} + +ifs_5: { + options = { + if_return: true, + conditionals: true, + comparisons: true, + }; + input: { + function f() { + if (foo) return; + bar(); + baz(); + } + function g() { + if (foo) return; + if (bar) return; + if (baz) return; + if (baa) return; + a(); + b(); + } + } + expect: { + function f() { + if (!foo) { + bar(); + baz(); + } + } + function g() { + if (!(foo || bar || baz || baa)) { + a(); + b(); + } + } + } +} + +ifs_6: { + options = { + conditionals: true, + comparisons: true + }; + input: { + if (!foo && !bar && !baz && !boo) { + x = 10; + } else { + x = 20; + } + } + expect: { + x = foo || bar || baz || boo ? 20 : 10; + } +} diff --git a/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/dead-code.js b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/dead-code.js new file mode 100644 index 00000000..0fd066eb --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/dead-code.js @@ -0,0 +1,89 @@ +dead_code_1: { + options = { + dead_code: true + }; + input: { + function f() { + a(); + b(); + x = 10; + return; + if (x) { + y(); + } + } + } + expect: { + function f() { + a(); + b(); + x = 10; + return; + } + } +} + +dead_code_2_should_warn: { + options = { + dead_code: true + }; + input: { + function f() { + g(); + x = 10; + throw "foo"; + // completely discarding the `if` would introduce some + // bugs. UglifyJS v1 doesn't deal with this issue; in v2 + // we copy any declarations to the upper scope. + if (x) { + y(); + var x; + function g(){}; + // but nested declarations should not be kept. + (function(){ + var q; + function y(){}; + })(); + } + } + } + expect: { + function f() { + g(); + x = 10; + throw "foo"; + var x; + function g(){}; + } + } +} + +dead_code_constant_boolean_should_warn_more: { + options = { + dead_code : true, + loops : true, + booleans : true, + conditionals : true, + evaluate : true + }; + input: { + while (!((foo && bar) || (x + "0"))) { + console.log("unreachable"); + var foo; + function bar() {} + } + for (var x = 10; x && (y || x) && (!typeof x); ++x) { + asdf(); + foo(); + var moo; + } + } + expect: { + var foo; + function bar() {} + // nothing for the while + // as for the for, it should keep: + var x = 10; + var moo; + } +} diff --git a/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/debugger.js b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/debugger.js new file mode 100644 index 00000000..7c270734 --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/debugger.js @@ -0,0 +1,24 @@ +keep_debugger: { + options = { + drop_debugger: false + }; + input: { + debugger; + } + expect: { + debugger; + } +} + +drop_debugger: { + options = { + drop_debugger: true + }; + input: { + debugger; + if (foo) debugger; + } + expect: { + if (foo); + } +} diff --git a/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/drop-unused.js b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/drop-unused.js new file mode 100644 index 00000000..bf5cd296 --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/drop-unused.js @@ -0,0 +1,97 @@ +unused_funarg_1: { + options = { unused: true }; + input: { + function f(a, b, c, d, e) { + return a + b; + } + } + expect: { + function f(a, b) { + return a + b; + } + } +} + +unused_funarg_2: { + options = { unused: true }; + input: { + function f(a, b, c, d, e) { + return a + c; + } + } + expect: { + function f(a, b, c) { + return a + c; + } + } +} + +unused_nested_function: { + options = { unused: true }; + input: { + function f(x, y) { + function g() { + something(); + } + return x + y; + } + }; + expect: { + function f(x, y) { + return x + y; + } + } +} + +unused_circular_references_1: { + options = { unused: true }; + input: { + function f(x, y) { + // circular reference + function g() { + return h(); + } + function h() { + return g(); + } + return x + y; + } + }; + expect: { + function f(x, y) { + return x + y; + } + } +} + +unused_circular_references_2: { + options = { unused: true }; + input: { + function f(x, y) { + var foo = 1, bar = baz, baz = foo + bar, qwe = moo(); + return x + y; + } + }; + expect: { + function f(x, y) { + moo(); // keeps side effect + return x + y; + } + } +} + +unused_circular_references_3: { + options = { unused: true }; + input: { + function f(x, y) { + var g = function() { return h() }; + var h = function() { return g() }; + return x + y; + } + }; + expect: { + function f(x, y) { + return x + y; + } + } +} diff --git a/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/issue-105.js b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/issue-105.js new file mode 100644 index 00000000..349d732d --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/issue-105.js @@ -0,0 +1,17 @@ +typeof_eq_undefined: { + options = { + comparisons: true, + unsafe: false + }; + input: { a = typeof b.c != "undefined" } + expect: { a = "undefined" != typeof b.c } +} + +typeof_eq_undefined_unsafe: { + options = { + comparisons: true, + unsafe: true + }; + input: { a = typeof b.c != "undefined" } + expect: { a = b.c !== void 0 } +} diff --git a/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/issue-12.js b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/issue-12.js new file mode 100644 index 00000000..bf87d5c0 --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/issue-12.js @@ -0,0 +1,11 @@ +keep_name_of_getter: { + options = { unused: true }; + input: { a = { get foo () {} } } + expect: { a = { get foo () {} } } +} + +keep_name_of_setter: { + options = { unused: true }; + input: { a = { set foo () {} } } + expect: { a = { set foo () {} } } +} diff --git a/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/issue-22.js b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/issue-22.js new file mode 100644 index 00000000..a8b7bc60 --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/issue-22.js @@ -0,0 +1,17 @@ +return_with_no_value_in_if_body: { + options = { conditionals: true }; + input: { + function foo(bar) { + if (bar) { + return; + } else { + return 1; + } + } + } + expect: { + function foo (bar) { + return bar ? void 0 : 1; + } + } +} diff --git a/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/issue-44.js b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/issue-44.js new file mode 100644 index 00000000..7a972f9e --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/issue-44.js @@ -0,0 +1,31 @@ +issue_44_valid_ast_1: { + options = { unused: true }; + input: { + function a(b) { + for (var i = 0, e = b.qoo(); ; i++) {} + } + } + expect: { + function a(b) { + var i = 0; + for (b.qoo(); ; i++); + } + } +} + +issue_44_valid_ast_2: { + options = { unused: true }; + input: { + function a(b) { + if (foo) for (var i = 0, e = b.qoo(); ; i++) {} + } + } + expect: { + function a(b) { + if (foo) { + var i = 0; + for (b.qoo(); ; i++); + } + } + } +} diff --git a/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/issue-59.js b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/issue-59.js new file mode 100644 index 00000000..82b38806 --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/issue-59.js @@ -0,0 +1,30 @@ +keep_continue: { + options = { + dead_code: true, + evaluate: true + }; + input: { + while (a) { + if (b) { + switch (true) { + case c(): + d(); + } + continue; + } + f(); + } + } + expect: { + while (a) { + if (b) { + switch (true) { + case c(): + d(); + } + continue; + } + f(); + } + } +} diff --git a/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/labels.js b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/labels.js new file mode 100644 index 00000000..044b7a7e --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/labels.js @@ -0,0 +1,163 @@ +labels_1: { + options = { if_return: true, conditionals: true, dead_code: true }; + input: { + out: { + if (foo) break out; + console.log("bar"); + } + }; + expect: { + foo || console.log("bar"); + } +} + +labels_2: { + options = { if_return: true, conditionals: true, dead_code: true }; + input: { + out: { + if (foo) print("stuff"); + else break out; + console.log("here"); + } + }; + expect: { + if (foo) { + print("stuff"); + console.log("here"); + } + } +} + +labels_3: { + options = { if_return: true, conditionals: true, dead_code: true }; + input: { + for (var i = 0; i < 5; ++i) { + if (i < 3) continue; + console.log(i); + } + }; + expect: { + for (var i = 0; i < 5; ++i) + i < 3 || console.log(i); + } +} + +labels_4: { + options = { if_return: true, conditionals: true, dead_code: true }; + input: { + out: for (var i = 0; i < 5; ++i) { + if (i < 3) continue out; + console.log(i); + } + }; + expect: { + for (var i = 0; i < 5; ++i) + i < 3 || console.log(i); + } +} + +labels_5: { + options = { if_return: true, conditionals: true, dead_code: true }; + // should keep the break-s in the following + input: { + while (foo) { + if (bar) break; + console.log("foo"); + } + out: while (foo) { + if (bar) break out; + console.log("foo"); + } + }; + expect: { + while (foo) { + if (bar) break; + console.log("foo"); + } + out: while (foo) { + if (bar) break out; + console.log("foo"); + } + } +} + +labels_6: { + input: { + out: break out; + }; + expect: {} +} + +labels_7: { + options = { if_return: true, conditionals: true, dead_code: true }; + input: { + while (foo) { + x(); + y(); + continue; + } + }; + expect: { + while (foo) { + x(); + y(); + } + } +} + +labels_8: { + options = { if_return: true, conditionals: true, dead_code: true }; + input: { + while (foo) { + x(); + y(); + break; + } + }; + expect: { + while (foo) { + x(); + y(); + break; + } + } +} + +labels_9: { + options = { if_return: true, conditionals: true, dead_code: true }; + input: { + out: while (foo) { + x(); + y(); + continue out; + z(); + k(); + } + }; + expect: { + while (foo) { + x(); + y(); + } + } +} + +labels_10: { + options = { if_return: true, conditionals: true, dead_code: true }; + input: { + out: while (foo) { + x(); + y(); + break out; + z(); + k(); + } + }; + expect: { + out: while (foo) { + x(); + y(); + break out; + } + } +} diff --git a/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/loops.js b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/loops.js new file mode 100644 index 00000000..cdf1f045 --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/loops.js @@ -0,0 +1,123 @@ +while_becomes_for: { + options = { loops: true }; + input: { + while (foo()) bar(); + } + expect: { + for (; foo(); ) bar(); + } +} + +drop_if_break_1: { + options = { loops: true }; + input: { + for (;;) + if (foo()) break; + } + expect: { + for (; !foo();); + } +} + +drop_if_break_2: { + options = { loops: true }; + input: { + for (;bar();) + if (foo()) break; + } + expect: { + for (; bar() && !foo();); + } +} + +drop_if_break_3: { + options = { loops: true }; + input: { + for (;bar();) { + if (foo()) break; + stuff1(); + stuff2(); + } + } + expect: { + for (; bar() && !foo();) { + stuff1(); + stuff2(); + } + } +} + +drop_if_break_4: { + options = { loops: true, sequences: true }; + input: { + for (;bar();) { + x(); + y(); + if (foo()) break; + z(); + k(); + } + } + expect: { + for (; bar() && (x(), y(), !foo());) z(), k(); + } +} + +drop_if_else_break_1: { + options = { loops: true }; + input: { + for (;;) if (foo()) bar(); else break; + } + expect: { + for (; foo(); ) bar(); + } +} + +drop_if_else_break_2: { + options = { loops: true }; + input: { + for (;bar();) { + if (foo()) baz(); + else break; + } + } + expect: { + for (; bar() && foo();) baz(); + } +} + +drop_if_else_break_3: { + options = { loops: true }; + input: { + for (;bar();) { + if (foo()) baz(); + else break; + stuff1(); + stuff2(); + } + } + expect: { + for (; bar() && foo();) { + baz(); + stuff1(); + stuff2(); + } + } +} + +drop_if_else_break_4: { + options = { loops: true, sequences: true }; + input: { + for (;bar();) { + x(); + y(); + if (foo()) baz(); + else break; + z(); + k(); + } + } + expect: { + for (; bar() && (x(), y(), foo());) baz(), z(), k(); + } +} diff --git a/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/properties.js b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/properties.js new file mode 100644 index 00000000..72e245ec --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/properties.js @@ -0,0 +1,25 @@ +keep_properties: { + options = { + properties: false + }; + input: { + a["foo"] = "bar"; + } + expect: { + a["foo"] = "bar"; + } +} + +dot_properties: { + options = { + properties: true + }; + input: { + a["foo"] = "bar"; + a["if"] = "if"; + } + expect: { + a.foo = "bar"; + a["if"] = "if"; + } +} diff --git a/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/sequences.js b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/sequences.js new file mode 100644 index 00000000..6f63ace4 --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/sequences.js @@ -0,0 +1,161 @@ +make_sequences_1: { + options = { + sequences: true + }; + input: { + foo(); + bar(); + baz(); + } + expect: { + foo(),bar(),baz(); + } +} + +make_sequences_2: { + options = { + sequences: true + }; + input: { + if (boo) { + foo(); + bar(); + baz(); + } else { + x(); + y(); + z(); + } + } + expect: { + if (boo) foo(),bar(),baz(); + else x(),y(),z(); + } +} + +make_sequences_3: { + options = { + sequences: true + }; + input: { + function f() { + foo(); + bar(); + return baz(); + } + function g() { + foo(); + bar(); + throw new Error(); + } + } + expect: { + function f() { + return foo(), bar(), baz(); + } + function g() { + throw foo(), bar(), new Error(); + } + } +} + +make_sequences_4: { + options = { + sequences: true + }; + input: { + x = 5; + if (y) z(); + + x = 5; + for (i = 0; i < 5; i++) console.log(i); + + x = 5; + for (; i < 5; i++) console.log(i); + + x = 5; + switch (y) {} + + x = 5; + with (obj) {} + } + expect: { + if (x = 5, y) z(); + for (x = 5, i = 0; i < 5; i++) console.log(i); + for (x = 5; i < 5; i++) console.log(i); + switch (x = 5, y) {} + with (x = 5, obj); + } +} + +lift_sequences_1: { + options = { sequences: true }; + input: { + foo = !(x(), y(), bar()); + } + expect: { + x(), y(), foo = !bar(); + } +} + +lift_sequences_2: { + options = { sequences: true, evaluate: true }; + input: { + q = 1 + (foo(), bar(), 5) + 7 * (5 / (3 - (a(), (QW=ER), c(), 2))) - (x(), y(), 5); + } + expect: { + foo(), bar(), a(), QW = ER, c(), x(), y(), q = 36 + } +} + +lift_sequences_3: { + options = { sequences: true, conditionals: true }; + input: { + x = (foo(), bar(), baz()) ? 10 : 20; + } + expect: { + foo(), bar(), x = baz() ? 10 : 20; + } +} + +lift_sequences_4: { + options = { side_effects: true }; + input: { + x = (foo, bar, baz); + } + expect: { + x = baz; + } +} + +for_sequences: { + options = { sequences: true }; + input: { + // 1 + foo(); + bar(); + for (; false;); + // 2 + foo(); + bar(); + for (x = 5; false;); + // 3 + x = (foo in bar); + for (; false;); + // 4 + x = (foo in bar); + for (y = 5; false;); + } + expect: { + // 1 + for (foo(), bar(); false;); + // 2 + for (foo(), bar(), x = 5; false;); + // 3 + x = (foo in bar); + for (; false;); + // 4 + x = (foo in bar); + for (y = 5; false;); + } +} diff --git a/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/switch.js b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/switch.js new file mode 100644 index 00000000..6fde5dd3 --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/compress/switch.js @@ -0,0 +1,210 @@ +constant_switch_1: { + options = { dead_code: true, evaluate: true }; + input: { + switch (1+1) { + case 1: foo(); break; + case 1+1: bar(); break; + case 1+1+1: baz(); break; + } + } + expect: { + bar(); + } +} + +constant_switch_2: { + options = { dead_code: true, evaluate: true }; + input: { + switch (1) { + case 1: foo(); + case 1+1: bar(); break; + case 1+1+1: baz(); + } + } + expect: { + foo(); + bar(); + } +} + +constant_switch_3: { + options = { dead_code: true, evaluate: true }; + input: { + switch (10) { + case 1: foo(); + case 1+1: bar(); break; + case 1+1+1: baz(); + default: + def(); + } + } + expect: { + def(); + } +} + +constant_switch_4: { + options = { dead_code: true, evaluate: true }; + input: { + switch (2) { + case 1: + x(); + if (foo) break; + y(); + break; + case 1+1: + bar(); + default: + def(); + } + } + expect: { + bar(); + def(); + } +} + +constant_switch_5: { + options = { dead_code: true, evaluate: true }; + input: { + switch (1) { + case 1: + x(); + if (foo) break; + y(); + break; + case 1+1: + bar(); + default: + def(); + } + } + expect: { + // the break inside the if ruins our job + // we can still get rid of irrelevant cases. + switch (1) { + case 1: + x(); + if (foo) break; + y(); + } + // XXX: we could optimize this better by inventing an outer + // labeled block, but that's kinda tricky. + } +} + +constant_switch_6: { + options = { dead_code: true, evaluate: true }; + input: { + OUT: { + foo(); + switch (1) { + case 1: + x(); + if (foo) break OUT; + y(); + case 1+1: + bar(); + break; + default: + def(); + } + } + } + expect: { + OUT: { + foo(); + x(); + if (foo) break OUT; + y(); + bar(); + } + } +} + +constant_switch_7: { + options = { dead_code: true, evaluate: true }; + input: { + OUT: { + foo(); + switch (1) { + case 1: + x(); + if (foo) break OUT; + for (var x = 0; x < 10; x++) { + if (x > 5) break; // this break refers to the for, not to the switch; thus it + // shouldn't ruin our optimization + console.log(x); + } + y(); + case 1+1: + bar(); + break; + default: + def(); + } + } + } + expect: { + OUT: { + foo(); + x(); + if (foo) break OUT; + for (var x = 0; x < 10; x++) { + if (x > 5) break; + console.log(x); + } + y(); + bar(); + } + } +} + +constant_switch_8: { + options = { dead_code: true, evaluate: true }; + input: { + OUT: switch (1) { + case 1: + x(); + for (;;) break OUT; + y(); + break; + case 1+1: + bar(); + default: + def(); + } + } + expect: { + OUT: { + x(); + for (;;) break OUT; + y(); + } + } +} + +constant_switch_9: { + options = { dead_code: true, evaluate: true }; + input: { + OUT: switch (1) { + case 1: + x(); + for (;;) if (foo) break OUT; + y(); + case 1+1: + bar(); + default: + def(); + } + } + expect: { + OUT: { + x(); + for (;;) if (foo) break OUT; + y(); + bar(); + def(); + } + } +} diff --git a/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/run-tests.js b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/run-tests.js new file mode 100755 index 00000000..0568c6a7 --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/test/run-tests.js @@ -0,0 +1,170 @@ +#! /usr/bin/env node + +var U = require("../tools/node"); +var path = require("path"); +var fs = require("fs"); +var assert = require("assert"); +var sys = require("util"); + +var tests_dir = path.dirname(module.filename); + +run_compress_tests(); + +/* -----[ utils ]----- */ + +function tmpl() { + return U.string_template.apply(this, arguments); +} + +function log() { + var txt = tmpl.apply(this, arguments); + sys.puts(txt); +} + +function log_directory(dir) { + log("*** Entering [{dir}]", { dir: dir }); +} + +function log_start_file(file) { + log("--- {file}", { file: file }); +} + +function log_test(name) { + log(" Running test [{name}]", { name: name }); +} + +function find_test_files(dir) { + var files = fs.readdirSync(dir).filter(function(name){ + return /\.js$/i.test(name); + }); + if (process.argv.length > 2) { + var x = process.argv.slice(2); + files = files.filter(function(f){ + return x.indexOf(f) >= 0; + }); + } + return files; +} + +function test_directory(dir) { + return path.resolve(tests_dir, dir); +} + +function as_toplevel(input) { + if (input instanceof U.AST_BlockStatement) input = input.body; + else if (input instanceof U.AST_Statement) input = [ input ]; + else throw new Error("Unsupported input syntax"); + var toplevel = new U.AST_Toplevel({ body: input }); + toplevel.figure_out_scope(); + return toplevel; +} + +function run_compress_tests() { + var dir = test_directory("compress"); + log_directory("compress"); + var files = find_test_files(dir); + function test_file(file) { + log_start_file(file); + function test_case(test) { + log_test(test.name); + var options = U.defaults(test.options, { + warnings: false + }); + var cmp = new U.Compressor(options, true); + var expect = make_code(as_toplevel(test.expect), false); + var input = as_toplevel(test.input); + var input_code = make_code(test.input); + var output = input.transform(cmp); + output.figure_out_scope(); + output = make_code(output, false); + if (expect != output) { + log("!!! failed\n---INPUT---\n{input}\n---OUTPUT---\n{output}\n---EXPECTED---\n{expected}\n\n", { + input: input_code, + output: output, + expected: expect + }); + } + } + var tests = parse_test(path.resolve(dir, file)); + for (var i in tests) if (tests.hasOwnProperty(i)) { + test_case(tests[i]); + } + } + files.forEach(function(file){ + test_file(file); + }); +} + +function parse_test(file) { + var script = fs.readFileSync(file, "utf8"); + var ast = U.parse(script, { + filename: file + }); + var tests = {}; + var tw = new U.TreeWalker(function(node, descend){ + if (node instanceof U.AST_LabeledStatement + && tw.parent() instanceof U.AST_Toplevel) { + var name = node.label.name; + tests[name] = get_one_test(name, node.body); + return true; + } + if (!(node instanceof U.AST_Toplevel)) croak(node); + }); + ast.walk(tw); + return tests; + + function croak(node) { + throw new Error(tmpl("Can't understand test file {file} [{line},{col}]\n{code}", { + file: file, + line: node.start.line, + col: node.start.col, + code: make_code(node, false) + })); + } + + function get_one_test(name, block) { + var test = { name: name, options: {} }; + var tw = new U.TreeWalker(function(node, descend){ + if (node instanceof U.AST_Assign) { + if (!(node.left instanceof U.AST_SymbolRef)) { + croak(node); + } + var name = node.left.name; + test[name] = evaluate(node.right); + return true; + } + if (node instanceof U.AST_LabeledStatement) { + assert.ok( + node.label.name == "input" || node.label.name == "expect", + tmpl("Unsupported label {name} [{line},{col}]", { + name: node.label.name, + line: node.label.start.line, + col: node.label.start.col + }) + ); + var stat = node.body; + if (stat instanceof U.AST_BlockStatement) { + if (stat.body.length == 1) stat = stat.body[0]; + else if (stat.body.length == 0) stat = new U.AST_EmptyStatement(); + } + test[node.label.name] = stat; + return true; + } + }); + block.walk(tw); + return test; + }; +} + +function make_code(ast, beautify) { + if (arguments.length == 1) beautify = true; + var stream = U.OutputStream({ beautify: beautify }); + ast.print(stream); + return stream.get(); +} + +function evaluate(code) { + if (code instanceof U.AST_Node) + code = make_code(code); + return new Function("return(" + code + ")")(); +} diff --git a/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/tools/node.js b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/tools/node.js new file mode 100644 index 00000000..cf87628d --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/node_modules/uglify-js/tools/node.js @@ -0,0 +1,164 @@ +var path = require("path"); +var fs = require("fs"); +var vm = require("vm"); +var sys = require("util"); + +var UglifyJS = vm.createContext({ + sys : sys, + console : console, + MOZ_SourceMap : require("source-map") +}); + +function load_global(file) { + file = path.resolve(path.dirname(module.filename), file); + try { + var code = fs.readFileSync(file, "utf8"); + return vm.runInContext(code, UglifyJS, file); + } catch(ex) { + // XXX: in case of a syntax error, the message is kinda + // useless. (no location information). + sys.debug("ERROR in file: " + file + " / " + ex); + process.exit(1); + } +}; + +var FILES = exports.FILES = [ + "../lib/utils.js", + "../lib/ast.js", + "../lib/parse.js", + "../lib/transform.js", + "../lib/scope.js", + "../lib/output.js", + "../lib/compress.js", + "../lib/sourcemap.js", + "../lib/mozilla-ast.js" +].map(function(file){ + return path.join(path.dirname(fs.realpathSync(__filename)), file); +}); + +FILES.forEach(load_global); + +UglifyJS.AST_Node.warn_function = function(txt) { + sys.error("WARN: " + txt); +}; + +// XXX: perhaps we shouldn't export everything but heck, I'm lazy. +for (var i in UglifyJS) { + if (UglifyJS.hasOwnProperty(i)) { + exports[i] = UglifyJS[i]; + } +} + +exports.minify = function(files, options) { + options = UglifyJS.defaults(options, { + outSourceMap : null, + sourceRoot : null, + inSourceMap : null, + fromString : false, + warnings : false, + mangle : {}, + output : null, + compress : {} + }); + if (typeof files == "string") + files = [ files ]; + + // 1. parse + var toplevel = null; + files.forEach(function(file){ + var code = options.fromString + ? file + : fs.readFileSync(file, "utf8"); + toplevel = UglifyJS.parse(code, { + filename: options.fromString ? "?" : file, + toplevel: toplevel + }); + }); + + // 2. compress + if (options.compress) { + var compress = { warnings: options.warnings }; + UglifyJS.merge(compress, options.compress); + toplevel.figure_out_scope(); + var sq = UglifyJS.Compressor(compress); + toplevel = toplevel.transform(sq); + } + + // 3. mangle + if (options.mangle) { + toplevel.figure_out_scope(); + toplevel.compute_char_frequency(); + toplevel.mangle_names(options.mangle); + } + + // 4. output + var map = null; + var inMap = null; + if (options.inSourceMap) { + inMap = fs.readFileSync(options.inSourceMap, "utf8"); + } + if (options.outSourceMap) map = UglifyJS.SourceMap({ + file: options.outSourceMap, + orig: inMap, + root: options.sourceRoot + }); + var output = { source_map: map }; + if (options.output) { + UglifyJS.merge(output, options.output); + } + var stream = UglifyJS.OutputStream(output); + toplevel.print(stream); + return { + code : stream + "", + map : map + "" + }; +}; + +// exports.describe_ast = function() { +// function doitem(ctor) { +// var sub = {}; +// ctor.SUBCLASSES.forEach(function(ctor){ +// sub[ctor.TYPE] = doitem(ctor); +// }); +// var ret = {}; +// if (ctor.SELF_PROPS.length > 0) ret.props = ctor.SELF_PROPS; +// if (ctor.SUBCLASSES.length > 0) ret.sub = sub; +// return ret; +// } +// return doitem(UglifyJS.AST_Node).sub; +// } + +exports.describe_ast = function() { + var out = UglifyJS.OutputStream({ beautify: true }); + function doitem(ctor) { + out.print("AST_" + ctor.TYPE); + var props = ctor.SELF_PROPS.filter(function(prop){ + return !/^\$/.test(prop); + }); + if (props.length > 0) { + out.space(); + out.with_parens(function(){ + props.forEach(function(prop, i){ + if (i) out.space(); + out.print(prop); + }); + }); + } + if (ctor.documentation) { + out.space(); + out.print_string(ctor.documentation); + } + if (ctor.SUBCLASSES.length > 0) { + out.space(); + out.with_block(function(){ + ctor.SUBCLASSES.forEach(function(ctor, i){ + out.indent(); + doitem(ctor); + out.newline(); + }); + }); + } + }; + doitem(UglifyJS.AST_Node); + return out + ""; +}; diff --git a/pitfall/pdfkit/node_modules/ruglify/package.json b/pitfall/pdfkit/node_modules/ruglify/package.json new file mode 100644 index 00000000..b6af6688 --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/package.json @@ -0,0 +1,97 @@ +{ + "_args": [ + [ + { + "raw": "ruglify@~1.0.0", + "scope": null, + "escapedName": "ruglify", + "name": "ruglify", + "rawSpec": "~1.0.0", + "spec": ">=1.0.0 <1.1.0", + "type": "range" + }, + "/Users/MB/git/pdfkit/node_modules/umd" + ] + ], + "_from": "ruglify@>=1.0.0 <1.1.0", + "_id": "ruglify@1.0.0", + "_inCache": true, + "_location": "/ruglify", + "_npmUser": { + "name": "forbeslindesay", + "email": "forbes@lindesay.co.uk" + }, + "_npmVersion": "1.2.10", + "_phantomChildren": { + "optimist": "0.3.7", + "source-map": "0.1.43" + }, + "_requested": { + "raw": "ruglify@~1.0.0", + "scope": null, + "escapedName": "ruglify", + "name": "ruglify", + "rawSpec": "~1.0.0", + "spec": ">=1.0.0 <1.1.0", + "type": "range" + }, + "_requiredBy": [ + "/umd" + ], + "_resolved": "https://registry.npmjs.org/ruglify/-/ruglify-1.0.0.tgz", + "_shasum": "dc8930e2a9544a274301cc9972574c0d0986b675", + "_shrinkwrap": null, + "_spec": "ruglify@~1.0.0", + "_where": "/Users/MB/git/pdfkit/node_modules/umd", + "author": { + "name": "ForbesLindesay" + }, + "bugs": { + "url": "https://github.com/ForbesLindesay/ruglify/issues" + }, + "dependencies": { + "rfile": "~1.0", + "uglify-js": "~2.2" + }, + "description": "'Require' minified JavaScript as a string", + "devDependencies": { + "mocha": "~1.8" + }, + "directories": {}, + "dist": { + "shasum": "dc8930e2a9544a274301cc9972574c0d0986b675", + "tarball": "https://registry.npmjs.org/ruglify/-/ruglify-1.0.0.tgz" + }, + "homepage": "https://github.com/ForbesLindesay/ruglify#readme", + "keywords": [ + "require", + "file", + "text", + "relative", + "module", + "javascript", + "uglify", + "minify", + "compress", + "string" + ], + "license": "MIT", + "maintainers": [ + { + "name": "forbeslindesay", + "email": "forbes@lindesay.co.uk" + } + ], + "name": "ruglify", + "optionalDependencies": {}, + "readme": "# ruglify\r\n\r\n[![Build Status](https://secure.travis-ci.org/ForbesLindesay/ruglify.png)](http://travis-ci.org/ForbesLindesay/ruglify)\r\n[![Dependency Status](https://gemnasium.com/ForbesLindesay/ruglify.png)](https://gemnasium.com/ForbesLindesay/ruglify)\r\n\r\n\"Require\" minified JavaScript as a string\r\n\r\n## Installation\r\n\r\n```\r\nnpm install ruglify\r\n```\r\n\r\n## Usage\r\n\r\n```javascript\r\nvar ruglify = require('ruglify');\r\nvar minifiedJQuery = ruglify('./jquery.js');\r\nconsole.log(minifiedJQuery);\r\n```\r\n\r\nUses the same resolution algorithm as require for maximum simplicity. Built on top of [rfile](https://github.com/ForbesLindesay/rfile).\r\n\r\n## License\r\n\r\n MIT", + "readmeFilename": "README.md", + "repository": { + "type": "git", + "url": "git+https://github.com/ForbesLindesay/ruglify.git" + }, + "scripts": { + "test": "mocha -R spec" + }, + "version": "1.0.0" +} diff --git a/pitfall/pdfkit/node_modules/ruglify/test/fixture/jquery.js b/pitfall/pdfkit/node_modules/ruglify/test/fixture/jquery.js new file mode 100644 index 00000000..bc1d456f --- /dev/null +++ b/pitfall/pdfkit/node_modules/ruglify/test/fixture/jquery.js @@ -0,0 +1,9597 @@ +/*! + * jQuery JavaScript Library v1.9.1 + * http://jquery.com/ + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * + * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2013-2-4 + */ +(function( window, undefined ) { + +// Can't do this because several apps including ASP.NET trace +// the stack via arguments.caller.callee and Firefox dies if +// you try to trace through "use strict" call chains. (#13335) +// Support: Firefox 18+ +//"use strict"; +var + // The deferred used on DOM ready + readyList, + + // A central reference to the root jQuery(document) + rootjQuery, + + // Support: IE<9 + // For `typeof node.method` instead of `node.method !== undefined` + core_strundefined = typeof undefined, + + // Use the correct document accordingly with window argument (sandbox) + document = window.document, + location = window.location, + + // Map over jQuery in case of overwrite + _jQuery = window.jQuery, + + // Map over the $ in case of overwrite + _$ = window.$, + + // [[Class]] -> type pairs + class2type = {}, + + // List of deleted data cache ids, so we can reuse them + core_deletedIds = [], + + core_version = "1.9.1", + + // Save a reference to some core methods + core_concat = core_deletedIds.concat, + core_push = core_deletedIds.push, + core_slice = core_deletedIds.slice, + core_indexOf = core_deletedIds.indexOf, + core_toString = class2type.toString, + core_hasOwn = class2type.hasOwnProperty, + core_trim = core_version.trim, + + // Define a local copy of jQuery + jQuery = function( selector, context ) { + // The jQuery object is actually just the init constructor 'enhanced' + return new jQuery.fn.init( selector, context, rootjQuery ); + }, + + // Used for matching numbers + core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, + + // Used for splitting on whitespace + core_rnotwhite = /\S+/g, + + // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE) + rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, + + // A simple way to check for HTML strings + // Prioritize #id over to avoid XSS via location.hash (#9521) + // Strict HTML recognition (#11290: must start with <) + rquickExpr = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/, + + // Match a standalone tag + rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, + + // JSON RegExp + rvalidchars = /^[\],:{}\s]*$/, + rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, + rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, + rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g, + + // Matches dashed string for camelizing + rmsPrefix = /^-ms-/, + rdashAlpha = /-([\da-z])/gi, + + // Used by jQuery.camelCase as callback to replace() + fcamelCase = function( all, letter ) { + return letter.toUpperCase(); + }, + + // The ready event handler + completed = function( event ) { + + // readyState === "complete" is good enough for us to call the dom ready in oldIE + if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) { + detach(); + jQuery.ready(); + } + }, + // Clean-up method for dom ready events + detach = function() { + if ( document.addEventListener ) { + document.removeEventListener( "DOMContentLoaded", completed, false ); + window.removeEventListener( "load", completed, false ); + + } else { + document.detachEvent( "onreadystatechange", completed ); + window.detachEvent( "onload", completed ); + } + }; + +jQuery.fn = jQuery.prototype = { + // The current version of jQuery being used + jquery: core_version, + + constructor: jQuery, + init: function( selector, context, rootjQuery ) { + var match, elem; + + // HANDLE: $(""), $(null), $(undefined), $(false) + if ( !selector ) { + return this; + } + + // Handle HTML strings + if ( typeof selector === "string" ) { + if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { + // Assume that strings that start and end with <> are HTML and skip the regex check + match = [ null, selector, null ]; + + } else { + match = rquickExpr.exec( selector ); + } + + // Match html or make sure no context is specified for #id + if ( match && (match[1] || !context) ) { + + // HANDLE: $(html) -> $(array) + if ( match[1] ) { + context = context instanceof jQuery ? context[0] : context; + + // scripts is true for back-compat + jQuery.merge( this, jQuery.parseHTML( + match[1], + context && context.nodeType ? context.ownerDocument || context : document, + true + ) ); + + // HANDLE: $(html, props) + if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { + for ( match in context ) { + // Properties of context are called as methods if possible + if ( jQuery.isFunction( this[ match ] ) ) { + this[ match ]( context[ match ] ); + + // ...and otherwise set as attributes + } else { + this.attr( match, context[ match ] ); + } + } + } + + return this; + + // HANDLE: $(#id) + } else { + elem = document.getElementById( match[2] ); + + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE and Opera return items + // by name instead of ID + if ( elem.id !== match[2] ) { + return rootjQuery.find( selector ); + } + + // Otherwise, we inject the element directly into the jQuery object + this.length = 1; + this[0] = elem; + } + + this.context = document; + this.selector = selector; + return this; + } + + // HANDLE: $(expr, $(...)) + } else if ( !context || context.jquery ) { + return ( context || rootjQuery ).find( selector ); + + // HANDLE: $(expr, context) + // (which is just equivalent to: $(context).find(expr) + } else { + return this.constructor( context ).find( selector ); + } + + // HANDLE: $(DOMElement) + } else if ( selector.nodeType ) { + this.context = this[0] = selector; + this.length = 1; + return this; + + // HANDLE: $(function) + // Shortcut for document ready + } else if ( jQuery.isFunction( selector ) ) { + return rootjQuery.ready( selector ); + } + + if ( selector.selector !== undefined ) { + this.selector = selector.selector; + this.context = selector.context; + } + + return jQuery.makeArray( selector, this ); + }, + + // Start with an empty selector + selector: "", + + // The default length of a jQuery object is 0 + length: 0, + + // The number of elements contained in the matched element set + size: function() { + return this.length; + }, + + toArray: function() { + return core_slice.call( this ); + }, + + // Get the Nth element in the matched element set OR + // Get the whole matched element set as a clean array + get: function( num ) { + return num == null ? + + // Return a 'clean' array + this.toArray() : + + // Return just the object + ( num < 0 ? this[ this.length + num ] : this[ num ] ); + }, + + // Take an array of elements and push it onto the stack + // (returning the new matched element set) + pushStack: function( elems ) { + + // Build a new jQuery matched element set + var ret = jQuery.merge( this.constructor(), elems ); + + // Add the old object onto the stack (as a reference) + ret.prevObject = this; + ret.context = this.context; + + // Return the newly-formed element set + return ret; + }, + + // Execute a callback for every element in the matched set. + // (You can seed the arguments with an array of args, but this is + // only used internally.) + each: function( callback, args ) { + return jQuery.each( this, callback, args ); + }, + + ready: function( fn ) { + // Add the callback + jQuery.ready.promise().done( fn ); + + return this; + }, + + slice: function() { + return this.pushStack( core_slice.apply( this, arguments ) ); + }, + + first: function() { + return this.eq( 0 ); + }, + + last: function() { + return this.eq( -1 ); + }, + + eq: function( i ) { + var len = this.length, + j = +i + ( i < 0 ? len : 0 ); + return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); + }, + + map: function( callback ) { + return this.pushStack( jQuery.map(this, function( elem, i ) { + return callback.call( elem, i, elem ); + })); + }, + + end: function() { + return this.prevObject || this.constructor(null); + }, + + // For internal use only. + // Behaves like an Array's method, not like a jQuery method. + push: core_push, + sort: [].sort, + splice: [].splice +}; + +// Give the init function the jQuery prototype for later instantiation +jQuery.fn.init.prototype = jQuery.fn; + +jQuery.extend = jQuery.fn.extend = function() { + var src, copyIsArray, copy, name, options, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if ( typeof target === "boolean" ) { + deep = target; + target = arguments[1] || {}; + // skip the boolean and the target + i = 2; + } + + // Handle case when target is a string or something (possible in deep copy) + if ( typeof target !== "object" && !jQuery.isFunction(target) ) { + target = {}; + } + + // extend jQuery itself if only one argument is passed + if ( length === i ) { + target = this; + --i; + } + + for ( ; i < length; i++ ) { + // Only deal with non-null/undefined values + if ( (options = arguments[ i ]) != null ) { + // Extend the base object + for ( name in options ) { + src = target[ name ]; + copy = options[ name ]; + + // Prevent never-ending loop + if ( target === copy ) { + continue; + } + + // Recurse if we're merging plain objects or arrays + if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { + if ( copyIsArray ) { + copyIsArray = false; + clone = src && jQuery.isArray(src) ? src : []; + + } else { + clone = src && jQuery.isPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[ name ] = jQuery.extend( deep, clone, copy ); + + // Don't bring in undefined values + } else if ( copy !== undefined ) { + target[ name ] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +jQuery.extend({ + noConflict: function( deep ) { + if ( window.$ === jQuery ) { + window.$ = _$; + } + + if ( deep && window.jQuery === jQuery ) { + window.jQuery = _jQuery; + } + + return jQuery; + }, + + // Is the DOM ready to be used? Set to true once it occurs. + isReady: false, + + // A counter to track how many items to wait for before + // the ready event fires. See #6781 + readyWait: 1, + + // Hold (or release) the ready event + holdReady: function( hold ) { + if ( hold ) { + jQuery.readyWait++; + } else { + jQuery.ready( true ); + } + }, + + // Handle when the DOM is ready + ready: function( wait ) { + + // Abort if there are pending holds or we're already ready + if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { + return; + } + + // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). + if ( !document.body ) { + return setTimeout( jQuery.ready ); + } + + // Remember that the DOM is ready + jQuery.isReady = true; + + // If a normal DOM Ready event fired, decrement, and wait if need be + if ( wait !== true && --jQuery.readyWait > 0 ) { + return; + } + + // If there are functions bound, to execute + readyList.resolveWith( document, [ jQuery ] ); + + // Trigger any bound ready events + if ( jQuery.fn.trigger ) { + jQuery( document ).trigger("ready").off("ready"); + } + }, + + // See test/unit/core.js for details concerning isFunction. + // Since version 1.3, DOM methods and functions like alert + // aren't supported. They return false on IE (#2968). + isFunction: function( obj ) { + return jQuery.type(obj) === "function"; + }, + + isArray: Array.isArray || function( obj ) { + return jQuery.type(obj) === "array"; + }, + + isWindow: function( obj ) { + return obj != null && obj == obj.window; + }, + + isNumeric: function( obj ) { + return !isNaN( parseFloat(obj) ) && isFinite( obj ); + }, + + type: function( obj ) { + if ( obj == null ) { + return String( obj ); + } + return typeof obj === "object" || typeof obj === "function" ? + class2type[ core_toString.call(obj) ] || "object" : + typeof obj; + }, + + isPlainObject: function( obj ) { + // Must be an Object. + // Because of IE, we also have to check the presence of the constructor property. + // Make sure that DOM nodes and window objects don't pass through, as well + if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { + return false; + } + + try { + // Not own constructor property must be Object + if ( obj.constructor && + !core_hasOwn.call(obj, "constructor") && + !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { + return false; + } + } catch ( e ) { + // IE8,9 Will throw exceptions on certain host objects #9897 + return false; + } + + // Own properties are enumerated firstly, so to speed up, + // if last one is own, then all properties are own. + + var key; + for ( key in obj ) {} + + return key === undefined || core_hasOwn.call( obj, key ); + }, + + isEmptyObject: function( obj ) { + var name; + for ( name in obj ) { + return false; + } + return true; + }, + + error: function( msg ) { + throw new Error( msg ); + }, + + // data: string of html + // context (optional): If specified, the fragment will be created in this context, defaults to document + // keepScripts (optional): If true, will include scripts passed in the html string + parseHTML: function( data, context, keepScripts ) { + if ( !data || typeof data !== "string" ) { + return null; + } + if ( typeof context === "boolean" ) { + keepScripts = context; + context = false; + } + context = context || document; + + var parsed = rsingleTag.exec( data ), + scripts = !keepScripts && []; + + // Single tag + if ( parsed ) { + return [ context.createElement( parsed[1] ) ]; + } + + parsed = jQuery.buildFragment( [ data ], context, scripts ); + if ( scripts ) { + jQuery( scripts ).remove(); + } + return jQuery.merge( [], parsed.childNodes ); + }, + + parseJSON: function( data ) { + // Attempt to parse using the native JSON parser first + if ( window.JSON && window.JSON.parse ) { + return window.JSON.parse( data ); + } + + if ( data === null ) { + return data; + } + + if ( typeof data === "string" ) { + + // Make sure leading/trailing whitespace is removed (IE can't handle it) + data = jQuery.trim( data ); + + if ( data ) { + // Make sure the incoming data is actual JSON + // Logic borrowed from http://json.org/json2.js + if ( rvalidchars.test( data.replace( rvalidescape, "@" ) + .replace( rvalidtokens, "]" ) + .replace( rvalidbraces, "")) ) { + + return ( new Function( "return " + data ) )(); + } + } + } + + jQuery.error( "Invalid JSON: " + data ); + }, + + // Cross-browser xml parsing + parseXML: function( data ) { + var xml, tmp; + if ( !data || typeof data !== "string" ) { + return null; + } + try { + if ( window.DOMParser ) { // Standard + tmp = new DOMParser(); + xml = tmp.parseFromString( data , "text/xml" ); + } else { // IE + xml = new ActiveXObject( "Microsoft.XMLDOM" ); + xml.async = "false"; + xml.loadXML( data ); + } + } catch( e ) { + xml = undefined; + } + if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { + jQuery.error( "Invalid XML: " + data ); + } + return xml; + }, + + noop: function() {}, + + // Evaluates a script in a global context + // Workarounds based on findings by Jim Driscoll + // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context + globalEval: function( data ) { + if ( data && jQuery.trim( data ) ) { + // We use execScript on Internet Explorer + // We use an anonymous function so that context is window + // rather than jQuery in Firefox + ( window.execScript || function( data ) { + window[ "eval" ].call( window, data ); + } )( data ); + } + }, + + // Convert dashed to camelCase; used by the css and data modules + // Microsoft forgot to hump their vendor prefix (#9572) + camelCase: function( string ) { + return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); + }, + + nodeName: function( elem, name ) { + return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); + }, + + // args is for internal usage only + each: function( obj, callback, args ) { + var value, + i = 0, + length = obj.length, + isArray = isArraylike( obj ); + + if ( args ) { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.apply( obj[ i ], args ); + + if ( value === false ) { + break; + } + } + } + + // A special, fast, case for the most common use of each + } else { + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } else { + for ( i in obj ) { + value = callback.call( obj[ i ], i, obj[ i ] ); + + if ( value === false ) { + break; + } + } + } + } + + return obj; + }, + + // Use native String.trim function wherever possible + trim: core_trim && !core_trim.call("\uFEFF\xA0") ? + function( text ) { + return text == null ? + "" : + core_trim.call( text ); + } : + + // Otherwise use our own trimming functionality + function( text ) { + return text == null ? + "" : + ( text + "" ).replace( rtrim, "" ); + }, + + // results is for internal usage only + makeArray: function( arr, results ) { + var ret = results || []; + + if ( arr != null ) { + if ( isArraylike( Object(arr) ) ) { + jQuery.merge( ret, + typeof arr === "string" ? + [ arr ] : arr + ); + } else { + core_push.call( ret, arr ); + } + } + + return ret; + }, + + inArray: function( elem, arr, i ) { + var len; + + if ( arr ) { + if ( core_indexOf ) { + return core_indexOf.call( arr, elem, i ); + } + + len = arr.length; + i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; + + for ( ; i < len; i++ ) { + // Skip accessing in sparse arrays + if ( i in arr && arr[ i ] === elem ) { + return i; + } + } + } + + return -1; + }, + + merge: function( first, second ) { + var l = second.length, + i = first.length, + j = 0; + + if ( typeof l === "number" ) { + for ( ; j < l; j++ ) { + first[ i++ ] = second[ j ]; + } + } else { + while ( second[j] !== undefined ) { + first[ i++ ] = second[ j++ ]; + } + } + + first.length = i; + + return first; + }, + + grep: function( elems, callback, inv ) { + var retVal, + ret = [], + i = 0, + length = elems.length; + inv = !!inv; + + // Go through the array, only saving the items + // that pass the validator function + for ( ; i < length; i++ ) { + retVal = !!callback( elems[ i ], i ); + if ( inv !== retVal ) { + ret.push( elems[ i ] ); + } + } + + return ret; + }, + + // arg is for internal usage only + map: function( elems, callback, arg ) { + var value, + i = 0, + length = elems.length, + isArray = isArraylike( elems ), + ret = []; + + // Go through the array, translating each of the items to their + if ( isArray ) { + for ( ; i < length; i++ ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + + // Go through every key on the object, + } else { + for ( i in elems ) { + value = callback( elems[ i ], i, arg ); + + if ( value != null ) { + ret[ ret.length ] = value; + } + } + } + + // Flatten any nested arrays + return core_concat.apply( [], ret ); + }, + + // A global GUID counter for objects + guid: 1, + + // Bind a function to a context, optionally partially applying any + // arguments. + proxy: function( fn, context ) { + var args, proxy, tmp; + + if ( typeof context === "string" ) { + tmp = fn[ context ]; + context = fn; + fn = tmp; + } + + // Quick check to determine if target is callable, in the spec + // this throws a TypeError, but we will just return undefined. + if ( !jQuery.isFunction( fn ) ) { + return undefined; + } + + // Simulated bind + args = core_slice.call( arguments, 2 ); + proxy = function() { + return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) ); + }; + + // Set the guid of unique handler to the same of original handler, so it can be removed + proxy.guid = fn.guid = fn.guid || jQuery.guid++; + + return proxy; + }, + + // Multifunctional method to get and set values of a collection + // The value/s can optionally be executed if it's a function + access: function( elems, fn, key, value, chainable, emptyGet, raw ) { + var i = 0, + length = elems.length, + bulk = key == null; + + // Sets many values + if ( jQuery.type( key ) === "object" ) { + chainable = true; + for ( i in key ) { + jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); + } + + // Sets one value + } else if ( value !== undefined ) { + chainable = true; + + if ( !jQuery.isFunction( value ) ) { + raw = true; + } + + if ( bulk ) { + // Bulk operations run against the entire set + if ( raw ) { + fn.call( elems, value ); + fn = null; + + // ...except when executing function values + } else { + bulk = fn; + fn = function( elem, key, value ) { + return bulk.call( jQuery( elem ), value ); + }; + } + } + + if ( fn ) { + for ( ; i < length; i++ ) { + fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); + } + } + } + + return chainable ? + elems : + + // Gets + bulk ? + fn.call( elems ) : + length ? fn( elems[0], key ) : emptyGet; + }, + + now: function() { + return ( new Date() ).getTime(); + } +}); + +jQuery.ready.promise = function( obj ) { + if ( !readyList ) { + + readyList = jQuery.Deferred(); + + // Catch cases where $(document).ready() is called after the browser event has already occurred. + // we once tried to use readyState "interactive" here, but it caused issues like the one + // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 + if ( document.readyState === "complete" ) { + // Handle it asynchronously to allow scripts the opportunity to delay ready + setTimeout( jQuery.ready ); + + // Standards-based browsers support DOMContentLoaded + } else if ( document.addEventListener ) { + // Use the handy event callback + document.addEventListener( "DOMContentLoaded", completed, false ); + + // A fallback to window.onload, that will always work + window.addEventListener( "load", completed, false ); + + // If IE event model is used + } else { + // Ensure firing before onload, maybe late but safe also for iframes + document.attachEvent( "onreadystatechange", completed ); + + // A fallback to window.onload, that will always work + window.attachEvent( "onload", completed ); + + // If IE and not a frame + // continually check to see if the document is ready + var top = false; + + try { + top = window.frameElement == null && document.documentElement; + } catch(e) {} + + if ( top && top.doScroll ) { + (function doScrollCheck() { + if ( !jQuery.isReady ) { + + try { + // Use the trick by Diego Perini + // http://javascript.nwbox.com/IEContentLoaded/ + top.doScroll("left"); + } catch(e) { + return setTimeout( doScrollCheck, 50 ); + } + + // detach all dom ready events + detach(); + + // and execute any waiting functions + jQuery.ready(); + } + })(); + } + } + } + return readyList.promise( obj ); +}; + +// Populate the class2type map +jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { + class2type[ "[object " + name + "]" ] = name.toLowerCase(); +}); + +function isArraylike( obj ) { + var length = obj.length, + type = jQuery.type( obj ); + + if ( jQuery.isWindow( obj ) ) { + return false; + } + + if ( obj.nodeType === 1 && length ) { + return true; + } + + return type === "array" || type !== "function" && + ( length === 0 || + typeof length === "number" && length > 0 && ( length - 1 ) in obj ); +} + +// All jQuery objects should point back to these +rootjQuery = jQuery(document); +// String to Object options format cache +var optionsCache = {}; + +// Convert String-formatted options into Object-formatted ones and store in cache +function createOptions( options ) { + var object = optionsCache[ options ] = {}; + jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) { + object[ flag ] = true; + }); + return object; +} + +/* + * Create a callback list using the following parameters: + * + * options: an optional list of space-separated options that will change how + * the callback list behaves or a more traditional option object + * + * By default a callback list will act like an event callback list and can be + * "fired" multiple times. + * + * Possible options: + * + * once: will ensure the callback list can only be fired once (like a Deferred) + * + * memory: will keep track of previous values and will call any callback added + * after the list has been fired right away with the latest "memorized" + * values (like a Deferred) + * + * unique: will ensure a callback can only be added once (no duplicate in the list) + * + * stopOnFalse: interrupt callings when a callback returns false + * + */ +jQuery.Callbacks = function( options ) { + + // Convert options from String-formatted to Object-formatted if needed + // (we check in cache first) + options = typeof options === "string" ? + ( optionsCache[ options ] || createOptions( options ) ) : + jQuery.extend( {}, options ); + + var // Flag to know if list is currently firing + firing, + // Last fire value (for non-forgettable lists) + memory, + // Flag to know if list was already fired + fired, + // End of the loop when firing + firingLength, + // Index of currently firing callback (modified by remove if needed) + firingIndex, + // First callback to fire (used internally by add and fireWith) + firingStart, + // Actual callback list + list = [], + // Stack of fire calls for repeatable lists + stack = !options.once && [], + // Fire callbacks + fire = function( data ) { + memory = options.memory && data; + fired = true; + firingIndex = firingStart || 0; + firingStart = 0; + firingLength = list.length; + firing = true; + for ( ; list && firingIndex < firingLength; firingIndex++ ) { + if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { + memory = false; // To prevent further calls using add + break; + } + } + firing = false; + if ( list ) { + if ( stack ) { + if ( stack.length ) { + fire( stack.shift() ); + } + } else if ( memory ) { + list = []; + } else { + self.disable(); + } + } + }, + // Actual Callbacks object + self = { + // Add a callback or a collection of callbacks to the list + add: function() { + if ( list ) { + // First, we save the current length + var start = list.length; + (function add( args ) { + jQuery.each( args, function( _, arg ) { + var type = jQuery.type( arg ); + if ( type === "function" ) { + if ( !options.unique || !self.has( arg ) ) { + list.push( arg ); + } + } else if ( arg && arg.length && type !== "string" ) { + // Inspect recursively + add( arg ); + } + }); + })( arguments ); + // Do we need to add the callbacks to the + // current firing batch? + if ( firing ) { + firingLength = list.length; + // With memory, if we're not firing then + // we should call right away + } else if ( memory ) { + firingStart = start; + fire( memory ); + } + } + return this; + }, + // Remove a callback from the list + remove: function() { + if ( list ) { + jQuery.each( arguments, function( _, arg ) { + var index; + while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { + list.splice( index, 1 ); + // Handle firing indexes + if ( firing ) { + if ( index <= firingLength ) { + firingLength--; + } + if ( index <= firingIndex ) { + firingIndex--; + } + } + } + }); + } + return this; + }, + // Check if a given callback is in the list. + // If no argument is given, return whether or not list has callbacks attached. + has: function( fn ) { + return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); + }, + // Remove all callbacks from the list + empty: function() { + list = []; + return this; + }, + // Have the list do nothing anymore + disable: function() { + list = stack = memory = undefined; + return this; + }, + // Is it disabled? + disabled: function() { + return !list; + }, + // Lock the list in its current state + lock: function() { + stack = undefined; + if ( !memory ) { + self.disable(); + } + return this; + }, + // Is it locked? + locked: function() { + return !stack; + }, + // Call all callbacks with the given context and arguments + fireWith: function( context, args ) { + args = args || []; + args = [ context, args.slice ? args.slice() : args ]; + if ( list && ( !fired || stack ) ) { + if ( firing ) { + stack.push( args ); + } else { + fire( args ); + } + } + return this; + }, + // Call all the callbacks with the given arguments + fire: function() { + self.fireWith( this, arguments ); + return this; + }, + // To know if the callbacks have already been called at least once + fired: function() { + return !!fired; + } + }; + + return self; +}; +jQuery.extend({ + + Deferred: function( func ) { + var tuples = [ + // action, add listener, listener list, final state + [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], + [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], + [ "notify", "progress", jQuery.Callbacks("memory") ] + ], + state = "pending", + promise = { + state: function() { + return state; + }, + always: function() { + deferred.done( arguments ).fail( arguments ); + return this; + }, + then: function( /* fnDone, fnFail, fnProgress */ ) { + var fns = arguments; + return jQuery.Deferred(function( newDefer ) { + jQuery.each( tuples, function( i, tuple ) { + var action = tuple[ 0 ], + fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; + // deferred[ done | fail | progress ] for forwarding actions to newDefer + deferred[ tuple[1] ](function() { + var returned = fn && fn.apply( this, arguments ); + if ( returned && jQuery.isFunction( returned.promise ) ) { + returned.promise() + .done( newDefer.resolve ) + .fail( newDefer.reject ) + .progress( newDefer.notify ); + } else { + newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); + } + }); + }); + fns = null; + }).promise(); + }, + // Get a promise for this deferred + // If obj is provided, the promise aspect is added to the object + promise: function( obj ) { + return obj != null ? jQuery.extend( obj, promise ) : promise; + } + }, + deferred = {}; + + // Keep pipe for back-compat + promise.pipe = promise.then; + + // Add list-specific methods + jQuery.each( tuples, function( i, tuple ) { + var list = tuple[ 2 ], + stateString = tuple[ 3 ]; + + // promise[ done | fail | progress ] = list.add + promise[ tuple[1] ] = list.add; + + // Handle state + if ( stateString ) { + list.add(function() { + // state = [ resolved | rejected ] + state = stateString; + + // [ reject_list | resolve_list ].disable; progress_list.lock + }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); + } + + // deferred[ resolve | reject | notify ] + deferred[ tuple[0] ] = function() { + deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); + return this; + }; + deferred[ tuple[0] + "With" ] = list.fireWith; + }); + + // Make the deferred a promise + promise.promise( deferred ); + + // Call given func if any + if ( func ) { + func.call( deferred, deferred ); + } + + // All done! + return deferred; + }, + + // Deferred helper + when: function( subordinate /* , ..., subordinateN */ ) { + var i = 0, + resolveValues = core_slice.call( arguments ), + length = resolveValues.length, + + // the count of uncompleted subordinates + remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, + + // the master Deferred. If resolveValues consist of only a single Deferred, just use that. + deferred = remaining === 1 ? subordinate : jQuery.Deferred(), + + // Update function for both resolve and progress values + updateFunc = function( i, contexts, values ) { + return function( value ) { + contexts[ i ] = this; + values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; + if( values === progressValues ) { + deferred.notifyWith( contexts, values ); + } else if ( !( --remaining ) ) { + deferred.resolveWith( contexts, values ); + } + }; + }, + + progressValues, progressContexts, resolveContexts; + + // add listeners to Deferred subordinates; treat others as resolved + if ( length > 1 ) { + progressValues = new Array( length ); + progressContexts = new Array( length ); + resolveContexts = new Array( length ); + for ( ; i < length; i++ ) { + if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { + resolveValues[ i ].promise() + .done( updateFunc( i, resolveContexts, resolveValues ) ) + .fail( deferred.reject ) + .progress( updateFunc( i, progressContexts, progressValues ) ); + } else { + --remaining; + } + } + } + + // if we're not waiting on anything, resolve the master + if ( !remaining ) { + deferred.resolveWith( resolveContexts, resolveValues ); + } + + return deferred.promise(); + } +}); +jQuery.support = (function() { + + var support, all, a, + input, select, fragment, + opt, eventName, isSupported, i, + div = document.createElement("div"); + + // Setup + div.setAttribute( "className", "t" ); + div.innerHTML = "
    a"; + + // Support tests won't run in some limited or non-browser environments + all = div.getElementsByTagName("*"); + a = div.getElementsByTagName("a")[ 0 ]; + if ( !all || !a || !all.length ) { + return {}; + } + + // First batch of tests + select = document.createElement("select"); + opt = select.appendChild( document.createElement("option") ); + input = div.getElementsByTagName("input")[ 0 ]; + + a.style.cssText = "top:1px;float:left;opacity:.5"; + support = { + // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) + getSetAttribute: div.className !== "t", + + // IE strips leading whitespace when .innerHTML is used + leadingWhitespace: div.firstChild.nodeType === 3, + + // Make sure that tbody elements aren't automatically inserted + // IE will insert them into empty tables + tbody: !div.getElementsByTagName("tbody").length, + + // Make sure that link elements get serialized correctly by innerHTML + // This requires a wrapper element in IE + htmlSerialize: !!div.getElementsByTagName("link").length, + + // Get the style information from getAttribute + // (IE uses .cssText instead) + style: /top/.test( a.getAttribute("style") ), + + // Make sure that URLs aren't manipulated + // (IE normalizes it by default) + hrefNormalized: a.getAttribute("href") === "/a", + + // Make sure that element opacity exists + // (IE uses filter instead) + // Use a regex to work around a WebKit issue. See #5145 + opacity: /^0.5/.test( a.style.opacity ), + + // Verify style float existence + // (IE uses styleFloat instead of cssFloat) + cssFloat: !!a.style.cssFloat, + + // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere) + checkOn: !!input.value, + + // Make sure that a selected-by-default option has a working selected property. + // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) + optSelected: opt.selected, + + // Tests for enctype support on a form (#6743) + enctype: !!document.createElement("form").enctype, + + // Makes sure cloning an html5 element does not cause problems + // Where outerHTML is undefined, this still works + html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>", + + // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode + boxModel: document.compatMode === "CSS1Compat", + + // Will be defined later + deleteExpando: true, + noCloneEvent: true, + inlineBlockNeedsLayout: false, + shrinkWrapBlocks: false, + reliableMarginRight: true, + boxSizingReliable: true, + pixelPosition: false + }; + + // Make sure checked status is properly cloned + input.checked = true; + support.noCloneChecked = input.cloneNode( true ).checked; + + // Make sure that the options inside disabled selects aren't marked as disabled + // (WebKit marks them as disabled) + select.disabled = true; + support.optDisabled = !opt.disabled; + + // Support: IE<9 + try { + delete div.test; + } catch( e ) { + support.deleteExpando = false; + } + + // Check if we can trust getAttribute("value") + input = document.createElement("input"); + input.setAttribute( "value", "" ); + support.input = input.getAttribute( "value" ) === ""; + + // Check if an input maintains its value after becoming a radio + input.value = "t"; + input.setAttribute( "type", "radio" ); + support.radioValue = input.value === "t"; + + // #11217 - WebKit loses check when the name is after the checked attribute + input.setAttribute( "checked", "t" ); + input.setAttribute( "name", "t" ); + + fragment = document.createDocumentFragment(); + fragment.appendChild( input ); + + // Check if a disconnected checkbox will retain its checked + // value of true after appended to the DOM (IE6/7) + support.appendChecked = input.checked; + + // WebKit doesn't clone checked state correctly in fragments + support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; + + // Support: IE<9 + // Opera does not clone events (and typeof div.attachEvent === undefined). + // IE9-10 clones events bound via attachEvent, but they don't trigger with .click() + if ( div.attachEvent ) { + div.attachEvent( "onclick", function() { + support.noCloneEvent = false; + }); + + div.cloneNode( true ).click(); + } + + // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event) + // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP), test/csp.php + for ( i in { submit: true, change: true, focusin: true }) { + div.setAttribute( eventName = "on" + i, "t" ); + + support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false; + } + + div.style.backgroundClip = "content-box"; + div.cloneNode( true ).style.backgroundClip = ""; + support.clearCloneStyle = div.style.backgroundClip === "content-box"; + + // Run tests that need a body at doc ready + jQuery(function() { + var container, marginDiv, tds, + divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;", + body = document.getElementsByTagName("body")[0]; + + if ( !body ) { + // Return for frameset docs that don't have a body + return; + } + + container = document.createElement("div"); + container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px"; + + body.appendChild( container ).appendChild( div ); + + // Support: IE8 + // Check if table cells still have offsetWidth/Height when they are set + // to display:none and there are still other visible table cells in a + // table row; if so, offsetWidth/Height are not reliable for use when + // determining if an element has been hidden directly using + // display:none (it is still safe to use offsets if a parent element is + // hidden; don safety goggles and see bug #4512 for more information). + div.innerHTML = "
    t
    "; + tds = div.getElementsByTagName("td"); + tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none"; + isSupported = ( tds[ 0 ].offsetHeight === 0 ); + + tds[ 0 ].style.display = ""; + tds[ 1 ].style.display = "none"; + + // Support: IE8 + // Check if empty table cells still have offsetWidth/Height + support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); + + // Check box-sizing and margin behavior + div.innerHTML = ""; + div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"; + support.boxSizing = ( div.offsetWidth === 4 ); + support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 ); + + // Use window.getComputedStyle because jsdom on node.js will break without it. + if ( window.getComputedStyle ) { + support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; + support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; + + // Check if div with explicit width and no margin-right incorrectly + // gets computed margin-right based on width of container. (#3333) + // Fails in WebKit before Feb 2011 nightlies + // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right + marginDiv = div.appendChild( document.createElement("div") ); + marginDiv.style.cssText = div.style.cssText = divReset; + marginDiv.style.marginRight = marginDiv.style.width = "0"; + div.style.width = "1px"; + + support.reliableMarginRight = + !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); + } + + if ( typeof div.style.zoom !== core_strundefined ) { + // Support: IE<8 + // Check if natively block-level elements act like inline-block + // elements when setting their display to 'inline' and giving + // them layout + div.innerHTML = ""; + div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; + support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); + + // Support: IE6 + // Check if elements with layout shrink-wrap their children + div.style.display = "block"; + div.innerHTML = "
    "; + div.firstChild.style.width = "5px"; + support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); + + if ( support.inlineBlockNeedsLayout ) { + // Prevent IE 6 from affecting layout for positioned elements #11048 + // Prevent IE from shrinking the body in IE 7 mode #12869 + // Support: IE<8 + body.style.zoom = 1; + } + } + + body.removeChild( container ); + + // Null elements to avoid leaks in IE + container = div = tds = marginDiv = null; + }); + + // Null elements to avoid leaks in IE + all = select = fragment = opt = a = input = null; + + return support; +})(); + +var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, + rmultiDash = /([A-Z])/g; + +function internalData( elem, name, data, pvt /* Internal Use Only */ ){ + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var thisCache, ret, + internalKey = jQuery.expando, + getByName = typeof name === "string", + + // We have to handle DOM nodes and JS objects differently because IE6-7 + // can't GC object references properly across the DOM-JS boundary + isNode = elem.nodeType, + + // Only DOM nodes need the global jQuery cache; JS object data is + // attached directly to the object so GC can occur automatically + cache = isNode ? jQuery.cache : elem, + + // Only defining an ID for JS objects if its cache already exists allows + // the code to shortcut on the same path as a DOM node with no cache + id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; + + // Avoid doing any more work than we need to when trying to get data on an + // object that has no data at all + if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) { + return; + } + + if ( !id ) { + // Only DOM nodes need a new unique ID for each element since their data + // ends up in the global cache + if ( isNode ) { + elem[ internalKey ] = id = core_deletedIds.pop() || jQuery.guid++; + } else { + id = internalKey; + } + } + + if ( !cache[ id ] ) { + cache[ id ] = {}; + + // Avoids exposing jQuery metadata on plain JS objects when the object + // is serialized using JSON.stringify + if ( !isNode ) { + cache[ id ].toJSON = jQuery.noop; + } + } + + // An object can be passed to jQuery.data instead of a key/value pair; this gets + // shallow copied over onto the existing cache + if ( typeof name === "object" || typeof name === "function" ) { + if ( pvt ) { + cache[ id ] = jQuery.extend( cache[ id ], name ); + } else { + cache[ id ].data = jQuery.extend( cache[ id ].data, name ); + } + } + + thisCache = cache[ id ]; + + // jQuery data() is stored in a separate object inside the object's internal data + // cache in order to avoid key collisions between internal data and user-defined + // data. + if ( !pvt ) { + if ( !thisCache.data ) { + thisCache.data = {}; + } + + thisCache = thisCache.data; + } + + if ( data !== undefined ) { + thisCache[ jQuery.camelCase( name ) ] = data; + } + + // Check for both converted-to-camel and non-converted data property names + // If a data property was specified + if ( getByName ) { + + // First Try to find as-is property data + ret = thisCache[ name ]; + + // Test for null|undefined property data + if ( ret == null ) { + + // Try to find the camelCased property + ret = thisCache[ jQuery.camelCase( name ) ]; + } + } else { + ret = thisCache; + } + + return ret; +} + +function internalRemoveData( elem, name, pvt ) { + if ( !jQuery.acceptData( elem ) ) { + return; + } + + var i, l, thisCache, + isNode = elem.nodeType, + + // See jQuery.data for more information + cache = isNode ? jQuery.cache : elem, + id = isNode ? elem[ jQuery.expando ] : jQuery.expando; + + // If there is already no cache entry for this object, there is no + // purpose in continuing + if ( !cache[ id ] ) { + return; + } + + if ( name ) { + + thisCache = pvt ? cache[ id ] : cache[ id ].data; + + if ( thisCache ) { + + // Support array or space separated string names for data keys + if ( !jQuery.isArray( name ) ) { + + // try the string as a key before any manipulation + if ( name in thisCache ) { + name = [ name ]; + } else { + + // split the camel cased version by spaces unless a key with the spaces exists + name = jQuery.camelCase( name ); + if ( name in thisCache ) { + name = [ name ]; + } else { + name = name.split(" "); + } + } + } else { + // If "name" is an array of keys... + // When data is initially created, via ("key", "val") signature, + // keys will be converted to camelCase. + // Since there is no way to tell _how_ a key was added, remove + // both plain key and camelCase key. #12786 + // This will only penalize the array argument path. + name = name.concat( jQuery.map( name, jQuery.camelCase ) ); + } + + for ( i = 0, l = name.length; i < l; i++ ) { + delete thisCache[ name[i] ]; + } + + // If there is no data left in the cache, we want to continue + // and let the cache object itself get destroyed + if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) { + return; + } + } + } + + // See jQuery.data for more information + if ( !pvt ) { + delete cache[ id ].data; + + // Don't destroy the parent cache unless the internal data object + // had been the only thing left in it + if ( !isEmptyDataObject( cache[ id ] ) ) { + return; + } + } + + // Destroy the cache + if ( isNode ) { + jQuery.cleanData( [ elem ], true ); + + // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) + } else if ( jQuery.support.deleteExpando || cache != cache.window ) { + delete cache[ id ]; + + // When all else fails, null + } else { + cache[ id ] = null; + } +} + +jQuery.extend({ + cache: {}, + + // Unique for each copy of jQuery on the page + // Non-digits removed to match rinlinejQuery + expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ), + + // The following elements throw uncatchable exceptions if you + // attempt to add expando properties to them. + noData: { + "embed": true, + // Ban all objects except for Flash (which handle expandos) + "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000", + "applet": true + }, + + hasData: function( elem ) { + elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; + return !!elem && !isEmptyDataObject( elem ); + }, + + data: function( elem, name, data ) { + return internalData( elem, name, data ); + }, + + removeData: function( elem, name ) { + return internalRemoveData( elem, name ); + }, + + // For internal use only. + _data: function( elem, name, data ) { + return internalData( elem, name, data, true ); + }, + + _removeData: function( elem, name ) { + return internalRemoveData( elem, name, true ); + }, + + // A method for determining if a DOM node can handle the data expando + acceptData: function( elem ) { + // Do not set data on non-element because it will not be cleared (#8335). + if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) { + return false; + } + + var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; + + // nodes accept data unless otherwise specified; rejection can be conditional + return !noData || noData !== true && elem.getAttribute("classid") === noData; + } +}); + +jQuery.fn.extend({ + data: function( key, value ) { + var attrs, name, + elem = this[0], + i = 0, + data = null; + + // Gets all values + if ( key === undefined ) { + if ( this.length ) { + data = jQuery.data( elem ); + + if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { + attrs = elem.attributes; + for ( ; i < attrs.length; i++ ) { + name = attrs[i].name; + + if ( !name.indexOf( "data-" ) ) { + name = jQuery.camelCase( name.slice(5) ); + + dataAttr( elem, name, data[ name ] ); + } + } + jQuery._data( elem, "parsedAttrs", true ); + } + } + + return data; + } + + // Sets multiple values + if ( typeof key === "object" ) { + return this.each(function() { + jQuery.data( this, key ); + }); + } + + return jQuery.access( this, function( value ) { + + if ( value === undefined ) { + // Try to fetch any internally stored data first + return elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null; + } + + this.each(function() { + jQuery.data( this, key, value ); + }); + }, null, value, arguments.length > 1, null, true ); + }, + + removeData: function( key ) { + return this.each(function() { + jQuery.removeData( this, key ); + }); + } +}); + +function dataAttr( elem, key, data ) { + // If nothing was found internally, try to fetch any + // data from the HTML5 data-* attribute + if ( data === undefined && elem.nodeType === 1 ) { + + var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); + + data = elem.getAttribute( name ); + + if ( typeof data === "string" ) { + try { + data = data === "true" ? true : + data === "false" ? false : + data === "null" ? null : + // Only convert to a number if it doesn't change the string + +data + "" === data ? +data : + rbrace.test( data ) ? jQuery.parseJSON( data ) : + data; + } catch( e ) {} + + // Make sure we set the data so it isn't changed later + jQuery.data( elem, key, data ); + + } else { + data = undefined; + } + } + + return data; +} + +// checks a cache object for emptiness +function isEmptyDataObject( obj ) { + var name; + for ( name in obj ) { + + // if the public data object is empty, the private is still empty + if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { + continue; + } + if ( name !== "toJSON" ) { + return false; + } + } + + return true; +} +jQuery.extend({ + queue: function( elem, type, data ) { + var queue; + + if ( elem ) { + type = ( type || "fx" ) + "queue"; + queue = jQuery._data( elem, type ); + + // Speed up dequeue by getting out quickly if this is just a lookup + if ( data ) { + if ( !queue || jQuery.isArray(data) ) { + queue = jQuery._data( elem, type, jQuery.makeArray(data) ); + } else { + queue.push( data ); + } + } + return queue || []; + } + }, + + dequeue: function( elem, type ) { + type = type || "fx"; + + var queue = jQuery.queue( elem, type ), + startLength = queue.length, + fn = queue.shift(), + hooks = jQuery._queueHooks( elem, type ), + next = function() { + jQuery.dequeue( elem, type ); + }; + + // If the fx queue is dequeued, always remove the progress sentinel + if ( fn === "inprogress" ) { + fn = queue.shift(); + startLength--; + } + + hooks.cur = fn; + if ( fn ) { + + // Add a progress sentinel to prevent the fx queue from being + // automatically dequeued + if ( type === "fx" ) { + queue.unshift( "inprogress" ); + } + + // clear up the last queue stop function + delete hooks.stop; + fn.call( elem, next, hooks ); + } + + if ( !startLength && hooks ) { + hooks.empty.fire(); + } + }, + + // not intended for public consumption - generates a queueHooks object, or returns the current one + _queueHooks: function( elem, type ) { + var key = type + "queueHooks"; + return jQuery._data( elem, key ) || jQuery._data( elem, key, { + empty: jQuery.Callbacks("once memory").add(function() { + jQuery._removeData( elem, type + "queue" ); + jQuery._removeData( elem, key ); + }) + }); + } +}); + +jQuery.fn.extend({ + queue: function( type, data ) { + var setter = 2; + + if ( typeof type !== "string" ) { + data = type; + type = "fx"; + setter--; + } + + if ( arguments.length < setter ) { + return jQuery.queue( this[0], type ); + } + + return data === undefined ? + this : + this.each(function() { + var queue = jQuery.queue( this, type, data ); + + // ensure a hooks for this queue + jQuery._queueHooks( this, type ); + + if ( type === "fx" && queue[0] !== "inprogress" ) { + jQuery.dequeue( this, type ); + } + }); + }, + dequeue: function( type ) { + return this.each(function() { + jQuery.dequeue( this, type ); + }); + }, + // Based off of the plugin by Clint Helfers, with permission. + // http://blindsignals.com/index.php/2009/07/jquery-delay/ + delay: function( time, type ) { + time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; + type = type || "fx"; + + return this.queue( type, function( next, hooks ) { + var timeout = setTimeout( next, time ); + hooks.stop = function() { + clearTimeout( timeout ); + }; + }); + }, + clearQueue: function( type ) { + return this.queue( type || "fx", [] ); + }, + // Get a promise resolved when queues of a certain type + // are emptied (fx is the type by default) + promise: function( type, obj ) { + var tmp, + count = 1, + defer = jQuery.Deferred(), + elements = this, + i = this.length, + resolve = function() { + if ( !( --count ) ) { + defer.resolveWith( elements, [ elements ] ); + } + }; + + if ( typeof type !== "string" ) { + obj = type; + type = undefined; + } + type = type || "fx"; + + while( i-- ) { + tmp = jQuery._data( elements[ i ], type + "queueHooks" ); + if ( tmp && tmp.empty ) { + count++; + tmp.empty.add( resolve ); + } + } + resolve(); + return defer.promise( obj ); + } +}); +var nodeHook, boolHook, + rclass = /[\t\r\n]/g, + rreturn = /\r/g, + rfocusable = /^(?:input|select|textarea|button|object)$/i, + rclickable = /^(?:a|area)$/i, + rboolean = /^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i, + ruseDefault = /^(?:checked|selected)$/i, + getSetAttribute = jQuery.support.getSetAttribute, + getSetInput = jQuery.support.input; + +jQuery.fn.extend({ + attr: function( name, value ) { + return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); + }, + + removeAttr: function( name ) { + return this.each(function() { + jQuery.removeAttr( this, name ); + }); + }, + + prop: function( name, value ) { + return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); + }, + + removeProp: function( name ) { + name = jQuery.propFix[ name ] || name; + return this.each(function() { + // try/catch handles cases where IE balks (such as removing a property on window) + try { + this[ name ] = undefined; + delete this[ name ]; + } catch( e ) {} + }); + }, + + addClass: function( value ) { + var classes, elem, cur, clazz, j, + i = 0, + len = this.length, + proceed = typeof value === "string" && value; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).addClass( value.call( this, j, this.className ) ); + }); + } + + if ( proceed ) { + // The disjunction here is for better compressibility (see removeClass) + classes = ( value || "" ).match( core_rnotwhite ) || []; + + for ( ; i < len; i++ ) { + elem = this[ i ]; + cur = elem.nodeType === 1 && ( elem.className ? + ( " " + elem.className + " " ).replace( rclass, " " ) : + " " + ); + + if ( cur ) { + j = 0; + while ( (clazz = classes[j++]) ) { + if ( cur.indexOf( " " + clazz + " " ) < 0 ) { + cur += clazz + " "; + } + } + elem.className = jQuery.trim( cur ); + + } + } + } + + return this; + }, + + removeClass: function( value ) { + var classes, elem, cur, clazz, j, + i = 0, + len = this.length, + proceed = arguments.length === 0 || typeof value === "string" && value; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( j ) { + jQuery( this ).removeClass( value.call( this, j, this.className ) ); + }); + } + if ( proceed ) { + classes = ( value || "" ).match( core_rnotwhite ) || []; + + for ( ; i < len; i++ ) { + elem = this[ i ]; + // This expression is here for better compressibility (see addClass) + cur = elem.nodeType === 1 && ( elem.className ? + ( " " + elem.className + " " ).replace( rclass, " " ) : + "" + ); + + if ( cur ) { + j = 0; + while ( (clazz = classes[j++]) ) { + // Remove *all* instances + while ( cur.indexOf( " " + clazz + " " ) >= 0 ) { + cur = cur.replace( " " + clazz + " ", " " ); + } + } + elem.className = value ? jQuery.trim( cur ) : ""; + } + } + } + + return this; + }, + + toggleClass: function( value, stateVal ) { + var type = typeof value, + isBool = typeof stateVal === "boolean"; + + if ( jQuery.isFunction( value ) ) { + return this.each(function( i ) { + jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); + }); + } + + return this.each(function() { + if ( type === "string" ) { + // toggle individual class names + var className, + i = 0, + self = jQuery( this ), + state = stateVal, + classNames = value.match( core_rnotwhite ) || []; + + while ( (className = classNames[ i++ ]) ) { + // check each className given, space separated list + state = isBool ? state : !self.hasClass( className ); + self[ state ? "addClass" : "removeClass" ]( className ); + } + + // Toggle whole class name + } else if ( type === core_strundefined || type === "boolean" ) { + if ( this.className ) { + // store className if set + jQuery._data( this, "__className__", this.className ); + } + + // If the element has a class name or if we're passed "false", + // then remove the whole classname (if there was one, the above saved it). + // Otherwise bring back whatever was previously saved (if anything), + // falling back to the empty string if nothing was stored. + this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; + } + }); + }, + + hasClass: function( selector ) { + var className = " " + selector + " ", + i = 0, + l = this.length; + for ( ; i < l; i++ ) { + if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) { + return true; + } + } + + return false; + }, + + val: function( value ) { + var ret, hooks, isFunction, + elem = this[0]; + + if ( !arguments.length ) { + if ( elem ) { + hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; + + if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { + return ret; + } + + ret = elem.value; + + return typeof ret === "string" ? + // handle most common string cases + ret.replace(rreturn, "") : + // handle cases where value is null/undef or number + ret == null ? "" : ret; + } + + return; + } + + isFunction = jQuery.isFunction( value ); + + return this.each(function( i ) { + var val, + self = jQuery(this); + + if ( this.nodeType !== 1 ) { + return; + } + + if ( isFunction ) { + val = value.call( this, i, self.val() ); + } else { + val = value; + } + + // Treat null/undefined as ""; convert numbers to string + if ( val == null ) { + val = ""; + } else if ( typeof val === "number" ) { + val += ""; + } else if ( jQuery.isArray( val ) ) { + val = jQuery.map(val, function ( value ) { + return value == null ? "" : value + ""; + }); + } + + hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; + + // If set returns undefined, fall back to normal setting + if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { + this.value = val; + } + }); + } +}); + +jQuery.extend({ + valHooks: { + option: { + get: function( elem ) { + // attributes.value is undefined in Blackberry 4.7 but + // uses .value. See #6932 + var val = elem.attributes.value; + return !val || val.specified ? elem.value : elem.text; + } + }, + select: { + get: function( elem ) { + var value, option, + options = elem.options, + index = elem.selectedIndex, + one = elem.type === "select-one" || index < 0, + values = one ? null : [], + max = one ? index + 1 : options.length, + i = index < 0 ? + max : + one ? index : 0; + + // Loop through all the selected options + for ( ; i < max; i++ ) { + option = options[ i ]; + + // oldIE doesn't update selected after form reset (#2551) + if ( ( option.selected || i === index ) && + // Don't return options that are disabled or in a disabled optgroup + ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) && + ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { + + // Get the specific value for the option + value = jQuery( option ).val(); + + // We don't need an array for one selects + if ( one ) { + return value; + } + + // Multi-Selects return an array + values.push( value ); + } + } + + return values; + }, + + set: function( elem, value ) { + var values = jQuery.makeArray( value ); + + jQuery(elem).find("option").each(function() { + this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0; + }); + + if ( !values.length ) { + elem.selectedIndex = -1; + } + return values; + } + } + }, + + attr: function( elem, name, value ) { + var hooks, notxml, ret, + nType = elem.nodeType; + + // don't get/set attributes on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + // Fallback to prop when attributes are not supported + if ( typeof elem.getAttribute === core_strundefined ) { + return jQuery.prop( elem, name, value ); + } + + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + // All attributes are lowercase + // Grab necessary hook if one is defined + if ( notxml ) { + name = name.toLowerCase(); + hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook ); + } + + if ( value !== undefined ) { + + if ( value === null ) { + jQuery.removeAttr( elem, name ); + + } else if ( hooks && notxml && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + elem.setAttribute( name, value + "" ); + return value; + } + + } else if ( hooks && notxml && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + + // In IE9+, Flash objects don't have .getAttribute (#12945) + // Support: IE9+ + if ( typeof elem.getAttribute !== core_strundefined ) { + ret = elem.getAttribute( name ); + } + + // Non-existent attributes return null, we normalize to undefined + return ret == null ? + undefined : + ret; + } + }, + + removeAttr: function( elem, value ) { + var name, propName, + i = 0, + attrNames = value && value.match( core_rnotwhite ); + + if ( attrNames && elem.nodeType === 1 ) { + while ( (name = attrNames[i++]) ) { + propName = jQuery.propFix[ name ] || name; + + // Boolean attributes get special treatment (#10870) + if ( rboolean.test( name ) ) { + // Set corresponding property to false for boolean attributes + // Also clear defaultChecked/defaultSelected (if appropriate) for IE<8 + if ( !getSetAttribute && ruseDefault.test( name ) ) { + elem[ jQuery.camelCase( "default-" + name ) ] = + elem[ propName ] = false; + } else { + elem[ propName ] = false; + } + + // See #9699 for explanation of this approach (setting first, then removal) + } else { + jQuery.attr( elem, name, "" ); + } + + elem.removeAttribute( getSetAttribute ? name : propName ); + } + } + }, + + attrHooks: { + type: { + set: function( elem, value ) { + if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { + // Setting the type on a radio button after the value resets the value in IE6-9 + // Reset value to default in case type is set after value during creation + var val = elem.value; + elem.setAttribute( "type", value ); + if ( val ) { + elem.value = val; + } + return value; + } + } + } + }, + + propFix: { + tabindex: "tabIndex", + readonly: "readOnly", + "for": "htmlFor", + "class": "className", + maxlength: "maxLength", + cellspacing: "cellSpacing", + cellpadding: "cellPadding", + rowspan: "rowSpan", + colspan: "colSpan", + usemap: "useMap", + frameborder: "frameBorder", + contenteditable: "contentEditable" + }, + + prop: function( elem, name, value ) { + var ret, hooks, notxml, + nType = elem.nodeType; + + // don't get/set properties on text, comment and attribute nodes + if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { + return; + } + + notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); + + if ( notxml ) { + // Fix name and attach hooks + name = jQuery.propFix[ name ] || name; + hooks = jQuery.propHooks[ name ]; + } + + if ( value !== undefined ) { + if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { + return ret; + + } else { + return ( elem[ name ] = value ); + } + + } else { + if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { + return ret; + + } else { + return elem[ name ]; + } + } + }, + + propHooks: { + tabIndex: { + get: function( elem ) { + // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set + // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ + var attributeNode = elem.getAttributeNode("tabindex"); + + return attributeNode && attributeNode.specified ? + parseInt( attributeNode.value, 10 ) : + rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? + 0 : + undefined; + } + } + } +}); + +// Hook for boolean attributes +boolHook = { + get: function( elem, name ) { + var + // Use .prop to determine if this attribute is understood as boolean + prop = jQuery.prop( elem, name ), + + // Fetch it accordingly + attr = typeof prop === "boolean" && elem.getAttribute( name ), + detail = typeof prop === "boolean" ? + + getSetInput && getSetAttribute ? + attr != null : + // oldIE fabricates an empty string for missing boolean attributes + // and conflates checked/selected into attroperties + ruseDefault.test( name ) ? + elem[ jQuery.camelCase( "default-" + name ) ] : + !!attr : + + // fetch an attribute node for properties not recognized as boolean + elem.getAttributeNode( name ); + + return detail && detail.value !== false ? + name.toLowerCase() : + undefined; + }, + set: function( elem, value, name ) { + if ( value === false ) { + // Remove boolean attributes when set to false + jQuery.removeAttr( elem, name ); + } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { + // IE<8 needs the *property* name + elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name ); + + // Use defaultChecked and defaultSelected for oldIE + } else { + elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true; + } + + return name; + } +}; + +// fix oldIE value attroperty +if ( !getSetInput || !getSetAttribute ) { + jQuery.attrHooks.value = { + get: function( elem, name ) { + var ret = elem.getAttributeNode( name ); + return jQuery.nodeName( elem, "input" ) ? + + // Ignore the value *property* by using defaultValue + elem.defaultValue : + + ret && ret.specified ? ret.value : undefined; + }, + set: function( elem, value, name ) { + if ( jQuery.nodeName( elem, "input" ) ) { + // Does not return so that setAttribute is also used + elem.defaultValue = value; + } else { + // Use nodeHook if defined (#1954); otherwise setAttribute is fine + return nodeHook && nodeHook.set( elem, value, name ); + } + } + }; +} + +// IE6/7 do not support getting/setting some attributes with get/setAttribute +if ( !getSetAttribute ) { + + // Use this for any attribute in IE6/7 + // This fixes almost every IE6/7 issue + nodeHook = jQuery.valHooks.button = { + get: function( elem, name ) { + var ret = elem.getAttributeNode( name ); + return ret && ( name === "id" || name === "name" || name === "coords" ? ret.value !== "" : ret.specified ) ? + ret.value : + undefined; + }, + set: function( elem, value, name ) { + // Set the existing or create a new attribute node + var ret = elem.getAttributeNode( name ); + if ( !ret ) { + elem.setAttributeNode( + (ret = elem.ownerDocument.createAttribute( name )) + ); + } + + ret.value = value += ""; + + // Break association with cloned elements by also using setAttribute (#9646) + return name === "value" || value === elem.getAttribute( name ) ? + value : + undefined; + } + }; + + // Set contenteditable to false on removals(#10429) + // Setting to empty string throws an error as an invalid value + jQuery.attrHooks.contenteditable = { + get: nodeHook.get, + set: function( elem, value, name ) { + nodeHook.set( elem, value === "" ? false : value, name ); + } + }; + + // Set width and height to auto instead of 0 on empty string( Bug #8150 ) + // This is for removals + jQuery.each([ "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { + set: function( elem, value ) { + if ( value === "" ) { + elem.setAttribute( name, "auto" ); + return value; + } + } + }); + }); +} + + +// Some attributes require a special call on IE +// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx +if ( !jQuery.support.hrefNormalized ) { + jQuery.each([ "href", "src", "width", "height" ], function( i, name ) { + jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], { + get: function( elem ) { + var ret = elem.getAttribute( name, 2 ); + return ret == null ? undefined : ret; + } + }); + }); + + // href/src property should get the full normalized URL (#10299/#12915) + jQuery.each([ "href", "src" ], function( i, name ) { + jQuery.propHooks[ name ] = { + get: function( elem ) { + return elem.getAttribute( name, 4 ); + } + }; + }); +} + +if ( !jQuery.support.style ) { + jQuery.attrHooks.style = { + get: function( elem ) { + // Return undefined in the case of empty string + // Note: IE uppercases css property names, but if we were to .toLowerCase() + // .cssText, that would destroy case senstitivity in URL's, like in "background" + return elem.style.cssText || undefined; + }, + set: function( elem, value ) { + return ( elem.style.cssText = value + "" ); + } + }; +} + +// Safari mis-reports the default selected property of an option +// Accessing the parent's selectedIndex property fixes it +if ( !jQuery.support.optSelected ) { + jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, { + get: function( elem ) { + var parent = elem.parentNode; + + if ( parent ) { + parent.selectedIndex; + + // Make sure that it also works with optgroups, see #5701 + if ( parent.parentNode ) { + parent.parentNode.selectedIndex; + } + } + return null; + } + }); +} + +// IE6/7 call enctype encoding +if ( !jQuery.support.enctype ) { + jQuery.propFix.enctype = "encoding"; +} + +// Radios and checkboxes getter/setter +if ( !jQuery.support.checkOn ) { + jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = { + get: function( elem ) { + // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified + return elem.getAttribute("value") === null ? "on" : elem.value; + } + }; + }); +} +jQuery.each([ "radio", "checkbox" ], function() { + jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], { + set: function( elem, value ) { + if ( jQuery.isArray( value ) ) { + return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); + } + } + }); +}); +var rformElems = /^(?:input|select|textarea)$/i, + rkeyEvent = /^key/, + rmouseEvent = /^(?:mouse|contextmenu)|click/, + rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, + rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; + +function returnTrue() { + return true; +} + +function returnFalse() { + return false; +} + +/* + * Helper functions for managing events -- not part of the public interface. + * Props to Dean Edwards' addEvent library for many of the ideas. + */ +jQuery.event = { + + global: {}, + + add: function( elem, types, handler, data, selector ) { + var tmp, events, t, handleObjIn, + special, eventHandle, handleObj, + handlers, type, namespaces, origType, + elemData = jQuery._data( elem ); + + // Don't attach events to noData or text/comment nodes (but allow plain objects) + if ( !elemData ) { + return; + } + + // Caller can pass in an object of custom data in lieu of the handler + if ( handler.handler ) { + handleObjIn = handler; + handler = handleObjIn.handler; + selector = handleObjIn.selector; + } + + // Make sure that the handler has a unique ID, used to find/remove it later + if ( !handler.guid ) { + handler.guid = jQuery.guid++; + } + + // Init the element's event structure and main handler, if this is the first + if ( !(events = elemData.events) ) { + events = elemData.events = {}; + } + if ( !(eventHandle = elemData.handle) ) { + eventHandle = elemData.handle = function( e ) { + // Discard the second event of a jQuery.event.trigger() and + // when an event is called after a page has unloaded + return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ? + jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : + undefined; + }; + // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events + eventHandle.elem = elem; + } + + // Handle multiple events separated by a space + // jQuery(...).bind("mouseover mouseout", fn); + types = ( types || "" ).match( core_rnotwhite ) || [""]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // If event changes its type, use the special event handlers for the changed type + special = jQuery.event.special[ type ] || {}; + + // If selector defined, determine special event api type, otherwise given type + type = ( selector ? special.delegateType : special.bindType ) || type; + + // Update special based on newly reset type + special = jQuery.event.special[ type ] || {}; + + // handleObj is passed to all event handlers + handleObj = jQuery.extend({ + type: type, + origType: origType, + data: data, + handler: handler, + guid: handler.guid, + selector: selector, + needsContext: selector && jQuery.expr.match.needsContext.test( selector ), + namespace: namespaces.join(".") + }, handleObjIn ); + + // Init the event handler queue if we're the first + if ( !(handlers = events[ type ]) ) { + handlers = events[ type ] = []; + handlers.delegateCount = 0; + + // Only use addEventListener/attachEvent if the special events handler returns false + if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { + // Bind the global event handler to the element + if ( elem.addEventListener ) { + elem.addEventListener( type, eventHandle, false ); + + } else if ( elem.attachEvent ) { + elem.attachEvent( "on" + type, eventHandle ); + } + } + } + + if ( special.add ) { + special.add.call( elem, handleObj ); + + if ( !handleObj.handler.guid ) { + handleObj.handler.guid = handler.guid; + } + } + + // Add to the element's handler list, delegates in front + if ( selector ) { + handlers.splice( handlers.delegateCount++, 0, handleObj ); + } else { + handlers.push( handleObj ); + } + + // Keep track of which events have ever been used, for event optimization + jQuery.event.global[ type ] = true; + } + + // Nullify elem to prevent memory leaks in IE + elem = null; + }, + + // Detach an event or set of events from an element + remove: function( elem, types, handler, selector, mappedTypes ) { + var j, handleObj, tmp, + origCount, t, events, + special, handlers, type, + namespaces, origType, + elemData = jQuery.hasData( elem ) && jQuery._data( elem ); + + if ( !elemData || !(events = elemData.events) ) { + return; + } + + // Once for each type.namespace in types; type may be omitted + types = ( types || "" ).match( core_rnotwhite ) || [""]; + t = types.length; + while ( t-- ) { + tmp = rtypenamespace.exec( types[t] ) || []; + type = origType = tmp[1]; + namespaces = ( tmp[2] || "" ).split( "." ).sort(); + + // Unbind all events (on this namespace, if provided) for the element + if ( !type ) { + for ( type in events ) { + jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); + } + continue; + } + + special = jQuery.event.special[ type ] || {}; + type = ( selector ? special.delegateType : special.bindType ) || type; + handlers = events[ type ] || []; + tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); + + // Remove matching events + origCount = j = handlers.length; + while ( j-- ) { + handleObj = handlers[ j ]; + + if ( ( mappedTypes || origType === handleObj.origType ) && + ( !handler || handler.guid === handleObj.guid ) && + ( !tmp || tmp.test( handleObj.namespace ) ) && + ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { + handlers.splice( j, 1 ); + + if ( handleObj.selector ) { + handlers.delegateCount--; + } + if ( special.remove ) { + special.remove.call( elem, handleObj ); + } + } + } + + // Remove generic event handler if we removed something and no more handlers exist + // (avoids potential for endless recursion during removal of special event handlers) + if ( origCount && !handlers.length ) { + if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { + jQuery.removeEvent( elem, type, elemData.handle ); + } + + delete events[ type ]; + } + } + + // Remove the expando if it's no longer used + if ( jQuery.isEmptyObject( events ) ) { + delete elemData.handle; + + // removeData also checks for emptiness and clears the expando if empty + // so use it instead of delete + jQuery._removeData( elem, "events" ); + } + }, + + trigger: function( event, data, elem, onlyHandlers ) { + var handle, ontype, cur, + bubbleType, special, tmp, i, + eventPath = [ elem || document ], + type = core_hasOwn.call( event, "type" ) ? event.type : event, + namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; + + cur = tmp = elem = elem || document; + + // Don't do events on text and comment nodes + if ( elem.nodeType === 3 || elem.nodeType === 8 ) { + return; + } + + // focus/blur morphs to focusin/out; ensure we're not firing them right now + if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { + return; + } + + if ( type.indexOf(".") >= 0 ) { + // Namespaced trigger; create a regexp to match event type in handle() + namespaces = type.split("."); + type = namespaces.shift(); + namespaces.sort(); + } + ontype = type.indexOf(":") < 0 && "on" + type; + + // Caller can pass in a jQuery.Event object, Object, or just an event type string + event = event[ jQuery.expando ] ? + event : + new jQuery.Event( type, typeof event === "object" && event ); + + event.isTrigger = true; + event.namespace = namespaces.join("."); + event.namespace_re = event.namespace ? + new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : + null; + + // Clean up the event in case it is being reused + event.result = undefined; + if ( !event.target ) { + event.target = elem; + } + + // Clone any incoming data and prepend the event, creating the handler arg list + data = data == null ? + [ event ] : + jQuery.makeArray( data, [ event ] ); + + // Allow special events to draw outside the lines + special = jQuery.event.special[ type ] || {}; + if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { + return; + } + + // Determine event propagation path in advance, per W3C events spec (#9951) + // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) + if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { + + bubbleType = special.delegateType || type; + if ( !rfocusMorph.test( bubbleType + type ) ) { + cur = cur.parentNode; + } + for ( ; cur; cur = cur.parentNode ) { + eventPath.push( cur ); + tmp = cur; + } + + // Only add window if we got to document (e.g., not plain obj or detached DOM) + if ( tmp === (elem.ownerDocument || document) ) { + eventPath.push( tmp.defaultView || tmp.parentWindow || window ); + } + } + + // Fire handlers on the event path + i = 0; + while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { + + event.type = i > 1 ? + bubbleType : + special.bindType || type; + + // jQuery handler + handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); + if ( handle ) { + handle.apply( cur, data ); + } + + // Native handler + handle = ontype && cur[ ontype ]; + if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) { + event.preventDefault(); + } + } + event.type = type; + + // If nobody prevented the default action, do it now + if ( !onlyHandlers && !event.isDefaultPrevented() ) { + + if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) && + !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) { + + // Call a native DOM method on the target with the same name name as the event. + // Can't use an .isFunction() check here because IE6/7 fails that test. + // Don't do default actions on window, that's where global variables be (#6170) + if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { + + // Don't re-trigger an onFOO event when we call its FOO() method + tmp = elem[ ontype ]; + + if ( tmp ) { + elem[ ontype ] = null; + } + + // Prevent re-triggering of the same event, since we already bubbled it above + jQuery.event.triggered = type; + try { + elem[ type ](); + } catch ( e ) { + // IE<9 dies on focus/blur to hidden element (#1486,#12518) + // only reproducible on winXP IE8 native, not IE9 in IE8 mode + } + jQuery.event.triggered = undefined; + + if ( tmp ) { + elem[ ontype ] = tmp; + } + } + } + } + + return event.result; + }, + + dispatch: function( event ) { + + // Make a writable jQuery.Event from the native event object + event = jQuery.event.fix( event ); + + var i, ret, handleObj, matched, j, + handlerQueue = [], + args = core_slice.call( arguments ), + handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], + special = jQuery.event.special[ event.type ] || {}; + + // Use the fix-ed jQuery.Event rather than the (read-only) native event + args[0] = event; + event.delegateTarget = this; + + // Call the preDispatch hook for the mapped type, and let it bail if desired + if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { + return; + } + + // Determine handlers + handlerQueue = jQuery.event.handlers.call( this, event, handlers ); + + // Run delegates first; they may want to stop propagation beneath us + i = 0; + while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { + event.currentTarget = matched.elem; + + j = 0; + while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { + + // Triggered event must either 1) have no namespace, or + // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). + if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { + + event.handleObj = handleObj; + event.data = handleObj.data; + + ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) + .apply( matched.elem, args ); + + if ( ret !== undefined ) { + if ( (event.result = ret) === false ) { + event.preventDefault(); + event.stopPropagation(); + } + } + } + } + } + + // Call the postDispatch hook for the mapped type + if ( special.postDispatch ) { + special.postDispatch.call( this, event ); + } + + return event.result; + }, + + handlers: function( event, handlers ) { + var sel, handleObj, matches, i, + handlerQueue = [], + delegateCount = handlers.delegateCount, + cur = event.target; + + // Find delegate handlers + // Black-hole SVG instance trees (#13180) + // Avoid non-left-click bubbling in Firefox (#3861) + if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { + + for ( ; cur != this; cur = cur.parentNode || this ) { + + // Don't check non-elements (#13208) + // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) + if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) { + matches = []; + for ( i = 0; i < delegateCount; i++ ) { + handleObj = handlers[ i ]; + + // Don't conflict with Object.prototype properties (#13203) + sel = handleObj.selector + " "; + + if ( matches[ sel ] === undefined ) { + matches[ sel ] = handleObj.needsContext ? + jQuery( sel, this ).index( cur ) >= 0 : + jQuery.find( sel, this, null, [ cur ] ).length; + } + if ( matches[ sel ] ) { + matches.push( handleObj ); + } + } + if ( matches.length ) { + handlerQueue.push({ elem: cur, handlers: matches }); + } + } + } + } + + // Add the remaining (directly-bound) handlers + if ( delegateCount < handlers.length ) { + handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); + } + + return handlerQueue; + }, + + fix: function( event ) { + if ( event[ jQuery.expando ] ) { + return event; + } + + // Create a writable copy of the event object and normalize some properties + var i, prop, copy, + type = event.type, + originalEvent = event, + fixHook = this.fixHooks[ type ]; + + if ( !fixHook ) { + this.fixHooks[ type ] = fixHook = + rmouseEvent.test( type ) ? this.mouseHooks : + rkeyEvent.test( type ) ? this.keyHooks : + {}; + } + copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; + + event = new jQuery.Event( originalEvent ); + + i = copy.length; + while ( i-- ) { + prop = copy[ i ]; + event[ prop ] = originalEvent[ prop ]; + } + + // Support: IE<9 + // Fix target property (#1925) + if ( !event.target ) { + event.target = originalEvent.srcElement || document; + } + + // Support: Chrome 23+, Safari? + // Target should not be a text node (#504, #13143) + if ( event.target.nodeType === 3 ) { + event.target = event.target.parentNode; + } + + // Support: IE<9 + // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) + event.metaKey = !!event.metaKey; + + return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; + }, + + // Includes some event props shared by KeyEvent and MouseEvent + props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), + + fixHooks: {}, + + keyHooks: { + props: "char charCode key keyCode".split(" "), + filter: function( event, original ) { + + // Add which for key events + if ( event.which == null ) { + event.which = original.charCode != null ? original.charCode : original.keyCode; + } + + return event; + } + }, + + mouseHooks: { + props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), + filter: function( event, original ) { + var body, eventDoc, doc, + button = original.button, + fromElement = original.fromElement; + + // Calculate pageX/Y if missing and clientX/Y available + if ( event.pageX == null && original.clientX != null ) { + eventDoc = event.target.ownerDocument || document; + doc = eventDoc.documentElement; + body = eventDoc.body; + + event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); + event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); + } + + // Add relatedTarget, if necessary + if ( !event.relatedTarget && fromElement ) { + event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; + } + + // Add which for click: 1 === left; 2 === middle; 3 === right + // Note: button is not normalized, so don't use it + if ( !event.which && button !== undefined ) { + event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); + } + + return event; + } + }, + + special: { + load: { + // Prevent triggered image.load events from bubbling to window.load + noBubble: true + }, + click: { + // For checkbox, fire native event so checked state will be right + trigger: function() { + if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { + this.click(); + return false; + } + } + }, + focus: { + // Fire native event if possible so blur/focus sequence is correct + trigger: function() { + if ( this !== document.activeElement && this.focus ) { + try { + this.focus(); + return false; + } catch ( e ) { + // Support: IE<9 + // If we error on focus to hidden element (#1486, #12518), + // let .trigger() run the handlers + } + } + }, + delegateType: "focusin" + }, + blur: { + trigger: function() { + if ( this === document.activeElement && this.blur ) { + this.blur(); + return false; + } + }, + delegateType: "focusout" + }, + + beforeunload: { + postDispatch: function( event ) { + + // Even when returnValue equals to undefined Firefox will still show alert + if ( event.result !== undefined ) { + event.originalEvent.returnValue = event.result; + } + } + } + }, + + simulate: function( type, elem, event, bubble ) { + // Piggyback on a donor event to simulate a different one. + // Fake originalEvent to avoid donor's stopPropagation, but if the + // simulated event prevents default then we do the same on the donor. + var e = jQuery.extend( + new jQuery.Event(), + event, + { type: type, + isSimulated: true, + originalEvent: {} + } + ); + if ( bubble ) { + jQuery.event.trigger( e, null, elem ); + } else { + jQuery.event.dispatch.call( elem, e ); + } + if ( e.isDefaultPrevented() ) { + event.preventDefault(); + } + } +}; + +jQuery.removeEvent = document.removeEventListener ? + function( elem, type, handle ) { + if ( elem.removeEventListener ) { + elem.removeEventListener( type, handle, false ); + } + } : + function( elem, type, handle ) { + var name = "on" + type; + + if ( elem.detachEvent ) { + + // #8545, #7054, preventing memory leaks for custom events in IE6-8 + // detachEvent needed property on element, by name of that event, to properly expose it to GC + if ( typeof elem[ name ] === core_strundefined ) { + elem[ name ] = null; + } + + elem.detachEvent( name, handle ); + } + }; + +jQuery.Event = function( src, props ) { + // Allow instantiation without the 'new' keyword + if ( !(this instanceof jQuery.Event) ) { + return new jQuery.Event( src, props ); + } + + // Event object + if ( src && src.type ) { + this.originalEvent = src; + this.type = src.type; + + // Events bubbling up the document may have been marked as prevented + // by a handler lower down the tree; reflect the correct value. + this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || + src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; + + // Event type + } else { + this.type = src; + } + + // Put explicitly provided properties onto the event object + if ( props ) { + jQuery.extend( this, props ); + } + + // Create a timestamp if incoming event doesn't have one + this.timeStamp = src && src.timeStamp || jQuery.now(); + + // Mark it as fixed + this[ jQuery.expando ] = true; +}; + +// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding +// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html +jQuery.Event.prototype = { + isDefaultPrevented: returnFalse, + isPropagationStopped: returnFalse, + isImmediatePropagationStopped: returnFalse, + + preventDefault: function() { + var e = this.originalEvent; + + this.isDefaultPrevented = returnTrue; + if ( !e ) { + return; + } + + // If preventDefault exists, run it on the original event + if ( e.preventDefault ) { + e.preventDefault(); + + // Support: IE + // Otherwise set the returnValue property of the original event to false + } else { + e.returnValue = false; + } + }, + stopPropagation: function() { + var e = this.originalEvent; + + this.isPropagationStopped = returnTrue; + if ( !e ) { + return; + } + // If stopPropagation exists, run it on the original event + if ( e.stopPropagation ) { + e.stopPropagation(); + } + + // Support: IE + // Set the cancelBubble property of the original event to true + e.cancelBubble = true; + }, + stopImmediatePropagation: function() { + this.isImmediatePropagationStopped = returnTrue; + this.stopPropagation(); + } +}; + +// Create mouseenter/leave events using mouseover/out and event-time checks +jQuery.each({ + mouseenter: "mouseover", + mouseleave: "mouseout" +}, function( orig, fix ) { + jQuery.event.special[ orig ] = { + delegateType: fix, + bindType: fix, + + handle: function( event ) { + var ret, + target = this, + related = event.relatedTarget, + handleObj = event.handleObj; + + // For mousenter/leave call the handler if related is outside the target. + // NB: No relatedTarget if the mouse left/entered the browser window + if ( !related || (related !== target && !jQuery.contains( target, related )) ) { + event.type = handleObj.origType; + ret = handleObj.handler.apply( this, arguments ); + event.type = fix; + } + return ret; + } + }; +}); + +// IE submit delegation +if ( !jQuery.support.submitBubbles ) { + + jQuery.event.special.submit = { + setup: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Lazy-add a submit handler when a descendant form may potentially be submitted + jQuery.event.add( this, "click._submit keypress._submit", function( e ) { + // Node name check avoids a VML-related crash in IE (#9807) + var elem = e.target, + form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; + if ( form && !jQuery._data( form, "submitBubbles" ) ) { + jQuery.event.add( form, "submit._submit", function( event ) { + event._submit_bubble = true; + }); + jQuery._data( form, "submitBubbles", true ); + } + }); + // return undefined since we don't need an event listener + }, + + postDispatch: function( event ) { + // If form was submitted by the user, bubble the event up the tree + if ( event._submit_bubble ) { + delete event._submit_bubble; + if ( this.parentNode && !event.isTrigger ) { + jQuery.event.simulate( "submit", this.parentNode, event, true ); + } + } + }, + + teardown: function() { + // Only need this for delegated form submit events + if ( jQuery.nodeName( this, "form" ) ) { + return false; + } + + // Remove delegated handlers; cleanData eventually reaps submit handlers attached above + jQuery.event.remove( this, "._submit" ); + } + }; +} + +// IE change delegation and checkbox/radio fix +if ( !jQuery.support.changeBubbles ) { + + jQuery.event.special.change = { + + setup: function() { + + if ( rformElems.test( this.nodeName ) ) { + // IE doesn't fire change on a check/radio until blur; trigger it on click + // after a propertychange. Eat the blur-change in special.change.handle. + // This still fires onchange a second time for check/radio after blur. + if ( this.type === "checkbox" || this.type === "radio" ) { + jQuery.event.add( this, "propertychange._change", function( event ) { + if ( event.originalEvent.propertyName === "checked" ) { + this._just_changed = true; + } + }); + jQuery.event.add( this, "click._change", function( event ) { + if ( this._just_changed && !event.isTrigger ) { + this._just_changed = false; + } + // Allow triggered, simulated change events (#11500) + jQuery.event.simulate( "change", this, event, true ); + }); + } + return false; + } + // Delegated event; lazy-add a change handler on descendant inputs + jQuery.event.add( this, "beforeactivate._change", function( e ) { + var elem = e.target; + + if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) { + jQuery.event.add( elem, "change._change", function( event ) { + if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { + jQuery.event.simulate( "change", this.parentNode, event, true ); + } + }); + jQuery._data( elem, "changeBubbles", true ); + } + }); + }, + + handle: function( event ) { + var elem = event.target; + + // Swallow native change events from checkbox/radio, we already triggered them above + if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { + return event.handleObj.handler.apply( this, arguments ); + } + }, + + teardown: function() { + jQuery.event.remove( this, "._change" ); + + return !rformElems.test( this.nodeName ); + } + }; +} + +// Create "bubbling" focus and blur events +if ( !jQuery.support.focusinBubbles ) { + jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { + + // Attach a single capturing handler while someone wants focusin/focusout + var attaches = 0, + handler = function( event ) { + jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); + }; + + jQuery.event.special[ fix ] = { + setup: function() { + if ( attaches++ === 0 ) { + document.addEventListener( orig, handler, true ); + } + }, + teardown: function() { + if ( --attaches === 0 ) { + document.removeEventListener( orig, handler, true ); + } + } + }; + }); +} + +jQuery.fn.extend({ + + on: function( types, selector, data, fn, /*INTERNAL*/ one ) { + var type, origFn; + + // Types can be a map of types/handlers + if ( typeof types === "object" ) { + // ( types-Object, selector, data ) + if ( typeof selector !== "string" ) { + // ( types-Object, data ) + data = data || selector; + selector = undefined; + } + for ( type in types ) { + this.on( type, selector, data, types[ type ], one ); + } + return this; + } + + if ( data == null && fn == null ) { + // ( types, fn ) + fn = selector; + data = selector = undefined; + } else if ( fn == null ) { + if ( typeof selector === "string" ) { + // ( types, selector, fn ) + fn = data; + data = undefined; + } else { + // ( types, data, fn ) + fn = data; + data = selector; + selector = undefined; + } + } + if ( fn === false ) { + fn = returnFalse; + } else if ( !fn ) { + return this; + } + + if ( one === 1 ) { + origFn = fn; + fn = function( event ) { + // Can use an empty set, since event contains the info + jQuery().off( event ); + return origFn.apply( this, arguments ); + }; + // Use same guid so caller can remove using origFn + fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); + } + return this.each( function() { + jQuery.event.add( this, types, fn, data, selector ); + }); + }, + one: function( types, selector, data, fn ) { + return this.on( types, selector, data, fn, 1 ); + }, + off: function( types, selector, fn ) { + var handleObj, type; + if ( types && types.preventDefault && types.handleObj ) { + // ( event ) dispatched jQuery.Event + handleObj = types.handleObj; + jQuery( types.delegateTarget ).off( + handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, + handleObj.selector, + handleObj.handler + ); + return this; + } + if ( typeof types === "object" ) { + // ( types-object [, selector] ) + for ( type in types ) { + this.off( type, selector, types[ type ] ); + } + return this; + } + if ( selector === false || typeof selector === "function" ) { + // ( types [, fn] ) + fn = selector; + selector = undefined; + } + if ( fn === false ) { + fn = returnFalse; + } + return this.each(function() { + jQuery.event.remove( this, types, fn, selector ); + }); + }, + + bind: function( types, data, fn ) { + return this.on( types, null, data, fn ); + }, + unbind: function( types, fn ) { + return this.off( types, null, fn ); + }, + + delegate: function( selector, types, data, fn ) { + return this.on( types, selector, data, fn ); + }, + undelegate: function( selector, types, fn ) { + // ( namespace ) or ( selector, types [, fn] ) + return arguments.length === 1 ? this.off( selector, "**" ) : this.off( types, selector || "**", fn ); + }, + + trigger: function( type, data ) { + return this.each(function() { + jQuery.event.trigger( type, data, this ); + }); + }, + triggerHandler: function( type, data ) { + var elem = this[0]; + if ( elem ) { + return jQuery.event.trigger( type, data, elem, true ); + } + } +}); +/*! + * Sizzle CSS Selector Engine + * Copyright 2012 jQuery Foundation and other contributors + * Released under the MIT license + * http://sizzlejs.com/ + */ +(function( window, undefined ) { + +var i, + cachedruns, + Expr, + getText, + isXML, + compile, + hasDuplicate, + outermostContext, + + // Local document vars + setDocument, + document, + docElem, + documentIsXML, + rbuggyQSA, + rbuggyMatches, + matches, + contains, + sortOrder, + + // Instance-specific data + expando = "sizzle" + -(new Date()), + preferredDoc = window.document, + support = {}, + dirruns = 0, + done = 0, + classCache = createCache(), + tokenCache = createCache(), + compilerCache = createCache(), + + // General-purpose constants + strundefined = typeof undefined, + MAX_NEGATIVE = 1 << 31, + + // Array methods + arr = [], + pop = arr.pop, + push = arr.push, + slice = arr.slice, + // Use a stripped-down indexOf if we can't use a native one + indexOf = arr.indexOf || function( elem ) { + var i = 0, + len = this.length; + for ( ; i < len; i++ ) { + if ( this[i] === elem ) { + return i; + } + } + return -1; + }, + + + // Regular expressions + + // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace + whitespace = "[\\x20\\t\\r\\n\\f]", + // http://www.w3.org/TR/css3-syntax/#characters + characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", + + // Loosely modeled on CSS identifier characters + // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors + // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier + identifier = characterEncoding.replace( "w", "w#" ), + + // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors + operators = "([*^$|!~]?=)", + attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + + "*(?:" + operators + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", + + // Prefer arguments quoted, + // then not containing pseudos/brackets, + // then attribute selectors/non-parenthetical expressions, + // then anything else + // These preferences are here to reduce the number of selectors + // needing tokenize in the PSEUDO preFilter + pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)", + + // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter + rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), + + rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), + rcombinators = new RegExp( "^" + whitespace + "*([\\x20\\t\\r\\n\\f>+~])" + whitespace + "*" ), + rpseudo = new RegExp( pseudos ), + ridentifier = new RegExp( "^" + identifier + "$" ), + + matchExpr = { + "ID": new RegExp( "^#(" + characterEncoding + ")" ), + "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), + "NAME": new RegExp( "^\\[name=['\"]?(" + characterEncoding + ")['\"]?\\]" ), + "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), + "ATTR": new RegExp( "^" + attributes ), + "PSEUDO": new RegExp( "^" + pseudos ), + "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + + "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), + // For use in libraries implementing .is() + // We use this for POS matching in `select` + "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) + }, + + rsibling = /[\x20\t\r\n\f]*[+~]/, + + rnative = /^[^{]+\{\s*\[native code/, + + // Easily-parseable/retrievable ID or TAG or CLASS selectors + rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + + rinputs = /^(?:input|select|textarea|button)$/i, + rheader = /^h\d$/i, + + rescape = /'|\\/g, + rattributeQuotes = /\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g, + + // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters + runescape = /\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g, + funescape = function( _, escaped ) { + var high = "0x" + escaped - 0x10000; + // NaN means non-codepoint + return high !== high ? + escaped : + // BMP codepoint + high < 0 ? + String.fromCharCode( high + 0x10000 ) : + // Supplemental Plane codepoint (surrogate pair) + String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); + }; + +// Use a stripped-down slice if we can't use a native one +try { + slice.call( preferredDoc.documentElement.childNodes, 0 )[0].nodeType; +} catch ( e ) { + slice = function( i ) { + var elem, + results = []; + while ( (elem = this[i++]) ) { + results.push( elem ); + } + return results; + }; +} + +/** + * For feature detection + * @param {Function} fn The function to test for native support + */ +function isNative( fn ) { + return rnative.test( fn + "" ); +} + +/** + * Create key-value caches of limited size + * @returns {Function(string, Object)} Returns the Object data after storing it on itself with + * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) + * deleting the oldest entry + */ +function createCache() { + var cache, + keys = []; + + return (cache = function( key, value ) { + // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) + if ( keys.push( key += " " ) > Expr.cacheLength ) { + // Only keep the most recent entries + delete cache[ keys.shift() ]; + } + return (cache[ key ] = value); + }); +} + +/** + * Mark a function for special use by Sizzle + * @param {Function} fn The function to mark + */ +function markFunction( fn ) { + fn[ expando ] = true; + return fn; +} + +/** + * Support testing using an element + * @param {Function} fn Passed the created div and expects a boolean result + */ +function assert( fn ) { + var div = document.createElement("div"); + + try { + return fn( div ); + } catch (e) { + return false; + } finally { + // release memory in IE + div = null; + } +} + +function Sizzle( selector, context, results, seed ) { + var match, elem, m, nodeType, + // QSA vars + i, groups, old, nid, newContext, newSelector; + + if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { + setDocument( context ); + } + + context = context || document; + results = results || []; + + if ( !selector || typeof selector !== "string" ) { + return results; + } + + if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { + return []; + } + + if ( !documentIsXML && !seed ) { + + // Shortcuts + if ( (match = rquickExpr.exec( selector )) ) { + // Speed-up: Sizzle("#ID") + if ( (m = match[1]) ) { + if ( nodeType === 9 ) { + elem = context.getElementById( m ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + if ( elem && elem.parentNode ) { + // Handle the case where IE, Opera, and Webkit return items + // by name instead of ID + if ( elem.id === m ) { + results.push( elem ); + return results; + } + } else { + return results; + } + } else { + // Context is not a document + if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && + contains( context, elem ) && elem.id === m ) { + results.push( elem ); + return results; + } + } + + // Speed-up: Sizzle("TAG") + } else if ( match[2] ) { + push.apply( results, slice.call(context.getElementsByTagName( selector ), 0) ); + return results; + + // Speed-up: Sizzle(".CLASS") + } else if ( (m = match[3]) && support.getByClassName && context.getElementsByClassName ) { + push.apply( results, slice.call(context.getElementsByClassName( m ), 0) ); + return results; + } + } + + // QSA path + if ( support.qsa && !rbuggyQSA.test(selector) ) { + old = true; + nid = expando; + newContext = context; + newSelector = nodeType === 9 && selector; + + // qSA works strangely on Element-rooted queries + // We can work around this by specifying an extra ID on the root + // and working up from there (Thanks to Andrew Dupont for the technique) + // IE 8 doesn't work on object elements + if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { + groups = tokenize( selector ); + + if ( (old = context.getAttribute("id")) ) { + nid = old.replace( rescape, "\\$&" ); + } else { + context.setAttribute( "id", nid ); + } + nid = "[id='" + nid + "'] "; + + i = groups.length; + while ( i-- ) { + groups[i] = nid + toSelector( groups[i] ); + } + newContext = rsibling.test( selector ) && context.parentNode || context; + newSelector = groups.join(","); + } + + if ( newSelector ) { + try { + push.apply( results, slice.call( newContext.querySelectorAll( + newSelector + ), 0 ) ); + return results; + } catch(qsaError) { + } finally { + if ( !old ) { + context.removeAttribute("id"); + } + } + } + } + } + + // All others + return select( selector.replace( rtrim, "$1" ), context, results, seed ); +} + +/** + * Detect xml + * @param {Element|Object} elem An element or a document + */ +isXML = Sizzle.isXML = function( elem ) { + // documentElement is verified for cases where it doesn't yet exist + // (such as loading iframes in IE - #4833) + var documentElement = elem && (elem.ownerDocument || elem).documentElement; + return documentElement ? documentElement.nodeName !== "HTML" : false; +}; + +/** + * Sets document-related variables once based on the current document + * @param {Element|Object} [doc] An element or document object to use to set the document + * @returns {Object} Returns the current document + */ +setDocument = Sizzle.setDocument = function( node ) { + var doc = node ? node.ownerDocument || node : preferredDoc; + + // If no document and documentElement is available, return + if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { + return document; + } + + // Set our document + document = doc; + docElem = doc.documentElement; + + // Support tests + documentIsXML = isXML( doc ); + + // Check if getElementsByTagName("*") returns only elements + support.tagNameNoComments = assert(function( div ) { + div.appendChild( doc.createComment("") ); + return !div.getElementsByTagName("*").length; + }); + + // Check if attributes should be retrieved by attribute nodes + support.attributes = assert(function( div ) { + div.innerHTML = ""; + var type = typeof div.lastChild.getAttribute("multiple"); + // IE8 returns a string for some attributes even when not present + return type !== "boolean" && type !== "string"; + }); + + // Check if getElementsByClassName can be trusted + support.getByClassName = assert(function( div ) { + // Opera can't find a second classname (in 9.6) + div.innerHTML = ""; + if ( !div.getElementsByClassName || !div.getElementsByClassName("e").length ) { + return false; + } + + // Safari 3.2 caches class attributes and doesn't catch changes + div.lastChild.className = "e"; + return div.getElementsByClassName("e").length === 2; + }); + + // Check if getElementById returns elements by name + // Check if getElementsByName privileges form controls or returns elements by ID + support.getByName = assert(function( div ) { + // Inject content + div.id = expando + 0; + div.innerHTML = "
    "; + docElem.insertBefore( div, docElem.firstChild ); + + // Test + var pass = doc.getElementsByName && + // buggy browsers will return fewer than the correct 2 + doc.getElementsByName( expando ).length === 2 + + // buggy browsers will return more than the correct 0 + doc.getElementsByName( expando + 0 ).length; + support.getIdNotName = !doc.getElementById( expando ); + + // Cleanup + docElem.removeChild( div ); + + return pass; + }); + + // IE6/7 return modified attributes + Expr.attrHandle = assert(function( div ) { + div.innerHTML = ""; + return div.firstChild && typeof div.firstChild.getAttribute !== strundefined && + div.firstChild.getAttribute("href") === "#"; + }) ? + {} : + { + "href": function( elem ) { + return elem.getAttribute( "href", 2 ); + }, + "type": function( elem ) { + return elem.getAttribute("type"); + } + }; + + // ID find and filter + if ( support.getIdNotName ) { + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== strundefined && !documentIsXML ) { + var m = context.getElementById( id ); + // Check parentNode to catch when Blackberry 4.6 returns + // nodes that are no longer in the document #6963 + return m && m.parentNode ? [m] : []; + } + }; + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + return elem.getAttribute("id") === attrId; + }; + }; + } else { + Expr.find["ID"] = function( id, context ) { + if ( typeof context.getElementById !== strundefined && !documentIsXML ) { + var m = context.getElementById( id ); + + return m ? + m.id === id || typeof m.getAttributeNode !== strundefined && m.getAttributeNode("id").value === id ? + [m] : + undefined : + []; + } + }; + Expr.filter["ID"] = function( id ) { + var attrId = id.replace( runescape, funescape ); + return function( elem ) { + var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); + return node && node.value === attrId; + }; + }; + } + + // Tag + Expr.find["TAG"] = support.tagNameNoComments ? + function( tag, context ) { + if ( typeof context.getElementsByTagName !== strundefined ) { + return context.getElementsByTagName( tag ); + } + } : + function( tag, context ) { + var elem, + tmp = [], + i = 0, + results = context.getElementsByTagName( tag ); + + // Filter out possible comments + if ( tag === "*" ) { + while ( (elem = results[i++]) ) { + if ( elem.nodeType === 1 ) { + tmp.push( elem ); + } + } + + return tmp; + } + return results; + }; + + // Name + Expr.find["NAME"] = support.getByName && function( tag, context ) { + if ( typeof context.getElementsByName !== strundefined ) { + return context.getElementsByName( name ); + } + }; + + // Class + Expr.find["CLASS"] = support.getByClassName && function( className, context ) { + if ( typeof context.getElementsByClassName !== strundefined && !documentIsXML ) { + return context.getElementsByClassName( className ); + } + }; + + // QSA and matchesSelector support + + // matchesSelector(:active) reports false when true (IE9/Opera 11.5) + rbuggyMatches = []; + + // qSa(:focus) reports false when true (Chrome 21), + // no need to also add to buggyMatches since matches checks buggyQSA + // A support test would require too much code (would include document ready) + rbuggyQSA = [ ":focus" ]; + + if ( (support.qsa = isNative(doc.querySelectorAll)) ) { + // Build QSA regex + // Regex strategy adopted from Diego Perini + assert(function( div ) { + // Select is set to empty string on purpose + // This is to test IE's treatment of not explictly + // setting a boolean content attribute, + // since its presence should be enough + // http://bugs.jquery.com/ticket/12359 + div.innerHTML = ""; + + // IE8 - Some boolean attributes are not treated correctly + if ( !div.querySelectorAll("[selected]").length ) { + rbuggyQSA.push( "\\[" + whitespace + "*(?:checked|disabled|ismap|multiple|readonly|selected|value)" ); + } + + // Webkit/Opera - :checked should return selected option elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":checked").length ) { + rbuggyQSA.push(":checked"); + } + }); + + assert(function( div ) { + + // Opera 10-12/IE8 - ^= $= *= and empty values + // Should not select anything + div.innerHTML = ""; + if ( div.querySelectorAll("[i^='']").length ) { + rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:\"\"|'')" ); + } + + // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) + // IE8 throws error here and will not see later tests + if ( !div.querySelectorAll(":enabled").length ) { + rbuggyQSA.push( ":enabled", ":disabled" ); + } + + // Opera 10-11 does not throw on post-comma invalid pseudos + div.querySelectorAll("*,:x"); + rbuggyQSA.push(",.*:"); + }); + } + + if ( (support.matchesSelector = isNative( (matches = docElem.matchesSelector || + docElem.mozMatchesSelector || + docElem.webkitMatchesSelector || + docElem.oMatchesSelector || + docElem.msMatchesSelector) )) ) { + + assert(function( div ) { + // Check to see if it's possible to do matchesSelector + // on a disconnected node (IE 9) + support.disconnectedMatch = matches.call( div, "div" ); + + // This should fail with an exception + // Gecko does not error, returns false instead + matches.call( div, "[s!='']:x" ); + rbuggyMatches.push( "!=", pseudos ); + }); + } + + rbuggyQSA = new RegExp( rbuggyQSA.join("|") ); + rbuggyMatches = new RegExp( rbuggyMatches.join("|") ); + + // Element contains another + // Purposefully does not implement inclusive descendent + // As in, an element does not contain itself + contains = isNative(docElem.contains) || docElem.compareDocumentPosition ? + function( a, b ) { + var adown = a.nodeType === 9 ? a.documentElement : a, + bup = b && b.parentNode; + return a === bup || !!( bup && bup.nodeType === 1 && ( + adown.contains ? + adown.contains( bup ) : + a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 + )); + } : + function( a, b ) { + if ( b ) { + while ( (b = b.parentNode) ) { + if ( b === a ) { + return true; + } + } + } + return false; + }; + + // Document order sorting + sortOrder = docElem.compareDocumentPosition ? + function( a, b ) { + var compare; + + if ( a === b ) { + hasDuplicate = true; + return 0; + } + + if ( (compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b )) ) { + if ( compare & 1 || a.parentNode && a.parentNode.nodeType === 11 ) { + if ( a === doc || contains( preferredDoc, a ) ) { + return -1; + } + if ( b === doc || contains( preferredDoc, b ) ) { + return 1; + } + return 0; + } + return compare & 4 ? -1 : 1; + } + + return a.compareDocumentPosition ? -1 : 1; + } : + function( a, b ) { + var cur, + i = 0, + aup = a.parentNode, + bup = b.parentNode, + ap = [ a ], + bp = [ b ]; + + // Exit early if the nodes are identical + if ( a === b ) { + hasDuplicate = true; + return 0; + + // Parentless nodes are either documents or disconnected + } else if ( !aup || !bup ) { + return a === doc ? -1 : + b === doc ? 1 : + aup ? -1 : + bup ? 1 : + 0; + + // If the nodes are siblings, we can do a quick check + } else if ( aup === bup ) { + return siblingCheck( a, b ); + } + + // Otherwise we need full lists of their ancestors for comparison + cur = a; + while ( (cur = cur.parentNode) ) { + ap.unshift( cur ); + } + cur = b; + while ( (cur = cur.parentNode) ) { + bp.unshift( cur ); + } + + // Walk down the tree looking for a discrepancy + while ( ap[i] === bp[i] ) { + i++; + } + + return i ? + // Do a sibling check if the nodes have a common ancestor + siblingCheck( ap[i], bp[i] ) : + + // Otherwise nodes in our document sort first + ap[i] === preferredDoc ? -1 : + bp[i] === preferredDoc ? 1 : + 0; + }; + + // Always assume the presence of duplicates if sort doesn't + // pass them to our comparison function (as in Google Chrome). + hasDuplicate = false; + [0, 0].sort( sortOrder ); + support.detectDuplicates = hasDuplicate; + + return document; +}; + +Sizzle.matches = function( expr, elements ) { + return Sizzle( expr, null, null, elements ); +}; + +Sizzle.matchesSelector = function( elem, expr ) { + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + // Make sure that attribute selectors are quoted + expr = expr.replace( rattributeQuotes, "='$1']" ); + + // rbuggyQSA always contains :focus, so no need for an existence check + if ( support.matchesSelector && !documentIsXML && (!rbuggyMatches || !rbuggyMatches.test(expr)) && !rbuggyQSA.test(expr) ) { + try { + var ret = matches.call( elem, expr ); + + // IE 9's matchesSelector returns false on disconnected nodes + if ( ret || support.disconnectedMatch || + // As well, disconnected nodes are said to be in a document + // fragment in IE 9 + elem.document && elem.document.nodeType !== 11 ) { + return ret; + } + } catch(e) {} + } + + return Sizzle( expr, document, null, [elem] ).length > 0; +}; + +Sizzle.contains = function( context, elem ) { + // Set document vars if needed + if ( ( context.ownerDocument || context ) !== document ) { + setDocument( context ); + } + return contains( context, elem ); +}; + +Sizzle.attr = function( elem, name ) { + var val; + + // Set document vars if needed + if ( ( elem.ownerDocument || elem ) !== document ) { + setDocument( elem ); + } + + if ( !documentIsXML ) { + name = name.toLowerCase(); + } + if ( (val = Expr.attrHandle[ name ]) ) { + return val( elem ); + } + if ( documentIsXML || support.attributes ) { + return elem.getAttribute( name ); + } + return ( (val = elem.getAttributeNode( name )) || elem.getAttribute( name ) ) && elem[ name ] === true ? + name : + val && val.specified ? val.value : null; +}; + +Sizzle.error = function( msg ) { + throw new Error( "Syntax error, unrecognized expression: " + msg ); +}; + +// Document sorting and removing duplicates +Sizzle.uniqueSort = function( results ) { + var elem, + duplicates = [], + i = 1, + j = 0; + + // Unless we *know* we can detect duplicates, assume their presence + hasDuplicate = !support.detectDuplicates; + results.sort( sortOrder ); + + if ( hasDuplicate ) { + for ( ; (elem = results[i]); i++ ) { + if ( elem === results[ i - 1 ] ) { + j = duplicates.push( i ); + } + } + while ( j-- ) { + results.splice( duplicates[ j ], 1 ); + } + } + + return results; +}; + +function siblingCheck( a, b ) { + var cur = b && a, + diff = cur && ( ~b.sourceIndex || MAX_NEGATIVE ) - ( ~a.sourceIndex || MAX_NEGATIVE ); + + // Use IE sourceIndex if available on both nodes + if ( diff ) { + return diff; + } + + // Check if b follows a + if ( cur ) { + while ( (cur = cur.nextSibling) ) { + if ( cur === b ) { + return -1; + } + } + } + + return a ? 1 : -1; +} + +// Returns a function to use in pseudos for input types +function createInputPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === type; + }; +} + +// Returns a function to use in pseudos for buttons +function createButtonPseudo( type ) { + return function( elem ) { + var name = elem.nodeName.toLowerCase(); + return (name === "input" || name === "button") && elem.type === type; + }; +} + +// Returns a function to use in pseudos for positionals +function createPositionalPseudo( fn ) { + return markFunction(function( argument ) { + argument = +argument; + return markFunction(function( seed, matches ) { + var j, + matchIndexes = fn( [], seed.length, argument ), + i = matchIndexes.length; + + // Match elements found at the specified indexes + while ( i-- ) { + if ( seed[ (j = matchIndexes[i]) ] ) { + seed[j] = !(matches[j] = seed[j]); + } + } + }); + }); +} + +/** + * Utility function for retrieving the text value of an array of DOM nodes + * @param {Array|Element} elem + */ +getText = Sizzle.getText = function( elem ) { + var node, + ret = "", + i = 0, + nodeType = elem.nodeType; + + if ( !nodeType ) { + // If no nodeType, this is expected to be an array + for ( ; (node = elem[i]); i++ ) { + // Do not traverse comment nodes + ret += getText( node ); + } + } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { + // Use textContent for elements + // innerText usage removed for consistency of new lines (see #11153) + if ( typeof elem.textContent === "string" ) { + return elem.textContent; + } else { + // Traverse its children + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + ret += getText( elem ); + } + } + } else if ( nodeType === 3 || nodeType === 4 ) { + return elem.nodeValue; + } + // Do not include comment or processing instruction nodes + + return ret; +}; + +Expr = Sizzle.selectors = { + + // Can be adjusted by the user + cacheLength: 50, + + createPseudo: markFunction, + + match: matchExpr, + + find: {}, + + relative: { + ">": { dir: "parentNode", first: true }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: true }, + "~": { dir: "previousSibling" } + }, + + preFilter: { + "ATTR": function( match ) { + match[1] = match[1].replace( runescape, funescape ); + + // Move the given value to match[3] whether quoted or unquoted + match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape ); + + if ( match[2] === "~=" ) { + match[3] = " " + match[3] + " "; + } + + return match.slice( 0, 4 ); + }, + + "CHILD": function( match ) { + /* matches from matchExpr["CHILD"] + 1 type (only|nth|...) + 2 what (child|of-type) + 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) + 4 xn-component of xn+y argument ([+-]?\d*n|) + 5 sign of xn-component + 6 x of xn-component + 7 sign of y-component + 8 y of y-component + */ + match[1] = match[1].toLowerCase(); + + if ( match[1].slice( 0, 3 ) === "nth" ) { + // nth-* requires argument + if ( !match[3] ) { + Sizzle.error( match[0] ); + } + + // numeric x and y parameters for Expr.filter.CHILD + // remember that false/true cast respectively to 0/1 + match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); + match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); + + // other types prohibit arguments + } else if ( match[3] ) { + Sizzle.error( match[0] ); + } + + return match; + }, + + "PSEUDO": function( match ) { + var excess, + unquoted = !match[5] && match[2]; + + if ( matchExpr["CHILD"].test( match[0] ) ) { + return null; + } + + // Accept quoted arguments as-is + if ( match[4] ) { + match[2] = match[4]; + + // Strip excess characters from unquoted arguments + } else if ( unquoted && rpseudo.test( unquoted ) && + // Get excess from tokenize (recursively) + (excess = tokenize( unquoted, true )) && + // advance to the next closing parenthesis + (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { + + // excess is a negative index + match[0] = match[0].slice( 0, excess ); + match[2] = unquoted.slice( 0, excess ); + } + + // Return only captures needed by the pseudo filter method (type and argument) + return match.slice( 0, 3 ); + } + }, + + filter: { + + "TAG": function( nodeName ) { + if ( nodeName === "*" ) { + return function() { return true; }; + } + + nodeName = nodeName.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; + }; + }, + + "CLASS": function( className ) { + var pattern = classCache[ className + " " ]; + + return pattern || + (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && + classCache( className, function( elem ) { + return pattern.test( elem.className || (typeof elem.getAttribute !== strundefined && elem.getAttribute("class")) || "" ); + }); + }, + + "ATTR": function( name, operator, check ) { + return function( elem ) { + var result = Sizzle.attr( elem, name ); + + if ( result == null ) { + return operator === "!="; + } + if ( !operator ) { + return true; + } + + result += ""; + + return operator === "=" ? result === check : + operator === "!=" ? result !== check : + operator === "^=" ? check && result.indexOf( check ) === 0 : + operator === "*=" ? check && result.indexOf( check ) > -1 : + operator === "$=" ? check && result.slice( -check.length ) === check : + operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : + operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : + false; + }; + }, + + "CHILD": function( type, what, argument, first, last ) { + var simple = type.slice( 0, 3 ) !== "nth", + forward = type.slice( -4 ) !== "last", + ofType = what === "of-type"; + + return first === 1 && last === 0 ? + + // Shortcut for :nth-*(n) + function( elem ) { + return !!elem.parentNode; + } : + + function( elem, context, xml ) { + var cache, outerCache, node, diff, nodeIndex, start, + dir = simple !== forward ? "nextSibling" : "previousSibling", + parent = elem.parentNode, + name = ofType && elem.nodeName.toLowerCase(), + useCache = !xml && !ofType; + + if ( parent ) { + + // :(first|last|only)-(child|of-type) + if ( simple ) { + while ( dir ) { + node = elem; + while ( (node = node[ dir ]) ) { + if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { + return false; + } + } + // Reverse direction for :only-* (if we haven't yet done so) + start = dir = type === "only" && !start && "nextSibling"; + } + return true; + } + + start = [ forward ? parent.firstChild : parent.lastChild ]; + + // non-xml :nth-child(...) stores cache data on `parent` + if ( forward && useCache ) { + // Seek `elem` from a previously-cached index + outerCache = parent[ expando ] || (parent[ expando ] = {}); + cache = outerCache[ type ] || []; + nodeIndex = cache[0] === dirruns && cache[1]; + diff = cache[0] === dirruns && cache[2]; + node = nodeIndex && parent.childNodes[ nodeIndex ]; + + while ( (node = ++nodeIndex && node && node[ dir ] || + + // Fallback to seeking `elem` from the start + (diff = nodeIndex = 0) || start.pop()) ) { + + // When found, cache indexes on `parent` and break + if ( node.nodeType === 1 && ++diff && node === elem ) { + outerCache[ type ] = [ dirruns, nodeIndex, diff ]; + break; + } + } + + // Use previously-cached element index if available + } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { + diff = cache[1]; + + // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) + } else { + // Use the same loop as above to seek `elem` from the start + while ( (node = ++nodeIndex && node && node[ dir ] || + (diff = nodeIndex = 0) || start.pop()) ) { + + if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { + // Cache the index of each encountered element + if ( useCache ) { + (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; + } + + if ( node === elem ) { + break; + } + } + } + } + + // Incorporate the offset, then check against cycle size + diff -= last; + return diff === first || ( diff % first === 0 && diff / first >= 0 ); + } + }; + }, + + "PSEUDO": function( pseudo, argument ) { + // pseudo-class names are case-insensitive + // http://www.w3.org/TR/selectors/#pseudo-classes + // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters + // Remember that setFilters inherits from pseudos + var args, + fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || + Sizzle.error( "unsupported pseudo: " + pseudo ); + + // The user may use createPseudo to indicate that + // arguments are needed to create the filter function + // just as Sizzle does + if ( fn[ expando ] ) { + return fn( argument ); + } + + // But maintain support for old signatures + if ( fn.length > 1 ) { + args = [ pseudo, pseudo, "", argument ]; + return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? + markFunction(function( seed, matches ) { + var idx, + matched = fn( seed, argument ), + i = matched.length; + while ( i-- ) { + idx = indexOf.call( seed, matched[i] ); + seed[ idx ] = !( matches[ idx ] = matched[i] ); + } + }) : + function( elem ) { + return fn( elem, 0, args ); + }; + } + + return fn; + } + }, + + pseudos: { + // Potentially complex pseudos + "not": markFunction(function( selector ) { + // Trim the selector passed to compile + // to avoid treating leading and trailing + // spaces as combinators + var input = [], + results = [], + matcher = compile( selector.replace( rtrim, "$1" ) ); + + return matcher[ expando ] ? + markFunction(function( seed, matches, context, xml ) { + var elem, + unmatched = matcher( seed, null, xml, [] ), + i = seed.length; + + // Match elements unmatched by `matcher` + while ( i-- ) { + if ( (elem = unmatched[i]) ) { + seed[i] = !(matches[i] = elem); + } + } + }) : + function( elem, context, xml ) { + input[0] = elem; + matcher( input, null, xml, results ); + return !results.pop(); + }; + }), + + "has": markFunction(function( selector ) { + return function( elem ) { + return Sizzle( selector, elem ).length > 0; + }; + }), + + "contains": markFunction(function( text ) { + return function( elem ) { + return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; + }; + }), + + // "Whether an element is represented by a :lang() selector + // is based solely on the element's language value + // being equal to the identifier C, + // or beginning with the identifier C immediately followed by "-". + // The matching of C against the element's language value is performed case-insensitively. + // The identifier C does not have to be a valid language name." + // http://www.w3.org/TR/selectors/#lang-pseudo + "lang": markFunction( function( lang ) { + // lang value must be a valid identifider + if ( !ridentifier.test(lang || "") ) { + Sizzle.error( "unsupported lang: " + lang ); + } + lang = lang.replace( runescape, funescape ).toLowerCase(); + return function( elem ) { + var elemLang; + do { + if ( (elemLang = documentIsXML ? + elem.getAttribute("xml:lang") || elem.getAttribute("lang") : + elem.lang) ) { + + elemLang = elemLang.toLowerCase(); + return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; + } + } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); + return false; + }; + }), + + // Miscellaneous + "target": function( elem ) { + var hash = window.location && window.location.hash; + return hash && hash.slice( 1 ) === elem.id; + }, + + "root": function( elem ) { + return elem === docElem; + }, + + "focus": function( elem ) { + return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); + }, + + // Boolean properties + "enabled": function( elem ) { + return elem.disabled === false; + }, + + "disabled": function( elem ) { + return elem.disabled === true; + }, + + "checked": function( elem ) { + // In CSS3, :checked should return both checked and selected elements + // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked + var nodeName = elem.nodeName.toLowerCase(); + return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); + }, + + "selected": function( elem ) { + // Accessing this property makes selected-by-default + // options in Safari work properly + if ( elem.parentNode ) { + elem.parentNode.selectedIndex; + } + + return elem.selected === true; + }, + + // Contents + "empty": function( elem ) { + // http://www.w3.org/TR/selectors/#empty-pseudo + // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), + // not comment, processing instructions, or others + // Thanks to Diego Perini for the nodeName shortcut + // Greater than "@" means alpha characters (specifically not starting with "#" or "?") + for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { + if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) { + return false; + } + } + return true; + }, + + "parent": function( elem ) { + return !Expr.pseudos["empty"]( elem ); + }, + + // Element/input types + "header": function( elem ) { + return rheader.test( elem.nodeName ); + }, + + "input": function( elem ) { + return rinputs.test( elem.nodeName ); + }, + + "button": function( elem ) { + var name = elem.nodeName.toLowerCase(); + return name === "input" && elem.type === "button" || name === "button"; + }, + + "text": function( elem ) { + var attr; + // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) + // use getAttribute instead to test this case + return elem.nodeName.toLowerCase() === "input" && + elem.type === "text" && + ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type ); + }, + + // Position-in-collection + "first": createPositionalPseudo(function() { + return [ 0 ]; + }), + + "last": createPositionalPseudo(function( matchIndexes, length ) { + return [ length - 1 ]; + }), + + "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { + return [ argument < 0 ? argument + length : argument ]; + }), + + "even": createPositionalPseudo(function( matchIndexes, length ) { + var i = 0; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "odd": createPositionalPseudo(function( matchIndexes, length ) { + var i = 1; + for ( ; i < length; i += 2 ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; --i >= 0; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }), + + "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { + var i = argument < 0 ? argument + length : argument; + for ( ; ++i < length; ) { + matchIndexes.push( i ); + } + return matchIndexes; + }) + } +}; + +// Add button/input type pseudos +for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { + Expr.pseudos[ i ] = createInputPseudo( i ); +} +for ( i in { submit: true, reset: true } ) { + Expr.pseudos[ i ] = createButtonPseudo( i ); +} + +function tokenize( selector, parseOnly ) { + var matched, match, tokens, type, + soFar, groups, preFilters, + cached = tokenCache[ selector + " " ]; + + if ( cached ) { + return parseOnly ? 0 : cached.slice( 0 ); + } + + soFar = selector; + groups = []; + preFilters = Expr.preFilter; + + while ( soFar ) { + + // Comma and first run + if ( !matched || (match = rcomma.exec( soFar )) ) { + if ( match ) { + // Don't consume trailing commas as valid + soFar = soFar.slice( match[0].length ) || soFar; + } + groups.push( tokens = [] ); + } + + matched = false; + + // Combinators + if ( (match = rcombinators.exec( soFar )) ) { + matched = match.shift(); + tokens.push( { + value: matched, + // Cast descendant combinators to space + type: match[0].replace( rtrim, " " ) + } ); + soFar = soFar.slice( matched.length ); + } + + // Filters + for ( type in Expr.filter ) { + if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || + (match = preFilters[ type ]( match ))) ) { + matched = match.shift(); + tokens.push( { + value: matched, + type: type, + matches: match + } ); + soFar = soFar.slice( matched.length ); + } + } + + if ( !matched ) { + break; + } + } + + // Return the length of the invalid excess + // if we're just parsing + // Otherwise, throw an error or return tokens + return parseOnly ? + soFar.length : + soFar ? + Sizzle.error( selector ) : + // Cache the tokens + tokenCache( selector, groups ).slice( 0 ); +} + +function toSelector( tokens ) { + var i = 0, + len = tokens.length, + selector = ""; + for ( ; i < len; i++ ) { + selector += tokens[i].value; + } + return selector; +} + +function addCombinator( matcher, combinator, base ) { + var dir = combinator.dir, + checkNonElements = base && dir === "parentNode", + doneName = done++; + + return combinator.first ? + // Check against closest ancestor/preceding element + function( elem, context, xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + return matcher( elem, context, xml ); + } + } + } : + + // Check against all ancestor/preceding elements + function( elem, context, xml ) { + var data, cache, outerCache, + dirkey = dirruns + " " + doneName; + + // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching + if ( xml ) { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + if ( matcher( elem, context, xml ) ) { + return true; + } + } + } + } else { + while ( (elem = elem[ dir ]) ) { + if ( elem.nodeType === 1 || checkNonElements ) { + outerCache = elem[ expando ] || (elem[ expando ] = {}); + if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) { + if ( (data = cache[1]) === true || data === cachedruns ) { + return data === true; + } + } else { + cache = outerCache[ dir ] = [ dirkey ]; + cache[1] = matcher( elem, context, xml ) || cachedruns; + if ( cache[1] === true ) { + return true; + } + } + } + } + } + }; +} + +function elementMatcher( matchers ) { + return matchers.length > 1 ? + function( elem, context, xml ) { + var i = matchers.length; + while ( i-- ) { + if ( !matchers[i]( elem, context, xml ) ) { + return false; + } + } + return true; + } : + matchers[0]; +} + +function condense( unmatched, map, filter, context, xml ) { + var elem, + newUnmatched = [], + i = 0, + len = unmatched.length, + mapped = map != null; + + for ( ; i < len; i++ ) { + if ( (elem = unmatched[i]) ) { + if ( !filter || filter( elem, context, xml ) ) { + newUnmatched.push( elem ); + if ( mapped ) { + map.push( i ); + } + } + } + } + + return newUnmatched; +} + +function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { + if ( postFilter && !postFilter[ expando ] ) { + postFilter = setMatcher( postFilter ); + } + if ( postFinder && !postFinder[ expando ] ) { + postFinder = setMatcher( postFinder, postSelector ); + } + return markFunction(function( seed, results, context, xml ) { + var temp, i, elem, + preMap = [], + postMap = [], + preexisting = results.length, + + // Get initial elements from seed or context + elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), + + // Prefilter to get matcher input, preserving a map for seed-results synchronization + matcherIn = preFilter && ( seed || !selector ) ? + condense( elems, preMap, preFilter, context, xml ) : + elems, + + matcherOut = matcher ? + // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, + postFinder || ( seed ? preFilter : preexisting || postFilter ) ? + + // ...intermediate processing is necessary + [] : + + // ...otherwise use results directly + results : + matcherIn; + + // Find primary matches + if ( matcher ) { + matcher( matcherIn, matcherOut, context, xml ); + } + + // Apply postFilter + if ( postFilter ) { + temp = condense( matcherOut, postMap ); + postFilter( temp, [], context, xml ); + + // Un-match failing elements by moving them back to matcherIn + i = temp.length; + while ( i-- ) { + if ( (elem = temp[i]) ) { + matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); + } + } + } + + if ( seed ) { + if ( postFinder || preFilter ) { + if ( postFinder ) { + // Get the final matcherOut by condensing this intermediate into postFinder contexts + temp = []; + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) ) { + // Restore matcherIn since elem is not yet a final match + temp.push( (matcherIn[i] = elem) ); + } + } + postFinder( null, (matcherOut = []), temp, xml ); + } + + // Move matched elements from seed to results to keep them synchronized + i = matcherOut.length; + while ( i-- ) { + if ( (elem = matcherOut[i]) && + (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { + + seed[temp] = !(results[temp] = elem); + } + } + } + + // Add elements to results, through postFinder if defined + } else { + matcherOut = condense( + matcherOut === results ? + matcherOut.splice( preexisting, matcherOut.length ) : + matcherOut + ); + if ( postFinder ) { + postFinder( null, results, matcherOut, xml ); + } else { + push.apply( results, matcherOut ); + } + } + }); +} + +function matcherFromTokens( tokens ) { + var checkContext, matcher, j, + len = tokens.length, + leadingRelative = Expr.relative[ tokens[0].type ], + implicitRelative = leadingRelative || Expr.relative[" "], + i = leadingRelative ? 1 : 0, + + // The foundational matcher ensures that elements are reachable from top-level context(s) + matchContext = addCombinator( function( elem ) { + return elem === checkContext; + }, implicitRelative, true ), + matchAnyContext = addCombinator( function( elem ) { + return indexOf.call( checkContext, elem ) > -1; + }, implicitRelative, true ), + matchers = [ function( elem, context, xml ) { + return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( + (checkContext = context).nodeType ? + matchContext( elem, context, xml ) : + matchAnyContext( elem, context, xml ) ); + } ]; + + for ( ; i < len; i++ ) { + if ( (matcher = Expr.relative[ tokens[i].type ]) ) { + matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; + } else { + matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); + + // Return special upon seeing a positional matcher + if ( matcher[ expando ] ) { + // Find the next relative operator (if any) for proper handling + j = ++i; + for ( ; j < len; j++ ) { + if ( Expr.relative[ tokens[j].type ] ) { + break; + } + } + return setMatcher( + i > 1 && elementMatcher( matchers ), + i > 1 && toSelector( tokens.slice( 0, i - 1 ) ).replace( rtrim, "$1" ), + matcher, + i < j && matcherFromTokens( tokens.slice( i, j ) ), + j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), + j < len && toSelector( tokens ) + ); + } + matchers.push( matcher ); + } + } + + return elementMatcher( matchers ); +} + +function matcherFromGroupMatchers( elementMatchers, setMatchers ) { + // A counter to specify which element is currently being matched + var matcherCachedRuns = 0, + bySet = setMatchers.length > 0, + byElement = elementMatchers.length > 0, + superMatcher = function( seed, context, xml, results, expandContext ) { + var elem, j, matcher, + setMatched = [], + matchedCount = 0, + i = "0", + unmatched = seed && [], + outermost = expandContext != null, + contextBackup = outermostContext, + // We must always have either seed elements or context + elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ), + // Use integer dirruns iff this is the outermost matcher + dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1); + + if ( outermost ) { + outermostContext = context !== document && context; + cachedruns = matcherCachedRuns; + } + + // Add elements passing elementMatchers directly to results + // Keep `i` a string if there are no elements so `matchedCount` will be "00" below + for ( ; (elem = elems[i]) != null; i++ ) { + if ( byElement && elem ) { + j = 0; + while ( (matcher = elementMatchers[j++]) ) { + if ( matcher( elem, context, xml ) ) { + results.push( elem ); + break; + } + } + if ( outermost ) { + dirruns = dirrunsUnique; + cachedruns = ++matcherCachedRuns; + } + } + + // Track unmatched elements for set filters + if ( bySet ) { + // They will have gone through all possible matchers + if ( (elem = !matcher && elem) ) { + matchedCount--; + } + + // Lengthen the array for every element, matched or not + if ( seed ) { + unmatched.push( elem ); + } + } + } + + // Apply set filters to unmatched elements + matchedCount += i; + if ( bySet && i !== matchedCount ) { + j = 0; + while ( (matcher = setMatchers[j++]) ) { + matcher( unmatched, setMatched, context, xml ); + } + + if ( seed ) { + // Reintegrate element matches to eliminate the need for sorting + if ( matchedCount > 0 ) { + while ( i-- ) { + if ( !(unmatched[i] || setMatched[i]) ) { + setMatched[i] = pop.call( results ); + } + } + } + + // Discard index placeholder values to get only actual matches + setMatched = condense( setMatched ); + } + + // Add matches to results + push.apply( results, setMatched ); + + // Seedless set matches succeeding multiple successful matchers stipulate sorting + if ( outermost && !seed && setMatched.length > 0 && + ( matchedCount + setMatchers.length ) > 1 ) { + + Sizzle.uniqueSort( results ); + } + } + + // Override manipulation of globals by nested matchers + if ( outermost ) { + dirruns = dirrunsUnique; + outermostContext = contextBackup; + } + + return unmatched; + }; + + return bySet ? + markFunction( superMatcher ) : + superMatcher; +} + +compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) { + var i, + setMatchers = [], + elementMatchers = [], + cached = compilerCache[ selector + " " ]; + + if ( !cached ) { + // Generate a function of recursive functions that can be used to check each element + if ( !group ) { + group = tokenize( selector ); + } + i = group.length; + while ( i-- ) { + cached = matcherFromTokens( group[i] ); + if ( cached[ expando ] ) { + setMatchers.push( cached ); + } else { + elementMatchers.push( cached ); + } + } + + // Cache the compiled function + cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); + } + return cached; +}; + +function multipleContexts( selector, contexts, results ) { + var i = 0, + len = contexts.length; + for ( ; i < len; i++ ) { + Sizzle( selector, contexts[i], results ); + } + return results; +} + +function select( selector, context, results, seed ) { + var i, tokens, token, type, find, + match = tokenize( selector ); + + if ( !seed ) { + // Try to minimize operations if there is only one group + if ( match.length === 1 ) { + + // Take a shortcut and set the context if the root selector is an ID + tokens = match[0] = match[0].slice( 0 ); + if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && + context.nodeType === 9 && !documentIsXML && + Expr.relative[ tokens[1].type ] ) { + + context = Expr.find["ID"]( token.matches[0].replace( runescape, funescape ), context )[0]; + if ( !context ) { + return results; + } + + selector = selector.slice( tokens.shift().value.length ); + } + + // Fetch a seed set for right-to-left matching + i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; + while ( i-- ) { + token = tokens[i]; + + // Abort if we hit a combinator + if ( Expr.relative[ (type = token.type) ] ) { + break; + } + if ( (find = Expr.find[ type ]) ) { + // Search, expanding context for leading sibling combinators + if ( (seed = find( + token.matches[0].replace( runescape, funescape ), + rsibling.test( tokens[0].type ) && context.parentNode || context + )) ) { + + // If seed is empty or no tokens remain, we can return early + tokens.splice( i, 1 ); + selector = seed.length && toSelector( tokens ); + if ( !selector ) { + push.apply( results, slice.call( seed, 0 ) ); + return results; + } + + break; + } + } + } + } + } + + // Compile and execute a filtering function + // Provide `match` to avoid retokenization if we modified the selector above + compile( selector, match )( + seed, + context, + documentIsXML, + results, + rsibling.test( selector ) + ); + return results; +} + +// Deprecated +Expr.pseudos["nth"] = Expr.pseudos["eq"]; + +// Easy API for creating new setFilters +function setFilters() {} +Expr.filters = setFilters.prototype = Expr.pseudos; +Expr.setFilters = new setFilters(); + +// Initialize with the default document +setDocument(); + +// Override sizzle attribute retrieval +Sizzle.attr = jQuery.attr; +jQuery.find = Sizzle; +jQuery.expr = Sizzle.selectors; +jQuery.expr[":"] = jQuery.expr.pseudos; +jQuery.unique = Sizzle.uniqueSort; +jQuery.text = Sizzle.getText; +jQuery.isXMLDoc = Sizzle.isXML; +jQuery.contains = Sizzle.contains; + + +})( window ); +var runtil = /Until$/, + rparentsprev = /^(?:parents|prev(?:Until|All))/, + isSimple = /^.[^:#\[\.,]*$/, + rneedsContext = jQuery.expr.match.needsContext, + // methods guaranteed to produce a unique set when starting from a unique set + guaranteedUnique = { + children: true, + contents: true, + next: true, + prev: true + }; + +jQuery.fn.extend({ + find: function( selector ) { + var i, ret, self, + len = this.length; + + if ( typeof selector !== "string" ) { + self = this; + return this.pushStack( jQuery( selector ).filter(function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( self[ i ], this ) ) { + return true; + } + } + }) ); + } + + ret = []; + for ( i = 0; i < len; i++ ) { + jQuery.find( selector, this[ i ], ret ); + } + + // Needed because $( selector, context ) becomes $( context ).find( selector ) + ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); + ret.selector = ( this.selector ? this.selector + " " : "" ) + selector; + return ret; + }, + + has: function( target ) { + var i, + targets = jQuery( target, this ), + len = targets.length; + + return this.filter(function() { + for ( i = 0; i < len; i++ ) { + if ( jQuery.contains( this, targets[i] ) ) { + return true; + } + } + }); + }, + + not: function( selector ) { + return this.pushStack( winnow(this, selector, false) ); + }, + + filter: function( selector ) { + return this.pushStack( winnow(this, selector, true) ); + }, + + is: function( selector ) { + return !!selector && ( + typeof selector === "string" ? + // If this is a positional/relative selector, check membership in the returned set + // so $("p:first").is("p:last") won't return true for a doc with two "p". + rneedsContext.test( selector ) ? + jQuery( selector, this.context ).index( this[0] ) >= 0 : + jQuery.filter( selector, this ).length > 0 : + this.filter( selector ).length > 0 ); + }, + + closest: function( selectors, context ) { + var cur, + i = 0, + l = this.length, + ret = [], + pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? + jQuery( selectors, context || this.context ) : + 0; + + for ( ; i < l; i++ ) { + cur = this[i]; + + while ( cur && cur.ownerDocument && cur !== context && cur.nodeType !== 11 ) { + if ( pos ? pos.index(cur) > -1 : jQuery.find.matchesSelector(cur, selectors) ) { + ret.push( cur ); + break; + } + cur = cur.parentNode; + } + } + + return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret ); + }, + + // Determine the position of an element within + // the matched set of elements + index: function( elem ) { + + // No argument, return index in parent + if ( !elem ) { + return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1; + } + + // index in selector + if ( typeof elem === "string" ) { + return jQuery.inArray( this[0], jQuery( elem ) ); + } + + // Locate the position of the desired element + return jQuery.inArray( + // If it receives a jQuery object, the first element is used + elem.jquery ? elem[0] : elem, this ); + }, + + add: function( selector, context ) { + var set = typeof selector === "string" ? + jQuery( selector, context ) : + jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), + all = jQuery.merge( this.get(), set ); + + return this.pushStack( jQuery.unique(all) ); + }, + + addBack: function( selector ) { + return this.add( selector == null ? + this.prevObject : this.prevObject.filter(selector) + ); + } +}); + +jQuery.fn.andSelf = jQuery.fn.addBack; + +function sibling( cur, dir ) { + do { + cur = cur[ dir ]; + } while ( cur && cur.nodeType !== 1 ); + + return cur; +} + +jQuery.each({ + parent: function( elem ) { + var parent = elem.parentNode; + return parent && parent.nodeType !== 11 ? parent : null; + }, + parents: function( elem ) { + return jQuery.dir( elem, "parentNode" ); + }, + parentsUntil: function( elem, i, until ) { + return jQuery.dir( elem, "parentNode", until ); + }, + next: function( elem ) { + return sibling( elem, "nextSibling" ); + }, + prev: function( elem ) { + return sibling( elem, "previousSibling" ); + }, + nextAll: function( elem ) { + return jQuery.dir( elem, "nextSibling" ); + }, + prevAll: function( elem ) { + return jQuery.dir( elem, "previousSibling" ); + }, + nextUntil: function( elem, i, until ) { + return jQuery.dir( elem, "nextSibling", until ); + }, + prevUntil: function( elem, i, until ) { + return jQuery.dir( elem, "previousSibling", until ); + }, + siblings: function( elem ) { + return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); + }, + children: function( elem ) { + return jQuery.sibling( elem.firstChild ); + }, + contents: function( elem ) { + return jQuery.nodeName( elem, "iframe" ) ? + elem.contentDocument || elem.contentWindow.document : + jQuery.merge( [], elem.childNodes ); + } +}, function( name, fn ) { + jQuery.fn[ name ] = function( until, selector ) { + var ret = jQuery.map( this, fn, until ); + + if ( !runtil.test( name ) ) { + selector = until; + } + + if ( selector && typeof selector === "string" ) { + ret = jQuery.filter( selector, ret ); + } + + ret = this.length > 1 && !guaranteedUnique[ name ] ? jQuery.unique( ret ) : ret; + + if ( this.length > 1 && rparentsprev.test( name ) ) { + ret = ret.reverse(); + } + + return this.pushStack( ret ); + }; +}); + +jQuery.extend({ + filter: function( expr, elems, not ) { + if ( not ) { + expr = ":not(" + expr + ")"; + } + + return elems.length === 1 ? + jQuery.find.matchesSelector(elems[0], expr) ? [ elems[0] ] : [] : + jQuery.find.matches(expr, elems); + }, + + dir: function( elem, dir, until ) { + var matched = [], + cur = elem[ dir ]; + + while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { + if ( cur.nodeType === 1 ) { + matched.push( cur ); + } + cur = cur[dir]; + } + return matched; + }, + + sibling: function( n, elem ) { + var r = []; + + for ( ; n; n = n.nextSibling ) { + if ( n.nodeType === 1 && n !== elem ) { + r.push( n ); + } + } + + return r; + } +}); + +// Implement the identical functionality for filter and not +function winnow( elements, qualifier, keep ) { + + // Can't pass null or undefined to indexOf in Firefox 4 + // Set to 0 to skip string check + qualifier = qualifier || 0; + + if ( jQuery.isFunction( qualifier ) ) { + return jQuery.grep(elements, function( elem, i ) { + var retVal = !!qualifier.call( elem, i, elem ); + return retVal === keep; + }); + + } else if ( qualifier.nodeType ) { + return jQuery.grep(elements, function( elem ) { + return ( elem === qualifier ) === keep; + }); + + } else if ( typeof qualifier === "string" ) { + var filtered = jQuery.grep(elements, function( elem ) { + return elem.nodeType === 1; + }); + + if ( isSimple.test( qualifier ) ) { + return jQuery.filter(qualifier, filtered, !keep); + } else { + qualifier = jQuery.filter( qualifier, filtered ); + } + } + + return jQuery.grep(elements, function( elem ) { + return ( jQuery.inArray( elem, qualifier ) >= 0 ) === keep; + }); +} +function createSafeFragment( document ) { + var list = nodeNames.split( "|" ), + safeFrag = document.createDocumentFragment(); + + if ( safeFrag.createElement ) { + while ( list.length ) { + safeFrag.createElement( + list.pop() + ); + } + } + return safeFrag; +} + +var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + + "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", + rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, + rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), + rleadingWhitespace = /^\s+/, + rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, + rtagName = /<([\w:]+)/, + rtbody = /\s*$/g, + + // We have to close these tags to support XHTML (#13200) + wrapMap = { + option: [ 1, "" ], + legend: [ 1, "
    ", "
    " ], + area: [ 1, "", "" ], + param: [ 1, "", "" ], + thead: [ 1, "", "
    " ], + tr: [ 2, "", "
    " ], + col: [ 2, "", "
    " ], + td: [ 3, "", "
    " ], + + // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, + // unless wrapped in a div with non-breaking characters in front of it. + _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X
    ", "
    " ] + }, + safeFragment = createSafeFragment( document ), + fragmentDiv = safeFragment.appendChild( document.createElement("div") ); + +wrapMap.optgroup = wrapMap.option; +wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; +wrapMap.th = wrapMap.td; + +jQuery.fn.extend({ + text: function( value ) { + return jQuery.access( this, function( value ) { + return value === undefined ? + jQuery.text( this ) : + this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); + }, null, value, arguments.length ); + }, + + wrapAll: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each(function(i) { + jQuery(this).wrapAll( html.call(this, i) ); + }); + } + + if ( this[0] ) { + // The elements to wrap the target around + var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); + + if ( this[0].parentNode ) { + wrap.insertBefore( this[0] ); + } + + wrap.map(function() { + var elem = this; + + while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { + elem = elem.firstChild; + } + + return elem; + }).append( this ); + } + + return this; + }, + + wrapInner: function( html ) { + if ( jQuery.isFunction( html ) ) { + return this.each(function(i) { + jQuery(this).wrapInner( html.call(this, i) ); + }); + } + + return this.each(function() { + var self = jQuery( this ), + contents = self.contents(); + + if ( contents.length ) { + contents.wrapAll( html ); + + } else { + self.append( html ); + } + }); + }, + + wrap: function( html ) { + var isFunction = jQuery.isFunction( html ); + + return this.each(function(i) { + jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); + }); + }, + + unwrap: function() { + return this.parent().each(function() { + if ( !jQuery.nodeName( this, "body" ) ) { + jQuery( this ).replaceWith( this.childNodes ); + } + }).end(); + }, + + append: function() { + return this.domManip(arguments, true, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + this.appendChild( elem ); + } + }); + }, + + prepend: function() { + return this.domManip(arguments, true, function( elem ) { + if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { + this.insertBefore( elem, this.firstChild ); + } + }); + }, + + before: function() { + return this.domManip( arguments, false, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this ); + } + }); + }, + + after: function() { + return this.domManip( arguments, false, function( elem ) { + if ( this.parentNode ) { + this.parentNode.insertBefore( elem, this.nextSibling ); + } + }); + }, + + // keepData is for internal use only--do not document + remove: function( selector, keepData ) { + var elem, + i = 0; + + for ( ; (elem = this[i]) != null; i++ ) { + if ( !selector || jQuery.filter( selector, [ elem ] ).length > 0 ) { + if ( !keepData && elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem ) ); + } + + if ( elem.parentNode ) { + if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { + setGlobalEval( getAll( elem, "script" ) ); + } + elem.parentNode.removeChild( elem ); + } + } + } + + return this; + }, + + empty: function() { + var elem, + i = 0; + + for ( ; (elem = this[i]) != null; i++ ) { + // Remove element nodes and prevent memory leaks + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + } + + // Remove any remaining nodes + while ( elem.firstChild ) { + elem.removeChild( elem.firstChild ); + } + + // If this is a select, ensure that it displays empty (#12336) + // Support: IE<9 + if ( elem.options && jQuery.nodeName( elem, "select" ) ) { + elem.options.length = 0; + } + } + + return this; + }, + + clone: function( dataAndEvents, deepDataAndEvents ) { + dataAndEvents = dataAndEvents == null ? false : dataAndEvents; + deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; + + return this.map( function () { + return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); + }); + }, + + html: function( value ) { + return jQuery.access( this, function( value ) { + var elem = this[0] || {}, + i = 0, + l = this.length; + + if ( value === undefined ) { + return elem.nodeType === 1 ? + elem.innerHTML.replace( rinlinejQuery, "" ) : + undefined; + } + + // See if we can take a shortcut and just use innerHTML + if ( typeof value === "string" && !rnoInnerhtml.test( value ) && + ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) && + ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && + !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { + + value = value.replace( rxhtmlTag, "<$1>" ); + + try { + for (; i < l; i++ ) { + // Remove element nodes and prevent memory leaks + elem = this[i] || {}; + if ( elem.nodeType === 1 ) { + jQuery.cleanData( getAll( elem, false ) ); + elem.innerHTML = value; + } + } + + elem = 0; + + // If using innerHTML throws an exception, use the fallback method + } catch(e) {} + } + + if ( elem ) { + this.empty().append( value ); + } + }, null, value, arguments.length ); + }, + + replaceWith: function( value ) { + var isFunc = jQuery.isFunction( value ); + + // Make sure that the elements are removed from the DOM before they are inserted + // this can help fix replacing a parent with child elements + if ( !isFunc && typeof value !== "string" ) { + value = jQuery( value ).not( this ).detach(); + } + + return this.domManip( [ value ], true, function( elem ) { + var next = this.nextSibling, + parent = this.parentNode; + + if ( parent ) { + jQuery( this ).remove(); + parent.insertBefore( elem, next ); + } + }); + }, + + detach: function( selector ) { + return this.remove( selector, true ); + }, + + domManip: function( args, table, callback ) { + + // Flatten any nested arrays + args = core_concat.apply( [], args ); + + var first, node, hasScripts, + scripts, doc, fragment, + i = 0, + l = this.length, + set = this, + iNoClone = l - 1, + value = args[0], + isFunction = jQuery.isFunction( value ); + + // We can't cloneNode fragments that contain checked, in WebKit + if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) { + return this.each(function( index ) { + var self = set.eq( index ); + if ( isFunction ) { + args[0] = value.call( this, index, table ? self.html() : undefined ); + } + self.domManip( args, table, callback ); + }); + } + + if ( l ) { + fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this ); + first = fragment.firstChild; + + if ( fragment.childNodes.length === 1 ) { + fragment = first; + } + + if ( first ) { + table = table && jQuery.nodeName( first, "tr" ); + scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); + hasScripts = scripts.length; + + // Use the original fragment for the last item instead of the first because it can end up + // being emptied incorrectly in certain situations (#8070). + for ( ; i < l; i++ ) { + node = fragment; + + if ( i !== iNoClone ) { + node = jQuery.clone( node, true, true ); + + // Keep references to cloned scripts for later restoration + if ( hasScripts ) { + jQuery.merge( scripts, getAll( node, "script" ) ); + } + } + + callback.call( + table && jQuery.nodeName( this[i], "table" ) ? + findOrAppend( this[i], "tbody" ) : + this[i], + node, + i + ); + } + + if ( hasScripts ) { + doc = scripts[ scripts.length - 1 ].ownerDocument; + + // Reenable scripts + jQuery.map( scripts, restoreScript ); + + // Evaluate executable scripts on first document insertion + for ( i = 0; i < hasScripts; i++ ) { + node = scripts[ i ]; + if ( rscriptType.test( node.type || "" ) && + !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) { + + if ( node.src ) { + // Hope ajax is available... + jQuery.ajax({ + url: node.src, + type: "GET", + dataType: "script", + async: false, + global: false, + "throws": true + }); + } else { + jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) ); + } + } + } + } + + // Fix #11809: Avoid leaking memory + fragment = first = null; + } + } + + return this; + } +}); + +function findOrAppend( elem, tag ) { + return elem.getElementsByTagName( tag )[0] || elem.appendChild( elem.ownerDocument.createElement( tag ) ); +} + +// Replace/restore the type attribute of script elements for safe DOM manipulation +function disableScript( elem ) { + var attr = elem.getAttributeNode("type"); + elem.type = ( attr && attr.specified ) + "/" + elem.type; + return elem; +} +function restoreScript( elem ) { + var match = rscriptTypeMasked.exec( elem.type ); + if ( match ) { + elem.type = match[1]; + } else { + elem.removeAttribute("type"); + } + return elem; +} + +// Mark scripts as having already been evaluated +function setGlobalEval( elems, refElements ) { + var elem, + i = 0; + for ( ; (elem = elems[i]) != null; i++ ) { + jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) ); + } +} + +function cloneCopyEvent( src, dest ) { + + if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { + return; + } + + var type, i, l, + oldData = jQuery._data( src ), + curData = jQuery._data( dest, oldData ), + events = oldData.events; + + if ( events ) { + delete curData.handle; + curData.events = {}; + + for ( type in events ) { + for ( i = 0, l = events[ type ].length; i < l; i++ ) { + jQuery.event.add( dest, type, events[ type ][ i ] ); + } + } + } + + // make the cloned public data object a copy from the original + if ( curData.data ) { + curData.data = jQuery.extend( {}, curData.data ); + } +} + +function fixCloneNodeIssues( src, dest ) { + var nodeName, e, data; + + // We do not need to do anything for non-Elements + if ( dest.nodeType !== 1 ) { + return; + } + + nodeName = dest.nodeName.toLowerCase(); + + // IE6-8 copies events bound via attachEvent when using cloneNode. + if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) { + data = jQuery._data( dest ); + + for ( e in data.events ) { + jQuery.removeEvent( dest, e, data.handle ); + } + + // Event data gets referenced instead of copied if the expando gets copied too + dest.removeAttribute( jQuery.expando ); + } + + // IE blanks contents when cloning scripts, and tries to evaluate newly-set text + if ( nodeName === "script" && dest.text !== src.text ) { + disableScript( dest ).text = src.text; + restoreScript( dest ); + + // IE6-10 improperly clones children of object elements using classid. + // IE10 throws NoModificationAllowedError if parent is null, #12132. + } else if ( nodeName === "object" ) { + if ( dest.parentNode ) { + dest.outerHTML = src.outerHTML; + } + + // This path appears unavoidable for IE9. When cloning an object + // element in IE9, the outerHTML strategy above is not sufficient. + // If the src has innerHTML and the destination does not, + // copy the src.innerHTML into the dest.innerHTML. #10324 + if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) { + dest.innerHTML = src.innerHTML; + } + + } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) { + // IE6-8 fails to persist the checked state of a cloned checkbox + // or radio button. Worse, IE6-7 fail to give the cloned element + // a checked appearance if the defaultChecked value isn't also set + + dest.defaultChecked = dest.checked = src.checked; + + // IE6-7 get confused and end up setting the value of a cloned + // checkbox/radio button to an empty string instead of "on" + if ( dest.value !== src.value ) { + dest.value = src.value; + } + + // IE6-8 fails to return the selected option to the default selected + // state when cloning options + } else if ( nodeName === "option" ) { + dest.defaultSelected = dest.selected = src.defaultSelected; + + // IE6-8 fails to set the defaultValue to the correct value when + // cloning other types of input fields + } else if ( nodeName === "input" || nodeName === "textarea" ) { + dest.defaultValue = src.defaultValue; + } +} + +jQuery.each({ + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" +}, function( name, original ) { + jQuery.fn[ name ] = function( selector ) { + var elems, + i = 0, + ret = [], + insert = jQuery( selector ), + last = insert.length - 1; + + for ( ; i <= last; i++ ) { + elems = i === last ? this : this.clone(true); + jQuery( insert[i] )[ original ]( elems ); + + // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() + core_push.apply( ret, elems.get() ); + } + + return this.pushStack( ret ); + }; +}); + +function getAll( context, tag ) { + var elems, elem, + i = 0, + found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || "*" ) : + typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || "*" ) : + undefined; + + if ( !found ) { + for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) { + if ( !tag || jQuery.nodeName( elem, tag ) ) { + found.push( elem ); + } else { + jQuery.merge( found, getAll( elem, tag ) ); + } + } + } + + return tag === undefined || tag && jQuery.nodeName( context, tag ) ? + jQuery.merge( [ context ], found ) : + found; +} + +// Used in buildFragment, fixes the defaultChecked property +function fixDefaultChecked( elem ) { + if ( manipulation_rcheckableType.test( elem.type ) ) { + elem.defaultChecked = elem.checked; + } +} + +jQuery.extend({ + clone: function( elem, dataAndEvents, deepDataAndEvents ) { + var destElements, node, clone, i, srcElements, + inPage = jQuery.contains( elem.ownerDocument, elem ); + + if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { + clone = elem.cloneNode( true ); + + // IE<=8 does not properly clone detached, unknown element nodes + } else { + fragmentDiv.innerHTML = elem.outerHTML; + fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); + } + + if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && + (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { + + // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 + destElements = getAll( clone ); + srcElements = getAll( elem ); + + // Fix all IE cloning issues + for ( i = 0; (node = srcElements[i]) != null; ++i ) { + // Ensure that the destination node is not null; Fixes #9587 + if ( destElements[i] ) { + fixCloneNodeIssues( node, destElements[i] ); + } + } + } + + // Copy the events from the original to the clone + if ( dataAndEvents ) { + if ( deepDataAndEvents ) { + srcElements = srcElements || getAll( elem ); + destElements = destElements || getAll( clone ); + + for ( i = 0; (node = srcElements[i]) != null; i++ ) { + cloneCopyEvent( node, destElements[i] ); + } + } else { + cloneCopyEvent( elem, clone ); + } + } + + // Preserve script evaluation history + destElements = getAll( clone, "script" ); + if ( destElements.length > 0 ) { + setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); + } + + destElements = srcElements = node = null; + + // Return the cloned set + return clone; + }, + + buildFragment: function( elems, context, scripts, selection ) { + var j, elem, contains, + tmp, tag, tbody, wrap, + l = elems.length, + + // Ensure a safe fragment + safe = createSafeFragment( context ), + + nodes = [], + i = 0; + + for ( ; i < l; i++ ) { + elem = elems[ i ]; + + if ( elem || elem === 0 ) { + + // Add nodes directly + if ( jQuery.type( elem ) === "object" ) { + jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); + + // Convert non-html into a text node + } else if ( !rhtml.test( elem ) ) { + nodes.push( context.createTextNode( elem ) ); + + // Convert html into DOM nodes + } else { + tmp = tmp || safe.appendChild( context.createElement("div") ); + + // Deserialize a standard representation + tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); + wrap = wrapMap[ tag ] || wrapMap._default; + + tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1>" ) + wrap[2]; + + // Descend through wrappers to the right content + j = wrap[0]; + while ( j-- ) { + tmp = tmp.lastChild; + } + + // Manually add leading whitespace removed by IE + if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { + nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) ); + } + + // Remove IE's autoinserted from table fragments + if ( !jQuery.support.tbody ) { + + // String was a , *may* have spurious + elem = tag === "table" && !rtbody.test( elem ) ? + tmp.firstChild : + + // String was a bare or + wrap[1] === "
    " && !rtbody.test( elem ) ? + tmp : + 0; + + j = elem && elem.childNodes.length; + while ( j-- ) { + if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) { + elem.removeChild( tbody ); + } + } + } + + jQuery.merge( nodes, tmp.childNodes ); + + // Fix #12392 for WebKit and IE > 9 + tmp.textContent = ""; + + // Fix #12392 for oldIE + while ( tmp.firstChild ) { + tmp.removeChild( tmp.firstChild ); + } + + // Remember the top-level container for proper cleanup + tmp = safe.lastChild; + } + } + } + + // Fix #11356: Clear elements from fragment + if ( tmp ) { + safe.removeChild( tmp ); + } + + // Reset defaultChecked for any radios and checkboxes + // about to be appended to the DOM in IE 6/7 (#8060) + if ( !jQuery.support.appendChecked ) { + jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); + } + + i = 0; + while ( (elem = nodes[ i++ ]) ) { + + // #4087 - If origin and destination elements are the same, and this is + // that element, do not do anything + if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { + continue; + } + + contains = jQuery.contains( elem.ownerDocument, elem ); + + // Append to fragment + tmp = getAll( safe.appendChild( elem ), "script" ); + + // Preserve script evaluation history + if ( contains ) { + setGlobalEval( tmp ); + } + + // Capture executables + if ( scripts ) { + j = 0; + while ( (elem = tmp[ j++ ]) ) { + if ( rscriptType.test( elem.type || "" ) ) { + scripts.push( elem ); + } + } + } + } + + tmp = null; + + return safe; + }, + + cleanData: function( elems, /* internal */ acceptData ) { + var elem, type, id, data, + i = 0, + internalKey = jQuery.expando, + cache = jQuery.cache, + deleteExpando = jQuery.support.deleteExpando, + special = jQuery.event.special; + + for ( ; (elem = elems[i]) != null; i++ ) { + + if ( acceptData || jQuery.acceptData( elem ) ) { + + id = elem[ internalKey ]; + data = id && cache[ id ]; + + if ( data ) { + if ( data.events ) { + for ( type in data.events ) { + if ( special[ type ] ) { + jQuery.event.remove( elem, type ); + + // This is a shortcut to avoid jQuery.event.remove's overhead + } else { + jQuery.removeEvent( elem, type, data.handle ); + } + } + } + + // Remove cache only if it was not already removed by jQuery.event.remove + if ( cache[ id ] ) { + + delete cache[ id ]; + + // IE does not allow us to delete expando properties from nodes, + // nor does it have a removeAttribute function on Document nodes; + // we must handle all of these cases + if ( deleteExpando ) { + delete elem[ internalKey ]; + + } else if ( typeof elem.removeAttribute !== core_strundefined ) { + elem.removeAttribute( internalKey ); + + } else { + elem[ internalKey ] = null; + } + + core_deletedIds.push( id ); + } + } + } + } + } +}); +var iframe, getStyles, curCSS, + ralpha = /alpha\([^)]*\)/i, + ropacity = /opacity\s*=\s*([^)]*)/, + rposition = /^(top|right|bottom|left)$/, + // swappable if display is none or starts with table except "table", "table-cell", or "table-caption" + // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display + rdisplayswap = /^(none|table(?!-c[ea]).+)/, + rmargin = /^margin/, + rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), + rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), + rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ), + elemdisplay = { BODY: "block" }, + + cssShow = { position: "absolute", visibility: "hidden", display: "block" }, + cssNormalTransform = { + letterSpacing: 0, + fontWeight: 400 + }, + + cssExpand = [ "Top", "Right", "Bottom", "Left" ], + cssPrefixes = [ "Webkit", "O", "Moz", "ms" ]; + +// return a css property mapped to a potentially vendor prefixed property +function vendorPropName( style, name ) { + + // shortcut for names that are not vendor prefixed + if ( name in style ) { + return name; + } + + // check for vendor prefixed names + var capName = name.charAt(0).toUpperCase() + name.slice(1), + origName = name, + i = cssPrefixes.length; + + while ( i-- ) { + name = cssPrefixes[ i ] + capName; + if ( name in style ) { + return name; + } + } + + return origName; +} + +function isHidden( elem, el ) { + // isHidden might be called from jQuery#filter function; + // in that case, element will be second argument + elem = el || elem; + return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); +} + +function showHide( elements, show ) { + var display, elem, hidden, + values = [], + index = 0, + length = elements.length; + + for ( ; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + + values[ index ] = jQuery._data( elem, "olddisplay" ); + display = elem.style.display; + if ( show ) { + // Reset the inline display of this element to learn if it is + // being hidden by cascaded rules or not + if ( !values[ index ] && display === "none" ) { + elem.style.display = ""; + } + + // Set elements which have been overridden with display: none + // in a stylesheet to whatever the default browser style is + // for such an element + if ( elem.style.display === "" && isHidden( elem ) ) { + values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); + } + } else { + + if ( !values[ index ] ) { + hidden = isHidden( elem ); + + if ( display && display !== "none" || !hidden ) { + jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) ); + } + } + } + } + + // Set the display of most of the elements in a second loop + // to avoid the constant reflow + for ( index = 0; index < length; index++ ) { + elem = elements[ index ]; + if ( !elem.style ) { + continue; + } + if ( !show || elem.style.display === "none" || elem.style.display === "" ) { + elem.style.display = show ? values[ index ] || "" : "none"; + } + } + + return elements; +} + +jQuery.fn.extend({ + css: function( name, value ) { + return jQuery.access( this, function( elem, name, value ) { + var len, styles, + map = {}, + i = 0; + + if ( jQuery.isArray( name ) ) { + styles = getStyles( elem ); + len = name.length; + + for ( ; i < len; i++ ) { + map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); + } + + return map; + } + + return value !== undefined ? + jQuery.style( elem, name, value ) : + jQuery.css( elem, name ); + }, name, value, arguments.length > 1 ); + }, + show: function() { + return showHide( this, true ); + }, + hide: function() { + return showHide( this ); + }, + toggle: function( state ) { + var bool = typeof state === "boolean"; + + return this.each(function() { + if ( bool ? state : isHidden( this ) ) { + jQuery( this ).show(); + } else { + jQuery( this ).hide(); + } + }); + } +}); + +jQuery.extend({ + // Add in style property hooks for overriding the default + // behavior of getting and setting a style property + cssHooks: { + opacity: { + get: function( elem, computed ) { + if ( computed ) { + // We should always get a number back from opacity + var ret = curCSS( elem, "opacity" ); + return ret === "" ? "1" : ret; + } + } + } + }, + + // Exclude the following css properties to add px + cssNumber: { + "columnCount": true, + "fillOpacity": true, + "fontWeight": true, + "lineHeight": true, + "opacity": true, + "orphans": true, + "widows": true, + "zIndex": true, + "zoom": true + }, + + // Add in properties whose names you wish to fix before + // setting or getting the value + cssProps: { + // normalize float css property + "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" + }, + + // Get and set the style property on a DOM Node + style: function( elem, name, value, extra ) { + // Don't set styles on text and comment nodes + if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { + return; + } + + // Make sure that we're working with the right name + var ret, type, hooks, + origName = jQuery.camelCase( name ), + style = elem.style; + + name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); + + // gets hook for the prefixed version + // followed by the unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // Check if we're setting a value + if ( value !== undefined ) { + type = typeof value; + + // convert relative number strings (+= or -=) to relative numbers. #7345 + if ( type === "string" && (ret = rrelNum.exec( value )) ) { + value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); + // Fixes bug #9237 + type = "number"; + } + + // Make sure that NaN and null values aren't set. See: #7116 + if ( value == null || type === "number" && isNaN( value ) ) { + return; + } + + // If a number was passed in, add 'px' to the (except for certain CSS properties) + if ( type === "number" && !jQuery.cssNumber[ origName ] ) { + value += "px"; + } + + // Fixes #8908, it can be done more correctly by specifing setters in cssHooks, + // but it would mean to define eight (for every problematic property) identical functions + if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) { + style[ name ] = "inherit"; + } + + // If a hook was provided, use that value, otherwise just set the specified value + if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { + + // Wrapped to prevent IE from throwing errors when 'invalid' values are provided + // Fixes bug #5509 + try { + style[ name ] = value; + } catch(e) {} + } + + } else { + // If a hook was provided get the non-computed value from there + if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { + return ret; + } + + // Otherwise just get the value from the style object + return style[ name ]; + } + }, + + css: function( elem, name, extra, styles ) { + var num, val, hooks, + origName = jQuery.camelCase( name ); + + // Make sure that we're working with the right name + name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); + + // gets hook for the prefixed version + // followed by the unprefixed version + hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; + + // If a hook was provided get the computed value from there + if ( hooks && "get" in hooks ) { + val = hooks.get( elem, true, extra ); + } + + // Otherwise, if a way to get the computed value exists, use that + if ( val === undefined ) { + val = curCSS( elem, name, styles ); + } + + //convert "normal" to computed value + if ( val === "normal" && name in cssNormalTransform ) { + val = cssNormalTransform[ name ]; + } + + // Return, converting to number if forced or a qualifier was provided and val looks numeric + if ( extra === "" || extra ) { + num = parseFloat( val ); + return extra === true || jQuery.isNumeric( num ) ? num || 0 : val; + } + return val; + }, + + // A method for quickly swapping in/out CSS properties to get correct calculations + swap: function( elem, options, callback, args ) { + var ret, name, + old = {}; + + // Remember the old values, and insert the new ones + for ( name in options ) { + old[ name ] = elem.style[ name ]; + elem.style[ name ] = options[ name ]; + } + + ret = callback.apply( elem, args || [] ); + + // Revert the old values + for ( name in options ) { + elem.style[ name ] = old[ name ]; + } + + return ret; + } +}); + +// NOTE: we've included the "window" in window.getComputedStyle +// because jsdom on node.js will break without it. +if ( window.getComputedStyle ) { + getStyles = function( elem ) { + return window.getComputedStyle( elem, null ); + }; + + curCSS = function( elem, name, _computed ) { + var width, minWidth, maxWidth, + computed = _computed || getStyles( elem ), + + // getPropertyValue is only needed for .css('filter') in IE9, see #12537 + ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined, + style = elem.style; + + if ( computed ) { + + if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { + ret = jQuery.style( elem, name ); + } + + // A tribute to the "awesome hack by Dean Edwards" + // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right + // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels + // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values + if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { + + // Remember the original values + width = style.width; + minWidth = style.minWidth; + maxWidth = style.maxWidth; + + // Put in the new values to get a computed value out + style.minWidth = style.maxWidth = style.width = ret; + ret = computed.width; + + // Revert the changed values + style.width = width; + style.minWidth = minWidth; + style.maxWidth = maxWidth; + } + } + + return ret; + }; +} else if ( document.documentElement.currentStyle ) { + getStyles = function( elem ) { + return elem.currentStyle; + }; + + curCSS = function( elem, name, _computed ) { + var left, rs, rsLeft, + computed = _computed || getStyles( elem ), + ret = computed ? computed[ name ] : undefined, + style = elem.style; + + // Avoid setting ret to empty string here + // so we don't default to auto + if ( ret == null && style && style[ name ] ) { + ret = style[ name ]; + } + + // From the awesome hack by Dean Edwards + // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 + + // If we're not dealing with a regular pixel number + // but a number that has a weird ending, we need to convert it to pixels + // but not position css attributes, as those are proportional to the parent element instead + // and we can't measure the parent instead because it might trigger a "stacking dolls" problem + if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { + + // Remember the original values + left = style.left; + rs = elem.runtimeStyle; + rsLeft = rs && rs.left; + + // Put in the new values to get a computed value out + if ( rsLeft ) { + rs.left = elem.currentStyle.left; + } + style.left = name === "fontSize" ? "1em" : ret; + ret = style.pixelLeft + "px"; + + // Revert the changed values + style.left = left; + if ( rsLeft ) { + rs.left = rsLeft; + } + } + + return ret === "" ? "auto" : ret; + }; +} + +function setPositiveNumber( elem, value, subtract ) { + var matches = rnumsplit.exec( value ); + return matches ? + // Guard against undefined "subtract", e.g., when used as in cssHooks + Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : + value; +} + +function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { + var i = extra === ( isBorderBox ? "border" : "content" ) ? + // If we already have the right measurement, avoid augmentation + 4 : + // Otherwise initialize for horizontal or vertical properties + name === "width" ? 1 : 0, + + val = 0; + + for ( ; i < 4; i += 2 ) { + // both box models exclude margin, so add it if we want it + if ( extra === "margin" ) { + val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); + } + + if ( isBorderBox ) { + // border-box includes padding, so remove it if we want content + if ( extra === "content" ) { + val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + } + + // at this point, extra isn't border nor margin, so remove border + if ( extra !== "margin" ) { + val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } else { + // at this point, extra isn't content, so add padding + val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); + + // at this point, extra isn't content nor padding, so add border + if ( extra !== "padding" ) { + val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); + } + } + } + + return val; +} + +function getWidthOrHeight( elem, name, extra ) { + + // Start with offset property, which is equivalent to the border-box value + var valueIsBorderBox = true, + val = name === "width" ? elem.offsetWidth : elem.offsetHeight, + styles = getStyles( elem ), + isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; + + // some non-html elements return undefined for offsetWidth, so check for null/undefined + // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 + // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 + if ( val <= 0 || val == null ) { + // Fall back to computed then uncomputed css if necessary + val = curCSS( elem, name, styles ); + if ( val < 0 || val == null ) { + val = elem.style[ name ]; + } + + // Computed unit is not pixels. Stop here and return. + if ( rnumnonpx.test(val) ) { + return val; + } + + // we need the check for style in case a browser which returns unreliable values + // for getComputedStyle silently falls back to the reliable elem.style + valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); + + // Normalize "", auto, and prepare for extra + val = parseFloat( val ) || 0; + } + + // use the active box-sizing model to add/subtract irrelevant styles + return ( val + + augmentWidthOrHeight( + elem, + name, + extra || ( isBorderBox ? "border" : "content" ), + valueIsBorderBox, + styles + ) + ) + "px"; +} + +// Try to determine the default display value of an element +function css_defaultDisplay( nodeName ) { + var doc = document, + display = elemdisplay[ nodeName ]; + + if ( !display ) { + display = actualDisplay( nodeName, doc ); + + // If the simple way fails, read from inside an iframe + if ( display === "none" || !display ) { + // Use the already-created iframe if possible + iframe = ( iframe || + jQuery("